commit d8a5b80568a9cb66810e75b182018e9edb68e8ff Author: Linus Torvalds Date: Sun Jan 28 13:20:33 2018 -0800 Linux 4.15 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24b1cccf922914f3d6eeb84036dde8338bc03abb Merge: 32c6cdf 1df3738 Author: Linus Torvalds Date: Sun Jan 28 12:24:36 2018 -0800 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 retpoline fixlet from Thomas Gleixner: "Remove the ESP/RSP thunks for retpoline as they cannot ever work. Get rid of them before they show up in a release" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/retpoline: Remove the esp/rsp thunk commit 32c6cdf75c9270848d2d0ed7c814eba05b47081f Merge: 07b0137 dd08516 Author: Linus Torvalds Date: Sun Jan 28 12:19:23 2018 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A set of small fixes for 4.15: - Fix vmapped stack synchronization on systems with 4-level paging and a large amount of memory caused by a missing 5-level folding which made the pgd synchronization logic to fail and causing double faults. - Add a missing sanity check in the vmalloc_fault() logic on 5-level paging systems. - Bring back protection against accessing a freed initrd in the microcode loader which was lost by a wrong merge conflict resolution. - Extend the Broadwell micro code loading sanity check. - Add a missing ENDPROC annotation in ftrace assembly code which makes ORC unhappy. - Prevent loading the AMD power module on !AMD platforms. The load itself is uncritical, but an unload attempt results in a kernel crash. - Update Peter Anvins role in the MAINTAINERS file" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ftrace: Add one more ENDPROC annotation x86: Mark hpa as a "Designated Reviewer" for the time being x86/mm/64: Tighten up vmalloc_fault() sanity checks on 5-level kernels x86/mm/64: Fix vmapped stack syncing on very-large-memory 4-level systems x86/microcode: Fix again accessing initrd after having been freed x86/microcode/intel: Extend BDW late-loading further with LLC size check perf/x86/amd/power: Do not load AMD power module on !AMD platforms commit 07b0137c0268b8d0694a5f09284449353a1a6fed Merge: 6244419 d5421ea Author: Linus Torvalds Date: Sun Jan 28 12:17:35 2018 -0800 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 ~10 years old problem which causes high resolution timers to stop after a CPU unplug/plug cycle due to a stale flag in the per CPU hrtimer base struct. Paul McKenney was hunting this for about a year, but the heisenbug nature made it resistant against debug attempts for quite some time" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: hrtimer: Reset hrtimer cpu base proper on CPU hotplug commit 624441927ff6af871d793dfa49fa347c8450e250 Merge: 39e3836 ce48c146 Author: Linus Torvalds Date: Sun Jan 28 11:51:45 2018 -0800 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Thomas Gleixner: "A single bug fix to prevent a subtle deadlock in the scheduler core code vs cpu hotplug" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Fix cpu.max vs. cpuhotplug deadlock commit 39e383626caffd2b5f4407710157b32172898869 Merge: 8c76e31 efe951d Author: Linus Torvalds Date: Sun Jan 28 11:48:25 2018 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "Four patches which all address lock inversions and deadlocks in the perf core code and the Intel debug store" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86: Fix perf,x86,cpuhp deadlock perf/core: Fix ctx::mutex deadlock perf/core: Fix another perf,trace,cpuhp lock inversion perf/core: Fix lock inversion between perf,trace,cpuhp commit 8c76e31a6af1f27f7ccd381757adcae2984eac91 Merge: c4e0ca7 88f1c87 Author: Linus Torvalds Date: Sun Jan 28 11:20:35 2018 -0800 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Thomas Gleixner: "Two final locking fixes for 4.15: - Repair the OWNER_DIED logic in the futex code which got wreckaged with the recent fix for a subtle race condition. - Prevent the hard lockup detector from triggering when dumping all held locks in the system" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/lockdep: Avoid triggering hardlockup from debug_show_all_locks() futex: Fix OWNER_DEAD fixup commit dd085168a74c99c3ebe7f813069e412eb8444243 Author: Josh Poimboeuf Date: Sat Jan 27 20:21:50 2018 -0600 x86/ftrace: Add one more ENDPROC annotation When ORC support was added for the ftrace_64.S code, an ENDPROC for function_hook() was missed. This results in the following warning: arch/x86/kernel/ftrace_64.o: warning: objtool: .entry.text+0x0: unreachable instruction Fixes: e2ac83d74a4d ("x86/ftrace: Fix ORC unwinding from ftrace handlers") Reported-by: Steven Rostedt Reported-by: Borislav Petkov Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Cc: Linus Torvalds Link: https://lkml.kernel.org/r/20180128022150.dqierscqmt3uwwsr@treble arch/x86/kernel/ftrace_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5421ea43d30701e03cadc56a38854c36a8b4433 Author: Thomas Gleixner Date: Fri Jan 26 14:54:32 2018 +0100 hrtimer: Reset hrtimer cpu base proper on CPU hotplug The hrtimer interrupt code contains a hang detection and mitigation mechanism, which prevents that a long delayed hrtimer interrupt causes a continous retriggering of interrupts which prevent the system from making progress. If a hang is detected then the timer hardware is programmed with a certain delay into the future and a flag is set in the hrtimer cpu base which prevents newly enqueued timers from reprogramming the timer hardware prior to the chosen delay. The subsequent hrtimer interrupt after the delay clears the flag and resumes normal operation. If such a hang happens in the last hrtimer interrupt before a CPU is unplugged then the hang_detected flag is set and stays that way when the CPU is plugged in again. At that point the timer hardware is not armed and it cannot be armed because the hang_detected flag is still active, so nothing clears that flag. As a consequence the CPU does not receive hrtimer interrupts and no timers expire on that CPU which results in RCU stalls and other malfunctions. Clear the flag along with some other less critical members of the hrtimer cpu base to ensure starting from a clean state when a CPU is plugged in. Thanks to Paul, Sebastian and Anna-Maria for their help to get down to the root cause of that hard to reproduce heisenbug. Once understood it's trivial and certainly justifies a brown paperbag. Fixes: 41d2e4949377 ("hrtimer: Tune hrtimer_interrupt hang logic") Reported-by: Paul E. McKenney Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Sebastian Sewior Cc: Anna-Maria Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801261447590.2067@nanos kernel/time/hrtimer.c | 3 +++ 1 file changed, 3 insertions(+) commit 8a95b74d50825067fb6c8af7f9db03e711b1cb9d Author: H. Peter Anvin Date: Thu Jan 25 11:59:34 2018 -0800 x86: Mark hpa as a "Designated Reviewer" for the time being Due to some unfortunate events, I have not been directly involved in the x86 kernel patch flow for a while now. I have also not been able to ramp back up by now like I had hoped to, and after reviewing what I will need to work on both internally at Intel and elsewhere in the near term, it is clear that I am not going to be able to ramp back up until late 2018 at the very earliest. It is not acceptable to not recognize that this load is currently taken by Ingo and Thomas without my direct participation, so I mark myself as R: (designated reviewer) rather than M: (maintainer) until further notice. This is in fact recognizing the de facto situation for the past few years. I have obviously no intention of going away, and I will do everything within my power to improve Linux on x86 and x86 for Linux. This, however, puts credit where it is due and reflects a change of focus. This patch also removes stale entries for portions of the x86 architecture which have not been maintained separately from arch/x86 for a long time. If there is a reason to re-introduce them then that can happen later. Signed-off-by: H. Peter Anvin Signed-off-by: Thomas Gleixner Cc: Bruce Schlobohm Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180125195934.5253-1-hpa@zytor.com Signed-off-by: Ingo Molnar MAINTAINERS | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit c4e0ca7fa24137e372d6135fe16e8df8e123f116 Merge: ba804bb 6572cc2 Author: Linus Torvalds Date: Fri Jan 26 15:10:50 2018 -0800 Merge tag 'riscv-for-linus-4.15-maintainers' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux Pull RISC-V update from Palmer Dabbelt: "RISC-V: We have a new mailing list and git repo! Sorry to send something essentially as late as possible (Friday after an rc9), but we managed to get a mailing list for the RISC-V Linux port. We've been using patches@groups.riscv.org for a while, but that list has some problems (it's Google Groups and it's shared over all RISC-V software projects). The new infaread.org list is much better. We just got it on Wednesday but I used it a bit on Thursday to shake out all the configuration problems and it appears to be in working order. When I updated the mailing list I noticed that the MAINTAINERS file was pointing to our github repo, but now that we have a kernel.org repo I'd like to point to that instead so I changed that as well. We'll be centralizing all RISC-V Linux related development here as that seems to be the saner way to go about it. I can understand if it's too late to get this into 4.15, but given that it's not a code change I was hoping it'd still be OK. It would be nice to have the new mailing list and git repo in the release tarballs so when people start to find bugs they'll get to the right place" * tag 'riscv-for-linus-4.15-maintainers' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux: Update the RISC-V MAINTAINERS file commit ba804bb4b72e57374b5f567b783aa0298fba0ce6 Merge: db21854 ba3169f Author: Linus Torvalds Date: Fri Jan 26 09:03:16 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) The per-network-namespace loopback device, and thus its namespace, can have its teardown deferred for a long time if a kernel created TCP socket closes and the namespace is exiting meanwhile. The kernel keeps trying to finish the close sequence until it times out (which takes quite some time). Fix this by forcing the socket closed in this situation, from Dan Streetman. 2) Fix regression where we're trying to invoke the update_pmtu method on route types (in this case metadata tunnel routes) that don't implement the dst_ops method. Fix from Nicolas Dichtel. 3) Fix long standing memory corruption issues in r8169 driver by performing the chip statistics DMA programming more correctly. From Francois Romieu. 4) Handle local broadcast sends over VRF routes properly, from David Ahern. 5) Don't refire the DCCP CCID2 timer endlessly, otherwise the socket can never be released. From Alexey Kodanev. 6) Set poll flags properly in VSOCK protocol layer, from Stefan Hajnoczi. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: VSOCK: set POLLOUT | POLLWRNORM for TCP_CLOSING dccp: don't restart ccid2_hc_tx_rto_expire() if sk in closed state net: vrf: Add support for sends to local broadcast address r8169: fix memory corruption on retrieval of hardware statistics. net: don't call update_pmtu unconditionally net: tcp: close sock if net namespace is exiting commit db218549e65d1da181b2bfd3c362f58ffc12cf97 Merge: 993ca20 baa35cc Author: Linus Torvalds Date: Fri Jan 26 08:59:57 2018 -0800 Merge tag 'drm-fixes-for-v4.15-rc10-2' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "A fairly urgent nouveau regression fix for broken irqs across suspend/resume came in. This was broken before but a patch in 4.15 has made it much more obviously broken and now s/r fails a lot more often. The fix removes freeing the irq across s/r which never should have been done anyways. Also two vc4 fixes for a NULL deference and some misrendering / flickering on screen" * tag 'drm-fixes-for-v4.15-rc10-2' of git://people.freedesktop.org/~airlied/linux: drm/nouveau: Move irq setup/teardown to pci ctor/dtor drm/vc4: Fix NULL pointer dereference in vc4_save_hang_state() drm/vc4: Flush the caches before the bin jobs, as well. commit ba3169fc7548759be986b168d662e0ba64c2fd88 Author: Stefan Hajnoczi Date: Fri Jan 26 11:48:25 2018 +0000 VSOCK: set POLLOUT | POLLWRNORM for TCP_CLOSING select(2) with wfds but no rfds must return when the socket is shut down by the peer. This way userspace notices socket activity and gets -EPIPE from the next write(2). Currently select(2) does not return for virtio-vsock when a SEND+RCV shutdown packet is received. This is because vsock_poll() only sets POLLOUT | POLLWRNORM for TCP_CLOSE, not the TCP_CLOSING state that the socket is in when the shutdown is received. Signed-off-by: Stefan Hajnoczi Signed-off-by: David S. Miller net/vmw_vsock/af_vsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd5684ecae3bd8e44b644f50e2c12c7e57fdfef5 Author: Alexey Kodanev Date: Fri Jan 26 15:14:16 2018 +0300 dccp: don't restart ccid2_hc_tx_rto_expire() if sk in closed state ccid2_hc_tx_rto_expire() timer callback always restarts the timer again and can run indefinitely (unless it is stopped outside), and after commit 120e9dabaf55 ("dccp: defer ccid_hc_tx_delete() at dismantle time"), which moved ccid_hc_tx_delete() (also includes sk_stop_timer()) from dccp_destroy_sock() to sk_destruct(), this started to happen quite often. The timer prevents releasing the socket, as a result, sk_destruct() won't be called. Found with LTP/dccp_ipsec tests running on the bonding device, which later couldn't be unloaded after the tests were completed: unregister_netdevice: waiting for bond0 to become free. Usage count = 148 Fixes: 2a91aa396739 ("[DCCP] CCID2: Initial CCID2 (TCP-Like) implementation") Signed-off-by: Alexey Kodanev Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/dccp/ccids/ccid2.c | 3 +++ 1 file changed, 3 insertions(+) commit 6572cc2bf2e7b10378eaa5a94a0c717dca1289c9 Author: Palmer Dabbelt Date: Wed Jan 24 13:26:11 2018 -0800 Update the RISC-V MAINTAINERS file Now that we're upstream in Linux we've been able to make some infrastructure changes so our port works a bit more like other ports. Specifically: * We now have a mailing list specific to the RISC-V Linux port, hosted at lists.infreadead.org. * We now have a kernel.org git tree where work on our port is coordinated. This patch changes the RISC-V maintainers entry to reflect these new bits of infrastructure. Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 36b3a7726886f24c4209852a58e64435bde3af98 Author: Andy Lutomirski Date: Thu Jan 25 13:12:15 2018 -0800 x86/mm/64: Tighten up vmalloc_fault() sanity checks on 5-level kernels On a 5-level kernel, if a non-init mm has a top-level entry, it needs to match init_mm's, but the vmalloc_fault() code skipped over the BUG_ON() that would have checked it. While we're at it, get rid of the rather confusing 4-level folded "pgd" logic. Cleans-up: b50858ce3e2a ("x86/mm/vmalloc: Add 5-level paging support") Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Konstantin Khlebnikov Cc: Dave Hansen Cc: Borislav Petkov Cc: Neil Berrington Link: https://lkml.kernel.org/r/2ae598f8c279b0a29baf75df207e6f2fdddc0a1b.1516914529.git.luto@kernel.org arch/x86/mm/fault.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 5beda7d54eafece4c974cfa9fbb9f60fb18fd20a Author: Andy Lutomirski Date: Thu Jan 25 13:12:14 2018 -0800 x86/mm/64: Fix vmapped stack syncing on very-large-memory 4-level systems Neil Berrington reported a double-fault on a VM with 768GB of RAM that uses large amounts of vmalloc space with PTI enabled. The cause is that load_new_mm_cr3() was never fixed to take the 5-level pgd folding code into account, so, on a 4-level kernel, the pgd synchronization logic compiles away to exactly nothing. Interestingly, the problem doesn't trigger with nopti. I assume this is because the kernel is mapped with global pages if we boot with nopti. The sequence of operations when we create a new task is that we first load its mm while still running on the old stack (which crashes if the old stack is unmapped in the new mm unless the TLB saves us), then we call prepare_switch_to(), and then we switch to the new stack. prepare_switch_to() pokes the new stack directly, which will populate the mapping through vmalloc_fault(). I assume that we're getting lucky on non-PTI systems -- the old stack's TLB entry stays alive long enough to make it all the way through prepare_switch_to() and switch_to() so that we make it to a valid stack. Fixes: b50858ce3e2a ("x86/mm/vmalloc: Add 5-level paging support") Reported-and-tested-by: Neil Berrington Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Konstantin Khlebnikov Cc: stable@vger.kernel.org Cc: Dave Hansen Cc: Borislav Petkov Link: https://lkml.kernel.org/r/346541c56caed61abbe693d7d2742b4a380c5001.1516914529.git.luto@kernel.org arch/x86/mm/tlb.c | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) commit baa35cc322c1f6c43506ee9a32c232b05a7eaa8c Merge: 7e3f8e9 0fd189a Author: Dave Airlie Date: Fri Jan 26 15:27:07 2018 +1000 Merge branch 'linux-4.15' of git://github.com/skeggsb/linux into drm-fixes Single irq regression fix * 'linux-4.15' of git://github.com/skeggsb/linux: drm/nouveau: Move irq setup/teardown to pci ctor/dtor commit 1e19c4d689dc1e95bafd23ef68fbc0c6b9e05180 Author: David Ahern Date: Wed Jan 24 19:37:37 2018 -0800 net: vrf: Add support for sends to local broadcast address Sukumar reported that sends to the local broadcast address (255.255.255.255) are broken. Check for the address in vrf driver and do not redirect to the VRF device - similar to multicast packets. With this change sockets can use SO_BINDTODEVICE to specify an egress interface and receive responses. Note: the egress interface can not be a VRF device but needs to be the enslaved device. https://bugzilla.kernel.org/show_bug.cgi?id=198521 Reported-by: Sukumar Gopalakrishnan Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a78e93661c5fd30b9e1dee464b2f62f966883ef7 Author: Francois Romieu Date: Fri Jan 26 01:53:26 2018 +0100 r8169: fix memory corruption on retrieval of hardware statistics. Hardware statistics retrieval hurts in tight invocation loops. Avoid extraneous write and enforce strict ordering of writes targeted to the tally counters dump area address registers. Signed-off-by: Francois Romieu Tested-by: Oliver Freyermuth Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 993ca2068b043dc3c933a8a4fe1052b77fe63f10 Merge: 6793f1c 060403f Author: Linus Torvalds Date: Thu Jan 25 17:30:47 2018 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "The main item is that we try to better handle the newer trackpoints on Lenovo devices that are now being produced by Elan/ALPS/NXP and only implement a small subset of the original IBM trackpoint controls" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Revert "Input: synaptics_rmi4 - use devm_device_add_group() for attributes in F01" Input: trackpoint - only expose supported controls for Elan, ALPS and NXP Input: trackpoint - force 3 buttons if 0 button is reported Input: xpad - add support for PDP Xbox One controllers Input: stmfts,s6sy671 - add SPDX identifier commit 6793f1c450b1533a5e9c2493490de771d38b24f9 Author: Martin Brandenburg Date: Thu Jan 25 19:39:44 2018 -0500 orangefs: fix deadlock; do not write i_size in read_iter After do_readv_writev, the inode cache is invalidated anyway, so i_size will never be read. It will be fetched from the server which will also know about updates from other machines. Fixes deadlock on 32-bit SMP. See https://marc.info/?l=linux-fsdevel&m=151268557427760&w=2 Signed-off-by: Martin Brandenburg Cc: Al Viro Cc: Mike Marshall Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds fs/orangefs/file.c | 7 ++----- fs/orangefs/orangefs-kernel.h | 11 ----------- 2 files changed, 2 insertions(+), 16 deletions(-) commit 0fd189a95fdbc631737df5f27a0fc0a3dd31b75e Author: Lyude Paul Date: Thu Jan 25 18:29:53 2018 -0500 drm/nouveau: Move irq setup/teardown to pci ctor/dtor For a while we've been having issues with seemingly random interrupts coming from nvidia cards when resuming them. Originally the fix for this was thought to be just re-arming the MSI interrupt registers right after re-allocating our IRQs, however it seems a lot of what we do is both wrong and not even nessecary. This was made apparent by what appeared to be a regression in the mainline kernel that started introducing suspend/resume issues for nouveau: a0c9259dc4e1 (irq/matrix: Spread interrupts on allocation) After this commit was introduced, we started getting interrupts from the GPU before we actually re-allocated our own IRQ (see references below) and assigned the IRQ handler. Investigating this turned out that the problem was not with the commit, but the fact that nouveau even free/allocates it's irqs before and after suspend/resume. For starters: drivers in the linux kernel haven't had to handle freeing/re-allocating their IRQs during suspend/resume cycles for quite a while now. Nouveau seems to be one of the few drivers left that still does this, despite the fact there's no reason we actually need to since disabling interrupts from the device side should be enough, as the kernel is already smart enough to know to disable host-side interrupts for us before going into suspend. Since we were tearing down our IRQs by hand however, that means there was a short period during resume where interrupts could be received before we re-allocated our IRQ which would lead to us getting an unhandled IRQ. Since we never handle said IRQ and re-arm the interrupt registers, this would cause us to miss all of the interrupts from the GPU and cause our init process to start timing out on anything requiring interrupts. So, since this whole setup/teardown every suspend/resume cycle is useless anyway, move irq setup/teardown into the pci subdev's ctor/dtor functions instead so they're only called at driver load and driver unload. This should fix most of the issues with pending interrupts on resume, along with getting suspend/resume for nouveau to work again. As well, this probably means we can also just remove the msi rearm call inside nvkm_pci_init(). But since our main focus here is to fix suspend/resume before 4.15, we'll save that for a later patch. Signed-off-by: Lyude Paul Cc: Karol Herbst Cc: Thomas Gleixner Cc: Mike Galbraith Cc: stable@vger.kernel.org Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/pci/base.c | 46 +++++++++++++++++--------- 1 file changed, 31 insertions(+), 15 deletions(-) commit f15ca723c1ebe6c1a06bc95fda6b62cd87b44559 Author: Nicolas Dichtel Date: Thu Jan 25 19:03:03 2018 +0100 net: don't call update_pmtu unconditionally Some dst_ops (e.g. md_dst_ops)) doesn't set this handler. It may result to: "BUG: unable to handle kernel NULL pointer dereference at (null)" Let's add a helper to check if update_pmtu is available before calling it. Fixes: 52a589d51f10 ("geneve: update skb dst pmtu on tx path") Fixes: a93bf0ff4490 ("vxlan: update skb dst pmtu on tx path") CC: Roman Kapl CC: Xin Long Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller drivers/infiniband/ulp/ipoib/ipoib_cm.c | 3 +-- drivers/net/geneve.c | 4 ++-- drivers/net/vxlan.c | 6 ++---- include/net/dst.h | 8 ++++++++ net/ipv4/ip_tunnel.c | 3 +-- net/ipv4/ip_vti.c | 2 +- net/ipv6/ip6_tunnel.c | 6 ++---- net/ipv6/ip6_vti.c | 2 +- net/ipv6/sit.c | 4 ++-- 9 files changed, 20 insertions(+), 18 deletions(-) commit 6e20630e300486045bf480139c9e17e7071629ce Merge: 525273f bda646d Author: Linus Torvalds Date: Thu Jan 25 09:32:10 2018 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "Fix races and a potential use after free in the s390 cmma migration code" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: s390: add proper locking for CMMA migration bitmap commit 525273fb2e7c84c98e3dffc5b446141bda99ff01 Merge: 5b7d279 e4fd493 Author: Linus Torvalds Date: Thu Jan 25 09:03:10 2018 -0800 Merge tag 'for-4.15-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "It's been reported recently that readdir can list stale entries under some conditions. Fix it." * tag 'for-4.15-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: fix stale entries in readdir commit 4ee806d51176ba7b8ff1efd81f271d7252e03a1d Author: Dan Streetman Date: Thu Jan 18 16:14:26 2018 -0500 net: tcp: close sock if net namespace is exiting When a tcp socket is closed, if it detects that its net namespace is exiting, close immediately and do not wait for FIN sequence. For normal sockets, a reference is taken to their net namespace, so it will never exit while the socket is open. However, kernel sockets do not take a reference to their net namespace, so it may begin exiting while the kernel socket is still open. In this case if the kernel socket is a tcp socket, it will stay open trying to complete its close sequence. The sock's dst(s) hold a reference to their interface, which are all transferred to the namespace's loopback interface when the real interfaces are taken down. When the namespace tries to take down its loopback interface, it hangs waiting for all references to the loopback interface to release, which results in messages like: unregister_netdevice: waiting for lo to become free. Usage count = 1 These messages continue until the socket finally times out and closes. Since the net namespace cleanup holds the net_mutex while calling its registered pernet callbacks, any new net namespace initialization is blocked until the current net namespace finishes exiting. After this change, the tcp socket notices the exiting net namespace, and closes immediately, releasing its dst(s) and their reference to the loopback interface, which lets the net namespace continue exiting. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1711407 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=97811 Signed-off-by: Dan Streetman Signed-off-by: David S. Miller include/net/net_namespace.h | 10 ++++++++++ net/ipv4/tcp.c | 3 +++ net/ipv4/tcp_timer.c | 15 +++++++++++++++ 3 files changed, 28 insertions(+) commit efe951d3de9141626a494bcb1efb0650eaef6491 Author: Peter Zijlstra Date: Wed Jan 10 19:23:08 2018 +0100 perf/x86: Fix perf,x86,cpuhp deadlock More lockdep gifts, a 5-way lockup race: perf_event_create_kernel_counter() perf_event_alloc() perf_try_init_event() x86_pmu_event_init() __x86_pmu_event_init() x86_reserve_hardware() #0 mutex_lock(&pmc_reserve_mutex); reserve_ds_buffer() #1 get_online_cpus() perf_event_release_kernel() _free_event() hw_perf_event_destroy() x86_release_hardware() #0 mutex_lock(&pmc_reserve_mutex) release_ds_buffer() #1 get_online_cpus() #1 do_cpu_up() perf_event_init_cpu() #2 mutex_lock(&pmus_lock) #3 mutex_lock(&ctx->mutex) sys_perf_event_open() mutex_lock_double() #3 mutex_lock(ctx->mutex) #4 mutex_lock_nested(ctx->mutex, 1); perf_try_init_event() #4 mutex_lock_nested(ctx->mutex, 1) x86_pmu_event_init() intel_pmu_hw_config() x86_add_exclusive() #0 mutex_lock(&pmc_reserve_mutex) Fix it by using ordering constructs instead of locking. 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 Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/events/intel/ds.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) commit 0c7296cad651a3a40286d70ff37e73bd6fa4e4da Author: Peter Zijlstra Date: Tue Jan 9 21:23:02 2018 +0100 perf/core: Fix ctx::mutex deadlock Lockdep noticed the following 3-way lockup scenario: sys_perf_event_open() perf_event_alloc() perf_try_init_event() #0 ctx = perf_event_ctx_lock_nested(1) perf_swevent_init() swevent_hlist_get() #1 mutex_lock(&pmus_lock) perf_event_init_cpu() #1 mutex_lock(&pmus_lock) #2 mutex_lock(&ctx->mutex) sys_perf_event_open() mutex_lock_double() #2 mutex_lock() #0 mutex_lock_nested() And while we need that perf_event_ctx_lock_nested() for HW PMUs such that they can iterate the sibling list, trying to match it to the available counters, the software PMUs need do no such thing. Exclude them. In particular the swevent triggers the above invertion, while the tpevent PMU triggers a more elaborate one through their event_mutex. 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 Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/events/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 43fa87f7deed52e8c8420182e0c133bc4cf395f6 Author: Peter Zijlstra Date: Tue Jan 9 17:07:59 2018 +0100 perf/core: Fix another perf,trace,cpuhp lock inversion Lockdep noticed the following 3-way lockup race: perf_trace_init() #0 mutex_lock(&event_mutex) perf_trace_event_init() perf_trace_event_reg() tp_event->class->reg() := tracepoint_probe_register #1 mutex_lock(&tracepoints_mutex) trace_point_add_func() #2 static_key_enable() #2 do_cpu_up() perf_event_init_cpu() #3 mutex_lock(&pmus_lock) #4 mutex_lock(&ctx->mutex) perf_ioctl() #4 ctx = perf_event_ctx_lock() _perf_iotcl() ftrace_profile_set_filter() #0 mutex_lock(&event_mutex) Fudge it for now by noting that the tracepoint state does not depend on the event <-> context relation. Ugly though :/ Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/events/core.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit 82d94856fa221b5173eefd56bcd1057c037e9b07 Author: Peter Zijlstra Date: Tue Jan 9 13:10:30 2018 +0100 perf/core: Fix lock inversion between perf,trace,cpuhp Lockdep gifted us with noticing the following 4-way lockup scenario: perf_trace_init() #0 mutex_lock(&event_mutex) perf_trace_event_init() perf_trace_event_reg() tp_event->class->reg() := tracepoint_probe_register #1 mutex_lock(&tracepoints_mutex) trace_point_add_func() #2 static_key_enable() #2 do_cpu_up() perf_event_init_cpu() #3 mutex_lock(&pmus_lock) #4 mutex_lock(&ctx->mutex) perf_event_task_disable() mutex_lock(¤t->perf_event_mutex) #4 ctx = perf_event_ctx_lock() #5 perf_event_for_each_child() do_exit() task_work_run() __fput() perf_release() perf_event_release_kernel() #4 mutex_lock(&ctx->mutex) #5 mutex_lock(&event->child_mutex) free_event() _free_event() event->destroy() := perf_trace_destroy #0 mutex_lock(&event_mutex); Fix that by moving the free_event() out from under the locks. 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: Steven Rostedt (VMware) Cc: Thomas Gleixner Cc: Vince Weaver Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/events/core.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 7e3f8e91e8d92a542ba30d7b07108882e82ad348 Merge: 0c5b9b5 17b11b7 Author: Dave Airlie Date: Thu Jan 25 12:28:15 2018 +1000 Merge tag 'drm-misc-fixes-2018-01-24' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Two vc4 fixes that were applied in the last day. One fixes a NULL dereference, and the other fixes a flickering bug. Cc: Eric Anholt Cc: Boris Brezillon * tag 'drm-misc-fixes-2018-01-24' of git://anongit.freedesktop.org/drm/drm-misc: drm/vc4: Fix NULL pointer dereference in vc4_save_hang_state() drm/vc4: Flush the caches before the bin jobs, as well. commit 5b7d27967dabfb17c21b0d98b29153b9e3ee71e5 Merge: f165495 624ca9c Author: Linus Torvalds Date: Wed Jan 24 17:24:30 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Avoid negative netdev refcount in error flow of xfrm state add, from Aviad Yehezkel. 2) Fix tcpdump decoding of IPSEC decap'd frames by filling in the ethernet header protocol field in xfrm{4,6}_mode_tunnel_input(). From Yossi Kuperman. 3) Fix a syzbot triggered skb_under_panic in pppoe having to do with failing to allocate an appropriate amount of headroom. From Guillaume Nault. 4) Fix memory leak in vmxnet3 driver, from Neil Horman. 5) Cure out-of-bounds packet memory access in em_nbyte EMATCH module, from Wolfgang Bumiller. 6) Restrict what kinds of sockets can be bound to the KCM multiplexer and also disallow when another layer has attached to the socket and made use of sk_user_data. From Tom Herbert. 7) Fix use before init of IOTLB in vhost code, from Jason Wang. 8) Correct STACR register write bit definition in IBM emac driver, from Ivan Mikhaylov. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: net/ibm/emac: wrong bit is used for STA control register write net/ibm/emac: add 8192 rx/tx fifo size vhost: do not try to access device IOTLB when not initialized vhost: use mutex_lock_nested() in vhost_dev_lock_vqs() i40e: flower: check if TC offload is enabled on a netdev qed: Free reserved MR tid qed: Remove reserveration of dpi for kernel kcm: Check if sk_user_data already set in kcm_attach kcm: Only allow TCP sockets to be attached to a KCM mux net: sched: fix TCF_LAYER_LINK case in tcf_get_base_ptr net: sched: em_nbyte: don't add the data offset twice mlxsw: spectrum_router: Don't log an error on missing neighbor vmxnet3: repair memory leak ipv6: Fix getsockopt() for sockets with default IPV6_AUTOFLOWLABEL pppoe: take ->needed_headroom of lower device into account on xmit xfrm: fix boolean assignment in xfrm_get_type_offload xfrm: Fix eth_hdr(skb)->h_proto to reflect inner IP version xfrm: fix error flow in case of add state fails xfrm: Add SA to hardware at the end of xfrm_state_construct() commit f16549530924abd60554358283ed20e0203494f9 Merge: 3eab2ad aebb48f Author: Linus Torvalds Date: Wed Jan 24 15:49:02 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc bugfix from David Miller: "Sparc Makefile typo fix" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: fix typo in CONFIG_CRYPTO_DES_SPARC64 => CONFIG_CRYPTO_CAMELLIA_SPARC64 commit 624ca9c33c8a853a4a589836e310d776620f4ab9 Author: Ivan Mikhaylov Date: Wed Jan 24 15:53:25 2018 +0300 net/ibm/emac: wrong bit is used for STA control register write STA control register has areas of mode and opcodes for opeations. 18 bit is using for mode selection, where 0 is old MIO/MDIO access method and 1 is indirect access mode. 19-20 bits are using for setting up read/write operation(STA opcodes). In current state 'read' is set into old MIO/MDIO mode with 19 bit and write operation is set into 18 bit which is mode selection, not a write operation. To correlate write with read we set it into 20 bit. All those bit operations are MSB 0 based. Signed-off-by: Ivan Mikhaylov Signed-off-by: David S. Miller drivers/net/ethernet/ibm/emac/emac.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45d6e545505fd32edb812f085be7de45b6a5c0af Author: Ivan Mikhaylov Date: Wed Jan 24 15:53:24 2018 +0300 net/ibm/emac: add 8192 rx/tx fifo size emac4syn chips has availability to use 8192 rx/tx fifo buffer sizes, in current state if we set it up in dts 8192 as example, we will get only 2048 which may impact on network speed. Signed-off-by: Ivan Mikhaylov Signed-off-by: David S. Miller drivers/net/ethernet/ibm/emac/core.c | 6 ++++++ drivers/net/ethernet/ibm/emac/emac.h | 2 ++ 2 files changed, 8 insertions(+) commit 060403f34008af90e310d7e0e7531ebb3acf9557 Author: Nick Dyer Date: Wed Jan 24 13:46:04 2018 -0800 Revert "Input: synaptics_rmi4 - use devm_device_add_group() for attributes in F01" Since the sysfs attribute hangs off the RMI bus, which doesn't go away during firmware flash, it needs to be explicitly removed, otherwise we would try and register the same attribute twice. This reverts commit 36a44af5c176d619552d99697433261141dd1296. Signed-off-by: Nick Dyer Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f01.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 6f3180afbb22106d96a1320e175562f36a4d3506 Author: Jason Wang Date: Tue Jan 23 17:27:26 2018 +0800 vhost: do not try to access device IOTLB when not initialized The code will try to access dev->iotlb when processing VHOST_IOTLB_INVALIDATE even if it was not initialized which may lead to NULL pointer dereference. Fixes this by check dev->iotlb before. Fixes: 6b1e6cc7855b0 ("vhost: new device IOTLB API") Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/vhost/vhost.c | 4 ++++ 1 file changed, 4 insertions(+) commit e9cb4239134c860e5f92c75bf5321bd377bb505b Author: Jason Wang Date: Tue Jan 23 17:27:25 2018 +0800 vhost: use mutex_lock_nested() in vhost_dev_lock_vqs() We used to call mutex_lock() in vhost_dev_lock_vqs() which tries to hold mutexes of all virtqueues. This may confuse lockdep to report a possible deadlock because of trying to hold locks belong to same class. Switch to use mutex_lock_nested() to avoid false positive. Fixes: 6b1e6cc7855b0 ("vhost: new device IOTLB API") Reported-by: syzbot+dbb7c1161485e61b0241@syzkaller.appspotmail.com Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7051cb8dadd69f85da5989017af2bb35b418950 Author: Jakub Kicinski Date: Tue Jan 23 00:08:40 2018 -0800 i40e: flower: check if TC offload is enabled on a netdev Since TC block changes drivers are required to check if the TC hw offload flag is set on the interface themselves. Fixes: 2f4b411a3d67 ("i40e: Enable cloud filters via tc-flower") Fixes: 44ae12a768b7 ("net: sched: move the can_offload check from binding phase to rule insertion phase") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Jiri Pirko Acked-by: Amritha Nambiar Acked-by: Jeff Kirsher Signed-off-by: David S. Miller drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++ 1 file changed, 2 insertions(+) commit aebb48f5e465772576359c1705c4a84abea92027 Author: Corentin Labbe Date: Tue Jan 23 14:33:14 2018 +0000 sparc64: fix typo in CONFIG_CRYPTO_DES_SPARC64 => CONFIG_CRYPTO_CAMELLIA_SPARC64 This patch fixes the typo CONFIG_CRYPTO_DES_SPARC64 => CONFIG_CRYPTO_CAMELLIA_SPARC64 Fixes: 81658ad0d923 ("sparc64: Add CAMELLIA driver making use of the new camellia opcodes.") Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/sparc/crypto/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee45bea4a98bdb61100ca5fe8e1f0490b326a750 Merge: 88d1d76 1fe280a Author: David S. Miller Date: Wed Jan 24 16:44:21 2018 -0500 Merge branch 'qed-rdma-bug-fixes' Michal Kalderon says: ==================== qed: rdma bug fixes This patch contains two small bug fixes related to RDMA. Both related to resource reservations. ==================== Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 1fe280a056dff50774bd59c3e61187cf8c0ccf10 Author: Michal Kalderon Date: Tue Jan 23 11:33:47 2018 +0200 qed: Free reserved MR tid A tid was allocated for reserved MR during initialization but not freed. This lead to an annoying output message during rdma unload flow. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_rdma.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit 4de49474b18936d62797d1dd451c6c4db1a7b119 Author: Michal Kalderon Date: Tue Jan 23 11:33:46 2018 +0200 qed: Remove reserveration of dpi for kernel Double reservation for kernel dedicated dpi was performed. Once in the core module and once in qedr. Remove the reservation from core. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_rdma.c | 3 --- 1 file changed, 3 deletions(-) commit 88d1d76dca25b135657eda6b93eb1bdbde519d0f Merge: d3303a6 e557124 Author: David S. Miller Date: Wed Jan 24 15:54:31 2018 -0500 Merge branch 'kcm-fix-two-syzcaller-issues' Tom Herbert says: ==================== kcm: fix two syzcaller issues In this patch set: - Don't allow attaching non-TCP or listener sockets to a KCM mux. - In kcm_attach Check if sk_user_data is already set. This is under lock to avoid race conditions. More work is need to make all of the users of sk_user_data to use the same locking. - v2 Remove unncessary check for not PF_KCM in kcm_attach (suggested by Guillaume Nault) ==================== Signed-off-by: David S. Miller commit e5571240236c5652f3e079b1d5866716a7ad819c Author: Tom Herbert Date: Wed Jan 24 12:35:41 2018 -0800 kcm: Check if sk_user_data already set in kcm_attach This is needed to prevent sk_user_data being overwritten. The check is done under the callback lock. This should prevent a socket from being attached twice to a KCM mux. It also prevents a socket from being attached for other use cases of sk_user_data as long as the other cases set sk_user_data under the lock. Followup work is needed to unify all the use cases of sk_user_data to use the same locking. Reported-by: syzbot+114b15f2be420a8886c3@syzkaller.appspotmail.com Fixes: ab7ac4eb9832 ("kcm: Kernel Connection Multiplexor module") Signed-off-by: Tom Herbert Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/kcm/kcmsock.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 581e7226a5d43f629eb6399a121f85f6a15f81be Author: Tom Herbert Date: Wed Jan 24 12:35:40 2018 -0800 kcm: Only allow TCP sockets to be attached to a KCM mux TCP sockets for IPv4 and IPv6 that are not listeners or in closed stated are allowed to be attached to a KCM mux. Fixes: ab7ac4eb9832 ("kcm: Kernel Connection Multiplexor module") Reported-by: syzbot+8865eaff7f9acd593945@syzkaller.appspotmail.com Signed-off-by: Tom Herbert Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/kcm/kcmsock.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 3eab2ad9162e7467c988b91f50395eac51a1e650 Author: James Morris Date: Thu Jan 25 07:53:57 2018 +1100 MAINTAINERS: update email address for James Morris Update my email address. Signed-off-by: James Morris MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3303a65a00c94372ddab831570647488e6c06e2 Author: Wolfgang Bumiller Date: Thu Jan 18 11:32:36 2018 +0100 net: sched: fix TCF_LAYER_LINK case in tcf_get_base_ptr TCF_LAYER_LINK and TCF_LAYER_NETWORK returned the same pointer as skb->data points to the network header. Use skb_mac_header instead. Signed-off-by: Wolfgang Bumiller Signed-off-by: David S. Miller include/net/pkt_cls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 560a66075d694e6ec24c60967b4d93d97cbb33d1 Author: Wolfgang Bumiller Date: Thu Jan 18 11:32:35 2018 +0100 net: sched: em_nbyte: don't add the data offset twice 'ptr' is shifted by the offset and then validated, the memcmp should not add it a second time. Signed-off-by: Wolfgang Bumiller Signed-off-by: David S. Miller net/sched/em_nbyte.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4fd493c0541d36953f7b9d3bfced67a1321792f Author: Josef Bacik Date: Tue Jan 23 15:17:05 2018 -0500 Btrfs: fix stale entries in readdir In fixing the readdir+pagefault deadlock I accidentally introduced a stale entry regression in readdir. If we get close to full for the temporary buffer, and then skip a few delayed deletions, and then try to add another entry that won't fit, we will emit the entries we found and retry. Unfortunately we delete entries from our del_list as we find them, assuming we won't need them. However our pos will be with whatever our last entry was, which could be before the delayed deletions we skipped, so the next search will add the deleted entries back into our readdir buffer. So instead don't delete entries we find in our del_list so we can make sure we always find our delayed deletions. This is a slight perf hit for readdir with lots of pending deletions, but hopefully this isn't a common occurrence. If it is we can revist this and optimize it. cc: stable@vger.kernel.org Fixes: 23b5ec74943f ("btrfs: fix readdir deadlock with pagefault") Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) commit 03fae44b41062419aedcf2ae4ad68034f440f862 Merge: ce30f26 2ee5b92 Author: Linus Torvalds Date: Wed Jan 24 10:08:16 2018 -0800 Merge tag 'trace-v4.15-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "With the new ORC unwinder, ftrace stack tracing became disfunctional. One was that ORC didn't know how to handle the ftrace callbacks in general (which Josh fixed). The other was that ORC would just bail if it hit a dynamically allocated trampoline. Which means all ftrace stack tracing that happens from the function tracer would produce no results (that includes killing the max stack size tracer). I added a check to the ORC unwinder to see if the trampoline belonged to ftrace, and if it did, use the orc entry of the static trampoline that was used to create the dynamic one (it would be identical). Finally, I noticed that the skip values of the stack tracing were out of whack. I went through and fixed them up" * tag 'trace-v4.15-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Update stack trace skipping for ORC unwinder ftrace, orc, x86: Handle ftrace dynamically allocated trampolines x86/ftrace: Fix ORC unwinding from ftrace handlers commit ce30f264b33d9e3d27e34638976c52b578648b92 Author: Willy Tarreau Date: Thu Jan 4 14:31:25 2018 +0100 MAINTAINERS: clarify that only verified bugs should be submitted to security@ We're seeing a raise of automated reports from testing tools and reports about address leaks that are not really exploitable as-is, many of which do not represent an immediate risk justifying to work in closed places. Signed-off-by: Willy Tarreau Acked-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds MAINTAINERS | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 5132ede0fe8092b043dae09a7cc32b8ae7272baa Author: Greg Kroah-Hartman Date: Wed Jan 24 15:28:17 2018 +0100 Revert "module: Add retpoline tag to VERMAGIC" This reverts commit 6cfb521ac0d5b97470883ff9b7facae264b7ab12. Turns out distros do not want to make retpoline as part of their "ABI", so this patch should not have been merged. Sorry Andi, this was my fault, I suggested it when your original patch was the "correct" way of doing this instead. Reported-by: Jiri Kosina Fixes: 6cfb521ac0d5 ("module: Add retpoline tag to VERMAGIC") Acked-by: Andi Kleen Cc: Thomas Gleixner Cc: David Woodhouse Cc: rusty@rustcorp.com.au Cc: arjan.van.de.ven@intel.com Cc: jeyu@kernel.org Cc: stable Signed-off-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds include/linux/vermagic.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 1ecdaea02ca6bfacf2ecda500dc1af51e9780c42 Author: Yuval Mintz Date: Wed Jan 24 10:02:09 2018 +0100 mlxsw: spectrum_router: Don't log an error on missing neighbor Driver periodically samples all neighbors configured in device in order to update the kernel regarding their state. When finding an entry configured in HW that doesn't show in neigh_lookup() driver logs an error message. This introduces a race when removing multiple neighbors - it's possible that a given entry would still be configured in HW as its removal is still being processed but is already removed from the kernel's neighbor tables. Simply remove the error message and gracefully accept such events. Fixes: c723c735fa6b ("mlxsw: spectrum_router: Periodically update the kernel's neigh table") Fixes: 60f040ca11b9 ("mlxsw: spectrum_router: Periodically dump active IPv6 neighbours") Signed-off-by: Yuval Mintz Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 97edf7c526c117f95ab9ea311f6ac4a46a1f7459 Merge: 848b159 545d8ae Author: David S. Miller Date: Wed Jan 24 10:32:29 2018 -0500 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2018-01-24 1) Only offloads SAs after they are fully initialized. Otherwise a NIC may receive packets on a SA we can not yet handle in the stack. From Yossi Kuperman. 2) Fix negative refcount in case of a failing offload. From Aviad Yehezkel. 3) Fix inner IP ptoro version when decapsulating from interaddress family tunnels. From Yossi Kuperman. 4) Use true or false for boolean variables instead of an integer value in xfrm_get_type_offload. From Gustavo A. R. Silva. ==================== Signed-off-by: David S. Miller commit bda646dd182a90ba4239fc62b71eb8b73126fa77 Merge: 0c5b9b5 1de1ea7 Author: Radim Krčmář Date: Wed Jan 24 16:25:53 2018 +0100 Merge tag 'kvm-s390-master-4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux KVM: s390: another fix for cmma migration This fixes races and potential use after free in the cmma migration code. commit 1de1ea7efeb9e8543212210e34518b4049ccd285 Author: Christian Borntraeger Date: Fri Dec 22 10:54:20 2017 +0100 KVM: s390: add proper locking for CMMA migration bitmap Some parts of the cmma migration bitmap is already protected with the kvm->lock (e.g. the migration start). On the other hand the read of the cmma bits is not protected against a concurrent free, neither is the emulation of the ESSA instruction. Let's extend the locking to all related ioctls by using the slots lock for - kvm_s390_vm_start_migration - kvm_s390_vm_stop_migration - kvm_s390_set_cmma_bits - kvm_s390_get_cmma_bits In addition to that, we use synchronize_srcu before freeing the migration structure as all users hold kvm->srcu for read. (e.g. the ESSA handler). Reported-by: David Hildenbrand Signed-off-by: Christian Borntraeger Cc: stable@vger.kernel.org # 4.13+ Fixes: 190df4a212a7 (KVM: s390: CMMA tracking, ESSA emulation, migration mode) Reviewed-by: Claudio Imbrenda Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck arch/s390/kvm/kvm-s390.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 1d080f096fe33f031d26e19b3ef0146f66b8b0f1 Author: Borislav Petkov Date: Tue Jan 23 11:41:33 2018 +0100 x86/microcode: Fix again accessing initrd after having been freed Commit 24c2503255d3 ("x86/microcode: Do not access the initrd after it has been freed") fixed attempts to access initrd from the microcode loader after it has been freed. However, a similar KASAN warning was reported (stack trace edited): smpboot: Booting Node 0 Processor 1 APIC 0x11 ================================================================== BUG: KASAN: use-after-free in find_cpio_data+0x9b5/0xa50 Read of size 1 at addr ffff880035ffd000 by task swapper/1/0 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.14.8-slack #7 Hardware name: System manufacturer System Product Name/A88X-PLUS, BIOS 3003 03/10/2016 Call Trace: dump_stack print_address_description kasan_report ? find_cpio_data __asan_report_load1_noabort find_cpio_data find_microcode_in_initrd __load_ucode_amd load_ucode_amd_ap load_ucode_ap After some investigation, it turned out that a merge was done using the wrong side to resolve, leading to picking up the previous state, before the 24c2503255d3 fix. Therefore the Fixes tag below contains a merge commit. Revert the mismerge by catching the save_microcode_in_initrd_amd() retval and thus letting the function exit with the last return statement so that initrd_gone can be set to true. Fixes: f26483eaedec ("Merge branch 'x86/urgent' into x86/microcode, to resolve conflicts") Reported-by: Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=198295 Link: https://lkml.kernel.org/r/20180123104133.918-2-bp@alien8.de arch/x86/kernel/cpu/microcode/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e702d17ed138cf4ae7c00e8c00681ed464587c7 Author: Jia Zhang Date: Tue Jan 23 11:41:32 2018 +0100 x86/microcode/intel: Extend BDW late-loading further with LLC size check Commit b94b73733171 ("x86/microcode/intel: Extend BDW late-loading with a revision check") reduced the impact of erratum BDF90 for Broadwell model 79. The impact can be reduced further by checking the size of the last level cache portion per core. Tony: "The erratum says the problem only occurs on the large-cache SKUs. So we only need to avoid the update if we are on a big cache SKU that is also running old microcode." For more details, see erratum BDF90 in document #334165 (Intel Xeon Processor E7-8800/4800 v4 Product Family Specification Update) from September 2017. Fixes: b94b73733171 ("x86/microcode/intel: Extend BDW late-loading with a revision check") Signed-off-by: Jia Zhang Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Acked-by: Tony Luck Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1516321542-31161-1-git-send-email-zhang.jia@linux.alibaba.com arch/x86/kernel/cpu/microcode/intel.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 40d4071ce2d20840d224b4a77b5dc6f752c9ab15 Author: Xiao Liang Date: Mon Jan 22 14:12:52 2018 +0800 perf/x86/amd/power: Do not load AMD power module on !AMD platforms The AMD power module can be loaded on non AMD platforms, but unload fails with the following Oops: BUG: unable to handle kernel NULL pointer dereference at (null) IP: __list_del_entry_valid+0x29/0x90 Call Trace: perf_pmu_unregister+0x25/0xf0 amd_power_pmu_exit+0x1c/0xd23 [power] SyS_delete_module+0x1a8/0x2b0 ? exit_to_usermode_loop+0x8f/0xb0 entry_SYSCALL_64_fastpath+0x20/0x83 Return -ENODEV instead of 0 from the module init function if the CPU does not match. Fixes: c7ab62bfbe0e ("perf/x86/amd/power: Add AMD accumulated power reporting mechanism") Signed-off-by: Xiao Liang Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180122061252.6394-1-xiliang@redhat.com arch/x86/events/amd/power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1df37383a8aeabb9b418698f0bcdffea01f4b1b2 Author: Waiman Long Date: Mon Jan 22 17:09:34 2018 -0500 x86/retpoline: Remove the esp/rsp thunk It doesn't make sense to have an indirect call thunk with esp/rsp as retpoline code won't work correctly with the stack pointer register. Removing it will help compiler writers to catch error in case such a thunk call is emitted incorrectly. Fixes: 76b043848fd2 ("x86/retpoline: Add initial retpoline support") Suggested-by: Jeff Law Signed-off-by: Waiman Long Signed-off-by: Thomas Gleixner Acked-by: David Woodhouse Cc: Tom Lendacky Cc: Kees Cook Cc: Andi Kleen Cc: Tim Chen Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Josh Poimboeuf Cc: Arjan van de Ven Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/1516658974-27852-1-git-send-email-longman@redhat.com arch/x86/include/asm/asm-prototypes.h | 1 - arch/x86/lib/retpoline.S | 1 - 2 files changed, 2 deletions(-) commit ce48c146495a1a50e48cdbfbfaba3e708be7c07c Author: Peter Zijlstra Date: Mon Jan 22 22:53:28 2018 +0100 sched/core: Fix cpu.max vs. cpuhotplug deadlock Tejun reported the following cpu-hotplug lock (percpu-rwsem) read recursion: tg_set_cfs_bandwidth() get_online_cpus() cpus_read_lock() cfs_bandwidth_usage_inc() static_key_slow_inc() cpus_read_lock() Reported-by: Tejun Heo Tested-by: Tejun Heo Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180122215328.GP3397@worktop Signed-off-by: Ingo Molnar include/linux/jump_label.h | 7 +++++++ kernel/jump_label.c | 12 +++++++++--- kernel/sched/fair.c | 4 ++-- 3 files changed, 18 insertions(+), 5 deletions(-) commit 88f1c87de11a86d839f4ce5313e552d96709b990 Author: Tejun Heo Date: Mon Jan 22 14:00:55 2018 -0800 locking/lockdep: Avoid triggering hardlockup from debug_show_all_locks() debug_show_all_locks() iterates all tasks and print held locks whole holding tasklist_lock. This can take a while on a slow console device and may end up triggering NMI hardlockup detector if someone else ends up waiting for tasklist_lock. Touch the NMI watchdog while printing the held locks to avoid spuriously triggering the hardlockup detector. Signed-off-by: Tejun Heo Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-team@fb.com Link: http://lkml.kernel.org/r/20180122220055.GB1771050@devbig577.frc2.facebook.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 2 ++ 1 file changed, 2 insertions(+) commit a97cb0e7b3f4c6297fd857055ae8e895f402f501 Author: Peter Zijlstra Date: Mon Jan 22 11:39:47 2018 +0100 futex: Fix OWNER_DEAD fixup Both Geert and DaveJ reported that the recent futex commit: c1e2f0eaf015 ("futex: Avoid violating the 10th rule of futex") introduced a problem with setting OWNER_DEAD. We set the bit on an uninitialized variable and then entirely optimize it away as a dead-store. Move the setting of the bit to where it is more useful. Reported-by: Geert Uytterhoeven Reported-by: Dave Jones Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: c1e2f0eaf015 ("futex: Avoid violating the 10th rule of futex") Link: http://lkml.kernel.org/r/20180122103947.GD2228@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/futex.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 848b159835ddef99cc4193083f7e786c3992f580 Author: Neil Horman Date: Mon Jan 22 16:06:37 2018 -0500 vmxnet3: repair memory leak with the introduction of commit b0eb57cb97e7837ebb746404c2c58c6f536f23fa, it appears that rq->buf_info is improperly handled. While it is heap allocated when an rx queue is setup, and freed when torn down, an old line of code in vmxnet3_rq_destroy was not properly removed, leading to rq->buf_info[0] being set to NULL prior to its being freed, causing a memory leak, which eventually exhausts the system on repeated create/destroy operations (for example, when the mtu of a vmxnet3 interface is changed frequently. Fix is pretty straight forward, just move the NULL set to after the free. Tested by myself with successful results Applies to net, and should likely be queued for stable, please Signed-off-by: Neil Horman Reported-By: boyang@redhat.com CC: boyang@redhat.com CC: Shrikrishna Khare CC: "VMware, Inc." CC: David S. Miller Acked-by: Shrikrishna Khare Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9191ffb65d8e159680ce0ad2224e1acbde6985c Author: Ben Hutchings Date: Mon Jan 22 20:06:42 2018 +0000 ipv6: Fix getsockopt() for sockets with default IPV6_AUTOFLOWLABEL Commit 513674b5a2c9 ("net: reevalulate autoflowlabel setting after sysctl setting") removed the initialisation of ipv6_pinfo::autoflowlabel and added a second flag to indicate whether this field or the net namespace default should be used. The getsockopt() handling for this case was not updated, so it currently returns 0 for all sockets for which IPV6_AUTOFLOWLABEL is not explicitly enabled. Fix it to return the effective value, whether that has been set at the socket or net namespace level. Fixes: 513674b5a2c9 ("net: reevalulate autoflowlabel setting after sysctl ...") Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller include/net/ipv6.h | 1 + net/ipv6/ip6_output.c | 2 +- net/ipv6/ipv6_sockglue.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) commit 02612bb05e51df8489db5e94d0cf8d1c81f87b0c Author: Guillaume Nault Date: Mon Jan 22 18:06:37 2018 +0100 pppoe: take ->needed_headroom of lower device into account on xmit In pppoe_sendmsg(), reserving dev->hard_header_len bytes of headroom was probably fine before the introduction of ->needed_headroom in commit f5184d267c1a ("net: Allow netdevices to specify needed head/tailroom"). But now, virtual devices typically advertise the size of their overhead in dev->needed_headroom, so we must also take it into account in skb_reserve(). Allocation size of skb is also updated to take dev->needed_tailroom into account and replace the arbitrary 32 bytes with the real size of a PPPoE header. This issue was discovered by syzbot, who connected a pppoe socket to a gre device which had dev->header_ops->create == ipgre_header and dev->hard_header_len == 0. Therefore, PPPoE didn't reserve any headroom, and dev_hard_header() crashed when ipgre_header() tried to prepend its header to skb->data. skbuff: skb_under_panic: text:000000001d390b3a len:31 put:24 head:00000000d8ed776f data:000000008150e823 tail:0x7 end:0xc0 dev:gre0 ------------[ cut here ]------------ kernel BUG at net/core/skbuff.c:104! invalid opcode: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 3670 Comm: syzkaller801466 Not tainted 4.15.0-rc7-next-20180115+ #97 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:skb_panic+0x162/0x1f0 net/core/skbuff.c:100 RSP: 0018:ffff8801d9bd7840 EFLAGS: 00010282 RAX: 0000000000000083 RBX: ffff8801d4f083c0 RCX: 0000000000000000 RDX: 0000000000000083 RSI: 1ffff1003b37ae92 RDI: ffffed003b37aefc RBP: ffff8801d9bd78a8 R08: 1ffff1003b37ae8a R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: ffffffff86200de0 R13: ffffffff84a981ad R14: 0000000000000018 R15: ffff8801d2d34180 FS: 00000000019c4880(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000208bc000 CR3: 00000001d9111001 CR4: 00000000001606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: skb_under_panic net/core/skbuff.c:114 [inline] skb_push+0xce/0xf0 net/core/skbuff.c:1714 ipgre_header+0x6d/0x4e0 net/ipv4/ip_gre.c:879 dev_hard_header include/linux/netdevice.h:2723 [inline] pppoe_sendmsg+0x58e/0x8b0 drivers/net/ppp/pppoe.c:890 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 sock_write_iter+0x31a/0x5d0 net/socket.c:909 call_write_iter include/linux/fs.h:1775 [inline] do_iter_readv_writev+0x525/0x7f0 fs/read_write.c:653 do_iter_write+0x154/0x540 fs/read_write.c:932 vfs_writev+0x18a/0x340 fs/read_write.c:977 do_writev+0xfc/0x2a0 fs/read_write.c:1012 SYSC_writev fs/read_write.c:1085 [inline] SyS_writev+0x27/0x30 fs/read_write.c:1082 entry_SYSCALL_64_fastpath+0x29/0xa0 Admittedly PPPoE shouldn't be allowed to run on non Ethernet-like interfaces, but reserving space for ->needed_headroom is a more fundamental issue that needs to be addressed first. Same problem exists for __pppoe_xmit(), which also needs to take dev->needed_headroom into account in skb_cow_head(). Fixes: f5184d267c1a ("net: Allow netdevices to specify needed head/tailroom") Reported-by: syzbot+ed0838d0fa4c4f2b528e20286e6dc63effc7c14d@syzkaller.appspotmail.com Signed-off-by: Guillaume Nault Reviewed-by: Xin Long Signed-off-by: David S. Miller drivers/net/ppp/pppoe.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 2ee5b92a2598d9e403337185fdf88f661dee8616 Author: Steven Rostedt (VMware) Date: Tue Jan 23 13:25:04 2018 -0500 tracing: Update stack trace skipping for ORC unwinder With the addition of ORC unwinder and FRAME POINTER unwinder, the stack trace skipping requirements have changed. I went through the tracing stack trace dumps with ORC and with frame pointers and recalculated the proper values. Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 34 ++++++++++++++----------- kernel/trace/trace_events_trigger.c | 13 ++++++++-- kernel/trace/trace_functions.c | 49 +++++++++++++++++++++++++++---------- 3 files changed, 67 insertions(+), 29 deletions(-) commit 6be7fa3c74d1e0cd50f2157b5c1524f152bf641e Author: Steven Rostedt (VMware) Date: Mon Jan 22 22:32:51 2018 -0500 ftrace, orc, x86: Handle ftrace dynamically allocated trampolines The function tracer can create a dynamically allocated trampoline that is called by the function mcount or fentry hook that is used to call the function callback that is registered. The problem is that the orc undwinder will bail if it encounters one of these trampolines. This breaks the stack trace of function callbacks, which include the stack tracer and setting the stack trace for individual functions. Since these dynamic trampolines are basically copies of the static ftrace trampolines defined in ftrace_*.S, we do not need to create new orc entries for the dynamic trampolines. Finding the return address on the stack will be identical as the functions that were copied to create the dynamic trampolines. When encountering a ftrace dynamic trampoline, we can just use the orc entry of the ftrace static function that was copied for that trampoline. Signed-off-by: Steven Rostedt (VMware) arch/x86/kernel/unwind_orc.c | 48 +++++++++++++++++++++++++++++++++++++++++++- include/linux/ftrace.h | 2 ++ kernel/trace/ftrace.c | 29 +++++++++++++++----------- 3 files changed, 66 insertions(+), 13 deletions(-) commit 1f07476ec143bbed7bf0b641749783b1094b4c4f Merge: a84a8ab 838cda3 Author: Linus Torvalds Date: Tue Jan 23 12:45:40 2018 -0800 Merge tag 'pci-v4.15-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Fix AMD regression due to not re-enabling the big window on resume (Christian König)" * tag 'pci-v4.15-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: x86/PCI: Enable AMD 64-bit window on resume commit e2ac83d74a4d753cea88407e65136c84a0cb60b2 Author: Josh Poimboeuf Date: Mon Jan 22 22:07:46 2018 -0600 x86/ftrace: Fix ORC unwinding from ftrace handlers Steven Rostedt discovered that the ftrace stack tracer is broken when it's used with the ORC unwinder. The problem is that objtool is instructed by the Makefile to ignore the ftrace_64.S code, so it doesn't generate any ORC data for it. Fix it by making the asm code objtool-friendly: - Objtool doesn't like the fact that save_mcount_regs pushes RBP at the beginning, but it's never restored (directly, at least). So just skip the original RBP push, which is only needed for frame pointers anyway. - Annotate some functions as normal callable functions with ENTRY/ENDPROC. - Add an empty unwind hint to return_to_handler(). The return address isn't on the stack, so there's nothing ORC can do there. It will just punt in the unlikely case it tries to unwind from that code. With all that fixed, remove the OBJECT_FILES_NON_STANDARD Makefile annotation so objtool can read the file. Link: http://lkml.kernel.org/r/20180123040746.ih4ep3tk4pbjvg7c@treble Reported-by: Steven Rostedt Signed-off-by: Josh Poimboeuf Signed-off-by: Steven Rostedt (VMware) arch/x86/kernel/Makefile | 5 ++++- arch/x86/kernel/ftrace_64.S | 24 +++++++++++++++--------- 2 files changed, 19 insertions(+), 10 deletions(-) commit a84a8ab94ed5cb65a1355fe9e8d1d55283375808 Merge: 1995266 7a8c4dd Author: Linus Torvalds Date: Tue Jan 23 08:52:55 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix divide by zero in mlx5, from Talut Batheesh. 2) Guard against invalid GSO packets coming from untrusted guests and arriving in qdisc_pkt_len_init(), from Eric Dumazet. 3) Similarly add such protection to the various protocol GSO handlers. From Willem de Bruijn. 4) Fix regression added to IGMP source address checking for IGMPv3 reports, from Felix Feitkau. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: tls: Correct length of scatterlist in tls_sw_sendpage be2net: restore properly promisc mode after queues reconfiguration net: igmp: fix source address check for IGMPv3 reports gso: validate gso_type in GSO handlers net: qdisc_pkt_len_init() should be more robust ibmvnic: Allocate and request vpd in init_resources ibmvnic: Revert to previous mtu when unsupported value requested ibmvnic: Modify buffer size and number of queues on failover rds: tcp: compute m_ack_seq as offset from ->write_seq usbnet: silence an unnecessary warning cxgb4: fix endianness for vlan value in cxgb4_tc_flower cxgb4: set filter type to 1 for ETH_P_IPV6 net/mlx5e: Fix fixpoint divide exception in mlx5e_am_stats_compare commit 545d8ae7affff7fb4f8bfd327c7c7790056535c4 Author: Gustavo A. R. Silva Date: Mon Jan 22 16:34:09 2018 -0600 xfrm: fix boolean assignment in xfrm_get_type_offload Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Fixes: ffdb5211da1c ("xfrm: Auto-load xfrm offload modules") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5efec5c655dd31944af440ff2b0a93facc4a7762 Author: Yossi Kuperman Date: Tue Jan 23 00:16:21 2018 +0200 xfrm: Fix eth_hdr(skb)->h_proto to reflect inner IP version IPSec tunnel mode supports encapsulation of IPv4 over IPv6 and vice-versa. The outer IP header is stripped and the inner IP inherits the original Ethernet header. Tcpdump fails to properly decode the inner packet in case that h_proto is different than the inner IP version. Fix h_proto to reflect the inner IP version. Signed-off-by: Yossi Kuperman Signed-off-by: Steffen Klassert net/ipv4/xfrm4_mode_tunnel.c | 1 + net/ipv6/xfrm6_mode_tunnel.c | 1 + 2 files changed, 2 insertions(+) commit 1995266727fa8143897e89b55f5d3c79aa828420 Author: Ben Hutchings Date: Mon Jan 22 20:11:06 2018 +0000 nfsd: auth: Fix gid sorting when rootsquash enabled Commit bdcf0a423ea1 ("kernel: make groups_sort calling a responsibility group_info allocators") appears to break nfsd rootsquash in a pretty major way. It adds a call to groups_sort() inside the loop that copies/squashes gids, which means the valid gids are sorted along with the following garbage. The net result is that the highest numbered valid gids are replaced with any lower-valued garbage gids, possibly including 0. We should sort only once, after filling in all the gids. Fixes: bdcf0a423ea1 ("kernel: make groups_sort calling a responsibility ...") Signed-off-by: Ben Hutchings Acked-by: J. Bruce Fields Signed-off-by: Linus Torvalds fs/nfsd/auth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2a924d71794c530e55e73d0ce2cc77233307eaa9 Author: Dmitry Torokhov Date: Fri Jan 5 13:28:47 2018 -0800 Input: trackpoint - only expose supported controls for Elan, ALPS and NXP The newer trackpoints from ALPS, Elan and NXP implement a very limited subset of extended commands and controls that the original trackpoints implemented, so we should not be exposing not working controls in sysfs. The newer trackpoints also do not implement "Power On Reset" or "Read Extended Button Status", so we should not be using these commands during initialization. While we are at it, let's change "unsigned char" to u8 for byte data or bool for booleans and use better suited error codes instead of -1. Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/trackpoint.c | 248 ++++++++++++++++++++++++--------------- drivers/input/mouse/trackpoint.h | 34 ++++-- 2 files changed, 172 insertions(+), 110 deletions(-) commit f5d07b9e98022d50720e38aa936fc11c67868ece Author: Aaron Ma Date: Fri Jan 19 09:43:39 2018 -0800 Input: trackpoint - force 3 buttons if 0 button is reported Lenovo introduced trackpoint compatible sticks with minimum PS/2 commands. They supposed to reply with 0x02, 0x03, or 0x04 in response to the "Read Extended ID" command, so we would know not to try certain extended commands. Unfortunately even some trackpoints reporting the original IBM version (0x01 firmware 0x0e) now respond with incorrect data to the "Get Extended Buttons" command: thinkpad_acpi: ThinkPad BIOS R0DET87W (1.87 ), EC unknown thinkpad_acpi: Lenovo ThinkPad E470, model 20H1004SGE psmouse serio2: trackpoint: IBM TrackPoint firmware: 0x0e, buttons: 0/0 Since there are no trackpoints without buttons, let's assume the trackpoint has 3 buttons when we get 0 response to the extended buttons query. Signed-off-by: Aaron Ma Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=196253 Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/trackpoint.c | 3 +++ 1 file changed, 3 insertions(+) commit a0ec1ded22e6a6bc41981fae22406835b006a66e Author: Martin Brandenburg Date: Mon Jan 22 15:44:52 2018 -0500 orangefs: initialize op on loop restart in orangefs_devreq_read In orangefs_devreq_read, there is a loop which picks an op off the list of pending ops. If the loop fails to find an op, there is nothing to read, and it returns EAGAIN. If the op has been given up on, the loop is restarted via a goto. The bug is that the variable which the found op is written to is not reinitialized, so if there are no more eligible ops on the list, the code runs again on the already handled op. This is triggered by interrupting a process while the op is being copied to the client-core. It's a fairly small window, but it's there. Signed-off-by: Martin Brandenburg Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds fs/orangefs/devorangefs-req.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0afc0decf247f65b7aba666a76a0a68adf4bc435 Author: Martin Brandenburg Date: Mon Jan 22 15:44:51 2018 -0500 orangefs: use list_for_each_entry_safe in purge_waiting_ops set_op_state_purged can delete the op. Signed-off-by: Martin Brandenburg Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds fs/orangefs/waitqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a8c4dd9be91a7e8f8f0e0419a560663adc694a3 Author: Dave Watson Date: Fri Jan 19 12:30:13 2018 -0800 tls: Correct length of scatterlist in tls_sw_sendpage The scatterlist is reused by both sendmsg and sendfile. If a sendmsg of smaller number of pages is followed by a sendfile of larger number of pages, the scatterlist may be too short, resulting in a crash in gcm_encrypt. Add sg_unmark_end to make the list the correct length. tls_sw_sendmsg already calls sg_unmark_end correctly when it allocates memory in alloc_sg, or in zerocopy_from_iter. Signed-off-by: Dave Watson Signed-off-by: David S. Miller net/tls/tls_sw.c | 2 ++ 1 file changed, 2 insertions(+) commit 52acf06451930eb4cefabd5ecea56e2d46c32f76 Author: Ivan Vecera Date: Fri Jan 19 20:23:50 2018 +0100 be2net: restore properly promisc mode after queues reconfiguration The commit 622190669403 ("be2net: Request RSS capability of Rx interface depending on number of Rx rings") modified be_update_queues() so the IFACE (HW representation of the netdevice) is destroyed and then re-created. This causes a regression because potential promiscuous mode is not restored properly during be_open() because the driver thinks that the HW has promiscuous mode already enabled. Note that Lancer is not affected by this bug because RX-filter flags are disabled during be_close() for this chipset. Cc: Sathya Perla Cc: Ajit Khaparde Cc: Sriharsha Basavapatna Cc: Somnath Kotur Fixes: 622190669403 ("be2net: Request RSS capability of Rx interface depending on number of Rx rings") Signed-off-by: Ivan Vecera Signed-off-by: David S. Miller drivers/net/ethernet/emulex/benet/be_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit ad23b750933ea7bf962678972a286c78a8fa36aa Author: Felix Fietkau Date: Fri Jan 19 11:50:46 2018 +0100 net: igmp: fix source address check for IGMPv3 reports Commit "net: igmp: Use correct source address on IGMPv3 reports" introduced a check to validate the source address of locally generated IGMPv3 packets. Instead of checking the local interface address directly, it uses inet_ifa_match(fl4->saddr, ifa), which checks if the address is on the local subnet (or equal to the point-to-point address if used). This breaks for point-to-point interfaces, so check against ifa->ifa_local directly. Cc: Kevin Cernekee Fixes: a46182b00290 ("net: igmp: Use correct source address on IGMPv3 reports") Reported-by: Sebastian Gottschall Signed-off-by: Felix Fietkau Signed-off-by: David S. Miller net/ipv4/igmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 121d57af308d0cf943f08f4738d24d3966c38cd9 Author: Willem de Bruijn Date: Fri Jan 19 09:29:18 2018 -0500 gso: validate gso_type in GSO handlers Validate gso_type during segmentation as SKB_GSO_DODGY sources may pass packets where the gso_type does not match the contents. Syzkaller was able to enter the SCTP gso handler with a packet of gso_type SKB_GSO_TCPV4. On entry of transport layer gso handlers, verify that the gso_type matches the transport protocol. Fixes: 90017accff61 ("sctp: Add GSO support") Link: http://lkml.kernel.org/r/<001a1137452496ffc305617e5fe0@google.com> Reported-by: syzbot+fee64147a25aecd48055@syzkaller.appspotmail.com Signed-off-by: Willem de Bruijn Acked-by: Jason Wang Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/ipv4/esp4_offload.c | 3 +++ net/ipv4/tcp_offload.c | 3 +++ net/ipv4/udp_offload.c | 3 +++ net/ipv6/esp6_offload.c | 3 +++ net/ipv6/tcpv6_offload.c | 3 +++ net/ipv6/udp_offload.c | 3 +++ net/sctp/offload.c | 3 +++ 7 files changed, 21 insertions(+) commit 7c68d1a6b4db9012790af7ac0f0fdc0d2083422a Author: Eric Dumazet Date: Thu Jan 18 19:59:19 2018 -0800 net: qdisc_pkt_len_init() should be more robust Without proper validation of DODGY packets, we might very well feed qdisc_pkt_len_init() with invalid GSO packets. tcp_hdrlen() might access out-of-bound data, so let's use skb_header_pointer() and proper checks. Whole story is described in commit d0c081b49137 ("flow_dissector: properly cap thoff field") We have the goal of validating DODGY packets earlier in the stack, so we might very well revert this fix in the future. Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Cc: Jason Wang Reported-by: syzbot+9da69ebac7dddd804552@syzkaller.appspotmail.com Acked-by: Jason Wang Signed-off-by: David S. Miller net/core/dev.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 18b0affaf40cf5f320258d28f7069dfff76da184 Merge: b589513 69d08dc Author: David S. Miller Date: Mon Jan 22 15:46:56 2018 -0500 Merge branch 'ibmvnic-reset-behavior-fixes' John Allen says: ==================== ibmvnic: Reset behavior fixes This patchset fixes a number of issues related to ibmvnic reset uncovered from testing new Power9 machines with Everglades adapters and the new functionality to change mtu and other parameters in the driver. Changes since v1: -In patch 1/3, added the line to free the long term buffers before allocating a new one. This change inadvertently uncovered the problem that the number of queues can change after a failover as well. To fix this, we check whether or not the number of queues has changed in do_reset and if they have, we do a full release and init of the queues. -In patch 1/3, added variables to the adapter struct to track how many rx/tx pools have actually been allocated and modify the release pools routines to use these values rather than the possibly incorrect req_rx/tx_queues values. ==================== Signed-off-by: David S. Miller commit 69d08dcbbe34347cbc044629cf6f25d062593dfe Author: John Allen Date: Thu Jan 18 16:27:58 2018 -0600 ibmvnic: Allocate and request vpd in init_resources In reset events in which our memory allocations need to be reallocated, VPD data is being freed, but never reallocated. This can cause issues if we later attempt to access that memory or reset and attempt to free the memory. This patch moves the allocation of the VPD data to init_resources so that it will be symmetrically freed during release resources. Signed-off-by: John Allen Reviewed-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit e791380340685698dbdd38c7e3f3fcbf70a3c832 Author: John Allen Date: Thu Jan 18 16:27:12 2018 -0600 ibmvnic: Revert to previous mtu when unsupported value requested If we request an unsupported mtu value, the vnic server will suggest a different value. Currently we take the suggested value without question and login with that value. However, the behavior doesn't seem completely sane as attempting to change the mtu to some specific value will change the mtu to some completely different value most of the time. This patch fixes the issue by logging in with the previously used mtu value and printing an error message saying that the given mtu is unsupported. Signed-off-by: John Allen Reviewed-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 896d86959fee58113fc510c70cd8d10e82aa3e6a Author: John Allen Date: Thu Jan 18 16:26:31 2018 -0600 ibmvnic: Modify buffer size and number of queues on failover Using newer backing devices can cause the required padding at the end of buffer as well as the number of queues to change after a failover. Since we currently assume that these values never change, after a failover to a backing device with different capabilities, we can get errors from the vnic server, attempt to free long term buffers that are no longer there, or not free long term buffers that should be freed. This patch resolves the issue by checking whether any of these values change, and if so perform the necessary re-allocations. Signed-off-by: John Allen Reviewed-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 45 ++++++++++++++++++++++++++++++++------ drivers/net/ethernet/ibm/ibmvnic.h | 2 ++ 2 files changed, 40 insertions(+), 7 deletions(-) commit b589513e6354a5fd6934823b7fd66bffad41137a Author: Sowmini Varadhan Date: Thu Jan 18 13:11:07 2018 -0800 rds: tcp: compute m_ack_seq as offset from ->write_seq rds-tcp uses m_ack_seq to track the tcp ack# that indicates that the peer has received a rds_message. The m_ack_seq is used in rds_tcp_is_acked() to figure out when it is safe to drop the rds_message from the RDS retransmit queue. The m_ack_seq must be calculated as an offset from the right edge of the in-flight tcp buffer, i.e., it should be based on the ->write_seq, not the ->snd_nxt. Signed-off-by: Sowmini Varadhan Signed-off-by: David S. Miller net/rds/tcp.c | 5 +++-- net/rds/tcp.h | 2 +- net/rds/tcp_send.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) commit ab18a9c9ca27f8208c4960a1b25e8475b9f9dda5 Author: Oliver Neukum Date: Wed Jan 17 16:33:54 2018 +0100 usbnet: silence an unnecessary warning That a kevent could not be scheduled is not an error. Such handlers must be able to deal with multiple events anyway. As the successful scheduling of a work is a debug event, make the failure debug priority, too. V2: coding style Signed-off-by: Oliver Neukum Reported-by: Cristian Caravena Signed-off-by: David S. Miller drivers/net/usb/usbnet.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit affee5e1fdc77295b81afb03b265fe0d6aadb609 Merge: e58edaa 100d39a Author: David S. Miller Date: Mon Jan 22 15:26:57 2018 -0500 Merge branch 'cxgb4-tc-flower-offload-fixes' Daniel Borkmann says: ==================== pull-request: bpf 2018-01-18 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix a divide by zero due to wrong if (src_reg == 0) check in 64-bit mode. Properly handle this in interpreter and mask it also generically in verifier to guard against similar checks in JITs, from Eric and Alexei. 2) Fix a bug in arm64 JIT when tail calls are involved and progs have different stack sizes, from Daniel. 3) Reject stores into BPF context that are not expected BPF_STX | BPF_MEM variant, from Daniel. 4) Mark dst reg as unknown on {s,u}bounds adjustments when the src reg has derived bounds from dead branches, from Daniel. ==================== Signed-off-by: David S. Miller commit 100d39af5048aecb00522a128ec264781ba7ecfa Author: Kumar Sanghvi Date: Wed Jan 17 12:13:34 2018 +0530 cxgb4: fix endianness for vlan value in cxgb4_tc_flower Don't change endianness when assigning vlan value in cxgb4_tc_flower code when processing flow match parameters. The value gets converted to network order as part of filtering code in set_filter_wr. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d728f13102cd4b2afdbb183babde2b43ac2c3130 Author: Kumar Sanghvi Date: Wed Jan 17 12:13:33 2018 +0530 cxgb4: set filter type to 1 for ETH_P_IPV6 For ethtype_key = ETH_P_IPV6, set filter type as 1 in cxgb4_tc_flower code when processing flow match parameters. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 3 +++ 1 file changed, 3 insertions(+) commit 7222708e823afc98dfb769d36bf2f26b6420b7ce Author: Kirill A. Shutemov Date: Mon Jan 22 12:22:30 2018 +0300 mm, page_vma_mapped: Introduce pfn_in_hpage() The new helper would check if the pfn belongs to the page. For huge pages it checks if the PFN is within range covered by the huge page. The helper is used in check_pte(). The original code the helper replaces had two call to page_to_pfn(). page_to_pfn() is relatively costly. Although current GCC is able to optimize code to have one call, it's better to do this explicitly. Signed-off-by: Kirill A. Shutemov Signed-off-by: Linus Torvalds mm/page_vma_mapped.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit e5c9c6a885fad00aa559b49d8fc23a60e290824e Author: Mark Furneaux Date: Mon Jan 22 11:24:17 2018 -0800 Input: xpad - add support for PDP Xbox One controllers Adds support for the current lineup of Xbox One controllers from PDP (Performance Designed Products). These controllers are very picky with their initialization sequence and require an additional 2 packets before they send any input reports. Signed-off-by: Mark Furneaux Reviewed-by: Cameron Gutman Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit f30fefd8949290f505b3af2ba3c7c4c831f199b3 Author: Andi Shyti Date: Mon Jan 22 11:23:27 2018 -0800 Input: stmfts,s6sy671 - add SPDX identifier Replace the original license statement with the SPDX identifier. Update also the copyright owner adding myself as co-owner of the copyright. Signed-off-by: Andi Shyti Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/s6sy761.c | 15 +++++---------- drivers/input/touchscreen/stmfts.c | 15 +++++---------- 2 files changed, 10 insertions(+), 20 deletions(-) commit 0d665e7b109d512b7cae3ccef6e8654714887844 Author: Kirill A. Shutemov Date: Fri Jan 19 15:49:24 2018 +0300 mm, page_vma_mapped: Drop faulty pointer arithmetics in check_pte() Tetsuo reported random crashes under memory pressure on 32-bit x86 system and tracked down to change that introduced page_vma_mapped_walk(). The root cause of the issue is the faulty pointer math in check_pte(). As ->pte may point to an arbitrary page we have to check that they are belong to the section before doing math. Otherwise it may lead to weird results. It wasn't noticed until now as mem_map[] is virtually contiguous on flatmem or vmemmap sparsemem. Pointer arithmetic just works against all 'struct page' pointers. But with classic sparsemem, it doesn't because each section memap is allocated separately and so consecutive pfns crossing two sections might have struct pages at completely unrelated addresses. Let's restructure code a bit and replace pointer arithmetic with operations on pfns. Signed-off-by: Kirill A. Shutemov Reported-and-tested-by: Tetsuo Handa Acked-by: Michal Hocko Fixes: ace71a19cec5 ("mm: introduce page_vma_mapped_walk()") Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds include/linux/swapops.h | 21 +++++++++++++++++ mm/page_vma_mapped.c | 63 +++++++++++++++++++++++++++++-------------------- 2 files changed, 59 insertions(+), 25 deletions(-) commit e58edaa4863583b54409444f11b4f80dff0af1cd Author: Talat Batheesh Date: Sun Jan 21 05:30:42 2018 +0200 net/mlx5e: Fix fixpoint divide exception in mlx5e_am_stats_compare Helmut reported a bug about division by zero while running traffic and doing physical cable pull test. When the cable unplugged the ppms become zero, so when dividing the current ppms by the previous ppms in the next dim iteration there is division by zero. This patch prevent this division for both ppms and epms. Fixes: c3164d2fc48f ("net/mlx5e: Added BW check for DIM decision mechanism") Reported-by: Helmut Grauer Signed-off-by: Talat Batheesh Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0c5b9b5d9adbad4b60491f9ba0d2af38904bb4b9 Author: Linus Torvalds Date: Sun Jan 21 13:51:26 2018 -0800 Linux 4.15-rc9 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5515114211c5096987b8e622c2ca57929cebabaa Merge: 319f1e0 3f7d875 Author: Linus Torvalds Date: Sun Jan 21 10:48:35 2018 -0800 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 pti fixes from Thomas Gleixner: "A small set of fixes for the meltdown/spectre mitigations: - Make kprobes aware of retpolines to prevent probes in the retpoline thunks. - Make the machine check exception speculation protected. MCE used to issue an indirect call directly from the ASM entry code. Convert that to a direct call into a C-function and issue the indirect call from there so the compiler can add the retpoline protection, - Make the vmexit_fill_RSB() assembly less stupid - Fix a typo in the PTI documentation" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/retpoline: Optimize inline assembler for vmexit_fill_RSB x86/pti: Document fix wrong index kprobes/x86: Disable optimizing on the function jumps to indirect thunk kprobes/x86: Blacklist indirect thunk functions for kprobes retpoline: Introduce start/end markers of indirect thunk x86/mce: Make machine check speculation protected commit 319f1e04c7e7016233f998a1a48cd3d17da2108f Merge: 66f8162 f23d74f Author: Linus Torvalds Date: Sun Jan 21 10:41:48 2018 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 kexec fix from Thomas Gleixner: "A single fix for the WBINVD issue introduced by the SME support which causes kexec fails on non AMD/SME capable CPUs. Issue WBINVD only when the CPU has SME and avoid doing so in a loop" [ Side note: this patch fixes the problem, but it isn't entirely clear why it is required. The wbinvd should just work regardless, but there seems to be some system - as opposed to CPU - issue, since the wbinvd causes more problems later in the shutdown sequence, but wbinvd instructions while the system is still active are not problematic. Possibly some SMI or pending machine check issue on the affected system ] * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Rework wbinvd, hlt operation in stop_this_cpu() commit 66f816241895dc8a1614c1114c0a97b167e4ce64 Merge: d517bb7 a0c9259 Author: Linus Torvalds Date: Sun Jan 21 10:39:58 2018 -0800 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Thomas Gleixner: "A single fix for the new matrix allocator to prevent vector exhaustion by certain network drivers which allocate gazillions of unused vectors which cannot be put into reservation mode due to MSI and the lack of MSI entry masking. The fix/workaround is to spread the vectors across CPUs by searching the supplied target CPU mask for the CPU with the smallest number of allocated vectors" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irq/matrix: Spread interrupts on allocation commit d517bb79f4994a87cfc2ddd4cc76bd1a627d4bed Merge: 91cfc88 86be899 Author: Linus Torvalds Date: Sat Jan 20 20:12:47 2018 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha Pull alpha fixes from Matt Turner: "A build fix and a regression fix" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha: alpha/PCI: Fix noname IRQ level detection alpha: extend memset16 to EV6 optimised routines commit 91cfc88c66bf8ab95937606569670cf67fa73e09 Author: Laura Abbott Date: Sat Jan 20 17:14:02 2018 -0800 x86: Use __nostackprotect for sme_encrypt_kernel Commit bacf6b499e11 ("x86/mm: Use a struct to reduce parameters for SME PGD mapping") moved some parameters into a structure. The structure was large enough to trigger the stack protection canary in sme_encrypt_kernel which doesn't work this early, causing reboots. Mark sme_encrypt_kernel appropriately to not use the canary. Fixes: bacf6b499e11 ("x86/mm: Use a struct to reduce parameters for SME PGD mapping") Signed-off-by: Laura Abbott Cc: Tom Lendacky Cc: Ingo Molnar Signed-off-by: Linus Torvalds arch/x86/mm/mem_encrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86be89939d11a84800f66e2a283b915b704bf33d Author: Lorenzo Pieralisi Date: Tue Jan 16 11:52:59 2018 +0000 alpha/PCI: Fix noname IRQ level detection The conversion of the alpha architecture PCI host bridge legacy IRQ mapping/swizzling to the new PCI host bridge map/swizzle hooks carried out through: commit 0e4c2eeb758a ("alpha/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks") implies that IRQ for devices are now allocated through pci_assign_irq() function in pci_device_probe() that is called when a driver matching a device is found in order to probe the device through the device driver. Alpha noname platforms required IRQ level programming to be executed in sio_fixup_irq_levels(), that is called in noname_init_pci(), a platform hook called within a subsys_initcall. In noname_init_pci(), present IRQs are detected through sio_collect_irq_levels() that check the struct pci_dev->irq number to detect if an IRQ has been allocated for the device. By the time sio_collect_irq_levels() is called, some devices may still have not a matching driver loaded to match them (eg loadable module) therefore their IRQ allocation is still pending - which means that sio_collect_irq_levels() does not programme the correct IRQ level for those devices, causing their IRQ handling to be broken when the device driver is actually loaded and the device is probed. Fix the issue by adding code in the noname map_irq() function (noname_map_irq()) that, whilst mapping/swizzling the IRQ line, it also ensures that the correct IRQ level programming is executed at platform level, fixing the issue. Fixes: 0e4c2eeb758a ("alpha/PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks") Reported-by: Mikulas Patocka Signed-off-by: Lorenzo Pieralisi Cc: stable@vger.kernel.org # 4.14 Cc: Bjorn Helgaas Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Mikulas Patocka Cc: Meelis Roos Signed-off-by: Matt Turner arch/alpha/kernel/sys_sio.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) commit 24b61240471ad4ed39740f1664d5240d91f4bf75 Merge: e6252e7 35b3fde Author: Linus Torvalds Date: Sat Jan 20 11:41:09 2018 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "ARM: - fix incorrect huge page mappings on systems using the contiguous hint for hugetlbfs - support alternative GICv4 init sequence - correctly implement the ARM SMCC for HVC and SMC handling PPC: - add KVM IOCTL for reporting vulnerability and workaround status s390: - provide userspace interface for branch prediction changes in firmware x86: - use correct macros for bits" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: s390: wire up bpb feature KVM: PPC: Book3S: Provide information about hardware/firmware CVE workarounds KVM/x86: Fix wrong macro references of X86_CR0_PG_BIT and X86_CR4_PAE_BIT in kvm_valid_sregs() arm64: KVM: Fix SMCCC handling of unimplemented SMC/HVC calls KVM: arm64: Fix GICv4 init when called from vgic_its_create KVM: arm/arm64: Check pagesize when allocating a hugepage at Stage 2 commit e6252e7f58b6f6fd6b967756b66a6e37a8afb6e4 Merge: 8dd903d 18696ed Author: Linus Torvalds Date: Sat Jan 20 11:37:00 2018 -0800 Merge tag 'mips_fixes_4.15_2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips Pull MIPS fixes from James Hogan: "Some final MIPS fixes for 4.15, including important build fixes and a MAINTAINERS update: - Add myself as MIPS co-maintainer. - Fix various all*config build failures (particularly as a result of switching the default MIPS platform to the "generic" platform). - Fix GCC7 build failures (duplicate const and questionable calls to missing __multi3 intrinsic on mips64r6). - Fix warnings when CPU Idle is enabled (4.14). - Fix AR7 serial output (since 3.17). - Fix ralink platform_get_irq error checking (since 3.12)" * tag 'mips_fixes_4.15_2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips: MAINTAINERS: Add James as MIPS co-maintainer MIPS: Fix undefined reference to physical_memsize MIPS: Implement __multi3 for GCC7 MIPS64r6 builds MIPS: mm: Fix duplicate "const" on insn_table_MM MIPS: CM: Drop WARN_ON(vp != 0) MIPS: ralink: Fix platform_get_irq's error checking MIPS: Fix CPS SMP NS16550 UART defaults MIPS: BCM47XX Avoid compile error with MIPS allnoconfig MIPS: RB532: Avoid undefined mac_pton without GENERIC_NET_UTILS MIPS: RB532: Avoid undefined early_serial_setup() without SERIAL_8250_CONSOLE MIPS: ath25: Avoid undefined early_serial_setup() without SERIAL_8250_CONSOLE MIPS: AR7: ensure the port type's FCR value is used commit 35b3fde6203b932b2b1a5b53b3d8808abc9c4f60 Author: Christian Borntraeger Date: Wed Jan 17 14:44:34 2018 +0100 KVM: s390: wire up bpb feature The new firmware interfaces for branch prediction behaviour changes are transparently available for the guest. Nevertheless, there is new state attached that should be migrated and properly resetted. Provide a mechanism for handling reset, migration and VSIE. Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck [Changed capability number to 152. - Radim] Signed-off-by: Radim Krčmář arch/s390/include/asm/kvm_host.h | 3 ++- arch/s390/include/uapi/asm/kvm.h | 5 ++++- arch/s390/kvm/kvm-s390.c | 12 ++++++++++++ arch/s390/kvm/vsie.c | 10 ++++++++++ include/uapi/linux/kvm.h | 1 + 5 files changed, 29 insertions(+), 2 deletions(-) commit 29d24e3f3d45c8325aff405ec8ee6924cf0cec5a Merge: 37b9595 3214d01 Author: Radim Krčmář Date: Sat Jan 20 17:29:00 2018 +0100 Merge tag 'kvm-ppc-cve-4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc Add PPC KVM ioctl to report vulnerability and workaround status to userspace. commit 8dd903d2cf7b6dfe98be7c19f891882583c7266e Merge: 1cf5561 c9f9260 Author: Linus Torvalds Date: Fri Jan 19 15:20:00 2018 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fix from James Bottomley: "One fix for SAS attached SATA CD-ROMs. It turns out that the libata handling of CD devices relies on the SCSI error handler, so disable async aborts (which don't start the error handler) for these devices" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: libsas: Disable asynchronous aborts for SATA devices commit 1cf55613a6a95a8f6c2ad8565ef92ef97b2af2fd Merge: ec835f8 3cc2e57 Author: Linus Torvalds Date: Fri Jan 19 15:16:49 2018 -0800 Merge tag 'for-4.15/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: "All fixes marked for stable: - Fix DM thinp btree corruption seen when inserting a new key/value pair into a full root node. - Fix DM thinp btree removal deadlock due to artificially low number of allowed concurrent locks allowed. - Fix possible DM crypt corruption if kernel keyring service is used. Only affects ciphers using following IVs: essiv, lmk and tcw. - Two DM crypt device initialization error checking fixes. - Fix DM integrity to allow use of async ciphers that require DMA" * tag 'for-4.15/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm crypt: fix error return code in crypt_ctr() dm crypt: wipe kernel key copy after IV initialization dm integrity: don't store cipher request on the stack dm crypt: fix crash by adding missing check for auth key size dm btree: fix serious bug in btree_split_beneath() dm thin metadata: THIN_MAX_CONCURRENT_LOCKS should be 6 commit ec835f8104a21f4d4eeb9d316ee71d2b4a7f00de Merge: 672bb0f 1ebe1ea Author: Linus Torvalds Date: Fri Jan 19 11:38:19 2018 -0800 Merge tag 'trace-v4.15-rc4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Two more small fixes - The conversion of enums into their actual numbers to display in the event format file had an off-by-one bug, that could cause an enum not to be converted, and break user space parsing tools. - A fix to a previous fix to bring back the context recursion checks. The interrupt case checks for NMI, IRQ and softirq, but the softirq returned the same number regardless if it was set or not, although the logic would force it to be set if it were hit" * tag 'trace-v4.15-rc4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix converting enum's from the map in trace_event_eval_update() ring-buffer: Fix duplicate results in mapping context to bits in recursive lock commit 672bb0fa9a8303cbd678dc60e315c84dda913ce1 Merge: 9bdbaeb 55edde9 Author: Linus Torvalds Date: Fri Jan 19 11:36:09 2018 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - a fix for use-after-free in Synaptics RMI4 driver - correction to multitouch contact tracking on certain ALPS touchpads (which got broken when we tried to fix the 2-finger scrolling) - touchpad on Lenovo T640p is switched over to SMbus/RMI - a few device node refcount fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics-rmi4 - prevent UAF reported by KASAN Input: ALPS - fix multi-touch decoding on SS4 plus touchpads Input: synaptics - Lenovo Thinkpad T460p devices should use RMI Input: of_touchscreen - add MODULE_LICENSE Input: 88pm860x-ts - fix child-node lookup Input: twl6040-vibra - fix child-node lookup Input: twl4030-vibra - fix sibling-node lookup commit 9bdbaeba939aa66faa4559daa32fddfc8a4bde12 Merge: 9f77a11 89c6efa Author: Linus Torvalds Date: Fri Jan 19 11:30:06 2018 -0800 Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Two bugfixes for the I2C core: Lixing Wang fixed a refcounting problem with DT nodes. Jeremy Compostella fixed a buffer overflow possibility when using a 'don't use' ioctl interface directly" * 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA i2c: core: decrease reference count of device node in i2c_unregister_device commit 9f77a11ab2e5377173d28df93edbc73a02fa06b6 Merge: 8b335c7 db5ff90 Author: Linus Torvalds Date: Fri Jan 19 11:26:59 2018 -0800 Merge branch 'for-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixlet from Tejun Heo: "This just adds one more entry for liteon optical drives to the device blacklist for large IOs. The change is very low risk" * 'for-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: libata: apply MAX_SEC_1024 to all LITEON EP1 series devices commit 8b335c7d22df5a5c252e4c22559a3f3ae011e3f0 Merge: a2c9c1c 4f58424 Author: Linus Torvalds Date: Fri Jan 19 11:25:17 2018 -0800 Merge branch 'for-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fix from Tejun Heo: "cgroup.threads should be delegatable (ie. a container should be able to write to it from inside) but was missing the flag. The change is very low risk" * 'for-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: make cgroup.threads delegatable commit a2c9c1c0352bb16564680dbd1af21bfe56b7f000 Merge: 6ec8765 62635ea Author: Linus Torvalds Date: Fri Jan 19 11:23:39 2018 -0800 Merge branch 'for-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fixlet from Tejun Heo: "One patch to add touch_nmi_watchdog() while dumping workqueue debug messages to avoid triggering the lockup detector spuriously. The change is very low risk" * 'for-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: avoid hard lockups in show_workqueue_state() commit 6ec8765f55cc3e2d6543dfe64ebfd9b2ff327fa4 Merge: 4917d5d b7563e2 Author: Linus Torvalds Date: Fri Jan 19 11:21:31 2018 -0800 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: "We have various small DT fixes, and one important regression fix: The recent device tree bugfixes that were intended to address issues that 'dtc' started warning about in 4.15 fixed various USB PHY device nodes, but it turns out that we had code that depended on those nodes being incorrect and the probe failing with a particular error code. With the workaround we can also deal with correct device nodes. The DT fixes include: - Allwinner A10 and A20 had the display pipeline set up incorrectly (introduced in v4.15) - The Altera PMU lacked an interrupt-parent (never worked) - Pin muxing on the Openblocks A7 (never worked) - Clocks might get set up wrong on Armada 7K/8K (4.15 regression) We now have additional device tree patches to address all the remaining warnings introduced in 4.15, but decided to queue them for 4.16 instead, to avoid risking another regression like the USB PHY thing mentioned above. * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: phy: work around 'phys' references to usb-nop-xceiv devices ARM: sunxi_defconfig: Enable CMA arm64: dts: socfpga: add missing interrupt-parent ARM: dts: sun[47]i: Fix display backend 1 output to TCON0 remote endpoint ARM64: dts: marvell: armada-cp110: Fix clock resources for various node ARM: dts: da850-lcdk: Remove leading 0x and 0s from unit address ARM: dts: kirkwood: fix pin-muxing of MPP7 on OpenBlocks A7 commit 4917d5df3851d0d3febc8e4bbfd964132e746149 Merge: 9abc937 1b689a9 Author: Linus Torvalds Date: Fri Jan 19 11:19:11 2018 -0800 Merge tag 'powerpc-4.15-8' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "More than we'd like after rc8, but nothing very alarming either, just tying up loose ends before the release: Since we changed powernv to use cpufreq_get() from show_cpuinfo(), we see warnings with PREEMPT enabled. But the preempt_disable() in show_cpuinfo() doesn't actually prevent CPU hotplug as it suggests, so remove it. Two updates to the recently merged RFI flush code. Wire up the generic sysfs file to report the status, and add a debugfs file to allow enabling/disabling it at runtime. Two updates to xmon, one to add the RFI flush related fields to the paca dump, and another to not use hashed pointers in the paca dump. And one minor fix to add a missing include of linux/types.h in asm/hvcall.h, not seen to break the build in upstream, but correct anyway. Thanks to: Benjamin Herrenschmidt, Michal Suchanek, Nicholas Piggin" * tag 'powerpc-4.15-8' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/pseries: include linux/types.h in asm/hvcall.h powerpc/64s: Allow control of RFI flush via debugfs powerpc/64s: Wire up cpu_show_meltdown() powerpc: Don't preempt_disable() in show_cpuinfo() powerpc/xmon: Don't print hashed pointers in paca dump powerpc/xmon: Add RFI flush related fields to paca dump commit 9abc937836b46757950193485ff2d92944c1af96 Merge: d342740 04cef3e Author: Linus Torvalds Date: Fri Jan 19 11:16:01 2018 -0800 Merge tag 'drm-fixes-for-v4.15-rc9' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Nouveau, i915, vmwgfx and sun4i regression fixes. The i915 change fixes a display corruption problem introduced in 4.15, the nouveau changes are for regressions in 4.15, one of the vmwgfx fixes goes back a little further, the other is a 4.15 regression fix, the 3 sun4i changes fix blank HDMI output on those devices" * tag 'drm-fixes-for-v4.15-rc9' of git://people.freedesktop.org/~airlied/linux: drm/nouveau/mmu/mcp77: fix regressions in stolen memory handling drm/nouveau/bar/gk20a: Avoid bar teardown during init drm/nouveau/drm/nouveau: Pass the proper arguments to nvif_object_map_handle() drm/vmwgfx: fix memory corruption with legacy/sou connectors drm/vmwgfx: Fix a boot time warning drm/i915: Fix deadlock in i830_disable_pipe() drm/i915: Redo plane sanitation during readout drm/i915: Add .get_hw_state() method for planes drm/sun4i: hdmi: Add missing rate halving check in sun4i_tmds_determine_rate drm/sun4i: hdmi: Fix incorrect assignment in sun4i_tmds_determine_rate drm/sun4i: hdmi: Check for unset best_parent in sun4i_tmds_determine_rate commit d342740e26704d94e2ab0a3ea0e04c506b7fbfca Merge: 4b664e7 a3d6c97 Author: Linus Torvalds Date: Fri Jan 19 10:56:18 2018 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "6 fixes" * emailed patches from Andrew Morton : sparse doesn't support struct randomization proc: fix coredump vs read /proc/*/stat race scripts/gdb/linux/tasks.py: fix get_thread_info scripts/decodecode: fix decoding for AArch64 (arm64) instructions mm/page_owner.c: remove drain_all_pages from init_early_allocated_pages mm/memory.c: release locked page in do_swap_page() commit 4b664e739f7743f91e1d12ebfb7a76307ebea702 Author: Matthew Wilcox Date: Thu Jan 18 13:52:17 2018 -0800 ia64: Rewrite atomic_add and atomic_sub Force __builtin_constant_p to evaluate whether the argument to atomic_add & atomic_sub is constant in the front-end before optimisations which can lead GCC to output a call to __bad_increment_for_ia64_fetch_and_add(). See GCC bugzilla 83653. Signed-off-by: Jakub Jelinek Signed-off-by: Matthew Wilcox Signed-off-by: Tony Luck Signed-off-by: Linus Torvalds arch/ia64/include/asm/atomic.h | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit a3d6c976f71902388e444594daa902032b5a45fa Author: Matthew Wilcox Date: Thu Jan 18 16:34:08 2018 -0800 sparse doesn't support struct randomization Without this patch, I drown in a sea of unknown attribute warnings Link: http://lkml.kernel.org/r/20180117024539.27354-1-willy@infradead.org Signed-off-by: Matthew Wilcox Acked-by: Kees Cook Cc: Ingo Molnar Cc: Josh Poimboeuf Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/compiler-gcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bb2ee192e482c5d500df9f2b1b26a560bd3026f Author: Alexey Dobriyan Date: Thu Jan 18 16:34:05 2018 -0800 proc: fix coredump vs read /proc/*/stat race do_task_stat() accesses IP and SP of a task without bumping reference count of a stack (which became an entity with independent lifetime at some point). Steps to reproduce: #include #include #include #include #include #include #include #include int main(void) { setrlimit(RLIMIT_CORE, &(struct rlimit){}); while (1) { char buf[64]; char buf2[4096]; pid_t pid; int fd; pid = fork(); if (pid == 0) { *(volatile int *)0 = 0; } snprintf(buf, sizeof(buf), "/proc/%u/stat", pid); fd = open(buf, O_RDONLY); read(fd, buf2, sizeof(buf2)); close(fd); waitpid(pid, NULL, 0); } return 0; } BUG: unable to handle kernel paging request at 0000000000003fd8 IP: do_task_stat+0x8b4/0xaf0 PGD 800000003d73e067 P4D 800000003d73e067 PUD 3d558067 PMD 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 0 PID: 1417 Comm: a.out Not tainted 4.15.0-rc8-dirty #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1.fc27 04/01/2014 RIP: 0010:do_task_stat+0x8b4/0xaf0 Call Trace: proc_single_show+0x43/0x70 seq_read+0xe6/0x3b0 __vfs_read+0x1e/0x120 vfs_read+0x84/0x110 SyS_read+0x3d/0xa0 entry_SYSCALL_64_fastpath+0x13/0x6c RIP: 0033:0x7f4d7928cba0 RSP: 002b:00007ffddb245158 EFLAGS: 00000246 Code: 03 b7 a0 01 00 00 4c 8b 4c 24 70 4c 8b 44 24 78 4c 89 74 24 18 e9 91 f9 ff ff f6 45 4d 02 0f 84 fd f7 ff ff 48 8b 45 40 48 89 ef <48> 8b 80 d8 3f 00 00 48 89 44 24 20 e8 9b 97 eb ff 48 89 44 24 RIP: do_task_stat+0x8b4/0xaf0 RSP: ffffc90000607cc8 CR2: 0000000000003fd8 John Ogness said: for my tests I added an else case to verify that the race is hit and correctly mitigated. Link: http://lkml.kernel.org/r/20180116175054.GA11513@avx2 Signed-off-by: Alexey Dobriyan Reported-by: "Kohli, Gaurav" Tested-by: John Ogness Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Oleg Nesterov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/array.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 883d50f56d263f70fd73c0d96b09eb36c34e9305 Author: Xi Kangjie Date: Thu Jan 18 16:34:00 2018 -0800 scripts/gdb/linux/tasks.py: fix get_thread_info Since kernel 4.9, the thread_info has been moved into task_struct, no longer locates at the bottom of kernel stack. See commits c65eacbe290b ("sched/core: Allow putting thread_info into task_struct") and 15f4eae70d36 ("x86: Move thread_info into task_struct"). Before fix: (gdb) set $current = $lx_current() (gdb) p $lx_thread_info($current) $1 = {flags = 1470918301} (gdb) p $current.thread_info $2 = {flags = 2147483648} After fix: (gdb) p $lx_thread_info($current) $1 = {flags = 2147483648} (gdb) p $current.thread_info $2 = {flags = 2147483648} Link: http://lkml.kernel.org/r/20180118210159.17223-1-imxikangjie@gmail.com Fixes: 15f4eae70d36 ("x86: Move thread_info into task_struct") Signed-off-by: Xi Kangjie Acked-by: Jan Kiszka Acked-by: Kieran Bingham Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/gdb/linux/tasks.py | 2 ++ 1 file changed, 2 insertions(+) commit be9fa663d325a102de53c9ab6d00a31dcb36bb73 Author: Will Deacon Date: Thu Jan 18 16:33:57 2018 -0800 scripts/decodecode: fix decoding for AArch64 (arm64) instructions There are a couple of problems with the decodecode script and arm64: 1. AArch64 objdump refuses to disassemble .4byte directives as instructions, insisting that they are data values and displaying them as: a94153f3 .word 0xa94153f3 <-- trapping instruction This is resolved by using the .inst directive instead. 2. Disassembly of branch instructions attempts to provide the target as an offset from a symbol, e.g.: 0: 34000082 cbz w2, 10 <.text+0x10> however this falls foul of the grep -v, which matches lines containing ".text" and ends up removing all branch instructions from the dump. This patch resolves both issues by using the .inst directive for 4-byte quantities on arm64 and stripping the resulting binaries (as is done on arm already) to remove the mapping symbols. Link: http://lkml.kernel.org/r/1506596147-23630-1-git-send-email-will.deacon@arm.com Signed-off-by: Will Deacon Reviewed-by: Dave Martin Cc: Michal Marek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/decodecode | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6bec6ad77fac3d29aed0d8e0b7526daedc964970 Author: Oscar Salvador Date: Thu Jan 18 16:33:53 2018 -0800 mm/page_owner.c: remove drain_all_pages from init_early_allocated_pages When setting page_owner = on, the following warning can be seen in the boot log: WARNING: CPU: 0 PID: 0 at mm/page_alloc.c:2537 drain_all_pages+0x171/0x1a0 Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.15.0-rc7-next-20180109-1-default+ #7 Hardware name: Dell Inc. Latitude E7470/0T6HHJ, BIOS 1.11.3 11/09/2016 RIP: 0010:drain_all_pages+0x171/0x1a0 Call Trace: init_page_owner+0x4e/0x260 start_kernel+0x3e6/0x4a6 ? set_init_arg+0x55/0x55 secondary_startup_64+0xa5/0xb0 Code: c5 ed ff 89 df 48 c7 c6 20 3b 71 82 e8 f9 4b 52 00 3b 05 d7 0b f8 00 89 c3 72 d5 5b 5d 41 5 This warning is shown because we are calling drain_all_pages() in init_early_allocated_pages(), but mm_percpu_wq is not up yet, it is being set up later on in kernel_init_freeable() -> init_mm_internals(). Link: http://lkml.kernel.org/r/20180109153921.GA13070@techadventures.net Signed-off-by: Oscar Salvador Acked-by: Joonsoo Kim Cc: Vlastimil Babka Cc: Michal Hocko Cc: Ayush Mittal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_owner.c | 1 - 1 file changed, 1 deletion(-) commit f80207727aaca3aa34a9cd80659393534de69cad Author: Minchan Kim Date: Thu Jan 18 16:33:50 2018 -0800 mm/memory.c: release locked page in do_swap_page() James reported a bug in swap paging-in from his testing. It is that do_swap_page doesn't release locked page so system hang-up happens due to a deadlock on PG_locked. It was introduced by 0bcac06f27d7 ("mm, swap: skip swapcache for swapin of synchronous device") because I missed swap cache hit places to update swapcache variable to work well with other logics against swapcache in do_swap_page. This patch fixes it. Debugged by James Bottomley. Link: http://lkml.kernel.org/r/<1514407817.4169.4.camel@HansenPartnership.com> Link: http://lkml.kernel.org/r/20180102235606.GA19438@bbox Signed-off-by: Minchan Kim Reported-by: James Bottomley Acked-by: Hugh Dickins Cc: Sergey Senozhatsky Cc: Huang Ying Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 726ba84b50acf6f5816c1d854150612d2a511bab Merge: dda3e15 a0dca10 Author: Linus Torvalds Date: Fri Jan 19 09:30:33 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix BPF divides by zero, from Eric Dumazet and Alexei Starovoitov. 2) Reject stores into bpf context via st and xadd, from Daniel Borkmann. 3) Fix a memory leak in TUN, from Cong Wang. 4) Disable RX aggregation on a specific troublesome configuration of r8152 in a Dell TB16b dock. 5) Fix sw_ctx leak in tls, from Sabrina Dubroca. 6) Fix program replacement in cls_bpf, from Daniel Borkmann. 7) Fix uninitialized station_info structures in cfg80211, from Johannes Berg. 8) Fix miscalculation of transport header offset field in flow dissector, from Eric Dumazet. 9) Fix LPM tree leak on failure in mlxsw driver, from Ido Schimmel. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (29 commits) ibmvnic: Fix IPv6 packet descriptors ibmvnic: Fix IP offload control buffer ipv6: don't let tb6_root node share routes with other node ip6_gre: init dev->mtu and dev->hard_header_len correctly mlxsw: spectrum_router: Free LPM tree upon failure flow_dissector: properly cap thoff field fm10k: mark PM functions as __maybe_unused cfg80211: fix station info handling bugs netlink: reset extack earlier in netlink_rcv_skb can: af_can: canfd_rcv(): replace WARN_ONCE by pr_warn_once can: af_can: can_rcv(): replace WARN_ONCE by pr_warn_once bpf: mark dst unknown on inconsistent {s, u}bounds adjustments bpf: fix cls_bpf on filter replace Net: ethernet: ti: netcp: Fix inbound ping crash if MTU size is greater than 1500 tls: reset crypto_info when do_tls_setsockopt_tx fails tls: return -EBUSY if crypto_info is already set tls: fix sw_ctx leak net/tls: Only attach to sockets in ESTABLISHED state net: fs_enet: do not call phy_stop() in interrupts r8152: disable RX aggregation on Dell TB16 dock ... commit 3f7d875566d8e79c5e0b2c9a413e91b2c29e0854 Author: Andi Kleen Date: Wed Jan 17 14:53:28 2018 -0800 x86/retpoline: Optimize inline assembler for vmexit_fill_RSB The generated assembler for the C fill RSB inline asm operations has several issues: - The C code sets up the loop register, which is then immediately overwritten in __FILL_RETURN_BUFFER with the same value again. - The C code also passes in the iteration count in another register, which is not used at all. Remove these two unnecessary operations. Just rely on the single constant passed to the macro for the iterations. Signed-off-by: Andi Kleen Signed-off-by: Thomas Gleixner Acked-by: David Woodhouse Cc: dave.hansen@intel.com Cc: gregkh@linuxfoundation.org Cc: torvalds@linux-foundation.org Cc: arjan@linux.intel.com Link: https://lkml.kernel.org/r/20180117225328.15414-1-andi@firstfloor.org arch/x86/include/asm/nospec-branch.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 98f0fceec7f84d80bc053e49e596088573086421 Author: zhenwei.pi Date: Thu Jan 18 09:04:52 2018 +0800 x86/pti: Document fix wrong index In section <2. Runtime Cost>, fix wrong index. Signed-off-by: zhenwei.pi Signed-off-by: Thomas Gleixner Cc: dave.hansen@linux.intel.com Link: https://lkml.kernel.org/r/1516237492-27739-1-git-send-email-zhenwei.pi@youruncloud.com Documentation/x86/pti.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c86a32c09f8ced67971a2310e3b0dda4d1749007 Author: Masami Hiramatsu Date: Fri Jan 19 01:15:20 2018 +0900 kprobes/x86: Disable optimizing on the function jumps to indirect thunk Since indirect jump instructions will be replaced by jump to __x86_indirect_thunk_*, those jmp instruction must be treated as an indirect jump. Since optprobe prohibits to optimize probes in the function which uses an indirect jump, it also needs to find out the function which jump to __x86_indirect_thunk_* and disable optimization. Add a check that the jump target address is between the __indirect_thunk_start/end when optimizing kprobe. Signed-off-by: Masami Hiramatsu Signed-off-by: Thomas Gleixner Acked-by: David Woodhouse Cc: Andi Kleen Cc: Peter Zijlstra Cc: Ananth N Mavinakayanahalli Cc: Arjan van de Ven Cc: Greg Kroah-Hartman Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/151629212062.10241.6991266100233002273.stgit@devbox arch/x86/kernel/kprobes/opt.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit c1804a236894ecc942da7dc6c5abe209e56cba93 Author: Masami Hiramatsu Date: Fri Jan 19 01:14:51 2018 +0900 kprobes/x86: Blacklist indirect thunk functions for kprobes Mark __x86_indirect_thunk_* functions as blacklist for kprobes because those functions can be called from anywhere in the kernel including blacklist functions of kprobes. Signed-off-by: Masami Hiramatsu Signed-off-by: Thomas Gleixner Acked-by: David Woodhouse Cc: Andi Kleen Cc: Peter Zijlstra Cc: Ananth N Mavinakayanahalli Cc: Arjan van de Ven Cc: Greg Kroah-Hartman Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/151629209111.10241.5444852823378068683.stgit@devbox arch/x86/lib/retpoline.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 736e80a4213e9bbce40a7c050337047128b472ac Author: Masami Hiramatsu Date: Fri Jan 19 01:14:21 2018 +0900 retpoline: Introduce start/end markers of indirect thunk Introduce start/end markers of __x86_indirect_thunk_* functions. To make it easy, consolidate .text.__x86.indirect_thunk.* sections to one .text.__x86.indirect_thunk section and put it in the end of kernel text section and adds __indirect_thunk_start/end so that other subsystem (e.g. kprobes) can identify it. Signed-off-by: Masami Hiramatsu Signed-off-by: Thomas Gleixner Acked-by: David Woodhouse Cc: Andi Kleen Cc: Peter Zijlstra Cc: Ananth N Mavinakayanahalli Cc: Arjan van de Ven Cc: Greg Kroah-Hartman Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/151629206178.10241.6828804696410044771.stgit@devbox arch/x86/include/asm/nospec-branch.h | 3 +++ arch/x86/kernel/vmlinux.lds.S | 6 ++++++ arch/x86/lib/retpoline.S | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) commit 6f41c34d69eb005e7848716bbcafc979b35037d5 Author: Thomas Gleixner Date: Thu Jan 18 16:28:26 2018 +0100 x86/mce: Make machine check speculation protected The machine check idtentry uses an indirect branch directly from the low level code. This evades the speculation protection. Replace it by a direct call into C code and issue the indirect call there so the compiler can apply the proper speculation protection. Signed-off-by: Thomas Gleixner Reviewed-by:Borislav Petkov Reviewed-by: David Woodhouse Niced-by: Peter Zijlstra Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801181626290.1847@nanos arch/x86/entry/entry_64.S | 2 +- arch/x86/include/asm/traps.h | 1 + arch/x86/kernel/cpu/mcheck/mce.c | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) commit b7563e2796f8b23c98afcfea7363194227fa089d Author: Arnd Bergmann Date: Fri Jan 12 11:12:05 2018 +0100 phy: work around 'phys' references to usb-nop-xceiv devices Stefan Wahren reports a problem with a warning fix that was merged for v4.15: we had lots of device nodes with a 'phys' property pointing to a device node that is not compliant with the binding documented in Documentation/devicetree/bindings/phy/phy-bindings.txt This generally works because USB HCD drivers that support both the generic phy subsystem and the older usb-phy subsystem ignore most errors from phy_get() and related calls and then use the usb-phy driver instead. However, it turns out that making the usb-nop-xceiv device compatible with the generic-phy binding changes the phy_get() return code from -EINVAL to -EPROBE_DEFER, and the dwc2 usb controller driver for bcm2835 now returns -EPROBE_DEFER from its probe function rather than ignoring the failure, breaking all USB support on raspberry-pi when CONFIG_GENERIC_PHY is enabled. The same code is used in the dwc3 driver and the usb_add_hcd() function, so a reasonable assumption would be that many other platforms are affected as well. I have reviewed all the related patches and concluded that "usb-nop-xceiv" is the only USB phy that is affected by the change, and since it is by far the most commonly referenced phy, all the other USB phy drivers appear to be used in ways that are are either safe in DT (they don't use the 'phys' property), or in the driver (they already ignore -EPROBE_DEFER from generic-phy when usb-phy is available). To work around the problem, this adds a special case to _of_phy_get() so we ignore any PHY node that is compatible with "usb-nop-xceiv", as we know that this can never load no matter how much we defer. In the future, we might implement a generic-phy driver for "usb-nop-xceiv" and then remove this workaround. Since we generally want older kernels to also want to work with the fixed devicetree files, it would be good to backport the patch into stable kernels as well (3.13+ are possibly affected), even though they don't contain any of the patches that may have caused regressions. Fixes: 014d6da6cb25 ARM: dts: bcm283x: Fix DTC warnings about missing phy-cells Fixes: c5bbf358b790 arm: dts: nspire: Add missing #phy-cells to usb-nop-xceiv Fixes: 44e5dced2ef6 arm: dts: marvell: Add missing #phy-cells to usb-nop-xceiv Fixes: f568f6f554b8 ARM: dts: omap: Add missing #phy-cells to usb-nop-xceiv Fixes: d745d5f277bf ARM: dts: imx51-zii-rdu1: Add missing #phy-cells to usb-nop-xceiv Fixes: 915fbe59cbf2 ARM: dts: imx: Add missing #phy-cells to usb-nop-xceiv Link: https://marc.info/?l=linux-usb&m=151518314314753&w=2 Link: https://patchwork.kernel.org/patch/10158145/ Cc: stable@vger.kernel.org Cc: Felipe Balbi Cc: Eric Anholt Tested-by: Stefan Wahren Acked-by: Rob Herring Tested-by: Hans Verkuil Acked-by: Kishon Vijay Abraham I Signed-off-by: Arnd Bergmann drivers/phy/phy-core.c | 4 ++++ 1 file changed, 4 insertions(+) commit c13e7f313da33d1488355440f1a10feb1897480a Author: Maxime Ripard Date: Fri Jan 19 14:32:08 2018 +0100 ARM: sunxi_defconfig: Enable CMA The DRM driver most notably, but also out of tree drivers (for now) like the VPU or GPU drivers, are quite big consumers of large, contiguous memory buffers. However, the sunxi_defconfig doesn't enable CMA in order to mitigate that, which makes them almost unusable. Enable it to make sure it somewhat works. Cc: Signed-off-by: Maxime Ripard Signed-off-by: Arnd Bergmann arch/arm/configs/sunxi_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit aa5dd6fa6f5d4bdc82a67e952bba8ad2e98d77e2 Author: Aviad Yehezkel Date: Thu Jan 18 15:41:51 2018 +0200 xfrm: fix error flow in case of add state fails If add state fails in case of device offload, netdev refcount will be negative since gc task is attempting to dev_free this state. This is fixed by putting NULL in state dev field. Signed-off-by: Aviad Yehezkel Signed-off-by: Boris Pismeny Signed-off-by: Steffen Klassert net/xfrm/xfrm_device.c | 1 + 1 file changed, 1 insertion(+) commit 3214d01f139b7544e870fc0b7fcce8da13c1cb51 Author: Paul Mackerras Date: Mon Jan 15 16:06:47 2018 +1100 KVM: PPC: Book3S: Provide information about hardware/firmware CVE workarounds This adds a new ioctl, KVM_PPC_GET_CPU_CHAR, that gives userspace information about the underlying machine's level of vulnerability to the recently announced vulnerabilities CVE-2017-5715, CVE-2017-5753 and CVE-2017-5754, and whether the machine provides instructions to assist software to work around the vulnerabilities. The ioctl returns two u64 words describing characteristics of the CPU and required software behaviour respectively, plus two mask words which indicate which bits have been filled in by the kernel, for extensibility. The bit definitions are the same as for the new H_GET_CPU_CHARACTERISTICS hypercall. There is also a new capability, KVM_CAP_PPC_GET_CPU_CHAR, which indicates whether the new ioctl is available. Signed-off-by: Paul Mackerras Documentation/virtual/kvm/api.txt | 46 +++++++++++++ arch/powerpc/include/uapi/asm/kvm.h | 25 +++++++ arch/powerpc/kvm/powerpc.c | 131 ++++++++++++++++++++++++++++++++++++ include/uapi/linux/kvm.h | 3 + 4 files changed, 205 insertions(+) commit 04cef3eadcf0bf9783a985286cc5f48c5d33fd7a Merge: ee62249 4488496 Author: Dave Airlie Date: Fri Jan 19 12:40:07 2018 +1000 Merge tag 'drm-intel-fixes-2018-01-18' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes Display corruption regression bugfix with both a prep patch and a follow-up fix * tag 'drm-intel-fixes-2018-01-18' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915: Fix deadlock in i830_disable_pipe() drm/i915: Redo plane sanitation during readout drm/i915: Add .get_hw_state() method for planes commit a0dca10fce42ae82651edbe682b1c637a8ecd365 Author: Thomas Falcon Date: Thu Jan 18 19:29:48 2018 -0600 ibmvnic: Fix IPv6 packet descriptors Packet descriptor generation for IPv6 is broken. Properly set L3 and L4 protocol flags for IPv6 descriptors. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit f68979433deaa8a8a8b6396f944a0928a35713dc Author: Thomas Falcon Date: Thu Jan 18 19:05:01 2018 -0600 ibmvnic: Fix IP offload control buffer Set some missing fields in the IP control offload buffer. This buffer is used to enable checksum and TCP segmentation offload in the VNIC server. The buffer length field and the checksum offloading bits were not set properly, so fix that here. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 4 ++++ 1 file changed, 4 insertions(+) commit 69c4a65e4bb36efe94c79f64faab6bdb96c76ab3 Merge: 591ff9e d468984 Author: David S. Miller Date: Thu Jan 18 21:16:13 2018 -0500 Merge tag 'linux-can-fixes-for-4.15-20180118' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2018-01-18 ==================== this is a pull reqeust of two patches for net/master: The syzkaller project triggered two WARN_ONCE() in the af_can code from userspace and we decided to replace it by a pr_warn_once(). ==================== Signed-off-by: David S. Miller commit 591ff9ea51cec683e4cb378a3469228ba1d69010 Author: Wei Wang Date: Thu Jan 18 10:40:03 2018 -0800 ipv6: don't let tb6_root node share routes with other node After commit 4512c43eac7e, if we add a route to the subtree of tb6_root which does not have any route attached to it yet, the current code will let tb6_root and the node in the subtree share the same route. This could cause problem cause tb6_root has RTN_INFO flag marked and the tree repair and clean up code will not work properly. This commit makes sure tb6_root->leaf points back to null_entry instead of sharing route with other node. It fixes the following syzkaller reported issue: BUG: KASAN: use-after-free in ipv6_prefix_equal include/net/ipv6.h:540 [inline] BUG: KASAN: use-after-free in fib6_add_1+0x165f/0x1790 net/ipv6/ip6_fib.c:618 Read of size 8 at addr ffff8801bc043498 by task syz-executor5/19819 CPU: 1 PID: 19819 Comm: syz-executor5 Not tainted 4.15.0-rc7+ #186 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 ipv6_prefix_equal include/net/ipv6.h:540 [inline] fib6_add_1+0x165f/0x1790 net/ipv6/ip6_fib.c:618 fib6_add+0x5fa/0x1540 net/ipv6/ip6_fib.c:1214 __ip6_ins_rt+0x6c/0x90 net/ipv6/route.c:1003 ip6_route_add+0x141/0x190 net/ipv6/route.c:2790 ipv6_route_ioctl+0x4db/0x6b0 net/ipv6/route.c:3299 inet6_ioctl+0xef/0x1e0 net/ipv6/af_inet6.c:520 sock_do_ioctl+0x65/0xb0 net/socket.c:958 sock_ioctl+0x2c2/0x440 net/socket.c:1055 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 entry_SYSCALL_64_fastpath+0x23/0x9a RIP: 0033:0x452ac9 RSP: 002b:00007fd42b321c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000452ac9 RDX: 0000000020fd7000 RSI: 000000000000890b RDI: 0000000000000013 RBP: 000000000000049e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f4f70 R13: 00000000ffffffff R14: 00007fd42b3226d4 R15: 0000000000000000 Fixes: 4512c43eac7e ("ipv6: remove null_entry before adding default route") Signed-off-by: Wei Wang Acked-by: Eric Dumazet Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit ee62249d85a3cc2e5507f6b8b64669ac0acbdb88 Merge: 75f195f 2ffa64e Author: Dave Airlie Date: Fri Jan 19 12:12:31 2018 +1000 Merge branch 'linux-4.15' of git://github.com/skeggsb/linux into drm-fixes Thought I'd try my luck getting one more in: - Two fixes for Tegra (one is to common code, but our userspace doesn't hit it). - One for NV5x-class MCPs * 'linux-4.15' of git://github.com/skeggsb/linux: drm/nouveau/mmu/mcp77: fix regressions in stolen memory handling drm/nouveau/bar/gk20a: Avoid bar teardown during init drm/nouveau/drm/nouveau: Pass the proper arguments to nvif_object_map_handle() commit 128bb975dc3c25d00de04e503e2fe0a780d04459 Author: Alexey Kodanev Date: Thu Jan 18 20:51:12 2018 +0300 ip6_gre: init dev->mtu and dev->hard_header_len correctly Commit b05229f44228 ("gre6: Cleanup GREv6 transmit path, call common GRE functions") moved dev->mtu initialization from ip6gre_tunnel_setup() to ip6gre_tunnel_init(), as a result, the previously set values, before ndo_init(), are reset in the following cases: * rtnl_create_link() can update dev->mtu from IFLA_MTU parameter. * ip6gre_tnl_link_config() is invoked before ndo_init() in netlink and ioctl setup, so ndo_init() can reset MTU adjustments with the lower device MTU as well, dev->mtu and dev->hard_header_len. Not applicable for ip6gretap because it has one more call to ip6gre_tnl_link_config(tunnel, 1) in ip6gre_tap_init(). Fix the first case by updating dev->mtu with 'tb[IFLA_MTU]' parameter if a user sets it manually on a device creation, and fix the second one by moving ip6gre_tnl_link_config() call after register_netdevice(). Fixes: b05229f44228 ("gre6: Cleanup GREv6 transmit path, call common GRE functions") Fixes: db2ec95d1ba4 ("ip6_gre: Fix MTU setting") Signed-off-by: Alexey Kodanev Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit ed604c5da34d96ae289c67c46dedd7dfd9fa795e Author: Ido Schimmel Date: Thu Jan 18 15:42:10 2018 +0100 mlxsw: spectrum_router: Free LPM tree upon failure When a new LPM tree is created, we try to replace the trees in the existing virtual routers with it. If we fail, the tree needs to be freed. Currently, this does not happen in the unlikely case where we fail to bind the tree to the first virtual router, since its reference count never transitions from 1 to 0. Fix that by taking a reference before binding the tree. Fixes: fc922bb0dd94 ("mlxsw: spectrum_router: Use one LPM tree for all virtual routers") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 2ffa64eba94fc8cc23d431cbec7365f3f07ff0ae Author: Ben Skeggs Date: Fri Jan 19 10:34:56 2018 +1000 drm/nouveau/mmu/mcp77: fix regressions in stolen memory handling - Fixes addition of stolen memory base address to PTEs. - Removes support for compression. Signed-off-by: Ben Skeggs Tested-by: Pierre Moreau drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 4 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/mcp77.c | 41 ++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 10 +++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmmcp77.c | 45 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmnv50.c | 16 ++++---- 7 files changed, 109 insertions(+), 10 deletions(-) commit e062a01e6daa2555ed13cf3f4e8cd3a05bbe474c Author: Jon Hunter Date: Thu Jan 4 11:29:09 2018 +0000 drm/nouveau/bar/gk20a: Avoid bar teardown during init Commit bbb163e18960 ("drm/nouveau/bar: implement bar1 teardown") introduced add a teardown helper function for BAR1. During initialisation of the Nouveau, initially all the teardown helpers are called once, before calling their init counterparts. For gk20a, after the BAR1 teardown function is called, the device is hanging during the initialisation of the FB sub-device. At this point it is unclear why this is happening and this is still under investigation. However, this change is preventing Tegra124 devices from booting when Nouveau is enabled. To allow Tegra124 to boot, remove the teardown helper for gk20a. This is based upon a previous patch by Guillaume Tucker but limits the workaround to only gk20a GPUs. Fixes: bbb163e18960 ("drm/nouveau/bar: implement bar1 teardown") Reported-by: Guillaume Tucker Signed-off-by: Jon Hunter Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gk20a.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) commit b554b12addf939f826ec97c7c9ff0214a2801a0a Author: Thierry Reding Date: Fri Jan 19 07:24:12 2018 +1000 drm/nouveau/drm/nouveau: Pass the proper arguments to nvif_object_map_handle() This is obviously wrong in the current code. Make sure to record the correct size of the arguments and pass the actual arguments to the nvif_object_map_handle() function. Suggested-by: Ben Skeggs Signed-off-by: Thierry Reding Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_bo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d0c081b49137cd3200f2023c0875723be66e7ce5 Author: Eric Dumazet Date: Wed Jan 17 14:21:13 2018 -0800 flow_dissector: properly cap thoff field syzbot reported yet another crash [1] that is caused by insufficient validation of DODGY packets. Two bugs are happening here to trigger the crash. 1) Flow dissection leaves with incorrect thoff field. 2) skb_probe_transport_header() sets transport header to this invalid thoff, even if pointing after skb valid data. 3) qdisc_pkt_len_init() reads out-of-bound data because it trusts tcp_hdrlen(skb) Possible fixes : - Full flow dissector validation before injecting bad DODGY packets in the stack. This approach was attempted here : https://patchwork.ozlabs.org/patch/ 861874/ - Have more robust functions in the core. This might be needed anyway for stable versions. This patch fixes the flow dissection issue. [1] CPU: 1 PID: 3144 Comm: syzkaller271204 Not tainted 4.15.0-rc4-mm1+ #49 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:355 [inline] kasan_report+0x23b/0x360 mm/kasan/report.c:413 __asan_report_load2_noabort+0x14/0x20 mm/kasan/report.c:432 __tcp_hdrlen include/linux/tcp.h:35 [inline] tcp_hdrlen include/linux/tcp.h:40 [inline] qdisc_pkt_len_init net/core/dev.c:3160 [inline] __dev_queue_xmit+0x20d3/0x2200 net/core/dev.c:3465 dev_queue_xmit+0x17/0x20 net/core/dev.c:3554 packet_snd net/packet/af_packet.c:2943 [inline] packet_sendmsg+0x3ad5/0x60a0 net/packet/af_packet.c:2968 sock_sendmsg_nosec net/socket.c:628 [inline] sock_sendmsg+0xca/0x110 net/socket.c:638 sock_write_iter+0x31a/0x5d0 net/socket.c:907 call_write_iter include/linux/fs.h:1776 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x684/0x970 fs/read_write.c:482 vfs_write+0x189/0x510 fs/read_write.c:544 SYSC_write fs/read_write.c:589 [inline] SyS_write+0xef/0x220 fs/read_write.c:581 entry_SYSCALL_64_fastpath+0x1f/0x96 Fixes: 34fad54c2537 ("net: __skb_flow_dissect() must cap its return value") Fixes: a6e544b0a88b ("flow_dissector: Jump to exit code in __skb_flow_dissect") Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Reported-by: syzbot Acked-by: Jason Wang Signed-off-by: David S. Miller net/core/flow_dissector.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9d383fbb04c64623daf936f33ba03972f0a46311 Merge: b200bfd cc124d5 Author: David S. Miller Date: Thu Jan 18 16:23:10 2018 -0500 Merge tag 'wireless-drivers-for-davem-2018-01-17' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.15 One last set of fixes for regression submitted during the last few days. bcma & ssb * fix older build problems which (apparently) recently became more frequent in certain MIPS configurations brcmfmac * continue driver initialisation even if CLM blob (firmware) file is not found ==================== Signed-off-by: David S. Miller commit 1ebe1eaf2f02784921759992ae1fde1a9bec8fd0 Author: Steven Rostedt (VMware) Date: Thu Jan 18 15:53:10 2018 -0500 tracing: Fix converting enum's from the map in trace_event_eval_update() Since enums do not get converted by the TRACE_EVENT macro into their values, the event format displaces the enum name and not the value. This breaks tools like perf and trace-cmd that need to interpret the raw binary data. To solve this, an enum map was created to convert these enums into their actual numbers on boot up. This is done by TRACE_EVENTS() adding a TRACE_DEFINE_ENUM() macro. Some enums were not being converted. This was caused by an optization that had a bug in it. All calls get checked against this enum map to see if it should be converted or not, and it compares the call's system to the system that the enum map was created under. If they match, then they call is processed. To cut down on the number of iterations needed to find the maps with a matching system, since calls and maps are grouped by system, when a match is made, the index into the map array is saved, so that the next call, if it belongs to the same system as the previous call, could start right at that array index and not have to scan all the previous arrays. The problem was, the saved index was used as the variable to know if this is a call in a new system or not. If the index was zero, it was assumed that the call is in a new system and would keep incrementing the saved index until it found a matching system. The issue arises when the first matching system was at index zero. The next map, if it belonged to the same system, would then think it was the first match and increment the index to one. If the next call belong to the same system, it would begin its search of the maps off by one, and miss the first enum that should be converted. This left a single enum not converted properly. Also add a comment to describe exactly what that index was for. It took me a bit too long to figure out what I was thinking when debugging this issue. Link: http://lkml.kernel.org/r/717BE572-2070-4C1E-9902-9F2E0FEDA4F8@oracle.com Cc: stable@vger.kernel.org Fixes: 0c564a538aa93 ("tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values") Reported-by: Chuck Lever Teste-by: Chuck Lever Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit b200bfd6112a87283e58bcfcc4cb57a5517ae82f Author: Arnd Bergmann Date: Wed Jan 17 07:57:32 2018 -0800 fm10k: mark PM functions as __maybe_unused A cleanup of the PM code left an incorrect #ifdef in place, leading to a harmless build warning: drivers/net/ethernet/intel/fm10k/fm10k_pci.c:2502:12: error: 'fm10k_suspend' defined but not used [-Werror=unused-function] drivers/net/ethernet/intel/fm10k/fm10k_pci.c:2475:12: error: 'fm10k_resume' defined but not used [-Werror=unused-function] It's easier to use __maybe_unused attributes here, since you can't pick the wrong one. Fixes: 8249c47c6ba4 ("fm10k: use generic PM hooks instead of legacy PCIe power hooks") Signed-off-by: Arnd Bergmann Acked-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 0164e0d7e803af3ee1c63770978c728f8778ad01 Author: Steven Rostedt (VMware) Date: Thu Jan 18 15:42:09 2018 -0500 ring-buffer: Fix duplicate results in mapping context to bits in recursive lock In bringing back the context checks, the code checks first if its normal (non-interrupt) context, and then for NMI then IRQ then softirq. The final check is redundant. Since the if branch is only hit if the context is one of NMI, IRQ, or SOFTIRQ, if it's not NMI or IRQ there's no reason to check if it is SOFTIRQ. The current code returns the same result even if its not a SOFTIRQ. Which is confusing. pc & SOFTIRQ_OFFSET ? 2 : RB_CTX_SOFTIRQ Is redundant as RB_CTX_SOFTIRQ *is* 2! Fixes: a0e3a18f4baf ("ring-buffer: Bring back context level recursive checks") Signed-off-by: Steven Rostedt (VMware) kernel/trace/ring_buffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 18696edce11e010a1151a779490d6025b497e400 Author: James Hogan Date: Fri Nov 10 21:04:31 2017 +0000 MAINTAINERS: Add James as MIPS co-maintainer I've been taking on some co-maintainer duties already, so lets make it official in the MAINTAINERS file. Link: https://lkml.kernel.org/r/33db77a2-32e4-6b2c-d463-9d116ba55623@imgtec.com Link: https://lkml.kernel.org/r/20171207110549.GM27409@jhogan-linux.mipstec.com Signed-off-by: James Hogan Acked-by: Paul Burton Acked-by: Aaro Koskinen Acked-by: David Daney Acked-by: Florian Fainelli Acked-by: Matt Redfearn Cc: Ralf Baechle Cc: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18211/ MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit f35764e74f0e45e1d89ca9ed9c8299f5e746a4d1 Author: James Hogan Date: Mon Jan 15 20:54:35 2018 +0000 MIPS: Fix undefined reference to physical_memsize Since commit d41e6858ba58 ("MIPS: Kconfig: Set default MIPS system type as generic") switched the default platform to the "generic" platform, allmodconfig has been failing with the following linker error (among other errors): arch/mips/kernel/vpe-mt.o In function `vpe_run': (.text+0x59c): undefined reference to `physical_memsize' The Lantiq platform already worked around the same issue in commit 9050d50e2244 ("MIPS: lantiq: Set physical_memsize") by declaring physical_memsize with the initial value of 0 (on the assumption that the actual memory size will be hard-coded in the loaded VPE firmware), and the Malta platform already provided physical_memsize. Since all other platforms will fail to link with the VPE loader enabled, only allow Lantiq and Malta platforms to enable it, by way of a SYS_SUPPORTS_VPE_LOADER which is selected by those two platforms and which MIPS_VPE_LOADER depends on. SYS_SUPPORTS_MULTITHREADING is now a dependency of SYS_SUPPORTS_VPE_LOADER so that Kconfig emits a warning if SYS_SUPPORTS_VPE_LOADER is selected without SYS_SUPPORTS_MULTITHREADING. Fixes: d41e6858ba58 ("MIPS: Kconfig: Set default MIPS system type as generic") Signed-off-by: James Hogan Cc: Ralf Baechle Cc: John Crispin Cc: Hauke Mehrtens Cc: Paul Burton Cc: Matt Redfearn Cc: Guenter Roeck Cc: linux-mips@linux-mips.org Tested-by: Guenter Roeck Patchwork: https://patchwork.linux-mips.org/patch/18453/ arch/mips/Kconfig | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 5762d7d3eda25c03cc2d9d45227be3f5ab6bec9e Author: Johannes Berg Date: Tue Jan 16 23:20:22 2018 +0100 cfg80211: fix station info handling bugs Fix two places where the structure isn't initialized to zero, and thus can't be filled properly by the driver. Fixes: 4a4b8169501b ("cfg80211: Accept multiple RSSI thresholds for CQM") Fixes: 9930380f0bd8 ("cfg80211: implement IWRATE") Signed-off-by: Johannes Berg Signed-off-by: David S. Miller net/wireless/nl80211.c | 2 +- net/wireless/wext-compat.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit 17b11b76b87afe9f8be199d7a5f442497133e2b0 Author: Boris Brezillon Date: Thu Jan 18 15:58:21 2018 +0100 drm/vc4: Fix NULL pointer dereference in vc4_save_hang_state() When saving BOs in the hang state we skip one entry of the kernel_state->bo[] array, thus leaving it to NULL. This leads to a NULL pointer dereference when, later in this function, we iterate over all BOs to check their ->madv state. Fixes: ca26d28bbaa3 ("drm/vc4: improve throughput by pipelining binning and rendering jobs") Cc: Signed-off-by: Boris Brezillon Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20180118145821.22344-1-boris.brezillon@free-electrons.com drivers/gpu/drm/vc4/vc4_gem.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f61145f1a4bd7966aa0b15c5cd3950835b284f55 Author: Eric Anholt Date: Thu Dec 21 14:17:22 2017 -0800 drm/vc4: Flush the caches before the bin jobs, as well. If the frame samples from a render target that was just written, its cache flush during the binning step may have occurred before the previous frame's RCL was completed. Flush the texture caches again before starting each RCL job to make sure that the sampling of the previous RCL's output is correct. Fixes flickering in the top left of 3DMMES Taiji. Signed-off-by: Eric Anholt Fixes: ca26d28bbaa3 ("drm/vc4: improve throughput by pipelining binning and rendering jobs") Link: https://patchwork.freedesktop.org/patch/msgid/20171221221722.23809-1-eric@anholt.net Reviewed-by: Boris Brezillon drivers/gpu/drm/vc4/vc4_gem.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit cd443f1e91ca600a092e780e8250cd6a2954b763 Author: Xin Long Date: Thu Jan 18 14:48:03 2018 +0800 netlink: reset extack earlier in netlink_rcv_skb Move up the extack reset/initialization in netlink_rcv_skb, so that those 'goto ack' will not skip it. Otherwise, later on netlink_ack may use the uninitialized extack and cause kernel crash. Fixes: cbbdf8433a5f ("netlink: extack needs to be reset each time through loop") Reported-by: syzbot+03bee3680a37466775e7@syzkaller.appspotmail.com Signed-off-by: Xin Long Acked-by: David Ahern Signed-off-by: David S. Miller net/netlink/af_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55edde9fff1ae4114c893c572e641620c76c9c21 Author: Nick Desaulniers Date: Thu Jan 18 11:36:41 2018 -0800 Input: synaptics-rmi4 - prevent UAF reported by KASAN KASAN found a UAF due to dangling pointer. As the report below says, rmi_f11_attention() accesses drvdata->attn_data.data, which was freed in rmi_irq_fn. [ 311.424062] BUG: KASAN: use-after-free in rmi_f11_attention+0x526/0x5e0 [rmi_core] [ 311.424067] Read of size 27 at addr ffff88041fd610db by task irq/131-i2c_hid/1162 [ 311.424075] CPU: 0 PID: 1162 Comm: irq/131-i2c_hid Not tainted 4.15.0-rc8+ #2 [ 311.424076] Hardware name: Razer Blade Stealth/Razer, BIOS 6.05 01/26/2017 [ 311.424078] Call Trace: [ 311.424086] dump_stack+0xae/0x12d [ 311.424090] ? _atomic_dec_and_lock+0x103/0x103 [ 311.424094] ? show_regs_print_info+0xa/0xa [ 311.424099] ? input_handle_event+0x10b/0x810 [ 311.424104] print_address_description+0x65/0x229 [ 311.424108] kasan_report.cold.5+0xa7/0x281 [ 311.424117] rmi_f11_attention+0x526/0x5e0 [rmi_core] [ 311.424123] ? memcpy+0x1f/0x50 [ 311.424132] ? rmi_f11_attention+0x526/0x5e0 [rmi_core] [ 311.424143] ? rmi_f11_probe+0x1e20/0x1e20 [rmi_core] [ 311.424153] ? rmi_process_interrupt_requests+0x220/0x2a0 [rmi_core] [ 311.424163] ? rmi_irq_fn+0x22c/0x270 [rmi_core] [ 311.424173] ? rmi_process_interrupt_requests+0x2a0/0x2a0 [rmi_core] [ 311.424177] ? free_irq+0xa0/0xa0 [ 311.424180] ? irq_finalize_oneshot.part.39+0xeb/0x180 [ 311.424190] ? rmi_process_interrupt_requests+0x2a0/0x2a0 [rmi_core] [ 311.424193] ? irq_thread_fn+0x3d/0x80 [ 311.424197] ? irq_finalize_oneshot.part.39+0x180/0x180 [ 311.424200] ? irq_thread+0x21d/0x290 [ 311.424203] ? irq_thread_check_affinity+0x170/0x170 [ 311.424207] ? remove_wait_queue+0x150/0x150 [ 311.424212] ? kasan_unpoison_shadow+0x30/0x40 [ 311.424214] ? __init_waitqueue_head+0xa0/0xd0 [ 311.424218] ? task_non_contending.cold.55+0x18/0x18 [ 311.424221] ? irq_forced_thread_fn+0xa0/0xa0 [ 311.424226] ? irq_thread_check_affinity+0x170/0x170 [ 311.424230] ? kthread+0x19e/0x1c0 [ 311.424233] ? kthread_create_worker_on_cpu+0xc0/0xc0 [ 311.424237] ? ret_from_fork+0x32/0x40 [ 311.424244] Allocated by task 899: [ 311.424249] kasan_kmalloc+0xbf/0xe0 [ 311.424252] __kmalloc_track_caller+0xd9/0x1f0 [ 311.424255] kmemdup+0x17/0x40 [ 311.424264] rmi_set_attn_data+0xa4/0x1b0 [rmi_core] [ 311.424269] rmi_raw_event+0x10b/0x1f0 [hid_rmi] [ 311.424278] hid_input_report+0x1a8/0x2c0 [hid] [ 311.424283] i2c_hid_irq+0x146/0x1d0 [i2c_hid] [ 311.424286] irq_thread_fn+0x3d/0x80 [ 311.424288] irq_thread+0x21d/0x290 [ 311.424291] kthread+0x19e/0x1c0 [ 311.424293] ret_from_fork+0x32/0x40 [ 311.424296] Freed by task 1162: [ 311.424300] kasan_slab_free+0x71/0xc0 [ 311.424303] kfree+0x90/0x190 [ 311.424311] rmi_irq_fn+0x1b2/0x270 [rmi_core] [ 311.424319] rmi_irq_fn+0x257/0x270 [rmi_core] [ 311.424322] irq_thread_fn+0x3d/0x80 [ 311.424324] irq_thread+0x21d/0x290 [ 311.424327] kthread+0x19e/0x1c0 [ 311.424330] ret_from_fork+0x32/0x40 [ 311.424334] The buggy address belongs to the object at ffff88041fd610c0 which belongs to the cache kmalloc-64 of size 64 [ 311.424340] The buggy address is located 27 bytes inside of 64-byte region [ffff88041fd610c0, ffff88041fd61100) [ 311.424344] The buggy address belongs to the page: [ 311.424348] page:ffffea00107f5840 count:1 mapcount:0 mapping: (null) index:0x0 [ 311.424353] flags: 0x17ffffc0000100(slab) [ 311.424358] raw: 0017ffffc0000100 0000000000000000 0000000000000000 00000001802a002a [ 311.424363] raw: dead000000000100 dead000000000200 ffff8804228036c0 0000000000000000 [ 311.424366] page dumped because: kasan: bad access detected [ 311.424369] Memory state around the buggy address: [ 311.424373] ffff88041fd60f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 311.424377] ffff88041fd61000: fb fb fb fb fb fb fb fb fc fc fc fc fb fb fb fb [ 311.424381] >ffff88041fd61080: fb fb fb fb fc fc fc fc fb fb fb fb fb fb fb fb [ 311.424384] ^ [ 311.424387] ffff88041fd61100: fc fc fc fc fb fb fb fb fb fb fb fb fc fc fc fc [ 311.424391] ffff88041fd61180: fb fb fb fb fb fb fb fb fc fc fc fc fb fb fb fb Cc: stable@vger.kernel.org Signed-off-by: Nick Desaulniers Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_driver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dda3e15231b35840fe6f0973f803cc70ddb86281 Merge: cdbe3bf 091f024 Author: Linus Torvalds Date: Thu Jan 18 10:57:59 2018 -0800 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "These are the ARM BPF fixes as discussed earlier this week" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: net: bpf: clarify tail_call index ARM: net: bpf: fix LDX instructions ARM: net: bpf: fix register saving ARM: net: bpf: correct stack layout documentation ARM: net: bpf: move stack documentation ARM: net: bpf: fix stack alignment ARM: net: bpf: fix tail call jumps ARM: net: bpf: avoid 'bx' instruction on non-Thumb capable CPUs commit cdbe3bf418c1d25a4dca046bafbe846b841699aa Merge: 79683f8 b0f2853 Author: Linus Torvalds Date: Thu Jan 18 10:54:52 2018 -0800 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull two NVMe fixes from Jens Axboe: "Two important fixes for the sgl support for nvme that is new in this release" * 'for-linus' of git://git.kernel.dk/linux-block: nvme-pci: take sglist coalescing in dma_map_sg into account nvme-pci: check segement valid for SGL use commit 79683f80e4f07dba13cc08d0ebcf5c7b0aa1bf68 Merge: 0230803 499ed50 Author: Linus Torvalds Date: Thu Jan 18 10:49:26 2018 -0800 Merge tag 'mmc-v4.15-rc2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fix from Ulf Hansson: "sdhci-esdhc-imx: Fixup clock to make i.MX53 Loco (IMX53QSB) boot again" * tag 'mmc-v4.15-rc2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-esdhc-imx: Fix i.MX53 eSDHCv3 clock commit 023080317d2b8a2bee52780d0060d12e172cfb63 Merge: 1d966eb 07c7b6a Author: Linus Torvalds Date: Thu Jan 18 09:50:24 2018 -0800 Merge tag 'gpio-v4.15-5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fix from Linus Walleij: "This is the (hopefully) last GPIO fix for v4.15, fixing the bit fiddling in the MMIO GPIO driver. Again the especially endowed screwer-upper who has been open coding bit fiddling is yours truly" * tag 'gpio-v4.15-5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: mmio: Also read bits that are zero commit 7155f8f391576f133ed26c8d6bb8c7f03ceb404a Merge: ad9294d 6f16101 Author: David S. Miller Date: Thu Jan 18 09:17:04 2018 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-01-18 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix a divide by zero due to wrong if (src_reg == 0) check in 64-bit mode. Properly handle this in interpreter and mask it also generically in verifier to guard against similar checks in JITs, from Eric and Alexei. 2) Fix a bug in arm64 JIT when tail calls are involved and progs have different stack sizes, from Daniel. 3) Reject stores into BPF context that are not expected BPF_STX | BPF_MEM variant, from Daniel. 4) Mark dst reg as unknown on {s,u}bounds adjustments when the src reg has derived bounds from dead branches, from Daniel. ==================== Signed-off-by: David S. Miller commit f23d74f6c66c3697e032550eeef3f640391a3a7d Author: Tom Lendacky Date: Wed Jan 17 17:41:41 2018 -0600 x86/mm: Rework wbinvd, hlt operation in stop_this_cpu() Some issues have been reported with the for loop in stop_this_cpu() that issues the 'wbinvd; hlt' sequence. Reverting this sequence to halt() has been shown to resolve the issue. However, the wbinvd is needed when running with SME. The reason for the wbinvd is to prevent cache flush races between encrypted and non-encrypted entries that have the same physical address. This can occur when kexec'ing from memory encryption active to inactive or vice-versa. The important thing is to not have outside of kernel text memory references (such as stack usage), so the usage of the native_*() functions is needed since these expand as inline asm sequences. So instead of reverting the change, rework the sequence. Move the wbinvd instruction outside of the for loop as native_wbinvd() and make its execution conditional on X86_FEATURE_SME. In the for loop, change the asm 'wbinvd; hlt' sequence back to a halt sequence but use the native_halt() call. Fixes: bba4ed011a52 ("x86/mm, kexec: Allow kexec to be used with SME") Reported-by: Dave Young Signed-off-by: Tom Lendacky Signed-off-by: Thomas Gleixner Tested-by: Dave Young Cc: Juergen Gross Cc: Tony Luck Cc: Yu Chen Cc: Baoquan He Cc: Linus Torvalds Cc: kexec@lists.infradead.org Cc: ebiederm@redhat.com Cc: Borislav Petkov Cc: Rui Zhang Cc: Arjan van de Ven Cc: Boris Ostrovsky Cc: Dan Williams Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180117234141.21184.44067.stgit@tlendack-t1.amdoffice.net arch/x86/kernel/process.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit a0c9259dc4e1923a98356967ce8b732da1979df8 Author: Thomas Gleixner Date: Wed Jan 17 16:01:47 2018 +0100 irq/matrix: Spread interrupts on allocation Keith reported an issue with vector space exhaustion on a server machine which is caused by the i40e driver allocating 168 MSI interrupts when the driver is initialized, even when most of these interrupts are not used at all. The x86 vector allocation code tries to avoid the immediate allocation with the reservation mode, but the card uses MSI and does not support MSI entry masking, which prevents reservation mode and requires immediate vector allocation. The matrix allocator is a bit naive and prefers the first CPU in the cpumask which describes the possible target CPUs for an allocation. That results in allocating all 168 vectors on CPU0 which later causes vector space exhaustion when the NVMe driver tries to allocate managed interrupts on each CPU for the per CPU queues. Avoid this by finding the CPU which has the lowest vector allocation count to spread out the non managed interrupt accross the possible target CPUs. Fixes: 2f75d9e1c905 ("genirq: Implement bitmap matrix allocator") Reported-by: Keith Busch Signed-off-by: Thomas Gleixner Tested-by: Keith Busch Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801171557330.1777@nanos kernel/irq/matrix.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit cc01572e2fb080e279ca625f239aca61f435ebf3 Author: Yossi Kuperman Date: Wed Jan 17 15:52:41 2018 +0200 xfrm: Add SA to hardware at the end of xfrm_state_construct() Current code configures the hardware with a new SA before the state has been fully initialized. During this time interval, an incoming ESP packet can cause a crash due to a NULL dereference. More specifically, xfrm_input() considers the packet as valid, and yet, anti-replay mechanism is not initialized. Move hardware configuration to the end of xfrm_state_construct(), and mark the state as valid once the SA is fully initialized. Fixes: d77e38e612a0 ("xfrm: Add an IPsec hardware offloading API") Signed-off-by: Aviad Yehezkel Signed-off-by: Aviv Heller Signed-off-by: Yossi Kuperman Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 10 +++++++--- net/xfrm/xfrm_user.c | 18 +++++++++++------- 2 files changed, 18 insertions(+), 10 deletions(-) commit d4689846881d160a4d12a514e991a740bcb5d65a Author: Marc Kleine-Budde Date: Tue Jan 16 19:30:14 2018 +0100 can: af_can: canfd_rcv(): replace WARN_ONCE by pr_warn_once If an invalid CANFD frame is received, from a driver or from a tun interface, a Kernel warning is generated. This patch replaces the WARN_ONCE by a simple pr_warn_once, so that a kernel, bootet with panic_on_warn, does not panic. A printk seems to be more appropriate here. Reported-by: syzbot+e3b775f40babeff6e68b@syzkaller.appspotmail.com Suggested-by: Dmitry Vyukov Acked-by: Oliver Hartkopp Cc: linux-stable Signed-off-by: Marc Kleine-Budde net/can/af_can.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 8cb68751c115d176ec851ca56ecfbb411568c9e8 Author: Marc Kleine-Budde Date: Tue Jan 16 19:30:14 2018 +0100 can: af_can: can_rcv(): replace WARN_ONCE by pr_warn_once If an invalid CAN frame is received, from a driver or from a tun interface, a Kernel warning is generated. This patch replaces the WARN_ONCE by a simple pr_warn_once, so that a kernel, bootet with panic_on_warn, does not panic. A printk seems to be more appropriate here. Reported-by: syzbot+4386709c0c1284dca827@syzkaller.appspotmail.com Suggested-by: Dmitry Vyukov Acked-by: Oliver Hartkopp Cc: linux-stable Signed-off-by: Marc Kleine-Budde net/can/af_can.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 75f195f46f27a2524b249b95e6f241cd13c7e549 Merge: 894219d 3b9c57c Author: Dave Airlie Date: Thu Jan 18 13:30:22 2018 +1000 Merge tag 'drm-misc-fixes-2018-01-17' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Final 4.15 drm-misc pull: Just 3 sun4i patches to fix clock computation/checks. * tag 'drm-misc-fixes-2018-01-17' of git://anongit.freedesktop.org/drm/drm-misc: drm/sun4i: hdmi: Add missing rate halving check in sun4i_tmds_determine_rate drm/sun4i: hdmi: Fix incorrect assignment in sun4i_tmds_determine_rate drm/sun4i: hdmi: Check for unset best_parent in sun4i_tmds_determine_rate commit 894219d7d2c37d17aad67df9a97b9a08a1426507 Merge: a8750dd 8a510a5 Author: Dave Airlie Date: Thu Jan 18 13:29:24 2018 +1000 Merge branch 'vmwgfx-fixes-4.15' of git://people.freedesktop.org/~thomash/linux into drm-fixes Last minute fixes for vmwgfx. One fix for a drm helper warning introduced in 4.15 One important fix for a longer standing memory corruption issue on older hardware versions. * 'vmwgfx-fixes-4.15' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: fix memory corruption with legacy/sou connectors drm/vmwgfx: Fix a boot time warning commit 6f16101e6a8b4324c36e58a29d9e0dbb287cdedb Author: Daniel Borkmann Date: Thu Jan 18 01:15:21 2018 +0100 bpf: mark dst unknown on inconsistent {s, u}bounds adjustments syzkaller generated a BPF proglet and triggered a warning with the following: 0: (b7) r0 = 0 1: (d5) if r0 s<= 0x0 goto pc+0 R0=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 2: (1f) r0 -= r1 R0=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 verifier internal error: known but bad sbounds What happens is that in the first insn, r0's min/max value are both 0 due to the immediate assignment, later in the jsle test the bounds are updated for the min value in the false path, meaning, they yield smin_val = 1, smax_val = 0, and when ctx pointer is subtracted from r0, verifier bails out with the internal error and throwing a WARN since smin_val != smax_val for the known constant. For min_val > max_val scenario it means that reg_set_min_max() and reg_set_min_max_inv() (which both refine existing bounds) demonstrated that such branch cannot be taken at runtime. In above scenario for the case where it will be taken, the existing [0, 0] bounds are kept intact. Meaning, the rejection is not due to a verifier internal error, and therefore the WARN() is not necessary either. We could just reject such cases in adjust_{ptr,scalar}_min_max_vals() when either known scalars have smin_val != smax_val or umin_val != umax_val or any scalar reg with bounds smin_val > smax_val or umin_val > umax_val. However, there may be a small risk of breakage of buggy programs, so handle this more gracefully and in adjust_{ptr,scalar}_min_max_vals() just taint the dst reg as unknown scalar when we see ops with such kind of src reg. Reported-by: syzbot+6d362cadd45dc0a12ba4@syzkaller.appspotmail.com Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 27 +++--- tools/testing/selftests/bpf/test_verifier.c | 123 +++++++++++++++++++++++++++- 2 files changed, 138 insertions(+), 12 deletions(-) commit ad9294dbc227cbc8e173b3b963e7dd9af5314f77 Author: Daniel Borkmann Date: Wed Jan 17 22:36:49 2018 +0100 bpf: fix cls_bpf on filter replace Running the following sequence is currently broken: # tc qdisc add dev foo clsact # tc filter replace dev foo ingress prio 1 handle 1 bpf da obj bar.o # tc filter replace dev foo ingress prio 1 handle 1 bpf da obj bar.o RTNETLINK answers: Invalid argument The normal expectation on kernel side is that the second command succeeds replacing the existing program. However, what happens is in cls_bpf_change(), we bail out with err in the second run in cls_bpf_offload(). The EINVAL comes directly in cls_bpf_offload() when comparing prog vs oldprog's gen_flags. In case of above replace the new prog's gen_flags are 0, but the old ones are 8, which means TCA_CLS_FLAGS_NOT_IN_HW is set (e.g. drivers not having cls_bpf offload). Fix 102740bd9436 ("cls_bpf: fix offload assumptions after callback conversion") in the following way: gen_flags from user space passed down via netlink cannot include status flags like TCA_CLS_FLAGS_IN_HW or TCA_CLS_FLAGS_NOT_IN_HW as opposed to oldprog that we previously loaded. Therefore, it doesn't make any sense to include them in the gen_flags comparison with the new prog before we even attempt to offload. Thus, lets fix this before 4.15 goes out. Fixes: 102740bd9436 ("cls_bpf: fix offload assumptions after callback conversion") Signed-off-by: Daniel Borkmann Acked-by: Jakub Kicinski Signed-off-by: David S. Miller net/sched/cls_bpf.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 5a717843177c96ca3fe4565187de395afdb28092 Author: Rex Chang Date: Tue Jan 16 15:16:01 2018 -0500 Net: ethernet: ti: netcp: Fix inbound ping crash if MTU size is greater than 1500 In the receive queue for 4096 bytes fragments, the page address set in the SW data0 field of the descriptor is not the one we got when doing the reassembly in receive. The page structure was retrieved from the wrong descriptor into SW data0 which is then causing a page fault when UDP checksum is accessing data above 1500. Signed-off-by: Rex Chang Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6db959c82eb039a151d95a0f8b7dea643657327a Author: Sabrina Dubroca Date: Tue Jan 16 16:04:28 2018 +0100 tls: reset crypto_info when do_tls_setsockopt_tx fails The current code copies directly from userspace to ctx->crypto_send, but doesn't always reinitialize it to 0 on failure. This causes any subsequent attempt to use this setsockopt to fail because of the TLS_CRYPTO_INFO_READY check, eventhough crypto_info is not actually ready. This should result in a correctly set up socket after the 3rd call, but currently it does not: size_t s = sizeof(struct tls12_crypto_info_aes_gcm_128); struct tls12_crypto_info_aes_gcm_128 crypto_good = { .info.version = TLS_1_2_VERSION, .info.cipher_type = TLS_CIPHER_AES_GCM_128, }; struct tls12_crypto_info_aes_gcm_128 crypto_bad_type = crypto_good; crypto_bad_type.info.cipher_type = 42; setsockopt(sock, SOL_TLS, TLS_TX, &crypto_bad_type, s); setsockopt(sock, SOL_TLS, TLS_TX, &crypto_good, s - 1); setsockopt(sock, SOL_TLS, TLS_TX, &crypto_good, s); Fixes: 3c4d7559159b ("tls: kernel TLS support") Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller net/tls/tls_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 877d17c79b66466942a836403773276e34fe3614 Author: Sabrina Dubroca Date: Tue Jan 16 16:04:27 2018 +0100 tls: return -EBUSY if crypto_info is already set do_tls_setsockopt_tx returns 0 without doing anything when crypto_info is already set. Silent failure is confusing for users. Fixes: 3c4d7559159b ("tls: kernel TLS support") Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller net/tls/tls_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cf6d43ef66f416282121f436ce1bee9a25199d52 Author: Sabrina Dubroca Date: Tue Jan 16 16:04:26 2018 +0100 tls: fix sw_ctx leak During setsockopt(SOL_TCP, TLS_TX), if initialization of the software context fails in tls_set_sw_offload(), we leak sw_ctx. We also don't reassign ctx->priv_ctx to NULL, so we can't even do another attempt to set it up on the same socket, as it will fail with -EEXIST. Fixes: 3c4d7559159b ('tls: kernel TLS support') Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller net/tls/tls_sw.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 6ab6dd9e7f18dea51a6d65c0c28f0fd74332bfe6 Merge: d91c3e1 d8a243a Author: David S. Miller Date: Wed Jan 17 16:09:22 2018 -0500 Merge tag 'linux-can-fixes-for-4.15-20180116' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2018-01-16 this is a pull reqeust of a single patch for net/master: This patch by Stephane Grosjean fixes a potential bug in the packet fragmentation in the peak USB driver. ==================== Signed-off-by: David S. Miller commit b0f2853b56a2acaff19cca2c6a608f8ec268d21a Author: Christoph Hellwig Date: Wed Jan 17 22:04:38 2018 +0100 nvme-pci: take sglist coalescing in dma_map_sg into account Some iommu implementations can merge physically and/or virtually contiguous segments inside sg_map_dma. The NVMe SGL support does not take this into account and will warn because of falling off a loop. Pass the number of mapped segments to nvme_pci_setup_sgls so that the SGL setup can take the number of mapped segments into account. Reported-by: Fangjian (Turing) Fixes: a7a7cbe3 ("nvme-pci: add SGL support") Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 20469a37aed12a886d0deda5a07c04037923144a Author: Keith Busch Date: Wed Jan 17 22:04:37 2018 +0100 nvme-pci: check segement valid for SGL use The driver needs to verify there is a payload with a command before seeing if it should use SGLs to map it. Fixes: 955b1b5a00ba ("nvme-pci: move use_sgl initialization to nvme_init_iod()") Reported-by: Paul Menzel Reviewed-by: Paul Menzel Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d91c3e17f75f218022140dee18cf515292184a8f Author: Ilya Lesokhin Date: Tue Jan 16 15:31:52 2018 +0200 net/tls: Only attach to sockets in ESTABLISHED state Calling accept on a TCP socket with a TLS ulp attached results in two sockets that share the same ulp context. The ulp context is freed while a socket is destroyed, so after one of the sockets is released, the second second will trigger a use after free when it tries to access the ulp context attached to it. We restrict the TLS ulp to sockets in ESTABLISHED state to prevent the scenario above. Fixes: 3c4d7559159b ("tls: kernel TLS support") Reported-by: syzbot+904e7cd6c5c741609228@syzkaller.appspotmail.com Signed-off-by: Ilya Lesokhin Signed-off-by: David S. Miller net/tls/tls_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f8b39039cbf2a15f2b8c9f081e1cbd5dee00aaf5 Author: Christophe Leroy Date: Tue Jan 16 10:33:05 2018 +0100 net: fs_enet: do not call phy_stop() in interrupts In case of TX timeout, fs_timeout() calls phy_stop(), which triggers the following BUG_ON() as we are in interrupt. [92708.199889] kernel BUG at drivers/net/phy/mdio_bus.c:482! [92708.204985] Oops: Exception in kernel mode, sig: 5 [#1] [92708.210119] PREEMPT [92708.212107] CMPC885 [92708.214216] CPU: 0 PID: 3 Comm: ksoftirqd/0 Tainted: G W 4.9.61 #39 [92708.223227] task: c60f0a40 task.stack: c6104000 [92708.227697] NIP: c02a84bc LR: c02a947c CTR: c02a93d8 [92708.232614] REGS: c6105c70 TRAP: 0700 Tainted: G W (4.9.61) [92708.241193] MSR: 00021032 [92708.244818] CR: 24000822 XER: 20000000 [92708.248767] GPR00: c02a947c c6105d20 c60f0a40 c62b4c00 00000005 0000001f c069aad8 0001a688 GPR08: 00000007 00000100 c02a93d8 00000000 000005fc 00000000 c6213240 c06338e4 GPR16: 00000001 c06330d4 c0633094 00000000 c0680000 c6104000 c6104000 00000000 GPR24: 00000200 00000000 ffffffff 00000004 00000078 00009032 00000000 c62b4c00 NIP [c02a84bc] mdiobus_read+0x20/0x74 [92708.281517] LR [c02a947c] kszphy_config_intr+0xa4/0xc4 [92708.286547] Call Trace: [92708.288980] [c6105d20] [c6104000] 0xc6104000 (unreliable) [92708.294339] [c6105d40] [c02a947c] kszphy_config_intr+0xa4/0xc4 [92708.300098] [c6105d50] [c02a5330] phy_stop+0x60/0x9c [92708.305007] [c6105d60] [c02c84d0] fs_timeout+0xdc/0x110 [92708.310197] [c6105d80] [c035cd48] dev_watchdog+0x268/0x2a0 [92708.315593] [c6105db0] [c0060288] call_timer_fn+0x34/0x17c [92708.321014] [c6105dd0] [c00605f0] run_timer_softirq+0x21c/0x2e4 [92708.326887] [c6105e50] [c001e19c] __do_softirq+0xf4/0x2f4 [92708.332207] [c6105eb0] [c001e3c8] run_ksoftirqd+0x2c/0x40 [92708.337560] [c6105ec0] [c003b420] smpboot_thread_fn+0x1f0/0x258 [92708.343405] [c6105ef0] [c003745c] kthread+0xbc/0xd0 [92708.348217] [c6105f40] [c000c400] ret_from_kernel_thread+0x5c/0x64 [92708.354275] Instruction dump: [92708.357207] 7c0803a6 bbc10018 38210020 4e800020 7c0802a6 9421ffe0 54290024 bfc10018 [92708.364865] 90010024 7c7f1b78 81290008 552902ee <0f090000> 3bc3002c 7fc3f378 90810008 [92708.372711] ---[ end trace 42b05441616fafd7 ]--- This patch moves fs_timeout() actions into an async worker. Fixes: commit 48257c4f168e5 ("Add fs_enet ethernet network driver, for several embedded platforms") Signed-off-by: Christophe Leroy Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 16 +++++++++++++--- drivers/net/ethernet/freescale/fs_enet/fs_enet.h | 1 + 2 files changed, 14 insertions(+), 3 deletions(-) commit 0b1655143df00ac5349f27b765b2ed13a3ac40ca Author: Kai-Heng Feng Date: Tue Jan 16 16:46:27 2018 +0800 r8152: disable RX aggregation on Dell TB16 dock r8153 on Dell TB15/16 dock corrupts rx packets. This change is suggested by Realtek. They guess that the XHCI controller doesn't have enough buffer, and their guesswork is correct, once the RX aggregation gets disabled, the issue is gone. ASMedia is currently working on a real sulotion for this issue. Dell and ODM confirm the bcdDevice and iSerialNumber is unique for TB16. Note that TB15 has different bcdDevice and iSerialNumber, which are not unique values. If you still have TB15, please contact Dell to replace it with TB16. BugLink: https://bugs.launchpad.net/bugs/1729674 Cc: Mario Limonciello Signed-off-by: Kai-Heng Feng Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 1d966eb4d6326a2521073174e9710713e9846e8b Merge: 9a4ba2a 45d55e7 Author: Linus Torvalds Date: Wed Jan 17 12:30:06 2018 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc fixes: - A rather involved set of memory hardware encryption fixes to support the early loading of microcode files via the initrd. These are larger than what we normally take at such a late -rc stage, but there are two mitigating factors: 1) much of the changes are limited to the SME code itself 2) being able to early load microcode has increased importance in the post-Meltdown/Spectre era. - An IRQ vector allocator fix - An Intel RDT driver use-after-free fix - An APIC driver bug fix/revert to make certain older systems boot again - A pkeys ABI fix - TSC calibration fixes - A kdump fix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/apic/vector: Fix off by one in error path x86/intel_rdt/cqm: Prevent use after free x86/mm: Encrypt the initrd earlier for BSP microcode update x86/mm: Prepare sme_encrypt_kernel() for PAGE aligned encryption x86/mm: Centralize PMD flags in sme_encrypt_kernel() x86/mm: Use a struct to reduce parameters for SME PGD mapping x86/mm: Clean up register saving in the __enc_copy() assembly code x86/idt: Mark IDT tables __initconst Revert "x86/apic: Remove init_bsp_APIC()" x86/mm/pkeys: Fix fill_sig_info_pkey x86/tsc: Print tsc_khz, when it differs from cpu_khz x86/tsc: Fix erroneous TSC rate on Skylake Xeon x86/tsc: Future-proof native_calibrate_tsc() kdump: Write the correct address of mem_section into vmcoreinfo commit 9a4ba2ab08a2cefd8fa2b6829219093fbed4df75 Merge: 7dfda84 c96f547 Author: Linus Torvalds Date: Wed Jan 17 12:28:22 2018 -0800 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "A delayacct statistics correctness fix" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: delayacct: Account blkio completion on the correct task commit 7dfda84d1699c2ae2fbd82f3ce611af2ed7b18b3 Merge: b8c2259 1289e0e Author: Linus Torvalds Date: Wed Jan 17 12:26:37 2018 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 perf fix from Ingo Molnar: "An Intel RAPL events fix" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/rapl: Fix Haswell and Broadwell server RAPL event commit b8c22594b1c4c830c391dbf2e07afc14aca10460 Merge: 88dc7fc fbe0e83 Author: Linus Torvalds Date: Wed Jan 17 12:24:42 2018 -0800 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Ingo Molnar: "Two futex fixes: a input parameters robustness fix, and futex race fixes" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Prevent overflow by strengthen input validation futex: Avoid violating the 10th rule of futex commit 4df0bfc79904b7169dc77dcce44598b1545721f9 Author: Cong Wang Date: Mon Jan 15 11:37:29 2018 -0800 tun: fix a memory leak for tfile->tx_array tfile->tun could be detached before we close the tun fd, via tun_detach_all(), so it should not be used to check for tfile->tx_array. As Jason suggested, we probably have to clean it up unconditionally both in __tun_deatch() and tun_detach_all(), but this requires to check if it is initialized or not. Currently skb_array_cleanup() doesn't have such a check, so I check it in the caller and introduce a helper function, it is a bit ugly but we can always improve it in net-next. Reported-by: Dmitry Vyukov Fixes: 1576d9860599 ("tun: switch to use skb array for tx") Cc: Jason Wang Signed-off-by: Cong Wang Signed-off-by: David S. Miller drivers/net/tun.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 88dc7fca18001fd883e5ace775afa316b68c8f2c Merge: dd43f34 6cfb521 Author: Linus Torvalds Date: Wed Jan 17 11:54:56 2018 -0800 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 pti bits and fixes from Thomas Gleixner: "This last update contains: - An objtool fix to prevent a segfault with the gold linker by changing the invocation order. That's not just for gold, it's a general robustness improvement. - An improved error message for objtool which spares tearing hairs. - Make KASAN fail loudly if there is not enough memory instead of oopsing at some random place later - RSB fill on context switch to prevent RSB underflow and speculation through other units. - Make the retpoline/RSB functionality work reliably for both Intel and AMD - Add retpoline to the module version magic so mismatch can be detected - A small (non-fix) update for cpufeatures which prevents cpu feature clashing for the upcoming extra mitigation bits to ease backporting" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: module: Add retpoline tag to VERMAGIC x86/cpufeature: Move processor tracing out of scattered features objtool: Improve error message for bad file argument objtool: Fix seg fault with gold linker x86/retpoline: Add LFENCE to the retpoline/RSB filling RSB macros x86/retpoline: Fill RSB on context switch for affected CPUs x86/kasan: Panic if there is not enough memory to boot commit dd43f3465d138439db451a5e7ddccefc5af2fa85 Merge: 8cbab92 ed4bbf7 Author: Linus Torvalds Date: Wed Jan 17 11:43:42 2018 -0800 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 one-liner fix which prevents deferrable timers becoming stale when the system does not switch into NOHZ mode" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timers: Unconditionally check deferrable base commit 091f02483df7b56615b524491f404e574c5e0668 Author: Russell King Date: Sat Jan 13 12:11:26 2018 +0000 ARM: net: bpf: clarify tail_call index As per 90caccdd8cc0 ("bpf: fix bpf_tail_call() x64 JIT"), the index used for array lookup is defined to be 32-bit wide. Update a misleading comment that suggests it is 64-bit wide. Fixes: 39c13c204bb1 ("arm: eBPF JIT compiler") Signed-off-by: Russell King arch/arm/net/bpf_jit_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec19e02b343db991d2d1610c409efefebf4e2ca9 Author: Russell King Date: Sat Jan 13 21:06:16 2018 +0000 ARM: net: bpf: fix LDX instructions When the source and destination register are identical, our JIT does not generate correct code, which leads to kernel oopses. Fix this by (a) generating more efficient code, and (b) making use of the temporary earlier if we will overwrite the address register. Fixes: 39c13c204bb1 ("arm: eBPF JIT compiler") Signed-off-by: Russell King arch/arm/net/bpf_jit_32.c | 61 +++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 28 deletions(-) commit 02088d9b392f605c892894b46aa8c83e3abd0115 Author: Russell King Date: Sat Jan 13 22:38:18 2018 +0000 ARM: net: bpf: fix register saving When an eBPF program tail-calls another eBPF program, it enters it after the prologue to avoid having complex stack manipulations. This can lead to kernel oopses, and similar. Resolve this by always using a fixed stack layout, a CPU register frame pointer, and using this when reloading registers before returning. Fixes: 39c13c204bb1 ("arm: eBPF JIT compiler") Signed-off-by: Russell King arch/arm/net/bpf_jit_32.c | 80 +++++++++++++---------------------------------- 1 file changed, 22 insertions(+), 58 deletions(-) commit 0005e55a79cfda88199e41a406a829c88d708c67 Author: Russell King Date: Sat Jan 13 22:51:27 2018 +0000 ARM: net: bpf: correct stack layout documentation The stack layout documentation incorrectly suggests that the BPF JIT scratch space starts immediately below BPF_FP. This is not correct, so let's fix the documentation to reflect reality. Signed-off-by: Russell King arch/arm/net/bpf_jit_32.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) commit 70ec3a6c2c11e4b0e107a65de943a082f9aff351 Author: Russell King Date: Sat Jan 13 21:26:14 2018 +0000 ARM: net: bpf: move stack documentation Move the stack documentation towards the top of the file, where it's relevant for things like the register layout. Signed-off-by: Russell King arch/arm/net/bpf_jit_32.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit d1220efd23484c72c82d5471f05daeb35b5d1916 Author: Russell King Date: Sat Jan 13 16:10:07 2018 +0000 ARM: net: bpf: fix stack alignment As per 2dede2d8e925 ("ARM EABI: stack pointer must be 64-bit aligned after a CPU exception") the stack should be aligned to a 64-bit boundary on EABI systems. Ensure that the eBPF JIT appropraitely aligns the stack. Fixes: 39c13c204bb1 ("arm: eBPF JIT compiler") Signed-off-by: Russell King arch/arm/net/bpf_jit_32.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit f4483f2cc1fdc03488c8a1452e545545ae5bda93 Author: Russell King Date: Sat Jan 13 11:39:54 2018 +0000 ARM: net: bpf: fix tail call jumps When a tail call fails, it is documented that the tail call should continue execution at the following instruction. An example tail call sequence is: 12: (85) call bpf_tail_call#12 13: (b7) r0 = 0 14: (95) exit The ARM assembler for the tail call in this case ends up branching to instruction 14 instead of instruction 13, resulting in the BPF filter returning a non-zero value: 178: ldr r8, [sp, #588] ; insn 12 17c: ldr r6, [r8, r6] 180: ldr r8, [sp, #580] 184: cmp r8, r6 188: bcs 0x1e8 18c: ldr r6, [sp, #524] 190: ldr r7, [sp, #528] 194: cmp r7, #0 198: cmpeq r6, #32 19c: bhi 0x1e8 1a0: adds r6, r6, #1 1a4: adc r7, r7, #0 1a8: str r6, [sp, #524] 1ac: str r7, [sp, #528] 1b0: mov r6, #104 1b4: ldr r8, [sp, #588] 1b8: add r6, r8, r6 1bc: ldr r8, [sp, #580] 1c0: lsl r7, r8, #2 1c4: ldr r6, [r6, r7] 1c8: cmp r6, #0 1cc: beq 0x1e8 1d0: mov r8, #32 1d4: ldr r6, [r6, r8] 1d8: add r6, r6, #44 1dc: bx r6 1e0: mov r0, #0 ; insn 13 1e4: mov r1, #0 1e8: add sp, sp, #596 ; insn 14 1ec: pop {r4, r5, r6, r7, r8, sl, pc} For other sequences, the tail call could end up branching midway through the following BPF instructions, or maybe off the end of the function, leading to unknown behaviours. Fixes: 39c13c204bb1 ("arm: eBPF JIT compiler") Signed-off-by: Russell King arch/arm/net/bpf_jit_32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9062481824384f00299971f923fecf6b3668001 Author: Russell King Date: Sat Jan 13 11:35:15 2018 +0000 ARM: net: bpf: avoid 'bx' instruction on non-Thumb capable CPUs Avoid the 'bx' instruction on CPUs that have no support for Thumb and thus do not implement this instruction by moving the generation of this opcode to a separate function that selects between: bx reg and mov pc, reg according to the capabilities of the CPU. Fixes: 39c13c204bb1 ("arm: eBPF JIT compiler") Signed-off-by: Russell King arch/arm/net/bpf_jit_32.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 8a510a5c75261ba0ec39155326982aa786541e29 Author: Rob Clark Date: Wed Jan 17 10:16:20 2018 -0500 drm/vmwgfx: fix memory corruption with legacy/sou connectors It looks like in all cases 'struct vmw_connector_state' is used. But only in stdu connectors, was atomic_{duplicate,destroy}_state() properly subclassed. Leading to writes beyond the end of the allocated connector state block and all sorts of fun memory corruption related crashes. Fixes: d7721ca71126 "drm/vmwgfx: Connector atomic state" Cc: Signed-off-by: Rob Clark Reviewed-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 89c6efa61f5709327ecfa24bff18e57a4e80c7fa Author: Jeremy Compostella Date: Wed Nov 15 12:31:44 2017 -0700 i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA On a I2C_SMBUS_I2C_BLOCK_DATA read request, if data->block[0] is greater than I2C_SMBUS_BLOCK_MAX + 1, the underlying I2C driver writes data out of the msgbuf1 array boundary. It is possible from a user application to run into that issue by calling the I2C_SMBUS ioctl with data.block[0] greater than I2C_SMBUS_BLOCK_MAX + 1. This patch makes the code compliant with Documentation/i2c/dev-interface by raising an error when the requested size is larger than 32 bytes. Call Trace: [] dump_stack+0x67/0x92 [] panic+0xc5/0x1eb [] ? vprintk_default+0x1f/0x30 [] ? i2cdev_ioctl_smbus+0x303/0x320 [] __stack_chk_fail+0x1b/0x20 [] i2cdev_ioctl_smbus+0x303/0x320 [] i2cdev_ioctl+0x4d/0x1e0 [] do_vfs_ioctl+0x2ba/0x490 [] ? security_file_ioctl+0x43/0x60 [] SyS_ioctl+0x79/0x90 [] entry_SYSCALL_64_fastpath+0x12/0x6a Signed-off-by: Jeremy Compostella Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/i2c-core-smbus.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit e0638fa400eaccf9fa8060f67140264c4e276552 Author: Lixin Wang Date: Mon Nov 27 15:06:55 2017 +0800 i2c: core: decrease reference count of device node in i2c_unregister_device Reference count of device node was increased in of_i2c_register_device, but without decreasing it in i2c_unregister_device. Then the added device node will never be released. Fix this by adding the of_node_put. Signed-off-by: Lixin Wang Tested-by: Wolfram Sang Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/i2c-core-base.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3cc2e57c4beabcbbaa46e1ac6d77ca8276a4a42d Author: Wei Yongjun Date: Wed Jan 17 11:24:26 2018 +0000 dm crypt: fix error return code in crypt_ctr() Fix to return error code -ENOMEM from the mempool_create_kmalloc_pool() error handling case instead of 0, as done elsewhere in this function. Fixes: ef43aa38063a6 ("dm crypt: add cryptographic data integrity protection (authenticated encryption)") Cc: stable@vger.kernel.org # 4.12+ Signed-off-by: Wei Yongjun Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 1 + 1 file changed, 1 insertion(+) commit dc94902bde1e158cd19c4deab208e5d6eb382a44 Author: Ondrej Kozina Date: Fri Jan 12 16:30:32 2018 +0100 dm crypt: wipe kernel key copy after IV initialization Loading key via kernel keyring service erases the internal key copy immediately after we pass it in crypto layer. This is wrong because IV is initialized later and we use wrong key for the initialization (instead of real key there's just zeroed block). The bug may cause data corruption if key is loaded via kernel keyring service first and later same crypt device is reactivated using exactly same key in hexbyte representation, or vice versa. The bug (and fix) affects only ciphers using following IVs: essiv, lmk and tcw. Fixes: c538f6ec9f56 ("dm crypt: add ability to use keys from the kernel key retention service") Cc: stable@vger.kernel.org # 4.10+ Signed-off-by: Ondrej Kozina Reviewed-by: Milan Broz Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 717f4b1c52135f279112df82583e0c77e80f90de Author: Mikulas Patocka Date: Wed Jan 10 09:32:47 2018 -0500 dm integrity: don't store cipher request on the stack Some asynchronous cipher implementations may use DMA. The stack may be mapped in the vmalloc area that doesn't support DMA. Therefore, the cipher request and initialization vector shouldn't be on the stack. Fix this by allocating the request and iv with kmalloc. Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 49 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 12 deletions(-) commit 27c7003697fc2c78f965984aa224ef26cd6b2949 Author: Milan Broz Date: Wed Jan 3 22:48:59 2018 +0100 dm crypt: fix crash by adding missing check for auth key size If dm-crypt uses authenticated mode with separate MAC, there are two concatenated part of the key structure - key(s) for encryption and authentication key. Add a missing check for authenticated key length. If this key length is smaller than actually provided key, dm-crypt now properly fails instead of crashing. Fixes: ef43aa3806 ("dm crypt: add cryptographic data integrity protection (authenticated encryption)") Cc: stable@vger.kernel.org # 4.12+ Reported-by: Salah Coronya Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit bc68d0a43560e950850fc69b58f0f8254b28f6d6 Author: Joe Thornber Date: Wed Dec 20 09:56:06 2017 +0000 dm btree: fix serious bug in btree_split_beneath() When inserting a new key/value pair into a btree we walk down the spine of btree nodes performing the following 2 operations: i) space for a new entry ii) adjusting the first key entry if the new key is lower than any in the node. If the _root_ node is full, the function btree_split_beneath() allocates 2 new nodes, and redistibutes the root nodes entries between them. The root node is left with 2 entries corresponding to the 2 new nodes. btree_split_beneath() then adjusts the spine to point to one of the two new children. This means the first key is never adjusted if the new key was lower, ie. operation (ii) gets missed out. This can result in the new key being 'lost' for a period; until another low valued key is inserted that will uncover it. This is a serious bug, and quite hard to make trigger in normal use. A reproducing test case ("thin create devices-in-reverse-order") is available as part of the thin-provision-tools project: https://github.com/jthornber/thin-provisioning-tools/blob/master/functional-tests/device-mapper/dm-tests.scm#L593 Fix the issue by changing btree_split_beneath() so it no longer adjusts the spine. Instead it unlocks both the new nodes, and lets the main loop in btree_insert_raw() relock the appropriate one and make any neccessary adjustments. Cc: stable@vger.kernel.org Reported-by: Monty Pavel Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/persistent-data/dm-btree.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) commit 490ae017f54e55bde382d45ea24bddfb6d1a0aaf Author: Dennis Yang Date: Tue Dec 12 18:21:40 2017 +0800 dm thin metadata: THIN_MAX_CONCURRENT_LOCKS should be 6 For btree removal, there is a corner case that a single thread could takes 6 locks which is more than THIN_MAX_CONCURRENT_LOCKS(5) and leads to deadlock. A btree removal might eventually call rebalance_children()->rebalance3() to rebalance entries of three neighbor child nodes when shadow_spine has already acquired two write locks. In rebalance3(), it tries to shadow and acquire the write locks of all three child nodes. However, shadowing a child node requires acquiring a read lock of the original child node and a write lock of the new block. Although the read lock will be released after block shadowing, shadowing the third child node in rebalance3() could still take the sixth lock. (2 write locks for shadow_spine + 2 write locks for the first two child nodes's shadow + 1 write lock for the last child node's shadow + 1 read lock for the last child node) Cc: stable@vger.kernel.org Signed-off-by: Dennis Yang Acked-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-thin-metadata.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 37b95951c58fdf08dc10afa9d02066ed9f176fb5 Author: Tianyu Lan Date: Tue Jan 16 17:34:07 2018 +0800 KVM/x86: Fix wrong macro references of X86_CR0_PG_BIT and X86_CR4_PAE_BIT in kvm_valid_sregs() kvm_valid_sregs() should use X86_CR0_PG and X86_CR4_PAE to check bit status rather than X86_CR0_PG_BIT and X86_CR4_PAE_BIT. This patch is to fix it. Fixes: f29810335965a(KVM/x86: Check input paging mode when cs.l is set) Reported-by: Jeremi Piotrowski Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Tianyu Lan Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f44efa5aeaadb0091f90d6888161a0dcb84fa441 Merge: a8750dd acfb3b8 Author: Radim Krčmář Date: Wed Jan 17 14:59:27 2018 +0100 Merge tag 'kvm-arm-fixes-for-v4.15-3-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm KVM/ARM Fixes for v4.15, Round 3 (v2) Three more fixes for v4.15 fixing incorrect huge page mappings on systems using the contigious hint for hugetlbfs; supporting an alternative GICv4 init sequence; and correctly implementing the ARM SMCC for HVC and SMC handling. commit 1b689a95ce7427075f9ac9fb4aea1af530742b7f Author: Michal Suchanek Date: Mon Jan 15 14:30:03 2018 +0100 powerpc/pseries: include linux/types.h in asm/hvcall.h Commit 6e032b350cd1 ("powerpc/powernv: Check device-tree for RFI flush settings") uses u64 in asm/hvcall.h without including linux/types.h This breaks hvcall.h users that do not include the header themselves. Fixes: 6e032b350cd1 ("powerpc/powernv: Check device-tree for RFI flush settings") Signed-off-by: Michal Suchanek Signed-off-by: Michael Ellerman arch/powerpc/include/asm/hvcall.h | 1 + 1 file changed, 1 insertion(+) commit 236003e6b5443c45c18e613d2b0d776a9f87540e Author: Michael Ellerman Date: Tue Jan 16 22:17:18 2018 +1100 powerpc/64s: Allow control of RFI flush via debugfs Expose the state of the RFI flush (enabled/disabled) via debugfs, and allow it to be enabled/disabled at runtime. eg: $ cat /sys/kernel/debug/powerpc/rfi_flush 1 $ echo 0 > /sys/kernel/debug/powerpc/rfi_flush $ cat /sys/kernel/debug/powerpc/rfi_flush 0 Signed-off-by: Michael Ellerman Reviewed-by: Nicholas Piggin arch/powerpc/kernel/setup_64.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit fd6e440f20b1a4304553775fc55938848ff617c9 Author: Michael Ellerman Date: Tue Jan 16 21:20:05 2018 +1100 powerpc/64s: Wire up cpu_show_meltdown() The recent commit 87590ce6e373 ("sysfs/cpu: Add vulnerability folder") added a generic folder and set of files for reporting information on CPU vulnerabilities. One of those was for meltdown: /sys/devices/system/cpu/vulnerabilities/meltdown This commit wires up that file for 64-bit Book3S powerpc. For now we default to "Vulnerable" unless the RFI flush is enabled. That may not actually be true on all hardware, further patches will refine the reporting based on the CPU/platform etc. But for now we default to being pessimists. Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/setup_64.c | 8 ++++++++ 2 files changed, 9 insertions(+) commit 45d55e7bac4028af93f5fa324e69958a0b868e96 Author: Thomas Gleixner Date: Tue Jan 16 12:20:18 2018 +0100 x86/apic/vector: Fix off by one in error path Keith reported the following warning: WARNING: CPU: 28 PID: 1420 at kernel/irq/matrix.c:222 irq_matrix_remove_managed+0x10f/0x120 x86_vector_free_irqs+0xa1/0x180 x86_vector_alloc_irqs+0x1e4/0x3a0 msi_domain_alloc+0x62/0x130 The reason for this is that if the vector allocation fails the error handling code tries to free the failed vector as well, which causes the above imbalance warning to trigger. Adjust the error path to handle this correctly. Fixes: b5dc8e6c21e7 ("x86/irq: Use hierarchical irqdomain to manage CPU interrupt vectors") Reported-by: Keith Busch Signed-off-by: Thomas Gleixner Tested-by: Keith Busch Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801161217300.1823@nanos arch/x86/kernel/apic/vector.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d47924417319e3b6a728c0b690f183e75bc2a702 Author: Thomas Gleixner Date: Tue Jan 16 19:59:59 2018 +0100 x86/intel_rdt/cqm: Prevent use after free intel_rdt_iffline_cpu() -> domain_remove_cpu() frees memory first and then proceeds accessing it. BUG: KASAN: use-after-free in find_first_bit+0x1f/0x80 Read of size 8 at addr ffff883ff7c1e780 by task cpuhp/31/195 find_first_bit+0x1f/0x80 has_busy_rmid+0x47/0x70 intel_rdt_offline_cpu+0x4b4/0x510 Freed by task 195: kfree+0x94/0x1a0 intel_rdt_offline_cpu+0x17d/0x510 Do the teardown first and then free memory. Fixes: 24247aeeabe9 ("x86/intel_rdt/cqm: Improve limbo list processing") Reported-by: Joseph Salisbury Signed-off-by: Thomas Gleixner Cc: Ravi Shankar Cc: Peter Zilstra Cc: Stephane Eranian Cc: Vikas Shivappa Cc: Andi Kleen Cc: "Roderick W. Smith" Cc: 1733662@bugs.launchpad.net Cc: Fenghua Yu Cc: Tony Luck Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801161957510.2366@nanos arch/x86/kernel/cpu/intel_rdt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6cfb521ac0d5b97470883ff9b7facae264b7ab12 Author: Andi Kleen Date: Tue Jan 16 12:52:28 2018 -0800 module: Add retpoline tag to VERMAGIC Add a marker for retpoline to the module VERMAGIC. This catches the case when a non RETPOLINE compiled module gets loaded into a retpoline kernel, making it insecure. It doesn't handle the case when retpoline has been runtime disabled. Even in this case the match of the retcompile status will be enforced. This implies that even with retpoline run time disabled all modules loaded need to be recompiled. Signed-off-by: Andi Kleen Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Acked-by: David Woodhouse Cc: rusty@rustcorp.com.au Cc: arjan.van.de.ven@intel.com Cc: jeyu@kernel.org Cc: torvalds@linux-foundation.org Link: https://lkml.kernel.org/r/20180116205228.4890-1-andi@firstfloor.org include/linux/vermagic.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 2b0bc68cccc70f1a61b90b49012e917eea4cb251 Author: Woody Suwalski Date: Wed Jan 17 09:07:47 2018 +0100 drm/vmwgfx: Fix a boot time warning The 4.15 vmwgfx driver shows a warning during boot. It is caused by a mismatch between the result of vmw_enable_vblank() and what the drm_atomic_helper expects. Signed-off by: Woody Suwalski Signed-off-by: Thomas Hellstrom drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fdec2034b7540dda461c6ba33325dfcff345c64 Author: Paolo Bonzini Date: Tue Jan 16 16:42:25 2018 +0100 x86/cpufeature: Move processor tracing out of scattered features Processor tracing is already enumerated in word 9 (CPUID[7,0].EBX), so do not duplicate it in the scattered features word. Besides being more tidy, this will be useful for KVM when it presents processor tracing to the guests. KVM selects host features that are supported by both the host kernel (depending on command line options, CPU errata, or whatever) and KVM. Whenever a full feature word exists, KVM's code is written in the expectation that the CPUID bit number matches the X86_FEATURE_* bit number, but this is not the case for X86_FEATURE_INTEL_PT. Signed-off-by: Paolo Bonzini Cc: Borislav Petkov Cc: Linus Torvalds Cc: Luwei Kang Cc: Peter Zijlstra Cc: Radim Krčmář Cc: Thomas Gleixner Cc: kvm@vger.kernel.org Link: http://lkml.kernel.org/r/1516117345-34561-1-git-send-email-pbonzini@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 2 +- arch/x86/kernel/cpu/scattered.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 0d83620fd18e5b8d79d390e482583b379a6a986d Author: Michael Cree Date: Wed Jan 3 21:58:00 2018 +1300 alpha: extend memset16 to EV6 optimised routines Commit 92ce4c3ea7c4, "alpha: add support for memset16", renamed the function memsetw() to be memset16() but neglected to do this for the EV6 optimised version, thus when building a kernel optimised for EV6 (or later) link errors result. This extends the memset16 support to EV6. Signed-off-by: Michael Cree Signed-off-by: Matt Turner arch/alpha/lib/ev6-memset.S | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8cbab92dff778e516064c13113ca15d4869ec883 Merge: b45a53b ae59c3f Author: Linus Torvalds Date: Tue Jan 16 16:47:40 2018 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Doug Ledford: "We had a few more items creep up over the last week. Given we are in -rc8, these are obviously limited to bugs that have a big downside and for which we are certain of the fix. The first is a straight up oops bug that all you have to do is read the code to see it's a guaranteed 100% oops bug. The second is a use-after-free issue. We get away lucky if the queue we are shutting down is empty, but if it isn't, we can end up oopsing. We really need to drain the queue before destroying it. The final one is an issue with bad user input causing us to access our port array out of bounds. While fixing the array out of bounds issue, it was noticed that the original code did the same thing twice (the call to rdma_ah_set_port_num()), so its removal is not balanced by a readd elsewhere, it was already where it needed to be in addition to where it didn't need to be. Summary: - Oops fix in hfi1 driver - use-after-free issue in iser-target - use of user supplied array index without proper checking" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/mlx5: Fix out-of-bound access while querying AH IB/hfi1: Prevent a NULL dereference iser-target: Fix possible use-after-free in connection establishment error commit f37a8cb84cce18762e8f86a70bd6a49a66ab964c Author: Daniel Borkmann Date: Tue Jan 16 23:30:10 2018 +0100 bpf: reject stores into ctx via st and xadd Alexei found that verifier does not reject stores into context via BPF_ST instead of BPF_STX. And while looking at it, we also should not allow XADD variant of BPF_STX. The context rewriter is only assuming either BPF_LDX_MEM- or BPF_STX_MEM-type operations, thus reject anything other than that so that assumptions in the rewriter properly hold. Add test cases as well for BPF selftests. Fixes: d691f9e8d440 ("bpf: allow programs to write to certain skb fields") Reported-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 19 +++++++++++++++++++ tools/testing/selftests/bpf/test_verifier.c | 29 +++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) commit 07c7b6a52503ac13ae357a8b3ef3456590a64b65 Author: Linus Walleij Date: Tue Jan 16 09:51:51 2018 +0100 gpio: mmio: Also read bits that are zero The code for .get_multiple() has bugs: 1. The simple .get_multiple() just reads a register, masks it and sets the return value. This is not correct: we only want to assign values (whether 0 or 1) to the bits that are set in the mask. Fix this by using &= ~mask to clear all bits in the mask and then |= val & mask to set the corresponding bits from the read. 2. The bgpio_get_multiple_be() call has a similar problem: it uses the |= operator to set the bits, so only the bits in the mask are affected, but it misses to clear all returned bits from the mask initially, so some bits will be returned erroneously set to 1. 3. The bgpio_get_set_multiple() again fails to clear the bits from the mask. 4. find_next_bit() wasn't handled correctly, use a totally different approach for one function and change the other function to follow the design pattern of assigning the first bit to -1, then use bit + 1 in the for loop and < num_iterations as break condition. Fixes: 80057cb417b2 ("gpio-mmio: Use the new .get_multiple() callback") Cc: Bartosz Golaszewski Reported-by: Clemens Gruber Tested-by: Clemens Gruber Reported-by: Lukas Wunner Signed-off-by: Linus Walleij drivers/gpio/gpio-mmio.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit b45a53be53d660c4b8fa4d1ef852439607611424 Merge: 41aa5e5 81d947e Author: Linus Torvalds Date: Tue Jan 16 12:45:30 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Two read past end of buffer fixes in AF_KEY, from Eric Biggers. 2) Memory leak in key_notify_policy(), from Steffen Klassert. 3) Fix overflow with bpf arrays, from Daniel Borkmann. 4) Fix RDMA regression with mlx5 due to mlx5 no longer using pci_irq_get_affinity(), from Saeed Mahameed. 5) Missing RCU read locking in nl80211_send_iface() when it calls ieee80211_bss_get_ie(), from Dominik Brodowski. 6) cfg80211 should check dev_set_name()'s return value, from Johannes Berg. 7) Missing module license tag in 9p protocol, from Stephen Hemminger. 8) Fix crash due to too small MTU in udp ipv6 sendmsg, from Mike Maloney. 9) Fix endless loop in netlink extack code, from David Ahern. 10) TLS socket layer sets inverted error codes, resulting in an endless loop. From Robert Hering. 11) Revert openvswitch erspan tunnel support, it's mis-designed and we need to kill it before it goes into a real release. From William Tu. 12) Fix lan78xx failures in full speed USB mode, from Yuiko Oshino. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (54 commits) net, sched: fix panic when updating miniq {b,q}stats qed: Fix potential use-after-free in qed_spq_post() nfp: use the correct index for link speed table lan78xx: Fix failure in USB Full Speed sctp: do not allow the v4 socket to bind a v4mapped v6 address sctp: return error if the asoc has been peeled off in sctp_wait_for_sndbuf sctp: reinit stream if stream outcnt has been change by sinit in sendmsg ibmvnic: Fix pending MAC address changes netlink: extack: avoid parenthesized string constant warning ipv4: Make neigh lookup keys for loopback/point-to-point devices be INADDR_ANY net: Allow neigh contructor functions ability to modify the primary_key sh_eth: fix dumping ARSTR Revert "openvswitch: Add erspan tunnel support." net/tls: Fix inverted error codes to avoid endless loop ipv6: ip6_make_skb() needs to clear cork.base.dst sctp: avoid compiler warning on implicit fallthru net: ipv4: Make "ip route get" match iif lo rules again. netlink: extack needs to be reset each time through loop tipc: fix a memory leak in tipc_nl_node_get_link() ipv6: fix udpv6 sendmsg crash caused by too small MTU ... commit 41aa5e5d712ba3a5f4fac0bbd6d976d70f9aed06 Merge: 921d4f6 b3defb7 Author: Linus Torvalds Date: Tue Jan 16 12:13:52 2018 -0800 Merge tag 'sound-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A few small last-minute fixes that should sneak into 4.15: - remove a spurious WARN_ON() triggered by syzkaller - fix for ioctl races in ALSA sequencer - two trivial HD-audio fixup entries" * tag 'sound-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: seq: Make ioctls race-free ALSA: pcm: Remove yet superfluous WARN_ON() ALSA: hda - Apply the existing quirk to iMac 14,1 ALSA: hda - Apply headphone noise quirk for another Dell XPS 13 variant commit 921d4f67bfacaa0967231a7d408414aa592ca51c Merge: a8750dd 68e76e0 Author: Linus Torvalds Date: Tue Jan 16 12:09:36 2018 -0800 Merge tag 'trace-v4.15-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: - Bring back context level recursive protection in ring buffer. The simpler counter protection failed, due to a path when tracing with trace_clock_global() as it could not be reentrant and depended on the ring buffer recursive protection to keep that from happening. - Prevent branch profiling when FORTIFY_SOURCE is enabled. It causes 50 - 60 MB in warning messages. Branch profiling should never be run on production systems, so there's no reason that it needs to be enabled with FORTIFY_SOURCE. * tag 'trace-v4.15-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Prevent PROFILE_ALL_BRANCHES when FORTIFY_SOURCE=y ring-buffer: Bring back context level recursive checks commit 81d947e2b8dd2394586c3eaffdd2357797d3bf59 Author: Daniel Borkmann Date: Mon Jan 15 23:12:09 2018 +0100 net, sched: fix panic when updating miniq {b,q}stats While working on fixing another bug, I ran into the following panic on arm64 by simply attaching clsact qdisc, adding a filter and running traffic on ingress to it: [...] [ 178.188591] Unable to handle kernel read from unreadable memory at virtual address 810fb501f000 [ 178.197314] Mem abort info: [ 178.200121] ESR = 0x96000004 [ 178.203168] Exception class = DABT (current EL), IL = 32 bits [ 178.209095] SET = 0, FnV = 0 [ 178.212157] EA = 0, S1PTW = 0 [ 178.215288] Data abort info: [ 178.218175] ISV = 0, ISS = 0x00000004 [ 178.222019] CM = 0, WnR = 0 [ 178.224997] user pgtable: 4k pages, 48-bit VAs, pgd = 0000000023cb3f33 [ 178.231531] [0000810fb501f000] *pgd=0000000000000000 [ 178.236508] Internal error: Oops: 96000004 [#1] SMP [...] [ 178.311855] CPU: 73 PID: 2497 Comm: ping Tainted: G W 4.15.0-rc7+ #5 [ 178.319413] Hardware name: FOXCONN R2-1221R-A4/C2U4N_MB, BIOS G31FB18A 03/31/2017 [ 178.326887] pstate: 60400005 (nZCv daif +PAN -UAO) [ 178.331685] pc : __netif_receive_skb_core+0x49c/0xac8 [ 178.336728] lr : __netif_receive_skb+0x28/0x78 [ 178.341161] sp : ffff00002344b750 [ 178.344465] x29: ffff00002344b750 x28: ffff810fbdfd0580 [ 178.349769] x27: 0000000000000000 x26: ffff000009378000 [...] [ 178.418715] x1 : 0000000000000054 x0 : 0000000000000000 [ 178.424020] Process ping (pid: 2497, stack limit = 0x000000009f0a3ff4) [ 178.430537] Call trace: [ 178.432976] __netif_receive_skb_core+0x49c/0xac8 [ 178.437670] __netif_receive_skb+0x28/0x78 [ 178.441757] process_backlog+0x9c/0x160 [ 178.445584] net_rx_action+0x2f8/0x3f0 [...] Reason is that sch_ingress and sch_clsact are doing mini_qdisc_pair_init() which sets up miniq pointers to cpu_{b,q}stats from the underlying qdisc. Problem is that this cannot work since they are actually set up right after the qdisc ->init() callback in qdisc_create(), so first packet going into sch_handle_ingress() tries to call mini_qdisc_bstats_cpu_update() and we therefore panic. In order to fix this, allocation of {b,q}stats needs to happen before we call into ->init(). In net-next, there's already such option through commit d59f5ffa59d8 ("net: sched: a dflt qdisc may be used with per cpu stats"). However, the bug needs to be fixed in net still for 4.15. Thus, include these bits to reduce any merge churn and reuse the static_flags field to set TCQ_F_CPUSTATS, and remove the allocation from qdisc_create() since there is no other user left. Prashant Bhole ran into the same issue but for net-next, thus adding him below as well as co-author. Same issue was also reported by Sandipan Das when using bcc. Fixes: 46209401f8f6 ("net: core: introduce mini_Qdisc and eliminate usage of tp->q for clsact fastpath") Reference: https://lists.iovisor.org/pipermail/iovisor-dev/2018-January/001190.html Reported-by: Sandipan Das Co-authored-by: Prashant Bhole Co-authored-by: John Fastabend Signed-off-by: Daniel Borkmann Cc: Jiri Pirko Signed-off-by: David S. Miller include/net/sch_generic.h | 2 ++ net/sched/sch_api.c | 15 +-------------- net/sched/sch_generic.c | 18 +++++++++++++++++- net/sched/sch_ingress.c | 19 ++++--------------- 4 files changed, 24 insertions(+), 30 deletions(-) commit 70eeff66c4696cee4076d6388b6bede5bd7ff71c Author: Roland Dreier Date: Mon Jan 15 12:24:49 2018 -0800 qed: Fix potential use-after-free in qed_spq_post() We need to check if p_ent->comp_mode is QED_SPQ_MODE_EBLOCK before calling qed_spq_add_entry(). The test is fine is the mode is EBLOCK, but if it isn't then qed_spq_add_entry() might kfree(p_ent). Signed-off-by: Roland Dreier Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_spq.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 0d9c9f0f40ca262b67fc06a702b85f3976f5e1a1 Author: Jakub Kicinski Date: Mon Jan 15 11:47:53 2018 -0800 nfp: use the correct index for link speed table sts variable is holding link speed as well as state. We should be using ls to index into ls_to_ethtool. Fixes: 265aeb511bd5 ("nfp: add support for .get_link_ksettings()") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5b1379afbfabf91e3a689e82ac619a7157336b3 Author: Yuiko Oshino Date: Mon Jan 15 13:24:28 2018 -0500 lan78xx: Fix failure in USB Full Speed Fix initialize the uninitialized tx_qlen to an appropriate value when USB Full Speed is used. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Signed-off-by: Yuiko Oshino Signed-off-by: David S. Miller drivers/net/usb/lan78xx.c | 1 + 1 file changed, 1 insertion(+) commit a2284d912bfc865cdca4c00488e08a3550f9a405 Author: Daniel Borkmann Date: Tue Jan 16 03:46:08 2018 +0100 bpf, arm64: fix stack_depth tracking in combination with tail calls Using dynamic stack_depth tracking in arm64 JIT is currently broken in combination with tail calls. In prologue, we cache ctx->stack_size and adjust SP reg for setting up function call stack, and tearing it down again in epilogue. Problem is that when doing a tail call, the cached ctx->stack_size might not be the same. One way to fix the problem with minimal overhead is to re-adjust SP in emit_bpf_tail_call() and properly adjust it to the current program's ctx->stack_size. Tested on Cavium ThunderX ARMv8. Fixes: f1c9eed7f437 ("bpf, arm64: take advantage of stack_depth tracking") Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov arch/arm64/net/bpf_jit_comp.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 161f72ed6dbe7fb176585091d3b797125d310399 Merge: c5006b8 59b179b4 Author: David S. Miller Date: Tue Jan 16 14:28:14 2018 -0500 Merge tag 'mac80211-for-davem-2018-01-15' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== More fixes: * hwsim: - properly flush deletion works at module unload - validate # of channels passed from userspace * cfg80211: - fix RCU locking regression - initialize on-stack channel data for nl80211 event - check dev_set_name() return value ==================== Signed-off-by: David S. Miller commit c5006b8aa74599ce19104b31d322d2ea9ff887cc Author: Xin Long Date: Mon Jan 15 17:02:00 2018 +0800 sctp: do not allow the v4 socket to bind a v4mapped v6 address The check in sctp_sockaddr_af is not robust enough to forbid binding a v4mapped v6 addr on a v4 socket. The worse thing is that v4 socket's bind_verify would not convert this v4mapped v6 addr to a v4 addr. syzbot even reported a crash as the v4 socket bound a v6 addr. This patch is to fix it by doing the common sa.sa_family check first, then AF_INET check for v4mapped v6 addrs. Fixes: 7dab83de50c7 ("sctp: Support ipv6only AF_INET6 sockets.") Reported-by: syzbot+7b7b518b1228d2743963@syzkaller.appspotmail.com Acked-by: Neil Horman Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/socket.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit a0ff660058b88d12625a783ce9e5c1371c87951f Author: Xin Long Date: Mon Jan 15 17:01:36 2018 +0800 sctp: return error if the asoc has been peeled off in sctp_wait_for_sndbuf After commit cea0cc80a677 ("sctp: use the right sk after waking up from wait_buf sleep"), it may change to lock another sk if the asoc has been peeled off in sctp_wait_for_sndbuf. However, the asoc's new sk could be already closed elsewhere, as it's in the sendmsg context of the old sk that can't avoid the new sk's closing. If the sk's last one refcnt is held by this asoc, later on after putting this asoc, the new sk will be freed, while under it's own lock. This patch is to revert that commit, but fix the old issue by returning error under the old sk's lock. Fixes: cea0cc80a677 ("sctp: use the right sk after waking up from wait_buf sleep") Reported-by: syzbot+ac6ea7baa4432811eb50@syzkaller.appspotmail.com Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/socket.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 625637bf4afa45204bd87e4218645182a919485a Author: Xin Long Date: Mon Jan 15 17:01:19 2018 +0800 sctp: reinit stream if stream outcnt has been change by sinit in sendmsg After introducing sctp_stream structure, sctp uses stream->outcnt as the out stream nums instead of c.sinit_num_ostreams. However when users use sinit in cmsg, it only updates c.sinit_num_ostreams in sctp_sendmsg. At that moment, stream->outcnt is still using previous value. If it's value is not updated, the sinit_num_ostreams of sinit could not really work. This patch is to fix it by updating stream->outcnt and reiniting stream if stream outcnt has been change by sinit in sendmsg. Fixes: a83863174a61 ("sctp: prepare asoc stream for stream reconf") Signed-off-by: Xin Long Acked-by: Neil Horman Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/socket.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit cc124d5cc8d81985c3511892d7a6d546552ff754 Author: Wright Feng Date: Tue Jan 16 17:26:50 2018 +0800 brcmfmac: fix CLM load error for legacy chips when user helper is enabled For legacy chips without CLM blob files, kernel with user helper function returns -EAGAIN when we request_firmware(), and then driver got failed when bringing up legacy chips. We expect the CLM blob file for legacy chip is not existence in firmware path, but the -ENOENT error is transferred to -EAGAIN in firmware_class.c with user helper. Because of that, we continue with CLM data currently present in firmware if getting error from doing request_firmware(). Cc: stable@vger.kernel.org # v4.15.y Reviewed-by: Arend van Spriel Signed-off-by: Wright Feng Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 58eae1416b804d900014d84feadda7195007cc30 Author: James Hogan Date: Mon Jan 15 21:17:14 2018 +0000 ssb: Disable PCI host for PCI_DRIVERS_GENERIC Since commit d41e6858ba58 ("MIPS: Kconfig: Set default MIPS system type as generic") changed the default MIPS platform to the "generic" platform, which uses PCI_DRIVERS_GENERIC instead of PCI_DRIVERS_LEGACY, various files in drivers/ssb/ have failed to build. This is particularly due to the existence of struct pci_controller being dependent on PCI_DRIVERS_LEGACY since commit c5611df96804 ("MIPS: PCI: Introduce CONFIG_PCI_DRIVERS_LEGACY"), so add that dependency to Kconfig to prevent these files being built for the "generic" platform including all{yes,mod}config builds. Fixes: c5611df96804 ("MIPS: PCI: Introduce CONFIG_PCI_DRIVERS_LEGACY") Signed-off-by: James Hogan Cc: Michael Buesch Cc: Ralf Baechle Cc: Paul Burton Cc: Matt Redfearn Cc: Guenter Roeck Cc: linux-wireless@vger.kernel.org Cc: linux-mips@linux-mips.org Tested-by: Guenter Roeck Signed-off-by: Kalle Valo drivers/ssb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 664eadd6f44b3d71dcc62d0a825319000de0d5c9 Author: Guenter Roeck Date: Sun Jan 14 13:34:02 2018 -0800 bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets Mips builds with BCMA host mode enabled fail in mainline and -next with: In file included from include/linux/bcma/bcma.h:10:0, from drivers/bcma/bcma_private.h:9, from drivers/bcma/main.c:8: include/linux/bcma/bcma_driver_pci.h:218:24: error: field 'pci_controller' has incomplete type Bisect points to commit d41e6858ba58c ("MIPS: Kconfig: Set default MIPS system type as generic") as the culprit. Analysis shows that the commmit changes PCI configuration and enables PCI_DRIVERS_GENERIC. This in turn disables PCI_DRIVERS_LEGACY. 'struct pci_controller' is, however, only defined if PCI_DRIVERS_LEGACY is enabled. Ultimately that means that BCMA_DRIVER_PCI_HOSTMODE depends on PCI_DRIVERS_LEGACY. Add the missing dependency. Fixes: d41e6858ba58c ("MIPS: Kconfig: Set default MIPS system type as ...") Cc: Matt Redfearn Cc: James Hogan Signed-off-by: Guenter Roeck Reviewed-by: James Hogan Signed-off-by: Kalle Valo drivers/bcma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 838cda3697073982acd276ac43387b2a0aed04b4 Author: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Tue Jan 16 10:43:17 2018 +0100 x86/PCI: Enable AMD 64-bit window on resume Reenable the 64-bit window during resume. Fixes: fa564ad96366 ("x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 00-1f, 30-3f, 60-7f)") Reported-by: Tom St Denis Signed-off-by: Christian König Signed-off-by: Bjorn Helgaas arch/x86/pci/fixup.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit acfb3b883f6d6a4b5d27ad7fdded11f6a09ae6dd Author: Marc Zyngier Date: Tue Jan 16 10:23:47 2018 +0000 arm64: KVM: Fix SMCCC handling of unimplemented SMC/HVC calls KVM doesn't follow the SMCCC when it comes to unimplemented calls, and inject an UNDEF instead of returning an error. Since firmware calls are now used for security mitigation, they are becoming more common, and the undef is counter productive. Instead, let's follow the SMCCC which states that -1 must be returned to the caller when getting an unknown function number. Cc: Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/kvm/handle_exit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3d1661304f0b2b51a8a43785b764822611dbdd53 Author: Thomas Falcon Date: Wed Jan 10 19:39:52 2018 -0600 ibmvnic: Fix pending MAC address changes Due to architecture limitations, the IBM VNIC client driver is unable to perform MAC address changes unless the device has "logged in" to its backing device. Currently, pending MAC changes are handled before login, resulting in an error and failure to change the MAC address. Moving that chunk to the end of the ibmvnic_login function, when we are sure that it was successful, fixes that. The MAC address can be changed when the device is up or down, so only check if the device is in a "PROBED" state before setting the MAC address. Fixes: c26eba03e407 ("ibmvnic: Update reset infrastructure to support tunable parameters") Signed-off-by: Thomas Falcon Reviewed-by: John Allen Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit d8a243af1a68395e07ac85384a2740d4134c67f4 Author: Stephane Grosjean Date: Mon Jan 15 16:31:19 2018 +0100 can: peak: fix potential bug in packet fragmentation In some rare conditions when running one PEAK USB-FD interface over a non high-speed USB controller, one useless USB fragment might be sent. This patch fixes the way a USB command is fragmented when its length is greater than 64 bytes and when the underlying USB controller is not a high-speed one. Signed-off-by: Stephane Grosjean Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit c96f5471ce7d2aefd0dda560cc23f08ab00bc65d Author: Josh Snyder Date: Mon Dec 18 16:15:10 2017 +0000 delayacct: Account blkio completion on the correct task Before commit: e33a9bba85a8 ("sched/core: move IO scheduling accounting from io_schedule_timeout() into scheduler") delayacct_blkio_end() was called after context-switching into the task which completed I/O. This resulted in double counting: the task would account a delay both waiting for I/O and for time spent in the runqueue. With e33a9bba85a8, delayacct_blkio_end() is called by try_to_wake_up(). In ttwu, we have not yet context-switched. This is more correct, in that the delay accounting ends when the I/O is complete. But delayacct_blkio_end() relies on 'get_current()', and we have not yet context-switched into the task whose I/O completed. This results in the wrong task having its delay accounting statistics updated. Instead of doing that, pass the task_struct being woken to delayacct_blkio_end(), so that it can update the statistics of the correct task. Signed-off-by: Josh Snyder Acked-by: Tejun Heo Acked-by: Balbir Singh Cc: Cc: Brendan Gregg Cc: Jens Axboe Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-block@vger.kernel.org Fixes: e33a9bba85a8 ("sched/core: move IO scheduling accounting from io_schedule_timeout() into scheduler") Link: http://lkml.kernel.org/r/1513613712-571-1-git-send-email-joshs@netflix.com Signed-off-by: Ingo Molnar include/linux/delayacct.h | 8 ++++---- kernel/delayacct.c | 42 ++++++++++++++++++++++++++---------------- kernel/sched/core.c | 6 +++--- 3 files changed, 33 insertions(+), 23 deletions(-) commit 107cd2532181b96c549e8f224cdcca8631c3076b Author: Tom Lendacky Date: Wed Jan 10 13:26:34 2018 -0600 x86/mm: Encrypt the initrd earlier for BSP microcode update Currently the BSP microcode update code examines the initrd very early in the boot process. If SME is active, the initrd is treated as being encrypted but it has not been encrypted (in place) yet. Update the early boot code that encrypts the kernel to also encrypt the initrd so that early BSP microcode updates work. Tested-by: Gabriel Craciunescu Signed-off-by: Tom Lendacky Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brijesh Singh Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180110192634.6026.10452.stgit@tlendack-t1.amdoffice.net Signed-off-by: Ingo Molnar arch/x86/include/asm/mem_encrypt.h | 4 +-- arch/x86/kernel/head64.c | 4 +-- arch/x86/kernel/setup.c | 10 ------ arch/x86/mm/mem_encrypt.c | 66 +++++++++++++++++++++++++++++++++----- arch/x86/mm/mem_encrypt_boot.S | 46 +++++++++++++------------- 5 files changed, 85 insertions(+), 45 deletions(-) commit cc5f01e28d6c60f274fd1e33b245f679f79f543c Author: Tom Lendacky Date: Wed Jan 10 13:26:26 2018 -0600 x86/mm: Prepare sme_encrypt_kernel() for PAGE aligned encryption In preparation for encrypting more than just the kernel, the encryption support in sme_encrypt_kernel() needs to support 4KB page aligned encryption instead of just 2MB large page aligned encryption. Update the routines that populate the PGD to support non-2MB aligned addresses. This is done by creating PTE page tables for the start and end portion of the address range that fall outside of the 2MB alignment. This results in, at most, two extra pages to hold the PTE entries for each mapping of a range. Tested-by: Gabriel Craciunescu Signed-off-by: Tom Lendacky Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brijesh Singh Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180110192626.6026.75387.stgit@tlendack-t1.amdoffice.net Signed-off-by: Ingo Molnar arch/x86/mm/mem_encrypt.c | 123 +++++++++++++++++++++++++++++++++++------ arch/x86/mm/mem_encrypt_boot.S | 20 +++++-- 2 files changed, 121 insertions(+), 22 deletions(-) commit 2b5d00b6c2cdd94f6d6a494a6f6c0c0fc7b8e711 Author: Tom Lendacky Date: Wed Jan 10 13:26:16 2018 -0600 x86/mm: Centralize PMD flags in sme_encrypt_kernel() In preparation for encrypting more than just the kernel during early boot processing, centralize the use of the PMD flag settings based on the type of mapping desired. When 4KB aligned encryption is added, this will allow either PTE flags or large page PMD flags to be used without requiring the caller to adjust. Tested-by: Gabriel Craciunescu Signed-off-by: Tom Lendacky Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brijesh Singh Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180110192615.6026.14767.stgit@tlendack-t1.amdoffice.net Signed-off-by: Ingo Molnar arch/x86/mm/mem_encrypt.c | 133 +++++++++++++++++++++++++++------------------- 1 file changed, 77 insertions(+), 56 deletions(-) commit bacf6b499e11760aef73a3bb5ce4e5eea74a3fd4 Author: Tom Lendacky Date: Wed Jan 10 13:26:05 2018 -0600 x86/mm: Use a struct to reduce parameters for SME PGD mapping In preparation for follow-on patches, combine the PGD mapping parameters into a struct to reduce the number of function arguments and allow for direct updating of the next pagetable mapping area pointer. Tested-by: Gabriel Craciunescu Signed-off-by: Tom Lendacky Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brijesh Singh Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180110192605.6026.96206.stgit@tlendack-t1.amdoffice.net Signed-off-by: Ingo Molnar arch/x86/mm/mem_encrypt.c | 90 ++++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 44 deletions(-) commit 1303880179e67c59e801429b7e5d0f6b21137d99 Author: Tom Lendacky Date: Wed Jan 10 13:25:56 2018 -0600 x86/mm: Clean up register saving in the __enc_copy() assembly code Clean up the use of PUSH and POP and when registers are saved in the __enc_copy() assembly function in order to improve the readability of the code. Move parameter register saving into general purpose registers earlier in the code and move all the pushes to the beginning of the function with corresponding pops at the end. We do this to prepare fixes. Tested-by: Gabriel Craciunescu Signed-off-by: Tom Lendacky Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brijesh Singh Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180110192556.6026.74187.stgit@tlendack-t1.amdoffice.net Signed-off-by: Ingo Molnar arch/x86/mm/mem_encrypt_boot.S | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 385d11b152c4eb638eeb769edcb3249533bb9a00 Author: Josh Poimboeuf Date: Mon Jan 15 08:17:08 2018 -0600 objtool: Improve error message for bad file argument If a nonexistent file is supplied to objtool, it complains with a non-helpful error: open: No such file or directory Improve it to: objtool: Can't open 'foo': No such file or directory Reported-by: Markus Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/406a3d00a21225eee2819844048e17f68523ccf6.1516025651.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/elf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2a0098d70640dda192a79966c14d449e7a34d675 Author: Josh Poimboeuf Date: Mon Jan 15 08:17:07 2018 -0600 objtool: Fix seg fault with gold linker Objtool segfaults when the gold linker is used with CONFIG_MODVERSIONS=y and CONFIG_UNWINDER_ORC=y. With CONFIG_MODVERSIONS=y, the .o file gets passed to the linker before being passed to objtool. The gold linker seems to strip unused ELF symbols by default, which confuses objtool and causes the seg fault when it's trying to generate ORC metadata. Objtool should really be running immediately after GCC anyway, without a linker call in between. Change the makefile ordering so that objtool is called before the linker. Reported-and-tested-by: Markus Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: ee9f8fce9964 ("x86/unwind: Add the ORC unwinder") Link: http://lkml.kernel.org/r/355f04da33581f4a3bf82e5b512973624a1e23a2.1516025651.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar scripts/Makefile.build | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit ae59c3f0b6cfd472fed96e50548a799b8971d876 Author: Leon Romanovsky Date: Fri Jan 12 07:58:39 2018 +0200 RDMA/mlx5: Fix out-of-bound access while querying AH The rdma_ah_find_type() accesses the port array based on an index controlled by userspace. The existing bounds check is after the first use of the index, so userspace can generate an out of bounds access, as shown by the KASN report below. ================================================================== BUG: KASAN: slab-out-of-bounds in to_rdma_ah_attr+0xa8/0x3b0 Read of size 4 at addr ffff880019ae2268 by task ibv_rc_pingpong/409 CPU: 0 PID: 409 Comm: ibv_rc_pingpong Not tainted 4.15.0-rc2-00031-gb60a3faf5b83-dirty #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-0-ge51488c-20140602_164612-nilsson.home.kraxel.org 04/01/2014 Call Trace: dump_stack+0xe9/0x18f print_address_description+0xa2/0x350 kasan_report+0x3a5/0x400 to_rdma_ah_attr+0xa8/0x3b0 mlx5_ib_query_qp+0xd35/0x1330 ib_query_qp+0x8a/0xb0 ib_uverbs_query_qp+0x237/0x7f0 ib_uverbs_write+0x617/0xd80 __vfs_write+0xf7/0x500 vfs_write+0x149/0x310 SyS_write+0xca/0x190 entry_SYSCALL_64_fastpath+0x18/0x85 RIP: 0033:0x7fe9c7a275a0 RSP: 002b:00007ffee5498738 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fe9c7ce4b00 RCX: 00007fe9c7a275a0 RDX: 0000000000000018 RSI: 00007ffee5498800 RDI: 0000000000000003 RBP: 000055d0c8d3f010 R08: 00007ffee5498800 R09: 0000000000000018 R10: 00000000000000ba R11: 0000000000000246 R12: 0000000000008000 R13: 0000000000004fb0 R14: 000055d0c8d3f050 R15: 00007ffee5498560 Allocated by task 1: __kmalloc+0x3f9/0x430 alloc_mad_private+0x25/0x50 ib_mad_post_receive_mads+0x204/0xa60 ib_mad_init_device+0xa59/0x1020 ib_register_device+0x83a/0xbc0 mlx5_ib_add+0x50e/0x5c0 mlx5_add_device+0x142/0x410 mlx5_register_interface+0x18f/0x210 mlx5_ib_init+0x56/0x63 do_one_initcall+0x15b/0x270 kernel_init_freeable+0x2d8/0x3d0 kernel_init+0x14/0x190 ret_from_fork+0x24/0x30 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff880019ae2000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 104 bytes to the right of 512-byte region [ffff880019ae2000, ffff880019ae2200) The buggy address belongs to the page: page:000000005d674e18 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x4000000000008100(slab|head) raw: 4000000000008100 0000000000000000 0000000000000000 00000001000c000c raw: dead000000000100 dead000000000200 ffff88001a402000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff880019ae2100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff880019ae2180: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc >ffff880019ae2200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff880019ae2280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff880019ae2300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== Disabling lock debugging due to kernel taint Cc: Fixes: 44c58487d51a ("IB/core: Define 'ib' and 'roce' rdma_ah_attr types") Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/qp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 6311b7ce42e0c1d6d944bc099dc47e936c20cf11 Author: Johannes Berg Date: Mon Jan 15 12:42:25 2018 +0100 netlink: extack: avoid parenthesized string constant warning NL_SET_ERR_MSG() and NL_SET_ERR_MSG_ATTR() lead to the following warning in newer versions of gcc: warning: array initialized from parenthesized string constant Just remove the parentheses, they're not needed in this context since anyway since there can be no operator precendence issues or similar. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller include/linux/netlink.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit db9ca5cacbda79c3c51c723006418f5b864b47fe Merge: 17d0fb0 cd9ff4d Author: David S. Miller Date: Mon Jan 15 14:53:44 2018 -0500 Merge branch 'ipv4-Make-neigh-lookup-keys-for-loopback-point-to-point-devices-be-INADDR_ANY' Jim Westfall says: ==================== ipv4: Make neigh lookup keys for loopback/point-to-point devices be INADDR_ANY This used to be the previous behavior in older kernels but became broken in a263b3093641f (ipv4: Make neigh lookups directly in output packet path) and then later removed because it was broken in 0bb4087cbec0 (ipv4: Fix neigh lookup keying over loopback/point-to-point devices) Not having this results in there being an arp entry for every remote ip address that the device talks to. Given a fairly active device it can cause the arp table to become huge and/or having to add/purge large number of entires to keep within table size thresholds. $ ip -4 neigh show nud noarp | grep tun | wc -l 55850 $ lnstat -k arp_cache:entries,arp_cache:allocs,arp_cache:destroys -c 10 arp_cach|arp_cach|arp_cach| entries| allocs|destroys| 81493|620166816|620126069| 101867| 10186| 0| 113854| 5993| 0| 118773| 2459| 0| 27937| 18579| 63998| 39256| 5659| 0| 56231| 8487| 0| 65602| 4685| 0| 79697| 7047| 0| 90733| 5517| 0| v2: - fixes coding style issues ==================== Signed-off-by: David S. Miller commit cd9ff4de0107c65d69d02253bb25d6db93c3dbc1 Author: Jim Westfall Date: Sun Jan 14 04:18:51 2018 -0800 ipv4: Make neigh lookup keys for loopback/point-to-point devices be INADDR_ANY Map all lookup neigh keys to INADDR_ANY for loopback/point-to-point devices to avoid making an entry for every remote ip the device needs to talk to. This used the be the old behavior but became broken in a263b3093641f (ipv4: Make neigh lookups directly in output packet path) and later removed in 0bb4087cbec0 (ipv4: Fix neigh lookup keying over loopback/point-to-point devices) because it was broken. Signed-off-by: Jim Westfall Signed-off-by: David S. Miller include/net/arp.h | 3 +++ net/ipv4/arp.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 096b9854c04df86f03b38a97d40b6506e5730919 Author: Jim Westfall Date: Sun Jan 14 04:18:50 2018 -0800 net: Allow neigh contructor functions ability to modify the primary_key Use n->primary_key instead of pkey to account for the possibility that a neigh constructor function may have modified the primary_key value. Signed-off-by: Jim Westfall Signed-off-by: David S. Miller net/core/neighbour.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 17d0fb0caa68f2bfd8aaa8125ff15abebfbfa1d7 Author: Sergei Shtylyov Date: Sat Jan 13 20:22:01 2018 +0300 sh_eth: fix dumping ARSTR ARSTR is always located at the start of the TSU register region, thus using add_reg() instead of add_tsu_reg() in __sh_eth_get_regs() to dump it causes EDMR or EDSR (depending on the register layout) to be dumped instead of ARSTR. Use the correct condition/macro there... Fixes: 6b4b4fead342 ("sh_eth: Implement ethtool register dump operations") Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95a332088ecb113c2e8753fa3f1df9b0dda9beec Author: William Tu Date: Fri Jan 12 12:29:22 2018 -0800 Revert "openvswitch: Add erspan tunnel support." This reverts commit ceaa001a170e43608854d5290a48064f57b565ed. The OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS attr should be designed as a nested attribute to support all ERSPAN v1 and v2's fields. The current attr is a be32 supporting only one field. Thus, this patch reverts it and later patch will redo it using nested attr. Signed-off-by: William Tu Cc: Jiri Benc Cc: Pravin Shelar Acked-by: Jiri Benc Acked-by: Pravin B Shelar Signed-off-by: David S. Miller include/uapi/linux/openvswitch.h | 1 - net/openvswitch/flow_netlink.c | 51 +--------------------------------------- 2 files changed, 1 insertion(+), 51 deletions(-) commit 30be8f8dba1bd2aff73e8447d59228471233a3d4 Author: r.hering@avm.de Date: Fri Jan 12 15:42:06 2018 +0100 net/tls: Fix inverted error codes to avoid endless loop sendfile() calls can hang endless with using Kernel TLS if a socket error occurs. Socket error codes must be inverted by Kernel TLS before returning because they are stored with positive sign. If returned non-inverted they are interpreted as number of bytes sent, causing endless looping of the splice mechanic behind sendfile(). Signed-off-by: Robert Hering Signed-off-by: David S. Miller include/net/tls.h | 2 +- net/tls/tls_sw.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 95ef498d977bf44ac094778fd448b98af158a3e6 Author: Eric Dumazet Date: Thu Jan 11 22:31:18 2018 -0800 ipv6: ip6_make_skb() needs to clear cork.base.dst In my last patch, I missed fact that cork.base.dst was not initialized in ip6_make_skb() : If ip6_setup_cork() returns an error, we might attempt a dst_release() on some random pointer. Fixes: 862c03ee1deb ("ipv6: fix possible mem leaks in ipv6_make_skb()") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller net/ipv6/ip6_output.c | 1 + 1 file changed, 1 insertion(+) commit 68e76e034b6b1c1ce2eece1ab8ae4008e14be470 Author: Randy Dunlap Date: Mon Jan 15 11:07:27 2018 -0800 tracing: Prevent PROFILE_ALL_BRANCHES when FORTIFY_SOURCE=y I regularly get 50 MB - 60 MB files during kernel randconfig builds. These large files mostly contain (many repeats of; e.g., 124,594): In file included from ../include/linux/string.h:6:0, from ../include/linux/uuid.h:20, from ../include/linux/mod_devicetable.h:13, from ../scripts/mod/devicetable-offsets.c:3: ../include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'strcpy' which is not static [enabled by default] ______f = { \ ^ ../include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if' ^ ../include/linux/string.h:425:2: note: in expansion of macro 'if' if (p_size == (size_t)-1 && q_size == (size_t)-1) ^ This only happens when CONFIG_FORTIFY_SOURCE=y and CONFIG_PROFILE_ALL_BRANCHES=y, so prevent PROFILE_ALL_BRANCHES if FORTIFY_SOURCE=y. Link: http://lkml.kernel.org/r/9199446b-a141-c0c3-9678-a3f9107f2750@infradead.org Signed-off-by: Randy Dunlap Signed-off-by: Steven Rostedt (VMware) kernel/trace/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37f47bc90c7481e7959703ad1defc4fc9f5d85e3 Author: Marcelo Ricardo Leitner Date: Thu Jan 11 14:22:06 2018 -0200 sctp: avoid compiler warning on implicit fallthru These fall-through are expected. Signed-off-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Reviewed-by: Xin Long Signed-off-by: David S. Miller net/sctp/ipv6.c | 1 + net/sctp/outqueue.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 6503a30440962f1e1ccb8868816b4e18201218d4 Author: Lorenzo Colitti Date: Thu Jan 11 18:36:26 2018 +0900 net: ipv4: Make "ip route get" match iif lo rules again. Commit 3765d35ed8b9 ("net: ipv4: Convert inet_rtm_getroute to rcu versions of route lookup") broke "ip route get" in the presence of rules that specify iif lo. Host-originated traffic always has iif lo, because ip_route_output_key_hash and ip6_route_output_flags set the flow iif to LOOPBACK_IFINDEX. Thus, putting "iif lo" in an ip rule is a convenient way to select only originated traffic and not forwarded traffic. inet_rtm_getroute used to match these rules correctly because even though it sets the flow iif to 0, it called ip_route_output_key which overwrites iif with LOOPBACK_IFINDEX. But now that it calls ip_route_output_key_hash_rcu, the ifindex will remain 0 and not match the iif lo in the rule. As a result, "ip route get" will return ENETUNREACH. Fixes: 3765d35ed8b9 ("net: ipv4: Convert inet_rtm_getroute to rcu versions of route lookup") Tested: https://android.googlesource.com/kernel/tests/+/master/net/test/multinetwork_test.py passes again Signed-off-by: Lorenzo Colitti Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv4/route.c | 1 + 1 file changed, 1 insertion(+) commit cbbdf8433a5f117b1a2119ea30fc651b61ef7570 Author: David Ahern Date: Wed Jan 10 13:00:39 2018 -0800 netlink: extack needs to be reset each time through loop syzbot triggered the WARN_ON in netlink_ack testing the bad_attr value. The problem is that netlink_rcv_skb loops over the skb repeatedly invoking the callback and without resetting the extack leaving potentially stale data. Initializing each time through avoids the WARN_ON. Fixes: 2d4bc93368f5a ("netlink: extended ACK reporting") Reported-by: syzbot+315fa6766d0f7c359327@syzkaller.appspotmail.com Signed-off-by: David Ahern Signed-off-by: David S. Miller net/netlink/af_netlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 59b36613e85fb16ebf9feaf914570879cd5c2a21 Author: Cong Wang Date: Wed Jan 10 12:50:25 2018 -0800 tipc: fix a memory leak in tipc_nl_node_get_link() When tipc_node_find_by_name() fails, the nlmsg is not freed. While on it, switch to a goto label to properly free it. Fixes: be9c086715c ("tipc: narrow down exposure of struct tipc_node") Reported-by: Dmitry Vyukov Cc: Jon Maloy Cc: Ying Xue Signed-off-by: Cong Wang Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/node.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 749439bfac6e1a2932c582e2699f91d329658196 Author: Mike Maloney Date: Wed Jan 10 12:45:10 2018 -0500 ipv6: fix udpv6 sendmsg crash caused by too small MTU The logic in __ip6_append_data() assumes that the MTU is at least large enough for the headers. A device's MTU may be adjusted after being added while sendmsg() is processing data, resulting in __ip6_append_data() seeing any MTU. For an mtu smaller than the size of the fragmentation header, the math results in a negative 'maxfraglen', which causes problems when refragmenting any previous skb in the skb_write_queue, leaving it possibly malformed. Instead sendmsg returns EINVAL when the mtu is calculated to be less than IPV6_MIN_MTU. Found by syzkaller: kernel BUG at ./include/linux/skbuff.h:2064! invalid opcode: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 14216 Comm: syz-executor5 Not tainted 4.13.0-rc4+ #2 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801d0b68580 task.stack: ffff8801ac6b8000 RIP: 0010:__skb_pull include/linux/skbuff.h:2064 [inline] RIP: 0010:__ip6_make_skb+0x18cf/0x1f70 net/ipv6/ip6_output.c:1617 RSP: 0018:ffff8801ac6bf570 EFLAGS: 00010216 RAX: 0000000000010000 RBX: 0000000000000028 RCX: ffffc90003cce000 RDX: 00000000000001b8 RSI: ffffffff839df06f RDI: ffff8801d9478ca0 RBP: ffff8801ac6bf780 R08: ffff8801cc3f1dbc R09: 0000000000000000 R10: ffff8801ac6bf7a0 R11: 43cb4b7b1948a9e7 R12: ffff8801cc3f1dc8 R13: ffff8801cc3f1d40 R14: 0000000000001036 R15: dffffc0000000000 FS: 00007f43d740c700(0000) GS:ffff8801dc100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7834984000 CR3: 00000001d79b9000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ip6_finish_skb include/net/ipv6.h:911 [inline] udp_v6_push_pending_frames+0x255/0x390 net/ipv6/udp.c:1093 udpv6_sendmsg+0x280d/0x31a0 net/ipv6/udp.c:1363 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 SYSC_sendto+0x352/0x5a0 net/socket.c:1750 SyS_sendto+0x40/0x50 net/socket.c:1718 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x4512e9 RSP: 002b:00007f43d740bc08 EFLAGS: 00000216 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00000000007180a8 RCX: 00000000004512e9 RDX: 000000000000002e RSI: 0000000020d08000 RDI: 0000000000000005 RBP: 0000000000000086 R08: 00000000209c1000 R09: 000000000000001c R10: 0000000000040800 R11: 0000000000000216 R12: 00000000004b9c69 R13: 00000000ffffffff R14: 0000000000000005 R15: 00000000202c2000 Code: 9e 01 fe e9 c5 e8 ff ff e8 7f 9e 01 fe e9 4a ea ff ff 48 89 f7 e8 52 9e 01 fe e9 aa eb ff ff e8 a8 b6 cf fd 0f 0b e8 a1 b6 cf fd <0f> 0b 49 8d 45 78 4d 8d 45 7c 48 89 85 78 fe ff ff 49 8d 85 ba RIP: __skb_pull include/linux/skbuff.h:2064 [inline] RSP: ffff8801ac6bf570 RIP: __ip6_make_skb+0x18cf/0x1f70 net/ipv6/ip6_output.c:1617 RSP: ffff8801ac6bf570 Reported-by: syzbot Signed-off-by: Mike Maloney Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6_output.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6200b430220f3b9207861b16f57916950f4ecd8e Author: Arnd Bergmann Date: Wed Jan 10 17:30:22 2018 +0100 net: cs89x0: add MODULE_LICENSE This driver lacks a MODULE_LICENSE tag, leading to a Kbuild warning: WARNING: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/cirrus/cs89x0.o This adds license, author, and description according to the comment block at the start of the file. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/cirrus/cs89x0.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0171c41835591e9aa2e384b703ef9a6ae367c610 Author: Guillaume Nault Date: Wed Jan 10 16:24:45 2018 +0100 ppp: unlock all_ppp_mutex before registering device ppp_dev_uninit(), which is the .ndo_uninit() handler of PPP devices, needs to lock pn->all_ppp_mutex. Therefore we mustn't call register_netdevice() with pn->all_ppp_mutex already locked, or we'd deadlock in case register_netdevice() fails and calls .ndo_uninit(). Fortunately, we can unlock pn->all_ppp_mutex before calling register_netdevice(). This lock protects pn->units_idr, which isn't used in the device registration process. However, keeping pn->all_ppp_mutex locked during device registration did ensure that no device in transient state would be published in pn->units_idr. In practice, unlocking it before calling register_netdevice() doesn't change this property: ppp_unit_register() is called with 'ppp_mutex' locked and all searches done in pn->units_idr hold this lock too. Fixes: 8cb775bc0a34 ("ppp: fix device unregistration upon netns deletion") Reported-and-tested-by: syzbot+367889b9c9e279219175@syzkaller.appspotmail.com Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 66940f35d5a81d5969bb5543171c70a434fc5110 Author: Michael S. Tsirkin Date: Wed Jan 10 16:03:05 2018 +0200 ptr_ring: document usage around __ptr_ring_peek This explains why is the net usage of __ptr_ring_peek actually ok without locks. Signed-off-by: Michael S. Tsirkin Acked-by: John Fastabend Signed-off-by: David S. Miller include/linux/ptr_ring.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit d542296a4d0d9f41d0186edcac2baba1b674d02f Author: Stephen Hemminger Date: Mon Jan 8 08:23:18 2018 -0800 9p: add missing module license for xen transport The 9P of Xen module is missing required license and module information. See https://bugzilla.kernel.org/show_bug.cgi?id=198109 Reported-by: Alan Bartlett Fixes: 868eb122739a ("xen/9pfs: introduce Xen 9pfs transport driver") Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/9p/trans_xen.c | 4 ++++ 1 file changed, 4 insertions(+) commit a0e3a18f4baf8e3754ac1e56f0ade924d0c0c721 Author: Steven Rostedt (VMware) Date: Mon Jan 15 10:47:09 2018 -0500 ring-buffer: Bring back context level recursive checks Commit 1a149d7d3f45 ("ring-buffer: Rewrite trace_recursive_(un)lock() to be simpler") replaced the context level recursion checks with a simple counter. This would prevent the ring buffer code from recursively calling itself more than the max number of contexts that exist (Normal, softirq, irq, nmi). But this change caused a lockup in a specific case, which was during suspend and resume using a global clock. Adding a stack dump to see where this occurred, the issue was in the trace global clock itself: trace_buffer_lock_reserve+0x1c/0x50 __trace_graph_entry+0x2d/0x90 trace_graph_entry+0xe8/0x200 prepare_ftrace_return+0x69/0xc0 ftrace_graph_caller+0x78/0xa8 queued_spin_lock_slowpath+0x5/0x1d0 trace_clock_global+0xb0/0xc0 ring_buffer_lock_reserve+0xf9/0x390 The function graph tracer traced queued_spin_lock_slowpath that was called by trace_clock_global. This pointed out that the trace_clock_global() is not reentrant, as it takes a spin lock. It depended on the ring buffer recursive lock from letting that happen. By removing the context detection and adding just a max number of allowable recursions, it allowed the trace_clock_global() to be entered again and try to retake the spinlock it already held, causing a deadlock. Fixes: 1a149d7d3f45 ("ring-buffer: Rewrite trace_recursive_(un)lock() to be simpler") Reported-by: David Weinehall Signed-off-by: Steven Rostedt (VMware) kernel/trace/ring_buffer.c | 62 +++++++++++++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 17 deletions(-) commit 4488496d58200c7511842e049a4cc891d928da56 Author: Ville Syrjälä Date: Wed Nov 29 14:54:11 2017 +0200 drm/i915: Fix deadlock in i830_disable_pipe() i830_disable_pipe() gets called from the power well code, and thus we're already holding the power domain mutex. That means we can't call plane->get_hw_state() as it will also try to grab the same mutex and will thus deadlock. Replace the assert_plane() calls (which calls ->get_hw_state()) with just raw register reads in i830_disable_pipe(). As a bonus we can now get a warning if plane C is enabled even though we don't even expose it as a drm plane. v2: Do a separate WARN_ON() for each plane (Chris) Cc: Chris Wilson Reviewed-by: Chris Wilson Fixes: d87ce7640295 ("drm/i915: Add .get_hw_state() method for planes") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171129125411.29055-1-ville.syrjala@linux.intel.com (cherry picked from commit 5816d9cbc0a0fbf232fe297cefcb85361a3cde90) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 23ac12732825901b3fc6ac720958d8bff9a0d6ec Author: Ville Syrjälä Date: Fri Nov 17 21:19:09 2017 +0200 drm/i915: Redo plane sanitation during readout Unify the plane disabling during state readout by pulling the code into a new helper intel_plane_disable_noatomic(). We'll also read out the state of all planes, so that we know which planes really need to be diabled. Additonally we change the plane<->pipe mapping sanitation to work by simply disabling the offending planes instead of entire pipes. And we do it before we otherwise sanitize the crtcs, which means we don't have to worry about misassigned planes during crtc sanitation anymore. v2: Reoder patches to not depend on enum old_plane_id v3: s/for_each_pipe/for_each_intel_crtc/ Cc: Thierry Reding Cc: Alex Villacís Lasso Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103223 Reviewed-by: Daniel Vetter Tested-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20171117191917.11506-3-ville.syrjala@linux.intel.com Signed-off-by: Ville Syrjälä (cherry picked from commit b1e01595a66dc206a2c75401ec4c285740537f3f) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 114 ++++++++++++++++++++--------------- 1 file changed, 65 insertions(+), 49 deletions(-) commit d87ce76402950b8e4d5117276d44465658e886a4 Author: Ville Syrjälä Date: Fri Nov 17 21:19:08 2017 +0200 drm/i915: Add .get_hw_state() method for planes Add a .get_hw_state() method for planes, returning true or false depending on whether the plane is enabled. Use it to rewrite the plane enabled/disabled asserts in platform agnostic fashion. We do lose the pre-gen4 plane<->pipe mapping checks, but since we're supposed sanitize that anyway it doesn't really matter. v2: Reoder patches to not depend on enum old_plane_id Just call assert_plane_disabled() from assert_planes_disabled() v3: Deal with disabled power wells in .get_hw_state() v4: Rebase due skl primary plane code removal Cc: Thierry Reding Cc: Alex Villacís Lasso Reviewed-by: Daniel Vetter #v2 Tested-by: Thierry Reding #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20171117191917.11506-2-ville.syrjala@linux.intel.com Signed-off-by: Ville Syrjälä (cherry picked from commit 51f5a096398433a881e845d3685a2c1dac756019) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 188 +++++++++++++++++------------------ drivers/gpu/drm/i915/intel_drv.h | 2 + drivers/gpu/drm/i915/intel_sprite.c | 83 ++++++++++++++++ 3 files changed, 175 insertions(+), 98 deletions(-) commit 499ed50f603b4c9834197b2411ba3bd9aaa624d4 Author: Benoît Thébaudeau Date: Sun Jan 14 19:43:05 2018 +0100 mmc: sdhci-esdhc-imx: Fix i.MX53 eSDHCv3 clock Commit 5143c953a786 ("mmc: sdhci-esdhc-imx: Allow all supported prescaler values") made it possible to set SYSCTL.SDCLKFS to 0 in SDR mode, thus bypassing the SD clock frequency prescaler, in order to be able to get higher SD clock frequencies in some contexts. However, that commit missed the fact that this value is illegal on the eSDHCv3 instance of the i.MX53. This seems to be the only exception on i.MX, this value being legal even for the eSDHCv2 instances of the i.MX53. Fix this issue by changing the minimum prescaler value if the i.MX53 eSDHCv3 is detected. According to the i.MX53 reference manual, if DLLCTRL[10] can be set, then the controller is eSDHCv3, else it is eSDHCv2. This commit fixes the following issue, which was preventing the i.MX53 Loco (IMX53QSB) board from booting Linux 4.15.0-rc5: [ 1.882668] mmcblk1: error -84 transferring data, sector 2048, nr 8, cmd response 0x900, card status 0xc00 [ 2.002255] mmcblk1: error -84 transferring data, sector 2050, nr 6, cmd response 0x900, card status 0xc00 [ 12.645056] mmc1: Timeout waiting for hardware interrupt. [ 12.650473] mmc1: sdhci: ============ SDHCI REGISTER DUMP =========== [ 12.656921] mmc1: sdhci: Sys addr: 0x00000000 | Version: 0x00001201 [ 12.663366] mmc1: sdhci: Blk size: 0x00000004 | Blk cnt: 0x00000000 [ 12.669813] mmc1: sdhci: Argument: 0x00000000 | Trn mode: 0x00000013 [ 12.676258] mmc1: sdhci: Present: 0x01f8028f | Host ctl: 0x00000013 [ 12.682703] mmc1: sdhci: Power: 0x00000002 | Blk gap: 0x00000000 [ 12.689148] mmc1: sdhci: Wake-up: 0x00000000 | Clock: 0x0000003f [ 12.695594] mmc1: sdhci: Timeout: 0x0000008e | Int stat: 0x00000000 [ 12.702039] mmc1: sdhci: Int enab: 0x107f004b | Sig enab: 0x107f004b [ 12.708485] mmc1: sdhci: AC12 err: 0x00000000 | Slot int: 0x00001201 [ 12.714930] mmc1: sdhci: Caps: 0x07eb0000 | Caps_1: 0x08100810 [ 12.721375] mmc1: sdhci: Cmd: 0x0000163a | Max curr: 0x00000000 [ 12.727821] mmc1: sdhci: Resp[0]: 0x00000920 | Resp[1]: 0x00000000 [ 12.734265] mmc1: sdhci: Resp[2]: 0x00000000 | Resp[3]: 0x00000000 [ 12.740709] mmc1: sdhci: Host ctl2: 0x00000000 [ 12.745157] mmc1: sdhci: ADMA Err: 0x00000001 | ADMA Ptr: 0xc8049200 [ 12.751601] mmc1: sdhci: ============================================ [ 12.758110] print_req_error: I/O error, dev mmcblk1, sector 2050 [ 12.764135] Buffer I/O error on dev mmcblk1p1, logical block 0, lost sync page write [ 12.775163] EXT4-fs (mmcblk1p1): mounted filesystem without journal. Opts: (null) [ 12.782746] VFS: Mounted root (ext4 filesystem) on device 179:9. [ 12.789151] mmcblk1: response CRC error sending SET_BLOCK_COUNT command, card status 0x900 Signed-off-by: Benoît Thébaudeau Reported-by: Wladimir J. van der Laan Tested-by: Wladimir J. van der Laan Fixes: 5143c953a786 ("mmc: sdhci-esdhc-imx: Allow all supported prescaler values") Cc: # v4.13+ Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-esdhc-imx.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 59b179b48ce2a6076448a44531242ac2b3f6cef2 Author: Johannes Berg Date: Mon Jan 15 09:58:27 2018 +0100 cfg80211: check dev_set_name() return value syzbot reported a warning from rfkill_alloc(), and after a while I think that the reason is that it was doing fault injection and the dev_set_name() failed, leaving the name NULL, and we didn't check the return value and got to rfkill_alloc() with a NULL name. Since we really don't want a NULL name, we ought to check the return value. Fixes: fb28ad35906a ("net: struct device - replace bus_id with dev_name(), dev_set_name()") Reported-by: syzbot+1ddfb3357e1d7bb5b5d3@syzkaller.appspotmail.com Signed-off-by: Johannes Berg net/wireless/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 51a1aaa631c90223888d8beac4d649dc11d2ca55 Author: Johannes Berg Date: Mon Jan 15 09:32:36 2018 +0100 mac80211_hwsim: validate number of different channels When creating a new radio on the fly, hwsim allows this to be done with an arbitrary number of channels, but cfg80211 only supports a limited number of simultaneous channels, leading to a warning. Fix this by validating the number - this requires moving the define for the maximum out to a visible header file. Reported-by: syzbot+8dd9051ff19940290931@syzkaller.appspotmail.com Fixes: b59ec8dd4394 ("mac80211_hwsim: fix number of channels in interface combinations") Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 5 +++++ include/net/cfg80211.h | 2 ++ net/wireless/core.h | 2 -- 3 files changed, 7 insertions(+), 2 deletions(-) commit b71d856ab536f25eb97c011a351ecddf5518de41 Author: Benjamin Beichler Date: Wed Jan 10 17:42:51 2018 +0100 mac80211_hwsim: add workqueue to wait for deferred radio deletion on mod unload When closing multiple wmediumd instances with many radios and try to unload the mac80211_hwsim module, it may happen that the work items live longer than the module. To wait especially for this deletion work items, add a work queue, otherwise flush_scheduled_work would be necessary. Signed-off-by: Benjamin Beichler Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 7a94b8c2eee7083ddccd0515830f8c81a8e44b1a Author: Dominik Brodowski Date: Mon Jan 15 08:12:15 2018 +0100 nl80211: take RCU read lock when calling ieee80211_bss_get_ie() As ieee80211_bss_get_ie() derefences an RCU to return ssid_ie, both the call to this function and any operation on this variable need protection by the RCU read lock. Fixes: 44905265bc15 ("nl80211: don't expose wdev->ssid for most interfaces") Signed-off-by: Dominik Brodowski Signed-off-by: Johannes Berg net/wireless/nl80211.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit a48a52b7bea81c046fe1c1288f84d0eba214cba0 Author: Johannes Berg Date: Mon Jan 15 09:12:05 2018 +0100 cfg80211: fully initialize old channel for event Paul reported that he got a report about undefined behaviour that seems to me to originate in using uninitialized memory when the channel structure here is used in the event code in nl80211 later. He never reported whether this fixed it, and I wasn't able to trigger this so far, but we should do the right thing and fully initialize the on-stack structure anyway. Reported-by: Paul Menzel Signed-off-by: Johannes Berg net/wireless/reg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 28d437d550e1e39f805d99f9f8ac399c778827b7 Author: Tom Lendacky Date: Sat Jan 13 17:27:30 2018 -0600 x86/retpoline: Add LFENCE to the retpoline/RSB filling RSB macros The PAUSE instruction is currently used in the retpoline and RSB filling macros as a speculation trap. The use of PAUSE was originally suggested because it showed a very, very small difference in the amount of cycles/time used to execute the retpoline as compared to LFENCE. On AMD, the PAUSE instruction is not a serializing instruction, so the pause/jmp loop will use excess power as it is speculated over waiting for return to mispredict to the correct target. The RSB filling macro is applicable to AMD, and, if software is unable to verify that LFENCE is serializing on AMD (possible when running under a hypervisor), the generic retpoline support will be used and, so, is also applicable to AMD. Keep the current usage of PAUSE for Intel, but add an LFENCE instruction to the speculation trap for AMD. The same sequence has been adopted by GCC for the GCC generated retpolines. Signed-off-by: Tom Lendacky Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Acked-by: David Woodhouse Acked-by: Arjan van de Ven Cc: Rik van Riel Cc: Andi Kleen Cc: Paul Turner Cc: Peter Zijlstra Cc: Tim Chen Cc: Jiri Kosina Cc: Dave Hansen Cc: Andy Lutomirski Cc: Josh Poimboeuf Cc: Dan Williams Cc: Linus Torvalds Cc: Greg Kroah-Hartman Cc: Kees Cook Link: https://lkml.kernel.org/r/20180113232730.31060.36287.stgit@tlendack-t1.amdoffice.net arch/x86/include/asm/nospec-branch.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c995efd5a740d9cbafbf58bde4973e8b50b4d761 Author: David Woodhouse Date: Fri Jan 12 17:49:25 2018 +0000 x86/retpoline: Fill RSB on context switch for affected CPUs On context switch from a shallow call stack to a deeper one, as the CPU does 'ret' up the deeper side it may encounter RSB entries (predictions for where the 'ret' goes to) which were populated in userspace. This is problematic if neither SMEP nor KPTI (the latter of which marks userspace pages as NX for the kernel) are active, as malicious code in userspace may then be executed speculatively. Overwrite the CPU's return prediction stack with calls which are predicted to return to an infinite loop, to "capture" speculation if this happens. This is required both for retpoline, and also in conjunction with IBRS for !SMEP && !KPTI. On Skylake+ the problem is slightly different, and an *underflow* of the RSB may cause errant branch predictions to occur. So there it's not so much overwrite, as *filling* the RSB to attempt to prevent it getting empty. This is only a partial solution for Skylake+ since there are many other conditions which may result in the RSB becoming empty. The full solution on Skylake+ is to use IBRS, which will prevent the problem even when the RSB becomes empty. With IBRS, the RSB-stuffing will not be required on context switch. [ tglx: Added missing vendor check and slighty massaged comments and changelog ] Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Acked-by: Arjan van de Ven Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Andi Kleen Cc: Josh Poimboeuf Cc: thomas.lendacky@amd.com Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Tim Chen Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/1515779365-9032-1-git-send-email-dwmw@amazon.co.uk arch/x86/entry/entry_32.S | 11 +++++++++++ arch/x86/entry/entry_64.S | 11 +++++++++++ arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/bugs.c | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 59 insertions(+) commit 0d39e2669d7b0fefd2d8f9e7868ae669b364d9ba Author: Andrey Ryabinin Date: Wed Jan 10 18:36:02 2018 +0300 x86/kasan: Panic if there is not enough memory to boot Currently KASAN doesn't panic in case it don't have enough memory to boot. Instead, it crashes in some random place: kernel BUG at arch/x86/mm/physaddr.c:27! RIP: 0010:__phys_addr+0x268/0x276 Call Trace: kasan_populate_shadow+0x3f2/0x497 kasan_init+0x12e/0x2b2 setup_arch+0x2825/0x2a2c start_kernel+0xc8/0x15f4 x86_64_start_reservations+0x2a/0x2c x86_64_start_kernel+0x72/0x75 secondary_startup_64+0xa5/0xb0 Use memblock_virt_alloc_try_nid() for allocations without failure fallback. It will panic with an out of memory message. Reported-by: kernel test robot Signed-off-by: Andrey Ryabinin Signed-off-by: Thomas Gleixner Acked-by: Dmitry Vyukov Cc: kasan-dev@googlegroups.com Cc: Alexander Potapenko Cc: lkp@01.org Link: https://lkml.kernel.org/r/20180110153602.18919-1-aryabinin@virtuozzo.com arch/x86/mm/kasan_init_64.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit a8750ddca918032d6349adbf9a4b6555e7db20da Author: Linus Torvalds Date: Sun Jan 14 15:32:30 2018 -0800 Linux 4.15-rc8 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aaae98a8025bcdd22c986b0168ea8f39d0c4ed10 Merge: 6bb8211 b8b9ce4 Author: Linus Torvalds Date: Sun Jan 14 15:30:02 2018 -0800 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixlet from Thomas Gleixner. Remove a warning about lack of compiler support for retpoline that most people can't do anything about, so it just annoys them needlessly. * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/retpoline: Remove compile time warning commit 6bb821193b6e8b9cc40714f700da27b4688cbc22 Merge: 9443c16 6e032b3 Author: Linus Torvalds Date: Sun Jan 14 15:03:17 2018 -0800 Merge tag 'powerpc-4.15-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "One fix for an oops at boot if we take a hotplug interrupt before we are ready to handle it. The bulk is patches to implement mitigation for Meltdown, see the change logs for more details. Thanks to: Nicholas Piggin, Michael Neuling, Oliver O'Halloran, Jon Masters, Jose Ricardo Ziviani, David Gibson" * tag 'powerpc-4.15-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/powernv: Check device-tree for RFI flush settings powerpc/pseries: Query hypervisor for RFI flush settings powerpc/64s: Support disabling RFI flush with no_rfi_flush and nopti powerpc/64s: Add support for RFI flush of L1-D cache powerpc/64s: Convert slb_miss_common to use RFI_TO_USER/KERNEL powerpc/64: Convert fast_exception_return to use RFI_TO_USER/KERNEL powerpc/64: Convert the syscall exit path to use RFI_TO_USER/KERNEL powerpc/64s: Simple RFI macro conversions powerpc/64: Add macros for annotating the destination of rfid/hrfid powerpc/pseries: Add H_GET_CPU_CHARACTERISTICS flags & wrapper powerpc/pseries: Make RAS IRQ explicitly dependent on DLPAR WQ commit ed4bbf7910b28ce3c691aef28d245585eaabda06 Author: Thomas Gleixner Date: Sun Jan 14 23:19:49 2018 +0100 timers: Unconditionally check deferrable base When the timer base is checked for expired timers then the deferrable base must be checked as well. This was missed when making the deferrable base independent of base::nohz_active. Fixes: ced6d5c11d3e ("timers: Use deferrable base independent of base::nohz_active") Signed-off-by: Thomas Gleixner Cc: Anna-Maria Gleixner Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: Paul McKenney Cc: stable@vger.kernel.org Cc: rt@linutronix.de kernel/time/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68fda450a7df51cff9e5a4d4a4d9d0d5f2589153 Author: Alexei Starovoitov Date: Fri Jan 12 18:59:52 2018 -0800 bpf: fix 32-bit divide by zero due to some JITs doing if (src_reg == 0) check in 64-bit mode for div/mod operations mask upper 32-bits of src register before doing the check Fixes: 622582786c9e ("net: filter: x86: internal BPF JIT") Fixes: 7a12b5031c6b ("sparc64: Add eBPF JIT.") Reported-by: syzbot+48340bb518e88849e2e3@syzkaller.appspotmail.com Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 18 ++++++++++++++++++ net/core/filter.c | 4 ++++ 2 files changed, 22 insertions(+) commit b8b9ce4b5aec8de9e23cabb0a26b78641f9ab1d6 Author: Thomas Gleixner Date: Sun Jan 14 22:13:29 2018 +0100 x86/retpoline: Remove compile time warning Remove the compile time warning when CONFIG_RETPOLINE=y and the compiler does not have retpoline support. Linus rationale for this is: It's wrong because it will just make people turn off RETPOLINE, and the asm updates - and return stack clearing - that are independent of the compiler are likely the most important parts because they are likely the ones easiest to target. And it's annoying because most people won't be able to do anything about it. The number of people building their own compiler? Very small. So if their distro hasn't got a compiler yet (and pretty much nobody does), the warning is just annoying crap. It is already properly reported as part of the sysfs interface. The compile-time warning only encourages bad things. Fixes: 76b043848fd2 ("x86/retpoline: Add initial retpoline support") Requested-by: Linus Torvalds Signed-off-by: Thomas Gleixner Cc: David Woodhouse Cc: Peter Zijlstra (Intel) Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Andi Kleen Cc: Josh Poimboeuf Cc: thomas.lendacky@amd.com Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Tim Chen Cc: Greg Kroah-Hartman Link: https://lkml.kernel.org/r/CA+55aFzWgquv4i6Mab6bASqYXg3ErV3XDFEYf=GEcCDQg5uAtw@mail.gmail.com arch/x86/Makefile | 2 -- 1 file changed, 2 deletions(-) commit 327867faa4d66628fcd92a843adb3345736a5313 Author: Andi Kleen Date: Thu Dec 21 16:18:21 2017 -0800 x86/idt: Mark IDT tables __initconst const variables must use __initconst, not __initdata. Fix this up for the IDT tables, which got it consistently wrong. Fixes: 16bc18d895ce ("x86/idt: Move 32-bit idt_descr to C code") Signed-off-by: Andi Kleen Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20171222001821.2157-7-andi@firstfloor.org arch/x86/kernel/idt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 9443c168505d308f5ecd8c0db249f6f62a39c448 Merge: 40548c6 32835a0 Author: Linus Torvalds Date: Sun Jan 14 10:22:45 2018 -0800 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull NVMe fix from Jens Axboe: "Just a single fix for nvme over fabrics that should go into 4.15" * 'for-linus' of git://git.kernel.dk/linux-block: nvme-fabrics: initialize default host->id in nvmf_host_default() commit fbe0e839d1e22d88810f3ee3e2f1479be4c0aa4a Author: Li Jinyue Date: Thu Dec 14 17:04:54 2017 +0800 futex: Prevent overflow by strengthen input validation UBSAN reports signed integer overflow in kernel/futex.c: UBSAN: Undefined behaviour in kernel/futex.c:2041:18 signed integer overflow: 0 - -2147483648 cannot be represented in type 'int' Add a sanity check to catch negative values of nr_wake and nr_requeue. Signed-off-by: Li Jinyue Signed-off-by: Thomas Gleixner Cc: peterz@infradead.org Cc: dvhart@infradead.org Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1513242294-31786-1-git-send-email-lijinyue@huawei.com kernel/futex.c | 3 +++ 1 file changed, 3 insertions(+) commit 40548c6b6c134275c750eb372dc2cf8ee1bbc3d4 Merge: 2c1cfa4 99a9dc9 Author: Linus Torvalds Date: Sun Jan 14 09:51:25 2018 -0800 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 pti updates from Thomas Gleixner: "This contains: - a PTI bugfix to avoid setting reserved CR3 bits when PCID is disabled. This seems to cause issues on a virtual machine at least and is incorrect according to the AMD manual. - a PTI bugfix which disables the perf BTS facility if PTI is enabled. The BTS AUX buffer is not globally visible and causes the CPU to fault when the mapping disappears on switching CR3 to user space. A full fix which restores BTS on PTI is non trivial and will be worked on. - PTI bugfixes for EFI and trusted boot which make sure that the user space visible page table entries have the NX bit cleared - removal of dead code in the PTI pagetable setup functions - add PTI documentation - add a selftest for vsyscall to verify that the kernel actually implements what it advertises. - a sysfs interface to expose vulnerability and mitigation information so there is a coherent way for users to retrieve the status. - the initial spectre_v2 mitigations, aka retpoline: + The necessary ASM thunk and compiler support + The ASM variants of retpoline and the conversion of affected ASM code + Make LFENCE serializing on AMD so it can be used as speculation trap + The RSB fill after vmexit - initial objtool support for retpoline As I said in the status mail this is the most of the set of patches which should go into 4.15 except two straight forward patches still on hold: - the retpoline add on of LFENCE which waits for ACKs - the RSB fill after context switch Both should be ready to go early next week and with that we'll have covered the major holes of spectre_v2 and go back to normality" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (28 commits) x86,perf: Disable intel_bts when PTI security/Kconfig: Correct the Documentation reference for PTI x86/pti: Fix !PCID and sanitize defines selftests/x86: Add test_vsyscall x86/retpoline: Fill return stack buffer on vmexit x86/retpoline/irq32: Convert assembler indirect jumps x86/retpoline/checksum32: Convert assembler indirect jumps x86/retpoline/xen: Convert Xen hypercall indirect jumps x86/retpoline/hyperv: Convert assembler indirect jumps x86/retpoline/ftrace: Convert ftrace assembler indirect jumps x86/retpoline/entry: Convert entry assembler indirect jumps x86/retpoline/crypto: Convert crypto assembler indirect jumps x86/spectre: Add boot time option to select Spectre v2 mitigation x86/retpoline: Add initial retpoline support objtool: Allow alternatives to be ignored objtool: Detect jumps to retpoline thunks x86/pti: Make unpoison of pgd for trusted boot work for real x86/alternatives: Fix optimize_nops() checking sysfs/cpu: Fix typos in vulnerability documentation x86/cpu/AMD: Use LFENCE_RDTSC in preference to MFENCE_RDTSC ... commit c1e2f0eaf015fb7076d51a339011f2383e6dd389 Author: Peter Zijlstra Date: Fri Dec 8 13:49:39 2017 +0100 futex: Avoid violating the 10th rule of futex Julia reported futex state corruption in the following scenario: waiter waker stealer (prio > waiter) futex(WAIT_REQUEUE_PI, uaddr, uaddr2, timeout=[N ms]) futex_wait_requeue_pi() futex_wait_queue_me() freezable_schedule() futex(LOCK_PI, uaddr2) futex(CMP_REQUEUE_PI, uaddr, uaddr2, 1, 0) /* requeues waiter to uaddr2 */ futex(UNLOCK_PI, uaddr2) wake_futex_pi() cmp_futex_value_locked(uaddr2, waiter) wake_up_q() task> futex(LOCK_PI, uaddr2) __rt_mutex_start_proxy_lock() try_to_take_rt_mutex() /* steals lock */ rt_mutex_set_owner(lock, stealer) rt_mutex_wait_proxy_lock() __rt_mutex_slowlock() try_to_take_rt_mutex() /* fails, lock held by stealer */ if (timeout && !timeout->task) return -ETIMEDOUT; fixup_owner() /* lock wasn't acquired, so, fixup_pi_state_owner skipped */ return -ETIMEDOUT; /* At this point, we've returned -ETIMEDOUT to userspace, but the * futex word shows waiter to be the owner, and the pi_mutex has * stealer as the owner */ futex_lock(LOCK_PI, uaddr2) -> bails with EDEADLK, futex word says we're owner. And suggested that what commit: 73d786bd043e ("futex: Rework inconsistent rt_mutex/futex_q state") removes from fixup_owner() looks to be just what is needed. And indeed it is -- I completely missed that requeue_pi could also result in this case. So we need to restore that, except that subsequent patches, like commit: 16ffa12d7425 ("futex: Pull rt_mutex_futex_unlock() out from under hb->lock") changed all the locking rules. Even without that, the sequence: - if (rt_mutex_futex_trylock(&q->pi_state->pi_mutex)) { - locked = 1; - goto out; - } - raw_spin_lock_irq(&q->pi_state->pi_mutex.wait_lock); - owner = rt_mutex_owner(&q->pi_state->pi_mutex); - if (!owner) - owner = rt_mutex_next_owner(&q->pi_state->pi_mutex); - raw_spin_unlock_irq(&q->pi_state->pi_mutex.wait_lock); - ret = fixup_pi_state_owner(uaddr, q, owner); already suggests there were races; otherwise we'd never have to look at next_owner. So instead of doing 3 consecutive wait_lock sections with who knows what races, we do it all in a single section. Additionally, the usage of pi_state->owner in fixup_owner() was only safe because only the rt_mutex owner would modify it, which this additional case wrecks. Luckily the values can only change away and not to the value we're testing, this means we can do a speculative test and double check once we have the wait_lock. Fixes: 73d786bd043e ("futex: Rework inconsistent rt_mutex/futex_q state") Reported-by: Julia Cartwright Reported-by: Gratian Crisan Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Julia Cartwright Tested-by: Gratian Crisan Cc: Darren Hart Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20171208124939.7livp7no2ov65rrc@hirez.programming.kicks-ass.net kernel/futex.c | 83 +++++++++++++++++++++++++++++++++-------- kernel/locking/rtmutex.c | 26 +++++++++---- kernel/locking/rtmutex_common.h | 1 + 3 files changed, 87 insertions(+), 23 deletions(-) commit c366287ebd698ef5e3de300d90cd62ee9ee7373e Author: Eric Dumazet Date: Fri Jan 12 17:43:23 2018 -0800 bpf: fix divides by zero Divides by zero are not nice, lets avoid them if possible. Also do_div() seems not needed when dealing with 32bit operands, but this seems a minor detail. Fixes: bd4cf0ed331a ("net: filter: rework/optimize internal BPF interpreter's instruction set") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: Alexei Starovoitov kernel/bpf/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8155aedf512edd3f88ef19f7cacf476ace7d1322 Merge: 5dd966c bbeb6e4 Author: David S. Miller Date: Sun Jan 14 11:01:33 2018 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-01-13 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Follow-up fix to the recent BPF out-of-bounds speculation fix that prevents max_entries overflows and an undefined behavior on 32 bit archs on index_mask calculation, from Daniel. 2) Reject unsupported BPF_ARSH opcode in 32 bit ALU mode that was otherwise throwing an unknown opcode warning in the interpreter, from Daniel. 3) Typo fix in one of the user facing verbose() messages that was added during the BPF out-of-bounds speculation fix, from Colin. ==================== Signed-off-by: David S. Miller commit fc90ccfd286eabb05ec54521367df8663cf0bbbf Author: Ville Syrjälä Date: Tue Nov 28 16:53:50 2017 +0200 Revert "x86/apic: Remove init_bsp_APIC()" This reverts commit b371ae0d4a194b178817b0edfb6a7395c7aec37a. It causes boot hangs on old P3/P4 systems when the local APIC is enforced in UP mode. Reported-by: Meelis Roos Signed-off-by: Ville Syrjälä Signed-off-by: Thomas Gleixner Cc: Dou Liyang Cc: yinghai@kernel.org Cc: bhe@redhat.com Link: https://lkml.kernel.org/r/20171128145350.21560-1-ville.syrjala@linux.intel.com arch/x86/include/asm/apic.h | 1 + arch/x86/kernel/apic/apic.c | 49 +++++++++++++++++++++++++++++++++++++++++++++ arch/x86/kernel/irqinit.c | 3 +++ 3 files changed, 53 insertions(+) commit beacd6f7ed5e2915959442245b3b2480c2e37490 Author: Eric W. Biederman Date: Fri Jan 12 14:31:35 2018 -0600 x86/mm/pkeys: Fix fill_sig_info_pkey SEGV_PKUERR is a signal specific si_code which happens to have the same numeric value as several others: BUS_MCEERR_AR, ILL_ILLTRP, FPE_FLTOVF, TRAP_HWBKPT, CLD_TRAPPED, POLL_ERR, SEGV_THREAD_ID, as such it is not safe to just test the si_code the signal number must also be tested to prevent a false positive in fill_sig_info_pkey. This error was by inspection, and BUS_MCEERR_AR appears to be a real candidate for confusion. So pass in si_signo and check for SIG_SEGV to verify that it is actually a SEGV_PKUERR Fixes: 019132ff3daf ("x86/mm/pkeys: Fill in pkey field in siginfo") Signed-off-by: "Eric W. Biederman" Signed-off-by: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: Dave Hansen Cc: Oleg Nesterov Cc: Al Viro cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180112203135.4669-2-ebiederm@xmission.com arch/x86/mm/fault.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 4b5b2127238e689ee18aa6752959751dd61c4c73 Author: Len Brown Date: Fri Dec 22 00:27:56 2017 -0500 x86/tsc: Print tsc_khz, when it differs from cpu_khz If CPU and TSC frequency are the same the printout of the CPU frequency is valid for the TSC as well: tsc: Detected 2900.000 MHz processor If the TSC frequency is different there is no information in dmesg. Add a conditional printout: tsc: Detected 2904.000 MHz TSC Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Cc: peterz@infradead.org Link: https://lkml.kernel.org/r/537b342debcd8e8aebc8d631015dcdf9f9ba8a26.1513920414.git.len.brown@intel.com arch/x86/kernel/tsc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b511203093489eb1829cb4de86e8214752205ac6 Author: Len Brown Date: Fri Dec 22 00:27:55 2017 -0500 x86/tsc: Fix erroneous TSC rate on Skylake Xeon The INTEL_FAM6_SKYLAKE_X hardcoded crystal_khz value of 25MHZ is problematic: - SKX workstations (with same model # as server variants) use a 24 MHz crystal. This results in a -4.0% time drift rate on SKX workstations. - SKX servers subject the crystal to an EMI reduction circuit that reduces its actual frequency by (approximately) -0.25%. This results in -1 second per 10 minute time drift as compared to network time. This issue can also trigger a timer and power problem, on configurations that use the LAPIC timer (versus the TSC deadline timer). Clock ticks scheduled with the LAPIC timer arrive a few usec before the time they are expected (according to the slow TSC). This causes Linux to poll-idle, when it should be in an idle power saving state. The idle and clock code do not graciously recover from this error, sometimes resulting in significant polling and measurable power impact. Stop using native_calibrate_tsc() for INTEL_FAM6_SKYLAKE_X. native_calibrate_tsc() will return 0, boot will run with tsc_khz = cpu_khz, and the TSC refined calibration will update tsc_khz to correct for the difference. [ tglx: Sanitized change log ] Fixes: 6baf3d61821f ("x86/tsc: Add additional Intel CPU models to the crystal quirk list") Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Cc: peterz@infradead.org Cc: Prarit Bhargava Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/ff6dcea166e8ff8f2f6a03c17beab2cb436aa779.1513920414.git.len.brown@intel.com arch/x86/kernel/tsc.c | 1 - 1 file changed, 1 deletion(-) commit da4ae6c4a0b8dee5a5377a385545d2250fa8cddb Author: Len Brown Date: Fri Dec 22 00:27:54 2017 -0500 x86/tsc: Future-proof native_calibrate_tsc() If the crystal frequency cannot be determined via CPUID(15).crystal_khz or the built-in table then native_calibrate_tsc() will still set the X86_FEATURE_TSC_KNOWN_FREQ flag which prevents the refined TSC calibration. As a consequence such systems use cpu_khz for the TSC frequency which is incorrect when cpu_khz != tsc_khz resulting in time drift. Return early when the crystal frequency cannot be retrieved without setting the X86_FEATURE_TSC_KNOWN_FREQ flag. This ensures that the refined TSC calibration is invoked. [ tglx: Steam-blastered changelog. Sigh ] Fixes: 4ca4df0b7eb0 ("x86/tsc: Mark TSC frequency determined by CPUID as known") Signed-off-by: Len Brown Signed-off-by: Thomas Gleixner Cc: peterz@infradead.org Cc: Bin Gao Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/0fe2503aa7d7fc69137141fc705541a78101d2b9.1513920414.git.len.brown@intel.com arch/x86/kernel/tsc.c | 2 ++ 1 file changed, 2 insertions(+) commit 99a9dc98ba52267ce5e062b52de88ea1f1b2a7d8 Author: Peter Zijlstra Date: Sun Jan 14 11:27:13 2018 +0100 x86,perf: Disable intel_bts when PTI The intel_bts driver does not use the 'normal' BTS buffer which is exposed through the cpu_entry_area but instead uses the memory allocated for the perf AUX buffer. This obviously comes apart when using PTI because then the kernel mapping; which includes that AUX buffer memory; disappears. Fixing this requires to expose a mapping which is visible in all context and that's not trivial. As a quick fix disable this driver when PTI is enabled to prevent malfunction. Fixes: 385ce0ea4c07 ("x86/mm/pti: Add Kconfig") Reported-by: Vince Weaver Reported-by: Robert Święcki Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Alexander Shishkin Cc: greg@kroah.com Cc: hughd@google.com Cc: luto@amacapital.net Cc: Vince Weaver Cc: torvalds@linux-foundation.org Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180114102713.GB6166@worktop.programming.kicks-ass.net arch/x86/events/intel/bts.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit a237f762681e2a394ca67f21df2feb2b76a3609b Author: W. Trevor King Date: Fri Jan 12 15:24:59 2018 -0800 security/Kconfig: Correct the Documentation reference for PTI When the config option for PTI was added a reference to documentation was added as well. But the documentation did not exist at that point. The final documentation has a different file name. Fix it up to point to the proper file. Fixes: 385ce0ea ("x86/mm/pti: Add Kconfig") Signed-off-by: W. Trevor King Signed-off-by: Thomas Gleixner Cc: Dave Hansen Cc: linux-mm@kvack.org Cc: linux-security-module@vger.kernel.org Cc: James Morris Cc: "Serge E. Hallyn" Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/3009cc8ccbddcd897ec1e0cb6dda524929de0d14.1515799398.git.wking@tremily.us security/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f10ee3dcc9f0aba92a5c4c064628be5200765dc2 Author: Thomas Gleixner Date: Sun Jan 14 00:23:57 2018 +0100 x86/pti: Fix !PCID and sanitize defines The switch to the user space page tables in the low level ASM code sets unconditionally bit 12 and bit 11 of CR3. Bit 12 is switching the base address of the page directory to the user part, bit 11 is switching the PCID to the PCID associated with the user page tables. This fails on a machine which lacks PCID support because bit 11 is set in CR3. Bit 11 is reserved when PCID is inactive. While the Intel SDM claims that the reserved bits are ignored when PCID is disabled, the AMD APM states that they should be cleared. This went unnoticed as the AMD APM was not checked when the code was developed and reviewed and test systems with Intel CPUs never failed to boot. The report is against a Centos 6 host where the guest fails to boot, so it's not yet clear whether this is a virt issue or can happen on real hardware too, but thats irrelevant as the AMD APM clearly ask for clearing the reserved bits. Make sure that on non PCID machines bit 11 is not set by the page table switching code. Andy suggested to rename the related bits and masks so they are clearly describing what they should be used for, which is done as well for clarity. That split could have been done with alternatives but the macro hell is horrible and ugly. This can be done on top if someone cares to remove the extra orq. For now it's a straight forward fix. Fixes: 6fd166aae78c ("x86/mm: Use/Fix PCID to optimize user/kernel switches") Reported-by: Laura Abbott Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: stable Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Willy Tarreau Cc: David Woodhouse Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801140009150.2371@nanos arch/x86/entry/calling.h | 36 ++++++++++++++++++---------------- arch/x86/include/asm/processor-flags.h | 2 +- arch/x86/include/asm/tlbflush.h | 6 +++--- 3 files changed, 23 insertions(+), 21 deletions(-) commit 2c1cfa49901839136e578ca516a7e230182da024 Merge: d5a047f 1a2e91e Author: Linus Torvalds Date: Sat Jan 13 14:10:32 2018 -0800 Merge tag 'usb-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes and device ids for 4.15-rc8 Nothing major, small fixes for various devices, some resolutions for bugs found by fuzzers, and the usual handful of new device ids. All of these have been in linux-next with no reported issues" * tag 'usb-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: Documentation: usb: fix typo in UVC gadgetfs config command usb: misc: usb3503: make sure reset is low for at least 100us uas: ignore UAS for Norelsys NS1068(X) chips USB: UDC core: fix double-free in usb_add_gadget_udc_release USB: fix usbmon BUG trigger usbip: vudc_tx: fix v_send_ret_submit() vulnerability to null xfer buffer usbip: remove kernel addresses from usb device and urb debug msgs usbip: fix vudc_rx: harden CMD_SUBMIT path to handle malicious input USB: serial: cp210x: add new device ID ELV ALC 8xxx USB: serial: cp210x: add IDs for LifeScan OneTouch Verio IQ commit d5a047fd92c6e0db7d56b9e20200cc30f6c7c8e2 Merge: 9e8f8f1 443064c Author: Linus Torvalds Date: Sat Jan 13 14:04:06 2018 -0800 Merge tag 'staging-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fix from Greg KH: "Here is a single android ashmem bugfix that resolves a reported issue in that interface. It's been in linux-next this week with no reported issues" * tag 'staging-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: android: ashmem: fix a race condition in ASHMEM_SET_SIZE ioctl commit 9e8f8f1ef4f804b8fd81beaa8afa9cbe0f175935 Merge: 22079ee aa1f10e Author: Linus Torvalds Date: Sat Jan 13 14:01:59 2018 -0800 Merge tag 'char-misc-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fixes from Greg KH: "Here are two bugfixes for some driver bugs for 4.15-rc8 The first is a bluetooth security bug that has been ignored by the Bluetooth developers for months for no obvious reason at all, so I've taken it through my tree. The second is a simple double-free bug in the mux subsystem. Both have been in linux-next for a while with no reported issues" * tag 'char-misc-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: mux: core: fix double get_device() Bluetooth: Prevent stack info leak from the EFS element. commit 22079ee4501d99492b34482a555f90e6bf39590f Merge: 852b0a8 36c1681 Author: Linus Torvalds Date: Sat Jan 13 13:24:56 2018 -0800 Merge tag 'kbuild-fixes-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - fix cross-compilation for architectures that setup CROSS_COMPILE in their arch Makefile - fix Kconfig rational operators for bool / tristate - drop a gperf-generated file from .gitignore * tag 'kbuild-fixes-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: genksyms: drop *.hash.c from .gitignore kconfig: fix relational operators for bool and tristate symbols kbuild: move cc-option and cc-disable-warning after incl. arch Makefile commit 852b0a89026fd810fce7163922fb79620c3a8628 Merge: 8e66791 1a3881d Author: Linus Torvalds Date: Sat Jan 13 13:18:15 2018 -0800 Merge tag 'apparmor-pr-2018-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor Pull apparmor regression fixes from John Johansen: "This fixes a couple bugs I have been working with Matthew Garrett on this week. Specifically a regression in the handling of a conflicting profile attachment and label match restrictions for ptrace when profiles are stacked. Summary: - fix ptrace label match when matching stacked labels - fix regression in profile conflict logic" * tag 'apparmor-pr-2018-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor: apparmor: Fix regression in profile conflict logic apparmor: fix ptrace label match when matching stacked labels commit 8e66791a80abd0e86ac1995395129791eefe50b5 Merge: ed93de8 03a5517 Author: Linus Torvalds Date: Sat Jan 13 13:14:54 2018 -0800 Merge tag 'pci-v4.15-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: "Fix AMD boot regression due to 64-bit window conflicting with system memory (Christian König)" * tag 'pci-v4.15-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: x86/PCI: Move and shrink AMD 64-bit window to avoid conflict x86/PCI: Add "pci=big_root_window" option for AMD 64-bit windows commit ed93de8420a342785da7585b06c107ae32f73b2b Merge: c92a9a4 0f908cc Author: Linus Torvalds Date: Sat Jan 13 11:07:55 2018 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixlets from Andrew Morton: "4 fixes" * emailed patches from Andrew Morton : tools/objtool/Makefile: don't assume sync-check.sh is executable kdump: write correct address of mem_section into vmcoreinfo kmemleak: allow to coexist with fault injection MAINTAINERS, nilfs2: change project home URLs commit 0f908ccbeca99ddf0ad60afa710e72aded4a5ea7 Author: Andrew Morton Date: Fri Jan 12 16:53:17 2018 -0800 tools/objtool/Makefile: don't assume sync-check.sh is executable patch(1) loses the x bit. So if a user follows our patching instructions in Documentation/admin-guide/README.rst, their kernel will not compile. Fixes: 3bd51c5a371de ("objtool: Move kernel headers/code sync check to a script") Reported-by: Nicolas Bock Reported-by Joakim Tjernlund Cc: Ingo Molnar Cc: Josh Poimboeuf Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/objtool/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0b1280368d1e91ab72f849ef095b4f07a39bbf1 Author: Kirill A. Shutemov Date: Fri Jan 12 16:53:14 2018 -0800 kdump: write correct address of mem_section into vmcoreinfo Depending on configuration mem_section can now be an array or a pointer to an array allocated dynamically. In most cases, we can continue to refer to it as 'mem_section' regardless of what it is. But there's one exception: '&mem_section' means "address of the array" if mem_section is an array, but if mem_section is a pointer, it would mean "address of the pointer". We've stepped onto this in kdump code. VMCOREINFO_SYMBOL(mem_section) writes down address of pointer into vmcoreinfo, not array as we wanted. Let's introduce VMCOREINFO_SYMBOL_ARRAY() that would handle the situation correctly for both cases. Link: http://lkml.kernel.org/r/20180112162532.35896-1-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Fixes: 83e3c48729d9 ("mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y") Acked-by: Baoquan He Acked-by: Dave Young Cc: Ingo Molnar Cc: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Greg Kroah-Hartman Cc: Dave Young Cc: Baoquan He Cc: Vivek Goyal Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/crash_core.h | 2 ++ kernel/crash_core.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit d9570ee3bd1d4f20ce63485f5ef05663866fe6c0 Author: Dmitry Vyukov Date: Fri Jan 12 16:53:10 2018 -0800 kmemleak: allow to coexist with fault injection kmemleak does one slab allocation per user allocation. So if slab fault injection is enabled to any degree, kmemleak instantly fails to allocate and turns itself off. However, it's useful to use kmemleak with fault injection to find leaks on error paths. On the other hand, checking kmemleak itself is not so useful because (1) it's a debugging tool and (2) it has a very regular allocation pattern (basically a single allocation site, so it either works or not). Turn off fault injection for kmemleak allocations. Link: http://lkml.kernel.org/r/20180109192243.19316-1-dvyukov@google.com Signed-off-by: Dmitry Vyukov Cc: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kmemleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bed6760cf2c40778a58f2e399c8947b3b3c55518 Author: Ryusuke Konishi Date: Fri Jan 12 16:53:07 2018 -0800 MAINTAINERS, nilfs2: change project home URLs The domain of NILFS project home was changed to "nilfs.sourceforge.io" to enable https access (the previous domain "nilfs.sourceforge.net" is redirected to the new one). Modify URLs of the project home to reflect this change and to replace their protocol from http to https. Link: http://lkml.kernel.org/r/1515416141-5614-1-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/nilfs2.txt | 4 ++-- MAINTAINERS | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 36c1681678b507346e7397a235a7303dad665fc3 Author: Masahiro Yamada Date: Thu Jan 11 18:28:08 2018 +0900 genksyms: drop *.hash.c from .gitignore This is a left-over of commit bb3290d91695 ("Remove gperf usage from toolchain"). We do not generate a hash function any more. Signed-off-by: Masahiro Yamada scripts/genksyms/.gitignore | 1 - 1 file changed, 1 deletion(-) commit 9f15b9120f562ae0bf0a836c96f4dafb33ae426a Author: Kirill A. Shutemov Date: Fri Jan 12 19:25:32 2018 +0300 kdump: Write the correct address of mem_section into vmcoreinfo Depending on configuration mem_section can now be an array or a pointer to an array allocated dynamically. In most cases, we can continue to refer to it as 'mem_section' regardless of what it is. But there's one exception: '&mem_section' means "address of the array" if mem_section is an array, but if mem_section is a pointer, it would mean "address of the pointer". We've stepped onto this in the kdump code: VMCOREINFO_SYMBOL(mem_section) writes down the address of pointer into vmcoreinfo, not the array as we wanted, breaking kdump. Let's introduce VMCOREINFO_SYMBOL_ARRAY() that would handle the situation correctly for both cases. Mike Galbraith Signed-off-by: Kirill A. Shutemov Acked-by: Baoquan He Acked-by: Dave Young Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vivek Goyal Cc: kexec@lists.infradead.org Cc: linux-mm@kvack.org Cc: stable@vger.kernel.org Fixes: 83e3c48729d9 ("mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y") Link: http://lkml.kernel.org/r/20180112162532.35896-1-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar include/linux/crash_core.h | 2 ++ kernel/crash_core.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 352909b49ba0d74929b96af6dfbefc854ab6ebb5 Author: Andy Lutomirski Date: Thu Jan 11 17:16:51 2018 -0800 selftests/x86: Add test_vsyscall This tests that the vsyscall entries do what they're expected to do. It also confirms that attempts to read the vsyscall page behave as expected. If changes are made to the vsyscall code or its memory map handling, running this test in all three of vsyscall=none, vsyscall=emulate, and vsyscall=native are helpful. (Because it's easy, this also compares the vsyscall results to their vDSO equivalents.) Note to KAISER backporters: please test this under all three vsyscall modes. Also, in the emulate and native modes, make sure that test_vsyscall_64 agrees with the command line or config option as to which mode you're in. It's quite easy to mess up the kernel such that native mode accidentally emulates or vice versa. Greg, etc: please backport this to all your Meltdown-patched kernels. It'll help make sure the patches didn't regress vsyscalls. CSigned-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Greg Kroah-Hartman Cc: H. Peter Anvin Cc: Hugh Dickins Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/2b9c5a174c1d60fd7774461d518aa75598b1d8fd.1515719552.git.luto@kernel.org Signed-off-by: Ingo Molnar tools/testing/selftests/x86/Makefile | 2 +- tools/testing/selftests/x86/test_vsyscall.c | 500 ++++++++++++++++++++++++++++ 2 files changed, 501 insertions(+), 1 deletion(-) commit 1a3881d305592d947ed47887306919d50112394d Author: Matthew Garrett Date: Thu Jan 11 13:07:54 2018 -0800 apparmor: Fix regression in profile conflict logic The intended behaviour in apparmor profile matching is to flag a conflict if two profiles match equally well. However, right now a conflict is generated if another profile has the same match length even if that profile doesn't actually match. Fix the logic so we only generate a conflict if the profiles match. Fixes: 844b8292b631 ("apparmor: ensure that undecidable profile attachments fail") Cc: Stable Signed-off-by: Matthew Garrett Signed-off-by: John Johansen security/apparmor/domain.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 0dda0b3fb255048a221f736c8a2a24c674da8bf3 Author: John Johansen Date: Fri Dec 8 17:43:18 2017 -0800 apparmor: fix ptrace label match when matching stacked labels Given a label with a profile stack of A//&B or A//&C ... A ptrace rule should be able to specify a generic trace pattern with a rule like ptrace trace A//&**, however this is failing because while the correct label match routine is called, it is being done post label decomposition so it is always being done against a profile instead of the stacked label. To fix this refactor the cross check to pass the full peer label in to the label_match. Fixes: 290f458a4f16 ("apparmor: allow ptrace checks to be finer grained than just capability") Cc: Stable Reported-by: Matthew Garrett Tested-by: Matthew Garrett Signed-off-by: John Johansen security/apparmor/include/perms.h | 3 +++ security/apparmor/ipc.c | 53 +++++++++++++++++++++++---------------- 2 files changed, 35 insertions(+), 21 deletions(-) commit 62635ea8c18f0f62df4cc58379e4f1d33afd5801 Author: Sergey Senozhatsky Date: Thu Jan 11 09:53:35 2018 +0900 workqueue: avoid hard lockups in show_workqueue_state() show_workqueue_state() can print out a lot of messages while being in atomic context, e.g. sysrq-t -> show_workqueue_state(). If the console device is slow it may end up triggering NMI hard lockup watchdog. Signed-off-by: Sergey Senozhatsky Signed-off-by: Tejun Heo Cc: stable@vger.kernel.org # v4.5+ kernel/workqueue.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit c92a9a461dff6140c539c61e457aa97df29517d6 Merge: 67549d4 9d0513d Author: Linus Torvalds Date: Fri Jan 12 10:32:11 2018 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Two pending (non-PTI) x86 fixes: - an Intel-MID crash fix - and an Intel microcode loader blacklist quirk to avoid a problematic revision" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/platform/intel-mid: Revert "Make 'bt_sfi_data' const" x86/microcode/intel: Extend BDW late-loading with a revision check commit 67549d46d42eed58731028bebe304bc8cbd7af01 Merge: 02776b9 5416760 Author: Linus Torvalds Date: Fri Jan 12 10:23:59 2018 -0800 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "A Kconfig fix, a build fix and a membarrier bug fix" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: membarrier: Disable preemption when calling smp_call_function_many() sched/isolation: Make CONFIG_CPU_ISOLATION=y depend on SMP or COMPILE_TEST ia64, sched/cputime: Fix build error if CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y commit 02776b9b5399183f273fa898fef64b1e977a5f85 Merge: aefd140 f328299e Author: Linus Torvalds Date: Fri Jan 12 10:14:09 2018 -0800 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Ingo Molnar: "No functional effects intended: removes leftovers from recent lockdep and refcounts work" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/refcounts: Remove stale comment from the ARCH_HAS_REFCOUNT Kconfig entry locking/lockdep: Remove cross-release leftovers locking/Documentation: Remove stale crossrelease_fullstack parameter commit aefd140437aab84afeec0be48dd6871c2113a746 Merge: 4e67483 cf2acf6 Author: Linus Torvalds Date: Fri Jan 12 10:00:15 2018 -0800 Merge tag 'for-linus-4.15-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "This contains two build fixes for clang and two fixes for rather unlikely situations in the Xen gntdev driver" * tag 'for-linus-4.15-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/gntdev: Fix partial gntdev_mmap() cleanup xen/gntdev: Fix off-by-one error when unmapping with holes x86: xen: remove the use of VLAIS x86/xen/time: fix section mismatch for xen_init_time_ops() commit 4e67483a6f6f08b96a5e8833f3587c1255b08add Merge: 70cd907 2aad9b3 Author: Linus Torvalds Date: Fri Jan 12 09:56:52 2018 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "PPC: - user-triggerable use-after-free in HPT resizing - stale TLB entries in the guest - trap-and-emulate (PR) KVM guests failing to start under pHyp x86: - Another "Spectre" fix. - async pagefault fix - Revert an old fix for x86 nested virtualization, which turned out to do more harm than good - Check shrinker registration return code, to avoid warnings from upcoming 4.16 -mm patches" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: Add memory barrier on vmcs field lookup KVM: x86: emulate #UD while in guest mode x86: kvm: propagate register_shrinker return code KVM MMU: check pending exception before injecting APF KVM: PPC: Book3S HV: Always flush TLB in kvmppc_alloc_reset_hpt() KVM: PPC: Book3S PR: Fix WIMG handling under pHyp KVM: PPC: Book3S HV: Fix use after free in case of multiple resize requests KVM: PPC: Book3S HV: Drop prepare_done from struct kvm_resize_hpt commit 70cd9071e8fbe5eb88e02891bccfe20ae1f52630 Merge: f12e0dd 9a00674 Author: Linus Torvalds Date: Fri Jan 12 09:47:58 2018 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "This fixes a NULL pointer dereference in crypto_remove_spawns that can be triggered through af_alg" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: algapi - fix NULL dereference in crypto_remove_spawns() commit 32835a074171e7b83c1cefbbf9d681bb9518bbd5 Merge: ae66501 6b01823 Author: Jens Axboe Date: Fri Jan 12 10:42:36 2018 -0700 Merge branch 'nvme-4.15' of git://git.infradead.org/nvme into for-linus Pull a single NVMe fix from Christoph for 4.15. commit f12e0dd0d7c7a82a66621d8e49fd9ecec0b18e19 Merge: 352ef57 2bd7b4a Author: Linus Torvalds Date: Fri Jan 12 09:34:20 2018 -0800 Merge tag 'mmc-v4.15-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC host fixes from Ulf Hansson: - s3mci: mark debug_regs[] as static - renesas_sdhi: Add MODULE_LICENSE * tag 'mmc-v4.15-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: s3mci: mark debug_regs[] as static mmc: renesas_sdhi: Add MODULE_LICENSE commit 352ef571f5c5a9cb683fa1fb11f875d757275e40 Merge: 1545dec fee6c61 Author: Linus Torvalds Date: Fri Jan 12 09:28:28 2018 -0800 Merge tag 'drm-fixes-for-v4.15-rc8' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: - Nouveau: regression fix - Tegra: regression fix - vmwgfx: crasher + freed data leak - i915: KASAN use after free fix, whitelist register to avoid hang fix, GVT fixes - vc4: irq/pm fix * tag 'drm-fixes-for-v4.15-rc8' of git://people.freedesktop.org/~airlied/linux: drm/i915: Don't adjust priority on an already signaled fence drm/i915: Whitelist SLICE_COMMON_ECO_CHICKEN1 on Geminilake. drm/vmwgfx: Potential off by one in vmw_view_add() drm/tegra: sor: Fix hang on Tegra124 eDP drm/vmwgfx: Don't cache framebuffer maps drm/nouveau/disp/gf119: add missing drive vfunc ptr drm/i915/gvt: Fix stack-out-of-bounds bug in cmd parser drm/i915/gvt: Clear the shadow page table entry after post-sync drm/vc4: Move IRQ enable to PM path commit 5dd966c680b616911a66d4576a9ed53aaf5f89ea Merge: 9c70f1a 237f258 Author: David S. Miller Date: Fri Jan 12 10:40:48 2018 -0500 Merge tag 'mlx5-fixes-2018-01-11' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2018-01-11 The following series includes fixes to mlx5 core and netdev driver. To highlight we have two critical fixes in this series: 1st patch from Eran to address a fix for Host2BMC Breakage. 2nd patch from Saeed to address the RDMA IRQ vector affinity settings query issue, the patch provides the correct mlx5_core implementation for RDMA to correctly query vector affinity. I sent this patch privately to Sagi a week a go, so he could to test it but I didn't hear from him. All other patches are trivial misc fixes. Please pull and let me know if there's any problem. for -stable v4.14-y and later: ("net/mlx5: Fix get vector affinity helper function") ("{net,ib}/mlx5: Don't disable local loopback multicast traffic when needed") Note: Merging this series with net-next will produce the following conflict: <<<<<<< HEAD u8 disable_local_lb[0x1]; u8 reserved_at_3e2[0x1]; u8 log_min_hairpin_wq_data_sz[0x5]; u8 reserved_at_3e8[0x3]; ======= u8 disable_local_lb_uc[0x1]; u8 disable_local_lb_mc[0x1]; u8 reserved_at_3e3[0x8]; >>>>>>> 359c96447ac2297fabe15ef30b60f3b4b71e7fd0 To resolve, use the following hunk: i.e: <<<<<< u8 disable_local_lb_uc[0x1]; u8 disable_local_lb_mc[0x1]; u8 log_min_hairpin_wq_data_sz[0x5]; u8 reserved_at_3e8[0x3]; >>>>>> ==================== Signed-off-by: David S. Miller commit 9c70f1a7fa2d296f68e387b277296f0f2712a3d6 Merge: 1545dec 76a4201 Author: David S. Miller Date: Fri Jan 12 10:32:49 2018 -0500 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2018-01-11 1) Don't allow to change the encap type on state updates. The encap type is set on state initialization and should not change anymore. From Herbert Xu. 2) Skip dead policies when rehashing to fix a slab-out-of-bounds bug in xfrm_hash_rebuild. From Florian Westphal. 3) Two buffer overread fixes in pfkey. From Eric Biggers. 4) Fix rcu usage in xfrm_get_type_offload, request_module can sleep, so can't be used under rcu_read_lock. From Sabrina Dubroca. 5) Fix an uninitialized lock in xfrm_trans_queue. Use __skb_queue_tail instead of skb_queue_tail in xfrm_trans_queue as we don't need the lock. From Herbert Xu. 6) Currently it is possible to create an xfrm state with an unknown encap type in ESP IPv4. Fix this by returning an error on unknown encap types. Also from Herbert Xu. 7) Fix sleeping inside a spinlock in xfrm_policy_cache_flush. From Florian Westphal. 8) Fix ESP GRO when the headers not fully in the linear part of the skb. We need to pull before we can access them. 9) Fix a skb leak on error in key_notify_policy. 10) Fix a race in the xdst pcpu cache, we need to run the resolver routines with bottom halfes off like the old flowcache did. ==================== Signed-off-by: David S. Miller commit 1289e0e29857e606a70a0200bf7849ae38d3493a Author: Kan Liang Date: Thu Jan 11 11:15:43 2018 -0800 perf/x86/rapl: Fix Haswell and Broadwell server RAPL event Perf-fuzzer triggers non-existent MSR access in RAPL driver on Haswell-EX. Haswell/Broadwell server and client have differnt RAPL events. Since 'commit 7f2236d0bf9a ("perf/x86/rapl: Use Intel family macros for RAPL")', it accidentally assign RAPL client events to server. Signed-off-by: Kan Liang Acked-by: Peter Zijlstra Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Linux-kernel@vger.kernel.org Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Signed-off-by: Ingo Molnar arch/x86/events/intel/rapl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 117cc7a908c83697b0b737d15ae1eb5943afe35b Author: David Woodhouse Date: Fri Jan 12 11:11:27 2018 +0000 x86/retpoline: Fill return stack buffer on vmexit In accordance with the Intel and AMD documentation, we need to overwrite all entries in the RSB on exiting a guest, to prevent malicious branch target predictions from affecting the host kernel. This is needed both for retpoline and for IBRS. [ak: numbers again for the RSB stuffing labels] Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Tested-by: Peter Zijlstra (Intel) Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Andi Kleen Cc: Josh Poimboeuf Cc: thomas.lendacky@amd.com Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Tim Chen Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/1515755487-8524-1-git-send-email-dwmw@amazon.co.uk arch/x86/include/asm/nospec-branch.h | 78 +++++++++++++++++++++++++++++++++++- arch/x86/kvm/svm.c | 4 ++ arch/x86/kvm/vmx.c | 4 ++ 3 files changed, 85 insertions(+), 1 deletion(-) commit f8f85dc00b7427de6222ea3955c52512315d13cd Author: Christoffer Dall Date: Fri Jan 12 11:40:21 2018 +0100 KVM: arm64: Fix GICv4 init when called from vgic_its_create Commit 3d1ad640f8c94 ("KVM: arm/arm64: Fix GICv4 ITS initialization issues") moved the vgic_supports_direct_msis() check in vgic_v4_init(). However when vgic_v4_init is called from vgic_its_create(), the has_its field is not yet set. Hence vgic_supports_direct_msis returns false and vgic_v4_init does nothing. The gic/its init sequence is a bit messy, so let's be specific about the prerequisite checks in the various call paths instead of relying on a common wrapper. Fixes: 3d1ad640f8c94 ("KVM: arm/arm64: Fix GICv4 ITS initialization issues") Reported-by: Eric Auger Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-init.c | 8 +++++--- virt/kvm/arm/vgic/vgic-v4.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) commit 4d94e776bd29670f01befa27e12df784fa05fa2e Author: Nir Perry Date: Thu Jan 11 23:43:26 2018 -0800 Input: ALPS - fix multi-touch decoding on SS4 plus touchpads The fix for handling two-finger scroll (i4a646580f793 - "Input: ALPS - fix two-finger scroll breakage in right side on ALPS touchpad") introduced a minor "typo" that broke decoding of multi-touch events are decoded on some ALPS touchpads. For example, tapping with three-fingers can no longer be used to emulate middle-mouse-button (the kernel doesn't recognize this as the proper event, and doesn't report it correctly to userspace). This affects touchpads that use SS4 "plus" protocol variant, like those found on Dell E7270 & E7470 laptops (tested on E7270). First, probably the code in alps_decode_ss4_v2() for case SS4_PACKET_ID_MULTI used inconsistent indices to "f->mt[]". You can see 0 & 1 are used for the "if" part but 2 & 3 are used for the "else" part. Second, in the previous patch, new macros were introduced to decode X coordinates specific to the SS4 "plus" variant, but the macro to define the maximum X value wasn't changed accordingly. The macros to decode X values for "plus" variant are effectively shifted right by 1 bit, but the max wasn't shifted too. This causes the driver to incorrectly handle "no data" cases, which also interfered with how multi-touch was handled. Fixes: 4a646580f793 ("Input: ALPS - fix two-finger scroll breakage...") Signed-off-by: Nir Perry Reviewed-by: Masaki Ota Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 23 +++++++++++++---------- drivers/input/mouse/alps.h | 10 ++++++---- 2 files changed, 19 insertions(+), 14 deletions(-) commit 69c4d8ed49568598f200b340b17e391c35be3d4b Author: Arnd Bergmann Date: Wed Jan 10 22:04:16 2018 +0100 arm64: dts: socfpga: add missing interrupt-parent The PMU node has no working interrupt, as shown by this dtc warning: arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dtb: Warning (interrupts_property): Missing interrupt-parent for /pmu This adds an interrupt-parent property so we can correct parse that interrupt number. Signed-off-by: Arnd Bergmann Acked-by: Dinh Nguyen Signed-off-by: Olof Johansson arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 1 + 1 file changed, 1 insertion(+) commit fee6c614a5c20783a5c28c2671c186c06e19c215 Merge: 477d70b 5005c85 Author: Dave Airlie Date: Fri Jan 12 11:48:06 2018 +1000 Merge tag 'drm-intel-fixes-2018-01-11-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes Hopefully final drm/i915 fixes for v4.15: - Fix a KASAN reported use after free - Whitelist a register to avoid hangs - GVT fixes * tag 'drm-intel-fixes-2018-01-11-1' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915: Don't adjust priority on an already signaled fence drm/i915: Whitelist SLICE_COMMON_ECO_CHICKEN1 on Geminilake. drm/i915/gvt: Fix stack-out-of-bounds bug in cmd parser drm/i915/gvt: Clear the shadow page table entry after post-sync commit 477d70b6735405c26803e2b93069673db294d3ef Merge: c59beea 0d9cac0 Author: Dave Airlie Date: Fri Jan 12 11:47:40 2018 +1000 Merge branch 'vmwgfx-fixes-4.15' of git://people.freedesktop.org/~thomash/linux into drm-fixes Two important fixes for vmwgfx. The off-by-one fix could cause a malicious user to potentially crash the kernel. The framebuffer map cache fix can under some circumstances enable a user to read from or write to freed pages. * 'vmwgfx-fixes-4.15' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: Potential off by one in vmw_view_add() drm/vmwgfx: Don't cache framebuffer maps commit c59beeaf1555f0b8380e70e480bf4618454237af Merge: b0bb222 d780537 Author: Dave Airlie Date: Fri Jan 12 11:47:11 2018 +1000 Merge tag 'drm/tegra/for-4.15-rc8' of git://anongit.freedesktop.org/tegra/linux into drm-fixes drm/tegra: Fixes for v4.15-rc8 A single fix for a Tegra124 eDP regression introduced by the SOR changes in v4.15-rc1. * tag 'drm/tegra/for-4.15-rc8' of git://anongit.freedesktop.org/tegra/linux: drm/tegra: sor: Fix hang on Tegra124 eDP commit bd730bfd100844acf4637b575e94cbafc0de426c Merge: 9ddd0c1 bdae447 Author: Olof Johansson Date: Thu Jan 11 16:59:50 2018 -0800 Merge tag 'sunxi-fixes-for-4.15-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into fixes Allwinner fixes for 4.15, round 2 One fix that fixes the display pipeline description in the device tree for the A10 and A20 SoCs. This description was introduced in 4.15-rc1 with a mismatch in the graph remote endpoints, which would likely result in the driver misinterpreting how the individual components fit together. * tag 'sunxi-fixes-for-4.15-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sun[47]i: Fix display backend 1 output to TCON0 remote endpoint Signed-off-by: Olof Johansson commit 9ddd0c131a1aaa9a0047ecdfac8e935aed0f7206 Merge: 5233475 e3af9f7 Author: Olof Johansson Date: Thu Jan 11 16:58:41 2018 -0800 Merge tag 'mvebu-fixes-4.15-1' of git://git.infradead.org/linux-mvebu into fixes mvebu fixess for 4.15 (part 1) 2 device tree related fixes fixing 2 issues: - broken pinctrl support since 4.11 on OpenBlocks A7 - implicit clock dependency making the kernel hang if the Xenon sdhci module was loaded before the mvpp2 Ethernet support (for this one the driver had to be fixed which was done in v4.14) * tag 'mvebu-fixes-4.15-1' of git://git.infradead.org/linux-mvebu: ARM64: dts: marvell: armada-cp110: Fix clock resources for various node ARM: dts: kirkwood: fix pin-muxing of MPP7 on OpenBlocks A7 Signed-off-by: Olof Johansson commit 52334750f4b43eb73dfcbcb0e14d069c2bcfb3e7 Merge: b2cd1df 7669b12 Author: Olof Johansson Date: Thu Jan 11 16:58:06 2018 -0800 Merge tag 'davinci-for-v4.16/dt' of https://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes A DT warning fix for W=1 warning message. * tag 'davinci-for-v4.16/dt' of https://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: dts: da850-lcdk: Remove leading 0x and 0s from unit address Signed-off-by: Olof Johansson commit 1545dec46db3858bbce84c2065b579e2925706ab Merge: ab27815 21acdf4 Author: Linus Torvalds Date: Thu Jan 11 16:57:32 2018 -0800 Merge tag 'ceph-for-4.15-rc8' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "Two rbd fixes for 4.12 and 4.2 issues respectively, marked for stable" * tag 'ceph-for-4.15-rc8' of git://github.com/ceph/ceph-client: rbd: set max_segments to USHRT_MAX rbd: reacquire lock should update lock owner client id commit ab2781592a223510da6b19069a2ab8ba0e3ef2f5 Merge: cbd0a6a 1e77fc8 Author: Linus Torvalds Date: Thu Jan 11 16:54:35 2018 -0800 Merge tag 'gpio-v4.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fix from Linus Walleij: "Fix a raw vs elaborate GPIO descriptor bug introduced by yours truly" * tag 'gpio-v4.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: Add missing open drain/source handling to gpiod_set_value_cansleep() commit 237f258c42c905f71c694670fe4d9773d85c36ed Author: Feras Daoud Date: Mon Jan 8 10:01:04 2018 +0200 net/mlx5e: Remove timestamp set from netdevice open flow To avoid configuration override, timestamp set call will be moved from the netdevice open flow to the init flow. By this, a close-open procedure will not override the timestamp configuration. In addition, the change will rename mlx5e_timestamp_set function to be mlx5e_timestamp_init. Fixes: ef9814deafd0 ("net/mlx5e: Add HW timestamping (TS) support") Signed-off-by: Feras Daoud Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +++-- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) commit afc98a0b46d8576a55f18092400cc518d03a79a1 Author: Feras Daoud Date: Wed Jan 3 17:23:55 2018 +0200 net/mlx5: Update ptp_clock_event foreach PPS event PPS event did not update ptp_clock_event fields, therefore, timestamp value was not updated correctly. This fix updates the event source and the timestamp value for each PPS event. Fixes: 7c39afb394c7 ("net/mlx5: PTP code migration to driver core section") Signed-off-by: Feras Daoud Reported-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 75b81ce719b79565eb0b39aa9954b6e11a5e73bf Author: Gal Pressman Date: Wed Jan 10 17:11:11 2018 +0200 net/mlx5e: Don't override netdev features field unless in error flow Set features function sets dev->features in order to keep track of which features were successfully changed and which weren't (in case the user asks for more than one change in a single command). This breaks the logic in __netdev_update_features which assumes that dev->features is not changed on success and checks for diffs between features and dev->features (diffs that might not exist at this point because of the driver override). The solution is to keep track of successful/failed feature changes and assign them to dev->features in case of failure only. Fixes: 0e405443e803 ("net/mlx5e: Improve set features ndo resiliency") Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 43 +++++++++++++---------- 1 file changed, 25 insertions(+), 18 deletions(-) commit 4b7d4363f14a0398eca48c7e96e46120c5eb6a96 Author: Tariq Toukan Date: Tue Oct 10 16:54:30 2017 +0300 net/mlx5e: Check support before TC swap in ETS init Should not do the following swap between TCs 0 and 1 when max num of TCs is 1: tclass[prio=0]=1, tclass[prio=1]=0, tclass[prio=i]=i (for i>1) Fixes: 08fb1dacdd76 ("net/mlx5e: Support DCBNL IEEE ETS") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 97c8c3aa48ca8eb85d1806e08f882f90d78b1856 Author: Tariq Toukan Date: Tue Oct 10 16:51:44 2017 +0300 net/mlx5e: Add error print in ETS init ETS initialization might fail, add a print to indicate such failures. Fixes: 08fb1dacdd76 ("net/mlx5e: Support DCBNL IEEE ETS") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e556f6dd47eda62cbb046fa92e03265245a1537f Author: Gal Pressman Date: Tue Dec 26 13:44:49 2017 +0200 net/mlx5e: Keep updating ethtool statistics when the interface is down ethtool statistics should be updated even when the interface is down since it shows more than just netdev counters, which might change while the logical link is down. One useful use case, for example, is when running RoCE traffic over the interface (while the logical link is down, but physical link is up) and examining rx_prioX_bytes. Fixes: f62b8bb8f2d3 ("net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality") Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 259bbc575c5322e0bc675c9a77e937250723c333 Author: Maor Gottlieb Date: Sun Dec 31 11:31:34 2017 +0200 net/mlx5: Fix error handling in load one We didn't store the result of mlx5_init_once, due to that mlx5_load_one returned success on error. Fix that. Fixes: 59211bd3b632 ("net/mlx5: Split the load/unload flow into hardware and software flows") Signed-off-by: Maor Gottlieb Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 72f36be06138bdc11bdbe1f04e4a3e2637ea438d Author: Eran Ben Elisha Date: Mon Nov 20 09:58:01 2017 +0200 net/mlx5: Fix mlx5_get_uars_page to return error code Change mlx5_get_uars_page to return ERR_PTR in case of allocation failure. Change all callers accordingly to check the IS_ERR(ptr) instead of NULL. Fixes: 59211bd3b632 ("net/mlx5: Split the load/unload flow into hardware and software flows") Signed-off-by: Eran Ben Elisha Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 ++- drivers/net/ethernet/mellanox/mlx5/core/uar.c | 14 ++++++-------- 3 files changed, 9 insertions(+), 10 deletions(-) commit b6908c296021a99ba2a83a4b4703eb9e6365e5dc Author: Alaa Hleihel Date: Thu Dec 14 19:23:50 2017 +0200 net/mlx5: Fix memory leak in bad flow of mlx5_alloc_irq_vectors Fix a memory leak where in case that pci_alloc_irq_vectors failed, priv->irq_info was not released. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Alaa Hleihel Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/main.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 05e0cc84e00c54fb152d1f4b86bc211823a83d0c Author: Saeed Mahameed Date: Thu Jan 4 04:35:51 2018 +0200 net/mlx5: Fix get vector affinity helper function mlx5_get_vector_affinity used to call pci_irq_get_affinity and after reverting the patch that sets the device affinity via PCI_IRQ_AFFINITY API, calling pci_irq_get_affinity becomes useless and it breaks RDMA mlx5 users. To fix this, this patch provides an alternative way to retrieve IRQ vector affinity using legacy IRQ API, following smp_affinity read procfs implementation. Fixes: 231243c82793 ("Revert mlx5: move affinity hints assignments to generic code") Fixes: a435393acafb ("mlx5: move affinity hints assignments to generic code") Cc: Sagi Grimberg Signed-off-by: Saeed Mahameed include/linux/mlx5/driver.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 7614e913db1f40fff819b36216484dc3808995d4 Author: Andi Kleen Date: Thu Jan 11 21:46:33 2018 +0000 x86/retpoline/irq32: Convert assembler indirect jumps Convert all indirect jumps in 32bit irq inline asm code to use non speculative sequences. Signed-off-by: Andi Kleen Signed-off-by: Thomas Gleixner Acked-by: Arjan van de Ven Acked-by: Ingo Molnar Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Josh Poimboeuf Cc: thomas.lendacky@amd.com Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Tim Chen Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/1515707194-20531-12-git-send-email-dwmw@amazon.co.uk arch/x86/kernel/irq_32.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 5096732f6f695001fa2d6f1335a2680b37912c69 Author: David Woodhouse Date: Thu Jan 11 21:46:32 2018 +0000 x86/retpoline/checksum32: Convert assembler indirect jumps Convert all indirect jumps in 32bit checksum assembler code to use non-speculative sequences when CONFIG_RETPOLINE is enabled. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Acked-by: Arjan van de Ven Acked-by: Ingo Molnar Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Andi Kleen Cc: Josh Poimboeuf Cc: thomas.lendacky@amd.com Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Tim Chen Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/1515707194-20531-11-git-send-email-dwmw@amazon.co.uk arch/x86/lib/checksum_32.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ea08816d5b185ab3d09e95e393f265af54560350 Author: David Woodhouse Date: Thu Jan 11 21:46:31 2018 +0000 x86/retpoline/xen: Convert Xen hypercall indirect jumps Convert indirect call in Xen hypercall to use non-speculative sequence, when CONFIG_RETPOLINE is enabled. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Acked-by: Arjan van de Ven Acked-by: Ingo Molnar Reviewed-by: Juergen Gross Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Andi Kleen Cc: Josh Poimboeuf Cc: thomas.lendacky@amd.com Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Tim Chen Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/1515707194-20531-10-git-send-email-dwmw@amazon.co.uk arch/x86/include/asm/xen/hypercall.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e70e5892b28c18f517f29ab6e83bd57705104b31 Author: David Woodhouse Date: Thu Jan 11 21:46:30 2018 +0000 x86/retpoline/hyperv: Convert assembler indirect jumps Convert all indirect jumps in hyperv inline asm code to use non-speculative sequences when CONFIG_RETPOLINE is enabled. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Acked-by: Arjan van de Ven Acked-by: Ingo Molnar Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Andi Kleen Cc: Josh Poimboeuf Cc: thomas.lendacky@amd.com Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Tim Chen Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/1515707194-20531-9-git-send-email-dwmw@amazon.co.uk arch/x86/include/asm/mshyperv.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 9351803bd803cdbeb9b5a7850b7b6f464806e3db Author: David Woodhouse Date: Thu Jan 11 21:46:29 2018 +0000 x86/retpoline/ftrace: Convert ftrace assembler indirect jumps Convert all indirect jumps in ftrace assembler code to use non-speculative sequences when CONFIG_RETPOLINE is enabled. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Acked-by: Arjan van de Ven Acked-by: Ingo Molnar Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Andi Kleen Cc: Josh Poimboeuf Cc: thomas.lendacky@amd.com Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Tim Chen Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/1515707194-20531-8-git-send-email-dwmw@amazon.co.uk arch/x86/kernel/ftrace_32.S | 6 ++++-- arch/x86/kernel/ftrace_64.S | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) commit 2641f08bb7fc63a636a2b18173221d7040a3512e Author: David Woodhouse Date: Thu Jan 11 21:46:28 2018 +0000 x86/retpoline/entry: Convert entry assembler indirect jumps Convert indirect jumps in core 32/64bit entry assembler code to use non-speculative sequences when CONFIG_RETPOLINE is enabled. Don't use CALL_NOSPEC in entry_SYSCALL_64_fastpath because the return address after the 'call' instruction must be *precisely* at the .Lentry_SYSCALL_64_after_fastpath label for stub_ptregs_64 to work, and the use of alternatives will mess that up unless we play horrid games to prepend with NOPs and make the variants the same length. It's not worth it; in the case where we ALTERNATIVE out the retpoline, the first instruction at __x86.indirect_thunk.rax is going to be a bare jmp *%rax anyway. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Acked-by: Ingo Molnar Acked-by: Arjan van de Ven Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Andi Kleen Cc: Josh Poimboeuf Cc: thomas.lendacky@amd.com Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Tim Chen Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/1515707194-20531-7-git-send-email-dwmw@amazon.co.uk arch/x86/entry/entry_32.S | 5 +++-- arch/x86/entry/entry_64.S | 12 +++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) commit 9697fa39efd3fc3692f2949d4045f393ec58450b Author: David Woodhouse Date: Thu Jan 11 21:46:27 2018 +0000 x86/retpoline/crypto: Convert crypto assembler indirect jumps Convert all indirect jumps in crypto assembler code to use non-speculative sequences when CONFIG_RETPOLINE is enabled. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Acked-by: Arjan van de Ven Acked-by: Ingo Molnar Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Andi Kleen Cc: Josh Poimboeuf Cc: thomas.lendacky@amd.com Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Tim Chen Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/1515707194-20531-6-git-send-email-dwmw@amazon.co.uk arch/x86/crypto/aesni-intel_asm.S | 5 +++-- arch/x86/crypto/camellia-aesni-avx-asm_64.S | 3 ++- arch/x86/crypto/camellia-aesni-avx2-asm_64.S | 3 ++- arch/x86/crypto/crc32c-pcl-intel-asm_64.S | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) commit da285121560e769cc31797bba6422eea71d473e0 Author: David Woodhouse Date: Thu Jan 11 21:46:26 2018 +0000 x86/spectre: Add boot time option to select Spectre v2 mitigation Add a spectre_v2= option to select the mitigation used for the indirect branch speculation vulnerability. Currently, the only option available is retpoline, in its various forms. This will be expanded to cover the new IBRS/IBPB microcode features. The RETPOLINE_AMD feature relies on a serializing LFENCE for speculation control. For AMD hardware, only set RETPOLINE_AMD if LFENCE is a serializing instruction, which is indicated by the LFENCE_RDTSC feature. [ tglx: Folded back the LFENCE/AMD fixes and reworked it so IBRS integration becomes simple ] Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Andi Kleen Cc: Josh Poimboeuf Cc: thomas.lendacky@amd.com Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Tim Chen Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/1515707194-20531-5-git-send-email-dwmw@amazon.co.uk Documentation/admin-guide/kernel-parameters.txt | 28 +++++ arch/x86/include/asm/nospec-branch.h | 10 ++ arch/x86/kernel/cpu/bugs.c | 158 +++++++++++++++++++++++- arch/x86/kernel/cpu/common.c | 4 - 4 files changed, 195 insertions(+), 5 deletions(-) commit 76b043848fd22dbf7f8bf3a1452f8c70d557b860 Author: David Woodhouse Date: Thu Jan 11 21:46:25 2018 +0000 x86/retpoline: Add initial retpoline support Enable the use of -mindirect-branch=thunk-extern in newer GCC, and provide the corresponding thunks. Provide assembler macros for invoking the thunks in the same way that GCC does, from native and inline assembler. This adds X86_FEATURE_RETPOLINE and sets it by default on all CPUs. In some circumstances, IBRS microcode features may be used instead, and the retpoline can be disabled. On AMD CPUs if lfence is serialising, the retpoline can be dramatically simplified to a simple "lfence; jmp *\reg". A future patch, after it has been verified that lfence really is serialising in all circumstances, can enable this by setting the X86_FEATURE_RETPOLINE_AMD feature bit in addition to X86_FEATURE_RETPOLINE. Do not align the retpoline in the altinstr section, because there is no guarantee that it stays aligned when it's copied over the oldinstr during alternative patching. [ Andi Kleen: Rename the macros, add CONFIG_RETPOLINE option, export thunks] [ tglx: Put actual function CALL/JMP in front of the macros, convert to symbolic labels ] [ dwmw2: Convert back to numeric labels, merge objtool fixes ] Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Acked-by: Arjan van de Ven Acked-by: Ingo Molnar Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Andi Kleen Cc: Josh Poimboeuf Cc: thomas.lendacky@amd.com Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Tim Chen Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/1515707194-20531-4-git-send-email-dwmw@amazon.co.uk arch/x86/Kconfig | 13 ++++ arch/x86/Makefile | 10 +++ arch/x86/include/asm/asm-prototypes.h | 25 +++++++ arch/x86/include/asm/cpufeatures.h | 2 + arch/x86/include/asm/nospec-branch.h | 128 ++++++++++++++++++++++++++++++++++ arch/x86/kernel/cpu/common.c | 4 ++ arch/x86/lib/Makefile | 1 + arch/x86/lib/retpoline.S | 48 +++++++++++++ 8 files changed, 231 insertions(+) commit 258c76059cece01bebae098e81bacb1af2edad17 Author: Josh Poimboeuf Date: Thu Jan 11 21:46:24 2018 +0000 objtool: Allow alternatives to be ignored Getting objtool to understand retpolines is going to be a bit of a challenge. For now, take advantage of the fact that retpolines are patched in with alternatives. Just read the original (sane) non-alternative instruction, and ignore the patched-in retpoline. This allows objtool to understand the control flow *around* the retpoline, even if it can't yet follow what's inside. This means the ORC unwinder will fail to unwind from inside a retpoline, but will work fine otherwise. Signed-off-by: Josh Poimboeuf Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Andi Kleen Cc: thomas.lendacky@amd.com Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Tim Chen Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/1515707194-20531-3-git-send-email-dwmw@amazon.co.uk tools/objtool/check.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++----- tools/objtool/check.h | 2 +- 2 files changed, 57 insertions(+), 7 deletions(-) commit 39b735332cb8b33a27c28592d969e4016c86c3ea Author: Josh Poimboeuf Date: Thu Jan 11 21:46:23 2018 +0000 objtool: Detect jumps to retpoline thunks A direct jump to a retpoline thunk is really an indirect jump in disguise. Change the objtool instruction type accordingly. Objtool needs to know where indirect branches are so it can detect switch statement jump tables. This fixes a bunch of warnings with CONFIG_RETPOLINE like: arch/x86/events/intel/uncore_nhmex.o: warning: objtool: nhmex_rbox_msr_enable_event()+0x44: sibling call from callable instruction with modified stack frame kernel/signal.o: warning: objtool: copy_siginfo_to_user()+0x91: sibling call from callable instruction with modified stack frame ... Signed-off-by: Josh Poimboeuf Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Andi Kleen Cc: thomas.lendacky@amd.com Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Tim Chen Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/1515707194-20531-2-git-send-email-dwmw@amazon.co.uk tools/objtool/check.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 8978cc921fc7fad3f4d6f91f1da01352aeeeff25 Author: Eran Ben Elisha Date: Tue Jan 9 11:41:10 2018 +0200 {net,ib}/mlx5: Don't disable local loopback multicast traffic when needed There are systems platform information management interfaces (such as HOST2BMC) for which we cannot disable local loopback multicast traffic. Separate disable_local_lb_mc and disable_local_lb_uc capability bits so driver will not disable multicast loopback traffic if not supported. (It is expected that Firmware will not set disable_local_lb_mc if HOST2BMC is running for example.) Function mlx5_nic_vport_update_local_lb will do best effort to disable/enable UC/MC loopback traffic and return success only in case it succeeded to changed all allowed by Firmware. Adapt mlx5_ib and mlx5e to support the new cap bits. Fixes: 2c43c5a036be ("net/mlx5e: Enable local loopback in loopback selftest") Fixes: c85023e153e3 ("IB/mlx5: Add raw ethernet local loopback support") Fixes: bded747bb432 ("net/mlx5: Add raw ethernet local loopback firmware command") Signed-off-by: Eran Ben Elisha Cc: kernel-team@fb.com Signed-off-by: Saeed Mahameed drivers/infiniband/hw/mlx5/main.c | 9 +++++--- .../net/ethernet/mellanox/mlx5/core/en_selftest.c | 27 ++++++++++++++-------- drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 22 +++++++++++++----- include/linux/mlx5/mlx5_ifc.h | 5 ++-- 5 files changed, 44 insertions(+), 22 deletions(-) commit 445b69e3b75e42362a5bdc13c8b8f61599e2228a Author: Dave Hansen Date: Wed Jan 10 14:49:39 2018 -0800 x86/pti: Make unpoison of pgd for trusted boot work for real The inital fix for trusted boot and PTI potentially misses the pgd clearing if pud_alloc() sets a PGD. It probably works in *practice* because for two adjacent calls to map_tboot_page() that share a PGD entry, the first will clear NX, *then* allocate and set the PGD (without NX clear). The second call will *not* allocate but will clear the NX bit. Defer the NX clearing to a point after it is known that all top-level allocations have occurred. Add a comment to clarify why. [ tglx: Massaged changelog ] Fixes: 262b6b30087 ("x86/tboot: Unbreak tboot with PTI enabled") Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Reviewed-by: Andrea Arcangeli Cc: Jon Masters Cc: "Tim Chen" Cc: gnomes@lxorguk.ukuu.org.uk Cc: peterz@infradead.org Cc: ning.sun@intel.com Cc: tboot-devel@lists.sourceforge.net Cc: andi@firstfloor.org Cc: luto@kernel.org Cc: law@redhat.com Cc: pbonzini@redhat.com Cc: torvalds@linux-foundation.org Cc: gregkh@linux-foundation.org Cc: dwmw@amazon.co.uk Cc: nickc@redhat.com Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180110224939.2695CD47@viggo.jf.intel.com arch/x86/kernel/tboot.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 03a551734cfc2b93f83950a595974e3c9cbd82fd Author: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Thu Jan 11 14:23:30 2018 +0100 x86/PCI: Move and shrink AMD 64-bit window to avoid conflict Avoid problems with BIOS implementations which don't report all used resources to the OS by only allocating a 256GB window directly below the hardware limit (from the BKDG, sec 2.4.6). Fixes a silent reboot loop reported by Aaro Koskinen on an AMD-based MSI MS-7699/760GA-P43(FX) system. This was apparently caused by RAM or other unreported hardware that conflicted with the new window. Link: https://support.amd.com/TechDocs/49125_15h_Models_30h-3Fh_BKDG.pdf Link: https://lkml.kernel.org/r/20180105220412.fzpwqe4zljdawr36@darkstar.musicnaut.iki.fi Fixes: fa564ad96366 ("x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 00-1f, 30-3f, 60-7f)") Reported-by: Aaro Koskinen Signed-off-by: Christian König [bhelgaas: changelog, comment, Fixes:] Signed-off-by: Bjorn Helgaas arch/x86/pci/fixup.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 1a2e91e795def04e15fac87b8e16b635691d0b82 Author: Bin Liu Date: Tue Jan 9 13:27:17 2018 -0600 Documentation: usb: fix typo in UVC gadgetfs config command This seems to be a copy&paste error. With the fix the uvc gadget now can be created by following the instrucitons. Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman Documentation/usb/gadget-testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8626f1dc29d3eee444bfaa92146ec7b291ef41c Author: Stefan Agner Date: Thu Jan 11 14:47:40 2018 +0100 usb: misc: usb3503: make sure reset is low for at least 100us When using a GPIO which is high by default, and initialize the driver in USB Hub mode, initialization fails with: [ 111.757794] usb3503 0-0008: SP_ILOCK failed (-5) The reason seems to be that the chip is not properly reset. Probe does initialize reset low, however some lines later the code already set it back high, which is not long enouth. Make sure reset is asserted for at least 100us by inserting a delay after initializing the reset pin during probe. Signed-off-by: Stefan Agner Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usb3503.c | 2 ++ 1 file changed, 2 insertions(+) commit f32ab7547161b9fa7ebfbc4f18ea1eb3fd49fe25 Author: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Thu Jan 11 14:23:29 2018 +0100 x86/PCI: Add "pci=big_root_window" option for AMD 64-bit windows Only try to enable a 64-bit window on AMD CPUs when "pci=big_root_window" is specified. This taints the kernel because the new 64-bit window uses address space we don't know anything about, and it may contain unreported devices or memory that would conflict with the window. The pci_amd_enable_64bit_bar() quirk that enables the window is specific to AMD CPUs. The generic solution would be to have the firmware enable the window and describe it in the host bridge's _CRS method, or at least describe it in the _PRS method so the OS would have the option of enabling it. Signed-off-by: Christian König [bhelgaas: changelog, extend doc, mention taint in dmesg] Signed-off-by: Bjorn Helgaas Documentation/admin-guide/kernel-parameters.txt | 6 ++++++ arch/x86/include/asm/pci_x86.h | 1 + arch/x86/pci/common.c | 5 +++++ arch/x86/pci/fixup.c | 7 ++++++- 4 files changed, 18 insertions(+), 1 deletion(-) commit 2aad9b3e0711f8c67c472920cd5b70199fba8520 Merge: bd89525 75f139a Author: Paolo Bonzini Date: Thu Jan 11 18:20:48 2018 +0100 Merge branch 'kvm-insert-lfence' into kvm-master Topic branch for CVE-2017-5753, avoiding conflicts in the next merge window. commit 75f139aaf896d6fdeec2e468ddfa4b2fe469bf40 Author: Andrew Honig Date: Wed Jan 10 10:12:03 2018 -0800 KVM: x86: Add memory barrier on vmcs field lookup This adds a memory barrier when performing a lookup into the vmcs_field_to_offset_table. This is related to CVE-2017-5753. Signed-off-by: Andrew Honig Reviewed-by: Jim Mattson Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit ceb176118103479a171da941aecc457767b535c7 Merge: 928afc8 d14ac57 Author: Greg Kroah-Hartman Date: Thu Jan 11 17:40:16 2018 +0100 Merge tag 'usb-serial-4.15-rc8' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.15-rc8 Here are a couple of new device ids for cp210x. Both have been in linux-next with no reported issues. Signed-off-by: Johan Hovold commit bd89525a823ce6edddcedbe9aed79faa1b9cf544 Author: Paolo Bonzini Date: Thu Jan 11 16:55:24 2018 +0100 KVM: x86: emulate #UD while in guest mode This reverts commits ae1f57670703656cc9f293722c3b8b6782f8ab3f and ac9b305caa0df6f5b75d294e4b86c1027648991e. If the hardware doesn't support MOVBE, but L0 sets CPUID.01H:ECX.MOVBE in L1's emulated CPUID information, then L1 is likely to pass that CPUID bit through to L2. L2 will expect MOVBE to work, but if L1 doesn't intercept #UD, then any MOVBE instruction executed in L2 will raise #UD, and the exception will be delivered in L2. Commit ac9b305caa0df6f5b75d294e4b86c1027648991e is a better and more complete version of ae1f57670703 ("KVM: nVMX: Do not emulate #UD while in guest mode"); however, neither considers the above case. Suggested-by: Jim Mattson Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 9 +-------- arch/x86/kvm/vmx.c | 5 +---- 2 files changed, 2 insertions(+), 12 deletions(-) commit ab271bd4dfd568060ffcf5a21b667c7c5df7ab99 Author: Arnd Bergmann Date: Wed Jan 10 17:26:59 2018 +0100 x86: kvm: propagate register_shrinker return code Patch "mm,vmscan: mark register_shrinker() as __must_check" is queued for 4.16 in linux-mm and adds a warning about the unchecked call to register_shrinker: arch/x86/kvm/mmu.c:5485:2: warning: ignoring return value of 'register_shrinker', declared with attribute warn_unused_result [-Wunused-result] This changes the kvm_mmu_module_init() function to fail itself when the call to register_shrinker fails. Signed-off-by: Arnd Bergmann Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit c507babf10ead4d5c8cca704539b170752a8ac84 Author: Punit Agrawal Date: Thu Jan 4 18:24:33 2018 +0000 KVM: arm/arm64: Check pagesize when allocating a hugepage at Stage 2 KVM only supports PMD hugepages at stage 2 but doesn't actually check that the provided hugepage memory pagesize is PMD_SIZE before populating stage 2 entries. In cases where the backing hugepage size is smaller than PMD_SIZE (such as when using contiguous hugepages), KVM can end up creating stage 2 mappings that extend beyond the supplied memory. Fix this by checking for the pagesize of userspace vma before creating PMD hugepage at stage 2. Fixes: 66b3923a1a0f77a ("arm64: hugetlb: add support for PTE contiguous bit") Signed-off-by: Punit Agrawal Cc: Marc Zyngier Cc: # v4.5+ Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebabcf17bcd7ce968b1631ebe08236275698f39b Author: James Hogan Date: Thu Dec 7 07:20:46 2017 +0000 MIPS: Implement __multi3 for GCC7 MIPS64r6 builds GCC7 is a bit too eager to generate suboptimal __multi3 calls (128bit multiply with 128bit result) for MIPS64r6 builds, even in code which doesn't explicitly use 128bit types, such as the following: unsigned long func(unsigned long a, unsigned long b) { return a > (~0UL) / b; } Which GCC rearanges to: return (unsigned __int128)a * (unsigned __int128)b > 0xffffffffffffffff; Therefore implement __multi3, but only for MIPS64r6 with GCC7 as under normal circumstances we wouldn't expect any calls to __multi3 to be generated from kernel code. Reported-by: Thomas Petazzoni Signed-off-by: James Hogan Tested-by: Waldemar Brodkorb Cc: Ralf Baechle Cc: Maciej W. Rozycki Cc: Matthew Fortune Cc: Florian Fainelli Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17890/ arch/mips/lib/Makefile | 3 ++- arch/mips/lib/libgcc.h | 17 ++++++++++++++++ arch/mips/lib/multi3.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 1 deletion(-) commit b3defb791b26ea0683a93a4f49c77ec45ec96f10 Author: Takashi Iwai Date: Tue Jan 9 23:11:03 2018 +0100 ALSA: seq: Make ioctls race-free The ALSA sequencer ioctls have no protection against racy calls while the concurrent operations may lead to interfere with each other. As reported recently, for example, the concurrent calls of setting client pool with a combination of write calls may lead to either the unkillable dead-lock or UAF. As a slightly big hammer solution, this patch introduces the mutex to make each ioctl exclusive. Although this may reduce performance via parallel ioctl calls, usually it's not demanded for sequencer usages, hence it should be negligible. Reported-by: Luo Quan Reviewed-by: Kees Cook Reviewed-by: Greg Kroah-Hartman Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 3 +++ sound/core/seq/seq_clientmgr.h | 1 + 2 files changed, 4 insertions(+) commit 0217690f888e1894fd038b8e70aa5a5d6fd5e5d3 Merge: 2a266f2 ecba829 Author: Paolo Bonzini Date: Thu Jan 11 14:07:27 2018 +0100 Merge tag 'kvm-ppc-fixes-4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into kvm-master PPC KVM fixes for 4.15 Four commits here, including two that were tagged but never merged. Three of them are for the HPT resizing code; two of those fix a user-triggerable use-after-free in the host, and one that fixes stale TLB entries in the guest. The remaining commit fixes a bug causing PR KVM guests under PowerVM to fail to start. commit 2a266f23550be997d783f27e704b9b40c4010292 Author: Haozhong Zhang Date: Wed Jan 10 21:44:42 2018 +0800 KVM MMU: check pending exception before injecting APF For example, when two APF's for page ready happen after one exit and the first one becomes pending, the second one will result in #DF. Instead, just handle the second page fault synchronously. Reported-by: Ross Zwisler Message-ID: Reported-by: Alec Blayne Signed-off-by: Haozhong Zhang Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3b9c57cef4de80f29885e1edf69828de8d3fae6b Author: Jonathan Liu Date: Tue Jan 9 13:03:23 2018 +1100 drm/sun4i: hdmi: Add missing rate halving check in sun4i_tmds_determine_rate It was only checking the divider when determing the closest match if it could not match the requested rate exactly. For a projector connected to an Olimex A20-OLinuXino-LIME using HDMI with a native resolution of 1280x800 and pixel clock of 83.5 MHz, this resulted in 1280x800 mode not being available and the following in dmesg when the kernel is booted with drm.debug=0x3e: [drm:drm_mode_debug_printmodeline] Modeline 37:"1280x800" 60 83500 1280 1352 1480 1680 800 810 816 831 0x48 0x5 [drm:drm_mode_prune_invalid] Not using 1280x800 mode: NOCLOCK Fixes: 9c5681011a0c ("drm/sun4i: Add HDMI support") Signed-off-by: Jonathan Liu Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180109020323.11852-4-net147@gmail.com drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 58faae28f64e9cb6d7f89596656db640392a1efc Author: Jonathan Liu Date: Tue Jan 9 13:03:22 2018 +1100 drm/sun4i: hdmi: Fix incorrect assignment in sun4i_tmds_determine_rate best_div is set to i which corresponds to rate halving when it should be set to j which corresponds to the divider. Fixes: 9c5681011a0c ("drm/sun4i: Add HDMI support") Signed-off-by: Jonathan Liu Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180109020323.11852-3-net147@gmail.com drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 111f4c3309397370f1fd9579754f06b82055041d Author: Jonathan Liu Date: Tue Jan 9 13:03:21 2018 +1100 drm/sun4i: hdmi: Check for unset best_parent in sun4i_tmds_determine_rate It is possible that if there is no exact rate match and "rounded = clk_hw_round_rate(parent, ideal)" gives high enough values (e.g. if rounded is 2 * ideal) that the condition "abs(rate - rounded / i) < abs(rate - best_parent / best_div)" is never met and best_parent is never set. This results in req->rate and req->best_parent_rate being assigned 0. To avoid this, we set best_parent to the first calculated rate if it is unset. The sun4i_tmds_calc_divider function already has a similar check. Fixes: 9c5681011a0c ("drm/sun4i: Add HDMI support") Signed-off-by: Jonathan Liu Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20180109020323.11852-2-net147@gmail.com drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5005c8514285ae4f28e862f8d91faaa2015e03a3 Author: Chris Wilson Date: Sat Jan 6 10:56:18 2018 +0000 drm/i915: Don't adjust priority on an already signaled fence When we retire a signaled fence, we free the dependency tree. However, we skip clearing the list so that if we then try to adjust the priority of the signaled fence, we may walk the list of freed dependencies. [ 3083.156757] ================================================================== [ 3083.156806] BUG: KASAN: use-after-free in execlists_schedule+0x199/0x660 [i915] [ 3083.156810] Read of size 8 at addr ffff8806bf20f400 by task Xorg/831 [ 3083.156815] CPU: 0 PID: 831 Comm: Xorg Not tainted 4.15.0-rc6-no-psn+ #1 [ 3083.156817] Hardware name: Notebook N24_25BU/N24_25BU, BIOS 5.12 02/17/2017 [ 3083.156818] Call Trace: [ 3083.156823] dump_stack+0x5c/0x7a [ 3083.156827] print_address_description+0x6b/0x290 [ 3083.156830] kasan_report+0x28f/0x380 [ 3083.156872] ? execlists_schedule+0x199/0x660 [i915] [ 3083.156914] execlists_schedule+0x199/0x660 [i915] [ 3083.156956] ? intel_crtc_atomic_check+0x146/0x4e0 [i915] [ 3083.156997] ? execlists_submit_request+0xe0/0xe0 [i915] [ 3083.157038] ? i915_vma_misplaced.part.4+0x25/0xb0 [i915] [ 3083.157079] ? __i915_vma_do_pin+0x7c8/0xc80 [i915] [ 3083.157121] ? intel_atomic_state_alloc+0x44/0x60 [i915] [ 3083.157130] ? drm_atomic_helper_page_flip+0x3e/0xb0 [drm_kms_helper] [ 3083.157145] ? drm_mode_page_flip_ioctl+0x7d2/0x850 [drm] [ 3083.157159] ? drm_ioctl_kernel+0xa7/0xf0 [drm] [ 3083.157172] ? drm_ioctl+0x45b/0x560 [drm] [ 3083.157211] i915_gem_object_wait_priority+0x14c/0x2c0 [i915] [ 3083.157251] ? i915_gem_get_aperture_ioctl+0x150/0x150 [i915] [ 3083.157290] ? i915_vma_pin_fence+0x1d8/0x320 [i915] [ 3083.157331] ? intel_pin_and_fence_fb_obj+0x175/0x250 [i915] [ 3083.157372] ? intel_rotation_info_size+0x60/0x60 [i915] [ 3083.157413] ? intel_link_compute_m_n+0x80/0x80 [i915] [ 3083.157428] ? drm_dev_printk+0x1b0/0x1b0 [drm] [ 3083.157443] ? drm_dev_printk+0x1b0/0x1b0 [drm] [ 3083.157485] intel_prepare_plane_fb+0x2f8/0x5a0 [i915] [ 3083.157527] ? intel_crtc_get_vblank_counter+0x80/0x80 [i915] [ 3083.157536] drm_atomic_helper_prepare_planes+0xa0/0x1c0 [drm_kms_helper] [ 3083.157587] intel_atomic_commit+0x12e/0x4e0 [i915] [ 3083.157605] drm_atomic_helper_page_flip+0xa2/0xb0 [drm_kms_helper] [ 3083.157621] drm_mode_page_flip_ioctl+0x7d2/0x850 [drm] [ 3083.157638] ? drm_mode_cursor2_ioctl+0x10/0x10 [drm] [ 3083.157652] ? drm_lease_owner+0x1a/0x30 [drm] [ 3083.157668] ? drm_mode_cursor2_ioctl+0x10/0x10 [drm] [ 3083.157681] drm_ioctl_kernel+0xa7/0xf0 [drm] [ 3083.157696] drm_ioctl+0x45b/0x560 [drm] [ 3083.157711] ? drm_mode_cursor2_ioctl+0x10/0x10 [drm] [ 3083.157725] ? drm_getstats+0x20/0x20 [drm] [ 3083.157729] ? timerqueue_del+0x49/0x80 [ 3083.157732] ? __remove_hrtimer+0x62/0xb0 [ 3083.157735] ? hrtimer_try_to_cancel+0x173/0x210 [ 3083.157738] do_vfs_ioctl+0x13b/0x880 [ 3083.157741] ? ioctl_preallocate+0x140/0x140 [ 3083.157744] ? _raw_spin_unlock_irq+0xe/0x30 [ 3083.157746] ? do_setitimer+0x234/0x370 [ 3083.157750] ? SyS_setitimer+0x19e/0x1b0 [ 3083.157752] ? SyS_alarm+0x140/0x140 [ 3083.157755] ? __rcu_read_unlock+0x66/0x80 [ 3083.157757] ? __fget+0xc4/0x100 [ 3083.157760] SyS_ioctl+0x74/0x80 [ 3083.157763] entry_SYSCALL_64_fastpath+0x1a/0x7d [ 3083.157765] RIP: 0033:0x7f6135d0c6a7 [ 3083.157767] RSP: 002b:00007fff01451888 EFLAGS: 00003246 ORIG_RAX: 0000000000000010 [ 3083.157769] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f6135d0c6a7 [ 3083.157771] RDX: 00007fff01451950 RSI: 00000000c01864b0 RDI: 000000000000000c [ 3083.157772] RBP: 00007f613076f600 R08: 0000000000000001 R09: 0000000000000000 [ 3083.157773] R10: 0000000000000060 R11: 0000000000003246 R12: 0000000000000000 [ 3083.157774] R13: 0000000000000060 R14: 000000000000001b R15: 0000000000000060 [ 3083.157779] Allocated by task 831: [ 3083.157783] kmem_cache_alloc+0xc0/0x200 [ 3083.157822] i915_gem_request_await_dma_fence+0x2c4/0x5d0 [i915] [ 3083.157861] i915_gem_request_await_object+0x321/0x370 [i915] [ 3083.157900] i915_gem_do_execbuffer+0x1165/0x19c0 [i915] [ 3083.157937] i915_gem_execbuffer2+0x1ad/0x550 [i915] [ 3083.157950] drm_ioctl_kernel+0xa7/0xf0 [drm] [ 3083.157962] drm_ioctl+0x45b/0x560 [drm] [ 3083.157964] do_vfs_ioctl+0x13b/0x880 [ 3083.157966] SyS_ioctl+0x74/0x80 [ 3083.157968] entry_SYSCALL_64_fastpath+0x1a/0x7d [ 3083.157971] Freed by task 831: [ 3083.157973] kmem_cache_free+0x77/0x220 [ 3083.158012] i915_gem_request_retire+0x72c/0xa70 [i915] [ 3083.158051] i915_gem_request_alloc+0x1e9/0x8b0 [i915] [ 3083.158089] i915_gem_do_execbuffer+0xa96/0x19c0 [i915] [ 3083.158127] i915_gem_execbuffer2+0x1ad/0x550 [i915] [ 3083.158140] drm_ioctl_kernel+0xa7/0xf0 [drm] [ 3083.158153] drm_ioctl+0x45b/0x560 [drm] [ 3083.158155] do_vfs_ioctl+0x13b/0x880 [ 3083.158156] SyS_ioctl+0x74/0x80 [ 3083.158158] entry_SYSCALL_64_fastpath+0x1a/0x7d [ 3083.158162] The buggy address belongs to the object at ffff8806bf20f400 which belongs to the cache i915_dependency of size 64 [ 3083.158166] The buggy address is located 0 bytes inside of 64-byte region [ffff8806bf20f400, ffff8806bf20f440) [ 3083.158168] The buggy address belongs to the page: [ 3083.158171] page:00000000d43decc4 count:1 mapcount:0 mapping: (null) index:0x0 [ 3083.158174] flags: 0x17ffe0000000100(slab) [ 3083.158179] raw: 017ffe0000000100 0000000000000000 0000000000000000 0000000180200020 [ 3083.158182] raw: ffffea001afc16c0 0000000500000005 ffff880731b881c0 0000000000000000 [ 3083.158184] page dumped because: kasan: bad access detected [ 3083.158187] Memory state around the buggy address: [ 3083.158190] ffff8806bf20f300: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 3083.158192] ffff8806bf20f380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 3083.158195] >ffff8806bf20f400: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 3083.158196] ^ [ 3083.158199] ffff8806bf20f480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 3083.158201] ffff8806bf20f500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 3083.158203] ================================================================== Reported-by: Alexandru Chirvasitu Reported-by: Mike Keehan Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104436 Fixes: 1f181225f8ec ("drm/i915/execlists: Keep request->priority for its lifetime") Signed-off-by: Chris Wilson Cc: Alexandru Chirvasitu Cc: Michał Winiarski Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Tested-by: Alexandru Chirvasitu Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20180106105618.13532-1-chris@chris-wilson.co.uk (cherry picked from commit c218ee03b9315073ce43992792554dafa0626eb8) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 4636bda86aa1f34f45c629477476a0dcfa04e597 Author: Kenneth Graunke Date: Fri Jan 5 00:59:05 2018 -0800 drm/i915: Whitelist SLICE_COMMON_ECO_CHICKEN1 on Geminilake. Geminilake requires the 3D driver to select whether barriers are intended for compute shaders, or tessellation control shaders, by whacking a "Barrier Mode" bit in SLICE_COMMON_ECO_CHICKEN1 when switching pipelines. Failure to do this properly can result in GPU hangs. Unfortunately, this means it needs to switch mid-batch, so only userspace can properly set it. To facilitate this, the kernel needs to whitelist the register. The workarounds page currently tags this as applying to Broxton only, but that doesn't make sense. The documentation for the register it references says the bit userspace is supposed to toggle only exists on Geminilake. Empirically, the Mesa patch to toggle this bit appears to fix intermittent GPU hangs in tessellation control shader barrier tests on Geminilake; we haven't seen those hangs on Broxton. v2: Mention WA #0862 in the comment (it doesn't have a name). Signed-off-by: Kenneth Graunke Acked-by: Rodrigo Vivi Cc: stable@vger.kernel.org Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20180105085905.9298-1-kenneth@whitecape.org (cherry picked from commit ab062639edb0412daf6de540725276b9a5d217f9) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_engine_cs.c | 5 +++++ 2 files changed, 7 insertions(+) commit cbd0a6a2cc4327681edc61f6f47f47e276ea81d6 Merge: 64fce44 ce4bb04 Author: Linus Torvalds Date: Wed Jan 10 17:55:42 2018 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs regression fix from Al Viro/ Fix a leak in socket() introduced by commit 8e1611e23579 ("make sock_alloc_file() do sock_release() on failures"). * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: Fix a leak in socket(2) when we fail to allocate a file descriptor. commit 64fce444f126b9d26574221330d9599fe998944e Merge: 5f615b9 ccc12b1 Author: Linus Torvalds Date: Wed Jan 10 17:53:18 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) BPF speculation prevention and BPF_JIT_ALWAYS_ON, from Alexei Starovoitov. 2) Revert dev_get_random_name() changes as adjust the error code returns seen by userspace definitely breaks stuff. 3) Fix TX DMA map/unmap on older iwlwifi devices, from Emmanuel Grumbach. 4) From wrong AF family when requesting sock diag modules, from Andrii Vladyka. 5) Don't add new ipv6 routes attached to the null_entry, from Wei Wang. 6) Some SCTP sockopt length fixes from Marcelo Ricardo Leitner. 7) Don't leak when removing VLAN ID 0, from Cong Wang. 8) Hey there's a potential leak in ipv6_make_skb() too, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits) ipv6: sr: fix TLVs not being copied using setsockopt ipv6: fix possible mem leaks in ipv6_make_skb() mlxsw: spectrum_qdisc: Don't use variable array in mlxsw_sp_tclass_congestion_enable mlxsw: pci: Wait after reset before accessing HW nfp: always unmask aux interrupts at init 8021q: fix a memory leak for VLAN 0 device of_mdio: avoid MDIO bus removal when a PHY is missing caif_usb: use strlcpy() instead of strncpy() doc: clarification about setting SO_ZEROCOPY net: gianfar_ptp: move set_fipers() to spinlock protecting area sctp: make use of pre-calculated len sctp: add a ceiling to optlen in some sockopts sctp: GFP_ATOMIC is not needed in sctp_setsockopt_events bpf: introduce BPF_JIT_ALWAYS_ON config bpf: avoid false sharing of map refcount with max_entries ipv6: remove null_entry before adding default route SolutionEngine771x: add Ether TSU resource SolutionEngine771x: fix Ether platform data docs-rst: networking: wire up msg_zerocopy net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg() ... commit 48282969826b3d3c76e908182f69724d86d995fe Author: 王振杰 Date: Wed Jan 10 16:12:22 2018 -0800 Input: synaptics - Lenovo Thinkpad T460p devices should use RMI The tpouchpad/trackpoint on Lenovo Thinkpad T460p work with smbus/RMI. Signed-off-by: Zhenjie Wang Signed-off-by: Dmitry Torokhov drivers/input/mouse/synaptics.c | 1 + 1 file changed, 1 insertion(+) commit 43173a0ecc0c0f1a652847d84c1ef46ada73a974 Author: Arnd Bergmann Date: Wed Jan 10 11:29:23 2018 -0800 Input: of_touchscreen - add MODULE_LICENSE The lack of the MODULE_LICENSE tag can lead to a warning here: WARNING: modpost: missing MODULE_LICENSE() in drivers/input/touchscreen/of_touchscreen.o I'm adding a license and description tag, but no MODULE_AUTHOR() as this file is a collection of standalone helper functions that were all added by different developers. Signed-off-by: Arnd Bergmann Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/of_touchscreen.c | 4 ++++ 1 file changed, 4 insertions(+) commit ce4bb04cae8924792ed92f4af2793b77fc986f0e Author: Al Viro Date: Wed Jan 10 18:47:05 2018 -0500 Fix a leak in socket(2) when we fail to allocate a file descriptor. Got broken by "make sock_alloc_file() do sock_release() on failures" - cleanup after sock_map_fd() failure got pulled all the way into sock_alloc_file(), but it used to serve the case when sock_map_fd() failed *before* getting to sock_alloc_file() as well, and that got lost. Trivial to fix, fortunately. Fixes: 8e1611e23579 (make sock_alloc_file() do sock_release() on failures) Reported-by: Dmitry Vyukov Signed-off-by: Al Viro net/socket.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 23b19b7b50fe1867da8d431eea9cd3e4b6328c2c Author: Takashi Iwai Date: Wed Jan 10 23:48:05 2018 +0100 ALSA: pcm: Remove yet superfluous WARN_ON() muldiv32() contains a snd_BUG_ON() (which is morphed as WARN_ON() with debug option) for checking the case of 0 / 0. This would be helpful if this happens only as a logical error; however, since the hw refine is performed with any data set provided by user, the inconsistent values that can trigger such a condition might be passed easily. Actually, syzbot caught this by passing some zero'ed old hw_params ioctl. So, having snd_BUG_ON() there is simply superfluous and rather harmful to give unnecessary confusions. Let's get rid of it. Reported-by: syzbot+7e6ee55011deeebce15d@syzkaller.appspotmail.com Cc: Signed-off-by: Takashi Iwai sound/core/pcm_lib.c | 1 - 1 file changed, 1 deletion(-) commit bbeb6e4323dad9b5e0ee9f60c223dd532e2403b1 Author: Daniel Borkmann Date: Wed Jan 10 23:25:05 2018 +0100 bpf, array: fix overflow in max_entries and undefined behavior in index_mask syzkaller tried to alloc a map with 0xfffffffd entries out of a userns, and thus unprivileged. With the recently added logic in b2157399cc98 ("bpf: prevent out-of-bounds speculation") we round this up to the next power of two value for max_entries for unprivileged such that we can apply proper masking into potentially zeroed out map slots. However, this will generate an index_mask of 0xffffffff, and therefore a + 1 will let this overflow into new max_entries of 0. This will pass allocation, etc, and later on map access we still enforce on the original attr->max_entries value which was 0xfffffffd, therefore triggering GPF all over the place. Thus bail out on overflow in such case. Moreover, on 32 bit archs roundup_pow_of_two() can also not be used, since fls_long(max_entries - 1) can result in 32 and 1UL << 32 in 32 bit space is undefined. Therefore, do this by hand in a 64 bit variable. This fixes all the issues triggered by syzkaller's reproducers. Fixes: b2157399cc98 ("bpf: prevent out-of-bounds speculation") Reported-by: syzbot+b0efb8e572d01bce1ae0@syzkaller.appspotmail.com Reported-by: syzbot+6c15e9744f75f2364773@syzkaller.appspotmail.com Reported-by: syzbot+d2f5524fb46fd3b312ee@syzkaller.appspotmail.com Reported-by: syzbot+61d23c95395cc90dbc2b@syzkaller.appspotmail.com Reported-by: syzbot+0d363c942452cca68c01@syzkaller.appspotmail.com Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov kernel/bpf/arraymap.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 7891a87efc7116590eaba57acc3c422487802c6f Author: Daniel Borkmann Date: Wed Jan 10 20:04:37 2018 +0100 bpf: arsh is not supported in 32 bit alu thus reject it The following snippet was throwing an 'unknown opcode cc' warning in BPF interpreter: 0: (18) r0 = 0x0 2: (7b) *(u64 *)(r10 -16) = r0 3: (cc) (u32) r0 s>>= (u32) r0 4: (95) exit Although a number of JITs do support BPF_ALU | BPF_ARSH | BPF_{K,X} generation, not all of them do and interpreter does neither. We can leave existing ones and implement it later in bpf-next for the remaining ones, but reject this properly in verifier for the time being. Fixes: 17a5267067f3 ("bpf: verifier (add verifier core)") Reported-by: syzbot+93c4904c5c70348a6890@syzkaller.appspotmail.com Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 5 ++++ tools/testing/selftests/bpf/test_verifier.c | 40 +++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) commit 40950343932879247861ae152dcb55e4555afdff Author: Colin Ian King Date: Wed Jan 10 09:20:54 2018 +0000 bpf: fix spelling mistake: "obusing" -> "abusing" Trivial fix to spelling mistake in error message text. Signed-off-by: Colin Ian King Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57194fa763bfa1a0908f30d4c77835beaa118fcb Author: Dan Carpenter Date: Tue Jan 9 23:03:46 2018 +0300 IB/hfi1: Prevent a NULL dereference In the original code, we set "fd->uctxt" to NULL and then dereference it which will cause an Oops. Fixes: f2a3bc00a03c ("IB/hfi1: Protect context array set/clear with spinlock") Cc: # 4.14.x Signed-off-by: Dan Carpenter Reviewed-by: Michael J. Ruhl Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cd52cb26e7ead5093635e98e07e221e4df482d34 Author: Sagi Grimberg Date: Sun Nov 26 15:31:04 2017 +0200 iser-target: Fix possible use-after-free in connection establishment error In case we fail to establish the connection we must drain our pre-posted login recieve work request before continuing safely with connection teardown. Fixes: a060b5629ab0 ("IB/core: generic RDMA READ/WRITE API") Cc: # 4.7+ Reported-by: Amrani, Ram Signed-off-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/ulp/isert/ib_isert.c | 1 + 1 file changed, 1 insertion(+) commit c9f926000fe3b84135a81602a9f7e63a6a7898e2 Author: Hannes Reinecke Date: Wed Jan 10 09:34:02 2018 +0100 scsi: libsas: Disable asynchronous aborts for SATA devices Handling CD-ROM devices from libsas is decidedly odd, as libata relies on SCSI EH to be started to figure out that no medium is present. So we cannot do asynchronous aborts for SATA devices. Fixes: 909657615d9 ("scsi: libsas: allow async aborts") Cc: # 4.12+ Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Tested-by: Yves-Alexis Perez Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_scsi_host.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit ccc12b11c5332c84442ef120dcd631523be75089 Author: Mathieu Xhonneux Date: Wed Jan 10 13:35:49 2018 +0000 ipv6: sr: fix TLVs not being copied using setsockopt Function ipv6_push_rthdr4 allows to add an IPv6 Segment Routing Header to a socket through setsockopt, but the current implementation doesn't copy possible TLVs at the end of the SRH received from userspace. Therefore, the execution of the following branch if (sr_has_hmac(sr_phdr)) { ... } will never complete since the len and type fields of a possible HMAC TLV are not copied, hence seg6_get_tlv_hmac will return an error, and the HMAC will not be computed. This commit adds a memcpy in case TLVs have been appended to the SRH. Fixes: a149e7c7ce81 ("ipv6: sr: add support for SRH injection through setsockopt") Acked-by: David Lebrun Signed-off-by: Mathieu Xhonneux Signed-off-by: David S. Miller net/ipv6/exthdrs.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 862c03ee1deb7e19e0f9931682e0294ecd1fcaf9 Author: Eric Dumazet Date: Wed Jan 10 03:45:49 2018 -0800 ipv6: fix possible mem leaks in ipv6_make_skb() ip6_setup_cork() might return an error, while memory allocations have been done and must be rolled back. Fixes: 6422398c2ab0 ("ipv6: introduce ipv6_make_skb") Signed-off-by: Eric Dumazet Cc: Vlad Yasevich Reported-by: Mike Maloney Acked-by: Mike Maloney Signed-off-by: David S. Miller net/ipv6/ip6_output.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8f3d194600a5fe7d5071ea0260c7fa9317f156f6 Merge: fc23365 db84924 Author: David S. Miller Date: Wed Jan 10 15:58:23 2018 -0500 Merge branch 'mlxsw-couple-of-fixes' Jiri Pirko says: ==================== mlxsw: couple of fixes Couple of small fixes for mlxsw driver. ==================== Signed-off-by: David S. Miller commit db84924c4fc3be1ef0c965d5ece5f6d785c77c5f Author: Jiri Pirko Date: Wed Jan 10 11:42:44 2018 +0100 mlxsw: spectrum_qdisc: Don't use variable array in mlxsw_sp_tclass_congestion_enable Resolve the sparse warning: "sparse: Variable length array is used." Use 2 arrays for 2 PRM register accesses. Fixes: 96f17e0776c2 ("mlxsw: spectrum: Support RED qdisc offload") Signed-off-by: Jiri Pirko Reviewed-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8e033a93b37f37aa9fca71a370a895155320af60 Author: Yuval Mintz Date: Wed Jan 10 11:42:43 2018 +0100 mlxsw: pci: Wait after reset before accessing HW After performing reset driver polls on HW indication until learning that the reset is done, but immediately after reset the device becomes unresponsive which might lead to completion timeout on the first read. Wait for 100ms before starting the polling. Fixes: 233fa44bd67a ("mlxsw: pci: Implement reset done check") Signed-off-by: Yuval Mintz Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/pci.c | 7 ++++++- drivers/net/ethernet/mellanox/mlxsw/pci_hw.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) commit fc2336505fb49a8b932a0a67a9745c408b79992c Author: Jakub Kicinski Date: Tue Jan 9 18:14:28 2018 -0800 nfp: always unmask aux interrupts at init The link state and exception interrupts may be masked when we probe. The firmware should in theory prevent sending (and automasking) those interrupts if the device is disabled, but if my reading of the FW code is correct there are firmwares out there with race conditions in this area. The interrupt may also be masked if previous driver which used the device was malfunctioning and we didn't load the FW (there is no other good way to comprehensively reset the PF). Note that FW unmasks the data interrupts by itself when vNIC is enabled, such helpful operation is not performed for LSC/EXN interrupts. Always unmask the auxiliary interrupts after request_irq(). On the remove path add missing PCI write flush before free_irq(). Fixes: 4c3523623dc0 ("net: add driver for Netronome NFP4000/NFP6000 NIC VFs") Signed-off-by: Jakub Kicinski Reviewed-by: Dirk van der Merwe Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 ++ 1 file changed, 2 insertions(+) commit 78bbb15f2239bc8e663aa20bbe1987c91a0b75f6 Author: Cong Wang Date: Tue Jan 9 13:40:41 2018 -0800 8021q: fix a memory leak for VLAN 0 device A vlan device with vid 0 is allow to creat by not able to be fully cleaned up by unregister_vlan_dev() which checks for vlan_id!=0. Also, VLAN 0 is probably not a valid number and it is kinda "reserved" for HW accelerating devices, but it is probably too late to reject it from creation even if makes sense. Instead, just remove the check in unregister_vlan_dev(). Reported-by: Dmitry Vyukov Fixes: ad1afb003939 ("vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)") Cc: Vlad Yasevich Cc: Ben Hutchings Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/8021q/vlan.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 6ade262b77f4285f7ba9216d5831093d7766304a Merge: 95f566d 49fdde8 Author: David S. Miller Date: Wed Jan 10 15:08:46 2018 -0500 Merge tag 'wireless-drivers-for-davem-2018-01-09' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.15 Hopefully the last set of fixes for 4.15. iwlwifi * fix DMA mapping regression since v4.14 wcn36xx * fix dynamic power save which has been broken since the driver was commited ==================== Signed-off-by: David S. Miller commit 95f566de0269a0c59fd6a737a147731302136429 Author: Madalin Bucur Date: Tue Jan 9 14:43:34 2018 +0200 of_mdio: avoid MDIO bus removal when a PHY is missing If one of the child devices is missing the of_mdiobus_register_phy() call will return -ENODEV. When a missing device is encountered the registration of the remaining PHYs is stopped and the MDIO bus will fail to register. Propagate all errors except ENODEV to avoid it. Signed-off-by: Madalin Bucur Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/of/of_mdio.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit b0d55b5bc77755501be9de2c935d106ff8dba9ac Author: Xiongfeng Wang Date: Tue Jan 9 19:58:18 2018 +0800 caif_usb: use strlcpy() instead of strncpy() gcc-8 reports net/caif/caif_usb.c: In function 'cfusbl_device_notify': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' output may be truncated copying 15 bytes from a string of length 15 [-Wstringop-truncation] The compiler require that the input param 'len' of strncpy() should be greater than the length of the src string, so that '\0' is copied as well. We can just use strlcpy() to avoid this warning. Signed-off-by: Xiongfeng Wang Signed-off-by: David S. Miller net/caif/caif_usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit af60d61fa846725566f4a876ae04f891bdff1c7a Author: Kornilios Kourtis Date: Tue Jan 9 09:52:22 2018 +0100 doc: clarification about setting SO_ZEROCOPY Signed-off-by: Kornilios Kourtis Acked-by: Willem de Bruijn Signed-off-by: David S. Miller Documentation/networking/msg_zerocopy.rst | 4 ++++ 1 file changed, 4 insertions(+) commit 11d827a993a969c3c6ec56758ff63a44ba19b466 Author: Yangbo Lu Date: Tue Jan 9 11:02:33 2018 +0800 net: gianfar_ptp: move set_fipers() to spinlock protecting area set_fipers() calling should be protected by spinlock in case that any interrupt breaks related registers setting and the function we expect. This patch is to move set_fipers() to spinlock protecting area in ptp_gianfar_adjtime(). Signed-off-by: Yangbo Lu Acked-by: Richard Cochran Reviewed-by: Fabio Estevam Signed-off-by: David S. Miller drivers/net/ethernet/freescale/gianfar_ptp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e5143f863c92f9f37b0977e482d6c78e74500f3b Merge: 661e4e3 c76f97c Author: David S. Miller Date: Wed Jan 10 14:53:23 2018 -0500 Merge branch 'sctp-Some-sockopt-optlen-fixes' Marcelo Ricardo Leitner says: ==================== sctp: Some sockopt optlen fixes Hangbin Liu reported that some SCTP sockopt are allowing the user to get the kernel to allocate really large buffers by not having a ceiling on optlen. This patchset address this issue (in patch 2), replace an GFP_ATOMIC that isn't needed and avoid calculating the option size multiple times in some setsockopt. ==================== Acked-by: Neil Horman Signed-off-by: David S. Miller commit c76f97c99ae6d26d14c7f0e50e074382bfbc9f98 Author: Marcelo Ricardo Leitner Date: Mon Jan 8 19:02:29 2018 -0200 sctp: make use of pre-calculated len Some sockopt handling functions were calculating the length of the buffer to be written to userspace and then calculating it again when actually writing the buffer, which could lead to some write not using an up-to-date length. This patch updates such places to just make use of the len variable. Also, replace some sizeof(type) to sizeof(var). Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/socket.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 5960cefab9df76600a1a7d4ff592c59e14616e88 Author: Marcelo Ricardo Leitner Date: Mon Jan 8 19:02:28 2018 -0200 sctp: add a ceiling to optlen in some sockopts Hangbin Liu reported that some sockopt calls could cause the kernel to log a warning on memory allocation failure if the user supplied a large optlen value. That is because some of them called memdup_user() without a ceiling on optlen, allowing it to try to allocate really large buffers. This patch adds a ceiling by limiting optlen to the maximum allowed that would still make sense for these sockopt. Reported-by: Hangbin Liu Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/socket.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2e83acb970684008baee471427270c029a76ddbd Author: Marcelo Ricardo Leitner Date: Mon Jan 8 19:02:27 2018 -0200 sctp: GFP_ATOMIC is not needed in sctp_setsockopt_events So replace it with GFP_USER and also add __GFP_NOWARN. Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f615b97cdea733c955e152774e1501107564fbd Merge: cf1fb15 900498a Author: Linus Torvalds Date: Wed Jan 10 11:18:31 2018 -0800 Merge tag 'sound-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of the last-minute small PCM fixes: - A workaround for the recent regression wrt PulseAudio - Removal of spurious WARN_ON() that is triggered by syzkaller - Fixes for aloop, hardening racy accesses - Fixes in PCM OSS emulation wrt the unabortable loops that may cause RCU stall" * tag 'sound-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: pcm: Allow aborting mutex lock at OSS read/write loops ALSA: pcm: Abort properly at pending signal in OSS read/write loops ALSA: aloop: Fix racy hw constraints adjustment ALSA: aloop: Fix inconsistent format due to incomplete rule ALSA: aloop: Release cable upon open error path ALSA: pcm: Workaround for weird PulseAudio behavior on rewind error ALSA: pcm: Add missing error checks in OSS emulation plugin builder ALSA: pcm: Remove incorrect snd_BUG_ON() usages commit 612e8e9350fd19cae6900cf36ea0c6892d1a0dca Author: Borislav Petkov Date: Wed Jan 10 12:28:16 2018 +0100 x86/alternatives: Fix optimize_nops() checking The alternatives code checks only the first byte whether it is a NOP, but with NOPs in front of the payload and having actual instructions after it breaks the "optimized' test. Make sure to scan all bytes before deciding to optimize the NOPs in there. Reported-by: David Woodhouse Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: Tom Lendacky Cc: Andi Kleen Cc: Tim Chen Cc: Peter Zijlstra Cc: Jiri Kosina Cc: Dave Hansen Cc: Andi Kleen Cc: Andrew Lutomirski Cc: Linus Torvalds Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/20180110112815.mgciyf5acwacphkq@pd.tnic arch/x86/kernel/alternative.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 4f58424da3deead2605e39a9df65f5f06107a3cb Author: Roman Gushchin Date: Wed Jan 10 04:35:12 2018 -0800 cgroup: make cgroup.threads delegatable Make cgroup.threads file delegatable. The behavior of cgroup.threads should follow the behavior of cgroup.procs. Signed-off-by: Roman Gushchin Discovered-by: Michael Kerrisk Cc: Tejun Heo Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 1 + 1 file changed, 1 insertion(+) commit 661e4e33a984fbd05e6b573ce4bb639ca699c130 Merge: 4512c43 290af86 Author: David S. Miller Date: Wed Jan 10 11:17:21 2018 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2018-01-09 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Prevent out-of-bounds speculation in BPF maps by masking the index after bounds checks in order to fix spectre v1, and add an option BPF_JIT_ALWAYS_ON into Kconfig that allows for removing the BPF interpreter from the kernel in favor of JIT-only mode to make spectre v2 harder, from Alexei. 2) Remove false sharing of map refcount with max_entries which was used in spectre v1, from Daniel. 3) Add a missing NULL psock check in sockmap in order to fix a race, from John. 4) Fix test_align BPF selftest case since a recent change in verifier rejects the bit-wise arithmetic on pointers earlier but test_align update was missing, from Alexei. ==================== Signed-off-by: David S. Miller commit ccf85c744275de0ba40beff0bf9206a094f12e62 Author: James Hogan Date: Thu Dec 7 07:14:17 2017 +0000 MIPS: mm: Fix duplicate "const" on insn_table_MM Fix the following gcc 7.x build error on microMIPS builds: arch/mips/mm/uasm-micromips.c:43:26: error: duplicate ‘const’ declaration specifier [-Werror=duplicate-decl-specifier] static const struct insn const insn_table_MM[insn_invalid] = { ^~~~~ The same issue has already been fixed in uasm-mips by commit 00e06297b351 ("MIPS: mm: remove duplicate "const" qualifier on insn_table"). Signed-off-by: James Hogan Fixes: ce807d5f67ed ("MIPS: Optimize uasm insn lookup.") Cc: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17889/ Signed-off-by: Ralf Baechle arch/mips/mm/uasm-micromips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c04de7b1ad645b61c141df8ca903ba0cc03a57f7 Author: James Hogan Date: Tue Dec 5 22:28:22 2017 +0000 MIPS: CM: Drop WARN_ON(vp != 0) Since commit 68923cdc2eb3 ("MIPS: CM: Add cluster & block args to mips_cm_lock_other()"), mips_smp_send_ipi_mask() has used mips_cm_lock_other_cpu() with each CPU number, rather than mips_cm_lock_other() with the first VPE in each core. Prior to r6, multicore multithreaded systems such as dual-core dual-thread interAptivs with CPU Idle enabled (e.g. MIPS Creator Ci40) results in mips_cm_lock_other() repeatedly hitting WARN_ON(vp != 0). There doesn't appear to be anything fundamentally wrong about passing a non-zero VP/VPE number, even if it is a core's region that is locked into the other region before r6, so remove that particular WARN_ON(). Fixes: 68923cdc2eb3 ("MIPS: CM: Add cluster & block args to mips_cm_lock_other()") Signed-off-by: James Hogan Reviewed-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # 4.14+ Patchwork: https://patchwork.linux-mips.org/patch/17883/ Signed-off-by: Ralf Baechle arch/mips/kernel/mips-cm.c | 1 - 1 file changed, 1 deletion(-) commit b6ab1a138b758c4bdf30d5517e546e1c8aff9e3b Author: Arvind Yadav Date: Fri Nov 24 07:38:20 2017 +0530 MIPS: ralink: Fix platform_get_irq's error checking The platform_get_irq() function returns negative if an error occurs. zero or positive number on success. platform_get_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav Cc: john@phrozen.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17783/ Signed-off-by: Ralf Baechle arch/mips/ralink/timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7e5e371ee5390a8bb7e111c794a334d9bf25ca3d Author: James Hogan Date: Tue Nov 21 00:02:40 2017 +0000 MIPS: Fix CPS SMP NS16550 UART defaults The MIPS_CPS_NS16550_BASE and MIPS_CPS_NS16550_SHIFT options have no defaults for non-Malta platforms which select SYS_SUPPORTS_MIPS_CPS (i.e. the pistachio and generic platforms). This is problematic for automated allyesconfig and allmodconfig builds based on these platforms, since make silentoldconfig tries to ask the user for values, and especially since v4.15 where the default platform was switched to generic. Default these options to 0 and arrange for MIPS_CPS_NS16550 to be no when using that default base address, so that the option only has an effect when the default is provided (i.e. Malta) or when a value is provided by the user. Fixes: 609cf6f2291a ("MIPS: CPS: Early debug using an ns16550-compatible UART") Signed-off-by: James Hogan Reviewed-by: Paul Burton Tested-by: Guenter Roeck Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17749/ Signed-off-by: Ralf Baechle arch/mips/Kconfig.debug | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit dfe004951b1387f8e91b83c95a5dc964a8545d49 Author: Matt Redfearn Date: Tue Nov 14 17:16:27 2017 +0000 MIPS: BCM47XX Avoid compile error with MIPS allnoconfig Currently MIPS allnoconfig with CONFIG_BCM47XX=y fails to compile due to neither BCM47XX_BCMA nor BCM47XX_SSB being selected. This leads the enumeration in arch/mips/include/asm/mach-bcm47xx/bcm47xx.h to be empty, and compilation fails: In file included from arch/mips/bcm47xx/irq.c:32:0: ./arch/mips/include/asm/mach-bcm47xx/bcm47xx.h:34:1: error: expected identifier before '}' token }; ^ make[2]: *** [scripts/Makefile.build:314: arch/mips/bcm47xx/irq.o] Error 1 Fix this by ensuring that BCM47XX_SSB is selected if BCM47XX_BCMA is not. This allows us to select either system or both, but not neither. 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/17703/ Signed-off-by: Ralf Baechle arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ecff167cc80dd3c6afff55bdc66b4981d587ba3e Author: Matt Redfearn Date: Tue Nov 14 15:44:23 2017 +0000 MIPS: RB532: Avoid undefined mac_pton without GENERIC_NET_UTILS Currently MIPS allnoconfig with CONFIG_MIKROTIK_RB532=y fails to link due to missing support for mac_pton(): LD vmlinux arch/mips/rb532/devices.o: In function `setup_kmac': devices.c:(.init.text+0xc): undefined reference to `mac_pton' Rather than adding dependencies to the platform to force inclusion of GENERIC_NET_UTILS which is selected by CONFIG_NET, just exclude the setup of the MAC address if CONFIG_NET is not selected in the kernel config. Signed-off-by: Matt Redfearn Cc: James Hogan Cc: Boris Brezillon Cc: Neil Armstrong Cc: Krzysztof Kozlowski Cc: Tony Lindgren Cc: Vladimir Zapolskiy Cc: Shawn Guo Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17702/ Signed-off-by: Ralf Baechle arch/mips/rb532/devices.c | 4 ++++ 1 file changed, 4 insertions(+) commit ff9bed94d0f3b82d0fff3599cf0eb2cadf0fc770 Author: Matt Redfearn Date: Tue Nov 14 15:44:22 2017 +0000 MIPS: RB532: Avoid undefined early_serial_setup() without SERIAL_8250_CONSOLE Currently MIPS allnoconfig with CONFIG_MIKROTIK_RB532=y fails to link due to missing support for early_serial_setup(): LD vmlinux arch/mips/rb532/serial.o: In function `setup_serial_port': serial.c:(.init.text+0x14): undefined reference to `early_serial_setup' Rather than adding dependencies to the platform to force inclusion of SERIAL_8250_CONSOLE together with it's dependencies like TTY, HAS_IOMEM, etc, just exclude arch/mips/rb532/serial.c from the build when it's dependency is not selected in the kernel config. Reported-by: Ralf Baechle 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/17701/ Signed-off-by: Ralf Baechle arch/mips/rb532/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9dd79fed1bed6089f9729027e2d8cfa1049266e5 Author: Matt Redfearn Date: Tue Nov 14 13:29:17 2017 +0000 MIPS: ath25: Avoid undefined early_serial_setup() without SERIAL_8250_CONSOLE Currently MIPS allnoconfig with CONFIG_ATH25=y fails to link due to missing support for early_serial_setup(): LD vmlinux arch/mips/ath25/devices.o: In function ath25_serial_setup': devices.c:(.init.text+0x68): undefined reference to 'early_serial_setup' Rather than adding dependencies to the platform to force inclusion of SERIAL_8250_CONSOLE together with it's dependencies like TTY, HAS_IOMEM, etc, just make ath25_serial_setup() a no-op when the dependency is not selected in the kernel config. Signed-off-by: Matt Redfearn Cc: James Hogan Cc: Thomas Gleixner Cc: Philippe Ombredanne Cc: Kate Stewart Cc: Greg Kroah-Hartman Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17700/ Signed-off-by: Ralf Baechle arch/mips/ath25/devices.c | 2 ++ 1 file changed, 2 insertions(+) commit 349524bc0da698ec77f2057cf4a4948eb6349265 Author: Benjamin Herrenschmidt Date: Wed Jan 10 17:10:12 2018 +1100 powerpc: Don't preempt_disable() in show_cpuinfo() This causes warnings from cpufreq mutex code. This is also rather unnecessary and ineffective. If we really want to prevent concurrent unplug, we could take the unplug read lock but I don't see this being critical. Fixes: cd77b5ce208c ("powerpc/powernv/cpufreq: Fix the frequency read by /proc/cpuinfo") Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup-common.c | 11 ----------- 1 file changed, 11 deletions(-) commit 0d9cac0ca0429830c40fe1a4e50e60f6221fd7b6 Author: Dan Carpenter Date: Wed Jan 10 12:40:04 2018 +0300 drm/vmwgfx: Potential off by one in vmw_view_add() The vmw_view_cmd_to_type() function returns vmw_view_max (3) on error. It's one element beyond the end of the vmw_view_cotables[] table. My read on this is that it's possible to hit this failure. header->id comes from vmw_cmd_check() and it's a user controlled number between 1040 and 1225 so we can hit that error. But I don't have the hardware to test this code. Fixes: d80efd5cb3de ("drm/vmwgfx: Initial DX support") Signed-off-by: Dan Carpenter Reviewed-by: Thomas Hellstrom Cc: drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 ++ 1 file changed, 2 insertions(+) commit 2248fade965a5f1ba2a8e6e63f84df696b2d2780 Author: Michael Ellerman Date: Thu Jan 11 01:17:24 2018 +1100 powerpc/xmon: Don't print hashed pointers in paca dump Remember when the biggest problem we had to worry about was hashed pointers, those were the days. These were missed in my earlier patch because they don't match "%p", but the macro is hiding a "%p", so these all end up being hashed, which is not what we want in xmon. Convert them to "%px". Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit cf2acf66ad43abb39735568f55e1f85f9844e990 Author: Ross Lagerwall Date: Tue Jan 9 12:10:22 2018 +0000 xen/gntdev: Fix partial gntdev_mmap() cleanup When cleaning up after a partially successful gntdev_mmap(), unmap the successfully mapped grant pages otherwise Xen will kill the domain if in debug mode (Attempt to implicitly unmap a granted PTE) or Linux will kill the process and emit "BUG: Bad page map in process" if Xen is in release mode. This is only needed when use_ptemod is true because gntdev_put_map() will unmap grant pages itself when use_ptemod is false. Signed-off-by: Ross Lagerwall Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/xen/gntdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 951a010233625b77cde3430b4b8785a9a22968d1 Author: Ross Lagerwall Date: Tue Jan 9 12:10:21 2018 +0000 xen/gntdev: Fix off-by-one error when unmapping with holes If the requested range has a hole, the calculation of the number of pages to unmap is off by one. Fix it. Signed-off-by: Ross Lagerwall Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/xen/gntdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1e77fc82110ac36febf46c1e2782f504f7d23099 Author: Geert Uytterhoeven Date: Tue Jan 9 19:08:21 2018 +0100 gpio: Add missing open drain/source handling to gpiod_set_value_cansleep() Since commit f11a04464ae57e8d ("i2c: gpio: Enable working over slow can_sleep GPIOs"), probing the i2c RTC connected to an i2c-gpio bus on r8a7740/armadillo fails with: rtc-s35390a 0-0030: error resetting chip rtc-s35390a: probe of 0-0030 failed with error -5 More debug code reveals: i2c i2c-0: master_xfer[0] R, addr=0x30, len=1 i2c i2c-0: NAK from device addr 0x30 msg #0 s35390a_get_reg: ret = -6 Commit 02e479808b5d62f8 ("gpio: Alter semantics of *raw* operations to actually be raw") moved open drain/source handling from gpiod_set_raw_value_commit() to gpiod_set_value(), but forgot to take into account that gpiod_set_value_cansleep() also needs this handling. The i2c protocol mandates that i2c signals are open drain, hence i2c communication fails. Fix this by adding the missing handling to gpiod_set_value_cansleep(), using a new common helper gpiod_set_value_nocheck(). Fixes: 02e479808b5d62f8 ("gpio: Alter semantics of *raw* operations to actually be raw") Signed-off-by: Geert Uytterhoeven [removed underscore syntax, added kerneldoc] Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) commit 274920a3ecd5f43af0cc380bc0a9ee73a52b9f8a Author: Michael Ellerman Date: Wed Jan 10 23:49:12 2018 +1100 powerpc/xmon: Add RFI flush related fields to paca dump Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 4 ++++ 1 file changed, 4 insertions(+) commit d780537f9b49e9d714a454e5ed989d909beab8ec Author: Thierry Reding Date: Wed Jan 10 13:04:58 2018 +0100 drm/tegra: sor: Fix hang on Tegra124 eDP The SOR0 found on Tegra124 and Tegra210 only supports eDP and LVDS and therefore has a slightly different clock tree than the SOR1 which does not support eDP, but HDMI and DP instead. Commit e1335e2f0cfc ("drm/tegra: sor: Reimplement pad clock") breaks setups with eDP because the sor->clk_out clock is uninitialized and therefore setting the parent clock (either the safe clock or either of the display PLLs) fails, which can cause hangs later on since there is no clock driving the module. Fix this by falling back to the module clock for sor->clk_out on those setups. This guarantees that the module will always be clocked by an enabled clock and hence prevents those hangs. Fixes: e1335e2f0cfc ("drm/tegra: sor: Reimplement pad clock") Reported-by: Guillaume Tucker Tested-by: Jon Hunter Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/sor.c | 3 +++ 1 file changed, 3 insertions(+) commit 76a4201191814a0061cb5c861fafb9ecaa764846 Author: Steffen Klassert Date: Wed Jan 10 12:14:28 2018 +0100 xfrm: Fix a race in the xdst pcpu cache. We need to run xfrm_resolve_and_create_bundle() with bottom halves off. Otherwise we may reuse an already released dst_enty when the xfrm lookup functions are called from process context. Fixes: c30d78c14a813db39a647b6a348b428 ("xfrm: add xdst pcpu cache") Reported-by: Darius Ski Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 0a5191efe06b5103909206e4fbcff81d30283f8e Author: Jonas Gorski Date: Sun Oct 29 16:27:21 2017 +0100 MIPS: AR7: ensure the port type's FCR value is used Since commit aef9a7bd9b67 ("serial/uart/8250: Add tunable RX interrupt trigger I/F of FIFO buffers"), the port's default FCR value isn't used in serial8250_do_set_termios anymore, but copied over once in serial8250_config_port and then modified as needed. Unfortunately, serial8250_config_port will never be called if the port is shared between kernel and userspace, and the port's flag doesn't have UPF_BOOT_AUTOCONF, which would trigger a serial8250_config_port as well. This causes garbled output from userspace: [ 5.220000] random: procd urandom read with 49 bits of entropy available ers [kee Fix this by forcing it to be configured on boot, resulting in the expected output: [ 5.250000] random: procd urandom read with 50 bits of entropy available Press the [f] key and hit [enter] to enter failsafe mode Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level Fixes: aef9a7bd9b67 ("serial/uart/8250: Add tunable RX interrupt trigger I/F of FIFO buffers") Signed-off-by: Jonas Gorski Cc: Greg Kroah-Hartman Cc: Yoshihiro YUNOMAE Cc: Florian Fainelli Cc: Nicolas Schichan Cc: linux-mips@linux-mips.org Cc: linux-serial@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17544/ Signed-off-by: Ralf Baechle arch/mips/ar7/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e032b350cd1fdb830f18f8320ef0e13b4e24094 Author: Oliver O'Halloran Date: Wed Jan 10 03:07:15 2018 +1100 powerpc/powernv: Check device-tree for RFI flush settings New device-tree properties are available which tell the hypervisor settings related to the RFI flush. Use them to determine the appropriate flush instruction to use, and whether the flush is required. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/setup.c | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 8989d56878a7735dfdb234707a2fee6faf631085 Author: Michael Neuling Date: Wed Jan 10 03:07:15 2018 +1100 powerpc/pseries: Query hypervisor for RFI flush settings A new hypervisor call is available which tells the guest settings related to the RFI flush. Use it to query the appropriate flush instruction(s), and whether the flush is required. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/setup.c | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit bc9c9304a45480797e13a8e1df96ffcf44fb62fe Author: Michael Ellerman Date: Wed Jan 10 03:07:15 2018 +1100 powerpc/64s: Support disabling RFI flush with no_rfi_flush and nopti Because there may be some performance overhead of the RFI flush, add kernel command line options to disable it. We add a sensibly named 'no_rfi_flush' option, but we also hijack the x86 option 'nopti'. The RFI flush is not the same as KPTI, but if we see 'nopti' we can guess that the user is trying to avoid any overhead of Meltdown mitigations, and it means we don't have to educate every one about a different command line option. Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup_64.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit aa8a5e0062ac940f7659394f4817c948dc8c0667 Author: Michael Ellerman Date: Wed Jan 10 03:07:15 2018 +1100 powerpc/64s: Add support for RFI flush of L1-D cache On some CPUs we can prevent the Meltdown vulnerability by flushing the L1-D cache on exit from kernel to user mode, and from hypervisor to guest. This is known to be the case on at least Power7, Power8 and Power9. At this time we do not know the status of the vulnerability on other CPUs such as the 970 (Apple G5), pasemi CPUs (AmigaOne X1000) or Freescale CPUs. As more information comes to light we can enable this, or other mechanisms on those CPUs. The vulnerability occurs when the load of an architecturally inaccessible memory region (eg. userspace load of kernel memory) is speculatively executed to the point where its result can influence the address of a subsequent speculatively executed load. In order for that to happen, the first load must hit in the L1, because before the load is sent to the L2 the permission check is performed. Therefore if no kernel addresses hit in the L1 the vulnerability can not occur. We can ensure that is the case by flushing the L1 whenever we return to userspace. Similarly for hypervisor vs guest. In order to flush the L1-D cache on exit, we add a section of nops at each (h)rfi location that returns to a lower privileged context, and patch that with some sequence. Newer firmwares are able to advertise to us that there is a special nop instruction that flushes the L1-D. If we do not see that advertised, we fall back to doing a displacement flush in software. For guest kernels we support migration between some CPU versions, and different CPUs may use different flush instructions. So that we are prepared to migrate to a machine with a different flush instruction activated, we may have to patch more than one flush instruction at boot if the hypervisor tells us to. In the end this patch is mostly the work of Nicholas Piggin and Michael Ellerman. However a cast of thousands contributed to analysis of the issue, earlier versions of the patch, back ports testing etc. Many thanks to all of them. Tested-by: Jon Masters Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 40 ++++++++++++--- arch/powerpc/include/asm/feature-fixups.h | 13 +++++ arch/powerpc/include/asm/paca.h | 10 ++++ arch/powerpc/include/asm/setup.h | 13 +++++ arch/powerpc/kernel/asm-offsets.c | 5 ++ arch/powerpc/kernel/exceptions-64s.S | 84 +++++++++++++++++++++++++++++++ arch/powerpc/kernel/setup_64.c | 79 +++++++++++++++++++++++++++++ arch/powerpc/kernel/vmlinux.lds.S | 9 ++++ arch/powerpc/lib/feature-fixups.c | 41 +++++++++++++++ 9 files changed, 286 insertions(+), 8 deletions(-) commit 031f335cda879450095873003abb03ae8ed3b74a Author: Takashi Iwai Date: Wed Jan 10 10:53:18 2018 +0100 ALSA: hda - Apply the existing quirk to iMac 14,1 iMac 14,1 requires the same quirk as iMac 12,2, using GPIO 2 and 3 for headphone and speaker output amps. Add the codec SSID quirk entry (106b:0600) accordingly. BugLink: http://lkml.kernel.org/r/CAEw6Zyteav09VGHRfD5QwsfuWv5a43r0tFBNbfcHXoNrxVz7ew@mail.gmail.com Reported-by: Freaky Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_cirrus.c | 1 + 1 file changed, 1 insertion(+) commit e4c9fd10eb21376f44723c40ad12395089251c28 Author: Takashi Iwai Date: Wed Jan 10 08:34:28 2018 +0100 ALSA: hda - Apply headphone noise quirk for another Dell XPS 13 variant There is another Dell XPS 13 variant (SSID 1028:082a) that requires the existing fixup for reducing the headphone noise. This patch adds the quirk entry for that. BugLink: http://lkml.kernel.org/r/CAHXyb9ZCZJzVisuBARa+UORcjRERV8yokez=DP1_5O5isTz0ZA@mail.gmail.com Reported-and-tested-by: Francisco G. Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit ecba8297aafd50db6ae867e90844eead1611ef1c Author: David Gibson Date: Wed Jan 10 17:04:39 2018 +1100 KVM: PPC: Book3S HV: Always flush TLB in kvmppc_alloc_reset_hpt() The KVM_PPC_ALLOCATE_HTAB ioctl(), implemented by kvmppc_alloc_reset_hpt() is supposed to completely clear and reset a guest's Hashed Page Table (HPT) allocating or re-allocating it if necessary. In the case where an HPT of the right size already exists and it just zeroes it, it forces a TLB flush on all guest CPUs, to remove any stale TLB entries loaded from the old HPT. However, that situation can arise when the HPT is resizing as well - or even when switching from an RPT to HPT - so those cases need a TLB flush as well. So, move the TLB flush to trigger in all cases except for errors. Cc: stable@vger.kernel.org # v4.10+ Fixes: f98a8bf9ee20 ("KVM: PPC: Book3S HV: Allow KVM_PPC_ALLOCATE_HTAB ioctl() to change HPT size") Signed-off-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_hv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6c7d47c33ed323f14f2a3b8de925e831dbaa4e69 Author: Alexey Kardashevskiy Date: Wed Nov 22 14:42:21 2017 +1100 KVM: PPC: Book3S PR: Fix WIMG handling under pHyp Commit 96df226 ("KVM: PPC: Book3S PR: Preserve storage control bits") added code to preserve WIMG bits but it missed 2 special cases: - a magic page in kvmppc_mmu_book3s_64_xlate() and - guest real mode in kvmppc_handle_pagefault(). For these ptes, WIMG was 0 and pHyp failed on these causing a guest to stop in the very beginning at NIP=0x100 (due to bd9166ffe "KVM: PPC: Book3S PR: Exit KVM on failed mapping"). According to LoPAPR v1.1 14.5.4.1.2 H_ENTER: The hypervisor checks that the WIMG bits within the PTE are appropriate for the physical page number else H_Parameter return. (For System Memory pages WIMG=0010, or, 1110 if the SAO option is enabled, and for IO pages WIMG=01**.) This hence initializes WIMG to non-zero value HPTE_R_M (0x10), as expected by pHyp. [paulus@ozlabs.org - fix compile for 32-bit] Cc: stable@vger.kernel.org # v4.11+ Fixes: 96df226 "KVM: PPC: Book3S PR: Preserve storage control bits" Signed-off-by: Alexey Kardashevskiy Tested-by: Ruediger Oertel Reviewed-by: Greg Kurz Tested-by: Greg Kurz Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu.c | 1 + arch/powerpc/kvm/book3s_pr.c | 2 ++ 2 files changed, 3 insertions(+) commit 1e532d2b49645e7cb76d5af6cb5bc4ec93d861ae Author: Steffen Klassert Date: Wed Jan 10 09:33:26 2018 +0100 af_key: Fix memory leak in key_notify_policy. We leak the allocated out_skb in case pfkey_xfrm_policy2msg() fails. Fix this by freeing it on error. Reported-by: Dmitry Vyukov Signed-off-by: Steffen Klassert net/key/af_key.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 541676078b52f365f53d46ee5517d305cd1b6350 Author: Mathieu Desnoyers Date: Fri Dec 15 14:23:10 2017 -0500 membarrier: Disable preemption when calling smp_call_function_many() smp_call_function_many() requires disabling preemption around the call. Signed-off-by: Mathieu Desnoyers Cc: # v4.14+ Cc: Andrea Parri Cc: Andrew Hunter Cc: Avi Kivity Cc: Benjamin Herrenschmidt Cc: Boqun Feng Cc: Dave Watson Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Maged Michael Cc: Michael Ellerman Cc: Paul E . McKenney Cc: Paul E. McKenney Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171215192310.25293-1-mathieu.desnoyers@efficios.com Signed-off-by: Ingo Molnar kernel/sched/membarrier.c | 2 ++ 1 file changed, 2 insertions(+) commit cf1fb158230edce8a0482bfb2e59b9c390477fb6 Merge: 44cae9b 1125203 Author: Linus Torvalds Date: Tue Jan 9 15:45:06 2018 -0800 Merge tag 'riscv-for-linus-4.15-rc8_cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux Pull RISC-V updates from Palmer Dabbelt: "This contains what I hope are the last RISC-V changes to go into 4.15. I know it's a bit last minute, but I think they're all fairly small changes: - SR_* constants have been renamed to match the latest ISA specification. - Some CONFIG_MMU #ifdef cruft has been removed. We've never supported !CONFIG_MMU. - __NR_riscv_flush_icache is now visible to userspace. We were hoping to avoid making this public in order to force userspace to call the vDSO entry, but it looks like QEMU's user-mode emulation doesn't want to emulate a vDSO. In order to allow glibc to fall back to a system call when the vDSO entry doesn't exist we're just - Our defconfig is no long empty. This is another one that just slipped through the cracks. The defconfig isn't perfect, but it's at least close to what users will want for the first RISC-V development board. Getting closer is kind of splitting hairs here: none of the RISC-V specific drivers are in yet, so it's not like things will boot out of the box. The only one that's strictly necessary is the __NR_riscv_flush_icache change, as I want that to be part of the public API starting from our first kernel so nobody has to worry about it. The others are nice to haves, but they seem sane for 4.15 to me" * tag 'riscv-for-linus-4.15-rc8_cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux: riscv: rename SR_* constants to match the spec riscv: remove CONFIG_MMU ifdefs RISC-V: Make __NR_riscv_flush_icache visible to userspace RISC-V: Add a basic defconfig commit 44cae9b209e5b8989f02515a343067159aab84e9 Merge: d476c53 b67336e Author: Linus Torvalds Date: Tue Jan 9 15:43:13 2018 -0800 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 for 4.15. - Maciej Rozycki found another series of FP issues which requires a seven part series to restructure and fix. - James fixes a warning about .set mt which gas doesn't like when building for R1 processors" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: Validate PR_SET_FP_MODE prctl(2) requests against the ABI of the task MIPS: Disallow outsized PTRACE_SETREGSET NT_PRFPREG regset accesses MIPS: Also verify sizeof `elf_fpreg_t' with PTRACE_SETREGSET MIPS: Fix an FCSR access API regression with NT_PRFPREG and MSA MIPS: Consistently handle buffer counter with PTRACE_SETREGSET MIPS: Guard against any partial write attempt with PTRACE_SETREGSET MIPS: Factor out NT_PRFPREG regset access helpers MIPS: CPS: Fix r1 .set mt assembler warning commit 290af86629b25ffd1ed6232c4e9107da031705cb Author: Alexei Starovoitov Date: Tue Jan 9 10:04:29 2018 -0800 bpf: introduce BPF_JIT_ALWAYS_ON config The BPF interpreter has been used as part of the spectre 2 attack CVE-2017-5715. A quote from goolge project zero blog: "At this point, it would normally be necessary to locate gadgets in the host kernel code that can be used to actually leak data by reading from an attacker-controlled location, shifting and masking the result appropriately and then using the result of that as offset to an attacker-controlled address for a load. But piecing gadgets together and figuring out which ones work in a speculation context seems annoying. So instead, we decided to use the eBPF interpreter, which is built into the host kernel - while there is no legitimate way to invoke it from inside a VM, the presence of the code in the host kernel's text section is sufficient to make it usable for the attack, just like with ordinary ROP gadgets." To make attacker job harder introduce BPF_JIT_ALWAYS_ON config option that removes interpreter from the kernel in favor of JIT-only mode. So far eBPF JIT is supported by: x64, arm64, arm32, sparc64, s390, powerpc64, mips64 The start of JITed program is randomized and code page is marked as read-only. In addition "constant blinding" can be turned on with net.core.bpf_jit_harden v2->v3: - move __bpf_prog_ret0 under ifdef (Daniel) v1->v2: - fix init order, test_bpf and cBPF (Daniel's feedback) - fix offloaded bpf (Jakub's feedback) - add 'return 0' dummy in case something can invoke prog->bpf_func - retarget bpf tree. For bpf-next the patch would need one extra hunk. It will be sent when the trees are merged back to net-next Considered doing: int bpf_jit_enable __read_mostly = BPF_EBPF_JIT_DEFAULT; but it seems better to land the patch as-is and in bpf-next remove bpf_jit_enable global variable from all JITs, consolidate in one place and remove this jit_init() function. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann init/Kconfig | 7 +++++++ kernel/bpf/core.c | 19 +++++++++++++++++++ lib/test_bpf.c | 11 +++++++---- net/core/filter.c | 6 ++---- net/core/sysctl_net_core.c | 6 ++++++ net/socket.c | 9 +++++++++ 6 files changed, 50 insertions(+), 8 deletions(-) commit d476c5334f1dee122534b29639f8d46a85ecbb9d Merge: ef7f8ce ae66501 Author: Linus Torvalds Date: Tue Jan 9 11:20:55 2018 -0800 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 release. This contains: - An NVMe pull request from Christoph, with a few critical fixes for NVMe. - A block drain queue fix from Ming. - The concurrent lo_open/release fix for loop" * 'for-linus' of git://git.kernel.dk/linux-block: loop: fix concurrent lo_open/lo_release block: drain queue before waiting for q_usage_counter becoming zero nvme-fcloop: avoid possible uninitialized variable warning nvme-mpath: fix last path removal during traffic nvme-rdma: fix concurrent reset and reconnect nvme: fix sector units when going between formats nvme-pci: move use_sgl initialization to nvme_init_iod() commit be95a845cc4402272994ce290e3ad928aff06cb9 Author: Daniel Borkmann Date: Tue Jan 9 13:17:44 2018 +0100 bpf: avoid false sharing of map refcount with max_entries In addition to commit b2157399cc98 ("bpf: prevent out-of-bounds speculation") also change the layout of struct bpf_map such that false sharing of fast-path members like max_entries is avoided when the maps reference counter is altered. Therefore enforce them to be placed into separate cachelines. pahole dump after change: struct bpf_map { const struct bpf_map_ops * ops; /* 0 8 */ struct bpf_map * inner_map_meta; /* 8 8 */ void * security; /* 16 8 */ enum bpf_map_type map_type; /* 24 4 */ u32 key_size; /* 28 4 */ u32 value_size; /* 32 4 */ u32 max_entries; /* 36 4 */ u32 map_flags; /* 40 4 */ u32 pages; /* 44 4 */ u32 id; /* 48 4 */ int numa_node; /* 52 4 */ bool unpriv_array; /* 56 1 */ /* XXX 7 bytes hole, try to pack */ /* --- cacheline 1 boundary (64 bytes) --- */ struct user_struct * user; /* 64 8 */ atomic_t refcnt; /* 72 4 */ atomic_t usercnt; /* 76 4 */ struct work_struct work; /* 80 32 */ char name[16]; /* 112 16 */ /* --- cacheline 2 boundary (128 bytes) --- */ /* size: 128, cachelines: 2, members: 17 */ /* sum members: 121, holes: 1, sum holes: 7 */ }; Now all entries in the first cacheline are read only throughout the life time of the map, set up once during map creation. Overall struct size and number of cachelines doesn't change from the reordering. struct bpf_map is usually first member and embedded in map structs in specific map implementations, so also avoid those members to sit at the end where it could potentially share the cacheline with first map values e.g. in the array since remote CPUs could trigger map updates just as well for those (easily dirtying members like max_entries intentionally as well) while having subsequent values in cache. Quoting from Google's Project Zero blog [1]: Additionally, at least on the Intel machine on which this was tested, bouncing modified cache lines between cores is slow, apparently because the MESI protocol is used for cache coherence [8]. Changing the reference counter of an eBPF array on one physical CPU core causes the cache line containing the reference counter to be bounced over to that CPU core, making reads of the reference counter on all other CPU cores slow until the changed reference counter has been written back to memory. Because the length and the reference counter of an eBPF array are stored in the same cache line, this also means that changing the reference counter on one physical CPU core causes reads of the eBPF array's length to be slow on other physical CPU cores (intentional false sharing). While this doesn't 'control' the out-of-bounds speculation through masking the index as in commit b2157399cc98, triggering a manipulation of the map's reference counter is really trivial, so lets not allow to easily affect max_entries from it. Splitting to separate cachelines also generally makes sense from a performance perspective anyway in that fast-path won't have a cache miss if the map gets pinned, reused in other progs, etc out of control path, thus also avoids unintentional false sharing. [1] https://googleprojectzero.blogspot.ch/2018/01/reading-privileged-memory-with-side.html Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov include/linux/bpf.h | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 4512c43eac7e007d982e7ea45152ea6f3f4d1921 Author: Wei Wang Date: Mon Jan 8 10:34:00 2018 -0800 ipv6: remove null_entry before adding default route In the current code, when creating a new fib6 table, tb6_root.leaf gets initialized to net->ipv6.ip6_null_entry. If a default route is being added with rt->rt6i_metric = 0xffffffff, fib6_add() will add this route after net->ipv6.ip6_null_entry. As null_entry is shared, it could cause problem. In order to fix it, set fn->leaf to NULL before calling fib6_add_rt2node() when trying to add the first default route. And reset fn->leaf to null_entry when adding fails or when deleting the last default route. syzkaller reported the following issue which is fixed by this commit: WARNING: suspicious RCU usage 4.15.0-rc5+ #171 Not tainted ----------------------------- net/ipv6/ip6_fib.c:1702 suspicious rcu_dereference_protected() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 4 locks held by swapper/0/0: #0: ((&net->ipv6.ip6_fib_timer)){+.-.}, at: [<00000000d43f631b>] lockdep_copy_map include/linux/lockdep.h:178 [inline] #0: ((&net->ipv6.ip6_fib_timer)){+.-.}, at: [<00000000d43f631b>] call_timer_fn+0x1c6/0x820 kernel/time/timer.c:1310 #1: (&(&net->ipv6.fib6_gc_lock)->rlock){+.-.}, at: [<000000002ff9d65c>] spin_lock_bh include/linux/spinlock.h:315 [inline] #1: (&(&net->ipv6.fib6_gc_lock)->rlock){+.-.}, at: [<000000002ff9d65c>] fib6_run_gc+0x9d/0x3c0 net/ipv6/ip6_fib.c:2007 #2: (rcu_read_lock){....}, at: [<0000000091db762d>] __fib6_clean_all+0x0/0x3a0 net/ipv6/ip6_fib.c:1560 #3: (&(&tb->tb6_lock)->rlock){+.-.}, at: [<000000009e503581>] spin_lock_bh include/linux/spinlock.h:315 [inline] #3: (&(&tb->tb6_lock)->rlock){+.-.}, at: [<000000009e503581>] __fib6_clean_all+0x1d0/0x3a0 net/ipv6/ip6_fib.c:1948 stack backtrace: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.15.0-rc5+ #171 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 lockdep_rcu_suspicious+0x123/0x170 kernel/locking/lockdep.c:4585 fib6_del+0xcaa/0x11b0 net/ipv6/ip6_fib.c:1701 fib6_clean_node+0x3aa/0x4f0 net/ipv6/ip6_fib.c:1892 fib6_walk_continue+0x46c/0x8a0 net/ipv6/ip6_fib.c:1815 fib6_walk+0x91/0xf0 net/ipv6/ip6_fib.c:1863 fib6_clean_tree+0x1e6/0x340 net/ipv6/ip6_fib.c:1933 __fib6_clean_all+0x1f4/0x3a0 net/ipv6/ip6_fib.c:1949 fib6_clean_all net/ipv6/ip6_fib.c:1960 [inline] fib6_run_gc+0x16b/0x3c0 net/ipv6/ip6_fib.c:2016 fib6_gc_timer_cb+0x20/0x30 net/ipv6/ip6_fib.c:2033 call_timer_fn+0x228/0x820 kernel/time/timer.c:1320 expire_timers kernel/time/timer.c:1357 [inline] __run_timers+0x7ee/0xb70 kernel/time/timer.c:1660 run_timer_softirq+0x4c/0xb0 kernel/time/timer.c:1686 __do_softirq+0x2d7/0xb85 kernel/softirq.c:285 invoke_softirq kernel/softirq.c:365 [inline] irq_exit+0x1cc/0x200 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:540 [inline] smp_apic_timer_interrupt+0x16b/0x700 arch/x86/kernel/apic/apic.c:1052 apic_timer_interrupt+0xa9/0xb0 arch/x86/entry/entry_64.S:904 Reported-by: syzbot Fixes: 66f5d6ce53e6 ("ipv6: replace rwlock with rcu and spinlock in fib6_table") Signed-off-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) commit 22dd8e6bd8dc26b2c9fbf1cb99a5301f7b6c3a09 Merge: 2fdd181 f9a531d Author: David S. Miller Date: Tue Jan 9 12:21:14 2018 -0500 Merge branch 'Ether-fixes-for-the-SolutionEngine771x-boards' Sergei Shtylyov says: ==================== Ether fixes for the SolutionEngine771x boards Here's the series of 2 patches against Linus' repo. This series should (hoplefully) fix the Ether support on the SolutionEngine771x boards... [1/2] SolutionEngine771x: fix Ether platform data [2/2] SolutionEngine771x: add Ether TSU resource ==================== Signed-off-by: David S. Miller commit f9a531d6731d74f1e24298d9641c2dc1fef2631b Author: Sergei Shtylyov Date: Sat Jan 6 21:53:27 2018 +0300 SolutionEngine771x: add Ether TSU resource After the Ether platform data is fixed, the driver probe() method would still fail since the 'struct sh_eth_cpu_data' corresponding to SH771x indicates the presence of TSU but the memory resource for it is absent. Add the missing TSU resource to both Ether devices and fix the harmless off-by-one error in the main memory resources, while at it... Fixes: 4986b996882d ("net: sh_eth: remove the SH_TSU_ADDR") Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller arch/sh/boards/mach-se/770x/setup.c | 14 ++++++++++++-- arch/sh/include/mach-se/mach/se.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) commit 195e2addbce09e5afbc766efc1e6567c9ce840d3 Author: Sergei Shtylyov Date: Sat Jan 6 21:53:26 2018 +0300 SolutionEngine771x: fix Ether platform data The 'sh_eth' driver's probe() method would fail on the SolutionEngine7710 board and crash on SolutionEngine7712 board as the platform code is hopelessly behind the driver's platform data -- it passes the PHY address instead of 'struct sh_eth_plat_data *'; pass the latter to the driver in order to fix the bug... Fixes: 71557a37adb5 ("[netdrvr] sh_eth: Add SH7619 support") Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller arch/sh/boards/mach-se/770x/setup.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 2fdd18118dad86bf5e7880d8d02ea27be23e3671 Author: Mike Rapoport Date: Mon Jan 8 08:50:17 2018 +0200 docs-rst: networking: wire up msg_zerocopy Fix the following 'make htmldocs' complaint: Documentation/networking/msg_zerocopy.rst:: WARNING: document isn't included in any toctree. Signed-off-by: Mike Rapoport Signed-off-by: David S. Miller Documentation/networking/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20b50d79974ea3192e8c3ab7faf4e536e5f14d8f Author: Nicolai Stange Date: Mon Jan 8 15:54:44 2018 +0100 net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg() Commit 8f659a03a0ba ("net: ipv4: fix for a race condition in raw_sendmsg") fixed the issue of possibly inconsistent ->hdrincl handling due to concurrent updates by reading this bit-field member into a local variable and using the thus stabilized value in subsequent tests. However, aforementioned commit also adds the (correct) comment that /* hdrincl should be READ_ONCE(inet->hdrincl) * but READ_ONCE() doesn't work with bit fields */ because as it stands, the compiler is free to shortcut or even eliminate the local variable at its will. Note that I have not seen anything like this happening in reality and thus, the concern is a theoretical one. However, in order to be on the safe side, emulate a READ_ONCE() on the bit-field by doing it on the local 'hdrincl' variable itself: int hdrincl = inet->hdrincl; hdrincl = READ_ONCE(hdrincl); This breaks the chain in the sense that the compiler is not allowed to replace subsequent reads from hdrincl with reloads from inet->hdrincl. Fixes: 8f659a03a0ba ("net: ipv4: fix for a race condition in raw_sendmsg") Signed-off-by: Nicolai Stange Reviewed-by: Stefano Brivio Signed-off-by: David S. Miller net/ipv4/raw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3dc2fa47549aca71773afdd12a78d31802bb22b4 Author: Xiongfeng Wang Date: Mon Jan 8 19:43:00 2018 +0800 net: caif: use strlcpy() instead of strncpy() gcc-8 reports net/caif/caif_dev.c: In function 'caif_enroll_dev': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' output may be truncated copying 15 bytes from a string of length 15 [-Wstringop-truncation] net/caif/cfctrl.c: In function 'cfctrl_linkup_request': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' output may be truncated copying 15 bytes from a string of length 15 [-Wstringop-truncation] net/caif/cfcnfg.c: In function 'caif_connect_client': ./include/linux/string.h:245:9: warning: '__builtin_strncpy' output may be truncated copying 15 bytes from a string of length 15 [-Wstringop-truncation] The compiler require that the input param 'len' of strncpy() should be greater than the length of the src string, so that '\0' is copied as well. We can just use strlcpy() to avoid this warning. Signed-off-by: Xiongfeng Wang Signed-off-by: David S. Miller net/caif/caif_dev.c | 5 ++--- net/caif/cfcnfg.c | 10 ++++------ net/caif/cfctrl.c | 4 ++-- 3 files changed, 8 insertions(+), 11 deletions(-) commit 21acdf45f4958135940f0b4767185cf911d4b010 Author: Ilya Dryomov Date: Thu Dec 21 15:35:11 2017 +0100 rbd: set max_segments to USHRT_MAX Commit d3834fefcfe5 ("rbd: bump queue_max_segments") bumped max_segments (unsigned short) to max_hw_sectors (unsigned int). max_hw_sectors is set to the number of 512-byte sectors in an object and overflows unsigned short for 32M (largest possible) objects, making the block layer resort to handing us single segment (i.e. single page or even smaller) bios in that case. Cc: stable@vger.kernel.org Fixes: d3834fefcfe5 ("rbd: bump queue_max_segments") Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder drivers/block/rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edd8ca8015800b354453b891d38960f3a474b7e4 Author: Florian Margaine Date: Wed Dec 13 16:43:59 2017 +0100 rbd: reacquire lock should update lock owner client id Otherwise, future operations on this RBD using exclusive-lock are going to require the lock from a non-existent client id. Cc: stable@vger.kernel.org Fixes: 14bb211d324d ("rbd: support updating the lock cookie without releasing the lock") Link: http://tracker.ceph.com/issues/19929 Signed-off-by: Florian Margaine [idryomov@gmail.com: rbd_set_owner_cid() call, __rbd_lock() helper] Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit b8fd0823e0770c2d5fdbd865bccf0d5e058e5287 Author: Andrii Vladyka Date: Thu Jan 4 13:09:17 2018 +0200 net: core: fix module type in sock_diag_bind Use AF_INET6 instead of AF_INET in IPv6-related code path Signed-off-by: Andrii Vladyka Signed-off-by: David S. Miller net/core/sock_diag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 928afc85270753657b5543e052cc270c279a3fe9 Author: Icenowy Zheng Date: Sat Jan 6 00:56:44 2018 +0800 uas: ignore UAS for Norelsys NS1068(X) chips The UAS mode of Norelsys NS1068(X) is reported to fail to work on several platforms with the following error message: xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for unknown stream ring slot 1 ep 8 xhci-hcd xhci-hcd.0.auto: @00000000bf04a400 00000000 00000000 1b000000 01098001 And when trying to mount a partition on the disk the disk will disconnect from the USB controller, then after re-connecting the device will be offlined and not working at all. Falling back to USB mass storage can solve this problem, so ignore UAS function of this chip. Cc: stable@vger.kernel.org Signed-off-by: Icenowy Zheng Acked-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/unusual_uas.h | 7 +++++++ 1 file changed, 7 insertions(+) commit c7305645eb0c1621351cfc104038831ae87c0053 Author: Nicholas Piggin Date: Wed Jan 10 03:07:15 2018 +1100 powerpc/64s: Convert slb_miss_common to use RFI_TO_USER/KERNEL In the SLB miss handler we may be returning to user or kernel. We need to add a check early on and save the result in the cr4 register, and then we bifurcate the return path based on that. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit a08f828cf47e6c605af21d2cdec68f84e799c318 Author: Nicholas Piggin Date: Wed Jan 10 03:07:15 2018 +1100 powerpc/64: Convert fast_exception_return to use RFI_TO_USER/KERNEL Similar to the syscall return path, in fast_exception_return we may be returning to user or kernel context. We already have a test for that, because we conditionally restore r13. So use that existing test and branch, and bifurcate the return based on that. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit b8e90cb7bc04a509e821e82ab6ed7a8ef11ba333 Author: Nicholas Piggin Date: Wed Jan 10 03:07:15 2018 +1100 powerpc/64: Convert the syscall exit path to use RFI_TO_USER/KERNEL In the syscall exit path we may be returning to user or kernel context. We already have a test for that, because we conditionally restore r13. So use that existing test and branch, and bifurcate the return based on that. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/entry_64.S | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 222f20f140623ef6033491d0103ee0875fe87d35 Author: Nicholas Piggin Date: Wed Jan 10 03:07:15 2018 +1100 powerpc/64s: Simple RFI macro conversions This commit does simple conversions of rfi/rfid to the new macros that include the expected destination context. By simple we mean cases where there is a single well known destination context, and it's simply a matter of substituting the instruction for the appropriate macro. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 4 ++-- arch/powerpc/kernel/entry_64.S | 14 +++++++++----- arch/powerpc/kernel/exceptions-64s.S | 24 ++++++++++++------------ arch/powerpc/kvm/book3s_hv_rmhandlers.S | 9 ++++----- arch/powerpc/kvm/book3s_rmhandlers.S | 7 +++++-- arch/powerpc/kvm/book3s_segment.S | 4 ++-- 6 files changed, 34 insertions(+), 28 deletions(-) commit 50e51c13b3822d14ff6df4279423e4b7b2269bc3 Author: Nicholas Piggin Date: Wed Jan 10 03:07:15 2018 +1100 powerpc/64: Add macros for annotating the destination of rfid/hrfid The rfid/hrfid ((Hypervisor) Return From Interrupt) instruction is used for switching from the kernel to userspace, and from the hypervisor to the guest kernel. However it can and is also used for other transitions, eg. from real mode kernel code to virtual mode kernel code, and it's not always clear from the code what the destination context is. To make it clearer when reading the code, add macros which encode the expected destination context. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64e.h | 6 ++++++ arch/powerpc/include/asm/exception-64s.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit a6978f405d260b4dbf41ae024a47179e41fbd214 Merge: e2d5915 191eccb Author: Michael Ellerman Date: Wed Jan 10 02:24:34 2018 +1100 Merge branch 'topic/ppc-kvm' into fixes Merge the topic branch with share with the kvm-ppc tree. In this case we need to share the definition of a new hypervisor call and associated flags. commit 9ecccfaa7cb5249bd31bdceb93fcf5bedb8a24d8 Author: David Woodhouse Date: Tue Jan 9 15:02:51 2018 +0000 sysfs/cpu: Fix typos in vulnerability documentation Fixes: 87590ce6e ("sysfs/cpu: Add vulnerability folder") Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Documentation/ABI/testing/sysfs-devices-system-cpu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7ae2c3c280db183ca9ada2675c34ec2f7378abfa Author: Alan Stern Date: Wed Jan 3 12:51:51 2018 -0500 USB: UDC core: fix double-free in usb_add_gadget_udc_release The error-handling pathways in usb_add_gadget_udc_release() are messed up. Aside from the uninformative statement labels, they can deallocate the udc structure after calling put_device(), which is a double-free. This was observed by KASAN in automatic testing. This patch cleans up the routine. It preserves the requirement that when any failure occurs, we call put_device(&gadget->dev). Signed-off-by: Alan Stern Reported-by: Fengguang Wu CC: Reviewed-by: Peter Chen Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/core.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 46eb14a6e1585d99c1b9f58d0e7389082a5f466b Author: Pete Zaitcev Date: Mon Jan 8 15:46:41 2018 -0600 USB: fix usbmon BUG trigger Automated tests triggered this by opening usbmon and accessing the mmap while simultaneously resizing the buffers. This bug was with us since 2006, because typically applications only size the buffers once and thus avoid racing. Reported by Kirill A. Shutemov. Reported-by: Signed-off-by: Pete Zaitcev Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/mon/mon_bin.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 191eccb1580939fb0d47deb405b82a85b0379070 Author: Michael Neuling Date: Tue Jan 9 03:52:05 2018 +1100 powerpc/pseries: Add H_GET_CPU_CHARACTERISTICS flags & wrapper A new hypervisor call has been defined to communicate various characteristics of the CPU to guests. Add definitions for the hcall number, flags and a wrapper function. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/include/asm/hvcall.h | 17 +++++++++++++++++ arch/powerpc/include/asm/plpar_wrappers.h | 14 ++++++++++++++ 2 files changed, 31 insertions(+) commit 98648ae6ef6bdcdcb88c46cad963906ab452e96d Author: Thomas Hellstrom Date: Tue Jan 9 15:33:42 2018 +0100 drm/vmwgfx: Don't cache framebuffer maps Buffer objects need to be either pinned or reserved while a map is active, that's not the case here, so avoid caching the framebuffer map. This will cause increasing mapping activity mainly when we don't do page flipping. This fixes occasional garbage filled screens when the framebuffer has been evicted after the map. Since in-kernel mapping of whole buffer objects is error-prone on 32-bit architectures and also quite inefficient, we will revisit this later. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh Cc: drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 6 ------ drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 41 +++++++++++------------------------- 3 files changed, 13 insertions(+), 36 deletions(-) commit 443064cb0b1fb4569fe0a71209da7625129fb760 Author: Viktor Slavkovic Date: Mon Jan 8 10:43:03 2018 -0800 staging: android: ashmem: fix a race condition in ASHMEM_SET_SIZE ioctl A lock-unlock is missing in ASHMEM_SET_SIZE ioctl which can result in a race condition when mmap is called. After the !asma->file check, before setting asma->size, asma->file can be set in mmap. That would result in having different asma->size than the mapped memory size. Combined with ASHMEM_UNPIN ioctl and shrinker invocation, this can result in memory corruption. Signed-off-by: Viktor Slavkovic Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ashmem.c | 2 ++ 1 file changed, 2 insertions(+) commit aa1f10e85b0ab53dee85d8e293c8159d18d293a8 Author: Hans de Goede Date: Fri Dec 29 00:22:54 2017 +0100 mux: core: fix double get_device() class_find_device already does a get_device on the returned device. So the device returned by of_find_mux_chip_by_node is already referenced and we should not reference it again (and unref it on error). Signed-off-by: Hans de Goede Signed-off-by: Peter Rosin Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/mux/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 374d1b5a81f7f9cc5e7f095ac3d5aff3f6600376 Author: Steffen Klassert Date: Fri Jan 5 08:35:47 2018 +0100 esp: Fix GRO when the headers not fully in the linear part of the skb. The GRO layer does not necessarily pull the complete headers into the linear part of the skb, a part may remain on the first page fragment. This can lead to a crash if we try to pull the headers, so make sure we have them on the linear part before pulling. Fixes: 7785bba299a8 ("esp: Add a software GRO codepath") Reported-by: syzbot+82bbd65569c49c6c0c4d@syzkaller.appspotmail.com Signed-off-by: Steffen Klassert net/ipv4/esp4_offload.c | 3 ++- net/ipv6/esp6_offload.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit ef7f8cec80a0ba7bd00ece46844c8994117dc910 Merge: 44596f8 50f3d74 Author: Linus Torvalds Date: Mon Jan 8 20:21:39 2018 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Frag and UDP handling fixes in i40e driver, from Amritha Nambiar and Alexander Duyck. 2) Undo unintentional UAPI change in netfilter conntrack, from Florian Westphal. 3) Revert a change to how error codes are returned from dev_get_valid_name(), it broke some apps. 4) Cannot cache routes for ipv6 tunnels in the tunnel is ipv4/ipv6 dual-stack. From Eli Cooper. 5) Fix missed PMTU updates in geneve, from Xin Long. 6) Cure double free in macvlan, from Gao Feng. 7) Fix heap out-of-bounds write in rds_message_alloc_sgs(), from Mohamed Ghannam. 8) FEC bug fixes from FUgang Duan (mis-accounting of dev_id, missed deferral of probe when the regulator is not ready yet). 9) Missing DMA mapping error checks in 3c59x, from Neil Horman. 10) Turn off Broadcom tags for some b53 switches, from Florian Fainelli. 11) Fix OOPS when get_target_net() is passed an SKB whose NETLINK_CB() isn't initialized. From Andrei Vagin. 12) Fix crashes in fib6_add(), from Wei Wang. 13) PMTU bug fixes in SCTP from Marcelo Ricardo Leitner. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (56 commits) sh_eth: fix TXALCR1 offsets mdio-sun4i: Fix a memory leak phylink: mark expected switch fall-throughs in phylink_mii_ioctl sctp: fix the handling of ICMP Frag Needed for too small MTUs sctp: do not retransmit upon FragNeeded if PMTU discovery is disabled xen-netfront: enable device after manual module load bnxt_en: Fix the 'Invalid VF' id check in bnxt_vf_ndo_prep routine. bnxt_en: Fix population of flow_type in bnxt_hwrm_cfa_flow_alloc() sh_eth: fix SH7757 GEther initialization net: fec: free/restore resource in related probe error pathes uapi/if_ether.h: prevent redefinition of struct ethhdr ipv6: fix general protection fault in fib6_add() RDS: null pointer dereference in rds_atomic_free_op sh_eth: fix TSU resource handling net: stmmac: enable EEE in MII, GMII or RGMII only rtnetlink: give a user socket to get_target_net() MAINTAINERS: Update my email address. can: ems_usb: improve error reporting for error warning and error passive can: flex_can: Correct the checking for frame length in flexcan_start_xmit() can: gs_usb: fix return value of the "set_bittiming" callback ... commit b0bb222440a5c8273f67dd37946707e6ba6ad832 Merge: 909ef25 1b5c7ef Author: Dave Airlie Date: Tue Jan 9 12:03:10 2018 +1000 Merge branch 'linux-4.15' of git://github.com/skeggsb/linux into drm-fixes nouveau displayport regression fix. * 'linux-4.15' of git://github.com/skeggsb/linux: drm/nouveau/disp/gf119: add missing drive vfunc ptr commit 1b5c7ef3d0d0610bda9b63263f7c5b7178d11015 Author: Rob Clark Date: Sat Jan 6 10:59:41 2018 -0500 drm/nouveau/disp/gf119: add missing drive vfunc ptr Fixes broken dp on GF119: Call Trace: ? nvkm_dp_train_drive+0x183/0x2c0 [nouveau] nvkm_dp_acquire+0x4f3/0xcd0 [nouveau] nv50_disp_super_2_2+0x5d/0x470 [nouveau] ? nvkm_devinit_pll_set+0xf/0x20 [nouveau] gf119_disp_super+0x19c/0x2f0 [nouveau] process_one_work+0x193/0x3c0 worker_thread+0x35/0x3b0 kthread+0x125/0x140 ? process_one_work+0x3c0/0x3c0 ? kthread_park+0x60/0x60 ret_from_fork+0x25/0x30 Code: Bad RIP value. RIP: (null) RSP: ffffb1e243e4bc38 CR2: 0000000000000000 Fixes: af85389c614a drm/nouveau/disp: shuffle functions around Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103421 Signed-off-by: Rob Clark Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 1 + 1 file changed, 1 insertion(+) commit 906bf7daa0618d0ef39f4872ca42218c29a3631f Author: Johan Hovold Date: Mon Jan 8 17:20:18 2018 -0800 Input: 88pm860x-ts - fix child-node lookup Fix child node-lookup during probe, which ended up searching the whole device tree depth-first starting at parent rather than just matching on its children. To make things worse, the parent node was prematurely freed, while the child node was leaked. Fixes: 2e57d56747e6 ("mfd: 88pm860x: Device tree support") Cc: stable # 3.7 Signed-off-by: Johan Hovold Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/88pm860x-ts.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit dcaf12a8b0bbdbfcfa2be8dff2c4948d9844b4ad Author: Johan Hovold Date: Mon Jan 8 17:17:48 2018 -0800 Input: twl6040-vibra - fix child-node lookup Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at parent rather than just matching on its children. Later sanity checks on node properties (which would likely be missing) should prevent this from causing much trouble however, especially as the original premature free of the parent node has already been fixed separately (but that "fix" was apparently never backported to stable). Fixes: e7ec014a47e4 ("Input: twl6040-vibra - update for device tree support") Fixes: c52c545ead97 ("Input: twl6040-vibra - fix DT node memory management") Cc: stable # 3.6 Signed-off-by: Johan Hovold Acked-by: Peter Ujfalusi Tested-by: H. Nikolaus Schaller (on Pyra OMAP5 hardware) Signed-off-by: Dmitry Torokhov drivers/input/misc/twl6040-vibra.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5b189201993ab03001a398de731045bfea90c689 Author: Johan Hovold Date: Mon Jan 8 17:15:06 2018 -0800 Input: twl4030-vibra - fix sibling-node lookup A helper purported to look up a child node based on its name was using the wrong of-helper and ended up prematurely freeing the parent of-node while searching the whole device tree depth-first starting at the parent node. Fixes: 64b9e4d803b1 ("input: twl4030-vibra: Support for DT booted kernel") Fixes: e661d0a04462 ("Input: twl4030-vibra - fix ERROR: Bad of_node_put() warning") Cc: stable # 3.7 Signed-off-by: Johan Hovold Signed-off-by: Dmitry Torokhov drivers/input/misc/twl4030-vibra.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9c6a73c75864ad9fa49e5fa6513e4c4071c0e29f Author: Tom Lendacky Date: Mon Jan 8 16:09:32 2018 -0600 x86/cpu/AMD: Use LFENCE_RDTSC in preference to MFENCE_RDTSC With LFENCE now a serializing instruction, use LFENCE_RDTSC in preference to MFENCE_RDTSC. However, since the kernel could be running under a hypervisor that does not support writing that MSR, read the MSR back and verify that the bit has been set successfully. If the MSR can be read and the bit is set, then set the LFENCE_RDTSC feature, otherwise set the MFENCE_RDTSC feature. Signed-off-by: Tom Lendacky Signed-off-by: Thomas Gleixner Reviewed-by: Reviewed-by: Borislav Petkov Cc: Peter Zijlstra Cc: Tim Chen Cc: Dave Hansen Cc: Borislav Petkov Cc: Dan Williams Cc: Linus Torvalds Cc: Greg Kroah-Hartman Cc: David Woodhouse Cc: Paul Turner Link: https://lkml.kernel.org/r/20180108220932.12580.52458.stgit@tlendack-t1.amdoffice.net arch/x86/include/asm/msr-index.h | 1 + arch/x86/kernel/cpu/amd.c | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) commit e4d0e84e490790798691aaa0f2e598637f1867ec Author: Tom Lendacky Date: Mon Jan 8 16:09:21 2018 -0600 x86/cpu/AMD: Make LFENCE a serializing instruction To aid in speculation control, make LFENCE a serializing instruction since it has less overhead than MFENCE. This is done by setting bit 1 of MSR 0xc0011029 (DE_CFG). Some families that support LFENCE do not have this MSR. For these families, the LFENCE instruction is already serializing. Signed-off-by: Tom Lendacky Signed-off-by: Thomas Gleixner Reviewed-by: Reviewed-by: Borislav Petkov Cc: Peter Zijlstra Cc: Tim Chen Cc: Dave Hansen Cc: Borislav Petkov Cc: Dan Williams Cc: Linus Torvalds Cc: Greg Kroah-Hartman Cc: David Woodhouse Cc: Paul Turner Link: https://lkml.kernel.org/r/20180108220921.12580.71694.stgit@tlendack-t1.amdoffice.net arch/x86/include/asm/msr-index.h | 2 ++ arch/x86/kernel/cpu/amd.c | 10 ++++++++++ 2 files changed, 12 insertions(+) commit 909ef254ee3bfb305524b6651c2e74c4b330d8df Merge: b2cd1df ce9caf2 Author: Dave Airlie Date: Tue Jan 9 10:23:48 2018 +1000 Merge tag 'drm-misc-fixes-2018-01-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Just one vc4 fix. * tag 'drm-misc-fixes-2018-01-08' of git://anongit.freedesktop.org/drm/drm-misc: drm/vc4: Move IRQ enable to PM path commit 44596f86826df00ab3ab1086b25f3cdcc11156a1 Merge: d32da58 a1ffa46 Author: Linus Torvalds Date: Mon Jan 8 16:17:31 2018 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Doug Ledford: - One line fix to mlx4 error flow (same as mlx5 fix in last pull request, just in the mlx4 driver) - Fix a race condition in the IPoIB driver. This patch is larger than just a one line fix, but resolves a race condition in a fairly straight forward manner - Fix a locking issue in the RDMA netlink code. This patch is also larger than I would like for a late -rc. It has, however, had a week to bake in the rdma tree prior to this pull request - One line fix to fix granting remote machine access to memory that they don't need and shouldn't have - One line fix to correct the fact that our sgid/dgid pair is swapped from what you would expect when receiving an incoming connection request * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: IB/srpt: Fix ACL lookup during login IB/srpt: Disable RDMA access by the initiator RDMA/netlink: Fix locking around __ib_get_device_by_index IB/ipoib: Fix race condition in neigh creation IB/mlx4: Fix mlx4_ib_alloc_mr error flow commit b2157399cc9898260d6031c5bfe45fe137c1fbe7 Author: Alexei Starovoitov Date: Sun Jan 7 17:33:02 2018 -0800 bpf: prevent out-of-bounds speculation Under speculation, CPUs may mis-predict branches in bounds checks. Thus, memory accesses under a bounds check may be speculated even if the bounds check fails, providing a primitive for building a side channel. To avoid leaking kernel data round up array-based maps and mask the index after bounds check, so speculated load with out of bounds index will load either valid value from the array or zero from the padded area. Unconditionally mask index for all array types even when max_entries are not rounded to power of 2 for root user. When map is created by unpriv user generate a sequence of bpf insns that includes AND operation to make sure that JITed code includes the same 'index & index_mask' operation. If prog_array map is created by unpriv user replace bpf_tail_call(ctx, map, index); with if (index >= max_entries) { index &= map->index_mask; bpf_tail_call(ctx, map, index); } (along with roundup to power 2) to prevent out-of-bounds speculation. There is secondary redundant 'if (index >= max_entries)' in the interpreter and in all JITs, but they can be optimized later if necessary. Other array-like maps (cpumap, devmap, sockmap, perf_event_array, cgroup_array) cannot be used by unpriv, so no changes there. That fixes bpf side of "Variant 1: bounds check bypass (CVE-2017-5753)" on all architectures with and without JIT. v2->v3: Daniel noticed that attack potentially can be crafted via syscall commands without loading the program, so add masking to those paths as well. Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Signed-off-by: Daniel Borkmann include/linux/bpf.h | 2 ++ kernel/bpf/arraymap.c | 47 ++++++++++++++++++++++++++++++++++++----------- kernel/bpf/verifier.c | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 11 deletions(-) commit d32da5841b0f8b73dddb35c59c447d9749a47f6c Merge: 29f7e49 98b8e4e Author: Linus Torvalds Date: Mon Jan 8 11:52:24 2018 -0800 Merge tag 'platform-drivers-x86-v4.15-4' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver fix from Darren Hart: "Address a wmi initcall ordering race resulting in a difficult to reproduce boot failure" * tag 'platform-drivers-x86-v4.15-4' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: wmi: Call acpi_wmi_init() later commit 50f3d740d376f664f6accc7e86c9afd8f1c7e1e4 Author: Sergei Shtylyov Date: Sun Jan 7 00:26:47 2018 +0300 sh_eth: fix TXALCR1 offsets The TXALCR1 offsets are incorrect in the register offset tables, most probably due to copy&paste error. Luckily, the driver never uses this register. :-) Fixes: 4a55530f38e4 ("net: sh_eth: modify the definitions of register") Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 56c0290202ab94a2f2780c449395d4ae8495fab4 Author: Christophe JAILLET Date: Sat Jan 6 09:00:09 2018 +0100 mdio-sun4i: Fix a memory leak If the probing of the regulator is deferred, the memory allocated by 'mdiobus_alloc_size()' will be leaking. It should be freed before the next call to 'sun4i_mdio_probe()' which will reallocate it. Fixes: 4bdcb1dd9feb ("net: Add MDIO bus driver for the Allwinner EMAC") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/phy/mdio-sun4i.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 46cd75036415d94e9cf451e6606a099945d54cc6 Author: Gustavo A. R. Silva Date: Fri Jan 5 11:23:45 2018 -0600 phylink: mark expected switch fall-throughs in phylink_mii_ioctl In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1463447 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 2 ++ 1 file changed, 2 insertions(+) commit 313c86da2d1530f3ff631235ce2a0fdea8f3f1ab Merge: b707fda b6c5734 Author: David S. Miller Date: Mon Jan 8 14:19:13 2018 -0500 Merge branch 'SCTP-PMTU-discovery-fixes' Marcelo Ricardo Leitner says: ==================== SCTP PMTU discovery fixes This patchset fixes 2 issues with PMTU discovery that can lead to flood of retransmissions. The first patch fixes the issue for when PMTUD is disabled by the application, while the second fixes it for when its enabled. Please consider these to stable. ==================== Acked-by: Neil Horman Signed-off-by: David S. Miller commit b6c5734db07079c9410147b32407f2366d584e6c Author: Marcelo Ricardo Leitner Date: Fri Jan 5 11:17:18 2018 -0200 sctp: fix the handling of ICMP Frag Needed for too small MTUs syzbot reported a hang involving SCTP, on which it kept flooding dmesg with the message: [ 246.742374] sctp: sctp_transport_update_pmtu: Reported pmtu 508 too low, using default minimum of 512 That happened because whenever SCTP hits an ICMP Frag Needed, it tries to adjust to the new MTU and triggers an immediate retransmission. But it didn't consider the fact that MTUs smaller than the SCTP minimum MTU allowed (512) would not cause the PMTU to change, and issued the retransmission anyway (thus leading to another ICMP Frag Needed, and so on). As IPv4 (ip_rt_min_pmtu=556) and IPv6 (IPV6_MIN_MTU=1280) minimum MTU are higher than that, sctp_transport_update_pmtu() is changed to re-fetch the PMTU that got set after our request, and with that, detect if there was an actual change or not. The fix, thus, skips the immediate retransmission if the received ICMP resulted in no change, in the hope that SCTP will select another path. Note: The value being used for the minimum MTU (512, SCTP_DEFAULT_MINSEGMENT) is not right and instead it should be (576, SCTP_MIN_PMTU), but such change belongs to another patch. Changes from v1: - do not disable PMTU discovery, in the light of commit 06ad391919b2 ("[SCTP] Don't disable PMTU discovery when mtu is small") and as suggested by Xin Long. - changed the way to break the rtx loop by detecting if the icmp resulted in a change or not Changes from v2: none See-also: https://lkml.org/lkml/2017/12/22/811 Reported-by: syzbot Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 2 +- net/sctp/input.c | 8 ++++++-- net/sctp/transport.c | 29 +++++++++++++++++++---------- 3 files changed, 26 insertions(+), 13 deletions(-) commit cc35c3d1edf7a8373a1a5daa80a912dec96a9cd5 Author: Marcelo Ricardo Leitner Date: Fri Jan 5 11:17:17 2018 -0200 sctp: do not retransmit upon FragNeeded if PMTU discovery is disabled Currently, if PMTU discovery is disabled on a given transport, but the configured value is higher than the actual PMTU, it is likely that we will get some icmp Frag Needed. The issue is, if PMTU discovery is disabled, we won't update the information and will issue a retransmission immediately, which may very well trigger another ICMP, and another retransmission, leading to a loop. The fix is to simply not trigger immediate retransmissions if PMTU discovery is disabled on the given transport. Changes from v2: - updated stale comment, noticed by Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/input.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit b707fda2df4070785d0fa8a278aa13944c5f51f8 Author: Eduardo Otubo Date: Fri Jan 5 09:42:16 2018 +0100 xen-netfront: enable device after manual module load When loading the module after unloading it, the network interface would not be enabled and thus wouldn't have a backend counterpart and unable to be used by the guest. The guest would face errors like: [root@guest ~]# ethtool -i eth0 Cannot get driver information: No such device [root@guest ~]# ifconfig eth0 eth0: error fetching interface information: Device not found This patch initializes the state of the netfront device whenever it is loaded manually, this state would communicate the netback to create its device and establish the connection between them. Signed-off-by: Eduardo Otubo Reviewed-by: Boris Ostrovsky Signed-off-by: David S. Miller drivers/net/xen-netfront.c | 1 + 1 file changed, 1 insertion(+) commit bde219158931d17172d5c4e2906658493da2e097 Merge: 5133550 78f3000 Author: David S. Miller Date: Mon Jan 8 14:13:45 2018 -0500 Merge branch 'bnxt_en_fixes' Michael Chan says: ==================== bnxt_en: 2 small bug fixes. The first one fixes the TC Flower flow parameter passed to firmware. The 2nd one fixes the VF index range checking for iproute2 SRIOV related commands. ==================== Signed-off-by: David S. Miller commit 78f300049335ae81a5cc6b4b232481dc5e1f9d41 Author: Venkat Duvvuru Date: Thu Jan 4 18:46:55 2018 -0500 bnxt_en: Fix the 'Invalid VF' id check in bnxt_vf_ndo_prep routine. In bnxt_vf_ndo_prep (which is called by bnxt_get_vf_config ndo), there is a check for "Invalid VF id". Currently, the check is done against max_vfs. However, the user doesn't always create max_vfs. So, the check should be against the created number of VFs. The number of bnxt_vf_info structures that are allocated in bnxt_alloc_vf_resources routine is the "number of requested VFs". So, if an "invalid VF id" falls between the requested number of VFs and the max_vfs, the driver will be dereferencing an invalid pointer. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Venkat Devvuru Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7deea450eb912f269d999de62c8ab922d1461748 Author: Sunil Challa Date: Thu Jan 4 18:46:54 2018 -0500 bnxt_en: Fix population of flow_type in bnxt_hwrm_cfa_flow_alloc() flow_type in HWRM_FLOW_ALLOC is not being populated correctly due to incorrect passing of pointer and size of l3_mask argument of is_wildcard(). Fixed this. Fixes: db1d36a27324 ("bnxt_en: add TC flower offload flow_alloc/free FW cmds") Signed-off-by: Sunil Challa Reviewed-by: Sathya Perla Reviewed-by: Venkat Duvvuru Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29f7e499413aab1d33a5313147d2f7e026f67d7c Merge: b2cd1df 74d0833 Author: Linus Torvalds Date: Mon Jan 8 11:13:08 2018 -0800 Merge branch 'for-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: "This contains fixes for the following two non-trivial issues: - The task iterator got broken while adding thread mode support for v4.14. It was less visible because it only triggers when both cgroup1 and cgroup2 hierarchies are in use. The recent versions of systemd uses cgroup2 for process management even when cgroup1 is used for resource control exposing this issue. - cpuset CPU hotplug path could deadlock when racing against exits. There also are two patches to replace unlimited strcpy() usages with strlcpy()" * 'for-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: fix css_task_iter crash on CSS_TASK_ITER_PROC cgroup: Fix deadlock in cpu hotplug path cgroup: use strlcpy() instead of strscpy() to avoid spurious warning cgroup: avoid copying strings longer than the buffers commit f328299e54a94998b31baf788d2b33d8122a4acb Author: Eric Biggers Date: Fri Dec 29 13:53:03 2017 -0600 locking/refcounts: Remove stale comment from the ARCH_HAS_REFCOUNT Kconfig entry ARCH_HAS_REFCOUNT is no longer marked as broken ('if BROKEN'), so remove the stale comment regarding it being broken. Signed-off-by: Eric Biggers Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171229195303.17781-1-ebiggers3@gmail.com Signed-off-by: Ingo Molnar arch/x86/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 414a2dc138838642d28938506e31ad461648b898 Author: Geert Uytterhoeven Date: Tue Jan 2 12:13:10 2018 +0100 sched/isolation: Make CONFIG_CPU_ISOLATION=y depend on SMP or COMPILE_TEST On uniprocessor systems, critical and non-critical tasks cannot be isolated, as there is only a single CPU core. Hence enabling CPU isolation by default on such systems does not make much sense. Instead of changing the default for !SMP, fix this by making the feature depend on SMP, with an override for compile-testing. Note that its sole selector (NO_HZ_FULL) already depends on SMP. This decreases kernel size for a default uniprocessor kernel by ca. 1 KiB. Signed-off-by: Geert Uytterhoeven Acked-by: Nicolas Pitre Cc: Frederic Weisbecker Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 2c43838c99d9d23f ("sched/isolation: Enable CONFIG_CPU_ISOLATION=y by default") Link: http://lkml.kernel.org/r/1514891590-20782-1-git-send-email-geert@linux-m68k.org Signed-off-by: Ingo Molnar init/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 9d0513d82f1a8fe17b41f113ac5922fa57dbaf5c Author: Andy Shevchenko Date: Thu Dec 28 14:25:23 2017 +0200 x86/platform/intel-mid: Revert "Make 'bt_sfi_data' const" So one of the constification patches unearthed a type casting fragility of the underlying code: 276c87054751 ("x86/platform/intel-mid: Make 'bt_sfi_data' const") converted the struct to be const while it is also used as a temporary container for important data that is used to fill 'parent' and 'name' fields in struct platform_device_info. The compiler doesn't notice this due to an explicit type cast that loses the const - which fragility will be fixed separately. This type cast turned a seemingly trivial const propagation patch into a hard to debug data corruptor and crasher bug. Signed-off-by: Andy Shevchenko Cc: Bhumika Goyal Cc: Darren Hart Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: julia.lawall@lip6.fr Cc: platform-driver-x86@vger.kernel.org Link: http://lkml.kernel.org/r/20171228122523.21802-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/platform/intel-mid/device_libs/platform_bt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98b8e4e5c17bf87c1b18ed929472051dab39878c Author: Rafael J. Wysocki Date: Wed Jan 3 12:49:29 2018 +0100 platform/x86: wmi: Call acpi_wmi_init() later Calling acpi_wmi_init() at the subsys_initcall() level causes ordering issues to appear on some systems and they are difficult to reproduce, because there is no guaranteed ordering between subsys_initcall() calls, so they may occur in different orders on different systems. In particular, commit 86d9f48534e8 (mm/slab: fix kmemcg cache creation delayed issue) exposed one of these issues where genl_init() and acpi_wmi_init() are both called at the same initcall level, but the former must run before the latter so as to avoid a NULL pointer dereference. For this reason, move the acpi_wmi_init() invocation to the initcall_sync level which should still be early enough for things to work correctly in the WMI land. Link: https://marc.info/?t=151274596700002&r=1&w=2 Reported-by: Jonathan McDowell Reported-by: Joonsoo Kim Tested-by: Jonathan McDowell Signed-off-by: Rafael J. Wysocki Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d56eff266f3e41a6c39926269c4c3f58f881a8e Author: Jike Song Date: Tue Jan 9 00:03:41 2018 +0800 x86/mm/pti: Remove dead logic in pti_user_pagetable_walk*() The following code contains dead logic: 162 if (pgd_none(*pgd)) { 163 unsigned long new_p4d_page = __get_free_page(gfp); 164 if (!new_p4d_page) 165 return NULL; 166 167 if (pgd_none(*pgd)) { 168 set_pgd(pgd, __pgd(_KERNPG_TABLE | __pa(new_p4d_page))); 169 new_p4d_page = 0; 170 } 171 if (new_p4d_page) 172 free_page(new_p4d_page); 173 } There can't be any difference between two pgd_none(*pgd) at L162 and L167, so it's always false at L171. Dave Hansen explained: Yes, the double-test was part of an optimization where we attempted to avoid using a global spinlock in the fork() path. We would check for unallocated mid-level page tables without the lock. The lock was only taken when we needed to *make* an entry to avoid collisions. Now that it is all single-threaded, there is no chance of a collision, no need for a lock, and no need for the re-check. As all these functions are only called during init, mark them __init as well. Fixes: 03f4424f348e ("x86/mm/pti: Add functions to clone kernel PMDs") Signed-off-by: Jike Song Signed-off-by: Thomas Gleixner Cc: Alan Cox Cc: Andi Kleen Cc: Tom Lendacky Cc: Peter Zijlstra Cc: Tim Chen Cc: Jiri Koshina Cc: Dave Hansen Cc: Borislav Petkov Cc: Kees Cook Cc: Andi Lutomirski Cc: Linus Torvalds Cc: Greg KH Cc: David Woodhouse Cc: Paul Turner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180108160341.3461-1-albcamus@gmail.com arch/x86/mm/pti.c | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) commit 527187d28569e39c5d489d6306d3b79605cf85a6 Author: Ingo Molnar Date: Mon Jan 8 17:27:19 2018 +0100 locking/lockdep: Remove cross-release leftovers There's two cross-release leftover facilities: - the crossrelease_hist_*() irq-tracing callbacks (NOPs currently) - the complete_release_commit() callback (NOP as well) Remove them. Cc: David Sterba Cc: Byungchul Park Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/completion.h | 1 - include/linux/irqflags.h | 4 ---- include/linux/lockdep.h | 2 -- kernel/sched/completion.c | 5 ----- 4 files changed, 12 deletions(-) commit 262b6b30087246abf09d6275eb0c0dc421bcbe38 Author: Dave Hansen Date: Sat Jan 6 18:41:14 2018 +0100 x86/tboot: Unbreak tboot with PTI enabled This is another case similar to what EFI does: create a new set of page tables, map some code at a low address, and jump to it. PTI mistakes this low address for userspace and mistakenly marks it non-executable in an effort to make it unusable for userspace. Undo the poison to allow execution. Fixes: 385ce0ea4c07 ("x86/mm/pti: Add Kconfig") Signed-off-by: Dave Hansen Signed-off-by: Andrea Arcangeli Signed-off-by: Thomas Gleixner Cc: Alan Cox Cc: Tim Chen Cc: Jon Masters Cc: Dave Hansen Cc: Andi Kleen Cc: Jeff Law Cc: Paolo Bonzini Cc: Linus Torvalds Cc: Greg Kroah-Hartman Cc: David" Cc: Nick Clifton Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180108102805.GK25546@redhat.com arch/x86/kernel/tboot.c | 1 + 1 file changed, 1 insertion(+) commit dba04eb76df982703fefc021a4d278347b6176a9 Author: David Sterba Date: Mon Jan 8 16:27:31 2018 +0100 locking/Documentation: Remove stale crossrelease_fullstack parameter The cross-release lockdep functionality has been removed in: e966eaeeb623: ("locking/lockdep: Remove the cross-release locking checks") ... leaving the kernel parameter docs behind. The code handling the parameter does not exist so this is a plain documentation change. Signed-off-by: David Sterba Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: byungchul.park@lge.com Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/20180108152731.27613-1-dsterba@suse.com Signed-off-by: Ingo Molnar Documentation/admin-guide/kernel-parameters.txt | 3 --- 1 file changed, 3 deletions(-) commit 900498a34a3ac9c611e9b425094c8106bdd7dc1c Author: Takashi Iwai Date: Mon Jan 8 14:03:53 2018 +0100 ALSA: pcm: Allow aborting mutex lock at OSS read/write loops PCM OSS read/write loops keep taking the mutex lock for the whole read/write, and this might take very long when the exceptionally high amount of data is given. Also, since it invokes with mutex_lock(), the concurrent read/write becomes unbreakable. This patch tries to address these issues by replacing mutex_lock() with mutex_lock_interruptible(), and also splits / re-takes the lock at each read/write period chunk, so that it can switch the context more finely if requested. Cc: Signed-off-by: Takashi Iwai sound/core/oss/pcm_oss.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) commit 66a640e7823da803fdb68d5d88f7a8fbd11c29e6 Author: Nick Desaulniers Date: Sat Jan 6 13:39:48 2018 -0800 x86: xen: remove the use of VLAIS Variable Length Arrays In Structs (VLAIS) is not supported by Clang, and frowned upon by others. https://lkml.org/lkml/2013/9/23/500 Here, the VLAIS was used because the size of the bitmap returned from xen_mc_entry() depended on possibly (based on kernel configuration) runtime sized data. Rather than declaring args as a VLAIS then calling sizeof on *args, we calculate the appropriate sizeof args manually. Further, we can get rid of the #ifdef's and rely on num_possible_cpus() (thanks to a helpful checkpatch warning from an earlier version of this patch). Suggested-by: Juergen Gross Signed-off-by: Nick Desaulniers Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky arch/x86/xen/mmu_pv.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 0dd6d272d39c7c1fe2f4253197b505f2b66538ee Author: Nick Desaulniers Date: Sat Dec 23 21:50:13 2017 -0500 x86/xen/time: fix section mismatch for xen_init_time_ops() The header declares this function as __init but is defined in __ref section. Signed-off-by: Nick Desaulniers Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29159a4ed7044c52e3e2cf1a9fb55cec4745c60b Author: Takashi Iwai Date: Mon Jan 8 13:58:31 2018 +0100 ALSA: pcm: Abort properly at pending signal in OSS read/write loops The loops for read and write in PCM OSS emulation have no proper check of pending signals, and they keep processing even after user tries to break. This results in a very long delay, often seen as RCU stall when a huge unprocessed bytes remain queued. The bug could be easily triggered by syzkaller. As a simple workaround, this patch adds the proper check of pending signals and aborts the loop appropriately. Reported-by: syzbot+993cb4cfcbbff3947c21@syzkaller.appspotmail.com Cc: Signed-off-by: Takashi Iwai sound/core/oss/pcm_oss.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 67c3f3fc028eb1cf35ba4d45b1a4916dc39fd59e Merge: b2cd1df 65e7439 Author: Jani Nikula Date: Mon Jan 8 13:30:08 2018 +0200 Merge tag 'gvt-fixes-2018-01-08' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2018-01-08 - clear shadow entry for post-sync (Zhi) - fix stack out-of-bound warning in cmd parser (Changbin) Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180108061130.ucwtumhpbfbu4psu@zhen-hp.sh.intel.com commit 61dc0f555b5c761cdafb0ba5bd41ecf22d68a4c4 Author: Thomas Gleixner Date: Sun Jan 7 22:48:01 2018 +0100 x86/cpu: Implement CPU vulnerabilites sysfs functions Implement the CPU vulnerabilty show functions for meltdown, spectre_v1 and spectre_v2. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Konrad Rzeszutek Wilk Cc: Peter Zijlstra Cc: Will Deacon Cc: Dave Hansen Cc: Linus Torvalds Cc: Borislav Petkov Cc: David Woodhouse Link: https://lkml.kernel.org/r/20180107214913.177414879@linutronix.de arch/x86/Kconfig | 1 + arch/x86/kernel/cpu/bugs.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) commit 87590ce6e373d1a5401f6539f0c59ef92dd924a9 Author: Thomas Gleixner Date: Sun Jan 7 22:48:00 2018 +0100 sysfs/cpu: Add vulnerability folder As the meltdown/spectre problem affects several CPU architectures, it makes sense to have common way to express whether a system is affected by a particular vulnerability or not. If affected the way to express the mitigation should be common as well. Create /sys/devices/system/cpu/vulnerabilities folder and files for meltdown, spectre_v1 and spectre_v2. Allow architectures to override the show function. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Konrad Rzeszutek Wilk Cc: Peter Zijlstra Cc: Will Deacon Cc: Dave Hansen Cc: Linus Torvalds Cc: Borislav Petkov Cc: David Woodhouse Link: https://lkml.kernel.org/r/20180107214913.096657732@linutronix.de Documentation/ABI/testing/sysfs-devices-system-cpu | 16 ++++++++ drivers/base/Kconfig | 3 ++ drivers/base/cpu.c | 48 ++++++++++++++++++++++ include/linux/cpu.h | 7 ++++ 4 files changed, 74 insertions(+) commit 6b018235b4daabae96d855219fae59c3fb8be417 Author: Ewan D. Milne Date: Fri Jan 5 12:44:06 2018 -0500 nvme-fabrics: initialize default host->id in nvmf_host_default() The field was uninitialized before use. Signed-off-by: Ewan D. Milne Signed-off-by: Christoph Hellwig drivers/nvme/host/fabrics.c | 1 + 1 file changed, 1 insertion(+) commit b1bdcb59b64f806ef08d25a85c39ffb3ad841ce6 Author: Florian Westphal Date: Sat Jan 6 01:13:08 2018 +0100 xfrm: don't call xfrm_policy_cache_flush while holding spinlock xfrm_policy_cache_flush can sleep, so it cannot be called while holding a spinlock. We could release the lock first, but I don't see why we need to invoke this function here in first place, the packet path won't reuse an xdst entry unless its still valid. While at it, add an annotation to xfrm_policy_cache_flush, it would have probably caught this bug sooner. Fixes: ec30d78c14a813 ("xfrm: add xdst pcpu cache") Reported-by: syzbot+e149f7d1328c26f9c12f@syzkaller.appspotmail.com Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bcfd09f7837f5240c30fd2f52ee7293516641faa Author: Herbert Xu Date: Fri Jan 5 22:12:32 2018 +1100 xfrm: Return error on unknown encap_type in init_state Currently esp will happily create an xfrm state with an unknown encap type for IPv4, without setting the necessary state parameters. This patch fixes it by returning -EINVAL. There is a similar problem in IPv6 where if the mode is unknown we will skip initialisation while returning zero. However, this is harmless as the mode has already been checked further up the stack. This patch removes this anomaly by aligning the IPv6 behaviour with IPv4 and treating unknown modes (which cannot actually happen) as transport mode. Fixes: 38320c70d282 ("[IPSEC]: Use crypto_aead and authenc in ESP") Signed-off-by: Herbert Xu Signed-off-by: Steffen Klassert net/ipv4/esp4.c | 1 + net/ipv6/esp6.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) commit 65e7439204b57b7a7f6e4694f9e2a9adde5e77ed Author: Changbin Du Date: Thu Dec 21 10:29:32 2017 +0800 drm/i915/gvt: Fix stack-out-of-bounds bug in cmd parser for_each_set_bit() only accepts variable of type unsigned long, and we can not cast it from smaller types. [ 16.499365] ================================================================== [ 16.506655] BUG: KASAN: stack-out-of-bounds in find_first_bit+0x1d/0x70 [ 16.513313] Read of size 8 at addr ffff8803616cf510 by task systemd-udevd/180 [ 16.521998] CPU: 0 PID: 180 Comm: systemd-udevd Tainted: G U O 4.15.0-rc3+ #14 [ 16.530317] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.2.8 01/26/2016 [ 16.537760] Call Trace: [ 16.540230] dump_stack+0x7c/0xbb [ 16.543569] print_address_description+0x6b/0x290 [ 16.548306] kasan_report+0x28a/0x370 [ 16.551993] ? find_first_bit+0x1d/0x70 [ 16.555858] find_first_bit+0x1d/0x70 [ 16.559625] intel_gvt_init_cmd_parser+0x127/0x3c0 [i915] [ 16.565060] ? __lock_is_held+0x8f/0xf0 [ 16.568990] ? intel_gvt_clean_cmd_parser+0x10/0x10 [i915] [ 16.574514] ? __hrtimer_init+0x5d/0xb0 [ 16.578445] intel_gvt_init_device+0x2c3/0x690 [i915] [ 16.583537] ? unregister_module_notifier+0x20/0x20 [ 16.588515] intel_gvt_init+0x89/0x100 [i915] [ 16.592962] i915_driver_load+0x1992/0x1c70 [i915] [ 16.597846] ? __i915_printk+0x210/0x210 [i915] [ 16.602410] ? wait_for_completion+0x280/0x280 [ 16.606883] ? lock_downgrade+0x2c0/0x2c0 [ 16.610923] ? __pm_runtime_resume+0x46/0x90 [ 16.615238] ? acpi_dev_found+0x76/0x80 [ 16.619162] ? i915_pci_remove+0x30/0x30 [i915] [ 16.623733] local_pci_probe+0x74/0xe0 [ 16.627518] pci_device_probe+0x208/0x310 [ 16.631561] ? pci_device_remove+0x100/0x100 [ 16.635871] ? __list_add_valid+0x29/0xa0 [ 16.639919] driver_probe_device+0x40b/0x6b0 [ 16.644223] ? driver_probe_device+0x6b0/0x6b0 [ 16.648696] __driver_attach+0x11d/0x130 [ 16.652649] bus_for_each_dev+0xe7/0x160 [ 16.656600] ? subsys_dev_iter_exit+0x10/0x10 [ 16.660987] ? __list_add_valid+0x29/0xa0 [ 16.665028] bus_add_driver+0x31d/0x3a0 [ 16.668893] driver_register+0xc6/0x170 [ 16.672758] ? 0xffffffffc0ad8000 [ 16.676108] do_one_initcall+0x9c/0x206 [ 16.679984] ? initcall_blacklisted+0x150/0x150 [ 16.684545] ? do_init_module+0x35/0x33b [ 16.688494] ? kasan_unpoison_shadow+0x31/0x40 [ 16.692968] ? kasan_kmalloc+0xa6/0xd0 [ 16.696743] ? do_init_module+0x35/0x33b [ 16.700694] ? kasan_unpoison_shadow+0x31/0x40 [ 16.705168] ? __asan_register_globals+0x82/0xa0 [ 16.709819] do_init_module+0xe7/0x33b [ 16.713597] load_module+0x4481/0x4ce0 [ 16.717397] ? module_frob_arch_sections+0x20/0x20 [ 16.722228] ? vfs_read+0x13b/0x190 [ 16.725742] ? kernel_read+0x74/0xa0 [ 16.729351] ? get_user_arg_ptr.isra.17+0x70/0x70 [ 16.734099] ? SYSC_finit_module+0x175/0x1b0 [ 16.738399] SYSC_finit_module+0x175/0x1b0 [ 16.742524] ? SYSC_init_module+0x1e0/0x1e0 [ 16.746741] ? __fget+0x157/0x240 [ 16.750090] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 16.754747] entry_SYSCALL_64_fastpath+0x23/0x9a [ 16.759397] RIP: 0033:0x7f8fbc837499 [ 16.762996] RSP: 002b:00007ffead76c138 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 16.770618] RAX: ffffffffffffffda RBX: 0000000000000012 RCX: 00007f8fbc837499 [ 16.777800] RDX: 0000000000000000 RSI: 000056484e67b080 RDI: 0000000000000012 [ 16.784979] RBP: 00007ffead76b140 R08: 0000000000000000 R09: 0000000000000021 [ 16.792164] R10: 0000000000000012 R11: 0000000000000246 R12: 000056484e67b460 [ 16.799345] R13: 00007ffead76b120 R14: 0000000000000005 R15: 0000000000000000 [ 16.808052] The buggy address belongs to the page: [ 16.812876] page:00000000dc4b8c1e count:0 mapcount:0 mapping: (null) index:0x0 [ 16.820934] flags: 0x17ffffc0000000() [ 16.824621] raw: 0017ffffc0000000 0000000000000000 0000000000000000 00000000ffffffff [ 16.832416] raw: ffffea000d85b3e0 ffffea000d85b3e0 0000000000000000 0000000000000000 [ 16.840208] page dumped because: kasan: bad access detected [ 16.847318] Memory state around the buggy address: [ 16.852143] ffff8803616cf400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 16.859427] ffff8803616cf480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 [ 16.866708] >ffff8803616cf500: f1 f1 04 f4 f4 f4 f3 f3 f3 f3 00 00 00 00 00 00 [ 16.873988] ^ [ 16.877770] ffff8803616cf580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 16.885042] ffff8803616cf600: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 [ 16.892312] ================================================================== Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e2d5915293ffdff977ddcfc12b817b08c53ffa7a Author: Michael Ellerman Date: Mon Jan 8 14:54:32 2018 +1100 powerpc/pseries: Make RAS IRQ explicitly dependent on DLPAR WQ The hotplug code uses its own workqueue to handle IRQ requests (pseries_hp_wq), however that workqueue is initialized after init_ras_IRQ(). That can lead to a kernel panic if any hotplug interrupts fire after init_ras_IRQ() but before pseries_hp_wq is initialised. eg: UDP-Lite hash table entries: 2048 (order: 0, 65536 bytes) NET: Registered protocol family 1 Unpacking initramfs... (qemu) object_add memory-backend-ram,id=mem1,size=10G (qemu) device_add pc-dimm,id=dimm1,memdev=mem1 Unable to handle kernel paging request for data at address 0xf94d03007c421378 Faulting instruction address: 0xc00000000012d744 Oops: Kernel access of bad area, sig: 11 [#1] LE SMP NR_CPUS=2048 NUMA pSeries Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.15.0-rc2-ziviani+ #26 task: (ptrval) task.stack: (ptrval) NIP: c00000000012d744 LR: c00000000012d744 CTR: 0000000000000000 REGS: (ptrval) TRAP: 0380 Not tainted (4.15.0-rc2-ziviani+) MSR: 8000000000009033 CR: 28088042 XER: 20040000 CFAR: c00000000012d3c4 SOFTE: 0 ... NIP [c00000000012d744] __queue_work+0xd4/0x5c0 LR [c00000000012d744] __queue_work+0xd4/0x5c0 Call Trace: [c0000000fffefb90] [c00000000012d744] __queue_work+0xd4/0x5c0 (unreliable) [c0000000fffefc70] [c00000000012dce4] queue_work_on+0xb4/0xf0 This commit makes the RAS IRQ registration explicitly dependent on the creation of the pseries_hp_wq. Reported-by: Min Deng Reported-by: Daniel Henrique Barboza Tested-by: Jose Ricardo Ziviani Signed-off-by: Michael Ellerman Reviewed-by: David Gibson arch/powerpc/platforms/pseries/dlpar.c | 21 ++++++++++++++++++--- arch/powerpc/platforms/pseries/pseries.h | 2 ++ arch/powerpc/platforms/pseries/ras.c | 3 ++- 3 files changed, 22 insertions(+), 4 deletions(-) commit 1125203c13b9da32125e171b4bd75e93d4918ddd Author: Christoph Hellwig Date: Thu Jan 4 18:35:03 2018 +0100 riscv: rename SR_* constants to match the spec Signed-off-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/csr.h | 8 ++++---- arch/riscv/include/asm/irqflags.h | 10 +++++----- arch/riscv/include/asm/ptrace.h | 2 +- arch/riscv/kernel/entry.S | 8 ++++---- arch/riscv/kernel/process.c | 4 ++-- arch/riscv/mm/fault.c | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) commit c163fb38ca34694b0cce99bb5604257bc29bf200 Author: Christoph Hellwig Date: Thu Jan 4 18:35:02 2018 +0100 riscv: remove CONFIG_MMU ifdefs The RISC-V port doesn't suport a nommu mode, so there is no reason to provide some code only under a CONFIG_MMU ifdef. Signed-off-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/io.h | 4 ---- arch/riscv/include/asm/pgtable.h | 4 ---- arch/riscv/include/asm/tlbflush.h | 4 ---- arch/riscv/include/asm/uaccess.h | 12 ------------ 4 files changed, 24 deletions(-) commit 9e49a4ed072ab67b17238c5a45d7cba7f848659e Author: Palmer Dabbelt Date: Tue Dec 26 19:11:22 2017 -0800 RISC-V: Make __NR_riscv_flush_icache visible to userspace We were hoping to avoid making this visible to userspace, but it looks like we're going to have to because QEMU's user-mode emulation doesn't want to emulate a vDSO. Having vDSO-only system calls was a bit unothodox anyway, so I think in this case it's OK to just make the actual system call number public. This patch simply moves the definition of __NR_riscv_flush_icache availiable to userspace, which results in the deletion of the now empty vdso-syscalls.h. Changes since v1: * I've moved the definition into uapi/asm/syscalls.h rathen than uapi/asm/unistd.h. This allows me to keep asm/unistd.h, so we can keep the syscall table macros sane. * As a side effect of the above, this no longer disables all system calls on RISC-V. Whoops! Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/unistd.h | 1 + arch/riscv/include/asm/vdso-syscalls.h | 28 ---------------------------- arch/riscv/include/uapi/asm/syscalls.h | 26 ++++++++++++++++++++++++++ arch/riscv/kernel/syscall_table.c | 1 - arch/riscv/kernel/vdso/flush_icache.S | 1 - 5 files changed, 27 insertions(+), 30 deletions(-) commit 33c57c0d3c67f51f491a9d27108f7e97adc03d96 Author: Karsten Merker Date: Thu Jan 4 23:37:02 2018 +0100 RISC-V: Add a basic defconfig This patch provides a basic defconfig for the RISC-V architecture that enables enough kernel features to run a basic Linux distribution on qemu's "virt" board for native software development. Features include: - serial console - virtio block and network device support - VFAT and ext2/3/4 filesystem support - NFS client and NFS rootfs support - an assortment of other kernel features required for running systemd It also enables a number of drivers for physical hardware that target the "SiFive U500" SoC and the corresponding development platform. These include: - PCIe host controller support for the FPGA-based U500 development platform (PCIE_XILINX) - USB host controller support (OHCI/EHCI/XHCI) - USB HID (keyboard/mouse) support - USB mass storage support (bulk and UAS) - SATA support (AHCI) - ethernet drivers (MACB for a SoC-internal MAC block, microsemi ethernet phy, E1000E and R8169 for PCIe-connected external devices) - DRM and framebuffer console support for PCIe-connected Radeon graphics chips Signed-off-by: Karsten Merker Signed-off-by: Palmer Dabbelt arch/riscv/configs/defconfig | 75 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit b2cd1df66037e7c4697c7e40496bf7e4a5e16a2d Author: Linus Torvalds Date: Sun Jan 7 14:22:41 2018 -0800 Linux 4.15-rc7 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b84449dc14d274a3f3c78cd734b702ca31aa4dd1 Merge: 9cfd403 310d827 Author: Linus Torvalds Date: Sun Jan 7 11:42:57 2018 -0800 Merge branch 'parisc-4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: - Many small fixes to show the real physical addresses of devices instead of hashed addresses. - One important fix to unbreak 32-bit SMP support: We forgot to 16-byte align the spinlocks in the assembler code. - Qemu support: The host will get a chance to sleep when the parisc guest is idle. We use the same mechanism as the power architecture by overlaying the "or %r10,%r10,%r10" instruction which is simply a nop on real hardware. * 'parisc-4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: qemu idle sleep support parisc: Fix alignment of pa_tlb_lock in assembly on 32-bit SMP kernel parisc: Show unhashed EISA EEPROM address parisc: Show unhashed HPA of Dino chip parisc: Show initial kernel memory layout unhashed parisc: Show unhashed hardware inventory commit 9cfd403a7cee59aeb197ddb99eeca1bb590fee74 Merge: 9d61ec5 5b9f57c Author: Linus Torvalds Date: Sun Jan 7 11:33:12 2018 -0800 Merge tag 'apparmor-pr-2018-01-07' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor Pull apparmor fix from John Johansen: "This fixes a regression when the kernel feature set is reported as supporting mount and policy is pinned to a feature set that does not support mount mediation" * tag 'apparmor-pr-2018-01-07' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor: apparmor: fix regression in mount mediation when feature set is pinned commit 9d61ec5baaf98e8aea271124a9c33bd11df8413b Merge: c11a5fe 7b6af2c Author: Linus Torvalds Date: Sun Jan 7 11:01:59 2018 -0800 Merge tag 'led_fixes_for_4.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED fix from Jacek Anaszewski: "The commit 2b83ff96f51d for 4.15-rc6, which was fixing LED brightness setting after clearing delay_off broke the behavior on any alteration of delay_on{off} properties, due to use of a LED core helper that does too much for this particular case" * tag 'led_fixes_for_4.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: core: Fix regression caused by commit 2b83ff96f51d commit c11a5fe66ff2e5c17a7634901288e7f444701ffb Merge: 75d4276 fee4380 Author: Linus Torvalds Date: Sun Jan 7 11:00:06 2018 -0800 Merge tag 'for-linus-20180107' of git://git.infradead.org/linux-mtd Pull MTD bugfix from Richard Weinberger: "A single fix for the pxa3xx NAND driver" * tag 'for-linus-20180107' of git://git.infradead.org/linux-mtd: mtd: nand: pxa3xx: Fix READOOB implementation commit 7b6af2c53192f1766892ef40c8f48a413509ed72 Author: Jacek Anaszewski Date: Wed Jan 3 21:13:45 2018 +0100 leds: core: Fix regression caused by commit 2b83ff96f51d Commit 2b83ff96f51d ("led: core: Fix brightness setting when setting delay_off=0") replaced del_timer_sync(&led_cdev->blink_timer) with led_stop_software_blink() in led_blink_set(), which additionally clears LED_BLINK_SW flag as well as zeroes blink_delay_on and blink_delay_off properties of the struct led_classdev. Cleansing of the latter ones wasn't required to fix the original issue but wasn't considered harmful. It nonetheless turned out to be so in case when pointer to one or both props is passed to led_blink_set() like in the ledtrig-timer.c. In such cases zeroes are passed later in delay_on and/or delay_off arguments to led_blink_setup(), which results either in stopping the software blinking or setting blinking frequency always to 1Hz. Avoid using led_stop_software_blink() and add a single call required to clear LED_BLINK_SW flag, which was the only needed modification to fix the original issue. Fixes 2b83ff96f51d ("led: core: Fix brightness setting when setting delay_off=0") Signed-off-by: Jacek Anaszewski drivers/leds/led-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 75d4276e83a353d5e41da676f418d4a12f6f6e6c Merge: 5b6c02f 040ee69 Author: Linus Torvalds Date: Sat Jan 6 17:13:21 2018 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: - untangle sys_close() abuses in xt_bpf - deal with register_shrinker() failures in sget() * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix "netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1'" sget(): handle failures of register_shrinker() mm,vmscan: Make unregister_shrinker() no-op if register_shrinker() failed. commit 5b6c02f38315b720c593c6079364855d276886aa Merge: 3219e26 bb4945e Author: Linus Torvalds Date: Sat Jan 6 17:05:05 2018 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "s390: - Two fixes for potential bitmap overruns in the cmma migration code x86: - Clear guest provided GPRs to defeat the Project Zero PoC for CVE 2017-5715" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvm: vmx: Scrub hardware GPRs at VM-exit KVM: s390: prevent buffer overrun on memory hotplug during migration KVM: s390: fix cmma migration for multiple memory slots commit 2b36047e7889b7efee22c11e17f035f721855731 Author: Alexei Starovoitov Date: Fri Jan 5 15:02:00 2018 -0800 selftests/bpf: fix test_align since commit 82abbf8d2fc4 the verifier rejects the bit-wise arithmetic on pointers earlier. The test 'dubious pointer arithmetic' now has less output to match on. Adjust it. Fixes: 82abbf8d2fc4 ("bpf: do not allow root to mangle valid pointers") Reported-by: kernel test robot Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_align.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) commit 5731a879d03bdaa00265f8ebc32dfd0e65d25276 Author: John Fastabend Date: Thu Jan 4 20:02:09 2018 -0800 bpf: sockmap missing NULL psock check Add psock NULL check to handle a racing sock event that can get the sk_callback_lock before this case but after xchg happens causing the refcnt to hit zero and sock user data (psock) to be null and queued for garbage collection. Also add a comment in the code because this is a bit subtle and not obvious in my opinion. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann kernel/bpf/sockmap.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit fee4380f368e84ed216b62ccd2fbc4126f2bf40b Author: Boris Brezillon Date: Mon Dec 18 11:32:45 2017 +0100 mtd: nand: pxa3xx: Fix READOOB implementation In the current driver, OOB bytes are accessed in raw mode, and when a page access is done with NDCR_SPARE_EN set and NDCR_ECC_EN cleared, the driver must read the whole spare area (64 bytes in case of a 2k page, 16 bytes for a 512 page). The driver was only reading the free OOB bytes, which was leaving some unread data in the FIFO and was somehow leading to a timeout. We could patch the driver to read ->spare_size + ->ecc_size instead of just ->spare_size when READOOB is requested, but we'd better make in-band and OOB accesses consistent. Since the driver is always accessing in-band data in non-raw mode (with the ECC engine enabled), we should also access OOB data in this mode. That's particularly useful when using the BCH engine because in this mode the free OOB bytes are also ECC protected. Fixes: 43bcfd2bb24a ("mtd: nand: pxa3xx: Add driver-specific ECC BCH support") Cc: stable@vger.kernel.org Reported-by: Sean Nyekjær Tested-by: Willy Tarreau Signed-off-by: Boris Brezillon Acked-by: Ezequiel Garcia Tested-by: Sean Nyekjaer Acked-by: Robert Jarzmik Signed-off-by: Richard Weinberger drivers/mtd/nand/pxa3xx_nand.c | 1 + 1 file changed, 1 insertion(+) commit 99c6fa2511d8a683e61468be91b83f85452115fa Author: David Woodhouse Date: Sat Jan 6 11:49:23 2018 +0000 x86/cpufeatures: Add X86_BUG_SPECTRE_V[12] Add the bug bits for spectre v1/2 and force them unconditionally for all cpus. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: Andi Kleen Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Tim Chen Cc: Greg Kroah-Hartman Cc: Paul Turner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1515239374-23361-2-git-send-email-dwmw@amazon.co.uk arch/x86/include/asm/cpufeatures.h | 2 ++ arch/x86/kernel/cpu/common.c | 3 +++ 2 files changed, 5 insertions(+) commit 01c9b17bf673b05bb401b76ec763e9730ccf1376 Author: Dave Hansen Date: Fri Jan 5 09:44:36 2018 -0800 x86/Documentation: Add PTI description Add some details about how PTI works, what some of the downsides are, and how to debug it when things go wrong. Also document the kernel parameter: 'pti/nopti'. Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Reviewed-by: Randy Dunlap Reviewed-by: Kees Cook Cc: Moritz Lipp Cc: Daniel Gruss Cc: Michael Schwarz Cc: Richard Fellner Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Hugh Dickins Cc: Andi Lutomirsky Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180105174436.1BC6FA2B@viggo.jf.intel.com Documentation/admin-guide/kernel-parameters.txt | 21 ++- Documentation/x86/pti.txt | 186 ++++++++++++++++++++++++ 2 files changed, 200 insertions(+), 7 deletions(-) commit de53c3786a3ce162a1c815d0c04c766c23ec9c0a Author: Jiri Kosina Date: Fri Jan 5 22:35:41 2018 +0100 x86/pti: Unbreak EFI old_memmap EFI_OLD_MEMMAP's efi_call_phys_prolog() calls set_pgd() with swapper PGD that has PAGE_USER set, which makes PTI set NX on it, and therefore EFI can't execute it's code. Fix that by forcefully clearing _PAGE_NX from the PGD (this can't be done by the pgprot API). _PAGE_NX will be automatically reintroduced in efi_call_phys_epilog(), as _set_pgd() will again notice that this is _PAGE_USER, and set _PAGE_NX on it. Tested-by: Dimitri Sivanich Signed-off-by: Jiri Kosina Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Acked-by: Dave Hansen Cc: Andrea Arcangeli Cc: Ard Biesheuvel Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/nycvar.YFH.7.76.1801052215460.11852@cbobk.fhfr.pm arch/x86/platform/efi/efi_64.c | 2 ++ 1 file changed, 2 insertions(+) commit 3219e264b984ec0a13923aa66385819c2e98d582 Merge: 65c64d18 ecb101a Author: Linus Torvalds Date: Sat Jan 6 09:48:27 2018 -0800 Merge tag 'powerpc-4.15-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fix from Michael Ellerman: "Just one fix to correctly return SEGV_ACCERR when we take a SEGV on a mapped region. The bug was introduced in the refactoring of the page fault handler we did in the previous release. Thanks to John Sperbeck" * tag 'powerpc-4.15-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm: Fix SEGV on mapped region to return SEGV_ACCERR commit ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5 Author: Linus Torvalds Date: Fri Jan 5 16:26:00 2018 -0800 loop: fix concurrent lo_open/lo_release 范龙飞 reports that KASAN can report a use-after-free in __lock_acquire. The reason is due to insufficient serialization in lo_release(), which will continue to use the loop device even after it has decremented the lo_refcnt to zero. In the meantime, another process can come in, open the loop device again as it is being shut down. Confusion ensues. Reported-by: 范龙飞 Signed-off-by: Linus Torvalds Signed-off-by: Jens Axboe drivers/block/loop.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit bb4945e60dd0b5afb0e92bc8006ce560948fbc39 Merge: 0cb5b30 c2cf265 Author: Radim Krčmář Date: Sat Jan 6 17:26:37 2018 +0100 Merge tag 'kvm-s390-master-4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux KVM: s390: fixes for cmma migration Two fixes for potential bitmap overruns in the cmma migration code. commit b94b7373317164402ff7728d10f7023127a02b60 Author: Jia Zhang Date: Mon Jan 1 10:04:47 2018 +0800 x86/microcode/intel: Extend BDW late-loading with a revision check Instead of blacklisting all model 79 CPUs when attempting a late microcode loading, limit that only to CPUs with microcode revisions < 0x0b000021 because only on those late loading may cause a system hang. For such processors either: a) a BIOS update which might contain a newer microcode revision or b) the early microcode loading method should be considered. Processors with revisions 0x0b000021 or higher will not experience such hangs. For more details, see erratum BDF90 in document #334165 (Intel Xeon Processor E7-8800/4800 v4 Product Family Specification Update) from September 2017. [ bp: Heavily massage commit message and pr_* statements. ] Fixes: 723f2828a98c ("x86/microcode/intel: Disable late loading on model 79") Signed-off-by: Jia Zhang Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Acked-by: Tony Luck Cc: x86-ml Cc: # v4.14 Link: http://lkml.kernel.org/r/1514772287-92959-1-git-send-email-qianyue.zj@alibaba-inc.com arch/x86/kernel/cpu/microcode/intel.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 310d82784fb4d60c80569f5ca9f53a7f3bf1d477 Author: Helge Deller Date: Fri Jan 5 21:55:38 2018 +0100 parisc: qemu idle sleep support Add qemu idle sleep support when running under qemu with SeaBIOS PDC firmware. Like the power architecture we use the "or" assembler instructions, which translate to nops on real hardware, to indicate that qemu shall idle sleep. Signed-off-by: Helge Deller Cc: Richard Henderson CC: stable@vger.kernel.org # v4.9+ arch/parisc/kernel/process.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 7729bebc619307a0233c86f8585a4bf3eadc7ce4 Author: Valentin Ilie Date: Fri Jan 5 23:12:59 2018 +0000 ia64, sched/cputime: Fix build error if CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y Remove the extra parenthesis. This bug was introduced by: e2339a4caa5e: ("ia64: Convert vtime to use nsec units directly") Signed-off-by: Valentin Ilie Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: fenghua.yu@intel.com Cc: linux-ia64@vger.kernel.org Cc: tony.luck@intel.com Link: http://lkml.kernel.org/r/1515193979-24873-1-git-send-email-valentin.ilie@gmail.com Signed-off-by: Ingo Molnar arch/ia64/kernel/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdae44705c0d5b751fbd79bc4a169905b25ed335 Author: Chen-Yu Tsai Date: Thu Jan 4 00:31:55 2018 +0800 ARM: dts: sun[47]i: Fix display backend 1 output to TCON0 remote endpoint There is a copy-paste error in the display pipeline device tree graph. The remote endpoint of the display backend 1's output to TCON0 points to the wrong endpoint. This will result in the driver incorrectly parsing the relationship of the components. Reported-by: Andrea Venturi Fixes: 0df4cf33a594 ("ARM: dts: sun4i: Add device nodes for display pipelines") Fixes: 5b92b29bed45 ("ARM: dts: sun7i: Add device nodes for display pipelines") Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 2 +- arch/arm/boot/dts/sun7i-a20.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 65c64d1845fbc6420f8836e8731ea6c3012e8e7d Merge: 313243a 02a0d92 Author: Linus Torvalds Date: Fri Jan 5 16:45:06 2018 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "Just a few driver fixups, nothing exciting" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: xen-kbdfront - do not advertise multi-touch pressure support Input: hideep - fix compile error due to missing include file Input: elants_i2c - do not clobber interrupt trigger on x86 Input: joystick/analog - riscv has get_cycles() Input: elantech - add new icbody type 15 Input: ims-pcu - fix typo in the error message commit 313243aa1a8c6e5ac8749338139d11ede860ae81 Merge: f84d595 563b5cb Author: Linus Torvalds Date: Fri Jan 5 16:17:16 2018 -0800 Merge tag 'iommu-v4.15-rc7' of git://github.com/awilliam/linux-vfio Pull IOMMU fixes from Alex Williamson: "Fixes via Will Deacon for arm-smmu-v3. - Fix duplicate Stream ID handling in arm-smmu-v3 - Fix arm-smmu-v3 page table ops double free" * tag 'iommu-v4.15-rc7' of git://github.com/awilliam/linux-vfio: iommu/arm-smmu-v3: Cope with duplicated Stream IDs iommu/arm-smmu-v3: Don't free page table ops twice commit f84d595a5b6e11620a56db6c1cf0988834e6eb5b Merge: 89876f2 af1be2e Author: Linus Torvalds Date: Fri Jan 5 16:06:35 2018 -0800 Merge tag 'arc-4.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - platform updates for setting up clock correctly - fixes to accomodate newer gcc (__builtin_trap, removed inline asm modifier) - other fixes * tag 'arc-4.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: handle gcc generated __builtin_trap for older compiler ARC: handle gcc generated __builtin_trap() ARC: uaccess: dont use "l" gcc inline asm constraint modifier ARC: [plat-axs103] refactor the quad core DT quirk code ARC: [plat-axs103]: Set initial core pll output frequency ARC: [plat-hsdk]: Get rid of core pll frequency set in platform code ARC: [plat-hsdk]: Set initial core pll output frequency ARC: [plat-hsdk] Switch DisplayLink driver from fbdev to DRM arc: do not use __print_symbol() ARC: Fix detection of dual-issue enabled commit 5b9f57cf47b87f07210875d6a24776b4496b818d Author: John Johansen Date: Thu Dec 7 00:28:27 2017 -0800 apparmor: fix regression in mount mediation when feature set is pinned When the mount code was refactored for Labels it was not correctly updated to check whether policy supported mediation of the mount class. This causes a regression when the kernel feature set is reported as supporting mount and policy is pinned to a feature set that does not support mount mediation. BugLink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882697#41 Fixes: 2ea3ffb7782a ("apparmor: add mount mediation") Reported-by: Fabian Grünbichler Cc: Stable Signed-off-by: John Johansen security/apparmor/mount.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 89876f275e8d562912d9c238cd888b52065cf25c Merge: 12e971b ec35e48 Author: Linus Torvalds Date: Fri Jan 5 13:02:46 2018 -0800 Merge tag 'for-4.15-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "We have two more fixes for 4.15, both aimed for stable. The leak fix is obvious, the second patch fixes a bug revealed by the refcount API, when it behaves differently than previous atomic_t and reports refs going from 0 to 1 in one case" * tag 'for-4.15-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix refcount_t usage when deleting btrfs_delayed_nodes btrfs: Fix flush bio leak commit 12e971b652e3166c3039e09ad2cb5568fc7f040a Merge: f842839 b4d8ad7 Author: Linus Torvalds Date: Fri Jan 5 12:59:32 2018 -0800 Merge tag 'xfs-4.15-fixes-10' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull XFS fixes from Darrick Wong: "I have just a few fixes for bugs and resource cleanup problems this week: - Fix resource cleanup of failed quota initialization - Fix integer overflow problems wrt s_maxbytes" * tag 'xfs-4.15-fixes-10' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix s_maxbytes overflow problems xfs: quota: check result of register_shrinker() xfs: quota: fix missed destroy of qi_tree_lock commit f842839cd85be149ff158bddf0260cd1a8db69e5 Merge: abb7099 107b7d9 Author: Linus Torvalds Date: Fri Jan 5 12:56:20 2018 -0800 Merge tag 'mfd-fixes-4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD fix from Lee Jones: "Late bugfix to plug a leak in rtsx_pcr" * tag 'mfd-fixes-4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: mfd: rtsx: Release IRQ during shutdown commit abb7099dbc7a77f8674083050028c493ac601228 Merge: b03acc4 de79182 Author: Linus Torvalds Date: Fri Jan 5 12:23:57 2018 -0800 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull more x86 pti fixes from Thomas Gleixner: "Another small stash of fixes for fallout from the PTI work: - Fix the modules vs. KASAN breakage which was caused by making MODULES_END depend of the fixmap size. That was done when the cpu entry area moved into the fixmap, but now that we have a separate map space for that this is causing more issues than it solves. - Use the proper cache flush methods for the debugstore buffers as they are mapped/unmapped during runtime and not statically mapped at boot time like the rest of the cpu entry area. - Make the map layout of the cpu_entry_area consistent for 4 and 5 level paging and fix the KASLR vaddr_end wreckage. - Use PER_CPU_EXPORT for per cpu variable and while at it unbreak nvidia gfx drivers by dropping the GPL export. The subject line of the commit tells it the other way around, but I noticed that too late. - Fix the ASM alternative macros so they can be used in the middle of an inline asm block. - Rename the BUG_CPU_INSECURE flag to BUG_CPU_MELTDOWN so the attack vector is properly identified. The Spectre mitigations will come with their own bug bits later" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/pti: Rename BUG_CPU_INSECURE to BUG_CPU_MELTDOWN x86/alternatives: Add missing '\n' at end of ALTERNATIVE inline asm x86/tlb: Drop the _GPL from the cpu_tlbstate export x86/events/intel/ds: Use the proper cache flush method for mapping ds buffers x86/kaslr: Fix the vaddr_end mess x86/mm: Map cpu_entry_area at the same place on 4/5 level x86/mm: Set MODULES_END to 0xffffffffff000000 commit b03acc4cc2c3b2338c6ee760351d010fb4708af3 Merge: 3eac690 81b60db Author: Linus Torvalds Date: Fri Jan 5 12:20:35 2018 -0800 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI updates from Thomas Gleixner: - A fix for a add_efi_memmap parameter regression which ensures that the parameter is parsed before it is used. - Reinstate the virtual capsule mapping as the cached copy turned out to break Quark and other things - Remove Matt Fleming as EFI co-maintainer. He stepped back a few days ago. Thanks Matt for all your great work! * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: MAINTAINERS: Remove Matt Fleming as EFI co-maintainer efi/capsule-loader: Reinstate virtual capsule mapping x86/efi: Fix kernel param add_efi_memmap regression commit 3eac69038322f52b7366e4e6bbdb06e749714133 Merge: 925cbd7 8a9bd4f Author: Linus Torvalds Date: Fri Jan 5 12:17:33 2018 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: "Four bug fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/dasd: fix wrongly assigned configuration data s390: fix preemption race in disable_sacf_uaccess s390/sclp: disable FORTIFY_SOURCE for early sclp code s390/pci: handle insufficient resources during dma tlb flush commit 925cbd7ed4b073a2afc9915e241ab789b44a3f61 Merge: 64648a5 4aac2ca Author: Linus Torvalds Date: Fri Jan 5 12:15:12 2018 -0800 Merge tag 'for-linus-4.15-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fix from Juergen Gross: "One minor fix adjusting the kmalloc flags in the new pvcalls driver added in rc1" * tag 'for-linus-4.15-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/pvcalls: use GFP_ATOMIC under spin lock commit 64648a5fcabf46000a496c41c92c5c0f16be78ed Merge: d8887f1 2973633 Author: Linus Torvalds Date: Fri Jan 5 12:10:06 2018 -0800 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: - racy use of ctx->rcvused in af_alg - algif_aead crash in chacha20poly1305 - freeing bogus pointer in pcrypt - build error on MIPS in mpi - memory leak in inside-secure - memory overwrite in inside-secure - NULL pointer dereference in inside-secure - state corruption in inside-secure - build error without CRYPTO_GF128MUL in chelsio - use after free in n2" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: inside-secure - do not use areq->result for partial results crypto: inside-secure - fix request allocations in invalidation path crypto: inside-secure - free requests even if their handling failed crypto: inside-secure - per request invalidation lib/mpi: Fix umul_ppmm() for MIPS64r6 crypto: pcrypt - fix freeing pcrypt instances crypto: n2 - cure use after free crypto: af_alg - Fix race around ctx->rcvused by making it atomic_t crypto: chacha20poly1305 - validate the digest size crypto: chelsio - select CRYPTO_GF128MUL commit d8887f1c7289848e74c92bd4322789a9cd7de699 Merge: 5866bec 9a0e712 Author: Linus Torvalds Date: Fri Jan 5 11:26:09 2018 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "9 fixes" * emailed patches from Andrew Morton : mailmap: update Mark Yao's email address userfaultfd: clear the vma->vm_userfaultfd_ctx if UFFD_EVENT_FORK fails mm/sparse.c: wrong allocation for mem_section mm/zsmalloc.c: include fs.h mm/debug.c: provide useful debugging information for VM_BUG kernel/exit.c: export abort() to modules mm/mprotect: add a cond_resched() inside change_pmd_range() kernel/acct.c: fix the acct->needcheck check in check_free_space() mm: check pfn_valid first in zero_resv_unavail commit 5133550296d43236439494aa955bfb765a89f615 Author: Sergei Shtylyov Date: Thu Jan 4 21:06:49 2018 +0300 sh_eth: fix SH7757 GEther initialization Renesas SH7757 has 2 Fast and 2 Gigabit Ether controllers, while the 'sh_eth' driver can only reset and initialize TSU of the first controller pair. Shimoda-san tried to solve that adding the 'needs_init' member to the 'struct sh_eth_plat_data', however the platform code still never sets this flag. I think that we can infer this information from the 'devno' variable (set to 'platform_device::id') and reset/init the Ether controller pair only for an even 'devno'; therefore 'sh_eth_plat_data::needs_init' can be removed... Fixes: 150647fb2c31 ("net: sh_eth: change the condition of initialization") Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 4 ++-- include/linux/sh_eth.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) commit 3e6e867afe9be617c340dacb194c95fa2fa3d6cc Merge: d1616f0 6ebc5e8 Author: David S. Miller Date: Fri Jan 5 13:48:00 2018 -0500 Merge tag 'linux-can-fixes-for-4.15-20180104' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2018-01-04 this is a pull request for net/master consisting of 4 patches. The first patch is by Oliver Hartkopp, it improves the error checking during the creation of a vxcan link. Wolfgang Grandegger's patch for the gs_usb driver fixes the return value of the "set_bittiming" callback. Luu An Phu provides a patch for the flexcan driver to fix the frame length check in the flexcan_start_xmit() function. The last patch is by Martin Lederhilger for the ems_usb driver and improves the error reporting for error warning and passive frames. ==================== Signed-off-by: David S. Miller commit cbf3a95924d515c1883aec2322fec277e4726134 Merge: 454be72 254beb8 Author: Jens Axboe Date: Fri Jan 5 10:39:01 2018 -0700 Merge branch 'nvme-4.15' of git://git.infradead.org/nvme into for-linus Pull a handful of NVMe fixes from Christoph that should go into 4.15. commit 9059a3493efea6492451430c7e2fa0af799a2abb Author: Nicolas Pitre Date: Thu Nov 16 20:06:39 2017 -0500 kconfig: fix relational operators for bool and tristate symbols Since commit 31847b67bec0 ("kconfig: allow use of relations other than (in)equality") it is possible to use relational operators in Kconfig statements. However, those operators give unexpected results when applied to bool/tristate values: (n < y) = y (correct) (m < y) = y (correct) (n < m) = n (wrong) This happens because relational operators process bool and tristate symbols as strings and m sorts before n. It makes little sense to do a lexicographical compare on bool and tristate values though. Documentation/kbuild/kconfig-language.txt states that expression can have a value of 'n', 'm' or 'y' (or 0, 1, 2 respectively for calculations). Let's make it so for relational comparisons with bool/tristate expressions as well and document them. If at least one symbol is an actual string then the lexicographical compare works just as before. Signed-off-by: Nicolas Pitre Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Masahiro Yamada Documentation/kbuild/kconfig-language.txt | 23 +++++++++++++++-------- scripts/kconfig/expr.c | 5 ++++- 2 files changed, 19 insertions(+), 9 deletions(-) commit 040ee69226f8a96b7943645d68f41d5d44b5ff7d Author: Al Viro Date: Sat Dec 2 20:20:38 2017 -0500 fix "netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1'" Descriptor table is a shared object; it's not a place where you can stick temporary references to files, especially when we don't need an opened file at all. Cc: stable@vger.kernel.org # v4.14 Fixes: 98589a0998b8 ("netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1'") Signed-off-by: Al Viro include/linux/bpf.h | 10 ++++++++++ kernel/bpf/inode.c | 40 +++++++++++++++++++++++++++++++++++++++- kernel/bpf/syscall.c | 2 +- net/netfilter/xt_bpf.c | 14 ++------------ 4 files changed, 52 insertions(+), 14 deletions(-) commit d1616f07e8f1a4a490d1791316d4a68906b284aa Author: Fugang Duan Date: Thu Jan 4 10:47:20 2018 +0800 net: fec: free/restore resource in related probe error pathes Fixes in probe error path: - Restore dev_id before failed_ioremap path. Fixes: ("net: fec: restore dev_id in the cases of probe error") - Call of_node_put(phy_node) before failed_phy path. Fixes: ("net: fec: Support phys probed from devicetree and fixed-link") Signed-off-by: Fugang Duan Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 454be724f6f99cc7e7bbf15067128be9868186c6 Author: Ming Lei Date: Thu Nov 30 07:56:35 2017 +0800 block: drain queue before waiting for q_usage_counter becoming zero Now we track legacy requests with .q_usage_counter in commit 055f6e18e08f ("block: Make q_usage_counter also track legacy requests"), but that commit never runs and drains legacy queue before waiting for this counter becoming zero, then IO hang is caused in the test of pulling disk during IO. This patch fixes the issue by draining requests before waiting for q_usage_counter becoming zero, both Mauricio and chenxiang reported this issue, and observed that it can be fixed by this patch. Link: https://marc.info/?l=linux-block&m=151192424731797&w=2 Fixes: 055f6e18e08f("block: Make q_usage_counter also track legacy requests") Cc: Wen Xiong Tested-by: "chenxiang (M)" Tested-by: Mauricio Faria de Oliveira Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-core.c | 9 +++++++-- block/blk-mq.c | 2 ++ block/blk.h | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) commit e3af9f7c6ece29fdb7fe0aeb83ac5d3077a06edb Author: Gregory CLEMENT Date: Tue Jul 25 16:51:20 2017 +0200 ARM64: dts: marvell: armada-cp110: Fix clock resources for various node On the CP modules we found on Armada 7K/8K, many IP block actually also need a "functional" clock (from the bus). This patch add them which allows to fix some issues hanging the kernel: If Ethernet and sdhci driver are built as modules and sdhci was loaded first then the kernel hang. Fixes: bb16ea1742c8 ("mmc: sdhci-xenon: Fix clock resource by adding an optional bus clock") Cc: stable@vger.kernel.org Reported-by: Riku Voipio Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 13 ++++++++----- arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 9 ++++++--- 2 files changed, 14 insertions(+), 8 deletions(-) commit 0cb5b30698fdc8f6b4646012e3acb4ddce430788 Author: Jim Mattson Date: Wed Jan 3 14:31:38 2018 -0800 kvm: vmx: Scrub hardware GPRs at VM-exit Guest GPR values are live in the hardware GPRs at VM-exit. Do not leave any guest values in hardware GPRs after the guest GPR values are saved to the vcpu_vmx structure. This is a partial mitigation for CVE 2017-5715 and CVE 2017-5753. Specifically, it defeats the Project Zero PoC for CVE 2017-5715. Suggested-by: Eric Northup Signed-off-by: Jim Mattson Reviewed-by: Eric Northup Reviewed-by: Benjamin Serebrin Reviewed-by: Andrew Honig [Paolo: Add AMD bits, Signed-off-by: Tom Lendacky ] Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 19 +++++++++++++++++++ arch/x86/kvm/vmx.c | 14 +++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) commit 898dfe4687f460ba337a01c11549f87269a13fa2 Author: Takashi Iwai Date: Thu Jan 4 17:38:54 2018 +0100 ALSA: aloop: Fix racy hw constraints adjustment The aloop driver tries to update the hw constraints of the connected target on the cable of the opened PCM substream. This is done by adding the extra hw constraints rules referring to the substream runtime->hw fields, while the other substream may update the runtime hw of another side on the fly. This is, however, racy and may result in the inconsistent values when both PCM streams perform the prepare concurrently. One of the reason is that it overwrites the other's runtime->hw field; which is not only racy but also broken when it's called before the open of another side finishes. And, since the reference to runtime->hw isn't protected, the concurrent write may give the partial value update and become inconsistent. This patch is an attempt to fix and clean up: - The prepare doesn't change the runtime->hw of other side any longer, but only update the cable->hw that is referred commonly. - The extra rules refer to the loopback_pcm object instead of the runtime->hw. The actual hw is deduced from cable->hw. - The extra rules take the cable_lock to protect against the race. Fixes: b1c73fc8e697 ("ALSA: snd-aloop: Fix hw_params restrictions and checking") Cc: Signed-off-by: Takashi Iwai sound/drivers/aloop.c | 51 +++++++++++++++++++++------------------------------ 1 file changed, 21 insertions(+), 30 deletions(-) commit b088b53e20c7d09b5ab84c5688e609f478e5c417 Author: Takashi Iwai Date: Fri Jan 5 16:15:33 2018 +0100 ALSA: aloop: Fix inconsistent format due to incomplete rule The extra hw constraint rule for the formats the aloop driver introduced has a slight flaw, where it doesn't return a positive value when the mask got changed. It came from the fact that it's basically a copy&paste from snd_hw_constraint_mask64(). The original code is supposed to be a single-shot and it modifies the mask bits only once and never after, while what we need for aloop is the dynamic hw rule that limits the mask bits. This difference results in the inconsistent state, as the hw_refine doesn't apply the dependencies fully. The worse and surprisingly result is that it causes a crash in OSS emulation when multiple full-duplex reads/writes are performed concurrently (I leave why it triggers Oops to readers as a homework). For fixing this, replace a few open-codes with the standard snd_mask_*() macros. Reported-by: syzbot+3902b5220e8ca27889ca@syzkaller.appspotmail.com Fixes: b1c73fc8e697 ("ALSA: snd-aloop: Fix hw_params restrictions and checking") Cc: Signed-off-by: Takashi Iwai sound/drivers/aloop.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit f737be8d61f251d2c1632f871ba824aa5a512384 Merge: 6926e04 8bea728 Author: David S. Miller Date: Fri Jan 5 10:33:01 2018 -0500 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 chain filtering when dumping rules via nf_tables_dump_rules(). 2) Fix accidental change in NF_CT_STATE_UNTRACKED_BIT through uapi, introduced when removing the untracked conntrack object, from Florian Westphal. 3) Fix potential nul-dereference when releasing dump filter in nf_tables_dump_obj_done(), patch from Hangbin Liu. ==================== Signed-off-by: David S. Miller commit 9685347aa0a5c2869058ca6ab79fd8e93084a67f Author: Takashi Iwai Date: Fri Jan 5 16:09:47 2018 +0100 ALSA: aloop: Release cable upon open error path The aloop runtime object and its assignment in the cable are left even when opening a substream fails. This doesn't mean any memory leak, but it still keeps the invalid pointer that may be referred by the another side of the cable spontaneously, which is a potential Oops cause. Clean up the cable assignment and the empty cable upon the error path properly. Fixes: 597603d615d2 ("ALSA: introduce the snd-aloop module for the PCM loopback") Cc: Signed-off-by: Takashi Iwai sound/drivers/aloop.c | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) commit fb51f1cd06f9ced7b7085a2a4636375d520431ca Author: Takashi Iwai Date: Wed Jan 3 15:16:30 2018 +0100 ALSA: pcm: Workaround for weird PulseAudio behavior on rewind error The commit 9027c4639ef1 ("ALSA: pcm: Call ack() whenever appl_ptr is updated") introduced the possible error code returned from the PCM rewind ioctl. Basically the change was for handling the indirect PCM more correctly, but ironically, it caused rather a side-effect: PulseAudio gets pissed off when receiving an error from rewind, throws everything away and stops processing further, resulting in the silence. It's clearly a failure in the application side, so the best would be to fix that bug in PA. OTOH, PA is mostly the only user of the rewind feature, so it's not good to slap the sole customer. This patch tries to mitigate the situation: instead of returning an error, now the rewind ioctl returns zero when the driver can't rewind. It indicates that no rewind was performed, so the behavior is consistent, at least. Fixes: 9027c4639ef1 ("ALSA: pcm: Call ack() whenever appl_ptr is updated") Cc: Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit de791821c295cc61419a06fe5562288417d1bc58 Author: Thomas Gleixner Date: Fri Jan 5 15:27:34 2018 +0100 x86/pti: Rename BUG_CPU_INSECURE to BUG_CPU_MELTDOWN Use the name associated with the particular attack which needs page table isolation for mitigation. Signed-off-by: Thomas Gleixner Acked-by: David Woodhouse Cc: Alan Cox Cc: Jiri Koshina Cc: Linus Torvalds Cc: Tim Chen Cc: Andi Lutomirski Cc: Andi Kleen Cc: Peter Zijlstra Cc: Paul Turner Cc: Tom Lendacky Cc: Greg KH Cc: Dave Hansen Cc: Kees Cook Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801051525300.1724@nanos arch/x86/include/asm/cpufeatures.h | 2 +- arch/x86/kernel/cpu/common.c | 2 +- arch/x86/mm/pti.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) commit 7669b122085018c1f64720d11c24ae6d2549193d Author: Mathieu Malaterre Date: Fri Dec 15 13:46:57 2017 +0100 ARM: dts: da850-lcdk: Remove leading 0x and 0s from unit address Improve the DTS files by removing all the leading "0x" and zeros to fix the following dtc warnings: Warning (unit_address_format): Node /XXX unit name should not have leading "0x" and Warning (unit_address_format): Node /XXX unit name should not have leading 0s Converted using the following command: find . -type f \( -iname *.dts -o -iname *.dtsi \) -exec sed -i -e "s/@\([0-9a-fA-FxX\.;:#]+\)\s*{/@\L\1 {/g" -e "s/@0x\(.*\) {/@\1 {/g" -e "s/@0+\(.*\) {/@\1 {/g" {} +^C For simplicity, two sed expressions were used to solve each warnings separately. To make the regex expression more robust a few other issues were resolved, namely setting unit-address to lower case, and adding a whitespace before the the opening curly brace: https://elinux.org/Device_Tree_Linux#Linux_conventions This will solve as a side effect warning: Warning (simple_bus_reg): Node /XXX@ simple-bus unit address format error, expected "" This is a follow up to commit 4c9847b7375a ("dt-bindings: Remove leading 0x from bindings notation") Reported-by: David Daney Suggested-by: Rob Herring Signed-off-by: Mathieu Malaterre Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lcdk.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b9e705ef7cfaf22db0daab91ad3cd33b0fa32eb9 Author: David Woodhouse Date: Thu Jan 4 14:37:05 2018 +0000 x86/alternatives: Add missing '\n' at end of ALTERNATIVE inline asm Where an ALTERNATIVE is used in the middle of an inline asm block, this would otherwise lead to the following instruction being appended directly to the trailing ".popsection", and a failed compile. Fixes: 9cebed423c84 ("x86, alternative: Use .pushsection/.popsection") Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Cc: gnomes@lxorguk.ukuu.org.uk Cc: Rik van Riel Cc: ak@linux.intel.com Cc: Tim Chen Cc: Peter Zijlstra Cc: Paul Turner Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Kees Cook Cc: Linus Torvalds Cc: Greg Kroah-Hartman Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180104143710.8961-8-dwmw@amazon.co.uk arch/x86/include/asm/alternative.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 49fdde89e2b8574cb55f99b57b7798f44567bc4b Merge: 943309d 0856655 Author: Kalle Valo Date: Fri Jan 5 14:02:36 2018 +0200 Merge ath-current from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git fixes for 4.15. Major changes: wcn36xx * fix dynamic power save which has been broken since the driver was commited commit 943309d4aad6732b905f3f500e6e17e33c211494 Author: Emmanuel Grumbach Date: Thu Jan 4 09:19:13 2018 +0200 iwlwifi: pcie: fix DMA memory mapping / unmapping 22000 devices (previously referenced as A000) can support short transmit queues. This means that we have less DMA descriptors (TFD) for those shorter queues. Previous devices must still have 256 TFDs for each queue even if those 256 TFDs point to fewer buffers. When I introduced support for the short queues for 22000 I broke older devices by assuming that they can also have less TFDs in their queues. This led to several problems: 1) the payload of the commands weren't unmapped properly which caused the SWIOTLB to complain at some point. 2) the hardware could get confused and we get hardware crashes. The corresponding bugzilla entries are: https://bugzilla.kernel.org/show_bug.cgi?id=198201 https://bugzilla.kernel.org/show_bug.cgi?id=198265 Cc: stable@vger.kernel.org # 4.14+ Fixes: 4ecab5616023 ("iwlwifi: pcie: support short Tx queues for A000 device family") Reviewed-by: Sharon, Sara Signed-off-by: Emmanuel Grumbach Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 10 +++++++--- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 11 +++-------- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 8 ++++---- 3 files changed, 14 insertions(+), 15 deletions(-) commit 107b7d9fa94c4692d9104243f0e793e2a4e1366e Author: Sinan Kaya Date: Wed Jan 3 07:32:45 2018 -0500 mfd: rtsx: Release IRQ during shutdown 'Commit cc27b735ad3a ("PCI/portdrv: Turn off PCIe services during shutdown")' revealed a resource leak in rtsx_pci driver during shutdown. Issue shows up as a warning during shutdown as follows: remove_proc_entry: removing non-empty directory 'irq/17', leaking at least 'rtsx_pci' WARNING: CPU: 0 PID: 1578 at fs/proc/generic.c:572 remove_proc_entry+0x11d/0x130 Modules linked in ... Call Trace: unregister_irq_proc free_desc irq_free_descs mp_unmap_irq acpi_unregister_gsi_apic acpi_pci_irq_disable do_pci_disable_device pci_disable_device device_shutdown kernel_restart Sys_reboot Even though rtsx_pci driver implements a shutdown callback, it is not releasing the interrupt that it registered during probe. This is causing the ACPI layer to complain that the shared IRQ is in use while freeing IRQ. This code releases the IRQ to prevent resource leak and eliminate the warning. Fixes: cc27b735ad3a ("PCI/portdrv: Turn off PCIe services during shutdown") Link: https://bugzilla.kernel.org/show_bug.cgi?id=198141 Reported-by: Chris Clayton Signed-off-by: Sinan Kaya Reviewed-by: Rafael J. Wysocki Signed-off-by: Lee Jones drivers/mfd/rtsx_pcr.c | 3 +++ 1 file changed, 3 insertions(+) commit 56aeb07c914a616ab84357d34f8414a69b140cdf Author: Thomas Petazzoni Date: Thu Jan 4 17:53:12 2018 +0100 ARM: dts: kirkwood: fix pin-muxing of MPP7 on OpenBlocks A7 MPP7 is currently muxed as "gpio", but this function doesn't exist for MPP7, only "gpo" is available. This causes the following error: kirkwood-pinctrl f1010000.pin-controller: unsupported function gpio on pin mpp7 pinctrl core: failed to register map default (6): invalid type given kirkwood-pinctrl f1010000.pin-controller: error claiming hogs: -22 kirkwood-pinctrl f1010000.pin-controller: could not claim hogs: -22 kirkwood-pinctrl f1010000.pin-controller: unable to register pinctrl driver kirkwood-pinctrl: probe of f1010000.pin-controller failed with error -22 So the pinctrl driver is not probed, all device drivers (including the UART driver) do a -EPROBE_DEFER, and therefore the system doesn't really boot (well, it boots, but with no UART, and no devices that require pin-muxing). Back when the Device Tree file for this board was introduced, the definition was already wrong. The pinctrl driver also always described as "gpo" this function for MPP7. However, between Linux 4.10 and 4.11, a hog pin failing to be muxed was turned from a simple warning to a hard error that caused the entire pinctrl driver probe to bail out. This is probably the result of commit 6118714275f0a ("pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable()"). This commit fixes the Device Tree to use the proper "gpo" function for MPP7, which fixes the boot of OpenBlocks A7, which was broken since Linux 4.11. Fixes: f24b56cbcd9d ("ARM: kirkwood: add support for OpenBlocks A7 platform") Cc: Signed-off-by: Thomas Petazzoni Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/kirkwood-openblocks_a7.dts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit d16b46e4fd8bc6063624605f25b8c0835bb1fbe3 Author: Herbert Xu Date: Thu Jan 4 22:25:07 2018 +1100 xfrm: Use __skb_queue_tail in xfrm_trans_queue We do not need locking in xfrm_trans_queue because it is designed to use per-CPU buffers. However, the original code incorrectly used skb_queue_tail which takes the lock. This patch switches it to __skb_queue_tail instead. Reported-and-tested-by: Artem Savkov Fixes: acf568ee859f ("xfrm: Reinject transport-mode packets...") Signed-off-by: Herbert Xu Signed-off-by: Steffen Klassert net/xfrm/xfrm_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a00674213a3f00394f4e3221b88f2d21fc05789 Author: Eric Biggers Date: Fri Dec 29 14:30:19 2017 -0600 crypto: algapi - fix NULL dereference in crypto_remove_spawns() syzkaller triggered a NULL pointer dereference in crypto_remove_spawns() via a program that repeatedly and concurrently requests AEADs "authenc(cmac(des3_ede-asm),pcbc-aes-aesni)" and hashes "cmac(des3_ede)" through AF_ALG, where the hashes are requested as "untested" (CRYPTO_ALG_TESTED is set in ->salg_mask but clear in ->salg_feat; this causes the template to be instantiated for every request). Although AF_ALG users really shouldn't be able to request an "untested" algorithm, the NULL pointer dereference is actually caused by a longstanding race condition where crypto_remove_spawns() can encounter an instance which has had spawn(s) "grabbed" but hasn't yet been registered, resulting in ->cra_users still being NULL. We probably should properly initialize ->cra_users earlier, but that would require updating many templates individually. For now just fix the bug in a simple way that can easily be backported: make crypto_remove_spawns() treat a NULL ->cra_users list as empty. Reported-by: syzbot Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/algapi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5866bec2f47fe0da5fd4c503adbd4ad65182eafe Merge: e1915c8 bc6fe53 Author: Linus Torvalds Date: Thu Jan 4 18:02:55 2018 -0800 Merge tag 'drm-fixes-for-v4.15-rc7' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Just collecting some fixes to finish my hoildays :-). A few fixes for i915 (one documentation build fix), one ttm fix, one AMD display fix, one omapdrm fix, and a set of armada fixes from Russell. All seem pretty small, you can now return to your latest security news site" * tag 'drm-fixes-for-v4.15-rc7' of git://people.freedesktop.org/~airlied/linux: drm/i915: Apply Display WA #1183 on skl, kbl, and cfl drm/ttm: check the return value of kzalloc drm/amd/display: call set csc_default if enable adjustment is false docs: fix, intel_guc_loader.c has been moved to intel_guc_fw.c omapdrm/dss/hdmi4_cec: fix interrupt handling documentation/gpu/i915: fix docs build error after file rename drm/i915: Put all non-blocking modesets onto an ordered wq drm/i915: Disable DC states around GMBUS on GLK drm/i915/psr: Fix register name mess up. drm/armada: fix YUV planar format framebuffer offsets drm/armada: improve efficiency of armada_drm_plane_calc_addrs() drm/armada: fix UV swap code drm/armada: fix SRAM powerdown drm/armada: fix leak of crtc structure commit 9a0e7120109632910e77295ce6fc512c16cd367b Author: Jeffy Chen Date: Thu Jan 4 16:18:12 2018 -0800 mailmap: update Mark Yao's email address Change the previous employers email addresses to the current email address. Link: http://lkml.kernel.org/r/20171229121726.31589-1-jeffy.chen@rock-chips.com Signed-off-by: Jeffy Chen Acked-by: Martin Kepplinger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .mailmap | 1 + 1 file changed, 1 insertion(+) commit 0cbb4b4f4c44f54af268969b18d8deda63aded59 Author: Andrea Arcangeli Date: Thu Jan 4 16:18:09 2018 -0800 userfaultfd: clear the vma->vm_userfaultfd_ctx if UFFD_EVENT_FORK fails The previous fix in commit 384632e67e08 ("userfaultfd: non-cooperative: fix fork use after free") corrected the refcounting in case of UFFD_EVENT_FORK failure for the fork userfault paths. That still didn't clear the vma->vm_userfaultfd_ctx of the vmas that were set to point to the aborted new uffd ctx earlier in dup_userfaultfd. Link: http://lkml.kernel.org/r/20171223002505.593-2-aarcange@redhat.com Signed-off-by: Andrea Arcangeli Reported-by: syzbot Reviewed-by: Mike Rapoport Cc: Eric Biggers Cc: Dmitry Vyukov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit d09cfbbfa0f761a97687828b5afb27b56cbf2e19 Author: Baoquan He Date: Thu Jan 4 16:18:06 2018 -0800 mm/sparse.c: wrong allocation for mem_section In commit 83e3c48729d9 ("mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y") mem_section is allocated at runtime to save memory. It allocates the first dimension of array with sizeof(struct mem_section). It costs extra memory, should be sizeof(struct mem_section *). Fix it. Link: http://lkml.kernel.org/r/1513932498-20350-1-git-send-email-bhe@redhat.com Fixes: 83e3c48729 ("mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y") Signed-off-by: Baoquan He Tested-by: Dave Young Acked-by: Kirill A. Shutemov Cc: Kirill A. Shutemov Cc: Ingo Molnar Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Atsushi Kumagai Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/sparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdc346b36e1dfec201b24eddb7bdbcff6727db04 Author: Sergey Senozhatsky Date: Thu Jan 4 16:18:02 2018 -0800 mm/zsmalloc.c: include fs.h `struct file_system_type' and alloc_anon_inode() function are defined in fs.h, include it directly. Link: http://lkml.kernel.org/r/20171219104219.3017-1-sergey.senozhatsky@gmail.com Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/zsmalloc.c | 1 + 1 file changed, 1 insertion(+) commit 152a2d199e1385c6ccef17c24555103b30447c91 Author: Matthew Wilcox Date: Thu Jan 4 16:17:59 2018 -0800 mm/debug.c: provide useful debugging information for VM_BUG With the recent addition of hashed kernel pointers, places which need to produce useful debug output have to specify %px, not %p. This patch fixes all the VM debug to use %px. This is appropriate because it's debug output that the user should never be able to trigger, and kernel developers need to see the actual pointers. Link: http://lkml.kernel.org/r/20171219133236.GE13680@bombadil.infradead.org Signed-off-by: Matthew Wilcox Acked-by: Michal Hocko Cc: "Tobin C. Harding" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/debug.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit dc8635b78cd8669c37e230058d18c33af7451ab1 Author: Andrew Morton Date: Thu Jan 4 16:17:56 2018 -0800 kernel/exit.c: export abort() to modules gcc -fisolate-erroneous-paths-dereference can generate calls to abort() from modular code too. [arnd@arndb.de: drop duplicate exports of abort()] Link: http://lkml.kernel.org/r/20180102103311.706364-1-arnd@arndb.de Reported-by: Vineet Gupta Cc: Sudip Mukherjee Cc: Arnd Bergmann Cc: Alexey Brodkin Cc: Russell King Cc: Jose Abreu Signed-off-by: Andrew Morton Signed-off-by: Arnd Bergmann Signed-off-by: Linus Torvalds arch/arm/kernel/traps.c | 1 - arch/m32r/kernel/traps.c | 1 - arch/unicore32/kernel/traps.c | 1 - kernel/exit.c | 1 + 4 files changed, 1 insertion(+), 3 deletions(-) commit 4991c09c7c812dba13ea9be79a68b4565bb1fa4e Author: Anshuman Khandual Date: Thu Jan 4 16:17:52 2018 -0800 mm/mprotect: add a cond_resched() inside change_pmd_range() While testing on a large CPU system, detected the following RCU stall many times over the span of the workload. This problem is solved by adding a cond_resched() in the change_pmd_range() function. INFO: rcu_sched detected stalls on CPUs/tasks: 154-....: (670 ticks this GP) idle=022/140000000000000/0 softirq=2825/2825 fqs=612 (detected by 955, t=6002 jiffies, g=4486, c=4485, q=90864) Sending NMI from CPU 955 to CPUs 154: NMI backtrace for cpu 154 CPU: 154 PID: 147071 Comm: workload Not tainted 4.15.0-rc3+ #3 NIP: c0000000000b3f64 LR: c0000000000b33d4 CTR: 000000000000aa18 REGS: 00000000a4b0fb44 TRAP: 0501 Not tainted (4.15.0-rc3+) MSR: 8000000000009033 CR: 22422082 XER: 00000000 CFAR: 00000000006cf8f0 SOFTE: 1 GPR00: 0010000000000000 c00003ef9b1cb8c0 c0000000010cc600 0000000000000000 GPR04: 8e0000018c32b200 40017b3858fd6e00 8e0000018c32b208 40017b3858fd6e00 GPR08: 8e0000018c32b210 40017b3858fd6e00 8e0000018c32b218 40017b3858fd6e00 GPR12: ffffffffffffffff c00000000fb25100 NIP [c0000000000b3f64] plpar_hcall9+0x44/0x7c LR [c0000000000b33d4] pSeries_lpar_flush_hash_range+0x384/0x420 Call Trace: flush_hash_range+0x48/0x100 __flush_tlb_pending+0x44/0xd0 hpte_need_flush+0x408/0x470 change_protection_range+0xaac/0xf10 change_prot_numa+0x30/0xb0 task_numa_work+0x2d0/0x3e0 task_work_run+0x130/0x190 do_notify_resume+0x118/0x120 ret_from_except_lite+0x70/0x74 Instruction dump: 60000000 f8810028 7ca42b78 7cc53378 7ce63b78 7d074378 7d284b78 7d495378 e9410060 e9610068 e9810070 44000022 <7d806378> e9810028 f88c0000 f8ac0008 Link: http://lkml.kernel.org/r/20171214140551.5794-1-khandual@linux.vnet.ibm.com Signed-off-by: Anshuman Khandual Suggested-by: Nicholas Piggin Acked-by: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mprotect.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4d9570158b6260f449e317a5f9ed030c2504a615 Author: Oleg Nesterov Date: Thu Jan 4 16:17:49 2018 -0800 kernel/acct.c: fix the acct->needcheck check in check_free_space() As Tsukada explains, the time_is_before_jiffies(acct->needcheck) check is very wrong, we need time_is_after_jiffies() to make sys_acct() work. Ignoring the overflows, the code should "goto out" if needcheck > jiffies, while currently it checks "needcheck < jiffies" and thus in the likely case check_free_space() does nothing until jiffies overflow. In particular this means that sys_acct() is simply broken, acct_on() sets acct->needcheck = jiffies and expects that check_free_space() should set acct->active = 1 after the free-space check, but this won't happen if jiffies increments in between. This was broken by commit 32dc73086015 ("get rid of timer in kern/acct.c") in 2011, then another (correct) commit 795a2f22a8ea ("acct() should honour the limits from the very beginning") made the problem more visible. Link: http://lkml.kernel.org/r/20171213133940.GA6554@redhat.com Fixes: 32dc73086015 ("get rid of timer in kern/acct.c") Reported-by: TSUKADA Koutaro Suggested-by: TSUKADA Koutaro Signed-off-by: Oleg Nesterov Cc: Al Viro Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/acct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8c24773d6b2cd9bc8b36bd6e60beff599be14be Author: Dave Young Date: Thu Jan 4 16:17:45 2018 -0800 mm: check pfn_valid first in zero_resv_unavail With latest kernel I get below bug while testing kdump: BUG: unable to handle kernel paging request at ffffea00034b1040 IP: zero_resv_unavail+0xbd/0x126 PGD 37b98067 P4D 37b98067 PUD 37b97067 PMD 0 Oops: 0002 [#1] SMP Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 4.15.0-rc1+ #316 Hardware name: LENOVO 20ARS1BJ02/20ARS1BJ02, BIOS GJET92WW (2.42 ) 03/03/2017 task: ffffffff81a0e4c0 task.stack: ffffffff81a00000 RIP: 0010:zero_resv_unavail+0xbd/0x126 RSP: 0000:ffffffff81a03d88 EFLAGS: 00010006 RAX: 0000000000000000 RBX: ffffea00034b1040 RCX: 0000000000000010 RDX: 0000000000000000 RSI: 0000000000000092 RDI: ffffea00034b1040 RBP: 00000000000d2c41 R08: 00000000000000c0 R09: 0000000000000a0d R10: 0000000000000002 R11: 0000000000007f01 R12: ffffffff81a03d90 R13: ffffea0000000000 R14: 0000000000000063 R15: 0000000000000062 FS: 0000000000000000(0000) GS:ffffffff81c73000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffea00034b1040 CR3: 0000000037609000 CR4: 00000000000606b0 Call Trace: ? free_area_init_nodes+0x640/0x664 ? zone_sizes_init+0x58/0x72 ? setup_arch+0xb50/0xc6c ? start_kernel+0x64/0x43d ? secondary_startup_64+0xa5/0xb0 Code: c1 e8 0c 48 39 d8 76 27 48 89 de 48 c1 e3 06 48 c7 c7 7a 87 79 81 e8 b0 c0 3e ff 4c 01 eb b9 10 00 00 00 31 c0 48 89 df 49 ff c6 ab eb bc 6a 00 49 c7 c0 f0 93 d1 81 31 d2 83 ce ff 41 54 49 RIP: zero_resv_unavail+0xbd/0x126 RSP: ffffffff81a03d88 CR2: ffffea00034b1040 ---[ end trace f5ba9e8f73c7ee26 ]--- This is introduced by commit a4a3ede2132a ("mm: zero reserved and unavailable struct pages"). The reason is some efi reserved boot ranges is not reported in E820 ram. In my case it is a bgrt buffer: efi: mem00: [Boot Data |RUN| | | | | | | |WB|WT|WC|UC] range=[0x00000000d2c41000-0x00000000d2c85fff] (0MB) Use "add_efi_memmap" can workaround the problem with another fix: http://lkml.kernel.org/r/20171130052327.GA3500@dhcp-128-65.nay.redhat.com In zero_resv_unavail it would be better to check pfn_valid first before zero the page struct. This fixes the problem and potential other similar problems. Also as Pavel Tatashin suggested checks pfn_valid at the beginning of the section. The range is backed by real memory. The memory range is efi "Boot Service Data", that means after ExitBootServices() these ranges can be used as system ram. But some of them need to be reserved, for example the bgrt image address in an acpi table, if the image memory is freed then kexec reboot will fail because kexec inherit same acpi table to initialize the driver. Link: http://lkml.kernel.org/r/20171201095048.GA3084@dhcp-128-65.nay.redhat.com Fixes: a4a3ede2132a ("mm: zero reserved and unavailable struct pages") Signed-off-by: Dave Young Cc: Michal Hocko Cc: Pavel Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 2 ++ 1 file changed, 2 insertions(+) commit 1e5476815fd7f98b888e01a0f9522b63085f96c9 Author: Thomas Gleixner Date: Thu Jan 4 22:19:04 2018 +0100 x86/tlb: Drop the _GPL from the cpu_tlbstate export The recent changes for PTI touch cpu_tlbstate from various tlb_flush inlines. cpu_tlbstate is exported as GPL symbol, so this causes a regression when building out of tree drivers for certain graphics cards. Aside of that the export was wrong since it was introduced as it should have been EXPORT_PER_CPU_SYMBOL_GPL(). Use the correct PER_CPU export and drop the _GPL to restore the previous state which allows users to utilize the cards they payed for. As always I'm really thrilled to make this kind of change to support the #friends (or however the hot hashtag of today is spelled) from that closet sauce graphics corp. Fixes: 1e02ce4cccdc ("x86: Store a per-cpu shadow copy of CR4") Fixes: 6fd166aae78c ("x86/mm: Use/Fix PCID to optimize user/kernel switches") Reported-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: Greg Kroah-Hartman Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: stable@vger.kernel.org arch/x86/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42f3bdc5dd962a5958bc024c1e1444248a6b8b4a Author: Peter Zijlstra Date: Thu Jan 4 18:07:12 2018 +0100 x86/events/intel/ds: Use the proper cache flush method for mapping ds buffers Thomas reported the following warning: BUG: using smp_processor_id() in preemptible [00000000] code: ovsdb-server/4498 caller is native_flush_tlb_single+0x57/0xc0 native_flush_tlb_single+0x57/0xc0 __set_pte_vaddr+0x2d/0x40 set_pte_vaddr+0x2f/0x40 cea_set_pte+0x30/0x40 ds_update_cea.constprop.4+0x4d/0x70 reserve_ds_buffers+0x159/0x410 x86_reserve_hardware+0x150/0x160 x86_pmu_event_init+0x3e/0x1f0 perf_try_init_event+0x69/0x80 perf_event_alloc+0x652/0x740 SyS_perf_event_open+0x3f6/0xd60 do_syscall_64+0x5c/0x190 set_pte_vaddr is used to map the ds buffers into the cpu entry area, but there are two problems with that: 1) The resulting flush is not supposed to be called in preemptible context 2) The cpu entry area is supposed to be per CPU, but the debug store buffers are mapped for all CPUs so these mappings need to be flushed globally. Add the necessary preemption protection across the mapping code and flush TLBs globally. Fixes: c1961a4631da ("x86/events/intel/ds: Map debug buffers in cpu_entry_area") Reported-by: Thomas Zeitlhofer Signed-off-by: Peter Zijlstra Signed-off-by: Thomas Gleixner Tested-by: Thomas Zeitlhofer Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180104170712.GB3040@hirez.programming.kicks-ass.net arch/x86/events/intel/ds.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 1dddd25125112ba49706518ac9077a1026a18f37 Author: Thomas Gleixner Date: Thu Jan 4 12:32:03 2018 +0100 x86/kaslr: Fix the vaddr_end mess vaddr_end for KASLR is only documented in the KASLR code itself and is adjusted depending on config options. So it's not surprising that a change of the memory layout causes KASLR to have the wrong vaddr_end. This can map arbitrary stuff into other areas causing hard to understand problems. Remove the whole ifdef magic and define the start of the cpu_entry_area to be the end of the KASLR vaddr range. Add documentation to that effect. Fixes: 92a0f81d8957 ("x86/cpu_entry_area: Move it out of the fixmap") Reported-by: Benjamin Gilbert Signed-off-by: Thomas Gleixner Tested-by: Benjamin Gilbert Cc: Andy Lutomirski Cc: Greg Kroah-Hartman Cc: stable Cc: Dave Hansen Cc: Peter Zijlstra Cc: Thomas Garnier , Cc: Alexander Kuleshov Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801041320360.1771@nanos Documentation/x86/x86_64/mm.txt | 6 ++++++ arch/x86/include/asm/pgtable_64_types.h | 8 +++++++- arch/x86/mm/kaslr.c | 32 +++++++++----------------------- 3 files changed, 22 insertions(+), 24 deletions(-) commit bc6fe533278e84595406546b0b44aa7db7990806 Merge: 0007b9c 30414f3 Author: Dave Airlie Date: Fri Jan 5 09:25:01 2018 +1000 Merge tag 'drm-intel-fixes-2018-01-04' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v4.15-rc7 - couple of documentation build fixes - serialize non-blocking modesets - prevent DMC from messing up GMBUS transfers - PSR regression fix * tag 'drm-intel-fixes-2018-01-04' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915: Apply Display WA #1183 on skl, kbl, and cfl docs: fix, intel_guc_loader.c has been moved to intel_guc_fw.c documentation/gpu/i915: fix docs build error after file rename drm/i915: Put all non-blocking modesets onto an ordered wq drm/i915: Disable DC states around GMBUS on GLK drm/i915/psr: Fix register name mess up. commit 0007b9cad799a7280d60b1a8a4b9462e613c6b5a Merge: dc042da 19d859a Author: Dave Airlie Date: Fri Jan 5 09:24:26 2018 +1000 Merge branch 'drm-fixes-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-fixes - backport of a DC change which fixes a greenish tint on some RV hw - properly handle kzalloc fail in ttm * 'drm-fixes-4.15' of git://people.freedesktop.org/~agd5f/linux: drm/ttm: check the return value of kzalloc drm/amd/display: call set csc_default if enable adjustment is false commit dc042da05f6d5f5ba234412e2019483e64535738 Merge: 041ea47 de0ea9a Author: Dave Airlie Date: Fri Jan 5 09:24:05 2018 +1000 Merge branch 'drm-armada-fixes-4.15' of git://git.armlinux.org.uk/~rmk/linux-arm into drm-fixes Armada fixes. * 'drm-armada-fixes-4.15' of git://git.armlinux.org.uk/~rmk/linux-arm: drm/armada: fix YUV planar format framebuffer offsets drm/armada: improve efficiency of armada_drm_plane_calc_addrs() drm/armada: fix UV swap code drm/armada: fix SRAM powerdown drm/armada: fix leak of crtc structure commit 041ea47833c150086c7b4d86844c2aad14a93e3d Merge: 30a7acd df29c9d Author: Dave Airlie Date: Fri Jan 5 09:23:35 2018 +1000 Merge tag 'omapdrm-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-fixes omapdrm fixes for 4.15 * Fix OMAP4 HDMI CEC interrupt handling and a possible buffer overflow * tag 'omapdrm-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: omapdrm/dss/hdmi4_cec: fix interrupt handling commit f2078904810373211fb15f91888fba14c01a4acc Author: Thomas Gleixner Date: Thu Jan 4 13:01:40 2018 +0100 x86/mm: Map cpu_entry_area at the same place on 4/5 level There is no reason for 4 and 5 level pagetables to have a different layout. It just makes determining vaddr_end for KASLR harder than necessary. Fixes: 92a0f81d8957 ("x86/cpu_entry_area: Move it out of the fixmap") Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Benjamin Gilbert Cc: Greg Kroah-Hartman Cc: stable Cc: Dave Hansen Cc: Peter Zijlstra Cc: Thomas Garnier , Cc: Alexander Kuleshov Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801041320360.1771@nanos Documentation/x86/x86_64/mm.txt | 7 ++++--- arch/x86/include/asm/pgtable_64_types.h | 4 ++-- arch/x86/mm/dump_pagetables.c | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) commit f5a40711fa58f1c109165a4fec6078bf2dfd2bdc Author: Andrey Ryabinin Date: Thu Dec 28 19:06:20 2017 +0300 x86/mm: Set MODULES_END to 0xffffffffff000000 Since f06bdd4001c2 ("x86/mm: Adapt MODULES_END based on fixmap section size") kasan_mem_to_shadow(MODULES_END) could be not aligned to a page boundary. So passing page unaligned address to kasan_populate_zero_shadow() have two possible effects: 1) It may leave one page hole in supposed to be populated area. After commit 21506525fb8d ("x86/kasan/64: Teach KASAN about the cpu_entry_area") that hole happens to be in the shadow covering fixmap area and leads to crash: BUG: unable to handle kernel paging request at fffffbffffe8ee04 RIP: 0010:check_memory_region+0x5c/0x190 Call Trace: memcpy+0x1f/0x50 ghes_copy_tofrom_phys+0xab/0x180 ghes_read_estatus+0xfb/0x280 ghes_notify_nmi+0x2b2/0x410 nmi_handle+0x115/0x2c0 default_do_nmi+0x57/0x110 do_nmi+0xf8/0x150 end_repeat_nmi+0x1a/0x1e Note, the crash likely disappeared after commit 92a0f81d8957, which changed kasan_populate_zero_shadow() call the way it was before commit 21506525fb8d. 2) Attempt to load module near MODULES_END will fail, because __vmalloc_node_range() called from kasan_module_alloc() will hit the WARN_ON(!pte_none(*pte)) in the vmap_pte_range() and bail out with error. To fix this we need to make kasan_mem_to_shadow(MODULES_END) page aligned which means that MODULES_END should be 8*PAGE_SIZE aligned. The whole point of commit f06bdd4001c2 was to move MODULES_END down if NR_CPUS is big, so the cpu_entry_area takes a lot of space. But since 92a0f81d8957 ("x86/cpu_entry_area: Move it out of the fixmap") the cpu_entry_area is no longer in fixmap, so we could just set MODULES_END to a fixed 8*PAGE_SIZE aligned address. Fixes: f06bdd4001c2 ("x86/mm: Adapt MODULES_END based on fixmap section size") Reported-by: Jakub Kicinski Signed-off-by: Andrey Ryabinin Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Cc: Andy Lutomirski Cc: Thomas Garnier Link: https://lkml.kernel.org/r/20171228160620.23818-1-aryabinin@virtuozzo.com Documentation/x86/x86_64/mm.txt | 5 +---- arch/x86/include/asm/pgtable_64_types.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) commit 6926e041a8920c8ec27e4e155efa760aa01551fd Author: Hauke Mehrtens Date: Wed Jan 3 23:14:21 2018 +0100 uapi/if_ether.h: prevent redefinition of struct ethhdr Musl provides its own ethhdr struct definition. Add a guard to prevent its definition of the appropriate musl header has already been included. glibc does not implement this header, but when glibc will implement this they can just define __UAPI_DEF_ETHHDR 0 to make it work with the kernel. Signed-off-by: Hauke Mehrtens Signed-off-by: David S. Miller include/uapi/linux/if_ether.h | 3 +++ include/uapi/linux/libc-compat.h | 6 ++++++ 2 files changed, 9 insertions(+) commit 7bbfe00e025240505db3e04c3b296d7c023b2a26 Author: Wei Wang Date: Wed Jan 3 14:11:59 2018 -0800 ipv6: fix general protection fault in fib6_add() In fib6_add(), pn could be NULL if fib6_add_1() failed to return a fib6 node. Checking pn != fn before accessing pn->leaf makes sure pn is not NULL. This fixes the following GPF reported by syzkaller: general protection fault: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 3201 Comm: syzkaller001778 Not tainted 4.15.0-rc5+ #151 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:fib6_add+0x736/0x15a0 net/ipv6/ip6_fib.c:1244 RSP: 0018:ffff8801c7626a70 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000020 RCX: ffffffff84794465 RDX: 0000000000000004 RSI: ffff8801d38935f0 RDI: 0000000000000282 RBP: ffff8801c7626da0 R08: 1ffff10038ec4c35 R09: 0000000000000000 R10: ffff8801c7626c68 R11: 0000000000000000 R12: 00000000fffffffe R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000009 FS: 0000000000000000(0000) GS:ffff8801db200000(0063) knlGS:0000000009b70840 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 0000000020be1000 CR3: 00000001d585a006 CR4: 00000000001606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __ip6_ins_rt+0x6c/0x90 net/ipv6/route.c:1006 ip6_route_multipath_add+0xd14/0x16c0 net/ipv6/route.c:3833 inet6_rtm_newroute+0xdc/0x160 net/ipv6/route.c:3957 rtnetlink_rcv_msg+0x733/0x1020 net/core/rtnetlink.c:4411 netlink_rcv_skb+0x21e/0x460 net/netlink/af_netlink.c:2408 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:4423 netlink_unicast_kernel net/netlink/af_netlink.c:1275 [inline] netlink_unicast+0x4e8/0x6f0 net/netlink/af_netlink.c:1301 netlink_sendmsg+0xa4a/0xe60 net/netlink/af_netlink.c:1864 sock_sendmsg_nosec net/socket.c:636 [inline] sock_sendmsg+0xca/0x110 net/socket.c:646 sock_write_iter+0x31a/0x5d0 net/socket.c:915 call_write_iter include/linux/fs.h:1772 [inline] do_iter_readv_writev+0x525/0x7f0 fs/read_write.c:653 do_iter_write+0x154/0x540 fs/read_write.c:932 compat_writev+0x225/0x420 fs/read_write.c:1246 do_compat_writev+0x115/0x220 fs/read_write.c:1267 C_SYSC_writev fs/read_write.c:1278 [inline] compat_SyS_writev+0x26/0x30 fs/read_write.c:1274 do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline] do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389 entry_SYSENTER_compat+0x54/0x63 arch/x86/entry/entry_64_compat.S:125 Reported-by: syzbot Fixes: 66f5d6ce53e6 ("ipv6: replace rwlock with rcu and spinlock in fib6_table") Signed-off-by: Wei Wang Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) commit 7d11f77f84b27cef452cee332f4e469503084737 Author: Mohamed Ghannam Date: Wed Jan 3 21:06:06 2018 +0000 RDS: null pointer dereference in rds_atomic_free_op set rm->atomic.op_active to 0 when rds_pin_pages() fails or the user supplied address is invalid, this prevents a NULL pointer usage in rds_atomic_free_op() Signed-off-by: Mohamed Ghannam Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/rdma.c | 1 + 1 file changed, 1 insertion(+) commit dfe8266b8dd10e12a731c985b725fcf7f0e537f0 Author: Sergei Shtylyov Date: Wed Jan 3 20:09:49 2018 +0300 sh_eth: fix TSU resource handling When switching the driver to the managed device API, I managed to break the case of a dual Ether devices sharing a single TSU: the 2nd Ether port wouldn't probe. Iwamatsu-san has tried to fix this but his patch was buggy and he then dropped the ball... The solution is to limit calling devm_request_mem_region() to the first of the two ports sharing the same TSU, so devm_ioremap_resource() can't be used anymore for the TSU resource... Fixes: d5e07e69218f ("sh_eth: use managed device API") Reported-by: Nobuhiro Iwamatsu Signed-off-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit e1915c8195b38393005be9b74bfa6a3a367c83b3 Merge: 00a5ae2 abb62c4 Author: Linus Torvalds Date: Thu Jan 4 11:14:36 2018 -0800 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: "Fixes this time include mostly device tree changes, as usual, the notable ones include: - A number of patches to fix most of the remaining DTC warnings that got introduced when DTC started warning about some obvious mistakes. We still have some remaining warnings that probably may have to wait until 4.16 to get fixed while we try to figure out what the correct contents should be. - On Allwinner A64, Ethernet PHYs need a fix after a mistake in coordination between patches merged through multiple branches. - Various fixes for PMICs on allwinner based boards - Two fixes for ethernet link detection on some Renesas machines - Two stability fixes for rockchip based boards Aside from device-tree, two other areas got fixes for older problems: - For TI Davinci DM365, a couple of fixes were needed to repair the MMC DMA engine support, apparently this has been broken for a while. - One important fix for all Allwinner chips with the PMIC driver as a loadable module" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (23 commits) arm64: dts: uniphier: fix gpio-ranges property of PXs3 SoC arm64: dts: renesas: ulcb: Remove renesas, no-ether-link property arm64: dts: renesas: salvator-x: Remove renesas, no-ether-link property ARM: dts: tango4: remove bogus interrupt-controller property ARM: dts: ls1021a: fix incorrect clock references ARM: dts: aspeed-g4: Correct VUART IRQ number ARM: dts: exynos: Enable Mixer node for Exynos5800 Peach Pi machine ARM: dts: sun8i: a711: Reinstate the PMIC compatible ARM: davinci: fix mmc entries in dm365's dma_slave_map ARM: dts: da850-lego-ev3: Fix battery voltage gpio ARM: davinci: Add dma_mask to dm365's eDMA device ARM: davinci: Use platform_device_register_full() to create pdev for dm365's eDMA arm64: dts: rockchip: limit rk3328-rock64 gmac speed to 100MBit for now arm64: dts: rockchip: remove vdd_log from rk3399-puma arm64: dts: orange-pi-zero-plus2: fix sdcard detect arm64: allwinner: a64-sopine: Fix to use dcdc1 regulator instead of vcc3v3 ARM: dts: sunxi: Convert to CCU index macros for HDMI controller sunxi-rsb: Include OF based modalias in device uevent ARM: dts: at91: disable the nxp,se97b SMBUS timeout on the TSE-850 arm64: dts: rockchip: fix trailing 0 in rk3328 tsadc interrupts ... commit 879626e3a52630316d817cbda7cec9a5446d1d82 Author: Jerome Brunet Date: Wed Jan 3 16:46:29 2018 +0100 net: stmmac: enable EEE in MII, GMII or RGMII only Note in the databook - Section 4.4 - EEE : " The EEE feature is not supported when the MAC is configured to use the TBI, RTBI, SMII, RMII or SGMII single PHY interface. Even if the MAC supports multiple PHY interfaces, you should activate the EEE mode only when the MAC is operating with GMII, MII, or RGMII interface." Applying this restriction solves a stability issue observed on Amlogic gxl platforms operating with RMII interface and the internal PHY. Fixes: 83bf79b6bb64 ("stmmac: disable at run-time the EEE if not supported") Signed-off-by: Jerome Brunet Tested-by: Arnaud Patard Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f428fe4a04cc339166c8bbd489789760de3a0cee Author: Andrei Vagin Date: Tue Jan 2 23:27:33 2018 -0800 rtnetlink: give a user socket to get_target_net() This function is used from two places: rtnl_dump_ifinfo and rtnl_getlink. In rtnl_getlink(), we give a request skb into get_target_net(), but in rtnl_dump_ifinfo, we give a response skb into get_target_net(). The problem here is that NETLINK_CB() isn't initialized for the response skb. In both cases we can get a user socket and give it instead of skb into get_target_net(). This bug was found by syzkaller with this call-trace: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked in: CPU: 1 PID: 3149 Comm: syzkaller140561 Not tainted 4.15.0-rc4-mm1+ #47 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__netlink_ns_capable+0x8b/0x120 net/netlink/af_netlink.c:868 RSP: 0018:ffff8801c880f348 EFLAGS: 00010206 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff8443f900 RDX: 000000000000007b RSI: ffffffff86510f40 RDI: 00000000000003d8 RBP: ffff8801c880f360 R08: 0000000000000000 R09: 1ffff10039101e4f R10: 0000000000000000 R11: 0000000000000001 R12: ffffffff86510f40 R13: 000000000000000c R14: 0000000000000004 R15: 0000000000000011 FS: 0000000001a1a880(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020151000 CR3: 00000001c9511005 CR4: 00000000001606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: netlink_ns_capable+0x26/0x30 net/netlink/af_netlink.c:886 get_target_net+0x9d/0x120 net/core/rtnetlink.c:1765 rtnl_dump_ifinfo+0x2e5/0xee0 net/core/rtnetlink.c:1806 netlink_dump+0x48c/0xce0 net/netlink/af_netlink.c:2222 __netlink_dump_start+0x4f0/0x6d0 net/netlink/af_netlink.c:2319 netlink_dump_start include/linux/netlink.h:214 [inline] rtnetlink_rcv_msg+0x7f0/0xb10 net/core/rtnetlink.c:4485 netlink_rcv_skb+0x21e/0x460 net/netlink/af_netlink.c:2441 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:4540 netlink_unicast_kernel net/netlink/af_netlink.c:1308 [inline] netlink_unicast+0x4be/0x6a0 net/netlink/af_netlink.c:1334 netlink_sendmsg+0xa4a/0xe60 net/netlink/af_netlink.c:1897 Cc: Jiri Benc Fixes: 79e1ad148c84 ("rtnetlink: use netnsid to query interface") Signed-off-by: Andrei Vagin Signed-off-by: David S. Miller net/core/rtnetlink.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fb32dd3abf7a8fc13271d0d1c45ffc66df28dd15 Author: Pravin B Shelar Date: Tue Jan 2 20:14:42 2018 -0800 MAINTAINERS: Update my email address. Signed-off-by: Pravin Shelar Signed-off-by: David S. Miller MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0856655a25476d4431005e39d606e349050066b0 Author: Loic Poulain Date: Mon Dec 11 09:52:22 2017 +0100 wcn36xx: Fix dynamic power saving Since driver does not report hardware dynamic power saving cap, this is up to the mac80211 to manage power saving timeout and state machine, using the ieee80211 config callback to report PS changes. This patch enables/disables PS mode according to the new configuration. Remove old behaviour enabling PS mode in a static way, this make the device unusable when power save is enabled since device is forced to PS regardless RX/TX traffic. Acked-by: Bjorn Andersson Signed-off-by: Loic Poulain Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/main.c | 23 ++++++++++++----------- drivers/net/wireless/ath/wcn36xx/pmc.c | 6 ++++-- 2 files changed, 16 insertions(+), 13 deletions(-) commit abb62c46d4949d44979fa647740feff3f7538799 Author: Masahiro Yamada Date: Fri Dec 29 21:15:54 2017 +0900 arm64: dts: uniphier: fix gpio-ranges property of PXs3 SoC This is probably a copy-paste mistake. The gpio-ranges of PXs3 is different from that of LD20. Fixes: 277b51e7050f ("arm64: dts: uniphier: add GPIO controller nodes") Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5fd77a3a0e408c23ab4002a57db980e46bc16e72 Author: Shuah Khan Date: Fri Dec 22 19:23:47 2017 -0700 usbip: vudc_tx: fix v_send_ret_submit() vulnerability to null xfer buffer v_send_ret_submit() handles urb with a null transfer_buffer, when it replays a packet with potential malicious data that could contain a null buffer. Add a check for the condition when actual_length > 0 and transfer_buffer is null. Signed-off-by: Shuah Khan Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vudc_tx.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit e1346fd87c71a1f61de1fe476ec8df1425ac931c Author: Shuah Khan Date: Fri Dec 22 17:00:06 2017 -0700 usbip: remove kernel addresses from usb device and urb debug msgs usbip_dump_usb_device() and usbip_dump_urb() print kernel addresses. Remove kernel addresses from usb device and urb debug msgs and improve the message content. Instead of printing parent device and bus addresses, print parent device and bus names. Signed-off-by: Shuah Khan Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/usbip_common.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit b78d830f0049ef1966dc1e0ebd1ec2a594e2cf25 Author: Shuah Khan Date: Fri Dec 22 19:23:46 2017 -0700 usbip: fix vudc_rx: harden CMD_SUBMIT path to handle malicious input Harden CMD_SUBMIT path to handle malicious input that could trigger large memory allocations. Add checks to validate transfer_buffer_length and number_of_packets to protect against bad input requesting for unbounded memory allocations. Signed-off-by: Shuah Khan Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vudc_rx.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit d84baa5a62ed1e89da0e7f78d778794d47bc80af Merge: 3bfbed8 eac6a36 Author: Arnd Bergmann Date: Thu Jan 4 17:06:25 2018 +0100 Merge tag 'sunxi-fixes-for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into fixes Pull "Allwinner fixes for 4.15" from Chen-Yu Tsai: First, one fix that adds proper regulator references for the EMAC external PHYs on A64 boards. The EMAC bindings were developed for 4.13, but reverted at the last minute. They were finalized and brought back for 4.15. However in the time between, regulator support for the A64 boards was merged. When EMAC device tree changes were reintroduced, this was not taken into account. Second, a patch that adds OF based modalias uevent for RSB slave devices. This has been missing since the introduction of RSB, and recently with PMIC regulator support introduced for the A64, has been seen affecting distributions, which have the all-important PMIC mfd drivers built as modules, which then don't get loaded. Other minor cleanups include final conversion of raw indices to CCU binding macros for sun[4567]i HDMI, cleanup of dummy regulators on the A64 SOPINE, a SD card detection polarity fix for the Orange Pi Zero Plus2, and adding a missing compatible for the PMIC on the TBS A711 tablet. * tag 'sunxi-fixes-for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sun8i: a711: Reinstate the PMIC compatible arm64: dts: orange-pi-zero-plus2: fix sdcard detect arm64: allwinner: a64-sopine: Fix to use dcdc1 regulator instead of vcc3v3 ARM: dts: sunxi: Convert to CCU index macros for HDMI controller sunxi-rsb: Include OF based modalias in device uevent arm64: allwinner: a64: add Ethernet PHY regulator for several boards commit 3bfbed8d83a5c48d6c43178402a93b90c342a8f1 Merge: fbd90b4 7d2901f Author: Arnd Bergmann Date: Thu Jan 4 17:05:06 2018 +0100 Merge tag 'renesas-fixes-for-v4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Pull "Renesas ARM Based SoC Fixes for v4.15" from Simon Horman: Vladimir Zapolskiy says: The present change is a bug fix for AVB link iteratively up/down. Steps to reproduce: - start AVB TX stream (Using aplay via MSE), - disconnect+reconnect the eth cable, - after a reconnection the eth connection goes iteratively up/down without user interaction, - this may heal after some seconds or even stay for minutes. As the documentation specifies, the "renesas,no-ether-link" option should be used when a board does not provide a proper AVB_LINK signal. There is no need for this option enabled on RCAR H3/M3 Salvator-X/XS and ULCB starter kits since the AVB_LINK is correctly handled by HW. Choosing to keep or remove the "renesas,no-ether-link" option will have impact on the code flow in the following ways: - keeping this option enabled may lead to unexpected behavior since the RX & TX are enabled/disabled directly from adjust_link function without any HW interrogation, - removing this option, the RX & TX will only be enabled/disabled after HW interrogation. The HW check is made through the LMON pin in PSR register which specifies AVB_LINK signal value (0 - at low level; 1 - at high level). In conclusion, the change is also a safety improvement because it removes the "renesas,no-ether-link" option leading to a proper way of detecting the link state based on HW interrogation and not on software heuristic. Note that DTS files for V3M Starter Kit, Draak and Eagle boards contain the same property, the files are untouched due to unavailable schematics to verify if the fix applies to these boards as well. * tag 'renesas-fixes-for-v4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: dts: renesas: ulcb: Remove renesas, no-ether-link property arm64: dts: renesas: salvator-x: Remove renesas, no-ether-link property commit 06e7e776ca4d36547e503279aeff996cbb292c16 Author: Ben Seri Date: Fri Dec 8 15:14:47 2017 +0100 Bluetooth: Prevent stack info leak from the EFS element. In the function l2cap_parse_conf_rsp and in the function l2cap_parse_conf_req the following variable is declared without initialization: struct l2cap_conf_efs efs; In addition, when parsing input configuration parameters in both of these functions, the switch case for handling EFS elements may skip the memcpy call that will write to the efs variable: ... case L2CAP_CONF_EFS: if (olen == sizeof(efs)) memcpy(&efs, (void *)val, olen); ... The olen in the above if is attacker controlled, and regardless of that if, in both of these functions the efs variable would eventually be added to the outgoing configuration request that is being built: l2cap_add_conf_opt(&ptr, L2CAP_CONF_EFS, sizeof(efs), (unsigned long) &efs); So by sending a configuration request, or response, that contains an L2CAP_CONF_EFS element, but with an element length that is not sizeof(efs) - the memcpy to the uninitialized efs variable can be avoided, and the uninitialized variable would be returned to the attacker (16 bytes). This issue has been assigned CVE-2017-1000410 Cc: Marcel Holtmann Cc: Gustavo Padovan Cc: Johan Hedberg Cc: stable Signed-off-by: Ben Seri Signed-off-by: Greg Kroah-Hartman net/bluetooth/l2cap_core.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit af8530cb4746d8e11135ae1d8d69a817feeaa91b Merge: 54e98b5 736a80b Author: David S. Miller Date: Thu Jan 4 10:47:34 2018 -0500 Merge tag 'mac80211-for-davem-2018-01-04' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Two fixes: * drop mesh frames appearing to be from ourselves * check another netlink attribute for existence ==================== Signed-off-by: David S. Miller commit 6708913750344a900f2e73bfe4a4d6dbbce4fe8d Author: Takashi Iwai Date: Thu Jan 4 16:39:27 2018 +0100 ALSA: pcm: Add missing error checks in OSS emulation plugin builder In the OSS emulation plugin builder where the frame size is parsed in the plugin chain, some places miss the possible errors returned from the plugin src_ or dst_frames callback. This patch papers over such places. Cc: Signed-off-by: Takashi Iwai sound/core/oss/pcm_plugin.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 6ebc5e8fe85286c7392f1777a3dba9e1fd6d0253 Author: Martin Lederhilger Date: Thu Dec 21 14:42:44 2017 +0000 can: ems_usb: improve error reporting for error warning and error passive This patch adds the missing CAN_ERR_CRTL to cf->can_id in case of CAN_STATE_ERROR_WARNING or CAN_STATE_ERROR_PASSIVE Signed-off-by: Martin Lederhilger Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/ems_usb.c | 1 + 1 file changed, 1 insertion(+) commit 13454c14550065fcc1705d6bd4ee6d40e057099f Author: Luu An Phu Date: Tue Jan 2 10:44:18 2018 +0700 can: flex_can: Correct the checking for frame length in flexcan_start_xmit() The flexcan_start_xmit() function compares the frame length with data register length to write frame content into data[0] and data[1] register. Data register length is 4 bytes and frame maximum length is 8 bytes. Fix the check that compares frame length with 3. Because the register length is 4. Signed-off-by: Luu An Phu Reviewed-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5b42e6607661b198d8b26a0c30969605b1bf5c7 Author: Wolfgang Grandegger Date: Wed Dec 13 19:52:23 2017 +0100 can: gs_usb: fix return value of the "set_bittiming" callback The "set_bittiming" callback treats a positive return value as error! For that reason "can_changelink()" will quit silently after setting the bittiming values without processing ctrlmode, restart-ms, etc. Signed-off-by: Wolfgang Grandegger Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/gs_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4c2951a4833e66f1bbfe65ddcd4fdcdfafe5e8f Author: Oliver Hartkopp Date: Sat Dec 2 18:48:52 2017 +0100 can: vxcan: improve handling of missing peer name attribute Picking up the patch from Serhey Popovych (commit 191cdb3822e5df6b3c8, "veth: Be more robust on network device creation when no attributes"). When the peer name attribute is not provided the former implementation tries to register the given device name twice ... which leads to -EEXIST. If only one device name is given apply an automatic generated and valid name for the peer. Cc: Serhey Popovych Signed-off-by: Oliver Hartkopp Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/vxcan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54e98b5d663fcd8e3279c2391537b1a1f7bfe344 Author: Florian Fainelli Date: Wed Jan 3 22:02:29 2018 -0800 net: dsa: b53: Turn off Broadcom tags for more switches Models such as BCM5395/97/98 and BCM53125/24/53115 and compatible require that we turn on managed mode to actually act on Broadcom tags, otherwise they just pass them through on ingress (host -> switch) and don't insert them in egress (switch -> host). Turning on managed mode is simple, but requires us to properly support ARL misses on multicast addresses which is a much more involved set of changes not suitable for a bug fix for this release. Reported-by: Jochen Friedrich Fixes: 7edc58d614d4 ("net: dsa: b53: Turn on Broadcom tags") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit d14ac576d10f865970bb1324d337e5e24d79aaf4 Author: Christian Holl Date: Wed Jan 3 19:53:02 2018 +0100 USB: serial: cp210x: add new device ID ELV ALC 8xxx This adds the ELV ALC 8xxx Battery Charging device to the list of USB IDs of drivers/usb/serial/cp210x.c Signed-off-by: Christian Holl Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 1 + 1 file changed, 1 insertion(+) commit 736a80bbfda709fb3631f5f62056f250a38e5804 Author: Johannes Berg Date: Thu Jan 4 15:51:53 2018 +0100 mac80211: mesh: drop frames appearing to be from us If there are multiple mesh stations with the same MAC address, they will both get confused and start throwing warnings. Obviously in this case nothing can actually work anyway, so just drop frames that look like they're from ourselves early on. Reported-by: Gui Iribarren Signed-off-by: Johannes Berg net/mac80211/rx.c | 2 ++ 1 file changed, 2 insertions(+) commit 3ea15452ee85754f70f3b9fa1f23165ef2e77ba7 Author: Hao Chen Date: Wed Jan 3 11:00:31 2018 +0800 nl80211: Check for the required netlink attribute presence nl80211_nan_add_func() does not check if the required attribute NL80211_NAN_FUNC_FOLLOW_UP_DEST is present when processing NL80211_CMD_ADD_NAN_FUNCTION request. This request can be issued by users with CAP_NET_ADMIN privilege and may result in NULL dereference and a system crash. Add a check for the required attribute presence. Signed-off-by: Hao Chen Signed-off-by: Johannes Berg net/wireless/nl80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 30414f3010aff95ffdb6bed7b9dce62cde94fdc7 Author: Lucas De Marchi Date: Tue Jan 2 12:18:37 2018 -0800 drm/i915: Apply Display WA #1183 on skl, kbl, and cfl Display WA #1183 was recently added to workaround "Failures when enabling DPLL0 with eDP link rate 2.16 or 4.32 GHz and CD clock frequency 308.57 or 617.14 MHz (CDCLK_CTL CD Frequency Select 10b or 11b) used in this enabling or in previous enabling." This workaround was designed to minimize the impact only to save the bad case with that link rates. But HW engineers indicated that it should be safe to apply broadly, although they were expecting the DPLL0 link rate to be unchanged on runtime. We need to cover 2 cases: when we are in fact enabling DPLL0 and when we are just changing the frequency with small differences. This is based on previous patch by Rodrigo Vivi with suggestions from Ville Syrjälä. Cc: Arthur J Runyan Cc: Ville Syrjälä Cc: Rodrigo Vivi Cc: stable@vger.kernel.org Signed-off-by: Lucas De Marchi Reviewed-by: Ville Syrjälä Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20171204232210.4958-1-lucas.demarchi@intel.com (cherry picked from commit 53421c2fe99ce16838639ad89d772d914a119a49) [ Lucas: Backport to 4.15 adding back variable that has been removed on commits not meant to be backported ] Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20180102201837.6812-1-lucas.demarchi@intel.com drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_cdclk.c | 35 ++++++++++++++++++++++++--------- drivers/gpu/drm/i915/intel_runtime_pm.c | 10 ++++++++++ 3 files changed, 38 insertions(+), 9 deletions(-) commit 2bd7b4aacdb6efa5ccd4749c365c171b884791d2 Author: Arnd Bergmann Date: Wed Jan 3 23:49:18 2018 +0100 mmc: s3mci: mark debug_regs[] as static The global array clashes with a newly added symbol of the same name: drivers/staging/ccree/cc_debugfs.o:(.data+0x0): multiple definition of `debug_regs' drivers/mmc/host/s3cmci.o:(.data+0x70): first defined here We should fix both, this one addresses the s3cmci driver by removing the symbol from the global namespace. While at it, this separates the declaration from the type definition and makes the variable const. Fixes: 9bdd203b4dc8 ("s3cmci: add debugfs support for examining driver and hardware state") Fixes: b3ec9a6736f2 ("staging: ccree: staging: ccree: replace sysfs by debugfs interface") Signed-off-by: Arnd Bergmann Signed-off-by: Ulf Hansson drivers/mmc/host/s3cmci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 121d760d0788f95619049c63449d977065cab69d Author: Zhi Wang Date: Fri Dec 29 02:50:08 2017 +0800 drm/i915/gvt: Clear the shadow page table entry after post-sync A shadow page table entry needs to be cleared after being set as post-sync. This patch fixes the recent error reported in Win7-32 test. Fixes: 2707e4446688 ("drm/i915/gvt: vGPU graphics memory virtualization") Signed-off-by: Zhi Wang CC: Stable Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a1ffa4670cb97ae3a4b3e8535d88be5f643f7c3b Author: Bart Van Assche Date: Wed Jan 3 13:39:16 2018 -0800 IB/srpt: Fix ACL lookup during login Make sure that the initiator port GUID is stored in ch->ini_guid. Note: when initiating a connection sgid and dgid members in struct sa_path_rec represent the source and destination GIDs. When accepting a connection however sgid represents the destination GID and dgid the source GID. Fixes: commit 2bce1a6d2209 ("IB/srpt: Accept GUIDs as port names") Signed-off-by: Bart Van Assche Cc: Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bec40c26041de61162f7be9d2ce548c756ce0f65 Author: Bart Van Assche Date: Wed Jan 3 13:39:15 2018 -0800 IB/srpt: Disable RDMA access by the initiator With the SRP protocol all RDMA operations are initiated by the target. Since no RDMA operations are initiated by the initiator, do not grant the initiator permission to submit RDMA reads or writes to the target. Signed-off-by: Bart Van Assche Cc: Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/srpt/ib_srpt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 00a5ae218d57741088068799b810416ac249a9ce Merge: d6bbd51 2fd9c41 Author: Linus Torvalds Date: Wed Jan 3 16:41:07 2018 -0800 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 page table isolation fixes from Thomas Gleixner: "A couple of urgent fixes for PTI: - Fix a PTE mismatch between user and kernel visible mapping of the cpu entry area (differs vs. the GLB bit) and causes a TLB mismatch MCE on older AMD K8 machines - Fix the misplaced CR3 switch in the SYSCALL compat entry code which causes access to unmapped kernel memory resulting in double faults. - Fix the section mismatch of the cpu_tss_rw percpu storage caused by using a different mechanism for declaration and definition. - Two fixes for dumpstack which help to decode entry stack issues better - Enable PTI by default in Kconfig. We should have done that earlier, but it slipped through the cracks. - Exclude AMD from the PTI enforcement. Not necessarily a fix, but if AMD is so confident that they are not affected, then we should not burden users with the overhead" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/process: Define cpu_tss_rw in same section as declaration x86/pti: Switch to kernel CR3 at early in entry_SYSCALL_compat() x86/dumpstack: Print registers for first stack frame x86/dumpstack: Fix partial register dumps x86/pti: Make sure the user/kernel PTEs match x86/cpu, x86/pti: Do not enable PTI on AMD processors x86/pti: Enable PTI by default commit ce9caf2f79a5aa170a4b6456a03db639eed9c988 Author: Stefan Schake Date: Fri Dec 29 17:05:43 2017 +0100 drm/vc4: Move IRQ enable to PM path We were calling enable_irq on bind, where it was already enabled previously by the IRQ helper. Additionally, dev->irq is not set correctly until after postinstall and so was always zero here, triggering a warning in 4.15. Fix both by moving the enable to the power management resume path, where we know there was a previous disable invocation during suspend. Fixes: 253696ccd613 ("drm/vc4: Account for interrupts in flight") Signed-off-by: Stefan Schake Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1514563543-32511-1-git-send-email-stschake@gmail.com Tested-by: Stefan Wahren Reviewed-by: Eric Anholt drivers/gpu/drm/vc4/vc4_irq.c | 3 --- drivers/gpu/drm/vc4/vc4_v3d.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) commit 2fd9c41aea47f4ad071accf94b94f94f2c4d31eb Author: Nick Desaulniers Date: Wed Jan 3 12:39:52 2018 -0800 x86/process: Define cpu_tss_rw in same section as declaration cpu_tss_rw is declared with DECLARE_PER_CPU_PAGE_ALIGNED but then defined with DEFINE_PER_CPU_SHARED_ALIGNED leading to section mismatch warnings. Use DEFINE_PER_CPU_PAGE_ALIGNED consistently. This is necessary because it's mapped to the cpu entry area and must be page aligned. [ tglx: Massaged changelog a bit ] Fixes: 1a935bc3d4ea ("x86/entry: Move SYSENTER_stack to the beginning of struct tss_struct") Suggested-by: Thomas Gleixner Signed-off-by: Nick Desaulniers Signed-off-by: Thomas Gleixner Cc: thomas.lendacky@amd.com Cc: Borislav Petkov Cc: tklauser@distanz.ch Cc: minipli@googlemail.com Cc: me@kylehuey.com Cc: namit@vmware.com Cc: luto@kernel.org Cc: jpoimboe@redhat.com Cc: tj@kernel.org Cc: cl@linux.com Cc: bp@suse.de Cc: thgarnie@google.com Cc: kirill.shutemov@linux.intel.com Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180103203954.183360-1-ndesaulniers@google.com arch/x86/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7732ba55c4b6a2da339bb12589c515830cfac2c Author: Thomas Gleixner Date: Wed Jan 3 19:52:04 2018 +0100 x86/pti: Switch to kernel CR3 at early in entry_SYSCALL_compat() The preparation for PTI which added CR3 switching to the entry code misplaced the CR3 switch in entry_SYSCALL_compat(). With PTI enabled the entry code tries to access a per cpu variable after switching to kernel GS. This fails because that variable is not mapped to user space. This results in a double fault and in the worst case a kernel crash. Move the switch ahead of the access and clobber RSP which has been saved already. Fixes: 8a09317b895f ("x86/mm/pti: Prepare the x86/entry assembly code for entry/exit CR3 switching") Reported-by: Lars Wendler Reported-by: Laura Abbott Signed-off-by: Thomas Gleixner Cc: Borislav Betkov Cc: Andy Lutomirski , Cc: Dave Hansen , Cc: Peter Zijlstra , Cc: Greg KH , , Cc: Boris Ostrovsky , Cc: Juergen Gross Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801031949200.1957@nanos arch/x86/entry/entry_64_compat.S | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit d6bbd51587ecd173958453969964fb41140b1540 Merge: 50d0f78 c0ee554 Author: Linus Torvalds Date: Wed Jan 3 11:03:07 2018 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull pid allocation bug fix from Eric Biederman: "The replacement of the pid hash table and the pid bitmap with an idr resulted in an implementation that now fails more often in low memory situations. Allowing fuzzers to observe bad behavior from a memory allocation failure during pid allocation. This is a small change to fix this by making the kernel more robust in the case of error. The non-error paths are left alone so the only danger is to the already broken error path. I have manually injected errors and verified that this new error handling works" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: pid: Handle failure to allocate the first pid in a pid namespace commit 50d0f78f5c736e974188d72bf9317971e37e69b0 Merge: b4df268 afae457 Author: Linus Torvalds Date: Wed Jan 3 10:58:56 2018 -0800 Merge branch 'afs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull afs/fscache fixes from David Howells: - Fix the default return of fscache_maybe_release_page() when a cache isn't in use - it prevents a filesystem from releasing pages. This can cause a system to OOM. - Fix a potential uninitialised variable in AFS. - Fix AFS unlink's handling of the nlink count. It needs to use the nlink manipulation functions so that inode structs of deleted inodes actually get scheduled for destruction. - Fix error handling in afs_write_end() so that the page gets unlocked and put if we can't fill the unwritten portion. * 'afs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Fix missing error handling in afs_write_end() afs: Fix unlink afs: Potential uninitialized variable in afs_extract_data() fscache: Fix the default for fscache_maybe_release_page() commit b4df268dd4031fd2f8729e7650bc516a0a5f315b Merge: e816c20 dc32b5c Author: Linus Torvalds Date: Wed Jan 3 10:56:06 2018 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull capabilities fix from James Morris. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: capabilities: fix buffer overread on very short xattr commit 820d1d5eba5e0db88432f4b19149d87523ee193c Merge: ee4aa8d bc4244c Author: David S. Miller Date: Wed Jan 3 13:49:24 2018 -0500 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2018-01-03 This series contains fixes for i40e and i40evf. Amritha removes the UDP support for big buffer cloud filters since it is not supported and having UDP enabled is a bug. Alex fixes a bug in the __i40e_chk_linearize() which did not take into account large (16K or larger) fragments that are split over 2 descriptors, which could result in a transmit hang. Jake fixes an issue where a devices own MAC address could be removed from the unicast address list, so force a check on every address sync to ensure removal does not happen. Jiri Pirko fixes the return value when a filter configuration is not supported, do not return "invalid" but return "not supported" so that the core can react correctly. ==================== Signed-off-by: David S. Miller commit ee4aa8df70fa6d76bd776c025dc0d8d746c18317 Author: Neil Horman Date: Wed Jan 3 13:09:23 2018 -0500 3c59x: fix missing dma_mapping_error check and bad ring refill logic A few spots in 3c59x missed calls to dma_mapping_error checks, casuing WARN_ONS to trigger. Clean those up. While we're at it, refactor the refill code a bit so that if skb allocation or dma mapping fails, we recycle the existing buffer. This prevents holes in the rx ring, and makes for much simpler logic Note: This is compile only tested. Ted, if you could run this and confirm that it continues to work properly, I would appreciate it, as I currently don't have access to this hardware Signed-off-by: Neil Horman CC: Steffen Klassert CC: "David S. Miller" Reported-by: tedheadster@gmail.com Signed-off-by: David S. Miller drivers/net/ethernet/3com/3c59x.c | 90 +++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 52 deletions(-) commit e816c201aed5232171f8eb80b5d46ae6516683b9 Author: Kees Cook Date: Tue Jan 2 15:21:33 2018 -0800 exec: Weaken dumpability for secureexec This is a logical revert of commit e37fdb785a5f ("exec: Use secureexec for setting dumpability") This weakens dumpability back to checking only for uid/gid changes in current (which is useless), but userspace depends on dumpability not being tied to secureexec. https://bugzilla.redhat.com/show_bug.cgi?id=1528633 Reported-by: Tom Horsley Fixes: e37fdb785a5f ("exec: Use secureexec for setting dumpability") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Linus Torvalds fs/exec.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 74c88af59fa31bc1bbb3f795b3bf2636e8b2fe2e Merge: 15962a1 ee4552a Author: David S. Miller Date: Wed Jan 3 12:21:00 2018 -0500 Merge branch 'ena-fixes' Netanel Belgazal says: ==================== bug fixes for ENA Ethernet driver Changes from V1: Revome incorrect "ena: invoke netif_carrier_off() only after netdev registered" patch This patchset contains 2 bug fixes: * handle rare race condition during MSI-X initialization * fix error processing in ena_down() ==================== Signed-off-by: David S. Miller commit ee4552aaf3fef5345199b8a82e40be7245b289fb Author: Netanel Belgazal Date: Wed Jan 3 06:17:30 2018 +0000 net: ena: fix error handling in ena_down() sequence ENA admin command queue errors are not handled as part of ena_down(). As a result, in case of error admin queue transitions to non-running state and aborts all subsequent commands including those coming from ena_up(). Reset scheduled by the driver from the timer service context would not proceed due to sharing rtnl with ena_up()/ena_down() Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 7853b49ce8e0ef6364d24512b287463841d71bd3 Author: Netanel Belgazal Date: Wed Jan 3 06:17:29 2018 +0000 net: ena: unmask MSI-X only after device initialization is completed Under certain conditions MSI-X interrupt might arrive right after it was unmasked in ena_up(). There is a chance it would be processed by the driver before device ENA_FLAG_DEV_UP flag is set. In such a case the interrupt is ignored. ENA device operates in auto-masked mode, therefore ignoring interrupt leaves it masked for good. Moving unmask of interrupt to be the last step in ena_up(). Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 15962a18284552b5ec58982ff60a5e92e0c5c92b Author: Arjun Vynipadath Date: Wed Jan 3 11:44:07 2018 +0530 cxgb4: Fix FW flash errors commit 96ac18f14a5a ("cxgb4: Add support for new flash parts") removed initialization of adapter->params.sf_fw_start causing issues while flashing firmware to card. We no longer need sf_fw_start in adapter->params as we already have macros defined for FW flash addresses. Fixes: 96ac18f14a5a ("cxgb4: Add support for new flash parts") 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/cxgb4.h | 1 - drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 17 ++++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) commit bc4244c6e33f96b48c4986ce4653df4673c6a08e Author: Jiri Pirko Date: Fri Dec 22 12:45:16 2017 +0100 i40e: flower: Fix return value for unsupported offload When filter configuration is not supported, drivers should return -EOPNOTSUPP so the core can react correctly. Fixes: 2f4b411a3d67 ("i40e: Enable cloud filters via tc-flower") Signed-off-by: Jiri Pirko Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 458867b2ca0c987445c5d9adccd1642970e1ba07 Author: Jacob Keller Date: Wed Dec 20 11:04:36 2017 -0500 i40e: don't remove netdev->dev_addr when syncing uc list In some circumstances, such as with bridging, it is possible that the stack will add a devices own MAC address to its unicast address list. If, later, the stack deletes this address, then the i40e driver will receive a request to remove this address. The driver stores its current MAC address as part of the MAC/VLAN hash array, since it is convenient and matches exactly how the hardware expects to be told which traffic to receive. This causes a problem, since for more devices, the MAC address is stored separately, and requests to delete a unicast address should not have the ability to remove the filter for the MAC address. Fix this by forcing a check on every address sync to ensure we do not remove the device address. There is a very narrow possibility of a race between .set_mac and .set_rx_mode, if we don't change netdev->dev_addr before updating our internal MAC list in .set_mac. This might be possible if .set_rx_mode is going to remove MAC "XYZ" from the list, at the same time as .set_mac changes our dev_addr to MAC "XYZ", we might possibly queue a delete, then an add in .set_mac, then queue a delete in .set_rx_mode's dev_uc_sync and then update netdev->dev_addr. We can avoid this by moving the copy into dev_addr prior to the changes to the MAC filter list. A similar race on the other side does not cause problems, as if we're changing our MAC form A to B, and we race with .set_rx_mode, it could queue a delete from A, we'd update our address, and allow the delete. This seems like a race, but in reality we're about to queue a delete of A anyways, so it would not cause any issues. A race in the initialization code is unlikely because the netdevice has not yet been fully initialized and the stack should not be adding or removing addresses yet. Note that we don't (yet) need similar code for the VF driver because it does not make use of __dev_uc_sync and __dev_mc_sync, but instead roles its own method for handling updates to the MAC/VLAN list, which already has code to protect against removal of the hardware address. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 248de22e638f10bd5bfc7624a357f940f66ba137 Author: Alexander Duyck Date: Fri Dec 8 10:55:04 2017 -0800 i40e/i40evf: Account for frags split over multiple descriptors in check linearize The original code for __i40e_chk_linearize didn't take into account the fact that if a fragment is 16K in size or larger it has to be split over 2 descriptors and the smaller of those 2 descriptors will be on the trailing edge of the transmit. As a result we can get into situations where we didn't catch requests that could result in a Tx hang. This patch takes care of that by subtracting the length of all but the trailing edge of the stale fragment before we test for sum. By doing this we can guarantee that we have all cases covered, including the case of a fragment that spans multiple descriptors. We don't need to worry about checking the inner portions of this since 12K is the maximum aligned DMA size and that is larger than any MSS will ever be since the MTU limit for jumbos is something on the order of 9K. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 26 +++++++++++++++++++++++--- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 26 +++++++++++++++++++++++--- 2 files changed, 46 insertions(+), 6 deletions(-) commit 5f0850e145434c2af1fbfb29bc23ba6ea8d1423e Merge: f1c8d37 3f38c68 Author: David S. Miller Date: Wed Jan 3 11:40:42 2018 -0500 Merge branch 'fec-clean-up-in-the-cases-of-probe-error' Fugang Duan says: ==================== net: fec: clean up in the cases of probe error The simple patches just clean up in the cases of probe error like restore dev_id and handle the defer probe when regulator is still not ready. v2: * Fabio Estevam's comment to suggest split v1 to separate patches. ==================== Signed-off-by: David S. Miller commit 3f38c683033a9a0a2738e7067f449deefabfa3ef Author: Fugang Duan Date: Wed Jan 3 10:39:30 2018 +0800 net: fec: defer probe if regulator is not ready Defer probe if regulator is not ready. E.g. some regulator is fixed regulator controlled by i2c expander gpio, the i2c device may be probed after the driver, then it should handle the case of defer probe error. Signed-off-by: Fugang Duan Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit e90f686b4358d7d7e5dbaa48b8e78c9a4e41826e Author: Fugang Duan Date: Wed Jan 3 10:39:29 2018 +0800 net: fec: restore dev_id in the cases of probe error The static variable dev_id always plus one before netdev registerred. It should restore the dev_id value in the cases of probe error. Signed-off-by: Fugang Duan Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 1 + 1 file changed, 1 insertion(+) commit 64e711ca59ef9b7873d77ef06bc174aa01af9115 Author: Amritha Nambiar Date: Fri Nov 17 15:51:47 2017 -0800 i40e: Remove UDP support for big buffer Since UDP based filters are not supported via big buffer cloud filters, remove UDP support. Also change a few return types to indicate unsupported vs invalid configuration. Signed-off-by: Amritha Nambiar Acked-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit f1c8d3720f2e6c8c2b209120678236debd0360e5 Author: William Tu Date: Tue Jan 2 14:05:19 2018 -0800 vxlan: trivial indenting fix. Fix indentation of reserved_flags2 field in vxlanhdr_gpe. Fixes: e1e5314de08b ("vxlan: implement GPE") Signed-off-by: William Tu Acked-by: Stephen Hemminger Signed-off-by: David S. Miller include/net/vxlan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79d0895140e937ba111e6420b4cd83ee75efa788 Author: Marcelo Ricardo Leitner Date: Tue Jan 2 19:44:37 2018 -0200 sctp: fix error path in sctp_stream_init syzbot noticed a NULL pointer dereference panic in sctp_stream_free() which was caused by an incomplete error handling in sctp_stream_init(). By not clearing stream->outcnt, it made a for() in sctp_stream_free() think that it had elements to free, but not, leading to the panic. As suggested by Xin Long, this patch also simplifies the error path by moving it to the only if() that uses it. See-also: https://www.spinics.net/lists/netdev/msg473756.html See-also: https://www.spinics.net/lists/netdev/msg465024.html Reported-by: syzbot Fixes: f952be79cebd ("sctp: introduce struct sctp_stream_out_ext") Signed-off-by: Marcelo Ricardo Leitner Reviewed-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/stream.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit ba77919808c6dbfc51b9ed52458c31c06197414f Merge: c095508 4110e02 Author: David S. Miller Date: Wed Jan 3 11:25:45 2018 -0500 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2018-01-02 This series contains fixes for e1000 and e1000e. Tushar Dave adds a check to the driver so that it won't attempt to disable a device that is already disabled for e1000. Benjamin Poirier provides a fix to e1000e, where a previous commit that Benjamin submitted changed the meaning of the return value for "check_for_link" for copper media and not all the instances were properly updated. Benjamin fixes the remaining instances that needed the change. ==================== Signed-off-by: David S. Miller commit c095508770aebf1b9218e77026e48345d719b17c Author: Mohamed Ghannam Date: Tue Jan 2 19:44:34 2018 +0000 RDS: Heap OOB write in rds_message_alloc_sgs() When args->nr_local is 0, nr_pages gets also 0 due some size calculation via rds_rm_size(), which is later used to allocate pages for DMA, this bug produces a heap Out-Of-Bound write access to a specific memory region. Signed-off-by: Mohamed Ghannam Signed-off-by: David S. Miller net/rds/rdma.c | 3 +++ 1 file changed, 3 insertions(+) commit c0bace798436bca0fdc221ff61143f1376a9c3de Author: Felix Janda Date: Mon Jan 1 19:33:20 2018 +0100 uapi libc compat: add fallback for unsupported libcs libc-compat.h aims to prevent symbol collisions between uapi and libc headers for each supported libc. This requires continuous coordination between them. The goal of this commit is to improve the situation for libcs (such as musl) which are not yet supported and/or do not wish to be explicitly supported, while not affecting supported libcs. More precisely, with this commit, unsupported libcs can request the suppression of any specific uapi definition by defining the correspondings _UAPI_DEF_* macro as 0. This can fix symbol collisions for them, as long as the libc headers are included before the uapi headers. Inclusion in the other order is outside the scope of this commit. All infrastructure in order to enable this fallback for unsupported libcs is already in place, except that libc-compat.h unconditionally defines all _UAPI_DEF_* macros to 1 for all unsupported libcs so that any previous definitions are ignored. In order to fix this, this commit merely makes these definitions conditional. This commit together with the musl libc commit http://git.musl-libc.org/cgit/musl/commit/?id=04983f2272382af92eb8f8838964ff944fbb8258 fixes for example the following compiler errors when is included after musl's : ./linux/in6.h:32:8: error: redefinition of 'struct in6_addr' ./linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6' ./linux/in6.h:59:8: error: redefinition of 'struct ipv6_mreq' The comments referencing glibc are still correct, but this file is not only used for glibc any more. Signed-off-by: Felix Janda Reviewed-by: Hauke Mehrtens Signed-off-by: David S. Miller include/uapi/linux/libc-compat.h | 55 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) commit 3ffdeb1a02be3086f1411a15c5b9c481fa28e21f Author: Josh Poimboeuf Date: Sun Dec 31 10:18:07 2017 -0600 x86/dumpstack: Print registers for first stack frame In the stack dump code, if the frame after the starting pt_regs is also a regs frame, the registers don't get printed. Fix that. Reported-by: Andy Lutomirski Tested-by: Alexander Tsoy Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Toralf Förster Cc: stable@vger.kernel.org Fixes: 3b3fa11bc700 ("x86/dumpstack: Print any pt_regs found on the stack") Link: http://lkml.kernel.org/r/396f84491d2f0ef64eda4217a2165f5712f6a115.1514736742.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a9cdbe72c4e8bf3b38781c317a79326e2e1a230d Author: Josh Poimboeuf Date: Sun Dec 31 10:18:06 2017 -0600 x86/dumpstack: Fix partial register dumps The show_regs_safe() logic is wrong. When there's an iret stack frame, it prints the entire pt_regs -- most of which is random stack data -- instead of just the five registers at the end. show_regs_safe() is also poorly named: the on_stack() checks aren't for safety. Rename the function to show_regs_if_on_stack() and add a comment to explain why the checks are needed. These issues were introduced with the "partial register dump" feature of the following commit: b02fcf9ba121 ("x86/unwinder: Handle stack overflows more gracefully") That patch had gone through a few iterations of development, and the above issues were artifacts from a previous iteration of the patch where 'regs' pointed directly to the iret frame rather than to the (partially empty) pt_regs. Tested-by: Alexander Tsoy Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Toralf Förster Cc: stable@vger.kernel.org Fixes: b02fcf9ba121 ("x86/unwinder: Handle stack overflows more gracefully") Link: http://lkml.kernel.org/r/5b05b8b344f59db2d3d50dbdeba92d60f2304c54.1514736742.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/unwind.h | 17 +++++++++++++---- arch/x86/kernel/dumpstack.c | 28 ++++++++++++++++++++-------- arch/x86/kernel/stacktrace.c | 2 +- 3 files changed, 34 insertions(+), 13 deletions(-) commit 52994c256df36fda9a715697431cba9daecb6b11 Author: Thomas Gleixner Date: Wed Jan 3 15:57:59 2018 +0100 x86/pti: Make sure the user/kernel PTEs match Meelis reported that his K8 Athlon64 emits MCE warnings when PTI is enabled: [Hardware Error]: Error Addr: 0x0000ffff81e000e0 [Hardware Error]: MC1 Error: L1 TLB multimatch. [Hardware Error]: cache level: L1, tx: INSN The address is in the entry area, which is mapped into kernel _AND_ user space. That's special because we switch CR3 while we are executing there. User mapping: 0xffffffff81e00000-0xffffffff82000000 2M ro PSE GLB x pmd Kernel mapping: 0xffffffff81000000-0xffffffff82000000 16M ro PSE x pmd So the K8 is complaining that the TLB entries differ. They differ in the GLB bit. Drop the GLB bit when installing the user shared mapping. Fixes: 6dc72c3cbca0 ("x86/mm/pti: Share entry text PMD") Reported-by: Meelis Roos Signed-off-by: Thomas Gleixner Tested-by: Meelis Roos Cc: Borislav Petkov Cc: Tom Lendacky Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801031407180.1957@nanos arch/x86/mm/pti.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 694d99d40972f12e59a3696effee8a376b79d7c8 Author: Tom Lendacky Date: Tue Dec 26 23:43:54 2017 -0600 x86/cpu, x86/pti: Do not enable PTI on AMD processors AMD processors are not subject to the types of attacks that the kernel page table isolation feature protects against. The AMD microarchitecture does not allow memory references, including speculative references, that access higher privileged data when running in a lesser privileged mode when that access would result in a page fault. Disable page table isolation by default on AMD processors by not setting the X86_BUG_CPU_INSECURE feature, which controls whether X86_FEATURE_PTI is set. Signed-off-by: Tom Lendacky Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Dave Hansen Cc: Andy Lutomirski Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20171227054354.20369.94587.stgit@tlendack-t1.amdoffice.net arch/x86/kernel/cpu/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 87faa0d9b43b4755ff6963a22d1fd1bee1aa3b39 Author: Thomas Gleixner Date: Wed Jan 3 15:18:44 2018 +0100 x86/pti: Enable PTI by default This really want's to be enabled by default. Users who know what they are doing can disable it either in the config or on the kernel command line. Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org security/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 81b60dbff04980a45b348c5b5eeca2713d4594ca Author: Matt Fleming Date: Wed Jan 3 09:44:17 2018 +0000 MAINTAINERS: Remove Matt Fleming as EFI co-maintainer Instate Ard Biesheuvel as the sole EFI maintainer and leave other folks as maintainers for the EFI test driver and efivarfs file system. Also add Ard Biesheuvel as the EFI test driver and efivarfs maintainer. Signed-off-by: Matt Fleming Cc: Ard Biesheuvel Cc: Ivan Hu Cc: Jeremy Kerr Cc: Linus Torvalds Cc: Matthew Garrett Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180103094417.6353-1-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar MAINTAINERS | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit f24c4d478013d82bd1b943df566fff3561d52864 Author: Ard Biesheuvel Date: Tue Jan 2 17:21:10 2018 +0000 efi/capsule-loader: Reinstate virtual capsule mapping Commit: 82c3768b8d68 ("efi/capsule-loader: Use a cached copy of the capsule header") ... refactored the capsule loading code that maps the capsule header, to avoid having to map it several times. However, as it turns out, the vmap() call we ended up removing did not just map the header, but the entire capsule image, and dropping this virtual mapping breaks capsules that are processed by the firmware immediately (i.e., without a reboot). Unfortunately, that change was part of a larger refactor that allowed a quirk to be implemented for Quark, which has a non-standard memory layout for capsules, and we have slightly painted ourselves into a corner by allowing quirk code to mangle the capsule header and memory layout. So we need to fix this without breaking Quark. Fortunately, Quark does not appear to care about the virtual mapping, and so we can simply do a partial revert of commit: 2a457fb31df6 ("efi/capsule-loader: Use page addresses rather than struct page pointers") ... and create a vmap() mapping of the entire capsule (including header) based on the reinstated struct page array, unless running on Quark, in which case we pass the capsule header copy as before. Reported-by: Ge Song Tested-by: Bryan O'Donoghue Tested-by: Ge Song Signed-off-by: Ard Biesheuvel Cc: Cc: Dave Young Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Fixes: 82c3768b8d68 ("efi/capsule-loader: Use a cached copy of the capsule header") Link: http://lkml.kernel.org/r/20180102172110.17018-3-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/platform/efi/quirks.c | 13 +++++++++- drivers/firmware/efi/capsule-loader.c | 45 ++++++++++++++++++++++++++++------- include/linux/efi.h | 4 +++- 3 files changed, 52 insertions(+), 10 deletions(-) commit 835bcec5fdf3f9e880111b482177e7e70e3596da Author: Dave Young Date: Tue Jan 2 17:21:09 2018 +0000 x86/efi: Fix kernel param add_efi_memmap regression 'add_efi_memmap' is an early param, but do_add_efi_memmap() has no chance to run because the code path is before parse_early_param(). I believe it worked when the param was introduced but probably later some other changes caused the wrong order and nobody noticed it. Move efi_memblock_x86_reserve_range() after parse_early_param() to fix it. Signed-off-by: Dave Young Signed-off-by: Matt Fleming Signed-off-by: Ard Biesheuvel Cc: Bryan O'Donoghue Cc: Ge Song Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180102172110.17018-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar arch/x86/kernel/setup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit af1be2e21203867cb958aaceed5366e2e24b88e8 Author: Vineet Gupta Date: Fri Dec 8 08:45:57 2017 -0800 ARC: handle gcc generated __builtin_trap for older compiler ARC gcc prior to GNU 2018.03 release didn't have a target specific __builtin_trap() implementation, generating default abort() call. Implement the abort() call - emulating what newer gcc does for the same, as suggested by Arnd. Acked-by: Arnd Bergmann Signed-off-by: Vineet Gupta arch/arc/kernel/traps.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f9c935db8086231a35b7f5c2a53e3f1e10f388ee Author: Jon Maloy Date: Fri Dec 29 19:48:02 2017 +0100 tipc: fix problems with multipoint-to-point flow control In commit 04d7b574b245 ("tipc: add multipoint-to-point flow control") we introduced a protocol for preventing buffer overflow when many group members try to simultaneously send messages to the same receiving member. Stress test of this mechanism has revealed a couple of related bugs: - When the receiving member receives an advertisement REMIT message from one of the senders, it will sometimes prematurely activate a pending member and send it the remitted advertisement, although the upper limit for active senders has been reached. This leads to accumulation of illegal advertisements, and eventually to messages being dropped because of receive buffer overflow. - When the receiving member leaves REMITTED state while a received message is being read, we miss to look at the pending queue, to activate the oldest pending peer. This leads to some pending senders being starved out, and never getting the opportunity to profit from the remitted advertisement. We fix the former in the function tipc_group_proto_rcv() by returning directly from the function once it becomes clear that the remitting peer cannot leave REMITTED state at that point. We fix the latter in the function tipc_group_update_rcv_win() by looking up and activate the longest pending peer when it becomes clear that the remitting peer now can leave REMITTED state. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/group.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 71891e2dab6b55a870f8f7735e44a2963860b5c6 Author: Stephen Hemminger Date: Fri Dec 29 10:02:52 2017 -0800 ethtool: do not print warning for applications using legacy API In kernel log ths message appears on every boot: "warning: `NetworkChangeNo' uses legacy ethtool link settings API, link modes are only partially reported" When ethtool link settings API changed, it started complaining about usages of old API. Ironically, the original patch was from google but the application using the legacy API is chrome. Linux ABI is fixed as much as possible. The kernel must not break it and should not complain about applications using legacy API's. This patch just removes the warning since using legacy API's in Linux is perfectly acceptable. Fixes: 3f1ac7a700d0 ("net: ethtool: add new ETHTOOL_xLINKSETTINGS API") Signed-off-by: Stephen Hemminger Signed-off-by: David Decotigny Signed-off-by: David S. Miller net/core/ethtool.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 88776c0e70be0290f8357019d844aae15edaa967 Author: Helge Deller Date: Tue Jan 2 20:36:44 2018 +0100 parisc: Fix alignment of pa_tlb_lock in assembly on 32-bit SMP kernel Qemu for PARISC reported on a 32bit SMP parisc kernel strange failures about "Not-handled unaligned insn 0x0e8011d6 and 0x0c2011c9." Those opcodes evaluate to the ldcw() assembly instruction which requires (on 32bit) an alignment of 16 bytes to ensure atomicity. As it turns out, qemu is correct and in our assembly code in entry.S and pacache.S we don't pay attention to the required alignment. This patch fixes the problem by aligning the lock offset in assembly code in the same manner as we do in our C-code. Signed-off-by: Helge Deller Cc: # v4.0+ arch/parisc/include/asm/ldcw.h | 2 ++ arch/parisc/kernel/entry.S | 13 +++++++++++-- arch/parisc/kernel/pacache.S | 9 +++++++-- 3 files changed, 20 insertions(+), 4 deletions(-) commit f8978bd95cf92f869f3d9b34c1b699f49253b8c6 Author: Leon Romanovsky Date: Mon Jan 1 13:07:15 2018 +0200 RDMA/netlink: Fix locking around __ib_get_device_by_index Holding locks is mandatory when calling __ib_device_get_by_index, otherwise there are races during the list iteration with device removal. Since the locks are static to device.c, __ib_device_get_by_index can never be called correctly by any user out side the file. Make the function static and provide a safe function that gets the correct locks and returns a kref'd pointer. Fix all callers. Fixes: e5c9469efcb1 ("RDMA/netlink: Add nldev device doit implementation") Fixes: c3f66f7b0052 ("RDMA/netlink: Implement nldev port doit callback") Fixes: 7d02f605f0dc ("RDMA/netlink: Add nldev port dumpit implementation") Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/core_priv.h | 2 +- drivers/infiniband/core/device.c | 18 ++++++++++++- drivers/infiniband/core/nldev.c | 54 ++++++++++++++++++++++++------------- 3 files changed, 54 insertions(+), 20 deletions(-) commit 28df2f83c39554d9e64cd9d2a93b8e28e24df5b7 Author: Helge Deller Date: Tue Jan 2 20:47:01 2018 +0100 parisc: Show unhashed EISA EEPROM address Fixes: ad67b74d2469d9b8 ("printk: hash addresses printed with %p") Signed-off-by: Helge Deller drivers/parisc/eisa_eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04903c06b4854d2e85f6e3c368d5d48c4ce55f09 Author: Helge Deller Date: Tue Jan 2 20:45:42 2018 +0100 parisc: Show unhashed HPA of Dino chip Fixes: ad67b74d2469d9b8 ("printk: hash addresses printed with %p") Signed-off-by: Helge Deller drivers/parisc/dino.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 63b2c373137b16d948b08cffacc6abfcf4cffea6 Author: Helge Deller Date: Tue Jan 2 20:42:59 2018 +0100 parisc: Show initial kernel memory layout unhashed Fixes: ad67b74d2469d9b8 ("printk: hash addresses printed with %p") Signed-off-by: Helge Deller arch/parisc/mm/init.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0ae60d0c4f191c4241377cc3fc5931dc90ca3bbd Author: Helge Deller Date: Tue Jan 2 20:40:21 2018 +0100 parisc: Show unhashed hardware inventory Fixes: ad67b74d2469d9b8 ("printk: hash addresses printed with %p") Signed-off-by: Helge Deller arch/parisc/kernel/drivers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19d859a7205bc59ffc38303eb25ae394f61d21dc Author: Xiongwei Song Date: Tue Jan 2 21:24:55 2018 +0800 drm/ttm: check the return value of kzalloc In the function ttm_page_alloc_init, kzalloc call is made for variable _manager, we need to check its return value, it may return NULL. Signed-off-by: Xiongwei Song Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 ++ 1 file changed, 2 insertions(+) commit 807fc072991861ff0cd7ac44267ff1dd76ef316e Author: Yue Hin Lau Date: Fri Dec 29 11:11:18 2017 +0000 drm/amd/display: call set csc_default if enable adjustment is false Fixes a greenish tint on RV displays. Signed-off-by: Yue Hin Lau Reviewed-by: Eric Bernstein Acked-by: Harry Wentland Signed-off-by: Alex Deucher [drake@endlessm.com: backport to 4.15] Signed-off-by: Daniel Drake Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 6 ++---- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 ++ drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit bd30ffc414e55194ed6149fad69a145550cb7c18 Author: SZ Lin (林上智) Date: Fri Dec 29 17:02:17 2017 +0800 NET: usb: qmi_wwan: add support for YUGA CLM920-NC5 PID 0x9625 This patch adds support for PID 0x9625 of YUGA CLM920-NC5. YUGA CLM920-NC5 needs to enable QMI_WWAN_QUIRK_DTR before QMI operation. qmicli -d /dev/cdc-wdm0 -p --dms-get-revision [/dev/cdc-wdm0] Device revision retrieved: Revision: 'CLM920_NC5-V1 1 [Oct 23 2016 19:00:00]' Signed-off-by: SZ Lin (林上智) Acked-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit 4110e02eb45ea447ec6f5459c9934de0a273fb91 Author: Benjamin Poirier Date: Mon Dec 11 16:26:40 2017 +0900 e1000e: Fix e1000_check_for_copper_link_ich8lan return value. e1000e_check_for_copper_link() and e1000_check_for_copper_link_ich8lan() are the two functions that may be assigned to mac.ops.check_for_link when phy.media_type == e1000_media_type_copper. Commit 19110cfbb34d ("e1000e: Separate signaling for link check/link up") changed the meaning of the return value of check_for_link for copper media but only adjusted the first function. This patch adjusts the second function likewise. Reported-by: Christian Hesse Reported-by: Gabriel C Link: https://bugzilla.kernel.org/show_bug.cgi?id=198047 Fixes: 19110cfbb34d ("e1000e: Separate signaling for link check/link up") Signed-off-by: Benjamin Poirier Tested-by: Aaron Brown Tested-by: Christian Hesse Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/ich8lan.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 0b76aae741abb9d16d2c0e67f8b1e766576f897d Author: Tushar Dave Date: Wed Dec 6 02:26:29 2017 +0530 e1000: fix disabling already-disabled warning This patch adds check so that driver does not disable already disabled device. [ 44.637743] advantechwdt: Unexpected close, not stopping watchdog! [ 44.997548] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input6 [ 45.013419] e1000 0000:00:03.0: disabling already-disabled device [ 45.013447] ------------[ cut here ]------------ [ 45.014868] WARNING: CPU: 1 PID: 71 at drivers/pci/pci.c:1641 pci_disable_device+0xa1/0x105: pci_disable_device at drivers/pci/pci.c:1640 [ 45.016171] CPU: 1 PID: 71 Comm: rcu_perf_shutdo Not tainted 4.14.0-01330-g3c07399 #1 [ 45.017197] task: ffff88011bee9e40 task.stack: ffffc90000860000 [ 45.017987] RIP: 0010:pci_disable_device+0xa1/0x105: pci_disable_device at drivers/pci/pci.c:1640 [ 45.018603] RSP: 0000:ffffc90000863e30 EFLAGS: 00010286 [ 45.019282] RAX: 0000000000000035 RBX: ffff88013a230008 RCX: 0000000000000000 [ 45.020182] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000203 [ 45.021084] RBP: ffff88013a3f31e8 R08: 0000000000000001 R09: 0000000000000000 [ 45.021986] R10: ffffffff827ec29c R11: 0000000000000002 R12: 0000000000000001 [ 45.022946] R13: ffff88013a230008 R14: ffff880117802b20 R15: ffffc90000863e8f [ 45.023842] FS: 0000000000000000(0000) GS:ffff88013fd00000(0000) knlGS:0000000000000000 [ 45.024863] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 45.025583] CR2: ffffc900006d4000 CR3: 000000000220f000 CR4: 00000000000006a0 [ 45.026478] Call Trace: [ 45.026811] __e1000_shutdown+0x1d4/0x1e2: __e1000_shutdown at drivers/net/ethernet/intel/e1000/e1000_main.c:5162 [ 45.027344] ? rcu_perf_cleanup+0x2a1/0x2a1: rcu_perf_shutdown at kernel/rcu/rcuperf.c:627 [ 45.027883] e1000_shutdown+0x14/0x3a: e1000_shutdown at drivers/net/ethernet/intel/e1000/e1000_main.c:5235 [ 45.028351] device_shutdown+0x110/0x1aa: device_shutdown at drivers/base/core.c:2807 [ 45.028858] kernel_power_off+0x31/0x64: kernel_power_off at kernel/reboot.c:260 [ 45.029343] rcu_perf_shutdown+0x9b/0xa7: rcu_perf_shutdown at kernel/rcu/rcuperf.c:637 [ 45.029852] ? __wake_up_common_lock+0xa2/0xa2: autoremove_wake_function at kernel/sched/wait.c:376 [ 45.030414] kthread+0x126/0x12e: kthread at kernel/kthread.c:233 [ 45.030834] ? __kthread_bind_mask+0x8e/0x8e: kthread at kernel/kthread.c:190 [ 45.031399] ? ret_from_fork+0x1f/0x30: ret_from_fork at arch/x86/entry/entry_64.S:443 [ 45.031883] ? kernel_init+0xa/0xf5: kernel_init at init/main.c:997 [ 45.032325] ret_from_fork+0x1f/0x30: ret_from_fork at arch/x86/entry/entry_64.S:443 [ 45.032777] Code: 00 48 85 ed 75 07 48 8b ab a8 00 00 00 48 8d bb 98 00 00 00 e8 aa d1 11 00 48 89 ea 48 89 c6 48 c7 c7 d8 e4 0b 82 e8 55 7d da ff <0f> ff b9 01 00 00 00 31 d2 be 01 00 00 00 48 c7 c7 f0 b1 61 82 [ 45.035222] ---[ end trace c257137b1b1976ef ]--- [ 45.037838] ACPI: Preparing to enter system sleep state S5 Signed-off-by: Tushar Dave Tested-by: Fengguang Wu Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000/e1000.h | 3 ++- drivers/net/ethernet/intel/e1000/e1000_main.c | 27 ++++++++++++++++++++++----- 2 files changed, 24 insertions(+), 6 deletions(-) commit 0b2122e4934c7783d336397864e34ee53aad0965 Author: Russell King Date: Tue Dec 26 23:15:17 2017 +0000 sfp: fix sfp-bus oops when removing socket/upstream When we remove a socket or upstream, and the other side isn't registered, we dereference a NULL pointer, causing a kernel oops. Fix this. Fixes: ce0aa27ff3f6 ("sfp: add sfp-bus to bridge between network devices and sfp cages") Signed-off-by: Russell King Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/sfp-bus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ac817f5ad066697e4d4d35ec68c974eba2c5f17a Author: Russell King Date: Tue Dec 26 23:15:12 2017 +0000 phylink: ensure we report link down when LOS asserted Although we disable the netdev carrier, we fail to report in the kernel log that the link went down. Fix this. Fixes: 9525ae83959b ("phylink: add phylink infrastructure") Signed-off-by: Russell King Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d02fd6e7d2933ede6478a15f9e4ce8a93845824e Author: Gao Feng Date: Tue Dec 26 21:44:32 2017 +0800 macvlan: Fix one possible double free Because the macvlan_uninit would free the macvlan port, so there is one double free case in macvlan_common_newlink. When the macvlan port is just created, then register_netdevice or netdev_upper_dev_link failed and they would invoke macvlan_uninit. Then it would reach the macvlan_port_destroy which triggers the double free. Signed-off-by: Gao Feng Signed-off-by: David S. Miller drivers/net/macvlan.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3bb23421a504f01551b7cb9dff0e41dbf16656b0 Author: Roi Dayan Date: Tue Dec 26 07:48:51 2017 +0200 net/sched: Fix update of lastuse in act modules implementing stats_update We need to update lastuse to to the most updated value between what is already set and the new value. If HW matching fails, i.e. because of an issue, the stats are not updated but it could be that software did match and updated lastuse. Fixes: 5712bf9c5c30 ("net/sched: act_mirred: Use passed lastuse argument") Fixes: 9fea47d93bcc ("net/sched: act_gact: Update statistics when offloaded to hardware") Signed-off-by: Roi Dayan Reviewed-by: Paul Blakey Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/act_gact.c | 2 +- net/sched/act_mirred.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b4d8ad7fd3a18e6d92d4ebe858185c704604a57d Author: Darrick J. Wong Date: Fri Dec 22 13:14:34 2017 -0800 xfs: fix s_maxbytes overflow problems Fix some integer overflow problems if offset + count happen to be large enough to cause an integer overflow. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_aops.c | 4 ++-- fs/xfs/xfs_iomap.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 3a3882ff26fbdbaf5f7e13f6a0bccfbf7121041d Author: Aliaksei Karaliou Date: Thu Dec 21 13:18:26 2017 -0800 xfs: quota: check result of register_shrinker() xfs_qm_init_quotainfo() does not check result of register_shrinker() which was tagged as __must_check recently, reported by sparse. Signed-off-by: Aliaksei Karaliou [darrick: move xfs_qm_destroy_quotainos nearer xfs_qm_init_quotainos] Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_qm.c | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-) commit 2196881566225f3c3428d1a5f847a992944daa5b Author: Aliaksei Karaliou Date: Thu Dec 21 13:18:26 2017 -0800 xfs: quota: fix missed destroy of qi_tree_lock xfs_qm_destroy_quotainfo() does not destroy quotainfo->qi_tree_lock while destroys quotainfo->qi_quotaofflock. Signed-off-by: Aliaksei Karaliou Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_qm.c | 1 + 1 file changed, 1 insertion(+) commit 16ba3defb8bd01a9464ba4820a487f5b196b455b Author: Erez Shitrit Date: Sun Dec 31 15:33:15 2017 +0200 IB/ipoib: Fix race condition in neigh creation When using enhanced mode for IPoIB, two threads may execute xmit in parallel to two different TX queues while the target is the same. In this case, both of them will add the same neighbor to the path's neigh link list and we might see the following message: list_add double add: new=ffff88024767a348, prev=ffff88024767a348... WARNING: lib/list_debug.c:31__list_add_valid+0x4e/0x70 ipoib_start_xmit+0x477/0x680 [ib_ipoib] dev_hard_start_xmit+0xb9/0x3e0 sch_direct_xmit+0xf9/0x250 __qdisc_run+0x176/0x5d0 __dev_queue_xmit+0x1f5/0xb10 __dev_queue_xmit+0x55/0xb10 Analysis: Two SKB are scheduled to be transmitted from two cores. In ipoib_start_xmit, both gets NULL when calling ipoib_neigh_get. Two calls to neigh_add_path are made. One thread takes the spin-lock and calls ipoib_neigh_alloc which creates the neigh structure, then (after the __path_find) the neigh is added to the path's neigh link list. When the second thread enters the critical section it also calls ipoib_neigh_alloc but in this case it gets the already allocated ipoib_neigh structure, which is already linked to the path's neigh link list and adds it again to the list. Which beside of triggering the list, it creates a loop in the linked list. This loop leads to endless loop inside path_rec_completion. Solution: Check list_empty(&neigh->list) before adding to the list. Add a similar fix in "ipoib_multicast.c::ipoib_mcast_send" Fixes: b63b70d87741 ('IPoIB: Use a private hash table for path lookup in xmit path') Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/ipoib/ipoib_main.c | 25 ++++++++++++++++++------- drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 5 ++++- 2 files changed, 22 insertions(+), 8 deletions(-) commit 5a371cf87e145b86efd32007e46146e78c1eff6d Author: Leon Romanovsky Date: Sun Dec 31 15:33:14 2017 +0200 IB/mlx4: Fix mlx4_ib_alloc_mr error flow ibmr.device is being set only after ib_alloc_mr() is successfully complete. Therefore, in case imlx4_mr_enable() returns with error, the error flow unwinder calls to mlx4_free_priv_pages(), which uses ibmr.device. Such usage causes to NULL dereference oops and to fix it, the IB device should be set in the mr struct earlier stage (e.g. prior to calling mlx4_free_priv_pages()). Fixes: 1b2cd0fc673c ("IB/mlx4: Support the new memory registration API") Signed-off-by: Nitzan Carmi Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx4/mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02a0d9216d4daf6a58d88642bd2da2c78c327552 Author: Oleksandr Andrushchenko Date: Tue Jan 2 09:39:25 2018 -0800 Input: xen-kbdfront - do not advertise multi-touch pressure support Some user-space applications expect multi-touch pressure on contact to be reported if it is advertised in device properties. Otherwise, such applications may treat reports not as actual touches, but hovering. Currently this is only advertised, but not reported. Fix this by not advertising that ABS_MT_PRESSURE is supported. Signed-off-by: Oleksandr Andrushchenko Signed-off-by: Andrii Chepurnyi Patchwork-Id: 10140017 Signed-off-by: Dmitry Torokhov drivers/input/misc/xen-kbdfront.c | 2 -- 1 file changed, 2 deletions(-) commit 90045fc9c78855bdc625a0ab185d97b72a937613 Author: Ido Schimmel Date: Mon Dec 25 09:05:33 2017 +0100 mlxsw: spectrum: Relax sanity checks during enslavement Since commit 25cc72a33835 ("mlxsw: spectrum: Forbid linking to devices that have uppers") the driver forbids enslavement to netdevs that already have uppers of their own, as this can result in various ordering problems. This requirement proved to be too strict for some users who need to be able to enslave ports to a bridge that already has uppers. In this case, we can allow the enslavement if the bridge is already known to us, as any configuration performed on top of the bridge was already reflected to the device. Fixes: 25cc72a33835 ("mlxsw: spectrum: Forbid linking to devices that have uppers") Signed-off-by: Ido Schimmel Reported-by: Alexander Petrovskiy Tested-by: Alexander Petrovskiy Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 11 +++++++++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++++++ 3 files changed, 17 insertions(+), 2 deletions(-) commit 8764a8267b128405cf383157d5e9a4a3735d2409 Author: Ido Schimmel Date: Mon Dec 25 08:57:35 2017 +0100 mlxsw: spectrum_router: Fix NULL pointer deref When we remove the neighbour associated with a nexthop we should always refuse to write the nexthop to the adjacency table. Regardless if it is already present in the table or not. Otherwise, we risk dereferencing the NULL pointer that was set instead of the neighbour. Fixes: a7ff87acd995 ("mlxsw: spectrum_router: Implement next-hop routing") Signed-off-by: Ido Schimmel Reported-by: Alexander Petrovskiy 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 2fa771be953a17f8e0a9c39103464c2574444c62 Author: Xin Long Date: Mon Dec 25 14:45:12 2017 +0800 ip6_tunnel: allow ip6gre dev mtu to be set below 1280 Commit 582442d6d5bc ("ipv6: Allow the MTU of ipip6 tunnel to be set below 1280") fixed a mtu setting issue. It works for ipip6 tunnel. But ip6gre dev updates the mtu also with ip6_tnl_change_mtu. Since the inner packet over ip6gre can be ipv4 and it's mtu should also be allowed to set below 1280, the same issue also exists on ip6gre. This patch is to fix it by simply changing to check if parms.proto is IPPROTO_IPV6 in ip6_tnl_change_mtu instead, to make ip6gre to go to 'else' branch. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 52a589d51f1008f62569bf89e95b26221ee76690 Author: Xin Long Date: Mon Dec 25 14:43:58 2017 +0800 geneve: update skb dst pmtu on tx path Commit a93bf0ff4490 ("vxlan: update skb dst pmtu on tx path") has fixed a performance issue caused by the change of lower dev's mtu for vxlan. The same thing needs to be done for geneve as well. Note that geneve cannot adjust it's mtu according to lower dev's mtu when creating it. The performance is very low later when netperfing over it without fixing the mtu manually. This patch could also avoid this issue. Signed-off-by: Xin Long Signed-off-by: David S. Miller drivers/net/geneve.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 23263ec86a5f44312d2899323872468752324107 Author: Eli Cooper Date: Mon Dec 25 10:43:49 2017 +0800 ip6_tunnel: disable dst caching if tunnel is dual-stack When an ip6_tunnel is in mode 'any', where the transport layer protocol can be either 4 or 41, dst_cache must be disabled. This is because xfrm policies might apply to only one of the two protocols. Caching dst would cause xfrm policies for one protocol incorrectly used for the other. Signed-off-by: Eli Cooper Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit ec35e48b286959991cdbb886f1bdeda4575c80b4 Author: Chris Mason Date: Fri Dec 15 11:58:27 2017 -0800 btrfs: fix refcount_t usage when deleting btrfs_delayed_nodes refcounts have a generic implementation and an asm optimized one. The generic version has extra debugging to make sure that once a refcount goes to zero, refcount_inc won't increase it. The btrfs delayed inode code wasn't expecting this, and we're tripping over the warnings when the generic refcounts are used. We ended up with this race: Process A Process B btrfs_get_delayed_node() spin_lock(root->inode_lock) radix_tree_lookup() __btrfs_release_delayed_node() refcount_dec_and_test(&delayed_node->refs) our refcount is now zero refcount_add(2) <--- warning here, refcount unchanged spin_lock(root->inode_lock) radix_tree_delete() With the generic refcounts, we actually warn again when process B above tries to release his refcount because refcount_add() turned into a no-op. We saw this in production on older kernels without the asm optimized refcounts. The fix used here is to use refcount_inc_not_zero() to detect when the object is in the middle of being freed and return NULL. This is almost always the right answer anyway, since we usually end up pitching the delayed_node if it didn't have fresh data in it. This also changes __btrfs_release_delayed_node() to remove the extra check for zero refcounts before radix tree deletion. btrfs_get_delayed_node() was the only path that was allowing refcounts to go from zero to one. Fixes: 6de5f18e7b0da ("btrfs: fix refcount_t usage when deleting btrfs_delayed_node") CC: # 4.12+ Signed-off-by: Chris Mason Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/delayed-inode.c | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) commit beed9263f4000c48a5c48912f26576f6fa091181 Author: Nikolay Borisov Date: Wed Dec 13 13:50:07 2017 +0200 btrfs: Fix flush bio leak Commit e0ae99941423 ("btrfs: preallocate device flush bio") reworked the way the flush bio is allocated and used. Concretely it allocates the bio in __alloc_device and then re-uses it multiple times with a very simple endio routine that just calls complete() without consuming a reference. Allocated bios by default come with a ref count of 1, which is then consumed by the endio routine (or not, in which case they should be bio_put by the caller). The way the impleementation works now is that the flush bio has a refcount of 2 and we only ever bio_put it once, leaving it to hang indefinitely. Fix this by removing the extra bio_get in __alloc_device. Fixes: e0ae99941423 ("btrfs: preallocate device flush bio") Signed-off-by: Nikolay Borisov Reviewed-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 1 - 1 file changed, 1 deletion(-) commit 55a5ec9b77106ffc05e8c40d7568432bf4696d7b Author: David S. Miller Date: Tue Jan 2 11:45:07 2018 -0500 Revert "net: core: dev_get_valid_name is now the same as dev_alloc_name_ns" This reverts commit 87c320e51519a83c496ab7bfb4e96c8f9c001e89. Changing the error return code in some situations turns out to be harmful in practice. In particular Michael Ellerman reports that DHCP fails on his powerpc machines, and this revert gets things working again. Johannes Berg agrees that this revert is the best course of action for now. Fixes: 029b6d140550 ("Revert "net: core: maybe return -EEXIST in __dev_alloc_name"") Reported-by: Michael Ellerman Signed-off-by: David S. Miller net/core/dev.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 563b5cbe334e9503ab2b234e279d500fc4f76018 Author: Robin Murphy Date: Tue Jan 2 12:33:14 2018 +0000 iommu/arm-smmu-v3: Cope with duplicated Stream IDs For PCI devices behind an aliasing PCIe-to-PCI/X bridge, the bridge alias to DevFn 0.0 on the subordinate bus may match the original RID of the device, resulting in the same SID being present in the device's fwspec twice. This causes trouble later in arm_smmu_write_strtab_ent() when we wind up visiting the STE a second time and find it already live. Avoid the issue by giving arm_smmu_install_ste_for_dev() the cleverness to skip over duplicates. It seems mildly counterintuitive compared to preventing the duplicates from existing in the first place, but since the DT and ACPI probe paths build their fwspecs differently, this is actually the cleanest and most self-contained way to deal with it. Cc: Fixes: 8f78515425da ("iommu/arm-smmu: Implement of_xlate() for SMMUv3") Reported-by: Tomasz Nowicki Tested-by: Tomasz Nowicki Tested-by: Jayachandran C. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 57d72e159b60456c8bb281736c02ddd3164037aa Author: Jean-Philippe Brucker Date: Thu Dec 14 11:03:01 2017 +0000 iommu/arm-smmu-v3: Don't free page table ops twice Kasan reports a double free when finalise_stage_fn fails: the io_pgtable ops are freed by arm_smmu_domain_finalise and then again by arm_smmu_domain_free. Prevent this by leaving pgtbl_ops empty on failure. Cc: Fixes: 48ec83bcbcf5 ("iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devices") Reviewed-by: Robin Murphy Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit af2e01da344e9f90e38d039c39385882d7364c0f Author: Markus Heiser Date: Tue Dec 12 12:38:37 2017 +0100 docs: fix, intel_guc_loader.c has been moved to intel_guc_fw.c With commit d9e2e0143c the 'GuC-specific firmware loader' doc section was removed from intel_guc_loader.c without a replacement. So lets remove it from the Kernel-doc:: .. kernel-doc:: drivers/gpu/drm/i915/intel_guc_loader.c :doc: GuC-specific firmware loader With commit e8668bbcb0 intel_guc_loader.c was renamed to to intel_guc_fw.c and to name just one, intel_guc_init_hw() was renamed to intel_guc_fw_upload(). Since we get errors in the Sphinx build like: - Error: Cannot open file ./drivers/gpu/drm/i915/intel_guc_loader.c Change the kernel-doc directive from intel_guc_loader.c to intel_guc_fw.c Signed-off-by: Markus Heiser [danvet: Rebase onto the partial fix 006c23327f8d ("documentation/gpu/i915: fix docs build error after file rename")] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1513078717-12373-1-git-send-email-markus.heiser@darmarit.de (cherry picked from commit 0132a1a5d44d2cd32a249dbe999a88c2134a6bd1) Signed-off-by: Jani Nikula Documentation/gpu/i915.rst | 3 --- 1 file changed, 3 deletions(-) commit 4aac2caff30fdef1db8403af81e79807811d22ea Author: Wei Yongjun Date: Thu Dec 28 03:46:48 2017 +0000 xen/pvcalls: use GFP_ATOMIC under spin lock A spin lock is taken here so we should use GFP_ATOMIC. Fixes: 9774c6cca266 ("xen/pvcalls: implement accept command") Signed-off-by: Wei Yongjun Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe08f34d066f4404934a509b6806db1a4f700c86 Author: Takashi Iwai Date: Mon Jan 1 09:50:50 2018 +0100 ALSA: pcm: Remove incorrect snd_BUG_ON() usages syzkaller triggered kernel warnings through PCM OSS emulation at closing a stream: WARNING: CPU: 0 PID: 3502 at sound/core/pcm_lib.c:1635 snd_pcm_hw_param_first+0x289/0x690 sound/core/pcm_lib.c:1635 Call Trace: .... snd_pcm_hw_param_near.constprop.27+0x78d/0x9a0 sound/core/oss/pcm_oss.c:457 snd_pcm_oss_change_params+0x17d3/0x3720 sound/core/oss/pcm_oss.c:969 snd_pcm_oss_make_ready+0xaa/0x130 sound/core/oss/pcm_oss.c:1128 snd_pcm_oss_sync+0x257/0x830 sound/core/oss/pcm_oss.c:1638 snd_pcm_oss_release+0x20b/0x280 sound/core/oss/pcm_oss.c:2431 __fput+0x327/0x7e0 fs/file_table.c:210 .... This happens while it tries to open and set up the aloop device concurrently. The warning above (invoked from snd_BUG_ON() macro) is to detect the unexpected logical error where snd_pcm_hw_refine() call shouldn't fail. The theory is true for the case where the hw_params config rules are static. But for an aloop device, the hw_params rule condition does vary dynamically depending on the connected target; when another device is opened and changes the parameters, the device connected in another side is also affected, and it caused the error from snd_pcm_hw_refine(). That is, the simplest "solution" for this is to remove the incorrect assumption of static rules, and treat such an error as a normal error path. As there are a couple of other places using snd_BUG_ON() incorrectly, this patch removes these spurious snd_BUG_ON() calls. Reported-by: syzbot+6f11c7e2a1b91d466432@syzkaller.appspotmail.com Cc: Signed-off-by: Takashi Iwai sound/core/oss/pcm_oss.c | 1 - sound/core/pcm_lib.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) commit 8a9bd4f8ebc6800bfc0596e28631ff6809a2f615 Author: Stefan Haberland Date: Wed Dec 6 10:30:39 2017 +0100 s390/dasd: fix wrongly assigned configuration data We store per path and per device configuration data to identify the path or device correctly. The per path configuration data might get mixed up if the original request gets into error recovery and is started with a random path mask. This would lead to a wrong identification of a path in case of a CUIR event for example. Fix by copying the path mask from the original request to the error recovery request in case it is a path verification request. Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_3990_erp.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit df29c9db8ace4497a61f3b3d33c2b8a7fd4b7b8e Author: Hans Verkuil Date: Mon Dec 4 14:32:46 2017 +0100 omapdrm/dss/hdmi4_cec: fix interrupt handling The omap4 CEC hardware cannot tell a Nack from a Low Drive from an Arbitration Lost error, so just report a Nack, which is almost certainly the reason for the error anyway. This also simplifies the implementation. The only three interrupts that need to be enabled are: Transmit Buffer Full/Empty Change event: triggered when the transmit finished successfully and cleared the buffer. Receiver FIFO Not Empty event: triggered when a message was received. Frame Retransmit Count Exceeded event: triggered when a transmit failed repeatedly, usually due to the message being Nacked. Other reasons are possible (Low Drive, Arbitration Lost) but there is no way to know. If this happens the TX buffer needs to be cleared manually. While testing various error conditions I noticed that the hardware can receive messages up to 18 bytes in total, which exceeds the legal maximum of 16. This could cause a buffer overflow, so we check for this and constrain the size to 16 bytes. The old incorrect interrupt handler could cause the CEC framework to enter into a bad state because it mis-detected the "Start Bit Irregularity event" as an ARB_LOST transmit error when it actually is a receive error which should be ignored. Signed-off-by: Hans Verkuil Reported-by: Henrik Austad Tested-by: Henrik Austad Tested-by: Hans Verkuil Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c | 46 +++++++-------------------------- 1 file changed, 9 insertions(+), 37 deletions(-) commit c1f08c419764439bfa2d3f33d2fdef9d7013fc47 Author: Randy Dunlap Date: Sun Dec 3 15:36:20 2017 -0800 documentation/gpu/i915: fix docs build error after file rename Fix documentation build errors after intel_guc_loader.c was renamed to intel_guc_fw.c. Error: Cannot open file ../drivers/gpu/drm/i915/intel_guc_loader.c WARNING: kernel-doc '../scripts/kernel-doc -rst -enable-lineno -function GuC-specific firmware loader ../drivers/gpu/drm/i915/intel_guc_loader.c' failed with return code 1 Error: Cannot open file ../drivers/gpu/drm/i915/intel_guc_loader.c Error: Cannot open file ../drivers/gpu/drm/i915/intel_guc_loader.c WARNING: kernel-doc '../scripts/kernel-doc -rst -enable-lineno -internal ../drivers/gpu/drm/i915/intel_guc_loader.c' failed with return code 2 Fixes: e8668bbcb0f9 ("drm/i915/guc: Rename intel_guc_loader.c to intel_guc_fw.c") Signed-off-by: Randy Dunlap Cc: Michal Wajdeczko Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1b214f53-47f5-bef3-f58e-8136de5678ed@infradead.org (cherry picked from commit 006c23327f8de8575508c458131b304188d426f7) Signed-off-by: Jani Nikula Documentation/gpu/i915.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eda41bdc571e5c51d817c2e8b4578d34a9e383f5 Author: Ville Syrjälä Date: Mon Nov 13 15:36:22 2017 +0200 drm/i915: Put all non-blocking modesets onto an ordered wq We have plenty of global registers and whatnot programmed without any further locking by the modeset code. Currently non-bocking modesets are allowed to execute in parallel which could corrupt said registers. To avoid the problem let's run all non-blocking modesets on an ordered workqueue. We still put page flips etc. to system_unbound_wq allowing page flips on one pipe to execute in parallel with page flips or a modeset on a another pipe (assuming no known state is shared between them, at which point they would have been added to the same atomic commit and serialized that way). Blocking modesets are already serialized with each other by connection_mutex, and thus are safe. To serialize them with non-blocking modesets we just flush the workqueue before executing blocking modesets. Cc: Daniel Vetter Cc: Maarten Lankhorst Fixes: 94f050246b42 ("drm/i915: nonblocking commit") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171113133622.8593-1-ville.syrjala@linux.intel.com Acked-by: Daniel Vetter Reviewed-by: Maarten Lankhorst (cherry picked from commit 757fffcfdffb6c0dd46c1b264091c36b4e5a86ae) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/intel_display.c | 14 +++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) commit 3488d0237f6364614f0c59d6d784bb79b11eeb92 Author: Ville Syrjälä Date: Fri Dec 8 23:37:36 2017 +0200 drm/i915: Disable DC states around GMBUS on GLK Prevent the DMC from destroying GMBUS transfers on GLK. GMBUS lives in PG1 so DC off is all we need. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171208213739.16388-1-ville.syrjala@linux.intel.com Reviewed-by: Dhinakaran Pandiyan (cherry picked from commit 156961ae7bdf6feb72778e8da83d321b273343fd) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_runtime_pm.c | 1 + 1 file changed, 1 insertion(+) commit e0093a89f2386f12cc87047b43e93c3c6e15e94e Author: Dhinakaran Pandiyan Date: Tue Dec 19 20:35:20 2017 -0800 drm/i915/psr: Fix register name mess up. Commit 77affa31722b ("drm/i915/psr: Fix compiler warnings for hsw_psr_disable()") swapped status and control registers while fixing indentation. The _ctl at the end of the status register name must have to led to this. Fixes: 77affa31722b ("drm/i915/psr: Fix compiler warnings for hsw_psr_disable()") References: https://www.mrc-cbu.cam.ac.uk/people/matt.davis/cmabridge/ Cc: Chris Wilson Cc: Rodrigo Vivi Signed-off-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20171220043520.2599-1-dhinakaran.pandiyan@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson (cherry picked from commit 14c6547d6df641d3e41fa4f4164f6e267ebfab89) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_psr.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit ecb101aed86156ec7cd71e5dca668e09146e6994 Author: John Sperbeck Date: Sun Dec 31 21:24:58 2017 -0800 powerpc/mm: Fix SEGV on mapped region to return SEGV_ACCERR The recent refactoring of the powerpc page fault handler in commit c3350602e876 ("powerpc/mm: Make bad_area* helper functions") caused access to protected memory regions to indicate SEGV_MAPERR instead of the traditional SEGV_ACCERR in the si_code field of a user-space signal handler. This can confuse debug libraries that temporarily change the protection of memory regions, and expect to use SEGV_ACCERR as an indication to restore access to a region. This commit restores the previous behavior. The following program exhibits the issue: $ ./repro read || echo "FAILED" $ ./repro write || echo "FAILED" $ ./repro exec || echo "FAILED" #include #include #include #include #include #include #include static void segv_handler(int n, siginfo_t *info, void *arg) { _exit(info->si_code == SEGV_ACCERR ? 0 : 1); } int main(int argc, char **argv) { void *p = NULL; struct sigaction act = { .sa_sigaction = segv_handler, .sa_flags = SA_SIGINFO, }; assert(argc == 2); p = mmap(NULL, getpagesize(), (strcmp(argv[1], "write") == 0) ? PROT_READ : 0, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); assert(p != MAP_FAILED); assert(sigaction(SIGSEGV, &act, NULL) == 0); if (strcmp(argv[1], "read") == 0) printf("%c", *(unsigned char *)p); else if (strcmp(argv[1], "write") == 0) *(unsigned char *)p = 0; else if (strcmp(argv[1], "exec") == 0) ((void (*)(void))p)(); return 1; /* failed to generate SEGV */ } Fixes: c3350602e876 ("powerpc/mm: Make bad_area* helper functions") Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: John Sperbeck Acked-by: Benjamin Herrenschmidt [mpe: Add commit references in change log] Signed-off-by: Michael Ellerman arch/powerpc/mm/fault.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit afae457d874860a7e299d334f59eede5f3ad4b47 Author: David Howells Date: Tue Jan 2 10:02:19 2018 +0000 afs: Fix missing error handling in afs_write_end() afs_write_end() is missing page unlock and put if afs_fill_page() fails. Reported-by: Al Viro Signed-off-by: David Howells fs/afs/write.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 440fbc3a8a694467ba641234cedb96c28ab2d5fb Author: David Howells Date: Tue Jan 2 10:02:19 2018 +0000 afs: Fix unlink Repeating creation and deletion of a file on an afs mount will run the box out of memory, e.g.: dd if=/dev/zero of=/afs/scratch/m0 bs=$((1024*1024)) count=512 rm /afs/scratch/m0 The problem seems to be that it's not properly decrementing the nlink count so that the inode can be scrapped. Note that this doesn't fix local creation followed by remote deletion. That's harder to handle and will require a separate patch as we're not told that the file has been deleted - only that the directory has changed. Reported-by: Marc Dionne Signed-off-by: David Howells fs/afs/dir.c | 37 +++++++++++++++++++++++++++++-------- fs/afs/inode.c | 4 ++++ 2 files changed, 33 insertions(+), 8 deletions(-) commit 7888da95832d50a87bbfdb9f40620ddc66f94b3c Author: Dan Carpenter Date: Tue Jan 2 10:02:19 2018 +0000 afs: Potential uninitialized variable in afs_extract_data() Smatch warns that: fs/afs/rxrpc.c:922 afs_extract_data() error: uninitialized symbol 'remote_abort'. Smatch is right that "remote_abort" might be uninitialized when we pass it to afs_set_call_complete(). I don't know if that function uses the uninitialized variable. Anyway, the comment for rxrpc_kernel_recv_data(), says that "*_abort should also be initialised to 0." and this patch does that. Signed-off-by: Dan Carpenter Signed-off-by: David Howells fs/afs/rxrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98801506552593c9b8ac11021b0cdad12cab4f6b Author: David Howells Date: Tue Jan 2 10:02:19 2018 +0000 fscache: Fix the default for fscache_maybe_release_page() Fix the default for fscache_maybe_release_page() for when the cookie isn't valid or the page isn't cached. It mustn't return false as that indicates the page cannot yet be freed. The problem with the default is that if, say, there's no cache, but a network filesystem's pages are using up almost all the available memory, a system can OOM because the filesystem ->releasepage() op will not allow them to be released as fscache_maybe_release_page() incorrectly prevents it. This can be tested by writing a sequence of 512MiB files to an AFS mount. It does not affect NFS or CIFS because both of those wrap the call in a check of PG_fscache and it shouldn't bother Ceph as that only has PG_private set whilst writeback is in progress. This might be an issue for 9P, however. Note that the pages aren't entirely stuck. Removing a file or unmounting will clear things because that uses ->invalidatepage() instead. Fixes: 201a15428bd5 ("FS-Cache: Handle pages pending storage that get evicted under OOM conditions") Reported-by: Marc Dionne Signed-off-by: David Howells Reviewed-by: Jeff Layton Acked-by: Al Viro Tested-by: Marc Dionne cc: stable@vger.kernel.org # 2.6.32+ include/linux/fscache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc32b5c3e6e2ef29cef76d9ce1b92d394446150e Author: Eric Biggers Date: Mon Jan 1 09:28:31 2018 -0600 capabilities: fix buffer overread on very short xattr If userspace attempted to set a "security.capability" xattr shorter than 4 bytes (e.g. 'setfattr -n security.capability -v x file'), then cap_convert_nscap() read past the end of the buffer containing the xattr value because it accessed the ->magic_etc field without verifying that the xattr value is long enough to contain that field. Fix it by validating the xattr value size first. This bug was found using syzkaller with KASAN. The KASAN report was as follows (cleaned up slightly): BUG: KASAN: slab-out-of-bounds in cap_convert_nscap+0x514/0x630 security/commoncap.c:498 Read of size 4 at addr ffff88002d8741c0 by task syz-executor1/2852 CPU: 0 PID: 2852 Comm: syz-executor1 Not tainted 4.15.0-rc6-00200-gcc0aac99d977 #253 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-20171110_100015-anatol 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xe3/0x195 lib/dump_stack.c:53 print_address_description+0x73/0x260 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x235/0x350 mm/kasan/report.c:409 cap_convert_nscap+0x514/0x630 security/commoncap.c:498 setxattr+0x2bd/0x350 fs/xattr.c:446 path_setxattr+0x168/0x1b0 fs/xattr.c:472 SYSC_setxattr fs/xattr.c:487 [inline] SyS_setxattr+0x36/0x50 fs/xattr.c:483 entry_SYSCALL_64_fastpath+0x18/0x85 Fixes: 8db6c34f1dbc ("Introduce v3 namespaced file capabilities") Cc: # v4.14+ Signed-off-by: Eric Biggers Reviewed-by: Serge Hallyn Signed-off-by: James Morris security/commoncap.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 4307413256ac1e09b8f53e8715af3df9e49beec3 Author: Diego Elio Pettenò Date: Fri Dec 29 09:54:25 2017 +0000 USB: serial: cp210x: add IDs for LifeScan OneTouch Verio IQ Add IDs for the OneTouch Verio IQ that comes with an embedded USB-to-serial converter. Signed-off-by: Diego Elio Pettenò Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/cp210x.c | 1 + 1 file changed, 1 insertion(+) commit 30a7acd573899fd8b8ac39236eff6468b195ac7d Author: Linus Torvalds Date: Sun Dec 31 14:47:43 2017 -0800 Linux 4.15-rc6 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f39d7d78b70e0f39facb1e4fab77ad3df5c52a35 Merge: 52c90f2 a31e58e Author: Linus Torvalds Date: Sun Dec 31 13:13:56 2017 -0800 Merge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A couple of fixlets for x86: - Fix the ESPFIX double fault handling for 5-level pagetables - Fix the commandline parsing for 'apic=' on 32bit systems and update documentation - Make zombie stack traces reliable - Fix kexec with stack canary - Fix the delivery mode for APICs which was missed when the x86 vector management was converted to single target delivery. Caused a regression due to the broken hardware which ignores affinity settings in lowest prio delivery mode. - Unbreak modules when AMD memory encryption is enabled - Remove an unused parameter of prepare_switch_to" * 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/apic: Switch all APICs to Fixed delivery mode x86/apic: Update the 'apic=' description of setting APIC driver x86/apic: Avoid wrong warning when parsing 'apic=' in X86-32 case x86-32: Fix kexec with stack canary (CONFIG_CC_STACKPROTECTOR) x86: Remove unused parameter of prepare_switch_to x86/stacktrace: Make zombie stack traces reliable x86/mm: Unbreak modules that use the DMA API x86/build: Make isoimage work on Debian x86/espfix/64: Fix espfix double-fault handling on 5-level systems commit 52c90f2d32bfa7d6eccd66a56c44ace1f78fbadd Merge: cea92e8 7f41419 Author: Linus Torvalds Date: Sun Dec 31 13:03:05 2017 -0800 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 page table isolation fixes from Thomas Gleixner: "Four patches addressing the PTI fallout as discussed and debugged yesterday: - Remove stale and pointless TLB flush invocations from the hotplug code - Remove stale preempt_disable/enable from __native_flush_tlb() - Plug the memory leak in the write_ldt() error path" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ldt: Make LDT pgtable free conditional x86/ldt: Plug memory leak in error path x86/mm: Remove preempt_disable/enable() from __native_flush_tlb() x86/smpboot: Remove stale TLB flush invocations commit cea92e843e40452c08ba313abc39f59efbb4c29c Merge: 8d517bd 9f4533c Author: Linus Torvalds Date: Sun Dec 31 12:30:34 2017 -0800 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 pile of fixes for long standing issues with the timer wheel and the NOHZ code: - Prevent timer base confusion accross the nohz switch, which can cause unlocked access and data corruption - Reinitialize the stale base clock on cpu hotplug to prevent subtle side effects including rollovers on 32bit - Prevent an interrupt storm when the timer softirq is already pending caused by tick_nohz_stop_sched_tick() - Move the timer start tracepoint to a place where it actually makes sense - Add documentation to timerqueue functions as they caused confusion several times now" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timerqueue: Document return values of timerqueue_add/del() timers: Invoke timer_start_debug() where it makes sense nohz: Prevent a timer interrupt storm in tick_nohz_stop_sched_tick() timers: Reinitialize per cpu bases on hotplug timers: Use deferrable base independent of base::nohz_active commit 8d517bdfb57154b8a11d7f1682ecc0f79abf8e02 Merge: 4c47031 76dc6c0 Author: Linus Torvalds Date: Sun Dec 31 12:29:02 2017 -0800 Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull smp fixlet from Thomas Gleixner: "A trivial build warning fix for newer compilers" * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Move inline keyword at the beginning of declaration commit 4c470317f91e5e684201f21e237fe444ed47c18c Merge: e7c632f d94d105 Author: Linus Torvalds Date: Sun Dec 31 12:27:19 2017 -0800 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "Three patches addressing the fallout of the CPU_ISOLATION changes especially with NO_HZ_FULL plus documentation of boot parameter dependency" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/isolation: Document boot parameters dependency on CONFIG_CPU_ISOLATION=y sched/isolation: Enable CONFIG_CPU_ISOLATION=y by default sched/isolation: Make CONFIG_NO_HZ_FULL select CONFIG_CPU_ISOLATION commit e7c632fc479a8ac28da19252d44b0bd90a2638f6 Merge: 88fa025 7ad1437 Author: Linus Torvalds Date: Sun Dec 31 11:47:24 2017 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: - plug a memory leak in the intel pmu init code - clang fixes - tooling fix to avoid including kernel headers - a fix for jvmti to generate correct debug information for inlined code - replace backtick with a regular shell function - fix the build in hardened environments * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel: Plug memory leak in intel_pmu_init() x86/asm: Allow again using asm.h when building for the 'bpf' clang target tools arch s390: Do not include header files from the kernel sources perf jvmti: Generate correct debug information for inlined code perf tools: Fix up build in hardened environments perf tools: Use shell function for perl cflags retrieval commit 88fa025d30ea97a2aae6394794bdfc31dc9423b7 Merge: 31336ed bc97623 Author: Linus Torvalds Date: Sun Dec 31 11:23:11 2017 -0800 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 rather large update after the kaisered maintainer finally found time to handle regression reports. - The larger part addresses a regression caused by the x86 vector management rework. The reservation based model does not work reliably for MSI interrupts, if they cannot be masked (yes, yet another hw engineering trainwreck). The reason is that the reservation mode assigns a dummy vector when the interrupt is allocated and switches to a real vector when the interrupt is requested. If the MSI entry cannot be masked then the initialization might raise an interrupt before the interrupt is requested, which ends up as spurious interrupt and causes device malfunction and worse. The fix is to exclude MSI interrupts which do not support masking from reservation mode and assign a real vector right away. - Extend the extra lockdep class setup for nested interrupts with a class for the recently added irq_desc::request_mutex so lockdep can differeniate and does not emit false positive warnings. - A ratelimit guard for the bad irq printout so in case a bad irq comes back immediately the system does not drown in dmesg spam" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/msi, x86/vector: Prevent reservation mode for non maskable MSI genirq/irqdomain: Rename early argument of irq_domain_activate_irq() x86/vector: Use IRQD_CAN_RESERVE flag genirq: Introduce IRQD_CAN_RESERVE flag genirq/msi: Handle reactivation only on success gpio: brcmstb: Make really use of the new lockdep class genirq: Guard handle_bad_irq log messages kernel/irq: Extend lockdep class for request mutex commit 31336ed90cdc866ac25d36851e91df532837c763 Merge: 8371e5a ce90aaf Author: Linus Torvalds Date: Sun Dec 31 10:57:10 2017 -0800 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fixes from Thomas Gleixner: "Three fixlets for objtool: - Address two segfaults related to missing parameter and clang objects - Make it compile clean with clang" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Fix seg fault with clang-compiled objects objtool: Fix seg fault caused by missing parameter objtool: Fix Clang enum conversion warning commit 8371e5a0e903f5d2a7cca4201cb97fae60dbd014 Merge: 4288e6b 8a42d3f Author: Linus Torvalds Date: Sun Dec 31 10:52:51 2017 -0800 Merge tag 'char-misc-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fixes from Greg KH: "Here are six small fixes of some of the char/misc drivers that have been sent in to resolve reported issues. Nothing major, a binder use-after-free fix, some thunderbolt bugfixes, a hyper-v bugfix, and an nvmem driver fix. All of these have been in linux-next with no reported issues for a while" * tag 'char-misc-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: nvmem: meson-mx-efuse: fix reading from an offset other than 0 binder: fix proc->files use-after-free vmbus: unregister device_obj->channels_kset thunderbolt: Mask ring interrupt properly when polling starts MAINTAINERS: Add thunderbolt.rst to the Thunderbolt driver entry thunderbolt: Make pathname to force_power shorter commit 4288e6b4dd60d2f80213de32eb7a71c4d63c0b77 Merge: 29a9b00 9b3fa47 Author: Linus Torvalds Date: Sun Dec 31 10:50:05 2017 -0800 Merge tag 'driver-core-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are two driver core fixes for 4.15-rc6, resolving some reported issues. The first is a cacheinfo fix for DT based systems to resolve a reported issue that has been around for a while, and the other is to resolve a regression in the kobject uevent code that showed up in 4.15-rc1. Both have been in linux-next for a while with no reported issues" * tag 'driver-core-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: kobject: fix suppressing modalias in uevents delivered over netlink drivers: base: cacheinfo: fix cache type for non-architected system cache commit 29a9b0008d5ddbea8a6dcfd5aecc866585f6048e Merge: bc7236f d6b246b Author: Linus Torvalds Date: Sun Dec 31 10:48:09 2017 -0800 Merge tag 'staging-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging fixes from Greg KH: "Here are three staging driver fixes for 4.15-rc6 The first resolves a bug in the lustre driver that came about due to a broken cleanup patch, due to crazy list usage in that codebase. The remaining two are ion driver fixes, finally getting the CMA interaction to work properly, resolving two regressions in that area of the code. All have been in linux-next with no reported issues for a while" * tag 'staging-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: android: ion: Fix dma direction for dma_sync_sg_for_cpu/device staging: ion: Fix ion_cma_heap allocations staging: lustre: lnet: Fix recent breakage from list_for_each conversion commit bc7236fbb864ff4bc41416ad45e997cc7f05f64e Merge: a9746e4 966031f Author: Linus Torvalds Date: Sun Dec 31 10:46:07 2017 -0800 Merge tag 'tty-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull TTY fix from Greg KH: "Here is a single tty fix for a reported issue that you wrote the patch for :) It's been in linux-next for a week or so with no reported issues" * tag 'tty-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: n_tty: fix EXTPROC vs ICANON interaction with TIOCINQ (aka FIONREAD) commit a9746e4089d6226bdd6b4463e5cdd3b4d1c94059 Merge: c0b2390 da99706 Author: Linus Torvalds Date: Sun Dec 31 10:44:00 2017 -0800 Merge tag 'usb-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY fixes from Greg KH: "Here are a number of small USB and PHY driver fixes for 4.15-rc6. Nothing major, but there are a number of regression fixes in here that resolve issues that have been reported a bunch. There are also the usual xhci fixes as well as a number of new usb serial device ids. All of these have been in linux-next for a while with no reported issues" * tag 'usb-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: xhci: Add XHCI_TRUST_TX_LENGTH for Renesas uPD720201 xhci: Fix use-after-free in xhci debugfs xhci: Fix xhci debugfs NULL pointer dereference in resume from hibernate USB: serial: ftdi_sio: add id for Airbus DS P8GR usb: Add device quirk for Logitech HD Pro Webcam C925e usb: add RESET_RESUME for ELSA MicroLink 56K usbip: fix usbip bind writing random string after command in match_busid usbip: stub_rx: fix static checker warning on unnecessary checks usbip: prevent leaking socket pointer address in messages usbip: stub: stop printing kernel pointer addresses in messages usbip: vhci: stop printing kernel pointer addresses in messages USB: Fix off by one in type-specific length check of BOS SSP capability USB: serial: option: adding support for YUGA CLM920-NC5 phy: rcar-gen3-usb2: select USB_COMMON phy: rockchip-typec: add pm_runtime_disable in err case phy: cpcap-usb: Fix platform_get_irq_byname's error checking. phy: tegra: fix device-tree node lookups USB: serial: qcserial: add Sierra Wireless EM7565 USB: serial: option: add support for Telit ME910 PID 0x1101 USB: chipidea: msm: fix ulpi-node lookup commit c0b23903f5b077effec90769d365646a8c2faae0 Author: Adam Borowski Date: Mon Dec 25 16:38:58 2017 +0100 MAINTAINERS: mark arch/blackfin/ and its gubbins as orphaned The blackfin architecture has seen no maintainer action of any kind since April 2015. No new code, no pull requests, no acks to patches, no response to mails, nothing. The web site has an expired certificate (expiration Sep 2017, issued in 2013), the mailing list sees no answers either, with one exception: https://sourceforge.net/p/adi-buildroot/mailman/adi-buildroot-devel/ > > Steven is no longer working on this for ADI. Acked by me if this works. Thanks. > > Best regards, > Aaron Wu > Analog Devices Inc. But, Aaron doesn't seem to respond to queries either. Signed-off-by: Adam Borowski Acked-by: Linus Walleij Cc: Arnd Bergmann Signed-off-by: Linus Torvalds MAINTAINERS | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 6bba94d07f70d2b36e2975b0fdefe0085ea53e09 Merge: 71ee203 59585b4 Author: Linus Torvalds Date: Sun Dec 31 10:39:22 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc bugfix from David Miller. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: repair calling incorrect hweight function from stubs commit 7f414195b0c3612acd12b4611a5fe75995cf10c7 Author: Thomas Gleixner Date: Sun Dec 31 16:52:15 2017 +0100 x86/ldt: Make LDT pgtable free conditional Andy prefers to be paranoid about the pagetable free in the error path of write_ldt(). Make it conditional and warn whenever the installment of a secondary LDT fails. Requested-by: Andy Lutomirski Signed-off-by: Thomas Gleixner arch/x86/kernel/ldt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2f10a61cee8fdb9f8da90f5db687e1862b22cf06 Author: Sabrina Dubroca Date: Sun Dec 31 16:18:56 2017 +0100 xfrm: fix rcu usage in xfrm_get_type_offload request_module can sleep, thus we cannot hold rcu_read_lock() while calling it. The function also jumps back and takes rcu_read_lock() again (in xfrm_state_get_afinfo()), resulting in an imbalance. This codepath is triggered whenever a new offloaded state is created. Fixes: ffdb5211da1c ("xfrm: Auto-load xfrm offload modules") Reported-by: syzbot+ca425f44816d749e8eb49755567a75ee48cf4a30@syzkaller.appspotmail.com Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a62d69857aab4caa43049e72fe0ed5c4a60518dd Author: Thomas Gleixner Date: Sun Dec 31 11:24:34 2017 +0100 x86/ldt: Plug memory leak in error path The error path in write_ldt() tries to free 'old_ldt' instead of the newly allocated 'new_ldt', resulting in a memory leak. It also misses to clean up a half populated LDT pagetable, which is not a leak as it gets cleaned up when the process exits. Free both the potentially half populated LDT pagetable and the newly allocated LDT struct. This can be done unconditionally because once an LDT is mapped subsequent maps will succeed, because the PTE page is already populated and the two LDTs fit into that single page. Reported-by: Mathieu Desnoyers Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Dominik Brodowski Cc: Linus Torvalds Cc: Linus Torvalds Cc: Peter Zijlstra Fixes: f55f0501cbf6 ("x86/pti: Put the LDT in its own PGD if PTI is on") Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1712311121340.1899@nanos Signed-off-by: Ingo Molnar arch/x86/kernel/ldt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit decab0888e6e14e11d53cefa85f8b3d3b45ce73c Author: Thomas Gleixner Date: Sat Dec 30 22:13:54 2017 +0100 x86/mm: Remove preempt_disable/enable() from __native_flush_tlb() The preempt_disable/enable() pair in __native_flush_tlb() was added in commit: 5cf0791da5c1 ("x86/mm: Disable preemption during CR3 read+write") ... to protect the UP variant of flush_tlb_mm_range(). That preempt_disable/enable() pair should have been added to the UP variant of flush_tlb_mm_range() instead. The UP variant was removed with commit: ce4a4e565f52 ("x86/mm: Remove the UP asm/tlbflush.h code, always use the (formerly) SMP code") ... but the preempt_disable/enable() pair stayed around. The latest change to __native_flush_tlb() in commit: 6fd166aae78c ("x86/mm: Use/Fix PCID to optimize user/kernel switches") ... added an access to a per CPU variable outside the preempt disabled regions, which makes no sense at all. __native_flush_tlb() must always be called with at least preemption disabled. Remove the preempt_disable/enable() pair and add a WARN_ON_ONCE() to catch bad callers independent of the smp_processor_id() debugging. Signed-off-by: Thomas Gleixner Cc: Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Dominik Brodowski Cc: Linus Torvalds Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20171230211829.679325424@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/tlbflush.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 322f8b8b340c824aef891342b0f5795d15e11562 Author: Thomas Gleixner Date: Sat Dec 30 22:13:53 2017 +0100 x86/smpboot: Remove stale TLB flush invocations smpboot_setup_warm_reset_vector() and smpboot_restore_warm_reset_vector() invoke local_flush_tlb() for no obvious reason. Digging in history revealed that the original code in the 2.1 era added those because the code manipulated a swapper_pg_dir pagetable entry. The pagetable manipulation was removed long ago in the 2.3 timeframe, but the TLB flush invocations stayed around forever. Remove them along with the pointless pr_debug()s which come from the same 2.1 change. Reported-by: Dominik Brodowski Signed-off-by: Thomas Gleixner Cc: Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Linus Torvalds Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20171230211829.586548655@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/smpboot.c | 9 --------- 1 file changed, 9 deletions(-) commit 71ee203389f7cb1c1927eab22b95baa01405791c Merge: efdd17f d1b8b23 Author: Linus Torvalds Date: Sat Dec 30 14:31:30 2017 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two simple fixes, both of which cause I/O hangs. The storvsc one is from the hyper-v which can hang under certain hot add/remove conditions and the other is generally, where removing a target and a device in close proximity can result in the release method being executed twice (and subsequent list and other corruption and an eventual panic)" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: storvsc: Fix scsi_cmd error assignments in storvsc_handle_error scsi: core: check for device state in __scsi_remove_target() commit ce90aaf5cde4ce057b297bb6c955caf16ef00ee6 Author: Simon Ser Date: Sat Dec 30 14:43:32 2017 -0600 objtool: Fix seg fault with clang-compiled objects Fix a seg fault which happens when an input file provided to 'objtool orc generate' doesn't have a '.shstrtab' section (for instance, object files produced by clang don't have this section). Signed-off-by: Simon Ser Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/c0f2231683e9bed40fac1f13ce2c33b8389854bc.1514666459.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/orc_gen.c | 2 ++ 1 file changed, 2 insertions(+) commit d89e426499cf36b96161bd32970d6783f1fbcb0e Author: Simon Ser Date: Sat Dec 30 14:43:31 2017 -0600 objtool: Fix seg fault caused by missing parameter Fix a seg fault when no parameter is provided to 'objtool orc'. Signed-off-by: Simon Ser Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/9172803ec7ebb72535bcd0b7f966ae96d515968e.1514666459.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/builtin-orc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit efdd17f89510531a6529e20048670bef9a073466 Merge: 3ce120b 7cb4774 Author: Linus Torvalds Date: Sat Dec 30 10:16:51 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fixes from Jiri Kosina: - two cosmetic fixes from Daniel Axtens and Hans de Goede - fix for I2C command mismatch fix for cp2112 driver from Eudean Sun * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: core: lower log level for unknown main item tags to warnings HID: holtekff: move MODULE_* parameters out of #ifdef block HID: cp2112: Fix I2C_BLOCK_DATA transactions commit 3ce120b16cc548472f80cf8644f90eda958cf1b6 Author: Linus Torvalds Date: Fri Dec 29 17:34:43 2017 -0800 kbuild: add '-fno-stack-check' to kernel build options It appears that hardened gentoo enables "-fstack-check" by default for gcc. That doesn't work _at_all_ for the kernel, because the kernel stack doesn't act like a user stack at all: it's much smaller, and it doesn't auto-expand on use. So the extra "probe one page below the stack" code generated by -fstack-check just breaks the kernel in horrible ways, causing infinite double faults etc. [ I have to say, that the particular code gcc generates looks very stupid even for user space where it works, but that's a separate issue. ] Reported-and-tested-by: Alexander Tsoy Reported-and-tested-by: Toralf Förster Cc: stable@kernel.org Cc: Dave Hansen Cc: Jiri Kosina Cc: Andy Lutomirski Signed-off-by: Linus Torvalds Makefile | 3 +++ 1 file changed, 3 insertions(+) commit 4e765b4972af7b07adcb1feb16e7a525ce1f6b28 Author: Eric Biggers Date: Fri Dec 29 18:15:23 2017 -0600 af_key: fix buffer overread in parse_exthdrs() If a message sent to a PF_KEY socket ended with an incomplete extension header (fewer than 4 bytes remaining), then parse_exthdrs() read past the end of the message, into uninitialized memory. Fix it by returning -EINVAL in this case. Reproducer: #include #include #include int main() { int sock = socket(PF_KEY, SOCK_RAW, PF_KEY_V2); char buf[17] = { 0 }; struct sadb_msg *msg = (void *)buf; msg->sadb_msg_version = PF_KEY_V2; msg->sadb_msg_type = SADB_DELETE; msg->sadb_msg_len = 2; write(sock, buf, 17); } Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Signed-off-by: Steffen Klassert net/key/af_key.c | 3 +++ 1 file changed, 3 insertions(+) commit 06b335cb51af018d5feeff5dd4fd53847ddb675a Author: Eric Biggers Date: Fri Dec 29 18:13:05 2017 -0600 af_key: fix buffer overread in verify_address_len() If a message sent to a PF_KEY socket ended with one of the extensions that takes a 'struct sadb_address' but there were not enough bytes remaining in the message for the ->sa_family member of the 'struct sockaddr' which is supposed to follow, then verify_address_len() read past the end of the message, into uninitialized memory. Fix it by returning -EINVAL in this case. This bug was found using syzkaller with KMSAN. Reproducer: #include #include #include int main() { int sock = socket(PF_KEY, SOCK_RAW, PF_KEY_V2); char buf[24] = { 0 }; struct sadb_msg *msg = (void *)buf; struct sadb_address *addr = (void *)(msg + 1); msg->sadb_msg_version = PF_KEY_V2; msg->sadb_msg_type = SADB_DELETE; msg->sadb_msg_len = 3; addr->sadb_address_len = 1; addr->sadb_address_exttype = SADB_EXT_ADDRESS_SRC; write(sock, buf, 24); } Reported-by: Alexander Potapenko Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Signed-off-by: Steffen Klassert net/key/af_key.c | 5 +++++ 1 file changed, 5 insertions(+) commit 862591bf4f519d1b8d859af720fafeaebdd0162a Author: Florian Westphal Date: Wed Dec 27 23:25:45 2017 +0100 xfrm: skip policies marked as dead while rehashing syzkaller triggered following KASAN splat: BUG: KASAN: slab-out-of-bounds in xfrm_hash_rebuild+0xdbe/0xf00 net/xfrm/xfrm_policy.c:618 read of size 2 at addr ffff8801c8e92fe4 by task kworker/1:1/23 [..] Workqueue: events xfrm_hash_rebuild [..] __asan_report_load2_noabort+0x14/0x20 mm/kasan/report.c:428 xfrm_hash_rebuild+0xdbe/0xf00 net/xfrm/xfrm_policy.c:618 process_one_work+0xbbf/0x1b10 kernel/workqueue.c:2112 worker_thread+0x223/0x1990 kernel/workqueue.c:2246 [..] The reproducer triggers: 1016 if (error) { 1017 list_move_tail(&walk->walk.all, &x->all); 1018 goto out; 1019 } in xfrm_policy_walk() via pfkey (it sets tiny rcv space, dump callback returns -ENOBUFS). In this case, *walk is located the pfkey socket struct, so this socket becomes visible in the global policy list. It looks like this is intentional -- phony walker has walk.dead set to 1 and all other places skip such "policies". Ccing original authors of the two commits that seem to expose this issue (first patch missed ->dead check, second patch adds pfkey sockets to policies dumper list). Fixes: 880a6fab8f6ba5b ("xfrm: configure policy hash table thresholds by netlink") Fixes: 12a169e7d8f4b1c ("ipsec: Put dumpers on the dump list") Cc: Herbert Xu Cc: Timo Teras Cc: Christophe Gouault Reported-by: syzbot Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 257a4b018d1b514a1cc738e3ca11b566d8f3a3d8 Author: Herbert Xu Date: Tue Dec 26 17:34:44 2017 +1100 xfrm: Forbid state updates from changing encap type Currently we allow state updates to competely replace the contents of x->encap. This is bad because on the user side ESP only sets up header lengths depending on encap_type once when the state is first created. This could result in the header lengths getting out of sync with the actual state configuration. In practice key managers will never do a state update to change the encapsulation type. Only the port numbers need to be changed as the peer NAT entry is updated. Therefore this patch adds a check in xfrm_state_update to forbid any changes to the encap_type. Signed-off-by: Herbert Xu Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 5aa90a84589282b87666f92b6c3c917c8080a9bf Merge: 6123358 9f5cb6b Author: Linus Torvalds Date: Fri Dec 29 17:02:49 2017 -0800 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 page table isolation updates from Thomas Gleixner: "This is the final set of enabling page table isolation on x86: - Infrastructure patches for handling the extra page tables. - Patches which map the various bits and pieces which are required to get in and out of user space into the user space visible page tables. - The required changes to have CR3 switching in the entry/exit code. - Optimizations for the CR3 switching along with documentation how the ASID/PCID mechanism works. - Updates to dump pagetables to cover the user space page tables for W+X scans and extra debugfs files to analyze both the kernel and the user space visible page tables The whole functionality is compile time controlled via a config switch and can be turned on/off on the command line as well" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (32 commits) x86/ldt: Make the LDT mapping RO x86/mm/dump_pagetables: Allow dumping current pagetables x86/mm/dump_pagetables: Check user space page table for WX pages x86/mm/dump_pagetables: Add page table directory to the debugfs VFS hierarchy x86/mm/pti: Add Kconfig x86/dumpstack: Indicate in Oops whether PTI is configured and enabled x86/mm: Clarify the whole ASID/kernel PCID/user PCID naming x86/mm: Use INVPCID for __native_flush_tlb_single() x86/mm: Optimize RESTORE_CR3 x86/mm: Use/Fix PCID to optimize user/kernel switches x86/mm: Abstract switching CR3 x86/mm: Allow flushing for future ASID switches x86/pti: Map the vsyscall page if needed x86/pti: Put the LDT in its own PGD if PTI is on x86/mm/64: Make a full PGD-entry size hole in the memory map x86/events/intel/ds: Map debug buffers in cpu_entry_area x86/cpu_entry_area: Add debugstore entries to cpu_entry_area x86/mm/pti: Map ESPFIX into user space x86/mm/pti: Share entry text PMD x86/entry: Align entry text section to PMD boundary ... commit 9f4533cd7334235cd4c9b9fb1b0b8791e2ba01a7 Author: Thomas Gleixner Date: Fri Dec 22 15:51:15 2017 +0100 timerqueue: Document return values of timerqueue_add/del() The return values of timerqueue_add/del() are not documented in the kernel doc comment. Add proper documentation. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Frederic Weisbecker Cc: Sebastian Siewior Cc: rt@linutronix.de Cc: Paul McKenney Cc: Anna-Maria Gleixner Link: https://lkml.kernel.org/r/20171222145337.872681338@linutronix.de lib/timerqueue.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit fd45bb77ad682be728d1002431d77b8c73342836 Author: Thomas Gleixner Date: Fri Dec 22 15:51:14 2017 +0100 timers: Invoke timer_start_debug() where it makes sense The timer start debug function is called before the proper timer base is set. As a consequence the trace data contains the stale CPU and flags values. Call the debug function after setting the new base and flags. Fixes: 500462a9de65 ("timers: Switch to a non-cascading wheel") Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Frederic Weisbecker Cc: Sebastian Siewior Cc: stable@vger.kernel.org Cc: rt@linutronix.de Cc: Paul McKenney Cc: Anna-Maria Gleixner Link: https://lkml.kernel.org/r/20171222145337.792907137@linutronix.de kernel/time/timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5d62c183f9e9df1deeea0906d099a94e8a43047a Author: Thomas Gleixner Date: Fri Dec 22 15:51:13 2017 +0100 nohz: Prevent a timer interrupt storm in tick_nohz_stop_sched_tick() The conditions in irq_exit() to invoke tick_nohz_irq_exit() which subsequently invokes tick_nohz_stop_sched_tick() are: if ((idle_cpu(cpu) && !need_resched()) || tick_nohz_full_cpu(cpu)) If need_resched() is not set, but a timer softirq is pending then this is an indication that the softirq code punted and delegated the execution to softirqd. need_resched() is not true because the current interrupted task takes precedence over softirqd. Invoking tick_nohz_irq_exit() in this case can cause an endless loop of timer interrupts because the timer wheel contains an expired timer, but softirqs are not yet executed. So it returns an immediate expiry request, which causes the timer to fire immediately again. Lather, rinse and repeat.... Prevent that by adding a check for a pending timer soft interrupt to the conditions in tick_nohz_stop_sched_tick() which avoid calling get_next_timer_interrupt(). That keeps the tick sched timer on the tick and prevents a repetitive programming of an already expired timer. Reported-by: Sebastian Siewior Signed-off-by: Thomas Gleixner Acked-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Paul McKenney Cc: Anna-Maria Gleixner Cc: Sebastian Siewior Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1712272156050.2431@nanos kernel/time/tick-sched.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 26456f87aca7157c057de65c9414b37f1ab881d1 Author: Thomas Gleixner Date: Wed Dec 27 21:37:25 2017 +0100 timers: Reinitialize per cpu bases on hotplug The timer wheel bases are not (re)initialized on CPU hotplug. That leaves them with a potentially stale clk and next_expiry valuem, which can cause trouble then the CPU is plugged. Add a prepare callback which forwards the clock, sets next_expiry to far in the future and reset the control flags to a known state. Set base->must_forward_clk so the first timer which is queued will try to forward the clock to current jiffies. Fixes: 500462a9de65 ("timers: Switch to a non-cascading wheel") Reported-by: Paul E. McKenney Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Frederic Weisbecker Cc: Sebastian Siewior Cc: Anna-Maria Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1712272152200.2431@nanos include/linux/cpuhotplug.h | 2 +- include/linux/timer.h | 4 +++- kernel/cpu.c | 4 ++-- kernel/time/timer.c | 15 +++++++++++++++ 4 files changed, 21 insertions(+), 4 deletions(-) commit ced6d5c11d3e7b342f1a80f908e6756ebd4b8ddd Author: Anna-Maria Gleixner Date: Fri Dec 22 15:51:12 2017 +0100 timers: Use deferrable base independent of base::nohz_active During boot and before base::nohz_active is set in the timer bases, deferrable timers are enqueued into the standard timer base. This works correctly as long as base::nohz_active is false. Once it base::nohz_active is set and a timer which was enqueued before that is accessed the lock selector code choses the lock of the deferred base. This causes unlocked access to the standard base and in case the timer is removed it does not clear the pending flag in the standard base bitmap which causes get_next_timer_interrupt() to return bogus values. To prevent that, the deferrable timers must be enqueued in the deferrable base, even when base::nohz_active is not set. Those deferrable timers also need to be expired unconditional. Fixes: 500462a9de65 ("timers: Switch to a non-cascading wheel") Signed-off-by: Anna-Maria Gleixner Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Sebastian Siewior Cc: stable@vger.kernel.org Cc: rt@linutronix.de Cc: Paul McKenney Link: https://lkml.kernel.org/r/20171222145337.633328378@linutronix.de kernel/time/timer.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit bc976233a872c0f20f018fb1e89264a541584e25 Author: Thomas Gleixner Date: Fri Dec 29 10:47:22 2017 +0100 genirq/msi, x86/vector: Prevent reservation mode for non maskable MSI The new reservation mode for interrupts assigns a dummy vector when the interrupt is allocated and assigns a real vector when the interrupt is requested. The reservation mode prevents vector pressure when devices with a large amount of queues/interrupts are initialized, but only a minimal subset of those queues/interrupts is actually used. This mode has an issue with MSI interrupts which cannot be masked. If the driver is not careful or the hardware emits an interrupt before the device irq is requestd by the driver then the interrupt ends up on the dummy vector as a spurious interrupt which can cause malfunction of the device or in the worst case a lockup of the machine. Change the logic for the reservation mode so that the early activation of MSI interrupts checks whether: - the device is a PCI/MSI device - the reservation mode of the underlying irqdomain is activated - PCI/MSI masking is globally enabled - the PCI/MSI device uses either MSI-X, which supports masking, or MSI with the maskbit supported. If one of those conditions is false, then clear the reservation mode flag in the irq data of the interrupt and invoke irq_domain_activate_irq() with the reserve argument cleared. In the x86 vector code, clear the can_reserve flag in the vector allocation data so a subsequent free_irq() won't create the same situation again. The interrupt stays assigned to a real vector until pci_disable_msi() is invoked and all allocations are undone. Fixes: 4900be83602b ("x86/vector/msi: Switch to global reservation mode") Reported-by: Alexandru Chirvasitu Reported-by: Andy Shevchenko Signed-off-by: Thomas Gleixner Tested-by: Alexandru Chirvasitu Tested-by: Andy Shevchenko Cc: Dou Liyang Cc: Pavel Machek Cc: Maciej W. Rozycki Cc: Mikael Pettersson Cc: Josh Poulson Cc: Mihai Costache Cc: Stephen Hemminger Cc: Marc Zyngier Cc: linux-pci@vger.kernel.org Cc: Haiyang Zhang Cc: Dexuan Cui Cc: Simon Xiao Cc: Saeed Mahameed Cc: Jork Loeser Cc: Bjorn Helgaas Cc: devel@linuxdriverproject.org Cc: KY Srinivasan Cc: Alan Cox Cc: Sakari Ailus , Cc: linux-media@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1712291406420.1899@nanos Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1712291409460.1899@nanos arch/x86/kernel/apic/vector.c | 12 +++++++++++- kernel/irq/msi.c | 37 +++++++++++++++++++++++++++++++++---- 2 files changed, 44 insertions(+), 5 deletions(-) commit 702cb0a02813299d6911b775c637906ae21b737d Author: Thomas Gleixner Date: Fri Dec 29 16:59:06 2017 +0100 genirq/irqdomain: Rename early argument of irq_domain_activate_irq() The 'early' argument of irq_domain_activate_irq() is actually used to denote reservation mode. To avoid confusion, rename it before abuse happens. No functional change. Fixes: 72491643469a ("genirq/irqdomain: Update irq_domain_ops.activate() signature") Signed-off-by: Thomas Gleixner Cc: Alexandru Chirvasitu Cc: Andy Shevchenko Cc: Dou Liyang Cc: Pavel Machek Cc: Maciej W. Rozycki Cc: Mikael Pettersson Cc: Josh Poulson Cc: Mihai Costache Cc: Stephen Hemminger Cc: Marc Zyngier Cc: linux-pci@vger.kernel.org Cc: Haiyang Zhang Cc: Dexuan Cui Cc: Simon Xiao Cc: Saeed Mahameed Cc: Jork Loeser Cc: Bjorn Helgaas Cc: devel@linuxdriverproject.org Cc: KY Srinivasan Cc: Alan Cox Cc: Sakari Ailus , Cc: linux-media@vger.kernel.org arch/x86/include/asm/irqdomain.h | 2 +- arch/x86/include/asm/trace/irq_vectors.h | 16 ++++++++-------- arch/x86/kernel/apic/io_apic.c | 2 +- arch/x86/kernel/apic/vector.c | 6 +++--- arch/x86/platform/uv/uv_irq.c | 2 +- drivers/gpio/gpio-xgene-sb.c | 2 +- drivers/iommu/amd_iommu.c | 2 +- drivers/iommu/intel_irq_remapping.c | 2 +- drivers/irqchip/irq-gic-v3-its.c | 4 ++-- drivers/pinctrl/stm32/pinctrl-stm32.c | 2 +- include/linux/irqdomain.h | 2 +- kernel/irq/internals.h | 2 +- kernel/irq/irqdomain.c | 13 +++++++------ 13 files changed, 29 insertions(+), 28 deletions(-) commit 945f50a591783ac6e9bd59694f34d1ba03b778a7 Author: Thomas Gleixner Date: Fri Dec 29 16:57:00 2017 +0100 x86/vector: Use IRQD_CAN_RESERVE flag Set the new CAN_RESERVE flag when the initial reservation for an interrupt happens. The flag is used in a subsequent patch to disable reservation mode for a certain class of MSI devices. Signed-off-by: Thomas Gleixner Tested-by: Alexandru Chirvasitu Tested-by: Andy Shevchenko Cc: Dou Liyang Cc: Pavel Machek Cc: Maciej W. Rozycki Cc: Mikael Pettersson Cc: Josh Poulson Cc: Mihai Costache Cc: Stephen Hemminger Cc: Marc Zyngier Cc: linux-pci@vger.kernel.org Cc: Haiyang Zhang Cc: Dexuan Cui Cc: Simon Xiao Cc: Saeed Mahameed Cc: Jork Loeser Cc: Bjorn Helgaas Cc: devel@linuxdriverproject.org Cc: KY Srinivasan Cc: Alan Cox Cc: Sakari Ailus , Cc: linux-media@vger.kernel.org arch/x86/kernel/apic/vector.c | 2 ++ 1 file changed, 2 insertions(+) commit 69790ba92b8d67eaee5e50b30a5b696d40664caf Author: Thomas Gleixner Date: Fri Dec 29 16:44:34 2017 +0100 genirq: Introduce IRQD_CAN_RESERVE flag Add a new flag to mark interrupts which can use reservation mode. This is going to be used in subsequent patches to disable reservation mode for a certain class of MSI devices. Signed-off-by: Thomas Gleixner Tested-by: Alexandru Chirvasitu Tested-by: Andy Shevchenko Cc: Dou Liyang Cc: Pavel Machek Cc: Maciej W. Rozycki Cc: Mikael Pettersson Cc: Josh Poulson Cc: Mihai Costache Cc: Stephen Hemminger Cc: Marc Zyngier Cc: linux-pci@vger.kernel.org Cc: Haiyang Zhang Cc: Dexuan Cui Cc: Simon Xiao Cc: Saeed Mahameed Cc: Jork Loeser Cc: Bjorn Helgaas Cc: devel@linuxdriverproject.org Cc: KY Srinivasan Cc: Alan Cox Cc: Sakari Ailus , Cc: linux-media@vger.kernel.org include/linux/irq.h | 17 +++++++++++++++++ kernel/irq/debugfs.c | 1 + 2 files changed, 18 insertions(+) commit da5dd9e854d2edd6b02ebfe28583052f922104da Author: Thomas Gleixner Date: Fri Dec 29 10:42:10 2017 +0100 genirq/msi: Handle reactivation only on success When analyzing the fallout of the x86 vector allocation rework it turned out that the error handling in msi_domain_alloc_irqs() is broken. If MSI_FLAG_MUST_REACTIVATE is set for a MSI domain then it clears the activation flag for a successfully initialized msi descriptor. If a subsequent initialization fails then the error handling code path does not deactivate the interrupt because the activation flag got cleared. Move the clearing of the activation flag outside of the initialization loop so that an eventual failure can be cleaned up correctly. Fixes: 22d0b12f3560 ("genirq/irqdomain: Add force reactivation flag to irq domains") Signed-off-by: Thomas Gleixner Tested-by: Alexandru Chirvasitu Tested-by: Andy Shevchenko Cc: Dou Liyang Cc: Pavel Machek Cc: Maciej W. Rozycki Cc: Mikael Pettersson Cc: Josh Poulson Cc: Mihai Costache Cc: Stephen Hemminger Cc: Marc Zyngier Cc: linux-pci@vger.kernel.org Cc: Haiyang Zhang Cc: Dexuan Cui Cc: Simon Xiao Cc: Saeed Mahameed Cc: Jork Loeser Cc: Bjorn Helgaas Cc: devel@linuxdriverproject.org Cc: KY Srinivasan Cc: Alan Cox Cc: Sakari Ailus , Cc: linux-media@vger.kernel.org kernel/irq/msi.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) commit 61233580f1f33c50e159c50e24d80ffd2ba2e06b Merge: 2758b3e 466a2b4 Author: Linus Torvalds Date: Fri Dec 29 11:54:15 2017 -0800 Merge tag 'pm-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "This fixes a schedutil cpufreq governor regression from the 4.14 cycle that may cause a CPU idleness check to return incorrect results in some cases which leads to suboptimal decisions (Joel Fernandes)" * tag 'pm-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: schedutil: Use idle_calls counter of the remote CPU commit 8880c13734af33635118a1e9567dadc7f9ddb7a8 Author: Thomas Gleixner Date: Fri Dec 29 16:29:15 2017 +0100 gpio: brcmstb: Make really use of the new lockdep class The recent extension of irq_set_lockdep_class() with a second argument added the new lockdep class to the mrcmstb driver, but used the already existing lockdep class as second argument, which leaves the new lockdep class defined but unused. Use the new lockdep class as that's what the change intended to do. Fixes: 39c3fd58952d ("kernel/irq: Extend lockdep class for request mutex") Reported-by: Ingo Molnar Signed-off-by: Thomas Gleixner Cc: Andrew Lunn Cc: linus.walleij@linaro.org drivers/gpio/gpio-brcmstb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a31e58e129f73ab5b04016330b13ed51fde7a961 Author: Thomas Gleixner Date: Thu Dec 28 11:33:33 2017 +0100 x86/apic: Switch all APICs to Fixed delivery mode Some of the APIC incarnations are operating in lowest priority delivery mode. This worked as long as the vector management code allocated the same vector on all possible CPUs for each interrupt. Lowest priority delivery mode does not necessarily respect the affinity setting and may redirect to some other online CPU. This was documented somewhere in the old code and the conversion to single target delivery missed to update the delivery mode of the affected APIC drivers which results in spurious interrupts on some of the affected CPU/Chipset combinations. Switch the APIC drivers over to Fixed delivery mode and remove all leftovers of lowest priority delivery mode. Switching to Fixed delivery mode is not a problem on these CPUs because the kernel already uses Fixed delivery mode for IPIs. The reason for this is that th SDM explicitely forbids lowest prio mode for IPIs. The reason is obvious: If the irq routing does not honor destination targets in lowest prio mode then an IPI targeted at CPU1 might end up on CPU0, which would be a fatal problem in many cases. As a consequence of this change, the apic::irq_delivery_mode field is now pointless, but this needs to be cleaned up in a separate patch. Fixes: fdba46ffb4c2 ("x86/apic: Get rid of multi CPU affinity") Reported-by: vcaputo@pengaru.com Signed-off-by: Thomas Gleixner Tested-by: vcaputo@pengaru.com Cc: Pavel Machek Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1712281140440.1688@nanos arch/x86/kernel/apic/apic_flat_64.c | 2 +- arch/x86/kernel/apic/apic_noop.c | 2 +- arch/x86/kernel/apic/msi.c | 8 ++------ arch/x86/kernel/apic/probe_32.c | 2 +- arch/x86/kernel/apic/x2apic_cluster.c | 2 +- drivers/pci/host/pci-hyperv.c | 8 ++------ 6 files changed, 8 insertions(+), 16 deletions(-) commit 254beb84faccbe2f4eda0b51924857bdfb679969 Author: James Smart Date: Thu Dec 21 14:15:47 2017 -0800 nvme-fcloop: avoid possible uninitialized variable warning The kbuild test robot send mail of a potential use of an uninitialized variable - "tport" in fcloop_delete_targetport() which then calls __targetport_unreg() which uses the variable. It will never be the case it is uninitialized as the call to __targetport_unreg() only occurs if there is a valid nport pointer. And at the time the nport pointer is assigned, the tport variable is set. Remove the warning by assigning a NULL value initially. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/target/fcloop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 479a322fb729d657d34706ccf8dd12916f36628f Author: Sagi Grimberg Date: Thu Dec 21 15:07:27 2017 +0200 nvme-mpath: fix last path removal during traffic In case our last path is removed during traffic, we can end up requeueing the bio(s) but never schedule the actual requeue work as upper layers still have open handles on the mpath device node. Fix this by scheduling requeue work if the namespace being removed is the last path in the ns_head path list. Fixes: 32acab3181c7 ("nvme: implement multipath access to nvme subsystems") Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 1 + drivers/nvme/host/nvme.h | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit d5bf4b7f437c250821d40c3e32158729e6b484ce Author: Sagi Grimberg Date: Thu Dec 21 14:54:15 2017 +0200 nvme-rdma: fix concurrent reset and reconnect Now ctrl state machine allows to transition from RESETTING to RECONNECTING. In nvme-rdma when we receive a rdma cm DISONNECTED event, we trigger nvme_rdma_error_recovery. This happens also when we execute a controller reset, issue a cm diconnect request and receive a cm disconnect reply, as a result, the reset work and the error recovery work can run concurrently. Until now the state machine prevented from the error recovery work from running as a result of a controller reset (RESETTING -> RECONNECTING was not allowed). To fix this, we adopt the FC state machine approach, we always transition from LIVE to RESETTING and only then to RECONNECTING. We do this both for the error recovery work and the controller reset work: 1. transition to RESETTING 2. teardown the controller association 3. transition to RECONNECTING This will restore the protection against reset work and error recovery work from concurrently running together. Fixes: 3cec7f9de448 ("nvme: allow controller RESETTING to RECONNECTING transition") Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit cee160fd34b459ace029653436319557a643795a Author: Jeff Lien Date: Tue Dec 19 13:24:15 2017 -0600 nvme: fix sector units when going between formats If you format a device with a 4k sector size back to 512 bytes, the queue limit values for physical block size and minimum IO size were not getting updated; only the logical block size was being updated. This patch adds code to update the physical block and IO minimum sizes. Signed-off-by: Jeff Lien Reviewed-by: Martin K. Petersen Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 955b1b5a00ba694159a7d3763412597f707c294d Author: Minwoo Im Date: Wed Dec 20 16:30:50 2017 +0900 nvme-pci: move use_sgl initialization to nvme_init_iod() A flag "use_sgl" of "struct nvme_iod" has been used in nvme_init_iod() without being set to any value. It seems like "use_sgl" has been set in either nvme_pci_setup_prps() or nvme_pci_setup_sgls() which occur later than nvme_init_iod(). Make "iod->use_sgl" being set in a proper place, nvme_init_iod(). Also move nvme_pci_use_sgls() up above nvme_init_iod() to make it possible to be called by nvme_init_iod(). Signed-off-by: Minwoo Im Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit 2758b3e3e630ba304fc4aca434d591e70e528298 Merge: fd84b75 d5902f6d Author: Linus Torvalds Date: Thu Dec 28 23:20:21 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) IPv6 gre tunnels end up with different default features enabled depending upon whether netlink or ioctls are used to bring them up. Fix from Alexey Kodanev. 2) Fix read past end of user control message in RDS< from Avinash Repaka. 3) Missing RCU barrier in mini qdisc code, from Cong Wang. 4) Missing policy put when reusing per-cpu route entries, from Florian Westphal. 5) Handle nested PCI errors properly in bnx2x driver, from Guilherme G. Piccoli. 6) Run nested transport mode IPSEC packets via tasklet, from Herbert Xu. 7) Fix handling poll() for stream sockets in tipc, from Parthasarathy Bhuvaragan. 8) Fix two stack-out-of-bounds issues in IPSEC, from Steffen Klassert. 9) Another zerocopy ubuf handling fix, from Willem de Bruijn. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (33 commits) strparser: Call sock_owned_by_user_nocheck sock: Add sock_owned_by_user_nocheck skbuff: in skb_copy_ubufs unclone before releasing zerocopy tipc: fix hanging poll() for stream sockets sctp: Replace use of sockets_allocated with specified macro. bnx2x: Improve reliability in case of nested PCI errors tg3: Enable PHY reset in MTU change path for 5720 tg3: Add workaround to restrict 5762 MRRS to 2048 tg3: Update copyright net: fec: unmap the xmit buffer that are not transferred by DMA tipc: fix tipc_mon_delete() oops in tipc_enable_bearer() error path tipc: error path leak fixes in tipc_enable_bearer() RDS: Check cmsg_len before dereferencing CMSG_DATA tcp: Avoid preprocessor directives in tracepoint macro args tipc: fix memory leak of group member when peer node is lost net: sched: fix possible null pointer deref in tcf_block_put tipc: base group replicast ack counter on number of actual receivers net_sched: fix a missing rcu barrier in mini_qdisc_pair_swap() net: phy: micrel: ksz9031: reconfigure autoneg after phy autoneg workaround ip6_gre: fix device features for ioctl setup ... commit fd84b751ddb7dab7a8c22826e7bff85f3ff3f9a6 Merge: c0208a3 03bfd4e Author: Linus Torvalds Date: Thu Dec 28 23:16:24 2017 -0800 Merge tag 'drm-fixes-for-v4.15-rc6' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "nouveau and i915 regression fixes" * tag 'drm-fixes-for-v4.15-rc6' of git://people.freedesktop.org/~airlied/linux: drm/nouveau: fix race when adding delayed work items i915: Reject CCS modifiers for pipe C on Geminilake drm/i915/gvt: Fix pipe A enable as default for vgpu commit c0208a33cbc428f66b446f5dd16c91fb76aaab88 Merge: 4f2382f 756efe1 Author: Linus Torvalds Date: Thu Dec 28 23:14:47 2017 -0800 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fix from Stephen Boyd: "One more fix for the runtime PM clk patches. We're calling a runtime PM API that may schedule from somewhere that we can't do that. We change to the async version of pm_runtime_put() to fix it" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: use atomic runtime pm api in clk_core_is_enabled commit 4f2382f380dec67f795ccde0f3b2e3fa686a4bbc Merge: 19286e4 2b83ff9 Author: Linus Torvalds Date: Thu Dec 28 23:09:45 2017 -0800 Merge tag 'led_fixes_for_4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED fix from Jacek Anaszewski: "A single LED fix for brightness setting when delay_off is 0" * tag 'led_fixes_for_4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: led: core: Fix brightness setting when setting delay_off=0 commit 19286e4a7a0ce0a7ac584be614c40513d6318ad6 Merge: 5f520fc 45e6ae7 Author: Linus Torvalds Date: Thu Dec 28 23:06:01 2017 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "This is the next batch of for-rc patches from RDMA. It includes the fix for the ipoib regression I mentioned last time, and the result of a fairly major debugging effort to get iser working reliably on cxgb4 hardware - it turns out the cxgb4 driver was not handling QP error flushing properly causing iser to fail. - cxgb4 fix for an iser testing failure as debugged by Steve and Sagi. The problem was a driver bug in the handling of shutting down a QP. - Various vmw_pvrdma fixes for bogus WARN_ON, missed resource free on error unwind and a use after free bug - Improper congestion counter values on mlx5 when link aggregation is enabled - ipoib lockdep regression introduced in this merge window - hfi1 regression supporting the device in a VM introduced in a recent patch - Typo that breaks future uAPI compatibility in the verbs core - More SELinux related oops fixing - Fix an oops during error unwind in mlx5" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: IB/mlx5: Fix mlx5_ib_alloc_mr error flow IB/core: Verify that QP is security enabled in create and destroy IB/uverbs: Fix command checking as part of ib_uverbs_ex_modify_qp() IB/mlx5: Serialize access to the VMA list IB/hfi: Only read capability registers if the capability exists IB/ipoib: Fix lockdep issue found on ipoib_ib_dev_heavy_flush IB/mlx5: Fix congestion counters in LAG mode RDMA/vmw_pvrdma: Avoid use after free due to QP/CQ/SRQ destroy RDMA/vmw_pvrdma: Use refcount_dec_and_test to avoid warning RDMA/vmw_pvrdma: Call ib_umem_release on destroy QP path iw_cxgb4: when flushing, complete all wrs in a chain iw_cxgb4: reflect the original WR opcode in drain cqes iw_cxgb4: Only validate the MSN for successful completions commit d5902f6d1fbdb27e6a33c418063466d94be9dfa2 Merge: f72c4ac d66fa9e Author: David S. Miller Date: Thu Dec 28 14:28:23 2017 -0500 Merge branch 'strparser-Fix-lockdep-issue' Tom Herbert says: ==================== strparser: Fix lockdep issue When sock_owned_by_user returns true in strparser. Fix is to add and call sock_owned_by_user_nocheck since the check for owned by user is not an error condition in this case. ==================== Fixes: 43a0c6751a322847 ("strparser: Stream parser for messages") Reported-by: syzbot Reported-and-tested-by: Signed-off-by: David S. Miller commit d66fa9ec53c43bba9fa973c16419f6061b7cc3ea Author: Tom Herbert Date: Thu Dec 28 11:00:44 2017 -0800 strparser: Call sock_owned_by_user_nocheck strparser wants to check socket ownership without producing any warnings. As indicated by the comment in the code, it is permissible for owned_by_user to return true. Fixes: 43a0c6751a322847 ("strparser: Stream parser for messages") Reported-by: syzbot Reported-and-tested-by: Signed-off-by: Tom Herbert Signed-off-by: David S. Miller net/strparser/strparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 602f7a2714a3b3aa4bec82ab0a86a9f5a2c4aa61 Author: Tom Herbert Date: Thu Dec 28 11:00:43 2017 -0800 sock: Add sock_owned_by_user_nocheck This allows checking socket lock ownership with producing lockdep warnings. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/net/sock.h | 5 +++++ 1 file changed, 5 insertions(+) commit f72c4ac695573699dde5b71da1c3b9ef80440616 Author: Willem de Bruijn Date: Thu Dec 28 12:38:13 2017 -0500 skbuff: in skb_copy_ubufs unclone before releasing zerocopy skb_copy_ubufs must unclone before it is safe to modify its skb_shared_info with skb_zcopy_clear. Commit b90ddd568792 ("skbuff: skb_copy_ubufs must release uarg even without user frags") ensures that all skbs release their zerocopy state, even those without frags. But I forgot an edge case where such an skb arrives that is cloned. The stack does not build such packets. Vhost/tun skbs have their frags orphaned before cloning. TCP skbs only attach zerocopy state when a frag is added. But if TCP packets can be trimmed or linearized, this might occur. Tracing the code I found no instance so far (e.g., skb_linearize ends up calling skb_zcopy_clear if !skb->data_len). Still, it is non-obvious that no path exists. And it is fragile to rely on this. Fixes: b90ddd568792 ("skbuff: skb_copy_ubufs must release uarg even without user frags") Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/core/skbuff.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 517d7c79bdb39864e617960504bdc1aa560c75c6 Author: Parthasarathy Bhuvaragan Date: Thu Dec 28 12:03:06 2017 +0100 tipc: fix hanging poll() for stream sockets In commit 42b531de17d2f6 ("tipc: Fix missing connection request handling"), we replaced unconditional wakeup() with condtional wakeup for clients with flags POLLIN | POLLRDNORM | POLLRDBAND. This breaks the applications which do a connect followed by poll with POLLOUT flag. These applications are not woken when the connection is ESTABLISHED and hence sleep forever. In this commit, we fix it by including the POLLOUT event for sockets in TIPC_CONNECTING state. Fixes: 42b531de17d2f6 ("tipc: Fix missing connection request handling") Acked-by: Jon Maloy Signed-off-by: Parthasarathy Bhuvaragan Signed-off-by: David S. Miller net/tipc/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7e83dd3ff1dd2f9e60213f6eedc7e5b08192062 Author: Lukas Bulwahn Date: Tue Dec 26 15:27:20 2017 -0600 objtool: Fix Clang enum conversion warning Fix the following Clang enum conversion warning: arch/x86/decode.c:141:20: error: implicit conversion from enumeration type 'enum op_src_type' to different enumeration type 'enum op_dest_type' [-Werror,-Wenum-conversion] op->dest.type = OP_SRC_REG; ~ ^~~~~~~~~~ It just happened to work before because OP_SRC_REG and OP_DEST_REG have the same value. Signed-off-by: Lukas Bulwahn Signed-off-by: Josh Poimboeuf Reviewed-by: Nicholas Mc Guire Reviewed-by: Nick Desaulniers Cc: Jiri Slaby Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: baa41469a7b9 ("objtool: Implement stack validation 2.0") Link: http://lkml.kernel.org/r/b4156c5738bae781c392e7a3691aed4514ebbdf2.1514323568.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/arch/x86/decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64e05d118e357bb52a084b609436acf292ce7944 Author: Dou Liyang Date: Mon Dec 4 12:03:13 2017 +0800 x86/apic: Update the 'apic=' description of setting APIC driver There are two consumers of apic=: the APIC debug level and the low level generic architecture code, but Linux just documented the first one. Append the second description. Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: peterz@infradead.org Cc: rdunlap@infradead.org Cc: corbet@lwn.net Link: https://lkml.kernel.org/r/20171204040313.24824-2-douly.fnst@cn.fujitsu.com Documentation/admin-guide/kernel-parameters.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 4fcab6693445cfb84f2b65868c58043535090e52 Author: Dou Liyang Date: Mon Dec 4 12:03:12 2017 +0800 x86/apic: Avoid wrong warning when parsing 'apic=' in X86-32 case There are two consumers of apic=: apic_set_verbosity() for setting the APIC debug level; parse_apic() for registering APIC driver by hand. X86-32 supports both of them, but sometimes, kernel issues a weird warning. eg: when kernel was booted up with 'apic=bigsmp' in command line, early_param would warn like that: ... [ 0.000000] APIC Verbosity level bigsmp not recognised use apic=verbose or apic=debug [ 0.000000] Malformed early option 'apic' ... Wrap the warning code in CONFIG_X86_64 case to avoid this. Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: peterz@infradead.org Cc: rdunlap@infradead.org Cc: corbet@lwn.net Link: https://lkml.kernel.org/r/20171204040313.24824-1-douly.fnst@cn.fujitsu.com arch/x86/kernel/apic/apic.c | 2 ++ 1 file changed, 2 insertions(+) commit 11bca0a83f83f6093d816295668e74ef24595944 Author: Guenter Roeck Date: Sat Dec 2 09:13:04 2017 -0800 genirq: Guard handle_bad_irq log messages An interrupt storm on a bad interrupt will cause the kernel log to be clogged. [ 60.089234] ->handle_irq(): ffffffffbe2f803f, [ 60.090455] 0xffffffffbf2af380 [ 60.090510] handle_bad_irq+0x0/0x2e5 [ 60.090522] ->irq_data.chip(): ffffffffbf2af380, [ 60.090553] IRQ_NOPROBE set [ 60.090584] ->handle_irq(): ffffffffbe2f803f, [ 60.090590] handle_bad_irq+0x0/0x2e5 [ 60.090596] ->irq_data.chip(): ffffffffbf2af380, [ 60.090602] 0xffffffffbf2af380 [ 60.090608] ->action(): (null) [ 60.090779] handle_bad_irq+0x0/0x2e5 This was seen when running an upstream kernel on Acer Chromebook R11. The system was unstable as result. Guard the log message with __printk_ratelimit to reduce the impact. This won't prevent the interrupt storm from happening, but at least the system remains stable. Signed-off-by: Guenter Roeck Signed-off-by: Thomas Gleixner Cc: Dmitry Torokhov Cc: Joe Perches Cc: Andy Shevchenko Cc: Mika Westerberg Link: https://bugzilla.kernel.org/show_bug.cgi?id=197953 Link: https://lkml.kernel.org/r/1512234784-21038-1-git-send-email-linux@roeck-us.net kernel/irq/debug.h | 5 +++++ 1 file changed, 5 insertions(+) commit 466a2b42d67644447a1765276259a3ea5531ddff Author: Joel Fernandes Date: Thu Dec 21 02:22:45 2017 +0100 cpufreq: schedutil: Use idle_calls counter of the remote CPU Since the recent remote cpufreq callback work, its possible that a cpufreq update is triggered from a remote CPU. For single policies however, the current code uses the local CPU when trying to determine if the remote sg_cpu entered idle or is busy. This is incorrect. To remedy this, compare with the nohz tick idle_calls counter of the remote CPU. Fixes: 674e75411fc2 (sched: cpufreq: Allow remote cpufreq callbacks) Acked-by: Viresh Kumar Acked-by: Peter Zijlstra (Intel) Signed-off-by: Joel Fernandes Cc: 4.14+ # 4.14+ Signed-off-by: Rafael J. Wysocki include/linux/tick.h | 1 + kernel/sched/cpufreq_schedutil.c | 2 +- kernel/time/tick-sched.c | 13 +++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) commit 39c3fd58952d7599d367c84c1330b785d91d6088 Author: Andrew Lunn Date: Sat Dec 2 18:11:04 2017 +0100 kernel/irq: Extend lockdep class for request mutex The IRQ code already has support for lockdep class for the lock mutex in an interrupt descriptor. Extend this to add a second class for the request mutex in the descriptor. Not having a class is resulting in false positive splats in some code paths. Signed-off-by: Andrew Lunn Signed-off-by: Thomas Gleixner Acked-by: linus.walleij@linaro.org Cc: grygorii.strashko@ti.com Cc: f.fainelli@gmail.com Link: https://lkml.kernel.org/r/1512234664-21555-1-git-send-email-andrew@lunn.ch arch/powerpc/sysdev/fsl_msi.c | 4 +++- drivers/gpio/gpio-bcm-kona.c | 3 ++- drivers/gpio/gpio-brcmstb.c | 4 +++- drivers/gpio/gpio-tegra.c | 4 +++- drivers/gpio/gpiolib.c | 27 ++++++++++++++++--------- drivers/irqchip/irq-renesas-intc-irqpin.c | 6 +++++- drivers/mfd/arizona-irq.c | 4 +++- drivers/pinctrl/pinctrl-single.c | 5 ++++- include/linux/gpio/driver.h | 33 ++++++++++++++++++++----------- include/linux/irqdesc.h | 9 ++++++--- kernel/irq/generic-chip.c | 11 +++++++---- 11 files changed, 75 insertions(+), 35 deletions(-) commit 1528f6e2764c483b9ba1df315d771b2d41b11a04 Merge: 8cb38a6 aee6574 Author: David S. Miller Date: Wed Dec 27 20:35:03 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2017-12-28 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Two small fixes for bpftool. Fix otherwise broken output if any of the system calls failed when listing maps in json format and instead of bailing out, skip maps or progs that disappeared between fetching next id and getting an fd for that id, both from Jakub. 2) Small fix in BPF selftests to respect LLC passed from command line when testing for -mcpu=probe presence, from Quentin. ==================== Signed-off-by: David S. Miller commit 59585b4be9ae4dc6506551709bdcd6f5210b8a01 Author: Jan Engelhardt Date: Mon Dec 25 03:43:53 2017 +0100 sparc64: repair calling incorrect hweight function from stubs Commit v4.12-rc4-1-g9289ea7f952b introduced a mistake that made the 64-bit hweight stub call the 16-bit hweight function. Fixes: 9289ea7f952b ("sparc64: Use indirect calls in hamming weight stubs") Signed-off-by: Jan Engelhardt Signed-off-by: David S. Miller arch/sparc/lib/hweight.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 45e6ae7ef21b907dacb18da62d5787d74a31d860 Author: Nitzan Carmi Date: Tue Dec 26 11:20:20 2017 +0200 IB/mlx5: Fix mlx5_ib_alloc_mr error flow ibmr.device is being set only after ib_alloc_mr() is (successfully) complete. Therefore, in case mlx5_core_create_mkey() return with error, the error flow calls mlx5_free_priv_descs() which uses ibmr.device (which doesn't exist yet), causing a NULL dereference oops. To fix this, the IB device should be set in the mr struct earlier stage (e.g. prior to calling mlx5_core_create_mkey()). Fixes: 8a187ee52b04 ("IB/mlx5: Support the new memory registration API") Signed-off-by: Max Gurtovoy Signed-off-by: Nitzan Carmi Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/mr.c | 1 + 1 file changed, 1 insertion(+) commit 4a50881bbac309e6f0684816a180bc3c14e1485d Author: Moni Shoua Date: Sun Dec 24 13:54:58 2017 +0200 IB/core: Verify that QP is security enabled in create and destroy The XRC target QP create flow sets up qp_sec only if there is an IB link with LSM security enabled. However, several other related uAPI entry points blindly follow the qp_sec NULL pointer, resulting in a possible oops. Check for NULL before using qp_sec. Cc: # v4.12 Fixes: d291f1a65232 ("IB/core: Enforce PKey security on QPs") Reviewed-by: Daniel Jurgens Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/security.c | 3 +++ drivers/infiniband/core/verbs.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 05d14e7b0c138cb07ba30e464f47b39434f3fdef Author: Moni Shoua Date: Sun Dec 24 13:54:57 2017 +0200 IB/uverbs: Fix command checking as part of ib_uverbs_ex_modify_qp() If the input command length is larger than the kernel supports an error should be returned in case the unsupported bytes are not cleared, instead of the other way aroudn. This matches what all other callers of ib_is_udata_cleared do and will avoid user ABI problems in the future. Cc: # v4.10 Fixes: 189aba99e700 ("IB/uverbs: Extend modify_qp and support packet pacing") Reviewed-by: Yishai Hadas Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/uverbs_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ad9a3668a434faca1339789ed2f043d679199309 Author: Majd Dibbiny Date: Sun Dec 24 13:54:56 2017 +0200 IB/mlx5: Serialize access to the VMA list User-space applications can do mmap and munmap directly at any time. Since the VMA list is not protected with a mutex, concurrent accesses to the VMA list from the mmap and munmap can cause data corruption. Add a mutex around the list. Cc: # v4.7 Fixes: 7c2344c3bbf9 ("IB/mlx5: Implements disassociate_ucontext API") Reviewed-by: Yishai Hadas Signed-off-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/main.c | 8 ++++++++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 4 ++++ 2 files changed, 12 insertions(+) commit 5f520fc318764df800789edd202b5e3b55130613 Merge: 9b95779 4397f04 Author: Linus Torvalds Date: Wed Dec 27 13:06:57 2017 -0800 Merge tag 'trace-v4.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "While doing tests on tracing over the network, I found that the packets were getting corrupted. In the process I found three bugs. One was the culprit, but the other two scared me. After deeper investigation, they were not as major as I thought they were, due to a signed compared to an unsigned that prevented a negative number from doing actual harm. The two bigger bugs: - Mask the ring buffer data page length. There are data flags at the high bits of the length field. These were not cleared via the length function, and the length could return a negative number. (Although the number returned was unsigned, but was assigned to a signed number) Luckily, this value was compared to PAGE_SIZE which is unsigned and kept it from entering the path that could have caused damage. - Check the page usage before reusing the ring buffer reader page. TCP increments the page ref when passing the page off to the network. The page is passed back to the ring buffer for use on free. But the page could still be in use by the TCP stack. Minor bugs: - Related to the first bug. No need to clear out the unused ring buffer data before sending to user space. It is now done by the ring buffer code itself. - Reset pointers after free on error path. There were some cases in the error path that pointers were freed but not set to NULL, and could have them freed again, having a pointer freed twice" * tag 'trace-v4.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix possible double free on failure of allocating trace buffer tracing: Fix crash when it fails to alloc ring buffer ring-buffer: Do no reuse reader page if still in use tracing: Remove extra zeroing out of the ring buffer page ring-buffer: Mask out the info bits when returning buffer page length commit 9b9577948f64edc1c967d80deb6910c811abb8fc Merge: beacbc6 44be77c Author: Linus Torvalds Date: Wed Dec 27 12:59:27 2017 -0800 Merge tag 'sound-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "It seems that Santa overslept with a bunch of gifts; the majority of changes here are various device-specific ASoC fixes, most notably the revert of rcar IOMMU support and fsl_ssi AC97 fixes, but also lots of small fixes for codecs. Besides that, the usual HD-audio quirks and fixes are included, too" * tag 'sound-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (31 commits) ALSA: hda - Fix missing COEF init for ALC225/295/299 ALSA: hda: Drop useless WARN_ON() ALSA: hda - change the location for one mic on a Lenovo machine ALSA: hda - fix headset mic detection issue on a Dell machine ALSA: hda - Add MIC_NO_PRESENCE fixup for 2 HP machines ASoC: rsnd: fixup ADG register mask ASoC: rt5514-spi: only enable wakeup when fully initialized ASoC: nau8825: fix issue that pop noise when start capture ASoC: rt5663: Fix the wrong result of the first jack detection ASoC: rsnd: ssi: fix race condition in rsnd_ssi_pointer_update ASoC: Intel: Change kern log level to avoid unwanted messages ASoC: atmel-classd: select correct Kconfig symbol ASoC: wm_adsp: Fix validation of firmware and coeff lengths ASoC: Intel: Skylake: Do not check dev_type for dmic link type ASoC: rockchip: disable clock on error ASoC: tlv320aic31xx: Fix GPIO1 register definition ASoC: codecs: msm8916-wcd: Fix supported formats ASoC: fsl_asrc: Fix typo in a field define ASoC: rsnd: ssiu: clear SSI_MODE for non TDM Extended modes ASoC: da7218: Correct IRQ level in DT binding example ... commit ac461122c88a10b7d775de2f56467f097c9e627a Author: Linus Torvalds Date: Wed Dec 27 11:48:50 2017 -0800 x86-32: Fix kexec with stack canary (CONFIG_CC_STACKPROTECTOR) Commit e802a51ede91 ("x86/idt: Consolidate IDT invalidation") cleaned up and unified the IDT invalidation that existed in a couple of places. It changed no actual real code. Despite not changing any actual real code, it _did_ change code generation: by implementing the common idt_invalidate() function in archx86/kernel/idt.c, it made the use of the function in arch/x86/kernel/machine_kexec_32.c be a real function call rather than an (accidental) inlining of the function. That, in turn, exposed two issues: - in load_segments(), we had incorrectly reset all the segment registers, which then made the stack canary load (which gcc does using offset of %gs) cause a trap. Instead of %gs pointing to the stack canary, it will be the normal zero-based kernel segment, and the stack canary load will take a page fault at address 0x14. - to make this even harder to debug, we had invalidated the GDT just before calling idt_invalidate(), which meant that the fault happened with an invalid GDT, which in turn causes a triple fault and immediate reboot. Fix this by (a) not reloading the special segments in load_segments(). We currently don't do any percpu accesses (which would require %fs on x86-32) in this area, but there's no reason to think that we might not want to do them, and like %gs, it's pointless to break it. (b) doing idt_invalidate() before invalidating the GDT, to keep things at least _slightly_ more debuggable for a bit longer. Without a IDT, traps will not work. Without a GDT, traps also will not work, but neither will any segment loads etc. So in a very real sense, the GDT is even more core than the IDT. Fixes: e802a51ede91 ("x86/idt: Consolidate IDT invalidation") Reported-and-tested-by: Alexandru Chirvasitu Signed-off-by: Linus Torvalds Signed-off-by: Thomas Gleixner Cc: Denys Vlasenko Cc: Peter Zijlstra Cc: Brian Gerst Cc: Steven Rostedt Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Josh Poimboeuf Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/alpine.LFD.2.21.1712271143180.8572@i7.lan arch/x86/kernel/machine_kexec_32.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2b83ff96f51d0b039c4561b9f95c824d7bddb85c Author: Matthieu CASTET Date: Tue Dec 12 11:10:44 2017 +0100 led: core: Fix brightness setting when setting delay_off=0 With the current code, the following sequence won't work : echo timer > trigger echo 0 > delay_off * at this point we call ** led_delay_off_store ** led_blink_set *** stop timer ** led_blink_setup ** led_set_software_blink *** if !delay_on, led off *** if !delay_off, set led_set_brightness_nosleep <--- LED_BLINK_SW is set but timer is stop *** otherwise start timer/set LED_BLINK_SW flag echo xxx > brightness * led_set_brightness ** if LED_BLINK_SW *** if brightness=0, led off *** else apply brightness if next timer <--- timer is stop, and will never apply new setting ** otherwise set led_set_brightness_nosleep To fix that, when we delete the timer, we should clear LED_BLINK_SW. Cc: linux-leds@vger.kernel.org Signed-off-by: Matthieu CASTET Signed-off-by: Jacek Anaszewski drivers/leds/led-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ac139eaa6bbdb07c547b6916a808eab3897e0e3 Author: rodrigosiqueira Date: Fri Dec 15 11:15:33 2017 -0200 x86: Remove unused parameter of prepare_switch_to Commit e37e43a497d5 ("x86/mm/64: Enable vmapped stacks (CONFIG_HAVE_ARCH_VMAP_STACK=y)") added prepare_switch_to with one extra parameter which is not used by the function, remove it. Signed-off-by: Rodrigo Siqueira Signed-off-by: Thomas Gleixner Cc: kernel-janitors@vger.kernel.org Link: https://lkml.kernel.org/r/20171215131533.hp6kqebw45o7uvsb@smtp.gmail.com arch/x86/include/asm/switch_to.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7ad1437d6ace0e450a6c1167720608ad660b191d Author: Thomas Gleixner Date: Wed Dec 27 19:45:31 2017 +0100 perf/x86/intel: Plug memory leak in intel_pmu_init() A recent commit introduced an extra merge_attr() call in the skylake branch, which causes a memory leak. Store the pointer to the extra allocated memory and free it at the end of the function. Fixes: a5df70c354c2 ("perf/x86: Only show format attributes when supported") Reported-by: Tommi Rantala Signed-off-by: Thomas Gleixner Cc: Andi Kleen arch/x86/events/intel/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4397f04575c44e1440ec2e49b6302785c95fd2f8 Author: Steven Rostedt (VMware) Date: Tue Dec 26 20:07:34 2017 -0500 tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chunyan fixed one of the locations that does this, but missed a spot. Link: http://lkml.kernel.org/r/20171226071253.8968-1-chunyan.zhang@spreadtrum.com Cc: stable@vger.kernel.org Fixes: 737223fbca3b1 ("tracing: Consolidate buffer allocation code") Reported-by: Jing Xia Reported-by: Chunyan Zhang Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 1 + 1 file changed, 1 insertion(+) commit 24f2aaf952ee0b59f31c3a18b8b36c9e3d3c2cf5 Author: Jing Xia Date: Tue Dec 26 15:12:53 2017 +0800 tracing: Fix crash when it fails to alloc ring buffer Double free of the ring buffer happens when it fails to alloc new ring buffer instance for max_buffer if TRACER_MAX_TRACE is configured. The root cause is that the pointer is not set to NULL after the buffer is freed in allocate_trace_buffers(), and the freeing of the ring buffer is invoked again later if the pointer is not equal to Null, as: instance_mkdir() |-allocate_trace_buffers() |-allocate_trace_buffer(tr, &tr->trace_buffer...) |-allocate_trace_buffer(tr, &tr->max_buffer...) // allocate fail(-ENOMEM),first free // and the buffer pointer is not set to null |-ring_buffer_free(tr->trace_buffer.buffer) // out_free_tr |-free_trace_buffers() |-free_trace_buffer(&tr->trace_buffer); //if trace_buffer is not null, free again |-ring_buffer_free(buf->buffer) |-rb_free_cpu_buffer(buffer->buffers[cpu]) // ring_buffer_per_cpu is null, and // crash in ring_buffer_per_cpu->pages Link: http://lkml.kernel.org/r/20171226071253.8968-1-chunyan.zhang@spreadtrum.com Cc: stable@vger.kernel.org Fixes: 737223fbca3b1 ("tracing: Consolidate buffer allocation code") Signed-off-by: Jing Xia Signed-off-by: Chunyan Zhang Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 2 ++ 1 file changed, 2 insertions(+) commit ae415fa4c5248a8cf4faabd5a3c20576cb1ad607 Author: Steven Rostedt (VMware) Date: Fri Dec 22 21:19:29 2017 -0500 ring-buffer: Do no reuse reader page if still in use To free the reader page that is allocated with ring_buffer_alloc_read_page(), ring_buffer_free_read_page() must be called. For faster performance, this page can be reused by the ring buffer to avoid having to free and allocate new pages. The issue arises when the page is used with a splice pipe into the networking code. The networking code may up the page counter for the page, and keep it active while sending it is queued to go to the network. The incrementing of the page ref does not prevent it from being reused in the ring buffer, and this can cause the page that is being sent out to the network to be modified before it is sent by reading new data. Add a check to the page ref counter, and only reuse the page if it is not being used anywhere else. Cc: stable@vger.kernel.org Fixes: 73a757e63114d ("ring-buffer: Return reader page back into existing ring buffer") Signed-off-by: Steven Rostedt (VMware) kernel/trace/ring_buffer.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6b7e633fe9c24682df550e5311f47fb524701586 Author: Steven Rostedt (VMware) Date: Fri Dec 22 20:38:57 2017 -0500 tracing: Remove extra zeroing out of the ring buffer page The ring_buffer_read_page() takes care of zeroing out any extra data in the page that it returns. There's no need to zero it out again from the consumer. It was removed from one consumer of this function, but read_buffers_splice_read() did not remove it, and worse, it contained a nasty bug because of it. Cc: stable@vger.kernel.org Fixes: 2711ca237a084 ("ring-buffer: Move zeroing out excess in page to ring buffer code") Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 03bfd4e19b935adb8be4f7342f13395fb7f11096 Merge: e100ff38 8bc0d7a Author: Dave Airlie Date: Thu Dec 28 05:20:07 2017 +1000 Merge tag 'drm-intel-fixes-2017-12-22-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes GLK pipe C related fix, and a gvt fix. * tag 'drm-intel-fixes-2017-12-22-1' of git://anongit.freedesktop.org/drm/drm-intel: i915: Reject CCS modifiers for pipe C on Geminilake drm/i915/gvt: Fix pipe A enable as default for vgpu commit 45d8b80c2ac5d21cd1e2954431fb676bc2b1e099 Author: Steven Rostedt (VMware) Date: Fri Dec 22 20:32:35 2017 -0500 ring-buffer: Mask out the info bits when returning buffer page length Two info bits were added to the "commit" part of the ring buffer data page when returned to be consumed. This was to inform the user space readers that events have been missed, and that the count may be stored at the end of the page. What wasn't handled, was the splice code that actually called a function to return the length of the data in order to zero out the rest of the page before sending it up to user space. These data bits were returned with the length making the value negative, and that negative value was not checked. It was compared to PAGE_SIZE, and only used if the size was less than PAGE_SIZE. Luckily PAGE_SIZE is unsigned long which made the compare an unsigned compare, meaning the negative size value did not end up causing a large portion of memory to be randomly zeroed out. Cc: stable@vger.kernel.org Fixes: 66a8cb95ed040 ("ring-buffer: Add place holder recording of dropped events") Signed-off-by: Steven Rostedt (VMware) kernel/trace/ring_buffer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8cb38a602478e9f806571f6920b0a3298aabf042 Author: Tonghao Zhang Date: Fri Dec 22 10:15:20 2017 -0800 sctp: Replace use of sockets_allocated with specified macro. The patch(180d8cd942ce) replaces all uses of struct sock fields' memory_pressure, memory_allocated, sockets_allocated, and sysctl_mem to accessor macros. But the sockets_allocated field of sctp sock is not replaced at all. Then replace it now for unifying the code. Fixes: 180d8cd942ce ("foundations of per-cgroup memory pressure controlling.") Cc: Glauber Costa Signed-off-by: Tonghao Zhang Signed-off-by: David S. Miller net/sctp/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 76dc6c097d581ad8eeedf8e1a000423a3d742445 Author: Mathieu Malaterre Date: Tue Dec 26 15:08:53 2017 +0100 cpu/hotplug: Move inline keyword at the beginning of declaration Fix non-fatal warnings such as: kernel/cpu.c:95:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration] static void inline cpuhp_lock_release(bool bringup) { } ^~~~~~ Signed-off-by: Mathieu Malaterre Signed-off-by: Thomas Gleixner Cc: Arnd Bergmann Cc: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: "Paul E. McKenney" Link: https://lkml.kernel.org/r/20171226140855.16583-1-malat@debian.org kernel/cpu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f7084059a9cb9e56a186e1677b1dcffd76c2cd24 Author: Guilherme G. Piccoli Date: Fri Dec 22 13:01:39 2017 -0200 bnx2x: Improve reliability in case of nested PCI errors While in recovery process of PCI error (called EEH on PowerPC arch), another PCI transaction could be corrupted causing a situation of nested PCI errors. Also, this scenario could be reproduced with error injection mechanisms (for debug purposes). We observe that in case of nested PCI errors, bnx2x might attempt to initialize its shmem and cause a kernel crash due to bad addresses read from MCP. Multiple different stack traces were observed depending on the point the second PCI error happens. This patch avoids the crashes by: * failing PCI recovery in case of nested errors (since multiple PCI errors in a row are not expected to lead to a functional adapter anyway), and by, * preventing access to adapter FW when MCP is failed (we mark it as failed when shmem cannot get initialized properly). Reported-by: Abdul Haleem Signed-off-by: Guilherme G. Piccoli Acked-by: Shahed Shaikh Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 4 ++-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) commit 6753879073d61ba74b011f102838e7c8bb1a1887 Merge: 65bbbf6 e60ee41 Author: David S. Miller Date: Wed Dec 27 11:09:14 2017 -0500 Merge branch 'tg3-fixes' Siva Reddy Kallam says: ==================== tg3: update on copyright and couple of fixes First patch: Update copyright Second patch: Add workaround to restrict 5762 MRRS Third patch: Add PHY reset in change MTU path for 5720 ==================== Signed-off-by: David S. Miller commit e60ee41aaf898584205a6af5c996860d0fe6a836 Author: Siva Reddy Kallam Date: Fri Dec 22 16:05:29 2017 +0530 tg3: Enable PHY reset in MTU change path for 5720 A customer noticed RX path hang when MTU is changed on the fly while running heavy traffic with NCSI enabled for 5717 and 5719. Since 5720 belongs to same ASIC family, we observed same issue and same fix could solve this problem for 5720. Signed-off-by: Siva Reddy Kallam Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/tg3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4419bb1cedcda0272e1dc410345c5a1d1da0e367 Author: Siva Reddy Kallam Date: Fri Dec 22 16:05:28 2017 +0530 tg3: Add workaround to restrict 5762 MRRS to 2048 One of AMD based server with 5762 hangs with jumbo frame traffic. This AMD platform has southbridge limitation which is restricting MRRS to 4000. As a work around, driver to restricts the MRRS to 2048 for this particular 5762 NX1 card. Signed-off-by: Siva Reddy Kallam Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/tg3.c | 10 ++++++++++ drivers/net/ethernet/broadcom/tg3.h | 4 ++++ 2 files changed, 14 insertions(+) commit 5a8bae9761dc5dd409ff5c3a529b2801bd0dac3a Author: Siva Reddy Kallam Date: Fri Dec 22 16:05:27 2017 +0530 tg3: Update copyright Signed-off-by: Siva Reddy Kallam Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/tg3.c | 6 ++++-- drivers/net/ethernet/broadcom/tg3.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) commit 65bbbf6c205a5c9840553925c10f51db92d25394 Merge: 178e5f5 acf568e Author: David S. Miller Date: Wed Dec 27 10:58:23 2017 -0500 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2017-12-22 1) Check for valid id proto in validate_tmpl(), otherwise we may trigger a warning in xfrm_state_fini(). From Cong Wang. 2) Fix a typo on XFRMA_OUTPUT_MARK policy attribute. From Michal Kubecek. 3) Verify the state is valid when encap_type < 0, otherwise we may crash on IPsec GRO . From Aviv Heller. 4) Fix stack-out-of-bounds read on socket policy lookup. We access the flowi of the wrong address family in the IPv4 mapped IPv6 case, fix this by catching address family missmatches before we do the lookup. 5) fix xfrm_do_migrate() with AEAD to copy the geniv field too. Otherwise the state is not fully initialized and migration fails. From Antony Antony. 6) Fix stack-out-of-bounds with misconfigured transport mode policies. Our policy template validation is not strict enough. It is possible to configure policies with transport mode template where the address family of the template does not match the selectors address family. Fix this by refusing such a configuration, address family can not change on transport mode. 7) Fix a policy reference leak when reusing pcpu xdst entry. From Florian Westphal. 8) Reinject transport-mode packets through tasklet, otherwise it is possible to reate a recursion loop. From Herbert Xu. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 178e5f57a8d8f8fc5799a624b96fc31ef9a29ffa Author: Fugang Duan Date: Fri Dec 22 17:12:09 2017 +0800 net: fec: unmap the xmit buffer that are not transferred by DMA The enet IP only support 32 bit, it will use swiotlb buffer to do dma mapping when xmit buffer DMA memory address is bigger than 4G in i.MX platform. After stress suspend/resume test, it will print out: log: [12826.352864] fec 5b040000.ethernet: swiotlb buffer is full (sz: 191 bytes) [12826.359676] DMA: Out of SW-IOMMU space for 191 bytes at device 5b040000.ethernet [12826.367110] fec 5b040000.ethernet eth0: Tx DMA memory map failed The issue is that the ready xmit buffers that are dma mapped but DMA still don't copy them into fifo, once MAC restart, these DMA buffers are not unmapped. So it should check the dma mapping buffer and unmap them. Signed-off-by: Fugang Duan Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 642a8439ddd8423b92f2e71960afe21ee1f66bb6 Author: Tommi Rantala Date: Fri Dec 22 09:35:17 2017 +0200 tipc: fix tipc_mon_delete() oops in tipc_enable_bearer() error path Calling tipc_mon_delete() before the monitor has been created will oops. This can happen in tipc_enable_bearer() error path if tipc_disc_create() fails. [ 48.589074] BUG: unable to handle kernel paging request at 0000000000001008 [ 48.590266] IP: tipc_mon_delete+0xea/0x270 [tipc] [ 48.591223] PGD 1e60c5067 P4D 1e60c5067 PUD 1eb0cf067 PMD 0 [ 48.592230] Oops: 0000 [#1] SMP KASAN [ 48.595610] CPU: 5 PID: 1199 Comm: tipc Tainted: G B 4.15.0-rc4-pc64-dirty #5 [ 48.597176] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-2.fc27 04/01/2014 [ 48.598489] RIP: 0010:tipc_mon_delete+0xea/0x270 [tipc] [ 48.599347] RSP: 0018:ffff8801d827f668 EFLAGS: 00010282 [ 48.600705] RAX: ffff8801ee813f00 RBX: 0000000000000204 RCX: 0000000000000000 [ 48.602183] RDX: 1ffffffff1de6a75 RSI: 0000000000000297 RDI: 0000000000000297 [ 48.604373] RBP: 0000000000000000 R08: 0000000000000000 R09: fffffbfff1dd1533 [ 48.605607] R10: ffffffff8eafbb05 R11: fffffbfff1dd1534 R12: 0000000000000050 [ 48.607082] R13: dead000000000200 R14: ffffffff8e73f310 R15: 0000000000001020 [ 48.608228] FS: 00007fc686484800(0000) GS:ffff8801f5540000(0000) knlGS:0000000000000000 [ 48.610189] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 48.611459] CR2: 0000000000001008 CR3: 00000001dda70002 CR4: 00000000003606e0 [ 48.612759] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 48.613831] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 48.615038] Call Trace: [ 48.615635] tipc_enable_bearer+0x415/0x5e0 [tipc] [ 48.620623] tipc_nl_bearer_enable+0x1ab/0x200 [tipc] [ 48.625118] genl_family_rcv_msg+0x36b/0x570 [ 48.631233] genl_rcv_msg+0x5a/0xa0 [ 48.631867] netlink_rcv_skb+0x1cc/0x220 [ 48.636373] genl_rcv+0x24/0x40 [ 48.637306] netlink_unicast+0x29c/0x350 [ 48.639664] netlink_sendmsg+0x439/0x590 [ 48.642014] SYSC_sendto+0x199/0x250 [ 48.649912] do_syscall_64+0xfd/0x2c0 [ 48.650651] entry_SYSCALL64_slow_path+0x25/0x25 [ 48.651843] RIP: 0033:0x7fc6859848e3 [ 48.652539] RSP: 002b:00007ffd25dff938 EFLAGS: 00000246 ORIG_RAX: 000000000000002c [ 48.654003] RAX: ffffffffffffffda RBX: 00007ffd25dff990 RCX: 00007fc6859848e3 [ 48.655303] RDX: 0000000000000054 RSI: 00007ffd25dff990 RDI: 0000000000000003 [ 48.656512] RBP: 00007ffd25dff980 R08: 00007fc685c35fc0 R09: 000000000000000c [ 48.657697] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000d13010 [ 48.658840] R13: 00007ffd25e009c0 R14: 0000000000000000 R15: 0000000000000000 [ 48.662972] RIP: tipc_mon_delete+0xea/0x270 [tipc] RSP: ffff8801d827f668 [ 48.664073] CR2: 0000000000001008 [ 48.664576] ---[ end trace e811818d54d5ce88 ]--- Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tommi Rantala Signed-off-by: David S. Miller net/tipc/monitor.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 19142551b2be4a9e13838099fde1351386e5e007 Author: Tommi Rantala Date: Fri Dec 22 09:35:16 2017 +0200 tipc: error path leak fixes in tipc_enable_bearer() Fix memory leak in tipc_enable_bearer() if enable_media() fails, and cleanup with bearer_disable() if tipc_mon_create() fails. Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tommi Rantala Signed-off-by: David S. Miller net/tipc/bearer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 14e138a86f6347c6199f610576d2e11c03bec5f0 Author: Avinash Repaka Date: Thu Dec 21 20:17:04 2017 -0800 RDS: Check cmsg_len before dereferencing CMSG_DATA RDS currently doesn't check if the length of the control message is large enough to hold the required data, before dereferencing the control message data. This results in following crash: BUG: KASAN: stack-out-of-bounds in rds_rdma_bytes net/rds/send.c:1013 [inline] BUG: KASAN: stack-out-of-bounds in rds_sendmsg+0x1f02/0x1f90 net/rds/send.c:1066 Read of size 8 at addr ffff8801c928fb70 by task syzkaller455006/3157 CPU: 0 PID: 3157 Comm: syzkaller455006 Not tainted 4.15.0-rc3+ #161 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 rds_rdma_bytes net/rds/send.c:1013 [inline] rds_sendmsg+0x1f02/0x1f90 net/rds/send.c:1066 sock_sendmsg_nosec net/socket.c:628 [inline] sock_sendmsg+0xca/0x110 net/socket.c:638 ___sys_sendmsg+0x320/0x8b0 net/socket.c:2018 __sys_sendmmsg+0x1ee/0x620 net/socket.c:2108 SYSC_sendmmsg net/socket.c:2139 [inline] SyS_sendmmsg+0x35/0x60 net/socket.c:2134 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x43fe49 RSP: 002b:00007fffbe244ad8 EFLAGS: 00000217 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043fe49 RDX: 0000000000000001 RSI: 000000002020c000 RDI: 0000000000000003 RBP: 00000000006ca018 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000217 R12: 00000000004017b0 R13: 0000000000401840 R14: 0000000000000000 R15: 0000000000000000 To fix this, we verify that the cmsg_len is large enough to hold the data to be read, before proceeding further. Reported-by: syzbot Signed-off-by: Avinash Repaka Acked-by: Santosh Shilimkar Reviewed-by: Yuval Shaia Signed-off-by: David S. Miller net/rds/send.c | 3 +++ 1 file changed, 3 insertions(+) commit da99706689481717998d1d48edd389f339eea979 Author: Daniel Thompson Date: Thu Dec 21 15:06:15 2017 +0200 usb: xhci: Add XHCI_TRUST_TX_LENGTH for Renesas uPD720201 When plugging in a USB webcam I see the following message: xhci_hcd 0000:04:00.0: WARN Successful completion on short TX: needs XHCI_TRUST_TX_LENGTH quirk? handle_tx_event: 913 callbacks suppressed All is quiet again with this patch (and I've done a fair but of soak testing with the camera since). Cc: Signed-off-by: Daniel Thompson Acked-by: Ard Biesheuvel Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-pci.c | 3 +++ 1 file changed, 3 insertions(+) commit dde634057da71a3505d7a6c0b77bb24ded6728c8 Author: Alexander Kappner Date: Thu Dec 21 15:06:14 2017 +0200 xhci: Fix use-after-free in xhci debugfs Trying to read from debugfs after the system has resumed from hibernate causes a use-after-free and thus a protection fault. Steps to reproduce: Hibernate system, resume from hibernate, then run $ cat /sys/kernel/debug/usb/xhci/*/command-ring/enqueue [ 3902.765086] general protection fault: 0000 [#1] PREEMPT SMP ... [ 3902.765136] RIP: 0010:xhci_trb_virt_to_dma.part.50+0x5/0x30 ... [ 3902.765178] Call Trace: [ 3902.765188] xhci_ring_enqueue_show+0x1e/0x40 [ 3902.765197] seq_read+0xdb/0x3a0 [ 3902.765204] ? __handle_mm_fault+0x5fb/0x1210 [ 3902.765211] full_proxy_read+0x4a/0x70 [ 3902.765219] __vfs_read+0x23/0x120 [ 3902.765228] vfs_read+0x8e/0x130 [ 3902.765235] SyS_read+0x42/0x90 [ 3902.765242] do_syscall_64+0x6b/0x290 [ 3902.765251] entry_SYSCALL64_slow_path+0x25/0x25 The issue is caused by the xhci ring structures being reallocated when the system is resumed, but pointers to the old structures being retained in the debugfs files "private" field: The proposed patch fixes this issue by storing a pointer to the xhci_ring field in the xhci device structure in debugfs rather than directly storing a pointer to the xhci_ring. Fixes: 02b6fdc2a153 ("usb: xhci: Add debugfs interface for xHCI driver") Signed-off-by: Alexander Kappner Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-debugfs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 052f71e25a7ecd80a9567b291df8ea333d9a8565 Author: Mathias Nyman Date: Thu Dec 21 15:06:13 2017 +0200 xhci: Fix xhci debugfs NULL pointer dereference in resume from hibernate Free the virt_device and its debugfs_private member together. When resuming from hibernate the .free_dev callback unconditionally freed the debugfs_private member, but could leave virt_device intact. This triggered a NULL pointer dereference after resume when usbmuxd sent a USBDEVFS_SETCONFIGURATION ioctl to a device, trying to add a endpoint debugfs entry to a already freed debugfs_private pointer. Fixes: 02b6fdc2a153 ("usb: xhci: Add debugfs interface for xHCI driver") Reported-by: Alexander Kappner Tested-by: Alexander Kappner Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 66da16850ee6f37920c807c07ceed25b251bc639 Merge: 76916b6 c6a36ad Author: Greg Kroah-Hartman Date: Wed Dec 27 15:21:31 2017 +0100 Merge tag 'usb-serial-4.15-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes USB-serial fixes for v4.15-rc6 Here are some new device ids for ftdi_sio, option and qcserial. Note that the qcserial patch enables the SetControlLineState request (used to raise DTR/RTS) for the GPS interface of all devices using the Sierra Wireless layout. This was required for the Sierra Wireless EM7565 and has been tested using several other modems as well. All but the final commit have been in linux-next without any reported issues. Signed-off-by: Johan Hovold commit c6a36ad383559a60a249aa6016cebf3cb8b6c485 Author: Max Schulze Date: Wed Dec 20 20:47:44 2017 +0100 USB: serial: ftdi_sio: add id for Airbus DS P8GR Add AIRBUS_DS_P8GR device IDs to ftdi_sio driver. Signed-off-by: Max Schulze Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/ftdi_sio.c | 1 + drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++ 2 files changed, 7 insertions(+) commit 44be77c590f381bc629815ac789b8b15ecc4ddcf Author: Takashi Iwai Date: Wed Dec 27 08:53:59 2017 +0100 ALSA: hda - Fix missing COEF init for ALC225/295/299 There was a long-standing problem on HP Spectre X360 with Kabylake where it lacks of the front speaker output in some situations. Also there are other products showing the similar behavior. The culprit seems to be the missing COEF setup on ALC codecs, ALC225/295/299, which are all compatible. This patch adds the proper COEF setup (to initialize idx 0x67 / bits 0x3000) for addressing the issue. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195457 Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit beacbc68ac3e23821a681adb30b45dc55b17488d Merge: e2a9300 47c332d Author: Linus Torvalds Date: Tue Dec 26 18:22:20 2017 -0800 Merge tag 'hwmon-for-linus-v4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fix from Guenter Roeck: "Handle errors from thermal subsystem" * tag 'hwmon-for-linus-v4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: Deal with errors from the thermal subsystem commit e2a930071d9abf6dccd5442ef499184c963f5df1 Merge: 464e1d5 8227033 Author: Linus Torvalds Date: Tue Dec 26 18:17:18 2017 -0800 Merge tag 'gpio-v4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Two fixes. They are both kind of important, so why not send a pull request on christmas eve. - Fix a build problem in the gpio single register created by refactorings. - Fix assignment of GPIO line names, something that was mangled by another patch" * tag 'gpio-v4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: fix "gpio-line-names" property retrieval gpio: gpio-reg: fix build commit 756efe131088b6e6e7f0124ff9c4e1f0165d3140 Author: Dong Aisheng Date: Fri Dec 22 17:46:04 2017 +0800 clk: use atomic runtime pm api in clk_core_is_enabled Current clk_pm_runtime_put is using pm_runtime_put_sync which is not safe to be called in clk_core_is_enabled as it should be able to run in atomic context. Thus use pm_runtime_put instead which is atomic safe. Cc: Stephen Boyd Cc: Michael Turquette Cc: Ulf Hansson Cc: Marek Szyprowski Fixes: 9a34b45397e5 ("clk: Add support for runtime PM") Signed-off-by: Dong Aisheng Reviewed-by: Ulf Hansson Signed-off-by: Stephen Boyd drivers/clk/clk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e100ff380ce936fc1e7ae8ba16621ddf5dddffcb Merge: 464e1d5 b26a231 Author: Dave Airlie Date: Wed Dec 27 09:58:57 2017 +1000 Merge branch 'linux-4.15' of git://github.com/skeggsb/linux into drm-fixes one nouveau regression fix * 'linux-4.15' of git://github.com/skeggsb/linux: drm/nouveau: fix race when adding delayed work items commit 6a6b0b9914e73a8a54253dd5f6f5e5dd5e4a756c Author: Mat Martineau Date: Thu Dec 21 10:29:09 2017 -0800 tcp: Avoid preprocessor directives in tracepoint macro args Using a preprocessor directive to check for CONFIG_IPV6 in the middle of a DECLARE_EVENT_CLASS macro's arg list causes sparse to report a series of errors: ./include/trace/events/tcp.h:68:1: error: directive in argument list ./include/trace/events/tcp.h:75:1: error: directive in argument list ./include/trace/events/tcp.h:144:1: error: directive in argument list ./include/trace/events/tcp.h:151:1: error: directive in argument list ./include/trace/events/tcp.h:216:1: error: directive in argument list ./include/trace/events/tcp.h:223:1: error: directive in argument list ./include/trace/events/tcp.h:274:1: error: directive in argument list ./include/trace/events/tcp.h:281:1: error: directive in argument list Once sparse finds an error, it stops printing warnings for the file it is checking. This masks any sparse warnings that would normally be reported for the core TCP code. Instead, handle the preprocessor conditionals in a couple of auxiliary macros. This also has the benefit of reducing duplicate code. Cc: David Ahern Signed-off-by: Mat Martineau Signed-off-by: David S. Miller include/trace/events/tcp.h | 97 ++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 60 deletions(-) commit 47c332deb8e89f6c59b0bb2615945c6e7fad1a60 Author: Linus Walleij Date: Tue Dec 5 09:36:14 2017 +0100 hwmon: Deal with errors from the thermal subsystem If the thermal subsystem returne -EPROBE_DEFER or any other error when hwmon calls devm_thermal_zone_of_sensor_register(), this is silently ignored. I ran into this with an incorrectly defined thermal zone, making it non-existing and thus this call failed with -EPROBE_DEFER assuming it would appear later. The sensor was still added which is incorrect: sensors must strictly be added after the thermal zones, so deferred probe must be respected. Fixes: d560168b5d0f ("hwmon: (core) New hwmon registration API") Signed-off-by: Linus Walleij Signed-off-by: Guenter Roeck drivers/hwmon/hwmon.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 3a33a19bf88cdfc6d982972bc6ffcf7a62c1015e Author: Jon Maloy Date: Thu Dec 21 14:36:34 2017 +0100 tipc: fix memory leak of group member when peer node is lost When a group member receives a member WITHDRAW event, this might have two reasons: either the peer member is leaving the group, or the link to the member's node has been lost. In the latter case we need to issue a DOWN event to the user right away, and let function tipc_group_filter_msg() perform delete of the member item. However, in this case we miss to change the state of the member item to MBR_LEAVING, so the member item is not deleted, and we have a memory leak. We now separate better between the four sub-cases of a WITHRAW event and make sure that each case is handled correctly. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/group.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit 4853f128c13ed2731625dff2410b7fdbe540fb26 Author: Jiri Pirko Date: Thu Dec 21 13:13:59 2017 +0100 net: sched: fix possible null pointer deref in tcf_block_put We need to check block for being null in both tcf_block_put and tcf_block_put_ext. Fixes: 343723dd51ef ("net: sched: fix clsact init error path") Reported-by: Prashant Bhole Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_api.c | 2 ++ 1 file changed, 2 insertions(+) commit 0a3d805c9c503e05d6e5d3868c53e92a06589dcf Author: Jon Maloy Date: Thu Dec 21 13:07:11 2017 +0100 tipc: base group replicast ack counter on number of actual receivers In commit 2f487712b893 ("tipc: guarantee that group broadcast doesn't bypass group unicast") we introduced a mechanism that requires the first (replicated) broadcast sent after a unicast to be acknowledged by all receivers before permitting sending of the next (true) broadcast. The counter for keeping track of the number of acknowledges to expect is based on the tipc_group::member_cnt variable. But this misses that some of the known members may not be ready for reception, and will never acknowledge the message, either because they haven't fully joined the group or because they are leaving the group. Such members are identified by not fulfilling the condition tested for in the function tipc_group_is_enabled(). We now set the counter for the actual number of acks to receive at the moment the message is sent, by just counting the number of recipients satisfying the tipc_group_is_enabled() test. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/group.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b2fb01f426883a794ed80be9110675a2d8356347 Author: Cong Wang Date: Wed Dec 20 23:26:24 2017 -0800 net_sched: fix a missing rcu barrier in mini_qdisc_pair_swap() The rcu_barrier_bh() in mini_qdisc_pair_swap() is to wait for flying RCU callback installed by a previous mini_qdisc_pair_swap(), however we miss it on the tp_head==NULL path, which leads to that the RCU callback still uses miniq_old->rcu after it is freed together with qdisc in qdisc_graft(). So just add it on that path too. Fixes: 46209401f8f6 ("net: core: introduce mini_Qdisc and eliminate usage of tp->q for clsact fastpath ") Reported-by: Jakub Kicinski Tested-by: Jakub Kicinski Cc: Jiri Pirko Cc: John Fastabend Signed-off-by: Cong Wang Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/sch_generic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c1a8d0a3accf64a014d605e6806ce05d1c17adf1 Author: Grygorii Strashko Date: Wed Dec 20 18:45:10 2017 -0600 net: phy: micrel: ksz9031: reconfigure autoneg after phy autoneg workaround Under some circumstances driver will perform PHY reset in ksz9031_read_status() to fix autoneg failure case (idle error count = 0xFF). When this happens ksz9031 will not detect link status change any more when connecting to Netgear 1G switch (link can be recovered sometimes by restarting netdevice "ifconfig down up"). Reproduced with TI am572x board equipped with ksz9031 PHY while connecting to Netgear 1G switch. Fix the issue by reconfiguring autonegotiation after PHY reset in ksz9031_read_status(). Fixes: d2fd719bcb0e ("net/phy: micrel: Add workaround for bad autoneg") Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/phy/micrel.c | 1 + 1 file changed, 1 insertion(+) commit e5a9336adb317db55eb3fe8200856096f3c71109 Author: Alexey Kodanev Date: Wed Dec 20 19:36:03 2017 +0300 ip6_gre: fix device features for ioctl setup When ip6gre is created using ioctl, its features, such as scatter-gather, GSO and tx-checksumming will be turned off: # ip -f inet6 tunnel add gre6 mode ip6gre remote fd00::1 # ethtool -k gre6 (truncated output) tx-checksumming: off scatter-gather: off tcp-segmentation-offload: off generic-segmentation-offload: off [requested on] But when netlink is used, they will be enabled: # ip link add gre6 type ip6gre remote fd00::1 # ethtool -k gre6 (truncated output) tx-checksumming: on scatter-gather: on tcp-segmentation-offload: on generic-segmentation-offload: on This results in a loss of performance when gre6 is created via ioctl. The issue was found with LTP/gre tests. Fix it by moving the setup of device features to a separate function and invoke it with ndo_init callback because both netlink and ioctl will eventually call it via register_netdevice(): register_netdevice() - ndo_init() callback -> ip6gre_tunnel_init() or ip6gre_tap_init() - ip6gre_tunnel_init_common() - ip6gre_tnl_init_features() The moved code also contains two minor style fixes: * removed needless tab from GRE6_FEATURES on NETIF_F_HIGHDMA line. * fixed the issue reported by checkpatch: "Unnecessary parentheses around 'nt->encap.type == TUNNEL_ENCAP_NONE'" Fixes: ac4eb009e477 ("ip6gre: Add support for basic offloads offloads excluding GSO") Signed-off-by: Alexey Kodanev Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 57 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 25 deletions(-) commit 8bea728dce8972e534e6b99fd550f7b5cc3864e8 Author: Hangbin Liu Date: Mon Dec 25 11:34:54 2017 +0800 netfilter: nf_tables: fix potential NULL-ptr deref in nf_tables_dump_obj_done() If there is no NFTA_OBJ_TABLE and NFTA_OBJ_TYPE, the c.data will be NULL in nf_tables_getobj(). So before free filter->table in nf_tables_dump_obj_done(), we need to check if filter is NULL first. Fixes: e46abbcc05aa ("netfilter: nf_tables: Allow table names of up to 255 chars") Signed-off-by: Hangbin Liu Acked-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 74ee0e8c1bf9925c59cc8f1c65c29adf6e4cf603 Author: Russell King Date: Wed Dec 20 23:21:34 2017 +0000 phylink: ensure AN is enabled Ensure that we mark AN as enabled at boot time, rather than leaving it disabled. This is noticable if your SFP module is fiber, and it supports faster speeds than 1G with 2.5G support in place. Fixes: 9525ae83959b ("phylink: add phylink infrastructure") Signed-off-by: Russell King Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 1 + 1 file changed, 1 insertion(+) commit 182088aa3c6c7f7c20a2c1dcc9ded4a3fc631f38 Author: Russell King Date: Wed Dec 20 23:21:28 2017 +0000 phylink: ensure the PHY interface mode is appropriately set When setting the ethtool settings, ensure that the validated PHY interface mode is propagated to the current link settings, so that 2500BaseX can be selected. Fixes: 9525ae83959b ("phylink: add phylink infrastructure") Signed-off-by: Russell King Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 1 + 1 file changed, 1 insertion(+) commit 464e1d5f23cca236b930ef068c328a64cab78fb1 Author: Linus Torvalds Date: Sat Dec 23 20:47:16 2017 -0800 Linux 4.15-rc5 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0ee554906c3d6554fbddf95ae664cd9f817082b Author: Eric W. Biederman Date: Fri Dec 22 12:37:43 2017 -0600 pid: Handle failure to allocate the first pid in a pid namespace With the replacement of the pid bitmap and hashtable with an idr in alloc_pid started occassionally failing when allocating the first pid in a pid namespace. Things were not completely reset resulting in the first allocated pid getting the number 2 (not 1). Which further resulted in ns->proc_mnt not getting set and eventually causing an oops in proc_flush_task. Oops: 0000 [#1] SMP CPU: 2 PID: 6743 Comm: trinity-c117 Not tainted 4.15.0-rc4-think+ #2 RIP: 0010:proc_flush_task+0x8e/0x1b0 RSP: 0018:ffffc9000bbffc40 EFLAGS: 00010286 RAX: 0000000000000001 RBX: 0000000000000001 RCX: 00000000fffffffb RDX: 0000000000000000 RSI: ffffc9000bbffc50 RDI: 0000000000000000 RBP: ffffc9000bbffc63 R08: 0000000000000000 R09: 0000000000000002 R10: ffffc9000bbffb70 R11: ffffc9000bbffc64 R12: 0000000000000003 R13: 0000000000000000 R14: 0000000000000003 R15: ffff8804c10d7840 FS: 00007f7cb8965700(0000) GS:ffff88050a200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000003e21ae003 CR4: 00000000001606e0 DR0: 00007fb1d6c22000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 Call Trace: ? release_task+0xaf/0x680 release_task+0xd2/0x680 ? wait_consider_task+0xb82/0xce0 wait_consider_task+0xbe9/0xce0 ? do_wait+0xe1/0x330 do_wait+0x151/0x330 kernel_wait4+0x8d/0x150 ? task_stopped_code+0x50/0x50 SYSC_wait4+0x95/0xa0 ? rcu_read_lock_sched_held+0x6c/0x80 ? syscall_trace_enter+0x2d7/0x340 ? do_syscall_64+0x60/0x210 do_syscall_64+0x60/0x210 entry_SYSCALL64_slow_path+0x25/0x25 RIP: 0033:0x7f7cb82603aa RSP: 002b:00007ffd60770bc8 EFLAGS: 00000246 ORIG_RAX: 000000000000003d RAX: ffffffffffffffda RBX: 00007f7cb6cd4000 RCX: 00007f7cb82603aa RDX: 000000000000000b RSI: 00007ffd60770bd0 RDI: 0000000000007cca RBP: 0000000000007cca R08: 00007f7cb8965700 R09: 00007ffd607c7080 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd60770bd0 R14: 00007f7cb6cd4058 R15: 00000000cccccccd Code: c1 e2 04 44 8b 60 30 48 8b 40 38 44 8b 34 11 48 c7 c2 60 3a f5 81 44 89 e1 4c 8b 68 58 e8 4b b4 77 00 89 44 24 14 48 8d 74 24 10 <49> 8b 7d 00 e8 b9 6a f9 ff 48 85 c0 74 1a 48 89 c7 48 89 44 24 RIP: proc_flush_task+0x8e/0x1b0 RSP: ffffc9000bbffc40 CR2: 0000000000000000 ---[ end trace 53d67a6481059862 ]--- Improve the quality of the implementation by resetting the place to start allocating pids on failure to allocate the first pid. As improving the quality of the implementation is the goal remove the now unnecesarry disable_pid_allocations call when we fail to mount proc. Fixes: 95846ecf9dac ("pid: replace pid bitmap implementation with IDR API") Fixes: 8ef047aaaeb8 ("pid namespaces: make alloc_pid(), free_pid() and put_pid() work with struct upid") Reported-by: Dave Jones Signed-off-by: "Eric W. Biederman" kernel/pid.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit d1f854ac240ea3928a99294390048e9b2aa6fa0e Merge: caf9a82 24e3a7f Author: Linus Torvalds Date: Sat Dec 23 13:47:22 2017 -0800 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "These fixes are all tagged for -stable and have received a build success notification from the kbuild robot. - NVDIMM namespaces, configured to enforce 1GB alignment, fail to initialize on platforms that mis-align the start or end of the physical address range. - The Linux implementation of the BTT (Block Translation Table) is incompatible with the UEFI 2.7 definition of the BTT format. The BTT layers a software atomic sector semantic on top of an NVDIMM namespace. Linux needs to be compatible with the UEFI definition to enable boot support or any pre-OS access of data on a BTT enabled namespace. - A fix for ACPI SMART notification events, this allows a userspace monitor to register for health events rather than poll. This has been broken since it was initially merged as the unit test inadvertently worked around the problem. The urgency for fixing this during the -rc series is driven by how expensive it is to poll for this data (System Management Mode entry)" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: libnvdimm, btt: Fix an incompatibility in the log layout libnvdimm, btt: add a couple of missing kernel-doc lines libnvdimm, dax: fix 1GB-aligned namespaces vs physical misalignment libnvdimm, pfn: fix start_pad handling for aligned namespaces acpi, nfit: fix health event notification commit 9f5cb6b32d9e0a3a7453222baaf15664d92adbf2 Author: Thomas Gleixner Date: Fri Dec 15 20:35:11 2017 +0100 x86/ldt: Make the LDT mapping RO Now that the LDT mapping is in a known area when PAGE_TABLE_ISOLATION is enabled its a primary target for attacks, if a user space interface fails to validate a write address correctly. That can never happen, right? The SDM states: If the segment descriptors in the GDT or an LDT are placed in ROM, the processor can enter an indefinite loop if software or the processor attempts to update (write to) the ROM-based segment descriptors. To prevent this problem, set the accessed bits for all segment descriptors placed in a ROM. Also, remove operating-system or executive code that attempts to modify segment descriptors located in ROM. So its a valid approach to set the ACCESS bit when setting up the LDT entry and to map the table RO. Fixup the selftest so it can handle that new mode. Remove the manual ACCESS bit setter in set_tls_desc() as this is now pointless. Folded the patch from Peter Ziljstra. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 2 ++ arch/x86/kernel/ldt.c | 7 ++++++- arch/x86/kernel/tls.c | 11 ++--------- tools/testing/selftests/x86/ldt_gdt.c | 3 +-- 4 files changed, 11 insertions(+), 12 deletions(-) commit a4b51ef6552c704764684cef7e753162dc87c5fa Author: Thomas Gleixner Date: Mon Dec 4 15:08:06 2017 +0100 x86/mm/dump_pagetables: Allow dumping current pagetables Add two debugfs files which allow to dump the pagetable of the current task. current_kernel dumps the regular page table. This is the page table which is normally shared between kernel and user space. If kernel page table isolation is enabled this is the kernel space mapping. If kernel page table isolation is enabled the second file, current_user, dumps the user space page table. These files allow to verify the resulting page tables for page table isolation, but even in the normal case its useful to be able to inspect user space page tables of current for debugging purposes. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable.h | 2 +- arch/x86/mm/debug_pagetables.c | 71 +++++++++++++++++++++++++++++++++++++++--- arch/x86/mm/dump_pagetables.c | 6 +++- 3 files changed, 73 insertions(+), 6 deletions(-) commit b4bf4f924b1d7bade38fd51b2e401d20d0956e4d Author: Thomas Gleixner Date: Mon Dec 4 15:08:05 2017 +0100 x86/mm/dump_pagetables: Check user space page table for WX pages ptdump_walk_pgd_level_checkwx() checks the kernel page table for WX pages, but does not check the PAGE_TABLE_ISOLATION user space page table. Restructure the code so that dmesg output is selected by an explicit argument and not implicit via checking the pgd argument for !NULL. Add the check for the user space page table. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable.h | 1 + arch/x86/mm/debug_pagetables.c | 2 +- arch/x86/mm/dump_pagetables.c | 30 +++++++++++++++++++++++++----- 3 files changed, 27 insertions(+), 6 deletions(-) commit 75298aa179d56cd64f54e58a19fffc8ab922b4c0 Author: Borislav Petkov Date: Mon Dec 4 15:08:04 2017 +0100 x86/mm/dump_pagetables: Add page table directory to the debugfs VFS hierarchy The upcoming support for dumping the kernel and the user space page tables of the current process would create more random files in the top level debugfs directory. Add a page table directory and move the existing file to it. Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/mm/debug_pagetables.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 385ce0ea4c078517fa51c261882c4e72fba53005 Author: Dave Hansen Date: Mon Dec 4 15:08:03 2017 +0100 x86/mm/pti: Add Kconfig Finally allow CONFIG_PAGE_TABLE_ISOLATION to be enabled. PARAVIRT generally requires that the kernel not manage its own page tables. It also means that the hypervisor and kernel must agree wholeheartedly about what format the page tables are in and what they contain. PAGE_TABLE_ISOLATION, unfortunately, changes the rules and they can not be used together. I've seen conflicting feedback from maintainers lately about whether they want the Kconfig magic to go first or last in a patch series. It's going last here because the partially-applied series leads to kernels that can not boot in a bunch of cases. I did a run through the entire series with CONFIG_PAGE_TABLE_ISOLATION=y to look for build errors, though. [ tglx: Removed SMP and !PARAVIRT dependencies as they not longer exist ] Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar security/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 5f26d76c3fd67c48806415ef8b1116c97beff8ba Author: Vlastimil Babka Date: Tue Dec 19 22:33:46 2017 +0100 x86/dumpstack: Indicate in Oops whether PTI is configured and enabled CONFIG_PAGE_TABLE_ISOLATION is relatively new and intrusive feature that may still have some corner cases which could take some time to manifest and be fixed. It would be useful to have Oops messages indicate whether it was enabled for building the kernel, and whether it was disabled during boot. Example of fully enabled: Oops: 0001 [#1] SMP PTI Example of enabled during build, but disabled during boot: Oops: 0001 [#1] SMP NOPTI We can decide to remove this after the feature has been tested in the field long enough. [ tglx: Made it use boot_cpu_has() as requested by Borislav ] Signed-off-by: Vlastimil Babka Signed-off-by: Thomas Gleixner Reviewed-by: Eduardo Valentin Acked-by: Dave Hansen Cc: Andy Lutomirski Cc: Andy Lutomirsky Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: bpetkov@suse.de Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: jkosina@suse.cz Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0a126abd576ebc6403f063dbe20cf7416c9d9393 Author: Peter Zijlstra Date: Tue Dec 5 13:34:53 2017 +0100 x86/mm: Clarify the whole ASID/kernel PCID/user PCID naming Ideally we'd also use sparse to enforce this separation so it becomes much more difficult to mess up. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/include/asm/tlbflush.h | 55 ++++++++++++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 12 deletions(-) commit 6cff64b86aaaa07f89f50498055a20e45754b0c1 Author: Dave Hansen Date: Mon Dec 4 15:08:01 2017 +0100 x86/mm: Use INVPCID for __native_flush_tlb_single() This uses INVPCID to shoot down individual lines of the user mapping instead of marking the entire user map as invalid. This could/might/possibly be faster. This for sure needs tlb_single_page_flush_ceiling to be redetermined; esp. since INVPCID is _slow_. A detailed performance analysis is available here: https://lkml.kernel.org/r/3062e486-3539-8a1f-5724-16199420be71@intel.com [ Peterz: Split out from big combo patch ] Signed-off-by: Dave Hansen Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/tlbflush.h | 23 +++++++++++++- arch/x86/mm/init.c | 64 ++++++++++++++++++++++---------------- 3 files changed, 60 insertions(+), 28 deletions(-) commit 21e94459110252d41b45c0c8ba50fd72a664d50c Author: Peter Zijlstra Date: Mon Dec 4 15:08:00 2017 +0100 x86/mm: Optimize RESTORE_CR3 Most NMI/paranoid exceptions will not in fact change pagetables and would thus not require TLB flushing, however RESTORE_CR3 uses flushing CR3 writes. Restores to kernel PCIDs can be NOFLUSH, because we explicitly flush the kernel mappings and now that we track which user PCIDs need flushing we can avoid those too when possible. This does mean RESTORE_CR3 needs an additional scratch_reg, luckily both sites have plenty available. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/entry/calling.h | 30 ++++++++++++++++++++++++++++-- arch/x86/entry/entry_64.S | 4 ++-- 2 files changed, 30 insertions(+), 4 deletions(-) commit 6fd166aae78c0ab738d49bda653cbd9e3b1491cf Author: Peter Zijlstra Date: Mon Dec 4 15:07:59 2017 +0100 x86/mm: Use/Fix PCID to optimize user/kernel switches We can use PCID to retain the TLBs across CR3 switches; including those now part of the user/kernel switch. This increases performance of kernel entry/exit at the cost of more expensive/complicated TLB flushing. Now that we have two address spaces, one for kernel and one for user space, we need two PCIDs per mm. We use the top PCID bit to indicate a user PCID (just like we use the PFN LSB for the PGD). Since we do TLB invalidation from kernel space, the existing code will only invalidate the kernel PCID, we augment that by marking the corresponding user PCID invalid, and upon switching back to userspace, use a flushing CR3 write for the switch. In order to access the user_pcid_flush_mask we use PER_CPU storage, which means the previously established SWAPGS vs CR3 ordering is now mandatory and required. Having to do this memory access does require additional registers, most sites have a functioning stack and we can spill one (RAX), sites without functional stack need to otherwise provide the second scratch register. Note: PCID is generally available on Intel Sandybridge and later CPUs. Note: Up until this point TLB flushing was broken in this series. Based-on-code-from: Dave Hansen Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/entry/calling.h | 72 ++++++++++++++++++----- arch/x86/entry/entry_64.S | 9 +-- arch/x86/entry/entry_64_compat.S | 4 +- arch/x86/include/asm/processor-flags.h | 5 ++ arch/x86/include/asm/tlbflush.h | 91 +++++++++++++++++++++++++---- arch/x86/include/uapi/asm/processor-flags.h | 7 ++- arch/x86/kernel/asm-offsets.c | 4 ++ arch/x86/mm/init.c | 2 +- arch/x86/mm/tlb.c | 1 + 9 files changed, 162 insertions(+), 33 deletions(-) commit 48e111982cda033fec832c6b0592c2acedd85d04 Author: Dave Hansen Date: Mon Dec 4 15:07:58 2017 +0100 x86/mm: Abstract switching CR3 In preparation to adding additional PCID flushing, abstract the loading of a new ASID into CR3. [ PeterZ: Split out from big combo patch ] Signed-off-by: Dave Hansen Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/mm/tlb.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 2ea907c4fe7b78e5840c1dc07800eae93248cad1 Author: Dave Hansen Date: Mon Dec 4 15:07:57 2017 +0100 x86/mm: Allow flushing for future ASID switches If changing the page tables in such a way that an invalidation of all contexts (aka. PCIDs / ASIDs) is required, they can be actively invalidated by: 1. INVPCID for each PCID (works for single pages too). 2. Load CR3 with each PCID without the NOFLUSH bit set 3. Load CR3 with the NOFLUSH bit set for each and do INVLPG for each address. But, none of these are really feasible since there are ~6 ASIDs (12 with PAGE_TABLE_ISOLATION) at the time that invalidation is required. Instead of actively invalidating them, invalidate the *current* context and also mark the cpu_tlbstate _quickly_ to indicate future invalidation to be required. At the next context-switch, look for this indicator ('invalidate_other' being set) invalidate all of the cpu_tlbstate.ctxs[] entries. This ensures that any future context switches will do a full flush of the TLB, picking up the previous changes. [ tglx: Folded more fixups from Peter ] Signed-off-by: Dave Hansen Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/include/asm/tlbflush.h | 37 +++++++++++++++++++++++++++++-------- arch/x86/mm/tlb.c | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 8 deletions(-) commit 85900ea51577e31b186e523c8f4e068c79ecc7d3 Author: Andy Lutomirski Date: Tue Dec 12 07:56:42 2017 -0800 x86/pti: Map the vsyscall page if needed Make VSYSCALLs work fully in PTI mode by mapping them properly to the user space visible page tables. [ tglx: Hide unused functions (Patch by Arnd Bergmann) ] Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Signed-off-by: Ingo Molnar arch/x86/entry/vsyscall/vsyscall_64.c | 6 ++-- arch/x86/include/asm/vsyscall.h | 1 + arch/x86/mm/pti.c | 65 +++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 3 deletions(-) commit f55f0501cbf65ec41cca5058513031b711730b1d Author: Andy Lutomirski Date: Tue Dec 12 07:56:45 2017 -0800 x86/pti: Put the LDT in its own PGD if PTI is on With PTI enabled, the LDT must be mapped in the usermode tables somewhere. The LDT is per process, i.e. per mm. An earlier approach mapped the LDT on context switch into a fixmap area, but that's a big overhead and exhausted the fixmap space when NR_CPUS got big. Take advantage of the fact that there is an address space hole which provides a completely unused pgd. Use this pgd to manage per-mm LDT mappings. This has a down side: the LDT isn't (currently) randomized, and an attack that can write the LDT is instant root due to call gates (thanks, AMD, for leaving call gates in AMD64 but designing them wrong so they're only useful for exploits). This can be mitigated by making the LDT read-only or randomizing the mapping, either of which is strightforward on top of this patch. This will significantly slow down LDT users, but that shouldn't matter for important workloads -- the LDT is only used by DOSEMU(2), Wine, and very old libc implementations. [ tglx: Cleaned it up. ] Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Kirill A. Shutemov Cc: Linus Torvalds Cc: Peter Zijlstra Signed-off-by: Ingo Molnar Documentation/x86/x86_64/mm.txt | 3 +- arch/x86/include/asm/mmu_context.h | 59 ++++++++++++-- arch/x86/include/asm/pgtable_64_types.h | 4 + arch/x86/include/asm/processor.h | 23 ++++-- arch/x86/kernel/ldt.c | 139 +++++++++++++++++++++++++++++++- arch/x86/mm/dump_pagetables.c | 9 +++ 6 files changed, 220 insertions(+), 17 deletions(-) commit 9f449772a3106bcdd4eb8fdeb281147b0e99fb30 Author: Andy Lutomirski Date: Tue Dec 12 07:56:44 2017 -0800 x86/mm/64: Make a full PGD-entry size hole in the memory map Shrink vmalloc space from 16384TiB to 12800TiB to enlarge the hole starting at 0xff90000000000000 to be a full PGD entry. A subsequent patch will use this hole for the pagetable isolation LDT alias. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Kirill A. Shutemov Cc: Linus Torvalds Cc: Peter Zijlstra Signed-off-by: Ingo Molnar Documentation/x86/x86_64/mm.txt | 4 ++-- arch/x86/include/asm/pgtable_64_types.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit c1961a4631daef4aeabee8e368b1b13e8f173c91 Author: Hugh Dickins Date: Mon Dec 4 15:07:50 2017 +0100 x86/events/intel/ds: Map debug buffers in cpu_entry_area The BTS and PEBS buffers both have their virtual addresses programmed into the hardware. This means that any access to them is performed via the page tables. The times that the hardware accesses these are entirely dependent on how the performance monitoring hardware events are set up. In other words, there is no way for the kernel to tell when the hardware might access these buffers. To avoid perf crashes, place 'debug_store' allocate pages and map them into the cpu_entry_area. The PEBS fixup buffer does not need this treatment. [ tglx: Got rid of the kaiser_add_mapping() complication ] Signed-off-by: Hugh Dickins Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/events/intel/ds.c | 125 +++++++++++++++++++++++++++---------------- arch/x86/events/perf_event.h | 2 + 2 files changed, 82 insertions(+), 45 deletions(-) commit 10043e02db7f8a4161f76434931051e7d797a5f6 Author: Thomas Gleixner Date: Mon Dec 4 15:07:49 2017 +0100 x86/cpu_entry_area: Add debugstore entries to cpu_entry_area The Intel PEBS/BTS debug store is a design trainwreck as it expects virtual addresses which must be visible in any execution context. So it is required to make these mappings visible to user space when kernel page table isolation is active. Provide enough room for the buffer mappings in the cpu_entry_area so the buffers are available in the user space visible page tables. At the point where the kernel side entry area is populated there is no buffer available yet, but the kernel PMD must be populated. To achieve this set the entries for these buffers to non present. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/events/intel/ds.c | 5 +++-- arch/x86/events/perf_event.h | 21 ++------------------ arch/x86/include/asm/cpu_entry_area.h | 13 +++++++++++++ arch/x86/include/asm/intel_ds.h | 36 +++++++++++++++++++++++++++++++++++ arch/x86/mm/cpu_entry_area.c | 27 ++++++++++++++++++++++++++ 5 files changed, 81 insertions(+), 21 deletions(-) commit 4b6bbe95b87966ba08999574db65c93c5e925a36 Author: Andy Lutomirski Date: Fri Dec 15 22:08:18 2017 +0100 x86/mm/pti: Map ESPFIX into user space Map the ESPFIX pages into user space when PTI is enabled. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Signed-off-by: Ingo Molnar arch/x86/mm/pti.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6dc72c3cbca0580642808d677181cad4c6433893 Author: Thomas Gleixner Date: Mon Dec 4 15:07:47 2017 +0100 x86/mm/pti: Share entry text PMD Share the entry text PMD of the kernel mapping with the user space mapping. If large pages are enabled this is a single PMD entry and at the point where it is copied into the user page table the RW bit has not been cleared yet. Clear it right away so the user space visible map becomes RX. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/mm/pti.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2f7412ba9c6af5ab16bdbb4a3fdb1dcd2b4fd3c2 Author: Thomas Gleixner Date: Mon Dec 4 15:07:46 2017 +0100 x86/entry: Align entry text section to PMD boundary The (irq)entry text must be visible in the user space page tables. To allow simple PMD based sharing, make the entry text PMD aligned. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/kernel/vmlinux.lds.S | 8 ++++++++ 1 file changed, 8 insertions(+) commit f7cfbee91559ca7e3e961a00ffac921208a115ad Author: Andy Lutomirski Date: Mon Dec 4 15:07:45 2017 +0100 x86/mm/pti: Share cpu_entry_area with user space page tables Share the cpu entry area so the user space and kernel space page tables have the same P4D page. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/mm/pti.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 8d4b067895791ab9fdb1aadfc505f64d71239dd2 Author: Thomas Gleixner Date: Mon Dec 4 15:07:43 2017 +0100 x86/mm/pti: Force entry through trampoline when PTI active Force the entry through the trampoline only when PTI is active. Otherwise go through the normal entry code. Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 03f4424f348e8be95eb1bbeba09461cd7b867828 Author: Andy Lutomirski Date: Mon Dec 4 15:07:42 2017 +0100 x86/mm/pti: Add functions to clone kernel PMDs Provide infrastructure to: - find a kernel PMD for a mapping which must be visible to user space for the entry/exit code to work. - walk an address range and share the kernel PMD with it. This reuses a small part of the original KAISER patches to populate the user space page table. [ tglx: Made it universally usable so it can be used for any kind of shared mapping. Add a mechanism to clear specific bits in the user space visible PMD entry. Folded Andys simplifactions ] Originally-by: Dave Hansen Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/mm/pti.c | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) commit fc2fbc8512ed08d1de7720936fd7d2e4ce02c3a2 Author: Dave Hansen Date: Mon Dec 4 15:07:40 2017 +0100 x86/mm/pti: Populate user PGD In clone_pgd_range() copy the init user PGDs which cover the kernel half of the address space, so a process has all the required kernel mappings visible. [ tglx: Split out from the big kaiser dump and folded Andys simplification ] Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit d9e9a6418065bb376e5de8d93ce346939b9a37a6 Author: Dave Hansen Date: Mon Dec 4 15:07:39 2017 +0100 x86/mm/pti: Allocate a separate user PGD Kernel page table isolation requires to have two PGDs. One for the kernel, which contains the full kernel mapping plus the user space mapping and one for user space which contains the user space mappings and the minimal set of kernel mappings which are required by the architecture to be able to transition from and to user space. Add the necessary preliminaries. [ tglx: Split out from the big kaiser dump. EFI fixup from Kirill ] Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/include/asm/pgalloc.h | 11 +++++++++++ arch/x86/kernel/head_64.S | 30 +++++++++++++++++++++++++++--- arch/x86/mm/pgtable.c | 5 +++-- arch/x86/platform/efi/efi_64.c | 5 ++++- 4 files changed, 45 insertions(+), 6 deletions(-) commit 1c4de1ff4fe50453b968579ee86fac3da80dd783 Author: Dave Hansen Date: Mon Dec 4 15:07:38 2017 +0100 x86/mm/pti: Allow NX poison to be set in p4d/pgd With PAGE_TABLE_ISOLATION the user portion of the kernel page tables is poisoned with the NX bit so if the entry code exits with the kernel page tables selected in CR3, userspace crashes. But doing so trips the p4d/pgd_bad() checks. Make sure it does not do that. Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 61e9b3671007a5da8127955a1a3bda7e0d5f42e8 Author: Dave Hansen Date: Mon Dec 4 15:07:37 2017 +0100 x86/mm/pti: Add mapping helper functions Add the pagetable helper functions do manage the separate user space page tables. [ tglx: Split out from the big combo kaiser patch. Folded Andys simplification and made it out of line as Boris suggested ] Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable.h | 6 ++- arch/x86/include/asm/pgtable_64.h | 92 +++++++++++++++++++++++++++++++++++++++ arch/x86/mm/pti.c | 41 +++++++++++++++++ 3 files changed, 138 insertions(+), 1 deletion(-) commit 41f4c20b57a4890ea7f56ff8717cc83fefb8d537 Author: Borislav Petkov Date: Tue Dec 12 14:39:52 2017 +0100 x86/pti: Add the pti= cmdline option and documentation Keep the "nopti" optional for traditional reasons. [ tglx: Don't allow force on when running on XEN PV and made 'on' printout conditional ] Requested-by: Linus Torvalds Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Andy Lutomirsky Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171212133952.10177-1-bp@alien8.de Signed-off-by: Ingo Molnar Documentation/admin-guide/kernel-parameters.txt | 6 ++++++ arch/x86/mm/pti.c | 26 ++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) commit aa8c6248f8c75acfd610fe15d8cae23cf70d9d09 Author: Thomas Gleixner Date: Mon Dec 4 15:07:36 2017 +0100 x86/mm/pti: Add infrastructure for page table isolation Add the initial files for kernel page table isolation, with a minimal init function and the boot time detection for this misfeature. Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Signed-off-by: Ingo Molnar Documentation/admin-guide/kernel-parameters.txt | 2 + arch/x86/boot/compressed/pagetable.c | 3 + arch/x86/entry/calling.h | 7 +++ arch/x86/include/asm/pti.h | 14 +++++ arch/x86/mm/Makefile | 7 ++- arch/x86/mm/init.c | 2 + arch/x86/mm/pti.c | 84 +++++++++++++++++++++++++ include/linux/pti.h | 11 ++++ init/main.c | 3 + 9 files changed, 130 insertions(+), 3 deletions(-) commit 8a09317b895f073977346779df52f67c1056d81d Author: Dave Hansen Date: Mon Dec 4 15:07:35 2017 +0100 x86/mm/pti: Prepare the x86/entry assembly code for entry/exit CR3 switching PAGE_TABLE_ISOLATION needs to switch to a different CR3 value when it enters the kernel and switch back when it exits. This essentially needs to be done before leaving assembly code. This is extra challenging because the switching context is tricky: the registers that can be clobbered can vary. It is also hard to store things on the stack because there is an established ABI (ptregs) or the stack is entirely unsafe to use. Establish a set of macros that allow changing to the user and kernel CR3 values. Interactions with SWAPGS: Previous versions of the PAGE_TABLE_ISOLATION code relied on having per-CPU scratch space to save/restore a register that can be used for the CR3 MOV. The %GS register is used to index into our per-CPU space, so SWAPGS *had* to be done before the CR3 switch. That scratch space is gone now, but the semantic that SWAPGS must be done before the CR3 MOV is retained. This is good to keep because it is not that hard to do and it allows to do things like add per-CPU debugging information. What this does in the NMI code is worth pointing out. NMIs can interrupt *any* context and they can also be nested with NMIs interrupting other NMIs. The comments below ".Lnmi_from_kernel" explain the format of the stack during this situation. Changing the format of this stack is hard. Instead of storing the old CR3 value on the stack, this depends on the *regular* register save/restore mechanism and then uses %r14 to keep CR3 during the NMI. It is callee-saved and will not be clobbered by the C NMI handlers that get called. [ PeterZ: ESPFIX optimization ] Based-on-code-from: Andy Lutomirski Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/entry/calling.h | 66 ++++++++++++++++++++++++++++++++++++++++ arch/x86/entry/entry_64.S | 45 +++++++++++++++++++++++---- arch/x86/entry/entry_64_compat.S | 24 ++++++++++++++- 3 files changed, 128 insertions(+), 7 deletions(-) commit c313ec66317d421fb5768d78c56abed2dc862264 Author: Dave Hansen Date: Mon Dec 4 15:07:34 2017 +0100 x86/mm/pti: Disable global pages if PAGE_TABLE_ISOLATION=y Global pages stay in the TLB across context switches. Since all contexts share the same kernel mapping, these mappings are marked as global pages so kernel entries in the TLB are not flushed out on a context switch. But, even having these entries in the TLB opens up something that an attacker can use, such as the double-page-fault attack: http://www.ieee-security.org/TC/SP2013/papers/4977a191.pdf That means that even when PAGE_TABLE_ISOLATION switches page tables on return to user space the global pages would stay in the TLB cache. Disable global pages so that kernel TLB entries can be flushed before returning to user space. This way, all accesses to kernel addresses from userspace result in a TLB miss independent of the existence of a kernel mapping. Suppress global pages via the __supported_pte_mask. The user space mappings set PAGE_GLOBAL for the minimal kernel mappings which are required for entry/exit. These mappings are set up manually so the filtering does not take place. [ The __supported_pte_mask simplification was written by Thomas Gleixner. ] Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/mm/init.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit a89f040fa34ec9cd682aed98b8f04e3c47d998bd Author: Thomas Gleixner Date: Mon Dec 4 15:07:33 2017 +0100 x86/cpufeatures: Add X86_BUG_CPU_INSECURE Many x86 CPUs leak information to user space due to missing isolation of user space and kernel space page tables. There are many well documented ways to exploit that. The upcoming software migitation of isolating the user and kernel space page tables needs a misfeature flag so code can be made runtime conditional. Add the BUG bits which indicates that the CPU is affected and add a feature bit which indicates that the software migitation is enabled. Assume for now that _ALL_ x86 CPUs are affected by this. Exceptions can be made later. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 3 ++- arch/x86/include/asm/disabled-features.h | 8 +++++++- arch/x86/kernel/cpu/common.c | 4 ++++ 3 files changed, 13 insertions(+), 2 deletions(-) commit caf9a82657b313106aae8f4a35936c116a152299 Merge: 9c294ec f6c4fd5 Author: Linus Torvalds Date: Sat Dec 23 11:53:04 2017 -0800 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 PTI preparatory patches from Thomas Gleixner: "Todays Advent calendar window contains twentyfour easy to digest patches. The original plan was to have twenty three matching the date, but a late fixup made that moot. - Move the cpu_entry_area mapping out of the fixmap into a separate address space. That's necessary because the fixmap becomes too big with NRCPUS=8192 and this caused already subtle and hard to diagnose failures. The top most patch is fresh from today and cures a brain slip of that tall grumpy german greybeard, who ignored the intricacies of 32bit wraparounds. - Limit the number of CPUs on 32bit to 64. That's insane big already, but at least it's small enough to prevent address space issues with the cpu_entry_area map, which have been observed and debugged with the fixmap code - A few TLB flush fixes in various places plus documentation which of the TLB functions should be used for what. - Rename the SYSENTER stack to CPU_ENTRY_AREA stack as it is used for more than sysenter now and keeping the name makes backtraces confusing. - Prevent LDT inheritance on exec() by moving it to arch_dup_mmap(), which is only invoked on fork(). - Make vysycall more robust. - A few fixes and cleanups of the debug_pagetables code. Check PAGE_PRESENT instead of checking the PTE for 0 and a cleanup of the C89 initialization of the address hint array which already was out of sync with the index enums. - Move the ESPFIX init to a different place to prepare for PTI. - Several code moves with no functional change to make PTI integration simpler and header files less convoluted. - Documentation fixes and clarifications" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) x86/cpu_entry_area: Prevent wraparound in setup_cpu_entry_area_ptes() on 32bit init: Invoke init_espfix_bsp() from mm_init() x86/cpu_entry_area: Move it out of the fixmap x86/cpu_entry_area: Move it to a separate unit x86/mm: Create asm/invpcid.h x86/mm: Put MMU to hardware ASID translation in one place x86/mm: Remove hard-coded ASID limit checks x86/mm: Move the CR3 construction functions to tlbflush.h x86/mm: Add comments to clarify which TLB-flush functions are supposed to flush what x86/mm: Remove superfluous barriers x86/mm: Use __flush_tlb_one() for kernel memory x86/microcode: Dont abuse the TLB-flush interface x86/uv: Use the right TLB-flush API x86/entry: Rename SYSENTER_stack to CPU_ENTRY_AREA_entry_stack x86/doc: Remove obvious weirdnesses from the x86 MM layout documentation x86/mm/64: Improve the memory map documentation x86/ldt: Prevent LDT inheritance on exec x86/ldt: Rework locking arch, mm: Allow arch_dup_mmap() to fail x86/vsyscall/64: Warn and fail vsyscall emulation in NATIVE mode ... commit f6c4fd506cb626e4346aa81688f255e593a7c5a0 Author: Thomas Gleixner Date: Sat Dec 23 19:45:11 2017 +0100 x86/cpu_entry_area: Prevent wraparound in setup_cpu_entry_area_ptes() on 32bit The loop which populates the CPU entry area PMDs can wrap around on 32bit machines when the number of CPUs is small. It worked wonderful for NR_CPUS=64 for whatever reason and the moron who wrote that code did not bother to test it with !SMP. Check for the wraparound to fix it. Fixes: 92a0f81d8957 ("x86/cpu_entry_area: Move it out of the fixmap") Reported-by: kernel test robot Signed-off-by: Thomas "Feels stupid" Gleixner Tested-by: Borislav Petkov arch/x86/mm/cpu_entry_area.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8a42d3fc9dfccbf601c5f58f46dc3cdbc1a4b923 Author: Martin Blumenstingl Date: Fri Dec 15 13:42:04 2017 +0000 nvmem: meson-mx-efuse: fix reading from an offset other than 0 meson_mx_efuse_read calculates the address internal to the eFuse based on the offset and the word size. This works fine with any given offset. However, the offset is also included when writing to the output buffer. This means that reading 4 bytes at offset 500 tries to write beyond the array allocated by the nvmem core as it wants to write the 4 bytes to "buffer address + offset (500)". This issue did not show up in the previous tests since no driver uses any value from the eFuse yet and reading the eFuse via sysfs simply reads the whole eFuse, starting at offset 0. Fix this by only including the offset in the internal address calculation. Fixes: 8caef1fa9176 ("nvmem: add a driver for the Amlogic Meson6/Meson8/Meson8b SoCs") Signed-off-by: Martin Blumenstingl Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/meson-mx-efuse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aee657460a8ce66443d5e7413046d02d7b2165db Merge: cd95a89 8207c6d Author: Daniel Borkmann Date: Sat Dec 23 01:09:53 2017 +0100 Merge branch 'bpf-bpftool-various-fixes' Jakub Kicinski says: ==================== Two small fixes here to listing maps and programs. The loop for showing maps is written slightly differently to programs which was missed in JSON output support, and output would be broken if any of the system calls failed. Second fix is in very unlikely case that program or map disappears after we get its ID we should just skip over that object instead of failing. ==================== Signed-off-by: Daniel Borkmann commit 8207c6dd4746c345b689684c4cd0ce00a18c7ef2 Author: Jakub Kicinski Date: Fri Dec 22 11:36:06 2017 -0800 tools: bpftool: protect against races with disappearing objects On program/map show we may get an ID of an object from GETNEXT, but the object may disappear before we call GET_FD_BY_ID. If that happens, ignore the object and continue. Fixes: 71bb428fe2c1 ("tools: bpf: add bpftool") Signed-off-by: Jakub Kicinski Acked-by: Quentin Monnet Signed-off-by: Daniel Borkmann tools/bpf/bpftool/map.c | 2 ++ tools/bpf/bpftool/prog.c | 2 ++ 2 files changed, 4 insertions(+) commit b3b1b6532890c70987821946f90c22b8021aaaf8 Author: Jakub Kicinski Date: Fri Dec 22 11:36:05 2017 -0800 tools: bpftool: maps: close json array on error paths of show We can't return from the middle of do_show(), because json_array will not be closed. Break out of the loop. Note that the error handling after the loop depends on errno, so no need to set err. Fixes: 831a0aafe5c3 ("tools: bpftool: add JSON output for `bpftool map *` commands") Signed-off-by: Jakub Kicinski Acked-by: Quentin Monnet Signed-off-by: Daniel Borkmann tools/bpf/bpftool/map.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b26a2319be3dd26edb3013504992a037a5902520 Author: Ben Skeggs Date: Sat Dec 23 08:54:28 2017 +1000 drm/nouveau: fix race when adding delayed work items kernel.org bz#198221. Reported-by: Petr Vandrovec Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c294ec08408ed90c0f2d994a7979366675e3734 Merge: 9ad95bd 7333b5a Author: Linus Torvalds Date: Fri Dec 22 12:38:30 2017 -0800 Merge tag 'powerpc-4.15-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "This is all fairly boring, except that there's two KVM fixes that you'd normally get via Paul's kvm-ppc tree. He's away so I picked them up. I was waiting to see if he would apply them, which is why they have only been in my tree since today. But they were on the list for a while and have been tested on the relevant hardware. Of note is two fixes for KVM XIVE (Power9 interrupt controller). These would normally go via the KVM tree but Paul is away so I've picked them up. Other than that, two fixes for error handling in the IMC driver, and one for a potential oops in the BHRB code if the hardware records a branch address that has subsequently been unmapped, and finally a s/%p/%px/ in our oops code. Thanks to: Anju T Sudhakar, Cédric Le Goater, Laurent Vivier, Madhavan Srinivasan, Naveen N. Rao, Ravi Bangoria" * tag 'powerpc-4.15-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: KVM: PPC: Book3S HV: Fix pending_pri value in kvmppc_xive_get_icp() KVM: PPC: Book3S: fix XIVE migration of pending interrupts powerpc/kernel: Print actual address of regs when oopsing powerpc/perf: Fix kfree memory allocated for nest pmus powerpc/perf/imc: Fix nest-imc cpuhotplug callback failure powerpc/perf: Dereference BHRB entries safely commit 9ad95bdacaa3296460fc23e31feaead1d4ffc8b9 Merge: fca0e39 b3cf852 Author: Linus Torvalds Date: Fri Dec 22 12:30:10 2017 -0800 Merge tag 'for-linus-4.15-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "This contains two fixes for running under Xen: - a fix avoiding resource conflicts between adding mmio areas and memory hotplug - a fix setting NX bits in page table entries copied from Xen when running a PV guest" * tag 'for-linus-4.15-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/balloon: Mark unallocated host memory as UNUSABLE x86-64/Xen: eliminate W+X mappings commit fca0e39b2bd2fcfea2027845df28757943d9f561 Merge: 0fc0f18 68c58e9 Author: Linus Torvalds Date: Fri Dec 22 12:27:27 2017 -0800 Merge tag 'xfs-4.15-fixes-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "Here are some XFS fixes for 4.15-rc5. Apologies for the unusually large number of patches this late, but I wanted to make sure the corruption fixes were really ready to go. Changes since last update: - Fix a locking problem during xattr block conversion that could lead to the log checkpointing thread to try to write an incomplete buffer to disk, which leads to a corruption shutdown - Fix a null pointer dereference when removing delayed allocation extents - Remove post-eof speculative allocations when reflinking a block past current inode size so that we don't just leave them there and assert on inode reclaim - Relax an assert which didn't accurately reflect the way locking works and would trigger under heavy io load - Avoid infinite loop when cancelling copy on write extents after a writeback failure - Try to avoid copy on write transaction reservation overflows when remapping after a successful write - Fix various problems with the copy-on-write reservation automatic garbage collection not being cleaned up properly during a ro remount - Fix problems with rmap log items being processed in the wrong order, leading to corruption shutdowns - Fix problems with EFI recovery wherein the "remove any rmapping if present" mechanism wasn't actually doing anything, which would lead to corruption problems later when the extent is reallocated, leading to multiple rmaps for the same extent" * tag 'xfs-4.15-fixes-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: only skip rmap owner checks for unknown-owner rmap removal xfs: always honor OWN_UNKNOWN rmap removal requests xfs: queue deferred rmap ops for cow staging extent alloc/free in the right order xfs: set cowblocks tag for direct cow writes too xfs: remove leftover CoW reservations when remounting ro xfs: don't be so eager to clear the cowblocks tag on truncate xfs: track cowblocks separately in i_flags xfs: allow CoW remap transactions to use reserve blocks xfs: avoid infinite loop when cancelling CoW blocks after writeback failure xfs: relax is_reflink_inode assert in xfs_reflink_find_cow_mapping xfs: remove dest file's post-eof preallocations before reflinking xfs: move xfs_iext_insert tracepoint to report useful information xfs: account for null transactions in bunmapi xfs: hold xfs_buf locked between shortform->leaf conversion and the addition of an attribute xfs: add the ability to join a held buffer to a defer_ops commit 0fc0f18bed026a7aa6d5499d06cc9a6eb47dc3cc Merge: 6ed1675 d53c513 Author: Linus Torvalds Date: Fri Dec 22 12:22:48 2017 -0800 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: - fix chacha20 crash on zero-length input due to unset IV - fix potential race conditions in mcryptd with spinlock - only wait once at top of algif recvmsg to avoid inconsistencies - fix potential use-after-free in algif_aead/algif_skcipher" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: af_alg - fix race accessing cipher request crypto: mcryptd - protect the per-CPU queue with a lock crypto: af_alg - wait for data at beginning of recvmsg crypto: skcipher - set walk.iv for zero-length inputs commit 6ed16756cc814040560a6e107e8f3d2dcab82396 Merge: e7ae59c d2b3c35 Author: Linus Torvalds Date: Fri Dec 22 12:21:12 2017 -0800 Merge tag 'pinctrl-v4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fix from Linus Walleij: "A single pin control fix for Intel machines, affecting a bunch of Chromebooks. Nothing else collected up amazingly" * tag 'pinctrl-v4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: cherryview: Mask all interrupts on Intel_Strago based systems commit e7ae59cb4bc6527e221e2c2e8264dde233d1e714 Merge: 7edc3f2 e7cdf5c Author: Linus Torvalds Date: Fri Dec 22 11:51:01 2017 -0800 Merge tag 'drm-fixes-for-v4.15-rc5' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "I've got most of two weeks worth of fixes here due to being on holidays last week. The main things are: - Core: * Syncobj fd reference count fix * Leasing ioctl misuse fix - nouveau regression fixes - further amdgpu DC fixes - sun4i regression fixes I'm not sure I'll see many fixes over next couple of weeks, we'll see how we go" * tag 'drm-fixes-for-v4.15-rc5' of git://people.freedesktop.org/~airlied/linux: (27 commits) drm/syncobj: Stop reusing the same struct file for all syncobj -> fd drm: move lease init after validation in drm_lease_create drm/plane: Make framebuffer refcounting the responsibility of setplane_internal callers drm/sun4i: hdmi: Move the mode_valid callback to the encoder drm/nouveau: fix obvious memory leak drm/i915: Protect DDI port to DPLL map from theoretical race. drm/i915/lpe: Remove double-encapsulation of info string drm/sun4i: Fix error path handling drm/nouveau: use alternate memory type for system-memory buffers with kind != 0 drm/nouveau: avoid GPU page sizes > PAGE_SIZE for buffer objects in host memory drm/nouveau/mmu/gp10b: use correct implementation drm/nouveau/pci: do a msi rearm on init drm/nouveau/imem/nv50: fix refcount_t warning drm/nouveau/bios/dp: support DP Info Table 2.0 drm/nouveau/fbcon: fix NULL pointer access in nouveau_fbcon_destroy drm/amd/display: Fix rehook MST display not light back on drm/amd/display: fix missing pixel clock adjustment for dongle drm/amd/display: set chroma taps to 1 when not scaling drm/amd/display: add pipe locking before front end programing drm/sun4i: validate modes for HDMI ... commit 7edc3f20ef2390bd58eece7da2b1da23293411e4 Merge: ead68f2 61d2f2a Author: Linus Torvalds Date: Fri Dec 22 11:48:36 2017 -0800 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "Here's a trio of fixes: - The runtime PM clk patches that landed this merge window forgot to runtime resume devices that may be off while recalculating and setting rates of child clks of whatever clk is changing rates. - We had a NULL pointer deref in an old clk tracepoint when clk_set_parent() is called with a NULL parent pointer. This shouldn't really happen, but it's best to avoid this regardless. - The sun9i-mmc clk driver didn't provide 'reset' support, just 'assert' and 'deassert' so the MMC driver stopped probing when the probe was changed to do a reset instead of assert/deassert pair. This implements the reset so things work again" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: sunxi: sun9i-mmc: Implement reset callback for reset controls clk: fix a panic error caused by accessing NULL pointer clk: Manage proper runtime PM state in clk_change_rate() commit 613e396bc0d4c7604fba23256644e78454c68cf6 Author: Thomas Gleixner Date: Sun Dec 17 10:56:29 2017 +0100 init: Invoke init_espfix_bsp() from mm_init() init_espfix_bsp() needs to be invoked before the page table isolation initialization. Move it into mm_init() which is the place where pti_init() will be added. While at it get rid of the #ifdeffery and provide proper stub functions. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Signed-off-by: Ingo Molnar arch/x86/include/asm/espfix.h | 7 ++++--- arch/x86/kernel/smpboot.c | 6 +----- include/asm-generic/pgtable.h | 5 +++++ init/main.c | 6 ++---- 4 files changed, 12 insertions(+), 12 deletions(-) commit 92a0f81d89571e3e8759366e050ee05cc545ef99 Author: Thomas Gleixner Date: Wed Dec 20 18:51:31 2017 +0100 x86/cpu_entry_area: Move it out of the fixmap Put the cpu_entry_area into a separate P4D entry. The fixmap gets too big and 0-day already hit a case where the fixmap PTEs were cleared by cleanup_highmap(). Aside of that the fixmap API is a pain as it's all backwards. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar Documentation/x86/x86_64/mm.txt | 2 + arch/x86/include/asm/cpu_entry_area.h | 18 ++++++++- arch/x86/include/asm/desc.h | 1 + arch/x86/include/asm/fixmap.h | 32 +--------------- arch/x86/include/asm/pgtable_32_types.h | 15 ++++++-- arch/x86/include/asm/pgtable_64_types.h | 47 +++++++++++++---------- arch/x86/kernel/dumpstack.c | 1 + arch/x86/kernel/traps.c | 5 ++- arch/x86/mm/cpu_entry_area.c | 66 +++++++++++++++++++++++++-------- arch/x86/mm/dump_pagetables.c | 6 ++- arch/x86/mm/init_32.c | 6 +++ arch/x86/mm/kasan_init_64.c | 29 ++++++++------- arch/x86/mm/pgtable_32.c | 1 + arch/x86/xen/mmu_pv.c | 2 - 14 files changed, 143 insertions(+), 88 deletions(-) commit ed1bbc40a0d10e0c5c74fe7bdc6298295cf40255 Author: Thomas Gleixner Date: Wed Dec 20 18:28:54 2017 +0100 x86/cpu_entry_area: Move it to a separate unit Separate the cpu_entry_area code out of cpu/common.c and the fixmap. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Signed-off-by: Ingo Molnar arch/x86/include/asm/cpu_entry_area.h | 52 +++++++++++++++++ arch/x86/include/asm/fixmap.h | 41 +------------- arch/x86/kernel/cpu/common.c | 94 ------------------------------ arch/x86/kernel/traps.c | 1 + arch/x86/mm/Makefile | 2 +- arch/x86/mm/cpu_entry_area.c | 104 ++++++++++++++++++++++++++++++++++ 6 files changed, 159 insertions(+), 135 deletions(-) commit 1a3b0caeb77edeac5ce5fa05e6a61c474c9a9745 Author: Peter Zijlstra Date: Tue Dec 5 13:34:47 2017 +0100 x86/mm: Create asm/invpcid.h Unclutter tlbflush.h a little. Signed-off-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/include/asm/invpcid.h | 53 +++++++++++++++++++++++++++++++++++++++++ arch/x86/include/asm/tlbflush.h | 49 +------------------------------------ 2 files changed, 54 insertions(+), 48 deletions(-) commit dd95f1a4b5ca904c78e6a097091eb21436478abb Author: Dave Hansen Date: Mon Dec 4 15:07:56 2017 +0100 x86/mm: Put MMU to hardware ASID translation in one place There are effectively two ASID types: 1. The one stored in the mmu_context that goes from 0..5 2. The one programmed into the hardware that goes from 1..6 This consolidates the locations where converting between the two (by doing a +1) to a single place which gives us a nice place to comment. PAGE_TABLE_ISOLATION will also need to, given an ASID, know which hardware ASID to flush for the userspace mapping. Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/include/asm/tlbflush.h | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit cb0a9144a744e55207e24dcef812f05cd15a499a Author: Dave Hansen Date: Mon Dec 4 15:07:55 2017 +0100 x86/mm: Remove hard-coded ASID limit checks First, it's nice to remove the magic numbers. Second, PAGE_TABLE_ISOLATION is going to consume half of the available ASID space. The space is currently unused, but add a comment to spell out this new restriction. Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/include/asm/tlbflush.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 50fb83a62cf472dc53ba23bd3f7bd6c1b2b3b53e Author: Dave Hansen Date: Mon Dec 4 15:07:54 2017 +0100 x86/mm: Move the CR3 construction functions to tlbflush.h For flushing the TLB, the ASID which has been programmed into the hardware must be known. That differs from what is in 'cpu_tlbstate'. Add functions to transform the 'cpu_tlbstate' values into to the one programmed into the hardware (CR3). It's not easy to include mmu_context.h into tlbflush.h, so just move the CR3 building over to tlbflush.h. Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/include/asm/mmu_context.h | 29 +---------------------------- arch/x86/include/asm/tlbflush.h | 26 ++++++++++++++++++++++++++ arch/x86/mm/tlb.c | 8 ++++---- 3 files changed, 31 insertions(+), 32 deletions(-) commit 3f67af51e56f291d7417d77c4f67cd774633c5e1 Author: Peter Zijlstra Date: Tue Dec 5 13:34:52 2017 +0100 x86/mm: Add comments to clarify which TLB-flush functions are supposed to flush what Per popular request.. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/include/asm/tlbflush.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit b5fc6d943808b570bdfbec80f40c6b3855f1c48b Author: Peter Zijlstra Date: Tue Dec 5 13:34:46 2017 +0100 x86/mm: Remove superfluous barriers atomic64_inc_return() already implies smp_mb() before and after. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/include/asm/tlbflush.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit a501686b2923ce6f2ff2b1d0d50682c6411baf72 Author: Peter Zijlstra Date: Tue Dec 5 13:34:49 2017 +0100 x86/mm: Use __flush_tlb_one() for kernel memory __flush_tlb_single() is for user mappings, __flush_tlb_one() for kernel mappings. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/mm/tlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23cb7d46f371844c004784ad9552a57446f73e5a Author: Peter Zijlstra Date: Tue Dec 5 13:34:51 2017 +0100 x86/microcode: Dont abuse the TLB-flush interface Commit: ec400ddeff20 ("x86/microcode_intel_early.c: Early update ucode on Intel's CPU") ... grubbed into tlbflush internals without coherent explanation. Since it says its a precaution and the SDM doesn't mention anything like this, take it out back. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: fenghua.yu@intel.com Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/include/asm/tlbflush.h | 19 ++++++------------- arch/x86/kernel/cpu/microcode/intel.c | 13 ------------- 2 files changed, 6 insertions(+), 26 deletions(-) commit 3e46e0f5ee3643a1239be9046c7ba6c66ca2b329 Author: Peter Zijlstra Date: Tue Dec 5 13:34:50 2017 +0100 x86/uv: Use the right TLB-flush API Since uv_flush_tlb_others() implements flush_tlb_others() which is about flushing user mappings, we should use __flush_tlb_single(), which too is about flushing user mappings. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Acked-by: Andrew Banman Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Mike Travis Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/platform/uv/tlb_uv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fe2d8b11a370af286287a2661de9d4e6c9a145a Author: Dave Hansen Date: Mon Dec 4 17:25:07 2017 -0800 x86/entry: Rename SYSENTER_stack to CPU_ENTRY_AREA_entry_stack If the kernel oopses while on the trampoline stack, it will print "" even if SYSENTER is not involved. That is rather confusing. The "SYSENTER" stack is used for a lot more than SYSENTER now. Give it a better string to display in stack dumps, and rename the kernel code to match. Also move the 32-bit code over to the new naming even though it still uses the entry stack only for SYSENTER. Signed-off-by: Dave Hansen Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov 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 Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 12 ++++++------ arch/x86/entry/entry_64.S | 4 ++-- arch/x86/include/asm/fixmap.h | 8 ++++---- arch/x86/include/asm/processor.h | 6 +++--- arch/x86/include/asm/stacktrace.h | 4 ++-- arch/x86/kernel/asm-offsets.c | 4 ++-- arch/x86/kernel/asm-offsets_32.c | 2 +- arch/x86/kernel/cpu/common.c | 14 +++++++------- arch/x86/kernel/dumpstack.c | 10 +++++----- arch/x86/kernel/dumpstack_32.c | 6 +++--- arch/x86/kernel/dumpstack_64.c | 12 +++++++++--- 11 files changed, 44 insertions(+), 38 deletions(-) commit e8ffe96e5933d417195268478479933d56213a3f Author: Peter Zijlstra Date: Tue Dec 5 13:34:54 2017 +0100 x86/doc: Remove obvious weirdnesses from the x86 MM layout documentation Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar Documentation/x86/x86_64/mm.txt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 5a7ccf4754fb3660569a6de52ba7f7fc3dfaf280 Author: Andy Lutomirski Date: Tue Dec 12 07:56:43 2017 -0800 x86/mm/64: Improve the memory map documentation The old docs had the vsyscall range wrong and were missing the fixmap. Fix both. There used to be 8 MB reserved for future vsyscalls, but that's long gone. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Kirill A. Shutemov Cc: Linus Torvalds Cc: Peter Zijlstra Signed-off-by: Ingo Molnar Documentation/x86/x86_64/mm.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit a4828f81037f491b2cc986595e3a969a6eeb2fb5 Author: Thomas Gleixner Date: Thu Dec 14 12:27:31 2017 +0100 x86/ldt: Prevent LDT inheritance on exec The LDT is inherited across fork() or exec(), but that makes no sense at all because exec() is supposed to start the process clean. The reason why this happens is that init_new_context_ldt() is called from init_new_context() which obviously needs to be called for both fork() and exec(). It would be surprising if anything relies on that behaviour, so it seems to be safe to remove that misfeature. Split the context initialization into two parts. Clear the LDT pointer and initialize the mutex from the general context init and move the LDT duplication to arch_dup_mmap() which is only called on fork(). Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra Cc: Andy Lutomirski Cc: Andy Lutomirsky Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Will Deacon Cc: aliguori@amazon.com Cc: dan.j.williams@intel.com Cc: hughd@google.com Cc: keescook@google.com Cc: kirill.shutemov@linux.intel.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/include/asm/mmu_context.h | 21 ++++++++++++++------- arch/x86/kernel/ldt.c | 18 +++++------------- tools/testing/selftests/x86/ldt_gdt.c | 9 +++------ 3 files changed, 22 insertions(+), 26 deletions(-) commit c2b3496bb30bd159e9de42e5c952e1f1f33c9a77 Author: Peter Zijlstra Date: Thu Dec 14 12:27:30 2017 +0100 x86/ldt: Rework locking The LDT is duplicated on fork() and on exec(), which is wrong as exec() should start from a clean state, i.e. without LDT. To fix this the LDT duplication code will be moved into arch_dup_mmap() which is only called for fork(). This introduces a locking problem. arch_dup_mmap() holds mmap_sem of the parent process, but the LDT duplication code needs to acquire mm->context.lock to access the LDT data safely, which is the reverse lock order of write_ldt() where mmap_sem nests into context.lock. Solve this by introducing a new rw semaphore which serializes the read/write_ldt() syscall operations and use context.lock to protect the actual installment of the LDT descriptor. So context.lock stabilizes mm->context.ldt and can nest inside of the new semaphore or mmap_sem. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Andy Lutomirsky Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: dan.j.williams@intel.com Cc: hughd@google.com Cc: keescook@google.com Cc: kirill.shutemov@linux.intel.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/x86/include/asm/mmu.h | 4 +++- arch/x86/include/asm/mmu_context.h | 2 ++ arch/x86/kernel/ldt.c | 33 +++++++++++++++++++++------------ 3 files changed, 26 insertions(+), 13 deletions(-) commit c10e83f598d08046dd1ebc8360d4bb12d802d51b Author: Thomas Gleixner Date: Thu Dec 14 12:27:29 2017 +0100 arch, mm: Allow arch_dup_mmap() to fail In order to sanitize the LDT initialization on x86 arch_dup_mmap() must be allowed to fail. Fix up all instances. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Andy Lutomirsky Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: aliguori@amazon.com Cc: dan.j.williams@intel.com Cc: hughd@google.com Cc: keescook@google.com Cc: kirill.shutemov@linux.intel.com Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar arch/powerpc/include/asm/mmu_context.h | 5 +++-- arch/um/include/asm/mmu_context.h | 3 ++- arch/unicore32/include/asm/mmu_context.h | 5 +++-- arch/x86/include/asm/mmu_context.h | 4 ++-- include/asm-generic/mm_hooks.h | 5 +++-- kernel/fork.c | 3 +-- 6 files changed, 14 insertions(+), 11 deletions(-) commit 4831b779403a836158917d59a7ca880483c67378 Author: Andy Lutomirski Date: Sun Dec 10 22:47:20 2017 -0800 x86/vsyscall/64: Warn and fail vsyscall emulation in NATIVE mode If something goes wrong with pagetable setup, vsyscall=native will accidentally fall back to emulation. Make it warn and fail so that we notice. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Signed-off-by: Ingo Molnar arch/x86/entry/vsyscall/vsyscall_64.c | 4 ++++ 1 file changed, 4 insertions(+) commit 49275fef986abfb8b476e4708aaecc07e7d3e087 Author: Andy Lutomirski Date: Sun Dec 10 22:47:19 2017 -0800 x86/vsyscall/64: Explicitly set _PAGE_USER in the pagetable hierarchy The kernel is very erratic as to which pagetables have _PAGE_USER set. The vsyscall page gets lucky: it seems that all of the relevant pagetables are among the apparently arbitrary ones that set _PAGE_USER. Rather than relying on chance, just explicitly set _PAGE_USER. This will let us clean up pagetable setup to stop setting _PAGE_USER. The added code can also be reused by pagetable isolation to manage the _PAGE_USER bit in the usermode tables. [ tglx: Folded paravirt fix from Juergen Gross ] Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Signed-off-by: Ingo Molnar arch/x86/entry/vsyscall/vsyscall_64.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit 146122e24bdf208015d629babba673e28d090709 Author: Thomas Gleixner Date: Wed Dec 20 18:07:42 2017 +0100 x86/mm/dump_pagetables: Make the address hints correct and readable The address hints are a trainwreck. The array entry numbers have to kept magically in sync with the actual hints, which is doomed as some of the array members are initialized at runtime via the entry numbers. Designated initializers have been around before this code was implemented.... Use the entry numbers to populate the address hints array and add the missing bits and pieces. Split 32 and 64 bit for readability sake. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/mm/dump_pagetables.c | 90 +++++++++++++++++++++++++------------------ 1 file changed, 53 insertions(+), 37 deletions(-) commit c05344947b37f7cda726e802457370bc6eac4d26 Author: Thomas Gleixner Date: Sat Dec 16 01:14:39 2017 +0100 x86/mm/dump_pagetables: Check PAGE_PRESENT for real The check for a present page in printk_prot(): if (!pgprot_val(prot)) { /* Not present */ is bogus. If a PTE is set to PAGE_NONE then the pgprot_val is not zero and the entry is decoded in bogus ways, e.g. as RX GLB. That is confusing when analyzing mapping correctness. Check for the present bit to make an informed decision. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/mm/dump_pagetables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7bbcbd3d1cdcbacd0f9f8dc4c98d550972f1ca30 Author: Thomas Gleixner Date: Wed Dec 20 18:02:34 2017 +0100 x86/Kconfig: Limit NR_CPUS on 32-bit to a sane amount The recent cpu_entry_area changes fail to compile on 32-bit when BIGSMP=y and NR_CPUS=512, because the fixmap area becomes too big. Limit the number of CPUs with BIGSMP to 64, which is already way to big for 32-bit, but it's at least a working limitation. We performed a quick survey of 32-bit-only machines that might be affected by this change negatively, but found none. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4c009af473b2026caaa26107e34d7cc68dad7756 Author: Michael J. Ruhl Date: Fri Dec 22 08:47:20 2017 -0800 IB/hfi: Only read capability registers if the capability exists During driver init, various registers are saved to allow restoration after an FLR or gen3 bump. Some of these registers are not available in some circumstances (i.e. Virtual machines). This bug makes the driver unusable when the PCI device is passed into a VM, it fails during probe. Delete unnecessary register read/write, and only access register if the capability exists. Cc: # 4.14.x Fixes: a618b7e40af2 ("IB/hfi1: Move saving PCI values to a separate function") Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/hfi.h | 1 - drivers/infiniband/hw/hfi1/pcie.c | 30 ++++++++++++------------------ 2 files changed, 12 insertions(+), 19 deletions(-) commit 822703354774ec935169cbbc8d503236bcb54fda Author: Christophe Leroy Date: Fri Dec 15 15:02:33 2017 +0100 gpio: fix "gpio-line-names" property retrieval Following commit 9427ecbed46cc ("gpio: Rework of_gpiochip_set_names() to use device property accessors"), "gpio-line-names" DT property is not retrieved anymore when chip->parent is not set by the driver. This is due to OF based property reads having been replaced by device based property reads. This patch fixes that by making use of fwnode_property_read_string_array() instead of device_property_read_string_array() and handing over either of_fwnode_handle(chip->of_node) or dev_fwnode(chip->parent) to that function. Fixes: 9427ecbed46cc ("gpio: Rework of_gpiochip_set_names() to use device property accessors") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpiolib-acpi.c | 2 +- drivers/gpio/gpiolib-devprop.c | 17 +++++++---------- drivers/gpio/gpiolib-of.c | 3 ++- drivers/gpio/gpiolib.h | 3 ++- 4 files changed, 12 insertions(+), 13 deletions(-) commit 8bb65fc06c08f027980a917648e1cf6e4d51c5ad Author: Grygorii Strashko Date: Wed Dec 6 11:37:45 2017 -0600 gpio: gpio-reg: fix build Revert changes introduced by commit f0fbe7bce733 ("gpio: Move irqdomain into struct gpio_irq_chip") as they are not aplicable to this driver. Reported-by: Russell King - ARM Linux Fixes: f0fbe7bce733 ("gpio: Move irqdomain into struct gpio_irq_chip") Signed-off-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpio-reg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c2cf265d860882b51a200e4a7553c17827f2b730 Author: Christian Borntraeger Date: Thu Dec 21 09:18:22 2017 +0100 KVM: s390: prevent buffer overrun on memory hotplug during migration We must not go beyond the pre-allocated buffer. This can happen when a new memory slot is added during migration. Reported-by: David Hildenbrand Signed-off-by: Christian Borntraeger Cc: stable@vger.kernel.org # 4.13+ Fixes: 190df4a212a7 (KVM: s390: CMMA tracking, ESSA emulation, migration mode) Reviewed-by: Cornelia Huck Reviewed-by: David Hildenbrand arch/s390/kvm/priv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32aa144fc32abfcbf7140f473dfbd94c5b9b4105 Author: Christian Borntraeger Date: Fri Dec 15 13:14:31 2017 +0100 KVM: s390: fix cmma migration for multiple memory slots When multiple memory slots are present the cmma migration code does not allocate enough memory for the bitmap. The memory slots are sorted in reverse order, so we must use gfn and size of slot[0] instead of the last one. Signed-off-by: Christian Borntraeger Reviewed-by: Claudio Imbrenda Cc: stable@vger.kernel.org # 4.13+ Fixes: 190df4a212a7 (KVM: s390: CMMA tracking, ESSA emulation, migration mode) Reviewed-by: Cornelia Huck arch/s390/kvm/kvm-s390.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit a36c2638380c0a4676647a1f553b70b20d3ebce1 Author: Takashi Iwai Date: Fri Dec 22 10:45:07 2017 +0100 ALSA: hda: Drop useless WARN_ON() Since the commit 97cc2ed27e5a ("ALSA: hda - Fix yet another i915 pointer leftover in error path") cleared hdac_acomp pointer, the WARN_ON() non-NULL check in snd_hdac_i915_register_notifier() may give a false-positive warning, as the function gets called no matter whether the component is registered or not. For fixing it, let's get rid of the spurious WARN_ON(). Fixes: 97cc2ed27e5a ("ALSA: hda - Fix yet another i915 pointer leftover in error path") Cc: Reported-by: Kouta Okamoto Signed-off-by: Takashi Iwai sound/hda/hdac_i915.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8da5bbfc7cbba909f4f32d5e1dda3750baa5d853 Author: Hui Wang Date: Fri Dec 22 11:17:46 2017 +0800 ALSA: hda - change the location for one mic on a Lenovo machine There are two front mics on this machine, and current driver assign the same name Mic to both of them, but pulseaudio can't handle them. As a workaround, we change the location for one of them, then the driver will assign "Front Mic" and "Mic" for them. Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 285d5ddcffafa5d5e68c586f4c9eaa8b24a2897d Author: Hui Wang Date: Fri Dec 22 11:17:45 2017 +0800 ALSA: hda - fix headset mic detection issue on a Dell machine It has the codec alc256, and add its pin definition to pin quirk table to let it apply ALC255_FIXUP_DELL1_MIC_NO_PRESENCE. Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 5 +++++ 1 file changed, 5 insertions(+) commit 322f74ede933b3e2cb78768b6a6fdbfbf478a0c1 Author: Hui Wang Date: Fri Dec 22 11:17:44 2017 +0800 ALSA: hda - Add MIC_NO_PRESENCE fixup for 2 HP machines There is a headset jack on the front panel, when we plug a headset into it, the headset mic can't trigger unsol events, and read_pin_sense() can't detect its presence too. So add this fixup to fix this issue. Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_conexant.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 2973633e9f09311e849f975d969737af81a521ff Author: Antoine Ténart Date: Mon Dec 11 12:10:58 2017 +0100 crypto: inside-secure - do not use areq->result for partial results This patches update the SafeXcel driver to stop using the crypto ahash_request result field for partial results (i.e. on updates). Instead the driver local safexcel_ahash_req state field is used, and only on final operations the ahash_request result buffer is updated. 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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7cad2fabd5691dbb17762877d4e7f236fe4bc181 Author: Antoine Ténart Date: Mon Dec 11 12:10:57 2017 +0100 crypto: inside-secure - fix request allocations in invalidation path This patch makes use of the SKCIPHER_REQUEST_ON_STACK and AHASH_REQUEST_ON_STACK helpers to allocate enough memory to contain both the crypto request structures and their embedded context (__ctx). Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Suggested-by: Ofer Heifetz Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_cipher.c | 16 ++++++++-------- drivers/crypto/inside-secure/safexcel_hash.c | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) commit 0a02dcca126280595950f3ea809f77c9cb0a235c Author: Antoine Ténart Date: Mon Dec 11 12:10:56 2017 +0100 crypto: inside-secure - free requests even if their handling failed This patch frees the request private data even if its handling failed, as it would never be freed otherwise. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Suggested-by: Ofer Heifetz Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel.c | 1 + 1 file changed, 1 insertion(+) commit 1eb7b40386c97f6c4d1c62931bf306f4535a4bd6 Author: Ofer Heifetz Date: Mon Dec 11 12:10:55 2017 +0100 crypto: inside-secure - per request invalidation When an invalidation request is needed we currently override the context .send and .handle_result helpers. This is wrong as under high load other requests can already be queued and overriding the context helpers will make them execute the wrong .send and .handle_result functions. This commit fixes this by adding a needs_inv flag in the request to choose the action to perform when sending requests or handling their results. This flag will be set when needed (i.e. when the context flag will be set). Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Signed-off-by: Ofer Heifetz [Antoine: commit message, and removed non related changes from the original commit] Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_cipher.c | 71 +++++++++++++++++++++----- drivers/crypto/inside-secure/safexcel_hash.c | 67 +++++++++++++++++++----- 2 files changed, 111 insertions(+), 27 deletions(-) commit 7d2901f809c110bd9a261e879d59efe62e3bc758 Author: Bogdan Mirea Date: Thu Dec 21 17:18:59 2017 +0200 arm64: dts: renesas: ulcb: Remove renesas, no-ether-link property The present change is a bug fix for AVB link iteratively up/down. Steps to reproduce: - start AVB TX stream (Using aplay via MSE), - disconnect+reconnect the eth cable, - after a reconnection the eth connection goes iteratively up/down without user interaction, - this may heal after some seconds or even stay for minutes. As the documentation specifies, the "renesas,no-ether-link" option should be used when a board does not provide a proper AVB_LINK signal. There is no need for this option enabled on RCAR H3/M3 Salvator-X/XS and ULCB starter kits since the AVB_LINK is correctly handled by HW. Choosing to keep or remove the "renesas,no-ether-link" option will have impact on the code flow in the following ways: - keeping this option enabled may lead to unexpected behavior since the RX & TX are enabled/disabled directly from adjust_link function without any HW interrogation, - removing this option, the RX & TX will only be enabled/disabled after HW interrogation. The HW check is made through the LMON pin in PSR register which specifies AVB_LINK signal value (0 - at low level; 1 - at high level). In conclusion, the present change is also a safety improvement because it removes the "renesas,no-ether-link" option leading to a proper way of detecting the link state based on HW interrogation and not on software heuristic. Fixes: dc36965a8905 ("arm64: dts: r8a7796: salvator-x: Enable EthernetAVB") Fixes: 6fa501c549aa ("arm64: dts: r8a7795: enable EthernetAVB on Salvator-X") Signed-off-by: Bogdan Mirea Signed-off-by: Vladimir Zapolskiy Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb.dtsi | 1 - 1 file changed, 1 deletion(-) commit bbc25bee37d2b32cf3a1fab9195b6da3a185614a Author: James Hogan Date: Tue Dec 5 23:31:35 2017 +0000 lib/mpi: Fix umul_ppmm() for MIPS64r6 Current MIPS64r6 toolchains aren't able to generate efficient DMULU/DMUHU based code for the C implementation of umul_ppmm(), which performs an unsigned 64 x 64 bit multiply and returns the upper and lower 64-bit halves of the 128-bit result. Instead it widens the 64-bit inputs to 128-bits and emits a __multi3 intrinsic call to perform a 128 x 128 multiply. This is both inefficient, and it results in a link error since we don't include __multi3 in MIPS linux. For example commit 90a53e4432b1 ("cfg80211: implement regdb signature checking") merged in v4.15-rc1 recently broke the 64r6_defconfig and 64r6el_defconfig builds by indirectly selecting MPILIB. The same build errors can be reproduced on older kernels by enabling e.g. CRYPTO_RSA: lib/mpi/generic_mpih-mul1.o: In function `mpihelp_mul_1': lib/mpi/generic_mpih-mul1.c:50: undefined reference to `__multi3' lib/mpi/generic_mpih-mul2.o: In function `mpihelp_addmul_1': lib/mpi/generic_mpih-mul2.c:49: undefined reference to `__multi3' lib/mpi/generic_mpih-mul3.o: In function `mpihelp_submul_1': lib/mpi/generic_mpih-mul3.c:49: undefined reference to `__multi3' lib/mpi/mpih-div.o In function `mpihelp_divrem': lib/mpi/mpih-div.c:205: undefined reference to `__multi3' lib/mpi/mpih-div.c:142: undefined reference to `__multi3' Therefore add an efficient MIPS64r6 implementation of umul_ppmm() using inline assembly and the DMULU/DMUHU instructions, to prevent __multi3 calls being emitted. Fixes: 7fd08ca58ae6 ("MIPS: Add build support for the MIPS R6 ISA") Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-mips@linux-mips.org Cc: linux-crypto@vger.kernel.org Signed-off-by: Herbert Xu lib/mpi/longlong.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 87c059e9c39dae20b8b9bd19d9ec55a6d6c10468 Author: Bogdan Mirea Date: Thu Dec 21 17:18:58 2017 +0200 arm64: dts: renesas: salvator-x: Remove renesas, no-ether-link property The present change is a bug fix for AVB link iteratively up/down. Steps to reproduce: - start AVB TX stream (Using aplay via MSE), - disconnect+reconnect the eth cable, - after a reconnection the eth connection goes iteratively up/down without user interaction, - this may heal after some seconds or even stay for minutes. As the documentation specifies, the "renesas,no-ether-link" option should be used when a board does not provide a proper AVB_LINK signal. There is no need for this option enabled on RCAR H3/M3 Salvator-X/XS and ULCB starter kits since the AVB_LINK is correctly handled by HW. Choosing to keep or remove the "renesas,no-ether-link" option will have impact on the code flow in the following ways: - keeping this option enabled may lead to unexpected behavior since the RX & TX are enabled/disabled directly from adjust_link function without any HW interrogation, - removing this option, the RX & TX will only be enabled/disabled after HW interrogation. The HW check is made through the LMON pin in PSR register which specifies AVB_LINK signal value (0 - at low level; 1 - at high level). In conclusion, the present change is also a safety improvement because it removes the "renesas,no-ether-link" option leading to a proper way of detecting the link state based on HW interrogation and not on software heuristic. Fixes: dc36965a8905 ("arm64: dts: r8a7796: salvator-x: Enable EthernetAVB") Fixes: 6fa501c549aa ("arm64: dts: r8a7795: enable EthernetAVB on Salvator-X") Signed-off-by: Bogdan Mirea Signed-off-by: Vladimir Zapolskiy Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/salvator-common.dtsi | 1 - 1 file changed, 1 deletion(-) commit d76c68109f37cb85b243a1cf0f40313afd2bae68 Author: Eric Biggers Date: Wed Dec 20 14:28:25 2017 -0800 crypto: pcrypt - fix freeing pcrypt instances pcrypt is using the old way of freeing instances, where the ->free() method specified in the 'struct crypto_template' is passed a pointer to the 'struct crypto_instance'. But the crypto_instance is being kfree()'d directly, which is incorrect because the memory was actually allocated as an aead_instance, which contains the crypto_instance at a nonzero offset. Thus, the wrong pointer was being kfree()'d. Fix it by switching to the new way to free aead_instance's where the ->free() method is specified in the aead_instance itself. Reported-by: syzbot Fixes: 0496f56065e0 ("crypto: pcrypt - Add support for new AEAD interface") Cc: # v4.2+ Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/pcrypt.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 203f45003a3d03eea8fa28d74cfc74c354416fdb Author: Jan Engelhardt Date: Tue Dec 19 19:09:07 2017 +0100 crypto: n2 - cure use after free queue_cache_init is first called for the Control Word Queue (n2_crypto_probe). At that time, queue_cache[0] is NULL and a new kmem_cache will be allocated. If the subsequent n2_register_algs call fails, the kmem_cache will be released in queue_cache_destroy, but queue_cache_init[0] is not set back to NULL. So when the Module Arithmetic Unit gets probed next (n2_mau_probe), queue_cache_init will not allocate a kmem_cache again, but leave it as its bogus value, causing a BUG() to trigger when queue_cache[0] is eventually passed to kmem_cache_zalloc: n2_crypto: Found N2CP at /virtual-devices@100/n2cp@7 n2_crypto: Registered NCS HVAPI version 2.0 called queue_cache_init n2_crypto: md5 alg registration failed n2cp f028687c: /virtual-devices@100/n2cp@7: Unable to register algorithms. called queue_cache_destroy n2cp: probe of f028687c failed with error -22 n2_crypto: Found NCP at /virtual-devices@100/ncp@6 n2_crypto: Registered NCS HVAPI version 2.0 called queue_cache_init kernel BUG at mm/slab.c:2993! Call Trace: [0000000000604488] kmem_cache_alloc+0x1a8/0x1e0 (inlined) kmem_cache_zalloc (inlined) new_queue (inlined) spu_queue_setup (inlined) handle_exec_unit [0000000010c61eb4] spu_mdesc_scan+0x1f4/0x460 [n2_crypto] [0000000010c62b80] n2_mau_probe+0x100/0x220 [n2_crypto] [000000000084b174] platform_drv_probe+0x34/0xc0 Cc: Signed-off-by: Jan Engelhardt Acked-by: David S. Miller Signed-off-by: Herbert Xu drivers/crypto/n2_core.c | 3 +++ 1 file changed, 3 insertions(+) commit af955bf15d2c27496b0269b1f05c26f758c68314 Author: Jonathan Cameron Date: Tue Dec 19 10:27:24 2017 +0000 crypto: af_alg - Fix race around ctx->rcvused by making it atomic_t This variable was increased and decreased without any protection. Result was an occasional misscount and negative wrap around resulting in false resource allocation failures. Fixes: 7d2c3f54e6f6 ("crypto: af_alg - remove locking in async callback") Signed-off-by: Jonathan Cameron Reviewed-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/af_alg.c | 4 ++-- crypto/algif_aead.c | 2 +- crypto/algif_skcipher.c | 2 +- include/crypto/if_alg.h | 5 +++-- 4 files changed, 7 insertions(+), 6 deletions(-) commit e57121d08c38dabec15cf3e1e2ad46721af30cae Author: Eric Biggers Date: Mon Dec 11 12:15:17 2017 -0800 crypto: chacha20poly1305 - validate the digest size If the rfc7539 template was instantiated with a hash algorithm with digest size larger than 16 bytes (POLY1305_DIGEST_SIZE), then the digest overran the 'tag' buffer in 'struct chachapoly_req_ctx', corrupting the subsequent memory, including 'cryptlen'. This caused a crash during crypto_skcipher_decrypt(). Fix it by, when instantiating the template, requiring that the underlying hash algorithm has the digest size expected for Poly1305. Reproducer: #include #include #include int main() { int algfd, reqfd; struct sockaddr_alg addr = { .salg_type = "aead", .salg_name = "rfc7539(chacha20,sha256)", }; unsigned char buf[32] = { 0 }; algfd = socket(AF_ALG, SOCK_SEQPACKET, 0); bind(algfd, (void *)&addr, sizeof(addr)); setsockopt(algfd, SOL_ALG, ALG_SET_KEY, buf, sizeof(buf)); reqfd = accept(algfd, 0, 0); write(reqfd, buf, 16); read(reqfd, buf, 16); } Reported-by: syzbot Fixes: 71ebc4d1b27d ("crypto: chacha20poly1305 - Add a ChaCha20-Poly1305 AEAD construction, RFC7539") Cc: # v4.2+ Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/chacha20poly1305.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d042566d8c704e1ecec370300545d4a409222e39 Author: Arnd Bergmann Date: Tue Dec 5 11:10:26 2017 +0100 crypto: chelsio - select CRYPTO_GF128MUL Without the gf128mul library support, we can run into a link error: drivers/crypto/chelsio/chcr_algo.o: In function `chcr_update_tweak': chcr_algo.c:(.text+0x7e0): undefined reference to `gf128mul_x8_ble' This adds a Kconfig select statement for it, next to the ones we already have. Cc: Fixes: b8fd1f4170e7 ("crypto: chcr - Add ctr mode and process large sg entries for cipher") Signed-off-by: Arnd Bergmann Signed-off-by: Herbert Xu drivers/crypto/chelsio/Kconfig | 1 + 1 file changed, 1 insertion(+) commit fbd90b4cae105fbd8364fa1ce3f41d0c06296f58 Author: Arnd Bergmann Date: Thu Dec 21 22:45:24 2017 +0100 ARM: dts: tango4: remove bogus interrupt-controller property dtc points out that the parent node of the interrupt controllers is not actually an interrupt controller itself, and lacks an #interrupt-cells property: arch/arm/boot/dts/tango4-vantage-1172.dtb: Warning (interrupts_property): Missing #interrupt-cells in interrupt-parent /soc/interrupt-controller@6e000 This removes the annotation. Signed-off-by: Arnd Bergmann arch/arm/boot/dts/tango4-common.dtsi | 1 - 1 file changed, 1 deletion(-) commit 506e8a912661c97b41adc8a286b875d01323ec45 Author: Arnd Bergmann Date: Thu Dec 21 22:35:19 2017 +0100 ARM: dts: ls1021a: fix incorrect clock references dtc warns about two 'clocks' properties that have an extraneous '1' at the end: arch/arm/boot/dts/ls1021a-qds.dtb: Warning (clocks_property): arch/arm/boot/dts/ls1021a-twr.dtb: Warning (clocks_property): Property 'clocks', cell 1 is not a phandle reference in /soc/i2c@2180000/mux@77/i2c@4/sgtl5000@2a arch/arm/boot/dts/ls1021a-qds.dtb: Warning (clocks_property): Missing property '#clock-cells' in node /soc/interrupt-controller@1400000 or bad phandle (referred from /soc/i2c@2180000/mux@77/i2c@4/sgtl5000@2a:clocks[1]) Property 'clocks', cell 1 is not a phandle reference in /soc/i2c@2190000/sgtl5000@a arch/arm/boot/dts/ls1021a-twr.dtb: Warning (clocks_property): Missing property '#clock-cells' in node /soc/interrupt-controller@1400000 or bad phandle (referred from /soc/i2c@2190000/sgtl5000@a:clocks[1]) The clocks that get referenced here are fixed-rate, so they do not take any argument, and dtc interprets the next cell as a phandle, which is invalid. Signed-off-by: Arnd Bergmann arch/arm/boot/dts/ls1021a-qds.dts | 2 +- arch/arm/boot/dts/ls1021a-twr.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7333b5aca412d6ad02667b5a513485838a91b136 Author: Laurent Vivier Date: Tue Dec 12 18:23:56 2017 +0100 KVM: PPC: Book3S HV: Fix pending_pri value in kvmppc_xive_get_icp() When we migrate a VM from a POWER8 host (XICS) to a POWER9 host (XICS-on-XIVE), we have an error: qemu-kvm: Unable to restore KVM interrupt controller state \ (0xff000000) for CPU 0: Invalid argument This is because kvmppc_xics_set_icp() checks the new state is internaly consistent, and especially: ... 1129 if (xisr == 0) { 1130 if (pending_pri != 0xff) 1131 return -EINVAL; ... On the other side, kvmppc_xive_get_icp() doesn't set neither the pending_pri value, nor the xisr value (set to 0) (and kvmppc_xive_set_icp() ignores the pending_pri value) As xisr is 0, pending_pri must be set to 0xff. Fixes: 5af50993850a ("KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Laurent Vivier Acked-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_xive.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dc1c4165d189350cb51bdd3057deb6ecd164beda Author: Cédric Le Goater Date: Tue Dec 12 12:02:04 2017 +0000 KVM: PPC: Book3S: fix XIVE migration of pending interrupts When restoring a pending interrupt, we are setting the Q bit to force a retrigger in xive_finish_unmask(). But we also need to force an EOI in this case to reach the same initial state : P=1, Q=0. This can be done by not setting 'old_p' for pending interrupts which will inform xive_finish_unmask() that an EOI needs to be sent. Fixes: 5af50993850a ("KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller") Cc: stable@vger.kernel.org # v4.12+ Suggested-by: Benjamin Herrenschmidt Signed-off-by: Cédric Le Goater Reviewed-by: Laurent Vivier Tested-by: Laurent Vivier Signed-off-by: Michael Ellerman arch/powerpc/kvm/book3s_xive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e7cdf5c82f1773c3386b93bbcf13b9bfff29fa31 Author: Chris Wilson Date: Tue Dec 19 12:07:00 2017 +0000 drm/syncobj: Stop reusing the same struct file for all syncobj -> fd The vk cts test: dEQP-VK.api.external.semaphore.opaque_fd.export_multiple_times_temporary triggers a lot of VFS: Close: file count is 0 Dave pointed out that clearing the syncobj->file from drm_syncobj_file_release() was sufficient to silence the test, but that opens a can of worm since we assumed that the syncobj->file was never unset. Stop trying to reuse the same struct file for every fd pointing to the drm_syncobj, and allocate one file for each fd instead. v2: Fixup return handling of drm_syncobj_fd_to_handle v2.1: [airlied: fix possible syncobj ref race] Reported-by: Dave Airlie Signed-off-by: Chris Wilson Tested-by: Dave Airlie Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie drivers/gpu/drm/drm_syncobj.c | 77 ++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 48 deletions(-) commit 12e412d785c716fbdcc6021c599f61c48e2872ef Merge: 5e9748c d2a48e5 Author: Dave Airlie Date: Fri Dec 22 10:00:04 2017 +1000 Merge tag 'drm-misc-fixes-2017-12-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes before holidays: - fixup for the lease fixup (Keith) - fb leak in the ww mutex fallback code (Maarten) - sun4i fixes (Maxime, Hans) * tag 'drm-misc-fixes-2017-12-21' of git://anongit.freedesktop.org/drm/drm-misc: drm: move lease init after validation in drm_lease_create drm/plane: Make framebuffer refcounting the responsibility of setplane_internal callers drm/sun4i: hdmi: Move the mode_valid callback to the encoder drm/sun4i: Fix error path handling drm/sun4i: validate modes for HDMI commit ead68f216110170ec729e2c4dec0aad6d38259d7 Merge: 9035a89 c50b7c4 Author: Linus Torvalds Date: Thu Dec 21 15:57:30 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller" "What's a holiday weekend without some networking bug fixes? [1] 1) Fix some eBPF JIT bugs wrt. SKB pointers across helper function calls, from Daniel Borkmann. 2) Fix regression from errata limiting change to marvell PHY driver, from Zhao Qiang. 3) Fix u16 overflow in SCTP, from Xin Long. 4) Fix potential memory leak during bridge newlink, from Nikolay Aleksandrov. 5) Fix BPF selftest build on s390, from Hendrik Brueckner. 6) Don't append to cfg80211 automatically generated certs file, always write new ones from scratch. From Thierry Reding. 7) Fix sleep in atomic in mac80211 hwsim, from Jia-Ju Bai. 8) Fix hang on tg3 MTU change with certain chips, from Brian King. 9) Add stall detection to arc emac driver and reset chip when this happens, from Alexander Kochetkov. 10) Fix MTU limitng in GRE tunnel drivers, from Xin Long. 11) Fix stmmac timestamping bug due to mis-shifting of field. From Fredrik Hallenberg. 12) Fix metrics match when deleting an ipv4 route. The kernel sets some internal metrics bits which the user isn't going to set when it makes the delete request. From Phil Sutter. 13) mvneta driver loop over RX queues limits on "txq_number" :-) Fix from Yelena Krivosheev. 14) Fix double free and memory corruption in get_net_ns_by_id, from Eric W. Biederman. 15) Flush ipv4 FIB tables in the reverse order. Some tables can share their actual backing data, in particular this happens for the MAIN and LOCAL tables. We have to kill the LOCAL table first, because it uses MAIN's backing memory. Fix from Ido Schimmel. 16) Several eBPF verifier value tracking fixes, from Edward Cree, Jann Horn, and Alexei Starovoitov. 17) Make changes to ipv6 autoflowlabel sysctl really propagate to sockets, unless the socket has set the per-socket value explicitly. From Shaohua Li. 18) Fix leaks and double callback invocations of zerocopy SKBs, from Willem de Bruijn" [1] Is this a trick question? "Relaxing"? "Quiet"? "Fine"? - Linus. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (77 commits) skbuff: skb_copy_ubufs must release uarg even without user frags skbuff: orphan frags before zerocopy clone net: reevalulate autoflowlabel setting after sysctl setting openvswitch: Fix pop_vlan action for double tagged frames ipv6: Honor specified parameters in fibmatch lookup bpf: do not allow root to mangle valid pointers selftests/bpf: add tests for recent bugfixes bpf: fix integer overflows bpf: don't prune branches when a scalar is replaced with a pointer bpf: force strict alignment checks for stack pointers bpf: fix missing error return in check_stack_boundary() bpf: fix 32-bit ALU op verification bpf: fix incorrect tracking of register size truncation bpf: fix incorrect sign extension in check_alu_op() bpf/verifier: fix bounds calculation on BPF_RSH ipv4: Fix use-after-free when flushing FIB tables s390/qeth: fix error handling in checksum cmd callback tipc: remove joining group member from congested list selftests: net: Adding config fragment CONFIG_NUMA=y nfp: bpf: keep track of the offloaded program ... commit cd95a89282ef61458c3758d70ebfbd91f303033f Author: Quentin Monnet Date: Thu Dec 21 08:52:50 2017 -0800 selftests/bpf: fix Makefile for passing LLC to the command line Makefile has a LLC variable that is initialised to "llc", but can theoretically be overridden from the command line ("make LLC=llc-6.0"). However, this fails because for LLVM probe check, "llc" is called directly. Use the $(LLC) variable instead to fix this. Fixes: 22c8852624fc ("bpf: improve selftests and add tests for meta pointer") Signed-off-by: Quentin Monnet Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f80bd6a6cc8358b81194e1f5fc16449947396ec Author: Alex Vesker Date: Thu Dec 21 17:38:27 2017 +0200 IB/ipoib: Fix lockdep issue found on ipoib_ib_dev_heavy_flush The locking order of vlan_rwsem (LOCK A) and then rtnl (LOCK B), contradicts other flows such as ipoib_open possibly causing a deadlock. To prevent this deadlock heavy flush is called with RTNL locked and only then tries to acquire vlan_rwsem. This deadlock is possible only when there are child interfaces. [ 140.941758] ====================================================== [ 140.946276] WARNING: possible circular locking dependency detected [ 140.950950] 4.15.0-rc1+ #9 Tainted: G O [ 140.954797] ------------------------------------------------------ [ 140.959424] kworker/u32:1/146 is trying to acquire lock: [ 140.963450] (rtnl_mutex){+.+.}, at: [] __ipoib_ib_dev_flush+0x2da/0x4e0 [ib_ipoib] [ 140.970006] but task is already holding lock: [ 140.975141] (&priv->vlan_rwsem){++++}, at: [] __ipoib_ib_dev_flush+0x51/0x4e0 [ib_ipoib] [ 140.982105] which lock already depends on the new lock. [ 140.990023] the existing dependency chain (in reverse order) is: [ 140.998650] -> #1 (&priv->vlan_rwsem){++++}: [ 141.005276] down_read+0x4d/0xb0 [ 141.009560] ipoib_open+0xad/0x120 [ib_ipoib] [ 141.014400] __dev_open+0xcb/0x140 [ 141.017919] __dev_change_flags+0x1a4/0x1e0 [ 141.022133] dev_change_flags+0x23/0x60 [ 141.025695] devinet_ioctl+0x704/0x7d0 [ 141.029156] sock_do_ioctl+0x20/0x50 [ 141.032526] sock_ioctl+0x221/0x300 [ 141.036079] do_vfs_ioctl+0xa6/0x6d0 [ 141.039656] SyS_ioctl+0x74/0x80 [ 141.042811] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 141.046891] -> #0 (rtnl_mutex){+.+.}: [ 141.051701] lock_acquire+0xd4/0x220 [ 141.055212] __mutex_lock+0x88/0x970 [ 141.058631] __ipoib_ib_dev_flush+0x2da/0x4e0 [ib_ipoib] [ 141.063160] __ipoib_ib_dev_flush+0x71/0x4e0 [ib_ipoib] [ 141.067648] process_one_work+0x1f5/0x610 [ 141.071429] worker_thread+0x4a/0x3f0 [ 141.074890] kthread+0x141/0x180 [ 141.078085] ret_from_fork+0x24/0x30 [ 141.081559] other info that might help us debug this: [ 141.088967] Possible unsafe locking scenario: [ 141.094280] CPU0 CPU1 [ 141.097953] ---- ---- [ 141.101640] lock(&priv->vlan_rwsem); [ 141.104771] lock(rtnl_mutex); [ 141.109207] lock(&priv->vlan_rwsem); [ 141.114032] lock(rtnl_mutex); [ 141.116800] *** DEADLOCK *** Fixes: b4b678b06f6e ("IB/ipoib: Grab rtnl lock on heavy flush when calling ndo_open/stop") Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/ipoib/ipoib_ib.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 71a0ff65a21bf3e2c4fde208c4a635ed2bbb4e81 Author: Majd Dibbiny Date: Thu Dec 21 17:38:26 2017 +0200 IB/mlx5: Fix congestion counters in LAG mode Congestion counters are counted and queried per physical function. When working in LAG mode, CNP packets can be sent or received on both of the functions, thus congestion counters should be aggregated from the two physical functions. Fixes: e1f24a79f424 ("IB/mlx5: Support congestion related counters") Signed-off-by: Majd Dibbiny Reviewed-by: Aviv Heller Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/mlx5/cmd.c | 11 ------ drivers/infiniband/hw/mlx5/cmd.h | 2 - drivers/infiniband/hw/mlx5/main.c | 35 +++-------------- drivers/net/ethernet/mellanox/mlx5/core/lag.c | 56 +++++++++++++++++++++++++++ include/linux/mlx5/driver.h | 4 ++ 5 files changed, 66 insertions(+), 42 deletions(-) commit e3524b269e451cff68b19f32b15448933a53a4f4 Author: Bryan Tan Date: Wed Dec 20 09:51:40 2017 -0800 RDMA/vmw_pvrdma: Avoid use after free due to QP/CQ/SRQ destroy The use of wait queues in vmw_pvrdma for handling concurrent access to a resource leaves a race condition which can cause a use after free bug. Fix this by using the pattern from other drivers, complete() protected by dec_and_test to ensure complete() is called only once. Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver") Signed-off-by: Bryan Tan Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 6 +++--- drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c | 7 ++++--- drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 17 +++++++---------- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 7 ++++--- drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c | 7 ++++--- 5 files changed, 22 insertions(+), 22 deletions(-) commit 30a366a9dabd05a0d218288b7d732649886b6a53 Author: Bryan Tan Date: Wed Dec 20 09:50:01 2017 -0800 RDMA/vmw_pvrdma: Use refcount_dec_and_test to avoid warning refcount_dec generates a warning when the operation causes the refcount to hit zero. Avoid this by using refcount_dec_and_test. Fixes: 8b10ba783c9d ("RDMA/vmw_pvrdma: Add shared receive queue support") Reviewed-by: Adit Ranadive Reviewed-by: Aditya Sarwade Reviewed-by: Jorgen Hansen Signed-off-by: Bryan Tan Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 17748056ce123ee37fb7382bc698fc721e3c4a09 Author: Bryan Tan Date: Wed Dec 20 09:49:03 2017 -0800 RDMA/vmw_pvrdma: Call ib_umem_release on destroy QP path The QP cleanup did not previously call ib_umem_release, resulting in a user-triggerable kernel resource leak. Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver") Reviewed-by: Adit Ranadive Reviewed-by: Aditya Sarwade Reviewed-by: Jorgen Hansen Signed-off-by: Bryan Tan Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d14587334580bc94d3ee11e8320e0c157f91ae8f Author: Steve Wise Date: Tue Dec 19 14:02:10 2017 -0800 iw_cxgb4: when flushing, complete all wrs in a chain If a wr chain was posted and needed to be flushed, only the first wr in the chain was completed with FLUSHED status. The rest were never completed. This caused isert to hang on shutdown due to the missing completions which left iscsi IO commands referenced, stalling the shutdown. Fixes: 4fe7c2962e11 ("iw_cxgb4: refactor sq/rq drain logic") Cc: stable@vger.kernel.org Signed-off-by: Steve Wise Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/cxgb4/qp.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 96a236ed286776554fbd227c6d2876fd3b5dc65d Author: Steve Wise Date: Tue Dec 19 10:29:25 2017 -0800 iw_cxgb4: reflect the original WR opcode in drain cqes The flush/drain logic was not retaining the original wr opcode in its completion. This can cause problems if the application uses the completion opcode to make decisions. Use bit 10 of the CQE header word to indicate the CQE is a special drain completion, and save the original WR opcode in the cqe header opcode field. Fixes: 4fe7c2962e11 ("iw_cxgb4: refactor sq/rq drain logic") Cc: stable@vger.kernel.org Signed-off-by: Steve Wise Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/cxgb4/cq.c | 7 ++---- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 -- drivers/infiniband/hw/cxgb4/qp.c | 46 +++++++++++++++++++++++++++++++--- drivers/infiniband/hw/cxgb4/t4.h | 6 +++++ 4 files changed, 50 insertions(+), 11 deletions(-) commit f55688c45442bc863f40ad678c638785b26cdce6 Author: Steve Wise Date: Mon Dec 18 13:10:00 2017 -0800 iw_cxgb4: Only validate the MSN for successful completions If the RECV CQE is in error, ignore the MSN check. This was causing recvs that were flushed into the sw cq to be completed with the wrong status (BAD_MSN instead of FLUSHED). Cc: stable@vger.kernel.org Signed-off-by: Steve Wise Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/cxgb4/cq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 24e3a7fb60a9187e5df90e5fa655ffc94b9c4f77 Author: Vishal Verma Date: Mon Dec 18 09:28:39 2017 -0700 libnvdimm, btt: Fix an incompatibility in the log layout Due to a spec misinterpretation, the Linux implementation of the BTT log area had different padding scheme from other implementations, such as UEFI and NVML. This fixes the padding scheme, and defaults to it for new BTT layouts. We attempt to detect the padding scheme in use when probing for an existing BTT. If we detect the older/incompatible scheme, we continue using it. Reported-by: Juston Li Cc: Dan Williams Cc: Fixes: 5212e11fde4d ("nd_btt: atomic sector updates") Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/btt.c | 201 ++++++++++++++++++++++++++++++++++++++++++--------- drivers/nvdimm/btt.h | 45 +++++++++++- 2 files changed, 211 insertions(+), 35 deletions(-) commit 13b7954c0b8dd2d6382b4ddb5053f09e389d5c6e Author: Vishal Verma Date: Thu Dec 14 17:26:13 2017 -0700 libnvdimm, btt: add a couple of missing kernel-doc lines Recent updates to btt.h neglected to add corresponding kernel-doc lines for new structure members. Add them. Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/btt.h | 2 ++ 1 file changed, 2 insertions(+) commit c50b7c473f609189da3bccd28ee5dcf3b55109cd Merge: 513674b b90ddd5 Author: David S. Miller Date: Thu Dec 21 15:00:59 2017 -0500 Merge branch 'net-zerocopy-fixes' Saeed Mahameed says: =================== Mellanox, mlx5 fixes 2017-12-19 The follwoing series includes some fixes for mlx5 core and etherent driver. Please pull and let me know if there is any problem. This series doesn't introduce any conflict with the ongoing mlx5 for-next submission. For -stable: kernels >= v4.7.y ("net/mlx5e: Fix possible deadlock of VXLAN lock") ("net/mlx5e: Add refcount to VXLAN structure") ("net/mlx5e: Prevent possible races in VXLAN control flow") ("net/mlx5e: Fix features check of IPv6 traffic") kernels >= v4.9.y ("net/mlx5: Fix error flow in CREATE_QP command") ("net/mlx5: Fix rate limit packet pacing naming and struct") kernels >= v4.13.y ("net/mlx5: FPGA, return -EINVAL if size is zero") kernels >= v4.14.y ("Revert "mlx5: move affinity hints assignments to generic code") All above patches apply and compile with no issues on corresponding -stable. =================== Signed-off-by: David S. Miller commit b90ddd568792bcb0054eaf0f61785c8f80c3bd1c Author: Willem de Bruijn Date: Wed Dec 20 17:37:50 2017 -0500 skbuff: skb_copy_ubufs must release uarg even without user frags skb_copy_ubufs creates a private copy of frags[] to release its hold on user frags, then calls uarg->callback to notify the owner. Call uarg->callback even when no frags exist. This edge case can happen when zerocopy_sg_from_iter finds enough room in skb_headlen to copy all the data. Fixes: 3ece782693c4 ("sock: skb_copy_ubufs support for compound pages") Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/core/skbuff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 268b790679422a89e9ab0685d9f291edae780c98 Author: Willem de Bruijn Date: Wed Dec 20 17:37:49 2017 -0500 skbuff: orphan frags before zerocopy clone Call skb_zerocopy_clone after skb_orphan_frags, to avoid duplicate calls to skb_uarg(skb)->callback for the same data. skb_zerocopy_clone associates skb_shinfo(skb)->uarg from frag_skb with each segment. This is only safe for uargs that do refcounting, which is those that pass skb_orphan_frags without dropping their shared frags. For others, skb_orphan_frags drops the user frags and sets the uarg to NULL, after which sock_zerocopy_clone has no effect. Qemu hangs were reported due to duplicate vhost_net_zerocopy_callback calls for the same data causing the vhost_net_ubuf_ref_>refcount to drop below zero. Link: http://lkml.kernel.org/r/ Fixes: 1f8b977ab32d ("sock: enable MSG_ZEROCOPY") Reported-by: Andreas Hartmann Reported-by: David Hill Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller net/core/skbuff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9035a8961b504d0997369509ab8c6b1f0a4ee33d Merge: 409232a 6d0e482 Author: Linus Torvalds Date: Thu Dec 21 11:13:37 2017 -0800 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "It's been a few weeks, so here's a small collection of fixes that should go into the current series. This contains: - NVMe pull request from Christoph, with a few important fixes. - kyber hang fix from Omar. - A blk-throttl fix from Shaohua, fixing a case where we double charge a bio. - Two call_single_data alignment fixes from me, fixing up some unfortunate changes that went into 4.14 without being properly reviewed on the block side (since nobody was CC'ed on the patch...). - A bounce buffer fix in two parts, one from me and one from Ming. - Revert bdi debug error handling patch. It's causing boot issues for some folks, and a week down the line, we're still no closer to a fix. Revert this patch for now until it's figured out, then we can retry for 4.16" * 'for-linus' of git://git.kernel.dk/linux-block: Revert "bdi: add error handle for bdi_debug_register" null_blk: unalign call_single_data block: unalign call_single_data in struct request block-throttle: avoid double charge block: fix blk_rq_append_bio block: don't let passthrough IO go into .make_request_fn() nvme: setup streams after initializing namespace head nvme: check hw sectors before setting chunk sectors nvme: call blk_integrity_unregister after queue is cleaned up nvme-fc: remove double put reference if admin connect fails nvme: set discard_alignment to zero kyber: fix another domain token wait queue hang commit 409232a45096a2c0d06634269a7c1c3412ecf910 Merge: d1ce8ce aa12f59 Author: Linus Torvalds Date: Thu Dec 21 10:44:13 2017 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "ARM fixes: - A bug in handling of SPE state for non-vhe systems - A fix for a crash on system shutdown - Three timer fixes, introduced by the timer optimizations for v4.15 x86 fixes: - fix for a WARN that was introduced in 4.15 - fix for SMM when guest uses PCID - fixes for several bugs found by syzkaller ... and a dozen papercut fixes for the kvm_stat tool" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (22 commits) tools/kvm_stat: sort '-f help' output kvm: x86: fix RSM when PCID is non-zero KVM: Fix stack-out-of-bounds read in write_mmio KVM: arm/arm64: Fix timer enable flow KVM: arm/arm64: Properly handle arch-timer IRQs after vtimer_save_state KVM: arm/arm64: timer: Don't set irq as forwarded if no usable GIC KVM: arm/arm64: Fix HYP unmapping going off limits arm64: kvm: Prevent restoring stale PMSCR_EL1 for vcpu KVM/x86: Check input paging mode when cs.l is set tools/kvm_stat: add line for totals tools/kvm_stat: stop ignoring unhandled arguments tools/kvm_stat: suppress usage information on command line errors tools/kvm_stat: handle invalid regular expressions tools/kvm_stat: add hint on '-f help' to man page tools/kvm_stat: fix child trace events accounting tools/kvm_stat: fix extra handling of 'help' with fields filter tools/kvm_stat: fix missing field update after filter change tools/kvm_stat: fix drilldown in events-by-guests mode tools/kvm_stat: fix command line option '-g' kvm: x86: fix WARN due to uninitialized guest FPU state ... commit 513674b5a2c9c7a67501506419da5c3c77ac6f08 Author: Shaohua Li Date: Wed Dec 20 12:10:21 2017 -0800 net: reevalulate autoflowlabel setting after sysctl setting sysctl.ip6.auto_flowlabels is default 1. In our hosts, we set it to 2. If sockopt doesn't set autoflowlabel, outcome packets from the hosts are supposed to not include flowlabel. This is true for normal packet, but not for reset packet. The reason is ipv6_pinfo.autoflowlabel is set in sock creation. Later if we change sysctl.ip6.auto_flowlabels, the ipv6_pinfo.autoflowlabel isn't changed, so the sock will keep the old behavior in terms of auto flowlabel. Reset packet is suffering from this problem, because reset packet is sent from a special control socket, which is created at boot time. Since sysctl.ipv6.auto_flowlabels is 1 by default, the control socket will always have its ipv6_pinfo.autoflowlabel set, even after user set sysctl.ipv6.auto_flowlabels to 1, so reset packset will always have flowlabel. Normal sock created before sysctl setting suffers from the same issue. We can't even turn off autoflowlabel unless we kill all socks in the hosts. To fix this, if IPV6_AUTOFLOWLABEL sockopt is used, we use the autoflowlabel setting from user, otherwise we always call ip6_default_np_autolabel() which has the new settings of sysctl. Note, this changes behavior a little bit. Before commit 42240901f7c4 (ipv6: Implement different admin modes for automatic flow labels), the autoflowlabel behavior of a sock isn't sticky, eg, if sysctl changes, existing connection will change autoflowlabel behavior. After that commit, autoflowlabel behavior is sticky in the whole life of the sock. With this patch, the behavior isn't sticky again. Cc: Martin KaFai Lau Cc: Eric Dumazet Cc: Tom Herbert Signed-off-by: Shaohua Li Signed-off-by: David S. Miller include/linux/ipv6.h | 3 ++- net/ipv6/af_inet6.c | 1 - net/ipv6/ip6_output.c | 12 ++++++++++-- net/ipv6/ipv6_sockglue.c | 1 + 4 files changed, 13 insertions(+), 4 deletions(-) commit c48e74736fccf25fb32bb015426359e1c2016e3b Author: Eric Garver Date: Wed Dec 20 15:09:22 2017 -0500 openvswitch: Fix pop_vlan action for double tagged frames skb_vlan_pop() expects skb->protocol to be a valid TPID for double tagged frames. So set skb->protocol to the TPID and let skb_vlan_pop() shift the true ethertype into position for us. Fixes: 5108bbaddc37 ("openvswitch: add processing of L3 packets") Signed-off-by: Eric Garver Reviewed-by: Jiri Benc Signed-off-by: David S. Miller net/openvswitch/flow.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 8bc0d7ac934b6f2d0dc8f38a3104d281c9db1e98 Author: Gabriel Krisman Bertazi Date: Tue Dec 19 22:24:10 2017 -0200 i915: Reject CCS modifiers for pipe C on Geminilake Current code advertises (on the modifiers blob property) support for CCS modifier for pipe C on GLK, only to reject it later when validating the request before the atomic commit. This fixes the tests igt@kms_ccs@pipe-c-*, which should skip on GLK for pipe C (see bug 104096). A relevant discussion is archived at: https://lists.freedesktop.org/archives/intel-gfx/2017-December/150646.html Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104096 Signed-off-by: Gabriel Krisman Bertazi Cc: Ben Widawsky Reviewed-by: Ben Widawsky Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20171220002410.5604-1-krisman@collabora.co.uk (cherry picked from commit f0cbd8bd877f3d8c5b80a6b1add9ca9010d7f9d8) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d0e4827b72afc71349784336d5eb6df4df106e6 Author: Jens Axboe Date: Thu Dec 21 10:01:30 2017 -0700 Revert "bdi: add error handle for bdi_debug_register" This reverts commit a0747a859ef6d3cc5b6cd50eb694499b78dd0025. It breaks some booting for some users, and more than a week into this, there's still no good fix. Revert this commit for now until a solution has been found. Reported-by: Laura Abbott Reported-by: Bruno Wolff III Signed-off-by: Jens Axboe mm/backing-dev.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 58acfd714e6b02e8617448b431c2b64a2f1f0792 Author: Ido Schimmel Date: Wed Dec 20 12:28:25 2017 +0200 ipv6: Honor specified parameters in fibmatch lookup Currently, parameters such as oif and source address are not taken into account during fibmatch lookup. Example (IPv4 for reference) before patch: $ ip -4 route show 192.0.2.0/24 dev dummy0 proto kernel scope link src 192.0.2.1 198.51.100.0/24 dev dummy1 proto kernel scope link src 198.51.100.1 $ ip -6 route show 2001:db8:1::/64 dev dummy0 proto kernel metric 256 pref medium 2001:db8:2::/64 dev dummy1 proto kernel metric 256 pref medium fe80::/64 dev dummy0 proto kernel metric 256 pref medium fe80::/64 dev dummy1 proto kernel metric 256 pref medium $ ip -4 route get fibmatch 192.0.2.2 oif dummy0 192.0.2.0/24 dev dummy0 proto kernel scope link src 192.0.2.1 $ ip -4 route get fibmatch 192.0.2.2 oif dummy1 RTNETLINK answers: No route to host $ ip -6 route get fibmatch 2001:db8:1::2 oif dummy0 2001:db8:1::/64 dev dummy0 proto kernel metric 256 pref medium $ ip -6 route get fibmatch 2001:db8:1::2 oif dummy1 2001:db8:1::/64 dev dummy0 proto kernel metric 256 pref medium After: $ ip -6 route get fibmatch 2001:db8:1::2 oif dummy0 2001:db8:1::/64 dev dummy0 proto kernel metric 256 pref medium $ ip -6 route get fibmatch 2001:db8:1::2 oif dummy1 RTNETLINK answers: Network is unreachable The problem stems from the fact that the necessary route lookup flags are not set based on these parameters. Instead of duplicating the same logic for fibmatch, we can simply resolve the original route from its copy and dump it instead. Fixes: 18c3a61c4264 ("net: ipv6: RTM_GETROUTE: return matched fib result when requested") Signed-off-by: Ido Schimmel Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 68c58e9b9a88c1a9d0c2eaf6c7acefb00f5fbbfb Author: Darrick J. Wong Date: Thu Dec 7 19:07:55 2017 -0800 xfs: only skip rmap owner checks for unknown-owner rmap removal For rmap removal, refactor the rmap owner checks into a separate function, then skip the checks if we are performing an unknown-owner removal. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_rmap.c | 76 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 24 deletions(-) commit 33df3a9cf925183a6a169bc3eff2bd0febd1298a Author: Darrick J. Wong Date: Thu Dec 7 19:07:27 2017 -0800 xfs: always honor OWN_UNKNOWN rmap removal requests Calling xfs_rmap_free with an unknown owner is supposed to remove any rmaps covering that range regardless of owner. This is used by the EFI recovery code to say "we're freeing this, it mustn't be owned by anything anymore", but for whatever reason xfs_free_ag_extent filters them out. Therefore, remove the filter and make xfs_rmap_unmap actually treat it as a wildcard owner -- free anything that's already there, and if there's no owner at all then that's fine too. There are two existing callers of bmap_add_free that take care the rmap deferred ops themselves and use OWN_UNKNOWN to skip the EFI-based rmap cleanup; convert these to use OWN_NULL (via helpers), and now we really require that an RUI (if any) gets added to the defer ops before any EFI. Lastly, now that xfs_free_extent filters out OWN_NULL rmap free requests, growfs will have to consult directly with the rmap to ensure that there aren't any rmaps in the grown region. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_alloc.c | 4 ++-- fs/xfs/libxfs/xfs_rmap.c | 25 +++++++++++++++++++++++++ fs/xfs/libxfs/xfs_rmap.h | 16 +++++++++++++++- fs/xfs/xfs_extfree_item.c | 2 +- fs/xfs/xfs_fsops.c | 5 +++++ 5 files changed, 48 insertions(+), 4 deletions(-) commit 0525e952dcceb9fc947c6d395de7f72220c7d081 Author: Darrick J. Wong Date: Thu Dec 7 19:07:03 2017 -0800 xfs: queue deferred rmap ops for cow staging extent alloc/free in the right order Under the deferred rmap operation scheme, there's a certain order in which the rmap deferred ops have to be queued to maintain integrity during log replay. For alloc/map operations that order is cui -> rui; for free/unmap operations that order is cui -> rui -> efi. However, the initial refcount code got the ordering wrong in the free side of things because it queued refcount free op and an EFI and the refcount free op queued a rmap free op, resulting in the order cui -> efi -> rui. If we fail before the efd finishes, the efi recovery will try to do a wildcard rmap removal and the subsequent rui will fail to find the rmap and blow up. This didn't ever happen due to other screws up in handling unknown owner rmap removals, but those other screw ups broke recovery in other ways, so fix the ordering to follow the intended rules. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_refcount.c | 52 ++++++++++++++++---------------------------- 1 file changed, 19 insertions(+), 33 deletions(-) commit 86d692bfad1b0097fa866f5fcfa5f5adf4cd82e8 Author: Darrick J. Wong Date: Thu Dec 14 15:46:06 2017 -0800 xfs: set cowblocks tag for direct cow writes too If a user performs a direct CoW write, we end up loading the CoW fork with preallocated extents. Therefore, we must set the cowblocks tag so that they can be cleared out if we run low on space. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig fs/xfs/xfs_reflink.c | 2 ++ 1 file changed, 2 insertions(+) commit 10ddf64e420f7f6c1a871bfb4ff2de08faef8235 Author: Darrick J. Wong Date: Thu Dec 14 15:46:05 2017 -0800 xfs: remove leftover CoW reservations when remounting ro When we're remounting the filesystem readonly, remove all CoW preallocations prior to going ro. If the fs goes down after the ro remount, we never clean up the staging extents, which means xfs_check will trip over them on a subsequent run. Practically speaking, the next mount will clean them up too, so this is unlikely to be seen. Since we shut down the cowblocks cleaner on remount-ro, we also have to make sure we start it back up if/when we remount-rw. Found by adding clonerange to fsstress and running xfs/017. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig fs/xfs/xfs_icache.c | 2 +- fs/xfs/xfs_icache.h | 1 + fs/xfs/xfs_super.c | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) commit 363e59baa4f76d3f97c0133ff7014cba3d90a7c3 Author: Darrick J. Wong Date: Thu Dec 14 15:42:59 2017 -0800 xfs: don't be so eager to clear the cowblocks tag on truncate Currently, xfs_itruncate_extents clears the cowblocks tag if i_cnextents is zero. This is wrong, since i_cnextents only tracks real extents in the CoW fork, which means that we could have some delayed CoW reservations still in there that will now never get cleaned. Fix a further bug where we /don't/ clear the reflink iflag if there are any attribute blocks -- really, it's only safe to clear the reflink flag if there are no data fork extents and no cow fork extents. Found by adding clonerange to fsstress in xfs/017. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig fs/xfs/xfs_inode.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit f17b9e764dfcd838dab51572d620a371c05a8e60 Merge: 4c1b7b6 451df7d Author: Arnd Bergmann Date: Thu Dec 21 17:02:14 2017 +0100 Merge tag 'davinci-fixes-for-v4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes Pull "TI DaVinci fixes for v4.15" from Sekhar Nori: DaVinci fixes for v4.15 consiting of fixes to make EDMA and MMC/SD work on DM365 and a fix for battery voltage monitoring on Lego EV3. * tag 'davinci-fixes-for-v4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: fix mmc entries in dm365's dma_slave_map ARM: dts: da850-lego-ev3: Fix battery voltage gpio ARM: davinci: Add dma_mask to dm365's eDMA device ARM: davinci: Use platform_device_register_full() to create pdev for dm365's eDMA commit 4c1b7b611770832789b068a20e0a286a08bf62e2 Merge: f48f66a bc53e3a Author: Arnd Bergmann Date: Thu Dec 21 17:01:34 2017 +0100 Merge tag 'at91-ab-4.15-dt-fixes' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into fixes Pull "Fixes for 4.15:" from Alexandre Belloni: - tse850-3: fix an i2c timeout issue * tag 'at91-ab-4.15-dt-fixes' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: dts: at91: disable the nxp,se97b SMBUS timeout on the TSE-850 commit f48f66a962a54c3d26d688c3df5441c9d1ba8730 Merge: 6b45740 bc63194 Author: Arnd Bergmann Date: Thu Dec 21 17:00:09 2017 +0100 Merge tag 'v4.15-rockchip-dts64fixes-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into fixes Pull "Rockchip dts64 fixes for 4.15" from Heiko Stübner: Another trailing interrupt-cell 0 removed. Removed as well got the vdd_log regulator from the rk3399-puma board. While it is there, the absence of any user makes it prone to configuration problems when the pwm-regulator takes over the boot-up default and wiggles settings there. Case in question was the PCIe host not working anymore. With vdd_log removed for the time being, PCIe on Puma works again. And a second stopgap is limiting the speed of the gmac on the rk3328-rock64 to 100MBit. While the hardware can reach 1GBit, currently it is not stable. Limiting it to 100MBit for the time being allows nfsroots to be used again until the problem is identified. * tag 'v4.15-rockchip-dts64fixes-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: limit rk3328-rock64 gmac speed to 100MBit for now arm64: dts: rockchip: remove vdd_log from rk3399-puma arm64: dts: rockchip: fix trailing 0 in rk3328 tsadc interrupts commit 6b457409169b7686d293b408da0b6446ccb57a76 Merge: d227182 912d798 Author: Arnd Bergmann Date: Thu Dec 21 16:59:19 2017 +0100 Merge tag 'v4.15-rockchip-dts32fixes-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into fixes Pull "Rockchip dts32 fixes for 4.15" from Heiko Stübner: Removed another trailing interrupt-cell 0 and added the cpu regulator on the rk3066a-marsboard to make it not fail from cpufreq changes. * tag 'v4.15-rockchip-dts32fixes-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: fix rk3288 iep-IOMMU interrupts property cells ARM: dts: rockchip: add cpu0-regulator on rk3066a-marsboard commit d2271826e58b83f9a75634a3f4334082ecf0a02e Author: Joel Stanley Date: Fri Dec 15 16:03:32 2017 +1030 ARM: dts: aspeed-g4: Correct VUART IRQ number This should have always been 8. Fixes: db4d6d9d80fa ("ARM: dts: aspeed: Correctly order UART nodes") Cc: stable@vger.kernel.org Signed-off-by: Joel Stanley Reviewed-by: Cédric Le Goater Signed-off-by: Arnd Bergmann arch/arm/boot/dts/aspeed-g4.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 976a9b35d77a9d297cb03154aa61a6214a213b5e Author: Javier Martinez Canillas Date: Wed Dec 20 18:17:29 2017 +0100 ARM: dts: exynos: Enable Mixer node for Exynos5800 Peach Pi machine Commit 1cb686c08d12 ("ARM: dts: exynos: Add status property to Exynos 542x Mixer nodes") disabled the Mixer node by default in the DTSI and enabled for each Exynos 542x DTS. But unfortunately it missed to enable it for the Exynos5800 Peach Pi machine, since the 5800 is also an 542x SoC variant. Fixes: 1cb686c08d12 ("ARM: dts: exynos: Add status property to Exynos 542x Mixer nodes") Signed-off-by: Javier Martinez Canillas Acked-by: Marek Szyprowski Tested-by: Guillaume Tucker Signed-off-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann arch/arm/boot/dts/exynos5800-peach-pi.dts | 4 ++++ 1 file changed, 4 insertions(+) commit aa12f594f97efe50223611dbd13ecca4e8dafee6 Author: Stefan Raspl Date: Thu Dec 21 13:03:27 2017 +0100 tools/kvm_stat: sort '-f help' output Sort the fields returned by specifying '-f help' on the command line. While at it, simplify the code a bit, indent the output and eliminate an extra blank line at the beginning. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit fae1a3e775cca8c3a9e0eb34443b310871a15a92 Author: Paolo Bonzini Date: Thu Dec 21 00:49:14 2017 +0100 kvm: x86: fix RSM when PCID is non-zero rsm_load_state_64() and rsm_enter_protected_mode() load CR3, then CR4 & ~PCIDE, then CR0, then CR4. However, setting CR4.PCIDE fails if CR3[11:0] != 0. It's probably easier in the long run to replace rsm_enter_protected_mode() with an emulator callback that sets all the special registers (like KVM_SET_SREGS would do). For now, set the PCID field of CR3 only after CR4.PCIDE is 1. Reported-by: Laszlo Ersek Tested-by: Laszlo Ersek Fixes: 660a5d517aaab9187f93854425c4c63f4a09195c Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini arch/x86/kvm/emulate.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) commit 423561a0bd9d661f6121081cb0dce6972a1f0840 Merge: a4ffdc2 f5f00e7 Author: Jani Nikula Date: Thu Dec 21 13:08:30 2017 +0200 Merge tag 'gvt-fixes-2017-12-21' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2017-12-21: - default pipe enable fix for virtual display (Xiaolin) Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20171221032500.xjofb4xyoihw3wo5@zhen-hp.sh.intel.com commit 966031f340185eddd05affcf72b740549f056348 Author: Linus Torvalds Date: Wed Dec 20 17:57:06 2017 -0800 n_tty: fix EXTPROC vs ICANON interaction with TIOCINQ (aka FIONREAD) We added support for EXTPROC back in 2010 in commit 26df6d13406d ("tty: Add EXTPROC support for LINEMODE") and the intent was to allow it to override some (all?) ICANON behavior. Quoting from that original commit message: There is a new bit in the termios local flag word, EXTPROC. When this bit is set, several aspects of the terminal driver are disabled. Input line editing, character echo, and mapping of signals are all disabled. This allows the telnetd to turn off these functions when in linemode, but still keep track of what state the user wants the terminal to be in. but the problem turns out that "several aspects of the terminal driver are disabled" is a bit ambiguous, and you can really confuse the n_tty layer by setting EXTPROC and then causing some of the ICANON invariants to no longer be maintained. This fixes at least one such case (TIOCINQ) becoming unhappy because of the confusion over whether ICANON really means ICANON when EXTPROC is set. This basically makes TIOCINQ match the case of read: if EXTPROC is set, we ignore ICANON. Also, make sure to reset the ICANON state ie EXTPROC changes, not just if ICANON changes. Fixes: 26df6d13406d ("tty: Add EXTPROC support for LINEMODE") Reported-by: Tetsuo Handa Reported-by: syzkaller Cc: Jiri Slaby Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman drivers/tty/n_tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b3fa47d4a76b1d606a396455f9bbeee083ef008 Author: Dmitry Torokhov Date: Wed Dec 13 15:21:22 2017 -0800 kobject: fix suppressing modalias in uevents delivered over netlink The commit 4a336a23d619 ("kobject: copy env blob in one go") optimized constructing uevent data for delivery over netlink by using the raw environment buffer, instead of reconstructing it from individual environment pointers. Unfortunately in doing so it broke suppressing MODALIAS attribute for KOBJ_UNBIND events, as the code that suppressed this attribute only adjusted the environment pointers, but left the buffer itself alone. Let's fix it by making sure the offending attribute is obliterated form the buffer as well. Reported-by: Tariq Toukan Reported-by: Casey Leedom Fixes: 4a336a23d619 ("kobject: copy env blob in one go") Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman lib/kobject_uevent.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit d2a48e52541cdf474ef35d51e8d73ded5be33122 Author: Keith Packard Date: Wed Dec 20 22:54:24 2017 -0800 drm: move lease init after validation in drm_lease_create Patch bd36d3bab2e3d08f80766c86487090dbceed4651 fixed a deadlock in the failure path of drm_lease_create. This made the partially initialized lease object visible for a short window of time. To avoid having the lessee state appear transiently, I've rearranged the code so that the lessor fields are not filled in until the parameters are all validated and the function will succeed. Signed-off-by: Keith Packard Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171221065424.1304-1-keithp@keithp.com drivers/gpu/drm/drm_lease.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 4c82fd0abb87e20d0d68ef5237e74732352806c8 Author: Florian Westphal Date: Wed Dec 20 12:08:33 2017 +0100 netfilter: uapi: correct UNTRACKED conntrack state bit number nft_ct exposes this bit to userspace. This used to be #define NF_CT_STATE_UNTRACKED_BIT (1 << (IP_CT_NUMBER + 1)) (IP_CT_NUMBER is 5, so this was 0x40) .. but this got changed to 8 (0x100) when the untracked object got removed. Replace this with a literal 6 to prevent further incompatible changes in case IP_CT_NUMBER ever increases. Fixes: cc41c84b7e7f2 ("netfilter: kill the fake untracked conntrack objects") Reported-by: Li Shuang Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/nf_conntrack_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b6ca2bf5a9b25369d7ec821ca051246558fbee0 Merge: b4681c2 82abbf8 Author: David S. Miller Date: Wed Dec 20 23:10:29 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2017-12-21 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix multiple security issues in the BPF verifier mostly related to the value and min/max bounds tracking rework in 4.14. Issues range from incorrect bounds calculation in some BPF_RSH cases, to improper sign extension and reg size handling on 32 bit ALU ops, missing strict alignment checks on stack pointers, and several others that got fixed, from Jann, Alexei and Edward. 2) Fix various build failures in BPF selftests on sparc64. More specifically, librt needed to be added to the libs to link against and few format string fixups for sizeof, from David. 3) Fix one last remaining issue from BPF selftest build that was still occuring on s390x from the asm/bpf_perf_event.h include which could not find the asm/ptrace.h copy, from Hendrik. ==================== Signed-off-by: David S. Miller commit d1b8b2391c24751e44f618fcf86fb55d9a9247fd Author: Cathy Avery Date: Tue Dec 19 13:32:48 2017 -0500 scsi: storvsc: Fix scsi_cmd error assignments in storvsc_handle_error When an I/O is returned with an srb_status of SRB_STATUS_INVALID_LUN which has zero good_bytes it must be assigned an error. Otherwise the I/O will be continuously requeued and will cause a deadlock in the case where disks are being hot added and removed. sd_probe_async will wait forever for its I/O to complete while holding scsi_sd_probe_domain. Also returning the default error of DID_TARGET_FAILURE causes multipath to not retry the I/O resulting in applications receiving I/O errors before a failover can occur. Signed-off-by: Cathy Avery Signed-off-by: Long Li Reviewed-by: Stephen Hemminger Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 82abbf8d2fc46d79611ab58daa7c608df14bb3ee Author: Alexei Starovoitov Date: Mon Dec 18 20:15:20 2017 -0800 bpf: do not allow root to mangle valid pointers Do not allow root to convert valid pointers into unknown scalars. In particular disallow: ptr &= reg ptr <<= reg ptr += ptr and explicitly allow: ptr -= ptr since pkt_end - pkt == length 1. This minimizes amount of address leaks root can do. In the future may need to further tighten the leaks with kptr_restrict. 2. If program has such pointer math it's likely a user mistake and when verifier complains about it right away instead of many instructions later on invalid memory access it's easier for users to fix their progs. 3. when register holding a pointer cannot change to scalar it allows JITs to optimize better. Like 32-bit archs could use single register for pointers instead of a pair required to hold 64-bit scalars. 4. reduces architecture dependent behavior. Since code: r1 = r10; r1 &= 0xff; if (r1 ...) will behave differently arm64 vs x64 and offloaded vs native. A significant chunk of ptr mangling was allowed by commit f1174f77b50c ("bpf/verifier: rework value tracking") yet some of it was allowed even earlier. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 102 ++++++++++------------------ tools/testing/selftests/bpf/test_verifier.c | 56 +++++++-------- 2 files changed, 63 insertions(+), 95 deletions(-) commit 3db9128fcf02dcaafa3860a69a8a55d5529b6e30 Merge: 19c832e 2255f8d Author: Daniel Borkmann Date: Thu Dec 21 02:15:42 2017 +0100 Merge branch 'bpf-verifier-sec-fixes' Alexei Starovoitov says: ==================== This patch set addresses a set of security vulnerabilities in bpf verifier logic discovered by Jann Horn. All of the patches are candidates for 4.14 stable. ==================== Signed-off-by: Daniel Borkmann commit 2255f8d520b0a318fc6d387d0940854b2f522a7f Author: Jann Horn Date: Mon Dec 18 20:12:01 2017 -0800 selftests/bpf: add tests for recent bugfixes These tests should cover the following cases: - MOV with both zero-extended and sign-extended immediates - implicit truncation of register contents via ALU32/MOV32 - implicit 32-bit truncation of ALU32 output - oversized register source operand for ALU32 shift - right-shift of a number that could be positive or negative - map access where adding the operation size to the offset causes signed 32-bit overflow - direct stack access at a ~4GiB offset Also remove the F_LOAD_WITH_STRICT_ALIGNMENT flag from a bunch of tests that should fail independent of what flags userspace passes. Signed-off-by: Jann Horn Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_verifier.c | 549 +++++++++++++++++++++++++++- 1 file changed, 533 insertions(+), 16 deletions(-) commit bb7f0f989ca7de1153bd128a40a71709e339fa03 Author: Alexei Starovoitov Date: Mon Dec 18 20:12:00 2017 -0800 bpf: fix integer overflows There were various issues related to the limited size of integers used in the verifier: - `off + size` overflow in __check_map_access() - `off + reg->off` overflow in check_mem_access() - `off + reg->var_off.value` overflow or 32-bit truncation of `reg->var_off.value` in check_mem_access() - 32-bit truncation in check_stack_boundary() Make sure that any integer math cannot overflow by not allowing pointer math with large values. Also reduce the scope of "scalar op scalar" tracking. Fixes: f1174f77b50c ("bpf/verifier: rework value tracking") Reported-by: Jann Horn Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann include/linux/bpf_verifier.h | 4 ++-- kernel/bpf/verifier.c | 48 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) commit 179d1c5602997fef5a940c6ddcf31212cbfebd14 Author: Jann Horn Date: Mon Dec 18 20:11:59 2017 -0800 bpf: don't prune branches when a scalar is replaced with a pointer This could be made safe by passing through a reference to env and checking for env->allow_ptr_leaks, but it would only work one way and is probably not worth the hassle - not doing it will not directly lead to program rejection. Fixes: f1174f77b50c ("bpf/verifier: rework value tracking") Signed-off-by: Jann Horn Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit a5ec6ae161d72f01411169a938fa5f8baea16e8f Author: Jann Horn Date: Mon Dec 18 20:11:58 2017 -0800 bpf: force strict alignment checks for stack pointers Force strict alignment checks for stack pointers because the tracking of stack spills relies on it; unaligned stack accesses can lead to corruption of spilled registers, which is exploitable. Fixes: f1174f77b50c ("bpf/verifier: rework value tracking") Signed-off-by: Jann Horn Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 5 +++++ 1 file changed, 5 insertions(+) commit ea25f914dc164c8d56b36147ecc86bc65f83c469 Author: Jann Horn Date: Mon Dec 18 20:11:57 2017 -0800 bpf: fix missing error return in check_stack_boundary() Prevent indirect stack accesses at non-constant addresses, which would permit reading and corrupting spilled pointers. Fixes: f1174f77b50c ("bpf/verifier: rework value tracking") Signed-off-by: Jann Horn Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 1 + 1 file changed, 1 insertion(+) commit 468f6eafa6c44cb2c5d8aad35e12f06c240a812a Author: Jann Horn Date: Mon Dec 18 20:11:56 2017 -0800 bpf: fix 32-bit ALU op verification 32-bit ALU ops operate on 32-bit values and have 32-bit outputs. Adjust the verifier accordingly. Fixes: f1174f77b50c ("bpf/verifier: rework value tracking") Signed-off-by: Jann Horn Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit 0c17d1d2c61936401f4702e1846e2c19b200f958 Author: Jann Horn Date: Mon Dec 18 20:11:55 2017 -0800 bpf: fix incorrect tracking of register size truncation Properly handle register truncation to a smaller size. The old code first mirrors the clearing of the high 32 bits in the bitwise tristate representation, which is correct. But then, it computes the new arithmetic bounds as the intersection between the old arithmetic bounds and the bounds resulting from the bitwise tristate representation. Therefore, when coerce_reg_to_32() is called on a number with bounds [0xffff'fff8, 0x1'0000'0007], the verifier computes [0xffff'fff8, 0xffff'ffff] as bounds of the truncated number. This is incorrect: The truncated number could also be in the range [0, 7], and no meaningful arithmetic bounds can be computed in that case apart from the obvious [0, 0xffff'ffff]. Starting with v4.14, this is exploitable by unprivileged users as long as the unprivileged_bpf_disabled sysctl isn't set. Debian assigned CVE-2017-16996 for this issue. v2: - flip the mask during arithmetic bounds calculation (Ben Hutchings) v3: - add CVE number (Ben Hutchings) Fixes: b03c9f9fdc37 ("bpf/verifier: track signed and unsigned min/max values") Signed-off-by: Jann Horn Acked-by: Edward Cree Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) commit 95a762e2c8c942780948091f8f2a4f32fce1ac6f Author: Jann Horn Date: Mon Dec 18 20:11:54 2017 -0800 bpf: fix incorrect sign extension in check_alu_op() Distinguish between BPF_ALU64|BPF_MOV|BPF_K (load 32-bit immediate, sign-extended to 64-bit) and BPF_ALU|BPF_MOV|BPF_K (load 32-bit immediate, zero-padded to 64-bit); only perform sign extension in the first case. Starting with v4.14, this is exploitable by unprivileged users as long as the unprivileged_bpf_disabled sysctl isn't set. Debian assigned CVE-2017-16995 for this issue. v3: - add CVE number (Ben Hutchings) Fixes: 484611357c19 ("bpf: allow access into map value arrays") Signed-off-by: Jann Horn Acked-by: Edward Cree Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 4374f256ce8182019353c0c639bb8d0695b4c941 Author: Edward Cree Date: Mon Dec 18 20:11:53 2017 -0800 bpf/verifier: fix bounds calculation on BPF_RSH Incorrect signed bounds were being computed. If the old upper signed bound was positive and the old lower signed bound was negative, this could cause the new upper signed bound to be too low, leading to security issues. Fixes: b03c9f9fdc37 ("bpf/verifier: track signed and unsigned min/max values") Reported-by: Jann Horn Signed-off-by: Edward Cree Acked-by: Alexei Starovoitov [jannh@google.com: changed description to reflect bug impact] Signed-off-by: Jann Horn Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann kernel/bpf/verifier.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 91aae6be4139b9e3902656d819e6af66e051bd7a Author: Darrick J. Wong Date: Thu Dec 14 15:42:22 2017 -0800 xfs: track cowblocks separately in i_flags The EOFBLOCKS/COWBLOCKS tags are totally separate things, so track them with separate i_flags. Right now we're abusing IEOFBLOCKS for both, which is totally bogus because we won't tag the inode with COWBLOCKS if IEOFBLOCKS was set by a previous tagging of the inode with EOFBLOCKS. Found by wiring up clonerange to fsstress in xfs/017. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig fs/xfs/xfs_icache.c | 33 ++++++++++++++++++++++++--------- fs/xfs/xfs_inode.h | 1 + 2 files changed, 25 insertions(+), 9 deletions(-) commit 5e9748cb4b1c4f15e549e3fc970e9727f027de49 Merge: 2480ee7 a4ffdc2 Author: Dave Airlie Date: Thu Dec 21 11:09:36 2017 +1000 Merge tag 'drm-intel-fixes-2017-12-20' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v4.15-rc5 * tag 'drm-intel-fixes-2017-12-20' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915: Protect DDI port to DPLL map from theoretical race. drm/i915/lpe: Remove double-encapsulation of info string commit 2480ee716ae43d76d0c9ec0a2e0c1299c475f350 Merge: 51b83e1 4ef9289 Author: Dave Airlie Date: Thu Dec 21 11:06:55 2017 +1000 Merge branch 'linux-4.15' of git://github.com/skeggsb/linux into drm-fixes nouveau memleak fix * 'linux-4.15' of git://github.com/skeggsb/linux: drm/nouveau: fix obvious memory leak commit d1ce8ceb8ba87034bb3c3a9c9324e77546ba8608 Merge: 877631f 5771cff Author: Linus Torvalds Date: Wed Dec 20 16:52:01 2017 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two simple fixes: one for sparse warnings that were introduced by the merge window conversion to blist_flags_t and the other to fix dropped I/O during reset in aacraid" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: aacraid: Fix I/O drop during reset scsi: core: Use blist_flags_t consistently commit 877631f360fa83bb1fe4e0e8895e88f4d02b29e3 Merge: 1362d62 36b0cb8 Author: Linus Torvalds Date: Wed Dec 20 16:47:14 2017 -0800 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fix from Russell King: "Just one fix for a problem in the csum_partial_copy_from_user() implementation when software PAN is enabled" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8731/1: Fix csum_partial_copy_from_user() stack mismatch commit f5a16b93e6291ba1f65f55647cb4cd8d75ed1b35 Author: Vineet Gupta Date: Wed Dec 20 12:37:54 2017 -0800 ARC: handle gcc generated __builtin_trap() gcc toggle -fisolate-erroneous-paths-dereference (default at -O2 onwards) isolates faulty code paths such as null pointer access, divide by zero etc by emitting __builtin_trap() Newer ARC gcc generates TRAP_S 5 instruction which needs to be handled and treated like any other unexpected exception - user mode : task terminated with a SEGV - kernel mode: die() called after register and stack dump Signed-off-by: Vineet Gupta arch/arc/kernel/traps.c | 6 ++++++ arch/arc/kernel/troubleshoot.c | 3 +++ 2 files changed, 9 insertions(+) commit 24c0df82ef7919e4d10cf2e4e65d368eb2e8ea21 Author: Pablo Neira Ayuso Date: Tue Dec 19 12:01:21 2017 +0100 netfilter: nf_tables: fix chain filter in nf_tables_dump_rules() ctx->chain may be null now that we have very large object names, so we cannot check for ctx->chain[0] here. Fixes: b7263e071aba7 ("netfilter: nf_tables: Allow table names of up to 255 chars") Signed-off-by: Pablo Neira Ayuso Acked-by: Phil Sutter net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1362d628cbce244e0b90c60d6d631289d07bbfa1 Merge: 9cd238a 9245fe9 Author: Linus Torvalds Date: Wed Dec 20 13:44:21 2017 -0800 Merge tag 'acpi-4.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix a recently introduced issue in the ACPI CPPC driver and an obscure error hanling bug in the APEI code. Specifics: - Fix an error handling issue in the ACPI APEI implementation of the >read callback in struct pstore_info (Takashi Iwai). - Fix a possible out-of-bounds arrar read in the ACPI CPPC driver (Colin Ian King)" * tag 'acpi-4.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: APEI / ERST: Fix missing error handling in erst_reader() ACPI: CPPC: remove initial assignment of pcc_ss_data commit 9cd238ab2dfe3ea80785145f39a9e64affdc4b52 Merge: 7887f47 63d15e8c Author: Linus Torvalds Date: Wed Dec 20 13:41:40 2017 -0800 Merge tag 'pm-4.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix a regression in the ondemand and conservative cpufreq governors that was introduced during the 4.13 cycle, a recent regression in the imx6q cpufreq driver and a regression in the PCI handling of hibernation from the 4.14 cycle. Specifics: - Fix an issue in the PCI handling of the "thaw" transition during hibernation (after creating an image), introduced by a bug fix from the 4.13 cycle and exposed by recent changes in the IRQ subsystem, that caused pci_restore_state() to be called for devices in low-power states in some cases which is incorrect and breaks MSI management on some systems (Rafael Wysocki). - Fix a recent regression in the imx6q cpufreq driver that broke speed grading on i.MX6 QuadPlus by omitting checks causing invalid operating performance points (OPPs) to be disabled on that SoC as appropriate (Lucas Stach). - Fix a regression introduced during the 4.14 cycle in the ondemand and conservative cpufreq governors that causes the sampling interval used by them to be shorter than the tick period in some cases which leads to incorrect decisions (Rafael Wysocki)" * tag 'pm-4.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: governor: Ensure sufficiently large sampling intervals cpufreq: imx6q: fix speed grading regression on i.MX6 QuadPlus PCI / PM: Force devices to D0 in pci_pm_thaw_noirq() commit 7887f4703145f04ea3739ccf634754f86ddbec2d Merge: 444fec1 4d02976 Author: Linus Torvalds Date: Wed Dec 20 13:38:00 2017 -0800 Merge tag 'spi-fix-v4.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A bunch of really small fixes here, all driver specific and mostly in error handling and remove paths. The most important fixes are for the a3700 clock configuration and a fix for a nasty stall which could potentially cause data corruption with the xilinx driver" * tag 'spi-fix-v4.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: atmel: fixed spin_lock usage inside atmel_spi_remove spi: sun4i: disable clocks in the remove function spi: rspi: Do not set SPCR_SPE in qspi_set_config_register() spi: Fix double "when" spi: a3700: Fix clk prescaling for coefficient over 15 spi: xilinx: Detect stall with Unknown commands spi: imx: Update device tree binding documentation commit 444fec197e529aa858e42274feafa10c216ed879 Merge: a5f89a50 b860b41 Author: Linus Torvalds Date: Wed Dec 20 13:35:10 2017 -0800 Merge tag 'mfd-fixes-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MDF bugfixes from Lee Jones: - Fix message timing issues and report correct state when an error occurs in cros_ec_spi - Reorder enums used for Power Management in rtsx_pci - Use correct OF helper for obtaining child nodes in twl4030-audio and twl6040 * tag 'mfd-fixes-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: mfd: Fix RTS5227 (and others) powermanagement mfd: cros ec: spi: Fix "in progress" error signaling mfd: twl6040: Fix child-node lookup mfd: twl4030-audio: Fix sibling-node lookup mfd: cros ec: spi: Don't send first message too soon commit a5f89a5015d4ca86e4fe48e924146ded01627fbb Merge: 10a7e9d 5a15f28 Author: Linus Torvalds Date: Wed Dec 20 13:03:20 2017 -0800 Merge tag 'sound-4.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "All stable fixes here: - a regression fix of USB-audio for the previous hardening patch - a potential UAF fix in rawmidi - HD-audio and USB-audio quirks, the missing new ID" * tag 'sound-4.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Fix the missing ctl name suffix at parsing SU ALSA: hda/realtek - Fix Dell AIO LineOut issue ALSA: rawmidi: Avoid racy info ioctl via ctl device ALSA: hda - Add vendor id for Cannonlake HDMI codec ALSA: usb-audio: Add native DSD support for Esoteric D-05X commit 79435ac78d160e4c245544d457850a56f805ac0d Author: Vineet Gupta Date: Fri Dec 8 08:26:58 2017 -0800 ARC: uaccess: dont use "l" gcc inline asm constraint modifier This used to setup the LP_COUNT register automatically, but now has been removed. There was an earlier fix 3c7c7a2fc8811 which fixed instance in delay.h but somehow missed this one as gcc change had not made its way into production toolchains and was not pedantic as it is now ! Cc: stable@vger.kernel.org Signed-off-by: Vineet Gupta arch/arc/include/asm/uaccess.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d7de73b586b2db540187ff8a077330fa1a8efd64 Author: Eugeniy Paltsev Date: Sat Dec 9 16:59:18 2017 +0300 ARC: [plat-axs103] refactor the quad core DT quirk code Refactor the quad core DT quirk code: get rid of waste division and multiplication by 1000000 constant. Acked-by: Stephen Boyd Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/plat-axs10x/axs10x.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit fbd1cec57064aa1380726ec899c49fcd84e702b9 Author: Eugeniy Paltsev Date: Sat Dec 9 16:59:17 2017 +0300 ARC: [plat-axs103]: Set initial core pll output frequency Set initial core pll output frequency specified in device tree to 100MHz for SMP configuration and 90MHz for UP configuration. It will be applied at the core pll driver probing. Update platform quirk for decreasing core frequency for quad core configuration. Acked-by: Stephen Boyd Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/boot/dts/axc003.dtsi | 8 ++++++++ arch/arc/boot/dts/axc003_idu.dtsi | 8 ++++++++ arch/arc/plat-axs10x/axs10x.c | 8 ++------ 3 files changed, 18 insertions(+), 6 deletions(-) commit 7bde846d0957fb81ac0bf8c4e2cab284a1da34e0 Author: Eugeniy Paltsev Date: Sat Dec 9 16:59:16 2017 +0300 ARC: [plat-hsdk]: Get rid of core pll frequency set in platform code Get rid of core pll frequency set in platform code as we set it via device tree using 'assigned-clock-rates' property. Acked-by: Stephen Boyd Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/plat-hsdk/platform.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) commit a08c832f277d7a6f9d3b341a5d5df2f5576220d8 Author: Eugeniy Paltsev Date: Sat Dec 9 16:59:15 2017 +0300 ARC: [plat-hsdk]: Set initial core pll output frequency Set initial core pll output frequency specified in device tree to 1GHz. It will be applied at the core pll driver probing. Acked-by: Stephen Boyd Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/boot/dts/hsdk.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit c18fc9071762769acb4040cabae45c817aefc537 Author: Alexey Brodkin Date: Tue Dec 5 13:19:38 2017 +0300 ARC: [plat-hsdk] Switch DisplayLink driver from fbdev to DRM Currently there're 2 different implementations of the driver for DisplayLink USB2.0-to-HDMI/DVI adapters: older FBDEV and modern true DRM. We initially decided to use FBDEV version just because with it /dev/fbX is usable from user-space while in DRM version with DRM_FBDEV_EMULATION user-space cannot draw anything on a real screen, for more info read [1]. But today /dev/fbX is not that important as more and more software projects switch to use of DRI (/dev/dri/cardX). But what's even more important DRM driver allows building of complicated graphics processing chains. The most important for us is rendering of 3D on a dedicated GPU while outputting video through a simpler bitstreamer like DisplayLink. So let's use much more future-proof driver from now on. [1] https://lists.freedesktop.org/archives/dri-devel/2017-December/159519.html Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/configs/hsdk_defconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d0729bc6bee797fb4bcca87583af5adbfe79ecfb Author: Sergey Senozhatsky Date: Mon Dec 11 21:50:25 2017 +0900 arc: do not use __print_symbol() __print_symbol() uses extra stack space to sprintf() symbol information and then to feed that buffer to printk() char buffer[KSYM_SYMBOL_LEN]; sprint_symbol(buffer, address); printk(fmt, buffer); Replace __print_symbol() with a direct printk("%pS") call. Signed-off-by: Sergey Senozhatsky Signed-off-by: Vineet Gupta arch/arc/kernel/stacktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0864fe09ab90ab32b7d21fe3cd72df5b5af8492e Author: Jens Axboe Date: Wed Dec 20 13:14:42 2017 -0700 null_blk: unalign call_single_data Commit 966a967116e6 randomly added alignment to this structure, but it's actually detrimental to performance of null_blk. Test case: Running on both the home and remote node shows a ~5% degradation in performance. While in there, move blk_status_t to the hole after the integer tag in the nullb_cmd structure. After this patch, we shrink the size from 192 to 152 bytes. Fixes: 966a967116e69 ("smp: Avoid using two cache lines for struct call_single_data") Signed-off-by: Jens Axboe drivers/block/null_blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4ccafe032005e9b96acbef2e389a4de5b1254add Author: Jens Axboe Date: Wed Dec 20 13:13:58 2017 -0700 block: unalign call_single_data in struct request A previous change blindly added massive alignment to the call_single_data structure in struct request. This ballooned it in size from 296 to 320 bytes on my setup, for no valid reason at all. Use the unaligned struct __call_single_data variant instead. Fixes: 966a967116e69 ("smp: Avoid using two cache lines for struct call_single_data") Cc: stable@vger.kernel.org # v4.14 Signed-off-by: Jens Axboe include/linux/blkdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4681c2829e24943aadd1a7bb3a30d41d0a20050 Author: Ido Schimmel Date: Wed Dec 20 19:34:19 2017 +0200 ipv4: Fix use-after-free when flushing FIB tables Since commit 0ddcf43d5d4a ("ipv4: FIB Local/MAIN table collapse") the local table uses the same trie allocated for the main table when custom rules are not in use. When a net namespace is dismantled, the main table is flushed and freed (via an RCU callback) before the local table. In case the callback is invoked before the local table is iterated, a use-after-free can occur. Fix this by iterating over the FIB tables in reverse order, so that the main table is always freed after the local table. v3: Reworded comment according to Alex's suggestion. v2: Add a comment to make the fix more explicit per Dave's and Alex's feedback. Fixes: 0ddcf43d5d4a ("ipv4: FIB Local/MAIN table collapse") Signed-off-by: Ido Schimmel Reported-by: Fengguang Wu Acked-by: Alexander Duyck Signed-off-by: David S. Miller net/ipv4/fib_frontend.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit ad3cbf61332914711e5f506972b1dc9af8d62146 Author: Julian Wiedmann Date: Wed Dec 20 18:07:18 2017 +0100 s390/qeth: fix error handling in checksum cmd callback Make sure to check both return code fields before processing the response. Otherwise we risk operating on invalid data. Fixes: c9475369bd2b ("s390/qeth: rework RX/TX checksum offload") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit bb25c3855a12cc58e33cd7ee9b69943790fe35f7 Author: Jon Maloy Date: Wed Dec 20 11:03:15 2017 +0100 tipc: remove joining group member from congested list When we receive a JOIN message from a peer member, the message may contain an advertised window value ADV_IDLE that permits removing the member in question from the tipc_group::congested list. However, since the removal has been made conditional on that the advertised window is *not* ADV_IDLE, we miss this case. This has the effect that a sender sometimes may enter a state of permanent, false, broadcast congestion. We fix this by unconditinally removing the member from the congested list before calling tipc_member_update(), which might potentially sort it into the list again. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/group.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1c8e77fb361a4a116a41ac1d9819eb79d068735d Author: Naresh Kamboju Date: Wed Dec 20 12:50:22 2017 +0530 selftests: net: Adding config fragment CONFIG_NUMA=y kernel config fragement CONFIG_NUMA=y is need for reuseport_bpf_numa. Signed-off-by: Naresh Kamboju Signed-off-by: David S. Miller tools/testing/selftests/net/config | 1 + 1 file changed, 1 insertion(+) commit 932f8c77a9cca1be544e9f0bc7dcbe8e6b7cff98 Merge: a8fcefe a2fba18 Author: David S. Miller Date: Wed Dec 20 13:41:05 2017 -0500 Merge tag 'mlx5-fixes-2017-12-19' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: =================== Mellanox, mlx5 fixes 2017-12-19 The follwoing series includes some fixes for mlx5 core and etherent driver. Please pull and let me know if there is any problem. This series doesn't introduce any conflict with the ongoing mlx5 for-next submission. For -stable: kernels >= v4.7.y ("net/mlx5e: Fix possible deadlock of VXLAN lock") ("net/mlx5e: Add refcount to VXLAN structure") ("net/mlx5e: Prevent possible races in VXLAN control flow") ("net/mlx5e: Fix features check of IPv6 traffic") kernels >= v4.9.y ("net/mlx5: Fix error flow in CREATE_QP command") ("net/mlx5: Fix rate limit packet pacing naming and struct") kernels >= v4.13.y ("net/mlx5: FPGA, return -EINVAL if size is zero") kernels >= v4.14.y ("Revert "mlx5: move affinity hints assignments to generic code") All above patches apply and compile with no issues on corresponding -stable. =================== Signed-off-by: David S. Miller commit b3cf8528bb21febb650a7ecbf080d0647be40b9f Author: Boris Ostrovsky Date: Tue Dec 12 15:08:21 2017 -0500 xen/balloon: Mark unallocated host memory as UNUSABLE Commit f5775e0b6116 ("x86/xen: discard RAM regions above the maximum reservation") left host memory not assigned to dom0 as available for memory hotplug. Unfortunately this also meant that those regions could be used by others. Specifically, commit fa564ad96366 ("x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 00-1f, 30-3f, 60-7f)") may try to map those addresses as MMIO. To prevent this mark unallocated host memory as E820_TYPE_UNUSABLE (thus effectively reverting f5775e0b6116) and keep track of that region as a hostmem resource that can be used for the hotplug. Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross arch/x86/xen/enlighten.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++ arch/x86/xen/setup.c | 6 ++-- drivers/xen/balloon.c | 65 ++++++++++++++++++++++++++++++++------ include/xen/balloon.h | 5 +++ 4 files changed, 144 insertions(+), 13 deletions(-) commit 111be883981748acc9a56e855c8336404a8e787c Author: Shaohua Li Date: Wed Dec 20 11:10:17 2017 -0700 block-throttle: avoid double charge If a bio is throttled and split after throttling, the bio could be resubmited and enters the throttling again. This will cause part of the bio to be charged multiple times. If the cgroup has an IO limit, the double charge will significantly harm the performance. The bio split becomes quite common after arbitrary bio size change. To fix this, we always set the BIO_THROTTLED flag if a bio is throttled. If the bio is cloned/split, we copy the flag to new bio too to avoid a double charge. However, cloned bio could be directed to a new disk, keeping the flag be a problem. The observation is we always set new disk for the bio in this case, so we can clear the flag in bio_set_dev(). This issue exists for a long time, arbitrary bio size change just makes it worse, so this should go into stable at least since v4.2. V1-> V2: Not add extra field in bio based on discussion with Tejun Cc: Vivek Goyal Cc: stable@vger.kernel.org Acked-by: Tejun Heo Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/bio.c | 2 ++ block/blk-throttle.c | 8 +------- include/linux/bio.h | 2 ++ include/linux/blk_types.h | 9 ++++----- 4 files changed, 9 insertions(+), 12 deletions(-) commit a8fcefe88b2f0057e156577417134f04938b670f Merge: 21b5944 d3f89b9 Author: David S. Miller Date: Wed Dec 20 13:08:19 2017 -0500 Merge branch 'cls_bpf-fix-offload-state-tracking-with-block-callbacks' Jakub Kicinski says: =================== cls_bpf: fix offload state tracking with block callbacks After introduction of block callbacks classifiers can no longer track offload state. cls_bpf used to do that in an attempt to move common code from drivers to the core. Remove that functionality and fix drivers. The user-visible bug this is fixing is that trying to offload a second filter would trigger a spurious DESTROY and in turn disable the already installed one. =================== Signed-off-by: David S. Miller commit d3f89b98e391475419ae2d8834813d3ecbb48f67 Author: Jakub Kicinski Date: Tue Dec 19 13:32:14 2017 -0800 nfp: bpf: keep track of the offloaded program After TC offloads were converted to callbacks we have no choice but keep track of the offloaded filter in the driver. The check for nn->dp.bpf_offload_xdp was a stop gap solution to make sure failed TC offload won't disable XDP, it's no longer necessary. nfp_net_bpf_offload() will return -EBUSY on TC vs XDP conflicts. Fixes: 3f7889c4c79b ("net: sched: cls_bpf: call block callbacks for offload") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/main.c | 47 ++++++++++++++++++++++++--- drivers/net/ethernet/netronome/nfp/bpf/main.h | 8 +++++ 2 files changed, 51 insertions(+), 4 deletions(-) commit 102740bd9436a3a6ba129af3a48271d794009fa5 Author: Jakub Kicinski Date: Tue Dec 19 13:32:13 2017 -0800 cls_bpf: fix offload assumptions after callback conversion cls_bpf used to take care of tracking what offload state a filter is in, i.e. it would track if offload request succeeded or not. This information would then be used to issue correct requests to the driver, e.g. requests for statistics only on offloaded filters, removing only filters which were offloaded, using add instead of replace if previous filter was not added etc. This tracking of offload state no longer functions with the new callback infrastructure. There could be multiple entities trying to offload the same filter. Throw out all the tracking and corresponding commands and simply pass to the drivers both old and new bpf program. Drivers will have to deal with offload state tracking by themselves. Fixes: 3f7889c4c79b ("net: sched: cls_bpf: call block callbacks for offload") Signed-off-by: Jakub Kicinski Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/main.c | 12 +--- include/net/pkt_cls.h | 5 +- net/sched/cls_bpf.c | 93 +++++++++++---------------- 3 files changed, 43 insertions(+), 67 deletions(-) commit 21b5944350052d2583e82dd59b19a9ba94a007f0 Author: Eric W. Biederman Date: Tue Dec 19 11:27:56 2017 -0600 net: Fix double free and memory corruption in get_net_ns_by_id() (I can trivially verify that that idr_remove in cleanup_net happens after the network namespace count has dropped to zero --EWB) Function get_net_ns_by_id() does not check for net::count after it has found a peer in netns_ids idr. It may dereference a peer, after its count has already been finaly decremented. This leads to double free and memory corruption: put_net(peer) rtnl_lock() atomic_dec_and_test(&peer->count) [count=0] ... __put_net(peer) get_net_ns_by_id(net, id) spin_lock(&cleanup_list_lock) list_add(&net->cleanup_list, &cleanup_list) spin_unlock(&cleanup_list_lock) queue_work() peer = idr_find(&net->netns_ids, id) | get_net(peer) [count=1] | ... | (use after final put) v ... cleanup_net() ... spin_lock(&cleanup_list_lock) ... list_replace_init(&cleanup_list, ..) ... spin_unlock(&cleanup_list_lock) ... ... ... ... put_net(peer) ... atomic_dec_and_test(&peer->count) [count=0] ... spin_lock(&cleanup_list_lock) ... list_add(&net->cleanup_list, &cleanup_list) ... spin_unlock(&cleanup_list_lock) ... queue_work() ... rtnl_unlock() rtnl_lock() ... for_each_net(tmp) { ... id = __peernet2id(tmp, peer) ... spin_lock_irq(&tmp->nsid_lock) ... idr_remove(&tmp->netns_ids, id) ... ... ... net_drop_ns() ... net_free(peer) ... } ... | v cleanup_net() ... (Second free of peer) Also, put_net() on the right cpu may reorder with left's cpu list_replace_init(&cleanup_list, ..), and then cleanup_list will be corrupted. Since cleanup_net() is executed in worker thread, while put_net(peer) can happen everywhere, there should be enough time for concurrent get_net_ns_by_id() to pick the peer up, and the race does not seem to be unlikely. The patch fixes the problem in standard way. (Also, there is possible problem in peernet2id_alloc(), which requires check for net::count under nsid_lock and maybe_get_net(peer), but in current stable kernel it's used under rtnl_lock() and it has to be safe. Openswitch begun to use peernet2id_alloc(), and possibly it should be fixed too. While this is not in stable kernel yet, so I'll send a separate message to netdev@ later). Cc: Nicolas Dichtel Signed-off-by: Kirill Tkhai Fixes: 0c7aecd4bde4 "netns: add rtnl cmd to add and get peer netns ids" Reviewed-by: Andrey Ryabinin Reviewed-by: "Eric W. Biederman" Signed-off-by: Eric W. Biederman Reviewed-by: Eric Dumazet Acked-by: Nicolas Dichtel Signed-off-by: David S. Miller net/core/net_namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eda9873e19d83c68d0c477f6bc13718fee7a7b3c Merge: d03a455 2eecb2e Author: David S. Miller Date: Wed Dec 20 12:24:12 2017 -0500 Merge branch 'mvneta-fixes' Gregory CLEMENT says: ==================== Few mvneta fixes here it is a small series of fixes found on the mvneta driver. They had been already used in the vendor kernel and are now ported to mainline. ==================== Signed-off-by: David S. Miller commit 2eecb2e04abb62ef8ea7b43e1a46bdb5b99d1bf8 Author: Yelena Krivosheev Date: Tue Dec 19 17:59:47 2017 +0100 net: mvneta: eliminate wrong call to handle rx descriptor error There are few reasons in mvneta_rx_swbm() function when received packet is dropped. mvneta_rx_error() should be called only if error bit [16] is set in rx descriptor. [gregory.clement@free-electrons.com: add fixes tag] Cc: stable@vger.kernel.org Fixes: dc35a10f68d3 ("net: mvneta: bm: add support for hardware buffer management") Signed-off-by: Yelena Krivosheev Tested-by: Dmitri Epshtein Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca5902a6547f662419689ca28b3c29a772446caa Author: Yelena Krivosheev Date: Tue Dec 19 17:59:46 2017 +0100 net: mvneta: use proper rxq_number in loop on rx queues When adding the RX queue association with each CPU, a typo was made in the mvneta_cleanup_rxqs() function. This patch fixes it. [gregory.clement@free-electrons.com: add commit log and fixes tag] Cc: stable@vger.kernel.org Fixes: 2dcf75e2793c ("net: mvneta: Associate RX queues with each CPU") Signed-off-by: Yelena Krivosheev Tested-by: Dmitri Epshtein Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4423c18e466afdfb02a36ee8b9f901d144b3c607 Author: Yelena Krivosheev Date: Tue Dec 19 17:59:45 2017 +0100 net: mvneta: clear interface link status on port disable When port connect to PHY in polling mode (with poll interval 1 sec), port and phy link status must be synchronize in order don't loss link change event. [gregory.clement@free-electrons.com: add fixes tag] Cc: Fixes: c5aff18204da ("net: mvneta: driver for Marvell Armada 370/XP network unit") Signed-off-by: Yelena Krivosheev Tested-by: Dmitri Epshtein Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1e9a328e4b35af22c23ce9357c2c2a77159e74bb Merge: 5a15f28 8dc7e20 Author: Takashi Iwai Date: Wed Dec 20 17:36:04 2017 +0100 Merge tag 'asoc-fix-v4.15-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v4.15 This is a fairly large set of fixes, they've been delayed partly as more and more keep coming in. Most of them are very small driver specific fixes, the biggest individual thing is the revert of the rcar IOMMU support - it was causing problems and there wasn't the confidence that it could be resolved sensibly. There's also a relatively large change in the Freescale SSI controller which resolves some issues with the AC'97 mode, these aren't that large in the grand scheme of things and reflect some fairly thorough review and testing. commit 8dc7e208c759b384e09a0ecf68e45e69621317ef Merge: 38acd9b 958d022 737e0b7 15f8c5f Author: Mark Brown Date: Wed Dec 20 15:43:15 2017 +0000 Merge remote-tracking branches 'asoc/fix/rt5663', 'asoc/fix/tlv320aic31xx' and 'asoc/fix/twl4030' into asoc-linus commit 38acd9b8acf90f0cce094e1f5465522a96a66c67 Merge: 9ebacc8 51f493a d070f7c 2022094 56986b0 Author: Mark Brown Date: Wed Dec 20 15:43:11 2017 +0000 Merge remote-tracking branches 'asoc/fix/msm8916', 'asoc/fix/nau8825', 'asoc/fix/rt5514' and 'asoc/fix/rt5645' into asoc-linus commit 9ebacc8c9dacd1fdaccda9a06d6029cf5faa479d Merge: 57ef0a4 50dd2ea fdaa451 0f0be40 b7926c4 d3b0535 b89b692 b880b80 Author: Mark Brown Date: Wed Dec 20 15:43:06 2017 +0000 Merge remote-tracking branches 'asoc/fix/adsp', 'asoc/fix/amd', 'asoc/fix/atmel', 'asoc/fix/da7218', 'asoc/fix/da7219', 'asoc/fix/fsl-asrc' and 'asoc/fix/fsl-ssi' into asoc-linus commit 57ef0a43d1227064d2988af0cff9055173a291b5 Merge: 54dbb86 c7b9217 Author: Mark Brown Date: Wed Dec 20 15:43:04 2017 +0000 Merge remote-tracking branch 'asoc/fix/rockchip' into asoc-linus commit 54dbb868afa50c4bcbf06c6e531966ba374a41d5 Merge: 6331d77 d5aa2482 Author: Mark Brown Date: Wed Dec 20 15:43:03 2017 +0000 Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linus commit 6331d77e056fa058109df43c1f2a89859cd1d128 Merge: 1291a0d5 4362934 Author: Mark Brown Date: Wed Dec 20 15:43:00 2017 +0000 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit 74d0833c659a8a54735e5efdd44f4b225af68586 Author: Tejun Heo Date: Wed Dec 20 07:09:19 2017 -0800 cgroup: fix css_task_iter crash on CSS_TASK_ITER_PROC While teaching css_task_iter to handle skipping over tasks which aren't group leaders, bc2fb7ed089f ("cgroup: add @flags to css_task_iter_start() and implement CSS_TASK_ITER_PROCS") introduced a silly bug. CSS_TASK_ITER_PROCS is implemented by repeating css_task_iter_advance() while the advanced cursor is pointing to a non-leader thread. However, the cursor variable, @l, wasn't updated when the iteration has to advance to the next css_set and the following repetition would operate on the terminal @l from the previous iteration which isn't pointing to a valid task leading to oopses like the following or infinite looping. BUG: unable to handle kernel NULL pointer dereference at 0000000000000254 IP: __task_pid_nr_ns+0xc7/0xf0 PGD 0 P4D 0 Oops: 0000 [#1] SMP ... CPU: 2 PID: 1 Comm: systemd Not tainted 4.14.4-200.fc26.x86_64 #1 Hardware name: System manufacturer System Product Name/PRIME B350M-A, BIOS 3203 11/09/2017 task: ffff88c4baee8000 task.stack: ffff96d5c3158000 RIP: 0010:__task_pid_nr_ns+0xc7/0xf0 RSP: 0018:ffff96d5c315bd50 EFLAGS: 00010206 RAX: 0000000000000000 RBX: ffff88c4b68c6000 RCX: 0000000000000250 RDX: ffffffffa5e47960 RSI: 0000000000000000 RDI: ffff88c490f6ab00 RBP: ffff96d5c315bd50 R08: 0000000000001000 R09: 0000000000000005 R10: ffff88c4be006b80 R11: ffff88c42f1b8004 R12: ffff96d5c315bf18 R13: ffff88c42d7dd200 R14: ffff88c490f6a510 R15: ffff88c4b68c6000 FS: 00007f9446f8ea00(0000) GS:ffff88c4be680000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000254 CR3: 00000007f956f000 CR4: 00000000003406e0 Call Trace: cgroup_procs_show+0x19/0x30 cgroup_seqfile_show+0x4c/0xb0 kernfs_seq_show+0x21/0x30 seq_read+0x2ec/0x3f0 kernfs_fop_read+0x134/0x180 __vfs_read+0x37/0x160 ? security_file_permission+0x9b/0xc0 vfs_read+0x8e/0x130 SyS_read+0x55/0xc0 entry_SYSCALL_64_fastpath+0x1a/0xa5 RIP: 0033:0x7f94455f942d RSP: 002b:00007ffe81ba2d00 EFLAGS: 00000293 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00005574e2233f00 RCX: 00007f94455f942d RDX: 0000000000001000 RSI: 00005574e2321a90 RDI: 000000000000002b RBP: 0000000000000000 R08: 00005574e2321a90 R09: 00005574e231de60 R10: 00007f94458c8b38 R11: 0000000000000293 R12: 00007f94458c8ae0 R13: 00007ffe81ba3800 R14: 0000000000000000 R15: 00005574e2116560 Code: 04 74 0e 89 f6 48 8d 04 76 48 8d 04 c5 f0 05 00 00 48 8b bf b8 05 00 00 48 01 c7 31 c0 48 8b 0f 48 85 c9 74 18 8b b2 30 08 00 00 <3b> 71 04 77 0d 48 c1 e6 05 48 01 f1 48 3b 51 38 74 09 5d c3 8b RIP: __task_pid_nr_ns+0xc7/0xf0 RSP: ffff96d5c315bd50 Fix it by moving the initialization of the cursor below the repeat label. While at it, rename it to @next for readability. Signed-off-by: Tejun Heo Fixes: bc2fb7ed089f ("cgroup: add @flags to css_task_iter_start() and implement CSS_TASK_ITER_PROCS") Cc: stable@vger.kernel.org # v4.14+ Reported-by: Laura Abbott Reported-by: Bronek Kozicki Reported-by: George Amanakis Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 9245fe9fccdbda5d81d97155e5c5de7e16510cee Merge: bb82e0b 951ef0e Author: Rafael J. Wysocki Date: Wed Dec 20 15:51:26 2017 +0100 Merge branch 'acpi-cppc' * acpi-cppc: ACPI: CPPC: remove initial assignment of pcc_ss_data commit 63d15e8c2ac134b3fd5460d19043ffde6f6eeb61 Merge: 5602664 5839ee7 Author: Rafael J. Wysocki Date: Wed Dec 20 15:12:40 2017 +0100 Merge branch 'pm-pci' * pm-pci: PCI / PM: Force devices to D0 in pci_pm_thaw_noirq() commit ce0769e0ea4b3e192466243a1a9fd39acf214f1e Author: Maarten Lankhorst Date: Wed Dec 20 10:35:43 2017 +0100 drm/plane: Make framebuffer refcounting the responsibility of setplane_internal callers lock_all_ctx in setplane_internal may return -EINTR, and __setplane_internal could return -EDEADLK. Making more special cases for fb would make the code even harder to read, so the easiest solution is not taking over the fb refcount, and making callers responsible for dropping the ref. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102707 Fixes: 13736ba3b38b ("drm/legacy: Convert setplane ioctl locking to interruptible.") Testcase: kms_atomic_interruptible Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20171220093545.613-2-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_plane.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit 2c08cd7c20968ddf71feeac2265b4741d2b3fdde Author: Maxime Ripard Date: Wed Dec 20 11:52:47 2017 +0100 drm/sun4i: hdmi: Move the mode_valid callback to the encoder When attached to the connector, the mode_valid callback will only filter the modes provided by the connector itself as part of its probe. However, it will not be doing it when the mode is provided by the userspace, which still might result in a broken configuration. In order to enforce these constraints, move our mode_valid callback to the encoder which doesn't have this behaviour. Acked-by: Daniel Vetter Signed-off-by: Hans Verkuil [maxime: Wrote the commit log in order to update the patch from the merged v3 to the v4 that was correct.] Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/0fa230a8-d01d-561a-f74f-6b4fd421255b@xs4all.nl drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 39 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 19 deletions(-) commit b67336eee3fcb8ecedc6c13e2bf88aacfa3151e2 Author: Maciej W. Rozycki Date: Mon Nov 27 09:33:03 2017 +0000 MIPS: Validate PR_SET_FP_MODE prctl(2) requests against the ABI of the task Fix an API loophole introduced with commit 9791554b45a2 ("MIPS,prctl: add PR_[GS]ET_FP_MODE prctl options for MIPS"), where the caller of prctl(2) is incorrectly allowed to make a change to CP0.Status.FR or CP0.Config5.FRE register bits even if CONFIG_MIPS_O32_FP64_SUPPORT has not been enabled, despite that an executable requesting the mode requested via ELF file annotation would not be allowed to run in the first place, or for n64 and n64 ABI tasks which do not have non-default modes defined at all. Add suitable checks to `mips_set_process_fp_mode' and bail out if an invalid mode change has been requested for the ABI in effect, even if the FPU hardware or emulation would otherwise allow it. Always succeed however without taking any further action if the mode requested is the same as one already in effect, regardless of whether any mode change, should it be requested, would actually be allowed for the task concerned. Signed-off-by: Maciej W. Rozycki Fixes: 9791554b45a2 ("MIPS,prctl: add PR_[GS]ET_FP_MODE prctl options for MIPS") Reviewed-by: Paul Burton Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # 4.0+ Patchwork: https://patchwork.linux-mips.org/patch/17800/ Signed-off-by: Ralf Baechle arch/mips/kernel/process.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d5aa24825da5711f8cb829f873160ddf1a29b19c Author: Kuninori Morimoto Date: Wed Dec 20 06:11:59 2017 +0000 ASoC: rsnd: fixup ADG register mask BRGCKR should use 0x80770000, instead of 0x80FF0000. R-Car Gen2 xxx_TIMSEL should use 0x0F1F, R-Car Gen3 xxx_TIMSEL should use 0x1F1F. Here, Gen3 doesn't support AVD, thus, both case can use 0x0F1F. Signed-off-by: Kuninori Morimoto Reviewed-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/adg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 10a7e9d849150a2879efc0b04d8a51068c9dd0c5 Author: Kees Cook Date: Tue Dec 19 13:52:23 2017 -0800 Do not hash userspace addresses in fault handlers The hashing of %p was designed to restrict kernel addresses. There is no reason to hash the userspace values seen during a segfault report, so switch these to %px. (Some architectures already use %lx.) Fixes: ad67b74d2469d9b8 ("printk: hash addresses printed with %p") Signed-off-by: Kees Cook Signed-off-by: Linus Torvalds arch/sparc/mm/fault_32.c | 2 +- arch/sparc/mm/fault_64.c | 2 +- arch/um/kernel/trap.c | 2 +- arch/x86/mm/fault.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 41fce90f26333c4fa82e8e43b9ace86c4e8a0120 Author: Dan Williams Date: Mon Dec 4 14:07:43 2017 -0800 libnvdimm, dax: fix 1GB-aligned namespaces vs physical misalignment The following namespace configuration attempt: # ndctl create-namespace -e namespace0.0 -m devdax -a 1G -f libndctl: ndctl_dax_enable: dax0.1: failed to enable Error: namespace0.0: failed to enable failed to reconfigure namespace: No such device or address ...fails when the backing memory range is not physically aligned to 1G: # cat /proc/iomem | grep Persistent 210000000-30fffffff : Persistent Memory (legacy) In the above example the 4G persistent memory range starts and ends on a 256MB boundary. We handle this case correctly when needing to handle cases that violate section alignment (128MB) collisions against "System RAM", and we simply need to extend that padding/truncation for the 1GB alignment use case. Cc: Fixes: 315c562536c4 ("libnvdimm, pfn: add 'align' attribute...") Reported-and-tested-by: Jane Chu Signed-off-by: Dan Williams drivers/nvdimm/pfn_devs.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 19c832ed9b8f7b49fa5eeef06b4338af5fe5c1dc Author: David Miller Date: Tue Dec 19 15:22:03 2017 -0500 bpf: Fix tools and testing build. I'm getting various build failures on sparc64. The key is usually that the userland tools get built 32-bit. 1) clock_gettime() is in librt, so that must be added to the link libraries. 2) "sizeof(x)" must be printed with "%Z" printf prefix. Signed-off-by: David S. Miller Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/test_progs.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 19deaa217bc04e83b59b5e8c8229eb0e53ad9efc Author: Dan Williams Date: Tue Dec 19 15:07:10 2017 -0800 libnvdimm, pfn: fix start_pad handling for aligned namespaces The alignment checks at pfn driver startup fail to properly account for the 'start_pad' in the case where the namespace is misaligned relative to its internal alignment. This is typically triggered in 1G aligned namespace, but could theoretically trigger with small namespace alignments. When this triggers the kernel reports messages of the form: dax2.1: bad offset: 0x3c000000 dax disabled align: 0x40000000 Cc: Fixes: 1ee6667cd8d1 ("libnvdimm, pfn, dax: fix initialization vs autodetect...") Reported-by: Jane Chu Signed-off-by: Dan Williams drivers/nvdimm/pfn_devs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4ef928929987c19fff4d3c1650f139560ba1cc13 Author: Ben Skeggs Date: Wed Dec 20 08:38:46 2017 +1000 drm/nouveau: fix obvious memory leak fdo#104340. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_vmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2fba188fd5eadd6061bef4f2f2577a43231ebf3 Author: Moshe Shemesh Date: Mon Dec 4 15:23:51 2017 +0200 net/mlx5: Stay in polling mode when command EQ destroy fails During unload, on mlx5_stop_eqs we move command interface from events mode to polling mode, but if command interface EQ destroy fail we move back to events mode. That's wrong since even if we fail to destroy command interface EQ, we do release its irq, so no interrupts will be received. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d6b2785cd55ee72e9608762650b3ef299f801b1b Author: Moshe Shemesh Date: Tue Nov 21 15:15:51 2017 +0200 net/mlx5: Cleanup IRQs in case of unload failure When mlx5_stop_eqs fails to destroy any of the eqs it returns with an error. In such failure flow the function will return without releasing all EQs irqs and then pci_free_irq_vectors will fail. Fix by only warn on destroy EQ failure and continue to release other EQs and their irqs. It fixes the following kernel trace: kernel: kernel BUG at drivers/pci/msi.c:352! ... ... kernel: Call Trace: kernel: pci_disable_msix+0xd3/0x100 kernel: pci_free_irq_vectors+0xe/0x20 kernel: mlx5_load_one.isra.17+0x9f5/0xec0 [mlx5_core] Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eq.c | 20 +++++++++++++------- include/linux/mlx5/driver.h | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) commit 139ed6c6c46aa3d8970a086b8e0cf1f3522f5d4a Author: Maor Gottlieb Date: Tue Dec 5 13:45:21 2017 +0200 net/mlx5: Fix steering memory leak Flow steering priority and namespace are software only objects that didn't have the proper destructors and were not freed during steering cleanup. Fix it by adding destructor functions for these objects. Fixes: bd71b08ec2ee ("net/mlx5: Support multiple updates of steering rules in parallel") Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 0c1cc8b2215f5122ca614b5adca60346018758c3 Author: Gal Pressman Date: Mon Dec 4 09:57:43 2017 +0200 net/mlx5e: Prevent possible races in VXLAN control flow When calling add/remove VXLAN port, a lock must be held in order to prevent race scenarios when more than one add/remove happens at the same time. Fix by holding our state_lock (mutex) as done by all other parts of the driver. Note that the spinlock protecting the radix-tree is still needed in order to synchronize radix-tree access from softirq context. Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling") Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/vxlan.c | 4 ++++ 1 file changed, 4 insertions(+) commit 23f4cc2cd9ed92570647220aca60d0197d8c1fa9 Author: Gal Pressman Date: Sun Dec 3 13:58:50 2017 +0200 net/mlx5e: Add refcount to VXLAN structure A refcount mechanism must be implemented in order to prevent unwanted scenarios such as: - Open an IPv4 VXLAN interface - Open an IPv6 VXLAN interface (different socket) - Remove one of the interfaces With current implementation, the UDP port will be removed from our VXLAN database and turn off the offloads for the other interface, which is still active. The reference count mechanism will only allow UDP port removals once all consumers are gone. Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling") Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/vxlan.c | 50 +++++++++++++------------ drivers/net/ethernet/mellanox/mlx5/core/vxlan.h | 1 + 2 files changed, 28 insertions(+), 23 deletions(-) commit 6323514116404cc651df1b7fffa1311ddf8ce647 Author: Gal Pressman Date: Thu Nov 23 13:52:28 2017 +0200 net/mlx5e: Fix possible deadlock of VXLAN lock mlx5e_vxlan_lookup_port is called both from mlx5e_add_vxlan_port (user context) and mlx5e_features_check (softirq), but the lock acquired does not disable bottom half and might result in deadlock. Fix it by simply replacing spin_lock() with spin_lock_bh(). While at it, replace all unnecessary spin_lock_irq() to spin_lock_bh(). lockdep's WARNING: inconsistent lock state [ 654.028136] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. [ 654.028229] swapper/5/0 [HC0[0]:SC1[9]:HE1:SE0] takes: [ 654.028321] (&(&vxlan_db->lock)->rlock){+.?.}, at: [] mlx5e_vxlan_lookup_port+0x1e/0x50 [mlx5_core] [ 654.028528] {SOFTIRQ-ON-W} state was registered at: [ 654.028607] _raw_spin_lock+0x3c/0x70 [ 654.028689] mlx5e_vxlan_lookup_port+0x1e/0x50 [mlx5_core] [ 654.028794] mlx5e_vxlan_add_port+0x2e/0x120 [mlx5_core] [ 654.028878] process_one_work+0x1e9/0x640 [ 654.028942] worker_thread+0x4a/0x3f0 [ 654.029002] kthread+0x141/0x180 [ 654.029056] ret_from_fork+0x24/0x30 [ 654.029114] irq event stamp: 579088 [ 654.029174] hardirqs last enabled at (579088): [] ip6_finish_output2+0x49a/0x8c0 [ 654.029309] hardirqs last disabled at (579087): [] ip6_finish_output2+0x44e/0x8c0 [ 654.029446] softirqs last enabled at (579030): [] irq_enter+0x6d/0x80 [ 654.029567] softirqs last disabled at (579031): [] irq_exit+0xb5/0xc0 [ 654.029684] other info that might help us debug this: [ 654.029781] Possible unsafe locking scenario: [ 654.029868] CPU0 [ 654.029908] ---- [ 654.029947] lock(&(&vxlan_db->lock)->rlock); [ 654.030045] [ 654.030090] lock(&(&vxlan_db->lock)->rlock); [ 654.030162] *** DEADLOCK *** Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling") Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/vxlan.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit dbff26e44dc3ec4de6578733b054a0114652a764 Author: Moni Shoua Date: Mon Dec 4 08:59:25 2017 +0200 net/mlx5: Fix error flow in CREATE_QP command In error flow, when DESTROY_QP command should be executed, the wrong mailbox was set with data, not the one that is written to hardware, Fix that. Fixes: 09a7d9eca1a6 '{net,IB}/mlx5: QP/XRCD commands via mlx5 ifc' Signed-off-by: Moni Shoua Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/qp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 777ec2b2a3f2760505db395de1a9fa4115d74548 Author: Eugenia Emantayev Date: Thu Nov 16 14:57:48 2017 +0200 net/mlx5: Fix misspelling in the error message and comment Fix misspelling in word syndrome. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/eq.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/health.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 696a97cf9f5c551fca257e0d4aa07b5cbde6084a Author: Eugenia Emantayev Date: Tue Nov 14 09:44:55 2017 +0200 net/mlx5e: Fix defaulting RX ring size when not needed Fixes the bug when turning on/off CQE compression mechanism resets the RX rings size to default value when it is not needed. Fixes: 2fc4bfb7250d ("net/mlx5e: Dynamic RQ type infrastructure") Signed-off-by: Eugenia Emantayev Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 8 ++++++-- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 10 ++++++++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 15 +++++++-------- drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 2 +- 4 files changed, 22 insertions(+), 13 deletions(-) commit 2989ad1ec03021ee6d2193c35414f1d970a243de Author: Gal Pressman Date: Tue Nov 21 17:49:36 2017 +0200 net/mlx5e: Fix features check of IPv6 traffic The assumption that the next header field contains the transport protocol is wrong for IPv6 packets with extension headers. Instead, we should look the inner-most next header field in the buffer. This will fix TSO offload for tunnels over IPv6 with extension headers. Performance testing: 19.25x improvement, cool! Measuring bandwidth of 16 threads TCP traffic over IPv6 GRE tap. CPU: Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz NIC: Mellanox Technologies MT28800 Family [ConnectX-5 Ex] TSO: Enabled Before: 4,926.24 Mbps Now : 94,827.91 Mbps Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling") Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ff0891915cd7b24ab27eee9b360c0452853bf9f6 Author: Huy Nguyen Date: Thu Oct 26 09:56:34 2017 -0500 net/mlx5e: Fix ETS BW check Fix bug that allows ets bw sum to be 0% when ets tc type exists. Fixes: 08fb1dacdd76 ('net/mlx5e: Support DCBNL IEEE ETS') Signed-off-by: Moshe Shemesh Reviewed-by: Huy Nguyen Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 37e92a9d4fe38dc3e7308913575983a6a088c8d4 Author: Eran Ben Elisha Date: Mon Nov 13 10:11:27 2017 +0200 net/mlx5: Fix rate limit packet pacing naming and struct In mlx5_ifc, struct size was not complete, and thus driver was sending garbage after the last defined field. Fixed it by adding reserved field to complete the struct size. In addition, rename all set_rate_limit to set_pp_rate_limit to be compliant with the Firmware <-> Driver definition. Fixes: 7486216b3a0b ("{net,IB}/mlx5: mlx5_ifc updates") Fixes: 1466cc5b23d1 ("net/mlx5: Rate limit tables support") Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/rl.c | 22 +++++++++++----------- include/linux/mlx5/mlx5_ifc.h | 8 +++++--- 3 files changed, 18 insertions(+), 16 deletions(-) commit 231243c82793428467524227ae02ca451e6a98e7 Author: Saeed Mahameed Date: Fri Nov 10 15:59:52 2017 +0900 Revert "mlx5: move affinity hints assignments to generic code" Before the offending commit, mlx5 core did the IRQ affinity itself, and it seems that the new generic code have some drawbacks and one of them is the lack for user ability to modify irq affinity after the initial affinity values got assigned. The issue is still being discussed and a solution in the new generic code is required, until then we need to revert this patch. This fixes the following issue: echo > /proc/irq//smp_affinity fails with -EIO This reverts commit a435393acafbf0ecff4deb3e3cb554b34f0d0664. Note: kept mlx5_get_vector_affinity in include/linux/mlx5/driver.h since it is used in mlx5_ib driver. Fixes: a435393acafb ("mlx5: move affinity hints assignments to generic code") Cc: Sagi Grimberg Cc: Thomas Gleixner Cc: Jes Sorensen Reported-by: Jes Sorensen Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 45 +++++++------- drivers/net/ethernet/mellanox/mlx5/core/main.c | 75 +++++++++++++++++++++-- include/linux/mlx5/driver.h | 1 + 4 files changed, 93 insertions(+), 29 deletions(-) commit bae115a2bb479142605726e6aa130f43f50e801a Author: Kamal Heib Date: Sun Oct 29 04:03:37 2017 +0200 net/mlx5: FPGA, return -EINVAL if size is zero Currently, if a size of zero is passed to mlx5_fpga_mem_{read|write}_i2c() the "err" return value will not be initialized, which triggers gcc warnings: [..]/mlx5/core/fpga/sdk.c:87 mlx5_fpga_mem_read_i2c() error: uninitialized symbol 'err'. [..]/mlx5/core/fpga/sdk.c:115 mlx5_fpga_mem_write_i2c() error: uninitialized symbol 'err'. fix that. Fixes: a9956d35d199 ('net/mlx5: FPGA, Add SBU infrastructure') Signed-off-by: Kamal Heib Reviewed-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fpga/sdk.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 61d2f2a05765a5f57149efbd93e3e81a83cbc2c1 Author: Chen-Yu Tsai Date: Mon Dec 18 11:57:51 2017 +0800 clk: sunxi: sun9i-mmc: Implement reset callback for reset controls Our MMC host driver now issues a reset, instead of just deasserting the reset control, since commit c34eda69ad4c ("mmc: sunxi: Reset the device at probe time"). The sun9i-mmc clock driver does not support this, and will fail, which results in MMC not probing. This patch implements the reset callback by asserting the reset control, then deasserting it after a small delay. Fixes: 7a6fca879f59 ("clk: sunxi: Add driver for A80 MMC config clocks/resets") Cc: # 4.14.x Signed-off-by: Chen-Yu Tsai Acked-by: Philipp Zabel Acked-by: Maxime Ripard Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/20171218035751.20661-1-wens@csie.org drivers/clk/sunxi/clk-sun9i-mmc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d03a45572efa068fa64db211d6d45222660e76c5 Author: Phil Sutter Date: Tue Dec 19 15:17:13 2017 +0100 ipv4: fib: Fix metrics match when deleting a route The recently added fib_metrics_match() causes a regression for routes with both RTAX_FEATURES and RTAX_CC_ALGO if the latter has TCP_CONG_NEEDS_ECN flag set: | # ip link add d0 type dummy | # ip link set d0 up | # ip route add 172.29.29.0/24 dev d0 features ecn congctl dctcp | # ip route del 172.29.29.0/24 dev d0 features ecn congctl dctcp | RTNETLINK answers: No such process During route insertion, fib_convert_metrics() detects that the given CC algo requires ECN and hence sets DST_FEATURE_ECN_CA bit in RTAX_FEATURES. During route deletion though, fib_metrics_match() compares stored RTAX_FEATURES value with that from userspace (which obviously has no knowledge about DST_FEATURE_ECN_CA) and fails. Fixes: 5f9ae3d9e7e4a ("ipv4: do metrics match when looking up and deleting a route") Signed-off-by: Phil Sutter Signed-off-by: David S. Miller net/ipv4/fib_semantics.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a1762456993893795030d911106a7650481db0ef Author: Fredrik Hallenberg Date: Mon Dec 18 23:34:00 2017 +0100 net: stmmac: Fix bad RX timestamp extraction As noted in dwmac4_wrback_get_rx_timestamp_status the timestamp is found in the context descriptor following the current descriptor. However the current code looks for the context descriptor in the current descriptor, which will always fail. Signed-off-by: Fredrik Hallenberg Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 5 +++-- drivers/net/ethernet/stmicro/stmmac/enh_desc.c | 3 ++- drivers/net/ethernet/stmicro/stmmac/norm_desc.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) commit 200922c93f008e03ddc804c6dacdf26ca1ba86d7 Author: Fredrik Hallenberg Date: Mon Dec 18 23:33:59 2017 +0100 net: stmmac: Fix TX timestamp calculation When using GMAC4 the value written in PTP_SSIR should be shifted however the shifted value is also used in subsequent calculations which results in a bad timestamp value. Signed-off-by: Fredrik Hallenberg Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3db096011722fd8717e57687ae94b6917a11c9cc Author: Jon Maloy Date: Mon Dec 18 20:03:05 2017 +0100 tipc: fix list sorting bug in function tipc_group_update_member() When, during a join operation, or during message transmission, a group member needs to be added to the group's 'congested' list, we sort it into the list in ascending order, according to its current advertised window size. However, we miss the case when the member is already on that list. This will have the result that the member, after the window size has been decremented, might be at the wrong position in that list. This again may have the effect that we during broadcast and multicast transmissions miss the fact that a destination is not yet ready for reception, and we end up sending anyway. From this point on, the behavior during the remaining session is unpredictable, e.g., with underflowing window sizes. We now correct this bug by unconditionally removing the member from the list before (re-)sorting it in. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/group.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c9fefa08190fc879fb2e681035d7774e0a8c5170 Author: Xin Long Date: Mon Dec 18 14:26:21 2017 +0800 ip6_tunnel: get the min mtu properly in ip6_tnl_xmit Now it's using IPV6_MIN_MTU as the min mtu in ip6_tnl_xmit, but IPV6_MIN_MTU actually only works when the inner packet is ipv6. With IPV6_MIN_MTU for ipv4 packets, the new pmtu for inner dst couldn't be set less than 1280. It would cause tx_err and the packet to be dropped when the outer dst pmtu is close to 1280. Jianlin found it by running ipv4 traffic with the topo: (client) gre6 <---> eth1 (route) eth2 <---> gre6 (server) After changing eth2 mtu to 1300, the performance became very low, or the connection was even broken. The issue also affects ip4ip6 and ip6ip6 tunnels. So if the inner packet is ipv4, 576 should be considered as the min mtu. Note that for ip4ip6 and ip6ip6 tunnels, the inner packet can only be ipv4 or ipv6, but for gre6 tunnel, it may also be ARP. This patch using 576 as the min mtu for non-ipv6 packet works for all those cases. Reported-by: Jianlin Shi Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 2c52129a7d74d017320804c6928de770815c5f4a Author: Xin Long Date: Mon Dec 18 14:25:09 2017 +0800 ip6_gre: remove the incorrect mtu limit for ipgre tap The same fix as the patch "ip_gre: remove the incorrect mtu limit for ipgre tap" is also needed for ip6_gre. Fixes: 61e84623ace3 ("net: centralize net_device min/max MTU checking") Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 1 + 1 file changed, 1 insertion(+) commit cfddd4c33c254954927942599d299b3865743146 Author: Xin Long Date: Mon Dec 18 14:24:35 2017 +0800 ip_gre: remove the incorrect mtu limit for ipgre tap ipgre tap driver calls ether_setup(), after commit 61e84623ace3 ("net: centralize net_device min/max MTU checking"), the range of mtu is [min_mtu, max_mtu], which is [68, 1500] by default. It causes the dev mtu of the ipgre tap device to not be greater than 1500, this limit value is not correct for ipgre tap device. Besides, it's .change_mtu already does the right check. So this patch is just to set max_mtu as 0, and leave the check to it's .change_mtu. Fixes: 61e84623ace3 ("net: centralize net_device min/max MTU checking") Reported-by: Jianlin Shi Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 1 + 1 file changed, 1 insertion(+) commit a93bf0ff449064e6b7f44e58522e940f88c0d966 Author: Xin Long Date: Mon Dec 18 14:20:56 2017 +0800 vxlan: update skb dst pmtu on tx path Unlike ip tunnels, now vxlan doesn't do any pmtu update for upper dst pmtu, even if it doesn't match the lower dst pmtu any more. The problem can be reproduced when reducing the vxlan lower dev's pmtu when running netperf. In jianlin's testing, the performance went to 1/7 of the previous. This patch is to update the upper dst pmtu to match the lower dst pmtu on tx path so that packets can be sent out even when lower dev's pmtu has been changed. It also works for metadata dst. Note that this patch doesn't process any pmtu icmp packet. But even in the future, the support for pmtu icmp packets process of udp tunnels will also needs this. The same thing will be done for geneve in another patch. Signed-off-by: Xin Long Signed-off-by: David S. Miller drivers/net/vxlan.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 78aa09754d69ba19a55c59f490788ec1c85f41f0 Author: Alexander Kochetkov Date: Tue Dec 19 14:03:57 2017 +0300 net: arc_emac: restart stalled EMAC Under certain conditions EMAC stop reception of incoming packets and continuously increment R_MISS register instead of saving data into provided buffer. The commit implement workaround for such situation. Then the stall detected EMAC will be restarted. On device the stall looks like the device lost it's dynamic IP address. ifconfig shows that interface error counter rapidly increments. At the same time on the DHCP server we can see continues DHCP-requests from device. In real network stalls happen really rarely. To make them frequent the broadcast storm[1] should be simulated. For simulation it is necessary to make following connections: 1. connect radxarock to 1st port of switch 2. connect some PC to 2nd port of switch 3. connect two other free ports together using standard ethernet cable, in order to make a switching loop. After that, is necessary to make a broadcast storm. For example, running on PC 'ping' to some IP address triggers ARP-request storm. After some time (~10sec), EMAC on rk3188 will stall. Observed and tested on rk3188 radxarock. [1] https://en.wikipedia.org/wiki/Broadcast_radiation Signed-off-by: Alexander Kochetkov Signed-off-by: David S. Miller drivers/net/ethernet/arc/emac.h | 2 + drivers/net/ethernet/arc/emac_main.c | 111 +++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) commit e688822d035b494071ecbadcccbd6f3325fb0f59 Author: Alexander Kochetkov Date: Fri Dec 15 20:20:06 2017 +0300 net: arc_emac: fix arc_emac_rx() error paths arc_emac_rx() has some issues found by code review. In case netdev_alloc_skb_ip_align() or dma_map_single() failure rx fifo entry will not be returned to EMAC. In case dma_map_single() failure previously allocated skb became lost to driver. At the same time address of newly allocated skb will not be provided to EMAC. Signed-off-by: Alexander Kochetkov Signed-off-by: David S. Miller drivers/net/ethernet/arc/emac_main.c | 53 +++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 22 deletions(-) commit 7352e252b5bf40d59342494a70354a2d436fd0cd Author: Sean Wang Date: Mon Dec 18 17:00:17 2017 +0800 net: mediatek: setup proper state for disabled GMAC on the default The current solution would setup fixed and force link of 1Gbps to the both GMAC on the default. However, The GMAC should always be put to link down state when the GMAC is disabled on certain target boards. Otherwise, the driver possibly receives unexpected data from the floating hardware connection through the unused GMAC. Although the driver had been added certain protection in RX path to get rid of such kind of unexpected data sent to the upper stack. Signed-off-by: Sean Wang Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 2cc42bac1c795f75fcc062b95c6ca7ac1b84d5d8 Author: Jan Beulich Date: Mon Dec 18 09:37:45 2017 -0700 x86-64/Xen: eliminate W+X mappings A few thousand such pages are usually left around due to the re-use of L1 tables having been provided by the hypervisor (Dom0) or tool stack (DomU). Set NX in the direct map variant, which needs to be done in L2 due to the dual use of the re-used L1s. For x86_configure_nx() to actually do what it is supposed to do, call get_cpu_cap() first. This was broken by commit 4763ed4d45 ("x86, mm: Clean up and simplify NX enablement") when switching away from the direct EFER read. Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky arch/x86/xen/enlighten_pv.c | 3 +++ arch/x86/xen/mmu_pv.c | 12 ++++++++++++ 2 files changed, 15 insertions(+) commit 8ba6b30ef700e16f3bc668e6f4f8375da9229e4d Author: Petr Machata Date: Sun Dec 17 17:16:43 2017 +0100 mlxsw: spectrum_router: Remove batch neighbour deletion causing FW bug This reverts commit 63dd00fa3e524c27cc0509190084ab147ecc8ae2. RAUHT DELETE_ALL seems to trigger a bug in FW. That manifests by later calls to RAUHT ADD of an IPv6 neighbor to fail with "bad parameter" error code. Signed-off-by: Petr Machata Fixes: 63dd00fa3e52 ("mlxsw: spectrum_router: Add batch neighbour deletion") Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 748a240c589824e9121befb1cba5341c319885bc Author: Brian King Date: Fri Dec 15 15:21:50 2017 -0600 tg3: Fix rx hang on MTU change with 5717/5719 This fixes a hang issue seen when changing the MTU size from 1500 MTU to 9000 MTU on both 5717 and 5719 chips. In discussion with Broadcom, they've indicated that these chipsets have the same phy as the 57766 chipset, so the same workarounds apply. This has been tested by IBM on both Power 8 and Power 9 systems as well as by Broadcom on x86 hardware and has been confirmed to resolve the hang issue. Signed-off-by: Brian King Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/tg3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 76916b663e8dd6d651ae13d0cb76ac3c45d2685e Merge: 7f038d2 964728f Author: Greg Kroah-Hartman Date: Tue Dec 19 15:55:38 2017 +0100 Merge tag 'usb-ci-v4.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: One fix for ulpi-node lookup at msm glue driver commit d6b246bb7a29703f53aa4c050b8b3205d749caee Author: Sushmita Susheelendra Date: Fri Dec 15 13:59:13 2017 -0700 staging: android: ion: Fix dma direction for dma_sync_sg_for_cpu/device Use the direction argument passed into begin_cpu_access and end_cpu_access when calling the dma_sync_sg_for_cpu/device. The actual cache primitive called depends on the direction passed in. Signed-off-by: Sushmita Susheelendra Cc: stable Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f292b9b28097d8fe870336108e91bd95a14294bf Author: John Stultz Date: Fri Dec 15 19:59:47 2017 -0800 staging: ion: Fix ion_cma_heap allocations In trying to add support for drm_hwcomposer to HiKey, I've needed to utilize the ION CMA heap, and I've noticed problems with allocations on newer kernels failing. It seems back with 204f672255c2 ("ion: Use CMA APIs directly"), the ion_cma_heap code was modified to use the CMA API, but kept the arguments as buffer lengths rather then number of pages. This results in errors as we don't have enough pages in CMA to satisfy the exaggerated requests. This patch converts the ion_cma_heap CMA API usage to properly request pages. It also fixes a minor issue in the allocation where in the error path, the cma_release is called with the buffer->size value which hasn't yet been set. Cc: Laura Abbott Cc: Sumit Semwal Cc: Benjamin Gaignard Cc: Archit Taneja Cc: Greg KH Cc: Daniel Vetter Cc: Dmitry Shmidt Cc: Todd Kjos Cc: Amit Pundir Fixes: 204f672255c2 ("staging: android: ion: Use CMA APIs directly") Acked-by: Laura Abbott Signed-off-by: John Stultz Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/Kconfig | 2 +- drivers/staging/android/ion/ion_cma_heap.c | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) commit c6479d6257e093ccbb1ae1ff84901794cbe2d73f Merge: ab14436 04a7279 Author: David S. Miller Date: Tue Dec 19 09:39:11 2017 -0500 Merge tag 'mac80211-for-davem-2017-12-19' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== A few more fixes: * hwsim: - set To-DS bit in some frames missing it - fix sleeping in atomic * nl80211: - doc cleanup - fix locking in an error path * build: - don't append to created certs C files - ship certificate pre-hexdumped ==================== Signed-off-by: David S. Miller commit 116d2f7496c51b2e02e8e4ecdd2bdf5fb9d5a641 Author: Prateek Sood Date: Tue Dec 19 12:56:57 2017 +0530 cgroup: Fix deadlock in cpu hotplug path Deadlock during cgroup migration from cpu hotplug path when a task T is being moved from source to destination cgroup. kworker/0:0 cpuset_hotplug_workfn() cpuset_hotplug_update_tasks() hotplug_update_tasks_legacy() remove_tasks_in_empty_cpuset() cgroup_transfer_tasks() // stuck in iterator loop cgroup_migrate() cgroup_migrate_add_task() In cgroup_migrate_add_task() it checks for PF_EXITING flag of task T. Task T will not migrate to destination cgroup. css_task_iter_start() will keep pointing to task T in loop waiting for task T cg_list node to be removed. Task T do_exit() exit_signals() // sets PF_EXITING exit_task_namespaces() switch_task_namespaces() free_nsproxy() put_mnt_ns() drop_collected_mounts() namespace_unlock() synchronize_rcu() _synchronize_rcu_expedited() schedule_work() // on cpu0 low priority worker pool wait_event() // waiting for work item to execute Task T inserted a work item in the worklist of cpu0 low priority worker pool. It is waiting for expedited grace period work item to execute. This work item will only be executed once kworker/0:0 complete execution of cpuset_hotplug_workfn(). kworker/0:0 ==> Task T ==>kworker/0:0 In case of PF_EXITING task being migrated from source to destination cgroup, migrate next available task in source cgroup. Signed-off-by: Prateek Sood Signed-off-by: Tejun Heo kernel/cgroup/cgroup-v1.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit db5ff909798ef0099004ad50a0ff5fde92426fd1 Author: Xinyu Lin Date: Sun Dec 17 20:13:39 2017 +0800 libata: apply MAX_SEC_1024 to all LITEON EP1 series devices LITEON EP1 has the same timeout issues as CX1 series devices. Revert max_sectors to the value of 1024. 'e0edc8c54646 ("libata: apply MAX_SEC_1024 to all CX1-JB*-HP devices")' Signed-off-by: Xinyu Lin Signed-off-by: Tejun Heo Cc: stable@vger.kernel.org drivers/ata/libata-core.c | 1 + 1 file changed, 1 insertion(+) commit a4ffdc2b6726958c07d535318400124e3a3bc19b Author: Rodrigo Vivi Date: Fri Dec 15 14:43:10 2017 -0800 drm/i915: Protect DDI port to DPLL map from theoretical race. In case we have multiple modesets for different connectors happening in parallel we could have a race on the RMW on these shared registers. This possibility was initially raised by Paulo when reviewing commit '555e38d27317 ("drm/i915/cnl: DDI - PLL mapping")' but the original possibility comes from commit '5416d871136d ("drm/i915/skl: Set the eDP link rate on DPLL0")'. Or maybe later when atomic commits entered into picture. Apparently the discussion around this topic showed that the right solution would be on serializing the atomic commits in a way that we don't have the possibility of races here since if that parallel modeset happenings apparently many other things will be on fire. Code is there since SKL and there was no report of issue, but since we never looked back to that serialization possibility, and also we don't have an igt case for that it is better to at least protect this corner. Suggested-by: Paulo Zanoni Fixes: 555e38d27317 ("drm/i915/cnl: DDI - PLL mapping") Fixes: 5416d871136d ("drm/i915/skl: Set the eDP link rate on DPLL0") Cc: Paulo Zanoni Cc: Ville Syrjälä Cc: Maarten Lankhorst maarten.lankhorst@linux.intel.com Signed-off-by: Rodrigo Vivi Reviewed-by: Maarten Lankhorst maarten.lankhorst@linux.intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20171215224310.19103-1-rodrigo.vivi@intel.com (cherry picked from commit 8edcda1266f93816fde77c9754f388ae0ae343fc) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_ddi.c | 4 ++++ 1 file changed, 4 insertions(+) commit e0795606ad565cc2da0b926a00c7e6b8187a6d71 Author: Chris Wilson Date: Wed Dec 13 18:28:58 2017 +0000 drm/i915/lpe: Remove double-encapsulation of info string Just printk the string, or at least do not double up on the newlines! Fixes: eef57324d926 ("drm/i915: setup bridge for HDMI LPE audio driver") Signed-off-by: Chris Wilson Cc: Pierre-Louis Bossart Cc: Jerome Anand Cc: Jani Nikula Cc: Takashi Iwai Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20171213182858.2159-1-chris@chris-wilson.co.uk (cherry picked from commit 99cd05c43baac8ef56c20eb1776a15b02c81ccc3) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_lpe_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20220945b1a8e77c789dd4bb9aa1471b6e8695cc Author: Brian Norris Date: Fri Dec 15 20:07:23 2017 -0800 ASoC: rt5514-spi: only enable wakeup when fully initialized If an rt5514-spi device is probed but the platform hasn't linked it in, we might never fully request the SPI IRQ, nor configure the rt5514 DSP, but we still might try to enable the SPI IRQ (enable_irq_wake()). This is bad, and among other things, can cause the interrupt to trigger every time we try to suspend the system (e.g., because the interrupt trigger setting was never set properly). Instead of setting our wakeup capabilities in the SPI driver probe routine, let's wait until we've actually requested the IRQ. Fixes issues seen on the "kevin" Chromebook (Samsung Chromebook Plus). Fixes: 58f1c07d23cd ("ASoC: rt5514: Voice wakeup support.") Signed-off-by: Brian Norris Signed-off-by: Mark Brown sound/soc/codecs/rt5514-spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4d029763724b6365c83c98f86f0958882efa8796 Merge: 1291a0d5 251c201 66e900a 8d26fdf 8c059a4 b458a34 c810dab 5a1314f Author: Mark Brown Date: Tue Dec 19 11:07:00 2017 +0000 Merge remote-tracking branches 'spi/fix/armada', 'spi/fix/atmel', 'spi/fix/doc', 'spi/fix/imx', 'spi/fix/rspi', 'spi/fix/sun4i' and 'spi/fix/xilinx' into spi-linus commit d070f7c703ef26e3db613f24206823f916272fc6 Author: Abhijeet Kumar Date: Tue Dec 12 00:40:25 2017 +0530 ASoC: nau8825: fix issue that pop noise when start capture In skylake platform, we hear a loud pop noise(0 dB) at start of audio capture power up sequence. This patch removes the pop noise from the recording by adding a delay before enabling ADC. Signed-off-by: Abhijeet Kumar Signed-off-by: Mark Brown sound/soc/codecs/nau8825.c | 1 + 1 file changed, 1 insertion(+) commit a93639090a2743c8e205c1ac25439702702b4ce4 Author: NeilBrown Date: Thu Dec 14 15:43:43 2017 +1100 staging: lustre: lnet: Fix recent breakage from list_for_each conversion Commit 8e55b6fd0660 ("staging: lustre: lnet: replace list_for_each with list_for_each_entry") was intended to be an idempotent change, but actually broke the behavior of ksocknal_add_peer() causing mounts to fail. The fact that it caused an existing "route2 = NULL;" to become redundant could have been a clue. The fact that the loop body set the new loop variable to NULL might also have been a clue The original code relied on "route2" being NULL if nothing was found. The new code would always set route2 to a non-NULL value if the list was empty, and would likely crash if the list was not empty. Restore correct functionality by using code-flow rather the value of "route2" to determine whether to use on old route, or to add a new one. Fixes: 8e55b6fd0660 ("staging: lustre: lnet: replace list_for_each with list_for_each_entry") Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman .../staging/lustre/lnet/klnds/socklnd/socklnd.c | 23 ++++++++++------------ 1 file changed, 10 insertions(+), 13 deletions(-) commit 7f038d256c723dd390d2fca942919573995f4cfd Author: Dmitry Fleytman Dmitry Fleytman Date: Tue Dec 19 06:02:04 2017 +0200 usb: Add device quirk for Logitech HD Pro Webcam C925e Commit e0429362ab15 ("usb: Add device quirk for Logitech HD Pro Webcams C920 and C930e") introduced quirk to workaround an issue with some Logitech webcams. There is one more model that has the same issue - C925e, so applying the same quirk as well. See aforementioned commit message for detailed explanation of the problem. Signed-off-by: Dmitry Fleytman Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/quirks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b9096d9f15c142574ebebe8fbb137012bb9d99c2 Author: Oliver Neukum Date: Tue Dec 12 16:11:30 2017 +0100 usb: add RESET_RESUME for ELSA MicroLink 56K This modem needs this quirk to operate. It produces timeouts when resumed without reset. Signed-off-by: Oliver Neukum CC: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) commit 544c4605acc5ae4afe7dd5914147947db182f2fb Author: Juan Zea Date: Fri Dec 15 10:21:20 2017 +0100 usbip: fix usbip bind writing random string after command in match_busid usbip bind writes commands followed by random string when writing to match_busid attribute in sysfs, caused by using full variable size instead of string length. Signed-off-by: Juan Zea Acked-by: Shuah Khan Cc: stable Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/src/utils.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 10c90120930628e8b959bf58d4a0aaef3ae5d945 Author: Shuah Khan Date: Fri Dec 15 10:05:15 2017 -0700 usbip: stub_rx: fix static checker warning on unnecessary checks Fix the following static checker warnings: The patch c6688ef9f297: "usbip: fix stub_rx: harden CMD_SUBMIT path to handle malicious input" from Dec 7, 2017, leads to the following static checker warning: drivers/usb/usbip/stub_rx.c:346 get_pipe() warn: impossible condition '(pdu->u.cmd_submit.transfer_buffer_length > ((~0 >> 1))) => (s32min-s32max > s32max)' drivers/usb/usbip/stub_rx.c:486 stub_recv_cmd_submit() warn: always true condition '(pdu->u.cmd_submit.transfer_buffer_length <= ((~0 >> 1))) => (s32min-s32max <= s32max)' Reported-by: Dan Carpenter Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_rx.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) commit 90120d15f4c397272aaf41077960a157fc4212bf Author: Shuah Khan Date: Fri Dec 15 10:50:09 2017 -0700 usbip: prevent leaking socket pointer address in messages usbip driver is leaking socket pointer address in messages. Remove the messages that aren't useful and print sockfd in the ones that are useful for debugging. Signed-off-by: Shuah Khan Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_dev.c | 3 +-- drivers/usb/usbip/usbip_common.c | 16 +++++----------- drivers/usb/usbip/vhci_hcd.c | 2 +- 3 files changed, 7 insertions(+), 14 deletions(-) commit 248a22044366f588d46754c54dfe29ffe4f8b4df Author: Shuah Khan Date: Mon Dec 18 17:23:37 2017 -0700 usbip: stub: stop printing kernel pointer addresses in messages Remove and/or change debug, info. and error messages to not print kernel pointer addresses. Signed-off-by: Shuah Khan Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_main.c | 5 +++-- drivers/usb/usbip/stub_rx.c | 7 ++----- drivers/usb/usbip/stub_tx.c | 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) commit 8272d099d05f7ab2776cf56a2ab9f9443be18907 Author: Shuah Khan Date: Mon Dec 18 17:24:22 2017 -0700 usbip: vhci: stop printing kernel pointer addresses in messages Remove and/or change debug, info. and error messages to not print kernel pointer addresses. Signed-off-by: Shuah Khan Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci_hcd.c | 10 ---------- drivers/usb/usbip/vhci_rx.c | 23 +++++++++++------------ drivers/usb/usbip/vhci_tx.c | 3 ++- 3 files changed, 13 insertions(+), 23 deletions(-) commit 07b9f12864d16c3a861aef4817eb1efccbc5d0e6 Author: Mathias Nyman Date: Tue Dec 19 11:14:42 2017 +0200 USB: Fix off by one in type-specific length check of BOS SSP capability USB 3.1 devices are not detected as 3.1 capable since 4.15-rc3 due to a off by one in commit 81cf4a45360f ("USB: core: Add type-specific length check of BOS descriptors") It uses USB_DT_USB_SSP_CAP_SIZE() to get SSP capability size which takes the zero based SSAC as argument, not the actual count of sublink speed attributes. USB3 spec 9.6.2.5 says "The number of Sublink Speed Attributes = SSAC + 1." The type-specific length check patch was added to stable and needs to be fixed there as well Fixes: 81cf4a45360f ("USB: core: Add type-specific length check of BOS descriptors") Cc: linux-stable CC: Masakazu Mokuno Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/core/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6074bc0c850ea58e412c49c05bb12247eb339f53 Merge: 1291a0d5 2b88212 Author: Greg Kroah-Hartman Date: Tue Dec 19 11:37:42 2017 +0100 Merge tag 'phy-for-4.15-rc_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus Kishon writes: phy: for 4.15 -rc *) Fix device-tree node lookups in tegra xusb *) Fix platform_get_irq_byname's error checking in cpcap-usb phy driver *) Fix in rockchip-typec phy driver to balance pm_runtime_enable/disable *) Fix compiler error in rcar-gen3-usb2 phy when USB is disabled Signed-off-by: Kishon Vijay Abraham I commit 3920bb713038810f25770e7545b79f204685c8f2 Author: SZ Lin (林上智) Date: Tue Dec 19 17:40:32 2017 +0800 USB: serial: option: adding support for YUGA CLM920-NC5 This patch adds support for YUGA CLM920-NC5 PID 0x9625 USB modem to option driver. Interface layout: 0: QCDM/DIAG 1: ADB 2: MODEM 3: AT 4: RMNET Signed-off-by: Taiyi Wu Signed-off-by: SZ Lin (林上智) Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 66e900a3d225575c8b48b59ae1fe74bb6e5a65cc Author: Radu Pirea Date: Fri Dec 15 17:40:17 2017 +0200 spi: atmel: fixed spin_lock usage inside atmel_spi_remove The only part of atmel_spi_remove which needs to be atomic is hardware reset. atmel_spi_stop_dma calls dma_terminate_all and this needs interrupts enabled. atmel_spi_release_dma calls dma_release_channel and dma_release_channel locks a mutex inside of spin_lock. So the call of these functions can't be inside a spin_lock. Reported-by: Jia-Ju Bai Signed-off-by: Radu Pirea Signed-off-by: Mark Brown drivers/spi/spi-atmel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92411f6d7f1afcc95e54295d40e96a75385212ec Author: Maxime Ripard Date: Thu Dec 7 16:58:50 2017 +0100 drm/sun4i: Fix error path handling The commit 4c7f16d14a33 ("drm/sun4i: Fix TCON clock and regmap initialization sequence") moved a bunch of logic around, but forgot to update the gotos after the introduction of the err_free_dotclock label. It means that if we fail later that the one introduced in that commit, we'll just to the old label which isn't free the clock we created. This will result in a breakage as soon as someone tries to do something with that clock, since its resources will have been long reclaimed. Cc: Fixes: 4c7f16d14a33 ("drm/sun4i: Fix TCON clock and regmap initialization sequence") Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/f83c1cebc731f0b4251f5ddd7b38c718cd79bb0b.1512662253.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eac6a3639decefcc8eb0941dd3cebe79993670ad Author: Maxime Ripard Date: Thu Dec 7 16:58:59 2017 +0100 ARM: dts: sun8i: a711: Reinstate the PMIC compatible When we added the regulator support in commit 90c5d7cdae64 ("ARM: dts: sun8i: a711: Add regulator support"), we also dropped the PMIC's compatible. Since it's not in the PMIC DTSI, unlike most other PMIC DTSI, it obviously wasn't probing anymore. Re-add it so that everything works again. Fixes: 90c5d7cdae64 ("ARM: dts: sun8i: a711: Add regulator support") Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 1 + 1 file changed, 1 insertion(+) commit 04a7279ff12fc47b657f70731d401c0064f5838a Author: Johannes Berg Date: Tue Dec 19 09:26:17 2017 +0100 cfg80211: ship certificates as hex files Not only does this remove the need for the hexdump code in most normal kernel builds (still there for the extra directory), but it also removes the need to ship binary files, which apparently is somewhat problematic, as Randy reported. While at it, also add the generated files to clean-files. Reported-by: Randy Dunlap Signed-off-by: Johannes Berg net/wireless/Makefile | 29 ++++--------- net/wireless/certs/sforshee.hex | 86 +++++++++++++++++++++++++++++++++++++++ net/wireless/certs/sforshee.x509 | Bin 680 -> 0 bytes 3 files changed, 95 insertions(+), 20 deletions(-) commit 958a1b5a5ed02a768eb27760268251af93090caf Author: Jonathan Corbet Date: Mon Dec 11 15:37:49 2017 -0700 nl80211: Remove obsolete kerneldoc line Commit ca986ad9bcd3 (nl80211: allow multiple active scheduled scan requests) removed WIPHY_FLAG_SUPPORTS_SCHED_SCAN but left the kerneldoc description in place, leading to this docs-build warning: ./include/net/cfg80211.h:3278: warning: Excess enum value 'WIPHY_FLAG_SUPPORTS_SCHED_SCAN' description in 'wiphy_flags' Remove the line and gain a bit of peace. Signed-off-by: Jonathan Corbet Acked-by: Arend van Spriel Signed-off-by: Johannes Berg include/net/cfg80211.h | 1 - 1 file changed, 1 deletion(-) commit 162bd5e5fd921785077b5862d8f2ffabe2fe11e5 Author: Jia-Ju Bai Date: Tue Dec 12 17:26:36 2017 +0800 mac80211_hwsim: Fix a possible sleep-in-atomic bug in hwsim_get_radio_nl The driver may sleep under a spinlock. The function call path is: hwsim_get_radio_nl (acquire the spinlock) nlmsg_new(GFP_KERNEL) --> may sleep To fix it, GFP_KERNEL is replaced with GFP_ATOMIC. This bug is found by my static analysis tool(DSAC) and checked by my code review. Signed-off-by: Jia-Ju Bai Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d32407396b0433f9b738fcfcb9599bcba7379ae Author: Thierry Reding Date: Thu Dec 14 14:33:38 2017 +0100 cfg80211: always rewrite generated files from scratch Currently the certs C code generation appends to the generated files, which is most likely a leftover from commit 715a12334764 ("wireless: don't write C files on failures"). This causes duplicate code in the generated files if the certificates have their timestamps modified between builds and thereby trigger the generation rules. Fixes: 715a12334764 ("wireless: don't write C files on failures") Signed-off-by: Thierry Reding Signed-off-by: Johannes Berg net/wireless/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b65c7b8aeac818eb8f80ce825073c12ad081b177 Author: Adiel Aloni Date: Mon Dec 18 12:14:04 2017 +0200 mac80211_hwsim: enable TODS BIT in null data frame Same as in ieee80211_nullfunc_get, enable the TODS bit, otherwise the nullfunc packet will not be handled in ap rx path. (will be dropped in ieee80211_accept_frame()). Signed-off-by: Adiel Aloni Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 1 + 1 file changed, 1 insertion(+) commit 6454b3bdd138dfc640deb5e7b9a0668fca2d55dd Author: Josh Poimboeuf Date: Mon Dec 18 15:13:44 2017 -0600 x86/stacktrace: Make zombie stack traces reliable Commit: 1959a60182f4 ("x86/dumpstack: Pin the target stack when dumping it") changed the behavior of stack traces for zombies. Before that commit, /proc//stack reported the last execution path of the zombie before it died: [] do_exit+0x6f7/0xa80 [] do_group_exit+0x39/0xa0 [] __wake_up_parent+0x0/0x30 [] system_call_fastpath+0x16/0x1b [<00007fd128f9c4f9>] 0x7fd128f9c4f9 [] 0xffffffffffffffff After the commit, it just reports an empty stack trace. The new behavior is actually probably more correct. If the stack refcount has gone down to zero, then the task has already gone through do_exit() and isn't going to run anymore. The stack could be freed at any time and is basically gone, so reporting an empty stack makes sense. However, save_stack_trace_tsk_reliable() treats such a missing stack condition as an error. That can cause livepatch transition stalls if there are any unreaped zombies. Instead, just treat it as a reliable, empty stack. Reported-and-tested-by: Miroslav Benes Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Fixes: af085d9084b4 ("stacktrace/x86: add function for detecting reliable stack traces") Link: http://lkml.kernel.org/r/e4b09e630e99d0c1080528f0821fc9d9dbaeea82.1513631620.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/stacktrace.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit acf568ee859f098279eadf551612f103afdacb4e Author: Herbert Xu Date: Fri Dec 15 16:40:44 2017 +1100 xfrm: Reinject transport-mode packets through tasklet This is an old bugbear of mine: https://www.mail-archive.com/netdev@vger.kernel.org/msg03894.html By crafting special packets, it is possible to cause recursion in our kernel when processing transport-mode packets at levels that are only limited by packet size. The easiest one is with DNAT, but an even worse one is where UDP encapsulation is used in which case you just have to insert an UDP encapsulation header in between each level of recursion. This patch avoids this problem by reinjecting tranport-mode packets through a tasklet. Fixes: b05e106698d9 ("[IPV4/6]: Netfilter IPsec input hooks") Signed-off-by: Herbert Xu Signed-off-by: Steffen Klassert include/net/xfrm.h | 3 +++ net/ipv4/xfrm4_input.c | 12 ++++++++++- net/ipv6/xfrm6_input.c | 10 ++++++++- net/xfrm/xfrm_input.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+), 2 deletions(-) commit 5a15f289ee87eaf33f13f08a4909ec99d837ec5f Author: Takashi Iwai Date: Mon Dec 18 23:36:57 2017 +0100 ALSA: usb-audio: Fix the missing ctl name suffix at parsing SU The commit 89b89d121ffc ("ALSA: usb-audio: Add check return value for usb_string()") added the check of the return value from snd_usb_copy_string_desc(), which is correct per se, but it introduced a regression. In the original code, either the "Clock Source", "Playback Source" or "Capture Source" suffix is added after the terminal string, while the commit changed it to add the suffix only when get_term_name() is failing. It ended up with an incorrect ctl name like "PCM" instead of "PCM Capture Source". Also, even the original code has a similar bug: when the ctl name is generated from snd_usb_copy_string_desc() for the given iSelector, it also doesn't put the suffix. This patch addresses these issues: the suffix is added always when no static mapping is found. Also the patch tries to put more comments and cleans up the if/else block for better readability in order to avoid the same pitfall again. Fixes: 89b89d121ffc ("ALSA: usb-audio: Add check return value for usb_string()") Reported-and-tested-by: Mauro Santos Cc: Signed-off-by: Takashi Iwai sound/usb/mixer.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit 81b6c999897919d5a16fedc018fe375dbab091c5 Author: Hannes Reinecke Date: Wed Dec 13 14:21:37 2017 +0100 scsi: core: check for device state in __scsi_remove_target() As it turned out device_get() doesn't use kref_get_unless_zero(), so we will be always getting a device pointer. Consequently, we need to check for the device state in __scsi_remove_target() to avoid tripping over deleted objects. Fixes: fbce4d97fd43 ("scsi: fixup kernel warning during rmmod()") Reported-by: Jason Yan Signed-off-by: Hannes Reinecke Reviewed-by: Bart Van Assche Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen drivers/scsi/scsi_sysfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 51b83e142834638d4fdb4d628ec8602b1107d91b Merge: 38f73db 74a3995 Author: Dave Airlie Date: Tue Dec 19 13:21:11 2017 +1000 Merge branch 'linux-4.15' of git://github.com/skeggsb/linux into drm-fixes nouveau regression fixes, and some minor fixes. * 'linux-4.15' of git://github.com/skeggsb/linux: drm/nouveau: use alternate memory type for system-memory buffers with kind != 0 drm/nouveau: avoid GPU page sizes > PAGE_SIZE for buffer objects in host memory drm/nouveau/mmu/gp10b: use correct implementation drm/nouveau/pci: do a msi rearm on init drm/nouveau/imem/nv50: fix refcount_t warning drm/nouveau/bios/dp: support DP Info Table 2.0 drm/nouveau/fbcon: fix NULL pointer access in nouveau_fbcon_destroy commit 182dc9c7f217146d69d9c0b75c150c0314b9b170 Author: Michael Ellerman Date: Mon Dec 18 16:33:36 2017 +1100 powerpc/kernel: Print actual address of regs when oopsing When we oops or otherwise call show_regs() we print the address of the regs structure. Being able to see the address is fairly useful, firstly to verify that the regs pointer is not completely bogus, and secondly it allows you to dump the regs and surrounding memory with a debugger if you have one. In the normal case the regs will be located somewhere on the stack, so printing their location discloses no further information than printing the stack pointer does already. So switch to %px and print the actual address, not the hashed value. Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c682ccc4962a8fab949e1f2d7325b3e825dbf6d1 Author: Hendrik Brueckner Date: Mon Dec 18 14:09:57 2017 +0100 bpf: fix broken BPF selftest build on s390 With 720f228e8d31 ("bpf: fix broken BPF selftest build") the inclusion of arch-specific header files changed. Including the asm/bpf_perf_event.h on s390, correctly includes the s390 specific header file. This header file tries then to include the s390 asm/ptrace.h and the build fails with: cc -Wall -O2 -I../../../include/uapi -I../../../lib -I../../../../include/generated -I../../../include test_verifier.c +/root/git/linux/tools/testing/selftests/bpf/libbpf.a /root/git/linux/tools/testing/selftests/bpf/cgroup_helpers.c -lcap -lelf -o +/root/git/linux/tools/testing/selftests/bpf/test_verifier In file included from ../../../include/uapi/asm/bpf_perf_event.h:4:0, from ../../../include/uapi/linux/bpf_perf_event.h:11, from test_verifier.c:29: ../../../include/uapi/../../arch/s390/include/uapi/asm/bpf_perf_event.h:7:9: error: unknown type name 'user_pt_regs' typedef user_pt_regs bpf_user_pt_regs_t; ^~~~~~~~~~~~ make: *** [../lib.mk:109: /root/git/linux/tools/testing/selftests/bpf/test_verifier] Error 1 This is caused by a recent update to the s390 asm/ptrace.h file that is not (yet) available in the local installation. That means, the s390 asm/ptrace.h must be included from the tools/arch/s390 directory. Because there is no proper framework to deal with asm specific includes in tools/, slightly modify the s390 asm/bpf_perf_event.h to include the local ptrace.h header file. See also discussion on https://marc.info/?l=linux-s390&m=151359424420691&w=2 Please note that this needs to be preserved until tools/ is able to correctly handle asm specific headers. References: https://marc.info/?l=linux-s390&m=151359424420691&w=2 Fixes: 720f228e8d31 ("bpf: fix broken BPF selftest build") Signed-off-by: Hendrik Brueckner Cc: Daniel Borkmann Cc: Hendrik Brueckner Cc: Arnaldo Carvalho de Melo Cc: Alexei Starovoitov Signed-off-by: Daniel Borkmann tools/arch/s390/include/uapi/asm/bpf_perf_event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ace52288edf0cb5e7a52b681f057f86224c49c27 Merge: cb81fc6 d82c368 Author: Linus Torvalds Date: Mon Dec 18 16:18:01 2017 -0800 Merge tag 'for-linus-20171218' of git://git.infradead.org/linux-mtd Pull MTD fixes from Richard Weinberger: "This contains the following regression fixes: - fix bitflip handling in brcmnand and gpmi nand drivers - revert a bad device tree binding for spi-nor - fix a copy&paste error in gpio-nand driver - fix a too strict length check in mtd core" * tag 'for-linus-20171218' of git://git.infradead.org/linux-mtd: mtd: Fix mtd_check_oob_ops() mtd: nand: gpio: Fix ALE gpio configuration mtd: nand: brcmnand: Zero bitflip is not an error mtd: nand: gpmi: Fix failure when a erased page has a bitflip at BBM Revert "dt-bindings: mtd: add sst25wf040b and en25s64 to sip-nor list" commit 74a39954a4900a7dea7010e3063e2bf16b23934b Author: Ben Skeggs Date: Thu Dec 14 11:19:27 2017 +1000 drm/nouveau: use alternate memory type for system-memory buffers with kind != 0 Fixes bug on Tegra where we'd strip kind information from system memory (ie. all) buffers, resulting in misrendering. Behaviour on dGPU should be unchanged. Reported-by: Thierry Reding Fixes: d7722134b8 ("drm/nouveau: switch over to new memory and vmm interfaces") Signed-off-by: Ben Skeggs Tested-by: Thierry Reding drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drv.h | 11 ++++++++-- drivers/gpu/drm/nouveau/nouveau_mem.c | 6 +++--- drivers/gpu/drm/nouveau/nouveau_ttm.c | 39 ++++++++++++++++++++++++++--------- 4 files changed, 42 insertions(+), 16 deletions(-) commit f29f18eb952bc3e71deedf8bd8fc902f66853c48 Author: Ben Skeggs Date: Thu Dec 7 15:25:14 2017 +1000 drm/nouveau: avoid GPU page sizes > PAGE_SIZE for buffer objects in host memory While the Tegra (GK20A, GM20B, GP10B) MMUs support large pages in host memory, we're currently lacking IOMMU support for merging system pages into large enough chunks to be mapped as such by the GPU. The core VMM code actually supports automatically determining the best page size to map with, which is intended for these situations, but for various complicated reasons the DRM is currently forcing the page size selection on a per-BO basis. This should fix breakage reported on Tegra GPUs in the meantime, until one or both of the above issues are resolved properly. Reported-by: Mikko Perttunen Fixes: 7dc6a446da7c ("drm/nouveau: improve selection of GPU page size") Signed-off-by: Ben Skeggs Tested-by: Thierry Reding drivers/gpu/drm/nouveau/nouveau_bo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6cb0f2a39d3b7ccdd7269af4ddadb38e78aee744 Author: Ben Skeggs Date: Thu Dec 7 15:04:32 2017 +1000 drm/nouveau/mmu/gp10b: use correct implementation Reported-by: Mikko Perttunen Fixes: 6359c98224 ("drm/nouveau/mmu/gp10b: fork from gf100") Signed-off-by: Ben Skeggs Tested-by: Thierry Reding drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a121027d2747168df0aac0c3da35509eea39f61c Author: Karol Herbst Date: Fri Nov 24 03:56:26 2017 +0100 drm/nouveau/pci: do a msi rearm on init On my GP107 when I load nouveau after unloading it, for some reason the GPU stopped sending or the CPU stopped receiving interrupts if MSI was enabled. Doing a rearm once before getting any interrupts fixes this. Signed-off-by: Karol Herbst Reviewed-by: Thierry Reding Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/pci/base.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 81a24b9ae8eea95b74337c253059da761043ed06 Author: Ben Skeggs Date: Thu Dec 7 11:08:52 2017 +1000 drm/nouveau/imem/nv50: fix refcount_t warning Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f60707a69a225f2dd87f42628b44e24ceb219d28 Author: Ben Skeggs Date: Thu Dec 7 10:49:35 2017 +1000 drm/nouveau/bios/dp: support DP Info Table 2.0 Reported-by: Hans de Goede Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bios/dp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 34112bf4935dabe3c1d1fd42842ed771e279bf61 Author: Karol Herbst Date: Mon Nov 6 16:20:33 2017 +0100 drm/nouveau/fbcon: fix NULL pointer access in nouveau_fbcon_destroy When the fbcon object is initialized, but nouveau_fbcon_create is not called, we run into a NULL pointer access within nouveau_fbcon_create when unloading nouveau. The call to drm_fb_helper_funcs.fb_probe is deferred until there is a display for real since 4.14, that's why fbcon->helper.fb is still not set. Signed-off-by: Karol Herbst Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b7e9d9e2d8b4de6f0d5d7a5fc63f48b1fbcf4d4 Author: Anthony Kim Date: Mon Dec 18 11:50:48 2017 -0800 Input: hideep - fix compile error due to missing include file gpiod_() API requires including "linux/gpio/consumer.h". Also, we are not using the legacy API nor the static board files descriptions, so no need to include gpio.h nor gpio/machine.h. Reported-by: kbuild test robot Signed-off-by: Anthony Kim Patchwork-Id: 10094831 Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/hideep.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0abc2a10389f0c9070f76ca906c7382788036b93 Author: Jens Axboe Date: Mon Dec 18 15:40:44 2017 +0800 block: fix blk_rq_append_bio Commit caa4b02476e3(blk-map: call blk_queue_bounce from blk_rq_append_bio) moves blk_queue_bounce() into blk_rq_append_bio(), but don't consider the fact that the bounced bio becomes invisible to caller since the parameter type is 'struct bio *'. Make it a pointer to a pointer to a bio, so the caller sees the right bio also after a bounce. Fixes: caa4b02476e3 ("blk-map: call blk_queue_bounce from blk_rq_append_bio") Cc: Christoph Hellwig Reported-by: Michele Ballabio (handling failure of blk_rq_append_bio(), only call bio_get() after blk_rq_append_bio() returns OK) Tested-by: Michele Ballabio Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-map.c | 38 ++++++++++++++++++++++---------------- drivers/scsi/osd/osd_initiator.c | 4 +++- drivers/target/target_core_pscsi.c | 4 ++-- include/linux/blkdev.h | 2 +- 4 files changed, 28 insertions(+), 20 deletions(-) commit 14cb0dc6479dc5ebc63b3a459a5d89a2f1b39fed Author: Ming Lei Date: Mon Dec 18 15:40:43 2017 +0800 block: don't let passthrough IO go into .make_request_fn() Commit a8821f3f3("block: Improvements to bounce-buffer handling") tries to make sure that the bio to .make_request_fn won't exceed BIO_MAX_PAGES, but ignores that passthrough I/O can use blk_queue_bounce() too. Especially, passthrough IO may not be sector-aligned, and the check of 'sectors < bio_sectors(*bio_orig)' inside __blk_queue_bounce() may become true even though the max bvec number doesn't exceed BIO_MAX_PAGES, then cause the bio splitted, and the original passthrough bio is submited to generic_make_request(). This patch fixes this issue by checking if the bio is passthrough IO, and use bio_kmalloc() to allocate the cloned passthrough bio. Cc: NeilBrown Fixes: a8821f3f3("block: Improvements to bounce-buffer handling") Tested-by: Michele Ballabio Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/bounce.c | 6 ++++-- include/linux/blkdev.h | 21 +++++++++++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) commit ab14436065c8066c265540312742390d6d07ddd2 Author: Alexey Khoroshilov Date: Sat Dec 16 00:52:39 2017 +0300 net: phy: xgene: disable clk on error paths There are several error paths in xgene_mdio_probe(), where clk is left undisabled. The patch fixes them. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: David S. Miller drivers/net/phy/mdio-xgene.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 9ee332d99e4d5a97548943b81c54668450ce641b Author: Al Viro Date: Mon Dec 18 15:05:07 2017 -0500 sget(): handle failures of register_shrinker() Signed-off-by: Al Viro fs/super.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6623c0fba10ef45b64ca213ad5dec926f37fa9a0 Author: Russell King Date: Fri Dec 15 16:10:20 2017 +0000 net: phy: marvell: avoid pause mode on SGMII-to-Copper for 88e151x Observed on the 88e1512 in SGMII-to-Copper mode, negotiating pause is unreliable. While the pause bits can be set in the advertisment register, they clear shortly after negotiation with a link partner commences irrespective of the cause of the negotiation. While these bits may be correctly conveyed to the link partner on the first negotiation, a subsequent negotiation (eg, due to negotiation restart by the link partner, or reconnection of the cable) will result in the link partner seeing these bits as zero, while the kernel believes that it has advertised pause modes. This leads to the local kernel evaluating (eg) symmetric pause mode, while the remote end evaluates that we have no pause mode capability. Since we can't guarantee the advertisment, disable pause mode support with this PHY when used in SGMII-to-Copper mode. The 88e1510 in RGMII-to-Copper mode appears to behave correctly. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit bb422a738f6566f7439cd347d54e321e4fe92a9f Author: Tetsuo Handa Date: Mon Dec 18 20:31:41 2017 +0900 mm,vmscan: Make unregister_shrinker() no-op if register_shrinker() failed. Syzbot caught an oops at unregister_shrinker() because combination of commit 1d3d4437eae1bb29 ("vmscan: per-node deferred work") and fault injection made register_shrinker() fail and the caller of register_shrinker() did not check for failure. ---------- [ 554.881422] FAULT_INJECTION: forcing a failure. [ 554.881422] name failslab, interval 1, probability 0, space 0, times 0 [ 554.881438] CPU: 1 PID: 13231 Comm: syz-executor1 Not tainted 4.14.0-rc8+ #82 [ 554.881443] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 554.881445] Call Trace: [ 554.881459] dump_stack+0x194/0x257 [ 554.881474] ? arch_local_irq_restore+0x53/0x53 [ 554.881486] ? find_held_lock+0x35/0x1d0 [ 554.881507] should_fail+0x8c0/0xa40 [ 554.881522] ? fault_create_debugfs_attr+0x1f0/0x1f0 [ 554.881537] ? check_noncircular+0x20/0x20 [ 554.881546] ? find_next_zero_bit+0x2c/0x40 [ 554.881560] ? ida_get_new_above+0x421/0x9d0 [ 554.881577] ? find_held_lock+0x35/0x1d0 [ 554.881594] ? __lock_is_held+0xb6/0x140 [ 554.881628] ? check_same_owner+0x320/0x320 [ 554.881634] ? lock_downgrade+0x990/0x990 [ 554.881649] ? find_held_lock+0x35/0x1d0 [ 554.881672] should_failslab+0xec/0x120 [ 554.881684] __kmalloc+0x63/0x760 [ 554.881692] ? lock_downgrade+0x990/0x990 [ 554.881712] ? register_shrinker+0x10e/0x2d0 [ 554.881721] ? trace_event_raw_event_module_request+0x320/0x320 [ 554.881737] register_shrinker+0x10e/0x2d0 [ 554.881747] ? prepare_kswapd_sleep+0x1f0/0x1f0 [ 554.881755] ? _down_write_nest_lock+0x120/0x120 [ 554.881765] ? memcpy+0x45/0x50 [ 554.881785] sget_userns+0xbcd/0xe20 (...snipped...) [ 554.898693] kasan: CONFIG_KASAN_INLINE enabled [ 554.898724] kasan: GPF could be caused by NULL-ptr deref or user memory access [ 554.898732] general protection fault: 0000 [#1] SMP KASAN [ 554.898737] Dumping ftrace buffer: [ 554.898741] (ftrace buffer empty) [ 554.898743] Modules linked in: [ 554.898752] CPU: 1 PID: 13231 Comm: syz-executor1 Not tainted 4.14.0-rc8+ #82 [ 554.898755] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 554.898760] task: ffff8801d1dbe5c0 task.stack: ffff8801c9e38000 [ 554.898772] RIP: 0010:__list_del_entry_valid+0x7e/0x150 [ 554.898775] RSP: 0018:ffff8801c9e3f108 EFLAGS: 00010246 [ 554.898780] RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 554.898784] RDX: 0000000000000000 RSI: ffff8801c53c6f98 RDI: ffff8801c53c6fa0 [ 554.898788] RBP: ffff8801c9e3f120 R08: 1ffff100393c7d55 R09: 0000000000000004 [ 554.898791] R10: ffff8801c9e3ef70 R11: 0000000000000000 R12: 0000000000000000 [ 554.898795] R13: dffffc0000000000 R14: 1ffff100393c7e45 R15: ffff8801c53c6f98 [ 554.898800] FS: 0000000000000000(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 [ 554.898804] CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 [ 554.898807] CR2: 00000000dbc23000 CR3: 00000001c7269000 CR4: 00000000001406e0 [ 554.898813] DR0: 0000000020000000 DR1: 0000000020000000 DR2: 0000000000000000 [ 554.898816] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 [ 554.898818] Call Trace: [ 554.898828] unregister_shrinker+0x79/0x300 [ 554.898837] ? perf_trace_mm_vmscan_writepage+0x750/0x750 [ 554.898844] ? down_write+0x87/0x120 [ 554.898851] ? deactivate_super+0x139/0x1b0 [ 554.898857] ? down_read+0x150/0x150 [ 554.898864] ? check_same_owner+0x320/0x320 [ 554.898875] deactivate_locked_super+0x64/0xd0 [ 554.898883] deactivate_super+0x141/0x1b0 ---------- Since allowing register_shrinker() callers to call unregister_shrinker() when register_shrinker() failed can simplify error recovery path, this patch makes unregister_shrinker() no-op when register_shrinker() failed. Also, reset shrinker->nr_deferred in case unregister_shrinker() was by error called twice. Signed-off-by: Tetsuo Handa Signed-off-by: Aliaksei Karaliou Reported-by: syzbot Cc: Glauber Costa Cc: Al Viro Signed-off-by: Al Viro mm/vmscan.c | 3 +++ 1 file changed, 3 insertions(+) commit cb81fc6a3cf694345f29858624e5d9f3509d30d4 Merge: 64a4809 da57c54 Author: Linus Torvalds Date: Mon Dec 18 11:26:16 2017 -0800 Merge branch 'parisc-4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: "There are two important fixes here: - Add PCI quirks to disable built-in a serial AUX and a graphics cards from specific GSP (management board) PCI cards. This fixes boot via serial console on rp3410 and rp3440 machines. - Revert the "Re-enable interrups early" patch which was added to kernel v4.10. It can trigger stack overflows and thus silent data corruption. With this patch reverted we can lower our thread stack back to 16kb again. The other patches are minor cleanups: avoid duplicate includes, indenting fixes, correctly align variable in asm code" * 'parisc-4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Reduce thread stack to 16 kb Revert "parisc: Re-enable interrupts early" parisc: remove duplicate includes parisc: Hide Diva-built-in serial aux and graphics card parisc: Align os_hpmc_size on word boundary parisc: Fix indenting in puts() commit 84aeb437ab98a2bce3d4b2111c79723aedfceb33 Author: Nikolay Aleksandrov Date: Mon Dec 18 17:35:09 2017 +0200 net: bridge: fix early call to br_stp_change_bridge_id and plug newlink leaks The early call to br_stp_change_bridge_id in bridge's newlink can cause a memory leak if an error occurs during the newlink because the fdb entries are not cleaned up if a different lladdr was specified, also another minor issue is that it generates fdb notifications with ifindex = 0. Another unrelated memory leak is the bridge sysfs entries which get added on NETDEV_REGISTER event, but are not cleaned up in the newlink error path. To remove this special case the call to br_stp_change_bridge_id is done after netdev register and we cleanup the bridge on changelink error via br_dev_delete to plug all leaks. This patch makes netlink bridge destruction on newlink error the same as dellink and ioctl del which is necessary since at that point we have a fully initialized bridge device. To reproduce the issue: $ ip l add br0 address 00:11:22:33:44:55 type bridge group_fwd_mask 1 RTNETLINK answers: Invalid argument $ rmmod bridge [ 1822.142525] ============================================================================= [ 1822.143640] BUG bridge_fdb_cache (Tainted: G O ): Objects remaining in bridge_fdb_cache on __kmem_cache_shutdown() [ 1822.144821] ----------------------------------------------------------------------------- [ 1822.145990] Disabling lock debugging due to kernel taint [ 1822.146732] INFO: Slab 0x0000000092a844b2 objects=32 used=2 fp=0x00000000fef011b0 flags=0x1ffff8000000100 [ 1822.147700] CPU: 2 PID: 13584 Comm: rmmod Tainted: G B O 4.15.0-rc2+ #87 [ 1822.148578] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [ 1822.150008] Call Trace: [ 1822.150510] dump_stack+0x78/0xa9 [ 1822.151156] slab_err+0xb1/0xd3 [ 1822.151834] ? __kmalloc+0x1bb/0x1ce [ 1822.152546] __kmem_cache_shutdown+0x151/0x28b [ 1822.153395] shutdown_cache+0x13/0x144 [ 1822.154126] kmem_cache_destroy+0x1c0/0x1fb [ 1822.154669] SyS_delete_module+0x194/0x244 [ 1822.155199] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 1822.155773] entry_SYSCALL_64_fastpath+0x23/0x9a [ 1822.156343] RIP: 0033:0x7f929bd38b17 [ 1822.156859] RSP: 002b:00007ffd160e9a98 EFLAGS: 00000202 ORIG_RAX: 00000000000000b0 [ 1822.157728] RAX: ffffffffffffffda RBX: 00005578316ba090 RCX: 00007f929bd38b17 [ 1822.158422] RDX: 00007f929bd9ec60 RSI: 0000000000000800 RDI: 00005578316ba0f0 [ 1822.159114] RBP: 0000000000000003 R08: 00007f929bff5f20 R09: 00007ffd160e8a11 [ 1822.159808] R10: 00007ffd160e9860 R11: 0000000000000202 R12: 00007ffd160e8a80 [ 1822.160513] R13: 0000000000000000 R14: 0000000000000000 R15: 00005578316ba090 [ 1822.161278] INFO: Object 0x000000007645de29 @offset=0 [ 1822.161666] INFO: Object 0x00000000d5df2ab5 @offset=128 Fixes: 30313a3d5794 ("bridge: Handle IFLA_ADDRESS correctly when creating bridge device") Fixes: 5b8d5429daa0 ("bridge: netlink: register netdevice before executing changelink") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_netlink.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit d196975905b2bb227dc54547c03b3d9d0013805c Author: Xin Long Date: Mon Dec 18 14:13:17 2017 +0800 sctp: add SCTP_CID_RECONF conversion in sctp_cname Whenever a new type of chunk is added, the corresp conversion in sctp_cname should be added. Otherwise, in some places, pr_debug will print it as "unknown chunk". Fixes: cc16f00f6529 ("sctp: add support for generating stream reconf ssn reset request chunk") Signed-off-by: Xin Long Acked-by: Marcelo R. Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/debug.c | 3 +++ 1 file changed, 3 insertions(+) commit 5c468674d17056148da06218d4da5d04baf22eac Author: Xin Long Date: Mon Dec 18 14:07:25 2017 +0800 sctp: fix the issue that a __u16 variable may overflow in sctp_ulpq_renege Now when reneging events in sctp_ulpq_renege(), the variable freed could be increased by a __u16 value twice while freed is of __u16 type. It means freed may overflow at the second addition. This patch is to fix it by using __u32 type for 'freed', while at it, also to remove 'if (chunk)' check, as all renege commands are generated in sctp_eat_data and it can't be NULL. Reported-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/ulpqueue.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit ac3241d5c81bf6e85095481435f29a4627ff820e Author: Hemanth Puranik Date: Mon Dec 18 11:27:47 2017 +0530 net: qcom/emac: Change the order of mac up and sgmii open This patch fixes the order of mac_up and sgmii_open for the reasons noted below: - If open takes more time(if the SGMII block is not responding or if we want to do some delay based task) in this situation we will hit NETDEV watchdog - The main reason : We should signal to upper layers that we are ready to receive packets "only" when the entire path is initialized not the other way around, this is followed in the reset path where we do mac_down, sgmii_reset and mac_up. This also makes the driver uniform across the reset and open paths. - In the future there may be need for delay based tasks to be done in sgmii open which will result in NETDEV watchdog - As per the documentation the order of init should be sgmii, mac, rings and DMA Signed-off-by: Hemanth Puranik Acked-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c505873eaece2b4aefd07d339dc7e1400e0235ac Author: Zhao Qiang Date: Mon Dec 18 10:26:43 2017 +0800 net: phy: marvell: Limit 88m1101 autoneg errata to 88E1145 as well. 88E1145 also need this autoneg errata. Fixes: f2899788353c ("net: phy: marvell: Limit errata to 88m1101") Signed-off-by: Zhao Qiang Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f42f5fe31c8715a34064bfd7b788488d1ea2f7c Author: Jon Maloy Date: Mon Dec 18 18:13:34 2017 +0100 tipc: remove leaving group member from all lists A group member going into state LEAVING should never go back to any other state before it is finally deleted. However, this might happen if the socket needs to send out a RECLAIM message during this interval. Since we forget to remove the leaving member from the group's 'active' or 'pending' list, the member might be selected for reclaiming, change state to RECLAIMING, and get stuck in this state instead of being deleted. This might lead to suppression of the expected 'member down' event to the receiver. We fix this by removing the member from all lists, except the RB tree, at the moment it goes into state LEAVING. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/group.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 234833991e14681f61cbfd93e65a5c976089cf11 Author: Jon Maloy Date: Mon Dec 18 17:34:16 2017 +0100 tipc: fix lost member events bug Group messages are not supposed to be returned to sender when the destination socket disappears. This is done correctly for regular traffic messages, by setting the 'dest_droppable' bit in the header. But we forget to do that in group protocol messages. This has the effect that such messages may sometimes bounce back to the sender, be perceived as a legitimate peer message, and wreak general havoc for the rest of the session. In particular, we have seen that a member in state LEAVING may go back to state RECLAIMED or REMITTED, hence causing suppression of an otherwise expected 'member down' event to the user. We fix this by setting the 'dest_droppable' bit even in group protocol messages. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/group.c | 1 + 1 file changed, 1 insertion(+) commit 2e36463525b8b63b32be0721d0268e336d314b38 Merge: 1291a0d5 ca26cff Author: Ingo Molnar Date: Mon Dec 18 18:10:32 2017 +0100 Merge tag 'perf-urgent-for-mingo-4.15-20171218' 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 up build in hardened environments, such as fedora 27 (Jiri Olsa) - Do not include header files from the kernel sources for the s/390 arch, fixing the detached tarball building (Arnaldo Carvalho de Melo) - Allow again using asm.h when building for the 'bpf' clang target, guarding x86 specific bits under ifndef __BPF__ (Arnaldo Carvalho de Melo) - Generate correct debug information for inlined code when generating ELF images for JITted java programs (Ben Gainey) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 64a48099b3b31568ac45716b7fafcb74a0c2fcfe Merge: 1291a0d5 6cbd217 Author: Linus Torvalds Date: Mon Dec 18 08:59:15 2017 -0800 Merge branch 'WIP.x86-pti.entry-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 syscall entry code changes for PTI from Ingo Molnar: "The main changes here are Andy Lutomirski's changes to switch the x86-64 entry code to use the 'per CPU entry trampoline stack'. This, besides helping fix KASLR leaks (the pending Page Table Isolation (PTI) work), also robustifies the x86 entry code" * 'WIP.x86-pti.entry-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits) x86/cpufeatures: Make CPU bugs sticky x86/paravirt: Provide a way to check for hypervisors x86/paravirt: Dont patch flush_tlb_single x86/entry/64: Make cpu_entry_area.tss read-only x86/entry: Clean up the SYSENTER_stack code x86/entry/64: Remove the SYSENTER stack canary x86/entry/64: Move the IST stacks into struct cpu_entry_area x86/entry/64: Create a per-CPU SYSCALL entry trampoline x86/entry/64: Return to userspace from the trampoline stack x86/entry/64: Use a per-CPU trampoline stack for IDT entries x86/espfix/64: Stop assuming that pt_regs is on the entry stack x86/entry/64: Separate cpu_current_top_of_stack from TSS.sp0 x86/entry: Remap the TSS into the CPU entry area x86/entry: Move SYSENTER_stack to the beginning of struct tss_struct x86/dumpstack: Handle stack overflow on all stacks x86/entry: Fix assumptions that the HW TSS is at the beginning of cpu_tss x86/kasan/64: Teach KASAN about the cpu_entry_area x86/mm/fixmap: Generalize the GDT fixmap mechanism, introduce struct cpu_entry_area x86/entry/gdt: Put per-CPU GDT remaps in ascending order x86/dumpstack: Add get_stack_info() support for the SYSENTER stack ... commit b36025b19a2301ba0cac05e6ffad5668013d2c77 Merge: f870c1f c1b08eb Author: David S. Miller Date: Mon Dec 18 10:49:22 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2017-12-17 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix a corner case in generic XDP where we have non-linear skbs but enough tailroom in the skb to not miss to linearizing there, from Song. 2) Fix BPF JIT bugs in s390x and ppc64 to not recache skb data when BPF context is not skb, from Daniel. 3) Fix a BPF JIT bug in sparc64 where recaching skb data after helper call would use the wrong register for the skb, from Daniel. ==================== Signed-off-by: David S. Miller commit ca26cffa4e4aaeb09bb9e308f95c7835cb149248 Author: Arnaldo Carvalho de Melo Date: Mon Dec 4 13:08:47 2017 -0300 x86/asm: Allow again using asm.h when building for the 'bpf' clang target Up to f5caf621ee35 ("x86/asm: Fix inline asm call constraints for Clang") we were able to use x86 headers to build to the 'bpf' clang target, as done by the BPF code in tools/perf/. With that commit, we ended up with following failure for 'perf test LLVM', this is because "clang ... -target bpf ..." fails since 4.0 does not have bpf inline asm support and 6.0 does not recognize the register 'esp', fix it by guarding that part with an #ifndef __BPF__, that is defined by clang when building to the "bpf" target. # perf test -v LLVM 37: LLVM search and compile : 37.1: Basic BPF llvm compile : --- start --- test child forked, pid 25526 Kernel build dir is set to /lib/modules/4.14.0+/build set env: KBUILD_DIR=/lib/modules/4.14.0+/build unset env: KBUILD_OPTS include option is set to -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/7/include -I/home/acme/git/linux/arch/x86/include -I./arch/x86/include/generated -I/home/acme/git/linux/include -I./include -I/home/acme/git/linux/arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I/home/acme/git/linux/include/uapi -I./include/generated/uapi -include /home/acme/git/linux/include/linux/kconfig.h set env: NR_CPUS=4 set env: LINUX_VERSION_CODE=0x40e00 set env: CLANG_EXEC=/usr/local/bin/clang set env: CLANG_OPTIONS=-xc set env: KERNEL_INC_OPTIONS= -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/7/include -I/home/acme/git/linux/arch/x86/include -I./arch/x86/include/generated -I/home/acme/git/linux/include -I./include -I/home/acme/git/linux/arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I/home/acme/git/linux/include/uapi -I./include/generated/uapi -include /home/acme/git/linux/include/linux/kconfig.h set env: WORKING_DIR=/lib/modules/4.14.0+/build set env: CLANG_SOURCE=- llvm compiling command template: echo '/* * bpf-script-example.c * Test basic LLVM building */ #ifndef LINUX_VERSION_CODE # error Need LINUX_VERSION_CODE # error Example: for 4.2 kernel, put 'clang-opt="-DLINUX_VERSION_CODE=0x40200" into llvm section of ~/.perfconfig' #endif #define BPF_ANY 0 #define BPF_MAP_TYPE_ARRAY 2 #define BPF_FUNC_map_lookup_elem 1 #define BPF_FUNC_map_update_elem 2 static void *(*bpf_map_lookup_elem)(void *map, void *key) = (void *) BPF_FUNC_map_lookup_elem; static void *(*bpf_map_update_elem)(void *map, void *key, void *value, int flags) = (void *) BPF_FUNC_map_update_elem; struct bpf_map_def { unsigned int type; unsigned int key_size; unsigned int value_size; unsigned int max_entries; }; #define SEC(NAME) __attribute__((section(NAME), used)) struct bpf_map_def SEC("maps") flip_table = { .type = BPF_MAP_TYPE_ARRAY, .key_size = sizeof(int), .value_size = sizeof(int), .max_entries = 1, }; SEC("func=SyS_epoll_wait") int bpf_func__SyS_epoll_wait(void *ctx) { int ind =0; int *flag = bpf_map_lookup_elem(&flip_table, &ind); int new_flag; if (!flag) return 0; /* flip flag and store back */ new_flag = !*flag; bpf_map_update_elem(&flip_table, &ind, &new_flag, BPF_ANY); return new_flag; } char _license[] SEC("license") = "GPL"; int _version SEC("version") = LINUX_VERSION_CODE; ' | $CLANG_EXEC -D__KERNEL__ -D__NR_CPUS__=$NR_CPUS -DLINUX_VERSION_CODE=$LINUX_VERSION_CODE $CLANG_OPTIONS $KERNEL_INC_OPTIONS -Wno-unused-value -Wno-pointer-sign -working-directory $WORKING_DIR -c "$CLANG_SOURCE" -target bpf -O2 -o - test child finished with 0 ---- end ---- LLVM search and compile subtest 0: Ok 37.2: kbuild searching : --- start --- test child forked, pid 25950 Kernel build dir is set to /lib/modules/4.14.0+/build set env: KBUILD_DIR=/lib/modules/4.14.0+/build unset env: KBUILD_OPTS include option is set to -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/7/include -I/home/acme/git/linux/arch/x86/include -I./arch/x86/include/generated -I/home/acme/git/linux/include -I./include -I/home/acme/git/linux/arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I/home/acme/git/linux/include/uapi -I./include/generated/uapi -include /home/acme/git/linux/include/linux/kconfig.h set env: NR_CPUS=4 set env: LINUX_VERSION_CODE=0x40e00 set env: CLANG_EXEC=/usr/local/bin/clang set env: CLANG_OPTIONS=-xc set env: KERNEL_INC_OPTIONS= -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/7/include -I/home/acme/git/linux/arch/x86/include -I./arch/x86/include/generated -I/home/acme/git/linux/include -I./include -I/home/acme/git/linux/arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I/home/acme/git/linux/include/uapi -I./include/generated/uapi -include /home/acme/git/linux/include/linux/kconfig.h set env: WORKING_DIR=/lib/modules/4.14.0+/build set env: CLANG_SOURCE=- llvm compiling command template: echo '/* * bpf-script-test-kbuild.c * Test include from kernel header */ #ifndef LINUX_VERSION_CODE # error Need LINUX_VERSION_CODE # error Example: for 4.2 kernel, put 'clang-opt="-DLINUX_VERSION_CODE=0x40200" into llvm section of ~/.perfconfig' #endif #define SEC(NAME) __attribute__((section(NAME), used)) #include #include SEC("func=vfs_llseek") int bpf_func__vfs_llseek(void *ctx) { return 0; } char _license[] SEC("license") = "GPL"; int _version SEC("version") = LINUX_VERSION_CODE; ' | $CLANG_EXEC -D__KERNEL__ -D__NR_CPUS__=$NR_CPUS -DLINUX_VERSION_CODE=$LINUX_VERSION_CODE $CLANG_OPTIONS $KERNEL_INC_OPTIONS -Wno-unused-value -Wno-pointer-sign -working-directory $WORKING_DIR -c "$CLANG_SOURCE" -target bpf -O2 -o - In file included from :12: In file included from /home/acme/git/linux/arch/x86/include/uapi/asm/ptrace.h:5: In file included from /home/acme/git/linux/include/linux/compiler.h:242: In file included from /home/acme/git/linux/arch/x86/include/asm/barrier.h:5: In file included from /home/acme/git/linux/arch/x86/include/asm/alternative.h:10: /home/acme/git/linux/arch/x86/include/asm/asm.h:145:50: error: unknown register name 'esp' in asm register unsigned long current_stack_pointer asm(_ASM_SP); ^ /home/acme/git/linux/arch/x86/include/asm/asm.h:44:18: note: expanded from macro '_ASM_SP' #define _ASM_SP __ASM_REG(sp) ^ /home/acme/git/linux/arch/x86/include/asm/asm.h:27:32: note: expanded from macro '__ASM_REG' #define __ASM_REG(reg) __ASM_SEL_RAW(e##reg, r##reg) ^ /home/acme/git/linux/arch/x86/include/asm/asm.h:18:29: note: expanded from macro '__ASM_SEL_RAW' # define __ASM_SEL_RAW(a,b) __ASM_FORM_RAW(a) ^ /home/acme/git/linux/arch/x86/include/asm/asm.h:11:32: note: expanded from macro '__ASM_FORM_RAW' # define __ASM_FORM_RAW(x) #x ^ :4:1: note: expanded from here "esp" ^ 1 error generated. ERROR: unable to compile - Hint: Check error message shown above. Hint: You can also pre-compile it into .o using: clang -target bpf -O2 -c - with proper -I and -D options. Failed to compile test case: 'kbuild searching' test child finished with -1 ---- end ---- LLVM search and compile subtest 1: FAILED! Cc: Adrian Hunter Cc: Alexander Potapenko Cc: Alexei Starovoitov Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Daniel Borkmann Cc: David Ahern Cc: Dmitriy Vyukov Cc: Jiri Olsa Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Matthias Kaehlcke Cc: Miguel Bernal Marin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Wang Nan Cc: Yonghong Song Link: https://lkml.kernel.org/r/20171128175948.GL3298@kernel.org Signed-off-by: Arnaldo Carvalho de Melo arch/x86/include/asm/asm.h | 2 ++ 1 file changed, 2 insertions(+) commit 10b9baa701d5023897f70a4acb3bf0235da3dc4f Author: Arnaldo Carvalho de Melo Date: Tue Nov 28 11:08:41 2017 -0300 tools arch s390: Do not include header files from the kernel sources Long ago we decided to be verbotten including files in the kernel git sources from tools/ living source code, to avoid disturbing kernel development (and perf's and other tools/) when, say, a kernel hacker adds something, tests everything but tools/ and have tools/ build broken. This got broken recently by s/390, fix it by copying arch/s390/include/uapi/asm/perf_regs.h to tools/arch/s390/include/uapi/asm/, making this one be used by means of and updating tools/perf/check_headers.sh to make sure we are notified when the original changes, so that we can check if anything is needed on the tooling side. This would have been caught by the 'tarkpg' test entry in: $ make -C tools/perf build-test When run on a s/390 build system or container. Acked-by: Heiko Carstens Cc: Hendrik Brueckner Cc: Thomas Richter Cc: Martin Schwidefsky Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: f704ef44602f ("s390/perf: add support for perf_regs and libdw") Link: https://lkml.kernel.org/n/tip-n57139ic0v9uffx8wdqi3d8a@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/s390/include/uapi/asm/perf_regs.h | 44 ++++++++++++++++++++++++++++ tools/perf/arch/s390/include/perf_regs.h | 2 +- tools/perf/check-headers.sh | 1 + 3 files changed, 46 insertions(+), 1 deletion(-) commit ca58d7e64bdfc54f7dfe46713c1e2acc68d7522d Author: Ben Gainey Date: Wed Nov 22 18:25:41 2017 -0600 perf jvmti: Generate correct debug information for inlined code tools/perf/jvmti is broken in so far as it generates incorrect debug information. Specifically it attributes all debug lines to the original method being output even in the case that some code is being inlined from elsewhere. This patch fixes the issue. To test (from within linux/tools/perf): export JDIR=/usr/lib/jvm/java-8-openjdk-amd64/ make cat << __EOF > Test.java public class Test { private StringBuilder b = new StringBuilder(); private void loop(int i, String... args) { for (String a : args) b.append(a); long hc = b.hashCode() * System.nanoTime(); b = new StringBuilder(); b.append(hc); System.out.printf("Iteration %d = %d\n", i, hc); } public void run(String... args) { for (int i = 0; i < 10000; ++i) { loop(i, args); } } public static void main(String... args) { Test t = new Test(); t.run(args); } } __EOF $JDIR/bin/javac Test.java ./perf record -F 10000 -g -k mono $JDIR/bin/java -agentpath:`pwd`/libperf-jvmti.so Test ./perf inject --jit -i perf.data -o perf.data.jitted ./perf annotate -i perf.data.jitted --stdio | grep Test\.java: | sort -u Before this patch, Test.java line numbers get reported that are greater than the number of lines in the Test.java file. They come from the source file of the inlined function, e.g. java/lang/String.java:1085. For further validation one can examine those lines in the JDK source distribution and confirm that they map to inlined functions called by Test.java. After this patch, the filename of the inlined function is output rather than the incorrect original source filename. Signed-off-by: Ben Gainey Tested-by: Arnaldo Carvalho de Melo Tested-by: Stephane Eranian Cc: Alexander Shishkin Cc: Ben Gainey Cc: Colin King Cc: Darren Hart Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 598b7c6919c7 ("perf jit: add source line info support") Link: http://lkml.kernel.org/r/20171122182541.d25599a3eb1ada3480d142fa@arm.com Signed-off-by: Kim Phillips Signed-off-by: Arnaldo Carvalho de Melo tools/perf/jvmti/jvmti_agent.c | 16 +++-- tools/perf/jvmti/jvmti_agent.h | 7 +- tools/perf/jvmti/libjvmti.c | 147 ++++++++++++++++++++++++++++++++++------- 3 files changed, 134 insertions(+), 36 deletions(-) commit 61fb26a6a23c0f1a07a0f8a11b54bafb1ac2398b Author: Jiri Olsa Date: Mon Dec 4 12:23:08 2017 -0300 perf tools: Fix up build in hardened environments On Fedora systems the perl and python CFLAGS/LDFLAGS include the hardened specs from redhat-rpm-config package. We apply them only for perl/python objects, which makes them not compatible with the rest of the objects and the build fails with: /usr/bin/ld: perf-in.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -f +PIC /usr/bin/ld: libperf.a(libperf-in.o): relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile w +ith -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status make[2]: *** [Makefile.perf:507: perf] Error 1 make[1]: *** [Makefile.perf:210: sub-make] Error 2 make: *** [Makefile:69: all] Error 2 Mainly it's caused by perl/python objects being compiled with: -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 which prevent the final link impossible, because it will check for 'proper' objects with following option: -specs=/usr/lib/rpm/redhat/redhat-hardened-ld Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/20171204082437.GC30564@krava Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 5cfee7a357f60675cae32b494bb2096d7203efd3 Author: Jiri Olsa Date: Wed Nov 8 11:27:37 2017 +0100 perf tools: Use shell function for perl cflags retrieval Using the shell function for perl CFLAGS retrieval instead of back quotes (``). Both execute shell with the command, but the latter is more explicit and seems to be the preferred way. Also we don't have any other use of the back quotes in perf Makefiles. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20171108102739.30338-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f3dc0088b98533f17128058fac73cd8b2752ef1 Author: Todd Kjos Date: Mon Nov 27 09:32:33 2017 -0800 binder: fix proc->files use-after-free proc->files cleanup is initiated by binder_vma_close. Therefore a reference on the binder_proc is not enough to prevent the files_struct from being released while the binder_proc still has a reference. This can lead to an attempt to dereference the stale pointer obtained from proc->files prior to proc->files cleanup. This has been seen once in task_get_unused_fd_flags() when __alloc_fd() is called with a stale "files". The fix is to protect proc->files with a mutex to prevent cleanup while in use. Signed-off-by: Todd Kjos Cc: stable # 4.14 Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) commit 869b5567e12f63ea7407f81728ca87f8c0abbfdb Author: Dexuan Cui Date: Tue Nov 14 06:53:32 2017 -0700 vmbus: unregister device_obj->channels_kset Without the patch, a device can't be thoroughly destroyed, because vmbus_device_register() -> kset_create_and_add() still holds a reference to the hv_device's device.kobj. Signed-off-by: Dexuan Cui Cc: Stephen Hemminger Fixes: c2e5df616e1a ("vmbus: add per-channel sysfs info") Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/vmbus_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit d94d105329e4a8a874853b5bd854b6587c41adda Author: Frederic Weisbecker Date: Thu Dec 14 19:18:27 2017 +0100 sched/isolation: Document boot parameters dependency on CONFIG_CPU_ISOLATION=y The "isolcpus=" and "nohz_full=" boot parameters depend on CPU Isolation support. Let's document that. Signed-off-by: Frederic Weisbecker Cc: Chris Metcalf Cc: Christoph Lameter Cc: John Stultz Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Cc: kernel test robot Link: http://lkml.kernel.org/r/1513275507-29200-4-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar Documentation/admin-guide/kernel-parameters.rst | 1 + Documentation/admin-guide/kernel-parameters.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 2c43838c99d9d23f17eb2bdadafcb2879cca6995 Author: Frederic Weisbecker Date: Thu Dec 14 19:18:26 2017 +0100 sched/isolation: Enable CONFIG_CPU_ISOLATION=y by default The "isolcpus=" boot parameter support was always built-in before we moved the related code under CONFIG_CPU_ISOLATION. Having it disabled by default is very confusing for people accustomed to use this parameter. So enable it by dafault to keep the previous behaviour but keep it optable for those who want to tinify their kernels. Signed-off-by: Frederic Weisbecker Cc: Chris Metcalf Cc: Christoph Lameter Cc: John Stultz Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Cc: kernel test robot Link: http://lkml.kernel.org/r/1513275507-29200-3-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar init/Kconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit bf29cb238dc0656e6564b6a94bb82e11d2129437 Author: Paul E. McKenney Date: Thu Dec 14 19:18:25 2017 +0100 sched/isolation: Make CONFIG_NO_HZ_FULL select CONFIG_CPU_ISOLATION CONFIG_NO_HZ_FULL doesn't make sense without CONFIG_CPU_ISOLATION. In fact enabling the first without the second is a regression as nohz_full= boot parameter gets silently ignored. Besides this unnatural combination hangs RCU gp kthread when running rcutorture for reasons that are not yet fully understood: rcu_preempt kthread starved for 9974 jiffies! g4294967208 +c4294967207 f0x0 RCU_GP_WAIT_FQS(3) ->state=0x402 ->cpu=0 rcu_preempt I 7464 8 2 0x80000000 Call Trace: __schedule+0x493/0x620 schedule+0x24/0x40 schedule_timeout+0x330/0x3b0 ? preempt_count_sub+0xea/0x140 ? collect_expired_timers+0xb0/0xb0 rcu_gp_kthread+0x6bf/0xef0 This commit therefore makes NO_HZ_FULL select CPU_ISOLATION, which prevents all these bad behaviours. Reported-by: kernel test robot Signed-off-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Cc: Chris Metcalf Cc: Christoph Lameter Cc: John Stultz Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Fixes: 5c4991e24c69 ("sched/isolation: Split out new CONFIG_CPU_ISOLATION=y config from CONFIG_NO_HZ_FULL") Link: http://lkml.kernel.org/r/1513275507-29200-2-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar kernel/time/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 9d5f38ba6c82359b7cec31fb27fb78ecc02f3946 Author: Tom Lendacky Date: Fri Dec 15 10:20:12 2017 -0600 x86/mm: Unbreak modules that use the DMA API Commit d8aa7eea78a1 ("x86/mm: Add Secure Encrypted Virtualization (SEV) support") changed sme_active() from an inline function that referenced sme_me_mask to a non-inlined function in order to make the sev_enabled variable a static variable. This function was marked EXPORT_SYMBOL_GPL because at the time the patch was submitted, sme_me_mask was marked EXPORT_SYMBOL_GPL. Commit 87df26175e67 ("x86/mm: Unbreak modules that rely on external PAGE_KERNEL availability") changed sme_me_mask variable from EXPORT_SYMBOL_GPL to EXPORT_SYMBOL, allowing external modules the ability to build with CONFIG_AMD_MEM_ENCRYPT=y. Now, however, with sev_active() no longer an inline function and marked as EXPORT_SYMBOL_GPL, external modules that use the DMA API are once again broken in 4.15. Since the DMA API is meant to be used by external modules, this needs to be changed. Change the sme_active() and sev_active() functions from EXPORT_SYMBOL_GPL to EXPORT_SYMBOL. Signed-off-by: Tom Lendacky Signed-off-by: Thomas Gleixner Cc: Borislav Petkov Cc: Brijesh Singh Link: https://lkml.kernel.org/r/20171215162011.14125.7113.stgit@tlendack-t1.amdoffice.net arch/x86/mm/mem_encrypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 43aabca38aa9668eee3c3c1206207034614c0901 Merge: e39d200f 0eb7c33 Author: Paolo Bonzini Date: Mon Dec 18 12:57:43 2017 +0100 Merge tag 'kvm-arm-fixes-for-v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/ARM Fixes for v4.15, Round 2 Fixes: - A bug in our handling of SPE state for non-vhe systems - A bug that causes hyp unmapping to go off limits and crash the system on shutdown - Three timer fixes that were introduced as part of the timer optimizations for v4.15 commit e39d200fa5bf5b94a0948db0dae44c1b73b84a56 Author: Wanpeng Li Date: Thu Dec 14 17:40:50 2017 -0800 KVM: Fix stack-out-of-bounds read in write_mmio Reported by syzkaller: BUG: KASAN: stack-out-of-bounds in write_mmio+0x11e/0x270 [kvm] Read of size 8 at addr ffff8803259df7f8 by task syz-executor/32298 CPU: 6 PID: 32298 Comm: syz-executor Tainted: G OE 4.15.0-rc2+ #18 Hardware name: LENOVO ThinkCentre M8500t-N000/SHARKBAY, BIOS FBKTC1AUS 02/16/2016 Call Trace: dump_stack+0xab/0xe1 print_address_description+0x6b/0x290 kasan_report+0x28a/0x370 write_mmio+0x11e/0x270 [kvm] emulator_read_write_onepage+0x311/0x600 [kvm] emulator_read_write+0xef/0x240 [kvm] emulator_fix_hypercall+0x105/0x150 [kvm] em_hypercall+0x2b/0x80 [kvm] x86_emulate_insn+0x2b1/0x1640 [kvm] x86_emulate_instruction+0x39a/0xb90 [kvm] handle_exception+0x1b4/0x4d0 [kvm_intel] vcpu_enter_guest+0x15a0/0x2640 [kvm] kvm_arch_vcpu_ioctl_run+0x549/0x7d0 [kvm] kvm_vcpu_ioctl+0x479/0x880 [kvm] do_vfs_ioctl+0x142/0x9a0 SyS_ioctl+0x74/0x80 entry_SYSCALL_64_fastpath+0x23/0x9a The path of patched vmmcall will patch 3 bytes opcode 0F 01 C1(vmcall) to the guest memory, however, write_mmio tracepoint always prints 8 bytes through *(u64 *)val since kvm splits the mmio access into 8 bytes. This leaks 5 bytes from the kernel stack (CVE-2017-17741). This patch fixes it by just accessing the bytes which we operate on. Before patch: syz-executor-5567 [007] .... 51370.561696: kvm_mmio: mmio write len 3 gpa 0x10 val 0x1ffff10077c1010f After patch: syz-executor-13416 [002] .... 51302.299573: kvm_mmio: mmio write len 3 gpa 0x10 val 0xc1010f Reported-by: Dmitry Vyukov Reviewed-by: Darren Kenny Reviewed-by: Marc Zyngier Tested-by: Marc Zyngier Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Marc Zyngier Cc: Christoffer Dall Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 8 ++++---- include/trace/events/kvm.h | 7 +++++-- virt/kvm/arm/mmio.c | 6 +++--- 3 files changed, 12 insertions(+), 9 deletions(-) commit bb82e0b4a7e96494f0c1004ce50cec3d7b5fb3d1 Author: Takashi Iwai Date: Thu Dec 14 13:31:16 2017 +0100 ACPI: APEI / ERST: Fix missing error handling in erst_reader() The commit f6f828513290 ("pstore: pass allocated memory region back to caller") changed the check of the return value from erst_read() in erst_reader() in the following way: if (len == -ENOENT) goto skip; - else if (len < 0) { - rc = -1; + else if (len < sizeof(*rcd)) { + rc = -EIO; goto out; This introduced another bug: since the comparison with sizeof() is cast to unsigned, a negative len value doesn't hit any longer. As a result, when an error is returned from erst_read(), the code falls through, and it may eventually lead to some weird thing like memory corruption. This patch adds the negative error value check more explicitly for addressing the issue. Fixes: f6f828513290 (pstore: pass allocated memory region back to caller) Cc: All applicable Tested-by: Jerry Tang Signed-off-by: Takashi Iwai Acked-by: Kees Cook Reviewed-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/erst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 951ef0e19f0736b45d1c4d81f4dfa04a43f87df5 Author: Colin Ian King Date: Fri Dec 8 23:59:49 2017 +0000 ACPI: CPPC: remove initial assignment of pcc_ss_data The initialization of pcc_ss_data from pcc_data[pcc_ss_id] before pcc_ss_id is being range checked could lead to an out-of-bounds array read. This very same initialization is also being performed after the range check on pcc_ss_id, so we can just remove this problematic and also redundant assignment to fix the issue. Detected by cppcheck: warning: Value stored to 'pcc_ss_data' during its initialization is never read Fixes: 85b1407bf6d2 (ACPI / CPPC: Make CPPC ACPI driver aware of PCC subspace IDs) Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56026645e2b6f11ede34a5e6ab69d3eb56f9c8fc Author: Rafael J. Wysocki Date: Mon Dec 18 02:15:32 2017 +0100 cpufreq: governor: Ensure sufficiently large sampling intervals After commit aa7519af450d (cpufreq: Use transition_delay_us for legacy governors as well) the sampling_rate field of struct dbs_data may be less than the tick period which causes dbs_update() to produce incorrect results, so make the code ensure that the value of that field will always be sufficiently large. Fixes: aa7519af450d (cpufreq: Use transition_delay_us for legacy governors as well) Reported-by: Andy Tang Reported-by: Doug Smythies Tested-by: Andy Tang Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar drivers/cpufreq/cpufreq_governor.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit ccc153a6de1f7741b5ef7c996f9be133772b2092 Author: Lucas Stach Date: Mon Dec 11 14:19:00 2017 +0100 cpufreq: imx6q: fix speed grading regression on i.MX6 QuadPlus The commit moving the speed grading check to the cpufreq driver introduced some additional checks, so the OPP disable is only attempted on SoCs where those OPPs are present. The compatible checks are missing the QuadPlus compatible, so invalid OPPs are not correctly disabled there. Move both checks to a single condition, so we don't need to sprinkle even more calls to of_machine_is_compatible(). Fixes: 2b3d58a3adca (cpufreq: imx6q: Move speed grading check to cpufreq driver) Signed-off-by: Lucas Stach Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/imx6q-cpufreq.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 5839ee7389e893a31e4e3c9cf17b50d14103c902 Author: Rafael J. Wysocki Date: Fri Dec 15 03:07:18 2017 +0100 PCI / PM: Force devices to D0 in pci_pm_thaw_noirq() It is incorrect to call pci_restore_state() for devices in low-power states (D1-D3), as that involves the restoration of MSI setup which requires MMIO to be operational and that is only the case in D0. However, pci_pm_thaw_noirq() may do that if the driver's "freeze" callbacks put the device into a low-power state, so fix it by making it force devices into D0 via pci_set_power_state() instead of trying to "update" their power state which is pointless. Fixes: e60514bd4485 (PCI/PM: Restore the status of PCI devices across hibernation) Cc: 4.13+ # 4.13+ Reported-by: Thomas Gleixner Reported-by: Maarten Lankhorst Tested-by: Thomas Gleixner Tested-by: Maarten Lankhorst Signed-off-by: Rafael J. Wysocki Acked-by: Bjorn Helgaas drivers/pci/pci-driver.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 9226665159f0367ad08bc7d5dd194aeadb90316f Author: Kailang Yang Date: Thu Dec 14 15:28:58 2017 +0800 ALSA: hda/realtek - Fix Dell AIO LineOut issue Dell AIO had LineOut jack. Add LineOut verb into this patch. [ Additional notes: the ALC274 codec seems requiring the fixed pin / DAC connections for HP / line-out pins for enabling EQ for speakers; i.e. the HP / LO pins expect to be connected with NID 0x03 while keeping the speaker with NID 0x02. However, by adding a new line-out pin, the auto-parser assigns the NID 0x02 for HP/LO pins as primary outputs. As an easy workaround, we provide the preferred_pairs[] to map forcibly for these pins. -- tiwai ] Fixes: 75ee94b20b46 ("ALSA: hda - fix headset mic problem for Dell machines with alc274") Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit 0eb7c33cadf6b2f1a94e58ded8b0eb89b4eba382 Author: Christoffer Dall Date: Fri Dec 15 00:30:12 2017 +0100 KVM: arm/arm64: Fix timer enable flow When enabling the timer on the first run, we fail to ever restore the state and mark it as loaded. That means, that in the initial entry to the VCPU ioctl, unless we exit to userspace for some reason such as a pending signal, if the guest programs a timer and blocks, we will wait forever, because we never read back the hardware state (the loaded flag is not set), and so we think the timer is disabled, and we never schedule a background soft timer. The end result? The VCPU blocks forever, and the only solution is to kill the thread. Fixes: 4a2c4da1250d ("arm/arm64: KVM: Load the timer state when enabling the timer") Reported-by: Marc Zyngier Reviewed-by: Marc Zyngier Tested-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/arch_timer.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 36e5cfd410ad6060b527e51d1b4bc174a8068cfd Author: Christoffer Dall Date: Thu Dec 14 19:54:50 2017 +0100 KVM: arm/arm64: Properly handle arch-timer IRQs after vtimer_save_state The recent timer rework was assuming that once the timer was disabled, we should no longer see any interrupts from the timer. This assumption turns out to not be true, and instead we have to handle the case when the timer ISR runs even after the timer has been disabled. This requires a couple of changes: First, we should never overwrite the cached guest state of the timer control register when the ISR runs, because KVM may have disabled its timers when doing vcpu_put(), even though the guest still had the timer enabled. Second, we shouldn't assume that the timer is actually firing just because we see an interrupt, but we should check the actual state of the timer in the timer control register to understand if the hardware timer is really firing or not. We also add an ISB to vtimer_save_state() to ensure the timer is actually disabled once we enable interrupts, which should clarify the intention of the implementation, and reduce the risk of unwanted interrupts. Fixes: b103cc3f10c0 ("KVM: arm/arm64: Avoid timer save/restore in vcpu entry/exit") Reported-by: Marc Zyngier Reported-by: Jia He Reviewed-by: Marc Zyngier Tested-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/arch_timer.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit f384dcfe4d918c1d80477d290c22ce0093823771 Author: Marc Zyngier Date: Thu Dec 7 11:46:15 2017 +0000 KVM: arm/arm64: timer: Don't set irq as forwarded if no usable GIC If we don't have a usable GIC, do not try to set the vcpu affinity as this is guaranteed to fail. Reported-by: Andre Przywara Reviewed-by: Andre Przywara Tested-by: Andre Przywara Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall include/kvm/arm_arch_timer.h | 2 +- virt/kvm/arm/arch_timer.c | 13 ++++++++----- virt/kvm/arm/arm.c | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) commit 7839c672e58bf62da8f2f0197fefb442c02ba1dd Author: Marc Zyngier Date: Thu Dec 7 11:45:45 2017 +0000 KVM: arm/arm64: Fix HYP unmapping going off limits When we unmap the HYP memory, we try to be clever and unmap one PGD at a time. If we start with a non-PGD aligned address and try to unmap a whole PGD, things go horribly wrong in unmap_hyp_range (addr and end can never match, and it all goes really badly as we keep incrementing pgd and parse random memory as page tables...). The obvious fix is to let unmap_hyp_range do what it does best, which is to iterate over a range. The size of the linear mapping, which begins at PAGE_OFFSET, can be easily calculated by subtracting PAGE_OFFSET form high_memory, because high_memory is defined as the linear map address of the last byte of DRAM, plus one. The size of the vmalloc region is given trivially by VMALLOC_END - VMALLOC_START. Cc: stable@vger.kernel.org Reported-by: Andre Przywara Tested-by: Andre Przywara Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/mmu.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit bfe766cf65fb65e68c4764f76158718560bdcee5 Author: Julien Thierry Date: Wed Dec 6 17:09:49 2017 +0000 arm64: kvm: Prevent restoring stale PMSCR_EL1 for vcpu When VHE is not present, KVM needs to save and restores PMSCR_EL1 when possible. If SPE is used by the host, value of PMSCR_EL1 cannot be saved for the guest. If the host starts using SPE between two save+restore on the same vcpu, restore will write the value of PMSCR_EL1 read during the first save. Make sure __debug_save_spe_nvhe clears the value of the saved PMSCR_EL1 when the guest cannot use SPE. Signed-off-by: Julien Thierry Cc: Christoffer Dall Cc: Marc Zyngier Cc: Catalin Marinas Cc: Reviewed-by: Will Deacon Reviewed-by: Christoffer Dall Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp/debug-sr.c | 3 +++ 1 file changed, 3 insertions(+) commit d82c3682168431d29ba1741d0cd5ef45c68bf8e0 Author: Miquel Raynal Date: Mon Dec 18 08:26:28 2017 +0100 mtd: Fix mtd_check_oob_ops() The mtd_check_oob_ops() helper verifies if the operation defined by the user is correct. Fix the check that verifies if the entire requested area exists. This check is too restrictive and will fail anytime the last data byte of the very last page is included in an operation. Fixes: 5cdd929da53d ("mtd: Add sanity checks in mtd_write/read_oob()") Signed-off-by: Miquel Raynal Acked-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/mtdcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38f73db7683db1ef0b16cb1fedf6e8e309cf08b8 Merge: fa5cf90 2cf654d Author: Dave Airlie Date: Mon Dec 18 14:49:57 2017 +1000 Merge tag 'drm-intel-fixes-2017-12-14' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v4.15-rc4 * tag 'drm-intel-fixes-2017-12-14' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915/fence: Use rcu to defer freeing of irq_work drm/i915: Stop listening to request resubmission from the signaler kthread drm/i915: Drop fb reference on load_detect_pipe failure path drm/i915: Flush pending GTT writes before unbinding commit fa5cf9016003322fa3fa4667ff3a2c7f26f89be6 Merge: 1291a0d5 becd087 Author: Dave Airlie Date: Mon Dec 18 14:47:31 2017 +1000 Merge branch 'drm-fixes-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Nothing too major here. A couple more ttm fixes for huge page and a kiq fix for amdgpu, along with some DC fixes. * 'drm-fixes-4.15' of git://people.freedesktop.org/~agd5f/linux: drm/amd/display: Fix rehook MST display not light back on drm/amd/display: fix missing pixel clock adjustment for dongle drm/amd/display: set chroma taps to 1 when not scaling drm/amd/display: add pipe locking before front end programing drm/amdgpu: fix MAP_QUEUES paramter drm/ttm: max_cpages is in unit of native page drm/ttm: fix incorrect calculate on shrink_pages commit 1291a0d5049dbc06baaaf66a9ff3f53db493b19b Author: Linus Torvalds Date: Sun Dec 17 18:59:59 2017 -0800 Linux 4.15-rc4 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 779f4e1c6c7c661db40dfebd6dd6bda7b5f88aa3 Author: Kees Cook Date: Tue Dec 12 11:28:38 2017 -0800 Revert "exec: avoid RLIMIT_STACK races with prlimit()" This reverts commit 04e35f4495dd560db30c25efca4eecae8ec8c375. SELinux runs with secureexec for all non-"noatsecure" domain transitions, which means lots of processes end up hitting the stack hard-limit change that was introduced in order to fix a race with prlimit(). That race fix will need to be redesigned. Reported-by: Laura Abbott Reported-by: Tomáš Trnka Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Linus Torvalds fs/exec.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 36b0cb84ee858f02c256d26f0cb4229c78e3399e Author: Chunyan Zhang Date: Fri Dec 1 03:51:04 2017 +0100 ARM: 8731/1: Fix csum_partial_copy_from_user() stack mismatch An additional 'ip' will be pushed to the stack, for restoring the DACR later, if CONFIG_CPU_SW_DOMAIN_PAN defined. However, the fixup still get the err_ptr by add #8*4 to sp, which results in the fact that the code area pointed by the LR will be overwritten, or the kernel will crash if CONFIG_DEBUG_RODATA is enabled. This patch fixes the stack mismatch. Fixes: a5e090acbf54 ("ARM: software-based priviledged-no-access support") Signed-off-by: Lvqiang Huang Signed-off-by: Chunyan Zhang Signed-off-by: Russell King arch/arm/lib/csumpartialcopyuser.S | 4 ++++ 1 file changed, 4 insertions(+) commit f8940a0f20ebf3f1fb81008a6a9b287b65a85a92 Merge: 6ba64fe 2aeb073 Author: Linus Torvalds Date: Sun Dec 17 13:57:08 2017 -0800 Merge branch 'WIP.x86-pti.base-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull Page Table Isolation (PTI) v4.14 backporting base tree from Ingo Molnar: "This tree contains the v4.14 PTI backport preparatory tree, which consists of four merges of upstream trees and 7 cherry-picked commits, which the upcoming PTI work depends on" NOTE! The resulting tree is exactly the same as the original base tree (ie the diff between this commit and its immediate first parent is empty). The only reason for this merge is literally to have a common point for the actual PTI changes so that the commits can be shared in both the 4.15 and 4.14 trees. * 'WIP.x86-pti.base-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm/kasan: Don't use vmemmap_populate() to initialize shadow locking/barriers: Convert users of lockless_dereference() to READ_ONCE() locking/barriers: Add implicit smp_read_barrier_depends() to READ_ONCE() bpf: fix build issues on um due to mising bpf_perf_event.h perf/x86: Enable free running PEBS for REGS_USER/INTR x86: Make X86_BUG_FXSAVE_LEAK detectable in CPUID on AMD x86/cpufeature: Add User-Mode Instruction Prevention definitions commit 6ba64feff6b6dfcc4c476776375b650d744621d7 Merge: 2ffb448 1784f91 Author: Linus Torvalds Date: Sun Dec 17 13:54:31 2017 -0800 Merge branch 'WIP.x86-pti.base.prep-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull Page Table Isolation (PTI) preparatory tree from Ingo Molnar: "This does a rename to free up linux/pti.h to be used by the upcoming page table isolation feature" * 'WIP.x86-pti.base.prep-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: drivers/misc/intel/pti: Rename the header file to free up the namespace commit 2ffb448ccbdd3de16e68220d4fa0864a75272dc3 Merge: c437279 cef31d9 Author: Linus Torvalds Date: Sun Dec 17 13:48:50 2017 -0800 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 bugfix which prevents arbitrary sigev_notify values in posix-timers" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: posix-timer: Properly check sigevent->sigev_notify commit c43727908f5589970d954e995a6cb0dcff837dcd Merge: b9f5fb1 2610acf Author: Linus Torvalds Date: Sun Dec 17 13:28:49 2017 -0800 Merge tag 'dmaengine-fix-4.15-rc4' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "This time consisting of fixes in a bunch of drivers and the dmatest module: - Fix for disable clk on error path in fsl-edma driver - Disable clk fail fix in jz4740 driver - Fix long pending bug in dmatest driver for dangling pointer - Fix potential NULL pointer dereference in at_hdmac driver - Error handling path in ioat driver" * tag 'dmaengine-fix-4.15-rc4' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: fsl-edma: disable clks on all error paths dmaengine: jz4740: disable/unprepare clk if probe fails dmaengine: dmatest: move callback wait queue to thread context dmaengine: at_hdmac: fix potential NULL pointer dereference in atc_prep_dma_interleaved dmaengine: ioat: Fix error handling path commit b9f5fb1800d8a4a3bc6cd3152c5f3d252986cf79 Author: Arnd Bergmann Date: Fri Nov 10 15:57:21 2017 +0100 cramfs: fix MTD dependency With CONFIG_MTD=m and CONFIG_CRAMFS=y, we now get a link failure: fs/cramfs/inode.o: In function `cramfs_mount': inode.c:(.text+0x220): undefined reference to `mount_mtd' fs/cramfs/inode.o: In function `cramfs_mtd_fill_super': inode.c:(.text+0x6d8): undefined reference to `mtd_point' inode.c:(.text+0xae4): undefined reference to `mtd_unpoint' This adds a more specific Kconfig dependency to avoid the broken configuration. Alternatively we could make CRAMFS itself depend on "MTD || !MTD" with a similar result. Fixes: 99c18ce580c6 ("cramfs: direct memory access support") Signed-off-by: Arnd Bergmann Signed-off-by: Nicolas Pitre Signed-off-by: Linus Torvalds fs/cramfs/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 73d080d374a509ae887b8a0744ad4d553c5d5d24 Merge: 1c6b942 d7ee946 Author: Linus Torvalds Date: Sun Dec 17 12:18:35 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "The alloc_super() one is a regression in this merge window, lazytime thing is older..." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: VFS: Handle lazytime in do_mount() alloc_super(): do ->s_umount initialization earlier commit 1c6b942d7d39765a81ea0577c893edaddfccad3d Merge: f3b5ad8 9d5afec Author: Linus Torvalds Date: Sun Dec 17 12:14:33 2017 -0800 Merge tag 'ext4_for_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Fix a regression which caused us to fail to interpret symlinks in very ancient ext3 file system images. Also fix two xfstests failures, one of which could cause an OOPS, plus an additional bug fix caught by fuzz testing" * tag 'ext4_for_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix crash when a directory's i_size is too small ext4: add missing error check in __ext4_new_inode() ext4: fix fdatasync(2) after fallocate(2) operation ext4: support fast symlinks from ext3 file systems commit da57c5414f49ef9e4bcb9ae0bbafd1d650b31411 Author: John David Anglin Date: Mon Nov 13 19:35:33 2017 -0500 parisc: Reduce thread stack to 16 kb In testing, I found that the thread stack can be 16 kB when using an irq stack. Without it, the thread stack needs to be 32 kB. Currently, the irq stack is 32 kB. While it probably could be 16 kB, I would prefer to leave it as is for safety. Signed-off-by: John David Anglin Signed-off-by: Helge Deller arch/parisc/include/asm/thread_info.h | 5 +++++ 1 file changed, 5 insertions(+) commit 9352aeada4d8d8753fc0e414fbfe8fdfcb68a12c Author: John David Anglin Date: Mon Nov 13 19:35:33 2017 -0500 Revert "parisc: Re-enable interrupts early" This reverts commit 5c38602d83e584047906b41b162ababd4db4106d. Interrupts can't be enabled early because the register saves are done on the thread stack prior to switching to the IRQ stack. This caused stack overflows and the thread stack needed increasing to 32k. Even then, stack overflows still occasionally occurred. Background: Even with a 32 kB thread stack, I have seen instances where the thread stack overflowed on the mx3210 buildd. Detection of stack overflow only occurs when we have an external interrupt. When an external interrupt occurs, we switch to the thread stack if we are not already on a kernel stack. Then, registers and specials are saved to the kernel stack. The bug occurs in intr_return where interrupts are reenabled prior to returning from the interrupt. This was done incase we need to schedule or deliver signals. However, it introduces the possibility that multiple external interrupts may occur on the thread stack and cause a stack overflow. These might not be detected and cause the kernel to misbehave in random ways. This patch changes the code back to only reenable interrupts when we are going to schedule or deliver signals. As a result, we generally return from an interrupt before reenabling interrupts. This minimizes the growth of the thread stack. Fixes: 5c38602d83e5 ("parisc: Re-enable interrupts early") Signed-off-by: John David Anglin Cc: # v4.10+ Signed-off-by: Helge Deller arch/parisc/kernel/entry.S | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 6a16fc322085bb3163d7d6e44856adfda06a8001 Author: Pravin Shedge Date: Sun Dec 10 23:54:33 2017 +0530 parisc: remove duplicate includes These duplicate includes have been found with scripts/checkincludes.pl but they have been removed manually to avoid removing false positives. Signed-off-by: Pravin Shedge Signed-off-by: Helge Deller arch/parisc/kernel/unwind.c | 1 - arch/parisc/lib/delay.c | 2 -- 2 files changed, 3 deletions(-) commit bcf3f1752a622f1372d3252d0fea8855d89812e7 Author: Helge Deller Date: Tue Dec 12 21:52:26 2017 +0100 parisc: Hide Diva-built-in serial aux and graphics card Diva GSP card has built-in serial AUX port and ATI graphic card which simply don't work and which both don't have external connectors. User Guides even mention that those devices shouldn't be used. So, prevent that Linux drivers try to enable those devices. Signed-off-by: Helge Deller Cc: # v3.0+ drivers/parisc/lba_pci.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 0ed9d3de5f8f97e6efd5ca0e3377cab5f0451ead Author: Helge Deller Date: Tue Dec 12 21:25:41 2017 +0100 parisc: Align os_hpmc_size on word boundary The os_hpmc_size variable sometimes wasn't aligned at word boundary and thus triggered the unaligned fault handler at startup. Fix it by aligning it properly. Signed-off-by: Helge Deller Cc: # v4.14+ arch/parisc/kernel/hpmc.S | 1 + 1 file changed, 1 insertion(+) commit 203c110b39a89b48156c7450504e454fedb7f7f6 Author: Helge Deller Date: Tue Dec 12 21:32:16 2017 +0100 parisc: Fix indenting in puts() Static analysis tools complain that we intended to have curly braces around this indent block. In this case this assumption is wrong, so fix the indenting. Fixes: 2f3c7b8137ef ("parisc: Add core code for self-extracting kernel") Reported-by: Dan Carpenter Signed-off-by: Helge Deller Cc: # v4.14+ arch/parisc/boot/compressed/misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6cbd2171e89b13377261d15e64384df60ecb530e Author: Thomas Gleixner Date: Mon Dec 4 15:07:32 2017 +0100 x86/cpufeatures: Make CPU bugs sticky There is currently no way to force CPU bug bits like CPU feature bits. That makes it impossible to set a bug bit once at boot and have it stick for all upcoming CPUs. Extend the force set/clear arrays to handle bug bits as well. Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150606.992156574@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeature.h | 2 ++ arch/x86/include/asm/processor.h | 4 ++-- arch/x86/kernel/cpu/common.c | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) commit 79cc74155218316b9a5d28577c7077b2adba8e58 Author: Thomas Gleixner Date: Mon Dec 4 15:07:31 2017 +0100 x86/paravirt: Provide a way to check for hypervisors There is no generic way to test whether a kernel is running on a specific hypervisor. But that's required to prevent the upcoming user address space separation feature in certain guest modes. Make the hypervisor type enum unconditionally available and provide a helper function which allows to test for a specific type. Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150606.912938129@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/hypervisor.h | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit a035795499ca1c2bd1928808d1a156eda1420383 Author: Thomas Gleixner Date: Mon Dec 4 15:07:30 2017 +0100 x86/paravirt: Dont patch flush_tlb_single native_flush_tlb_single() will be changed with the upcoming PAGE_TABLE_ISOLATION feature. This requires to have more code in there than INVLPG. Remove the paravirt patching for it. Signed-off-by: Thomas Gleixner Reviewed-by: Josh Poimboeuf Reviewed-by: Juergen Gross Acked-by: Peter Zijlstra Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: linux-mm@kvack.org Cc: michael.schwarz@iaik.tugraz.at Cc: moritz.lipp@iaik.tugraz.at Cc: richard.fellner@student.tugraz.at Link: https://lkml.kernel.org/r/20171204150606.828111617@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/paravirt_patch_64.c | 2 -- 1 file changed, 2 deletions(-) commit c482feefe1aeb150156248ba0fd3e029bc886605 Author: Andy Lutomirski Date: Mon Dec 4 15:07:29 2017 +0100 x86/entry/64: Make cpu_entry_area.tss read-only The TSS is a fairly juicy target for exploits, and, now that the TSS is in the cpu_entry_area, it's no longer protected by kASLR. Make it read-only on x86_64. On x86_32, it can't be RO because it's written by the CPU during task switches, and we use a task gate for double faults. I'd also be nervous about errata if we tried to make it RO even on configurations without double fault handling. [ tglx: AMD confirmed that there is no problem on 64-bit with TSS RO. So it's probably safe to assume that it's a non issue, though Intel might have been creative in that area. Still waiting for confirmation. ] Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Kees Cook Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150606.733700132@linutronix.de Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 4 ++-- arch/x86/entry/entry_64.S | 8 ++++---- arch/x86/include/asm/fixmap.h | 13 +++++++++---- arch/x86/include/asm/processor.h | 17 ++++++++--------- arch/x86/include/asm/switch_to.h | 4 ++-- arch/x86/include/asm/thread_info.h | 2 +- arch/x86/kernel/asm-offsets.c | 5 ++--- arch/x86/kernel/asm-offsets_32.c | 4 ++-- arch/x86/kernel/cpu/common.c | 29 +++++++++++++++++++---------- arch/x86/kernel/ioport.c | 2 +- arch/x86/kernel/process.c | 6 +++--- arch/x86/kernel/process_32.c | 2 +- arch/x86/kernel/process_64.c | 2 +- arch/x86/kernel/traps.c | 4 ++-- arch/x86/lib/delay.c | 4 ++-- arch/x86/xen/enlighten_pv.c | 2 +- 16 files changed, 60 insertions(+), 48 deletions(-) commit 0f9a48100fba3f189724ae88a450c2261bf91c80 Author: Andy Lutomirski Date: Mon Dec 4 15:07:28 2017 +0100 x86/entry: Clean up the SYSENTER_stack code The existing code was a mess, mainly because C arrays are nasty. Turn SYSENTER_stack into a struct, add a helper to find it, and do all the obvious cleanups this enables. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150606.653244723@linutronix.de Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 4 ++-- arch/x86/entry/entry_64.S | 2 +- arch/x86/include/asm/fixmap.h | 5 +++++ arch/x86/include/asm/processor.h | 6 +++++- arch/x86/kernel/asm-offsets.c | 6 ++---- arch/x86/kernel/cpu/common.c | 14 +++----------- arch/x86/kernel/dumpstack.c | 7 +++---- 7 files changed, 21 insertions(+), 23 deletions(-) commit 7fbbd5cbebf118a9e09f5453f686656a167c3d1c Author: Andy Lutomirski Date: Mon Dec 4 15:07:27 2017 +0100 x86/entry/64: Remove the SYSENTER stack canary Now that the SYSENTER stack has a guard page, there's no need for a canary to detect overflow after the fact. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150606.572577316@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/processor.h | 1 - arch/x86/kernel/dumpstack.c | 3 +-- arch/x86/kernel/process.c | 1 - arch/x86/kernel/traps.c | 7 ------- 4 files changed, 1 insertion(+), 11 deletions(-) commit 40e7f949e0d9a33968ebde5d67f7e3a47c97742a Author: Andy Lutomirski Date: Mon Dec 4 15:07:26 2017 +0100 x86/entry/64: Move the IST stacks into struct cpu_entry_area The IST stacks are needed when an IST exception occurs and are accessed before any kernel code at all runs. Move them into struct cpu_entry_area. The IST stacks are unlike the rest of cpu_entry_area: they're used even for entries from kernel mode. This means that they should be set up before we load the final IDT. Move cpu_entry_area setup to trap_init() for the boot CPU and set it up for all possible CPUs at once in native_smp_prepare_cpus(). Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150606.480598743@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/fixmap.h | 12 +++++++ arch/x86/kernel/cpu/common.c | 74 ++++++++++++++++++++++++------------------- arch/x86/kernel/traps.c | 3 ++ 3 files changed, 57 insertions(+), 32 deletions(-) commit 3386bc8aed825e9f1f65ce38df4b109b2019b71a Author: Andy Lutomirski Date: Mon Dec 4 15:07:25 2017 +0100 x86/entry/64: Create a per-CPU SYSCALL entry trampoline Handling SYSCALL is tricky: the SYSCALL handler is entered with every single register (except FLAGS), including RSP, live. It somehow needs to set RSP to point to a valid stack, which means it needs to save the user RSP somewhere and find its own stack pointer. The canonical way to do this is with SWAPGS, which lets us access percpu data using the %gs prefix. With PAGE_TABLE_ISOLATION-like pagetable switching, this is problematic. Without a scratch register, switching CR3 is impossible, so %gs-based percpu memory would need to be mapped in the user pagetables. Doing that without information leaks is difficult or impossible. Instead, use a different sneaky trick. Map a copy of the first part of the SYSCALL asm at a different address for each CPU. Now RIP varies depending on the CPU, so we can use RIP-relative memory access to access percpu memory. By putting the relevant information (one scratch slot and the stack address) at a constant offset relative to RIP, we can make SYSCALL work without relying on %gs. A nice thing about this approach is that we can easily switch it on and off if we want pagetable switching to be configurable. The compat variant of SYSCALL doesn't have this problem in the first place -- there are plenty of scratch registers, since we don't care about preserving r8-r15. This patch therefore doesn't touch SYSCALL32 at all. This patch actually seems to be a small speedup. With this patch, SYSCALL touches an extra cache line and an extra virtual page, but the pipeline no longer stalls waiting for SWAPGS. It seems that, at least in a tight loop, the latter outweights the former. Thanks to David Laight for an optimization tip. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150606.403607157@linutronix.de Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 58 +++++++++++++++++++++++++++++++++++++++++++ arch/x86/include/asm/fixmap.h | 2 ++ arch/x86/kernel/asm-offsets.c | 1 + arch/x86/kernel/cpu/common.c | 15 ++++++++++- arch/x86/kernel/vmlinux.lds.S | 9 +++++++ 5 files changed, 84 insertions(+), 1 deletion(-) commit 3e3b9293d392c577b62e24e4bc9982320438e749 Author: Andy Lutomirski Date: Mon Dec 4 15:07:24 2017 +0100 x86/entry/64: Return to userspace from the trampoline stack By itself, this is useless. It gives us the ability to run some final code before exit that cannnot run on the kernel stack. This could include a CR3 switch a la PAGE_TABLE_ISOLATION or some kernel stack erasing, for example. (Or even weird things like *changing* which kernel stack gets used as an ASLR-strengthening mechanism.) The SYSRET32 path is not covered yet. It could be in the future or we could just ignore it and force the slow path if needed. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150606.306546484@linutronix.de Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 55 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 4 deletions(-) commit 7f2590a110b837af5679d08fc25c6227c5a8c497 Author: Andy Lutomirski Date: Mon Dec 4 15:07:23 2017 +0100 x86/entry/64: Use a per-CPU trampoline stack for IDT entries Historically, IDT entries from usermode have always gone directly to the running task's kernel stack. Rearrange it so that we enter on a per-CPU trampoline stack and then manually switch to the task's stack. This touches a couple of extra cachelines, but it gives us a chance to run some code before we touch the kernel stack. The asm isn't exactly beautiful, but I think that fully refactoring it can wait. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150606.225330557@linutronix.de Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 67 ++++++++++++++++++++++++++++++---------- arch/x86/entry/entry_64_compat.S | 5 ++- arch/x86/include/asm/switch_to.h | 4 ++- arch/x86/include/asm/traps.h | 1 - arch/x86/kernel/cpu/common.c | 6 ++-- arch/x86/kernel/traps.c | 21 +++++++------ 6 files changed, 72 insertions(+), 32 deletions(-) commit 6d9256f0a89eaff97fca6006100bcaea8d1d8bdb Author: Andy Lutomirski Date: Mon Dec 4 15:07:22 2017 +0100 x86/espfix/64: Stop assuming that pt_regs is on the entry stack When we start using an entry trampoline, a #GP from userspace will be delivered on the entry stack, not on the task stack. Fix the espfix64 #DF fixup to set up #GP according to TSS.SP0, rather than assuming that pt_regs + 1 == SP0. This won't change anything without an entry stack, but it will make the code continue to work when an entry stack is added. While we're at it, improve the comments to explain what's actually going on. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150606.130778051@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/traps.c | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) commit 9aaefe7b59ae00605256a7d6bd1c1456432495fc Author: Andy Lutomirski Date: Mon Dec 4 15:07:21 2017 +0100 x86/entry/64: Separate cpu_current_top_of_stack from TSS.sp0 On 64-bit kernels, we used to assume that TSS.sp0 was the current top of stack. With the addition of an entry trampoline, this will no longer be the case. Store the current top of stack in TSS.sp1, which is otherwise unused but shares the same cacheline. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150606.050864668@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/processor.h | 18 +++++++++++++----- arch/x86/include/asm/thread_info.h | 2 +- arch/x86/kernel/asm-offsets_64.c | 1 + arch/x86/kernel/process.c | 10 ++++++++++ arch/x86/kernel/process_64.c | 1 + 5 files changed, 26 insertions(+), 6 deletions(-) commit 72f5e08dbba2d01aa90b592cf76c378ea233b00b Author: Andy Lutomirski Date: Mon Dec 4 15:07:20 2017 +0100 x86/entry: Remap the TSS into the CPU entry area This has a secondary purpose: it puts the entry stack into a region with a well-controlled layout. A subsequent patch will take advantage of this to streamline the SYSCALL entry code to be able to find it more easily. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150605.962042855@linutronix.de Signed-off-by: Ingo Molnar arch/x86/entry/entry_32.S | 6 ++++-- arch/x86/include/asm/fixmap.h | 7 +++++++ arch/x86/kernel/asm-offsets.c | 3 +++ arch/x86/kernel/cpu/common.c | 41 +++++++++++++++++++++++++++++++++++------ arch/x86/kernel/dumpstack.c | 3 ++- arch/x86/kvm/vmx.c | 2 +- arch/x86/power/cpu.c | 11 ++++++----- 7 files changed, 58 insertions(+), 15 deletions(-) commit 1a935bc3d4ea61556461a9e92a68ca3556232efd Author: Andy Lutomirski Date: Mon Dec 4 15:07:19 2017 +0100 x86/entry: Move SYSENTER_stack to the beginning of struct tss_struct SYSENTER_stack should have reliable overflow detection, which means that it needs to be at the bottom of a page, not the top. Move it to the beginning of struct tss_struct and page-align it. Also add an assertion to make sure that the fixed hardware TSS doesn't cross a page boundary. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150605.881827433@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/processor.h | 21 ++++++++++++--------- arch/x86/kernel/cpu/common.c | 21 +++++++++++++++++++++ 2 files changed, 33 insertions(+), 9 deletions(-) commit 6e60e583426c2f8751c22c2dfe5c207083b4483a Author: Andy Lutomirski Date: Mon Dec 4 15:07:18 2017 +0100 x86/dumpstack: Handle stack overflow on all stacks We currently special-case stack overflow on the task stack. We're going to start putting special stacks in the fixmap with a custom layout, so they'll have guard pages, too. Teach the unwinder to be able to unwind an overflow of any of the stacks. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150605.802057305@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/dumpstack.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 7fb983b4dd569e08564134a850dfd4eb1c63d9b8 Author: Andy Lutomirski Date: Mon Dec 4 15:07:17 2017 +0100 x86/entry: Fix assumptions that the HW TSS is at the beginning of cpu_tss A future patch will move SYSENTER_stack to the beginning of cpu_tss to help detect overflow. Before this can happen, fix several code paths that hardcode assumptions about the old layout. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Dave Hansen Reviewed-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150605.722425540@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 2 +- arch/x86/include/asm/processor.h | 9 +++++++-- arch/x86/kernel/cpu/common.c | 8 ++++---- arch/x86/kernel/doublefault.c | 36 +++++++++++++++++------------------- arch/x86/kvm/vmx.c | 2 +- arch/x86/power/cpu.c | 13 +++++++------ 6 files changed, 37 insertions(+), 33 deletions(-) commit 21506525fb8ddb0342f2a2370812d47f6a1f3833 Author: Andy Lutomirski Date: Mon Dec 4 15:07:16 2017 +0100 x86/kasan/64: Teach KASAN about the cpu_entry_area The cpu_entry_area will contain stacks. Make sure that KASAN has appropriate shadow mappings for them. Signed-off-by: Andy Lutomirski Signed-off-by: Andrey Ryabinin Signed-off-by: Thomas Gleixner Cc: Alexander Potapenko Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Dmitry Vyukov Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: kasan-dev@googlegroups.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150605.642806442@linutronix.de Signed-off-by: Ingo Molnar arch/x86/mm/kasan_init_64.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit ef8813ab280507972bb57e4b1b502811ad4411e9 Author: Andy Lutomirski Date: Mon Dec 4 15:07:15 2017 +0100 x86/mm/fixmap: Generalize the GDT fixmap mechanism, introduce struct cpu_entry_area Currently, the GDT is an ad-hoc array of pages, one per CPU, in the fixmap. Generalize it to be an array of a new 'struct cpu_entry_area' so that we can cleanly add new things to it. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150605.563271721@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 9 +-------- arch/x86/include/asm/fixmap.h | 37 +++++++++++++++++++++++++++++++++++-- arch/x86/kernel/cpu/common.c | 14 +++++++------- arch/x86/xen/mmu_pv.c | 2 +- 4 files changed, 44 insertions(+), 18 deletions(-) commit aaeed3aeb39c1ba69f0a49baec8cb728121d0a91 Author: Andy Lutomirski Date: Mon Dec 4 15:07:14 2017 +0100 x86/entry/gdt: Put per-CPU GDT remaps in ascending order We currently have CPU 0's GDT at the top of the GDT range and higher-numbered CPUs at lower addresses. This happens because the fixmap is upside down (index 0 is the top of the fixmap). Flip it so that GDTs are in ascending order by virtual address. This will simplify a future patch that will generalize the GDT remap to contain multiple pages. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150605.471561421@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/desc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33a2f1a6c4d7c0a02d1c006fb0379cc5ca3b96bb Author: Andy Lutomirski Date: Mon Dec 4 15:07:13 2017 +0100 x86/dumpstack: Add get_stack_info() support for the SYSENTER stack get_stack_info() doesn't currently know about the SYSENTER stack, so unwinding will fail if we entered the kernel on the SYSENTER stack and haven't fully switched off. Teach get_stack_info() about the SYSENTER stack. With future patches applied that run part of the entry code on the SYSENTER stack and introduce an intentional BUG(), I would get: PANIC: double fault, error_code: 0x0 ... RIP: 0010:do_error_trap+0x33/0x1c0 ... Call Trace: Code: ... With this patch, I get: PANIC: double fault, error_code: 0x0 ... Call Trace: ? async_page_fault+0x36/0x60 ? invalid_op+0x22/0x40 ? async_page_fault+0x36/0x60 ? sync_regs+0x3c/0x40 ? sync_regs+0x2e/0x40 ? error_entry+0x6c/0xd0 ? async_page_fault+0x36/0x60 Code: ... which is a lot more informative. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150605.392711508@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/stacktrace.h | 3 +++ arch/x86/kernel/dumpstack.c | 19 +++++++++++++++++++ arch/x86/kernel/dumpstack_32.c | 6 ++++++ arch/x86/kernel/dumpstack_64.c | 6 ++++++ 4 files changed, 34 insertions(+) commit 1a79797b58cddfa948420a7553241c79c013e3ca Author: Andy Lutomirski Date: Mon Dec 4 15:07:12 2017 +0100 x86/entry/64: Allocate and enable the SYSENTER stack This will simplify future changes that want scratch variables early in the SYSENTER handler -- they'll be able to spill registers to the stack. It also lets us get rid of a SWAPGS_UNSAFE_STACK user. This does not depend on CONFIG_IA32_EMULATION=y because we'll want the stack space even without IA32 emulation. As far as I can tell, the reason that this wasn't done from day 1 is that we use IST for #DB and #BP, which is IMO rather nasty and causes a lot more problems than it solves. But, since #DB uses IST, we don't actually need a real stack for SYSENTER (because SYSENTER with TF set will invoke #DB on the IST stack rather than the SYSENTER stack). I want to remove IST usage from these vectors some day, and this patch is a prerequisite for that as well. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150605.312726423@linutronix.de Signed-off-by: Ingo Molnar arch/x86/entry/entry_64_compat.S | 2 +- arch/x86/include/asm/processor.h | 3 --- arch/x86/kernel/asm-offsets.c | 5 +++++ arch/x86/kernel/asm-offsets_32.c | 5 ----- arch/x86/kernel/cpu/common.c | 4 +++- arch/x86/kernel/process.c | 2 -- arch/x86/kernel/traps.c | 3 +-- 7 files changed, 10 insertions(+), 14 deletions(-) commit 4f3789e792296e21405f708cf3cb409d7c7d5683 Author: Andy Lutomirski Date: Mon Dec 4 15:07:11 2017 +0100 x86/irq/64: Print the offending IP in the stack overflow warning In case something goes wrong with unwind (not unlikely in case of overflow), print the offending IP where we detected the overflow. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150605.231677119@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/irq_64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6669a692605547892a026445e460bf233958bd7f Author: Andy Lutomirski Date: Mon Dec 4 15:07:10 2017 +0100 x86/irq: Remove an old outdated comment about context tracking races That race has been fixed and code cleaned up for a while now. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150605.150551639@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/irq.c | 12 ------------ 1 file changed, 12 deletions(-) commit b02fcf9ba1211097754b286043cd87a8b4907e75 Author: Josh Poimboeuf Date: Mon Dec 4 15:07:09 2017 +0100 x86/unwinder: Handle stack overflows more gracefully There are at least two unwinder bugs hindering the debugging of stack-overflow crashes: - It doesn't deal gracefully with the case where the stack overflows and the stack pointer itself isn't on a valid stack but the to-be-dereferenced data *is*. - The ORC oops dump code doesn't know how to print partial pt_regs, for the case where if we get an interrupt/exception in *early* entry code before the full pt_regs have been saved. Fix both issues. http://lkml.kernel.org/r/20171126024031.uxi4numpbjm5rlbr@treble Signed-off-by: Josh Poimboeuf Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150605.071425003@linutronix.de Signed-off-by: Ingo Molnar arch/x86/include/asm/kdebug.h | 1 + arch/x86/include/asm/unwind.h | 7 ++++ arch/x86/kernel/dumpstack.c | 32 ++++++++++++++++--- arch/x86/kernel/process_64.c | 11 +++---- arch/x86/kernel/unwind_orc.c | 74 +++++++++++++++---------------------------- 5 files changed, 65 insertions(+), 60 deletions(-) commit d3a09104018cf2ad5973dfa8a9c138ef9f5015a3 Author: Andy Lutomirski Date: Mon Dec 4 15:07:08 2017 +0100 x86/unwinder/orc: Dont bail on stack overflow If the stack overflows into a guard page and the ORC unwinder should work well: by construction, there can't be any meaningful data in the guard page because no writes to the guard page will have succeeded. But there is a bug that prevents unwinding from working correctly: if the starting register state has RSP pointing into a stack guard page, the ORC unwinder bails out immediately. Instead of bailing out immediately check whether the next page up is a valid check page and if so analyze that. As a result the ORC unwinder will start the unwind. Tested by intentionally overflowing the task stack. The result is an accurate call trace instead of a trace consisting purely of '?' entries. There are a few other bugs that are triggered if the unwinder encounters a stack overflow after the first step, but they are outside the scope of this fix. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Link: https://lkml.kernel.org/r/20171204150604.991389777@linutronix.de Signed-off-by: Ingo Molnar arch/x86/kernel/unwind_orc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit e17f8234538d1ff708673f287a42457c4dee720d Author: Boris Ostrovsky Date: Mon Dec 4 15:07:07 2017 +0100 x86/entry/64/paravirt: Use paravirt-safe macro to access eflags Commit 1d3e53e8624a ("x86/entry/64: Refactor IRQ stacks and make them NMI-safe") added DEBUG_ENTRY_ASSERT_IRQS_OFF macro that acceses eflags using 'pushfq' instruction when testing for IF bit. On PV Xen guests looking at IF flag directly will always see it set, resulting in 'ud2'. Introduce SAVE_FLAGS() macro that will use appropriate save_fl pv op when running paravirt. Signed-off-by: Boris Ostrovsky Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Dave Hansen Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rik van Riel Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: xen-devel@lists.xenproject.org Link: https://lkml.kernel.org/r/20171204150604.899457242@linutronix.de Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 7 ++++--- arch/x86/include/asm/irqflags.h | 3 +++ arch/x86/include/asm/paravirt.h | 9 +++++++++ arch/x86/kernel/asm-offsets_64.c | 3 +++ 4 files changed, 19 insertions(+), 3 deletions(-) commit 2aeb07365bcd489620f71390a7d2031cd4dfb83e Author: Andrey Ryabinin Date: Wed Nov 15 17:36:35 2017 -0800 x86/mm/kasan: Don't use vmemmap_populate() to initialize shadow [ Note, this is a Git cherry-pick of the following commit: d17a1d97dc20: ("x86/mm/kasan: don't use vmemmap_populate() to initialize shadow") ... for easier x86 PTI code testing and back-porting. ] The KASAN shadow is currently mapped using vmemmap_populate() since that provides a semi-convenient way to map pages into init_top_pgt. However, since that no longer zeroes the mapped pages, it is not suitable for KASAN, which requires zeroed shadow memory. Add kasan_populate_shadow() interface and use it instead of vmemmap_populate(). Besides, this allows us to take advantage of gigantic pages and use them to populate the shadow, which should save us some memory wasted on page tables and reduce TLB pressure. Link: http://lkml.kernel.org/r/20171103185147.2688-2-pasha.tatashin@oracle.com Signed-off-by: Andrey Ryabinin Signed-off-by: Pavel Tatashin Cc: Andy Lutomirski Cc: Steven Sistare Cc: Daniel Jordan Cc: Bob Picco Cc: Michal Hocko Cc: Alexander Potapenko Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Christian Borntraeger Cc: David S. Miller Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Mark Rutland Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Sam Ravnborg Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Ingo Molnar arch/x86/Kconfig | 2 +- arch/x86/mm/kasan_init_64.c | 143 +++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 137 insertions(+), 8 deletions(-) commit 3382290ed2d5e275429cef510ab21889d3ccd164 Author: Will Deacon Date: Tue Oct 24 11:22:48 2017 +0100 locking/barriers: Convert users of lockless_dereference() to READ_ONCE() [ Note, this is a Git cherry-pick of the following commit: 506458efaf15 ("locking/barriers: Convert users of lockless_dereference() to READ_ONCE()") ... for easier x86 PTI code testing and back-porting. ] READ_ONCE() now has an implicit smp_read_barrier_depends() call, so it can be used instead of lockless_dereference() without any change in semantics. Signed-off-by: Will Deacon Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1508840570-22169-4-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar arch/x86/events/core.c | 2 +- arch/x86/include/asm/mmu_context.h | 4 ++-- arch/x86/kernel/ldt.c | 2 +- drivers/md/dm-mpath.c | 20 ++++++++++---------- fs/dcache.c | 4 ++-- fs/overlayfs/ovl_entry.h | 2 +- fs/overlayfs/readdir.c | 2 +- include/linux/rculist.h | 4 ++-- include/linux/rcupdate.h | 4 ++-- kernel/events/core.c | 4 ++-- kernel/seccomp.c | 2 +- kernel/task_work.c | 2 +- mm/slab.h | 2 +- 13 files changed, 27 insertions(+), 27 deletions(-) commit c2bc66082e1048c7573d72e62f597bdc5ce13fea Author: Will Deacon Date: Tue Oct 24 11:22:47 2017 +0100 locking/barriers: Add implicit smp_read_barrier_depends() to READ_ONCE() [ Note, this is a Git cherry-pick of the following commit: 76ebbe78f739 ("locking/barriers: Add implicit smp_read_barrier_depends() to READ_ONCE()") ... for easier x86 PTI code testing and back-porting. ] In preparation for the removal of lockless_dereference(), which is the same as READ_ONCE() on all architectures other than Alpha, add an implicit smp_read_barrier_depends() to READ_ONCE() so that it can be used to head dependency chains on all architectures. Signed-off-by: Will Deacon Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1508840570-22169-3-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar include/linux/compiler.h | 1 + 1 file changed, 1 insertion(+) commit ab95477e7cb35557ecfc837687007b646bab9a9f Author: Daniel Borkmann Date: Tue Dec 12 02:25:31 2017 +0100 bpf: fix build issues on um due to mising bpf_perf_event.h [ Note, this is a Git cherry-pick of the following commit: a23f06f06dbe ("bpf: fix build issues on um due to mising bpf_perf_event.h") ... for easier x86 PTI code testing and back-porting. ] Since c895f6f703ad ("bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type") um (uml) won't build on i386 or x86_64: [...] CC init/main.o In file included from ../include/linux/perf_event.h:18:0, from ../include/linux/trace_events.h:10, from ../include/trace/syscall.h:7, from ../include/linux/syscalls.h:82, from ../init/main.c:20: ../include/uapi/linux/bpf_perf_event.h:11:32: fatal error: asm/bpf_perf_event.h: No such file or directory #include [...] Lets add missing bpf_perf_event.h also to um arch. This seems to be the only one still missing. Fixes: c895f6f703ad ("bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type") Reported-by: Randy Dunlap Suggested-by: Richard Weinberger Signed-off-by: Daniel Borkmann Tested-by: Randy Dunlap Cc: Hendrik Brueckner Cc: Richard Weinberger Acked-by: Alexei Starovoitov Acked-by: Richard Weinberger Signed-off-by: Alexei Starovoitov Signed-off-by: Ingo Molnar arch/um/include/asm/Kbuild | 1 + 1 file changed, 1 insertion(+) commit 2fe1bc1f501d55e5925b4035bcd85781adc76c63 Author: Andi Kleen Date: Thu Aug 31 14:46:30 2017 -0700 perf/x86: Enable free running PEBS for REGS_USER/INTR [ Note, this is a Git cherry-pick of the following commit: a47ba4d77e12 ("perf/x86: Enable free running PEBS for REGS_USER/INTR") ... for easier x86 PTI code testing and back-porting. ] Currently free running PEBS is disabled when user or interrupt registers are requested. Most of the registers are actually available in the PEBS record and can be supported. So we just need to check for the supported registers and then allow it: it is all except for the segment register. For user registers this only works when the counter is limited to ring 3 only, so this also needs to be checked. Signed-off-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170831214630.21892-1-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 4 ++++ arch/x86/events/perf_event.h | 24 +++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) commit f2dbad36c55e5d3a91dccbde6e8cae345fe5632f Author: Rudolf Marek Date: Tue Nov 28 22:01:06 2017 +0100 x86: Make X86_BUG_FXSAVE_LEAK detectable in CPUID on AMD [ Note, this is a Git cherry-pick of the following commit: 2b67799bdf25 ("x86: Make X86_BUG_FXSAVE_LEAK detectable in CPUID on AMD") ... for easier x86 PTI code testing and back-porting. ] The latest AMD AMD64 Architecture Programmer's Manual adds a CPUID feature XSaveErPtr (CPUID_Fn80000008_EBX[2]). If this feature is set, the FXSAVE, XSAVE, FXSAVEOPT, XSAVEC, XSAVES / FXRSTOR, XRSTOR, XRSTORS always save/restore error pointers, thus making the X86_BUG_FXSAVE_LEAK workaround obsolete on such CPUs. Signed-Off-By: Rudolf Marek Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Tested-by: Borislav Petkov Cc: Andy Lutomirski Link: https://lkml.kernel.org/r/bdcebe90-62c5-1f05-083c-eba7f08b2540@assembler.cz Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/amd.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit a8b4db562e7283a1520f9e9730297ecaab7622ea Author: Ricardo Neri Date: Sun Nov 5 18:27:51 2017 -0800 x86/cpufeature: Add User-Mode Instruction Prevention definitions [ Note, this is a Git cherry-pick of the following commit: (limited to the cpufeatures.h file) 3522c2a6a4f3 ("x86/cpufeature: Add User-Mode Instruction Prevention definitions") ... for easier x86 PTI code testing and back-porting. ] User-Mode Instruction Prevention is a security feature present in new Intel processors that, when set, prevents the execution of a subset of instructions if such instructions are executed in user mode (CPL > 0). Attempting to execute such instructions causes a general protection exception. The subset of instructions comprises: * SGDT - Store Global Descriptor Table * SIDT - Store Interrupt Descriptor Table * SLDT - Store Local Descriptor Table * SMSW - Store Machine Status Word * STR - Store Task Register This feature is also added to the list of disabled-features to allow a cleaner handling of build-time configuration. Signed-off-by: Ricardo Neri Reviewed-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Chen Yucong Cc: Chris Metcalf Cc: Dave Hansen Cc: Denys Vlasenko Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Huang Rui Cc: Jiri Slaby Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Ravi V. Shankar Cc: Shuah Khan Cc: Tony Luck Cc: Vlastimil Babka Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1509935277-22138-7-git-send-email-ricardo.neri-calderon@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) commit e5d77a73f364ba0e3e3d6c72c334324bb12e04fc Merge: 2ec077c 03b2a32 Author: Ingo Molnar Date: Fri Dec 1 10:34:04 2017 +0100 Merge commit 'upstream-x86-virt' into WIP.x86/mm Merge a minimal set of virt cleanups, for a base for the MM isolation patches. Signed-off-by: Ingo Molnar commit 2ec077c186a02c0aae8fc213a7b1d4c35f9626ed Merge: 650400b 4f89fa2 Author: Ingo Molnar Date: Sun Dec 17 13:09:31 2017 +0100 Merge branch 'upstream-acpi-fixes' into WIP.x86/pti.base Signed-off-by: Ingo Molnar commit 650400b2ccb8542ff4e2677d66ff083d01c7bd6a Merge: 0fd2e9c fec8f5a Author: Ingo Molnar Date: Sun Dec 17 13:04:28 2017 +0100 Merge branch 'upstream-x86-selftests' into WIP.x86/pti.base Conflicts: arch/x86/kernel/cpu/Makefile Signed-off-by: Ingo Molnar commit 0fd2e9c53d82704a3ba87ea1980ec515188c5316 Merge: 1784f91 1e4c4f6 Author: Ingo Molnar Date: Fri Dec 1 10:32:48 2017 +0100 Merge commit 'upstream-x86-entry' into WIP.x86/mm Pull in a minimal set of v4.15 entry code changes, for a base for the MM isolation patches. Signed-off-by: Ingo Molnar commit 1784f9144b143a1e8b19fe94083b040aa559182b Author: Ingo Molnar Date: Tue Dec 5 14:14:47 2017 +0100 drivers/misc/intel/pti: Rename the header file to free up the namespace We'd like to use the 'PTI' acronym for 'Page Table Isolation' - free up the namespace by renaming the driver header to . (Also standardize the header guard name while at it.) Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: J Freyensee Cc: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar drivers/misc/pti.c | 2 +- include/linux/intel-pti.h | 43 +++++++++++++++++++++++++++++++++++++++++++ include/linux/pti.h | 43 ------------------------------------------- 3 files changed, 44 insertions(+), 44 deletions(-) commit f870c1ff65a6d1f3a083f277280802ee09a5b44d Author: Alexey Kodanev Date: Thu Dec 14 20:20:00 2017 +0300 vxlan: restore dev->mtu setting based on lower device Stefano Brivio says: Commit a985343ba906 ("vxlan: refactor verification and application of configuration") introduced a change in the behaviour of initial MTU setting: earlier, the MTU for a link created on top of a given lower device, without an initial MTU specification, was set to the MTU of the lower device minus headroom as a result of this path in vxlan_dev_configure(): if (!conf->mtu) dev->mtu = lowerdev->mtu - (use_ipv6 ? VXLAN6_HEADROOM : VXLAN_HEADROOM); which is now gone. Now, the initial MTU, in absence of a configured value, is simply set by ether_setup() to ETH_DATA_LEN (1500 bytes). This breaks userspace expectations in case the MTU of the lower device is higher than 1500 bytes minus headroom. This patch restores the previous behaviour on newlink operation. Since max_mtu can be negative and we update dev->mtu directly, also check it for valid minimum. Reported-by: Junhan Yan Fixes: a985343ba906 ("vxlan: refactor verification and application of configuration") Signed-off-by: Alexey Kodanev Acked-by: Stefano Brivio Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller drivers/net/vxlan.c | 5 +++++ 1 file changed, 5 insertions(+) commit 588753f1eb18978512b1c9b85fddb457d46f9033 Author: Brendan McGrath Date: Wed Dec 13 22:14:57 2017 +1100 ipv6: icmp6: Allow icmp messages to be looped back One example of when an ICMPv6 packet is required to be looped back is when a host acts as both a Multicast Listener and a Multicast Router. A Multicast Router will listen on address ff02::16 for MLDv2 messages. Currently, MLDv2 messages originating from a Multicast Listener running on the same host as the Multicast Router are not being delivered to the Multicast Router. This is due to dst.input being assigned the default value of dst_discard. This results in the packet being looped back but discarded before being delivered to the Multicast Router. This patch sets dst.input to ip6_input to ensure a looped back packet is delivered to the Multicast Router. Signed-off-by: Brendan McGrath Signed-off-by: David S. Miller net/ipv6/route.c | 1 + 1 file changed, 1 insertion(+) commit f3b5ad89de16f5d42e8ad36fbdf85f705c1ae051 Merge: f25e229 9d98e19 Author: Linus Torvalds Date: Sat Dec 16 13:43:08 2017 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "More fixes from testing done on the rc kernel, including more SELinux testing. Looking forward, lockdep found regression today in ipoib which is still being fixed. Summary: - Fix for SELinux on the umad SMI path. Some old hardware does not fill the PKey properly exposing another bug in the newer SELinux code. - Check the input port as we can exceed array bounds from this user supplied value - Users are unable to use the hash field support as they want due to incorrect checks on the field restrictions, correct that so the feature works as intended - User triggerable oops in the NETLINK_RDMA handler - cxgb4 driver fix for a bad interaction with CQ flushing in iser caused by patches in this merge window, and bad CQ flushing during normal close. - Unbalanced memalloc_noio in ipoib in an error path" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: IB/ipoib: Restore MM behavior in case of tx_ring allocation failure iw_cxgb4: only insert drain cqes if wq is flushed iw_cxgb4: only clear the ARMED bit if a notification is needed RDMA/netlink: Fix general protection fault IB/mlx4: Fix RSS hash fields restrictions IB/core: Don't enforce PKey security on SMI MADs IB/core: Bound check alternate path port number commit f25e22956058e783cb9bd6d015c2f6b621e831ca Merge: d025fbf 45fd447 Author: Linus Torvalds Date: Sat Dec 16 13:34:38 2017 -0800 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Two bugfixes for the AT24 I2C eeprom driver and some minor corrections for I2C bus drivers" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: piix4: Fix port number check on release i2c: stm32: Fix copyrights i2c-cht-wc: constify platform_device_id eeprom: at24: change nvmem stride to 1 eeprom: at24: fix I2C device selection for runtime PM commit d025fbf1a2cd1d60f39579d331a9accf84c5ec5b Merge: f6f3732 90d91b0 Author: Linus Torvalds Date: Sat Dec 16 13:12:53 2017 -0800 Merge tag 'nfs-for-4.15-3' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: "This has two stable bugfixes, one to fix a BUG_ON() when nfs_commit_inode() is called with no outstanding commit requests and another to fix a race in the SUNRPC receive codepath. Additionally, there are also fixes for an NFS client deadlock and an xprtrdma performance regression. Summary: Stable bugfixes: - NFS: Avoid a BUG_ON() in nfs_commit_inode() by not waiting for a commit in the case that there were no commit requests. - SUNRPC: Fix a race in the receive code path Other fixes: - NFS: Fix a deadlock in nfs client initialization - xprtrdma: Fix a performance regression for small IOs" * tag 'nfs-for-4.15-3' of git://git.linux-nfs.org/projects/anna/linux-nfs: SUNRPC: Fix a race in the receive code path nfs: don't wait on commit in nfs_commit_inode() if there were no commit requests xprtrdma: Spread reply processing over more CPUs nfs: fix a deadlock in nfs client initialization commit 74657181e7c449351d1ad28cf43941bc333e1bd6 Author: Mika Westerberg Date: Fri Dec 1 15:08:05 2017 +0300 thunderbolt: Mask ring interrupt properly when polling starts When ring enters polling mode we are expected to mask the ring interrupt before the callback is called. However, the current code actually unmasks it probably because of a copy-paste mistake. Mask the interrupt properly from now on. Fixes: 4ffe722eefcb ("thunderbolt: Add polling mode for rings") Signed-off-by: Mika Westerberg Acked-by: Yehezkel Bernat Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/nhi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78dfa29c84bab548910490cf7508c53ad99d1d9e Author: Mika Westerberg Date: Fri Dec 1 15:08:04 2017 +0300 MAINTAINERS: Add thunderbolt.rst to the Thunderbolt driver entry Make sure Thunderbolt maintainers get to see patches that touch documentation of the Thunderbolt driver as well. Signed-off-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit cce1fea50e3be6b78fc677e8cf20cd0ca4c851b0 Author: Andy Shevchenko Date: Fri Dec 1 15:08:03 2017 +0300 thunderbolt: Make pathname to force_power shorter WMI is the bus inside kernel, so, we may access the GUID via /sys/bus/wmi instead of doing this through /sys/devices path. Signed-off-by: Andy Shevchenko Acked-by: Mario Limonciello Signed-off-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman Documentation/admin-guide/thunderbolt.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f0e3fe6b1504d4e6530294ec87c473aa6d2d02f Author: Matthew Wilcox Date: Tue Nov 14 09:10:11 2017 -0500 x86/build: Make isoimage work on Debian Debian does not ship a 'mkisofs' symlink to genisoimage. All modern distros ship genisoimage, so just use that directly. That requires renaming the 'genisoimage' function. Also neaten up the 'for' loop while I'm in here. Signed-off-by: Matthew Wilcox Cc: Changbin Du Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/boot/genimage.sh | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 9ec4c8e810588ddf6a4a2ebd501cf6cc18c97ad0 Merge: bc2fd1b 10a6a69 Author: Richard Weinberger Date: Sat Dec 16 11:01:00 2017 +0100 Merge branch 'spi-nor/fixes' of ssh://bombadil/srv/git/linux-mtd into mtd/fixes-for-4.15-rc4 commit f6f3732162b5ae3c771b9285a5a32d72b8586920 Author: Linus Torvalds Date: Fri Dec 15 18:53:22 2017 -0800 Revert "mm: replace p??_write with pte_access_permitted in fault + gup paths" This reverts commits 5c9d2d5c269c, c7da82b894e9, and e7fe7b5cae90. We'll probably need to revisit this, but basically we should not complicate the get_user_pages_fast() case, and checking the actual page table protection key bits will require more care anyway, since the protection keys depend on the exact state of the VM in question. Particularly when doing a "remote" page lookup (ie in somebody elses VM, not your own), you need to be much more careful than this was. Dave Hansen says: "So, the underlying bug here is that we now a get_user_pages_remote() and then go ahead and do the p*_access_permitted() checks against the current PKRU. This was introduced recently with the addition of the new p??_access_permitted() calls. We have checks in the VMA path for the "remote" gups and we avoid consulting PKRU for them. This got missed in the pkeys selftests because I did a ptrace read, but not a *write*. I also didn't explicitly test it against something where a COW needed to be done" It's also not entirely clear that it makes sense to check the protection key bits at this level at all. But one possible eventual solution is to make the get_user_pages_fast() case just abort if it sees protection key bits set, which makes us fall back to the regular get_user_pages() case, which then has a vma and can do the check there if we want to. We'll see. Somewhat related to this all: what we _do_ want to do some day is to check the PAGE_USER bit - it should obviously always be set for user pages, but it would be a good check to have back. Because we have no generic way to test for it, we lost it as part of moving over from the architecture-specific x86 GUP implementation to the generic one in commit e585513b76f7 ("x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation"). Cc: Peter Zijlstra Cc: Dan Williams Cc: Dave Hansen Cc: Kirill A. Shutemov Cc: "Jérôme Glisse" Cc: Andrew Morton Cc: Al Viro Signed-off-by: Linus Torvalds arch/s390/include/asm/pgtable.h | 6 ------ arch/sparc/mm/gup.c | 4 ++-- fs/dax.c | 3 +-- mm/gup.c | 2 +- mm/hmm.c | 8 ++++---- mm/huge_memory.c | 6 +++--- mm/memory.c | 8 ++++---- 7 files changed, 15 insertions(+), 22 deletions(-) commit becd0875f4393a992afbf57aa323f7bf1a71c3ff Author: Jerry (Fangzhi) Zuo Date: Fri Dec 1 13:26:05 2017 -0500 drm/amd/display: Fix rehook MST display not light back on Original applied dm_restore_drm_connector_state() has got removed. Set link status to BAD before hotplug() event could trigger another modeset from userspace. The fix "Fix MST daisy chain SST not light up" commit makes so it is trying to create a stream prior to dc_sink. That makes dc_sink is not present in create_stream_for_sink(). Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 13 +++--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 + .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 51 ++++++++++++++++++++++ .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.h | 1 + 4 files changed, 62 insertions(+), 5 deletions(-) commit 78288503199d0a33b69b972a44a4cf15df989899 Author: Eric Yang Date: Fri Nov 10 10:44:24 2017 -0500 drm/amd/display: fix missing pixel clock adjustment for dongle Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Reviewed-by: Andrew Jiang Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 56a9b95c4d3386a98f69f641dd6018886ed2e9d6 Author: Dmytro Laktyushkin Date: Mon Nov 13 17:03:53 2017 -0500 drm/amd/display: set chroma taps to 1 when not scaling Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 9 +++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 9 ++++----- 2 files changed, 13 insertions(+), 5 deletions(-) commit b2162117171864ef48d43cf5d888f3e8012c6c06 Author: Bhawanpreet Lakha Date: Fri Nov 24 17:26:28 2017 -0500 drm/amd/display: add pipe locking before front end programing Add pipe locking/unlocking before we program the front end Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/dce110/dce110_hw_sequencer.c | 26 +++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit a9fa99146ab4fc029ba5551a1a3a0102fae7fddf Merge: fcf38cd 654b4a4 Author: Jens Axboe Date: Fri Dec 15 14:47:42 2017 -0700 Merge branch 'nvme-4.15' of git://git.infradead.org/nvme into for-linus Pull NVMe fixes from Christoph: "Below are a couple important one or two liners fixes for Linux 4.15" commit bc2fd1b11097ad981478abcc0328784ea131ac29 Author: Christophe Leroy Date: Wed Dec 6 18:27:14 2017 +0100 mtd: nand: gpio: Fix ALE gpio configuration Fixes a copy/paste error in commit f3d0d8d938b4d ("mtd: nand: gpio: Convert to use GPIO descriptors") which breaks gpio-nand driver Fixes: f3d0d8d938b4d ("mtd: nand: gpio: Convert to use GPIO descriptors") Cc: Linus Walleij Signed-off-by: Christophe Leroy Reviewed-by: Richard Weinberger Acked-by: Boris Brezillon Reviewed-by: Linus Walleij Signed-off-by: Richard Weinberger drivers/mtd/nand/gpio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e44b9a9c135727f3410e029910275f40681dc8bc Author: Albert Hsieh Date: Mon Nov 20 11:26:26 2017 +0800 mtd: nand: brcmnand: Zero bitflip is not an error A negative return value of brcmstb_nand_verify_erased_page() indicates a real bitflip error of an erased page, and other return values (>= 0) show the corrected bitflip number. Zero return value means no bitflip, but the current driver code treats it as an error, and eventually leads to falsely reported ECC error. Fixes: 02b88eea9f9c ("mtd: brcmnand: Add check for erased page bitflip") Signed-off-by: Albert Hsieh Acked-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/nand/brcmnand/brcmnand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fdf2e821052958a114618a95ab18a300d0b080cb Author: Sascha Hauer Date: Tue Dec 5 11:51:40 2017 +0100 mtd: nand: gpmi: Fix failure when a erased page has a bitflip at BBM When erased subpages are read then the BCH decoder returns STATUS_ERASED if they are all empty, or STATUS_UNCORRECTABLE if there are bitflips. When there are bitflips, we have to set these bits again to show the upper layers a completely erased page. When a bitflip happens in the exact byte where the bad block marker is, then this byte is swapped with another byte in block_mark_swapping(). The correction code then detects a bitflip in another subpage and no longer corrects the bitflip where it really happens. Correct this behaviour by calling block_mark_swapping() after the bitflips have been corrected. In our case UBIFS failed with this bug because it expects erased pages to be really empty: UBIFS error (pid 187): ubifs_scan: corrupt empty space at LEB 36:118735 UBIFS error (pid 187): ubifs_scanned_corruption: corruption at LEB 36:118735 UBIFS error (pid 187): ubifs_scanned_corruption: first 8192 bytes from LEB 36:118735 UBIFS error (pid 187): ubifs_scan: LEB 36 scanning failed UBIFS error (pid 187): do_commit: commit failed, error -117 Signed-off-by: Sascha Hauer Reviewed-by: Richard Weinberger Acked-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit caea4f384858ee7861367920df36995e7acfe160 Author: Hans Verkuil Date: Fri Dec 15 16:21:50 2017 +0100 drm/sun4i: validate modes for HDMI When I connected my cubieboard running 4.15-rc1 to my 4k display I got no picture. Some digging found that there is no check against the upper pixelclock limit of the HDMI output, so X selects a 4kp60 format at 594 MHz, which obviously won't work. The patch below adds a check for the upper bound of what this hardware can do, and it checks if the requested tmds clock can be obtained. It also allows for the +/- 0.5% pixel clock variation that the HDMI spec permits. That code is based on commit 22d0be2a557e ("drm: arcpgu: Allow some clock deviation in crtc->mode_valid() callback") from Jose Abreu for drm/arc. Signed-off-by: Hans Verkuil Thanks-to: Jose Abreu Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/162854cb-c7bd-d9ce-9fa0-9a6cd89c621b@xs4all.nl drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 7a3c296ae08f9b51e399074d8ef6867d65fbd22b Merge: c36c7a7 043ee1d Author: Linus Torvalds Date: Fri Dec 15 13:08:37 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Clamp timeouts to INT_MAX in conntrack, from Jay Elliot. 2) Fix broken UAPI for BPF_PROG_TYPE_PERF_EVENT, from Hendrik Brueckner. 3) Fix locking in ieee80211_sta_tear_down_BA_sessions, from Johannes Berg. 4) Add missing barriers to ptr_ring, from Michael S. Tsirkin. 5) Don't advertise gigabit in sh_eth when not available, from Thomas Petazzoni. 6) Check network namespace when delivering to netlink taps, from Kevin Cernekee. 7) Kill a race in raw_sendmsg(), from Mohamed Ghannam. 8) Use correct address in TCP md5 lookups when replying to an incoming segment, from Christoph Paasch. 9) Add schedule points to BPF map alloc/free, from Eric Dumazet. 10) Don't allow silly mtu values to be used in ipv4/ipv6 multicast, also from Eric Dumazet. 11) Fix SKB leak in tipc, from Jon Maloy. 12) Disable MAC learning on OVS ports of mlxsw, from Yuval Mintz. 13) SKB leak fix in skB_complete_tx_timestamp(), from Willem de Bruijn. 14) Add some new qmi_wwan device IDs, from Daniele Palmas. 15) Fix static key imbalance in ingress qdisc, from Jiri Pirko. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (76 commits) net: qcom/emac: Reduce timeout for mdio read/write net: sched: fix static key imbalance in case of ingress/clsact_init error net: sched: fix clsact init error path ip_gre: fix wrong return value of erspan_rcv net: usb: qmi_wwan: add Telit ME910 PID 0x1101 support pkt_sched: Remove TC_RED_OFFLOADED from uapi net: sched: Move to new offload indication in RED net: sched: Add TCA_HW_OFFLOAD net: aquantia: Increment driver version net: aquantia: Fix typo in ethtool statistics names net: aquantia: Update hw counters on hw init net: aquantia: Improve link state and statistics check interval callback net: aquantia: Fill in multicast counter in ndev stats from hardware net: aquantia: Fill ndev stat couters from hardware net: aquantia: Extend stat counters to 64bit values net: aquantia: Fix hardware DMA stream overload on large MRRS net: aquantia: Fix actual speed capabilities reporting sock: free skb in skb_complete_tx_timestamp on error s390/qeth: update takeover IPs after configuration change s390/qeth: lock IP table while applying takeover changes ... commit c36c7a7c4034f2ef35c6aa6821e7c82d9968dba4 Merge: a84ec72 48a4ff1 Author: Linus Torvalds Date: Fri Dec 15 13:03:25 2017 -0800 Merge tag 'usb-4.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some USB fixes for 4.15-rc4. There is the usual handful gadget/dwc2/dwc3 fixes as always, for reported issues. But the most important things in here is the core fix from Alan Stern to resolve a nasty security bug (my first attempt is reverted, Alan's was much cleaner), as well as a number of usbip fixes from Shuah Khan to resolve those reported security issues. All of these have been in linux-next with no reported issues" * tag 'usb-4.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: core: prevent malicious bNumInterfaces overflow Revert "USB: core: only clean up what we allocated" USB: core: only clean up what we allocated Revert "usb: gadget: allow to enable legacy drivers without USB_ETH" usb: gadget: webcam: fix V4L2 Kconfig dependency usb: dwc2: Fix TxFIFOn sizes and total TxFIFO size issues usb: dwc3: gadget: Fix PCM1 for ISOC EP with ep->mult less than 3 usb: dwc3: of-simple: set dev_pm_ops usb: dwc3: of-simple: fix missing clk_disable_unprepare usb: dwc3: gadget: Wait longer for controller to end command processing usb: xhci: fix TDS for MTK xHCI1.1 xhci: Don't add a virt_dev to the devs array before it's fully allocated usbip: fix stub_send_ret_submit() vulnerability to null transfer_buffer usbip: prevent vhci_hcd driver from leaking a socket pointer address usbip: fix stub_rx: harden CMD_SUBMIT path to handle malicious input usbip: fix stub_rx: get_pipe() to validate endpoint number tools/usbip: fixes potential (minor) "buffer overflow" (detected on recent gcc with -Werror) USB: uas and storage: Add US_FL_BROKEN_FUA for another JMicron JMS567 ID usb: musb: da8xx: fix babble condition handling commit a84ec72324e291262137726d10d67f90c4c5110e Merge: d6e47ee 202fc67 Author: Linus Torvalds Date: Fri Dec 15 12:59:48 2017 -0800 Merge tag 'staging-4.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging fixes from Greg KH: "Here are some small staging driver fixes for 4.15-rc4. One patch for the ccree driver to prevent an unitialized value from being returned to a caller, and the other fixes a logic error in the pi433 driver" * tag 'staging-4.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: pi433: Fixes issue with bit shift in rf69_get_modulation staging: ccree: Uninitialized return in ssi_ahash_import() commit d6e47eed0501478d2b55f0f1375b3cd96d0f6535 Merge: ee1b43e c2e9080 Author: Linus Torvalds Date: Fri Dec 15 12:56:23 2017 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio regression fixes from Michael Tsirkin: "Fixes two issues in the latest kernel" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_mmio: fix devm cleanup ptr_ring: fix up after recent ptr_ring changes commit ee1b43ece1533ee60b876fd75ddb20ba1ea186bb Merge: 66dbbd7 fbc7c07 Author: Linus Torvalds Date: Fri Dec 15 12:53:37 2017 -0800 Merge tag 'for-4.15/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - fix a particularly nasty DM core bug in a 4.15 refcount_t conversion. - fix various targets to dm_register_target after module __init resources created; otherwise racing lvm2 commands could result in a NULL pointer during initialization of associated DM kernel module. - fix regression in bio-based DM multipath queue_if_no_path handling. - fix DM bufio's shrinker to reclaim more than one buffer per scan. * tag 'for-4.15/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm bufio: fix shrinker scans when (nr_to_scan < retain_target) dm mpath: fix bio-based multipath queue_if_no_path handling dm: fix various targets to dm_register_target after module __init resources created dm table: fix regression from improper dm_dev_internal.count refcount_t conversion commit 66dbbd72005c5ebdd1de35ba5a41393f01df48d6 Merge: 07a20ed 14e3062 Author: Linus Torvalds Date: Fri Dec 15 12:51:42 2017 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "The most important one is the bfa fix because it's easy to oops the kernel with this driver (this includes the commit that corrects the compiler warning in the original), a regression in the new timespec conversion in aacraid and a regression in the Fibre Channel ELS handling patch. The other three are a theoretical problem with termination in the vendor/host matching code and a use after free in lpfc. The additional patches are a fix for an I/O hang in the mq code under certain circumstances and a rare oops in some debugging code" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: core: Fix a scsi_show_rq() NULL pointer dereference scsi: MAINTAINERS: change FCoE list to linux-scsi scsi: libsas: fix length error in sas_smp_handler() scsi: bfa: fix type conversion warning scsi: core: run queue if SCSI device queue isn't ready and queue is idle scsi: scsi_devinfo: cleanly zero-pad devinfo strings scsi: scsi_devinfo: handle non-terminated strings scsi: bfa: fix access to bfad_im_port_s scsi: aacraid: address UBSAN warning regression scsi: libfc: fix ELS request handling scsi: lpfc: Use after free in lpfc_rq_buf_free() commit 07a20ed1e3c25925282aebb2f8cec0e3b5ae99b6 Merge: dd3d66b8 91516a2 Author: Linus Torvalds Date: Fri Dec 15 12:49:54 2017 -0800 Merge tag 'mmc-v4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "A couple of MMC fixes: - fix use of uninitialized drv_typ variable - apply NO_CMD23 quirk to some specific SD cards to make them work" * tag 'mmc-v4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: core: apply NO_CMD23 quirk to some specific cards mmc: core: properly init drv_type commit dd3d66b8381a33f6d992e5890883e1d9fc8721af Merge: 227701e 040d786 Author: Linus Torvalds Date: Fri Dec 15 12:48:27 2017 -0800 Merge tag 'ceph-for-4.15-rc4' of git://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "CephFS inode trimming fix from Zheng, marked for stable" * tag 'ceph-for-4.15-rc4' of git://github.com/ceph/ceph-client: ceph: drop negative child dentries before try pruning inode's alias commit 227701e0e7078065f24f5a6ca220218fd80023a5 Merge: 06f976e da2e6b7 Author: Linus Torvalds Date: Fri Dec 15 12:46:48 2017 -0800 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: - fix incomplete syncing of filesystem - fix regression in readdir on ovl over 9p - only follow redirects when needed - misc fixes and cleanups * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: fix overlay: warning prefix ovl: Use PTR_ERR_OR_ZERO() ovl: Sync upper dirty data when syncing overlayfs ovl: update ctx->pos on impure dir iteration ovl: Pass ovl_get_nlink() parameters in right order ovl: don't follow redirects if redirect_dir=off commit 043ee1debd0b29c16c4c4b11a348ca667bfe9144 Author: Hemanth Puranik Date: Fri Dec 15 20:05:58 2017 +0530 net: qcom/emac: Reduce timeout for mdio read/write Currently mdio read/write takes around ~115us as the timeout between status check is set to 100us. By reducing the timeout to 1us mdio read/write takes ~15us to complete. This improves the link up event response. Signed-off-by: Hemanth Puranik Acked-by: Timur Tabi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-phy.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 06f976ecc7afbf2e68c44ec9e591af4ceca04ca6 Merge: e53000b a454483 Author: Linus Torvalds Date: Fri Dec 15 12:44:49 2017 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "There are some significant fixes in here for FP state corruption, hardware access/dirty PTE corruption and an erratum workaround for the Falkor CPU. I'm hoping that things finally settle down now, but never say never... Summary: - Fix FPSIMD context switch regression introduced in -rc2 - Fix ABI break with SVE CPUID register reporting - Fix use of uninitialised variable - Fixes to hardware access/dirty management and sanity checking - CPU erratum workaround for Falkor CPUs - Fix reporting of writeable+executable mappings - Fix signal reporting for RAS errors" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: fpsimd: Fix copying of FP state from signal frame into task struct arm64/sve: Report SVE to userspace via CPUID only if supported arm64: fix CONFIG_DEBUG_WX address reporting arm64: fault: avoid send SIGBUS two times arm64: hw_breakpoint: Use linux/uaccess.h instead of asm/uaccess.h arm64: Add software workaround for Falkor erratum 1041 arm64: Define cputype macros for Falkor CPU arm64: mm: Fix false positives in set_pte_at access/dirty race detection arm64: mm: Fix pte_mkclean, pte_mkdirty semantics arm64: Initialise high_memory global variable earlier commit b59e6979a86384e68b0ab6ffeab11f0034fba82d Author: Jiri Pirko Date: Fri Dec 15 12:40:13 2017 +0100 net: sched: fix static key imbalance in case of ingress/clsact_init error Move static key increments to the beginning of the init function so they pair 1:1 with decrements in ingress/clsact_destroy, which is called in case ingress/clsact_init fails. Fixes: 6529eaba33f0 ("net: sched: introduce tcf block infractructure") Signed-off-by: Jiri Pirko Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/sch_ingress.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 343723dd51ef1025a860e54df9472b5ba21ee3d9 Author: Jiri Pirko Date: Fri Dec 15 12:40:12 2017 +0100 net: sched: fix clsact init error path Since in qdisc_create, the destroy op is called when init fails, we don't do cleanup in init and leave it up to destroy. This fixes use-after-free when trying to put already freed block. Fixes: 6e40cf2d4dee ("net: sched: use extended variants of block_get/put in ingress and clsact qdiscs") Signed-off-by: Jiri Pirko Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_api.c | 4 ++-- net/sched/sch_ingress.c | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) commit e53000b1ed936e5fe898161918962382b4c7af9b Merge: 1f76a75 215eada Author: Linus Torvalds Date: Fri Dec 15 12:14:33 2017 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc fixes: - fix the s2ram regression related to confusion around segment register restoration, plus related cleanups that make the code more robust - a guess-unwinder Kconfig dependency fix - an isoimage build target fix for certain tool chain combinations - instruction decoder opcode map fixes+updates, and the syncing of the kernel decoder headers to the objtool headers - a kmmio tracing fix - two 5-level paging related fixes - a topology enumeration fix on certain SMP systems" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Resync objtool's instruction decoder source code copy with the kernel's latest version x86/decoder: Fix and update the opcodes map x86/power: Make restore_processor_context() sane x86/power/32: Move SYSENTER MSR restoration to fix_processor_context() x86/power/64: Use struct desc_ptr for the IDT in struct saved_context x86/unwinder/guess: Prevent using CONFIG_UNWINDER_GUESS=y with CONFIG_STACKDEPOT=y x86/build: Don't verify mtools configuration file for isoimage x86/mm/kmmio: Fix mmiotrace for page unaligned addresses x86/boot/compressed/64: Print error if 5-level paging is not supported x86/boot/compressed/64: Detect and handle 5-level paging at boot-time x86/smpboot: Do not use smp_num_siblings in __max_logical_packages calculation commit 1f76a75561a006fc03559f665c835e0e69c9014d Merge: a58653c 92ccc26 Author: Linus Torvalds Date: Fri Dec 15 11:44:59 2017 -0800 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Ingo Molnar: "Misc fixes: - Fix a S390 boot hang that was caused by the lock-break logic. Remove lock-break to begin with, as review suggested it was unreasonably fragile and our confidence in its continued good health is lower than our confidence in its removal. - Remove the lockdep cross-release checking code for now, because of unresolved false positive warnings. This should make lockdep work well everywhere again. - Get rid of the final (and single) ACCESS_ONCE() straggler and remove the API from v4.15. - Fix a liblockdep build warning" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tools/lib/lockdep: Add missing declaration of 'pr_cont()' checkpatch: Remove ACCESS_ONCE() warning compiler.h: Remove ACCESS_ONCE() tools/include: Remove ACCESS_ONCE() tools/perf: Convert ACCESS_ONCE() to READ_ONCE() locking/lockdep: Remove the cross-release locking checks locking/core: Remove break_lock field when CONFIG_GENERIC_LOCKBREAK=y locking/core: Fix deadlock during boot on systems with GENERIC_LOCKBREAK commit a58653cc1e8b329fe786d103dcd3048115b65a55 Merge: 3fba361 f73c52a Author: Linus Torvalds Date: Fri Dec 15 11:40:24 2017 -0800 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Two fixes: a crash fix for an ARM SoC platform, and kernel-doc warnings fixes" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/rt: Do not pull from current CPU if only one CPU to pull sched/core: Fix kernel-doc warnings after code movement commit 3fba36145cc4665792d63668579aa719e1d5e8cb Merge: 35d5788 643e345 Author: Linus Torvalds Date: Fri Dec 15 11:36:20 2017 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tooling fix from Ingo Molnar: "Synchronize kernel <-> tooling headers to resolve two build warnings in the perf build" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tools/headers: Synchronize kernel <-> tooling headers commit 35d57884804ca45bfbf7590933066547050f5786 Merge: bde6b37 7f6f60a Author: Linus Torvalds Date: Fri Dec 15 11:34:29 2017 -0800 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull early_ioremap fix from Ingo Molnar: "A boot hang fix when the EFI earlyprintk driver is enabled" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: mm/early_ioremap: Fix boot hang with earlyprintk=efi,keep commit bde6b37e49831d0a6452c39ce2b53662afec78af Merge: 032b4cc c4f9d9c Author: Linus Torvalds Date: Fri Dec 15 11:32:09 2017 -0800 Merge tag 'for-linus-4.15-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Two minor fixes for running as Xen dom0: - when built as 32 bit kernel on large machines the Xen LAPIC emulation should report a rather modern LAPIC in order to support enough APIC-Ids - The Xen LAPIC emulation is needed for dom0 only, so build it only for kernels supporting to run as Xen dom0" * tag 'for-linus-4.15-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: XEN_ACPI_PROCESSOR is Dom0-only x86/Xen: don't report ancient LAPIC version commit 90d91b0cd371193d9dbfa9beacab8ab9a4cb75e0 Author: Trond Myklebust Date: Thu Dec 14 21:24:08 2017 -0500 SUNRPC: Fix a race in the receive code path We must ensure that the call to rpc_sleep_on() in xprt_transmit() cannot race with the call to xprt_complete_rqst(). Reported-by: Chuck Lever Link: https://bugzilla.linux-nfs.org/show_bug.cgi?id=317 Fixes: ce7c252a8c74 ("SUNRPC: Add a separate spinlock to protect..") Cc: stable@vger.kernel.org # 4.14+ Reviewed-by: Chuck Lever Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker net/sunrpc/xprt.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit dc4fd9ab01ab379ae5af522b3efd4187a7c30a31 Author: Scott Mayhew Date: Fri Dec 8 16:00:12 2017 -0500 nfs: don't wait on commit in nfs_commit_inode() if there were no commit requests If there were no commit requests, then nfs_commit_inode() should not wait on the commit or mark the inode dirty, otherwise the following BUG_ON can be triggered: [ 1917.130762] kernel BUG at fs/inode.c:578! [ 1917.130766] Oops: Exception in kernel mode, sig: 5 [#1] [ 1917.130768] SMP NR_CPUS=2048 NUMA pSeries [ 1917.130772] Modules linked in: iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi blocklayoutdriver rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache sunrpc sg nx_crypto pseries_rng ip_tables xfs libcrc32c sd_mod crc_t10dif crct10dif_generic crct10dif_common ibmvscsi scsi_transport_srp ibmveth scsi_tgt dm_mirror dm_region_hash dm_log dm_mod [ 1917.130805] CPU: 2 PID: 14923 Comm: umount.nfs4 Tainted: G ------------ T 3.10.0-768.el7.ppc64 #1 [ 1917.130810] task: c0000005ecd88040 ti: c00000004cea0000 task.ti: c00000004cea0000 [ 1917.130813] NIP: c000000000354178 LR: c000000000354160 CTR: c00000000012db80 [ 1917.130816] REGS: c00000004cea3720 TRAP: 0700 Tainted: G ------------ T (3.10.0-768.el7.ppc64) [ 1917.130820] MSR: 8000000100029032 CR: 22002822 XER: 20000000 [ 1917.130828] CFAR: c00000000011f594 SOFTE: 1 GPR00: c000000000354160 c00000004cea39a0 c0000000014c4700 c0000000018cc750 GPR04: 000000000000c750 80c0000000000000 0600000000000000 04eeb76bea749a03 GPR08: 0000000000000034 c0000000018cc758 0000000000000001 d000000005e619e8 GPR12: c00000000012db80 c000000007b31200 0000000000000000 0000000000000000 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR24: 0000000000000000 c000000000dfc3ec 0000000000000000 c0000005eefc02c0 GPR28: d0000000079dbd50 c0000005b94a02c0 c0000005b94a0250 c0000005b94a01c8 [ 1917.130867] NIP [c000000000354178] .evict+0x1c8/0x350 [ 1917.130871] LR [c000000000354160] .evict+0x1b0/0x350 [ 1917.130873] Call Trace: [ 1917.130876] [c00000004cea39a0] [c000000000354160] .evict+0x1b0/0x350 (unreliable) [ 1917.130880] [c00000004cea3a30] [c0000000003558cc] .evict_inodes+0x13c/0x270 [ 1917.130884] [c00000004cea3af0] [c000000000327d20] .kill_anon_super+0x70/0x1e0 [ 1917.130896] [c00000004cea3b80] [d000000005e43e30] .nfs_kill_super+0x20/0x60 [nfs] [ 1917.130900] [c00000004cea3c00] [c000000000328a20] .deactivate_locked_super+0xa0/0x1b0 [ 1917.130903] [c00000004cea3c80] [c00000000035ba54] .cleanup_mnt+0xd4/0x180 [ 1917.130907] [c00000004cea3d10] [c000000000119034] .task_work_run+0x114/0x150 [ 1917.130912] [c00000004cea3db0] [c00000000001ba6c] .do_notify_resume+0xcc/0x100 [ 1917.130916] [c00000004cea3e30] [c00000000000a7b0] .ret_from_except_lite+0x5c/0x60 [ 1917.130919] Instruction dump: [ 1917.130921] 7fc3f378 486734b5 60000000 387f00a0 38800003 4bdcb365 60000000 e95f00a0 [ 1917.130927] 694a0060 7d4a0074 794ad182 694a0001 <0b0a0000> 892d02a4 2f890000 40de0134 Signed-off-by: Scott Mayhew Cc: stable@vger.kernel.org # 4.5+ Signed-off-by: Anna Schumaker fs/nfs/write.c | 2 ++ 1 file changed, 2 insertions(+) commit ccede7598588ae344143f82fb763912535648d58 Author: Chuck Lever Date: Mon Dec 4 14:04:04 2017 -0500 xprtrdma: Spread reply processing over more CPUs Commit d8f532d20ee4 ("xprtrdma: Invoke rpcrdma_reply_handler directly from RECV completion") introduced a performance regression for NFS I/O small enough to not need memory registration. In multi- threaded benchmarks that generate primarily small I/O requests, IOPS throughput is reduced by nearly a third. This patch restores the previous level of throughput. Because workqueues are typically BOUND (in particular ib_comp_wq, nfsiod_workqueue, and rpciod_workqueue), NFS/RDMA workloads tend to aggregate on the CPU that is handling Receive completions. The usual approach to addressing this problem is to create a QP and CQ for each CPU, and then schedule transactions on the QP for the CPU where you want the transaction to complete. The transaction then does not require an extra context switch during completion to end up on the same CPU where the transaction was started. This approach doesn't work for the Linux NFS/RDMA client because currently the Linux NFS client does not support multiple connections per client-server pair, and the RDMA core API does not make it straightforward for ULPs to determine which CPU is responsible for handling Receive completions for a CQ. So for the moment, record the CPU number in the rpcrdma_req before the transport sends each RPC Call. Then during Receive completion, queue the RPC completion on that same CPU. Additionally, move all RPC completion processing to the deferred handler so that even RPCs with simple small replies complete on the CPU that sent the corresponding RPC Call. Fixes: d8f532d20ee4 ("xprtrdma: Invoke rpcrdma_reply_handler ...") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 6 +----- net/sunrpc/xprtrdma/transport.c | 2 ++ net/sunrpc/xprtrdma/verbs.c | 2 +- net/sunrpc/xprtrdma/xprt_rdma.h | 1 + 4 files changed, 5 insertions(+), 6 deletions(-) commit c156618e15101a9cc8c815108fec0300a0ec6637 Author: Scott Mayhew Date: Tue Dec 5 13:55:44 2017 -0500 nfs: fix a deadlock in nfs client initialization The following deadlock can occur between a process waiting for a client to initialize in while walking the client list during nfsv4 server trunking detection and another process waiting for the nfs_clid_init_mutex so it can initialize that client: Process 1 Process 2 --------- --------- spin_lock(&nn->nfs_client_lock); list_add_tail(&CLIENTA->cl_share_link, &nn->nfs_client_list); spin_unlock(&nn->nfs_client_lock); spin_lock(&nn->nfs_client_lock); list_add_tail(&CLIENTB->cl_share_link, &nn->nfs_client_list); spin_unlock(&nn->nfs_client_lock); mutex_lock(&nfs_clid_init_mutex); nfs41_walk_client_list(clp, result, cred); nfs_wait_client_init_complete(CLIENTA); (waiting for nfs_clid_init_mutex) Make sure nfs_match_client() only evaluates clients that have completed initialization in order to prevent that deadlock. This patch also fixes v4.0 trunking behavior by not marking the client NFS_CS_READY until the clientid has been confirmed. Signed-off-by: Scott Mayhew Signed-off-by: Anna Schumaker fs/nfs/client.c | 11 +++++++++++ fs/nfs/nfs4client.c | 17 +++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) commit c05fad5713b81b049ec6ac4eb2d304030b1efdce Author: Haishuang Yan Date: Fri Dec 15 10:46:16 2017 +0800 ip_gre: fix wrong return value of erspan_rcv If pskb_may_pull return failed, return PACKET_REJECT instead of -ENOMEM. Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Cc: William Tu Signed-off-by: Haishuang Yan Acked-by: William Tu Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f57ab9a01a36ef3454333251cc57e3a9948b17bf Author: Sudeep Holla Date: Fri Nov 17 11:56:41 2017 +0000 drivers: base: cacheinfo: fix cache type for non-architected system cache Commit dfea747d2aba ("drivers: base: cacheinfo: support DT overrides for cache properties") doesn't initialise the cache type if it's present only in DT and the architecture is not aware of it. They are unified system level cache which are generally transparent. This patch check if the cache type is set to NOCACHE but the DT node indicates that it's unified cache and sets the cache type accordingly. Fixes: dfea747d2aba ("drivers: base: cacheinfo: support DT overrides for cache properties") Reported-and-tested-by: Tan Xiaojun Cc: Greg Kroah-Hartman Signed-off-by: Sudeep Holla Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/base/cacheinfo.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit c647c0d62c82eb3ddf78a0d8b3d58819d9f552aa Author: Daniele Palmas Date: Thu Dec 14 16:56:14 2017 +0100 net: usb: qmi_wwan: add Telit ME910 PID 0x1101 support This patch adds support for Telit ME910 PID 0x1101. Signed-off-by: Daniele Palmas Acked-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit d1fca67fee14c0b8097517f308320af16253023e Merge: 0a06069 4a98795 Author: David S. Miller Date: Fri Dec 15 13:35:37 2017 -0500 Merge branch 'net-sched-Make-qdisc-offload-uapi-uniform' Yuval Mintz says: ==================== net: sched: Make qdisc offload uapi uniform Several qdiscs can already be offloaded to hardware, but there's an inconsistecy in regard to the uapi through which they indicate such an offload is taking place - indication is passed to the user via TCA_OPTIONS where each qdisc retains private logic for setting it. The recent addition of offloading to RED in 602f3baf2218 ("net_sch: red: Add offload ability to RED qdisc") caused the addition of yet another uapi field for this purpose - TC_RED_OFFLOADED. For clarity and prevention of bloat in the uapi we want to eliminate said added uapi, replacing it with a common mechanism that can be used to reflect offload status of the various qdiscs. The first patch introduces TCA_HW_OFFLOAD as the generic message meant for this purpose. The second changes the current RED implementation into setting the internal bits necessary for passing it, and the third removes TC_RED_OFFLOADED as its no longer needed. ==================== Signed-off-by: David S. Miller commit 4a98795bc8ea148b1ebbbf001283e06430cffe36 Author: Yuval Mintz Date: Thu Dec 14 15:54:31 2017 +0200 pkt_sched: Remove TC_RED_OFFLOADED from uapi Following the previous patch, RED is now using the new uniform uapi for indicating it's offloaded. As a result, TC_RED_OFFLOADED is no longer utilized by kernel and can be removed [as it's still not part of any stable release]. Fixes: 602f3baf2218 ("net_sch: red: Add offload ability to RED qdisc") Signed-off-by: Yuval Mintz Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/uapi/linux/pkt_sched.h | 1 - 1 file changed, 1 deletion(-) commit 428a68af3a7c3a3380ff1f750a24d213f370f89f Author: Yuval Mintz Date: Thu Dec 14 15:54:30 2017 +0200 net: sched: Move to new offload indication in RED Let RED utilize the new internal flag, TCQ_F_OFFLOADED, to mark a given qdisc as offloaded instead of using a dedicated indication. Also, change internal logic into looking at said flag when possible. Fixes: 602f3baf2218 ("net_sch: red: Add offload ability to RED qdisc") Signed-off-by: Yuval Mintz Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/sch_red.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 7a4fa29106d9a38ef005f5ab15d493c259f269c0 Author: Yuval Mintz Date: Thu Dec 14 15:54:29 2017 +0200 net: sched: Add TCA_HW_OFFLOAD Qdiscs can be offloaded to HW, but current implementation isn't uniform. Instead, qdiscs either pass information about offload status via their TCA_OPTIONS or omit it altogether. Introduce a new attribute - TCA_HW_OFFLOAD that would form a uniform uAPI for the offloading status of qdiscs. Signed-off-by: Yuval Mintz Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/net/sch_generic.h | 1 + include/uapi/linux/rtnetlink.h | 1 + net/sched/sch_api.c | 2 ++ 3 files changed, 4 insertions(+) commit 0a0606970fa882c504a87c45407559595ef5a134 Merge: 35b99df d4c242d Author: David S. Miller Date: Fri Dec 15 12:46:43 2017 -0500 Merge branch 'aquantia-fixes' Igor Russkikh says: ==================== net: aquantia: Atlantic driver 12/2017 updates The patchset contains important hardware fix for machines with large MRRS and couple of improvement in stats and capabilities reporting patch v3: - Fixed patch #7 after Andrew's finding. NIC level stats actually have to be cleaned only on hw struct creation (and this is done in kzalloc). On each hwinit we only have to reset link state to make sure hw stats update will not increment nic stats during init. patch v2: - split into more detailed commits Comment from David on wrong defines case will be submitted separately later ==================== Signed-off-by: David S. Miller commit d4c242d4ba5730b62579969804cd8fcf58b9c84f Author: Igor Russkikh Date: Thu Dec 14 12:34:48 2017 +0300 net: aquantia: Increment driver version Add a suffix to distinguish kernel mainline version and aquantia releases Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_cfg.h | 3 ++- drivers/net/ethernet/aquantia/atlantic/ver.h | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit 98bc036de40489416d61ab175bb417c094e7783c Author: Igor Russkikh Date: Thu Dec 14 12:34:47 2017 +0300 net: aquantia: Fix typo in ethtool statistics names Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit f3e2778429c2ad8555e888858e0f0e98c86c4b0f Author: Igor Russkikh Date: Thu Dec 14 12:34:46 2017 +0300 net: aquantia: Update hw counters on hw init On very first start we should read out current HW counter values to make diff based calculations later. This also should be done each time NIC gets down/up or wakes up after sleep state. We reset link state explicitly to prevent diffs from being summed this first time. Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 4 ++++ drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 4 ++++ 2 files changed, 8 insertions(+) commit fdb4a0830e74acfbe84d4d4e6772ea09c96786ad Author: Igor Russkikh Date: Thu Dec 14 12:34:45 2017 +0300 net: aquantia: Improve link state and statistics check interval callback Reduce timeout from 2 secs to 1 sec. If link is down, reduce it to 500msec. This speeds up link detection. Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_cfg.h | 2 +- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit 45cc1c7ad47c4d166d15c7bce449d2de4daef0c5 Author: Igor Russkikh Date: Thu Dec 14 12:34:44 2017 +0300 net: aquantia: Fill in multicast counter in ndev stats from hardware This metric comes from HW and is also diff-calculated, like other counters Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 1 + 1 file changed, 1 insertion(+) commit 9f8a2203a542f5f3cdeb17f40250c49bb87aa7e3 Author: Igor Russkikh Date: Thu Dec 14 12:34:43 2017 +0300 net: aquantia: Fill ndev stat couters from hardware Originally they were filled from ring sw counters. These sometimes incorrectly calculate byte and packet amounts when using LRO/LSO and jumboframes. Filling ndev counters from hardware makes them precise. Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 32 ++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit be08d839d9ef1c9b0e4ed809ec852ff100f9970d Author: Igor Russkikh Date: Thu Dec 14 12:34:42 2017 +0300 net: aquantia: Extend stat counters to 64bit values Device hardware provides only 32bit counters. Using these directly causes byte counters to overflow soon. A separate nic level structure with 64 bit counters is now used to collect incrementally all the stats and report these counters to ethtool stats and ndev stats. Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 25 ++++++- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 35 ++++++++-- .../aquantia/atlantic/hw_atl/hw_atl_utils.c | 80 +++++++--------------- .../aquantia/atlantic/hw_atl/hw_atl_utils.h | 6 +- 4 files changed, 79 insertions(+), 67 deletions(-) commit 1e366161510f266516107a69db91f1f2edaea11c Author: Igor Russkikh Date: Thu Dec 14 12:34:41 2017 +0300 net: aquantia: Fix hardware DMA stream overload on large MRRS Systems with large MRRS on device (2K, 4K) with high data rates and/or large MTU, atlantic observes DMA packet buffer overflow. On some systems that causes PCIe transaction errors, hardware NMIs or datapath freeze. This patch 1) Limits MRRS from device side to 2K (thats maximum our hardware supports) 2) Limit maximum size of outstanding TX DMA data read requests. This makes hardware buffers running fine. Signed-off-by: Pavel Belous Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 12 ++++++++++++ .../ethernet/aquantia/atlantic/hw_atl/hw_atl_llh_internal.h | 6 ++++++ 2 files changed, 18 insertions(+) commit e4d02ca04c6d48ab2226342a1c4ed54f1dbb72bd Author: Igor Russkikh Date: Thu Dec 14 12:34:40 2017 +0300 net: aquantia: Fix actual speed capabilities reporting Different hardware device Ids correspond to different maximum speed available. Extra checks were added for devices D108 and D109 to remove unsupported speeds from these device capabilities list. Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 4 +++- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 7 ++++--- drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 2 +- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 5 +++-- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 13 ++++++++++++- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 13 ++++++++++++- 6 files changed, 35 insertions(+), 9 deletions(-) commit c1b08ebe5003ae291470cb6e26923628ab19606f Merge: 2d17d8d 87ab819 Author: Alexei Starovoitov Date: Fri Dec 15 09:19:36 2017 -0800 Merge branch 'bpf-jit-fixes' Daniel Borkmann says: ==================== Two fixes that deal with buggy usage of bpf_helper_changes_pkt_data() in the sense that they also reload cached skb data when there's no skb context but xdp one, for example. A fix where skb meta data is reloaded out of the wrong register on helper call, rest is test cases and making sure on verifier side that there's always the guarantee that ctx sits in r1. Thanks! ==================== Signed-off-by: Alexei Starovoitov commit 87ab8194303e73af2898e9e1c8b3b9bcfe91e7a9 Author: Daniel Borkmann Date: Thu Dec 14 21:07:27 2017 +0100 bpf: add test case for ld_abs and helper changing pkt data Add a test that i) uses LD_ABS, ii) zeroing R6 before call, iii) calls a helper that triggers reload of cached skb data, iv) uses LD_ABS again. It's added for test_bpf in order to do runtime testing after JITing as well as test_verifier to test that the sequence is allowed. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov lib/test_bpf.c | 43 +++++++++++++++++++++++++++++ tools/testing/selftests/bpf/test_verifier.c | 24 ++++++++++++++++ 2 files changed, 67 insertions(+) commit 07aee94394547721ac168cbf4e1c09c14a5fe671 Author: Daniel Borkmann Date: Thu Dec 14 21:07:26 2017 +0100 bpf, sparc: fix usage of wrong reg for load_skb_regs after call When LD_ABS/IND is used in the program, and we have a BPF helper call that changes packet data (bpf_helper_changes_pkt_data() returns true), then in case of sparc JIT, we try to reload cached skb data from bpf2sparc[BPF_REG_6]. However, there is no such guarantee or assumption that skb sits in R6 at this point, all helpers changing skb data only have a guarantee that skb sits in R1. Therefore, store BPF R1 in L7 temporarily and after procedure call use L7 to reload cached skb data. skb sitting in R6 is only true at the time when LD_ABS/IND is executed. Fixes: 7a12b5031c6b ("sparc64: Add eBPF JIT.") Signed-off-by: Daniel Borkmann Acked-by: David S. Miller Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov arch/sparc/net/bpf_jit_comp_64.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 04514d13222f2c4c91adf0ecb21004cec3388795 Author: Daniel Borkmann Date: Thu Dec 14 21:07:25 2017 +0100 bpf: guarantee r1 to be ctx in case of bpf_helper_changes_pkt_data Some JITs don't cache skb context on stack in prologue, so when LD_ABS/IND is used and helper calls yield bpf_helper_changes_pkt_data() as true, then they temporarily save/restore skb pointer. However, the assumption that skb always has to be in r1 is a bit of a gamble. Right now it turned out to be true for all helpers listed in bpf_helper_changes_pkt_data(), but lets enforce that from verifier side, so that we make this a guarantee and bail out if the func proto is misconfigured in future helpers. In case of BPF helper calls from cBPF, bpf_helper_changes_pkt_data() is completely unrelevant here (since cBPF is context read-only) and therefore always false. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov kernel/bpf/verifier.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 87338c8e2cbb317b5f757e6172f94e2e3799cd20 Author: Daniel Borkmann Date: Thu Dec 14 21:07:24 2017 +0100 bpf, ppc64: do not reload skb pointers in non-skb context The assumption of unconditionally reloading skb pointers on BPF helper calls where bpf_helper_changes_pkt_data() holds true is wrong. There can be different contexts where the helper would enforce a reload such as in case of XDP. Here, we do have a struct xdp_buff instead of struct sk_buff as context, thus this will access garbage. JITs only ever need to deal with cached skb pointer reload when ld_abs/ind was seen, therefore guard the reload behind SEEN_SKB. Fixes: 156d0e290e96 ("powerpc/ebpf/jit: Implement JIT compiler for extended BPF") Signed-off-by: Daniel Borkmann Reviewed-by: Naveen N. Rao Acked-by: Alexei Starovoitov Tested-by: Sandipan Das Signed-off-by: Alexei Starovoitov arch/powerpc/net/bpf_jit_comp64.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6d59b7dbf72ed20d0138e2f9b75ca3d4a9d4faca Author: Daniel Borkmann Date: Thu Dec 14 21:07:23 2017 +0100 bpf, s390x: do not reload skb pointers in non-skb context The assumption of unconditionally reloading skb pointers on BPF helper calls where bpf_helper_changes_pkt_data() holds true is wrong. There can be different contexts where the BPF helper would enforce a reload such as in case of XDP. Here, we do have a struct xdp_buff instead of struct sk_buff as context, thus this will access garbage. JITs only ever need to deal with cached skb pointer reload when ld_abs/ind was seen, therefore guard the reload behind SEEN_SKB only. Tested on s390x. Fixes: 9db7f2b81880 ("s390/bpf: recache skb->data/hlen for skb_vlan_push/pop") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Cc: Michael Holzheu Signed-off-by: Alexei Starovoitov arch/s390/net/bpf_jit_comp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 35b99dffc3f710cafceee6c8c6ac6a98eb2cb4bf Author: Willem de Bruijn Date: Wed Dec 13 14:41:06 2017 -0500 sock: free skb in skb_complete_tx_timestamp on error skb_complete_tx_timestamp must ingest the skb it is passed. Call kfree_skb if the skb cannot be enqueued. Fixes: b245be1f4db1 ("net-timestamp: no-payload only sysctl") Fixes: 9ac25fc06375 ("net: fix socket refcounting in skb_complete_tx_timestamp()") Reported-by: Richard Cochran Signed-off-by: Willem de Bruijn Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/core/skbuff.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d9356edc44c82b5d0bcda281476c7431a9c7bfca Merge: 0f546ff 02f510f Author: David S. Miller Date: Fri Dec 15 11:29:44 2017 -0500 Merge branch 's390-fixes' Julian Wiedmann says: ==================== s390/qeth: fixes 2017-12-13 some more patches for 4.15, that fix multiple issues with IP Takeover configuration in qeth. Please queue them up for stable kernels as well (4.9 and newer). ==================== Signed-off-by: David S. Miller commit 02f510f326501470348a5df341e8232c3497bbbb Author: Julian Wiedmann Date: Wed Dec 13 18:56:32 2017 +0100 s390/qeth: update takeover IPs after configuration change Any modification to the takeover IP-ranges requires that we re-evaluate which IP addresses are takeover-eligible. Otherwise we might do takeover for some addresses when we no longer should, or vice-versa. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 4 +-- drivers/s390/net/qeth_core_main.c | 4 +-- drivers/s390/net/qeth_l3.h | 2 +- drivers/s390/net/qeth_l3_main.c | 31 +++++++++++++++++-- drivers/s390/net/qeth_l3_sys.c | 63 +++++++++++++++++++++------------------ 5 files changed, 67 insertions(+), 37 deletions(-) commit 8a03a3692b100d84785ee7a834e9215e304c9e00 Author: Julian Wiedmann Date: Wed Dec 13 18:56:31 2017 +0100 s390/qeth: lock IP table while applying takeover changes Modifying the flags of an IP addr object needs to be protected against eg. concurrent removal of the same object from the IP table. Fixes: 5f78e29ceebf ("qeth: optimize IP handling in rx_mode callback") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l3_sys.c | 2 ++ 1 file changed, 2 insertions(+) commit b22d73d6689fd902a66c08ebe71ab2f3b351e22f Author: Julian Wiedmann Date: Wed Dec 13 18:56:30 2017 +0100 s390/qeth: don't apply takeover changes to RXIP When takeover is switched off, current code clears the 'TAKEOVER' flag on all IPs. But the flag is also used for RXIP addresses, and those should not be affected by the takeover mode. Fix the behaviour by consistenly applying takover logic to NORMAL addresses only. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l3_main.c | 5 +++-- drivers/s390/net/qeth_l3_sys.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 7fbd9493f0eeae8cef58300505a9ef5c8fce6313 Author: Julian Wiedmann Date: Wed Dec 13 18:56:29 2017 +0100 s390/qeth: apply takeover changes when mode is toggled Just as for an explicit enable/disable, toggling the takeover mode also requires that the IP addresses get updated. Otherwise all IPs that were added to the table before the mode-toggle, get registered with the old settings. 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 | 2 +- drivers/s390/net/qeth_l3_sys.c | 35 +++++++++++++++++------------------ 3 files changed, 19 insertions(+), 20 deletions(-) commit a4544831370618cb3627e27ffcc27d1cc857868f Author: Will Deacon Date: Fri Dec 15 16:07:22 2017 +0000 arm64: fpsimd: Fix copying of FP state from signal frame into task struct Commit 9de52a755cfb6da5 ("arm64: fpsimd: Fix failure to restore FPSIMD state after signals") fixed an issue reported in our FPSIMD signal restore code but inadvertently introduced another issue which tends to manifest as random SEGVs in userspace. The problem is that when we copy the struct fpsimd_state from the kernel stack (populated from the signal frame) into the struct held in the current thread_struct, we blindly copy uninitialised stack into the "cpu" field, which means that context-switching of the FP registers is no longer reliable. This patch fixes the problem by copying only the user_fpsimd member of struct fpsimd_state. We should really rework the function prototypes to take struct user_fpsimd_state * instead, but let's just get this fixed for now. Cc: Dave Martin Fixes: 9de52a755cfb6da5 ("arm64: fpsimd: Fix failure to restore FPSIMD state after signals") Reported-by: Geert Uytterhoeven Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f546ffcd03b827a08832fac5611df5dc508e225 Merge: fccff08 5ba7dcf Author: David S. Miller Date: Fri Dec 15 11:02:11 2017 -0500 Merge tag 'batadv-net-for-davem-20171215' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are some batman-adv bugfixes: - Initialize the fragment headers, by Sven Eckelmann - Fix a NULL check in BATMAN V, by Sven Eckelmann - Fix kernel doc for the time_setup() change, by Sven Eckelmann - Use the right lock in BATMAN IV OGM Update, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit c739f930be1dd5fd949030e3475a884fe06dae9b Author: Andy Lutomirski Date: Tue Dec 12 07:56:36 2017 -0800 x86/espfix/64: Fix espfix double-fault handling on 5-level systems Using PGDIR_SHIFT to identify espfix64 addresses on 5-level systems was wrong, and it resulted in panics due to unhandled double faults. Use P4D_SHIFT instead, which is correct on 4-level and 5-level machines. This fixes a panic when running x86 selftests on 5-level machines. Signed-off-by: Andy Lutomirski Acked-by: Kirill A. Shutemov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: David Laight Cc: Kees Cook Cc: Kirill A. Shutemov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: stable@vger.kernel.org Fixes: 1d33b219563f ("x86/espfix: Add support for 5-level paging") Link: http://lkml.kernel.org/r/24c898b4f44fdf8c22d93703850fb384ef87cfdc.1513035461.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fccff0862838908d21eaf956d57e09c6c189f7c5 Author: Yuval Mintz Date: Fri Dec 15 08:44:21 2017 +0100 mlxsw: spectrum: Disable MAC learning for ovs port Learning is currently enabled for ports which are OVS slaves - even though OVS doesn't need this indication. Since we're not associating a fid with the port, HW would continuously notify driver of learned [& aged] MACs which would be logged as errors. Fixes: 2b94e58df58c ("mlxsw: spectrum: Allow ports to work under OVS master") Signed-off-by: Yuval Mintz Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit f73c52a5bcd1710994e53fbccc378c42b97a06b6 Author: Steven Rostedt Date: Sat Dec 2 13:04:54 2017 -0500 sched/rt: Do not pull from current CPU if only one CPU to pull Daniel Wagner reported a crash on the BeagleBone Black SoC. This is a single CPU architecture, and does not have a functional arch_send_call_function_single_ipi() implementation which can crash the kernel if that is called. As it only has one CPU, it shouldn't be called, but if the kernel is compiled for SMP, the push/pull RT scheduling logic now calls it for irq_work if the one CPU is overloaded, it can use that function to call itself and crash the kernel. Ideally, we should disable the SCHED_FEAT(RT_PUSH_IPI) if the system only has a single CPU. But SCHED_FEAT is a constant if sched debugging is turned off. Another fix can also be used, and this should also help with normal SMP machines. That is, do not initiate the pull code if there's only one RT overloaded CPU, and that CPU happens to be the current CPU that is scheduling in a lower priority task. Even on a system with many CPUs, if there's many RT tasks waiting to run on a single CPU, and that CPU schedules in another RT task of lower priority, it will initiate the PULL logic in case there's a higher priority RT task on another CPU that is waiting to run. But if there is no other CPU with waiting RT tasks, it will initiate the RT pull logic on itself (as it still has RT tasks waiting to run). This is a wasted effort. Not only does this help with SMP code where the current CPU is the only one with RT overloaded tasks, it should also solve the issue that Daniel encountered, because it will prevent the PULL logic from executing, as there's only one CPU on the system, and the check added here will cause it to exit the RT pull code. Reported-by: Daniel Wagner Signed-off-by: Steven Rostedt (VMware) Acked-by: Peter Zijlstra Cc: Linus Torvalds Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Cc: linux-rt-users Cc: stable@vger.kernel.org Fixes: 4bdced5c9 ("sched/rt: Simplify the IPI based RT balancing logic") Link: http://lkml.kernel.org/r/20171202130454.4cbbfe8d@vmware.local.home Signed-off-by: Ingo Molnar kernel/sched/rt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 654b4a4acd8b52a4272114b95896e9a10d382cde Author: Keith Busch Date: Thu Dec 14 11:20:32 2017 -0700 nvme: setup streams after initializing namespace head Fixes a NULL pointer dereference. Reported-by: Arnav Dawn Signed-off-by: Keith Busch Reviewed-by: Martin K. Petersen Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 249159c5f15812140fa216f9997d799ac0023a1f Author: Keith Busch Date: Thu Dec 14 11:20:14 2017 -0700 nvme: check hw sectors before setting chunk sectors Some devices with IDs matching the "stripe" quirk don't actually have this quirk, and don't have an MDTS value. When MDTS is not set, the driver sets the max sectors to UINT_MAX, which is not a power of 2, hitting a BUG_ON from blk_queue_chunk_sectors. This patch skips setting chunk sectors for such devices. Signed-off-by: Keith Busch Reviewed-by: Martin K. Petersen Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bd9f5d65769b9fe5e72110d4cbc9097b53b01613 Author: Ming Lei Date: Wed Dec 6 18:30:09 2017 +0800 nvme: call blk_integrity_unregister after queue is cleaned up During IO complete path, bio_integrity_advance() is often called, and blk_get_integrity() is called in this function. But in blk_integrity_unregister, the buffer pointed by queue->integrity is cleared, and blk_integrity->profile becomes NULL, then blk_get_integrity returns NULL, and causes kernel oops[1] finally. This patch fixes this issue by calling blk_integrity_unregister() after blk_cleanup_queue(). [1] kernel oops log [ 122.068007] BUG: unable to handle kernel NULL pointer dereference at 000000000000000a [ 122.076760] IP: bio_integrity_advance+0x3d/0xf0 [ 122.081815] PGD 0 P4D 0 [ 122.084641] Oops: 0000 [#1] SMP [ 122.088142] Modules linked in: sunrpc ipmi_ssif intel_rapl vfat fat x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass mei_me ipmi_si crct10dif_pclmul crc32_pclmul sg mei ghash_clmulni_intel mxm_wmi ipmi_devintf iTCO_wdt intel_cstate intel_uncore pcspkr intel_rapl_perf iTCO_vendor_support dcdbas ipmi_msghandler lpc_ich acpi_power_meter shpchp wmi dm_multipath ip_tables xfs libcrc32c sd_mod mgag200 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm crc32c_intel ahci nvme tg3 libahci nvme_core i2c_core libata ptp megaraid_sas pps_core dm_mirror dm_region_hash dm_log dm_mod [ 122.149577] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.14.0-11.el7a.x86_64 #1 [ 122.157635] Hardware name: Dell Inc. PowerEdge R730xd/072T6D, BIOS 2.5.5 08/16/2017 [ 122.166179] task: ffff8802ff1e8000 task.stack: ffffc90000130000 [ 122.172785] RIP: 0010:bio_integrity_advance+0x3d/0xf0 [ 122.178419] RSP: 0018:ffff88047fc03d70 EFLAGS: 00010006 [ 122.184248] RAX: ffff880473b08000 RBX: ffff880458c71a80 RCX: ffff880473b08248 [ 122.192209] RDX: 0000000000000000 RSI: 000000000000003c RDI: ffffc900038d7ba0 [ 122.200171] RBP: ffff88047fc03d78 R08: 0000000000000001 R09: ffffffffa01a78b5 [ 122.208132] R10: ffff88047fc1eda0 R11: ffff880458c71ad0 R12: 0000000000007800 [ 122.216094] R13: 0000000000000000 R14: 0000000000007800 R15: ffff880473a39b40 [ 122.224056] FS: 0000000000000000(0000) GS:ffff88047fc00000(0000) knlGS:0000000000000000 [ 122.233083] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 122.239494] CR2: 000000000000000a CR3: 0000000001c09002 CR4: 00000000001606e0 [ 122.247455] Call Trace: [ 122.250183] [ 122.252429] bio_advance+0x28/0xf0 [ 122.256217] blk_update_request+0xa1/0x310 [ 122.260778] blk_mq_end_request+0x1e/0x70 [ 122.265256] nvme_complete_rq+0x1c/0xd0 [nvme_core] [ 122.270699] nvme_pci_complete_rq+0x85/0x130 [nvme] [ 122.276140] __blk_mq_complete_request+0x8d/0x140 [ 122.281387] blk_mq_complete_request+0x16/0x20 [ 122.286345] nvme_process_cq+0xdd/0x1c0 [nvme] [ 122.291301] nvme_irq+0x23/0x50 [nvme] [ 122.295485] __handle_irq_event_percpu+0x3c/0x190 [ 122.300725] handle_irq_event_percpu+0x32/0x80 [ 122.305683] handle_irq_event+0x3b/0x60 [ 122.309964] handle_edge_irq+0x8f/0x190 [ 122.314247] handle_irq+0xab/0x120 [ 122.318043] do_IRQ+0x48/0xd0 [ 122.321355] common_interrupt+0x9d/0x9d [ 122.325625] [ 122.327967] RIP: 0010:cpuidle_enter_state+0xe9/0x280 [ 122.333504] RSP: 0018:ffffc90000133e68 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff35 [ 122.341952] RAX: ffff88047fc1b900 RBX: ffff88047fc24400 RCX: 000000000000001f [ 122.349913] RDX: 0000000000000000 RSI: fffffcf2e6007295 RDI: 0000000000000000 [ 122.357874] RBP: ffffc90000133ea0 R08: 000000000000062e R09: 0000000000000253 [ 122.365836] R10: 0000000000000225 R11: 0000000000000018 R12: 0000000000000002 [ 122.373797] R13: 0000000000000001 R14: ffff88047fc24400 R15: 0000001c6bd1d263 [ 122.381762] ? cpuidle_enter_state+0xc5/0x280 [ 122.386623] cpuidle_enter+0x17/0x20 [ 122.390611] call_cpuidle+0x23/0x40 [ 122.394501] do_idle+0x17e/0x1f0 [ 122.398101] cpu_startup_entry+0x73/0x80 [ 122.402478] start_secondary+0x178/0x1c0 [ 122.406854] secondary_startup_64+0xa5/0xa5 [ 122.411520] Code: 48 8b 5f 68 48 8b 47 08 31 d2 4c 8b 5b 48 48 8b 80 d0 03 00 00 48 83 b8 48 02 00 00 00 48 8d 88 48 02 00 00 48 0f 45 d1 c1 ee 09 <0f> b6 4a 0a 0f b6 52 09 89 f0 48 01 73 08 83 e9 09 d3 e8 0f af [ 122.432604] RIP: bio_integrity_advance+0x3d/0xf0 RSP: ffff88047fc03d70 [ 122.439888] CR2: 000000000000000a Reported-by: Zhang Yi Tested-by: Zhang Yi Signed-off-by: Ming Lei Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4596e752db02d47038cd7c965419789ab15d1985 Author: James Smart Date: Wed Nov 29 15:11:37 2017 -0800 nvme-fc: remove double put reference if admin connect fails There are two put references in the failure case of initial create_association. The first put actually frees the controller, thus the second put references freed memory. Remove the unnecessary 2nd put. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 1 - 1 file changed, 1 deletion(-) commit b224f6134d72e3493a023b5bea917f9a6beea0c8 Author: David Disseldorp Date: Fri Nov 24 16:30:53 2017 +0100 nvme: set discard_alignment to zero Similar to 7c084289795b ("rbd: set discard_alignment to zero"), NVMe devices are currently incorrectly initialised with the block queue discard_alignment set to the NVMe stream alignment. As per Documentation/ABI/testing/sysfs-block: The discard_alignment parameter indicates how many bytes the beginning of the device is offset from the internal allocation unit's natural alignment. Correcting the discard_alignment parameter to zero has no effect on how discard requests are propagated through the block layer - @alignment in __blkdev_issue_discard() remains zero. However, it does fix other consumers, such as LIO's Block Limits VPD response. Signed-off-by: David Disseldorp Reviewed-by: Jens Axboe Reviewed-by: Martin K. Petersen Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f37e797547cca9d14fe1f0f43f5c89b261ff0b0 Author: Martin Schwidefsky Date: Fri Dec 15 14:16:04 2017 +0100 s390: fix preemption race in disable_sacf_uaccess With CONFIG_PREEMPT=y there is a possible race in disable_sacf_uaccess. The new set_fs value needs to be stored the the task structure first, the control register update needs to be second. Otherwise a preemptive schedule may interrupt the code right after the control register update has been done and the next time the task is scheduled we get an incorrect value in the control register due to the old set_fs setting. Fixes: 0aaba41b58 ("s390: remove all code using the access register mode") Signed-off-by: Martin Schwidefsky arch/s390/lib/uaccess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d17d8d79e77ff3f1b35b87522fc72fa562260ff Author: Song Liu Date: Thu Dec 14 17:17:56 2017 -0800 xdp: linearize skb in netif_receive_generic_xdp() In netif_receive_generic_xdp(), it is necessary to linearize all nonlinear skb. However, in current implementation, skb with troom <= 0 are not linearized. This patch fixes this by calling skb_linearize() for all nonlinear skb. Fixes: de8f3a83b0a0 ("bpf: add meta pointer for direct access") Signed-off-by: Song Liu Acked-by: Martin KaFai Lau Cc: Daniel Borkmann Cc: Alexei Starovoitov Signed-off-by: Daniel Borkmann net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50034ed49645463a16327cad05694e201e6b4126 Author: Arnd Bergmann Date: Fri Dec 15 05:09:47 2017 -0800 cgroup: use strlcpy() instead of strscpy() to avoid spurious warning As long as cft->name is guaranteed to be NUL-terminated, using strlcpy() would work just as well and avoid that warning, so the change below could be folded into that commit. Signed-off-by: Arnd Bergmann Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 643e345c95f0b4a4082c60755e06e3e635658da6 Author: Ingo Molnar Date: Fri Dec 15 13:47:51 2017 +0100 tools/headers: Synchronize kernel <-> tooling headers Two kernel headers got modified recently, which are used by tooling as well: tools/include/uapi/linux/kvm.h arch/x86/include/asm/cpufeatures.h None of those changes have an effect on tooling, so do a plain copy. Cc: Arnaldo Carvalho de Melo Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Namhyung Kim Cc: Jiri Olsa Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar tools/arch/x86/include/asm/cpufeatures.h | 1 + tools/include/uapi/linux/kvm.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 215eada73e77ede7e15531d99f712481ddd429be Author: Ingo Molnar Date: Fri Dec 15 13:36:56 2017 +0100 objtool: Resync objtool's instruction decoder source code copy with the kernel's latest version This fixes the following warning: warning: objtool: x86 instruction decoder differs from kernel Note that there are cleanups queued up for v4.16 that will make this warning more informative and will make the syncing easier as well. Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar tools/objtool/arch/x86/insn/inat.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f5b5fab1780c98b74526dbac527574bd02dc16f8 Author: Randy Dunlap Date: Mon Dec 11 10:38:36 2017 -0800 x86/decoder: Fix and update the opcodes map Update x86-opcode-map.txt based on the October 2017 Intel SDM publication. Fix INVPID to INVVPID. Add UD0 and UD1 instruction opcodes. Also sync the objtool and perf tooling copies of this file. Signed-off-by: Randy Dunlap Acked-by: Masami Hiramatsu Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/aac062d7-c0f6-96e3-5c92-ed299e2bd3da@infradead.org Signed-off-by: Ingo Molnar arch/x86/lib/x86-opcode-map.txt | 13 +++++++++++-- tools/objtool/arch/x86/insn/x86-opcode-map.txt | 15 ++++++++++++--- tools/perf/util/intel-pt-decoder/x86-opcode-map.txt | 15 ++++++++++++--- 3 files changed, 35 insertions(+), 8 deletions(-) commit 7ee18d677989e99635027cee04c878950e0752b9 Author: Andy Lutomirski Date: Thu Dec 14 13:19:07 2017 -0800 x86/power: Make restore_processor_context() sane My previous attempt to fix a couple of bugs in __restore_processor_context(): 5b06bbcfc2c6 ("x86/power: Fix some ordering bugs in __restore_processor_context()") ... introduced yet another bug, breaking suspend-resume. Rather than trying to come up with a minimal fix, let's try to clean it up for real. This patch fixes quite a few things: - The old code saved a nonsensical subset of segment registers. The only registers that need to be saved are those that contain userspace state or those that can't be trivially restored without percpu access working. (On x86_32, we can restore percpu access by writing __KERNEL_PERCPU to %fs. On x86_64, it's easier to save and restore the kernel's GSBASE.) With this patch, we restore hardcoded values to the kernel state where applicable and explicitly restore the user state after fixing all the descriptor tables. - We used to use an unholy mix of inline asm and C helpers for segment register access. Let's get rid of the inline asm. This fixes the reported s2ram hangs and make the code all around more logical. Analyzed-by: Linus Torvalds Reported-by: Jarkko Nikula Reported-by: Pavel Machek Tested-by: Jarkko Nikula Tested-by: Pavel Machek Signed-off-by: Andy Lutomirski Acked-by: Rafael J. Wysocki Acked-by: Thomas Gleixner Cc: Borislav Petkov Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Zhang Rui Fixes: 5b06bbcfc2c6 ("x86/power: Fix some ordering bugs in __restore_processor_context()") Link: http://lkml.kernel.org/r/398ee68e5c0f766425a7b746becfc810840770ff.1513286253.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/suspend_32.h | 8 +++- arch/x86/include/asm/suspend_64.h | 16 +++++++- arch/x86/power/cpu.c | 79 ++++++++++++++++++++------------------- 3 files changed, 62 insertions(+), 41 deletions(-) commit 896c80bef4d3b357814a476663158aaf669d0fb3 Author: Andy Lutomirski Date: Thu Dec 14 13:19:06 2017 -0800 x86/power/32: Move SYSENTER MSR restoration to fix_processor_context() x86_64 restores system call MSRs in fix_processor_context(), and x86_32 restored them along with segment registers. The 64-bit variant makes more sense, so move the 32-bit code to match the 64-bit code. No side effects are expected to runtime behavior. Tested-by: Jarkko Nikula Signed-off-by: Andy Lutomirski Acked-by: Rafael J. Wysocki Acked-by: Thomas Gleixner Cc: Borislav Petkov Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Pavel Machek Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Zhang Rui Link: http://lkml.kernel.org/r/65158f8d7ee64dd6bbc6c1c83b3b34aaa854e3ae.1513286253.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/power/cpu.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 090edbe23ff57940fca7f57d9165ce57a826bd7a Author: Andy Lutomirski Date: Thu Dec 14 13:19:05 2017 -0800 x86/power/64: Use struct desc_ptr for the IDT in struct saved_context x86_64's saved_context nonsensically used separate idt_limit and idt_base fields and then cast &idt_limit to struct desc_ptr *. This was correct (with -fno-strict-aliasing), but it's confusing, served no purpose, and required #ifdeffery. Simplify this by using struct desc_ptr directly. No change in functionality. Tested-by: Jarkko Nikula Signed-off-by: Andy Lutomirski Acked-by: Rafael J. Wysocki Acked-by: Thomas Gleixner Cc: Borislav Petkov Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Pavel Machek Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Zhang Rui Link: http://lkml.kernel.org/r/967909ce38d341b01d45eff53e278e2728a3a93a.1513286253.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/suspend_64.h | 3 +-- arch/x86/power/cpu.c | 11 +---------- 2 files changed, 2 insertions(+), 12 deletions(-) commit 2b88212c4cc67ff33dec5bb4d690044b97a5f979 Author: Arnd Bergmann Date: Thu Nov 2 12:56:36 2017 +0100 phy: rcar-gen3-usb2: select USB_COMMON When USB is disabled, we get a link error for this driver because of the added OTG support drivers/phy/renesas/phy-rcar-gen3-usb2.o: In function `rcar_gen3_phy_usb2_probe': phy-rcar-gen3-usb2.c:(.text+0x250): undefined reference to `of_usb_get_dr_mode_by_phy' Other phy drivers select USB_COMMON for this, so let's do the same here. Fixes: 7e0540f41332 ("phy: rcar-gen3-usb2: check dr_mode for otg mode") Signed-off-by: Arnd Bergmann Acked-by: Yoshihiro Shimoda Signed-off-by: Kishon Vijay Abraham I drivers/phy/renesas/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 3cb0ab6e008f2a9ffe2d1be4246984003caed7e2 Author: Chris Zhong Date: Thu Sep 8 10:38:11 2016 -0700 phy: rockchip-typec: add pm_runtime_disable in err case Add pm_runtime_disable in err case to make the pm_runtime_enable/disable is invoked balanced. Signed-off-by: Chris Zhong Reviewed-by: Brian Norris Reviewed-by: Douglas Anderson Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-typec.c | 2 ++ 1 file changed, 2 insertions(+) commit e796cc6a3a9186c92092e2f5929cf8f65b56cf01 Author: Arvind Yadav Date: Fri Nov 17 16:55:35 2017 +0530 phy: cpcap-usb: Fix platform_get_irq_byname's error checking. The platform_get_irq_byname() function returns negative if an error occurs. zero or positive number on success. platform_get_irq_byname() error checking for zero is not correct. Fixes: 6d6ce40f63af ("phy: cpcap-usb: Add CPCAP PMIC USB support") Signed-off-by: Arvind Yadav Reviewed-by: Sebastian Reichel Acked-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I drivers/phy/motorola/phy-cpcap-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 046046737bd35bed047460f080ea47e186be731e Author: Johan Hovold Date: Wed Nov 15 10:43:16 2017 +0100 phy: tegra: fix device-tree node lookups Fix child-node lookups during probe, which ended up searching the whole device tree depth-first starting at the parents rather than just matching on their children. To make things worse, some parent nodes could end up being being prematurely freed (by tegra_xusb_pad_register()) as of_find_node_by_name() drops a reference to its first argument. Fixes: 53d2a715c240 ("phy: Add Tegra XUSB pad controller support") Cc: stable # 4.7 Cc: Thierry Reding Signed-off-by: Johan Hovold Signed-off-by: Kishon Vijay Abraham I drivers/phy/tegra/xusb.c | 58 ++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 29 deletions(-) commit cef31d9af908243421258f1df35a4a644604efbe Author: Thomas Gleixner Date: Fri Dec 15 10:32:03 2017 +0100 posix-timer: Properly check sigevent->sigev_notify timer_create() specifies via sigevent->sigev_notify the signal delivery for the new timer. The valid modes are SIGEV_NONE, SIGEV_SIGNAL, SIGEV_THREAD and (SIGEV_SIGNAL | SIGEV_THREAD_ID). The sanity check in good_sigevent() is only checking the valid combination for the SIGEV_THREAD_ID bit, i.e. SIGEV_SIGNAL, but if SIGEV_THREAD_ID is not set it accepts any random value. This has no real effects on the posix timer and signal delivery code, but it affects show_timer() which handles the output of /proc/$PID/timers. That function uses a string array to pretty print sigev_notify. The access to that array has no bound checks, so random sigev_notify cause access beyond the array bounds. Add proper checks for the valid notify modes and remove the SIGEV_THREAD_ID masking from various code pathes as SIGEV_NONE can never be set in combination with SIGEV_THREAD_ID. Reported-by: Eric Biggers Reported-by: Dmitry Vyukov Reported-by: Alexey Dobriyan Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: stable@vger.kernel.org kernel/time/posix-timers.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit f29810335965ac1f7bcb501ee2af5f039f792416 Author: Lan Tianyu Date: Thu Dec 14 03:01:52 2017 -0500 KVM/x86: Check input paging mode when cs.l is set Reported by syzkaller: WARNING: CPU: 0 PID: 27962 at arch/x86/kvm/emulate.c:5631 x86_emulate_insn+0x557/0x15f0 [kvm] Modules linked in: kvm_intel kvm [last unloaded: kvm] CPU: 0 PID: 27962 Comm: syz-executor Tainted: G B W 4.15.0-rc2-next-20171208+ #32 Hardware name: Intel Corporation S1200SP/S1200SP, BIOS S1200SP.86B.01.03.0006.040720161253 04/07/2016 RIP: 0010:x86_emulate_insn+0x557/0x15f0 [kvm] RSP: 0018:ffff8807234476d0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff88072d0237a0 RCX: ffffffffa0065c4d RDX: 1ffff100e5a046f9 RSI: 0000000000000003 RDI: ffff88072d0237c8 RBP: ffff880723447728 R08: ffff88072d020000 R09: ffffffffa008d240 R10: 0000000000000002 R11: ffffed00e7d87db3 R12: ffff88072d0237c8 R13: ffff88072d023870 R14: ffff88072d0238c2 R15: ffffffffa008d080 FS: 00007f8a68666700(0000) GS:ffff880802200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002009506c CR3: 000000071fec4005 CR4: 00000000003626f0 Call Trace: x86_emulate_instruction+0x3bc/0xb70 [kvm] ? reexecute_instruction.part.162+0x130/0x130 [kvm] vmx_handle_exit+0x46d/0x14f0 [kvm_intel] ? trace_event_raw_event_kvm_entry+0xe7/0x150 [kvm] ? handle_vmfunc+0x2f0/0x2f0 [kvm_intel] ? wait_lapic_expire+0x25/0x270 [kvm] vcpu_enter_guest+0x720/0x1ef0 [kvm] ... When CS.L is set, vcpu should run in the 64 bit paging mode. Current kvm set_sregs function doesn't have such check when userspace inputs sreg values. This will lead unexpected behavior. This patch is to add checks for CS.L, EFER.LME, EFER.LMA and CR4.PAE when get SREG inputs from userspace in order to avoid unexpected behavior. Suggested-by: Paolo Bonzini Reported-by: Dmitry Vyukov Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Dmitry Vyukov Cc: Jim Mattson Signed-off-by: Tianyu Lan Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 967a6a07e95c58eb9c1581d22a1d9c2d1929843f Author: Masaharu Hayakawa Date: Wed Dec 13 11:33:00 2017 +0900 mmc: renesas_sdhi: Add MODULE_LICENSE The following error occurs when loading renesas_sdhi_core.c module, so add MODULE_LICENSE("GPL v2"). renesas_sdhi_core: module license 'unspecified' taints kernel. Signed-off-by: Masaharu Hayakawa Fixes: 9d08428afb72 ("mmc: renesas-sdhi: make renesas_sdhi_sys_dmac main module file") Cc: # v4.13+ [Shimoda: Added Fixes tag and Cc to the stable ML] Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Acked-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_core.c | 3 +++ 1 file changed, 3 insertions(+) commit 92a18a657fb2e2ffbfa0659af32cc18fd2346516 Author: Reinhard Speyerer Date: Fri Dec 15 00:39:27 2017 +0100 USB: serial: qcserial: add Sierra Wireless EM7565 Sierra Wireless EM7565 devices use the QCSERIAL_SWI layout for their serial ports T: Bus=01 Lev=03 Prnt=29 Port=01 Cnt=02 Dev#= 31 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1199 ProdID=9091 Rev= 0.06 S: Manufacturer=Sierra Wireless, Incorporated S: Product=Sierra Wireless EM7565 Qualcomm Snapdragon X16 LTE-A S: SerialNumber=xxxxxxxx C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=86(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms but need sendsetup = true for the NMEA port to make it work properly. Simplify the patch compared to v1 as suggested by Bjørn Mork by taking advantage of the fact that existing devices work with sendsetup = true too. Use sendsetup = true for the NMEA interface of QCSERIAL_SWI and add DEVICE_SWI entries for the EM7565 PID 0x9091 and the EM7565 QDL PID 0x9090. Tests with several MC73xx/MC74xx/MC77xx devices have been performed in order to verify backward compatibility. Signed-off-by: Reinhard Speyerer Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/qcserial.c | 3 +++ 1 file changed, 3 insertions(+) commit 08933099e6404f588f81c2050bfec7313e06eeaf Author: Daniele Palmas Date: Thu Dec 14 16:54:45 2017 +0100 USB: serial: option: add support for Telit ME910 PID 0x1101 This patch adds support for PID 0x1101 of Telit ME910. Signed-off-by: Daniele Palmas Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2610acf46b9ed528ec2cacd717bc9d354e452b73 Author: Andreas Platschek Date: Thu Dec 14 12:50:51 2017 +0100 dmaengine: fsl-edma: disable clks on all error paths Previously enabled clks are only disabled if clk_prepare_enable() fails. However, there are other error paths were the previously enabled clocks are not disabled. To fix the problem, fsl_disable_clocks() now takes the number of clocks that shall be disabled + unprepared. For existing calls were all clocks were already successfully prepared + enabled, DMAMUX_NR is passed to disable + unprepare all clocks. In error paths were only some clocks were successfully prepared + enabled the loop counter is passed, in order to disable + unprepare all successfully prepared + enabled clocks. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Andreas Platschek Signed-off-by: Vinod Koul drivers/dma/fsl-edma.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 5771cfffdffe709ae9b403b6f80438ca40bf850e Author: Prasad B Munirathnam Date: Tue Dec 12 11:40:10 2017 -0800 scsi: aacraid: Fix I/O drop during reset "FIB_CONTEXT_FLAG_TIMEDOUT" flag is set in aac_eh_abort to indicate command timeout. Using the same flag in reset handler causes the command to time out and the I/Os were dropped. Define a new flag "FIB_CONTEXT_FLAG_EH_RESET" to make sure I/O is properly handled in eh_reset handler. [mkp: tweaked commit message] Signed-off-by: Prasad B Munirathnam Reviewed-by: Raghava Aditya Renukunta Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 1 + drivers/scsi/aacraid/linit.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 093b8886f446c9351c4de512cb1d4afe30e37f6f Author: Bart Van Assche Date: Tue Dec 12 10:23:28 2017 -0800 scsi: core: Use blist_flags_t consistently Use the type blist_flags_t for all variables that represent blacklist flags. Additionally, suppress recently introduced sparse warnings related to blacklist flags. [mkp: fixed commit id] Fixes: 5ebde4694e3b ("scsi: Use 'blist_flags_t' for scsi_devinfo flags") 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_devinfo.c | 6 ++---- drivers/scsi/scsi_scan.c | 13 +++++++------ drivers/scsi/scsi_sysfs.c | 5 +++-- drivers/scsi/scsi_transport_spi.c | 12 +++++++----- 4 files changed, 19 insertions(+), 17 deletions(-) commit 032b4cc8ff84490c4bc7c4ef8c91e6d83a637538 Merge: 0424378 3487972 Author: Linus Torvalds Date: Thu Dec 14 18:25:03 2017 -0800 Merge tag 'pm-4.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "This fixes an issue in two recent commits that may cause pm_runtime_enable() to be called for too many times for some devices during the "thaw" transition belonging to hibernation" * tag 'pm-4.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / sleep: Avoid excess pm_runtime_enable() calls in device_resume() commit 04243787812cabb57726e50d8288a3dcacf54ad2 Merge: c4f988e b00d607 Author: Linus Torvalds Date: Thu Dec 14 18:21:33 2017 -0800 Merge tag 'trace-v4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Various fix-ups: - comment fixes - build fix - better memory alloction (don't use NR_CPUS) - configuration fix - build warning fix - enhanced callback parameter (to simplify users of trace hooks) - give up on stack tracing when RCU isn't watching (it's a lost cause)" * tag 'trace-v4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Have stack trace not record if RCU is not watching tracing: Pass export pointer as argument to ->write() ring-buffer: Remove unused function __rb_data_page_index() tracing: make PREEMPTIRQ_EVENTS depend on TRACING tracing: Allocate mask_str buffer dynamically tracing: always define trace_{irq,preempt}_{enable_disable} tracing: Fix code comments in trace.c commit b00d607bb188e187c7b60074d2fa91a6f1985029 Author: Steven Rostedt (VMware) Date: Tue Dec 5 04:41:51 2017 -0500 tracing: Have stack trace not record if RCU is not watching The stack tracer records a stack dump whenever it sees a stack usage that is more than what it ever saw before. This can happen at any function that is being traced. If it happens when the CPU is going idle (or other strange locations), RCU may not be watching, and in this case, the recording of the stack trace will trigger a warning. There's been lots of efforts to make hacks to allow stack tracing to proceed even if RCU is not watching, but this only causes more issues to appear. Simply do not trace a stack if RCU is not watching. It probably isn't a bad stack anyway. Acked-by: "Paul E. McKenney" Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_stack.c | 4 ++++ 1 file changed, 4 insertions(+) commit c4f988ee51ed896f5f709ba611a18485a2204ace Merge: 18d40ea 0c31f1d Author: Linus Torvalds Date: Thu Dec 14 17:02:39 2017 -0800 Merge tag 'pci-v4.15-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - add a pci_get_domain_bus_and_slot() stub for the CONFIG_PCI=n case to avoid build breakage in the v4.16 merge window if a pci_get_bus_and_slot() -> pci_get_domain_bus_and_slot() patch gets merged before the PCI tree (Randy Dunlap) - fix an AMD boot regression in the 64bit BAR support added in v4.15 (Christian König) - fix an R-Car use-after-free that causes a crash if no PCIe card is present (Geert Uytterhoeven) * tag 'pci-v4.15-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: rcar: Fix use-after-free in probe error path x86/PCI: Only enable a 64bit BAR on single-socket AMD Family 15h x86/PCI: Fix infinite loop in search for 64bit BAR placement PCI: Add pci_get_domain_bus_and_slot() stub commit 18d40eae7fb60ab1efa2a607b4b8a2d86036876a Merge: d455df0 7c2c11b Author: Linus Torvalds Date: Thu Dec 14 16:35:20 2017 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "17 fixes" * emailed patches from Andrew Morton : arch: define weak abort() mm, oom_reaper: fix memory corruption kernel: make groups_sort calling a responsibility group_info allocators mm/frame_vector.c: release a semaphore in 'get_vaddr_frames()' tools/slabinfo-gnuplot: force to use bash shell kcov: fix comparison callback signature mm/slab.c: do not hash pointers when debugging slab mm/page_alloc.c: avoid excessive IRQ disabled times in free_unref_page_list() mm/memory.c: mark wp_huge_pmd() inline to prevent build failure scripts/faddr2line: fix CROSS_COMPILE unset error Documentation/vm/zswap.txt: update with same-value filled page feature exec: avoid gcc-8 warning for get_task_comm autofs: fix careless error in recent commit string.h: workaround for increased stack usage mm/kmemleak.c: make cond_resched() rate-limiting more efficient lib/rbtree,drm/mm: add rbtree_replace_node_cached() include/linux/idr.h: add #include commit 7c2c11b208be09c156573fc0076b7b3646e05219 Author: Sudip Mukherjee Date: Thu Dec 14 15:33:19 2017 -0800 arch: define weak abort() gcc toggle -fisolate-erroneous-paths-dereference (default at -O2 onwards) isolates faulty code paths such as null pointer access, divide by zero etc. If gcc port doesnt implement __builtin_trap, an abort() is generated which causes kernel link error. In this case, gcc is generating abort due to 'divide by zero' in lib/mpi/mpih-div.c. Currently 'frv' and 'arc' are failing. Previously other arch was also broken like m32r was fixed by commit d22e3d69ee1a ("m32r: fix build failure"). Let's define this weak function which is common for all arch and fix the problem permanently. We can even remove the arch specific 'abort' after this is done. Link: http://lkml.kernel.org/r/1513118956-8718-1-git-send-email-sudipm.mukherjee@gmail.com Signed-off-by: Sudip Mukherjee Cc: Alexey Brodkin Cc: Vineet Gupta Cc: Sudip Mukherjee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/exit.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4837fe37adff1d159904f0c013471b1ecbcb455e Author: Michal Hocko Date: Thu Dec 14 15:33:15 2017 -0800 mm, oom_reaper: fix memory corruption David Rientjes has reported the following memory corruption while the oom reaper tries to unmap the victims address space BUG: Bad page map in process oom_reaper pte:6353826300000000 pmd:00000000 addr:00007f50cab1d000 vm_flags:08100073 anon_vma:ffff9eea335603f0 mapping: (null) index:7f50cab1d file: (null) fault: (null) mmap: (null) readpage: (null) CPU: 2 PID: 1001 Comm: oom_reaper Call Trace: unmap_page_range+0x1068/0x1130 __oom_reap_task_mm+0xd5/0x16b oom_reaper+0xff/0x14c kthread+0xc1/0xe0 Tetsuo Handa has noticed that the synchronization inside exit_mmap is insufficient. We only synchronize with the oom reaper if tsk_is_oom_victim which is not true if the final __mmput is called from a different context than the oom victim exit path. This can trivially happen from context of any task which has grabbed mm reference (e.g. to read /proc// file which requires mm etc.). The race would look like this oom_reaper oom_victim task mmget_not_zero do_exit mmput __oom_reap_task_mm mmput __mmput exit_mmap remove_vma unmap_page_range Fix this issue by providing a new mm_is_oom_victim() helper which operates on the mm struct rather than a task. Any context which operates on a remote mm struct should use this helper in place of tsk_is_oom_victim. The flag is set in mark_oom_victim and never cleared so it is stable in the exit_mmap path. Debugged by Tetsuo Handa. Link: http://lkml.kernel.org/r/20171210095130.17110-1-mhocko@kernel.org Fixes: 212925802454 ("mm: oom: let oom_reap_task and exit_mmap run concurrently") Signed-off-by: Michal Hocko Reported-by: David Rientjes Acked-by: David Rientjes Cc: Tetsuo Handa Cc: Andrea Argangeli Cc: [4.14] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/oom.h | 9 +++++++++ include/linux/sched/coredump.h | 1 + mm/mmap.c | 10 +++++----- mm/oom_kill.c | 4 +++- 4 files changed, 18 insertions(+), 6 deletions(-) commit bdcf0a423ea1c40bbb40e7ee483b50fc8aa3d758 Author: Thiago Rafael Becker Date: Thu Dec 14 15:33:12 2017 -0800 kernel: make groups_sort calling a responsibility group_info allocators In testing, we found that nfsd threads may call set_groups in parallel for the same entry cached in auth.unix.gid, racing in the call of groups_sort, corrupting the groups for that entry and leading to permission denials for the client. This patch: - Make groups_sort globally visible. - Move the call to groups_sort to the modifiers of group_info - Remove the call to groups_sort from set_groups Link: http://lkml.kernel.org/r/20171211151420.18655-1-thiago.becker@gmail.com Signed-off-by: Thiago Rafael Becker Reviewed-by: Matthew Wilcox Reviewed-by: NeilBrown Acked-by: "J. Bruce Fields" Cc: Al Viro Cc: Martin Schwidefsky Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/kernel/compat_linux.c | 1 + fs/nfsd/auth.c | 3 +++ include/linux/cred.h | 1 + kernel/groups.c | 5 +++-- kernel/uid16.c | 1 + net/sunrpc/auth_gss/gss_rpc_xdr.c | 1 + net/sunrpc/auth_gss/svcauth_gss.c | 1 + net/sunrpc/svcauth_unix.c | 2 ++ 8 files changed, 13 insertions(+), 2 deletions(-) commit 1f704fd0d14043e76e80f6b8b2251b9b2cedcca6 Author: Christophe JAILLET Date: Thu Dec 14 15:33:08 2017 -0800 mm/frame_vector.c: release a semaphore in 'get_vaddr_frames()' A semaphore is acquired before this check, so we must release it before leaving. Link: http://lkml.kernel.org/r/20171211211009.4971-1-christophe.jaillet@wanadoo.fr Fixes: b7f0554a56f2 ("mm: fail get_vaddr_frames() for filesystem-dax mappings") Signed-off-by: Christophe JAILLET Acked-by: Michal Hocko Cc: Dan Williams Cc: Christian Borntraeger Cc: David Sterba Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/frame_vector.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0b265c3b3b721dca03e82719ac0e15bc2c89aa3a Author: Liu, Changcheng Date: Thu Dec 14 15:33:05 2017 -0800 tools/slabinfo-gnuplot: force to use bash shell On some linux distributions, the default link of sh is dash which deoesn't support split array like "${var//,/ }" It's better to force to use bash shell directly. Link: http://lkml.kernel.org/r/20171208093751.GA175471@sofia Signed-off-by: Liu Changcheng Reviewed-by: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/vm/slabinfo-gnuplot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 689d77f001cd22da31cc943170e1f6f2e8197035 Author: Dmitry Vyukov Date: Thu Dec 14 15:33:02 2017 -0800 kcov: fix comparison callback signature Fix a silly copy-paste bug. We truncated u32 args to u16. Link: http://lkml.kernel.org/r/20171207101134.107168-1-dvyukov@google.com Fixes: ded97d2c2b2c ("kcov: support comparison operands collection") Signed-off-by: Dmitry Vyukov Cc: syzkaller@googlegroups.com Cc: Alexander Potapenko Cc: Vegard Nossum Cc: Quentin Casasnovas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kcov.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 85c3e4a5a185f22649c6bf33bdce7bb1ac890921 Author: Geert Uytterhoeven Date: Thu Dec 14 15:32:58 2017 -0800 mm/slab.c: do not hash pointers when debugging slab If CONFIG_DEBUG_SLAB/CONFIG_DEBUG_SLAB_LEAK are enabled, the slab code prints extra debug information when e.g. corruption is detected. This includes pointers, which are not very useful when hashed. Fix this by using %px to print unhashed pointers instead where it makes sense, and by removing the printing of a last user pointer referring to code. [geert+renesas@glider.be: v2] Link: http://lkml.kernel.org/r/1513179267-2509-1-git-send-email-geert+renesas@glider.be Link: http://lkml.kernel.org/r/1512641861-5113-1-git-send-email-geert+renesas@glider.be Fixes: ad67b74d2469d9b8 ("printk: hash addresses printed with %p") Signed-off-by: Geert Uytterhoeven Acked-by: Christoph Lameter Acked-by: Linus Torvalds Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: "Tobin C . Harding" Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit c24ad77d962c31af92f2b731dad2104cbf3fbb03 Author: Lucas Stach Date: Thu Dec 14 15:32:55 2017 -0800 mm/page_alloc.c: avoid excessive IRQ disabled times in free_unref_page_list() Since commit 9cca35d42eb6 ("mm, page_alloc: enable/disable IRQs once when freeing a list of pages") we see excessive IRQ disabled times of up to 25ms on an embedded ARM system (tracing overhead included). This is due to graphics buffers being freed back to the system via release_pages(). Graphics buffers can be huge, so it's not hard to hit cases where the list of pages to free has 2048 entries. Disabling IRQs while freeing all those pages is clearly not a good idea. Introduce a batch limit, which allows IRQ servicing once every few pages. The batch count is the same as used in other parts of the MM subsystem when dealing with IRQ disabled regions. Link: http://lkml.kernel.org/r/20171207170314.4419-1-l.stach@pengutronix.de Fixes: 9cca35d42eb6 ("mm, page_alloc: enable/disable IRQs once when freeing a list of pages") Signed-off-by: Lucas Stach Acked-by: Mel Gorman Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 183f24aa5b76e37da690b2def41cc70f0792ce09 Author: Geert Uytterhoeven Date: Thu Dec 14 15:32:52 2017 -0800 mm/memory.c: mark wp_huge_pmd() inline to prevent build failure With gcc 4.1.2: mm/memory.o: In function `wp_huge_pmd': memory.c:(.text+0x9b4): undefined reference to `do_huge_pmd_wp_page' Interestingly, wp_huge_pmd() is emitted in the assembler output, but never called. Apparently replacing the call to pmd_write() in __handle_mm_fault() by a call to the more complex pmd_access_permitted() reduced the ability of the compiler to remove unused code. Fix this by marking wp_huge_pmd() inline, like was done in commit 91a90140f998 ("mm/memory.c: mark create_huge_pmd() inline to prevent build failure") for a similar problem. [akpm@linux-foundation.org: add comment] Link: http://lkml.kernel.org/r/1512335500-10889-1-git-send-email-geert@linux-m68k.org Fixes: c7da82b894e9eef6 ("mm: replace pmd_write with pmd_access_permitted in fault + gup paths") Signed-off-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4cc90b4cc3d4955f79eae4f7f9d64e67e17b468e Author: Liu, Changcheng Date: Thu Dec 14 15:32:48 2017 -0800 scripts/faddr2line: fix CROSS_COMPILE unset error faddr2line hit var unbound error when CROSS_COMPILE isn't set since nounset option is set in bash script. Link: http://lkml.kernel.org/r/20171206013022.GA83929@sofia Fixes: 95a879825419 ("scripts/faddr2line: extend usage on generic arch") Signed-off-by: Liu Changcheng Reported-by: Richard Weinberger Reviewed-by: Richard Weinberger Cc: Thomas Gleixner Cc: Greg Kroah-Hartman Cc: Philippe Ombredanne Cc: NeilBrown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/faddr2line | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 51f73fffbf30b335d036ab356b67b05e16e26585 Author: Srividya Desireddy Date: Thu Dec 14 15:32:45 2017 -0800 Documentation/vm/zswap.txt: update with same-value filled page feature Update zswap document with details on same-value filled pages identification feature. The usage of zswap.same_filled_pages_enabled module parameter is explained. Link: http://lkml.kernel.org/r/20171206114852epcms5p6973b02a9f455d5d3c765eafda0fe2631@epcms5p6 Signed-off-by: Srividya Desireddy Acked-by: Dan Streetman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/zswap.txt | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 3756f6401c302617c5e091081ca4d26ab604bec5 Author: Arnd Bergmann Date: Thu Dec 14 15:32:41 2017 -0800 exec: avoid gcc-8 warning for get_task_comm gcc-8 warns about using strncpy() with the source size as the limit: fs/exec.c:1223:32: error: argument to 'sizeof' in 'strncpy' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess] This is indeed slightly suspicious, as it protects us from source arguments without NUL-termination, but does not guarantee that the destination is terminated. This keeps the strncpy() to ensure we have properly padded target buffer, but ensures that we use the correct length, by passing the actual length of the destination buffer as well as adding a build-time check to ensure it is exactly TASK_COMM_LEN. There are only 23 callsites which I all reviewed to ensure this is currently the case. We could get away with doing only the check or passing the right length, but it doesn't hurt to do both. Link: http://lkml.kernel.org/r/20171205151724.1764896-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Suggested-by: Kees Cook Acked-by: Kees Cook Acked-by: Ingo Molnar Cc: Alexander Viro Cc: Peter Zijlstra Cc: Serge Hallyn Cc: James Morris Cc: Aleksa Sarai Cc: "Eric W. Biederman" Cc: Frederic Weisbecker Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/exec.c | 7 +++---- include/linux/sched.h | 6 +++++- 2 files changed, 8 insertions(+), 5 deletions(-) commit 302ec300ef8a545a7fc7f667e5fd743b091c2eeb Author: NeilBrown Date: Thu Dec 14 15:32:38 2017 -0800 autofs: fix careless error in recent commit Commit ecc0c469f277 ("autofs: don't fail mount for transient error") was meant to replace an 'if' with a 'switch', but instead added the 'switch' leaving the case in place. Link: http://lkml.kernel.org/r/87zi6wstmw.fsf@notabene.neil.brown.name Fixes: ecc0c469f277 ("autofs: don't fail mount for transient error") Reported-by: Ben Hutchings Signed-off-by: NeilBrown Cc: Ian Kent Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/waitq.c | 1 - 1 file changed, 1 deletion(-) commit 146734b091430c80d80bb96b1139a96fb4bc830e Author: Arnd Bergmann Date: Thu Dec 14 15:32:34 2017 -0800 string.h: workaround for increased stack usage The hardened strlen() function causes rather large stack usage in at least one file in the kernel, in particular when CONFIG_KASAN is enabled: drivers/media/usb/em28xx/em28xx-dvb.c: In function 'em28xx_dvb_init': drivers/media/usb/em28xx/em28xx-dvb.c:2062:1: error: the frame size of 3256 bytes is larger than 204 bytes [-Werror=frame-larger-than=] Analyzing this problem led to the discovery that gcc fails to merge the stack slots for the i2c_board_info[] structures after we strlcpy() into them, due to the 'noreturn' attribute on the source string length check. I reported this as a gcc bug, but it is unlikely to get fixed for gcc-8, since it is relatively easy to work around, and it gets triggered rarely. An earlier workaround I did added an empty inline assembly statement before the call to fortify_panic(), which works surprisingly well, but is really ugly and unintuitive. This is a new approach to the same problem, this time addressing it by not calling the 'extern __real_strnlen()' function for string constants where __builtin_strlen() is a compile-time constant and therefore known to be safe. We do this by checking if the last character in the string is a compile-time constant '\0'. If it is, we can assume that strlen() of the string is also constant. As a side-effect, this should also improve the object code output for any other call of strlen() on a string constant. [akpm@linux-foundation.org: add comment] Link: http://lkml.kernel.org/r/20171205215143.3085755-1-arnd@arndb.de Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82365 Link: https://patchwork.kernel.org/patch/9980413/ Link: https://patchwork.kernel.org/patch/9974047/ Fixes: 6974f0c4555 ("include/linux/string.h: add the option of fortified string.h functions") Signed-off-by: Arnd Bergmann Cc: Kees Cook Cc: Mauro Carvalho Chehab Cc: Dmitry Vyukov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Daniel Micay Cc: Greg Kroah-Hartman Cc: Martin Wilck Cc: Dan Williams Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/string.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 13ab183d138f607d885e995d625e58d47678bf97 Author: Andrew Morton Date: Thu Dec 14 15:32:31 2017 -0800 mm/kmemleak.c: make cond_resched() rate-limiting more efficient Commit bde5f6bc68db ("kmemleak: add scheduling point to kmemleak_scan()") tries to rate-limit the frequency of cond_resched() calls, but does it in a way which might incur an expensive division operation in the inner loop. Simplify this. Fixes: bde5f6bc68db5 ("kmemleak: add scheduling point to kmemleak_scan()") Suggested-by: Linus Torvalds Cc: Yisheng Xie Cc: Catalin Marinas Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kmemleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 338f1d9d1b829fec494d053f62820a2ee625b1ec Author: Chris Wilson Date: Thu Dec 14 15:32:28 2017 -0800 lib/rbtree,drm/mm: add rbtree_replace_node_cached() Add a variant of rbtree_replace_node() that maintains the leftmost cache of struct rbtree_root_cached when replacing nodes within the rbtree. As drm_mm is the only rb_replace_node() being used on an interval tree, the mistake looks fairly self-contained. Furthermore the only user of drm_mm_replace_node() is its testsuite... Testcase: igt/drm_mm/replace Link: http://lkml.kernel.org/r/20171122100729.3742-1-chris@chris-wilson.co.uk Link: https://patchwork.freedesktop.org/patch/msgid/20171109212435.9265-1-chris@chris-wilson.co.uk Fixes: f808c13fd373 ("lib/interval_tree: fast overlap detection") Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Acked-by: Davidlohr Bueso Cc: Jérôme Glisse Cc: Joonas Lahtinen Cc: Daniel Vetter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/gpu/drm/drm_mm.c | 8 +++++--- include/linux/rbtree.h | 2 ++ lib/rbtree.c | 10 ++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) commit c47d7f56e914900410f65835933f9fc4374d0a2b Author: Wei Wang Date: Thu Dec 14 15:32:24 2017 -0800 include/linux/idr.h: add #include The was removed from radix-tree.h by commit f5bba9d11a25 ("include/linux/radix-tree.h: remove unneeded #include "). Since that commit, tools/testing/radix-tree/ couldn't pass compilation due to tools/testing/radix-tree/idr.c:17: undefined reference to WARN_ON_ONCE. This patch adds the bug.h header to idr.h to solve the issue. Link: http://lkml.kernel.org/r/1511963726-34070-2-git-send-email-wei.w.wang@intel.com Fixes: f5bba9d11a2 ("include/linux/radix-tree.h: remove unneeded #include ") Signed-off-by: Wei Wang Cc: Matthew Wilcox Cc: Jan Kara Cc: Eric Biggers Cc: Tejun Heo Cc: Masahiro Yamada Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/idr.h | 1 + 1 file changed, 1 insertion(+) commit d455df0bcc00733a7d8eec900ed791ccd896a493 Merge: e375922 5702591 Author: Linus Torvalds Date: Thu Dec 14 11:51:21 2017 -0800 Merge tag '4.15-rc-smb3' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Small SMB3 fixes for stable and 4.15rc" * tag '4.15-rc-smb3' of git://git.samba.org/sfrench/cifs-2.6: CIFS: don't log STATUS_NOT_FOUND errors for DFS cifs: fix NULL deref in SMB2_read commit e375922fc5e57113b19f1355f9a6a73aa7453aaa Merge: 7c5cac1 bd36d3b Author: Linus Torvalds Date: Thu Dec 14 11:45:53 2017 -0800 Merge tag 'drm-misc-fixes-2017-12-14' of git://anongit.freedesktop.org/drm/drm-misc Pull drm fixes from Daniel Vetter: - two fixes for new core features - a corner case fix for the connnector_iter fix from last week (this one is cc: stable) - one vc4 fix * tag 'drm-misc-fixes-2017-12-14' of git://anongit.freedesktop.org/drm/drm-misc: drm/drm_lease: Prevent deadlock in case drm_lease_create() fails drm: rework delayed connector cleanup in connector_iter drm: Update edid-derived drm_display_info fields at edid property set [v2] drm/vc4: Release fence after signalling commit c2e90800aef22e7ea14ea7560ba99993f11d3616 Author: Mark Rutland Date: Tue Dec 12 13:45:50 2017 +0000 virtio_mmio: fix devm cleanup Recent rework of the virtio_mmio probe/remove paths balanced a devm_ioremap() with an iounmap() rather than its devm variant. This ends up corrupting the devm datastructures, and results in the following boot-time splat on arm64 under QEMU 2.9.0: [ 3.450397] ------------[ cut here ]------------ [ 3.453822] Trying to vfree() nonexistent vm area (00000000c05b4844) [ 3.460534] WARNING: CPU: 1 PID: 1 at mm/vmalloc.c:1525 __vunmap+0x1b8/0x220 [ 3.475898] Kernel panic - not syncing: panic_on_warn set ... [ 3.475898] [ 3.493933] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.15.0-rc3 #1 [ 3.513109] Hardware name: linux,dummy-virt (DT) [ 3.525382] Call trace: [ 3.531683] dump_backtrace+0x0/0x368 [ 3.543921] show_stack+0x20/0x30 [ 3.547767] dump_stack+0x108/0x164 [ 3.559584] panic+0x25c/0x51c [ 3.569184] __warn+0x29c/0x31c [ 3.576023] report_bug+0x1d4/0x290 [ 3.586069] bug_handler.part.2+0x40/0x100 [ 3.597820] bug_handler+0x4c/0x88 [ 3.608400] brk_handler+0x11c/0x218 [ 3.613430] do_debug_exception+0xe8/0x318 [ 3.627370] el1_dbg+0x18/0x78 [ 3.634037] __vunmap+0x1b8/0x220 [ 3.648747] vunmap+0x6c/0xc0 [ 3.653864] __iounmap+0x44/0x58 [ 3.659771] devm_ioremap_release+0x34/0x68 [ 3.672983] release_nodes+0x404/0x880 [ 3.683543] devres_release_all+0x6c/0xe8 [ 3.695692] driver_probe_device+0x250/0x828 [ 3.706187] __driver_attach+0x190/0x210 [ 3.717645] bus_for_each_dev+0x14c/0x1f0 [ 3.728633] driver_attach+0x48/0x78 [ 3.740249] bus_add_driver+0x26c/0x5b8 [ 3.752248] driver_register+0x16c/0x398 [ 3.757211] __platform_driver_register+0xd8/0x128 [ 3.770860] virtio_mmio_init+0x1c/0x24 [ 3.782671] do_one_initcall+0xe0/0x398 [ 3.791890] kernel_init_freeable+0x594/0x660 [ 3.798514] kernel_init+0x18/0x190 [ 3.810220] ret_from_fork+0x10/0x18 To fix this, we can simply rip out the explicit cleanup that the devm infrastructure will do for us when our probe function returns an error code, or when our remove function returns. We only need to ensure that we call put_device() if a call to register_virtio_device() fails in the probe path. Signed-off-by: Mark Rutland Fixes: 7eb781b1bbb7136f ("virtio_mmio: add cleanup for virtio_mmio_probe") Fixes: 25f32223bce5c580 ("virtio_mmio: add cleanup for virtio_mmio_remove") Cc: Cornelia Huck Cc: Michael S. Tsirkin Cc: weiping zhang Cc: virtualization@lists.linux-foundation.org Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck drivers/virtio/virtio_mmio.c | 43 +++++++++---------------------------------- 1 file changed, 9 insertions(+), 34 deletions(-) commit a192de265b26c525672884630d5376c405e83b2a Author: Darrick J. Wong Date: Sun Dec 10 18:03:56 2017 -0800 xfs: allow CoW remap transactions to use reserve blocks Since we as yet have no way of holding on to the indlen blocks that are reserved as part of CoW fork delalloc reservations, let the CoW remap transaction dip into the reserves so that we avoid failing writes. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_reflink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d40fba8b2056773b9744a95df9ddd6cc33a4f83 Author: Darrick J. Wong Date: Sun Dec 10 18:03:55 2017 -0800 xfs: avoid infinite loop when cancelling CoW blocks after writeback failure When we're cancelling a cow range, we don't always delete each extent that we iterate, so we have to move icur backwards in the list to avoid an infinite loop. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_reflink.c | 3 +++ 1 file changed, 3 insertions(+) commit 73353f486c9b5b2407ec32be1004174dbbaf6c18 Author: Darrick J. Wong Date: Sun Dec 10 18:03:55 2017 -0800 xfs: relax is_reflink_inode assert in xfs_reflink_find_cow_mapping We don't hold the ilock through the entire sequence of xfs_writepage_map -> xfs_map_cow -> xfs_reflink_find_cow_mapping. This means that we can race with another thread that is trying to clear the inode reflink flag, with the result that the flag is set for the xfs_map_cow check but cleared before we get to the assert in find_cow_mapping. When this happens, we blow the assert even though everything is fine. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_reflink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5c989a0ee06eb77a44baffd1779a5dbb9a7e873f Author: Darrick J. Wong Date: Sun Dec 10 18:03:54 2017 -0800 xfs: remove dest file's post-eof preallocations before reflinking If we try to reflink into a file with post-eof preallocations at an offset well past the preallocations, we increase i_size as one would expect. However, those allocations do not have page cache backing them, so they won't get cleaned out on their own. This leads to asserts in the collapse/insert range code and xfs_destroy_inode when they encounter delalloc extents they weren't expecting to find. Since there are plenty of other places where we dump those post-eof blocks, do the same to the reflink destination file before we start remapping extents. This was found by adding clonerange support to fsstress and running it in write-only mode. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_reflink.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c54854a437a447a6bb1dcb11f60dd01cef3fa597 Author: Darrick J. Wong Date: Sun Dec 10 18:03:54 2017 -0800 xfs: move xfs_iext_insert tracepoint to report useful information Move the tracepoint in xfs_iext_insert to after the point where we've inserted the extent because otherwise we report stale extent data in the ftrace output. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_iext_tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8c57b88637d78a723e0854fc3d06c6d4c31a1e0c Author: Darrick J. Wong Date: Sun Dec 10 18:03:53 2017 -0800 xfs: account for null transactions in bunmapi In e1a4e37cc7b665 ("xfs: try to avoid blowing out the transaction reservation when bunmaping a shared extent"), we try to constrain the amount of real extents we unmap from the data fork in a given call so that we don't blow out transaction reservations. However, not all bunmapi operations require a transaction -- if we're only removing a delalloc extent, no transaction is needed, so we have to code against that. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_bmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e643cd094de3bd0f97edcc1db0089afa24d909f Author: Darrick J. Wong Date: Thu Dec 7 19:07:02 2017 -0800 xfs: hold xfs_buf locked between shortform->leaf conversion and the addition of an attribute The new attribute leaf buffer is not held locked across the transaction roll between the shortform->leaf modification and the addition of the new entry. As a result, the attribute buffer modification being made is not atomic from an operational perspective. Hence the AIL push can grab it in the transient state of "just created" after the initial transaction is rolled, because the buffer has been released. This leads to xfs_attr3_leaf_verify() asserting that hdr.count is zero, treating this as in-memory corruption, and shutting down the filesystem. Darrick ported the original patch to 4.15 and reworked it use the xfs_defer_bjoin helper and hold/join the buffer correctly across the second transaction roll. Signed-off-by: Alex Lyakas Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_attr.c | 20 +++++++++++++++----- fs/xfs/libxfs/xfs_attr_leaf.c | 9 ++++++--- fs/xfs/libxfs/xfs_attr_leaf.h | 3 ++- 3 files changed, 23 insertions(+), 9 deletions(-) commit b7b2846fe26f2c0d7f317c874a13d3ecf22670ff Author: Darrick J. Wong Date: Thu Dec 7 19:07:02 2017 -0800 xfs: add the ability to join a held buffer to a defer_ops In certain cases, defer_ops callers will lock a buffer and want to hold the lock across transaction rolls. Similar to ijoined inodes, we want to dirty & join the buffer with each transaction roll in defer_finish so that afterwards the caller still owns the buffer lock and we haven't inadvertently pinned the log. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/libxfs/xfs_defer.c | 39 ++++++++++++++++++++++++++++++++++++--- fs/xfs/libxfs/xfs_defer.h | 5 ++++- 2 files changed, 40 insertions(+), 4 deletions(-) commit c1cfd9025cc394fd137a01159d74335c5ac978ce Author: Takashi Iwai Date: Thu Dec 14 16:44:12 2017 +0100 ALSA: rawmidi: Avoid racy info ioctl via ctl device The rawmidi also allows to obtaining the information via ioctl of ctl API. It means that user can issue an ioctl to the rawmidi device even when it's being removed as long as the control device is present. Although the code has some protection via the global register_mutex, its range is limited to the search of the corresponding rawmidi object, and the mutex is already unlocked at accessing the rawmidi object. This may lead to a use-after-free. For avoiding it, this patch widens the application of register_mutex to the whole snd_rawmidi_info_select() function. We have another mutex per rawmidi object, but this operation isn't very hot path, so it shouldn't matter from the performance POV. Cc: Signed-off-by: Takashi Iwai sound/core/rawmidi.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 3fab39997a98b97138c886978af660c4f6c7e9e6 Author: Dave Martin Date: Thu Dec 14 14:03:44 2017 +0000 arm64/sve: Report SVE to userspace via CPUID only if supported Currently, the SVE field in ID_AA64PFR0_EL1 is visible unconditionally to userspace via the CPU ID register emulation, irrespective of the kernel config. This means that if a kernel configured with CONFIG_ARM64_SVE=n is run on SVE-capable hardware, userspace will see SVE reported as present in the ID regs even though the kernel forbids execution of SVE instructions. This patch makes the exposure of the SVE field in ID_AA64PFR0_EL1 conditional on CONFIG_ARM64_SVE=y. Since future architecture features are likely to encounter a similar requirement, this patch adds a suitable helper macros for use when declaring config-conditional ID register fields. Fixes: 43994d824e84 ("arm64/sve: Detect SVE and activate runtime support") Reviewed-by: Suzuki K Poulose Reported-by: Mark Rutland Signed-off-by: Dave Martin Cc: Suzuki Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/cpufeature.h | 3 +++ arch/arm64/kernel/cpufeature.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 958d022e326810fd762505bd02007aced79ffcbc Author: oder_chiou@realtek.com Date: Thu Dec 14 09:54:07 2017 +0800 ASoC: rt5663: Fix the wrong result of the first jack detection In the first jack detection while booting, the result will always show as headset, even we insert the headphone. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5663.c | 4 ++++ sound/soc/codecs/rt5663.h | 4 ++++ 2 files changed, 8 insertions(+) commit 1d08a044cf12aee37dfd54837558e3295287b343 Author: Mark Rutland Date: Wed Dec 13 11:45:42 2017 +0000 arm64: fix CONFIG_DEBUG_WX address reporting In ptdump_check_wx(), we pass walk_pgd() a start address of 0 (rather than VA_START) for the init_mm. This means that any reported W&X addresses are offset by VA_START, which is clearly wrong and can make them appear like userspace addresses. Fix this by telling the ptdump code that we're walking init_mm starting at VA_START. We don't need to update the addr_markers, since these are still valid bounds regardless. Cc: Fixes: 1404d6f13e47 ("arm64: dump: Add checking for writable and exectuable pages") Signed-off-by: Mark Rutland Cc: Kees Cook Cc: Laura Abbott Reported-by: Timur Tabi Signed-off-by: Will Deacon arch/arm64/mm/dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da2e6b7eeda8919f677c790ef51161dd02e513a6 Author: Amir Goldstein Date: Wed Nov 22 20:27:34 2017 +0200 ovl: fix overlay: warning prefix Conform two stray warning messages to the standard overlayfs: prefix. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 3 ++- fs/overlayfs/readdir.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 2cf654db8d7eafb973d28eb3cddf043d353e1345 Author: Chris Wilson Date: Wed Dec 13 09:48:02 2017 +0000 drm/i915/fence: Use rcu to defer freeing of irq_work It is illegal to perform an immediate free of the struct irq_work from inside the irq_work callback (as irq_work_run_list modifies work->flags after execution of the work->func()). As we use the irq_work to coordinate the freeing of the callback from two different softirq paths, we need to defer the kfree from inside our irq_work callback, for which we can use kfree_rcu. Fixes: 81c0ed21aa91 ("drm/i915/fence: Avoid del_timer_sync() from inside a timer") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20171213094802.28243-1-chris@chris-wilson.co.uk (cherry picked from commit 7d622351c94172a42bfe9b13bdb0fdc2be90ed3b) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_sw_fence.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 74c7b0782b15bc2478f557cea34b3fe34d452dc6 Author: Chris Wilson Date: Fri Dec 8 12:10:33 2017 +0000 drm/i915: Stop listening to request resubmission from the signaler kthread The intent here was that we would be listening to i915_gem_request_unsubmit in order to cancel the signaler quickly and release the reference on the request. Cancelling the signaler is done directly via intel_engine_cancel_signaling (called from unsubmit), but that does not directly wake up the signaling thread, and neither does setting the request->global_seqno back to zero wake up listeners to the request->execute waitqueue. So the only time that listening to the request->execute waitqueue would wake up the signaling kthread would be on the request resubmission, during which time we would already receive wake ups from rejoining the global breadcrumbs wait rbtree. Trying to wake up to release the request remains an issue. If the signaling was cancelled and no other request required signaling, then it is possible for us to shutdown with the reference on the request still held. To ensure that we do not try to shutdown, leaking that request, we kick the signaling threads whenever we disarm the breadcrumbs, i.e. on parking the engine when idle. v2: We do need to be sure to release the last reference on stopping the kthread; asserting that it has been dropped already is insufficient. Fixes: d6a2289d9d6b ("drm/i915: Remove the preempted request from the execution queue") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20171208121033.5236-1-chris@chris-wilson.co.uk Acked-by: Daniel Vetter Reviewed-by: Tvrtko Ursulin (cherry picked from commit 776bc27fd8ab67a675cb0041d3af361af5d0e290) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_breadcrumbs.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 2b3a2e9f400acff4a4a9a2316e3e13b36b76b0e9 Author: Chris Wilson Date: Thu Dec 7 22:00:25 2017 +0000 drm/i915: Drop fb reference on load_detect_pipe failure path When intel_modeset_setup_plane_state() fails drop the local framebuffer reference before jumping to the error, otherwise we leak the framebuffer. Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Cc: Ville Syrjälä Cc: Daniel Vetter Fixes: edde361711ef ("drm/i915: Use atomic state to obtain load detection crtc, v3.") Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171207220025.22698-1-chris@chris-wilson.co.uk (cherry picked from commit 3e72be177cf19ab3d62b3084d424dce7e71d847f) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2797c4a11f373b2545c2398ccb02e362ee66a142 Author: Chris Wilson Date: Mon Dec 4 13:25:13 2017 +0000 drm/i915: Flush pending GTT writes before unbinding From the shrinker paths, we want to relinquish the GPU and GGTT access to the object, releasing the backing storage back to the system for swapout. As a part of that process we would unpin the pages, marking them for access by the CPU (for the swapout/swapin). However, if that process was interrupted after unbind the vma, we missed a flush of the inflight GGTT writes before we made that GTT space available again for reuse, with the prospect that we would redirect them to another page. The bug dates back to the introduction of multiple GGTT vma, but the code itself dates to commit 02bef8f98d26 ("drm/i915: Unbind closed vma for i915_gem_object_unbind()"). Fixes: 02bef8f98d26 ("drm/i915: Unbind closed vma for i915_gem_object_unbind()") Fixes: c5ad54cf7dd8 ("drm/i915: Use partial view in mmap fault handler") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: stable@vger.kernel.org Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171204132513.7303-1-chris@chris-wilson.co.uk (cherry picked from commit 5888fc9eac3c2ff96e76aeeb865fdb46ab2d711e) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit cf656c76614c6ec5b016233cac29738881c83c08 Author: Stefan Raspl Date: Mon Dec 11 12:25:29 2017 +0100 tools/kvm_stat: add line for totals Add a line for the total number of events and current average at the bottom of the body. Note that both values exclude child trace events. I.e. if drilldown is activated via interactive command 'x', only the totals are accounted, or we'd be counting these twice (see previous commit "tools/kvm_stat: fix child trace events accounting"). Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 73fab6ffbd83795e38974bb438e7afce0242c61a Author: Stefan Raspl Date: Mon Dec 11 12:25:27 2017 +0100 tools/kvm_stat: stop ignoring unhandled arguments Unhandled arguments, which could easily include typos, are simply ignored. We should be strict to avoid undetected typos. To reproduce start kvm_stat with an extra argument, e.g. 'kvm_stat -d bnuh5ol' and note that this will actually work. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 822cfe3e4813c8f52199362b0e689fba9459ddc9 Author: Stefan Raspl Date: Mon Dec 11 12:25:26 2017 +0100 tools/kvm_stat: suppress usage information on command line errors Errors while parsing the '-g' command line argument result in display of usage information prior to the error message. This is a bit confusing, as the command line is syntactically correct. To reproduce, run 'kvm_stat -g' and specify a non-existing or inactive guest. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 08e20a6300e106d5feb89c9e47ea479533fec46f Author: Stefan Raspl Date: Mon Dec 11 12:25:25 2017 +0100 tools/kvm_stat: handle invalid regular expressions Passing an invalid regular expression on the command line results in a traceback. Note that interactive specification of invalid regular expressions is not affected To reproduce, run "kvm_stat -f '*'". Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 7 +++++++ 1 file changed, 7 insertions(+) commit f3d11b0e8619bbb053d3e13f2271819fb01c1e2a Author: Stefan Raspl Date: Mon Dec 11 12:25:24 2017 +0100 tools/kvm_stat: add hint on '-f help' to man page The man page update for this new functionality was omitted. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fff8c9eb48aa58259071b5df0e6d4c1c0bc1ba51 Author: Stefan Raspl Date: Mon Dec 11 12:25:23 2017 +0100 tools/kvm_stat: fix child trace events accounting Child trace events were included in calculation of the overall total, which is used for calculation of the percentages of the '%Total' column. However, the parent trace envents' stats summarize the child trace events, hence we'd incorrectly account for them twice, leading to slightly wrong stats. With this fix, we use the correct total. Consequently, the sum of the child trace events' '%Total' column values is identical to the respective value of the respective parent event. However, this also means that the sum of the '%Total' column values will aggregate to more than 100 percent. Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 6 +++--- tools/kvm/kvm_stat/kvm_stat.txt | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) commit b74faa930deb2e37ed5caa0abfc687c8c532e946 Author: Stefan Raspl Date: Mon Dec 11 12:25:22 2017 +0100 tools/kvm_stat: fix extra handling of 'help' with fields filter Commit 67fbcd62f54d ("tools/kvm_stat: add '-f help' to get the available event list") added support for '-f help'. However, the extra handling of 'help' will also take effect when 'help' is specified as a regex in interactive mode via 'f'. This results in display of all events while only those matching this regex should be shown. 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 67c162b0892ac481e47bef06d9c6231ee993843a Author: Stefan Raspl Date: Mon Dec 11 12:25:21 2017 +0100 tools/kvm_stat: fix missing field update after filter change When updating the fields filter, tracepoint events of fields previously not visible were not enabled, as TracepointProvider.update_fields() updated the member variable directly instead of using the setter, which triggers the event enable/disable. To reproduce, run 'kvm_stat -f kvm_exit', press 'c' to remove the filter, and notice that no add'l fields that do not match the regex 'kvm_exit' will appear. This issue was introduced by commit c469117df059 ("tools/kvm_stat: simplify initializers"). Signed-off-by: Stefan Raspl Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit faa06650418bf28d07426fcfdc5213782fb131f6 Author: Stefan Raspl Date: Mon Dec 11 12:25:20 2017 +0100 tools/kvm_stat: fix drilldown in events-by-guests mode When displaying debugfs events listed by guests, an attempt to switch to reporting of stats for individual child trace events results in garbled output. Reason is that when toggling drilldown, the update of the stats doesn't honor when events are displayed by guests, as indicated by Tui._display_guests. To reproduce, run 'kvm_stat -d' and press 'b' followed by 'x'. 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 19e8e54f4309eaa438237aa1973fe40c331903d4 Author: Stefan Raspl Date: Mon Dec 11 12:25:19 2017 +0100 tools/kvm_stat: fix command line option '-g' Specifying a guest via '-g foo' always results in an error: $ kvm_stat -g foo Usage: kvm_stat [options] kvm_stat: error: Error while searching for guest "foo", use "-p" to specify a pid instead Reason is that Tui.get_pid_from_gname() is not static, as it is supposed to be. Signed-off-by: Stefan Raspl Tested-by: Christian Borntraeger Signed-off-by: Paolo Bonzini tools/kvm/kvm_stat/kvm_stat | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 5663d8f9bbe4bf15488f7351efb61ea20fa6de06 Author: Peter Xu Date: Tue Dec 12 17:15:02 2017 +0100 kvm: x86: fix WARN due to uninitialized guest FPU state ------------[ cut here ]------------ Bad FPU state detected at kvm_put_guest_fpu+0xd8/0x2d0 [kvm], reinitializing FPU registers. WARNING: CPU: 1 PID: 4594 at arch/x86/mm/extable.c:103 ex_handler_fprestore+0x88/0x90 CPU: 1 PID: 4594 Comm: qemu-system-x86 Tainted: G B OE 4.15.0-rc2+ #10 RIP: 0010:ex_handler_fprestore+0x88/0x90 Call Trace: fixup_exception+0x4e/0x60 do_general_protection+0xff/0x270 general_protection+0x22/0x30 RIP: 0010:kvm_put_guest_fpu+0xd8/0x2d0 [kvm] RSP: 0018:ffff8803d5627810 EFLAGS: 00010246 kvm_vcpu_reset+0x3b4/0x3c0 [kvm] kvm_apic_accept_events+0x1c0/0x240 [kvm] kvm_arch_vcpu_ioctl_run+0x1658/0x2fb0 [kvm] kvm_vcpu_ioctl+0x479/0x880 [kvm] do_vfs_ioctl+0x142/0x9a0 SyS_ioctl+0x74/0x80 do_syscall_64+0x15f/0x600 where kvm_put_guest_fpu is called without a prior kvm_load_guest_fpu. To fix it, move kvm_load_guest_fpu to the very beginning of kvm_arch_vcpu_ioctl_run. Cc: stable@vger.kernel.org Fixes: f775b13eedee2f7f3c6fdd4e90fb79090ce5d339 Signed-off-by: Peter Xu Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit d73235d17ba63b53dc0e1051dbc10a1f1be91b71 Author: Wanpeng Li Date: Thu Dec 7 00:30:08 2017 -0800 KVM: X86: Fix load RFLAGS w/o the fixed bit *** Guest State *** CR0: actual=0x0000000000000030, shadow=0x0000000060000010, gh_mask=fffffffffffffff7 CR4: actual=0x0000000000002050, shadow=0x0000000000000000, gh_mask=ffffffffffffe871 CR3 = 0x00000000fffbc000 RSP = 0x0000000000000000 RIP = 0x0000000000000000 RFLAGS=0x00000000 DR7 = 0x0000000000000400 ^^^^^^^^^^ The failed vmentry is triggered by the following testcase when ept=Y: #include #include #include #include #include #include #include long r[5]; int main() { r[2] = open("/dev/kvm", O_RDONLY); r[3] = ioctl(r[2], KVM_CREATE_VM, 0); r[4] = ioctl(r[3], KVM_CREATE_VCPU, 7); struct kvm_regs regs = { .rflags = 0, }; ioctl(r[4], KVM_SET_REGS, ®s); ioctl(r[4], KVM_RUN, 0); } X86 RFLAGS bit 1 is fixed set, userspace can simply clearing bit 1 of RFLAGS with KVM_SET_REGS ioctl which results in vmentry fails. This patch fixes it by oring X86_EFLAGS_FIXED during ioctl. Cc: stable@vger.kernel.org Suggested-by: Jim Mattson Reviewed-by: David Hildenbrand Reviewed-by: Quan Xu Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Jim Mattson Cc: stable@vger.kernel.org Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed52870f4676489124d8697fd00e6ae6c504e586 Author: Wanpeng Li Date: Mon Dec 4 22:21:30 2017 -0800 KVM: MMU: Fix infinite loop when there is no available mmu page The below test case can cause infinite loop in kvm when ept=0. #include #include #include #include #include #include #include long r[5]; int main() { r[2] = open("/dev/kvm", O_RDONLY); r[3] = ioctl(r[2], KVM_CREATE_VM, 0); r[4] = ioctl(r[3], KVM_CREATE_VCPU, 7); ioctl(r[4], KVM_RUN, 0); } It doesn't setup the memory regions, mmu_alloc_shadow/direct_roots() in kvm return 1 when kvm fails to allocate root page table which can result in beblow infinite loop: vcpu_run() { for (;;) { r = vcpu_enter_guest()::kvm_mmu_reload() returns 1 if (r <= 0) break; if (need_resched()) cond_resched(); } } This patch fixes it by returning -ENOSPC when there is no available kvm mmu page for root page table. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: stable@vger.kernel.org Fixes: 26eeb53cf0f (KVM: MMU: Bail out immediately if there is no available mmu page) Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bd36d3bab2e3d08f80766c86487090dbceed4651 Author: Marius Vlad Date: Wed Dec 13 20:10:48 2017 +0200 drm/drm_lease: Prevent deadlock in case drm_lease_create() fails This case can been seen when creating the lease with the same objects passed. [ 605.515097] 2 locks held by testapp/3337: [ 605.519027] #0: (&dev->mode_config.idr_mutex){......}, at: [] drm_mode_create_lease_ioctl+0x384/0x858 [ 605.530045] #1: (&dev->mode_config.idr_mutex){......}, at: [] drm_lease_destroy+0x2c/0x110 Which was causing the process to hang: [ 605.398827] [] __switch_to+0x94/0xa8 [ 605.404030] [] __schedule+0x1b0/0x698 [ 605.409322] [] schedule+0x3c/0xa8 [ 605.414260] [] schedule_preempt_disabled+0x20/0x38 [ 605.420677] [] mutex_lock_nested+0x158/0x340 [ 605.426572] [] drm_lease_destroy+0x2c/0x110 [ 605.432389] [] drm_master_put+0xc0/0xc8 [ 605.437845] [] drm_mode_create_lease_ioctl+0x47c/0x858 [ 605.444612] [] drm_ioctl+0x198/0x448 [ 605.449811] [] do_vfs_ioctl+0xa4/0x748 [ 605.455192] [] SyS_ioctl+0x8c/0xa0 [ 605.460216] [] __sys_trace_return+0x0/0x4 drm_mode_create_lease_ioctl() calls drm_lease_create() which acquires a lock on dev->mode_config.idr_mutex. In case of failure, drm_lease_create() calls drm_master_put() which in turn tries to acquire the same lock when calling drm_lease_destroy(). v2: - Reverse the order at exit in case of fail, so that unlocking takes place before dropping the reference. - Include detail information about deadlock (Daniel Vetter) Signed-off-by: Marius Vlad Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171213181048.32719-1-marius-cristian.vlad@nxp.com drivers/gpu/drm/drm_lease.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7c5cac1bc7170bfc726a69eb64947c55658d16ad Merge: 4e746cf b7e0b6f Author: Linus Torvalds Date: Wed Dec 13 20:15:49 2017 -0800 Merge tag 'xfs-4.15-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "Here are a few more bug fixes & cleanups for 4.15-rc4: - clean up duplicate includes - remove ancient 'no-alloc' crap code that occasionally caused hard fs shutdowns due to lack of proper space reservations - fix regression in FIEMAP behavior when reporting xattr extents" * tag 'xfs-4.15-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: make iomap_begin functions trim iomaps consistently xfs: remove "no-allocation" reservations for file creations fs: xfs: remove duplicate includes commit 4e746cf4f721d6397bace501f5feadb46eec1314 Merge: d39a01e 27b0174 Author: Linus Torvalds Date: Wed Dec 13 20:13:05 2017 -0800 Merge tag 'riscv-for-linus-4.15-rc4-riscv_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux Pull RISC-V fixes from Palmer Dabbelt: "This contains three small fixes: - A fix to a typo in sys_riscv_flush_icache. This only effects error handling, but I think it's a small and obvious enough change that it's sane outside the merge window. - The addition of smp_mb__after_spinlock(), which was recently removed due to an incorrect comment. This is largly a comment change (as there's a big one now), and while it's necessary for complience with the RISC-V memory model the lack of this fence shouldn't manifest as a bug on current implementations. Nonetheless, it still seems saner to have the fence in 4.15. - The removal of some of the HVC_RISCV_SBI driver that snuck into the arch port. This is compile-time dead code in 4.15 (as the driver isn't in yet), and during the review process we found a better way to implement early printk on RISC-V. While this change doesn't do anything, it will make staging our HVC driver easier: without this change the HVC driver we hope to upstream won't build on 4.15 (because the 4.15 arch code would reference a function that no longer exists). I don't think this is the last patch set we'll want for 4.15: I think I'll want to remove some of the first-level irqchip driver that snuck in as well, which will look a lot like the HVC patch here. This is pending some asm-generic cleanup I'm doing that I haven't quite gotten clean enough to send out yet, though, but hopefully it'll be ready by next week (and still OK for that late)" * tag 'riscv-for-linus-4.15-rc4-riscv_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux: RISC-V: Remove unused CONFIG_HVC_RISCV_SBI code RISC-V: Resurrect smp_mb__after_spinlock() RISC-V: Logical vs Bitwise typo commit 8c8f67a46f2bf33556ad12a1971734047b60831a Merge: f6e168b 9147efc Author: David S. Miller Date: Wed Dec 13 17:30:04 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2017-12-13 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Addition of explicit scheduling points to map alloc/free in order to avoid having to hold the CPU for too long, from Eric. 2) Fixing of a corruption in overlapping perf_event_output calls from different BPF prog types on the same CPU out of different contexts, from Daniel. 3) Fallout fixes for recent correction of broken uapi for BPF_PROG_TYPE_PERF_EVENT. um had a missing asm header that needed to be pulled in from asm-generic and for BPF selftests the asm-generic include did not work, so similar asm include scheme was adapted for that problematic header that perf is having with other header files under tools, from Daniel. ==================== Signed-off-by: David S. Miller commit ea497bb92064875497554ee7cdf10df7fb7393fc Author: Daniel Vetter Date: Wed Dec 13 13:49:36 2017 +0100 drm: rework delayed connector cleanup in connector_iter PROBE_DEFER also uses system_wq to reprobe drivers, which means when that again fails, and we try to flush the overall system_wq (to get all the delayed connectore cleanup work_struct completed), we deadlock. Fix this by using just a single cleanup work, so that we can only flush that one and don't block on anything else. That means a free list plus locking, a standard pattern. v2: - Correctly free connectors only on last ref. Oops (Chris). - use llist_head/node (Chris). v3 - Add init_llist_head (Chris). Fixes: a703c55004e1 ("drm: safely free connectors from connector_iter") Fixes: 613051dac40d ("drm: locking&new iterators for connector_list") Cc: Ben Widawsky Cc: Dave Airlie Cc: Chris Wilson Cc: Sean Paul Cc: # v4.11+: 613051dac40d ("drm: locking&new iterators for connector_list" Cc: # v4.11+ Cc: Daniel Vetter Cc: Jani Nikula Cc: Gustavo Padovan Cc: David Airlie Cc: Javier Martinez Canillas Cc: Shuah Khan Cc: Guillaume Tucker Cc: Mark Brown Cc: Kevin Hilman Cc: Matt Hart Cc: Thierry Escande Cc: Tomeu Vizoso Cc: Enric Balletbo i Serra Tested-by: Marek Szyprowski Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171213124936.17914-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_connector.c | 50 ++++++++++++++++++++++++++----------- drivers/gpu/drm/drm_crtc_internal.h | 1 + drivers/gpu/drm/drm_mode_config.c | 5 +++- include/drm/drm_connector.h | 10 +++++--- include/drm/drm_mode_config.h | 18 ++++++++++++- 5 files changed, 63 insertions(+), 21 deletions(-) commit f6e168b4a147e169c1df9a9fc2158b974e3195b4 Merge: de9c4e0 5a1647c Author: David S. Miller Date: Wed Dec 13 16:38:37 2017 -0500 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 Eugenia fixes an MTU issue in selftest. Patch 2 by Eran fixes an accounting issue in the resource tracker. Patch 3 by Eran fixes a race condition that causes counter inconsistency. Series generated against net commit: 200809716aed fou: fix some member types in guehdr v2: Patch 2: Add reviewer credit, rephrase commit message. ==================== Signed-off-by: David S. Miller commit 5a1647c391ba543a77a400dddf89053ec5c2b7a4 Author: Eran Ben Elisha Date: Wed Dec 13 18:12:11 2017 +0200 net/mlx4_en: Fill all counters under one call of stats lock Before this patch, the stats_lock was acquired twice. In between the locks Driver sent command to gather some more statistics (per priority and counter statistics). If the stats lock was acquired by get statistics NDO in between we would have report out of sync counters. Fix this by collecting all stats from Firmware in advance and then fill the Software structs under one lock. Fixes: 0b131561a7d6 ("net/mlx4_en: Add Flow control statistics display via ethtool") Signed-off-by: Eran Ben Elisha Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_port.c | 57 +++++++++++++++------------- 1 file changed, 31 insertions(+), 26 deletions(-) commit 0bb9fc4f5429ac970181c073aa32e521e20f7b73 Author: Eran Ben Elisha Date: Wed Dec 13 18:12:10 2017 +0200 net/mlx4_core: Fix wrong calculation of free counters The field res_free indicates the total number of counters which are available for allocation (reserved and unreserved). Fixed a bug where the reserved counters were subtracted from res_free before any allocation was performed. Before this fix, free counters which were not reserved could not be allocated. Fixes: 9de92c60beaa ("net/mlx4_core: Adjust counter grant policy in the resource tracker") Signed-off-by: Eran Ben Elisha Reviewed-by: Jack Morgenstein Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 1 - 1 file changed, 1 deletion(-) commit 78034f5fdd622520eb843301cf35ce6c626543a7 Author: Eugenia Emantayev Date: Wed Dec 13 18:12:09 2017 +0200 net/mlx4_en: Fix selftest for small MTUs Set the minimal MTU threshold for running loopback selftest. MTU should be big enough to include packet payload, NET_IP_ALIGN, Ethernet headers and preamble length. Fixes: e7c1c2c46201 ("mlx4_en: Added self diagnostics test implementation") Signed-off-by: Eugenia Emantayev Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_selftest.c | 2 +- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit de9c4e06bbe872d725f306e34f3eea21155488e2 Author: Russell King Date: Wed Dec 13 09:22:03 2017 +0000 net: phy: marvell: avoid configuring fiber page for SGMII-to-Copper When in SGMII-to-Copper mode, the fiber page is used for the MAC facing link, and does not require configuration of the fiber auto-negotiation settings. Avoid trying. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 4 ++++ 1 file changed, 4 insertions(+) commit 53c64870d03edfa5c554ac2f750c5d6b38e3680a Author: Jie Deng Date: Wed Dec 13 12:04:12 2017 +0800 dwc-xlgmac: Add co-maintainer Jose Abreu will join to maintain dwc-xlgmac. He will help with new feature development for this driver. Thanks Jose and welcome on board! Signed-off-by: Jie Deng Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 4688eb7cf3ae2c2721d1dacff5c1384cba47d176 Author: Eric Dumazet Date: Tue Dec 12 18:22:52 2017 -0800 tcp: refresh tcp_mstamp from timers callbacks Only the retransmit timer currently refreshes tcp_mstamp We should do the same for delayed acks and keepalives. Even if RFC 7323 does not request it, this is consistent to what linux did in the past, when TS values were based on jiffies. Fixes: 385e20706fac ("tcp: use tp->tcp_mstamp in output path") Signed-off-by: Eric Dumazet Cc: Soheil Hassas Yeganeh Cc: Mike Maloney Cc: Neal Cardwell Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Acked-by: Mike Maloney Signed-off-by: David S. Miller net/ipv4/tcp_timer.c | 2 ++ 1 file changed, 2 insertions(+) commit 9ee11bd03cb1a5c3ca33c2bb70e7ed325f68890f Author: Wei Wang Date: Tue Dec 12 16:28:58 2017 -0800 tcp: fix potential underestimation on rcv_rtt When ms timestamp is used, current logic uses 1us in tcp_rcv_rtt_update() when the real rcv_rtt is within 1 - 999us. This could cause rcv_rtt underestimation. Fix it by always using a min value of 1ms if ms timestamp is used. Fixes: 645f4c6f2ebd ("tcp: switch rcv_rtt_est and rcvq_space to high resolution timestamps") Signed-off-by: Wei Wang Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit c009cb842fcc0f84536a9d2692e6f063af5ac5c6 Author: Stephen Hemminger Date: Tue Dec 12 10:30:29 2017 -0800 skge: remove redundunt free_irq under spinlock The code to handle multi-port SKGE boards was freeing IRQ twice. The first one was under lock and might sleep. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/ethernet/marvell/skge.c | 1 - 1 file changed, 1 deletion(-) commit 3b3397e2031564db07022e99f04d4b9f3df6fced Author: Colin Ian King Date: Tue Dec 12 13:03:11 2017 +0000 net: phy: meson-gxl: make function meson_gxl_read_status static The function meson_gxl_read_status is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'meson_gxl_read_status' was not declared. Should it be static? Signed-off-by: Colin Ian King Reviewed-by: Jerome Brunet Signed-off-by: David S. Miller drivers/net/phy/meson-gxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94a5ef1b77da4674a6bc1d3de3051b758859d106 Author: Russell King Date: Tue Dec 12 10:49:15 2017 +0000 of_mdio / mdiobus: ensure mdio devices have fwnode correctly populated Ensure that all mdio devices populate the struct device fwnode pointer as well as the of_node pointer to allow drivers that wish to use fwnode APIs to work. Signed-off-by: Russell King Reviewed-by: Rob Herring Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/mdio_bus.c | 1 + drivers/of/of_mdio.c | 3 +++ 2 files changed, 4 insertions(+) commit f5e64032a799d4f54decc7eb6aafcdffb67f9ad9 Author: Russell King Date: Tue Dec 12 10:45:36 2017 +0000 net: phy: fix resume handling When a PHY has the BMCR_PDOWN bit set, it may decide to ignore writes to other registers, or reset the registers to power-on defaults. Micrel PHYs do this for their interrupt registers. The current structure of phylib tries to enable interrupts before resuming (and releasing) the BMCR_PDOWN bit. This fails, causing Micrel PHYs to stop working after a suspend/resume sequence if they are using interrupts. Fix this by ensuring that the PHY driver resume methods do not take the phydev->lock mutex themselves, but the callers of phy_resume() take that lock. This then allows us to move the call to phy_resume() before we enable interrupts in phy_start(). Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/at803x.c | 4 ---- drivers/net/phy/phy.c | 9 +++------ drivers/net/phy/phy_device.c | 10 ++++++---- 3 files changed, 9 insertions(+), 14 deletions(-) commit cd8165c3d5fb07667328434835f2968a87caee67 Author: Russell King Date: Tue Dec 12 09:29:51 2017 +0000 ARM: dts: vf610-zii-dev: use XAUI for DSA link ports Use XAUI rather than XGMII for DSA link ports, as this is the interface mode that the switches actually use. XAUI is the 4 lane bus with clock per direction, whereas XGMII is a 32 bit bus with clock. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller arch/arm/boot/dts/vf610-zii-dev-rev-c.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2e51a8dc7fdc9d06c52a0a0e442cc813357ea44d Author: Russell King Date: Tue Dec 12 09:29:46 2017 +0000 net: dsa: allow XAUI phy interface mode XGMII is a 32-bit bus plus two clock signals per direction. XAUI is four serial lanes per direction. The 88e6190 supports XAUI but not XGMII as it doesn't have enough pins. The same is true of 88e6176. Match on PHY_INTERFACE_MODE_XAUI for the XAUI port type, but keep accepting XGMII for backwards compatibility. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/port.c | 1 + 1 file changed, 1 insertion(+) commit 6e266610eb6553cfb7e7eb5d11914bd01509c406 Author: Jia-Ju Bai Date: Tue Dec 12 16:49:52 2017 +0800 hippi: Fix a Fix a possible sleep-in-atomic bug in rr_close The driver may sleep under a spinlock. The function call path is: rr_close (acquire the spinlock) free_irq --> may sleep To fix it, free_irq is moved to the place without holding the spinlock. This bug is found by my static analysis tool(DSAC) and checked by my code review. Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller drivers/net/hippi/rrunner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6da83813fb39206c73cfb98798cc3c770e5b0a0 Merge: 2a9ee69 2371527 Author: David S. Miller Date: Wed Dec 13 14:12:20 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The follow patchset contains Netfilter fixes for your net tree, they are: 1) Fix compilation warning in x_tables with clang due to useless redundant reassignment, from Colin Ian King. 2) Add bugtrap to net_exit to catch uninitialized lists, patch from Vasily Averin. 3) Fix out of bounds memory reads in H323 conntrack helper, this comes with an initial patch to remove replace the obscure CHECK_BOUND macro as a dependency. From Eric Sesterhenn. 4) Reduce retransmission timeout when window is 0 in TCP conntrack, from Florian Westphal. 6) ctnetlink clamp timeout to INT_MAX if timeout is too large, otherwise timeout wraps around and it results in killing the entry that is being added immediately. 7) Missing CAP_NET_ADMIN checks in cthelper and xt_osf, due to no netns support. From Kevin Cernekee. 8) Missing maximum number of instructions checks in xt_bpf, patch from Jann Horn. 9) With no CONFIG_PROC_FS ipt_CLUSTERIP compilation breaks, patch from Arnd Bergmann. 10) Missing netlink attribute policy in nftables exthdr, from Florian Westphal. 11) Enable conntrack with IPv6 MASQUERADE rules, as a357b3f80bc8 should have done in first place, from Konstantin Khlebnikov. ==================== Signed-off-by: David S. Miller commit 2a9ee696c72a24d63529c76483fcd92d04b1d2b7 Author: Branislav Radocaj Date: Tue Dec 12 00:13:38 2017 +0100 net: ethernet: arc: fix error handling in emac_rockchip_probe If clk_set_rate() fails, we should disable clk before return. Found by Linux Driver Verification project (linuxtesting.org). Changes since v2 [1]: * Merged with latest code changes Changes since v1: Update made thanks to David's review, much appreciated David. * Improved inconsistent failure handling of clock rate setting * For completeness of usecase, added arc_emac_probe error handling Signed-off-by: Branislav Radocaj Signed-off-by: David S. Miller drivers/net/ethernet/arc/emac_rockchip.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit aceef61ee56898cfa7b6960fb60b9326c3860441 Author: Sebastian Sjoholm Date: Mon Dec 11 21:51:14 2017 +0100 net: qmi_wwan: add Sierra EM7565 1199:9091 Sierra Wireless EM7565 is an Qualcomm MDM9x50 based M.2 modem. The USB id is added to qmi_wwan.c to allow QMI communication with the EM7565. Signed-off-by: Sebastian Sjoholm Acked-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit a46182b00290839fa3fa159d54fd3237bd8669f0 Author: Kevin Cernekee Date: Mon Dec 11 11:13:45 2017 -0800 net: igmp: Use correct source address on IGMPv3 reports Closing a multicast socket after the final IPv4 address is deleted from an interface can generate a membership report that uses the source IP from a different interface. The following test script, run from an isolated netns, reproduces the issue: #!/bin/bash ip link add dummy0 type dummy ip link add dummy1 type dummy ip link set dummy0 up ip link set dummy1 up ip addr add 10.1.1.1/24 dev dummy0 ip addr add 192.168.99.99/24 dev dummy1 tcpdump -U -i dummy0 & socat EXEC:"sleep 2" \ UDP4-DATAGRAM:239.101.1.68:8889,ip-add-membership=239.0.1.68:10.1.1.1 & sleep 1 ip addr del 10.1.1.1/24 dev dummy0 sleep 5 kill %tcpdump RFC 3376 specifies that the report must be sent with a valid IP source address from the destination subnet, or from address 0.0.0.0. Add an extra check to make sure this is the case. Signed-off-by: Kevin Cernekee Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/ipv4/igmp.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit c545a945d0d9ea2ea2c7d23d43cf0d86e32cd7cf Author: Jon Maloy Date: Mon Dec 11 19:11:55 2017 +0100 tipc: eliminate potential memory leak In the function tipc_sk_mcast_rcv() we call refcount_dec(&skb->users) on received sk_buffers. Since the reference counter might hit zero at this point, we have a potential memory leak. We fix this by replacing refcount_dec() with kfree_skb(). Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83593010d3b87601e775f240ce46c53ddf25828d Author: Pravin Shedge Date: Mon Dec 11 22:09:46 2017 +0530 net: remove duplicate includes These duplicate includes have been found with scripts/checkincludes.pl but they have been removed manually to avoid removing false positives. Signed-off-by: Pravin Shedge Acked-by: Pablo Neira Ayuso Signed-off-by: David S. Miller net/core/netprio_cgroup.c | 1 - net/dsa/slave.c | 1 - net/netfilter/nf_conntrack_netlink.c | 1 - net/sched/act_meta_mark.c | 1 - net/sched/act_meta_skbtcindex.c | 1 - net/sched/cls_api.c | 1 - net/sched/cls_u32.c | 1 - 7 files changed, 7 deletions(-) commit b5476022bbada3764609368f03329ca287528dc8 Author: Eric Dumazet Date: Mon Dec 11 07:17:39 2017 -0800 ipv4: igmp: guard against silly MTU values IPv4 stack reacts to changes to small MTU, by disabling itself under RTNL. But there is a window where threads not using RTNL can see a wrong device mtu. This can lead to surprises, in igmp code where it is assumed the mtu is suitable. Fix this by reading device mtu once and checking IPv4 minimal MTU. This patch adds missing IPV4_MIN_MTU define, to not abuse ETH_MIN_MTU anymore. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/ip.h | 1 + net/ipv4/devinet.c | 2 +- net/ipv4/igmp.c | 24 +++++++++++++++--------- net/ipv4/ip_tunnel.c | 4 ++-- 4 files changed, 19 insertions(+), 12 deletions(-) commit b9b312a7a451e9c098921856e7cfbc201120e1a7 Author: Eric Dumazet Date: Mon Dec 11 07:03:38 2017 -0800 ipv6: mcast: better catch silly mtu values syzkaller reported crashes in IPv6 stack [1] Xin Long found that lo MTU was set to silly values. IPv6 stack reacts to changes to small MTU, by disabling itself under RTNL. But there is a window where threads not using RTNL can see a wrong device mtu. This can lead to surprises, in mld code where it is assumed the mtu is suitable. Fix this by reading device mtu once and checking IPv6 minimal MTU. [1] skbuff: skb_over_panic: text:0000000010b86b8d len:196 put:20 head:000000003b477e60 data:000000000e85441e tail:0xd4 end:0xc0 dev:lo ------------[ cut here ]------------ kernel BUG at net/core/skbuff.c:104! invalid opcode: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.15.0-rc2-mm1+ #39 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:skb_panic+0x15c/0x1f0 net/core/skbuff.c:100 RSP: 0018:ffff8801db307508 EFLAGS: 00010286 RAX: 0000000000000082 RBX: ffff8801c517e840 RCX: 0000000000000000 RDX: 0000000000000082 RSI: 1ffff1003b660e61 RDI: ffffed003b660e95 RBP: ffff8801db307570 R08: 1ffff1003b660e23 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff85bd4020 R13: ffffffff84754ed2 R14: 0000000000000014 R15: ffff8801c4e26540 FS: 0000000000000000(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000463610 CR3: 00000001c6698000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: skb_over_panic net/core/skbuff.c:109 [inline] skb_put+0x181/0x1c0 net/core/skbuff.c:1694 add_grhead.isra.24+0x42/0x3b0 net/ipv6/mcast.c:1695 add_grec+0xa55/0x1060 net/ipv6/mcast.c:1817 mld_send_cr net/ipv6/mcast.c:1903 [inline] mld_ifc_timer_expire+0x4d2/0x770 net/ipv6/mcast.c:2448 call_timer_fn+0x23b/0x840 kernel/time/timer.c:1320 expire_timers kernel/time/timer.c:1357 [inline] __run_timers+0x7e1/0xb60 kernel/time/timer.c:1660 run_timer_softirq+0x4c/0xb0 kernel/time/timer.c:1686 __do_softirq+0x29d/0xbb2 kernel/softirq.c:285 invoke_softirq kernel/softirq.c:365 [inline] irq_exit+0x1d3/0x210 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:540 [inline] smp_apic_timer_interrupt+0x16b/0x700 arch/x86/kernel/apic/apic.c:1052 apic_timer_interrupt+0xa9/0xb0 arch/x86/entry/entry_64.S:920 Signed-off-by: Eric Dumazet Reported-by: syzbot Tested-by: Xin Long Signed-off-by: David S. Miller net/ipv6/mcast.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 9d98e19ba08f6aa33a4a1414f3dfe8440e67530c Author: Yuval Shaia Date: Wed Dec 13 12:25:19 2017 +0200 IB/ipoib: Restore MM behavior in case of tx_ring allocation failure memalloc_noio_save modifies the behavior of MM, we must restore it after we are done. Fixes: d83187dda9b9 ("IB/IPoIB: Convert IPoIB to memalloc_noio_* calls") Signed-off-by: Yuval Shaia Signed-off-by: Jason Gunthorpe drivers/infiniband/ulp/ipoib/ipoib_cm.c | 1 + 1 file changed, 1 insertion(+) commit 6b782f43d34974c7909306fd9af06241d658a1f7 Author: Geert Uytterhoeven Date: Mon Dec 11 09:54:09 2017 +0100 Revert "ravb: add workaround for clock when resuming with WoL enabled" This reverts commit fbf3d034f2ff6264183cfa6845770e8cc2a986c8. As of commit 560869100b99a3da ("clk: renesas: cpg-mssr: Restore module clocks during resume"), the workaround is no longer needed. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) commit 366d8216488319ed29308b977cd62b7964a779b7 Author: Heiko Carstens Date: Wed Dec 13 09:21:59 2017 +0100 s390/sclp: disable FORTIFY_SOURCE for early sclp code Michal Suchánek reported the following compile error with FORTIFY_SOURCE enabled: drivers/s390/char/sclp_early_core.o: In function `memcpy': include/linux/string.h:340: undefined reference to `fortify_panic' To fix this simply disable FORTIFY_SOURCE on the early sclp code as well, which I forgot on the initial commit. Fixes: 79962038dffa ("s390: add support for FORTIFY_SOURCE") Reported-by: Michal Suchánek Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/char/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 4b4df570b41dbb421f52605357d5d56c872df6d9 Author: Keith Packard Date: Wed Dec 13 00:44:26 2017 -0800 drm: Update edid-derived drm_display_info fields at edid property set [v2] There are a set of values in the drm_display_info structure for each connector which hold information derived from EDID. These are computed in drm_add_display_info. Before this patch, that was only called in drm_add_edid_modes. This meant that they were only set when EDID was present and never reset when EDID was not, as happened when the display was disconnected. One of these fields, non_desktop, is used from drm_mode_connector_update_edid_property, the function responsible for assigning the new edid value to the application-visible property. Various drivers call these two functions (drm_add_edid_modes and drm_mode_connector_update_edid_property) in different orders. This means that even when EDID is present, the drm_display_info fields may not have been computed at the time that drm_mode_connector_update_edid_property used the non_desktop value to set the non_desktop property. I've added a public function (drm_reset_display_info) that resets the drm_display_info field values to default values and then made the drm_add_display_info function public. These two functions are now called directly from drm_mode_connector_update_edid_property so that the drm_display_info fields are always computed from the current EDID information before being used in that function. This means that the drm_display_info values are often computed twice, once when the EDID property it set and a second time when EDID is used to compute modes for the device. The alternative would be to uniformly ensure that the values were computed once before being used, which would require that all drivers reliably invoke the two paths in the same order. The computation is inexpensive enough that it seems more maintainable in the long term to simply compute them in both paths. The API to drm_add_display_info has been changed so that it no longer takes the set of edid-based quirks as a parameter. Rather, it now computes those quirks itself and returns them for further use by drm_add_edid_modes. This patch also includes a number of 'const' additions caused by drm_mode_connector_update_edid_property taking a 'const struct edid *' parameter and wanting to pass that along to drm_add_display_info. v2: after review by Daniel Vetter Removed EXPORT_SYMBOL_GPL for drm_reset_display_info and drm_add_display_info. Added FIXME in drm_mode_connector_update_edid_property about potentially merging that with drm_add_edid_modes to avoid the need for two driver calls. Signed-off-by: Keith Packard Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171213084427.31199-1-keithp@keithp.com (danvet: cherry picked from commit 12a889bf4bca ("drm: rework delayed connector cleanup in connector_iter") from drm-misc-next since functional conflict with changes in -next and we need to make sure both have the right version and nothing gets lost.) Signed-off-by: Daniel Vetter drivers/gpu/drm/drm_connector.c | 13 +++++++++++ drivers/gpu/drm/drm_edid.c | 52 ++++++++++++++++++++++++++++++----------- include/drm/drm_edid.h | 2 ++ 3 files changed, 53 insertions(+), 14 deletions(-) commit 48a4ff1c7bb5a32d2e396b03132d20d552c0eca7 Author: Alan Stern Date: Tue Dec 12 14:25:13 2017 -0500 USB: core: prevent malicious bNumInterfaces overflow A malicious USB device with crafted descriptors can cause the kernel to access unallocated memory by setting the bNumInterfaces value too high in a configuration descriptor. Although the value is adjusted during parsing, this adjustment is skipped in one of the error return paths. This patch prevents the problem by setting bNumInterfaces to 0 initially. The existing code already sets it to the proper value after parsing is complete. Signed-off-by: Alan Stern Reported-by: Andrey Konovalov CC: Signed-off-by: Greg Kroah-Hartman drivers/usb/core/config.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cf4df407e0d7cde60a45369c2a3414d18e2d4fdd Author: Greg Kroah-Hartman Date: Wed Dec 13 11:59:39 2017 +0100 Revert "USB: core: only clean up what we allocated" This reverts commit 32fd87b3bbf5f7a045546401dfe2894dbbf4d8c3. Alan wrote a better fix for this... Cc: Andrey Konovalov Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/config.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 92ccc262e485781ff4c0fb3b7c77a619282df49a Author: Mengting Zhang Date: Tue Dec 12 18:16:57 2017 +0000 tools/lib/lockdep: Add missing declaration of 'pr_cont()' Commit: 681fbec881de ("lockdep: Use consistent printing primitives") has moved lockdep away from using printk() for printing. The commit added usage of pr_cont() which wasn't wrapped in the userspace headers, causing the following warning for the liblockdep build: ../../../kernel/locking/lockdep.c:3544:2: warning: implicit declaration of function 'pr_cont' [-Wimplicit-function-declaration] Adding an empty declaration of 'pr_cont' fixes the problem. Signed-off-by: Mengting Zhang Signed-off-by: Sasha Levin Reviewed-by: Alexander Sverdlin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: a.p.zijlstra@chello.nl Link: http://lkml.kernel.org/r/20171212181644.11913-2-alexander.levin@verizon.com Signed-off-by: Ingo Molnar tools/include/linux/lockdep.h | 1 + 1 file changed, 1 insertion(+) commit faa75e147b583417273902552c61cf3250a44308 Author: Dongjiu Geng Date: Wed Dec 13 18:36:47 2017 +0800 arm64: fault: avoid send SIGBUS two times do_sea() calls arm64_notify_die() which will always signal user-space. It also returns whether APEI claimed the external abort as a RAS notification. If it returns failure do_mem_abort() will signal user-space too. do_mem_abort() wants to know if we handled the error, we always call arm64_notify_die() so can always return success. Signed-off-by: Dongjiu Geng Reviewed-by: James Morse Reviewed-by: Xie XiuQi Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a5f1005517534aeb1fac20180badfbf0896c183c Author: Sebastian Ott Date: Fri Dec 1 18:47:32 2017 +0100 s390/pci: handle insufficient resources during dma tlb flush In a virtualized setup lazy flushing can lead to the hypervisor running out of resources when lots of guest pages need to be pinned. In this situation simply trigger a global flush to give the hypervisor a chance to free some of these resources. Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Reviewed-by: Pierre Morel Signed-off-by: Martin Schwidefsky arch/s390/pci/pci_dma.c | 21 +++++++++++++++++++-- arch/s390/pci/pci_insn.c | 3 +++ 2 files changed, 22 insertions(+), 2 deletions(-) commit 110df8bd3e418b3476cae80babe8add48a8ea523 Author: Anju T Sudhakar Date: Thu Dec 7 22:53:27 2017 +0530 powerpc/perf: Fix kfree memory allocated for nest pmus imc_common_cpuhp_mem_free() is the common function for all IMC (In-memory Collection counters) domains to unregister cpuhotplug callback and free memory. Since kfree of memory allocated for nest-imc (per_nest_pmu_arr) is in the common code, all domains (core/nest/thread) can do the kfree in the failure case. This could potentially create a call trace as shown below, where core(/thread/nest) imc pmu initialization fails and in the failure path imc_common_cpuhp_mem_free() free the memory(per_nest_pmu_arr), which is allocated by successfully registered nest units. The call trace is generated in a scenario where core-imc initialization is made to fail and a cpuhotplug is performed in a p9 system. During cpuhotplug ppc_nest_imc_cpu_offline() tries to access per_nest_pmu_arr, which is already freed by core-imc. NIP [c000000000cb6a94] mutex_lock+0x34/0x90 LR [c000000000cb6a88] mutex_lock+0x28/0x90 Call Trace: mutex_lock+0x28/0x90 (unreliable) perf_pmu_migrate_context+0x90/0x3a0 ppc_nest_imc_cpu_offline+0x190/0x1f0 cpuhp_invoke_callback+0x160/0x820 cpuhp_thread_fun+0x1bc/0x270 smpboot_thread_fn+0x250/0x290 kthread+0x1a8/0x1b0 ret_from_kernel_thread+0x5c/0x74 To address this scenario do the kfree(per_nest_pmu_arr) only in case of nest-imc initialization failure, and when there is no other nest units registered. Fixes: 73ce9aec65b1 ("powerpc/perf: Fix IMC_MAX_PMU macro") Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/imc-pmu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ad2b6e01024ef23bddc3ce0bcb115ecd8c520b7e Author: Anju T Sudhakar Date: Tue Dec 5 11:00:38 2017 +0530 powerpc/perf/imc: Fix nest-imc cpuhotplug callback failure Oops is observed during boot: Faulting instruction address: 0xc000000000248340 cpu 0x0: Vector: 380 (Data Access Out of Range) at [c000000ff66fb850] pc: c000000000248340: event_function_call+0x50/0x1f0 lr: c00000000024878c: perf_remove_from_context+0x3c/0x100 sp: c000000ff66fbad0 msr: 9000000000009033 dar: 7d20e2a6f92d03c0 pid = 14, comm = cpuhp/0 While registering the cpuhotplug callbacks for nest-imc, if we fail in the cpuhotplug online path for any random node in a multi node system (because the opal call to stop nest-imc counters fails for that node), ppc_nest_imc_cpu_offline() will get invoked for other nodes who successfully returned from cpuhotplug online path. This call trace is generated since in the ppc_nest_imc_cpu_offline() path we are trying to migrate the event context, when nest-imc counters are not even initialized. Patch to add a check to ensure that nest-imc is registered before migrating the event context. Fixes: 885dcd709ba9 ("powerpc/perf: Add nest IMC PMU support") Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/imc-pmu.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit f41d84dddc66b164ac16acf3f584c276146f1c48 Author: Ravi Bangoria Date: Tue Dec 12 17:59:15 2017 +0530 powerpc/perf: Dereference BHRB entries safely It's theoretically possible that branch instructions recorded in BHRB (Branch History Rolling Buffer) entries have already been unmapped before they are processed by the kernel. Hence, trying to dereference such memory location will result in a crash. eg: Unable to handle kernel paging request for data at address 0xd000000019c41764 Faulting instruction address: 0xc000000000084a14 NIP [c000000000084a14] branch_target+0x4/0x70 LR [c0000000000eb828] record_and_restart+0x568/0x5c0 Call Trace: [c0000000000eb3b4] record_and_restart+0xf4/0x5c0 (unreliable) [c0000000000ec378] perf_event_interrupt+0x298/0x460 [c000000000027964] performance_monitor_exception+0x54/0x70 [c000000000009ba4] performance_monitor_common+0x114/0x120 Fix it by deferefencing the addresses safely. Fixes: 691231846ceb ("powerpc/perf: Fix setting of "to" addresses for BHRB") Cc: stable@vger.kernel.org # v3.10+ Suggested-by: Naveen N. Rao Signed-off-by: Ravi Bangoria Reviewed-by: Naveen N. Rao [mpe: Use probe_kernel_read() which is clearer, tweak change log] Signed-off-by: Michael Ellerman arch/powerpc/perf/core-book3s.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 964728f9f407eca0b417fdf8e784b7a76979490c Author: Johan Hovold Date: Mon Nov 13 11:12:58 2017 +0100 USB: chipidea: msm: fix ulpi-node lookup Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at the parent rather than just matching on its children. Note that the original premature free of the parent node has already been fixed separately, but that fix was apparently never backported to stable. Fixes: 47654a162081 ("usb: chipidea: msm: Restore wrapper settings after reset") Fixes: b74c43156c0c ("usb: chipidea: msm: ci_hdrc_msm_probe() missing of_node_get()") Cc: stable # 4.10: b74c43156c0c Cc: Stephen Boyd Cc: Frank Rowand Signed-off-by: Johan Hovold Signed-off-by: Peter Chen drivers/usb/chipidea/ci_hdrc_msm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d39a01eff9af1045f6e30ff9db40310517c4b45f Merge: a638349 532298b Author: Linus Torvalds Date: Tue Dec 12 17:19:58 2017 -0800 Merge tag 'platform-drivers-x86-v4.15-3' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver fixes from Darren Hart: - Correct an error in the evdev protocol in asus-wireless which results in dropped key events in recent versions of libinput - Add a quirk for keyboard lighting for a specific Dell laptop - Silence a static analysis warning regarding unchecked return values of small kmalloc() allocations in dell-wmi * tag 'platform-drivers-x86-v4.15-3' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: dell-wmi: check for kmalloc() errors platform/x86: asus-wireless: send an EV_SYN/SYN_REPORT between state changes platform/x86: dell-laptop: Fix keyboard max lighting for Dell Latitude E6410 commit 9147efcbe0b7cc96b18eb64b1a3f0d4bba81443c Author: Eric Dumazet Date: Tue Dec 12 14:22:39 2017 -0800 bpf: add schedule points to map alloc/free While using large percpu maps, htab_map_alloc() can hold cpu for hundreds of ms. This patch adds cond_resched() calls to percpu alloc/free call sites, all running in process context. Signed-off-by: Eric Dumazet Signed-off-by: Alexei Starovoitov kernel/bpf/hashtab.c | 2 ++ 1 file changed, 2 insertions(+) commit 45fd4470ba86e9ca2837b666a52cc65dc69f0fa3 Author: Jean Delvare Date: Thu Dec 7 12:25:45 2017 +0100 i2c: piix4: Fix port number check on release The port number shift is still hard-coded to 1 while it now depends on the hardware. Thankfully 0 is always 0 no matter how you shift it, so this was a bug without consequences. Signed-off-by: Jean Delvare Fixes: 0fe16195f891 ("i2c: piix4: Fix SMBus port selection for AMD Family 17h chips") Reviewed-by: Guenter Roeck Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-piix4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c41e452188339989c2c9ca5fc54f10935207968 Author: Benjamin Gaignard Date: Thu Nov 30 09:43:57 2017 +0100 i2c: stm32: Fix copyrights Uniformize STMicroelectronics copyrights headers and add SPDX identifier. Signed-off-by: Benjamin Gaignard Acked-by: Alexandre TORGUE Acked-by: Pierre-Yves MORDRET Acked-by: M'boumba Cedric Madianga Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-stm32.h | 3 ++- drivers/i2c/busses/i2c-stm32f4.c | 3 ++- drivers/i2c/busses/i2c-stm32f7.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit a3fe09bc03f31dd7351d8277348fa59bcec9cd20 Merge: 04271ce 7f6d2ec Author: Wolfram Sang Date: Tue Dec 12 23:08:33 2017 +0100 Merge tag 'at24-4.15-rc3-fixes-for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-current Sakari fixed a regression introduced during the 4.15 merge window and David submitted a fix for an issue that has existed in at24 since introducing nvmem. commit 0507f438ea19d4280006467ba02956f6a693deca Author: Monk Liu Date: Thu Nov 23 18:38:59 2017 +0800 drm/amdgpu: fix MAP_QUEUES paramter Should be 0. Signed-off-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13d3fc69a03721d972460fe2bff9b479f7999221 Author: Monk Liu Date: Fri Dec 1 18:23:56 2017 +0800 drm/ttm: max_cpages is in unit of native page fix calculation. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a782fc8cc6bf6909daf3b65630079e2afec316ef Author: Monk Liu Date: Fri Dec 1 18:21:34 2017 +0800 drm/ttm: fix incorrect calculate on shrink_pages shrink_pages is in unit of Order after ttm_page_pool_free, but it is used by nr_free in next round so need change it into native page unit Signed-off-by: Monk Liu Reviewed-by: Roger He Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 1 + 1 file changed, 1 insertion(+) commit 10a6a6975691775bbcc677a04c6fd3120b5c1160 Author: Cyrille Pitchen Date: Tue Dec 12 14:40:12 2017 +0100 Revert "dt-bindings: mtd: add sst25wf040b and en25s64 to sip-nor list" This reverts commit b07815d4eaf658b683c345d6e643895a20d92f29. The reverted commit was merged into v4-15-rc1 by mistake: it was taken from the IMX tree but the patch has never been sent to linux-mtd nor reviewed by any spi-nor maintainers. Actually, it would have been rejected since we add new values for the 'compatible' DT property only for SPI NOR memories that don't support the JEDEC READ ID op code (0x9F). Both en25s64 and sst25wf040b support the JEDEC READ ID op code, hence should use the "jedec,spi-nor" string alone as 'compatible' value. See the following link for more details: http://lists.infradead.org/pipermail/linux-mtd/2017-November/077425.html Signed-off-by: Cyrille Pitchen Acked-by: Marek Vasut Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt | 2 -- 1 file changed, 2 deletions(-) commit c8c5a3a24d395b14447a9a89d61586a913840a3b Author: Maciej W. Rozycki Date: Mon Dec 11 22:56:54 2017 +0000 MIPS: Disallow outsized PTRACE_SETREGSET NT_PRFPREG regset accesses Complement commit c23b3d1a5311 ("MIPS: ptrace: Change GP regset to use correct core dump register layout") and also reject outsized PTRACE_SETREGSET requests to the NT_PRFPREG regset, like with the NT_PRSTATUS regset. Signed-off-by: Maciej W. Rozycki Fixes: c23b3d1a5311 ("MIPS: ptrace: Change GP regset to use correct core dump register layout") Cc: James Hogan Cc: Paul Burton Cc: Alex Smith Cc: Dave Martin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # v3.17+ Patchwork: https://patchwork.linux-mips.org/patch/17930/ Signed-off-by: Ralf Baechle arch/mips/kernel/ptrace.c | 3 +++ 1 file changed, 3 insertions(+) commit 006501e039eec411842bb3150c41358867d320c2 Author: Maciej W. Rozycki Date: Mon Dec 11 22:55:40 2017 +0000 MIPS: Also verify sizeof `elf_fpreg_t' with PTRACE_SETREGSET Complement commit d614fd58a283 ("mips/ptrace: Preserve previous registers for short regset write") and like with the PTRACE_GETREGSET ptrace(2) request also apply a BUILD_BUG_ON check for the size of the `elf_fpreg_t' type in the PTRACE_SETREGSET request handler. Signed-off-by: Maciej W. Rozycki Fixes: d614fd58a283 ("mips/ptrace: Preserve previous registers for short regset write") Cc: James Hogan Cc: Paul Burton Cc: Alex Smith Cc: Dave Martin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # v4.11+ Patchwork: https://patchwork.linux-mips.org/patch/17929/ Signed-off-by: Ralf Baechle arch/mips/kernel/ptrace.c | 1 + 1 file changed, 1 insertion(+) commit be07a6a1188372b6d19a3307ec33211fc9c9439d Author: Maciej W. Rozycki Date: Mon Dec 11 22:54:33 2017 +0000 MIPS: Fix an FCSR access API regression with NT_PRFPREG and MSA Fix a commit 72b22bbad1e7 ("MIPS: Don't assume 64-bit FP registers for FP regset") public API regression, then activated by commit 1db1af84d6df ("MIPS: Basic MSA context switching support"), that caused the FCSR register not to be read or written for CONFIG_CPU_HAS_MSA kernel configurations (regardless of actual presence or absence of the MSA feature in a given processor) with ptrace(2) PTRACE_GETREGSET and PTRACE_SETREGSET requests nor recorded in core dumps. This is because with !CONFIG_CPU_HAS_MSA configurations the whole of `elf_fpregset_t' array is bulk-copied as it is, which includes the FCSR in one half of the last, 33rd slot, whereas with CONFIG_CPU_HAS_MSA configurations array elements are copied individually, and then only the leading 32 FGR slots while the remaining slot is ignored. Correct the code then such that only FGR slots are copied in the respective !MSA and MSA helpers an then the FCSR slot is handled separately in common code. Use `ptrace_setfcr31' to update the FCSR too, so that the read-only mask is respected. Retrieving a correct value of FCSR is important in debugging not only for the human to be able to get the right interpretation of the situation, but for correct operation of GDB as well. This is because the condition code bits in FSCR are used by GDB to determine the location to place a breakpoint at when single-stepping through an FPU branch instruction. If such a breakpoint is placed incorrectly (i.e. with the condition reversed), then it will be missed, likely causing the debuggee to run away from the control of GDB and consequently breaking the process of investigation. Fortunately GDB continues using the older PTRACE_GETFPREGS ptrace(2) request which is unaffected, so the regression only really hits with post-mortem debug sessions using a core dump file, in which case execution, and consequently single-stepping through branches is not possible. Of course core files created by buggy kernels out there will have the value of FCSR recorded clobbered, but such core files cannot be corrected and the person using them simply will have to be aware that the value of FCSR retrieved is not reliable. Which also means we can likely get away without defining a replacement API which would ensure a correct value of FSCR to be retrieved, or none at all. This is based on previous work by Alex Smith, extensively rewritten. Signed-off-by: Alex Smith Signed-off-by: James Hogan Signed-off-by: Maciej W. Rozycki Fixes: 72b22bbad1e7 ("MIPS: Don't assume 64-bit FP registers for FP regset") Cc: Paul Burton Cc: Dave Martin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # v3.15+ Patchwork: https://patchwork.linux-mips.org/patch/17928/ Signed-off-by: Ralf Baechle arch/mips/kernel/ptrace.c | 47 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) commit 80b3ffce0196ea50068885d085ff981e4b8396f4 Author: Maciej W. Rozycki Date: Mon Dec 11 22:53:14 2017 +0000 MIPS: Consistently handle buffer counter with PTRACE_SETREGSET Update commit d614fd58a283 ("mips/ptrace: Preserve previous registers for short regset write") bug and consistently consume all data supplied to `fpr_set_msa' with the ptrace(2) PTRACE_SETREGSET request, such that a zero data buffer counter is returned where insufficient data has been given to fill a whole number of FP general registers. In reality this is not going to happen, as the caller is supposed to only supply data covering a whole number of registers and it is verified in `ptrace_regset' and again asserted in `fpr_set', however structuring code such that the presence of trailing partial FP general register data causes `fpr_set_msa' to return with a non-zero data buffer counter makes it appear that this trailing data will be used if there are subsequent writes made to FP registers, which is going to be the case with the FCSR once the missing write to that register has been fixed. Fixes: d614fd58a283 ("mips/ptrace: Preserve previous registers for short regset write") Signed-off-by: Maciej W. Rozycki Cc: James Hogan Cc: Paul Burton Cc: Alex Smith Cc: Dave Martin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # v4.11+ Patchwork: https://patchwork.linux-mips.org/patch/17927/ Signed-off-by: Ralf Baechle arch/mips/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc24d0edf33c3e15099688b6bbdf7bdc24bf6e91 Author: Maciej W. Rozycki Date: Mon Dec 11 22:52:15 2017 +0000 MIPS: Guard against any partial write attempt with PTRACE_SETREGSET Complement commit d614fd58a283 ("mips/ptrace: Preserve previous registers for short regset write") and ensure that no partial register write attempt is made with PTRACE_SETREGSET, as we do not preinitialize any temporaries used to hold incoming register data and consequently random data could be written. It is the responsibility of the caller, such as `ptrace_regset', to arrange for writes to span whole registers only, so here we only assert that it has indeed happened. Signed-off-by: Maciej W. Rozycki Fixes: 72b22bbad1e7 ("MIPS: Don't assume 64-bit FP registers for FP regset") Cc: James Hogan Cc: Paul Burton Cc: Alex Smith Cc: Dave Martin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # v3.15+ Patchwork: https://patchwork.linux-mips.org/patch/17926/ Signed-off-by: Ralf Baechle arch/mips/kernel/ptrace.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit a03fe72572c12e98f4173f8a535f32468e48b6ec Author: Maciej W. Rozycki Date: Mon Dec 11 22:51:35 2017 +0000 MIPS: Factor out NT_PRFPREG regset access helpers In preparation to fix a commit 72b22bbad1e7 ("MIPS: Don't assume 64-bit FP registers for FP regset") FCSR access regression factor out NT_PRFPREG regset access helpers for the non-MSA and the MSA variants respectively, to avoid having to deal with excessive indentation in the actual fix. No functional change, however use `target->thread.fpu.fpr[0]' rather than `target->thread.fpu.fpr[i]' for FGR holding type size determination as there's no `i' variable to refer to anymore, and for the factored out `i' variable declaration use `unsigned int' rather than `unsigned' as its type, following the common style. Signed-off-by: Maciej W. Rozycki Fixes: 72b22bbad1e7 ("MIPS: Don't assume 64-bit FP registers for FP regset") Cc: James Hogan Cc: Paul Burton Cc: Alex Smith Cc: Dave Martin Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # v3.15+ Patchwork: https://patchwork.linux-mips.org/patch/17925/ Signed-off-by: Ralf Baechle arch/mips/kernel/ptrace.c | 108 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 83 insertions(+), 25 deletions(-) commit 9dbd2d948e7345595e5b90e44795c1e8ca3e5728 Merge: 30791ac 720f228 Author: Alexei Starovoitov Date: Tue Dec 12 09:52:08 2017 -0800 Merge branch 'bpf-misc-fixes' Daniel Borkmann says: ==================== Couple of outstanding fixes for BPF tree: 1) fixes a perf RB corruption, 2) and 3) fixes a few build issues from the recent bpf_perf_event.h uapi corrections. Thanks! ==================== Signed-off-by: Alexei Starovoitov commit 720f228e8d3128b7ab1d39f51fdd8da07a7640c9 Author: Daniel Borkmann Date: Tue Dec 12 02:25:32 2017 +0100 bpf: fix broken BPF selftest build At least on x86_64, the kernel's BPF selftests seemed to have stopped to build due to 618e165b2a8e ("selftests/bpf: sync kernel headers and introduce arch support in Makefile"): [...] In file included from test_verifier.c:29:0: ../../../include/uapi/linux/bpf_perf_event.h:11:32: fatal error: asm/bpf_perf_event.h: No such file or directory #include ^ compilation terminated. [...] While pulling in tools/arch/*/include/uapi/asm/bpf_perf_event.h seems to work fine, there's no automated fall-back logic right now that would do the same out of tools/include/uapi/asm-generic/bpf_perf_event.h. The usual convention today is to add a include/[uapi/]asm/ equivalent that would pull in the correct arch header or generic one as fall-back, all ifdef'ed based on compiler target definition. It's similarly done also in other cases such as tools/include/asm/barrier.h, thus adapt the same here. Fixes: 618e165b2a8e ("selftests/bpf: sync kernel headers and introduce arch support in Makefile") Signed-off-by: Daniel Borkmann Cc: Hendrik Brueckner Cc: Arnaldo Carvalho de Melo Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov tools/include/uapi/asm/bpf_perf_event.h | 7 +++++++ tools/testing/selftests/bpf/Makefile | 13 +------------ 2 files changed, 8 insertions(+), 12 deletions(-) commit a23f06f06dbe54696e8d4f156b317e8c9961c345 Author: Daniel Borkmann Date: Tue Dec 12 02:25:31 2017 +0100 bpf: fix build issues on um due to mising bpf_perf_event.h Since c895f6f703ad ("bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type") um (uml) won't build on i386 or x86_64: [...] CC init/main.o In file included from ../include/linux/perf_event.h:18:0, from ../include/linux/trace_events.h:10, from ../include/trace/syscall.h:7, from ../include/linux/syscalls.h:82, from ../init/main.c:20: ../include/uapi/linux/bpf_perf_event.h:11:32: fatal error: asm/bpf_perf_event.h: No such file or directory #include [...] Lets add missing bpf_perf_event.h also to um arch. This seems to be the only one still missing. Fixes: c895f6f703ad ("bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type") Reported-by: Randy Dunlap Suggested-by: Richard Weinberger Signed-off-by: Daniel Borkmann Tested-by: Randy Dunlap Cc: Hendrik Brueckner Cc: Richard Weinberger Acked-by: Alexei Starovoitov Acked-by: Richard Weinberger Signed-off-by: Alexei Starovoitov arch/um/include/asm/Kbuild | 1 + 1 file changed, 1 insertion(+) commit 283ca526a9bd75aed7350220d7b1f8027d99c3fd Author: Daniel Borkmann Date: Tue Dec 12 02:25:30 2017 +0100 bpf: fix corruption on concurrent perf_event_output calls When tracing and networking programs are both attached in the system and both use event-output helpers that eventually call into perf_event_output(), then we could end up in a situation where the tracing attached program runs in user context while a cls_bpf program is triggered on that same CPU out of softirq context. Since both rely on the same per-cpu perf_sample_data, we could potentially corrupt it. This can only ever happen in a combination of the two types; all tracing programs use a bpf_prog_active counter to bail out in case a program is already running on that CPU out of a different context. XDP and cls_bpf programs by themselves don't have this issue as they run in the same context only. Therefore, split both perf_sample_data so they cannot be accessed from each other. Fixes: 20b9d7ac4852 ("bpf: avoid excessive stack usage for perf_sample_data") Reported-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Tested-by: Song Liu Acked-by: Alexei Starovoitov Signed-off-by: Alexei Starovoitov kernel/trace/bpf_trace.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 0c31f1d7be1b5c4858b1d714dcefa25f41428cab Author: Geert Uytterhoeven Date: Thu Dec 7 11:15:19 2017 +0100 PCI: rcar: Fix use-after-free in probe error path If CONFIG_DEBUG_SLAB=y, and no PCIe card is inserted, the kernel crashes during probe on r8a7791/koelsch: rcar-pcie fe000000.pcie: PCIe link down Unable to handle kernel paging request at virtual address 6b6b6b6b (seeing this message requires earlycon and keep_bootcon). Indeed, pci_free_host_bridge() frees the PCI host bridge, including the embedded rcar_pcie object, so pci_free_resource_list() must not be called afterwards. To fix this, move the call to pci_free_resource_list() up, and update the label name accordingly. Fixes: ddd535f1ea3eb27e ("PCI: rcar: Fix memory leak when no PCIe card is inserted") Signed-off-by: Geert Uytterhoeven Signed-off-by: Bjorn Helgaas Acked-by: Simon Horman Acked-by: Lorenzo Pieralisi drivers/pci/host/pcie-rcar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 17278a91e04f858155d54bee5528ba4fbcec6f87 Author: James Hogan Date: Tue Nov 14 12:01:20 2017 +0000 MIPS: CPS: Fix r1 .set mt assembler warning MIPS CPS has a build warning on kernels configured for MIPS32R1 or MIPS64R1, due to the use of .set mt without a prior .set mips{32,64}r2: arch/mips/kernel/cps-vec.S Assembler messages: arch/mips/kernel/cps-vec.S:238: Warning: the `mt' extension requires MIPS32 revision 2 or greater Add .set MIPS_ISA_LEVEL_RAW before .set mt to silence the warning. Fixes: 245a7868d2f2 ("MIPS: smp-cps: rework core/VPE initialisation") Signed-off-by: James Hogan Cc: Paul Burton Cc: James Hogan Cc: James Hogan Cc: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17699/ Signed-off-by: Ralf Baechle arch/mips/kernel/cps-vec.S | 2 ++ 1 file changed, 2 insertions(+) commit 30791ac41927ebd3e75486f9504b6d2280463bf0 Author: Christoph Paasch Date: Mon Dec 11 00:05:46 2017 -0800 tcp md5sig: Use skb's saddr when replying to an incoming segment The MD5-key that belongs to a connection is identified by the peer's IP-address. When we are in tcp_v4(6)_reqsk_send_ack(), we are replying to an incoming segment from tcp_check_req() that failed the seq-number checks. Thus, to find the correct key, we need to use the skb's saddr and not the daddr. This bug seems to have been there since quite a while, but probably got unnoticed because the consequences are not catastrophic. We will call tcp_v4_reqsk_send_ack only to send a challenge-ACK back to the peer, thus the connection doesn't really fail. Fixes: 9501f9722922 ("tcp md5sig: Let the caller pass appropriate key for tcp_v{4,6}_do_calc_md5_hash().") Signed-off-by: Christoph Paasch Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 2 +- net/ipv6/tcp_ipv6.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e7fd37ba12170cc414be8b639dfc2c5f7172fac2 Author: Ma Shimiao Date: Tue Dec 12 09:43:49 2017 +0800 cgroup: avoid copying strings longer than the buffers cgroup root name and file name have max length limit, we should avoid copying longer name than that to the name. tj: minor update to $SUBJ. Signed-off-by: Ma Shimiao Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c4f9d9cb2c29ff04c6b4bb09b72802d8aedfc7cb Author: Jan Beulich Date: Tue Dec 12 03:18:11 2017 -0700 xen: XEN_ACPI_PROCESSOR is Dom0-only Add a respective dependency. Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f3922a9b99eca76c6578cd84191573378f2c988 Author: Jan Beulich Date: Fri Dec 8 04:17:28 2017 -0700 x86/Xen: don't report ancient LAPIC version Unconditionally reporting a value seen on the P4 or older invokes functionality like io_apic_get_unique_id() on 32-bit builds, resulting in a panic() with sufficiently many CPUs and/or IO-APICs. Doing what that function does would be the hypervisor's responsibility anyway, so makes no sense to be used when running on Xen. Uniformly report a more modern version; this shouldn't matter much as both LAPIC and IO-APIC are being managed entirely / mostly by the hypervisor. Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky arch/x86/xen/apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8cb562b1d56fad42cbee44bdc9bc64cea41a0a8c Author: Mark Rutland Date: Mon Nov 27 10:38:24 2017 +0000 checkpatch: Remove ACCESS_ONCE() warning Now that ACCESS_ONCE() has been excised from the kernel, any uses will result in a build error, and we no longer need to whine about it in checkpatch. This patch removes the newly redundant warning. Tested-by: Paul E. McKenney Signed-off-by: Mark Rutland Acked-by: Joe Perches Cc: Andy Whitcroft Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: acme@redhat.com Link: http://lkml.kernel.org/r/20171127103824.36526-5-mark.rutland@arm.com Signed-off-by: Ingo Molnar scripts/checkpatch.pl | 22 ---------------------- 1 file changed, 22 deletions(-) commit b899a850431e2dd0943205a63a68573f3e312d0d Author: Mark Rutland Date: Mon Nov 27 10:38:23 2017 +0000 compiler.h: Remove ACCESS_ONCE() There are no longer any kernelspace uses of ACCESS_ONCE(), so we can remove the definition from . This patch removes the ACCESS_ONCE() definition, and updates comments which referred to it. At the same time, some inconsistent and redundant whitespace is removed from comments. Tested-by: Paul E. McKenney Signed-off-by: Mark Rutland Cc: Arnaldo Carvalho de Melo Cc: Joe Perches Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: apw@canonical.com Link: http://lkml.kernel.org/r/20171127103824.36526-4-mark.rutland@arm.com Signed-off-by: Ingo Molnar include/linux/compiler.h | 47 +++++++++++------------------------------------ 1 file changed, 11 insertions(+), 36 deletions(-) commit 2a22f692bbe0a7933acbd50045479ffc0fdf11f7 Author: Mark Rutland Date: Mon Nov 27 10:38:22 2017 +0000 tools/include: Remove ACCESS_ONCE() There are no longer any usersapce uses of ACCESS_ONCE(), so we can remove the definition from our userspace , which is only used by tools in the kernel directory (i.e. it isn't a uapi header). This patch removes the ACCESS_ONCE() definition, and updates comments which referred to it. At the same time, some inconsistent and redundant whitespace is removed from comments. Tested-by: Paul E. McKenney Signed-off-by: Mark Rutland Cc: Arnaldo Carvalho de Melo Cc: Joe Perches Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: apw@canonical.com Link: http://lkml.kernel.org/r/20171127103824.36526-3-mark.rutland@arm.com Signed-off-by: Ingo Molnar tools/include/linux/compiler.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit f971e511cb7d6f1b3730248cf2967d3ccdd8874c Author: Mark Rutland Date: Mon Nov 27 10:38:21 2017 +0000 tools/perf: Convert ACCESS_ONCE() to READ_ONCE() Recently there was a treewide conversion of ACCESS_ONCE() to {READ,WRITE}_ONCE(), but a new use was introduced concurrently by commit: 1695849735752d2a ("perf mmap: Move perf_mmap and methods to separate mmap.[ch] files") Let's convert this over to READ_ONCE() so that we can remove the ACCESS_ONCE() definitions in subsequent patches. Tested-by: Paul E. McKenney Signed-off-by: Mark Rutland Reviewed-by: Paul E. McKenney Cc: Arnaldo Carvalho de Melo Cc: Joe Perches Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: apw@canonical.com Link: http://lkml.kernel.org/r/20171127103824.36526-2-mark.rutland@arm.com Signed-off-by: Ingo Molnar tools/perf/util/mmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32fd87b3bbf5f7a045546401dfe2894dbbf4d8c3 Author: Andrey Konovalov Date: Mon Dec 11 22:48:41 2017 +0100 USB: core: only clean up what we allocated When cleaning up the configurations, make sure we only free the number of configurations and interfaces that we could have allocated. Reported-by: Andrey Konovalov Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/config.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 0e17cada2a5b4dc847082e1db0e3f84599ffd436 Author: Will Deacon Date: Tue Dec 12 11:53:26 2017 +0000 arm64: hw_breakpoint: Use linux/uaccess.h instead of asm/uaccess.h The only inclusion of asm/uaccess.h should be by linux/uaccess.h. All other headers should use the latter. Reported-by: Al Viro Signed-off-by: Will Deacon arch/arm64/kernel/hw_breakpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1ed47355467d03639b750570b4324f7c1eed68c Merge: 72b663a 9dbe416 Author: Greg Kroah-Hartman Date: Tue Dec 12 12:51:05 2017 +0100 Merge tag 'fixes-for-v4.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.15-rc4 We have a few fixes on dwc3: - one fix which only happens with some implementations where we need to wait longer for some commands to finish. - Another fix for high-bandwidth isochronous endpoint programming making sure that we send the correct DATA tokens in the correct sequence - A couple PM fixes on dwc3-of-simple The other synopsys controller driver (dwc2) got a fix for FIFO size programming. Other than these, we have a couple Kconfig fixes making sure that dependencies are properly setup. commit 932b50c7c1c65e6f23002e075b97ee083c4a9e71 Author: Shanker Donthineni Date: Mon Dec 11 16:42:32 2017 -0600 arm64: Add software workaround for Falkor erratum 1041 The ARM architecture defines the memory locations that are permitted to be accessed as the result of a speculative instruction fetch from an exception level for which all stages of translation are disabled. Specifically, the core is permitted to speculatively fetch from the 4KB region containing the current program counter 4K and next 4K. When translation is changed from enabled to disabled for the running exception level (SCTLR_ELn[M] changed from a value of 1 to 0), the Falkor core may errantly speculatively access memory locations outside of the 4KB region permitted by the architecture. The errant memory access may lead to one of the following unexpected behaviors. 1) A System Error Interrupt (SEI) being raised by the Falkor core due to the errant memory access attempting to access a region of memory that is protected by a slave-side memory protection unit. 2) Unpredictable device behavior due to a speculative read from device memory. This behavior may only occur if the instruction cache is disabled prior to or coincident with translation being changed from enabled to disabled. The conditions leading to this erratum will not occur when either of the following occur: 1) A higher exception level disables translation of a lower exception level (e.g. EL2 changing SCTLR_EL1[M] from a value of 1 to 0). 2) An exception level disabling its stage-1 translation if its stage-2 translation is enabled (e.g. EL1 changing SCTLR_EL1[M] from a value of 1 to 0 when HCR_EL2[VM] has a value of 1). To avoid the errant behavior, software must execute an ISB immediately prior to executing the MSR that will change SCTLR_ELn[M] from 1 to 0. Signed-off-by: Shanker Donthineni Signed-off-by: Will Deacon Documentation/arm64/silicon-errata.txt | 1 + arch/arm64/Kconfig | 12 +++++++++++- arch/arm64/include/asm/assembler.h | 10 ++++++++++ arch/arm64/kernel/cpu-reset.S | 1 + arch/arm64/kernel/efi-entry.S | 2 ++ arch/arm64/kernel/head.S | 1 + arch/arm64/kernel/relocate_kernel.S | 1 + arch/arm64/kvm/hyp-init.S | 1 + 8 files changed, 28 insertions(+), 1 deletion(-) commit c622cc013cece073722592cff1ac6643a33b1622 Author: Shanker Donthineni Date: Mon Dec 11 16:42:31 2017 -0600 arm64: Define cputype macros for Falkor CPU Add cputype definition macros for Qualcomm Datacenter Technologies Falkor CPU in cputype.h. It's unfortunate that the first revision of the Falkor CPU used the wrong part number 0x800, got fixed in v2 chip with part number 0xC00, and would be used the same value for future revisions. Signed-off-by: Shanker Donthineni Signed-off-by: Will Deacon arch/arm64/include/asm/cputype.h | 2 ++ 1 file changed, 2 insertions(+) commit 86c9e8126e9fbcbf06c36e285168b880369a537c Author: Will Deacon Date: Tue Dec 12 10:48:54 2017 +0000 arm64: mm: Fix false positives in set_pte_at access/dirty race detection Jiankang reports that our race detection in set_pte_at is firing when copying the page tables in dup_mmap as a result of a fork(). In this situation, the page table isn't actually live and so there is no way that we can race with a concurrent update from the hardware page table walker. This patch reworks the race detection so that we require either the mm to match the current active_mm (i.e. currently installed in our TTBR0) or the mm_users count to be greater than 1, implying that the page table could be live in another CPU. The mm_users check might still be racy, but we'll avoid false positives and it's not realistic to validate that all the necessary locks are held as part of this assertion. Cc: Yisheng Xie Reported-by: Jiankang Chen Tested-by: Jiankang Chen Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e966eaeeb623f09975ef362c2866fae6f86844f9 Author: Ingo Molnar Date: Tue Dec 12 12:31:16 2017 +0100 locking/lockdep: Remove the cross-release locking checks This code (CONFIG_LOCKDEP_CROSSRELEASE=y and CONFIG_LOCKDEP_COMPLETIONS=y), while it found a number of old bugs initially, was also causing too many false positives that caused people to disable lockdep - which is arguably a worse overall outcome. If we disable cross-release by default but keep the code upstream then in practice the most likely outcome is that we'll allow the situation to degrade gradually, by allowing entropy to introduce more and more false positives, until it overwhelms maintenance capacity. Another bad side effect was that people were trying to work around the false positives by uglifying/complicating unrelated code. There's a marked difference between annotating locking operations and uglifying good code just due to bad lock debugging code ... This gradual decrease in quality happened to a number of debugging facilities in the kernel, and lockdep is pretty complex already, so we cannot risk this outcome. Either cross-release checking can be done right with no false positives, or it should not be included in the upstream kernel. ( Note that it might make sense to maintain it out of tree and go through the false positives every now and then and see whether new bugs were introduced. ) Cc: Byungchul Park Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar Documentation/locking/crossrelease.txt | 874 --------------------------------- include/linux/completion.h | 45 -- include/linux/lockdep.h | 125 ----- include/linux/sched.h | 11 - kernel/locking/lockdep.c | 652 ++---------------------- lib/Kconfig.debug | 33 -- 6 files changed, 35 insertions(+), 1705 deletions(-) commit 9dbe416b656bb015fc49fc17961000ffa418838a Author: Felipe Balbi Date: Tue Dec 12 12:44:40 2017 +0200 Revert "usb: gadget: allow to enable legacy drivers without USB_ETH" This reverts commit 7a9618a22aadffb55027d665491adf466bced61a. Romain Izard recently reported that commit 7a9618a22aad ended up allowing every legacy gadget driver to statically linked to the kernel, however that doesn't work, since only one legacy gadget can be bound to a controller. Because of that, let's revert the original commit and fix the problem. Reported-by: Romain Izard Signed-off-by: Felipe Balbi drivers/usb/gadget/Kconfig | 4 ++-- drivers/usb/gadget/legacy/Kconfig | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) commit 54eed78c5c831ba696259f7fa69966d699a173b1 Author: Arnd Bergmann Date: Mon Dec 11 12:30:14 2017 +0100 usb: gadget: webcam: fix V4L2 Kconfig dependency Configuring the USB_G_WEBCAM driver as built-in leads to a link error when CONFIG_VIDEO_V4L2 is a loadable module: drivers/usb/gadget/function/f_uvc.o: In function `uvc_function_setup': f_uvc.c:(.text+0xfe): undefined reference to `v4l2_event_queue' drivers/usb/gadget/function/f_uvc.o: In function `uvc_function_ep0_complete': f_uvc.c:(.text+0x188): undefined reference to `v4l2_event_queue' This changes the Kconfig dependency to disallow that configuration, and force it to be a module in that case as well. This is apparently a rather old bug, but very hard to trigger even in thousands of randconfig builds. Signed-off-by: Arnd Bergmann Signed-off-by: Felipe Balbi drivers/usb/gadget/legacy/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d89c70356acf11b7cf47ca5cfcafae5062a85451 Author: Will Deacon Date: Tue Nov 28 18:42:19 2017 +0000 locking/core: Remove break_lock field when CONFIG_GENERIC_LOCKBREAK=y When CONFIG_GENERIC_LOCKBEAK=y, locking structures grow an extra int ->break_lock field which is used to implement raw_spin_is_contended() by setting the field to 1 when waiting on a lock and clearing it to zero when holding a lock. However, there are a few problems with this approach: - There is a write-write race between a CPU successfully taking the lock (and subsequently writing break_lock = 0) and a waiter waiting on the lock (and subsequently writing break_lock = 1). This could result in a contended lock being reported as uncontended and vice-versa. - On machines with store buffers, nothing guarantees that the writes to break_lock are visible to other CPUs at any particular time. - READ_ONCE/WRITE_ONCE are not used, so the field is potentially susceptible to harmful compiler optimisations, Consequently, the usefulness of this field is unclear and we'd be better off removing it and allowing architectures to implement raw_spin_is_contended() by providing a definition of arch_spin_is_contended(), as they can when CONFIG_GENERIC_LOCKBREAK=n. Signed-off-by: Will Deacon Acked-by: Peter Zijlstra Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Sebastian Ott Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1511894539-7988-3-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar include/linux/rwlock_types.h | 3 --- include/linux/spinlock.h | 5 ----- include/linux/spinlock_types.h | 3 --- kernel/locking/spinlock.c | 9 +-------- 4 files changed, 1 insertion(+), 19 deletions(-) commit f87f3a328dbbb3e79dd53e7e889ced9222512649 Author: Will Deacon Date: Tue Nov 28 18:42:18 2017 +0000 locking/core: Fix deadlock during boot on systems with GENERIC_LOCKBREAK Commit: a8a217c22116 ("locking/core: Remove {read,spin,write}_can_lock()") removed the definition of raw_spin_can_lock(), causing the GENERIC_LOCKBREAK spin_lock() routines to poll the ->break_lock field when waiting on a lock. This has been reported to cause a deadlock during boot on s390, because the ->break_lock field is also set by the waiters, and can potentially remain set indefinitely if no other CPUs come in to take the lock after it has been released. This patch removes the explicit spinning on ->break_lock from the waiters, instead relying on the outer trylock() operation to determine when the lock is available. Reported-by: Sebastian Ott Tested-by: Sebastian Ott Signed-off-by: Will Deacon Acked-by: Peter Zijlstra Cc: Heiko Carstens Cc: Linus Torvalds Cc: Martin Schwidefsky Cc: Thomas Gleixner Fixes: a8a217c22116 ("locking/core: Remove {read,spin,write}_can_lock()") Link: http://lkml.kernel.org/r/1511894539-7988-2-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar kernel/locking/spinlock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d2b3c353595a855794f8b9df5b5bdbe8deb0c413 Author: Mika Westerberg Date: Mon Dec 4 12:11:02 2017 +0300 pinctrl: cherryview: Mask all interrupts on Intel_Strago based systems Guenter Roeck reported an interrupt storm on a prototype system which is based on Cyan Chromebook. The root cause turned out to be a incorrectly configured pin that triggers spurious interrupts. This will be fixed in coreboot but currently we need to prevent the interrupt storm from happening by masking all interrupts (but not GPEs) on those systems. Link: https://bugzilla.kernel.org/show_bug.cgi?id=197953 Fixes: bcb48cca23ec ("pinctrl: cherryview: Do not mask all interrupts in probe") Reported-and-tested-by: Guenter Roeck Reported-by: Dmitry Torokhov Signed-off-by: Mika Westerberg Cc: stable@vger.kernel.org Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-cherryview.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit d2950278d2d04ff5314abeb38d9c59c4e7c0ee53 Author: Florian Westphal Date: Mon Dec 11 18:23:09 2017 +0100 xfrm: put policies when reusing pcpu xdst entry We need to put the policies when re-using the pcpu xdst entry, else this leaks the reference. Fixes: ec30d78c14a813db39a647b6a348b428 ("xfrm: add xdst pcpu cache") Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 1 + 1 file changed, 1 insertion(+) commit 14e3062fb18532175af4d1c4073597999f7a2248 Author: Bart Van Assche Date: Tue Dec 5 16:57:51 2017 -0800 scsi: core: Fix a scsi_show_rq() NULL pointer dereference Avoid that scsi_show_rq() triggers a NULL pointer dereference if called after sd_uninit_command(). Swap the NULL pointer assignment and the mempool_free() call in sd_uninit_command() to make it less likely that scsi_show_rq() triggers a use-after-free. Note: even with these changes scsi_show_rq() can trigger a use-after-free but that's a lesser evil than e.g. suppressing debug information for T10 PI Type 2 commands completely. This patch fixes the following oops: BUG: unable to handle kernel NULL pointer dereference at (null) IP: scsi_format_opcode_name+0x1a/0x1c0 CPU: 1 PID: 1881 Comm: cat Not tainted 4.14.0-rc2.blk_mq_io_hang+ #516 Call Trace: __scsi_format_command+0x27/0xc0 scsi_show_rq+0x5c/0xc0 __blk_mq_debugfs_rq_show+0x116/0x130 blk_mq_debugfs_rq_show+0xe/0x10 seq_read+0xfe/0x3b0 full_proxy_read+0x54/0x90 __vfs_read+0x37/0x160 vfs_read+0x96/0x130 SyS_read+0x55/0xc0 entry_SYSCALL_64_fastpath+0x1a/0xa5 [mkp: added Type 2] Fixes: 0eebd005dd07 ("scsi: Implement blk_mq_ops.show_rq()") Reported-by: Ming Lei Signed-off-by: Bart Van Assche Cc: James E.J. Bottomley Cc: Martin K. Petersen Cc: Ming Lei Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: stable@vger.kernel.org Signed-off-by: Martin K. Petersen drivers/scsi/scsi_debugfs.c | 6 ++++-- drivers/scsi/sd.c | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) commit 3e5c63565aca5fbd1cc150cb2ca77154fc50fa0c Author: Johannes Thumshirn Date: Mon Dec 11 10:09:30 2017 +0100 scsi: MAINTAINERS: change FCoE list to linux-scsi fcoe-devel@open-fcoe.org is defunct and all patches are routed via the SCSI tree anyways. So update MAINTAINERS accordingly. Signed-off-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 621f6401fdeefe96dfe9eab4b167c7c39f552bb0 Author: Jason Yan Date: Mon Dec 11 15:03:33 2017 +0800 scsi: libsas: fix length error in sas_smp_handler() The return value of smp_execute_task_sg() is the untransferred residual, but bsg_job_done() requires the length of payload received. This makes SMP passthrough commands from userland by sg ioctl to libsas get a wrong response. The userland tools such as smp_utils failed because of these wrong responses: ~#smp_discover /dev/bsg/expander-2\:13 response too short, len=0 ~#smp_discover /dev/bsg/expander-2\:134 response too short, len=0 Fix this by passing the actual received length to bsg_job_done(). And if smp_execute_task_sg() returns 0, this means received length is exactly the buffer length. [mkp: typo] Fixes: 651a01364994 ("scsi: scsi_transport_sas: switch to bsg-lib for SMP passthrough") Cc: # v4.14+ Signed-off-by: Jason Yan Reported-by: chenqilin Tested-by: chenqilin CC: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_expander.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 532298b95075144bcccf56d792f3fb3fbef2d5d0 Author: Dan Carpenter Date: Mon Dec 11 13:54:27 2017 +0300 platform/x86: dell-wmi: check for kmalloc() errors This allocation won't fail in the current kernel because it's small but not checking for kmalloc() failures introduces static checker warnings so let's fix it. Signed-off-by: Dan Carpenter Reviewed-by: Mario Limonciello Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-wmi.c | 2 ++ 1 file changed, 2 insertions(+) commit bff5bf9db1c9453ffd0a78abed3e2d040c092fd9 Author: Peter Hutterer Date: Mon Dec 4 10:26:17 2017 +1000 platform/x86: asus-wireless: send an EV_SYN/SYN_REPORT between state changes Sending the switch state change twice within the same frame is invalid evdev protocol and only works if the client handles keys immediately as well. Processing events immediately is incorrect, it forces a fake order of events that does not exist on the device. Recent versions of libinput changed to only process the device state and SYN_REPORT time, so now the key event is lost. https://bugs.freedesktop.org/show_bug.cgi?id=104041 Signed-off-by: Peter Hutterer Signed-off-by: Darren Hart (VMware) drivers/platform/x86/asus-wireless.c | 1 + 1 file changed, 1 insertion(+) commit 68a213d325c23d39f109f4c7c824b906a7d209de Author: Pali Rohár Date: Thu Nov 2 21:25:24 2017 +0100 platform/x86: dell-laptop: Fix keyboard max lighting for Dell Latitude E6410 This machine reports number of keyboard backlight led levels, instead of value of the last led level index. Therefore max_brightness properly needs to be subtracted by 1 to match led max_brightness API. Signed-off-by: Pali Rohár Reported-by: Gabriel M. Elder Link: https://bugzilla.kernel.org/show_bug.cgi?id=196913 Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-laptop.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit a638349bf6c29433b938141f99225b160551ff48 Merge: 085bec8 abee210 Author: Linus Torvalds Date: Mon Dec 11 17:13:03 2017 -0800 Merge branch 'for-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu Pull percpu fix from Tejun Heo: "Just one patch to work around CRIS boot problem caused by a recent change which freed a temporary boot data structure. The root cause is on CRIS side but it doesn't seem trivial to fix. For now, work around by skipping freeing on CRIS" * 'for-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: hack to let the CRIS architecture to boot until they clean up commit 085bec853afdbf3edf1b554defaac606a7e3f0c2 Merge: 72dd379 c2f31b7 Author: Linus Torvalds Date: Mon Dec 11 17:10:05 2017 -0800 Merge branch 'for-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: - Prateek posted a couple patches to fix a deadlock involving cpuset and workqueue. It unfortunately caused a different deadlock and the recent workqueue hotplug simplification removed the original deadlock, so Prateek's two patches are reverted for now. - The new stat code was missing u64_stats initialization. Fixed. - Doc and other misc changes * 'for-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: add warning about RT not being supported on cgroup2 Revert "cgroup/cpuset: remove circular dependency deadlock" Revert "cpuset: Make cpuset hotplug synchronous" cgroup: properly init u64_stats debug cgroup: use task_css_set instead of rcu_dereference cpuset: Make cpuset hotplug synchronous cgroup/cpuset: remove circular dependency deadlock commit 72dd379e67fb6c4f4b0ed8ee36e9fed78227f352 Merge: a83cb7e 01dfee9 Author: Linus Torvalds Date: Mon Dec 11 17:07:26 2017 -0800 Merge branch 'for-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fixes from Tejun Heo: - Lai's hotplug simplifications inadvertently fix a possible deadlock involving cpuset and workqueue - CPU isolation fix which was reverted due to the changes in the housekeeping code resurrected - A trivial unused include removal * 'for-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: remove unneeded kallsyms include workqueue/hotplug: remove the workaround in rebind_workers() workqueue/hotplug: simplify workqueue_offline_cpu() workqueue: respect isolated cpus when queueing an unbound work main: kernel_start: move housekeeping_init() before workqueue_init_early() commit a83cb7e6ada140f8b932c223511f1063c4150870 Merge: bfb529e 2dc0b46 Author: Linus Torvalds Date: Mon Dec 11 17:05:33 2017 -0800 Merge branch 'for-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixes from Tejun Heo: "Nothing too interesting. David Milburn improved a corner case misbehavior during hotplug. Other than that, minor driver-specific fixes" * 'for-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: libata: sata_down_spd_limit should return if driver has not recorded sstatus speed ahci: mtk: Change driver name to ahci-mtk ahci: qoriq: refine port register configuration pata_pdc2027x : make pdc2027x_*_timing structures const pata_pdc2027x: Remove unnecessary error check ata: mediatek: Fix typo in module description commit bfb529ee790f5c3b1efd892d48c0b8d1449849f4 Merge: 916b20e 51614b26 Author: Linus Torvalds Date: Mon Dec 11 17:01:59 2017 -0800 Merge tag 'for-linus-4.15-2' of git://github.com/cminyard/linux-ipmi Pull IPMI fixes from Corey Minyard. * tag 'for-linus-4.15-2' of git://github.com/cminyard/linux-ipmi: ipmi_si: fix crash on parisc ipmi_si: Fix oops with PCI devices ipmi: Stop timers before cleaning up the module commit 916b20e02e1579fcca139b04ccfe25d61594faa8 Merge: 50c4c4e ecaaab5 Author: Linus Torvalds Date: Mon Dec 11 16:32:45 2017 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "This push fixes the following issues: - buffer overread in RSA - potential use after free in algif_aead. - error path null pointer dereference in af_alg - forbid combinations such as hmac(hmac(sha3)) which may crash - crash in salsa20 due to incorrect API usage" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: salsa20 - fix blkcipher_walk API usage crypto: hmac - require that the underlying hash algorithm is unkeyed crypto: af_alg - fix NULL pointer dereference in crypto: algif_aead - fix reference counting of null skcipher crypto: rsa - fix buffer overread when stripping leading zeroes commit c058ecf6e455fac7346d46197a02398ead90851f Author: Steve Wise Date: Mon Nov 27 13:16:32 2017 -0800 iw_cxgb4: only insert drain cqes if wq is flushed Only insert our special drain CQEs to support ib_drain_sq/rq() after the wq is flushed. Otherwise, existing but not yet polled CQEs can be returned out of order to the user application. This can happen when the QP has exited RTS but not yet flushed the QP, which can happen during a normal close (vs abortive close). In addition never count the drain CQEs when determining how many CQEs need to be synthesized during the flush operation. This latter issue should never happen if the QP is properly flushed before inserting the drain CQE, but I wanted to avoid corrupting the CQ state. So we handle it and log a warning once. Fixes: 4fe7c2962e11 ("iw_cxgb4: refactor sq/rq drain logic") Signed-off-by: Steve Wise Cc: stable@vger.kernel.org Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/cxgb4/cq.c | 5 +++++ drivers/infiniband/hw/cxgb4/qp.c | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) commit 9d5afec6b8bd46d6ed821aa1579634437f58ef1f Author: Chandan Rajendra Date: Mon Dec 11 15:00:57 2017 -0500 ext4: fix crash when a directory's i_size is too small On a ppc64 machine, when mounting a fuzzed ext2 image (generated by fsfuzzer) the following call trace is seen, VFS: brelse: Trying to free free buffer WARNING: CPU: 1 PID: 6913 at /root/repos/linux/fs/buffer.c:1165 .__brelse.part.6+0x24/0x40 .__brelse.part.6+0x20/0x40 (unreliable) .ext4_find_entry+0x384/0x4f0 .ext4_lookup+0x84/0x250 .lookup_slow+0xdc/0x230 .walk_component+0x268/0x400 .path_lookupat+0xec/0x2d0 .filename_lookup+0x9c/0x1d0 .vfs_statx+0x98/0x140 .SyS_newfstatat+0x48/0x80 system_call+0x58/0x6c This happens because the directory that ext4_find_entry() looks up has inode->i_size that is less than the block size of the filesystem. This causes 'nblocks' to have a value of zero. ext4_bread_batch() ends up not reading any of the directory file's blocks. This renders the entries in bh_use[] array to continue to have garbage data. buffer_uptodate() on bh_use[0] can then return a zero value upon which brelse() function is invoked. This commit fixes the bug by returning -ENOENT when the directory file has no associated blocks. Reported-by: Abdul Haleem Signed-off-by: Chandan Rajendra Cc: stable@vger.kernel.org fs/ext4/namei.c | 4 ++++ 1 file changed, 4 insertions(+) commit 200809716aed1cac586fcac4c0551a688439be1f Author: Xin Long Date: Sun Dec 10 16:56:00 2017 +0800 fou: fix some member types in guehdr guehdr struct is used to build or parse gue packets, which are always in big endian. It's better to define all guehdr members as __beXX types. Also, in validate_gue_flags it's not good to use a __be32 variable for both Standard flags(__be16) and Private flags (__be32), and pass it to other funcions. This patch could fix a bunch of sparse warnings from fou. Fixes: 5024c33ac354 ("gue: Add infrastructure for flags and options") Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/gue.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 2342b8d95bcae5946e1b9b8d58645f37500ef2e7 Author: Xin Long Date: Sun Dec 10 15:40:51 2017 +0800 sctp: make sure stream nums can match optlen in sctp_setsockopt_reset_streams Now in sctp_setsockopt_reset_streams, it only does the check optlen < sizeof(*params) for optlen. But it's not enough, as params->srs_number_streams should also match optlen. If the streams in params->srs_stream_list are less than stream nums in params->srs_number_streams, later when dereferencing the stream list, it could cause a slab-out-of-bounds crash, as reported by syzbot. This patch is to fix it by also checking the stream numbers in sctp_setsockopt_reset_streams to make sure at least it's not greater than the streams in the list. Fixes: 7f9d68ac944e ("sctp: implement sender-side procedures for SSN Reset Request Parameter") Reported-by: Dmitry Vyukov Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/socket.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8f659a03a0ba9289b9aeb9b4470e6fb263d6f483 Author: Mohamed Ghannam Date: Sun Dec 10 03:50:58 2017 +0000 net: ipv4: fix for a race condition in raw_sendmsg inet->hdrincl is racy, and could lead to uninitialized stack pointer usage, so its value should be read only once. Fixes: c008ba5bdc9f ("ipv4: Avoid reading user iov twice after raw_probe_proto_opt") Signed-off-by: Mohamed Ghannam Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/raw.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 0a373d4fc248cb707821d7dad54ce6d5bcb0cdfe Author: Andrey Ryabinin Date: Thu Nov 30 15:35:54 2017 +0300 x86/unwinder/guess: Prevent using CONFIG_UNWINDER_GUESS=y with CONFIG_STACKDEPOT=y Stackdepot doesn't work well with CONFIG_UNWINDER_GUESS=y. The 'guess' unwinder generate awfully large and inaccurate stacktraces, thus stackdepot can't deduplicate stacktraces because they all look like unique. Eventually stackdepot reaches its capacity limit: WARNING: CPU: 0 PID: 545 at lib/stackdepot.c:119 depot_save_stack+0x28e/0x550 Call Trace: ? kasan_kmalloc+0x144/0x160 ? depot_save_stack+0x1f5/0x550 ? do_raw_spin_unlock+0xda/0xf0 ? preempt_count_sub+0x13/0xc0 <...90 lines...> ? do_raw_spin_unlock+0xda/0xf0 Add a STACKDEPOT=n dependency to UNWINDER_GUESS to avoid the problem. Reported-by: kernel test robot Reported-by: Fengguang Wu Signed-off-by: Andrey Ryabinin Acked-by: Dmitry Vyukov Acked-by: Josh Poimboeuf Cc: Alexander Potapenko Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171130123554.4330-1-aryabinin@virtuozzo.com Signed-off-by: Ingo Molnar arch/x86/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) commit f79ce87fa49da778a1ad54c7d3c6755e13cf8489 Author: Changbin Du Date: Thu Nov 30 22:51:20 2017 +0800 x86/build: Don't verify mtools configuration file for isoimage If mtools.conf is not generated before, 'make isoimage' could complain: Kernel: arch/x86/boot/bzImage is ready (#597) GENIMAGE arch/x86/boot/image.iso *** Missing file: arch/x86/boot/mtools.conf arch/x86/boot/Makefile:144: recipe for target 'isoimage' failed mtools.conf is not used for isoimage generation, so do not check it. Signed-off-by: Changbin Du Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 4366d57af1 ("x86/build: Factor out fdimage/isoimage generation commands to standalone script") Link: http://lkml.kernel.org/r/1512053480-8083-1-git-send-email-changbin.du@intel.com Signed-off-by: Ingo Molnar arch/x86/boot/genimage.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 93c647643b48f0131f02e45da3bd367d80443291 Author: Kevin Cernekee Date: Wed Dec 6 12:12:27 2017 -0800 netlink: Add netns check on taps Currently, a nlmon link inside a child namespace can observe systemwide netlink activity. Filter the traffic so that nlmon can only sniff netlink messages from its own netns. Test case: vpnns -- bash -c "ip link add nlmon0 type nlmon; \ ip link set nlmon0 up; \ tcpdump -i nlmon0 -q -w /tmp/nlmon.pcap -U" & sudo ip xfrm state add src 10.1.1.1 dst 10.1.1.2 proto esp \ spi 0x1 mode transport \ auth sha1 0x6162633132330000000000000000000000000000 \ enc aes 0x00000000000000000000000000000000 grep --binary abc123 /tmp/nlmon.pcap Signed-off-by: Kevin Cernekee Signed-off-by: David S. Miller net/netlink/af_netlink.c | 3 +++ 1 file changed, 3 insertions(+) commit 2aab6b40b03154a263463a5d992ddd7d122a016a Author: Thomas Petazzoni Date: Fri Dec 8 16:35:40 2017 +0100 net: sh_eth: do not advertise Gigabit capabilities when not available Not all variants of the sh_eth hardware have Gigabit support. Unfortunately, the current driver doesn't tell the PHY about the limited MAC capabilities. Due to this, if you have a Gigabit capable PHY, the PHY will advertise its Gigabit capability and establish a link at 1Gbit/s, even though the MAC doesn't support it. In order to avoid this, we use the recently introduced phy_set_max_speed() to tell the PHY to not advertise speed higher than 100 MBit/s. Tested on a SH7786 platform, with a Gigabit PHY. Signed-off-by: Thomas Petazzoni Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f1e2400a80ff55eb7c5f4fd9d7eb163fd0de9a2c Author: Jerome Brunet Date: Fri Dec 8 12:08:11 2017 +0100 net: phy: meson-gxl: detect LPA corruption The purpose of this change is to fix the incorrect detection of the link partner (LP) advertised capabilities which sometimes happens with this PHY (roughly 1 time in a dozen) This issue may cause the link to be negotiated at 10Mbps/Full or 10Mbps/Half when 100MBps/Full is actually possible. In some case, the link is even completely broken and no communication is possible. To detect the corruption, we must look for a magic undocumented bit in the WOL bank (hint given by the SoC vendor kernel) but this is not enough to cover all cases. We also have to look at the LPA ack. If the LP supports Aneg but did not ack our base code when aneg is completed, we assume something went wrong. The detection of a corrupted LPA triggers a restart of the aneg process. This solves the problem but may take up to 6 retries to complete. Fixes: 7334b3e47aee ("net: phy: Add Meson GXL Internal PHY driver") Signed-off-by: Jerome Brunet Signed-off-by: David S. Miller drivers/net/phy/meson-gxl.c | 74 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) commit 8781bcbc5e69d7da69e84c7044ca0284848d5d01 Author: Steve Capper Date: Fri Dec 1 17:22:14 2017 +0000 arm64: mm: Fix pte_mkclean, pte_mkdirty semantics On systems with hardware dirty bit management, the ltp madvise09 unit test fails due to dirty bit information being lost and pages being incorrectly freed. This was bisected to: arm64: Ignore hardware dirty bit updates in ptep_set_wrprotect() Reverting this commit leads to a separate problem, that the unit test retains pages that should have been dropped due to the function madvise_free_pte_range(.) not cleaning pte's properly. Currently pte_mkclean only clears the software dirty bit, thus the following code sequence can appear: pte = pte_mkclean(pte); if (pte_dirty(pte)) // this condition can return true with HW DBM! This patch also adjusts pte_mkclean to set PTE_RDONLY thus effectively clearing both the SW and HW dirty information. In order for this to function on systems without HW DBM, we need to also adjust pte_mkdirty to remove the read only bit from writable pte's to avoid infinite fault loops. Cc: Fixes: 64c26841b349 ("arm64: Ignore hardware dirty bit updates in ptep_set_wrprotect()") Reported-by: Bhupinder Thakur Tested-by: Bhupinder Thakur Reviewed-by: Catalin Marinas Signed-off-by: Steve Capper Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable.h | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) commit f24e5834a2c3f6c5f814a417f858226f0a010ade Author: Steve Capper Date: Mon Dec 4 14:13:05 2017 +0000 arm64: Initialise high_memory global variable earlier The high_memory global variable is used by cma_declare_contiguous(.) before it is defined. We don't notice this as we compute __pa(high_memory - 1), and it looks like we're processing a VA from the direct linear map. This problem becomes apparent when we flip the kernel virtual address space and the linear map is moved to the bottom of the kernel VA space. This patch moves the initialisation of high_memory before it used. Cc: Fixes: f7426b983a6a ("mm: cma: adjust address limit to avoid hitting low/high memory boundary") Signed-off-by: Steve Capper Signed-off-by: Will Deacon arch/arm64/mm/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 23715275e4fb6f64358a499d20928a9e93819f2f Author: Konstantin Khlebnikov Date: Mon Dec 11 18:19:33 2017 +0300 netfilter: ip6t_MASQUERADE: add dependency on conntrack module After commit 4d3a57f23dec ("netfilter: conntrack: do not enable connection tracking unless needed") conntrack is disabled by default unless some module explicitly declares dependency in particular network namespace. Fixes: a357b3f80bc8 ("netfilter: nat: add dependencies on conntrack module") Signed-off-by: Konstantin Khlebnikov Signed-off-by: Pablo Neira Ayuso net/ipv6/netfilter/ip6t_MASQUERADE.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit a8ceb5dbfde1092b466936bca0ff3be127ecf38e Author: Michael S. Tsirkin Date: Tue Dec 5 21:29:37 2017 +0200 ptr_ring: add barriers Users of ptr_ring expect that it's safe to give the data structure a pointer and have it be available to consumers, but that actually requires an smb_wmb or a stronger barrier. In absence of such barriers and on architectures that reorder writes, consumer might read an un=initialized value from an skb pointer stored in the skb array. This was observed causing crashes. To fix, add memory barriers. The barrier we use is a wmb, the assumption being that producers do not need to read the value so we do not need to order these reads. Reported-by: George Cherian Suggested-by: Jason Wang Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: David S. Miller include/linux/ptr_ring.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 27b0174525325bf18919597016483a709f3372f8 Author: Palmer Dabbelt Date: Fri Dec 8 11:23:23 2017 -0800 RISC-V: Remove unused CONFIG_HVC_RISCV_SBI code This is code that probably should never have made it into the kernel in the first place: it depends on a driver that hadn't been reviewed yet. During the HVC_SBI_RISCV review process a better way of doing this was suggested, but that means this code is defunct. It's compile-time disabled in 4.15 because the driver isn't in, so I think it's safe to just remove this for now. CC: Greg KH Signed-off-by: Palmer Dabbelt arch/riscv/kernel/setup.c | 11 ----------- 1 file changed, 11 deletions(-) commit 3cfa5008081db845c6c53d531ec34e9c84a9fd99 Author: Palmer Dabbelt Date: Tue Dec 5 17:48:11 2017 -0800 RISC-V: Resurrect smp_mb__after_spinlock() I removed this last week because of an incorrect comment: smp_mb__after_spinlock() is actually still used, and is necessary on RISC-V. It's been resurrected, with a comment that describes what it actually does this time. Thanks to Andrea for finding the bug! Fixes: 3343eb6806f3 ("RISC-V: Remove smb_mb__{before,after}_spinlock()") CC: Andrea Parri Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/barrier.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 86ad5c97ce5ccdda1459d35370fd5e105721bb8d Author: Dan Carpenter Date: Sat Dec 9 14:49:14 2017 +0300 RISC-V: Logical vs Bitwise typo In the current code, there is a ! logical NOT where a bitwise ~ NOT was intended. It means that we never return -EINVAL. Signed-off-by: Dan Carpenter Signed-off-by: Palmer Dabbelt arch/riscv/kernel/sys_riscv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01dfee9582d9b4403c4902df096ed8b43d55181c Author: Sergey Senozhatsky Date: Fri Dec 8 11:56:14 2017 +0900 workqueue: remove unneeded kallsyms include The filw was converted from print_symbol() to %pf some time ago (044c782ce3a901fb "workqueue: fix checkpatch issues"). kallsyms does not seem to be needed anymore. Signed-off-by: Sergey Senozhatsky Cc: Tejun Heo Cc: Lai Jiangshan Signed-off-by: Tejun Heo kernel/workqueue.c | 1 - 1 file changed, 1 deletion(-) commit 2064a5ab04707c55003e099e5abbf19a0826bbac Author: Randy Dunlap Date: Sun Dec 3 13:19:00 2017 -0800 sched/core: Fix kernel-doc warnings after code movement Fix the following kernel-doc warnings after code restructuring: ../kernel/sched/core.c:5113: warning: No description found for parameter 't' ../kernel/sched/core.c:5113: warning: Excess function parameter 'interval' description in 'sched_rr_get_interval' get rid of set_fs()") Signed-off-by: Randy Dunlap Cc: Al Viro Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: abca5fc535a3e ("sched_rr_get_interval(): move compat to native, Link: http://lkml.kernel.org/r/995c6ded-b32e-bbe4-d9f5-4d42d121aff1@infradead.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit f0f1d0166b17e1fadaa1dfa99721a9abb97e65eb Merge: f335195 0afe9d4 Author: David S. Miller Date: Mon Dec 11 09:39:14 2017 -0500 Merge tag 'mac80211-for-davem-2017-12-11' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Three fixes: * for certificate C file generation, don't use hexdump as it's not always installed by default, use pure posix instead (od/sed) * for certificate C file generation, don't write the file if anything fails, so the build abort will not cause a bad build upon a second attempt * fix locking in ieee80211_sta_tear_down_BA_sessions() which had been causing lots of locking warnings ==================== Signed-off-by: David S. Miller commit 6d60ce384d1d5ca32b595244db4077a419acc687 Author: Karol Herbst Date: Mon Nov 27 08:51:39 2017 +0100 x86/mm/kmmio: Fix mmiotrace for page unaligned addresses If something calls ioremap() with an address not aligned to PAGE_SIZE, the returned address might be not aligned as well. This led to a probe registered on exactly the returned address, but the entire page was armed for mmiotracing. On calling iounmap() the address passed to unregister_kmmio_probe() was PAGE_SIZE aligned by the caller leading to a complete freeze of the machine. We should always page align addresses while (un)registerung mappings, because the mmiotracer works on top of pages, not mappings. We still keep track of the probes based on their real addresses and lengths though, because the mmiotrace still needs to know what are mapped memory regions. Also move the call to mmiotrace_iounmap() prior page aligning the address, so that all probes are unregistered properly, otherwise the kernel ends up failing memory allocations randomly after disabling the mmiotracer. Tested-by: Lyude Signed-off-by: Karol Herbst Acked-by: Pekka Paalanen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: nouveau@lists.freedesktop.org Link: http://lkml.kernel.org/r/20171127075139.4928-1-kherbst@redhat.com Signed-off-by: Ingo Molnar arch/x86/mm/ioremap.c | 4 ++-- arch/x86/mm/kmmio.c | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) commit 7f6f60a1ba52538c16f26930bfbcfe193d9d746a Author: Dave Young Date: Sat Dec 9 12:16:10 2017 +0800 mm/early_ioremap: Fix boot hang with earlyprintk=efi,keep earlyprintk=efi,keep does not work any more with a warning in mm/early_ioremap.c: WARN_ON(system_state != SYSTEM_BOOTING): Boot just hangs because of the earlyprintk within the earlyprintk implementation code itself. This is caused by a new introduced middle state in: 69a78ff226fe ("init: Introduce SYSTEM_SCHEDULING state") early_ioremap() is fine in both SYSTEM_BOOTING and SYSTEM_SCHEDULING states, original condition should be updated accordingly. Signed-off-by: Dave Young Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: bp@suse.de Cc: linux-efi@vger.kernel.org Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20171209041610.GA3249@dhcp-128-65.nay.redhat.com Signed-off-by: Ingo Molnar mm/early_ioremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51614b26a029515dd3bc43a8c0e16a9ee51bbf52 Author: Mikulas Patocka Date: Wed Dec 6 04:25:44 2017 -0500 ipmi_si: fix crash on parisc This patch fixes ipmi crash on parisc introduced in the kernel 4.15-rc. The pointer io.io_setup is not initialized and thus it causes crash in try_smi_init when attempting to call new_smi->io.io_setup. Signed-off-by: Mikulas Patocka Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_parisc.c | 2 ++ 1 file changed, 2 insertions(+) commit 1ac8aa8d0568606485451ea860a6c6c3fad0d42d Author: Corey Minyard Date: Thu Nov 30 11:06:15 2017 -0600 ipmi_si: Fix oops with PCI devices When the IPMI PCI code was split out, some code was consolidated for setting the io_setup field in the io structure. The PCI code needed this set before registration to probe register spacing, though, so restore the old code for that function. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197999 Signed-off-by: Corey Minyard Tested-by: Meelis Roos drivers/char/ipmi/ipmi_si_pci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 3487972d7fa6c5143951436ada5933dcf0ec659d Author: Rafael J. Wysocki Date: Thu Dec 7 02:41:18 2017 +0100 PM / sleep: Avoid excess pm_runtime_enable() calls in device_resume() Middle-layer code doing suspend-time optimizations for devices with the DPM_FLAG_SMART_SUSPEND flag set (currently, the PCI bus type and the ACPI PM domain) needs to make the core skip ->thaw_early and ->thaw callbacks for those devices in some cases and it sets the power.direct_complete flag for them for this purpose. However, it turns out that setting power.direct_complete outside of the PM core is a bad idea as it triggers an excess invocation of pm_runtime_enable() in device_resume(). For this reason, provide a helper to clear power.is_late_suspended and power.is_suspended to be invoked by the middle-layer code in question instead of setting power.direct_complete and make that code call the new helper. Fixes: c4b65157aeef (PCI / PM: Take SMART_SUSPEND driver flag into account) Fixes: 05087360fd7a (ACPI / PM: Take SMART_SUSPEND driver flag into account) Signed-off-by: Rafael J. Wysocki Reviewed-by: Ulf Hansson Acked-by: Bjorn Helgaas drivers/acpi/device_pm.c | 2 +- drivers/base/power/main.c | 15 +++++++++++++++ drivers/pci/pci-driver.c | 2 +- include/linux/pm.h | 1 + 4 files changed, 18 insertions(+), 2 deletions(-) commit f5b5702ac55b11113a94d6228d191c7f827b7a3b Author: Florian Westphal Date: Mon Dec 11 10:14:27 2017 +0100 netfilter: exthdr: add missign attributes to policy Add missing netlink attribute policy. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_exthdr.c | 2 ++ 1 file changed, 2 insertions(+) commit 91516a2a4734614d62ee3ed921f8f88acc67c000 Author: Christoph Fritz Date: Sat Dec 9 23:47:55 2017 +0100 mmc: core: apply NO_CMD23 quirk to some specific cards To get an usdhc Apacer and some ATP SD cards work reliable, CMD23 needs to be disabled. This has been tested on i.MX6 (sdhci-esdhc) and rk3288 (dw_mmc-rockchip). Without this patch on i.MX6 (sdhci-esdhc): $ dd if=/dev/urandom of=/mnt/test bs=1M count=10 conv=fsync | | mmc0: starting CMD25 arg 00a71f00 flags 000000b5 | mmc0: blksz 512 blocks 1024 flags 00000100 tsac 3000 ms nsac 0 | mmc0: CMD12 arg 00000000 flags 0000049d | sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001 | mmc0: Timeout waiting for hardware interrupt. Without this patch on rk3288 (dw_mmc-rockchip): | mmc1: Card stuck in programming state! mmcblk1 card_busy_detect | dwmmc_rockchip ff0c0000.dwmmc: Busy; trying anyway | mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, | actual 400000HZ div = 0) | mmc1: card never left busy state | mmc1: tried to reset card, got error -110 | blk_update_request: I/O error, dev mmcblk1, sector 139778 | Buffer I/O error on dev mmcblk1p1, logical block 131586, lost async | page write Signed-off-by: Christoph Fritz Cc: # v4.14+ Signed-off-by: Ulf Hansson drivers/mmc/core/card.h | 2 ++ drivers/mmc/core/quirks.h | 8 ++++++++ 2 files changed, 10 insertions(+) commit 4564b187c16327045d87596e8980c65ba7b84c50 Author: Johannes Berg Date: Mon Dec 11 12:33:47 2017 +0100 nl80211: fix nl80211_send_iface() error paths Evidently I introduced a locking bug in my change here, the nla_put_failure sometimes needs to unlock. Fix it. Fixes: 44905265bc15 ("nl80211: don't expose wdev->ssid for most interfaces") Signed-off-by: Johannes Berg net/wireless/nl80211.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d53c5135792319e095bb126bc43b2ee98586f7fe Author: Stephan Mueller Date: Fri Dec 8 11:50:37 2017 +0100 crypto: af_alg - fix race accessing cipher request When invoking an asynchronous cipher operation, the invocation of the callback may be performed before the subsequent operations in the initial code path are invoked. The callback deletes the cipher request data structure which implies that after the invocation of the asynchronous cipher operation, this data structure must not be accessed any more. The setting of the return code size with the request data structure must therefore be moved before the invocation of the asynchronous cipher operation. Fixes: e870456d8e7c ("crypto: algif_skcipher - overhaul memory management") Fixes: d887c52d6ae4 ("crypto: algif_aead - overhaul memory management") Reported-by: syzbot Cc: # v4.14+ Signed-off-by: Stephan Mueller Acked-by: Jonathan Cameron Signed-off-by: Herbert Xu crypto/algif_aead.c | 10 +++++----- crypto/algif_skcipher.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) commit 9abffc6f2efe46c3564c04312e52e07622d40e51 Author: Sebastian Andrzej Siewior Date: Thu Nov 30 13:39:27 2017 +0100 crypto: mcryptd - protect the per-CPU queue with a lock mcryptd_enqueue_request() grabs the per-CPU queue struct and protects access to it with disabled preemption. Then it schedules a worker on the same CPU. The worker in mcryptd_queue_worker() guards access to the same per-CPU variable with disabled preemption. If we take CPU-hotplug into account then it is possible that between queue_work_on() and the actual invocation of the worker the CPU goes down and the worker will be scheduled on _another_ CPU. And here the preempt_disable() protection does not work anymore. The easiest thing is to add a spin_lock() to guard access to the list. Another detail: mcryptd_queue_worker() is not processing more than MCRYPTD_BATCH invocation in a row. If there are still items left, then it will invoke queue_work() to proceed with more later. *I* would suggest to simply drop that check because it does not use a system workqueue and the workqueue is already marked as "CPU_INTENSIVE". And if preemption is required then the scheduler should do it. However if queue_work() is used then the work item is marked as CPU unbound. That means it will try to run on the local CPU but it may run on another CPU as well. Especially with CONFIG_DEBUG_WQ_FORCE_RR_CPU=y. Again, the preempt_disable() won't work here but lock which was introduced will help. In order to keep work-item on the local CPU (and avoid RR) I changed it to queue_work_on(). Cc: stable@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Herbert Xu crypto/mcryptd.c | 23 ++++++++++------------- include/crypto/mcryptd.h | 1 + 2 files changed, 11 insertions(+), 13 deletions(-) commit 11edb555966ed2c66c533d17c604f9d7e580a829 Author: Stephan Mueller Date: Wed Nov 29 12:02:23 2017 +0100 crypto: af_alg - wait for data at beginning of recvmsg The wait for data is a non-atomic operation that can sleep and therefore potentially release the socket lock. The release of the socket lock allows another thread to modify the context data structure. The waiting operation for new data therefore must be called at the beginning of recvmsg. This prevents a race condition where checks of the members of the context data structure are performed by recvmsg while there is a potential for modification of these values. Fixes: e870456d8e7c ("crypto: algif_skcipher - overhaul memory management") Fixes: d887c52d6ae4 ("crypto: algif_aead - overhaul memory management") Reported-by: syzbot Cc: # v4.14+ Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/af_alg.c | 6 ------ crypto/algif_aead.c | 6 ++++++ crypto/algif_skcipher.c | 6 ++++++ 3 files changed, 12 insertions(+), 6 deletions(-) commit 2b4f27c36bcd46e820ddb9a8e6fe6a63fa4250b8 Author: Eric Biggers Date: Wed Nov 29 01:18:57 2017 -0800 crypto: skcipher - set walk.iv for zero-length inputs All the ChaCha20 algorithms as well as the ARM bit-sliced AES-XTS algorithms call skcipher_walk_virt(), then access the IV (walk.iv) before checking whether any bytes need to be processed (walk.nbytes). But if the input is empty, then skcipher_walk_virt() doesn't set the IV, and the algorithms crash trying to use the uninitialized IV pointer. Fix it by setting the IV earlier in skcipher_walk_virt(). Also fix it for the AEAD walk functions. This isn't a perfect solution because we can't actually align the IV to ->cra_alignmask unless there are bytes to process, for one because the temporary buffer for the aligned IV is freed by skcipher_walk_done(), which is only called when there are bytes to process. Thus, algorithms that require aligned IVs will still need to avoid accessing the IV when walk.nbytes == 0. Still, many algorithms/architectures are fine with IVs having any alignment, and even for those that aren't, a misaligned pointer bug is much less severe than an uninitialized pointer bug. This change also matches the behavior of the older blkcipher_walk API. Fixes: 0cabf2af6f5a ("crypto: skcipher - Fix crash on zero-length input") Reported-by: syzbot Cc: # v4.14+ Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/skcipher.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 9273083a1530891360e9fe4fad26ae96810db499 Author: Minas Harutyunyan Date: Thu Nov 30 12:16:37 2017 +0400 usb: dwc2: Fix TxFIFOn sizes and total TxFIFO size issues In host mode reading from DPTXSIZn returning invalid value in dwc2_check_param_tx_fifo_sizes function. In total TxFIFO size calculations unnecessarily reducing by ep_info. hw->total_fifo_size can be fully allocated for FIFO's. Added num_dev_in_eps member in dwc2_hw_params structure to save number of IN EPs. Added g_tx_fifo_size array in dwc2_hw_params structure to store power on reset values of DPTXSIZn registers in forced device mode. Updated dwc2_hsotg_tx_fifo_count() function to get TxFIFO count from num_dev_in_eps. Updated dwc2_get_dev_hwparams() function to store DPTXFSIZn in g_tx_fifo_size array. dwc2_get_host/dev_hwparams() functions call moved after num_dev_in_eps set from hwcfg4. Modified dwc2_check_param_tx_fifo_sizes() function to check TxFIFOn sizes based on g_tx_fifo_size array. Removed ep_info subtraction during calculation of tx_addr_max in dwc2_hsotg_tx_fifo_total_depth() function. Also removed dwc2_hsotg_ep_info_size() function as no more need. Acked-by: John Youn Signed-off-by: Gevorg Sahakyan Signed-off-by: Minas Harutyunyan Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 4 ++++ drivers/usb/dwc2/gadget.c | 42 ++---------------------------------------- drivers/usb/dwc2/params.c | 29 +++++++++++++++++++---------- 3 files changed, 25 insertions(+), 50 deletions(-) commit ec5bb87e4e2a1d3a35563a7bcfac9febf67aba9d Author: Manu Gautam Date: Wed Dec 6 12:49:04 2017 +0530 usb: dwc3: gadget: Fix PCM1 for ISOC EP with ep->mult less than 3 For isochronous endpoints with ep->mult less than 3, PCM1 value of trb->size in set incorrectly. For ep->mult = 2, this is set to 0/-1 and for ep->mult = 1, this is set to -2. This is because the initial mult is set to ep->mult - 1 instead of 2. Signed-off-by: Manu Gautam Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0d8c4cfdf31a9576f683628e50b76714c785ef1 Author: Masahiro Yamada Date: Thu Dec 7 13:40:24 2017 +0900 usb: dwc3: of-simple: set dev_pm_ops dwc3_of_simple_dev_pm_ops has never been used since the initial support by commit 16adc674d0d6 ("usb: dwc3: add generic OF glue layer"). I guess it just missed to set .pm struct member. Signed-off-by: Masahiro Yamada Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-of-simple.c | 1 + 1 file changed, 1 insertion(+) commit ded600ea9fb51a495d2fcd21e90351df876488e8 Author: Andreas Platschek Date: Thu Dec 7 11:32:20 2017 +0100 usb: dwc3: of-simple: fix missing clk_disable_unprepare If of_clk_get() fails, the clean-up of already initialized clocks should be the same as when clk_prepare_enable() fails. Thus a clk_disable_unprepare() for each clock should be called before the clk_put(). Found by Linux Driver Verification project (linuxtesting.org). Fixes: 16adc674d0d6 ("usb: dwc3: ep0: fix setup_packet_pending initialization") Signed-off-by: Andreas Platschek Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-of-simple.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8722e095f5a44d0e409e45c5ddc2ee9cf589c777 Author: Vincent Pelletier Date: Thu Nov 30 15:31:06 2017 +0000 usb: dwc3: gadget: Wait longer for controller to end command processing DWC3_DEPCMD_ENDTRANSFER has been witnessed to require around 600 iterations before controller would become idle again after unplugging the USB cable with AIO reads submitted. Bump timeout from 500 iterations to 1000 so dwc3_stop_active_transfer does not receive -ETIMEDOUT and does not WARN: [ 81.326273] ------------[ cut here ]------------ [ 81.335341] WARNING: CPU: 0 PID: 1874 at drivers/usb/dwc3/gadget.c:2627 dwc3_stop_active_transfer.constprop.23+0x69/0xc0 [dwc3] [ 81.347094] Modules linked in: usb_f_fs libcomposite configfs bnep btsdio bluetooth ecdh_generic brcmfmac brcmutil dwc3 intel_powerclamp coretemp ulpi kvm_intel udc_core kvm irqbypass crc32_pclmul crc32c_intel pcbc dwc3_pci aesni_intel aes_i586 crypto_simd cryptd ehci_pci ehci_hcd basincove_gpadc industrialio gpio_keys usbcore usb_common [ 81.378142] CPU: 0 PID: 1874 Comm: irq/34-dwc3 Not tainted 4.14.0-edison+ #119 [ 81.385545] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48 [ 81.394548] task: f5b1be00 task.stack: f420a000 [ 81.399219] EIP: dwc3_stop_active_transfer.constprop.23+0x69/0xc0 [dwc3] [ 81.406086] EFLAGS: 00010086 CPU: 0 [ 81.409672] EAX: 0000001f EBX: f5729800 ECX: c132a2a2 EDX: 00000000 [ 81.416096] ESI: f4054014 EDI: f41cf400 EBP: f420be10 ESP: f420bdf4 [ 81.422521] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 [ 81.428061] CR0: 80050033 CR2: b7a3f000 CR3: 01d94000 CR4: 001006d0 [ 81.434483] Call Trace: [ 81.437063] __dwc3_gadget_ep_disable+0xa3/0x2b0 [dwc3] [ 81.442438] ? _raw_spin_lock_irqsave+0x32/0x40 [ 81.447135] dwc3_gadget_ep_disable+0xbf/0xe0 [dwc3] [ 81.452269] usb_ep_disable+0x1c/0xd0 [udc_core] [ 81.457048] ffs_func_eps_disable.isra.15+0x3b/0x90 [usb_f_fs] [ 81.463070] ffs_func_set_alt+0x7d/0x310 [usb_f_fs] [ 81.468132] ffs_func_disable+0x14/0x20 [usb_f_fs] [ 81.473075] reset_config+0x5b/0x90 [libcomposite] [ 81.478023] composite_disconnect+0x2b/0x50 [libcomposite] [ 81.483685] dwc3_disconnect_gadget+0x39/0x50 [dwc3] [ 81.488808] dwc3_gadget_disconnect_interrupt+0x21b/0x250 [dwc3] [ 81.495014] dwc3_thread_interrupt+0x2a8/0xf70 [dwc3] [ 81.500219] ? __schedule+0x78c/0x7e0 [ 81.504027] irq_thread_fn+0x18/0x30 [ 81.507715] ? irq_thread+0xb7/0x180 [ 81.511400] irq_thread+0x111/0x180 [ 81.515000] ? irq_finalize_oneshot+0xe0/0xe0 [ 81.519490] ? wake_threads_waitq+0x30/0x30 [ 81.523806] kthread+0x107/0x110 [ 81.527131] ? disable_percpu_irq+0x50/0x50 [ 81.531439] ? kthread_stop+0x150/0x150 [ 81.535397] ret_from_fork+0x19/0x24 [ 81.539136] Code: 89 d8 c7 45 ec 00 00 00 00 c7 45 f0 00 00 00 00 c7 45 f4 00 00 00 00 e8 56 ef ff ff 85 c0 74 12 50 68 b9 1c 14 f8 e8 64 0f f7 c8 <0f> ff 58 5a 8d 76 00 8b 83 98 00 00 00 c6 83 a0 00 00 00 00 83 [ 81.559295] ---[ end trace f3133eec81a473b8 ]--- Number of iterations measured on 4 consecutive unplugs: [ 1088.799777] dwc3_send_gadget_ep_cmd(cmd=331016, params={0, 0, 0}) iterated 605 times [ 1222.024986] dwc3_send_gadget_ep_cmd(cmd=331016, params={0, 0, 0}) iterated 580 times [ 1317.590452] dwc3_send_gadget_ep_cmd(cmd=331016, params={0, 0, 0}) iterated 598 times [ 1453.218314] dwc3_send_gadget_ep_cmd(cmd=331016, params={0, 0, 0}) iterated 594 times Signed-off-by: Vincent Pelletier Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7879cb43f9a75710af439c6bd81c94de1aa3d740 Author: Vasyl Gomonovych Date: Tue Nov 28 00:09:23 2017 +0100 ovl: Use PTR_ERR_OR_ZERO() Fix ptr_ret.cocci warnings: fs/overlayfs/overlayfs.h:179:11-17: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Vasyl Gomonovych Signed-off-by: Miklos Szeredi fs/overlayfs/overlayfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8d4bfe3a71537284a90561f77c85dea6c154369 Author: Chengguang Xu Date: Wed Nov 29 10:01:32 2017 +0800 ovl: Sync upper dirty data when syncing overlayfs When executing filesystem sync or umount on overlayfs, dirty data does not get synced as expected on upper filesystem. This patch fixes sync filesystem method to keep data consistency for overlayfs. Signed-off-by: Chengguang Xu Fixes: e593b2bf513d ("ovl: properly implement sync_filesystem()") Cc: #4.11 Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit b02a16e6413a2f782e542ef60bad9ff6bf212f8a Author: Amir Goldstein Date: Wed Nov 29 07:35:21 2017 +0200 ovl: update ctx->pos on impure dir iteration This fixes a regression with readdir of impure dir in overlayfs that is shared to VM via 9p fs. Reported-by: Miguel Bernal Marin Fixes: 4edb83bb1041 ("ovl: constant d_ino for non-merge dirs") Cc: #4.14 Signed-off-by: Amir Goldstein Tested-by: Miguel Bernal Marin Signed-off-by: Miklos Szeredi fs/overlayfs/readdir.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 08d8f8a5b094b66b29936e8751b4a818b8db1207 Author: Vivek Goyal Date: Mon Nov 27 10:12:44 2017 -0500 ovl: Pass ovl_get_nlink() parameters in right order Right now we seem to be passing index as "lowerdentry" and origin.dentry as "upperdentry". IIUC, we should pass these parameters in reversed order and this looks like a bug. Signed-off-by: Vivek Goyal Acked-by: Amir Goldstein Fixes: caf70cb2ba5d ("ovl: cleanup orphan index entries") Cc: #v4.13 Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 438c84c2f0c794f75ab55ce65c505b01bfce4480 Author: Miklos Szeredi Date: Mon Dec 11 11:28:10 2017 +0100 ovl: don't follow redirects if redirect_dir=off Overlayfs is following redirects even when redirects are disabled. If this is unintentional (probably the majority of cases) then this can be a problem. E.g. upper layer comes from untrusted USB drive, and attacker crafts a redirect to enable read access to otherwise unreadable directories. If "redirect_dir=off", then turn off following as well as creation of redirects. If "redirect_dir=follow", then turn on following, but turn off creation of redirects (which is what "redirect_dir=off" does now). This is a backward incompatible change, so make it dependent on a config option. Reported-by: David Howells Signed-off-by: Miklos Szeredi Documentation/filesystems/overlayfs.txt | 34 +++++++++++++++++ fs/overlayfs/Kconfig | 10 +++++ fs/overlayfs/namei.c | 16 ++++++++ fs/overlayfs/ovl_entry.h | 2 + fs/overlayfs/super.c | 68 ++++++++++++++++++++++++--------- 5 files changed, 113 insertions(+), 17 deletions(-) commit 0afe9d4ab9d40c281bdcdd118661fe8e4bdcef18 Author: Johannes Berg Date: Sat Dec 9 21:10:10 2017 +0100 mac80211: fix locking in ieee80211_sta_tear_down_BA_sessions Due to overlap between commit 1281103770e9 ("mac80211: Simplify locking in ieee80211_sta_tear_down_BA_sessions()") and the way that Luca modified commit 72e2c3438ba3 ("mac80211: tear down RX aggregations first") when sending it upstream from Intel's internal tree, we get the following warning: WARNING: CPU: 0 PID: 5472 at net/mac80211/agg-tx.c:315 ___ieee80211_stop_tx_ba_session+0x158/0x1f0 since there's no appropriate locking around the call to ___ieee80211_stop_tx_ba_session; Sara's original just had a call to the locked __ieee80211_stop_tx_ba_session (one less underscore) but it looks like Luca modified both of the calls when fixing it up for upstream, leading to the problem at hand. Move the locking appropriately to fix this problem. Reported-by: Kalle Valo Reported-by: Pavel Machek Tested-by: Pavel Machek Signed-off-by: Johannes Berg net/mac80211/ht.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f5f00e7dcc4161f07b76ff1a854e8b1ea7a1ed41 Author: Xiaolin Zhang Date: Tue Dec 5 14:45:32 2017 +0800 drm/i915/gvt: Fix pipe A enable as default for vgpu observed igt drv_module_reload test case failure on 4.15.0 rc2 kernel with panic due to no active pipe available. the gpu will reset during unload/load and make pipe config reg lost which can cause kernel panic issue happen. this patch is to move pipe enabling to emulate_mointor_status_chagne to handle vgpu reset case as well. Fixes: 7e6059020894 ("drm/i915/gvt: enabled pipe A default on creating vgpu") Signed-off-by: Xiaolin Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 996fc4477a0ea28226b30d175f053fb6f9a4fa36 Author: Theodore Ts'o Date: Sun Dec 10 23:44:11 2017 -0500 ext4: add missing error check in __ext4_new_inode() It's possible for ext4_get_acl() to return an ERR_PTR. So we need to add a check for this case in __ext4_new_inode(). Otherwise on an error we can end up oops the kernel. This was getting triggered by xfstests generic/388, which is a test which exercises the shutdown code path. Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/ialloc.c | 2 ++ 1 file changed, 2 insertions(+) commit eb9436966fdc84cebdf222952a99898ab46d9bb0 Author: Tobias Jordan Date: Wed Dec 6 14:28:27 2017 +0100 dmaengine: jz4740: disable/unprepare clk if probe fails in error path of jz4740_dma_probe(), call clk_disable_unprepare() to clean up. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 25ce6c35fea0 MIPS: jz4740: Remove custom DMA API Signed-off-by: Tobias Jordan Signed-off-by: Vinod Koul drivers/dma/dma-jz4740.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6f6a23a213be51728502b88741ba6a10cda2441d Author: Adam Wallis Date: Mon Nov 27 10:45:01 2017 -0500 dmaengine: dmatest: move callback wait queue to thread context Commit adfa543e7314 ("dmatest: don't use set_freezable_with_signal()") introduced a bug (that is in fact documented by the patch commit text) that leaves behind a dangling pointer. Since the done_wait structure is allocated on the stack, future invocations to the DMATEST can produce undesirable results (e.g., corrupted spinlocks). Commit a9df21e34b42 ("dmaengine: dmatest: warn user when dma test times out") attempted to WARN the user that the stack was likely corrupted but did not fix the actual issue. This patch fixes the issue by pushing the wait queue and callback structs into the the thread structure. If a failure occurs due to time, dmaengine_terminate_all will force the callback to safely call wake_up_all() without possibility of using a freed pointer. Cc: stable@vger.kernel.org Bug: https://bugzilla.kernel.org/show_bug.cgi?id=197605 Fixes: adfa543e7314 ("dmatest: don't use set_freezable_with_signal()") Reviewed-by: Sinan Kaya Suggested-by: Shunyong Yang Signed-off-by: Adam Wallis Signed-off-by: Vinod Koul drivers/dma/dmatest.c | 55 +++++++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 24 deletions(-) commit 50c4c4e268a2d7a3e58ebb698ac74da0de40ae36 Author: Linus Torvalds Date: Sun Dec 10 17:56:26 2017 -0800 Linux 4.15-rc3 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98087c05b9fc4ff8935bfc8f4b71afb4251c8867 Author: Jeff Layton Date: Thu Nov 23 20:34:40 2017 +0100 hpfs: don't bother with the i_version counter or f_version HPFS does not set SB_I_VERSION and does not use the i_version counter internally. Signed-off-by: Jeff Layton Signed-off-by: Mikulas Patocka Reviewed-by: Mikulas Patocka Signed-off-by: Linus Torvalds fs/hpfs/dir.c | 1 - fs/hpfs/dnode.c | 2 -- fs/hpfs/super.c | 1 - 3 files changed, 4 deletions(-) commit d70ef22892ed6c066e51e118b225923c9b74af34 Author: Jiri Slaby Date: Thu Nov 30 15:35:44 2017 +0100 futex: futex_wake_op, fix sign_extend32 sign bits sign_extend32 counts the sign bit parameter from 0, not from 1. So we have to use "11" for 12th bit, not "12". This mistake means we have not allowed negative op and cmp args since commit 30d6e0a4190d ("futex: Remove duplicated code and fix undefined behaviour") till now. Fixes: 30d6e0a4190d ("futex: Remove duplicated code and fix undefined behaviour") Signed-off-by: Jiri Slaby Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Darren Hart Signed-off-by: Linus Torvalds kernel/futex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51090c5d6de08cfc86b2d861775dedddd9a2c023 Merge: 9c02e06 c8bcbfbd Author: Linus Torvalds Date: Sun Dec 10 08:30:04 2017 -0800 Merge tag 'for-4.15-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "This contains a few fixes (error handling, quota leak, FUA vs nobarrier mount option). There's one one worth mentioning separately - an off-by-one fix that leads to overwriting first byte of an adjacent page with 0, out of bounds of the memory allocated by an ioctl. This is under a privileged part of the ioctl, can be triggerd in some subvolume layouts" * tag 'for-4.15-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: Fix possible off-by-one in btrfs_search_path_in_tree Btrfs: disable FUA if mounted with nobarrier btrfs: fix missing error return in btrfs_drop_snapshot btrfs: handle errors while updating refcounts in update_ref_for_cow btrfs: Fix quota reservation leak on preallocated files commit 9c02e0601b9ae76c2f5b783f9e6c2199921c2de5 Merge: c465fc1 8be0b988 Author: Linus Torvalds Date: Sun Dec 10 08:26:59 2017 -0800 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 revert of all SCPI changes from the 4.15 merge window. They had regressions on the Amlogic platforms, and the submaintainer isn't around to fix these bugs due to vacation, etc. So we agreed to revert and revisit in next release cycle. - A series fixing a number of bugs for ARM CCN interconnect, around module unload, smp_processor_id() in preemptable context, and fixing some memory allocation failure checks. - A handful of devicetree fixes for different platforms, fixing warnings and errors that were previously ignored by the compiler. - The usual set of mostly minor fixes for different platforms. * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (42 commits) ARM64: dts: meson-gx: fix UART pclk clock name ARM: omap2: hide omap3_save_secure_ram on non-OMAP3 builds arm: dts: nspire: Add missing #phy-cells to usb-nop-xceiv ARM: dts: Fix dm814x missing phy-cells property ARM: dts: Fix elm interrupt compiler warning bus: arm-ccn: fix module unloading Error: Removing state 147 which has instances left. bus: arm-cci: Fix use of smp_processor_id() in preemptible context bus: arm-ccn: Fix use of smp_processor_id() in preemptible context bus: arm-ccn: Simplify code bus: arm-ccn: Check memory allocation failure bus: arm-ccn: constify attribute_group structures. firmware: arm_scpi: Revert updates made during v4.15 merge window arm: dts: marvell: Add missing #phy-cells to usb-nop-xceiv arm64: dts: sort vendor subdirectories in Makefile alphabetically meson-gx-socinfo: Fix package id parsing ARM: meson: fix spelling mistake: "Couln't" -> "Couldn't" ARM: dts: meson: fix the memory region of the GPIO interrupt controller ARM: dts: meson: correct the sort order for the the gpio_intc node MAINTAINERS: exclude other Socionext SoC DT files from ARM/UNIPHIER entry arm64: dts: uniphier: remove unnecessary interrupt-parent ... commit c465fc11e579e3fb65a5b74fcfbf616e084bc05e Merge: 4ded3be b1394e7 Author: Linus Torvalds Date: Sun Dec 10 08:24:16 2017 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "ARM: - A number of issues in the vgic discovered using SMATCH - A bit one-off calculation in out stage base address mask (32-bit and 64-bit) - Fixes to single-step debugging instructions that trap for other reasons such as MMMIO aborts - Printing unavailable hyp mode as error - Potential spinlock deadlock in the vgic - Avoid calling vgic vcpu free more than once - Broken bit calculation for big endian systems s390: - SPDX tags - Fence storage key accesses from problem state - Make sure that irq_state.flags is not used in the future x86: - Intercept port 0x80 accesses to prevent host instability (CVE) - Use userspace FPU context for guest FPU (mainly an optimization that fixes a double use of kernel FPU) - Do not leak one page per module load - Flush APIC page address cache from MMU invalidation notifiers" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (28 commits) KVM: x86: fix APIC page invalidation KVM: s390: Fix skey emulation permission check KVM: s390: mark irq_state.flags as non-usable KVM: s390: Remove redundant license text KVM: s390: add SPDX identifiers to the remaining files KVM: VMX: fix page leak in hardware_setup() KVM: VMX: remove I/O port 0x80 bypass on Intel hosts x86,kvm: remove KVM emulator get_fpu / put_fpu x86,kvm: move qemu/guest FPU switching out to vcpu_run KVM: arm/arm64: Fix broken GICH_ELRSR big endian conversion KVM: arm/arm64: kvm_arch_destroy_vm cleanups KVM: arm/arm64: Fix spinlock acquisition in vgic_set_owner kvm: arm: don't treat unavailable HYP mode as an error KVM: arm/arm64: Avoid attempting to load timer vgic state without a vgic kvm: arm64: handle single-step of hyp emulated mmio instructions kvm: arm64: handle single-step during SError exceptions kvm: arm64: handle single-step of userspace mmio instructions kvm: arm64: handle single-stepping trapped instructions KVM: arm/arm64: debug: Introduce helper for single-step arm: KVM: Fix VTTBR_BADDR_MASK BUG_ON off-by-one ... commit 8be0b9886b6470a1261c9c2d0cfc1f0f89bf21b9 Merge: 8b6eac7 ce39882 Author: Olof Johansson Date: Sat Dec 9 20:23:58 2017 -0800 Merge branch 'fixes' into for-next * fixes: ARM64: dts: meson-gx: fix UART pclk clock name ARM: dts: Fix dm814x missing phy-cells property ARM: dts: Fix elm interrupt compiler warning bus: arm-ccn: fix module unloading Error: Removing state 147 which has instances left. bus: arm-cci: Fix use of smp_processor_id() in preemptible context bus: arm-ccn: Fix use of smp_processor_id() in preemptible context bus: arm-ccn: Simplify code bus: arm-ccn: Check memory allocation failure bus: arm-ccn: constify attribute_group structures. meson-gx-socinfo: Fix package id parsing ARM: meson: fix spelling mistake: "Couln't" -> "Couldn't" ARM: dts: meson: fix the memory region of the GPIO interrupt controller ARM: dts: meson: correct the sort order for the the gpio_intc node commit ce39882eb1d87dd9bb4f89d4ae09ef2547aee079 Merge: 3dda7f63 39005e5 Author: Olof Johansson Date: Sat Dec 9 20:23:29 2017 -0800 Merge tag 'amlogic-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into fixes Amlogic fixes for v4.15-rc - GPIO interrupt fixes - socinfo fix for GX series - fix typo * tag 'amlogic-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: dts: meson-gx: fix UART pclk clock name meson-gx-socinfo: Fix package id parsing ARM: meson: fix spelling mistake: "Couln't" -> "Couldn't" ARM: dts: meson: fix the memory region of the GPIO interrupt controller ARM: dts: meson: correct the sort order for the the gpio_intc node Signed-off-by: Olof Johansson commit 3dda7f63e0e46db96b5373e740d03be2c44529c7 Merge: 69b8df5 b69f63e Author: Olof Johansson Date: Sat Dec 9 20:22:46 2017 -0800 Merge tag 'ccn/fixes-for-4.15' of git://git.linaro.org/people/pawel.moll/linux into fixes bus: ARM CCN and CCI PMU driver fixes This is a bunch of fixes CCN and (guest starring this time) CCI drivers. * Check for potential of failed allocation for the driver name string * Manage CPU ID properly at allocation (both CCN and CCI) * Fix module unload warnings related to objects release order * Small improvements like using allocating printfs and proper attributes constification The one fixing potential issues have been cc-ed to stable. * tag 'ccn/fixes-for-4.15' of git://git.linaro.org/people/pawel.moll/linux: bus: arm-ccn: fix module unloading Error: Removing state 147 which has instances left. bus: arm-cci: Fix use of smp_processor_id() in preemptible context bus: arm-ccn: Fix use of smp_processor_id() in preemptible context bus: arm-ccn: Simplify code bus: arm-ccn: Check memory allocation failure bus: arm-ccn: constify attribute_group structures. Signed-off-by: Olof Johansson commit 69b8df5d6a4222fd6996227ae8ef60fe44db74fc Merge: 863204c c22fe69 Author: Olof Johansson Date: Sat Dec 9 20:22:01 2017 -0800 Merge tag 'omap-for-v4.15/fixes-dt-warnings' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Two fixes for dts compiler warnings These recently started showing up with better dtc checks being introduced. * tag 'omap-for-v4.15/fixes-dt-warnings' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: Fix dm814x missing phy-cells property ARM: dts: Fix elm interrupt compiler warning Signed-off-by: Olof Johansson commit d7ee946942bdd12394809305e3df05aa4c8b7b8f Author: Markus Trippelsdorf Date: Wed Oct 11 07:01:31 2017 +0200 VFS: Handle lazytime in do_mount() Since commit e462ec50cb5fa ("VFS: Differentiate mount flags (MS_*) from internal superblock flags") the lazytime mount option doesn't get passed on anymore. Fix the issue by handling the option in do_mount(). Reviewed-by: Lukas Czerner Signed-off-by: Markus Trippelsdorf Signed-off-by: Al Viro fs/namespace.c | 1 + 1 file changed, 1 insertion(+) commit 4ded3bec65a07343258ed8fd9d46483f032d866f Merge: f335195 54c1fb3 Author: James Morris Date: Sat Dec 9 14:39:48 2017 +1100 Merge tag 'keys-fixes-20171208' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into keys-for-linus Assorted fixes for keyrings, ASN.1, X.509 and PKCS#7. commit b7e0b6ff54dd92febbb1914ab93cd6a21622e169 Author: Darrick J. Wong Date: Wed Dec 6 16:13:35 2017 -0800 xfs: make iomap_begin functions trim iomaps consistently Historically, the XFS iomap_begin function only returned mappings for exactly the range queried, i.e. it doesn't do XFS_BMAPI_ENTIRE lookups. The current vfs iomap consumers are only set up to deal with trimmed mappings. xfs_xattr_iomap_begin does BMAPI_ENTIRE lookups, which is inconsistent with the current iomap usage. Remove the flag so that both iomap_begin functions behave the same way. FWIW this also fixes a behavioral regression in xattr FIEMAP that was introduced in 4.8 wherein attr fork extents are no longer trimmed like they used to be. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_iomap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f59cf5c29919d17b61913c3360a7bd29b72975c1 Author: Christoph Hellwig Date: Mon Dec 4 17:32:55 2017 -0800 xfs: remove "no-allocation" reservations for file creations If we create a new file we will need an inode, and usually some metadata in the parent direction. Aiming for everything to go well despite the lack of a reservation leads to dirty transactions cancelled under a heavy create/delete load. This patch removes those nospace transactions, which will lead to slightly earlier ENOSPC on some workloads, but instead prevent file system shutdowns due to cancelling dirty transactions for others. A customer could observe assertations failures and shutdowns due to cancelation of dirty transactions during heavy NFS workloads as shown below: 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728125] XFS: Assertion failed: error != -ENOSPC, file: fs/xfs/xfs_inode.c, line: 1262 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728222] Call Trace: 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728246] [] dump_stack+0x63/0x81 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728262] [] warn_slowpath_common+0x8a/0xc0 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728264] [] warn_slowpath_null+0x1a/0x20 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728285] [] asswarn+0x33/0x40 [xfs] 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728308] [] xfs_create+0x7be/0x7d0 [xfs] 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728329] [] xfs_generic_create+0x1fb/0x2e0 [xfs] 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728348] [] xfs_vn_mknod+0x14/0x20 [xfs] 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728366] [] xfs_vn_create+0x13/0x20 [xfs] 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728380] [] vfs_create+0xd5/0x140 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728390] [] do_nfsd_create+0x499/0x610 [nfsd] 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728396] [] nfsd3_proc_create+0x135/0x210 [nfsd] 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728401] [] nfsd_dispatch+0xc3/0x210 [nfsd] 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728416] [] svc_process_common+0x453/0x6f0 [sunrpc] 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728423] [] svc_process+0x113/0x1f0 [sunrpc] 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728427] [] nfsd+0x10f/0x180 [nfsd] 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728432] [] ? nfsd_destroy+0x80/0x80 [nfsd] 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728438] [] kthread+0xd8/0xf0 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728441] [] ? kthread_create_on_node+0x1b0/0x1b0 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728451] [] ret_from_fork+0x42/0x70 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728453] [] ? kthread_create_on_node+0x1b0/0x1b0 2017-05-30 21:17:06 kernel: WARNING: [ 2670.728454] ---[ end trace f9822c842fec81d4 ]--- 2017-05-30 21:17:06 kernel: ALERT: [ 2670.728477] XFS (sdb): Internal error xfs_trans_cancel at line 983 of file fs/xfs/xfs_trans.c. Caller xfs_create+0x4ee/0x7d0 [xfs] 2017-05-30 21:17:06 kernel: ALERT: [ 2670.728684] XFS (sdb): Corruption of in-memory data detected. Shutting down filesystem 2017-05-30 21:17:06 kernel: ALERT: [ 2670.728685] XFS (sdb): Please umount the filesystem and rectify the problem(s) Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_ialloc.c | 10 +++------- fs/xfs/libxfs/xfs_ialloc.h | 1 - fs/xfs/xfs_inode.c | 33 +++++++-------------------------- fs/xfs/xfs_inode.h | 2 +- fs/xfs/xfs_qm.c | 4 ++-- fs/xfs/xfs_symlink.c | 15 +-------------- 6 files changed, 14 insertions(+), 51 deletions(-) commit eaf0ec303bd73f6b2c18f48542974a710fadfeb9 Author: Pravin Shedge Date: Wed Dec 6 10:16:15 2017 -0800 fs: xfs: remove duplicate includes These duplicate includes have been found with scripts/checkincludes.pl but they have been removed manually to avoid removing false positives. Signed-off-by: Pravin Shedge Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/scrub/scrub.c | 1 - fs/xfs/scrub/trace.c | 1 - fs/xfs/xfs_reflink.c | 2 -- fs/xfs/xfs_trace.c | 1 - 4 files changed, 5 deletions(-) commit f335195adf043168ee69d78ea72ac3e30f0c57ce Author: Michal Hocko Date: Wed Dec 6 11:27:57 2017 +0100 kmemcheck: rip it out for real Commit 4675ff05de2d ("kmemcheck: rip it out") has removed the code but for some reason SPDX header stayed in place. This looks like a rebase mistake in the mmotm tree or the merge mistake. Let's drop those leftovers as well. Signed-off-by: Michal Hocko Signed-off-by: Linus Torvalds arch/x86/include/asm/kmemcheck.h | 1 - arch/x86/mm/kmemcheck/error.c | 1 - arch/x86/mm/kmemcheck/error.h | 1 - arch/x86/mm/kmemcheck/opcode.c | 1 - arch/x86/mm/kmemcheck/opcode.h | 1 - arch/x86/mm/kmemcheck/pte.c | 1 - arch/x86/mm/kmemcheck/pte.h | 1 - arch/x86/mm/kmemcheck/selftest.c | 1 - arch/x86/mm/kmemcheck/selftest.h | 1 - arch/x86/mm/kmemcheck/shadow.h | 1 - include/linux/kmemcheck.h | 1 - mm/kmemcheck.c | 1 - tools/include/linux/kmemcheck.h | 1 - 13 files changed, 13 deletions(-) commit e9ef1fe312b533592e39cddc1327463c30b0ed8d Merge: 77071bc fd29117 Author: Linus Torvalds Date: Fri Dec 8 13:32:44 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) CAN fixes from Martin Kelly (cancel URBs properly in all the CAN usb drivers). 2) Revert returning -EEXIST from __dev_alloc_name() as this propagates to userspace and broke some apps. From Johannes Berg. 3) Fix conn memory leaks and crashes in TIPC, from Jon Malloc and Cong Wang. 4) Gianfar MAC can't do EEE so don't advertise it by default, from Claudiu Manoil. 5) Relax strict netlink attribute validation, but emit a warning. From David Ahern. 6) Fix regression in checksum offload of thunderx driver, from Florian Westphal. 7) Fix UAPI bpf issues on s390, from Hendrik Brueckner. 8) New card support in iwlwifi, from Ihab Zhaika. 9) BBR congestion control bug fixes from Neal Cardwell. 10) Fix port stats in nfp driver, from Pieter Jansen van Vuuren. 11) Fix leaks in qualcomm rmnet, from Subash Abhinov Kasiviswanathan. 12) Fix DMA API handling in sh_eth driver, from Thomas Petazzoni. 13) Fix spurious netpoll warnings in bnxt_en, from Calvin Owens. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (67 commits) net: mvpp2: fix the RSS table entry offset tcp: evaluate packet losses upon RTT change tcp: fix off-by-one bug in RACK tcp: always evaluate losses in RACK upon undo tcp: correctly test congestion state in RACK bnxt_en: Fix sources of spurious netpoll warnings tcp_bbr: reset long-term bandwidth sampling on loss recovery undo tcp_bbr: reset full pipe detection on loss recovery undo tcp_bbr: record "full bw reached" decision in new full_bw_reached bit sfc: pass valid pointers from efx_enqueue_unwind gianfar: Disable EEE autoneg by default tcp: invalidate rate samples during SACK reneging can: peak/pcie_fd: fix potential bug in restarting tx queue can: usb_8dev: cancel urb on -EPIPE and -EPROTO can: kvaser_usb: cancel urb on -EPIPE and -EPROTO can: esd_usb2: cancel urb on -EPIPE and -EPROTO can: ems_usb: cancel urb on -EPIPE and -EPROTO can: mcba_usb: cancel urb on -EPROTO usbnet: fix alignment for frames with no ethernet header tcp: use current time in tcp_rcv_space_adjust() ... commit 77071bc6c472bb0b36818f3e9595114cdf98c86d Merge: 4066aa7 781b045 Author: Linus Torvalds Date: Fri Dec 8 13:18:47 2017 -0800 Merge tag 'media/v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "A series of fixes for the media subsytem: - The largest amount of fixes in this series is with regards to comments that aren't kernel-doc, but start with "/**". A new check added for 4.15 makes it to produce a *huge* amount of new warnings (I'm compiling here with W=1). Most of the patches in this series fix those. No code changes - just comment changes at the source files - rc: some fixed in order to better handle RC repetition codes - v4l-async: use the v4l2_dev from the root notifier when matching sub-devices - v4l2-fwnode: Check subdev count after checking port - ov 13858 and et8ek8: compilation fix with randconfigs - usbtv: a trivial new USB ID addition - dibusb-common: don't do DMA on stack on firmware load - imx274: Fix error handling, add MAINTAINERS entry - sir_ir: detect presence of port" * tag 'media/v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (50 commits) media: imx274: Fix error handling, add MAINTAINERS entry media: v4l: async: use the v4l2_dev from the root notifier when matching sub-devices media: v4l2-fwnode: Check subdev count after checking port media: et8ek8: select V4L2_FWNODE media: ov13858: Select V4L2_FWNODE media: rc: partial revert of "media: rc: per-protocol repeat period" media: dvb: i2c transfers over usb cannot be done from stack media: dvb-frontends: complete kernel-doc markups media: docs: add documentation for frontend attach info media: dvb_frontends: fix kernel-doc macros media: drivers: remove "/**" from non-kernel-doc comments media: lm3560: add a missing kernel-doc parameter media: rcar_jpu: fix two kernel-doc markups media: vsp1: add a missing kernel-doc parameter media: soc_camera: fix a kernel-doc markup media: mt2063: fix some kernel-doc warnings media: radio-wl1273: fix a parameter name at kernel-doc macro media: s3c-camif: add missing description at s3c_camif_find_format() media: mtk-vpu: add description for wdt fields at struct mtk_vpu media: vdec: fix some kernel-doc warnings ... commit 4066aa72f9f2886105c6f747d7f9bd4f14f53c12 Merge: 7267212 90eeb3a Author: Linus Torvalds Date: Fri Dec 8 13:11:57 2017 -0800 Merge tag 'drm-fixes-for-v4.15-rc3' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "This pull is a bit larger than I'd like but a large bunch of it is license fixes, AMD wanted to fix the licenses for a bunch of files that were missing them, Otherwise a bunch of TTM regression fix since the hugepage support, some i915 and gvt fixes, a core connector free in a safe context fix, and one bridge fix" * tag 'drm-fixes-for-v4.15-rc3' of git://people.freedesktop.org/~airlied/linux: (26 commits) drm/bridge: analogix dp: Fix runtime PM state in get_modes() callback Revert "drm/i915: Display WA #1133 WaFbcSkipSegments:cnl, glk" drm/vc4: Fix false positive WARN() backtrace on refcount_inc() usage drm/i915: Call i915_gem_init_userptr() before taking struct_mutex drm/exynos: remove unnecessary function declaration drm/exynos: remove unnecessary descrptions drm/exynos: gem: Drop NONCONTIG flag for buffers allocated without IOMMU drm/exynos: Fix dma-buf import drm/ttm: swap consecutive allocated pooled pages v4 drm: safely free connectors from connector_iter drm/i915/gvt: set max priority for gvt context drm/i915/gvt: Don't mark vgpu context as inactive when preempted drm/i915/gvt: Limit read hw reg to active vgpu drm/i915/gvt: Export intel_gvt_render_mmio_to_ring_id() drm/i915/gvt: Emulate PCI expansion ROM base address register drm/ttm: swap consecutive allocated cached pages v3 drm/ttm: roundup the shrink request to prevent skip huge pool drm/ttm: add page order support in ttm_pages_put drm/ttm: add set_pages_wb for handling page order more than zero drm/ttm: add page order in page pool ... commit 7267212c80ce4c946940ec9de4900851d1170d76 Merge: 78d9b04 18022a1 Author: Linus Torvalds Date: Fri Dec 8 13:03:02 2017 -0800 Merge tag 'md/4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull md fixes from Shaohua Li: "Some MD fixes. The notable one is a raid5-cache deadlock bug with dm-raid, others are not significant" * tag 'md/4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: md/raid1/10: add missed blk plug md: limit mdstat resync progress to max_sectors md/r5cache: move mddev_lock() out of r5c_journal_mode_set() md/raid5: correct degraded calculation in raid5_error commit babc8110057cb9ca542c3c1666cbda4e8ccf9250 Author: Stefan Schake Date: Sat Dec 2 18:40:39 2017 +0100 drm/vc4: Release fence after signalling We were never releasing the initial fence reference that is obtained through dma_fence_init. Link: https://github.com/anholt/linux/issues/122 Fixes: cdec4d361323 ("drm/vc4: Expose dma-buf fences for V3D rendering.") Signed-off-by: Stefan Schake Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1512236444-301-1-git-send-email-stschake@gmail.com drivers/gpu/drm/vc4/vc4_gem.c | 4 +++- drivers/gpu/drm/vc4/vc4_irq.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit 78d9b048446c3c0a83313444fb706f8f3bccdae7 Merge: 900add2 589b754 Author: Linus Torvalds Date: Fri Dec 8 13:00:51 2017 -0800 Merge tag 'devicetree-fixes-for-4.15-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree fixes from Rob Herring: "Another set of DT fixes: - Fixes from overlay code rework. A trifecta of fixes to the locking, an out of bounds access, and a memory leak in of_overlay_apply() - Clean-up at25 eeprom binding document - Remove leading '0x' in unit-addresses from binding docs" * tag 'devicetree-fixes-for-4.15-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of: overlay: Make node skipping in init_overlay_changeset() clearer of: overlay: Fix out-of-bounds write in init_overlay_changeset() of: overlay: Fix (un)locking in of_overlay_apply() of: overlay: Fix memory leak in of_overlay_apply() error path dt-bindings: eeprom: at25: Document device-specific compatible values dt-bindings: eeprom: at25: Grammar s/are can/can/ dt-bindings: Remove leading 0x from bindings notation of: overlay: Remove else after goto of: Spelling s/changset/changeset/ of: unittest: Remove bogus overlay mutex release from overlay_data_add() commit 900add27f55660158e7cac07674882befec49297 Merge: 32abeb0 03e9f8a Author: Linus Torvalds Date: Fri Dec 8 12:58:51 2017 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio bugfixes from Michael Tsirkin: "A couple of minor bugfixes" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_net: fix return value check in receive_mergeable() virtio_mmio: add cleanup for virtio_mmio_remove virtio_mmio: add cleanup for virtio_mmio_probe commit 32abeb09abdaa86f42b5ee904fb60bf8012803ad Merge: d90696e 1ab134c Author: Linus Torvalds Date: Fri Dec 8 12:53:43 2017 -0800 Merge tag 'for-linus-4.15-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Just two small fixes for the new pvcalls frontend driver" * tag 'for-linus-4.15-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/pvcalls: Fix a check in pvcalls_front_remove() xen/pvcalls: check for xenbus_read() errors commit d90696ed61ddcf2bbe47899f17e667800b89b7b9 Merge: c6b3e96 d810418 Author: Linus Torvalds Date: Fri Dec 8 12:52:09 2017 -0800 Merge tag 'powerpc-4.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "One notable fix for kexec on Power9, where we were not clearing MMU PID properly which sometimes leads to hangs. Finally debugged to a root cause by Nick. A revert of a patch which tried to rework our panic handling to get more output on the console, but inadvertently broke reporting the panic to the hypervisor, which apparently people care about. Then a fix for an oops in the PMU code, and finally some s/%p/%px/ in xmon. Thanks to: David Gibson, Nicholas Piggin, Ravi Bangoria" * tag 'powerpc-4.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/xmon: Don't print hashed pointers in xmon powerpc/64s: Initialize ISAv3 MMU registers before setting partition table Revert "powerpc: Do not call ppc_md.panic in fadump panic notifier" powerpc/perf: Fix oops when grouping different pmu events commit fd29117aeb905aaacdf4ff5afbc7787fa50e16e4 Merge: 03afb6e 91785de Author: David S. Miller Date: Fri Dec 8 14:53:54 2017 -0500 Merge tag 'linux-can-fixes-for-4.15-20171208' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2017-12-08 this is a pull request of 6 patches for net/master. Martin Kelly provides 5 patches for various USB based CAN drivers, that properly cancel the URBs on adapter unplug, so that the driver doesn't end up in an endless loop. Stephane Grosjean provides a patch to restart the tx queue if zero length packages are transmitted. ==================== Signed-off-by: David S. Miller commit 03afb6e43aaf71e761c1e22d36c2670ef82f089a Merge: 8a7b741 a41886f Author: David S. Miller Date: Fri Dec 8 14:48:49 2017 -0500 Merge tag 'wireless-drivers-for-davem-2017-12-08' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.15 Second set of fixes for 4.15. This time a lot of iwlwifi patches and two brcmfmac patches. Most important here are the MIC and IVC fixes for iwlwifi to unbreak 9000 series. iwlwifi * fix rate-scaling to not start lowest possible rate * fix the TX queue hang detection for AP/GO modes * fix the TX queue hang timeout in monitor interfaces * fix packet injection * remove a wrong error message when dumping PCI registers * fix race condition with RF-kill * tell mac80211 when the MIC has been stripped (9000 series) * tell mac80211 when the IVC has been stripped (9000 series) * add 2 new PCI IDs, one for 9000 and one for 22000 * fix a queue hang due during a P2P Remain-on-Channel operation brcmfmac * fix a race which sometimes caused a crash during sdio unbind * fix a kernel-doc related build error ==================== Signed-off-by: David S. Miller commit 8a7b741e76cd31b6000636f0391e67ba6793ad1c Author: Antoine Tenart Date: Fri Dec 8 10:24:20 2017 +0100 net: mvpp2: fix the RSS table entry offset The macro used to access or set an RSS table entry was using an offset of 8, while it should use an offset of 0. This lead to wrongly configure the RSS table, not accessing the right entries. Fixes: 1d7d15d79fb4 ("net: mvpp2: initialize the RSS tables") Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7e445a1c8f4fb056a94dcb6accbc590aec69d19 Merge: 2edbdb3 6065fd0 Author: David S. Miller Date: Fri Dec 8 14:14:12 2017 -0500 Merge branch 'tcp-RACK-loss-recovery-bug-fixes' Yuchung Cheng says: ==================== tcp: RACK loss recovery bug fixes This patch set has four minor bug fixes in TCP RACK loss recovery. ==================== Signed-off-by: David S. Miller commit 6065fd0d179b96ddc488c76542349bcb148a95fd Author: Yuchung Cheng Date: Thu Dec 7 11:33:33 2017 -0800 tcp: evaluate packet losses upon RTT change RACK skips an ACK unless it advances the most recently delivered TX timestamp (rack.mstamp). Since RACK also uses the most recent RTT to decide if a packet is lost, RACK should still run the loss detection whenever the most recent RTT changes. For example, an ACK that does not advance the timestamp but triggers the cwnd undo due to reordering, would then use the most recent (higher) RTT measurement to detect further losses. Signed-off-by: Yuchung Cheng Reviewed-by: Neal Cardwell Reviewed-by: Priyaranjan Jha Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_recovery.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 428aec5e69fa17d223e1495f395833c50770f7ae Author: Yuchung Cheng Date: Thu Dec 7 11:33:32 2017 -0800 tcp: fix off-by-one bug in RACK RACK should mark a packet lost when remaining wait time is zero. Signed-off-by: Yuchung Cheng Reviewed-by: Neal Cardwell Reviewed-by: Priyaranjan Jha Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_recovery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cd1fc85b4399d47e3d6626301741ba8c38cd475a Author: Yuchung Cheng Date: Thu Dec 7 11:33:31 2017 -0800 tcp: always evaluate losses in RACK upon undo When sender detects spurious retransmission, all packets marked lost are remarked to be in-flight. However some may be considered lost based on its timestamps in RACK. This patch forces RACK to re-evaluate, which may be skipped previously if the ACK does not advance RACK timestamp. Signed-off-by: Yuchung Cheng Reviewed-by: Neal Cardwell Reviewed-by: Priyaranjan Jha Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 1 + 1 file changed, 1 insertion(+) commit 0ce294d88457bccd7f9991f883fec80022a1ddbd Author: Yuchung Cheng Date: Thu Dec 7 11:33:30 2017 -0800 tcp: correctly test congestion state in RACK RACK does not test the loss recovery state correctly to compute the reordering window. It assumes if lost_out is zero then TCP is not in loss recovery. But it can be zero during recovery before calling tcp_rack_detect_loss(): when an ACK acknowledges all packets marked lost before receiving this ACK, but has not yet to discover new ones by tcp_rack_detect_loss(). The fix is to simply test the congestion state directly. Signed-off-by: Yuchung Cheng Reviewed-by: Neal Cardwell Reviewed-by: Priyaranjan Jha Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_recovery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2edbdb3159d6f6bd3a9b6e7f789f2b879699a519 Author: Calvin Owens Date: Fri Dec 8 09:05:26 2017 -0800 bnxt_en: Fix sources of spurious netpoll warnings After applying 2270bc5da3497945 ("bnxt_en: Fix netpoll handling") and 903649e718f80da2 ("bnxt_en: Improve -ENOMEM logic in NAPI poll loop."), we still see the following WARN fire: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1875170 at net/core/netpoll.c:165 netpoll_poll_dev+0x15a/0x160 bnxt_poll+0x0/0xd0 exceeded budget in poll Call Trace: [] dump_stack+0x4d/0x70 [] __warn+0xd3/0xf0 [] warn_slowpath_fmt+0x4f/0x60 [] netpoll_poll_dev+0x15a/0x160 [] netpoll_send_skb_on_dev+0x168/0x250 [] netpoll_send_udp+0x2dc/0x440 [] write_ext_msg+0x20e/0x250 [] call_console_drivers.constprop.23+0xa5/0x110 [] console_unlock+0x339/0x5b0 [] vprintk_emit+0x2c8/0x450 [] vprintk_default+0x1f/0x30 [] printk+0x48/0x50 [] edac_raw_mc_handle_error+0x563/0x5c0 [edac_core] [] edac_mc_handle_error+0x42b/0x6e0 [edac_core] [] sbridge_mce_output_error+0x410/0x10d0 [sb_edac] [] sbridge_check_error+0xac/0x130 [sb_edac] [] edac_mc_workq_function+0x3c/0x90 [edac_core] [] process_one_work+0x19b/0x480 [] worker_thread+0x6a/0x520 [] kthread+0xe4/0x100 [] ret_from_fork+0x22/0x40 This happens because we increment rx_pkts on -ENOMEM and -EIO, resulting in rx_pkts > 0. Fix this by only bumping rx_pkts if we were actually given a non-zero budget. Signed-off-by: Calvin Owens Acked-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 33f801366bdf3f8b67dfe325b84f4051a090d01e Author: Jiada Wang Date: Thu Dec 7 22:15:38 2017 -0800 ASoC: rsnd: ssi: fix race condition in rsnd_ssi_pointer_update Currently there is race condition between set of byte_pos and wrap it around when new buffer starts. If .pointer is called in-between it will result in inconsistent pointer position be returned from .pointer callback. This patch increments buffer pointer atomically to avoid this issue. Signed-off-by: Jiada Wang Reviewed-by: Takashi Sakamoto Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/ssi.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 4362934a75ff2a399fd0bcd75937907115770020 Author: Naveen Manohar Date: Fri Dec 8 09:30:18 2017 +0530 ASoC: Intel: Change kern log level to avoid unwanted messages patch suppresses the warning message "control load not supported" as this is a debug information to help debug issues in topology. Signed-off-by: Naveen Manohar Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f0be40ba59c2d5fdfea48e3ff93f6165d616440 Author: Alexandre Belloni Date: Fri Dec 8 15:18:53 2017 +0100 ASoC: atmel-classd: select correct Kconfig symbol SND_ATMEL_SOC_CLASSD selects SND_ATMEL_SOC_DMA but the driver itself handles its own DMA operations and doesn't need anything from atmel-pcm-dma.c or atmel_ssc_dai.c. Replace SND_ATMEL_SOC_DMA by SND_SOC_GENERIC_DMAENGINE_PCM which is the only one actually required. This may end up in a configuration leading to a link error: sound/soc/atmel/atmel_ssc_dai.o: In function `atmel_ssc_set_audio': atmel_ssc_dai.c:(.text+0x79c): undefined reference to `atmel_pcm_dma_platform_register' atmel_ssc_dai.c:(.text+0x79c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `atmel_pcm_dma_platform_register' sound/soc/atmel/atmel_ssc_dai.o: In function `atmel_ssc_put_audio': atmel_ssc_dai.c:(.text+0xf24): undefined reference to `atmel_pcm_dma_platform_unregister' atmel_ssc_dai.c:(.text+0xf24): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `atmel_pcm_dma_platform_unregister' Tested on sama5d2 xplained with the following configuration where nothing selects SND_ATMEL_SOC_DMA: CONFIG_SND_ATMEL_SOC=y CONFIG_SND_ATMEL_SOC_CLASSD=y Reported-by: Arnd Bergmann Tested-by: Arnd Bergmann Fixes: e0a25b6d1862 ("ASoC: atmel-classd: add the Audio Class D Amplifier") Signed-off-by: Alexandre Belloni Signed-off-by: Mark Brown sound/soc/atmel/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39005e562a88c61fa77acef1d2c0cb81ee6b0423 Author: Neil Armstrong Date: Mon Dec 4 10:04:53 2017 +0100 ARM64: dts: meson-gx: fix UART pclk clock name The clock-names for pclk was wrongly set to "core", but the bindings specifies "pclk". This was not cathed until the legacy non-documented bindings were removed. Reported-by: Andreas Färber Fixes: f72d6f6037b7 ("ARM64: dts: meson-gx: use stable UART bindings with correct gate clock") Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 4 ++-- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit b25b3e2fd9ca9b7907a53baf46dea4074ed5e062 Merge: d4a7a88 600647d Author: David S. Miller Date: Fri Dec 8 13:27:44 2017 -0500 Merge branch 'tcp-bbr-sampling-fixes' Neal Cardwell says: ==================== TCP BBR sampling fixes for loss recovery undo This patch series has a few minor bug fixes for cases where spurious loss recoveries can trick BBR estimators into estimating that the available bandwidth is much lower than the true available bandwidth. In both cases the fix here is to just reset the estimator upon loss recovery undo. ==================== Signed-off-by: David S. Miller commit 600647d467c6d04b3954b41a6ee1795b5ae00550 Author: Neal Cardwell Date: Thu Dec 7 12:43:32 2017 -0500 tcp_bbr: reset long-term bandwidth sampling on loss recovery undo Fix BBR so that upon notification of a loss recovery undo BBR resets long-term bandwidth sampling. Under high reordering, reordering events can be interpreted as loss. If the reordering and spurious loss estimates are high enough, this can cause BBR to spuriously estimate that we are seeing loss rates high enough to trigger long-term bandwidth estimation. To avoid that problem, this commit resets long-term bandwidth sampling on loss recovery undo events. Signed-off-by: Neal Cardwell Reviewed-by: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_bbr.c | 1 + 1 file changed, 1 insertion(+) commit 2f6c498e4f15d27852c04ed46d804a39137ba364 Author: Neal Cardwell Date: Thu Dec 7 12:43:31 2017 -0500 tcp_bbr: reset full pipe detection on loss recovery undo Fix BBR so that upon notification of a loss recovery undo BBR resets the full pipe detection (STARTUP exit) state machine. Under high reordering, reordering events can be interpreted as loss. If the reordering and spurious loss estimates are high enough, this could previously cause BBR to spuriously estimate that the pipe is full. Since spurious loss recovery means that our overall sending will have slowed down spuriously, this commit gives a flow more time to probe robustly for bandwidth and decide the pipe is really full. Signed-off-by: Neal Cardwell Reviewed-by: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_bbr.c | 4 ++++ 1 file changed, 4 insertions(+) commit c589e69b508d29ed8e644dfecda453f71c02ec27 Author: Neal Cardwell Date: Thu Dec 7 12:43:30 2017 -0500 tcp_bbr: record "full bw reached" decision in new full_bw_reached bit This commit records the "full bw reached" decision in a new full_bw_reached bit. This is a pure refactor that does not change the current behavior, but enables subsequent fixes and improvements. In particular, this enables simple and clean fixes because the full_bw and full_bw_cnt can be unconditionally zeroed without worrying about forgetting that we estimated we filled the pipe in Startup. And it enables future improvements because multiple code paths can be used for estimating that we filled the pipe in Startup; any new code paths only need to set this bit when they think the pipe is full. Note that this fix intentionally reduces the width of the full_bw_cnt counter, since we have never used the most significant bit. Signed-off-by: Neal Cardwell Reviewed-by: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_bbr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d4a7a8893d4cdbc89d79ac4aa704bf8d4b67b368 Author: Bert Kenward Date: Thu Dec 7 17:18:58 2017 +0000 sfc: pass valid pointers from efx_enqueue_unwind The bytes_compl and pkts_compl pointers passed to efx_dequeue_buffers cannot be NULL. Add a paranoid warning to check this condition and fix the one case where they were NULL. efx_enqueue_unwind() is called very rarely, during error handling. Without this fix it would fail with a NULL pointer dereference in efx_dequeue_buffer, with efx_enqueue_skb in the call stack. Fixes: e9117e5099ea ("sfc: Firmware-Assisted TSO version 2") Reported-by: Jarod Wilson Signed-off-by: Bert Kenward Tested-by: Jarod Wilson Acked-by: Jarod Wilson Signed-off-by: David S. Miller drivers/net/ethernet/sfc/tx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b6b5e8a691185606dfffff3198c89e3b4fd9d4f6 Author: Claudiu Manoil Date: Thu Dec 7 18:44:23 2017 +0200 gianfar: Disable EEE autoneg by default This controller does not support EEE, but it may connect to a PHY which supports EEE and advertises EEE by default, while its link partner also advertises EEE. If this happens, the PHY enters low power mode when the traffic rate is low and causes packet loss. This patch disables EEE advertisement by default for any PHY that gianfar connects to, to prevent the above unwanted outcome. Signed-off-by: Shaohui Xie Tested-by: Yangbo Lu Signed-off-by: Claudiu Manoil Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/freescale/gianfar.c | 5 +++++ 1 file changed, 5 insertions(+) commit c6b3e9693f8a32ba3b07e2f2723886ea2aff4e94 Merge: 6e7e7f4 e779498 Author: Linus Torvalds Date: Fri Dec 8 10:10:17 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: - three more patches in regard to the SPDX license tags. The missing tags for the files in arch/s390/kvm will be merged via the KVM tree. With that all s390 related files should have their SPDX tags. - a patch to get rid of 'struct timespec' in the DASD driver. - bug fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: fix compat system call table s390/mm: fix off-by-one bug in 5-level page table handling s390: Remove redudant license text s390: add a few more SPDX identifiers s390/dasd: prevent prefix I/O error s390: always save and restore all registers on context switch s390/dasd: remove 'struct timespec' usage s390/qdio: restrict target-full handling to IQDIO s390/qdio: consider ERROR buffers for inbound-full condition s390/virtio: add BSD license to virtio-ccw commit 6e7e7f4ddc742c390f289b98fe1e53e7487facd7 Merge: 3625de4 cb968af Author: Linus Torvalds Date: Fri Dec 8 10:08:23 2017 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Fix some more FP register fallout from the SVE patches and also some problems with the PGD tracking in our software PAN emulation code, after we received a crash report from a 3.18 kernel running a backport. Summary: - fix SW PAN pgd shadowing for kernel threads, EFI and exiting user tasks - fix FP register leak when a task_struct is re-allocated - fix potential use-after-free in FP state tracking used by KVM" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64/sve: Avoid dereference of dead task_struct in KVM guest entry arm64: SW PAN: Update saved ttbr0 value on enter_lazy_tlb arm64: SW PAN: Point saved ttbr0 at the zero page when switching to init_mm arm64: fpsimd: Abstract out binding of task's fpsimd context to the cpu. arm64: fpsimd: Prevent registers leaking from dead tasks commit 3625de4b2872e7d25730749680af029ba0957e18 Merge: 7ed9fd2 1ecbd71 Author: Linus Torvalds Date: Fri Dec 8 10:05:53 2017 -0800 Merge tag 'acpi-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "This fixes an out of bounds warning from KASAN in the ACPI CPPC driver" * tag 'acpi-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / CPPC: Fix KASAN global out of bounds warning commit 7ed9fd2e2916e89a5874359d6e4d5a49abb08c83 Merge: 968edbd 31eb743 Author: Linus Torvalds Date: Fri Dec 8 09:58:10 2017 -0800 Merge tag 'pm-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "This fixes an issue in the device runtime PM framework that prevents customer devices from resuming if runtime PM is disabled for one or more of their supplier devices (as reflected by device links between those devices)" * tag 'pm-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / runtime: Fix handling of suppliers with disabled runtime PM commit 72b663a99c074a8d073e7ecdae446cfb024ef551 Author: Chunfeng Yun Date: Fri Dec 8 18:10:06 2017 +0200 usb: xhci: fix TDS for MTK xHCI1.1 For MTK's xHCI 1.0 or latter, TD size is the number of max packet sized packets remaining in the TD, not including this TRB (following spec). For MTK's xHCI 0.96 and older, TD size is the number of max packet sized packets remaining in the TD, including this TRB (not following spec). Cc: stable Signed-off-by: Chunfeng Yun Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5d9b70f7d52eb14bb37861c663bae44de9521c35 Author: Mathias Nyman Date: Fri Dec 8 18:10:05 2017 +0200 xhci: Don't add a virt_dev to the devs array before it's fully allocated Avoid null pointer dereference if some function is walking through the devs array accessing members of a new virt_dev that is mid allocation. Add the virt_dev to xhci->devs[i] _after_ the virt_device and all its members are properly allocated. issue found by KASAN: null-ptr-deref in xhci_find_slot_id_by_port "Quick analysis suggests that xhci_alloc_virt_device() is not mutex protected. If so, there is a time frame where xhci->devs[slot_id] is set but not fully initialized. Specifically, xhci->devs[i]->udev can be NULL." Cc: stable Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 50dd2ea8ef67a1617e0c0658bcbec4b9fb03b936 Author: Ben Hutchings Date: Fri Dec 8 16:15:20 2017 +0000 ASoC: wm_adsp: Fix validation of firmware and coeff lengths The checks for whether another region/block header could be present are subtracting the size from the current offset. Obviously we should instead subtract the offset from the size. The checks for whether the region/block data fit in the file are adding the data size to the current offset and header size, without checking for integer overflow. Rearrange these so that overflow is impossible. Signed-off-by: Ben Hutchings Acked-by: Charles Keepax Tested-by: Charles Keepax Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/codecs/wm_adsp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit be6123df1ea8f01ee2f896a16c2b7be3e4557a5a Author: Shuah Khan Date: Thu Dec 7 14:16:50 2017 -0700 usbip: fix stub_send_ret_submit() vulnerability to null transfer_buffer stub_send_ret_submit() handles urb with a potential null transfer_buffer, when it replays a packet with potential malicious data that could contain a null buffer. Add a check for the condition when actual_length > 0 and transfer_buffer is null. Reported-by: Secunia Research Cc: stable Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_tx.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 2f2d0088eb93db5c649d2a5e34a3800a8a935fc5 Author: Shuah Khan Date: Thu Dec 7 14:16:49 2017 -0700 usbip: prevent vhci_hcd driver from leaking a socket pointer address When a client has a USB device attached over IP, the vhci_hcd driver is locally leaking a socket pointer address via the /sys/devices/platform/vhci_hcd/status file (world-readable) and in debug output when "usbip --debug port" is run. Fix it to not leak. The socket pointer address is not used at the moment and it was made visible as a convenient way to find IP address from socket pointer address by looking up /proc/net/{tcp,tcp6}. As this opens a security hole, the fix replaces socket pointer address with sockfd. Reported-by: Secunia Research Cc: stable Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/usbip_common.h | 1 + drivers/usb/usbip/vhci_sysfs.c | 25 ++++++++++++++++--------- tools/usb/usbip/libsrc/vhci_driver.c | 8 ++++---- 3 files changed, 21 insertions(+), 13 deletions(-) commit c6688ef9f29762e65bce325ef4acd6c675806366 Author: Shuah Khan Date: Thu Dec 7 14:16:48 2017 -0700 usbip: fix stub_rx: harden CMD_SUBMIT path to handle malicious input Harden CMD_SUBMIT path to handle malicious input that could trigger large memory allocations. Add checks to validate transfer_buffer_length and number_of_packets to protect against bad input requesting for unbounded memory allocations. Validate early in get_pipe() and return failure. Reported-by: Secunia Research Cc: stable Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_rx.c | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) commit 635f545a7e8be7596b9b2b6a43cab6bbd5a88e43 Author: Shuah Khan Date: Thu Dec 7 14:16:47 2017 -0700 usbip: fix stub_rx: get_pipe() to validate endpoint number get_pipe() routine doesn't validate the input endpoint number and uses to reference ep_in and ep_out arrays. Invalid endpoint number can trigger BUG(). Range check the epnum and returning error instead of calling BUG(). Change caller stub_recv_cmd_submit() to handle the get_pipe() error return. Reported-by: Secunia Research Cc: stable Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub_rx.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 82a2b827c96883d8b39a58bba23d222d6b0de7ff Author: Julien BOIBESSOT Date: Tue Dec 5 16:09:04 2017 +0100 tools/usbip: fixes potential (minor) "buffer overflow" (detected on recent gcc with -Werror) Fixes following build error: vhci_driver.c: In function 'refresh_imported_device_list': vhci_driver.c:118:37: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=] snprintf(status, sizeof(status), "status.%d", i); ^~~~~~~~~~~ vhci_driver.c:118:4: note: 'snprintf' output between 9 and 18 bytes into a destination of size 17 snprintf(status, sizeof(status), "status.%d", i); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Julien BOIBESSOT Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/libsrc/vhci_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62354454625741f0569c2cbe45b2d192f8fd258e Author: David Kozub Date: Tue Dec 5 22:40:04 2017 +0100 USB: uas and storage: Add US_FL_BROKEN_FUA for another JMicron JMS567 ID There is another JMS567-based USB3 UAS enclosure (152d:0578) that fails with the following error: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [sda] tag#0 Sense Key : Illegal Request [current] [sda] tag#0 Add. Sense: Invalid field in cdb The issue occurs both with UAS (occasionally) and mass storage (immediately after mounting a FS on a disk in the enclosure). Enabling US_FL_BROKEN_FUA quirk solves this issue. This patch adds an UNUSUAL_DEV with US_FL_BROKEN_FUA for the enclosure for both UAS and mass storage. Signed-off-by: David Kozub Acked-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/unusual_devs.h | 7 +++++++ drivers/usb/storage/unusual_uas.h | 7 +++++++ 2 files changed, 14 insertions(+) commit bd3486ded7a0c313a6575343e6c2b21d14476645 Author: Bin Liu Date: Tue Dec 5 08:45:30 2017 -0600 usb: musb: da8xx: fix babble condition handling When babble condition happens, the musb controller might automatically turns off VBUS. On DA8xx platform, the controller generates drvvbus interrupt for turning off VBUS along with the babble interrupt. In this case, we should handle the babble interrupt first and recover from the babble condition. This change ignores the drvvbus interrupt if babble interrupt is also generated at the same time, so the babble recovery routine works properly. Cc: stable@vger.kernel.org # v3.16+ Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/da8xx.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit fbc7c07ec23c040179384a1f16b62b6030eb6bdd Author: Suren Baghdasaryan Date: Wed Dec 6 09:27:30 2017 -0800 dm bufio: fix shrinker scans when (nr_to_scan < retain_target) When system is under memory pressure it is observed that dm bufio shrinker often reclaims only one buffer per scan. This change fixes the following two issues in dm bufio shrinker that cause this behavior: 1. ((nr_to_scan - freed) <= retain_target) condition is used to terminate slab scan process. This assumes that nr_to_scan is equal to the LRU size, which might not be correct because do_shrink_slab() in vmscan.c calculates nr_to_scan using multiple inputs. As a result when nr_to_scan is less than retain_target (64) the scan will terminate after the first iteration, effectively reclaiming one buffer per scan and making scans very inefficient. This hurts vmscan performance especially because mutex is acquired/released every time dm_bufio_shrink_scan() is called. New implementation uses ((LRU size - freed) <= retain_target) condition for scan termination. LRU size can be safely determined inside __scan() because this function is called after dm_bufio_lock(). 2. do_shrink_slab() uses value returned by dm_bufio_shrink_count() to determine number of freeable objects in the slab. However dm_bufio always retains retain_target buffers in its LRU and will terminate a scan when this mark is reached. Therefore returning the entire LRU size from dm_bufio_shrink_count() is misleading because that does not represent the number of freeable objects that slab will reclaim during a scan. Returning (LRU size - retain_target) better represents the number of freeable objects in the slab. This way do_shrink_slab() returns 0 when (LRU size < retain_target) and vmscan will not try to scan this shrinker avoiding scans that will not reclaim any memory. Test: tested using Android device running /system/extras/alloc-stress that generates memory pressure and causes intensive shrinker scans Signed-off-by: Suren Baghdasaryan Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c1fd0abee0d52eb7e2871194b6c79d54792f515f Author: Mike Snitzer Date: Thu Dec 7 22:42:27 2017 -0500 dm mpath: fix bio-based multipath queue_if_no_path handling Commit ca5beb76 ("dm mpath: micro-optimize the hot path relative to MPATHF_QUEUE_IF_NO_PATH") caused bio-based DM-multipath to fail mptest's "test_02_sdev_delete". Restoring the logic that existed prior to commit ca5beb76 fixes this bio-based DM-multipath regression. Also verified all mptest tests pass with request-based DM-multipath. This commit effectively reverts commit ca5beb76 -- but it does so without reintroducing the need to take the m->lock spinlock in must_push_back_{rq,bio}. Fixes: ca5beb76 ("dm mpath: micro-optimize the hot path relative to MPATHF_QUEUE_IF_NO_PATH") Cc: stable@vger.kernel.org # 4.12+ Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 49 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 7 deletions(-) commit 5790eabc6e7c3ce2d6ca2e3bbf4de467ce2b64b3 Author: Michael S. Tsirkin Date: Fri Dec 8 17:31:37 2017 +0200 ptr_ring: fix up after recent ptr_ring changes Add more stubs to make it build. Fixes: 81fbfe8a ("ptr_ring: use kmalloc_array()") Signed-off-by: Michael S. Tsirkin tools/virtio/ringtest/ptr_ring.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) commit 589b754df3f37ca0a1f96fccde7f91c59266f38a Author: Geert Uytterhoeven Date: Fri Dec 8 14:13:03 2017 +0100 of: overlay: Make node skipping in init_overlay_changeset() clearer Make it more clear that nodes without "__overlay__" subnodes are skipped, by reverting the logic and using continue. This also reduces indentation level. Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring drivers/of/overlay.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 35e691eddca565f475ba69ff84ca0c9db3b3257b Author: Geert Uytterhoeven Date: Fri Dec 8 14:13:02 2017 +0100 of: overlay: Fix out-of-bounds write in init_overlay_changeset() If an overlay has no "__symbols__" node, but it has nodes without "__overlay__" subnodes at the end (e.g. a "__fixups__" node), after filling in all fragments for nodes with "__overlay__" subnodes, "fragment = &fragments[cnt]" will point beyond the end of the allocated array. Hence writing to "fragment->overlay" will overwrite unallocated memory, which may lead to a crash later. Fix this by deferring both the assignment to "fragment" and the offending write afterwards until we know for sure the node has an "__overlay__" subnode, and thus a valid entry in "fragments[]". Fixes: 61b4de4e0b384f4a ("of: overlay: minor restructuring") Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring drivers/of/overlay.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 54c1fb39fe0495f846539ab765925b008f86801c Author: Eric Biggers Date: Fri Dec 8 15:13:29 2017 +0000 X.509: fix comparisons of ->pkey_algo ->pkey_algo used to be an enum, but was changed to a string by commit 4e8ae72a75aa ("X.509: Make algo identifiers text instead of enum"). But two comparisons were not updated. Fix them to use strcmp(). This bug broke signature verification in certain configurations, depending on whether the string constants were deduplicated or not. Fixes: 4e8ae72a75aa ("X.509: Make algo identifiers text instead of enum") Cc: # v4.6+ Signed-off-by: Eric Biggers Signed-off-by: David Howells crypto/asymmetric_keys/pkcs7_verify.c | 2 +- crypto/asymmetric_keys/x509_public_key.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 18026d866801d0c52e5550210563222bd6c7191d Author: Eric Biggers Date: Fri Dec 8 15:13:29 2017 +0000 KEYS: reject NULL restriction string when type is specified keyctl_restrict_keyring() allows through a NULL restriction when the "type" is non-NULL, which causes a NULL pointer dereference in asymmetric_lookup_restriction() when it calls strcmp() on the restriction string. But no key types actually use a "NULL restriction" to mean anything, so update keyctl_restrict_keyring() to reject it with EINVAL. Reported-by: syzbot Fixes: 97d3aa0f3134 ("KEYS: Add a lookup_restriction function for the asymmetric key type") Cc: # v4.12+ Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/keyctl.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 3d1f0255426af7eeb88bf7221ff683b7ca9e4493 Author: Colin Ian King Date: Fri Dec 8 15:13:29 2017 +0000 security: keys: remove redundant assignment to key_ref Variable key_ref is being assigned a value that is never read; key_ref is being re-assigned a few statements later. Hence this assignment is redundant and can be removed. Signed-off-by: Colin Ian King Signed-off-by: David Howells Reviewed-by: James Morris security/keys/key.c | 1 - 1 file changed, 1 deletion(-) commit aa3300362060525fe1a32de56df9578033530d98 Author: Eric Biggers Date: Fri Dec 8 15:13:29 2017 +0000 X.509: use crypto_shash_digest() Use crypto_shash_digest() instead of crypto_shash_init() followed by crypto_shash_finup(). (For simplicity only; they are equivalent.) Signed-off-by: Eric Biggers Signed-off-by: David Howells crypto/asymmetric_keys/x509_public_key.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 72f9a07b6bfaefdc29fcb75dafa8867a4f6d8317 Author: Eric Biggers Date: Fri Dec 8 15:13:29 2017 +0000 KEYS: be careful with error codes in public_key_verify_signature() In public_key_verify_signature(), if akcipher_request_alloc() fails, we return -ENOMEM. But that error code was set 25 lines above, and by accident someone could easily insert new code in between that assigns to 'ret', which would introduce a signature verification bypass. Make the code clearer by moving the -ENOMEM down to where it is used. Additionally, the callers of public_key_verify_signature() only consider a negative return value to be an error. This means that if any positive return value is accidentally introduced deeper in the call stack (e.g. 'return EBADMSG' instead of 'return -EBADMSG' somewhere in RSA), signature verification will be bypassed. Make things more robust by having public_key_verify_signature() warn about positive errors and translate them into -EINVAL. Signed-off-by: Eric Biggers Signed-off-by: David Howells crypto/asymmetric_keys/public_key.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a80745a6de51a651977a16ef81cba0126f9dd66f Author: Eric Biggers Date: Fri Dec 8 15:13:28 2017 +0000 pkcs7: use crypto_shash_digest() Use crypto_shash_digest() instead of crypto_shash_init() followed by crypto_shash_finup(). (For simplicity only; they are equivalent.) Signed-off-by: Eric Biggers Signed-off-by: David Howells crypto/asymmetric_keys/pkcs7_verify.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 7204eb8590c750e8c10b47f4acd4efe6e4138452 Author: Eric Biggers Date: Fri Dec 8 15:13:28 2017 +0000 pkcs7: fix check for self-signed certificate pkcs7_validate_trust_one() used 'x509->next == x509' to identify a self-signed certificate. That's wrong; ->next is simply the link in the linked list of certificates in the PKCS#7 message. It should be checking ->signer instead. Fix it. Fortunately this didn't actually matter because when we re-visited 'x509' on the next iteration via 'x509->signer', it was already seen and not verified, so we returned -ENOKEY anyway. Signed-off-by: Eric Biggers Signed-off-by: David Howells Reviewed-by: James Morris crypto/asymmetric_keys/pkcs7_trust.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ecb506d3476aa58077e79ef1f75395625458fcc Author: Eric Biggers Date: Fri Dec 8 15:13:28 2017 +0000 pkcs7: return correct error code if pkcs7_check_authattrs() fails If pkcs7_check_authattrs() returns an error code, we should pass that error code on, rather than using ENOMEM. Fixes: 99db44350672 ("PKCS#7: Appropriately restrict authenticated attributes and content type") Signed-off-by: Eric Biggers Signed-off-by: David Howells Reviewed-by: James Morris crypto/asymmetric_keys/pkcs7_parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8dfd2f22d3bf3ab7714f7495ad5d897b8845e8c1 Author: Eric Biggers Date: Fri Dec 8 15:13:28 2017 +0000 509: fix printing uninitialized stack memory when OID is empty Callers of sprint_oid() do not check its return value before printing the result. In the case where the OID is zero-length, -EBADMSG was being returned without anything being written to the buffer, resulting in uninitialized stack memory being printed. Fix this by writing "(bad)" to the buffer in the cases where -EBADMSG is returned. Fixes: 4f73175d0375 ("X.509: Add utility functions to render OIDs as strings") Signed-off-by: Eric Biggers Signed-off-by: David Howells lib/oid_registry.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 47e0a208fb9d91e3f3c86309e752b13a36470ae8 Author: Eric Biggers Date: Fri Dec 8 15:13:28 2017 +0000 X.509: fix buffer overflow detection in sprint_oid() In sprint_oid(), if the input buffer were to be more than 1 byte too small for the first snprintf(), 'bufsize' would underflow, causing a buffer overflow when printing the remainder of the OID. Fortunately this cannot actually happen currently, because no users pass in a buffer that can be too small for the first snprintf(). Regardless, fix it by checking the snprintf() return value correctly. For consistency also tweak the second snprintf() check to look the same. Fixes: 4f73175d0375 ("X.509: Add utility functions to render OIDs as strings") Cc: Takashi Iwai Signed-off-by: Eric Biggers Signed-off-by: David Howells Reviewed-by: James Morris lib/oid_registry.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0f30cbea005bd3077bd98cd29277d7fc2699c1da Author: Eric Biggers Date: Fri Dec 8 15:13:27 2017 +0000 X.509: reject invalid BIT STRING for subjectPublicKey Adding a specially crafted X.509 certificate whose subjectPublicKey ASN.1 value is zero-length caused x509_extract_key_data() to set the public key size to SIZE_MAX, as it subtracted the nonexistent BIT STRING metadata byte. Then, x509_cert_parse() called kmemdup() with that bogus size, triggering the WARN_ON_ONCE() in kmalloc_slab(). This appears to be harmless, but it still must be fixed since WARNs are never supposed to be user-triggerable. Fix it by updating x509_cert_parse() to validate that the value has a BIT STRING metadata byte, and that the byte is 0 which indicates that the number of bits in the bitstring is a multiple of 8. It would be nice to handle the metadata byte in asn1_ber_decoder() instead. But that would be tricky because in the general case a BIT STRING could be implicitly tagged, and/or could legitimately have a length that is not a whole number of bytes. Here was the WARN (cleaned up slightly): WARNING: CPU: 1 PID: 202 at mm/slab_common.c:971 kmalloc_slab+0x5d/0x70 mm/slab_common.c:971 Modules linked in: CPU: 1 PID: 202 Comm: keyctl Tainted: G B 4.14.0-09238-g1d3b78bbc6e9 #26 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-20171110_100015-anatol 04/01/2014 task: ffff880033014180 task.stack: ffff8800305c8000 Call Trace: __do_kmalloc mm/slab.c:3706 [inline] __kmalloc_track_caller+0x22/0x2e0 mm/slab.c:3726 kmemdup+0x17/0x40 mm/util.c:118 kmemdup include/linux/string.h:414 [inline] x509_cert_parse+0x2cb/0x620 crypto/asymmetric_keys/x509_cert_parser.c:106 x509_key_preparse+0x61/0x750 crypto/asymmetric_keys/x509_public_key.c:174 asymmetric_key_preparse+0xa4/0x150 crypto/asymmetric_keys/asymmetric_type.c:388 key_create_or_update+0x4d4/0x10a0 security/keys/key.c:850 SYSC_add_key security/keys/keyctl.c:122 [inline] SyS_add_key+0xe8/0x290 security/keys/keyctl.c:62 entry_SYSCALL_64_fastpath+0x1f/0x96 Fixes: 42d5ec27f873 ("X.509: Add an ASN.1 decoder") Cc: # v3.7+ Signed-off-by: Eric Biggers Signed-off-by: David Howells Reviewed-by: James Morris crypto/asymmetric_keys/x509_cert_parser.c | 2 ++ 1 file changed, 2 insertions(+) commit 81a7be2cd69b412ab6aeacfe5ebf1bb6e5bce955 Author: Eric Biggers Date: Fri Dec 8 15:13:27 2017 +0000 ASN.1: check for error from ASN1_OP_END__ACT actions asn1_ber_decoder() was ignoring errors from actions associated with the opcodes ASN1_OP_END_SEQ_ACT, ASN1_OP_END_SET_ACT, ASN1_OP_END_SEQ_OF_ACT, and ASN1_OP_END_SET_OF_ACT. In practice, this meant the pkcs7_note_signed_info() action (since that was the only user of those opcodes). Fix it by checking for the error, just like the decoder does for actions associated with the other opcodes. This bug allowed users to leak slab memory by repeatedly trying to add a specially crafted "pkcs7_test" key (requires CONFIG_PKCS7_TEST_KEY). In theory, this bug could also be used to bypass module signature verification, by providing a PKCS#7 message that is misparsed such that a signature's ->authattrs do not contain its ->msgdigest. But it doesn't seem practical in normal cases, due to restrictions on the format of the ->authattrs. Fixes: 42d5ec27f873 ("X.509: Add an ASN.1 decoder") Cc: # v3.7+ Signed-off-by: Eric Biggers Signed-off-by: David Howells Reviewed-by: James Morris lib/asn1_decoder.c | 2 ++ 1 file changed, 2 insertions(+) commit e0058f3a874ebb48b25be7ff79bc3b4e59929f90 Author: Eric Biggers Date: Fri Dec 8 15:13:27 2017 +0000 ASN.1: fix out-of-bounds read when parsing indefinite length item In asn1_ber_decoder(), indefinitely-sized ASN.1 items were being passed to the action functions before their lengths had been computed, using the bogus length of 0x80 (ASN1_INDEFINITE_LENGTH). This resulted in reading data past the end of the input buffer, when given a specially crafted message. Fix it by rearranging the code so that the indefinite length is resolved before the action is called. This bug was originally found by fuzzing the X.509 parser in userspace using libFuzzer from the LLVM project. KASAN report (cleaned up slightly): BUG: KASAN: slab-out-of-bounds in memcpy ./include/linux/string.h:341 [inline] BUG: KASAN: slab-out-of-bounds in x509_fabricate_name.constprop.1+0x1a4/0x940 crypto/asymmetric_keys/x509_cert_parser.c:366 Read of size 128 at addr ffff880035dd9eaf by task keyctl/195 CPU: 1 PID: 195 Comm: keyctl Not tainted 4.14.0-09238-g1d3b78bbc6e9 #26 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-20171110_100015-anatol 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xd1/0x175 lib/dump_stack.c:53 print_address_description+0x78/0x260 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x23f/0x350 mm/kasan/report.c:409 memcpy+0x1f/0x50 mm/kasan/kasan.c:302 memcpy ./include/linux/string.h:341 [inline] x509_fabricate_name.constprop.1+0x1a4/0x940 crypto/asymmetric_keys/x509_cert_parser.c:366 asn1_ber_decoder+0xb4a/0x1fd0 lib/asn1_decoder.c:447 x509_cert_parse+0x1c7/0x620 crypto/asymmetric_keys/x509_cert_parser.c:89 x509_key_preparse+0x61/0x750 crypto/asymmetric_keys/x509_public_key.c:174 asymmetric_key_preparse+0xa4/0x150 crypto/asymmetric_keys/asymmetric_type.c:388 key_create_or_update+0x4d4/0x10a0 security/keys/key.c:850 SYSC_add_key security/keys/keyctl.c:122 [inline] SyS_add_key+0xe8/0x290 security/keys/keyctl.c:62 entry_SYSCALL_64_fastpath+0x1f/0x96 Allocated by task 195: __do_kmalloc_node mm/slab.c:3675 [inline] __kmalloc_node+0x47/0x60 mm/slab.c:3682 kvmalloc ./include/linux/mm.h:540 [inline] SYSC_add_key security/keys/keyctl.c:104 [inline] SyS_add_key+0x19e/0x290 security/keys/keyctl.c:62 entry_SYSCALL_64_fastpath+0x1f/0x96 Fixes: 42d5ec27f873 ("X.509: Add an ASN.1 decoder") Reported-by: Alexander Potapenko Cc: # v3.7+ Signed-off-by: Eric Biggers Signed-off-by: David Howells lib/asn1_decoder.c | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) commit 4dca6ea1d9432052afb06baf2e3ae78188a4410b Author: Eric Biggers Date: Fri Dec 8 15:13:27 2017 +0000 KEYS: add missing permission check for request_key() destination When the request_key() syscall is not passed a destination keyring, it links the requested key (if constructed) into the "default" request-key keyring. This should require Write permission to the keyring. However, there is actually no permission check. This can be abused to add keys to any keyring to which only Search permission is granted. This is because Search permission allows joining the keyring. keyctl_set_reqkey_keyring(KEY_REQKEY_DEFL_SESSION_KEYRING) then will set the default request-key keyring to the session keyring. Then, request_key() can be used to add keys to the keyring. Both negatively and positively instantiated keys can be added using this method. Adding negative keys is trivial. Adding a positive key is a bit trickier. It requires that either /sbin/request-key positively instantiates the key, or that another thread adds the key to the process keyring at just the right time, such that request_key() misses it initially but then finds it in construct_alloc_key(). Fix this bug by checking for Write permission to the keyring in construct_get_dest_keyring() when the default keyring is being used. We don't do the permission check for non-default keyrings because that was already done by the earlier call to lookup_user_key(). Also, request_key_and_link() is currently passed a 'struct key *' rather than a key_ref_t, so the "possessed" bit is unavailable. We also don't do the permission check for the "requestor keyring", to continue to support the use case described by commit 8bbf4976b59f ("KEYS: Alter use of key instantiation link-to-keyring argument") where /sbin/request-key recursively calls request_key() to add keys to the original requestor's destination keyring. (I don't know of any users who actually do that, though...) Fixes: 3e30148c3d52 ("[PATCH] Keys: Make request-key create an authorisation key") Cc: # v2.6.13+ Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/request_key.c | 46 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) commit a2d8737d5c781d388b553dd085b56d7295fffc6c Author: Eric Biggers Date: Fri Dec 8 15:13:27 2017 +0000 KEYS: remove unnecessary get/put of explicit dest_keyring In request_key_and_link(), in the case where the dest_keyring was explicitly specified, there is no need to get another reference to dest_keyring before calling key_link(), then drop it afterwards. This is because by definition, we already have a reference to dest_keyring. This change is useful because we'll be making construct_get_dest_keyring() able to return an error code, and we don't want to have to handle that error here for no reason. Signed-off-by: Eric Biggers Signed-off-by: David Howells security/keys/request_key.c | 2 -- 1 file changed, 2 deletions(-) commit d4761754b4fb2ef8d9a1e9d121c4bec84e1fe292 Author: Yousuk Seung Date: Thu Dec 7 13:41:34 2017 -0800 tcp: invalidate rate samples during SACK reneging Mark tcp_sock during a SACK reneging event and invalidate rate samples while marked. Such rate samples may overestimate bw by including packets that were SACKed before reneging. < ack 6001 win 10000 sack 7001:38001 < ack 7001 win 0 sack 8001:38001 // Reneg detected > seq 7001:8001 // RTO, SACK cleared. < ack 38001 win 10000 In above example the rate sample taken after the last ack will count 7001-38001 as delivered while the actual delivery rate likely could be much lower i.e. 7001-8001. This patch adds a new field tcp_sock.sack_reneg and marks it when we declare SACK reneging and entering TCP_CA_Loss, and unmarks it after the last rate sample was taken before moving back to TCP_CA_Open. This patch also invalidates rate samples taken while tcp_sock.is_sack_reneg is set. Fixes: b9f64820fb22 ("tcp: track data delivery rate for a TCP connection") Signed-off-by: Yousuk Seung Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh Acked-by: Eric Dumazet Acked-by: Priyaranjan Jha Signed-off-by: David S. Miller include/linux/tcp.h | 3 ++- include/net/tcp.h | 2 +- net/ipv4/tcp.c | 1 + net/ipv4/tcp_input.c | 10 ++++++++-- net/ipv4/tcp_rate.c | 10 +++++++--- 5 files changed, 19 insertions(+), 7 deletions(-) commit de0ea9ad2f548dd9e555cac27cf7ade1db5b26ea Author: Russell King Date: Fri Dec 8 12:16:22 2017 +0000 drm/armada: fix YUV planar format framebuffer offsets We weren't correctly calculating the YUV planar offsets for subsampled chroma planes correctly - fix up the coordinates for planes 1 and 2. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_crtc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit d6a48965db3d5f9b524ebfdd8c1fe3a4175d8e35 Author: Russell King Date: Fri Dec 8 12:16:22 2017 +0000 drm/armada: improve efficiency of armada_drm_plane_calc_addrs() Lookup the drm_format_info structure once when computing all the framebuffer plane addresses by using drm_format_info(), rather than repetitive lookups via drm_format_plane_cpp(). Signed-off-by: Russell King drivers/gpu/drm/armada/armada_crtc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9c898c495490b129bd4445630e3c6641e8389fc8 Author: Russell King Date: Fri Dec 8 12:16:22 2017 +0000 drm/armada: fix UV swap code The UV swap code was not always programming things correctly when the source origin box has been offset. Fix this. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_crtc.h | 2 ++ drivers/gpu/drm/armada/armada_overlay.c | 38 ++++++++++++++++----------------- 2 files changed, 21 insertions(+), 19 deletions(-) commit 2bf57436d52b241044133fb0e2c7fd8320c6b02e Author: Russell King Date: Fri Dec 8 12:16:22 2017 +0000 drm/armada: fix SRAM powerdown Avoid powering down the overlay SRAM banks when disabling the primary plane, thereby masking any overlay video. This feature is supposed to allow us to cut the bandwidth required while displaying full-frame overlay video. Signed-off-by: Russell King drivers/gpu/drm/armada/armada_crtc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 33cd3c07a976e11c3c4cc6b0b3db6760ad1590c5 Author: Russell King Date: Fri Dec 8 12:16:22 2017 +0000 drm/armada: fix leak of crtc structure Fix the leak of the CRTC structure in the failure paths of armada_drm_crtc_create(). Signed-off-by: Russell King drivers/gpu/drm/armada/armada_crtc.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 451df7d110b82998c04a80d0de0f1e79aaa7792a Author: Alejandro Mery Date: Fri Dec 8 10:35:58 2017 +0000 ARM: davinci: fix mmc entries in dm365's dma_slave_map fix mmc entries in dm365's dma_slave_map to match the actual device names Fixes: 0c750e1fe481 ("ARM: davinci: dm365: Add dma_slave_map to edma") Signed-off-by: Alejandro Mery Signed-off-by: Sekhar Nori arch/arm/mach-davinci/dm365.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 040d786032bf59002d374b86d75b04d97624005c Author: Yan, Zheng Date: Thu Nov 30 11:59:22 2017 +0800 ceph: drop negative child dentries before try pruning inode's alias Negative child dentry holds reference on inode's alias, it makes d_prune_aliases() do nothing. Cc: stable@vger.kernel.org Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) commit 91785de6f94b58c3fb6664609e3682f011bd28d2 Author: Stephane Grosjean Date: Thu Dec 7 16:13:43 2017 +0100 can: peak/pcie_fd: fix potential bug in restarting tx queue Don't rely on can_get_echo_skb() return value to wake the network tx queue up: can_get_echo_skb() returns 0 if the echo array slot was not occupied, but also when the DLC of the released echo frame was 0. Signed-off-by: Stephane Grosjean Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/peak_canfd/peak_canfd.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 12147edc434c9e4c7c2f5fee2e5519b2e5ac34ce Author: Martin Kelly Date: Tue Dec 5 11:15:50 2017 -0800 can: usb_8dev: cancel urb on -EPIPE and -EPROTO In mcba_usb, we have observed that when you unplug the device, the driver will endlessly resubmit failing URBs, which can cause CPU stalls. This issue is fixed in mcba_usb by catching the codes seen on device disconnect (-EPIPE and -EPROTO). This driver also resubmits in the case of -EPIPE and -EPROTO, so fix it in the same way. Signed-off-by: Martin Kelly Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/usb_8dev.c | 2 ++ 1 file changed, 2 insertions(+) commit 6aa8d5945502baf4687d80de59b7ac865e9e666b Author: Martin Kelly Date: Tue Dec 5 11:15:49 2017 -0800 can: kvaser_usb: cancel urb on -EPIPE and -EPROTO In mcba_usb, we have observed that when you unplug the device, the driver will endlessly resubmit failing URBs, which can cause CPU stalls. This issue is fixed in mcba_usb by catching the codes seen on device disconnect (-EPIPE and -EPROTO). This driver also resubmits in the case of -EPIPE and -EPROTO, so fix it in the same way. Signed-off-by: Martin Kelly Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb.c | 2 ++ 1 file changed, 2 insertions(+) commit 7a31ced3de06e9878e4f9c3abe8f87d9344d8144 Author: Martin Kelly Date: Tue Dec 5 11:15:48 2017 -0800 can: esd_usb2: cancel urb on -EPIPE and -EPROTO In mcba_usb, we have observed that when you unplug the device, the driver will endlessly resubmit failing URBs, which can cause CPU stalls. This issue is fixed in mcba_usb by catching the codes seen on device disconnect (-EPIPE and -EPROTO). This driver also resubmits in the case of -EPIPE and -EPROTO, so fix it in the same way. Signed-off-by: Martin Kelly Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/esd_usb2.c | 2 ++ 1 file changed, 2 insertions(+) commit bd352e1adfe0d02d3ea7c8e3fb19183dc317e679 Author: Martin Kelly Date: Tue Dec 5 11:15:47 2017 -0800 can: ems_usb: cancel urb on -EPIPE and -EPROTO In mcba_usb, we have observed that when you unplug the device, the driver will endlessly resubmit failing URBs, which can cause CPU stalls. This issue is fixed in mcba_usb by catching the codes seen on device disconnect (-EPIPE and -EPROTO). This driver also resubmits in the case of -EPIPE and -EPROTO, so fix it in the same way. Signed-off-by: Martin Kelly Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/ems_usb.c | 2 ++ 1 file changed, 2 insertions(+) commit c7f33023308f3142433b7379718af5f0c2c322a6 Author: Martin Kelly Date: Tue Dec 5 10:34:03 2017 -0800 can: mcba_usb: cancel urb on -EPROTO When we unplug the device, we can see both -EPIPE and -EPROTO depending on exact timing and what system we run on. If we continue to resubmit URBs, they will immediately fail, and they can cause stalls, especially on slower CPUs. Fix this by not resubmitting on -EPROTO, as we already do on -EPIPE. Signed-off-by: Martin Kelly Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/mcba_usb.c | 1 + 1 file changed, 1 insertion(+) commit 732706afe1cc46ef48493b3d2b69c98f36314ae4 Author: Steffen Klassert Date: Fri Dec 8 08:07:25 2017 +0100 xfrm: Fix stack-out-of-bounds with misconfigured transport mode policies. On policies with a transport mode template, we pass the addresses from the flowi to xfrm_state_find(), assuming that the IP addresses (and address family) don't change during transformation. Unfortunately our policy template validation is not strict enough. It is possible to configure policies with transport mode template where the address family of the template does not match the selectors address family. This lead to stack-out-of-bound reads because we compare arddesses of the wrong family. Fix this by refusing such a configuration, address family can not change on transport mode. We use the assumption that, on transport mode, the first templates address family must match the address family of the policy selector. Subsequent transport mode templates must mach the address family of the previous template. Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 75bf50f4aaa1c78d769d854ab3d975884909e4fb Author: Antony Antony Date: Thu Dec 7 21:54:27 2017 +0100 xfrm: fix xfrm_do_migrate() with AEAD e.g(AES-GCM) copy geniv when cloning the xfrm state. x->geniv was not copied to the new state and migration would fail. xfrm_do_migrate .. xfrm_state_clone() .. .. esp_init_aead() crypto_alloc_aead() crypto_alloc_tfm() crypto_find_alg() return EAGAIN and failed Signed-off-by: Antony Antony Signed-off-by: Steffen Klassert net/xfrm/xfrm_state.c | 1 + 1 file changed, 1 insertion(+) commit 48d83282db077f93b2cf40de120f4d6f29eb293b Author: Arnd Bergmann Date: Wed Dec 6 15:14:18 2017 +0100 scsi: bfa: fix type conversion warning A regression fix introduced a harmless type mismatch warning: drivers/scsi/bfa/bfad_bsg.c: In function 'bfad_im_bsg_vendor_request': drivers/scsi/bfa/bfad_bsg.c:3137:35: error: initialization of 'struct bfad_im_port_s *' from 'long unsigned int' makes pointer from integer without a cast [-Werror=int-conversion] struct bfad_im_port_s *im_port = shost->hostdata[0]; ^~~~~ drivers/scsi/bfa/bfad_bsg.c: In function 'bfad_im_bsg_els_ct_request': drivers/scsi/bfa/bfad_bsg.c:3353:35: error: initialization of 'struct bfad_im_port_s *' from 'long unsigned int' makes pointer from integer without a cast [-Werror=int-conversion] struct bfad_im_port_s *im_port = shost->hostdata[0]; This changes the code back to shost_priv() once more, but encapsulates it in an inline function to document the rather unusual way of using the private data only as a pointer to the previously allocated structure. I did not try to get rid of the extra indirection level entirely, which would have been rather invasive and required reworking the entire initialization sequence. Fixes: 45349821ab3a ("scsi: bfa: fix access to bfad_im_port_s") Signed-off-by: Arnd Bergmann Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/bfa/bfad_bsg.c | 4 ++-- drivers/scsi/bfa/bfad_im.c | 6 ++++-- drivers/scsi/bfa/bfad_im.h | 10 ++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) commit 7e70aa789d4a0c89dbfbd2c8a974a4df717475ec Author: Ming Lei Date: Tue Dec 5 15:52:56 2017 +0800 scsi: core: run queue if SCSI device queue isn't ready and queue is idle Before commit 0df21c86bdbf ("scsi: implement .get_budget and .put_budget for blk-mq"), we run queue after 3ms if queue is idle and SCSI device queue isn't ready, which is done in handling BLK_STS_RESOURCE. After commit 0df21c86bdbf is introduced, queue won't be run any more under this situation. IO hang is observed when timeout happened, and this patch fixes the IO hang issue by running queue after delay in scsi_dev_queue_ready, just like non-mq. This issue can be triggered by the following script[1]. There is another issue which can be covered by running idle queue: when .get_budget() is called on request coming from hctx->dispatch_list, if one request just completes during .get_budget(), we can't depend on SCSI's restart to make progress any more. This patch fixes the race too. With this patch, we basically recover to previous behaviour (before commit 0df21c86bdbf) of handling idle queue when running out of resource. [1] script for test/verify SCSI timeout rmmod scsi_debug modprobe scsi_debug max_queue=1 DEVICE=`ls -d /sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/*/block/* | head -1 | xargs basename` DISK_DIR=`ls -d /sys/block/$DEVICE/device/scsi_disk/*` echo "using scsi device $DEVICE" echo "-1" >/sys/bus/pseudo/drivers/scsi_debug/every_nth echo "temporary write through" >$DISK_DIR/cache_type echo "128" >/sys/bus/pseudo/drivers/scsi_debug/opts echo none > /sys/block/$DEVICE/queue/scheduler dd if=/dev/$DEVICE of=/dev/null bs=1M iflag=direct count=1 & sleep 5 echo "0" >/sys/bus/pseudo/drivers/scsi_debug/opts wait echo "SUCCESS" Fixes: 0df21c86bdbf ("scsi: implement .get_budget and .put_budget for blk-mq") Signed-off-by: Ming Lei Tested-by: Holger Hoffstätte Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 2 ++ 1 file changed, 2 insertions(+) commit 96307a0a75d8f1847debefd6a402339aac43e224 Author: Arnd Bergmann Date: Thu Dec 7 14:26:09 2017 +0100 netfilter: ipt_CLUSTERIP: fix clusterip_net_exit build regression The added check produces a build error when CONFIG_PROC_FS is disabled: net/ipv4/netfilter/ipt_CLUSTERIP.c: In function 'clusterip_net_exit': net/ipv4/netfilter/ipt_CLUSTERIP.c:822:28: error: 'cn' undeclared (first use in this function) This moves the variable declaration out of the #ifdef to make it available to the WARN_ON_ONCE(). Fixes: 613d0776d3fe ("netfilter: exit_net cleanup check added") Signed-off-by: Arnd Bergmann Reviewed-by: Vasily Averin Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90eeb3aa34831ff3d031589c0c24892eb8a07e51 Merge: 9698084 510353a Author: Dave Airlie Date: Fri Dec 8 08:17:53 2017 +1000 Merge tag 'drm-misc-fixes-2017-12-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes regression fix for vc4 + rpm stable fix for analogix bridge * tag 'drm-misc-fixes-2017-12-07' of git://anongit.freedesktop.org/drm/drm-misc: drm/bridge: analogix dp: Fix runtime PM state in get_modes() callback drm/vc4: Fix false positive WARN() backtrace on refcount_inc() usage commit 96980844bb4b74d2e7ce93d907670658e39a3992 Merge: c2ef3a6 d85936a Author: Dave Airlie Date: Fri Dec 8 08:17:09 2017 +1000 Merge tag 'drm-intel-fixes-2017-12-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fix for fd.o bug #103997 CNL eDP + HDMI causing a machine hard hang (James) - Fix to allow suspending with a wedged GPU to hopefully unwedge it (Chris) - Fix for Gen2 vblank timestap/frame counter jumps (Ville) - Revert of a W/A for enabling FBC on CNL/GLK for certain images and sizes (Rodrigo) - Lockdep fix for i915 userptr code (Chris) gvt-fixes-2017-12-06 - Fix invalid hw reg read value for vGPU (Xiong) - Fix qemu warning on PCI ROM bar missing (Changbin) - Workaround preemption regression (Zhenyu) * tag 'drm-intel-fixes-2017-12-07' of git://anongit.freedesktop.org/drm/drm-intel: Revert "drm/i915: Display WA #1133 WaFbcSkipSegments:cnl, glk" drm/i915: Call i915_gem_init_userptr() before taking struct_mutex drm/i915/gvt: set max priority for gvt context drm/i915/gvt: Don't mark vgpu context as inactive when preempted drm/i915/gvt: Limit read hw reg to active vgpu drm/i915/gvt: Export intel_gvt_render_mmio_to_ring_id() drm/i915/gvt: Emulate PCI expansion ROM base address register drm/i915/cnl: Mask previous DDI - PLL mapping drm/i915: Fix vblank timestamp/frame counter jumps on gen2 drm/i915: Skip switch-to-kernel-context on suspend when wedged commit c2ef3a67c3b98f18fcd09d1ce032bb5e11a634a5 Merge: bd3a3a2 1cd6ae3 Author: Dave Airlie Date: Fri Dec 8 08:15:09 2017 +1000 Merge tag 'exynos-drm-fixes-for-v4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes - fix page fault issue due to using wrong device object in prime import. - drop NONCONTIG flag without IOMMU support. - remove unnecessary members and declaration. * tag 'exynos-drm-fixes-for-v4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: remove unnecessary function declaration drm/exynos: remove unnecessary descrptions drm/exynos: gem: Drop NONCONTIG flag for buffers allocated without IOMMU drm/exynos: Fix dma-buf import commit 195bd525d5f6e338b948d9a6b25bfaae86291353 Merge: a4abd7a 037776e Author: David S. Miller Date: Thu Dec 7 16:22:51 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2017-12-06 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fixing broken uapi for BPF tracing programs for s390 and arm64 architectures due to pt_regs being in-kernel only, and not part of uapi right now. A wrapper is added that exports pt_regs in an asm-generic way. For arm64 this maps to existing user_pt_regs structure and for s390 a user_pt_regs structure exporting the beginning of pt_regs is added and uapi-exported, thus fixing the BPF issues seen in perf (and BPF selftests), all from Hendrik. ==================== Signed-off-by: David S. Miller commit 335ebf6fa35ca1c59b73f76fad19b249d3550e86 Author: Steve Wise Date: Thu Nov 30 09:41:56 2017 -0800 iw_cxgb4: only clear the ARMED bit if a notification is needed In __flush_qp(), the CQ ARMED bit was being cleared regardless of whether any notification is actually needed. This resulted in the iser termination logic getting stuck in ib_drain_sq() because the CQ was not marked ARMED and thus the drain CQE notification wasn't triggered. This new bug was exposed when this commit was merged: commit cbb40fadd31c ("iw_cxgb4: only call the cq comp_handler when the cq is armed") Signed-off-by: Steve Wise Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/cxgb4/qp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d0e312fe3d34c1bc014a7f8ec6540d05e8077483 Author: Leon Romanovsky Date: Tue Dec 5 22:30:04 2017 +0200 RDMA/netlink: Fix general protection fault The RDMA netlink core code checks validity of messages by ensuring that type and operand are in range. It works well for almost all clients except NLDEV, which has cb_table less than number of operands. Request to access such operand will trigger the following kernel panic. This patch updates all places where cb_table is declared for the consistency, but only NLDEV is actually need it. general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN Modules linked in: CPU: 0 PID: 522 Comm: syz-executor6 Not tainted 4.13.0+ #4 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-0-ge51488c-20140602_164612-nilsson.home.kraxel.org 04/01/2014 task: ffff8800657799c0 task.stack: ffff8800695d000 RIP: 0010:rdma_nl_rcv_msg+0x13a/0x4c0 RSP: 0018:ffff8800695d7838 EFLAGS: 00010207 RAX: dffffc0000000000 RBX: 1ffff1000d2baf0b RCX: 00000000704ff4d7 RDX: 0000000000000000 RSI: ffffffff81ddb03c RDI: 00000003827fa6bc RBP: ffff8800695d7900 R08: ffffffff82ec0578 R09: 0000000000000000 R10: ffff8800695d7900 R11: 0000000000000001 R12: 000000000000001c R13: ffff880069d31e00 R14: 00000000ffffffff R15: ffff880069d357c0 FS: 00007fee6acb8700(0000) GS:ffff88006ca00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000201a9000 CR3: 0000000059766000 CR4: 00000000000006b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? rdma_nl_multicast+0x80/0x80 rdma_nl_rcv+0x36b/0x4d0 ? ibnl_put_attr+0xc0/0xc0 netlink_unicast+0x4bd/0x6d0 ? netlink_sendskb+0x50/0x50 ? drop_futex_key_refs.isra.4+0x68/0xb0 netlink_sendmsg+0x9ab/0xbd0 ? nlmsg_notify+0x140/0x140 ? wake_up_q+0xa1/0xf0 ? drop_futex_key_refs.isra.4+0x68/0xb0 sock_sendmsg+0x88/0xd0 sock_write_iter+0x228/0x3c0 ? sock_sendmsg+0xd0/0xd0 ? do_futex+0x3e5/0xb20 ? iov_iter_init+0xaf/0x1d0 __vfs_write+0x46e/0x640 ? sched_clock_cpu+0x1b/0x190 ? __vfs_read+0x620/0x620 ? __fget+0x23a/0x390 ? rw_verify_area+0xca/0x290 vfs_write+0x192/0x490 SyS_write+0xde/0x1c0 ? SyS_read+0x1c0/0x1c0 ? trace_hardirqs_on_thunk+0x1a/0x1c entry_SYSCALL_64_fastpath+0x18/0xad RIP: 0033:0x7fee6a74a219 RSP: 002b:00007fee6acb7d58 EFLAGS: 00000212 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000638000 RCX: 00007fee6a74a219 RDX: 0000000000000078 RSI: 0000000020141000 RDI: 0000000000000006 RBP: 0000000000000046 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: ffff8800695d7f98 R13: 0000000020141000 R14: 0000000000000006 R15: 00000000ffffffff Code: d6 48 b8 00 00 00 00 00 fc ff df 66 41 81 e4 ff 03 44 8d 72 ff 4a 8d 3c b5 c0 a6 7f 82 44 89 b5 4c ff ff ff 48 89 f9 48 c1 e9 03 <0f> b6 0c 01 48 89 f8 83 e0 07 83 c0 03 38 c8 7c 08 84 c9 0f 85 RIP: rdma_nl_rcv_msg+0x13a/0x4c0 RSP: ffff8800695d7838 ---[ end trace ba085d123959c8ec ]--- Kernel panic - not syncing: Fatal exception Cc: syzkaller Fixes: b4c598a67ea1 ("RDMA/netlink: Implement nldev device dumpit calback") Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 2 +- drivers/infiniband/core/device.c | 2 +- drivers/infiniband/core/iwcm.c | 2 +- drivers/infiniband/core/nldev.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 4d02ebd9bbbdde1d524e62b540b0402cee7bbcdf Author: Guy Levi Date: Tue Dec 5 22:30:03 2017 +0200 IB/mlx4: Fix RSS hash fields restrictions Mistakenly the driver didn't allow RSS hash fields combinations which involve both IPv4 and IPv6 protocols. This bug caused to failures for user's use cases for RSS. Consequently, this patch fixes this bug and allows any combination that the HW can support. Additionally, the patch fixes the driver to return an error in case the user provides an unsupported mask for RSS hash fields. Fixes: 3078f5f1bd8b ("IB/mlx4: Add support for RSS QP") Signed-off-by: Guy Levi Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/qp.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) commit 0fbe8f575b15585eec3326e43708fbbc024e8486 Author: Daniel Jurgens Date: Tue Dec 5 22:30:02 2017 +0200 IB/core: Don't enforce PKey security on SMI MADs Per the infiniband spec an SMI MAD can have any PKey. Checking the pkey on SMI MADs is not necessary, and it seems that some older adapters using the mthca driver don't follow the convention of using the default PKey, resulting in false denials, or errors querying the PKey cache. SMI MAD security is still enforced, only agents allowed to manage the subnet are able to receive or send SMI MADs. Reported-by: Chris Blake Cc: # v4.12 Fixes: 47a2b338fe63 ("IB/core: Enforce security on management datagrams") Signed-off-by: Daniel Jurgens Reviewed-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/security.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 4cae8ff136782d77b108cb3a5ba53e60597ba3a6 Author: Daniel Jurgens Date: Tue Dec 5 22:30:01 2017 +0200 IB/core: Bound check alternate path port number The alternate port number is used as an array index in the IB security implementation, invalid values can result in a kernel panic. Cc: # v4.12 Fixes: d291f1a65232 ("IB/core: Enforce PKey security on QPs") Signed-off-by: Daniel Jurgens Reviewed-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a4abd7a80addb4a9547f7dfc7812566b60ec505c Author: Bjørn Mork Date: Wed Dec 6 20:21:24 2017 +0100 usbnet: fix alignment for frames with no ethernet header The qmi_wwan minidriver support a 'raw-ip' mode where frames are received without any ethernet header. This causes alignment issues because the skbs allocated by usbnet are "IP aligned". Fix by allowing minidrivers to disable the additional alignment offset. This is implemented using a per-device flag, since the same minidriver also supports 'ethernet' mode. Fixes: 32f7adf633b9 ("net: qmi_wwan: support "raw IP" mode") Reported-and-tested-by: Jay Foster Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 2 ++ drivers/net/usb/usbnet.c | 5 ++++- include/linux/usb/usbnet.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) commit 8632385022f2b05a6ca0b9e0f95575865de0e2ce Author: Eric Dumazet Date: Wed Dec 6 11:08:19 2017 -0800 tcp: use current time in tcp_rcv_space_adjust() When I switched rcv_rtt_est to high resolution timestamps, I forgot that tp->tcp_mstamp needed to be refreshed in tcp_rcv_space_adjust() Using an old timestamp leads to autotuning lags. Fixes: 645f4c6f2ebd ("tcp: switch rcv_rtt_est and rcvq_space to high resolution timestamps") Signed-off-by: Eric Dumazet Cc: Wei Wang Cc: Neal Cardwell Cc: Yuchung Cheng Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 1 + 1 file changed, 1 insertion(+) commit 6e237d099fac1f73a7b6d7287bb9191f29585a4e Author: David Ahern Date: Wed Dec 6 20:09:12 2017 -0800 netlink: Relax attr validation for fixed length types Commit 28033ae4e0f5 ("net: netlink: Update attr validation to require exact length for some types") requires attributes using types NLA_U* and NLA_S* to have an exact length. This change is exposing bugs in various userspace commands that are sending attributes with an invalid length (e.g., attribute has type NLA_U8 and userspace sends NLA_U32). While the commands are clearly broken and need to be fixed, users are arguing that the sudden change in enforcement is breaking older commands on newer kernels for use cases that otherwise "worked". Relax the validation to print a warning mesage similar to what is done for messages containing extra bytes after parsing. Fixes: 28033ae4e0f5 ("net: netlink: Update attr validation to require exact length for some types") Signed-off-by: David Ahern Reviewed-by: Johannes Berg Signed-off-by: David S. Miller lib/nlattr.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 74c4b656c3d92ec4c824ea1a4afd726b7b6568c8 Author: Nikita V. Shirokov Date: Wed Dec 6 17:15:43 2017 -0800 adding missing rcu_read_unlock in ipxip6_rcv commit 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels") introduced new exit point in ipxip6_rcv. however rcu_read_unlock is missing there. this diff is fixing this v1->v2: instead of doing rcu_read_unlock in place, we are going to "drop" section (to prevent skb leakage) Fixes: 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels") Signed-off-by: Nikita V. Shirokov Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c880949f006f6095295eb596635b599513970ad4 Merge: e46772a 3126aee Author: David S. Miller Date: Thu Dec 7 13:53:05 2017 -0500 Merge branch 'mv88e6xxx-error-patch-fixes' Andrew Lunn says: ==================== mv88e6xxx error patch fixes While trying to bring up a new PHY on a board, i exercised the error paths a bit, and discovered some bugs. The unwind for interrupt handling deadlocks, and the MDIO code hits a BUG() when a registered MDIO device is freed without first being unregistered. ==================== Signed-off-by: David S. Miller commit 3126aeec5313565bfa19e2dd8fd7e3c3390514cb Author: Andrew Lunn Date: Thu Dec 7 01:05:57 2017 +0100 net: dsa: mv88e6xxx: Unregister MDIO bus on error path The MDIO busses need to be unregistered before they are freed, otherwise BUG() is called. Add a call to the unregister code if the registration fails, since we can have multiple busses, of which some may correctly register before one fails. This requires moving the code around a little. Fixes: a3c53be55c95 ("net: dsa: mv88e6xxx: Support multiple MDIO busses") Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 3d5fdba1842bdd2eef29364c660558cb4cbb3fe0 Author: Andrew Lunn Date: Thu Dec 7 01:05:56 2017 +0100 net: dsa: mv88e6xxx: Fix interrupt masking on removal When removing the interrupt handling code, we should mask the generation of interrupts. The code however unmasked all interrupts. This can then cause a new interrupt. We then get into a deadlock where the interrupt thread is waiting to run, and the code continues, trying to remove the interrupt handler, which means waiting for the thread to complete. On a UP machine this deadlocks. Fix so we really mask interrupts in the hardware. The same error is made in the error path when install the interrupt handling code. Fixes: 3460a5770ce9 ("net: dsa: mv88e6xxx: Mask g1 interrupts and free interrupt") 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 e46772a6946a7d1f3fbbc1415871851d6651f1d4 Author: Branislav Radocaj Date: Thu Dec 7 00:07:38 2017 +0100 net: ethernet: arc: fix error handling in emac_rockchip_probe If clk_set_rate() fails, we should disable clk before return. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Branislav Radocaj Signed-off-by: David S. Miller drivers/net/ethernet/arc/emac_rockchip.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 589bf32f09852041fbd3b7ce1a9e703f95c230ba Author: Tobias Jordan Date: Wed Dec 6 15:23:23 2017 +0100 net: mvmdio: disable/unprepare clocks in EPROBE_DEFER case add appropriate calls to clk_disable_unprepare() by jumping to out_mdio in case orion_mdio_probe() returns -EPROBE_DEFER. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 3d604da1e954 ("net: mvmdio: get and enable optional clock") Signed-off-by: Tobias Jordan Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvmdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 03e9f8a05bce7330bcd9c5cc54c8e42d0fcbf993 Author: Yunjian Wang Date: Mon Dec 4 14:02:19 2017 +0800 virtio_net: fix return value check in receive_mergeable() The function virtqueue_get_buf_ctx() could return NULL, the return value 'buf' need to be checked with NULL, not value 'ctx'. Signed-off-by: Yunjian Wang Signed-off-by: Michael S. Tsirkin drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25f32223bce5c580e0392a176319a587d7a17e95 Author: weiping zhang Date: Wed Dec 6 21:59:32 2017 +0800 virtio_mmio: add cleanup for virtio_mmio_remove cleanup all resource allocated by virtio_mmio_probe. Signed-off-by: weiping zhang Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck drivers/virtio/virtio_mmio.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7eb781b1bbb7136fe78fb8c28c1c223c61fa32b5 Author: weiping zhang Date: Wed Dec 6 21:59:16 2017 +0800 virtio_mmio: add cleanup for virtio_mmio_probe As mentioned at drivers/base/core.c: /* * NOTE: _Never_ directly free @dev after calling this function, even * if it returned an error! Always use put_device() to give up the * reference initialized in this function instead. */ so we don't free vm_dev until vm_dev.dev.release be called. Signed-off-by: weiping zhang Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck drivers/virtio/virtio_mmio.c | 51 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 10 deletions(-) commit 8b6eac70ae3e8bb46e02a04e421e9db7a9b24d6f Merge: ee4c54d 863204c Author: Arnd Bergmann Date: Thu Dec 7 15:55:08 2017 +0100 Merge branch 'fixes' into for-next * fixes: ARM: omap2: hide omap3_save_secure_ram on non-OMAP3 builds arm: dts: nspire: Add missing #phy-cells to usb-nop-xceiv commit 863204cfdae98626a92535ac928ad79f4d6b74ff Author: Arnd Bergmann Date: Wed Dec 6 14:17:17 2017 +0100 ARM: omap2: hide omap3_save_secure_ram on non-OMAP3 builds In configurations without CONFIG_OMAP3 but with secure RAM support, we now run into a link failure: arch/arm/mach-omap2/omap-secure.o: In function `omap3_save_secure_ram': omap-secure.c:(.text+0x130): undefined reference to `save_secure_ram_context' The omap3_save_secure_ram() function is only called from the OMAP34xx power management code, so we can simply hide that function in the appropriate #ifdef. Fixes: d09220a887f7 ("ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context") Acked-by: Tony Lindgren Tested-by: Dan Murphy Signed-off-by: Arnd Bergmann arch/arm/mach-omap2/omap-secure.c | 2 ++ 1 file changed, 2 insertions(+) commit c5bbf358b790c8a7850188dea34601db703a97fa Author: Rob Herring Date: Thu Nov 9 16:26:12 2017 -0600 arm: dts: nspire: Add missing #phy-cells to usb-nop-xceiv "usb-nop-xceiv" is using the phy binding, but is missing #phy-cells property. This is probably because the binding was the precursor to the phy binding. Fixes the following warning in nspire dts files: Warning (phys_property): Missing property '#phy-cells' in node ... Signed-off-by: Rob Herring Signed-off-by: Arnd Bergmann arch/arm/boot/dts/nspire.dtsi | 1 + 1 file changed, 1 insertion(+) commit 510353a63796d467b41237ab4f136136f68c297d Author: Marek Szyprowski Date: Tue Nov 21 08:49:36 2017 +0100 drm/bridge: analogix dp: Fix runtime PM state in get_modes() callback get_modes() callback might be called asynchronously from the DRM core and it is not synchronized with bridge_enable(), which sets proper runtime PM state of the main DP device. Fix this by calling pm_runtime_get_sync() before calling drm_get_edid(), which in turn calls drm_dp_i2c_xfer() and analogix_dp_transfer() to ensure that main DP device is runtime active when doing any access to its registers. This fixes the following kernel issue on Samsung Exynos5250 Snow board: Unhandled fault: imprecise external abort (0x406) at 0x00000000 pgd = c0004000 [00000000] *pgd=00000000 Internal error: : 406 [#1] PREEMPT SMP ARM Modules linked in: CPU: 0 PID: 62 Comm: kworker/0:2 Not tainted 4.13.0-rc2-00364-g4a97a3da420b #3357 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) Workqueue: events output_poll_execute task: edc14800 task.stack: edcb2000 PC is at analogix_dp_transfer+0x15c/0x2fc LR is at analogix_dp_transfer+0x134/0x2fc pc : [] lr : [] psr: 60000013 sp : edcb3be8 ip : 0000002a fp : 00000001 r10: 00000000 r9 : edcb3cd8 r8 : edcb3c40 r7 : 00000000 r6 : edd3b380 r5 : edd3b010 r4 : 00000064 r3 : 00000000 r2 : f0ad3000 r1 : edcb3c40 r0 : edd3b010 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 4000406a DAC: 00000051 Process kworker/0:2 (pid: 62, stack limit = 0xedcb2210) Stack: (0xedcb3be8 to 0xedcb4000) [] (analogix_dp_transfer) from [] (drm_dp_i2c_do_msg+0x8c/0x2b4) [] (drm_dp_i2c_do_msg) from [] (drm_dp_i2c_xfer+0x98/0x214) [] (drm_dp_i2c_xfer) from [] (__i2c_transfer+0x140/0x29c) [] (__i2c_transfer) from [] (i2c_transfer+0x70/0xe4) [] (i2c_transfer) from [] (drm_do_probe_ddc_edid+0xb4/0x114) [] (drm_do_probe_ddc_edid) from [] (drm_probe_ddc+0x18/0x28) [] (drm_probe_ddc) from [] (drm_get_edid+0x124/0x2d4) [] (drm_get_edid) from [] (analogix_dp_get_modes+0x90/0x114) [] (analogix_dp_get_modes) from [] (drm_helper_probe_single_connector_modes+0x198/0x68c) [] (drm_helper_probe_single_connector_modes) from [] (drm_setup_crtcs+0x1b4/0xd18) [] (drm_setup_crtcs) from [] (drm_fb_helper_hotplug_event+0x94/0xd0) [] (drm_fb_helper_hotplug_event) from [] (drm_kms_helper_hotplug_event+0x24/0x28) [] (drm_kms_helper_hotplug_event) from [] (output_poll_execute+0x6c/0x174) [] (output_poll_execute) from [] (process_one_work+0x188/0x3fc) [] (process_one_work) from [] (worker_thread+0x30/0x4b8) [] (worker_thread) from [] (kthread+0x128/0x164) [] (kthread) from [] (ret_from_fork+0x14/0x24) Code: 0a000002 ea000009 e2544001 0a00004a (e59537c8) ---[ end trace cddc7919c79f7878 ]--- Reported-by: Misha Komarovskiy CC: stable@vger.kernel.org # v4.10+ Signed-off-by: Marek Szyprowski Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20171121074936.22520-1-m.szyprowski@samsung.com drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 ++ 1 file changed, 2 insertions(+) commit a41886f56b7bbb88e6a23b5d738a94f2632142a4 Merge: 51ef792 bf19037 Author: Kalle Valo Date: Thu Dec 7 15:50:34 2017 +0200 Merge tag 'iwlwifi-for-kalle-2017-12-05' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes Third batch of iwlwifi patches intended for 4.15. * Tell mac80211 when the MAC has been stripped (9000 series); * Tell mac80211 when the IVC has been stripped (9000 series); * Add 2 new PCI IDs, one for 9000 and one for 22000; * Fix a queue hang due during ROC. commit 51ef7925e10688c57186d438e784532e063492e4 Author: Andy Shevchenko Date: Thu Nov 23 17:57:04 2017 +0200 brcmfmac: Avoid build error with make W=1 When I run make W=1 on gcc (Debian 7.2.0-16) 7.2.0 I got an error for the first run, all next ones are okay. CC [M] drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.o drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:2078: error: Cannot parse struct or union! scripts/Makefile.build:310: recipe for target 'drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.o' failed Seems like something happened with W=1 and wrong kernel doc format. As a quick fix remove dubious /** in the code. Signed-off-by: Andy Shevchenko Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b4584d00a6bc02b63ab3c7213060d41a74bdff1 Author: Guneshwor Singh Date: Thu Dec 7 18:06:20 2017 +0530 ALSA: hda - Add vendor id for Cannonlake HDMI codec Cannonlake HDMI codec has the same nid as Geminilake. This adds the codec entry for it. Signed-off-by: Guneshwor Singh Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_hdmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 866f7ed7d67936dcdbcddc111c8af878c918fe7c Author: Jussi Laako Date: Thu Dec 7 12:58:33 2017 +0200 ALSA: usb-audio: Add native DSD support for Esoteric D-05X Adds VID:PID of Esoteric D-05X to the TEAC device id's. Renames the is_teac_50X_dac() function to is_teac_dsd_dac() to cover broader device family from the same corporation sharing the same USB audio implementation. Signed-off-by: Jussi Laako Cc: Signed-off-by: Takashi Iwai sound/usb/quirks.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c810daba0ab5226084a56893a789af427a801146 Author: Takuo Koguchi Date: Thu Dec 7 16:20:14 2017 +0900 spi: sun4i: disable clocks in the remove function mclk and hclk need to be disabled. Since pm_runtime_disable does not disable the clocks, use pm_runtime_force_suspend instead. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Takuo Koguchi Acked-by: Maxime Ripard Signed-off-by: Mark Brown drivers/spi/spi-sun4i.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b458a3490e46dddd5b63f59b458c9b6d2284a63f Author: Geert Uytterhoeven Date: Thu Dec 7 11:09:21 2017 +0100 spi: rspi: Do not set SPCR_SPE in qspi_set_config_register() The R-Car Gen2 Hardware User Manual Rev. 2.00 states: If the master/slave mode select bit (MSTR) is modified while the SPI function enable bit (SPE) is set to 1 (that is, this module is enabled), the subsequent operation cannot be guaranteed. Hence do not set SPCR_SPE when setting SPCR_MSTR, just like the .set_config_register() implementations for other RSPI variants do. Note that when booted from QSPI, the boot loader will have set SPCR_MSTR already, hence usually the bit is never modified by the Linux driver. Reported-by: Yoshihiro Shimoda Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/spi-rspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d85936ab62f902ab84be7a021aa013d4b5dfe292 Merge: 7a8b705 11474e9 Author: Joonas Lahtinen Date: Thu Dec 7 13:35:32 2017 +0200 Merge tag 'gvt-fixes-2017-12-06' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2017-12-06 - Fix invalid hw reg read value for vGPU (Xiong) - Fix qemu warning on PCI ROM bar missing (Changbin) - Workaround preemption regression (Zhenyu) Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171206075105.wlh2ojubjczlstox@zhen-hp.sh.intel.com commit 04271ce9601f1686db480ea11ea1848394d9e6a2 Author: Arvind Yadav Date: Tue Nov 28 15:55:07 2017 +0530 i2c-cht-wc: constify platform_device_id platform_device_id are not supposed to change at runtime. All functions working with platform_device_id provided by work with const platform_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Reviewed-by: Hans de Goede Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-cht-wc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b860b419d970f286294fbfb2b21a4028fd8ee442 Author: Hans de Goede Date: Wed Dec 6 12:21:35 2017 +0100 mfd: Fix RTS5227 (and others) powermanagement Commit 8275b77a1513 ("mfd: rts5249: Add support for RTS5250S power saving") adds powersaving support for device-ids 5249 524a and 525a. But as a side effect it breaks ASPM support for all the other device-ids, causing e.g. the Haswell CPU on a Lenovo T440s to not go into a higher c-state then PC3, while previously it would go to PC7, causing the machine to idle at 7.4W instead of 6.6W! The problem here is the new option.dev_aspm_mode field, which only gets explicitly initialized in the new code for the device-ids 5249 524a and 525a. Leaving the dev_aspm_mode 0 for the other device-ids. The default dev_aspm_mode 0 is mapped to DEV_ASPM_DISABLE, but the old behavior of calling rtsx_pci_enable_aspm() when idle and rtsx_pci_disable_aspm() when busy happens when dev_aspm_mode == DEV_ASPM_DYNAMIC. This commit changes the enum so that 0 = DEV_ASPM_DYNAMIC matching the old default behavior, fixing the pm regression with the other device-ids. Fixes: 8275b77a1513 ("mfd: rts5249: Add support for RTS5250S power saving") Signed-off-by: Hans de Goede Acked-by: Rui Feng Signed-off-by: Lee Jones include/linux/mfd/rtsx_pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cb4774e2d3282d29edd00762167876a27cc7d2a Author: Hans de Goede Date: Wed Dec 6 17:54:38 2017 +0100 HID: core: lower log level for unknown main item tags to warnings Given all the effort distros have done with splash-screens to give users a nice clean boot experience, we really want dmesg --level=err to not print anything unless there is a real problem with either the hardware or the kernel. Buggy HID descriptors unfortunately happen all too often, so lower the log level to warning keep the console clear of error messages such as: [ 441.079664] apple 0005:05AC:0239.0003: unknown main item tag 0x0 Signed-off-by: Hans de Goede Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d7e0ba2d2be9e50cccba213baf07e0e183c1b24 Author: Kirill A. Shutemov Date: Mon Dec 4 15:40:56 2017 +0300 x86/boot/compressed/64: Print error if 5-level paging is not supported If the machine does not support the paging mode for which the kernel was compiled, the boot process cannot continue. It's not possible to let the kernel detect the mismatch as it does not even reach the point where cpu features can be evaluted due to a triple fault in the KASLR setup. Instead of instantaneous silent reboot, emit an error message which gives the user the information why the boot fails. Fixes: 77ef56e4f0fb ("x86: Enable 5-level paging support via CONFIG_X86_5LEVEL=y") Reported-by: Borislav Petkov Signed-off-by: Kirill A. Shutemov Signed-off-by: Thomas Gleixner Tested-by: Borislav Petkov Cc: Andi Kleen Cc: stable@vger.kernel.org Cc: Andy Lutomirski Cc: linux-mm@kvack.org Cc: Cyrill Gorcunov Cc: Linus Torvalds Link: https://lkml.kernel.org/r/20171204124059.63515-3-kirill.shutemov@linux.intel.com arch/x86/boot/compressed/misc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 08529078d8d9adf689bf39cc38d53979a0869970 Author: Kirill A. Shutemov Date: Mon Dec 4 15:40:55 2017 +0300 x86/boot/compressed/64: Detect and handle 5-level paging at boot-time Prerequisite for fixing the current problem of instantaneous reboots when a 5-level paging kernel is booted on 4-level paging hardware. At the same time this change prepares the decompression code to boot-time switching between 4- and 5-level paging. [ tglx: Folded the GCC < 5 fix. ] Fixes: 77ef56e4f0fb ("x86: Enable 5-level paging support via CONFIG_X86_5LEVEL=y") Signed-off-by: Kirill A. Shutemov Signed-off-by: Thomas Gleixner Cc: Andi Kleen Cc: stable@vger.kernel.org Cc: Andy Lutomirski Cc: linux-mm@kvack.org Cc: Cyrill Gorcunov Cc: Borislav Petkov Cc: Linus Torvalds Link: https://lkml.kernel.org/r/20171204124059.63515-2-kirill.shutemov@linux.intel.com arch/x86/boot/compressed/Makefile | 1 + arch/x86/boot/compressed/head_64.S | 16 ++++++++++++---- arch/x86/boot/compressed/pgtable_64.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 4 deletions(-) commit 7a8b70535037a7d8503d12c1a5abbbc8aa5d709a Author: Radhakrishna Sripada Date: Wed Dec 6 14:25:07 2017 -0800 Revert "drm/i915: Display WA #1133 WaFbcSkipSegments:cnl, glk" This reverts commit 8f067837c4b713ce2e69be95af7b2a5eb3bd7de8. HSD says "WA withdrawn. It was causing corruption with some images. WA is not strictly necessary since this bug just causes loss of FBC compression with some sizes and images, but doesn't break anything." Fixes: 8f067837c4b7 ("drm/i915: Display WA #1133 WaFbcSkipSegments:cnl, glk") Cc: Rodrigo Vivi Signed-off-by: Radhakrishna Sripada Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20171117010825.23118-1-radhakrishna.sripada@intel.com (cherry picked from commit 0cfecb7c4b9b45ed1776162e132b43f92564f3f4) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_reg.h | 3 --- drivers/gpu/drm/i915/intel_pm.c | 13 ------------- 2 files changed, 16 deletions(-) commit 947134d9b00f342415af7eddd42a5fce7262a1b9 Author: Prarit Bhargava Date: Mon Dec 4 11:45:21 2017 -0500 x86/smpboot: Do not use smp_num_siblings in __max_logical_packages calculation Documentation/x86/topology.txt defines smp_num_siblings as "The number of threads in a core". Since commit bbb65d2d365e ("x86: use cpuid vector 0xb when available for detecting cpu topology") smp_num_siblings is the maximum number of threads in a core. If Simultaneous MultiThreading (SMT) is disabled on a system, smp_num_siblings is 2 and not 1 as expected. Use topology_max_smt_threads(), which contains the active numer of threads, in the __max_logical_packages calculation. On a single socket, single core, single thread system __max_smt_threads has not been updated when the __max_logical_packages calculation happens, so its zero which makes the package estimate fail. Initialize it to one, which is the minimum number of threads on a core. [ tglx: Folded the __max_smt_threads fix in ] Fixes: b4c0a7326f5d ("x86/smpboot: Fix __max_logical_packages estimate") Reported-by: Jakub Kicinski Signed-off-by: Prarit Bhargava Tested-by: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: "netdev@vger.kernel.org" Cc: Clark Williams Link: https://lkml.kernel.org/r/20171204164521.17870-1-prarit@redhat.com arch/x86/kernel/smpboot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5bfd40139d55790cbc8e56ad1ce4f974f1fa186d Author: Boris Brezillon Date: Wed Nov 22 21:39:28 2017 +0100 drm/vc4: Fix false positive WARN() backtrace on refcount_inc() usage With CONFIG_REFCOUNT_FULL enabled, refcount_inc() complains when it's passed a refcount object that has its counter set to 0. In this driver, this is a valid use case since we want to increment ->usecnt only when the BO object starts to be used by real HW components and this is definitely not the case when the BO is created. Fix the problem by using refcount_inc_not_zero() instead of refcount_inc() and fallback to refcount_set(1) when refcount_inc_not_zero() returns false. Note that this 2-steps operation is not racy here because the whole section is protected by a mutex which guarantees that the counter does not change between the refcount_inc_not_zero() and refcount_set() calls. Fixes: b9f19259b84d ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl") Reported-by: Stefan Wahren Signed-off-by: Boris Brezillon Acked-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20171122203928.28135-1-boris.brezillon@free-electrons.com drivers/gpu/drm/vc4/vc4_bo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ef78970ace74bb606e641a1f27ea36547716a775 Author: Chris Wilson Date: Wed Nov 22 17:26:21 2017 +0000 drm/i915: Call i915_gem_init_userptr() before taking struct_mutex We don't need struct_mutex to initialise userptr (it just allocates a workqueue for itself etc), but we do need struct_mutex later on in i915_gem_init() in order to feed requests onto the HW. This should break the chain [ 385.697902] ====================================================== [ 385.697907] WARNING: possible circular locking dependency detected [ 385.697913] 4.14.0-CI-Patchwork_7234+ #1 Tainted: G U [ 385.697917] ------------------------------------------------------ [ 385.697922] perf_pmu/2631 is trying to acquire lock: [ 385.697927] (&mm->mmap_sem){++++}, at: [] __might_fault+0x3e/0x90 [ 385.697941] but task is already holding lock: [ 385.697946] (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0xbc/0x1d0 [ 385.697957] which lock already depends on the new lock. [ 385.697963] the existing dependency chain (in reverse order) is: [ 385.697970] -> #4 (&cpuctx_mutex){+.+.}: [ 385.697980] __mutex_lock+0x86/0x9b0 [ 385.697985] perf_event_init_cpu+0x5a/0x90 [ 385.697991] perf_event_init+0x178/0x1a4 [ 385.697997] start_kernel+0x27f/0x3f1 [ 385.698003] verify_cpu+0x0/0xfb [ 385.698006] -> #3 (pmus_lock){+.+.}: [ 385.698015] __mutex_lock+0x86/0x9b0 [ 385.698020] perf_event_init_cpu+0x21/0x90 [ 385.698025] cpuhp_invoke_callback+0xca/0xc00 [ 385.698030] _cpu_up+0xa7/0x170 [ 385.698035] do_cpu_up+0x57/0x70 [ 385.698039] smp_init+0x62/0xa6 [ 385.698044] kernel_init_freeable+0x97/0x193 [ 385.698050] kernel_init+0xa/0x100 [ 385.698055] ret_from_fork+0x27/0x40 [ 385.698058] -> #2 (cpu_hotplug_lock.rw_sem){++++}: [ 385.698068] cpus_read_lock+0x39/0xa0 [ 385.698073] apply_workqueue_attrs+0x12/0x50 [ 385.698078] __alloc_workqueue_key+0x1d8/0x4d8 [ 385.698134] i915_gem_init_userptr+0x5f/0x80 [i915] [ 385.698176] i915_gem_init+0x7c/0x390 [i915] [ 385.698213] i915_driver_load+0x99e/0x15c0 [i915] [ 385.698250] i915_pci_probe+0x33/0x90 [i915] [ 385.698256] pci_device_probe+0xa1/0x130 [ 385.698262] driver_probe_device+0x293/0x440 [ 385.698267] __driver_attach+0xde/0xe0 [ 385.698272] bus_for_each_dev+0x5c/0x90 [ 385.698277] bus_add_driver+0x16d/0x260 [ 385.698282] driver_register+0x57/0xc0 [ 385.698287] do_one_initcall+0x3e/0x160 [ 385.698292] do_init_module+0x5b/0x1fa [ 385.698297] load_module+0x2374/0x2dc0 [ 385.698302] SyS_finit_module+0xaa/0xe0 [ 385.698307] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 385.698311] -> #1 (&dev->struct_mutex){+.+.}: [ 385.698320] __mutex_lock+0x86/0x9b0 [ 385.698361] i915_mutex_lock_interruptible+0x4c/0x130 [i915] [ 385.698403] i915_gem_fault+0x206/0x760 [i915] [ 385.698409] __do_fault+0x1a/0x70 [ 385.698413] __handle_mm_fault+0x7c4/0xdb0 [ 385.698417] handle_mm_fault+0x154/0x300 [ 385.698440] __do_page_fault+0x2d6/0x570 [ 385.698445] page_fault+0x22/0x30 [ 385.698449] -> #0 (&mm->mmap_sem){++++}: [ 385.698459] lock_acquire+0xaf/0x200 [ 385.698464] __might_fault+0x68/0x90 [ 385.698470] _copy_to_user+0x1e/0x70 [ 385.698475] perf_read+0x1aa/0x290 [ 385.698480] __vfs_read+0x23/0x120 [ 385.698484] vfs_read+0xa3/0x150 [ 385.698488] SyS_read+0x45/0xb0 [ 385.698493] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 385.698497] other info that might help us debug this: [ 385.698505] Chain exists of: &mm->mmap_sem --> pmus_lock --> &cpuctx_mutex [ 385.698517] Possible unsafe locking scenario: [ 385.698522] CPU0 CPU1 [ 385.698526] ---- ---- [ 385.698529] lock(&cpuctx_mutex); [ 385.698553] lock(pmus_lock); [ 385.698558] lock(&cpuctx_mutex); [ 385.698564] lock(&mm->mmap_sem); [ 385.698568] *** DEADLOCK *** [ 385.698574] 1 lock held by perf_pmu/2631: [ 385.698578] #0: (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0xbc/0x1d0 [ 385.698589] stack backtrace: [ 385.698595] CPU: 3 PID: 2631 Comm: perf_pmu Tainted: G U 4.14.0-CI-Patchwork_7234+ #1 [ 385.698602] Hardware name: /NUC6CAYB, BIOS AYAPLCEL.86A.0040.2017.0619.1722 06/19/2017 [ 385.698609] Call Trace: [ 385.698615] dump_stack+0x5f/0x86 [ 385.698621] print_circular_bug.isra.18+0x1d0/0x2c0 [ 385.698627] __lock_acquire+0x19c3/0x1b60 [ 385.698634] ? generic_exec_single+0x77/0xe0 [ 385.698640] ? lock_acquire+0xaf/0x200 [ 385.698644] lock_acquire+0xaf/0x200 [ 385.698650] ? __might_fault+0x3e/0x90 [ 385.698655] __might_fault+0x68/0x90 [ 385.698660] ? __might_fault+0x3e/0x90 [ 385.698665] _copy_to_user+0x1e/0x70 [ 385.698670] perf_read+0x1aa/0x290 [ 385.698675] __vfs_read+0x23/0x120 [ 385.698682] ? __fget+0x101/0x1f0 [ 385.698686] vfs_read+0xa3/0x150 [ 385.698691] SyS_read+0x45/0xb0 [ 385.698696] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 385.698701] RIP: 0033:0x7ff1c46876ed [ 385.698705] RSP: 002b:00007fff13552f90 EFLAGS: 00000293 ORIG_RAX: 0000000000000000 [ 385.698712] RAX: ffffffffffffffda RBX: ffffc90000647ff0 RCX: 00007ff1c46876ed [ 385.698718] RDX: 0000000000000010 RSI: 00007fff13552fa0 RDI: 0000000000000005 [ 385.698723] RBP: 000056063d300580 R08: 0000000000000000 R09: 0000000000000060 [ 385.698729] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000046 [ 385.698734] R13: 00007fff13552c6f R14: 00007ff1c6279d00 R15: 00007ff1c6279a40 Testcase: igt/perf_pmu Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20171122172621.16158-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin (cherry picked from commit ee48700dd57d9ce783ec40f035b324d0b75632e4) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit c5a88cd2e1c508868922bafa0a5c3365986b98e5 Author: David Lechner Date: Sun Dec 3 16:04:53 2017 -0600 ARM: dts: da850-lego-ev3: Fix battery voltage gpio This fixes the battery voltage monitoring gpio-hog settings. When the gpio is low, it turns off the battery voltage to the ADC chip. However, this needs to be on all of the time so that we can monitor battery voltage. Also, there was a typo that prevented pinmuxing from working correctly. Signed-off-by: David Lechner Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lego-ev3.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e779498df587dd2189b30fe5b9245aefab870eb8 Author: Heiko Carstens Date: Wed Dec 6 16:11:27 2017 +0100 s390: fix compat system call table When wiring up the socket system calls the compat entries were incorrectly set. Not all of them point to the corresponding compat wrapper functions, which clear the upper 33 bits of user space pointers, like it is required. Fixes: 977108f89c989 ("s390: wire up separate socketcalls system calls") Cc: # v4.3+ Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/syscalls.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 621f96bcb49412010876a1e6e006f748b91d9e75 Author: Alejandro Mery Date: Tue Dec 5 12:34:57 2017 +0000 ARM: davinci: Add dma_mask to dm365's eDMA device Add dma_mask to dm365's EDMA device. Without a valid dma_mask, EDMA on DM365 refuses to probe. Fixes: cef5b0da4019 ("ARM: davinci: Add dma_mask to eDMA devices") Reviewed-by: Peter Ujfalusi Signed-off-by: Alejandro Mery Signed-off-by: Sekhar Nori arch/arm/mach-davinci/dm365.c | 1 + 1 file changed, 1 insertion(+) commit b638823a7bbd251d442042b0e9522100bdaa5b66 Author: Alejandro Mery Date: Tue Dec 5 12:34:56 2017 +0000 ARM: davinci: Use platform_device_register_full() to create pdev for dm365's eDMA Convert the DM365 EDMA platform device creation to use struct platform_device_info XXXXXX __initconst and platform_device_register_full() This will allow us to specify the dma_mask for the device in an upcoming patch. Without this, EDMA on DM365 refuses to probe. Fixes: 7ab388e85faa ("ARM: davinci: Use platform_device_register_full() to create pdev for eDMA") Reviewed-by: Peter Ujfalusi Signed-off-by: Alejandro Mery Signed-off-by: Sekhar Nori arch/arm/mach-davinci/dm365.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 968edbd93c0cbb40ab48aca972392d377713a0c3 Merge: ba3edf1f 4e23f78 Author: Linus Torvalds Date: Wed Dec 6 18:33:17 2017 -0800 Merge tag 'for_linus-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb Pull kgdb fixes from Jason Wessel: - Fix long standing problem with kdb kallsyms_symbol_next() return value - Add new co-maintainer Daniel Thompson * tag 'for_linus-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb: kgdb/kdb/debug_core: Add co-maintainer Daniel Thompson kdb: Fix handling of kallsyms_symbol_next() return value commit ba3edf1f770ebc486f9d69824f4a2e069da4d2d4 Author: Linus Torvalds Date: Wed Dec 6 18:23:27 2017 -0800 proc: show si_ptr in /proc//timers without hashing It's a user pointer, and while the permissions of the file are pretty questionable (should it really be readable to everybody), hashing the pointer isn't going to be the solution. We should take a closer look at more of the /proc/ file permissions in general. Sure, we do want many of them to often be readable (for 'ps' and friends), but I think we should probably do a few conversions from S_IRUGO to S_IRUSR. Reported-by: Alexey Dobriyan Signed-off-by: Linus Torvalds fs/proc/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10f837e52b57bd69b811aeeb8fb1a095e26f6575 Merge: dd53a42 65323ee Author: Linus Torvalds Date: Wed Dec 6 18:16:20 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu fixes from Greg Ungerer: "There are two fixes here. One to add a missing linker section to the m68k architecture linker scripts, the other to fix a defconfig build problem" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k/defconfig: fix stmark2 broken local compilation m68k: add missing SOFTIRQENTRY_TEXT linker section commit dd53a4214d4ff450b66ca7d2e51d9369e3266ebf Merge: 4b43a3b 88edb57 Author: Linus Torvalds Date: Wed Dec 6 17:47:29 2017 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc x86 fixes from Ingo Molnar: - make CR4 handling irq-safe, which bug vmware guests ran into - don't crash on early IRQs in Xen guests - don't crash secondary CPU bringup if #UD assisted WARN()ings are triggered - make X86_BUG_FXSAVE_LEAK optional on newer AMD CPUs that have the fix - fix AMD Fam17h microcode loading - fix broadcom_postcore_init() if ACPI is disabled - fix resume regression in __restore_processor_context() - fix Sparse warnings - fix a GCC-8 warning * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vdso: Change time() prototype to match __vdso_time() x86: Fix Sparse warnings about non-static functions x86/power: Fix some ordering bugs in __restore_processor_context() x86/PCI: Make broadcom_postcore_init() check acpi_disabled x86/microcode/AMD: Add support for fam17h microcode loading x86/cpufeatures: Make X86_BUG_FXSAVE_LEAK detectable in CPUID on AMD x86/idt: Load idt early in start_secondary x86/xen: Support early interrupts in xen pv guests x86/tlb: Disable interrupts when changing CR4 x86/tlb: Refactor CR4 setting and shadow write commit 4b43a3bc20ec6ecebb651f48a670373f9dfa1dbb Merge: e017b4d 46febd3 Author: Linus Torvalds Date: Wed Dec 6 17:45:36 2017 -0800 Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull CPU hotplug fix from Ingo Molnar: "A single fix moving the smp-call queue flush step to the intended point in the state machine" * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: smp/hotplug: Move step CPUHP_AP_SMPCFD_DYING to the correct place commit e017b4db26d03c1a6531f814ecc5ab41bcb889e9 Merge: 1c76472 a4c3c04 Author: Linus Torvalds Date: Wed Dec 6 17:43:26 2017 -0800 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "This includes a fix for the add_wait_queue() queue ordering brown paperbag bug, plus PELT accounting fixes for cgroups scheduling artifacts" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Update and fix the runnable propagation rule sched/wait: Fix add_wait_queue() behavioral change commit 1c7647253c6478b5bf209c0cf74f27daeb277c39 Merge: 189dbab 34c9ca3 Author: Linus Torvalds Date: Wed Dec 6 17:41:24 2017 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "This includes perf namespace support kernel side fixes, plus an accumulated set of perf tooling fixes - including UAPI header synchronization that should make the perf build less noisy" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits) tooling/headers: Synchronize updated s390 and x86 UAPI headers tools headers: Syncronize mman.h ABI header tools headers: Synchronize prctl.h ABI header tools headers: Synchronize KVM arch ABI headers tools headers: Synchronize drm/i915_drm.h tools headers uapi: Synchronize drm/drm.h tools headers: Synchronize perf_event.h header tools headers: Synchronize kernel ABI headers wrt SPDX tags tools/headers: Synchronize kernel x86 UAPI headers perf intel-pt: Bring instruction decoder files into line with the kernel perf test: Fix test 21 for s390x perf bench numa: Fixup discontiguous/sparse numa nodes perf top: Use signal interface for SIGWINCH handler perf top: Fix window dimensions change handling perf: Fix header.size for namespace events perf top: Ignore kptr_restrict when not sampling the kernel perf record: Ignore kptr_restrict when not sampling the kernel perf report: Ignore kptr_restrict when not sampling the kernel perf evlist: Add helper to check if attr.exclude_kernel is set in all evsels perf test shell: Fix test case probe libc's inet_pton on s390x ... commit 189dbab0dddcf7d8525f32ae13d22ac95927fdb6 Merge: 61d6be3 5e351ad Author: Linus Torvalds Date: Wed Dec 6 17:39:44 2017 -0800 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull lockdep fix from Ingo Molnar: "Fix a possible NULL dereference for the (rare) case when a task doesn't have ->xhlocks space allocated due to kmalloc() OOM-ing" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/lockdep: Fix possible NULL deref commit 1cd6ae355bb2092a6a511558334564cb1f4ffd43 Author: Inki Dae Date: Thu Nov 23 18:27:57 2017 +0900 drm/exynos: remove unnecessary function declaration Removed exynos_drm_get_dma_device funtion declaration on top of exynos_drm_drv.c file. We can remove this declaration by moving the implementation of this function upwards. Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_drv.c | 44 ++++++++++++++++----------------- 1 file changed, 21 insertions(+), 23 deletions(-) commit 2f0f6dfcf925c3bdc6468599fa33b729fbd9247d Author: Inki Dae Date: Thu Nov 23 18:32:06 2017 +0900 drm/exynos: remove unnecessary descrptions Removed two descriptions to 'da_start' and 'da_space_size' from exynos_drm_private structure. These members don't exist anymore. Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_drv.h | 5 ----- 1 file changed, 5 deletions(-) commit 120a264f9c2782682027d931d83dcbd22e01da80 Author: Marek Szyprowski Date: Wed Nov 22 14:14:47 2017 +0100 drm/exynos: gem: Drop NONCONTIG flag for buffers allocated without IOMMU When no IOMMU is available, all GEM buffers allocated by Exynos DRM driver are contiguous, because of the underlying dma_alloc_attrs() function provides only such buffers. In such case it makes no sense to keep BO_NONCONTIG flag for the allocated GEM buffers. This allows to avoid failures for buffer contiguity checks in the subsequent operations on GEM objects. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae CC: stable@vger.kernel.org # v4.4+ drivers/gpu/drm/exynos/exynos_drm_gem.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 89452d4ab20745002e50ecf90979708f1ce1d077 Author: Marek Szyprowski Date: Mon Oct 30 08:28:09 2017 +0100 drm/exynos: Fix dma-buf import When IOMMU support was enabled, dma-buf import in Exynos DRM was broken since commit f43c35966a5a ("drm/exynos: use real device for DMA-mapping operations") due to using wrong struct device in drm_gem_prime_import() function. This patch fixes following kernel BUG caused by incorrect buffer mapping to DMA address space: exynos-sysmmu 14650000.sysmmu: 14450000.mixer: PAGE FAULT occurred at 0xb2e00000 ------------[ cut here ]------------ kernel BUG at drivers/iommu/exynos-iommu.c:449! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.0-rc4-next-20171016-00033-g990d723669fd #3165 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) task: c0e0b7c0 task.stack: c0e00000 PC is at exynos_sysmmu_irq+0x1d0/0x24c LR is at exynos_sysmmu_irq+0x154/0x24c ------------[ cut here ]------------ Reported-by: Marian Mihailescu Fixes: f43c35966a5a ("drm/exynos: use real device for DMA-mapping operations") Signed-off-by: Marek Szyprowski Reviewed-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 6 ++++++ drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) commit 61d6be3a7a1139285e16a672be72caefd4b1126b Merge: dabe589 4ce413d Author: Linus Torvalds Date: Wed Dec 6 15:47:51 2017 -0800 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Ingo Molnar: "Two fixes: use bool type consistently, plus a irq_matrix_available() bugfix" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqdesc: Use bool return type instead of int genirq/matrix: Fix the precedence fix for real commit c8bcbfbd239ed60a6562964b58034ac8a25f4c31 Author: Nikolay Borisov Date: Fri Dec 1 11:19:42 2017 +0200 btrfs: Fix possible off-by-one in btrfs_search_path_in_tree The name char array passed to btrfs_search_path_in_tree is of size BTRFS_INO_LOOKUP_PATH_MAX (4080). So the actual accessible char indexes are in the range of [0, 4079]. Currently the code uses the define but this represents an off-by-one. Implications: Size of btrfs_ioctl_ino_lookup_args is 4096, so the new byte will be written to extra space, not some padding that could be provided by the allocator. btrfs-progs store the arguments on stack, but kernel does own copy of the ioctl buffer and the off-by-one overwrite does not affect userspace, but the ending 0 might be lost. Kernel ioctl buffer is allocated dynamically so we're overwriting somebody else's memory, and the ioctl is privileged if args.objectid is not 256. Which is in most cases, but resolving a subvolume stored in another directory will trigger that path. Before this patch the buffer was one byte larger, but then the -1 was not added. Fixes: ac8e9819d71f907 ("Btrfs: add search and inode lookup ioctls") Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ added implications ] Signed-off-by: David Sterba fs/btrfs/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b9e619c5bc8235cfba3dc4ced2fb0e3554a05d4 Author: Omar Sandoval Date: Tue Dec 5 22:54:02 2017 -0800 Btrfs: disable FUA if mounted with nobarrier I was seeing disk flushes still happening when I mounted a Btrfs filesystem with nobarrier for testing. This is because we use FUA to write out the first super block, and on devices without FUA support, the block layer translates FUA to a flush. Even on devices supporting true FUA, using FUA when we asked for no barriers is surprising. Fixes: 387125fc722a8ed ("Btrfs: fix barrier flushes") Signed-off-by: Omar Sandoval Reviewed-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit e19182c0fff451e3744c1107d98f072e7ca377a0 Author: Jeff Mahoney Date: Mon Dec 4 13:11:45 2017 -0500 btrfs: fix missing error return in btrfs_drop_snapshot If btrfs_del_root fails in btrfs_drop_snapshot, we'll pick up the error but then return 0 anyway due to mixing err and ret. Fixes: 79787eaab4612 ("btrfs: replace many BUG_ONs with proper error handling") Cc: # v3.4+ Signed-off-by: Jeff Mahoney Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 1 + 1 file changed, 1 insertion(+) commit 692826b2738101549f032a761a9191636e83be4e Author: Jeff Mahoney Date: Tue Nov 21 13:58:49 2017 -0500 btrfs: handle errors while updating refcounts in update_ref_for_cow Since commit fb235dc06fa (btrfs: qgroup: Move half of the qgroup accounting time out of commit trans) the assumption that btrfs_add_delayed_{data,tree}_ref can only return 0 or -ENOMEM has been false. The qgroup operations call into btrfs_search_slot and friends and can now return the full spectrum of error codes. Fortunately, the fix here is easy since update_ref_for_cow failing is already handled so we just need to bail early with the error code. Fixes: fb235dc06fa (btrfs: qgroup: Move half of the qgroup accounting ...) Cc: # v4.11+ Signed-off-by: Jeff Mahoney Reviewed-by: Edmund Nadolski Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/ctree.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit b430b7751286b3acff2d324553c8cec4f1e87764 Author: Justin Maggard Date: Mon Oct 30 15:29:10 2017 -0700 btrfs: Fix quota reservation leak on preallocated files Commit c6887cd11149 ("Btrfs: don't do nocow check unless we have to") changed the behavior of __btrfs_buffered_write() so that it first tries to get a data space reservation, and then skips the relatively expensive nocow check if the reservation succeeded. If we have quotas enabled, the data space reservation also includes a quota reservation. But in the rewrite case, the space has already been accounted for in qgroups. So btrfs_check_data_free_space() increases the quota reservation, but it never gets decreased when the data actually gets written and overwrites the pre-existing data. So we're left with both the qgroup and qgroup reservation accounting for the same space. This commit adds the missing btrfs_qgroup_free_data() call in the case of BTRFS_ORDERED_PREALLOC extents. Fixes: c6887cd11149 ("Btrfs: don't do nocow check unless we have to") Signed-off-by: Justin Maggard Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/inode.c | 2 ++ 1 file changed, 2 insertions(+) commit dabe589657ad0f9a0d6f4101e2171574f74b00bf Merge: 07eca14 0b02e44 Author: Linus Torvalds Date: Wed Dec 6 15:20:51 2017 -0800 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Ingo Molnar: "Misc fixes: world-readable pointer removal from sysfs, a ESRT kfree() bug fix and a comment update" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi: Add comment to avoid future expanding of sysfs systab efi/esrt: Use memunmap() instead of kfree() to free the remapping efi: Move some sysfs files to be read-only by root commit 07eca14b6fdd0ccc52ed9127aa6924507261a907 Merge: e56d565 14c47b54 Author: Linus Torvalds Date: Wed Dec 6 14:53:32 2017 -0800 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core fixes from Ingo Molnar: "Two fixes: - objtool cross-build fixes - removal of an obsolete CPU-hotplug state name from comments" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Fix 64-bit build on 32-bit host cpu/hotplug: Fix state name in takedown_cpu() comment commit bd3a3a2e92624942a143e485c83e641b2492d828 Merge: db8f884 a703c55 Author: Dave Airlie Date: Thu Dec 7 08:29:26 2017 +1000 Merge tag 'drm-misc-fixes-2017-12-06' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Just the connector_iter corner-case regression fix. * tag 'drm-misc-fixes-2017-12-06' of git://anongit.freedesktop.org/drm/drm-misc: drm: safely free connectors from connector_iter commit 4e23f78c74934e8ea624b59df58e646e0657608a Author: Jason Wessel Date: Tue Dec 5 13:26:27 2017 -0600 kgdb/kdb/debug_core: Add co-maintainer Daniel Thompson Signed-off-by: Jason Wessel MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit c07d35338081d107e57cf37572d8cc931a8e32e2 Author: Daniel Thompson Date: Mon Mar 2 14:13:36 2015 +0000 kdb: Fix handling of kallsyms_symbol_next() return value kallsyms_symbol_next() returns a boolean (true on success). Currently kdb_read() tests the return value with an inequality that unconditionally evaluates to true. This is fixed in the obvious way and, since the conditional branch is supposed to be unreachable, we also add a WARN_ON(). Reported-by: Dan Carpenter Signed-off-by: Daniel Thompson Cc: linux-stable Signed-off-by: Jason Wessel kernel/debug/kdb/kdb_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e4748175fe942c86cbab840e2fa41a92b4d6cf6 Author: Geert Uytterhoeven Date: Tue Dec 5 16:27:03 2017 +0100 of: overlay: Fix (un)locking in of_overlay_apply() The special overlay mutex is taken first, hence it should be released last in the error path. of_resolve_phandles() must be called with of_mutex held. Without it, a node and new phandle could be added via of_attach_node(), making the max phandle wrong. free_overlay_changeset() must be called with of_mutex held, if any non-trivial cleanup is to be done. Hence move "mutex_lock(&of_mutex)" up, as suggested by Frank, and merge the two tail statements of the success and error paths, now they became identical. Note that while the two mutexes are adjacent, we still need both: __of_changeset_apply_notify(), which is called by __of_changeset_apply() unlocks of_mutex, then does notifications then locks of_mutex. So the mutex get released in the middle of of_overlay_apply() Fixes: f948d6d8b792bb90 ("of: overlay: avoid race condition between applying multiple overlays") Signed-off-by: Geert Uytterhoeven Reviewed-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/overlay.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 1352f09b4cc4f9dce386620b118401738bbf0d5f Author: Geert Uytterhoeven Date: Tue Dec 5 16:27:02 2017 +0100 of: overlay: Fix memory leak in of_overlay_apply() error path If of_resolve_phandles() fails, free_overlay_changeset() is called in the error path. However, that function returns early if the list hasn't been initialized yet, before freeing the object. Explicitly calling kfree() instead would solve that issue. However, that complicates matter, by having to consider which of two different methods to use to dispose of the same object. Hence make free_overlay_changeset() consider initialization state of the different parts of the object, making it always safe to call (once!) to dispose of a (partially) initialized overlay_changeset: - Only destroy the changeset if the list was initialized, - Make init_overlay_changeset() store the ID in ovcs->id on success, to avoid calling idr_remove() with an error value or an already released ID. Reported-by: Colin King Fixes: f948d6d8b792bb90 ("of: overlay: avoid race condition between applying multiple overlays") Signed-off-by: Geert Uytterhoeven Reviewed-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/overlay.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 34c9ca37aaec2e307b837bb099d3b44f0ea04ddc Author: Ingo Molnar Date: Wed Dec 6 22:41:53 2017 +0100 tooling/headers: Synchronize updated s390 and x86 UAPI headers There were two trivial updates to these upstream UAPI headers: arch/s390/include/uapi/asm/kvm.h arch/s390/include/uapi/asm/kvm_perf.h arch/x86/lib/x86-opcode-map.txt Synchronize them with their tooling copies. (The x86 opcode map includes a new instruction pattern now.) Cc: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Namhyung Kim Cc: Jiri Olsa Cc: Linus Torvalds Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar tools/arch/s390/include/uapi/asm/kvm.h | 4 ---- tools/arch/s390/include/uapi/asm/kvm_perf.h | 4 ---- tools/perf/util/intel-pt-decoder/x86-opcode-map.txt | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) commit d6eabce2577a695197e9433302fd6a9f0e1a7666 Merge: 6e948c6 328b4ed Author: Ingo Molnar Date: Wed Dec 6 22:39:39 2017 +0100 Merge branch 'linus' into perf/urgent, to synchronize UAPI headers Signed-off-by: Ingo Molnar commit 14c47b54b0d9389e3ca0718e805cdd90c5a4303a Author: Mikulas Patocka Date: Sat Dec 2 16:17:44 2017 -0600 objtool: Fix 64-bit build on 32-bit host The new ORC unwinder breaks the build of a 64-bit kernel on a 32-bit host. Building the kernel on a i386 or x32 host fails with: orc_dump.c: In function 'orc_dump': orc_dump.c:105:26: error: passing argument 2 of 'elf_getshdrnum' from incompatible pointer type [-Werror=incompatible-pointer-types] if (elf_getshdrnum(elf, &nr_sections)) { ^ In file included from /usr/local/include/gelf.h:32:0, from elf.h:22, from warn.h:26, from orc_dump.c:20: /usr/local/include/libelf.h:304:12: note: expected 'size_t * {aka unsigned int *}' but argument is of type 'long unsigned int *' extern int elf_getshdrnum (Elf *__elf, size_t *__dst); ^~~~~~~~~~~~~~ orc_dump.c:190:17: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'Elf64_Sxword {aka long long int}' [-Werror=format=] printf("%s+%lx:", name, rela.r_addend); ~~^ ~~~~~~~~~~~~~ %llx Fix the build failure. Another problem is that if the user specifies HOSTCC or HOSTLD variables, they are ignored in the objtool makefile. Change the Makefile to respect these variables. Signed-off-by: Mikulas Patocka Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sven Joachim Cc: Thomas Gleixner Fixes: 627fce14809b ("objtool: Add ORC unwind table generation") Link: http://lkml.kernel.org/r/19f0e64d8e07e30a7b307cd010eb780c404fe08d.1512252895.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/Makefile | 8 +++++--- tools/objtool/orc_dump.c | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) commit 3bcca2c271259ab2c3b539f0afa17d0043854c01 Author: Geert Uytterhoeven Date: Thu Nov 30 14:29:46 2017 +0100 dt-bindings: eeprom: at25: Document device-specific compatible values Document the recommended presence of a device-specific compatible value, and list examples that are already in use or soon will be. This will allow checkpatch to validate compatible values in DTS. Update the example to match current best practices (generic node name, specific compatible value first). Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring Documentation/devicetree/bindings/eeprom/at25.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit ba341abd5480f41057b424a0047374aebd505f17 Author: Geert Uytterhoeven Date: Thu Nov 30 14:29:45 2017 +0100 dt-bindings: eeprom: at25: Grammar s/are can/can/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring Documentation/devicetree/bindings/eeprom/at25.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a19e2696135efb471981c1ae1ec3cb2b70c41a2e Author: Christian König Date: Wed Nov 29 15:12:28 2017 +0100 x86/PCI: Only enable a 64bit BAR on single-socket AMD Family 15h When we have a multi-socket system, each CPU core needs the same setup. Since this is tricky to do in the fixup code, don't enable a 64bit BAR on multi-socket systems for now. Signed-off-by: Christian König Signed-off-by: Bjorn Helgaas arch/x86/pci/fixup.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 470195f82e4ea550b7c37736a12bf3fa565295ea Author: Christian König Date: Wed Nov 29 15:12:27 2017 +0100 x86/PCI: Fix infinite loop in search for 64bit BAR placement Break the loop if we can't find some address space for a 64bit BAR. Signed-off-by: Christian König Signed-off-by: Bjorn Helgaas arch/x86/pci/fixup.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4c9847b7375aa9d49681497f7236fdbdab02ba7a Author: Mathieu Malaterre Date: Wed Nov 29 21:55:15 2017 +0100 dt-bindings: Remove leading 0x from bindings notation Improve the binding example by removing all the leading 0x to fix the following dtc warnings: Warning (unit_address_format): Node /XXX unit name should not have leading "0x" Converted using the following command: find Documentation/devicetree/bindings -name "*.txt" -exec sed -i -e 's/([^ ])\@0x([0-9a-f])/$1\@$2/g' {} + This is a follow up to commit 48c926cd3414 Signed-off-by: Mathieu Malaterre Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/ccn.txt | 2 +- Documentation/devicetree/bindings/arm/omap/crossbar.txt | 2 +- .../devicetree/bindings/arm/tegra/nvidia,tegra20-mc.txt | 2 +- Documentation/devicetree/bindings/clock/axi-clkgen.txt | 2 +- .../devicetree/bindings/clock/brcm,bcm2835-aux-clock.txt | 2 +- Documentation/devicetree/bindings/clock/exynos4-clock.txt | 2 +- Documentation/devicetree/bindings/clock/exynos5250-clock.txt | 2 +- Documentation/devicetree/bindings/clock/exynos5410-clock.txt | 2 +- Documentation/devicetree/bindings/clock/exynos5420-clock.txt | 2 +- Documentation/devicetree/bindings/clock/exynos5440-clock.txt | 2 +- .../devicetree/bindings/clock/ti-keystone-pllctrl.txt | 2 +- Documentation/devicetree/bindings/clock/zx296702-clk.txt | 4 ++-- Documentation/devicetree/bindings/crypto/fsl-sec4.txt | 4 ++-- .../devicetree/bindings/devfreq/event/rockchip-dfi.txt | 2 +- Documentation/devicetree/bindings/display/atmel,lcdc.txt | 4 ++-- Documentation/devicetree/bindings/dma/qcom_hidma_mgmt.txt | 4 ++-- Documentation/devicetree/bindings/dma/zxdma.txt | 2 +- Documentation/devicetree/bindings/gpio/gpio-altera.txt | 2 +- Documentation/devicetree/bindings/i2c/i2c-jz4780.txt | 2 +- Documentation/devicetree/bindings/iio/pressure/hp03.txt | 2 +- .../devicetree/bindings/input/touchscreen/bu21013.txt | 2 +- .../devicetree/bindings/interrupt-controller/arm,gic.txt | 4 ++-- .../bindings/interrupt-controller/img,meta-intc.txt | 2 +- .../bindings/interrupt-controller/img,pdc-intc.txt | 2 +- .../bindings/interrupt-controller/st,spear3xx-shirq.txt | 2 +- Documentation/devicetree/bindings/mailbox/altera-mailbox.txt | 6 +++--- .../devicetree/bindings/mailbox/brcm,iproc-pdc-mbox.txt | 2 +- Documentation/devicetree/bindings/media/exynos5-gsc.txt | 2 +- Documentation/devicetree/bindings/media/mediatek-vcodec.txt | 2 +- Documentation/devicetree/bindings/media/rcar_vin.txt | 2 +- Documentation/devicetree/bindings/media/samsung-fimc.txt | 2 +- Documentation/devicetree/bindings/media/sh_mobile_ceu.txt | 2 +- Documentation/devicetree/bindings/media/video-interfaces.txt | 10 +++++----- .../devicetree/bindings/memory-controllers/ti/emif.txt | 2 +- .../devicetree/bindings/mfd/ti-keystone-devctrl.txt | 2 +- Documentation/devicetree/bindings/misc/brcm,kona-smc.txt | 2 +- Documentation/devicetree/bindings/mmc/brcm,kona-sdhci.txt | 2 +- Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt | 2 +- Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt | 4 ++-- Documentation/devicetree/bindings/mtd/gpmc-nor.txt | 6 +++--- Documentation/devicetree/bindings/mtd/mtk-nand.txt | 2 +- Documentation/devicetree/bindings/net/altera_tse.txt | 4 ++-- Documentation/devicetree/bindings/net/mdio.txt | 2 +- Documentation/devicetree/bindings/net/socfpga-dwmac.txt | 2 +- Documentation/devicetree/bindings/nios2/nios2.txt | 2 +- Documentation/devicetree/bindings/pci/altera-pcie.txt | 2 +- Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt | 2 +- Documentation/devicetree/bindings/pci/hisilicon-pcie.txt | 2 +- Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt | 2 +- .../devicetree/bindings/pinctrl/brcm,cygnus-pinmux.txt | 2 +- Documentation/devicetree/bindings/pinctrl/pinctrl-atlas7.txt | 4 ++-- Documentation/devicetree/bindings/pinctrl/pinctrl-sirf.txt | 2 +- .../devicetree/bindings/pinctrl/rockchip,pinctrl.txt | 4 ++-- Documentation/devicetree/bindings/regulator/regulator.txt | 2 +- Documentation/devicetree/bindings/serial/efm32-uart.txt | 2 +- .../devicetree/bindings/serio/allwinner,sun4i-ps2.txt | 2 +- .../devicetree/bindings/soc/ti/keystone-navigator-qmss.txt | 2 +- Documentation/devicetree/bindings/sound/adi,axi-i2s.txt | 2 +- Documentation/devicetree/bindings/sound/adi,axi-spdif-tx.txt | 2 +- Documentation/devicetree/bindings/sound/ak4613.txt | 2 +- Documentation/devicetree/bindings/sound/ak4642.txt | 2 +- Documentation/devicetree/bindings/sound/max98371.txt | 2 +- Documentation/devicetree/bindings/sound/max9867.txt | 2 +- Documentation/devicetree/bindings/sound/renesas,fsi.txt | 2 +- Documentation/devicetree/bindings/sound/rockchip-spdif.txt | 2 +- Documentation/devicetree/bindings/sound/st,sti-asoc-card.txt | 8 ++++---- Documentation/devicetree/bindings/spi/efm32-spi.txt | 2 +- Documentation/devicetree/bindings/thermal/thermal.txt | 12 ++++++------ Documentation/devicetree/bindings/ufs/ufs-qcom.txt | 4 ++-- Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt | 2 +- Documentation/devicetree/bindings/usb/ehci-st.txt | 2 +- Documentation/devicetree/bindings/usb/ohci-st.txt | 2 +- .../devicetree/bindings/watchdog/ingenic,jz4740-wdt.txt | 2 +- 73 files changed, 99 insertions(+), 99 deletions(-) commit 6de67de326041c3a450a117b2733cbedd3aab097 Author: Geert Uytterhoeven Date: Tue Nov 28 09:26:33 2017 +0100 of: overlay: Remove else after goto If an "if" branch is terminated by a "goto", there's no need to have an "else" statement and an indented block of code. Remove the "else" statement to simplify the code flow for the casual reviewer. Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring drivers/of/overlay.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit e9d92e40ac9dea5a9a185fc11227f492f0b74fc7 Author: Geert Uytterhoeven Date: Tue Nov 28 09:25:23 2017 +0100 of: Spelling s/changset/changeset/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring drivers/of/dynamic.c | 4 ++-- drivers/of/overlay.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 33acc40d00bc66f2d6e84441b6c46e03bd8acfa9 Author: Geert Uytterhoeven Date: Mon Nov 27 15:46:27 2017 +0100 of: unittest: Remove bogus overlay mutex release from overlay_data_add() overlay_data_add() never takes the special overlay mutex, so it must not be released in the error patch. Presumably the call to of_overlay_mutex_unlock() is a relic from v1 of the patch. Fixes: f948d6d8b792bb90 ("of: overlay: avoid race condition between applying multiple overlays") Signed-off-by: Geert Uytterhoeven Reviewed-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/unittest.c | 1 - 1 file changed, 1 deletion(-) commit 7912af5c835bd86f2b0347a480e0f40e2fab30d0 Author: Randy Dunlap Date: Wed Dec 6 14:55:05 2017 -0600 PCI: Add pci_get_domain_bus_and_slot() stub The coretemp driver build fails when CONFIG_PCI is not enabled because it uses a function that does not have a stub for that config case, so add the function stub. ../drivers/hwmon/coretemp.c: In function 'adjust_tjmax': ../drivers/hwmon/coretemp.c:250:9: error: implicit declaration of function 'pci_get_domain_bus_and_slot' [-Werror=implicit-function-declaration] struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn); ../drivers/hwmon/coretemp.c:250:32: warning: initialization makes pointer from integer without a cast [enabled by default] struct pci_dev *host_bridge = pci_get_domain_bus_and_slot(0, 0, devfn); Signed-off-by: Randy Dunlap [bhelgaas: identical patch also by Arnd Bergmann ] Signed-off-by: Bjorn Helgaas Acked-by: Guenter Roeck include/linux/pci.h | 3 +++ 1 file changed, 3 insertions(+) commit 30f1e59550363f6be28213393407ef225150e7fe Author: Pravin Shedge Date: Wed Dec 6 22:28:40 2017 +0530 drivers: net: dsa: remove duplicate includes These duplicate includes have been found with scripts/checkincludes.pl but they have been removed manually to avoid removing false positives. Signed-off-by: Pravin Shedge Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 1 - 1 file changed, 1 deletion(-) commit f3069c6d33f6ae63a1668737bc78aaaa51bff7ca Author: Håkon Bugge Date: Wed Dec 6 17:18:28 2017 +0100 rds: Fix NULL pointer dereference in __rds_rdma_map This is a fix for syzkaller719569, where memory registration was attempted without any underlying transport being loaded. Analysis of the case reveals that it is the setsockopt() RDS_GET_MR (2) and RDS_GET_MR_FOR_DEST (7) that are vulnerable. Here is an example stack trace when the bug is hit: BUG: unable to handle kernel NULL pointer dereference at 00000000000000c0 IP: __rds_rdma_map+0x36/0x440 [rds] PGD 2f93d03067 P4D 2f93d03067 PUD 2f93d02067 PMD 0 Oops: 0000 [#1] SMP Modules linked in: bridge stp llc tun rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache rds binfmt_misc sb_edac intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul c rc32_pclmul ghash_clmulni_intel pcbc aesni_intel crypto_simd glue_helper cryptd iTCO_wdt mei_me sg iTCO_vendor_support ipmi_si mei ipmi_devintf nfsd shpchp pcspkr i2c_i801 ioatd ma ipmi_msghandler wmi lpc_ich mfd_core auth_rpcgss nfs_acl lockd grace sunrpc ip_tables ext4 mbcache jbd2 mgag200 i2c_algo_bit drm_kms_helper ixgbe syscopyarea ahci sysfillrect sysimgblt libahci mdio fb_sys_fops ttm ptp libata sd_mod mlx4_core drm crc32c_intel pps_core megaraid_sas i2c_core dca dm_mirror dm_region_hash dm_log dm_mod CPU: 48 PID: 45787 Comm: repro_set2 Not tainted 4.14.2-3.el7uek.x86_64 #2 Hardware name: Oracle Corporation ORACLE SERVER X5-2L/ASM,MOBO TRAY,2U, BIOS 31110000 03/03/2017 task: ffff882f9190db00 task.stack: ffffc9002b994000 RIP: 0010:__rds_rdma_map+0x36/0x440 [rds] RSP: 0018:ffffc9002b997df0 EFLAGS: 00010202 RAX: 0000000000000000 RBX: ffff882fa2182580 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffc9002b997e40 RDI: ffff882fa2182580 RBP: ffffc9002b997e30 R08: 0000000000000000 R09: 0000000000000002 R10: ffff885fb29e3838 R11: 0000000000000000 R12: ffff882fa2182580 R13: ffff882fa2182580 R14: 0000000000000002 R15: 0000000020000ffc FS: 00007fbffa20b700(0000) GS:ffff882fbfb80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000c0 CR3: 0000002f98a66006 CR4: 00000000001606e0 Call Trace: rds_get_mr+0x56/0x80 [rds] rds_setsockopt+0x172/0x340 [rds] ? __fget_light+0x25/0x60 ? __fdget+0x13/0x20 SyS_setsockopt+0x80/0xe0 do_syscall_64+0x67/0x1b0 entry_SYSCALL64_slow_path+0x25/0x25 RIP: 0033:0x7fbff9b117f9 RSP: 002b:00007fbffa20aed8 EFLAGS: 00000293 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00000000000c84a4 RCX: 00007fbff9b117f9 RDX: 0000000000000002 RSI: 0000400000000114 RDI: 000000000000109b RBP: 00007fbffa20af10 R08: 0000000000000020 R09: 00007fbff9dd7860 R10: 0000000020000ffc R11: 0000000000000293 R12: 0000000000000000 R13: 00007fbffa20b9c0 R14: 00007fbffa20b700 R15: 0000000000000021 Code: 41 56 41 55 49 89 fd 41 54 53 48 83 ec 18 8b 87 f0 02 00 00 48 89 55 d0 48 89 4d c8 85 c0 0f 84 2d 03 00 00 48 8b 87 00 03 00 00 <48> 83 b8 c0 00 00 00 00 0f 84 25 03 00 0 0 48 8b 06 48 8b 56 08 The fix is to check the existence of an underlying transport in __rds_rdma_map(). Signed-off-by: Håkon Bugge Reported-by: syzbot Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32d3e51a82d453762ef148b2c4fbc8a7ec374a88 Author: Chris Dion Date: Wed Dec 6 10:50:28 2017 -0500 net_sched: use macvlan real dev trans_start in dev_trans_start() Macvlan devices are similar to vlans and do not update their own trans_start. In order for arp monitoring to work for a bond device when the slaves are macvlans, obtain its real device. Signed-off-by: Chris Dion Signed-off-by: David S. Miller net/sched/sch_generic.c | 3 +++ 1 file changed, 3 insertions(+) commit 88edb57d1e0b262e669c5cad36646dcf5a7f37f5 Author: Arnd Bergmann Date: Mon Dec 4 16:01:55 2017 +0100 x86/vdso: Change time() prototype to match __vdso_time() gcc-8 warns that time() is an alias for __vdso_time() but the two have different prototypes: arch/x86/entry/vdso/vclock_gettime.c:327:5: error: 'time' alias between functions of incompatible types 'int(time_t *)' {aka 'int(long int *)'} and 'time_t(time_t *)' {aka 'long int(long int *)'} [-Werror=attribute-alias] int time(time_t *t) ^~~~ arch/x86/entry/vdso/vclock_gettime.c:318:16: note: aliased declaration here I could not figure out whether this is intentional, but I see that changing it to return time_t avoids the warning. Returning 'int' from time() is also a bit questionable, as it causes an overflow in y2038 even on 64-bit architectures that use a 64-bit time_t type. On 32-bit architecture with 64-bit time_t, time() should always be implement by the C library by calling a (to be added) clock_gettime() variant that takes a sufficiently wide argument. Signed-off-by: Arnd Bergmann Acked-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Mark Rutland Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Vitaly Kuznetsov Link: http://lkml.kernel.org/r/20171204150203.852959-1-arnd@arndb.de Signed-off-by: Ingo Molnar arch/x86/entry/vdso/vclock_gettime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db8f884ca7fe6af64d443d1510464efe23826131 Merge: ae64f9b e60bb46b Author: Dave Airlie Date: Thu Dec 7 06:27:13 2017 +1000 Merge branch 'drm-fixes-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-fixes ttm and license fixes * 'drm-fixes-4.15' of git://people.freedesktop.org/~agd5f/linux: drm/ttm: swap consecutive allocated pooled pages v4 drm/ttm: swap consecutive allocated cached pages v3 drm/ttm: roundup the shrink request to prevent skip huge pool drm/ttm: add page order support in ttm_pages_put drm/ttm: add set_pages_wb for handling page order more than zero drm/ttm: add page order in page pool drm/ttm: use NUM_PAGES_TO_ALLOC always drm/amdgpu: add license to files where it was missing drm/amdgpu: add license to Makefiles commit cc10f8712bd688543602f3f3d052b13be4095695 Author: Joe Perches Date: Tue Dec 5 22:40:25 2017 -0800 xen-netback: Fix logging message with spurious period after newline Using a period after a newline causes bad output. Signed-off-by: Joe Perches Reviewed-by: Paul Durrant Signed-off-by: David S. Miller drivers/net/xen-netback/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 134059fd2775be79e26c2dff87d25cc2f6ea5626 Author: Florian Westphal Date: Wed Dec 6 01:04:50 2017 +0100 net: thunderx: Fix TCP/UDP checksum offload for IPv4 pkts Offload IP header checksum to NIC. This fixes a previous patch which disabled checksum offloading for both IPv4 and IPv6 packets. So L3 checksum offload was getting disabled for IPv4 pkts. And HW is dropping these pkts for some reason. Without this patch, IPv4 TSO appears to be broken: WIthout this patch I get ~16kbyte/s, with patch close to 2mbyte/s when copying files via scp from test box to my home workstation. Looking at tcpdump on sender it looks like hardware drops IPv4 TSO skbs. This patch restores performance for me, ipv6 looks good too. Fixes: fa6d7cb5d76c ("net: thunderx: Fix TCP/UDP checksum offload for IPv6 pkts") Cc: Sunil Goutham Cc: Aleksey Makarov Cc: Eric Dumazet Signed-off-by: Florian Westphal Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 2 ++ 1 file changed, 2 insertions(+) commit fcf38cdf332a81b20a59e3ebaea81f6b316bbe0c Author: Omar Sandoval Date: Tue Dec 5 22:57:43 2017 -0800 kyber: fix another domain token wait queue hang Commit 8cf466602028 ("kyber: fix hang on domain token wait queue") fixed a hang caused by leaving wait entries on the domain token wait queue after the __sbitmap_queue_get() retry succeeded, making that wait entry a "dud" which won't in turn wake more entries up. However, we can also get a dud entry if kyber_get_domain_token() fails once but is then called again and succeeds. This can happen if the hardware queue is rerun for some other reason, or, more likely, kyber_dispatch_request() tries the same domain twice. The fix is to remove our entry from the wait queue whenever we successfully get a token. The only complication is that we might be on one of many wait queues in the struct sbitmap_queue, but that's easily fixed by remembering which wait queue we were put on. While we're here, only initialize the wait queue entry once instead of on every wait, and use spin_lock_irq() instead of spin_lock_irqsave(), since this is always called from process context with irqs enabled. Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/kyber-iosched.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) commit cb968afc789821cdf9e17e79ef08ab90e5bae0f2 Author: Dave Martin Date: Wed Dec 6 16:45:47 2017 +0000 arm64/sve: Avoid dereference of dead task_struct in KVM guest entry When deciding whether to invalidate FPSIMD state cached in the cpu, the backend function sve_flush_cpu_state() attempts to dereference __this_cpu_read(fpsimd_last_state). However, this is not safe: there is no guarantee that this task_struct pointer is still valid, because the task could have exited in the meantime. This means that we need another means to get the appropriate value of TIF_SVE for the associated task. This patch solves this issue by adding a cached copy of the TIF_SVE flag in fpsimd_last_state, which we can check without dereferencing the task pointer. In particular, although this patch is not a KVM fix per se, this means that this check is now done safely in the KVM world switch path (which is currently the only user of this code). Signed-off-by: Dave Martin Cc: Ard Biesheuvel Cc: Christoffer Dall Cc: Marc Zyngier Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit e56d565d67ae7dd6b25ce6a331c43e691ff1d247 Merge: f9efc94 29a90b7 Author: Linus Torvalds Date: Wed Dec 6 10:53:02 2017 -0800 Merge tag 'iommu-v4.15-rc3' of git://github.com/awilliam/linux-vfio Pull IOMMU fix from Alex Williamson: "Fix VT-d handling of scatterlists where sg->offset exceeds PAGE_SIZE" * tag 'iommu-v4.15-rc3' of git://github.com/awilliam/linux-vfio: iommu/vt-d: Fix scatterlist offset handling commit f9efc944474742ad952c15c092a901d88ed83c71 Merge: 328b4ed 362bca5 Author: Linus Torvalds Date: Wed Dec 6 10:49:14 2017 -0800 Merge tag 'sound-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "All fixes are small and for stable: - a PCM ioctl race fix - yet another USB-audio hardening for malicious descriptors - Realtek ALC257 codec support" * tag 'sound-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: pcm: prevent UAF in snd_pcm_info ALSA: hda/realtek - New codec support for ALC257 ALSA: usb-audio: Add check return value for usb_string() ALSA: usb-audio: Fix out-of-bound error ALSA: seq: Remove spurious WARN_ON() at timer check commit 5702591fc6a3f409f460def104ee149330dac82d Author: Aurelien Aptel Date: Tue Nov 21 14:47:56 2017 +0100 CIFS: don't log STATUS_NOT_FOUND errors for DFS cifs.ko makes DFS queries regardless of the type of the server and non-DFS servers are common. This often results in superfluous logging of non-critical errors. Signed-off-by: Aurelien Aptel Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg fs/cifs/smb2ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a821df3f1af72aa6a0d573eea94a7dd2613e9f4e Author: Ronnie Sahlberg Date: Tue Nov 21 09:36:33 2017 +1100 cifs: fix NULL deref in SMB2_read Signed-off-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky CC: Stable Signed-off-by: Steve French fs/cifs/smb2pdu.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit d553d03f705721fbbfe3ca1c981812d3e488217e Author: Colin Ian King Date: Wed Dec 6 17:33:58 2017 +0000 x86: Fix Sparse warnings about non-static functions Functions x86_vector_debug_show(), uv_handle_nmi() and uv_nmi_setup_common() are local to the source and do not need to be in global scope, so make them static. Fixes up various sparse warnings. Signed-off-by: Colin Ian King Acked-by: Mike Travis Cc: H. Peter Anvin Cc: Jiri Kosina Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russ Anderson Cc: Thomas Gleixner Cc: kernel-janitors@vger.kernel.org Cc: travis@sgi.com Link: http://lkml.kernel.org/r/20171206173358.24388-1-colin.king@canonical.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/vector.c | 4 ++-- arch/x86/platform/uv/uv_nmi.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0b02e448a2ebb46eb9be4f1bdfc87112bd420cbf Author: Dave Young Date: Wed Dec 6 09:50:10 2017 +0000 efi: Add comment to avoid future expanding of sysfs systab /sys/firmware/efi/systab shows several different values, it breaks sysfs one file one value design. But since there are already userspace tools depend on it eg. kexec-tools so add code comment to alert future expanding of this file. Signed-off-by: Dave Young Signed-off-by: Ard Biesheuvel Reviewed-by: Greg Kroah-Hartman Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20171206095010.24170-4-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/efi.c | 2 ++ 1 file changed, 2 insertions(+) commit 89c5a2d34bda58319e3075e8e7dd727ea25a435c Author: Pan Bian Date: Wed Dec 6 09:50:09 2017 +0000 efi/esrt: Use memunmap() instead of kfree() to free the remapping The remapping result of memremap() should be freed with memunmap(), not kfree(). Signed-off-by: Pan Bian Signed-off-by: Ard Biesheuvel Cc: Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20171206095010.24170-3-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/esrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af97a77bc01ce49a466f9d4c0125479e2e2230b6 Author: Greg Kroah-Hartman Date: Wed Dec 6 09:50:08 2017 +0000 efi: Move some sysfs files to be read-only by root Thanks to the scripts/leaking_addresses.pl script, it was found that some EFI values should not be readable by non-root users. So make them root-only, and to do that, add a __ATTR_RO_MODE() macro to make this easier, and use it in other places at the same time. Reported-by: Linus Torvalds Tested-by: Dave Young Signed-off-by: Greg Kroah-Hartman Signed-off-by: Ard Biesheuvel Cc: H. Peter Anvin Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Cc: stable Link: http://lkml.kernel.org/r/20171206095010.24170-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar drivers/firmware/efi/efi.c | 3 +-- drivers/firmware/efi/esrt.c | 15 ++++++--------- drivers/firmware/efi/runtime-map.c | 10 +++++----- include/linux/sysfs.h | 6 ++++++ 4 files changed, 18 insertions(+), 16 deletions(-) commit a4c3c04974d648ee6e1a09ef4131eb32a02ab494 Author: Vincent Guittot Date: Thu Nov 16 15:21:52 2017 +0100 sched/fair: Update and fix the runnable propagation rule Unlike running, the runnable part can't be directly propagated through the hierarchy when we migrate a task. The main reason is that runnable time can be shared with other sched_entities that stay on the rq and this runnable time will also remain on prev cfs_rq and must not be removed. Instead, we can estimate what should be the new runnable of the prev cfs_rq and check that this estimation stay in a possible range. The prop_runnable_sum is a good estimation when adding runnable_sum but fails most often when we remove it. Instead, we could use the formula below instead: gcfs_rq's runnable_sum = gcfs_rq->avg.load_sum / gcfs_rq->load.weight which assumes that tasks are equally runnable which is not true but easy to compute. Beside these estimates, we have several simple rules that help us to filter out wrong ones: - ge->avg.runnable_sum <= than LOAD_AVG_MAX - ge->avg.runnable_sum >= ge->avg.running_sum (ge->avg.util_sum << LOAD_AVG_MAX) - ge->avg.runnable_sum can't increase when we detach a task The effect of these fixes is better cgroups balancing. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Cc: Ben Segall Cc: Chris Mason Cc: Dietmar Eggemann Cc: Josef Bacik Cc: Linus Torvalds Cc: Mike Galbraith Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Tejun Heo Cc: Thomas Gleixner Cc: Yuyang Du Link: http://lkml.kernel.org/r/1510842112-21028-1-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar kernel/sched/fair.c | 102 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 73 insertions(+), 29 deletions(-) commit c6b9d9a33029014446bd9ed84c1688f6d3d4eab9 Author: Omar Sandoval Date: Tue Dec 5 23:15:31 2017 -0800 sched/wait: Fix add_wait_queue() behavioral change The following cleanup commit: 50816c48997a ("sched/wait: Standardize internal naming of wait-queue entries") ... unintentionally changed the behavior of add_wait_queue() from inserting the wait entry at the head of the wait queue to the tail of the wait queue. Beyond a negative performance impact this change in behavior theoretically also breaks wait queues which mix exclusive and non-exclusive waiters, as non-exclusive waiters will not be woken up if they are queued behind enough exclusive waiters. Signed-off-by: Omar Sandoval Reviewed-by: Jens Axboe Acked-by: Peter Zijlstra Cc: Linus Torvalds Cc: Thomas Gleixner Cc: kernel-team@fb.com Fixes: ("sched/wait: Standardize internal naming of wait-queue entries") Link: http://lkml.kernel.org/r/a16c8ccffd39bd08fdaa45a5192294c784b803a7.1512544324.git.osandov@fb.com Signed-off-by: Ingo Molnar kernel/sched/wait.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e351ad106997e06b2dc3da9c6b939b95f67fb88 Author: Peter Zijlstra Date: Wed Dec 6 17:32:47 2017 +0100 locking/lockdep: Fix possible NULL deref We can't invalidate xhlocks when we've not yet allocated any. Reported-by: Dmitry Vyukov Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Fixes: f52be5708076 ("locking/lockdep: Untangle xhlock history save/restore from task independence") Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5b1ead6800cb2241aeadcba32736c5836e59c7e1 Author: Brendan Jackman Date: Wed Dec 6 10:59:11 2017 +0000 cpu/hotplug: Fix state name in takedown_cpu() comment CPUHP_AP_SCHED_MIGRATE_DYING doesn't exist, it looks like this was supposed to refer to CPUHP_AP_SCHED_STARTING's teardown callback, i.e. sched_cpu_dying(). Signed-off-by: Brendan Jackman Cc: Boris Ostrovsky Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Quentin Perret Cc: Sebastian Andrzej Siewior Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171206105911.28093-1-brendan.jackman@arm.com Signed-off-by: Ingo Molnar kernel/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d96cc49bff5a7735576cc6f6f111f875d101cec8 Author: Will Deacon Date: Wed Dec 6 10:51:12 2017 +0000 arm64: SW PAN: Update saved ttbr0 value on enter_lazy_tlb enter_lazy_tlb is called when a kernel thread rides on the back of another mm, due to a context switch or an explicit call to unuse_mm where a call to switch_mm is elided. In these cases, it's important to keep the saved ttbr value up to date with the active mm, otherwise we can end up with a stale value which points to a potentially freed page table. This patch implements enter_lazy_tlb for arm64, so that the saved ttbr0 is kept up-to-date with the active mm for kernel threads. Cc: Mark Rutland Cc: Ard Biesheuvel Cc: Vinayak Menon Cc: Fixes: 39bc88e5e38e9b21 ("arm64: Disable TTBR0_EL1 during normal kernel execution") Reviewed-by: Catalin Marinas Reviewed-by: Mark Rutland Reported-by: Vinayak Menon Signed-off-by: Will Deacon arch/arm64/include/asm/mmu_context.h | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 0adbdfde8cfc9415aeed2a4955d2d17b3bd9bf13 Author: Will Deacon Date: Wed Dec 6 10:42:10 2017 +0000 arm64: SW PAN: Point saved ttbr0 at the zero page when switching to init_mm update_saved_ttbr0 mandates that mm->pgd is not swapper, since swapper contains kernel mappings and should never be installed into ttbr0. However, this means that callers must avoid passing the init_mm to update_saved_ttbr0 which in turn can cause the saved ttbr0 value to be out-of-date in the context of the idle thread. For example, EFI runtime services may leave the saved ttbr0 pointing at the EFI page table, and kernel threads may end up with stale references to freed page tables. This patch changes update_saved_ttbr0 so that the init_mm points the saved ttbr0 value to the empty zero page, which always exists and never contains valid translations. EFI and switch can then call into update_saved_ttbr0 unconditionally. Cc: Mark Rutland Cc: Ard Biesheuvel Cc: Vinayak Menon Cc: Fixes: 39bc88e5e38e9b21 ("arm64: Disable TTBR0_EL1 during normal kernel execution") Reviewed-by: Catalin Marinas Reviewed-by: Mark Rutland Reported-by: Vinayak Menon Signed-off-by: Will Deacon arch/arm64/include/asm/efi.h | 4 +--- arch/arm64/include/asm/mmu_context.h | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) commit 8884b7bd7e52de20a801c5f457954ed212c0f625 Author: Dave Martin Date: Wed Dec 6 16:45:46 2017 +0000 arm64: fpsimd: Abstract out binding of task's fpsimd context to the cpu. There is currently some duplicate logic to associate current's FPSIMD context with the cpu when loading FPSIMD state into the cpu regs. Subsequent patches will update that logic, so in order to ensure it only needs to be done in one place, this patch factors the relevant code out into a new function fpsimd_bind_to_cpu(). Signed-off-by: Dave Martin Reviewed-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 071b6d4a5d343046f253a5a8835d477d93992002 Author: Dave Martin Date: Tue Dec 5 14:56:42 2017 +0000 arm64: fpsimd: Prevent registers leaking from dead tasks Currently, loading of a task's fpsimd state into the CPU registers is skipped if that task's state is already present in the registers of that CPU. However, the code relies on the struct fpsimd_state * (and by extension struct task_struct *) to unambiguously identify a task. There is a particular case in which this doesn't work reliably: when a task exits, its task_struct may be recycled to describe a new task. Consider the following scenario: 1) Task P loads its fpsimd state onto cpu C. per_cpu(fpsimd_last_state, C) := P; P->thread.fpsimd_state.cpu := C; 2) Task X is scheduled onto C and loads its fpsimd state on C. per_cpu(fpsimd_last_state, C) := X; X->thread.fpsimd_state.cpu := C; 3) X exits, causing X's task_struct to be freed. 4) P forks a new child T, which obtains X's recycled task_struct. T == X. T->thread.fpsimd_state.cpu == C (inherited from P). 5) T is scheduled on C. T's fpsimd state is not loaded, because per_cpu(fpsimd_last_state, C) == T (== X) && T->thread.fpsimd_state.cpu == C. (This is the check performed by fpsimd_thread_switch().) So, T gets X's registers because the last registers loaded onto C were those of X, in (2). This patch fixes the problem by ensuring that the sched-in check fails in (5): fpsimd_flush_task_state(T) is called when T is forked, so that T->thread.fpsimd_state.cpu == C cannot be true. This relies on the fact that T is not schedulable until after copy_thread() completes. Once T's fpsimd state has been loaded on some CPU C there may still be other cpus D for which per_cpu(fpsimd_last_state, D) == &X->thread.fpsimd_state. But D is necessarily != C in this case, and the check in (5) must fail. An alternative fix would be to do refcounting on task_struct. This would result in each CPU holding a reference to the last task whose fpsimd state was loaded there. It's not clear whether this is preferable, and it involves higher overhead than the fix proposed in this patch. It would also move all the task_struct freeing work into the context switch critical section, or otherwise some deferred cleanup mechanism would need to be introduced, neither of which seems obviously justified. Cc: Fixes: 005f78cd8849 ("arm64: defer reloading a task's FPSIMD state to userland resume") Signed-off-by: Dave Martin Reviewed-by: Ard Biesheuvel [will: word-smithed the comment so it makes more sense] Signed-off-by: Will Deacon arch/arm64/kernel/process.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit e02b03303f13b6a571f01b4d84b69440696d2dde Author: Guneshwor Singh Date: Wed Dec 6 16:34:04 2017 +0530 ASoC: Intel: Skylake: Do not check dev_type for dmic link type Some BIOS have inconsistent dev_type value for DMIC link type. Since there is only one device type for DMIC link type, remove device type check if link type is NHLT_LINK_DMIC. Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-nhlt.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit c7b92172a61b91936be985cb9bc499a4ebc6489b Author: Stefan Potyra Date: Wed Dec 6 16:03:24 2017 +0100 ASoC: rockchip: disable clock on error Disable the clocks in rk_spdif_probe when an error occurs after one of the clocks has been enabled previously. Found by Linux Driver Verification project (linuxtesting.org). Fixes: f874b80e1571 ASoC: rockchip: Add rockchip SPDIF transceiver driver Signed-off-by: Stefan Potyra Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_spdif.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit b1394e745b9453dcb5b0671c205b770e87dedb87 Author: Radim Krčmář Date: Thu Nov 30 19:05:45 2017 +0100 KVM: x86: fix APIC page invalidation Implementation of the unpinned APIC page didn't update the VMCS address cache when invalidation was done through range mmu notifiers. This became a problem when the page notifier was removed. Re-introduce the arch-specific helper and call it from ...range_start. Reported-by: Fabian Grünbichler Fixes: 38b9917350cb ("kvm: vmx: Implement set_apic_access_page_addr") Fixes: 369ea8242c0f ("mm/rmap: update to new mmu_notifier semantic v2") Cc: Reviewed-by: Paolo Bonzini Reviewed-by: Andrea Arcangeli Tested-by: Wanpeng Li Tested-by: Fabian Grünbichler Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_host.h | 3 +++ arch/x86/kvm/x86.c | 14 ++++++++++++++ virt/kvm/kvm_main.c | 8 ++++++++ 3 files changed, 25 insertions(+) commit d29899a30f987de46bcdab3ca4513de2479629e5 Merge: 2895db6 ca76ec9 Author: Radim Krčmář Date: Wed Dec 6 15:55:44 2017 +0100 Merge tag 'kvm-s390-master-4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux KVM: s390: Fixes for 4.15 - SPDX tags - Fence storage key accesses from problem state - Make sure that irq_state.flags is not used in the future commit 202fc673c626e4ffe6b888c469b248ecc6d50265 Author: Marcus Wolf Date: Wed Nov 8 19:13:56 2017 +0200 staging: pi433: Fixes issue with bit shift in rf69_get_modulation Fixes issue with bit shift in rf69_get_modulation Signed-off-by: Marcus Wolf Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/rf69.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aece09024414b54158e03aa45f4a4436e7cb996c Author: Dan Carpenter Date: Tue Dec 5 17:37:17 2017 +0300 staging: ccree: Uninitialized return in ssi_ahash_import() The return value isn't initialized on some success paths. Fixes: c5f39d07860c ("staging: ccree: fix leak of import() after init()") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ab134ca3151c55b6fc606857e71d9adb4c355d1 Author: Dan Carpenter Date: Tue Dec 5 17:38:54 2017 +0300 xen/pvcalls: Fix a check in pvcalls_front_remove() bedata->ref can't be less than zero because it's unsigned. This affects certain error paths in probe. We first set ->ref = -1 and then we set it to a valid value later. Fixes: 219681909913 ("xen/pvcalls: connect to the backend") Signed-off-by: Dan Carpenter Reviewed-by: Juergen Gross Reviewed-by: Stefano Stabellini Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c71fa88f7778eb093ee22cba13a3813a82113ad Author: Dan Carpenter Date: Tue Dec 5 17:38:43 2017 +0300 xen/pvcalls: check for xenbus_read() errors Smatch complains that "len" is uninitialized if xenbus_read() fails so let's add some error handling. Signed-off-by: Dan Carpenter Reviewed-by: Juergen Gross Reviewed-by: Stefano Stabellini Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 2 ++ 1 file changed, 2 insertions(+) commit e60bb46b5754727c7643cc5bb7b005c49f869930 Author: Christian König Date: Mon Dec 4 11:26:14 2017 +0100 drm/ttm: swap consecutive allocated pooled pages v4 When we detect consecutive allocation of pages swap them to avoid accidentally freeing them as huge page. v2: use swap v3: check if it's really the first allocated page v4: don't touch the loop variable Signed-off-by: Christian König Reviewed-by: Roger He Reviewed-by: Michel Dänzer Tested-by: Dieter Nützel Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit d8104182087319fd753d6d8e0afcd95d84c2aa2f Author: Michael Ellerman Date: Wed Dec 6 23:23:28 2017 +1100 powerpc/xmon: Don't print hashed pointers in xmon Since commit ad67b74d2469 ("printk: hash addresses printed with %p") pointers printed with %p are hashed, ie. you don't see the actual pointer value but rather a cryptographic hash of its value. In xmon we want to see the actual pointer values, because xmon is a debugger, so replace %p with %px which prints the actual pointer value. We justify doing this in xmon because 1) xmon is a kernel crash debugger, it's only accessible via the console 2) xmon doesn't print to dmesg, so the pointers it prints are not able to be leaked that way. Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4f7f5551a760eb0124267be65763008169db7087 Author: Masamitsu Yamazaki Date: Wed Nov 15 07:33:14 2017 +0000 ipmi: Stop timers before cleaning up the module System may crash after unloading ipmi_si.ko module because a timer may remain and fire after the module cleaned up resources. cleanup_one_si() contains the following processing. /* * Make sure that interrupts, the timer and the thread are * stopped and will not run again. */ if (to_clean->irq_cleanup) to_clean->irq_cleanup(to_clean); wait_for_timer_and_thread(to_clean); /* * Timeouts are stopped, now make sure the interrupts are off * in the BMC. Note that timers and CPU interrupts are off, * so no need for locks. */ while (to_clean->curr_msg || (to_clean->si_state != SI_NORMAL)) { poll(to_clean); schedule_timeout_uninterruptible(1); } si_state changes as following in the while loop calling poll(to_clean). SI_GETTING_MESSAGES => SI_CHECKING_ENABLES => SI_SETTING_ENABLES => SI_GETTING_EVENTS => SI_NORMAL As written in the code comments above, timers are expected to stop before the polling loop and not to run again. But the timer is set again in the following process when si_state becomes SI_SETTING_ENABLES. => poll => smi_event_handler => handle_transaction_done // smi_info->si_state == SI_SETTING_ENABLES => start_getting_events => start_new_msg => smi_mod_timer => mod_timer As a result, before the timer set in start_new_msg() expires, the polling loop may see si_state becoming SI_NORMAL and the module clean-up finishes. For example, hard LOCKUP and panic occurred as following. smi_timeout was called after smi_event_handler, kcs_event and hangs at port_inb() trying to access I/O port after release. [exception RIP: port_inb+19] RIP: ffffffffc0473053 RSP: ffff88069fdc3d80 RFLAGS: 00000006 RAX: ffff8806800f8e00 RBX: ffff880682bd9400 RCX: 0000000000000000 RDX: 0000000000000ca3 RSI: 0000000000000ca3 RDI: ffff8806800f8e40 RBP: ffff88069fdc3d80 R8: ffffffff81d86dfc R9: ffffffff81e36426 R10: 00000000000509f0 R11: 0000000000100000 R12: 0000000000]:000000 R13: 0000000000000000 R14: 0000000000000246 R15: ffff8806800f8e00 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0000 --- --- To fix the problem I defined a flag, timer_can_start, as member of struct smi_info. The flag is enabled immediately after initializing the timer and disabled immediately before waiting for timer deletion. Fixes: 0cfec916e86d ("ipmi: Start the timer and thread on internal msgs") Signed-off-by: Yamazaki Masamitsu [Adjusted for recent changes in the driver.] Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 44 +++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 21 deletions(-) commit cfe17c9bbe6a673fdafdab179c32b355ed447f66 Author: Masahiro Yamada Date: Mon Nov 27 21:15:13 2017 +0900 kbuild: move cc-option and cc-disable-warning after incl. arch Makefile Geert reported commit ae6b289a3789 ("kbuild: Set KBUILD_CFLAGS before incl. arch Makefile") broke cross-compilation using a cross-compiler that supports less compiler options than the host compiler. For example, cc1: error: unrecognized command line option "-Wno-unused-but-set-variable" This problem happens on architectures that setup CROSS_COMPILE in their arch/*/Makefile. Move the cc-option and cc-disable-warning back to the original position, but keep the Clang target options untouched. Fixes: ae6b289a3789 ("kbuild: Set KBUILD_CFLAGS before incl. arch Makefile") Reported-by: Geert Uytterhoeven Signed-off-by: Masahiro Yamada Tested-by: Geert Uytterhoeven Makefile | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) commit 371b80447ff33ddac392c189cf884a5a3e18faeb Author: Nicholas Piggin Date: Wed Dec 6 18:21:14 2017 +1000 powerpc/64s: Initialize ISAv3 MMU registers before setting partition table kexec can leave MMU registers set when booting into a new kernel, the PIDR (Process Identification Register) in particular. The boot sequence does not zero PIDR, so it only gets set when CPUs first switch to a userspace processes (until then it's running a kernel thread with effective PID = 0). This leaves a window where a process table entry and page tables are set up due to user processes running on other CPUs, that happen to match with a stale PID. The CPU with that PID may cause speculative accesses that address quadrant 0 (aka userspace addresses), which will result in cached translations and PWC (Page Walk Cache) for that process, on a CPU which is not in the mm_cpumask and so they will not be invalidated properly. The most common result is the kernel hanging in infinite page fault loops soon after kexec (usually in schedule_tail, which is usually the first non-speculative quadrant 0 access to a new PID) due to a stale PWC. However being a stale translation error, it could result in anything up to security and data corruption problems. Fix this by zeroing out PIDR at boot and kexec. Fixes: 7e381c0ff618 ("powerpc/mm/radix: Add mmu context handling callback for radix") Cc: stable@vger.kernel.org # v4.7+ Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/cpu_setup_power.S | 2 ++ 1 file changed, 2 insertions(+) commit 5b06bbcfc2c621da3009da8decb7511500c293ed Author: Andy Lutomirski Date: Thu Nov 30 07:57:57 2017 -0800 x86/power: Fix some ordering bugs in __restore_processor_context() __restore_processor_context() had a couple of ordering bugs. It restored GSBASE after calling load_gs_index(), and the latter can call into tracing code. It also tried to restore segment registers before restoring the LDT, which is straight-up wrong. Reorder the code so that we restore GSBASE, then the descriptor tables, then the segments. This fixes two bugs. First, it fixes a regression that broke resume under certain configurations due to irqflag tracing in native_load_gs_index(). Second, it fixes resume when the userspace process that initiated suspect had funny segments. The latter can be reproduced by compiling this: // SPDX-License-Identifier: GPL-2.0 /* * ldt_echo.c - Echo argv[1] while using an LDT segment */ int main(int argc, char **argv) { int ret; size_t len; char *buf; const struct user_desc desc = { .entry_number = 0, .base_addr = 0, .limit = 0xfffff, .seg_32bit = 1, .contents = 0, /* Data, grow-up */ .read_exec_only = 0, .limit_in_pages = 1, .seg_not_present = 0, .useable = 0 }; if (argc != 2) errx(1, "Usage: %s STRING", argv[0]); len = asprintf(&buf, "%s\n", argv[1]); if (len < 0) errx(1, "Out of memory"); ret = syscall(SYS_modify_ldt, 1, &desc, sizeof(desc)); if (ret < -1) errno = -ret; if (ret) err(1, "modify_ldt"); asm volatile ("movw %0, %%es" :: "rm" ((unsigned short)7)); write(1, buf, len); return 0; } and running ldt_echo >/sys/power/mem Without the fix, the latter causes a triple fault on resume. Fixes: ca37e57bbe0c ("x86/entry/64: Add missing irqflags tracing to native_load_gs_index()") Reported-by: Jarkko Nikula Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Tested-by: Jarkko Nikula Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Linus Torvalds Link: https://lkml.kernel.org/r/6b31721ea92f51ea839e79bd97ade4a75b1eeea2.1512057304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/power/cpu.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit ddec3bdee05b06f1dda20ded003c3e10e4184cab Author: Rafael J. Wysocki Date: Fri Dec 1 15:08:12 2017 +0100 x86/PCI: Make broadcom_postcore_init() check acpi_disabled acpi_os_get_root_pointer() may return a valid address even if acpi_disabled is set, but the host bridge information from the ACPI tables is not going to be used in that case and the Broadcom host bridge initialization should not be skipped then, So make broadcom_postcore_init() check acpi_disabled too to avoid this issue. Fixes: 6361d72b04d1 (x86/PCI: read Broadcom CNB20LE host bridge info before PCI scan) Reported-by: Dave Hansen Signed-off-by: Rafael J. Wysocki Signed-off-by: Thomas Gleixner Cc: Bjorn Helgaas Cc: Linux PCI Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/3186627.pxZj1QbYNg@aspire.rjw.lan Signed-off-by: Ingo Molnar arch/x86/pci/broadcom_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4e9b7af0cd58dd039a0fb2cd67d57cea4889abf Author: Tom Lendacky Date: Thu Nov 30 16:46:40 2017 -0600 x86/microcode/AMD: Add support for fam17h microcode loading The size for the Microcode Patch Block (MPB) for an AMD family 17h processor is 3200 bytes. Add a #define for fam17h so that it does not default to 2048 bytes and fail a microcode load/update. Signed-off-by: Tom Lendacky Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20171130224640.15391.40247.stgit@tlendack-t1.amdoffice.net Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/microcode/amd.c | 4 ++++ 1 file changed, 4 insertions(+) commit e3811a3f74bd1ad773667b78323f396166891f3a Author: Rudolf Marek Date: Tue Nov 28 22:01:06 2017 +0100 x86/cpufeatures: Make X86_BUG_FXSAVE_LEAK detectable in CPUID on AMD The latest AMD AMD64 Architecture Programmer's Manual adds a CPUID feature XSaveErPtr (CPUID_Fn80000008_EBX[2]). If this feature is set, the FXSAVE, XSAVE, FXSAVEOPT, XSAVEC, XSAVES / FXRSTOR, XRSTOR, XRSTORS always save/restore error pointers, thus making the X86_BUG_FXSAVE_LEAK workaround obsolete on such CPUs. Signed-off-by: Rudolf Marek Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Tested-by: Borislav Petkov Cc: Andy Lutomirski Link: https://lkml.kernel.org/r/bdcebe90-62c5-1f05-083c-eba7f08b2540@assembler.cz Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/amd.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit 7f6d2ecd3d7acaf205ea7b3e96f9ffc55b92298b Author: David Lechner Date: Sun Dec 3 19:54:41 2017 -0600 eeprom: at24: change nvmem stride to 1 Trying to read the MAC address from an eeprom that has an offset that is not a multiple of 4 causes an error currently. Fix it by changing the nvmem stride to 1. Cc: stable@vger.kernel.org Signed-off-by: David Lechner [Bartosz: tweaked the commit message] Signed-off-by: Bartosz Golaszewski drivers/misc/eeprom/at24.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a703c55004e1c5076d57e43771b3e11117796ea0 Author: Daniel Vetter Date: Mon Dec 4 21:48:18 2017 +0100 drm: safely free connectors from connector_iter In commit 613051dac40da1751ab269572766d3348d45a197 Author: Daniel Vetter Date: Wed Dec 14 00:08:06 2016 +0100 drm: locking&new iterators for connector_list we've went to extreme lengths to make sure connector iterations works in any context, without introducing any additional locking context. This worked, except for a small fumble in the implementation: When we actually race with a concurrent connector unplug event, and our temporary connector reference turns out to be the final one, then everything breaks: We call the connector release function from whatever context we happen to be in, which can be an irq/atomic context. And connector freeing grabs all kinds of locks and stuff. Fix this by creating a specially safe put function for connetor_iter, which (in this rare case) punts the cleanup to a worker. Reported-by: Ben Widawsky Cc: Ben Widawsky Fixes: 613051dac40d ("drm: locking&new iterators for connector_list") Cc: Dave Airlie Cc: Chris Wilson Cc: Sean Paul Cc: # v4.11+ Reviewed-by: Dave Airlie Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171204204818.24745-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_connector.c | 28 ++++++++++++++++++++++++++-- drivers/gpu/drm/drm_mode_config.c | 2 ++ include/drm/drm_connector.h | 8 ++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) commit ca76ec9ca871e67d8cd0b6caba24aca3d3ac4546 Author: Janosch Frank Date: Mon Dec 4 12:19:11 2017 +0100 KVM: s390: Fix skey emulation permission check All skey functions call skey_check_enable at their start, which checks if we are in the PSTATE and injects a privileged operation exception if we are. Unfortunately they continue processing afterwards and perform the operation anyhow as skey_check_enable does not deliver an error if the exception injection was successful. Let's move the PSTATE check into the skey functions and exit them on such an occasion, also we now do not enable skey handling anymore in such a case. Signed-off-by: Janosch Frank Reviewed-by: Christian Borntraeger Fixes: a7e19ab ("KVM: s390: handle missing storage-key facility") Cc: # v4.8+ Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth Signed-off-by: Christian Borntraeger arch/s390/kvm/priv.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit bb64da9aba89765fee74b395967b18a7d6c364e9 Author: Christian Borntraeger Date: Tue Nov 21 16:02:52 2017 +0100 KVM: s390: mark irq_state.flags as non-usable Old kernels did not check for zero in the irq_state.flags field and old QEMUs did not zero the flag/reserved fields when calling KVM_S390_*_IRQ_STATE. Let's add comments to prevent future uses of these fields. Signed-off-by: Christian Borntraeger Reviewed-by: Thomas Huth Reviewed-by: Cornelia Huck Reviewed-by: David Hildenbrand Signed-off-by: Christian Borntraeger Documentation/virtual/kvm/api.txt | 15 ++++++++++++--- arch/s390/kvm/kvm-s390.c | 6 ++++-- include/uapi/linux/kvm.h | 4 ++-- 3 files changed, 18 insertions(+), 7 deletions(-) commit 940f89a5a37789b94f332755767c556a64b004e4 Author: Greg Kroah-Hartman Date: Fri Nov 24 15:00:39 2017 +0100 KVM: s390: Remove redundant license text Now that the SPDX tag is in all arch/s390/kvm/ files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Christian Borntraeger Cc: Cornelia Huck Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: "Paul E. McKenney" Signed-off-by: Greg Kroah-Hartman Message-Id: <20171124140043.10062-9-gregkh@linuxfoundation.org> Acked-by: Cornelia Huck Acked-by: "Paul E. McKenney" Signed-off-by: Christian Borntraeger arch/s390/kvm/Makefile | 4 ---- arch/s390/kvm/diag.c | 4 ---- arch/s390/kvm/gaccess.h | 4 ---- arch/s390/kvm/guestdbg.c | 4 ---- arch/s390/kvm/intercept.c | 4 ---- arch/s390/kvm/interrupt.c | 4 ---- arch/s390/kvm/irq.h | 4 ---- arch/s390/kvm/kvm-s390.c | 4 ---- arch/s390/kvm/kvm-s390.h | 4 ---- arch/s390/kvm/priv.c | 4 ---- arch/s390/kvm/sigp.c | 4 ---- arch/s390/kvm/vsie.c | 4 ---- 12 files changed, 48 deletions(-) commit d809aa238744ae5b7520b73ac5411862ccfdc1bc Author: Greg Kroah-Hartman Date: Fri Nov 24 15:00:33 2017 +0100 KVM: s390: add SPDX identifiers to the remaining files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the arch/s390/kvm/ files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Christian Borntraeger Cc: Cornelia Huck Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Message-Id: <20171124140043.10062-3-gregkh@linuxfoundation.org> Acked-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/kvm/Makefile | 1 + arch/s390/kvm/diag.c | 1 + arch/s390/kvm/gaccess.h | 1 + arch/s390/kvm/guestdbg.c | 1 + arch/s390/kvm/intercept.c | 1 + arch/s390/kvm/interrupt.c | 1 + arch/s390/kvm/irq.h | 1 + arch/s390/kvm/kvm-s390.c | 1 + arch/s390/kvm/kvm-s390.h | 1 + arch/s390/kvm/priv.c | 1 + arch/s390/kvm/sigp.c | 1 + arch/s390/kvm/vsie.c | 1 + 12 files changed, 12 insertions(+) commit 916a27901de01446bcf57ecca4783f6cff493309 Author: Kevin Cernekee Date: Tue Dec 5 15:42:41 2017 -0800 netfilter: xt_osf: Add missing permission checks The capability check in nfnetlink_rcv() verifies that the caller has CAP_NET_ADMIN in the namespace that "owns" the netlink socket. However, xt_osf_fingers is shared by all net namespaces on the system. An unprivileged user can create user and net namespaces in which he holds CAP_NET_ADMIN to bypass the netlink_net_capable() check: vpnns -- nfnl_osf -f /tmp/pf.os vpnns -- nfnl_osf -f /tmp/pf.os -d These non-root operations successfully modify the systemwide OS fingerprint list. Add new capable() checks so that they can't. Signed-off-by: Kevin Cernekee Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_osf.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 715a12334764657bafb3ab964fb25f4e6115c770 Author: Johannes Berg Date: Tue Dec 5 11:59:33 2017 +0100 wireless: don't write C files on failures Change the scripting inside the shipped/extra certs C code generation to not write the file when there are any failures. That way, if the build aborts due to failures, we don't get into a situation where a dummy file has been created and the next build succeeds, but not with the desired output. Fixes: 90a53e4432b1 ("cfg80211: implement regdb signature checking") Signed-off-by: Johannes Berg net/wireless/Makefile | 48 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 10 deletions(-) commit 71334963d01ed7ec61a958a5a6585172793f5a24 Author: Johannes Berg Date: Tue Dec 5 11:27:59 2017 +0100 wireless: replace usage of hexdump with od/sed Since od/sed are in posix, hopefully there's a better chance people will have them, over hexdump. Fixes: 90a53e4432b1 ("cfg80211: implement regdb signature checking") Signed-off-by: Johannes Berg net/wireless/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 11474e9091cf2002e948647fd9f63a7f027e488a Author: Zhenyu Wang Date: Mon Dec 4 10:42:58 2017 +0800 drm/i915/gvt: set max priority for gvt context This is to workaround guest driver hang regression after preemption enable that gvt hasn't enabled handling of that for guest workload. So in effect this disables preemption for gvt context now. Signed-off-by: Zhenyu Wang (cherry picked from commit 1603660b3342269c95fcafee1945790342a8c28e) drivers/gpu/drm/i915/gvt/scheduler.c | 3 +++ 1 file changed, 3 insertions(+) commit ac7688c0397442f1c9eef7069737089660322497 Author: Zhenyu Wang Date: Fri Dec 1 14:59:53 2017 +0800 drm/i915/gvt: Don't mark vgpu context as inactive when preempted We shouldn't mark inactive for vGPU context if preempted, which would still be re-scheduled later. So keep active state. Fixes: d6c0511300dc ("drm/i915/execlists: Distinguish the incomplete context notifies") Signed-off-by: Zhenyu Wang (cherry picked from commit da5f99eaccc10e30bf82eb02b1be74703b878720) drivers/gpu/drm/i915/gvt/scheduler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 29f9e425973d3c7cdfc32725a4d7c4c2f537d5a9 Author: Xiong Zhang Date: Tue Nov 7 05:23:02 2017 +0800 drm/i915/gvt: Limit read hw reg to active vgpu mmio_read_from_hw() let vgpu could read hw reg, if vgpu's workload is running on hw, things is good. Otherwise vgpu will get other vgpu's reg val, it is unsafe. This patch limit such hw access to active vgpu. If vgpu isn't running on hw, the reg read of this vgpu will get the last active val which saved at schedule_out. v2: ring timestamp is walking continuously even if the ring is idle. so read hw directly. (Zhenyu) Signed-off-by: Xiong Zhang Signed-off-by: Zhenyu Wang (cherry picked from commit 295764cd2ff41e2c1bc8af4050de77cec5e7a1c0) drivers/gpu/drm/i915/gvt/handlers.c | 26 ++++++++++++++++++++++---- drivers/gpu/drm/i915/gvt/scheduler.c | 15 +++++++++++++++ 2 files changed, 37 insertions(+), 4 deletions(-) commit 365ad5df9caa1a7ebc73b8d70ab94bbf6a74268a Author: Zhi Wang Date: Sat Sep 30 17:42:20 2017 +0800 drm/i915/gvt: Export intel_gvt_render_mmio_to_ring_id() Since many emulation logic needs to convert the offset of ring registers into ring id, we export it for other caller which might need it. Signed-off-by: Zhi Wang (cherry picked from commit 62a6a53786fc4b4e7543cc63b704dbb3f7df4c0f) drivers/gpu/drm/i915/gvt/handlers.c | 21 +++++++++++++++------ drivers/gpu/drm/i915/gvt/mmio.h | 2 ++ 2 files changed, 17 insertions(+), 6 deletions(-) commit add7e4fc2420e35f200e4aa13764708e62690e2e Author: Changbin Du Date: Thu Nov 2 13:33:42 2017 +0800 drm/i915/gvt: Emulate PCI expansion ROM base address register Our vGPU doesn't have a device ROM, we need follow the PCI spec to report this info to drivers. Otherwise, we would see below errors. Inspecting possible rom at 0xfe049000 (vd=8086:1912 bdf=00:10.0) qemu-system-x86_64: vfio-pci: Cannot read device rom at 00000000-0000-0000-0000-000000000001 Device option ROM contents are probably invalid (check dmesg). Skip option ROM probe with rombar=0, or load from file with romfile=No option rom signature (got 4860) I will also send a improvement patch to PCI subsystem related to PCI ROM. But no idea to omit below error, since no pattern to detect vbios shadow without touch its content. 0000:00:10.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0x0000 Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang (cherry picked from commit c4270d122ccff963a021d1beb893d6192336af96) drivers/gpu/drm/i915/gvt/cfg_space.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 4ed11aeefda439c76ddae3ceebcfa4fad111f149 Author: Serhii Popovych Date: Mon Dec 4 09:36:42 2017 -0500 KVM: PPC: Book3S HV: Fix use after free in case of multiple resize requests When serving multiple resize requests following could happen: CPU0 CPU1 ---- ---- kvm_vm_ioctl_resize_hpt_prepare(1); -> schedule_work() /* system_rq might be busy: delay */ kvm_vm_ioctl_resize_hpt_prepare(2); mutex_lock(); if (resize) { ... release_hpt_resize(); } ... resize_hpt_prepare_work() -> schedule_work() { mutex_unlock() /* resize->kvm could be wrong */ struct kvm *kvm = resize->kvm; mutex_lock(&kvm->lock); <<<< UAF ... } i.e. a second resize request with different order could be started by kvm_vm_ioctl_resize_hpt_prepare(), causing the previous request to be free()d when there's still an active worker thread which will try to access it. This leads to a use after free in point marked with UAF on the diagram above. To prevent this from happening, instead of unconditionally releasing a pre-existing resize structure from the prepare ioctl(), we check if the existing structure has an in-progress worker. We do that by checking if the resize->error == -EBUSY, which is safe because the resize->error field is protected by the kvm->lock. If there is an active worker, instead of releasing, we mark the structure as stale by unlinking it from kvm_struct. In the worker thread we check for a stale structure (with kvm->lock held), and in that case abort, releasing the stale structure ourself. We make the check both before and the actual allocation. Strictly, only the check afterwards is needed, the check before is an optimization: if the structure happens to become stale before the worker thread is dispatched, rather than during the allocation, it means we can avoid allocating then immediately freeing a potentially substantial amount of memory. This fixes following or similar host kernel crash message: [ 635.277361] Unable to handle kernel paging request for data at address 0x00000000 [ 635.277438] Faulting instruction address: 0xc00000000052f568 [ 635.277446] Oops: Kernel access of bad area, sig: 11 [#1] [ 635.277451] SMP NR_CPUS=2048 NUMA PowerNV [ 635.277470] Modules linked in: xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 tun bridge stp llc ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter nfsv3 nfs_acl nfs lockd grace fscache kvm_hv kvm rpcrdma sunrpc ib_isert iscsi_target_mod ib_iser libiscsi scsi_transport_iscsi ib_srpt target_core_mod ext4 ib_srp scsi_transport_srp ib_ipoib mbcache jbd2 rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm ocrdma(T) ib_core ses enclosure scsi_transport_sas sg shpchp leds_powernv ibmpowernv i2c_opal i2c_core powernv_rng ipmi_powernv ipmi_devintf ipmi_msghandler ip_tables xfs libcrc32c sr_mod sd_mod cdrom lpfc nvme_fc(T) nvme_fabrics nvme_core ipr nvmet_fc(T) tg3 nvmet libata be2net crc_t10dif crct10dif_generic scsi_transport_fc ptp scsi_tgt pps_core crct10dif_common dm_mirror dm_region_hash dm_log dm_mod [ 635.278687] CPU: 40 PID: 749 Comm: kworker/40:1 Tainted: G ------------ T 3.10.0.bz1510771+ #1 [ 635.278782] Workqueue: events resize_hpt_prepare_work [kvm_hv] [ 635.278851] task: c0000007e6840000 ti: c0000007e9180000 task.ti: c0000007e9180000 [ 635.278919] NIP: c00000000052f568 LR: c0000000009ea310 CTR: c0000000009ea4f0 [ 635.278988] REGS: c0000007e91837f0 TRAP: 0300 Tainted: G ------------ T (3.10.0.bz1510771+) [ 635.279077] MSR: 9000000100009033 CR: 24002022 XER: 00000000 [ 635.279248] CFAR: c000000000009368 DAR: 0000000000000000 DSISR: 40000000 SOFTE: 1 GPR00: c0000000009ea310 c0000007e9183a70 c000000001250b00 c0000007e9183b10 GPR04: 0000000000000000 0000000000000000 c0000007e9183650 0000000000000000 GPR08: c0000007ffff7b80 00000000ffffffff 0000000080000028 d00000000d2529a0 GPR12: 0000000000002200 c000000007b56800 c000000000120028 c0000007f135bb40 GPR16: 0000000000000000 c000000005c1e018 c000000005c1e018 0000000000000000 GPR20: 0000000000000001 c0000000011bf778 0000000000000001 fffffffffffffef7 GPR24: 0000000000000000 c000000f1e262e50 0000000000000002 c0000007e9180000 GPR28: c000000f1e262e4c c000000f1e262e50 0000000000000000 c0000007e9183b10 [ 635.280149] NIP [c00000000052f568] __list_add+0x38/0x110 [ 635.280197] LR [c0000000009ea310] __mutex_lock_slowpath+0xe0/0x2c0 [ 635.280253] Call Trace: [ 635.280277] [c0000007e9183af0] [c0000000009ea310] __mutex_lock_slowpath+0xe0/0x2c0 [ 635.280356] [c0000007e9183b70] [c0000000009ea554] mutex_lock+0x64/0x70 [ 635.280426] [c0000007e9183ba0] [d00000000d24da04] resize_hpt_prepare_work+0xe4/0x1c0 [kvm_hv] [ 635.280507] [c0000007e9183c40] [c000000000113c0c] process_one_work+0x1dc/0x680 [ 635.280587] [c0000007e9183ce0] [c000000000114250] worker_thread+0x1a0/0x520 [ 635.280655] [c0000007e9183d80] [c00000000012010c] kthread+0xec/0x100 [ 635.280724] [c0000007e9183e30] [c00000000000a4b8] ret_from_kernel_thread+0x5c/0xa4 [ 635.280814] Instruction dump: [ 635.280880] 7c0802a6 fba1ffe8 fbc1fff0 7cbd2b78 fbe1fff8 7c9e2378 7c7f1b78 f8010010 [ 635.281099] f821ff81 e8a50008 7fa52040 40de00b8 7fbd2840 40de008c 7fbff040 [ 635.281324] ---[ end trace b628b73449719b9d ]--- Cc: stable@vger.kernel.org # v4.10+ Fixes: b5baa6877315 ("KVM: PPC: Book3S HV: KVM-HV HPT resizing implementation") Signed-off-by: Serhii Popovych [dwg: Replaced BUG_ON()s with WARN_ONs() and reworded commit message for clarity] Signed-off-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_hv.c | 50 ++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 15 deletions(-) commit 3073774e638ef18d222465fe92bfc8fccb90d288 Author: Serhii Popovych Date: Mon Dec 4 09:36:41 2017 -0500 KVM: PPC: Book3S HV: Drop prepare_done from struct kvm_resize_hpt Currently the kvm_resize_hpt structure has two fields relevant to the state of an ongoing resize: 'prepare_done', which indicates whether the worker thread has completed or not, and 'error' which indicates whether it was successful or not. Since the success/failure isn't known until completion, this is confusingly redundant. This patch consolidates the information into just the 'error' value: -EBUSY indicates the worked is still in progress, other negative values indicate (completed) failure, 0 indicates successful completion. As a bonus this reduces size of struct kvm_resize_hpt by __alignof__(struct kvm_hpt_info) and saves few bytes of code. While there correct comment in struct kvm_resize_hpt which references a non-existent semaphore (leftover from an early draft). Assert with WARN_ON() in case of HPT allocation thread work runs more than once for resize request or resize_hpt_allocate() returns -EBUSY that is treated specially. Change comparison against zero to make checkpatch.pl happy. Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Serhii Popovych [dwg: Changed BUG_ON()s to WARN_ON()s and altered commit message for clarity] Signed-off-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_hv.c | 44 +++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 17 deletions(-) commit 328b4ed93b69a6f2083d52f31a240a09e5de386a Author: Linus Torvalds Date: Tue Dec 5 17:59:29 2017 -0800 x86: don't hash faulting address in oops printout Things like this will probably keep showing up for other architectures and other special cases. I actually thought we already used %lx for this, and that is indeed _historically_ the case, but we moved to %p when merging the 32-bit and 64-bit cases as a convenient way to get the formatting right (ie automatically picking "%08lx" vs "%016lx" based on register size). So just turn this %p into %px. Reported-by: Sergey Senozhatsky Signed-off-by: Linus Torvalds arch/x86/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b562c171cf011d297059bd0265742eb5fab0ad2f Author: Kees Cook Date: Mon Dec 4 17:24:54 2017 -0800 locking/refcounts: Do not force refcount_t usage as GPL-only export The refcount_t protection on x86 was not intended to use the stricter GPL export. This adjusts the linkage again to avoid a regression in the availability of the refcount API. Reported-by: Dave Airlie Fixes: 7a46ec0e2f48 ("locking/refcounts, x86/asm: Implement fast refcount overflow protection") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Linus Torvalds arch/x86/mm/extable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc631943faba6fc3f755748091ada31798fb7d50 Author: Heiko Stuebner Date: Wed Dec 6 01:10:05 2017 +0100 arm64: dts: rockchip: limit rk3328-rock64 gmac speed to 100MBit for now It looks like either the current kernel or the hardware has reliability issues when the gmac is actually running at 1GBit. In my test-case it is not able to boot on a nfsroot at this speed, as the system will always lose the connection to the nfs-server during boot, before reaching any login prompt and not recover from this. So until this is solved, limit the speed to 100MBit as with this the nfsroot survives stress tests like an apt-get upgrade without problems. Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 2 ++ 1 file changed, 2 insertions(+) commit 87eba0716011e528f7841026f2cc65683219d0ad Author: Klaus Goger Date: Tue Dec 5 08:11:58 2017 +0100 arm64: dts: rockchip: remove vdd_log from rk3399-puma vdd_log has no consumer and therefore will not be set to a specific voltage. Still the PWM output pin gets configured and thence the vdd_log output voltage will changed from it's default. Depending on the idle state of the PWM this will slightly over or undervoltage the logic supply of the RK3399 and cause instability with GbE (undervoltage) and PCIe (overvoltage). Since the default value set by a voltage divider is the correct supply voltage and we don't need to change it during runtime we remove the rail from the devicetree completely so the PWM pin will not be configured. Signed-off-by: Klaus Goger Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 11 ----------- 1 file changed, 11 deletions(-) commit 8e1611e2357927b22892ecc062d65c99d0d89066 Author: Al Viro Date: Tue Dec 5 23:29:09 2017 +0000 make sock_alloc_file() do sock_release() on failures This changes calling conventions (and simplifies the hell out the callers). New rules: once struct socket had been passed to sock_alloc_file(), it's been consumed either by struct file or by sock_release() done by sock_alloc_file(). Either way the caller should not do sock_release() after that point. Reviewed-by: Eric Dumazet Signed-off-by: Al Viro Signed-off-by: David S. Miller drivers/staging/lustre/lnet/lnet/lib-socket.c | 8 ++------ net/9p/trans_fd.c | 1 - net/kcm/kcmsock.c | 7 +------ net/sctp/socket.c | 1 - net/socket.c | 25 ++++++++----------------- 5 files changed, 11 insertions(+), 31 deletions(-) commit 016a266bdfeda268afb2228b6217fd4771334635 Author: Al Viro Date: Tue Dec 5 23:28:38 2017 +0000 socketpair(): allocate descriptors first simplifies failure exits considerably... Reviewed-by: Eric Dumazet Signed-off-by: Al Viro Signed-off-by: David S. Miller net/socket.c | 89 ++++++++++++++++++++++++++---------------------------------- 1 file changed, 38 insertions(+), 51 deletions(-) commit a5739435b5a3b8c449f8844ecd71a3b1e89f0a33 Author: Al Viro Date: Tue Dec 5 23:27:57 2017 +0000 fix kcm_clone() 1) it's fput() or sock_release(), not both 2) don't do fd_install() until the last failure exit. 3) not a bug per se, but... don't attach socket to struct file until it's set up. Take reserving descriptor into the caller, move fd_install() to the caller, sanitize failure exits and calling conventions. Cc: stable@vger.kernel.org # v4.6+ Acked-by: Tom Herbert Signed-off-by: Al Viro Signed-off-by: David S. Miller net/kcm/kcmsock.c | 71 +++++++++++++++++++++---------------------------------- 1 file changed, 27 insertions(+), 44 deletions(-) commit 975b820b6836b6b6c42fb84cd2e772e2b41bca67 Author: Cai Li Date: Tue Nov 21 17:24:38 2017 +0800 clk: fix a panic error caused by accessing NULL pointer In some cases the clock parent would be set NULL when doing re-parent, it will cause a NULL pointer accessing if clk_set trace event is enabled. This patch sets the parent as "none" if the input parameter is NULL. Fixes: dfc202ead312 (clk: Add tracepoints for hardware operations) Signed-off-by: Cai Li Signed-off-by: Chunyan Zhang Signed-off-by: Stephen Boyd include/trace/events/clk.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 588fb54b0cc5be5fd2e12bb04810534ffc3d49cc Author: Marek Szyprowski Date: Thu Nov 30 13:14:51 2017 +0100 clk: Manage proper runtime PM state in clk_change_rate() clk_change_rate() propagates rate change down to all its children. Such operation requires managing proper runtime PM state of each child, what was missing. Add needed calls to clk_pm_runtime*() to ensure that set_rate() clock callback is called on runtime active clock. This fixes following issue found on Exynos5433 TM2 board with devfreq enabled: Synchronous External Abort: synchronous external abort (0x96000210) at 0xffffff80093f5600 Internal error: : 96000210 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 5 Comm: kworker/u16:0 Not tainted 4.15.0-rc1-next-20171129+ #4 Hardware name: Samsung TM2 board (DT) Workqueue: devfreq_wq devfreq_monitor task: ffffffc0ca96b600 task.stack: ffffff80093a8000 pstate: a0000085 (NzCv daIf -PAN -UAO) pc : clk_divider_set_rate+0x54/0x118 lr : clk_divider_set_rate+0x44/0x118 ... Process kworker/u16:0 (pid: 5, stack limit = 0xffffff80093a8000) Call trace: clk_divider_set_rate+0x54/0x118 clk_change_rate+0xfc/0x4e0 clk_change_rate+0x1f0/0x4e0 clk_change_rate+0x1f0/0x4e0 clk_change_rate+0x1f0/0x4e0 clk_core_set_rate_nolock+0x138/0x148 clk_set_rate+0x28/0x50 exynos_bus_passive_target+0x6c/0x11c update_devfreq_passive+0x58/0xb4 devfreq_passive_notifier_call+0x50/0x5c notifier_call_chain+0x4c/0x88 __srcu_notifier_call_chain+0x54/0x80 srcu_notifier_call_chain+0x14/0x1c update_devfreq+0x100/0x1b4 devfreq_monitor+0x2c/0x88 process_one_work+0x148/0x3d8 worker_thread+0x13c/0x3f8 kthread+0x100/0x12c ret_from_fork+0x10/0x18 Reported-by: Chanwoo Choi Fixes: 9a34b45397e5 ("clk: Add support for runtime PM") Signed-off-by: Marek Szyprowski Reviewed-by: Ulf Hansson Tested-by: Chanwoo Choi Reviewed-by: Chanwoo Choi Signed-off-by: Stephen Boyd drivers/clk/clk.c | 5 +++++ 1 file changed, 5 insertions(+) commit 69c64866ce072dea1d1e59a0d61e0f66c0dffb76 Author: Mohamed Ghannam Date: Tue Dec 5 20:58:35 2017 +0000 dccp: CVE-2017-8824: use-after-free in DCCP code Whenever the sock object is in DCCP_CLOSED state, dccp_disconnect() must free dccps_hc_tx_ccid and dccps_hc_rx_ccid and set to NULL. Signed-off-by: Mohamed Ghannam Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/dccp/proto.c | 5 +++++ 1 file changed, 5 insertions(+) commit d7efc6c11b277d9d80b99b1334a78bfe7d7edf10 Author: Eric Dumazet Date: Tue Dec 5 12:45:56 2017 -0800 net: remove hlist_nulls_add_tail_rcu() Alexander Potapenko reported use of uninitialized memory [1] This happens when inserting a request socket into TCP ehash, in __sk_nulls_add_node_rcu(), since sk_reuseport is not initialized. Bug was added by commit d894ba18d4e4 ("soreuseport: fix ordering for mixed v4/v6 sockets") Note that d296ba60d8e2 ("soreuseport: Resolve merge conflict for v4/v6 ordering fix") missed the opportunity to get rid of hlist_nulls_add_tail_rcu() : Both UDP sockets and TCP/DCCP listeners no longer use __sk_nulls_add_node_rcu() for their hash insertion. Since all other sockets have unique 4-tuple, the reuseport status has no special meaning, so we can always use hlist_nulls_add_head_rcu() for them and save few cycles/instructions. [1] ================================================================== BUG: KMSAN: use of uninitialized memory in inet_ehash_insert+0xd40/0x1050 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.13.0+ #3288 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace:    __dump_stack lib/dump_stack.c:16  dump_stack+0x185/0x1d0 lib/dump_stack.c:52  kmsan_report+0x13f/0x1c0 mm/kmsan/kmsan.c:1016  __msan_warning_32+0x69/0xb0 mm/kmsan/kmsan_instr.c:766  __sk_nulls_add_node_rcu ./include/net/sock.h:684  inet_ehash_insert+0xd40/0x1050 net/ipv4/inet_hashtables.c:413  reqsk_queue_hash_req net/ipv4/inet_connection_sock.c:754  inet_csk_reqsk_queue_hash_add+0x1cc/0x300 net/ipv4/inet_connection_sock.c:765  tcp_conn_request+0x31e7/0x36f0 net/ipv4/tcp_input.c:6414  tcp_v4_conn_request+0x16d/0x220 net/ipv4/tcp_ipv4.c:1314  tcp_rcv_state_process+0x42a/0x7210 net/ipv4/tcp_input.c:5917  tcp_v4_do_rcv+0xa6a/0xcd0 net/ipv4/tcp_ipv4.c:1483  tcp_v4_rcv+0x3de0/0x4ab0 net/ipv4/tcp_ipv4.c:1763  ip_local_deliver_finish+0x6bb/0xcb0 net/ipv4/ip_input.c:216  NF_HOOK ./include/linux/netfilter.h:248  ip_local_deliver+0x3fa/0x480 net/ipv4/ip_input.c:257  dst_input ./include/net/dst.h:477  ip_rcv_finish+0x6fb/0x1540 net/ipv4/ip_input.c:397  NF_HOOK ./include/linux/netfilter.h:248  ip_rcv+0x10f6/0x15c0 net/ipv4/ip_input.c:488  __netif_receive_skb_core+0x36f6/0x3f60 net/core/dev.c:4298  __netif_receive_skb net/core/dev.c:4336  netif_receive_skb_internal+0x63c/0x19c0 net/core/dev.c:4497  napi_skb_finish net/core/dev.c:4858  napi_gro_receive+0x629/0xa50 net/core/dev.c:4889  e1000_receive_skb drivers/net/ethernet/intel/e1000/e1000_main.c:4018  e1000_clean_rx_irq+0x1492/0x1d30 drivers/net/ethernet/intel/e1000/e1000_main.c:4474  e1000_clean+0x43aa/0x5970 drivers/net/ethernet/intel/e1000/e1000_main.c:3819  napi_poll net/core/dev.c:5500  net_rx_action+0x73c/0x1820 net/core/dev.c:5566  __do_softirq+0x4b4/0x8dd kernel/softirq.c:284  invoke_softirq kernel/softirq.c:364  irq_exit+0x203/0x240 kernel/softirq.c:405  exiting_irq+0xe/0x10 ./arch/x86/include/asm/apic.h:638  do_IRQ+0x15e/0x1a0 arch/x86/kernel/irq.c:263  common_interrupt+0x86/0x86 Fixes: d894ba18d4e4 ("soreuseport: fix ordering for mixed v4/v6 sockets") Fixes: d296ba60d8e2 ("soreuseport: Resolve merge conflict for v4/v6 ordering fix") Signed-off-by: Eric Dumazet Reported-by: Alexander Potapenko Acked-by: Craig Gallek Signed-off-by: David S. Miller include/linux/rculist_nulls.h | 38 -------------------------------------- include/net/sock.h | 6 +----- 2 files changed, 1 insertion(+), 43 deletions(-) commit a5266440d5c7872895e964a36822104f6038d142 Merge: c9d3fe9 6296928 Author: David S. Miller Date: Tue Dec 5 18:03:55 2017 -0500 Merge branch 'rmnet-Fix-leaks-in-failure-scenarios' Subash Abhinov Kasiviswanathan says: ==================== net: qualcomm: rmnet: Fix leaks in failure scenarios Patch 1 fixes a leak in transmit path where a skb cannot be transmitted due to insufficient headroom to stamp the map header. Patch 2 fixes a leak in rmnet_newlink() failure because the rmnet endpoint was never freed ==================== Signed-off-by: David S. Miller commit 6296928fa3b9f656d7760fbf346c0cf834788a78 Author: Subash Abhinov Kasiviswanathan Date: Tue Dec 5 13:41:18 2017 -0700 net: qualcomm: rmnet: Fix leak in device creation failure If the rmnet device creation fails in the newlink either while registering with the physical device or after subsequent operations, the rmnet endpoint information is never freed. Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 1 + 1 file changed, 1 insertion(+) commit c20a548792f15f8d8e38cd74356301c6db0d241f Author: Subash Abhinov Kasiviswanathan Date: Tue Dec 5 13:41:17 2017 -0700 net: qualcomm: rmnet: Fix leak on transmit failure If a skb in transmit path does not have sufficient headroom to add the map header, the skb is not sent out and is never freed. Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 362bca57f5d78220f8b5907b875961af9436e229 Author: Robb Glasser Date: Tue Dec 5 09:16:55 2017 -0800 ALSA: pcm: prevent UAF in snd_pcm_info When the device descriptor is closed, the `substream->runtime` pointer is freed. But another thread may be in the ioctl handler, case SNDRV_CTL_IOCTL_PCM_INFO. This case calls snd_pcm_info_user() which calls snd_pcm_info() which accesses the now freed `substream->runtime`. Note: this fixes CVE-2017-0861 Signed-off-by: Robb Glasser Signed-off-by: Nick Desaulniers Cc: Signed-off-by: Takashi Iwai sound/core/pcm.c | 2 ++ 1 file changed, 2 insertions(+) commit 1ecbd7170d6579a1ee389a37bf1f0437ea01a388 Author: George Cherian Date: Mon Dec 4 14:06:54 2017 +0000 ACPI / CPPC: Fix KASAN global out of bounds warning Default value of pcc_subspace_idx is -1. Make sure to check pcc_subspace_idx before using the same as array index. This will avoid following KASAN warnings too. [ 15.113449] ================================================================== [ 15.116983] BUG: KASAN: global-out-of-bounds in cppc_get_perf_caps+0xf3/0x3b0 [ 15.116983] Read of size 8 at addr ffffffffb9a5c0d8 by task swapper/0/1 [ 15.116983] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 4.15.0-rc2+ #2 [ 15.116983] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.2.8 01/26/2016 [ 15.116983] Call Trace: [ 15.116983] dump_stack+0x7c/0xbb [ 15.116983] print_address_description+0x1df/0x290 [ 15.116983] kasan_report+0x28a/0x370 [ 15.116983] ? cppc_get_perf_caps+0xf3/0x3b0 [ 15.116983] cppc_get_perf_caps+0xf3/0x3b0 [ 15.116983] ? cpc_read+0x210/0x210 [ 15.116983] ? __rdmsr_on_cpu+0x90/0x90 [ 15.116983] ? rdmsrl_on_cpu+0xa9/0xe0 [ 15.116983] ? rdmsr_on_cpu+0x100/0x100 [ 15.116983] ? wrmsrl_on_cpu+0x9c/0xd0 [ 15.116983] ? wrmsrl_on_cpu+0x9c/0xd0 [ 15.116983] ? wrmsr_on_cpu+0xe0/0xe0 [ 15.116983] __intel_pstate_cpu_init.part.16+0x3a2/0x530 [ 15.116983] ? intel_pstate_init_cpu+0x197/0x390 [ 15.116983] ? show_no_turbo+0xe0/0xe0 [ 15.116983] ? __lockdep_init_map+0xa0/0x290 [ 15.116983] intel_pstate_cpu_init+0x30/0x60 [ 15.116983] cpufreq_online+0x155/0xac0 [ 15.116983] cpufreq_add_dev+0x9b/0xb0 [ 15.116983] subsys_interface_register+0x1ae/0x290 [ 15.116983] ? bus_unregister_notifier+0x40/0x40 [ 15.116983] ? mark_held_locks+0x83/0xb0 [ 15.116983] ? _raw_write_unlock_irqrestore+0x32/0x60 [ 15.116983] ? intel_pstate_setup+0xc/0x104 [ 15.116983] ? intel_pstate_setup+0xc/0x104 [ 15.116983] ? cpufreq_register_driver+0x1ce/0x2b0 [ 15.116983] cpufreq_register_driver+0x1ce/0x2b0 [ 15.116983] ? intel_pstate_setup+0x104/0x104 [ 15.116983] intel_pstate_register_driver+0x3a/0xa0 [ 15.116983] intel_pstate_init+0x3c4/0x434 [ 15.116983] ? intel_pstate_setup+0x104/0x104 [ 15.116983] ? intel_pstate_setup+0x104/0x104 [ 15.116983] do_one_initcall+0x9c/0x206 [ 15.116983] ? parameq+0xa0/0xa0 [ 15.116983] ? initcall_blacklisted+0x150/0x150 [ 15.116983] ? lock_downgrade+0x2c0/0x2c0 [ 15.116983] kernel_init_freeable+0x327/0x3f0 [ 15.116983] ? start_kernel+0x612/0x612 [ 15.116983] ? _raw_spin_unlock_irq+0x29/0x40 [ 15.116983] ? finish_task_switch+0xdd/0x320 [ 15.116983] ? finish_task_switch+0x8e/0x320 [ 15.116983] ? rest_init+0xd0/0xd0 [ 15.116983] kernel_init+0xf/0x11a [ 15.116983] ? rest_init+0xd0/0xd0 [ 15.116983] ret_from_fork+0x24/0x30 [ 15.116983] The buggy address belongs to the variable: [ 15.116983] __key.36299+0x38/0x40 [ 15.116983] Memory state around the buggy address: [ 15.116983] ffffffffb9a5bf80: fa fa fa fa 00 fa fa fa fa fa fa fa 00 fa fa fa [ 15.116983] ffffffffb9a5c000: fa fa fa fa 00 fa fa fa fa fa fa fa 00 fa fa fa [ 15.116983] >ffffffffb9a5c080: fa fa fa fa 00 fa fa fa fa fa fa fa 00 00 00 00 [ 15.116983] ^ [ 15.116983] ffffffffb9a5c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 15.116983] ffffffffb9a5c180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 15.116983] ================================================================== Fixes: 85b1407bf6d2 (ACPI / CPPC: Make CPPC ACPI driver aware of PCC subspace IDs) Reported-by: Changbin Du Signed-off-by: George Cherian Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 2895db67b01cb875457c9c3f30a14723b6b5dfd5 Author: Jim Mattson Date: Fri Dec 1 09:57:56 2017 -0800 KVM: VMX: fix page leak in hardware_setup() vmx_io_bitmap_b should not be allocated twice. Fixes: 23611332938d ("KVM: VMX: refactor setup of global page-sized bitmaps") Signed-off-by: Jim Mattson Reviewed-by: Krish Sadhukhan Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 1 - 1 file changed, 1 deletion(-) commit d59d51f088014f25c2562de59b9abff4f42a7468 Author: Andrew Honig Date: Fri Dec 1 10:21:09 2017 -0800 KVM: VMX: remove I/O port 0x80 bypass on Intel hosts This fixes CVE-2017-1000407. KVM allows guests to directly access I/O port 0x80 on Intel hosts. If the guest floods this port with writes it generates exceptions and instability in the host kernel, leading to a crash. With this change guest writes to port 0x80 on Intel will behave the same as they currently behave on AMD systems. Prevent the flooding by removing the code that sets port 0x80 as a passthrough port. This is essentially the same as upstream patch 99f85a28a78e96d28907fe036e1671a218fee597, except that patch was for AMD chipsets and this patch is for Intel. Signed-off-by: Andrew Honig Signed-off-by: Jim Mattson Fixes: fdef3ad1b386 ("KVM: VMX: Enable io bitmaps to avoid IO port 0x80 VMEXITs") Cc: Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 5 ----- 1 file changed, 5 deletions(-) commit 6ab0b9feb82a7ac09956e6761fec73cd47789df5 Author: Rik van Riel Date: Tue Nov 14 16:54:24 2017 -0500 x86,kvm: remove KVM emulator get_fpu / put_fpu Now that get_fpu and put_fpu do nothing, because the scheduler will automatically load and restore the guest FPU context for us while we are in this code (deep inside the vcpu_run main loop), we can get rid of the get_fpu and put_fpu hooks. Signed-off-by: Rik van Riel Suggested-by: David Hildenbrand Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_emulate.h | 2 -- arch/x86/kvm/emulate.c | 24 ------------------------ arch/x86/kvm/x86.c | 10 ---------- 3 files changed, 36 deletions(-) commit f775b13eedee2f7f3c6fdd4e90fb79090ce5d339 Author: Rik van Riel Date: Tue Nov 14 16:54:23 2017 -0500 x86,kvm: move qemu/guest FPU switching out to vcpu_run Currently, every time a VCPU is scheduled out, the host kernel will first save the guest FPU/xstate context, then load the qemu userspace FPU context, only to then immediately save the qemu userspace FPU context back to memory. When scheduling in a VCPU, the same extraneous FPU loads and saves are done. This could be avoided by moving from a model where the guest FPU is loaded and stored with preemption disabled, to a model where the qemu userspace FPU is swapped out for the guest FPU context for the duration of the KVM_RUN ioctl. This is done under the VCPU mutex, which is also taken when other tasks inspect the VCPU FPU context, so the code should already be safe for this change. That should come as no surprise, given that s390 already has this optimization. This can fix a bug where KVM calls get_user_pages while owning the FPU, and the file system ends up requesting the FPU again: [258270.527947] __warn+0xcb/0xf0 [258270.527948] warn_slowpath_null+0x1d/0x20 [258270.527951] kernel_fpu_disable+0x3f/0x50 [258270.527953] __kernel_fpu_begin+0x49/0x100 [258270.527955] kernel_fpu_begin+0xe/0x10 [258270.527958] crc32c_pcl_intel_update+0x84/0xb0 [258270.527961] crypto_shash_update+0x3f/0x110 [258270.527968] crc32c+0x63/0x8a [libcrc32c] [258270.527975] dm_bm_checksum+0x1b/0x20 [dm_persistent_data] [258270.527978] node_prepare_for_write+0x44/0x70 [dm_persistent_data] [258270.527985] dm_block_manager_write_callback+0x41/0x50 [dm_persistent_data] [258270.527988] submit_io+0x170/0x1b0 [dm_bufio] [258270.527992] __write_dirty_buffer+0x89/0x90 [dm_bufio] [258270.527994] __make_buffer_clean+0x4f/0x80 [dm_bufio] [258270.527996] __try_evict_buffer+0x42/0x60 [dm_bufio] [258270.527998] dm_bufio_shrink_scan+0xc0/0x130 [dm_bufio] [258270.528002] shrink_slab.part.40+0x1f5/0x420 [258270.528004] shrink_node+0x22c/0x320 [258270.528006] do_try_to_free_pages+0xf5/0x330 [258270.528008] try_to_free_pages+0xe9/0x190 [258270.528009] __alloc_pages_slowpath+0x40f/0xba0 [258270.528011] __alloc_pages_nodemask+0x209/0x260 [258270.528014] alloc_pages_vma+0x1f1/0x250 [258270.528017] do_huge_pmd_anonymous_page+0x123/0x660 [258270.528021] handle_mm_fault+0xfd3/0x1330 [258270.528025] __get_user_pages+0x113/0x640 [258270.528027] get_user_pages+0x4f/0x60 [258270.528063] __gfn_to_pfn_memslot+0x120/0x3f0 [kvm] [258270.528108] try_async_pf+0x66/0x230 [kvm] [258270.528135] tdp_page_fault+0x130/0x280 [kvm] [258270.528149] kvm_mmu_page_fault+0x60/0x120 [kvm] [258270.528158] handle_ept_violation+0x91/0x170 [kvm_intel] [258270.528162] vmx_handle_exit+0x1ca/0x1400 [kvm_intel] No performance changes were detected in quick ping-pong tests on my 4 socket system, which is expected since an FPU+xstate load is on the order of 0.1us, while ping-ponging between CPUs is on the order of 20us, and somewhat noisy. Cc: stable@vger.kernel.org Signed-off-by: Rik van Riel Suggested-by: Christian Borntraeger Signed-off-by: Paolo Bonzini [Fixed a bug where reset_vcpu called put_fpu without preceding load_fpu, which happened inside from KVM_CREATE_VCPU ioctl. - Radim] Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_host.h | 13 +++++++++++++ arch/x86/kvm/x86.c | 39 +++++++++++++++++---------------------- include/linux/kvm_host.h | 2 +- 3 files changed, 31 insertions(+), 23 deletions(-) commit c9d3fe9da094a9a7a3d3cd365b334b822e05f5e8 Author: Stefan Hajnoczi Date: Tue Dec 5 11:31:14 2017 +0000 VSOCK: fix outdated sk_state value in hvs_release() Since commit 3b4477d2dcf2709d0be89e2a8dced3d0f4a017f2 ("VSOCK: use TCP state constants for sk_state") VSOCK has used TCP_* constants for sk_state. Commit b4562ca7925a3bedada87a3dd072dd5bad043288 ("hv_sock: add locking in the open/close/release code paths") reintroduced the SS_DISCONNECTING constant. This patch replaces the old SS_DISCONNECTING with the new TCP_CLOSING constant. CC: Dexuan Cui CC: Cathy Avery Signed-off-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: David S. Miller net/vmw_vsock/hyperv_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7d5f107b4978e08eeab599ee7449af34d034053 Author: Jon Maloy Date: Mon Dec 4 22:00:20 2017 +0100 tipc: fix memory leak in tipc_accept_from_sock() When the function tipc_accept_from_sock() fails to create an instance of struct tipc_subscriber it omits to free the already created instance of struct tipc_conn instance before it returns. We fix that with this commit. Reported-by: David S. Miller Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/server.c | 1 + 1 file changed, 1 insertion(+) commit 672ecbe1c977616aa720c9397589665b33e72610 Author: Cong Wang Date: Mon Dec 4 10:31:43 2017 -0800 tipc: fix a null pointer deref on error path In tipc_topsrv_kern_subscr() when s->tipc_conn_new() fails we call tipc_close_conn() to clean up, but in this case calling conn_put() is just enough. This fixes the folllowing crash: 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: 0 PID: 3085 Comm: syzkaller064164 Not tainted 4.15.0-rc1+ #137 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: 00000000c24413a5 task.stack: 000000005e8160b5 RIP: 0010:__lock_acquire+0xd55/0x47f0 kernel/locking/lockdep.c:3378 RSP: 0018:ffff8801cb5474a8 EFLAGS: 00010002 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000004 RSI: 0000000000000000 RDI: ffffffff85ecb400 RBP: ffff8801cb547830 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: ffffffff87489d60 R12: ffff8801cd2980c0 R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000020 FS: 00000000014ee880(0000) GS:ffff8801db400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffee2426e40 CR3: 00000001cb85a000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4004 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:175 spin_lock_bh include/linux/spinlock.h:320 [inline] tipc_subscrb_subscrp_delete+0x8f/0x470 net/tipc/subscr.c:201 tipc_subscrb_delete net/tipc/subscr.c:238 [inline] tipc_subscrb_release_cb+0x17/0x30 net/tipc/subscr.c:316 tipc_close_conn+0x171/0x270 net/tipc/server.c:204 tipc_topsrv_kern_subscr+0x724/0x810 net/tipc/server.c:514 tipc_group_create+0x702/0x9c0 net/tipc/group.c:184 tipc_sk_join net/tipc/socket.c:2747 [inline] tipc_setsockopt+0x249/0xc10 net/tipc/socket.c:2861 SYSC_setsockopt net/socket.c:1851 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1830 entry_SYSCALL_64_fastpath+0x1f/0x96 Fixes: 14c04493cb77 ("tipc: add ability to order and receive topology events in driver") Reported-by: syzbot Cc: Jon Maloy Cc: Ying Xue Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/tipc/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2f31b79d510ec1a27138bdcf2d0ece1080be85e Author: Tejun Heo Date: Tue Dec 5 09:10:17 2017 -0800 cgroup: add warning about RT not being supported on cgroup2 We haven't yet figured out what to do with RT threads on cgroup2. Document the limitation. v2: Included the warning about system management software behavior as suggested by Michael. Signed-off-by: Tejun Heo Reported-by: "Michael Kerrisk (man-pages)" Documentation/cgroup-v2.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit a6cec1f5dee0e7fe4ab20f2708bfa24f64b87880 Merge: c1d69de 573500dbf Author: David S. Miller Date: Tue Dec 5 14:40:35 2017 -0500 Merge branch 'sh_eth-dma-mapping-fixes' Thomas Petazzoni says: ==================== net: sh_eth: DMA mapping API fixes Here are two patches that fix how the sh_eth driver is using the DMA mapping API: a bogus struct device is used in some places, or a NULL struct device is used. ==================== Signed-off-by: David S. Miller commit 573500dbf0f2756947517c1d4f942767dbf16dcc Author: Thomas Petazzoni Date: Mon Dec 4 14:33:27 2017 +0100 net: sh_eth: don't use NULL as "struct device" for the DMA mapping API Using NULL as argument for the DMA mapping API is bogus, as the DMA mapping API may use information from the "struct device" to perform the DMA mapping operation. Therefore, pass the appropriate "struct device". Signed-off-by: Thomas Petazzoni Acked-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 22c1aed4093a605b120d6e566620364843a318ed Author: Thomas Petazzoni Date: Mon Dec 4 14:33:26 2017 +0100 net: sh_eth: use correct "struct device" when calling DMA mapping functions There are two types of "struct device": the one representing the physical device on its physical bus (platform, SPI, PCI, etc.), and the one representing the logical device in its device class (net, etc.). The DMA mapping API expects to receive as argument a "struct device" representing the physical device, as the "struct device" contains information about the bus that the DMA API needs. However, the sh_eth driver mistakenly uses the "struct device" representing the logical device (embedded in "struct net_device") rather than the "struct device" representing the physical device on its bus. This commit fixes that by adjusting all calls to the DMA mapping API. Signed-off-by: Thomas Petazzoni Acked-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit c1d69de98775ca31b4c1b31009e6d1d4e4d33c9c Merge: 5811767 8afa10c Author: David S. Miller Date: Tue Dec 5 14:37:13 2017 -0500 Merge branch 'RED-qdisc-fixes' Nogah Frankel says: ==================== RED qdisc fixes Add some input validation checks to RED qdisc. ==================== Signed-off-by: David S. Miller commit 8afa10cbe281b10371fee5a87ab266e48d71a7f9 Author: Nogah Frankel Date: Mon Dec 4 13:31:11 2017 +0200 net_sched: red: Avoid illegal values Check the qmin & qmax values doesn't overflow for the given Wlog value. Check that qmin <= qmax. Fixes: a783474591f2 ("[PKT_SCHED]: Generic RED layer") Signed-off-by: Nogah Frankel Signed-off-by: David S. Miller include/net/red.h | 11 +++++++++++ net/sched/sch_choke.c | 3 +++ net/sched/sch_gred.c | 3 +++ net/sched/sch_red.c | 2 ++ net/sched/sch_sfq.c | 3 +++ 5 files changed, 22 insertions(+) commit 5c472203421ab4f928aa1ae9e1dbcfdd80324148 Author: Nogah Frankel Date: Mon Dec 4 13:31:10 2017 +0200 net_sched: red: Avoid devision by zero Do not allow delta value to be zero since it is used as a divisor. Fixes: 8af2a218de38 ("sch_red: Adaptative RED AQM") Signed-off-by: Nogah Frankel Signed-off-by: David S. Miller include/net/red.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ff7ec02f2f306d619c661ff8fd5392d3653d407 Author: Christian König Date: Mon Dec 4 11:17:54 2017 +0100 drm/ttm: swap consecutive allocated cached pages v3 When we detect consecutive allocation of pages swap them to avoid accidentally freeing them as huge page. v2: use swap v3: check if it's really the first allocated page Signed-off-by: Christian König Reviewed-by: Roger He Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2bf257d662509553ae226239e7dc1c3d00636ca6 Author: Roger He Date: Tue Nov 21 16:47:16 2017 +0800 drm/ttm: roundup the shrink request to prevent skip huge pool e.g. shrink reqeust is less than 512, the logic will skip huge pool Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit bae5c5b50b20b522002d6f9f6e9dbe1ae95152aa Author: Roger He Date: Tue Nov 21 14:24:48 2017 +0800 drm/ttm: add page order support in ttm_pages_put Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 54ddc5f2d709e9eae5c55a665b37fe2581681c90 Author: Roger He Date: Wed Nov 22 15:09:33 2017 +0800 drm/ttm: add set_pages_wb for handling page order more than zero Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6d5e4e3213f4700338627f1f2fba6d3552b1158a Author: Roger He Date: Tue Nov 21 09:37:52 2017 +0800 drm/ttm: add page order in page pool to indicate page order for each element in the pool Reviewed-by: Christian König Signed-off-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 38 +++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) commit 1ee0d3d778f146b982b100ae7add0c4da9626e9a Author: Roger He Date: Tue Nov 21 09:58:26 2017 +0800 drm/ttm: use NUM_PAGES_TO_ALLOC always Reviewed-by: Christian König Signed-off-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 13231caccedffcceff1580b78e6d99d8b0a43404 Merge: e6cdd80 c2e8fbf Author: Linus Torvalds Date: Tue Dec 5 10:31:32 2017 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "A bunch of fixes for aacraid, a set of coherency fixes that only affect non-coherent platforms and one coccinelle detected null check after use" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: libsas: align sata_device's rps_resp on a cacheline scsi: use dma_get_cache_alignment() as minimum DMA alignment scsi: dma-mapping: always provide dma_get_cache_alignment scsi: ufs: ufshcd: fix potential NULL pointer dereference in ufshcd_config_vreg scsi: aacraid: Prevent crash in case of free interrupt during scsi EH path scsi: aacraid: Perform initialization reset only once scsi: aacraid: Check for PCI state of device in a generic way commit e6cdd80a834254dcf8c414188d1781a56ef72d85 Merge: 6a5e05a 315d160 Author: Linus Torvalds Date: Tue Dec 5 10:10:15 2017 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Here is the first rc pull request for RDMA. This includes an important core fix for a regression in iWarp if SELinux is enabled, a fix for a compilation regression introduced in this merge window, and one obscure kconfig combination that oops's the kernel. For drivers, we have hns fixes needed to make their devices work on certain ARM IOMMU configurations, a stack data leak for hfi1, and various testing discovered -rc bug fixes for i40iw. This cycle we pushed back on the driver maintainers to have better commit messages for -rc material" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: IB/core: Only enforce security for InfiniBand RDMA/hns: Get rid of page operation after dma_alloc_coherent RDMA/hns: Get rid of virt_to_page and vmap calls after dma_alloc_coherent RDMA/hns: Fix the issue of IOVA not page continuous in hip08 IB/core: Init subsys if compiled to vmlinuz-core RDMA/cma: Make sure that PSN is not over max allowed i40iw: Notify user of established connection after QP in RTS i40iw: Move MPA request event for loopback after connect i40iw: Correct ARP index mask i40iw: Do not free sqbuf when event is I40IW_TIMER_TYPE_CLOSE i40iw: Allocate a sdbuf per CQP WQE IB: INFINIBAND should depend on HAS_DMA IB/hfi1: Initialize bth1 in 16B rc ack builder commit 6a5e05a47b6cb8e59bfad351444322b1e4012326 Merge: 1fbd55c 66bc5df Author: Linus Torvalds Date: Tue Dec 5 10:06:23 2017 -0800 Merge tag 'char-misc-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fixes from Greg KH: "Here are some small misc driver fixes for 4.15-rc3 to resolve reported issues. Specifically these are: - binder fix for a memory leak - vpd driver fixes for a number of reported problems - hyperv driver fix for memory accesses where it shouldn't be. All of these have been in linux-next for a while. There's also one more MAINTAINERS file update that came in today to get the Android developer's emails correct, which is also in this pull request, that was not in linux-next, but should not be an issue" * tag 'char-misc-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: MAINTAINERS: update Android driver maintainers. firmware: vpd: Fix platform driver and device registration/unregistration firmware: vpd: Tie firmware kobject to device lifetime firmware: vpd: Destroy vpd sections in remove function hv: kvp: Avoid reading past allocated blocks from KVP file Drivers: hv: vmbus: Fix a rescind issue ANDROID: binder: fix transaction leak. commit 1fbd55c0ccd842a976d16431b57121b7892ed8ce Merge: 7399693 0946b2f Author: Linus Torvalds Date: Tue Dec 5 10:00:14 2017 -0800 Merge tag 'driver-core-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are 3 small fixes for some reported issues: - a debugfs build error that lots of people have reported - a Kconfig help text cleanup now that the firmware is not in the kernel tree - an ISA bus bug fix for a reported issue that has been there since 2.6.18. All of these have been in linux-next with no reported issues" * tag 'driver-core-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: firmware: cleanup FIRMWARE_IN_KERNEL message isa: Prevent NULL dereference in isa_bus driver callbacks debugfs: fix debugfs_real_fops() build error commit 73996933b53ff396d63a7fccd8e824758634dc19 Merge: 84dda29 e168e98 Author: Linus Torvalds Date: Tue Dec 5 09:57:34 2017 -0800 Merge tag 'staging-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and iio driver fixes from Greg KH: "Here are a number of small staging and iio driver fixes for reported issues for 4.15-rc3. Nothing major here, the majority is IIO issues, like normal, but there are also some small bugfixes for a few staging drivers as well. Full details are in the shortlog. All of these have been in linux-next for a while with no reported issues" * tag 'staging-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio: stm32: fix adc/trigger link error iio: health: max30102: Temperature should be in milli Celsius iio: fix kernel-doc build errors iio: adc: meson-saradc: Meson8 and Meson8b do not have REG11 and REG13 iio: adc: meson-saradc: initialize the bandgap correctly on older SoCs iio: adc: meson-saradc: fix the bit_idx of the adc_en clock iio: proximity: sx9500: Assign interrupt from GpioIo() iio: adc: cpcap: fix incorrect validation staging: octeon-usb: use __delay() instead of cvmx_wait() staging: rtl8188eu: Fix incorrect response to SIOCGIWESSID staging: ccree: fix leak of import() after init() staging: comedi: ni_atmio: fix license warning. commit 84dda2965d2a8d319e5f47cef46697cf9153f272 Merge: 6b0b3bd c8ec204 Author: Linus Torvalds Date: Tue Dec 5 09:05:16 2017 -0800 Merge tag 'tty-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver fixes from Greg KH: "Here are some small serdev and serial fixes for 4.15-rc3. They resolve some reported problems: - a number of serdev fixes to resolve crashes - MIPS build fixes for their serial port - a new 8250 device id All of these have been in linux-next for a while with no reported issues" * tag 'tty-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: MIPS: Add custom serial.h with BASE_BAUD override for generic kernel serdev: ttyport: fix tty locking in close serdev: ttyport: fix NULL-deref on hangup serdev: fix receive_buf return value when no callback serdev: ttyport: add missing receive_buf sanity checks serial: 8250_early: Only set divisor if valid clk & baud serial: 8250_pci: Add Amazon PCI serial device ID commit 609b7002705ae72a6ca45b633b7ff1a09a7a0d86 Merge: ae64f9b fc396e0 Author: Radim Krčmář Date: Tue Dec 5 18:02:03 2017 +0100 Merge tag 'kvm-arm-fixes-for-v4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm KVM/ARM Fixes for v4.15. Fixes: - A number of issues in the vgic discovered using SMATCH - A bit one-off calculation in out stage base address mask (32-bit and 64-bit) - Fixes to single-step debugging instructions that trap for other reasons such as MMMIO aborts - Printing unavailable hyp mode as error - Potential spinlock deadlock in the vgic - Avoid calling vgic vcpu free more than once - Broken bit calculation for big endian systems commit 6b0b3bda3d77c35fa9cf20067c0b62daff98c042 Merge: 54b9937 80e4576 Author: Linus Torvalds Date: Tue Dec 5 08:50:04 2017 -0800 Merge tag 'usb-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a few minor USB fixes for 4.15-rc3. The largest here is the Kconfig text and configuration changes for the USB TypeC build options that you reported during the -rc1 merge window. The others are all just small fixes for reported issues, as well as some new device ids. The most "interesting" of anything here is the usbip fixes as it seems lots of people are starting to pay attention to that driver at the moment. These fixes should resolve all of the reported problems as of now. Of course there are the usual xhci and gadget fixes as well, can't go a pull request without those... All of these have been in linux-next for a while with no reported issues" * tag 'usb-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (22 commits) usb: xhci: fix panic in xhci_free_virt_devices_depth_first xhci: Don't show incorrect WARN message about events for empty rings usbip: fix usbip attach to find a port that matches the requested speed usbip: Fix USB device hang due to wrong enabling of scatter-gather uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices usb: quirks: Add no-lpm quirk for KY-688 USB 3.1 Type-C Hub usb: build drivers/usb/common/ when USB_SUPPORT is set usb: hub: Cycle HUB power when initialization fails USB: core: Add type-specific length check of BOS descriptors usb: host: fix incorrect updating of offset USB: ulpi: fix bus-node lookup USB: usbfs: Filter flags passed in from user space usb: add user selectable option for the whole USB Type-C Support usb: f_fs: Force Reserved1=1 in OS_DESC_EXT_COMPAT usb: gadget: core: Fix ->udc_set_speed() speed handling usb: gadget: allow to enable legacy drivers without USB_ETH usb: gadget: udc: renesas_usb3: fix number of the pipes usb: gadget: don't dereference g until after it has been null checked USB: serial: usb_debug: add new USB device id usb: bdc: fix platform_no_drv_owner.cocci warnings ... commit 58117672943734715bbe7565ac9f062effa524f0 Author: Zumeng Chen Date: Mon Dec 4 11:22:02 2017 +0800 gianfar: fix a flooded alignment reports because of padding issue. According to LS1021A RM, the value of PAL can be set so that the start of the IP header in the receive data buffer is aligned to a 32-bit boundary. Normally, setting PAL = 2 provides minimal padding to ensure such alignment of the IP header. However every incoming packet's 8-byte time stamp will be inserted into the packet data buffer as padding alignment bytes when hardware time stamping is enabled. So we set the padding 8+2 here to avoid the flooded alignment faults: root@128:~# cat /proc/cpu/alignment User: 0 System: 17539 (inet_gro_receive+0x114/0x2c0) Skipped: 0 Half: 0 Word: 0 DWord: 0 Multi: 17539 User faults: 2 (fixup) Also shown when exception report enablement CPU: 0 PID: 161 Comm: irq/66-eth1_g0_ Not tainted 4.1.21-rt13-WR8.0.0.0_preempt-rt #16 Hardware name: Freescale LS1021A [<8001b420>] (unwind_backtrace) from [<8001476c>] (show_stack+0x20/0x24) [<8001476c>] (show_stack) from [<807cfb48>] (dump_stack+0x94/0xac) [<807cfb48>] (dump_stack) from [<80025d70>] (do_alignment+0x720/0x958) [<80025d70>] (do_alignment) from [<80009224>] (do_DataAbort+0x40/0xbc) [<80009224>] (do_DataAbort) from [<80015398>] (__dabt_svc+0x38/0x60) Exception stack(0x86ad1cc0 to 0x86ad1d08) 1cc0: f9b3e080 86b3d072 2d78d287 00000000 866816c0 86b3d05e 86e785d0 00000000 1ce0: 00000011 0000000e 80840ab0 86ad1d3c 86ad1d08 86ad1d08 806d7fc0 806d806c 1d00: 40070013 ffffffff [<80015398>] (__dabt_svc) from [<806d806c>] (inet_gro_receive+0x114/0x2c0) [<806d806c>] (inet_gro_receive) from [<80660eec>] (dev_gro_receive+0x21c/0x3c0) [<80660eec>] (dev_gro_receive) from [<8066133c>] (napi_gro_receive+0x44/0x17c) [<8066133c>] (napi_gro_receive) from [<804f0538>] (gfar_clean_rx_ring+0x39c/0x7d4) [<804f0538>] (gfar_clean_rx_ring) from [<804f0bf4>] (gfar_poll_rx_sq+0x58/0xe0) [<804f0bf4>] (gfar_poll_rx_sq) from [<80660b10>] (net_rx_action+0x27c/0x43c) [<80660b10>] (net_rx_action) from [<80033638>] (do_current_softirqs+0x1e0/0x3dc) [<80033638>] (do_current_softirqs) from [<800338c4>] (__local_bh_enable+0x90/0xa8) [<800338c4>] (__local_bh_enable) from [<8008025c>] (irq_forced_thread_fn+0x70/0x84) [<8008025c>] (irq_forced_thread_fn) from [<800805e8>] (irq_thread+0x16c/0x244) [<800805e8>] (irq_thread) from [<8004e490>] (kthread+0xe8/0x104) [<8004e490>] (kthread) from [<8000fda8>] (ret_from_fork+0x14/0x2c) Signed-off-by: Zumeng Chen Signed-off-by: David S. Miller drivers/net/ethernet/freescale/gianfar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 54b9937082cda4b80ff8772807d31b30f6e74fcc Merge: f81c728 07c43a3 Author: Linus Torvalds Date: Tue Dec 5 08:47:20 2017 -0800 Merge tag 'pinctrl-v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "As with GPIO not much action in pin control. All are driver fixes: - fix the UART2 RTS pin mode on Intel Denverton - fix the direction_output() behaviour on the Armada 37xx - fix the groups selection per-SoC on the Gemini - fix the interrupt pin bank on the Sunxi A80 - fix the UART mux on the Sunxi A64 - disable the strict mode on the Sunxi H5 driver" * tag 'pinctrl-v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: sunxi: Disable strict mode for H5 driver pinctrl: sunxi: Fix A64 UART mux value pinctrl: sunxi: Fix A80 interrupt pin bank pinctrl: gemini: Fix usage of 3512 groups pinctrl: armada-37xx: Fix direction_output() callback behavior pinctrl: denverton: Fix UART2 RTS pin mode commit f81c7287452d0acd7839da2b66686087151c3a01 Merge: b7ad7ef 8a64e55 Author: Linus Torvalds Date: Tue Dec 5 08:44:19 2017 -0800 Merge tag 'gpio-v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Three small fixes for GPIO. Not much, I'm surprised by the silence in my subsystems. All driver fixes: - fix a crash in the 74x164 driver - fix IRQ banks in the DaVinci driver - fix the vendor prefix in the PCA953x driver" * tag 'gpio-v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: pca953x: fix vendor prefix for PCA9654 gpio: davinci: Assign first bank regs for unbanked case gpio: 74x164: Fix crash during .remove() commit 029b6d1405504984b9d2661110ff1a17467d3426 Author: Johannes Berg Date: Sat Dec 2 08:41:55 2017 +0100 Revert "net: core: maybe return -EEXIST in __dev_alloc_name" This reverts commit d6f295e9def0; some userspace (in the case we noticed it's wpa_supplicant), is relying on the current error code to determine that a fixed name interface already exists. Reported-by: Jouni Malinen Signed-off-by: Johannes Berg Signed-off-by: David S. Miller net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42d779ffc186f6dd26271fc60a7417cb51aca93e Author: Pieter Jansen van Vuuren Date: Fri Dec 1 21:37:23 2017 -0800 nfp: fix port stats for mac representors Previously we swapped the tx_packets, tx_bytes and tx_dropped counters with rx_packets, rx_bytes and rx_dropped counters, respectively. This behaviour is correct and expected for VF representors but it should not be swapped for physical port mac representors. Fixes: eadfa4c3be99 ("nfp: add stats and xmit helpers for representors") Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit c22fe696157dc94a25cc5396b43b29b6d6f4a189 Author: Tony Lindgren Date: Mon Dec 4 08:27:18 2017 -0800 ARM: dts: Fix dm814x missing phy-cells property We have phy-cells for usb_phy0, but it's missing for usb_phy1 and we get: Warning (phys_property): Missing property '#phy-cells' in node /ocp/l4ls@48000000/control@140000/usb-phy@1b00 or bad phandle (referred from /ocp/usb@47400000/usb@47401800:phys[0]) Signed-off-by: Tony Lindgren arch/arm/boot/dts/dm814x.dtsi | 1 + 1 file changed, 1 insertion(+) commit d364b038bc962f494cffb8f6cb6cddbe41bcb5b6 Author: Tony Lindgren Date: Mon Dec 4 08:27:17 2017 -0800 ARM: dts: Fix elm interrupt compiler warning Looks like the interrupt property is missing the controller and level information causing: Warning (interrupts_property): interrupts size is (4), expected multiple of 12 in /ocp/elm@48078000 Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e599ea1410c3a2f55716f9c309587235cca32025 Author: Eric Dumazet Date: Fri Dec 1 15:28:44 2017 -0800 Revert "tcp: must block bh in __inet_twsk_hashdance()" We had to disable BH _before_ calling __inet_twsk_hashdance() in commit cfac7f836a71 ("tcp/dccp: block bh before arming time_wait timer"). This means we can revert 614bdd4d6e61 ("tcp: must block bh in __inet_twsk_hashdance()"). Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/inet_timewait_sock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b7ad7ef742a99c148631d38a98da72e7db8f6fd0 Author: Linus Torvalds Date: Tue Dec 5 08:23:20 2017 -0800 remove task and stack pointer printout from oops dump Geert Uytterhoeven reported a NFS oops, and pointed out that some of the numbers were hashed and useless. We could just turn them from '%p' into '%px', but those numbers are really just legacy, and useless even when not hashed. So just remove them entirely. Reported-by: Geert Uytterhoeven Signed-off-by: Linus Torvalds kernel/printk/printk.c | 3 --- 1 file changed, 3 deletions(-) commit be17f1ce8572d6e15559897421fb7041360bb64a Author: Wolfram Sang Date: Thu Nov 30 15:49:10 2017 +0100 mmc: core: properly init drv_type When the latest version of parsing the new eMMC bindings was moved from core.c to mmc.c, it was overlooked that drv_type could be used uninitialized. Fix it! Fixes: 6186d06c519e21 ("mmc: parse new binding for eMMC fixed driver type") Reported-by: Colin Ian King Reported-by: Dan Carpenter Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/core/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 46442beed972d439210580739bc006713375c5b4 Author: James Ausmus Date: Thu Nov 30 18:17:00 2017 -0800 drm/i915/cnl: Mask previous DDI - PLL mapping Without masking out the old value, we can end up pointing the DDI to a disabled PLL, which makes the system fall over. Mask out the previous value before setting the PLL to DDI mapping. This can be observed by running igt/testdisplay with both an eDP and HDMI/DP output active. v2: Add the Bugzilla link Fixes: 555e38d273172 ("drm/i915/cnl: DDI - PLL mapping") Testcase: igt/testdisplay Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103997 Cc: Rodrigo Vivi Cc: Matt Atwood Signed-off-by: James Ausmus Reviewed-by: Rodrigo Vivi Tested-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20171201021700.13504-1-james.ausmus@intel.com (cherry picked from commit 23a7068ec581fcc6fb61039448632d25987b1fae) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_ddi.c | 1 + 1 file changed, 1 insertion(+) commit a87e55f89f0b0dc541d89248a8445635936a3858 Author: Ville Syrjälä Date: Wed Nov 29 17:37:30 2017 +0200 drm/i915: Fix vblank timestamp/frame counter jumps on gen2 Previously I was under the impression that the scanline counter reads 0 when the pipe is off. Turns out that's not correct, and instead the scanline counter simply stops when the pipe stops, and it retains it's last value until the pipe starts up again, at which point the scanline counter jumps to vblank start. These jumps can cause the timestamp to jump backwards by one frame. Since we use the timestamps to guesstimage also the frame counter value on gen2, that would cause the frame counter to also jump backwards, which leads to a massice difference from the previous value. The end result is that flips/vblank events don't appear to complete as they're stuck waiting for the frame counter to catch up to that massive difference. Fix the problem properly by actually making sure the scanline counter has started to move before we assume that it's safe to enable vblank processing. v2: Less pointless duplication in the code (Chris) Cc: stable@vger.kernel.org Cc: Daniel Vetter Cc: Chris Wilson Reviewed-by: Chris Wilson Fixes: b7792d8b54cc ("drm/i915: Wait for pipe to start before sampling vblank timestamps on gen2") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171129153732.3612-1-ville.syrjala@linux.intel.com (cherry picked from commit 8fedd64dabc86d0f31a0d1e152be3aa23c323553) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_display.c | 51 +++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 16 deletions(-) commit dda4b8f73231e70df32f3a218b7ceb6704ec860c Author: Chris Wilson Date: Thu Nov 30 10:29:51 2017 +0000 drm/i915: Skip switch-to-kernel-context on suspend when wedged If the HW is already wedged, attempting to submit a request will generate an -EIO. If we tried this during suspend, we would abort whereas all we want to do is to go sleep and throw away the corrupt state. Fixes: 5ab57c702069 ("drm/i915: Flush logical context image out to memory upon suspend") Testcase: igt/gem_eio/suspend Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171130102951.14965-1-chris@chris-wilson.co.uk (cherry picked from commit ecf73eb2d27d43b2153bb80671768a06d35521f1) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 66bc5df31110652a31c91f14b4e23f7c51e5328e Author: Martijn Coenen Date: Tue Dec 5 12:40:17 2017 +0100 MAINTAINERS: update Android driver maintainers. Add Todd Kjos and myself, remove Riley (who no longer works at Google). Signed-off-by: Martijn Coenen Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ca0168e8a77cf833f8c9ac1d26a3a4012bab4f72 Author: Al Viro Date: Tue Dec 5 09:32:25 2017 -0500 alloc_super(): do ->s_umount initialization earlier ... so that failure exits could count on it having been done. Signed-off-by: Al Viro fs/super.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit bf19037074e770aad74b3b90f37b8b98db3f3748 Author: Sara Sharon Date: Mon Feb 8 23:30:47 2016 +0200 iwlwifi: mvm: mark MIC stripped MPDUs When RADA is active, the hardware decrypts the packets and strips off the MIC as it is useless after decryption. Indicate that to mac80211. Cc: stable@vger.kernel.org # 4.13+ [this is needed for the 9000-series HW to work properly] Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 2 ++ 1 file changed, 2 insertions(+) commit 9d0fc5a50a0548f8e5d61243e5e5f26d5c405aef Author: David Spinadel Date: Mon Nov 21 17:01:25 2016 +0200 iwlwifi: mvm: enable RX offloading with TKIP and WEP Set the flag that indicates that ICV was stripped on if this option was enabled in the HW. Cc: stable@vger.kernel.org # 4.13+ [this is needed for the 9000-series HW to work properly] Signed-off-by: David Spinadel Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 4 +++- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 12 +++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) commit 6c2d49fdc5d947c5fe89935bd52e69f10000f4cb Author: Johannes Berg Date: Mon Nov 13 17:26:09 2017 +0100 iwlwifi: mvm: flush queue before deleting ROC Before deleting a time event (remain-on-channel instance), flush the queue so that frames cannot get stuck on it. We already flush the AUX STA queues, but a separate station is used for the P2P Device queue. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 ++ .../net/wireless/intel/iwlwifi/mvm/time-event.c | 24 ++++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) commit 567deca8e72df3ceb6c07c63f8541a4928f64d3b Author: Ihab Zhaika Date: Thu Nov 16 09:29:19 2017 +0200 iwlwifi: add new cards for 9260 and 22000 series add 1 PCI ID for 9260 series and 1 for 22000 series. Cc: stable@vger.kernel.org Signed-off-by: Ihab Zhaika Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 037776e4c667a658616a9ea63d792874328c5fba Merge: 2391f0b a81c421 Author: Daniel Borkmann Date: Tue Dec 5 15:02:41 2017 +0100 Merge branch 'bpf-fix-broken-uapi-for-pt-regs' Hendrik Brueckner says: ==================== Perf tool bpf selftests revealed a broken uapi for s390 and arm64. With the BPF_PROG_TYPE_PERF_EVENT program type the bpf_perf_event structure exports the pt_regs structure for all architectures. This fails for s390 and arm64 because pt_regs are not part of the user api and kept in-kernel only. To mitigate the broken uapi, introduce a wrapper that exports pt_regs in an asm-generic way. For arm64, export the exising user_pt_regs structure. For s390, introduce a user_pt_regs structure that exports the beginning of pt_regs. Note that user_pt_regs must export from the beginning of pt_regs as BPF_PROG_TYPE_PERF_EVENT program type is not the only type for running BPF programs. Some more background: For the bpf_perf_event, there is a uapi definition that is passed to the BPF program. For other "probe" points like trace points, kprobes, and uprobes, there is no uapi and the BPF program is always passed pt_regs (which is OK as the BPF program runs in the kernel context). The perf tool can attach BPF programs to all of these "probe" points and, optionally, can create a BPF prologue to access particular arguments (passed as registers). For this, it uses DWARF/CFI information to obtain the register and calls a perf-arch backend function, regs_query_register_offset(). This function returns the index into (user_)pt_regs for a particular register. Then, perf creates a BPF prologue that accesses this register based on the passed stucture from the "probe" point. Part of this series, are also updates to the testing and bpf selftest to deal with asm-specifics. To complete the bpf support in perf, the the regs_query_register_offset function is added for s390 to support BPF prologue creation. Changelog v1 -> v2: - Correct kbuild test bot issues by including asm-generic/bpf_perf_event.h for archictectures that do not have their own asm version. - Added patch to clean-up whitespace and coding style issues in s390 asm/ptrace.h (#4/6) as suggested by Alexei. ==================== Signed-off-by: Daniel Borkmann commit a81c42136604fb660b366d1ff6d9e0969f166413 Author: Hendrik Brueckner Date: Mon Dec 4 10:56:49 2017 +0100 perf s390: add regs_query_register_offset() The regs_query_register_offset() helper function converts register name like "%r0" to an offset of a register in user_pt_regs It is required by the BPF prologue generator. The user_pt_regs structure was recently added to "asm/ptrace.h". Hence, update tools/perf/check-headers.sh to keep the header file in sync with kernel changes. Suggested-by: Thomas Richter Signed-off-by: Hendrik Brueckner Reviewed-and-tested-by: Thomas Richter Acked-by: Alexei Starovoitov Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Heiko Carstens Signed-off-by: Daniel Borkmann tools/perf/arch/s390/Makefile | 1 + tools/perf/arch/s390/util/dwarf-regs.c | 32 +++++++++++++++++++++++++++++--- tools/perf/check-headers.sh | 1 + 3 files changed, 31 insertions(+), 3 deletions(-) commit 618e165b2a8e10765dd2a4f9866d118a474f0faf Author: Hendrik Brueckner Date: Mon Dec 4 10:56:48 2017 +0100 selftests/bpf: sync kernel headers and introduce arch support in Makefile Synchronize the uapi kernel header files which solves the broken uapi export of pt_regs. Because of arch-specific uapi headers, extended the include path in the Makefile. With this change, the test_verifier program compiles and runs successfully on s390. Signed-off-by: Hendrik Brueckner Reviewed-and-tested-by: Thomas Richter Acked-by: Alexei Starovoitov Cc: Daniel Borkmann Cc: Shuah Khan Signed-off-by: Daniel Borkmann tools/arch/arm64/include/uapi/asm/bpf_perf_event.h | 9 + tools/arch/s390/include/uapi/asm/bpf_perf_event.h | 9 + tools/arch/s390/include/uapi/asm/ptrace.h | 457 +++++++++++++++++++++ tools/include/uapi/asm-generic/bpf_perf_event.h | 9 + tools/include/uapi/linux/bpf_perf_event.h | 6 +- tools/testing/selftests/bpf/Makefile | 14 +- 6 files changed, 500 insertions(+), 4 deletions(-) commit 62e1dfa3e1e32fbc351548e7fae2d97c46d25a33 Author: Hendrik Brueckner Date: Mon Dec 4 10:56:47 2017 +0100 s390/uapi: correct whitespace & coding style in asm/ptrace.h Correct whitespace and coding style issues in the s390 asm/ptrace.h uapi header file. This is preparatory work to copy it to the tools/ directory for inclusion by selftests and perf. Signed-off-by: Hendrik Brueckner Signed-off-by: Daniel Borkmann arch/s390/include/uapi/asm/ptrace.h | 118 ++++++++++++++++-------------------- 1 file changed, 52 insertions(+), 66 deletions(-) commit a39cada70268aadff7153e4f782bcd90a5c69d07 Author: Hendrik Brueckner Date: Mon Dec 4 10:56:46 2017 +0100 arm64/bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type Correct the broken uapi for the BPF_PROG_TYPE_PERF_EVENT program type by exporting the user_pt_regs structure instead of the pt_regs structure that is in-kernel only. Signed-off-by: Hendrik Brueckner Reviewed-by: Thomas Richter Acked-by: Alexei Starovoitov Cc: Will Deacon Cc: Mark Rutland Cc: Arnaldo Carvalho de Melo Signed-off-by: Daniel Borkmann arch/arm64/include/asm/perf_event.h | 2 ++ arch/arm64/include/uapi/asm/bpf_perf_event.h | 9 +++++++++ 2 files changed, 11 insertions(+) commit 466698e654e8931945301ea999feb6bd4bfaf849 Author: Hendrik Brueckner Date: Mon Dec 4 10:56:45 2017 +0100 s390/bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type To mitigate and correct the broken uapi for the BPF_PROG_TYPE_PERF_EVENT program type, introduce a user_pt_regs structure (similar to arm64) that exports parts from the beginnig of the pt_regs structure. The export must start with the beginning of the pt_regs structure because to correctly calculate BPF prologues for perf (regs_query_register_offset()). For BPF_PROG_TYPE_PERF_EVENT program types, the BPF program is then passed a user_pt_regs structure. Note: Depending on future changes to the s390 pt_regs structure, consider the user_pt_regs structure to be stable for a particular kernel version only. (Of course, s390 tries to ensure keep it stable as much as possible.) Signed-off-by: Hendrik Brueckner Reviewed-and-tested-by: Thomas Richter Acked-by: Alexei Starovoitov Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Signed-off-by: Daniel Borkmann arch/s390/include/asm/perf_event.h | 1 + arch/s390/include/asm/ptrace.h | 11 ++++++++--- arch/s390/include/uapi/asm/bpf_perf_event.h | 9 +++++++++ arch/s390/include/uapi/asm/ptrace.h | 11 +++++++++++ 4 files changed, 29 insertions(+), 3 deletions(-) commit c895f6f703ad7dd2f99e751d9884b0aa5d0eea25 Author: Hendrik Brueckner Date: Mon Dec 4 10:56:44 2017 +0100 bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type Commit 0515e5999a466dfe ("bpf: introduce BPF_PROG_TYPE_PERF_EVENT program type") introduced the bpf_perf_event_data structure which exports the pt_regs structure. This is OK for multiple architectures but fail for s390 and arm64 which do not export pt_regs. Programs using them, for example, the bpf selftest fail to compile on these architectures. For s390, exporting the pt_regs is not an option because s390 wants to allow changes to it. For arm64, there is a user_pt_regs structure that covers parts of the pt_regs structure for use by user space. To solve the broken uapi for s390 and arm64, introduce an abstract type for pt_regs and add an asm/bpf_perf_event.h file that concretes the type. An asm-generic header file covers the architectures that export pt_regs today. The arch-specific enablement for s390 and arm64 follows in separate commits. Reported-by: Thomas Richter Fixes: 0515e5999a466dfe ("bpf: introduce BPF_PROG_TYPE_PERF_EVENT program type") Signed-off-by: Hendrik Brueckner Reviewed-and-tested-by: Thomas Richter Acked-by: Alexei Starovoitov Cc: Arnaldo Carvalho de Melo Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Arnd Bergmann Cc: Daniel Borkmann Signed-off-by: Daniel Borkmann arch/alpha/include/uapi/asm/Kbuild | 2 ++ arch/arc/include/uapi/asm/Kbuild | 1 + arch/arm/include/uapi/asm/Kbuild | 1 + arch/blackfin/include/uapi/asm/Kbuild | 1 + arch/c6x/include/uapi/asm/Kbuild | 1 + arch/cris/include/uapi/asm/Kbuild | 1 + arch/frv/include/uapi/asm/Kbuild | 2 ++ arch/h8300/include/uapi/asm/Kbuild | 1 + arch/hexagon/include/uapi/asm/Kbuild | 1 + arch/ia64/include/uapi/asm/Kbuild | 1 + arch/m32r/include/uapi/asm/Kbuild | 1 + arch/m68k/include/uapi/asm/Kbuild | 1 + arch/metag/include/uapi/asm/Kbuild | 1 + arch/microblaze/include/uapi/asm/Kbuild | 1 + arch/mips/include/uapi/asm/Kbuild | 1 + arch/mn10300/include/uapi/asm/Kbuild | 1 + arch/nios2/include/uapi/asm/Kbuild | 1 + arch/openrisc/include/uapi/asm/Kbuild | 1 + arch/parisc/include/uapi/asm/Kbuild | 1 + arch/powerpc/include/uapi/asm/Kbuild | 1 + arch/riscv/include/uapi/asm/Kbuild | 1 + arch/score/include/uapi/asm/Kbuild | 1 + arch/sh/include/uapi/asm/Kbuild | 1 + arch/sparc/include/uapi/asm/Kbuild | 1 + arch/tile/include/uapi/asm/Kbuild | 1 + arch/unicore32/include/uapi/asm/Kbuild | 1 + arch/x86/include/uapi/asm/Kbuild | 1 + arch/xtensa/include/uapi/asm/Kbuild | 1 + include/linux/perf_event.h | 6 +++++- include/uapi/asm-generic/bpf_perf_event.h | 9 +++++++++ include/uapi/linux/bpf_perf_event.h | 5 ++--- kernel/events/core.c | 2 +- 32 files changed, 47 insertions(+), 5 deletions(-) commit ab9dbf771ff9b6b7e814e759213ed01d7f0de320 Author: David Gibson Date: Mon Dec 4 16:27:25 2017 +1100 Revert "powerpc: Do not call ppc_md.panic in fadump panic notifier" This reverts commit a3b2cb30f252b21a6f962e0dd107c8b897ca65e4. That commit tried to fix problems with panic on powerpc in certain circumstances, where some output from the generic panic code was being dropped. Unfortunately, it breaks things worse in other circumstances. In particular when running a PAPR guest, it will now attempt to reboot instead of informing the hypervisor (KVM or PowerVM) that the guest has crashed. The crash notification is important to some virtualization management layers. Revert it for now until we can come up with a better solution. Fixes: a3b2cb30f252 ("powerpc: Do not call ppc_md.panic in fadump panic notifier") Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: David Gibson [mpe: Tweak change log a bit] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/machdep.h | 1 + arch/powerpc/include/asm/setup.h | 1 + arch/powerpc/kernel/fadump.c | 22 ---------------------- arch/powerpc/kernel/setup-common.c | 27 +++++++++++++++++++++++++++ arch/powerpc/platforms/ps3/setup.c | 15 +++++++++++++++ arch/powerpc/platforms/pseries/setup.c | 1 + 6 files changed, 45 insertions(+), 22 deletions(-) commit f429e7e494afaded76e62c6f98211a635aa03098 Author: Kailang Yang Date: Tue Dec 5 15:38:24 2017 +0800 ALSA: hda/realtek - New codec support for ALC257 Add new support for ALC257 codec. [ It's supposed to be almost equivalent with other ALC25x variants, just adding another type and id -- tiwai ] Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f88e9301948173dd35afad4a6939092c7f269aed Author: Sergey Matyukevich Date: Fri Nov 3 22:58:54 2017 +0300 arm64: dts: orange-pi-zero-plus2: fix sdcard detect The sdcard detect pin on orange-pi-zero-plus2 is pulled up. Fix cd-gpio description to enable sdcard detect. Signed-off-by: Sergey Matyukevich Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d556bfc49adddf2beb0d16c91945c3b8b783282 Author: Jagan Teki Date: Mon Dec 4 10:23:07 2017 +0530 arm64: allwinner: a64-sopine: Fix to use dcdc1 regulator instead of vcc3v3 Since current tree support AXP803 regulators, replace fixed regulator vcc3v3 with AXP803 dcdc1 regulator where ever it need to replace. Tested mmc0 on sopine baseboard. Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 2 +- arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) commit e17e237cd69f9f6ecaa0e875f889ad401a625148 Author: Chen-Yu Tsai Date: Mon Dec 4 16:44:01 2017 +0800 ARM: dts: sunxi: Convert to CCU index macros for HDMI controller When the HDMI controller device node was added, the needed PLL clock macros were not exported. A separate patch addresses that, but it is merged through a different tree. Now that both patches are in mainline proper, we can convert the raw numbers to proper macros. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 4 ++-- arch/arm/boot/dts/sun5i-a10s.dtsi | 4 ++-- arch/arm/boot/dts/sun6i-a31.dtsi | 4 ++-- arch/arm/boot/dts/sun7i-a20.dtsi | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) commit e2bf801ecd4e62222a46d1ba9e57e710171d29c1 Author: Stefan Brüns Date: Mon Nov 27 20:05:34 2017 +0100 sunxi-rsb: Include OF based modalias in device uevent Include the OF-based modalias in the uevent sent when registering devices on the sunxi RSB bus, so that user space has a chance to autoload the kernel module for the device. Fixes a regression caused by commit 3f241bfa60bd ("arm64: allwinner: a64: pine64: Use dcdc1 regulator for mmc0"). When the axp20x-rsb module for the AXP803 PMIC is built as a module, it is not loaded and the system ends up with an disfunctional MMC controller. Fixes: d787dcdb9c8f ("bus: sunxi-rsb: Add driver for Allwinner Reduced Serial Bus") Cc: stable # 4.4.x 7a3b7cd332db of: device: Export of_device_{get_modalias, uvent_modalias} to modules Acked-by: Chen-Yu Tsai Signed-off-by: Stefan Brüns Signed-off-by: Maxime Ripard drivers/bus/sunxi-rsb.c | 1 + 1 file changed, 1 insertion(+) commit 8d306f53b63099fec2d56300149e400d181ba4f5 Author: Heiko Carstens Date: Mon Dec 4 09:42:45 2017 +0100 s390/mm: fix off-by-one bug in 5-level page table handling Martin Cermak reported that setting a uprobe doesn't work. Reason for this is that the common uprobes code tries to get an unmapped area at the last possible page within an address space. This broke with commit 1aea9b3f9210 ("s390/mm: implement 5 level pages tables") which introduced an off-by-one bug which prevents to map anything at the last possible page within an address space. The check with the off-by-one bug however can be removed since with commit 8ab867cb0806 ("s390/mm: fix BUG_ON in crst_table_upgrade") the necessary check is done at both call sites. Reported-by: Martin Cermak Bisected-by: Thomas Richter Fixes: 1aea9b3f9210 ("s390/mm: implement 5 level pages tables") Cc: # v4.13+ Reviewed-by: Hendrik Brueckner Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/mm/pgalloc.c | 2 -- 1 file changed, 2 deletions(-) commit 987b154983f0e70b02edf6fc75fcc2f6e6d670b9 Author: Martin Schwidefsky Date: Mon Dec 4 10:57:02 2017 +0100 s390: Remove redudant license text More files under arch/s390 have been tagged with the SPDX identifier, a few of those files have a GPL license text. Remove the GPL text as it is no longer needed. Signed-off-by: Martin Schwidefsky arch/s390/crypto/sha1_s390.c | 6 ------ arch/s390/include/asm/ap.h | 4 ---- 2 files changed, 10 deletions(-) commit 9fa1db4c7511543c951128758f358cd7aad99628 Author: Martin Schwidefsky Date: Mon Dec 4 10:39:38 2017 +0100 s390: add a few more SPDX identifiers Add the correct SPDX license to a few more files under arch/s390 and drivers/s390 which have been missed to far. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Martin Schwidefsky arch/s390/Kbuild | 1 + arch/s390/appldata/Makefile | 1 + arch/s390/boot/compressed/vmlinux.scr | 1 + arch/s390/crypto/sha1_s390.c | 1 + arch/s390/hypfs/Makefile | 1 + arch/s390/include/asm/Kbuild | 1 + arch/s390/include/asm/alternative.h | 1 + arch/s390/include/asm/ap.h | 1 + arch/s390/include/asm/bugs.h | 1 + arch/s390/include/asm/segment.h | 1 + arch/s390/include/asm/vga.h | 1 + arch/s390/include/uapi/asm/Kbuild | 1 + arch/s390/include/uapi/asm/perf_regs.h | 1 + arch/s390/include/uapi/asm/sthyi.h | 1 + arch/s390/include/uapi/asm/vmcp.h | 1 + arch/s390/kernel/alternative.c | 1 + arch/s390/kernel/perf_regs.c | 1 + arch/s390/kernel/vdso64/note.S | 1 + arch/s390/net/Makefile | 1 + arch/s390/numa/Makefile | 1 + arch/s390/pci/Makefile | 1 + arch/s390/tools/gen_opcode_table.c | 1 + drivers/s390/Makefile | 1 + drivers/s390/block/Kconfig | 1 + drivers/s390/char/Kconfig | 1 + drivers/s390/char/defkeymap.map | 1 + drivers/s390/cio/blacklist.h | 1 + drivers/s390/net/Kconfig | 1 + drivers/s390/scsi/Makefile | 1 + 29 files changed, 29 insertions(+) commit da340f921d3454f1521671c7a5a43ad3331fbe50 Author: Stefan Haberland Date: Thu Oct 26 14:37:35 2017 +0200 s390/dasd: prevent prefix I/O error Prevent that a prefix flag is set based on invalid configuration data. The validity.verify_base flag should only be set for alias devices. Usually the unit address type is either one of base, PAV alias or HyperPAV alias. But in cases where the unit address type is not set or any other value the validity.verify_base flag might be set as well. This would lead to follow on errors. Explicitly check for alias devices and set the validity flag only for them. Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_eckd.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit fbbd7f1a51965b50dd12924841da0d478f3da71b Author: Heiko Carstens Date: Mon Nov 20 12:38:44 2017 +0100 s390: always save and restore all registers on context switch The switch_to() macro has an optimization to avoid saving and restoring register contents that aren't needed for kernel threads. There is however the possibility that a kernel thread execve's a user space program. In such a case the execve'd process can partially see the contents of the previous process, which shouldn't be allowed. To avoid this, simply always save and restore register contents on context switch. Cc: # v2.6.37+ Fixes: fdb6d070effba ("switch_to: dont restore/save access & fpu regs for kernel threads") Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/switch_to.h | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) commit bd7a9b3757895c3a2fd64b3f12e438d9190c83d9 Author: Arnd Bergmann Date: Mon Nov 27 12:46:57 2017 +0100 s390/dasd: remove 'struct timespec' usage getnstimeofday() and timespec are deprecated since they can overflow on 32-bit architectures. This simply changes to the explicitly typed timespec64 version that doesn't have that problem. It would be nice to also convert to monotonic timestamps and call ktime_get_ts64() rather than ktime_get_real_ts64(), but that would be a user-visible change. Signed-off-by: Arnd Bergmann Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd.c | 10 +++++----- drivers/s390/block/dasd_int.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit b23481fbfc567fea256a69b307ced283c56aba99 Author: Julian Wiedmann Date: Mon Oct 23 09:38:18 2017 +0200 s390/qdio: restrict target-full handling to IQDIO The 'no target buffer empty' error code only applies to HiperSockets. If this code is reported on a different queue type, be sure to make the same amount of noise as for any other error code. Signed-off-by: Julian Wiedmann Reviewed-by: Benjamin Block Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0b926ac304a9b315f0ce8ce2ae5373b5a0478b68 Author: Julian Wiedmann Date: Mon Oct 23 09:40:16 2017 +0200 s390/qdio: consider ERROR buffers for inbound-full condition In the unlikely case that an ERROR buffer (presented by the HW) consumed the last available slot on the input queue, increment the corresponding statistics counter. Signed-off-by: Julian Wiedmann Reviewed-by: Benjamin Block Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit edfb8d8fcb94a75b2e61c63549d4a5f6474ad3d2 Author: Michael S. Tsirkin Date: Tue Nov 28 16:11:29 2017 +0200 s390/virtio: add BSD license to virtio-ccw The original intent of the virtio header relicensing from 2008 was to make sure anyone can implement compatible devices/drivers. The virtio-ccw was omitted by mistake. We have an ack from the only contributor as well as the maintainer from IBM, so it's not too late to fix that. Make it dual-licensed with GPLv2, as the whole kernel is GPL2. Acked-by: Christian Borntraeger Acked-by: Cornelia Huck Signed-off-by: Michael S. Tsirkin Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/uapi/asm/virtio-ccw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81df022b688d43d2a3667518b2f755d384397910 Author: Martin Wilck Date: Mon Nov 27 23:47:35 2017 +0100 scsi: scsi_devinfo: cleanly zero-pad devinfo strings Cleanly fill memory for "vendor" and "model" with 0-bytes for the "compatible" case rather than adding only a single 0 byte. This simplifies the devinfo code a a bit, and avoids mistakes in other places of the code (not in current upstream, but we had one such mistake in the SUSE kernel). [mkp: applied by hand and added braces] Signed-off-by: Martin Wilck Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_devinfo.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) commit ba69ead9e9e9bb3cec5faf03526c36764ac8942a Author: Martin Wilck Date: Mon Nov 27 23:47:34 2017 +0100 scsi: scsi_devinfo: handle non-terminated strings devinfo->vendor and devinfo->model aren't necessarily zero-terminated. Fixes: b8018b973c7c "scsi_devinfo: fixup string compare" Signed-off-by: Martin Wilck Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/scsi_devinfo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bdfbbda90aeb75ce0951413fd7f495d4d377bd5e Author: Tejun Heo Date: Mon Dec 4 14:55:59 2017 -0800 Revert "cgroup/cpuset: remove circular dependency deadlock" This reverts commit aa24163b2ee5c92120e32e99b5a93143a0f4258e. This and the following commit led to another circular locking scenario and the scenario which is fixed by this commit no longer exists after e8b3f8db7aad ("workqueue/hotplug: simplify workqueue_offline_cpu()") which removes work item flushing from hotplug path. Revert it for now. Signed-off-by: Tejun Heo kernel/cgroup/cpuset.c | 53 ++++++++++++++++++++++---------------------------- 1 file changed, 23 insertions(+), 30 deletions(-) commit 62408c1ef00784e8bcfc4848ade76480fb8aed21 Author: Lai Jiangshan Date: Fri Dec 1 22:23:07 2017 +0800 workqueue/hotplug: remove the workaround in rebind_workers() Since the cpu/hotplug refactoring, DOWN_FAILED is never called without preceding DOWN_PREPARE making the workaround unnecessary. Remove it. Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo kernel/workqueue.c | 10 ---------- 1 file changed, 10 deletions(-) commit e8b3f8db7aad99fcc5234fc5b89984ff6620de3d Author: Lai Jiangshan Date: Fri Dec 1 22:20:36 2017 +0800 workqueue/hotplug: simplify workqueue_offline_cpu() Since the recent cpu/hotplug refactoring, workqueue_offline_cpu() is guaranteed to run on the local cpu which is going offline. This also fixes the following deadlock by removing work item scheduling and flushing from CPU hotplug path. http://lkml.kernel.org/r/1504764252-29091-1-git-send-email-prsood@codeaurora.org tj: Description update. Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo kernel/workqueue.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 11db855c3d06e82f432cb1bafd73296586d5ceec Author: Tejun Heo Date: Mon Dec 4 14:41:11 2017 -0800 Revert "cpuset: Make cpuset hotplug synchronous" This reverts commit 1599a185f0e6113be185b9fb809c621c73865829. This and the previous commit led to another circular locking scenario and the scenario which is fixed by this commit no longer exists after e8b3f8db7aad ("workqueue/hotplug: simplify workqueue_offline_cpu()") which removes work item flushing from hotplug path. Revert it for now. Signed-off-by: Tejun Heo include/linux/cpuset.h | 6 ++++++ kernel/cgroup/cpuset.c | 41 +++++++++++++++++++++-------------------- kernel/power/process.c | 2 ++ kernel/sched/core.c | 1 + 4 files changed, 30 insertions(+), 20 deletions(-) commit 2dc0b46b5ea30f169b0b272253ea846a5a281731 Author: David Milburn Date: Tue Nov 14 16:17:25 2017 -0600 libata: sata_down_spd_limit should return if driver has not recorded sstatus speed During hotplug, it is possible for 6Gbps link speed to be limited all the way down to 1.5 Gbps which may lead to a slower link speed when drive is re-connected. This behavior has been seen on a Intel Lewisburg SATA controller (8086:a1d2) with HGST HUH728080ALE600 drive where SATA link speed was limited to 1.5 Gbps and when re-connected the link came up 3.0 Gbps. This patch was retested on above configuration and showed the hotplugged link to come back online at max speed (6Gbps). I did not see the downgrade when testing on Intel C600/X79, but retested patched linux-4.14-rc5 kernel and didn't see any side effects from this change. Also, successfully retested hotplug on port multiplier 3Gbps link. tj: Minor comment updates. Signed-off-by: David Milburn Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit fd6d2e506ce6f850d45342a15c896591291b77b5 Merge: 2391f0b 9956cfe Author: Linus Torvalds Date: Mon Dec 4 13:55:28 2017 -0800 Merge tag 'docs-4.15-fixes' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A handful of documentation fixes. The most significant of these addresses a problem with the new warning mode: it can break the build when confronted with a source file containing malformed kerneldoc comments" * tag 'docs-4.15-fixes' of git://git.lwn.net/linux: Documentation: fix docs build error after source file removed scsi: documentation: Fix case of 'scsi_device' struct mention(s) genericirq.rst: Remove :c:func:`...` in code blocks dmaengine: doc : Fix warning "Title underline too short" while make xmldocs scripts/kernel-doc: Don't fail with status != 0 if error encountered with -none commit 2467c0451ce5574738e223b93e3253c9a7015be1 Author: Matthias Brugger Date: Fri Dec 1 11:47:22 2017 +0100 ahci: mtk: Change driver name to ahci-mtk The driver name "ahci" is already used by the ahci platform driver. This leads to the following error: Error: Driver 'ahci' is already registered, aborting... Change the name to ahci-mtk to fix this. Signed-off-by: Matthias Brugger Signed-off-by: Tejun Heo drivers/ata/ahci_mtk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce179cbdedf2f54306177e591664be7b18cf386a Author: Yuantian Tang Date: Mon Dec 4 17:01:20 2017 +0800 ahci: qoriq: refine port register configuration These PP2C and PP3C registers control the configuration of the PHY control OOB timing for the COMINIT/COMWAKE parameters respectively for sata port. Overwrite default values with calculated ones to get better OOB timing. Signed-off-by: Tang Yuantian Signed-off-by: Tejun Heo drivers/ata/ahci_qoriq.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 4ce413d1840b25b101be3c0559161db8891f3360 Author: Will Deacon Date: Fri Dec 1 15:29:39 2017 +0000 irqdesc: Use bool return type instead of int The irq_balancing_disabled and irq_is_percpu{,_devid} functions are clearly intended to return bool like the functions in kernel/irq/settings.h, but actually return an int containing a masked value of desc->status_use_accessors. This can lead to subtle breakage if, for example, the return value is subsequently truncated when assigned to a narrower type. As Linus points out: | In particular, what can (and _has_ happened) is that people end up | using these functions that return true or false, and they assign the | result to something like a bitfield (or a char) or whatever. | | And the code looks *obviously* correct, when you have things like | | dev->percpu = irq_is_percpu_devid(dev->irq); | | and that "percpu" thing is just one status bit among many. It may even | *work*, because maybe that "percpu" flag ends up not being all that | important, or it just happens to never be set on the particular | hardware that people end up testing. | | But while it looks obviously correct, and might even work, it's really | fundamentally broken. Because that "true or false" function didn't | actually return 0/1, it returned 0 or 0x20000. | | And 0x20000 may not fit in a bitmask or a "char" or whatever. Fix the problem by consistently using bool as the return type for these functions. Reported-by: Linus Torvalds Signed-off-by: Will Deacon Signed-off-by: Thomas Gleixner Cc: marc.zyngier@arm.com Link: https://lkml.kernel.org/r/1512142179-24616-1-git-send-email-will.deacon@arm.com include/linux/irqdesc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bb5c43428252f27b875c764451321a83a531d6e5 Author: Thomas Gleixner Date: Tue Nov 28 15:40:33 2017 +0100 genirq/matrix: Fix the precedence fix for real The previous commit which made the operator precedence in irq_matrix_available() explicit made the implicit brokenness explicitely wrong. It was wrong in the original commit already. The overworked maintainer did not notice it either when merging the patch. Replace the confusing '?' construct by a simple and obvious if (). Fixes: 75f1133873d6 ("genirq/matrix: Make - vs ?: Precedence explicit") Reported-by: Rasmus Villemoes Signed-off-by: Thomas Gleixner Cc: Kees Cook kernel/irq/matrix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2391f0b4808e3d5af348324d69f5f45c56a26836 Merge: 236fa07 d9e427f Author: Linus Torvalds Date: Mon Dec 4 11:32:02 2017 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixes from Michael Tsirkin: "virtio and qemu bugfixes A couple of bugfixes that just became ready" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_balloon: fix increment of vb->num_pfns in fill_balloon() virtio: release virtio index when fail to device_register fw_cfg: fix driver remove commit bc53e3aa88e8240823c1c440e6bab3c3a5ba5f59 Author: Peter Rosin Date: Mon Nov 27 17:31:01 2017 +0100 ARM: dts: at91: disable the nxp,se97b SMBUS timeout on the TSE-850 The I2C adapter driver is sometimes slow, causing the SCL line to be stuck low for more than the stipulated SMBUS timeout of 25-35 ms. This causes the client device to give up which in turn causes silent corruption of data. So, disable the SMBUS timeout in the client device. Signed-off-by: Peter Rosin Acked-by: Guenter Roeck Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-tse850-3.dts | 1 + 1 file changed, 1 insertion(+) commit 236fa078c622610a5e9df6225e997bd027cbf3c3 Merge: 8ee5ad1 c2eb6d0 Author: Linus Torvalds Date: Mon Dec 4 11:14:46 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Various TCP control block fixes, including one that crashes with SELinux, from David Ahern and Eric Dumazet. 2) Fix ACK generation in rxrpc, from David Howells. 3) ipvlan doesn't set the mark properly in the ipv4 route lookup key, from Gao Feng. 4) SIT configuration doesn't take on the frag_off ipv4 field configuration properly, fix from Hangbin Liu. 5) TSO can fail after device down/up on stmmac, fix from Lars Persson. 6) Various bpftool fixes (mostly in JSON handling) from Quentin Monnet. 7) Various SKB leak fixes in vhost/tun/tap (mostly observed as performance problems). From Wei Xu. 8) mvpps's TX descriptors were not zero initialized, from Yan Markman. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (57 commits) tcp: use IPCB instead of TCP_SKB_CB in inet_exact_dif_match() tcp: add tcp_v4_fill_cb()/tcp_v4_restore_cb() rxrpc: Fix the MAINTAINERS record rxrpc: Use correct netns source in rxrpc_release_sock() liquidio: fix incorrect indentation of assignment statement stmmac: reset last TSO segment size after device open ipvlan: Add the skb->mark as flow4's member to lookup route s390/qeth: build max size GSO skbs on L2 devices s390/qeth: fix GSO throughput regression s390/qeth: fix thinko in IPv4 multicast address tracking tap: free skb if flags error tun: free skb in early errors vhost: fix skb leak in handle_rx() bnxt_en: Fix a variable scoping in bnxt_hwrm_do_send_msg() bnxt_en: fix dst/src fid for vxlan encap/decap actions bnxt_en: wildcard smac while creating tunnel decap filter bnxt_en: Need to unconditionally shut down RoCE in bnxt_shutdown phylink: ensure we take the link down when phylink_stop() is called sfp: warn about modules requiring address change sequence sfp: improve RX_LOS handling ... commit 8ee5ad1d4c0ba93f96d0db31e98102e61ff7d12b Author: Chris Metcalf Date: Mon Dec 4 10:52:40 2017 -0500 arch/tile: mark as orphaned The chip family of TILEPro and TILE-Gx was developed by Tilera, which was eventually acquired by Mellanox. The tile architecture was added to the kernel in 2010 and first appeared in 2.6.36. Now at Mellanox we are developing new chips based on the ARM64 architecture; our last TILE-Gx chip (the Gx72) was released in 2013, and our customers using tile architecture products are not, as far as we know, looking to upgrade to newer kernel releases. In the absence of someone in the community stepping up to take over maintainership, this commit marks the architecture as orphaned. Cc: Chris Metcalf Signed-off-by: Chris Metcalf Signed-off-by: Linus Torvalds MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit adf6895754e2503d994a765535fd1813f8834674 Author: Dan Williams Date: Thu Nov 30 19:42:52 2017 -0800 acpi, nfit: fix health event notification Integration testing with a BIOS that generates injected health event notifications fails to communicate those events to userspace. The nfit driver neglects to link the ACPI DIMM device with the necessary driver data so acpi_nvdimm_notify() fails this lookup: nfit_mem = dev_get_drvdata(dev); if (nfit_mem && nfit_mem->flags_attr) sysfs_notify_dirent(nfit_mem->flags_attr); Add the necessary linkage when installing the notification handler and clean it up when the nfit driver instance is torn down. Cc: Cc: Toshi Kani Cc: Vishal Verma Fixes: ba9c8dd3c222 ("acpi, nfit: add dimm device notification support") Reported-by: Daniel Osawa Tested-by: Daniel Osawa Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 3fa8c49f27c15df259b7b8f94eb126ae491893fd Author: Heiko Stuebner Date: Mon Dec 4 18:36:10 2017 +0100 arm64: dts: rockchip: fix trailing 0 in rk3328 tsadc interrupts Probably due to some copy-paste mistake, the tsadc of rk3328 ended up with a 0 as 4th element that shouldn't be there, as interrupts on the rk3328 only have multiples of 3, making dtc complain. So remove it. Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3328.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b69f63ebf553504739cc8534cbed31bd530c6f0b Author: Kim Phillips Date: Wed Oct 11 22:33:24 2017 +0100 bus: arm-ccn: fix module unloading Error: Removing state 147 which has instances left. Unregistering the driver before calling cpuhp_remove_multi_state() removes any remaining hotplug cpu instances so __cpuhp_remove_state_cpuslocked() doesn't emit this warning: [ 268.748362] Error: Removing state 147 which has instances left. [ 268.748373] ------------[ cut here ]------------ [ 268.748386] WARNING: CPU: 2 PID: 5476 at kernel/cpu.c:1734 __cpuhp_remove_state_cpuslocked+0x454/0x4f0 [ 268.748389] Modules linked in: arm_ccn(-) [last unloaded: arm_ccn] [ 268.748403] CPU: 2 PID: 5476 Comm: rmmod Tainted: G W 4.14.0-rc4+ #3 [ 268.748406] Hardware name: AMD Seattle/Seattle, BIOS 10:18:39 Dec 8 2016 [ 268.748410] task: ffff8001a18ca000 task.stack: ffff80019c120000 [ 268.748416] PC is at __cpuhp_remove_state_cpuslocked+0x454/0x4f0 [ 268.748421] LR is at __cpuhp_remove_state_cpuslocked+0x448/0x4f0 [ 268.748425] pc : [] lr : [] pstate: 60000145 [ 268.748427] sp : ffff80019c127d30 [ 268.748430] x29: ffff80019c127d30 x28: ffff8001a18ca000 [ 268.748437] x27: ffff20000c2cb000 x26: 1fffe4000042d490 [ 268.748443] x25: ffff20000216a480 x24: 0000000000000000 [ 268.748449] x23: ffff20000b08e000 x22: 0000000000000001 [ 268.748455] x21: 0000000000000093 x20: 00000000000016f8 [ 268.748460] x19: ffff20000c2cbb80 x18: 0000ffffb5fe7c58 [ 268.748466] x17: 00000000004402d0 x16: 1fffe40001864f01 [ 268.748472] x15: ffff20000c4bf8b0 x14: 0000000000000000 [ 268.748477] x13: 0000000000007032 x12: ffff20000829ae48 [ 268.748483] x11: ffff20000c4bf000 x10: 0000000000000004 [ 268.748488] x9 : 0000000000006fbc x8 : ffff20000c318a40 [ 268.748494] x7 : 0000000000000000 x6 : ffff040001864f02 [ 268.748500] x5 : 0000000000000000 x4 : 0000000000000000 [ 268.748505] x3 : 0000000000000007 x2 : dfff200000000000 [ 268.748510] x1 : 000000000000ad3d x0 : 00000000000001f0 [ 268.748516] Call trace: [ 268.748521] Exception stack(0xffff80019c127bf0 to 0xffff80019c127d30) [ 268.748526] 7be0: 00000000000001f0 000000000000ad3d [ 268.748531] 7c00: dfff200000000000 0000000000000007 0000000000000000 0000000000000000 [ 268.748535] 7c20: ffff040001864f02 0000000000000000 ffff20000c318a40 0000000000006fbc [ 268.748539] 7c40: 0000000000000004 ffff20000c4bf000 ffff20000829ae48 0000000000007032 [ 268.748544] 7c60: 0000000000000000 ffff20000c4bf8b0 1fffe40001864f01 00000000004402d0 [ 268.748548] 7c80: 0000ffffb5fe7c58 ffff20000c2cbb80 00000000000016f8 0000000000000093 [ 268.748553] 7ca0: 0000000000000001 ffff20000b08e000 0000000000000000 ffff20000216a480 [ 268.748557] 7cc0: 1fffe4000042d490 ffff20000c2cb000 ffff8001a18ca000 ffff80019c127d30 [ 268.748562] 7ce0: ffff2000081729e0 ffff80019c127d30 ffff2000081729ec 0000000060000145 [ 268.748566] 7d00: 00000000000001f0 0000000000000000 0001000000000000 0000000000000000 [ 268.748569] 7d20: ffff80019c127d30 ffff2000081729ec [ 268.748575] [] __cpuhp_remove_state_cpuslocked+0x454/0x4f0 [ 268.748580] [] __cpuhp_remove_state+0x54/0x80 [ 268.748597] [] arm_ccn_exit+0x2c/0x70 [arm_ccn] [ 268.748604] [] SyS_delete_module+0x5a4/0x708 [ 268.748607] Exception stack(0xffff80019c127ec0 to 0xffff80019c128000) [ 268.748612] 7ec0: 0000000019bb7258 0000000000000800 ba64d0fb3d26a800 00000000000000da [ 268.748616] 7ee0: 0000ffffb6144e28 0000ffffcd95b409 fefefefefefefeff 7f7f7f7f7f7f7f7f [ 268.748621] 7f00: 000000000000006a 1999999999999999 0000ffffb6179000 0000000000bbcc6d [ 268.748625] 7f20: 0000ffffb6176b98 0000ffffcd95c2d0 0000ffffb5fe7b58 0000ffffb6163000 [ 268.748630] 7f40: 0000ffffb60ad3e0 00000000004402d0 0000ffffb5fe7c58 0000000019bb71f0 [ 268.748634] 7f60: 0000ffffcd95c740 0000000000000000 0000000019bb71f0 0000000000416700 [ 268.748639] 7f80: 0000000000000000 00000000004402e8 0000000019bb6010 0000ffffcd95c748 [ 268.748643] 7fa0: 0000000000000000 0000ffffcd95c460 00000000004113a8 0000ffffcd95c460 [ 268.748648] 7fc0: 0000ffffb60ad3e8 0000000080000000 0000000019bb7258 000000000000006a [ 268.748652] 7fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 268.748657] [] __sys_trace_return+0x0/0x4 [ 268.748661] ---[ end trace a996d358dcaa7f9c ]--- Fixes: 8df038725ad5 ("bus/arm-ccn: Use cpu-hp's multi instance support instead custom list") Signed-off-by: Kim Phillips Acked-by: Sebastian Andrzej Siewior Cc: stable@vger.kernel.org # 4.8+ Signed-off-by: Pawel Moll drivers/bus/arm-ccn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4608af8aa53e7f3922ddee695d023b7bcd5cb35b Author: Marc Zyngier Date: Tue Oct 3 18:14:13 2017 +0100 bus: arm-cci: Fix use of smp_processor_id() in preemptible context The ARM CCI driver seem to be using smp_processor_id() in a preemptible context, which is likely to make a DEBUG_PREMPT kernel scream at boot time. Turn this into a get_cpu()/put_cpu() that extends over the CPU hotplug registration, making sure that we don't race against a CPU down operation. Signed-off-by: Marc Zyngier Acked-by: Mark Rutland Cc: stable@vger.kernel.org # 4.2+ Signed-off-by: Pawel Moll drivers/bus/arm-cci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b18c2b9487d8e797fc0a757e57ac3645348c5fba Author: Marc Zyngier Date: Tue Oct 3 18:14:12 2017 +0100 bus: arm-ccn: Fix use of smp_processor_id() in preemptible context Booting a DEBUG_PREEMPT enabled kernel on a CCN-based system results in the following splat: [...] arm-ccn e8000000.ccn: No access to interrupts, using timer. BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1 caller is debug_smp_processor_id+0x1c/0x28 CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.13.0 #6111 Hardware name: AMD Seattle/Seattle, BIOS 17:08:23 Jun 26 2017 Call trace: [] dump_backtrace+0x0/0x278 [] show_stack+0x24/0x30 [] dump_stack+0x8c/0xb0 [] check_preemption_disabled+0xfc/0x100 [] debug_smp_processor_id+0x1c/0x28 [] arm_ccn_probe+0x358/0x4f0 [...] as we use smp_processor_id() in the wrong context. Turn this into a get_cpu()/put_cpu() that extends over the CPU hotplug registration, making sure that we don't race against a CPU down operation. Signed-off-by: Marc Zyngier Acked-by: Mark Rutland Cc: stable@vger.kernel.org # 4.2+ Signed-off-by: Pawel Moll drivers/bus/arm-ccn.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0f9afd36bac9543bc087b77016311c3394bd77c2 Author: Christophe JAILLET Date: Sun Aug 27 11:07:06 2017 +0100 bus: arm-ccn: Simplify code Use 'devm_kasprintf()' to simplify the code. Signed-off-by: Christophe JAILLET Acked-by: Scott Branden Signed-off-by: Pawel Moll drivers/bus/arm-ccn.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 24771179c5c138f0ea3ef88b7972979f62f2d5db Author: Christophe JAILLET Date: Sun Aug 27 11:06:50 2017 +0100 bus: arm-ccn: Check memory allocation failure Check memory allocation failures and return -ENOMEM in such cases This avoids a potential NULL pointer dereference. Signed-off-by: Christophe JAILLET Acked-by: Scott Branden Cc: stable@vger.kernel.org # 3.17+ Signed-off-by: Pawel Moll drivers/bus/arm-ccn.c | 5 +++++ 1 file changed, 5 insertions(+) commit bf93b448b80bf71c2003659b06487879153b8b9b Author: Alex Deucher Date: Thu Nov 30 21:29:47 2017 -0500 drm/amdgpu: add license to files where it was missing These files were missing it before. Acked-by: Harry Wentland Acked-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 24 +++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 22 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dc_helper.c | 22 ++++++++++++++++++++ .../drm/amd/display/dc/dce100/dce100_resource.c | 2 +- .../drm/amd/display/dc/dce100/dce100_resource.h | 23 +++++++++++++++++++++ .../drm/amd/display/dc/dce110/dce110_resource.c | 2 +- .../display/dc/dce110/dce110_timing_generator_v.c | 23 +++++++++++++++++++++ .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 22 ++++++++++++++++++++ .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 22 ++++++++++++++++++++ .../gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c | 24 +++++++++++++++++++++- drivers/gpu/drm/amd/powerplay/inc/smu72.h | 24 +++++++++++++++++++++- drivers/gpu/drm/amd/powerplay/inc/smu72_discrete.h | 24 +++++++++++++++++++++- drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h | 24 +++++++++++++++++++++- 15 files changed, 254 insertions(+), 8 deletions(-) commit e2874a3c8c0c3b251d288a6149a80b9fd1c2f019 Author: Alex Deucher Date: Thu Nov 30 21:15:50 2017 -0500 drm/amdgpu: add license to Makefiles Was missing license text. Acked-by: Harry Wentland Acked-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/acp/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/Makefile | 22 ++++++++++++++++++++- drivers/gpu/drm/amd/amdkfd/Makefile | 22 ++++++++++++++++++++- drivers/gpu/drm/amd/display/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/basics/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/bios/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/calcs/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce100/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce110/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce112/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce120/Makefile | 23 +++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dce80/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dml/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/gpio/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/i2caux/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/irq/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/virtual/Makefile | 21 ++++++++++++++++++++ .../gpu/drm/amd/display/modules/freesync/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/lib/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/Makefile | 22 ++++++++++++++++++++- drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 22 ++++++++++++++++++++- drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 22 ++++++++++++++++++++- 26 files changed, 547 insertions(+), 6 deletions(-) commit 8a84bf45143b6b3552a806ab73181d7c7b6020ff Author: Arvind Yadav Date: Mon Jul 3 08:31:05 2017 +0100 bus: arm-ccn: 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 9074 5592 416 15082 3aea drivers/bus/arm-ccn.o File size After adding 'const': text data bss dec hex filename 9327 5336 416 15079 3ae7 drivers/bus/arm-ccn.o Signed-off-by: Arvind Yadav Signed-off-by: Pawel Moll drivers/bus/arm-ccn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7e6358d244e4706fe612a77b9c36519a33600ac0 Author: monty_pavel@sina.com Date: Sat Nov 25 01:43:50 2017 +0800 dm: fix various targets to dm_register_target after module __init resources created A NULL pointer is seen if two concurrent "vgchange -ay -K " processes race to load the dm-thin-pool module: PID: 25992 TASK: ffff883cd7d23500 CPU: 4 COMMAND: "vgchange" #0 [ffff883cd743d600] machine_kexec at ffffffff81038fa9 0000001 [ffff883cd743d660] crash_kexec at ffffffff810c5992 0000002 [ffff883cd743d730] oops_end at ffffffff81515c90 0000003 [ffff883cd743d760] no_context at ffffffff81049f1b 0000004 [ffff883cd743d7b0] __bad_area_nosemaphore at ffffffff8104a1a5 0000005 [ffff883cd743d800] bad_area at ffffffff8104a2ce 0000006 [ffff883cd743d830] __do_page_fault at ffffffff8104aa6f 0000007 [ffff883cd743d950] do_page_fault at ffffffff81517bae 0000008 [ffff883cd743d980] page_fault at ffffffff81514f95 [exception RIP: kmem_cache_alloc+108] RIP: ffffffff8116ef3c RSP: ffff883cd743da38 RFLAGS: 00010046 RAX: 0000000000000004 RBX: ffffffff81121b90 RCX: ffff881bf1e78cc0 RDX: 0000000000000000 RSI: 00000000000000d0 RDI: 0000000000000000 RBP: ffff883cd743da68 R8: ffff881bf1a4eb00 R9: 0000000080042000 R10: 0000000000002000 R11: 0000000000000000 R12: 00000000000000d0 R13: 0000000000000000 R14: 00000000000000d0 R15: 0000000000000246 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 0000009 [ffff883cd743da70] mempool_alloc_slab at ffffffff81121ba5 0000010 [ffff883cd743da80] mempool_create_node at ffffffff81122083 0000011 [ffff883cd743dad0] mempool_create at ffffffff811220f4 0000012 [ffff883cd743dae0] pool_ctr at ffffffffa08de049 [dm_thin_pool] 0000013 [ffff883cd743dbd0] dm_table_add_target at ffffffffa0005f2f [dm_mod] 0000014 [ffff883cd743dc30] table_load at ffffffffa0008ba9 [dm_mod] 0000015 [ffff883cd743dc90] ctl_ioctl at ffffffffa0009dc4 [dm_mod] The race results in a NULL pointer because: Process A (vgchange -ay -K): a. send DM_LIST_VERSIONS_CMD ioctl; b. pool_target not registered; c. modprobe dm_thin_pool and wait until end. Process B (vgchange -ay -K): a. send DM_LIST_VERSIONS_CMD ioctl; b. pool_target registered; c. table_load->dm_table_add_target->pool_ctr; d. _new_mapping_cache is NULL and panic. Note: 1. process A and process B are two concurrent processes. 2. pool_target can be detected by process B but _new_mapping_cache initialization has not ended. To fix dm-thin-pool, and other targets (cache, multipath, and snapshot) with the same problem, simply dm_register_target() after all resources created during module init (as labelled with __init) are finished. Cc: stable@vger.kernel.org Signed-off-by: monty Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 12 +++++------ drivers/md/dm-mpath.c | 18 ++++++++--------- drivers/md/dm-snap.c | 48 ++++++++++++++++++++++---------------------- drivers/md/dm-thin.c | 22 +++++++++----------- 4 files changed, 49 insertions(+), 51 deletions(-) commit afc567a4977b2d798e05153dd131a3c8d4758c0c Author: Mike Snitzer Date: Sat Nov 25 00:27:26 2017 -0500 dm table: fix regression from improper dm_dev_internal.count refcount_t conversion Multiple refcounts are needed if the device was already added. The micro-optimization of setting the refcount to 1 on first added (rather than fall thru to a common refcount_inc) lost sight of the fact that the refcount_inc is also needed for the case when the device already exists and the mode need not be upgraded. Fixes: 2a0b4682e0 ("dm: convert dm_dev_internal.count from atomic_t to refcount_t") Reported-by: Zdenek Kabelac Signed-off-by: Mike Snitzer drivers/md/dm-table.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 31eb7431805493e10f4731f366cf4d4e3e952035 Author: Rafael J. Wysocki Date: Fri Dec 1 14:58:34 2017 +0100 PM / runtime: Fix handling of suppliers with disabled runtime PM Prevent rpm_get_suppliers() from returning an error code if runtime PM is disabled for one or more of the supplier devices it wants to runtime-resume, so as to make runtime PM work for devices with links to suppliers that don't use runtime PM (such links may be created during device enumeration even before it is known whether or not runtime PM will be enabled for the devices in question, for example). Fixes: 21d5c57b3726 (PM / runtime: Use device links) Reported-by: Adrian Hunter Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukas Wunner Tested-by: Adrian Hunter drivers/base/power/runtime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fc396e066318c0a02208c1d3f0b62950a7714999 Author: Christoffer Dall Date: Sun Dec 3 23:54:41 2017 +0100 KVM: arm/arm64: Fix broken GICH_ELRSR big endian conversion We are incorrectly rearranging 32-bit words inside a 64-bit typed value for big endian systems, which would result in never marking a virtual interrupt as inactive on big endian systems (assuming 32 or fewer LRs on the hardware). Fix this by not doing any word order manipulation for the typed values. Cc: Acked-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/hyp/vgic-v2-sr.c | 4 ---- 1 file changed, 4 deletions(-) commit 65323ee1ab528c9c169f671944ac51896f507428 Author: Angelo Dureghello Date: Mon Dec 4 11:19:41 2017 +0100 m68k/defconfig: fix stmark2 broken local compilation Signed-off-by: Angelo Dureghello Signed-off-by: Greg Ungerer arch/m68k/configs/stmark2_defconfig | 1 - 1 file changed, 1 deletion(-) commit a773d419275bf54854ca6cfda8f2594ed2790faa Author: Felipe Balbi Date: Fri Jun 2 13:20:25 2017 +0300 tracing: Pass export pointer as argument to ->write() By passing an export descriptor to the write function, users don't need to keep a global static pointer and can rely on container_of() to fetch their own structure. Link: http://lkml.kernel.org/r/20170602102025.5140-1-felipe.balbi@linux.intel.com Acked-by: Steven Rostedt (VMware) Reviewed-by: Chunyan Zhang Signed-off-by: Felipe Balbi Signed-off-by: Steven Rostedt (VMware) drivers/hwtracing/stm/ftrace.c | 6 ++++-- include/linux/trace.h | 2 +- kernel/trace/trace.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) commit c4bfd39d7fa5203d4b387c283d360e9a108e85b3 Author: Matthias Kaehlcke Date: Wed May 17 17:14:15 2017 -0700 ring-buffer: Remove unused function __rb_data_page_index() This fixes the following warning when building with clang: kernel/trace/ring_buffer.c:1842:1: error: unused function '__rb_data_page_index' [-Werror,-Wunused-function] Link: http://lkml.kernel.org/r/20170518001415.5223-1-mka@chromium.org Reviewed-by: Douglas Anderson Signed-off-by: Matthias Kaehlcke Signed-off-by: Steven Rostedt (VMware) kernel/trace/ring_buffer.c | 6 ------ 1 file changed, 6 deletions(-) commit 2dde6b0034dbc050957cdb6539ce28eca57e8cdf Author: Arnd Bergmann Date: Fri Nov 3 11:39:57 2017 +0100 tracing: make PREEMPTIRQ_EVENTS depend on TRACING When CONFIG_TRACING is disabled, the new preemptirq events tracer produces a build failure: In file included from kernel/trace/trace_irqsoff.c:17:0: kernel/trace/trace.h: In function 'trace_test_and_set_recursion': kernel/trace/trace.h:542:28: error: 'struct task_struct' has no member named 'trace_recursion' Adding an explicit dependency avoids the broken configuration. Link: http://lkml.kernel.org/r/20171103104031.270375-1-arnd@arndb.de Fixes: d59158162e03 ("tracing: Add support for preempt and irq enable/disable events") Signed-off-by: Arnd Bergmann Signed-off-by: Steven Rostedt (VMware) kernel/trace/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 90e406f96f630c07d631a021fd4af10aac913e77 Author: Changbin Du Date: Thu Nov 30 11:39:43 2017 +0800 tracing: Allocate mask_str buffer dynamically The default NR_CPUS can be very large, but actual possible nr_cpu_ids usually is very small. For my x86 distribution, the NR_CPUS is 8192 and nr_cpu_ids is 4. About 2 pages are wasted. Most machines don't have so many CPUs, so define a array with NR_CPUS just wastes memory. So let's allocate the buffer dynamically when need. With this change, the mutext tracing_cpumask_update_lock also can be removed now, which was used to protect mask_str. Link: http://lkml.kernel.org/r/1512013183-19107-1-git-send-email-changbin.du@intel.com Fixes: 36dfe9252bd4c ("ftrace: make use of tracing_cpumask") Cc: stable@vger.kernel.org Signed-off-by: Changbin Du Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit 250d0c7754aa37c6443f07f1f5f591e2806295d8 Author: Arnd Bergmann Date: Thu Oct 19 10:32:13 2017 +0200 tracing: always define trace_{irq,preempt}_{enable_disable} We get a build error in the irqsoff tracer in some configurations: kernel/trace/trace_irqsoff.c: In function 'trace_preempt_on': kernel/trace/trace_irqsoff.c:855:2: error: implicit declaration of function 'trace_preempt_enable_rcuidle'; did you mean 'trace_irq_enable_rcuidle'? [-Werror=implicit-function-declaration] trace_preempt_enable_rcuidle(a0, a1); The problem is that trace_preempt_enable_rcuidle() has different definition based on multiple Kconfig symbols, but not all combinations have a valid definition. This changes the conditions so that we always get exactly one definition of each of the four tracing macros. I have not tried to verify that these definitions are sensible, but now we can build all randconfig combinations again. Link: http://lkml.kernel.org/r/20171019083230.2450779-1-arnd@arndb.de Fixes: d59158162e03 ("tracing: Add support for preempt and irq enable/disable events") Acked-by: Joel Fernandes Signed-off-by: Arnd Bergmann Signed-off-by: Steven Rostedt (VMware) include/trace/events/preemptirq.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 5a93bae2c382c588f437ce0395e8032ae287dc36 Author: Chunyu Hu Date: Thu Oct 19 14:32:33 2017 +0800 tracing: Fix code comments in trace.c Naming in code comments for tracing_snapshot, tracing_snapshot_alloc and trace_pid_filter_add_remove_task don't match the real function names. And latency_trace has been removed from tracing directory. Fix them. Link: http://lkml.kernel.org/r/1508394753-20887-1-git-send-email-chuhu@redhat.com Fixes: cab5037 ("tracing/ftrace: Enable snapshot function trigger") Fixes: 886b5b7 ("tracing: remove /debug/tracing/latency_trace") Signed-off-by: Chunyu Hu [ Replaced /sys/kernel/debug/tracing with /sys/kerne/tracing ] Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5ba7dcfe77037b67016263ea597a8b431692ecab Author: Sven Eckelmann Date: Sun Dec 3 11:26:45 2017 +0100 batman-adv: Fix lock for ogm cnt access in batadv_iv_ogm_calc_tq The originator node object orig_neigh_node is used to when accessing the bcast_own(_sum) and real_packet_count information. The access to them has to be protected with the spinlock in orig_neigh_node. But the function uses the lock in orig_node instead. This is incorrect because they could be two different originator node objects. Fixes: 0ede9f41b217 ("batman-adv: protect bit operations to count OGMs with spinlock") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bat_iv_ogm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 912d7985f3cef1b901a4fd9fede549b919fe7ac3 Author: Rob Herring Date: Thu Nov 9 16:35:35 2017 -0600 ARM: dts: rockchip: fix rk3288 iep-IOMMU interrupts property cells The interrupts property in the iep-IOMMU node for the rk3288 dts file has a spurious extra cell causing a dtc warning: Warning (interrupts_property): interrupts size is (16), expected multiple of 12 in /iommu@ff900800 Remove the extra cell. Signed-off-by: Rob Herring Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ab405114b0b229151ef06f4e31c7834dd09d0c0 Author: Jann Horn Date: Fri Dec 1 01:46:07 2017 +0100 netfilter: xt_bpf: add overflow checks Check whether inputs from userspace are too long (explicit length field too big or string not null-terminated) to avoid out-of-bounds reads. As far as I can tell, this can at worst lead to very limited kernel heap memory disclosure or oopses. This bug can be triggered by an unprivileged user even if the xt_bpf module is not loaded: iptables is available in network namespaces, and the xt_bpf module can be autoloaded. Triggering the bug with a classic BPF filter with fake length 0x1000 causes the following KASAN report: ================================================================== BUG: KASAN: slab-out-of-bounds in bpf_prog_create+0x84/0xf0 Read of size 32768 at addr ffff8801eff2c494 by task test/4627 CPU: 0 PID: 4627 Comm: test Not tainted 4.15.0-rc1+ #1 [...] Call Trace: dump_stack+0x5c/0x85 print_address_description+0x6a/0x260 kasan_report+0x254/0x370 ? bpf_prog_create+0x84/0xf0 memcpy+0x1f/0x50 bpf_prog_create+0x84/0xf0 bpf_mt_check+0x90/0xd6 [xt_bpf] [...] Allocated by task 4627: kasan_kmalloc+0xa0/0xd0 __kmalloc_node+0x47/0x60 xt_alloc_table_info+0x41/0x70 [x_tables] [...] The buggy address belongs to the object at ffff8801eff2c3c0 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 212 bytes inside of 2048-byte region [ffff8801eff2c3c0, ffff8801eff2cbc0) [...] ================================================================== Fixes: e6f30c731718 ("netfilter: x_tables: add xt_bpf match") Signed-off-by: Jann Horn Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_bpf.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4b380c42f7d00a395feede754f0bc2292eebe6e5 Author: Kevin Cernekee Date: Sun Dec 3 12:12:45 2017 -0800 netfilter: nfnetlink_cthelper: Add missing permission checks The capability check in nfnetlink_rcv() verifies that the caller has CAP_NET_ADMIN in the namespace that "owns" the netlink socket. However, nfnl_cthelper_list is shared by all net namespaces on the system. An unprivileged user can create user and net namespaces in which he holds CAP_NET_ADMIN to bypass the netlink_net_capable() check: $ nfct helper list nfct v1.4.4: netlink error: Operation not permitted $ vpnns -- nfct helper list { .name = ftp, .queuenum = 0, .l3protonum = 2, .l4protonum = 6, .priv_data_len = 24, .status = enabled, }; Add capable() checks in nfnetlink_cthelper, as this is cleaner than trying to generalize the solution. Signed-off-by: Kevin Cernekee Signed-off-by: Pablo Neira Ayuso net/netfilter/nfnetlink_cthelper.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 89b89d121ffcf8d9546633b98ded9d18b8f75891 Author: Jaejoong Kim Date: Mon Dec 4 15:31:49 2017 +0900 ALSA: usb-audio: Add check return value for usb_string() snd_usb_copy_string_desc() returns zero if usb_string() fails. In case of failure, we need to check the snd_usb_copy_string_desc()'s return value and add an exception case Signed-off-by: Jaejoong Kim Cc: Signed-off-by: Takashi Iwai sound/usb/mixer.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 251552a2b0d454badc8f486e6d79100970c744b0 Author: Jaejoong Kim Date: Mon Dec 4 15:31:48 2017 +0900 ALSA: usb-audio: Fix out-of-bound error The snd_usb_copy_string_desc() retrieves the usb string corresponding to the index number through the usb_string(). The problem is that the usb_string() returns the length of the string (>= 0) when successful, but it can also return a negative value about the error case or status of usb_control_msg(). If iClockSource is '0' as shown below, usb_string() will returns -EINVAL. This will result in '0' being inserted into buf[-22], and the following KASAN out-of-bound error message will be output. AudioControl Interface Descriptor: bLength 8 bDescriptorType 36 bDescriptorSubtype 10 (CLOCK_SOURCE) bClockID 1 bmAttributes 0x07 Internal programmable Clock (synced to SOF) bmControls 0x07 Clock Frequency Control (read/write) Clock Validity Control (read-only) bAssocTerminal 0 iClockSource 0 To fix it, check usb_string()'return value and bail out. ================================================================== BUG: KASAN: stack-out-of-bounds in parse_audio_unit+0x1327/0x1960 [snd_usb_audio] Write of size 1 at addr ffff88007e66735a by task systemd-udevd/18376 CPU: 0 PID: 18376 Comm: systemd-udevd Not tainted 4.13.0+ #3 Hardware name: LG Electronics 15N540-RFLGL/White Tip Mountain, BIOS 15N5 Call Trace: dump_stack+0x63/0x8d print_address_description+0x70/0x290 ? parse_audio_unit+0x1327/0x1960 [snd_usb_audio] kasan_report+0x265/0x350 __asan_store1+0x4a/0x50 parse_audio_unit+0x1327/0x1960 [snd_usb_audio] ? save_stack+0xb5/0xd0 ? save_stack_trace+0x1b/0x20 ? save_stack+0x46/0xd0 ? kasan_kmalloc+0xad/0xe0 ? kmem_cache_alloc_trace+0xff/0x230 ? snd_usb_create_mixer+0xb0/0x4b0 [snd_usb_audio] ? usb_audio_probe+0x4de/0xf40 [snd_usb_audio] ? usb_probe_interface+0x1f5/0x440 ? driver_probe_device+0x3ed/0x660 ? build_feature_ctl+0xb10/0xb10 [snd_usb_audio] ? save_stack_trace+0x1b/0x20 ? init_object+0x69/0xa0 ? snd_usb_find_csint_desc+0xa8/0xf0 [snd_usb_audio] snd_usb_mixer_controls+0x1dc/0x370 [snd_usb_audio] ? build_audio_procunit+0x890/0x890 [snd_usb_audio] ? snd_usb_create_mixer+0xb0/0x4b0 [snd_usb_audio] ? kmem_cache_alloc_trace+0xff/0x230 ? usb_ifnum_to_if+0xbd/0xf0 snd_usb_create_mixer+0x25b/0x4b0 [snd_usb_audio] ? snd_usb_create_stream+0x255/0x2c0 [snd_usb_audio] usb_audio_probe+0x4de/0xf40 [snd_usb_audio] ? snd_usb_autosuspend.part.7+0x30/0x30 [snd_usb_audio] ? __pm_runtime_idle+0x90/0x90 ? kernfs_activate+0xa6/0xc0 ? usb_match_one_id_intf+0xdc/0x130 ? __pm_runtime_set_status+0x2d4/0x450 usb_probe_interface+0x1f5/0x440 Cc: Signed-off-by: Jaejoong Kim Signed-off-by: Takashi Iwai sound/usb/mixer.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5aa04b3eb6fca63d2e9827be656dcadc26d54e11 Author: Ravi Bangoria Date: Thu Nov 30 14:03:22 2017 +0530 powerpc/perf: Fix oops when grouping different pmu events When user tries to group imc (In-Memory Collections) event with normal event, (sometime) kernel crashes with following log: Faulting instruction address: 0x00000000 [link register ] c00000000010ce88 power_check_constraints+0x128/0x980 ... c00000000010e238 power_pmu_event_init+0x268/0x6f0 c0000000002dc60c perf_try_init_event+0xdc/0x1a0 c0000000002dce88 perf_event_alloc+0x7b8/0xac0 c0000000002e92e0 SyS_perf_event_open+0x530/0xda0 c00000000000b004 system_call+0x38/0xe0 'event_base' field of 'struct hw_perf_event' is used as flags for normal hw events and used as memory address for imc events. While grouping these two types of events, collect_events() tries to interpret imc 'event_base' as a flag, which causes a corruption resulting in a crash. Consider only those events which belongs to 'perf_hw_context' in collect_events(). Signed-off-by: Ravi Bangoria Reviewed-By: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/core-book3s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c894aa97577e47d3066b27b32499ecf899bfa8b0 Author: Eryu Guan Date: Sun Dec 3 22:52:51 2017 -0500 ext4: fix fdatasync(2) after fallocate(2) operation Currently, fallocate(2) with KEEP_SIZE followed by a fdatasync(2) then crash, we'll see wrong allocated block number (stat -c %b), the blocks allocated beyond EOF are all lost. fstests generic/468 exposes this bug. Commit 67a7d5f561f4 ("ext4: fix fdatasync(2) after extent manipulation operations") fixed all the other extent manipulation operation paths such as hole punch, zero range, collapse range etc., but forgot the fallocate case. So similarly, fix it by recording the correct journal tid in ext4 inode in fallocate(2) path, so that ext4_sync_file() will wait for the right tid to be committed on fdatasync(2). This addresses the test failure in xfstests test generic/468. Signed-off-by: Eryu Guan Signed-off-by: Theodore Ts'o Cc: stable@vger.kernel.org fs/ext4/extents.c | 1 + 1 file changed, 1 insertion(+) commit ee4c54d0912713f69da51bca922735846fac25a8 Merge: 4fbd8d1 81faa55 Author: Olof Johansson Date: Sun Dec 3 19:39:40 2017 -0800 Merge branch 'fixes' into for-next * fixes: (27 commits) firmware: arm_scpi: Revert updates made during v4.15 merge window arm: dts: marvell: Add missing #phy-cells to usb-nop-xceiv arm64: dts: sort vendor subdirectories in Makefile alphabetically MAINTAINERS: exclude other Socionext SoC DT files from ARM/UNIPHIER entry arm64: dts: uniphier: remove unnecessary interrupt-parent arm64: dts: uniphier: correct on-board device IRQ number for PXs3 optee: fix invalid of_node_put() in optee_driver_init() Revert "ARM: dts: imx53: add srtc node" ARM: dts: vf610-zii-dev-rev-c: Fix the I2C EEPROM address ARM: dts: am437x-cm-t43: Correct the dmas property of spi0 ARM: dts: am4372: Correct the interrupts_properties of McASP ARM: dts: logicpd-somlv: Fix wl127x pinmux ARM: dts: logicpd-som-lv: Fix gpmc addresses for NAND and enet ARM: dts: Fix omap4 hang with GPS connected to USB by using wakeupgen ARM: OMAP2+: Missing error code in omap_device_build() ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst function ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context ARM: dts: NSP: Fix PPI interrupt types ARM: dts: NSP: Disable AHCI controller for HR NSP boards ARM: dts: r8a779x: Add '#reset-cells' in cpg-mssr ... commit 81faa5566864e97a5578c4e08c07edf04239abcc Author: Olof Johansson Date: Sun Dec 3 19:28:33 2017 -0800 firmware: arm_scpi: Revert updates made during v4.15 merge window Revert "Merge tag 'scpi-updates-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/drivers" Paraphrased from email from Kevin Hilman: Revert ARM SCPI changes since v4.14. Untested changes caused regressions in SCPI and CPUfreq/DVFS failures on most Amlogic SoCs. Changes reverted for v4.15 so they can be better reviewed and tested. These ARM SCPI changes caused SCPI regressions resulting in CPUfreq failures on most Amlogic SoCs (found by kernelci.org.) Unfortunately, this was not caught in linux-next due to other bugs/panics on these platforms masking this problem so we've only found it since we've fixed the other issues. Since we're already in the -rc cycle, I'd prefer to revert to a known working state (that of v4.14) rather than finding/reverting a subset, which would just lead to another untested state. These changes can then have some time to be better reviewed and tested and resubmitted for v4.16. Kevin Hilman has tested this revert on the affected Amlogic SoCs and verified that we're back to the previous (working) condition. This reverts commit 6710acf2596a29f7351e8165d981645f403e0025, reversing changes made to 4b367f2e8854da34d14bd154ff4432fb49f69b36. Reported-by: Kevin Hilman Signed-off-by: Olof Johansson drivers/firmware/arm_scpi.c | 216 ++++++++++++++++++++++++++------------------ 1 file changed, 129 insertions(+), 87 deletions(-) commit fc82228a5e3860502dbf3bfa4a9570cb7093cf7f Author: Andi Kleen Date: Sun Dec 3 20:38:01 2017 -0500 ext4: support fast symlinks from ext3 file systems 407cd7fb83c0 (ext4: change fast symlink test to not rely on i_blocks) broke ~10 years old ext3 file systems created by 2.6.17. Any ELF executable fails because the /lib/ld-linux.so.2 fast symlink cannot be read anymore. The patch assumed fast symlinks were created in a specific way, but that's not true on these really old file systems. The new behavior is apparently needed only with the large EA inode feature. Revert to the old behavior if the large EA inode feature is not set. This makes my old VM boot again. Fixes: 407cd7fb83c0 (ext4: change fast symlink test to not rely on i_blocks) Signed-off-by: Andi Kleen Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger Cc: stable@vger.kernel.org fs/ext4/inode.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 0d55f2ab0dc479ce4b6bcc58beec6b63b630ff05 Merge: 8d810a4 7cd4a5e Author: Olof Johansson Date: Sat Dec 2 17:14:18 2017 -0800 Merge tag 'omap-for-v4.15/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Fixes for omaps for v4.15-rc cycle with two fixes for hangs with the rest being compiler warning fixes and fixes for power states and devices on various boards: - Fix smatch issue introduced by recent omap device changes for legacy resources - Fix SRAM virt to phys related boot hang affecting n900 and other omap3 hs devices found by pending CMA changes. While it seems that we have not hit this in other use cases, let's fix it to avoid a nasty and hard to find suprise as right now there is just luck keeping the SRAM virtual address to physical address translation working with the 0xffff high_mask. - Fix am335x reading of domain state registers that only exist for the PM_CEFUSE domain and produce wrong results for other domains - Fix missing setting for error code for omap device if allocation fails - Fix missing modules_offs for omap3 MMC3 affecting n9/n950 - Fix cm_split_idlest() reading reserved registers showing wrong idlestatus - Fixes to correct #phy-cells property for compiler warnings that recently started happening - Add a missing OHCI remote-wakeup-connected property that I was supposed to merge after the ohci-omap3 to ohci-platform changes but somehow managed to drop. I only noticed this was missing while debugging the OHCI/EHCI GPS and modem hang - Fix a system hang with GPS or modem connected to the OHCI/EHCI bus that typically happened within 20 - 40 minutes on an idle system. This turned out to be an issue caused by using the parent interrupt controller directly with the WUGEN + GIC stacked interrupt controller domains - Fixes for logicpd-somlv GPMC for Ethernet and NAND that clearly have been broken since we changed GPMC to use the interrupt controller binding for some pins. And fix the wrong pin muxing for WLAN while at it - Fixes for am437x interrupt and dma properties to fix compiler warnings that recently started happening * tag 'omap-for-v4.15/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am437x-cm-t43: Correct the dmas property of spi0 ARM: dts: am4372: Correct the interrupts_properties of McASP ARM: dts: logicpd-somlv: Fix wl127x pinmux ARM: dts: logicpd-som-lv: Fix gpmc addresses for NAND and enet ARM: dts: Fix omap4 hang with GPS connected to USB by using wakeupgen ARM: OMAP2+: Missing error code in omap_device_build() ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst function ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context ARM: dts: Add remote-wakeup-connected for omap OHCI ARM: dts: am33xx: Add missing #phy-cells to ti,am335x-usb-phy ARM: dts: omap: Add missing #phy-cells to usb-nop-xceiv ARM: OMAP2+: Fix smatch found issue for omap_device ARM: OMAP2/3: CM: fix cm_split_idlest functionality ARM: OMAP3: hwmod_data: add missing module_offs for MMC3 Signed-off-by: Olof Johansson commit 969de0988b77e5a57aac2f7270191a3c50540c52 Author: Greg Ungerer Date: Tue Nov 14 11:50:07 2017 +1000 m68k: add missing SOFTIRQENTRY_TEXT linker section Commit be7635e7287e ("arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections") added a new linker section, SOFTIRQENTRY_TEXT, to the linker scripts for most architectures. It didn't add it to any of the linker scripts for the m68k architecture. This was not really a problem because it is only defined if either of CONFIG_FUNCTION_GRAPH_TRACER or CONFIG_KASAN are enabled - which can never be true for m68k. However commit 229a71860547 ("irq: Make the irqentry text section unconditional") means that SOFTIRQENTRY_TEXT is now always defined. So on m68k we now end up with a separate ELF section for .softirqentry.text instead of it being part of the .text section. On some m68k targets in some configurations this can also cause a fatal link error: LD vmlinux /usr/local/bin/../m68k-uclinux/bin/ld.real: section .softirqentry.text loaded at [0000000010de10c0,0000000010de12dd] overlaps section .rodata loaded at [0000000010de10c0,0000000010e0fd67] To fix add in the missing SOFTIRQENTRY_TEXT section into the m68k linker scripts. I noticed that m68k is also missing the IRQENTRY_TEXT section, so this patch also adds an entry for that too. Signed-off-by: Greg Ungerer arch/m68k/kernel/vmlinux-nommu.lds | 2 ++ arch/m68k/kernel/vmlinux-std.lds | 2 ++ arch/m68k/kernel/vmlinux-sun3.lds | 2 ++ 3 files changed, 6 insertions(+) commit 9956cfef3409177d9e24ea4b7910148a18073a6f Author: Randy Dunlap Date: Sun Dec 3 13:15:39 2017 -0800 Documentation: fix docs build error after source file removed The pci/htirq.c file was removed so remove it from the documentation file also. Error: Cannot open file ../drivers/pci/htirq.c WARNING: kernel-doc '../scripts/kernel-doc -rst -enable-lineno -export ../drivers/pci/htirq.c' failed with return code 2 Fixes: fd2fa6c18b72 ("x86/PCI: Remove unused HyperTransport interrupt support") Signed-off-by: Randy Dunlap Signed-off-by: Jonathan Corbet Documentation/driver-api/pci.rst | 3 --- 1 file changed, 3 deletions(-) commit f9ecc83f8d723372976df8eda3193726d7a24fcb Author: Sakari Ailus Date: Fri Dec 1 13:37:12 2017 -0500 eeprom: at24: fix I2C device selection for runtime PM The at24 driver creates dummy I2C devices to access offsets in the chip that are outside the area supported using a single I2C address. It is not meaningful to use runtime PM to such devices; the system firmware (ACPI) does not know about these devices nor runtime PM was enabled for them. Always use the real device instead of the dummy ones. Fixes: 98e8201039af ("eeprom: at24: enable runtime pm support") Signed-off-by: Sakari Ailus Tested-by: Sven Van Asbroeck on a 24AA16/24LC16B [Bartosz: rebased on top of previous fixes for 4.15, tweaked the commit message] [Sven: fixed Bartosz's rebase] Signed-off-by: Sven Van Asbroeck Signed-off-by: Bartosz Golaszewski drivers/misc/eeprom/at24.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit c2eb6d07a63cb01f0ef978b28927335198c544ce Merge: e4485c7 0ec9552 Author: David S. Miller Date: Sun Dec 3 13:08:30 2017 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2017-12-02 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix a compilation warning in xdp redirect tracepoint due to missing bpf.h include that pulls in struct bpf_map, from Xie. 2) Limit the maximum number of attachable BPF progs for a given perf event as long as uabi is not frozen yet. The hard upper limit is now 64 and therefore the same as with BPF multi-prog for cgroups. Also add related error checking for the sample BPF loader when enabling and attaching to the perf event, from Yonghong. 3) Specifically set the RLIMIT_MEMLOCK for the test_verifier_log case, so that the test case can always pass and not fail in some environments due to too low default limit, also from Yonghong. 4) Fix up a missing license header comment for kernel/bpf/offload.c, from Jakub. 5) Several fixes for bpftool, among others a crash on incorrect arguments when json output is used, error message handling fixes on unknown options and proper destruction of json writer for some exit cases, all from Quentin. ==================== Signed-off-by: David S. Miller commit e4485c7484f4ed218aabdb659980b5c1c0ddff29 Merge: bcd1d60 b4d1605 Author: David S. Miller Date: Sun Dec 3 12:39:15 2017 -0500 Merge branch 'tcp-cb-selinux-corruption' Eric Dumazet says: ==================== tcp: add tcp_v4_fill_cb()/tcp_v4_restore_cb() James Morris reported kernel stack corruption bug that we tracked back to commit 971f10eca186 ("tcp: better TCP_SKB_CB layout to reduce cache line misses") First patch needs to be backported to kernels >= 3.18, while second patch needs to be backported to kernels >= 4.9, since this was the time when inet_exact_dif_match appeared. ==================== Signed-off-by: David S. Miller commit b4d1605a8ea608fd7dc45b926a05d75d340bde4b Author: David Ahern Date: Sun Dec 3 09:33:00 2017 -0800 tcp: use IPCB instead of TCP_SKB_CB in inet_exact_dif_match() After this fix : ("tcp: add tcp_v4_fill_cb()/tcp_v4_restore_cb()"), socket lookups happen while skb->cb[] has not been mangled yet by TCP. Fixes: a04a480d4392 ("net: Require exact match for TCP socket lookups if dif is l3mdev") Signed-off-by: David Ahern Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/tcp.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit eeea10b83a139451130df1594f26710c8fa390c8 Author: Eric Dumazet Date: Sun Dec 3 09:32:59 2017 -0800 tcp: add tcp_v4_fill_cb()/tcp_v4_restore_cb() James Morris reported kernel stack corruption bug [1] while running the SELinux testsuite, and bisected to a recent commit bffa72cf7f9d ("net: sk_buff rbnode reorg") We believe this commit is fine, but exposes an older bug. SELinux code runs from tcp_filter() and might send an ICMP, expecting IP options to be found in skb->cb[] using regular IPCB placement. We need to defer TCP mangling of skb->cb[] after tcp_filter() calls. This patch adds tcp_v4_fill_cb()/tcp_v4_restore_cb() in a very similar way we added them for IPv6. [1] [ 339.806024] SELinux: failure in selinux_parse_skb(), unable to parse packet [ 339.822505] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff81745af5 [ 339.822505] [ 339.852250] CPU: 4 PID: 3642 Comm: client Not tainted 4.15.0-rc1-test #15 [ 339.868498] Hardware name: LENOVO 10FGS0VA1L/30BC, BIOS FWKT68A 01/19/2017 [ 339.885060] Call Trace: [ 339.896875] [ 339.908103] dump_stack+0x63/0x87 [ 339.920645] panic+0xe8/0x248 [ 339.932668] ? ip_push_pending_frames+0x33/0x40 [ 339.946328] ? icmp_send+0x525/0x530 [ 339.958861] ? kfree_skbmem+0x60/0x70 [ 339.971431] __stack_chk_fail+0x1b/0x20 [ 339.984049] icmp_send+0x525/0x530 [ 339.996205] ? netlbl_skbuff_err+0x36/0x40 [ 340.008997] ? selinux_netlbl_err+0x11/0x20 [ 340.021816] ? selinux_socket_sock_rcv_skb+0x211/0x230 [ 340.035529] ? security_sock_rcv_skb+0x3b/0x50 [ 340.048471] ? sk_filter_trim_cap+0x44/0x1c0 [ 340.061246] ? tcp_v4_inbound_md5_hash+0x69/0x1b0 [ 340.074562] ? tcp_filter+0x2c/0x40 [ 340.086400] ? tcp_v4_rcv+0x820/0xa20 [ 340.098329] ? ip_local_deliver_finish+0x71/0x1a0 [ 340.111279] ? ip_local_deliver+0x6f/0xe0 [ 340.123535] ? ip_rcv_finish+0x3a0/0x3a0 [ 340.135523] ? ip_rcv_finish+0xdb/0x3a0 [ 340.147442] ? ip_rcv+0x27c/0x3c0 [ 340.158668] ? inet_del_offload+0x40/0x40 [ 340.170580] ? __netif_receive_skb_core+0x4ac/0x900 [ 340.183285] ? rcu_accelerate_cbs+0x5b/0x80 [ 340.195282] ? __netif_receive_skb+0x18/0x60 [ 340.207288] ? process_backlog+0x95/0x140 [ 340.218948] ? net_rx_action+0x26c/0x3b0 [ 340.230416] ? __do_softirq+0xc9/0x26a [ 340.241625] ? do_softirq_own_stack+0x2a/0x40 [ 340.253368] [ 340.262673] ? do_softirq+0x50/0x60 [ 340.273450] ? __local_bh_enable_ip+0x57/0x60 [ 340.285045] ? ip_finish_output2+0x175/0x350 [ 340.296403] ? ip_finish_output+0x127/0x1d0 [ 340.307665] ? nf_hook_slow+0x3c/0xb0 [ 340.318230] ? ip_output+0x72/0xe0 [ 340.328524] ? ip_fragment.constprop.54+0x80/0x80 [ 340.340070] ? ip_local_out+0x35/0x40 [ 340.350497] ? ip_queue_xmit+0x15c/0x3f0 [ 340.361060] ? __kmalloc_reserve.isra.40+0x31/0x90 [ 340.372484] ? __skb_clone+0x2e/0x130 [ 340.382633] ? tcp_transmit_skb+0x558/0xa10 [ 340.393262] ? tcp_connect+0x938/0xad0 [ 340.403370] ? ktime_get_with_offset+0x4c/0xb0 [ 340.414206] ? tcp_v4_connect+0x457/0x4e0 [ 340.424471] ? __inet_stream_connect+0xb3/0x300 [ 340.435195] ? inet_stream_connect+0x3b/0x60 [ 340.445607] ? SYSC_connect+0xd9/0x110 [ 340.455455] ? __audit_syscall_entry+0xaf/0x100 [ 340.466112] ? syscall_trace_enter+0x1d0/0x2b0 [ 340.476636] ? __audit_syscall_exit+0x209/0x290 [ 340.487151] ? SyS_connect+0xe/0x10 [ 340.496453] ? do_syscall_64+0x67/0x1b0 [ 340.506078] ? entry_SYSCALL64_slow_path+0x25/0x25 Fixes: 971f10eca186 ("tcp: better TCP_SKB_CB layout to reduce cache line misses") Signed-off-by: Eric Dumazet Reported-by: James Morris Tested-by: James Morris Tested-by: Casey Schaufler Signed-off-by: David S. Miller net/ipv4/tcp_ipv4.c | 59 ++++++++++++++++++++++++++++++++++++----------------- net/ipv6/tcp_ipv6.c | 10 +++++---- 2 files changed, 46 insertions(+), 23 deletions(-) commit ae64f9bd1d3621b5e60d7363bc20afb46aede215 Author: Linus Torvalds Date: Sun Dec 3 11:01:47 2017 -0500 Linux 4.15-rc2 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87fc5c686ef3db9e58d2fd65e1bcc368ee6b1b76 Merge: ae4806a 3aaf33b Author: Linus Torvalds Date: Sun Dec 3 10:51:08 2017 -0500 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fix from Russell King: "Just one fix this time around, for the late commit in the merge window that triggered a problem with qemu. Qemu is apparently also going to receive a fix for the discovered issue" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: avoid faulting on qemu commit ae4806a38bc8db0b48e746445c41afd249568d68 Merge: 49a418d edef309 Author: Linus Torvalds Date: Sun Dec 3 10:48:24 2017 -0500 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Here are two bugfixes for I2C, fixing a memleak in the core and irq allocation for i801. Also three bugfixes for the at24 eeprom driver which Bartosz collected while taking over maintainership for this driver" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: eeprom: at24: check at24_read/write arguments eeprom: at24: fix reading from 24MAC402/24MAC602 eeprom: at24: correctly set the size for at24mac402 i2c: i2c-boardinfo: fix memory leaks on devinfo i2c: i801: Fix Failed to allocate irq -2147483648 error commit 49a418d78378769cf78b8c645f7e469f4dae2bbd Merge: 2db767d 68615eb Author: Linus Torvalds Date: Sun Dec 3 10:46:16 2017 -0500 Merge tag 'hwmon-for-linus-v4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "Fixes: - Drop reference to obsolete maintainer tree - Fix overflow bug in pmbus driver - Fix SMBUS timeout problem in jc42 driver For the SMBUS timeout handling, we had a brief discussion if this should be considered a bug fix or a feature. Peter says "it fixes real problems where the application misbehave due to faulty content when reading from an eeprom", and he needs the patch in his company's v4.14 images. This is good enough for me and warrants backport to stable kernels" * tag 'hwmon-for-linus-v4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (jc42) optionally try to disable the SMBUS timeout hwmon: (pmbus) Use 64bit math for DIRECT format values hwmon: Drop reference to Jean's tree commit bcd1d601e5cc760bf5743a59e4716603490e281c Author: David Howells Date: Fri Dec 1 11:10:37 2017 +0000 rxrpc: Fix the MAINTAINERS record Fix the MAINTAINERS record so that it's more obvious who the maintainer for AF_RXRPC is. Reported-by: Joe Perches Reported-by: David Miller Signed-off-by: David Howells Signed-off-by: David S. Miller MAINTAINERS | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit c501256406fb19c306504ee1fe41a4ea208d4245 Author: David Howells Date: Fri Dec 1 11:09:53 2017 +0000 rxrpc: Use correct netns source in rxrpc_release_sock() In rxrpc_release_sock() there may be no rx->local value to access, so we can't unconditionally follow it to the rxrpc network namespace information to poke the connection reapers. Instead, use the socket's namespace pointer to find the namespace. This unfixed code causes the following static checker warning: net/rxrpc/af_rxrpc.c:898 rxrpc_release_sock() error: we previously assumed 'rx->local' could be null (see line 887) Fixes: 3d18cbb7fd0c ("rxrpc: Fix conn expiry timers") Reported-by: Dan Carpenter Signed-off-by: David Howells Signed-off-by: David S. Miller net/rxrpc/af_rxrpc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e168e9845d956e6d0c057f9ecd28782a1ab4a08a Merge: 0590cdf 6d745ee Author: Greg Kroah-Hartman Date: Sun Dec 3 16:04:38 2017 +0100 Merge tag 'iio-fixes-for-4.15a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First set of IIO fixes in the 4.15 cycle. * kernel-doc - fix a build error from symbols ending in _ by making them _* * cpcap - Fix wrong handling of platform_get_irq_by_name which can return a postive value on success. * max30102 - ABI says temperature should bein milli Celsius after scaling. Here it was in Celsius. * meson-saradc: - for Meson8/8b the gate clock bit was wrongly selected due to ffs/fls fun. - bandgap was not initialized properly on older socs. Mostly got away with this because the bootloader was doing it for us. - Meson8/8b don't have some registers in the general regmap config. Give them their own ones. * stm32-lptimer/stm32-adc trigger - Fix a link error when optional stm32-lptimer driver isn't built. * sx9500 - we recently removed explict handling of ACPI provided gpio interrupts as the core i2c acpi code started providing them directly. Unfortuantely there are ACPI tables out there that use GpioIO resources and it doesn't know to map those as interrupts. As such partial revert the removal of this handling from the driver. commit 886afc1dc489436bf2c4fadf0f3aecacd7269234 Author: Colin Ian King Date: Fri Dec 1 12:38:11 2017 +0000 liquidio: fix incorrect indentation of assignment statement Remove one extraneous level of indentation on assignment statement. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed75e1ac1cabbe517fe959f06ff02e01a660a32f Merge: 45ab4b1 1cb35a3 Author: David S. Miller Date: Sun Dec 3 09:57:54 2017 -0500 Merge tag 'linux-can-fixes-for-4.15-20171201' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2017-12-01 this is a pull for net consisting of nine patches. The first three patches are by Jimmy Assarsson for the kvaser_usb driver and add the missing free()s in some error path, a signed/unsigned comparison and ratelimit the error messages in case of incomplete messages. Oliver Stäbler's patch for the ti_hecc driver fix the napi poll function's return value. The return values of the probe function of the peak_canfd and peak_pci PCI drivers are fixed by Stephane Grosjean's patch. Two patches by me for the flexcan driver update the bugs/features/quirks overview table and fix the error state transition for the VF610 SoC. The two patches by Martin Kelly for the mcba_usb driver fix a typo and a device disconnect bug. ==================== Signed-off-by: David S. Miller commit edef30980dc06bea547baefcfc8d910682b6e060 Merge: 66a7c84 d9bcd46 Author: Wolfram Sang Date: Sat Dec 2 23:32:13 2017 +0100 Merge tag 'at24-4.15-fixes-for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-current Please consider pulling the following fixes for v4.15. While it doesn't fix any regression introduced in the v4.15 merge window, we have a feature in at24 since linux v4.8 - reading the mac address block from at24mac series - which turned out to be not working. This pull request contains changes that fix it together with a patch that hardens the read and write argument sanitization with out-of-bounds checks that were missing. commit 45ab4b13e46325d00f4acdb365d406e941a15f81 Author: Lars Persson Date: Fri Dec 1 11:12:44 2017 +0100 stmmac: reset last TSO segment size after device open The mss variable tracks the last max segment size sent to the TSO engine. We do not update the hardware as long as we receive skb:s with the same value in gso_size. During a network device down/up cycle (mapped to stmmac_release() and stmmac_open() callbacks) we issue a reset to the hardware and it forgets the setting for mss. However we did not zero out our mss variable so the next transmission of a gso packet happens with an undefined hardware setting. This triggers a hang in the TSO engine and eventuelly the netdev watchdog will bark. Fixes: f748be531d70 ("stmmac: support new GMAC4") Signed-off-by: Lars Persson Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 + 1 file changed, 1 insertion(+) commit a98a4ebc8c61d20f0150d6be66e0e65223a347af Author: Gao Feng Date: Fri Dec 1 09:58:42 2017 +0800 ipvlan: Add the skb->mark as flow4's member to lookup route Current codes don't use skb->mark to assign flowi4_mark, it would make the policy route rule with fwmark doesn't work as expected. Signed-off-by: Gao Feng Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_core.c | 1 + 1 file changed, 1 insertion(+) commit af57b7fffaf74ff337e479abb19026d72065673b Merge: 7344ba0 0cbff6d Author: David S. Miller Date: Sat Dec 2 21:35:21 2017 -0500 Merge branch 's390-qeth-fixes' Julian Wiedmann says: ==================== s390/qeth: fixes 2017-12-01 please apply the following three fixes for 4.15. These should also go back to stable. ==================== Signed-off-by: David S. Miller commit 0cbff6d4546613330a1c5f139f5c368e4ce33ca1 Author: Julian Wiedmann Date: Fri Dec 1 10:14:51 2017 +0100 s390/qeth: build max size GSO skbs on L2 devices The current GSO skb size limit was copy&pasted over from the L3 path, where it is needed due to a TSO limitation. As L2 devices don't offer TSO support (and thus all GSO skbs are segmented before they reach the driver), there's no reason to restrict the stack in how large it may build the GSO skbs. Fixes: d52aec97e5bc ("qeth: enable scatter/gather in layer 2 mode") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 2 -- drivers/s390/net/qeth_l3_main.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 6d69b1f1eb7a2edf8a3547f361c61f2538e054bb Author: Julian Wiedmann Date: Fri Dec 1 10:14:50 2017 +0100 s390/qeth: fix GSO throughput regression Using GSO with small MTUs currently results in a substantial throughput regression - which is caused by how qeth needs to map non-linear skbs into its IO buffer elements: compared to a linear skb, each GSO-segmented skb effectively consumes twice as many buffer elements (ie two instead of one) due to the additional header-only part. This causes the Output Queue to be congested with low-utilized IO buffers. Fix this as follows: If the MSS is low enough so that a non-SG GSO segmentation produces order-0 skbs (currently ~3500 byte), opt out from NETIF_F_SG. This is where we anticipate the biggest savings, since an SG-enabled GSO segmentation produces skbs that always consume at least two buffer elements. Larger MSS values continue to get a SG-enabled GSO segmentation, since 1) the relative overhead of the additional header-only buffer element becomes less noticeable, and 2) the linearization overhead increases. With the throughput regression fixed, re-enable NETIF_F_SG by default to reap the significant CPU savings of GSO. Fixes: 5722963a8e83 ("qeth: do not turn on SG per default") Reported-by: Nils Hoppmann Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 3 +++ drivers/s390/net/qeth_core_main.c | 31 +++++++++++++++++++++++++++++++ drivers/s390/net/qeth_l2_main.c | 2 ++ drivers/s390/net/qeth_l3_main.c | 2 ++ 4 files changed, 38 insertions(+) commit bc3ab70584696cb798b9e1e0ac8e6ced5fd4c3b8 Author: Julian Wiedmann Date: Fri Dec 1 10:14:49 2017 +0100 s390/qeth: fix thinko in IPv4 multicast address tracking Commit 5f78e29ceebf ("qeth: optimize IP handling in rx_mode callback") reworked how secondary addresses are managed for qeth devices. Instead of dropping & subsequently re-adding all addresses on every ndo_set_rx_mode() call, qeth now keeps track of the addresses that are currently registered with the HW. On a ndo_set_rx_mode(), we thus only need to do (de-)registration requests for the addresses that have actually changed. On L3 devices, the lookup for IPv4 Multicast addresses checks the wrong hashtable - and thus never finds a match. As a result, we first delete *all* such addresses, and then re-add them again. So each set_rx_mode() causes a short period where the IPv4 Multicast addresses are not registered, and the card stops forwarding inbound traffic for them. Fix this by setting the ->is_multicast flag on the lookup object, thus enabling qeth_l3_ip_from_hash() to search the correct hashtable and find a match there. Fixes: 5f78e29ceebf ("qeth: optimize IP handling in rx_mode callback") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l3_main.c | 1 + 1 file changed, 1 insertion(+) commit 7344ba039f4fc5fb18be5618199827e246b0c697 Merge: fa935ca 61d7853 Author: David S. Miller Date: Sat Dec 2 21:31:04 2017 -0500 Merge branch 'vhost-skb-leaks' Wei Xu says: ==================== vhost: fix a few skb leaks Matthew found a roughly 40% tcp throughput regression with commit c67df11f(vhost_net: try batch dequing from skb array) as discussed in the following thread: https://www.mail-archive.com/netdev@vger.kernel.org/msg187936.html v4: - fix zero iov iterator count in tap/tap_do_read()(Jason) - don't put tun in case of EBADFD(Jason) - Replace msg->msg_control with new 'skb' when calling tun/tap_do_read() v3: - move freeing skb from vhost to tun/tap recvmsg() to not confuse the callers. v2: - add Matthew as the reporter, thanks matthew. - moving zero headcount check ahead instead of defer consuming skb due to jason and mst's comment. - add freeing skb in favor of recvmsg() fails. ==================== Acked-by: Michael S. Tsirkin Tested-by: Matthew Rosato Signed-off-by: David S. Miller commit 61d78537843e676e7f56ac6db333db0c0529b892 Author: Wei Xu Date: Fri Dec 1 05:10:38 2017 -0500 tap: free skb if flags error tap_recvmsg() supports accepting skb by msg_control after commit 3b4ba04acca8 ("tap: support receiving skb from msg_control"), the skb if presented should be freed within the function, otherwise it would be leaked. Signed-off-by: Wei Xu Reported-by: Matthew Rosato Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/tap.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit c33ee15b3820a03cf8229ba9415084197b827f8c Author: Wei Xu Date: Fri Dec 1 05:10:37 2017 -0500 tun: free skb in early errors tun_recvmsg() supports accepting skb by msg_control after commit ac77cfd4258f ("tun: support receiving skb through msg_control"), the skb if presented should be freed no matter how far it can go along, otherwise it would be leaked. This patch fixes several missed cases. Signed-off-by: Wei Xu Reported-by: Matthew Rosato Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/tun.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 6e474083f3daf3a3546737f5d7d502ad12eb257c Author: Wei Xu Date: Fri Dec 1 05:10:36 2017 -0500 vhost: fix skb leak in handle_rx() Matthew found a roughly 40% tcp throughput regression with commit c67df11f(vhost_net: try batch dequing from skb array) as discussed in the following thread: https://www.mail-archive.com/netdev@vger.kernel.org/msg187936.html Eventually we figured out that it was a skb leak in handle_rx() when sending packets to the VM. This usually happens when a guest can not drain out vq as fast as vhost fills in, afterwards it sets off the traffic jam and leaks skb(s) which occurs as no headcount to send on the vq from vhost side. This can be avoided by making sure we have got enough headcount before actually consuming a skb from the batched rx array while transmitting, which is simply done by moving checking the zero headcount a bit ahead. Signed-off-by: Wei Xu Reported-by: Matthew Rosato Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/vhost/net.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit fa935ca224b43031ee10c857d7535aaec85c83b2 Merge: ccab371 ebd5818 Author: David S. Miller Date: Sat Dec 2 21:25:39 2017 -0500 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: Fixes. A shutdown fix for SMARTNIC, 2 fixes related to TC Flower vxlan filters, and the last one fixes an out-of-scope variable when sending short firmware messages. ==================== Signed-off-by: David S. Miller commit ebd5818cc5d4847897d7fe872e2d9799d7b7fcbb Author: Vasundhara Volam Date: Fri Dec 1 03:13:05 2017 -0500 bnxt_en: Fix a variable scoping in bnxt_hwrm_do_send_msg() short_input variable is assigned to another data pointer which is referred out of its scope. Fix it by moving short_input definition to the beginning of bnxt_hwrm_do_send_msg() function. No failure has been reported so far due to this issue. Fixes: e605db801bde ("bnxt_en: Support for Short Firmware Message") Signed-off-by: Vasundhara Volam 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 e9ecc731a87912d209d6e9b4ed20ed70451c08cb Author: Sathya Perla Date: Fri Dec 1 03:13:04 2017 -0500 bnxt_en: fix dst/src fid for vxlan encap/decap actions For flows that involve a vxlan encap action, the vxlan sock interface may be specified as the outgoing interface. The driver must resolve the outgoing PF interface used by this socket and use the dst_fid of the PF in the hwrm_cfa_encap_record_alloc cmd. Similarily for flows that have a vxlan decap action, the fid of the incoming PF interface must be used as the src_fid in the hwrm_cfa_decap_filter_alloc cmd. Fixes: 8c95f773b4a3 ("bnxt_en: add support for Flower based vxlan encap/decap offload") Signed-off-by: Sathya Perla Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 48 +++++++++++++++------------- 1 file changed, 26 insertions(+), 22 deletions(-) commit c8fb7b8259c67b86cd93a71c85e78b34d2c96fdc Author: Sunil Challa Date: Fri Dec 1 03:13:03 2017 -0500 bnxt_en: wildcard smac while creating tunnel decap filter While creating a decap filter the tunnel smac need not (and must not) be specified as we cannot ascertain the neighbor in the recv path. 'ttl' match is also not needed for the decap filter and must be wild-carded. Fixes: f484f6782e01 ("bnxt_en: add hwrm FW cmds for cfa_encap_record and decap_filter") Signed-off-by: Sunil Challa Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit a7f3f939dd7d8398acebecd1ceb2e9e7ffbe91d2 Author: Ray Jui Date: Fri Dec 1 03:13:02 2017 -0500 bnxt_en: Need to unconditionally shut down RoCE in bnxt_shutdown The current 'bnxt_shutdown' implementation only invokes 'bnxt_ulp_shutdown' to shut down RoCE in the case when the system is in the path of power off (SYSTEM_POWER_OFF). While this may work in most cases, it does not work in the smart NIC case, when Linux 'reboot' command is initiated from the Linux that runs on the ARM cores of the NIC card. In this particular case, Linux 'reboot' results in a system 'L3' level reset where the entire ARM and associated subsystems are being reset, but at the same time, Nitro core is being kept in sane state (to allow external PCIe connected servers to continue to work). Without properly shutting down RoCE and freeing all associated resources, it results in the ARM core to hang immediately after the 'reboot' By always invoking 'bnxt_ulp_shutdown' in 'bnxt_shutdown', it fixes the above issue Fixes: 0efd2fc65c92 ("bnxt_en: Add a callback to inform RDMA driver during PCI shutdown.") Signed-off-by: Ray Jui Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8d810a4029c6f0d9b19da3d96e1c29ed5930656a Merge: 8bd30f2 e501506 Author: Olof Johansson Date: Sat Dec 2 17:01:40 2017 -0800 Merge tag 'imx-fixes-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes i.MX fixes for 4.15: - A fix for vf610-zii-dev-rev-c board which correct the unit-address of I2C EEPROM node to match the 'reg' property. - We thought the RTC block on i.MX53 is compatible with the one found on i.MX25, and added the device for i.MX53 device tree. But it turns out that's not the case, and we have to revert the change. * tag 'imx-fixes-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: Revert "ARM: dts: imx53: add srtc node" ARM: dts: vf610-zii-dev-rev-c: Fix the I2C EEPROM address Signed-off-by: Olof Johansson commit 8bd30f22984d58357dbef18d141fc1ef49d9994b Merge: a760576 0308cad Author: Olof Johansson Date: Sat Dec 2 17:00:35 2017 -0800 Merge tag 'uniphier-fixes-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into fixes UniPhier ARM SoC fixes for v4.15 - Fix IRQ number of PXs3 SoC - Remove redundant interrupt-parent properties - Fix arm64 DT path in MAINTAINERS * tag 'uniphier-fixes-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: MAINTAINERS: exclude other Socionext SoC DT files from ARM/UNIPHIER entry arm64: dts: uniphier: remove unnecessary interrupt-parent arm64: dts: uniphier: correct on-board device IRQ number for PXs3 Signed-off-by: Olof Johansson commit a760576b683bf248a0c9b7a6e503ca14dcdd1b5d Merge: 1864f52 f044113 Author: Olof Johansson Date: Sat Dec 2 16:59:09 2017 -0800 Merge tag 'tee-drv-fix-for-4.15' of https://git.linaro.org/people/jens.wiklander/linux-tee into fixes One small fix for optee_driver_init() * Fixes problem with an invalid call to of_node_put() in optee_driver_init() * tag 'tee-drv-fix-for-4.15' of https://git.linaro.org/people/jens.wiklander/linux-tee: optee: fix invalid of_node_put() in optee_driver_init() Signed-off-by: Olof Johansson commit 1864f527ae700ab1375dd83ff9e8ee31f22ba337 Merge: 615af08 babd8a3 Author: Olof Johansson Date: Sat Dec 2 16:58:37 2017 -0800 Merge tag 'arm-soc/for-4.15/devicetree-fixes-1' of http://github.com/Broadcom/stblinux into fixes This pull request contains Broadcom ARM-based SoCs Device Tree fixes for 4.15, please pull the following: - Stefan provides a fix for the BCM2835 (Raspberry Pi) to fix warnings about missing "#phy-cells" properties - Florian provides two fixes for Nortsthar Plus, one that uses the correct interrupt specifiers for the timer/watchdog and one that disables SATA on BCM9582**HR boards since that leads to unidentified hangs right now * tag 'arm-soc/for-4.15/devicetree-fixes-1' of http://github.com/Broadcom/stblinux: ARM: dts: NSP: Fix PPI interrupt types ARM: dts: NSP: Disable AHCI controller for HR NSP boards ARM: dts: bcm283x: Fix DTC warnings about missing phy-cells Signed-off-by: Olof Johansson commit 615af08e04f5ab25c0469f852825ea3a41928f43 Merge: 44e5dce 098f530 Author: Olof Johansson Date: Sat Dec 2 16:56:12 2017 -0800 Merge tag 'renesas-dt-fixes-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes Renesas ARM Based SoC DT Fixes for v4.15 Add missing '#reset-cells' property to cpg nodes. This flagged by recent dtc. * tag 'renesas-dt-fixes-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: dts: r8a779x: Add '#reset-cells' in cpg-mssr Signed-off-by: Olof Johansson commit 44e5dced2ef6e7adb2bf53227f3e4283e4d8f8f1 Author: Rob Herring Date: Thu Nov 9 16:26:11 2017 -0600 arm: dts: marvell: Add missing #phy-cells to usb-nop-xceiv "usb-nop-xceiv" is using the phy binding, but is missing #phy-cells property. This is probably because the binding was the precursor to the phy binding. Fixes the following warning in Marvell dts files: Warning (phys_property): Missing property '#phy-cells' in node ... Signed-off-by: Rob Herring Cc: Jason Cooper Cc: Sebastian Hesselbarth Reviewed-by: Andrew Lunn Acked-by: Gregory CLEMENT Signed-off-by: Olof Johansson arch/arm/boot/dts/armada-385-db-ap.dts | 1 + arch/arm/boot/dts/armada-385-linksys.dtsi | 1 + arch/arm/boot/dts/armada-385-synology-ds116.dts | 2 ++ arch/arm/boot/dts/armada-388-gp.dts | 2 ++ 4 files changed, 6 insertions(+) commit cbbde59b29d7c4cf4228efcb964b683ad83f8c03 Author: Masahiro Yamada Date: Sat Nov 18 12:10:03 2017 +0900 arm64: dts: sort vendor subdirectories in Makefile alphabetically The list is almost sorted. Move "lg" up to complete it. Signed-off-by: Masahiro Yamada Signed-off-by: Olof Johansson arch/arm64/boot/dts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a64e557f399090f5d1917b2f32a065da2b12be1 Author: Sergei Shtylyov Date: Thu Nov 16 23:18:32 2017 +0300 gpio: pca953x: fix vendor prefix for PCA9654 Despite commit 55020c8056a8 ("of: Add vendor prefix for ON Semiconductor Corp.") was made long ago, the latter commit 9f49f6dd0473 ("gpio: pca953x: add onsemi,pca9654 id") made use of another, undocumented vendor prefix. Since such prefix doesn't seem to be used in any device trees, I think we can just fix the "compatible" string in the driver and the bindings and be done with that... Fixes: 9f49f6dd0473 ("gpio: pca953x: add onsemi,pca9654 id") Signed-off-by: Sergei Shtylyov Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/gpio-pca953x.txt | 2 +- drivers/gpio/gpio-pca953x.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 741f5afbba70ff3cddcc5bba2595d9a44fa722e5 Author: Heiko Stuebner Date: Sat Dec 2 17:36:45 2017 +0100 ARM: dts: rockchip: add cpu0-regulator on rk3066a-marsboard The rk3066 also has operating points now, but without adjusting the cpu-regulator will break once higher voltages are needed for a specific frequency, so add the needed cpu0-regulator. Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3066a-marsboard.dts | 4 ++++ 1 file changed, 4 insertions(+) commit a08415ea2a8b3f0173fd0612317d5cba5b57fedb Author: John Pittman Date: Wed Nov 22 12:56:22 2017 -0500 scsi: documentation: Fix case of 'scsi_device' struct mention(s) In scsi_mid_low_api.txt a the scsi_device structure is mentioned several times, but the leading 's' is uppercase (Scsi_device) and should be lowercase (scsi_device). Fixed by this commit. Signed-off-by: John Pittman Signed-off-by: Jonathan Corbet Documentation/scsi/scsi_mid_low_api.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0f83aaa3c07a46b41b2d5d8ee6b88617eb2c2f09 Author: Jonathan Neuschäfer Date: Tue Nov 28 06:16:21 2017 +0100 genericirq.rst: Remove :c:func:`...` in code blocks In code blocks, :c:func:`...` annotations don't result in cross-references. Instead, they are rendered verbatim. Remove these broken annotations, and mark function calls with parentheses() again. Fixes: 76d40fae1351 ("genericirq.rst: add cross-reference links and use monospaced fonts") Signed-off-by: Jonathan Neuschäfer Signed-off-by: Jonathan Corbet Documentation/core-api/genericirq.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e50806a9fd0132402a62cb3161d786335662072f Author: Masanari Iida Date: Wed Nov 29 00:16:56 2017 +0900 dmaengine: doc : Fix warning "Title underline too short" while make xmldocs This patch fix following warning during 'make xmldocs' Documentation/driver-api/dmaengine/client.rst:188: WARNING: Title underline too short. Further APIs: ------------ Signed-off-by: Masanari Iida Signed-off-by: Jonathan Corbet Documentation/driver-api/dmaengine/client.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e814bccbafece52a24e152d2395b5d49eef55841 Author: Will Deacon Date: Wed Nov 29 15:20:03 2017 +0000 scripts/kernel-doc: Don't fail with status != 0 if error encountered with -none My bisect scripts starting running into build failures when trying to compile 4.15-rc1 with the builds failing with things like: drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:2078: error: Cannot parse struct or union! The line in question is actually just a #define, but after some digging it turns out that my scripts pass W=1 and since commit 3a025e1d1c2ea ("Add optional check for bad kernel-doc comments") that results in kernel-doc running on each source file. The file in question has a badly formatted comment immediately before the #define: /** * struct brcmf_skbuff_cb reserves first two bytes in sk_buff::cb for * bus layer usage. */ which causes the regex in dump_struct to fail (lack of braces following struct declaration) and kernel-doc returns 1, which causes the build to fail. Fix the issue by always returning 0 from kernel-doc when invoked with -none. It successfully generates no documentation, and prints out any issues. Cc: Matthew Wilcox Cc: Jonathan Corbet Signed-off-by: Will Deacon Signed-off-by: Jonathan Corbet scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c3de777bdaf48bd0cfb43097c0d0fb85056cab7 Author: Arend Van Spriel Date: Sat Nov 25 21:39:25 2017 +0100 brcmfmac: change driver unbind order of the sdio function devices In the function brcmf_sdio_firmware_callback() the driver is unbound from the sdio function devices in the error path. However, the order in which it is done resulted in a use-after-free issue (see brcmf_ops_sdio_remove() in bcmsdh.c). Hence change the order and first unbind sdio function #2 device and then unbind sdio function #1 device. Cc: stable@vger.kernel.org # v4.12.x Fixes: 7a51461fc2da ("brcmfmac: unbind all devices upon failure in firmware callback") Reported-by: Stefan Wahren 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/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4875470a79090eb941052ba6ec0dd34b98cf261 Merge: f859b4a 0232d2c Author: Kalle Valo Date: Sat Dec 2 15:01:45 2017 +0200 Merge tag 'iwlwifi-for-kalle-2017-11-28' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes Second batch of fixes intended for 4.15. * One fix in rate-scaling; * One fix for the TX queue hang detection for AP/GO modes; * Fix the TX queue hang timeout used in monitor interfaces; * Fix packet injection; * Remove a wrong error message when dumping PCI registers; * Fix race condition with RF-kill; commit 6d745ee8b5e81f3a33791e3c854fbbfd6f3e585e Author: Arnd Bergmann Date: Wed Sep 6 14:56:50 2017 +0200 iio: stm32: fix adc/trigger link error The ADC driver can trigger on either the timer or the lptim trigger, but it only uses a Kconfig 'select' statement to ensure that the first of the two is present. When the lptim trigger is enabled as a loadable module, and the adc driver is built-in, we now get a link error: drivers/iio/adc/stm32-adc.o: In function `stm32_adc_get_trig_extsel': stm32-adc.c:(.text+0x4e0): undefined reference to `is_stm32_lptim_trigger' We could use a second 'select' statement and always have both trigger drivers enabled when the adc driver is, but it seems that the lptimer trigger was intentionally left optional, so it seems better to keep it that way. This adds a hack to use 'IS_REACHABLE()' rather than 'IS_ENABLED()', which avoids the link error, but instead leads to the lptimer trigger not being used in the broken configuration. I've added a runtime warning for this case to help users figure out what they did wrong if this should ever be done by accident. Fixes: f0b638a7f6db ("iio: adc: stm32: add support for lptimer triggers") Signed-off-by: Arnd Bergmann Cc: Signed-off-by: Jonathan Cameron include/linux/iio/timer/stm32-lptim-trigger.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ad44a9f804c1591ba2a2ec0ac8d916a515d2790c Author: Peter Meerwald-Stadler Date: Fri Oct 27 21:45:31 2017 +0200 iio: health: max30102: Temperature should be in milli Celsius As per ABI temperature should be in milli Celsius after scaling, not Celsius Note on stable cc. This driver is breaking the standard IIO ABI. (JC) Signed-off-by: Peter Meerwald-Stadler Acked-by: Matt Ranostay Cc: Signed-off-by: Jonathan Cameron drivers/iio/health/max30102.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c175cb7cd953782bbf4e8bdf088ad61440d6dde5 Author: Randy Dunlap Date: Sun Oct 29 17:06:01 2017 -0700 iio: fix kernel-doc build errors Fix build errors in kernel-doc notation. Symbols that end in '_' have a special meaning, but adding a '*' makes them OK. ../drivers/iio/industrialio-core.c:635: ERROR: Unknown target name: "iio_val". ../drivers/iio/industrialio-core.c:642: ERROR: Unknown target name: "iio_val". Signed-off-by: Randy Dunlap Cc: Signed-off-by: Jonathan Cameron drivers/iio/industrialio-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 96748823c483c6eed8321f78bd128dd33f09c55c Author: Martin Blumenstingl Date: Tue Oct 31 21:01:45 2017 +0100 iio: adc: meson-saradc: Meson8 and Meson8b do not have REG11 and REG13 The Meson GXBB and newer SoCs have a few more registers than the older Meson8 and Meson8b SoCs. Use a separate regmap config to limit the older SoCs to the DELTA_10 register. Fixes: 6c76ed31cd05 ("iio: adc: meson-saradc: add Meson8b SoC compatibility") Signed-off-by: Martin Blumenstingl Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/meson_saradc.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit d85eed9f576369bc90322659de96b7dbea1f9a57 Author: Martin Blumenstingl Date: Tue Oct 31 21:01:44 2017 +0100 iio: adc: meson-saradc: initialize the bandgap correctly on older SoCs Meson8 and Meson8b do not have the MESON_SAR_ADC_REG11 register. The bandgap setting for these SoCs is configured in the MESON_SAR_ADC_DELTA_10 register instead. Make the driver aware of this difference and use the correct bandgap register depending on the SoC. This has worked fine on Meson8 and Meson8b because the bootloader is already initializing the bandgap setting. Fixes: 6c76ed31cd05 ("iio: adc: meson-saradc: add Meson8b SoC compatibility") Signed-off-by: Martin Blumenstingl Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/meson_saradc.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) commit 7a6b0420d2fe4ce59437bd318826fe468f0d71ae Author: Martin Blumenstingl Date: Tue Oct 31 21:01:43 2017 +0100 iio: adc: meson-saradc: fix the bit_idx of the adc_en clock Meson8 and Meson8b SoCs use the the SAR ADC gate clock provided by the MESON_SAR_ADC_REG3 register within the SAR ADC register area. According to the datasheet (and the existing MESON_SAR_ADC_REG3_CLK_EN definition) the gate is on bit 30. The fls() function returns the last set bit, which is "bit index + 1" (fls(MESON_SAR_ADC_REG3_CLK_EN) returns 31). Fix this by switching to __ffs() which returns the first set bit, which is bit 30 in our case. This off by one error results in the ADC not being usable on devices where the bootloader did not enable the clock. Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs") Signed-off-by: Martin Blumenstingl Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/meson_saradc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e53111ad5deaef98d8c18a9933ef1f5624c5979d Author: Andy Shevchenko Date: Fri Nov 3 15:03:36 2017 +0200 iio: proximity: sx9500: Assign interrupt from GpioIo() The commit 0f0796509c07 ("iio: remove gpio interrupt probing from drivers that use a single interrupt") removed custom IRQ assignment for the drivers which are enumerated via ACPI or OF. Unfortunately, some ACPI tables have IRQ line defined as GpioIo() resource and thus automatic IRQ allocation will fail. Partially revert the commit 0f0796509c07 to restore original behaviour. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Jonathan Cameron drivers/iio/proximity/sx9500.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 81b039ec36a41a5451e1e36f05bb055eceab1dc8 Author: Pan Bian Date: Mon Nov 13 00:01:20 2017 +0800 iio: adc: cpcap: fix incorrect validation Function platform_get_irq_byname() returns a negative error code on failure, and a zero or positive number on success. However, in function cpcap_adc_probe(), positive IRQ numbers are also taken as error cases. Use "if (ddata->irq < 0)" instead of "if (!ddata->irq)" to validate the return value of platform_get_irq_byname(). Signed-off-by: Pan Bian Fixes: 25ec249632d50 ("iio: adc: cpcap: Add minimal support for CPCAP PMIC ADC") Reviewed-by: Sebastian Reichel Acked-by: Tony Lindgren Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/cpcap-adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 974a6b20518602310637bd8ac9ad348bf8a864d6 Author: Sven Eckelmann Date: Fri Dec 1 11:47:56 2017 +0100 batman-adv: Fix kernel-doc for timer functions The commit e99e88a9d2b0 ("treewide: setup_timer() -> timer_setup()") changed the argument name and type of the timer function but didn't adjust the kernel-doc of these functions. Signed-off-by: Sven Eckelmann Acked-by: Kees Cook Signed-off-by: Simon Wunderlich net/batman-adv/tp_meter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2db767d9889cef087149a5eaa35c1497671fa40f Merge: 788c1da eb5b46f Author: Linus Torvalds Date: Fri Dec 1 20:04:20 2017 -0500 Merge tag 'nfs-for-4.15-2' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: "These patches fix a problem with compiling using an old version of gcc, and also fix up error handling in the SUNRPC layer. - NFSv4: Ensure gcc 4.4.4 can compile initialiser for "invalid_stateid" - SUNRPC: Allow connect to return EHOSTUNREACH - SUNRPC: Handle ENETDOWN errors" * tag 'nfs-for-4.15-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: SUNRPC: Handle ENETDOWN errors SUNRPC: Allow connect to return EHOSTUNREACH NFSv4: Ensure gcc 4.4.4 can compile initialiser for "invalid_stateid" commit 788c1da05b73aee68ed98f05b577c308351f5619 Merge: e1ba1c9 373b058 Author: Linus Torvalds Date: Fri Dec 1 20:00:19 2017 -0500 Merge tag 'xfs-4.15-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "Here are some bug fixes for 4.15-rc2. - fix memory leaks that appeared after removing ifork inline data buffer - recover deferred rmap update log items in correct order - fix memory leaks when buffer construction fails - fix memory leaks when bmbt is corrupt - fix some uninitialized variables and math problems in the quota scrubber - add some omitted attribution tags on the log replay commit - fix some UBSAN complaints about integer overflows with large sparse files - implement an effective inode mode check in online fsck - fix log's inability to retry quota item writeout due to transient errors" * tag 'xfs-4.15-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: Properly retry failed dquot items in case of error during buffer writeback xfs: scrub inode mode properly xfs: remove unused parameter from xfs_writepage_map xfs: ubsan fixes xfs: calculate correct offset in xfs_scrub_quota_item xfs: fix uninitialized variable in xfs_scrub_quota xfs: fix leaks on corruption errors in xfs_bmap.c xfs: fortify xfs_alloc_buftarg error handling xfs: log recovery should replay deferred ops in order xfs: always free inline data before resetting inode fork during ifree commit e1ba1c99dad92c5917b22b1047cf36e4426b124a Merge: 4b1967c 3b62de2 Author: Linus Torvalds Date: Fri Dec 1 19:39:12 2017 -0500 Merge tag 'riscv-for-linus-4.15-rc2_cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux Pull RISC-V cleanups and ABI fixes from Palmer Dabbelt: "This contains a handful of small cleanups that are a result of feedback that didn't make it into our original patch set, either because the feedback hadn't been given yet, I missed the original emails, or we weren't ready to submit the changes yet. I've been maintaining the various cleanup patch sets I have as their own branches, which I then merged together and signed. Each merge commit has a short summary of the changes, and each branch is based on your latest tag (4.15-rc1, in this case). If this isn't the right way to do this then feel free to suggest something else, but it seems sane to me. Here's a short summary of the changes, roughly in order of how interesting they are. - libgcc.h has been moved from include/lib, where it's the only member, to include/linux. This is meant to avoid tab completion conflicts. - VDSO entries for clock_get/gettimeofday/getcpu have been added. These are simple syscalls now, but we want to let glibc use them from the start so we can make them faster later. - A VDSO entry for instruction cache flushing has been added so userspace can flush the instruction cache. - The VDSO symbol versions for __vdso_cmpxchg{32,64} have been removed, as those VDSO entries don't actually exist. - __io_writes has been corrected to respect the given type. - A new READ_ONCE in arch_spin_is_locked(). - __test_and_op_bit_ord() is now actually ordered. - Various small fixes throughout the tree to enable allmodconfig to build cleanly. - Removal of some dead code in our atomic support headers. - Improvements to various comments in our atomic support headers" * tag 'riscv-for-linus-4.15-rc2_cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux: (23 commits) RISC-V: __io_writes should respect the length argument move libgcc.h to include/linux RISC-V: Clean up an unused include RISC-V: Allow userspace to flush the instruction cache RISC-V: Flush I$ when making a dirty page executable RISC-V: Add missing include RISC-V: Use define for get_cycles like other architectures RISC-V: Provide stub of setup_profiling_timer() RISC-V: Export some expected symbols for modules RISC-V: move empty_zero_page definition to C and export it RISC-V: io.h: type fixes for warnings RISC-V: use RISCV_{INT,SHORT} instead of {INT,SHORT} for asm macros RISC-V: use generic serial.h RISC-V: remove spin_unlock_wait() RISC-V: `sfence.vma` orderes the instruction cache RISC-V: Add READ_ONCE in arch_spin_is_locked() RISC-V: __test_and_op_bit_ord should be strongly ordered RISC-V: Remove smb_mb__{before,after}_spinlock() RISC-V: Remove __smp_bp__{before,after}_atomic RISC-V: Comment on why {,cmp}xchg is ordered how it is ... commit 4b1967c90af473e3a8bec00024758a3e676cea2d Merge: a0651c7 3a33c76 Author: Linus Torvalds Date: Fri Dec 1 19:37:03 2017 -0500 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "The critical one here is a fix for fpsimd register corruption across signals which was introduced by the SVE support code (the register files overlap), but the others are worth having as well. Summary: - Fix FP register corruption when SVE is not available or in use - Fix out-of-tree module build failure when CONFIG_ARM64_MODULE_PLTS=y - Missing 'const' generating errors with LTO builds - Remove unsupported events from Cortex-A73 PMU description - Removal of stale and incorrect comments" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: context: Fix comments and remove pointless smp_wmb() arm64: cpu_ops: Add missing 'const' qualifiers arm64: perf: remove unsupported events for Cortex-A73 arm64: fpsimd: Fix failure to restore FPSIMD state after signals arm64: pgd: Mark pgd_cache as __ro_after_init arm64: ftrace: emit ftrace-mod.o contents through code arm64: module-plts: factor out PLT generation code for ftrace arm64: mm: cleanup stale AIVIVT references commit 3b62de26cf5ef17340a0e986d3e53eb4f74f96d5 Merge: 185e788 741fc3f Author: Palmer Dabbelt Date: Fri Dec 1 13:31:31 2017 -0800 RISC-V: Fixes for clean allmodconfig build Olaf said: Here's a short series of patches that produces a working allmodconfig. Would be nice to see them go in so we can add build coverage. I've dropped patches 8 and 10 from the original set: * [PATCH 08/10] (RISC-V: Set __ARCH_WANT_RENAMEAT to pick up generic version) has a better fix that I've sent out for review, we don't want renameat. * [PATCH 10/10] (input: joystick: riscv has get_cycles) has already been taken into Dmitry Torokhov's tree. commit 185e788c84a95cb024cff98988bdeb09e619cd62 Merge: 7382fbd 4db2b60 Author: Palmer Dabbelt Date: Fri Dec 1 13:16:15 2017 -0800 move libgcc.h to include/linux commit 7382fbdeae0d6dbd1c26ebf4a302f1ccf33d9882 Merge: 07f8ba7 da894ff Author: Palmer Dabbelt Date: Fri Dec 1 13:14:36 2017 -0800 RISC-V: __io_writes should respect the length argument commit 07f8ba7439f9c942d5bd7b63074e7a1528601713 Merge: f8182f6 0e710ac Author: Palmer Dabbelt Date: Fri Dec 1 13:12:10 2017 -0800 RISC-V: User-Visible Changes This merge contains the user-visible, ABI-breaking changes that we want to make sure we have in Linux before our first release. Highlights include: * VDSO entries for clock_get/gettimeofday/getcpu have been added. These are simple syscalls now, but we want to let glibc use them from the start so we can make them faster later. * A VDSO entry for instruction cache flushing has been added so userspace can flush the instruction cache. * The VDSO symbol versions for __vdso_cmpxchg{32,64} have been removed, as those VDSO entries don't actually exist. Conflicts: arch/riscv/include/asm/tlbflush.h commit f8182f613c9887744eb469b1a3352636481cb395 Merge: 4fbd8d1 bf73055 Author: Palmer Dabbelt Date: Fri Dec 1 13:10:42 2017 -0800 RISC-V Atomic Cleanups This patch set is the result of some feedback that filtered through after our original patch set was reviewed, some of which was the result of me missing some email. It contains: * A new READ_ONCE in arch_spin_is_locked() * __test_and_op_bit_ord() is now actually ordered * Improvements to various comments * Removal of some dead code commit da894ff100be9044c490f47f61541481b4f42b1f Author: Palmer Dabbelt Date: Tue Nov 28 14:15:32 2017 -0800 RISC-V: __io_writes should respect the length argument Whoops -- I must have just been being an idiot again. Thanks to Segher for finding the bug :). CC: Segher Boessenkool Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4db2b604c05afc3d2678fe01d3136c015df313ec Author: Christoph Hellwig Date: Wed Nov 22 11:47:28 2017 +0100 move libgcc.h to include/linux Introducing a new include/lib directory just for this file totally messes up tab completion for include/linux, which is highly annoying. Move it to include/linux where we have headers for all kinds of other lib/ code as well. Signed-off-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt include/lib/libgcc.h | 43 ------------------------------------------- include/linux/libgcc.h | 43 +++++++++++++++++++++++++++++++++++++++++++ lib/ashldi3.c | 2 +- lib/ashrdi3.c | 2 +- lib/cmpdi2.c | 2 +- lib/lshrdi3.c | 2 +- lib/muldi3.c | 2 +- lib/ucmpdi2.c | 2 +- 8 files changed, 49 insertions(+), 49 deletions(-) commit 18022a1bd3709b74ca31ef0b28fccd52bcd6c504 Author: Shaohua Li Date: Fri Dec 1 12:12:34 2017 -0800 md/raid1/10: add missed blk plug flush_pending_writes isn't always called with block plug, so add it, and plug works in nested way. Signed-off-by: Shaohua Li drivers/md/raid1.c | 4 ++++ drivers/md/raid10.c | 4 ++++ 2 files changed, 8 insertions(+) commit d2e2ec8222b4cb49c59f6dc6f5c4fe6fb4c80de9 Author: Nate Dailey Date: Thu Nov 30 11:33:30 2017 -0500 md: limit mdstat resync progress to max_sectors There is a small window near the end of md_do_sync where mddev->curr_resync can be equal to MaxSector. If status_resync is called during this window, the resulting /proc/mdstat output contains a HUGE number of = signs due to the very large curr_resync: Personalities : [raid1] md123 : active raid1 sdd3[2] sdb3[0] 204736 blocks super 1.0 [2/1] [U_] [===================================================================== ... (82 MB more) ... ================>] recovery =429496729.3% (9223372036854775807/204736) finish=0.2min speed=12796K/sec bitmap: 0/1 pages [0KB], 65536KB chunk Modify status_resync to ensure the resync variable doesn't exceed the array's max_sectors. Signed-off-by: Nate Dailey Acked-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ccab371f746abca05a599d074cb3b95a549ef590 Merge: a0da456 2012b7d Author: David S. Miller Date: Fri Dec 1 15:18:42 2017 -0500 Merge branch 'sfp-phylink-fixes' Russell King says: ==================== SFP/phylink fixes Here are four phylink fixes: - the "options" is a big-endian value, we must test the bits taking the endian-ness into account. - improve the handling of RX_LOS polarity, taking no RX_LOS polarity bits set to mean there is no RX_LOS functionality provided. - do not report modules that require the address mode switching as supporting SFF8472. - ensure that the mac_link_down() function is called when phylink_stop() is called. ==================== Signed-off-by: David S. Miller commit 2012b7d6b2868c532f22d9172c8b24611637eb48 Author: Russell King Date: Thu Nov 30 13:59:26 2017 +0000 phylink: ensure we take the link down when phylink_stop() is called Ensure that we tell the MAC to take the link down when phylink_stop() is called, and that this completes prior to phylink_stop() returns. Reported-by: Florian Fainelli Tested-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 1 + 1 file changed, 1 insertion(+) commit ec7681bde6d0e53ea5ef564477c8656fc318023a Author: Russell King Date: Thu Nov 30 13:59:21 2017 +0000 sfp: warn about modules requiring address change sequence We do not support SFP modules which require the address change sequence as detailed by SFF 8472 revision 1.22 section 8.9. Warn when these modules are inserted, and treat them as SFF8079 modules for ethtool. Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/sfp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 710dfbb01a8ac0fc8d0cc191131bd84dc3796497 Author: Russell King Date: Thu Nov 30 13:59:16 2017 +0000 sfp: improve RX_LOS handling There are two bits in the option word for the RX_LOS signal. One reports that the RX_LOS signal is active high, the other reports that it is active low. When both or neither are set, the result is not well defined in the specification. Rather than assuming that neither set means normal RX_LOS, take this as meaning no RX_LOS signal available, thereby ignoring the signal. Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/sfp.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit acf1c02f023926b8b04672a9e81b1711ae681619 Author: Russell King Date: Thu Nov 30 13:59:11 2017 +0000 sfp: fix RX_LOS signal handling The options word is a be16 quantity, so we need to test the flags having converted the endian-ness. Convert the flag bits to be16, which can be optimised by the compiler, rather than converting a variable at runtime. Reported-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller drivers/net/phy/sfp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a0da456bbf95d2a9294799bb05c61bfb24736bb7 Author: Max Uvarov Date: Thu Nov 30 13:08:29 2017 +0300 net: phy-micrel: check return code in flp center function Fix obvious typo that first return value is set but not checked. Signed-off-by: Max Uvarov Signed-off-by: David S. Miller drivers/net/phy/micrel.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c7799c067c2ae33e348508c8afec354f3257ff25 Author: Tommi Rantala Date: Wed Nov 29 12:48:42 2017 +0200 tipc: call tipc_rcv() only if bearer is up in tipc_udp_recv() Remove the second tipc_rcv() call in tipc_udp_recv(). We have just checked that the bearer is not up, and calling tipc_rcv() with a bearer that is not up leads to a TIPC div-by-zero crash in tipc_node_calculate_timer(). The crash is rare in practice, but can happen like this: We're enabling a bearer, but it's not yet up and fully initialized. At the same time we receive a discovery packet, and in tipc_udp_recv() we end up calling tipc_rcv() with the not-yet-initialized bearer, causing later the div-by-zero crash in tipc_node_calculate_timer(). Jon Maloy explains the impact of removing the second tipc_rcv() call: "link setup in the worst case will be delayed until the next arriving discovery messages, 1 sec later, and this is an acceptable delay." As the tipc_rcv() call is removed, just leave the function via the rcu_out label, so that we will kfree_skb(). [ 12.590450] Own node address <1.1.1>, network identity 1 [ 12.668088] divide error: 0000 [#1] SMP [ 12.676952] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.14.2-dirty #1 [ 12.679225] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-2.fc27 04/01/2014 [ 12.682095] task: ffff8c2a761edb80 task.stack: ffffa41cc0cac000 [ 12.684087] RIP: 0010:tipc_node_calculate_timer.isra.12+0x45/0x60 [tipc] [ 12.686486] RSP: 0018:ffff8c2a7fc838a0 EFLAGS: 00010246 [ 12.688451] RAX: 0000000000000000 RBX: ffff8c2a5b382600 RCX: 0000000000000000 [ 12.691197] RDX: 0000000000000000 RSI: ffff8c2a5b382600 RDI: ffff8c2a5b382600 [ 12.693945] RBP: ffff8c2a7fc838b0 R08: 0000000000000001 R09: 0000000000000001 [ 12.696632] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8c2a5d8949d8 [ 12.699491] R13: ffffffff95ede400 R14: 0000000000000000 R15: ffff8c2a5d894800 [ 12.702338] FS: 0000000000000000(0000) GS:ffff8c2a7fc80000(0000) knlGS:0000000000000000 [ 12.705099] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 12.706776] CR2: 0000000001bb9440 CR3: 00000000bd009001 CR4: 00000000003606e0 [ 12.708847] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 12.711016] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 12.712627] Call Trace: [ 12.713390] [ 12.714011] tipc_node_check_dest+0x2e8/0x350 [tipc] [ 12.715286] tipc_disc_rcv+0x14d/0x1d0 [tipc] [ 12.716370] tipc_rcv+0x8b0/0xd40 [tipc] [ 12.717396] ? minmax_running_min+0x2f/0x60 [ 12.718248] ? dst_alloc+0x4c/0xa0 [ 12.718964] ? tcp_ack+0xaf1/0x10b0 [ 12.719658] ? tipc_udp_is_known_peer+0xa0/0xa0 [tipc] [ 12.720634] tipc_udp_recv+0x71/0x1d0 [tipc] [ 12.721459] ? dst_alloc+0x4c/0xa0 [ 12.722130] udp_queue_rcv_skb+0x264/0x490 [ 12.722924] __udp4_lib_rcv+0x21e/0x990 [ 12.723670] ? ip_route_input_rcu+0x2dd/0xbf0 [ 12.724442] ? tcp_v4_rcv+0x958/0xa40 [ 12.725039] udp_rcv+0x1a/0x20 [ 12.725587] ip_local_deliver_finish+0x97/0x1d0 [ 12.726323] ip_local_deliver+0xaf/0xc0 [ 12.726959] ? ip_route_input_noref+0x19/0x20 [ 12.727689] ip_rcv_finish+0xdd/0x3b0 [ 12.728307] ip_rcv+0x2ac/0x360 [ 12.728839] __netif_receive_skb_core+0x6fb/0xa90 [ 12.729580] ? udp4_gro_receive+0x1a7/0x2c0 [ 12.730274] __netif_receive_skb+0x1d/0x60 [ 12.730953] ? __netif_receive_skb+0x1d/0x60 [ 12.731637] netif_receive_skb_internal+0x37/0xd0 [ 12.732371] napi_gro_receive+0xc7/0xf0 [ 12.732920] receive_buf+0x3c3/0xd40 [ 12.733441] virtnet_poll+0xb1/0x250 [ 12.733944] net_rx_action+0x23e/0x370 [ 12.734476] __do_softirq+0xc5/0x2f8 [ 12.734922] irq_exit+0xfa/0x100 [ 12.735315] do_IRQ+0x4f/0xd0 [ 12.735680] common_interrupt+0xa2/0xa2 [ 12.736126] [ 12.736416] RIP: 0010:native_safe_halt+0x6/0x10 [ 12.736925] RSP: 0018:ffffa41cc0cafe90 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff4d [ 12.737756] RAX: 0000000000000000 RBX: ffff8c2a761edb80 RCX: 0000000000000000 [ 12.738504] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 12.739258] RBP: ffffa41cc0cafe90 R08: 0000014b5b9795e5 R09: ffffa41cc12c7e88 [ 12.740118] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000002 [ 12.740964] R13: ffff8c2a761edb80 R14: 0000000000000000 R15: 0000000000000000 [ 12.741831] default_idle+0x2a/0x100 [ 12.742323] arch_cpu_idle+0xf/0x20 [ 12.742796] default_idle_call+0x28/0x40 [ 12.743312] do_idle+0x179/0x1f0 [ 12.743761] cpu_startup_entry+0x1d/0x20 [ 12.744291] start_secondary+0x112/0x120 [ 12.744816] secondary_startup_64+0xa5/0xa5 [ 12.745367] Code: b9 f4 01 00 00 48 89 c2 48 c1 ea 02 48 3d d3 07 00 00 48 0f 47 d1 49 8b 0c 24 48 39 d1 76 07 49 89 14 24 48 89 d1 31 d2 48 89 df <48> f7 f1 89 c6 e8 81 6e ff ff 5b 41 5c 5d c3 66 90 66 2e 0f 1f [ 12.747527] RIP: tipc_node_calculate_timer.isra.12+0x45/0x60 [tipc] RSP: ffff8c2a7fc838a0 [ 12.748555] ---[ end trace 1399ab83390650fd ]--- [ 12.749296] Kernel panic - not syncing: Fatal exception in interrupt [ 12.750123] Kernel Offset: 0x13200000 from 0xffffffff82000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) [ 12.751215] Rebooting in 60 seconds.. Fixes: c9b64d492b1f ("tipc: add replicast peer discovery") Signed-off-by: Tommi Rantala Cc: Jon Maloy Signed-off-by: David S. Miller net/tipc/udp_media.c | 4 ---- 1 file changed, 4 deletions(-) commit cfac7f836a715b91f08c851df915d401a4d52783 Author: Eric Dumazet Date: Fri Dec 1 10:06:56 2017 -0800 tcp/dccp: block bh before arming time_wait timer Maciej Żenczykowski reported some panics in tcp_twsk_destructor() that might be caused by the following bug. timewait timer is pinned to the cpu, because we want to transition timwewait refcount from 0 to 4 in one go, once everything has been initialized. At the time commit ed2e92394589 ("tcp/dccp: fix timewait races in timer handling") was merged, TCP was always running from BH habdler. After commit 5413d1babe8f ("net: do not block BH while processing socket backlog") we definitely can run tcp_time_wait() from process context. We need to block BH in the critical section so that the pinned timer has still its purpose. This bug is more likely to happen under stress and when very small RTO are used in datacenter flows. Fixes: 5413d1babe8f ("net: do not block BH while processing socket backlog") Signed-off-by: Eric Dumazet Reported-by: Maciej Żenczykowski Acked-by: Maciej Żenczykowski Signed-off-by: David S. Miller net/dccp/minisocks.c | 6 ++++++ net/ipv4/tcp_minisocks.c | 6 ++++++ 2 files changed, 12 insertions(+) commit b484d8a53e31f3773ca5f24c00fc25ef97ace03d Merge: 6fef90c 779edd7 Author: David S. Miller Date: Fri Dec 1 15:06:31 2017 -0500 Merge branch 'sctp-prsctp-chunk-fixes' Xin Long says: ==================== sctp: a couple of fixes for chunks abandoned in prsctp Now when abandoning chunks in prsctp, it doesn't consider for frags in one msg, which would cause peer can never receive the whole frags for one msg to get them reassembled, these pieces of this msg will stay in the reasm queue forever and block the following chunks' receiving. This patchset is to fix them in patch 2 and 3, and also fix another issue for prsctp in patch 1. ==================== Acked-by: Neil Horman Signed-off-by: David S. Miller commit 779edd7348878a7376c0e3d0f96485c30b5f1b7d Author: Xin Long Date: Sat Nov 25 21:18:36 2017 +0800 sctp: do not abandon the other frags in unsent outq if one msg has outstanding frags Now for the abandoned chunks in unsent outq, it would just free the chunks. Because no tsn is assigned to them yet, there's no need to send fwd tsn to peer, unlike for the abandoned chunks in sent outq. The problem is when parts of the msg have been sent and the other frags are still in unsent outq, if they are abandoned/dropped, the peer would never get this msg reassembled. So these frags in unsent outq can't be dropped if this msg already has outstanding frags. This patch does the check in sctp_chunk_abandoned and sctp_prsctp_prune_unsent. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/chunk.c | 4 ++++ net/sctp/outqueue.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) commit e5f612969c6f965e3bd1158598e0a3b1c4f389b9 Author: Xin Long Date: Sat Nov 25 21:18:35 2017 +0800 sctp: abandon the whole msg if one part of a fragmented message is abandoned As rfc3758#section-3.1 demands: A3) When a TSN is "abandoned", if it is part of a fragmented message, all other TSN's within that fragmented message MUST be abandoned at the same time. Besides, if it couldn't handle this, the rest frags would never get assembled in peer side. This patch supports it by adding abandoned flag in sctp_datamsg, when one chunk is being abandoned, set chunk->msg->abandoned as well. Next time when checking for abandoned, go checking chunk->msg->abandoned first. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 3 ++- net/sctp/chunk.c | 7 +++++++ net/sctp/outqueue.c | 12 ++++++++---- 3 files changed, 17 insertions(+), 5 deletions(-) commit d30fc5126efb0c33b7adf5966d3051db2c3d7721 Author: Xin Long Date: Sat Nov 25 21:18:34 2017 +0800 sctp: only update outstanding_bytes for transmitted queue when doing prsctp_prune Now outstanding_bytes is only increased when appending chunks into one packet and sending it at 1st time, while decreased when it is about to move into retransmit queue. It means outstanding_bytes value is already decreased for all chunks in retransmit queue. However sctp_prsctp_prune_sent is a common function to check the chunks in both transmitted and retransmit queue, it decrease outstanding_bytes when moving a chunk into abandoned queue from either of them. It could cause outstanding_bytes underflow, as it also decreases it's value for the chunks in retransmit queue. This patch fixes it by only updating outstanding_bytes for transmitted queue when pruning queues for prsctp prio policy, the same fix is also needed in sctp_check_transmitted. Fixes: 8dbdf1f5b09c ("sctp: implement prsctp PRIO policy") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/outqueue.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ff35f58e8f8eb520367879a0ccc6f2ec4b62b17b Author: Song Liu Date: Sun Nov 19 22:17:00 2017 -0800 md/r5cache: move mddev_lock() out of r5c_journal_mode_set() r5c_journal_mode_set() is called by r5c_journal_mode_store() and raid_ctr() in dm-raid. We don't need mddev_lock() when calling from raid_ctr(). This patch fixes this by moves the mddev_lock() to r5c_journal_mode_store(). Cc: stable@vger.kernel.org (v4.13+) Signed-off-by: Song Liu Signed-off-by: Shaohua Li drivers/md/raid5-cache.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit aff69d89bdebc39235cddb4445371eb979b49685 Author: bingjingc Date: Fri Nov 17 10:57:44 2017 +0800 md/raid5: correct degraded calculation in raid5_error When disk failure occurs on new disks for reshape, mddev->degraded is not calculated correctly. Faulty bit of the failure device is not set before raid5_calc_degraded(conf). mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/loop[012] mdadm /dev/md0 -a /dev/loop3 mdadm /dev/md0 --grow -n4 mdadm /dev/md0 -f /dev/loop3 # simulating disk failure cat /sys/block/md0/md/degraded # it outputs 0, but it should be 1. However, mdadm -D /dev/md0 will show that it is degraded. It's a bug. It can be fixed by moving the resources raid5_calc_degraded() depends on before it. Reported-by: Roy Chung Reviewed-by: Alex Wu Signed-off-by: BingJing Chang Signed-off-by: Shaohua Li drivers/md/raid5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 315d160c5a4e034a576a13aa21e7235d5c9ec609 Author: Daniel Jurgens Date: Wed Nov 29 20:10:39 2017 +0200 IB/core: Only enforce security for InfiniBand For now the only LSM security enforcement mechanism available is specific to InfiniBand. Bypass enforcement for non-IB link types. This fixes a regression where modify_qp fails for iWARP because querying the PKEY returns -EINVAL. Cc: Paul Moore Cc: Don Dutile Cc: stable@vger.kernel.org Reported-by: Potnuri Bharat Teja Fixes: d291f1a65232("IB/core: Enforce PKey security on QPs") Fixes: 47a2b338fe63("IB/core: Enforce security on management datagrams") Signed-off-by: Daniel Jurgens Reviewed-by: Parav Pandit Tested-by: Potnuri Bharat Teja Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/security.c | 50 +++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 4 deletions(-) commit 378efe798ecf0e7d9730a595ef3419b046e34fb4 Author: Wei Hu\(Xavier\) Date: Tue Nov 28 15:10:28 2017 +0800 RDMA/hns: Get rid of page operation after dma_alloc_coherent In general, dma_alloc_coherent() returns a CPU virtual address and a DMA address, and we have no guarantee that the underlying memory even has an associated struct page at all. This patch gets rid of the page operation after dma_alloc_coherent, and records the VA returned form dma_alloc_coherent in the struct of hem in hns RoCE driver. Fixes: 9a44353("IB/hns: Add driver files for hns RoCE driver") Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Yixian Liu Signed-off-by: Xiping Zhang (Francis) Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hem.c | 25 +++++++++++++------------ drivers/infiniband/hw/hns/hns_roce_hem.h | 1 + 2 files changed, 14 insertions(+), 12 deletions(-) commit b1c158350968d6717ec1889f07ea3a89432e8574 Author: Wei Hu\(Xavier\) Date: Tue Nov 28 15:10:27 2017 +0800 RDMA/hns: Get rid of virt_to_page and vmap calls after dma_alloc_coherent In general dma_alloc_coherent() returns a CPU virtual address and a DMA address, and we have no guarantee that the virtual address is either in the linear map or vmalloc. It could be in some other special place. We have no guarantee that the underlying memory even has an associated struct page at all. In current code, there are incorrect usage as below: dma_alloc_coherent + virt_to_page + vmap. There will probably introduce coherency problem. This patch fixes it to get rid of virt_to_page and vmap calls at Leon's suggestion. The related link: https://lkml.org/lkml/2017/11/7/34 Fixes: 9a44353("IB/hns: Add driver files for hns RoCE driver") Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Yixian Liu Signed-off-by: Xiping Zhang (Francis) Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_alloc.c | 23 ----------------------- drivers/infiniband/hw/hns/hns_roce_device.h | 4 +--- 2 files changed, 1 insertion(+), 26 deletions(-) commit db270c41900d39a388990701da3ee2971094ebaa Author: Wei Hu\(Xavier\) Date: Tue Nov 28 15:10:26 2017 +0800 RDMA/hns: Fix the issue of IOVA not page continuous in hip08 If the smmu is enabled, the length of sg obtained from __iommu_map_sg_attrs is not 4kB. When the IOVA is set with the sg dma address, the IOVA will not be page continuous. so, the current code has MTPT configuration error that probably cause dma operation failure. In order to fix this issue, the IOVA should be calculated based on the sg length. Fixes: 3958cc5("RDMA/hns: Configure the MTPT in hip08") Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Yixian Liu Signed-off-by: Xiping Zhang (Francis) Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit a9cd1a673737dd81332fce1145801bfacfb90d90 Author: Dmitry Monakhov Date: Mon Nov 27 13:39:05 2017 +0000 IB/core: Init subsys if compiled to vmlinuz-core Once infiniband is compiled as a core component its subsystem must be enabled before device initialization. Otherwise there is a NULL pointer dereference during mlx4_core init, calltrace: ->device_add if (dev->class) { deref dev->class->p =>NULLPTR #Config CONFIG_NET_DEVLINK=y CONFIG_MAY_USE_DEVLINK=y CONFIG_MLX4_EN=y Signed-off-by: Dmitry Monakhov Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 23a9cd2ad90543e9da3786878d2b2729c095439d Author: Moni Shoua Date: Sun Nov 26 20:23:54 2017 +0200 RDMA/cma: Make sure that PSN is not over max allowed This patch limits the initial value for PSN to 24 bits as spec requires. Signed-off-by: Moni Shoua Signed-off-by: Mukesh Kacker Signed-off-by: Daniel Jurgens Reviewed-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/core/cma.c | 1 + 1 file changed, 1 insertion(+) commit a7c6dfe215a7f85c6195f09c1b9474a2ba7fea9c Author: Henry Orosco Date: Tue Nov 21 16:18:34 2017 -0600 i40iw: Notify user of established connection after QP in RTS Established CM event is sent prior to modifying QP to RTS state. This can result in application closing the connection before the QP is actually in RTS state. Move sending of established CM event to after modify QP to RTS. Fixes: f27b4746f378 ("i40iw: add connection management code") Signed-off-by: Henry Orosco Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/i40iw/i40iw_cm.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 8bb45252bb5108485f590a08291d1f4641abc77e Author: Tatyana Nikolova Date: Tue Nov 21 16:18:33 2017 -0600 i40iw: Move MPA request event for loopback after connect For loopback, a MPA request event is generated when cm_node is initialized, which allows applications to act on the connect request before i40iw_connect() has completed. In some cases, the reject flow executes in parallel with the connect flow and doesn't delete an APBVT entry, because the apbvt_set variable is still not set by the connect flow. Move the MPA request event to the end of i40iw_connect() to notify application for a connect request, after connect has completed. Fixes: f27b4746f378 ("i40iw: add connection management code") Signed-off-by: Tatyana Nikolova Signed-off-by: Henry Orosco Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/i40iw/i40iw_cm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a283cdc4d3670700182c820b59078387f9a01a30 Author: Mustafa Ismail Date: Tue Nov 21 16:18:32 2017 -0600 i40iw: Correct ARP index mask The ARP table entry indexes are aliased to 12bits instead of the intended 16bits when uploaded to the QP Context. This will present an issue when the number of connections exceeds 4096 as ARP entries are reused. Fix this by adjusting the mask to account for the full 16bits. Fixes: 4e9042e647ff ("i40iw: add hw and utils files") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/i40iw/i40iw_d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10499986dbd8778e1acf9f9d2e166800dfee44b4 Author: Mustafa Ismail Date: Tue Nov 21 16:18:31 2017 -0600 i40iw: Do not free sqbuf when event is I40IW_TIMER_TYPE_CLOSE When the event type is I40IW_TIMER_TYPE_CLOSE, there is no sqbuf and it should not be freed as one in i40iw_schedule_cm_timer(). Fixes: f27b4746f378 ("i40iw: add connection management code") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/i40iw/i40iw_cm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 100d6de2ced538c539d923dc14a1b5cbae234503 Author: Chien Tin Tung Date: Tue Nov 21 16:18:30 2017 -0600 i40iw: Allocate a sdbuf per CQP WQE Currently there is only one sdbuf per Control QP (CQP) for programming Segment Descriptor (SD). If multiple SD work requests are posted simultaneously, the sdbuf is reused by all WQEs and new WQEs can corrupt previous WQEs sdbuf leading to incorrect SD programming. Fix this by allocating one sdbuf per CQP SQ WQE. When an SD command is posted, it will use the corresponding sdbuf for the WQE. Fixes: 86dbcd0f12e9 ("i40iw: add file to handle cqp calls") Signed-off-by: Chien Tin Tung Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 43 ++++++++++++++++++++++---------- drivers/infiniband/hw/i40iw/i40iw_d.h | 4 ++- 2 files changed, 33 insertions(+), 14 deletions(-) commit 80e457699a8dbdd70f2d26911e46f538645c55fc Author: Yu Chen Date: Fri Dec 1 13:41:20 2017 +0200 usb: xhci: fix panic in xhci_free_virt_devices_depth_first Check vdev->real_port 0 to avoid panic [ 9.261347] [] xhci_free_virt_devices_depth_first+0x58/0x108 [ 9.261352] [] xhci_mem_cleanup+0x1bc/0x570 [ 9.261355] [] xhci_stop+0x140/0x1c8 [ 9.261365] [] usb_remove_hcd+0xfc/0x1d0 [ 9.261369] [] xhci_plat_remove+0x6c/0xa8 [ 9.261377] [] platform_drv_remove+0x2c/0x70 [ 9.261384] [] __device_release_driver+0x80/0x108 [ 9.261387] [] device_release_driver+0x2c/0x40 [ 9.261392] [] bus_remove_device+0xe0/0x120 [ 9.261396] [] device_del+0x114/0x210 [ 9.261399] [] platform_device_del+0x30/0xa0 [ 9.261403] [] dwc3_otg_work+0x204/0x488 [ 9.261407] [] event_work+0x304/0x5b8 [ 9.261414] [] process_one_work+0x148/0x490 [ 9.261417] [] worker_thread+0x50/0x4a0 [ 9.261421] [] kthread+0xe8/0x100 [ 9.261427] [] ret_from_fork+0x10/0x50 The problem can occur if xhci_plat_remove() is called shortly after xhci_plat_probe(). While xhci_free_virt_devices_depth_first been called before the device has been setup and get real_port initialized. The problem occurred on Hikey960 and was reproduced by Guenter Roeck on Kevin with chromeos-4.4. Fixes: ee8665e28e8d ("xhci: free xhci virtual devices with leaf nodes first") Cc: Guenter Roeck Cc: # v4.10+ Reviewed-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Fan Ning Signed-off-by: Li Rui Signed-off-by: yangdi Signed-off-by: Yu Chen Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e4ec40ec4b260efcca15089de4285a0a3411259b Author: Mathias Nyman Date: Fri Dec 1 13:41:19 2017 +0200 xhci: Don't show incorrect WARN message about events for empty rings xHC can generate two events for a short transfer if the short TRB and last TRB in the TD are not the same TRB. The driver will handle the TD after the first short event, and remove it from its internal list. Driver then incorrectly prints a warning for the second event: "WARN Event TRB for slot x ep y with no TDs queued" Fix this by not printing a warning if we get a event on a empty list if the previous event was a short event. Cc: Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit d9e427f6ab8142d6868eb719e6a7851aafea56b6 Author: Jan Stancek Date: Fri Dec 1 10:50:28 2017 +0100 virtio_balloon: fix increment of vb->num_pfns in fill_balloon() commit c7cdff0e8647 ("virtio_balloon: fix deadlock on OOM") changed code to increment vb->num_pfns before call to set_page_pfns(), which used to happen only after. This patch fixes boot hang for me on ppc64le KVM guests. Fixes: c7cdff0e8647 ("virtio_balloon: fix deadlock on OOM") Cc: Michael S. Tsirkin Cc: Tetsuo Handa Cc: Michal Hocko Cc: Wei Wang Cc: stable@vger.kernel.org Signed-off-by: Jan Stancek Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_balloon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e60ea67bb60459b95a50a156296041a13e0e380e Author: weiping zhang Date: Wed Nov 29 09:23:01 2017 +0800 virtio: release virtio index when fail to device_register index can be reused by other virtio device. Cc: stable@vger.kernel.org Signed-off-by: weiping zhang Reviewed-by: Cornelia Huck Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio.c | 2 ++ 1 file changed, 2 insertions(+) commit 23f1b8d938c861ee0bbb786162f7ce0685f722ec Author: Marc-André Lureau Date: Mon Nov 20 10:55:15 2017 +0100 fw_cfg: fix driver remove On driver remove(), all objects created during probe() should be removed, but sysfs qemu_fw_cfg/rev file was left. Also reorder functions to match probe() error cleanup code. Cc: stable@vger.kernel.org Signed-off-by: Marc-André Lureau Signed-off-by: Michael S. Tsirkin drivers/firmware/qemu_fw_cfg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a0651c7fa2c088a605f63792279859608ed7f2c8 Merge: ae753ee 7e4d423 Author: Linus Torvalds Date: Fri Dec 1 08:40:17 2017 -0500 Merge tag 'powerpc-4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Two fixes for nasty kexec/kdump crashes in certain configurations. A couple of minor fixes for the new TIDR code. A fix for an oops in a CXL error handling path. Thanks to: Andrew Donnellan, Christophe Lombard, David Gibson, Mahesh Salgaonkar, Vaibhav Jain" * tag 'powerpc-4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: Do not assign thread.tidr if already assigned powerpc: Avoid signed to unsigned conversion in set_thread_tidr() powerpc/kexec: Fix kexec/kdump in P9 guest kernels powerpc/powernv: Fix kexec crashes caused by tlbie tracing cxl: Check if vphb exists before iterating over AFU devices commit ae753ee2771a1bacade56411bb98037b2545c929 Merge: 3c1c4dd f8de483 Author: Linus Torvalds Date: Fri Dec 1 08:36:27 2017 -0500 Merge tag 'afs-fixes-20171201' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS fixes from David Howells: "Two fix patches for the AFS filesystem: - Fix the refcounting on permit caching. - AFS inode (afs_vnode) fields need resetting after allocation because they're only initialised when slab pages are obtained from the page allocator" * tag 'afs-fixes-20171201' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Properly reset afs_vnode (inode) fields afs: Fix permit refcounting commit 3c1c4ddffb58b9e10b3365764fe59546130b3f32 Merge: 5dc9cbc c892b0d Author: Linus Torvalds Date: Fri Dec 1 08:14:22 2017 -0500 Merge tag 'mmc-v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Ensure that debugfs files are removed properly - Fix missing blk_put_request() - Deal with errors from blk_get_request() - Rewind mmc bus suspend operations at failures - Prepend '0x' to ocr and pre_eol_info in sysfs to identify as hex MMC host: - sdhci-msm: Make it optional to wait for signal level changes - sdhci: Avoid swiotlb buffer being full" * tag 'mmc-v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: core: prepend 0x to OCR entry in sysfs mmc: core: prepend 0x to pre_eol_info entry in sysfs mmc: sdhci: Avoid swiotlb buffer being full mmc: sdhci-msm: Optionally wait for signal level changes mmc: block: Ensure that debugfs files are removed mmc: core: Do not leave the block driver in a suspended state mmc: block: Check return value of blk_get_request() mmc: block: Fix missing blk_put_request() commit 5dc9cbc4f10d7bc5aaa17ec0accf4c6e24d9ecd6 Merge: 75f64f6 503505b Author: Linus Torvalds Date: Fri Dec 1 08:10:09 2017 -0500 Merge tag 'drm-fixes-for-v4.15-rc2' of git://people.freedesktop.org/~airlied/linux Pull drm fixes and cleanups from Dave Airlie: "The main thing are a bunch of fixes for the new amd display code, a bunch of smatch fixes. core: - Atomic helper regression fix. - Deferred fbdev fallout regression fix. amdgpu: - New display code (dc) dpms, suspend/resume and smatch fixes, along with some others - Some regression fixes for amdkfd/radeon. - Fix a ttm regression for swiotlb disabled bridge: - A bunch of fixes for the tc358767 bridge mali-dp + hdlcd: - some fixes and internal API catchups. imx-drm: -regression fix in atomic code. omapdrm: - platform detection regression fixes" * tag 'drm-fixes-for-v4.15-rc2' of git://people.freedesktop.org/~airlied/linux: (76 commits) drm/imx: always call wait_for_flip_done in commit_tail omapdrm: hdmi4_cec: signedness bug in hdmi4_cec_init() drm: omapdrm: Fix DPI on platforms using the DSI VDDS omapdrm: hdmi4: Correct the SoC revision matching drm/omap: displays: panel-dpi: add backlight dependency drm/omap: Fix error handling path in 'omap_dmm_probe()' drm/i915: Disable THP until we have a GPU read BW W/A drm/bridge: tc358767: fix 1-lane behavior drm/bridge: tc358767: fix AUXDATAn registers access drm/bridge: tc358767: fix timing calculations drm/bridge: tc358767: fix DP0_MISC register set drm/bridge: tc358767: filter out too high modes drm/bridge: tc358767: do no fail on hi-res displays drm/bridge: Fix lvds-encoder since the panel_bridge rework. drm/bridge: synopsys/dw-hdmi: Enable cec clock drm/bridge: adv7511/33: Fix adv7511_cec_init() failure handling drm/radeon: remove init of CIK VMIDs 8-16 for amdkfd drm/ttm: fix populate_and_map() functions once more drm/fb_helper: Disable all crtc's when initial setup fails. drm/atomic: make drm_atomic_helper_wait_for_vblanks more agressive ... commit 75f64f68afa165ebe139cca2adb4df0a229a06de Merge: df8ba95 ed56537 Author: Linus Torvalds Date: Fri Dec 1 08:05:45 2017 -0500 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A selection of fixes/changes that should make it into this series. This contains: - NVMe, two merges, containing: - pci-e, rdma, and fc fixes - Device quirks - Fix for a badblocks leak in null_blk - bcache fix from Rui Hua for a race condition regression where -EINTR was returned to upper layers that didn't expect it. - Regression fix for blktrace for a bug introduced in this series. - blktrace cleanup for cgroup id. - bdi registration error handling. - Small series with cleanups for blk-wbt. - Various little fixes for typos and the like. Nothing earth shattering, most important are the NVMe and bcache fixes" * 'for-linus' of git://git.kernel.dk/linux-block: (34 commits) nvme-pci: fix NULL pointer dereference in nvme_free_host_mem() nvme-rdma: fix memory leak during queue allocation blktrace: fix trace mutex deadlock nvme-rdma: Use mr pool nvme-rdma: Check remotely invalidated rkey matches our expected rkey nvme-rdma: wait for local invalidation before completing a request nvme-rdma: don't complete requests before a send work request has completed nvme-rdma: don't suppress send completions bcache: check return value of register_shrinker bcache: recover data from backing when data is clean bcache: Fix building error on MIPS bcache: add a comment in journal bucket reading nvme-fc: don't use bit masks for set/test_bit() numbers blk-wbt: fix comments typo blk-wbt: move wbt_clear_stat to common place in wbt_done blk-sysfs: remove NULL pointer checking in queue_wb_lat_store blk-wbt: remove duplicated setting in wbt_init nvme-pci: add quirk for delay before CHK RDY for WDC SN200 block: remove useless assignment in bio_split null_blk: fix dev->badblocks leak ... commit 3a33c7605750fb6a87613044d16b1455e482414d Author: Will Deacon Date: Thu Nov 30 18:25:17 2017 +0000 arm64: context: Fix comments and remove pointless smp_wmb() The comments in the ASID allocator incorrectly hint at an MP-style idiom using the asid_generation and the active_asids array. In fact, the synchronisation is achieved using a combination of an xchg operation and a spinlock, so update the comments and remove the pointless smp_wmb(). Cc: James Morse Signed-off-by: Will Deacon arch/arm64/mm/context.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 770ba06084f7aeadea120922c775d574f3128ba3 Author: Yury Norov Date: Wed Nov 29 17:03:03 2017 +0300 arm64: cpu_ops: Add missing 'const' qualifiers Building the kernel with an LTO-enabled GCC spits out the following "const" warning for the cpu_ops code: mm/percpu.c:2168:20: error: pcpu_fc_names causes a section type conflict with dt_supported_cpu_ops const char * const pcpu_fc_names[PCPU_FC_NR] __initconst = { ^ arch/arm64/kernel/cpu_ops.c:34:37: note: ‘dt_supported_cpu_ops’ was declared here static const struct cpu_operations *dt_supported_cpu_ops[] __initconst = { Fix it by adding missed const qualifiers. Signed-off-by: Yury Norov Reviewed-by: Nick Desaulniers Signed-off-by: Will Deacon arch/arm64/kernel/cpu_ops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f8ada189550984ee21f27be736042b74a7da1d68 Author: Xu YiPing Date: Wed Nov 15 15:39:26 2017 +0800 arm64: perf: remove unsupported events for Cortex-A73 bus access read/write events are not supported in A73, based on the Cortex-A73 TRM r0p2, section 11.9 Events (pages 11-457 to 11-460). Fixes: 5561b6c5e981 "arm64: perf: add support for Cortex-A73" Acked-by: Julien Thierry Signed-off-by: Xu YiPing Signed-off-by: Will Deacon arch/arm64/kernel/perf_event.c | 6 ------ 1 file changed, 6 deletions(-) commit 9de52a755cfb6da5ee21a07e3a868bdc8fbfccb3 Author: Dave Martin Date: Thu Nov 30 11:56:37 2017 +0000 arm64: fpsimd: Fix failure to restore FPSIMD state after signals The fpsimd_update_current_state() function is responsible for loading the FPSIMD state from the user signal frame into the current task during sigreturn. When implementing support for SVE, conditional code was added to this function in order to handle the case where SVE state need to be loaded for the task and merged with the FPSIMD data from the signal frame; however, the FPSIMD-only case was unintentionally dropped. As a result of this, sigreturn does not currently restore the FPSIMD state of the task, except in the case where the system supports SVE and the signal frame contains SVE state in addition to FPSIMD state. This patch fixes this bug by making the copy-in of the FPSIMD data from the signal frame to thread_struct unconditional. This remains a performance regression from v4.14, since the FPSIMD state is now copied into thread_struct and then loaded back, instead of _only_ being loaded into the CPU FPSIMD registers. However, it is essential to call task_fpsimd_load() here anyway in order to ensure that the SVE enable bit in CPACR_EL1 is set correctly before returning to userspace. This could use some refactoring, but since sigreturn is not a fast path I have kept this patch as a pure fix and left the refactoring for later. Cc: Catalin Marinas Cc: Ard Biesheuvel Fixes: 8cd969d28fd2 ("arm64/sve: Signal handling support") Reported-by: Alex Bennée Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a349b30250634da20950eb91e2551dcd81f1805d Author: Jinbum Park Date: Wed Nov 22 21:43:59 2017 +0900 arm64: pgd: Mark pgd_cache as __ro_after_init pgd_cache is setup once while init stage and never changed after that, so it is good candidate for __ro_after_init Signed-off-by: Jinbum Park Signed-off-by: Will Deacon arch/arm64/mm/pgd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be0f272bfc83797f70d44faca86954df62e2bbc0 Author: Ard Biesheuvel Date: Mon Nov 20 17:41:30 2017 +0000 arm64: ftrace: emit ftrace-mod.o contents through code When building the arm64 kernel with both CONFIG_ARM64_MODULE_PLTS and CONFIG_DYNAMIC_FTRACE enabled, the ftrace-mod.o object file is built with the kernel and contains a trampoline that is linked into each module, so that modules can be loaded far away from the kernel and still reach the ftrace entry point in the core kernel with an ordinary relative branch, as is emitted by the compiler instrumentation code dynamic ftrace relies on. In order to be able to build out of tree modules, this object file needs to be included into the linux-headers or linux-devel packages, which is undesirable, as it makes arm64 a special case (although a precedent does exist for 32-bit PPC). Given that the trampoline essentially consists of a PLT entry, let's not bother with a source or object file for it, and simply patch it in whenever the trampoline is being populated, using the existing PLT support routines. Cc: Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/Makefile | 3 --- arch/arm64/include/asm/module.h | 2 +- arch/arm64/kernel/Makefile | 3 --- arch/arm64/kernel/ftrace-mod.S | 18 ------------------ arch/arm64/kernel/ftrace.c | 14 ++++++++------ arch/arm64/kernel/module-plts.c | 12 ++++++++++++ arch/arm64/kernel/module.lds | 1 + 7 files changed, 22 insertions(+), 31 deletions(-) commit 7e8b9c1d2e2f5f45db7d40b50d14f606097c25de Author: Ard Biesheuvel Date: Mon Nov 20 17:41:29 2017 +0000 arm64: module-plts: factor out PLT generation code for ftrace To allow the ftrace trampoline code to reuse the PLT entry routines, factor it out and move it into asm/module.h. Cc: Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/include/asm/module.h | 44 +++++++++++++++++++++++++++++++++++++++++ arch/arm64/kernel/module-plts.c | 38 ++--------------------------------- 2 files changed, 46 insertions(+), 36 deletions(-) commit f8de483e7440b0d23ce6372b3ef8358841c8827b Author: David Howells Date: Fri Dec 1 11:40:43 2017 +0000 afs: Properly reset afs_vnode (inode) fields When an AFS inode is allocated by afs_alloc_inode(), the allocated afs_vnode struct isn't necessarily reset from the last time it was used as an inode because the slab constructor is only invoked once when the memory is obtained from the page allocator. This means that information can leak from one inode to the next because we're not calling kmem_cache_zalloc(). Some of the information isn't reset, in particular the permit cache pointer. Bring the clearances up to date. Signed-off-by: David Howells Tested-by: Marc Dionne fs/afs/internal.h | 5 ++++- fs/afs/super.c | 14 +++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) commit 1bcab12521d9b23dbaa22ac71184778dcc43e2f6 Author: David Howells Date: Fri Dec 1 11:40:43 2017 +0000 afs: Fix permit refcounting Fix four refcount bugs in afs_cache_permit(): (1) When checking the result of the kzalloc(), we can't just return, but must put 'permits'. (2) We shouldn't put permits immediately after hashing a new permit as we need to keep the pointer stable so that we can check to see if vnode->permit_cache has changed before we decide whether to assign to it. (3) 'permits' is being put twice. (4) We need to put either the replacement or the thing replaced after the assignment to vnode->permit_cache. Without this, lots of the following are seen: Kernel BUG at ffffffffa039857b [verbose debug info unavailable] ------------[ cut here ]------------ Kernel BUG at ffffffffa039858a [verbose debug info unavailable] ------------[ cut here ]------------ The addresses are in the .text..refcount section of the kafs.ko module. Following the relocation records for the __ex_table section shows one to be due to the decrement in afs_put_permits() and the other to be key_get() in afs_cache_permit(). Occasionally, the following is seen: refcount_t overflow at afs_cache_permit+0x57d/0x5c0 [kafs] in cc1[562], uid/euid: 0/0 WARNING: CPU: 0 PID: 562 at kernel/panic.c:657 refcount_error_report+0x9c/0xac ... Reported-by: Marc Dionne Signed-off-by: David Howells Tested-by: Marc Dionne fs/afs/security.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 198a62ddffa4a4ffaeb741f642b7b52f2d91ae9b Author: Sven Eckelmann Date: Wed Nov 29 10:50:42 2017 +0100 batman-adv: Fix check of retrieved orig_gw in batadv_v_gw_is_eligible The batadv_v_gw_is_eligible function already assumes that orig_node is not NULL. But batadv_gw_node_get may have failed to find the originator. It must therefore be checked whether the batadv_gw_node_get failed and not whether orig_node is NULL to detect this error. Fixes: 50164d8f500f ("batman-adv: B.A.T.M.A.N. V - implement GW selection logic") Signed-off-by: Sven Eckelmann Acked-by: Antonio Quartulli Signed-off-by: Simon Wunderlich net/batman-adv/bat_v.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe77d8257c4d838c5976557ddb87bd789f312412 Author: Sven Eckelmann Date: Wed Nov 29 10:25:02 2017 +0100 batman-adv: Always initialize fragment header priority The batman-adv unuicast fragment header contains 3 bits for the priority of the packet. These bits will be initialized when the skb->priority contains a value between 256 and 263. But otherwise, the uninitialized bits from the stack will be used. Fixes: c0f25c802b33 ("batman-adv: Include frame priority in fragment header") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/fragmentation.c | 2 ++ 1 file changed, 2 insertions(+) commit 1cb35a33a28394fd711bb26ddf3a564f4e9d9125 Author: Martin Kelly Date: Mon Nov 27 15:49:16 2017 -0800 can: mcba_usb: fix device disconnect bug Currently, when you disconnect the device, the driver infinitely resubmits all URBs, so you see: Rx URB aborted (-32) in an infinite loop. Fix this by catching -EPIPE (what we get in urb->status when the device disconnects) and not resubmitting. With this patch, I can plug and unplug many times and the driver recovers correctly. Signed-off-by: Martin Kelly Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/mcba_usb.c | 1 + 1 file changed, 1 insertion(+) commit 3fed8dbbc42c0639ac03d2361ab5f0606dd49e28 Author: Martin Kelly Date: Mon Nov 27 15:49:15 2017 -0800 can: mcba_usb: fix typo Fix typo "analizer" --> "Analyzer". Signed-off-by: Martin Kelly Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/mcba_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29c64b17a0bc72232acc45e9533221d88a262efb Author: Marc Kleine-Budde Date: Mon Nov 27 09:18:21 2017 +0100 can: flexcan: fix VF610 state transition issue Enable FLEXCAN_QUIRK_BROKEN_PERR_STATE for VF610 to report correct state transitions. Tested-by: Mirza Krak Cc: linux-stable # >= v4.11 Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 658f534c036352a06584c8b2e71a547915173ba9 Author: Marc Kleine-Budde Date: Wed Nov 22 13:01:08 2017 +0100 can: flexcan: Update IRQ Err Passive information The flexcan IP cores used on MX25 and MX35 do not generate Error Passive IRQs. Update the IP core overview table in the driver accordingly. Suggested-by: ZHU Yi (ST-FIR/ENG1-Zhu) Signed-off-by: Marc Kleine-Budde drivers/net/can/flexcan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c2cb02edf79ad79d9b8d07c6d52243a948c4c9f Author: Stephane Grosjean Date: Thu Nov 23 15:44:35 2017 +0100 can: peak/pci: fix potential bug when probe() fails PCI/PCIe drivers for PEAK-System CAN/CAN-FD interfaces do some access to the PCI config during probing. In case one of these accesses fails, a POSITIVE PCIBIOS_xxx error code is returned back. This POSITIVE error code MUST be converted into a NEGATIVE errno for the probe() function to indicate it failed. Using the pcibios_err_to_errno() function, we make sure that the return code will always be negative. Signed-off-by: Stephane Grosjean Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/peak_canfd/peak_pciefd_main.c | 5 ++++- drivers/net/can/sja1000/peak_pci.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit f6c23b174c3c96616514827407769cbcfc8005cf Author: Oliver Stäbler Date: Mon Nov 20 14:45:15 2017 +0100 can: ti_hecc: Fix napi poll return value for repoll After commit d75b1ade567f ("net: less interrupt masking in NAPI") napi repoll is done only when work_done == budget. So we need to return budget if there are still packets to receive. Signed-off-by: Oliver Stäbler Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/ti_hecc.c | 3 +++ 1 file changed, 3 insertions(+) commit 8bd13bd522ff7dfa0eb371921aeb417155f7a3be Author: Jimmy Assarsson Date: Tue Nov 21 08:22:28 2017 +0100 can: kvaser_usb: ratelimit errors if incomplete messages are received Avoid flooding the kernel log with "Formate error", if incomplete message are received. Signed-off-by: Jimmy Assarsson Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e84f44eb5523401faeb9cc1c97895b68e3cfb78d Author: Jimmy Assarsson Date: Tue Nov 21 08:22:27 2017 +0100 can: kvaser_usb: Fix comparison bug in kvaser_usb_read_bulk_callback() The conditon in the while-loop becomes true when actual_length is less than 2 (MSG_HEADER_LEN). In best case we end up with a former, already dispatched msg, that got msg->len greater than actual_length. This will result in a "Format error" error printout. Problem seen when unplugging a Kvaser USB device connected to a vbox guest. warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Jimmy Assarsson Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 435019b48033138581a6171093b181fc6b4d3d30 Author: Jimmy Assarsson Date: Tue Nov 21 08:22:26 2017 +0100 can: kvaser_usb: free buf in error paths The allocated buffer was not freed if usb_submit_urb() failed. Signed-off-by: Jimmy Assarsson Cc: linux-stable Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/kvaser_usb.c | 2 ++ 1 file changed, 2 insertions(+) commit 56075f6072e7fdac302cff4e1b4c93b64ced99ab Author: Daniel Axtens Date: Sun Nov 26 15:34:04 2017 +1100 HID: holtekff: move MODULE_* parameters out of #ifdef block If you compile with: CONFIG_HID_HOLTEK=m CONFIG_HOLTEK_FF is not set You get the following warning: WARNING: modpost: missing MODULE_LICENSE() in drivers/hid/hid-holtekff.o see include/linux/module.h for more information Fix this by moving the module info out of the #ifdef CONFIG_HOLTEK_FF block and into the un-guarded part of the file. Signed-off-by: Daniel Axtens Acked-by: Anssi Hannula Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-holtekff.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6b2ad81bcfedaf36ceb8e6e71a58ad4ebd716313 Author: Andrew Jones Date: Mon Nov 27 19:17:18 2017 +0100 KVM: arm/arm64: kvm_arch_destroy_vm cleanups kvm_vgic_vcpu_destroy already gets called from kvm_vgic_destroy for each vcpu, so we don't have to call it from kvm_arch_vcpu_free. Additionally the other architectures set kvm->online_vcpus to zero after freeing them. We might as well do that for ARM too. Signed-off-by: Andrew Jones Signed-off-by: Christoffer Dall virt/kvm/arm/arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7465894e90e5a47e0e52aa5f1f708653fc40020f Author: Marc Zyngier Date: Thu Nov 30 17:00:30 2017 +0000 KVM: arm/arm64: Fix spinlock acquisition in vgic_set_owner vgic_set_owner acquires the irq lock without disabling interrupts, resulting in a lockdep splat (an interrupt could fire and result in the same lock being taken if the same virtual irq is to be injected). In practice, it is almost impossible to trigger this bug, but better safe than sorry. Convert the lock acquisition to a spin_lock_irqsave() and keep lockdep happy. Reported-by: James Morse Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ddc47e4404b58f03e98345398fb12d38fe291512 Author: Steffen Klassert Date: Wed Nov 29 06:53:55 2017 +0100 xfrm: Fix stack-out-of-bounds read on socket policy lookup. When we do tunnel or beet mode, we pass saddr and daddr from the template to xfrm_state_find(), this is ok. On transport mode, we pass the addresses from the flowi, assuming that the IP addresses (and address family) don't change during transformation. This assumption is wrong in the IPv4 mapped IPv6 case, packet is IPv4 and template is IPv6. Fix this by catching address family missmatches of the policy and the flow already before we do the lookup. Reported-by: syzbot Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 4ce3dbe397d7b6b15f272ae757c78c35e9e4b61d Author: Aviv Heller Date: Tue Nov 28 19:55:40 2017 +0200 xfrm: Fix xfrm_input() to verify state is valid when (encap_type < 0) Code path when (encap_type < 0) does not verify the state is valid before progressing. This will result in a crash if, for instance, x->km.state == XFRM_STATE_ACQ. Fixes: 7785bba299a8 ("esp: Add a software GRO codepath") Signed-off-by: Aviv Heller Signed-off-by: Yevgeny Kliteynik Signed-off-by: Steffen Klassert net/xfrm/xfrm_input.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit e719135881f00c01ca400abb8a5dadaf297a24f9 Author: Michal Kubecek Date: Wed Nov 29 18:23:56 2017 +0100 xfrm: fix XFRMA_OUTPUT_MARK policy entry This seems to be an obvious typo, NLA_U32 is type of the attribute, not its (minimal) length. Fixes: 077fbac405bf ("net: xfrm: support setting an output mark.") Signed-off-by: Michal Kubecek Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ec9552b43b98deb882bf48efd347be4bd7afc9f Author: Yonghong Song Date: Thu Nov 30 13:47:55 2017 -0800 samples/bpf: add error checking for perf ioctl calls in bpf loader load_bpf_file() should fail if ioctl with command PERF_EVENT_IOC_ENABLE and PERF_EVENT_IOC_SET_BPF fails. When they do fail, proper error messages are printed. With this change, the below "syscall_tp" run shows that the maximum number of bpf progs attaching to the same perf tracepoint is indeed enforced. $ ./syscall_tp -i 64 prog #0: map ids 4 5 ... prog #63: map ids 382 383 $ ./syscall_tp -i 65 prog #0: map ids 4 5 ... prog #64: map ids 388 389 ioctl PERF_EVENT_IOC_SET_BPF failed err Argument list too long Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann samples/bpf/bpf_load.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit c8c088ba0edf65044c254b96fc438c91914aaab0 Author: Yonghong Song Date: Thu Nov 30 13:47:54 2017 -0800 bpf: set maximum number of attached progs to 64 for a single perf tp cgropu+bpf prog array has a maximum number of 64 programs. Let us apply the same limit here. Fixes: e87c6bc3852b ("bpf: permit multiple bpf attachments for a single perf event") Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann kernel/bpf/core.c | 3 ++- kernel/trace/bpf_trace.c | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) commit df8ba95c572a187ed2aa7403e97a7a7f58c01f00 Merge: 42062b9 b12cbb2 Author: Linus Torvalds Date: Thu Nov 30 18:56:41 2017 -0500 Merge tag 'apparmor-pr-2017-11-30' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor Pull apparmor bugfix from John Johansen: "Fix oops in audit_signal_cb hook marked for stable" * tag 'apparmor-pr-2017-11-30' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor: apparmor: fix oops in audit_signal_cb hook commit 42062b988270ae2f55f2a563861f6ba3d980e9b8 Merge: 0cf710f b6c7026 Author: Linus Torvalds Date: Thu Nov 30 18:49:50 2017 -0500 Merge tag 'acpi-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix a regression related to the ACPI EC handling during system suspend/resume on some platforms and prevent modalias from being exposed to user space for ACPI device object with "not functional and not present" status. Specifics: - Fix an ACPI EC driver regression (from the 4.9 cycle) causing the driver's power management operations to be omitted during system suspend/resume on platforms where the EC instance from the ECDT table is used instead of the one from the DSDT (Lv Zheng). - Prevent modalias from being exposed to user space for ACPI device objects with _STA returning 0 (not present and not functional) to prevent driver modules from being loaded automatically for hardware that is not actually present on some platforms (Hans de Goede)" * tag 'acpi-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / EC: Fix regression related to PM ops support in ECDT device ACPI / bus: Leave modalias empty for devices which are not present commit 0cf710f8c6bc210b147b0625ddf2eec8cdb33f43 Merge: 9c41180 6981037 Author: Linus Torvalds Date: Thu Nov 30 18:45:55 2017 -0500 Merge tag 'pm-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: - add missing module information to the Mediatek cpufreq driver module (Jesse Chan) - fix config dependencies for the Loongson cpufreq driver (James Hogan) - fix two issues related to CPU offline in the cpupower utility (Abhishek Goel). * tag 'pm-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: mediatek: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE cpufreq: Add Loongson machine dependencies cpupower : Fix cpupower working when cpu0 is offline cpupowerutils: bench - Fix cpu online check commit 9c41180be47a6c08105894e1289182995749fc9a Merge: 9e0600f 88bc0ed Author: Linus Torvalds Date: Thu Nov 30 18:38:47 2017 -0500 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull quota & reiserfs changes from Jan Kara: - two error checking improvements for quota - remove bogus i_version increase for reiserfs * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: quota: Check for register_shrinker() failure. quota: propagate error from __dquot_initialize reiserfs: remove unneeded i_version bump commit 044d71bc6cdee8980d0fdc35ec79a0d5818b2ce3 Author: Arnaud Patard Date: Wed Nov 29 16:09:46 2017 +0100 meson-gx-socinfo: Fix package id parsing I've noticed the following message while booting a S905X based board: soc soc0: Amlogic Meson GXL (S905D) Revision 21:82 (b:2) Detected The S905D string is obviously wrong. The vendor code does: ... ver = (readl(assist_hw_rev) >> 8) & 0xff; meson_cpu_version[MESON_CPU_VERSION_LVL_MINOR] = ver; ver = (readl(assist_hw_rev) >> 16) & 0xff; meson_cpu_version[MESON_CPU_VERSION_LVL_PACK] = ver; ... while the current code does: ... ... This means that the current mainline code has package id and minor version reversed. Fixes: a9daaba2965e8 ("soc: Add Amlogic SoC Information driver") Signed-off-by: Arnaud Patard Acked-by: Neil Armstrong Signed-off-by: Kevin Hilman drivers/soc/amlogic/meson-gx-socinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0f0e290a662a89067f7c251d24ad6f63ceb1f2d6 Author: Colin Ian King Date: Thu Nov 2 09:27:37 2017 +0000 ARM: meson: fix spelling mistake: "Couln't" -> "Couldn't" Trivial fix to spelling mistake in pr_err error message Signed-off-by: Colin Ian King Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/mach-meson/platsmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9fd7a2e063993a9d47f444147520b9e7fcea4c99 Author: Martin Blumenstingl Date: Mon Oct 30 00:17:15 2017 +0100 ARM: dts: meson: fix the memory region of the GPIO interrupt controller commit 200a575b68d2 ("ARM: dts: meson: organize devices in their corresponding busses") organized all peripherals in busses so that the base register offset of the bus doesn't have to be included in all child-nodes anymore. The GPIO interrupt controller however specifies the register offset without subtracting the "cbus" base address. This leads to a problem where of_iomap inside the irq-meson-gpio driver fails because it actually tries to map 0x182209880 (cbus base = 0xc1100000 + 0xc1109880 for the GPIO interrupt controller). Fix this by using 0x9880 as register offset. Fixes: 7d32bc03bcfb ("ARM: dts: meson8b: enable gpio interrupt controller") Signed-off-by: Martin Blumenstingl Acked-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 208e4ea61437930bbf8785c864ee7af1c693a561 Author: Martin Blumenstingl Date: Mon Oct 30 00:17:14 2017 +0100 ARM: dts: meson: correct the sort order for the the gpio_intc node Nodes are sorted by their register start address. Move gpio_intc to the correct position. No functional changes intended. Fixes: 7d32bc03bcfb ("ARM: dts: meson8b: enable gpio interrupt controller") Signed-off-by: Martin Blumenstingl Acked-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson.dtsi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 503505bfea19b7d69e2572297e6defa0f9c2404e Merge: 062076e 7fdf165 Author: Dave Airlie Date: Fri Dec 1 09:15:57 2017 +1000 Merge branch 'drm-fixes-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Fixes for 4.15. Highlights: - DC fixes for S3, gamma, audio, pageflipping, etc. - fix a regression in radeon from kfd removal - fix a ttm regression with swiotlb disabled - misc other fixes * 'drm-fixes-4.15' of git://people.freedesktop.org/~agd5f/linux: (36 commits) drm/radeon: remove init of CIK VMIDs 8-16 for amdkfd drm/ttm: fix populate_and_map() functions once more drm/amd/display: USB-C / thunderbolt dock specific workaround drm/amd/display: Switch to drm_atomic_helper_wait_for_flip_done drm/amd/display: fix gamma setting drm/amd/display: Do not put drm_atomic_state on resume drm/amd/display: Fix couple more inconsistent NULL checks in dc_resource drm/amd/display: Fix potential NULL and mem leak in create_links drm/amd/display: Fix hubp check in set_cursor_position drm/amd/display: Fix use before NULL check in validate_timing drm/amd/display: Bunch of smatch error and warning fixes in DC drm/amd/display: Fix amdgpu_dm bugs found by smatch drm/amd/display: try to find matching audio inst for enc inst first drm/amd/display: fix seq issue: turn on clock before programming afmt. drm/amd/display: fix memory leaks on error exit return drm/amd/display: check plane state before validating fbc drm/amd/display: Do DC mode-change check when adding CRTCs drm/amd/display: Revert noisy assert messages drm/amd/display: fix split viewport rounding error drm/amd/display: Check aux channel before MST resume ... commit 062076e861e3e2bf3cafc9313efa34fad7c827e5 Merge: 662e704 5424301 Author: Dave Airlie Date: Fri Dec 1 09:15:31 2017 +1000 Merge branch 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-fixes mali-dp interface cleanups. * 'for-upstream/mali-dp' of git://linux-arm.org/linux-ld: drm: mali-dp: Disable planes when their CRTC gets disabled. drm: mali-dp: Separate static internal data into a read-only structure. drm/arm: Replace instances of drm_dev_unref with drm_dev_put. drm: mali-dp: switch to drm_*_get(), drm_*_put() helpers commit 662e70400721f7bcf3b689acfe418f745f76096b Merge: a42ea78 b4d0852 Author: Dave Airlie Date: Fri Dec 1 09:14:46 2017 +1000 Merge tag 'drm-amdkfd-fixes-2017-11-26' of git://people.freedesktop.org/~gabbayo/linux into drm-fixes This is amdkfd pull request for -rc2. It contains three small fixes to the CIK SDMA code, compilation error fix in kfd_ioctl.h and fix to accessing a pointer after it was released. * tag 'drm-amdkfd-fixes-2017-11-26' of git://people.freedesktop.org/~gabbayo/linux: uapi: fix linux/kfd_ioctl.h userspace compilation errors drm/amdkfd: fix amdkfd use-after-free GP fault drm/amdkfd: Fix SDMA oversubsription handling drm/amdkfd: Fix SDMA ring buffer size calculation drm/amdgpu: Fix SDMA load/unload sequence on HWS disabled mode commit a42ea78f5b73d8aba9665ad34fb88e483f442f6f Merge: 8503a4c f73e8b8 Author: Dave Airlie Date: Fri Dec 1 09:14:18 2017 +1000 Merge branch 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld into drm-fixes 3 hdlcd fixes/cleanups * 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld: drm/arm: Replace instances of drm_dev_unref with drm_dev_put. drm: Fix checkpatch issue: "WARNING: braces {} are not necessary for single statement blocks." drm: hdlcd: Update PM code to save/restore console. commit 8503a4c1e3fffe548443e390ac6cc93a2e7f3c77 Merge: 9f93b78 a152992 Author: Dave Airlie Date: Fri Dec 1 09:11:13 2017 +1000 Merge tag 'imx-drm-fixes-2017-11-30' of git://git.pengutronix.de/git/pza/linux into drm-fixes drm/imx: fix commit_tail for new drm_atomic_helper_setup_commit Since commit 080de2e5be2d ("drm/atomic: Check for busy planes/connectors before setting the commit"), drm_atomic_helper_setup_commit expects that blocking commits have completed flipping before the commit_tail returns. Add the missing wait_for_flip_done to commit_tail to ensure this. * tag 'imx-drm-fixes-2017-11-30' of git://git.pengutronix.de/git/pza/linux: drm/imx: always call wait_for_flip_done in commit_tail commit 9f93b78ca9177f3c089cf594cd7f3e72856a52f0 Merge: 4dc0f7c fd50fbb Author: Dave Airlie Date: Fri Dec 1 09:10:32 2017 +1000 Merge tag 'drm-intel-fixes-2017-11-30' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Disable transparent huge pages for now until we have a W/A - Building fix when CONFIG_BACKLIGHT_CLASS_DEVICE is not selected - GMBUS communication robustness - Fbdev hotplug handling fix gvt-fixes-2017-11-28 - regression fix for sane request alloc (Fred) - locking fix (Changbin) - fix invalid addr mask (Xiong) - compression regression fix (Weinan) - fix default pipe enable for virtual display (Xiaolin) * tag 'drm-intel-fixes-2017-11-30' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915: Disable THP until we have a GPU read BW W/A drm/i915/gvt: Correct ADDR_4K/2M/1G_MASK definition drm/i915/gvt: enabled pipe A default on creating vgpu drm/i915/gvt: Move request alloc to dispatch_workload path only drm/i915/gvt: remove skl_misc_ctl_write handler drm/i915/gvt: Fix unsafe locking caused by spin_unlock_bh drm/i915: fix intel_backlight_device_register declaration drm/i915/fbdev: Serialise early hotplug events with async fbdev config drm/i915: Prevent zero length "index" write drm/i915: Don't try indexed reads to alternate slave addresses commit 4dc0f7c2c66b1093fe76af4bbfc7771a06628cf7 Merge: e4b2eb1 bc2aba9 Author: Dave Airlie Date: Fri Dec 1 09:09:52 2017 +1000 Merge tag 'omapdrm-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-fixes omapdrm fixes for 4.15 * Fix platform detection issue causing OMAP3 DPI output to have missing color bits * Fix platform detection issue causing OMAP4 HDMI audio not to work * tag 'omapdrm-4.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: omapdrm: hdmi4_cec: signedness bug in hdmi4_cec_init() drm: omapdrm: Fix DPI on platforms using the DSI VDDS omapdrm: hdmi4: Correct the SoC revision matching drm/omap: displays: panel-dpi: add backlight dependency drm/omap: Fix error handling path in 'omap_dmm_probe()' commit e4b2eb13e0b13217d3bd1923d61572a45b78fccb Merge: 43f462f 4dbd6c0 Author: Dave Airlie Date: Fri Dec 1 09:09:30 2017 +1000 Merge tag 'drm-misc-fixes-2017-11-30' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for -rc2 - big pile of bridge driver (mostly tc358767), all handled by Archit and Andrez - rockchip dsi fix - atomic helper regression fix for spurious -EBUSY (Maarten) - fix deferred fbdev fallout (Maarten) * tag 'drm-misc-fixes-2017-11-30' of git://anongit.freedesktop.org/drm/drm-misc: drm/bridge: tc358767: fix 1-lane behavior drm/bridge: tc358767: fix AUXDATAn registers access drm/bridge: tc358767: fix timing calculations drm/bridge: tc358767: fix DP0_MISC register set drm/bridge: tc358767: filter out too high modes drm/bridge: tc358767: do no fail on hi-res displays drm/bridge: Fix lvds-encoder since the panel_bridge rework. drm/bridge: synopsys/dw-hdmi: Enable cec clock drm/bridge: adv7511/33: Fix adv7511_cec_init() failure handling drm/fb_helper: Disable all crtc's when initial setup fails. drm/atomic: make drm_atomic_helper_wait_for_vblanks more agressive drm/rockchip: dw-mipi-dsi: fix possible un-balanced runtime PM enable commit db0acbc475f06c775682ba969ab338e1efa2ae96 Author: Geert Uytterhoeven Date: Sun Nov 19 19:58:30 2017 +0100 IB: INFINIBAND should depend on HAS_DMA If NO_DMA=y: ERROR: "bad_dma_ops" [net/sunrpc/xprtrdma/rpcrdma.ko] undefined! ERROR: "bad_dma_ops" [net/smc/smc.ko] undefined! ERROR: "bad_dma_ops" [net/rds/rds_rdma.ko] undefined! ERROR: "bad_dma_ops" [net/9p/9pnet_rdma.ko] undefined! ERROR: "bad_dma_ops" [drivers/nvme/target/nvmet-rdma.ko] undefined! ERROR: "bad_dma_ops" [drivers/nvme/host/nvme-rdma.ko] undefined! ERROR: "bad_dma_ops" [drivers/infiniband/ulp/srpt/ib_srpt.ko] undefined! ERROR: "bad_dma_ops" [drivers/infiniband/ulp/srp/ib_srp.ko] undefined! ERROR: "bad_dma_ops" [drivers/infiniband/ulp/isert/ib_isert.ko] undefined! ERROR: "bad_dma_ops" [drivers/infiniband/ulp/iser/ib_iser.ko] undefined! ERROR: "bad_dma_ops" [drivers/infiniband/ulp/ipoib/ib_ipoib.ko] undefined! ERROR: "bad_dma_ops" [drivers/infiniband/core/ib_core.ko] undefined! Before, this was handled implicitly by the dependency on PCI. Add an explicit dependency on HAS_DMA to fix this. Fixes: 931bc0d91639f8fb ("IB: Move PCI dependency from root KConfig to HW's KConfigs") Signed-off-by: Geert Uytterhoeven Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe drivers/infiniband/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8935780b9f7bbad0f2eb5dd43f61ba7b509a1575 Author: Dennis Dalessandro Date: Tue Nov 14 04:34:23 2017 -0800 IB/hfi1: Initialize bth1 in 16B rc ack builder It is possible the bth1 variable could be used uninitialized so going ahead and giving it a default value. Otherwise we leak stack memory to the network. Fixes: 5b6cabb0db77 ("IB/hfi1: Add 16B RC/UC support") Reviewed-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe drivers/infiniband/hw/hfi1/rc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68615eb01f82256c19e41967bfb3eef902f77033 Author: Peter Rosin Date: Mon Nov 27 17:31:00 2017 +0100 hwmon: (jc42) optionally try to disable the SMBUS timeout With a nxp,se97 chip on an atmel sama5d31 board, the I2C adapter driver is not always capable of avoiding the 25-35 ms timeout as specified by the SMBUS protocol. This may cause silent corruption of the last bit of any transfer, e.g. a one is read instead of a zero if the sensor chip times out. This also affects the eeprom half of the nxp-se97 chip, where this silent corruption was originally noticed. Other I2C adapters probably suffer similar issues, e.g. bit-banging comes to mind as risky... The SMBUS register in the nxp chip is not a standard Jedec register, but it is not special to the nxp chips either, at least the atmel chips have the same mechanism. Therefore, do not special case this on the manufacturer, it is opt-in via the device property anyway. Cc: stable@vger.kernel.org # 4.9+ Signed-off-by: Peter Rosin Acked-by: Rob Herring Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/hwmon/jc42.txt | 4 ++++ drivers/hwmon/jc42.c | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) commit 0e710ac6521f13c68a5c634471f40ae448c31e0a Author: Palmer Dabbelt Date: Tue Nov 21 07:59:28 2017 -0800 RISC-V: Clean up an unused include We used to have some cmpxchg syscalls. They're no longer there, so we no longer need the include. CC: Christoph Hellwig Signed-off-by: Palmer Dabbelt arch/riscv/kernel/sys_riscv.c | 1 - 1 file changed, 1 deletion(-) commit 921ebd8f2c081b3cf6c3b29ef4103eef3ff26054 Author: Andrew Waterman Date: Wed Oct 25 14:32:16 2017 -0700 RISC-V: Allow userspace to flush the instruction cache Despite RISC-V having a direct 'fence.i' instruction available to userspace (which we can't trap!), that's not actually viable when running on Linux because the kernel might schedule a process on another hart. There is no way for userspace to handle this without invoking the kernel (as it doesn't know the thread->hart mappings), so we've defined a RISC-V specific system call to flush the instruction cache. This patch adds both a system call and a VDSO entry. If possible, we'd like to avoid having the system call be considered part of the user-facing ABI and instead restrict that to the VDSO entry -- both just in general to avoid having additional user-visible ABI to maintain, and because we'd prefer that users just call the VDSO entry because there might be a better way to do this in the future (ie, one that doesn't require entering the kernel). Signed-off-by: Andrew Waterman Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/cacheflush.h | 6 ++++++ arch/riscv/include/asm/vdso-syscalls.h | 28 ++++++++++++++++++++++++++++ arch/riscv/include/asm/vdso.h | 4 ++++ arch/riscv/kernel/sys_riscv.c | 32 ++++++++++++++++++++++++++++++++ arch/riscv/kernel/syscall_table.c | 2 ++ arch/riscv/kernel/vdso/Makefile | 1 + arch/riscv/kernel/vdso/flush_icache.S | 31 +++++++++++++++++++++++++++++++ arch/riscv/kernel/vdso/vdso.lds.S | 1 + 8 files changed, 105 insertions(+) commit 08f051eda33b51e8ee0f45f05bcfe49d0f0caf6b Author: Andrew Waterman Date: Wed Oct 25 14:30:32 2017 -0700 RISC-V: Flush I$ when making a dirty page executable The RISC-V ISA allows for instruction caches that are not coherent WRT stores, even on a single hart. As a result, we need to explicitly flush the instruction cache whenever marking a dirty page as executable in order to preserve the correct system behavior. Local instruction caches aren't that scary (our implementations actually flush the cache, but RISC-V is defined to allow higher-performance implementations to exist), but RISC-V defines no way to perform an instruction cache shootdown. When explicitly asked to do so we can shoot down remote instruction caches via an IPI, but this is a bit on the slow side. Instead of requiring an IPI to all harts whenever marking a page as executable, we simply flush the currently running harts. In order to maintain correct behavior, we additionally mark every other hart as needing a deferred instruction cache which will be taken before anything runs on it. Signed-off-by: Andrew Waterman Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/cacheflush.h | 24 ++++++++++++--- arch/riscv/include/asm/mmu.h | 4 +++ arch/riscv/include/asm/mmu_context.h | 44 +++++++++++++++++++++++++++ arch/riscv/include/asm/pgtable.h | 58 ++++++++++++++++++++---------------- arch/riscv/include/asm/tlbflush.h | 2 ++ arch/riscv/kernel/smp.c | 48 +++++++++++++++++++++++++++++ arch/riscv/mm/Makefile | 1 + arch/riscv/mm/cacheflush.c | 23 ++++++++++++++ 8 files changed, 174 insertions(+), 30 deletions(-) commit 6fef90c6b3f6a2b52018e66c0886944ea0c03fcc Author: Florian Fainelli Date: Thu Nov 30 10:45:26 2017 -0800 net: dsa: bcm_sf2: Set correct CHAIN_ID and slice number mask When configuring an IPv6 address mask, we should use SLICE_NUM_MASK as the mask in order to make sure all bits are masked by the hardware. Also, we want matching entries to have a CHAIN_ID value set to the same value as the rule index we return to user-space for convenience, so fix that too. Fixes: ba0696c22e7c ("net: dsa: bcm_sf2: Add support for IPv6 CFP rules") Fixes: dd8eff68343d ("net: dsa: bcm_sf2: Allow matching arbitrary IPv6 masks/lengths") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2_cfp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b279419567105d63f1e524bb1ac34ae8f918e5d Author: Yonghong Song Date: Thu Nov 30 08:52:42 2017 -0800 tools/bpf: adjust rlimit RLIMIT_MEMLOCK for test_verifier_log The default rlimit RLIMIT_MEMLOCK is 64KB. In certain cases, e.g. in a test machine mimicking our production system, this test may fail due to unable to charge the required memory for prog load: # ./test_verifier_log Test log_level 0... ERROR: Program load returned: ret:-1/errno:1, expected ret:-1/errno:22 Changing the default rlimit RLIMIT_MEMLOCK to unlimited makes the test always pass. Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_verifier_log.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 741fc3ff3a49509a7092d6d9eb51da6bd7577278 Author: Olof Johansson Date: Wed Nov 29 17:55:20 2017 -0800 RISC-V: Add missing include Fixes: include/asm-generic/mm_hooks.h:20:11: warning: 'struct vm_area_struct' declared inside parameter list will not be visible outside of this definition or declaration include/asm-generic/mm_hooks.h:19:38: warning: 'struct mm_struct' declared inside parameter list will not be visible outside of this definition or declaration Signed-off-by: Olof Johansson Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/mmu_context.h | 1 + 1 file changed, 1 insertion(+) commit 4a41d5dbb0bbd0c3faffb2ccd8ef1a7aeb12f978 Author: Olof Johansson Date: Wed Nov 29 17:55:18 2017 -0800 RISC-V: Use define for get_cycles like other architectures Signed-off-by: Olof Johansson Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/timex.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4bde63286a6c7c76fe05ff0e03ad253f5260b104 Author: Olof Johansson Date: Wed Nov 29 17:55:17 2017 -0800 RISC-V: Provide stub of setup_profiling_timer() Fixes the following on allmodconfig build: profile.c:(.text+0x3e4): undefined reference to `setup_profiling_timer' Signed-off-by: Olof Johansson Signed-off-by: Palmer Dabbelt arch/riscv/kernel/smp.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 24948b7ec0f31d36dc900088b140c4f9551b6f56 Author: Olof Johansson Date: Wed Nov 29 17:55:16 2017 -0800 RISC-V: Export some expected symbols for modules These are the ones needed by current allmodconfig, so add them instead of everything other architectures are exporting -- the rest can be added on demand later if needed. Signed-off-by: Olof Johansson Signed-off-by: Palmer Dabbelt arch/riscv/kernel/riscv_ksyms.c | 3 +++ arch/riscv/kernel/setup.c | 2 ++ arch/riscv/lib/delay.c | 1 + 3 files changed, 6 insertions(+) commit 83e7b8769a08987f47117f3a065de153c839a0a8 Author: Olof Johansson Date: Wed Nov 29 17:55:15 2017 -0800 RISC-V: move empty_zero_page definition to C and export it Needed by some modules (exported by other architectures). Signed-off-by: Olof Johansson Signed-off-by: Palmer Dabbelt arch/riscv/kernel/head.S | 3 --- arch/riscv/kernel/setup.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) commit fe2726af9fdc93ecf2469b7c512fc1a8936e128c Author: Olof Johansson Date: Wed Nov 29 17:55:14 2017 -0800 RISC-V: io.h: type fixes for warnings include for __iomem definition. Also, add volatile to iounmap() like other architectures have it to avoid "discarding volatile" warnings from some drivers. Finally, explicitly promote the base address for INB/OUTB functions to avoid some old legacy drivers complaining about int-to-ptr promotions. The drivers are unlikely to work but they're included in allmodconfig so the warnings are noisy. Fixes, among other warnings, these with allmodconfig: ../arch/riscv/include/asm/io.h:24:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token extern void __iomem *ioremap(phys_addr_t offset, unsigned long size); sound/pci/echoaudio/echoaudio.c: In function 'snd_echo_free': sound/pci/echoaudio/echoaudio.c:1879:10: warning: passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers] Signed-off-by: Olof Johansson Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/io.h | 16 +++++++++------- arch/riscv/mm/ioremap.c | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) commit 5e6f82b0fe7b7b4a204efeb0817fb8b0a2bc0373 Author: Olof Johansson Date: Wed Nov 29 17:55:13 2017 -0800 RISC-V: use RISCV_{INT,SHORT} instead of {INT,SHORT} for asm macros INT and SHORT are used by some drivers that pull in the include files, so prefixing helps avoid namespace conflicts. Other constructs in the same file already uses this. Fixes, among others, these warnings with allmodconfig: ../sound/core/pcm_misc.c:43:0: warning: "INT" redefined #define INT __force int Signed-off-by: Olof Johansson Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/asm.h | 12 ++++++------ arch/riscv/include/asm/bug.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) commit 5ddf755e4439833847a21bd5e2dc82d686679911 Author: Olof Johansson Date: Wed Nov 29 17:55:12 2017 -0800 RISC-V: use generic serial.h Fixes this from allmodconfig: drivers/tty/serial/earlycon.c:27:10: fatal error: asm/serial.h: No such file or directory Signed-off-by: Olof Johansson Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/Kbuild | 1 + 1 file changed, 1 insertion(+) commit 8d26fdfcb45dc420115b267ac9d6b3ac13457f1b Author: Geert Uytterhoeven Date: Thu Nov 30 14:35:08 2017 +0100 spi: Fix double "when" Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown include/linux/spi/spi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb5b46faa693470681ec7c28cc2436edd1571198 Author: Trond Myklebust Date: Thu Nov 30 07:21:33 2017 -0500 SUNRPC: Handle ENETDOWN errors Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker net/sunrpc/clnt.c | 5 +++++ net/sunrpc/xprtsock.c | 1 + 2 files changed, 6 insertions(+) commit 373b0589dc8d58bc09c9a28d03611ae4fb216057 Author: Carlos Maiolino Date: Tue Nov 28 08:54:10 2017 -0800 xfs: Properly retry failed dquot items in case of error during buffer writeback Once the inode item writeback errors is already fixed, it's time to fix the same problem in dquot code. Although there were no reports of users hitting this bug in dquot code (at least none I've seen), the bug is there and I was already planning to fix it when the correct approach to fix the inodes part was decided. This patch aims to fix the same problem in dquot code, regarding failed buffers being unable to be resubmitted once they are flush locked. Tested with the recently test-case sent to fstests list by Hou Tao. Reviewed-by: Brian Foster Signed-off-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_dquot.c | 14 +++++++++++--- fs/xfs/xfs_dquot_item.c | 40 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 5 deletions(-) commit 3b42d385753c22b29d259ccb9d4c3f419e583b30 Author: Darrick J. Wong Date: Mon Nov 27 21:40:19 2017 -0800 xfs: scrub inode mode properly Since we've used up all the bits in i_mode, the existing mode check doesn't actually do anything useful. However, we've not used all the bit values in the format portion of i_mode, so we /do/ need to test that for bad values. Fixes: 80e4e1268 ("xfs: scrub inodes") Fixes-coverity-id: 1423992 Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/scrub/inode.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 2d5f4b5bebccfe983715ebc9255151e611234643 Author: Darrick J. Wong Date: Mon Nov 27 09:50:22 2017 -0800 xfs: remove unused parameter from xfs_writepage_map The first thing that xfs_writepage_map does is clobber the offset parameter. Since we never use the passed-in value, turn the parameter into a local variable. This gets rid of an UBSAN warning in generic/466. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_aops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 22a6c83777ac7c17d6c63891beeeac24cf5da450 Author: Darrick J. Wong Date: Mon Nov 27 09:50:17 2017 -0800 xfs: ubsan fixes Fix some complaints from the UBSAN about signed integer addition overflows. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_aops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1ac7c8a78be85f84b019d3d2742d1a9f07255cc5 Author: Shuah Khan Date: Wed Nov 29 15:24:22 2017 -0700 usbip: fix usbip attach to find a port that matches the requested speed usbip attach fails to find a free port when the device on the first port is a USB_SPEED_SUPER device and non-super speed device is being attached. It keeps checking the first port and returns without a match getting stuck in a loop. Fix it check to find the first port with matching speed. Reported-by: Juan Zea Signed-off-by: Shuah Khan Cc: stable Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/libsrc/vhci_driver.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 770b2edece42fa55bbe7d4cbe53347a07b8968d4 Author: Yuyang Du Date: Thu Nov 30 10:22:40 2017 +0800 usbip: Fix USB device hang due to wrong enabling of scatter-gather The previous USB3 SuperSpeed enabling patches mistakenly enabled URB scatter-gather chaining, which is actually not supported by the VHCI HCD. This patch fixes that. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197867 Fixes: 03cd00d538a6feb ("usbip: vhci-hcd: Set the vhci structure up to work") Reported-by: Juan Zea Signed-off-by: Yuyang Du Cc: stable Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci_hcd.c | 1 - 1 file changed, 1 deletion(-) commit 05bcccebda44c4b0a78bb0b9b2f23dd28e95f56b Merge: 7a38b2d a3acc69 Author: Greg Kroah-Hartman Date: Thu Nov 30 16:33:59 2017 +0000 Merge tag 'fixes-for-v4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fixes for v4.15-rc2 After a long time, we finally have a good solution for how to handle OS descriptor on FFS. From now on we will force the Reserved field to be 1 as mandated by the specification. Apart from that, we have a couple other smaller fixes: - FFS learned to not sleep in atomic context. - UDC-core has a fix for the way we set a UDC's operating speed. - Renesas USB3 has a fix for the maximum number of pipes supported - Allow legacy drivers to be compiled without USB_ETH - Fix some coccinelle warnings commit 7a38b2d107b49a8f671bf4f93379b8fd307d8230 Merge: 7fee72d 762ff46 Author: Greg Kroah-Hartman Date: Thu Nov 30 16:33:04 2017 +0000 Merge tag 'usb-serial-4.15-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.15-rc2 Here are some new device ids. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold commit 9e0600f5cf6cecfcab5046d1453a9538c054d8a7 Merge: 22985bf a63dd74 Author: Linus Torvalds Date: Thu Nov 30 08:15:19 2017 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: - x86 bugfixes: APIC, nested virtualization, IOAPIC - PPC bugfix: HPT guests on a POWER9 radix host * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (26 commits) KVM: Let KVM_SET_SIGNAL_MASK work as advertised KVM: VMX: Fix vmx->nested freeing when no SMI handler KVM: VMX: Fix rflags cache during vCPU reset KVM: X86: Fix softlockup when get the current kvmclock KVM: lapic: Fixup LDR on load in x2apic KVM: lapic: Split out x2apic ldr calculation KVM: PPC: Book3S HV: Fix migration and HPT resizing of HPT guests on radix hosts KVM: vmx: use X86_CR4_UMIP and X86_FEATURE_UMIP KVM: x86: Fix CPUID function for word 6 (80000001_ECX) KVM: nVMX: Fix vmx_check_nested_events() return value in case an event was reinjected to L2 KVM: x86: ioapic: Preserve read-only values in the redirection table KVM: x86: ioapic: Clear Remote IRR when entry is switched to edge-triggered KVM: x86: ioapic: Remove redundant check for Remote IRR in ioapic_set_irq KVM: x86: ioapic: Don't fire level irq when Remote IRR set KVM: x86: ioapic: Fix level-triggered EOI and IOAPIC reconfigure race KVM: x86: inject exceptions produced by x86_decode_insn KVM: x86: Allow suppressing prints on RDMSR/WRMSR of unhandled MSRs KVM: x86: fix em_fxstor() sleeping while in atomic KVM: nVMX: Fix mmu context after VMLAUNCH/VMRESUME failure KVM: nVMX: Validate the IA32_BNDCFGS on nested VM-entry ... commit 22985bf59b0228769dc568d6401ed2090e2eed27 Merge: a0908a1b7 9d0ca44 Author: Linus Torvalds Date: Thu Nov 30 08:13:36 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: - SPDX identifiers are added to more of the s390 specific files. - The ELF_ET_DYN_BASE base patch from Kees is reverted, with the change some old 31-bit programs crash. - Bug fixes and cleanups. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (29 commits) s390/gs: add compat regset for the guarded storage broadcast control block s390: revert ELF_ET_DYN_BASE base changes s390: Remove redundant license text s390: crypto: Remove redundant license text s390: include: Remove redundant license text s390: kernel: Remove redundant license text s390: add SPDX identifiers to the remaining files s390: appldata: add SPDX identifiers to the remaining files s390: pci: add SPDX identifiers to the remaining files s390: mm: add SPDX identifiers to the remaining files s390: crypto: add SPDX identifiers to the remaining files s390: kernel: add SPDX identifiers to the remaining files s390: sthyi: add SPDX identifiers to the remaining files s390: drivers: Remove redundant license text s390: crypto: Remove redundant license text s390: virtio: add SPDX identifiers to the remaining files s390: scsi: zfcp_aux: add SPDX identifier s390: net: add SPDX identifiers to the remaining files s390: char: add SPDX identifiers to the remaining files s390: cio: add SPDX identifiers to the remaining files ... commit 07c43a382d7de3db01cc28bf2e17ed151cde2046 Author: Andre Przywara Date: Sat Nov 25 12:02:00 2017 +0000 pinctrl: sunxi: Disable strict mode for H5 driver All of the H5 boards in the kernel reference the MMC0 CD pin twice in their DT, so strict mode will make the MMC driver fail to load. To keep existing DTs working, disable strict mode in the H5 driver. Signed-off-by: Andre Przywara Reported-by: Chris Obbard Acked-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7c5c2c2d18d778e51fd8b899965097168306031c Author: Andre Przywara Date: Sat Nov 25 12:12:30 2017 +0000 pinctrl: sunxi: Fix A64 UART mux value To use pin PF4 as the RX signal of UART0, we have to write 0b011 into the respective pin controller register. Fix the wrong value we had in our table so far. Fixes: 96851d391d02 ("drivers: pinctrl: add driver for Allwinner A64 SoC") Signed-off-by: Andre Przywara Acked-by: Chen-Yu Tsai Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ad4cc8d1ac483e0fd33f605fb2788b0ecf51ed4 Author: Andre Przywara Date: Sat Nov 25 12:19:48 2017 +0000 pinctrl: sunxi: Fix A80 interrupt pin bank On the A80 the pins on port B can trigger interrupts, and those are assigned to the second interrupt bank. Having two pins assigned to the same interrupt bank/pin combination does not look healthy (instead more like a copy&paste bug from pins PA14-PA16), so fix the interrupt bank for pins PB14-PB16, which is actually 1. I don't have any A80 board, so could not test this. Fixes: d5e9fb31baa2 ("pinctrl: sunxi: Add A80 pinctrl muxing options") Signed-off-by: Andre Przywara Acked-by: Chen-Yu Tsai Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f859b4af1c52493ec21173ccc73d0b60029b5b88 Author: Hangbin Liu Date: Thu Nov 30 10:41:14 2017 +0800 sit: update frag_off info After parsing the sit netlink change info, we forget to update frag_off in ipip6_tunnel_update(). Fix it by assigning frag_off with new value. Reported-by: Jianlin Shi Signed-off-by: Hangbin Liu Acked-by: Nicolas Dichtel Signed-off-by: David S. Miller net/ipv6/sit.c | 1 + 1 file changed, 1 insertion(+) commit 3016dad75b48279e579117ee3ed566ba90a3b023 Author: Eric Dumazet Date: Wed Nov 29 17:43:57 2017 -0800 tcp: remove buggy call to tcp_v6_restore_cb() tcp_v6_send_reset() expects to receive an skb with skb->cb[] layout as used in TCP stack. MD5 lookup uses tcp_v6_iif() and tcp_v6_sdif() and thus TCP_SKB_CB(skb)->header.h6 This patch probably fixes RST packets sent on behalf of a timewait md5 ipv6 socket. Before Florian patch, tcp_v6_restore_cb() was needed before jumping to no_tcp_socket label. Fixes: 271c3b9b7bda ("tcp: honour SO_BINDTODEVICE for TW_RST case too") Signed-off-by: Eric Dumazet Cc: Florian Westphal Acked-by: Florian Westphal Signed-off-by: David S. Miller net/ipv6/tcp_ipv6.c | 1 - 1 file changed, 1 deletion(-) commit 90a6ec85351b31449c2c6b5406b5396ac96f191d Author: Cong Wang Date: Wed Nov 29 16:07:51 2017 -0800 act_sample: get rid of tcf_sample_cleanup_rcu() Similar to commit d7fb60b9cafb ("net_sched: get rid of tcfa_rcu"), TC actions don't need to respect RCU grace period, because it is either just detached from tc filter (standalone case) or it is removed together with tc filter (bound case) in which case RCU grace period is already respected at filter layer. Fixes: 5c5670fae430 ("net/sched: Introduce sample tc action") Reported-by: Eric Dumazet Cc: Jamal Hadi Salim Cc: Jiri Pirko Cc: Yotam Gigi Signed-off-by: Cong Wang Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller include/net/tc_act/tc_sample.h | 1 - net/sched/act_sample.c | 14 +++----------- 2 files changed, 3 insertions(+), 12 deletions(-) commit 6c9257a708883bbafa0971eb985cd266d46db0eb Merge: 1c08ac0 282ef47 Author: David S. Miller Date: Thu Nov 30 10:07:34 2017 -0500 Merge tag 'rxrpc-fixes-20171129' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Fixes Here are three patches for AF_RXRPC. One removes some whitespace, one fixes terminal ACK generation and the third makes a couple of places actually use the timeout value just determined rather than ignoring it. ==================== Signed-off-by: David S. Miller commit a152992062aa3803eeabfda84b5b844721ddf6ed Author: Lucas Stach Date: Thu Nov 30 14:31:46 2017 +0100 drm/imx: always call wait_for_flip_done in commit_tail drm_atomic_helper_wait_for_vblanks will go away in the future. The new drm_atomic_helper_setup_commit in 4.15 expects that blocking commits have completed flipping before the commit_tail returns. This must be ensured by calling wait_for_vblanks or wait_for_flip_done, where flip_done might do a less agressive wait, which is fine for imx-drm. Fixes: 080de2e5be2d (drm/atomic: Check for busy planes/connectors before setting the commit) Signed-off-by: Lucas Stach Reviewed-by: Daniel Vetter Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/imx-drm-core.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 1c08ac0c4bd8e9d66c4dde29bc496c3b430dd028 Author: Corentin Labbe Date: Tue Nov 28 17:48:22 2017 +0100 net: stmmac: dwmac-sun8i: fix allwinner,leds-active-low handling The driver expect "allwinner,leds-active-low" to be in PHY node, but the binding doc expect it to be in MAC node. Since all board DT use it also in MAC node, the driver need to search allwinner,leds-active-low in MAC node. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7f8e2a85c1b0bd440ffe87be82c79fdc319e8291 Author: Keerthy Date: Fri Nov 10 16:43:17 2017 +0530 gpio: davinci: Assign first bank regs for unbanked case As per the re-design assign the first bank regs for unbanked irq case. This was missed out in the original patch. Signed-off-by: Keerthy Fixes: b5cf3fd827d2e1 ("gpio: davinci: Redesign driver to accommodate ngpios in one gpio chip") Signed-off-by: Linus Walleij drivers/gpio/gpio-davinci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 793b9184047f3d7fe4fe234a46951dabfc3cfeeb Author: Linus Walleij Date: Wed Nov 22 21:04:14 2017 +0100 pinctrl: gemini: Fix usage of 3512 groups The pin config lookup function was still hardcoding the 3516 pin set, which is obviously wrong. Use the pointer in the state container. Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-gemini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a158531f3c92467df0e93e000d58185acae78a6e Author: Geert Uytterhoeven Date: Tue Nov 21 15:18:10 2017 +0100 gpio: 74x164: Fix crash during .remove() Commit 7ebc194d0fd4bb0f ("gpio: 74x164: Introduce 'enable-gpios' property") added a new member gpiod_oe to the end of the struct gen_74x164_chip, after the zero-length buffer array. However, this buffer is a flexible array, allocated together with the structure during .probe(). As the buffer is no longer the last member, writing to it corrupts the newly added member after it. During device removal, the corrupted member will be used as a pointer, leading to a crash. This went unnoticed, as the flexible array was declared as "buffer[0]" instead of "buffer[]", and thus did not trigger a "flexible array member not at end of struct" error from gcc. Move the gpiod_oe field up to fix this, and drop the zero from the array size to prevent future similar bugs. Fixes: 7ebc194d0fd4bb0f ("gpio: 74x164: Introduce 'enable-gpios' property") Signed-off-by: Geert Uytterhoeven Reviewed-by: Fabio Estevam Signed-off-by: Linus Walleij drivers/gpio/gpio-74x164.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8821f96ae97260d68228fe53f81848b2ede44d7 Author: Geert Uytterhoeven Date: Thu Nov 30 14:33:56 2017 +0100 skbuff: Grammar s/are can/can/, s/change/changes/ Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller include/linux/skbuff.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a154f8e399a063137fc42b961f437248d55ece29 Author: Yan Markman Date: Thu Nov 30 10:49:46 2017 +0100 net: mvpp2: allocate zeroed tx descriptors Reserved and unused fields in the Tx descriptors should be 0. The PPv2 driver doesn't clear them at run-time (for performance reasons) but these descriptors aren't zeroed when allocated, which can lead to unpredictable behaviors. This patch fixes this by using dma_zalloc_coherent instead of dma_alloc_coherent. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Yan Markman [Antoine: commit message] Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b6c70268723bc89743b8aaaa7d17f6889d72497a Merge: 10809bb a64a62c Author: Rafael J. Wysocki Date: Thu Nov 30 13:37:29 2017 +0100 Merge branch 'acpi-ec' into acpi * acpi-ec: ACPI / EC: Fix regression related to PM ops support in ECDT device commit 737e0b7b67bdfe24090fab2852044bb283282fc5 Author: Andrew F. Davis Date: Wed Nov 29 15:32:46 2017 -0600 ASoC: tlv320aic31xx: Fix GPIO1 register definition GPIO1 control register is number 51, fix this here. Fixes: bafcbfe429eb ("ASoC: tlv320aic31xx: Make the register values human readable") Signed-off-by: Andrew F. Davis Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/codecs/tlv320aic31xx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6981037442b05b192504fbc3c165cb240e01f6e2 Merge: 7e8a09e 43d2d3b Author: Rafael J. Wysocki Date: Thu Nov 30 13:29:56 2017 +0100 Merge branch 'pm-tools' * pm-tools: cpupower : Fix cpupower working when cpu0 is offline cpupowerutils: bench - Fix cpu online check commit 51f493ae71adc2c49a317a13c38e54e1cdf46005 Author: Srinivas Kandagatla Date: Thu Nov 30 10:15:02 2017 +0000 ASoC: codecs: msm8916-wcd: Fix supported formats This codec is configurable for only 16 bit and 32 bit samples, so reflect this in the supported formats also remove 24bit sample from supported list. Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/codecs/msm8916-wcd-analog.c | 2 +- sound/soc/codecs/msm8916-wcd-digital.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit bc2aba905211a8fc6da367e04595d1624f0fa156 Author: Dan Carpenter Date: Fri Oct 27 09:27:05 2017 +0300 omapdrm: hdmi4_cec: signedness bug in hdmi4_cec_init() "ret" needs to be signed for the error handling to work. Fixes: 8d7f934df8d8 ("omapdrm: hdmi4_cec: add OMAP4 HDMI CEC support") Signed-off-by: Dan Carpenter Reviewed-by: Sebastian Reichel Acked-by: Hans Verkuil Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf25dac38f71d392a31ec074f55cbc941f1eaf1d Author: Laurent Pinchart Date: Thu Nov 16 09:50:19 2017 +0100 drm: omapdrm: Fix DPI on platforms using the DSI VDDS Commit d178e034d565 ("drm: omapdrm: Move FEAT_DPI_USES_VDDS_DSI feature to dpi code") replaced usage of platform data version with SoC matching to configure DPI VDDS. The SoC match entries were incorrect, they should have matched on the machine name instead of the SoC family. Fix it. The result was observed on OpenPandora with OMAP3530 where the panel only had the Blue channel and Red&Green were missing. It was not observed on GTA04 with DM3730. Fixes: d178e034d565 ("drm: omapdrm: Move FEAT_DPI_USES_VDDS_DSI feature to dpi code") Signed-off-by: Laurent Pinchart Reported-by: H. Nikolaus Schaller Tested-by: H. Nikolaus Schaller Cc: stable@vger.kernel.org # 4.14 Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/dpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 23970e150a0a49f9a966c46e5d22fed06226098f Author: Peter Ujfalusi Date: Mon Nov 20 11:51:40 2017 +0200 omapdrm: hdmi4: Correct the SoC revision matching I believe the intention of the commit 2c9fc9bf45f8 ("drm: omapdrm: Move FEAT_HDMI_* features to hdmi4 driver") was to identify omap4430 ES1.x, omap4430 ES2.x and other OMAP4 revisions, like omap4460. By using family=OMAP4 in the match the code will treat omap4460 ES1.x in a same way as it would treat omap4430 ES1.x This breaks HDMI audio on OMAP4460 devices (PandaES for example). Correct the match rule so we are not going to get false positive match. Fixes: 2c9fc9bf45f8 ("drm: omapdrm: Move FEAT_HDMI_* features to hdmi4 driver") Cc: stable@vger.kernel.org # 4.14 Signed-off-by: Peter Ujfalusi Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 499ec0ed5eb2f6a7fcaab2dd66ffc5993484bda9 Author: Arnd Bergmann Date: Thu Oct 5 14:06:41 2017 +0200 drm/omap: displays: panel-dpi: add backlight dependency The new backlight code causes a link failure when backlight support itself is disabled: drivers/gpu/drm/omapdrm/displays/panel-dpi.o: In function `panel_dpi_probe_of': panel-dpi.c:(.text+0x35c): undefined reference to `of_find_backlight_by_node' This adds a Kconfig dependency like we have for the other OMAP display targets. Fixes: 39135a305a0f ("drm/omap: displays: panel-dpi: Support for handling backlight devices") Signed-off-by: Arnd Bergmann Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 8677b1ac2db021ab30bb1fa34f1e56ebe0051ec3 Author: Christophe JAILLET Date: Sun Sep 24 08:01:03 2017 +0200 drm/omap: Fix error handling path in 'omap_dmm_probe()' If we don't find a matching device node, we must free the memory allocated in 'omap_dmm' a few lines above. Fixes: 7cb0d6c17b96 ("drm/omap: fix TILER on OMAP5") Signed-off-by: Christophe JAILLET Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 781b045baefdabf7e0bc9f33672ca830d3db9f27 Author: Sakari Ailus Date: Wed Nov 1 05:40:58 2017 -0400 media: imx274: Fix error handling, add MAINTAINERS entry Add the missing MAINTAINERS entry for imx274, fix error handling in driver probe and unregister the correct control handler in driver remove. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 ++++++++ drivers/media/i2c/imx274.c | 5 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit 487cc857851f6ca7850636bd111e7a4bfadab4da Author: Niklas Söderlund Date: Wed Nov 15 10:43:58 2017 -0500 media: v4l: async: use the v4l2_dev from the root notifier when matching sub-devices When matching and registering a sub-device from a sub-notifier use the v4l2_device from the root parent notifier. Using the v4l2_dev stored in the sub-notifier itself is incorrect as it might not be set. This can be demonstrated by unbinding and rebinding the adv748x driver and observing that it fails to probe due to the check !v4l2_dev in v4l2_device_register_subdev(). # echo 4-0070 > /sys/bus/i2c/drivers/adv748x/unbind # echo 4-0070 > /sys/bus/i2c/drivers/adv748x/bind adv748x 4-0070: chip found @ 0xe0 revision 2143 adv748x 4-0070: Failed to probe TXA adv748x: probe of 4-0070 failed with error -22 Looking at the commit which adds sub-notifiers to V4L2 it looks like this is the intended behavior of the original commit. With this fix the adv748x can be re-bound and still function properly. Fixes: 2cab00bb076b9f0e ("media: v4l: async: Allow binding notifiers to sub-devices") Signed-off-by: Niklas Söderlund Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3bf393860f6efc41ce268f5c21a457df1e8e6e00 Author: Tomasz Figa Date: Wed Nov 15 06:55:22 2017 -0500 media: v4l2-fwnode: Check subdev count after checking port Current implementation of __v4l2_async_notifier_parse_fwnode_endpoints() checks first whether subdev_count >= subdev_max and only then whether the port being parsed matches the given port index. This triggers an error in otherwise valid cases of skipping ports that do not match. Fix this by moving the check below the port index check. Fixes: 9ca465312132 ("media: v4l: fwnode: Support generic parsing of graph endpoints in a device") Signed-off-by: Tomasz Figa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-fwnode.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2aa4d4985fc526ce076bef68b3efe6013c20b975 Author: Arnd Bergmann Date: Mon Nov 13 08:56:45 2017 -0500 media: et8ek8: select V4L2_FWNODE v4l2_async_register_subdev_sensor_common() is only provided when CONFIG_V4L2_FWNODE is enabled, otherwise we get a link failure: drivers/media/i2c/et8ek8/et8ek8_driver.o: In function `et8ek8_probe': et8ek8_driver.c:(.text+0x884): undefined reference to `v4l2_async_register_subdev_sensor_common' This adds a Kconfig 'select' statement like all the other users of this interface have. Fixes: d8932f38c10f ("media: et8ek8: Add support for flash and lens devices") Signed-off-by: Arnd Bergmann Reviewed-by: Sebastian Reichel Acked-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/et8ek8/Kconfig | 1 + 1 file changed, 1 insertion(+) commit fce8ba670b7418319da14a6fc6668db1f1a96267 Author: Sakari Ailus Date: Sun Nov 5 17:51:00 2017 -0500 media: ov13858: Select V4L2_FWNODE The ov13858 driver depends on the V4L2 fwnode, thus add that to Kconfig. Fixes: 5fcf092e0c9f ("[media] ov13858: add support for OV13858 sensor") Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 67f0f15ad5c47490e19f2526f8f9cea97c5ce1a6 Author: Sean Young Date: Sun Nov 19 16:57:27 2017 -0500 media: rc: partial revert of "media: rc: per-protocol repeat period" Since commit d57ea877af38 ("media: rc: per-protocol repeat period"), most IR protocols have a lower keyup timeout. This causes problems on the ite-cir, which has default IR timeout of 200ms. Since the IR decoders read the trailing space, with a IR timeout of 200ms, the last keydown will have at least a delay of 200ms. This is more than the protocol timeout of e.g. rc-6 (which is 164ms). As a result the last IR will be interpreted as a new keydown event, and we get two keypresses. Revert the protocol timeout to 250ms, except for cec which needs a timeout of 550ms. Fixes: d57ea877af38 ("media: rc: per-protocol repeat period") Cc: # 4.14 Reported-by: Matthias Reichl Signed-off-by: Sean Young Tested-by: Matthias Reichl Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 6d33377f2abbf9f0e561b116dd468d1c3ff36a6a Author: Laurent Caumont Date: Sat Nov 11 12:44:46 2017 -0500 media: dvb: i2c transfers over usb cannot be done from stack Cc: stable@vger.kernel.org Signed-off-by: Laurent Caumont Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dibusb-common.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit be9b53c83792e3898755dce90f8c632d40e7c83e Author: Mauro Carvalho Chehab Date: Wed Nov 29 14:02:22 2017 -0500 media: dvb-frontends: complete kernel-doc markups For the dvb-frontends that are now part of the documentation, complete the kernel-doc markups, in order for them to be properly used at the driver's kAPI documentation. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/af9013.h | 24 +++-- drivers/media/dvb-frontends/ascot2e.h | 9 ++ drivers/media/dvb-frontends/cxd2820r.h | 24 ++++- drivers/media/dvb-frontends/drxk.h | 8 ++ drivers/media/dvb-frontends/dvb-pll.h | 2 +- drivers/media/dvb-frontends/helene.h | 29 ++++-- drivers/media/dvb-frontends/horus3a.h | 9 ++ drivers/media/dvb-frontends/ix2505v.h | 17 ++-- drivers/media/dvb-frontends/m88ds3103.h | 155 ++++++++++++----------------- drivers/media/dvb-frontends/mb86a20s.h | 17 ++-- drivers/media/dvb-frontends/rtl2830.h | 1 - drivers/media/dvb-frontends/rtl2832.h | 1 - drivers/media/dvb-frontends/stb6000.h | 2 +- drivers/media/dvb-frontends/tda10071.h | 1 - drivers/media/dvb-frontends/zd1301_demod.h | 6 ++ 15 files changed, 177 insertions(+), 128 deletions(-) commit e61edeb155ca20cf30009196738d4a7a8365ac9f Author: Mauro Carvalho Chehab Date: Wed Nov 29 12:46:12 2017 -0500 media: docs: add documentation for frontend attach info Add to the media book the attachment kAPI for the DVB frontend drivers that have already some kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab Documentation/media/dvb-drivers/frontends.rst | 30 +++++++++++++++++++++++++++ Documentation/media/dvb-drivers/index.rst | 1 + 2 files changed, 31 insertions(+) commit b95b0c98f52883f9b907836f3421341af6f0145f Author: Mauro Carvalho Chehab Date: Wed Nov 29 12:39:19 2017 -0500 media: dvb_frontends: fix kernel-doc macros Now, the Kernel checks for kernel_doc format issues. Weird enough, it didn't get any of those troubles. Shssst! Well, let's fix it, as a preventive way to avoid having hundreds of new warnings on some next Linux version. Tested by adding all files under dvb-frontends that have "/**" on them. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/drx39xyj/bsp_i2c.h | 12 +- drivers/media/dvb-frontends/drx39xyj/drx_driver.h | 878 +++++++++++----------- drivers/media/dvb-frontends/drx39xyj/drxj.h | 220 +++--- drivers/media/dvb-frontends/drxk.h | 5 +- drivers/media/dvb-frontends/dvb-pll.h | 11 +- drivers/media/dvb-frontends/helene.h | 1 + drivers/media/dvb-frontends/ix2505v.h | 17 +- drivers/media/dvb-frontends/l64781.c | 2 +- drivers/media/dvb-frontends/mn88472.h | 16 +- drivers/media/dvb-frontends/rtl2832_sdr.h | 6 +- drivers/media/dvb-frontends/stb6000.h | 9 +- drivers/media/dvb-frontends/stv0299.c | 2 +- drivers/media/dvb-frontends/tda826x.h | 11 +- drivers/media/dvb-frontends/tua6100.h | 2 +- drivers/media/dvb-frontends/zd1301_demod.h | 7 +- drivers/media/dvb-frontends/zl10036.h | 16 +- 16 files changed, 607 insertions(+), 608 deletions(-) commit cba862dc7301d62f90393f2bbb181834a3125308 Author: Mauro Carvalho Chehab Date: Wed Nov 29 08:33:45 2017 -0500 media: drivers: remove "/**" from non-kernel-doc comments Several comments are wrongly tagged as kernel-doc, causing those warnings: drivers/media/rc/st_rc.c:98: warning: No description found for parameter 'irq' drivers/media/rc/st_rc.c:98: warning: No description found for parameter 'data' drivers/media/pci/solo6x10/solo6x10-enc.c:183: warning: No description found for parameter 'solo_dev' drivers/media/pci/solo6x10/solo6x10-enc.c:183: warning: No description found for parameter 'ch' drivers/media/pci/solo6x10/solo6x10-enc.c:183: warning: No description found for parameter 'qp' drivers/media/usb/pwc/pwc-dec23.c:652: warning: Cannot understand * on line 652 - I thought it was a doc line drivers/media/usb/dvb-usb/cinergyT2-fe.c:40: warning: No description found for parameter 'op' drivers/media/usb/dvb-usb/friio-fe.c:301: warning: Cannot understand * (reg, val) commad list to initialize this module. on line 301 - I thought it was a doc line drivers/media/rc/streamzap.c:201: warning: No description found for parameter 'urb' drivers/media/rc/streamzap.c:333: warning: No description found for parameter 'intf' drivers/media/rc/streamzap.c:333: warning: No description found for parameter 'id' drivers/media/rc/streamzap.c:464: warning: No description found for parameter 'interface' drivers/media/i2c/ov5647.c:432: warning: Cannot understand * @short Subdev core operations registration on line 432 - I thought it was a doc line drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'd' drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'addr' drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'wbuf' drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'wlen' drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'rbuf' drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'rlen' drivers/media/platform/vim2m.c:350: warning: No description found for parameter 'priv' drivers/media/dvb-frontends/tua6100.c:34: warning: cannot understand function prototype: 'struct tua6100_priv ' drivers/media/platform/sti/hva/hva-h264.c:140: warning: cannot understand function prototype: 'struct hva_h264_stereo_video_sei ' drivers/media/platform/sti/hva/hva-h264.c:150: warning: Cannot understand * @frame_width: width in pixels of the buffer containing the input frame on line 150 - I thought it was a doc line drivers/media/platform/sti/hva/hva-h264.c:356: warning: Cannot understand * @ slice_size: slice size on line 356 - I thought it was a doc line drivers/media/platform/sti/hva/hva-h264.c:369: warning: Cannot understand * @ bitstream_size: bitstream size on line 369 - I thought it was a doc line drivers/media/platform/sti/hva/hva-h264.c:395: warning: Cannot understand * @seq_info: sequence information buffer on line 395 - I thought it was a doc line drivers/media/dvb-frontends/sp887x.c:137: warning: No description found for parameter 'fe' drivers/media/dvb-frontends/sp887x.c:137: warning: No description found for parameter 'fw' drivers/media/dvb-frontends/sp887x.c:287: warning: No description found for parameter 'n' drivers/media/dvb-frontends/sp887x.c:287: warning: No description found for parameter 'd' drivers/media/dvb-frontends/sp887x.c:287: warning: No description found for parameter 'quotient_i' drivers/media/dvb-frontends/sp887x.c:287: warning: No description found for parameter 'quotient_f' drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c:83: warning: cannot understand function prototype: 'struct ttusb ' drivers/media/platform/sh_veu.c:277: warning: No description found for parameter 'priv' drivers/media/dvb-frontends/zl10036.c:33: warning: cannot understand function prototype: 'int zl10036_debug; ' drivers/media/dvb-frontends/zl10036.c:179: warning: No description found for parameter 'state' drivers/media/dvb-frontends/zl10036.c:179: warning: No description found for parameter 'frequency' drivers/media/platform/rcar_fdp1.c:1139: warning: No description found for parameter 'priv' drivers/media/platform/ti-vpe/vpe.c:933: warning: No description found for parameter 'priv' drivers/media/usb/gspca/ov519.c:36: warning: No description found for parameter 'fmt' drivers/media/usb/dvb-usb/dib0700_devices.c:3367: warning: No description found for parameter 'adap' Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/sp887x.c | 6 +++--- drivers/media/dvb-frontends/tua6100.c | 2 +- drivers/media/dvb-frontends/zl10036.c | 8 ++++---- drivers/media/i2c/ov5647.c | 4 ++-- drivers/media/pci/solo6x10/solo6x10-enc.c | 2 +- drivers/media/platform/rcar_fdp1.c | 2 +- drivers/media/platform/sh_veu.c | 2 +- drivers/media/platform/sti/hva/hva-h264.c | 18 +++++++++++++----- drivers/media/platform/ti-vpe/vpe.c | 2 +- drivers/media/platform/vim2m.c | 2 +- drivers/media/rc/st_rc.c | 6 +++--- drivers/media/rc/streamzap.c | 6 +++--- drivers/media/usb/dvb-usb/cinergyT2-fe.c | 2 +- drivers/media/usb/dvb-usb/dib0700_devices.c | 8 ++++---- drivers/media/usb/dvb-usb/friio-fe.c | 2 +- drivers/media/usb/dvb-usb/friio.c | 2 +- drivers/media/usb/gspca/ov519.c | 2 +- drivers/media/usb/pwc/pwc-dec23.c | 7 +++---- drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c | 6 +++--- 19 files changed, 48 insertions(+), 41 deletions(-) commit ed050c21801566db25a907798fb4e189589ca8c8 Author: Mauro Carvalho Chehab Date: Wed Nov 29 10:17:33 2017 -0500 media: lm3560: add a missing kernel-doc parameter Fix this warning: drivers/media/i2c/lm3560.c:69: warning: No description found for parameter 'dev' Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/lm3560.c | 1 + 1 file changed, 1 insertion(+) commit 538cf6437af951f84cc816d63aafeafc61eb40c1 Author: Mauro Carvalho Chehab Date: Wed Nov 29 10:15:53 2017 -0500 media: rcar_jpu: fix two kernel-doc markups On kernel-doc, struct declarations should be declared as "struct foo". Fix the following warnings: drivers/media/platform/rcar_jpu.c:265: warning: cannot understand function prototype: 'struct jpu_q_data ' drivers/media/platform/rcar_jpu.c:281: warning: cannot understand function prototype: 'struct jpu_ctx ' Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar_jpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2afe216d3d88b729c40d83abce5b2d4b72d289c5 Author: Mauro Carvalho Chehab Date: Wed Nov 29 10:11:04 2017 -0500 media: vsp1: add a missing kernel-doc parameter Fix this warning: drivers/media/platform/vsp1/vsp1_dl.c:87: warning: No description found for parameter 'has_chain' Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vsp1/vsp1_dl.c | 1 + 1 file changed, 1 insertion(+) commit bd98f7a16d3a7c98157585ef406b727982db18cf Author: Mauro Carvalho Chehab Date: Wed Nov 29 10:05:57 2017 -0500 media: soc_camera: fix a kernel-doc markup Remove this warning: drivers/media/platform/soc_camera/soc_scale_crop.c:309: warning: Cannot understand * @icd - soc-camera device on line 309 - I thought it was a doc line Signed-off-by: Mauro Carvalho Chehab Acked-by: Guennadi Liakhovetski drivers/media/platform/soc_camera/soc_scale_crop.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 69a52ad3196a98616c333194a2c1295a294e3b51 Author: Mauro Carvalho Chehab Date: Wed Nov 29 10:01:56 2017 -0500 media: mt2063: fix some kernel-doc warnings Fix those warnings: drivers/media/tuners/mt2063.c:1413: warning: No description found for parameter 'f_ref' drivers/media/tuners/mt2063.c:1413: warning: Excess function parameter 'f_Ref' description in 'MT2063_fLO_FractionalTerm' drivers/media/tuners/mt2063.c:1476: warning: Excess function parameter 'f_Avoid' description in 'MT2063_CalcLO2Mult' Signed-off-by: Mauro Carvalho Chehab drivers/media/tuners/mt2063.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 5bef1c0bd53abb80613f901c4ac50131d035604f Author: Mauro Carvalho Chehab Date: Wed Nov 29 10:00:58 2017 -0500 media: radio-wl1273: fix a parameter name at kernel-doc macro Solve those warnings: drivers/media/radio/radio-wl1273.c:1337: warning: No description found for parameter 'radio' drivers/media/radio/radio-wl1273.c:1337: warning: Excess function parameter 'core' description in 'wl1273_fm_set_tx_power' Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/radio-wl1273.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa7871255fe4bb63bb8f4f96f0584f5a07e0936d Author: Mauro Carvalho Chehab Date: Wed Nov 29 09:59:55 2017 -0500 media: s3c-camif: add missing description at s3c_camif_find_format() Fix this warning: drivers/media/platform/s3c-camif/camif-core.c:112: warning: No description found for parameter 'vp' Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s3c-camif/camif-core.c | 1 + 1 file changed, 1 insertion(+) commit 98156359596779d425ee14ff07ffc1735842bf9a Author: Mauro Carvalho Chehab Date: Wed Nov 29 09:58:09 2017 -0500 media: mtk-vpu: add description for wdt fields at struct mtk_vpu Fix those warnings: drivers/media/platform/mtk-vpu/mtk_vpu.c:223: warning: No description found for parameter 'wdt' drivers/media/platform/mtk-vpu/mtk_vpu.c:223: warning: No description found for parameter 'wdt_refcnt' Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vpu/mtk_vpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d714a755d5c48f21f1ffa32ac1fade65db93f34d Author: Mauro Carvalho Chehab Date: Wed Nov 29 09:36:39 2017 -0500 media: vdec: fix some kernel-doc warnings Fix those warnings: drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c:69: warning: No description found for parameter 'reserved' drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c:175: warning: Excess struct member 'dev' description in 'vdec_vp8_inst' Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c | 1 + drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit c5bb831854d7a710ca84cb9a120ac7b89b2f6d57 Author: Mauro Carvalho Chehab Date: Wed Nov 29 09:26:20 2017 -0500 media: tvp514x: fix kernel-doc parameters There are some struct fields that aren't documented, and some consts whose comments start with /**, but they aren't kernel-doc annotations. So, fix it: drivers/media/i2c/tvp514x.c:127: warning: No description found for parameter 'hdl' drivers/media/i2c/tvp514x.c:127: warning: No description found for parameter 'pad' drivers/media/i2c/tvp514x.c:127: warning: No description found for parameter 'format' drivers/media/i2c/tvp514x.c:127: warning: No description found for parameter 'int_seq' drivers/media/i2c/tvp514x.c:219: warning: cannot understand function prototype: 'const struct v4l2_fmtdesc tvp514x_fmt_list[] = ' drivers/media/i2c/tvp514x.c:235: warning: cannot understand function prototype: 'const struct tvp514x_std_info tvp514x_std_list[] = ' drivers/media/i2c/tvp514x.c:941: warning: No description found for parameter 'fmt' drivers/media/i2c/tvp514x.c:941: warning: Excess function parameter 'format' description in 'tvp514x_set_pad_format' drivers/media/i2c/tvp514x.c:1208: warning: cannot understand function prototype: 'const struct i2c_device_id tvp514x_id[] = ' Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tvp514x.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit b5a21f8a8555b03433f5b2aa65adfd996da469f5 Author: Mauro Carvalho Chehab Date: Wed Nov 29 09:10:03 2017 -0500 media: netup_unidvb: fix a bad kernel-doc markup There is a bad kernel-doc markup, producing the following warnings: drivers/media/pci/netup_unidvb/netup_unidvb_core.c:85: warning: bad line: Bits [0-7]: DMA packet size, 188 bytes drivers/media/pci/netup_unidvb/netup_unidvb_core.c:86: warning: bad line: Bits [16-23]: packets count in block, 128 packets drivers/media/pci/netup_unidvb/netup_unidvb_core.c:87: warning: bad line: Bits [24-31]: blocks count, 8 blocks drivers/media/pci/netup_unidvb/netup_unidvb_core.c:89: warning: bad line: For example, value of 375000000 equals to 3 sec Fix that, and use a list for the bits option, in order for it to be better format, if we add it to a driver's documentation file. Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 070250a1715cee2297de0d9e7e2cea58be999d37 Author: Mauro Carvalho Chehab Date: Wed Nov 29 08:44:41 2017 -0500 media: s5k6aa: describe some function parameters as warned: drivers/media/i2c/s5k6aa.c:429: warning: No description found for parameter 's5k6aa' drivers/media/i2c/s5k6aa.c:679: warning: No description found for parameter 's5k6aa' drivers/media/i2c/s5k6aa.c:733: warning: No description found for parameter 's5k6aa' drivers/media/i2c/s5k6aa.c:733: warning: No description found for parameter 'preset' drivers/media/i2c/s5k6aa.c:787: warning: No description found for parameter 'sd' Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/s5k6aa.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7cd183696ec67a6741cf7db45eb0bce14da60767 Author: Mauro Carvalho Chehab Date: Wed Nov 29 08:41:06 2017 -0500 media: s5k6a3: document some fields at struct s5k6a3 drivers/media/i2c/s5k6a3.c:68: warning: No description found for parameter 'clock' drivers/media/i2c/s5k6a3.c:68: warning: No description found for parameter 'clock_frequency' drivers/media/i2c/s5k6a3.c:68: warning: No description found for parameter 'power_count' Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/s5k6a3.c | 3 +++ 1 file changed, 3 insertions(+) commit d156f2935b6389ec3bd75c69c055c5ac84e14558 Author: Mauro Carvalho Chehab Date: Wed Nov 29 08:33:30 2017 -0500 media: radio-si476x: fix kernel-doc markups get rid of the following warnings: drivers/media/radio/radio-si476x.c:317: warning: No description found for parameter 'v4l2dev' drivers/media/radio/radio-si476x.c:317: warning: No description found for parameter 'ctrl_handler' drivers/media/radio/radio-si476x.c:317: warning: No description found for parameter 'debugfs' drivers/media/radio/radio-si476x.c:317: warning: No description found for parameter 'audmode' drivers/media/radio/radio-si476x.c:317: warning: Excess struct member 'kref' description in 'si476x_radio' drivers/media/radio/radio-si476x.c:317: warning: Excess struct member 'core_lock' description in 'si476x_radio' Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/radio-si476x.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 4521af781190848f4d7f499b9f946a8d86f6df4f Author: Mauro Carvalho Chehab Date: Wed Nov 29 08:19:13 2017 -0500 media: ix2505v: get rid of /** comments As warned: drivers/media/dvb-frontends/ix2505v.c:24: warning: cannot understand function prototype: 'int ix2505v_debug; ' drivers/media/dvb-frontends/ix2505v.c:59: warning: No description found for parameter 'state' drivers/media/dvb-frontends/ix2505v.c:128: warning: No description found for parameter 'fe' None of the comments there are kernel-doc. So, remove them with: perl -pi -e 's,\/\*\*,/*,g' drivers/media/dvb-frontends/ix2505v.c Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/ix2505v.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ef69f8d2ff09518657c3ecaf2db8408c16549829 Author: Mauro Carvalho Chehab Date: Wed Nov 29 06:03:52 2017 -0500 media: tw68: fix kernel-doc markups There are a few mistakes on the existing markups: drivers/media/pci/tw68/tw68-risc.c:32: warning: Cannot understand * @rp pointer to current risc program position on line 32 - I thought it was a doc line drivers/media/pci/tw68/tw68-risc.c:144: warning: No description found for parameter 'pci' drivers/media/pci/tw68/tw68-risc.c:144: warning: No description found for parameter 'buf' drivers/media/pci/tw68/tw68-risc.c:144: warning: No description found for parameter 'sglist' drivers/media/pci/tw68/tw68-risc.c:144: warning: No description found for parameter 'top_offset' drivers/media/pci/tw68/tw68-risc.c:144: warning: No description found for parameter 'bottom_offset' drivers/media/pci/tw68/tw68-risc.c:144: warning: No description found for parameter 'bpl' drivers/media/pci/tw68/tw68-risc.c:144: warning: No description found for parameter 'padding' drivers/media/pci/tw68/tw68-risc.c:144: warning: No description found for parameter 'lines' Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/tw68/tw68-risc.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 8fd87479251925dedd6c524bc592541fefde2332 Author: Mauro Carvalho Chehab Date: Wed Nov 29 06:00:09 2017 -0500 media: pxa_camera: get rid of kernel_doc warnings Get rid of the following warnings: drivers/media/platform/pxa_camera.c:247: warning: No description found for parameter 'layout' drivers/media/platform/pxa_camera.c:867: warning: No description found for parameter 'buf' drivers/media/platform/pxa_camera.c:867: warning: No description found for parameter 'sg' drivers/media/platform/pxa_camera.c:867: warning: No description found for parameter 'sglen' drivers/media/platform/pxa_camera.c:867: warning: Excess function parameter 'vb' description in 'pxa_init_dma_channel' drivers/media/platform/pxa_camera.c:867: warning: Excess function parameter 'dma' description in 'pxa_init_dma_channel' drivers/media/platform/pxa_camera.c:867: warning: Excess function parameter 'cibr' description in 'pxa_init_dma_channel' drivers/media/platform/pxa_camera.c:1029: warning: No description found for parameter 'last_submitted' drivers/media/platform/pxa_camera.c:1029: warning: No description found for parameter 'last_issued' Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/pxa_camera.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 9ec2b40259f91627bf852f7708a90357e0db1870 Author: Mauro Carvalho Chehab Date: Wed Nov 29 05:54:29 2017 -0500 media: sta2x11: document missing function parameters As warned: drivers/media/pci/sta2x11/sta2x11_vip.c:414: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:442: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:476: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:493: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:524: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:548: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:566: warning: No description found for parameter 'file' drivers/media/pci/sta2x11/sta2x11_vip.c:566: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:594: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:651: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:717: warning: No description found for parameter 'priv' Most of the above are for the unused priv argument. Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/sta2x11/sta2x11_vip.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 897aa67a47ac1379a479f42c4c84b828fe5f64a1 Author: Mauro Carvalho Chehab Date: Wed Nov 29 04:08:14 2017 -0500 media: m5mols: fix some kernel-doc markups Fix those warnings: drivers/media/i2c/m5mols/m5mols_capture.c:42: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_capture.c:42: warning: No description found for parameter 'addr_num' drivers/media/i2c/m5mols/m5mols_capture.c:42: warning: No description found for parameter 'addr_den' drivers/media/i2c/m5mols/m5mols_capture.c:42: warning: No description found for parameter 'val' drivers/media/i2c/m5mols/m5mols_capture.c:60: warning: No description found for parameter 'info' drivers/media/i2c/m5mols/m5mols_controls.c:134: warning: No description found for parameter 'info' drivers/media/i2c/m5mols/m5mols_core.c:124: warning: No description found for parameter 'data' drivers/media/i2c/m5mols/m5mols_core.c:124: warning: No description found for parameter 'length' drivers/media/i2c/m5mols/m5mols_core.c:124: warning: Excess function parameter 'size' description in 'm5mols_swap_byte' drivers/media/i2c/m5mols/m5mols_core.c:142: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:241: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:299: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:324: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:324: warning: No description found for parameter 'reg' drivers/media/i2c/m5mols/m5mols_core.c:357: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:357: warning: No description found for parameter 'mode' drivers/media/i2c/m5mols/m5mols_core.c:374: warning: No description found for parameter 'info' drivers/media/i2c/m5mols/m5mols_core.c:429: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:503: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:671: warning: No description found for parameter 'info' drivers/media/i2c/m5mols/m5mols_core.c:694: warning: No description found for parameter 'info' drivers/media/i2c/m5mols/m5mols_core.c:798: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:853: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:853: warning: No description found for parameter 'on' Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/m5mols/m5mols_capture.c | 5 +++++ drivers/media/i2c/m5mols/m5mols_controls.c | 1 + drivers/media/i2c/m5mols/m5mols_core.c | 20 ++++++++++++++++++-- 3 files changed, 24 insertions(+), 2 deletions(-) commit 3b060ba0eb9a0d435b562a6f7b3cc2844a2df941 Author: Mauro Carvalho Chehab Date: Wed Nov 29 04:32:51 2017 -0500 media: exynos4-is: fix kernel-doc warnings Fix those kernel-doc warnings: drivers/media/platform/exynos4-is/mipi-csis.c:229: warning: No description found for parameter 'clk_frequency' drivers/media/platform/exynos4-is/mipi-csis.c:229: warning: Excess struct member 'clock_frequency' description in 'csis_state' drivers/media/platform/exynos4-is/media-dev.c:69: warning: No description found for parameter 'p' drivers/media/platform/exynos4-is/media-dev.c:160: warning: No description found for parameter 'p' drivers/media/platform/exynos4-is/media-dev.c:160: warning: No description found for parameter 'on' drivers/media/platform/exynos4-is/media-dev.c:160: warning: Excess function parameter 'fimc' description in 'fimc_pipeline_s_power' drivers/media/platform/exynos4-is/media-dev.c:160: warning: Excess function parameter 'state' description in 'fimc_pipeline_s_power' drivers/media/platform/exynos4-is/media-dev.c:229: warning: No description found for parameter 'ep' drivers/media/platform/exynos4-is/media-dev.c:260: warning: No description found for parameter 'ep' drivers/media/platform/exynos4-is/media-dev.c:260: warning: Excess function parameter 'fimc' description in '__fimc_pipeline_close' drivers/media/platform/exynos4-is/media-dev.c:288: warning: No description found for parameter 'ep' drivers/media/platform/exynos4-is/media-dev.c:288: warning: Excess function parameter 'pipeline' description in '__fimc_pipeline_s_stream' drivers/media/platform/exynos4-is/media-dev.c:916: warning: No description found for parameter 'fmd' drivers/media/platform/exynos4-is/fimc-capture.c:155: warning: No description found for parameter 'ctx' drivers/media/platform/exynos4-is/fimc-capture.c:868: warning: No description found for parameter 'num_planes' drivers/media/platform/exynos4-is/fimc-capture.c:1108: warning: No description found for parameter 'fimc' Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos4-is/fimc-capture.c | 3 +++ drivers/media/platform/exynos4-is/media-dev.c | 11 +++++++---- drivers/media/platform/exynos4-is/mipi-csis.c | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) commit 440568f8508528278efb9b944e8856484bbc7edd Author: Mauro Carvalho Chehab Date: Wed Nov 29 04:22:37 2017 -0500 media: venc: don't use kernel-doc for undescribed enums There are no descriptions for some enums, with produces lots of warnings: drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_LUMA' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_LUMA2' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_LUMA3' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_CHROMA' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_CHROMA2' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_CHROMA3' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_MV_INFO' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_BS_HEADER' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_PROB_BUF' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_RC_INFO' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_RC_CODE' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_RC_CODE2' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_RC_CODE3' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_MAX' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_RC_INFO' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_RC_CODE' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_REC_LUMA' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_REC_CHROMA' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_REF_LUMA' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_REF_CHROMA' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_MV_INFO_1' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_MV_INFO_2' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_SKIP_FRAME' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_MAX' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:60: warning: Enum value 'H264_BS_MODE_SPS' not described in enum 'venc_h264_bs_mode' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:60: warning: Enum value 'H264_BS_MODE_PPS' not described in enum 'venc_h264_bs_mode' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:60: warning: Enum value 'H264_BS_MODE_FRAME' not described in enum 'venc_h264_bs_mode' Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c | 4 ++-- drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 389a455d61cbc796994332e6a87616c4d34200e2 Author: Mauro Carvalho Chehab Date: Wed Nov 29 04:20:45 2017 -0500 media: davinci: fix kernel-doc warnings There are several of kernel-doc warnings: drivers/media/platform/davinci/vpif_display.c:114: warning: No description found for parameter 'sizes' drivers/media/platform/davinci/vpif_display.c:165: warning: No description found for parameter 'vq' drivers/media/platform/davinci/vpif_display.c:165: warning: Excess function parameter 'vb' description in 'vpif_start_streaming' drivers/media/platform/davinci/vpif_display.c:780: warning: No description found for parameter 'vpif_cfg' drivers/media/platform/davinci/vpif_display.c:780: warning: No description found for parameter 'chan_cfg' drivers/media/platform/davinci/vpif_display.c:780: warning: No description found for parameter 'index' drivers/media/platform/davinci/vpif_display.c:813: warning: No description found for parameter 'vpif_cfg' drivers/media/platform/davinci/vpif_display.c:813: warning: No description found for parameter 'ch' drivers/media/platform/davinci/vpif_display.c:813: warning: No description found for parameter 'index' drivers/media/platform/davinci/vpif_capture.c:121: warning: No description found for parameter 'sizes' drivers/media/platform/davinci/vpif_capture.c:174: warning: No description found for parameter 'vq' drivers/media/platform/davinci/vpif_capture.c:174: warning: Excess function parameter 'vb' description in 'vpif_start_streaming' drivers/media/platform/davinci/vpif_capture.c:636: warning: No description found for parameter 'iface' drivers/media/platform/davinci/vpif_capture.c:647: warning: No description found for parameter 'ch' drivers/media/platform/davinci/vpif_capture.c:647: warning: No description found for parameter 'muxmode' drivers/media/platform/davinci/vpif_capture.c:676: warning: No description found for parameter 'vpif_cfg' drivers/media/platform/davinci/vpif_capture.c:676: warning: No description found for parameter 'chan_cfg' drivers/media/platform/davinci/vpif_capture.c:676: warning: No description found for parameter 'input_index' drivers/media/platform/davinci/vpif_capture.c:712: warning: No description found for parameter 'vpif_cfg' drivers/media/platform/davinci/vpif_capture.c:712: warning: No description found for parameter 'ch' drivers/media/platform/davinci/vpif_capture.c:712: warning: No description found for parameter 'index' drivers/media/platform/davinci/vpif_capture.c:798: warning: No description found for parameter 'std' drivers/media/platform/davinci/vpif_capture.c:798: warning: Excess function parameter 'std_id' description in 'vpif_g_std' drivers/media/platform/davinci/vpif_capture.c:940: warning: No description found for parameter 'fmt' drivers/media/platform/davinci/vpif_capture.c:940: warning: Excess function parameter 'index' description in 'vpif_enum_fmt_vid_cap' drivers/media/platform/davinci/vpif_capture.c:1750: warning: No description found for parameter 'dev' Fix them. Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpif_capture.c | 27 ++++++++++++++------------- drivers/media/platform/davinci/vpif_display.c | 16 ++++++++-------- 2 files changed, 22 insertions(+), 21 deletions(-) commit d28b2cf969b1e887450700191c22df8085574e9b Author: Mauro Carvalho Chehab Date: Wed Nov 29 03:56:18 2017 -0500 media: v4l2-core: Fix kernel-doc markups There are some troubles on kernel-doc markups, as warned: drivers/media/v4l2-core/v4l2-dv-timings.c:259: warning: No description found for parameter 't1' drivers/media/v4l2-core/v4l2-dv-timings.c:259: warning: No description found for parameter 't2' drivers/media/v4l2-core/v4l2-dv-timings.c:259: warning: No description found for parameter 'pclock_delta' drivers/media/v4l2-core/v4l2-dv-timings.c:259: warning: No description found for parameter 'match_reduced_fps' drivers/media/v4l2-core/tuner-core.c:242: warning: bad line: internal parameters, like LNA mode drivers/media/v4l2-core/tuner-core.c:765: warning: No description found for parameter 'mode' drivers/media/v4l2-core/videobuf2-memops.c:127: warning: cannot understand function prototype: 'const struct vm_operations_struct vb2_common_vm_ops = ' drivers/media/v4l2-core/v4l2-mem2mem.c:190: warning: No description found for parameter 'm2m_dev' drivers/media/v4l2-core/v4l2-mem2mem.c:291: warning: No description found for parameter 'm2m_ctx' drivers/media/v4l2-core/videobuf-core.c:233: warning: No description found for parameter 'q' Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/tuner-core.c | 4 +++- drivers/media/v4l2-core/v4l2-dv-timings.c | 10 +++++----- drivers/media/v4l2-core/v4l2-mem2mem.c | 2 ++ drivers/media/v4l2-core/videobuf-core.c | 2 +- drivers/media/v4l2-core/videobuf2-memops.c | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) commit 1855e9884cb410cdc4d2b1244420d8056db1c76b Author: Mauro Carvalho Chehab Date: Wed Nov 29 03:46:30 2017 -0500 media: rc: fix kernel-doc parameter names There are several parameters there that are named wrong, as reported by those warnings: drivers/media/rc/ir-sharp-decoder.c:47: warning: No description found for parameter 'ev' drivers/media/rc/ir-sharp-decoder.c:47: warning: Excess function parameter 'duration' description in 'ir_sharp_decode' drivers/media/rc/ir-sanyo-decoder.c:56: warning: No description found for parameter 'ev' drivers/media/rc/ir-sanyo-decoder.c:56: warning: Excess function parameter 'duration' description in 'ir_sanyo_decode' drivers/media/rc/ir-xmp-decoder.c:43: warning: No description found for parameter 'ev' drivers/media/rc/ir-xmp-decoder.c:43: warning: Excess function parameter 'duration' description in 'ir_xmp_decode' drivers/media/rc/ir-jvc-decoder.c:47: warning: No description found for parameter 'ev' drivers/media/rc/ir-jvc-decoder.c:47: warning: Excess function parameter 'duration' description in 'ir_jvc_decode' drivers/media/rc/ir-lirc-codec.c:34: warning: No description found for parameter 'dev' drivers/media/rc/ir-lirc-codec.c:34: warning: No description found for parameter 'ev' drivers/media/rc/ir-lirc-codec.c:34: warning: Excess function parameter 'input_dev' description in 'ir_lirc_decode' drivers/media/rc/ir-lirc-codec.c:34: warning: Excess function parameter 'duration' description in 'ir_lirc_decode' Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-jvc-decoder.c | 2 +- drivers/media/rc/ir-lirc-codec.c | 4 ++-- drivers/media/rc/ir-sanyo-decoder.c | 2 +- drivers/media/rc/ir-sharp-decoder.c | 2 +- drivers/media/rc/ir-xmp-decoder.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit d929fb4e16b9635dfefa95afe77462de68557af0 Author: Mauro Carvalho Chehab Date: Wed Nov 29 03:16:17 2017 -0500 media: atomisp: stop producing hundreds of kernel-doc warnings A recent change on Kernel 4.15-rc1 causes all tags with /** to be handled as kernel-doc markups. Well, several atomisp modules, it doesn't use kernel-doc, but some other documentation markup (doxygen?). So, suppress all those warns by: - replacing /**< by /**. - replacing /** by /*. The core changes were done with: for i in $(find drivers/staging/media/atomisp -type f); do sed 's,/\*\* ,/\*, ' -i $i; done for i in $(find drivers/staging/media/atomisp -type f); do sed 's,/\*\*<,/\**,' -i $i; done for i in drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c; do perl -ne 's,\/\*\*$,/*,g; print $_' $i > a && mv a $i; done; A few manual adjustments were made, where needed. Signed-off-by: Mauro Carvalho Chehab Acked-by: Sakari Ailus .../staging/media/atomisp/include/linux/atomisp.h | 34 +-- .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 2 +- .../atomisp/pci/atomisp2/atomisp_compat_css20.c | 2 +- .../atomisp/pci/atomisp2/atomisp_compat_ioctl32.h | 16 +- .../media/atomisp/pci/atomisp2/atomisp_subdev.h | 2 +- .../atomisp2/css2400/base/circbuf/src/circbuf.c | 26 +-- .../camera/pipe/interface/ia_css_pipe_binarydesc.h | 34 +-- .../camera/pipe/interface/ia_css_pipe_util.h | 2 +- .../css2400/camera/util/interface/ia_css_util.h | 18 +- .../css_2401_csi2p_system/host/csi_rx_private.h | 2 +- .../css_2401_csi2p_system/host/ibuf_ctrl_private.h | 4 +- .../css2400/css_2401_csi2p_system/host/isys_irq.c | 2 +- .../css_2401_csi2p_system/host/isys_irq_private.h | 4 +- .../host/isys_stream2mmio_private.h | 4 +- .../css_2401_csi2p_system/host/pixelgen_private.h | 2 +- .../css_2401_csi2p_system/isys_dma_global.h | 4 +- .../css_2401_csi2p_system/pixelgen_global.h | 2 +- .../css2400/css_2401_csi2p_system/system_global.h | 8 +- .../atomisp/pci/atomisp2/css2400/css_api_version.h | 2 +- .../css2400/hive_isp_css_common/host/gp_timer.c | 2 +- .../hive_isp_css_include/host/csi_rx_public.h | 4 +- .../hive_isp_css_include/host/ibuf_ctrl_public.h | 4 +- .../css2400/hive_isp_css_include/host/isp_op1w.h | 98 ++++---- .../css2400/hive_isp_css_include/host/isp_op2w.h | 78 +++---- .../host/isys_stream2mmio_public.h | 4 +- .../hive_isp_css_include/host/pixelgen_public.h | 4 +- .../hive_isp_css_include/host/ref_vector_func.h | 144 ++++++------ .../css2400/hive_isp_css_include/math_support.h | 2 +- .../css2400/hive_isp_css_include/string_support.h | 8 +- .../css2400/hive_isp_css_shared/host/tag.c | 4 +- .../media/atomisp/pci/atomisp2/css2400/ia_css.h | 2 +- .../media/atomisp/pci/atomisp2/css2400/ia_css_3a.h | 38 +-- .../pci/atomisp2/css2400/ia_css_acc_types.h | 216 ++++++++--------- .../atomisp/pci/atomisp2/css2400/ia_css_buffer.h | 32 +-- .../atomisp/pci/atomisp2/css2400/ia_css_control.h | 22 +- .../pci/atomisp2/css2400/ia_css_device_access.h | 2 +- .../atomisp/pci/atomisp2/css2400/ia_css_dvs.h | 52 ++--- .../atomisp/pci/atomisp2/css2400/ia_css_env.h | 40 ++-- .../atomisp/pci/atomisp2/css2400/ia_css_err.h | 18 +- .../pci/atomisp2/css2400/ia_css_event_public.h | 68 +++--- .../atomisp/pci/atomisp2/css2400/ia_css_firmware.h | 14 +- .../atomisp/pci/atomisp2/css2400/ia_css_frac.h | 10 +- .../pci/atomisp2/css2400/ia_css_frame_format.h | 62 ++--- .../pci/atomisp2/css2400/ia_css_frame_public.h | 120 +++++----- .../pci/atomisp2/css2400/ia_css_input_port.h | 32 +-- .../atomisp/pci/atomisp2/css2400/ia_css_irq.h | 112 ++++----- .../atomisp/pci/atomisp2/css2400/ia_css_metadata.h | 24 +- .../atomisp/pci/atomisp2/css2400/ia_css_mipi.h | 10 +- .../atomisp/pci/atomisp2/css2400/ia_css_mmu.h | 4 +- .../atomisp/pci/atomisp2/css2400/ia_css_morph.h | 6 +- .../pci/atomisp2/css2400/ia_css_pipe_public.h | 128 +++++----- .../atomisp/pci/atomisp2/css2400/ia_css_prbs.h | 12 +- .../pci/atomisp2/css2400/ia_css_properties.h | 6 +- .../atomisp/pci/atomisp2/css2400/ia_css_shading.h | 6 +- .../atomisp/pci/atomisp2/css2400/ia_css_stream.h | 4 +- .../pci/atomisp2/css2400/ia_css_stream_format.h | 90 +++---- .../pci/atomisp2/css2400/ia_css_stream_public.h | 148 ++++++------ .../atomisp/pci/atomisp2/css2400/ia_css_timer.h | 30 +-- .../atomisp/pci/atomisp2/css2400/ia_css_tpg.h | 8 +- .../atomisp/pci/atomisp2/css2400/ia_css_types.h | 258 ++++++++++----------- .../atomisp/pci/atomisp2/css2400/ia_css_version.h | 6 +- .../css2400/isp/kernels/aa/aa_2/ia_css_aa2_types.h | 6 +- .../isp/kernels/anr/anr_1.0/ia_css_anr_types.h | 6 +- .../isp/kernels/anr/anr_2/ia_css_anr2_types.h | 4 +- .../isp/kernels/anr/anr_2/ia_css_anr_param.h | 2 +- .../bayer_ls/bayer_ls_1.0/ia_css_bayer_ls_param.h | 2 +- .../css2400/isp/kernels/bh/bh_2/ia_css_bh_types.h | 4 +- .../css2400/isp/kernels/bnlm/ia_css_bnlm_types.h | 36 +-- .../isp/kernels/bnr/bnr2_2/ia_css_bnr2_2_types.h | 34 +-- .../isp/kernels/cnr/cnr_2/ia_css_cnr2_types.h | 20 +- .../conversion_1.0/ia_css_conversion_types.h | 8 +- .../isp/kernels/crop/crop_1.0/ia_css_crop_param.h | 2 +- .../isp/kernels/crop/crop_1.0/ia_css_crop_types.h | 2 +- .../isp/kernels/csc/csc_1.0/ia_css_csc_types.h | 8 +- .../isp/kernels/ctc/ctc2/ia_css_ctc2_param.h | 12 +- .../isp/kernels/ctc/ctc2/ia_css_ctc2_types.h | 10 +- .../isp/kernels/ctc/ctc_1.0/ia_css_ctc_types.h | 38 +-- .../isp/kernels/de/de_1.0/ia_css_de_types.h | 10 +- .../css2400/isp/kernels/de/de_2/ia_css_de2_types.h | 10 +- .../isp/kernels/dp/dp_1.0/ia_css_dp_types.h | 8 +- .../css2400/isp/kernels/dpc2/ia_css_dpc2_types.h | 6 +- .../isp/kernels/dvs/dvs_1.0/ia_css_dvs_param.h | 2 +- .../isp/kernels/dvs/dvs_1.0/ia_css_dvs_types.h | 2 +- .../isp/kernels/eed1_8/ia_css_eed1_8_types.h | 82 +++---- .../isp/kernels/fc/fc_1.0/ia_css_formats_types.h | 6 +- .../isp/kernels/fpn/fpn_1.0/ia_css_fpn_types.h | 14 +- .../isp/kernels/gc/gc_1.0/ia_css_gc_types.h | 32 +-- .../css2400/isp/kernels/gc/gc_2/ia_css_gc2_types.h | 14 +- .../css2400/isp/kernels/hdr/ia_css_hdr_types.h | 26 +-- .../ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.c | 2 +- .../yuv444_io_ls/ia_css_yuv444_io.host.c | 2 +- .../kernels/macc/macc1_5/ia_css_macc1_5_types.h | 16 +- .../isp/kernels/macc/macc_1.0/ia_css_macc_types.h | 12 +- .../css2400/isp/kernels/ob/ob2/ia_css_ob2_types.h | 12 +- .../isp/kernels/ob/ob_1.0/ia_css_ob_types.h | 26 +-- .../output/output_1.0/ia_css_output_param.h | 2 +- .../output/output_1.0/ia_css_output_types.h | 8 +- .../kernels/qplane/qplane_2/ia_css_qplane_types.h | 2 +- .../isp/kernels/raw/raw_1.0/ia_css_raw_types.h | 2 +- .../isp/kernels/ref/ref_1.0/ia_css_ref_param.h | 2 +- .../isp/kernels/ref/ref_1.0/ia_css_ref_types.h | 2 +- .../isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h | 98 ++++---- .../kernels/s3a_stat_ls/ia_css_s3a_stat_ls_param.h | 2 +- .../css2400/isp/kernels/sc/sc_1.0/ia_css_sc.host.h | 4 +- .../isp/kernels/sc/sc_1.0/ia_css_sc_types.h | 42 ++-- .../kernels/sdis/common/ia_css_sdis_common_types.h | 104 ++++----- .../isp/kernels/sdis/sdis_1.0/ia_css_sdis_types.h | 20 +- .../isp/kernels/sdis/sdis_2/ia_css_sdis2_types.h | 40 ++-- .../isp/kernels/tdf/tdf_1.0/ia_css_tdf_types.h | 38 +-- .../isp/kernels/tnr/tnr3/ia_css_tnr3_types.h | 26 +-- .../isp/kernels/tnr/tnr_1.0/ia_css_tnr_types.h | 10 +- .../isp/kernels/vf/vf_1.0/ia_css_vf_param.h | 4 +- .../isp/kernels/vf/vf_1.0/ia_css_vf_types.h | 4 +- .../isp/kernels/wb/wb_1.0/ia_css_wb_types.h | 14 +- .../isp/kernels/xnr/xnr_1.0/ia_css_xnr.host.c | 2 +- .../isp/kernels/xnr/xnr_1.0/ia_css_xnr_param.h | 2 +- .../isp/kernels/xnr/xnr_1.0/ia_css_xnr_types.h | 20 +- .../isp/kernels/xnr/xnr_3.0/ia_css_xnr3_types.h | 30 +-- .../isp/kernels/ynr/ynr_1.0/ia_css_ynr_types.h | 28 +-- .../isp/kernels/ynr/ynr_2/ia_css_ynr2_types.h | 40 ++-- .../yuv_ls/yuv_ls_1.0/ia_css_yuv_ls_param.h | 2 +- .../atomisp/pci/atomisp2/css2400/memory_realloc.c | 2 +- .../runtime/binary/interface/ia_css_binary.h | 2 +- .../atomisp2/css2400/runtime/binary/src/binary.c | 2 +- .../pci/atomisp2/css2400/runtime/bufq/src/bufq.c | 2 +- .../css2400/runtime/debug/interface/ia_css_debug.h | 30 +-- .../css2400/runtime/debug/src/ia_css_debug.c | 10 +- .../pci/atomisp2/css2400/runtime/event/src/event.c | 4 +- .../atomisp2/css2400/runtime/eventq/src/eventq.c | 2 +- .../css2400/runtime/frame/interface/ia_css_frame.h | 22 +- .../pci/atomisp2/css2400/runtime/frame/src/frame.c | 2 +- .../pci/atomisp2/css2400/runtime/ifmtr/src/ifmtr.c | 2 +- .../css2400/runtime/inputfifo/src/inputfifo.c | 2 +- .../isp_param/interface/ia_css_isp_param_types.h | 6 +- .../css2400/runtime/isp_param/src/isp_param.c | 2 +- .../css2400/runtime/isys/interface/ia_css_isys.h | 6 +- .../css2400/runtime/isys/src/csi_rx_rmgr.c | 2 +- .../css2400/runtime/isys/src/ibuf_ctrl_rmgr.c | 2 +- .../css2400/runtime/isys/src/isys_dma_rmgr.c | 2 +- .../atomisp2/css2400/runtime/isys/src/isys_init.c | 2 +- .../runtime/isys/src/isys_stream2mmio_rmgr.c | 2 +- .../pci/atomisp2/css2400/runtime/isys/src/rx.c | 2 +- .../css2400/runtime/isys/src/virtual_isys.c | 8 +- .../runtime/pipeline/interface/ia_css_pipeline.h | 28 +-- .../css2400/runtime/pipeline/src/pipeline.c | 8 +- .../css2400/runtime/queue/interface/ia_css_queue.h | 22 +- .../css2400/runtime/queue/src/queue_access.c | 2 +- .../pci/atomisp2/css2400/runtime/rmgr/src/rmgr.c | 4 +- .../atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c | 26 +-- .../runtime/spctrl/interface/ia_css_spctrl.h | 20 +- .../runtime/spctrl/interface/ia_css_spctrl_comm.h | 14 +- .../atomisp2/css2400/runtime/spctrl/src/spctrl.c | 4 +- .../pci/atomisp2/css2400/runtime/timer/src/timer.c | 2 +- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 68 +++--- .../atomisp/pci/atomisp2/css2400/sh_css_internal.h | 22 +- .../atomisp/pci/atomisp2/css2400/sh_css_legacy.h | 2 +- .../atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 4 +- .../atomisp/pci/atomisp2/css2400/sh_css_params.h | 4 +- .../media/atomisp/pci/atomisp2/css2400/sh_css_sp.c | 18 +- .../atomisp/pci/atomisp2/css2400/sh_css_struct.h | 2 +- 160 files changed, 1746 insertions(+), 1746 deletions(-) commit 43a3542870328601be02fcc9d27b09db467336ef Author: Takashi Iwai Date: Thu Nov 30 10:08:28 2017 +0100 ALSA: seq: Remove spurious WARN_ON() at timer check The use of snd_BUG_ON() in ALSA sequencer timer may lead to a spurious WARN_ON() when a slave timer is deployed as its backend and a corresponding master timer stops meanwhile. The symptom was triggered by syzkaller spontaneously. Since the NULL timer is valid there, rip off snd_BUG_ON(). Reported-by: syzbot Cc: Signed-off-by: Takashi Iwai sound/core/seq/seq_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd50fbb6bfdea5daa4ae4dd7b7082485ac44bdf5 Author: Joonas Lahtinen Date: Mon Nov 27 11:12:33 2017 +0200 drm/i915: Disable THP until we have a GPU read BW W/A We seem to be missing some W/A for 2M pages and are getting a hit on raw GPU read bandwidths (even 30%) even though the GPU write bandwidths improve (even 10%). For now, disable THP, which is our only practical source of 2M pages until we have a W/A for the issue. v2: - Be explicit that we talk about GPU bandwidths (Eero) - s/deny/never/ because that's why (Chris) Reported-by: Valtteri Rantala Fixes: b901bb89324a ("drm/i915/gemfs: enable THP") Signed-off-by: Joonas Lahtinen Cc: Matthew Auld Cc: Chris Wilson Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Valtteri Rantala Cc: Eero Tamminen Reviewed-by: Chris Wilson Reviewed-by: Matthew Auld Tested-by: Valtteri Rantala Link: https://patchwork.freedesktop.org/patch/msgid/20171127091233.7001-1-joonas.lahtinen@linux.intel.com (cherry picked from commit 9987da4b5dcfc8b94b702d4bb94b30955eb73c75) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gemfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4dbd6c03fbf88299c573d676838896c6e06aade2 Author: Andrey Gusakov Date: Tue Nov 7 19:56:24 2017 +0300 drm/bridge: tc358767: fix 1-lane behavior Use drm_dp_channel_eq_ok helper Acked-by: Philipp Zabel Signed-off-by: Andrey Gusakov Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-7-git-send-email-andrey.gusakov@cogentembedded.com drivers/gpu/drm/bridge/tc358767.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 9217c1abbc145a77d65c476cf2004a3df02104c7 Author: Andrey Gusakov Date: Tue Nov 7 19:56:23 2017 +0300 drm/bridge: tc358767: fix AUXDATAn registers access First four bytes should go to DP0_AUXWDATA0. Due to bug if len > 4 first four bytes was writen to DP0_AUXWDATA1 and all data get shifted by 4 bytes. Fix it. Acked-by: Philipp Zabel Signed-off-by: Andrey Gusakov Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-6-git-send-email-andrey.gusakov@cogentembedded.com drivers/gpu/drm/bridge/tc358767.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66d1c3b94d5d59e4325e61a78d520f92c043d645 Author: Andrey Gusakov Date: Tue Nov 7 19:56:22 2017 +0300 drm/bridge: tc358767: fix timing calculations Fields in HTIM01 and HTIM02 regs should be even. Recomended thresh_dly value is max_tu_symbol. Remove set of VPCTRL0.VSDELAY as it is related to DSI input interface. Currently driver supports only DPI. Acked-by: Philipp Zabel Signed-off-by: Andrey Gusakov Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-5-git-send-email-andrey.gusakov@cogentembedded.com drivers/gpu/drm/bridge/tc358767.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) commit f3b8adbe1911f66fd3cab1aaa74f0f66b7ceda25 Author: Andrey Gusakov Date: Tue Nov 7 19:56:21 2017 +0300 drm/bridge: tc358767: fix DP0_MISC register set Remove shift from TU_SIZE_RECOMMENDED define as it used to calculate max_tu_symbols. Acked-by: Philipp Zabel Signed-off-by: Andrey Gusakov Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-4-git-send-email-andrey.gusakov@cogentembedded.com drivers/gpu/drm/bridge/tc358767.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 99fc8e963a4c0203dba26a77cf737db6081bca14 Author: Andrey Gusakov Date: Tue Nov 7 19:56:20 2017 +0300 drm/bridge: tc358767: filter out too high modes Pixel clock limitation for DPI is 154 MHz. Do not accept modes with higher pixel clock rate. Reviewed-by: Andrzej Hajda Signed-off-by: Andrey Gusakov Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-3-git-send-email-andrey.gusakov@cogentembedded.com drivers/gpu/drm/bridge/tc358767.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cffd2b16c01c3431a7a7dd62e722af33490fc436 Author: Andrey Gusakov Date: Tue Nov 7 19:56:19 2017 +0300 drm/bridge: tc358767: do no fail on hi-res displays Do not fail data rates higher than 2.7 and more than 2 lanes. Try to fall back to 2.7Gbps and 2 lanes. Acked-by: Philipp Zabel Reviewed-by: Andrzej Hajda Signed-off-by: Andrey Gusakov Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-2-git-send-email-andrey.gusakov@cogentembedded.com drivers/gpu/drm/bridge/tc358767.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 4c83c071b7849ca3e8072284a8587669d8ba6a3d Author: Dmitry Torokhov Date: Thu Nov 16 16:09:29 2017 -0800 Input: elants_i2c - do not clobber interrupt trigger on x86 This is similar to commit a4b0a58bb142 ("Input: elan_i2c - do not clobber interrupt trigger on x86") On x86 we historically used falling edge interrupts in the driver because that's how first Chrome devices were configured. They also did not use ACPI to enumerate I2C devices (because back then there was no kernel support for that), so trigger was hard-coded in the driver. However the controller behavior is much more reliable if we use level triggers, and that is how we configured ARM devices, and how want to configure newer x86 devices as well. All newer x86 boxes have their I2C devices enumerated in ACPI. Let's see if platform code (ACPI, DT) described interrupt and specified particular trigger type, and if so, let's use it instead of always clobbering trigger with IRQF_TRIGGER_FALLING. We will still use this trigger type as a fallback if platform code left interrupt trigger unconfigured. Reviewed-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/elants_i2c.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit da8df83957b179e5edc1029f637e5b69eff44967 Author: Olof Johansson Date: Wed Nov 29 22:48:11 2017 -0800 Input: joystick/analog - riscv has get_cycles() Fixes: drivers/input/joystick/analog.c:176:2: warning: #warning Precise timer not defined for this architecture. [-Wcpp] Signed-off-by: Olof Johansson Signed-off-by: Dmitry Torokhov drivers/input/joystick/analog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dbb58bfd9ae6c885b2ca001a9a5ab8b881fb4ba9 Author: Eric Anholt Date: Tue Nov 14 11:16:47 2017 -0800 drm/bridge: Fix lvds-encoder since the panel_bridge rework. The panel_bridge bridge attaches to the panel's OF node, not the lvds-encoder's node. Put in a little no-op bridge of our own so that our consumers can still find a bridge where they expect. This also fixes an unintended unregistration and leak of the panel-bridge on module remove. Signed-off-by: Eric Anholt Fixes: 13dfc0540a57 ("drm/bridge: Refactor out the panel wrapper from the lvds-encoder bri dge.") Tested-by: Lothar Waßmann Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20171114191647.22207-1-eric@anholt.net drivers/gpu/drm/bridge/lvds-encoder.c | 48 ++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 7 deletions(-) commit ebe32c3e282a62974b190b9d514864fc0d56716e Author: Pierre-Hugues Husson Date: Sat Nov 25 21:18:44 2017 +0100 drm/bridge: synopsys/dw-hdmi: Enable cec clock Support the "cec" optional clock. The documentation already mentions "cec" optional clock and it is used by several boards, but currently the driver doesn't enable it, thus preventing cec from working on those boards. And even worse: a /dev/cecX device will appear for those boards, but it won't be functioning without configuring this clock. Changes: v4: - Change commit message to stress the importance of this patch v3: - Drop useless braces v2: - Separate ENOENT errors from others - Propagate other errors (especially -EPROBE_DEFER) Signed-off-by: Pierre-Hugues Husson Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20171125201844.11353-1-phh@phh.me drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 1b6fba458c0a2e8513071330972c4c587b7d28cc Author: Hans Verkuil Date: Tue Nov 21 09:17:43 2017 +0100 drm/bridge: adv7511/33: Fix adv7511_cec_init() failure handling If the device tree for a board did not specify a cec clock, then adv7511_cec_init would return an error, which would cause adv7511_probe() to fail and thus there is no HDMI output. There is no need to have adv7511_probe() fail if the CEC initialization fails, so just change adv7511_cec_init() to a void function. In addition, adv7511_cec_init() should just return silently if the cec clock isn't found and show a message for any other errors. An otherwise correct cleanup patch from Dan Carpenter turned this broken failure handling into a kernel Oops, so bisection points to commit 7af35b0addbc ("drm/kirin: Checking for IS_ERR() instead of NULL") rather than 3b1b975003e4 ("drm: adv7511/33: add HDMI CEC support"). Based on earlier patches from Arnd and John. Reported-by: Naresh Kamboju Cc: Xinliang Liu Cc: Dan Carpenter Cc: Sean Paul Cc: Archit Taneja Cc: John Stultz Link: https://bugs.linaro.org/show_bug.cgi?id=3345 Link: https://lkft.validation.linaro.org/scheduler/job/48017#L3551 Fixes: 7af35b0addbc ("drm/kirin: Checking for IS_ERR() instead of NULL") Fixes: 3b1b975003e4 ("drm: adv7511/33: add HDMI CEC support") Signed-off-by: Hans Verkuil Tested-by: Hans Verkuil Reviewed-by: Laurent Pinchart Tested-by: John Stultz Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/9097b2a4-b6b9-5fca-e039-0a17694b1143@xs4all.nl drivers/gpu/drm/bridge/adv7511/adv7511.h | 13 +++++++++-- drivers/gpu/drm/bridge/adv7511/adv7511_cec.c | 32 +++++++++++++++++++--------- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 17 ++++----------- 3 files changed, 37 insertions(+), 25 deletions(-) commit a0908a1b7d68706ee52ed4a039756e70c8e956e9 Merge: b915176 72639e6 Author: Linus Torvalds Date: Wed Nov 29 19:12:44 2017 -0800 Merge branch 'akpm' (patches from Andrew) Mergr misc fixes from Andrew Morton: "28 fixes" * emailed patches from Andrew Morton : (28 commits) fs/hugetlbfs/inode.c: change put_page/unlock_page order in hugetlbfs_fallocate() mm/hugetlb: fix NULL-pointer dereference on 5-level paging machine autofs: revert "autofs: fix AT_NO_AUTOMOUNT not being honored" autofs: revert "autofs: take more care to not update last_used on path walk" fs/fat/inode.c: fix sb_rdonly() change mm, memcg: fix mem_cgroup_swapout() for THPs mm: migrate: fix an incorrect call of prep_transhuge_page() kmemleak: add scheduling point to kmemleak_scan() scripts/bloat-o-meter: don't fail with division by 0 fs/mbcache.c: make count_objects() more robust Revert "mm/page-writeback.c: print a warning if the vm dirtiness settings are illogical" mm/madvise.c: fix madvise() infinite loop under special circumstances exec: avoid RLIMIT_STACK races with prlimit() IB/core: disable memory registration of filesystem-dax vmas v4l2: disable filesystem-dax mapping support mm: fail get_vaddr_frames() for filesystem-dax mappings mm: introduce get_user_pages_longterm device-dax: implement ->split() to catch invalid munmap attempts mm, hugetlbfs: introduce ->split() to vm_operations_struct scripts/faddr2line: extend usage on generic arch ... commit 72639e6df4128dfde8fee7638a35be7db8114000 Author: Nadav Amit Date: Wed Nov 29 16:11:33 2017 -0800 fs/hugetlbfs/inode.c: change put_page/unlock_page order in hugetlbfs_fallocate() hugetlfs_fallocate() currently performs put_page() before unlock_page(). This scenario opens a small time window, from the time the page is added to the page cache, until it is unlocked, in which the page might be removed from the page-cache by another core. If the page is removed during this time windows, it might cause a memory corruption, as the wrong page will be unlocked. It is arguable whether this scenario can happen in a real system, and there are several mitigating factors. The issue was found by code inspection (actually grep), and not by actually triggering the flow. Yet, since putting the page before unlocking is incorrect it should be fixed, if only to prevent future breakage or someone copy-pasting this code. Mike said: "I am of the opinion that this does not need to be sent to stable. Although the ordering is current code is incorrect, there is no way for this to be a problem with current locking. In addition, I verified that the perhaps bigger issue with sys_fadvise64(POSIX_FADV_DONTNEED) for hugetlbfs and other filesystems is addressed in 3a77d214807c ("mm: fadvise: avoid fadvise for fs without backing device")" Link: http://lkml.kernel.org/r/20170826191124.51642-1-namit@vmware.com Fixes: 70c3547e36f5c ("hugetlbfs: add hugetlbfs_fallocate()") Signed-off-by: Nadav Amit Reviewed-by: Mike Kravetz Acked-by: Michal Hocko Cc: Eric Biggers Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hugetlbfs/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f4f0a3d85b50a65a348e2b8635041d6b30f01deb Author: Kirill A. Shutemov Date: Wed Nov 29 16:11:30 2017 -0800 mm/hugetlb: fix NULL-pointer dereference on 5-level paging machine I made a mistake during converting hugetlb code to 5-level paging: in huge_pte_alloc() we have to use p4d_alloc(), not p4d_offset(). Otherwise it leads to crash -- NULL-pointer dereference in pud_alloc() if p4d table is not yet allocated. It only can happen in 5-level paging mode. In 4-level paging mode p4d_offset() always returns pgd, so we are fine. Link: http://lkml.kernel.org/r/20171122121921.64822-1-kirill.shutemov@linux.intel.com Fixes: c2febafc6773 ("mm: convert generic code to 5-level paging") Signed-off-by: Kirill A. Shutemov Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: [4.11+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5d38f049cee1e1c4a7ac55aa79d37d01ddcc3860 Author: Ian Kent Date: Wed Nov 29 16:11:26 2017 -0800 autofs: revert "autofs: fix AT_NO_AUTOMOUNT not being honored" Commit 42f461482178 ("autofs: fix AT_NO_AUTOMOUNT not being honored") allowed the fstatat(2) system call to properly honor the AT_NO_AUTOMOUNT flag but introduced a semantic change. In order to honor AT_NO_AUTOMOUNT a semantic change was made to the negative dentry case for stat family system calls in follow_automount(). This changed the unconditional triggering of an automount in this case to no longer be done and an error returned instead. This has caused more problems than I expected so reverting the change is needed. In a discussion with Neil Brown it was concluded that the automount(8) daemon can implement this change without kernel modifications. So that will be done instead and the autofs module documentation updated with a description of the problem and what needs to be done by module users for this specific case. Link: http://lkml.kernel.org/r/151174730120.6162.3848002191530283984.stgit@pluto.themaw.net Fixes: 42f4614821 ("autofs: fix AT_NO_AUTOMOUNT not being honored") Signed-off-by: Ian Kent Cc: Neil Brown Cc: Al Viro Cc: David Howells Cc: Colin Walters Cc: Ondrej Holy Cc: [4.11+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/namei.c | 15 +++------------ include/linux/fs.h | 3 ++- 2 files changed, 5 insertions(+), 13 deletions(-) commit 43694d4bf843ddd34519e8e9de983deefeada699 Author: Ian Kent Date: Wed Nov 29 16:11:23 2017 -0800 autofs: revert "autofs: take more care to not update last_used on path walk" While commit 092a53452bb7 ("autofs: take more care to not update last_used on path walk") helped (partially) resolve a problem where automounts were not expiring due to aggressive accesses from user space it has a side effect for very large environments. This change helps with the expire problem by making the expire more aggressive but, for very large environments, that means more mount requests from clients. When there are a lot of clients that can mean fairly significant server load increases. It turns out I put the last_used in this position to solve this very problem and failed to update my own thinking of the autofs expire policy. So the patch being reverted introduces a regression which should be fixed. Link: http://lkml.kernel.org/r/151174729420.6162.1832622523537052460.stgit@pluto.themaw.net Fixes: 092a53452b ("autofs: take more care to not update last_used on path walk") Signed-off-by: Ian Kent Reviewed-by: NeilBrown Cc: Al Viro Cc: [4.11+] Cc: Colin Walters Cc: David Howells Cc: Ondrej Holy Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/root.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit b6e8e12c0aeb5fbf1bf46c84d58cc93aedede385 Author: OGAWA Hirofumi Date: Wed Nov 29 16:11:19 2017 -0800 fs/fat/inode.c: fix sb_rdonly() change Commit bc98a42c1f7d ("VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb)") converted fat_remount():new_rdonly from a bool to an int. However fat_remount() depends upon the compiler's conversion of a non-zero integer into boolean `true'. Fix it by switching `new_rdonly' back into a bool. Link: http://lkml.kernel.org/r/87mv3d5x51.fsf@mail.parknet.co.jp Fixes: bc98a42c1f7d0f8 ("VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb)") Signed-off-by: OGAWA Hirofumi Cc: Joe Perches Cc: David Howells Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/fat/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d08afa149acfd00871484ada6dabc3880524cd1c Author: Shakeel Butt Date: Wed Nov 29 16:11:15 2017 -0800 mm, memcg: fix mem_cgroup_swapout() for THPs Commit d6810d730022 ("memcg, THP, swap: make mem_cgroup_swapout() support THP") changed mem_cgroup_swapout() to support transparent huge page (THP). However the patch missed one location which should be changed for correctly handling THPs. The resulting bug will cause the memory cgroups whose THPs were swapped out to become zombies on deletion. Link: http://lkml.kernel.org/r/20171128161941.20931-1-shakeelb@google.com Fixes: d6810d730022 ("memcg, THP, swap: make mem_cgroup_swapout() support THP") Signed-off-by: Shakeel Butt Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Huang Ying Cc: Vladimir Davydov Cc: Greg Thelen Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40a899ed16486455f964e46d1af31fd4fded21c1 Author: Zi Yan Date: Wed Nov 29 16:11:12 2017 -0800 mm: migrate: fix an incorrect call of prep_transhuge_page() In https://lkml.org/lkml/2017/11/20/411, Andrea reported that during memory hotplug/hot remove prep_transhuge_page() is called incorrectly on non-THP pages for migration, when THP is on but THP migration is not enabled. This leads to a bad state of target pages for migration. By inspecting the code, if called on a non-THP, prep_transhuge_page() will 1) change the value of the mapping of (page + 2), since it is used for THP deferred list; 2) change the lru value of (page + 1), since it is used for THP's dtor. Both can lead to data corruption of these two pages. Andrea said: "Pragmatically and from the point of view of the memory_hotplug subsys, the effect is a kernel crash when pages are being migrated during a memory hot remove offline and migration target pages are found in a bad state" This patch fixes it by only calling prep_transhuge_page() when we are certain that the target page is THP. Link: http://lkml.kernel.org/r/20171121021855.50525-1-zi.yan@sent.com Fixes: 8135d8926c08 ("mm: memory_hotplug: memory hotremove supports thp migration") Signed-off-by: Zi Yan Reported-by: Andrea Reale Cc: Naoya Horiguchi Cc: Michal Hocko Cc: "Jérôme Glisse" Cc: [4.14] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/migrate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bde5f6bc68db51128f875a756e9082a6c6ff7b4c Author: Yisheng Xie Date: Wed Nov 29 16:11:08 2017 -0800 kmemleak: add scheduling point to kmemleak_scan() kmemleak_scan() will scan struct page for each node and it can be really large and resulting in a soft lockup. We have seen a soft lockup when do scan while compile kernel: watchdog: BUG: soft lockup - CPU#53 stuck for 22s! [bash:10287] [...] Call Trace: kmemleak_scan+0x21a/0x4c0 kmemleak_write+0x312/0x350 full_proxy_write+0x5a/0xa0 __vfs_write+0x33/0x150 vfs_write+0xad/0x1a0 SyS_write+0x52/0xc0 do_syscall_64+0x61/0x1a0 entry_SYSCALL64_slow_path+0x25/0x25 Fix this by adding cond_resched every MAX_SCAN_SIZE. Link: http://lkml.kernel.org/r/1511439788-20099-1-git-send-email-xieyisheng1@huawei.com Signed-off-by: Yisheng Xie Suggested-by: Catalin Marinas Acked-by: Catalin Marinas Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kmemleak.c | 2 ++ 1 file changed, 2 insertions(+) commit edbddb83a15b4361d8c3bf00aabee85fd3ef4d80 Author: Andy Shevchenko Date: Wed Nov 29 16:11:05 2017 -0800 scripts/bloat-o-meter: don't fail with division by 0 Under some circumstances it's possible to get a divider 0 which crashes the script. Traceback (most recent call last): File "linux/scripts/bloat-o-meter", line 98, in print_result("Function", "tTdDbBrR", 2) File "linux/scripts/bloat-o-meter", line 87, in print_result (otot, ntot, (ntot - otot)*100.0/otot)) ZeroDivisionError: float division by zero Hide this by checking the divider first. Link: http://lkml.kernel.org/r/20171123171219.31453-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Alexey Dobriyan Cc: Vaneet Narang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/bloat-o-meter | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d5dabd633922ac5ee5bcc67748f7defb8b211469 Author: Jiang Biao Date: Wed Nov 29 16:11:01 2017 -0800 fs/mbcache.c: make count_objects() more robust When running ltp stress test for 7*24 hours, vmscan occasionally emits the following warning continuously: mb_cache_scan+0x0/0x3f0 negative objects to delete nr=-9232265467809300450 ... Tracing shows the freeable(mb_cache_count returns) is -1, which causes the continuous accumulation and overflow of total_scan. This patch makes sure that mb_cache_count() cannot return a negative value, which makes the mbcache shrinker more robust. Link: http://lkml.kernel.org/r/1511753419-52328-1-git-send-email-jiang.biao2@zte.com.cn Signed-off-by: Jiang Biao Cc: Al Viro Cc: Minchan Kim Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/mbcache.c | 3 +++ 1 file changed, 3 insertions(+) commit 90daf3062fc0f8f919d5496fe167bbd6016a6a63 Author: Michal Hocko Date: Wed Nov 29 16:10:58 2017 -0800 Revert "mm/page-writeback.c: print a warning if the vm dirtiness settings are illogical" This reverts commit 0f6d24f87856 ("mm/page-writeback.c: print a warning if the vm dirtiness settings are illogical") because it causes false positive warnings during OOM situations as noticed by Tetsuo Handa: Node 0 active_anon:3525940kB inactive_anon:8372kB active_file:216kB inactive_file:1872kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:2504kB dirty:52kB writeback:0kB shmem:8660kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 636928kB writeback_tmp:0kB unstable:0kB all_unreclaimable? yes Node 0 DMA free:14848kB min:284kB low:352kB high:420kB active_anon:992kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15988kB managed:15904kB mlocked:0kB kernel_stack:0kB pagetables:24kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB lowmem_reserve[]: 0 2687 3645 3645 Node 0 DMA32 free:53004kB min:49608kB low:62008kB high:74408kB active_anon:2712648kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129216kB managed:2773132kB mlocked:0kB kernel_stack:96kB pagetables:5096kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB lowmem_reserve[]: 0 0 958 958 Node 0 Normal free:17140kB min:17684kB low:22104kB high:26524kB active_anon:812300kB inactive_anon:8372kB active_file:1228kB inactive_file:1868kB unevictable:0kB writepending:52kB present:1048576kB managed:981224kB mlocked:0kB kernel_stack:3520kB pagetables:8552kB bounce:0kB free_pcp:120kB local_pcp:120kB free_cma:0kB lowmem_reserve[]: 0 0 0 0 [...] Out of memory: Kill process 8459 (a.out) score 999 or sacrifice child Killed process 8459 (a.out) total-vm:4180kB, anon-rss:88kB, file-rss:0kB, shmem-rss:0kB oom_reaper: reaped process 8459 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB vm direct limit must be set greater than background limit. The problem is that both thresh and bg_thresh will be 0 if available_memory is less than 4 pages when evaluating global_dirtyable_memory. While this might be worked around the whole point of the warning is dubious at best. We do rely on admins to do sensible things when changing tunable knobs. Dirty memory writeback knobs are not any special in that regards so revert the warning rather than adding more hacks to work this around. Debugged by Yafang Shao. Link: http://lkml.kernel.org/r/20171127091939.tahb77nznytcxw55@dhcp22.suse.cz Fixes: 0f6d24f87856 ("mm/page-writeback.c: print a warning if the vm dirtiness settings are illogical") Signed-off-by: Michal Hocko Reported-by: Tetsuo Handa Cc: Yafang Shao Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/sysctl/vm.txt | 7 ------- mm/page-writeback.c | 5 +---- 2 files changed, 1 insertion(+), 11 deletions(-) commit 6ea8d958a2c95a1d514015d4e29ba21a8c0a1a91 Author: chenjie Date: Wed Nov 29 16:10:54 2017 -0800 mm/madvise.c: fix madvise() infinite loop under special circumstances MADVISE_WILLNEED has always been a noop for DAX (formerly XIP) mappings. Unfortunately madvise_willneed() doesn't communicate this information properly to the generic madvise syscall implementation. The calling convention is quite subtle there. madvise_vma() is supposed to either return an error or update &prev otherwise the main loop will never advance to the next vma and it will keep looping for ever without a way to get out of the kernel. It seems this has been broken since introduction. Nobody has noticed because nobody seems to be using MADVISE_WILLNEED on these DAX mappings. [mhocko@suse.com: rewrite changelog] Link: http://lkml.kernel.org/r/20171127115318.911-1-guoxuenan@huawei.com Fixes: fe77ba6f4f97 ("[PATCH] xip: madvice/fadvice: execute in place") Signed-off-by: chenjie Signed-off-by: guoxuenan Acked-by: Michal Hocko Cc: Minchan Kim Cc: zhangyi (F) Cc: Miao Xie Cc: Mike Rapoport Cc: Shaohua Li Cc: Andrea Arcangeli Cc: Mel Gorman Cc: Kirill A. Shutemov Cc: David Rientjes Cc: Anshuman Khandual Cc: Rik van Riel Cc: Carsten Otte Cc: Dan Williams Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/madvise.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 04e35f4495dd560db30c25efca4eecae8ec8c375 Author: Kees Cook Date: Wed Nov 29 16:10:51 2017 -0800 exec: avoid RLIMIT_STACK races with prlimit() While the defense-in-depth RLIMIT_STACK limit on setuid processes was protected against races from other threads calling setrlimit(), I missed protecting it against races from external processes calling prlimit(). This adds locking around the change and makes sure that rlim_max is set too. Link: http://lkml.kernel.org/r/20171127193457.GA11348@beast Fixes: 64701dee4178e ("exec: Use sane stack rlimit under secureexec") Signed-off-by: Kees Cook Reported-by: Ben Hutchings Reported-by: Brad Spengler Acked-by: Serge Hallyn Cc: James Morris Cc: Andy Lutomirski Cc: Oleg Nesterov Cc: Jiri Slaby Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/exec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5f1d43de54164dcfb9bfa542fcc92c1e1a1b6c1d Author: Dan Williams Date: Wed Nov 29 16:10:47 2017 -0800 IB/core: disable memory registration of filesystem-dax vmas Until there is a solution to the dma-to-dax vs truncate problem it is not safe to allow RDMA to create long standing memory registrations against filesytem-dax vmas. Link: http://lkml.kernel.org/r/151068941011.7446.7766030590347262502.stgit@dwillia2-desk3.amr.corp.intel.com Fixes: 3565fce3a659 ("mm, x86: get_user_pages() for dax mappings") Signed-off-by: Dan Williams Reported-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Acked-by: Jason Gunthorpe Acked-by: Doug Ledford Cc: Sean Hefty Cc: Hal Rosenstock Cc: Jeff Moyer Cc: Ross Zwisler Cc: Inki Dae Cc: Jan Kara Cc: Joonyoung Shim Cc: Kyungmin Park Cc: Mauro Carvalho Chehab Cc: Mel Gorman Cc: Seung-Woo Kim Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/infiniband/core/umem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b70131de648c2b997d22f4653934438013f407a1 Author: Dan Williams Date: Wed Nov 29 16:10:43 2017 -0800 v4l2: disable filesystem-dax mapping support V4L2 memory registrations are incompatible with filesystem-dax that needs the ability to revoke dma access to a mapping at will, or otherwise allow the kernel to wait for completion of DMA. The filesystem-dax implementation breaks the traditional solution of truncate of active file backed mappings since there is no page-cache page we can orphan to sustain ongoing DMA. If v4l2 wants to support long lived DMA mappings it needs to arrange to hold a file lease or use some other mechanism so that the kernel can coordinate revoking DMA access when the filesystem needs to truncate mappings. Link: http://lkml.kernel.org/r/151068940499.7446.12846708245365671207.stgit@dwillia2-desk3.amr.corp.intel.com Fixes: 3565fce3a659 ("mm, x86: get_user_pages() for dax mappings") Signed-off-by: Dan Williams Reported-by: Jan Kara Reviewed-by: Jan Kara Cc: Mauro Carvalho Chehab Cc: Christoph Hellwig Cc: Doug Ledford Cc: Hal Rosenstock Cc: Inki Dae Cc: Jason Gunthorpe Cc: Jeff Moyer Cc: Joonyoung Shim Cc: Kyungmin Park Cc: Mel Gorman Cc: Ross Zwisler Cc: Sean Hefty Cc: Seung-Woo Kim Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/media/v4l2-core/videobuf-dma-sg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b7f0554a56f21fb3e636a627450a9add030889be Author: Dan Williams Date: Wed Nov 29 16:10:39 2017 -0800 mm: fail get_vaddr_frames() for filesystem-dax mappings Until there is a solution to the dma-to-dax vs truncate problem it is not safe to allow V4L2, Exynos, and other frame vector users to create long standing / irrevocable memory registrations against filesytem-dax vmas. [dan.j.williams@intel.com: add comment for vma_is_fsdax() check in get_vaddr_frames(), per Jan] Link: http://lkml.kernel.org/r/151197874035.26211.4061781453123083667.stgit@dwillia2-desk3.amr.corp.intel.com Link: http://lkml.kernel.org/r/151068939985.7446.15684639617389154187.stgit@dwillia2-desk3.amr.corp.intel.com Fixes: 3565fce3a659 ("mm, x86: get_user_pages() for dax mappings") Signed-off-by: Dan Williams Reviewed-by: Jan Kara Cc: Inki Dae Cc: Seung-Woo Kim Cc: Joonyoung Shim Cc: Kyungmin Park Cc: Mauro Carvalho Chehab Cc: Mel Gorman Cc: Vlastimil Babka Cc: Christoph Hellwig Cc: Doug Ledford Cc: Hal Rosenstock Cc: Jason Gunthorpe Cc: Jeff Moyer Cc: Ross Zwisler Cc: Sean Hefty Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/frame_vector.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 2bb6d2837083de722bfdc369cb0d76ce188dd9b4 Author: Dan Williams Date: Wed Nov 29 16:10:35 2017 -0800 mm: introduce get_user_pages_longterm Patch series "introduce get_user_pages_longterm()", v2. Here is a new get_user_pages api for cases where a driver intends to keep an elevated page count indefinitely. This is distinct from usages like iov_iter_get_pages where the elevated page counts are transient. The iov_iter_get_pages cases immediately turn around and submit the pages to a device driver which will put_page when the i/o operation completes (under kernel control). In the longterm case userspace is responsible for dropping the page reference at some undefined point in the future. This is untenable for filesystem-dax case where the filesystem is in control of the lifetime of the block / page and needs reasonable limits on how long it can wait for pages in a mapping to become idle. Fixing filesystems to actually wait for dax pages to be idle before blocks from a truncate/hole-punch operation are repurposed is saved for a later patch series. Also, allowing longterm registration of dax mappings is a future patch series that introduces a "map with lease" semantic where the kernel can revoke a lease and force userspace to drop its page references. I have also tagged these for -stable to purposely break cases that might assume that longterm memory registrations for filesystem-dax mappings were supported by the kernel. The behavior regression this policy change implies is one of the reasons we maintain the "dax enabled. Warning: EXPERIMENTAL, use at your own risk" notification when mounting a filesystem in dax mode. It is worth noting the device-dax interface does not suffer the same constraints since it does not support file space management operations like hole-punch. This patch (of 4): Until there is a solution to the dma-to-dax vs truncate problem it is not safe to allow long standing memory registrations against filesytem-dax vmas. Device-dax vmas do not have this problem and are explicitly allowed. This is temporary until a "memory registration with layout-lease" mechanism can be implemented for the affected sub-systems (RDMA and V4L2). [akpm@linux-foundation.org: use kcalloc()] Link: http://lkml.kernel.org/r/151068939435.7446.13560129395419350737.stgit@dwillia2-desk3.amr.corp.intel.com Fixes: 3565fce3a659 ("mm, x86: get_user_pages() for dax mappings") Signed-off-by: Dan Williams Suggested-by: Christoph Hellwig Cc: Doug Ledford Cc: Hal Rosenstock Cc: Inki Dae Cc: Jan Kara Cc: Jason Gunthorpe Cc: Jeff Moyer Cc: Joonyoung Shim Cc: Kyungmin Park Cc: Mauro Carvalho Chehab Cc: Mel Gorman Cc: Ross Zwisler Cc: Sean Hefty Cc: Seung-Woo Kim Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/fs.h | 14 ++++++++++++ include/linux/mm.h | 13 +++++++++++ mm/gup.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) commit 9702cffdbf2129516db679e4467db81e1cd287da Author: Dan Williams Date: Wed Nov 29 16:10:32 2017 -0800 device-dax: implement ->split() to catch invalid munmap attempts Similar to how device-dax enforces that the 'address', 'offset', and 'len' parameters to mmap() be aligned to the device's fundamental alignment, the same constraints apply to munmap(). Implement ->split() to fail munmap calls that violate the alignment constraint. Otherwise, we later fail VM_BUG_ON checks in the unmap_page_range() path with crash signatures of the form: vma ffff8800b60c8a88 start 00007f88c0000000 end 00007f88c0e00000 next (null) prev (null) mm ffff8800b61150c0 prot 8000000000000027 anon_vma (null) vm_ops ffffffffa0091240 pgoff 0 file ffff8800b638ef80 private_data (null) flags: 0x380000fb(read|write|shared|mayread|maywrite|mayexec|mayshare|softdirty|mixedmap|hugepage) ------------[ cut here ]------------ kernel BUG at mm/huge_memory.c:2014! [..] RIP: 0010:__split_huge_pud+0x12a/0x180 [..] Call Trace: unmap_page_range+0x245/0xa40 ? __vma_adjust+0x301/0x990 unmap_vmas+0x4c/0xa0 unmap_region+0xae/0x120 ? __vma_rb_erase+0x11a/0x230 do_munmap+0x276/0x410 vm_munmap+0x6a/0xa0 SyS_munmap+0x1d/0x30 Link: http://lkml.kernel.org/r/151130418681.4029.7118245855057952010.stgit@dwillia2-desk3.amr.corp.intel.com Fixes: dee410792419 ("/dev/dax, core: file operations and dax-mmap") Signed-off-by: Dan Williams Reported-by: Jeff Moyer Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/dax/device.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 31383c6865a578834dd953d9dbc88e6b19fe3997 Author: Dan Williams Date: Wed Nov 29 16:10:28 2017 -0800 mm, hugetlbfs: introduce ->split() to vm_operations_struct Patch series "device-dax: fix unaligned munmap handling" When device-dax is operating in huge-page mode we want it to behave like hugetlbfs and fail attempts to split vmas into unaligned ranges. It would be messy to teach the munmap path about device-dax alignment constraints in the same (hstate) way that hugetlbfs communicates this constraint. Instead, these patches introduce a new ->split() vm operation. This patch (of 2): The device-dax interface has similar constraints as hugetlbfs in that it requires the munmap path to unmap in huge page aligned units. Rather than add more custom vma handling code in __split_vma() introduce a new vm operation to perform this vma specific check. Link: http://lkml.kernel.org/r/151130418135.4029.6783191281930729710.stgit@dwillia2-desk3.amr.corp.intel.com Fixes: dee410792419 ("/dev/dax, core: file operations and dax-mmap") Signed-off-by: Dan Williams Cc: Jeff Moyer Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 1 + mm/hugetlb.c | 8 ++++++++ mm/mmap.c | 8 +++++--- 3 files changed, 14 insertions(+), 3 deletions(-) commit 95a87982541932503d3f59aba4c30b0bde0a6294 Author: Liu, Changcheng Date: Wed Nov 29 16:10:25 2017 -0800 scripts/faddr2line: extend usage on generic arch When cross-compiling, fadd2line should use the binary tool used for the target system, rather than that of the host. Link: http://lkml.kernel.org/r/20171121092911.GA150711@sofia Signed-off-by: Liu Changcheng Cc: Kate Stewart Cc: NeilBrown Cc: Thomas Gleixner Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/faddr2line | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 5c9d2d5c269c498aa9a546e8d2158a3e4142a1a2 Author: Dan Williams Date: Wed Nov 29 16:10:21 2017 -0800 mm: replace pte_write with pte_access_permitted in fault + gup paths The 'access_permitted' helper is used in the gup-fast path and goes beyond the simple _PAGE_RW check to also: - validate that the mapping is writable from a protection keys standpoint - validate that the pte has _PAGE_USER set since all fault paths where pte_write is must be referencing user-memory. Link: http://lkml.kernel.org/r/151043111604.2842.8051684481794973100.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Cc: Dave Hansen Cc: Kirill A. Shutemov Cc: "Jérôme Glisse" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/gup.c | 2 +- mm/hmm.c | 4 ++-- mm/memory.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit c7da82b894e9eef60a04a15f065a8502341bf13b Author: Dan Williams Date: Wed Nov 29 16:10:18 2017 -0800 mm: replace pmd_write with pmd_access_permitted in fault + gup paths The 'access_permitted' helper is used in the gup-fast path and goes beyond the simple _PAGE_RW check to also: - validate that the mapping is writable from a protection keys standpoint - validate that the pte has _PAGE_USER set since all fault paths where pmd_write is must be referencing user-memory. Link: http://lkml.kernel.org/r/151043111049.2842.15241454964150083466.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Cc: Dave Hansen Cc: Kirill A. Shutemov Cc: "Jérôme Glisse" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sparc/mm/gup.c | 2 +- fs/dax.c | 3 ++- mm/hmm.c | 4 ++-- mm/huge_memory.c | 4 ++-- mm/memory.c | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) commit e7fe7b5cae90cf85bb6fed5ec5d4c5cf311a4fe9 Author: Dan Williams Date: Wed Nov 29 16:10:14 2017 -0800 mm: replace pud_write with pud_access_permitted in fault + gup paths The 'access_permitted' helper is used in the gup-fast path and goes beyond the simple _PAGE_RW check to also: - validate that the mapping is writable from a protection keys standpoint - validate that the pte has _PAGE_USER set since all fault paths where pud_write is must be referencing user-memory. [dan.j.williams@intel.com: fix powerpc compile error] Link: http://lkml.kernel.org/r/151129127237.37405.16073414520854722485.stgit@dwillia2-desk3.amr.corp.intel.com Link: http://lkml.kernel.org/r/151043110453.2842.2166049702068628177.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Cc: Dave Hansen Cc: "David S. Miller" Cc: Kirill A. Shutemov Cc: Martin Schwidefsky Cc: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/include/asm/pgtable.h | 6 ++++++ arch/sparc/mm/gup.c | 2 +- mm/huge_memory.c | 2 +- mm/memory.c | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) commit e4e40e0263ea6a3bfefbfd15d1b6ff5c03f2b95e Author: Dan Williams Date: Wed Nov 29 16:10:10 2017 -0800 mm: switch to 'define pmd_write' instead of __HAVE_ARCH_PMD_WRITE In response to compile breakage introduced by a series that added the pud_write helper to x86, Stephen notes: did you consider using the other paradigm: In arch include files: #define pud_write pud_write static inline int pud_write(pud_t pud) ..... Then in include/asm-generic/pgtable.h: #ifndef pud_write tatic inline int pud_write(pud_t pud) { .... } #endif If you had, then the powerpc code would have worked ... ;-) and many of the other interfaces in include/asm-generic/pgtable.h are protected that way ... Given that some architecture already define pmd_write() as a macro, it's a net reduction to drop the definition of __HAVE_ARCH_PMD_WRITE. Link: http://lkml.kernel.org/r/151129126721.37405.13339850900081557813.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Suggested-by: Stephen Rothwell Cc: Benjamin Herrenschmidt Cc: "Aneesh Kumar K.V" Cc: Oliver OHalloran Cc: Chris Metcalf Cc: Russell King Cc: Ralf Baechle Cc: "H. Peter Anvin" Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/pgtable-3level.h | 1 - arch/arm64/include/asm/pgtable.h | 1 - arch/mips/include/asm/pgtable.h | 2 +- arch/powerpc/include/asm/book3s/64/pgtable.h | 1 - arch/s390/include/asm/pgtable.h | 2 +- arch/sparc/include/asm/pgtable_64.h | 2 +- arch/tile/include/asm/pgtable.h | 1 - arch/x86/include/asm/pgtable.h | 2 +- include/asm-generic/pgtable.h | 4 ++-- 9 files changed, 6 insertions(+), 10 deletions(-) commit 1501899a898dfb5477c55534bdfd734c046da06d Author: Dan Williams Date: Wed Nov 29 16:10:06 2017 -0800 mm: fix device-dax pud write-faults triggered by get_user_pages() Currently only get_user_pages_fast() can safely handle the writable gup case due to its use of pud_access_permitted() to check whether the pud entry is writable. In the gup slow path pud_write() is used instead of pud_access_permitted() and to date it has been unimplemented, just calls BUG_ON(). kernel BUG at ./include/linux/hugetlb.h:244! [..] RIP: 0010:follow_devmap_pud+0x482/0x490 [..] Call Trace: follow_page_mask+0x28c/0x6e0 __get_user_pages+0xe4/0x6c0 get_user_pages_unlocked+0x130/0x1b0 get_user_pages_fast+0x89/0xb0 iov_iter_get_pages_alloc+0x114/0x4a0 nfs_direct_read_schedule_iovec+0xd2/0x350 ? nfs_start_io_direct+0x63/0x70 nfs_file_direct_read+0x1e0/0x250 nfs_file_read+0x90/0xc0 For now this just implements a simple check for the _PAGE_RW bit similar to pmd_write. However, this implies that the gup-slow-path check is missing the extra checks that the gup-fast-path performs with pud_access_permitted. Later patches will align all checks to use the 'access_permitted' helper if the architecture provides it. Note that the generic 'access_permitted' helper fallback is the simple _PAGE_RW check on architectures that do not define the 'access_permitted' helper(s). [dan.j.williams@intel.com: fix powerpc compile error] Link: http://lkml.kernel.org/r/151129126165.37405.16031785266675461397.stgit@dwillia2-desk3.amr.corp.intel.com Link: http://lkml.kernel.org/r/151043109938.2842.14834662818213616199.stgit@dwillia2-desk3.amr.corp.intel.com Fixes: a00cc7d9dd93 ("mm, x86: add support for PUD-sized transparent hugepages") Signed-off-by: Dan Williams Reported-by: Stephen Rothwell Acked-by: Thomas Gleixner [x86] Cc: Kirill A. Shutemov Cc: Catalin Marinas Cc: "David S. Miller" Cc: Dave Hansen Cc: Will Deacon Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Arnd Bergmann Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pgtable.h | 6 ++++++ include/asm-generic/pgtable.h | 8 ++++++++ include/linux/hugetlb.h | 8 -------- 3 files changed, 14 insertions(+), 8 deletions(-) commit 63cd448908b5eb51d84c52f02b31b9b4ccd1cb5a Author: Mike Kravetz Date: Wed Nov 29 16:10:01 2017 -0800 mm/cma: fix alloc_contig_range ret code/potential leak If the call __alloc_contig_migrate_range() in alloc_contig_range returns -EBUSY, processing continues so that test_pages_isolated() is called where there is a tracepoint to identify the busy pages. However, it is possible for busy pages to become available between the calls to these two routines. In this case, the range of pages may be allocated. Unfortunately, the original return code (ret == -EBUSY) is still set and returned to the caller. Therefore, the caller believes the pages were not allocated and they are leaked. Update the comment to indicate that allocation is still possible even if __alloc_contig_migrate_range returns -EBUSY. Also, clear return code in this case so that it is not accidentally used or returned to caller. Link: http://lkml.kernel.org/r/20171122185214.25285-1-mike.kravetz@oracle.com Fixes: 8ef5849fa8a2 ("mm/cma: always check which page caused allocation failure") Signed-off-by: Mike Kravetz Acked-by: Vlastimil Babka Acked-by: Michal Hocko Acked-by: Johannes Weiner Acked-by: Joonsoo Kim Cc: Michal Nazarewicz Cc: Laura Abbott Cc: Michal Hocko Cc: Mel Gorman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 687cb0884a714ff484d038e9190edc874edcf146 Author: Wang Nan Date: Wed Nov 29 16:09:58 2017 -0800 mm, oom_reaper: gather each vma to prevent leaking TLB entry tlb_gather_mmu(&tlb, mm, 0, -1) means gathering the whole virtual memory space. In this case, tlb->fullmm is true. Some archs like arm64 doesn't flush TLB when tlb->fullmm is true: commit 5a7862e83000 ("arm64: tlbflush: avoid flushing when fullmm == 1"). Which causes leaking of tlb entries. Will clarifies his patch: "Basically, we tag each address space with an ASID (PCID on x86) which is resident in the TLB. This means we can elide TLB invalidation when pulling down a full mm because we won't ever assign that ASID to another mm without doing TLB invalidation elsewhere (which actually just nukes the whole TLB). I think that means that we could potentially not fault on a kernel uaccess, because we could hit in the TLB" There could be a window between complete_signal() sending IPI to other cores and all threads sharing this mm are really kicked off from cores. In this window, the oom reaper may calls tlb_flush_mmu_tlbonly() to flush TLB then frees pages. However, due to the above problem, the TLB entries are not really flushed on arm64. Other threads are possible to access these pages through TLB entries. Moreover, a copy_to_user() can also write to these pages without generating page fault, causes use-after-free bugs. This patch gathers each vma instead of gathering full vm space. In this case tlb->fullmm is not true. The behavior of oom reaper become similar to munmapping before do_exit, which should be safe for all archs. Link: http://lkml.kernel.org/r/20171107095453.179940-1-wangnan0@huawei.com Fixes: aac453635549 ("mm, oom: introduce oom reaper") Signed-off-by: Wang Nan Acked-by: Michal Hocko Acked-by: David Rientjes Cc: Minchan Kim Cc: Will Deacon Cc: Bob Liu Cc: Ingo Molnar Cc: Roman Gushchin Cc: Konstantin Khlebnikov Cc: Andrea Arcangeli Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 4b81cb2ff69c8a8e297a147d2eb4d9b5e8d7c435 Author: Michal Hocko Date: Wed Nov 29 16:09:54 2017 -0800 mm, memory_hotplug: do not back off draining pcp free pages from kworker context drain_all_pages backs off when called from a kworker context since commit 0ccce3b92421 ("mm, page_alloc: drain per-cpu pages from workqueue context") because the original IPI based pcp draining has been replaced by a WQ based one and the check wanted to prevent from recursion and inter workers dependencies. This has made some sense at the time because the system WQ has been used and one worker holding the lock could be blocked while waiting for new workers to emerge which can be a problem under OOM conditions. Since then commit ce612879ddc7 ("mm: move pcp and lru-pcp draining into single wq") has moved draining to a dedicated (mm_percpu_wq) WQ with a rescuer so we shouldn't depend on any other WQ activity to make a forward progress so calling drain_all_pages from a worker context is safe as long as this doesn't happen from mm_percpu_wq itself which is not the case because all workers are required to _not_ depend on any MM locks. Why is this a problem in the first place? ACPI driven memory hot-remove (acpi_device_hotplug) is executed from the worker context. We end up calling __offline_pages to free all the pages and that requires both lru_add_drain_all_cpuslocked and drain_all_pages to do their job otherwise we can have dangling pages on pcp lists and fail the offline operation (__test_page_isolated_in_pageblock would see a page with 0 ref count but without PageBuddy set). Fix the issue by removing the worker check in drain_all_pages. lru_add_drain_all_cpuslocked doesn't have this restriction so it works as expected. Link: http://lkml.kernel.org/r/20170828093341.26341-1-mhocko@kernel.org Fixes: 0ccce3b924212 ("mm, page_alloc: drain per-cpu pages from workqueue context") Signed-off-by: Michal Hocko Cc: Mel Gorman Cc: Tejun Heo Cc: [4.11+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 4 ---- 1 file changed, 4 deletions(-) commit 23721a755f98ac846897a013c92cccb281c1bcc8 Author: Xie XiuQi Date: Thu Nov 30 09:41:29 2017 +0800 trace/xdp: fix compile warning: 'struct bpf_map' declared inside parameter list We meet this compile warning, which caused by missing bpf.h in xdp.h. In file included from ./include/trace/events/xdp.h:10:0, from ./include/linux/bpf_trace.h:6, from drivers/net/ethernet/intel/i40e/i40e_txrx.c:29: ./include/trace/events/xdp.h:93:17: warning: ‘struct bpf_map’ declared inside parameter list will not be visible outside of this definition or declaration const struct bpf_map *map, u32 map_index), ^ ./include/linux/tracepoint.h:187:34: note: in definition of macro ‘__DECLARE_TRACE’ static inline void trace_##name(proto) \ ^~~~~ ./include/linux/tracepoint.h:352:24: note: in expansion of macro ‘PARAMS’ __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \ ^~~~~~ ./include/linux/tracepoint.h:477:2: note: in expansion of macro ‘DECLARE_TRACE’ DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) ^~~~~~~~~~~~~ ./include/linux/tracepoint.h:477:22: note: in expansion of macro ‘PARAMS’ DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) ^~~~~~ ./include/trace/events/xdp.h:89:1: note: in expansion of macro ‘DEFINE_EVENT’ DEFINE_EVENT(xdp_redirect_template, xdp_redirect, ^~~~~~~~~~~~ ./include/trace/events/xdp.h:90:2: note: in expansion of macro ‘TP_PROTO’ TP_PROTO(const struct net_device *dev, ^~~~~~~~ ./include/trace/events/xdp.h:93:17: warning: ‘struct bpf_map’ declared inside parameter list will not be visible outside of this definition or declaration const struct bpf_map *map, u32 map_index), ^ ./include/linux/tracepoint.h:203:38: note: in definition of macro ‘__DECLARE_TRACE’ register_trace_##name(void (*probe)(data_proto), void *data) \ ^~~~~~~~~~ ./include/linux/tracepoint.h:354:4: note: in expansion of macro ‘PARAMS’ PARAMS(void *__data, proto), \ ^~~~~~ Reported-by: Huang Daode Cc: Hanjun Guo Fixes: 8d3b778ff544 ("xdp: tracepoint xdp_redirect also need a map argument") Signed-off-by: Xie XiuQi Acked-by: Jesper Dangaard Brouer Acked-by: Steven Rostedt (VMware) Signed-off-by: Daniel Borkmann include/trace/events/xdp.h | 1 + 1 file changed, 1 insertion(+) commit d775a418ac45fc2eb3eec1a4897e23e915eb4b3c Merge: a39e17b ad3cda0 Author: Daniel Borkmann Date: Thu Nov 30 02:09:30 2017 +0100 Merge branch 'bpftool-misc-fixes' Quentin Monnet says: ==================== First commit in this series fixes a crash that occurs when incorrect arguments are passed to bpftool after the `--json` option. It comes from the usage() function trying to use the JSON writer, although the latter has not been created yet at that point. Other patches add destruction of the writer in case the program exits in usage(), fix error messages handling when an unrecognized option is encountered, remove a spurious new-line character in an error message. Last patches are related to the Makefiles. They fix the installation directory prefix and .PHONY targets. ==================== Signed-off-by: Daniel Borkmann commit ad3cda064402b69148faf5f7cd1ac8c2eee52645 Author: Quentin Monnet Date: Tue Nov 28 17:44:33 2017 -0800 tools: bpftool: declare phony targets as such In the Makefile, targets install, doc and doc-install should be added to .PHONY. Let's fix this. Fixes: 71bb428fe2c1 ("tools: bpf: add bpftool") Signed-off-by: Quentin Monnet Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 507e590da398a0e3438d563b5e736c3f2a7749d7 Author: Quentin Monnet Date: Tue Nov 28 17:44:32 2017 -0800 tools: bpftool: unify installation directories Programs and documentation not managed by package manager are generally installed under /usr/local/, instead of the user's home directory. In particular, `man` is generally able to find manual pages under `/usr/local/share/man`. bpftool generally follows perf's example, and perf installs to home directory. However bpftool requires root credentials, so it seems sensible to follow the more common convention of installing files under /usr/local instead. So, make /usr/local the default prefix for installing the binary with `make install`, and the documentation with `make doc-install`. Also, create /usr/local/sbin if it does not exist. Note that the bash-completion file, however, is still installed under /usr/share/bash-completion/completions, as the default setup for bash does not attempt to load completion files under /usr/local/. Reported-by: David Beckett Signed-off-by: Quentin Monnet Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/Documentation/Makefile | 2 +- tools/bpf/bpftool/Makefile | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 0d954eeb99eee63964a07a68fcac61e1df8488e7 Author: Quentin Monnet Date: Tue Nov 28 17:44:31 2017 -0800 tools: bpftool: remove spurious line break from error message The end-of-line character inside the string would break JSON compliance. Remove it, `p_err()` already adds a '\n' character for plain output anyway. Fixes: 9a5ab8bf1d6d ("tools: bpftool: turn err() and info() macros into functions") Reported-by: Jakub Kicinski Signed-off-by: Quentin Monnet Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 146882a37da7aa566c7ec088b42c6495d769f2ba Author: Quentin Monnet Date: Tue Nov 28 17:44:30 2017 -0800 tools: bpftool: make error message from getopt_long() JSON-friendly If `getopt_long()` meets an unknown option, it prints its own error message to standard error output. While this does not strictly break JSON output, it is the only case bpftool prints something to standard error output if JSON output is required. All other errors are printed on standard output as JSON objects, so that an external program does not have to parse stderr. This is changed by setting the global variable `opterr` to 0. Furthermore, p_err() is used to reproduce the error message in a more JSON-friendly way, so that users still get to know what the erroneous option is. Signed-off-by: Quentin Monnet Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 7868620a3c15dbc661fb5d849de403ac04624c50 Author: Quentin Monnet Date: Tue Nov 28 17:44:29 2017 -0800 tools: bpftool: clean up the JSON writer before exiting in usage() The writer is cleaned at the end of the main function, but not if the program exits sooner in usage(). Let's keep it clean and destroy the writer before exiting. Destruction and actual call to exit() are moved to another function so that clean exit can also be performed without printing usage() hints. Fixes: d35efba99d92 ("tools: bpftool: introduce --json and --pretty options") Signed-off-by: Quentin Monnet Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/main.c | 10 +++++++++- tools/bpf/bpftool/main.h | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) commit 9b85c2d4508563f4bb1de0d971ed02fea0d0d757 Author: Quentin Monnet Date: Tue Nov 28 17:44:28 2017 -0800 tools: bpftool: fix crash on bad parameters with JSON If bad or unrecognised parameters are specified after JSON output is requested, `usage()` will try to output null JSON object before the writer is created. To prevent this, create the writer as soon as the `--json` option is parsed. Fixes: 004b45c0e51a ("tools: bpftool: provide JSON output for all possible commands") Reported-by: Jakub Kicinski Signed-off-by: Quentin Monnet Acked-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/main.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit b9151761021e25c024a6670df4e7c43ffbab0e1d Merge: 26cd947 81833de Author: Linus Torvalds Date: Wed Nov 29 14:49:26 2017 -0800 Merge tag 'nfsd-4.15-1' of git://linux-nfs.org/~bfields/linux Pull nfsd fixes from Bruce Fields: "I screwed up my merge window pull request; I only sent half of what I meant to. There were no new features, just bugfixes of various importance and some very minor cleanup, so I think it's all still appropriate for -rc2. Highlights: - Fixes from Trond for some races in the NFSv4 state code. - Fix from Naofumi Honda for a typo in the blocked lock notificiation code - Fixes from Vasily Averin for some problems starting and stopping lockd especially in network namespaces" * tag 'nfsd-4.15-1' of git://linux-nfs.org/~bfields/linux: (23 commits) lockd: fix "list_add double add" caused by legacy signal interface nlm_shutdown_hosts_net() cleanup race of nfsd inetaddr notifiers vs nn->nfsd_serv change race of lockd inetaddr notifiers vs nlmsvc_rqst change SUNRPC: make cache_detail structures const NFSD: make cache_detail structures const sunrpc: make the function arg as const nfsd: check for use of the closed special stateid nfsd: fix panic in posix_unblock_lock called from nfs4_laundromat lockd: lost rollback of set_grace_period() in lockd_down_net() lockd: added cleanup checks in exit_net hook grace: replace BUG_ON by WARN_ONCE in exit_net hook nfsd: fix locking validator warning on nfs4_ol_stateid->st_mutex class lockd: remove net pointer from messages nfsd: remove net pointer from debug messages nfsd: Fix races with check_stateid_generation() nfsd: Ensure we check stateid validity in the seqid operation checks nfsd: Fix race in lock stateid creation nfsd4: move find_lock_stateid nfsd: Ensure we don't recognise lock stateids after freeing them ... commit 26cd94744e142dd5d5a21e2c1e31bacc120b2d74 Merge: 198e0c0 ea37d59 Author: Linus Torvalds Date: Wed Nov 29 14:26:50 2017 -0800 Merge tag 'for-4.15-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "We've collected some fixes in since the pre-merge window freeze. There's technically only one regression fix for 4.15, but the rest seems important and candidates for stable. - fix missing flush bio puts in error cases (is serious, but rarely happens) - fix reporting stat::st_blocks for buffered append writes - fix space cache invalidation - fix out of bound memory access when setting zlib level - fix potential memory corruption when fsync fails in the middle - fix crash in integrity checker - incremetnal send fix, path mixup for certain unlink/rename combination - pass flags to writeback so compressed writes can be throttled properly - error handling fixes" * tag 'for-4.15-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: incremental send, fix wrong unlink path after renaming file btrfs: tree-checker: Fix false panic for sanity test Btrfs: fix list_add corruption and soft lockups in fsync btrfs: Fix wild memory access in compression level parser btrfs: fix deadlock when writing out space cache btrfs: clear space cache inode generation always Btrfs: fix reported number of inode blocks after buffered append writes Btrfs: move definition of the function btrfs_find_new_delalloc_bytes Btrfs: bail out gracefully rather than BUG_ON btrfs: dev_alloc_list is not protected by RCU, use normal list_del btrfs: add missing device::flush_bio puts btrfs: Fix transaction abort during failure in btrfs_rm_dev_item Btrfs: add write_flags for compression bio commit 198e0c0c61b604ab919e34989afe3505b80cd0eb Merge: fccfde4 da25f49 Author: Linus Torvalds Date: Wed Nov 29 14:19:22 2017 -0800 Merge tag 'microblaze-4.15-rc2' of git://git.monstr.eu/linux-2.6-microblaze Pull Microblaze fix from Michal Simek: "Add missing header to mmu_context_mm.h" * tag 'microblaze-4.15-rc2' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: add missing include to mmu_context_mm.h commit fccfde4443494df7262920565e2a43fbfbae63bc Merge: 96c22a4 e5372cd Author: Linus Torvalds Date: Wed Nov 29 14:17:30 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fix from David Miller: "Sparc T4 and later cpu bootup regression fix" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Fix boot on T4 and later. commit 96c22a49ac125bc4ceddc0817dfb9ff3de8aea7d Merge: ef0010a f6454f8 Author: Linus Torvalds Date: Wed Nov 29 13:10:25 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) The forcedeth conversion from pci_*() DMA interfaces to dma_*() ones missed one spot. From Zhu Yanjun. 2) Missing CRYPTO_SHA256 Kconfig dep in cfg80211, from Johannes Berg. 3) Fix checksum offloading in thunderx driver, from Sunil Goutham. 4) Add SPDX to vm_sockets_diag.h, from Stephen Hemminger. 5) Fix use after free of packet headers in TIPC, from Jon Maloy. 6) "sizeof(ptr)" vs "sizeof(*ptr)" bug in i40e, from Gustavo A R Silva. 7) Tunneling fixes in mlxsw driver, from Petr Machata. 8) Fix crash in fanout_demux_rollover() of AF_PACKET, from Mike Maloney. 9) Fix race in AF_PACKET bind() vs. NETDEV_UP notifier, from Eric Dumazet. 10) Fix regression in sch_sfq.c due to one of the timer_setup() conversions. From Paolo Abeni. 11) SCTP does list_for_each_entry() using wrong struct member, fix from Xin Long. 12) Don't use big endian netlink attribute read for IFLA_BOND_AD_ACTOR_SYSTEM, it is in cpu endianness. Also from Xin Long. 13) Fix mis-initialization of q->link.clock in CBQ scheduler, preventing adding filters there. From Jiri Pirko. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (67 commits) ethernet: dwmac-stm32: Fix copyright net: via: via-rhine: use %p to format void * address instead of %x net: ethernet: xilinx: Mark XILINX_LL_TEMAC broken on 64-bit myri10ge: Update MAINTAINERS net: sched: cbq: create block for q->link.block atm: suni: remove extraneous space to fix indentation atm: lanai: use %p to format kernel addresses instead of %x VSOCK: Don't set sk_state to TCP_CLOSE before testing it atm: fore200e: use %pK to format kernel addresses instead of %x ambassador: fix incorrect indentation of assignment statement vxlan: use __be32 type for the param vni in __vxlan_fdb_delete bonding: use nla_get_u64 to extract the value for IFLA_BOND_AD_ACTOR_SYSTEM sctp: use right member as the param of list_for_each_entry sch_sfq: fix null pointer dereference at timer expiration cls_bpf: don't decrement net's refcount when offload fails net/packet: fix a race in packet_bind() and packet_notifier() packet: fix crash in fanout_demux_rollover() sctp: remove extern from stream sched sctp: force the params with right types for sctp csum apis sctp: force SCTP_ERROR_INV_STRM with __u32 when calling sctp_chunk_fail ... commit e5372cd5ef12b05ae74d608f95dc53fe06558867 Author: David S. Miller Date: Wed Nov 29 15:09:29 2017 -0500 sparc64: Fix boot on T4 and later. If we don't put the NG4fls.o object into the same part of the link as the generic sparc64 objects for fls() and __fls() then the relocation in the branch we use for patching will not fit. Move NG4fls.o into lib-y to fix this problem. Fixes: 46ad8d2d22c1 ("sparc64: Use sparc optimized fls and __fls for T4 and above") Signed-off-by: David S. Miller Reported-by: Anatoly Pugachev Tested-by: Anatoly Pugachev arch/sparc/lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fdf165a52505392eb059902b0df55e79a45c25f Author: Oded Gabbay Date: Wed Nov 29 17:26:56 2017 +0100 drm/radeon: remove init of CIK VMIDs 8-16 for amdkfd VMIDs 8-16 in Kaveri were reserved for use by the amdkfd driver. Because we removed amdkfd support from radeon, those VMIDs are now used by radeon and are initialized by radeon. This patch removes the function that initialized those VMIDs for amdkfd use. This initialization overridden the radeon initialization and caused GPU faults and GUI crashed. Fixes: f4fa88ab28ab ("drm/radeon: deprecate and remove KFD interface") Rported-by: Michel Dänzer Acked-by: Christian König Reviewed-and-Tested-by: Michel Dänzer Signed-off-by: Oded Gabbay Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/cik.c | 24 ------------------------ 1 file changed, 24 deletions(-) commit 1569d651f152870663fabd8f1c80af353f967ad5 Author: Christian König Date: Mon Nov 27 13:12:35 2017 +0100 drm/ttm: fix populate_and_map() functions once more This reverts "drm/ttm: Fix configuration error around populate_and_map() functions". This fix has gone into the wrong direction. Those helpers should be available even when neither CONFIG_INTEL_IOMMU nor CONFIG_SWIOTLB are set. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 -- include/drm/ttm/ttm_page_alloc.h | 32 ++++++++++---------------------- 2 files changed, 10 insertions(+), 24 deletions(-) commit ef0010a30935de4e0211cbc7bdffc30446cdee9b Author: Linus Torvalds Date: Wed Nov 29 11:28:09 2017 -0800 vsprintf: don't use 'restricted_pointer()' when not restricting Instead, just fall back on the new '%p' behavior which hashes the pointer. Otherwise, '%pK' - that was intended to mark a pointer as restricted - just ends up leaking pointers that a normal '%p' wouldn't leak. Which just make the whole thing pointless. I suspect we should actually get rid of '%pK' entirely, and make it just work as '%p' regardless, but this is the minimal obvious fix. People who actually use 'kptr_restrict' should weigh in on which behavior they want. Cc: Tobin Harding Cc: Kees Cook Signed-off-by: Linus Torvalds lib/vsprintf.c | 2 ++ 1 file changed, 2 insertions(+) commit 4ba161a793d5f43757c35feff258d9f20a082940 Author: Trond Myklebust Date: Fri Nov 24 12:00:24 2017 -0500 SUNRPC: Allow connect to return EHOSTUNREACH Reported-by: Dmitry Vyukov Signed-off-by: Trond Myklebust Tested-by: Dmitry Vyukov Signed-off-by: Anna Schumaker net/sunrpc/xprtsock.c | 1 + 1 file changed, 1 insertion(+) commit 445f288d706cb5a418b13c340280b47d4585d667 Author: Trond Myklebust Date: Sat Nov 18 13:50:11 2017 -0500 NFSv4: Ensure gcc 4.4.4 can compile initialiser for "invalid_stateid" gcc 4.4.4 is too old to have full C11 anonymous union support, so the current initialiser fails to compile. Reported-by: Boris Ostrovsky Signed-off-by: Trond Myklebust (compile-)Tested-by: Boris Ostrovsky Reviewed-by: Geert Uytterhoeven Signed-off-by: Anna Schumaker fs/nfs/nfs4state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 668533dc0764b30c9dd2baf3ca800156f688326b Author: Linus Torvalds Date: Wed Nov 29 10:30:13 2017 -0800 kallsyms: take advantage of the new '%px' format The conditional kallsym hex printing used a special fixed-width '%lx' output (KALLSYM_FMT) in preparation for the hashing of %p, but that series ended up adding a %px specifier to help with the conversions. Use it, and avoid the "print pointer as an unsigned long" code. Signed-off-by: Linus Torvalds include/linux/kallsyms.h | 6 ------ kernel/kallsyms.c | 8 ++++---- kernel/module.c | 6 +++--- 3 files changed, 7 insertions(+), 13 deletions(-) commit da6af54dc0014d733ce014a196e4c84ee43cabec Merge: f55e101 6424f6b Author: Linus Torvalds Date: Wed Nov 29 10:19:29 2017 -0800 Merge tag 'printk-hash-pointer-4.15-rc2' of git://github.com/tcharding/linux Pull printk pointer hashing update from Tobin Harding: "Here is the patch set that implements hashing of printk specifier %p. First we have two clean up patches then we do the hashing. Hashing is done via the SipHash algorithm. The next patch adds printk specifier %px for printing pointers when we _really_ want to see the address i.e %px is functionally equivalent to %lx. Final patch in the set fixes KASAN since we break it by hashing %p. For the record here is the justification for the series: Currently there exist approximately 14 000 places in the Kernel where addresses are being printed using an unadorned %p. This potentially leaks sensitive information about the Kernel layout in memory. Many of these calls are stale, instead of fixing every call we hash the address by default before printing. We then add %px to provide a way to print the actual address. Although this is achievable using %lx, using %px will assist us if we ever want to change pointer printing behaviour. %px is more uniquely grep'able (there are already >50 000 uses of %lx). The added advantage of hashing %p is that security is now opt-out, if you _really_ want the address you have to work a little harder and use %px. This will of course break some users, forcing code printing needed addresses to be updated" [ I do expect this to be an annoyance, and a number of %px users to be added for debuggability. But nobody is willing to audit existing %p users for information leaks, and a number of places really only use the pointer as an object identifier rather than really 'I need the address'. IOW - sorry for the inconvenience, but it's the least inconvenient of the options. - Linus ] * tag 'printk-hash-pointer-4.15-rc2' of git://github.com/tcharding/linux: kasan: use %px to print addresses instead of %p vsprintf: add printk specifier %px printk: hash addresses printed with %p vsprintf: refactor %pK code out of pointer() docs: correct documentation for %pK commit 58d0d19a204604ca0da26058828a53558b265da3 Author: Ard Biesheuvel Date: Tue Nov 28 15:18:19 2017 +0000 kvm: arm: don't treat unavailable HYP mode as an error Since it is perfectly legal to run the kernel at EL1, it is not actually an error if HYP mode is not available when attempting to initialize KVM, given that KVM support cannot be built as a module. So demote the kvm_err() to kvm_info(), which prevents the error from appearing on an otherwise 'quiet' console. Acked-by: Marc Zyngier Acked-by: Christoffer Dall Signed-off-by: Ard Biesheuvel Signed-off-by: Christoffer Dall virt/kvm/arm/arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22601127c0faa5db70ab88f23af11cb23c8f6cdf Author: Christoffer Dall Date: Wed Nov 29 17:05:16 2017 +0100 KVM: arm/arm64: Avoid attempting to load timer vgic state without a vgic The timer optimization patches inadvertendly changed the logic to always load the timer state as if we have a vgic, even if we don't have a vgic. Fix this by doing the usual irqchip_in_kernel() check and call the appropriate load function. Signed-off-by: Christoffer Dall virt/kvm/arm/arch_timer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e3feebf81744acd8b581e5eb58a93e8fdcf042a5 Author: Alex Bennée Date: Thu Nov 23 12:11:34 2017 +0000 kvm: arm64: handle single-step of hyp emulated mmio instructions There is a fast-path of MMIO emulation inside hyp mode. The handling of single-step is broadly the same as kvm_arm_handle_step_debug() except we just setup ESR/HSR so handle_exit() does the correct thing as we exit. For the case of an emulated illegal access causing an SError we will exit via the ARM_EXCEPTION_EL1_SERROR path in handle_exit(). We behave as we would during a real SError and clear the DBG_SPSR_SS bit for the emulated instruction. Acked-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Alex Bennée Signed-off-by: Christoffer Dall arch/arm64/kvm/hyp/switch.c | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) commit e70dce73befcf96607bc6e24c2c8f84229d6721e Author: Alex Bennée Date: Thu Nov 23 12:11:33 2017 +0000 kvm: arm64: handle single-step during SError exceptions When an SError arrives during single-step both the SError and debug exceptions may be pending when the step is completed, and the architecture doesn't define the ordering of the two. This means that we can observe en SError even though we've just completed a step, without receiving a debug exception. In that case the DBG_SPSR_SS bit will have flipped as the instruction executed. After handling the abort in handle_exit() we test to see if the bit is clear and we were single-stepping before deciding if we need to exit to user space. Acked-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Alex Bennée Signed-off-by: Christoffer Dall arch/arm64/kvm/handle_exit.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit f55e1014f9e567d830eb3a7f57d879a34872af4b Author: Linus Torvalds Date: Wed Nov 29 09:01:01 2017 -0800 Revert "mm, thp: Do not make pmd/pud dirty without a reason" This reverts commit 152e93af3cfe2d29d8136cc0a02a8612507136ee. It was a nice cleanup in theory, but as Nicolai Stange points out, we do need to make the page dirty for the copy-on-write case even when we didn't end up making it writable, since the dirty bit is what we use to check that we've gone through a COW cycle. Reported-by: Michal Hocko Acked-by: Kirill A. Shutemov Signed-off-by: Linus Torvalds mm/huge_memory.c | 31 ++++++++++++------------------- mm/internal.h | 3 +-- mm/khugepaged.c | 2 +- mm/memory.c | 2 +- mm/migrate.c | 2 +- 5 files changed, 16 insertions(+), 24 deletions(-) commit 001dde9400d5c3e9e2ce2abe06c1efa70a25dfde Author: Shawn Nematbakhsh Date: Wed Sep 27 14:35:27 2017 -0700 mfd: cros ec: spi: Fix "in progress" error signaling For host commands that take a long time to process, cros ec can return early by signaling a EC_RES_IN_PROGRESS result. The host must then poll status with EC_CMD_GET_COMMS_STATUS until completion of the command. None of the above applies when data link errors are encountered. When errors such as EC_SPI_PAST_END are encountered during command transmission, it usually means the command was not received by the EC. Treating such errors as if they were 'EC_RES_IN_PROGRESS' results is almost always the wrong decision, and can result in host commands silently being lost. Reported-by: Jon Hunter Signed-off-by: Shawn Nematbakhsh Reviewed-by: Brian Norris Tested-by: Jon Hunter Signed-off-by: Lee Jones drivers/mfd/cros_ec_spi.c | 52 ++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 28 deletions(-) commit 85e9b13cbb130a3209f21bd7933933399c389ffe Author: Johan Hovold Date: Sat Nov 11 16:38:44 2017 +0100 mfd: twl6040: Fix child-node lookup Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at the parent rather than just matching on its children. To make things worse, the parent node was prematurely freed, while the child node was leaked. Note that the CONFIG_OF compile guard can be removed as of_get_child_by_name() provides a !CONFIG_OF implementation which always fails. Cc: stable # 3.5 Fixes: 37e13cecaa14 ("mfd: Add support for Device Tree to twl6040") Fixes: ca2cad6ae38e ("mfd: Fix twl6040 build failure") Signed-off-by: Johan Hovold Acked-by: Peter Ujfalusi Signed-off-by: Lee Jones drivers/mfd/twl6040.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 0a423772de2f3d7b00899987884f62f63ae00dcb Author: Johan Hovold Date: Sat Nov 11 16:38:43 2017 +0100 mfd: twl4030-audio: Fix sibling-node lookup A helper purported to look up a child node based on its name was using the wrong of-helper and ended up prematurely freeing the parent of-node while leaking any matching node. To make things worse, any matching node would not even necessarily be a child node as the whole device tree was searched depth-first starting at the parent. Fixes: 019a7e6b7b31 ("mfd: twl4030-audio: Add DT support") Cc: stable # 3.7 Signed-off-by: Johan Hovold Acked-by: Peter Ujfalusi Signed-off-by: Lee Jones drivers/mfd/twl4030-audio.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 15d8374874ded0bec37ef27f8301a6d54032c0e5 Author: Jon Hunter Date: Tue Nov 14 14:43:27 2017 +0000 mfd: cros ec: spi: Don't send first message too soon On the Tegra124 Nyan-Big chromebook the very first SPI message sent to the EC is failing. The Tegra SPI driver configures the SPI chip-selects to be active-high by default (and always has for many years). The EC SPI requires an active-low chip-select and so the Tegra chip-select is reconfigured to be active-low when the EC SPI driver calls spi_setup(). The problem is that if the first SPI message to the EC is sent too soon after reconfiguring the SPI chip-select, it fails. The EC SPI driver prevents back-to-back SPI messages being sent too soon by keeping track of the time the last transfer was sent via the variable 'last_transfer_ns'. To prevent the very first transfer being sent too soon, initialise the 'last_transfer_ns' variable after calling spi_setup() and before sending the first SPI message. Cc: Signed-off-by: Jon Hunter Reviewed-by: Brian Norris Reviewed-by: Douglas Anderson Acked-by: Benson Leung Signed-off-by: Lee Jones drivers/mfd/cros_ec_spi.c | 1 + 1 file changed, 1 insertion(+) commit ed565371e368f014db237aacf42b27b40b1bd247 Merge: 2967acb 7e5dd57 Author: Jens Axboe Date: Wed Nov 29 09:21:50 2017 -0700 Merge branch 'nvme-4.15' of git://git.infradead.org/nvme into for-linus Pull NVMe fixes from Christoph: "A few more nvme updates for 4.15. A single small PCIe fix, and a number of patches for RDMA that are a little larger than what I'd like to see for -rc2, but they fix important issues seen in the wild." commit 88bc0ede8d35edc969350852894dc864a2dc1859 Author: Tetsuo Handa Date: Wed Nov 29 22:34:50 2017 +0900 quota: Check for register_shrinker() failure. register_shrinker() might return -ENOMEM error since Linux 3.12. Call panic() as with other failure checks in this function if register_shrinker() failed. Fixes: 1d3d4437eae1 ("vmscan: per-node deferred work") Signed-off-by: Tetsuo Handa Cc: Jan Kara Cc: Michal Hocko Reviewed-by: Michal Hocko Signed-off-by: Jan Kara fs/quota/dquot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1eb591288b956bdd75e464e69b6b8207ffa6e5e3 Author: Alex Bennée Date: Thu Nov 16 15:39:21 2017 +0000 kvm: arm64: handle single-step of userspace mmio instructions The system state of KVM when using userspace emulation is not complete until we return into KVM_RUN. To handle mmio related updates we wait until they have been committed and then schedule our KVM_EXIT_DEBUG. The kvm_arm_handle_step_debug() helper tells us if we need to return and sets up the exit_reason for us. Signed-off-by: Alex Bennée Signed-off-by: Christoffer Dall virt/kvm/arm/arm.c | 3 +++ 1 file changed, 3 insertions(+) commit 7226bc2e126dfb6d81e85a75f373ea4cc3619406 Author: Alex Bennée Date: Thu Nov 16 15:39:20 2017 +0000 kvm: arm64: handle single-stepping trapped instructions If we are using guest debug to single-step the guest, we need to ensure that we exit after emulating the instruction. This only affects instructions completely emulated by the kernel. For instructions emulated in userspace, we need to exit and return to complete the emulation. The kvm_arm_handle_step_debug() helper sets up the necessary exit state if needed. Signed-off-by: Alex Bennée Reviewed-by: Julien Thierry Signed-off-by: Christoffer Dall arch/arm64/kvm/handle_exit.c | 49 +++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 14 deletions(-) commit 696673d192f52c2c5a702224ee21f005318a844b Author: Alex Bennée Date: Thu Nov 16 15:39:19 2017 +0000 KVM: arm/arm64: debug: Introduce helper for single-step After emulating instructions we may want return to user-space to handle single-step debugging. Introduce a helper function, which, if single-step is enabled, sets the run structure for return and returns true. Signed-off-by: Alex Bennée Reviewed-by: Julien Thierry Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_host.h | 5 +++++ arch/arm64/include/asm/kvm_host.h | 1 + arch/arm64/kvm/debug.c | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+) commit 5553b142be11e794ebc0805950b2e8313f93d718 Author: Marc Zyngier Date: Thu Nov 16 17:58:21 2017 +0000 arm: KVM: Fix VTTBR_BADDR_MASK BUG_ON off-by-one VTTBR_BADDR_MASK is used to sanity check the size and alignment of the VTTBR address. It seems to currently be off by one, thereby only allowing up to 39-bit addresses (instead of 40-bit) and also insufficiently checking the alignment. This patch fixes it. This patch is the 32bit pendent of Kristina's arm64 fix, and she deserves the actual kudos for pinpointing that one. Fixes: f7ed45be3ba52 ("KVM: ARM: World-switch implementation") Cc: # 3.9 Reported-by: Kristina Martsenko Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_arm.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 26aa7b3b1c0fb3f1a6176a0c1847204ef4355693 Author: Kristina Martsenko Date: Thu Nov 16 17:58:20 2017 +0000 arm64: KVM: fix VTTBR_BADDR_MASK BUG_ON off-by-one VTTBR_BADDR_MASK is used to sanity check the size and alignment of the VTTBR address. It seems to currently be off by one, thereby only allowing up to 47-bit addresses (instead of 48-bit) and also insufficiently checking the alignment. This patch fixes it. As an example, with 4k pages, before this patch we have: PHYS_MASK_SHIFT = 48 VTTBR_X = 37 - 24 = 13 VTTBR_BADDR_SHIFT = 13 - 1 = 12 VTTBR_BADDR_MASK = ((1 << 35) - 1) << 12 = 0x00007ffffffff000 Which is wrong, because the mask doesn't allow bit 47 of the VTTBR address to be set, and only requires the address to be 12-bit (4k) aligned, while it actually needs to be 13-bit (8k) aligned because we concatenate two 4k tables. With this patch, the mask becomes 0x0000ffffffffe000, which is what we want. Fixes: 0369f6a34b9f ("arm64: KVM: EL2 register definitions") Cc: # 3.11.x Reviewed-by: Suzuki K Poulose Reviewed-by: Christoffer Dall Signed-off-by: Kristina Martsenko Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/kvm_arm.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a05d1c0d03fd60ed487991e73850421e735c0135 Author: Marc Zyngier Date: Thu Nov 16 17:58:19 2017 +0000 KVM: arm/arm64: vgic-v4: Only perform an unmap for valid vLPIs Before performing an unmap, let's check that what we have was really mapped the first place. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-v4.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 686f294f2f1ae40705283dd413ca1e4c14f20f93 Author: Marc Zyngier Date: Thu Nov 16 17:58:18 2017 +0000 KVM: arm/arm64: vgic-its: Check result of allocation before use We miss a test against NULL after allocation. Fixes: 6d03a68f8054 ("KVM: arm64: vgic-its: Turn device_id validation into generic ID validation") Cc: stable@vger.kernel.org # 4.8 Reported-by: AKASHI Takahiro Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 2 ++ 1 file changed, 2 insertions(+) commit 64afe6e9eb4841f35317da4393de21a047a883b3 Author: Marc Zyngier Date: Thu Nov 16 17:58:17 2017 +0000 KVM: arm/arm64: vgic-its: Preserve the revious read from the pending table The current pending table parsing code assumes that we keep the previous read of the pending bits, but keep that variable in the current block, making sure it is discarded on each loop. We end-up using whatever is on the stack. Who knows, it might just be the right thing... Fixes: 33d3bc9556a7d ("KVM: arm64: vgic-its: Read initial LPI pending table") Cc: stable@vger.kernel.org # 4.8 Reported-by: AKASHI Takahiro Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ddb4b0102cb9cdd2398d98b3e1e024e08a2f4239 Author: Marc Zyngier Date: Thu Nov 16 17:58:16 2017 +0000 KVM: arm/arm64: vgic: Preserve the revious read from the pending table The current pending table parsing code assumes that we keep the previous read of the pending bits, but keep that variable in the current block, making sure it is discarded on each loop. We end-up using whatever is on the stack. Who knows, it might just be the right thing... Fixes: 280771252c1ba ("KVM: arm64: vgic-v3: KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES") Cc: stable@vger.kernel.org # 4.12 Reported-by: AKASHI Takahiro Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 150009e2c70cc3c6e97f00e7595055765d32fb85 Author: Marc Zyngier Date: Thu Nov 16 17:58:15 2017 +0000 KVM: arm/arm64: vgic-irqfd: Fix MSI entry allocation Using the size of the structure we're allocating is a good idea and avoids any surprise... In this case, we're happilly confusing kvm_kernel_irq_routing_entry and kvm_irq_routing_entry... Fixes: 95b110ab9a09 ("KVM: arm/arm64: Enable irqchip routing") Cc: stable@vger.kernel.org # 4.8 Reported-by: AKASHI Takahiro Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-irqfd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 285a90e36b138b707c4a9850f2500774b7191c99 Author: Andre Przywara Date: Fri Nov 17 17:58:21 2017 +0000 KVM: arm/arm64: VGIC: extend !vgic_is_initialized guard Commit f39d16cbabf9 ("KVM: arm/arm64: Guard kvm_vgic_map_is_active against !vgic_initialized") introduced a check whether the VGIC has been initialized before accessing the spinlock and the VGIC data structure. However the vgic_get_irq() call in the variable declaration sneaked through the net, so lets make sure that this also gets called only after we actually allocated the arrays this function accesses. Reviewed-by: Eric Auger Signed-off-by: Andre Przywara Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ec6449a9c2296b1c04f6219f7473e0c2fedecfed Author: Christoffer Dall Date: Mon Nov 20 12:10:15 2017 +0100 KVM: arm/arm64: Don't enable/disable physical timer access on VHE After the timer optimization rework we accidentally end up calling physical timer enable/disable functions on VHE systems, which is neither needed nor correct, since the CNTHCTL_EL2 register format is different when HCR_EL2.E2H is set. The CNTHCTL_EL2 is initialized when CPUs become online in kvm_timer_init_vhe() and we don't have to call these functions on VHE systems, which also allows us to inline the non-VHE functionality. Reported-by: Jintack Lim Signed-off-by: Christoffer Dall include/kvm/arm_arch_timer.h | 3 --- virt/kvm/arm/arch_timer.c | 6 ------ virt/kvm/arm/hyp/timer-sr.c | 48 ++++++++++++++++++-------------------------- 3 files changed, 20 insertions(+), 37 deletions(-) commit f6454f80e8a965fca203dab28723f68ec78db608 Author: Benjamin Gaignard Date: Wed Nov 29 15:20:00 2017 +0100 ethernet: dwmac-stm32: Fix copyright Uniformize STMicroelectronics copyrights header Signed-off-by: Benjamin Gaignard CC: Alexandre Torgue Acked-by: Alexandre TORGUE Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d9bcd462daf34aebb8de9ad7f76de0198bb5a0f0 Author: Heiner Kallweit Date: Fri Nov 24 07:47:50 2017 +0100 eeprom: at24: check at24_read/write arguments So far we completely rely on the caller to provide valid arguments. To be on the safe side perform an own sanity check. Cc: stable@vger.kernel.org Signed-off-by: Heiner Kallweit Signed-off-by: Bartosz Golaszewski drivers/misc/eeprom/at24.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 644a1f19c6c8393d0c4168a5adf79056da6822eb Author: Heiner Kallweit Date: Mon Nov 27 20:46:22 2017 +0100 eeprom: at24: fix reading from 24MAC402/24MAC602 Chip datasheet mentions that word addresses other than the actual start position of the MAC delivers undefined results. So fix this. Current implementation doesn't work due to this wrong offset. Cc: stable@vger.kernel.org Fixes: 0b813658c115 ("eeprom: at24: add support for at24mac series") Signed-off-by: Heiner Kallweit Signed-off-by: Bartosz Golaszewski drivers/misc/eeprom/at24.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a7e4fbbfdf7935333800bd801f6affc2515506f2 Author: Colin Ian King Date: Wed Nov 29 14:11:49 2017 +0000 net: via: via-rhine: use %p to format void * address instead of %x Don't use %x and casting to print out an address, instead use %p and remove the casting. Cleans up smatch warnings: drivers/net/ethernet/via/via-rhine.c:998 rhine_init_one_common() warn: argument 4 to %lx specifier is cast from pointer Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/via/via-rhine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 282ef4729195c8503f7101d574acfb5e7c8a8209 Author: Gustavo A. R. Silva Date: Tue Nov 28 11:28:52 2017 -0600 rxrpc: Fix variable overwrite Values assigned to both variable resend_at and ack_at are overwritten before they can be used. The correct fix here is to add 'now' to the previously computed value in resend_at and ack_at. Addresses-Coverity-ID: 1462262 Addresses-Coverity-ID: 1462263 Addresses-Coverity-ID: 1462264 Fixes: beb8e5e4f38c ("rxrpc: Express protocol timeouts in terms of RTT") Link: https://marc.info/?i=17004.1511808959%40warthog.procyon.org.uk Signed-off-by: Gustavo A. R. Silva Signed-off-by: David Howells net/rxrpc/call_event.c | 2 +- net/rxrpc/sendmsg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 15bfe05c8d6386f1a90e9340d15336e85e32aad6 Author: Geert Uytterhoeven Date: Wed Nov 29 11:01:09 2017 +0100 net: ethernet: xilinx: Mark XILINX_LL_TEMAC broken on 64-bit On 64-bit (e.g. powerpc64/allmodconfig): drivers/net/ethernet/xilinx/ll_temac_main.c: In function 'temac_start_xmit_done': drivers/net/ethernet/xilinx/ll_temac_main.c:633:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] dev_kfree_skb_irq((struct sk_buff *)cur_p->app4); ^ cdmac_bd.app4 is u32, so it is too small to hold a kernel pointer. Note that several other fields in struct cdmac_bd are also too small to hold physical addresses on 64-bit platforms. Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller drivers/net/ethernet/xilinx/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5fc62f6a139a7b06b027bf442cd4205619506f59 Author: David Howells Date: Wed Nov 29 14:40:41 2017 +0000 rxrpc: Fix ACK generation from the connection event processor Repeat terminal ACKs and now terminal ACKs are now generated from the connection event processor rather from call handling as this allows us to discard client call structures as soon as possible and free up the channel for a follow on call. However, in ACKs so generated, the additional information trailer is malformed because the padding that's meant to be in the middle isn't included in what's transmitted. Fix it so that the 3 bytes of padding are included in the transmission. Further, the trailer is misaligned because of the padding, so assigment to the u16 and u32 fields inside it might cause problems on some arches, so fix this by breaking the padding and the trailer out of the packed struct. (This also deals with potential compiler weirdies where some of the nested structs are packed and some aren't). The symptoms can be seen in wireshark as terminal DUPLICATE or IDLE ACK packets in which the Max MTU, Interface MTU and rwind fields have weird values and the Max Packets field is apparently missing. Reported-by: Jeffrey Altman Signed-off-by: David Howells net/rxrpc/conn_event.c | 50 +++++++++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 21 deletions(-) commit 3d7682af228fd78dc46bc6bf40e0268ad04521ec Author: David Howells Date: Wed Nov 29 14:25:50 2017 +0000 rxrpc: Clean up whitespace Clean up some whitespace from rxrpc. Signed-off-by: David Howells net/rxrpc/call_event.c | 2 +- net/rxrpc/conn_object.c | 2 +- net/rxrpc/input.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 52dd06506e9bbc2a37b352df7dfc5468f8da21fd Author: Maarten Lankhorst Date: Tue Nov 28 12:16:03 2017 +0100 drm/fb_helper: Disable all crtc's when initial setup fails. Some drivers like i915 start with crtc's enabled, but with deferred fbcon setup they were no longer disabled as part of fbdev setup. Headless units could no longer enter pc3 state because the crtc was still enabled. Fix this by calling restore_fbdev_mode when we would have called it otherwise once during initial fbdev setup. Signed-off-by: Maarten Lankhorst Fixes: ca91a2758fce ("drm/fb-helper: Support deferred setup") Cc: # v4.14+ Reported-by: Thomas Voegtle Tested-by: Thomas Voegtle Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171128111603.62757-1-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_fb_helper.c | 4 ++++ 1 file changed, 4 insertions(+) commit 01e4fab6c1131a5e4f12104e7134da701def0434 Author: Hyong-Youb Kim Date: Wed Nov 29 00:03:50 2017 -0500 myri10ge: Update MAINTAINERS Change the maintainer to Chris Lee who has access to Myricom hardware and can test/review. Update the website URL. Signed-off-by: Hyong-Youb Kim Signed-off-by: David S. Miller MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5478e478eee3b096b8d998d4ed445da30da2dfbc Author: Bartosz Golaszewski Date: Mon Nov 27 22:06:13 2017 +0100 eeprom: at24: correctly set the size for at24mac402 There's an ilog2() expansion in AT24_DEVICE_MAGIC() which rounds down the actual size of EUI-48 byte array in at24mac402 eeproms to 4 from 6, making it impossible to read it all. Fix it by manually adjusting the value in probe(). This patch contains a temporary fix that is suitable for stable branches. Eventually we'll probably remove the call to ilog2() while converting the magic values to actual structs. Cc: stable@vger.kernel.org Fixes: 0b813658c115 ("eeprom: at24: add support for at24mac series") Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko drivers/misc/eeprom/at24.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 62a277d43d47e74972de44d33bd3763e31992414 Author: Gustavo A. R. Silva Date: Mon Nov 20 08:28:14 2017 -0600 dmaengine: at_hdmac: fix potential NULL pointer dereference in atc_prep_dma_interleaved _xt_ is being dereferenced before it is null checked, hence there is a potential null pointer dereference. Fix this by moving the pointer dereference after _xt_ has been null checked. This issue was detected with the help of Coccinelle. Fixes: 4483320e241c ("dmaengine: Use Pointer xt after NULL check.") Signed-off-by: Gustavo A. R. Silva Acked-by: Ludovic Desroches Signed-off-by: Vinod Koul drivers/dma/at_hdmac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5c9afbda911ce20b3f2181d1e440a0222e1027dd Author: Christophe JAILLET Date: Fri Nov 17 22:37:53 2017 +0100 dmaengine: ioat: Fix error handling path If the last test in 'ioat_dma_self_test()' fails, we must release all the allocated resources and not just part of them. Signed-off-by: Christophe JAILLET Acked-by: Dave Jiang Signed-off-by: Vinod Koul drivers/dma/ioat/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a76dfe350c1fcb466b18595e65b33fa6abf65472 Author: Lucas Stach Date: Wed Nov 29 12:04:31 2017 +0100 drm/atomic: make drm_atomic_helper_wait_for_vblanks more agressive drm_atomic_helper_setup_commit expects that flipping of previous commits has happened when it is called to set up a new commit. This can be violated by commits where userspace doesn't get a flip completion event to synchronize against i.e. legacy modesets and property changes. The expectation is that those are done by blocking commits, which wait for completion. Most drivers call drm_atomic_helper_wait_for_vblanks in the commit_tail to ensure completion, but the wait for next vblank might not actually happen if the commit didn't change any planes. Make the wait more agressive by also waiting if no planes changed. This is the minimal regression fix for the 4.15 kernel series. Long term drivers should switch away from drm_atomic_helper_wait_for_vblanks and use drm_atomic_helper_wait_for_flip_done instead. Fixes: de39bec1a0c4 ("drm/atomic: Remove waits in drm_atomic_helper_commit_cleanup_done, v2.") Signed-off-by: Lucas Stach Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20171129110431.6300-1-l.stach@pengutronix.de drivers/gpu/drm/drm_atomic_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0308cadcec379e510f498c48c34aafe582f1af88 Author: Masahiro Yamada Date: Tue Nov 28 12:13:53 2017 +0900 MAINTAINERS: exclude other Socionext SoC DT files from ARM/UNIPHIER entry There are several product lines in Socionext. I maintain only DT files prefixed with "uniphier". Signed-off-by: Masahiro Yamada Reviewed-by: Andreas Färber MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 897281bac45c83c493d8dc1906dbee97950ad625 Author: Masahiro Yamada Date: Fri Nov 17 14:24:46 2017 +0900 arm64: dts: uniphier: remove unnecessary interrupt-parent These were added to make the ARM64 branch self-contained because updates for ARM and ARM64 are supposed to be sent as separate pull requests. Now, they were merged together in Linus' tree and interrupt-parent from the arch/arm/boot/dts/uniphier-support-card.dtsi is visible from ARM64 DT files by the cross-arch reference. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dts | 1 - arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts | 1 - arch/arm64/boot/dts/socionext/uniphier-pxs3-ref.dts | 1 - 3 files changed, 3 deletions(-) commit 6af9bd453112bd0ee8f69e2c5c2e27bd725b1cb0 Author: Dai Okamura Date: Tue Nov 28 19:41:32 2017 +0900 arm64: dts: uniphier: correct on-board device IRQ number for PXs3 Commit ba5b5034bd29 ("arm64: dts: uniphier: route on-board device IRQ to GPIO controller for PXs3") has incorrect update. Fixes: ba5b5034bd29 ("arm64: dts: uniphier: route on-board device IRQ to GPIO controller for PXs3") Signed-off-by: Dai Okamura Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-pxs3-ref.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6702abb3bf2394f250af0ee04070227bb5dda788 Author: Gregory CLEMENT Date: Tue Nov 14 17:51:50 2017 +0100 pinctrl: armada-37xx: Fix direction_output() callback behavior The direction_output callback of the gpio_chip structure is supposed to set the output direction but also to set the value of the gpio. For the armada-37xx driver this callback acted as the gpio_set_direction callback for the pinctrl. This patch fixes the behavior of the direction_output callback by also applying the value received as parameter. Cc: stable@vger.kernel.org Fixes: 5715092a458c ("pinctrl: armada-37xx: Add gpio support") Reported-by: Alexandre Belloni Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit b89b6925bb9d48926d7ba713d3f13b14fc35c544 Author: Nicolin Chen Date: Thu Nov 16 11:55:18 2017 -0800 ASoC: fsl_asrc: Fix typo in a field define ASRFSTi_IAEi has an 11-bit offset as its _SHIFT macro defines. So this patch just fixes that. Reported-by: Laurent Charpentier Signed-off-by: Nicolin Chen Reviewed-by: Fabio Estevam Signed-off-by: Mark Brown sound/soc/fsl/fsl_asrc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c892b0d81705c566f575e489efc3c50762db1bde Author: Bastian Stender Date: Tue Nov 28 09:24:07 2017 +0100 mmc: core: prepend 0x to OCR entry in sysfs The sysfs entry "ocr" was missing the 0x prefix to identify it as hex formatted. Fixes: 5fb06af7a33b ("mmc: core: Extend sysfs with OCR register") Signed-off-by: Bastian Stender Cc: # v4.8+ [Ulf: Amended change to also cover SD-cards] Signed-off-by: Ulf Hansson drivers/mmc/core/mmc.c | 2 +- drivers/mmc/core/sd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 80a780a167d9267c72867b806142bd6ec69ba123 Author: Bastian Stender Date: Tue Nov 28 09:24:06 2017 +0100 mmc: core: prepend 0x to pre_eol_info entry in sysfs The sysfs entry "pre_eol_info" was missing the 0x prefix to identify it as hex formatted. Fixes: 46bc5c408e4e ("mmc: core: Export device lifetime information through sysfs") Signed-off-by: Bastian Stender Cc: # v4.11+ Signed-off-by: Ulf Hansson drivers/mmc/core/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bd6683da2e64590bdc27ecf7e61ad8376861768 Author: Andy Shevchenko Date: Fri Nov 10 19:55:18 2017 +0200 pinctrl: denverton: Fix UART2 RTS pin mode UART2 RTS is mode 2 of the pin. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-denverton.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f044113113dd95ba73916bde10e804d3cdfa2662 Author: Jens Wiklander Date: Mon Oct 9 11:11:49 2017 +0200 optee: fix invalid of_node_put() in optee_driver_init() The first node supplied to of_find_matching_node() has its reference counter decreased as part of call to that function. In optee_driver_init() after calling of_find_matching_node() it's invalid to call of_node_put() on the supplied node again. So remove the invalid call to of_node_put(). Reported-by: Alex Shi Signed-off-by: Jens Wiklander drivers/tee/optee/core.c | 1 - 1 file changed, 1 deletion(-) commit 7e4d4233260be0611c7fbdb2730c12731c4b8dc0 Author: Vaibhav Jain Date: Fri Nov 24 14:03:38 2017 +0530 powerpc: Do not assign thread.tidr if already assigned If set_thread_tidr() is called twice for same task_struct then it will allocate a new tidr value to it leaving the previous value still dangling in the vas_thread_ida table. To fix this the patch changes set_thread_tidr() to check if a tidr value is already assigned to the task_struct and if yes then returns zero. Fixes: ec233ede4c86("powerpc: Add support for setting SPRN_TIDR") Signed-off-by: Vaibhav Jain Reviewed-by: Andrew Donnellan [mpe: Modify to return 0 in the success case, not the TID value] Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 3 +++ 1 file changed, 3 insertions(+) commit aca7573fde95152378361cba734996b384f3b1d3 Author: Vaibhav Jain Date: Tue Nov 28 08:23:04 2017 +0530 powerpc: Avoid signed to unsigned conversion in set_thread_tidr() There is an unsafe signed to unsigned conversion in set_thread_tidr() that may cause an error value to be assigned to SPRN_TIDR register and used as thread-id. The issue happens as assign_thread_tidr() returns an int and thread.tidr is an unsigned-long. So a negative error code returned from assign_thread_tidr() will fail the error check and gets assigned as tidr as a large positive value. To fix this the patch assigns the return value of assign_thread_tidr() to a temporary int and assigns it to thread.tidr iff its '> 0'. The patch shouldn't impact the calling convention of set_thread_tidr() i.e all -ve return-values are error codes and a return value of '0' indicates success. Fixes: ec233ede4c86("powerpc: Add support for setting SPRN_TIDR") Signed-off-by: Vaibhav Jain Reviewed-by: Christophe Lombard clombard@linux.vnet.ibm.com Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 6a53b7593233ab9e4f96873ebacc0f653a55c3e1 Author: Cong Wang Date: Mon Nov 27 11:15:16 2017 -0800 xfrm: check id proto in validate_tmpl() syzbot reported a kernel warning in xfrm_state_fini(), which indicates that we have entries left in the list net->xfrm.state_all whose proto is zero. And xfrm_id_proto_match() doesn't consider them as a match with IPSEC_PROTO_ANY in this case. Proto with value 0 is probably not a valid value, at least verify_newsa_info() doesn't consider it valid either. This patch fixes it by checking the proto value in validate_tmpl() and rejecting invalid ones, like what iproute2 does in xfrm_xfrmproto_getbyname(). Reported-by: syzbot Cc: Steffen Klassert Cc: Herbert Xu Signed-off-by: Cong Wang Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 6e948c67c47211afcc65c9ccdeedbd5db5c57077 Merge: 4fc31ba 1b3b521 Author: Ingo Molnar Date: Wed Nov 29 07:12:36 2017 +0100 Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf tooling fixes from Arnaldo Carvalho de Melo: "- Fix window dimensions change handling in 'perf top' (Jiri Olsa) - Fix 'perf record -c/-F' options for CPU event aliases (Andi Kleen) - Generate PERF_RECORD_{MMAP,COMM,EXEC} with 'perf record --delay' fixing symbol resolution for processes created, maps put in place while --delay happens (Arnaldo Carvalho de Melo) - Fix up leftover perf_evsel_stat usage via evsel->priv, plugging a SEGV when using event groups as in: $ perf stat -e '{cpu-clock,instructions}' workload - Fix 'perf script --per-event-dump' for auxtrace synth evsels (Arnaldo Carvalho de Melo) - Ignore kptr_restrict when not sampling the kernel (Arnaldo Carvalho de Melo) - Synchronize kernel ABI headers wrt SPDX tags and ABI changes, taking minimal action to handle new syscall args and silencing perf build warnings (Arnaldo Carvalho de Melo, Ingo Molnar) - Fix header.size for namespace events (Jiri Olsa) - Fix a bug during strstart() conversion in 'perf help' (Namhyung Kim) - Do not truncate instruction names at 6 chars in 'perf annotate', there are really long instruction names in PPC (Ravi Bangoria) - Fixup discontiguous/sparse numa nodes in 'perf bench numa' (Satheesh Rajendran) - Fix an exit code of trace__symbols_init in 'perf trace' (Andrei Vagin) - Fix 'perf test' entries on s/390 (Thomas Richter) - Bring instruction decoder files used by Intel PT into line with the kernel, silencing build warning (Adrian Hunter)" Signed-off-by: Ingo Molnar commit 4fc31ba13d052c2933bf91095c063cf9a39effd0 Merge: 0e18dd1 b29c6ef Author: Ingo Molnar Date: Wed Nov 29 07:11:24 2017 +0100 Merge branch 'linus' into perf/urgent, to pick up dependent commits Signed-off-by: Ingo Molnar commit ecaaab5649781c5a0effdaf298a925063020500e Author: Eric Biggers Date: Tue Nov 28 20:56:59 2017 -0800 crypto: salsa20 - fix blkcipher_walk API usage When asked to encrypt or decrypt 0 bytes, both the generic and x86 implementations of Salsa20 crash in blkcipher_walk_done(), either when doing 'kfree(walk->buffer)' or 'free_page((unsigned long)walk->page)', because walk->buffer and walk->page have not been initialized. The bug is that Salsa20 is calling blkcipher_walk_done() even when nothing is in 'walk.nbytes'. But blkcipher_walk_done() is only meant to be called when a nonzero number of bytes have been provided. The broken code is part of an optimization that tries to make only one call to salsa20_encrypt_bytes() to process inputs that are not evenly divisible by 64 bytes. To fix the bug, just remove this "optimization" and use the blkcipher_walk API the same way all the other users do. Reproducer: #include #include #include int main() { int algfd, reqfd; struct sockaddr_alg addr = { .salg_type = "skcipher", .salg_name = "salsa20", }; char key[16] = { 0 }; algfd = socket(AF_ALG, SOCK_SEQPACKET, 0); bind(algfd, (void *)&addr, sizeof(addr)); reqfd = accept(algfd, 0, 0); setsockopt(algfd, SOL_ALG, ALG_SET_KEY, key, sizeof(key)); read(reqfd, key, sizeof(key)); } Reported-by: syzbot Fixes: eb6f13eb9f81 ("[CRYPTO] salsa20_generic: Fix multi-page processing") Cc: # v2.6.25+ Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu arch/x86/crypto/salsa20_glue.c | 7 ------- crypto/salsa20_generic.c | 7 ------- 2 files changed, 14 deletions(-) commit 45349821ab3a8d378b8f37e52c6fe1aa1b870c47 Author: Johannes Thumshirn Date: Tue Nov 28 16:26:57 2017 +0100 scsi: bfa: fix access to bfad_im_port_s Commit 'cd21c605b2cf ("scsi: fc: provide fc_bsg_to_shost() helper")' changed access to bfa's 'struct bfad_im_port_s' by using shost_priv() instead of shost->hostdata[0]. This lead to crashes like in the following back-trace: task: ffff880046375300 ti: ffff8800a2ef8000 task.ti: ffff8800a2ef8000 RIP: e030:[] [] bfa_fcport_get_attr+0x82/0x260 [bfa] RSP: e02b:ffff8800a2efba10 EFLAGS: 00010046 RAX: 575f415441536432 RBX: ffff8800a2efba28 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff8800a2efba28 RDI: ffff880004dc31d8 RBP: ffff880004dc31d8 R08: 0000000000000000 R09: 0000000000000001 R10: ffff88011fadc468 R11: 0000000000000001 R12: ffff880004dc31f0 R13: 0000000000000200 R14: ffff880004dc61d0 R15: ffff880004947a10 FS: 00007feb1e489700(0000) GS:ffff88011fac0000(0000) knlGS:0000000000000000 CS: e033 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00007ffe14e46c10 CR3: 00000000957b8000 CR4: 0000000000000660 Stack: ffff88001d4da000 ffff880004dc31c0 ffffffffa048a9df ffffffff81e56380 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [] bfad_iocmd_ioc_get_info+0x4f/0x220 [bfa] [] bfad_iocmd_handler+0xa00/0xd40 [bfa] [] bfad_im_bsg_request+0xee/0x1b0 [bfa] [] fc_bsg_dispatch+0x10b/0x1b0 [scsi_transport_fc] [] bsg_request_fn+0x11d/0x1c0 [] __blk_run_queue+0x2f/0x40 [] blk_execute_rq_nowait+0xa8/0x160 [] blk_execute_rq+0x77/0x120 [] bsg_ioctl+0x1b6/0x200 [] do_vfs_ioctl+0x2cd/0x4a0 [] SyS_ioctl+0x74/0x80 [] entry_SYSCALL_64_fastpath+0x12/0x6d Fixes: cd21c605b2cf ("scsi: fc: provide fc_bsg_to_shost() helper") Signed-off-by: Johannes Thumshirn Cc: Michal Koutný Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/bfa/bfad_bsg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d18539754d97876503275efc7d00a1901bb0cfad Author: Arnd Bergmann Date: Tue Nov 28 14:25:25 2017 +0100 scsi: aacraid: address UBSAN warning regression As reported by Meelis Roos, my previous patch causes an incorrect calculation of the timeout, through an undefined signed integer overflow: [ 12.228155] UBSAN: Undefined behaviour in drivers/scsi/aacraid/commsup.c:2514:49 [ 12.228229] signed integer overflow: [ 12.228283] 964297611 * 250 cannot be represented in type 'long int' The problem is that doing a multiplication with HZ first and then dividing by USEC_PER_SEC worked correctly for 32-bit microseconds, but not for 32-bit nanoseconds, which would require up to 41 bits. This reworks the calculation to first convert the nanoseconds into jiffies, which should give us the same result as before and not overflow. Unfortunately I did not understand the exact intention of the algorithm, in particular the part where we add half a second, so it's possible that there is still a preexisting problem in this function. I added a comment that this would be handled more nicely using usleep_range(), which generally works better for waking up at a particular time than the current schedule_timeout() based implementation. I did not feel comfortable trying to implement that without being sure what the intent is here though. Fixes: 820f18865912 ("scsi: aacraid: use timespec64 instead of timeval") Tested-by: Meelis Roos Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit fe55e79536a37348dcb0b7177ee5fda6deccb99a Author: Martin Wilck Date: Sat Nov 25 19:38:10 2017 +0100 scsi: libfc: fix ELS request handling The modification of fc_lport_recv_els_req() in commit fcabb09e59a7 ("scsi: libfc: directly call ELS request handlers") caused certain requests not to be handled at all. Fix that. Fixes: fcabb09e59a7 ("scsi: libfc: directly call ELS request handlers") Signed-off-by: Martin Wilck Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_lport.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9816ef6ecbc102b9bcbb1d83e12c7fb19924f38c Author: Dan Carpenter Date: Wed Nov 22 11:58:03 2017 +0300 scsi: lpfc: Use after free in lpfc_rq_buf_free() The error message dereferences "rqb_entry" so we need to print it first and then free the buffer. Fixes: 6c621a2229b0 ("scsi: lpfc: Separate NVMET RQ buffer posting from IO resources SGL/iocbq/context") Signed-off-by: Dan Carpenter Acked-by: Dick Kennedy Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af3ff8045bbf3e32f1a448542e73abb4c8ceb6f1 Author: Eric Biggers Date: Tue Nov 28 18:01:38 2017 -0800 crypto: hmac - require that the underlying hash algorithm is unkeyed Because the HMAC template didn't check that its underlying hash algorithm is unkeyed, trying to use "hmac(hmac(sha3-512-generic))" through AF_ALG or through KEYCTL_DH_COMPUTE resulted in the inner HMAC being used without having been keyed, resulting in sha3_update() being called without sha3_init(), causing a stack buffer overflow. This is a very old bug, but it seems to have only started causing real problems when SHA-3 support was added (requires CONFIG_CRYPTO_SHA3) because the innermost hash's state is ->import()ed from a zeroed buffer, and it just so happens that other hash algorithms are fine with that, but SHA-3 is not. However, there could be arch or hardware-dependent hash algorithms also affected; I couldn't test everything. Fix the bug by introducing a function crypto_shash_alg_has_setkey() which tests whether a shash algorithm is keyed. Then update the HMAC template to require that its underlying hash algorithm is unkeyed. Here is a reproducer: #include #include int main() { int algfd; struct sockaddr_alg addr = { .salg_type = "hash", .salg_name = "hmac(hmac(sha3-512-generic))", }; char key[4096] = { 0 }; algfd = socket(AF_ALG, SOCK_SEQPACKET, 0); bind(algfd, (const struct sockaddr *)&addr, sizeof(addr)); setsockopt(algfd, SOL_ALG, ALG_SET_KEY, key, sizeof(key)); } Here was the KASAN report from syzbot: BUG: KASAN: stack-out-of-bounds in memcpy include/linux/string.h:341 [inline] BUG: KASAN: stack-out-of-bounds in sha3_update+0xdf/0x2e0 crypto/sha3_generic.c:161 Write of size 4096 at addr ffff8801cca07c40 by task syzkaller076574/3044 CPU: 1 PID: 3044 Comm: syzkaller076574 Not tainted 4.14.0-mm1+ #25 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x137/0x190 mm/kasan/kasan.c:267 memcpy+0x37/0x50 mm/kasan/kasan.c:303 memcpy include/linux/string.h:341 [inline] sha3_update+0xdf/0x2e0 crypto/sha3_generic.c:161 crypto_shash_update+0xcb/0x220 crypto/shash.c:109 shash_finup_unaligned+0x2a/0x60 crypto/shash.c:151 crypto_shash_finup+0xc4/0x120 crypto/shash.c:165 hmac_finup+0x182/0x330 crypto/hmac.c:152 crypto_shash_finup+0xc4/0x120 crypto/shash.c:165 shash_digest_unaligned+0x9e/0xd0 crypto/shash.c:172 crypto_shash_digest+0xc4/0x120 crypto/shash.c:186 hmac_setkey+0x36a/0x690 crypto/hmac.c:66 crypto_shash_setkey+0xad/0x190 crypto/shash.c:64 shash_async_setkey+0x47/0x60 crypto/shash.c:207 crypto_ahash_setkey+0xaf/0x180 crypto/ahash.c:200 hash_setkey+0x40/0x90 crypto/algif_hash.c:446 alg_setkey crypto/af_alg.c:221 [inline] alg_setsockopt+0x2a1/0x350 crypto/af_alg.c:254 SYSC_setsockopt net/socket.c:1851 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1830 entry_SYSCALL_64_fastpath+0x1f/0x96 Reported-by: syzbot Cc: Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/hmac.c | 6 +++++- crypto/shash.c | 5 +++-- include/crypto/internal/hash.h | 8 ++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) commit 887207ed9e5812ed9239b6d07185a2d35dda91db Author: Eric Biggers Date: Tue Nov 28 00:46:24 2017 -0800 crypto: af_alg - fix NULL pointer dereference in af_alg_free_areq_sgls() If allocating the ->tsgl member of 'struct af_alg_async_req' failed, during cleanup we dereferenced the NULL ->tsgl pointer in af_alg_free_areq_sgls(), because ->tsgl_entries was nonzero. Fix it by only freeing the ->tsgl list if it is non-NULL. This affected both algif_skcipher and algif_aead. Fixes: e870456d8e7c ("crypto: algif_skcipher - overhaul memory management") Fixes: d887c52d6ae4 ("crypto: algif_aead - overhaul memory management") Reported-by: syzbot Cc: # v4.14+ Signed-off-by: Eric Biggers Reviewed-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/af_alg.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit b32a7dc8aef1882fbf983eb354837488cc9d54dc Author: Eric Biggers Date: Mon Nov 27 23:23:05 2017 -0800 crypto: algif_aead - fix reference counting of null skcipher In the AEAD interface for AF_ALG, the reference to the "null skcipher" held by each tfm was being dropped in the wrong place -- when each af_alg_ctx was freed instead of when the aead_tfm was freed. As discovered by syzkaller, a specially crafted program could use this to cause the null skcipher to be freed while it is still in use. Fix it by dropping the reference in the right place. Fixes: 72548b093ee3 ("crypto: algif_aead - copy AAD from src to dst") Reported-by: syzbot Cc: # v4.14+ Signed-off-by: Eric Biggers Reviewed-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/algif_aead.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2890c3778b164fde587bc16583f3a1c87233ec5 Author: Eric Biggers Date: Sun Nov 26 23:16:49 2017 -0800 crypto: rsa - fix buffer overread when stripping leading zeroes In rsa_get_n(), if the buffer contained all 0's and "FIPS mode" is enabled, we would read one byte past the end of the buffer while scanning the leading zeroes. Fix it by checking 'n_sz' before '!*ptr'. This bug was reachable by adding a specially crafted key of type "asymmetric" (requires CONFIG_RSA and CONFIG_X509_CERTIFICATE_PARSER). KASAN report: BUG: KASAN: slab-out-of-bounds in rsa_get_n+0x19e/0x1d0 crypto/rsa_helper.c:33 Read of size 1 at addr ffff88003501a708 by task keyctl/196 CPU: 1 PID: 196 Comm: keyctl Not tainted 4.14.0-09238-g1d3b78bbc6e9 #26 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-20171110_100015-anatol 04/01/2014 Call Trace: rsa_get_n+0x19e/0x1d0 crypto/rsa_helper.c:33 asn1_ber_decoder+0x82a/0x1fd0 lib/asn1_decoder.c:328 rsa_set_pub_key+0xd3/0x320 crypto/rsa.c:278 crypto_akcipher_set_pub_key ./include/crypto/akcipher.h:364 [inline] pkcs1pad_set_pub_key+0xae/0x200 crypto/rsa-pkcs1pad.c:117 crypto_akcipher_set_pub_key ./include/crypto/akcipher.h:364 [inline] public_key_verify_signature+0x270/0x9d0 crypto/asymmetric_keys/public_key.c:106 x509_check_for_self_signed+0x2ea/0x480 crypto/asymmetric_keys/x509_public_key.c:141 x509_cert_parse+0x46a/0x620 crypto/asymmetric_keys/x509_cert_parser.c:129 x509_key_preparse+0x61/0x750 crypto/asymmetric_keys/x509_public_key.c:174 asymmetric_key_preparse+0xa4/0x150 crypto/asymmetric_keys/asymmetric_type.c:388 key_create_or_update+0x4d4/0x10a0 security/keys/key.c:850 SYSC_add_key security/keys/keyctl.c:122 [inline] SyS_add_key+0xe8/0x290 security/keys/keyctl.c:62 entry_SYSCALL_64_fastpath+0x1f/0x96 Allocated by task 196: __do_kmalloc mm/slab.c:3711 [inline] __kmalloc_track_caller+0x118/0x2e0 mm/slab.c:3726 kmemdup+0x17/0x40 mm/util.c:118 kmemdup ./include/linux/string.h:414 [inline] x509_cert_parse+0x2cb/0x620 crypto/asymmetric_keys/x509_cert_parser.c:106 x509_key_preparse+0x61/0x750 crypto/asymmetric_keys/x509_public_key.c:174 asymmetric_key_preparse+0xa4/0x150 crypto/asymmetric_keys/asymmetric_type.c:388 key_create_or_update+0x4d4/0x10a0 security/keys/key.c:850 SYSC_add_key security/keys/keyctl.c:122 [inline] SyS_add_key+0xe8/0x290 security/keys/keyctl.c:62 entry_SYSCALL_64_fastpath+0x1f/0x96 Fixes: 5a7de97309f5 ("crypto: rsa - return raw integers for the ASN.1 parser") Cc: # v4.8+ Cc: Tudor Ambarus Signed-off-by: Eric Biggers Reviewed-by: James Morris Reviewed-by: David Howells Signed-off-by: Herbert Xu crypto/rsa_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e501506d3ea00eefa64463ebd9e5c13ee70990bd Author: Fabio Estevam Date: Wed Nov 15 10:03:53 2017 -0200 Revert "ARM: dts: imx53: add srtc node" This reverts commit 5b725054147deaf966b3919e10a86c6bfe946a18. The rtc block on i.MX53 is a completely different hardware than the one found on i.MX25. Cc: #4.14 Reported-by: Noel Vellemans Suggested-by: Juergen Borleis Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53.dtsi | 9 --------- 1 file changed, 9 deletions(-) commit f006ed726a5e1f8c94cf2ad7545eeb9a11f3c694 Author: Fabio Estevam Date: Sun Nov 5 10:18:32 2017 -0200 ARM: dts: vf610-zii-dev-rev-c: Fix the I2C EEPROM address at24mac602 should be at the I2C address 0x50, so that it matches the 'reg' property. Fixes: d4cd158176c3 ("ARM: dts: vf610-zii-dev: Add .dts file for rev. C") Signed-off-by: Fabio Estevam Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo arch/arm/boot/dts/vf610-zii-dev-rev-c.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 329b4130bc5eb2a1b123a652b985dbdb08d6b9a8 Author: Alexey Brodkin Date: Thu Nov 23 13:21:55 2017 +0300 ARC: Fix detection of dual-issue enabled As per PRM bit #0 ("D") in EXEC_CTRL enables dual-issue if set to 0, otherwise if set to 1 all instructions are executed one at a time, i.e. dual-issue is disabled. Signed-off-by: Alexey Brodkin Signed-off-by: Vineet Gupta arch/arc/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6424f6bb432752c7eb90cbeeb1c31d6125bba39a Author: Tobin C. Harding Date: Wed Nov 1 15:32:22 2017 +1100 kasan: use %px to print addresses instead of %p Pointers printed with %p are now hashed by default. Kasan needs the actual address. We can use the new printk specifier %px for this purpose. Use %px instead of %p to print addresses. Signed-off-by: Tobin C. Harding mm/kasan/report.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7b1924a1d930eb27fc79c4e4e2a6c1c970623e68 Author: Tobin C. Harding Date: Thu Nov 23 10:59:45 2017 +1100 vsprintf: add printk specifier %px printk specifier %p now hashes all addresses before printing. Sometimes we need to see the actual unmodified address. This can be achieved using %lx but then we face the risk that if in future we want to change the way the Kernel handles printing of pointers we will have to grep through the already existent 50 000 %lx call sites. Let's add specifier %px as a clear, opt-in, way to print a pointer and maintain some level of isolation from all the other hex integer output within the Kernel. Add printk specifier %px to print the actual unmodified address. Signed-off-by: Tobin C. Harding Documentation/printk-formats.txt | 18 +++++++++++++++++- lib/vsprintf.c | 18 ++++++++++++++++++ scripts/checkpatch.pl | 2 +- 3 files changed, 36 insertions(+), 2 deletions(-) commit ad67b74d2469d9b82aaa572d76474c95bc484d57 Author: Tobin C. Harding Date: Wed Nov 1 15:32:23 2017 +1100 printk: hash addresses printed with %p Currently there exist approximately 14 000 places in the kernel where addresses are being printed using an unadorned %p. This potentially leaks sensitive information regarding the Kernel layout in memory. Many of these calls are stale, instead of fixing every call lets hash the address by default before printing. This will of course break some users, forcing code printing needed addresses to be updated. Code that _really_ needs the address will soon be able to use the new printk specifier %px to print the address. For what it's worth, usage of unadorned %p can be broken down as follows (thanks to Joe Perches). $ git grep -E '%p[^A-Za-z0-9]' | cut -f1 -d"/" | sort | uniq -c 1084 arch 20 block 10 crypto 32 Documentation 8121 drivers 1221 fs 143 include 101 kernel 69 lib 100 mm 1510 net 40 samples 7 scripts 11 security 166 sound 152 tools 2 virt Add function ptr_to_id() to map an address to a 32 bit unique identifier. Hash any unadorned usage of specifier %p and any malformed specifiers. Signed-off-by: Tobin C. Harding Documentation/printk-formats.txt | 12 ++++- lib/test_printf.c | 108 +++++++++++++++++++++++++-------------- lib/vsprintf.c | 81 ++++++++++++++++++++++++++--- 3 files changed, 155 insertions(+), 46 deletions(-) commit 57e734423adda83f3b05505875343284efe3b39c Author: Tobin C. Harding Date: Thu Nov 23 10:56:39 2017 +1100 vsprintf: refactor %pK code out of pointer() Currently code to handle %pK is all within the switch statement in pointer(). This is the wrong level of abstraction. Each of the other switch clauses call a helper function, pK should do the same. Refactor code out of pointer() to new function restricted_pointer(). Signed-off-by: Tobin C. Harding lib/vsprintf.c | 97 ++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 54 insertions(+), 43 deletions(-) commit 553d8e8b107159088cc4e2855a2bd9a358365e3f Author: Tobin C. Harding Date: Thu Nov 23 10:55:24 2017 +1100 docs: correct documentation for %pK Current documentation indicates that %pK prints a leading '0x'. This is not the case. Correct documentation for printk specifier %pK. Signed-off-by: Tobin C. Harding Documentation/printk-formats.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 43570f0383d6d5879ae585e6c3cf027ba321546f Merge: 43f462f c14ca83 Author: Linus Torvalds Date: Tue Nov 28 16:22:10 2017 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: - avoid potential bogus alignment for some AEAD operations - fix crash in algif_aead - avoid sleeping in softirq context with async af_alg * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: skcipher - Fix skcipher_walk_aead_common crypto: af_alg - remove locking in async callback crypto: algif_aead - skip SGL entries with NULL page commit 97011249c3b2ba6b038a2af7025063d62d1448ec Author: Hersen Wu Date: Mon Nov 20 12:45:54 2017 -0500 drm/amd/display: USB-C / thunderbolt dock specific workaround reading dpcd 0x600 cause link loss for a particular USB-C dock with thurderbolt. workaround by avoiding dcpd 0x600 read unless it's necessary. Signed-off-by: Hersen Wu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 85 +++++++++++------------- 1 file changed, 40 insertions(+), 45 deletions(-) commit 320a127437e5d3cbb7fc444f8769eb510d11d3b9 Author: Andrey Grodzovsky Date: Tue Nov 14 20:45:52 2017 -0500 drm/amd/display: Switch to drm_atomic_helper_wait_for_flip_done This new helper function is advised to be used for drviers that use the nonblocking commit tracking support instead of drm_atomic_helper_wait_for_vblanks. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Reviewed-and-Tested-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5c9cb6e00047b194d54cadc1e91156f2875a3e5 Author: Roman Li Date: Thu Nov 16 17:22:39 2017 -0500 drm/amd/display: fix gamma setting Adding gamma changed check as condition for affected plane. We ignored adding plane as affected if modeset was not required. But for color management change we still need it. Signed-off-by: Roman Li Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0a24bfcb2cc2cd161a0c8aae8fcbb58239d5da2b Author: Leo (Sunpeng) Li Date: Thu Nov 16 15:17:27 2017 -0500 drm/amd/display: Do not put drm_atomic_state on resume drm_atomic_helper_resume now puts it for us. See relevant patch here: https://lists.freedesktop.org/archives/dri-devel/2017-October/154268.html Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 1 file changed, 1 deletion(-) commit e41ab0309a1b75d31c360d1d2b0de58e8d7958ad Author: Harry Wentland Date: Fri Nov 10 20:35:27 2017 -0500 drm/amd/display: Fix couple more inconsistent NULL checks in dc_resource Found by smatch: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:1001 acquire_free_pipe_for_stream() error: we previously assumed 'head_pipe' could be null (see line 998) drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:1808 dc_validate_global_state() error: we previously assumed 'new_ctx' could be null (see line 1778) Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit edf38b58ecd847df75723fb90d4a1c3669b1e670 Author: Harry Wentland Date: Fri Nov 10 20:11:37 2017 -0500 drm/amd/display: Fix potential NULL and mem leak in create_links Found by smatch: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:148 create_links() error: potential null dereference 'link->link_enc'. (kzalloc returns null) Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit b3fb2b4e21a995c4fa511627088bd55b88f6be11 Author: Harry Wentland Date: Fri Nov 10 19:49:44 2017 -0500 drm/amd/display: Fix hubp check in set_cursor_position Found by smatch: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:298 dc_stream_set_cursor_position() error: we previously assumed 'hubp' could be null (see line 294) Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 9 ++++----- drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 7 ------- 2 files changed, 4 insertions(+), 12 deletions(-) commit b001965d4eb5e4c0e3de7dc6dce1d45ca25232a7 Author: Harry Wentland Date: Fri Nov 10 12:11:44 2017 -0500 drm/amd/display: Fix use before NULL check in validate_timing Found by smatch: drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_timing_generator.c:1124 dce110_timing_generator_validate_timing() warn: variable dereferenced before check 'timing' (see line 1116) Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a8f9764731968d6a63f6f98c5b0d4e7a0e4154e2 Author: Harry Wentland Date: Fri Nov 10 11:56:15 2017 -0500 drm/amd/display: Bunch of smatch error and warning fixes in DC drivers/gpu/drm/amd/amdgpu/../display/dc/basics/log_helpers.c:79 dc_conn_log() error: buffer overflow 'signal_type_info_tbl' 10 <= 10 drivers/gpu/drm/amd/amdgpu/../display/dc/bios/bios_parser.c:266 bios_parser_get_dst_obj() error: uninitialized symbol 'id'. drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_audio.c:357 dce_aud_az_enable() warn: inconsistent indenting drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_resource.c:958 dcn10_acquire_idle_pipe_for_layer() error: we previously assumed 'head_pipe' could be null (see line 952) Signed-off-by: Harry Wentland Reviewed-by: Sun peng Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/log_helpers.c | 5 +++++ drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 10 +++++----- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 6 ++++-- 4 files changed, 16 insertions(+), 9 deletions(-) commit 70e8ffc55b98f31af700eae525fef5d0b8fcb6e1 Author: Harry Wentland Date: Fri Nov 10 11:19:02 2017 -0500 drm/amd/display: Fix amdgpu_dm bugs found by smatch drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:2760 create_eml_sink() warn: variable dereferenced before check 'aconnector->base.edid_blob_ptr' (see line 2758) drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4270 amdgpu_dm_atomic_commit_tail() warn: variable dereferenced before check 'dm_new_crtc_state->stream' (see line 4266) drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4417 dm_restore_drm_connector_state() warn: variable dereferenced before check 'disconnected_acrtc' (see line 4415) Signed-off-by: Harry Wentland Reviewed-by: Sun peng Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit cfb071f7a9673109415d097125b3c12c16836acc Author: Charlene Liu Date: Wed Nov 15 18:55:57 2017 -0500 drm/amd/display: try to find matching audio inst for enc inst first [Description] in eDP+ HDMI/DP clone or extended configuration, audio inst changed from inst 1 to inst0. No failure related this though, just playback device endpoint inst changed. Also remove one addition register read. Signed-off-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 9 +++++++-- drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 4 +--- 2 files changed, 8 insertions(+), 5 deletions(-) commit 2b7c97d687e81db07d8c67b32ff920e7bf59444e Author: Charlene Liu Date: Wed Nov 15 18:27:31 2017 -0500 drm/amd/display: fix seq issue: turn on clock before programming afmt. Signed-off-by: Charlene Liu Reviewed-by: Krunoslav Kovac Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dce/dce_stream_encoder.c | 5 +++++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 22 ++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) commit 2f2c3b36fc5a3dc9fd2cf22a2f368502a70eea5d Author: Colin Ian King Date: Wed Nov 22 16:47:35 2017 +0000 drm/amd/display: fix memory leaks on error exit return Currently in the case where some of the allocations fail for dce110_tgv, dce110_xfmv, dce110_miv or dce110_oppv then the exit return path ends up leaking allocated objects. Fix this by kfree'ing them before returning. Also re-work the comparison of the null pointers to use the !ptr idiom. Detected by CoverityScan, CID#1460246, 1460325, 1460324, 1460392 ("Resource Leak") Fixes: c4562236b3bc ("drm/amd/dc: Add dc display driver (v2)") Signed-off-by: Colin Ian King Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 93984bbc70b3f321b8f6a3ec303e31b084e54230 Author: Shirish S Date: Mon Nov 20 10:37:08 2017 +0530 drm/amd/display: check plane state before validating fbc While validation fbc, array_mode of the pipe is accessed without checking plane_state exists for it. Causing to null pointer dereferencing followed by reboot when a crtc associated with external display(not connected) is page flipped. This patch adds a check for plane_state before using it to validate fbc. Signed-off-by: Shirish S Reviewed-by: Roman Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8ffca5dca093cdd25264e782cc0c4539cb318925 Author: Leo (Sunpeng) Li Date: Fri Nov 10 15:02:19 2017 -0500 drm/amd/display: Do DC mode-change check when adding CRTCs Within atomic check, dm_update_crtcs_state is called twice. First to remove from the dc_state, and subsequently to add to it. In both calls, a secondary mode-change check is done using dc-level states. We shouldn't be doing this while removing, since a new dc_stream_state has not been created to do the necessary comparison. Because of this, the mode_changed flag within the DRM state can be mistakenly set to false. Doing so only when adding prevents this. We are also guaranteed that a call to add will come after remove, or else the atomic check fails (and a commit will not happen). Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b61973f9e0e7724bdc779ef3f9b55bd21b08db4 Author: Jordan Lazare Date: Mon Nov 13 17:57:33 2017 -0400 drm/amd/display: Revert noisy assert messages This partially reverts commit 4fb48bb66211 ("dc: fix split viewport rounding error"). Signed-off-by: Jordan Lazare Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 4 ---- 1 file changed, 4 deletions(-) commit 16fb754a294d25f4077e1f475d930c22698f442a Author: Dmytro Laktyushkin Date: Fri Nov 10 13:53:53 2017 -0500 drm/amd/display: fix split viewport rounding error Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 4 ++++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 10 ++++------ 2 files changed, 8 insertions(+), 6 deletions(-) commit 30ec2b9717c1c6616332f8ce7c0cb3dd72032a2e Author: Jerry (Fangzhi) Zuo Date: Fri Nov 3 16:04:34 2017 -0400 drm/amd/display: Check aux channel before MST resume It is to fix: MST display failed to resume from S3 At the beginning of resume from S3, need to check if mgr->aux is NULL. Fake MST encoder doesn't have real aux channel. Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 116b2632ab033b2a755c1c7b703fede6860b3140 Author: Dmytro Laktyushkin Date: Tue Oct 24 17:57:38 2017 -0400 drm/amd/display: fix split recout offset Previous recout calculation fix changed recout size rounding and affected the offset when it should not have Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1c72be981e8a18b4b4ad9d7fc4620bd19c2aba7f Author: Andrew Jiang Date: Tue Oct 24 12:00:55 2017 -0400 drm/amd/display: Don't reject 3D timings Signed-off-by: Andrew Jiang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 3 --- 1 file changed, 3 deletions(-) commit 58fe8990fc29336c9ea6531d9ecc44466d3b9221 Author: Hersen Wu Date: Mon Oct 23 09:11:46 2017 -0400 drm/amd/display: Handle as MST first and then DP dongle if sink support both Signed-off-by: Hersen Wu Reviewed-by: Tony Cheng Reviewed-by: Wenjing Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 4ddd76d1ce00bb0d78e73e29fd9062ecd6bad611 Author: Dmytro Laktyushkin Date: Mon Oct 23 15:37:37 2017 -0400 drm/amd/display: fix split recout calculation Recout split rounding code was wrong Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 3eb4eba42263cc1e810d79b4970cbcb096c210ab Author: Roman Li Date: Fri Oct 20 10:15:18 2017 -0400 drm/amd/display: Fix S3 topology change Clean fake sink flag on resume if real sink connected. Fixing S3 topology change problem like this: 1) x desktop with 1 or > displays 2) unplug display 3) suspend 4) replug same display 5) resume without this change replugged display doesn't light up Signed-off-by: Roman Li Reviewed-by: Sun peng Li Acked-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6bffebc90c23e2341a1f8371e7b496ec94136e47 Author: Eric Yang Date: Wed Oct 18 20:22:40 2017 -0400 drm/amd/display: Add timing validation against dongle cap For DP active dongles, the dpcd dongle caps are read but not used to validate mode timing. This addresses this. In particular, this change fixes light up on the HDMI 4k TV connected through DP active dongle. Since the 4k TV defaults to YCbCr420, which the dongle don't support. This change does not address MST cases, a more generalized approach must be taken for that. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 1 + drivers/gpu/drm/amd/display/dc/core/dc_link.c | 70 +++++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 21 ++++++- drivers/gpu/drm/amd/display/dc/inc/core_status.h | 2 +- 4 files changed, 91 insertions(+), 3 deletions(-) commit 827f11e97dbc591f0c9619151b9a89f082e8ecb8 Author: Leo (Sunpeng) Li Date: Tue Oct 17 17:18:24 2017 -0400 drm/amd/display: Should disable when new stream is null core_link_disable_stream should be called when the new stream is null (i.e. want to disable). Modify the if condition to reflect that. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1b6c80674192bd6b235de7bc58f0bd03eb7f89df Author: Bhawanpreet Lakha Date: Fri Oct 13 12:13:02 2017 -0400 drm/amd/display: Add null check for 24BPP (xfm and dpp) Fixes Nullptr error when trying 24BPP Signed-off-by: Bhawanpreet Lakha Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit acc34503bd22bd826bbf7b7f95c84a06bb6380e4 Author: Alex Deucher Date: Fri Jun 2 14:50:01 2017 -0400 drm/amdgpu: drop experimental flag for raven Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6edc6910ba4cd6eab309263539c8f09b8ad772bf Author: Christian König Date: Fri Nov 24 11:39:30 2017 +0100 drm/amdgpu: don't try to move pinned BOs Never try to move pinned BOs during CS. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++++ 1 file changed, 4 insertions(+) commit fa7c7939b4bf112cd06ba166b739244077898990 Author: Michel Dänzer Date: Wed Nov 22 15:55:21 2017 +0100 drm/amdgpu: Use unsigned ring indices in amdgpu_queue_mgr_map This matches the corresponding UAPI fields. Treating the ring index as signed could result in accessing random unrelated memory if the MSB was set. Fixes: effd924d2f3b ("drm/amdgpu: untie user ring ids from kernel ring ids v6") Cc: stable@vger.kernel.org Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 89ce6e0afee8eafa679093207dabd717af9d09c5 Author: Michel Dänzer Date: Wed Nov 22 15:55:21 2017 +0100 drm/amdgpu: Set adev->vcn.irq.num_types for VCN We were setting adev->uvd.irq.num_types instead. Fixes: 9b257116e784 ("drm/amdgpu: add vcn enc irq support") Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b693fc1f83bc9aa5e86c87ac7da48870e45bf486 Author: Alex Deucher Date: Mon Nov 27 17:46:50 2017 -0500 Revert "drm/amdgpu: fix rmmod KCQ disable failed error" This reverts commit 446947b44fb8cabc0213ff4efd706931e36b1963. this patch is incorrrect, amdgpu_ucode_bo_fini always called after gfx_hw_fini. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 --- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) commit aca31681b1a594dd1a25a51ff2c58f4f4a165446 Author: Alex Deucher Date: Tue Nov 21 13:53:29 2017 -0500 drm/amdgpu: used cached gca values for cik_read_register Using the cached values has less latency for bare metal and prevents reading back bogus values if the engine is powergated. This was implemented for VI and SI, but somehow CIK got missed. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cik.c | 111 +++++++++++++++++++++++++++++++++------ 1 file changed, 95 insertions(+), 16 deletions(-) commit ed162fe7643023b52cc21998a6b3eff15a233c5e Author: Alex Deucher Date: Mon Nov 13 15:41:30 2017 -0500 drm/amdgpu/gfx7: cache raster_config values We did this for gfx6 and 8, but somehow missed gfx7. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit b43aaee69d4327d05e7624d9471c17d015b4d67d Author: Leo Liu Date: Tue Nov 21 09:08:07 2017 -0500 drm/amdgpu: move UVD/VCE and VCN structure out from union With the enablement of VCN Dec and Enc from user space, User space queries kernel for the IP information, if HW has UVD/VCE, the info comes from these IP blocks, but this could end up mis-interpret for VCN when they are in the union, the other way same when HW with VCN block. Signed-off-by: Leo Liu Acked-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher Fixes: 95d0906f8506 ("drm/amdgpu: add initial vcn support and decode tests") Cc: stable@vger.kernel.org Reviewed-and-Tested-by: Michel Dänzer drivers/gpu/drm/amd/amdgpu/amdgpu.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit bf730552734372e45b10fe056726de1950fdfdde Author: Palmer Dabbelt Date: Tue Nov 28 14:06:31 2017 -0800 RISC-V: remove spin_unlock_wait() This was removed from the other architectures in commit 952111d7db02 ("arch: Remove spin_unlock_wait() arch-specific definitions"). That landed between when we got upstream and when our patches were reviewed, so this is a followup patch. Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/spinlock.h | 9 --------- 1 file changed, 9 deletions(-) commit c901e45a999a1935d7adf653e1cf12dfbcd737aa Author: Palmer Dabbelt Date: Tue Nov 28 14:06:17 2017 -0800 RISC-V: `sfence.vma` orderes the instruction cache This is just a comment change, but it's one that bit me on the mailing list. It turns out that issuing a `sfence.vma` enforces instruction cache ordering in addition to TLB ordering. This isn't explicitly called out in the ISA manual, but Andrew will be making that more clear in a future revision. CC: Andrew Waterman Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/tlbflush.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 21db403660d1433b8a02b26d5d4084921b857c40 Author: Palmer Dabbelt Date: Tue Nov 28 14:05:04 2017 -0800 RISC-V: Add READ_ONCE in arch_spin_is_locked() This was just incorrect in the original version. Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/spinlock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9347ce54cd699db92d37e66191aa4b9a0a92304e Author: Palmer Dabbelt Date: Tue Nov 28 14:04:05 2017 -0800 RISC-V: __test_and_op_bit_ord should be strongly ordered I mis-read the documentation. After looking at it again the documentation is actually as clear as it can be, it's just that I didn't actually read it in order and therefor did the wrong thing. Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3343eb6806f365b9e3d451040671fa9336e57513 Author: Palmer Dabbelt Date: Tue Nov 28 14:03:55 2017 -0800 RISC-V: Remove smb_mb__{before,after}_spinlock() These are obselete. Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/barrier.h | 8 -------- 1 file changed, 8 deletions(-) commit 61a60d35b7d1b0b3a31bc21d15805a3654f60920 Author: Palmer Dabbelt Date: Tue Nov 28 14:03:48 2017 -0800 RISC-V: Remove __smp_bp__{before,after}_atomic These duplicate the asm-generic definitions are therefor aren't useful. Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/barrier.h | 15 --------------- 1 file changed, 15 deletions(-) commit 8286d51a6c244738aeb071fcd7d2e36a3374e150 Author: Palmer Dabbelt Date: Tue Nov 28 14:02:50 2017 -0800 RISC-V: Comment on why {,cmp}xchg is ordered how it is This is another memory model FIXME. Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/atomic.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 4650d02ad2d9b2c1c7aa36055166db6aee68f72e Author: Palmer Dabbelt Date: Tue Nov 14 11:35:37 2017 -0800 RISC-V: Remove unused arguments from ATOMIC_OP Our atomics are generated from a complicated series of preprocessor macros, each of which is slightly different from the last. When writing the macros I'd accidentally left some unused arguments floating around. This patch removes the unused macro arguments. Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/atomic.h | 94 ++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 47 deletions(-) commit d51aae68b142f48232257e96ce317db25445418d Author: Jiri Pirko Date: Mon Nov 27 18:37:21 2017 +0100 net: sched: cbq: create block for q->link.block q->link.block is not initialized, that leads to EINVAL when one tries to add filter there. So initialize it properly. This can be reproduced by: $ tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 rate 1000Mbit bandwidth 1000Mbit $ tc filter add dev eth0 parent 1: protocol ip prio 100 u32 match ip protocol 0 0x00 flowid 1:1 Reported-by: Jaroslav Aster Reported-by: Ivan Vecera Fixes: 6529eaba33f0 ("net: sched: introduce tcf block infractructure") Signed-off-by: Jiri Pirko Acked-by: Eelco Chaudron Reviewed-by: Ivan Vecera Signed-off-by: David S. Miller net/sched/sch_cbq.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 0195a21079c077abfb475a56830b06b37424982a Author: Colin Ian King Date: Mon Nov 27 13:47:22 2017 +0000 atm: suni: remove extraneous space to fix indentation Remove a leading space, fixes indentation Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/atm/suni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c9065427072b4e726a2c17f9aa2448d87a92097 Author: Colin Ian King Date: Mon Nov 27 13:39:32 2017 +0000 atm: lanai: use %p to format kernel addresses instead of %x Don't use %x and casting to print out a kernel address, instead use %p and remove the casting. Cleans up smatch warnings: drivers/atm/lanai.c:1589 service_buffer_allocate() warn: argument 2 to %08lX specifier is cast from pointer drivers/atm/lanai.c:2221 lanai_dev_open() warn: argument 4 to %lx specifier is cast from pointer Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/atm/lanai.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4a5def7f6a758aef1a0a3b10e981881c1e914f69 Author: Jorgen Hansen Date: Mon Nov 27 05:29:32 2017 -0800 VSOCK: Don't set sk_state to TCP_CLOSE before testing it A recent commit (3b4477d2dcf2) converted the sk_state to use TCP constants. In that change, vmci_transport_handle_detach was changed such that sk->sk_state was set to TCP_CLOSE before we test whether it is TCP_SYN_SENT. This change moves the sk_state change back to the original locations in that function. Signed-off-by: Jorgen Hansen Reviewed-by: Stefan Hajnoczi Signed-off-by: David S. Miller net/vmw_vsock/vmci_transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 22dac9f1fdd576c1d03ba00f4a9db9a864a43a70 Author: Colin Ian King Date: Mon Nov 27 13:24:15 2017 +0000 atm: fore200e: use %pK to format kernel addresses instead of %x Don't use %x and casting to print out a kernel address, instead use the %pK and remove the casting. Cleans up smatch warning: drivers/atm/fore200e.c:3093 fore200e_proc_read() warn: argument 3 to %08x specifier is cast from pointer Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/atm/fore200e.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c95c3fe5c744b05647240aaba4a163be36b7f123 Author: Colin Ian King Date: Mon Nov 27 13:06:10 2017 +0000 ambassador: fix incorrect indentation of assignment statement Remove one extraneous level of indentation on assignment statement. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/atm/ambassador.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc39c38bdc46c49e1e9166afbeb686634e63cbaf Author: Xin Long Date: Sun Nov 26 21:19:05 2017 +0800 vxlan: use __be32 type for the param vni in __vxlan_fdb_delete All callers of __vxlan_fdb_delete pass vni with __be32 type, and this param should be declared as __be32 type. Fixes: 3ad7a4b141eb ("vxlan: support fdb and learning in COLLECT_METADATA mode") Signed-off-by: Xin Long Signed-off-by: David S. Miller drivers/net/vxlan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5eb3d22a8a05af401257e781ddeefc412bfb8542 Author: Xin Long Date: Sun Nov 26 21:12:09 2017 +0800 bonding: use nla_get_u64 to extract the value for IFLA_BOND_AD_ACTOR_SYSTEM bond_opt_initval expects a u64 type param, it's better to use nla_get_u64 to extract the value here, to eliminate a sparse endianness mismatch warning. Fixes: 171a42c38c6e ("bonding: add netlink support for sys prio, actor sys mac, and port key") Signed-off-by: Xin Long Signed-off-by: David S. Miller drivers/net/bonding/bond_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8dd397903a6e57157f6265911f7d35681364427 Author: Xin Long Date: Sun Nov 26 20:56:07 2017 +0800 sctp: use right member as the param of list_for_each_entry Commit d04adf1b3551 ("sctp: reset owner sk for data chunks on out queues when migrating a sock") made a mistake that using 'list' as the param of list_for_each_entry to traverse the retransmit, sacked and abandoned queues, while chunks are using 'transmitted_list' to link into these queues. It could cause NULL dereference panic if there are chunks in any of these queues when peeling off one asoc. So use the chunk member 'transmitted_list' instead in this patch. Fixes: d04adf1b3551 ("sctp: reset owner sk for data chunks on out queues when migrating a sock") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/socket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f85729d07cd649bf69820f14bdad36326a24a699 Author: Paolo Abeni Date: Tue Nov 28 14:28:39 2017 +0100 sch_sfq: fix null pointer dereference at timer expiration While converting sch_sfq to use timer_setup(), the commit cdeabbb88134 ("net: sched: Convert timers to use timer_setup()") forgot to initialize the 'sch' field. As a result, the timer callback tries to dereference a NULL pointer, and the kernel does oops. Fix it initializing such field at qdisc creation time. Fixes: cdeabbb88134 ("net: sched: Convert timers to use timer_setup()") Signed-off-by: Paolo Abeni Acked-by: Cong Wang Acked-by: Kees Cook Signed-off-by: David S. Miller net/sched/sch_sfq.c | 1 + 1 file changed, 1 insertion(+) commit 25415cec502a1232b19fffc85465882b19a90415 Author: Jakub Kicinski Date: Mon Nov 27 11:11:41 2017 -0800 cls_bpf: don't decrement net's refcount when offload fails When cls_bpf offload was added it seemed like a good idea to call cls_bpf_delete_prog() instead of extending the error handling path, since the software state is fully initialized at that point. This handling of errors without jumping to the end of the function is error prone, as proven by later commit missing that extra call to __cls_bpf_delete_prog(). __cls_bpf_delete_prog() is now expected to be invoked with a reference on exts->net or the field zeroed out. The call on the offload's error patch does not fullfil this requirement, leading to each error stealing a reference on net namespace. Create a function undoing what cls_bpf_set_parms() did and use it from __cls_bpf_delete_prog() and the error path. Fixes: aae2c35ec892 ("cls_bpf: use tcf_exts_get_net() before call_rcu()") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Daniel Borkmann Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_bpf.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 250dcd11466e06df64b92520e2c56bdae453581b Author: Ulf Hansson Date: Mon Nov 27 11:28:50 2017 +0100 mmc: sdhci: Avoid swiotlb buffer being full The commit de3ee99b097d ("mmc: Delete bounce buffer handling") deletes the bounce buffer handling, but also causes the max_req_size for sdhci to be increased, in case when max_segs == 1. This causes errors for sdhci-pci Ricoh variant, about the swiotlb buffer to become full. Fix the issue, by taking IO_TLB_SEGSIZE and IO_TLB_SHIFT into account when deciding the max_req_size for sdhci. Reported-by: Jiri Slaby Fixes: de3ee99b097d ("mmc: Delete bounce buffer handling") Cc: # v4.14+ Signed-off-by: Ulf Hansson Tested-by: Jiri Slaby Acked-by: Adrian Hunter drivers/mmc/host/sdhci.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) commit f81a348728ec5ac43f3bbcf81c97d52baba253f7 Author: Mark Rutland Date: Tue Nov 21 11:59:13 2017 +0000 arm64: mm: cleanup stale AIVIVT references Since commit: 155433cb365ee466 ("arm64: cache: Remove support for ASID-tagged VIVT I-caches") ... the kernel no longer cares about AIVIVT I-caches, as these were removed from the architecture. This patch removes the stale references to such I-caches. The comment in flush_context() is also updated to clarify when and where the TLB invalidation occurs. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/include/asm/cacheflush.h | 2 +- arch/arm64/mm/context.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) commit 43f462f1c2e111d2882b48baeeff774ae42e7c56 Merge: 3c02a6d c209101 Author: Linus Torvalds Date: Tue Nov 28 10:01:15 2017 -0800 Merge tag 'drm-for-v4.15-part2-fixes' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: - TTM regression fix for some virt gpus (bochs vga) - a few i915 stable fixes - one vc4 fix - one uapi fix * tag 'drm-for-v4.15-part2-fixes' of git://people.freedesktop.org/~airlied/linux: drm/ttm: don't attempt to use hugepages if dma32 requested (v2) drm/vblank: Pass crtc_id to page_flip_ioctl. drm/i915: Fix init_clock_gating for resume drm/i915: Mark the userptr invalidate workqueue as WQ_MEM_RECLAIM drm/i915: Clear breadcrumb node when cancelling signaling drm/i915/gvt: ensure -ve return value is handled correctly drm/i915: Re-register PMIC bus access notifier on runtime resume drm/i915: Fix false-positive assert_rpm_wakelock_held in i915_pmic_bus_access_notifier v2 drm/edid: Don't send non-zero YQ in AVI infoframe for HDMI 1.x sinks drm/vc4: Account for interrupts in flight commit 3c02a6d946657e1ae0688e0d89f2dd2cfe9afba8 Author: Takashi Iwai Date: Mon Nov 27 10:59:40 2017 +0100 Revert "ALSA: usb-audio: Fix potential zero-division at parsing FU" The commit 8428a8ebde2d ("ALSA: usb-audio: Fix potential zero-division at parsing FU") is utterly bogus and breaks the case with csize=1 instead of fixing anything. Just take it back again. Reported-by: Jörg Otte Fixes: 8428a8ebde2d ("ALSA: usb-audio: Fix potential zero-division at parsing FU" Signed-off-by: Takashi Iwai Signed-off-by: Linus Torvalds sound/usb/mixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1b3b5219abfd6a214e99018747e9fe98514b43ca Author: Arnaldo Carvalho de Melo Date: Mon Nov 27 12:18:23 2017 -0300 tools headers: Syncronize mman.h ABI header To add support for the MAP_SYNC flag introduced in: b6fb293f2497 ("mm: Define MAP_SYNC and VM_SYNC flags") Update tools/perf/trace/beauty/mmap.c to support that flag. This silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman.h' differs from latest version at 'include/uapi/asm-generic/mman.h' Cc: Adrian Hunter Cc: Dan Williams Cc: David Ahern Cc: Jan Kara Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-14zyk3iywrj37c7g1eagmzbo@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/asm-generic/mman.h | 1 + tools/perf/trace/beauty/mmap.c | 3 +++ 2 files changed, 4 insertions(+) commit d9744f940923ea341a289d1920a55e3a3de7fc9a Author: Arnaldo Carvalho de Melo Date: Mon Nov 27 12:11:02 2017 -0300 tools headers: Synchronize prctl.h ABI header To pick up changes from: 2d2123bc7c7f ("arm64/sve: Add prctl controls for userspace vector length management") 7582e22038a2 ("arm64/sve: Backend logic for setting the vector length") That showed a limitation of the regexp used in tools/perf/trace/beauty/prctl_option.sh, that matches only PR_{SET,GET}_, but should match a few more, like PR_MPX_*, PR_CAP_* and the one added by the above commit, PR_SVE_SET_*. This silences this warning when building tools/perf: Warning: Kernel ABI header at 'tools/include/uapi/linux/prctl.h' differs from latest version at 'include/uapi/linux/prctl.h' Support for those extra prctl options should be left for the next merge window tho. Cc: Adrian Hunter Cc: Dave Martin Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: Will Deacon Link: https://lkml.kernel.org/n/tip-r52dsyuzy04qzqyfcifjs35t@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/prctl.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 374fbe56068c36126fc6903aaaa78f1ae8a95f91 Author: Arnaldo Carvalho de Melo Date: Mon Nov 27 12:04:21 2017 -0300 tools headers: Synchronize KVM arch ABI headers To pick up changes from these csets: da9a1446d248 ("KVM: s390: provide a capability for AIS state migration") 5c5196da4e96 ("KVM: arm/arm64: Support EL1 phys timer register access in set/get reg") None of which affects buildint tools/perf/. Cc: Adrian Hunter Cc: Christian Borntraeger Cc: Christoffer Dall Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-dd72s6izo4qdzt1isowlz8ji@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/arch/arm/include/uapi/asm/kvm.h | 7 +++++++ tools/arch/arm64/include/uapi/asm/kvm.h | 7 +++++++ tools/include/uapi/linux/kvm.h | 1 + 3 files changed, 15 insertions(+) commit 485be0cb0c71da167cb7f27c20130dc04fec33ff Author: Arnaldo Carvalho de Melo Date: Mon Nov 27 11:50:07 2017 -0300 tools headers: Synchronize drm/i915_drm.h To pick up the changes from these csets: bf64e0b00e1f ("drm/i915: Expand I915_PARAM_HAS_SCHEDULER into a capability bitmask") ac14fbd460d0 ("drm/i915/scheduler: Support user-defined priorities") 822a4b673284 ("drm/i915: Don't use BIT() in UAPI section") 3fd3a6ffe279 ("drm/i915: Simplify i915_reg_read_ioctl") None of them affects how the tools are built, this os done just to silence this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h' Cc: Adrian Hunter Cc: Chris Wilson Cc: David Ahern Cc: Jiri Olsa Cc: Joonas Lahtinen Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-d2gor8brpcowe7bcxovjhqwm@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/drm/i915_drm.h | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) commit 8ce6d5eb01cba83db9077c88a533bfeff39c679c Author: Arnaldo Carvalho de Melo Date: Mon Nov 27 11:43:00 2017 -0300 tools headers uapi: Synchronize drm/drm.h To pick up the new ioctls added in these csets: 3064abfa932b ("drm: Add CRTC_GET_SEQUENCE and CRTC_QUEUE_SEQUENCE ioctls [v3]") 62884cd386b8 ("drm: Add four ioctls for managing drm mode object leases [v7]") That will be automatically decoded (the ioctl cmd parameter, the structs will be supported when we start using eBPF for that, which is in the works). This silences this warning when building tools/perf: Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h' Cc: Adrian Hunter Cc: Dave Airlie Cc: David Ahern Cc: Jiri Olsa Cc: Keith Packard Cc: Namhyung Kim Cc: Wang Nan Link: https://lkml.kernel.org/n/tip-bivwf1pkfmi1ugpswbsxd9e9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/drm/drm.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 0f1aabeb4932e48ce067cb8c88322277dd7af371 Author: Arnaldo Carvalho de Melo Date: Mon Nov 27 11:35:52 2017 -0300 tools headers: Synchronize perf_event.h header To get the changes in the 085b30625e39 ("perf/core: Add PERF_AUX_FLAG_COLLISION to report colliding samples") commit, that will be eventually used by perf to handle the ARM SPE architecture. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: Will Deacon Link: https://lkml.kernel.org/n/tip-178ohv0oy0csq3kzfdk8ky4n@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/perf_event.h | 1 + 1 file changed, 1 insertion(+) commit 85369131895643c6510416fdcb215a855d39afb1 Author: Arnaldo Carvalho de Melo Date: Tue Nov 7 13:41:35 2017 -0300 tools headers: Synchronize kernel ABI headers wrt SPDX tags Two more, that were just in perf/core and thus weren't covered by Ingo's latest headers synch, kcmp.h and prctl.h, silencing this: Warning: Kernel ABI header at 'tools/include/uapi/linux/kcmp.h' differs from latest version at 'include/uapi/linux/kcmp.h' Warning: Kernel ABI header at 'tools/include/uapi/linux/prctl.h' differs from latest version at 'include/uapi/linux/prctl.h' Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-2a0r7iybyqpkftllyy5t9hfk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/kcmp.h | 1 + tools/include/uapi/linux/prctl.h | 1 + 2 files changed, 2 insertions(+) commit 0b44cfb8e40f64cd72520be223414a7ef79c5d90 Author: Ingo Molnar Date: Sat Nov 18 09:00:46 2017 +0100 tools/headers: Synchronize kernel x86 UAPI headers Two x86 headers got modified in this merge window: arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/disabled-features.h To support x86 UMIP feature, to add new AVX instructions, plus cleanups. None of those changes have an effect on tooling, so do a plain copy. Cc: Arnaldo Carvalho de Melo Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Namhyung Kim Cc: Jiri Olsa Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar tools/arch/x86/include/asm/cpufeatures.h | 537 +++++++++++++------------ tools/arch/x86/include/asm/disabled-features.h | 8 +- 2 files changed, 281 insertions(+), 264 deletions(-) commit 51cacdc89852e91448518c616758c4421c83e057 Author: Adrian Hunter Date: Tue Nov 21 10:35:26 2017 +0200 perf intel-pt: Bring instruction decoder files into line with the kernel There are just a few new defines which do not affect perf tools. Signed-off-by: Adrian Hunter Link: http://lkml.kernel.org/r/1511253326-22308-3-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/intel-pt-decoder/inat.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 996548499df61babae5306544c7daf5fd39db31c Author: Thomas Richter Date: Thu Nov 23 12:46:11 2017 +0100 perf test: Fix test 21 for s390x Test case 21 (Number of exit events of a simple workload) fails on s390x. The reason is the invalid sample frequency supplied for this test. On s390x the minimum sample frequency is much higher (see output of /proc/service_levels). Supply a save sample frequency value for s390x to fix this. The value will be adjusted by the s390x CPUMF frequency convertion function to a value well below the sysctl kernel.perf_event_max_sample_rate value. Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Cc: Martin Schwidefsky LPU-Reference: 20171123114611.93397-1-tmricht@linux.vnet.ibm.com Link: https://lkml.kernel.org/n/tip-1ynblyhi1n81idpido59nt1y@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/task-exit.c | 4 ++++ 1 file changed, 4 insertions(+) commit 321a7c35c90cc834851ceda18a8ee18f1d032b92 Author: Satheesh Rajendran Date: Wed Nov 22 22:13:53 2017 +0530 perf bench numa: Fixup discontiguous/sparse numa nodes Certain systems are designed to have sparse/discontiguous nodes. On such systems, 'perf bench numa' hangs, shows wrong number of nodes and shows values for non-existent nodes. Handle this by only taking nodes that are exposed by kernel to userspace. Signed-off-by: Satheesh Rajendran Reviewed-by: Srikar Dronamraju Acked-by: Naveen N. Rao Link: http://lkml.kernel.org/r/1edbcd353c009e109e93d78f2f46381930c340fe.1511368645.git.sathnaga@linux.vnet.ibm.com Signed-off-by: Balamuruhan S Signed-off-by: Arnaldo Carvalho de Melo tools/perf/bench/numa.c | 56 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 51 insertions(+), 5 deletions(-) commit bdaab8c4b3db820b0946ed4516bc5ec811e0cc82 Author: Jiri Olsa Date: Wed Nov 15 14:30:57 2017 +0100 perf top: Use signal interface for SIGWINCH handler There's no need for SA_SIGINFO data in SIGWINCH handler, switching it to register the handler via signal interface as we do for the rest of the signals in perf top. Signed-off-by: Jiri Olsa Tested-by: Ravi Bangoria Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-elxp1vdnaog1scaj13cx7cu0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-top.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 89d0aeab4252adc2a7ea693637dd21c588bfa2d1 Author: Jiri Olsa Date: Tue Nov 14 10:23:39 2017 +0100 perf top: Fix window dimensions change handling The stdio perf top crashes when we change the terminal window size. The reason is that we assumed we get the perf_top pointer as a signal handler argument which is not the case. Changing the SIGWINCH handler logic to change global resize variable, which is checked in the main thread loop. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Tested-by: Ravi Bangoria Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-ysuzwz77oev1ftgvdscn9bpu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-top.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 34900ec5c9577cc1b0f22887ac7349f458ba8ac2 Author: Jiri Olsa Date: Wed Aug 9 18:14:06 2017 +0200 perf: Fix header.size for namespace events Reset header size for namespace events, otherwise it only gets bigger in ctx iterations. Signed-off-by: Jiri Olsa Acked-by: Peter Zijlstra (Intel) Fixes: e422267322cd ("perf: Add PERF_RECORD_NAMESPACES to include namespaces related info") Link: http://lkml.kernel.org/n/tip-nlo4gonz9d4guyb8153ukzt0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo kernel/events/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit df7ccfa21ef343c602ae4aa1eb7893da4408b219 Author: Arnaldo Carvalho de Melo Date: Tue Nov 14 13:30:19 2017 -0300 perf top: Ignore kptr_restrict when not sampling the kernel If all events have attr.exclude_kernel set, no need to look at kptr_restrict. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-yegpzg5bf2im69g0tfizqaqz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-top.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b0ebd811af889721d3fbef3657092cf028c16b7c Author: Arnaldo Carvalho de Melo Date: Tue Nov 14 11:03:19 2017 -0300 perf record: Ignore kptr_restrict when not sampling the kernel If we're not sampling the kernel, we shouldn't care about kptr_restrict neither synthesize anything for assisting in resolving kernel samples, like the reference relocation symbol or kernel modules information. Before: $ cat /proc/sys/kernel/kptr_restrict /proc/sys/kernel/perf_event_paranoid 2 2 $ perf record sleep 1 WARNING: Kernel address maps (/proc/{kallsyms,modules}) are restricted, check /proc/sys/kernel/kptr_restrict. Samples in kernel functions may not be resolved if a suitable vmlinux file is not found in the buildid cache or in the vmlinux path. Samples in kernel modules won't be resolved at all. If some relocation was applied (e.g. kexec) symbols may be misresolved even with a suitable vmlinux or kallsyms file. Couldn't record kernel reference relocation symbol Symbol resolution may be skewed if relocation was used (e.g. kexec). Check /proc/kallsyms permission or run as root. [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.001 MB perf.data (8 samples) ] $ perf evlist -v cycles:uppp: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|PERIOD, disabled: 1, inherit: 1, exclude_kernel: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1 $ After: $ perf record sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.001 MB perf.data (10 samples) ] $ Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-t025e9zftbx2b8cq2w01g5e5@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 3f0a4c873cb341d0cb61493d8dec7662bcaa7ca7 Author: Arnaldo Carvalho de Melo Date: Tue Nov 14 11:12:11 2017 -0300 perf report: Ignore kptr_restrict when not sampling the kernel If none of the evsels has attr.exclude_kernel set to zero, no kernel samples, so no point in warning the user about problems in processing kernel samples, as there will be none. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-7dn926v3at8txxkky92aesz2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-report.c | 3 +++ 1 file changed, 3 insertions(+) commit 5b0d1cb40698056f3df8ed579dde4b80c6b7508d Author: Arnaldo Carvalho de Melo Date: Tue Nov 14 11:01:06 2017 -0300 perf evlist: Add helper to check if attr.exclude_kernel is set in all evsels The warning about kptr_restrict needs to be emitted only when it is set and we ask for kernel space samples, so add a helper to help with that. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-fh7drty6yljei9gxxzer6eup@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evlist.c | 12 ++++++++++++ tools/perf/util/evlist.h | 2 ++ 2 files changed, 14 insertions(+) commit d5c5e46aa7a2b256a526f9ce832ffbf622c3c19a Author: Thomas Richter Date: Tue Nov 14 08:18:47 2017 +0100 perf test shell: Fix test case probe libc's inet_pton on s390x The 'perf test' case "probe libc's inet_pton & backtrace it with ping" fails on s390x. The reason is the 'realpath /lib64/ld*.so.* | uniq' line which returns 2 libraries: root@s35lp76 shell]# realpath /lib64/ld*.so.* | uniq /usr/lib64/ld-2.26.so /usr/lib64/ld_pre_smc.so.1.0.1 [root@s35lp76 shell] This output makes the "perf probe" command lines invalid. Use ldd tool to find out the libraries required by "bash" and check if symbol "inet_pton" is part of the "libc" library. Some distros do not have a /lib64 directory. I have also added a check for the existence of an IPv6 network interface before it is being used. Committer changes: We can't really use ldd for libc, as in some systems, such as x86_64, it has hardlinks and then ldd sees one and the kernel the other, so grep for libc in /proc/self/maps to get the one we'll receive from PERF_RECORD_MMAP. Thomas checked this change and acked it. Signed-off-by: Thomas-Mich Richter Tested-by: Arnaldo Carvalho de Melo Suggested-by: Hendrik Brückner Reviewed-by: Hendrik Brückner Link: http://lkml.kernel.org/r/20171114133409.GN8836@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/trace+probe_libc_inet_pton.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ccafc38f1c778847ab6d53dd7933260426731cf3 Author: Thomas Richter Date: Tue Nov 14 08:18:46 2017 +0100 perf test shell: Fix check open filename arg using 'perf trace' on s390x This 'perf test' case fails on s390x. The 'touch' command on s390x uses the 'openat' system call to open the file named on the command line: [root@s35lp76 perf]# perf probe -l probe:vfs_getname (on getname_flags:72@fs/namei.c with pathname) [root@s35lp76 perf]# perf trace -e open touch /tmp/abc 0.400 ( 0.015 ms): touch/27542 open(filename: /usr/lib/locale/locale-archive, flags: CLOEXEC) = 3 [root@s35lp76 perf]# There is no 'open' system call for file '/tmp/abc'. Instead the 'openat' system call is used: [root@s35lp76 perf]# strace touch /tmp/abc execve("/usr/bin/touch", ["touch", "/tmp/abc"], 0x3ffd547ec98 /* 30 vars */) = 0 [...] openat(AT_FDCWD, "/tmp/abc", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = 3 [...] On s390x the 'egrep' command does not find a matching pattern and returns an error. Fix this for s390x create a platform dependent command line to enable the 'perf probe' call to listen to the 'openat' system call and get the expected output. Signed-off-by: Thomas-Mich Richter Tested-by: Arnaldo Carvalho de Melo Cc: Hendrik Brueckner Cc: Thomas-Mich Richter LPU-Reference: 20171114071847.2381-1-tmricht@linux.vnet.ibm.com Link: http://lkml.kernel.org/n/tip-3qf38jk0prz54rhmhyu871my@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/shell/trace+probe_vfs_getname.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 05d0e62d9fa0f1002cf82009ef31b36174da5472 Author: Ravi Bangoria Date: Tue Nov 14 08:55:40 2017 +0530 perf annotate: Do not truncate instruction names at 6 chars There are many instructions, esp on PowerPC, whose mnemonics are longer than 6 characters. Using precision limit causes truncation of such mnemonics. Fix this by removing precision limit. Note that, 'width' is still 6, so alignment won't get affected for length <= 6. Before: li r11,-1 xscvdp vs1,vs1 add. r10,r10,r11 After: li r11,-1 xscvdpsxds vs1,vs1 add. r10,r10,r11 Reported-by: Donald Stence Signed-off-by: Ravi Bangoria Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Taeung Song Link: http://lkml.kernel.org/r/20171114032540.4564-1-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/annotate.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit af98f2273fd0af31ce327cd1406b67c7be0b6734 Author: Namhyung Kim Date: Tue Nov 14 09:15:42 2017 +0900 perf help: Fix a bug during strstart() conversion The commit 8e99b6d4533c changed prefixcmp() to strstart() but missed to change the return value in some place. It makes perf help print annoying output even for sane config items like below: $ perf help '.root': unsupported man viewer sub key. ... Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Tested-by: Taeung Song Cc: Jiri Olsa Cc: Sihyeon Jang Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20171114001542.GA16464@sejong Fixes: 8e99b6d4533c ("tools include: Adopt strstarts() from the kernel") Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-help.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4a2233b194c77ae1ea8304cb7c00b551de4313f0 Author: Arnaldo Carvalho de Melo Date: Mon Nov 13 16:06:29 2017 -0300 perf machine: Guard against NULL in machine__exit() A recent fix for 'perf trace' introduced a bug where machine__exit(trace->host) could be called while trace->host was still NULL, so make this more robust by guarding against NULL, just like free() does. The problem happens, for instance, when !root users try to run 'perf trace': [acme@jouet linux]$ trace Error: No permissions to read /sys/kernel/debug/tracing/events/raw_syscalls/sys_(enter|exit) Hint: Try 'sudo mount -o remount,mode=755 /sys/kernel/debug/tracing' perf: Segmentation fault Obtained 7 stack frames. [0x4f1b2e] /lib64/libc.so.6(+0x3671f) [0x7f43a1dd971f] [0x4f3fec] [0x47468b] [0x42a2db] /lib64/libc.so.6(__libc_start_main+0xe9) [0x7f43a1dc3509] [0x42a6c9] Segmentation fault (core dumped) [acme@jouet linux]$ Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andrei Vagin Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Vasily Averin Cc: Wang Nan Fixes: 33974a414ce2 ("perf trace: Call machine__exit() at exit") Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/machine.c | 3 +++ 1 file changed, 3 insertions(+) commit 501e5bbec3c19498fa520fd3ffd68bd907f31bf7 Author: Arnaldo Carvalho de Melo Date: Thu Nov 9 16:04:26 2017 -0300 perf script: Fix --per-event-dump for auxtrace synth evsels When processing PERF_RECORD_AUXTRACE_INFO several perf_evsel entries will be synthesized and inserted into session->evlist, eventually ending in perf_script.tool.sample(), which ends up calling builtin-script.c's process_event(), that expects evsel->priv to be a perf_evsel_script object with a valid FILE pointer in fp. So we need to intercept the processing of PERF_RECORD_AUXTRACE_INFO and then setup evsel->priv for these newly created perf_evsel instances, do it to fix the segfault in process_event() trying to use a NULL for that FILE pointer. Reported-by: Alexander Shishkin Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Wang Nan Cc: yuzhoujian Fixes: a14390fde64e ("perf script: Allow creating per-event dump files") Link: http://lkml.kernel.org/n/tip-bthnur8r8de01gxvn2qayx6e@git.kernel.org [ Merge fix by Ravi Bangoria before pushing upstream to preserv bisectability ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit 8e2d8e204247aa9eeb87893f6b8bf0cf29428b31 Author: Arnaldo Carvalho de Melo Date: Thu Nov 9 12:03:40 2017 -0300 perf evsel: Fix up leftover perf_evsel_stat usage via evsel->priv I forgot one conversion, which got noticed by Thomas when running: $ perf stat -e '{cpu-clock,instructions}' kill kill: not enough arguments Segmentation fault (core dumped) $ Fix it, those stats are in evsel->stats, not anymore in evsel->priv. Reported-by: Thomas-Mich Richter Tested-by: Thomas-Mich Richter Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Hendrik Brueckner Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: e669e833da8d ("perf evsel: Restore evsel->priv as a tool private area") Link: http://lkml.kernel.org/r/20171109150046.GN4333@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35c33633abc14b906e84b7b0115ede6df6830120 Author: Andrei Vagin Date: Tue Nov 7 16:22:46 2017 -0800 perf trace: Fix an exit code of trace__symbols_init Currently if trace_event__register_resolver() fails, we return -errno, but we can't be sure that errno isn't zero in this case. Signed-off-by: Andrei Vagin Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Vasily Averin Link: http://lkml.kernel.org/r/20171108002246.8924-2-avagin@openvz.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 59622fd496a3175c7bf549046e091d81c303ecff Author: Andi Kleen Date: Fri Oct 20 13:27:55 2017 -0700 perf record: Fix -c/-F options for cpu event aliases The Intel PMU event aliases have a implicit period= specifier to set the default period. Unfortunately this breaks overriding these periods with -c or -F, because the alias terms look like they are user specified to the internal parser, and user specified event qualifiers override the command line options. Track that they are coming from aliases by adding a "weak" state to the term. Any weak terms don't override command line options. I only did it for -c/-F for now, I think that's the only case that's broken currently. Before: $ perf record -c 1000 -vv -e uops_issued.any ... { sample_period, sample_freq } 2000003 After: $ perf record -c 1000 -vv -e uops_issued.any ... { sample_period, sample_freq } 1000 Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20171020202755.21410-2-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel.c | 12 ++++++++---- tools/perf/util/evsel.h | 1 + tools/perf/util/parse-events.c | 2 ++ tools/perf/util/parse-events.h | 3 +++ tools/perf/util/pmu.c | 5 +++++ 5 files changed, 19 insertions(+), 4 deletions(-) commit dffdcbdbb0205ac10daec64f7fa519f1904f5481 Author: Arnaldo Carvalho de Melo Date: Fri Nov 3 15:34:34 2017 -0300 perf record: Generate PERF_RECORD_{MMAP,COMM,EXEC} with --delay When we use an initial delay, e.g.: 'perf record --delay 1000', we do not enable the events until that delay has passed after we started the workload, including the tracking event, i.e. the one for which we have attr.mmap, etc, enabled to ask the kernel to generate the PERF_RECORD_{MMAP,COMM,EXEC} metadata events that will then allow us to resolve addresses in samples to the map, dso and symbol. There will be a shadow that even synthesizing samples won't cover, i.e. the workload that we start and other processes forking while we wait for the initial delay to expire. So use a dummy event to be the tracking one and make it be enabled on exec. Before: # perf record --delay 1000 stress --cpu 1 --timeout 5 stress: info: [9029] dispatching hogs: 1 cpu, 0 io, 0 vm, 0 hdd stress: info: [9029] successful run completed in 5s [ perf record: Woken up 3 times to write data ] [ perf record: Captured and wrote 0.624 MB perf.data (15908 samples) ] # perf script | head :9031 9031 32001.826888: 1 cycles:ppp: ffffffff831aa30d event_function (/lib/modules/4.14.0-rc6+/build/vmlinux) :9031 9031 32001.826893: 1 cycles:ppp: ffffffff8300d1a0 intel_bts_enable_local (/lib/modules/4.14.0-rc6+/build/vmlinux) :9031 9031 32001.826895: 7 cycles:ppp: ffffffff83023870 sched_clock (/lib/modules/4.14.0-rc6+/build/vmlinux) :9031 9031 32001.826897: 103 cycles:ppp: ffffffff8300c331 intel_pmu_handle_irq (/lib/modules/4.14.0-rc6+/build/vmlinux) :9031 9031 32001.826899: 1615 cycles:ppp: ffffffff830231f8 native_sched_clock (/lib/modules/4.14.0-rc6+/build/vmlinux) :9031 9031 32001.826902: 26724 cycles:ppp: ffffffff8384c6a7 native_irq_return_iret (/lib/modules/4.14.0-rc6+/build/vmlinux) :9031 9031 32001.826913: 329739 cycles:ppp: 7fb2a5410932 [unknown] ([unknown]) :9031 9031 32001.827033: 1225451 cycles:ppp: 7fb2a5410930 [unknown] ([unknown]) :9031 9031 32001.827474: 1391725 cycles:ppp: 7fb2a5410930 [unknown] ([unknown]) :9031 9031 32001.827978: 1233697 cycles:ppp: 7fb2a5410928 [unknown] ([unknown]) # After: # perf record --delay 1000 stress --cpu 1 --timeout 5 stress: info: [9741] dispatching hogs: 1 cpu, 0 io, 0 vm, 0 hdd stress: info: [9741] successful run completed in 5s [ perf record: Woken up 3 times to write data ] [ perf record: Captured and wrote 0.751 MB perf.data (15976 samples) ] # perf script | head stress 9742 32110.959106: 1 cycles:ppp: ffffffff831b26f6 __perf_event_task_sched_in (/lib/modules/4.14.0-rc6+/build/vmlinux) stress 9742 32110.959110: 1 cycles:ppp: ffffffff8300c2e9 intel_pmu_handle_irq (/lib/modules/4.14.0-rc6+/build/vmlinux) stress 9742 32110.959112: 7 cycles:ppp: ffffffff830231e0 native_sched_clock (/lib/modules/4.14.0-rc6+/build/vmlinux) stress 9742 32110.959115: 101 cycles:ppp: ffffffff83023870 sched_clock (/lib/modules/4.14.0-rc6+/build/vmlinux) stress 9742 32110.959117: 1533 cycles:ppp: ffffffff830231f8 native_sched_clock (/lib/modules/4.14.0-rc6+/build/vmlinux) stress 9742 32110.959119: 23992 cycles:ppp: ffffffff831b0900 ctx_sched_in (/lib/modules/4.14.0-rc6+/build/vmlinux) stress 9742 32110.959129: 329406 cycles:ppp: 7f4b1b661930 __random_r (/usr/lib64/libc-2.25.so) stress 9742 32110.959249: 1288322 cycles:ppp: 5566e1e7cbc9 hogcpu (/usr/bin/stress) stress 9742 32110.959712: 1464046 cycles:ppp: 7f4b1b66179e __random (/usr/lib64/libc-2.25.so) stress 9742 32110.960241: 1266918 cycles:ppp: 7f4b1b66195b __random_r (/usr/lib64/libc-2.25.so) # Reported-by: Bram Stolk Tested-by: Bram Stolk Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Fixes: 6619a53ef757 ("perf record: Add --initial-delay option") Link: http://lkml.kernel.org/n/tip-nrdfchshqxf7diszhxcecqb9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 555b4ec4d589eb0fcdf9d7b4b05a71984dbcaeee Author: Arnaldo Carvalho de Melo Date: Fri Nov 3 15:13:29 2017 -0300 perf evlist: Set the correct idx when adding dummy events The evsel->idx field is used mainly to access the right bucket in per-event arrays such as the annotation ones, but also to set evsel->tracking, that in turn will decide what of the events will ask for PERF_RECORD_{MMAP,COMM,EXEC} to be generated, i.e. which perf_event_attr will have its mmap, etc fields set. When we were adding the "dummy" event using perf_evlist__add_dummy() we were not setting it correctly, which could result in multiple tracking events. Now that I'll try using a dummy event to be the tracking one when using 'perf record --delay', i.e. when we process the --delay setting we may already have the evlist set up, like with: perf record -e cycles,instructions --delay 1000 ./workload We will need to add a "dummy" event, then reset evsel->tracking for the first event, "cycles", and set it instead to the dummy one, and also setting its attr.enable_on_exec, so that we get the PERF_RECORD_MMAP, etc metadata events while waiting to enable the explicitely requested events, so lets get this straight and set the right evsel->idx. Cc: Adrian Hunter Cc: Bram Stolk Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-nrdfchshqxf7diszhxcecqb9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 712d361d59efa6349a9538f4fd9a49073f0e8127 Author: Eric Sandeen Date: Mon Nov 27 18:23:33 2017 -0800 xfs: calculate correct offset in xfs_scrub_quota_item It's only used for tracepoints so it's relatively harmless, but the offset is calculated incorrectly in xfs_scrub_quota_item. qi_dqperchunk is the nr. of dquots per "chunk" which we have conveniently *cough* defined to always be 1 FSB. Therefore block_offset * qi_dqperchunk == first id in that chunk, and so offset = id / qi_dqperchunk id * dqperchunk is ... meaningless. Fixes-coverity-id: 1423965 Fixes: c2fc338c ("xfs: scrub quota information") Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/scrub/quota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eda6bc27ccc852d34393739009486932f3ba70ae Author: Eric Sandeen Date: Mon Nov 27 18:23:32 2017 -0800 xfs: fix uninitialized variable in xfs_scrub_quota On the first pass through the while(1) loop, we get to xfs_scrub_should_terminate() which can test the uninitialized error variable. Fixes-coverity-id: 1423737 Fixes: c2fc338c ("xfs: scrub quota information") Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/scrub/quota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d41c6172bd4031979eab722c265a2e5764383c3c Author: Eric Sandeen Date: Mon Nov 27 18:23:32 2017 -0800 xfs: fix leaks on corruption errors in xfs_bmap.c Use _GOTO instead of _RETURN so we can free the allocated cursor on error. Fixes: bf80628 ("xfs: remove xfs_bmse_shift_one") Fixes-coverity-id: 1423813, 1423676 Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d210a9874b8f6166579408131cb74495caff1958 Author: Michal Hocko Date: Thu Nov 23 17:13:40 2017 +0100 xfs: fortify xfs_alloc_buftarg error handling percpu_counter_init failure path doesn't clean up &btp->bt_lru list. Call list_lru_destroy in that error path. Similarly register_shrinker error path is not handled. While it is unlikely to trigger these error path, it is not impossible especially the later might fail with large NUMAs. Let's handle the failure to make the code more robust. Noticed-by: Tetsuo Handa Signed-off-by: Michal Hocko Acked-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 7e5dd57ef3081ff6c03908d786ed5087f6fbb7ae Author: Minwoo Im Date: Sat Nov 25 03:03:00 2017 +0900 nvme-pci: fix NULL pointer dereference in nvme_free_host_mem() Following condition which will cause NULL pointer dereference will occur in nvme_free_host_mem() when it tries to remove pci device via nvme_remove() especially after a failure of host memory allocation for HMB. "(host_mem_descs == NULL) && (nr_host_mem_descs != 0)" It's because __nr_host_mem_descs__ is not cleared to 0 unlike __host_mem_descs__ is so. Signed-off-by: Minwoo Im Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 1 + 1 file changed, 1 insertion(+) commit eb1bd249ba016284ed762d87c1989dd822500773 Author: Max Gurtovoy Date: Tue Nov 28 18:28:44 2017 +0200 nvme-rdma: fix memory leak during queue allocation In case nvme_rdma_wait_for_cm timeout expires before we get an established or rejected event (rdma_connect succeeded) from rdma_cm, we end up with leaking the ib transport resources for dedicated queue. This scenario can easily reproduced using traffic test during port toggling. Also, in order to protect from parallel ib queue destruction, that may be invoked from different context's, introduce new flag that stands for transport readiness. While we're here, protect also against a situation that we can receive rdma_cm events during ib queue destruction. Signed-off-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 9d0ca444d0b317d31acf6f8fc18ac6f478518924 Author: Martin Schwidefsky Date: Tue Nov 28 17:20:53 2017 +0100 s390/gs: add compat regset for the guarded storage broadcast control block git commit e525f8a6e696210d15f8b8277d4da12fc4add299 "s390/gs: add regset for the guarded storage broadcast control block" added the missing regset to the s390_regsets array but failed to add it to the s390_compat_regsets array. Fixes: e525f8a6e696 ("add compat regset for the guarded storage broadcast control block") Signed-off-by: Martin Schwidefsky arch/s390/kernel/ptrace.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7cd4a5eb64b638a71564f62175f6c7ad3f27044e Merge: 124dcf7 bc68644 Author: Tony Lindgren Date: Tue Nov 28 08:23:05 2017 -0800 Merge branch 'omap-for-v4.15/fixes-dt' into omap-for-v4.15/fixes-v2 commit 124dcf7960d6832ca72c1cad8a6d87fef756b34e Merge: 2db5778 6301d58 Author: Tony Lindgren Date: Tue Nov 28 08:22:57 2017 -0800 Merge branch 'omap-for-v4.14/fixes' into omap-for-v4.15/fixes-v2 commit ea37d5998b50a72b9045ba60a132eeb20e1c4230 Author: Filipe Manana Date: Fri Nov 17 01:54:00 2017 +0000 Btrfs: incremental send, fix wrong unlink path after renaming file Under some circumstances, an incremental send operation can issue wrong paths for unlink commands related to files that have multiple hard links and some (or all) of those links were renamed between the parent and send snapshots. Consider the following example: Parent snapshot . (ino 256) |---- a/ (ino 257) | |---- b/ (ino 259) | | |---- c/ (ino 260) | | |---- f2 (ino 261) | | | |---- f2l1 (ino 261) | |---- d/ (ino 262) |---- f1l1_2 (ino 258) |---- f2l2 (ino 261) |---- f1_2 (ino 258) Send snapshot . (ino 256) |---- a/ (ino 257) | |---- f2l1/ (ino 263) | |---- b2/ (ino 259) | |---- c/ (ino 260) | | |---- d3 (ino 262) | | |---- f1l1_2 (ino 258) | | |---- f2l2_2 (ino 261) | | |---- f1_2 (ino 258) | | | |---- f2 (ino 261) | |---- f1l2 (ino 258) | |---- d (ino 261) When computing the incremental send stream the following steps happen: 1) When processing inode 261, a rename operation is issued that renames inode 262, which currently as a path of "d", to an orphan name of "o262-7-0". This is done because in the send snapshot, inode 261 has of its hard links with a path of "d" as well. 2) Two link operations are issued that create the new hard links for inode 261, whose names are "d" and "f2l2_2", at paths "/" and "o262-7-0/" respectively. 3) Still while processing inode 261, unlink operations are issued to remove the old hard links of inode 261, with names "f2l1" and "f2l2", at paths "a/" and "d/". However path "d/" does not correspond anymore to the directory inode 262 but corresponds instead to a hard link of inode 261 (link command issued in the previous step). This makes the receiver fail with a ENOTDIR error when attempting the unlink operation. The problem happens because before sending the unlink operation, we failed to detect that inode 262 was one of ancestors for inode 261 in the parent snapshot, and therefore we didn't recompute the path for inode 262 before issuing the unlink operation for the link named "f2l2" of inode 262. The detection failed because the function "is_ancestor()" only follows the first hard link it finds for an inode instead of all of its hard links (as it was originally created for being used with directories only, for which only one hard link exists). So fix this by making "is_ancestor()" follow all hard links of the input inode. A test case for fstests follows soon. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/send.c | 124 ++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 106 insertions(+), 18 deletions(-) commit 15fe076edea787807a7cdc168df832544b58eba6 Author: Eric Dumazet Date: Tue Nov 28 08:03:30 2017 -0800 net/packet: fix a race in packet_bind() and packet_notifier() syzbot reported crashes [1] and provided a C repro easing bug hunting. When/if packet_do_bind() calls __unregister_prot_hook() and releases po->bind_lock, another thread can run packet_notifier() and process an NETDEV_UP event. This calls register_prot_hook() and hooks again the socket right before first thread is able to grab again po->bind_lock. Fixes this issue by temporarily setting po->num to 0, as suggested by David Miller. [1] dev_remove_pack: ffff8801bf16fa80 not found ------------[ cut here ]------------ kernel BUG at net/core/dev.c:7945! ( BUG_ON(!list_empty(&dev->ptype_all)); ) invalid opcode: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: device syz0 entered promiscuous mode CPU: 0 PID: 3161 Comm: syzkaller404108 Not tainted 4.14.0+ #190 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801cc57a500 task.stack: ffff8801cc588000 RIP: 0010:netdev_run_todo+0x772/0xae0 net/core/dev.c:7945 RSP: 0018:ffff8801cc58f598 EFLAGS: 00010293 RAX: ffff8801cc57a500 RBX: dffffc0000000000 RCX: ffffffff841f75b2 RDX: 0000000000000000 RSI: 1ffff100398b1ede RDI: ffff8801bf1f8810 device syz0 entered promiscuous mode RBP: ffff8801cc58f898 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801bf1f8cd8 R13: ffff8801cc58f870 R14: ffff8801bf1f8780 R15: ffff8801cc58f7f0 FS: 0000000001716880(0000) GS:ffff8801db400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020b13000 CR3: 0000000005e25000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: rtnl_unlock+0xe/0x10 net/core/rtnetlink.c:106 tun_detach drivers/net/tun.c:670 [inline] tun_chr_close+0x49/0x60 drivers/net/tun.c:2845 __fput+0x333/0x7f0 fs/file_table.c:210 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x199/0x270 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x9bb/0x1ae0 kernel/exit.c:865 do_group_exit+0x149/0x400 kernel/exit.c:968 SYSC_exit_group kernel/exit.c:979 [inline] SyS_exit_group+0x1d/0x20 kernel/exit.c:977 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x44ad19 Fixes: 30f7ea1c2b5f ("packet: race condition in packet_bind") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Francesco Ruggeri Signed-off-by: David S. Miller net/packet/af_packet.c | 5 +++++ 1 file changed, 5 insertions(+) commit 57f015f5eccf25fd4a3336fe3cbbee920a8fba6f Author: Mike Maloney Date: Tue Nov 28 10:44:29 2017 -0500 packet: fix crash in fanout_demux_rollover() syzkaller found a race condition fanout_demux_rollover() while removing a packet socket from a fanout group. po->rollover is read and operated on during packet_rcv_fanout(), via fanout_demux_rollover(), but the pointer is currently cleared before the synchronization in packet_release(). It is safer to delay the cleanup until after synchronize_net() has been called, ensuring all calls to packet_rcv_fanout() for this socket have finished. To further simplify synchronization around the rollover structure, set po->rollover in fanout_add() only if there are no errors. This removes the need for rcu in the struct and in the call to packet_getsockopt(..., PACKET_ROLLOVER_STATS, ...). Crashing stack trace: fanout_demux_rollover+0xb6/0x4d0 net/packet/af_packet.c:1392 packet_rcv_fanout+0x649/0x7c8 net/packet/af_packet.c:1487 dev_queue_xmit_nit+0x835/0xc10 net/core/dev.c:1953 xmit_one net/core/dev.c:2975 [inline] dev_hard_start_xmit+0x16b/0xac0 net/core/dev.c:2995 __dev_queue_xmit+0x17a4/0x2050 net/core/dev.c:3476 dev_queue_xmit+0x17/0x20 net/core/dev.c:3509 neigh_connected_output+0x489/0x720 net/core/neighbour.c:1379 neigh_output include/net/neighbour.h:482 [inline] ip6_finish_output2+0xad1/0x22a0 net/ipv6/ip6_output.c:120 ip6_finish_output+0x2f9/0x920 net/ipv6/ip6_output.c:146 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip6_output+0x1f4/0x850 net/ipv6/ip6_output.c:163 dst_output include/net/dst.h:459 [inline] NF_HOOK.constprop.35+0xff/0x630 include/linux/netfilter.h:250 mld_sendpack+0x6a8/0xcc0 net/ipv6/mcast.c:1660 mld_send_initial_cr.part.24+0x103/0x150 net/ipv6/mcast.c:2072 mld_send_initial_cr net/ipv6/mcast.c:2056 [inline] ipv6_mc_dad_complete+0x99/0x130 net/ipv6/mcast.c:2079 addrconf_dad_completed+0x595/0x970 net/ipv6/addrconf.c:4039 addrconf_dad_work+0xac9/0x1160 net/ipv6/addrconf.c:3971 process_one_work+0xbf0/0x1bc0 kernel/workqueue.c:2113 worker_thread+0x223/0x1990 kernel/workqueue.c:2247 kthread+0x35e/0x430 kernel/kthread.c:231 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:432 Fixes: 0648ab70afe6 ("packet: rollover prepare: per-socket state") Fixes: 509c7a1ecc860 ("packet: avoid panic in packet_getsockopt()") Reported-by: syzbot Signed-off-by: Mike Maloney Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/packet/af_packet.c | 32 ++++++++++---------------------- net/packet/internal.h | 1 - 2 files changed, 10 insertions(+), 23 deletions(-) commit bc686442f8a601bccac1f22506ecdb4b0d62cadd Merge: 60636a5 ca41e24 Author: Tony Lindgren Date: Tue Nov 28 08:12:32 2017 -0800 Merge branch 'dts-fixes' into omap-for-v4.15/fixes-dt commit ca41e244517d6d3f1600c229ff7ca615049c1e9c Author: Peter Ujfalusi Date: Wed Nov 1 11:03:40 2017 +0200 ARM: dts: am437x-cm-t43: Correct the dmas property of spi0 The DMA binding for eDMA needs 2 parameters, not 1. The second, missing parameter is the tptc to be used for the channel. Signed-off-by: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/boot/dts/am437x-cm-t43.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 627395a6f8091c0aa18f49dca7df59ba3ec147ef Author: Peter Ujfalusi Date: Wed Nov 1 11:03:31 2017 +0200 ARM: dts: am4372: Correct the interrupts_properties of McASP Fixes the following warnings: arch/arm/boot/dts/am437x-cm-t43.dtb: Warning (interrupts_property): interrupts size is (8), expected multiple of 12 in /ocp@44000000/mcasp@48038000 arch/arm/boot/dts/am437x-cm-t43.dtb: Warning (interrupts_property): interrupts size is (8), expected multiple of 12 in /ocp@44000000/mcasp@4803C000 Signed-off-by: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/boot/dts/am4372.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cd7594ac3281722cb8f10d6f6c7e4287747c7a9d Author: Adam Ford Date: Tue Oct 31 13:45:59 2017 -0500 ARM: dts: logicpd-somlv: Fix wl127x pinmux The pin assignment for the wl127x interrupt was incorrect. I am not sure how this every worked. This also eliminates a conflict with the SMC911x ethernet driver and properly moves pinmuxes for the related gpio to omap3_pmx_wkup from omap3_pmx_core. Fixes: ab8dd3aed011 ("ARM: DTS: Add minimal Support for Logic PD DM3730 SOM-LV") Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-som-lv.dtsi | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit a51a40b7abb619c38fe60d896a6916be280171ea Merge: f95d5bf0 1ba896f Author: David S. Miller Date: Tue Nov 28 11:00:14 2017 -0500 Merge branch 'sctp-fix-sparse-errors' Xin Long says: ==================== sctp: fix some other sparse errors After the last fixes for sparse errors, there are still three sparse errors in sctp codes, two of them are type cast, and the other one is using extern. ==================== Signed-off-by: David S. Miller commit 1ba896f6f52bfafac6dec4ca583cdd9a073858e8 Author: Xin Long Date: Sun Nov 26 20:16:08 2017 +0800 sctp: remove extern from stream sched Now each stream sched ops is defined in different .c file and added into the global ops in another .c file, it uses extern to make this work. However extern is not good coding style to get them in and even make C=2 reports errors for this. This patch adds sctp_sched_ops_xxx_init for each stream sched ops in their .c file, then get them into the global ops by calling them when initializing sctp module. Fixes: 637784ade221 ("sctp: introduce priority based stream scheduler") Fixes: ac1ed8b82cd6 ("sctp: introduce round robin stream scheduler") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/sctp.h | 5 +++++ include/net/sctp/stream_sched.h | 5 +++++ net/sctp/protocol.c | 1 + net/sctp/stream_sched.c | 25 ++++++++++++++++++------- net/sctp/stream_sched_prio.c | 7 ++++++- net/sctp/stream_sched_rr.c | 7 ++++++- 6 files changed, 41 insertions(+), 9 deletions(-) commit af2697a0273f7665429c47d71ab26f2412af924e Author: Xin Long Date: Sun Nov 26 20:16:07 2017 +0800 sctp: force the params with right types for sctp csum apis Now sctp_csum_xxx doesn't really match the param types of these common csum apis. As sctp_csum_xxx is defined in sctp/checksum.h, many sparse errors occur when make C=2 not only with M=net/sctp but also with other modules that include this header file. This patch is to force them fit in csum apis with the right types. Fixes: e6d8b64b34aa ("net: sctp: fix and consolidate SCTP checksumming code") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/checksum.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 08f46070dde2a835a7a5bfd4c70372c27bff5d88 Author: Xin Long Date: Sun Nov 26 20:16:06 2017 +0800 sctp: force SCTP_ERROR_INV_STRM with __u32 when calling sctp_chunk_fail This patch is to force SCTP_ERROR_INV_STRM with right type to fit in sctp_chunk_fail to avoid the sparse error. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f95d5bf03b5ec0d7ea8e552e15abe70c646249b5 Author: Vasyl Gomonovych Date: Wed Nov 22 16:29:57 2017 +0100 lmc: Use memdup_user() as a cleanup Fix coccicheck warning which recommends to use memdup_user(): drivers/net/wan/lmc/lmc_main.c:497:27-34: WARNING opportunity for memdup_user Generated by: scripts/coccinelle/memdup_user/memdup_user.cocci Signed-off-by: Vasyl Gomonovych Signed-off-by: David S. Miller drivers/net/wan/lmc/lmc_main.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 0631fb8b027f5968c2f5031f0b3ff7be3e4bebcc Author: Guenter Roeck Date: Wed Nov 15 13:00:45 2017 -0800 firmware: vpd: Fix platform driver and device registration/unregistration The driver exit function needs to unregister both platform device and driver. Also, during registration, register driver first and perform error checks. Fixes: 049a59db34eb ("firmware: Google VPD sysfs driver") Signed-off-by: Guenter Roeck Cc: stable Tested-by: Randy Dunlap Reviewed-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/vpd.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit e4b28b3c3a405b251fa25db58abe1512814a680a Author: Guenter Roeck Date: Wed Nov 15 13:00:44 2017 -0800 firmware: vpd: Tie firmware kobject to device lifetime It doesn't make sense to have /sys/firmware/vpd if the device is not instantiated, so tie its lifetime to the device. Fixes: 049a59db34eb ("firmware: Google VPD sysfs driver") Signed-off-by: Guenter Roeck Cc: stable Reviewed-by: Dmitry Torokhov Tested-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/vpd.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 811d7e0215fb738fb9a9f0bcb1276516ad161ed1 Author: Guenter Roeck Date: Wed Nov 15 13:00:43 2017 -0800 firmware: vpd: Destroy vpd sections in remove function vpd sections are initialized during probe and thus should be destroyed in the remove function. Fixes: 049a59db34eb ("firmware: Google VPD sysfs driver") Cc: stable Signed-off-by: Guenter Roeck Reviewed-by: Dmitry Torokhov Tested-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman drivers/firmware/google/vpd.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 297d6b6e56c2977fc504c61bbeeaa21296923f89 Author: Paul Meyer Date: Tue Nov 14 13:06:47 2017 -0700 hv: kvp: Avoid reading past allocated blocks from KVP file While reading in more than one block (50) of KVP records, the allocation goes per block, but the reads used the total number of allocated records (without resetting the pointer/stream). This causes the records buffer to overrun when the refresh reads more than one block over the previous capacity (e.g. reading more than 100 KVP records whereas the in-memory database was empty before). Fix this by reading the correct number of KVP records from file each time. Signed-off-by: Paul Meyer Signed-off-by: Long Li Cc: stable@vger.kernel.org Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman tools/hv/hv_kvp_daemon.c | 70 ++++++++++-------------------------------------- 1 file changed, 14 insertions(+), 56 deletions(-) commit 7fa32e5ec28b1609abc0b797b58267f725fc3964 Author: K. Y. Srinivasan Date: Tue Nov 14 06:53:33 2017 -0700 Drivers: hv: vmbus: Fix a rescind issue The current rescind processing code will not correctly handle the case where the host immediately rescinds a channel that has been offerred. In this case, we could be blocked in the open call and since the channel is rescinded, the host will not respond and we could be blocked forever in the vmbus open call.i Fix this problem. Signed-off-by: K. Y. Srinivasan Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 10 ++++++++-- drivers/hv/channel_mgmt.c | 7 ++++--- include/linux/hyperv.h | 1 + 3 files changed, 13 insertions(+), 5 deletions(-) commit dea521a2b9f96e905fa2bb2f95e23ec00c2ec436 Author: Christophe JAILLET Date: Tue Nov 21 20:46:49 2017 +0100 bnxt_en: Fix an error handling path in 'bnxt_get_module_eeprom()' Error code returned by 'bnxt_read_sfp_module_eeprom_info()' is handled a few lines above when reading the A0 portion of the EEPROM. The same should be done when reading the A2 portion of the EEPROM. In order to correctly propagate an error, update 'rc' in this 2nd call as well, otherwise 0 (success) is returned. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fb2c445277e7b0b4ffe10de8114bad4eccaca948 Author: Martijn Coenen Date: Mon Nov 13 10:06:08 2017 +0100 ANDROID: binder: fix transaction leak. If a call to put_user() fails, we failed to properly free a transaction and send a failed reply (if necessary). Signed-off-by: Martijn Coenen Cc: stable # 4.14 Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) commit c8ec2041f549e7f2dee0c34d25381be6f7805f99 Author: Matt Redfearn Date: Tue Nov 28 15:22:20 2017 +0000 MIPS: Add custom serial.h with BASE_BAUD override for generic kernel Add a custom serial.h header for MIPS, allowing platforms to override the asm-generic version if required. The generic platform uses this header to set BASE_BAUD to 0. The generic platform supports multiple boards, which may have different UART clocks. Also one of the boards supported is the Boston FPGA board, where the UART clock depends on the loaded FPGA bitfile. As such there is no way that the generic kernel can set a compile time default BASE_BAUD. Commit 31cb9a8575ca ("earlycon: initialise baud field of earlycon device structure") changed the behavior of of_setup_earlycon such that any baud rate set in the device tree is now set in the earlycon structure. The UART driver will then calculate a divisor based on BASE_BAUD and set it. With MIPS generic kernels this resulted in garbage output due to the incorrect uart clock rate being used to calculate a divisor. This commit, combined with "serial: 8250_early: Only set divisor if valid clk & baud" prevents the earlycon code setting a bad divisor and restores earlycon output. Fixes: 31cb9a8575ca ("earlycon: initialise baud field of earlycon device structure") Cc: stable # 4.14 Signed-off-by: Matt Redfearn Signed-off-by: Greg Kroah-Hartman arch/mips/include/asm/Kbuild | 1 - arch/mips/include/asm/serial.h | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) commit 0946b2fb38fdb6585a5ac3ca84ac73924f645952 Author: Robin H. Johnson Date: Thu Nov 16 14:36:12 2017 -0800 firmware: cleanup FIRMWARE_IN_KERNEL message The help for FIRMWARE_IN_KERNEL still references the firmware_install command that was recently removed by commit 5620a0d1aacd ("firmware: delete in-kernel firmware"). Clean up the message to direct the user to their distribution's linux-firmware package, and remove any reference to firmware being included in the kernel source tree. Fixes: 5620a0d1aacd ("firmware: delete in-kernel firmware"). Cc: Masahiro Yamada Cc: stable Cc: David Woodhouse Signed-off-by: Robin H. Johnson Signed-off-by: Greg Kroah-Hartman drivers/base/Kconfig | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 5a244727f428a06634f22bb890e78024ab0c89f3 Author: William Breathitt Gray Date: Wed Nov 8 10:23:11 2017 -0500 isa: Prevent NULL dereference in isa_bus driver callbacks The isa_driver structure for an isa_bus device is stored in the device platform_data member of the respective device structure. This platform_data member may be reset to NULL if isa_driver match callback for the device fails, indicating a device unsupported by the ISA driver. This patch fixes a possible NULL pointer dereference if one of the isa_driver callbacks to attempted for an unsupported device. This error should not occur in practice since ISA devices are typically manually configured and loaded by the users, but we may as well prevent this error from popping up for the 0day testers. Fixes: a5117ba7da37 ("[PATCH] Driver model: add ISA bus") Signed-off-by: William Breathitt Gray Cc: stable Acked-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman drivers/base/isa.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 952b6b3b07877419386e719ff20917170e1ce684 Author: Antoine Tenart Date: Tue Nov 28 14:26:30 2017 +0100 net: phy: marvell10g: fix the PHY id mask The Marvell 10G PHY driver supports different hardware revisions, which have their bits 3..0 differing. To get the correct revision number these bits should be ignored. This patch fixes this by using the already defined MARVELL_PHY_ID_MASK (0xfffffff0) instead of the custom 0xffffffff mask. Fixes: 20b2af32ff3f ("net: phy: add Marvell Alaska X 88X3310 10Gigabit PHY support") Suggested-by: Yan Markman Signed-off-by: Antoine Tenart Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/marvell10g.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 52cf373c37a684f8fc279d541307fad39d206376 Author: Lucas Stach Date: Tue Nov 28 13:59:25 2017 +0100 cgroup: properly init u64_stats Lockdep complains that the stats update is trying to register a non-static key. This is because u64_stats are using a seqlock on 32bit arches, which needs to be initialized before usage. Fixes: 041cd640b2f3 (cgroup: Implement cgroup2 basic CPU usage accounting) Signed-off-by: Lucas Stach Signed-off-by: Tejun Heo kernel/cgroup/stat.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f40b55ab631325fb1822333f161077942033e338 Merge: e254997 76e583c Author: David S. Miller Date: Tue Nov 28 10:09:52 2017 -0500 Merge branch 'mvpp2-fixes' Antoine Tenart says: ==================== net: mvpp2: set of fixes This series fixes various issues with the Marvell PPv2 driver. The patches are sent together to avoid any possible conflict. The series is based on today's net tree. ==================== Signed-off-by: David S. Miller commit 76e583c5f50ef539caea6935d37af3595034befb Author: Antoine Tenart Date: Tue Nov 28 14:19:51 2017 +0100 net: mvpp2: check ethtool sets the Tx ring size is to a valid min value This patch fixes the Tx ring size checks when using ethtool, by adding an extra check in the PPv2 check_ringparam_valid helper. The Tx ring size cannot be set to a value smaller than the minimum number of descriptors needed for TSO. Fixes: 1d17db08c056 ("net: mvpp2: limit TSO segments and use stop/wake thresholds") Suggested-by: Yan Markman Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 6 ++++++ 1 file changed, 6 insertions(+) commit e749aca84b10f3987b2ee1f76e0c7d8aacc5653c Author: Yan Markman Date: Tue Nov 28 14:19:50 2017 +0100 net: mvpp2: do not disable GMAC padding Short fragmented packets may never be sent by the hardware when padding is disabled. This patch stop modifying the GMAC padding bits, to leave them to their reset value (disabled). Fixes: 3919357fb0bb ("net: mvpp2: initialize the GMAC when using a port") Signed-off-by: Yan Markman [Antoine: commit message] Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 9 --------- 1 file changed, 9 deletions(-) commit 26146b0e6b6869c6cd8a45ab3a4a5562e7a91b23 Author: Antoine Tenart Date: Tue Nov 28 14:19:49 2017 +0100 net: mvpp2: cleanup probed ports in the probe error path This patches fixes the probe error path by cleaning up probed ports, to avoid leaving registered net devices when the driver failed to probe. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit ba2d8d887d962c2f790e6dc01b2fd25b4608720b Author: Antoine Tenart Date: Tue Nov 28 14:19:48 2017 +0100 net: mvpp2: fix the txq_init error path When an allocation in the txq_init path fails, the allocated buffers end-up being freed twice: in the txq_init error path, and in txq_deinit. This lead to issues as txq_deinit would work on already freed memory regions: kernel BUG at mm/slub.c:3915! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP This patch fixes this by removing the txq_init own error path, as the txq_deinit function is always called on errors. This was introduced by TSO as way more buffers are allocated. Fixes: 186cd4d4e414 ("net: mvpp2: software tso support") Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) commit 1a6152d36dee08da2be2a3030dceb45ef680460a Author: Chao Yu Date: Tue Nov 28 23:01:44 2017 +0800 quota: propagate error from __dquot_initialize In commit 6184fc0b8dd7 ("quota: Propagate error from ->acquire_dquot()"), we have propagated error from __dquot_initialize to caller, but we forgot to handle such error in add_dquot_ref(), so, currently, during quota accounting information initialization flow, if we failed for some of inodes, we just ignore such error, and do account for others, which is not a good implementation. In this patch, we choose to let user be aware of such error, so after turning on quota successfully, we can make sure all inodes disk usage can be accounted, which will be more reasonable. Suggested-by: Jan Kara Signed-off-by: Chao Yu Signed-off-by: Jan Kara fs/quota/dquot.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 2db57789e6612ce0cf2fcbb577a1c8307b708566 Merge: f0c96c6 e9a9bb4 Author: Tony Lindgren Date: Tue Nov 28 07:06:34 2017 -0800 Merge branch 'soc-fixes' into omap-for-v4.15/fixes commit 3c18bbf3d11d2005da08b57ff26f44ff1c2b12d0 Author: Adam Ford Date: Tue Oct 31 13:42:13 2017 -0500 ARM: dts: logicpd-som-lv: Fix gpmc addresses for NAND and enet This patch fixes and issue where the NAND and GPMC based ethernet controller stopped working. This also updates the GPMC settings to be consistent with the Logic PD Torpedo development from the commit listed above. Fixes: 44e4716499b8 ("ARM: dts: omap3: Fix NAND device nodes") Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts | 3 ++- arch/arm/boot/dts/logicpd-som-lv.dtsi | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit cf87634c8b24e24bf379b8c6807c8b0fb5f23567 Author: Tony Lindgren Date: Fri Nov 17 08:56:58 2017 -0800 ARM: dts: Fix omap4 hang with GPS connected to USB by using wakeupgen There's been a reproducable USB OHCI/EHCI cpuidle related hang on omap4 for a while that happens after about 20 - 40 minutes on an idle system with some data feeding device being connected, like a USB GPS device or a cellular modem. This issue happens in cpuidle states C2 and C3 and does not happen if cpuidle is limited to C1 state only. The symptoms are that the whole system hangs and never wakes up from idle, and if a watchdog is configured the system reboots after a while. Turns out that OHCI/EHCI devices on omap4 are trying to use the GIC interrupt controller directly as a parent instead of the WUGEN. We need to pass the interrupts through WUGEN to GIC to provide the wakeup events for the processor. Let's fix the issue by removing the gic interrupt-parent and use the default interrupt-parent wakeupgen instead. Note that omap5.dtsi had this already fixes earlier by commit 7136d457f365 ("ARM: omap: convert wakeupgen to stacked domains") but we somehow missed omap4 at that point. Fixes: 7136d457f365 ("ARM: omap: convert wakeupgen to stacked domains") Cc: Dave Gerlach Cc: Nishanth Menon Cc: Marc Zyngier Cc: Sebastian Reichel Reviewed-by: Roger Quadros Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4.dtsi | 2 -- 1 file changed, 2 deletions(-) commit e9a9bb4e4779ca74cb52a6e2f8acbc0881d3bb18 Author: Dan Carpenter Date: Tue Nov 14 09:06:48 2017 +0300 ARM: OMAP2+: Missing error code in omap_device_build() We need to set the error code if omap_device_alloc() fails. Signed-off-by: Dan Carpenter Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b6d6af7226465b6d11eac09d0be2ab78a4a9eb62 Author: Keerthy Date: Fri Nov 10 16:56:52 2017 +0530 ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst function Referring TRM Am335X series: http://www.ti.com/lit/ug/spruh73p/spruh73p.pdf The LastPowerStateEntered bitfield is present only for PM_CEFUSE domain. This is not present in any of the other power domains. Hence remove the generic am33xx_pwrdm_read_prev_pwrst hook which wrongly reads the reserved bit fields for all the other power domains. Reading the reserved bits leads to wrongly interpreting the low power transitions for various power domains that do not have the LastPowerStateEntered field. The pm debug counters values are wrong currently as we are incrementing them based on the reserved bits. Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/mach-omap2/prm33xx.c | 12 ------------ 1 file changed, 12 deletions(-) commit d09220a887f70368afa79e850c95e74890c0a32d Author: Tony Lindgren Date: Mon Nov 27 08:57:26 2017 -0800 ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context With the CMA changes from Joonsoo Kim , it was noticed that n900 stopped booting. After investigating it turned out that n900 save_secure_ram_context does some whacky virtual to physical address translation for the SRAM data address. As we now only have minimal parts of omap3 idle code copied to SRAM, running save_secure_ram_context() in SRAM is not needed. It only gets called on PM init. And it seems there's no need to ever call this from SRAM idle code. So let's just keep save_secure_ram_context() in DDR, and pass it the physical address of the parameters. We can do everything else in omap-secure.c like we already do for other secure code. And since we don't have any documentation, I still have no clue what the values for 0, 1 and 1 for the parameters might be. If somebody has figured it out, please do send a patch to add some comments. Debugged-by: Joonsoo Kim Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap-secure.c | 19 +++++++++++++++++++ arch/arm/mach-omap2/omap-secure.h | 4 ++++ arch/arm/mach-omap2/pm.h | 4 ---- arch/arm/mach-omap2/pm34xx.c | 13 ++++--------- arch/arm/mach-omap2/sleep34xx.S | 26 ++++---------------------- 5 files changed, 31 insertions(+), 35 deletions(-) commit 90dbad8cd6efccbdce109d5ef0724f8434a6cdde Author: Johan Hovold Date: Fri Nov 3 15:30:56 2017 +0100 serdev: ttyport: fix tty locking in close Make sure to hold the tty lock as required when calling tty-driver close() (e.g. to avoid racing with hangup()). Note that the serport active flag is currently set under the lock at controller open, but really isn't protected by it. Fixes: cd6484e1830b ("serdev: Introduce new bus for serial attached devices") Signed-off-by: Johan Hovold Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/serdev-ttyport.c | 2 ++ 1 file changed, 2 insertions(+) commit 8bcd4e6a8decac251d55c4377e2e67f052777ce0 Author: Johan Hovold Date: Fri Nov 3 15:30:55 2017 +0100 serdev: ttyport: fix NULL-deref on hangup Make sure to use a properly refcounted tty_struct in write_wake up to avoid dereferencing a NULL-pointer when a port is being hung up. Fixes: bed35c6dfa6a ("serdev: add a tty port controller driver") Cc: stable # 4.11 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/serdev-ttyport.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit fd00cf81a9a84776ba58e56bd042c726dcf75cf3 Author: Johan Hovold Date: Fri Nov 3 15:30:53 2017 +0100 serdev: fix receive_buf return value when no callback The receive_buf callback is supposed to return the number of bytes processed and should specifically not return a negative errno. Due to missing sanity checks in the serdev tty-port controller, a driver not providing a receive_buf callback could cause the flush_to_ldisc() worker to spin in a tight loop when the tty buffer pointers are incremented with -EINVAL (-22). The missing sanity checks have now been added to the tty-port controller, but let's fix up the serdev-controller helper as well. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman include/linux/serdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb281683621b71ab9710d9dccbbef0c2e1769c97 Author: Johan Hovold Date: Fri Nov 3 15:30:52 2017 +0100 serdev: ttyport: add missing receive_buf sanity checks The receive_buf tty-port callback should return the number of bytes accepted and must specifically never return a negative errno (or a value larger than the buffer size) to the tty layer. A serdev driver not providing a receive_buf callback would currently cause the flush_to_ldisc() worker to spin in a tight loop when the tty buffer pointers are incremented with -EINVAL (-22) after data has been received. A serdev driver occasionally returning a negative errno (or a too large byte count) could cause information leaks or crashes when accessing memory outside the tty buffers in consecutive callbacks. Fixes: cd6484e1830b ("serdev: Introduce new bus for serial attached devices") Cc: stable # 4.11 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/serdev-ttyport.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit e2549970f469a88152ac0411780306f13653bcb8 Merge: 32f0160 09dbf62 Author: David S. Miller Date: Tue Nov 28 09:55:48 2017 -0500 Merge branch 'mlxsw-GRE-offloading-fixes' Jiri Pirko says: ==================== mlxsw: GRE offloading fixes Petr says: This patchset fixes a couple bugs in offloading GRE tunnels in mlxsw driver. Patch #1 fixes a problem that local routes pointing at a GRE tunnel device are offloaded even if that netdevice is down. Patch #2 detects that as a result of moving a GRE netdevice to a different VRF, two tunnels now have a conflict of local addresses, something that the mlxsw driver can't offload. Patch #3 fixes a FIB abort caused by forming a route pointing at a GRE tunnel that is eligible for offloading but already onloaded. Patch #4 fixes a problem that next hops migrated to a new RIF kept the old RIF reference, which went dangling shortly afterwards. ==================== Signed-off-by: David S. Miller commit 09dbf6297fa8bb4433d9293623b464750d874685 Author: Petr Machata Date: Tue Nov 28 13:17:14 2017 +0100 mlxsw: spectrum_router: Update nexthop RIF on update The function mlxsw_sp_nexthop_rif_update() walks the list of nexthops associated with a RIF, and updates the corresponding entries in the switch. It is used in particular when a tunnel underlay netdevice moves to a different VRF, and all the nexthops are migrated over to a new RIF. The problem is that each nexthop holds a reference to its RIF, and that is not updated. So after the old RIF is gone, further activity on these nexthops (such as downing the underlay netdevice) dereferences a dangling pointer. Fix the issue by updating rif of impacted nexthops before calling mlxsw_sp_nexthop_rif_update(). Fixes: 0c5f1cd5ba8c ("mlxsw: spectrum_router: Generalize __mlxsw_sp_ipip_entry_update_tunnel()") Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 28 ++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) commit d97cda5f465bacc82659263a885703d73759ea04 Author: Petr Machata Date: Tue Nov 28 13:17:13 2017 +0100 mlxsw: spectrum_router: Handle encap to demoted tunnels Some tunnels that are offloadable on their own can nonetheless be demoted to slow path if their local address is in conflict with that of another tunnel. When a route is formed for such a tunnel, mlxsw_sp_nexthop_ipip_init() fails to find the corresponding IPIP entry, and that triggers a FIB abort. Resolve the problem by not assuming that a tunnel for which mlxsw_sp_ipip_ops.can_offload() holds also automatically has an IPIP entry. Fixes: af641713e97d ("mlxsw: spectrum_router: Onload conflicting tunnels") Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 61 ++++++++++------------ 1 file changed, 29 insertions(+), 32 deletions(-) commit cab43d9c877456d2d8feb77335327316d3de9871 Author: Petr Machata Date: Tue Nov 28 13:17:12 2017 +0100 mlxsw: spectrum_router: Demote tunnels on VRF migration The mlxsw driver currently doesn't offload GRE tunnels if they have the same local address and use the same underlay VRF. When such a situation arises, the tunnels in conflict are demoted to slow path. However, the current code only verifies this condition on tunnel creation and tunnel change, not when a tunnel is moved to a different VRF. When the tunnel has no bound device, underlay and overlay are the same. Thus moving a tunnel moves the underlay as well, and that can cause local address conflict. So modify mlxsw_sp_netdevice_ipip_ol_vrf_event() to check if there are any conflicting tunnels, and demote them if yes. Fixes: af641713e97d ("mlxsw: spectrum_router: Onload conflicting tunnels") Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 57c77ce47063bd298e31ffcf7875ed0c2633bf8d Author: Petr Machata Date: Tue Nov 28 13:17:11 2017 +0100 mlxsw: spectrum_router: Offload decap only for up tunnels When a new local route is added, an IPIP entry is looked up to determine whether the route should be offloaded as a tunnel decap or as a trap. That decision should take into account whether the tunnel netdevice in question is actually IFF_UP, and only install a decap offload if it is. Fixes: 0063587d3587 ("mlxsw: spectrum: Support decap-only IP-in-IP tunnels") Signed-off-by: Petr Machata Reviewed-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 0ff3ab701963a845d52337ded7eebf2d1a14fe00 Author: Matt Redfearn Date: Wed Nov 22 09:57:28 2017 +0000 serial: 8250_early: Only set divisor if valid clk & baud If either uartclk or baud are 0, avoid calculating and setting a divisor based on them since the output will almost certainly be garbage. This also allows platforms such as the MIPS generic kernel, which has no way to know a valid BASE_BASE for the board it is actually booted on at compile time, to set BASE_BAUD to 0 and avoid early_8250 setting a bad divisor. This fixes a regression caused by commit 31cb9a8575ca ("earlycon: initialise baud field of earlycon device structure"), which changed the behavior of of_setup_earlycon such that it sets a baud rate in the earlycon structure where previously it was left as 0. All boards supported by the MIPS generic kernel started outputting garbage from the boot console due to an incorrect divisor being set. Fixes: 31cb9a8575ca ("earlycon: initialise baud field of earlycon device structure") Cc: stable # 4.14 Signed-off-by: Matt Redfearn Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_early.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 3bfd1300abfe3adb18e84a89d97a0e82a22124bb Author: Matt Wilson Date: Mon Nov 13 11:31:31 2017 -0800 serial: 8250_pci: Add Amazon PCI serial device ID This device will be used in future Amazon EC2 instances as the primary serial port (i.e., data sent to this port will be available via the GetConsoleOuput [1] EC2 API). [1] http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetConsoleOutput.html Cc: stable Signed-off-by: Matt Wilson Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_pci.c | 3 +++ 1 file changed, 3 insertions(+) commit 32f0160c0373ab6381594462b2533104e21626d4 Merge: 2e724dc 8abd20b Author: David S. Miller Date: Tue Nov 28 09:52:04 2017 -0500 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2017-11-27 This series contains updates to e1000, e1000e and i40e. Gustavo A. R. Silva fixes a sizeof() issue where we were taking the size of the pointer (which is always the size of the pointer). Sasha does a follow up fix to a previous fix for buffer overrun, to resolve community feedback from David Laight and the use of magic numbers. Amritha fixes the reporting of error codes for when adding a cloud filter fails. Ahmad Fatoum brushes the dust off the e1000 driver to fix a code comment and debug message which was incorrect about what the code was really doing. ==================== Signed-off-by: David S. Miller commit f50caa9b517a2542ae9769fc17ad84110ae07c8b Author: Arnd Bergmann Date: Tue Nov 14 12:40:31 2017 +0100 debugfs: fix debugfs_real_fops() build error Some drivers use debugfs_real_fops() even when CONFIG_DEBUG_FS is disabled, which now leads to a build error: In file included from include/linux/list.h:9:0, from include/linux/wait.h:7, from include/linux/wait_bit.h:8, from include/linux/fs.h:6, from drivers/net/wireless/broadcom/b43legacy/debugfs.c:26: drivers/net/wireless/broadcom/b43legacy/debugfs.c: In function 'b43legacy_debugfs_read': drivers/net/wireless/broadcom/b43legacy/debugfs.c:224:23: error: implicit declaration of function 'debugfs_real_fops'; did you mean 'debugfs_create_bool'? [-Werror=implicit-function-declaration] My first impulse was to add another 'static inline' dummy function returning NULL for it, which would work fine. However, most callers feed the pointer into container_of(), so it seems a little dangerous here. Since all the callers are inside of a read/write file operation that gets eliminated in this configuration, so having an 'extern' declaration seems better here. If it ever gets used in a dangerous way, that will now result in a link error. Fixes: 7c8d469877b1 ("debugfs: add support for more elaborate ->d_fsdata") Cc: Jakub Kicinski Cc: Simon Horman Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman include/linux/debugfs.h | 2 ++ 1 file changed, 2 insertions(+) commit 7fee72d5e8f1e7b8d8212e28291b1a0243ecf2f1 Author: Hans de Goede Date: Tue Nov 14 19:27:22 2017 +0100 uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices We've been adding this as a quirk on a per device basis hoping that newer disk enclosures would do better, but that has not happened, so simply apply this quirk to all Seagate devices. Signed-off-by: Hans de Goede Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/uas-detect.h | 4 ++++ 1 file changed, 4 insertions(+) commit e43a12f1793ae1fe006e26fe9327a8840a92233c Author: Kai-Heng Feng Date: Tue Nov 14 01:31:15 2017 -0500 usb: quirks: Add no-lpm quirk for KY-688 USB 3.1 Type-C Hub KY-688 USB 3.1 Type-C Hub internally uses a Genesys Logic hub to connect to Realtek r8153. Similar to commit ("7496cfe5431f2 usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter"), no-lpm can make r8153 ethernet work. 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 c9d24f78268be444e803fb2bb138a2f598de9c23 Author: Randy Dunlap Date: Fri Nov 17 11:00:45 2017 -0800 usb: build drivers/usb/common/ when USB_SUPPORT is set PHY drivers can use ULPI interfaces when CONFIG_USB (which is host side support) is not enabled, so also build drivers/usb/ when CONFIG_USB_SUPPORT is enabled so that drivers/usb/common/ is built. ERROR: "ulpi_unregister_driver" [drivers/phy/ti/phy-tusb1210.ko] undefined! ERROR: "__ulpi_register_driver" [drivers/phy/ti/phy-tusb1210.ko] undefined! ERROR: "ulpi_read" [drivers/phy/ti/phy-tusb1210.ko] undefined! ERROR: "ulpi_write" [drivers/phy/ti/phy-tusb1210.ko] undefined! ERROR: "ulpi_unregister_driver" [drivers/phy/qualcomm/phy-qcom-usb-hs.ko] undefined! ERROR: "__ulpi_register_driver" [drivers/phy/qualcomm/phy-qcom-usb-hs.ko] undefined! ERROR: "ulpi_write" [drivers/phy/qualcomm/phy-qcom-usb-hs.ko] undefined! Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman drivers/Makefile | 1 + 1 file changed, 1 insertion(+) commit 973593a960ddac0f14f0d8877d2d0abe0afda795 Author: Mike Looijmans Date: Thu Nov 9 13:16:46 2017 +0100 usb: hub: Cycle HUB power when initialization fails Sometimes the USB device gets confused about the state of the initialization and the connection fails. In particular, the device thinks that it's already set up and running while the host thinks the device still needs to be configured. To work around this issue, power-cycle the hub's output to issue a sort of "reset" to the device. This makes the device restart its state machine and then the initialization succeeds. This fixes problems where the kernel reports a list of errors like this: usb 1-1.3: device not accepting address 19, error -71 The end result is a non-functioning device. After this patch, the sequence becomes like this: usb 1-1.3: new high-speed USB device number 18 using ci_hdrc usb 1-1.3: device not accepting address 18, error -71 usb 1-1.3: new high-speed USB device number 19 using ci_hdrc usb 1-1.3: device not accepting address 19, error -71 usb 1-1-port3: attempt power cycle usb 1-1.3: new high-speed USB device number 21 using ci_hdrc usb-storage 1-1.3:1.2: USB Mass Storage device detected Signed-off-by: Mike Looijmans Acked-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hub.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 81cf4a45360f70528f1f64ba018d61cb5767249a Author: Masakazu Mokuno Date: Fri Nov 10 01:25:50 2017 +0900 USB: core: Add type-specific length check of BOS descriptors As most of BOS descriptors are longer in length than their header 'struct usb_dev_cap_header', comparing solely with it is not sufficient to avoid out-of-bounds access to BOS descriptors. This patch adds descriptor type specific length check in usb_get_bos_descriptor() to fix the issue. Signed-off-by: Masakazu Mokuno Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/config.c | 28 ++++++++++++++++++++++++---- include/uapi/linux/usb/ch9.h | 3 +++ 2 files changed, 27 insertions(+), 4 deletions(-) commit 1d5a31582ef046d3b233f0da1a68ae26519b2f0a Author: Colin Ian King Date: Tue Nov 7 16:45:04 2017 +0000 usb: host: fix incorrect updating of offset The variable temp is incorrectly being updated, instead it should be offset otherwise the loop just reads the same capability value and loops forever. Thanks to Alan Stern for pointing out the correct fix to my original fix. Fix also cleans up clang warning: drivers/usb/host/ehci-dbg.c:840:4: warning: Value stored to 'temp' is never read Fixes: d49d43174400 ("USB: misc ehci updates") Cc: stable Signed-off-by: Colin Ian King Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 33c309ebc797b908029fd3a0851aefe697e9b598 Author: Johan Hovold Date: Sat Nov 11 16:31:18 2017 +0100 USB: ulpi: fix bus-node lookup Fix bus-node lookup during registration, which ended up searching the whole device tree depth-first starting at the parent (or grand parent) rather than just matching on its children. To make things worse, the parent (or grand-parent) node could end being prematurely freed as well. Fixes: ef6a7bcfb01c ("usb: ulpi: Support device discovery via DT") Reported-by: Peter Robinson Reported-by: Stephen Boyd Cc: stable # 4.10 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/common/ulpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 446f666da9f019ce2ffd03800995487e79a91462 Author: Oliver Neukum Date: Thu Nov 23 16:39:52 2017 +0100 USB: usbfs: Filter flags passed in from user space USBDEVFS_URB_ISO_ASAP must be accepted only for ISO endpoints. Improve sanity checking. Reported-by: Andrey Konovalov Signed-off-by: Oliver Neukum Cc: stable Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devio.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit a7c42106ead7041b99662a125b408deb68a3e6aa Author: Heikki Krogerus Date: Tue Nov 14 14:45:27 2017 +0300 usb: add user selectable option for the whole USB Type-C Support It is more clear from user perspective to wrap the whole USB Type-C support under a single option that the user can select, then it is to always ask the user for every USB Type-C and USB Power Delivery driver separately. Reported-by: Linus Torvalds Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/Kconfig | 54 +++++++++++++++++++++++++++++++++++------- drivers/usb/typec/ucsi/Kconfig | 1 - 2 files changed, 46 insertions(+), 9 deletions(-) commit 69fc6cbbac542c349b3d350d10f6e394c253c81d Author: Qu Wenruo Date: Wed Nov 8 08:54:24 2017 +0800 btrfs: tree-checker: Fix false panic for sanity test [BUG] If we run btrfs with CONFIG_BTRFS_FS_RUN_SANITY_TESTS=y, it will instantly cause kernel panic like: ------ ... assertion failed: 0, file: fs/btrfs/disk-io.c, line: 3853 ... Call Trace: btrfs_mark_buffer_dirty+0x187/0x1f0 [btrfs] setup_items_for_insert+0x385/0x650 [btrfs] __btrfs_drop_extents+0x129a/0x1870 [btrfs] ... ----- [Cause] Btrfs will call btrfs_check_leaf() in btrfs_mark_buffer_dirty() to check if the leaf is valid with CONFIG_BTRFS_FS_RUN_SANITY_TESTS=y. However quite some btrfs_mark_buffer_dirty() callers(*) don't really initialize its item data but only initialize its item pointers, leaving item data uninitialized. This makes tree-checker catch uninitialized data as error, causing such panic. *: These callers include but not limited to setup_items_for_insert() btrfs_split_item() btrfs_expand_item() [Fix] Add a new parameter @check_item_data to btrfs_check_leaf(). With @check_item_data set to false, item data check will be skipped and fallback to old btrfs_check_leaf() behavior. So we can still get early warning if we screw up item pointers, and avoid false panic. Cc: Filipe Manana Reported-by: Lakshmipathi.G Signed-off-by: Qu Wenruo Reviewed-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 10 ++++++++-- fs/btrfs/tree-checker.c | 27 ++++++++++++++++++++++----- fs/btrfs/tree-checker.h | 14 +++++++++++++- 3 files changed, 43 insertions(+), 8 deletions(-) commit 05dfe9f2be9de988ef49eca85f8c02315e147e38 Merge: ac29fc6 b721b65 Author: Joonas Lahtinen Date: Tue Nov 28 15:34:04 2017 +0200 Merge tag 'gvt-fixes-2017-11-28' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2017-11-28 - regression fix for sane request alloc (Fred) - locking fix (Changbin) - fix invalid addr mask (Xiong) - compression regression fix (Weinan) - fix default pipe enable for virtual display (Xiaolin) Signed-off-by: Joonas Lahtinen commit 46febd37f9c758b05cd25feae8512f22584742fe Author: Lai Jiangshan Date: Tue Nov 28 21:19:53 2017 +0800 smp/hotplug: Move step CPUHP_AP_SMPCFD_DYING to the correct place Commit 31487f8328f2 ("smp/cfd: Convert core to hotplug state machine") accidently put this step on the wrong place. The step should be at the cpuhp_ap_states[] rather than the cpuhp_bp_states[]. grep smpcfd /sys/devices/system/cpu/hotplug/states 40: smpcfd:prepare 129: smpcfd:dying "smpcfd:dying" was missing before. So was the invocation of the function smpcfd_dying_cpu(). Fixes: 31487f8328f2 ("smp/cfd: Convert core to hotplug state machine") Signed-off-by: Lai Jiangshan Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Richard Weinberger Cc: Sebastian Andrzej Siewior Cc: stable@vger.kernel.org Cc: Boris Ostrovsky Link: https://lkml.kernel.org/r/20171128131954.81229-1-jiangshanlai@gmail.com kernel/cpu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0590cdfead8cd6319cc58b5dbe8ab9fbaabae131 Author: Aaro Koskinen Date: Fri Nov 17 09:50:10 2017 +0200 staging: octeon-usb: use __delay() instead of cvmx_wait() Commit edf188bee1d9 ("MIPS: Octeon: Remove usage of cvmx_wait() everywhere.") deleted cvmx_wait() but forgot to update OCTEON USB staging driver. Fix that to allow driver build. Fixes: edf188bee1d9 ("MIPS: Octeon: Remove usage of cvmx_wait() everywhere.") Signed-off-by: Aaro Koskinen Reviewed-by: James Hogan Signed-off-by: Greg Kroah-Hartman drivers/staging/octeon-usb/octeon-hcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b77992d2df9e47144354d1b25328b180afa33442 Author: Larry Finger Date: Sat Nov 25 13:32:38 2017 -0600 staging: rtl8188eu: Fix incorrect response to SIOCGIWESSID When not associated with an AP, wifi device drivers should respond to the SIOCGIWESSID ioctl with a zero-length string for the SSID, which is the behavior expected by dhcpcd. Currently, this driver returns an error code (-1) from the ioctl call, which causes dhcpcd to assume that the device is not a wireless interface and therefore it fails to work correctly with it thereafter. This problem was reported and tested at https://github.com/lwfinger/rtl8188eu/issues/234. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit c5f39d07860c35e5e4c63188139465af790f86ce Author: Gilad Ben-Yossef Date: Thu Nov 9 09:16:09 2017 +0000 staging: ccree: fix leak of import() after init() crypto_ahash_import() may be called either after crypto_ahash_init() or without such call. Right now we always internally call init() as part of import(), thus leaking memory and mappings if the user has already called init() herself. Fix this by only calling init() internally if the state is not already initialized. Fixes: commit 454527d0d94f ("staging: ccree: fix hash import/export") Cc: stable Signed-off-by: Gilad Ben-Yossef Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_hash.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 02d69c0359f7069c626cef6541f94a3a22dc5ed9 Author: Matthew Giassa Date: Sat Nov 18 08:26:17 2017 -0800 staging: comedi: ni_atmio: fix license warning. Resolving license check warning for drivers/staging/comedi. Added the license definitions present in the rest of the module and made sure it's aligned with the license (GPL) in the comments for the affected file (ni_atmio.c). Original warning: WARNING: modpost: missing MODULE_LICENSE() in drivers/staging/comedi//drivers/ni_atmio.o see include/linux/module.h for more information. No longer present after change. Signed-off-by: Matthew Giassa Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/ni_atmio.c | 5 +++++ 1 file changed, 5 insertions(+) commit a91d7fb97092d6b840af5899ded3b389603fd7f1 Author: Jiada Wang Date: Tue Nov 28 16:05:13 2017 +0900 ASoC: rsnd: ssiu: clear SSI_MODE for non TDM Extended modes register SSI_MODE is set when SSI works in TDM Extended, but it isn't reset when SSI starts to work in other modes, thus causes issues. This patch clearss SSI_MODE register when SSI works in modes other than TDM Extended. Fixes: 186fadc132f0 ("ASoC: rsnd: add TDM Extend Mode support") Signed-off-by: Jiada Wang Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/ssiu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a3acc696085e112733d191a77b106e67a4fa110b Author: John Keeping Date: Mon Nov 27 18:15:40 2017 +0000 usb: f_fs: Force Reserved1=1 in OS_DESC_EXT_COMPAT The specification says that the Reserved1 field in OS_DESC_EXT_COMPAT must have the value "1", but when this feature was first implemented we rejected any non-zero values. This was adjusted to accept all non-zero values (while now rejecting zero) in commit 53642399aa71 ("usb: gadget: f_fs: Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT"), but that breaks any userspace programs that worked previously by returning EINVAL when Reserved1 == 0 which was previously the only value that succeeded! If we just set the field to "1" ourselves, both old and new userspace programs continue to work correctly and, as a bonus, old programs are now compliant with the specification without having to fix anything themselves. Fixes: 53642399aa71 ("usb: gadget: f_fs: Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT") Cc: Signed-off-by: John Keeping Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit a4f0927ef588cf62bb864707261482c874352942 Author: Roger Quadros Date: Tue Oct 31 15:56:29 2017 +0200 usb: gadget: core: Fix ->udc_set_speed() speed handling Currently UDC core calls ->udc_set_speed() with the speed parameter containing the maximum speed supported by the gadget function driver. This might very well be more than that supported by the UDC controller driver. Select the lesser of the 2 speeds so both UDC and gadget function driver are operating within limits. This fixes PHY Erratic errors and 2 second enumeration delay on TI's AM437x platforms. Fixes: 6099eca796ae ("usb: gadget: core: introduce ->udc_set_speed() method") Cc: # v4.13+ Reported-by: Dylan Howey Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 7a9618a22aadffb55027d665491adf466bced61a Author: Bart Van Assche Date: Tue Oct 31 11:03:19 2017 -0700 usb: gadget: allow to enable legacy drivers without USB_ETH Considerable time ago the legacy gadget menu was added inside the USB_ETH choice. I think this was a mistake and that the legacy gadget menu should have been added after "endchoice" instead of before. Hence this patch. Fixes: commit 8443f2d2b778 ("usb: gadget: Gadget directory cleanup - group legacy gadgets") Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Nicholas Bellinger Cc: Andrzej Pietrasiewicz Cc: linux-usb@vger.kernel.org Signed-off-by: Felipe Balbi drivers/usb/gadget/Kconfig | 4 ++-- drivers/usb/gadget/legacy/Kconfig | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) commit a58204ab91ad8cae4d8474aa0ba5d1fc504860c9 Author: Yoshihiro Shimoda Date: Mon Nov 13 17:59:18 2017 +0900 usb: gadget: udc: renesas_usb3: fix number of the pipes This controller on R-Car Gen3 has 6 pipes that included PIPE 0 for control actually. But, the datasheet has error in writing as it has 31 pipes. (However, the previous code defined 30 pipes wrongly...) Anyway, this patch fixes it. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2fc059fa549fe6881d4c1f8d698b0f50bcd16ec Author: Colin Ian King Date: Tue Nov 14 16:18:28 2017 +0000 usb: gadget: don't dereference g until after it has been null checked Avoid dereferencing pointer g until after g has been sanity null checked; move the assignment of cdev much later when it is required into a more local scope. Detected by CoverityScan, CID#1222135 ("Dereference before null check") Fixes: b785ea7ce662 ("usb: gadget: composite: fix ep->maxburst initialization") Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi drivers/usb/gadget/composite.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b721b65af4eb46df6a1d9e34b14003225e403565 Author: Xiong Zhang Date: Tue Nov 28 07:29:54 2017 +0800 drm/i915/gvt: Correct ADDR_4K/2M/1G_MASK definition For ADDR_4K_MASK, bit[45..12] should be 1, all other bits should be 0. The current definition wrongly set bit[46] as 1 also. This path fixes this. v2: Add commit message, fixes and cc stable.(Zhenyu) Fixes: 2707e4446688("drm/i915/gvt: vGPU graphics memory virtualization") Signed-off-by: Xiong Zhang Cc: stable@vger.kernel.org Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7e60590208942de856fd43956ccebd19e71d686f Author: Xiaolin Zhang Date: Thu Nov 16 16:54:23 2017 +0800 drm/i915/gvt: enabled pipe A default on creating vgpu when i915 driver unloading, it will shutdown all CRTCs and it will introudce kernel panic when conducting igt drv_module_reload test case under guest environment (bug reported by XENGT-468) as below: BUG: unable to handle kernel NULL pointer dereference at 0000000000000070 IP: intel_edp_backlight_off+0xe/0x7c [i915] RIP: 0010:intel_edp_backlight_off+0xe/0x7c [i915] Call Trace: intel_disable_ddi+0xb3/0xbc [i915] intel_modeset_setup_hw_state+0x654/0xb4c [i915] intel_modeset_init+0x9f1/0xe69 [i915] ? intel_i2c_reset+0x3d/0x40 [i915] ? intel_setup_gmbus+0xba/0x249 [i915] i915_driver_load+0xae5/0xcc0 [i915] i915_pci_probe+0x3a/0x3c [i915] local_pci_probe+0x38/0x7b pci_device_probe+0xec/0x12b driver_probe_device+0x134/0x294 __driver_attach+0x6a/0x8c ? driver_probe_device+0x294/0x294 bus_for_each_dev+0x68/0x80 driver_attach+0x19/0x1b bus_add_driver+0xea/0x1d3 ? 0xffffffffa03cd000 driver_register+0x85/0xc1 ? 0xffffffffa03cd000 __pci_register_driver+0x55/0x57 i915_init+0x57/0x5a [i915] do_one_initcall+0x8a/0x12e ? __vunmap+0x8d/0x93 ? kmem_cache_alloc_trace+0x96/0x11c do_init_module+0x5a/0x1e1 in this case, active connector detected but no active pipe available, so it will hang to disable connector. to fix, on vgpu creating, to report active pipe available for guest. Signed-off-by: Xiaolin Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/display.c | 2 ++ 1 file changed, 2 insertions(+) commit c3c80f0736bb2767fab983d1ae53252b2ddd405d Author: fred gao Date: Tue Nov 14 17:09:35 2017 +0800 drm/i915/gvt: Move request alloc to dispatch_workload path only Previously the performance is improved through the workload auditing and shadowing ahead of vGPU scheduling, however, there is the case that more requests are allocated in submit_context before the previous request is added, the timeline will hold its seqno which is later. This patch is to move the request alloc to dispatch_workload function, where is the same place as request is added. It will fix the issue of kernel BUG for (timeline->seqno != request->fence.seqno) check when add_request. Fixes: 89ea20b930cb ("drm/i915/gvt: Factor out scan and shadow from workload dispatch") Signed-off-by: Chuanxiao Dong Signed-off-by: fred gao Signed-off-by: Zhenyu Wang (cherry picked from commit f2880e04f3a5419366926182fc97a3c2e4fd8f2a) drivers/gpu/drm/i915/gvt/execlist.c | 6 ++++++ drivers/gpu/drm/i915/gvt/scheduler.c | 24 ++++++++++++++++++++---- drivers/gpu/drm/i915/gvt/scheduler.h | 3 +++ 3 files changed, 29 insertions(+), 4 deletions(-) commit bf3a26b3cba59e2eee91cec3de6fdb4e8e670295 Author: Weinan Li Date: Tue Nov 21 10:54:41 2017 +0800 drm/i915/gvt: remove skl_misc_ctl_write handler With different settings of compressed data hash mode between VMs and host may cause gpu issues. Commit: 1999f108c ("drm/i915/gvt: Disable compression workaround for Gen9") disable compression workaround of guest in gvt host to align with host. Commit: 93564044f ("drm/i915: Switch over to the LLC/eLLC hotspot avoidance hash mode for CCS") add compression workaround, then we can remove the skl_misc_ctl_write hanlder. Better solution should be always keeping same settings as host, and bypass the write request from VMs, but it need to fetch data from host's "Context". Cc: Zhi Wang Signed-off-by: Weinan Li Signed-off-by: Xiong Zhang Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/handlers.c | 45 +++++-------------------------------- 1 file changed, 5 insertions(+), 40 deletions(-) commit 679fd3ebabc23dec33d42525b19479f16f355e61 Author: Changbin Du Date: Mon Nov 13 14:58:31 2017 +0800 drm/i915/gvt: Fix unsafe locking caused by spin_unlock_bh The caller of shadow_context_status_change may disable irqs. So it is not safe to use spin_unlock_bh in such context. Let's switch to irqsave version for safety. ------------[ cut here ]------------ WARNING: CPU: 2 PID: 4504 at kernel/softirq.c:161 __local_bh_enable_ip+0x46/0x60 [ 168.797710] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.2.8 01/26/2016 [ 168.797712] task: ffff8c693d22db80 task.stack: ffffb51b482bc000 [ 168.797718] RIP: 0010:__local_bh_enable_ip+0x46/0x60 [ 168.797721] RSP: 0018:ffffb51b482bfa10 EFLAGS: 00010046 [ 168.797724] RAX: 0000000000000046 RBX: ffff8c6900278000 RCX: 00000000ffffffff [ 168.797726] RDX: 0000000000000001 RSI: 0000000000000200 RDI: ffffffffc06a0330 [ 168.797728] RBP: ffffb51b482bfa10 R08: 0000000000000000 R09: ffff8c690027cb90 [ 168.797730] R10: ffffb51b482bfa40 R11: 00000004072f0001 R12: 0000000000000000 [ 168.797732] R13: 0000000000000000 R14: ffff8c690027ca9c R15: 0000000000000000 [ 168.797735] FS: 00007ff187c56700(0000) GS:ffff8c6959d00000(0000) knlGS:0000000000000000 [ 168.797738] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 168.797740] CR2: 0000562bc0c3991f CR3: 0000000430614006 CR4: 00000000003606e0 [ 168.797742] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 168.797744] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 168.797745] Call Trace: [ 168.797755] _raw_spin_unlock_bh+0x1e/0x20 [ 168.797826] shadow_context_status_change+0x120/0x1e0 [i915] [ 168.797831] notifier_call_chain+0x4a/0x70 [ 168.797834] atomic_notifier_call_chain+0x1a/0x20 [ 168.797896] execlists_cancel_port_requests+0x4f/0x80 [i915] [ 168.797956] reset_common_ring+0x30/0x100 [i915] [ 168.798007] i915_gem_reset_engine+0x114/0x330 [i915] [ 168.798060] ? i915_gem_retire_requests+0x75/0x180 [i915] [ 168.798111] i915_gem_reset+0x3e/0xb0 [i915] [ 168.798149] i915_reset+0x10b/0x1c0 [i915] [ 168.798187] i915_reset_device+0x209/0x220 [i915] [ 168.798225] ? gen8_gt_irq_ack+0x170/0x170 [i915] [ 168.798229] ? __queue_work+0x430/0x430 [ 168.798270] i915_handle_error+0x285/0x420 [i915] [ 168.798275] ? mntput+0x24/0x40 [ 168.798281] ? terminate_walk+0x8e/0xf0 [ 168.798328] i915_wedged_set+0x84/0xc0 [i915] [ 168.798333] simple_attr_write+0xab/0xc0 [ 168.798337] full_proxy_write+0x54/0x90 [ 168.798343] __vfs_write+0x37/0x170 [ 168.798349] ? common_file_perm+0x4c/0x100 [ 168.798355] ? apparmor_file_permission+0x1a/0x20 [ 168.798361] ? security_file_permission+0x3b/0xc0 [ 168.798365] vfs_write+0xb8/0x1b0 [ 168.798370] SyS_write+0x55/0xc0 [ 168.798376] entry_SYSCALL_64_fastpath+0x1e/0xa9 Fixes: 0e86cc9 ("drm/i915/gvt: implement per-vm mmio switching optimization") Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 762ff4678e89a5e3f8b2237533e04d3ef2737e78 Author: Lu Baolu Date: Tue Nov 28 12:40:59 2017 +0800 USB: serial: usb_debug: add new USB device id USB vendor id and product id for Linux USB Debug Target is added. Signed-off-by: Lu Baolu Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/usb_debug.c | 2 ++ 1 file changed, 2 insertions(+) commit ac29fc66855b79c2960c63a4a66952d5b721d698 Author: Arnd Bergmann Date: Mon Nov 27 16:10:27 2017 +0100 drm/i915: fix intel_backlight_device_register declaration The alternative intel_backlight_device_register() definition apparently never got used, but I have now run into a case of i915 being compiled without CONFIG_BACKLIGHT_CLASS_DEVICE, resulting in a number of identical warnings: drivers/gpu/drm/i915/intel_drv.h:1739:12: error: 'intel_backlight_device_register' defined but not used [-Werror=unused-function] This marks the function as 'inline', which was surely the original intention here. Fixes: 1ebaa0b9c2d4 ("drm/i915: Move backlight registration to connector registration") Signed-off-by: Arnd Bergmann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171127151239.1813673-1-arnd@arndb.de (cherry picked from commit 2de2d0b063b08becb2c67a2c338c44e37bdcffee) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a45b30a6c5db631e2ba680304bd5edd0cd1f9643 Author: Chris Wilson Date: Sat Nov 25 19:41:55 2017 +0000 drm/i915/fbdev: Serialise early hotplug events with async fbdev config As both the hotplug event and fbdev configuration run asynchronously, it is possible for them to run concurrently. If configuration fails, we were freeing the fbdev causing a use-after-free in the hotplug event. <7>[ 3069.935211] [drm:intel_fb_initial_config [i915]] Not using firmware configuration <7>[ 3069.935225] [drm:drm_setup_crtcs] looking for cmdline mode on connector 77 <7>[ 3069.935229] [drm:drm_setup_crtcs] looking for preferred mode on connector 77 0 <7>[ 3069.935233] [drm:drm_setup_crtcs] found mode 3200x1800 <7>[ 3069.935236] [drm:drm_setup_crtcs] picking CRTCs for 8192x8192 config <7>[ 3069.935253] [drm:drm_setup_crtcs] desired mode 3200x1800 set on crtc 43 (0,0) <7>[ 3069.935323] [drm:intelfb_create [i915]] no BIOS fb, allocating a new one <4>[ 3069.967737] general protection fault: 0000 [#1] PREEMPT SMP <0>[ 3069.977453] --------------------------------- <4>[ 3069.977457] Modules linked in: i915(+) vgem snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm r8169 mei_me mii prime_numbers mei i2c_hid pinctrl_geminilake pinctrl_intel [last unloaded: i915] <4>[ 3069.977492] CPU: 1 PID: 15414 Comm: kworker/1:0 Tainted: G U 4.14.0-CI-CI_DRM_3388+ #1 <4>[ 3069.977497] Hardware name: Intel Corp. Geminilake/GLK RVP1 DDR4 (05), BIOS GELKRVPA.X64.0062.B30.1708222146 08/22/2017 <4>[ 3069.977508] Workqueue: events output_poll_execute <4>[ 3069.977512] task: ffff880177734e40 task.stack: ffffc90001fe4000 <4>[ 3069.977519] RIP: 0010:__lock_acquire+0x109/0x1b60 <4>[ 3069.977523] RSP: 0018:ffffc90001fe7bb0 EFLAGS: 00010002 <4>[ 3069.977526] RAX: 6b6b6b6b6b6b6b6b RBX: 0000000000000282 RCX: 0000000000000000 <4>[ 3069.977530] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff880170d4efd0 <4>[ 3069.977534] RBP: ffffc90001fe7c70 R08: 0000000000000001 R09: 0000000000000000 <4>[ 3069.977538] R10: 0000000000000000 R11: ffffffff81899609 R12: ffff880170d4efd0 <4>[ 3069.977542] R13: ffff880177734e40 R14: 0000000000000001 R15: 0000000000000000 <4>[ 3069.977547] FS: 0000000000000000(0000) GS:ffff88017fc80000(0000) knlGS:0000000000000000 <4>[ 3069.977551] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4>[ 3069.977555] CR2: 00007f7e8b7bcf04 CR3: 0000000003e0f000 CR4: 00000000003406e0 <4>[ 3069.977559] Call Trace: <4>[ 3069.977565] ? mark_held_locks+0x64/0x90 <4>[ 3069.977571] ? _raw_spin_unlock_irq+0x24/0x50 <4>[ 3069.977575] ? _raw_spin_unlock_irq+0x24/0x50 <4>[ 3069.977579] ? trace_hardirqs_on_caller+0xde/0x1c0 <4>[ 3069.977583] ? _raw_spin_unlock_irq+0x2f/0x50 <4>[ 3069.977588] ? finish_task_switch+0xa5/0x210 <4>[ 3069.977592] ? lock_acquire+0xaf/0x200 <4>[ 3069.977596] lock_acquire+0xaf/0x200 <4>[ 3069.977600] ? __mutex_lock+0x5e9/0x9b0 <4>[ 3069.977604] _raw_spin_lock+0x2a/0x40 <4>[ 3069.977608] ? __mutex_lock+0x5e9/0x9b0 <4>[ 3069.977612] __mutex_lock+0x5e9/0x9b0 <4>[ 3069.977616] ? drm_fb_helper_hotplug_event.part.19+0x16/0xa0 <4>[ 3069.977621] ? drm_fb_helper_hotplug_event.part.19+0x16/0xa0 <4>[ 3069.977625] drm_fb_helper_hotplug_event.part.19+0x16/0xa0 <4>[ 3069.977630] output_poll_execute+0x8d/0x180 <4>[ 3069.977635] process_one_work+0x22e/0x660 <4>[ 3069.977640] worker_thread+0x48/0x3a0 <4>[ 3069.977644] ? _raw_spin_unlock_irqrestore+0x4c/0x60 <4>[ 3069.977649] kthread+0x102/0x140 <4>[ 3069.977653] ? process_one_work+0x660/0x660 <4>[ 3069.977657] ? kthread_create_on_node+0x40/0x40 <4>[ 3069.977662] ret_from_fork+0x27/0x40 <4>[ 3069.977666] Code: 8d 62 f8 c3 49 81 3c 24 e0 fa 3c 82 41 be 00 00 00 00 45 0f 45 f0 83 fe 01 77 86 89 f0 49 8b 44 c4 08 48 85 c0 0f 84 76 ff ff ff ff 80 38 01 00 00 8b 1d 62 f9 e8 01 45 8b 85 b8 08 00 00 85 <1>[ 3069.977707] RIP: __lock_acquire+0x109/0x1b60 RSP: ffffc90001fe7bb0 <4>[ 3069.977712] ---[ end trace 4ad012eb3af62df7 ]--- In order to keep the dev_priv->ifbdev alive after failure, we have to avoid the free and leave it empty until we unload the module (which is less than ideal, but a necessary evil for simplicity). Then we can use intel_fbdev_sync() to serialise the hotplug event with the configuration. The serialisation between the two was removed in commit 934458c2c95d ("Revert "drm/i915: Fix races on fbdev""), but the use after free is much older, commit 366e39b4d2c5 ("drm/i915: Tear down fbdev if initialization fails") Fixes: 366e39b4d2c5 ("drm/i915: Tear down fbdev if initialization fails") Fixes: 934458c2c95d ("Revert "drm/i915: Fix races on fbdev"") Signed-off-by: Chris Wilson Cc: Lukas Wunner Cc: Joonas Lahtinen Cc: Daniel Vetter Cc: stable@vger.kernel.org Reviewed-by: Lukas Wunner Link: https://patchwork.freedesktop.org/patch/msgid/20171125194155.355-1-chris@chris-wilson.co.uk (cherry picked from commit ad88d7fc6c032ddfb32b8d496a070ab71de3a64f) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_fbdev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 56350fb8978bbf4aafe08f21234e161dd128b417 Author: Ville Syrjälä Date: Thu Nov 23 21:41:57 2017 +0200 drm/i915: Prevent zero length "index" write The hardware always writes one or two bytes in the index portion of an indexed transfer. Make sure the message we send as the index doesn't have a zero length. Cc: stable@vger.kernel.org Cc: Daniel Kurtz Cc: Chris Wilson Cc: Daniel Vetter Cc: Sean Paul Fixes: 56f9eac05489 ("drm/i915/intel_i2c: use INDEX cycles for i2c read transactions") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171123194157.25367-3-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson (cherry picked from commit bb9e0d4bca50f429152e74a459160b41f3d60fb2) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_i2c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ae5c631e605a452a5a0e73205a92810c01ed954b Author: Ville Syrjälä Date: Thu Nov 23 21:41:56 2017 +0200 drm/i915: Don't try indexed reads to alternate slave addresses We can only specify the one slave address to indexed reads/writes. Make sure the messages we check are destined to the same slave address before deciding to do an indexed transfer. Cc: stable@vger.kernel.org Cc: Daniel Kurtz Cc: Chris Wilson Cc: Daniel Vetter Cc: Sean Paul Fixes: 56f9eac05489 ("drm/i915/intel_i2c: use INDEX cycles for i2c read transactions") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171123194157.25367-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson (cherry picked from commit c4deb62d7821672265b87952bcd1c808f3bf3e8f) Signed-off-by: Joonas Lahtinen drivers/gpu/drm/i915/intel_i2c.c | 1 + 1 file changed, 1 insertion(+) commit 55d2d0ad2fb4325f615d1950486fbc5e6fba1769 Author: Chunyu Hu Date: Mon Nov 27 22:21:39 2017 +0800 x86/idt: Load idt early in start_secondary On a secondary, idt is first loaded in cpu_init() with load_current_idt(), i.e. no exceptions can be handled before that point. The conversion of WARN() to use UD requires the IDT being loaded earlier as any warning between start_secondary() and load_curren_idt() in cpu_init() will result in an unhandled @UD exception and therefore fail the bringup of the CPU. Install the IDT handlers right in start_secondary() before calling cpu_init(). [ tglx: Massaged changelog ] Fixes: 9a93848fe787 ("x86/debug: Implement __WARN() using UD0") Signed-off-by: Chunyu Hu Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Cc: peterz@infradead.org Cc: bp@alien8.de Cc: rostedt@goodmis.org Cc: luto@kernel.org Link: https://lkml.kernel.org/r/1511792499-4073-1-git-send-email-chuhu@redhat.com arch/x86/kernel/smpboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd467e4eababe4c04272c1e646f066db02734c79 Author: Robert Lippert Date: Mon Nov 27 15:51:55 2017 -0800 hwmon: (pmbus) Use 64bit math for DIRECT format values Power values in the 100s of watt range can easily blow past 32bit math limits when processing everything in microwatts. Use 64bit math instead to avoid these issues on common 32bit ARM BMC platforms. Fixes: 442aba78728e ("hwmon: PMBus device driver") Signed-off-by: Robert Lippert Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/pmbus_core.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 8f5abe842e84ba9e72485ddd9dc02a3562b54e2a Author: Linus Torvalds Date: Mon Nov 27 16:45:56 2017 -0800 proc: don't report kernel addresses in /proc//stack This just changes the file to report them as zero, although maybe even that could be removed. I checked, and at least procps doesn't actually seem to parse the 'stack' file at all. And since the file doesn't necessarily even exist (it requires CONFIG_STACKTRACE), possibly other tools don't really use it either. That said, in case somebody parses it with tools, just having that zero there should keep such tools happy. Signed-off-by: Linus Torvalds fs/proc/base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8b1836c4b64386e9bc580438cae386ed31a43ab9 Author: Jay Elliott Date: Wed Nov 15 15:01:13 2017 -0800 netfilter: conntrack: clamp timeouts to INT_MAX When the conntracking code multiplies a timeout by HZ, it can overflow from positive to negative; this causes it to instantly expire. To protect against this the multiplication is done in 64-bit so we can prevent it from exceeding INT_MAX. Signed-off-by: Jay Elliott Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_netlink.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 42b3a4cb5609de757f5445fcad18945ba9239a07 Author: Juergen Gross Date: Fri Nov 24 09:42:21 2017 +0100 x86/xen: Support early interrupts in xen pv guests Add early interrupt handlers activated by idt_setup_early_handler() to the handlers supported by Xen pv guests. This will allow for early WARN() calls not crashing the guest. Suggested-by: Andy Lutomirski Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Cc: xen-devel@lists.xenproject.org Cc: boris.ostrovsky@oracle.com Link: https://lkml.kernel.org/r/20171124084221.30172-1-jgross@suse.com arch/x86/include/asm/segment.h | 12 ++++++++++++ arch/x86/mm/extable.c | 4 +++- arch/x86/xen/enlighten_pv.c | 37 ++++++++++++++++++++++++------------- arch/x86/xen/xen-asm_64.S | 14 ++++++++++++++ 4 files changed, 53 insertions(+), 14 deletions(-) commit b12cbb21586277f72533769832c24cc6c1d60ab3 Author: John Johansen Date: Wed Nov 22 07:33:38 2017 -0800 apparmor: fix oops in audit_signal_cb hook The apparmor_audit_data struct ordering got messed up during a merge conflict, resulting in the signal integer and peer pointer being in a union instead of a struct. For most of the 4.13 and 4.14 life cycle, this was hidden by commit 651e28c5537a ("apparmor: add base infastructure for socket mediation") which fixed the apparmor_audit_data struct when its data was added. When that commit was reverted in -rc7 the signal audit bug was exposed, and unfortunately it never showed up in any of the testing until after 4.14 was released. Shaun Khan, Zephaniah E. Loss-Cutler-Hull filed nearly simultaneous bug reports (with different oopes, the smaller of which is included below). Full credit goes to Tetsuo Handa for jumping on this as well and noticing the audit data struct problem and reporting it. [ 76.178568] BUG: unable to handle kernel paging request at ffffffff0eee3bc0 [ 76.178579] IP: audit_signal_cb+0x6c/0xe0 [ 76.178581] PGD 1a640a067 P4D 1a640a067 PUD 0 [ 76.178586] Oops: 0000 [#1] PREEMPT SMP [ 76.178589] Modules linked in: fuse rfcomm bnep usblp uvcvideo btusb btrtl btbcm btintel bluetooth ecdh_generic ip6table_filter ip6_tables xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack iptable_filter ip_tables x_tables intel_rapl joydev wmi_bmof serio_raw iwldvm iwlwifi shpchp kvm_intel kvm irqbypass autofs4 algif_skcipher nls_iso8859_1 nls_cp437 crc32_pclmul ghash_clmulni_intel [ 76.178620] CPU: 0 PID: 10675 Comm: pidgin Not tainted 4.14.0-f1-dirty #135 [ 76.178623] Hardware name: Hewlett-Packard HP EliteBook Folio 9470m/18DF, BIOS 68IBD Ver. F.62 10/22/2015 [ 76.178625] task: ffff9c7a94c31dc0 task.stack: ffffa09b02a4c000 [ 76.178628] RIP: 0010:audit_signal_cb+0x6c/0xe0 [ 76.178631] RSP: 0018:ffffa09b02a4fc08 EFLAGS: 00010292 [ 76.178634] RAX: ffffa09b02a4fd60 RBX: ffff9c7aee0741f8 RCX: 0000000000000000 [ 76.178636] RDX: ffffffffee012290 RSI: 0000000000000006 RDI: ffff9c7a9493d800 [ 76.178638] RBP: ffffa09b02a4fd40 R08: 000000000000004d R09: ffffa09b02a4fc46 [ 76.178641] R10: ffffa09b02a4fcb8 R11: ffff9c7ab44f5072 R12: ffffa09b02a4fd40 [ 76.178643] R13: ffffffff9e447be0 R14: ffff9c7a94c31dc0 R15: 0000000000000001 [ 76.178646] FS: 00007f8b11ba2a80(0000) GS:ffff9c7afea00000(0000) knlGS:0000000000000000 [ 76.178648] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 76.178650] CR2: ffffffff0eee3bc0 CR3: 00000003d5209002 CR4: 00000000001606f0 [ 76.178652] Call Trace: [ 76.178660] common_lsm_audit+0x1da/0x780 [ 76.178665] ? d_absolute_path+0x60/0x90 [ 76.178669] ? aa_check_perms+0xcd/0xe0 [ 76.178672] aa_check_perms+0xcd/0xe0 [ 76.178675] profile_signal_perm.part.0+0x90/0xa0 [ 76.178679] aa_may_signal+0x16e/0x1b0 [ 76.178686] apparmor_task_kill+0x51/0x120 [ 76.178690] security_task_kill+0x44/0x60 [ 76.178695] group_send_sig_info+0x25/0x60 [ 76.178699] kill_pid_info+0x36/0x60 [ 76.178703] SYSC_kill+0xdb/0x180 [ 76.178707] ? preempt_count_sub+0x92/0xd0 [ 76.178712] ? _raw_write_unlock_irq+0x13/0x30 [ 76.178716] ? task_work_run+0x6a/0x90 [ 76.178720] ? exit_to_usermode_loop+0x80/0xa0 [ 76.178723] entry_SYSCALL_64_fastpath+0x13/0x94 [ 76.178727] RIP: 0033:0x7f8b0e58b767 [ 76.178729] RSP: 002b:00007fff19efd4d8 EFLAGS: 00000206 ORIG_RAX: 000000000000003e [ 76.178732] RAX: ffffffffffffffda RBX: 0000557f3e3c2050 RCX: 00007f8b0e58b767 [ 76.178735] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000000263b [ 76.178737] RBP: 0000000000000000 R08: 0000557f3e3c2270 R09: 0000000000000001 [ 76.178739] R10: 000000000000022d R11: 0000000000000206 R12: 0000000000000000 [ 76.178741] R13: 0000000000000001 R14: 0000557f3e3c13c0 R15: 0000000000000000 [ 76.178745] Code: 48 8b 55 18 48 89 df 41 b8 20 00 08 01 5b 5d 48 8b 42 10 48 8b 52 30 48 63 48 4c 48 8b 44 c8 48 31 c9 48 8b 70 38 e9 f4 fd 00 00 <48> 8b 14 d5 40 27 e5 9e 48 c7 c6 7d 07 19 9f 48 89 df e8 fd 35 [ 76.178794] RIP: audit_signal_cb+0x6c/0xe0 RSP: ffffa09b02a4fc08 [ 76.178796] CR2: ffffffff0eee3bc0 [ 76.178799] ---[ end trace 514af9529297f1a3 ]--- Fixes: cd1dbf76b23d ("apparmor: add the ability to mediate signals") Reported-by: Zephaniah E. Loss-Cutler-Hull Reported-by: Shuah Khan Suggested-by: Tetsuo Handa Tested-by: Ivan Kozik Tested-by: Zephaniah E. Loss-Cutler-Hull Tested-by: Christian Boltz Tested-by: Shuah Khan Cc: stable@vger.kernel.org Signed-off-by: John Johansen security/apparmor/include/audit.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 8abd20b458cafd4c4e632fe7fb8f1a9861b02ee0 Author: Ahmad Fatoum Date: Sat Nov 18 21:53:58 2017 +0100 e1000: Fix off-by-one in debug message Signed-off-by: Ahmad Fatoum Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000/e1000_hw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 80752a98a0a0f666b263fecea327d4018b3f36f9 Author: Amritha Nambiar Date: Fri Nov 17 15:35:57 2017 -0800 i40e: Fix reporting incorrect error codes Adding cloud filters could fail for a number of reasons, unsupported filter fields for example, which fails during validation of fields itself. This will not result in admin command errors and converting the admin queue status to posix error code using i40e_aq_rc_to_posix would result in incorrect error values. If the failure was due to AQ error itself, reporting that correctly is handled in the inner function. Signed-off-by: Amritha Nambiar Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 1 - 1 file changed, 1 deletion(-) commit c0f4b163a03e73055dd734eaca64b9580e72e7fb Author: Sasha Neftin Date: Mon Nov 6 08:31:59 2017 +0200 e1000e: fix the use of magic numbers for buffer overrun issue This is a follow on to commit b10effb92e27 ("fix buffer overrun while the I219 is processing DMA transactions") to address David Laights concerns about the use of "magic" numbers. So define masks as well as add additional code comments to give a better understanding of what needs to be done to avoid a buffer overrun. Signed-off-by: Sasha Neftin Reviewed-by: Alexander H Duyck Reviewed-by: Dima Ruinskiy Reviewed-by: Raanan Avargil Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/ich8lan.h | 3 ++- drivers/net/ethernet/intel/e1000e/netdev.c | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) commit c30bf8cecebabb119aa1fbb17de84f924a8ab8f7 Author: Gustavo A R Silva Date: Wed Oct 18 15:34:25 2017 -0500 i40e/virtchnl: fix application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer. The proper fix in this particular case is to code sizeof(*vfres) instead of sizeof(vfres). This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A R Silva Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81833de1a46edce9ca20cfe079872ac1c20ef359 Author: Vasily Averin Date: Mon Nov 13 07:25:40 2017 +0300 lockd: fix "list_add double add" caused by legacy signal interface restart_grace() uses hardcoded init_net. It can cause to "list_add double add" in following scenario: 1) nfsd and lockd was started in several net namespaces 2) nfsd in init_net was stopped (lockd was not stopped because it have users from another net namespaces) 3) lockd got signal, called restart_grace() -> set_grace_period() and enabled lock_manager in hardcoded init_net. 4) nfsd in init_net is started again, its lockd_up() calls set_grace_period() and tries to add lock_manager into init_net 2nd time. Jeff Layton suggest: "Make it safe to call locks_start_grace multiple times on the same lock_manager. If it's already on the global grace_list, then don't try to add it again. (But we don't intentionally add twice, so for now we WARN about that case.) With this change, we also need to ensure that the nfsd4 lock manager initializes the list before we call locks_start_grace. While we're at it, move the rest of the nfsd_net initialization into nfs4_state_create_net. I see no reason to have it spread over two functions like it is today." Suggested patch was updated to generate warning in described situation. Suggested-by: Jeff Layton Signed-off-by: Vasily Averin Signed-off-by: J. Bruce Fields fs/nfs_common/grace.c | 6 +++++- fs/nfsd/nfs4state.c | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) commit 9e137ed5abcb21c0efffb1b6a7c48f2d21980303 Author: Vasily Averin Date: Mon Oct 30 16:47:58 2017 +0300 nlm_shutdown_hosts_net() cleanup nlm_complain_hosts() walks through nlm_server_hosts hlist, which should be protected by nlm_host_mutex. Signed-off-by: Vasily Averin Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/lockd/host.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2317dc557a3b6d5b73b697034611d658eb2cbde9 Author: Vasily Averin Date: Fri Nov 10 10:19:35 2017 +0300 race of nfsd inetaddr notifiers vs nn->nfsd_serv change nfsd_inet[6]addr_event uses nn->nfsd_serv without taking nfsd_mutex, which can be changed during execution of notifiers and crash the host. Moreover if notifiers were enabled in one net namespace they are enabled in all other net namespaces, from creation until destruction. This patch allows notifiers to access nn->nfsd_serv only after the pointer is correctly initialized and delays cleanup until notifiers are no longer in use. Signed-off-by: Vasily Averin Tested-by: Scott Mayhew Signed-off-by: J. Bruce Fields fs/nfsd/netns.h | 3 +++ fs/nfsd/nfsctl.c | 3 +++ fs/nfsd/nfssvc.c | 14 +++++++++++--- 3 files changed, 17 insertions(+), 3 deletions(-) commit 6b18dd1c03e07262ea0866084856b2a3c5ba8d09 Author: Vasily Averin Date: Fri Nov 10 10:19:26 2017 +0300 race of lockd inetaddr notifiers vs nlmsvc_rqst change lockd_inet[6]addr_event use nlmsvc_rqst without taken nlmsvc_mutex, nlmsvc_rqst can be changed during execution of notifiers and crash the host. Patch enables access to nlmsvc_rqst only when it was correctly initialized and delays its cleanup until notifiers are no longer in use. Note that nlmsvc_rqst can be temporally set to ERR_PTR, so the "if (nlmsvc_rqst)" check in notifiers is insufficient on its own. Signed-off-by: Vasily Averin Tested-by: Scott Mayhew Signed-off-by: J. Bruce Fields fs/lockd/svc.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit ee24eac3ebb781c12a654985e33ecaa07f4d0f95 Author: Bhumika Goyal Date: Tue Oct 17 18:14:26 2017 +0200 SUNRPC: make cache_detail structures const Make these const as they are only getting passed to the function cache_create_net having the argument as const. Signed-off-by: Bhumika Goyal Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields net/sunrpc/auth_gss/svcauth_gss.c | 4 ++-- net/sunrpc/svcauth_unix.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit ae2e408ec2e861b0e7dceea1808e4305a9381c2f Author: Bhumika Goyal Date: Tue Oct 17 18:14:25 2017 +0200 NFSD: make cache_detail structures const Make these const as they are only getting passed to the function cache_create_net having the argument as const. Signed-off-by: Bhumika Goyal Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfsd/export.c | 4 ++-- fs/nfsd/nfs4idmap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit d34971a65b72619508f49cd237283e92f1c329d5 Author: Bhumika Goyal Date: Tue Oct 17 18:14:23 2017 +0200 sunrpc: make the function arg as const Make the struct cache_detail *tmpl argument of the function cache_create_net as const as it is only getting passed to kmemup having the argument as const void *. Add const to the prototype too. Signed-off-by: Bhumika Goyal Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields include/linux/sunrpc/cache.h | 2 +- net/sunrpc/cache.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ae254dac721d44c0bfebe2795df87459e2e88219 Author: Andrew Elble Date: Thu Nov 9 13:41:10 2017 -0500 nfsd: check for use of the closed special stateid Prevent the use of the closed (invalid) special stateid by clients. Signed-off-by: Andrew Elble Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 64ebe12494fd5d193f014ce38e1fd83cc57883c8 Author: Naofumi Honda Date: Thu Nov 9 10:57:16 2017 -0500 nfsd: fix panic in posix_unblock_lock called from nfs4_laundromat From kernel 4.9, my two nfsv4 servers sometimes suffer from "panic: unable to handle kernel page request" in posix_unblock_lock() called from nfs4_laundromat(). These panics diseappear if we revert the commit "nfsd: add a LRU list for blocked locks". The cause appears to be a typo in nfs4_laundromat(), which is also present in nfs4_state_shutdown_net(). Cc: stable@vger.kernel.org Fixes: 7919d0a27f1e "nfsd: add a LRU list for blocked locks" Cc: jlayton@redhat.com Reveiwed-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3a2b19d1ee5633f76ae8a88da7bc039a5d1732aa Author: Vasily Averin Date: Thu Nov 2 13:03:42 2017 +0300 lockd: lost rollback of set_grace_period() in lockd_down_net() Commit efda760fe95ea ("lockd: fix lockd shutdown race") is incorrect, it removes lockd_manager and disarm grace_period_end for init_net only. If nfsd was started from another net namespace lockd_up_net() calls set_grace_period() that adds lockd_manager into per-netns list and queues grace_period_end delayed work. These action should be reverted in lockd_down_net(). Otherwise it can lead to double list_add on after restart nfsd in netns, and to use-after-free if non-disarmed delayed work will be executed after netns destroy. Fixes: efda760fe95e ("lockd: fix lockd shutdown race") Cc: stable@vger.kernel.org Signed-off-by: Vasily Averin Signed-off-by: J. Bruce Fields fs/lockd/svc.c | 2 ++ 1 file changed, 2 insertions(+) commit a3152f1440c762128a626d90718ba6535c81c1b4 Author: Vasily Averin Date: Mon Nov 6 16:23:24 2017 +0300 lockd: added cleanup checks in exit_net hook Signed-off-by: Vasily Averin Signed-off-by: J. Bruce Fields fs/lockd/svc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit b872285751c1af010e12d02bce7069e2061a58ca Author: Vasily Averin Date: Mon Nov 6 16:22:48 2017 +0300 grace: replace BUG_ON by WARN_ONCE in exit_net hook Signed-off-by: Vasily Averin Signed-off-by: J. Bruce Fields fs/nfs_common/grace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4f34bd0540d290d1fe1bc699550025623b2761ef Author: Andrew Elble Date: Wed Nov 8 17:29:51 2017 -0500 nfsd: fix locking validator warning on nfs4_ol_stateid->st_mutex class The use of the st_mutex has been confusing the validator. Use the proper nested notation so as to not produce warnings. Signed-off-by: Andrew Elble Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit e919b0765287f36f7e9c84aed785eddfbbd98dfa Author: Vasily Averin Date: Wed Nov 8 08:55:55 2017 +0300 lockd: remove net pointer from messages Publishing of net pointer is not safe, use net->ns.inum as net ID in debug messages [ 171.757678] lockd_up_net: per-net data created; net=f00001e7 [ 171.767188] NFSD: starting 90-second grace period (net f00001e7) [ 300.653313] lockd: nuking all hosts in net f00001e7... [ 300.653641] lockd: host garbage collection for net f00001e7 [ 300.653968] lockd: nlmsvc_mark_resources for net f00001e7 [ 300.711483] lockd_down_net: per-net data destroyed; net=f00001e7 [ 300.711847] lockd: nuking all hosts in net 0... [ 300.711847] lockd: host garbage collection for net 0 [ 300.711848] lockd: nlmsvc_mark_resources for net 0 Signed-off-by: Vasily Averin Signed-off-by: J. Bruce Fields fs/lockd/host.c | 21 +++++++++++++-------- fs/lockd/mon.c | 3 ++- fs/lockd/svc.c | 9 +++++---- fs/lockd/svcsubs.c | 2 +- 4 files changed, 21 insertions(+), 14 deletions(-) commit ba589528d6a251721a245fad07c0e3090fc9d6f5 Author: Vasily Averin Date: Wed Nov 8 08:55:22 2017 +0300 nfsd: remove net pointer from debug messages Publishing of net pointer is not safe, replace it in debug meesages by net->ns.inum [ 119.989161] nfsd: initializing export module (net: f00001e7). [ 171.767188] NFSD: starting 90-second grace period (net f00001e7) [ 322.185240] nfsd: shutting down export module (net: f00001e7). [ 322.186062] nfsd: export shutdown complete (net: f00001e7). Signed-off-by: Vasily Averin Signed-off-by: J. Bruce Fields fs/nfsd/export.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 03da3169c67f67729d8b52cee4e5689b0a3f94c0 Author: Trond Myklebust Date: Fri Nov 3 08:00:16 2017 -0400 nfsd: Fix races with check_stateid_generation() The various functions that call check_stateid_generation() in order to compare a client-supplied stateid with the nfs4_stid state, usually need to atomically check for closed state. Those that perform the check after locking the st_mutex using nfsd4_lock_ol_stateid() should now be OK, but we do want to fix up the others. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit 9271d7e509c1bfc0b9a418caec29ec8d1ac38270 Author: Trond Myklebust Date: Fri Nov 3 08:00:15 2017 -0400 nfsd: Ensure we check stateid validity in the seqid operation checks After taking the stateid st_mutex, we want to know that the stateid still represents valid state before performing any non-idempotent actions. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit beeca19cf1249a917ed737729dc92337c7633bea Author: Trond Myklebust Date: Fri Nov 3 08:00:14 2017 -0400 nfsd: Fix race in lock stateid creation If we're looking up a new lock state, and the creation fails, then we want to unhash it, just like we do for OPEN. However in order to do so, we need to that no other LOCK requests can grab the mutex until we have unhashed it (and marked it as closed). Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 70 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 28 deletions(-) commit fd1fd685b30867122aafbe2998ce4065c8c87e8f Author: Trond Myklebust Date: Fri Nov 3 08:00:14 2017 -0400 nfsd4: move find_lock_stateid Trivial cleanup to simplify following patch. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) commit 659aefb68eca28ba9aa482a9fc64de107332e256 Author: Trond Myklebust Date: Fri Nov 3 08:00:13 2017 -0400 nfsd: Ensure we don't recognise lock stateids after freeing them In order to deal with lookup races, nfsd4_free_lock_stateid() needs to be able to signal to other stateful functions that the lock stateid is no longer valid. Right now, nfsd_lock() will check whether or not an existing stateid is still hashed, but only in the "new lock" path. To ensure the stateid invalidation is also recognised by the "existing lock" path, and also by a second call to nfsd4_free_lock_stateid() itself, we can change the type to NFS4_CLOSED_STID under the stp->st_mutex. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit fb500a7cfee7f2f447d2bbf30cb59629feab6ac1 Author: Trond Myklebust Date: Fri Nov 3 08:00:12 2017 -0400 nfsd: CLOSE SHOULD return the invalid special stateid for NFSv4.x (x>0) Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit d8a1a000555ecd1b824ac1ed6df8fe364dfbbbb0 Author: Trond Myklebust Date: Fri Nov 3 08:00:11 2017 -0400 nfsd: Fix another OPEN stateid race If nfsd4_process_open2() is initialising a new stateid, and yet the call to nfs4_get_vfs_file() fails for some reason, then we must declare the stateid closed, and unhash it before dropping the mutex. Right now, we unhash the stateid after dropping the mutex, and without changing the stateid type, meaning that another OPEN could theoretically look it up and attempt to use it. Reported-by: Andrew W Elble Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 15ca08d3299682dc49bad73251677b2c5017ef08 Author: Trond Myklebust Date: Fri Nov 3 08:00:10 2017 -0400 nfsd: Fix stateid races between OPEN and CLOSE Open file stateids can linger on the nfs4_file list of stateids even after they have been closed. In order to avoid reusing such a stateid, and confusing the client, we need to recheck the nfs4_stid's type after taking the mutex. Otherwise, we risk reusing an old stateid that was already closed, which will confuse clients that expect new stateids to conform to RFC7530 Sections 9.1.4.2 and 16.2.5 or RFC5661 Sections 8.2.2 and 18.2.4. Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 59 insertions(+), 8 deletions(-) commit a39e17b2d842938e19997d2fdc0443fdd4cd8d10 Author: Jakub Kicinski Date: Mon Nov 27 12:10:23 2017 -0800 bpf: offload: add a license header I forgot to add a license on kernel/bpf/offload.c. Luckily I'm still the only author so make it explicitly GPLv2. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: Daniel Borkmann kernel/bpf/offload.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 1751e8a6cb935e555fcdbcb9ab4f0446e322ca3e Author: Linus Torvalds Date: Mon Nov 27 13:05:09 2017 -0800 Rename superblock flags (MS_xyz -> SB_xyz) This is a pure automated search-and-replace of the internal kernel superblock flags. The s_flags are now called SB_*, with the names and the values for the moment mirroring the MS_* flags that they're equivalent to. Note how the MS_xyz flags are the ones passed to the mount system call, while the SB_xyz flags are what we then use in sb->s_flags. The script to do this was: # places to look in; re security/*: it generally should *not* be # touched (that stuff parses mount(2) arguments directly), but # there are two places where we really deal with superblock flags. FILES="drivers/mtd drivers/staging/lustre fs ipc mm \ include/linux/fs.h include/uapi/linux/bfs_fs.h \ security/apparmor/apparmorfs.c security/apparmor/include/lib.h" # the list of MS_... constants SYMS="RDONLY NOSUID NODEV NOEXEC SYNCHRONOUS REMOUNT MANDLOCK \ DIRSYNC NOATIME NODIRATIME BIND MOVE REC VERBOSE SILENT \ POSIXACL UNBINDABLE PRIVATE SLAVE SHARED RELATIME KERNMOUNT \ I_VERSION STRICTATIME LAZYTIME SUBMOUNT NOREMOTELOCK NOSEC BORN \ ACTIVE NOUSER" SED_PROG= for i in $SYMS; do SED_PROG="$SED_PROG -e s/MS_$i/SB_$i/g"; done # we want files that contain at least one of MS_..., # with fs/namespace.c and fs/pnode.c excluded. L=$(for i in $SYMS; do git grep -w -l MS_$i $FILES; done| sort|uniq|grep -v '^fs/namespace.c'|grep -v '^fs/pnode.c') for f in $L; do sed -i $f $SED_PROG; done Requested-by: Al Viro Signed-off-by: Linus Torvalds drivers/mtd/mtdsuper.c | 6 +-- drivers/staging/lustre/lustre/llite/file.c | 2 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 14 +++---- fs/9p/vfs_super.c | 6 +-- fs/adfs/super.c | 4 +- fs/affs/amigaffs.c | 2 +- fs/affs/bitmap.c | 6 +-- fs/affs/super.c | 16 ++++---- fs/afs/super.c | 4 +- fs/befs/ChangeLog | 2 +- fs/befs/linuxvfs.c | 4 +- fs/btrfs/ctree.h | 2 +- fs/btrfs/extent_io.c | 2 +- fs/btrfs/ioctl.c | 4 +- fs/btrfs/super.c | 50 ++++++++++++------------ fs/btrfs/volumes.c | 4 +- fs/ceph/super.c | 8 ++-- fs/cifs/cifs_fs_sb.h | 2 +- fs/cifs/cifsfs.c | 12 +++--- fs/cifs/cifsglob.h | 4 +- fs/cifs/inode.c | 2 +- fs/cifs/xattr.c | 8 ++-- fs/coda/inode.c | 4 +- fs/cramfs/inode.c | 4 +- fs/ecryptfs/main.c | 8 ++-- fs/efs/super.c | 4 +- fs/ext2/balloc.c | 4 +- fs/ext2/ialloc.c | 4 +- fs/ext2/super.c | 20 +++++----- fs/ext4/inode.c | 4 +- fs/ext4/super.c | 52 ++++++++++++------------- fs/f2fs/checkpoint.c | 10 ++--- fs/f2fs/f2fs.h | 2 +- fs/f2fs/gc.c | 2 +- fs/f2fs/recovery.c | 10 ++--- fs/f2fs/super.c | 28 ++++++------- fs/fat/fatent.c | 6 +-- fs/fat/inode.c | 8 ++-- fs/fat/misc.c | 2 +- fs/fat/namei_msdos.c | 2 +- fs/freevxfs/vxfs_super.c | 4 +- fs/fs-writeback.c | 2 +- fs/fuse/inode.c | 12 +++--- fs/gfs2/ops_fstype.c | 16 ++++---- fs/gfs2/super.c | 10 ++--- fs/gfs2/trans.c | 2 +- fs/hfs/mdb.c | 4 +- fs/hfs/super.c | 16 ++++---- fs/hfsplus/super.c | 22 +++++------ fs/hpfs/map.c | 2 +- fs/hpfs/super.c | 8 ++-- fs/inode.c | 10 ++--- fs/isofs/inode.c | 2 +- fs/jffs2/fs.c | 4 +- fs/jffs2/os-linux.h | 2 +- fs/jffs2/super.c | 4 +- fs/jfs/super.c | 10 ++--- fs/kernfs/mount.c | 2 +- fs/libfs.c | 6 +-- fs/locks.c | 2 +- fs/minix/inode.c | 4 +- fs/ncpfs/inode.c | 4 +- fs/nfs/dir.c | 2 +- fs/nfs/inode.c | 2 +- fs/nfs/internal.h | 2 +- fs/nfs/super.c | 22 +++++------ fs/nilfs2/segment.c | 2 +- fs/nilfs2/super.c | 24 ++++++------ fs/nilfs2/the_nilfs.c | 6 +-- fs/notify/fsnotify.c | 2 +- fs/nsfs.c | 2 +- fs/ntfs/super.c | 32 +++++++-------- fs/ocfs2/file.c | 2 +- fs/ocfs2/super.c | 28 ++++++------- fs/ocfs2/xattr.c | 2 +- fs/openpromfs/inode.c | 4 +- fs/orangefs/super.c | 8 ++-- fs/overlayfs/super.c | 10 ++--- fs/proc/inode.c | 2 +- fs/proc/root.c | 2 +- fs/proc_namespace.c | 8 ++-- fs/qnx4/inode.c | 4 +- fs/qnx6/inode.c | 4 +- fs/reiserfs/inode.c | 2 +- fs/reiserfs/journal.c | 6 +-- fs/reiserfs/prints.c | 4 +- fs/reiserfs/super.c | 18 ++++----- fs/reiserfs/xattr.c | 10 ++--- fs/romfs/super.c | 4 +- fs/squashfs/super.c | 4 +- fs/statfs.c | 6 +-- fs/sysfs/mount.c | 2 +- fs/sysv/inode.c | 2 +- fs/sysv/super.c | 2 +- fs/ubifs/file.c | 2 +- fs/ubifs/io.c | 2 +- fs/ubifs/super.c | 20 +++++----- fs/ubifs/ubifs.h | 4 +- fs/udf/super.c | 6 +-- fs/ufs/balloc.c | 8 ++-- fs/ufs/ialloc.c | 10 ++--- fs/ufs/super.c | 30 +++++++------- fs/xfs/xfs_log.c | 6 +-- fs/xfs/xfs_super.c | 8 ++-- fs/xfs/xfs_super.h | 2 +- include/linux/fs.h | 2 +- include/uapi/linux/bfs_fs.h | 2 +- ipc/mqueue.c | 2 +- mm/shmem.c | 10 ++--- security/apparmor/apparmorfs.c | 2 +- security/apparmor/include/lib.h | 2 +- 111 files changed, 417 insertions(+), 417 deletions(-) commit abee210500ed15a22787009d9210b9a34911afcc Author: Nicolas Pitre Date: Mon Nov 27 15:51:04 2017 -0500 percpu: hack to let the CRIS architecture to boot until they clean up Commit 438a506180 ("percpu: don't forget to free the temporary struct pcpu_alloc_info") uncovered a problem on the CRIS architecture where the bootmem allocator is initialized with virtual addresses. Given it has: #define __va(x) ((void *)((unsigned long)(x) | 0x80000000)) then things just work out because the end result is the same whether you give this a physical or a virtual address. Untill you call memblock_free_early(__pa(address)) that is, because values from __pa() don't match with the virtual addresses stuffed in the bootmem allocator anymore. Avoid freeing the temporary pcpu_alloc_info memory on that architecture until they fix things up to let the kernel boot like it did before. Signed-off-by: Nicolas Pitre Signed-off-by: Tejun Heo Fixes: 438a506180 ("percpu: don't forget to free the temporary struct pcpu_alloc_info") mm/percpu.c | 4 ++++ 1 file changed, 4 insertions(+) commit 141cbfba1d0502006463aa80f57c64086226af1a Author: Thomas Meyer Date: Thu Aug 10 10:53:53 2017 +0200 auxdisplay: img-ascii-lcd: Only build on archs that have IOMEM This avoids the MODPOST error: ERROR: "devm_ioremap_resource" [drivers/auxdisplay/img-ascii-lcd.ko] undefined! Signed-off-by: Thomas Meyer Acked-by: Randy Dunlap Signed-off-by: Linus Torvalds drivers/auxdisplay/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 152e93af3cfe2d29d8136cc0a02a8612507136ee Author: Kirill A. Shutemov Date: Mon Nov 27 06:21:26 2017 +0300 mm, thp: Do not make pmd/pud dirty without a reason Currently we make page table entries dirty all the time regardless of access type and don't even consider if the mapping is write-protected. The reasoning is that we don't really need dirty tracking on THP and making the entry dirty upfront may save some time on first write to the page. Unfortunately, such approach may result in false-positive can_follow_write_pmd() for huge zero page or read-only shmem file. Let's only make page dirty only if we about to write to the page anyway (as we do for small pages). I've restructured the code to make entry dirty inside maybe_p[mu]d_mkwrite(). It also takes into account if the vma is write-protected. Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Cc: Hugh Dickins Signed-off-by: Linus Torvalds mm/huge_memory.c | 31 +++++++++++++++++++------------ mm/internal.h | 3 ++- mm/khugepaged.c | 2 +- mm/memory.c | 2 +- mm/migrate.c | 2 +- 5 files changed, 24 insertions(+), 16 deletions(-) commit a8f97366452ed491d13cf1e44241bc0b5740b1f0 Author: Kirill A. Shutemov Date: Mon Nov 27 06:21:25 2017 +0300 mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d() Currently, we unconditionally make page table dirty in touch_pmd(). It may result in false-positive can_follow_write_pmd(). We may avoid the situation, if we would only make the page table entry dirty if caller asks for write access -- FOLL_WRITE. The patch also changes touch_pud() in the same way. Signed-off-by: Kirill A. Shutemov Cc: Michal Hocko Cc: Hugh Dickins Signed-off-by: Linus Torvalds mm/huge_memory.c | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) commit 04226916d2360f56d57ad00bc48d2d1854d1e0b0 Author: Icenowy Zheng Date: Sun Apr 16 02:51:16 2017 -0400 media: usbtv: add a new usbid A new usbid of UTV007 is found in a newly bought device. The usbid is 1f71:3301. The ID on the chip is: UTV007 A89029.1 1520L18K1 Both video and audio is tested with the modified usbtv driver. Signed-off-by: Icenowy Zheng Acked-by: Lubomir Rintel Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/usbtv/usbtv-core.c | 1 + 1 file changed, 1 insertion(+) commit 20f9ceed72f127e4cc44c0358160e6e0118f823d Author: Arvind Yadav Date: Sat Nov 25 16:47:35 2017 +0530 pata_pdc2027x : make pdc2027x_*_timing structures const Make these pdc2027x_*_timing structures const as it is never modified. Signed-off-by: Arvind Yadav Signed-off-by: Tejun Heo drivers/ata/pata_pdc2027x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c1da86c19ad6bfb77ceef3414c82269e8466f410 Author: Arvind Yadav Date: Sat Nov 25 15:49:49 2017 +0530 pata_pdc2027x: Remove unnecessary error check Here, The function pdc_hardware_init always return zero. So it is not necessary to check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Tejun Heo drivers/ata/pata_pdc2027x.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 2e724dca7749223204bbae21745c0e3fc932700a Author: Jon Maloy Date: Mon Nov 27 20:13:39 2017 +0100 tipc: eliminate access after delete in group_filter_msg() KASAN revealed another access after delete in group.c. This time it found that we read the header of a received message after the buffer has been released. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ddf7005f32212f28669032651e09bd8d2245c35d Author: Wang Long Date: Sun Nov 19 16:08:37 2017 -0500 debug cgroup: use task_css_set instead of rcu_dereference This macro `task_css_set` verifies that the caller is inside proper critical section if the kernel set CONFIG_PROVE_RCU=y. Signed-off-by: Wang Long Signed-off-by: Tejun Heo kernel/cgroup/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit babd8a3e31fbb0abb4c37ee3548974732080b996 Merge: 5f1aa51 014d6da Author: Florian Fainelli Date: Mon Nov 27 11:28:23 2017 -0800 Merge tag 'bcm2835-dt-next-fixes-2017-11-15' into devicetree/fixes This pull request brings in a fix for a warning that started occuring when dtc from -next got merged. Signed-off-by: Florian Fainelli commit 16a27dfd218566f9604d5542c6285395cfc6831c Author: Albert Pool Date: Mon Nov 20 14:20:09 2017 +0100 ata: mediatek: Fix typo in module description Signed-off-by: Albert Pool Signed-off-by: Tejun Heo drivers/ata/ahci_mtk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5f1aa51c7a1eef1c5a60b8334e32c89904964245 Author: Florian Fainelli Date: Tue Nov 7 11:10:29 2017 -0800 ARM: dts: NSP: Fix PPI interrupt types Booting a kernel results in the kernel warning us about the following PPI interrupts configuration: [ 0.105127] smp: Bringing up secondary CPUs ... [ 0.110545] GIC: PPI11 is secure or misconfigured [ 0.110551] GIC: PPI13 is secure or misconfigured Fix this by using the appropriate edge configuration for PPI11 and PPI13, this is similar to what was fixed for Northstar (BCM5301X) in commit 0e34079cd1f6 ("ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags"). Fixes: 7b2e987de207 ("ARM: NSP: add minimal Northstar Plus device tree") Fixes: 1a9d53cabaf4 ("ARM: dts: NSP: Add TWD Support to DT") Acked-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-nsp.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 77416ab35f5712382e5a792bfa1736ceb70d5bbb Author: Florian Fainelli Date: Tue Nov 7 10:58:34 2017 -0800 ARM: dts: NSP: Disable AHCI controller for HR NSP boards The AHCI controller is currently enabled for all of these boards: bcm958623hr and bcm958625hr would result in a hard hang on boot that we cannot get rid of. Since this does not appear to have an easy and simple fix, just disable the AHCI controller for now until this gets resolved. Fixes: 70725d6e97ac ("ARM: dts: NSP: Enable SATA on bcm958625hr") Fixes: d454c3762437 ("ARM: dts: NSP: Add new DT file for bcm958623hr") Acked-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm958623hr.dts | 4 ---- arch/arm/boot/dts/bcm958625hr.dts | 4 ---- 2 files changed, 8 deletions(-) commit 5b5971df3bc2775107ddad164018a8a8db633b81 Author: Eduardo Otubo Date: Thu Nov 23 15:18:35 2017 +0100 xen-netfront: remove warning when unloading module v2: * Replace busy wait with wait_event()/wake_up_all() * Cannot garantee that at the time xennet_remove is called, the xen_netback state will not be XenbusStateClosed, so added a condition for that * There's a small chance for the xen_netback state is XenbusStateUnknown by the time the xen_netfront switches to Closed, so added a condition for that. When unloading module xen_netfront from guest, dmesg would output warning messages like below: [ 105.236836] xen:grant_table: WARNING: g.e. 0x903 still in use! [ 105.236839] deferring g.e. 0x903 (pfn 0x35805) This problem relies on netfront and netback being out of sync. By the time netfront revokes the g.e.'s netback didn't have enough time to free all of them, hence displaying the warnings on dmesg. The trick here is to make netfront to wait until netback frees all the g.e.'s and only then continue to cleanup for the module removal, and this is done by manipulating both device states. Signed-off-by: Eduardo Otubo Acked-by: Juergen Gross Signed-off-by: David S. Miller drivers/net/xen-netfront.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 2967acbb257a6a9bf912f4778b727e00972eac9b Author: Jens Axboe Date: Sun Nov 19 11:52:55 2017 -0700 blktrace: fix trace mutex deadlock A previous commit changed the locking around registration/cleanup, but direct callers of blk_trace_remove() were missed. This means that if we hit the error path in setup, we will deadlock on attempting to re-acquire the queue trace mutex. Fixes: 1f2cac107c59 ("blktrace: fix unlocked access to init/start-stop/teardown") Signed-off-by: Jens Axboe kernel/trace/blktrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 66a7c84d677e8e4a5a2ef4afdb9bd52e1399a866 Author: Colin Ian King Date: Wed Nov 22 17:52:24 2017 +0000 i2c: i2c-boardinfo: fix memory leaks on devinfo Currently when an error occurs devinfo is still allocated but is unused when the error exit paths break out of the for-loop. Fix this by kfree'ing devinfo to avoid the leak. Detected by CoverityScan, CID#1416590 ("Resource Leak") Fixes: 4124c4eba402 ("i2c: allow attaching IRQ resources to i2c_board_info") Fixes: 0daaf99d8424 ("i2c: copy device properties when using i2c_register_board_info()") Signed-off-by: Colin Ian King Signed-off-by: Wolfram Sang drivers/i2c/i2c-boardinfo.c | 2 ++ 1 file changed, 2 insertions(+) commit 6e0c9507bf51e1517a80ad0ac171e5402528fcef Author: Hans de Goede Date: Wed Nov 22 12:28:17 2017 +0100 i2c: i801: Fix Failed to allocate irq -2147483648 error On Apollo Lake devices the BIOS does not set up IRQ routing for the i801 SMBUS controller IRQ, so we end up with dev->irq set to IRQ_NOTCONNECTED. Detect this and do not try to use the irq in this case silencing: i801_smbus 0000:00:1f.1: Failed to allocate irq -2147483648: -107 Cc: stable@vger.kernel.org BugLink: https://communities.intel.com/thread/114759 Signed-off-by: Hans de Goede Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-i801.c | 3 +++ 1 file changed, 3 insertions(+) commit 509955823cc9cc225c05673b1b83d70ca70c5c60 Author: Darrick J. Wong Date: Tue Nov 21 20:53:02 2017 -0800 xfs: log recovery should replay deferred ops in order As part of testing log recovery with dm_log_writes, Amir Goldstein discovered an error in the deferred ops recovery that lead to corruption of the filesystem metadata if a reflink+rmap filesystem happened to shut down midway through a CoW remap: "This is what happens [after failed log recovery]: "Phase 1 - find and verify superblock... "Phase 2 - using internal log " - zero log... " - scan filesystem freespace and inode maps... " - found root inode chunk "Phase 3 - for each AG... " - scan (but don't clear) agi unlinked lists... " - process known inodes and perform inode discovery... " - agno = 0 "data fork in regular inode 134 claims CoW block 376 "correcting nextents for inode 134 "bad data fork in inode 134 "would have cleared inode 134" Hou Tao dissected the log contents of exactly such a crash: "According to the implementation of xfs_defer_finish(), these ops should be completed in the following sequence: "Have been done: "(1) CUI: Oper (160) "(2) BUI: Oper (161) "(3) CUD: Oper (194), for CUI Oper (160) "(4) RUI A: Oper (197), free rmap [0x155, 2, -9] "Should be done: "(5) BUD: for BUI Oper (161) "(6) RUI B: add rmap [0x155, 2, 137] "(7) RUD: for RUI A "(8) RUD: for RUI B "Actually be done by xlog_recover_process_intents() "(5) BUD: for BUI Oper (161) "(6) RUI B: add rmap [0x155, 2, 137] "(7) RUD: for RUI B "(8) RUD: for RUI A "So the rmap entry [0x155, 2, -9] for COW should be freed firstly, then a new rmap entry [0x155, 2, 137] will be added. However, as we can see from the log record in post_mount.log (generated after umount) and the trace print, the new rmap entry [0x155, 2, 137] are added firstly, then the rmap entry [0x155, 2, -9] are freed." When reconstructing the internal log state from the log items found on disk, it's required that deferred ops replay in exactly the same order that they would have had the filesystem not gone down. However, replaying unfinished deferred ops can create /more/ deferred ops. These new deferred ops are finished in the wrong order. This causes fs corruption and replay crashes, so let's create a single defer_ops to handle the subsequent ops created during replay, then use one single transaction at the end of log recovery to ensure that everything is replayed in the same order as they're supposed to be. Reported-by: Amir Goldstein Analyzed-by: Hou Tao Reviewed-by: Christoph Hellwig Tested-by: Amir Goldstein Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_item.c | 23 +++++--------- fs/xfs/xfs_bmap_item.h | 3 +- fs/xfs/xfs_log_recover.c | 75 +++++++++++++++++++++++++++++++++++++++++----- fs/xfs/xfs_refcount_item.c | 21 +++++-------- fs/xfs/xfs_refcount_item.h | 3 +- 5 files changed, 85 insertions(+), 40 deletions(-) commit 98c4f78dcdd8cec112d1cbc5e9a792ee6e5ab7a6 Author: Darrick J. Wong Date: Wed Nov 22 12:21:07 2017 -0800 xfs: always free inline data before resetting inode fork during ifree In xfs_ifree, we reset the data/attr forks to extents format without bothering to free any inline data buffer that might still be around after all the blocks have been truncated off the file. Prior to commit 43518812d2 ("xfs: remove support for inlining data/extents into the inode fork") nobody noticed because the leftover inline data after truncation was small enough to fit inside the inline buffer inside the fork itself. However, now that we've removed the inline buffer, we /always/ have to free the inline data buffer or else we leak them like crazy. This test was found by turning on kmemleak for generic/001 or generic/388. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig fs/xfs/xfs_inode.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit b7926c464d6479fc62a4297ca4f48a5da5fb0988 Author: Adam Thomson Date: Fri Nov 17 15:09:28 2017 +0000 ASoC: da7218: Correct IRQ level in DT binding example Current DT binding documentation shows an example where the IRQ for the device is chosen to be ACTIVE_HIGH. This is incorrect as the device only supports ACTIVE_LOW, so this commit fixes that discrepancy. Signed-off-by: Adam Thomson Acked-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/da7218.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3b0535216f04e7e149eaebe8e967c46bdf88dc3 Author: Adam Thomson Date: Fri Nov 17 15:09:27 2017 +0000 ASoC: da7219: Correct IRQ level in DT binding example Current DT binding documentation shows an example where the IRQ for the device is chosen to be ACTIVE_HIGH. This is incorrect as the device only supports ACTIVE_LOW, so this commit fixes that discrepancy. Signed-off-by: Adam Thomson Acked-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/da7219.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c98a9805096460567404799a7bd3149826affde7 Author: Tal Shorer Date: Fri Nov 3 17:27:50 2017 +0200 workqueue: respect isolated cpus when queueing an unbound work Initialize wq_unbound_cpumask to exclude cpus that were isolated by the cmdline's isolcpus parameter. Signed-off-by: Tal Shorer Signed-off-by: Tejun Heo kernel/workqueue.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 7d229c668a114e80d6be62b00e21a73bdd9ba7b3 Author: Tal Shorer Date: Fri Nov 3 17:27:49 2017 +0200 main: kernel_start: move housekeeping_init() before workqueue_init_early() This is needed in order to allow the unbound workqueue to take housekeeping cpus into accounty Signed-off-by: Tal Shorer Signed-off-by: Tejun Heo init/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a63dd7480d8f3c2b52e1e2bcab83e3e64c7c61a1 Merge: 20b7035 ded13fc Author: Paolo Bonzini Date: Mon Nov 27 17:54:13 2017 +0100 Merge tag 'kvm-ppc-fixes-4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into kvm-master PPC KVM fixes for 4.15 One commit here, that fixes a couple of bugs relating to the patch series that enables HPT guests to run on a radix host on POWER9 systems. This patch series went upstream in the 4.15 merge window, so no stable backport is required. commit 20b7035c66bacc909ae3ffe92c1a1ea7db99fe4f Author: Jan H. Schönherr Date: Fri Nov 24 22:39:01 2017 +0100 KVM: Let KVM_SET_SIGNAL_MASK work as advertised KVM API says for the signal mask you set via KVM_SET_SIGNAL_MASK, that "any unblocked signal received [...] will cause KVM_RUN to return with -EINTR" and that "the signal will only be delivered if not blocked by the original signal mask". This, however, is only true, when the calling task has a signal handler registered for a signal. If not, signal evaluation is short-circuited for SIG_IGN and SIG_DFL, and the signal is either ignored without KVM_RUN returning or the whole process is terminated. Make KVM_SET_SIGNAL_MASK behave as advertised by utilizing logic similar to that in do_sigtimedwait() to avoid short-circuiting of signals. Signed-off-by: Jan H. Schönherr Signed-off-by: Paolo Bonzini arch/mips/kvm/mips.c | 7 ++----- arch/powerpc/kvm/powerpc.c | 7 ++----- arch/s390/kvm/kvm-s390.c | 7 ++----- arch/x86/kvm/x86.c | 7 ++----- include/linux/kvm_host.h | 3 +++ virt/kvm/arm/arm.c | 8 +++----- virt/kvm/kvm_main.c | 23 +++++++++++++++++++++++ 7 files changed, 37 insertions(+), 25 deletions(-) commit 1599a185f0e6113be185b9fb809c621c73865829 Author: Prateek Sood Date: Wed Nov 15 19:50:15 2017 +0530 cpuset: Make cpuset hotplug synchronous Convert cpuset_hotplug_workfn() into synchronous call for cpu hotplug path. For memory hotplug path it still gets queued as a work item. Since cpuset_hotplug_workfn() can be made synchronous for cpu hotplug path, it is not required to wait for cpuset hotplug while thawing processes. Signed-off-by: Prateek Sood Signed-off-by: Tejun Heo include/linux/cpuset.h | 6 ------ kernel/cgroup/cpuset.c | 41 ++++++++++++++++++++--------------------- kernel/power/process.c | 2 -- kernel/sched/core.c | 1 - 4 files changed, 20 insertions(+), 30 deletions(-) commit aa24163b2ee5c92120e32e99b5a93143a0f4258e Author: Prateek Sood Date: Wed Nov 15 19:50:14 2017 +0530 cgroup/cpuset: remove circular dependency deadlock Remove circular dependency deadlock in a scenario where hotplug of CPU is being done while there is updation in cgroup and cpuset triggered from userspace. Process A => kthreadd => Process B => Process C => Process A Process A cpu_subsys_offline(); cpu_down(); _cpu_down(); percpu_down_write(&cpu_hotplug_lock); //held cpuhp_invoke_callback(); workqueue_offline_cpu(); queue_work_on(); // unbind_work on system_highpri_wq __queue_work(); insert_work(); wake_up_worker(); flush_work(); wait_for_completion(); worker_thread(); manage_workers(); create_worker(); kthread_create_on_node(); wake_up_process(kthreadd_task); kthreadd kthreadd(); kernel_thread(); do_fork(); copy_process(); percpu_down_read(&cgroup_threadgroup_rwsem); __rwsem_down_read_failed_common(); //waiting Process B kernfs_fop_write(); cgroup_file_write(); cgroup_procs_write(); percpu_down_write(&cgroup_threadgroup_rwsem); //held cgroup_attach_task(); cgroup_migrate(); cgroup_migrate_execute(); cpuset_can_attach(); mutex_lock(&cpuset_mutex); //waiting Process C kernfs_fop_write(); cgroup_file_write(); cpuset_write_resmask(); mutex_lock(&cpuset_mutex); //held update_cpumask(); update_cpumasks_hier(); rebuild_sched_domains_locked(); get_online_cpus(); percpu_down_read(&cpu_hotplug_lock); //waiting Eliminating deadlock by reversing the locking order for cpuset_mutex and cpu_hotplug_lock. Signed-off-by: Prateek Sood Signed-off-by: Tejun Heo kernel/cgroup/cpuset.c | 53 ++++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 23 deletions(-) commit 346cccf88319344c9f513bd85df6ae2258e8a8ea Author: oder_chiou@realtek.com Date: Mon Nov 20 18:23:19 2017 +0800 ASoC: rt5514: Add the sanity check for the driver_data in the resume function If the rt5514 spi driver is loaded, but the snd_soc_platform_driver is not loaded by the correct DAI settings, the NULL pointer will be gotten by snd_soc_platform_get_drvdata in the resume function. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5514-spi.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit b880b8056b31288323745a13930bc45cf4c86e9d Author: Maciej S. Szmigiero Date: Mon Nov 20 23:16:07 2017 +0100 ASoC: fsl_ssi: serialize AC'97 register access operations AC'97 register access operations (both read and write) on SSI use a one, shared set of SSI registers for AC'97 register address and data. This means that only one such access is possible at a time and so all these operations need to be serialized. Since an AC'97 register access operation in this driver takes 100us+ let's use a mutex for this. Use this opportunity to also change a default value returned from AC'97 register read function from -1 to 0, since that's what AC'97 specs require to be returned when unknown / undefined registers are read. Signed-off-by: Maciej S. Szmigiero Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit 695b78b548d8a26288f041e907ff17758df9e1d5 Author: Maciej S. Szmigiero Date: Mon Nov 20 23:14:55 2017 +0100 ASoC: fsl_ssi: AC'97 ops need regmap, clock and cleaning up on failure AC'97 ops (register read / write) need SSI regmap and clock, so they have to be set after them. We also need to set these ops back to NULL if we fail the probe. Signed-off-by: Maciej S. Szmigiero Acked-by: Nicolin Chen Signed-off-by: Mark Brown Cc: stable@vger.kernel.org sound/soc/fsl/fsl_ssi.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit ebb70442cdd4872260c2415929c456be3562da82 Author: Liu Bo Date: Tue Nov 21 14:35:40 2017 -0700 Btrfs: fix list_add corruption and soft lockups in fsync Xfstests btrfs/146 revealed this corruption, [ 58.138831] Buffer I/O error on dev dm-0, logical block 2621424, async page read [ 58.151233] BTRFS error (device sdf): bdev /dev/mapper/error-test errs: wr 1, rd 0, flush 0, corrupt 0, gen 0 [ 58.152403] list_add corruption. prev->next should be next (ffff88005e6775d8), but was ffffc9000189be88. (prev=ffffc9000189be88). [ 58.153518] ------------[ cut here ]------------ [ 58.153892] WARNING: CPU: 1 PID: 1287 at lib/list_debug.c:31 __list_add_valid+0x169/0x1f0 ... [ 58.157379] RIP: 0010:__list_add_valid+0x169/0x1f0 ... [ 58.161956] Call Trace: [ 58.162264] btrfs_log_inode_parent+0x5bd/0xfb0 [btrfs] [ 58.163583] btrfs_log_dentry_safe+0x60/0x80 [btrfs] [ 58.164003] btrfs_sync_file+0x4c2/0x6f0 [btrfs] [ 58.164393] vfs_fsync_range+0x5f/0xd0 [ 58.164898] do_fsync+0x5a/0x90 [ 58.165170] SyS_fsync+0x10/0x20 [ 58.165395] entry_SYSCALL_64_fastpath+0x1f/0xbe ... It turns out that we could record btrfs_log_ctx:io_err in log_one_extents when IO fails, but make log_one_extents() return '0' instead of -EIO, so the IO error is not acknowledged by the callers, i.e. btrfs_log_inode_parent(), which would remove btrfs_log_ctx:list from list head 'root->log_ctxs'. Since btrfs_log_ctx is allocated from stack memory, it'd get freed with a object alive on the list. then a future list_add will throw the above warning. This returns the correct error in the above case. Jeff also reported this while testing against his fsync error patch set[1]. [1]: https://www.spinics.net/lists/linux-btrfs/msg65308.html "btrfs list corruption and soft lockups while testing writeback error handling" Fixes: 8407f553268a4611f254 ("Btrfs: fix data corruption after fast fsync and writeback error") Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/file.c | 5 +++-- fs/btrfs/tree-log.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit b74558259c5149e5edd79348b70eb34177cbeea0 Author: Wanpeng Li Date: Wed Nov 22 14:04:00 2017 -0800 KVM: VMX: Fix vmx->nested freeing when no SMI handler Reported by syzkaller: ------------[ cut here ]------------ WARNING: CPU: 5 PID: 2939 at arch/x86/kvm/vmx.c:3844 free_loaded_vmcs+0x77/0x80 [kvm_intel] CPU: 5 PID: 2939 Comm: repro Not tainted 4.14.0+ #26 RIP: 0010:free_loaded_vmcs+0x77/0x80 [kvm_intel] Call Trace: vmx_free_vcpu+0xda/0x130 [kvm_intel] kvm_arch_destroy_vm+0x192/0x290 [kvm] kvm_put_kvm+0x262/0x560 [kvm] kvm_vm_release+0x2c/0x30 [kvm] __fput+0x190/0x370 task_work_run+0xa1/0xd0 do_exit+0x4d2/0x13e0 do_group_exit+0x89/0x140 get_signal+0x318/0xb80 do_signal+0x8c/0xb40 exit_to_usermode_loop+0xe4/0x140 syscall_return_slowpath+0x206/0x230 entry_SYSCALL_64_fastpath+0x98/0x9a The syzkaller testcase will execute VMXON/VMLAUCH instructions, so the vmx->nested stuff is populated, it will also issue KVM_SMI ioctl. However, the testcase is just a simple c program and not be lauched by something like seabios which implements smi_handler. Commit 05cade71cf (KVM: nSVM: fix SMI injection in guest mode) gets out of guest mode and set nested.vmxon to false for the duration of SMM according to SDM 34.14.1 "leave VMX operation" upon entering SMM. We can't alloc/free the vmx->nested stuff each time when entering/exiting SMM since it will induce more overhead. So the function vmx_pre_enter_smm() marks nested.vmxon false even if vmx->nested stuff is still populated. What it expected is em_rsm() can mark nested.vmxon to be true again. However, the smi_handler/rsm will not execute since there is no something like seabios in this scenario. The function free_nested() fails to free the vmx->nested stuff since the vmx->nested.vmxon is false which results in the above warning. This patch fixes it by also considering the no SMI handler case, luckily vmx->nested.smm.vmxon is marked according to the value of vmx->nested.vmxon in vmx_pre_enter_smm(), we can take advantage of it and free vmx->nested stuff when L1 goes down. Reported-by: Dmitry Vyukov Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Dmitry Vyukov Reviewed-by: Liran Alon Fixes: 05cade71cf (KVM: nSVM: fix SMI injection in guest mode) Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c37c28730bb031cc8a44a130c2555c0f3efbe2d0 Author: Wanpeng Li Date: Mon Nov 20 14:52:21 2017 -0800 KVM: VMX: Fix rflags cache during vCPU reset Reported by syzkaller: *** Guest State *** CR0: actual=0x0000000080010031, shadow=0x0000000060000010, gh_mask=fffffffffffffff7 CR4: actual=0x0000000000002061, shadow=0x0000000000000000, gh_mask=ffffffffffffe8f1 CR3 = 0x000000002081e000 RSP = 0x000000000000fffa RIP = 0x0000000000000000 RFLAGS=0x00023000 DR7 = 0x00000000000000 ^^^^^^^^^^ ------------[ cut here ]------------ WARNING: CPU: 6 PID: 24431 at /home/kernel/linux/arch/x86/kvm//x86.c:7302 kvm_arch_vcpu_ioctl_run+0x651/0x2ea0 [kvm] CPU: 6 PID: 24431 Comm: reprotest Tainted: G W OE 4.14.0+ #26 RIP: 0010:kvm_arch_vcpu_ioctl_run+0x651/0x2ea0 [kvm] RSP: 0018:ffff880291d179e0 EFLAGS: 00010202 Call Trace: kvm_vcpu_ioctl+0x479/0x880 [kvm] do_vfs_ioctl+0x142/0x9a0 SyS_ioctl+0x74/0x80 entry_SYSCALL_64_fastpath+0x23/0x9a The failed vmentry is triggered by the following beautified testcase: #include #include #include #include #include #include #include long r[5]; int main() { struct kvm_debugregs dr = { 0 }; r[2] = open("/dev/kvm", O_RDONLY); r[3] = ioctl(r[2], KVM_CREATE_VM, 0); r[4] = ioctl(r[3], KVM_CREATE_VCPU, 7); struct kvm_guest_debug debug = { .control = 0xf0403, .arch = { .debugreg[6] = 0x2, .debugreg[7] = 0x2 } }; ioctl(r[4], KVM_SET_GUEST_DEBUG, &debug); ioctl(r[4], KVM_RUN, 0); } which testcase tries to setup the processor specific debug registers and configure vCPU for handling guest debug events through KVM_SET_GUEST_DEBUG. The KVM_SET_GUEST_DEBUG ioctl will get and set rflags in order to set TF bit if single step is needed. All regs' caches are reset to avail and GUEST_RFLAGS vmcs field is reset to 0x2 during vCPU reset. However, the cache of rflags is not reset during vCPU reset. The function vmx_get_rflags() returns an unreset rflags cache value since the cache is marked avail, it is 0 after boot. Vmentry fails if the rflags reserved bit 1 is 0. This patch fixes it by resetting both the GUEST_RFLAGS vmcs field and its cache to 0x2 during vCPU reset. Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Reviewed-by: David Hildenbrand Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Nadav Amit Cc: Dmitry Vyukov Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e70b57a6ce4e8b92a56a615ae79bdb2bd66035e7 Author: Wanpeng Li Date: Mon Nov 20 14:55:05 2017 -0800 KVM: X86: Fix softlockup when get the current kvmclock watchdog: BUG: soft lockup - CPU#6 stuck for 22s! [qemu-system-x86:10185] CPU: 6 PID: 10185 Comm: qemu-system-x86 Tainted: G OE 4.14.0-rc4+ #4 RIP: 0010:kvm_get_time_scale+0x4e/0xa0 [kvm] Call Trace: get_time_ref_counter+0x5a/0x80 [kvm] kvm_hv_process_stimers+0x120/0x5f0 [kvm] kvm_arch_vcpu_ioctl_run+0x4b4/0x1690 [kvm] kvm_vcpu_ioctl+0x33a/0x620 [kvm] do_vfs_ioctl+0xa1/0x5d0 SyS_ioctl+0x79/0x90 entry_SYSCALL_64_fastpath+0x1e/0xa9 This can be reproduced when running kvm-unit-tests/hyperv_stimer.flat and cpu-hotplug stress simultaneously. __this_cpu_read(cpu_tsc_khz) returns 0 (set in kvmclock_cpu_down_prep()) when the pCPU is unhotplug which results in kvm_get_time_scale() gets into an infinite loop. This patch fixes it by treating the unhotplug pCPU as not using master clock. Reviewed-by: Radim Krčmář Reviewed-by: David Hildenbrand Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 12806ba937382fdfdbad62a399aa2dce65c10fcd Author: Dr. David Alan Gilbert Date: Fri Nov 17 11:52:50 2017 +0000 KVM: lapic: Fixup LDR on load in x2apic In x2apic mode the LDR is fixed based on the ID rather than separately loadable like it was before x2. When kvm_apic_set_state is called, the base is set, and if it has the X2APIC_ENABLE flag set then the LDR is calculated; however that value gets overwritten by the memcpy a few lines below overwriting it with the value that came from userland. The symptom is a lack of EOI after loading the state (e.g. after a QEMU migration) and is due to the EOI bitmap being wrong due to the incorrect LDR. This was seen with a Win2016 guest under Qemu with irqchip=split whose USB mouse didn't work after a VM migration. This corresponds to RH bug: https://bugzilla.redhat.com/show_bug.cgi?id=1502591 Reported-by: Yiqian Wei Signed-off-by: Dr. David Alan Gilbert Cc: stable@vger.kernel.org [Applied fixup from Liran Alon. - Paolo] Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 5 +++++ 1 file changed, 5 insertions(+) commit e872fa94662d0644057c7c80b3071bdb9249e5ab Author: Dr. David Alan Gilbert Date: Fri Nov 17 11:52:49 2017 +0000 KVM: lapic: Split out x2apic ldr calculation Split out the ldr calculation from kvm_apic_set_x2apic_id since we're about to reuse it in the following patch. Signed-off-by: Dr. David Alan Gilbert Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 9f97df50c52c2887432debb6238f4e43567386a5 Author: Jeff Layton Date: Mon Oct 30 11:20:15 2017 -0400 reiserfs: remove unneeded i_version bump The i_version field in reiserfs is not initialized and is only ever updated here. Nothing ever views it, so just remove it. Signed-off-by: Jeff Layton Signed-off-by: Jan Kara fs/reiserfs/super.c | 1 - 1 file changed, 1 deletion(-) commit fdaa451107ce543d345a339b4d5e20e8e4bac396 Author: Guenter Roeck Date: Mon Nov 20 20:27:56 2017 -0800 ASoC: amd: Add error checking to probe function The acp_audio_dma does not perform sufficient error checking in its probe function. This can result in crashes if a critical error path is encountered. Fixes: 7c31335a03b6a ("ASoC: AMD: add AMD ASoC ACP 2.x DMA driver") Cc: Alex Deucher Cc: Dominik Behr Cc: Daniel Kurtz Signed-off-by: Guenter Roeck Reviewed-by: Alex Deucher Signed-off-by: Mark Brown sound/soc/amd/acp-pcm-dma.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d3fe1e0185cffabc9b6f73f246a5552b46af7131 Merge: 6b56b1a 72e2c34 Author: David S. Miller Date: Tue Nov 28 01:09:42 2017 +0900 Merge tag 'mac80211-for-davem-2017-11-27' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Four fixes: * CRYPTO_SHA256 is needed for regdb validation * mac80211: mesh path metric was wrong in some frames * mac80211: use QoS null-data packets on QoS connections * mac80211: tear down RX aggregation sessions first to drop fewer packets in HW restart scenarios ==================== Signed-off-by: David S. Miller commit eae8d82529dd9820e206ecba0047b806c4410e65 Author: Qu Wenruo Date: Mon Nov 6 10:43:18 2017 +0800 btrfs: Fix wild memory access in compression level parser [BUG] Kernel panic when mounting with "-o compress" mount option. KASAN will report like: ------ ================================================================== BUG: KASAN: wild-memory-access in strncmp+0x31/0xc0 Read of size 1 at addr d86735fce994f800 by task mount/662 ... Call Trace: dump_stack+0xe3/0x175 kasan_report+0x163/0x370 __asan_load1+0x47/0x50 strncmp+0x31/0xc0 btrfs_compress_str2level+0x20/0x70 [btrfs] btrfs_parse_options+0xff4/0x1870 [btrfs] open_ctree+0x2679/0x49f0 [btrfs] btrfs_mount+0x1b7f/0x1d30 [btrfs] mount_fs+0x49/0x190 vfs_kern_mount.part.29+0xba/0x280 vfs_kern_mount+0x13/0x20 btrfs_mount+0x31e/0x1d30 [btrfs] mount_fs+0x49/0x190 vfs_kern_mount.part.29+0xba/0x280 do_mount+0xaad/0x1a00 SyS_mount+0x98/0xe0 entry_SYSCALL_64_fastpath+0x1f/0xbe ------ [Cause] For 'compress' and 'compress_force' options, its token doesn't expect any parameter so its args[0] contains uninitialized data. Accessing args[0] will cause above wild memory access. [Fix] For Opt_compress and Opt_compress_force, set compression level to the default. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba [ set the default in advance ] Signed-off-by: David Sterba fs/btrfs/compression.c | 2 +- fs/btrfs/compression.h | 2 ++ fs/btrfs/super.c | 13 +++++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) commit 28dfbe6ed483e8a589cce88095d7787d61bf9c16 Author: Andrew Waterman Date: Mon Oct 23 15:42:14 2017 -0700 RISC-V: Add VDSO entries for clock_get/gettimeofday/getcpu For now these are just placeholders that execute the syscall. We will later optimize them to avoid kernel crossings, but we'd like to have the VDSO entries from the first released kernel version to make the ABI simpler. Signed-off-by: Andrew Waterman Signed-off-by: Palmer Dabbelt arch/riscv/kernel/vdso/Makefile | 6 +++++- arch/riscv/kernel/vdso/clock_getres.S | 26 ++++++++++++++++++++++++++ arch/riscv/kernel/vdso/clock_gettime.S | 26 ++++++++++++++++++++++++++ arch/riscv/kernel/vdso/getcpu.S | 26 ++++++++++++++++++++++++++ arch/riscv/kernel/vdso/gettimeofday.S | 26 ++++++++++++++++++++++++++ arch/riscv/kernel/vdso/vdso.lds.S | 4 ++++ 6 files changed, 113 insertions(+), 1 deletion(-) commit b7e5a591502b03b4a1408bb93a15968d6ea446ce Author: Palmer Dabbelt Date: Mon Nov 20 10:33:09 2017 -0800 RISC-V: Remove __vdso_cmpxchg{32,64} symbol versions These were left over from an earlier version of the port. Signed-off-by: Palmer Dabbelt arch/riscv/kernel/vdso/vdso.lds.S | 2 -- 1 file changed, 2 deletions(-) commit 6b56b1a255bda11fcec0b5f4f8ac7dcec43808af Merge: 67c8d22 52a3958 Author: David S. Miller Date: Tue Nov 28 00:38:45 2017 +0900 Merge branch 'sctp-stream-reconfig-fixes' Xin Long says: ==================== sctp: a bunch of fixes for stream reconfig This patchset is to make stream reset and asoc reset work more correctly for stream reconfig. Thank to Marcelo making them very clear. ==================== Signed-off-by: David S. Miller commit 52a395896a051a3d5c34fba67c324f69ec5e67c6 Author: Xin Long Date: Sat Nov 25 21:05:36 2017 +0800 sctp: set sender next_tsn for the old result with ctsn_ack_point plus 1 When doing asoc reset, if the sender of the response has already sent some chunk and increased asoc->next_tsn before the duplicate request comes, the response will use the old result with an incorrect sender next_tsn. Better than asoc->next_tsn, asoc->ctsn_ack_point can't be changed after the sender of the response has performed the asoc reset and before the peer has confirmed it, and it's value is still asoc->next_tsn original value minus 1. This patch sets sender next_tsn for the old result with ctsn_ack_point plus 1 when processing the duplicate request, to make sure the sender next_tsn value peer gets will be always right. Fixes: 692787cef651 ("sctp: implement receiver-side procedures for the SSN/TSN Reset Request Parameter") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 159f2a7456c6ae95c1e1a58e8b8ec65ef12d51cf Author: Xin Long Date: Sat Nov 25 21:05:35 2017 +0800 sctp: avoid flushing unsent queue when doing asoc reset Now when doing asoc reset, it cleans up sacked and abandoned queues by calling sctp_outq_free where it also cleans up unsent, retransmit and transmitted queues. It's safe for the sender of response, as these 3 queues are empty at that time. But when the receiver of response is doing the reset, the users may already enqueue some chunks into unsent during the time waiting the response, and these chunks should not be flushed. To void the chunks in it would be removed, it moves the queue into a temp list, then gets it back after sctp_outq_free is done. The patch also fixes some incorrect comments in sctp_process_strreset_tsnreq. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/stream.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 5c6144a0eb5366ae07fc5059301b139338f39bbd Author: Xin Long Date: Sat Nov 25 21:05:34 2017 +0800 sctp: only allow the asoc reset when the asoc outq is empty As it says in rfc6525#section5.1.4, before sending the request, C2: The sender has either no outstanding TSNs or considers all outstanding TSNs abandoned. Prior to this patch, it tried to consider all outstanding TSNs abandoned by dropping all chunks in all outqs with sctp_outq_free (even including sacked, retransmit and transmitted queues) when doing this reset, which is too aggressive. To make it work gently, this patch will only allow the asoc reset when the sender has no outstanding TSNs by checking if unsent, transmitted and retransmit are all empty with sctp_outq_is_empty before sending and processing the request. Fixes: 692787cef651 ("sctp: implement receiver-side procedures for the SSN/TSN Reset Request Parameter") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/stream.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d570a59c5b5f8fb3b65fa7b15ddb205a1d55f8d0 Author: Xin Long Date: Sat Nov 25 21:05:33 2017 +0800 sctp: only allow the out stream reset when the stream outq is empty Now the out stream reset in sctp stream reconf could be done even if the stream outq is not empty. It means that users can not be sure since which msg the new ssn will be used. To make this more synchronous, it shouldn't allow to do out stream reset until these chunks in unsent outq all are sent out. This patch checks the corresponding stream outqs when sending and processing the request . If any of them has unsent chunks in outq, it will return -EAGAIN instead or send SCTP_STRRESET_IN_PROGRESS back to the sender. Fixes: 7f9d68ac944e ("sctp: implement sender-side procedures for SSN Reset Request Parameter") Suggested-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/stream.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 3aa623da789ff6edf789b5655debf33f50b3a9b2 Author: Xin Long Date: Sat Nov 25 21:05:32 2017 +0800 sctp: use sizeof(__u16) for each stream number length instead of magic number Now in stream reconf part there are still some places using magic number 2 for each stream number length. To make it more readable, this patch is to replace them with sizeof(__u16). Reported-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/stream.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 2a87af6ba1b9df4dda91d7e1a7d750f295ce1e57 Author: Mauro Carvalho Chehab Date: Mon Nov 27 10:38:03 2017 -0500 media: videobuf2: don't use kernel-doc "/**" markups While it would be very cool to have those functions using kernel-doc markups, the reality right now is that they don't follow kernel-doc rules, as parameters aren't documented. So, stop abusing on "/**" markups. Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/videobuf2-core.c | 56 ++++++++++++++++---------------- drivers/media/v4l2-core/videobuf2-v4l2.c | 10 +++--- 2 files changed, 33 insertions(+), 33 deletions(-) commit 255940e642387ffe886fd881ffc9917f31fe0564 Author: Mauro Carvalho Chehab Date: Mon Nov 27 10:27:54 2017 -0500 media: imon: don't use kernel-doc "/**" markups The function documentation here doesn't follow kernel-doc, as parameters aren't documented. So, stop abusing on "/**" markups. Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/imon.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 64dc6829a0080e3c8e70d52a98e9b0e30d968bd8 Author: Mauro Carvalho Chehab Date: Mon Nov 27 10:23:07 2017 -0500 media: ir-nec-decoder: fix kernel-doc parameters Some parameters aren't correctly identified, as noticed by those warnings: drivers/media/rc/ir-nec-decoder.c:49: warning: No description found for parameter 'ev' drivers/media/rc/ir-nec-decoder.c:49: warning: Excess function parameter 'duration' description in 'ir_nec_decode' drivers/media/rc/ir-nec-decoder.c:189: warning: Excess function parameter 'raw' description in 'ir_nec_scancode_to_raw' Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-nec-decoder.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 461afb273947098b5760fe27ba90f0cfa71578b5 Author: Mauro Carvalho Chehab Date: Mon Nov 27 10:21:28 2017 -0500 media: dvb_net: stop abusing /** for comments The comments that start with "/**" aren't kernel-doc stuff. So, just start them with "/*". Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_net.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit c4365922d5cd9720cb114f75089bc290571993a3 Author: Mauro Carvalho Chehab Date: Mon Nov 27 10:19:38 2017 -0500 media: rc-ir-raw: cleanup kernel-doc markups Cleanup those warnings: drivers/media/rc/rc-ir-raw.c:141: warning: No description found for parameter 'ev' drivers/media/rc/rc-ir-raw.c:141: warning: Excess function parameter 'type' description in 'ir_raw_event_store_with_filter' Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-ir-raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 771a0997ef305cd4a763877a9fd2caa6d4a4276f Author: Mauro Carvalho Chehab Date: Mon Nov 27 10:18:02 2017 -0500 media: dvb_frontend fix kernel_doc markups There were some troubles there: drivers/media/dvb-core/dvb_frontend.c:379: warning: No description found for parameter 'fe' drivers/media/dvb-core/dvb_frontend.c:379: warning: No description found for parameter 'check_wrapped' drivers/media/dvb-core/dvb_frontend.c:1265: warning: No description found for parameter 'p_out' Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 159308106aa0aa0873ee6e000b05db08a9413f58 Author: Mauro Carvalho Chehab Date: Mon Nov 27 10:14:25 2017 -0500 media: vpif: don't generate a kernel-doc warning on a constant Constants documentation is not supported by kernel-doc markups. So, change the comment label to avoid this warning: drivers/media/platform/davinci/vpif.c:54: warning: cannot understand function prototype: 'const struct vpif_channel_config_params vpif_ch_params[] = ' Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 34eb9751ea8285c7732991a09cb8729d624f6245 Author: Mauro Carvalho Chehab Date: Mon Nov 27 10:10:28 2017 -0500 media: drxj and drxk: don't produce kernel-doc warnings Those drivers use a different notation for comments. While it is not worth converting to kernel-doc, removing it is also not an option. So, just replace /** by /* and be happy :-) Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/drx39xyj/drxj.c | 248 ++++++++++++++-------------- drivers/media/dvb-frontends/drxk_hard.c | 32 ++-- 2 files changed, 140 insertions(+), 140 deletions(-) commit 251c201bf4f8b5bf4f1ccb4f8920eed2e1f57580 Author: Maxime Chevallier Date: Mon Nov 27 15:16:32 2017 +0100 spi: a3700: Fix clk prescaling for coefficient over 15 The Armada 3700 SPI controller has 2 ranges of prescaler coefficients. One ranging from 0 to 15 by steps of 1, and one ranging from 0 to 30 by steps of 2. This commit fixes the prescaler coefficients that are over 15 so that it uses the correct range of values. The prescaling coefficient is rounded to the upper value if it is odd. This was tested on Espressobin with spidev and a locigal analyser. Signed-off-by: Maxime Chevallier Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-armada-3700.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 86850b9a0495b10326765f03b9e77fd46e83981c Author: Mauro Carvalho Chehab Date: Mon Nov 27 10:09:03 2017 -0500 media: img-ir-hw: fix one kernel-doc comment Needed to suppress the following warnings: drivers/media/rc/img-ir/img-ir-hw.c:351: warning: No description found for parameter 'reg_timings' drivers/media/rc/img-ir/img-ir-hw.c:351: warning: Excess function parameter 'timings' description in 'img_ir_decoder_convert' Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/img-ir/img-ir-hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b77000ed558daa3bef0899d29bf171b8c9b5e6a8 Author: Josef Bacik Date: Wed Nov 15 16:20:52 2017 -0500 btrfs: fix deadlock when writing out space cache If we fail to prepare our pages for whatever reason (out of memory in our case) we need to make sure to drop the block_group->data_rwsem, otherwise hilarity ensues. Signed-off-by: Josef Bacik Reviewed-by: Omar Sandoval Reviewed-by: Liu Bo Reviewed-by: David Sterba [ add label and use existing unlocking code ] Signed-off-by: David Sterba fs/btrfs/free-space-cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 929b99ed9b31c6de984c6cf49763eaed6767ac2e Author: Mauro Carvalho Chehab Date: Mon Nov 27 08:38:30 2017 -0500 media: siano: get rid of documentation warnings The Siano driver doesn't use kernel-doc markups. While it would be wanderful to convert to use it, it is probably not worth the time. So, instead of solving all problems there, just make sure that it won't produce dozens of warnings. Signed-off-by: Mauro Carvalho Chehab drivers/media/common/siano/smscoreapi.c | 66 ++++++++++++++++----------------- drivers/media/usb/siano/smsusb.c | 4 +- 2 files changed, 35 insertions(+), 35 deletions(-) commit f67f366c69c8e2287cfe32a3b2406ff706b43075 Author: Mauro Carvalho Chehab Date: Mon Nov 27 08:35:13 2017 -0500 media: rc: fix lots of documentation warnings Building the driver with gcc 7.2.1 and: make ARCH=i386 CF=-D__CHECK_ENDIAN__ CONFIG_DEBUG_SECTION_MISMATCH=y W=1 CHECK='' M=drivers/media now produces a lot of warnings: drivers/media/rc/rc-main.c:278: warning: No description found for parameter 'new_keycode' drivers/media/rc/rc-main.c:278: warning: Excess function parameter 'keycode' description in 'ir_update_mapping' drivers/media/rc/rc-main.c:387: warning: No description found for parameter 'ke' drivers/media/rc/rc-main.c:387: warning: No description found for parameter 'old_keycode' drivers/media/rc/rc-main.c:387: warning: Excess function parameter 'scancode' description in 'ir_setkeycode' drivers/media/rc/rc-main.c:387: warning: Excess function parameter 'keycode' description in 'ir_setkeycode' drivers/media/rc/rc-main.c:433: warning: Excess function parameter 'to' description in 'ir_setkeytable' drivers/media/rc/rc-main.c:506: warning: No description found for parameter 'ke' drivers/media/rc/rc-main.c:506: warning: Excess function parameter 'scancode' description in 'ir_getkeycode' drivers/media/rc/rc-main.c:506: warning: Excess function parameter 'keycode' description in 'ir_getkeycode' drivers/media/rc/rc-main.c:634: warning: No description found for parameter 't' drivers/media/rc/rc-main.c:634: warning: Excess function parameter 'cookie' description in 'ir_timer_keyup' Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) commit 46e42a303178ca1341d1ab3e0b5c1227b89b60ee Author: Mauro Carvalho Chehab Date: Mon Nov 27 08:26:54 2017 -0500 media: dvb_ca_en50221: fix lots of documentation warnings Building the driver with gcc 7.2.1 and: make ARCH=i386 CF=-D__CHECK_ENDIAN__ CONFIG_DEBUG_SECTION_MISMATCH=y W=1 CHECK='' M=drivers/media now produces a lot of warnings: drivers/media/dvb-core/dvb_ca_en50221.c:233: warning: No description found for parameter 'ca' drivers/media/dvb-core/dvb_ca_en50221.c:233: warning: No description found for parameter 'slot' drivers/media/dvb-core/dvb_ca_en50221.c:284: warning: No description found for parameter 'timeout_hz' drivers/media/dvb-core/dvb_ca_en50221.c:284: warning: Excess function parameter 'timeout_ms' description in 'dvb_ca_en50221_wait_if_status' drivers/media/dvb-core/dvb_ca_en50221.c:409: warning: No description found for parameter 'tuple_type' drivers/media/dvb-core/dvb_ca_en50221.c:409: warning: No description found for parameter 'tuple_length' drivers/media/dvb-core/dvb_ca_en50221.c:409: warning: Excess function parameter 'tupleType' description in 'dvb_ca_en50221_read_tuple' drivers/media/dvb-core/dvb_ca_en50221.c:409: warning: Excess function parameter 'tupleLength' description in 'dvb_ca_en50221_read_tuple' drivers/media/dvb-core/dvb_ca_en50221.c:795: warning: No description found for parameter 'buf' drivers/media/dvb-core/dvb_ca_en50221.c:795: warning: No description found for parameter 'bytes_write' drivers/media/dvb-core/dvb_ca_en50221.c:795: warning: Excess function parameter 'ebuf' description in 'dvb_ca_en50221_write_data' drivers/media/dvb-core/dvb_ca_en50221.c:795: warning: Excess function parameter 'count' description in 'dvb_ca_en50221_write_data' drivers/media/dvb-core/dvb_ca_en50221.c:942: warning: No description found for parameter 'pubca' drivers/media/dvb-core/dvb_ca_en50221.c:942: warning: Excess function parameter 'ca' description in 'dvb_ca_en50221_camchange_irq' drivers/media/dvb-core/dvb_ca_en50221.c:970: warning: No description found for parameter 'pubca' drivers/media/dvb-core/dvb_ca_en50221.c:970: warning: Excess function parameter 'ca' description in 'dvb_ca_en50221_camready_irq' drivers/media/dvb-core/dvb_ca_en50221.c:990: warning: No description found for parameter 'pubca' drivers/media/dvb-core/dvb_ca_en50221.c:990: warning: Excess function parameter 'ca' description in 'dvb_ca_en50221_frda_irq' drivers/media/dvb-core/dvb_ca_en50221.c:1304: warning: No description found for parameter 'data' drivers/media/dvb-core/dvb_ca_en50221.c:1348: warning: No description found for parameter 'parg' drivers/media/dvb-core/dvb_ca_en50221.c:1348: warning: Excess function parameter 'inode' description in 'dvb_ca_en50221_io_do_ioctl' drivers/media/dvb-core/dvb_ca_en50221.c:1348: warning: Excess function parameter 'arg' description in 'dvb_ca_en50221_io_do_ioctl' drivers/media/dvb-core/dvb_ca_en50221.c:1432: warning: Excess function parameter 'inode' description in 'dvb_ca_en50221_io_ioctl' drivers/media/dvb-core/dvb_ca_en50221.c:1544: warning: No description found for parameter 'ca' drivers/media/dvb-core/dvb_ca_en50221.c:1544: warning: No description found for parameter 'result' drivers/media/dvb-core/dvb_ca_en50221.c:1544: warning: No description found for parameter '_slot' drivers/media/dvb-core/dvb_ca_en50221.c:1849: warning: No description found for parameter 'pubca' drivers/media/dvb-core/dvb_ca_en50221.c:1849: warning: Excess function parameter 'ca' description in 'dvb_ca_en50221_init' drivers/media/dvb-core/dvb_ca_en50221.c:1936: warning: No description found for parameter 'pubca' drivers/media/dvb-core/dvb_ca_en50221.c:1936: warning: Excess function parameter 'ca_dev' description in 'dvb_ca_en50221_release' drivers/media/dvb-core/dvb_ca_en50221.c:1936: warning: Excess function parameter 'ca' description in 'dvb_ca_en50221_release' Trivially fix them. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_ca_en50221.c | 68 ++++++++++++++++----------------- 1 file changed, 33 insertions(+), 35 deletions(-) commit 088fecfbb2c8a3890918fc614a7e1e1ccdd16c83 Merge: 30b4e12 4fbd8d1 Author: Mauro Carvalho Chehab Date: Mon Nov 27 08:02:30 2017 -0500 Merge tag 'v4.15-rc1' into patchwork Linux 4.15-rc1 * tag 'v4.15-rc1': (12179 commits) Linux 4.15-rc1 ARM: BUG if jumping to usermode address in kernel mode m68k/macboing: Fix missed timer callback assignment afs: remove redundant assignment of dvnode to itself afs: cell: Remove unnecessary code in afs_lookup_cell afs: Fix signal handling in some file ops afs: Fix some dentry handling in dir ops and missing key_puts afs: Make afs_write_begin() avoid writing to a page that's being stored sched/debug: Fix task state recording/printout x86/decoder: Add new TEST instruction pattern x86/PCI: Remove unused HyperTransport interrupt support x86/umip: Fix insn_get_code_seg_params()'s return value x86/boot/KASLR: Remove unused variable genirq/matrix: Make - vs ?: Precedence explicit irqchip/imgpdc: Use resource_size function on resource object irqchip/qcom: Fix u32 comparison with value less than zero ipvlan: Fix insufficient skb linear check for ipv6 icmp ipvlan: Fix insufficient skb linear check for arp geneve: only configure or fill UDP_ZERO_CSUM6_RX/TX info when CONFIG_IPV6 net: dsa: bcm_sf2: Clear IDDQ_GLOBAL_PWR bit for PHY ... commit 593e789fd4421635bde09398b8a8fb510b18414a Author: Vasyl Gomonovych Date: Wed Nov 22 16:28:00 2017 +0100 usb: bdc: fix platform_no_drv_owner.cocci warnings Remove .owner field if calls are used which set it automatically drivers/usb/gadget/udc/bdc/bdc_core.c:645:3-8: No need to set .owner here. The core will do it. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Vasyl Gomonovych Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/bdc/bdc_core.c | 1 - 1 file changed, 1 deletion(-) commit 30bf90ccdec1da9c8198b161ecbff39ce4e5a9ba Author: Vincent Pelletier Date: Sun Nov 26 06:52:53 2017 +0000 usb: gadget: ffs: Forbid usb_ep_alloc_request from sleeping Found using DEBUG_ATOMIC_SLEEP while submitting an AIO read operation: [ 100.853642] BUG: sleeping function called from invalid context at mm/slab.h:421 [ 100.861148] in_atomic(): 1, irqs_disabled(): 1, pid: 1880, name: python [ 100.867954] 2 locks held by python/1880: [ 100.867961] #0: (&epfile->mutex){....}, at: [] ffs_mutex_lock+0x27/0x30 [usb_f_fs] [ 100.868020] #1: (&(&ffs->eps_lock)->rlock){....}, at: [] ffs_epfile_io.isra.17+0x24b/0x590 [usb_f_fs] [ 100.868076] CPU: 1 PID: 1880 Comm: python Not tainted 4.14.0-edison+ #118 [ 100.868085] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48 [ 100.868093] Call Trace: [ 100.868122] dump_stack+0x47/0x62 [ 100.868156] ___might_sleep+0xfd/0x110 [ 100.868182] __might_sleep+0x68/0x70 [ 100.868217] kmem_cache_alloc_trace+0x4b/0x200 [ 100.868248] ? dwc3_gadget_ep_alloc_request+0x24/0xe0 [dwc3] [ 100.868302] dwc3_gadget_ep_alloc_request+0x24/0xe0 [dwc3] [ 100.868343] usb_ep_alloc_request+0x16/0xc0 [udc_core] [ 100.868386] ffs_epfile_io.isra.17+0x444/0x590 [usb_f_fs] [ 100.868424] ? _raw_spin_unlock_irqrestore+0x27/0x40 [ 100.868457] ? kiocb_set_cancel_fn+0x57/0x60 [ 100.868477] ? ffs_ep0_poll+0xc0/0xc0 [usb_f_fs] [ 100.868512] ffs_epfile_read_iter+0xfe/0x157 [usb_f_fs] [ 100.868551] ? security_file_permission+0x9c/0xd0 [ 100.868587] ? rw_verify_area+0xac/0x120 [ 100.868633] aio_read+0x9d/0x100 [ 100.868692] ? __fget+0xa2/0xd0 [ 100.868727] ? __might_sleep+0x68/0x70 [ 100.868763] SyS_io_submit+0x471/0x680 [ 100.868878] do_int80_syscall_32+0x4e/0xd0 [ 100.868921] entry_INT80_32+0x2a/0x2a [ 100.868932] EIP: 0xb7fbb676 [ 100.868941] EFLAGS: 00000292 CPU: 1 [ 100.868951] EAX: ffffffda EBX: b7aa2000 ECX: 00000002 EDX: b7af8368 [ 100.868961] ESI: b7fbb660 EDI: b7aab000 EBP: bfb6c658 ESP: bfb6c638 [ 100.868973] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b Signed-off-by: Vincent Pelletier Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3aaf33bebda8d4ffcc0fc8ef39e6c1ac68823b11 Author: Russell King Date: Mon Nov 27 11:22:42 2017 +0000 ARM: avoid faulting on qemu When qemu starts a kernel in a bare environment, the default SCR has the AW and FW bits clear, which means that the kernel can't modify the PSR A or PSR F bits, and means that FIQs and imprecise aborts are always masked. When running uboot under qemu, the AW and FW SCR bits are set, and the kernel functions normally - and this is how real hardware behaves. Fix this for qemu by ignoring the FIQ bit. Fixes: 8bafae202c82 ("ARM: BUG if jumping to usermode address in kernel mode") Signed-off-by: Russell King arch/arm/kernel/entry-header.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 72e2c3438ba3bd2ed640b6b5ea9e58993dd9ab7f Author: Sara Sharon Date: Sun Oct 29 11:51:09 2017 +0200 mac80211: tear down RX aggregations first When doing HW restart we tear down aggregations. Since at this point we are not TX'ing any aggregation, while the peer is still sending RX aggregation over the air, it will make sense to tear down the RX aggregations first. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/ht.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fbbdad5edf0bb59786a51b94a9d006bc8c2da9a2 Author: Chun-Yeow Yeoh Date: Tue Nov 14 23:20:05 2017 +0800 mac80211: fix the update of path metric for RANN frame The previous path metric update from RANN frame has not considered the own link metric toward the transmitting mesh STA. Fix this. Reported-by: Michael65535 Signed-off-by: Chun-Yeow Yeoh Signed-off-by: Johannes Berg net/mac80211/mesh_hwmp.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 7b6ddeaf27eca72795ceeae2f0f347db1b5f9a30 Author: Johannes Berg Date: Tue Nov 21 14:46:08 2017 +0100 mac80211: use QoS NDP for AP probing When connected to a QoS/WMM AP, mac80211 should use a QoS NDP for probing it, instead of a regular non-QoS one, fix this. Change all the drivers to *not* allow QoS NDP for now, even though it looks like most of them should be OK with that. Signed-off-by: Johannes Berg drivers/net/wireless/ath/ath9k/channel.c | 2 +- drivers/net/wireless/st/cw1200/sta.c | 4 ++-- drivers/net/wireless/ti/wl1251/main.c | 2 +- drivers/net/wireless/ti/wlcore/cmd.c | 5 +++-- include/net/mac80211.h | 8 +++++++- net/mac80211/mlme.c | 2 +- net/mac80211/tx.c | 29 +++++++++++++++++++++++++++-- 7 files changed, 42 insertions(+), 10 deletions(-) commit 1420edf7a3fbc9b8b0bbe24c3724d582dd4def28 Merge: 517f568 4fbd8d1 Author: Daniel Vetter Date: Mon Nov 27 10:54:33 2017 +0100 Merge tag 'v4.15-rc1' into drm-misc-fixes Linux 4.15-rc1 Pull in the merge window to resync. Dave didn't get his -fixes pull landed in time, and now there's another rockchip fix pending, so fast-forwarding isn't possible, hence backmerge. Signed-off-by: Daniel Vetter commit f73e8b82531573a198a4d0e5bff0d3256cbbd1d8 Author: Srishti Sharma Date: Fri Sep 29 15:30:40 2017 +0530 drm/arm: Replace instances of drm_dev_unref with drm_dev_put. Replace drm_dev_unref with drm_dev_put as it is more consistent with kernel coding style. Done using the following semantic patch by coccinelle. @r@ expression e; @@ -drm_dev_unref(); +drm_dev_put(); Signed-off-by: Srishti Sharma [split into hdlcd and malidp specific patches] Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/hdlcd_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fa56b3f83177e1ad60815f750dd3816bd4c25677 Author: Vitor Massaru Iha Date: Mon Oct 30 11:36:54 2017 -0200 drm: Fix checkpatch issue: "WARNING: braces {} are not necessary for single statement blocks." Signed-off-by: Vitor Massaru Iha Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/hdlcd_crtc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c654b21ede93845863597de9ad774fd30db5f2ab Author: Sebastian Sjoholm Date: Mon Nov 20 19:29:32 2017 +0100 USB: serial: option: add Quectel BG96 id Quectel BG96 is an Qualcomm MDM9206 based IoT modem, supporting both CAT-M and NB-IoT. Tested hardware is BG96 mounted on Quectel development board (EVB). The USB id is added to option.c to allow DIAG,GPS,AT and modem communication with the BG96. Signed-off-by: Sebastian Sjoholm Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/option.c | 3 +++ 1 file changed, 3 insertions(+) commit bdfe4cebea11476d278b1b98dd0f7cdac8269d62 Author: Icenowy Zheng Date: Fri Nov 10 17:26:54 2017 +0800 arm64: allwinner: a64: add Ethernet PHY regulator for several boards On several A64 boards the Ethernet PHY is powered by the DC1SW regulator on the AXP803 PMIC. Add phy-handle property to these boards' emac node. Signed-off-by: Icenowy Zheng Acked-by: Corentin LABBE Tested-by: Corentin LABBE Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 1 + arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 1 + arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 1 + 3 files changed, 3 insertions(+) commit 517f56839f581618d24f2e67a35738a5c6cbaecb Author: Mirza Krak Date: Wed Nov 15 08:24:46 2017 +0000 drm/rockchip: dw-mipi-dsi: fix possible un-balanced runtime PM enable In the case where the bind gets deferred we would end up with a un-balanced runtime PM enable call. Fix this by simply moving the pm_runtime_enable call to the end of the bind function when all paths have succeeded. Signed-off-by: Mirza Krak Signed-off-by: Sandy Huang Link: https://patchwork.freedesktop.org/patch/msgid/1510734286-37434-1-git-send-email-mirza.krak@endian.se drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ed81cc612c92167fe7606773e036ee5ccef6c190 Author: Jean Delvare Date: Tue Nov 21 17:09:59 2017 +0100 hwmon: Drop reference to Jean's tree This tree has not been used for over a year, Guenter is taking all the hwmon patches in practice. Signed-off-by: Jean Delvare Cc: Guenter Roeck Signed-off-by: Guenter Roeck MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 10d900303f1c3a821eb0bef4e7b7ece16768fba4 Author: Aaron Ma Date: Sat Nov 25 16:48:41 2017 -0800 Input: elantech - add new icbody type 15 The touchpad of Lenovo Thinkpad L480 reports it's version as 15. Cc: stable@vger.kernel.org Signed-off-by: Aaron Ma Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ddc3c656bfb5c90d0196ff72b908d0343fef85e Author: Zhen Lei Date: Sat Nov 25 15:48:32 2017 -0800 Input: ims-pcu - fix typo in the error message 1. change "to" to "too". 2. move ")" to the front of "\n", which discovered by Joe Perches. Signed-off-by: Zhen Lei Reviewed-by: Joe Perches Signed-off-by: Dmitry Torokhov drivers/input/misc/ims-pcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 Author: Linus Torvalds Date: Sun Nov 26 16:01:47 2017 -0800 Linux 4.15-rc1 Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 67c8d22a73128ff910e2287567132530abcf5b71 Author: zhangliping Date: Sat Nov 25 22:02:12 2017 +0800 openvswitch: fix the incorrect flow action alloc size If we want to add a datapath flow, which has more than 500 vxlan outputs' action, we will get the following error reports: openvswitch: netlink: Flow action size 32832 bytes exceeds max openvswitch: netlink: Flow action size 32832 bytes exceeds max openvswitch: netlink: Actions may not be safe on all matching packets ... ... It seems that we can simply enlarge the MAX_ACTIONS_BUFSIZE to fix it, but this is not the root cause. For example, for a vxlan output action, we need about 60 bytes for the nlattr, but after it is converted to the flow action, it only occupies 24 bytes. This means that we can still support more than 1000 vxlan output actions for a single datapath flow under the the current 32k max limitation. So even if the nla_len(attr) is larger than MAX_ACTIONS_BUFSIZE, we shouldn't report EINVAL and keep it move on, as the judgement can be done by the reserve_sfa_size. Signed-off-by: zhangliping Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/flow_netlink.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit bbecb1cfcca55f98cfcb62fa36a32d79975d8816 Merge: dec0029 8bafae2 Author: Linus Torvalds Date: Sun Nov 26 15:03:49 2017 -0800 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: - LPAE fixes for kernel-readonly regions - Fix for get_user_pages_fast on LPAE systems - avoid tying decompressor to a particular platform if DEBUG_LL is enabled - BUG if we attempt to return to userspace but the to-be-restored PSR value keeps us in privileged mode (defeating an issue that ftracetest found) * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: BUG if jumping to usermode address in kernel mode ARM: 8722/1: mm: make STRICT_KERNEL_RWX effective for LPAE ARM: 8721/1: mm: dump: check hardware RO bit for LPAE ARM: make decompressor debug output user selectable ARM: fix get_user_pages_fast commit dec0029a59779d8279dde663ef8abe9824ee5773 Merge: 02fc87b 75f1133 Author: Linus Torvalds Date: Sun Nov 26 14:39:20 2017 -0800 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Glexiner: - unbreak the irq trigger type check for legacy platforms - a handful fixes for ARM GIC v3/4 interrupt controllers - a few trivial fixes all over the place * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/matrix: Make - vs ?: Precedence explicit irqchip/imgpdc: Use resource_size function on resource object irqchip/qcom: Fix u32 comparison with value less than zero irqchip/exiu: Fix return value check in exiu_init() irqchip/gic-v3-its: Remove artificial dependency on PCI irqchip/gic-v4: Add forward definition of struct irq_domain_ops irqchip/gic-v3: pr_err() strings should end with newlines irqchip/s3c24xx: pr_err() strings should end with newlines irqchip/gic-v3: Fix ppi-partitions lookup irqchip/gic-v4: Clear IRQ_DISABLE_UNLAZY again if mapping fails genirq: Track whether the trigger type has been set commit 02fc87b117a9b9ec325089d098fce86ed11966bd Merge: 6830c8d 12a78d4 Author: Linus Torvalds Date: Sun Nov 26 14:11:54 2017 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc x86 fixes from Ingo Molnar: - topology enumeration fixes - KASAN fix - two entry fixes (not yet the big series related to KASLR) - remove obsolete code - instruction decoder fix - better /dev/mem sanity checks, hopefully working better this time - pkeys fixes - two ACPI fixes - 5-level paging related fixes - UMIP fixes that should make application visible faults more debuggable - boot fix for weird virtualization environment * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) x86/decoder: Add new TEST instruction pattern x86/PCI: Remove unused HyperTransport interrupt support x86/umip: Fix insn_get_code_seg_params()'s return value x86/boot/KASLR: Remove unused variable x86/entry/64: Add missing irqflags tracing to native_load_gs_index() x86/mm/kasan: Don't use vmemmap_populate() to initialize shadow x86/entry/64: Fix entry_SYSCALL_64_after_hwframe() IRQ tracing x86/pkeys/selftests: Fix protection keys write() warning x86/pkeys/selftests: Rename 'si_pkey' to 'siginfo_pkey' x86/mpx/selftests: Fix up weird arrays x86/pkeys: Update documentation about availability x86/umip: Print a warning into the syslog if UMIP-protected instructions are used x86/smpboot: Fix __max_logical_packages estimate x86/topology: Avoid wasting 128k for package id array perf/x86/intel/uncore: Cache logical pkg id in uncore driver x86/acpi: Reduce code duplication in mp_override_legacy_irq() x86/acpi: Handle SCI interrupts above legacy space gracefully x86/boot: Fix boot failure when SMP MP-table is based at 0 x86/mm: Limit mmap() of /dev/mem to valid physical addresses x86/selftests: Add test for mapping placement for 5-level paging ... commit 6830c8db58c2616d8ba2bf45e7d98dca5f69b07f Merge: 580e3d5 3f5fe9f Author: Linus Torvalds Date: Sun Nov 26 13:43:25 2017 -0800 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Misc fixes: a documentation fix, a Sparse warning fix and a debugging fix" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/debug: Fix task state recording/printout sched/deadline: Don't use dubious signed bitfields sched/deadline: Fix the description of runtime accounting in the documentation commit 580e3d552ddf06537c7f36d1bfab04761489db9c Merge: cd4b5d5 4a31b42 Author: Linus Torvalds Date: Sun Nov 26 13:41:48 2017 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Misc fixes: two PMU driver fixes and a memory leak fix" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Fix memory leak triggered by perf --namespace perf/x86/intel/uncore: Add event constraint for BDX PCU perf/x86/intel: Hide TSX events when RTM is not supported commit cd4b5d5d2777e8c167f022b46200f1c8504d1ef6 Merge: fcbc38b 92ee46e Author: Linus Torvalds Date: Sun Nov 26 13:36:54 2017 -0800 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull static key fix from Ingo Molnar: "Fix a boot warning related to bad init ordering of the static keys self-test" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: jump_label: Invoke jump_label_test() via early_initcall() commit fcbc38b1b296cd38214891fb1fc714d52937d062 Merge: 844056f a356d2a Author: Linus Torvalds Date: Sun Nov 26 13:11:18 2017 -0800 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fixes from Ingo Molnar: "A handful of objtool fixes, most of them related to making the UAPI header-syncing warnings easier to read and easier to act upon" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tools/headers: Sync objtool UAPI header objtool: Fix cross-build objtool: Move kernel headers/code sync check to a script objtool: Move synced files to their original relative locations objtool: Make unreachable annotation inline asms explicitly volatile objtool: Add a comment for the unreachable annotation macros commit 2734166e89639c973c6e125ac8bcfc2d9db72b70 Author: Gustavo A. R. Silva Date: Sat Nov 25 13:14:40 2017 -0600 net: openvswitch: datapath: fix data type in queue_gso_packets gso_type is being used in binary AND operations together with SKB_GSO_UDP. The issue is that variable gso_type is of type unsigned short and SKB_GSO_UDP expands to more than 16 bits: SKB_GSO_UDP = 1 << 16 this makes any binary AND operation between gso_type and SKB_GSO_UDP to be always zero, hence making some code unreachable and likely causing undesired behavior. Fix this by changing the data type of variable gso_type to unsigned int. Addresses-Coverity-ID: 1462223 Fixes: 0c19f846d582 ("net: accept UFO datagrams from tuntap and packet") Signed-off-by: Gustavo A. R. Silva Acked-by: Willem de Bruijn Signed-off-by: David S. Miller net/openvswitch/datapath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8bafae202c82dc257f649ea3c275a0f35ee15113 Author: Russell King Date: Fri Nov 24 23:49:34 2017 +0000 ARM: BUG if jumping to usermode address in kernel mode Detect if we are returning to usermode via the normal kernel exit paths but the saved PSR value indicates that we are in kernel mode. This could occur due to corrupted stack state, which has been observed with "ftracetest". This ensures that we catch the problem case before we get to user code. Signed-off-by: Russell King arch/arm/include/asm/assembler.h | 18 ++++++++++++++++++ arch/arm/kernel/entry-header.S | 6 ++++++ 2 files changed, 24 insertions(+) commit f41725bbe16b0773302c0cc7dc2e89f54828712d Author: Israel Rukshin Date: Sun Nov 26 10:40:55 2017 +0000 nvme-rdma: Use mr pool Currently, blk_mq_tagset_iter() iterate over initial hctx tags only. If an I/O scheduler is used, it doesn't iterate the hctx scheduler tags and the static request aren't been updated. For example, while using NVMe over Fabrics RDMA host, this cause us not to reinit the scheduler requests and thus not re-register all the memory regions during the tagset re-initialization in the reconnect flow. This may lead to a memory registration error: "MEMREG for CQE 0xffff88044c14dce8 failed with status memory management operation error (6)" With this commit we don't need to reinit the requests, and thus fix this failure. Signed-off-by: Israel Rukshin Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 95 +++++++++++++++++++----------------------------- 1 file changed, 37 insertions(+), 58 deletions(-) commit 3ef0279bb0031f67537bd8972899a6a23d3064d7 Author: Sagi Grimberg Date: Thu Nov 23 17:35:24 2017 +0200 nvme-rdma: Check remotely invalidated rkey matches our expected rkey If we got a remote invalidation on a bogus rkey, this is a protocol error. Fail the connection in this case. Signed-off-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 2f122e4f5107cf8ab0e592d63ed816a00110b4fe Author: Sagi Grimberg Date: Thu Nov 23 17:35:23 2017 +0200 nvme-rdma: wait for local invalidation before completing a request We must not complete a request before the host memory region is invalidated. Luckily we have send with invalidate protocol support so we usually don't need to execute it, but in case the target did not invalidate a memory region for us, we must wait for the invalidation to complete before unmapping host memory and completing the I/O. Signed-off-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) commit 4af7f7ff92a42b6c713293c99e7982bcfcf51a70 Author: Sagi Grimberg Date: Thu Nov 23 17:35:22 2017 +0200 nvme-rdma: don't complete requests before a send work request has completed In order to guarantee that the HCA will never get an access violation (either from invalidated rkey or from iommu) when retrying a send operation we must complete a request only when both send completion and the nvme cqe has arrived. We need to set the send/recv completions flags atomically because we might have more than a single context accessing the request concurrently (one is cq irq-poll context and the other is user-polling used in IOCB_HIPRI). Only then we are safe to invalidate the rkey (if needed), unmap the host buffers, and complete the IO. Signed-off-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) commit b4b591c87f2b0f4ebaf3a68d4f13873b241aa584 Author: Sagi Grimberg Date: Thu Nov 23 17:35:21 2017 +0200 nvme-rdma: don't suppress send completions The entire completions suppress mechanism is currently broken because the HCA might retry a send operation (due to dropped ack) after the nvme transaction has completed. In order to handle this, we signal all send completions and introduce a separate done handler for async events as they will be handled differently (as they don't include in-capsule data by definition). Signed-off-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 54 +++++++++++++----------------------------------- 1 file changed, 14 insertions(+), 40 deletions(-) commit b4d085201d86af69cbda2214c6dafc0be240ef9f Author: Dmitry V. Levin Date: Mon Nov 13 03:35:27 2017 +0300 uapi: fix linux/kfd_ioctl.h userspace compilation errors Consistently use types provided by via to fix the following linux/kfd_ioctl.h userspace compilation errors: /usr/include/linux/kfd_ioctl.h:236:2: error: unknown type name 'uint64_t' uint64_t va_addr; /* to KFD */ /usr/include/linux/kfd_ioctl.h:237:2: error: unknown type name 'uint32_t' uint32_t gpu_id; /* to KFD */ /usr/include/linux/kfd_ioctl.h:238:2: error: unknown type name 'uint32_t' uint32_t pad; /usr/include/linux/kfd_ioctl.h:243:2: error: unknown type name 'uint64_t' uint64_t tile_config_ptr; /usr/include/linux/kfd_ioctl.h:245:2: error: unknown type name 'uint64_t' uint64_t macro_tile_config_ptr; /usr/include/linux/kfd_ioctl.h:249:2: error: unknown type name 'uint32_t' uint32_t num_tile_configs; /usr/include/linux/kfd_ioctl.h:253:2: error: unknown type name 'uint32_t' uint32_t num_macro_tile_configs; /usr/include/linux/kfd_ioctl.h:255:2: error: unknown type name 'uint32_t' uint32_t gpu_id; /* to KFD */ /usr/include/linux/kfd_ioctl.h:256:2: error: unknown type name 'uint32_t' uint32_t gb_addr_config; /* from KFD */ /usr/include/linux/kfd_ioctl.h:257:2: error: unknown type name 'uint32_t' uint32_t num_banks; /* from KFD */ /usr/include/linux/kfd_ioctl.h:258:2: error: unknown type name 'uint32_t' uint32_t num_ranks; /* from KFD */ Fixes: 6a1c9510694fe ("drm/amdkfd: Adding new IOCTL for scratch memory v2") Fixes: 5d71dbc3a5886 ("drm/amdkfd: Implement image tiling mode support v2") Signed-off-by: Dmitry V. Levin Signed-off-by: Oded Gabbay include/uapi/linux/kfd_ioctl.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit c393e9b2d51540b74e18e555df14706098dbf2cc Author: Randy Dunlap Date: Mon Nov 13 18:08:48 2017 +0200 drm/amdkfd: fix amdkfd use-after-free GP fault Fix GP fault caused by dev_info() reference to a struct device* after the device has been freed (use after free). kfd_chardev_exit() frees the device so 'kfd_device' should not be used after calling kfd_chardev_exit(). Signed-off-by: Randy Dunlap Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8c946b8988acec785bcf67088b6bd0747f36d2d3 Author: Felix Kuehling Date: Wed Nov 1 19:21:57 2017 -0400 drm/amdkfd: Fix SDMA oversubsription handling SDMA only supports a fixed number of queues. HWS cannot handle oversubscription. Signed-off-by: shaoyun liu Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit d12fb13f23199faa7e536acec1db49068e5a067d Author: shaoyunl Date: Wed Nov 1 19:21:56 2017 -0400 drm/amdkfd: Fix SDMA ring buffer size calculation ffs function return the position of the first bit set on 1 based. (bit zero returns 1). Signed-off-by: shaoyun liu Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cf21654b40968609779751b34e7923180968fe5b Author: Felix Kuehling Date: Wed Nov 1 19:21:55 2017 -0400 drm/amdgpu: Fix SDMA load/unload sequence on HWS disabled mode Fix the SDMA load and unload sequence as suggested by HW document. Signed-off-by: shaoyun liu Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 47 ++++++++++++++++------- 1 file changed, 34 insertions(+), 13 deletions(-) commit 7bbefcfac1936c8d9082a828b09f42a3839cb06e Author: Stephen Hemminger Date: Fri Nov 24 12:08:40 2017 -0800 uapi: add SPDX identifier to vm_sockets_diag.h New file seems to have missed the SPDX license scan and update. Signed-off-by: Stephen Hemminger Reviewed-by: Stefan Hajnoczi Signed-off-by: David S. Miller include/uapi/linux/vm_sockets_diag.h | 1 + 1 file changed, 1 insertion(+) commit 9e741045faea17e28663f14a45f7f3304827c968 Author: Vivien Didelot Date: Fri Nov 24 11:36:06 2017 -0500 net: dsa: fix 'increment on 0' warning Setting the refcount to 0 when allocating a tree to match the number of switch devices it holds may cause an 'increment on 0; use-after-free', if CONFIG_REFCOUNT_FULL is enabled. To fix this, do not decrement the refcount of a newly allocated tree, increment it when an already allocated tree is found, and decrement it after the probing of a switch, as done with the previous behavior. At the same time, make dsa_tree_get and dsa_tree_put accept a NULL argument to simplify callers, and return the tree after incrementation, as most kref users like of_node_get and of_node_put do. Fixes: 8e5bf9759a06 ("net: dsa: simplify tree reference counting") Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Tested-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit afbea2cd253b5198350dfd8edb963567d05827d6 Author: Jorgen Hansen Date: Fri Nov 24 06:25:28 2017 -0800 VSOCK: Don't call vsock_stream_has_data in atomic context When using the host personality, VMCI will grab a mutex for any queue pair access. In the detach callback for the vmci vsock transport, we call vsock_stream_has_data while holding a spinlock, and vsock_stream_has_data will access a queue pair. To avoid this, we can simply omit calling vsock_stream_has_data for host side queue pairs, since the QPs are empty per default when the guest has detached. This bug affects users of VMware Workstation using kernel version 4.4 and later. Testing: Ran vsock tests between guest and host, and verified that with this change, the host isn't calling vsock_stream_has_data during detach. Ran mixedTest between guest and host using both guest and host as server. v2: Rebased on top of recent change to sk_state values Reviewed-by: Adit Ranadive Reviewed-by: Aditya Sarwade Reviewed-by: Stefan Hajnoczi Signed-off-by: Jorgen Hansen Signed-off-by: David S. Miller net/vmw_vsock/vmci_transport.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 844056fd74ebdd826bd23a7d989597e15f478acb Merge: ca122fe 54b8a23 Author: Linus Torvalds Date: Sat Nov 25 08:37:16 2017 -1000 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: - The final conversion of timer wheel timers to timer_setup(). A few manual conversions and a large coccinelle assisted sweep and the removal of the old initialization mechanisms and the related code. - Remove the now unused VSYSCALL update code - Fix permissions of /proc/timer_list. I still need to get rid of that file completely - Rename a misnomed clocksource function and remove a stale declaration * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits) m68k/macboing: Fix missed timer callback assignment treewide: Remove TIMER_FUNC_TYPE and TIMER_DATA_TYPE casts timer: Remove redundant __setup_timer*() macros timer: Pass function down to initialization routines timer: Remove unused data arguments from macros timer: Switch callback prototype to take struct timer_list * argument timer: Pass timer_list pointer to callbacks unconditionally Coccinelle: Remove setup_timer.cocci timer: Remove setup_*timer() interface timer: Remove init_timer() interface treewide: setup_timer() -> timer_setup() (2 field) treewide: setup_timer() -> timer_setup() treewide: init_timer() -> setup_timer() treewide: Switch DEFINE_TIMER callbacks to struct timer_list * s390: cmm: Convert timers to use timer_setup() lightnvm: Convert timers to use timer_setup() drivers/net: cris: Convert timers to use timer_setup() drm/vc4: Convert timers to use timer_setup() block/laptop_mode: Convert timers to use timer_setup() net/atm/mpc: Avoid open-coded assignment of timer callback function ... commit ca122fe376fc43f7565e3e56e6777d06a433a4cc Merge: 5e2fda4 8238573 Author: Linus Torvalds Date: Sat Nov 25 08:21:54 2017 -1000 Merge tag 'arc-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC updates from Vineet Gupta: - more changes for HS48 cores: supporting MMUv5, detecting new micro-arch gizmos - axs10x platform wiring up reset driver merged in this cycle - ARC perf driver optimizations * tag 'arc-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: perf: avoid vmalloc backed mmap ARCv2: perf: optimize given that num counters <= 32 ARCv2: perf: tweak overflow interrupt ARC: [plat-axs10x] DTS: Add reset controller node to manage ethernet reset ARCv2: boot log: updates for HS48: dual-issue, ECC, Loop Buffer ARCv2: Accomodate HS48 MMUv5 by relaxing MMU ver checking ARC: [plat-axs10x] auto-select AXS101 or AXS103 given the ISA config commit 5e2fda4776bb94ee47314e71cefaa8a104f8f4ab Merge: f61ec2c 10aaa3b Author: Linus Torvalds Date: Sat Nov 25 08:06:30 2017 -1000 Merge tag 'kbuild-v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull more Kbuild updates from Masahiro Yamada: - use 'pwd' instead of '/bin/pwd' for portability - clean up Makefiles - fix ld-option for clang - fix malloc'ed data size in Kconfig - fix parallel building along with coccicheck - fix a minor issue of package building - prompt to use "rpm-pkg" instead of "rpm" - clean up *.i and *.lst patterns by "make clean" * tag 'kbuild-v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: drop $(extra-y) from real-objs-y kbuild: clean up *.i and *.lst patterns by make clean kbuild: rpm: prompt to use "rpm-pkg" if "rpm" target is used kbuild: pkg: use --transform option to prefix paths in tar coccinelle: fix parallel build with CHECK=scripts/coccicheck kconfig/symbol.c: use correct pointer type argument for sizeof kbuild: Set KBUILD_CFLAGS before incl. arch Makefile kbuild: remove all dummy assignments to obj- kbuild: create built-in.o automatically if parent directory wants it kbuild: /bin/pwd -> pwd commit f61ec2c97cf8a517cd5714efc919138a9d8991cf Merge: 7753ea0 43dd388 Author: Linus Torvalds Date: Sat Nov 25 07:58:25 2017 -1000 Merge tag 'afs-fixes-20171124' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS fixes from David Howells: - Make AFS file locking work again. - Don't write to a page that's being written out, but wait for it to complete. - Do d_drop() and d_add() in the right places. - Put keys on error paths. - Remove some redundant code. * tag 'afs-fixes-20171124' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: remove redundant assignment of dvnode to itself afs: cell: Remove unnecessary code in afs_lookup_cell afs: Fix signal handling in some file ops afs: Fix some dentry handling in dir ops and missing key_puts afs: Make afs_write_begin() avoid writing to a page that's being stored afs: Fix file locking commit 0232d2cd7aa8e1b810fe84fb4059a0bd1eabe2ba Author: Sara Sharon Date: Mon Nov 20 13:25:05 2017 +0200 iwlwifi: fix access to prph when transport is stopped When getting HW rfkill we get stop_device being called from two paths. One path is the IRQ calling stop device, and updating op mode and stack. As a result, cfg80211 is running rfkill sync work that shuts down all devices (second path). In the second path, we eventually get to iwl_mvm_stop_device which calls iwl_fw_dump_conf_clear->iwl_fw_dbg_stop_recording, that access periphery registers. The device may be stopped at this point from the first path, which will result with a failure to access those registers. Simply checking for the trans status is insufficient, since the race will still exist, only minimized. Instead, move the stop from iwl_fw_dump_conf_clear (which is getting called only from stop path) to the transport stop device function, where the access is always safe. This has the added value, of actually stopping dbgc before stopping device even when the stop is initiated from the transport. Fixes: 1efc3843a4ee ("iwlwifi: stop dbgc recording before stopping DMA") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 2 -- drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 6 ++++++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 9 +++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) commit f3402d6d8eb084f6c2563dee1a09385b7c0ea2d5 Author: Sara Sharon Date: Mon Nov 20 11:37:18 2017 +0200 iwlwifi: pcie: fix erroneous "Read failed message" Current pci dumping code code is always falling to the error path, resulting with a constant "Read failed" message, also for the successful reads. Fixes: a5c932e41fdd ("iwlwifi: pcie: dump registers when HW becomes inaccessible") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 1 + 1 file changed, 1 insertion(+) commit b13f43a48571f0cd0fda271b5046b65f1f268db5 Author: Emmanuel Grumbach Date: Sun Nov 19 10:35:14 2017 +0200 iwlwifi: mvm: fix packet injection We need to have a station and a queue for the monitor interface to be able to inject traffic. We used to have this traffic routed to the auxiliary queue, but this queue isn't scheduled for the station we had linked to the monitor vif. Allocate a new queue, link it to the monitor vif's station and make that queue use the BE fifo. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=196715 Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/api/txq.h | 4 ++ drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 53 +++++++++++++++++------ drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 +- 6 files changed, 49 insertions(+), 15 deletions(-) commit d1b275ffec459c5ae12b5c7086c84175696e5a9f Author: Emmanuel Grumbach Date: Wed Nov 15 14:12:30 2017 +0200 iwlwifi: mvm: fix the TX queue hang timeout for MONITOR vif type The MONITOR type is missing in the interface type switch. Add it. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 2 ++ 1 file changed, 2 insertions(+) commit 0b9832b712d6767d6c7b01965fd788d1ca84fc92 Author: Emmanuel Grumbach Date: Mon Nov 13 09:50:47 2017 +0200 iwlwifi: mvm: don't use transmit queue hang detection when it is not possible When we act as an AP, new firmware versions handle internally the power saving clients and the driver doesn't know that the peers went to sleep. It is, hence, possible that a peer goes to sleep for a long time and stop pulling frames. This will cause its transmit queue to hang which is a condition that triggers the recovery flow in the driver. While this client is certainly buggy (it should have pulled the frame based on the TIM IE in the beacon), we can't blow up because of a buggy client. Change the current implementation to not enable the transmit queue hang detection on queues that serve peers when we act as an AP / GO. We can still enable this mechanism using the debug configuration which can come in handy when we want to debug why the client doesn't wake up. Cc: stable@vger.kernel.org # v4.13 Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit c4e45c84270798b1d51ede9a8c6810378ccfe162 Author: Shaul Triebitz Date: Mon Oct 30 17:38:43 2017 +0200 iwlwifi: mvm: set correct chains in Rx status ieee80211_rx_status::chains was always set to zero. That caused rate scaling to always start with the lowest rate possible (rs_get_initial_rate). Set it correctly according to the MPDU response. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a60b3f515d30d0fe8537c64671926879a3548103 Author: Roman Kapl Date: Fri Nov 24 12:27:58 2017 +0100 net: sched: crash on blocks with goto chain action tcf_block_put_ext has assumed that all filters (and thus their goto actions) are destroyed in RCU callback and thus can not race with our list iteration. However, that is not true during netns cleanup (see tcf_exts_get_net comment). Prevent the user after free by holding all chains (except 0, that one is already held). foreach_safe is not enough in this case. To reproduce, run the following in a netns and then delete the ns: ip link add dtest type dummy tc qdisc add dev dtest ingress tc filter add dev dtest chain 1 parent ffff: handle 1 prio 1 flower action goto chain 2 Fixes: 822e86d997 ("net_sched: remove tcf_block_put_deferred()") Signed-off-by: Roman Kapl Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_api.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 540c11159dcece5c4a8157a7b39336316085470f Author: Mika Westerberg Date: Fri Nov 24 14:05:36 2017 +0300 net: thunderbolt: Stop using zero to mean no valid DMA mapping Commit 86dabda426ac ("net: thunderbolt: Clear finished Tx frame bus address in tbnet_tx_callback()") fixed a DMA-API violation where the driver called dma_unmap_page() in tbnet_free_buffers() for a bus address that might already be unmapped. The fix was to zero out the bus address of a frame in tbnet_tx_callback(). However, as pointed out by David Miller, zero might well be valid mapping (at least in theory) so it is not good idea to use it here. It turns out that we don't need the whole map/unmap dance for Tx buffers at all. Instead we can map the buffers when they are initially allocated and unmap them when the interface is brought down. In between we just DMA sync the buffers for the CPU or device as needed. Signed-off-by: Mika Westerberg Signed-off-by: David S. Miller drivers/net/thunderbolt.c | 57 ++++++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 33 deletions(-) commit fa6d7cb5d76cf0467c61420fc9238045aedfd379 Author: Sunil Goutham Date: Thu Nov 23 22:34:31 2017 +0300 net: thunderx: Fix TCP/UDP checksum offload for IPv6 pkts Don't offload IP header checksum to NIC. This fixes a previous patch which enabled checksum offloading for both IPv4 and IPv6 packets. So L3 checksum offload was getting enabled for IPv6 pkts. And HW is dropping these pkts as it assumes the pkt is IPv4 when IP csum offload is set in the SQ descriptor. Fixes: 3a9024f52c2e ("net: thunderx: Enable TSO and checksum offloads for ipv6") Signed-off-by: Sunil Goutham Signed-off-by: Aleksey Makarov Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 1 - 1 file changed, 1 deletion(-) commit 9d0b62328d34c7044114d4f4281981d4c537c4ba Author: Nadav Amit Date: Fri Nov 24 19:29:07 2017 -0800 x86/tlb: Disable interrupts when changing CR4 CR4 modifications are implemented as RMW operations which update a shadow variable and write the result to CR4. The RMW operation is protected by preemption disable, but there is no enforcement or debugging mechanism. CR4 modifications happen also in interrupt context via __native_flush_tlb_global(). This implementation does not affect a interrupted thread context CR4 operation, because the CR4 toggle restores the original content and does not modify the shadow variable. So the current situation seems to be safe, but a recent patch tried to add an actual RMW operation in interrupt context, which will cause subtle corruptions. To prevent that and make the CR4 handling future proof: - Add a lockdep assertion to __cr4_set() which will catch interrupt enabled invocations - Disable interrupts in the cr4 manipulator inlines - Rename cr4_toggle_bits() to cr4_toggle_bits_irqsoff(). This is called from __switch_to_xtra() where interrupts are already disabled and performance matters. All other call sites are not performance critical, so the extra overhead of an additional local_irq_save/restore() pair is not a problem. If new call sites care about performance then the necessary _irqsoff() variants can be added. [ tglx: Condensed the patch by moving the irq protection inside the manipulator functions. Updated changelog ] Signed-off-by: Nadav Amit Signed-off-by: Thomas Gleixner Cc: Luck Cc: Radim Krčmář Cc: Andy Lutomirski Cc: Paolo Bonzini Cc: Borislav Petkov Cc: nadav.amit@gmail.com Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/20171125032907.2241-3-namit@vmware.com arch/x86/include/asm/tlbflush.h | 11 ++++++++--- arch/x86/kernel/process.c | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) commit 0c3292ca8025c5aef44dc389ac3a6bf4a325e0be Author: Nadav Amit Date: Fri Nov 24 19:29:06 2017 -0800 x86/tlb: Refactor CR4 setting and shadow write Refactor the write to CR4 and its shadow value. This is done in preparation for the addition of an assertion to check that IRQs are disabled during CR4 update. No functional change. Signed-off-by: Nadav Amit Signed-off-by: Thomas Gleixner Cc: nadav.amit@gmail.com Cc: Andy Lutomirski Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/20171125032907.2241-2-namit@vmware.com arch/x86/include/asm/tlbflush.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 7753ea09640807104c8e353f6d5dc47ee55307cf Merge: 83ada03 d02fcf5 Author: Linus Torvalds Date: Fri Nov 24 19:44:25 2017 -1000 Merge tag 'kvm-4.15-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Radim Krčmář: "Trimmed second batch of KVM changes for Linux 4.15: - GICv4 Support for KVM/ARM - re-introduce support for CPUs without virtual NMI (cc stable) and allow testing of KVM without virtual NMI on available CPUs - fix long-standing performance issues with assigned devices on AMD (cc stable)" * tag 'kvm-4.15-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (30 commits) kvm: vmx: Allow disabling virtual NMI support kvm: vmx: Reinstate support for CPUs without virtual NMI KVM: SVM: obey guest PAT KVM: arm/arm64: Don't queue VLPIs on INV/INVALL KVM: arm/arm64: Fix GICv4 ITS initialization issues KVM: arm/arm64: GICv4: Theory of operations KVM: arm/arm64: GICv4: Enable VLPI support KVM: arm/arm64: GICv4: Prevent userspace from changing doorbell affinity KVM: arm/arm64: GICv4: Prevent a VM using GICv4 from being saved KVM: arm/arm64: GICv4: Enable virtual cpuif if VLPIs can be delivered KVM: arm/arm64: GICv4: Hook vPE scheduling into vgic flush/sync KVM: arm/arm64: GICv4: Use the doorbell interrupt as an unblocking source KVM: arm/arm64: GICv4: Add doorbell interrupt handling KVM: arm/arm64: GICv4: Use pending_last as a scheduling hint KVM: arm/arm64: GICv4: Handle INVALL applied to a vPE KVM: arm/arm64: GICv4: Propagate property updates to VLPIs KVM: arm/arm64: GICv4: Handle MOVALL applied to a vPE KVM: arm/arm64: GICv4: Handle CLEAR applied to a VLPI KVM: arm/arm64: GICv4: Propagate affinity changes to the physical ITS KVM: arm/arm64: GICv4: Unmap VLPI when freeing an LPI ... commit 83ada0319606c6bbaebda16fad456e37ed64d518 Merge: eda5d47 4d6c51b Author: Linus Torvalds Date: Fri Nov 24 19:40:12 2017 -1000 Merge tag 'powerpc-4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "A small batch of fixes, about 50% tagged for stable and the rest for recently merged code. There's one more fix for the >128T handling on hash. Once a process had requested a single mmap above 128T we would then always search above 128T. The correct behaviour is to consider the hint address in isolation for each mmap request. Then a couple of fixes for the IMC PMU, a missing EXPORT_SYMBOL in VAS, a fix for STRICT_KERNEL_RWX on 32-bit, and a fix to correctly identify P9 DD2.1 but in code that is currently not used by default. Thanks to: Aneesh Kumar K.V, Christophe Leroy, Madhavan Srinivasan, Sukadev Bhattiprolu" * tag 'powerpc-4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s: Fix Power9 DD2.1 logic in DT CPU features powerpc/perf: Fix IMC_MAX_PMU macro powerpc/perf: Fix pmu_count to count only nest imc pmus powerpc: Fix boot on BOOK3S_32 with CONFIG_STRICT_KERNEL_RWX powerpc/perf/imc: Use cpu_to_node() not topology_physical_package_id() powerpc/vas: Export chip_to_vas_id() powerpc/64s/slice: Use addr limit when computing slice mask commit eda5d47134b385813b36eddb6d82320dc57e1e53 Merge: 1d3b78b 97488c7 Author: Linus Torvalds Date: Fri Nov 24 19:19:20 2017 -1000 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull SCSI target updates from Nicholas Bellinger: "This series is predominantly bug-fixes, with a few small improvements that have been outstanding over the last release cycle. As usual, the associated bug-fixes have CC' tags for stable. Also, things have been particularly quiet wrt new developments the last months, with most folks continuing to focus on stability atop 4.x stable kernels for their respective production configurations. Also at this point, the stable trees have been synced up with mainline. This will continue to be a priority, as production users tend to run exclusively atop stable kernels, a few releases behind mainline. The highlights include: - Fix PR PREEMPT_AND_ABORT null pointer dereference regression in v4.11+ (tangwenji) - Fix OOPs during removing TCMU device (Xiubo Li + Zhang Zhuoyu) - Add netlink command reply supported option for each device (Kenjiro Nakayama) - cxgbit: Abort the TCP connection in case of data out timeout (Varun Prakash) - Fix PR/ALUA file path truncation (David Disseldorp) - Fix double se_cmd completion during ->cmd_time_out (Mike Christie) - Fix QUEUE_FULL + SCSI task attribute handling in 4.1+ (Bryant Ly + nab) - Fix quiese during transport_write_pending_qf endless loop (nab) - Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK in 3.14+ (Don White + nab)" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (35 commits) tcmu: Add a missing unlock on an error path tcmu: Fix some memory corruption iscsi-target: Fix non-immediate TMR reference leak iscsi-target: Make TASK_REASSIGN use proper se_cmd->cmd_kref target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK target: Fix quiese during transport_write_pending_qf endless loop target: Fix caw_sem leak in transport_generic_request_failure target: Fix QUEUE_FULL + SCSI task attribute handling iSCSI-target: Use common error handling code in iscsi_decode_text_input() target/iscsi: Detect conn_cmd_list corruption early target/iscsi: Fix a race condition in iscsit_add_reject_from_cmd() target/iscsi: Modify iscsit_do_crypto_hash_buf() prototype target/iscsi: Fix endianness in an error message target/iscsi: Use min() in iscsit_dump_data_payload() instead of open-coding it target/iscsi: Define OFFLOAD_BUF_SIZE once target: Inline transport_put_cmd() target: Suppress gcc 7 fallthrough warnings target: Move a declaration of a global variable into a header file tcmu: fix double se_cmd completion target: return SAM_STAT_TASK_SET_FULL for TCM_OUT_OF_RESOURCES ... commit c14ca8386539a298c1c19b003fe55e37d0f0e89c Author: Ondrej Mosnáček Date: Thu Nov 23 13:49:06 2017 +0100 crypto: skcipher - Fix skcipher_walk_aead_common The skcipher_walk_aead_common function calls scatterwalk_copychunks on the input and output walks to skip the associated data. If the AD end at an SG list entry boundary, then after these calls the walks will still be pointing to the end of the skipped region. These offsets are later checked for alignment in skcipher_walk_next, so the skcipher_walk may detect the alignment incorrectly. This patch fixes it by calling scatterwalk_done after the copychunks calls to ensure that the offsets refer to the right SG list entry. Fixes: b286d8b1a690 ("crypto: skcipher - Add skcipher walk interface") Cc: Signed-off-by: Ondrej Mosnacek Signed-off-by: Herbert Xu crypto/skcipher.c | 3 +++ 1 file changed, 3 insertions(+) commit 6c4ca1e36cdc1a0a7a84797804b87920ccbebf51 Author: Michael Lyle Date: Fri Nov 24 15:14:27 2017 -0800 bcache: check return value of register_shrinker register_shrinker is now __must_check, so check it to kill a warning. Caller of bch_btree_cache_alloc in super.c appropriately checks return value so this is fully plumbed through. This V2 fixes checkpatch warnings and improves the commit description, as I was too hasty getting the previous version out. Signed-off-by: Michael Lyle Reviewed-by: Vojtech Pavlik Signed-off-by: Jens Axboe drivers/md/bcache/btree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e393aa2446150536929140739f09c6ecbcbea7f0 Author: Rui Hua Date: Fri Nov 24 15:14:26 2017 -0800 bcache: recover data from backing when data is clean When we send a read request and hit the clean data in cache device, there is a situation called cache read race in bcache(see the commit in the tail of cache_look_up(), the following explaination just copy from there): The bucket we're reading from might be reused while our bio is in flight, and we could then end up reading the wrong data. We guard against this by checking (in bch_cache_read_endio()) if the pointer is stale again; if so, we treat it as an error (s->iop.error = -EINTR) and reread from the backing device (but we don't pass that error up anywhere) It should be noted that cache read race happened under normal circumstances, not the circumstance when SSD failed, it was counted and shown in /sys/fs/bcache/XXX/internal/cache_read_races. Without this patch, when we use writeback mode, we will never reread from the backing device when cache read race happened, until the whole cache device is clean, because the condition (s->recoverable && (dc && !atomic_read(&dc->has_dirty))) is false in cached_dev_read_error(). In this situation, the s->iop.error(= -EINTR) will be passed up, at last, user will receive -EINTR when it's bio end, this is not suitable, and wield to up-application. In this patch, we use s->read_dirty_data to judge whether the read request hit dirty data in cache device, it is safe to reread data from the backing device when the read request hit clean data. This can not only handle cache read race, but also recover data when failed read request from cache device. [edited by mlyle to fix up whitespace, commit log title, comment spelling] Fixes: d59b23795933 ("bcache: only permit to recovery read error when cache device is clean") Cc: # 4.14 Signed-off-by: Hua Rui Reviewed-by: Michael Lyle Reviewed-by: Coly Li Signed-off-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/request.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit cf33c1ee5254c6a430bc1538232b49c3ea13e613 Author: Huacai Chen Date: Fri Nov 24 15:14:25 2017 -0800 bcache: Fix building error on MIPS This patch try to fix the building error on MIPS. The reason is MIPS has already defined the PTR macro, which conflicts with the PTR macro in include/uapi/linux/bcache.h. [fixed by mlyle: corrected a line-length issue] Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen Reviewed-by: Michael Lyle Signed-off-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/alloc.c | 2 +- drivers/md/bcache/extents.c | 2 +- drivers/md/bcache/journal.c | 2 +- include/uapi/linux/bcache.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit bb22cafd75686d799dabfe422571fac4b5c2ed94 Author: Tang Junhui Date: Fri Nov 24 15:14:24 2017 -0800 bcache: add a comment in journal bucket reading Journal bucket is a circular buffer, the bucket can be like YYYNNNYY, which means the first valid journal in the 7th bucket, and the latest valid journal in third bucket, in this case, if we do not try we the zero index first, We may get a valid journal in the 7th bucket, then we call find_next_bit(bitmap,ca->sb.njournal_buckets, l + 1) to get the first invalid bucket after the 7th bucket, because all these buckets is valid, so no bit 1 in bitmap, thus find_next_bit() function would return with ca->sb.njournal_buckets (8). So, after that, bcache only read journal in 7th and 8the bucket, the first to the third buckets are lost. So, it is important to let developer know that, we need to try the zero index at first in the hash-search, and avoid any breaks in future's code modification. [ML: Fixed whitespace & formatting & file permissions] Signed-off-by: Tang Junhui Signed-off-by: Michael Lyle Reviewed-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/journal.c | 5 +++++ 1 file changed, 5 insertions(+) commit 01a95b2141e337dea15ad48e60a35c72a9b10205 Author: Johannes Berg Date: Fri Nov 24 09:35:25 2017 +0100 cfg80211: select CRYPTO_SHA256 if needed When regulatory database certificates are built-in, they're currently using the SHA256 digest algorithm, so add that to the build in that case. Also add a note that for custom certificates, one may need to add the right algorithms. Reported-by: Florian Fainelli Tested-by: Florian Fainelli Signed-off-by: Johannes Berg net/wireless/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+) commit ca43a0c73d1d32e2c24698b1b9044557a0b197d4 Author: Zhu Yanjun Date: Sun Nov 19 22:21:08 2017 -0500 forcedeth: replace pci_unmap_page with dma_unmap_page The function pci_unmap_page is obsolete. So it is replaced with the function dma_unmap_page. CC: Srinivas Eeda CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller drivers/net/ethernet/nvidia/forcedeth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5f109b94fb5fb7ef517b0b56b7f363b51ae365cd Merge: 1d3b78b 3d18cbb Author: David S. Miller Date: Sat Nov 25 05:07:17 2017 +0900 Merge tag 'rxrpc-fixes-20171124' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Fixes and improvements Here's a set of patches that fix and improve some stuff in the AF_RXRPC protocol: The patches are: (1) Unlock mutex returned by rxrpc_accept_call(). (2) Don't set connection upgrade by default. (3) Differentiate the call->user_mutex used by the kernel from that used by userspace calling sendmsg() to avoid lockdep warnings. (4) Delay terminal ACK transmission to a work queue so that it can be replaced by the next call if there is one. (5) Split the call parameters from the connection parameters so that more call-specific parameters can be passed through. (6) Fix the call timeouts to work the same as for other RxRPC/AFS implementations. (7) Don't transmit DELAY ACKs immediately, but instead delay them slightly so that can be discarded or can represent more packets. (8) Use RTT to calculate certain protocol timeouts. (9) Add a timeout to detect lost ACK/DATA packets. (10) Add a keepalive function so that we ping the peer if we haven't transmitted for a short while, thereby keeping intervening firewall routes open. (11) Make service endpoints expire like they're supposed to so that the UDP port can be reused. (12) Fix connection expiry timers to make cleanup happen in a more timely fashion. ==================== Signed-off-by: David S. Miller commit 26c0a26d78bc7c2943d55121a32cb85a4594f8ea Author: Jens Axboe Date: Fri Nov 24 10:12:33 2017 -0700 nvme-fc: don't use bit masks for set/test_bit() numbers So far harmless, but it's confusing and a bug waiting to happen if the shifts grow larger than 4. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 54243016ae35a0912a680f884835237fd6176820 Author: Liviu Dudau Date: Thu Aug 31 17:39:24 2017 +0100 drm: mali-dp: Disable planes when their CRTC gets disabled. Make sure only the planes on the active CRTCs get committed and that all planes on the disabled CRTCs get turned off. Reviewed-by: Brian Starkey Reviewed-by: Gustavo Padovan Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_crtc.c | 3 +++ 1 file changed, 3 insertions(+) commit a6993b215a719ad5758c1bced5f8df95add070bf Author: Liviu Dudau Date: Thu Aug 31 15:48:43 2017 +0100 drm: mali-dp: Separate static internal data into a read-only structure. The malidp_hw_device structure that the driver uses to handle the differences between versions of the IP contains both non-changeable data and fields that get updated at probe time. Previously we were copying the read-only part into allocated memory, but that can be completely avoided by splitting the structure into a read-only part and keeping the runtime modifiable fields into the old structure. Reviewed-by: Brian Starkey Reviewed-by: Gustavo Padovan Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_crtc.c | 13 ++++---- drivers/gpu/drm/arm/malidp_drv.c | 30 ++++++++--------- drivers/gpu/drm/arm/malidp_hw.c | 46 ++++++++++++++------------ drivers/gpu/drm/arm/malidp_hw.h | 65 ++++++++++++++++++++++--------------- drivers/gpu/drm/arm/malidp_planes.c | 19 +++++------ 5 files changed, 93 insertions(+), 80 deletions(-) commit 0970d7a2f5b0dcdd520c7655210d677f6e9a878e Author: Srishti Sharma Date: Fri Sep 29 15:30:40 2017 +0530 drm/arm: Replace instances of drm_dev_unref with drm_dev_put. Replace drm_dev_unref with drm_dev_put as it is more consistent with kernel coding style. Done using the following semantic patch by coccinelle. @r@ expression e; @@ -drm_dev_unref(); +drm_dev_put(); Signed-off-by: Srishti Sharma [split patch into hdlcd and mali-dp versions] Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c2cc215cde5b3fd4102c9595df66c6e4ff237be4 Author: Cihangir Akturk Date: Fri Aug 11 15:32:48 2017 +0300 drm: mali-dp: switch to drm_*_get(), drm_*_put() helpers Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and drm_*_unreference() helpers. drm_*_reference() and drm_*_unreference() functions are just compatibility alias for drm_*_get() and drm_*_put() and should not be used by new code. So convert all users of compatibility functions to use the new APIs. Generated by: scripts/coccinelle/api/drm-get-put.cocci Signed-off-by: Cihangir Akturk Acked-by: Liviu Dudau Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/malidp_planes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 345f8f34bb473241d62803951c18a844dd705f8d Author: Martin Schwidefsky Date: Fri Nov 24 16:23:15 2017 +0100 s390: revert ELF_ET_DYN_BASE base changes This reverts commit a73dc5370e153ac63718d850bddf0c9aa9d871e6. Reducing the base address for 31-bit PIE executables from (STACK_TOP/3)*2 to 4MB broke several compat programs which use -fpie to move the executable out of the lower 16MB. Cc: # 4.13+ Signed-off-by: Martin Schwidefsky arch/s390/include/asm/elf.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 54b8a2306b928abca4d3e9d7e2c17a4673032e1c Author: Kees Cook Date: Thu Nov 23 14:19:02 2017 -0800 m68k/macboing: Fix missed timer callback assignment This fixes a missed function prototype callback from the timer conversions. Reported-by: kbuild test robot Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20171123221902.GA75727@beast arch/m68k/mac/macboing.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fec37202e8a5c060e0c46cd353bf0b6d26b9cb02 Author: Greg Kroah-Hartman Date: Fri Nov 24 15:00:43 2017 +0100 s390: Remove redundant license text Now that the SPDX tag is in all arch/s390/ files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording in the remaining files can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: "Paul E. McKenney" Signed-off-by: Greg Kroah-Hartman Signed-off-by: Martin Schwidefsky arch/s390/Makefile | 4 ---- arch/s390/boot/install.sh | 4 ---- arch/s390/hypfs/inode.c | 1 - arch/s390/mm/mmap.c | 15 --------------- 4 files changed, 24 deletions(-) commit a876ca4ddef01e8737da5c672e878c67798cb975 Author: Greg Kroah-Hartman Date: Fri Nov 24 15:00:42 2017 +0100 s390: crypto: Remove redundant license text Now that the SPDX tag is in all arch/s390/crypto/ files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Herbert Xu Cc: "David S. Miller" Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: "Paul E. McKenney" Signed-off-by: Greg Kroah-Hartman Signed-off-by: Martin Schwidefsky arch/s390/crypto/aes_s390.c | 6 ------ arch/s390/crypto/arch_random.c | 5 ----- arch/s390/crypto/des_s390.c | 6 ------ arch/s390/crypto/paes_s390.c | 5 ----- arch/s390/crypto/sha.h | 6 ------ arch/s390/crypto/sha256_s390.c | 6 ------ arch/s390/crypto/sha512_s390.c | 6 ------ arch/s390/crypto/sha_common.c | 6 ------ 8 files changed, 46 deletions(-) commit 94bf2f28c9923abe7a1fccc126a86a2401cb5a47 Author: Greg Kroah-Hartman Date: Fri Nov 24 15:00:41 2017 +0100 s390: include: Remove redundant license text Now that the SPDX tag is in all arch/s390/include/ files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Christian Borntraeger Cc: Cornelia Huck Cc: Halil Pasic Cc: "Paul E. McKenney" Signed-off-by: Greg Kroah-Hartman Signed-off-by: Martin Schwidefsky arch/s390/include/asm/cpu_mf.h | 4 ---- arch/s390/include/asm/kprobes.h | 14 -------------- arch/s390/include/asm/kvm_host.h | 4 ---- arch/s390/include/asm/kvm_para.h | 6 ------ arch/s390/include/asm/livepatch.h | 7 ------- arch/s390/include/asm/syscall.h | 4 ---- arch/s390/include/asm/sysinfo.h | 4 ---- arch/s390/include/uapi/asm/kvm.h | 4 ---- arch/s390/include/uapi/asm/kvm_para.h | 4 ---- arch/s390/include/uapi/asm/kvm_perf.h | 4 ---- arch/s390/include/uapi/asm/virtio-ccw.h | 4 ---- arch/s390/include/uapi/asm/zcrypt.h | 14 -------------- 12 files changed, 73 deletions(-) commit 53634237e72b4f3c2dff2f92ec35792207730a98 Author: Greg Kroah-Hartman Date: Fri Nov 24 15:00:40 2017 +0100 s390: kernel: Remove redundant license text Now that the SPDX tag is in all arch/s390/kernel/ files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: "Paul E. McKenney" Signed-off-by: Greg Kroah-Hartman Signed-off-by: Martin Schwidefsky arch/s390/kernel/kprobes.c | 14 -------------- arch/s390/kernel/module.c | 14 -------------- arch/s390/kernel/perf_cpum_cf.c | 4 ---- arch/s390/kernel/perf_cpum_sf.c | 4 ---- arch/s390/kernel/perf_event.c | 4 ---- arch/s390/kernel/sthyi.c | 4 ---- arch/s390/kernel/vdso.c | 4 ---- arch/s390/kernel/vdso32/clock_getres.S | 4 ---- arch/s390/kernel/vdso32/clock_gettime.S | 4 ---- arch/s390/kernel/vdso32/gettimeofday.S | 4 ---- arch/s390/kernel/vdso64/clock_getres.S | 4 ---- arch/s390/kernel/vdso64/clock_gettime.S | 4 ---- arch/s390/kernel/vdso64/gettimeofday.S | 4 ---- 13 files changed, 72 deletions(-) commit 0b73214f8a4d7790efd68b9cc183d26e472ccefd Author: Greg Kroah-Hartman Date: Fri Nov 24 15:00:38 2017 +0100 s390: add SPDX identifiers to the remaining files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the remaining arch/s390/ files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Christian Borntraeger Cc: Cornelia Huck Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Signed-off-by: Martin Schwidefsky arch/s390/Makefile | 1 + arch/s390/boot/install.sh | 1 + arch/s390/hypfs/inode.c | 1 + arch/s390/include/asm/cpu_mf.h | 1 + arch/s390/include/asm/kprobes.h | 1 + arch/s390/include/asm/kvm_host.h | 1 + arch/s390/include/asm/kvm_para.h | 1 + arch/s390/include/asm/livepatch.h | 1 + arch/s390/include/asm/syscall.h | 1 + arch/s390/include/asm/sysinfo.h | 1 + 10 files changed, 10 insertions(+) commit 0caa8cdf1a02a8b45dbd8641c7b3e896051c1254 Author: Greg Kroah-Hartman Date: Fri Nov 24 15:00:37 2017 +0100 s390: appldata: add SPDX identifiers to the remaining files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the arch/s390/appldata/ files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Signed-off-by: Martin Schwidefsky arch/s390/appldata/appldata_base.c | 1 + arch/s390/appldata/appldata_mem.c | 1 + arch/s390/appldata/appldata_net_sum.c | 1 + arch/s390/appldata/appldata_os.c | 1 + 4 files changed, 4 insertions(+) commit adbb3901685fb94a4a0ac62f7859724964054287 Author: Greg Kroah-Hartman Date: Fri Nov 24 15:00:36 2017 +0100 s390: pci: add SPDX identifiers to the remaining files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the arch/s390/pci/ files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Sebastian Ott Cc: Gerald Schaefer Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Signed-off-by: Martin Schwidefsky arch/s390/pci/pci.c | 1 + arch/s390/pci/pci_debug.c | 1 + arch/s390/pci/pci_dma.c | 1 + arch/s390/pci/pci_insn.c | 1 + 4 files changed, 4 insertions(+) commit ac41aaeedc62648208eb1b32cff768a9ffcfdd23 Author: Greg Kroah-Hartman Date: Fri Nov 24 15:00:35 2017 +0100 s390: mm: add SPDX identifiers to the remaining files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the arch/s390/mm/ files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Christian Borntraeger Cc: Cornelia Huck Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Signed-off-by: Martin Schwidefsky arch/s390/mm/cmm.c | 1 + arch/s390/mm/gmap.c | 1 + arch/s390/mm/mmap.c | 1 + arch/s390/mm/pgtable.c | 1 + 4 files changed, 4 insertions(+) commit 20a884f5e0180a6f67bd650bdb9d703c415c1436 Author: Greg Kroah-Hartman Date: Fri Nov 24 15:00:34 2017 +0100 s390: crypto: add SPDX identifiers to the remaining files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the arch/s390/crypto/ files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Herbert Xu Cc: "David S. Miller" Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Signed-off-by: Martin Schwidefsky arch/s390/crypto/aes_s390.c | 1 + arch/s390/crypto/arch_random.c | 1 + arch/s390/crypto/crc32-vx.c | 1 + arch/s390/crypto/des_s390.c | 1 + arch/s390/crypto/ghash_s390.c | 1 + arch/s390/crypto/paes_s390.c | 1 + arch/s390/crypto/prng.c | 1 + arch/s390/crypto/sha.h | 1 + arch/s390/crypto/sha256_s390.c | 1 + arch/s390/crypto/sha512_s390.c | 1 + arch/s390/crypto/sha_common.c | 1 + 11 files changed, 11 insertions(+) commit a17ae4c3a6add7579e9962df5dd12cb1f3bed431 Author: Greg Kroah-Hartman Date: Fri Nov 24 15:00:32 2017 +0100 s390: kernel: add SPDX identifiers to the remaining files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the arch/s390/kernel/ files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Signed-off-by: Martin Schwidefsky arch/s390/kernel/dis.c | 1 + arch/s390/kernel/dumpstack.c | 1 + arch/s390/kernel/ipl.c | 1 + arch/s390/kernel/kprobes.c | 1 + arch/s390/kernel/lgr.c | 1 + arch/s390/kernel/module.c | 1 + arch/s390/kernel/nmi.c | 1 + arch/s390/kernel/perf_cpum_cf.c | 1 + arch/s390/kernel/perf_cpum_sf.c | 1 + arch/s390/kernel/perf_event.c | 1 + arch/s390/kernel/setup.c | 1 + arch/s390/kernel/stacktrace.c | 1 + arch/s390/kernel/time.c | 1 + arch/s390/kernel/topology.c | 1 + arch/s390/kernel/vdso.c | 1 + arch/s390/kernel/vdso32/clock_getres.S | 1 + arch/s390/kernel/vdso32/clock_gettime.S | 1 + arch/s390/kernel/vdso32/gettimeofday.S | 1 + arch/s390/kernel/vdso64/clock_getres.S | 1 + arch/s390/kernel/vdso64/clock_gettime.S | 1 + arch/s390/kernel/vdso64/gettimeofday.S | 1 + arch/s390/kernel/vtime.c | 1 + 22 files changed, 22 insertions(+) commit b1c0de0e51504b84cf4a3eb46541e98557bb460d Author: Martin Schwidefsky Date: Fri Nov 24 15:19:32 2017 +0100 s390: sthyi: add SPDX identifiers to the remaining files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the arch/s390/kernel/sthyi file with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Signed-off-by: Martin Schwidefsky arch/s390/kernel/sthyi.c | 1 + 1 file changed, 1 insertion(+) commit 43dd388b21c722616413781bd434522376e117cc Author: Colin Ian King Date: Mon Nov 20 13:58:20 2017 +0000 afs: remove redundant assignment of dvnode to itself The assignment of dvnode to itself is redundant and can be removed. Cleans up warning detected by cppcheck: fs/afs/dir.c:975: (warning) Redundant assignment of 'dvnode' to itself. Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation") Signed-off-by: Colin Ian King Signed-off-by: David Howells fs/afs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6832795164d42413fd9ef991f9ef9b30a7248377 Author: Gustavo A. R. Silva Date: Fri Nov 17 16:40:32 2017 -0600 afs: cell: Remove unnecessary code in afs_lookup_cell Due to recent changes this piece of code is no longer needed. Addresses-Coverity-ID: 1462033 Link: https://lkml.kernel.org/r/4923.1510957307@warthog.procyon.org.uk Signed-off-by: Gustavo A. R. Silva Signed-off-by: David Howells fs/afs/cell.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 4433b69141864b8c8ba50d0a3ed38341eec9c469 Author: David Howells Date: Mon Nov 20 22:41:00 2017 +0000 afs: Fix signal handling in some file ops afs_mkdir(), afs_create(), afs_link() and afs_symlink() all need to drop the target dentry if a signal causes the operation to be killed immediately before we try to contact the server. Signed-off-by: David Howells fs/afs/dir.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 13d1d559f04a893b4a32ec04fb9d7210ec4d9597 Author: Greg Kroah-Hartman Date: Tue Nov 14 18:38:08 2017 +0100 s390: drivers: Remove redundant license text Now that the SPDX tag is in all drivers/s390/ files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Sebastian Ott Cc: Peter Oberparleiter Cc: Julian Wiedmann Cc: Ursula Braun Cc: Cornelia Huck Cc: Halil Pasic Cc: "Paul E. McKenney" Signed-off-by: Greg Kroah-Hartman Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/char/zcore.c | 1 - drivers/s390/cio/cmf.c | 14 -------------- drivers/s390/cio/css.c | 2 -- drivers/s390/cio/device.c | 2 -- drivers/s390/cio/device_ops.c | 2 -- drivers/s390/net/lcs.c | 14 -------------- drivers/s390/net/netiucv.c | 15 --------------- drivers/s390/net/smsgiucv.c | 14 -------------- drivers/s390/virtio/Makefile | 4 ---- drivers/s390/virtio/virtio_ccw.c | 4 ---- 10 files changed, 72 deletions(-) commit 0b622e60bc6c4eca75d517b10f15914ecd58e6b1 Author: Greg Kroah-Hartman Date: Tue Nov 14 18:38:07 2017 +0100 s390: crypto: Remove redundant license text Now that the SPDX tag is in all drivers/s390/crypto/ files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Harald Freudenberger Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: "Paul E. McKenney" Signed-off-by: Greg Kroah-Hartman Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/crypto/ap_bus.c | 14 -------------- drivers/s390/crypto/ap_bus.h | 14 -------------- drivers/s390/crypto/pkey_api.c | 5 ----- drivers/s390/crypto/zcrypt_api.c | 14 -------------- drivers/s390/crypto/zcrypt_api.h | 14 -------------- drivers/s390/crypto/zcrypt_card.c | 10 ---------- drivers/s390/crypto/zcrypt_cca_key.h | 14 -------------- drivers/s390/crypto/zcrypt_cex2a.c | 14 -------------- drivers/s390/crypto/zcrypt_cex2a.h | 14 -------------- drivers/s390/crypto/zcrypt_error.h | 14 -------------- drivers/s390/crypto/zcrypt_msgtype50.c | 14 -------------- drivers/s390/crypto/zcrypt_msgtype50.h | 14 -------------- drivers/s390/crypto/zcrypt_msgtype6.c | 14 -------------- drivers/s390/crypto/zcrypt_msgtype6.h | 14 -------------- drivers/s390/crypto/zcrypt_pcixcc.c | 14 -------------- drivers/s390/crypto/zcrypt_pcixcc.h | 14 -------------- drivers/s390/crypto/zcrypt_queue.c | 10 ---------- 17 files changed, 221 deletions(-) commit 31fb16730a0d8baf0c04c93ebf606340c9ea8393 Author: Greg Kroah-Hartman Date: Tue Nov 14 18:38:06 2017 +0100 s390: virtio: add SPDX identifiers to the remaining files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/s390/virtio/ files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Cornelia Huck Cc: Halil Pasic Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/virtio/Makefile | 1 + drivers/s390/virtio/virtio_ccw.c | 1 + 2 files changed, 2 insertions(+) commit 40bf411ee6d1f2d9833486a9d4318734180a997e Author: Greg Kroah-Hartman Date: Tue Nov 14 18:38:05 2017 +0100 s390: scsi: zfcp_aux: add SPDX identifier It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/s390/scsi/zfcp_aux.c file with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Steffen Maier Cc: Benjamin Block Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/scsi/zfcp_aux.c | 1 + 1 file changed, 1 insertion(+) commit ab9953ff0f2e37092dc247ddd7c62fe6f03618dc Author: Greg Kroah-Hartman Date: Tue Nov 14 18:38:04 2017 +0100 s390: net: add SPDX identifiers to the remaining files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/s390/net/ files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Julian Wiedmann Cc: Ursula Braun Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/net/ctcm_main.c | 1 + drivers/s390/net/fsm.c | 1 + drivers/s390/net/lcs.c | 1 + drivers/s390/net/netiucv.c | 1 + drivers/s390/net/qeth_core_main.c | 1 + drivers/s390/net/qeth_core_sys.c | 1 + drivers/s390/net/qeth_l2_main.c | 1 + drivers/s390/net/qeth_l3_main.c | 1 + drivers/s390/net/smsgiucv.c | 1 + drivers/s390/net/smsgiucv_app.c | 1 + 10 files changed, 10 insertions(+) commit 6f05e69e44d8167d3c97c3b3b657a94f3cb41d71 Author: Greg Kroah-Hartman Date: Tue Nov 14 18:38:03 2017 +0100 s390: char: add SPDX identifiers to the remaining files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/s390/char/ files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/char/fs3270.c | 1 + drivers/s390/char/hmcdrv_mod.c | 1 + drivers/s390/char/monreader.c | 1 + drivers/s390/char/monwriter.c | 1 + drivers/s390/char/raw3270.c | 1 + drivers/s390/char/sclp_async.c | 1 + drivers/s390/char/tape_34xx.c | 1 + drivers/s390/char/tape_3590.c | 1 + drivers/s390/char/tape_class.c | 1 + drivers/s390/char/tape_core.c | 1 + drivers/s390/char/tty3270.c | 1 + drivers/s390/char/vmlogrdr.c | 1 + drivers/s390/char/vmur.c | 1 + drivers/s390/char/zcore.c | 1 + 14 files changed, 14 insertions(+) commit 724117b77bbe2b28f27728d58a432ed22630e33f Author: Greg Kroah-Hartman Date: Tue Nov 14 18:38:02 2017 +0100 s390: cio: add SPDX identifiers to the remaining files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/s390/cio/ files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Sebastian Ott Cc: Peter Oberparleiter Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Cornelia Huck Cc: Dong Jia Shi Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/cio/ccwgroup.c | 1 + drivers/s390/cio/chp.c | 1 + drivers/s390/cio/chsc.c | 1 + drivers/s390/cio/chsc_sch.c | 1 + drivers/s390/cio/cio.c | 1 + drivers/s390/cio/cmf.c | 1 + drivers/s390/cio/css.c | 1 + drivers/s390/cio/device.c | 1 + drivers/s390/cio/device_fsm.c | 1 + drivers/s390/cio/device_ops.c | 1 + drivers/s390/cio/eadm_sch.c | 1 + drivers/s390/cio/isc.c | 1 + drivers/s390/cio/qdio_main.c | 1 + drivers/s390/cio/qdio_setup.c | 1 + drivers/s390/cio/scm.c | 1 + drivers/s390/cio/vfio_ccw_drv.c | 1 + 16 files changed, 16 insertions(+) commit 812141a9fe61446c948a71456c58090ac11a6d14 Author: Greg Kroah-Hartman Date: Tue Nov 14 18:38:01 2017 +0100 s390: crypto: add SPDX identifiers to the remaining files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/s390/crypto/ files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Harald Freudenberger Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/crypto/ap_bus.c | 1 + drivers/s390/crypto/ap_bus.h | 1 + drivers/s390/crypto/pkey_api.c | 1 + drivers/s390/crypto/zcrypt_api.c | 1 + drivers/s390/crypto/zcrypt_api.h | 1 + drivers/s390/crypto/zcrypt_card.c | 1 + drivers/s390/crypto/zcrypt_cca_key.h | 1 + drivers/s390/crypto/zcrypt_cex2a.c | 1 + drivers/s390/crypto/zcrypt_cex2a.h | 1 + drivers/s390/crypto/zcrypt_cex4.c | 1 + drivers/s390/crypto/zcrypt_error.h | 1 + drivers/s390/crypto/zcrypt_msgtype50.c | 1 + drivers/s390/crypto/zcrypt_msgtype50.h | 1 + drivers/s390/crypto/zcrypt_msgtype6.c | 1 + drivers/s390/crypto/zcrypt_msgtype6.h | 1 + drivers/s390/crypto/zcrypt_pcixcc.c | 1 + drivers/s390/crypto/zcrypt_pcixcc.h | 1 + drivers/s390/crypto/zcrypt_queue.c | 1 + 18 files changed, 18 insertions(+) commit 6a55d2cdf1bc140665cbfaed14de79acaf3758c4 Author: Greg Kroah-Hartman Date: Tue Nov 14 18:38:00 2017 +0100 s390: block: add SPDX identifiers to the remaining files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/s390/block/ files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Stefan Haberland Cc: Jan Hoeppner Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd.c | 1 + drivers/s390/block/dasd_devmap.c | 1 + drivers/s390/block/dasd_diag.c | 1 + drivers/s390/block/dasd_eckd.c | 1 + drivers/s390/block/dasd_fba.c | 1 + drivers/s390/block/dcssblk.c | 1 + drivers/s390/block/scm_blk.c | 1 + drivers/s390/block/xpram.c | 1 + 8 files changed, 8 insertions(+) commit 860ec7c6e21cecca8c508a66ee211b56d87f5bd7 Author: Christian Borntraeger Date: Thu Nov 23 19:26:20 2017 +0100 s390/debug: use pK for kernel pointers the s390 debug feature (/sys/kernel/debug/s390dbf/) shows the kernel pointer of the calling function even for kptr_restrict == 2. Let us use pK instead of p. This hides the kernel addresses for kptr_restrict == 2: root@host $ echo 2 > /proc/sys/kernel/kptr_restrict root@host $ tail -n1 /sys/kernel/debug/s390dbf/cio_msg/sprintf 00 01511461280:386645 2 - 00 0000000000000000 snsid: device 0.0.3f68: rc=0 3990/e9 3390/0c root@host $ echo 1 > /proc/sys/kernel/kptr_restrict root@host $ tail -n1 /sys/kernel/debug/s390dbf/cio_msg/sprintf 00 01511461280:386645 2 - 00 000000000071171c snsid: device 0.0.3f68: rc=0 3990/e9 3390/0c root@host $ echo 0 > /proc/sys/kernel/kptr_restrict root@host $ tail -n1 /sys/kernel/debug/s390dbf/cio_msg/sprintf 00 01511461280:386645 2 - 00 000000000071171c snsid: device 0.0.3f68: rc=0 3990/e9 3390/0c Signed-off-by: Christian Borntraeger Acked-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit febae9bc946de2c85e324b20bb7dc7b2d4e49d37 Author: Liviu Dudau Date: Mon Mar 27 16:20:57 2017 +0100 drm: hdlcd: Update PM code to save/restore console. Update the PM code to suspend/resume the fbdev_cma console. Signed-off-by: Liviu Dudau drivers/gpu/drm/arm/hdlcd_drv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5a1314fa697fc65cefaba64cd4699bfc3e6882a6 Author: Ricardo Ribalda Date: Tue Nov 21 10:09:02 2017 +0100 spi: xilinx: Detect stall with Unknown commands When the core is configured in C_SPI_MODE > 0, it integrates a lookup table that automatically configures the core in dual or quad mode based on the command (first byte on the tx fifo). Unfortunately, that list mode_?_memoy_*.mif does not contain all the supported commands by the flash. Since 4.14 spi-nor automatically tries to probe the flash using SFDP (command 0x5a), and that command is not part of the list_mode table. Whit the right combination of C_SPI_MODE and C_SPI_MEMORY this leads into a stall that can only be recovered with a soft rest. This patch detects this kind of stall and returns -EIO to the caller on those commands. spi-nor can handle this error properly: m25p80 spi0.0: Detected stall. Check C_SPI_MODE and C_SPI_MEMORY. 0x21 0x2404 m25p80 spi0.0: SPI transfer failed: -5 spi_master spi0: failed to transfer one message from queue m25p80 spi0.0: s25sl064p (8192 Kbytes) Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-xilinx.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 254beff97b4714bac4ec8add5a6888c1adc1ad8f Author: oder_chiou@realtek.com Date: Fri Nov 24 16:11:22 2017 +0800 ASoC: rt5514: Make sure the DMIC delay will be happened after normal SUPPLY widgets power on The patch makes sure the DMIC delay will be happened after normal SUPPLY widgets power on. If there are some platforms that provide the MCLK using the SUPPLY widget, it will make sure the delay time is helpful. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5514.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc1527dcb422ead9e1808def6824b4c0e469cc1c Author: David Howells Date: Mon Nov 20 23:04:08 2017 +0000 afs: Fix some dentry handling in dir ops and missing key_puts Fix some of dentry handling in AFS directory ops: (1) Do d_drop() on the new_dentry before assigning a new inode to it in afs_vnode_new_inode(). It's fine to do this before calling afs_iget() because the operation has taken place on the server. (2) Replace d_instantiate()/d_rehash() with d_add(). (3) Don't d_drop() the new_dentry in afs_rename() on error. Also fix afs_link() and afs_rename() to call key_put() on all error paths where the key is taken. Signed-off-by: David Howells fs/afs/dir.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 5a039c32271b9aaa1103e9b64412f520e72b67d3 Author: David Howells Date: Sat Nov 18 00:13:30 2017 +0000 afs: Make afs_write_begin() avoid writing to a page that's being stored Make afs_write_begin() wait for a page that's marked PG_writeback because: (1) We need to avoid interference with the data being stored so that the data on the server ends up in a defined state. (2) page->private is used to track the window of dirty data within a page, but it's also used by the storage code to track what's being written, being cleared by the completion notification. Ownership can't be relinquished by the storage code until completion because it a store fails, the data must be remarked dirty. Tracing shows something like the following (edited): x86_64-linux-gn-15940 [1] afs_page_dirty: vn=ffff8800bef33800 9c75 begin 0-125 kworker/u8:3-114 [2] afs_page_dirty: vn=ffff8800bef33800 9c75 store+ 0-125 x86_64-linux-gn-15940 [1] afs_page_dirty: vn=ffff8800bef33800 9c75 begin 0-2052 kworker/u8:3-114 [2] afs_page_dirty: vn=ffff8800bef33800 9c75 clear 0-2052 kworker/u8:3-114 [2] afs_page_dirty: vn=ffff8800bef33800 9c75 store 0-0 kworker/u8:3-114 [2] afs_page_dirty: vn=ffff8800bef33800 9c75 WARN 0-0 The clear (completion) corresponding to the store+ (store continuation from a previous page) happens between the second begin (afs_write_begin) and the store corresponding to that. This results in the second store not seeing any data to write back, leading to the following warning: WARNING: CPU: 2 PID: 114 at ../fs/afs/write.c:403 afs_write_back_from_locked_page+0x19d/0x76c [kafs] Modules linked in: kafs(E) CPU: 2 PID: 114 Comm: kworker/u8:3 Tainted: G E 4.14.0-fscache+ #242 Hardware name: ASUS All Series/H97-PLUS, BIOS 2306 10/09/2014 Workqueue: writeback wb_workfn (flush-afs-2) task: ffff8800cad72600 task.stack: ffff8800cad44000 RIP: 0010:afs_write_back_from_locked_page+0x19d/0x76c [kafs] RSP: 0018:ffff8800cad47aa0 EFLAGS: 00010246 RAX: 0000000000000001 RBX: ffff8800bef33a20 RCX: 0000000000000000 RDX: 000000000000000f RSI: ffffffff81c5d0e0 RDI: ffff8800cad72e78 RBP: ffff8800d31ea1e8 R08: ffff8800c1358000 R09: ffff8800ca00e400 R10: ffff8800cad47a38 R11: ffff8800c5d9e400 R12: 0000000000000000 R13: ffffea0002d9df00 R14: ffffffffa0023c1c R15: 0000000000007fdf FS: 0000000000000000(0000) GS:ffff8800ca700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f85ac6c4000 CR3: 0000000001c10001 CR4: 00000000001606e0 Call Trace: ? clear_page_dirty_for_io+0x23a/0x267 afs_writepages_region+0x1be/0x286 [kafs] afs_writepages+0x60/0x127 [kafs] do_writepages+0x36/0x70 __writeback_single_inode+0x12f/0x635 writeback_sb_inodes+0x2cc/0x452 __writeback_inodes_wb+0x68/0x9f wb_writeback+0x208/0x470 ? wb_workfn+0x22b/0x565 wb_workfn+0x22b/0x565 ? worker_thread+0x230/0x2ac process_one_work+0x2cc/0x517 ? worker_thread+0x230/0x2ac worker_thread+0x1d4/0x2ac ? rescuer_thread+0x29b/0x29b kthread+0x15d/0x165 ? kthread_create_on_node+0x3f/0x3f ? call_usermodehelper_exec_async+0x118/0x11f ret_from_fork+0x24/0x30 Signed-off-by: David Howells fs/afs/write.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3d18cbb7fd0cfdf0b2ca18139950a4b0c1a0a220 Author: David Howells Date: Fri Nov 24 10:18:42 2017 +0000 rxrpc: Fix conn expiry timers Fix the rxrpc connection expiry timers so that connections for closed AF_RXRPC sockets get deleted in a more timely fashion, freeing up the transport UDP port much more quickly. (1) Replace the delayed work items with work items plus timers so that timer_reduce() can be used to shorten them and so that the timer doesn't requeue the work item if the net namespace is dead. (2) Don't use queue_delayed_work() as that won't alter the timeout if the timer is already running. (3) Don't rearm the timers if the network namespace is dead. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 2 ++ net/rxrpc/ar-internal.h | 6 ++++-- net/rxrpc/conn_client.c | 30 +++++++++++++++++++----------- net/rxrpc/conn_object.c | 28 +++++++++++++++++----------- net/rxrpc/net_ns.c | 30 ++++++++++++++++++++++++++---- 5 files changed, 68 insertions(+), 28 deletions(-) commit f859ab61875978eeaa539740ff7f7d91f5d60006 Author: David Howells Date: Fri Nov 24 10:18:42 2017 +0000 rxrpc: Fix service endpoint expiry RxRPC service endpoints expire like they're supposed to by the following means: (1) Mark dead rxrpc_net structs (with ->live) rather than twiddling the global service conn timeout, otherwise the first rxrpc_net struct to die will cause connections on all others to expire immediately from then on. (2) Mark local service endpoints for which the socket has been closed (->service_closed) so that the expiration timeout can be much shortened for service and client connections going through that endpoint. (3) rxrpc_put_service_conn() needs to schedule the reaper when the usage count reaches 1, not 0, as idle conns have a 1 count. (4) The accumulator for the earliest time we might want to schedule for should be initialised to jiffies + MAX_JIFFY_OFFSET, not ULONG_MAX as the comparison functions use signed arithmetic. (5) Simplify the expiration handling, adding the expiration value to the idle timestamp each time rather than keeping track of the time in the past before which the idle timestamp must go to be expired. This is much easier to read. (6) Ignore the timeouts if the net namespace is dead. (7) Restart the service reaper work item rather the client reaper. Signed-off-by: David Howells include/trace/events/rxrpc.h | 2 ++ net/rxrpc/af_rxrpc.c | 13 +++++++++++++ net/rxrpc/ar-internal.h | 3 +++ net/rxrpc/conn_client.c | 2 ++ net/rxrpc/conn_object.c | 42 ++++++++++++++++++++++++------------------ net/rxrpc/net_ns.c | 3 +++ 6 files changed, 47 insertions(+), 18 deletions(-) commit 415f44e43282a16ec0808c7ccfd401762e587437 Author: David Howells Date: Fri Nov 24 10:18:42 2017 +0000 rxrpc: Add keepalive for a call We need to transmit a packet every so often to act as a keepalive for the peer (which has a timeout from the last time it received a packet) and also to prevent any intervening firewalls from closing the route. Do this by resetting a timer every time we transmit a packet. If the timer ever expires, we transmit a PING ACK packet and thereby also elicit a PING RESPONSE ACK from the other side - which prevents our last-rx timeout from expiring. The timer is set to 1/6 of the last-rx timeout so that we can detect the other side going away if it misses 6 replies in a row. This is particularly necessary for servers where the processing of the service function may take a significant amount of time. Signed-off-by: David Howells include/trace/events/rxrpc.h | 6 ++++++ net/rxrpc/ar-internal.h | 1 + net/rxrpc/call_event.c | 10 ++++++++++ net/rxrpc/output.c | 23 +++++++++++++++++++++++ 4 files changed, 40 insertions(+) commit bd1fdf8cfdf3fdbccd2b21c33ec649ebd7429af7 Author: David Howells Date: Fri Nov 24 10:18:42 2017 +0000 rxrpc: Add a timeout for detecting lost ACKs/lost DATA Add an extra timeout that is set/updated when we send a DATA packet that has the request-ack flag set. This allows us to detect if we don't get an ACK in response to the latest flagged packet. The ACK packet is adjudged to have been lost if it doesn't turn up within 2*RTT of the transmission. If the timeout occurs, we schedule the sending of a PING ACK to find out the state of the other side. If a new DATA packet is ready to go sooner, we cancel the sending of the ping and set the request-ack flag on that instead. If we get back a PING-RESPONSE ACK that indicates a lower tx_top than what we had at the time of the ping transmission, we adjudge all the DATA packets sent between the response tx_top and the ping-time tx_top to have been lost and retransmit immediately. Rather than sending a PING ACK, we could just pick a DATA packet and speculatively retransmit that with request-ack set. It should result in either a REQUESTED ACK or a DUPLICATE ACK which we can then use in lieu the a PING-RESPONSE ACK mentioned above. Signed-off-by: David Howells include/trace/events/rxrpc.h | 11 +++++++++-- net/rxrpc/ar-internal.h | 6 +++++- net/rxrpc/call_event.c | 26 ++++++++++++++++++++++---- net/rxrpc/call_object.c | 1 + net/rxrpc/input.c | 40 ++++++++++++++++++++++++++++++++++++++++ net/rxrpc/output.c | 20 ++++++++++++++++++-- net/rxrpc/recvmsg.c | 4 ++-- net/rxrpc/sendmsg.c | 2 +- 8 files changed, 98 insertions(+), 12 deletions(-) commit beb8e5e4f38cc3e4c2839cfc143e0312bf53d0e0 Author: David Howells Date: Fri Nov 24 10:18:41 2017 +0000 rxrpc: Express protocol timeouts in terms of RTT Express protocol timeouts for data retransmission and deferred ack generation in terms on RTT rather than specified timeouts once we have sufficient RTT samples. For the moment, this requires just one RTT sample to be able to use this for ack deferral and two for data retransmission. The data retransmission timeout is set at RTT*1.5 and the ACK deferral timeout is set at RTT. Note that the calculated timeout is limited to a minimum of 4ns to make sure it doesn't happen too quickly. Signed-off-by: David Howells net/rxrpc/call_event.c | 22 ++++++++++++++++++---- net/rxrpc/sendmsg.c | 7 +++++++ 2 files changed, 25 insertions(+), 4 deletions(-) commit 8637abaa72fe8200a4a37579e6ec5273db85d2c1 Author: David Howells Date: Fri Nov 24 10:18:41 2017 +0000 rxrpc: Don't transmit DELAY ACKs immediately on proposal Don't transmit a DELAY ACK immediately on proposal when the Rx window is rotated, but rather defer it to the work function. This means that we have a chance to queue/consume more received packets before we actually send the DELAY ACK, or even cancel it entirely, thereby reducing the number of packets transmitted. We do, however, want to continue sending other types of packet immediately, particularly REQUESTED ACKs, as they may be used for RTT calculation by the other side. Signed-off-by: David Howells net/rxrpc/recvmsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a158bdd3247b9656df36ba133235fff702e9fdc3 Author: David Howells Date: Fri Nov 24 10:18:41 2017 +0000 rxrpc: Fix call timeouts Fix the rxrpc call expiration timeouts and make them settable from userspace. By analogy with other rx implementations, there should be three timeouts: (1) "Normal timeout" This is set for all calls and is triggered if we haven't received any packets from the peer in a while. It is measured from the last time we received any packet on that call. This is not reset by any connection packets (such as CHALLENGE/RESPONSE packets). If a service operation takes a long time, the server should generate PING ACKs at a duration that's substantially less than the normal timeout so is to keep both sides alive. This is set at 1/6 of normal timeout. (2) "Idle timeout" This is set only for a service call and is triggered if we stop receiving the DATA packets that comprise the request data. It is measured from the last time we received a DATA packet. (3) "Hard timeout" This can be set for a call and specified the maximum lifetime of that call. It should not be specified by default. Some operations (such as volume transfer) take a long time. Allow userspace to set/change the timeouts on a call with sendmsg, using a control message: RXRPC_SET_CALL_TIMEOUTS The data to the message is a number of 32-bit words, not all of which need be given: u32 hard_timeout; /* sec from first packet */ u32 idle_timeout; /* msec from packet Rx */ u32 normal_timeout; /* msec from data Rx */ This can be set in combination with any other sendmsg() that affects a call. Signed-off-by: David Howells include/trace/events/rxrpc.h | 69 +++++++++++------ include/uapi/linux/rxrpc.h | 1 + net/rxrpc/ar-internal.h | 37 +++++---- net/rxrpc/call_event.c | 179 ++++++++++++++++++++----------------------- net/rxrpc/call_object.c | 27 ++++--- net/rxrpc/conn_client.c | 4 +- net/rxrpc/input.c | 34 +++++++- net/rxrpc/misc.c | 19 ++--- net/rxrpc/recvmsg.c | 2 +- net/rxrpc/sendmsg.c | 59 +++++++++++--- net/rxrpc/sysctl.c | 60 +++++++-------- 11 files changed, 290 insertions(+), 201 deletions(-) commit 4812417894770f8c13e5dd8a66479ae44f4b01ff Author: David Howells Date: Fri Nov 24 10:18:41 2017 +0000 rxrpc: Split the call params from the operation params When rxrpc_sendmsg() parses the control message buffer, it places the parameters extracted into a structure, but lumps together call parameters (such as user call ID) with operation parameters (such as whether to send data, send an abort or accept a call). Split the call parameters out into their own structure, a copy of which is then embedded in the operation parameters struct. The call parameters struct is then passed down into the places that need it instead of passing the individual parameters. This allows for extra call parameters to be added. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 8 ++++++-- net/rxrpc/ar-internal.h | 31 +++++++++++++++++++++++++++++- net/rxrpc/call_object.c | 15 +++++++-------- net/rxrpc/sendmsg.c | 51 +++++++++++++++++-------------------------------- 4 files changed, 60 insertions(+), 45 deletions(-) commit 3136ef49a14ccc148becf813074e08fc92fc9b23 Author: David Howells Date: Fri Nov 24 10:18:41 2017 +0000 rxrpc: Delay terminal ACK transmission on a client call Delay terminal ACK transmission on a client call by deferring it to the connection processor. This allows it to be skipped if we can send the next call instead, the first DATA packet of which will implicitly ack this call. Signed-off-by: David Howells net/rxrpc/ar-internal.h | 17 ++++++++++++ net/rxrpc/conn_client.c | 18 ++++++++++++ net/rxrpc/conn_event.c | 74 ++++++++++++++++++++++++++++++++++++++++--------- net/rxrpc/conn_object.c | 10 +++++++ net/rxrpc/recvmsg.c | 2 ++ 5 files changed, 108 insertions(+), 13 deletions(-) commit 9faaff593404a9c4e5abc6839a641635d7b9d0cd Author: David Howells Date: Fri Nov 24 10:18:40 2017 +0000 rxrpc: Provide a different lockdep key for call->user_mutex for kernel calls Provide a different lockdep key for rxrpc_call::user_mutex when the call is made on a kernel socket, such as by the AFS filesystem. The problem is that lockdep registers a false positive between userspace calling the sendmsg syscall on a user socket where call->user_mutex is held whilst userspace memory is accessed whereas the AFS filesystem may perform operations with mmap_sem held by the caller. In such a case, the following warning is produced. ====================================================== WARNING: possible circular locking dependency detected 4.14.0-fscache+ #243 Tainted: G E ------------------------------------------------------ modpost/16701 is trying to acquire lock: (&vnode->io_lock){+.+.}, at: [] afs_begin_vnode_operation+0x33/0x77 [kafs] but task is already holding lock: (&mm->mmap_sem){++++}, at: [] __do_page_fault+0x1ef/0x486 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&mm->mmap_sem){++++}: __might_fault+0x61/0x89 _copy_from_iter_full+0x40/0x1fa rxrpc_send_data+0x8dc/0xff3 rxrpc_do_sendmsg+0x62f/0x6a1 rxrpc_sendmsg+0x166/0x1b7 sock_sendmsg+0x2d/0x39 ___sys_sendmsg+0x1ad/0x22b __sys_sendmsg+0x41/0x62 do_syscall_64+0x89/0x1be return_from_SYSCALL_64+0x0/0x75 -> #2 (&call->user_mutex){+.+.}: __mutex_lock+0x86/0x7d2 rxrpc_new_client_call+0x378/0x80e rxrpc_kernel_begin_call+0xf3/0x154 afs_make_call+0x195/0x454 [kafs] afs_vl_get_capabilities+0x193/0x198 [kafs] afs_vl_lookup_vldb+0x5f/0x151 [kafs] afs_create_volume+0x2e/0x2f4 [kafs] afs_mount+0x56a/0x8d7 [kafs] mount_fs+0x6a/0x109 vfs_kern_mount+0x67/0x135 do_mount+0x90b/0xb57 SyS_mount+0x72/0x98 do_syscall_64+0x89/0x1be return_from_SYSCALL_64+0x0/0x75 -> #1 (k-sk_lock-AF_RXRPC){+.+.}: lock_sock_nested+0x74/0x8a rxrpc_kernel_begin_call+0x8a/0x154 afs_make_call+0x195/0x454 [kafs] afs_fs_get_capabilities+0x17a/0x17f [kafs] afs_probe_fileserver+0xf7/0x2f0 [kafs] afs_select_fileserver+0x83f/0x903 [kafs] afs_fetch_status+0x89/0x11d [kafs] afs_iget+0x16f/0x4f8 [kafs] afs_mount+0x6c6/0x8d7 [kafs] mount_fs+0x6a/0x109 vfs_kern_mount+0x67/0x135 do_mount+0x90b/0xb57 SyS_mount+0x72/0x98 do_syscall_64+0x89/0x1be return_from_SYSCALL_64+0x0/0x75 -> #0 (&vnode->io_lock){+.+.}: lock_acquire+0x174/0x19f __mutex_lock+0x86/0x7d2 afs_begin_vnode_operation+0x33/0x77 [kafs] afs_fetch_data+0x80/0x12a [kafs] afs_readpages+0x314/0x405 [kafs] __do_page_cache_readahead+0x203/0x2ba filemap_fault+0x179/0x54d __do_fault+0x17/0x60 __handle_mm_fault+0x6d7/0x95c handle_mm_fault+0x24e/0x2a3 __do_page_fault+0x301/0x486 do_page_fault+0x236/0x259 page_fault+0x22/0x30 __clear_user+0x3d/0x60 padzero+0x1c/0x2b load_elf_binary+0x785/0xdc7 search_binary_handler+0x81/0x1ff do_execveat_common.isra.14+0x600/0x888 do_execve+0x1f/0x21 SyS_execve+0x28/0x2f do_syscall_64+0x89/0x1be return_from_SYSCALL_64+0x0/0x75 other info that might help us debug this: Chain exists of: &vnode->io_lock --> &call->user_mutex --> &mm->mmap_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mm->mmap_sem); lock(&call->user_mutex); lock(&mm->mmap_sem); lock(&vnode->io_lock); *** DEADLOCK *** 1 lock held by modpost/16701: #0: (&mm->mmap_sem){++++}, at: [] __do_page_fault+0x1ef/0x486 stack backtrace: CPU: 0 PID: 16701 Comm: modpost Tainted: G E 4.14.0-fscache+ #243 Hardware name: ASUS All Series/H97-PLUS, BIOS 2306 10/09/2014 Call Trace: dump_stack+0x67/0x8e print_circular_bug+0x341/0x34f check_prev_add+0x11f/0x5d4 ? add_lock_to_list.isra.12+0x8b/0x8b ? add_lock_to_list.isra.12+0x8b/0x8b ? __lock_acquire+0xf77/0x10b4 __lock_acquire+0xf77/0x10b4 lock_acquire+0x174/0x19f ? afs_begin_vnode_operation+0x33/0x77 [kafs] __mutex_lock+0x86/0x7d2 ? afs_begin_vnode_operation+0x33/0x77 [kafs] ? afs_begin_vnode_operation+0x33/0x77 [kafs] ? afs_begin_vnode_operation+0x33/0x77 [kafs] afs_begin_vnode_operation+0x33/0x77 [kafs] afs_fetch_data+0x80/0x12a [kafs] afs_readpages+0x314/0x405 [kafs] __do_page_cache_readahead+0x203/0x2ba ? filemap_fault+0x179/0x54d filemap_fault+0x179/0x54d __do_fault+0x17/0x60 __handle_mm_fault+0x6d7/0x95c handle_mm_fault+0x24e/0x2a3 __do_page_fault+0x301/0x486 do_page_fault+0x236/0x259 page_fault+0x22/0x30 RIP: 0010:__clear_user+0x3d/0x60 RSP: 0018:ffff880071e93da0 EFLAGS: 00010202 RAX: 0000000000000000 RBX: 000000000000011c RCX: 000000000000011c RDX: 0000000000000000 RSI: 0000000000000008 RDI: 000000000060f720 RBP: 000000000060f720 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: ffff8800b5459b68 R12: ffff8800ce150e00 R13: 000000000060f720 R14: 00000000006127a8 R15: 0000000000000000 padzero+0x1c/0x2b load_elf_binary+0x785/0xdc7 search_binary_handler+0x81/0x1ff do_execveat_common.isra.14+0x600/0x888 do_execve+0x1f/0x21 SyS_execve+0x28/0x2f do_syscall_64+0x89/0x1be entry_SYSCALL64_slow_path+0x25/0x25 RIP: 0033:0x7fdb6009ee07 RSP: 002b:00007fff566d9728 EFLAGS: 00000246 ORIG_RAX: 000000000000003b RAX: ffffffffffffffda RBX: 000055ba57280900 RCX: 00007fdb6009ee07 RDX: 000055ba5727f270 RSI: 000055ba5727cac0 RDI: 000055ba57280900 RBP: 000055ba57280900 R08: 00007fff566d9700 R09: 0000000000000000 R10: 000055ba5727cac0 R11: 0000000000000246 R12: 0000000000000000 R13: 000055ba5727cac0 R14: 000055ba5727f270 R15: 0000000000000000 Signed-off-by: David Howells net/rxrpc/ar-internal.h | 2 +- net/rxrpc/call_accept.c | 2 +- net/rxrpc/call_object.c | 19 +++++++++++++++---- 3 files changed, 17 insertions(+), 6 deletions(-) commit 48ca24636d5a26f1b7b8e69c54bccf19394843e5 Author: David Howells Date: Fri Nov 24 10:18:40 2017 +0000 rxrpc: Don't set upgrade by default in sendmsg() Don't set upgrade by default when creating a call from sendmsg(). This is a holdover from when I was testing the code. Signed-off-by: David Howells net/rxrpc/sendmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03a6c82218b9a87014b2c6c4e178294fdc8ebd8a Author: David Howells Date: Fri Nov 24 10:18:40 2017 +0000 rxrpc: The mutex lock returned by rxrpc_accept_call() needs releasing The caller of rxrpc_accept_call() must release the lock on call->user_mutex returned by that function. Signed-off-by: David Howells net/rxrpc/sendmsg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 53c4ab70c11c3ba1b9e3caa8e8c17e9c16d9cbc0 Author: Martin Schwidefsky Date: Wed Nov 22 17:19:32 2017 +0100 s390: fix alloc_pgste check in init_new_context again git commit badb8bb983e9 "fix alloc_pgste check in init_new_context" fixed the problem of 'current->mm == NULL' in init_new_context back in 2011. git commit 3eabaee998c7 "KVM: s390: allow sie enablement for multi- threaded programs" completely removed the check against alloc_pgste. git commit 23fefe119ceb "s390/kvm: avoid global config of vm.alloc_pgste=1" re-added a check against the alloc_pgste flag but without the required check for current->mm != NULL. For execve() called by a kernel thread init_new_context() reads from ((struct mm_struct *) NULL)->context.alloc_pgste to decide between 2K vs 4K page tables. If the bit happens to be set for the init process it will be created with large page tables. This decision is inherited by all the children of init, this waste quite some memory. Re-add the check for 'current->mm != NULL'. Fixes: 23fefe119ceb ("s390/kvm: avoid global config of vm.alloc_pgste=1") Signed-off-by: Martin Schwidefsky arch/s390/include/asm/mmu_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26f4e759ef9b8a2bab1823d692ed6d56d40b66e3 Author: Vasily Gorbik Date: Thu Nov 23 10:50:23 2017 +0100 s390/disassembler: correct disassembly lines alignment 176.718956 Krnl Code: 00000000004d38b0: a54c0018 llihh %r4,24 176.718956 00000000004d38b4: b9080014 agr %r1,%r4 ^ Using a tab to align disassembly lines which follow the first line with "Krnl Code: " doesn't always work, e.g. if there is a prefix (timestamp or syslog prefix) which is not 8 chars aligned. Go back to alignment with spaces. Fixes: b192571d1ae3 ("s390/disassembler: increase show_code buffer size") Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/kernel/dis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f5fe9fef5b2da06b6319fab8123056da5217c3f Author: Thomas Gleixner Date: Wed Nov 22 13:05:48 2017 +0100 sched/debug: Fix task state recording/printout The recent conversion of the task state recording to use task_state_index() broke the sched_switch tracepoint task state output. task_state_index() returns surprisingly an index (0-7) which is then printed with __print_flags() applying bitmasks. Not really working and resulting in weird states like 'prev_state=t' instead of 'prev_state=I'. Use TASK_REPORT_MAX instead of TASK_STATE_MAX to report preemption. Build a bitmask from the return value of task_state_index() and store it in entry->prev_state, which makes __print_flags() work as expected. Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Steven Rostedt Cc: stable@vger.kernel.org Fixes: efb40f588b43 ("sched/tracing: Fix trace_sched_switch task-state printing") Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1711221304180.1751@nanos Signed-off-by: Ingo Molnar include/trace/events/sched.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 12a78d43de767eaf8fb272facb7a7b6f2dc6a9df Author: Masami Hiramatsu Date: Fri Nov 24 13:56:30 2017 +0900 x86/decoder: Add new TEST instruction pattern The kbuild test robot reported this build warning: Warning: arch/x86/tools/test_get_len found difference at :ffffffff8103dd2c Warning: ffffffff8103dd82: f6 09 d8 testb $0xd8,(%rcx) Warning: objdump says 3 bytes, but insn_get_length() says 2 Warning: decoded and checked 1569014 instructions with 1 warnings This sequence seems to be a new instruction not in the opcode map in the Intel SDM. The instruction sequence is "F6 09 d8", means Group3(F6), MOD(00)REG(001)RM(001), and 0xd8. Intel SDM vol2 A.4 Table A-6 said the table index in the group is "Encoding of Bits 5,4,3 of the ModR/M Byte (bits 2,1,0 in parenthesis)" In that table, opcodes listed by the index REG bits as: 000 001 010 011 100 101 110 111 TEST Ib/Iz,(undefined),NOT,NEG,MUL AL/rAX,IMUL AL/rAX,DIV AL/rAX,IDIV AL/rAX So, it seems TEST Ib is assigned to 001. Add the new pattern. Reported-by: kbuild test robot Signed-off-by: Masami Hiramatsu Cc: Greg Kroah-Hartman Cc: Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/lib/x86-opcode-map.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d3b78bbc6e983fabb3fbf91b76339bf66e4a12c Merge: 36f20ee 9ed3380 Author: Linus Torvalds Date: Thu Nov 23 21:18:46 2017 -1000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix PCI IDs of 9000 series iwlwifi devices, from Luca Coelho. 2) bpf offload bug fixes from Jakub Kicinski. 3) Fix bpf verifier to NOP out code which is dead at run time because due to branch pruning the verifier will not explore such instructions. From Alexei Starovoitov. 4) Fix crash when deleting secondary chains in packet scheduler classifier. From Roman Kapl. 5) Fix buffer management bugs in smc, from Ursula Braun. 6) Fix regression in anycast route handling, from David Ahern. 7) Fix link settings regression in r8169, from Tobias Jakobi. 8) Add back enough UFO support so that live migration still works, from Willem de Bruijn. 9) Linearize enough packet data for the full extent to which the ipvlan code will inspect the packet headers, from Gao Feng. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (46 commits) ipvlan: Fix insufficient skb linear check for ipv6 icmp ipvlan: Fix insufficient skb linear check for arp geneve: only configure or fill UDP_ZERO_CSUM6_RX/TX info when CONFIG_IPV6 net: dsa: bcm_sf2: Clear IDDQ_GLOBAL_PWR bit for PHY net: accept UFO datagrams from tuntap and packet net: realtek: r8169: implement set_link_ksettings() net: ipv6: Fixup device for anycast routes during copy net/smc: Fix preinitialization of buf_desc in __smc_buf_create() net/smc: use sk_rcvbuf as start for rmb creation ipv6: Do not consider linkdown nexthops during multipath net: sched: fix crash when deleting secondary chains net: phy: cortina: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE bpf: fix branch pruning logic bpf: change bpf_perf_event_output arg5 type to ARG_CONST_SIZE_OR_ZERO bpf: change bpf_probe_read_str arg2 type to ARG_CONST_SIZE_OR_ZERO bpf: remove explicit handling of 0 for arg2 in bpf_probe_read bpf: introduce ARG_PTR_TO_MEM_OR_NULL i40evf: Use smp_rmb rather than read_barrier_depends fm10k: Use smp_rmb rather than read_barrier_depends igb: Use smp_rmb rather than read_barrier_depends ... commit 36f20ee24b5dc510389394ed2bd36fbe23f8d962 Merge: 06c9440 c6f9288 Author: Linus Torvalds Date: Thu Nov 23 21:14:30 2017 -1000 Merge tag 'platform-drivers-x86-v4.15-2' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver fixes from Darren Hart: "Fix two issues resulting from the dell-smbios refactoring and introduction of the dell-smbios-wmi dispatcher. The first ensures a proper error code is returned when kzalloc fails. The second avoids an issue in older Dell BIOS implementations which would fail if the more complex calls were made by limiting those platforms to the simple calls such as those used by the existing dell-laptop and dell-wmi drivers, preserving their functionality prior to the addition of the dell-smbios-wmi dispatcher" * tag 'platform-drivers-x86-v4.15-2' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: dell-laptop: fix error return code in dell_init() platform/x86: dell-smbios-wmi: Disable userspace interface if missing hotfix commit 06c944005bc3bfe21fd5706120a2cf8eeee76284 Merge: b64f26c 5ebde46 Author: Linus Torvalds Date: Thu Nov 23 21:12:58 2017 -1000 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two basic fixes: one for the sparse problem with the blacklist flags and another for a hang forever in bnx2i" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: Use 'blist_flags_t' for scsi_devinfo flags scsi: bnx2fc: Fix hung task messages when a cleanup response is not received during abort commit b64f26c62dc6e29d98bd72854ac582bb66113331 Merge: c353bfc 9ceace3 Author: Linus Torvalds Date: Thu Nov 23 21:09:41 2017 -1000 Merge tag 'sound-fix-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "All commits found here are small fixes for regression or stable: - PCM timestamp behavior fix that could be seen as a regression - Remove spurious WARN_ON() from ALSA timer 32bit compat ioctl - HD-audio HDMI/DP channel mapping fix for 32bit archs - Fix the previous fix for HD-audio initialization code - More hardening USB-audio against malicious USB descriptors - HD-audio quirks/fixes (Realtek codec, AMD controller) - Missing help text for the recent Intel SST kconfig change" * tag 'sound-fix-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda: Add Raven PCI ID ALSA: hda/realtek - Fix ALC700 family no sound issue ALSA: hda - Fix yet remaining issue with vmaster 0dB initialization ALSA: usb-audio: Add sanity checks in v2 clock parsers ALSA: usb-audio: Fix potential zero-division at parsing FU ALSA: usb-audio: Fix potential out-of-bound access at parsing SU ALSA: usb-audio: Add sanity checks to FE parser ALSA: timer: Remove kernel warning at compat ioctl error paths ALSA: pcm: update tstamp only if audio_tstamp changed ALSA: hda/realtek: Add headset mic support for Intel NUC Skull Canyon ALSA: hda: Fix too short HDMI/DP chmap reporting ALSA: usb-audio: uac1: Invalidate ctl on interrupt ALSA: hda/realtek - Fix ALC275 no sound issue ASoC: Intel: Add help text for SND_SOC_INTEL_SST_TOPLEVEL commit c353bfc6ebc1073f2f0af72a15f8f18db7193d2e Merge: 1d3bc63 98ecf1a Author: Linus Torvalds Date: Thu Nov 23 21:04:56 2017 -1000 Merge tag 'drm-for-v4.15-part2' of git://people.freedesktop.org/~airlied/linux Pull more drm updates from Dave Airlie: "Fixes/cleanups for rc1, non-desktop flags for VR - remove the MSM dt-bindings file Rob managed to push in the previous pull. - add a property/edid quirk to denote HMD devices, I had these hanging around for a few weeks and Keith had done some work on them, they are fairly self contained and small, and only affect people using HTC Vive VR headsets so far. - amdgpu, tegra, tilcdc, fsl fixes - some imx-drm cleanups I missed, these seemed pretty small, and no reason to hold off. I have one TTM regression fix (fixes bochs-vga in qemu) sitting locally awaiting review I'll probably send that in a separate pull request tomorrow" * tag 'drm-for-v4.15-part2' of git://people.freedesktop.org/~airlied/linux: (33 commits) dt-bindings: remove file that was added accidentally drm/edid: quirk HTC vive headset as non-desktop. [v2] drm/fb: add support for not enabling fbcon on non-desktop displays [v2] drm: add connector info/property for non-desktop displays [v2] drm/amdgpu: fix rmmod KCQ disable failed error drm/amdgpu: fix kernel hang when starting VNC server drm/amdgpu: don't skip attributes when powerplay is enabled drm/amd/pp: fix typecast error in powerplay. drm/tilcdc: Remove obsolete "ti,tilcdc,slave" dts binding support drm/tegra: sor: Reimplement pad clock Revert "drm/radeon: dont switch vt on suspend" drm/amd/amdgpu: fix over-bound accessing in amdgpu_cs_wait_any_fence drm/amd/powerplay: fix unfreeze level smc message for smu7 drm/amdgpu:fix memleak drm/amdgpu:fix memleak in takedown drm/amd/pp: fix dpm randomly failed on Vega10 drm/amdgpu: set f_mapping on exported DMA-bufs drm/amdgpu: Properly allocate VM invalidate eng v2 drm/fsl-dcu: enable IRQ before drm_atomic_helper_resume() drm/fsl-dcu: avoid disabling pixel clock twice on suspend ... commit 1d3bc6363a7d14393e7e66f092645e2229b39954 Merge: dab0bad 3a025e1 Author: Linus Torvalds Date: Thu Nov 23 21:01:32 2017 -1000 Merge tag 'docs-4.15-2' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "A few late-arriving docs updates that have no real reason to wait. There's a new "Co-Developed-by" tag described by Greg, and a build enhancement from Willy to generate docs warnings during a kernel build (but only when additional warnings have been requested in general)" * tag 'docs-4.15-2' of git://git.lwn.net/linux: Add optional check for bad kernel-doc comments Documentation: fix profile= options in kernel-parameters.txt documentation/svga.txt: update outdated file kokr/memory-barriers.txt: Fix typo in paring example kokr/memory-barriers/txt: Replace uses of "transitive" Documentation/process: add Co-Developed-by: tag for patches with multiple authors commit dab0badc8735f4e8bf07bc56bdeefce91d413924 Merge: 26064de ce44cd8 Author: Linus Torvalds Date: Thu Nov 23 20:51:27 2017 -1000 Merge branch 'next-keys' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull keys update from James Morris: "There's nothing too controversial here: - Doc fix for keyctl_read(). - time_t -> time64_t replacement. - Set the module licence on things to prevent tainting" * 'next-keys' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: pkcs7: Set the module licence to prevent tainting security: keys: Replace time_t with time64_t for struct key_preparsed_payload security: keys: Replace time_t/timespec with time64_t KEYS: fix in-kernel documentation for keyctl_read() commit 26064dea2dc65c57d44ad37e645ebe47f1c51828 Merge: 5a78775 feb3c76 Author: Linus Torvalds Date: Thu Nov 23 20:48:26 2017 -1000 Merge tag 'apparmor-pr-2017-11-21' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor Pull apparmor updates from John Johansen: "No features this time, just minor cleanups and bug fixes. Cleanups: - fix spelling mistake: "resoure" -> "resource" - remove unused redundant variable stop - Fix bool initialization/comparison Bug Fixes: - initialized returned struct aa_perms - fix leak of null profile name if profile allocation fails - ensure that undecidable profile attachments fail - fix profile attachment for special unconfined profiles - fix locking when creating a new complain profile. - fix possible recursive lock warning in __aa_create_ns" * tag 'apparmor-pr-2017-11-21' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor: apparmor: fix possible recursive lock warning in __aa_create_ns apparmor: fix locking when creating a new complain profile. apparmor: fix profile attachment for special unconfined profiles apparmor: ensure that undecidable profile attachments fail apparmor: fix leak of null profile name if profile allocation fails apparmor: remove unused redundant variable stop apparmor: Fix bool initialization/comparison apparmor: initialized returned struct aa_perms apparmor: fix spelling mistake: "resoure" -> "resource" commit 2621e945fbf1d6df5f3f0ba7be5bae3d2cf9b6a5 Author: Michael Ellerman Date: Fri Nov 24 14:51:02 2017 +1100 powerpc/kexec: Fix kexec/kdump in P9 guest kernels The code that cleans up the IAMR/AMOR before kexec'ing failed to remember that when we're running as a guest AMOR is not writable, it's hypervisor privileged. They symptom is that the kexec stops before entering purgatory and nothing else is seen on the console. If you examine the state of the system all threads will be in the 0x700 program check handler. Fix it by making the write to AMOR dependent on HV mode. Fixes: 1e2a516e89fc ("powerpc/kexec: Fix radix to hash kexec due to IAMR/AMOR") Cc: stable@vger.kernel.org # v4.10+ Reported-by: Yilin Zhang Debugged-by: David Gibson Signed-off-by: Michael Ellerman Acked-by: Balbir Singh Reviewed-by: David Gibson Tested-by: David Gibson Signed-off-by: Michael Ellerman arch/powerpc/kernel/misc_64.S | 2 ++ 1 file changed, 2 insertions(+) commit 7d2c3f54e6f646887d019faa45f35d6fe9fe82ce Author: Stephan Mueller Date: Fri Nov 10 13:20:55 2017 +0100 crypto: af_alg - remove locking in async callback The code paths protected by the socket-lock do not use or modify the socket in a non-atomic fashion. The actions pertaining the socket do not even need to be handled as an atomic operation. Thus, the socket-lock can be safely ignored. This fixes a bug regarding scheduling in atomic as the callback function may be invoked in interrupt context. In addition, the sock_hold is moved before the AIO encrypt/decrypt operation to ensure that the socket is always present. This avoids a tiny race window where the socket is unprotected and yet used by the AIO operation. Finally, the release of resources for a crypto operation is moved into a common function of af_alg_free_resources. Cc: Fixes: e870456d8e7c8 ("crypto: algif_skcipher - overhaul memory management") Fixes: d887c52d6ae43 ("crypto: algif_aead - overhaul memory management") Reported-by: Romain Izard Signed-off-by: Stephan Mueller Tested-by: Romain Izard Signed-off-by: Herbert Xu crypto/af_alg.c | 21 ++++++++++++++------- crypto/algif_aead.c | 23 ++++++++++++----------- crypto/algif_skcipher.c | 23 ++++++++++++----------- include/crypto/if_alg.h | 1 + 4 files changed, 39 insertions(+), 29 deletions(-) commit 8e1fa89aa8bc2870009b4486644e4a58f2e2a4f5 Author: Stephan Mueller Date: Fri Nov 10 11:04:52 2017 +0100 crypto: algif_aead - skip SGL entries with NULL page The TX SGL may contain SGL entries that are assigned a NULL page. This may happen if a multi-stage AIO operation is performed where the data for each stage is pointed to by one SGL entry. Upon completion of that stage, af_alg_pull_tsgl will assign NULL to the SGL entry. The NULL cipher used to copy the AAD from TX SGL to the destination buffer, however, cannot handle the case where the SGL starts with an SGL entry having a NULL page. Thus, the code needs to advance the start pointer into the SGL to the first non-NULL entry. This fixes a crash visible on Intel x86 32 bit using the libkcapi test suite. Cc: Fixes: 72548b093ee38 ("crypto: algif_aead - copy AAD from src to dst") Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/algif_aead.c | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) commit 3dfbdc44d69b2cd7e382fd084a5c860d2cea24f6 Author: weiping zhang Date: Thu Nov 23 21:40:10 2017 +0800 blk-wbt: fix comments typo Signed-off-by: weiping zhang Signed-off-by: Jens Axboe block/blk-wbt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62d772fa9d86856d828cd24dd8fff5c83275c7e1 Author: weiping zhang Date: Thu Nov 23 21:39:55 2017 +0800 blk-wbt: move wbt_clear_stat to common place in wbt_done wbt_done call wbt_clear_stat no matter current stat was tracked or not, move it to common place. Signed-off-by: weiping zhang Signed-off-by: Jens Axboe block/blk-wbt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f680474345f1fd6329d1806d6358066fd3b07f02 Author: weiping zhang Date: Thu Nov 23 21:39:40 2017 +0800 blk-sysfs: remove NULL pointer checking in queue_wb_lat_store wbt_init doesn't set q->rq_wb to NULL, if wbt_init return 0, so check return value is enough, remove NULL checking. Signed-off-by: weiping zhang Signed-off-by: Jens Axboe block/blk-sysfs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 612ea091fc77770d659b82ea44a1d5646e0af54c Author: weiping zhang Date: Thu Nov 23 21:39:03 2017 +0800 blk-wbt: remove duplicated setting in wbt_init rwb->wc and rwb->queue_depth were overwritten by wbt_set_write_cache and wbt_set_queue_depth, remove the default setting. Signed-off-by: weiping zhang Signed-off-by: Jens Axboe block/blk-wbt.c | 2 -- 1 file changed, 2 deletions(-) commit be597e974c8dd7b169d7b652bcba677dc2c3619f Merge: f341a4d 8c97eec Author: Jens Axboe Date: Thu Nov 23 21:48:22 2017 -0700 Merge branch 'nvme-4.15' of git://git.infradead.org/nvme into for-linus Pull NVMe fixes from Christoph: "A couple nvme fixes for 4.15: - expand the queue ready fix that we only had for RDMA to also cover FC and loop by moving it to common code (Sagi) - fix an array out of bounds in the PCIe HMB code (Minwoo Im) - two new device quirks (Jeff Lien and Kai-Heng Feng) - static checkers fixes (Keith Busch) - FC target refcount fix (James Smart) - A trivial spelling fix in new code (Colin Ian King)" commit c209101fc1c91a318422733a3721ff6a9ff7899f Merge: 0576178 9271c0c Author: Dave Airlie Date: Fri Nov 24 11:33:29 2017 +1000 Merge tag 'drm-misc-fixes-2017-11-20' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 4.15 merge window fixes 1 * tag 'drm-misc-fixes-2017-11-20' of git://anongit.freedesktop.org/drm/drm-misc: drm/edid: Don't send non-zero YQ in AVI infoframe for HDMI 1.x sinks drm/vc4: Account for interrupts in flight commit 0576178f5012f30c5be12905f5628bb597bc91c6 Merge: 0b21871 3572f04 Author: Dave Airlie Date: Fri Nov 24 11:33:12 2017 +1000 Merge tag 'drm-intel-next-fixes-2017-11-23' of git://anongit.freedesktop.org/drm/drm-intel into drm-next drm/i915 fixes for v4.15 * tag 'drm-intel-next-fixes-2017-11-23' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915: Fix init_clock_gating for resume drm/i915: Mark the userptr invalidate workqueue as WQ_MEM_RECLAIM drm/i915: Clear breadcrumb node when cancelling signaling drm/i915/gvt: ensure -ve return value is handled correctly drm/i915: Re-register PMIC bus access notifier on runtime resume drm/i915: Fix false-positive assert_rpm_wakelock_held in i915_pmic_bus_access_notifier v2 commit 0b21871e3d53dbfb22371899afff39af1bae6703 Merge: 33d22c2 b8a3365 Author: Dave Airlie Date: Fri Nov 24 11:32:29 2017 +1000 Merge tag 'drm-misc-next-fixes-2017-11-23' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Fix crtc_id in page_flip event. * tag 'drm-misc-next-fixes-2017-11-23' of git://anongit.freedesktop.org/drm/drm-misc: drm/vblank: Pass crtc_id to page_flip_ioctl. commit 33d22c2ed6dbe1199fc78e84549b1117fd652c01 Author: Dave Airlie Date: Thu Nov 23 12:12:17 2017 +1000 drm/ttm: don't attempt to use hugepages if dma32 requested (v2) The commit below introduced thp support for ttm allocations, however it didn't take into account the case where dma32 was requested. Some drivers always request dma32, and the bochs driver is one of those. This fixes an oops: [ 30.108507] ------------[ cut here ]------------ [ 30.108920] kernel BUG at ./include/linux/gfp.h:408! [ 30.109356] invalid opcode: 0000 [#1] SMP [ 30.109700] Modules linked in: fuse nf_conntrack_netbios_ns nf_conntrack_broadcast xt_CT ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack devlink ip_set nfnetlink ebtable_nat ebtable_broute bridge ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_mangle iptable_raw iptable_security ebtable_filter ebtables ip6table_filter ip6_tables snd_hda_codec_generic kvm_intel kvm snd_hda_intel snd_hda_codec irqbypass ppdev snd_hda_core snd_hwdep snd_seq snd_seq_device snd_pcm bochs_drm ttm joydev drm_kms_helper virtio_balloon snd_timer snd parport_pc drm soundcore parport i2c_piix4 nls_utf8 isofs squashfs zstd_decompress xxhash 8021q garp mrp stp llc virtio_net [ 30.115605] virtio_console virtio_scsi crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel serio_raw virtio_pci virtio_ring virtio ata_generic pata_acpi qemu_fw_cfg sunrpc scsi_transport_iscsi loop [ 30.117425] CPU: 0 PID: 1347 Comm: gnome-shell Not tainted 4.15.0-0.rc0.git6.1.fc28.x86_64 #1 [ 30.118141] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-2.fc27 04/01/2014 [ 30.118866] task: ffff923a77e03380 task.stack: ffffa78182228000 [ 30.119366] RIP: 0010:__alloc_pages_nodemask+0x35e/0x430 [ 30.119810] RSP: 0000:ffffa7818222bba8 EFLAGS: 00010202 [ 30.120250] RAX: 0000000000000001 RBX: 00000000014382c6 RCX: 0000000000000006 [ 30.120840] RDX: 0000000000000000 RSI: 0000000000000009 RDI: 0000000000000000 [ 30.121443] RBP: ffff923a760d6000 R08: 0000000000000000 R09: 0000000000000006 [ 30.122039] R10: 0000000000000040 R11: 0000000000000300 R12: ffff923a729273c0 [ 30.122629] R13: 0000000000000000 R14: 0000000000000000 R15: ffff923a7483d400 [ 30.123223] FS: 00007fe48da7dac0(0000) GS:ffff923a7cc00000(0000) knlGS:0000000000000000 [ 30.123896] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 30.124373] CR2: 00007fe457b73000 CR3: 0000000078313000 CR4: 00000000000006f0 [ 30.124968] Call Trace: [ 30.125186] ttm_pool_populate+0x19b/0x400 [ttm] [ 30.125578] ttm_bo_vm_fault+0x325/0x570 [ttm] [ 30.125964] __do_fault+0x19/0x11e [ 30.126255] __handle_mm_fault+0xcd3/0x1260 [ 30.126609] handle_mm_fault+0x14c/0x310 [ 30.126947] __do_page_fault+0x28c/0x530 [ 30.127282] do_page_fault+0x32/0x270 [ 30.127593] async_page_fault+0x22/0x30 [ 30.127922] RIP: 0033:0x7fe48aae39a8 [ 30.128225] RSP: 002b:00007ffc21c4d928 EFLAGS: 00010206 [ 30.128664] RAX: 00007fe457b73000 RBX: 000055cd4c1041a0 RCX: 00007fe457b73040 [ 30.129259] RDX: 0000000000300000 RSI: 0000000000000000 RDI: 00007fe457b73000 [ 30.129855] RBP: 0000000000000300 R08: 000000000000000c R09: 0000000100000000 [ 30.130457] R10: 0000000000000001 R11: 0000000000000246 R12: 000055cd4c1041a0 [ 30.131054] R13: 000055cd4bdfe990 R14: 000055cd4c104110 R15: 0000000000000400 [ 30.131648] Code: 11 01 00 0f 84 a9 00 00 00 65 ff 0d 6d cc dd 44 e9 0f ff ff ff 40 80 cd 80 e9 99 fe ff ff 48 89 c7 e8 e7 f6 01 00 e9 b7 fe ff ff <0f> 0b 0f ff e9 40 fd ff ff 65 48 8b 04 25 80 d5 00 00 8b 40 4c [ 30.133245] RIP: __alloc_pages_nodemask+0x35e/0x430 RSP: ffffa7818222bba8 [ 30.133836] ---[ end trace d4f1deb60784f40a ]--- v2: handle free path as well. Reported-by: Laura Abbott Reported-by: Adam Williamson Fixes: 0284f1ead87463bc17cf5e81a24fc65c052486f3 (drm/ttm: add transparent huge page support for cached allocations v2) Reviewed-by: Christian König Signed-off-by: Dave Airlie drivers/gpu/drm/ttm/ttm_page_alloc.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit ce44cd8dfc55110fa7423ceb47a8a70dac65fe89 Merge: 5a78775 1e684d3 Author: James Morris Date: Fri Nov 24 11:54:11 2017 +1100 Merge tag 'keys-next-20171123' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into next-keys Merge keys subsystem changes from David Howells, for v4.15. commit fd2fa6c18b729e19c51240453a521f76c766247e Author: Bjorn Helgaas Date: Wed Nov 22 16:13:37 2017 -0600 x86/PCI: Remove unused HyperTransport interrupt support There are no in-tree callers of ht_create_irq(), the driver interface for HyperTransport interrupts, left. Remove the unused entry point and all the supporting code. See 8b955b0dddb3 ("[PATCH] Initial generic hypertransport interrupt support"). Signed-off-by: Bjorn Helgaas Signed-off-by: Thomas Gleixner Acked-by: "Eric W. Biederman" Cc: Andi Kleen Cc: Greg Kroah-Hartman Cc: linux-pci@vger.kernel.org Cc: Benjamin Herrenschmidt Link: https://lkml.kernel.org/r/20171122221337.3877.23362.stgit@bhelgaas-glaptop.roam.corp.google.com arch/x86/include/asm/hw_irq.h | 8 -- arch/x86/include/asm/hypertransport.h | 46 -------- arch/x86/include/asm/irqdomain.h | 6 -- arch/x86/kernel/apic/Makefile | 1 - arch/x86/kernel/apic/htirq.c | 198 ---------------------------------- arch/x86/kernel/apic/vector.c | 5 +- drivers/pci/Kconfig | 9 -- drivers/pci/Makefile | 3 - drivers/pci/htirq.c | 135 ----------------------- include/linux/htirq.h | 39 ------- include/linux/pci.h | 6 -- 11 files changed, 2 insertions(+), 454 deletions(-) commit e2a5dca753d1cdc3212519023ed8a13e13f5495b Author: Borislav Petkov Date: Thu Nov 23 10:19:51 2017 +0100 x86/umip: Fix insn_get_code_seg_params()'s return value In order to save on redundant structs definitions insn_get_code_seg_params() was made to return two 4-bit values in a char but clang complains: arch/x86/lib/insn-eval.c:780:10: warning: implicit conversion from 'int' to 'char' changes value from 132 to -124 [-Wconstant-conversion] return INSN_CODE_SEG_PARAMS(4, 8); ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~ ./arch/x86/include/asm/insn-eval.h:16:57: note: expanded from macro 'INSN_CODE_SEG_PARAMS' #define INSN_CODE_SEG_PARAMS(oper_sz, addr_sz) (oper_sz | (addr_sz << 4)) Those two values do get picked apart afterwards the opposite way of how they were ORed so wrt to the LSByte, the return value is the same. But this function returns -EINVAL in the error case, which is an int. So make it return an int which is the native word size anyway and thus fix the clang warning. Reported-by: Kees Cook Reported-by: Nick Desaulniers Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Cc: ricardo.neri-calderon@linux.intel.com Link: https://lkml.kernel.org/r/20171123091951.1462-1-bp@alien8.de arch/x86/include/asm/insn-eval.h | 2 +- arch/x86/kernel/umip.c | 2 +- arch/x86/lib/insn-eval.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 69550d41ff9c884c6d996fca41037974b2255852 Author: Chao Fan Date: Thu Nov 23 17:08:47 2017 +0800 x86/boot/KASLR: Remove unused variable There are two variables "rc" in mem_avoid_memmap. One at the top of the function and another one inside the while() loop. Drop the outer one as it is unused. Cleanup some whitespace damage while at it. Signed-off-by: Chao Fan Signed-off-by: Thomas Gleixner Cc: gregkh@linuxfoundation.org Cc: n-horiguchi@ah.jp.nec.com Cc: keescook@chromium.org Link: https://lkml.kernel.org/r/20171123090847.15293-1-fanc.fnst@cn.fujitsu.com arch/x86/boot/compressed/kaslr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 75f1133873d6a1276d3c19918b7c94975840f990 Author: Kees Cook Date: Wed Nov 22 12:56:45 2017 -0800 genirq/matrix: Make - vs ?: Precedence explicit Noticed with a Clang build. This improves the readability of the ?: expression, as it has lower precedence than the - expression. Show explicitly that - is evaluated first. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20171122205645.GA27125@beast kernel/irq/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 328bf1b29c3741de3c55f2b2e5179d18f16ba9c1 Author: Vasyl Gomonovych Date: Mon Nov 20 23:02:41 2017 +0100 irqchip/imgpdc: Use resource_size function on resource object drivers/irqchip/irq-imgpdc.c:327:20-23: WARNING: Suspicious code. resource_size is maybe missing with res_regs Generated by: scripts/coccinelle/api/resource_size.cocci Signed-off-by: Vasyl Gomonovych Signed-off-by: Thomas Gleixner Cc: marc.zyngier@arm.com Cc: jason@lakedaemon.net Link: https://lkml.kernel.org/r/1511215361-8279-1-git-send-email-gomonovych@gmail.com drivers/irqchip/irq-imgpdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e9990d70e8a063a7b894c5cbb99f630a0f41200d Author: Colin Ian King Date: Fri Nov 17 18:35:53 2017 +0000 irqchip/qcom: Fix u32 comparison with value less than zero The comparison of u32 nregs being less than zero is never true since nregs is unsigned. Fix this by making nregs a signed integer. Fixes: f20cc9b00c7b ("irqchip/qcom: Add IRQ combiner driver") Signed-off-by: Colin Ian King Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Cc: kernel-janitors@vger.kernel.org Cc: Jason Cooper Link: https://lkml.kernel.org/r/20171117183553.2739-1-colin.king@canonical.com drivers/irqchip/qcom-irq-combiner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ed33805cdf81eadcc6ef54a81a8448e80e19f54 Merge: f9094b7 747a713 Author: David S. Miller Date: Fri Nov 24 03:37:03 2017 +0900 Merge branch 'ipvlan-Fix-insufficient-skb-linear-check' Gao Feng says: ==================== ipvlan: Fix insufficient skb linear check The current ipvlan codes use pskb_may_pull to get the skb linear header in func ipvlan_get_L3_hdr, but the size isn't enough for arp and ipv6 icmp. So it may access the unexpected momory in ipvlan_addr_lookup. ==================== Signed-off-by: David S. Miller commit 747a713502e1dfdf0e93bc81ee0f5ec7510975e5 Author: Gao Feng Date: Thu Nov 23 11:47:12 2017 +0800 ipvlan: Fix insufficient skb linear check for ipv6 icmp In the function ipvlan_get_L3_hdr, current codes use pskb_may_pull to make sure the skb header has enough linear room for ipv6 header. But it would use the latter memory directly without linear check when it is icmp. So it still may access the unepxected memory in ipvlan_addr_lookup. Now invoke the pskb_may_pull again if it is ipv6 icmp. Signed-off-by: Gao Feng Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_core.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 5fc9220a6719574b37813d4330cc5c1ffe6d5c16 Author: Gao Feng Date: Thu Nov 23 11:47:11 2017 +0800 ipvlan: Fix insufficient skb linear check for arp In the function ipvlan_get_L3_hdr, current codes use pskb_may_pull to make sure the skb header has enough linear room for arp header. But it would access the arp payload in func ipvlan_addr_lookup. So it still may access the unepxected memory. Now use arp_hdr_len(port->dev) instead of the arp header as the param. Signed-off-by: Gao Feng Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit f9094b7603c011d27db7ba109e69881c72fa611d Author: Hangbin Liu Date: Thu Nov 23 11:27:24 2017 +0800 geneve: only configure or fill UDP_ZERO_CSUM6_RX/TX info when CONFIG_IPV6 Stefano pointed that configure or show UDP_ZERO_CSUM6_RX/TX info doesn't make sense if we haven't enabled CONFIG_IPV6. Fix it by adding if IS_ENABLED(CONFIG_IPV6) check. Fixes: abe492b4f50c ("geneve: UDP checksum configuration via netlink") Fixes: fd7eafd02121 ("geneve: fix fill_info when link down") Signed-off-by: Hangbin Liu Reviewed-by: Stefano Brivio Signed-off-by: David S. Miller drivers/net/geneve.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit d6efab626c886acd070d9aabe39bc61e8c5a75f7 Merge: 003cd77 ed59b7d Author: David S. Miller Date: Fri Nov 24 03:06:42 2017 +0900 Merge tag 'wireless-drivers-for-davem-2017-11-22' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.15 First set of fixes for 4.15. Most important here is the iwlwifi fix for scan command firmware interface change. ath10k * fix CCMP-256, GCMP and GCMP-256 in raw mode, it was never working wcn36xx * fix device tree node search iwlwifi * fix a regression with firmware API change of scan cmd (introduced in firmware version 34) * add a bunch of PCI IDs and fix configuration structs for A000 devices * fix the exported firmware name strings for 9000 and A000 devices ==================== Signed-off-by: David S. Miller commit 003cd77027f13cdcd745e4429c7d1370eb57e09f Merge: 4b52d01 f72271e Author: David S. Miller Date: Fri Nov 24 02:53:38 2017 +0900 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Fixes 2017-11-21 This series contains fixes for igb/vf, ixgbe/vf, i40e/vf and fm10k. Jake fixes a regression issue with older firmware, where we were using the NVM lock to synchronize NVM reads for all devices and firmware versions, yet this caused issues with older firmware prior to version 1.5. Fixed this by only grabbing the lock for newer devices and firmware version 1.5 or newer. Zijie Pan fixes the calculation of the i40e VF MAC addresses, where it was possible to increment to the next MAC entry without calling i40e_add_mac_filter(). Amritha removes the upper limit of 64 queues on a channel VSI since the upper bound is determined by the VSI's num_queue_pairs. Filip fixes an issue during FLR resets, where should have been checking for upcoming core reset and if so, just return with I40E_ERR_NOT_READY. Alan fixes the notifying clients of l2 parameters by copying the parameters to the client instance struct and re-organizes the priority in which the client tasks fire so that if the flag for notifying l2 params is set, it will trigger before the client open task. Also fixed the promiscuous settings after reset for all the VSI's. Brian King from IBM fixes an issue seen on Power systems which would result in skb list corruption and eventual kernel oops. Brian provides the same fix for nearly all our drivers, to replace the read_barrier_depends with smp_rmb() to ensure loads are ordered with respect to the load of tx_buffer->next_to_watch. ==================== Signed-off-by: David S. Miller commit 4b52d010113e11006a389f2a8315167ede9e0b10 Author: Florian Fainelli Date: Tue Nov 21 17:37:46 2017 -0800 net: dsa: bcm_sf2: Clear IDDQ_GLOBAL_PWR bit for PHY The PHY on BCM7278 has an additional bit that needs to be cleared: IDDQ_GLOBAL_PWR, without doing this, the PHY remains stuck in reset out of suspend/resume cycles. Fixes: 0fe9933804eb ("net: dsa: bcm_sf2: Add support for BCM7278 integrated switch") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4be7baba81a816bdf778804508b43fa92c6446d Merge: 0c19f846 c131187 Author: David S. Miller Date: Fri Nov 24 02:33:01 2017 +0900 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2017-11-23 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Several BPF offloading fixes, from Jakub. Among others: - Limit offload to cls_bpf and XDP program types only. - Move device validation into the driver and don't make any assumptions about the device in the classifier due to shared blocks semantics. - Don't pass offloaded XDP program into the driver when it should be run in native XDP instead. Offloaded ones are not JITed for the host in such cases. - Don't destroy device offload state when moved to another namespace. - Revert dumping offload info into user space for now, since ifindex alone is not sufficient. This will be redone properly for bpf-next tree. 2) Fix test_verifier to avoid using bpf_probe_write_user() helper in test cases, since it's dumping a warning into kernel log which may confuse users when only running tests. Switch to use bpf_trace_printk() instead, from Yonghong. 3) Several fixes for correcting ARG_CONST_SIZE_OR_ZERO semantics before it becomes uabi, from Gianluca. More specifically: - Add a type ARG_PTR_TO_MEM_OR_NULL that is used only by bpf_csum_diff(), where the argument is either a valid pointer or NULL. The subsequent ARG_CONST_SIZE_OR_ZERO then enforces a valid pointer in case of non-0 size or a valid pointer or NULL in case of size 0. Given that, the semantics for ARG_PTR_TO_MEM in combination with ARG_CONST_SIZE_OR_ZERO are now such that in case of size 0, the pointer must always be valid and cannot be NULL. This fix in semantics allows for bpf_probe_read() to drop the recently added size == 0 check in the helper that would become part of uabi otherwise once released. At the same time we can then fix bpf_probe_read_str() and bpf_perf_event_output() to use ARG_CONST_SIZE_OR_ZERO instead of ARG_CONST_SIZE in order to fix recently reported issues by Arnaldo et al, where LLVM optimizes two boundary checks into a single one for unknown variables where the verifier looses track of the variable bounds and thus rejects valid programs otherwise. 4) A fix for the verifier for the case when it detects comparison of two constants where the branch is guaranteed to not be taken at runtime. Verifier will rightfully prune the exploration of such paths, but we still pass the program to JITs, where they would complain about using reserved fields, etc. Track such dead instructions and sanitize them with mov r0,r0. Rejection is not possible since LLVM may generate them for valid C code and doesn't do as much data flow analysis as verifier. For bpf-next we might implement removal of such dead code and adjust branches instead. Fix from Alexei. ==================== Signed-off-by: David S. Miller commit 0c19f846d582af919db66a5914a0189f9f92c936 Author: Willem de Bruijn Date: Tue Nov 21 10:22:25 2017 -0500 net: accept UFO datagrams from tuntap and packet Tuntap and similar devices can inject GSO packets. Accept type VIRTIO_NET_HDR_GSO_UDP, even though not generating UFO natively. Processes are expected to use feature negotiation such as TUNSETOFFLOAD to detect supported offload types and refrain from injecting other packets. This process breaks down with live migration: guest kernels do not renegotiate flags, so destination hosts need to expose all features that the source host does. Partially revert the UFO removal from 182e0b6b5846~1..d9d30adf5677. This patch introduces nearly(*) no new code to simplify verification. It brings back verbatim tuntap UFO negotiation, VIRTIO_NET_HDR_GSO_UDP insertion and software UFO segmentation. It does not reinstate protocol stack support, hardware offload (NETIF_F_UFO), SKB_GSO_UDP tunneling in SKB_GSO_SOFTWARE or reception of VIRTIO_NET_HDR_GSO_UDP packets in tuntap. To support SKB_GSO_UDP reappearing in the stack, also reinstate logic in act_csum and openvswitch. Achieve equivalence with v4.13 HEAD by squashing in commit 939912216fa8 ("net: skb_needs_check() removes CHECKSUM_UNNECESSARY check for tx.") and reverting commit 8d63bee643f1 ("net: avoid skb_warn_bad_offload false positives on UFO"). (*) To avoid having to bring back skb_shinfo(skb)->ip6_frag_id, ipv6_proxy_select_ident is changed to return a __be32 and this is assigned directly to the frag_hdr. Also, SKB_GSO_UDP is inserted at the end of the enum to minimize code churn. Tested Booted a v4.13 guest kernel with QEMU. On a host kernel before this patch `ethtool -k eth0` shows UFO disabled. After the patch, it is enabled, same as on a v4.13 host kernel. A UFO packet sent from the guest appears on the tap device: host: nc -l -p -u 8000 & tcpdump -n -i tap0 guest: dd if=/dev/zero of=payload.txt bs=1 count=2000 nc -u 192.16.1.1 8000 < payload.txt Direct tap to tap transmission of VIRTIO_NET_HDR_GSO_UDP succeeds, packets arriving fragmented: ./with_tap_pair.sh ./tap_send_ufo tap0 tap1 (from https://github.com/wdebruij/kerneltools/tree/master/tests) Changes v1 -> v2 - simplified set_offload change (review comment) - documented test procedure Link: http://lkml.kernel.org/r/ Fixes: fb652fdfe837 ("macvlan/macvtap: Remove NETIF_F_UFO advertisement.") Reported-by: Michal Kubecek Signed-off-by: Willem de Bruijn Acked-by: Jason Wang Signed-off-by: David S. Miller drivers/net/tap.c | 2 +- drivers/net/tun.c | 2 + include/linux/netdev_features.h | 4 +- include/linux/netdevice.h | 1 + include/linux/skbuff.h | 2 + include/linux/virtio_net.h | 5 ++- include/net/ipv6.h | 1 + net/core/dev.c | 3 +- net/ipv4/af_inet.c | 12 +++++- net/ipv4/udp_offload.c | 49 ++++++++++++++++++++++-- net/ipv6/output_core.c | 31 +++++++++++++++ net/ipv6/udp_offload.c | 85 +++++++++++++++++++++++++++++++++++++++-- net/openvswitch/datapath.c | 14 +++++++ net/openvswitch/flow.c | 6 ++- net/sched/act_csum.c | 6 +++ 15 files changed, 209 insertions(+), 14 deletions(-) commit 9e77d7a5549dc4d4999a60676373ab3fd1dae4db Author: Tobias Jakobi Date: Tue Nov 21 16:15:57 2017 +0100 net: realtek: r8169: implement set_link_ksettings() Commit 6fa1ba61520576cf1346c4ff09a056f2950cb3bf partially implemented the new ethtool API, by replacing get_settings() with get_link_ksettings(). This breaks ethtool, since the userspace tool (according to the new API specs) never tries the legacy set() call, when the new get() call succeeds. All attempts to chance some setting from userspace result in: > Cannot set new settings: Operation not supported Implement the missing set() call. Signed-off-by: Tobias Jakobi Tested-by: Holger Hoffstätte Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 38 +++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 16 deletions(-) commit 98d11291d189cb5adf49694d0ad1b971c0212697 Author: David Ahern Date: Tue Nov 21 07:08:57 2017 -0800 net: ipv6: Fixup device for anycast routes during copy Florian reported a breakage with anycast routes due to commit 4832c30d5458 ("net: ipv6: put host and anycast routes on device with address"). Prior to this commit anycast routes were added against the loopback device causing repetitive route entries with no insight into why they existed. e.g.: $ ip -6 ro ls table local type anycast anycast 2001:db8:1:: dev lo proto kernel metric 0 pref medium anycast 2001:db8:2:: dev lo proto kernel metric 0 pref medium anycast fe80:: dev lo proto kernel metric 0 pref medium anycast fe80:: dev lo proto kernel metric 0 pref medium The point of commit 4832c30d5458 is to add the routes using the device with the address which is causing the route to be added. e.g.,: $ ip -6 ro ls table local type anycast anycast 2001:db8:1:: dev eth1 proto kernel metric 0 pref medium anycast 2001:db8:2:: dev eth2 proto kernel metric 0 pref medium anycast fe80:: dev eth2 proto kernel metric 0 pref medium anycast fe80:: dev eth1 proto kernel metric 0 pref medium For traffic to work as it did before, the dst device needs to be switched to the loopback when the copy is created similar to local routes. Fixes: 4832c30d5458 ("net: ipv6: put host and anycast routes on device with address") Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9477fef4b653808d47243e06fa83b8b8aa36944f Merge: bbfcd77 6887037 Author: David S. Miller Date: Fri Nov 24 01:33:34 2017 +0900 Merge branch 'smc-fixes-for-smc-buffer-handling' Ursula Braun says: ==================== net/smc: fixes for smc buffer handling here are 2 cleanup patches for smc buffer handling. ==================== Signed-off-by: David S. Miller commit 688703702584dd513b50001bd1eb068655631e9b Author: Geert Uytterhoeven Date: Tue Nov 21 13:23:54 2017 +0100 net/smc: Fix preinitialization of buf_desc in __smc_buf_create() With gcc-4.1.2: net/smc/smc_core.c: In function ‘__smc_buf_create’: net/smc/smc_core.c:567: warning: ‘bufsize’ may be used uninitialized in this function Indeed, if the for-loop is never executed, bufsize is used uninitialized. In addition, buf_desc is stored for later use, while it is still a NULL pointer. Before, error handling was done by checking if buf_desc is non-NULL. The cleanup changed this to an error check, but forgot to update the preinitialization of buf_desc to an error pointer. Update the preinitializatin of buf_desc to fix this. Fixes: b33982c3a6838d13 ("net/smc: cleanup function __smc_buf_create()") Signed-off-by: Geert Uytterhoeven Signed-off-by: Ursula Braun Acked-by: Arnd Bergmann Signed-off-by: David S. Miller net/smc/smc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e1061f4a2bba1669c7297455c73ddafbebf2b12 Author: Ursula Braun Date: Tue Nov 21 13:23:53 2017 +0100 net/smc: use sk_rcvbuf as start for rmb creation Commit 3e034725c0d8 ("net/smc: common functions for RMBs and send buffers") merged handling of SMC receive and send buffers. It introduced sk_buf_size as merged start value for size determination. But since sk_buf_size is not used at all, sk_sndbuf is erroneously used as start for rmb creation. This patch makes sure, sk_buf_size is really used as intended, and sk_rcvbuf is used as start value for rmb creation. Fixes: 3e034725c0d8 ("net/smc: common functions for RMBs and send buffers") Signed-off-by: Ursula Braun Reviewed-by: Hans Wippel Signed-off-by: David S. Miller net/smc/smc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbfcd77631573ac4a9f57eb6169e04256a111bc1 Author: Ido Schimmel Date: Tue Nov 21 09:50:12 2017 +0200 ipv6: Do not consider linkdown nexthops during multipath When the 'ignore_routes_with_linkdown' sysctl is set, we should not consider linkdown nexthops during route lookup. While the code correctly verifies that the initially selected route ('match') has a carrier, it does not perform the same check in the subsequent multipath selection, resulting in a potential packet loss. In case the chosen route does not have a carrier and the sysctl is set, choose the initially selected route. Fixes: 35103d11173b ("net: ipv6 sysctl option to ignore routes when nexthop link is down") Signed-off-by: Ido Schimmel Acked-by: David Ahern Acked-by: Andy Gospodarek Signed-off-by: David S. Miller net/ipv6/route.c | 5 +++++ 1 file changed, 5 insertions(+) commit d7aa04a5e82b4f254d306926c81eae8df69e5200 Author: Roman Kapl Date: Mon Nov 20 22:21:13 2017 +0100 net: sched: fix crash when deleting secondary chains If you flush (delete) a filter chain other than chain 0 (such as when deleting the device), the kernel may run into a use-after-free. The chain refcount must not be decremented unless we are sure we are done with the chain. To reproduce the bug, run: ip link add dtest type dummy tc qdisc add dev dtest ingress tc filter add dev dtest chain 1 parent ffff: flower ip link del dtest Introduced in: commit f93e1cdcf42c ("net/sched: fix filter flushing"), but unless you have KAsan or luck, you won't notice it until commit 0dadc117ac8b ("cls_flower: use tcf_exts_get_net() before call_rcu()") Fixes: f93e1cdcf42c ("net/sched: fix filter flushing") Acked-by: Jiri Pirko Signed-off-by: Roman Kapl Signed-off-by: David S. Miller net/sched/cls_api.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0cc03504c9f1b9c9da819094db37507c69ee9145 Author: Jesse Chan Date: Mon Nov 20 12:57:42 2017 -0800 net: phy: cortina: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE This change resolves a new compile-time warning when built as a loadable module: WARNING: modpost: missing MODULE_LICENSE() in drivers/net/phy/cortina.o see include/linux/module.h for more information This adds the license as "GPL", which matches the header of the file. MODULE_DESCRIPTION and MODULE_AUTHOR are also added. Signed-off-by: Jesse Chan Signed-off-by: David S. Miller drivers/net/phy/cortina.c | 4 ++++ 1 file changed, 4 insertions(+) commit 866c9b94ef968445c52214b3748ecc52a8491bca Merge: aea3706 841b86f Author: Thomas Gleixner Date: Thu Nov 23 16:29:05 2017 +0100 Merge tag 'for-linus-timers-conversion-final-v4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into timers/urgent Pull the last batch of manual timer conversions from Kees Cook: - final batch of "non trivial" timer conversions (multi-tree dependencies, things Coccinelle couldn't handle, etc). - treewide conversions via Coccinelle, in 4 steps: - DEFINE_TIMER() functions converted to struct timer_list * argument - init_timer() -> setup_timer() - setup_timer() -> timer_setup() - setup_timer() -> timer_setup() (with a single embedded structure) - deprecated timer API removals (init_timer(), setup_*timer()) - finalization of new API (remove global casts) commit 10aaa3b7e95b9649fd658ac7e9075093316425d8 Author: Masahiro Yamada Date: Thu Nov 23 23:25:26 2017 +0900 kbuild: drop $(extra-y) from real-objs-y $(real-objs-y) in only used in scripts/Makefile.build to form "targets", but $(extra-y) is added to "targets" in another line. We do not need to add $(extra-y) twice. Signed-off-by: Masahiro Yamada scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef46d9b3dc01d49a060a56337466832c4f1f1792 Author: Masahiro Yamada Date: Fri Nov 17 01:49:13 2017 +0900 kbuild: clean up *.i and *.lst patterns by make clean *.i and *.lst are supported by the single target build. Clean up them. Signed-off-by: Masahiro Yamada Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ebaad7d36406d951159f43038a843edece1b7877 Author: Masahiro Yamada Date: Wed Nov 15 18:19:20 2017 +0900 kbuild: rpm: prompt to use "rpm-pkg" if "rpm" target is used The "rpm" has been kept for backward compatibility since pre-git era. I am planning to remove it after the Linux 4.18 release. Annouce the end of the support, prompting to use "rpm-pkg" instead. If you use "rpm", it will work like "rpm-pkg", but warning messages will be displayed as follows: WARNING: "rpm" target will be removed after Linux 4.18 Please use "rpm-pkg" instead. Signed-off-by: Masahiro Yamada Makefile | 5 +++-- scripts/package/Makefile | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit 2dbc644ac62bbcb9ee78e84719953f611be0413d Author: Masahiro Yamada Date: Wed Nov 15 18:17:07 2017 +0900 kbuild: pkg: use --transform option to prefix paths in tar For rpm-pkg and deb-pkg, a source tar file is created. All paths in the archive must be prefixed with the base name of the tar so that everything is contained in the directory when you extract it. Currently, scripts/package/Makefile uses a symlink for that, and removes it after the tar is created. If you terminate the build during the tar creation, the symlink is left over. Then, at the next package build, you will see a warning like follows: ln: '.' and 'kernel-4.14.0+/.' are the same file It is possible to fix it by adding -n (--no-dereference) option to the "ln" command, but a cleaner way is to use --transform option of "tar" command. This option is GNU extension, but it should not hurt to use it in the Linux build system. The 'S' flag is needed to exclude symlinks from the path fixup. Without it, symlinks in the kernel are broken. Signed-off-by: Masahiro Yamada scripts/package/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d7059ca0147adcd495f3c5b41f260e1ac55bb679 Author: Masahiro Yamada Date: Tue Nov 14 20:38:07 2017 +0900 coccinelle: fix parallel build with CHECK=scripts/coccicheck The command "make -j8 C=1 CHECK=scripts/coccicheck" produces lots of "coccicheck failed" error messages. Julia Lawall explained the Coccinelle behavior as follows: "The problem on the Coccinelle side is that it uses a subdirectory with the name of the semantic patch to store standard output and standard error for the different threads. I didn't want to use a name with the pid, so that one could easily find this information while Coccinelle is running. Normally the subdirectory is cleaned up when Coccinelle completes, so there is only one of them at a time. Maybe it is best to just add the pid. There is the risk that these subdirectories will accumulate if Coccinelle crashes in a way such that they don't get cleaned up, but Coccinelle could print a warning if it detects this case, rather than failing." When scripts/coccicheck is used as CHECK tool and -j option is given to Make, the whole of build process runs in parallel. So, multiple processes try to get access to the same subdirectory. I notice spatch creates the subdirectory only when it runs in parallel (i.e. --jobs is given and is greater than 1). Setting NPROC=1 is a reasonable solution; spatch does not create the subdirectory. Besides, ONLINE=1 mode takes a single file input for each spatch invocation, so there is no reason to parallelize it in the first place. Signed-off-by: Masahiro Yamada Acked-by: Julia Lawall scripts/coccicheck | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 88127dae6ed9d6aa938e9cf1776dc90b897fc1f7 Author: Heinrich Schuchardt Date: Wed Nov 8 22:09:59 2017 +0100 kconfig/symbol.c: use correct pointer type argument for sizeof sym_arr is of type struct symbol **. So in malloc we need sizeof(struct symbol *). The problem was indicated by coccinelle. Signed-off-by: Heinrich Schuchardt Signed-off-by: Masahiro Yamada scripts/kconfig/symbol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52884f8f66c893e92a73787b5bef32b2ef52e1bc Author: Bjorn Andersson Date: Mon Nov 20 11:56:47 2017 -0800 mmc: sdhci-msm: Optionally wait for signal level changes Not all instances of the SDCC core supports changing signal voltage and as such will not generate a power interrupt when the software attempts to change the voltage. This results in probing the eMMC on some devices to take over 2 minutes. Check that the SWITCHABLE_SIGNALING_VOLTAGE bit in MCI_GENERICS is set before waiting for the power interrupt. Cc: Sahitya Tummala Cc: Vijay Viswanath Fixes: c0309b3803fe ("mmc: sdhci-msm: Add sdhci msm register write APIs which wait for pwr irq") Signed-off-by: Bjorn Andersson Tested-by: Luca Weiss Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit f9f0da98819503b06b35e61869d18cf3a8cd3323 Author: Adrian Hunter Date: Tue Nov 21 15:42:30 2017 +0200 mmc: block: Ensure that debugfs files are removed The card is not necessarily being removed, but the debugfs files must be removed when the driver is removed, otherwise they will continue to exist after unbinding the card from the driver. e.g. # echo "mmc1:0001" > /sys/bus/mmc/drivers/mmcblk/unbind # cat /sys/kernel/debug/mmc1/mmc1\:0001/ext_csd [ 173.634584] BUG: unable to handle kernel NULL pointer dereference at 0000000000000050 [ 173.643356] IP: mmc_ext_csd_open+0x5e/0x170 A complication is that the debugfs_root may have already been removed, so check for that too. Fixes: 627c3ccfb46a ("mmc: debugfs: Move block debugfs into block module") Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Cc: stable@vger.kernel.org # 4.14+ Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 44 +++++++++++++++++++++++++++++++++++++------- drivers/mmc/core/debugfs.c | 1 + 2 files changed, 38 insertions(+), 7 deletions(-) commit ebe7dd45cf49e3b49cacbaace17f9f878f21fbea Author: Adrian Hunter Date: Tue Nov 21 15:42:29 2017 +0200 mmc: core: Do not leave the block driver in a suspended state The block driver must be resumed if the mmc bus fails to suspend the card. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Cc: stable@vger.kernel.org # v3.19+ Signed-off-by: Ulf Hansson drivers/mmc/core/bus.c | 3 +++ 1 file changed, 3 insertions(+) commit fb8e456e547ed2c699f64665bd8a3b9bde7b9728 Author: Adrian Hunter Date: Tue Nov 21 15:42:28 2017 +0200 mmc: block: Check return value of blk_get_request() blk_get_request() can fail, always check the return value. Fixes: 0493f6fe5bde ("mmc: block: Move boot partition locking into a driver op") Fixes: 3ecd8cf23f88 ("mmc: block: move multi-ioctl() to use block layer") Fixes: 614f0388f580 ("mmc: block: move single ioctl() commands to block requests") Fixes: 627c3ccfb46a ("mmc: debugfs: Move block debugfs into block module") Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Cc: stable@vger.kernel.org # 4.13+ Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 34c089e806793a66e450b11bd167db6047399fcd Author: Adrian Hunter Date: Tue Nov 21 15:42:27 2017 +0200 mmc: block: Fix missing blk_put_request() Ensure blk_get_request() is paired with blk_put_request(). Fixes: 0493f6fe5bde ("mmc: block: Move boot partition locking into a driver op") Fixes: 627c3ccfb46a ("mmc: debugfs: Move block debugfs into block module") Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Cc: stable@vger.kernel.org # 4.13+ Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 3 +++ 1 file changed, 3 insertions(+) commit a3961f824cdbe7eb431254dc7d8f6f6767f474aa Author: Mahesh Salgaonkar Date: Wed Nov 22 23:02:07 2017 +0530 powerpc/powernv: Fix kexec crashes caused by tlbie tracing Rebooting into a new kernel with kexec fails in trace_tlbie() which is called from native_hpte_clear(). This happens if the running kernel has CONFIG_LOCKDEP enabled. With lockdep enabled, the tracepoints always execute few RCU checks regardless of whether tracing is on or off. We are already in the last phase of kexec sequence in real mode with HILE_BE set. At this point the RCU check ends up in RCU_LOCKDEP_WARN and causes kexec to fail. Fix this by not calling trace_tlbie() from native_hpte_clear(). mpe: It's not safe to call trace points at this point in the kexec path, even if we could avoid the RCU checks/warnings. The only solution is to not call them. Fixes: 0428491cba92 ("powerpc/mm: Trace tlbie(l) instructions") Cc: stable@vger.kernel.org # v4.13+ Signed-off-by: Mahesh Salgaonkar Reported-by: Aneesh Kumar K.V Suggested-by: Michael Ellerman Acked-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/mm/hash_native_64.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 12841f87b7a8ceb3d54f171660f72a86941bfcb3 Author: Vaibhav Jain Date: Thu Nov 23 09:08:57 2017 +0530 cxl: Check if vphb exists before iterating over AFU devices During an eeh a kernel-oops is reported if no vPHB is allocated to the AFU. This happens as during AFU init, an error in creation of vPHB is a non-fatal error. Hence afu->phb should always be checked for NULL before iterating over it for the virtual AFU pci devices. This patch fixes the kenel-oops by adding a NULL pointer check for afu->phb before it is dereferenced. Fixes: 9e8df8a21963 ("cxl: EEH support") Cc: stable@vger.kernel.org # v4.3+ Signed-off-by: Vaibhav Jain Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/pci.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit b8a3365a30c463e9105969ab1bf8674b763e3408 Author: Maarten Lankhorst Date: Thu Nov 23 11:37:37 2017 +0100 drm/vblank: Pass crtc_id to page_flip_ioctl. We added crtc_id to the atomic ioctl, but forgot to add it for vblank and page flip events. Commit bd386e518056 ("drm: Reorganize drm_pending_event to support future event types [v2]") added it to the vblank event, but page flip event was still missing. Correct this and add a test for making sure we always set crtc_id correctly. Fixes: bd386e518056 ("drm: Reorganize drm_pending_event to support future event types [v2]") Fixes: 5db06a8a98f5 ("drm: Pass CRTC ID in userspace vblank events") Cc: Daniel Stone Cc: Daniel Vetter Cc: Gustavo Padovan Cc: Sean Paul Cc: dri-devel@lists.freedesktop.org Cc: # v4.12+ Reviewed-by: Daniel Vetter #irc Testcase: igt/kms_vblank/crtc_id Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20171123103737.47138-1-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_plane.c | 1 + 1 file changed, 1 insertion(+) commit c131187db2d3fa2f8bf32fdf4e9a4ef805168467 Author: Alexei Starovoitov Date: Wed Nov 22 16:42:05 2017 -0800 bpf: fix branch pruning logic when the verifier detects that register contains a runtime constant and it's compared with another constant it will prune exploration of the branch that is guaranteed not to be taken at runtime. This is all correct, but malicious program may be constructed in such a way that it always has a constant comparison and the other branch is never taken under any conditions. In this case such path through the program will not be explored by the verifier. It won't be taken at run-time either, but since all instructions are JITed the malicious program may cause JITs to complain about using reserved fields, etc. To fix the issue we have to track the instructions explored by the verifier and sanitize instructions that are dead at run time with NOPs. We cannot reject such dead code, since llvm generates it for valid C code, since it doesn't do as much data flow analysis as the verifier does. Fixes: 17a5267067f3 ("bpf: verifier (add verifier core)") Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: Daniel Borkmann include/linux/bpf_verifier.h | 2 +- kernel/bpf/verifier.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) commit 9ceace3c9c18c67676e75141032a65a8e01f9a7a Author: Vijendar Mukunda Date: Thu Nov 23 20:07:00 2017 +0530 ALSA: hda: Add Raven PCI ID This commit adds PCI ID for Raven platform Signed-off-by: Vijendar Mukunda Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 3 +++ 1 file changed, 3 insertions(+) commit 8c97eeccf0ad8783c057830119467b877bdfced7 Author: Jeff Lien Date: Tue Nov 21 10:44:37 2017 -0600 nvme-pci: add quirk for delay before CHK RDY for WDC SN200 And increase the existing delay to cover this device as well. Cc: stable@vger.kernel.org Signed-off-by: Jeff Lien Signed-off-by: Christoph Hellwig drivers/nvme/host/nvme.h | 2 +- drivers/nvme/host/pci.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit 2d7fe6185722b0817bb345f62ab06b76a7b26542 Author: Kailang Yang Date: Wed Nov 22 15:21:32 2017 +0800 ALSA: hda/realtek - Fix ALC700 family no sound issue It maybe the typo for ALC700 support patch. To fix the bit value on this patch. Fixes: 6fbae35a3170 ("ALSA: hda/realtek - Add support for new codecs ALC700/ALC701/ALC703") Signed-off-by: Kailang Yang Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a787756b809888e8925d722862167f1229b58f7 Merge: 1b8c5cd f83e2ae Author: Linus Torvalds Date: Wed Nov 22 21:09:18 2017 -1000 Merge tag 'pwm/for-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "The changes for this release include power management improvements for the pwm-img driver, support for the backup mode on pwm-atmel-tcb as well as support for more hardware with the R-Car and Mediatek drivers. To round things off there's a bit of cleanup for sunxi and stm32-lp" * tag 'pwm/for-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: stm32-lp: Remove pwm_is_enabled() check before calling pwm_disable() pwm: mediatek: Add MT2712/MT7622 support pwm: sunxi: Use of_device_get_match_data() pwm: atmel-tcb: Support backup mode dt-bindings: pwm: Add R-Car D3 device tree bindings pwm: img: Add runtime PM pwm: img: Add suspend / resume handling commit 1b8c5cd890e274781a8ef61585ae03614be9ccd8 Merge: 14b661e 87c9fd8 Author: Linus Torvalds Date: Wed Nov 22 20:58:23 2017 -1000 Merge tag 'rtc-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "There is nothing scary this cycle, mostly driver fixes and updates. The core fix has been in for a while and has been tested on multiple kernel revisions by multiple teams. Core: - Fix setting the alarm to the next expiring timer New drivers: - Mediatek MT7622 RTC - NXP PCF85363 - Spreadtrum SC27xx PMIC RTC Drivers updates: - Use generic nvmem to expose the Non volatile ram for ds1305, ds1511, m48t86 and omap - abx80x: solve possible race condition at probe - armada38x: support trimming the RTC oscillator - at91rm9200: fix reading the alarm value at boot - ds1511: allow waking platform - m41t80: rework square wave output - pcf8523: support trimming the RTC oscillator - pcf8563: fix clock output rate - pl031: make interrupt optional - xgene: fix suspend/resume" * tag 'rtc-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (50 commits) dt-bindings: rtc: imxdi: Improve the bindings text rtc: sc27xx: Add Spreadtrum SC27xx PMIC RTC driver dt-bindings: rtc: Add Spreadtrum SC27xx RTC documentation rtc: at91rm9200: fix reading alarm value rtc: at91rm9200: stop calculating yday in at91_rtc_readalarm rtc: sysfs: Use time64_t variables to set time/alarm rtc: xgene: mark PM functions as __maybe_unused rtc: xgene: Fix suspend/resume rtc: pcf8563: don't alway enable the alarm rtc: pcf8563: fix output clock rate rtc: rx8010: Fix for incorrect return value rtc: rx8010: Specify correct address for RX8010_RESV31 rtc: rx8010: Remove duplicate define rtc: m41t80: remove unneeded checks from m41t80_sqw_set_rate rtc: m41t80: avoid i2c read in m41t80_sqw_is_prepared rtc: m41t80: avoid i2c read in m41t80_sqw_recalc_rate rtc: m41t80: fix m41t80_sqw_round_rate return value rtc: m41t80: m41t80_sqw_set_rate should return 0 on success rtc: add support for NXP PCF85363 real-time clock rtc: omap: Support scratch registers ... commit ca37e57bbe0cf1455ea3e84eb89ed04a132d59e1 Author: Andy Lutomirski Date: Wed Nov 22 20:39:16 2017 -0800 x86/entry/64: Add missing irqflags tracing to native_load_gs_index() Running this code with IRQs enabled (where dummy_lock is a spinlock): static void check_load_gs_index(void) { /* This will fail. */ load_gs_index(0xffff); spin_lock(&dummy_lock); spin_unlock(&dummy_lock); } Will generate a lockdep warning. The issue is that the actual write to %gs would cause an exception with IRQs disabled, and the exception handler would, as an inadvertent side effect, update irqflag tracing to reflect the IRQs-off status. native_load_gs_index() would then turn IRQs back on and return with irqflag tracing still thinking that IRQs were off. The dummy lock-and-unlock causes lockdep to notice the error and warn. Fix it by adding the missing tracing. Apparently nothing did this in a context where it mattered. I haven't tried to find a code path that would actually exhibit the warning if appropriately nasty user code were running. I suspect that the security impact of this bug is very, very low -- production systems don't run with lockdep enabled, and the warning is mostly harmless anyway. Found during a quick audit of the entry code to try to track down an unrelated bug that Ingo found in some still-in-development code. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/e1aeb0e6ba8dd430ec36c8a35e63b429698b4132.1511411918.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 14b661ebb6cfa386afa5a5247eb09e24d420af3a Merge: 3f3211e 1530578 Author: Linus Torvalds Date: Wed Nov 22 20:46:06 2017 -1000 Merge tag 'for-linus-20171120' of git://git.infradead.org/linux-mtd Pull MTD updates from Richard Weinberger: "General changes: - Unconfuse get_unmapped_area and point/unpoint driver methods - New partition parser: sharpslpart - Kill GENERIC_IO - Various fixes NAND changes: - Add a flag to mark NANDs that require 3 address cycles to encode a page address - Set a default ECC/free layout when NAND_ECC_NONE is requested - Fix a bug in panic_nand_write() - Another batch of cleanups for the denali driver - Fix PM support in the atmel driver - Remove support for platform data in the omap driver - Fix subpage write in the omap driver - Fix irq handling in the mtk driver - Change link order of mtk_ecc and mtk_nand drivers to speed up boot time - Change log level of ECC error messages in the mxc driver - Patch the pxa3xx driver to support Armada 8k platforms - Add BAM DMA support to the qcom driver - Convert gpio-nand to the GPIO desc API - Fix ECC handling in the mt29f driver SPI-NOR changes: - Introduce system power management support - New mechanism to select the proper .quad_enable() hook by JEDEC ID, when needed, instead of only by manufacturer ID - Add support to new memory parts from Gigadevice, Winbond, Macronix and Everspin - Maintainance for Cadence, Intel, Mediatek and STM32 drivers" * tag 'for-linus-20171120' of git://git.infradead.org/linux-mtd: (85 commits) mtd: Avoid probe failures when mtd->dbg.dfs_dir is invalid mtd: sharpslpart: Add sharpslpart partition parser mtd: Add sanity checks in mtd_write/read_oob() mtd: remove the get_unmapped_area method mtd: implement mtd_get_unmapped_area() using the point method mtd: chips/map_rom.c: implement point and unpoint methods mtd: chips/map_ram.c: implement point and unpoint methods mtd: mtdram: properly handle the phys argument in the point method mtd: mtdswap: fix spelling mistake: 'TRESHOLD' -> 'THRESHOLD' mtd: slram: use memremap() instead of ioremap() kconfig: kill off GENERIC_IO option mtd: Fix C++ comment in include/linux/mtd/mtd.h mtd: constify mtd_partition mtd: plat-ram: Replace manual resource management by devm mtd: nand: Fix writing mtdoops to nand flash. mtd: intel-spi: Add Intel Lewisburg PCH SPI super SKU PCI ID mtd: nand: mtk: fix infinite ECC decode IRQ issue mtd: spi-nor: Add support for mr25h128 mtd: nand: mtk: change the compile sequence of mtk_nand.o and mtk_ecc.o mtd: spi-nor: enable 4B opcodes for mx66l51235l ... commit 3f3211e755f329c56acf55faa0dbf91befd7b5ca Merge: 2753278 274e0a1 Author: Linus Torvalds Date: Wed Nov 22 20:42:42 2017 -1000 Merge tag 'xfs-4.15-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: - Fix a memory leak in the new in-core extent map - Refactor the xfs_dev_t conversions for easier xfsprogs porting * tag 'xfs-4.15-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: abstract out dev_t conversions xfs: fix memory leak in xfs_iext_free_last_leaf commit 275327851e5c3e71bc73eaee7f065f22b2d1fe6c Merge: d18bee4 c6eb50d Author: Linus Torvalds Date: Wed Nov 22 20:20:02 2017 -1000 Merge branch 'work.whack-a-mole' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull mode_t whack-a-mole from Al Viro: "For all internal uses we want umode_t, which is arch-independent; mode_t (or __kernel_mode_t, for that matter) is wrong outside of userland ABI. Unfortunately, that crap keeps coming back and needs to be put down from time to time..." * 'work.whack-a-mole' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: mode_t whack-a-mole: task_dump_owner() commit d18bee424b129aa4755268feeeb1ee16cbde6afa Merge: 0c86a6b 61b272c Author: Linus Torvalds Date: Wed Nov 22 20:17:54 2017 -1000 Merge branch '9p-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull 9p filesystemfixes from Al Viro: "Several 9p fixes" * '9p-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: 9p: Fix missing commas in mount options net/9p: Switch to wait_event_killable() fs/9p: Compare qid.path in v9fs_test_inode commit ae6b289a37890909fea0e4a1666e19377fa0ed2c Author: Chris Fries Date: Tue Nov 7 11:46:13 2017 -0800 kbuild: Set KBUILD_CFLAGS before incl. arch Makefile Set the clang KBUILD_CFLAGS up before including arch/ Makefiles, so that ld-options (etc.) can work correctly. This fixes errors with clang such as ld-options trying to CC against your host architecture, but LD trying to link against your target architecture. Signed-off-by: Chris Fries Signed-off-by: Nick Desaulniers Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Signed-off-by: Masahiro Yamada Makefile | 64 ++++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit 98ecf1a308977505381b5c360b039a84cf67513c Author: Rob Clark Date: Thu Nov 16 09:05:57 2017 -0500 dt-bindings: remove file that was added accidentally I think this snuck in when I applied the patch for f97decac5f4c (didn't apply cleanly, required some manual applying + git-add). It is unused and shouldn't be here. My bad. Fixes: f97decac5f4c "drm/msm: Support multiple ringbuffers" Signed-off-by: Rob Clark Acked-by: Rob Herring Signed-off-by: Dave Airlie include/dt-bindings/msm/msm-bus-ids.h | 887 ---------------------------------- 1 file changed, 887 deletions(-) commit ded13fc11b71fd1351e57c68a130d89a0285f1b6 Author: Paul Mackerras Date: Wed Nov 22 14:38:53 2017 +1100 KVM: PPC: Book3S HV: Fix migration and HPT resizing of HPT guests on radix hosts This fixes two errors that prevent a guest using the HPT MMU from successfully migrating to a POWER9 host in radix MMU mode, or resizing its HPT when running on a radix host. The first bug was that commit 8dc6cca556e4 ("KVM: PPC: Book3S HV: Don't rely on host's page size information", 2017-09-11) missed two uses of hpte_base_page_size(), one in the HPT rehashing code and one in kvm_htab_write() (which is used on the destination side in migrating a HPT guest). Instead we use kvmppc_hpte_base_page_shift(). Having the shift count means that we can use left and right shifts instead of multiplication and division in a few places. Along the way, this adds a check in kvm_htab_write() to ensure that the page size encoding in the incoming HPTEs is recognized, and if not return an EINVAL error to userspace. The second bug was that kvm_htab_write was performing some but not all of the functions of kvmhv_setup_mmu(), resulting in the destination VM being left in radix mode as far as the hardware is concerned. The simplest fix for now is make kvm_htab_write() call kvmppc_setup_partition_table() like kvmppc_hv_setup_htab_rma() does. In future it would be better to refactor the code more extensively to remove the duplication. Fixes: 8dc6cca556e4 ("KVM: PPC: Book3S HV: Don't rely on host's page size information") Fixes: 7a84084c6054 ("KVM: PPC: Book3S HV: Set partition table rather than SDR1 on POWER9") Reported-by: Suraj Jitindar Singh Tested-by: Suraj Jitindar Singh Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_ppc.h | 1 + arch/powerpc/kvm/book3s_64_mmu_hv.c | 37 +++++++++++++++++++++++-------------- arch/powerpc/kvm/book3s_hv.c | 3 +-- 3 files changed, 25 insertions(+), 16 deletions(-) commit acb1d8eee5084aab9b94527c99d1f3ae8ed01922 Author: Dave Airlie Date: Mon Oct 16 05:26:19 2017 +0100 drm/edid: quirk HTC vive headset as non-desktop. [v2] This uses the EDID info from my HTC Vive to mark it as non-desktop. v2: Change description from non-standard to non-desktop Reviewed-by: Keith Packard Signed-off-by: Dave Airlie drivers/gpu/drm/drm_edid.c | 3 +++ 1 file changed, 3 insertions(+) commit b5f053882ff19a8ce4a3cbc66a136b8bc5e7094f Author: Dave Airlie Date: Mon Oct 16 05:08:39 2017 +0100 drm/fb: add support for not enabling fbcon on non-desktop displays [v2] We don't want fbcon to get used on non-desktop dislays, don't pass them as enabled connectors to the fb helper setup. This prevents my HMD from getting disorted fbcon, and from affecting other displays console. v2: Change description from non-standard to non-desktop Reviewed-by: Keith Packard Signed-off-by: Dave Airlie drivers/gpu/drm/drm_fb_helper.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 66660d4cf21b7dfcb258d8a51734963802693796 Author: Dave Airlie Date: Mon Oct 16 05:08:09 2017 +0100 drm: add connector info/property for non-desktop displays [v2] This adds the infrastructure needed to quirk displays using edid and to mark them a non-desktop. A non-desktop display is one which shouldn't normally be included as a part of a desktop environment. This is meant to cover head mounted devices like HTC Vive. v2: Change description from non-standard to non-desktop, add docs Reviewed-by: Keith Packard Signed-off-by: Dave Airlie fixup docs drivers/gpu/drm/drm_connector.c | 17 +++++++++++++++++ drivers/gpu/drm/drm_edid.c | 8 ++++++-- include/drm/drm_connector.h | 5 +++++ include/drm/drm_mode_config.h | 7 +++++++ 4 files changed, 35 insertions(+), 2 deletions(-) commit 1cee3bce71e916c6213ec5566bd9666ffd202de0 Merge: 9cae775 739acd8 Author: Dave Airlie Date: Thu Nov 23 10:56:39 2017 +1000 Merge tag 'tilcdc-4.15-fixes' of https://github.com/jsarha/linux into drm-next tilcdc fixes for v4.15 * tag 'tilcdc-4.15-fixes' of https://github.com/jsarha/linux: drm/tilcdc: Remove obsolete "ti,tilcdc,slave" dts binding support commit 9cae7751dc6896fb0c11ac858d3cbd9d6a8c022f Merge: af5ecb5 446947b Author: Dave Airlie Date: Thu Nov 23 10:56:11 2017 +1000 Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next more misc amdgpu fixes. * 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: fix rmmod KCQ disable failed error drm/amdgpu: fix kernel hang when starting VNC server drm/amdgpu: don't skip attributes when powerplay is enabled drm/amd/pp: fix typecast error in powerplay. Revert "drm/radeon: dont switch vt on suspend" drm/amd/amdgpu: fix over-bound accessing in amdgpu_cs_wait_any_fence drm/amd/powerplay: fix unfreeze level smc message for smu7 drm/amdgpu:fix memleak drm/amdgpu:fix memleak in takedown commit af5ecb53c8333df424aedf97024f38ea4ec5cbb2 Merge: 2d56131 e64b918 Author: Dave Airlie Date: Thu Nov 23 08:56:34 2017 +1000 Merge tag 'imx-drm-next-2017-10-18' of git://git.pengutronix.de/git/pza/linux into drm-next drm/imx: various cleanups - Switch to drm_*_get/put() helpers - Use correct parallel-display connector enum: DPI instead of VGA - Remove incorrect unit name from device tree binding documentation example - Remove an unused variable * tag 'imx-drm-next-2017-10-18' of git://git.pengutronix.de/git/pza/linux: gpu: ipu-v3: ipu-dc: Remove unused 'di' variable dt-bindings: fsl-imx-drm: Remove incorrect "@di0" usage drm/imx: parallel-display: use correct connector enum drm/imx: switch to drm_*_get(), drm_*_put() helpers commit 2d56131006f6208e6e7acba4a750c40ed7df6f34 Merge: 5ee72d3 e1335e2 Author: Dave Airlie Date: Thu Nov 23 08:52:38 2017 +1000 Merge tag 'drm/tegra/for-4.15-rc1-fixes' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Fixes for v4.15-rc1 This includes an update to the SOR pad clock programming needed because of some changes that went in through the clock tree. * tag 'drm/tegra/for-4.15-rc1-fixes' of git://anongit.freedesktop.org/tegra/linux: drm/tegra: sor: Reimplement pad clock commit 107af8ec117b0af6e90ddfe42e568b2efd8f6ff7 Merge: f1a8b8e a60dd35 Author: Daniel Borkmann Date: Wed Nov 22 21:40:54 2017 +0100 Merge branch 'bpf-fix-null-arg-semantics' Gianluca Borello says: ==================== This set includes some fixes in semantics and usability issues that emerged recently, and would be good to have them in net before the next release. In particular, ARG_CONST_SIZE_OR_ZERO semantics was recently changed in commit 9fd29c08e520 ("bpf: improve verifier ARG_CONST_SIZE_OR_ZERO semantics") with the goal of letting the compiler generate simpler code that the verifier can more easily accept. To handle this change in semantics, a few checks in some helpers were added, like in commit 9c019e2bc4b2 ("bpf: change helper bpf_probe_read arg2 type to ARG_CONST_SIZE_OR_ZERO"), and those checks are less than ideal because once they make it into a released kernel bpf programs can start relying on them, preventing the possibility of being removed later on. This patch tries to fix the issue by introducing a new argument type ARG_PTR_TO_MEM_OR_NULL that can be used for helpers that can receive a tuple. By doing so, we can fix the semantics of the other helpers that don't need and can just handle , allowing the code to get rid of those checks. ==================== Signed-off-by: Daniel Borkmann commit a60dd35d2e39209fa7645945e1192bf9769872c6 Author: Gianluca Borello Date: Wed Nov 22 18:32:56 2017 +0000 bpf: change bpf_perf_event_output arg5 type to ARG_CONST_SIZE_OR_ZERO Commit 9fd29c08e520 ("bpf: improve verifier ARG_CONST_SIZE_OR_ZERO semantics") relaxed the treatment of ARG_CONST_SIZE_OR_ZERO due to the way the compiler generates optimized BPF code when checking boundaries of an argument from C code. A typical example of this optimized code can be generated using the bpf_perf_event_output helper when operating on variable memory: /* len is a generic scalar */ if (len > 0 && len <= 0x7fff) bpf_perf_event_output(ctx, &perf_map, 0, buf, len); 110: (79) r5 = *(u64 *)(r10 -40) 111: (bf) r1 = r5 112: (07) r1 += -1 113: (25) if r1 > 0x7ffe goto pc+6 114: (bf) r1 = r6 115: (18) r2 = 0xffff94e5f166c200 117: (b7) r3 = 0 118: (bf) r4 = r7 119: (85) call bpf_perf_event_output#25 R5 min value is negative, either use unsigned or 'var &= const' With this code, the verifier loses track of the variable. Replacing arg5 with ARG_CONST_SIZE_OR_ZERO is thus desirable since it avoids this quite common case which leads to usability issues, and the compiler generates code that the verifier can more easily test: if (len <= 0x7fff) bpf_perf_event_output(ctx, &perf_map, 0, buf, len); or bpf_perf_event_output(ctx, &perf_map, 0, buf, len & 0x7fff); No changes to the bpf_perf_event_output helper are necessary since it can handle a case where size is 0, and an empty frame is pushed. Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Gianluca Borello Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: Daniel Borkmann kernel/trace/bpf_trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c4e1201740ceae9bd6f622851a9bf7c66debe3a Author: Gianluca Borello Date: Wed Nov 22 18:32:55 2017 +0000 bpf: change bpf_probe_read_str arg2 type to ARG_CONST_SIZE_OR_ZERO Commit 9fd29c08e520 ("bpf: improve verifier ARG_CONST_SIZE_OR_ZERO semantics") relaxed the treatment of ARG_CONST_SIZE_OR_ZERO due to the way the compiler generates optimized BPF code when checking boundaries of an argument from C code. A typical example of this optimized code can be generated using the bpf_probe_read_str helper when operating on variable memory: /* len is a generic scalar */ if (len > 0 && len <= 0x7fff) bpf_probe_read_str(p, len, s); 251: (79) r1 = *(u64 *)(r10 -88) 252: (07) r1 += -1 253: (25) if r1 > 0x7ffe goto pc-42 254: (bf) r1 = r7 255: (79) r2 = *(u64 *)(r10 -88) 256: (bf) r8 = r4 257: (85) call bpf_probe_read_str#45 R2 min value is negative, either use unsigned or 'var &= const' With this code, the verifier loses track of the variable. Replacing arg2 with ARG_CONST_SIZE_OR_ZERO is thus desirable since it avoids this quite common case which leads to usability issues, and the compiler generates code that the verifier can more easily test: if (len <= 0x7fff) bpf_probe_read_str(p, len, s); or bpf_probe_read_str(p, len & 0x7fff, s); No changes to the bpf_probe_read_str helper are necessary since strncpy_from_unsafe itself immediately returns if the size passed is 0. Signed-off-by: Gianluca Borello Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: Daniel Borkmann kernel/trace/bpf_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb33f2cca49ec49a1b893b5af546e7c042ca6365 Author: Gianluca Borello Date: Wed Nov 22 18:32:54 2017 +0000 bpf: remove explicit handling of 0 for arg2 in bpf_probe_read Commit 9c019e2bc4b2 ("bpf: change helper bpf_probe_read arg2 type to ARG_CONST_SIZE_OR_ZERO") changed arg2 type to ARG_CONST_SIZE_OR_ZERO to simplify writing bpf programs by taking advantage of the new semantics introduced for ARG_CONST_SIZE_OR_ZERO which allows arguments. In order to prevent the helper from actually passing a NULL pointer to probe_kernel_read, which can happen when is passed to the helper, the commit also introduced an explicit check against size == 0. After the recent introduction of the ARG_PTR_TO_MEM_OR_NULL type, bpf_probe_read can not receive a pair of arguments anymore, thus the check is not needed anymore and can be removed, since probe_kernel_read can correctly handle a call. This also fixes the semantics of the helper before it gets officially released and bpf programs start relying on this check. Fixes: 9c019e2bc4b2 ("bpf: change helper bpf_probe_read arg2 type to ARG_CONST_SIZE_OR_ZERO") Signed-off-by: Gianluca Borello Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Yonghong Song Signed-off-by: Daniel Borkmann kernel/trace/bpf_trace.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit db1ac4964fa172803a0fea83033cd35d380a8a77 Author: Gianluca Borello Date: Wed Nov 22 18:32:53 2017 +0000 bpf: introduce ARG_PTR_TO_MEM_OR_NULL With the current ARG_PTR_TO_MEM/ARG_PTR_TO_UNINIT_MEM semantics, an helper argument can be NULL when the next argument type is ARG_CONST_SIZE_OR_ZERO and the verifier can prove the value of this next argument is 0. However, most helpers are just interested in handling , so forcing them to deal with makes the implementation of those helpers more complicated for no apparent benefits, requiring them to explicitly handle those corner cases with checks that bpf programs could start relying upon, preventing the possibility of removing them later. Solve this by making ARG_PTR_TO_MEM/ARG_PTR_TO_UNINIT_MEM never accept NULL even when ARG_CONST_SIZE_OR_ZERO is set, and introduce a new argument type ARG_PTR_TO_MEM_OR_NULL to explicitly deal with the NULL case. Currently, the only helper that needs this is bpf_csum_diff_proto(), so change arg1 and arg3 to this new type as well. Also add a new battery of tests that explicitly test the !ARG_PTR_TO_MEM_OR_NULL combination: all the current ones testing the various variations are focused on bpf_csum_diff, so cover also other helpers. Signed-off-by: Gianluca Borello Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: Daniel Borkmann include/linux/bpf.h | 1 + kernel/bpf/verifier.c | 4 +- net/core/filter.c | 4 +- tools/testing/selftests/bpf/test_verifier.c | 113 ++++++++++++++++++++++++++-- 4 files changed, 112 insertions(+), 10 deletions(-) commit f341a4d384f7fced2ca0d9472ed88fe94de32726 Author: Mikulas Patocka Date: Wed Nov 22 13:18:05 2017 -0500 block: remove useless assignment in bio_split Remove useless assignment to the variable "split" because the variable is unconditionally assigned later. Signed-off-by: Mikulas Patocka Signed-off-by: Jens Axboe block/bio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1addb798e93893d33c8dfab743cd44f09fd7719a Author: David Disseldorp Date: Wed Nov 8 17:29:44 2017 +0100 null_blk: fix dev->badblocks leak null_alloc_dev() allocates memory for dev->badblocks, but cleanup currently only occurs in the configfs release codepath, missing a number of other places. This bug was found running the blktests block/010 test, alongside kmemleak: rapido1:/blktests# ./check block/010 ... rapido1:/blktests# echo scan > /sys/kernel/debug/kmemleak [ 306.966708] kmemleak: 32 new suspected memory leaks (see /sys/kernel/debug/kmemleak) rapido1:/blktests# cat /sys/kernel/debug/kmemleak unreferenced object 0xffff88001f86d000 (size 4096): comm "modprobe", pid 231, jiffies 4294892415 (age 318.252s) 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+0x49/0xa0 [] kmem_cache_alloc+0x9f/0xe0 [] badblocks_init+0x2f/0x60 [] 0xffffffffa0019fae [] nullb_device_badblocks_store+0x63/0x130 [null_blk] [] do_one_initcall+0x3d/0x170 [] do_init_module+0x56/0x1e9 [] load_module+0x1c47/0x26a0 [] SyS_finit_module+0xa9/0xd0 [] entry_SYSCALL_64_fastpath+0x13/0x94 Fixes: 2f54a613c942 ("nullb: badbblocks support") Reviewed-by: Shaohua Li Signed-off-by: David Disseldorp Signed-off-by: Jens Axboe drivers/block/null_blk.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4d6c51b107cc73b15a377224549aa5593f90df89 Author: Michael Ellerman Date: Wed Nov 22 23:17:01 2017 +1100 powerpc/64s: Fix Power9 DD2.1 logic in DT CPU features I got the logic wrong in the DT CPU features code when I added the Power9 DD2.1 feature. We should be setting the bit if we detect a DD2.1, not clearing it if we detect a DD2.0. This code isn't actually exercised at the moment so nothing is actually broken. Fixes: 3ffa9d9e2a7c ("powerpc/64s: Fix Power9 DD2.0 workarounds by adding DD2.1 feature") Signed-off-by: Michael Ellerman arch/powerpc/kernel/dt_cpu_ftrs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 73ce9aec65b17433e18163d07eb5cb6bf114bd6c Author: Madhavan Srinivasan Date: Wed Nov 22 10:45:39 2017 +0530 powerpc/perf: Fix IMC_MAX_PMU macro IMC_MAX_PMU is used for static storage (per_nest_pmu_arr) which holds nest pmu information. Current value for the macro is 32 based on the initial number of nest pmu units supported by the nest microcode. But going forward, microcode could support more nest units. Instead of static storage, patch to fix the code to dynamically allocate an array based on the number of nest imc units found in the device tree. Fixes:8f95faaac56c1 ('powerpc/powernv: Detect and create IMC device') Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/include/asm/imc-pmu.h | 6 +----- arch/powerpc/perf/imc-pmu.c | 15 ++++++++++++--- arch/powerpc/platforms/powernv/opal-imc.c | 16 ++++++++++++++++ 3 files changed, 29 insertions(+), 8 deletions(-) commit de34787f1096cce38e2590be0013b44418d14546 Author: Madhavan Srinivasan Date: Wed Nov 22 10:45:38 2017 +0530 powerpc/perf: Fix pmu_count to count only nest imc pmus "pmu_count" in opal_imc_counters_probe() is intended to hold the number of successful nest imc pmu registerations. But current code also counts other imc units like core_imc and thread_imc. Patch add a check to count only nest imc pmus. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-imc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 252eb55816a6f69ef9464cad303cdb3326cdc61d Author: Christophe Leroy Date: Tue Nov 21 15:28:20 2017 +0100 powerpc: Fix boot on BOOK3S_32 with CONFIG_STRICT_KERNEL_RWX On powerpc32, patch_instruction() is called by apply_feature_fixups() which is called from early_init() There is the following note in front of early_init(): * Note that the kernel may be running at an address which is different * from the address that it was linked at, so we must use RELOC/PTRRELOC * to access static data (including strings). -- paulus Therefore, slab_is_available() cannot be called yet, and text_poke_area must be addressed with PTRRELOC() Fixes: 95902e6c8864 ("powerpc/mm: Implement STRICT_KERNEL_RWX on PPC32") Cc: stable@vger.kernel.org # v4.14+ Reported-by: Meelis Roos Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/lib/code-patching.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 56986b07d17b4a19416e248aaca9367c241a824b Author: Bard Liao Date: Wed Nov 22 13:59:19 2017 +0800 ASoC: rt5645: reset RT5645_AD_DA_MIXER at probe RT5645_AD_DA_MIXER (0x29) register will not be reset to default after SW reset. So we have to write it to its default value in i2c_probe. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 2 ++ 1 file changed, 2 insertions(+) commit d6c0615f510bc1ee26cfb2b9a3343ac99b9c46fb Author: Takashi Iwai Date: Wed Nov 22 12:34:56 2017 +0100 ALSA: hda - Fix yet remaining issue with vmaster 0dB initialization The previous fix for addressing the breakage in vmaster slave initialization, commit a91d66129fb9 ("ALSA: hda - Fix incorrect TLV callback check introduced during set_fs() removal"), introduced a new helper to process over each slave kctl. However, this helper passes only the original kctl, not the virtual slave kctl. As a result, HD-audio driver (which is the only user so far) couldn't initialize the slave correctly because it's trying to update the value directly with the original kctl, not with the mapped kctl. This patch fixes the situation again by passing both the mapped slaved and original slave kctls to the function. Luckily there is a single caller as of now, so changing the call signature is no big matter. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197959 Fixes: a91d66129fb9 ("ALSA: hda - Fix incorrect TLV callback check introduced during set_fs() removal") Cc: Signed-off-by: Takashi Iwai include/sound/control.h | 4 +++- sound/core/vmaster.c | 6 ++++-- sound/pci/hda/hda_codec.c | 10 +++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) commit f72271e2a0ae4277d53c4053f5eed8bb346ba38a Author: Brian King Date: Fri Nov 17 11:05:49 2017 -0600 i40evf: Use smp_rmb rather than read_barrier_depends The original issue being fixed in this patch was seen with the ixgbe driver, but the same issue exists with i40evf as well, as the code is very similar. read_barrier_depends is not sufficient to ensure loads following it are not speculatively loaded out of order by the CPU, which can result in stale data being loaded, causing potential system crashes. Cc: stable Signed-off-by: Brian King Acked-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b8edcc685b5e2c3c37aa13dc50a88e84a5bfef8 Author: Brian King Date: Fri Nov 17 11:05:48 2017 -0600 fm10k: Use smp_rmb rather than read_barrier_depends The original issue being fixed in this patch was seen with the ixgbe driver, but the same issue exists with fm10k as well, as the code is very similar. read_barrier_depends is not sufficient to ensure loads following it are not speculatively loaded out of order by the CPU, which can result in stale data being loaded, causing potential system crashes. Cc: stable Signed-off-by: Brian King Acked-by: Jesse Brandeburg Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4cb99185b4cc96c0a1c70104dc21ae14d7e7f28 Author: Brian King Date: Fri Nov 17 11:05:47 2017 -0600 igb: Use smp_rmb rather than read_barrier_depends The original issue being fixed in this patch was seen with the ixgbe driver, but the same issue exists with igb as well, as the code is very similar. read_barrier_depends is not sufficient to ensure loads following it are not speculatively loaded out of order by the CPU, which can result in stale data being loaded, causing potential system crashes. Cc: stable Signed-off-by: Brian King Acked-by: Jesse Brandeburg Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e1f9ca546556e508d021545861f6b5fc75a95fe Author: Brian King Date: Fri Nov 17 11:05:46 2017 -0600 igbvf: Use smp_rmb rather than read_barrier_depends The original issue being fixed in this patch was seen with the ixgbe driver, but the same issue exists with igbvf as well, as the code is very similar. read_barrier_depends is not sufficient to ensure loads following it are not speculatively loaded out of order by the CPU, which can result in stale data being loaded, causing potential system crashes. Cc: stable Signed-off-by: Brian King Acked-by: Jesse Brandeburg Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igbvf/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae0c585d93dfaf923d2c7eb44b2c3ab92854ea9b Author: Brian King Date: Fri Nov 17 11:05:45 2017 -0600 ixgbevf: Use smp_rmb rather than read_barrier_depends The original issue being fixed in this patch was seen with the ixgbe driver, but the same issue exists with ixgbevf as well, as the code is very similar. read_barrier_depends is not sufficient to ensure loads following it are not speculatively loaded out of order by the CPU, which can result in stale data being loaded, causing potential system crashes. Cc: stable Signed-off-by: Brian King Acked-by: Jesse Brandeburg 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 52c6912fde0133981ee50ba08808f257829c4c93 Author: Brian King Date: Fri Nov 17 11:05:44 2017 -0600 i40e: Use smp_rmb rather than read_barrier_depends The original issue being fixed in this patch was seen with the ixgbe driver, but the same issue exists with i40e as well, as the code is very similar. read_barrier_depends is not sufficient to ensure loads following it are not speculatively loaded out of order by the CPU, which can result in stale data being loaded, causing potential system crashes. Cc: stable Signed-off-by: Brian King Acked-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0a9a17e3bb4564caf4bfe2a6783ae1287667d188 Author: Brian King Date: Fri Nov 17 11:05:43 2017 -0600 ixgbe: Fix skb list corruption on Power systems This patch fixes an issue seen on Power systems with ixgbe which results in skb list corruption and an eventual kernel oops. The following is what was observed: CPU 1 CPU2 ============================ ============================ 1: ixgbe_xmit_frame_ring ixgbe_clean_tx_irq 2: first->skb = skb eop_desc = tx_buffer->next_to_watch 3: ixgbe_tx_map read_barrier_depends() 4: wmb check adapter written status bit 5: first->next_to_watch = tx_desc napi_consume_skb(tx_buffer->skb ..); 6: writel(i, tx_ring->tail); The read_barrier_depends is insufficient to ensure that tx_buffer->skb does not get loaded prior to tx_buffer->next_to_watch, which then results in loading a stale skb pointer. This patch replaces the read_barrier_depends with smp_rmb to ensure loads are ordered with respect to the load of tx_buffer->next_to_watch. Cc: stable Signed-off-by: Brian King Acked-by: Jesse Brandeburg 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 bd5608b3223bc711a5b365f80d4e67866ac7cc44 Author: Alan Brady Date: Tue Nov 14 07:00:52 2017 -0500 i40e: restore promiscuous after reset After a reset we rebuild the VSIs which is going to clobber any promiscuous settings we had before reset. This makes it so that we restore the promiscuous settings we had before reset. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 155 +++++++++++++++------------- 1 file changed, 83 insertions(+), 72 deletions(-) commit 01acc73f375ed535fa048a9e7f40ed109f7f0276 Author: Alan Brady Date: Tue Nov 14 07:00:51 2017 -0500 i40evf: fix client notify of l2 params The current method for notifying clients of l2 parameters is broken because we fail to copy the new parameters to the client instance struct, we need to do the notification before the client 'open' function pointer gets called, and lastly we should set the l2 parameters when first adding a client instance. This patch first introduces the i40evf_client_get_params function to prevent code duplication in the i40evf_client_add_instance and the i40evf_notify_client_l2_params functions. We then fix the notify l2 params function to actually copy the parameters to client instance struct and do the same in the *_add_instance' function. Lastly this patch reorganizes the priority in which client tasks fire so that if the flag for notifying l2 params is set, it will trigger before the open because the client needs these new parameters as part of a client open task. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_client.c | 38 ++++++++++++++++------- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 10 +++--- 2 files changed, 31 insertions(+), 17 deletions(-) commit 94075bb1ed7c89cdf4c46eca3938ac4f087827af Author: Filip Sadowski Date: Tue Nov 14 07:00:49 2017 -0500 i40e: Fix FLR reset timeout issue This patch allows detection of upcoming core reset in case NIC gets stuck while performing FLR reset. The i40e_pf_reset() function returns I40E_ERR_NOT_READY when global reset was detected. Signed-off-by: Filip Sadowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_common.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e56afa599609d3afe8b0ce24b553ab95e9782502 Author: Amritha Nambiar Date: Wed Nov 8 16:38:43 2017 -0800 i40e: Remove limit of 64 max queues per channel It is safe to remove the upper limit of 64 queues on a channel VSI. The upper bound is determined by the VSI's num_queue_pairs and gets validated when the queue mapping info through mqprio interface is subject to bound checking in the driver. Signed-off-by: Amritha Nambiar Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 - drivers/net/ethernet/intel/i40e/i40e_main.c | 8 -------- 2 files changed, 9 deletions(-) commit 34c164de5867659f9162ae4fc9030b940bd40aaa Author: Zijie Pan Date: Tue Nov 7 12:06:07 2017 -0800 i40e: fix the calculation of VFs mac addresses num_mac should be increased only after the call to i40e_add_mac_filter(). Fixes: 5f527ba962e2 ("i40e: Limit the number of MAC and VLAN addresses that can be added for VFs") Signed-off-by: Zijie Pan Signed-off-by: Nicolas Dichtel Reviewed-by: Tushar Dave Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 3d72aebfc61b025a2478c9d2bbc3c8c4036a1c05 Author: Jacob Keller Date: Fri Oct 27 11:06:55 2017 -0400 i40e: Fix for NUP NVM image downgrade failure Since commit 96a39aed25e6 ("i40e: Acquire NVM lock before reads on all devices") we've used the NVM lock to synchronize NVM reads even on devices which don't strictly need the lock. Doing so can cause a regression on older firmware prior to 1.5, especially when downgrading the firmware. Fix this by only grabbing the lock if we're running on an X722 device (which requires the lock as it uses the AdminQ to read the NVM), or if we're currently running 1.5 or newer firmware. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq.c | 6 ++++++ drivers/net/ethernet/intel/i40e/i40e_common.c | 3 ++- drivers/net/ethernet/intel/i40e/i40e_nvm.c | 8 +++++--- drivers/net/ethernet/intel/i40e/i40e_type.h | 1 + 4 files changed, 14 insertions(+), 4 deletions(-) commit f68d62a56708b0c19dca7a998f408510f2fbc3a8 Author: Andrey Ryabinin Date: Wed Nov 15 17:36:35 2017 -0800 x86/mm/kasan: Don't use vmemmap_populate() to initialize shadow [ Note, this commit is a cherry-picked version of: d17a1d97dc20: ("x86/mm/kasan: don't use vmemmap_populate() to initialize shadow") ... for easier x86 entry code testing and back-porting. ] The KASAN shadow is currently mapped using vmemmap_populate() since that provides a semi-convenient way to map pages into init_top_pgt. However, since that no longer zeroes the mapped pages, it is not suitable for KASAN, which requires zeroed shadow memory. Add kasan_populate_shadow() interface and use it instead of vmemmap_populate(). Besides, this allows us to take advantage of gigantic pages and use them to populate the shadow, which should save us some memory wasted on page tables and reduce TLB pressure. Link: http://lkml.kernel.org/r/20171103185147.2688-2-pasha.tatashin@oracle.com Signed-off-by: Andrey Ryabinin Signed-off-by: Pavel Tatashin Cc: Andy Lutomirski Cc: Steven Sistare Cc: Daniel Jordan Cc: Bob Picco Cc: Michal Hocko Cc: Alexander Potapenko Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Christian Borntraeger Cc: David S. Miller Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Mark Rutland Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Sam Ravnborg Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Ingo Molnar arch/x86/Kconfig | 2 +- arch/x86/mm/kasan_init_64.c | 143 +++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 137 insertions(+), 8 deletions(-) commit 548c3050ea8d16997ae27f9e080a8338a606fc93 Author: Andy Lutomirski Date: Tue Nov 21 20:43:56 2017 -0800 x86/entry/64: Fix entry_SYSCALL_64_after_hwframe() IRQ tracing When I added entry_SYSCALL_64_after_hwframe(), I left TRACE_IRQS_OFF before it. This means that users of entry_SYSCALL_64_after_hwframe() were responsible for invoking TRACE_IRQS_OFF, and the one and only user (Xen, added in the same commit) got it wrong. I think this would manifest as a warning if a Xen PV guest with CONFIG_DEBUG_LOCKDEP=y were used with context tracking. (The context tracking bit is to cause lockdep to get invoked before we turn IRQs back on.) I haven't tested that for real yet because I can't get a kernel configured like that to boot at all on Xen PV. Move TRACE_IRQS_OFF below the label. Signed-off-by: Andy Lutomirski Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: stable@vger.kernel.org Fixes: 8a9949bc71a7 ("x86/xen/64: Rearrange the SYSCALL entries") Link: http://lkml.kernel.org/r/9150aac013b7b95d62c2336751d5b6e91d2722aa.1511325444.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c2e8fbf908afd81ad502b567a6639598f92c9b9d Author: Huacai Chen Date: Tue Nov 21 14:23:39 2017 +0100 scsi: libsas: align sata_device's rps_resp on a cacheline The rps_resp buffer in ata_device is a DMA target, but it isn't explicitly cacheline aligned. Due to this, adjacent fields can be overwritten with stale data from memory on non-coherent architectures. As a result, the kernel is sometimes unable to communicate with an SATA device behind a SAS expander. Fix this by ensuring that the rps_resp buffer is cacheline aligned. This issue is similar to that fixed by Commit 84bda12af31f93 ("libata: align ap->sector_buf") and Commit 4ee34ea3a12396f35b26 ("libata: Align ata_device's id on a cacheline"). Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen include/scsi/libsas.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90addc6b3c9cda0146fbd62a08e234c2b224a80c Author: Huacai Chen Date: Tue Nov 21 14:23:38 2017 +0100 scsi: use dma_get_cache_alignment() as minimum DMA alignment In non-coherent DMA mode, kernel uses cache flushing operations to maintain I/O coherency, so scsi's block queue should be aligned to the value returned by dma_get_cache_alignment(). Otherwise, If a DMA buffer and a kernel structure share a same cache line, and if the kernel structure has dirty data, cache_invalidate (no writeback) will cause data corruption. Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen [hch: rebased and updated the comment and changelog] Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 860dd4424f344400b491b212ee4acb3a358ba9d9 Author: Christoph Hellwig Date: Tue Nov 21 14:23:37 2017 +0100 scsi: dma-mapping: always provide dma_get_cache_alignment Provide the dummy version of dma_get_cache_alignment that always returns 1 even if CONFIG_HAS_DMA is not set, so that drivers and subsystems can use it without ifdefs. Cc: stable@vger.kernel.org Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen include/linux/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) commit 727535903bea924c4f73abb202c4b3e85fff0ca4 Author: Gustavo A. R. Silva Date: Mon Nov 20 08:12:29 2017 -0600 scsi: ufs: ufshcd: fix potential NULL pointer dereference in ufshcd_config_vreg _vreg_ is being dereferenced before it is null checked, hence there is a potential null pointer dereference. Fix this by moving the pointer dereference after _vreg_ has been null checked. This issue was detected with the help of Coccinelle. Fixes: aa4976130934 ("ufs: Add regulator enable support") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f3f1dfd600ff82b18b7ea73d80eb27f476a6aa97 Author: Michael Ellerman Date: Mon Oct 16 00:13:41 2017 +0530 powerpc/perf/imc: Use cpu_to_node() not topology_physical_package_id() init_imc_pmu() uses topology_physical_package_id() to detect the node id of the processor it is on to get local memory, but that's wrong, and can lead to crashes. Fix it to use cpu_to_node(). Fixes: 885dcd709ba9 ("powerpc/perf: Add nest IMC PMU support") Cc: stable@vger.kernel.org # v4.14+ Reported-By: Rob Lippert Tested-By: Madhavan Srinivasan Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman arch/powerpc/perf/imc-pmu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 841b86f3289dbe858daeceec36423d4ea286fac2 Author: Kees Cook Date: Mon Oct 23 09:40:42 2017 +0200 treewide: Remove TIMER_FUNC_TYPE and TIMER_DATA_TYPE casts With all callbacks converted, and the timer callback prototype switched over, the TIMER_FUNC_TYPE cast is no longer needed, so remove it. Conversion was done with the following scripts: perl -pi -e 's|\(TIMER_FUNC_TYPE\)||g' \ $(git grep TIMER_FUNC_TYPE | cut -d: -f1 | sort -u) perl -pi -e 's|\(TIMER_DATA_TYPE\)||g' \ $(git grep TIMER_DATA_TYPE | cut -d: -f1 | sort -u) The now unused macros are also dropped from include/linux/timer.h. Signed-off-by: Kees Cook drivers/base/power/wakeup.c | 2 +- drivers/block/aoe/aoecmd.c | 2 +- drivers/block/swim3.c | 2 +- drivers/infiniband/hw/nes/nes_verbs.c | 2 +- drivers/input/input.c | 2 +- drivers/media/common/saa7146/saa7146_vbi.c | 2 +- drivers/net/ethernet/ti/tlan.c | 6 +++--- drivers/net/hamradio/scc.c | 8 ++++---- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 2 +- drivers/net/wireless/ray_cs.c | 12 ++++++------ drivers/s390/char/sclp.c | 4 ++-- drivers/s390/scsi/zfcp_fsf.c | 4 ++-- drivers/scsi/aic94xx/aic94xx_hwi.c | 2 +- drivers/scsi/aic94xx/aic94xx_tmf.c | 2 +- drivers/scsi/be2iscsi/be_main.c | 4 ++-- drivers/scsi/cxgbi/cxgb3i/cxgb3i.c | 4 ++-- drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 4 ++-- drivers/scsi/hisi_sas/hisi_sas_main.c | 4 ++-- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 6 +++--- drivers/scsi/ipr.c | 8 ++++---- drivers/scsi/libfc/fc_fcp.c | 6 +++--- drivers/scsi/libsas/sas_expander.c | 2 +- drivers/scsi/libsas/sas_scsi_host.c | 2 +- drivers/scsi/mvsas/mv_sas.c | 4 ++-- drivers/scsi/pm8001/pm8001_sas.c | 4 ++-- drivers/scsi/pmcraid.c | 10 +++++----- drivers/staging/irda/include/net/irda/timer.h | 2 +- drivers/tty/serial/8250/8250_core.c | 4 ++-- include/linux/kthread.h | 2 +- include/linux/timer.h | 5 +---- include/linux/workqueue.h | 2 +- kernel/kthread.c | 2 +- kernel/workqueue.c | 2 +- net/atm/lec.c | 6 +++--- net/can/proc.c | 4 ++-- net/lapb/lapb_timer.c | 4 ++-- net/netrom/af_netrom.c | 2 +- net/netrom/nr_timer.c | 2 +- net/rose/rose_link.c | 4 ++-- net/rose/rose_timer.c | 12 ++++++------ net/sunrpc/svc_xprt.c | 2 +- net/x25/af_x25.c | 2 +- net/x25/x25_timer.c | 2 +- sound/usb/line6/driver.c | 2 +- 44 files changed, 84 insertions(+), 87 deletions(-) commit 919b250f8570618e84af544c3e18dad5210eb9b6 Author: Kees Cook Date: Sun Oct 22 18:48:43 2017 -0700 timer: Remove redundant __setup_timer*() macros With __init_timer*() now matching __setup_timer*(), remove the redundant internal interface, clean up the resulting definitions and add more documentation. Cc: Thomas Gleixner Cc: Tejun Heo Cc: Lai Jiangshan Cc: Shaohua Li Cc: Jens Axboe Cc: Andrew Morton Signed-off-by: Kees Cook include/linux/kthread.h | 6 ++--- include/linux/timer.h | 56 +++++++++++++++++------------------------------ include/linux/workqueue.h | 12 +++++----- 3 files changed, 29 insertions(+), 45 deletions(-) commit 188665b2d67db8953899551d1a9d4481b2a0ac60 Author: Kees Cook Date: Sun Oct 22 18:14:46 2017 -0700 timer: Pass function down to initialization routines In preparation for removing more macros, pass the function down to the initialization routines instead of doing it in macros. Cc: Thomas Gleixner Cc: John Stultz Cc: Stephen Boyd Signed-off-by: Kees Cook include/linux/timer.h | 33 ++++++++++++++++++--------------- kernel/time/timer.c | 21 +++++++++++++++------ 2 files changed, 33 insertions(+), 21 deletions(-) commit 1fe66ba572b455270dc35a2c099dd7328cec9e4c Author: Kees Cook Date: Sun Oct 22 18:22:50 2017 -0700 timer: Remove unused data arguments from macros With the .data field removed, the ignored data arguments in timer macros can be removed. Cc: Thomas Gleixner Cc: Tejun Heo Cc: Lai Jiangshan Cc: Jens Axboe Cc: Andrew Morton Cc: Shaohua Li Signed-off-by: Kees Cook include/linux/kthread.h | 2 -- include/linux/timer.h | 18 ++++++++---------- include/linux/workqueue.h | 3 --- 3 files changed, 8 insertions(+), 15 deletions(-) commit 354b46b1a0adda1dd5b7f0bc2a5604cca091be5f Author: Kees Cook Date: Sun Oct 22 19:15:40 2017 -0700 timer: Switch callback prototype to take struct timer_list * argument Since all callbacks have been converted, we can switch the core prototype to "struct timer_list *" now too. Cc: Thomas Gleixner Cc: John Stultz Cc: Stephen Boyd Signed-off-by: Kees Cook include/linux/timer.h | 4 ++-- kernel/time/timer.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit c1eba5bcb6430868427e0b9d1cd1205a07302f06 Author: Kees Cook Date: Sun Oct 22 18:18:19 2017 -0700 timer: Pass timer_list pointer to callbacks unconditionally Now that all timer callbacks are already taking their struct timer_list pointer as the callback argument, just do this unconditionally and remove the .data field. Cc: Thomas Gleixner Cc: John Stultz Cc: Stephen Boyd Signed-off-by: Kees Cook include/linux/timer.h | 4 ---- kernel/time/timer.c | 17 +++++++---------- 2 files changed, 7 insertions(+), 14 deletions(-) commit 9477b4ad7019ad423cc88a6b83fa717a5d8d9857 Author: Kees Cook Date: Thu Oct 26 07:31:17 2017 -0700 Coccinelle: Remove setup_timer.cocci Both the init_timer() and timer_setup() APIs have been removed. This script will not be needed any more. Signed-off-by: Kees Cook scripts/coccinelle/api/setup_timer.cocci | 277 ------------------------------- 1 file changed, 277 deletions(-) commit 513ae785c63c30741e46f43960213d4ae5382ec0 Author: Kees Cook Date: Sun Oct 22 18:02:27 2017 -0700 timer: Remove setup_*timer() interface With all callers converted to timer_setup(), the old setup_*timer() interface can be removed. Cc: Thomas Gleixner Signed-off-by: Kees Cook include/linux/timer.h | 17 ----------------- 1 file changed, 17 deletions(-) commit 7eeb6b893bd28c68b6d664de1d3120e49b855cdb Author: Kees Cook Date: Wed Oct 11 23:13:49 2017 -0700 timer: Remove init_timer() interface All users of init_timer() have been updated. Remove the ancient interface. Cc: Thomas Gleixner Cc: Jonathan Corbet Signed-off-by: Kees Cook Documentation/core-api/local_ops.rst | 10 +++------- include/linux/timer.h | 3 --- 2 files changed, 3 insertions(+), 10 deletions(-) commit 86cb30ec07cdc78ad94d94bb3756c7c2d46968b9 Author: Kees Cook Date: Tue Oct 17 20:21:24 2017 -0700 treewide: setup_timer() -> timer_setup() (2 field) This converts all remaining setup_timer() calls that use a nested field to reach a struct timer_list. Coccinelle does not have an easy way to match multiple fields, so a new script is needed to change the matches of "&_E->_timer" into "&_E->_field1._timer" in all the rules. spatch --very-quiet --all-includes --include-headers \ -I ./arch/x86/include -I ./arch/x86/include/generated \ -I ./include -I ./arch/x86/include/uapi \ -I ./arch/x86/include/generated/uapi -I ./include/uapi \ -I ./include/generated/uapi --include ./include/linux/kconfig.h \ --dir . \ --cocci-file ~/src/data/timer_setup-2fields.cocci @fix_address_of depends@ expression e; @@ setup_timer( -&(e) +&e , ...) // Update any raw setup_timer() usages that have a NULL callback, but // would otherwise match change_timer_function_usage, since the latter // will update all function assignments done in the face of a NULL // function initialization in setup_timer(). @change_timer_function_usage_NULL@ expression _E; identifier _field1; identifier _timer; type _cast_data; @@ ( -setup_timer(&_E->_field1._timer, NULL, _E); +timer_setup(&_E->_field1._timer, NULL, 0); | -setup_timer(&_E->_field1._timer, NULL, (_cast_data)_E); +timer_setup(&_E->_field1._timer, NULL, 0); | -setup_timer(&_E._field1._timer, NULL, &_E); +timer_setup(&_E._field1._timer, NULL, 0); | -setup_timer(&_E._field1._timer, NULL, (_cast_data)&_E); +timer_setup(&_E._field1._timer, NULL, 0); ) @change_timer_function_usage@ expression _E; identifier _field1; identifier _timer; struct timer_list _stl; identifier _callback; type _cast_func, _cast_data; @@ ( -setup_timer(&_E->_field1._timer, _callback, _E); +timer_setup(&_E->_field1._timer, _callback, 0); | -setup_timer(&_E->_field1._timer, &_callback, _E); +timer_setup(&_E->_field1._timer, _callback, 0); | -setup_timer(&_E->_field1._timer, _callback, (_cast_data)_E); +timer_setup(&_E->_field1._timer, _callback, 0); | -setup_timer(&_E->_field1._timer, &_callback, (_cast_data)_E); +timer_setup(&_E->_field1._timer, _callback, 0); | -setup_timer(&_E->_field1._timer, (_cast_func)_callback, _E); +timer_setup(&_E->_field1._timer, _callback, 0); | -setup_timer(&_E->_field1._timer, (_cast_func)&_callback, _E); +timer_setup(&_E->_field1._timer, _callback, 0); | -setup_timer(&_E->_field1._timer, (_cast_func)_callback, (_cast_data)_E); +timer_setup(&_E->_field1._timer, _callback, 0); | -setup_timer(&_E->_field1._timer, (_cast_func)&_callback, (_cast_data)_E); +timer_setup(&_E->_field1._timer, _callback, 0); | -setup_timer(&_E._field1._timer, _callback, (_cast_data)_E); +timer_setup(&_E._field1._timer, _callback, 0); | -setup_timer(&_E._field1._timer, _callback, (_cast_data)&_E); +timer_setup(&_E._field1._timer, _callback, 0); | -setup_timer(&_E._field1._timer, &_callback, (_cast_data)_E); +timer_setup(&_E._field1._timer, _callback, 0); | -setup_timer(&_E._field1._timer, &_callback, (_cast_data)&_E); +timer_setup(&_E._field1._timer, _callback, 0); | -setup_timer(&_E._field1._timer, (_cast_func)_callback, (_cast_data)_E); +timer_setup(&_E._field1._timer, _callback, 0); | -setup_timer(&_E._field1._timer, (_cast_func)_callback, (_cast_data)&_E); +timer_setup(&_E._field1._timer, _callback, 0); | -setup_timer(&_E._field1._timer, (_cast_func)&_callback, (_cast_data)_E); +timer_setup(&_E._field1._timer, _callback, 0); | -setup_timer(&_E._field1._timer, (_cast_func)&_callback, (_cast_data)&_E); +timer_setup(&_E._field1._timer, _callback, 0); | _E->_field1._timer@_stl.function = _callback; | _E->_field1._timer@_stl.function = &_callback; | _E->_field1._timer@_stl.function = (_cast_func)_callback; | _E->_field1._timer@_stl.function = (_cast_func)&_callback; | _E._field1._timer@_stl.function = _callback; | _E._field1._timer@_stl.function = &_callback; | _E._field1._timer@_stl.function = (_cast_func)_callback; | _E._field1._timer@_stl.function = (_cast_func)&_callback; ) // callback(unsigned long arg) @change_callback_handle_cast depends on change_timer_function_usage@ identifier change_timer_function_usage._callback; identifier change_timer_function_usage._field1; identifier change_timer_function_usage._timer; type _origtype; identifier _origarg; type _handletype; identifier _handle; @@ void _callback( -_origtype _origarg +struct timer_list *t ) { ( ... when != _origarg _handletype *_handle = -(_handletype *)_origarg; +from_timer(_handle, t, _field1._timer); ... when != _origarg | ... when != _origarg _handletype *_handle = -(void *)_origarg; +from_timer(_handle, t, _field1._timer); ... when != _origarg | ... when != _origarg _handletype *_handle; ... when != _handle _handle = -(_handletype *)_origarg; +from_timer(_handle, t, _field1._timer); ... when != _origarg | ... when != _origarg _handletype *_handle; ... when != _handle _handle = -(void *)_origarg; +from_timer(_handle, t, _field1._timer); ... when != _origarg ) } // callback(unsigned long arg) without existing variable @change_callback_handle_cast_no_arg depends on change_timer_function_usage && !change_callback_handle_cast@ identifier change_timer_function_usage._callback; identifier change_timer_function_usage._field1; identifier change_timer_function_usage._timer; type _origtype; identifier _origarg; type _handletype; @@ void _callback( -_origtype _origarg +struct timer_list *t ) { + _handletype *_origarg = from_timer(_origarg, t, _field1._timer); + ... when != _origarg - (_handletype *)_origarg + _origarg ... when != _origarg } // Avoid already converted callbacks. @match_callback_converted depends on change_timer_function_usage && !change_callback_handle_cast && !change_callback_handle_cast_no_arg@ identifier change_timer_function_usage._callback; identifier t; @@ void _callback(struct timer_list *t) { ... } // callback(struct something *handle) @change_callback_handle_arg depends on change_timer_function_usage && !match_callback_converted && !change_callback_handle_cast && !change_callback_handle_cast_no_arg@ identifier change_timer_function_usage._callback; identifier change_timer_function_usage._field1; identifier change_timer_function_usage._timer; type _handletype; identifier _handle; @@ void _callback( -_handletype *_handle +struct timer_list *t ) { + _handletype *_handle = from_timer(_handle, t, _field1._timer); ... } // If change_callback_handle_arg ran on an empty function, remove // the added handler. @unchange_callback_handle_arg depends on change_timer_function_usage && change_callback_handle_arg@ identifier change_timer_function_usage._callback; identifier change_timer_function_usage._field1; identifier change_timer_function_usage._timer; type _handletype; identifier _handle; identifier t; @@ void _callback(struct timer_list *t) { - _handletype *_handle = from_timer(_handle, t, _field1._timer); } // We only want to refactor the setup_timer() data argument if we've found // the matching callback. This undoes changes in change_timer_function_usage. @unchange_timer_function_usage depends on change_timer_function_usage && !change_callback_handle_cast && !change_callback_handle_cast_no_arg && !change_callback_handle_arg@ expression change_timer_function_usage._E; identifier change_timer_function_usage._field1; identifier change_timer_function_usage._timer; identifier change_timer_function_usage._callback; type change_timer_function_usage._cast_data; @@ ( -timer_setup(&_E->_field1._timer, _callback, 0); +setup_timer(&_E->_field1._timer, _callback, (_cast_data)_E); | -timer_setup(&_E._field1._timer, _callback, 0); +setup_timer(&_E._field1._timer, _callback, (_cast_data)&_E); ) // If we fixed a callback from a .function assignment, fix the // assignment cast now. @change_timer_function_assignment depends on change_timer_function_usage && (change_callback_handle_cast || change_callback_handle_cast_no_arg || change_callback_handle_arg)@ expression change_timer_function_usage._E; identifier change_timer_function_usage._field1; identifier change_timer_function_usage._timer; identifier change_timer_function_usage._callback; type _cast_func; typedef TIMER_FUNC_TYPE; @@ ( _E->_field1._timer.function = -_callback +(TIMER_FUNC_TYPE)_callback ; | _E->_field1._timer.function = -&_callback +(TIMER_FUNC_TYPE)_callback ; | _E->_field1._timer.function = -(_cast_func)_callback; +(TIMER_FUNC_TYPE)_callback ; | _E->_field1._timer.function = -(_cast_func)&_callback +(TIMER_FUNC_TYPE)_callback ; | _E._field1._timer.function = -_callback +(TIMER_FUNC_TYPE)_callback ; | _E._field1._timer.function = -&_callback; +(TIMER_FUNC_TYPE)_callback ; | _E._field1._timer.function = -(_cast_func)_callback +(TIMER_FUNC_TYPE)_callback ; | _E._field1._timer.function = -(_cast_func)&_callback +(TIMER_FUNC_TYPE)_callback ; ) // Sometimes timer functions are called directly. Replace matched args. @change_timer_function_calls depends on change_timer_function_usage && (change_callback_handle_cast || change_callback_handle_cast_no_arg || change_callback_handle_arg)@ expression _E; identifier change_timer_function_usage._field1; identifier change_timer_function_usage._timer; identifier change_timer_function_usage._callback; type _cast_data; @@ _callback( ( -(_cast_data)_E +&_E->_field1._timer | -(_cast_data)&_E +&_E._field1._timer | -_E +&_E->_field1._timer ) ) // If a timer has been configured without a data argument, it can be // converted without regard to the callback argument, since it is unused. @match_timer_function_unused_data@ expression _E; identifier _field1; identifier _timer; identifier _callback; @@ ( -setup_timer(&_E->_field1._timer, _callback, 0); +timer_setup(&_E->_field1._timer, _callback, 0); | -setup_timer(&_E->_field1._timer, _callback, 0L); +timer_setup(&_E->_field1._timer, _callback, 0); | -setup_timer(&_E->_field1._timer, _callback, 0UL); +timer_setup(&_E->_field1._timer, _callback, 0); | -setup_timer(&_E._field1._timer, _callback, 0); +timer_setup(&_E._field1._timer, _callback, 0); | -setup_timer(&_E._field1._timer, _callback, 0L); +timer_setup(&_E._field1._timer, _callback, 0); | -setup_timer(&_E._field1._timer, _callback, 0UL); +timer_setup(&_E._field1._timer, _callback, 0); | -setup_timer(&_field1._timer, _callback, 0); +timer_setup(&_field1._timer, _callback, 0); | -setup_timer(&_field1._timer, _callback, 0L); +timer_setup(&_field1._timer, _callback, 0); | -setup_timer(&_field1._timer, _callback, 0UL); +timer_setup(&_field1._timer, _callback, 0); | -setup_timer(_field1._timer, _callback, 0); +timer_setup(_field1._timer, _callback, 0); | -setup_timer(_field1._timer, _callback, 0L); +timer_setup(_field1._timer, _callback, 0); | -setup_timer(_field1._timer, _callback, 0UL); +timer_setup(_field1._timer, _callback, 0); ) @change_callback_unused_data depends on match_timer_function_unused_data@ identifier match_timer_function_unused_data._callback; type _origtype; identifier _origarg; @@ void _callback( -_origtype _origarg +struct timer_list *unused ) { ... when != _origarg } Signed-off-by: Kees Cook arch/powerpc/kvm/booke.c | 7 +++---- drivers/block/rsxx/cregs.c | 7 +++---- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 8 ++++---- drivers/infiniband/hw/mthca/mthca_catas.c | 6 +++--- drivers/isdn/hardware/mISDN/hfcpci.c | 5 +++-- drivers/media/platform/fsl-viu.c | 7 +++---- drivers/net/ethernet/cisco/enic/enic_clsf.c | 4 ++-- drivers/net/ethernet/cisco/enic/enic_clsf.h | 5 ++--- drivers/net/wireless/intel/iwlwifi/dvm/tt.c | 18 ++++++++++-------- drivers/nfc/nfcmrvl/fw_dnld.c | 7 +++---- drivers/nfc/st-nci/se.c | 16 ++++++++-------- drivers/nfc/st21nfca/se.c | 17 +++++++++-------- drivers/scsi/sym53c8xx_2/sym_glue.c | 6 +++--- net/ipv6/ip6_fib.c | 10 ++++++---- net/ncsi/ncsi-manage.c | 7 +++---- 15 files changed, 65 insertions(+), 65 deletions(-) commit e99e88a9d2b067465adaa9c111ada99a041bef9a Author: Kees Cook Date: Mon Oct 16 14:43:17 2017 -0700 treewide: setup_timer() -> timer_setup() This converts all remaining cases of the old setup_timer() API into using timer_setup(), where the callback argument is the structure already holding the struct timer_list. These should have no behavioral changes, since they just change which pointer is passed into the callback with the same available pointers after conversion. It handles the following examples, in addition to some other variations. Casting from unsigned long: void my_callback(unsigned long data) { struct something *ptr = (struct something *)data; ... } ... setup_timer(&ptr->my_timer, my_callback, ptr); and forced object casts: void my_callback(struct something *ptr) { ... } ... setup_timer(&ptr->my_timer, my_callback, (unsigned long)ptr); become: void my_callback(struct timer_list *t) { struct something *ptr = from_timer(ptr, t, my_timer); ... } ... timer_setup(&ptr->my_timer, my_callback, 0); Direct function assignments: void my_callback(unsigned long data) { struct something *ptr = (struct something *)data; ... } ... ptr->my_timer.function = my_callback; have a temporary cast added, along with converting the args: void my_callback(struct timer_list *t) { struct something *ptr = from_timer(ptr, t, my_timer); ... } ... ptr->my_timer.function = (TIMER_FUNC_TYPE)my_callback; And finally, callbacks without a data assignment: void my_callback(unsigned long data) { ... } ... setup_timer(&ptr->my_timer, my_callback, 0); have their argument renamed to verify they're unused during conversion: void my_callback(struct timer_list *unused) { ... } ... timer_setup(&ptr->my_timer, my_callback, 0); The conversion is done with the following Coccinelle script: spatch --very-quiet --all-includes --include-headers \ -I ./arch/x86/include -I ./arch/x86/include/generated \ -I ./include -I ./arch/x86/include/uapi \ -I ./arch/x86/include/generated/uapi -I ./include/uapi \ -I ./include/generated/uapi --include ./include/linux/kconfig.h \ --dir . \ --cocci-file ~/src/data/timer_setup.cocci @fix_address_of@ expression e; @@ setup_timer( -&(e) +&e , ...) // Update any raw setup_timer() usages that have a NULL callback, but // would otherwise match change_timer_function_usage, since the latter // will update all function assignments done in the face of a NULL // function initialization in setup_timer(). @change_timer_function_usage_NULL@ expression _E; identifier _timer; type _cast_data; @@ ( -setup_timer(&_E->_timer, NULL, _E); +timer_setup(&_E->_timer, NULL, 0); | -setup_timer(&_E->_timer, NULL, (_cast_data)_E); +timer_setup(&_E->_timer, NULL, 0); | -setup_timer(&_E._timer, NULL, &_E); +timer_setup(&_E._timer, NULL, 0); | -setup_timer(&_E._timer, NULL, (_cast_data)&_E); +timer_setup(&_E._timer, NULL, 0); ) @change_timer_function_usage@ expression _E; identifier _timer; struct timer_list _stl; identifier _callback; type _cast_func, _cast_data; @@ ( -setup_timer(&_E->_timer, _callback, _E); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, &_callback, _E); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, _callback, (_cast_data)_E); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, &_callback, (_cast_data)_E); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, (_cast_func)_callback, _E); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, (_cast_func)&_callback, _E); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, (_cast_func)_callback, (_cast_data)_E); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, (_cast_func)&_callback, (_cast_data)_E); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E._timer, _callback, (_cast_data)_E); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, _callback, (_cast_data)&_E); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, &_callback, (_cast_data)_E); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, &_callback, (_cast_data)&_E); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, (_cast_func)_callback, (_cast_data)_E); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, (_cast_func)_callback, (_cast_data)&_E); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, (_cast_func)&_callback, (_cast_data)_E); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, (_cast_func)&_callback, (_cast_data)&_E); +timer_setup(&_E._timer, _callback, 0); | _E->_timer@_stl.function = _callback; | _E->_timer@_stl.function = &_callback; | _E->_timer@_stl.function = (_cast_func)_callback; | _E->_timer@_stl.function = (_cast_func)&_callback; | _E._timer@_stl.function = _callback; | _E._timer@_stl.function = &_callback; | _E._timer@_stl.function = (_cast_func)_callback; | _E._timer@_stl.function = (_cast_func)&_callback; ) // callback(unsigned long arg) @change_callback_handle_cast depends on change_timer_function_usage@ identifier change_timer_function_usage._callback; identifier change_timer_function_usage._timer; type _origtype; identifier _origarg; type _handletype; identifier _handle; @@ void _callback( -_origtype _origarg +struct timer_list *t ) { ( ... when != _origarg _handletype *_handle = -(_handletype *)_origarg; +from_timer(_handle, t, _timer); ... when != _origarg | ... when != _origarg _handletype *_handle = -(void *)_origarg; +from_timer(_handle, t, _timer); ... when != _origarg | ... when != _origarg _handletype *_handle; ... when != _handle _handle = -(_handletype *)_origarg; +from_timer(_handle, t, _timer); ... when != _origarg | ... when != _origarg _handletype *_handle; ... when != _handle _handle = -(void *)_origarg; +from_timer(_handle, t, _timer); ... when != _origarg ) } // callback(unsigned long arg) without existing variable @change_callback_handle_cast_no_arg depends on change_timer_function_usage && !change_callback_handle_cast@ identifier change_timer_function_usage._callback; identifier change_timer_function_usage._timer; type _origtype; identifier _origarg; type _handletype; @@ void _callback( -_origtype _origarg +struct timer_list *t ) { + _handletype *_origarg = from_timer(_origarg, t, _timer); + ... when != _origarg - (_handletype *)_origarg + _origarg ... when != _origarg } // Avoid already converted callbacks. @match_callback_converted depends on change_timer_function_usage && !change_callback_handle_cast && !change_callback_handle_cast_no_arg@ identifier change_timer_function_usage._callback; identifier t; @@ void _callback(struct timer_list *t) { ... } // callback(struct something *handle) @change_callback_handle_arg depends on change_timer_function_usage && !match_callback_converted && !change_callback_handle_cast && !change_callback_handle_cast_no_arg@ identifier change_timer_function_usage._callback; identifier change_timer_function_usage._timer; type _handletype; identifier _handle; @@ void _callback( -_handletype *_handle +struct timer_list *t ) { + _handletype *_handle = from_timer(_handle, t, _timer); ... } // If change_callback_handle_arg ran on an empty function, remove // the added handler. @unchange_callback_handle_arg depends on change_timer_function_usage && change_callback_handle_arg@ identifier change_timer_function_usage._callback; identifier change_timer_function_usage._timer; type _handletype; identifier _handle; identifier t; @@ void _callback(struct timer_list *t) { - _handletype *_handle = from_timer(_handle, t, _timer); } // We only want to refactor the setup_timer() data argument if we've found // the matching callback. This undoes changes in change_timer_function_usage. @unchange_timer_function_usage depends on change_timer_function_usage && !change_callback_handle_cast && !change_callback_handle_cast_no_arg && !change_callback_handle_arg@ expression change_timer_function_usage._E; identifier change_timer_function_usage._timer; identifier change_timer_function_usage._callback; type change_timer_function_usage._cast_data; @@ ( -timer_setup(&_E->_timer, _callback, 0); +setup_timer(&_E->_timer, _callback, (_cast_data)_E); | -timer_setup(&_E._timer, _callback, 0); +setup_timer(&_E._timer, _callback, (_cast_data)&_E); ) // If we fixed a callback from a .function assignment, fix the // assignment cast now. @change_timer_function_assignment depends on change_timer_function_usage && (change_callback_handle_cast || change_callback_handle_cast_no_arg || change_callback_handle_arg)@ expression change_timer_function_usage._E; identifier change_timer_function_usage._timer; identifier change_timer_function_usage._callback; type _cast_func; typedef TIMER_FUNC_TYPE; @@ ( _E->_timer.function = -_callback +(TIMER_FUNC_TYPE)_callback ; | _E->_timer.function = -&_callback +(TIMER_FUNC_TYPE)_callback ; | _E->_timer.function = -(_cast_func)_callback; +(TIMER_FUNC_TYPE)_callback ; | _E->_timer.function = -(_cast_func)&_callback +(TIMER_FUNC_TYPE)_callback ; | _E._timer.function = -_callback +(TIMER_FUNC_TYPE)_callback ; | _E._timer.function = -&_callback; +(TIMER_FUNC_TYPE)_callback ; | _E._timer.function = -(_cast_func)_callback +(TIMER_FUNC_TYPE)_callback ; | _E._timer.function = -(_cast_func)&_callback +(TIMER_FUNC_TYPE)_callback ; ) // Sometimes timer functions are called directly. Replace matched args. @change_timer_function_calls depends on change_timer_function_usage && (change_callback_handle_cast || change_callback_handle_cast_no_arg || change_callback_handle_arg)@ expression _E; identifier change_timer_function_usage._timer; identifier change_timer_function_usage._callback; type _cast_data; @@ _callback( ( -(_cast_data)_E +&_E->_timer | -(_cast_data)&_E +&_E._timer | -_E +&_E->_timer ) ) // If a timer has been configured without a data argument, it can be // converted without regard to the callback argument, since it is unused. @match_timer_function_unused_data@ expression _E; identifier _timer; identifier _callback; @@ ( -setup_timer(&_E->_timer, _callback, 0); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, _callback, 0L); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, _callback, 0UL); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E._timer, _callback, 0); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, _callback, 0L); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, _callback, 0UL); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_timer, _callback, 0); +timer_setup(&_timer, _callback, 0); | -setup_timer(&_timer, _callback, 0L); +timer_setup(&_timer, _callback, 0); | -setup_timer(&_timer, _callback, 0UL); +timer_setup(&_timer, _callback, 0); | -setup_timer(_timer, _callback, 0); +timer_setup(_timer, _callback, 0); | -setup_timer(_timer, _callback, 0L); +timer_setup(_timer, _callback, 0); | -setup_timer(_timer, _callback, 0UL); +timer_setup(_timer, _callback, 0); ) @change_callback_unused_data depends on match_timer_function_unused_data@ identifier match_timer_function_unused_data._callback; type _origtype; identifier _origarg; @@ void _callback( -_origtype _origarg +struct timer_list *unused ) { ... when != _origarg } Signed-off-by: Kees Cook arch/alpha/kernel/srmcons.c | 7 ++--- arch/arm/mach-iop32x/n2100.c | 4 +-- arch/arm/mach-orion5x/db88f5281-setup.c | 4 +-- arch/blackfin/kernel/nmi.c | 4 +-- arch/mips/lasat/picvue_proc.c | 4 +-- arch/powerpc/kernel/tau_6xx.c | 4 +-- arch/powerpc/oprofile/op_model_cell.c | 8 +++--- arch/powerpc/platforms/cell/spufs/sched.c | 8 +++--- arch/powerpc/platforms/powermac/low_i2c.c | 6 ++-- arch/s390/kernel/time.c | 4 +-- arch/sh/drivers/heartbeat.c | 6 ++-- arch/sh/drivers/pci/common.c | 14 ++++----- arch/sh/drivers/push-switch.c | 6 ++-- block/blk-stat.c | 6 ++-- block/blk-throttle.c | 9 +++--- drivers/atm/ambassador.c | 9 +++--- drivers/atm/firestream.c | 6 ++-- drivers/atm/horizon.c | 8 +++--- drivers/atm/idt77252.c | 6 ++-- drivers/atm/lanai.c | 6 ++-- drivers/atm/nicstar.c | 6 ++-- drivers/block/DAC960.c | 8 +++--- drivers/block/DAC960.h | 2 +- drivers/block/rsxx/dma.c | 7 ++--- drivers/block/skd_main.c | 6 ++-- drivers/block/sunvdc.c | 9 +++--- drivers/block/umem.c | 4 +-- drivers/block/xsysace.c | 6 ++-- drivers/char/ipmi/bt-bmc.c | 7 ++--- drivers/char/ipmi/ipmi_msghandler.c | 4 +-- drivers/char/ipmi/ipmi_si_intf.c | 6 ++-- drivers/char/ipmi/ipmi_ssif.c | 7 ++--- drivers/char/tpm/tpm-dev-common.c | 7 ++--- drivers/gpu/drm/drm_vblank.c | 11 ++++---- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 6 ++-- drivers/gpu/drm/i2c/tda998x_drv.c | 7 ++--- drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 7 ++--- drivers/gpu/drm/msm/msm_gpu.c | 7 ++--- drivers/gpu/drm/omapdrm/dss/dsi.c | 4 +-- drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 6 ++-- drivers/gpu/drm/vgem/vgem_fence.c | 6 ++-- drivers/gpu/drm/via/via_dmablit.c | 7 ++--- drivers/hid/hid-appleir.c | 7 ++--- drivers/hid/hid-prodikeys.c | 7 ++--- drivers/hid/hid-wiimote-core.c | 6 ++-- drivers/iio/common/ssp_sensors/ssp_dev.c | 6 ++-- drivers/infiniband/hw/mlx5/mr.c | 6 ++-- drivers/input/gameport/gameport.c | 7 ++--- drivers/input/joystick/db9.c | 6 ++-- drivers/input/joystick/gamecon.c | 6 ++-- drivers/input/joystick/turbografx.c | 6 ++-- drivers/iommu/iova.c | 8 +++--- drivers/isdn/capi/capidrv.c | 6 ++-- drivers/isdn/divert/isdn_divert.c | 9 +++--- drivers/isdn/hardware/eicon/divasi.c | 9 +++--- drivers/isdn/hardware/mISDN/hfcmulti.c | 8 ++---- drivers/isdn/hardware/mISDN/hfcpci.c | 5 ++-- drivers/isdn/hardware/mISDN/mISDNisar.c | 10 +++---- drivers/isdn/i4l/isdn_common.c | 4 +-- drivers/isdn/i4l/isdn_net.c | 9 +++--- drivers/isdn/i4l/isdn_ppp.c | 9 +++--- drivers/isdn/i4l/isdn_tty.c | 7 ++--- drivers/media/platform/s5p-mfc/s5p_mfc.c | 7 ++--- .../media/platform/sti/c8sectpfe/c8sectpfe-core.c | 7 ++--- drivers/media/platform/vim2m.c | 6 ++-- drivers/media/usb/au0828/au0828-dvb.c | 7 ++--- drivers/media/usb/au0828/au0828-video.c | 14 ++++----- drivers/memstick/core/ms_block.c | 7 ++--- drivers/mfd/rtsx_usb.c | 6 ++-- drivers/mmc/core/host.c | 6 ++-- drivers/mtd/sm_ftl.c | 6 ++-- drivers/net/caif/caif_hsi.c | 21 ++++++-------- drivers/net/dsa/mv88e6xxx/phy.c | 7 ++--- drivers/net/eql.c | 6 ++-- drivers/net/ethernet/adi/bfin_mac.c | 9 +++--- drivers/net/ethernet/agere/et131x.c | 7 ++--- drivers/net/ethernet/amazon/ena/ena_netdev.c | 7 ++--- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 14 ++++----- drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 8 +++--- drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 8 +++--- drivers/net/ethernet/atheros/atlx/atl1.c | 8 +++--- drivers/net/ethernet/atheros/atlx/atl2.c | 15 +++++----- drivers/net/ethernet/broadcom/b44.c | 6 ++-- drivers/net/ethernet/broadcom/bnx2.c | 6 ++-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 6 ++-- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 ++-- drivers/net/ethernet/broadcom/tg3.c | 6 ++-- drivers/net/ethernet/cisco/enic/enic_main.c | 7 ++--- drivers/net/ethernet/marvell/mv643xx_eth.c | 13 ++++----- drivers/net/ethernet/marvell/pxa168_eth.c | 7 ++--- drivers/net/ethernet/marvell/skge.c | 6 ++-- drivers/net/ethernet/marvell/sky2.c | 6 ++-- drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 7 ++--- .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 8 +++--- drivers/net/ethernet/pasemi/pasemi_mac.c | 7 ++--- drivers/net/ethernet/qlogic/qla3xxx.c | 6 ++-- drivers/net/ethernet/rocker/rocker_ofdpa.c | 7 ++--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 15 +++++----- drivers/net/ethernet/synopsys/dwc-xlgmac-net.c | 7 ++--- drivers/net/ethernet/ti/cpsw_ale.c | 6 ++-- drivers/net/ethernet/ti/netcp_ethss.c | 7 ++--- drivers/net/ethernet/toshiba/spider_net.c | 16 +++++------ drivers/net/slip/slip.c | 16 +++++------ drivers/net/tun.c | 8 ++++-- drivers/net/wan/hdlc_ppp.c | 6 ++-- .../wireless/broadcom/brcm80211/brcmfmac/btcoex.c | 6 ++-- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 7 ++--- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 7 ++--- drivers/net/wireless/intel/iwlwifi/dvm/main.c | 14 ++++----- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 7 ++--- drivers/net/wireless/intersil/hostap/hostap_ap.c | 6 ++-- drivers/net/wireless/intersil/hostap/hostap_hw.c | 14 ++++----- .../net/wireless/intersil/orinoco/orinoco_usb.c | 6 ++-- drivers/net/wireless/quantenna/qtnfmac/core.c | 2 +- drivers/net/wireless/ti/wlcore/main.c | 7 ++--- drivers/net/xen-netfront.c | 7 ++--- drivers/nfc/pn533/pn533.c | 7 ++--- drivers/nfc/st-nci/ndlc.c | 12 ++++---- drivers/ntb/test/ntb_pingpong.c | 8 +++--- drivers/platform/x86/sony-laptop.c | 4 +-- drivers/pps/clients/pps-ktimer.c | 4 +-- drivers/rtc/rtc-dev.c | 6 ++-- drivers/s390/block/dasd.c | 17 ++++++----- drivers/s390/net/fsm.c | 9 +++--- drivers/scsi/arcmsr/arcmsr_hba.c | 12 ++++---- drivers/scsi/arm/fas216.c | 6 ++-- drivers/scsi/bfa/bfad.c | 6 ++-- drivers/scsi/bfa/bfad_drv.h | 2 +- drivers/scsi/bnx2fc/bnx2fc_tgt.c | 16 +++++------ drivers/scsi/esas2r/esas2r_main.c | 8 +++--- drivers/scsi/fcoe/fcoe_ctlr.c | 8 +++--- drivers/scsi/fnic/fnic_main.c | 14 ++++----- drivers/scsi/ncr53c8xx.c | 6 ++-- drivers/staging/greybus/operation.c | 7 ++--- drivers/staging/lustre/lnet/lnet/net_fault.c | 6 ++-- drivers/staging/lustre/lustre/ptlrpc/service.c | 9 +++--- drivers/staging/media/imx/imx-ic-prpencvf.c | 7 ++--- drivers/staging/media/imx/imx-media-csi.c | 7 ++--- drivers/staging/most/hdm-usb/hdm_usb.c | 7 ++--- .../staging/rtl8192u/ieee80211/ieee80211_softmac.c | 16 +++++------ drivers/staging/rtl8712/recv_linux.c | 9 +++--- drivers/staging/rtl8712/rtl8712_led.c | 9 +++--- drivers/staging/unisys/visorbus/visorbus_main.c | 6 ++-- drivers/staging/unisys/visornic/visornic_main.c | 8 +++--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 +++--- drivers/target/target_core_user.c | 7 ++--- drivers/tty/ipwireless/hardware.c | 11 ++++---- drivers/tty/n_gsm.c | 12 ++++---- drivers/tty/n_r3964.c | 8 +++--- drivers/tty/serial/crisv10.c | 4 +-- drivers/tty/serial/fsl_lpuart.c | 7 ++--- drivers/tty/serial/ifx6x60.c | 7 ++--- drivers/tty/serial/imx.c | 6 ++-- drivers/tty/serial/kgdb_nmi.c | 6 ++-- drivers/tty/serial/max3100.c | 7 ++--- drivers/tty/serial/mux.c | 4 +-- drivers/tty/serial/pnx8xxx_uart.c | 7 ++--- drivers/tty/serial/sa1100.c | 7 ++--- drivers/tty/serial/sh-sci.c | 16 +++++------ drivers/tty/serial/sn_console.c | 6 ++-- drivers/tty/synclink.c | 8 +++--- drivers/tty/synclink_gt.c | 16 +++++------ drivers/tty/synclinkmp.c | 17 ++++++----- drivers/usb/core/hcd.c | 8 ++++-- drivers/usb/dwc2/hcd.c | 7 ++--- drivers/usb/dwc2/hcd_queue.c | 7 ++--- drivers/usb/gadget/udc/at91_udc.c | 7 ++--- drivers/usb/gadget/udc/dummy_hcd.c | 8 +++--- drivers/usb/gadget/udc/m66592-udc.c | 6 ++-- drivers/usb/gadget/udc/omap_udc.c | 6 ++-- drivers/usb/gadget/udc/pxa25x_udc.c | 6 ++-- drivers/usb/gadget/udc/r8a66597-udc.c | 6 ++-- drivers/usb/host/ohci-hcd.c | 9 +++--- drivers/usb/host/oxu210hp-hcd.c | 6 ++-- drivers/usb/host/r8a66597-hcd.c | 7 ++--- drivers/usb/host/sl811-hcd.c | 6 ++-- drivers/usb/host/uhci-hcd.c | 3 +- drivers/usb/host/uhci-q.c | 4 +-- drivers/usb/host/xhci.c | 8 +++--- drivers/usb/serial/mos7840.c | 15 +++++----- drivers/usb/storage/realtek_cr.c | 7 ++--- drivers/uwb/drp.c | 6 ++-- drivers/uwb/neh.c | 8 +++--- drivers/uwb/rsv.c | 15 +++++----- drivers/uwb/uwb-internal.h | 2 +- drivers/watchdog/at91sam9_wdt.c | 6 ++-- drivers/watchdog/bcm47xx_wdt.c | 9 +++--- drivers/watchdog/bcm63xx_wdt.c | 4 +-- drivers/watchdog/cpu5wdt.c | 4 +-- drivers/watchdog/mpc8xxx_wdt.c | 7 ++--- drivers/watchdog/mtx-1_wdt.c | 4 +-- drivers/watchdog/nuc900_wdt.c | 4 +-- drivers/watchdog/pcwd.c | 4 +-- drivers/watchdog/pika_wdt.c | 4 +-- drivers/watchdog/rdc321x_wdt.c | 4 +-- drivers/watchdog/shwdt.c | 6 ++-- fs/ocfs2/cluster/tcp.c | 9 +++--- kernel/padata.c | 6 ++-- kernel/time/clocksource.c | 4 +-- net/802/garp.c | 6 ++-- net/802/mrp.c | 13 ++++----- net/appletalk/aarp.c | 4 +-- net/appletalk/ddp.c | 7 ++--- net/batman-adv/tp_meter.c | 14 ++++----- net/bluetooth/hidp/core.c | 7 ++--- net/bluetooth/rfcomm/core.c | 12 ++++---- net/bluetooth/sco.c | 6 ++-- net/core/drop_monitor.c | 7 ++--- net/core/gen_estimator.c | 6 ++-- net/core/neighbour.c | 14 ++++----- net/decnet/dn_route.c | 4 +-- net/decnet/dn_timer.c | 8 +++--- net/ipv4/igmp.c | 20 ++++++------- net/ipv4/ipmr.c | 9 +++--- net/ipv6/addrconf.c | 9 +++--- net/ipv6/ip6mr.c | 9 +++--- net/ipv6/mcast.c | 33 ++++++++++------------ net/ncsi/ncsi-manage.c | 8 ++---- net/netfilter/nf_conntrack_expect.c | 7 ++--- net/netfilter/nfnetlink_log.c | 8 +++--- net/netfilter/xt_IDLETIMER.c | 7 ++--- net/netfilter/xt_LED.c | 8 +++--- net/nfc/nci/core.c | 14 ++++----- net/rxrpc/call_object.c | 7 ++--- net/wireless/lib80211.c | 11 ++++---- net/x25/x25_link.c | 8 +++--- net/xfrm/xfrm_state.c | 9 +++--- 227 files changed, 824 insertions(+), 937 deletions(-) commit b9eaf18722221ef8b2bd6a67240ebe668622152a Author: Kees Cook Date: Mon Oct 16 13:15:39 2017 -0700 treewide: init_timer() -> setup_timer() This mechanically converts all remaining cases of ancient open-coded timer setup with the old setup_timer() API, which is the first step in timer conversions. This has no behavioral changes, since it ultimately just changes the order of assignment to fields of struct timer_list when finding variations of: init_timer(&t); f.function = timer_callback; t.data = timer_callback_arg; to be converted into: setup_timer(&t, timer_callback, timer_callback_arg); The conversion is done with the following Coccinelle script, which is an improved version of scripts/cocci/api/setup_timer.cocci, in the following ways: - assignments-before-init_timer() cases - limit the .data case removal to the specific struct timer_list instance - handling calls by dereference (timer->field vs timer.field) spatch --very-quiet --all-includes --include-headers \ -I ./arch/x86/include -I ./arch/x86/include/generated \ -I ./include -I ./arch/x86/include/uapi \ -I ./arch/x86/include/generated/uapi -I ./include/uapi \ -I ./include/generated/uapi --include ./include/linux/kconfig.h \ --dir . \ --cocci-file ~/src/data/setup_timer.cocci @fix_address_of@ expression e; @@ init_timer( -&(e) +&e , ...) // Match the common cases first to avoid Coccinelle parsing loops with // "... when" clauses. @match_immediate_function_data_after_init_timer@ expression e, func, da; @@ -init_timer +setup_timer ( \(&e\|e\) +, func, da ); ( -\(e.function\|e->function\) = func; -\(e.data\|e->data\) = da; | -\(e.data\|e->data\) = da; -\(e.function\|e->function\) = func; ) @match_immediate_function_data_before_init_timer@ expression e, func, da; @@ ( -\(e.function\|e->function\) = func; -\(e.data\|e->data\) = da; | -\(e.data\|e->data\) = da; -\(e.function\|e->function\) = func; ) -init_timer +setup_timer ( \(&e\|e\) +, func, da ); @match_function_and_data_after_init_timer@ expression e, e2, e3, e4, e5, func, da; @@ -init_timer +setup_timer ( \(&e\|e\) +, func, da ); ... when != func = e2 when != da = e3 ( -e.function = func; ... when != da = e4 -e.data = da; | -e->function = func; ... when != da = e4 -e->data = da; | -e.data = da; ... when != func = e5 -e.function = func; | -e->data = da; ... when != func = e5 -e->function = func; ) @match_function_and_data_before_init_timer@ expression e, e2, e3, e4, e5, func, da; @@ ( -e.function = func; ... when != da = e4 -e.data = da; | -e->function = func; ... when != da = e4 -e->data = da; | -e.data = da; ... when != func = e5 -e.function = func; | -e->data = da; ... when != func = e5 -e->function = func; ) ... when != func = e2 when != da = e3 -init_timer +setup_timer ( \(&e\|e\) +, func, da ); @r1 exists@ expression t; identifier f; position p; @@ f(...) { ... when any init_timer@p(\(&t\|t\)) ... when any } @r2 exists@ expression r1.t; identifier g != r1.f; expression e8; @@ g(...) { ... when any \(t.data\|t->data\) = e8 ... when any } // It is dangerous to use setup_timer if data field is initialized // in another function. @script:python depends on r2@ p << r1.p; @@ cocci.include_match(False) @r3@ expression r1.t, func, e7; position r1.p; @@ ( -init_timer@p(&t); +setup_timer(&t, func, 0UL); ... when != func = e7 -t.function = func; | -t.function = func; ... when != func = e7 -init_timer@p(&t); +setup_timer(&t, func, 0UL); | -init_timer@p(t); +setup_timer(t, func, 0UL); ... when != func = e7 -t->function = func; | -t->function = func; ... when != func = e7 -init_timer@p(t); +setup_timer(t, func, 0UL); ) Signed-off-by: Kees Cook arch/arm/mach-iop32x/n2100.c | 3 +-- arch/blackfin/kernel/nmi.c | 3 +-- arch/sh/drivers/pci/common.c | 10 ++++------ arch/sh/drivers/push-switch.c | 5 +---- drivers/atm/firestream.c | 4 +--- drivers/atm/lanai.c | 4 +--- drivers/atm/nicstar.c | 4 +--- drivers/block/DAC960.c | 5 ++--- drivers/block/umem.c | 3 +-- drivers/gpu/drm/omapdrm/dss/dsi.c | 4 +--- drivers/infiniband/hw/mthca/mthca_catas.c | 4 +--- drivers/isdn/i4l/isdn_common.c | 3 +-- drivers/isdn/i4l/isdn_net.c | 6 +++--- drivers/media/platform/s5p-mfc/s5p_mfc.c | 5 ++--- drivers/media/usb/au0828/au0828-dvb.c | 5 ++--- drivers/net/wireless/intersil/hostap/hostap_ap.c | 4 +--- drivers/net/wireless/intersil/hostap/hostap_hw.c | 11 ++++------- drivers/nfc/pn533/pn533.c | 5 ++--- drivers/nfc/st-nci/ndlc.c | 9 ++------- drivers/nfc/st-nci/se.c | 11 ++++------- drivers/nfc/st21nfca/se.c | 10 ++++------ drivers/s390/block/dasd.c | 9 +++------ drivers/s390/net/fsm.c | 4 +--- drivers/scsi/arcmsr/arcmsr_hba.c | 10 ++++------ drivers/scsi/arm/fas216.c | 4 +--- drivers/scsi/bfa/bfad.c | 4 +--- drivers/scsi/esas2r/esas2r_main.c | 4 +--- drivers/scsi/ncr53c8xx.c | 4 +--- drivers/scsi/sym53c8xx_2/sym_glue.c | 4 +--- drivers/usb/gadget/udc/omap_udc.c | 4 +--- kernel/time/clocksource.c | 3 +-- 31 files changed, 55 insertions(+), 113 deletions(-) commit 24ed960abf1d50cb7834e99a0cfc081bc0656712 Author: Kees Cook Date: Mon Aug 28 11:28:21 2017 -0700 treewide: Switch DEFINE_TIMER callbacks to struct timer_list * This changes all DEFINE_TIMER() callbacks to use a struct timer_list pointer instead of unsigned long. Since the data argument has already been removed, none of these callbacks are using their argument currently, so this renames the argument to "unused". Done using the following semantic patch: @match_define_timer@ declarer name DEFINE_TIMER; identifier _timer, _callback; @@ DEFINE_TIMER(_timer, _callback); @change_callback depends on match_define_timer@ identifier match_define_timer._callback; type _origtype; identifier _origarg; @@ void -_callback(_origtype _origarg) +_callback(struct timer_list *unused) { ... } Signed-off-by: Kees Cook arch/arm/mach-ixp4xx/dsmg600-setup.c | 4 ++-- arch/arm/mach-ixp4xx/nas100d-setup.c | 4 ++-- arch/m68k/amiga/amisound.c | 4 ++-- arch/m68k/mac/macboing.c | 4 ++-- arch/mips/mti-malta/malta-display.c | 4 ++-- arch/parisc/kernel/pdc_cons.c | 4 ++-- drivers/atm/idt77105.c | 8 ++++---- drivers/atm/iphase.c | 4 ++-- drivers/block/ataflop.c | 16 ++++++++-------- drivers/char/dtlk.c | 4 ++-- drivers/char/hangcheck-timer.c | 4 ++-- drivers/char/nwbutton.c | 4 ++-- drivers/char/nwbutton.h | 2 +- drivers/char/rtc.c | 4 ++-- drivers/input/touchscreen/s3c2410_ts.c | 2 +- drivers/net/wireless/atmel/at76c50x-usb.c | 4 ++-- drivers/staging/speakup/main.c | 4 ++-- drivers/staging/speakup/synth.c | 2 +- drivers/tty/cyclades.c | 4 ++-- drivers/tty/isicom.c | 4 ++-- drivers/tty/moxa.c | 4 ++-- drivers/tty/rocket.c | 4 ++-- drivers/tty/vt/keyboard.c | 2 +- drivers/tty/vt/vt.c | 4 ++-- drivers/watchdog/alim7101_wdt.c | 4 ++-- drivers/watchdog/machzwd.c | 4 ++-- drivers/watchdog/mixcomwd.c | 4 ++-- drivers/watchdog/sbc60xxwdt.c | 4 ++-- drivers/watchdog/sc520_wdt.c | 4 ++-- drivers/watchdog/via_wdt.c | 4 ++-- drivers/watchdog/w83877f_wdt.c | 4 ++-- drivers/xen/grant-table.c | 4 ++-- fs/pstore/platform.c | 4 ++-- kernel/irq/spurious.c | 4 ++-- lib/random32.c | 4 ++-- net/decnet/dn_route.c | 4 ++-- net/ipv6/ip6_flowlabel.c | 4 ++-- net/netrom/nr_loopback.c | 4 ++-- security/keys/gc.c | 4 ++-- 39 files changed, 82 insertions(+), 82 deletions(-) commit 6cc73a06da439e80c6686883d45ca32b614a4b97 Author: Kees Cook Date: Mon Oct 23 22:41:17 2017 -0700 s390: cmm: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Thomas Gleixner Cc: Geert Uytterhoeven Cc: Arnd Bergmann Cc: Guenter Roeck Cc: Paul Gortmaker Cc: linux-s390@vger.kernel.org Signed-off-by: Kees Cook arch/s390/mm/cmm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 87c1d2d373c2dfc9993f09c3cfd69cf2c3347b20 Author: Kees Cook Date: Tue Oct 17 21:10:19 2017 -0700 lightnvm: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Matias Bjorling Cc: linux-block@vger.kernel.org Signed-off-by: Kees Cook drivers/lightnvm/pblk-core.c | 4 ++-- drivers/lightnvm/pblk-gc.c | 6 +++--- drivers/lightnvm/pblk-init.c | 2 +- drivers/lightnvm/pblk-rl.c | 6 +++--- drivers/lightnvm/pblk.h | 2 +- drivers/lightnvm/rrpc.c | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) commit bd1a7b44768a6a926a95e80c98b6be5f461f76e0 Author: Kees Cook Date: Mon Oct 23 22:37:41 2017 -0700 drivers/net: cris: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Kalle Valo Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: "yuval.shaia@oracle.com" Cc: Paul Gortmaker Cc: Philippe Reynes Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook drivers/net/cris/eth_v10.c | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) commit 0078730f5b829226b03194332b3405314e60c81b Author: Kees Cook Date: Tue Oct 24 08:16:48 2017 -0700 drm/vc4: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Eric Anholt Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Signed-off-by: Kees Cook Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20171024151648.GA104538@beast Reviewed-by: Eric Anholt drivers/gpu/drm/vc4/vc4_bo.c | 9 +++------ drivers/gpu/drm/vc4/vc4_gem.c | 10 ++++------ 2 files changed, 7 insertions(+), 12 deletions(-) commit bca237a52ca0035b0a0380003283d8bf590188d5 Author: Kees Cook Date: Mon Aug 28 15:03:41 2017 -0700 block/laptop_mode: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jens Axboe Cc: Michal Hocko Cc: Andrew Morton Cc: Jan Kara Cc: Johannes Weiner Cc: Nicholas Piggin Cc: Vladimir Davydov Cc: Matthew Wilcox Cc: Jeff Layton Cc: linux-block@vger.kernel.org Cc: linux-mm@kvack.org Signed-off-by: Kees Cook block/blk-core.c | 10 +++++----- include/linux/writeback.h | 2 +- mm/page-writeback.c | 7 ++++--- 3 files changed, 10 insertions(+), 9 deletions(-) commit 1e9aa74ecd84ac3eeffb7a9f08f9021d7df6486a Author: Kees Cook Date: Tue Aug 22 12:41:43 2017 -0700 net/atm/mpc: Avoid open-coded assignment of timer callback function Instead of a single function assignment, just fold this into DEFINE_TIMER(). Cc: "David S. Miller" Signed-off-by: Kees Cook net/atm/mpc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2ea5b4def995994a3c5b8fe075b42c1619873ad6 Author: Kees Cook Date: Sun Oct 22 17:54:03 2017 -0700 drm/i915/selftests: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: David Airlie Cc: Tvrtko Ursulin Cc: Chris Wilson Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Kees Cook Acked-by: Jani Nikula drivers/gpu/drm/i915/selftests/lib_sw_fence.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 72a9f9a445d4e296484aa5dfbfea6254d01f7cf5 Author: Kees Cook Date: Sat Oct 21 00:12:34 2017 -0700 usb: usbatm: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Additionally corrects and on-stack timer usage. Cc: Greg Kroah-Hartman Cc: Duncan Sands Cc: "Gustavo A. R. Silva" Cc: accessrunner-general@lists.sourceforge.net Cc: linux-usb@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Allen Pais drivers/usb/atm/cxacru.c | 23 ++++++++++++++++------- drivers/usb/atm/speedtch.c | 16 ++++++++-------- drivers/usb/atm/usbatm.c | 10 +++++----- 3 files changed, 29 insertions(+), 20 deletions(-) commit ff07a23fec3f9ea28d22852097260b38903891c4 Author: Kees Cook Date: Sun Oct 22 17:51:09 2017 -0700 drivers/firmware: psci: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Also adds missing call to destroy_timer_on_stack(). Cc: Mark Rutland Cc: Lorenzo Pieralisi Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Kees Cook drivers/firmware/psci_checker.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 82385732b1c9d6a22942b5fe6e48a99891cb806f Author: Vineet Gupta Date: Wed Sep 28 11:53:17 2016 -0700 ARC: perf: avoid vmalloc backed mmap For non-alising Dcache, vmalloc is not needed. vmalloc triggers additonal D-TLB Misses in the perf interrupt code path making it slightly inefficient as evident from hackbench runs below. | [ARCLinux]# perf stat -e dTLB-load-misses --repeat 5 hackbench | Running with 10*40 (== 400) tasks. | Time: 35.060 | ... | Performance counter stats for 'hackbench' (5 runs): Before: 399235 dTLB-load-misses ( +- 2.08% ) After : 397676 dTLB-load-misses ( +- 2.27% ) Acked-by: Peter Zijlstra (Intel) Signed-off-by: Vineet Gupta arch/arc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b9027d6d044d4917992119d184ab0bb616489cc Author: Vineet Gupta Date: Thu Oct 8 22:17:48 2015 +0530 ARCv2: perf: optimize given that num counters <= 32 use ffz primitive which maps to ARCv2 instruction, vs. non atomic __test_and_set_bit It is unlikely if we will even have more than 32 counters, but still add a BUILD_BUG to catch that Acked-by: Peter Zijlstra (Intel) Signed-off-by: Vineet Gupta arch/arc/kernel/perf_event.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 4d431290402c8d867af7ba45ee75407d68748c4a Author: Vineet Gupta Date: Sat May 9 18:27:30 2015 +0530 ARCv2: perf: tweak overflow interrupt Current perf ISR loops thru all 32 counters, checking for each if it caused the interrupt. Instead only loop thru counters which actually interrupted (typically 1). Acked-by: Peter Zijlstra (Intel) Signed-off-by: Vineet Gupta arch/arc/kernel/perf_event.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 7e8a09e05a0f0ccaf6b2a16f12ed6edc8e62c47d Author: Jesse Chan Date: Mon Nov 20 13:32:01 2017 -0800 cpufreq: mediatek: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE This change resolves a new compile-time warning when built as a loadable module: WARNING: modpost: missing MODULE_LICENSE() in drivers/cpufreq/mediatek-cpufreq.o see include/linux/module.h for more information This adds the license as "GPL v2", which matches the header of the file. MODULE_DESCRIPTION and MODULE_AUTHOR are also added. Signed-off-by: Jesse Chan Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/mediatek-cpufreq.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0d307935fefa6389eb726c6362351c162c949101 Author: James Hogan Date: Wed Nov 15 21:17:55 2017 +0000 cpufreq: Add Loongson machine dependencies The MIPS loongson cpufreq drivers don't build unless configured for the correct machine type, due to dependency on machine specific architecture headers and symbols in machine specific platform code. More specifically loongson1-cpufreq.c uses RST_CPU_EN and RST_CPU, neither of which is defined in asm/mach-loongson32/regs-clk.h unless CONFIG_LOONGSON1_LS1B=y, and loongson2_cpufreq.c references loongson2_clockmod_table[], which is only defined in arch/mips/loongson64/lemote-2f/clock.c, i.e. when CONFIG_LEMOTE_MACH2F=y. Add these dependencies to Kconfig to avoid randconfig / allyesconfig build failures (e.g. when based on BMIPS which also has a cpufreq driver). Signed-off-by: James Hogan Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 542134c0375b5ca2b1d18490c02b8a20bfdd8d74 Author: Eudean Sun Date: Tue Nov 21 10:43:24 2017 -0800 HID: cp2112: Fix I2C_BLOCK_DATA transactions The existing driver erroneously treats I2C_BLOCK_DATA and BLOCK_DATA commands the same. For I2C_BLOCK_DATA reads, the length of the read is provided in data->block[0], but the length itself should not be sent to the slave. In contrast, for BLOCK_DATA reads no length is specified since the length will be the first byte returned from the slave. When copying data back to the data buffer, for an I2C_BLOCK_DATA read we have to take care not to overwrite data->block[0] to avoid overwriting the length. A BLOCK_DATA read doesn't have this concern since the first byte returned by the device is the length and belongs in data->block[0]. For I2C_BLOCK_DATA writes, the length is also provided in data->block[0], but the length itself is not sent to the slave (in contrast to BLOCK_DATA writes where the length prefixes the data sent to the slave). This was tested on physical hardware using i2cdump with the i and s flags to test the behavior of I2C_BLOCK_DATA reads and BLOCK_DATA reads, respectively. Writes were not tested but the I2C_BLOCK_DATA write change is pretty simple to verify by inspection. Signed-off-by: Eudean Sun Signed-off-by: Jiri Kosina drivers/hid/hid-cp2112.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit f1a8b8e3d98b0b3d1d88d119f52cc85d05ab3189 Author: Yonghong Song Date: Tue Nov 21 11:23:40 2017 -0800 bpf: change bpf_probe_write_user to bpf_trace_printk in test_verifier There are four tests in test_verifier using bpf_probe_write_user helper. These four tests will emit the following kernel messages [ 12.974753] test_verifier[220] is installing a program with bpf_probe_write_user helper that may corrupt user memory! [ 12.979285] test_verifier[220] is installing a program with bpf_probe_write_user helper that may corrupt user memory! ...... This may confuse certain users. This patch replaces bpf_probe_write_user with bpf_trace_printk. The test_verifier already uses bpf_trace_printk earlier in the test and a trace_printk warning message has been printed. So this patch does not emit any more kernel messages. Fixes: b6ff63911232 ("bpf: fix and add test cases for ARG_CONST_SIZE_OR_ZERO semantics change") Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann tools/testing/selftests/bpf/test_verifier.c | 39 ++++++++++++----------------- 1 file changed, 16 insertions(+), 23 deletions(-) commit c6f9288ee460565b94994aaf3261318199c2a674 Author: weiyongjun (A) Date: Tue Nov 14 13:40:13 2017 +0000 platform/x86: dell-laptop: fix error return code in dell_init() Fix to return error code -ENOMEM from the kzalloc() error handling case instead of 0, as done elsewhere in this function. Fixes: 549b4930f057 ("platform/x86: dell-smbios: Introduce dispatcher for SMM calls") Signed-off-by: Wei Yongjun Acked-by: Mario Limonciello Signed-off-by: Andy Shevchenko drivers/platform/x86/dell-laptop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0a62d6c966956d77397c32836a5bbfe3af786fc1 Author: Takashi Iwai Date: Tue Nov 21 17:28:06 2017 +0100 ALSA: usb-audio: Add sanity checks in v2 clock parsers The helper functions to parse and look for the clock source, selector and multiplier unit may return the descriptor with a too short length than required, while there is no sanity check in the caller side. Add some sanity checks in the parsers, at least, to guarantee the given descriptor size, for avoiding the potential crashes. Fixes: 79f920fbff56 ("ALSA: usb-audio: parse clock topology of UAC2 devices") Reported-by: Andrey Konovalov Cc: Signed-off-by: Takashi Iwai sound/usb/clock.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 8428a8ebde2db1e988e41a58497a28beb7ce1705 Author: Takashi Iwai Date: Tue Nov 21 17:07:43 2017 +0100 ALSA: usb-audio: Fix potential zero-division at parsing FU parse_audio_feature_unit() contains a code dividing potentially with zero when a malformed FU descriptor is passed. Although there is already a sanity check, it checks only the value zero, hence it can still lead to a zero-division when a value 1 is passed there. Fix it by correcting the sanity check (and the error message thereof). Fixes: 23caaf19b11e ("ALSA: usb-mixer: Add support for Audio Class v2.0") Cc: Signed-off-by: Takashi Iwai sound/usb/mixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f658f17b5e0e339935dca23e77e0f3cad591926b Author: Takashi Iwai Date: Tue Nov 21 17:00:32 2017 +0100 ALSA: usb-audio: Fix potential out-of-bound access at parsing SU The usb-audio driver may trigger an out-of-bound access at parsing a malformed selector unit, as it checks the header length only after evaluating bNrInPins field, which can be already above the given length. Fix it by adding the length check beforehand. Fixes: 99fc86450c43 ("ALSA: usb-mixer: parse descriptors with structs") Cc: Signed-off-by: Takashi Iwai sound/usb/mixer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d937cd6790a2bef2d07b500487646bd794c039bb Author: Takashi Iwai Date: Tue Nov 21 16:55:51 2017 +0100 ALSA: usb-audio: Add sanity checks to FE parser When the usb-audio descriptor contains the malformed feature unit description with a too short length, the driver may access out-of-bounds. Add a sanity check of the header size at the beginning of parse_audio_feature_unit(). Fixes: 23caaf19b11e ("ALSA: usb-mixer: Add support for Audio Class v2.0") Reported-by: Andrey Konovalov Cc: Signed-off-by: Takashi Iwai sound/usb/mixer.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 0c86a6bd85ff0629cd2c5141027fc1c8bb6cde9c Merge: b620fd2 a13e8d4 Author: Linus Torvalds Date: Tue Nov 21 05:56:12 2017 -1000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix a reference to a module parameter which was lost during the GREv6 receive path rewrite, from Alexey Kodanev. 2) Fix deref before NULL check in ipheth, from Gustavo A. R. Silva. 3) RCU read lock imbalance in tun_build_skb(), from Xin Long. 4) Some stragglers from the mac80211 folks: a) Timer conversions from Kees Cook b) Fix some sequencing issue when cfg80211 is built statically, from Johannes Berg c) Memory leak in mac80211_hwsim, from Ben Hutchings. 5) Add new qmi_wwan device ID, from Sebastian Sjoholm. 6) Fix use after free in tipc, from Jon Maloy. 7) Missing kdoc in nfp driver, from Jakub Kicinski. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: nfp: flower: add missing kdoc tipc: fix access of released memory net: qmi_wwan: add Quectel BG96 2c7c:0296 mlxsw: spectrum: Do not try to create non-existing ports during unsplit mac80211: properly free requested-but-not-started TX agg sessions mac80211_hwsim: Fix memory leak in hwsim_new_radio_nl() cfg80211: initialize regulatory keys/database later mac80211: aggregation: Convert timers to use timer_setup() nl80211: don't expose wdev->ssid for most interfaces mac80211: Convert timers to use timer_setup() net: vxge: Fix some indentation issues net: ena: fix race condition between device reset and link up setup r8169: use same RTL8111EVL green settings as in vendor driver r8169: fix RTL8111EVL EEE and green settings tun: fix rcu_read_lock imbalance in tun_build_skb tcp: when scheduling TLP, time of RTO should account for current ACK usbnet: ipheth: fix potential null pointer dereference in ipheth_carrier_set gre6: use log_ecn_error module parameter in ip6_tnl_rcv() commit 446947b44fb8cabc0213ff4efd706931e36b1963 Author: Wang Hongcheng Date: Fri Nov 17 10:39:02 2017 +0800 drm/amdgpu: fix rmmod KCQ disable failed error If gfx_v8_0_hw_fini is called after amdgpu_ucode_fini_bo, we will hit KCQ disabled failed. Let amdgpu_ucode_fini_bo run after gfx_v8_0_hw_fini. BUG: SWDEV-135547 Reviewed-by: Rex Zhu Signed-off-by: Wang Hongcheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 3 --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) commit d5a480b44b189bad1d67df5d4c5ed9e6c750e8f2 Author: Xiangliang.Yu Date: Fri Oct 20 17:21:40 2017 +0800 drm/amdgpu: fix kernel hang when starting VNC server After starting VNC server or running CTS test, kernel will hang and can see below call trace: [961816] INFO: task khugepaged:42 blocked for more than 120 seconds. [968581] Tainted: G OE 4.13.0 #1 [973495] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [980962] khugepaged D 0 42 2 0x00000000 [980967] Call Trace: [980977] __schedule+0x28d/0x890 [980982] schedule+0x36/0x80 [980986] rwsem_down_read_failed+0x139/0x1c0 [980991] ? update_curr+0x100/0x1c0 [981004] call_rwsem_down_read_failed+0x18/0x30 [981007] down_read+0x20/0x40 [981012] khugepaged_scan_mm_slot+0x78/0x1ac0 [981018] ? __switch_to+0x23e/0x4a0 [981022] ? finish_task_switch+0x79/0x240 [981026] khugepaged+0x146/0x480 [981031] ? remove_wait_queue+0x60/0x60 [981035] kthread+0x109/0x140 [981037] ? khugepaged_scan_mm_slot+0x1ac0/0x1ac0 [981039] ? kthread_park+0x60/0x60 [981044] ret_from_fork+0x25/0x30 After checking code and found 'commit b72cf4fca2bb7 ("drm/amdgpu: move taking mmap_sem into get_user_pages v2")' forget to drop one case of up_read. Signed-off-by: Xiangliang.Yu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit b620fd2df20d2073b4f432113e0de9a6b5d33be5 Merge: adb072d db0267e Author: Linus Torvalds Date: Tue Nov 21 05:40:48 2017 -1000 Merge tag 'for-linus-4.15-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs updates from Mike Marshall: "Fix: - stop setting atime on inode dirty (Martin Brandenburg) Cleanups: - remove initialization of i_version (Jeff Layton) - use ARRAY_SIZE (Jérémy Lefaure) - call op_release sooner when creating inodes (Mike MarshallMartin Brandenburg)" * tag 'for-linus-4.15-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: call op_release sooner when creating inodes orangefs: stop setting atime on inode dirty orangefs: use ARRAY_SIZE orangefs: remove initialization of i_version commit adb072d3cd03dbdabdc3492488f67050b0fb4fd5 Merge: 11ca75d 3cfa3b1 Author: Linus Torvalds Date: Tue Nov 21 05:38:32 2017 -1000 Merge tag 'ceph-for-4.15-rc1' of git://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "We have a set of file locking improvements from Zheng, rbd rw/ro state handling code cleanup from myself and some assorted CephFS fixes from Jeff. rbd now defaults to single-major=Y, lifting the limit of ~240 rbd images per host for everyone" * tag 'ceph-for-4.15-rc1' of git://github.com/ceph/ceph-client: rbd: default to single-major device number scheme libceph: don't WARN() if user tries to add invalid key rbd: set discard_alignment to zero ceph: silence sparse endianness warning in encode_caps_cb ceph: remove the bump of i_version ceph: present consistent fsid, regardless of arch endianness ceph: clean up spinlocking and list handling around cleanup_cap_releases() rbd: get rid of rbd_mapping::read_only rbd: fix and simplify rbd_ioctl_set_ro() ceph: remove unused and redundant variable dropping ceph: mark expected switch fall-throughs ceph: -EINVAL on decoding failure in ceph_mdsc_handle_fsmap() ceph: disable cached readdir after dropping positive dentry ceph: fix bool initialization/comparison ceph: handle 'session get evicted while there are file locks' ceph: optimize flock encoding during reconnect ceph: make lock_to_ceph_filelock() static ceph: keep auth cap when inode has flocks or posix locks commit 3d4e8303f2c747c8540a0a0126d0151514f6468b Author: Takashi Iwai Date: Tue Nov 21 16:36:11 2017 +0100 ALSA: timer: Remove kernel warning at compat ioctl error paths Some timer compat ioctls have NULL checks of timer instance with snd_BUG_ON() that bring up WARN_ON() when the debug option is set. Actually the condition can be met in the normal situation and it's confusing and bad to spew kernel warnings with stack trace there. Let's remove snd_BUG_ON() invocation and replace with the simple checks. Also, correct the error code to EBADFD to follow the native ioctl error handling. Reported-by: syzbot Cc: Signed-off-by: Takashi Iwai sound/core/timer_compat.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 11ca75d2d6d18d5a7ee4d7ec1da6f864f5c8c8be Merge: e1d1ea5 9afe77e Author: Linus Torvalds Date: Tue Nov 21 05:28:13 2017 -1000 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk Pull printk updates from Petr Mladek: - print the warning about dropped messages on consoles on a separate line. It makes it more legible. - one typo fix and small code clean up. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: added new line symbol after warning about dropped messages printk: fix typo in printk_safe.c printk: simplify no_printk() commit 400eeffaffc7232c0ae1134fe04e14ae4fb48d8c Author: Philip Derrin Date: Tue Nov 14 00:55:25 2017 +0100 ARM: 8722/1: mm: make STRICT_KERNEL_RWX effective for LPAE Currently, for ARM kernels with CONFIG_ARM_LPAE and CONFIG_STRICT_KERNEL_RWX enabled, the 2MiB pages mapping the kernel code and rodata are writable. They are marked read-only in a software bit (L_PMD_SECT_RDONLY) but the hardware read-only bit is not set (PMD_SECT_AP2). For user mappings, the logic that propagates the software bit to the hardware bit is in set_pmd_at(); but for the kernel, section_update() writes the PMDs directly, skipping this logic. The fix is to set PMD_SECT_AP2 for read-only sections in section_update(), at the same time as L_PMD_SECT_RDONLY. Fixes: 1e3479225acb ("ARM: 8275/1: mm: fix PMD_SECT_RDONLY undeclared compile error") Signed-off-by: Philip Derrin Reported-by: Neil Dick Tested-by: Neil Dick Tested-by: Laura Abbott Reviewed-by: Kees Cook Cc: stable@vger.kernel.org Signed-off-by: Russell King arch/arm/mm/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3b0c0c922ff4be275a8beb87ce5657d16f355b54 Author: Philip Derrin Date: Tue Nov 14 00:55:26 2017 +0100 ARM: 8721/1: mm: dump: check hardware RO bit for LPAE When CONFIG_ARM_LPAE is set, the PMD dump relies on the software read-only bit to determine whether a page is writable. This concealed a bug which left the kernel text section writable (AP2=0) while marked read-only in the software bit. In a kernel with the AP2 bug, the dump looks like this: ---[ Kernel Mapping ]--- 0xc0000000-0xc0200000 2M RW NX SHD 0xc0200000-0xc0600000 4M ro x SHD 0xc0600000-0xc0800000 2M ro NX SHD 0xc0800000-0xc4800000 64M RW NX SHD The fix is to check that the software and hardware bits are both set before displaying "ro". The dump then shows the true perms: ---[ Kernel Mapping ]--- 0xc0000000-0xc0200000 2M RW NX SHD 0xc0200000-0xc0600000 4M RW x SHD 0xc0600000-0xc0800000 2M RW NX SHD 0xc0800000-0xc4800000 64M RW NX SHD Fixes: ded947798469 ("ARM: 8109/1: mm: Modify pte_write and pmd_write logic for LPAE") Signed-off-by: Philip Derrin Tested-by: Neil Dick Reviewed-by: Kees Cook Cc: stable@vger.kernel.org Signed-off-by: Russell King arch/arm/mm/dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 29337b60ab5d2a499847c26d45e3cb81f62c2f26 Author: Russell King Date: Thu Nov 16 11:46:22 2017 +0000 ARM: make decompressor debug output user selectable Make the decompressor debug output user selectable, otherwise merely enabling DEBUG_LL causes the decompressor to become board specific, thereby preventing a multi-platform kernel from booting. Enabling DEBUG_LL doesn't cause the kernel itself to become platform specific unless EARLY_PRINTK is enabled, or one of the debugging routines is added in a path that results in it being called. Signed-off-by: Russell King arch/arm/Kconfig.debug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1ee5e87f86deca84fdcb7c71bb8368cacc4c24e3 Author: Russell King Date: Wed Oct 25 11:04:14 2017 +0100 ARM: fix get_user_pages_fast Ensure that get_user_pages_fast() is not able to access memory which has been mapped with PROT_NONE. Reported-by: Al Viro Signed-off-by: Russell King arch/arm/include/asm/pgtable.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 20e3f985bb875fea4f86b04eba4b6cc29bfd6b71 Author: Henrik Eriksson Date: Tue Nov 21 09:29:28 2017 +0100 ALSA: pcm: update tstamp only if audio_tstamp changed commit 3179f6200188 ("ALSA: core: add .get_time_info") had a side effect of changing the behaviour of the PCM runtime tstamp. Prior to this change tstamp was not updated by snd_pcm_update_hw_ptr0() unless the hw_ptr had moved, after this change tstamp was always updated. For an application using alsa-lib, doing snd_pcm_readi() followed by snd_pcm_status() to estimate the age of the read samples by subtracting status->avail * [sample rate] from status->tstamp this change degraded the accuracy of the estimate on devices where the pcm hw does not provide a granular hw_ptr, e.g., devices using soc-generic-dmaengine-pcm.c and a dma-engine with residue_granularity DMA_RESIDUE_GRANULARITY_DESCRIPTOR. The accuracy of the estimate depended on the latency between the PCM hw completing a period and the driver called snd_pcm_period_elapsed() to notify ALSA core, typically determined by interrupt handling latency. After the change the accuracy of the estimate depended on the latency between the PCM hw completing a period and the application calling snd_pcm_status(), determined by the scheduling of the application process. The maximum error of the estimate is one period length in both cases, but the error average and variance is smaller when it depends on interrupt latency. Instead of always updating tstamp, update it only if audio_tstamp changed. Fixes: 3179f6200188 ("ALSA: core: add .get_time_info") Suggested-by: Pierre-Louis Bossart Signed-off-by: Henrik Eriksson Cc: Signed-off-by: Takashi Iwai sound/core/pcm_lib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a13e8d418f3cb9d0b4efa6e744b8b23c0e3cdfe8 Merge: b48b1f7 33ddd81 Author: David S. Miller Date: Tue Nov 21 20:30:57 2017 +0900 Merge tag 'mac80211-for-davem-2017-11-20' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== A few things: * straggler timer conversions from Kees * memory leak fix in hwsim * fix some fallout from regdb changes if wireless is built-in * also free aggregation sessions in startup state when station goes away, to avoid crashing the timer ==================== Signed-off-by: David S. Miller commit b48b1f7ac716e3f0474f8b94bc471c6e47b2f57a Author: Jakub Kicinski Date: Mon Nov 20 16:47:29 2017 -0800 nfp: flower: add missing kdoc Commit 0115552eac14 ("nfp: remove false positive offloads in flower vxlan") missed adding kdoc for a new parameter of nfp_flower_add_offload(). Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/offload.c | 1 + 1 file changed, 1 insertion(+) commit e0e853ac036f76fcad3995554b8b6cef555b010f Author: Jon Maloy Date: Mon Nov 20 21:43:03 2017 +0100 tipc: fix access of released memory When the function tipc_group_filter_msg() finds that a member event indicates that the member is leaving the group, it first deletes the member instance, and then purges the message queue being handled by the call. But the message queue is an aggregated field in the just deleted item, leading the purge call to access freed memory. We fix this by swapping the order of the two actions. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9409e7f086fa6c4623769b4b2f4f17a024d8143 Author: Sebastian Sjoholm Date: Mon Nov 20 19:05:17 2017 +0100 net: qmi_wwan: add Quectel BG96 2c7c:0296 Quectel BG96 is an Qualcomm MDM9206 based IoT modem, supporting both CAT-M and NB-IoT. Tested hardware is BG96 mounted on Quectel development board (EVB). The USB id is added to qmi_wwan.c to allow QMI communication with the BG96. Signed-off-by: Sebastian Sjoholm Acked-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+) commit bf4e9f24a8d9e63c9cbd9cbeb84fc8a9a46ff1a3 Author: Ido Schimmel Date: Tue Nov 21 09:42:21 2017 +0100 mlxsw: spectrum: Do not try to create non-existing ports during unsplit On some systems, when we unsplit a port we need to re-create two ports instead. On other systems, only one needs to be re-created. Do not try to create a port if during driver initialization it was assigned a negative module number, which is invalid. This avoids the following error during unsplit: [ 941.012478] mlxsw_spectrum 0000:01:00.0: Port 43: Failed to map module The error is harmless and caused by the fact that a local port is already mapped to module 0. Fixes: be94535f9531 ("mlxsw: spectrum: Make split flow match firmware requirements") Signed-off-by: Ido Schimmel Reviewed-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 8 +++++++- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) commit feb3c766a3ab32d233aaff7db13afd9ba5bc142d Author: John Johansen Date: Mon Nov 20 23:24:09 2017 -0800 apparmor: fix possible recursive lock warning in __aa_create_ns Use mutex_lock_nested to provide lockdep the parent child lock ordering of the tree. This fixes the lockdep Warning [ 305.275177] ============================================ [ 305.275178] WARNING: possible recursive locking detected [ 305.275179] 4.14.0-rc7+ #320 Not tainted [ 305.275180] -------------------------------------------- [ 305.275181] apparmor_parser/1339 is trying to acquire lock: [ 305.275182] (&ns->lock){+.+.}, at: [] __aa_create_ns+0x6d/0x1e0 [ 305.275187] but task is already holding lock: [ 305.275187] (&ns->lock){+.+.}, at: [] aa_prepare_ns+0x3d/0xd0 [ 305.275190] other info that might help us debug this: [ 305.275191] Possible unsafe locking scenario: [ 305.275192] CPU0 [ 305.275193] ---- [ 305.275193] lock(&ns->lock); [ 305.275194] lock(&ns->lock); [ 305.275195] *** DEADLOCK *** [ 305.275196] May be due to missing lock nesting notation [ 305.275198] 2 locks held by apparmor_parser/1339: [ 305.275198] #0: (sb_writers#10){.+.+}, at: [] vfs_write+0x1a7/0x1d0 [ 305.275202] #1: (&ns->lock){+.+.}, at: [] aa_prepare_ns+0x3d/0xd0 [ 305.275205] stack backtrace: [ 305.275207] CPU: 1 PID: 1339 Comm: apparmor_parser Not tainted 4.14.0-rc7+ #320 [ 305.275208] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.1-1ubuntu1 04/01/2014 [ 305.275209] Call Trace: [ 305.275212] dump_stack+0x85/0xcb [ 305.275214] __lock_acquire+0x141c/0x1460 [ 305.275216] ? __aa_create_ns+0x6d/0x1e0 [ 305.275218] ? ___slab_alloc+0x183/0x540 [ 305.275219] ? ___slab_alloc+0x183/0x540 [ 305.275221] lock_acquire+0xed/0x1e0 [ 305.275223] ? lock_acquire+0xed/0x1e0 [ 305.275224] ? __aa_create_ns+0x6d/0x1e0 [ 305.275227] __mutex_lock+0x89/0x920 [ 305.275228] ? __aa_create_ns+0x6d/0x1e0 [ 305.275230] ? trace_hardirqs_on_caller+0x11f/0x190 [ 305.275231] ? __aa_create_ns+0x6d/0x1e0 [ 305.275233] ? __lockdep_init_map+0x57/0x1d0 [ 305.275234] ? lockdep_init_map+0x9/0x10 [ 305.275236] ? __rwlock_init+0x32/0x60 [ 305.275238] mutex_lock_nested+0x1b/0x20 [ 305.275240] ? mutex_lock_nested+0x1b/0x20 [ 305.275241] __aa_create_ns+0x6d/0x1e0 [ 305.275243] aa_prepare_ns+0xc2/0xd0 [ 305.275245] aa_replace_profiles+0x168/0xf30 [ 305.275247] ? __might_fault+0x85/0x90 [ 305.275250] policy_update+0xb9/0x380 [ 305.275252] profile_load+0x7e/0x90 [ 305.275254] __vfs_write+0x28/0x150 [ 305.275256] ? rcu_read_lock_sched_held+0x72/0x80 [ 305.275257] ? rcu_sync_lockdep_assert+0x2f/0x60 [ 305.275259] ? __sb_start_write+0xdc/0x1c0 [ 305.275261] ? vfs_write+0x1a7/0x1d0 [ 305.275262] vfs_write+0xca/0x1d0 [ 305.275264] ? trace_hardirqs_on_caller+0x11f/0x190 [ 305.275266] SyS_write+0x49/0xa0 [ 305.275268] entry_SYSCALL_64_fastpath+0x23/0xc2 [ 305.275271] RIP: 0033:0x7fa6b22e8c74 [ 305.275272] RSP: 002b:00007ffeaaee6288 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 305.275273] RAX: ffffffffffffffda RBX: 00007ffeaaee62a4 RCX: 00007fa6b22e8c74 [ 305.275274] RDX: 0000000000000a51 RSI: 00005566a8198c10 RDI: 0000000000000004 [ 305.275275] RBP: 0000000000000a39 R08: 0000000000000a51 R09: 0000000000000000 [ 305.275276] R10: 0000000000000000 R11: 0000000000000246 R12: 00005566a8198c10 [ 305.275277] R13: 0000000000000004 R14: 00005566a72ecb88 R15: 00005566a72ec3a8 Fixes: 73688d1ed0b8 ("apparmor: refactor prepare_ns() and make usable from different views") Signed-off-by: John Johansen security/apparmor/apparmorfs.c | 22 +++++++++++----------- security/apparmor/label.c | 2 +- security/apparmor/policy.c | 8 ++++---- security/apparmor/policy_ns.c | 8 ++++---- security/apparmor/policy_unpack.c | 2 +- 5 files changed, 21 insertions(+), 21 deletions(-) commit 5d7c44ef5e4f0149c9fb99faeae41e930485a1ec Author: John Johansen Date: Mon Nov 20 22:26:12 2017 -0800 apparmor: fix locking when creating a new complain profile. Break the per cpu buffer atomic section when creating a new null complain profile. In learning mode this won't matter and we can safely re-aquire the buffer. This fixes the following lockdep BUG trace nov. 14 14:09:09 cyclope audit[7152]: AVC apparmor="ALLOWED" operation="exec" profile="/usr/sbin/sssd" name="/usr/sbin/adcli" pid=7152 comm="sssd_be" requested_mask="x" denied_mask="x" fsuid=0 ouid=0 target="/usr/sbin/sssd//null-/usr/sbin/adcli" nov. 14 14:09:09 cyclope kernel: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:747 nov. 14 14:09:09 cyclope kernel: in_atomic(): 1, irqs_disabled(): 0, pid: 7152, name: sssd_be nov. 14 14:09:09 cyclope kernel: 1 lock held by sssd_be/7152: nov. 14 14:09:09 cyclope kernel: #0: (&sig->cred_guard_mutex){....}, at: [] prepare_bprm_creds+0x4e/0x100 nov. 14 14:09:09 cyclope kernel: CPU: 3 PID: 7152 Comm: sssd_be Not tainted 4.14.0prahal+intel #150 nov. 14 14:09:09 cyclope kernel: Hardware name: LENOVO 20CDCTO1WW/20CDCTO1WW, BIOS GQET53WW (1.33 ) 09/15/2017 nov. 14 14:09:09 cyclope kernel: Call Trace: nov. 14 14:09:09 cyclope kernel: dump_stack+0xb0/0x135 nov. 14 14:09:09 cyclope kernel: ? _atomic_dec_and_lock+0x15b/0x15b nov. 14 14:09:09 cyclope kernel: ? lockdep_print_held_locks+0xc4/0x130 nov. 14 14:09:09 cyclope kernel: ___might_sleep+0x29c/0x320 nov. 14 14:09:09 cyclope kernel: ? rq_clock+0xf0/0xf0 nov. 14 14:09:09 cyclope kernel: ? __kernel_text_address+0xd/0x40 nov. 14 14:09:09 cyclope kernel: __might_sleep+0x95/0x190 nov. 14 14:09:09 cyclope kernel: ? aa_new_null_profile+0x50a/0x960 nov. 14 14:09:09 cyclope kernel: __mutex_lock+0x13e/0x1a20 nov. 14 14:09:09 cyclope kernel: ? aa_new_null_profile+0x50a/0x960 nov. 14 14:09:09 cyclope kernel: ? save_stack+0x43/0xd0 nov. 14 14:09:09 cyclope kernel: ? kmem_cache_alloc_trace+0x13f/0x290 nov. 14 14:09:09 cyclope kernel: ? mutex_lock_io_nested+0x1880/0x1880 nov. 14 14:09:09 cyclope kernel: ? profile_transition+0x932/0x2d40 nov. 14 14:09:09 cyclope kernel: ? apparmor_bprm_set_creds+0x1479/0x1f70 nov. 14 14:09:09 cyclope kernel: ? security_bprm_set_creds+0x5a/0x80 nov. 14 14:09:09 cyclope kernel: ? prepare_binprm+0x366/0x980 nov. 14 14:09:09 cyclope kernel: ? do_execveat_common.isra.30+0x12a9/0x2350 nov. 14 14:09:09 cyclope kernel: ? SyS_execve+0x2c/0x40 nov. 14 14:09:09 cyclope kernel: ? do_syscall_64+0x228/0x650 nov. 14 14:09:09 cyclope kernel: ? entry_SYSCALL64_slow_path+0x25/0x25 nov. 14 14:09:09 cyclope kernel: ? deactivate_slab.isra.62+0x49d/0x5e0 nov. 14 14:09:09 cyclope kernel: ? save_stack_trace+0x16/0x20 nov. 14 14:09:09 cyclope kernel: ? init_object+0x88/0x90 nov. 14 14:09:09 cyclope kernel: ? ___slab_alloc+0x520/0x590 nov. 14 14:09:09 cyclope kernel: ? ___slab_alloc+0x520/0x590 nov. 14 14:09:09 cyclope kernel: ? aa_alloc_proxy+0xab/0x200 nov. 14 14:09:09 cyclope kernel: ? lock_downgrade+0x7e0/0x7e0 nov. 14 14:09:09 cyclope kernel: ? memcg_kmem_get_cache+0x970/0x970 nov. 14 14:09:09 cyclope kernel: ? kasan_unpoison_shadow+0x35/0x50 nov. 14 14:09:09 cyclope kernel: ? kasan_unpoison_shadow+0x35/0x50 nov. 14 14:09:09 cyclope kernel: ? kasan_kmalloc+0xad/0xe0 nov. 14 14:09:09 cyclope kernel: ? aa_alloc_proxy+0xab/0x200 nov. 14 14:09:09 cyclope kernel: ? kmem_cache_alloc_trace+0x13f/0x290 nov. 14 14:09:09 cyclope kernel: ? aa_alloc_proxy+0xab/0x200 nov. 14 14:09:09 cyclope kernel: ? aa_alloc_proxy+0xab/0x200 nov. 14 14:09:09 cyclope kernel: ? _raw_spin_unlock+0x22/0x30 nov. 14 14:09:09 cyclope kernel: ? vec_find+0xa0/0xa0 nov. 14 14:09:09 cyclope kernel: ? aa_label_init+0x6f/0x230 nov. 14 14:09:09 cyclope kernel: ? __label_insert+0x3e0/0x3e0 nov. 14 14:09:09 cyclope kernel: ? kmem_cache_alloc_trace+0x13f/0x290 nov. 14 14:09:09 cyclope kernel: ? aa_alloc_profile+0x58/0x200 nov. 14 14:09:09 cyclope kernel: mutex_lock_nested+0x16/0x20 nov. 14 14:09:09 cyclope kernel: ? mutex_lock_nested+0x16/0x20 nov. 14 14:09:09 cyclope kernel: aa_new_null_profile+0x50a/0x960 nov. 14 14:09:09 cyclope kernel: ? aa_fqlookupn_profile+0xdc0/0xdc0 nov. 14 14:09:09 cyclope kernel: ? aa_compute_fperms+0x4b5/0x640 nov. 14 14:09:09 cyclope kernel: ? disconnect.isra.2+0x1b0/0x1b0 nov. 14 14:09:09 cyclope kernel: ? aa_str_perms+0x8d/0xe0 nov. 14 14:09:09 cyclope kernel: profile_transition+0x932/0x2d40 nov. 14 14:09:09 cyclope kernel: ? up_read+0x1a/0x40 nov. 14 14:09:09 cyclope kernel: ? ext4_xattr_get+0x15c/0xaf0 [ext4] nov. 14 14:09:09 cyclope kernel: ? x_table_lookup+0x190/0x190 nov. 14 14:09:09 cyclope kernel: ? ext4_xattr_ibody_get+0x590/0x590 [ext4] nov. 14 14:09:09 cyclope kernel: ? sched_clock+0x9/0x10 nov. 14 14:09:09 cyclope kernel: ? sched_clock+0x9/0x10 nov. 14 14:09:09 cyclope kernel: ? ext4_xattr_security_get+0x1a/0x20 [ext4] nov. 14 14:09:09 cyclope kernel: ? __vfs_getxattr+0x6d/0xa0 nov. 14 14:09:09 cyclope kernel: ? get_vfs_caps_from_disk+0x114/0x720 nov. 14 14:09:09 cyclope kernel: ? sched_clock+0x9/0x10 nov. 14 14:09:09 cyclope kernel: ? sched_clock+0x9/0x10 nov. 14 14:09:09 cyclope kernel: ? tsc_resume+0x10/0x10 nov. 14 14:09:09 cyclope kernel: ? get_vfs_caps_from_disk+0x720/0x720 nov. 14 14:09:09 cyclope kernel: ? native_sched_clock_from_tsc+0x201/0x2b0 nov. 14 14:09:09 cyclope kernel: ? sched_clock+0x9/0x10 nov. 14 14:09:09 cyclope kernel: ? sched_clock_cpu+0x1b/0x170 nov. 14 14:09:09 cyclope kernel: ? find_held_lock+0x3c/0x1e0 nov. 14 14:09:09 cyclope kernel: ? rb_insert_color_cached+0x1660/0x1660 nov. 14 14:09:09 cyclope kernel: apparmor_bprm_set_creds+0x1479/0x1f70 nov. 14 14:09:09 cyclope kernel: ? sched_clock+0x9/0x10 nov. 14 14:09:09 cyclope kernel: ? handle_onexec+0x31d0/0x31d0 nov. 14 14:09:09 cyclope kernel: ? tsc_resume+0x10/0x10 nov. 14 14:09:09 cyclope kernel: ? graph_lock+0xd0/0xd0 nov. 14 14:09:09 cyclope kernel: ? tsc_resume+0x10/0x10 nov. 14 14:09:09 cyclope kernel: ? sched_clock_cpu+0x1b/0x170 nov. 14 14:09:09 cyclope kernel: ? sched_clock+0x9/0x10 nov. 14 14:09:09 cyclope kernel: ? sched_clock+0x9/0x10 nov. 14 14:09:09 cyclope kernel: ? sched_clock_cpu+0x1b/0x170 nov. 14 14:09:09 cyclope kernel: ? find_held_lock+0x3c/0x1e0 nov. 14 14:09:09 cyclope kernel: security_bprm_set_creds+0x5a/0x80 nov. 14 14:09:09 cyclope kernel: prepare_binprm+0x366/0x980 nov. 14 14:09:09 cyclope kernel: ? install_exec_creds+0x150/0x150 nov. 14 14:09:09 cyclope kernel: ? __might_fault+0x89/0xb0 nov. 14 14:09:09 cyclope kernel: ? up_read+0x40/0x40 nov. 14 14:09:09 cyclope kernel: ? get_user_arg_ptr.isra.18+0x2c/0x70 nov. 14 14:09:09 cyclope kernel: ? count.isra.20.constprop.32+0x7c/0xf0 nov. 14 14:09:09 cyclope kernel: do_execveat_common.isra.30+0x12a9/0x2350 nov. 14 14:09:09 cyclope kernel: ? prepare_bprm_creds+0x100/0x100 nov. 14 14:09:09 cyclope kernel: ? _raw_spin_unlock+0x22/0x30 nov. 14 14:09:09 cyclope kernel: ? deactivate_slab.isra.62+0x49d/0x5e0 nov. 14 14:09:09 cyclope kernel: ? save_stack_trace+0x16/0x20 nov. 14 14:09:09 cyclope kernel: ? init_object+0x88/0x90 nov. 14 14:09:09 cyclope kernel: ? ___slab_alloc+0x520/0x590 nov. 14 14:09:09 cyclope kernel: ? ___slab_alloc+0x520/0x590 nov. 14 14:09:09 cyclope kernel: ? kasan_check_write+0x14/0x20 nov. 14 14:09:09 cyclope kernel: ? memcg_kmem_get_cache+0x970/0x970 nov. 14 14:09:09 cyclope kernel: ? kasan_unpoison_shadow+0x35/0x50 nov. 14 14:09:09 cyclope kernel: ? glob_match+0x730/0x730 nov. 14 14:09:09 cyclope kernel: ? kmem_cache_alloc+0x225/0x280 nov. 14 14:09:09 cyclope kernel: ? getname_flags+0xb8/0x510 nov. 14 14:09:09 cyclope kernel: ? mm_fault_error+0x2e0/0x2e0 nov. 14 14:09:09 cyclope kernel: ? getname_flags+0xf6/0x510 nov. 14 14:09:09 cyclope kernel: ? ptregs_sys_vfork+0x10/0x10 nov. 14 14:09:09 cyclope kernel: SyS_execve+0x2c/0x40 nov. 14 14:09:09 cyclope kernel: do_syscall_64+0x228/0x650 nov. 14 14:09:09 cyclope kernel: ? syscall_return_slowpath+0x2f0/0x2f0 nov. 14 14:09:09 cyclope kernel: ? syscall_return_slowpath+0x167/0x2f0 nov. 14 14:09:09 cyclope kernel: ? prepare_exit_to_usermode+0x220/0x220 nov. 14 14:09:09 cyclope kernel: ? prepare_exit_to_usermode+0xda/0x220 nov. 14 14:09:09 cyclope kernel: ? perf_trace_sys_enter+0x1060/0x1060 nov. 14 14:09:09 cyclope kernel: ? __put_user_4+0x1c/0x30 nov. 14 14:09:09 cyclope kernel: entry_SYSCALL64_slow_path+0x25/0x25 nov. 14 14:09:09 cyclope kernel: RIP: 0033:0x7f9320f23637 nov. 14 14:09:09 cyclope kernel: RSP: 002b:00007fff783be338 EFLAGS: 00000202 ORIG_RAX: 000000000000003b nov. 14 14:09:09 cyclope kernel: RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9320f23637 nov. 14 14:09:09 cyclope kernel: RDX: 0000558c35002a70 RSI: 0000558c3505bd10 RDI: 0000558c35018b90 nov. 14 14:09:09 cyclope kernel: RBP: 0000558c34b63ae8 R08: 0000558c3505bd10 R09: 0000000000000080 nov. 14 14:09:09 cyclope kernel: R10: 0000000000000095 R11: 0000000000000202 R12: 0000000000000001 nov. 14 14:09:09 cyclope kernel: R13: 0000558c35018b90 R14: 0000558c3505bd18 R15: 0000558c3505bd10 Fixes: 4227c333f65c ("apparmor: Move path lookup to using preallocated buffers") BugLink: http://bugs.launchpad.net/bugs/173228 Reported-by: Alban Browaeys Signed-off-by: John Johansen security/apparmor/domain.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 06d426d113fe0b3107939e81db920ca7b097e97c Author: John Johansen Date: Fri Nov 17 18:04:37 2017 -0800 apparmor: fix profile attachment for special unconfined profiles It used to be that unconfined would never attach. However that is not the case anymore as some special profiles can be marked as unconfined, that are not the namespaces unconfined profile, and may have an attachment. Fixes: f1bd904175e8 ("apparmor: add the base fns() for domain labels") Signed-off-by: John Johansen security/apparmor/domain.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 844b8292b6311ecd30ae63db1471edb26e01d895 Author: John Johansen Date: Fri Nov 17 17:42:42 2017 -0800 apparmor: ensure that undecidable profile attachments fail Profiles that have an undecidable overlap in their attachments are being incorrectly handled. Instead of failing to attach the first one encountered is being used. eg. profile A /** { .. } profile B /*foo { .. } have an unresolvable longest left attachment, they both have an exact match on / and then have an overlapping expression that has no clear winner. Currently the winner will be the profile that is loaded first which can result in non-deterministic behavior. Instead in this situation the exec should fail. Fixes: 898127c34ec0 ("AppArmor: functions for domain transitions") Signed-off-by: John Johansen security/apparmor/domain.c | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) commit 4633307e5ed6128975595df43f796a10c41d11c1 Author: John Johansen Date: Wed Nov 15 15:25:30 2017 -0800 apparmor: fix leak of null profile name if profile allocation fails Fixes: d07881d2edb0 ("apparmor: move new_null_profile to after profile lookup fns()") Reported-by: Seth Arnold Signed-off-by: John Johansen security/apparmor/policy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e3bcfc148588e409685479f3d20ba3d66ae30035 Author: Colin Ian King Date: Sat Oct 14 13:14:38 2017 +0100 apparmor: remove unused redundant variable stop The boolean variable 'stop' is being set but never read. This is a redundant variable and can be removed. Cleans up clang warning: Value stored to 'stop' is never read Signed-off-by: Colin Ian King Signed-off-by: John Johansen security/apparmor/lib.c | 3 --- 1 file changed, 3 deletions(-) commit 954317fef2ee789af55f82903dbc574905250f7c Author: Thomas Meyer Date: Sat Oct 7 16:02:21 2017 +0200 apparmor: Fix bool initialization/comparison Bool initializations should use true and false. Bool tests don't need comparisons. Signed-off-by: Thomas Meyer Signed-off-by: John Johansen security/apparmor/lsm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7bba39ae52c4d7b467d0a6f74cc067a561aac043 Author: Arnd Bergmann Date: Fri Sep 15 21:55:46 2017 +0200 apparmor: initialized returned struct aa_perms gcc-4.4 points out suspicious code in compute_mnt_perms, where the aa_perms structure is only partially initialized before getting returned: security/apparmor/mount.c: In function 'compute_mnt_perms': security/apparmor/mount.c:227: error: 'perms.prompt' is used uninitialized in this function security/apparmor/mount.c:227: error: 'perms.hide' is used uninitialized in this function security/apparmor/mount.c:227: error: 'perms.cond' is used uninitialized in this function security/apparmor/mount.c:227: error: 'perms.complain' is used uninitialized in this function security/apparmor/mount.c:227: error: 'perms.stop' is used uninitialized in this function security/apparmor/mount.c:227: error: 'perms.deny' is used uninitialized in this function Returning or assigning partially initialized structures is a bit tricky, in particular it is explicitly allowed in c99 to assign a partially initialized structure to another, as long as only members are read that have been initialized earlier. Looking at what various compilers do here, the version that produced the warning copied uninitialized stack data, while newer versions (and also clang) either set the other members to zero or don't update the parts of the return buffer that are not modified in the temporary structure, but they never warn about this. In case of apparmor, it seems better to be a little safer and always initialize the aa_perms structure. Most users already do that, this changes the remaining ones, including the one instance that I got the warning for. Fixes: fa488437d0f9 ("apparmor: add mount mediation") Signed-off-by: Arnd Bergmann Reviewed-by: Seth Arnold Acked-by: Geert Uytterhoeven Signed-off-by: John Johansen security/apparmor/file.c | 8 +------- security/apparmor/lib.c | 13 +++++-------- security/apparmor/mount.c | 13 ++++++------- 3 files changed, 12 insertions(+), 22 deletions(-) commit 62b49c42107efd973edffc75f4f874c5226cd20a Author: Sukadev Bhattiprolu Date: Mon Nov 20 12:53:15 2017 -0600 powerpc/vas: Export chip_to_vas_id() Export the symbol chip_to_vas_id() to fix a build failure when CONFIG_CRYPTO_DEV_NX_COMPRESS_POWERNV=m. Fixes: d4ef61b5e895 ("powerpc/vas, nx-842: Define and use chip_to_vas_id()") Reported-by: Haren Myneni Reported-by: Josh Boyer Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas.c | 1 + 1 file changed, 1 insertion(+) commit ed59b7d53c95548d83d4e7e1bc5edafcdcad09c9 Merge: 1514f6f 1967c12 Author: Kalle Valo Date: Tue Nov 21 11:52:18 2017 +0200 Merge ath-current from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git fixes for 4.15. Major changes: ath10k * fix CCMP-256, GCMP and GCMP-256 in raw mode, they never worked with raw mode wcn36xx * fix device tree node search commit 274e0a1f4777b9362fc03a34e86358cc36003e48 Author: Christoph Hellwig Date: Mon Nov 20 08:56:52 2017 -0800 xfs: abstract out dev_t conversions And move them to xfs_linux.h so that xfsprogs can stub them out more easily. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_inode_fork.c | 8 ++------ fs/xfs/xfs_linux.h | 10 ++++++++++ 2 files changed, 12 insertions(+), 6 deletions(-) commit 6818caa4cdc95d9ec5642a4439f8271a80189b48 Author: Shu Wang Date: Mon Nov 20 08:54:13 2017 -0800 xfs: fix memory leak in xfs_iext_free_last_leaf found the issue by kmemleak. unreferenced object 0xffff8800674611c0 (size 16): xfs_iext_insert+0x82a/0xa90 [xfs] xfs_bmap_add_extent_hole_delay+0x1e5/0x5b0 [xfs] xfs_bmapi_reserve_delalloc+0x483/0x530 [xfs] xfs_file_iomap_begin+0xac8/0xd40 [xfs] iomap_apply+0xb8/0x1b0 iomap_file_buffered_write+0xac/0xe0 xfs_file_buffered_aio_write+0x198/0x420 [xfs] xfs_file_write_iter+0x23f/0x2a0 [xfs] __vfs_write+0x23e/0x340 vfs_write+0xe9/0x240 SyS_write+0xa1/0x120 do_syscall_64+0xda/0x260 Signed-off-by: Shu Wang Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_iext_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3572f04c69ed4369da5d3c65d84fb18774aa60b6 Author: Ville Syrjälä Date: Thu Nov 16 18:02:15 2017 +0200 drm/i915: Fix init_clock_gating for resume Moving the init_clock_gating() call from intel_modeset_init_hw() to intel_modeset_gem_init() had an unintended effect of not applying some workarounds on resume. This, for example, cause some kind of corruption to appear at the top of my IVB Thinkpad X1 Carbon LVDS screen after hibernation. Fix the problem by explicitly calling init_clock_gating() from the resume path. I really hope this doesn't break something else again. At least the problems reported at https://bugs.freedesktop.org/show_bug.cgi?id=103549 didn't make a comeback, even after a hibernate cycle. v2: Reorder the init_clock_gating vs. modeset_init_hw to match the display reset path (Rodrigo) Cc: stable@vger.kernel.org Cc: Chris Wilson Cc: Rodrigo Vivi Fixes: 6ac43272768c ("drm/i915: Move init_clock_gating() back to where it was") Reviewed-by: Rodrigo Vivi Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171116160215.25715-1-ville.syrjala@linux.intel.com Signed-off-by: Ville Syrjälä (cherry picked from commit 675f7ff35bd256e65d3d0f52718d8babf5d1002a) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 1 + 1 file changed, 1 insertion(+) commit 457db89b538ea4eb2a188c75f8f3a83469395ee0 Author: Chris Wilson Date: Tue Nov 14 17:35:20 2017 +0000 drm/i915: Mark the userptr invalidate workqueue as WQ_MEM_RECLAIM Commit 21cc6431e0c2 ("drm/i915: Mark the userptr invalidate workqueue as WQ_MEM_RECLAIM") tried to fixup the check_flush_dependency warning for hitting i915_gem_userptr_mn_invalidate_range_start from within the shrinker, but I failed to notice userptr has 2 similarly named workqueues. I marked up i915-userptr-acquire as WQ_MEM_RECLAIM whereas we only wait upon i915-userptr-release from inside the reclaim paths. [62530.869510] workqueue: PF_MEMALLOC task 7983(gem_shrink) is flushing !WQ_MEM_RECLAIM i915-userptr-release: (null) [62530.869515] ------------[ cut here ]------------ [62530.869519] WARNING: CPU: 1 PID: 7983 at kernel/workqueue.c:2434 check_flush_dependency+0x7f/0x110 [62530.869519] Modules linked in: pegasus mii ip6table_filter ip6_tables bnep iptable_filter snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic binfmt_misc nls_iso8859_1 intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp snd_hda_intel snd_hda_codec kvm_intel snd_hda_core snd_hwdep kvm snd_pcm irqbypass snd_seq_midi snd_seq_midi_event snd_rawmidi crct10dif_pclmul crc32_pclmul 8250_dw ghash_clmulni_intel snd_seq pcbc snd_seq_device snd_timer btusb aesni_intel btrtl btbcm aes_x86_64 iwlwifi btintel crypto_simd glue_helper cryptd bluetooth snd intel_cstate input_leds idma64 intel_rapl_perf ecdh_generic serio_raw soundcore cfg80211 wmi_bmof virt_dma intel_lpss_pci intel_lpss acpi_als kfifo_buf industrialio winbond_cir soc_button_array rc_core spidev tpm_crb intel_hid acpi_pad mac_hid sparse_keymap [62530.869546] parport_pc ppdev lp parport ip_tables x_tables autofs4 hid_generic usbhid i915 i2c_algo_bit prime_numbers drm_kms_helper syscopyarea e1000e sysfillrect sysimgblt fb_sys_fops ahci ptp pps_core libahci drm wmi video i2c_hid hid [62530.869557] CPU: 1 PID: 7983 Comm: gem_shrink Tainted: G U W L 4.14.0-rc8-drm-tip-ww45-commit-1342299+ #1 [62530.869558] Hardware name: Intel Corporation CoffeeLake Client Platform/CoffeeLake H DDR4 RVP, BIOS CNLSFWR1.R00.X098.A00.1707301945 07/30/2017 [62530.869559] task: ffffa1049dbeec80 task.stack: ffffae7d05c44000 [62530.869560] RIP: 0010:check_flush_dependency+0x7f/0x110 [62530.869561] RSP: 0018:ffffae7d05c473a0 EFLAGS: 00010286 [62530.869562] RAX: 000000000000006e RBX: ffffa1049540f400 RCX: ffffffffa3e55788 [62530.869562] RDX: 0000000000000000 RSI: 0000000000000092 RDI: 0000000000000202 [62530.869563] RBP: ffffae7d05c473c0 R08: 000000000000006e R09: 000000000038bb0e [62530.869563] R10: 0000000000000000 R11: 000000000000006e R12: ffffa1049dbeec80 [62530.869564] R13: 0000000000000000 R14: 0000000000000000 R15: ffffae7d05c473e0 [62530.869565] FS: 00007f621b129880(0000) GS:ffffa1050b240000(0000) knlGS:0000000000000000 [62530.869566] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [62530.869566] CR2: 00007f6214400000 CR3: 0000000353a17003 CR4: 00000000003606e0 [62530.869567] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [62530.869567] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [62530.869568] Call Trace: [62530.869570] flush_workqueue+0x115/0x3d0 [62530.869573] ? wake_up_process+0x15/0x20 [62530.869596] i915_gem_userptr_mn_invalidate_range_start+0x12f/0x160 [i915] [62530.869614] ? i915_gem_userptr_mn_invalidate_range_start+0x12f/0x160 [i915] [62530.869616] __mmu_notifier_invalidate_range_start+0x55/0x80 [62530.869618] try_to_unmap_one+0x791/0x8b0 [62530.869620] ? call_rwsem_down_read_failed+0x18/0x30 [62530.869622] rmap_walk_anon+0x10b/0x260 [62530.869624] rmap_walk+0x48/0x60 [62530.869625] try_to_unmap+0x93/0xf0 [62530.869626] ? page_remove_rmap+0x2a0/0x2a0 [62530.869627] ? page_not_mapped+0x20/0x20 [62530.869629] ? page_get_anon_vma+0x90/0x90 [62530.869630] ? invalid_mkclean_vma+0x20/0x20 [62530.869631] migrate_pages+0x946/0xaa0 [62530.869633] ? __ClearPageMovable+0x10/0x10 [62530.869635] ? isolate_freepages_block+0x3c0/0x3c0 [62530.869636] compact_zone+0x22f/0x970 [62530.869638] compact_zone_order+0xa3/0xd0 [62530.869640] try_to_compact_pages+0x1a5/0x2a0 [62530.869641] ? try_to_compact_pages+0x1a5/0x2a0 [62530.869643] __alloc_pages_direct_compact+0x50/0x110 [62530.869644] __alloc_pages_slowpath+0x4da/0xf30 [62530.869646] __alloc_pages_nodemask+0x262/0x280 [62530.869648] alloc_pages_vma+0x165/0x1e0 [62530.869649] shmem_alloc_hugepage+0xd0/0x130 [62530.869651] ? __radix_tree_insert+0x45/0x230 [62530.869652] ? __vm_enough_memory+0x29/0x130 [62530.869654] shmem_alloc_and_acct_page+0x10d/0x1e0 [62530.869655] shmem_getpage_gfp+0x426/0xc00 [62530.869657] shmem_fault+0xa0/0x1e0 [62530.869659] ? file_update_time+0x60/0x110 [62530.869660] __do_fault+0x1e/0xc0 [62530.869661] __handle_mm_fault+0xa35/0x1170 [62530.869662] handle_mm_fault+0xcc/0x1c0 [62530.869664] __do_page_fault+0x262/0x4f0 [62530.869666] do_page_fault+0x2e/0xe0 [62530.869667] page_fault+0x22/0x30 [62530.869668] RIP: 0033:0x404335 [62530.869669] RSP: 002b:00007fff7829e420 EFLAGS: 00010216 [62530.869670] RAX: 00007f6210400000 RBX: 0000000000000004 RCX: 0000000000b80000 [62530.869670] RDX: 0000000000002e01 RSI: 0000000000008000 RDI: 0000000000000004 [62530.869671] RBP: 0000000000000019 R08: 0000000000000002 R09: 0000000000000000 [62530.869671] R10: 0000000000000559 R11: 0000000000000246 R12: 0000000008000000 [62530.869672] R13: 00000000004042f0 R14: 0000000000000004 R15: 000000000000007e [62530.869673] Code: 00 8b b0 18 05 00 00 48 8d 8b b0 00 00 00 48 8d 90 c0 06 00 00 4d 89 f0 48 c7 c7 40 c0 c8 a3 c6 05 68 c5 e8 00 01 e8 c2 68 04 00 <0f> ff 4d 85 ed 74 18 49 8b 45 20 48 8b 70 08 8b 86 00 01 00 00 [62530.869691] ---[ end trace 01e01ad0ff5781f8 ]--- Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103739 Fixes: 21cc6431e0c2 ("drm/i915: Mark the userptr invalidate workqueue as WQ_MEM_RECLAIM") Signed-off-by: Chris Wilson Cc: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20171114173520.8829-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld (cherry picked from commit 41729bf2248bc8593e5103d43974079cc269524c) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_userptr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6e068270b7883836e4717e262d96d1c43690862a Author: Chris Wilson Date: Wed Nov 15 12:14:58 2017 +0000 drm/i915: Clear breadcrumb node when cancelling signaling When we call intel_engine_cancel_signaling() to stop reporting when a request is completed via an asynchronous signal, we remove that request from the breadcrumb wait queue. However, we may be concurrently processing that request in the signaler itself, the actual operations on the request's node itself are serialised but we do not actually clear the waiter after removing it from the tree allowing both parties to attempt to do so and corrupting the rbtree. (Previously removing from the breadcrumb wait queue could only be done on behalf of i915_wait_request, so this race could not happen). Reported-by: "He, Bo" Fixes: 9eb143bbec7d ("drm/i915: Allow a request to be cancelled") Signed-off-by: Chris Wilson Cc: "He, Bo" Cc: Tvrtko Ursulin Cc: Michał Winiarski Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171115121458.24655-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen (cherry picked from commit c534612e780c4a2c8ef5bfc11583c7d58436baca) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_breadcrumbs.c | 1 + 1 file changed, 1 insertion(+) commit dcd1d8302a06b0a0e5d6f9b6851fa4a5579e79b0 Author: Colin Ian King Date: Tue Sep 19 16:55:34 2017 +0100 drm/i915/gvt: ensure -ve return value is handled correctly An earlier fix changed the return type from find_bb_size however the integer return is being assigned to a unsigned int so the -ve error check will never be detected. Make bb_size an int to fix this. Detected by CoverityScan CID#1456886 ("Unsigned compared against 0") Fixes: 1e3197d6ad73 ("drm/i915/gvt: Refine error handling for perform_bb_shadow") Signed-off-by: Colin Ian King Signed-off-by: Zhenyu Wang (cherry picked from commit 24f8a29af4afe7c53e08f4afa0c3fa9eb3791b89) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/gvt/cmd_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 294cf1af8cf2eb0d1eced377fdfb9a2d3f0e8b42 Author: Hans de Goede Date: Tue Nov 14 14:55:17 2017 +0100 drm/i915: Re-register PMIC bus access notifier on runtime resume intel_uncore_suspend() unregisters the uncore code's PMIC bus access notifier and gets called on both normal and runtime suspend. intel_uncore_resume_early() re-registers the notifier, but only on normal resume. Add a new intel_uncore_runtime_resume() function which only re-registers the notifier and call that on runtime resume. Cc: stable@vger.kernel.org Reported-by: Imre Deak Reviewed-by: Imre Deak Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20171114135518.15981-2-hdegoede@redhat.com (cherry picked from commit bedf4d79c3654921839b62246b0965ddb308b201) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.c | 2 ++ drivers/gpu/drm/i915/intel_uncore.c | 6 ++++++ drivers/gpu/drm/i915/intel_uncore.h | 1 + 3 files changed, 9 insertions(+) commit f4359cedfb43b934f38c50d1604db21333abe57b Author: Hans de Goede Date: Fri Nov 10 16:03:01 2017 +0100 drm/i915: Fix false-positive assert_rpm_wakelock_held in i915_pmic_bus_access_notifier v2 assert_rpm_wakelock_held is triggered from i915_pmic_bus_access_notifier even though it gets unregistered on (runtime) suspend, this is caused by a race happening under the following circumstances: intel_runtime_pm_put does: atomic_dec(&dev_priv->pm.wakeref_count); pm_runtime_mark_last_busy(kdev); pm_runtime_put_autosuspend(kdev); And pm_runtime_put_autosuspend calls intel_runtime_suspend from a workqueue, so there is ample of time between the atomic_dec() and intel_runtime_suspend() unregistering the notifier. If the notifier gets called in this windowd assert_rpm_wakelock_held falsely triggers (at this point we're not runtime-suspended yet). This commit adds disable_rpm_wakeref_asserts and enable_rpm_wakeref_asserts calls around the intel_uncore_forcewake_get(FORCEWAKE_ALL) call in i915_pmic_bus_access_notifier fixing the false-positive WARN_ON. Changes in v2: -Reword comment explaining why disabling the wakeref asserts is ok and necessary Cc: stable@vger.kernel.org Reported-by: FKr Reviewed-by: Imre Deak Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20171110150301.9601-2-hdegoede@redhat.com (cherry picked from commit ce30560c80dead91e98a03d90fb8791e57a9b69d) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_uncore.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 7b659ee3e1fe0e8eb39730afb903c64e25490ec4 Author: Dave Hansen Date: Fri Nov 10 16:12:32 2017 -0800 x86/pkeys/selftests: Fix protection keys write() warning write() is marked as having a must-check return value. Check it and abort if we fail to write an error message from a signal handler. Signed-off-by: Dave Hansen Acked-by: Thomas Gleixner 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 Link: http://lkml.kernel.org/r/20171111001232.94813E58@viggo.jf.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/pkey-helpers.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 91c49c2deb96ffc3c461eaae70219d89224076b7 Author: Dave Hansen Date: Fri Nov 10 16:12:31 2017 -0800 x86/pkeys/selftests: Rename 'si_pkey' to 'siginfo_pkey' 'si_pkey' is now #defined to be the name of the new siginfo field that protection keys uses. Rename it not to conflict. Signed-off-by: Dave Hansen Acked-by: Thomas Gleixner 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 Link: http://lkml.kernel.org/r/20171111001231.DFFC8285@viggo.jf.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/protection_keys.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a6400120d042397675fcf694060779d21e9e762d Author: Dave Hansen Date: Fri Nov 10 16:12:29 2017 -0800 x86/mpx/selftests: Fix up weird arrays The MPX hardware data structurse are defined in a weird way: they define their size in bytes and then union that with the type with which we want to access them. Yes, this is weird, but it does work. But, new GCC's complain that we are accessing the array out of bounds. Just make it a zero-sized array so gcc will stop complaining. There was not really a bug here. Signed-off-by: Dave Hansen Acked-by: Thomas Gleixner 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 Link: http://lkml.kernel.org/r/20171111001229.58A7933D@viggo.jf.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/mpx-hw.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c51ff2c7fc45da8b18b28c4f15eca5a9975dfb59 Author: Dave Hansen Date: Fri Nov 10 16:12:28 2017 -0800 x86/pkeys: Update documentation about availability Now that CPUs that implement Memory Protection Keys are publicly available we can be a bit less oblique about where it is available. Signed-off-by: Dave Hansen Acked-by: Thomas Gleixner 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 Link: http://lkml.kernel.org/r/20171111001228.DC748A10@viggo.jf.intel.com Signed-off-by: Ingo Molnar Documentation/x86/protection-keys.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5933a62708fbae49931694314f3c98fbe91bb178 Author: Colin Ian King Date: Thu Aug 24 09:31:45 2017 +0100 apparmor: fix spelling mistake: "resoure" -> "resource" Trivial fix to spelling mistake in comment and also with text in audit_resource call. Signed-off-by: Colin Ian King Signed-off-by: John Johansen security/apparmor/resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa5222e92f8000ed3c1c38dddf11c83222aadfb3 Author: Dan Carpenter Date: Fri Oct 13 10:01:22 2017 +0300 sched/deadline: Don't use dubious signed bitfields It doesn't cause a run-time bug, but these bitfields should be unsigned. When it's signed ->dl_throttled is set to either 0 or -1, instead of 0 and 1 as expected. The sched.h file is included into tons of places so Sparse generates a flood of warnings like this: ./include/linux/sched.h:477:54: error: dubious one-bit signed bitfield Reported-by: Matthew Wilcox Reported-by: Xin Long Signed-off-by: Dan Carpenter Reviewed-by: Luca Abeni Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-janitors@vger.kernel.org Cc: luca abeni Link: http://lkml.kernel.org/r/20171013070121.dzcncojuj2f4utij@mwanda Signed-off-by: Ingo Molnar include/linux/sched.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e1d1ea549b57790a3d8cf6300e6ef86118d692a3 Merge: c633e89 5f215d2 Author: Linus Torvalds Date: Mon Nov 20 21:50:24 2017 -1000 Merge tag 'fbdev-v4.15' of git://github.com/bzolnier/linux Pull fbdev updates from Bartlomiej Zolnierkiewicz: "There is nothing really major here (though removal of the dead igafb driver stands out in diffstat). Summary: - convert timers to use timer_setup() (Kees Cook, Thierry Reding) - fix panels support on iMX boards in mxsfb driver (Stefan Agner) - fix timeout on EDID read in udlfb driver (Ladislav Michl) - add missing modes to fix out of bounds access in controlfb driver (Geert Uytterhoeven) - update initialisation paths in sa1100fb driver to be more robust (Russell King) - fix error handling path of ->probe method in au1200fb driver (Christophe JAILLET) - fix handling of cases when either panel or crt is defined in sm501fb driver (Sudip Mukherjee, Colin Ian King) - add ability to the Goldfish FB driver to be recognized by OS via DT (Aleksandar Markovic) - structures constifications (Bhumika Goyal) - misc fixes (Allen Pais, Gustavo A. R. Silva, Dan Carpenter) - misc cleanups (Colin Ian King, Himanshu Jha, Markus Elfring) - remove dead igafb driver" * tag 'fbdev-v4.15' of git://github.com/bzolnier/linux: (42 commits) OMAPFB: prevent buffer underflow in omapfb_parse_vram_param() video: fbdev: sm501fb: fix potential null pointer dereference on fbi fbcon: Initialize ops->info early video: fbdev: Convert timers to use timer_setup() video: fbdev: pxa3xx_gcu: Convert timers to use timer_setup() fbdev: controlfb: Add missing modes to fix out of bounds access video: fbdev: sis_main: mark expected switch fall-throughs video: fbdev: cirrusfb: mark expected switch fall-throughs video: fbdev: aty: radeon_pm: mark expected switch fall-throughs video: fbdev: sm501fb: mark expected switch fall-through in sm501fb_blank_crt video: fbdev: intelfb: remove redundant variables video/fbdev/dnfb: Use common error handling code in dnfb_probe() sm501fb: suspend and resume fb if it exists sm501fb: unregister framebuffer only if registered sm501fb: deallocate colormap only if allocated video: goldfishfb: Add support for device tree bindings Documentation: Add device tree binding for Goldfish FB driver video: udlfb: Fix read EDID timeout video: fbdev: remove dead igafb driver video: fbdev: mxsfb: fix pixelclock polarity ... commit c633e898bde8990a34907c91b7d5245cab866c6e Merge: bf8973f def4db3 Author: Linus Torvalds Date: Mon Nov 20 21:38:41 2017 -1000 Merge tag 'devicetree-fixes-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree fixes from Rob Herring: - Remove mc13892 as a trivial device - Improve of_find_node_by_name() documentation - Fix unit test dtc warnings - Clean-ups of USB binding documentation - Fix potential NULL deref in of_pci_map_rid * tag 'devicetree-fixes-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: trivial-devices: Remove fsl,mc13892 of: Document exactly what of_find_node_by_name() puts of: unittest: disable interrupts_property warning of: unittest: let dtc generate __local_fixups__ dt-bindings: usb: document hub and host-controller properties dt-bindings: usb: clean up compatible property dt-bindings: usb: fix reg-property port-number range dt-bindings: usb: fix example hub node name of/pci: Fix theoretical NULL dereference commit bf8973fc76e456378d3e2d6a13ed62a52281d379 Merge: c8a0739 8631390 Author: Linus Torvalds Date: Mon Nov 20 21:35:25 2017 -1000 Merge tag 'jfs-4.15-2' of git://github.com/kleikamp/linux-shaggy Pull jfs fixlet from Dave Kleikamp: "Update jfs git tree in MAINTAINERS" * tag 'jfs-4.15-2' of git://github.com/kleikamp/linux-shaggy: MAINTAINERS: fix jfs tree location commit fd11a6496e12848d4eeb21029c2c288bbc638048 Author: Ricardo Neri Date: Mon Nov 20 19:04:36 2017 -0800 x86/umip: Print a warning into the syslog if UMIP-protected instructions are used Print a rate-limited warning when a user-space program attempts to execute any of the instructions that UMIP protects (i.e., SGDT, SIDT, SLDT, STR and SMSW). This is useful, because when CONFIG_X86_INTEL_UMIP=y is selected and supported by the hardware, user space programs that try to execute such instructions will receive a SIGSEGV signal that they might not expect. In the specific cases for which emulation is provided (instructions SGDT, SIDT and SMSW in protected and virtual-8086 modes), no signal is generated. However, a warning is helpful to encourage updates in such programs to avoid the use of such instructions. Warnings are printed via a customized printk() function that also provides information about the program that attempted to use the affected instructions. Utility macros are defined to wrap umip_printk() for the error and warning kernel log levels. While here, replace an existing call to the generic rate-limited pr_err() with the new umip_pr_err(). Suggested-by: Linus Torvalds Signed-off-by: Ricardo Neri Reviewed-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi V. Shankar Cc: Tony Luck Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1511233476-17088-1-git-send-email-ricardo.neri-calderon@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/umip.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 58 insertions(+), 4 deletions(-) commit 135f971181d779c96ff3725c1a350a721785cc66 Author: Alex Deucher Date: Mon Nov 20 17:49:53 2017 -0500 drm/amdgpu: don't skip attributes when powerplay is enabled The function checks non-powerplay structures so regressed when the pp_enabled check was removed. This should ideally be implemented similarly for powerplay. Fixes: 6d07fe7bcae57 ("drm/amdgpu: delete pp_enable in adev") Tested-by: Dieter Nützel Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 4 ++++ 1 file changed, 4 insertions(+) commit e4717292ddebcfe231651b5aff9fa19ca158d178 Author: Guilherme G. Piccoli Date: Fri Nov 17 19:14:55 2017 -0200 scsi: aacraid: Prevent crash in case of free interrupt during scsi EH path As part of the scsi EH path, aacraid performs a reinitialization of the adapter, which encompass freeing resources and IRQs, NULLifying lots of pointers, and then initialize it all over again. We've identified a problem during the free IRQ portion of this path if CONFIG_DEBUG_SHIRQ is enabled on kernel config file. Happens that, in case this flag was set, right after free_irq() effectively clears the interrupt, it checks if it was requested as IRQF_SHARED. In positive case, it performs another call to the IRQ handler on driver. Problem is: since aacraid currently free some resources *before* freeing the IRQ, once free_irq() path calls the handler again (due to CONFIG_DEBUG_SHIRQ), aacraid crashes due to NULL pointer dereference with the following trace: aac_src_intr_message+0xf8/0x740 [aacraid] __free_irq+0x33c/0x4a0 free_irq+0x78/0xb0 aac_free_irq+0x13c/0x150 [aacraid] aac_reset_adapter+0x2e8/0x970 [aacraid] aac_eh_reset+0x3a8/0x5d0 [aacraid] scsi_try_host_reset+0x74/0x180 scsi_eh_ready_devs+0xc70/0x1510 scsi_error_handler+0x624/0xa20 This patch prevents the crash by changing the order of the deinitialization in this path of aacraid: first we clear the IRQ, then we free other resources. No functional change intended. Signed-off-by: Guilherme G. Piccoli Reviewed-by: Raghava Aditya Renukunta Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9b6d85a38df398cfe0ba3f0fae59d58c9a6d433 Author: Guilherme G. Piccoli Date: Fri Nov 17 19:14:54 2017 -0200 scsi: aacraid: Perform initialization reset only once Currently the driver accepts two ways of requesting an initialization reset on the adapter: by passing aac_reset_devices module parameter, or the generic kernel parameter reset_devices. It's working as intended...but if we end up reaching a scsi hang and the scsi EH mechanism takes place, aacraid performs resets as part of the scsi error recovery procedure. These EH routines might reinitialize the device, and if we have provided some of the reset parameters in the kernel command-line, we again perform an "initialization" reset. So, to avoid this duplication of resets in case of scsi EH path, this patch adds a field to aac_dev struct to keep per-adapter track of the init reset request - once it's done, we set it to false and don't proactively reset anymore in case of reinitializations. Signed-off-by: Guilherme G. Piccoli Reviewed-by: Raghava Aditya Renukunta Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/aacraid.h | 1 + drivers/scsi/aacraid/linit.c | 3 +++ drivers/scsi/aacraid/rx.c | 15 ++++++++++----- drivers/scsi/aacraid/src.c | 20 ++++++++++++++------ 4 files changed, 28 insertions(+), 11 deletions(-) commit bd257b2f3bc68514fad19763f540fea581c12d22 Author: Guilherme G. Piccoli Date: Fri Nov 17 19:14:53 2017 -0200 scsi: aacraid: Check for PCI state of device in a generic way Commit 16ae9dd35d37 ("scsi: aacraid: Fix for excessive prints on EEH") introduced checks about the state of device before any PCI operations in the driver. Basically, this prevents it to perform PCI accesses when device is in the process of recover from a PCI error. In PowerPC, such mechanism is called EEH, and the aforementioned commit introduced checks that are based on EEH-specific primitives for that. The potential problems with this approach are three: first, these checks are "locked" to powerpc only - another archs could have error recovery methods too, like AER in Intel. Also, the powerpc primitives perform expensive FW accesses to validate the precise PCI state of a device. Finally, code becomes more complicated and needs ifdef validation based on arch config being set. So, this patch makes use of generic PCI state checks, which are lightweight and non-dependent of arch configs - also, it makes the code cleaner. Fixes: 16ae9dd35d37 ("scsi: aacraid: Fix for excessive prints on EEH") Signed-off-by: Guilherme G. Piccoli Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) commit 6547f424be5d9d75c78c146ed6e9f71be1c43981 Merge: 32a72bb 14380194 Author: Daniel Borkmann Date: Tue Nov 21 00:37:36 2017 +0100 Merge branch 'bpf-offload-fixes' Jakub Kicinski says: ==================== This series addresses some late comments and moves checking if program has been loaded for the correct device to the drivers. There are also some problems with net namespaces which I didn't take into consideration. On the kernel side we will now simply ignore namespace moves. Since the user space API is not reporting any namespace identification we have to remove the ifindex until a correct way of reporting is agreed upon. v2: - fix ext ack reporting for XDP (David A); - add Jiri's Ack. ==================== Signed-off-by: Daniel Borkmann commit 1438019479349d262b76f8767ace3273d11b6dcb Author: Jakub Kicinski Date: Mon Nov 20 15:22:00 2017 -0800 bpf: make bpf_prog_offload_verifier_prep() static inline Header implementation of bpf_prog_offload_verifier_prep() which is used if CONFIG_NET=n should be a static inline. Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann include/linux/bpf_verifier.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ee640095f049e7ac4ec36b985abada497b98cc2 Author: Jakub Kicinski Date: Mon Nov 20 15:21:59 2017 -0800 bpf: revert report offload info to user space This reverts commit bd601b6ada11 ("bpf: report offload info to user space"). The ifindex by itself is not sufficient, we should provide information on which network namespace this ifindex belongs to. After considering some options we concluded that it's best to just remove this API for now, and rework it in -next. Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann include/linux/bpf.h | 1 - include/uapi/linux/bpf.h | 6 ------ kernel/bpf/offload.c | 12 ------------ kernel/bpf/syscall.c | 5 ----- 4 files changed, 24 deletions(-) commit 51aa423959b0ab62169c98b90566a0628ba096b8 Author: Jakub Kicinski Date: Mon Nov 20 15:21:58 2017 -0800 bpftool: revert printing program device bound info This reverts commit 928631e05495 ("bpftool: print program device bound info"). We will remove this API and redo it right in -next. Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann tools/bpf/bpftool/prog.c | 31 ------------------------------- tools/include/uapi/linux/bpf.h | 6 ------ 2 files changed, 37 deletions(-) commit 62c71b45e8537b8cb746cc929ea05ba0258e0b5a Author: Jakub Kicinski Date: Mon Nov 20 15:21:57 2017 -0800 bpf: offload: ignore namespace moves We are currently destroying the device offload state when device moves to another net namespace. This doesn't break with current NFP code, because offload state is not used on program removal, but it's not correct behaviour. Ignore the device unregister notifications on namespace move. Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann kernel/bpf/offload.c | 4 ++++ 1 file changed, 4 insertions(+) commit 479321e9c31a6c05426790b11888427400f75ac8 Author: Jakub Kicinski Date: Mon Nov 20 15:21:56 2017 -0800 bpf: turn bpf_prog_get_type() into a wrapper bpf_prog_get_type() is identical to bpf_prog_get_type_dev(), with false passed as attach_drv. Instead of keeping it as an exported symbol turn it into static inline wrapper. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: Daniel Borkmann include/linux/bpf.h | 13 ++++++------- kernel/bpf/syscall.c | 10 ---------- 2 files changed, 6 insertions(+), 17 deletions(-) commit 441a33031fe5a3e828fbc17a4f9a5bab9143243c Author: Jakub Kicinski Date: Mon Nov 20 15:21:55 2017 -0800 net: xdp: don't allow device-bound programs in driver mode Currently device-bound programs are not able to run on the host to save resources (host JIT is not invoked). Don't allow XDP programs to be attached without the HW_MODE flag. In theory if program is already translated for device offload the driver should choose to offload it instead of loading it in the driver. However, offloading translated program may still fail resulting in device-bound program being run on the host. Prevent this by refusing to attach device bound programs if XDP_FLAGS_HW_MODE is not set. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: Daniel Borkmann net/core/dev.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 288b3de55aace830f13280985ec9e6bcbff33b1b Author: Jakub Kicinski Date: Mon Nov 20 15:21:54 2017 -0800 bpf: offload: move offload device validation out to the drivers With TC shared block changes we can't depend on correct netdev pointer being available in cls_bpf. Move the device validation to the driver. Core will only make sure that offloaded programs are always attached in the driver (or in HW by the driver). We trust that drivers which implement offload callbacks will perform necessary checks. Moving the checks to the driver is generally a useful thing, in practice the check should be against a switchdev instance, not a netdev, given that most ASICs will probably allow using the same program on many ports. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Jiri Pirko Signed-off-by: Daniel Borkmann drivers/net/ethernet/netronome/nfp/bpf/offload.c | 10 ++++++++-- include/linux/bpf.h | 4 ++-- kernel/bpf/syscall.c | 23 ++++++++++++----------- net/core/dev.c | 7 ++----- net/sched/cls_bpf.c | 8 +++----- 5 files changed, 27 insertions(+), 25 deletions(-) commit 1f6f4cb7ba219b00a3fa9afe8049fa16444d8b52 Author: Jakub Kicinski Date: Mon Nov 20 15:21:53 2017 -0800 bpf: offload: rename the ifindex field bpf_target_prog seems long and clunky, rename it to prog_ifindex. We don't want to call this field just ifindex, because maps may need a similar field in the future and bpf_attr members for programs and maps are unnamed. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: Daniel Borkmann include/uapi/linux/bpf.h | 2 +- kernel/bpf/offload.c | 2 +- kernel/bpf/syscall.c | 4 ++-- tools/include/uapi/linux/bpf.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 649f11dcd19a5f0d00fdbc760fbdccdd98e56a43 Author: Jakub Kicinski Date: Mon Nov 20 15:21:52 2017 -0800 bpf: offload: limit offload to cls_bpf and xdp programs only We are currently only allowing attachment of device-bound cls_bpf and XDP programs. Make this restriction explicit in the BPF offload code. This way we can potentially reuse the ifindex field in the future. Since XDP and cls_bpf programs can only be loaded by admin, we can drop the explicit capability check from offload code. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: Daniel Borkmann kernel/bpf/offload.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 13a9c48a85ccf1417b527975c0a12b47fbfaf625 Author: Jakub Kicinski Date: Mon Nov 20 15:21:51 2017 -0800 bpf: offload: add comment warning developers about double destroy Offload state may get destroyed either because the device for which it was constructed is going away, or because the refcount of bpf program itself has reached 0. In both of those cases we will call __bpf_prog_offload_destroy() to unlink the offload from the device. We may in fact call it twice, which works just fine, but we should make clear this is intended and caution others trying to extend the function. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: Daniel Borkmann kernel/bpf/offload.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8d8258bdab735d9f3c4b78e091ecfbb2b2b1f2ca Author: Rex Zhu Date: Fri Nov 17 16:41:16 2017 +0800 drm/amd/pp: fix typecast error in powerplay. resulted in unexpected data truncation Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a64a62ce9a380213dc9e192f762266d70c9b40ec Author: Lv Zheng Date: Tue Sep 26 16:54:09 2017 +0800 ACPI / EC: Fix regression related to PM ops support in ECDT device On platforms (ASUS X550ZE and possibly all ASUS X series) with valid ECDT EC but invalid DSDT EC, EC PM ops won't be invoked as ECDT EC is not an ACPI device. Thus the following commit actually removed post-resume acpi_ec_enable_event() invocation for such platforms, and triggered a regression on them that after being resumed, EC (actually should be ECDT) driver stops handling EC events: Commit: c2b46d679b30c5c0d7eb47a21085943242bdd8dc Subject: ACPI / EC: Add PM operations to improve event handling for resume process Notice that the root cause actually is "ECDT is not an ACPI device" rather than "the timing of acpi_ec_enable_event() invocation", this patch fixes this issue by enumerating ECDT EC as an ACPI device. Due to the existence of the noirq stage, the ability of tuning the timing of acpi_ec_enable_event() invocation is still meaningful. This patch is a little bit different from the posted fix by moving acpi_config_boot_ec() from acpi_ec_ecdt_start() to acpi_ec_add() to make sure that EC event handling won't be stopped as long as the ACPI EC driver is bound. Thus the following sequence shouldn't disable EC event handling: unbind,suspend,resume,bind. Fixes: c2b46d679b30 (ACPI / EC: Add PM operations to improve event handling for resume process) Link: https://bugzilla.kernel.org/show_bug.cgi?id=196847 Reported-by: Luya Tshimbalanga Tested-by: Luya Tshimbalanga Cc: 4.9+ # 4.9+ Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 69 +++++++++++++++++++++++++++++---------------- drivers/acpi/internal.h | 1 + drivers/acpi/scan.c | 21 ++++++++++++++ include/acpi/acpi_bus.h | 1 + include/acpi/acpi_drivers.h | 1 + 5 files changed, 69 insertions(+), 24 deletions(-) commit 10809bb976648ac58194a629e3d7af99e7400297 Author: Hans de Goede Date: Sun Oct 15 21:24:49 2017 +0200 ACPI / bus: Leave modalias empty for devices which are not present Most Bay and Cherry Trail devices use a generic DSDT with all possible peripheral devices present in the DSDT, with their _STA returning 0x00 or 0x0f based on AML variables which describe what is actually present on the board. Since ACPI device objects with a 0x00 status (not present) still get an entry under /sys/bus/acpi/devices, and those entry had an acpi:PNPID modalias, userspace would end up loading modules for non present hardware. This commit fixes this by leaving the modalias empty for non present devices. This results in 10 modules less being loaded with a generic distro kernel config on my Cherry Trail test-device (a GPD pocket). Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/device_sysfs.c | 4 ++++ 1 file changed, 4 insertions(+) commit 87c9fd81825363237ac5560822e2261535800597 Author: Fabio Estevam Date: Wed Nov 15 10:59:53 2017 -0200 dt-bindings: rtc: imxdi: Improve the bindings text Improve the bindings text by doing the following changes: - Remove the i.MX53 reference, as the RTC on i.MX53 is a different hardware - Add 'clocks' to the list of required properties - Explain that the optional security violation irq is the second entry - Use the real unit address and irq numbers for i.MX25 Signed-off-by: Fabio Estevam Acked-by: Juergen Borleis Acked-by: Rob Herring Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/rtc/imxdi-rtc.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 495bbde523969c596bcfb8285a6027c746a18ef4 Author: Baolin Wang Date: Thu Nov 9 11:34:17 2017 +0800 rtc: sc27xx: Add Spreadtrum SC27xx PMIC RTC driver This patch adds the Spreadtrum RTC driver, which embedded in the Spreadtrum SC27xx series PMICs. Signed-off-by: Baolin Wang Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 11 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-sc27xx.c | 662 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 674 insertions(+) commit 4255c30fe88ee3cc99bbeac7974db27e4217a497 Author: Mario Limonciello Date: Thu Nov 16 22:13:12 2017 -0600 platform/x86: dell-smbios-wmi: Disable userspace interface if missing hotfix The Dell SMBIOS WMI interface will fail for some more complex calls unless a WMI hotfix has been included. Most platforms have this fix available in a maintenance BIOS release. In the case the driver is loaded on a platform without this fix, disable the userspace interface. A hotfix indicator is present in the dell-wmi-descriptor that represents whether or not more complex calls will work properly. "Simple" calls such as those used by dell-laptop and dell-wmi will continue to work properly so dell-smbios-wmi should not be blocked from binding and being used as the dell-smbios dispatcher. Suggested-by: Girish Prakash Signed-off-by: Mario Limonciello Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-smbios-wmi.c | 13 +++++++++++++ drivers/platform/x86/dell-wmi-descriptor.c | 26 ++++++++++++++++++++++++-- drivers/platform/x86/dell-wmi-descriptor.h | 1 + 3 files changed, 38 insertions(+), 2 deletions(-) commit 8e138e0d92c6c9d3d481674fb14e3439b495be37 Author: Josef Bacik Date: Fri Nov 17 14:50:46 2017 -0500 btrfs: clear space cache inode generation always We discovered a box that had double allocations, and suspected the space cache may be to blame. While auditing the write out path I noticed that if we've already setup the space cache we will just carry on. This means that any error we hit after cache_save_setup before we go to actually write the cache out we won't reset the inode generation, so whatever was already written will be considered correct, except it'll be stale. Fix this by _always_ resetting the generation on the block group inode, this way we only ever have valid or invalid cache. With this patch I was no longer able to reproduce cache corruption with dm-log-writes and my bpf error injection tool. Cc: stable@vger.kernel.org Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 3a025e1d1c2ea42fa497c9c6b21c284e0f69e28b Author: Matthew Wilcox Date: Mon Nov 20 10:40:40 2017 -0800 Add optional check for bad kernel-doc comments Implement a '-none' output mode for kernel-doc which will only output warning messages, and suppresses the warning message about there being no kernel-doc in the file. If the build has requested additional warnings, automatically check all .c files. This patch does not check .h files. Enabling the warning by default would add about 1300 warnings, so it's default off for now. People who care can use this to check they didn't break the docs and maybe we'll get all the warnings fixed and be able to enable this check by default in the future. Signed-off-by: Matthew Wilcox Signed-off-by: Jonathan Corbet scripts/Makefile.build | 5 +++++ scripts/kernel-doc | 25 ++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) commit def4db33e69609a43b28b399d569b6a0d3ba272a Author: Jonathan Neuschäfer Date: Sat Nov 18 03:22:32 2017 +0100 dt-bindings: trivial-devices: Remove fsl,mc13892 This device's bindings are not trivial: Additional properties are documented in in Documentation/devicetree/bindings/mfd/mc13xxx.txt. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Fabio Estevam Signed-off-by: Rob Herring Documentation/devicetree/bindings/trivial-devices.txt | 1 - 1 file changed, 1 deletion(-) commit 02a876b504152335b49d99185ef5de4ced235555 Author: Stephen Boyd Date: Fri Nov 17 08:53:21 2017 -0800 of: Document exactly what of_find_node_by_name() puts It isn't clear if this function of_node_put()s the 'from' argument, or the node it searches. Clearly indicate which variable is touched. Fold in some more fixes from Randy too because we're in the area. Cc: Randy Dunlap Signed-off-by: Stephen Boyd Acked-by: Randy Dunlap Signed-off-by: Rob Herring drivers/of/base.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 86313903430d08739e391ad51b4865dc3a2bf522 Author: Tom Saeger Date: Mon Nov 20 11:41:41 2017 -0600 MAINTAINERS: fix jfs tree location JFS tree has been moved to github. Signed-off-by: Tom Saeger Signed-off-by: Dave Kleikamp MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7e61fc0ba7b92153e17f1f707d2b7b3d52c0588 Author: Randy Dunlap Date: Sun Nov 19 21:08:11 2017 -0800 Documentation: fix profile= options in kernel-parameters.txt Correctly the formatting of several additions to the profile= option that have been added by using and listing the choices for it. Signed-off-by: Randy Dunlap Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 0cf9bb67f518f1064ec482b790d51a6e02406cba Author: Randy Dunlap Date: Sun Nov 19 10:02:20 2017 -0800 documentation/svga.txt: update outdated file Drop CONFIG_VIDEO_400_HACK info completely. Drop CONFIG_VIDEO_RETAIN and CONFIG_VIDEO_LOCAL completely. Drop CONFIG_VIDEO_COMPACT and CONFIG_VIDEO_VESA info completely. Drop CONFIG_VIDEO_SVGA info since it has been removed. Drop chapter number & section number references since they are wrong. Drop (bad) ftp URL for 800x600 Thinkpad XF86Config. Rename CONFIG_VIDEO_GFX_HACK to VIDEO_GFX_HACK since it is not a Kconfig symbol. And to match the source code. Build options are controlled by the kernel kconfig utility. Signed-off-by: Randy Dunlap Acked-By: Martin Mares Cc: "H. Peter Anvin" Signed-off-by: Jonathan Corbet Documentation/svga.txt | 59 ++++++++------------------------------------------ 1 file changed, 9 insertions(+), 50 deletions(-) commit 80416fb43e14e443dd18bc395167f73dba271748 Author: SeongJae Park Date: Sat Nov 18 11:52:24 2017 +0900 kokr/memory-barriers.txt: Fix typo in paring example This commit applies an upstream change, commit d92f842bb30f ("memory-barriers.txt: Fix typo in pairing example") to the 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 578152da87c7e9d350a5164beb16214e5bef1420 Author: SeongJae Park Date: Sat Nov 18 11:52:23 2017 +0900 kokr/memory-barriers/txt: Replace uses of "transitive" This commit applies two upstream change, commit f1ab25a30ce8 ("memory-barriers: Replace uses of "transitive"") and commit 0902b1f44a72 ("memory-barriers: Rework multicopy-atomicity section") to the Korean translation. Those two changes are applied with this signle commit because the second change is improvement of the first one. Signed-off-by: SeongJae Park Signed-off-by: Jonathan Corbet .../translations/ko_KR/memory-barriers.txt | 176 ++++++++++----------- 1 file changed, 88 insertions(+), 88 deletions(-) commit 8ee25f6fcfa967da26c5dfa43c731a61f84f7404 Author: Greg Kroah-Hartman Date: Thu Nov 16 14:23:09 2017 +0100 Documentation/process: add Co-Developed-by: tag for patches with multiple authors Sometimes a single patch is the result of multiple authors. As git only can have one "author" of a patch, it is still good to properly give credit to the other developers of a commit. To address this, document the "Co-Developed-by:" tag which can be used to show other authors of the patch. Note, these other authors must also provide a Signed-off-by: tag as it is their work that is being submitted here. Reported-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman Reviewed-by: Thomas Gleixner Acked-by: Borislav Petkov Signed-off-by: Jonathan Corbet Documentation/process/5.Posting.rst | 5 +++++ 1 file changed, 5 insertions(+) commit 1967c12896e09599e77cd62f660a99bef4e3ab19 Author: Johan Hovold Date: Sat Nov 11 18:05:32 2017 +0100 wcn36xx: fix iris child-node lookup Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at the parent rather than just matching on its children. To make things worse, the parent mmio node was also prematurely freed. Fixes: fd52bdae9ab0 ("wcn36xx: Disable 5GHz for wcn3620") Cc: Loic Poulain Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 307aeb31af0d9ba63346466f88badd64e7ed9786 Author: Vasanthakumar Thiagarajan Date: Fri Oct 27 18:35:41 2017 +0300 ath10k: fix data rx for CCMP-256, GCMP and GCMP-256 in raw mode Make sure 16-byte mic is removed from the rx data packet tail when CCMP-256, GCMP and GCMP-256 ciphers are used in raw decap mode. This fixed rx traffic failures in those ciphers in raw mode. Split the helper returning crypto tail length into two, one to get the ICV length and other to get the mic lengh for the cipher to make it clean. Fixes: 2ea9f12cefe4 ("ath10k: add new cipher suite support") Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 51 ++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 13 deletions(-) commit 33ddd81e2bd5d9970b9f01ab383ba45035fa41ee Author: Johannes Berg Date: Mon Nov 13 11:33:55 2017 +0100 mac80211: properly free requested-but-not-started TX agg sessions When deleting a station or otherwise tearing down all aggregation sessions, make sure to delete requested but not yet started ones, to avoid the following scenario: * session is requested, added to tid_start_tx[] * ieee80211_ba_session_work() runs, gets past BLOCK_BA check * ieee80211_sta_tear_down_BA_sessions() runs, locks &sta->ampdu_mlme.mtx, e.g. while deleting the station - deleting all active sessions * ieee80211_ba_session_work() continues since tear down flushes it, and calls ieee80211_tx_ba_session_handle_start() for the new session, arms the timer for it * station deletion continues to __cleanup_single_sta() and frees the session struct, while the timer is armed Reported-by: Fengguang Wu Signed-off-by: Johannes Berg net/mac80211/agg-tx.c | 5 +++++ 1 file changed, 5 insertions(+) commit 67bd52386125ce1159c0581cbcd2740addf33cd4 Author: Ben Hutchings Date: Fri Nov 10 18:48:50 2017 +0000 mac80211_hwsim: Fix memory leak in hwsim_new_radio_nl() hwsim_new_radio_nl() now copies the name attribute in order to add a null-terminator. mac80211_hwsim_new_radio() (indirectly) copies it again into the net_device structure, so the first copy is not used or freed later. Free the first copy before returning. Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length") Signed-off-by: Ben Hutchings Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d7be102f2945a626f55e0501e52bb31ba3e77b81 Author: Johannes Berg Date: Thu Oct 26 11:24:27 2017 +0200 cfg80211: initialize regulatory keys/database later When cfg80211 is built as a module, everything is fine, and we can keep the code as is; in fact, we have to, because there can only be a single module_init(). When cfg80211 is built-in, however, it needs to initialize before drivers (device_initcall/module_init), and thus used to be at subsys_initcall(). I'd moved it to fs_initcall() earlier, where it can remain. However, this is still too early because at that point the key infrastructure hasn't been initialized yet, so X.509 certificates can't be parsed yet. To work around this problem, load the regdb keys only later in a late_initcall(), at which point the necessary infrastructure has been initialized. Fixes: 90a53e4432b1 ("cfg80211: implement regdb signature checking") Reported-by: Xiaolong Ye Signed-off-by: Johannes Berg net/wireless/reg.c | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) commit 7cca2acdff2d7c53b4a553756e731693152115d4 Author: Kees Cook Date: Tue Oct 17 13:25:45 2017 -0700 mac80211: aggregation: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This removes the tid mapping array and expands the tid structures to add a pointer back to the station, along with the tid index itself. Cc: Johannes Berg Cc: "David S. Miller" Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook [switch tid variables to u8, the valid range is 0-15 at most, initialize tid_tx->sta/tid properly] Signed-off-by: Johannes Berg net/mac80211/agg-rx.c | 41 +++++++++++++++++------------------------ net/mac80211/agg-tx.c | 44 ++++++++++++++++++-------------------------- net/mac80211/sta_info.c | 8 -------- net/mac80211/sta_info.h | 12 ++++++++++-- 4 files changed, 45 insertions(+), 60 deletions(-) commit 44905265bc155e0237c76c25bf5ddf740d85a8f2 Author: Johannes Berg Date: Tue Oct 17 21:56:01 2017 +0200 nl80211: don't expose wdev->ssid for most interfaces For mesh, this is simply wrong - there's no SSID, only the mesh ID, so don't expose it at all. For (P2P) client, it's wrong, because it exposes an internal value that's only used when certain APIs are used. For AP, it's actually the only correct case, so leave that. All other interface types shouldn't be setting this anyway, so there it won't change anything. Fixes: b84e7a05f619 ("nl80211: send the NL80211_ATTR_SSID in nl80211_send_iface()") Signed-off-by: Johannes Berg net/wireless/nl80211.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit 34f11cd329580fe4c3e8f10081d687331fc710f3 Author: Kees Cook Date: Mon Oct 16 16:35:49 2017 -0700 mac80211: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Johannes Berg Cc: "David S. Miller" Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Johannes Berg net/mac80211/ibss.c | 7 +++---- net/mac80211/ieee80211_i.h | 3 ++- net/mac80211/led.c | 11 ++++++----- net/mac80211/main.c | 3 +-- net/mac80211/mesh.c | 27 ++++++++++++--------------- net/mac80211/mesh.h | 2 +- net/mac80211/mesh_hwmp.c | 4 ++-- net/mac80211/mesh_pathtbl.c | 3 +-- net/mac80211/mlme.c | 32 ++++++++++++++------------------ net/mac80211/ocb.c | 10 +++++----- net/mac80211/sta_info.c | 7 +++---- 11 files changed, 50 insertions(+), 59 deletions(-) commit 1514f6fc136943c27364f164de1e86c2d51befa9 Merge: 32a72bb c2c48dd Author: Kalle Valo Date: Mon Nov 20 17:44:44 2017 +0200 Merge tag 'iwlwifi-for-kalle-2017-11-19' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes iwlwifi: first set of fixes for 4.15 * Support new FW API version of scan cmd (used in FW version 34); * Add a bunch of PCI IDs and fix configuration structs for A000 devices; * Fix the exported firmware name strings for 9000 and A000 devices; commit 739acd85ffdb725a8ef206737875f4b2c1dad02a Author: Jyri Sarha Date: Fri Nov 3 12:54:01 2017 +0200 drm/tilcdc: Remove obsolete "ti,tilcdc,slave" dts binding support This patch removes DRM_TILCDC_SLAVE_COMPAT option for supporting the obsolete "ti,tilcdc,slave" device tree binding. The new of_graph based binding - that is widely used in other drm driver too - has been supported since Linux v4.2. Maintaining the the backwards dts conversion code in the DRM_TILCDC_SLAVE_COMPAT has become a nuisance for the device/of development so the we decided to drop it after Linux v4.14, the 2017 LTS. Signed-off-by: Jyri Sarha Acked-by: Rob Herring drivers/gpu/drm/tilcdc/Kconfig | 11 - drivers/gpu/drm/tilcdc/Makefile | 3 - drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c | 269 ------------------------- drivers/gpu/drm/tilcdc/tilcdc_slave_compat.dts | 72 ------- drivers/gpu/drm/tilcdc/tilcdc_slave_compat.h | 25 --- 5 files changed, 380 deletions(-) commit fbcd253d2448b8f168241e38f629a36c4c8c1e94 Author: Florian Westphal Date: Sun Nov 19 21:27:28 2017 +0100 netfilter: conntrack: lower timeout to RETRANS seconds if window is 0 When zero window is announced we can get into a situation where connection stays around forever: 1. One side announces zero window. 2. Other side closes. In this case, no FIN is sent (stuck in send queue). Unless other side opens the window up again conntrack stays in ESTABLISHED state for a very long time. Lets alleviate this by lowering the timeout to RETRANS (5 minutes), the other end should be sending zero window probes to keep the connection established as long as a socket still exists. Cc: Jozsef Kadlecsik Signed-off-by: Florian Westphal Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_proto_tcp.c | 3 +++ 1 file changed, 3 insertions(+) commit e1335e2f0cfcd36ffa1b709ac58096134eb6e779 Author: Thierry Reding Date: Thu Oct 12 17:53:11 2017 +0200 drm/tegra: sor: Reimplement pad clock The current implementation of the pad clock isn't quite correct. This has the side-effect of being incompatible with the implementation for Tegra186 (provided by the BPMP) and therefore would require a massive change to the driver to cope with the differences. Instead, simply do what Tegra186 does and add some code to fallback to the old behaviour for existing device trees. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/sor.c | 157 +++++++++++++++++++++++++++++++------------- 1 file changed, 111 insertions(+), 46 deletions(-) commit ec8a8f3c31ddef0a7d9626c4b8a4baa30f3b80aa Author: Eric Sesterhenn Date: Mon Nov 13 09:09:41 2017 +0100 netfilter: nf_ct_h323: Extend nf_h323_error_boundary to work on bits as well This patch fixes several out of bounds memory reads by extending the nf_h323_error_boundary() function to work on bits as well an check the affected parts. Signed-off-by: Eric Sesterhenn Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_h323_asn1.c | 92 +++++++++++++++++++++++----------- 1 file changed, 62 insertions(+), 30 deletions(-) commit bc7d811ace4ad39a3941089ca871633366878719 Author: Eric Sesterhenn Date: Mon Nov 13 09:09:40 2017 +0100 netfilter: nf_ct_h323: Convert CHECK_BOUND macro to function It is bad practive to return in a macro, this patch moves the check into a function. Signed-off-by: Eric Sesterhenn Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_h323_asn1.c | 94 +++++++++++++++++++++++----------- 1 file changed, 65 insertions(+), 29 deletions(-) commit 613d0776d3fe7eb28c695a63a5533a1ec8258c86 Author: Vasily Averin Date: Sun Nov 12 14:32:37 2017 +0300 netfilter: exit_net cleanup check added Be sure that lists initialized in net_init hook was return to initial state. Signed-off-by: Vasily Averin Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/ipt_CLUSTERIP.c | 1 + net/netfilter/nf_tables_api.c | 7 +++++++ net/netfilter/nfnetlink_log.c | 5 +++++ net/netfilter/nfnetlink_queue.c | 5 +++++ net/netfilter/x_tables.c | 9 +++++++++ 5 files changed, 27 insertions(+) commit 07dc8bc9a6b15f54d3ad962af74a096c7d7b42b4 Author: Colin Ian King Date: Tue Nov 7 10:08:01 2017 +0000 netfilter: remove redundant assignment to e The assignment to variable e is redundant since the same assignment occurs just a few lines later, hence it can be removed. Cleans up clang warning for arp_tables, ip_tables and ip6_tables: warning: Value stored to 'e' is never read Signed-off-by: Colin Ian King Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/arp_tables.c | 1 - net/ipv4/netfilter/ip_tables.c | 1 - net/ipv6/netfilter/ip6_tables.c | 1 - 3 files changed, 3 deletions(-) commit 098f53050154498876ef3febde706ff5c8b25cf4 Author: Arnd Bergmann Date: Thu Nov 16 14:35:57 2017 +0100 ARM: dts: r8a779x: Add '#reset-cells' in cpg-mssr With the latest dtc, we get many warnings about the missing '#reset-cells' property in these controllers, e.g.: arch/arm/boot/dts/r8a7790-lager.dtb: Warning (resets_property): Missing property '#reset-cells' in node /clock-controller@e6150000 or bad phandle (referred from /can@e6e80000:resets[0]) arch/arm/boot/dts/r8a7792-blanche.dtb: Warning (resets_property): Missing property '#reset-cells' in node /soc/clock-controller@e6150000 or bad phandle (referred from /soc/dma-controller@e6700000:resets[0]) arch/arm/boot/dts/r8a7792-wheat.dtb: Warning (resets_property): Missing property '#reset-cells' in node /soc/clock-controller@e6150000 or bad phandle (referred from /soc/ethernet@e6800000:resets[0]) arch/arm/boot/dts/r8a7793-gose.dtb: Warning (resets_property): Missing property '#reset-cells' in node /clock-controller@e6150000 or bad phandle (referred from /gpio@e6050000:resets[0]) arch/arm/boot/dts/r8a7794-alt.dtb: Warning (resets_property): Missing property '#reset-cells' in node /clock-controller@e6150000 or bad phandle (referred from /i2c@e6500000:resets[0]) arch/arm/boot/dts/r8a7794-silk.dtb: Warning (resets_property): Missing property '#reset-cells' in node /clock-controller@e6150000 or bad phandle (referred from /interrupt-controller@e61c0000:resets[0]) This adds it for the three r8a779x chips that were lacking it. The binding mandates this as <1>, so this is the value I use. Signed-off-by: Arnd Bergmann [geert: Add fix for r8a7793.dtsi] Fixes: 34fbd2b12761d111 ("ARM: dts: r8a7790: Add reset control properties") Fixes: 6e11a322f1d7505d ("ARM: dts: r8a7792: Add reset control properties") Fixes: 84fb19e1d201ba86 ("ARM: dts: r8a7793: Add reset control properties") Fixes: 615beb759ca494a4 ("ARM: dts: r8a7794: Add reset control properties") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790.dtsi | 1 + arch/arm/boot/dts/r8a7792.dtsi | 1 + arch/arm/boot/dts/r8a7793.dtsi | 1 + arch/arm/boot/dts/r8a7794.dtsi | 1 + 4 files changed, 4 insertions(+) commit 7a06c66835f75fe2be4f154a93cc30cb81734b81 Author: Aneesh Kumar K.V Date: Fri Nov 10 10:25:07 2017 +0530 powerpc/64s/slice: Use addr limit when computing slice mask While computing slice mask for the free area we need make sure we only search in the addr limit applicable for this mmap. We update the slb_addr_limit after we request for a mmap above 128TB. But the following mmap request with hint addr below 128TB should still limit its search to below 128TB. ie. we should not use slb_addr_limit to compute slice mask in this case. Instead, we should derive high addr limit based on the mmap hint addr value. Fixes: f4ea6dcb08ea ("powerpc/mm: Enable mappings above 128TB") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/slice.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit 0b0882672640ced4deeebf84da0b88b6389619c4 Author: Harald Freudenberger Date: Fri Nov 17 16:32:22 2017 +0100 s390/zcrypt: Fix wrong comparison leading to strange load balancing The function to decide if one zcrypt queue is better than another one compared two pointers instead of comparing the values where the pointers refer to. So within the same zcrypt card when load of each queue was equal just one queue was used. This effect only appears on relatively lite load, typically with one thread applications. This patch fixes the wrong comparison and now the counters show that requests are balanced equally over all available queues within the cards. There is no performance improvement coming with this fix. As long as the queue depth for an APQN queue is not touched, processing is not faster when requests are spread over queues within the same card hardware. So this fix only beautifies the lszcrypt counter printouts. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/zcrypt_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit de35089cc82c33f8be1dec5a0c3d7a05cf91720d Author: Heiko Carstens Date: Fri Nov 17 09:50:40 2017 +0100 s390/disassembler: remove confusing code When searching the opcode offset table within find_insn() the check "entry->opcode == 0" was intended to clarify that 1-byte opcodes, the first one being 0, are special. However there is no mnemonic for an illegal opcode starting with 0. Therefore there is also no opcode offset table entry that matches, which again means that the check never is true. Therefore just remove the confusing check, and add a comment which hopefully explains how this works. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/dis.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3241d3eb7d9bb7a134bedf49db196cf98b58834d Author: Heiko Carstens Date: Thu Nov 16 14:54:04 2017 +0100 s390: rework __switch_to() to allow larger task_struct offsets If GCC_PLUGIN_RANDSTRUCT is enabled the members of task_struct will be shuffled around. The offsets of the "pid" and "stack" members within task_struct may not necessarily fit into 12 bits anymore, which causes compile errors within __switch_to, since instructions are used, which only have a 12 bit displacement field. Therefore rework __switch_to, to allow for larger offsets. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/entry.S | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 38389ec84e835fa31a59b7dabb18343106a6d0d5 Author: Thomas Richter Date: Thu Nov 16 14:26:36 2017 +0100 s390/topology: fix compile error in file arch/s390/kernel/smp.c Commit 1887aa07b676 ("s390/topology: add detection of dedicated vs shared CPUs") introduced following compiler error when CONFIG_SCHED_TOPOLOGY is not set. CC arch/s390/kernel/smp.o ... arch/s390/kernel/smp.c: In function ‘smp_start_secondary’: arch/s390/kernel/smp.c:812:6: error: implicit declaration of function ‘topology_cpu_dedicated’; did you mean ‘topology_cpu_init’? This patch fixes the compiler error by adding function topology_cpu_dedicated() to return false when this config option is not defined. Signed-off-by: Thomas Richter Reviewed-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/topology.h | 1 + arch/s390/kernel/smp.c | 1 + 2 files changed, 2 insertions(+) commit 619c62dcc62b957d17cccde2081cad527b020883 Author: James Smart Date: Fri Nov 10 15:38:45 2017 -0800 nvmet-fc: correct ref counting error when deferred rcv used Whenever a cmd is received a reference is taken while looking up the queue. The reference is removed after the cmd is done as the iod is returned for reuse. The fod may be reused for a deferred (recevied but no job context) cmd. Existing code removes the reference only if the fod is not reused for another command. Given the fod may be used for one or more ios, although a reference was taken per io, it won't be matched on the frees. Remove the reference on every fod free. This pairs the references to each io. Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/fc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 9941a862cc92e448df95709ff40a618964b25e33 Author: Keith Busch Date: Thu Nov 16 13:36:50 2017 -0700 nvme: Suppress static analyis warning The ns->head is always valid, so we don't need to check for NULL. Reported-by: Dan Carpenter Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit b0d61d586f09fd814a45a5d778fe0d6123f67c2a Author: Keith Busch Date: Thu Nov 16 13:36:49 2017 -0700 nvme: Fix NULL dereference on reservation request This fixes using the NULL 'head' before getting the reference. It is however possible the head will always be NULL, so this patch uses the struct nvme_ns to get the ns_id field. Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 89c4aff6d4f71726f22e567f046dc1dd73c35de1 Author: Colin Ian King Date: Tue Nov 14 14:26:27 2017 +0000 nvme: fix spelling mistake: "requeing" -> "requeuing" Trivial fix to spelling mistake in dev_warn_ratelimited message text Signed-off-by: Colin Ian King Signed-off-by: Christoph Hellwig drivers/nvme/host/multipath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 244a8fe40a09c218622eb9927b9090b0a9b73a1a Author: Minwoo Im Date: Fri Nov 17 01:34:24 2017 +0900 nvme-pci: avoid hmb desc array idx out-of-bound when hmmaxd set. hmb descriptor idx out-of-bound occurs in case of below conditions. preferred = 128MiB chunk_size = 4MiB hmmaxd = 1 Current code will not allow rmmod which will free hmb descriptors to be done successfully in above case. "descs[i]" will be set in for-loop without seeing any conditions related to "max_entries" after a single "descs" was allocated by (max_entries = 1) in this case. Added a condition into for-loop to check index of descriptors. Fixes: 044a9df1("nvme-pci: implement the HMB entry number and size limitations") Signed-off-by: Minwoo Im Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ce48e1727975012a00b7887a12f068238c55bcd Author: Kai-Heng Feng Date: Mon Nov 20 02:29:13 2017 -0500 ALSA: hda/realtek: Add headset mic support for Intel NUC Skull Canyon Users have been using knob "model=dell-headset-multi" on Intel Skull Canyon for a while. Add the equivalent quirk, ALC269_FIXUP_DELL1_MIC_NO_PRESENCE for Skull Canyon. BugLink: https://bugs.launchpad.net/bugs/1732034 Signed-off-by: Kai-Heng Feng Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8427bbc224863e14d905c87920d4005cb3e88ac3 Author: Kai-Heng Feng Date: Thu Nov 9 01:12:03 2017 -0500 nvme-pci: disable APST on Samsung SSD 960 EVO + ASUS PRIME B350M-A The NVMe device in question drops off the PCIe bus after system suspend. I've tried several approaches to workaround this issue, but none of them works: - NVME_QUIRK_DELAY_BEFORE_CHK_RDY - NVME_QUIRK_NO_DEEPEST_PS - Disable APST before controller shutdown - Delay between controller shutdown and system suspend - Explicitly set power state to 0 before controller shutdown Fortunately it's a desktop, so disable APST won't hurt the battery. Also, change the quirk function name to reflect it's for vendor combination quirks. BugLink: https://bugs.launchpad.net/bugs/1705748 Signed-off-by: Kai-Heng Feng Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 9d7fab04b95e8c26014a9bfc1c943b8360b44c17 Author: Sagi Grimberg Date: Tue Oct 24 15:25:22 2017 +0300 nvme-loop: check if queue is ready in queue_rq In case the queue is not LIVE (fully functional and connected at the nvmf level), we cannot allow any commands other than connect to pass through. Add a new queue state flag NVME_LOOP_Q_LIVE which is set after nvmf connect and cleared in queue teardown. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/loop.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 9e0ed16ab9a9aaf670b81c9cd05b5e50defed654 Author: Sagi Grimberg Date: Tue Oct 24 15:25:21 2017 +0300 nvme-fc: check if queue is ready in queue_rq In case the queue is not LIVE (fully functional and connected at the nvmf level), we cannot allow any commands other than connect to pass through. Add a new queue state flag NVME_FC_Q_LIVE which is set after nvmf connect and cleared in queue teardown. Signed-off-by: Sagi Grimberg Reviewed-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit 48832f8d58cfedb2f9bee11bbfbb657efb42e7e7 Author: Sagi Grimberg Date: Tue Oct 24 15:25:20 2017 +0300 nvme-fabrics: introduce init command check for a queue that is not alive When the fabrics queue is not alive and fully functional, no commands should be allowed to pass but connect (which moves the queue to a fully functional state). Any other command should be failed, with either temporary status BLK_STS_RESOUCE or permanent status BLK_STS_IOERR. This is shared across all fabrics, hence move the check to fabrics library. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/fabrics.h | 30 ++++++++++++++++++++++++++++++ drivers/nvme/host/rdma.c | 32 ++++++-------------------------- 2 files changed, 36 insertions(+), 26 deletions(-) commit c8a0739b185d11d6e2ca7ad9f5835841d1cfc765 Merge: 020aae3 4201a99 Author: Linus Torvalds Date: Sun Nov 19 20:41:53 2017 -1000 Merge tag 'ntb-4.15' of git://github.com/jonmason/ntb Pull ntb updates from Jon Mason: "Support for the switchtec ntb and related changes. Also, a couple of bug fixes" [ The timing isn't great. I had asked people to send me pull requests before my family vacation, and this code has not even been in linux-next as far as I can tell. But Logan Gunthorpe pleaded for its inclusion because the Switchtec driver has apparently been around for a while, just never in linux-next - Linus ] * tag 'ntb-4.15' of git://github.com/jonmason/ntb: ntb: intel: remove b2b memory window workaround for Skylake NTB NTB: make idt_89hpes_cfg const NTB: switchtec_ntb: Update switchtec documentation with notes for NTB NTB: switchtec_ntb: Add memory window support NTB: switchtec_ntb: Implement scratchpad registers NTB: switchtec_ntb: Implement doorbell registers NTB: switchtec_ntb: Add link management NTB: switchtec_ntb: Add skeleton NTB driver NTB: switchtec_ntb: Initialize hardware for doorbells and messages NTB: switchtec_ntb: Initialize hardware for memory windows NTB: switchtec_ntb: Introduce initial NTB driver NTB: Add check and comment for link up to mw_count() and mw_get_align() NTB: Ensure ntb_mw_get_align() is only called when the link is up NTB: switchtec: Add link event notifier callback NTB: switchtec: Add NTB hardware register definitions NTB: switchtec: Export class symbol for use in upper layer driver NTB: switchtec: Move structure definitions into a common header ntb: update maintainer list for Intel NTB driver commit 32a72bbd5da2411eab591bf9bc2e39349106193a Author: Christophe JAILLET Date: Sun Nov 19 13:41:33 2017 +0100 net: vxge: Fix some indentation issues Some statements are not enough or too much indented. Fix it to improve readalbility. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/neterion/vxge/vxge-main.c | 37 +++++++++++++------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit d18e4f6834451dbc12407c26acd5fae4da14c489 Author: Netanel Belgazal Date: Sun Nov 19 18:03:40 2017 +0000 net: ena: fix race condition between device reset and link up setup In rare cases, ena driver would reset and re-start the device, for example, in case of misbehaving application that causes transmit timeout The first step in the reset procedure is to stop the Tx traffic by calling ena_carrier_off(). After the driver have just started the device reset procedure, device happens to send an asynchronous notification (via AENQ) to the driver than there was a link change (to link-up state). This link change is mapped to a call to netif_carrier_on() which re-activates the Tx queues, violating the assumption of no tx traffic until device reset is completed, as the reset task might still be in the process of queues initialization, leading to an access to uninitialized memory. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.c | 11 +++++++++-- drivers/net/ethernet/amazon/ena/ena_netdev.h | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) commit 61b272c3aa170b3e461b8df636407b29f35f98eb Author: Tuomas Tynkkynen Date: Sun Nov 19 11:28:43 2017 +0200 9p: Fix missing commas in mount options Since commit c4fac9100456 ("9p: Implement show_options"), the mount options of 9p filesystems are printed out with some missing commas between the individual options: p9-scratch on /mnt/scratch type 9p (rw,dirsync,loose,access=clienttrans=virtio) Add them back. Cc: stable@vger.kernel.org # 4.13+ Fixes: c4fac9100456 ("9p: Implement show_options") Signed-off-by: Tuomas Tynkkynen Signed-off-by: Al Viro net/9p/client.c | 2 +- net/9p/trans_fd.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 020aae3ee58c1af0e7ffc4e2cc9fe4dc630338cb Author: Roberto Sassu Date: Tue Nov 7 11:37:07 2017 +0100 ima: do not update security.ima if appraisal status is not INTEGRITY_PASS Commit b65a9cfc2c38 ("Untangling ima mess, part 2: deal with counters") moved the call of ima_file_check() from may_open() to do_filp_open() at a point where the file descriptor is already opened. This breaks the assumption made by IMA that file descriptors being closed belong to files whose access was granted by ima_file_check(). The consequence is that security.ima and security.evm are updated with good values, regardless of the current appraisal status. For example, if a file does not have security.ima, IMA will create it after opening the file for writing, even if access is denied. Access to the file will be allowed afterwards. Avoid this issue by checking the appraisal status before updating security.ima. Cc: stable@vger.kernel.org Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar Signed-off-by: James Morris security/integrity/ima/ima_appraise.c | 3 +++ 1 file changed, 3 insertions(+) commit 5ee72d330fbefe069cc4a5faf9556b29fb5eb382 Merge: 1220a3e 9fd99f4 Author: Dave Airlie Date: Mon Nov 20 06:14:53 2017 +1000 Merge tag 'drm-fsl-dcu-fixes-for-v4.15' of http://git.agner.ch/git/linux-drm-fsl-dcu into drm-next Some cleanup/fixes, some noticed during testing of Noralf Trønnes rework of the suspend/resume helper. He will rebase the patchset ontop of this. * tag 'drm-fsl-dcu-fixes-for-v4.15' of http://git.agner.ch/git/linux-drm-fsl-dcu: drm/fsl-dcu: enable IRQ before drm_atomic_helper_resume() drm/fsl-dcu: avoid disabling pixel clock twice on suspend drm/fsl-dcu: Don't set connector DPMS property commit 1220a3e5698238c9d5f75dbaacd3938b60048496 Merge: f150891 451cc55 Author: Dave Airlie Date: Mon Nov 20 06:14:14 2017 +1000 Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next Misc fixes for 4.15. * 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux: drm/amd/pp: fix dpm randomly failed on Vega10 drm/amdgpu: set f_mapping on exported DMA-bufs drm/amdgpu: Properly allocate VM invalidate eng v2 drm/amd/amdgpu: if visible VRAM allocation fail, fall back to invisible try again drm/amd/amdgpu: Fix wave mask in amdgpu_debugfs_wave_read() (v2) drm/amdgpu: make AMDGPU_VA_RESERVED_SIZE 64bit drm/amdgpu/gfx9: implement wave VGPR reading drm/amdgpu: Add common golden settings for GFX9 drm/amd/powerplay: fix copy-n-paste error on vddci_buf index drm/amdgpu: Fix null pointer issue in amdgpu_cs_wait_any_fence drm/amdgpu: Remove check which is not valid for certain VBIOS commit 1690102de5651bb85b23d5eeaff682a6b96d705b Author: Marcos Paulo de Souza Date: Sun Nov 19 16:48:13 2017 -0200 blktrace: Use blk_trace_bio_get_cgid inside blk_add_trace_bio We always pass in blk_trace_bio_get_cgid(q, bio) to blk_add_trace_bio(). Since both are readily available in the function already, kill the argument. Signed-off-by: Marcos Paulo de Souza Rewrote commit message. Signed-off-by: Jens Axboe kernel/trace/blktrace.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit ed30b147e1f6e396e70a52dbb6c7d66befedd786 Merge: 0192f17 b671e17 Author: Linus Torvalds Date: Sun Nov 19 08:04:41 2017 -1000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide Pull small IDE cleanup from David Miller. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide: PNP: ide: constify pnp_device_id commit 7fb526212f16fcec4e92121ea86dc28fba493177 Author: Randy Dunlap Date: Sat Nov 18 17:43:38 2017 -0800 block: genhd.c: fix message typo Fix typo in error message. Signed-off-by: Randy Dunlap Signed-off-by: Jens Axboe block/genhd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a92168bc8a113098b44a95d499557a88bb387da Author: weiping zhang Date: Tue Oct 31 18:38:59 2017 +0800 block: add WARN_ON if bdi register fail device_add_disk need do more safety error handle, so this patch just add WARN_ON. Reviewed-by: Jan Kara Signed-off-by: weiping zhang Adapted for current series by me. Signed-off-by: Jens Axboe block/genhd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a0747a859ef6d3cc5b6cd50eb694499b78dd0025 Author: weiping zhang Date: Fri Nov 17 23:06:04 2017 +0800 bdi: add error handle for bdi_debug_register In order to make error handle more cleaner we call bdi_debug_register before set state to WB_registered, that we can avoid call bdi_unregister in release_bdi(). Reviewed-by: Jan Kara Signed-off-by: weiping zhang Signed-off-by: Jens Axboe mm/backing-dev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 97f07697932e6faf2a708f7aef7cba8e6b0cab96 Author: weiping zhang Date: Tue Oct 31 18:37:54 2017 +0800 bdi: convert bdi_debug_register to int Convert bdi_debug_register to int and then do error handle for it. Reviewed-by: Jan Kara Signed-off-by: weiping zhang Signed-off-by: Jens Axboe mm/backing-dev.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit b399a3944d53fb8f39b202da9830e8daa1336e19 Author: Heiner Kallweit Date: Sun Nov 19 11:15:46 2017 +0100 r8169: use same RTL8111EVL green settings as in vendor driver Adjust the code to use the same green settings as in the latest vendor driver. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 5 +++++ 1 file changed, 5 insertions(+) commit 1814d6a8c4be3954810d72d9223cfa37091a5e68 Author: Heiner Kallweit Date: Sun Nov 19 11:09:58 2017 +0100 r8169: fix RTL8111EVL EEE and green settings Name of functions rtl_w0w1_eri and rtl_w0w1_phy is somewhat misleading regarding order of arguments. One could assume that w0w1 means argument with bits to be reset comes before argument with bits to set. However this is not the case. So fix the order of arguments in several statements. In addition fix EEE advertisement. The current code resets the bits for 100BaseT and 1000BaseT EEE advertisement what is not what we want. I have a little of a hard time to find a proper "Fixes" line as the issue seems to have been there forever (at least it existed already when the driver was moved to the current place in 2011). The patch was tested on a Zotac Mini-PC with a RTL8111E-VL chip. Before the patch EEE was disabled, now it's properly advertised and works fine. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 654d573845f35017dc397840fa03610fef3d08b0 Author: Xin Long Date: Sun Nov 19 19:31:04 2017 +0800 tun: fix rcu_read_lock imbalance in tun_build_skb rcu_read_lock in tun_build_skb is used to rcu_dereference tun->xdp_prog safely, rcu_read_unlock should be done in every return path. Now I could see one place missing it, where it returns NULL in switch-case XDP_REDIRECT, another palce using rcu_read_lock wrongly, where it returns NULL in if (xdp_xmit) chunk. So fix both in this patch. Fixes: 761876c857cb ("tap: XDP support") Signed-off-by: Xin Long Signed-off-by: David S. Miller drivers/net/tun.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ed66dfaf236c04d414de1d218441296e57fb2bd2 Author: Neal Cardwell Date: Fri Nov 17 21:06:14 2017 -0500 tcp: when scheduling TLP, time of RTO should account for current ACK Fix the TLP scheduling logic so that when scheduling a TLP probe, we ensure that the estimated time at which an RTO would fire accounts for the fact that ACKs indicating forward progress should push back RTO times. After the following fix: df92c8394e6e ("tcp: fix xmit timer to only be reset if data ACKed/SACKed") we had an unintentional behavior change in the following kind of scenario: suppose the RTT variance has been very low recently. Then suppose we send out a flight of N packets and our RTT is 100ms: t=0: send a flight of N packets t=100ms: receive an ACK for N-1 packets The response before df92c8394e6e that was: -> schedule a TLP for now + RTO_interval The response after df92c8394e6e is: -> schedule a TLP for t=0 + RTO_interval Since RTO_interval = srtt + RTT_variance, this means that we have scheduled a TLP timer at a point in the future that only accounts for RTT_variance. If the RTT_variance term is small, this means that the timer fires soon. Before df92c8394e6e this would not happen, because in that code, when we receive an ACK for a prefix of flight, we did: 1) Near the top of tcp_ack(), switch from TLP timer to RTO at write_queue_head->paket_tx_time + RTO_interval: if (icsk->icsk_pending == ICSK_TIME_LOSS_PROBE) tcp_rearm_rto(sk); 2) In tcp_clean_rtx_queue(), update the RTO to now + RTO_interval: if (flag & FLAG_ACKED) { tcp_rearm_rto(sk); 3) In tcp_ack() after tcp_fastretrans_alert() switch from RTO to TLP at now + RTO_interval: if (icsk->icsk_pending == ICSK_TIME_RETRANS) tcp_schedule_loss_probe(sk); In df92c8394e6e we removed that 3-phase dance, and instead directly set the TLP timer once: we set the TLP timer in cases like this to write_queue_head->packet_tx_time + RTO_interval. So if the RTT variance is small, then this means that this is setting the TLP timer to fire quite soon. This means if the ACK for the tail of the flight takes longer than an RTT to arrive (often due to delayed ACKs), then the TLP timer fires too quickly. Fixes: df92c8394e6e ("tcp: fix xmit timer to only be reset if data ACKed/SACKed") Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/net/tcp.h | 2 +- net/ipv4/tcp_input.c | 2 +- net/ipv4/tcp_output.c | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) commit 61c59355e0154a938b28710dfa6c1d8be2ddcefa Author: Gustavo A. R. Silva Date: Fri Nov 17 14:02:09 2017 -0600 usbnet: ipheth: fix potential null pointer dereference in ipheth_carrier_set _dev_ is being dereferenced before it is null checked, hence there is a potential null pointer dereference. Fix this by moving the pointer dereference after _dev_ has been null checked. Addresses-Coverity-ID: 1462020 Fixes: bb1b40c7cb86 ("usbnet: ipheth: prevent TX queue timeouts when device not ready") Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/usb/ipheth.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 981542c526ecd846920bc500e9989da906ee9fb9 Author: Alexey Kodanev Date: Fri Nov 17 19:16:17 2017 +0300 gre6: use log_ecn_error module parameter in ip6_tnl_rcv() After commit 308edfdf1563 ("gre6: Cleanup GREv6 receive path, call common GRE functions") it's not used anywhere in the module, but previously was used in ip6gre_rcv(). Fixes: 308edfdf1563 ("gre6: Cleanup GREv6 receive path, call common GRE functions") Signed-off-by: Alexey Kodanev Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4201a9918c49bece71d25b2ef30cbadb1fc528e8 Author: Dave Jiang Date: Fri Nov 10 16:45:27 2017 -0700 ntb: intel: remove b2b memory window workaround for Skylake NTB The workaround code is never used because Skylake NTB does not need it. Reported-by: Allen Hubbe Signed-off-by: Dave Jiang Signed-off-by: Jon Mason drivers/ntb/hw/intel/ntb_hw_intel.c | 75 +------------------------------------ 1 file changed, 2 insertions(+), 73 deletions(-) commit 3a814a04e62f45e7d1887025316fc7faa0ce840a Author: Bhumika Goyal Date: Fri Aug 11 23:17:43 2017 +0530 NTB: make idt_89hpes_cfg const Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Jon Mason drivers/ntb/hw/idt/ntb_hw_idt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d0450244a4920187eebf844a1610744059b59ee6 Author: Logan Gunthorpe Date: Thu Aug 3 12:19:54 2017 -0600 NTB: switchtec_ntb: Update switchtec documentation with notes for NTB The switchtec_ntb driver has a couple requirements on the switchec's hardware configuration so we add these notes to the documentation. Signed-off-by: Logan Gunthorpe Reviewed-by: Stephen Bates Reviewed-by: Kurt Schwemmer Acked-by: Allen Hubbe Signed-off-by: Jon Mason Documentation/switchtec.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 87d11e645e31d66be751211946e8d1e3eb624066 Author: Logan Gunthorpe Date: Thu Aug 3 12:19:53 2017 -0600 NTB: switchtec_ntb: Add memory window support The Switchtec hardware has two types of memory windows: LUTs and Direct. The first area in each BAR is for LUT windows and the remaining area is for the direct region. The total number of LUT entries is set by a configuration setting in hardware and they all must be the same size. (This is fixed by switchtec_ntb to be 64K.) switchtec_ntb enables the LUTs only for the first BAR and enables the highest power of two possible. Seeing the LUTs are at the beginning of the BAR, the direct memory window's alignment is affected. Therefore, the maximum direct memory window size can not be greater than the number of LUTs times 64K. The direct window in other BARs will not have this restriction as the LUTs will not be enabled there. LUTs will only be exposed through the NTB API if the use_lut_mw parameter is set. Seeing the Switchtec hardware, by default, configures BARs to be 4G a module parameter is given to limit the size of the advertised memory windows. Higher layers tend to allocate the maximum BAR size and this has a tendency to fail when they try to allocate 4GB of contiguous memory. Signed-off-by: Logan Gunthorpe Reviewed-by: Stephen Bates Reviewed-by: Kurt Schwemmer Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 213 ++++++++++++++++++++++++++++++++- 1 file changed, 210 insertions(+), 3 deletions(-) commit b9a4acac282eff60cba800bdbc5a3b57c33c10be Author: Logan Gunthorpe Date: Thu Aug 3 12:19:52 2017 -0600 NTB: switchtec_ntb: Implement scratchpad registers Seeing there is no dedicated hardware for this, we simply add these as entries in the shared memory window. Thus, we could support any number of them but 128 seems like enough, for now. Signed-off-by: Logan Gunthorpe Reviewed-by: Stephen Bates Reviewed-by: Kurt Schwemmer Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 75 +++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 2 deletions(-) commit 6619bf954984e625f5ba46e810ed08054309efab Author: Logan Gunthorpe Date: Thu Aug 3 12:19:51 2017 -0600 NTB: switchtec_ntb: Implement doorbell registers Pretty straightforward implementation of doorbell registers. The shift and mask were setup in an earlier patch and this just hooks up the appropriate portion of the IDB register as the local doorbells and the opposite portion of ODB as the peer doorbells. The DB mask is protected by a spinlock to avoid concurrent read-modify-write accesses. Signed-off-by: Logan Gunthorpe Reviewed-by: Stephen Bates Reviewed-by: Kurt Schwemmer Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 89 ++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 4 deletions(-) commit 0ee28f26f378b31e87d35ae7a33e9b50b3283c84 Author: Logan Gunthorpe Date: Thu Aug 3 12:19:50 2017 -0600 NTB: switchtec_ntb: Add link management switchtec_ntb checks for a link by looking at the shared memory window. If the magic number is correct and the other side indicates their link is enabled then we take the link to be up. Whenever we change our local link status we send a msg to the other side to check whether it's up and change their status. The current status is maintained in a flag so ntb_is_link_up can return quickly. We utilize Switchtec's link status notifier to also check link changes when the switch notices a port changes state. Signed-off-by: Logan Gunthorpe Reviewed-by: Stephen Bates Reviewed-by: Kurt Schwemmer Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 130 ++++++++++++++++++++++++++++++++- 1 file changed, 129 insertions(+), 1 deletion(-) commit e099b45b7c27b4fc6510918ea8c7d18980787283 Author: Logan Gunthorpe Date: Thu Aug 3 12:19:49 2017 -0600 NTB: switchtec_ntb: Add skeleton NTB driver Add a skeleton NTB driver which will be filled out in subsequent patches. Signed-off-by: Logan Gunthorpe Reviewed-by: Stephen Bates Reviewed-by: Kurt Schwemmer Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 148 ++++++++++++++++++++++++++++++++- include/linux/ntb.h | 3 + 2 files changed, 150 insertions(+), 1 deletion(-) commit 3dd4db475cfe172bb01bab89aa63bf7939b2a584 Author: Logan Gunthorpe Date: Thu Aug 3 12:19:48 2017 -0600 NTB: switchtec_ntb: Initialize hardware for doorbells and messages Set up some hardware registers and creates interrupt service routines for the doorbells and messages. There are 64 doorbells in the switch that are shared between all partitions. The upper 4 doorbells are also shared with the messages and are therefore not used. Thus, this provides 28 doorbells for each partition. Signed-off-by: Logan Gunthorpe Reviewed-by: Stephen Bates Reviewed-by: Kurt Schwemmer Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 142 +++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) commit ec0467ccbdeb69a86c8729073057bda7bce00eec Author: Logan Gunthorpe Date: Thu Aug 3 12:19:47 2017 -0600 NTB: switchtec_ntb: Initialize hardware for memory windows Add the code to initialize the memory windows in the hardware. This includes setting up the requester ID table, and figuring out which BAR corresponds to which memory window. (Seeing the switch can be configured with any number of BARs.) Also, seeing the device doesn't have hardware for scratchpads or determining the link status, we create a shared memory window that has these features. A magic number with a version component will be used to determine if the other side's driver is actually up. The shared memory window also informs the other side of the size and count of the local memory windows. Signed-off-by: Logan Gunthorpe Reviewed-by: Stephen Bates Reviewed-by: Kurt Schwemmer Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 360 +++++++++++++++++++++++++++++++++ 1 file changed, 360 insertions(+) commit 33dea5aae0320345af26ae9aba0894a930e0d4ec Author: Logan Gunthorpe Date: Thu Aug 3 12:19:46 2017 -0600 NTB: switchtec_ntb: Introduce initial NTB driver Seeing the Switchtec NTB hardware shares the same endpoint as the management endpoint we utilize the class_interface API to register an NTB driver for every Switchtec device in the system that has the NTB class code. Signed-off-by: Logan Gunthorpe Reviewed-by: Stephen Bates Reviewed-by: Kurt Schwemmer Acked-by: Allen Hubbe Acked-by: Bjorn Helgaas Signed-off-by: Jon Mason MAINTAINERS | 1 + drivers/ntb/hw/Kconfig | 1 + drivers/ntb/hw/Makefile | 1 + drivers/ntb/hw/mscc/Kconfig | 9 ++++ drivers/ntb/hw/mscc/Makefile | 1 + drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 81 ++++++++++++++++++++++++++++++++++ drivers/pci/switch/switchtec.c | 3 ++ include/linux/switchtec.h | 4 ++ 8 files changed, 101 insertions(+) commit fa5ab66e36de56f7e40dad57780d53e059dced86 Author: Logan Gunthorpe Date: Thu Aug 3 12:19:45 2017 -0600 NTB: Add check and comment for link up to mw_count() and mw_get_align() Adds a comment and a check to ntb_mw_get_align() so that it always fails if the function is called before the link is up. Also adds a comment to ntb_mw_count() to note that it may return 0 if it is called before the link is up. This is to prevent accidental mis-use in clients that are testing on hardware that this doesn't matter for. Signed-off-by: Logan Gunthorpe Acked-by: Allen Hubbe Signed-off-by: Jon Mason include/linux/ntb.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 980c41c86b37b6086ad758566b437cb1a469b4bc Author: Logan Gunthorpe Date: Thu Aug 3 12:19:44 2017 -0600 NTB: Ensure ntb_mw_get_align() is only called when the link is up With Switchtec hardware it's impossible to get the alignment parameters for a peer's memory window until the peer's driver has configured its windows. Strictly speaking, the link doesn't have to be up for this, but the link being up is the only way the client can tell that the other side has been configured. This patch converts ntb_transport and ntb_perf to use this function after the link goes up. This simplifies these clients slightly because they no longer have to store the alignment parameters. It also tweaks ntb_tool so that peer_mw_trans will print zero if it is run before the link goes up. Signed-off-by: Logan Gunthorpe Acked-by: Allen Hubbe Signed-off-by: Jon Mason drivers/ntb/ntb_transport.c | 20 ++++++++++---------- drivers/ntb/test/ntb_perf.c | 18 +++++++++--------- drivers/ntb/test/ntb_tool.c | 6 +++--- 3 files changed, 22 insertions(+), 22 deletions(-) commit 48c302dc8f3acc1b0ef56a28569bc6a35b9b0e60 Author: Logan Gunthorpe Date: Thu Aug 3 12:19:43 2017 -0600 NTB: switchtec: Add link event notifier callback In order for the Switchtec NTB code to handle link change events we create a notifier callback in the switchtec code which gets called whenever an appropriate event interrupt occurs. In order to preserve userspace's ability to follow these events, we compare the event count with a stored copy from last time we checked. Signed-off-by: Logan Gunthorpe Reviewed-by: Stephen Bates Reviewed-by: Kurt Schwemmer Acked-by: Bjorn Helgaas Signed-off-by: Jon Mason drivers/pci/switch/switchtec.c | 51 ++++++++++++++++++++++++++++++++++++++++++ include/linux/switchtec.h | 4 ++++ 2 files changed, 55 insertions(+) commit c082b04c9d40f69dacd93a151db114299f5de6eb Author: Logan Gunthorpe Date: Thu Aug 3 12:19:42 2017 -0600 NTB: switchtec: Add NTB hardware register definitions There are two additional regions: ctrl and dbmsg. The first is for generic NTB control and memory windows. The second is for doorbells and message registers. This patch also adds a number of related constants for using these registers. Signed-off-by: Logan Gunthorpe Reviewed-by: Stephen Bates Reviewed-by: Kurt Schwemmer Signed-off-by: Jon Mason include/linux/switchtec.h | 84 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) commit 302e994d3af7e4be8d0f789aa66422166ccd89c2 Author: Logan Gunthorpe Date: Thu Aug 3 12:19:41 2017 -0600 NTB: switchtec: Export class symbol for use in upper layer driver We export the class pointer symbol and add an extern define in the Switchtec header file. Signed-off-by: Logan Gunthorpe Reviewed-by: Stephen Bates Reviewed-by: Kurt Schwemmer Acked-by: Bjorn Helgaas Signed-off-by: Jon Mason drivers/pci/switch/switchtec.c | 4 +++- include/linux/switchtec.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 5a1c269f15dc9f964f829d864ae8abebcaa3d3be Author: Logan Gunthorpe Date: Thu Aug 3 12:19:40 2017 -0600 NTB: switchtec: Move structure definitions into a common header Create the switchtec.h header in include/linux with hardware defines and the switchtec_dev structure. Both moved directly from switchtec.c. This is a prep patch for creating an NTB driver for Switchtec. Signed-off-by: Logan Gunthorpe Reviewed-by: Stephen Bates Reviewed-by: Kurt Schwemmer Acked-by: Greg Kroah-Hartman Acked-by: Bjorn Helgaas Signed-off-by: Jon Mason MAINTAINERS | 1 + drivers/pci/switch/switchtec.c | 260 +------------------------------------- include/linux/switchtec.h | 279 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 281 insertions(+), 259 deletions(-) commit c0ef166cb2882538f85116d9811fb5a4b07e68d9 Author: Dave Jiang Date: Fri Jul 28 15:16:04 2017 -0700 ntb: update maintainer list for Intel NTB driver Removing Jon since he no longer works at Intel. Signed-off-by: Dave Jiang Signed-off-by: Jon Mason MAINTAINERS | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0192f17529fa3f8d78ca0181a2b2aaa7cbb0784d Author: Linus Torvalds Date: Sat Nov 18 12:09:51 2017 -0800 clean up x86 platform driver default values The updates this merge window added several bogus default enablement for new features. We don't do that. If people want new behavior, they ask for it. One 'default n' was also removed as pointless. That's great, but there were eight other ones in the same file that were left alone. Fix it up. Signed-off-by: Linus Torvalds drivers/platform/x86/Kconfig | 11 ----------- 1 file changed, 11 deletions(-) commit 4dd3c2e5a4225e3df85afc6033e62ce8b09f0ed2 Merge: 07c455e 22700f3c Author: Linus Torvalds Date: Sat Nov 18 11:22:04 2017 -0800 Merge tag 'nfsd-4.15' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "Lots of good bugfixes, including: - fix a number of races in the NFSv4+ state code - fix some shutdown crashes in multiple-network-namespace cases - relax our 4.1 session limits; if you've an artificially low limit to the number of 4.1 clients that can mount simultaneously, try upgrading" * tag 'nfsd-4.15' of git://linux-nfs.org/~bfields/linux: (22 commits) SUNRPC: Improve ordering of transport processing nfsd: deal with revoked delegations appropriately svcrdma: Enqueue after setting XPT_CLOSE in completion handlers nfsd: use nfs->ns.inum as net ID rpc: remove some BUG()s svcrdma: Preserve CB send buffer across retransmits nfds: avoid gettimeofday for nfssvc_boot time fs, nfsd: convert nfs4_file.fi_ref from atomic_t to refcount_t fs, nfsd: convert nfs4_cntl_odstate.co_odcount from atomic_t to refcount_t fs, nfsd: convert nfs4_stid.sc_count from atomic_t to refcount_t lockd: double unregister of inetaddr notifiers nfsd4: catch some false session retries nfsd4: fix cached replies to solo SEQUENCE compounds sunrcp: make function _svc_create_xprt static SUNRPC: Fix tracepoint storage issues with svc_recv and svc_rqst_status nfsd: use ARRAY_SIZE nfsd: give out fewer session slots as limit approaches nfsd: increase DRC cache limit nfsd: remove unnecessary nofilehandle checks nfs_common: convert int to bool ... commit 07c455ee222f3ad219c2835d05a175a326a138fb Merge: 1deab8c aaa4096 Author: Linus Torvalds Date: Sat Nov 18 10:26:57 2017 -0800 Merge tag 'platform-drivers-x86-v4.15-1' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Andy Shevchenko: "Here is the collected material against Platform Drivers x86 subsystem. It's rather bit busy cycle for PDx86, mostly due to Dell SMBIOS driver activity For this cycle we have quite an update for the Dell SMBIOS driver including WMI work to provide an interface for SMBIOS tokens via sysfs and WMI support for 2017+ Dell laptop models. SMM dispatcher code is split into a separate driver followed by a new WMI dispatcher. The latter provides a character device interface to user space. The git history also contains a merge of immutable branch from Wolfram Sang in order to apply a dependent fix to the Intel CherryTrail Battery Management driver. Other Intel drivers got a lot of cleanups. The Turbo Boost Max 3.0 support is added for Intel Skylake. Peaq WMI hotkeys driver gets its own maintainer and white list of supported models. Silead DMI is expanded to support few additional platforms. Tablet mode via GMMS ACPI method is added to support some ThinkPad tablets. new driver: - Add driver to force WMI Thunderbolt controller power status asus-wmi: - Add lightbar led support dell-laptop: - Allocate buffer before rfkill use dell-smbios: - fix string overflow - Add filtering support - Introduce dispatcher for SMM calls - Add a sysfs interface for SMBIOS tokens - only run if proper oem string is detected - Prefix class/select with cmd_ - Add pr_fmt definition to driver dell-smbios-smm: - test for WSMT dell-smbios-wmi: - release mutex lock on WMI call failure - introduce userspace interface - Add new WMI dispatcher driver dell-smo8800: - remove redundant assignments to byte_data dell-wmi: - don't check length returned - clean up wmi descriptor check - increase severity of some failures - Do not match on descriptor GUID modalias - Label driver as handling notifications dell-*wmi*: - Relay failed initial probe to dependent drivers dell-wmi-descriptor: - check if memory was allocated - split WMI descriptor into it's own driver fujitsu-laptop: - Fix radio LED detection - Don't oops when FUJ02E3 is not presnt hp_accel: - Add quirk for HP ProBook 440 G4 hp-wmi: - Fix tablet mode detection for convertibles ideapad-laptop: - Add Lenovo Yoga 920-13IKB to no_hw_rfkill dmi list intel_cht_int33fe: - Update fusb302 type string, add properties - make a couple of local functions static - Work around BIOS bug on some devices intel-hid: - Power button suspend on Dell Latitude 7275 intel_ips: - Convert timers to use timer_setup() - Remove FSF address from GPL notice - Remove unneeded fields and label - Keep pointer to struct device - Use PCI_VDEVICE() macro - Switch to new PCI IRQ allocation API - Simplify error handling via devres API intel_pmc_ipc: - Revert Use MFD framework to create dependent devices - Use MFD framework to create dependent devices - Use spin_lock to protect GCR updates - Use devm_* calls in driver probe function intel_punit_ipc: - Fix resource ioremap warning intel_telemetry: - Remove useless default in Kconfig - Add needed inclusion - cleanup redundant headers - Fix typos - Fix load failure info intel_telemetry_debugfs: - Use standard ARRAY_SIZE() macro intel_turbo_max_3: - Add Skylake platform intel-wmi-thunderbolt: - Silence error cases mlx-platform: - make a couple of structures static peaq_wmi: - Fix missing terminating entry for peaq_dmi_table peaq-wmi: - Remove unnecessary checks from peaq_wmi_exit - Add DMI check before binding to the WMI interface - Revert Blacklist Lenovo ideapad 700-15ISK - Blacklist Lenovo ideapad 700-15ISK silead_dmi: - Add silead, home-button property to some tablets - Add entry for the Digma e200 tablet - Fix GP-electronic T701 entry - Add entry for the Chuwi Hi8 Pro tablet sony-laptop: - Drop variable assignment in sony_nc_setup_rfkill() - Fix error handling in sony_nc_setup_rfkill() thinkpad_acpi: - Implement tablet mode using GMMS method tools/wmi: - add a sample for dell smbios communication over WMI wmi: - release mutex on module acquistion failure - create userspace interface for drivers - Don't allow drivers to get each other's GUIDs - Add new method wmidev_evaluate_method - Destroy on cleanup rather than unregister - Cleanup exit routine in reverse order of init - Sort include list" * tag 'platform-drivers-x86-v4.15-1' of git://git.infradead.org/linux-platform-drivers-x86: (74 commits) platform/x86: silead_dmi: Add silead, home-button property to some tablets platform/x86: dell-laptop: Allocate buffer before rfkill use platform/x86: dell-*wmi*: Relay failed initial probe to dependent drivers platform/x86: dell-wmi-descriptor: check if memory was allocated platform/x86: Revert intel_pmc_ipc: Use MFD framework to create dependent devices platform/x86: dell-smbios-wmi: release mutex lock on WMI call failure platform/x86: wmi: release mutex on module acquistion failure platform/x86: dell-smbios: fix string overflow platform/x86: intel_pmc_ipc: Use MFD framework to create dependent devices platform/x86: intel_punit_ipc: Fix resource ioremap warning platform/x86: dell-smo8800: remove redundant assignments to byte_data platform/x86: hp-wmi: Fix tablet mode detection for convertibles platform/x86: intel_ips: Convert timers to use timer_setup() platform/x86: sony-laptop: Drop variable assignment in sony_nc_setup_rfkill() platform/x86: sony-laptop: Fix error handling in sony_nc_setup_rfkill() tools/wmi: add a sample for dell smbios communication over WMI platform/x86: dell-smbios-wmi: introduce userspace interface platform/x86: wmi: create userspace interface for drivers platform/x86: dell-smbios: Add filtering support platform/x86: dell-smbios-smm: test for WSMT ... commit aaa40965d2342137d756121993c395e2a7463a8d Author: Hans de Goede Date: Thu Oct 19 09:17:28 2017 +0200 platform/x86: silead_dmi: Add silead, home-button property to some tablets Add "silead,home-button" property to entries for tablets which have a capacitive home button (typically a windows logo on the front). This new property is checked for by the new capacitive home button support in the silead touchscreen driver. Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko drivers/platform/x86/silead_dmi.c | 4 ++++ 1 file changed, 4 insertions(+) commit 43d2d3b56d836945dde5ba5a2bfc98e5f700e768 Merge: e75080f dbdc468 Author: Rafael J. Wysocki Date: Sat Nov 18 15:05:31 2017 +0100 Merge tag 'linux-cpupower-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Pull cpupower utility fixes for 4.15-rc2 from Shuah Khan: "This update consists of fixes to tool's handling of offline cpus. The first patch fixes the tool to find information on the cpu it is running on, instead of always looking for cpu0 and failing if cpu0 happens to be offline. The second patch fixes the incorrect check for offline cpu status." * tag 'linux-cpupower-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower : Fix cpupower working when cpu0 is offline cpupowerutils: bench - Fix cpu online check commit 1deab8ce2c91e3b16563b7a7ea150f82334262ec Merge: 8170024 70f3c8b Author: Linus Torvalds Date: Fri Nov 17 20:21:44 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc updates from David Miller: 1) Add missing cmpxchg64() for 32-bit sparc. 2) Timer conversions from Allen Pais and Kees Cook. 3) vDSO support, from Nagarathnam Muthusamy. 4) Fix sparc64 huge page table walks based upon bug report by Al Viro, from Nitin Gupta. 5) Optimized fls() for T4 and above, from Vijay Kumar. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Fix page table walk for PUD hugepages sparc64: Convert timers to user timer_setup() sparc64: convert mdesc_handle.refcnt from atomic_t to refcount_t sparc/led: Convert timers to use timer_setup() sparc64: Use sparc optimized fls and __fls for T4 and above sparc64: SPARC optimized __fls function sparc64: SPARC optimized fls function sparc64: Define SPARC default __fls function sparc64: Define SPARC default fls function vDSO for sparc sparc32: Add cmpxchg64(). sbus: char: Move D7S_MINOR to include/linux/miscdevice.h sparc: time: Remove unneeded linux/miscdevice.h include sparc64: mmu_context: Add missing include files commit 817002475046737877915d87889a012d851650fa Merge: 27eabfa 461ee7f Author: Linus Torvalds Date: Fri Nov 17 20:18:37 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Revert regression inducing change to the IPSEC template resolver, from Steffen Klassert. 2) Peeloffs can cause the wrong sk to be waken up in SCTP, fix from Xin Long. 3) Min packet MTU size is wrong in cpsw driver, from Grygorii Strashko. 4) Fix build failure in netfilter ctnetlink, from Arnd Bergmann. 5) ISDN hisax driver checks pnp_irq() for errors incorrectly, from Arvind Yadav. 6) Fix fealnx driver build failure on MIPS, from Huacai Chen. 7) Fix into leak in SCTP, the scope_id of socket addresses is not always filled in. From Eric W. Biederman. 8) MTU inheritance between physical function and representor fix in nfp driver, from Dirk van der Merwe. 9) Fix memory leak in rsi driver, from Colin Ian King. 10) Fix expiration and generation ID handling of cached ipv4 redirect routes, from Xin Long. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (40 commits) net: usb: hso.c: remove unneeded DRIVER_LICENSE #define ibmvnic: fix dma_mapping_error call ipvlan: NULL pointer dereference panic in ipvlan_port_destroy route: also update fnhe_genid when updating a route cache route: update fnhe_expires for redirect when the fnhe exists sctp: set frag_point in sctp_setsockopt_maxseg correctly rsi: fix memory leak on buf and usb_reg_buf net/netlabel: Add list_next_rcu() in rcu_dereference(). nfp: remove false positive offloads in flower vxlan nfp: register flower reprs for egress dev offload nfp: inherit the max_mtu from the PF netdev nfp: fix vlan receive MAC statistics typo nfp: fix flower offload metadata flag usage virto_net: remove empty file 'virtio_net.' net/sctp: Always set scope_id in sctp_inet6_skb_msgname fealnx: Fix building error on MIPS isdn: hisax: Fix pnp_irq's error checking for setup_teles3 isdn: hisax: Fix pnp_irq's error checking for setup_sedlbauer_isapnp isdn: hisax: Fix pnp_irq's error checking for setup_niccy isdn: hisax: Fix pnp_irq's error checking for setup_ix1micro ... commit 27eabfaaf4a3049a1592d69ad9969577bcb62791 Merge: 4f88bd2 d048236 Author: Linus Torvalds Date: Fri Nov 17 20:16:20 2017 -0800 Merge tag 'hwlock-v4.15' of git://github.com/andersson/remoteproc Pull hwspinlock update from Bjorn Andersson: "This changes the HWSPINLOCK core Kconfig option to bool, to aid when other core code depends on it" * tag 'hwlock-v4.15' of git://github.com/andersson/remoteproc: hwspinlock: Change hwspinlock to a bool commit 4f88bd23baab4335e96d38828ef38124ec717eb9 Merge: bedf571 1a5d5c5 Author: Linus Torvalds Date: Fri Nov 17 20:14:10 2017 -0800 Merge tag 'rproc-v4.15' of git://github.com/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "This adds an interface for configuring Qualcomm's "secure SMMU" and adds support for booting the modem Hexagon on MSM8996. Two new debugfs entries are added in the remoteproc core to introspect the list of memory carveouts and the loaded resource table" * tag 'rproc-v4.15' of git://github.com/andersson/remoteproc: remoteproc: qcom: Fix error handling paths in order to avoid memory leaks remoteproc: qcom: Drop pr_err in q6v5_xfer_mem_ownership() remoteproc: debug: add carveouts list dump feature remoteproc: debug: add resource table dump feature remoteproc: qcom: Add support for mss remoteproc on msm8996 remoteproc: qcom: Make secure world call for mem ownership switch remoteproc: qcom: refactor mss fw image loading sequence firmware: scm: Add new SCM call API for switching memory ownership commit bedf571986990046ddc4578e6378de146cf75b9e Merge: d9ef1cc 38a9acb Author: Linus Torvalds Date: Fri Nov 17 20:12:08 2017 -0800 Merge tag 'rpmsg-v4.15' of git://github.com/andersson/remoteproc Pull rpmsg updates from Bjorn Andersson: - turn RPMSG_VIRTIO into a user selectable config - fix few bugs in GLINK - provide the support for specifying initial buffer sizes for GLINK channels. * tag 'rpmsg-v4.15' of git://github.com/andersson/remoteproc: rpmsg: glink: The mbox client knows_txdone rpmsg: glink: Add missing MODULE_LICENSE rpmsg: glink: Use best fit intent during tx rpmsg: glink: Add support to preallocate intents dt-bindings: soc: qcom: Support GLINK intents rpmsg: glink: Initialize the "intent_req_comp" completion variable rpmsg: Allow RPMSG_VIRTIO to be enabled via menuconfig or defconfig commit d9ef1ccf7cf1210d5ca49c652045bc03c97c8b59 Merge: fc35c19 7adce42 Author: Linus Torvalds Date: Fri Nov 17 20:10:05 2017 -0800 Merge tag 'hwmon-for-linus-v4.15-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull more hwmon updates/fixes from Guenter Roeck: - minor bug fix in k10temp driver - take advantage of added NULL check in i2c_unregister_device() * tag 'hwmon-for-linus-v4.15-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (w83793) Remove duplicate NULL check hwmon: (w83792d) Remove duplicate NULL check hwmon: (w83791d) Remove duplicate NULL check hwmon: (w83781d) Remove duplicate NULL check hwmon: (k10temp) Correct model name for Ryzen 1600X commit fc35c1966e1372a21a88f6655279361e2f92713f Merge: 2ce079f 3633164 Author: Linus Torvalds Date: Fri Nov 17 20:04:24 2017 -0800 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "We have two changes to the core framework this time around. The first being a large change that introduces runtime PM support to the clk framework. Now we properly call runtime PM operations on the device providing a clk when the clk is in use. This helps on SoCs where the clks provided by a device need something to be powered on before using the clks, like power domains or regulators. It also helps power those things down when clks aren't in use. The other core change is a devm API addition for clk providers so we can get rid of a bunch of clk driver remove functions that are just doing of_clk_del_provider(). Outside of the core, we have the usual addition of clk drivers and smattering of non-critical fixes to existing drivers. The biggest diff is support for Mediatek MT2712 and MT7622 SoCs, but those patches really just add a bunch of data. By the way, we're trying something new here where we build the tree up with topic branches. We plan to work this into our workflow so that we don't step on each other's toes, and so the fixes branch can be merged on an as-needed basis. Summary: Core: - runtime PM support for clk providers - devm API for of_clk_add_hw_provider() New Drivers: - Mediatek MT2712 and MT7622 - Renesas R-Car V3M SoC Updates: - runtime PM support for Samsung exynos5433/exynos4412 providers - removal of clkdev aliases on Samsung SoCs - convert clk-gpio to use gpio descriptors - various driver cleanups to match kernel coding style - Amlogic Video Processing Unit VPU and VAPB clks - sigma-delta modulation for Allwinner audio PLLs - Allwinner A83t Display clks - support for the second display unit clock on Renesas RZ/G1E - suspend/resume support for Renesas R-Car Gen3 CPG/MSSR - new clock ids for Rockchip rk3188 and rk3368 SoCs - various 'const' markings on clk_ops structures - RPM clk support on Qualcomm MSM8996/MSM8660 SoCs" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (137 commits) clk: stm32h7: fix test of clock config clk: pxa: fix building on older compilers clk: sunxi-ng: a83t: Fix i2c buses bits clk: ti: dra7-atl-clock: fix child-node lookups clk: qcom: common: fix legacy board-clock registration clk: uniphier: fix DAPLL2 clock rate of Pro5 clk: uniphier: fix parent of miodmac clock data clk: hi3798cv200: correct parent mux clock for 'clk_sdio0_ciu' clk: hisilicon: Delete an error message for a failed memory allocation in hisi_register_clkgate_sep() clk: hi3660: fix incorrect uart3 clock freqency clk: kona-setup: Delete error messages for failed memory allocations ARC: clk: fix spelling mistake: "configurarion" -> "configuration" clk: cdce925: remove redundant check for non-null parent_name clk: versatile: Improve sizeof() usage clk: versatile: Delete error messages for failed memory allocations clk: ux500: Improve sizeof() usage clk: ux500: Delete error messages for failed memory allocations clk: spear: Delete error messages for failed memory allocations clk: ti: Delete error messages for failed memory allocations clk: mmp: Adjust checks for NULL pointers ... commit bf070bb0e6c62ba3075db0a666763ba52c677102 Author: Masahiro Yamada Date: Wed Nov 8 01:31:47 2017 +0900 kbuild: remove all dummy assignments to obj- Now kbuild core scripts create empty built-in.o where necessary. Remove "obj- := dummy.o" tricks. Signed-off-by: Masahiro Yamada arch/arm/mach-uniphier/Makefile | 1 - arch/mips/boot/dts/brcm/Makefile | 3 --- arch/mips/boot/dts/cavium-octeon/Makefile | 3 --- arch/mips/boot/dts/img/Makefile | 3 --- arch/mips/boot/dts/ingenic/Makefile | 3 --- arch/mips/boot/dts/lantiq/Makefile | 3 --- arch/mips/boot/dts/mti/Makefile | 3 --- arch/mips/boot/dts/netlogic/Makefile | 3 --- arch/mips/boot/dts/ni/Makefile | 3 --- arch/mips/boot/dts/pic32/Makefile | 3 --- arch/mips/boot/dts/qca/Makefile | 3 --- arch/mips/boot/dts/ralink/Makefile | 3 --- arch/mips/boot/dts/xilfpga/Makefile | 3 --- firmware/Makefile | 3 --- samples/bpf/Makefile | 3 --- samples/hidraw/Makefile | 3 --- samples/seccomp/Makefile | 3 --- samples/sockmap/Makefile | 3 --- samples/statx/Makefile | 3 --- samples/uhid/Makefile | 3 --- 20 files changed, 58 deletions(-) commit f7adc3124da019878186f1ebe98a13a1af041afd Author: Masahiro Yamada Date: Wed Nov 8 01:31:46 2017 +0900 kbuild: create built-in.o automatically if parent directory wants it "obj-y += foo/" syntax requires Kbuild to visit the "foo" subdirectory and link built-in.o from that directory. This means foo/Makefile is responsible for creating built-in.o even if there is no object to link (in this case, built-in.o is an empty archive). We have had several fixups like commit 4b024242e8a4 ("kbuild: Fix linking error built-in.o no such file or directory"), then ended up with a complex condition as follows: ifneq ($(strip $(obj-y) $(obj-m) $(obj-) $(subdir-m) $(lib-target)),) builtin-target := $(obj)/built-in.o endif We still have more cases not covered by the above, so we need to add obj- := dummy.o in several places just for creating empty built-in.o. A key point is, the parent Makefile knows whether built-in.o is needed or not. If a subdirectory needs to create built-in.o, its parent can tell the fact when descending. If non-empty $(need-builtin) flag is passed from the parent, built-in.o should be created. $(obj-y) should be still checked to support the single target "%/". All of ugly tricks will go away. Signed-off-by: Masahiro Yamada Reviewed-by: Sam Ravnborg Makefile | 2 +- scripts/Makefile.build | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 16f8259ca77d04f95e5ca90be1b1894ed45816c0 Author: Bjørn Forsman Date: Sun Nov 5 10:44:16 2017 +0100 kbuild: /bin/pwd -> pwd Most places use pwd and rely on $PATH lookup. Moving the remaining absolute path /bin/pwd users over for consistency. Also, a reason for doing /bin/pwd -> pwd instead of the other way around is because I believe build systems should make little assumptions on host filesystem layout. Case in point, we do this kind of patching already in NixOS. Ref. commit 028568d84da3cfca49f5f846eeeef01441d70451 ("kbuild: revert $(realpath ...) to $(shell cd ... && /bin/pwd)"). Signed-off-by: Bjørn Forsman Signed-off-by: Masahiro Yamada Documentation/ia64/xen.txt | 2 +- Makefile | 2 +- tools/power/cpupower/Makefile | 2 +- tools/scripts/Makefile.include | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 2ce079f04d5914dae14fdc8618f804cc0d2a1b8f Merge: 09bd7c7 e9e716f Author: Linus Torvalds Date: Fri Nov 17 17:51:33 2017 -0800 Merge tag 'kbuild-misc-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild misc updates from Masahiro Yamada: - Clean up and fix RPM package build - Fix a warning in DEB package build - Improve coccicheck script - Improve some semantic patches * tag 'kbuild-misc-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: docs: dev-tools: coccinelle: delete out of date wiki reference coccinelle: orplus: reorganize to improve performance coccinelle: use exists to improve efficiency builddeb: Pass the kernel:debarch substvar to dpkg-genchanges Coccinelle: use false positive annotation coccinelle: fix verbose message about .cocci file being run coccinelle: grep Options and Requires fields more precisely Coccinelle: make DEBUG_FILE option more useful coccinelle: api: detect identical chip data arrays coccinelle: Improve setup_timer.cocci matching Coccinelle: setup_timer: improve messages from setup_timer kbuild: rpm-pkg: do not force -jN in submake kbuild: rpm-pkg: keep spec file until make mrproper kbuild: rpm-pkg: fix jobserver unavailable warning kbuild: rpm-pkg: replace $RPM_BUILD_ROOT with %{buildroot} kbuild: rpm-pkg: fix build error when CONFIG_MODULES is disabled kbuild: rpm-pkg: refactor mkspec with here doc kbuild: rpm-pkg: clean up mkspec kbuild: rpm-pkg: install vmlinux.bz2 unconditionally kbuild: rpm-pkg: remove ppc64 specific image handling commit 09bd7c75e55cbaa6c731b0c3a5512ad89159f26f Merge: fa7f578 7f855fc8 Author: Linus Torvalds Date: Fri Nov 17 17:45:29 2017 -0800 Merge tag 'kbuild-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: "One of the most remarkable improvements in this cycle is, Kbuild is now able to cache the result of shell commands. Some variables are expensive to compute, for example, $(call cc-option,...) invokes the compiler. It is not efficient to redo this computation every time, even when we are not actually building anything. Kbuild creates a hidden file ".cache.mk" that contains invoked shell commands and their results. The speed-up should be noticeable. Summary: - Fix arch build issues (hexagon, sh) - Clean up various Makefiles and scripts - Fix wrong usage of {CFLAGS,LDFLAGS}_MODULE in arch Makefiles - Cache variables that are expensive to compute - Improve cc-ldopton and ld-option for Clang - Optimize output directory creation" * tag 'kbuild-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (30 commits) kbuild: move coccicheck help from scripts/Makefile.help to top Makefile sh: decompressor: add shipped files to .gitignore frv: .gitignore: ignore vmlinux.lds selinux: remove unnecessary assignment to subdir- kbuild: specify FORCE in Makefile.headersinst as .PHONY target kbuild: remove redundant mkdir from ./Kbuild kbuild: optimize object directory creation for incremental build kbuild: create object directories simpler and faster kbuild: filter-out PHONY targets from "targets" kbuild: remove redundant $(wildcard ...) for cmd_files calculation kbuild: create directory for make cache only when necessary sh: select KBUILD_DEFCONFIG depending on ARCH kbuild: fix linker feature test macros when cross compiling with Clang kbuild: shrink .cache.mk when it exceeds 1000 lines kbuild: do not call cc-option before KBUILD_CFLAGS initialization kbuild: Cache a few more calls to the compiler kbuild: Add a cache for generated variables kbuild: add forward declaration of default target to Makefile.asm-generic kbuild: remove KBUILD_SUBDIR_ASFLAGS and KBUILD_SUBDIR_CCFLAGS hexagon/kbuild: replace CFLAGS_MODULE with KBUILD_CFLAGS_MODULE ... commit 461ee7f3286dd50be4726606819c4228bc485a17 Author: Greg Kroah-Hartman Date: Fri Nov 17 15:19:39 2017 +0100 net: usb: hso.c: remove unneeded DRIVER_LICENSE #define There is no need to #define the license of the driver, just put it in the MODULE_LICENSE() line directly as a text string. This allows tools that check that the module license matches the source code license to work properly, as there is no need to unwind the unneeded dereference. Cc: "David S. Miller" Cc: Andreas Kemnade Cc: Johan Hovold Reported-by: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Reviewed-by: Philippe Ombredanne Signed-off-by: David S. Miller drivers/net/usb/hso.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f743106ec140589b45ecc6ff92bacf48a0e26b05 Author: Desnes Augusto Nunes do Rosario Date: Fri Nov 17 09:09:04 2017 -0200 ibmvnic: fix dma_mapping_error call This patch fixes the dma_mapping_error call to use the correct dma_addr which is inside the ibmvnic_vpd struct. Moreover, it fixes an uninitialized warning regarding a local dma_addr variable which is not used anymore. Fixes: 4e6759be28e4 ("ibmvnic: Feature implementation of VPD for the ibmvnic driver") Reported-by: Stephen Rothwell Signed-off-by: Desnes A. Nunes do Rosario Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fe18da60500b8b8aa2621fb1de7132cb1f0aebcf Author: Girish Moodalbail Date: Thu Nov 16 23:16:17 2017 -0800 ipvlan: NULL pointer dereference panic in ipvlan_port_destroy When call to register_netdevice() (called from ipvlan_link_new()) fails, we call ipvlan_uninit() (through ndo_uninit()) to destroy the ipvlan port. After returning unsuccessfully from register_netdevice() we go ahead and call ipvlan_port_destroy() again which causes NULL pointer dereference panic. Fix the issue by making ipvlan_init() and ipvlan_uninit() call symmetric. The ipvlan port will now be created inside ipvlan_init() and will be destroyed in ipvlan_uninit(). Fixes: 2ad7bf363841 (ipvlan: Initial check-in of the IPVLAN driver) Signed-off-by: Girish Moodalbail Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_main.c | 104 +++++++++++++++++++++------------------ 1 file changed, 55 insertions(+), 49 deletions(-) commit cebe84c6190d741045a322f5343f717139993c08 Author: Xin Long Date: Fri Nov 17 14:27:18 2017 +0800 route: also update fnhe_genid when updating a route cache Now when ip route flush cache and it turn out all fnhe_genid != genid. If a redirect/pmtu icmp packet comes and the old fnhe is found and all it's members but fnhe_genid will be updated. Then next time when it looks up route and tries to rebind this fnhe to the new dst, the fnhe will be flushed due to fnhe_genid != genid. It causes this redirect/pmtu icmp packet acutally not to be applied. This patch is to also reset fnhe_genid when updating a route cache. Fixes: 5aad1de5ea2c ("ipv4: use separate genid for next hop exceptions") Acked-by: Hannes Frederic Sowa Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv4/route.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit e39d5246111399dbc6e11cd39fd8580191b86c47 Author: Xin Long Date: Fri Nov 17 14:27:06 2017 +0800 route: update fnhe_expires for redirect when the fnhe exists Now when creating fnhe for redirect, it sets fnhe_expires for this new route cache. But when updating the exist one, it doesn't do it. It will cause this fnhe never to be expired. Paolo already noticed it before, in Jianlin's test case, it became even worse: When ip route flush cache, the old fnhe is not to be removed, but only clean it's members. When redirect comes again, this fnhe will be found and updated, but never be expired due to fnhe_expires not being set. So fix it by simply updating fnhe_expires even it's for redirect. Fixes: aee06da6726d ("ipv4: use seqlock for nh_exceptions") Reported-by: Jianlin Shi Acked-by: Hannes Frederic Sowa Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv4/route.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ecca8f88da5c4260cc2bccfefd2a24976704c366 Author: Xin Long Date: Fri Nov 17 14:11:11 2017 +0800 sctp: set frag_point in sctp_setsockopt_maxseg correctly Now in sctp_setsockopt_maxseg user_frag or frag_point can be set with val >= 8 and val <= SCTP_MAX_CHUNK_LEN. But both checks are incorrect. val >= 8 means frag_point can even be less than SCTP_DEFAULT_MINSEGMENT. Then in sctp_datamsg_from_user(), when it's value is greater than cookie echo len and trying to bundle with cookie echo chunk, the first_len will overflow. The worse case is when it's value is equal as cookie echo len, first_len becomes 0, it will go into a dead loop for fragment later on. In Hangbin syzkaller testing env, oom was even triggered due to consecutive memory allocation in that loop. Besides, SCTP_MAX_CHUNK_LEN is the max size of the whole chunk, it should deduct the data header for frag_point or user_frag check. This patch does a proper check with SCTP_DEFAULT_MINSEGMENT subtracting the sctphdr and datahdr, SCTP_MAX_CHUNK_LEN subtracting datahdr when setting frag_point via sockopt. It also improves sctp_setsockopt_maxseg codes. Suggested-by: Marcelo Ricardo Leitner Reported-by: Hangbin Liu Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/sctp.h | 3 ++- net/sctp/socket.c | 29 +++++++++++++++++++---------- 2 files changed, 21 insertions(+), 11 deletions(-) commit d35ef8f846c72d84bfccf239c248c84f79c3a7e8 Author: Colin Ian King Date: Thu Nov 16 17:39:18 2017 +0000 rsi: fix memory leak on buf and usb_reg_buf In the cases where len is too long, the error return path fails to kfree allocated buffers buf and usb_reg_buf. The simplest fix is to perform the sanity check on len before the allocations to avoid having to do the kfree'ing in the first place. Detected by CoverityScan, CID#1452258,1452259 ("Resource Leak") Fixes: 59f73e2ae185 ("rsi: check length before USB read/write register") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/wireless/rsi/rsi_91x_usb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 17e48577752a61197a7e5f4922db45b3a5af5068 Author: Tim Hansen Date: Thu Nov 16 12:03:34 2017 -0500 net/netlabel: Add list_next_rcu() in rcu_dereference(). Add list_next_rcu() for fetching next list in rcu_deference safely. Found with sparse in linux-next tree on tag next-20171116. Signed-off-by: Tim Hansen Signed-off-by: David S. Miller net/netlabel/netlabel_addrlist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fa7f578076a8814caa5371e9f4949e408140766d Merge: 2dcd9c7 d1b069f Author: Linus Torvalds Date: Fri Nov 17 16:56:17 2017 -0800 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: - a bit more MM - procfs updates - dynamic-debug fixes - lib/ updates - checkpatch - epoll - nilfs2 - signals - rapidio - PID management cleanup and optimization - kcov updates - sysvipc updates - quite a few misc things all over the place * emailed patches from Andrew Morton : (94 commits) EXPERT Kconfig menu: fix broken EXPERT menu include/asm-generic/topology.h: remove unused parent_node() macro arch/tile/include/asm/topology.h: remove unused parent_node() macro arch/sparc/include/asm/topology_64.h: remove unused parent_node() macro arch/sh/include/asm/topology.h: remove unused parent_node() macro arch/ia64/include/asm/topology.h: remove unused parent_node() macro drivers/pcmcia/sa1111_badge4.c: avoid unused function warning mm: add infrastructure for get_user_pages_fast() benchmarking sysvipc: make get_maxid O(1) again sysvipc: properly name ipc_addid() limit parameter sysvipc: duplicate lock comments wrt ipc_addid() sysvipc: unteach ids->next_id for !CHECKPOINT_RESTORE initramfs: use time64_t timestamps drivers/watchdog: make use of devm_register_reboot_notifier() kernel/reboot.c: add devm_register_reboot_notifier() kcov: update documentation Makefile: support flag -fsanitizer-coverage=trace-cmp kcov: support comparison operands collection kcov: remove pointless current != NULL check kernel/panic.c: add TAINT_AUX ... commit d1b069f5febc850556cf49e9bb9092d3179c5be5 Author: Randy Dunlap Date: Fri Nov 17 15:31:47 2017 -0800 EXPERT Kconfig menu: fix broken EXPERT menu Clean up the EXPERT menu (yet again). Move FHANDLE and CHECKPOINT_RESTORE into the primary EXPERT menu since they already depend on EXPERT. Move BPF_SYSCALL and USERFAULTFD out of the EXPERT Kconfig symbols menu list since they do not depend on EXPERT and were breaking the continuity of that menu list. Move all of the KALLSYMS Kconfig symbols to the end of the EXPERT menu. This separates the kernel services from the build options. This patch depends on [PATCH] pci: move PCI_QUIRKS to the PCI bus menu (https://lkml.org/lkml/2017/11/2/907). Link: http://lkml.kernel.org/r/72e4465a-a5ff-cb3c-1a90-11aa4861b161@infradead.org Signed-off-by: Randy Dunlap Acked-by: Daniel Borkmann [BPF] Cc: Andrea Arcangeli Cc: Alexei Starovoitov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/Kconfig | 184 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 93 insertions(+), 91 deletions(-) commit 7016383b44e855209aff47e56f11c59b8aa7b642 Author: Dou Liyang Date: Fri Nov 17 15:31:43 2017 -0800 include/asm-generic/topology.h: remove unused parent_node() macro Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removed the last user of parent_node(). The parent_node() macro in generic situation is unnecessary. Remove it for cleanup. Link: http://lkml.kernel.org/r/1504234599-29533-8-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Dou Liyang Reported-by: Michael Ellerman Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/topology.h | 3 --- 1 file changed, 3 deletions(-) commit 52563d05f2500ec9c8d715f3c753b0ef415f9cbb Author: Dou Liyang Date: Fri Nov 17 15:31:40 2017 -0800 arch/tile/include/asm/topology.h: remove unused parent_node() macro Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removed the last user of parent_node(). The parent_node() macro in tile platform is unnecessary. Remove it for cleanup. Link: http://lkml.kernel.org/r/1504234599-29533-7-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Dou Liyang Reported-by: Michael Ellerman Acked-by: Chris Metcalf Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/tile/include/asm/topology.h | 6 ------ 1 file changed, 6 deletions(-) commit 5f4cdac6bce420ba86c3ab5ec30037822d726ce5 Author: Dou Liyang Date: Fri Nov 17 15:31:36 2017 -0800 arch/sparc/include/asm/topology_64.h: remove unused parent_node() macro Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removed the last user of parent_node(). The parent_node() macro in SPARC64 platform is unnecessary. Remove it for cleanup. Link: http://lkml.kernel.org/r/1504234599-29533-6-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Dou Liyang Reported-by: Michael Ellerman Acked-by: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sparc/include/asm/topology_64.h | 2 -- 1 file changed, 2 deletions(-) commit ece15787e72442550f33aaa43dacae033e8628b1 Author: Dou Liyang Date: Fri Nov 17 15:31:33 2017 -0800 arch/sh/include/asm/topology.h: remove unused parent_node() macro Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removed the last user of parent_node(). The parent_node() macro in SUPERH platform is unnecessary. Remove it for cleanup. Link: http://lkml.kernel.org/r/1504234599-29533-5-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Dou Liyang Reported-by: Michael Ellerman Cc: Yoshinori Sato Cc: Rich Felker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/include/asm/topology.h | 1 - 1 file changed, 1 deletion(-) commit 5eb9e8ac9a8f8ae98ae4386357683a0b5684bb48 Author: Dou Liyang Date: Fri Nov 17 15:31:29 2017 -0800 arch/ia64/include/asm/topology.h: remove unused parent_node() macro Commit a7be6e5a7f8d ("mm: drop useless local parameters of __register_one_node()") removed the last user of parent_node(). The parent_node() macro in IA64(Itanium) platform is unnecessary. Remove it for cleanup. Link: http://lkml.kernel.org/r/1504234599-29533-2-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Dou Liyang Reported-by: Michael Ellerman Cc: Tony Luck Cc: Fenghua Yu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/ia64/include/asm/topology.h | 7 ------- 1 file changed, 7 deletions(-) commit d4258247d9057c848cc1c1ad9581400b5124dedd Author: Arnd Bergmann Date: Fri Nov 17 15:31:26 2017 -0800 drivers/pcmcia/sa1111_badge4.c: avoid unused function warning pcmv_setup() is only used when the badge4 driver is built-in, but not when it is a loadable module: drivers/pcmcia/sa1111_badge4.c:153:122: error: 'pcmv_setup' defined but not used [-Werror=unused-function] This adds an #ifdef to avoid the definition of the unused function in the modular case. Link: http://lkml.kernel.org/r/20170911201133.3421636-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/pcmcia/sa1111_badge4.c | 2 ++ 1 file changed, 2 insertions(+) commit 64c349f4ae78723248c474531d0cbc524fc5ba77 Author: Kirill A. Shutemov Date: Fri Nov 17 15:31:22 2017 -0800 mm: add infrastructure for get_user_pages_fast() benchmarking Performance of get_user_pages_fast() is critical for some workloads, but it's tricky to test it directly. This patch provides /sys/kernel/debug/gup_benchmark that helps with testing performance of it. See tools/testing/selftests/vm/gup_benchmark.c for userspace counterpart. Link: http://lkml.kernel.org/r/20170908215603.9189-2-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Shuah Khan Cc: Ingo Molnar Cc: Thorsten Leemhuis Cc: Jonathan Corbet Cc: Huang Ying Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/Kconfig | 9 +++ mm/Makefile | 1 + mm/gup_benchmark.c | 100 +++++++++++++++++++++++++++++ tools/testing/selftests/vm/Makefile | 1 + tools/testing/selftests/vm/gup_benchmark.c | 91 ++++++++++++++++++++++++++ 5 files changed, 202 insertions(+) commit 15df03c87983660a4d1eedb4541778592bd97684 Author: Davidlohr Bueso Date: Fri Nov 17 15:31:18 2017 -0800 sysvipc: make get_maxid O(1) again For a custom microbenchmark on a 3.30GHz Xeon SandyBridge, which calls IPC_STAT over and over, it was calculated that, on avg the cost of ipc_get_maxid() for increasing amounts of keys was: 10 keys: ~900 cycles 100 keys: ~15000 cycles 1000 keys: ~150000 cycles 10000 keys: ~2100000 cycles This is unsurprising as maxid is currently O(n). By having the max_id available in O(1) we save all those cycles for each semctl(_STAT) command, the idr_find can be expensive -- which some real (customer) workloads actually poll on. Note that this used to be the case, until commit 7ca7e564e04 ("ipc: store ipcs into IDRs"). The cost is the extra idr_find when doing RMIDs, but we simply go backwards, and should not take too many iterations to find the new value. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20170831172049.14576-5-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/ipc_namespace.h | 1 + ipc/util.c | 43 +++++++++++++------------------------------ ipc/util.h | 21 ++++++++++++++++++--- 3 files changed, 32 insertions(+), 33 deletions(-) commit ebf66799acfb5f52ada4ff96ecc9579867941ea9 Author: Davidlohr Bueso Date: Fri Nov 17 15:31:15 2017 -0800 sysvipc: properly name ipc_addid() limit parameter This is better understood as a limit, instead of size; exactly like the function comment indicates. Rename it. Link: http://lkml.kernel.org/r/20170831172049.14576-4-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/util.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 39c96a1b96a5991b1c9e79b85a8d74ef93b36026 Author: Davidlohr Bueso Date: Fri Nov 17 15:31:11 2017 -0800 sysvipc: duplicate lock comments wrt ipc_addid() The comment in msgqueues when using ipc_addid() is quite useful imo. Duplicate it for shm and semaphores. Link: http://lkml.kernel.org/r/20170831172049.14576-3-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ipc/sem.c | 1 + ipc/shm.c | 1 + 2 files changed, 2 insertions(+) commit b8fd99838435f9b420c3e848192bd43abc648b7f Author: Davidlohr Bueso Date: Fri Nov 17 15:31:08 2017 -0800 sysvipc: unteach ids->next_id for !CHECKPOINT_RESTORE Patch series "sysvipc: ipc-key management improvements". Here are a few improvements I spotted while eyeballing Guillaume's rhashtable implementation for ipc keys. The first and fourth patches are the interesting ones, the middle two are trivial. This patch (of 4): The next_id object-allocation functionality was introduced in commit 03f595668017 ("ipc: add sysctl to specify desired next object id"). Given that these new entries are _only_ exported under the CONFIG_CHECKPOINT_RESTORE option, there is no point for the common case to even know about ->next_id. As such rewrite ipc_buildid() such that it can do away with the field as well as unnecessary branches when adding a new identifier. The end result also better differentiates both cases, so the code ends up being cleaner; albeit the small duplications regarding the default case. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20170831172049.14576-2-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/ipc_namespace.h | 2 ++ ipc/util.c | 60 ++++++++++++++++++++++++++++++++----------- ipc/util.h | 5 ---- 3 files changed, 47 insertions(+), 20 deletions(-) commit e35c4c64fe492b212f9c7d9e046626e48e89f863 Author: Arnd Bergmann Date: Fri Nov 17 15:31:04 2017 -0800 initramfs: use time64_t timestamps The cpio format uses a 32-bit number to encode file timestamps, which breaks initramfs support in 2038. This reinterprets the timestamp as unsigned, to give us another 68 years and avoids breaking until 2106. Link: http://lkml.kernel.org/r/20171019095536.801199-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Cc: Al Viro Cc: Deepa Dinamani Cc: Arnd Bergmann Cc: Daniel Thompson Cc: Lokesh Vutla Cc: Stafford Horne Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/initramfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 44ea39420fc95e7432ddc91de4eb58c7470ab897 Author: Andrey Smirnov Date: Fri Nov 17 15:31:01 2017 -0800 drivers/watchdog: make use of devm_register_reboot_notifier() Save a bit of cleanup code by leveraging newly added devm_register_reboot_notifier(). [akpm@linux-foundation.org: small cleanup: avoid 80-col tricks] Link: http://lkml.kernel.org/r/20170411160615.9784-1-andrew.smirnov@gmail.com Signed-off-by: Andrey Smirnov Acked-by: Guenter Roeck Cc: Chris Healy Cc: Wim Van Sebroeck Cc: Andy Shevchenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/watchdog/watchdog_core.c | 35 ----------------------------------- drivers/watchdog/watchdog_dev.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 35 deletions(-) commit 2d8364bae4db144df75ba85e92d2b8619ba8eedc Author: Andrey Smirnov Date: Fri Nov 17 15:30:57 2017 -0800 kernel/reboot.c: add devm_register_reboot_notifier() Add devm_* wrapper around register_reboot_notifier to simplify device specific reboot notifier registration/unregistration. [akpm@linux-foundation.org: move `struct device' forward decl to top-of-file] Link: http://lkml.kernel.org/r/20170320171753.1705-1-andrew.smirnov@gmail.com Signed-off-by: Andrey Smirnov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/reboot.h | 4 ++++ kernel/reboot.c | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit c512ac01d8a841033da8ec538a83f80fb0b4d1fe Author: Victor Chibotaru Date: Fri Nov 17 15:30:53 2017 -0800 kcov: update documentation The updated documentation describes new KCOV mode for collecting comparison operands. Link: http://lkml.kernel.org/r/20171011095459.70721-3-glider@google.com Signed-off-by: Victor Chibotaru Signed-off-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Andrey Konovalov Cc: Mark Rutland Cc: Alexander Popov Cc: Andrey Ryabinin Cc: Kees Cook Cc: Vegard Nossum Cc: Quentin Casasnovas Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/dev-tools/kcov.rst | 99 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 95 insertions(+), 4 deletions(-) commit d677a4d6019385488e794cc47bd3d6f9c2aab874 Author: Victor Chibotaru Date: Fri Nov 17 15:30:50 2017 -0800 Makefile: support flag -fsanitizer-coverage=trace-cmp The flag enables Clang instrumentation of comparison operations (currently not supported by GCC). This instrumentation is needed by the new KCOV device to collect comparison operands. Link: http://lkml.kernel.org/r/20171011095459.70721-2-glider@google.com Signed-off-by: Victor Chibotaru Signed-off-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Andrey Konovalov Cc: Mark Rutland Cc: Alexander Popov Cc: Andrey Ryabinin Cc: Kees Cook Cc: Vegard Nossum Cc: Quentin Casasnovas Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Makefile | 3 +-- lib/Kconfig.debug | 10 ++++++++++ scripts/Makefile.kcov | 7 +++++++ 3 files changed, 18 insertions(+), 2 deletions(-) commit ded97d2c2b2c5f1dcced0bc57133f7753b037dfc Author: Victor Chibotaru Date: Fri Nov 17 15:30:46 2017 -0800 kcov: support comparison operands collection Enables kcov to collect comparison operands from instrumented code. This is done by using Clang's -fsanitize=trace-cmp instrumentation (currently not available for GCC). The comparison operands help a lot in fuzz testing. E.g. they are used in Syzkaller to cover the interiors of conditional statements with way less attempts and thus make previously unreachable code reachable. To allow separate collection of coverage and comparison operands two different work modes are implemented. Mode selection is now done via a KCOV_ENABLE ioctl call with corresponding argument value. Link: http://lkml.kernel.org/r/20171011095459.70721-1-glider@google.com Signed-off-by: Victor Chibotaru Signed-off-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Andrey Konovalov Cc: Mark Rutland Cc: Alexander Popov Cc: Andrey Ryabinin Cc: Kees Cook Cc: Vegard Nossum Cc: Quentin Casasnovas Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kcov.h | 12 ++- include/uapi/linux/kcov.h | 24 ++++++ kernel/kcov.c | 214 ++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 211 insertions(+), 39 deletions(-) commit fcf4edac049a8bca41658970292e2dfdbc9d5f62 Author: Andrey Ryabinin Date: Fri Nov 17 15:30:42 2017 -0800 kcov: remove pointless current != NULL check __sanitizer_cov_trace_pc() is a hot code, so it's worth to remove pointless '!current' check. Current is never NULL. Link: http://lkml.kernel.org/r/20170929162221.32500-1-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Acked-by: Dmitry Vyukov Acked-by: Mark Rutland Cc: Andrey Konovalov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/kcov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4efb442cc12eb66535b7c7ed06005fd7889c1d77 Author: Borislav Petkov Date: Fri Nov 17 15:30:38 2017 -0800 kernel/panic.c: add TAINT_AUX This is the gist of a patch which we've been forward-porting in our kernels for a long time now and it probably would make a good sense to have such TAINT_AUX flag upstream which can be used by each distro etc, how they see fit. This way, we won't need to forward-port a distro-only version indefinitely. Add an auxiliary taint flag to be used by distros and others. This obviates the need to forward-port whatever internal solutions people have in favor of a single flag which they can map arbitrarily to a definition of their pleasing. The "X" mnemonic could also mean eXternal, which would be taint from a distro or something else but not the upstream kernel. We will use it to mark modules for which we don't provide support. I.e., a really eXternal module. Link: http://lkml.kernel.org/r/20170911134533.dp5mtyku5bongx4c@pd.tnic Signed-off-by: Borislav Petkov Cc: Kees Cook Cc: Jessica Yu Cc: Peter Zijlstra Cc: Jiri Slaby Cc: Jiri Olsa Cc: Michal Marek Cc: Jiri Kosina Cc: Takashi Iwai Cc: Petr Mladek Cc: Jeff Mahoney Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kernel.h | 3 ++- kernel/panic.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) commit e8cfbc245e24887e3c30235f71e9e9405e0cfc39 Author: Gargi Sharma Date: Fri Nov 17 15:30:34 2017 -0800 pid: remove pidhash pidhash is no longer required as all the information can be looked up from idr tree. nr_hashed represented the number of pids that had been hashed. Since, nr_hashed and PIDNS_HASH_ADDING are no longer relevant, it has been renamed to pid_allocated and PIDNS_ADDING respectively. [gs051095@gmail.com: v6] Link: http://lkml.kernel.org/r/1507760379-21662-3-git-send-email-gs051095@gmail.com Link: http://lkml.kernel.org/r/1507583624-22146-3-git-send-email-gs051095@gmail.com Signed-off-by: Gargi Sharma Reviewed-by: Rik van Riel Tested-by: Tony Luck [ia64] Cc: Julia Lawall Cc: Ingo Molnar Cc: Pavel Tatashin Cc: Kirill Tkhai Cc: Oleg Nesterov Cc: Eric W. Biederman Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/ia64/kernel/asm-offsets.c | 4 ++-- include/linux/init_task.h | 1 - include/linux/pid.h | 2 -- include/linux/pid_namespace.h | 4 ++-- init/main.c | 1 - kernel/fork.c | 2 +- kernel/pid.c | 48 +++++++++--------------------------------- kernel/pid_namespace.c | 6 +++--- 8 files changed, 18 insertions(+), 50 deletions(-) commit 95846ecf9dac5089aed4b144d912225f8ef86ae4 Author: Gargi Sharma Date: Fri Nov 17 15:30:30 2017 -0800 pid: replace pid bitmap implementation with IDR API Patch series "Replacing PID bitmap implementation with IDR API", v4. This series replaces kernel bitmap implementation of PID allocation with IDR API. These patches are written to simplify the kernel by replacing custom code with calls to generic code. The following are the stats for pid and pid_namespace object files before and after the replacement. There is a noteworthy change between the IDR and bitmap implementation. Before text data bss dec hex filename 8447 3894 64 12405 3075 kernel/pid.o After text data bss dec hex filename 3397 304 0 3701 e75 kernel/pid.o Before text data bss dec hex filename 5692 1842 192 7726 1e2e kernel/pid_namespace.o After text data bss dec hex filename 2854 216 16 3086 c0e kernel/pid_namespace.o The following are the stats for ps, pstree and calling readdir on /proc for 10,000 processes. ps: With IDR API With bitmap real 0m1.479s 0m2.319s user 0m0.070s 0m0.060s sys 0m0.289s 0m0.516s pstree: With IDR API With bitmap real 0m1.024s 0m1.794s user 0m0.348s 0m0.612s sys 0m0.184s 0m0.264s proc: With IDR API With bitmap real 0m0.059s 0m0.074s user 0m0.000s 0m0.004s sys 0m0.016s 0m0.016s This patch (of 2): Replace the current bitmap implementation for Process ID allocation. Functions that are no longer required, for example, free_pidmap(), alloc_pidmap(), etc. are removed. The rest of the functions are modified to use the IDR API. The change was made to make the PID allocation less complex by replacing custom code with calls to generic API. [gs051095@gmail.com: v6] Link: http://lkml.kernel.org/r/1507760379-21662-2-git-send-email-gs051095@gmail.com [avagin@openvz.org: restore the old behaviour of the ns_last_pid sysctl] Link: http://lkml.kernel.org/r/20171106183144.16368-1-avagin@openvz.org Link: http://lkml.kernel.org/r/1507583624-22146-2-git-send-email-gs051095@gmail.com Signed-off-by: Gargi Sharma Reviewed-by: Rik van Riel Acked-by: Oleg Nesterov Cc: Julia Lawall Cc: Ingo Molnar Cc: Pavel Tatashin Cc: Kirill Tkhai Cc: Eric W. Biederman Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/platforms/cell/spufs/sched.c | 2 +- fs/proc/loadavg.c | 2 +- include/linux/pid_namespace.h | 14 +-- init/main.c | 2 +- kernel/pid.c | 201 ++++++------------------------ kernel/pid_namespace.c | 53 ++++---- 6 files changed, 65 insertions(+), 209 deletions(-) commit f9eb2fdd04d4e68fbea18970bbf65ace716d25b6 Author: Ola N. Kaldestad Date: Fri Nov 17 15:30:26 2017 -0800 kernel/sysctl.c: code cleanups Remove unnecessary else block, remove redundant return and call to kfree in if block. Link: http://lkml.kernel.org/r/1510238435-1655-1-git-send-email-mail@okal.no Signed-off-by: Ola N. Kaldestad Acked-by: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/sysctl.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 2743232c0c4c82311718bb4ec1fb659ed64ecf7a Author: Kangmin Park Date: Fri Nov 17 15:30:23 2017 -0800 Documentation/sysctl/vm.txt: fix typo Link: http://lkml.kernel.org/r/CAKW4uUyCi=PnKf3epgFVz8z=1tMtHSOHNm+fdNxrNw3-THvRCA@mail.gmail.com Signed-off-by: Kangmin Park Cc: Jiri Kosina Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/sysctl/vm.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c46d90cd7c3c5d3a5eb6265f2b0f06f44576d5a1 Author: Christophe JAILLET Date: Fri Nov 17 15:38:03 2017 -0800 drivers/rapidio/devices/rio_mport_cdev.c: fix error handling in 'rio_dma_transfer()' In case of error, 'dma_map_sg()' returns 0, not a negative value. There is BUG_ON() in 'dma_map_sg_attrs()' which makes sure of that. Link: http://lkml.kernel.org/r/d4235bd2b9274e99f6c86ea71b1fa1c7bd8d0c08.1505687047.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Reviewed-by: Logan Gunthorpe Cc: Matt Porter Cc: Alexandre Bounine Cc: Lorenzo Stoakes Cc: Jesper Nilsson Cc: Christian K_nig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/rio_mport_cdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1402dcb5643b7a27d46a05edd7491d49ba0e248 Author: Christophe JAILLET Date: Fri Nov 17 15:37:57 2017 -0800 drivers/rapidio/devices/rio_mport_cdev.c: fix resource leak in error handling path in 'rio_dma_transfer()' If 'dma_map_sg()', we should branch to the existing error handling path to free some resources before returning. Link: http://lkml.kernel.org/r/61292a4f369229eee03394247385e955027283f8.1505687047.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Reviewed-by: Logan Gunthorpe Cc: Matt Porter Cc: Alexandre Bounine Cc: Lorenzo Stoakes Cc: Jesper Nilsson Cc: Christian K_nig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/devices/rio_mport_cdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c1b1418a66928bbae3d3ff057ae0110d5b122c11 Author: Arvind Yadav Date: Fri Nov 17 15:30:15 2017 -0800 rapidio: constify rio_device_id rio_device_id are not supposed to change at runtime. rio driver is working with const 'id_table'. So mark the non-const rio_device_id structs as const. Link: http://lkml.kernel.org/r/1503734627-6058-2-git-send-email-arvind.yadav.cs@gmail.com Link: http://lkml.kernel.org/r/1503734627-6058-3-git-send-email-arvind.yadav.cs@gmail.com Link: http://lkml.kernel.org/r/1503734627-6058-4-git-send-email-arvind.yadav.cs@gmail.com Link: http://lkml.kernel.org/r/1503734627-6058-5-git-send-email-arvind.yadav.cs@gmail.com Link: http://lkml.kernel.org/r/1503734627-6058-6-git-send-email-arvind.yadav.cs@gmail.com Signed-off-by: Arvind Yadav Acked-by: Alexandre Bounine Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/rapidio/switches/idt_gen2.c | 2 +- drivers/rapidio/switches/idt_gen3.c | 2 +- drivers/rapidio/switches/idtcps.c | 2 +- drivers/rapidio/switches/tsi568.c | 2 +- drivers/rapidio/switches/tsi57x.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit de40ccefd1f19180c0a43e4d9b9d2f4dc8856c8b Author: Dave Young Date: Fri Nov 17 15:30:12 2017 -0800 kdump: print a message in case parse_crashkernel_mem resulted in zero bytes parse_crashkernel_mem() silently returns if we get zero bytes in the parsing function. It is useful for debugging to add a message, especially if the kernel cannot boot correctly. Add a pr_info instead of pr_warn because it is expected behavior for size = 0, eg. crashkernel=2G-4G:128M, size will be 0 in case system memory is less than 2G. Link: http://lkml.kernel.org/r/20171114080129.GA6115@dhcp-128-65.nay.redhat.com Signed-off-by: Dave Young Cc: Baoquan He Cc: Vivek Goyal Cc: Bhupesh Sharma Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/crash_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 426915796ccaf9c2bd9bb06dc5702225957bc2e5 Author: Oleg Nesterov Date: Fri Nov 17 15:30:08 2017 -0800 kernel/signal.c: remove the no longer needed SIGNAL_UNKILLABLE check in complete_signal() complete_signal() checks SIGNAL_UNKILLABLE before it starts to destroy the thread group, today this is wrong in many ways. If nothing else, fatal_signal_pending() should always imply that the whole thread group (except ->group_exit_task if it is not NULL) is killed, this check breaks the rule. After the previous changes we can rely on sig_task_ignored(); sig_fatal(sig) && SIGNAL_UNKILLABLE can only be true if we actually want to kill this task and sig == SIGKILL OR it is traced and debugger can intercept the signal. This should hopefully fix the problem reported by Dmitry. This test-case static int init(void *arg) { for (;;) pause(); } int main(void) { char stack[16 * 1024]; for (;;) { int pid = clone(init, stack + sizeof(stack)/2, CLONE_NEWPID | SIGCHLD, NULL); assert(pid > 0); assert(ptrace(PTRACE_ATTACH, pid, 0, 0) == 0); assert(waitpid(-1, NULL, WSTOPPED) == pid); assert(ptrace(PTRACE_DETACH, pid, 0, SIGSTOP) == 0); assert(syscall(__NR_tkill, pid, SIGKILL) == 0); assert(pid == wait(NULL)); } } triggers the WARN_ON_ONCE(!(task->jobctl & JOBCTL_STOP_PENDING)) in task_participate_group_stop(). do_signal_stop()->signal_group_exit() checks SIGNAL_GROUP_EXIT and return false, but task_set_jobctl_pending() checks fatal_signal_pending() and does not set JOBCTL_STOP_PENDING. And his should fix the minor security problem reported by Kyle, SECCOMP_RET_TRACE can miss fatal_signal_pending() the same way if the task is the root of a pid namespace. Link: http://lkml.kernel.org/r/20171103184246.GD21036@redhat.com Signed-off-by: Oleg Nesterov Reported-by: Dmitry Vyukov Reported-by: Kyle Huey Reviewed-by: Kees Cook Tested-by: Kyle Huey Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ac25385089f673560867eb5179228a44ade0cfc1 Author: Oleg Nesterov Date: Fri Nov 17 15:30:04 2017 -0800 kernel/signal.c: protect the SIGNAL_UNKILLABLE tasks from !sig_kernel_only() signals Change sig_task_ignored() to drop the SIG_DFL && !sig_kernel_only() signals even if force == T. This simplifies the next change and this matches the same check in get_signal() which will drop these signals anyway. Link: http://lkml.kernel.org/r/20171103184227.GC21036@redhat.com Signed-off-by: Oleg Nesterov Tested-by: Kyle Huey Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 628c1bcba204052d19b686b5bac149a644cdb72e Author: Oleg Nesterov Date: Fri Nov 17 15:30:01 2017 -0800 kernel/signal.c: protect the traced SIGNAL_UNKILLABLE tasks from SIGKILL The comment in sig_ignored() says "Tracers may want to know about even ignored signals" but SIGKILL can not be reported to debugger and it is just wrong to return 0 in this case: SIGKILL should only kill the SIGNAL_UNKILLABLE task if it comes from the parent ns. Change sig_ignored() to ignore ->ptrace if sig == SIGKILL and rely on sig_task_ignored(). SISGTOP coming from within the namespace is not really right too but at least debugger can intercept it, and we can't drop it here because this will break "gdb -p 1": ptrace_attach() won't work. Perhaps we will add another ->ptrace check later, we will see. Link: http://lkml.kernel.org/r/20171103184206.GB21036@redhat.com Signed-off-by: Oleg Nesterov Tested-by: Kyle Huey Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/signal.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit eecd7f4f5b9c2021dbde0a361b365f5970db52aa Author: Colin Ian King Date: Fri Nov 17 15:29:57 2017 -0800 fat: remove redundant assignment of 0 to slots The variable slots is being assigned a value of zero that is never read, slots is being updated again a few lines later. Remove this redundant assignment. Cleans clang warning: Value stored to 'slots' is never read Link: http://lkml.kernel.org/r/20171017140258.22536-1-colin.king@canonical.com Signed-off-by: Colin Ian King Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/fat/dir.c | 1 - 1 file changed, 1 deletion(-) commit 15ec37185ec66b8e199188bf8df3e7baf50ef77d Author: Christos Gkekas Date: Fri Nov 17 15:29:54 2017 -0800 hfs/hfsplus: clean up unused variables in bnode.c Delete variables 'tree' and 'sb', which are set but never used. Link: http://lkml.kernel.org/r/1507977146-15875-1-git-send-email-chris.gekas@gmail.com Signed-off-by: Christos Gkekas Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hfs/bnode.c | 4 ---- fs/hfsplus/bnode.c | 4 ---- 2 files changed, 8 deletions(-) commit 577753cc57b19949b7ce0fc848c669d37e448c20 Author: Jeff Layton Date: Fri Nov 17 15:29:50 2017 -0800 nilfs2: remove inode->i_version initialization It's never used in nilfs2. Link: http://lkml.kernel.org/r/1510064486-1728-2-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Jeff Layton Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/nilfs2/super.c | 1 - 1 file changed, 1 deletion(-) commit 3147db8938c7968b7be07f9b87510e334fe42ce1 Author: Ryusuke Konishi Date: Fri Nov 17 15:29:46 2017 -0800 nilfs2: use octal for unreadable permission macro Replace S_IRWXUGO with 0777 because symbolic permissions are considered harmful: https://lwn.net/Articles/696229/ Link: http://lkml.kernel.org/r/1509367935-3086-5-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/nilfs2/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d685f930a53632ff6b86efe43b95637006371fe Author: Ryusuke Konishi Date: Fri Nov 17 15:29:43 2017 -0800 nilfs2: align block comments of nilfs_sufile_truncate_range() at * Fix the following checkpatch warning: WARNING: Block comments should align the * on each line #633: FILE: sufile.c:633: +/** + * nilfs_sufile_truncate_range - truncate range of segment array Link: http://lkml.kernel.org/r/1509367935-3086-4-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/nilfs2/sufile.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit d4f0284a5969fd7809ec8df710eb10598b701638 Author: Elena Reshetova Date: Fri Nov 17 15:29:39 2017 -0800 fs, nilfs: convert nilfs_root.count from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable nilfs_root.count is used as pure reference counter. Convert it to refcount_t and fix up the operations. Link: http://lkml.kernel.org/r/1509367935-3086-3-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Elena Reshetova Signed-off-by: Ryusuke Konishi Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/nilfs2/the_nilfs.c | 8 ++++---- fs/nilfs2/the_nilfs.h | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) commit 31ccb1f7ba3cfe29631587d451cf5bb8ab593550 Author: Andreas Rohner Date: Fri Nov 17 15:29:35 2017 -0800 nilfs2: fix race condition that causes file system corruption There is a race condition between nilfs_dirty_inode() and nilfs_set_file_dirty(). When a file is opened, nilfs_dirty_inode() is called to update the access timestamp in the inode. It calls __nilfs_mark_inode_dirty() in a separate transaction. __nilfs_mark_inode_dirty() caches the ifile buffer_head in the i_bh field of the inode info structure and marks it as dirty. After some data was written to the file in another transaction, the function nilfs_set_file_dirty() is called, which adds the inode to the ns_dirty_files list. Then the segment construction calls nilfs_segctor_collect_dirty_files(), which goes through the ns_dirty_files list and checks the i_bh field. If there is a cached buffer_head in i_bh it is not marked as dirty again. Since nilfs_dirty_inode() and nilfs_set_file_dirty() use separate transactions, it is possible that a segment construction that writes out the ifile occurs in-between the two. If this happens the inode is not on the ns_dirty_files list, but its ifile block is still marked as dirty and written out. In the next segment construction, the data for the file is written out and nilfs_bmap_propagate() updates the b-tree. Eventually the bmap root is written into the i_bh block, which is not dirty, because it was written out in another segment construction. As a result the bmap update can be lost, which leads to file system corruption. Either the virtual block address points to an unallocated DAT block, or the DAT entry will be reused for something different. The error can remain undetected for a long time. A typical error message would be one of the "bad btree" errors or a warning that a DAT entry could not be found. This bug can be reproduced reliably by a simple benchmark that creates and overwrites millions of 4k files. Link: http://lkml.kernel.org/r/1509367935-3086-2-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Andreas Rohner Signed-off-by: Ryusuke Konishi Tested-by: Andreas Rohner Tested-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/nilfs2/segment.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7554e9c4cfa208acf3164a86c05aaa967b043425 Author: Kees Cook Date: Fri Nov 17 15:29:32 2017 -0800 fs/nilfs2: convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This requires adding a pointer to hold the timer's target task, as the lifetime of sc_task doesn't appear to match the timer's task. Link: http://lkml.kernel.org/r/20171016235900.GA102729@beast Signed-off-by: Kees Cook Acked-by: Ryusuke Konishi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/nilfs2/segment.c | 11 +++++------ fs/nilfs2/segment.h | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) commit fb910c42ccebf853c29296185c45c11164a56098 Author: Joe Lawrence Date: Fri Nov 17 15:29:28 2017 -0800 sysctl: check for UINT_MAX before unsigned int min/max Mikulas noticed in the existing do_proc_douintvec_minmax_conv() and do_proc_dopipe_max_size_conv() introduced in this patchset, that they inconsistently handle overflow and min/max range inputs: For example: 0 ... param->min - 1 ---> ERANGE param->min ... param->max ---> the value is accepted param->max + 1 ... 0x100000000L + param->min - 1 ---> ERANGE 0x100000000L + param->min ... 0x100000000L + param->max ---> EINVAL 0x100000000L + param->max + 1, 0x200000000L + param->min - 1 ---> ERANGE 0x200000000L + param->min ... 0x200000000L + param->max ---> EINVAL 0x200000000L + param->max + 1, 0x300000000L + param->min - 1 ---> ERANGE In do_proc_do*() routines which store values into unsigned int variables (4 bytes wide for 64-bit builds), first validate that the input unsigned long value (8 bytes wide for 64-bit builds) will fit inside the smaller unsigned int variable. Then check that the unsigned int value falls inside the specified parameter min, max range. Otherwise the unsigned long -> unsigned int conversion drops leading bits from the input value, leading to the inconsistent pattern Mikulas documented above. Link: http://lkml.kernel.org/r/1507658689-11669-5-git-send-email-joe.lawrence@redhat.com Signed-off-by: Joe Lawrence Reported-by: Mikulas Patocka Reviewed-by: Mikulas Patocka Cc: Al Viro Cc: Jens Axboe Cc: Michael Kerrisk Cc: Randy Dunlap Cc: Josh Poimboeuf Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/sysctl.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 7a8d181949fb2c16be00f8cdb354794a30e46b39 Author: Joe Lawrence Date: Fri Nov 17 15:29:24 2017 -0800 pipe: add proc_dopipe_max_size() to safely assign pipe_max_size pipe_max_size is assigned directly via procfs sysctl: static struct ctl_table fs_table[] = { ... { .procname = "pipe-max-size", .data = &pipe_max_size, .maxlen = sizeof(int), .mode = 0644, .proc_handler = &pipe_proc_fn, .extra1 = &pipe_min_size, }, ... int pipe_proc_fn(struct ctl_table *table, int write, void __user *buf, size_t *lenp, loff_t *ppos) { ... ret = proc_dointvec_minmax(table, write, buf, lenp, ppos) ... and then later rounded in-place a few statements later: ... pipe_max_size = round_pipe_size(pipe_max_size); ... This leaves a window of time between initial assignment and rounding that may be visible to other threads. (For example, one thread sets a non-rounded value to pipe_max_size while another reads its value.) Similar reads of pipe_max_size are potentially racy: pipe.c :: alloc_pipe_info() pipe.c :: pipe_set_size() Add a new proc_dopipe_max_size() that consolidates reading the new value from the user buffer, verifying bounds, and calling round_pipe_size() with a single assignment to pipe_max_size. Link: http://lkml.kernel.org/r/1507658689-11669-4-git-send-email-joe.lawrence@redhat.com Signed-off-by: Joe Lawrence Reported-by: Mikulas Patocka Reviewed-by: Mikulas Patocka Cc: Al Viro Cc: Jens Axboe Cc: Michael Kerrisk Cc: Randy Dunlap Cc: Josh Poimboeuf Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/pipe.c | 18 +++-------------- include/linux/pipe_fs_i.h | 1 + include/linux/sysctl.h | 3 +++ kernel/sysctl.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 15 deletions(-) commit d3f14c485867cfb2e0c48aa88c41d0ef4bf5209c Author: Joe Lawrence Date: Fri Nov 17 15:29:21 2017 -0800 pipe: avoid round_pipe_size() nr_pages overflow on 32-bit round_pipe_size() contains a right-bit-shift expression which may overflow, which would cause undefined results in a subsequent roundup_pow_of_two() call. static inline unsigned int round_pipe_size(unsigned int size) { unsigned long nr_pages; nr_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; return roundup_pow_of_two(nr_pages) << PAGE_SHIFT; } PAGE_SIZE is defined as (1UL << PAGE_SHIFT), so: - 4 bytes wide on 32-bit (0 to 0xffffffff) - 8 bytes wide on 64-bit (0 to 0xffffffffffffffff) That means that 32-bit round_pipe_size(), nr_pages may overflow to 0: size=0x00000000 nr_pages=0x0 size=0x00000001 nr_pages=0x1 size=0xfffff000 nr_pages=0xfffff size=0xfffff001 nr_pages=0x0 << ! size=0xffffffff nr_pages=0x0 << ! This is bad because roundup_pow_of_two(n) is undefined when n == 0! 64-bit is not a problem as the unsigned int size is 4 bytes wide (similar to 32-bit) and the larger, 8 byte wide unsigned long, is sufficient to handle the largest value of the bit shift expression: size=0xffffffff nr_pages=100000 Modify round_pipe_size() to return 0 if n == 0 and updates its callers to handle accordingly. Link: http://lkml.kernel.org/r/1507658689-11669-3-git-send-email-joe.lawrence@redhat.com Signed-off-by: Joe Lawrence Reported-by: Mikulas Patocka Reviewed-by: Mikulas Patocka Cc: Al Viro Cc: Jens Axboe Cc: Michael Kerrisk Cc: Randy Dunlap Cc: Josh Poimboeuf Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/pipe.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 98159d977f71c3b3dee898d1c34e56f520b094e7 Author: Joe Lawrence Date: Fri Nov 17 15:29:17 2017 -0800 pipe: match pipe_max_size data type with procfs Patch series "A few round_pipe_size() and pipe-max-size fixups", v3. While backporting Michael's "pipe: fix limit handling" patchset to a distro-kernel, Mikulas noticed that current upstream pipe limit handling contains a few problems: 1 - procfs signed wrap: echo'ing a large number into /proc/sys/fs/pipe-max-size and then cat'ing it back out shows a negative value. 2 - round_pipe_size() nr_pages overflow on 32bit: this would subsequently try roundup_pow_of_two(0), which is undefined. 3 - visible non-rounded pipe-max-size value: there is no mutual exclusion or protection between the time pipe_max_size is assigned a raw value from proc_dointvec_minmax() and when it is rounded. 4 - unsigned long -> unsigned int conversion makes for potential odd return errors from do_proc_douintvec_minmax_conv() and do_proc_dopipe_max_size_conv(). This version underwent the same testing as v1: https://marc.info/?l=linux-kernel&m=150643571406022&w=2 This patch (of 4): pipe_max_size is defined as an unsigned int: unsigned int pipe_max_size = 1048576; but its procfs/sysctl representation is an integer: static struct ctl_table fs_table[] = { ... { .procname = "pipe-max-size", .data = &pipe_max_size, .maxlen = sizeof(int), .mode = 0644, .proc_handler = &pipe_proc_fn, .extra1 = &pipe_min_size, }, ... that is signed: int pipe_proc_fn(struct ctl_table *table, int write, void __user *buf, size_t *lenp, loff_t *ppos) { ... ret = proc_dointvec_minmax(table, write, buf, lenp, ppos) This leads to signed results via procfs for large values of pipe_max_size: % echo 2147483647 >/proc/sys/fs/pipe-max-size % cat /proc/sys/fs/pipe-max-size -2147483648 Use unsigned operations on this variable to avoid such negative values. Link: http://lkml.kernel.org/r/1507658689-11669-2-git-send-email-joe.lawrence@redhat.com Signed-off-by: Joe Lawrence Reported-by: Mikulas Patocka Reviewed-by: Mikulas Patocka Cc: Michael Kerrisk Cc: Randy Dunlap Cc: Al Viro Cc: Jens Axboe Cc: Josh Poimboeuf Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/pipe.c | 2 +- kernel/sysctl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ecc0c469f27765ed1e2b967be0aa17cee1a60b76 Author: NeilBrown Date: Fri Nov 17 15:29:13 2017 -0800 autofs: don't fail mount for transient error Currently if the autofs kernel module gets an error when writing to the pipe which links to the daemon, then it marks the whole moutpoint as catatonic, and it will stop working. It is possible that the error is transient. This can happen if the daemon is slow and more than 16 requests queue up. If a subsequent process tries to queue a request, and is then signalled, the write to the pipe will return -ERESTARTSYS and autofs will take that as total failure. So change the code to assess -ERESTARTSYS and -ENOMEM as transient failures which only abort the current request, not the whole mountpoint. It isn't a crash or a data corruption, but having autofs mountpoints suddenly stop working is rather inconvenient. Ian said: : And given the problems with a half dozen (or so) user space applications : consuming large amounts of CPU under heavy mount and umount activity this : could happen more easily than we expect. Link: http://lkml.kernel.org/r/87y3norvgp.fsf@notabene.neil.brown.name Signed-off-by: NeilBrown Acked-by: Ian Kent Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/waitq.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit e4f02fdabd1092065ddd8366fcb3c8483e627fc0 Author: Masahiro Yamada Date: Fri Nov 17 15:29:10 2017 -0800 init/version.c: include instead of init/version.c has nothing to do with modules, so remove the . Instead, include for EXPORT_SYMBOL_GPL. This cuts off a lot of unnecessary header parsing. Link: http://lkml.kernel.org/r/1505920984-8523-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Cc: Paul Gortmaker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37b5e5212a448bac0fe29d2a51f088014fbaaa41 Author: Jason Baron Date: Fri Nov 17 15:29:06 2017 -0800 epoll: remove ep_call_nested() from ep_eventpoll_poll() The use of ep_call_nested() in ep_eventpoll_poll(), which is the .poll routine for an epoll fd, is used to prevent excessively deep epoll nesting, and to prevent circular paths. However, we are already preventing these conditions during EPOLL_CTL_ADD. In terms of too deep epoll chains, we do in fact allow deep nesting of the epoll fds themselves (deeper than EP_MAX_NESTS), however we don't allow more than EP_MAX_NESTS when an epoll file descriptor is actually connected to a wakeup source. Thus, we do not require the use of ep_call_nested(), since ep_eventpoll_poll(), which is called via ep_scan_ready_list() only continues nesting if there are events available. Since ep_call_nested() is implemented using a global lock, applications that make use of nested epoll can see large performance improvements with this change. Davidlohr said: : Improvements are quite obscene actually, such as for the following : epoll_wait() benchmark with 2 level nesting on a 80 core IvyBridge: : : ncpus vanilla dirty delta : 1 2447092 3028315 +23.75% : 4 231265 2986954 +1191.57% : 8 121631 2898796 +2283.27% : 16 59749 2902056 +4757.07% : 32 26837 2326314 +8568.30% : 64 12926 1341281 +10276.61% : : (http://linux-scalability.org/epoll/epoll-test.c) Link: http://lkml.kernel.org/r/1509430214-5599-1-git-send-email-jbaron@akamai.com Signed-off-by: Jason Baron Cc: Davidlohr Bueso Cc: Alexander Viro Cc: Salman Qazi Cc: Hou Tao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/eventpoll.c | 80 +++++++++++++++++++++++++--------------------------------- 1 file changed, 35 insertions(+), 45 deletions(-) commit 57a173bdf5baab48e8e78825c7366c634acd087c Author: Jason Baron Date: Fri Nov 17 15:29:02 2017 -0800 epoll: avoid calling ep_call_nested() from ep_poll_safewake() ep_poll_safewake() is used to wakeup potentially nested epoll file descriptors. The function uses ep_call_nested() to prevent entering the same wake up queue more than once, and to prevent excessively deep wakeup paths (deeper than EP_MAX_NESTS). However, this is not necessary since we are already preventing these conditions during EPOLL_CTL_ADD. This saves extra function calls, and avoids taking a global lock during the ep_call_nested() calls. I have, however, left ep_call_nested() for the CONFIG_DEBUG_LOCK_ALLOC case, since ep_call_nested() keeps track of the nesting level, and this is required by the call to spin_lock_irqsave_nested(). It would be nice to remove the ep_call_nested() calls for the CONFIG_DEBUG_LOCK_ALLOC case as well, however its not clear how to simply pass the nesting level through multiple wake_up() levels without more surgery. In any case, I don't think CONFIG_DEBUG_LOCK_ALLOC is generally used for production. This patch, also apparently fixes a workload at Google that Salman Qazi reported by completely removing the poll_safewake_ncalls->lock from wakeup paths. Link: http://lkml.kernel.org/r/1507920533-8812-1-git-send-email-jbaron@akamai.com Signed-off-by: Jason Baron Acked-by: Davidlohr Bueso Cc: Alexander Viro Cc: Salman Qazi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/eventpoll.c | 47 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 29 deletions(-) commit 2ae928a9441a3b5f13952e1e8a97d03cb23ea603 Author: Shakeel Butt Date: Fri Nov 17 15:28:59 2017 -0800 epoll: account epitem and eppoll_entry to kmemcg A userspace application can directly trigger the allocations from eventpoll_epi and eventpoll_pwq slabs. A buggy or malicious application can consume a significant amount of system memory by triggering such allocations. Indeed we have seen in production where a buggy application was leaking the epoll references and causing a burst of eventpoll_epi and eventpoll_pwq slab allocations. This patch opt-in the charging of eventpoll_epi and eventpoll_pwq slabs. There is a per-user limit (~4% of total memory if no highmem) on these caches. I think it is too generous particularly in the scenario where jobs of multiple users are running on the system and the administrator is reducing cost by overcomitting the memory. This is unaccounted kernel memory and will not be considered by the oom-killer. I think by accounting it to kmemcg, for systems with kmem accounting enabled, we can provide better isolation between jobs of different users. Link: http://lkml.kernel.org/r/20171003021519.23907-1-shakeelb@google.com Signed-off-by: Shakeel Butt Acked-by: Michal Hocko Cc: Alexander Viro Cc: Vladimir Davydov Cc: Johannes Weiner Cc: Greg Thelen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/eventpoll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0bc989ffc802752c5256192b4a9c8f16a00feca7 Author: Masahiro Yamada Date: Fri Nov 17 15:28:55 2017 -0800 checkpatch: do not check missing blank line before builtin_*_driver checkpatch.pl does not check missing blank line before module_*_driver. I want it to behave likewise for builtin_*_driver. Link: http://lkml.kernel.org/r/1505700081-12854-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) commit 5751a24edfd43a91e072d63cde2b99b5a421645f Author: Joe Perches Date: Fri Nov 17 15:28:52 2017 -0800 checkpatch: add --strict test for lines ending in [ or ( Lines that end in an open bracket or open parenthesis are generally hard to follow. Lines following those ending with open parenthesis are also rarely aligned to that open parenthesis. Suggest not ending lines with '[' or '(' Link: http://lkml.kernel.org/r/8fd0b2b4a7482064254e37931eb9302a81d5aa2f.1508340786.git.joe@perches.com Signed-off-by: Joe Perches Suggested-by: Vivien Didelot Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) commit 87bd499af5cd663c150032cca4bac822a729263b Author: Joe Perches Date: Fri Nov 17 15:28:48 2017 -0800 checkpatch: add TP_printk to list of logging functions So the line length check can be bypassed by its callers. Link: http://lkml.kernel.org/r/7de542c08a6e79f2ebe7c1416c9f403c23fdcc09.1508282823.git.joe@perches.com Signed-off-by: Joe Perches Reported-by: Song Liu Tested-by: Song Liu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) commit cc147506bef96f31af799afe94d0c0e81161ee6c Author: Joe Perches Date: Fri Nov 17 15:28:44 2017 -0800 checkpatch: allow DEFINE_PER_CPU definitions to exceed line length Some of the definitions are very long and can't be split into multiple lines because ctags is limited. Exempt these lines from the line length checks. See commit 25528213fe9f ("tags: Fix DEFINE_PER_CPU expansions") for more details. Link: http://lkml.kernel.org/r/1508170320.6530.15.camel@perches.com Signed-off-by: Joe Perches Acked-by: Mark Rutland Cc: Daniel Lezcano Cc: Marc Zyngier Cc: Thomas Gleixner Cc: Ard Biesheuvel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit eeef5733e30e736926c762fa3336c4dd5702bcdf Author: Joe Perches Date: Fri Nov 17 15:28:41 2017 -0800 checkpatch: printks always need a KERN_ There was code in checkpatch that allowed continuation printks to be used without KERN_CONT. Remove the continuation check and always require a KERN_. Link: http://lkml.kernel.org/r/61980ef41d5b9b6543da1c49055042e0ab74d308.1507047008.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/checkpatch.pl | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) commit 258f79d5a1e49271f5aff38e6c1baeeaad0d82aa Author: Heinrich Schuchardt Date: Fri Nov 17 15:28:38 2017 -0800 scripts/checkpatch.pl: avoid false warning missing break void foo(int a) switch (a) { case 'h': fun1(); exit(1); default: } creates a warning "Possible switch case/default not preceded by break or fallthrough comment". exit( should be treated like return. Link: http://lkml.kernel.org/r/20170910154618.25819-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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 25bdda2bd68ae3008759f26058f6f9b9bb2b1cc5 Author: Miles Chen Date: Fri Nov 17 15:28:34 2017 -0800 checkpatch: support function pointers for unnamed function definition arguments Current unnamed function definition argument does not include function pointer cases and it reports something like: WARNING: function definition argument 'void' should also have an identifier name +unsigned int (*dummy)(void); Support function pointers for unnamed function arguments Link: http://lkml.kernel.org/r/1505389925-31087-1-git-send-email-miles.chen@mediatek.com Signed-off-by: Miles Chen 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 4441fca0a27f5f0e2c652584ae9d7abec6255c1f Author: Yury Norov Date: Fri Nov 17 15:28:31 2017 -0800 lib: test module for find_*_bit() functions find_bit functions are widely used in the kernel, including hot paths. This module tests performance of those functions in 2 typical scenarios: randomly filled bitmap with relatively equal distribution of set and cleared bits, and sparse bitmap which has 1 set bit for 500 cleared bits. On ThunderX machine: Start testing find_bit() with random-filled bitmap find_next_bit: 240043 cycles, 164062 iterations find_next_zero_bit: 312848 cycles, 163619 iterations find_last_bit: 193748 cycles, 164062 iterations find_first_bit: 177720874 cycles, 164062 iterations Start testing find_bit() with sparse bitmap find_next_bit: 3633 cycles, 656 iterations find_next_zero_bit: 620399 cycles, 327025 iterations find_last_bit: 3038 cycles, 656 iterations find_first_bit: 691407 cycles, 656 iterations [arnd@arndb.de: use correct format string for find-bit tests] Link: http://lkml.kernel.org/r/20171113135605.3166307-1-arnd@arndb.de Link: http://lkml.kernel.org/r/20171109140714.13168-1-ynorov@caviumnetworks.com Signed-off-by: Yury Norov Signed-off-by: Arnd Bergmann Reviewed-by: Clement Courbet Cc: Alexey Dobriyan Cc: Matthew Wilcox Cc: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig.debug | 9 ++++ lib/Makefile | 1 + lib/test_find_bit.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 154 insertions(+) commit 0b548e33e6cb2bff240fdaf1783783be15c29080 Author: Davidlohr Bueso Date: Fri Nov 17 15:28:27 2017 -0800 lib/rbtree-test: lower default params Fengguang reported soft lockups while running the rbtree and interval tree test modules. The logic for these tests all occur in init phase, and we currently are pounding with the default values for number of nodes and number of iterations of each test. Reduce the latter by two orders of magnitude. This does not influence the value of the tests in that one thousand times by default is enough to get the picture. Link: http://lkml.kernel.org/r/20171109161715.xai2dtwqw2frhkcm@linux-n805 Signed-off-by: Davidlohr Bueso Reported-by: Fengguang Wu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/interval_tree_test.c | 4 ++-- lib/rbtree_test.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit e4795e3bb7d7b3b3d066cea57fb459f869500284 Author: Cheng Jian Date: Fri Nov 17 15:28:23 2017 -0800 tools/lib/traceevent/parse-filter.c: clean up clang build warning The uniform structure filter_arg sets its union based on the difference of enum filter_arg_type, However, some functions use implicit type conversion obviously. warning: implicit conversion from enumeration type 'enum filter_exp_type' to different enumeration type 'enum filter_op_type' warning: implicit conversion from enumeration type 'enum filter_cmp_type' to different enumeration type 'enum filter_exp_type' Link: http://lkml.kernel.org/r/1509938415-113825-1-git-send-email-cj.chengjian@huawei.com Signed-off-by: Cheng Jian Cc: Kate Stewart Cc: Xie XiuQi Cc: Li Bin Cc: Steven Rostedt (Red Hat) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/lib/traceevent/parse-filter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2f9b7e08cb27d6d8d4579bb5301fb0940ff63d19 Author: Liu, Changcheng Date: Fri Nov 17 15:28:20 2017 -0800 lib/nmi_backtrace.c: fix kernel text address leak Don't leak idle function address in NMI backtrace. Link: http://lkml.kernel.org/r/20171106165648.GA95243@sofia Signed-off-by: Liu Changcheng Reviewed-by: Petr Mladek Reviewed-by: Josh Poimboeuf Reviewed-by: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/nmi_backtrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 36a3d1dd4e16bcd0d2ddfb4a2ec7092f0ae0d931 Author: Stephen Bates Date: Fri Nov 17 15:28:16 2017 -0800 lib/genalloc.c: make the avail variable an atomic_long_t If the amount of resources allocated to a gen_pool exceeds 2^32 then the avail atomic overflows and this causes problems when clients try and borrow resources from the pool. This is only expected to be an issue on 64 bit systems. Add the header to pull in atomic_long* operations. So that 32 bit systems continue to use atomic32_t but 64 bit systems can use atomic64_t. Link: http://lkml.kernel.org/r/1509033843-25667-1-git-send-email-sbates@raithlin.com Signed-off-by: Stephen Bates Reviewed-by: Logan Gunthorpe Reviewed-by: Mathieu Desnoyers Reviewed-by: Daniel Mentz Cc: Jonathan Corbet Cc: Andrew Morton Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/genalloc.h | 3 ++- lib/genalloc.c | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) commit e813a614007e3a8a7b53d976e86d9a20f21f81ad Author: Peter Zijlstra Date: Fri Nov 17 15:28:12 2017 -0800 lib/int_sqrt: adjust comments Our current int_sqrt() is not rough nor any approximation; it calculates the exact value of: floor(sqrt()). Document this. Link: http://lkml.kernel.org/r/20171020164645.001652117@infradead.org Signed-off-by: Peter Zijlstra (Intel) Acked-by: Linus Torvalds Cc: Anshul Garg Cc: Davidlohr Bueso Cc: David Miller Cc: Ingo Molnar Cc: Joe Perches Cc: Kees Cook Cc: Matthew Wilcox Cc: Michael Davidson Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/int_sqrt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8ae107eef209bff29a5816bc1aad40d5cd69a80 Author: Peter Zijlstra Date: Fri Nov 17 15:28:08 2017 -0800 lib/int_sqrt: optimize initial value compute The initial value (@m) compute is: m = 1UL << (BITS_PER_LONG - 2); while (m > x) m >>= 2; Which is a linear search for the highest even bit smaller or equal to @x We can implement this using a binary search using __fls() (or better when its hardware implemented). m = 1UL << (__fls(x) & ~1UL); Especially for small values of @x; which are the more common arguments when doing a CDF on idle times; the linear search is near to worst case, while the binary search of __fls() is a constant 6 (or 5 on 32bit) branches. cycles: branches: branch-misses: PRE: hot: 43.633557 +- 0.034373 45.333132 +- 0.002277 0.023529 +- 0.000681 cold: 207.438411 +- 0.125840 45.333132 +- 0.002277 6.976486 +- 0.004219 SOFTWARE FLS: hot: 29.576176 +- 0.028850 26.666730 +- 0.004511 0.019463 +- 0.000663 cold: 165.947136 +- 0.188406 26.666746 +- 0.004511 6.133897 +- 0.004386 HARDWARE FLS: hot: 24.720922 +- 0.025161 20.666784 +- 0.004509 0.020836 +- 0.000677 cold: 132.777197 +- 0.127471 20.666776 +- 0.004509 5.080285 +- 0.003874 Averages computed over all values <128k using a LFSR to generate order. Cold numbers have a LFSR based branch trace buffer 'confuser' ran between each int_sqrt() invocation. Link: http://lkml.kernel.org/r/20171020164644.936577234@infradead.org Signed-off-by: Peter Zijlstra (Intel) Suggested-by: Joe Perches Acked-by: Will Deacon Acked-by: Linus Torvalds Cc: Anshul Garg Cc: Davidlohr Bueso Cc: David Miller Cc: Ingo Molnar Cc: Kees Cook Cc: Matthew Wilcox Cc: Michael Davidson Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/int_sqrt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 3f3295709edea6268ff1609855f498035286af73 Author: Peter Zijlstra Date: Fri Nov 17 15:28:04 2017 -0800 lib/int_sqrt: optimize small argument The current int_sqrt() computation is sub-optimal for the case of small @x. Which is the interesting case when we're going to do cumulative distribution functions on idle times, which we assume to be a random variable, where the target residency of the deepest idle state gives an upper bound on the variable (5e6ns on recent Intel chips). In the case of small @x, the compute loop: while (m != 0) { b = y + m; y >>= 1; if (x >= b) { x -= b; y += m; } m >>= 2; } can be reduced to: while (m > x) m >>= 2; Because y==0, b==m and until x>=m y will remain 0. And while this is computationally equivalent, it runs much faster because there's less code, in particular less branches. cycles: branches: branch-misses: OLD: hot: 45.109444 +- 0.044117 44.333392 +- 0.002254 0.018723 +- 0.000593 cold: 187.737379 +- 0.156678 44.333407 +- 0.002254 6.272844 +- 0.004305 PRE: hot: 67.937492 +- 0.064124 66.999535 +- 0.000488 0.066720 +- 0.001113 cold: 232.004379 +- 0.332811 66.999527 +- 0.000488 6.914634 +- 0.006568 POST: hot: 43.633557 +- 0.034373 45.333132 +- 0.002277 0.023529 +- 0.000681 cold: 207.438411 +- 0.125840 45.333132 +- 0.002277 6.976486 +- 0.004219 Averages computed over all values <128k using a LFSR to generate order. Cold numbers have a LFSR based branch trace buffer 'confuser' ran between each int_sqrt() invocation. Link: http://lkml.kernel.org/r/20171020164644.876503355@infradead.org Fixes: 30493cc9dddb ("lib/int_sqrt.c: optimize square root algorithm") Signed-off-by: Peter Zijlstra (Intel) Suggested-by: Anshul Garg Acked-by: Linus Torvalds Cc: Davidlohr Bueso Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Will Deacon Cc: Joe Perches Cc: David Miller Cc: Matthew Wilcox Cc: Kees Cook Cc: Michael Davidson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/int_sqrt.c | 3 +++ 1 file changed, 3 insertions(+) commit dc2bf000a2848cf1dee373db14ce2cd1fe3ee394 Author: Markus Elfring Date: Fri Nov 17 15:28:00 2017 -0800 lib/test: delete five error messages for failed memory allocations Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Link: http://lkml.kernel.org/r/410a4c5a-4ee0-6fcc-969c-103d8e496b78@users.sourceforge.net Signed-off-by: Markus Elfring Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/test_kasan.c | 5 ++--- lib/test_kmod.c | 8 ++------ lib/test_list_sort.c | 9 +++------ 3 files changed, 7 insertions(+), 15 deletions(-) commit d6b28e0996962aeadd3777ae565ae03dd5c59f18 Author: Geert Uytterhoeven Date: Fri Nov 17 15:27:56 2017 -0800 lib: add module support to string tests Extract the string test code into its own source file, to allow compiling it either to a loadable module, or built into the kernel. Fixes: 03270c13c5ffaa6a ("lib/string.c: add testcases for memset16/32/64") Link: http://lkml.kernel.org/r/1505397744-3387-1-git-send-email-geert@linux-m68k.org Signed-off-by: Geert Uytterhoeven Cc: Matthew Wilcox Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/Kconfig | 2 +- lib/Makefile | 1 + lib/string.c | 141 ------------------------------------------------------ lib/test_string.c | 141 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 143 insertions(+), 142 deletions(-) commit f5bba9d11a256ad2a1c2f8e7fc6aabe6416b7890 Author: Masahiro Yamada Date: Fri Nov 17 15:27:53 2017 -0800 include/linux/radix-tree.h: remove unneeded #include This include was added by commit 187f1882b5b0 ("BUG: headers with BUG/BUG_ON etc. need linux/bug.h") because BUG_ON() was used in this header at that time. Some time later, commit 6d75f366b924 ("lib: radix-tree: check accounting of existing slot replacement users") removed the use of BUG_ON() from this header. Since then, there is no reason to include . Link: http://lkml.kernel.org/r/1505660151-4383-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Cc: Matthew Wilcox Cc: Masahiro Yamada Cc: Jan Kara Cc: Johannes Weiner Cc: Chris Mi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/radix-tree.h | 1 - 1 file changed, 1 deletion(-) commit 8001541cc333b1a3c2c38e3b34475fa446b053da Author: Masahiro Yamada Date: Fri Nov 17 15:27:49 2017 -0800 include/linux/bitfield.h: include instead of Since commit bc6245e5efd7 ("bug: split BUILD_BUG stuff out into "), #include is better to pull minimal headers needed for BUILG_BUG() family. Link: http://lkml.kernel.org/r/1505700775-19826-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada Acked-by: Jakub Kicinski Cc: Dinan Gunawardena Cc: Kalle Valo Cc: Ian Abbott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bitfield.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 083bf9c56d067559bd2727e1ec6ffb67d0ff53be Author: Joe Perches Date: Fri Nov 17 15:27:46 2017 -0800 get_maintainer: add more --self-test options Add tests for duplicate section headers, missing section content, link and scm reachability. Miscellanea: o Add --self-test= options (a comma separated list of any of sections, patterns, links or scm) where the default without options is all tests o Rename check_maintainers_patterns to self_test o Rename self_test_pattern_info to self_test_info [tom.saeger@oracle.com: improvements] Link: http://lkml.kernel.org/r/13e3986c374902fcf08ae947e36c5c608bbe3b79.1510075301.git.joe@perches.com Signed-off-by: Joe Perches Reviewed-by: Tom Saeger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/get_maintainer.pl | 149 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 132 insertions(+), 17 deletions(-) commit e1f7590488541845d16afd6003d31773b9155270 Author: Tom Saeger Date: Fri Nov 17 15:27:42 2017 -0800 get_maintainer: add --self-test for internal consistency tests Add "--self-test" option to get_maintainer.pl to show potential issues in MAINTAINERS file(s) content. Pattern check warnings are shown for "F" and "X" patterns found in MAINTAINERS file(s) which do not match any files known by git. Link: http://lkml.kernel.org/r/64994f911b3510d0f4c8ac2e113501dfcec1f3c9.1509559540.git.tom.saeger@oracle.com Signed-off-by: Tom Saeger Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/get_maintainer.pl | 94 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 77 insertions(+), 17 deletions(-) commit 8c188759fb5788579b5975d5a8c9f529e25c2171 Author: Randy Dunlap Date: Fri Nov 17 15:27:39 2017 -0800 dynamic_debug documentation: minor fixes Fix minor typo. Fix missing words in explaining parsing of last line number. Link: http://lkml.kernel.org/r/ebb7ff42-4945-103f-d5b4-f07a6f3343a7@infradead.org Signed-off-by: Randy Dunlap Cc: Jason Baron Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/admin-guide/dynamic-debug-howto.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1f3c790bd5989fcfec9e53ad8fa09f5b740c958f Author: Randy Dunlap Date: Fri Nov 17 15:27:35 2017 -0800 dynamic-debug-howto: fix optional/omitted ending line number to be LARGE instead of 0 line-range is supposed to treat "1-" as "1-endoffile", so handle the special case by setting last_lineno to UINT_MAX. Fixes this error: dynamic_debug:ddebug_parse_query: last-line:0 < 1st-line:1 dynamic_debug:ddebug_exec_query: query parse failed Link: http://lkml.kernel.org/r/10a6a101-e2be-209f-1f41-54637824788e@infradead.org Signed-off-by: Randy Dunlap Acked-by: Jason Baron Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/dynamic_debug.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8c703d660450c4df72ff24f79a335dc7973a9dc8 Author: Christophe JAILLET Date: Fri Nov 17 15:27:32 2017 -0800 kernel/umh.c: optimize 'proc_cap_handler()' If 'write' is 0, we can avoid a call to spin_lock/spin_unlock. Link: http://lkml.kernel.org/r/20171020193331.7233-1-christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Acked-by: Luis R. Rodriguez Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/umh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4ca59b14e588f873795a11cdc77a25c686a29d23 Author: Sandipan Das Date: Fri Nov 17 15:27:28 2017 -0800 include/linux/compiler-clang.h: handle randomizable anonymous structs The GCC randomize layout plugin can randomize the member offsets of sensitive kernel data structures. To use this feature, certain annotations and members are added to the structures which affect the member offsets even if this plugin is not used. All of these structures are completely randomized, except for task_struct which leaves out some of its members. All the other members are wrapped within an anonymous struct with the __randomize_layout attribute. This is done using the randomized_struct_fields_start and randomized_struct_fields_end defines. When the plugin is disabled, the behaviour of this attribute can vary based on the GCC version. For GCC 5.1+, this attribute maps to __designated_init otherwise it is just an empty define but the anonymous structure is still present. For other compilers, both randomized_struct_fields_start and randomized_struct_fields_end default to empty defines meaning the anonymous structure is not introduced at all. So, if a module compiled with Clang, such as a BPF program, needs to access task_struct fields such as pid and comm, the offsets of these members as recognized by Clang are different from those recognized by modules compiled with GCC. If GCC 4.6+ is used to build the kernel, this can be solved by introducing appropriate defines for Clang so that the anonymous structure is seen when determining the offsets for the members. Link: http://lkml.kernel.org/r/20171109064645.25581-1-sandipan@linux.vnet.ibm.com Signed-off-by: Sandipan Das Cc: David Rientjes Cc: Greg Kroah-Hartman Cc: Kate Stewart Cc: Thomas Gleixner Cc: Naveen N. Rao Cc: Alexei Starovoitov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/compiler-clang.h | 3 +++ 1 file changed, 3 insertions(+) commit a7bed27af194aa3f67915688039d93188ed95e2a Author: Kees Cook Date: Fri Nov 17 15:27:24 2017 -0800 bug: fix "cut here" location for __WARN_TAINT architectures Prior to v4.11, x86 used warn_slowpath_fmt() for handling WARN()s. After WARN() was moved to using UD0 on x86, the warning text started appearing _before_ the "cut here" line. This appears to have been a long-standing bug on architectures that used __WARN_TAINT, but it didn't get fixed. v4.11 and earlier on x86: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 2956 at drivers/misc/lkdtm_bugs.c:65 lkdtm_WARNING+0x21/0x30 This is a warning message Modules linked in: v4.12 and later on x86: This is a warning message ------------[ cut here ]------------ WARNING: CPU: 1 PID: 2982 at drivers/misc/lkdtm_bugs.c:68 lkdtm_WARNING+0x15/0x20 Modules linked in: With this fix: ------------[ cut here ]------------ This is a warning message WARNING: CPU: 3 PID: 3009 at drivers/misc/lkdtm_bugs.c:67 lkdtm_WARNING+0x15/0x20 Since the __FILE__ reporting happens as part of the UD0 handler, it isn't trivial to move the message to after the WARNING line, but at least we can fix the position of the "cut here" line so all the various logging tools will start including the actual runtime warning message again, when they follow the instruction and "cut here". Link: http://lkml.kernel.org/r/1510100869-73751-4-git-send-email-keescook@chromium.org Fixes: 9a93848fe787 ("x86/debug: Implement __WARN() using UD0") Signed-off-by: Kees Cook Cc: Peter Zijlstra (Intel) Cc: Josh Poimboeuf Cc: Fengguang Wu Cc: Arnd Bergmann Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/bug.h | 5 +++-- kernel/panic.c | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) commit 2a8358d8a339540f00ec596526690e8eeca931a3 Author: Kees Cook Date: Fri Nov 17 15:27:21 2017 -0800 bug: define the "cut here" string in a single place The "cut here" string is used in a few paths. Define it in a single place. Link: http://lkml.kernel.org/r/1510100869-73751-3-git-send-email-keescook@chromium.org Signed-off-by: Kees Cook Cc: Arnd Bergmann Cc: Fengguang Wu Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mn10300/mm/fault.c | 2 +- include/asm-generic/bug.h | 2 ++ kernel/panic.c | 2 +- lib/bug.c | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) commit d32f11ba281b7e203932c0a65ec1fb302493cbbe Author: Kees Cook Date: Fri Nov 17 15:27:17 2017 -0800 lkdtm: include WARN format string In order to test the ordering of WARN format strings, actually include one in LKDTM. Link: http://lkml.kernel.org/r/1510100869-73751-2-git-send-email-keescook@chromium.org Signed-off-by: Kees Cook Cc: Arnd Bergmann Cc: Fengguang Wu Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/misc/lkdtm_bugs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d15809f3649e2ee04713a9dba9aa7bd2c208ad82 Author: Arnd Bergmann Date: Fri Nov 17 15:27:13 2017 -0800 iopoll: avoid -Wint-in-bool-context warning When we pass the result of a multiplication as the timeout or the delay, we can get a warning from gcc-7: drivers/mmc/host/bcm2835.c:596:149: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] drivers/mfd/arizona-core.c:247:195: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c:49:27: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] The warning is a bit questionable inside of a macro, but this is intentional on the side of the gcc developers. It is also an indication of another problem: we evaluate the timeout and sleep arguments multiple times, which can have undesired side-effects when those are complex expressions. This changes the two iopoll variants to use local variables for storing copies of the timeouts. This adds some more type safety, and avoids both the double-evaluation and the gcc warning. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81484 Link: http://lkml.kernel.org/r/20170726133756.2161367-1-arnd@arndb.de Link: http://lkml.kernel.org/r/20171102114048.1526955-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Reviewed-by: Mark Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/iopoll.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 1e6270d07cde9bfbc27f8d0f16b323cf3a3b63dd Author: Joe Perches Date: Fri Nov 17 15:27:10 2017 -0800 parse-maintainers: add ability to specify filenames parse-maintainers.pl is convenient, but currently hard-codes the filenames that are used. Allow user-specified filenames to simplify the use of the script. Link: http://lkml.kernel.org/r/48703c068b3235223ffa3b2eb268fa0a125b25e0.1502251549.git.joe@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/parse-maintainers.pl | 52 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) commit aaf5dcfb223617ac2d16113e4b500199c65689de Author: Andi Kleen Date: Fri Nov 17 15:27:06 2017 -0800 kernel debug: support resetting WARN_ONCE for all architectures Some architectures store the WARN_ONCE state in the flags field of the bug_entry. Clear that one too when resetting once state through /sys/kernel/debug/clear_warn_once Pointed out by Michael Ellerman Improves the earlier patch that add clear_warn_once. [ak@linux.intel.com: add a missing ifdef CONFIG_MODULES] Link: http://lkml.kernel.org/r/20171020170633.9593-1-andi@firstfloor.org [akpm@linux-foundation.org: fix unused var warning] [akpm@linux-foundation.org: Use 0200 for clear_warn_once file, per mpe] [akpm@linux-foundation.org: clear BUGFLAG_DONE in clear_once_table(), per mpe] Link: http://lkml.kernel.org/r/20171019204642.7404-1-andi@firstfloor.org Signed-off-by: Andi Kleen Tested-by: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bug.h | 5 +++++ kernel/panic.c | 3 ++- lib/bug.c | 23 +++++++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) commit b1fca27d384e8418aac84b39f6f5179aecc1b64f Author: Andi Kleen Date: Fri Nov 17 15:27:03 2017 -0800 kernel debug: support resetting WARN*_ONCE I like _ONCE warnings because it's guaranteed that they don't flood the log. During testing I find it useful to reset the state of the once warnings, so that I can rerun tests and see if they trigger again, or can guarantee that a test run always hits the same warnings. This patch adds a debugfs interface to reset all the _ONCE warnings so that they appear again: echo 1 > /sys/kernel/debug/clear_warn_once This is implemented by putting all the warning booleans into a special section, and clearing it. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20171017221455.6740-1-andi@firstfloor.org Signed-off-by: Andi Kleen Tested-by: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/clearing-warn-once.txt | 7 +++++++ include/asm-generic/bug.h | 6 +++--- include/asm-generic/sections.h | 1 + include/asm-generic/vmlinux.lds.h | 3 +++ kernel/panic.c | 28 ++++++++++++++++++++++++++++ 5 files changed, 42 insertions(+), 3 deletions(-) commit fb6cc4ac15c354fa1eb449f50a0dfe5f4bf0d42a Author: Kees Cook Date: Fri Nov 17 15:26:59 2017 -0800 sh/boot: add static stack-protector to pre-kernel The sh decompressor code triggers stack-protector code generation when using CONFIG_CC_STACKPROTECTOR_STRONG. As done for arm and mips, add a simple static stack-protector canary. As this wasn't protected before, the risk of using a weak canary is minimized. Once the kernel is actually up, a better canary is chosen. Link: http://lkml.kernel.org/r/1506972007-80614-2-git-send-email-keescook@chromium.org Signed-off-by: Kees Cook Cc: Yoshinori Sato Cc: Rich Felker Cc: Al Viro Cc: Ingo Molnar Cc: Laura Abbott Cc: Masahiro Yamada Cc: Michal Marek Cc: Nicholas Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/boot/compressed/misc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 868038bed5fb03f95ebd4517b4370b024fd13771 Author: Joe Perches Date: Fri Nov 17 15:26:55 2017 -0800 spelling.txt: add "unnecessary" typo variants Add unnecessary typos by copying the necessary typos. Link: http://lkml.kernel.org/r/1505074722.22023.6.camel@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/spelling.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 0746a0bc6e6e76444098cf944848554d21d28cae Author: Alexey Dobriyan Date: Fri Nov 17 15:26:52 2017 -0800 proc: use do-while in name_to_int() Gcc doesn't know that "len" is guaranteed to be >=1 by dcache and generates standard while-loop prologue duplicating loop condition. add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-27 (-27) function old new delta name_to_int 104 77 -27 Link: http://lkml.kernel.org/r/20170912195213.GB17730@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3ee2a19908f27b8fea8ff14ffa8b755585eb7b4a Author: Alexey Dobriyan Date: Fri Nov 17 15:26:49 2017 -0800 proc: : uninline name_to_int() Save ~360 bytes. add/remove: 1/0 grow/shrink: 0/4 up/down: 104/-463 (-359) function old new delta name_to_int - 104 +104 proc_pid_lookup 217 126 -91 proc_lookupfd_common 212 121 -91 proc_task_lookup 289 194 -95 __proc_create 588 402 -186 Link: http://lkml.kernel.org/r/20170912194850.GA17730@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/proc/Makefile | 1 + fs/proc/internal.h | 23 +---------------------- fs/proc/util.c | 23 +++++++++++++++++++++++ 3 files changed, 25 insertions(+), 22 deletions(-) commit c643401218be0f4ab3522e0c0a63016596d6e9ca Author: Roman Gushchin Date: Fri Nov 17 15:26:45 2017 -0800 proc, coredump: add CoreDumping flag to /proc/pid/status Right now there is no convenient way to check if a process is being coredumped at the moment. It might be necessary to recognize such state to prevent killing the process and getting a broken coredump. Writing a large core might take significant time, and the process is unresponsive during it, so it might be killed by timeout, if another process is monitoring and killing/restarting hanging tasks. We're getting a significant number of corrupted coredump files on machines in our fleet, just because processes are being killed by timeout in the middle of the core writing process. We do have a process health check, and some agent is responsible for restarting processes which are not responding for health check requests. Writing a large coredump to the disk can easily exceed the reasonable timeout (especially on an overloaded machine). This flag will allow the agent to distinguish processes which are being coredumped, extend the timeout for them, and let them produce a full coredump file. To provide an ability to detect if a process is in the state of being coredumped, we can expose a boolean CoreDumping flag in /proc/pid/status. Example: $ cat core.sh #!/bin/sh echo "|/usr/bin/sleep 10" > /proc/sys/kernel/core_pattern sleep 1000 & PID=$! cat /proc/$PID/status | grep CoreDumping kill -ABRT $PID sleep 1 cat /proc/$PID/status | grep CoreDumping $ ./core.sh CoreDumping: 0 CoreDumping: 1 [guro@fb.com: document CoreDumping flag in /proc//status] Link: http://lkml.kernel.org/r/20170928135357.GA8470@castle.DHCP.thefacebook.com Link: http://lkml.kernel.org/r/20170920230634.31572-1-guro@fb.com Signed-off-by: Roman Gushchin Cc: Alexander Viro Cc: Ingo Molnar Cc: Konstantin Khlebnikov Cc: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/proc.txt | 3 +++ fs/proc/array.c | 6 ++++++ 2 files changed, 9 insertions(+) commit d3c85bad89b9153df741af14ad859ee49677f00d Author: Vlastimil Babka Date: Fri Nov 17 15:26:41 2017 -0800 mm, compaction: remove unneeded pageblock_skip_persistent() checks Commit f3c931633a59 ("mm, compaction: persistently skip hugetlbfs pageblocks") has introduced pageblock_skip_persistent() checks into migration and free scanners, to make sure pageblocks that should be persistently skipped are marked as such, regardless of the ignore_skip_hint flag. Since the previous patch introduced a new no_set_skip_hint flag, the ignore flag no longer prevents marking pageblocks as skipped. Therefore we can remove the special cases. The relevant pageblocks will be marked as skipped by the common logic which marks each pageblock where no page could be isolated. This makes the code simpler. Link: http://lkml.kernel.org/r/20171102121706.21504-3-vbabka@suse.cz Signed-off-by: Vlastimil Babka Cc: Mel Gorman Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 2583d6713267a4c80126e4e50dd45f5cf685ebe8 Author: Vlastimil Babka Date: Fri Nov 17 15:26:38 2017 -0800 mm, compaction: split off flag for not updating skip hints Pageblock skip hints were added as a heuristic for compaction, which shares core code with CMA. Since CMA reliability would suffer from the heuristics, compact_control flag ignore_skip_hint was added for the CMA use case. Since 6815bf3f233e ("mm/compaction: respect ignore_skip_hint in update_pageblock_skip") the flag also means that CMA won't *update* the skip hints in addition to ignoring them. Today, direct compaction can also ignore the skip hints in the last resort attempt, but there's no reason not to set them when isolation fails in such case. Thus, this patch splits off a new no_set_skip_hint flag to avoid the updating, which only CMA sets. This should improve the heuristics a bit, and allow us to simplify the persistent skip bit handling as the next step. Link: http://lkml.kernel.org/r/20171102121706.21504-2-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 2 +- mm/internal.h | 1 + mm/page_alloc.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit b527cfe5bc23208cf9a346879501333cec638aba Author: Vlastimil Babka Date: Fri Nov 17 15:26:34 2017 -0800 mm, compaction: extend pageblock_skip_persistent() to all compound pages pageblock_skip_persistent() checks for HugeTLB pages of pageblock order. When clearing pageblock skip bits for compaction, the bits are not cleared for such pageblocks, because they cannot contain base pages suitable for migration, nor free pages to use as migration targets. This optimization can be simply extended to all compound pages of order equal or larger than pageblock order, because migrating such pages (if they support it) cannot help sub-pageblock fragmentation. This includes THP's and also gigantic HugeTLB pages, which the current implementation doesn't persistently skip due to a strict pageblock_order equality check and not recognizing tail pages. While THP pages are generally less "persistent" than HugeTLB, we can still expect that if a THP exists at the point of __reset_isolation_suitable(), it will exist also during the subsequent compaction run. The time difference here could be actually smaller than between a compaction run that sets a (non-persistent) skip bit on a THP, and the next compaction run that observes it. Link: http://lkml.kernel.org/r/20171102121706.21504-1-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Acked-by: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 21dc7e023611fbcf8e38f255731bcf3cc38e7638 Author: David Rientjes Date: Fri Nov 17 15:26:30 2017 -0800 mm, compaction: persistently skip hugetlbfs pageblocks It is pointless to migrate hugetlb memory as part of memory compaction if the hugetlb size is equal to the pageblock order. No defragmentation is occurring in this condition. It is also pointless to for the freeing scanner to scan a pageblock where a hugetlb page is pinned. Unconditionally skip these pageblocks, and do so peristently so that they are not rescanned until it is observed that these hugepages are no longer pinned. It would also be possible to do this by involving the hugetlb subsystem in marking pageblocks to no longer be skipped when they hugetlb pages are freed. This is a simple solution that doesn't involve any additional subsystems in pageblock skip manipulation. [rientjes@google.com: fix build] Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1708201734390.117182@chino.kir.corp.google.com Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1708151639130.106658@chino.kir.corp.google.com Signed-off-by: David Rientjes Tested-by: Michal Hocko Cc: Vlastimil Babka Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pageblock-flags.h | 11 ++++++++ mm/compaction.c | 56 ++++++++++++++++++++++++++++++++--------- 2 files changed, 55 insertions(+), 12 deletions(-) commit a0647dc9208fae9124ca38d43a5c3c950d955291 Author: David Rientjes Date: Fri Nov 17 15:26:27 2017 -0800 mm, compaction: kcompactd should not ignore pageblock skip Kcompactd is needlessly ignoring pageblock skip information. It is doing MIGRATE_SYNC_LIGHT compaction, which is no more powerful than MIGRATE_SYNC compaction. If compaction recently failed to isolate memory from a set of pageblocks, there is nothing to indicate that kcompactd will be able to do so, or that it is beneficial from attempting to isolate memory. Use the pageblock skip hint to avoid rescanning pageblocks needlessly until that information is reset. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1708151638550.106658@chino.kir.corp.google.com Signed-off-by: David Rientjes Cc: Vlastimil Babka Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 09af5ccea26d347041ac7ca37a61f859ef9bd1f5 Author: Corentin Labbe Date: Fri Nov 17 15:26:23 2017 -0800 mm: shmem: remove unused info variable Fix the following warning by removing the unused variable: mm/shmem.c:3205:27: warning: variable 'info' set but not used [-Wunused-but-set-variable] Link: http://lkml.kernel.org/r/1510774029-30652-1-git-send-email-clabbe@baylibre.com Signed-off-by: Corentin Labbe Acked-by: Michal Hocko Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 2 -- 1 file changed, 2 deletions(-) commit 3aaabbf1c39effa2ac0c11103ed07ef03b0a0d89 Author: Miles Chen Date: Fri Nov 17 15:26:19 2017 -0800 lib/dma-debug.c: fix incorrect pfn calculation dma-debug reports the following warning: WARNING: CPU: 3 PID: 298 at kernel-4.4/lib/dma-debug.c:604 debug _dma_assert_idle+0x1a8/0x230() DMA-API: cpu touching an active dma mapped cacheline [cln=0x00000882300] CPU: 3 PID: 298 Comm: vold Tainted: G W O 4.4.22+ #1 Hardware name: MT6739 (DT) Call trace: debug_dma_assert_idle+0x1a8/0x230 wp_page_copy.isra.96+0x118/0x520 do_wp_page+0x4fc/0x534 handle_mm_fault+0xd4c/0x1310 do_page_fault+0x1c8/0x394 do_mem_abort+0x50/0xec I found that debug_dma_alloc_coherent() and debug_dma_free_coherent() assume that dma_alloc_coherent() always returns a linear address. However it's possible that dma_alloc_coherent() returns a non-linear address. In this case, page_to_pfn(virt_to_page(virt)) will return an incorrect pfn. If the pfn is valid and mapped as a COW page, we will hit the warning when doing wp_page_copy(). Fix this by calculating pfn for linear and non-linear addresses. [miles.chen@mediatek.com: v4] Link: http://lkml.kernel.org/r/1510872972-23919-1-git-send-email-miles.chen@mediatek.com Link: http://lkml.kernel.org/r/1506484087-1177-1-git-send-email-miles.chen@mediatek.com Signed-off-by: Miles Chen Reviewed-by: Robin Murphy Cc: Christoph Hellwig Cc: Marek Szyprowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds lib/dma-debug.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 5d03a6613957785e94af7a4a6212ad4af66aa5c2 Author: Vitaly Wool Date: Fri Nov 17 15:26:16 2017 -0800 mm/z3fold.c: use kref to prevent page free/compact race There is a race in the current z3fold implementation between do_compact() called in a work queue context and the page release procedure when page's kref goes to 0. do_compact() may be waiting for page lock, which is released by release_z3fold_page_locked right before putting the page onto the "stale" list, and then the page may be freed as do_compact() modifies its contents. The mechanism currently implemented to handle that (checking the PAGE_STALE flag) is not reliable enough. Instead, we'll use page's kref counter to guarantee that the page is not released if its compaction is scheduled. It then becomes compaction function's responsibility to decrease the counter and quit immediately if the page was actually freed. Link: http://lkml.kernel.org/r/20171117092032.00ea56f42affbed19f4fcc6c@gmail.com Signed-off-by: Vitaly Wool Cc: Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/z3fold.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 1334be3657dd02af0591d6d8adf0e6a60a7710a6 Author: Arnd Bergmann Date: Fri Nov 17 15:26:12 2017 -0800 mm: fix nodemask printing The cleanup caused build warnings for constant mask pointers: mm/mempolicy.c: In function `mpol_to_str': ./include/linux/nodemask.h:108:11: warning: the comparison will always evaluate as `true' for the address of `nodes' will never be NULL [-Waddress] An earlier workaround I suggested was incorporated in the version that got merged, but that only solved the problem for gcc-7 and higher, while gcc-4.6 through gcc-6.x still warn. This changes the printing again to use inline functions that make it clear to the compiler that the line that does the NULL check has no idea whether the argument is a constant NULL. Link: http://lkml.kernel.org/r/20171117101545.119689-1-arnd@arndb.de Fixes: 0205f75571e3 ("mm: simplify nodemask printing") Signed-off-by: Arnd Bergmann Cc: Michal Hocko Cc: Stephen Rothwell Cc: Zhangshaokun Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/nodemask.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 2dcd9c71c1ffa9a036e09047f60e08383bb0abb6 Merge: b1c2a34 a96a503 Author: Linus Torvalds Date: Fri Nov 17 14:58:01 2017 -0800 Merge tag 'trace-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from - allow module init functions to be traced - clean up some unused or not used by config events (saves space) - clean up of trace histogram code - add support for preempt and interrupt enabled/disable events - other various clean ups * tag 'trace-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (30 commits) tracing, thermal: Hide cpu cooling trace events when not in use tracing, thermal: Hide devfreq trace events when not in use ftrace: Kill FTRACE_OPS_FL_PER_CPU perf/ftrace: Small cleanup perf/ftrace: Fix function trace events perf/ftrace: Revert ("perf/ftrace: Fix double traces of perf on ftrace:function") tracing, dma-buf: Remove unused trace event dma_fence_annotate_wait_on tracing, memcg, vmscan: Hide trace events when not in use tracing/xen: Hide events that are not used when X86_PAE is not defined tracing: mark trace_test_buffer as __maybe_unused printk: Remove superfluous memory barriers from printk_safe ftrace: Clear hashes of stale ips of init memory tracing: Add support for preempt and irq enable/disable events tracing: Prepare to add preempt and irq trace events ftrace/kallsyms: Have /proc/kallsyms show saved mod init functions ftrace: Add freeing algorithm to free ftrace_mod_maps ftrace: Save module init functions kallsyms symbols for tracing ftrace: Allow module init functions to be traced ftrace: Add a ftrace_free_mem() function for modules to use tracing: Reimplement log2 ... commit b1c2a344cc19b40d2f1e7cbd9c2f4f205ae6d650 Merge: 190b103 c3e0d17 Author: Linus Torvalds Date: Fri Nov 17 14:56:14 2017 -0800 Merge tag 'linux-kselftest-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest updates from Shuah Khan: "This update to Kselftest consists of cleanup patches, fixes, and a new test for ion buffer sharing. Fixes include changes to skip firmware tests on systems that aren't configured to support them, as opposed to failing them" * tag 'linux-kselftest-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: firmware: skip unsupported custom firmware fallback tests selftests: firmware: skip unsupported async loading tests selftests: memfd_test.c: fix compilation warning. selftests/ftrace: Introduce exit_pass and exit_fail selftests: ftrace: add more config fragments android/ion: userspace test utility for ion buffer sharing selftests: remove obsolete kconfig fragment for cpu-hotplug selftests: vdso_test: support ARM64 targets selftests/ftrace: Do not use arch dependent do_IRQ as a target function selftests: breakpoints: fix compile error on breakpoint_test_arm64 selftests: add missing test result status in memory-hotplug test selftests/exec: include cwd in long path calculation selftests: seccomp: update .gitignore with newly added tests selftests: vm: Update .gitignore with newly added tests selftests: timers: Update .gitignore with newly added tests commit 190b10367b0d311f68dc71e40b254fd4427affc2 Merge: e75080f 09e1508 Author: Linus Torvalds Date: Fri Nov 17 14:51:24 2017 -0800 Merge tag 'acpi-fix-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "This fixes a possible memory leak in an error code path in one of the utility routines (Xiongfeng Wang)" * tag 'acpi-fix-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / utils: Fix memory leak in acpi_evaluate_reference() error path commit e75080f185c103a638c66d7b65c673769a57cb87 Merge: f6705bf 3e4c9e6 Author: Linus Torvalds Date: Fri Nov 17 14:49:25 2017 -0800 Merge tag 'pm-fixes-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull two power management fixes from Rafael Wysocki: "This is the change making /proc/cpuinfo on x86 report current CPU frequency in "cpu MHz" again in all cases and an additional one dealing with an overzealous check in one of the helper routines in the runtime PM framework" * tag 'pm-fixes-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / runtime: Drop children check from __pm_runtime_set_status() x86 / CPU: Always show current CPU frequency in /proc/cpuinfo commit f6705bf959efac87bca76d40050d342f1d212587 Merge: bec0443 49e37ba Author: Linus Torvalds Date: Fri Nov 17 14:34:42 2017 -0800 Merge tag 'drm-for-v4.15-amd-dc' of git://people.freedesktop.org/~airlied/linux Pull amdgpu DC display code for Vega from Dave Airlie: "This is the pull request for the AMD DC (display code) layer which is a requirement to program the display engines on the new Vega and Raven based GPUs. It also contains support for all amdgpu supported GPUs (CIK, VI, Polaris), which has to be enabled. It is also a kms atomic modesetting compatible driver (unlike the current in-tree display code). I've kept it separate from drm-next because it may have some things that cause you to reject it. Background story: AMD have an internal team creating a shared OS codebase for display at hw bring up time using information from their hardware teams. This process doesn't lead to the most Linux friendly/looking code but we have worked together on cleaning a lot of it up and dealing with sparse/smatch/checkpatch, and having their team internally adhere to Linux coding standards. This tree is a complete history rebased since they started opening it, we decided not to squash it down as the history may have some value. Some of the commits therefore might not reach kernel standards, and we are steadily training people in AMD to better write commit msgs. There is a major bunch of generated bandwidth calculation and verification code that comes from their hardware team. On Vega and before this is float calculations, on Raven (DCN10) this is double based. They do the required things to do FP in the kernel, and I could understand this might raise some issues. Rewriting the bandwidth would be a major undertaken in reverification, it's non-trivial to work out if a display can handle the complete set of mode information thrown at it. Future story: There is a TODO list with this, and it address most of the remaining things that would be nice to refine/remove. The DCN10 code is still under development internally and they push out a lot of patches quite regularly and are supporting this code base with their display team. I think we've reached the point where keeping it out of tree is going to motivate distributions to start carrying the code, so I'd prefer we get it in tree. I think this code is slightly better than STAGING quality but not massively so, I'd really like to see that float/double magic gone and fixed point used, but AMD don't seem to think the accuracy and revalidation of the code is worth the effort" * tag 'drm-for-v4.15-amd-dc' of git://people.freedesktop.org/~airlied/linux: (1110 commits) drm/amd/display: fix MST link training fail division by 0 drm/amd/display: Fix formatting for null pointer dereference fix drm/amd/display: Remove dangling planes on dc commit state drm/amd/display: add flip_immediate to commit update for stream drm/amd/display: Miss register MST encoder cbs drm/amd/display: Fix warnings on S3 resume drm/amd/display: use num_timing_generator instead of pipe_count drm/amd/display: use configurable FBC option in dm drm/amd/display: fix AZ clock not enabled before program AZ endpoint amdgpu/dm: Don't use DRM_ERROR in amdgpu_dm_atomic_check amd/display: Fix potential null dereference in dce_calcs.c amdgpu/dm: Remove unused forward declaration drm/amdgpu: Remove unused dc_stream from amdgpu_crtc amdgpu/dc: Fix double unlock in amdgpu_dm_commit_planes amdgpu/dc: Fix missing null checks in amdgpu_dm.c amdgpu/dc: Fix potential null dereferences in amdgpu_dm.c amdgpu/dc: fix more indentation warnings amdgpu/dc: handle allocation failures in dc_commit_planes_to_stream. amdgpu/dc: fix indentation warning from smatch. amdgpu/dc: fix non-ansi function decls. ... commit bec04432cb9036dedf89140c102b5ac03e4b3626 Merge: e291167 1e03239 Author: Linus Torvalds Date: Fri Nov 17 14:31:27 2017 -0800 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management updates from Zhang Rui: - introduce brcmstb AVS TMON thermal driver (Brian Norris) - add Rockchip RV1108 support in rockchip thermal driver (Rocky Hao) - major rework on HISI driver plus additional support of hisi3660 (Daniel Lezcano) - add nvmem-cells binding on imx6sx (Leonard Crestez) - fix a NULL pointer dereference on ti thermal driver unloading (Tony Lindgren) - improve tmon tool to make it easier to cross-compile tmon (Markus Mayer) - add Coffee Lake and Cannon Lake support for intel processor and pch thermal drivers (Srinivas Pandruvada) - other small fixes and cleanups (Arvind Yadav, Colin Ian King, Allen Wild, Nicolin Chen, Baruch SiachNiklas Söderlund, Arnd Bergmann) * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (44 commits) thermal: pch: Add Cannon Lake support thermal: int340x: processor_thermal: Add Coffee Lake support thermal: int340x: processor_thermal: Add Cannon Lake support thermal: bxt: remove redundant variable trip thermal: cpu_cooling: pr_err() strings should end with newlines thermal: add brcmstb AVS TMON driver Documentation: devicetree: add binding for Broadcom STB AVS TMON thermal/drivers/hisi: Add support for hi3660 SoC thermal/drivers/hisi: Prepare to add support for other hisi platforms thermal/drivers/hisi: Add platform prefix to function name thermal/drivers/hisi: Put platform code together thermal/drivers/qcom-spmi: Use devm_iio_channel_get thermal/drivers/generic-iio-adc: Switch tz request to devm version thermal/drivers/step_wise: Fix temperature regulation misbehavior thermal/drivers/hisi: Use round up step value thermal/drivers/hisi: Move the clk setup in the corresponding functions thermal/drivers/hisi: Remove mutex_lock in the code thermal/drivers/hisi: Remove thermal data back pointer thermal/drivers/hisi: Convert long to int thermal/drivers/hisi: Rename and remove unused field ... commit e29116758c4e06be9ba6358350f9d9f466414efb Merge: e71d512 7b8b098 Author: Linus Torvalds Date: Fri Nov 17 14:26:14 2017 -0800 Merge branch 'parisc-4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "Highlights: - one important fix from Dave to prevent kernel crash when userspace hands over invalid values to our in-kernel CAS implementation. - added CPU topology support, including multi-core scheduler support on PA8900 CPUs Minor changes: - minor fixes for sparse (from Luc) - drop duplicates for CPU_BIG_ENDIAN from parisc and sparc top Kconfig files (from Babu) - reorganized parisc PDC (firmware-access) header files for usage from userspace. Required for upcoming qemu parisc emulator and SeaBIOS fork to support parisc" * 'parisc-4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: arch: Fix duplicates in Kconfig for parisc and sparc parisc: Make some PDC structures accessible in uapi headers parisc: Pass endianness info to sparse parisc: Add CPU topology support parisc: Fix validity check of pointer size argument in new CAS implementation commit e71d5126e77c68b7ed1fad275fdc8825e9597448 Merge: c3e9c04 ab35727 Author: Linus Torvalds Date: Fri Nov 17 14:23:52 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull second round of s390 updates from Martin Schwidefsky: - rework of the vdso code to avoid the use of the access register mode - use perf AUX buffers for the transport of diagnostic sample data - add perf_regs and user stack dump support - enable perf call graphs for user space programs - add perf register support for floating-point registers - all remaining s390 related timer_setup conversions - bug fixes and cleanups * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (30 commits) s390: remove unused parameter from Makefile zfcp: purely mechanical update using timer API, plus blank lines s390/scsi: Convert timers to use timer_setup() s390/cpum_sf: correctly set the PID and TID in perf samples s390/cpum_sf: load program parameter at sampler enablement s390/perf: add perf register support for floating-point registers s390/perf: extend perf_regs support to include floating-point registers s390/perf: define common DWARF register string table s390/perf: add support for perf_regs and libdw s390/perf: add perf_regs support and user stack dump s390/cpum_sf: do not register PMU if no sampling mode is authorized s390/cpumf: remove raw event support in basic-only sampling mode s390/perf: add callback to perf to enable using AUX buffer s390/cpumf: enable using AUX buffer s390/cpumf: introduce AUX buffer for dump diagnostic sample data s390/disassembler: increase show_code buffer size s390: Remove CONFIG_HARDENED_USERCOPY s390: enable CPU alternatives unconditionally s390/nmi: remove unused code s390/mm: remove unused code ... commit c3e9c04b89059a4c93c792da883ca284de182da5 Merge: e0bcb42 fcfa447 Author: Linus Torvalds Date: Fri Nov 17 14:18:00 2017 -0800 Merge tag 'nfs-for-4.15-1' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client updates from Anna Schumaker: "Stable bugfixes: - Revalidate "." and ".." correctly on open - Avoid RCU usage in tracepoints - Fix ugly referral attributes - Fix a typo in nomigration mount option - Revert "NFS: Move the flock open mode check into nfs_flock()" Features: - Implement a stronger send queue accounting system for NFS over RDMA - Switch some atomics to the new refcount_t type Other bugfixes and cleanups: - Clean up access mode bits - Remove special-case revalidations in nfs_opendir() - Improve invalidating NFS over RDMA memory for async operations that time out - Handle NFS over RDMA replies with a worqueue - Handle NFS over RDMA sends with a workqueue - Fix up replaying interrupted requests - Remove dead NFS over RDMA definitions - Update NFS over RDMA copyright information - Be more consistent with bool initialization and comparisons - Mark expected switch fall throughs - Various sunrpc tracepoint cleanups - Fix various OPEN races - Fix a typo in nfs_rename() - Use common error handling code in nfs_lock_and_join_request() - Check that some structures are properly cleaned up during net_exit() - Remove net pointer from dprintk()s" * tag 'nfs-for-4.15-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (62 commits) NFS: Revert "NFS: Move the flock open mode check into nfs_flock()" NFS: Fix typo in nomigration mount option nfs: Fix ugly referral attributes NFS: super: mark expected switch fall-throughs sunrpc: remove net pointer from messages nfs: remove net pointer from messages sunrpc: exit_net cleanup check added nfs client: exit_net cleanup check added nfs/write: Use common error handling code in nfs_lock_and_join_requests() NFSv4: Replace closed stateids with the "invalid special stateid" NFSv4: nfs_set_open_stateid must not trigger state recovery for closed state NFSv4: Check the open stateid when searching for expired state NFSv4: Clean up nfs4_delegreturn_done NFSv4: cleanup nfs4_close_done NFSv4: Retry NFS4ERR_OLD_STATEID errors in layoutreturn pNFS: Retry NFS4ERR_OLD_STATEID errors in layoutreturn-on-close NFSv4: Don't try to CLOSE if the stateid 'other' field has changed NFSv4: Retry CLOSE and DELEGRETURN on NFS4ERR_OLD_STATEID. NFS: Fix a typo in nfs_rename() NFSv4: Fix open create exclusive when the server reboots ... commit e0bcb42e602816415f6fe07313b6fc84932244b7 Merge: b6b220b 4670269 Author: Linus Torvalds Date: Fri Nov 17 14:16:21 2017 -0800 Merge tag 'ecryptfs-4.15-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs Pull eCryptfs updates from Tyler Hicks: - miscellaneous code cleanups and refactoring - fix a possible use after free bug when unloading the module * tag 'ecryptfs-4.15-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs: eCryptfs: constify attribute_group structures. ecryptfs: remove unnecessary i_version bump ecryptfs: use ARRAY_SIZE ecryptfs: Adjust four checks for null pointers ecryptfs: Return an error code only as a constant in ecryptfs_add_global_auth_tok() ecryptfs: Delete 21 error messages for a failed memory allocation eCryptfs: use after free in ecryptfs_release_messaging() ecryptfs: remove private bin2hex implementation ecryptfs: add missing \n to end of various error messages commit b6b220b0c76f0aa9cb5efb882424a7acc109d898 Merge: b04a234 2015a63 Author: Linus Torvalds Date: Fri Nov 17 14:14:13 2017 -0800 Merge tag 'xfs-4.15-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "A couple more patches to fix a locking bug and some inconsistent type usage in some of the new code: - Fix a forgotten rcu read unlock - Fix some inconsistent integer type usage" * tag 'xfs-4.15-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix type usage xfs: fix forgotten rcu read unlock when skipping inode reclaim commit fcfa447062b2061e11f68b846d61cbfe60d0d604 Author: Benjamin Coddington Date: Fri Nov 10 06:27:49 2017 -0500 NFS: Revert "NFS: Move the flock open mode check into nfs_flock()" Commit e12937279c8b "NFS: Move the flock open mode check into nfs_flock()" changed NFSv3 behavior for flock() such that the open mode must match the lock type, however that requirement shouldn't be enforced for flock(). Signed-off-by: Benjamin Coddington Cc: stable@vger.kernel.org # v4.12 Signed-off-by: Anna Schumaker fs/nfs/file.c | 18 ++---------------- fs/nfs/nfs4proc.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) commit f02fee227e5f21981152850744a6084ff3fa94ee Author: Joshua Watt Date: Tue Nov 7 16:25:47 2017 -0600 NFS: Fix typo in nomigration mount option The option was incorrectly masking off all other options. Signed-off-by: Joshua Watt Cc: stable@vger.kernel.org #3.7 Signed-off-by: Anna Schumaker fs/nfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c05cefcc72416a37eba5a2b35f0704ed758a9145 Author: Chuck Lever Date: Sun Nov 5 15:45:22 2017 -0500 nfs: Fix ugly referral attributes Before traversing a referral and performing a mount, the mounted-on directory looks strange: dr-xr-xr-x. 2 4294967294 4294967294 0 Dec 31 1969 dir.0 nfs4_get_referral is wiping out any cached attributes with what was returned via GETATTR(fs_locations), but the bit mask for that operation does not request any file attributes. Retrieve owner and timestamp information so that the memcpy in nfs4_get_referral fills in more attributes. Changes since v1: - Don't request attributes that the client unconditionally replaces - Request only MOUNTED_ON_FILEID or FILEID attribute, not both - encode_fs_locations() doesn't use the third bitmask word Fixes: 6b97fd3da1ea ("NFSv4: Follow a referral") Suggested-by: Pradeep Thomas Signed-off-by: Chuck Lever Cc: stable@vger.kernel.org Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit fd53dde83978ba5f7db3183ce56b3a1c39f448b0 Author: Gustavo A. R. Silva Date: Wed Nov 8 20:49:19 2017 -0600 NFS: super: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 703509 Addresses-Coverity-ID: 703510 Addresses-Coverity-ID: 703511 Addresses-Coverity-ID: 703512 Addresses-Coverity-ID: 703513 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Anna Schumaker fs/nfs/super.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 6c67a3e4a46a95c8aa8228dafb3676bc1a9b4871 Author: Vasily Averin Date: Wed Nov 8 08:57:32 2017 +0300 sunrpc: remove net pointer from messages Publishing of net pointer is not safe, use net->ns.inum as net ID [ 171.391947] RPC: created new rpcb local clients (rpcb_local_clnt: ..., rpcb_local_clnt4: ...) for net f00001e7 [ 171.767188] NFSD: starting 90-second grace period (net f00001e7) Signed-off-by: Vasily Averin Signed-off-by: Anna Schumaker net/sunrpc/rpc_pipe.c | 8 ++++---- net/sunrpc/rpcb_clnt.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) commit e4949e4b3d5e056bcecebd340d4c8fab7ed1c20d Author: Vasily Averin Date: Wed Nov 8 08:56:55 2017 +0300 nfs: remove net pointer from messages Publishing of net pointer is not safe, use net->ns.inum instead Signed-off-by: Vasily Averin Signed-off-by: Anna Schumaker fs/nfs/callback.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4112be70becb82bc9a53cf2d11ab51c35602b063 Author: Vasily Averin Date: Sun Nov 12 11:48:43 2017 +0300 sunrpc: exit_net cleanup check added Be sure that all_clients list initialized in net_init hook was return to initial state. Signed-off-by: Vasily Averin Signed-off-by: Anna Schumaker net/sunrpc/sunrpc_syms.c | 3 +++ 1 file changed, 3 insertions(+) commit b0b5352d9a507b344d4a2aec21f0105c585251fe Author: Vasily Averin Date: Sun Nov 12 11:48:16 2017 +0300 nfs client: exit_net cleanup check added Be sure that nfs_client_list and nfs_volume_list lists initialized in net_init hook were return to initial state in net_exit hook. Signed-off-by: Vasily Averin Signed-off-by: Anna Schumaker fs/nfs/inode.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0671d8f108762efc51ca893dbf8f0ba72f655c3d Author: Markus Elfring Date: Tue Nov 7 08:51:00 2017 +0100 nfs/write: Use common error handling code in nfs_lock_and_join_requests() Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Anna Schumaker fs/nfs/write.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit fcd8843c406b46433857ae45e5e9d84b01a7d20b Author: Trond Myklebust Date: Tue Nov 7 12:39:44 2017 -0500 NFSv4: Replace closed stateids with the "invalid special stateid" When decoding a CLOSE, replace the stateid returned by the server with the "invalid special stateid" described in RFC5661, Section 8.2.3. In nfs_set_open_stateid_locked, ignore stateids from closed state. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4_fs.h | 1 + fs/nfs/nfs4state.c | 8 ++++++++ fs/nfs/nfs4xdr.c | 12 +++++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) commit e1fff5df6e04818c711882d40f06e97891bca36e Author: Trond Myklebust Date: Tue Nov 7 13:10:46 2017 -0500 NFSv4: nfs_set_open_stateid must not trigger state recovery for closed state In nfs_set_open_stateid_locked, we must ignore stateids from closed state. Reported-by: Andrew W Elble Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 46280d9d3de67f64c5bd30a7bbdc372d69f38d98 Author: Trond Myklebust Date: Mon Nov 6 15:28:11 2017 -0500 NFSv4: Check the open stateid when searching for expired state Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4state.c | 5 +++++ 1 file changed, 5 insertions(+) commit 140087fdf65b271055de1e1669c8016a908b6a85 Author: Trond Myklebust Date: Mon Nov 6 15:28:10 2017 -0500 NFSv4: Clean up nfs4_delegreturn_done Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) commit 91b30d2e7f303dee9cdd11010e9058bc9124bc57 Author: Trond Myklebust Date: Mon Nov 6 15:28:09 2017 -0500 NFSv4: cleanup nfs4_close_done Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) commit ff90514ebf96695b937a116b860ff214a8d4a2ac Author: Trond Myklebust Date: Mon Nov 6 15:28:08 2017 -0500 NFSv4: Retry NFS4ERR_OLD_STATEID errors in layoutreturn If our layoutreturn returns an NFS4ERR_OLD_STATEID, then try to update the stateid and retry. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 7380020e77b61361207420e78a9da925bc79ab4b Author: Trond Myklebust Date: Mon Nov 6 15:28:07 2017 -0500 pNFS: Retry NFS4ERR_OLD_STATEID errors in layoutreturn-on-close If our layoutreturn on close operation returns an NFS4ERR_OLD_STATEID, then try to update the stateid and retry. We know that there should be no further LAYOUTGET requests being launched. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 18 ++++++++++++++++-- fs/nfs/pnfs.c | 18 ++++++++++++++++++ fs/nfs/pnfs.h | 6 ++++++ 3 files changed, 40 insertions(+), 2 deletions(-) commit c82bac6f4b2af18dcb392b10e80c809ee17b2b1b Author: Trond Myklebust Date: Mon Nov 6 15:28:06 2017 -0500 NFSv4: Don't try to CLOSE if the stateid 'other' field has changed If the stateid is no longer recognised on the server, either due to a restart, or due to a competing CLOSE call, then we do not have to retry. Any open contexts that triggered a reopen of the file, will also act as triggers for any CLOSE for the updated stateids. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4_fs.h | 2 ++ fs/nfs/nfs4proc.c | 14 ++++---------- fs/nfs/nfs4state.c | 9 +++++++-- 3 files changed, 13 insertions(+), 12 deletions(-) commit 12f275cdd1638a163b77b3d65625fc14a81dab2b Author: Trond Myklebust Date: Mon Nov 6 15:28:05 2017 -0500 NFSv4: Retry CLOSE and DELEGRETURN on NFS4ERR_OLD_STATEID. If we're racing with an OPEN, then retry the operation instead of declaring it a success. Signed-off-by: Trond Myklebust [Andrew W Elble: Fix a typo in nfs4_refresh_open_stateid] Signed-off-by: Anna Schumaker fs/nfs/delegation.c | 27 +++++++++++++++++++++++++++ fs/nfs/delegation.h | 1 + fs/nfs/nfs4_fs.h | 2 ++ fs/nfs/nfs4proc.c | 21 +++++++++++++++++++-- fs/nfs/nfs4state.c | 16 ++++++++++++++++ 5 files changed, 65 insertions(+), 2 deletions(-) commit d803224c84be067754db7fa58a93f36f61566493 Author: Trond Myklebust Date: Mon Nov 6 15:28:04 2017 -0500 NFS: Fix a typo in nfs_rename() On successful rename, the "old_dentry" is retained and is attached to the "new_dir", so we need to call nfs_set_verifier() accordingly. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8fd1ab747d2b1ec7ec663ad0b41a32eaa35117a8 Author: Trond Myklebust Date: Mon Nov 6 15:28:03 2017 -0500 NFSv4: Fix open create exclusive when the server reboots If the server that does not implement NFSv4.1 persistent session semantics reboots while we are performing an exclusive create, then the return value of NFS4ERR_DELAY when we replay the open during the grace period causes us to lose the verifier. When the grace period expires, and we present a new verifier, the server will then correctly reply NFS4ERR_EXIST. This commit ensures that we always present the same verifier when replaying the OPEN. Reported-by: Tigran Mkrtchyan Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) commit ad9e02dc026b75069f6a336e0daf2d54925967b6 Author: Trond Myklebust Date: Mon Nov 6 15:28:02 2017 -0500 NFSv4: Add a tracepoint to document open stateid updates Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 3 +++ fs/nfs/nfs4trace.h | 2 ++ 2 files changed, 5 insertions(+) commit c9399f21c215453b414702758b8c4b7d66605eac Author: Trond Myklebust Date: Mon Nov 6 15:28:01 2017 -0500 NFSv4: Fix OPEN / CLOSE race Ben Coddington has noted the following race between OPEN and CLOSE on a single client. Process 1 Process 2 Server ========= ========= ====== 1) OPEN file 2) OPEN file 3) Process OPEN (1) seqid=1 4) Process OPEN (2) seqid=2 5) Reply OPEN (2) 6) Receive reply (2) 7) new stateid, seqid=2 8) CLOSE file, using stateid w/ seqid=2 9) Reply OPEN (1) 10( Process CLOSE (8) 11) Reply CLOSE (8) 12) Forget stateid file closed 13) Receive reply (7) 14) Forget stateid file closed. 15) Receive reply (1). 16) New stateid seqid=1 is really the same stateid that was closed. IOW: the reply to the first OPEN is delayed. Since "Process 2" does not wait before closing the file, and it does not cache the closed stateid, then when the delayed reply is finally received, it is treated as setting up a new stateid by the client. The fix is to ensure that the client processes the OPEN and CLOSE calls in the same order in which the server processed them. This commit ensures that we examine the seqid of the stateid returned by OPEN. If it is a new stateid, we assume the seqid must be equal to the value 1, and that each state transition increments the seqid value by 1 (See RFC7530, Section 9.1.4.2, and RFC5661, Section 8.2.2). If the tracker sees that an OPEN returns with a seqid that is greater than the cached seqid + 1, then it bumps a flag to ensure that the caller waits for the RPCs carrying the missing seqids to complete. Note that there can still be pathologies where the server crashes before it can even send us the missing seqids. Since the OPEN call is still holding a slot when it waits here, that could cause the recovery to stall forever. To avoid that, we time out after a 5 second wait. Reported-by: Benjamin Coddington Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4_fs.h | 3 ++ fs/nfs/nfs4proc.c | 154 +++++++++++++++++++++++++++++++++++++++++------------ fs/nfs/nfs4state.c | 1 + 3 files changed, 123 insertions(+), 35 deletions(-) commit c435da68b6d1adc71d46b7833bf2c568e4420839 Author: Chuck Lever Date: Fri Nov 3 13:46:14 2017 -0400 sunrpc: Add rpc_request static trace point Display information about the RPC procedure being requested in the trace log. This sometimes critical information cannot always be derived from other RPC trace entries. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/trace/events/sunrpc.h | 30 ++++++++++++++++++++++++++++++ net/sunrpc/clnt.c | 3 +-- 2 files changed, 31 insertions(+), 2 deletions(-) commit b2bfe5915d5fe7577221031a39ac722a0a2a1199 Author: Chuck Lever Date: Fri Nov 3 13:46:06 2017 -0400 sunrpc: Fix rpc_task_begin trace point The rpc_task_begin trace point always display a task ID of zero. Move the trace point call site so that it picks up the new task ID. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/sched.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a30ccf1a9eb8c01f37675758f6359a968193d96e Author: Chuck Lever Date: Fri Oct 20 10:35:18 2017 -0400 SUNRPC: Fix parsing failure in trace points with XIDs mount.nf-11159 8.... 905.248380: xprt_transmit: [FAILED TO PARSE] xid=351291440 status=0 addr=192.168.2.5 port=20049 mount.nf-11159 8.... 905.248381: rpc_task_sleep: task:6210@1 flags=0e80 state=0005 status=0 timeout=60000 queue=xprt_pending kworker/-1591 1.... 905.248419: xprt_lookup_rqst: [FAILED TO PARSE] xid=351291440 status=0 addr=192.168.2.5 port=20049 kworker/-1591 1.... 905.248423: xprt_complete_rqst: [FAILED TO PARSE] xid=351291440 status=24 addr=192.168.2.5 port=20049 Byte swapping is not available during trace-cmd report. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/trace/events/sunrpc.h | 49 ++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 24 deletions(-) commit e9d476393504ff0f9ab38d88d7857ec6a2c81ff6 Author: Gustavo A. R. Silva Date: Fri Oct 20 11:48:30 2017 -0500 net: sunrpc: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Anna Schumaker net/sunrpc/clnt.c | 11 +++++++++++ net/sunrpc/xprt.c | 1 + net/sunrpc/xprtsock.c | 4 ++++ 3 files changed, 16 insertions(+) commit 6089dd0d731028531fb1148be9fd33274ff90da4 Author: Thomas Meyer Date: Sat Oct 7 16:02:21 2017 +0200 NFS: Fix bool initialization/comparison Bool initializations should use true and false. Bool tests don't need comparisons. Signed-off-by: Thomas Meyer Signed-off-by: Anna Schumaker fs/nfs/callback_proc.c | 2 +- fs/nfs/dir.c | 10 +++++----- fs/nfs/nfs4client.c | 2 +- fs/nfs/pnfs.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) commit 3944369db701f075092357b511fd9f5755771585 Author: Anna Schumaker Date: Wed Nov 1 15:48:43 2017 -0400 NFS: Avoid RCU usage in tracepoints There isn't an obvious way to acquire and release the RCU lock during a tracepoint, so we can't use the rpc_peeraddr2str() function here. Instead, rely on the client's cl_hostname, which should have similar enough information without needing an rcu_dereference(). Reported-by: Dave Jones Cc: stable@vger.kernel.org # v3.12 Signed-off-by: Anna Schumaker fs/nfs/nfs4trace.h | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) commit 62b56a675565a2e40f2cdf50455977448fd87413 Author: Chuck Lever Date: Mon Oct 30 16:22:14 2017 -0400 xprtrdma: Update copyright notices Credit work contributed by Oracle engineers since 2014. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker include/linux/sunrpc/rpc_rdma.h | 1 + net/sunrpc/xprtrdma/rpc_rdma.c | 1 + net/sunrpc/xprtrdma/transport.c | 1 + net/sunrpc/xprtrdma/verbs.c | 1 + net/sunrpc/xprtrdma/xprt_rdma.h | 1 + 5 files changed, 5 insertions(+) commit 1b746c1e9c1c9eea9eab9e3c1879281614717b28 Author: Chuck Lever Date: Mon Oct 30 16:22:06 2017 -0400 xprtrdma: Remove include for linux/prefetch.h Clean up. This include should have been removed by commit 23826c7aeac7 ("xprtrdma: Serialize credit accounting again"). Signed-off-by: Chuck Lever Reviewed-by: Devesh Sharma Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 1 - 1 file changed, 1 deletion(-) commit 2232df5ece121fd7049ccff95cbb3acfab278d75 Author: Chuck Lever Date: Mon Oct 30 16:21:57 2017 -0400 rpcrdma: Remove C structure definitions of XDR data items Clean up: C-structure style XDR encoding and decoding logic has been replaced over the past several merge windows on both the client and server. These data structures are no longer used. Signed-off-by: Chuck Lever Reviewed-by: Devesh Sharma Signed-off-by: Anna Schumaker include/linux/sunrpc/rpc_rdma.h | 59 ----------------------------------------- net/sunrpc/xprtrdma/rpc_rdma.c | 6 ++--- net/sunrpc/xprtrdma/xprt_rdma.h | 6 ----- 3 files changed, 3 insertions(+), 68 deletions(-) commit a4699f5647f369e8ab7ec56b7cd98580c933c3f3 Author: Chuck Lever Date: Mon Oct 30 16:21:49 2017 -0400 xprtrdma: Put Send CQ in IB_POLL_WORKQUEUE mode Lift the Send and LocalInv completion handlers out of soft IRQ mode to make room for other work. Also, move the Send CQ to a different CPU than the CPU where the Receive CQ is running, for improved scalability. Signed-off-by: Chuck Lever Reviewed-by: Devesh Sharma Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b04a23421bf63d3fde3227041b31e39cb5b5349d Merge: 5a3e0b1 d976807 Author: Linus Torvalds Date: Fri Nov 17 13:36:59 2017 -0800 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs updates from Miklos Szeredi: - Report constant st_ino values across copy-up even if underlying layers are on different filesystems, but using different st_dev values for each layer. Ideally we'd report the same st_dev across the overlay, and it's possible to do for filesystems that use only 32bits for st_ino by unifying the inum space. It would be nice if it wasn't a choice of 32 or 64, rather filesystems could report their current maximum (that could change on resize, so it wouldn't be set in stone). - miscellaneus fixes and a cleanup of ovl_fill_super(), that was long overdue. - created a path_put_init() helper that clears out the pointers after putting the ref. I think this could be useful elsewhere, so added it to * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: (30 commits) ovl: remove unneeded arg from ovl_verify_origin() ovl: Put upperdentry if ovl_check_origin() fails ovl: rename ufs to ofs ovl: clean up getting lower layers ovl: clean up workdir creation ovl: clean up getting upper layer ovl: move ovl_get_workdir() and ovl_get_lower_layers() ovl: reduce the number of arguments for ovl_workdir_create() ovl: change order of setup in ovl_fill_super() ovl: factor out ovl_free_fs() helper ovl: grab reference to workbasedir early ovl: split out ovl_get_indexdir() from ovl_fill_super() ovl: split out ovl_get_lower_layers() from ovl_fill_super() ovl: split out ovl_get_workdir() from ovl_fill_super() ovl: split out ovl_get_upper() from ovl_fill_super() ovl: split out ovl_get_lowerstack() from ovl_fill_super() ovl: split out ovl_get_workpath() from ovl_fill_super() ovl: split out ovl_get_upperpath() from ovl_fill_super() ovl: use path_put_init() in error paths for ovl_fill_super() vfs: add path_put_init() ... commit 5a3e0b196bbd63759e9eba836fc7ed16d1f2a1c1 Merge: cbda1b2 4d2dc2c Author: Linus Torvalds Date: Fri Nov 17 13:21:58 2017 -0800 Merge tag 'locks-v4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull file locking update from Jeff Layton: "A couple of fixes for a patch that went into v4.14, and the bug report just came in a few days ago.. It passes my (minimal) testing, and has been in linux-next for a few days now. I also would like to get my address changed in MAINTAINERS to clear that hurdle" * tag 'locks-v4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: fcntl: don't cap l_start and l_end values for F_GETLK64 in compat syscall fcntl: don't leak fd reference when fixup_compat_flock fails MAINTAINERS: s/jlayton@poochiereds.net/jlayton@kernel.org/ commit cbda1b270f7ac23665f25fa513d2a73ea7149cbe Merge: ca5b857 8d59598 Author: Linus Torvalds Date: Fri Nov 17 13:20:41 2017 -0800 Merge branch 'work.cramfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull cramfs updates from Al Viro: "Nicolas Pitre's cramfs work" * 'work.cramfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: cramfs: rehabilitate it cramfs: add mmap support cramfs: implement uncompressed and arbitrary data block positioning cramfs: direct memory access support commit ca5b857cb0f42986520abd9dbb0c2508067342b2 Merge: a0e136e c02b1a9 Author: Linus Torvalds Date: Fri Nov 17 12:54:01 2017 -0800 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs updates from Al Viro: "Assorted stuff, really no common topic here" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: vfs: grab the lock instead of blocking in __fd_install during resizing vfs: stop clearing close on exec when closing a fd include/linux/fs.h: fix comment about struct address_space fs: make fiemap work from compat_ioctl coda: fix 'kernel memory exposure attempt' in fsync pstore: remove unneeded unlikely() vfs: remove unneeded unlikely() stubs for mount_bdev() and kill_block_super() in !CONFIG_BLOCK case make vfs_ustat() static do_handle_open() should be static elf_fdpic: fix unused variable warning fold destroy_super() into __put_super() new helper: destroy_unused_super() fix address space warnings in ipc/ acct.h: get rid of detritus commit a0e136e5da98f10ecb41a673374a04102af45e2b Merge: 16382e1 7747871 Author: Linus Torvalds Date: Fri Nov 17 12:38:51 2017 -0800 Merge branch 'work.get_user_pages_fast' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull get_user_pages_fast() conversion from Al Viro: "A bunch of places switched to get_user_pages_fast()" * 'work.get_user_pages_fast' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: ceph: use get_user_pages_fast() pvr2fs: use get_user_pages_fast() atomisp: use get_user_pages_fast() st: use get_user_pages_fast() via_dmablit(): use get_user_pages_fast() fsl_hypervisor: switch to get_user_pages_fast() rapidio: switch to get_user_pages_fast() vchiq_2835_arm: switch to get_user_pages_fast() commit 16382e17c0ff583df2d5eed56ca7c771d637e9d1 Merge: 93f30c7 cfe057f Author: Linus Torvalds Date: Fri Nov 17 12:08:18 2017 -0800 Merge branch 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull iov_iter updates from Al Viro: - bio_{map,copy}_user_iov() series; those are cleanups - fixes from the same pile went into mainline (and stable) in late September. - fs/iomap.c iov_iter-related fixes - new primitive - iov_iter_for_each_range(), which applies a function to kernel-mapped segments of an iov_iter. Usable for kvec and bvec ones, the latter does kmap()/kunmap() around the callback. _Not_ usable for iovec- or pipe-backed iov_iter; the latter is not hard to fix if the need ever appears, the former is by design. Another related primitive will have to wait for the next cycle - it passes page + offset + size instead of pointer + size, and that one will be usable for everything _except_ kvec. Unfortunately, that one didn't get exposure in -next yet, so... - a bit more lustre iov_iter work, including a use case for iov_iter_for_each_range() (checksum calculation) - vhost/scsi leak fix in failure exit - misc cleanups and detritectomy... * 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (21 commits) iomap_dio_actor(): fix iov_iter bugs switch ksocknal_lib_recv_...() to use of iov_iter_for_each_range() lustre: switch struct ksock_conn to iov_iter vhost/scsi: switch to iov_iter_get_pages() fix a page leak in vhost_scsi_iov_to_sgl() error recovery new primitive: iov_iter_for_each_range() lnet_return_rx_credits_locked: don't abuse list_entry xen: don't open-code iov_iter_kvec() orangefs: remove detritus from struct orangefs_kiocb_s kill iov_shorten() bio_alloc_map_data(): do bmd->iter setup right there bio_copy_user_iov(): saner bio size calculation bio_map_user_iov(): get rid of copying iov_iter bio_copy_from_iter(): get rid of copying iov_iter move more stuff down into bio_copy_user_iov() blk_rq_map_user_iov(): move iov_iter_advance() down bio_map_user_iov(): get rid of the iov_for_each() bio_map_user_iov(): move alignment check into the main loop don't rely upon subsequent bio_add_pc_page() calls failing ... and with iov_iter_get_pages_alloc() it becomes even simpler ... commit 18c437caa5b18a235dd65cec224eab54bebcee65 Author: Alex Deucher Date: Tue Nov 14 17:19:29 2017 -0500 Revert "drm/radeon: dont switch vt on suspend" Fixes distorted colors on some cards on resume from suspend. This reverts commit b9729b17a414f99c61f4db9ac9f9ed987fa0cbfe. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98832 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99163 Bug: https://bugzilla.kernel.org/show_bug.cgi?id=107001 Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_fb.c | 1 - 1 file changed, 1 deletion(-) commit eb174c77e258f93b0f1046afd23a0aede68be3f2 Author: Roger He Date: Fri Nov 17 12:45:18 2017 +0800 drm/amd/amdgpu: fix over-bound accessing in amdgpu_cs_wait_any_fence Fixes an oops in amdgpu_cs_wait_any_fence. Reviewed-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93f30c73ecd0281cf3685ef0e4e384980a176176 Merge: 06ede5f 9627165 Author: Linus Torvalds Date: Fri Nov 17 11:54:55 2017 -0800 Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull compat and uaccess updates from Al Viro: - {get,put}_compat_sigset() series - assorted compat ioctl stuff - more set_fs() elimination - a few more timespec64 conversions - several removals of pointless access_ok() in places where it was followed only by non-__ variants of primitives * 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (24 commits) coredump: call do_unlinkat directly instead of sys_unlink fs: expose do_unlinkat for built-in callers ext4: take handling of EXT4_IOC_GROUP_ADD into a helper, get rid of set_fs() ipmi: get rid of pointless access_ok() pi433: sanitize ioctl cxlflash: get rid of pointless access_ok() mtdchar: get rid of pointless access_ok() r128: switch compat ioctls to drm_ioctl_kernel() selection: get rid of field-by-field copyin VT_RESIZEX: get rid of field-by-field copyin i2c compat ioctls: move to ->compat_ioctl() sched_rr_get_interval(): move compat to native, get rid of set_fs() mips: switch to {get,put}_compat_sigset() sparc: switch to {get,put}_compat_sigset() s390: switch to {get,put}_compat_sigset() ppc: switch to {get,put}_compat_sigset() parisc: switch to {get,put}_compat_sigset() get_compat_sigset() get rid of {get,put}_compat_itimerspec() io_getevents: Use timespec64 to represent timeouts ... commit 06ede5f6086757f746b7be860ae76137f4e95032 Merge: a3841f9 62530ed Author: Linus Torvalds Date: Fri Nov 17 10:56:56 2017 -0800 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull more block layer updates from Jens Axboe: "A followup pull request, with some parts that either needed a bit more testing before going in, merge sync, or just later arriving fixes. This contains: - Timer related updates from Kees. These were purposefully delayed since I didn't want to pull in a later v4.14-rc tag to my block tree. - ide-cd prep sense buffer fix from Bart. Also delayed, as not to clash with the late fix we put into 4.14-rc. - Small BFQ updates series from Luca and Paolo. - Single nvmet fix from James, fixing a non-functional case there. - Bio fast clone fix from Michael, which made bcache return the wrong data for some cases. - Legacy IO path regression hang fix from Ming" * 'for-linus' of git://git.kernel.dk/linux-block: bio: ensure __bio_clone_fast copies bi_partno nvmet_fc: fix better length checking block: wake up all tasks blocked in get_request() block, bfq: move debug blkio stats behind CONFIG_DEBUG_BLK_CGROUP block, bfq: update blkio stats outside the scheduler lock block, bfq: add missing invocations of bfqg_stats_update_io_add/remove doc, block, bfq: update max IOPS sustainable with BFQ ide: Make ide_cdrom_prep_fs() initialize the sense buffer pointer md: Convert timers to use timer_setup() block: swim3: Convert timers to use timer_setup() block/aoe: Convert timers to use timer_setup() amifloppy: Convert timers to use timer_setup() block/floppy: Convert callback to pass timer_list commit 212bf41d88c06afc23e03f9b274eebf1e8dba197 Author: Elena Reshetova Date: Fri Oct 20 12:53:38 2017 +0300 fs, nfs: convert nfs_client.cl_count from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable nfs_client.cl_count is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: Anna Schumaker fs/nfs/client.c | 10 +++++----- fs/nfs/filelayout/filelayout.c | 12 ++++++------ fs/nfs/flexfilelayout/flexfilelayout.c | 12 ++++++------ fs/nfs/nfs4client.c | 10 +++++----- fs/nfs/nfs4proc.c | 12 ++++++------ fs/nfs/nfs4state.c | 6 +++--- include/linux/nfs_fs_sb.h | 3 ++- 7 files changed, 33 insertions(+), 32 deletions(-) commit 2f62b5aa4814be2c511553fd6afb4d35b6c2503b Author: Elena Reshetova Date: Fri Oct 20 12:53:37 2017 +0300 fs, nfs: convert nfs_lock_context.count from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable nfs_lock_context.count is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: Anna Schumaker fs/nfs/inode.c | 12 ++++++------ include/linux/nfs_fs.h | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) commit 194bc1f48100a3b6fbd50d7a2218b594f0c564b6 Author: Elena Reshetova Date: Fri Oct 20 12:53:36 2017 +0300 fs, nfs: convert nfs4_lock_state.ls_count from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable nfs4_lock_state.ls_count is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: Anna Schumaker fs/nfs/nfs4_fs.h | 2 +- fs/nfs/nfs4proc.c | 6 +++--- fs/nfs/nfs4state.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) commit 0896cade1224f167296c786043e9bdc0ca63d392 Author: Elena Reshetova Date: Fri Oct 20 12:53:35 2017 +0300 fs, nfs: convert nfs_cache_defer_req.count from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable nfs_cache_defer_req.count is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: Anna Schumaker fs/nfs/cache_lib.c | 6 +++--- fs/nfs/cache_lib.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 81a090b9975b89ca15e71d0bca945358f6fe7696 Author: Elena Reshetova Date: Fri Oct 20 12:53:34 2017 +0300 fs, nfs: convert nfs4_ff_layout_mirror.ref from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable nfs4_ff_layout_mirror.ref is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: Anna Schumaker fs/nfs/flexfilelayout/flexfilelayout.c | 8 ++++---- fs/nfs/flexfilelayout/flexfilelayout.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) commit 2b28a7bee4539d27f4ec3b0298f03bfd83d4f794 Author: Elena Reshetova Date: Fri Oct 20 12:53:33 2017 +0300 fs, nfs: convert pnfs_layout_hdr.plh_refcount from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable pnfs_layout_hdr.plh_refcount is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: Anna Schumaker fs/nfs/pnfs.c | 12 ++++++------ fs/nfs/pnfs.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit eba6dd691743a9d7a57735f36bf6946fc58878ec Author: Elena Reshetova Date: Fri Oct 20 12:53:32 2017 +0300 fs, nfs: convert pnfs_layout_segment.pls_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: Anna Schumaker fs/nfs/pnfs.c | 12 ++++++------ fs/nfs/pnfs.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) commit a2a5dea7b6cb77365ed9c987f54d160668c8a95f Author: Elena Reshetova Date: Fri Oct 20 12:53:31 2017 +0300 fs, nfs: convert nfs4_pnfs_ds.ds_count from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable nfs4_pnfs_ds.ds_count is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: Anna Schumaker fs/nfs/pnfs.h | 3 ++- fs/nfs/pnfs_nfs.c | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) commit 3be0f80b5fe9c16eca2d538f799b94ca8aa59433 Author: Trond Myklebust Date: Thu Oct 19 15:46:45 2017 -0400 NFSv4.1: Fix up replays of interrupted requests If the previous request on a slot was interrupted before it was processed by the server, then our slot sequence number may be out of whack, and so we try the next operation using the old sequence number. The problem with this, is that not all servers check to see that the client is replaying the same operations as previously when they decide to go to the replay cache, and so instead of the expected error of NFS4ERR_SEQ_FALSE_RETRY, we get a replay of the old reply, which could (if the operations match up) be mistaken by the client for a new reply. To fix this, we attempt to send a COMPOUND containing only the SEQUENCE op in order to resync our slot sequence number. Cc: Olga Kornievskaia [olga.kornievskaia@gmail.com: fix an Oops] Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4_fs.h | 2 +- fs/nfs/nfs4proc.c | 148 +++++++++++++++++++++++++++++++++++++----------------- 2 files changed, 103 insertions(+), 47 deletions(-) commit 6f0afc28257dfa769c210f8f8da0f21d77e7452f Author: Chuck Lever Date: Fri Oct 20 10:48:45 2017 -0400 xprtrdma: Remove atomic send completion counting The sendctx circular queue now guarantees that xprtrdma cannot overflow the Send Queue, so remove the remaining bits of the original Send WQE counting mechanism. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/frwr_ops.c | 8 -------- net/sunrpc/xprtrdma/verbs.c | 4 ---- net/sunrpc/xprtrdma/xprt_rdma.h | 21 --------------------- 3 files changed, 33 deletions(-) commit 01bb35c89d90abe6fd1c0be001f84bbdfa7fa7d1 Author: Chuck Lever Date: Fri Oct 20 10:48:36 2017 -0400 xprtrdma: RPC completion should wait for Send completion When an RPC Call includes a file data payload, that payload can come from pages in the page cache, or a user buffer (for direct I/O). If the payload can fit inline, xprtrdma includes it in the Send using a scatter-gather technique. xprtrdma mustn't allow the RPC consumer to re-use the memory where that payload resides before the Send completes. Otherwise, the new contents of that memory would be exposed by an HCA retransmit of the Send operation. So, block RPC completion on Send completion, but only in the case where a separate file data payload is part of the Send. This prevents the reuse of that memory while it is still part of a Send operation without an undue cost to other cases. Waiting is avoided in the common case because typically the Send will have completed long before the RPC Reply arrives. These days, an RPC timeout will trigger a disconnect, which tears down the QP. The disconnect flushes all waiting Sends. This bounds the amount of time the reply handler has to wait for a Send completion. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 26 +++++++++++++++++++++++++- net/sunrpc/xprtrdma/transport.c | 5 +++-- net/sunrpc/xprtrdma/verbs.c | 3 ++- net/sunrpc/xprtrdma/xprt_rdma.h | 4 ++++ 4 files changed, 34 insertions(+), 4 deletions(-) commit 0ba6f37012db2f88f881cd818aec6e1886f61abb Author: Chuck Lever Date: Fri Oct 20 10:48:28 2017 -0400 xprtrdma: Refactor rpcrdma_deferred_completion Invoke a common routine for releasing hardware resources (for example, invalidating MRs). This needs to be done whether an RPC Reply has arrived or the RPC was terminated early. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 26 ++++++++++++++++---------- net/sunrpc/xprtrdma/transport.c | 6 +++--- net/sunrpc/xprtrdma/xprt_rdma.h | 3 +++ 3 files changed, 22 insertions(+), 13 deletions(-) commit 531cca0c9b17c185377fd081b43ffca953cfecad Author: Chuck Lever Date: Fri Oct 20 10:48:20 2017 -0400 xprtrdma: Add a field of bit flags to struct rpcrdma_req We have one boolean flag in rpcrdma_req today. I'd like to add more flags, so convert that boolean to a bit flag. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/backchannel.c | 2 +- net/sunrpc/xprtrdma/transport.c | 2 +- net/sunrpc/xprtrdma/verbs.c | 1 - net/sunrpc/xprtrdma/xprt_rdma.h | 7 ++++++- 4 files changed, 8 insertions(+), 4 deletions(-) commit ae72950abf99fb250aca972b3451b6e06a096c68 Author: Chuck Lever Date: Fri Oct 20 10:48:12 2017 -0400 xprtrdma: Add data structure to manage RDMA Send arguments Problem statement: Recently Sagi Grimberg observed that kernel RDMA- enabled storage initiators don't handle delayed Send completion correctly. If Send completion is delayed beyond the end of a ULP transaction, the ULP may release resources that are still being used by the HCA to complete a long-running Send operation. This is a common design trait amongst our initiators. Most Send operations are faster than the ULP transaction they are part of. Waiting for a completion for these is typically unnecessary. Infrequently, a network partition or some other problem crops up where an ordering problem can occur. In NFS parlance, the RPC Reply arrives and completes the RPC, but the HCA is still retrying the Send WR that conveyed the RPC Call. In this case, the HCA can try to use memory that has been invalidated or DMA unmapped, and the connection is lost. If that memory has been re-used for something else (possibly not related to NFS), and the Send retransmission exposes that data on the wire. Thus we cannot assume that it is safe to release Send-related resources just because a ULP reply has arrived. After some analysis, we have determined that the completion housekeeping will not be difficult for xprtrdma: - Inline Send buffers are registered via the local DMA key, and are already left DMA mapped for the lifetime of a transport connection, thus no additional handling is necessary for those - Gathered Sends involving page cache pages _will_ need to DMA unmap those pages after the Send completes. But like inline send buffers, they are registered via the local DMA key, and thus will not need to be invalidated In addition, RPC completion will need to wait for Send completion in the latter case. However, nearly always, the Send that conveys the RPC Call will have completed long before the RPC Reply arrives, and thus no additional latency will be accrued. Design notes: In this patch, the rpcrdma_sendctx object is introduced, and a lock-free circular queue is added to manage a set of them per transport. The RPC client's send path already prevents sending more than one RPC Call at the same time. This allows us to treat the consumer side of the queue (rpcrdma_sendctx_get_locked) as if there is a single consumer thread. The producer side of the queue (rpcrdma_sendctx_put_locked) is invoked only from the Send completion handler, which is a single thread of execution (soft IRQ). The only care that needs to be taken is with the tail index, which is shared between the producer and consumer. Only the producer updates the tail index. The consumer compares the head with the tail to ensure that the a sendctx that is in use is never handed out again (or, expressed more conventionally, the queue is empty). When the sendctx queue empties completely, there are enough Sends outstanding that posting more Send operations can result in a Send Queue overflow. In this case, the ULP is told to wait and try again. This introduces strong Send Queue accounting to xprtrdma. As a final touch, Jason Gunthorpe suggested a mechanism that does not require signaling every Send. We signal once every N Sends, and perform SGE unmapping of N Send operations during that one completion. Reported-by: Sagi Grimberg Suggested-by: Jason Gunthorpe Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 40 +++++---- net/sunrpc/xprtrdma/transport.c | 6 +- net/sunrpc/xprtrdma/verbs.c | 195 ++++++++++++++++++++++++++++++++++++++-- net/sunrpc/xprtrdma/xprt_rdma.h | 38 ++++++-- 4 files changed, 247 insertions(+), 32 deletions(-) commit a062a2a3efc5fece106d96d4a5165f3f23b5cbda Author: Chuck Lever Date: Fri Oct 20 10:48:03 2017 -0400 xprtrdma: "Unoptimize" rpcrdma_prepare_hdr_sge() Commit 655fec6987be ("xprtrdma: Use gathered Send for large inline messages") assumed that, since the zeroeth element of the Send SGE array always pointed to req->rl_rdmabuf, it needed to be initialized just once. This was a valid assumption because the Send SGE array and rl_rdmabuf both live in the same rpcrdma_req. In a subsequent patch, the Send SGE array will be separated from the rpcrdma_req, so the zeroeth element of the SGE array needs to be initialized every time. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 857f9acab9343788fe59f7be3a4710131b705db4 Author: Chuck Lever Date: Fri Oct 20 10:47:55 2017 -0400 xprtrdma: Change return value of rpcrdma_prepare_send_sges() Clean up: Make rpcrdma_prepare_send_sges() return a negative errno instead of a bool. Soon callers will want distinct treatments of different types of failures. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/backchannel.c | 4 +-- net/sunrpc/xprtrdma/rpc_rdma.c | 52 ++++++++++++++++++++++++--------------- net/sunrpc/xprtrdma/xprt_rdma.h | 6 +++-- 3 files changed, 38 insertions(+), 24 deletions(-) commit 394b2c77cb761fb1382b0e97b7cdff2dd717b5ee Author: Chuck Lever Date: Fri Oct 20 10:47:47 2017 -0400 xprtrdma: Fix error handling in rpcrdma_prepare_msg_sges() When this function fails, it needs to undo the DMA mappings it's done so far. Otherwise these are leaked. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) commit ad99f0530710af72b5bbecda9e770c736e92b328 Author: Chuck Lever Date: Fri Oct 20 10:47:39 2017 -0400 xprtrdma: Clean up SGE accounting in rpcrdma_prepare_msg_sges() Clean up. rpcrdma_prepare_hdr_sge() sets num_sge to one, then rpcrdma_prepare_msg_sges() sets num_sge again to the count of SGEs it added, plus one for the header SGE just mapped in rpcrdma_prepare_hdr_sge(). This is confusing, and nails in an assumption about when these functions are called. Instead, maintain a running count that both functions can update with just the number of SGEs they have added to the SGE array. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be798f9082aa54524b209fac2c8164c81cd28f77 Author: Chuck Lever Date: Mon Oct 16 15:01:39 2017 -0400 xprtrdma: Decode credits field in rpcrdma_reply_handler We need to decode and save the incoming rdma_credits field _after_ we know that the direction of the message is "forward direction Reply". Otherwise, the credits value in reverse direction Calls is also used to update the forward direction credits. It is safe to decode the rdma_credits field in rpcrdma_reply_handler now that rpcrdma_reply_handler is single-threaded. Receives complete in the same order as they were sent on the NFS server. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 14 ++++++++++++-- net/sunrpc/xprtrdma/verbs.c | 25 +------------------------ net/sunrpc/xprtrdma/xprt_rdma.h | 2 +- 3 files changed, 14 insertions(+), 27 deletions(-) commit d8f532d20ee43a0117284798d486bc4f98e3b196 Author: Chuck Lever Date: Mon Oct 16 15:01:30 2017 -0400 xprtrdma: Invoke rpcrdma_reply_handler directly from RECV completion I noticed that the soft IRQ thread looked pretty busy under heavy I/O workloads. perf suggested one area that was expensive was the queue_work() call in rpcrdma_wc_receive. That gave me some ideas. Instead of scheduling a separate worker to process RPC Replies, promote the Receive completion handler to IB_POLL_WORKQUEUE, and invoke rpcrdma_reply_handler directly. Note that the poll workqueue is single-threaded. In order to keep memory invalidation from serializing all RPC Replies, handle any necessary invalidation tasks in a separate multi-threaded workqueue. This provides a two-tier scheme, similar to OS I/O interrupt handlers: A fast interrupt handler that schedules the slow handler and re-enables the interrupt, and a slower handler that is invoked for any needed heavy lifting. Benefits include: - One less context switch for RPCs that don't register memory - Receive completion handling is moved out of soft IRQ context to make room for other users of soft IRQ - The same CPU core now DMA syncs and XDR decodes the Receive buffer Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 46 +++++++++++++++++++++++++---------------- net/sunrpc/xprtrdma/verbs.c | 8 +++---- net/sunrpc/xprtrdma/xprt_rdma.h | 5 ++++- 3 files changed, 36 insertions(+), 23 deletions(-) commit e1352c9610e3235f5e1b159038762d0c01c6ef36 Author: Chuck Lever Date: Mon Oct 16 15:01:22 2017 -0400 xprtrdma: Refactor rpcrdma_reply_handler some more Clean up: I'd like to be able to invoke the tail of rpcrdma_reply_handler in two different places. Split the tail out into its own helper function. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 105 ++++++++++++++++++++++------------------ net/sunrpc/xprtrdma/xprt_rdma.h | 21 ++++---- 2 files changed, 69 insertions(+), 57 deletions(-) commit 5381e0ec72eeb9467796ac4181ccb7bbce6d3e81 Author: Chuck Lever Date: Mon Oct 16 15:01:14 2017 -0400 xprtrdma: Move decoded header fields into rpcrdma_rep Clean up: Make it easier to pass the decoded XID, vers, credits, and proc fields around by moving these variables into struct rpcrdma_rep. Note: the credits field will be handled in a subsequent patch. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 36 +++++++++++++++++------------------- net/sunrpc/xprtrdma/xprt_rdma.h | 3 +++ 2 files changed, 20 insertions(+), 19 deletions(-) commit 61433af56077f5fd8815281b44938d84feb04687 Author: Chuck Lever Date: Mon Oct 16 15:01:06 2017 -0400 xprtrdma: Throw away reply when version is unrecognized A reply with an unrecognized value in the version field means the transport header is potentially garbled and therefore all the fields are untrustworthy. Fixes: 59aa1f9a3cce3 ("xprtrdma: Properly handle RDMA_ERROR ... ") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/rpc_rdma.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit a3841f94c7ecb3ede0f888d3fcfe8fb6368ddd7a Merge: adeba81 4247f24 Author: Linus Torvalds Date: Fri Nov 17 09:51:57 2017 -0800 Merge tag 'libnvdimm-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm and dax updates from Dan Williams: "Save for a few late fixes, all of these commits have shipped in -next releases since before the merge window opened, and 0day has given a build success notification. The ext4 touches came from Jan, and the xfs touches have Darrick's reviewed-by. An xfstest for the MAP_SYNC feature has been through a few round of reviews and is on track to be merged. - Introduce MAP_SYNC and MAP_SHARED_VALIDATE, a mechanism to enable 'userspace flush' of persistent memory updates via filesystem-dax mappings. It arranges for any filesystem metadata updates that may be required to satisfy a write fault to also be flushed ("on disk") before the kernel returns to userspace from the fault handler. Effectively every write-fault that dirties metadata completes an fsync() before returning from the fault handler. The new MAP_SHARED_VALIDATE mapping type guarantees that the MAP_SYNC flag is validated as supported by the filesystem's ->mmap() file operation. - Add support for the standard ACPI 6.2 label access methods that replace the NVDIMM_FAMILY_INTEL (vendor specific) label methods. This enables interoperability with environments that only implement the standardized methods. - Add support for the ACPI 6.2 NVDIMM media error injection methods. - Add support for the NVDIMM_FAMILY_INTEL v1.6 DIMM commands for latch last shutdown status, firmware update, SMART error injection, and SMART alarm threshold control. - Cleanup physical address information disclosures to be root-only. - Fix revalidation of the DIMM "locked label area" status to support dynamic unlock of the label area. - Expand unit test infrastructure to mock the ACPI 6.2 Translate SPA (system-physical-address) command and error injection commands. Acknowledgements that came after the commits were pushed to -next: - 957ac8c421ad ("dax: fix PMD faults on zero-length files"): Reviewed-by: Ross Zwisler - a39e596baa07 ("xfs: support for synchronous DAX faults") and 7b565c9f965b ("xfs: Implement xfs_filemap_pfn_mkwrite() using __xfs_filemap_fault()") Reviewed-by: Darrick J. Wong " * tag 'libnvdimm-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (49 commits) acpi, nfit: add 'Enable Latch System Shutdown Status' command support dax: fix general protection fault in dax_alloc_inode dax: fix PMD faults on zero-length files dax: stop requiring a live device for dax_flush() brd: remove dax support dax: quiet bdev_dax_supported() fs, dax: unify IOMAP_F_DIRTY read vs write handling policy in the dax core tools/testing/nvdimm: unit test clear-error commands acpi, nfit: validate commands against the device type tools/testing/nvdimm: stricter bounds checking for error injection commands xfs: support for synchronous DAX faults xfs: Implement xfs_filemap_pfn_mkwrite() using __xfs_filemap_fault() ext4: Support for synchronous DAX faults ext4: Simplify error handling in ext4_dax_huge_fault() dax: Implement dax_finish_sync_fault() dax, iomap: Add support for synchronous faults mm: Define MAP_SYNC and VM_SYNC flags dax: Allow tuning whether dax_insert_mapping_entry() dirties entry dax: Allow dax_iomap_fault() to return pfn dax: Fix comment describing dax_iomap_fault() ... commit adeba81ac2a6451f44545874da3d181081f0ab04 Merge: 854ac87 74d4108 Author: Linus Torvalds Date: Fri Nov 17 09:40:12 2017 -0800 Merge tag 'for-4.15/dm-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull more device mapper updates from Mike Snitzer: "Given your expected travel I figured I'd get these fixes to you sooner rather than later. - a DM multipath stable@ fix to silence an annoying error message that isn't _really_ an error - a DM core @stable fix for discard support that was enabled for an entire DM device despite only having partial support for discards due to a mix of discard capabilities across the underlying devices. - a couple other DM core discard fixes. - a DM bufio @stable fix that resolves a 32-bit overflow" * tag 'for-4.15/dm-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm bufio: fix integer overflow when limiting maximum cache size dm: clear all discard attributes in queue_limits when discards are disabled dm: do not set 'discards_supported' in targets that do not need it dm: discard support requires all targets in a table support discards dm mpath: remove annoying message of 'blk_get_request() returned -11' commit 854ac870449fbf5c97ed2d54d3e371c7d355e7f2 Merge: cf9b077 e6e58e7 Author: Linus Torvalds Date: Fri Nov 17 09:36:18 2017 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma maintainership update from Doug Ledford: "Add Jason Gunthorpe as co-maintainer of the RDMA stack. The change is simply to add Jason Gunthorpe to the MAINTAINERS file for the RDMA stack (and update him in the .mailmap). Jason and I have talked offline, and Jason will be filing a ticket with the k.o helpdesk to get an account on k.o, and then we will likely move the rdma tree to an area where we can both access it and use a shared repo + individual topic branches + merged up for-next branch as the staging basis for each release. Timing here is nice because in the US we are headed into a holiday period whereas Jason will be around to keep the patch flow progressing (I guess Canadians do their equivalent to Thanksgiving in October, so he doesn't have an excuse to ignore email for the next week ;-))" [ .. and Konstantin already got Jason his kernel.org account between the pull request and this actual pull - Linus ] * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: RDMA: Add Jason Gunthorpe as a co-maintainer commit 29a90b70893817e2f2bb3cea40a29f5308e21b21 Author: Robin Murphy Date: Thu Sep 28 15:14:01 2017 +0100 iommu/vt-d: Fix scatterlist offset handling The intel-iommu DMA ops fail to correctly handle scatterlists where sg->offset is greater than PAGE_SIZE - the IOVA allocation is computed appropriately based on the page-aligned portion of the offset, but the mapping is set up relative to sg->page, which means it fails to actually cover the whole buffer (and in the worst case doesn't cover it at all): (sg->dma_address + sg->dma_len) ----+ sg->dma_address ---------+ | iov_pfn------+ | | | | | v v v iova: a b c d e f |--------|--------|--------|--------|--------| <...calculated....> [_____mapped______] pfn: 0 1 2 3 4 5 |--------|--------|--------|--------|--------| ^ ^ ^ | | | sg->page ----+ | | sg->offset --------------+ | (sg->offset + sg->length) ----------+ As a result, the caller ends up overrunning the mapping into whatever lies beyond, which usually goes badly: [ 429.645492] DMAR: DRHD: handling fault status reg 2 [ 429.650847] DMAR: [DMA Write] Request device [02:00.4] fault addr f2682000 ... Whilst this is a fairly rare occurrence, it can happen from the result of intermediate scatterlist processing such as scatterwalk_ffwd() in the crypto layer. Whilst that particular site could be fixed up, it still seems worthwhile to bring intel-iommu in line with other DMA API implementations in handling this robustly. To that end, fix the intel_map_sg() path to line up the mapping correctly (in units of MM pages rather than VT-d pages to match the aligned_nrpages() calculation) regardless of the offset, and use sg_phys() consistently for clarity. Reported-by: Harsh Jain Signed-off-by: Robin Murphy Reviewed by: Ashok Raj Tested by: Jacob Pan Cc: stable@vger.kernel.org Signed-off-by: Alex Williamson drivers/iommu/intel-iommu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 5f215d252496543ba22299bccef5062d30d63cfe Author: Dan Carpenter Date: Fri Nov 17 17:21:49 2017 +0100 OMAPFB: prevent buffer underflow in omapfb_parse_vram_param() We cap the upper bound of "fbnum" but we also need to check for negatives or make the type unsigned. Signed-off-by: Dan Carpenter Cc: Tomi Valkeinen Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fa1f45de8fd697d9f23050e20dd65c0998e6107 Author: Colin Ian King Date: Fri Nov 17 17:21:48 2017 +0100 video: fbdev: sm501fb: fix potential null pointer dereference on fbi The pointer fbi is dereferenced with par = fbi->par before there is a null check on fbi, hence there is a potential null pointer dereference on a null par. Fix this by moving the dereference after the null pointer check. Detected by CoverityScan, CID#1461301 ("Dereference before null check") Signed-off-by: Colin Ian King Cc: Sudip Mukherjee Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sm501fb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 62530ed8b1d07a45dec94d46e521c0c6c2d476e6 Author: Michael Lyle Date: Thu Nov 16 23:47:25 2017 -0800 bio: ensure __bio_clone_fast copies bi_partno A new field was introduced in 74d46992e0d9, bi_partno, instead of using bdev->bd_contains and encoding the partition information in the bi_bdev field. __bio_clone_fast was changed to copy the disk information, but not the partition information. At minimum, this regressed bcache and caused data corruption. Signed-off-by: Michael Lyle Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") Reported-by: Pavel Goran Reported-by: Campbell Steven Reviewed-by: Coly Li Reviewed-by: Ming Lei Cc: # 4.14 Signed-off-by: Jens Axboe block/bio.c | 1 + 1 file changed, 1 insertion(+) commit b4c0a7326f5dc0ef7a64128b0ae7d081f4b2cbd1 Author: Prarit Bhargava Date: Tue Nov 14 07:42:57 2017 -0500 x86/smpboot: Fix __max_logical_packages estimate A system booted with a small number of cores enabled per package panics because the estimate of __max_logical_packages is too low. This occurs when the total number of active cores across all packages is less than the maximum core count for a single package. e.g.: On a 4 package system with 20 cores/package where only 4 cores are enabled on each package, the value of __max_logical_packages is calculated as DIV_ROUND_UP(16 / 20) = 1 and not 4. Calculate __max_logical_packages after the cpu enumeration has completed. Use the boot cpu's data to extrapolate the number of packages. Signed-off-by: Prarit Bhargava Signed-off-by: Thomas Gleixner Cc: Tom Lendacky Cc: Andi Kleen Cc: Christian Borntraeger Cc: Peter Zijlstra Cc: Kan Liang Cc: He Chen Cc: Stephane Eranian Cc: Dave Hansen Cc: Piotr Luc Cc: Andy Lutomirski Cc: Arvind Yadav Cc: Vitaly Kuznetsov Cc: Borislav Petkov Cc: Tim Chen Cc: Mathias Krause Cc: "Kirill A. Shutemov" Link: https://lkml.kernel.org/r/20171114124257.22013-4-prarit@redhat.com arch/x86/kernel/smpboot.c | 55 +++++++++-------------------------------------- 1 file changed, 10 insertions(+), 45 deletions(-) commit 30bb9811856f667042e746d8033883b1091a46ce Author: Andi Kleen Date: Tue Nov 14 07:42:56 2017 -0500 x86/topology: Avoid wasting 128k for package id array Analyzing large early boot allocations unveiled the logical package id storage as a prominent memory waste. Since commit 1f12e32f4cd5 ("x86/topology: Create logical package id") every 64-bit system allocates a 128k array to convert logical package ids. This happens because the array is sized for MAX_LOCAL_APIC which is always 32k on 64bit systems, and it needs 4 bytes for each entry. This is fairly wasteful, especially for the common case of having only one socket, which uses exactly 4 byte out of 128K. There is no user of the package id map which is performance critical, so the lookup is not required to be O(1). Store the logical processor id in cpu_data and use a loop based lookup. To keep the mapping stable accross cpu hotplug operations, add a flag to cpu_data which is set when the CPU is brought up the first time. When the flag is set, then cpu_data is not reinitialized by copying boot_cpu_data on subsequent bringups. [ tglx: Rename the flag to 'initialized', use proper pointers instead of repeated cpu_data(x) evaluation and massage changelog. ] Signed-off-by: Andi Kleen Signed-off-by: Prarit Bhargava Signed-off-by: Thomas Gleixner Cc: Tom Lendacky Cc: Christian Borntraeger Cc: Peter Zijlstra Cc: Kan Liang Cc: He Chen Cc: Stephane Eranian Cc: Dave Hansen Cc: Piotr Luc Cc: Andy Lutomirski Cc: Arvind Yadav Cc: Vitaly Kuznetsov Cc: Borislav Petkov Cc: Tim Chen Cc: Mathias Krause Cc: "Kirill A. Shutemov" Link: https://lkml.kernel.org/r/20171114124257.22013-3-prarit@redhat.com arch/x86/include/asm/processor.h | 1 + arch/x86/kernel/smpboot.c | 73 ++++++++++++++++------------------------ 2 files changed, 30 insertions(+), 44 deletions(-) commit d46b4c1ce5f0d9a13fb2318763076442669a2bdc Author: Andi Kleen Date: Tue Nov 14 07:42:55 2017 -0500 perf/x86/intel/uncore: Cache logical pkg id in uncore driver The SNB-EP uncore driver is the only user of topology_phys_to_logical_pkg in a performance critical path. Change it query the logical pkg ID only once at initialization time and then cache it in box structure. This allows to change the logical package management without affecting the performance critical path. Signed-off-by: Andi Kleen Signed-off-by: Thomas Gleixner Signed-off-by: Prarit Bhargava Cc: Tom Lendacky Cc: Christian Borntraeger Cc: Peter Zijlstra Cc: Kan Liang Cc: He Chen Cc: Stephane Eranian Cc: Dave Hansen Cc: Piotr Luc Cc: Andy Lutomirski Cc: Arvind Yadav Cc: Vitaly Kuznetsov Cc: Borislav Petkov Cc: Tim Chen Cc: Mathias Krause Cc: "Kirill A. Shutemov" Link: https://lkml.kernel.org/r/20171114124257.22013-2-prarit@redhat.com arch/x86/events/intel/uncore.c | 4 ++-- arch/x86/events/intel/uncore.h | 2 +- arch/x86/events/intel/uncore_snbep.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 4ee2ec1b122599f7b10c849fa7915cebb37b7edb Author: Vikas C Sajjan Date: Thu Nov 16 21:43:45 2017 +0530 x86/acpi: Reduce code duplication in mp_override_legacy_irq() The new function mp_register_ioapic_irq() is a subset of the code in mp_override_legacy_irq(). Replace the code duplication by invoking mp_register_ioapic_irq() from mp_override_legacy_irq(). Signed-off-by: Vikas C Sajjan Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Cc: linux-pm@vger.kernel.org Cc: kkamagui@gmail.com Cc: linux-acpi@vger.kernel.org Link: https://lkml.kernel.org/r/1510848825-21965-3-git-send-email-vikas.cha.sajjan@hpe.com arch/x86/kernel/acpi/boot.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) commit 252714155f04c5d16989cb3aadb85fd1b5772f99 Author: Vikas C Sajjan Date: Thu Nov 16 21:43:44 2017 +0530 x86/acpi: Handle SCI interrupts above legacy space gracefully Platforms which support only IOAPIC mode, pass the SCI information above the legacy space (0-15) via the FADT mechanism and not via MADT. In such cases mp_override_legacy_irq() which is invoked from acpi_sci_ioapic_setup() to register SCI interrupts fails for interrupts greater equal 16, since it is meant to handle only the legacy space and emits error "Invalid bus_irq %u for legacy override". Add a new function to handle SCI interrupts >= 16 and invoke it conditionally in acpi_sci_ioapic_setup(). The code duplication due to this new function will be cleaned up in a separate patch. Co-developed-by: Sunil V L Signed-off-by: Vikas C Sajjan Signed-off-by: Sunil V L Signed-off-by: Thomas Gleixner Tested-by: Abdul Lateef Attar Acked-by: Rafael J. Wysocki Cc: linux-pm@vger.kernel.org Cc: kkamagui@gmail.com Cc: linux-acpi@vger.kernel.org Link: https://lkml.kernel.org/r/1510848825-21965-2-git-send-email-vikas.cha.sajjan@hpe.com arch/x86/kernel/acpi/boot.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit ac5292e9a294618cecb31109d1ba265e3d027ba2 Author: Tom Lendacky Date: Mon Nov 6 14:17:53 2017 -0600 x86/boot: Fix boot failure when SMP MP-table is based at 0 When crosvm is used to boot a kernel as a VM, the SMP MP-table is found at physical address 0x0. This causes mpf_base to be set to 0 and a subsequent "if (!mpf_base)" check in default_get_smp_config() results in the MP-table not being parsed. Further into the boot this results in an oops when attempting a read_apic_id(). Add a boolean variable that is set to true when the MP-table is found. Use this variable for testing if the MP-table was found so that even a value of 0 for mpf_base will result in continued parsing of the MP-table. Fixes: 5997efb96756 ("x86/boot: Use memremap() to map the MPF and MPC data") Reported-by: Tomeu Vizoso Signed-off-by: Tom Lendacky Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Borislav Petkov Cc: regression@leemhuis.info Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20171106201753.23059.86674.stgit@tlendack-t1.amdoffice.net arch/x86/kernel/mpparse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7b8b098c47bcf1986a6d7ecac9f44741fcae7d8c Author: Babu Moger Date: Mon Sep 18 10:53:28 2017 -0600 arch: Fix duplicates in Kconfig for parisc and sparc Fix duplicates for sparc and parisc. This was due these following commits. 1. commit 4c97a0c8fee3 ("arch: define CPU_BIG_ENDIAN for all fixed big endian archs") 2. commit 97d9f969161d ("arch/sparc: Define config parameter CPU_BIG_ENDIAN") 3. commit 74ad3d28af21 ("parisc: Define CONFIG_CPU_BIG_ENDIAN") Remove duplicates. Signed-off-by: Babu Moger Signed-off-by: Helge Deller arch/parisc/Kconfig | 3 --- arch/sparc/Kconfig | 3 --- 2 files changed, 6 deletions(-) commit bc5a768e567df51f43778da381477f6555f3824c Author: Helge Deller Date: Mon Nov 13 16:07:40 2017 +0100 parisc: Make some PDC structures accessible in uapi headers While working on a qemu and SeaBIOS-port to parisc, those PDC structures are useful to have accessible from userspace. Signed-off-by: Helge Deller arch/parisc/include/asm/pdc.h | 255 ------------------------------------ arch/parisc/include/uapi/asm/pdc.h | 256 ++++++++++++++++++++++++++++++++++++- 2 files changed, 250 insertions(+), 261 deletions(-) commit 3744d988c05a27f40408003352841aefadba1324 Author: Luc Van Oostenryck Date: Tue Oct 31 18:21:59 2017 +0100 parisc: Pass endianness info to sparse parisc is big-endian only but sparse assumes the same endianness as the building machine. This is problematic for code which expect __BYTE_ORDER__ being correctly predefined by the compiler which sparse can then pre-process differently from what gcc would. Fix this by letting sparse know about the architecture endianness. To: James Bottomley To: Helge Deller CC: linux-parisc@vger.kernel.org Signed-off-by: Luc Van Oostenryck Signed-off-by: Helge Deller arch/parisc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf7b4c1b3c92f246a535a7c792177041d0442011 Author: Helge Deller Date: Thu Sep 21 21:55:01 2017 +0200 parisc: Add CPU topology support Add topology support, including multi-core scheduler support on PA8800/PA8900 CPUs and enhanced output in /proc/cpuinfo, e.g. lscpu now reports on a single-socket, dual-core machine: Architecture: parisc64 CPU(s): 2 On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 2 Socket(s): 1 CPU family: PA-RISC 2.0 Model name: PA8800 (Mako) Signed-off-by: Helge Deller arch/parisc/Kconfig | 16 ++++ arch/parisc/include/asm/topology.h | 36 +++++++++ arch/parisc/kernel/Makefile | 4 +- arch/parisc/kernel/processor.c | 13 ++++ arch/parisc/kernel/setup.c | 2 + arch/parisc/kernel/topology.c | 153 +++++++++++++++++++++++++++++++------ 6 files changed, 198 insertions(+), 26 deletions(-) commit 05f016d2ca7a4fab99d5d5472168506ddf95e74f Author: John David Anglin Date: Sat Nov 11 17:11:16 2017 -0500 parisc: Fix validity check of pointer size argument in new CAS implementation As noted by Christoph Biedl, passing a pointer size of 4 in the new CAS implementation causes a kernel crash. The attached patch corrects the off by one error in the argument validity check. In reviewing the code, I noticed that we only perform word operations with the pointer size argument. The subi instruction intentionally uses a word condition on 64-bit kernels. Nullification was used instead of a cmpib instruction as the branch should never be taken. The shlw pseudo-operation generates a depw,z instruction and it clears the target before doing a shift left word deposit. Thus, we don't need to clip the upper 32 bits of this argument on 64-bit kernels. Tested with a gcc testsuite run with a 64-bit kernel. The gcc atomic code in libgcc is the only direct user of the new CAS implementation that I am aware of. Signed-off-by: John David Anglin Cc: stable@vger.kernel.org # 3.13+ Signed-off-by: Helge Deller arch/parisc/kernel/syscall.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3e4c9e637df1fac4123db5f3165b0034226a671b Merge: 7d5905d f8817f6 Author: Rafael J. Wysocki Date: Fri Nov 17 14:44:50 2017 +0100 Merge branch 'pm-core' * pm-core: PM / runtime: Drop children check from __pm_runtime_set_status() commit c4ad77e0d49b10b412a9fa7f47a3a23177870bc7 Author: Paolo Bonzini Date: Mon Nov 13 14:23:59 2017 +0100 KVM: vmx: use X86_CR4_UMIP and X86_FEATURE_UMIP These bits were not defined until now in common code, but they are now that the kernel supports UMIP too. Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 50a671d4d15b859f447fa527191073019b6ce9cb Author: Janakarajan Natarajan Date: Mon Nov 6 11:44:23 2017 -0600 KVM: x86: Fix CPUID function for word 6 (80000001_ECX) The function for CPUID 80000001 ECX is set to 0xc0000001. Set it to 0x80000001. Signed-off-by: Janakarajan Natarajan Reviewed-by: Jim Mattson Reviewed-by: Krish Sadhukhan Reviewed-by: Borislav Petkov Fixes: d6321d493319 ("KVM: x86: generalize guest_cpuid_has_ helpers") Signed-off-by: Radim Krčmář arch/x86/kvm/cpuid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 917dc6068bc12a2dafffcf0e9d405ddb1b8780cb Author: Liran Alon Date: Sun Nov 5 16:07:43 2017 +0200 KVM: nVMX: Fix vmx_check_nested_events() return value in case an event was reinjected to L2 vmx_check_nested_events() should return -EBUSY only in case there is a pending L1 event which requires a VMExit from L2 to L1 but such a VMExit is currently blocked. Such VMExits are blocked either because nested_run_pending=1 or an event was reinjected to L2. vmx_check_nested_events() should return 0 in case there are no pending L1 events which requires a VMExit from L2 to L1 or if a VMExit from L2 to L1 was done internally. However, upstream commit which introduced blocking in case an event was reinjected to L2 (commit acc9ab601327 ("KVM: nVMX: Fix pending events injection")) contains a bug: It returns -EBUSY even if there are no pending L1 events which requires VMExit from L2 to L1. This commit fix this issue. Fixes: acc9ab601327 ("KVM: nVMX: Fix pending events injection") Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit b200dded0a6974a3b69599832b2203483920ab25 Author: Nikita Leshenko Date: Sun Nov 5 15:52:33 2017 +0200 KVM: x86: ioapic: Preserve read-only values in the redirection table According to 82093AA (IOAPIC) manual, Remote IRR and Delivery Status are read-only. QEMU implements the bits as RO in commit 479c2a1cb7fb ("ioapic: keep RO bits for IOAPIC entry"). Signed-off-by: Nikita Leshenko Reviewed-by: Liran Alon Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Wanpeng Li Reviewed-by: Steve Rutherford Signed-off-by: Radim Krčmář arch/x86/kvm/ioapic.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a8bfec2930525808c01f038825d1df3904638631 Author: Nikita Leshenko Date: Sun Nov 5 15:52:32 2017 +0200 KVM: x86: ioapic: Clear Remote IRR when entry is switched to edge-triggered Some OSes (Linux, Xen) use this behavior to clear the Remote IRR bit for IOAPICs without an EOI register. They simulate the EOI message manually by changing the trigger mode to edge and then back to level, with the entry being masked during this. QEMU implements this feature in commit ed1263c363c9 ("ioapic: clear remote irr bit for edge-triggered interrupts") As a side effect, this commit removes an incorrect behavior where Remote IRR was cleared when the redirection table entry was rewritten. This is not consistent with the manual and also opens an opportunity for a strange behavior when a redirection table entry is modified from an interrupt handler that handles the same entry: The modification will clear the Remote IRR bit even though the interrupt handler is still running. Signed-off-by: Nikita Leshenko Reviewed-by: Liran Alon Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Wanpeng Li Reviewed-by: Steve Rutherford Signed-off-by: Radim Krčmář arch/x86/kvm/ioapic.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 7d2253684dd10eb800ee1898ad7904044ae88ed6 Author: Nikita Leshenko Date: Sun Nov 5 15:52:31 2017 +0200 KVM: x86: ioapic: Remove redundant check for Remote IRR in ioapic_set_irq Remote IRR for level-triggered interrupts was previously checked in ioapic_set_irq, but since we now have a check in ioapic_service we can remove the redundant check from ioapic_set_irq. This commit doesn't change semantics. Signed-off-by: Nikita Leshenko Reviewed-by: Liran Alon Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/kvm/ioapic.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit da3fe7bdfada217bf02ecd0477fcdb55da50944c Author: Nikita Leshenko Date: Sun Nov 5 15:52:30 2017 +0200 KVM: x86: ioapic: Don't fire level irq when Remote IRR set Avoid firing a level-triggered interrupt that has the Remote IRR bit set, because that means that some CPU is already processing it. The Remote IRR bit will be cleared after an EOI and the interrupt will refire if the irq line is still asserted. This behavior is aligned with QEMU's IOAPIC implementation that was introduced by commit f99b86b94987 ("x86: ioapic: ignore level irq during processing") in QEMU. Signed-off-by: Nikita Leshenko Reviewed-by: Liran Alon Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/kvm/ioapic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0fc5a36dd6b345eb0d251a65c236e53bead3eef7 Author: Nikita Leshenko Date: Sun Nov 5 15:52:29 2017 +0200 KVM: x86: ioapic: Fix level-triggered EOI and IOAPIC reconfigure race KVM uses ioapic_handled_vectors to track vectors that need to notify the IOAPIC on EOI. The problem is that IOAPIC can be reconfigured while an interrupt with old configuration is pending or running and ioapic_handled_vectors only remembers the newest configuration; thus EOI from the old interrupt is not delievered to the IOAPIC. A previous commit db2bdcbbbd32 ("KVM: x86: fix edge EOI and IOAPIC reconfig race") addressed this issue by adding pending edge-triggered interrupts to ioapic_handled_vectors, fixing this race for edge-triggered interrupts. The commit explicitly ignored level-triggered interrupts, but this race applies to them as well: 1) IOAPIC sends a level triggered interrupt vector to VCPU0 2) VCPU0's handler deasserts the irq line and reconfigures the IOAPIC to route the vector to VCPU1. The reconfiguration rewrites only the upper 32 bits of the IOREDTBLn register. (Causes KVM to update ioapic_handled_vectors for VCPU0 and it no longer includes the vector.) 3) VCPU0 sends EOI for the vector, but it's not delievered to the IOAPIC because the ioapic_handled_vectors doesn't include the vector. 4) New interrupts are not delievered to VCPU1 because remote_irr bit is set forever. Therefore, the correct behavior is to add all pending and running interrupts to ioapic_handled_vectors. This commit introduces a slight performance hit similar to commit db2bdcbbbd32 ("KVM: x86: fix edge EOI and IOAPIC reconfig race") for the rare case that the vector is reused by a non-IOAPIC source on VCPU0. We prefer to keep solution simple and not handle this case just as the original commit does. Fixes: db2bdcbbbd32 ("KVM: x86: fix edge EOI and IOAPIC reconfig race") Signed-off-by: Nikita Leshenko Reviewed-by: Liran Alon Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Radim Krčmář arch/x86/kvm/ioapic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6ea6e84309ca7e0e850b3083e6b09344ee15c290 Author: Paolo Bonzini Date: Fri Nov 10 10:49:38 2017 +0100 KVM: x86: inject exceptions produced by x86_decode_insn Sometimes, a processor might execute an instruction while another processor is updating the page tables for that instruction's code page, but before the TLB shootdown completes. The interesting case happens if the page is in the TLB. In general, the processor will succeed in executing the instruction and nothing bad happens. However, what if the instruction is an MMIO access? If *that* happens, KVM invokes the emulator, and the emulator gets the updated page tables. If the update side had marked the code page as non present, the page table walk then will fail and so will x86_decode_insn. Unfortunately, even though kvm_fetch_guest_virt is correctly returning X86EMUL_PROPAGATE_FAULT, x86_decode_insn's caller treats the failure as a fatal error if the instruction cannot simply be reexecuted (as is the case for MMIO). And this in fact happened sometimes when rebooting Windows 2012r2 guests. Just checking ctxt->have_exception and injecting the exception if true is enough to fix the case. Thanks to Eduardo Habkost for helping in the debugging of this issue. Reported-by: Yanan Fu Cc: Eduardo Habkost Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 2 ++ 1 file changed, 2 insertions(+) commit fab0aa3b776f0a3af1db1f50e04f1884015f9082 Author: Eyal Moscovici Date: Wed Nov 8 14:32:08 2017 +0200 KVM: x86: Allow suppressing prints on RDMSR/WRMSR of unhandled MSRs Some guests use these unhandled MSRs very frequently. This cause dmesg to be populated with lots of aggregated messages on usage of ignored MSRs. As ignore_msrs=true means that the user is well-aware his guest use ignored MSRs, allow to also disable the prints on their usage. An example of such guest is ESXi which tends to access a lot to MSR 0x34 (MSR_SMI_COUNT) very frequently. In addition, we have observed this to cause unnecessary delays to guest execution. Such an example is ESXi which experience networking delays in it's guests (L2 guests) because of these prints (even when prints are rate-limited). This can easily be reproduced by pinging from one L2 guest to another. Once in a while, a peak in ping RTT will be observed. Removing these unhandled MSR prints solves the issue. Because these prints can help diagnose issues with guests, this commit only suppress them by a module parameter instead of removing them from code entirely. Signed-off-by: Eyal Moscovici Reviewed-by: Liran Alon Reviewed-by: Krish Sadhukhan Signed-off-by: Krish Sadhukhan Signed-off-by: Konrad Rzeszutek Wilk [Changed suppress_ignore_msrs_prints to report_ignored_msrs - Radim] Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 4d772cb85f64c16eca00177089ecb3cd5d292120 Author: David Hildenbrand Date: Tue Nov 7 18:04:05 2017 +0100 KVM: x86: fix em_fxstor() sleeping while in atomic Commit 9d643f63128b ("KVM: x86: avoid large stack allocations in em_fxrstor") optimize the stack size, but introduced a guest memory access which might sleep while in atomic. Fix it by introducing, again, a second fxregs_state. Try to avoid large stacks by using noinline. Add some helpful comments. Reported by syzbot: in_atomic(): 1, irqs_disabled(): 0, pid: 2909, name: syzkaller879109 2 locks held by syzkaller879109/2909: #0: (&vcpu->mutex){+.+.}, at: [] vcpu_load+0x1c/0x70 arch/x86/kvm/../../../virt/kvm/kvm_main.c:154 #1: (&kvm->srcu){....}, at: [] vcpu_enter_guest arch/x86/kvm/x86.c:6983 [inline] #1: (&kvm->srcu){....}, at: [] vcpu_run arch/x86/kvm/x86.c:7061 [inline] #1: (&kvm->srcu){....}, at: [] kvm_arch_vcpu_ioctl_run+0x1bc2/0x58b0 arch/x86/kvm/x86.c:7222 CPU: 1 PID: 2909 Comm: syzkaller879109 Not tainted 4.13.0-rc4-next-20170811 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 ___might_sleep+0x2b2/0x470 kernel/sched/core.c:6014 __might_sleep+0x95/0x190 kernel/sched/core.c:5967 __might_fault+0xab/0x1d0 mm/memory.c:4383 __copy_from_user include/linux/uaccess.h:71 [inline] __kvm_read_guest_page+0x58/0xa0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1771 kvm_vcpu_read_guest_page+0x44/0x60 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1791 kvm_read_guest_virt_helper+0x76/0x140 arch/x86/kvm/x86.c:4407 kvm_read_guest_virt_system+0x3c/0x50 arch/x86/kvm/x86.c:4466 segmented_read_std+0x10c/0x180 arch/x86/kvm/emulate.c:819 em_fxrstor+0x27b/0x410 arch/x86/kvm/emulate.c:4022 x86_emulate_insn+0x55d/0x3c50 arch/x86/kvm/emulate.c:5471 x86_emulate_instruction+0x411/0x1ca0 arch/x86/kvm/x86.c:5698 kvm_mmu_page_fault+0x18b/0x2c0 arch/x86/kvm/mmu.c:4854 handle_ept_violation+0x1fc/0x5e0 arch/x86/kvm/vmx.c:6400 vmx_handle_exit+0x281/0x1ab0 arch/x86/kvm/vmx.c:8718 vcpu_enter_guest arch/x86/kvm/x86.c:6999 [inline] vcpu_run arch/x86/kvm/x86.c:7061 [inline] kvm_arch_vcpu_ioctl_run+0x1cee/0x58b0 arch/x86/kvm/x86.c:7222 kvm_vcpu_ioctl+0x64c/0x1010 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2591 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:0x437fc9 RSP: 002b:00007ffc7b4d5ab8 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00000000004002b0 RCX: 0000000000437fc9 RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000005 RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000020ae8000 R10: 0000000000009120 R11: 0000000000000206 R12: 0000000000000000 R13: 0000000000000004 R14: 0000000000000004 R15: 0000000020077000 Fixes: 9d643f63128b ("KVM: x86: avoid large stack allocations in em_fxrstor") Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/emulate.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) commit 5af4157388adad82c339e3742fb6b67840721347 Author: Wanpeng Li Date: Sun Nov 5 16:54:49 2017 -0800 KVM: nVMX: Fix mmu context after VMLAUNCH/VMRESUME failure Commit 4f350c6dbcb (kvm: nVMX: Handle deferred early VMLAUNCH/VMRESUME failure properly) can result in L1(run kvm-unit-tests/run_tests.sh vmx_controls in L1) null pointer deference and also L0 calltrace when EPT=0 on both L0 and L1. In L1: BUG: unable to handle kernel paging request at ffffffffc015bf8f IP: vmx_vcpu_run+0x202/0x510 [kvm_intel] PGD 146e13067 P4D 146e13067 PUD 146e15067 PMD 3d2686067 PTE 3d4af9161 Oops: 0003 [#1] PREEMPT SMP CPU: 2 PID: 1798 Comm: qemu-system-x86 Not tainted 4.14.0-rc4+ #6 RIP: 0010:vmx_vcpu_run+0x202/0x510 [kvm_intel] Call Trace: WARNING: kernel stack frame pointer at ffffb86f4988bc18 in qemu-system-x86:1798 has bad value 0000000000000002 In L0: -----------[ cut here ]------------ WARNING: CPU: 6 PID: 4460 at /home/kernel/linux/arch/x86/kvm//vmx.c:9845 vmx_inject_page_fault_nested+0x130/0x140 [kvm_intel] CPU: 6 PID: 4460 Comm: qemu-system-x86 Tainted: G OE 4.14.0-rc7+ #25 RIP: 0010:vmx_inject_page_fault_nested+0x130/0x140 [kvm_intel] Call Trace: paging64_page_fault+0x500/0xde0 [kvm] ? paging32_gva_to_gpa_nested+0x120/0x120 [kvm] ? nonpaging_page_fault+0x3b0/0x3b0 [kvm] ? __asan_storeN+0x12/0x20 ? paging64_gva_to_gpa+0xb0/0x120 [kvm] ? paging64_walk_addr_generic+0x11a0/0x11a0 [kvm] ? lock_acquire+0x2c0/0x2c0 ? vmx_read_guest_seg_ar+0x97/0x100 [kvm_intel] ? vmx_get_segment+0x2a6/0x310 [kvm_intel] ? sched_clock+0x1f/0x30 ? check_chain_key+0x137/0x1e0 ? __lock_acquire+0x83c/0x2420 ? kvm_multiple_exception+0xf2/0x220 [kvm] ? debug_check_no_locks_freed+0x240/0x240 ? debug_smp_processor_id+0x17/0x20 ? __lock_is_held+0x9e/0x100 kvm_mmu_page_fault+0x90/0x180 [kvm] kvm_handle_page_fault+0x15c/0x310 [kvm] ? __lock_is_held+0x9e/0x100 handle_exception+0x3c7/0x4d0 [kvm_intel] vmx_handle_exit+0x103/0x1010 [kvm_intel] ? kvm_arch_vcpu_ioctl_run+0x1628/0x2e20 [kvm] The commit avoids to load host state of vmcs12 as vmcs01's guest state since vmcs12 is not modified (except for the VM-instruction error field) if the checking of vmcs control area fails. However, the mmu context is switched to nested mmu in prepare_vmcs02() and it will not be reloaded since load_vmcs12_host_state() is skipped when nested VMLAUNCH/VMRESUME fails. This patch fixes it by reloading mmu context when nested VMLAUNCH/VMRESUME fails. Reviewed-by: Jim Mattson Reviewed-by: Krish Sadhukhan Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Jim Mattson Signed-off-by: Wanpeng Li Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) commit f1b026a3310a441f504640dd3d9765eb533386b8 Author: Wanpeng Li Date: Sun Nov 5 16:54:48 2017 -0800 KVM: nVMX: Validate the IA32_BNDCFGS on nested VM-entry According to the SDM, if the "load IA32_BNDCFGS" VM-entry controls is 1, the following checks are performed on the field for the IA32_BNDCFGS MSR: - Bits reserved in the IA32_BNDCFGS MSR must be 0. - The linear address in bits 63:12 must be canonical. Reviewed-by: Konrad Rzeszutek Wilk Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Jim Mattson Signed-off-by: Wanpeng Li Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3853be2603191829b442b64dac6ae8ba0c027bf9 Author: Wanpeng Li Date: Sun Nov 5 16:54:47 2017 -0800 KVM: X86: Fix operand/address-size during instruction decoding Pedro reported: During tests that we conducted on KVM, we noticed that executing a "PUSH %ES" instruction under KVM produces different results on both memory and the SP register depending on whether EPT support is enabled. With EPT the SP is reduced by 4 bytes (and the written value is 0-padded) but without EPT support it is only reduced by 2 bytes. The difference can be observed when the CS.DB field is 1 (32-bit) but not when it's 0 (16-bit). The internal segment descriptor cache exist even in real/vm8096 mode. The CS.D also should be respected instead of just default operand/address-size/66H prefix/67H prefix during instruction decoding. This patch fixes it by also adjusting operand/address-size according to CS.D. Reported-by: Pedro Fonseca Tested-by: Pedro Fonseca Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Nadav Amit Cc: Pedro Fonseca Signed-off-by: Wanpeng Li Reviewed-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/emulate.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 9b8ae63798cb97e785a667ff27e43fa6220cb734 Author: Liran Alon Date: Sun Nov 5 16:56:34 2017 +0200 KVM: x86: Don't re-execute instruction when not passing CR2 value In case of instruction-decode failure or emulation failure, x86_emulate_instruction() will call reexecute_instruction() which will attempt to use the cr2 value passed to x86_emulate_instruction(). However, when x86_emulate_instruction() is called from emulate_instruction(), cr2 is not passed (passed as 0) and therefore it doesn't make sense to execute reexecute_instruction() logic at all. Fixes: 51d8b66199e9 ("KVM: cleanup emulate_instruction") Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_host.h | 3 ++- arch/x86/kvm/vmx.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 1f4dcb3b213235e642088709a1c54964d23365e9 Author: Liran Alon Date: Sun Nov 5 16:56:33 2017 +0200 KVM: x86: emulator: Return to user-mode on L1 CPL=0 emulation failure On this case, handle_emulation_failure() fills kvm_run with internal-error information which it expects to be delivered to user-mode for further processing. However, the code reports a wrong return-value which makes KVM to never return to user-mode on this scenario. Fixes: 6d77dbfc88e3 ("KVM: inject #UD if instruction emulation fails and exit to userspace") Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61cb57c9ed631c95b54f8e9090c89d18b3695b3c Author: Liran Alon Date: Sun Nov 5 16:56:32 2017 +0200 KVM: x86: Exit to user-mode on #UD intercept when emulator requires Instruction emulation after trapping a #UD exception can result in an MMIO access, for example when emulating a MOVBE on a processor that doesn't support the instruction. In this case, the #UD vmexit handler must exit to user mode, but there wasn't any code to do so. Add it for both VMX and SVM. Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Wanpeng Li Reviewed-by: Paolo Bonzini Cc: stable@vger.kernel.org Signed-off-by: Radim Krčmář arch/x86/kvm/svm.c | 2 ++ arch/x86/kvm/vmx.c | 2 ++ 2 files changed, 4 insertions(+) commit ac9b305caa0df6f5b75d294e4b86c1027648991e Author: Liran Alon Date: Mon Nov 6 16:15:10 2017 +0200 KVM: nVMX/nSVM: Don't intercept #UD when running L2 When running L2, #UD should be intercepted by L1 or just forwarded directly to L2. It should not reach L0 x86 emulator. Therefore, set intercept for #UD only based on L1 exception-bitmap. Also add WARN_ON_ONCE() on L0 #UD intercept handlers to make sure it is never reached while running L2. This improves commit ae1f57670703 ("KVM: nVMX: Do not emulate #UD while in guest mode") by removing an unnecessary exit from L2 to L0 on #UD when L1 doesn't intercept it. In addition, SVM L0 #UD intercept handler doesn't handle correctly the case it is raised from L2. In this case, it should forward the #UD to guest instead of x86 emulator. As done in VMX #UD intercept handler. This commit fixes this issue as-well. Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Paolo Bonzini Reviewed-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/kvm/svm.c | 9 ++++++++- arch/x86/kvm/vmx.c | 9 ++++----- 2 files changed, 12 insertions(+), 6 deletions(-) commit 51c4b8bba674cfd2260d173602c4dac08e4c3a99 Author: Liran Alon Date: Sun Nov 5 16:11:30 2017 +0200 KVM: x86: pvclock: Handle first-time write to pvclock-page contains random junk When guest passes KVM it's pvclock-page GPA via WRMSR to MSR_KVM_SYSTEM_TIME / MSR_KVM_SYSTEM_TIME_NEW, KVM don't initialize pvclock-page to some start-values. It just requests a clock-update which will happen before entering to guest. The clock-update logic will call kvm_setup_pvclock_page() to update the pvclock-page with info. However, kvm_setup_pvclock_page() *wrongly* assumes that the version-field is initialized to an even number. This is wrong because at first-time write, field could be any-value. Fix simply makes sure that if first-time version-field is odd, increment it once more to make it even and only then start standard logic. This follows same logic as done in other pvclock shared-pages (See kvm_write_wall_clock() and record_steal_time()). Signed-off-by: Liran Alon Reviewed-by: Nikita Leshenko Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Paolo Bonzini Cc: stable@vger.kernel.org Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 3 +++ 1 file changed, 3 insertions(+) commit d02fcf50779ec9d8eb7a81473fd76efe3f04b3a5 Author: Paolo Bonzini Date: Mon Nov 6 13:31:13 2017 +0100 kvm: vmx: Allow disabling virtual NMI support To simplify testing of these rarely used code paths, add a module parameter that turns it on. One eventinj.flat test (NMI after iret) fails when loading kvm_intel with vnmi=0. Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit 8a1b43922d0d1279e7936ba85c4c2a870403c95f Author: Paolo Bonzini Date: Mon Nov 6 13:31:12 2017 +0100 kvm: vmx: Reinstate support for CPUs without virtual NMI This is more or less a revert of commit 2c82878b0cb3 ("KVM: VMX: require virtual NMI support", 2017-03-27); it turns out that Core 2 Duo machines only had virtual NMIs in some SKUs. The revert is not trivial because in the meanwhile there have been several fixes to nested NMI injection. Therefore, the entire vNMI state is moved to struct loaded_vmcs. Another change compared to before the patch is a simplification here: if (unlikely(!cpu_has_virtual_nmis() && vmx->soft_vnmi_blocked && !(is_guest_mode(vcpu) && nested_cpu_has_virtual_nmis( get_vmcs12(vcpu))))) { The final condition here is always true (because nested_cpu_has_virtual_nmis is always false) and is removed. Fixes: 2c82878b0cb38fd516fd612c67852a6bbf282003 Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1490803 Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 150 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 106 insertions(+), 44 deletions(-) commit 15038e14724799b8c205beb5f20f9e54896013c3 Author: Paolo Bonzini Date: Thu Oct 26 09:13:27 2017 +0200 KVM: SVM: obey guest PAT For many years some users of assigned devices have reported worse performance on AMD processors with NPT than on AMD without NPT, Intel or bare metal. The reason turned out to be that SVM is discarding the guest PAT setting and uses the default (PA0=PA4=WB, PA1=PA5=WT, PA2=PA6=UC-, PA3=UC). The guest might be using a different setting, and especially might want write combining but isn't getting it (instead getting slow UC or UC- accesses). Thanks a lot to geoff@hostfission.com for noticing the relation to the g_pat setting. The patch has been tested also by a bunch of people on VFIO users forums. Fixes: 709ddebf81cb40e3c36c6109a7892e8b93a09464 Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=196409 Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini Reviewed-by: David Hildenbrand Tested-by: Nick Sarnie Signed-off-by: Radim Krčmář arch/x86/kvm/svm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit fc3790fa0768a789d9163608b4414e2d595be5fe Merge: cf9b077 95b110a Author: Paolo Bonzini Date: Fri Nov 17 13:20:01 2017 +0100 Merge tag 'kvm-arm-gicv4-for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD GICv4 Support for KVM/ARM for v4.15 commit c2432466f583cb719b35a41e757da587d9ab1d00 Author: Takashi Iwai Date: Fri Nov 17 12:08:40 2017 +0100 ALSA: hda: Fix too short HDMI/DP chmap reporting We got a regression report about the HD-audio HDMI chmap, where some surround channels are reported as UNKNOWN. The git bisection pointed the culprit at the commit 9b3dc8aa3fb1 ("ALSA: hda - Register chmap obj as priv data instead of codec"). The story behind scene is like this: - While moving the code out of the legacy HDA to the HDA common place, the patch modifies the code to obtain the chmap array indirectly in a byte array, and it expands it to kctl value array. - At the latter operation, the size of the array is wrongly passed by sizeof() to the pointer. - It can be 4 on 32bit arch, thus too short for 6+ channels. (And that's the reason why it didn't hit other persons; it's 8 on 64bit arch, thus it's usually enough.) The code was further changed meanwhile, but the problem persisted. Let's fix it by correctly evaluating the array size. Fixes: 9b3dc8aa3fb1 ("ALSA: hda - Register chmap obj as priv data instead of codec") Reported-by: VDR User Cc: Signed-off-by: Takashi Iwai sound/hda/hdmi_chmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2500b584cfd228d67e1e43daf27c8af865b499e Author: Julian Scheel Date: Thu Nov 16 17:35:17 2017 +0100 ALSA: usb-audio: uac1: Invalidate ctl on interrupt When an interrupt occurs, the value of at least one of the belonging controls should have changed. To make sure they get re-read from device on the next read, invalidate the cache. This was correctly implemented for uac2 already, but missing for uac1. Signed-off-by: Julian Scheel Signed-off-by: Takashi Iwai sound/usb/mixer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 0fafdc9f888b42499001b7ca9d9f371c0b2932f4 Author: David Howells Date: Mon Nov 13 16:59:50 2017 +0000 afs: Fix file locking Fix the AFS file locking whereby the use of the big kernel lock (which could be slept with) was replaced by a spinlock (which couldn't). The problem is that the AFS code was doing stuff inside the critical section that might call schedule(), so this is a broken transformation. Fix this by the following means: (1) Use a state machine with a proper state that can only be changed under the spinlock rather than using a collection of bit flags. (2) Cache the key used for the lock and the lock type in the afs_vnode struct so that the manager work function doesn't have to refer to a file_lock struct that's been dequeued. This makes signal handling safer. (4) Move the unlock from afs_do_unlk() to afs_fl_release_private() which means that unlock is achieved in other circumstances too. (5) Unlock the file on the server before taking the next conflicting lock. Also change: (1) Check the permits on a file before actually trying the lock. (2) fsync the file before effecting an explicit unlock operation. We don't fsync if the lock is erased otherwise as we might not be in a context where we can actually do that. Further fixes: (1) Fixed-fileserver address rotation is made to work. It's only used by the locking functions, so couldn't be tested before. Fixes: 72f98e72551f ("locks: turn lock_flocks into a spinlock") Signed-off-by: David Howells cc: jlayton@redhat.com fs/afs/flock.c | 548 +++++++++++++++++++++++++++++---------------------- fs/afs/internal.h | 23 ++- fs/afs/rotate.c | 70 +++++-- fs/afs/security.c | 4 +- fs/afs/server_list.c | 2 +- 5 files changed, 385 insertions(+), 262 deletions(-) commit 58fedcade126c16cf466a0dd1bc59312e1a6b6f1 Merge: a52b04b 0115552 Author: David S. Miller Date: Fri Nov 17 14:09:36 2017 +0900 Merge branch 'nfp-flower-fixes-and-typo-in-ethtool-stats-name' Jakub Kicinski says: ==================== nfp: flower fixes and typo in ethtool stats name This set comes from the flower offload team. From Pieter we have a fix to the semantics of the flag telling FW whether to allocate or free a mask and correction of a typo in name of one of the MAC statistics (reveive -> received, we use past participle to match HW docs). Dirk fixes propagation of max MTU to representors. John improves VXLAN offload. The old code was not using egress_dev at all, so Jiri missed it in his conversion. The validation of ingress port is still not perfect, we will have to wait for shared block dust to settle to tackle it. This is how John explains the cases: The following example rule is now correctly offloaded in net-next kernel: tc filter add dev vxlan0 ... enc_dst_port 4789 ... skip_sw \ action redirect dev nfp_p0 The following rule will not be offloaded to the NFP (previously it incorrectly matched vxlan packets - it shouldn't as ingress dev is not a vxlan netdev): tc filter add dev nfp_p0 ... enc_dst_port 4789 ... skip_sw \ action redirect dev nfp_p0 Rules that are not matching on tunnels and are an egress offload are rejected. The standard match code assumes the offloaded repr is the ingress port. Rejecting egress offloads removes the chances of false interpretation of the rules on the NFP. A know issue is that the following rule example could still be offloaded and incorrectly match tunnel data: tc filter add dev dummy ... enc_dst_port 4789 ... skip_sw \ action redirect dev nfp_p0 Because the egress register callback does not give information on the ingress netdev, the patch assumes that if it is not a repr then it is the correct tunnel netdev. This may not be the case. The chances of this happening is reduced as it is enforced that the rule match on the well known vxlan port but it is still possible. ==================== Signed-off-by: David S. Miller commit 0115552eac14a2d6db66da5f26bd67d0f2a5d79b Author: John Hurley Date: Thu Nov 16 17:06:43 2017 -0800 nfp: remove false positive offloads in flower vxlan Pass information to the match offload on whether or not the repr is the ingress or egress dev. Only accept tunnel matches if repr is the egress dev. This means rules such as the following are successfully offloaded: tc .. add dev vxlan0 .. enc_dst_port 4789 .. action redirect dev nfp_p0 While rules such as the following are rejected: tc .. add dev nfp_p0 .. enc_dst_port 4789 .. action redirect dev vxlan0 Also reject non tunnel flows that are offloaded to an egress dev. Non tunnel matches assume that the offload dev is the ingress port and offload a match accordingly. Fixes: 611aec101ab7 ("nfp: compile flower vxlan tunnel metadata match fields") Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/flower/offload.c | 32 +++++++++++++++++----- 1 file changed, 25 insertions(+), 7 deletions(-) commit 1a24d4f9c07cc5b9d2207cd84236dff3048438e5 Author: John Hurley Date: Thu Nov 16 17:06:42 2017 -0800 nfp: register flower reprs for egress dev offload Register a callback for offloading flows that have a repr as their egress device. The new egdev_register function is added to net-next for the 4.15 release. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/main.c | 18 ++++++++++++++++++ drivers/net/ethernet/netronome/nfp/flower/main.h | 2 ++ drivers/net/ethernet/netronome/nfp/flower/offload.c | 6 ++++++ drivers/net/ethernet/netronome/nfp/nfp_app.h | 20 ++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 9 ++++++++- 5 files changed, 54 insertions(+), 1 deletion(-) commit 743ba5b47f7961fb29f2e06bb694fb4f068ac58f Author: Dirk van der Merwe Date: Thu Nov 16 17:06:41 2017 -0800 nfp: inherit the max_mtu from the PF netdev The PF netdev is used for data transfer for reprs, so reprs inherit the maximum MTU settings of the PF netdev. Fixes: 5de73ee46704 ("nfp: general representor implementation") Signed-off-by: Dirk van der Merwe Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 2 ++ 1 file changed, 2 insertions(+) commit 745eaf9afe37238e89244953e2e9727006b4432c Author: Pieter Jansen van Vuuren Date: Thu Nov 16 17:06:40 2017 -0800 nfp: fix vlan receive MAC statistics typo Correct typo in vlan receive MAC stats. Previously the MAC statistics reported in ethtool for vlan receive contained a typo resulting in ethtool reporting rx_vlan_reveive_ok instead of rx_vlan_received_ok. Fixes: a5950182c00e ("nfp: map mac_stats and vf_cfg BARs") Fixes: 098ce840c9ef ("nfp: report MAC statistics in ethtool") Reported-by: Brendan Galloway 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/nfp_net_ethtool.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_port.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6c3ab204f4ca00374a374bc0fc9a275b64d1bcbb Author: Pieter Jansen van Vuuren Date: Thu Nov 16 17:06:39 2017 -0800 nfp: fix flower offload metadata flag usage Hardware has no notion of new or last mask id, instead it makes use of the message type (i.e. add flow or del flow) in combination with a single bit in metadata flags to determine when to add or delete a mask id. Previously we made use of the new or last flags to indicate that a new mask should be allocated or deallocated, respectively. This incorrect behaviour is fixed by making use single bit in metadata flags to indicate mask allocation or deallocation. Fixes: 43f84b72c50d ("nfp: add metadata to each flow offload") Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/main.h | 3 +-- drivers/net/ethernet/netronome/nfp/flower/metadata.c | 7 +++++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit a52b04bcd2acff95ffbec19d5fc32016bb365aa0 Author: Joel Stanley Date: Fri Nov 17 13:16:36 2017 +1030 virto_net: remove empty file 'virtio_net.' Looks like this was mistakenly added to the tree as part of commit 186b3c998c50 ("virtio-net: support XDP_REDIRECT"). Signed-off-by: Joel Stanley Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller drivers/net/virtio_net. | 0 1 file changed, 0 insertions(+), 0 deletions(-) commit 5246741a3f2e0285394cf74f3105cb252b8f38ad Author: Mario Limonciello Date: Wed Nov 15 14:21:13 2017 -0600 platform/x86: dell-laptop: Allocate buffer before rfkill use On machines using rfkill interface the buffer needs to have been allocated before the initial use (memset) of it. Reported-by: Valdis Kletnieks Signed-off-by: Mario Limonciello Tested-by: Valdis Kletnieks Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-laptop.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 868b8d33f91e431b1961a35baa6b5022639067f3 Author: Mario Limonciello Date: Thu Nov 9 11:49:10 2017 -0600 platform/x86: dell-*wmi*: Relay failed initial probe to dependent drivers dell-wmi and dell-smbios-wmi are dependent upon dell-wmi-descriptor finishing probe successfully to probe themselves. Currently if dell-wmi-descriptor fails probing in a non-recoverable way (such as invalid header) dell-wmi and dell-smbios-wmi will continue to try to redo probing due to deferred probing. To solve this have the dependent drivers query the dell-wmi-descriptor driver whether the descriptor has been determined valid. The possible results are: -ENODEV: Descriptor GUID missing from WMI bus -EPROBE_DEFER: Descriptor not yet probed, dependent driver should wait and use deferred probing < 0: Descriptor probed, invalid. Dependent driver should return an error. 0: Successful descriptor probe, dependent driver can continue Successful descriptor probe still doesn't mean that the descriptor driver is necessarily bound at the time of initialization of dependent driver. Userspace can unbind the driver, so all methods used from driver should still be verified to return success values otherwise deferred probing be used. Signed-off-by: Mario Limonciello Reviewed-by: Pali Rohár Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-smbios-wmi.c | 5 +++-- drivers/platform/x86/dell-wmi-descriptor.c | 16 ++++++++++++++++ drivers/platform/x86/dell-wmi-descriptor.h | 8 +++++++- drivers/platform/x86/dell-wmi.c | 6 ++++-- 4 files changed, 30 insertions(+), 5 deletions(-) commit 8b9528a6d9a901b9f933231505fef5630e80ce5a Author: Mario Limonciello Date: Thu Nov 9 11:49:09 2017 -0600 platform/x86: dell-wmi-descriptor: check if memory was allocated devm_kzalloc will return NULL pointer if no memory was allocated. This should be checked. This problem also existed when the driver was dell-wmi.c. Signed-off-by: Mario Limonciello Reviewed-by: Pali Rohár Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-wmi-descriptor.c | 5 +++++ 1 file changed, 5 insertions(+) commit cf9b0772f2e410645fece13b749bd56505b998b8 Merge: 527d147 339cd0e Author: Linus Torvalds Date: Thu Nov 16 16:05:01 2017 -0800 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: "This branch contains platform-related driver updates for ARM and ARM64, these are the areas that bring the changes: New drivers: - driver support for Renesas R-Car V3M (R8A77970) - power management support for Amlogic GX - a new driver for the Tegra BPMP thermal sensor - a new bus driver for Technologic Systems NBUS Changes for subsystems that prefer to merge through arm-soc: - the usual updates for reset controller drivers from Philipp Zabel, with five added drivers for SoCs in the arc, meson, socfpa, uniphier and mediatek families - updates to the ARM SCPI and PSCI frameworks, from Sudeep Holla, Heiner Kallweit and Lorenzo Pieralisi Changes specific to some ARM-based SoC - the Freescale/NXP DPAA QBMan drivers from PowerPC can now work on ARM as well - several changes for power management on Broadcom SoCs - various improvements on Qualcomm, Broadcom, Amlogic, Atmel, Mediatek - minor Cleanups for Samsung, TI OMAP SoCs" [ NOTE! This doesn't work without the previous ARM SoC device-tree pull, because the R8A77970 driver is missing a header file that came from that pull. The fact that this got merged afterwards only fixes it at this point, and bisection of that driver will fail if/when you walk into the history of that driver. - Linus ] * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (96 commits) soc: amlogic: meson-gx-pwrc-vpu: fix power-off when powered by bootloader bus: add driver for the Technologic Systems NBUS memory: omap-gpmc: Remove deprecated gpmc_update_nand_reg() soc: qcom: remove unused label soc: amlogic: gx pm domain: add PM and OF dependencies drivers/firmware: psci_checker: Add missing destroy_timer_on_stack() dt-bindings: power: add amlogic meson power domain bindings soc: amlogic: add Meson GX VPU Domains driver soc: qcom: Remote filesystem memory driver dt-binding: soc: qcom: Add binding for rmtfs memory of: reserved_mem: Accessor for acquiring reserved_mem of/platform: Generalize /reserved-memory handling soc: mediatek: pwrap: fix fatal compiler error soc: mediatek: pwrap: fix compiler errors arm64: mediatek: cleanup message for platform selection soc: Allow test-building of MediaTek drivers soc: mediatek: place Kconfig for all SoC drivers under menu soc: mediatek: pwrap: add support for MT7622 SoC soc: mediatek: pwrap: add common way for setup CS timing extenstion soc: mediatek: pwrap: add MediaTek MT6380 as one slave of pwrap .. commit 527d1470744d338c912f94bc1f4dba08ffdff349 Merge: 8c60969 ba5b503 Author: Linus Torvalds Date: Thu Nov 16 15:48:26 2017 -0800 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: "We add device tree files for a couple of additional SoCs in various areas: Allwinner R40/V40 for entertainment, Broadcom Hurricane 2 for networking, Amlogic A113D for audio, and Renesas R-Car V3M for automotive. As usual, lots of new boards get added based on those and other SoCs: - Actions S500 based CubieBoard6 single-board computer - Amlogic Meson-AXG A113D based development board - Amlogic S912 based Khadas VIM2 single-board computer - Amlogic S912 based Tronsmart Vega S96 set-top-box - Allwinner H5 based NanoPi NEO Plus2 single-board computer - Allwinner R40 based Banana Pi M2 Ultra and Berry single-board computers - Allwinner A83T based TBS A711 Tablet - Broadcom Hurricane 2 based Ubiquiti UniFi Switch 8 - Broadcom bcm47xx based Luxul XAP-1440/XAP-810/ABR-4500/XBR-4500 wireless access points and routers - NXP i.MX51 based Zodiac Inflight Innovations RDU1 board - NXP i.MX53 based GE Healthcare PPD biometric monitor - NXP i.MX6 based Pistachio single-board computer - NXP i.MX6 based Vining-2000 automotive diagnostic interface - NXP i.MX6 based Ka-Ro TX6 Computer-on-Module in additional variants - Qualcomm MSM8974 (Snapdragon 800) based Fairphone 2 phone - Qualcomm MSM8974pro (Snapdragon 801) based Sony Xperia Z2 Tablet - Realtek RTD1295 based set-top-boxes MeLE V9 and PROBOX2 AVA - Renesas R-Car V3M (R8A77970) SoC and "Eagle" reference board - Renesas H3ULCB and M3ULCB "Kingfisher" extension infotainment boards - Renasas r8a7745 based iWave G22D-SODIMM SoM - Rockchip rk3288 based Amarula Vyasa single-board computer - Samsung Exynos5800 based Odroid HC1 single-board computer For existing SoC support, there was a lot of ongoing work, as usual most of that concentrated on the Renesas, Rockchip, OMAP, i.MX, Amlogic and Allwinner platforms, but others were also active. Rob Herring and many others worked on reducing the number of issues that the latest version of 'dtc' now warns about. Unfortunately there is still a lot left to do. A rework of the ARM foundation model introduced several new files for common variations of the model" * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (599 commits) arm64: dts: uniphier: route on-board device IRQ to GPIO controller for PXs3 dt-bindings: bus: Add documentation for the Technologic Systems NBUS arm64: dts: actions: s900-bubblegum-96: Add fake uart5 clock ARM: dts: owl-s500: Add CubieBoard6 dt-bindings: arm: actions: Add CubieBoard6 ARM: dts: owl-s500-guitar-bb-rev-b: Add fake uart3 clock ARM: dts: owl-s500: Set power domains for CPU2 and CPU3 arm: dts: mt7623: remove unused compatible string for pio node arm: dts: mt7623: update usb related nodes arm: dts: mt7623: update crypto node ARM: dts: sun8i: a711: Enable USB OTG ARM: dts: sun8i: a711: Add regulator support ARM: dts: sun8i: a83t: bananapi-m3: Enable AP6212 WiFi on mmc1 ARM: dts: sun8i: a83t: cubietruck-plus: Enable AP6330 WiFi on mmc1 ARM: dts: sun8i: a83t: Move mmc1 pinctrl setting to dtsi file ARM: dts: sun8i: a83t: allwinner-h8homlet-v2: Add AXP818 regulator nodes ARM: dts: sun8i: a83t: bananapi-m3: Add AXP813 regulator nodes ARM: dts: sun8i: a83t: cubietruck-plus: Add AXP818 regulator nodes ARM: dts: sunxi: Add dtsi for AXP81x PMIC arm64: dts: allwinner: H5: Restore EMAC changes ... commit 5ebde4694e3b572c4623fd46be98e5c0ca70b522 Author: Hannes Reinecke Date: Wed Nov 15 12:07:30 2017 +0100 scsi: Use 'blist_flags_t' for scsi_devinfo flags As per recommendation from Linus we should be using a distinct type for blacklist flags. [mkp: was cut against an older kernel, applied by hand] Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_devinfo.c | 18 ++++++++-------- drivers/scsi/scsi_priv.h | 15 +++++++------- drivers/scsi/scsi_scan.c | 2 +- include/scsi/scsi_device.h | 4 +++- include/scsi/scsi_devinfo.h | 50 ++++++++++++++++++++++----------------------- 5 files changed, 46 insertions(+), 43 deletions(-) commit 8c609698569578913ad40bb160b97c3f6cfa15ec Merge: 18c83d2 fa32475 Author: Linus Torvalds Date: Thu Nov 16 14:05:12 2017 -0800 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: "Most of the commits are for defconfig changes, to enable newly added drivers or features that people have started using. For the changed lines lines, we have mostly cleanups, the affected platforms are OMAP, Versatile, EP93xx, Samsung, Broadcom, i.MX, and Actions. The largest single change is the introduction of the TI "sysc" bus driver, with the intention of cleaning up more legacy code. Two new SoC platforms get added this time: - Allwinner R40 is a modernized version of the A20 chip, now with a Quad-Core ARM Cortex-A7. According to the manufacturer, it is intended for "Smart Hardware" - Broadcom Hurricane 2 (Aka Strataconnect BCM5334X) is a family of chips meant for managed gigabit ethernet switches, based around a Cortex-A9 CPU. Finally, we gain SMP support for two platforms: Renesas R-Car E2 and Amlogic Meson8/8b, which were previously added but only supported uniprocessor operation" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (118 commits) ARM: multi_v7_defconfig: Select RPMSG_VIRTIO as module ARM: multi_v7_defconfig: enable CONFIG_GPIO_UNIPHIER arm64: defconfig: enable CONFIG_GPIO_UNIPHIER ARM: meson: enable MESON_IRQ_GPIO in Kconfig for meson8b ARM: meson: Add SMP bringup code for Meson8 and Meson8b ARM: smp_scu: allow the platform code to read the SCU CPU status ARM: smp_scu: add a helper for powering on a specific CPU dt-bindings: Amlogic: Add Meson8 and Meson8b SMP related documentation ARM: OMAP3: Delete an unnecessary variable initialisation in omap3xxx_hwmod_init() ARM: OMAP3: Use common error handling code in omap3xxx_hwmod_init() ARM: defconfig: select the right SX150X driver arm64: defconfig: Enable QCOM_IOMMU arm64: Add ThunderX drivers to defconfig arm64: defconfig: Enable Tegra PCI controller cpufreq: imx6q: Move speed grading check to cpufreq driver arm64: defconfig: re-enable Qualcomm DB410c USB ARM: configs: stm32: Add MDMA support in STM32 defconfig ARM: imx: Enable cpuidle for i.MX6DL starting at 1.1 bus: ti-sysc: Fix unbalanced pm_runtime_enable by adding remove bus: ti-sysc: mark PM functions as __maybe_unused ... commit f8817f61e8215b0ff1b73a0d33fa04ef9e6bce8b Author: Rafael J. Wysocki Date: Thu Nov 16 22:51:22 2017 +0100 PM / runtime: Drop children check from __pm_runtime_set_status() The check for "active" children in __pm_runtime_set_status(), when trying to set the parent device status to "suspended", doesn't really make sense, because in fact it is not invalid to set the status of a device with runtime PM disabled to "suspended" in any case. It is invalid to enable runtime PM for a device with its status set to "suspended" while its child_count reference counter is nonzero, but the check in __pm_runtime_set_status() doesn't really cover that situation. For this reason, drop the children check from __pm_runtime_set_status() and add a check against child_count reference counters of "suspended" devices to pm_runtime_enable(). Fixes: a8636c89648a (PM / Runtime: Don't allow to suspend a device with an active child) Signed-off-by: Rafael J. Wysocki Reviewed-by: Ulf Hansson Reviewed-by: Johan Hovold Documentation/power/runtime_pm.txt | 3 +-- drivers/base/power/runtime.c | 31 +++++++++++-------------------- 2 files changed, 12 insertions(+), 22 deletions(-) commit 74d4108d9e681dbbe4a2940ed8fdff1f6868184c Author: Eric Biggers Date: Wed Nov 15 16:38:09 2017 -0800 dm bufio: fix integer overflow when limiting maximum cache size The default max_cache_size_bytes for dm-bufio is meant to be the lesser of 25% of the size of the vmalloc area and 2% of the size of lowmem. However, on 32-bit systems the intermediate result in the expression (VMALLOC_END - VMALLOC_START) * DM_BUFIO_VMALLOC_PERCENT / 100 overflows, causing the wrong result to be computed. For example, on a 32-bit system where the vmalloc area is 520093696 bytes, the result is 1174405 rather than the expected 130023424, which makes the maximum cache size much too small (far less than 2% of lowmem). This causes severe performance problems for dm-verity users on affected systems. Fix this by using mult_frac() to correctly multiply by a percentage. Do this for all places in dm-bufio that multiply by a percentage. Also replace (VMALLOC_END - VMALLOC_START) with VMALLOC_TOTAL, which contrary to the comment is now defined in include/linux/vmalloc.h. Depends-on: 9993bc635 ("sched/x86: Fix overflow in cyc2ns_offset") Fixes: 95d402f057f2 ("dm: add bufio") Cc: # v3.2+ Signed-off-by: Eric Biggers Signed-off-by: Mike Snitzer drivers/md/dm-bufio.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 5d47c89f29eab6e9e224d7ac8c0baf4da72c9493 Author: Mike Snitzer Date: Thu Nov 16 15:42:26 2017 -0500 dm: clear all discard attributes in queue_limits when discards are disabled Otherwise, it can happen that the QUEUE_FLAG_DISCARD isn't set but the various discard attributes (which get exposed via sysfs) may be set. Signed-off-by: Mike Snitzer drivers/md/dm-table.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 7dea378b23fdc5003379615fc579dbf987ed8128 Author: Mike Snitzer Date: Thu Nov 16 10:22:42 2017 -0500 dm: do not set 'discards_supported' in targets that do not need it The DM target's 'discards_supported' flag is intended to act as an override. Meaning, even if the underlying storage doesn't support discards the DM target will. Signed-off-by: Mike Snitzer drivers/md/dm-era-target.c | 1 - drivers/md/dm-raid.c | 6 ------ 2 files changed, 7 deletions(-) commit 8a74d29d541cd86569139c6f3f44b2d210458071 Author: Mike Snitzer Date: Tue Nov 14 15:40:52 2017 -0500 dm: discard support requires all targets in a table support discards A DM device with a mix of discard capabilities (due to some underlying devices not having discard support) _should_ just return -EOPNOTSUPP for the region of the device that doesn't support discards (even if only by way of the underlying driver formally not supporting discards). BUT, that does ask the underlying driver to handle something that it never advertised support for. In doing so we're exposing users to the potential for a underlying disk driver hanging if/when a discard is issued a the device that is incapable and never claimed to support discards. Fix this by requiring that each DM target in a DM table provide discard support as a prereq for a DM device to advertise support for discards. This may cause some configurations that were happily supporting discards (even in the face of a mix of discard support) to stop supporting discards -- but the risk of users hitting driver hangs, and forced reboots, outweighs supporting those fringe mixed discard configurations. Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer drivers/md/dm-table.c | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) commit 9dc112e2daf87b40607fd8d357e2d7de32290d45 Author: Ming Lei Date: Sat Sep 30 19:46:48 2017 +0800 dm mpath: remove annoying message of 'blk_get_request() returned -11' It is very normal to see allocation failure, especially with blk-mq request_queues, so it's unnecessary to report this error and annoy people. In practice this 'blk_get_request() returned -11' error gets logged quite frequently when a blk-mq DM multipath device sees heavy IO. This change is marked for stable@ because the annoying message in question was included in stable@ commit 7083abbbf. Fixes: 7083abbbf ("dm mpath: avoid that path removal can trigger an infinite loop") Cc: stable@vger.kernel.org Signed-off-by: Ming Lei Signed-off-by: Mike Snitzer drivers/md/dm-mpath.c | 2 -- 1 file changed, 2 deletions(-) commit 18c83d2c0390fd0e8336ad090a047c56037d19f5 Merge: 051089a c1d0c3f Author: Linus Torvalds Date: Thu Nov 16 13:14:46 2017 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: "Fixes in qemu, vhost and virtio" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: fw_cfg: fix the command line module name vhost/vsock: fix uninitialized vhost_vsock->guest_cid vhost: fix end of range for access_ok vhost/scsi: Use safe iteration in vhost_scsi_complete_cmd_work() virtio_balloon: fix deadlock on OOM commit 051089a2eed9a9977080774f3793ff2688cd3878 Merge: 974aa56 646d944 Author: Linus Torvalds Date: Thu Nov 16 13:06:27 2017 -0800 Merge tag 'for-linus-4.15-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: "Xen features and fixes for v4.15-rc1 Apart from several small fixes it contains the following features: - a series by Joao Martins to add vdso support of the pv clock interface - a series by Juergen Gross to add support for Xen pv guests to be able to run on 5 level paging hosts - a series by Stefano Stabellini adding the Xen pvcalls frontend driver using a paravirtualized socket interface" * tag 'for-linus-4.15-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (34 commits) xen/pvcalls: fix potential endless loop in pvcalls-front.c xen/pvcalls: Add MODULE_LICENSE() MAINTAINERS: xen, kvm: track pvclock-abi.h changes x86/xen/time: setup vcpu 0 time info page x86/xen/time: set pvclock flags on xen_time_init() x86/pvclock: add setter for pvclock_pvti_cpu0_va ptp_kvm: probe for kvm guest availability xen/privcmd: remove unused variable pageidx xen: select grant interface version xen: update arch/x86/include/asm/xen/cpuid.h xen: add grant interface version dependent constants to gnttab_ops xen: limit grant v2 interface to the v1 functionality xen: re-introduce support for grant v2 interface xen: support priv-mapping in an HVM tools domain xen/pvcalls: remove redundant check for irq >= 0 xen/pvcalls: fix unsigned less than zero error check xen/time: Return -ENODEV from xen_get_wallclock() xen/pvcalls-front: mark expected switch fall-through xen: xenbus_probe_frontend: mark expected switch fall-throughs xen/time: do not decrease steal time after live migration on xen ... commit 974aa5630b318938273d7efe7a2cf031c7b927db Merge: 441692a a6014f1 Author: Linus Torvalds Date: Thu Nov 16 13:00:24 2017 -0800 Merge tag 'kvm-4.15-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Radim Krčmář: "First batch of KVM changes for 4.15 Common: - Python 3 support in kvm_stat - Accounting of slabs to kmemcg ARM: - Optimized arch timer handling for KVM/ARM - Improvements to the VGIC ITS code and introduction of an ITS reset ioctl - Unification of the 32-bit fault injection logic - More exact external abort matching logic PPC: - Support for running hashed page table (HPT) MMU mode on a host that is using the radix MMU mode; single threaded mode on POWER 9 is added as a pre-requisite - Resolution of merge conflicts with the last second 4.14 HPT fixes - Fixes and cleanups s390: - Some initial preparation patches for exitless interrupts and crypto - New capability for AIS migration - Fixes x86: - Improved emulation of LAPIC timer mode changes, MCi_STATUS MSRs, and after-reset state - Refined dependencies for VMX features - Fixes for nested SMI injection - A lot of cleanups" * tag 'kvm-4.15-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (89 commits) KVM: s390: provide a capability for AIS state migration KVM: s390: clear_io_irq() requests are not expected for adapter interrupts KVM: s390: abstract conversion between isc and enum irq_types KVM: s390: vsie: use common code functions for pinning KVM: s390: SIE considerations for AP Queue virtualization KVM: s390: document memory ordering for kvm_s390_vcpu_wakeup KVM: PPC: Book3S HV: Cosmetic post-merge cleanups KVM: arm/arm64: fix the incompatible matching for external abort KVM: arm/arm64: Unify 32bit fault injection KVM: arm/arm64: vgic-its: Implement KVM_DEV_ARM_ITS_CTRL_RESET KVM: arm/arm64: Document KVM_DEV_ARM_ITS_CTRL_RESET KVM: arm/arm64: vgic-its: Free caches when GITS_BASER Valid bit is cleared KVM: arm/arm64: vgic-its: New helper functions to free the caches KVM: arm/arm64: vgic-its: Remove kvm_its_unmap_device arm/arm64: KVM: Load the timer state when enabling the timer KVM: arm/arm64: Rework kvm_timer_should_fire KVM: arm/arm64: Get rid of kvm_timer_flush_hwstate KVM: arm/arm64: Avoid phys timer emulation in vcpu entry/exit KVM: arm/arm64: Move phys_timer_emulate function KVM: arm/arm64: Use kvm_arm_timer_set/get_reg for guest register traps ... commit e6e58e7774148b0d20bcdf7bab097e51ddb758d1 Author: Jason Gunthorpe Date: Thu Nov 16 13:44:00 2017 -0700 RDMA: Add Jason Gunthorpe as a co-maintainer As was discussed in September and October, add Jason along with Doug to have a team maintainership model for the RDMA subystem. Mellanox Technologies will be funding Jason's independent work on the maintainership. Signed-off-by: Jason Gunthorpe Signed-off-by: Doug Ledford .mailmap | 2 ++ MAINTAINERS | 1 + 2 files changed, 3 insertions(+) commit 441692aafc1731087bbaf657a8b6059d95c2a6df Merge: 5b0e2cb 0219614 Author: Linus Torvalds Date: Thu Nov 16 12:50:35 2017 -0800 Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: - add support for ELF fdpic binaries on both MMU and noMMU platforms - linker script cleanups - support for compressed .data section for XIP images - discard memblock arrays when possible - various cleanups - atomic DMA pool updates - better diagnostics of missing/corrupt device tree - export information to allow userspace kexec tool to place images more inteligently, so that the device tree isn't overwritten by the booting kernel - make early_printk more efficient on semihosted systems - noMMU cleanups - SA1111 PCMCIA update in preparation for further cleanups * 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: (38 commits) ARM: 8719/1: NOMMU: work around maybe-uninitialized warning ARM: 8717/2: debug printch/printascii: translate '\n' to "\r\n" not "\n\r" ARM: 8713/1: NOMMU: Support MPU in XIP configuration ARM: 8712/1: NOMMU: Use more MPU regions to cover memory ARM: 8711/1: V7M: Add support for MPU to M-class ARM: 8710/1: Kconfig: Kill CONFIG_VECTORS_BASE ARM: 8709/1: NOMMU: Disallow MPU for XIP ARM: 8708/1: NOMMU: Rework MPU to be mostly done in C ARM: 8707/1: NOMMU: Update MPU accessors to use cp15 helpers ARM: 8706/1: NOMMU: Move out MPU setup in separate module ARM: 8702/1: head-common.S: Clear lr before jumping to start_kernel() ARM: 8705/1: early_printk: use printascii() rather than printch() ARM: 8703/1: debug.S: move hexbuf to a writable section ARM: add additional table to compressed kernel ARM: decompressor: fix BSS size calculation pcmcia: sa1111: remove special sa1111 mmio accessors pcmcia: sa1111: use sa1111_get_irq() to obtain IRQ resources ARM: better diagnostics with missing/corrupt dtb ARM: 8699/1: dma-mapping: Remove init_dma_coherent_pool_size() ARM: 8698/1: dma-mapping: Mark atomic_pool as __ro_after_init .. commit 5b0e2cb020085efe202123162502e0b551e49a0e Merge: 758f875 3ffa9d9 Author: Linus Torvalds Date: Thu Nov 16 12:47:46 2017 -0800 Merge tag 'powerpc-4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: "A bit of a small release, I suspect in part due to me travelling for KS. But my backlog of patches to review is smaller than usual, so I think in part folks just didn't send as much this cycle. Non-highlights: - Five fixes for the >128T address space handling, both to fix bugs in our implementation and to bring the semantics exactly into line with x86. Highlights: - Support for a new OPAL call on bare metal machines which gives us a true NMI (ie. is not masked by MSR[EE]=0) for debugging etc. - Support for Power9 DD2 in the CXL driver. - Improvements to machine check handling so that uncorrectable errors can be reported into the generic memory_failure() machinery. - Some fixes and improvements for VPHN, which is used under PowerVM to notify the Linux partition of topology changes. - Plumbing to enable TM (transactional memory) without suspend on some Power9 processors (PPC_FEATURE2_HTM_NO_SUSPEND). - Support for emulating vector loads form cache-inhibited memory, on some Power9 revisions. - Disable the fast-endian switch "syscall" by default (behind a CONFIG), we believe it has never had any users. - A major rework of the API drivers use when initiating and waiting for long running operations performed by OPAL firmware, and changes to the powernv_flash driver to use the new API. - Several fixes for the handling of FP/VMX/VSX while processes are using transactional memory. - Optimisations of TLB range flushes when using the radix MMU on Power9. - Improvements to the VAS facility used to access coprocessors on Power9, and related improvements to the way the NX crypto driver handles requests. - Implementation of PMEM_API and UACCESS_FLUSHCACHE for 64-bit. Thanks to: Alexey Kardashevskiy, Alistair Popple, Allen Pais, Andrew Donnellan, Aneesh Kumar K.V, Arnd Bergmann, Balbir Singh, Benjamin Herrenschmidt, Breno Leitao, Christophe Leroy, Christophe Lombard, Cyril Bur, Frederic Barrat, Gautham R. Shenoy, Geert Uytterhoeven, Guilherme G. Piccoli, Gustavo Romero, Haren Myneni, Joel Stanley, Kamalesh Babulal, Kautuk Consul, Markus Elfring, Masami Hiramatsu, Michael Bringmann, Michael Neuling, Michal Suchanek, Naveen N. Rao, Nicholas Piggin, Oliver O'Halloran, Paul Mackerras, Pedro Miraglia Franco de Carvalho, Philippe Bergheaud, Sandipan Das, Seth Forshee, Shriya, Stephen Rothwell, Stewart Smith, Sukadev Bhattiprolu, Tyrel Datwyler, Vaibhav Jain, Vaidyanathan Srinivasan, and William A. Kennington III" * tag 'powerpc-4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (151 commits) powerpc/64s: Fix Power9 DD2.0 workarounds by adding DD2.1 feature powerpc/64s: Fix masking of SRR1 bits on instruction fault powerpc/64s: mm_context.addr_limit is only used on hash powerpc/64s/radix: Fix 128TB-512TB virtual address boundary case allocation powerpc/64s/hash: Allow MAP_FIXED allocations to cross 128TB boundary powerpc/64s/hash: Fix fork() with 512TB process address space powerpc/64s/hash: Fix 128TB-512TB virtual address boundary case allocation powerpc/64s/hash: Fix 512T hint detection to use >= 128T powerpc: Fix DABR match on hash based systems powerpc/signal: Properly handle return value from uprobe_deny_signal() powerpc/fadump: use kstrtoint to handle sysfs store powerpc/lib: Implement UACCESS_FLUSHCACHE API powerpc/lib: Implement PMEM API powerpc/powernv/npu: Don't explicitly flush nmmu tlb powerpc/powernv/npu: Use flush_all_mm() instead of flush_tlb_mm() powerpc/powernv/idle: Round up latency and residency values powerpc/kprobes: refactor kprobe_lookup_name for safer string operations powerpc/kprobes: Blacklist emulate_update_regs() from kprobes powerpc/kprobes: Do not disable interrupts for optprobes and kprobes_on_ftrace powerpc/kprobes: Disable preemption before invoking probe handler for optprobes ... commit 758f875848d78148cf9a9cdb3ff1ddf29b234056 Merge: a02cd42 3fda0e7 Author: Linus Torvalds Date: Thu Nov 16 12:20:15 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull user namespace update from Eric Biederman: "The only change that is production ready this round is the work to increase the number of uid and gid mappings a user namespace can support from 5 to 340. This code was carefully benchmarked and it was confirmed that in the existing cases the performance remains the same. In the worst case with 340 mappings an cache cold stat times go from 158ns to 248ns. That is noticable but still quite small, and only the people who are doing crazy things pay the cost. This work uncovered some documentation and cleanup opportunities in the mapping code, and patches to make those cleanups and improve the documentation will be coming in the next merge window" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: userns: Simplify insert_extent userns: Make map_id_down a wrapper for map_id_range_down userns: Don't read extents twice in m_start userns: Simplify the user and group mapping functions userns: Don't special case a count of 0 userns: bump idmap limits to 340 userns: use union in {g,u}idmap struct commit a02cd4229e298aadbe8f5cf286edee8058d87116 Merge: 487e2c9 ead710b Author: Linus Torvalds Date: Thu Nov 16 12:10:21 2017 -0800 Merge tag 'f2fs-for-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, we introduce sysfile-based quota support which is required for Android by default. In addition, we allow that users are able to reserve some blocks in runtime to mitigate performance drops in low free space. Enhancements: - assign proper data segments according to write_hints given by user - issue cache_flush on dirty devices only among multiple devices - exploit cp_error flag and add more faults to enhance fault injection test - conduct more readaheads during f2fs_readdir - add a range for discard commands Bug fixes: - fix zero stat->st_blocks when inline_data is set - drop crypto key and free stale memory pointer while evict_inode is failing - fix some corner cases in free space and segment management - fix wrong last_disk_size This series includes lots of clean-ups and code enhancement in terms of xattr operations, discard/flush command control. In addition, it adds versatile debugfs entries to monitor f2fs status" * tag 'f2fs-for-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (75 commits) f2fs: deny accessing encryption policy if encryption is off f2fs: inject fault in inc_valid_node_count f2fs: fix to clear FI_NO_PREALLOC f2fs: expose quota information in debugfs f2fs: separate nat entry mem alloc from nat_tree_lock f2fs: validate before set/clear free nat bitmap f2fs: avoid opened loop codes in __add_ino_entry f2fs: apply write hints to select the type of segments for buffered write f2fs: introduce scan_curseg_cache for cleanup f2fs: optimize the way of traversing free_nid_bitmap f2fs: keep scanning until enough free nids are acquired f2fs: trace checkpoint reason in fsync() f2fs: keep isize once block is reserved cross EOF f2fs: avoid race in between GC and block exchange f2fs: save a multiplication for last_nid calculation f2fs: fix summary info corruption f2fs: remove dead code in update_meta_page f2fs: remove unneeded semicolon f2fs: don't bother with inode->i_version f2fs: check curseg space before foreground GC ... commit 2015a63dce8d73a439232a0d5162c88d8513101e Author: Darrick J. Wong Date: Thu Nov 16 09:20:17 2017 -0800 xfs: fix type usage Be consistent about using uint32_t/uint8_t instead of u32/u8. This is more so that we don't have to maintain /those/ types in xfsprogs. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen fs/xfs/libxfs/xfs_iext_tree.c | 2 +- fs/xfs/libxfs/xfs_log_format.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 962cc1ad6caddb5abbb9f0a43e5abe7131a71f18 Author: Darrick J. Wong Date: Tue Nov 14 16:34:44 2017 -0800 xfs: fix forgotten rcu read unlock when skipping inode reclaim In commit f2e9ad21 ("xfs: check for race with xfs_reclaim_inode"), we skip an inode if we're racing with freeing the inode via xfs_reclaim_inode, but we forgot to release the rcu read lock when dumping the inode, with the result that we exit to userspace with a lock held. Don't do that; generic/320 with a 1k block size fails this very occasionally. ================================================ WARNING: lock held when returning to user space! 4.14.0-rc6-djwong #4 Tainted: G W ------------------------------------------------ rm/30466 is leaving the kernel with locks still held! 1 lock held by rm/30466: #0: (rcu_read_lock){....}, at: [] xfs_ifree_cluster.isra.17+0x2c3/0x6f0 [xfs] ------------[ cut here ]------------ WARNING: CPU: 1 PID: 30466 at kernel/rcu/tree_plugin.h:329 rcu_note_context_switch+0x71/0x700 Modules linked in: deadline_iosched dm_snapshot dm_bufio ext4 mbcache jbd2 dm_flakey xfs libcrc32c dax_pmem device_dax nd_pmem sch_fq_codel af_packet [last unloaded: scsi_debug] CPU: 1 PID: 30466 Comm: rm Tainted: G W 4.14.0-rc6-djwong #4 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.10.2-1ubuntu1djwong0 04/01/2014 task: ffff880037680000 task.stack: ffffc90001064000 RIP: 0010:rcu_note_context_switch+0x71/0x700 RSP: 0000:ffffc90001067e50 EFLAGS: 00010002 RAX: 0000000000000001 RBX: ffff880037680000 RCX: ffff88003e73d200 RDX: 0000000000000002 RSI: ffffffff819e53e9 RDI: ffffffff819f4375 RBP: 0000000000000000 R08: 0000000000000000 R09: ffff880062c900d0 R10: 0000000000000000 R11: 0000000000000000 R12: ffff880037680000 R13: 0000000000000000 R14: ffffc90001067eb8 R15: ffff880037680690 FS: 00007fa3b8ce8700(0000) GS:ffff88003ec00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f69bf77c000 CR3: 000000002450a000 CR4: 00000000000006e0 Call Trace: __schedule+0xb8/0xb10 schedule+0x40/0x90 exit_to_usermode_loop+0x6b/0xa0 prepare_exit_to_usermode+0x7a/0x90 retint_user+0x8/0x20 RIP: 0033:0x7fa3b87fda87 RSP: 002b:00007ffe41206568 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff02 RAX: 0000000000000000 RBX: 00000000010e88c0 RCX: 00007fa3b87fda87 RDX: 0000000000000000 RSI: 00000000010e89c8 RDI: 0000000000000005 RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 R10: 000000000000015e R11: 0000000000000246 R12: 00000000010c8060 R13: 00007ffe41206690 R14: 0000000000000000 R15: 0000000000000000 ---[ end trace e88f83bf0cfbd07d ]--- Fixes: f2e9ad212def50bcf4c098c6288779dd97fff0f0 Cc: Omar Sandoval Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Omar Sandoval fs/xfs/xfs_inode.c | 1 + 1 file changed, 1 insertion(+) commit 487e2c9f44c4b5ea23bfe87bb34679f7297a0bce Merge: b630a23 98bf40c Author: Linus Torvalds Date: Thu Nov 16 11:41:22 2017 -0800 Merge tag 'afs-next-20171113' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS updates from David Howells: "kAFS filesystem driver overhaul. The major points of the overhaul are: (1) Preliminary groundwork is laid for supporting network-namespacing of kAFS. The remainder of the namespacing work requires some way to pass namespace information to submounts triggered by an automount. This requires something like the mount overhaul that's in progress. (2) sockaddr_rxrpc is used in preference to in_addr for holding addresses internally and add support for talking to the YFS VL server. With this, kAFS can do everything over IPv6 as well as IPv4 if it's talking to servers that support it. (3) Callback handling is overhauled to be generally passive rather than active. 'Callbacks' are promises by the server to tell us about data and metadata changes. Callbacks are now checked when we next touch an inode rather than actively going and looking for it where possible. (4) File access permit caching is overhauled to store the caching information per-inode rather than per-directory, shared over subordinate files. Whilst older AFS servers only allow ACLs on directories (shared to the files in that directory), newer AFS servers break that restriction. To improve memory usage and to make it easier to do mass-key removal, permit combinations are cached and shared. (5) Cell database management is overhauled to allow lighter locks to be used and to make cell records autonomous state machines that look after getting their own DNS records and cleaning themselves up, in particular preventing races in acquiring and relinquishing the fscache token for the cell. (6) Volume caching is overhauled. The afs_vlocation record is got rid of to simplify things and the superblock is now keyed on the cell and the numeric volume ID only. The volume record is tied to a superblock and normal superblock management is used to mediate the lifetime of the volume fscache token. (7) File server record caching is overhauled to make server records independent of cells and volumes. A server can be in multiple cells (in such a case, the administrator must make sure that the VL services for all cells correctly reflect the volumes shared between those cells). Server records are now indexed using the UUID of the server rather than the address since a server can have multiple addresses. (8) File server rotation is overhauled to handle VMOVED, VBUSY (and similar), VOFFLINE and VNOVOL indications and to handle rotation both of servers and addresses of those servers. The rotation will also wait and retry if the server says it is busy. (9) Data writeback is overhauled. Each inode no longer stores a list of modified sections tagged with the key that authorised it in favour of noting the modified region of a page in page->private and storing a list of keys that made modifications in the inode. This simplifies things and allows other keys to be used to actually write to the server if a key that made a modification becomes useless. (10) Writable mmap() is implemented. This allows a kernel to be build entirely on AFS. Note that Pre AFS-3.4 servers are no longer supported, though this can be added back if necessary (AFS-3.4 was released in 1998)" * tag 'afs-next-20171113' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: (35 commits) afs: Protect call->state changes against signals afs: Trace page dirty/clean afs: Implement shared-writeable mmap afs: Get rid of the afs_writeback record afs: Introduce a file-private data record afs: Use a dynamic port if 7001 is in use afs: Fix directory read/modify race afs: Trace the sending of pages afs: Trace the initiation and completion of client calls afs: Fix documentation on # vs % prefix in mount source specification afs: Fix total-length calculation for multiple-page send afs: Only progress call state at end of Tx phase from rxrpc callback afs: Make use of the YFS service upgrade to fully support IPv6 afs: Overhaul volume and server record caching and fileserver rotation afs: Move server rotation code into its own file afs: Add an address list concept afs: Overhaul cell database management afs: Overhaul permit caching afs: Overhaul the callback handling afs: Rename struct afs_call server member to cm_server ... commit b630a23a731a436f9edbd9fa00739aaa3e174c15 Merge: 9c7a867 eeb690b Author: Linus Torvalds Date: Thu Nov 16 10:57:11 2017 -0800 Merge tag 'pinctrl-v4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "This is the bulk of pin control changes for the v4.15 kernel cycle: Core: - The pin control Kconfig entry PINCTRL is now turned into a menuconfig option. This obviously has the implication of making the subsystem menu visible in menuconfig. This is happening because of two things: (a) Intel have started to deploy and depend on pin controllers in a way that is affecting users directly. This happens on the highly integrated laptop chipsets named after geographical places: baytrail, broxton, cannonlake, cedarfork, cherryview, denverton, geminilake, lewisburg, merrifield, sunrisepoint... It started a while back and now it is ever more evident that this is crucial infrastructure for x86 laptops and not an embedded obscurity anymore. Users need to be aware. (b) Pin control expanders on I2C and SPI that are arch-agnostic. Currently Semtech SX150X and Microchip MCP28x08 but more are expected. Users will have to be able to configure these in directly for their set-up. - Just go and select GPIOLIB now that we made sure that GPIOLIB is a very vanilla subsystem. Do not depend on it, if we need it, select it. - Exposing the pin control subsystem in menuconfig uncovered a bunch of obscure bugs that are now hopefully fixed, all more or less pertaining to Blackfin. - Unified namespace for cross-calls between pin control and GPIO. - New support for clock skew/delay generic DT bindings and generic pin config options for this. - Minor documentation improvements. Various: - The Renesas SH-PFC pin controller has evolved a lot. It seems Renesas are churning out new SoCs by the minute. - A bunch of non-critical fixes for the Rockchip driver. - Improve the use of library functions instead of open coding. - Support the MCP28018 variant in the MCP28x08 driver. - Static constifying" * tag 'pinctrl-v4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (91 commits) pinctrl: gemini: Fix missing pad descriptions pinctrl: Add some depends on HAS_IOMEM pinctrl: samsung/s3c24xx: add CONFIG_OF dependency pinctrl: gemini: Fix GMAC groups pinctrl: qcom: spmi-gpio: Add pmi8994 gpio support pinctrl: ti-iodelay: remove redundant unused variable dev pinctrl: max77620: Use common error handling code in max77620_pinconf_set() pinctrl: gemini: Implement clock skew/delay config pinctrl: gemini: Use generic DT parser pinctrl: Add skew-delay pin config and bindings pinctrl: armada-37xx: Add edge both type gpio irq support pinctrl: uniphier: remove eMMC hardware reset pin-mux pinctrl: rockchip: Add iomux-route switching support for rk3288 pinctrl: intel: Add Intel Cedar Fork PCH pin controller support pinctrl: intel: Make offset to interrupt status register configurable pinctrl: sunxi: Enforce the strict mode by default pinctrl: sunxi: Disable strict mode for old pinctrl drivers pinctrl: sunxi: Introduce the strict flag pinctrl: sh-pfc: Save/restore registers for PSCI system suspend pinctrl: sh-pfc: r8a7796: Use generic IOCTRL register description ... commit c00758387c3dff94a59fd3521a5ac713c30328af Author: Rob Herring Date: Thu Nov 16 11:54:17 2017 -0600 of: unittest: disable interrupts_property warning The testcases.dts has purposely bad data which now generates a dtc warning: drivers/of/unittest-data/testcases.dtb: Warning (interrupts_property): interrupts size is (4), expected multiple of 8 in /testcase-data/testcase-device2 Disable this warning for now. The proper solution is to split the unit tests into good and bad data. Signed-off-by: Rob Herring drivers/of/unittest-data/Makefile | 1 + 1 file changed, 1 insertion(+) commit f5525593c6142ebafba2ea83d86c6bb2994d7ddd Author: Rob Herring Date: Thu Nov 16 11:37:09 2017 -0600 of: unittest: let dtc generate __local_fixups__ Remove the manually added __local_fixups__ because dtc can now generate them. This also fixes a new warning in the process: drivers/of/unittest-data/testcases.dtb: Warning (interrupts_extended_property): Could not get phandle node for /__local_fixups__/testcase-data/interrupts/interrupts-extended0:interrupts-extended(cell 3) Signed-off-by: Rob Herring drivers/of/unittest-data/testcases.dts | 65 ++-------------------------------- 1 file changed, 2 insertions(+), 63 deletions(-) commit fd78e6af810377363a2b3439b942840fa4f4ea86 Author: Eric Huang Date: Thu Nov 16 11:14:21 2017 -0500 drm/amd/powerplay: fix unfreeze level smc message for smu7 Copy paste typo. Signed-off-by: Eric Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c7a867ebdef0d484a4c9329007179fbbd08affc Merge: d3092e4 29fae2c Author: Linus Torvalds Date: Thu Nov 16 10:36:46 2017 -0800 Merge tag 'backlight-next-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: - handle 32bit overflow in pwm_bl - remove redundant code/checks in tps65217_bl and ili922x * tag 'backlight-next-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: ili922x: Remove redundant variable len backlight: tps65217_bl: Remove unnecessary default brightness check backlight: pwm_bl: Fix overflow condition commit 9862def99d6fd007e73d9b7d8474ae18c1b4ce48 Author: Monk Liu Date: Tue Nov 14 16:55:14 2017 +0800 drm/amdgpu:fix memleak those RLC used buffers are not cleared in GFX's sw_fini Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 9 +++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 8 ++++++++ 3 files changed, 25 insertions(+) commit 9ee8ecbb3eafeb1a899eaba1329ba3c4c092b754 Author: Monk Liu Date: Tue Nov 14 16:48:06 2017 +0800 drm/amdgpu:fix memleak in takedown this can fix the memory leak under the case that not all BO are freed during "takedown" stage, because originally it blocks following kfree on mgr. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 6 ------ drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 5 ----- 2 files changed, 11 deletions(-) commit cce75291ffd82eb5bac56b051f46f89e8c0d2918 Author: James Smart Date: Wed Nov 15 17:00:21 2017 -0800 nvmet_fc: fix better length checking Reorganize nvmet_fc_handle_fcp_rqst() so that the nvmet req.transfer_len field is set after the call nvmet_req_init(). An update to nvmet now has nvmet_req_init() clearing the field, thus the fc transport was losing the value. Reviewed-by: Christoph Hellwig Signed-off-by: James Smart Signed-off-by: Jens Axboe drivers/nvme/target/fc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d3092e4e9937bdc7e3444fea1b47132e53c9cd41 Merge: 2bf16b7 b2596d7 Author: Linus Torvalds Date: Thu Nov 16 09:15:57 2017 -0800 Merge tag 'mfd-next-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New drivers: - Add support for Cherry Trail Dollar Cove TI PMIC - Add support for Add Spreadtrum SC27xx series PMICs New device support: - Add support Regulator to axp20x New functionality: - Add DT support; aspeed-scu sc27xx-pmic - Add power saving support; rts5249 Fix-ups: - DT clean-up/rework; tps65217, max77693, iproc-cdru, iproc-mhb, tps65218 - Staticise/constify; stw481x - Use new succinct IRQ API; fsl-imx25-tsadc - Kconfig fix-ups; MFD_TPS65218 - Identify SPI method; lpc_ich - Use managed resources (devm_*) calls; ssbi - Remove unused/obsolete code/documentation; mc13xxx Bug fixes: - Fix typo in MAINTAINERS - Fix error handling; mxs-lradc - Clean-up IRQs on .remove; fsl-imx25-tsadc" * tag 'mfd-next-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (21 commits) dt-bindings: mfd: mc13xxx: Remove obsolete property mfd: axp20x: Add axp20x-regulator cell for AXP813 mfd: Add Spreadtrum SC27xx series PMICs driver dt-bindings: mfd: Add Spreadtrum SC27xx PMIC documentation mfd: ssbi: Use devm_of_platform_populate() mfd: fsl-imx25: Clean up irq settings during removal mfd: mxs-lradc: Fix error handling in mxs_lradc_probe() mfd: lpc_ich: Avoton/Rangeley uses SPI_BYT method mfd: tps65218: Introduce dependency on CONFIG_OF mfd: tps65218: Correct the config description MAINTAINERS: Fix Dialog search term for watchdog binding file mfd: fsl-imx25: Set irq handler and data in one go mfd: rts5249: Add support for RTS5250S power saving ACPI / PMIC: Add opregion driver for Intel Dollar Cove TI PMIC mfd: Add support for Cherry Trail Dollar Cove TI PMIC syscon: dt-bindings: Add binding document for iProc MHB block syscon: dt-bindings: Add binding doc for Broadcom iProc CDRU mfd: max77693: Add muic of_compatible in mfd_cell mfd: stw481x: Make three arrays static const, reduces object code size mfd: tps65217: Introduce dependency on CONFIG_OF ... commit 2bf16b7a73caf3435f782e4170cfe563675e10f9 Merge: b974304 f13d1a8 Author: Linus Torvalds Date: Thu Nov 16 09:10:59 2017 -0800 Merge tag 'char-misc-4.15-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc updates from Greg KH: "Here is the big set of char/misc and other driver subsystem patches for 4.15-rc1. There are small changes all over here, hyperv driver updates, pcmcia driver updates, w1 driver updats, vme driver updates, nvmem driver updates, and lots of other little one-off driver updates as well. The shortlog has the full details. All of these have been in linux-next for quite a while with no reported issues" * tag 'char-misc-4.15-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (90 commits) VME: Return -EBUSY when DMA list in use w1: keep balance of mutex locks and refcnts MAINTAINERS: Update VME subsystem tree. nvmem: sunxi-sid: add support for A64/H5's SID controller nvmem: imx-ocotp: Update module description nvmem: imx-ocotp: Enable i.MX7D OTP write support nvmem: imx-ocotp: Add i.MX7D timing write clock setup support nvmem: imx-ocotp: Move i.MX6 write clock setup to dedicated function nvmem: imx-ocotp: Add support for banked OTP addressing nvmem: imx-ocotp: Pass parameters via a struct nvmem: imx-ocotp: Restrict OTP write to IMX6 processors nvmem: uniphier: add UniPhier eFuse driver dt-bindings: nvmem: add description for UniPhier eFuse nvmem: set nvmem->owner to nvmem->dev->driver->owner if unset nvmem: qfprom: fix different address space warnings of sparse nvmem: mtk-efuse: fix different address space warnings of sparse nvmem: mtk-efuse: use stack for nvmem_config instead of malloc'ing it nvmem: imx-iim: use stack for nvmem_config instead of malloc'ing it thunderbolt: tb: fix use after free in tb_activate_pcie_devices MAINTAINERS: Add git tree for Thunderbolt development ... commit f877918cdd793373fb7a960c72ba3639786e8e8f Author: Johan Hovold Date: Thu Nov 9 18:07:19 2017 +0100 dt-bindings: usb: document hub and host-controller properties Hub nodes and host-controller nodes with child nodes must specify values for #address-cells (1) and #size-cells (0). Also make the definition of the related reg property a bit more stringent, and add comments to the example source. Signed-off-by: Johan Hovold Signed-off-by: Rob Herring Documentation/devicetree/bindings/usb/usb-device.txt | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit bfebcf54608a749800a171ffd01f7d5b450e9a55 Author: Johan Hovold Date: Thu Nov 9 18:07:18 2017 +0100 dt-bindings: usb: clean up compatible property Add quotation marks around the compatible string to avoid ambiguity due to following punctuation, and define the VID and PID components. Signed-off-by: Johan Hovold Signed-off-by: Rob Herring Documentation/devicetree/bindings/usb/usb-device.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f42ae7b0540937e00fe005812997f126aaac4bc2 Author: Johan Hovold Date: Thu Nov 9 18:07:17 2017 +0100 dt-bindings: usb: fix reg-property port-number range The USB hub port-number range for USB 2.0 is 1-255 and not 1-31 which reflects an arbitrary limit set by the current Linux implementation. Note that for USB 3.1 hubs the valid range is 1-15. Increase the documented valid range in the binding to 255, which is the maximum allowed by the specifications. Signed-off-by: Johan Hovold Signed-off-by: Rob Herring Documentation/devicetree/bindings/usb/usb-device.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1759f27027c88adfd94b436fda219eb80531bf6d Author: Johan Hovold Date: Thu Nov 9 18:07:16 2017 +0100 dt-bindings: usb: fix example hub node name According to the OF Recommended Practice for USB, hub nodes shall be named "hub", but the example had mixed up the label and node names. Fix the node name and drop the redundant label. While at it, remove a newline and add a missing semicolon to the example source. Signed-off-by: Johan Hovold Signed-off-by: Rob Herring Documentation/devicetree/bindings/usb/usb-device.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c545f637f81ebab88c257a243083a879af0b85b7 Author: Robin Murphy Date: Wed Nov 15 12:50:06 2017 +0000 of/pci: Fix theoretical NULL dereference In the (relatively mechanical) process of adapting the RID-mapping code to put the resulting ID in an output argument rather than the funtion return value, we ended up with the debug print using the argument pointer rather than the local value, which potentially defeats the earlier NULL check. Fixes: 987068fcbdb7: "of/irq: Break out msi-map lookup (again)" Reported-by: Dan Carpenter Signed-off-by: Robin Murphy Signed-off-by: Rob Herring drivers/of/of_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9743042b3d31fed271ae19aee79dd86817904f0 Merge: e60e1ee 0ff26c6 Author: Linus Torvalds Date: Thu Nov 16 08:55:30 2017 -0800 Merge tag 'driver-core-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the set of driver core / debugfs patches for 4.15-rc1. Not many here, mostly all are debugfs fixes to resolve some long-reported problems with files going away with references to them in userspace. There's also some SPDX cleanups for the debugfs code, as well as a few other minor driver core changes for issues reported by people. All of these have been in linux-next for a week or more with no reported issues" * tag 'driver-core-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: driver core: Fix device link deferred probe debugfs: Remove redundant license text debugfs: add SPDX identifiers to all debugfs files debugfs: defer debugfs_fsdata allocation to first usage debugfs: call debugfs_real_fops() only after debugfs_file_get() debugfs: purge obsolete SRCU based removal protection IB/hfi1: convert to debugfs_file_get() and -put() debugfs: convert to debugfs_file_get() and -put() debugfs: debugfs_real_fops(): drop __must_hold sparse annotation debugfs: implement per-file removal protection debugfs: add support for more elaborate ->d_fsdata driver core: Move device_links_purge() after bus_remove_device() arch_topology: Fix section miss match warning due to free_raw_capacity() driver-core: pr_err() strings should end with newlines commit ba5b5034bd29ad94a16d73ed64fbeab0fa863f4d Author: Masahiro Yamada Date: Wed Nov 15 13:15:12 2017 +0900 arm64: dts: uniphier: route on-board device IRQ to GPIO controller for PXs3 Commit 429f203eb712 ("arm64: dts: uniphier: route on-board device IRQ to GPIO controller") missed to update this DTS. It becames a real problem when arm and arm64 trees are merged together. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/socionext/uniphier-pxs3-ref.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7f855fc805cd9c29867aed56cc20f818b36a7b7b Author: Masahiro Yamada Date: Tue Nov 14 18:47:20 2017 +0900 kbuild: move coccicheck help from scripts/Makefile.help to top Makefile In my view, it is not helpful to have a separate file just for the coccicheck help message. Merge scripts/Makefile.help into the top-level Makefile. Signed-off-by: Masahiro Yamada Acked-by: Julia Lawall Makefile | 2 +- scripts/Makefile.help | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) commit 52c291a36cdc639321584de9de0a47ec62c6ffa1 Author: Masahiro Yamada Date: Mon Nov 13 19:58:09 2017 +0900 sh: decompressor: add shipped files to .gitignore These files are copied from arch/sh/lib, so should be ignored by git. Signed-off-by: Masahiro Yamada arch/sh/boot/compressed/.gitignore | 5 +++++ 1 file changed, 5 insertions(+) commit 380a1edbcb66c91bd2aadac1496203f70c266997 Author: Masahiro Yamada Date: Mon Nov 13 19:43:00 2017 +0900 frv: .gitignore: ignore vmlinux.lds Signed-off-by: Masahiro Yamada arch/frv/kernel/.gitignore | 1 + 1 file changed, 1 insertion(+) commit ab35727eb879ccc9487c6df0a3796be124ed39d3 Author: Heiko Carstens Date: Thu Nov 16 13:49:50 2017 +0100 s390: remove unused parameter from Makefile Remove unused parameter from the call function, which I accidentally added. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c13db9b5df2dc97b0d4ce9d442bbcd80b5194b7 Author: Steffen Maier Date: Tue Oct 17 18:40:51 2017 +0200 zfcp: purely mechanical update using timer API, plus blank lines erp_memwait only occurs in seldom memory pressure situations. The typical case never uses the associated timer and thus also does not need to initialize the timer. Also, we don't want to re-initialize the timer each time we re-use an erp_action in zfcp_erp_setup_act() [see also v4.14-rc7 commit ab31fd0ce65e ("scsi: zfcp: fix erp_action use-before-initialize in REC action trace") for erp_action life cycle]. Hence, retain the lazy inintialization of zfcp_erp_action.timer in zfcp_erp_strategy_memwait(). Add an empty line after declarations in zfcp_erp_timeout_handler() and zfcp_fsf_request_timeout_handler() even though it was also missing before the timer conversion. Fix checkpatch warning: WARNING: function definition argument 'struct timer_list *' should also have an identifier name +extern void zfcp_erp_timeout_handler(struct timer_list *); Depends-on: v4.14-rc3 commit 686fef928bba ("timer: Prepare to change timer callback argument type") Signed-off-by: Steffen Maier Reviewed-by: Jens Remus Signed-off-by: Martin Schwidefsky drivers/s390/scsi/zfcp_erp.c | 5 ++--- drivers/s390/scsi/zfcp_ext.h | 2 +- drivers/s390/scsi/zfcp_fsf.c | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) commit 75492a51568b943e903e1d7de10a962fbc001ba6 Author: Kees Cook Date: Mon Oct 16 16:44:34 2017 -0700 s390/scsi: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Steffen Maier Cc: Benjamin Block Cc: Heiko Carstens Cc: linux-s390@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Martin Schwidefsky drivers/s390/scsi/zfcp_erp.c | 16 ++++++++++------ drivers/s390/scsi/zfcp_ext.h | 2 +- drivers/s390/scsi/zfcp_fsf.c | 13 ++++++------- 3 files changed, 17 insertions(+), 14 deletions(-) commit 544e8dd7a8e49d22b4315fc232479bc02b417b46 Author: Hendrik Brueckner Date: Tue Mar 8 14:00:23 2016 +0100 s390/cpum_sf: correctly set the PID and TID in perf samples The hardware sampler creates samples that are processed at a later point in time. The PID and TID values of the perf samples that are created for hardware samples are initialized with values from the current task. Hence, the PID and TID values are not correct and perf samples are associated with wrong processes. The PID and TID values are obtained from the Host Program Parameter (HPP) field in the basic-sampling data entries. These PIDs are valid in the init PID namespace. Ensure that the PIDs in the perf samples are resolved considering the PID namespace in which the perf event was created. To correct the PID and TID values in the created perf samples, a special overflow handler is installed. It replaces the default overflow handler and does not become effective if any other overflow handler is used. With the special overflow handler most of the perf samples are associated with the right processes. For processes, that are no longer exist, the association might still be wrong. Signed-off-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/include/asm/setup.h | 2 +- arch/s390/kernel/perf_cpum_sf.c | 76 +++++++++++++++++++++++++++++++++++++++++ arch/s390/mm/fault.c | 2 +- 3 files changed, 78 insertions(+), 2 deletions(-) commit d4c7e649d7bf17792629dbeaf25945e26a32894f Author: Hendrik Brueckner Date: Fri Oct 27 15:45:19 2017 +0200 s390/cpum_sf: load program parameter at sampler enablement The lpp instruction is used to place the PID of the current task in the program-parameter (PP) register. The register contents is then included in the sampling data entries. The lpp instruction loads the PP register only when at least one sampling function is enabled. Otherwise it is executed as a no-op. Linux calls lpp at context switch. If the context switch happens before the sampler is enabled, the PP register is empty. That means, the PID of the task that is sampled is not stored in sampling data until the next context switch. Hence, always call lpp when enabling the sampler. Signed-off-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/include/asm/cpu_mf.h | 6 ++++++ arch/s390/kernel/perf_cpum_sf.c | 3 +++ 2 files changed, 9 insertions(+) commit de9954b75e992d26a67d83990e6219dcb6edc3bf Author: Hendrik Brueckner Date: Wed Nov 8 09:17:38 2017 +0100 s390/perf: add perf register support for floating-point registers For correct unwinding of user space processes, the floating-point register contents are required. For example, leaf functions might use fp registers to temporarily store the return address. Signed-off-by: Hendrik Brueckner Reviewed-and-tested-by: Thomas Richter Signed-off-by: Martin Schwidefsky tools/perf/arch/s390/include/perf_regs.h | 32 ++++++++++++++++++++++++++++++++ tools/perf/arch/s390/util/unwind-libdw.c | 20 +++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) commit 0da0017f72554c005c1a04c3adc5da9eb64fa7e5 Author: Hendrik Brueckner Date: Wed Nov 8 07:30:15 2017 +0100 s390/perf: extend perf_regs support to include floating-point registers Extend the perf register support to also export floating-point register contents for user space tasks. Floating-point registers might be used in leaf functions to contain the return address. Hence, they are required for proper DWARF unwinding. Signed-off-by: Hendrik Brueckner Reviewed-and-tested-by: Thomas Richter Signed-off-by: Martin Schwidefsky arch/s390/include/uapi/asm/perf_regs.h | 16 ++++++++++++++++ arch/s390/kernel/perf_regs.c | 21 +++++++++++++++++++++ 2 files changed, 37 insertions(+) commit a9fc2db0a8abf51c81122799c5ae4808f2324b6d Author: Hendrik Brueckner Date: Wed Nov 8 09:01:12 2017 +0100 s390/perf: define common DWARF register string table Instead of defining DWARF register to string table in dwarf-regs-table.h and dwarf-regs.c, use a common table in dwarf-regs-table.h. Ensure that the DWARF register table is up-to-date with http://refspecs.linuxfoundation.org/ELF/zSeries/lzsabi0_s390/x1542.html. For unwinding with libdw, also ensure to correctly setup the DWARF register frame according to the register mappings. Currently, libdw supports up to 32 registers only. Suggested-by: Thomas Richter Signed-off-by: Hendrik Brueckner Reviewed-and-tested-by: Thomas Richter Signed-off-by: Martin Schwidefsky tools/perf/arch/s390/include/dwarf-regs-table.h | 71 +++++++++++++++++++++++-- tools/perf/arch/s390/util/dwarf-regs.c | 15 ++---- tools/perf/arch/s390/util/unwind-libdw.c | 15 ++++-- 3 files changed, 80 insertions(+), 21 deletions(-) commit f704ef44602fbf403e6722c7ed13f62d17e8cb20 Author: Heiko Carstens Date: Tue Jan 19 11:23:38 2016 +0100 s390/perf: add support for perf_regs and libdw With support for perf_regs and libdw, you can record and report call graphs for user space programs. Simply invoke perf with the --call-graph=dwarf command line option. Signed-off-by: Heiko Carstens [brueckner: added dwfl_thread_state_register_pc() call] Signed-off-by: Hendrik Brueckner Reviewed-and-tested-by: Thomas Richter Signed-off-by: Martin Schwidefsky tools/perf/Makefile.config | 6 ++- tools/perf/arch/s390/include/perf_regs.h | 63 ++++++++++++++++++++++++++++++++ tools/perf/arch/s390/util/Build | 1 + tools/perf/arch/s390/util/dwarf-regs.c | 4 ++ tools/perf/arch/s390/util/unwind-libdw.c | 40 ++++++++++++++++++++ 5 files changed, 113 insertions(+), 1 deletion(-) commit c33eff600584ed493adfb42e3f130a6335f97750 Author: Heiko Carstens Date: Sat Jun 6 12:44:25 2015 +0200 s390/perf: add perf_regs support and user stack dump Add s390 support to dump user stack to user space for DWARF stack unwinding. Signed-off-by: Heiko Carstens Reviewed-by: Hendrik Brueckner Reviewed-and-tested-by: Thomas Richter Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 2 ++ arch/s390/include/uapi/asm/perf_regs.h | 27 +++++++++++++++++++ arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/perf_regs.c | 49 ++++++++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+), 1 deletion(-) commit 9232c3c741200167e44ae9d0e434092657ab4534 Author: Hendrik Brueckner Date: Wed May 31 15:22:19 2017 +0200 s390/cpum_sf: do not register PMU if no sampling mode is authorized Previously, the cpum_sf PMU was registered even if there is no sampling mode authorized. Add a check and register cpum_sf only at least one sampling mode is authorized. Signed-off-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_cpum_sf.c | 3 +++ 1 file changed, 3 insertions(+) commit 3d43b981eb841a9493717e6d509f59553dbe8c7a Author: Pu Hou Date: Fri May 19 11:16:55 2017 +0200 s390/cpumf: remove raw event support in basic-only sampling mode Raw sample was implemented to export the diagnostic samples. With having this achieved with AUX buffers, there is no requirement for basic samples to export raw data. In particular, most basic sampling information are consumed for creating the perf event sample. Signed-off-by: Pu Hou Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/include/asm/perf_event.h | 17 ---- arch/s390/kernel/perf_cpum_sf.c | 185 ++++++------------------------------- 2 files changed, 27 insertions(+), 175 deletions(-) commit a3f22d505f56bf3efd8eecd9b7adcc40a40a4a8e Author: Pu Hou Date: Thu Sep 1 10:48:22 2016 +0200 s390/perf: add callback to perf to enable using AUX buffer Perf tool need implement a callback to enable using AUX buffer. Perf will do another mmap() to trigger the setup of AUX buffer in kernel if there is such callback. The default size of the AUX buffer is set properly according to the sampling frequency to avoid overflow. It could also be manually set by -m option of perf. The interface of perf is not changed. Diagnostic mode sampling could be started by `perf record -e rBD000` like before. Signed-off-by: Pu Hou Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky tools/perf/arch/s390/util/Build | 2 + tools/perf/arch/s390/util/auxtrace.c | 118 +++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) commit cbf6948f36afcbeca61ed5c3d5e7d930567a200f Author: Pu Hou Date: Fri Nov 11 04:23:15 2016 +0100 s390/cpumf: enable using AUX buffer Modify PMU callback to use AUX buffer for diagnostic mode sampling. Basic-mode sampling still use orignal way. Signed-off-by: Pu Hou Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_cpum_sf.c | 55 ++++++++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 11 deletions(-) commit ca5955cdeae744edd3dcc65d677e833fc29658c2 Author: Pu Hou Date: Fri Nov 11 03:08:49 2016 +0100 s390/cpumf: introduce AUX buffer for dump diagnostic sample data Current implementation uses a private buffer for cpumf to dump samples. Samples first go to this buffer. Then copy to ring buffer allocated by perf core. With AUX buffer, this copy is not needed. AUX buffer is shared and zero-copy mapped to user space. The trailer information at the end of each SDB(sample data block) is also exported to user space. AUX buffer is used when diagnostic sampling mode is enabled. This patch contains functions to setup/free AUX buffer or to begin/end sampling per-cpu. Also include function called in interrupt to collect samples. Signed-off-by: Pu Hou Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_cpum_sf.c | 446 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 446 insertions(+) commit 7c8a61d9ee1df0fb4747879fa67a99614eb62fec Author: Eric W. Biederman Date: Wed Nov 15 22:17:48 2017 -0600 net/sctp: Always set scope_id in sctp_inet6_skb_msgname Alexandar Potapenko while testing the kernel with KMSAN and syzkaller discovered that in some configurations sctp would leak 4 bytes of kernel stack. Working with his reproducer I discovered that those 4 bytes that are leaked is the scope id of an ipv6 address returned by recvmsg. With a little code inspection and a shrewd guess I discovered that sctp_inet6_skb_msgname only initializes the scope_id field for link local ipv6 addresses to the interface index the link local address pertains to instead of initializing the scope_id field for all ipv6 addresses. That is almost reasonable as scope_id's are meaniningful only for link local addresses. Set the scope_id in all other cases to 0 which is not a valid interface index to make it clear there is nothing useful in the scope_id field. There should be no danger of breaking userspace as the stack leak guaranteed that previously meaningless random data was being returned. Fixes: 372f525b495c ("SCTP: Resync with LKSCTP tree.") History-tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git Reported-by: Alexander Potapenko Tested-by: Alexander Potapenko Signed-off-by: "Eric W. Biederman" Signed-off-by: David S. Miller net/sctp/ipv6.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cc54c1d32e6a4bb3f116721abf900513173e4d02 Author: Huacai Chen Date: Thu Nov 16 11:07:15 2017 +0800 fealnx: Fix building error on MIPS This patch try to fix the building error on MIPS. The reason is MIPS has already defined the LONG macro, which conflicts with the LONG enum in drivers/net/ethernet/fealnx.c. Signed-off-by: Huacai Chen Signed-off-by: David S. Miller drivers/net/ethernet/fealnx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a6014f1ab7088dc02b58991cfb6b32a34afdbf12 Merge: 61d7507 da9a144 Author: Radim Krčmář Date: Thu Nov 16 14:39:46 2017 +0100 Merge tag 'kvm-s390-next-4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux KVM: s390: fixes and improvements for 4.15 - Some initial preparation patches for exitless interrupts and crypto - New capability for AIS migration - Fixes - merge of the sthyi tree from the base s390 team, which moves the sthyi out of KVM into a shared function also for non-KVM commit 6a787d6f593d57bec886718ef3fbbdc5bde70fcb Merge: d871c32 9480215 Author: David S. Miller Date: Thu Nov 16 22:33:54 2017 +0900 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== 1) Copy policy family in clone_policy, otherwise this can trigger a BUG_ON in af_key. From Herbert Xu. 2) Revert "xfrm: Fix stack-out-of-bounds read in xfrm_state_find." This added a regression with transport mode when no addresses are configured on the policy template. Both patches are stable candidates. ==================== Signed-off-by: David S. Miller commit d871c321bb934fa63a3e0eaf837c1bafd4d853fc Merge: d618d09 2052556 Author: David S. Miller Date: Thu Nov 16 22:31:16 2017 +0900 Merge branch 'isdn-hisax-Fix-pnp_irq-error-checking' Arvind Yadav says: ==================== isdn: hisax: Fix pnp_irq's error checking The pnp_irq() function returns -1 if an error occurs. pnp_irq() error checking for zero is not correct. ==================== Signed-off-by: David S. Miller commit 20525563b218471fac7254b577ef6743a697d70a Author: Arvind Yadav Date: Thu Nov 16 09:57:29 2017 +0530 isdn: hisax: Fix pnp_irq's error checking for setup_teles3 The pnp_irq() function returns -1 if an error occurs. pnp_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hisax/teles3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d48cc29ae75fb492f87a650bb8054db222de5d4c Author: Arvind Yadav Date: Thu Nov 16 09:57:28 2017 +0530 isdn: hisax: Fix pnp_irq's error checking for setup_sedlbauer_isapnp The pnp_irq() function returns -1 if an error occurs. pnp_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hisax/sedlbauer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bef0eb020943a7fcd031265f68d504214868de2 Author: Arvind Yadav Date: Thu Nov 16 09:57:27 2017 +0530 isdn: hisax: Fix pnp_irq's error checking for setup_niccy The pnp_irq() function returns -1 if an error occurs. pnp_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hisax/niccy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 203d2027a1e95e7d9585d734bdeaac6057058357 Author: Arvind Yadav Date: Thu Nov 16 09:57:26 2017 +0530 isdn: hisax: Fix pnp_irq's error checking for setup_ix1micro The pnp_irq() function returns -1 if an error occurs. pnp_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hisax/ix1_micro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56cdb919f70abfb353171fd705ab65053f7cc057 Author: Arvind Yadav Date: Thu Nov 16 09:57:25 2017 +0530 isdn: hisax: Fix pnp_irq's error checking for setup_isurf The pnp_irq() function returns -1 if an error occurs. pnp_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hisax/isurf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb545c124aac9cd9c1bef6b39e0d8e8e520f9d87 Author: Arvind Yadav Date: Thu Nov 16 09:57:24 2017 +0530 isdn: hisax: Handle return value of pnp_irq and pnp_port_start pnp_irq() and pnp_port_start() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hisax/hisax_fcpcipnp.c | 2 ++ 1 file changed, 2 insertions(+) commit faa2efff3dfa4f03cfdbf86e77cd94b16f1fbdf8 Author: Arvind Yadav Date: Thu Nov 16 09:57:23 2017 +0530 isdn: hisax: Fix pnp_irq's error checking for setup_hfcs The pnp_irq() function returns -1 if an error occurs. pnp_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hisax/hfcscard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6234b89658702ffb1368fcbdcab1b66b2672244 Author: Arvind Yadav Date: Thu Nov 16 09:57:22 2017 +0530 isdn: hisax: Fix pnp_irq's error checking for setup_hfcsx The pnp_irq() function returns -1 if an error occurs. pnp_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hisax/hfc_sx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cf631b5677e42e0c3a9f91cb1a92333397f747d Author: Arvind Yadav Date: Thu Nov 16 09:57:21 2017 +0530 isdn: hisax: Fix pnp_irq's error checking for setup_elsa_isapnp The pnp_irq() function returns -1 if an error occurs. pnp_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hisax/elsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e17aa09884f88663ba127ea0c0ff69a1b1a87d66 Author: Arvind Yadav Date: Thu Nov 16 09:57:20 2017 +0530 isdn: hisax: Fix pnp_irq's error checking for setup_diva_isapnp The pnp_irq() function returns -1 if an error occurs. pnp_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hisax/diva.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0927bd98f2bdb5687ff038ee5bb9ecaa7a27dfa Author: Arvind Yadav Date: Thu Nov 16 09:57:19 2017 +0530 isdn: hisax: Fix pnp_irq's error checking for avm_pnp_setup The pnp_irq() function returns -1 if an error occurs. pnp_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hisax/avm_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84dcc16c52baa3a75860bc26a16a4b5d96bb6936 Author: Arvind Yadav Date: Thu Nov 16 09:57:18 2017 +0530 isdn: hisax: Fix pnp_irq's error checking for setup_asuscom The pnp_irq() function returns -1 if an error occurs. pnp_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/isdn/hisax/asuscom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b192571d1ae375e0bbe0aa3ccfa1a3c3704454b9 Author: Vasily Gorbik Date: Wed Nov 15 14:15:36 2017 +0100 s390/disassembler: increase show_code buffer size Current buffer size of 64 is too small. objdump shows that there are instructions which would require up to 75 bytes buffer (with current formating). 128 bytes "ought to be enough for anybody". Also replaces 8 spaces with a single tab to reduce the memory footprint. Fixes the following KASAN finding: BUG: KASAN: stack-out-of-bounds in number+0x3fe/0x538 Write of size 1 at addr 000000005a4a75a0 by task bash/1282 CPU: 1 PID: 1282 Comm: bash Not tainted 4.14.0+ #215 Hardware name: IBM 2964 N96 702 (z/VM 6.4.0) Call Trace: ([<000000000011eeb6>] show_stack+0x56/0x88) [<0000000000e1ce1a>] dump_stack+0x15a/0x1b0 [<00000000004e2994>] print_address_description+0xf4/0x288 [<00000000004e2cf2>] kasan_report+0x13a/0x230 [<0000000000e38ae6>] number+0x3fe/0x538 [<0000000000e3dfe4>] vsnprintf+0x194/0x948 [<0000000000e3ea42>] sprintf+0xa2/0xb8 [<00000000001198dc>] print_insn+0x374/0x500 [<0000000000119346>] show_code+0x4ee/0x538 [<000000000011f234>] show_registers+0x34c/0x388 [<000000000011f2ae>] show_regs+0x3e/0xa8 [<000000000011f502>] die+0x1ea/0x2e8 [<0000000000138f0e>] do_no_context+0x106/0x168 [<0000000000139a1a>] do_protection_exception+0x4da/0x7d0 [<0000000000e55914>] pgm_check_handler+0x16c/0x1c0 [<000000000090639e>] sysrq_handle_crash+0x46/0x58 ([<0000000000000007>] 0x7) [<00000000009073fa>] __handle_sysrq+0x102/0x218 [<0000000000907c06>] write_sysrq_trigger+0xd6/0x100 [<000000000061d67a>] proc_reg_write+0xb2/0x128 [<0000000000520be6>] __vfs_write+0xee/0x368 [<0000000000521222>] vfs_write+0x21a/0x278 [<000000000052156a>] SyS_write+0xda/0x178 [<0000000000e555cc>] system_call+0xc4/0x270 The buggy address belongs to the page: page:000003d1016929c0 count:0 mapcount:0 mapping: (null) index:0x0 flags: 0x0() raw: 0000000000000000 0000000000000000 0000000000000000 ffffffff00000000 raw: 0000000000000100 0000000000000200 0000000000000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: 000000005a4a7480: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 000000005a4a7500: 00 00 00 00 00 00 00 00 f2 f2 f2 f2 00 00 00 00 >000000005a4a7580: 00 00 00 00 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ^ 000000005a4a7600: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 f8 f8 000000005a4a7680: f2 f2 f2 f2 f2 f2 f8 f8 f2 f2 f3 f3 f3 f3 00 00 ================================================================== Cc: Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/kernel/dis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6470c0cc4840c229c6f1c270ebbcacb8e14f477d Author: Michael Holzheu Date: Wed Nov 15 17:06:30 2017 +0100 s390: Remove CONFIG_HARDENED_USERCOPY When running the crash tool on a s390 live system we get a kernel panic for reading memory within the kernel image: # uname -a Linux r3545011 4.14.0-rc8-00066-g1c9dbd4615fd #45 SMP PREEMPT Fri Nov 10 16:16:22 CET 2017 s390x s390x s390x GNU/Linux # crash /boot/vmlinux-devel /dev/mem # crash> rd 0x100000 usercopy: kernel memory exposure attempt detected from 0000000000100000 () (8 bytes) ------------[ cut here ]------------ kernel BUG at mm/usercopy.c:72! illegal operation: 0001 ilc:1 [#1] PREEMPT SMP. Modules linked in: CPU: 0 PID: 1461 Comm: crash Not tainted 4.14.0-rc8-00066-g1c9dbd4615fd-dirty #46 Hardware name: IBM 2827 H66 706 (z/VM 6.3.0) task: 000000001ad10100 task.stack: 000000001df78000 Krnl PSW : 0704d00180000000 000000000038165c (__check_object_size+0x164/0x1d0) R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:1 PM:0 RI:0 EA:3 Krnl GPRS: 0000000012440e1d 0000000080000000 0000000000000061 00000000001cabc0 00000000001cc6d6 0000000000000000 0000000000cc4ed2 0000000000001000 000003ffc22fdd20 0000000000000008 0000000000100008 0000000000000001 0000000000000008 0000000000100000 0000000000381658 000000001df7bc90 Krnl Code: 000000000038164c: c020004a1c4a larl %r2,cc4ee0 0000000000381652: c0e5fff2581b brasl %r14,1cc688 #0000000000381658: a7f40001 brc 15,38165a >000000000038165c: eb42000c000c srlg %r4,%r2,12 0000000000381662: eb32001c000c srlg %r3,%r2,28 0000000000381668: c0110003ffff lgfi %r1,262143 000000000038166e: ec31ff752065 clgrj %r3,%r1,2,381558 0000000000381674: a7f4ff67 brc 15,381542 Call Trace: ([<0000000000381658>] __check_object_size+0x160/0x1d0) [<000000000082263a>] read_mem+0xaa/0x130. [<0000000000386182>] __vfs_read+0x42/0x168. [<000000000038632e>] vfs_read+0x86/0x140. [<0000000000386a26>] SyS_read+0x66/0xc0. [<0000000000ace6a4>] system_call+0xc4/0x2b0. INFO: lockdep is turned off. Last Breaking-Event-Address: [<0000000000381658>] __check_object_size+0x160/0x1d0 Kernel panic - not syncing: Fatal exception: panic_on_oops With CONFIG_HARDENED_USERCOPY copy_to_user() checks in __check_object_size() if the source address is within the kernel image. When the crash tool reads from 0x100000, this check leads to the kernel BUG(). So disable the kernel config option until this bug is fixed. Corresponding bug report on LKML: https://lkml.org/lkml/2017/11/10/341 Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky arch/s390/configs/default_defconfig | 5 +---- arch/s390/configs/gcov_defconfig | 4 ---- arch/s390/configs/performance_defconfig | 4 ---- 3 files changed, 1 insertion(+), 12 deletions(-) commit 15f8c5f2415bfac73f33a14bcd83422bcbfb5298 Author: Johan Hovold Date: Mon Nov 13 12:12:56 2017 +0100 ASoC: twl4030: fix child-node lookup Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at the parent rather than just matching on its children. To make things worse, the parent codec node was also prematurely freed, while the child node was leaked. Fixes: 2d6d649a2e0f ("ASoC: twl4030: Support for DT booted kernel") Signed-off-by: Johan Hovold Signed-off-by: Mark Brown Cc: stable sound/soc/codecs/twl4030.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bc6476d6c1edcb9b97621b5131bd169aa81f27db Author: Johan Hovold Date: Mon Nov 13 12:12:55 2017 +0100 ASoC: da7218: fix fix child-node lookup Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at the parent rather than just matching on its children. To make things worse, the parent codec node was also prematurely freed. Fixes: 4d50934abd22 ("ASoC: da7218: Add da7218 codec driver") Signed-off-by: Johan Hovold Acked-by: Adam Thomson Signed-off-by: Mark Brown Cc: stable sound/soc/codecs/da7218.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be62a32044061cb4a3b70a10598e093f1319102e Author: Craig Bergstrom Date: Wed Nov 15 15:29:51 2017 -0700 x86/mm: Limit mmap() of /dev/mem to valid physical addresses One thing /dev/mem access APIs should verify is that there's no way that excessively large pfn's can leak into the high bits of the page table entry. In particular, if people can use "very large physical page addresses" through /dev/mem to set the bits past bit 58 - SOFTW4 and permission key bits and NX bit, that could *really* confuse the kernel. We had an earlier attempt: ce56a86e2ade ("x86/mm: Limit mmap() of /dev/mem to valid physical addresses") ... which turned out to be too restrictive (breaking mem=... bootups for example) and had to be reverted in: 90edaac62729 ("Revert "x86/mm: Limit mmap() of /dev/mem to valid physical addresses"") This v2 attempt modifies the original patch and makes sure that mmap(/dev/mem) limits the pfns so that it at least fits in the actual pteval_t architecturally: - Make sure mmap_mem() actually validates that the offset fits in phys_addr_t ( This may be indirectly true due to some other check, but it's not entirely obvious. ) - Change valid_mmap_phys_addr_range() to just use phys_addr_valid() on the top byte ( Top byte is sufficient, because mmap_mem() has already checked that it cannot wrap. ) - Add a few comments about what the valid_phys_addr_range() vs. valid_mmap_phys_addr_range() difference is. Signed-off-by: Craig Bergstrom [ Fixed the checks and added comments. ] Signed-off-by: Linus Torvalds [ Collected the discussion and patches into a commit. ] Cc: Boris Ostrovsky Cc: Fengguang Wu Cc: Greg Kroah-Hartman Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Cc: Peter Zijlstra Cc: Sander Eikelenboom Cc: Sean Young Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/CA+55aFyEcOMb657vWSmrM13OxmHxC-XxeBmNis=DwVvpJUOogQ@mail.gmail.com Signed-off-by: Ingo Molnar arch/x86/include/asm/io.h | 4 ++++ arch/x86/mm/mmap.c | 16 ++++++++++++++++ drivers/char/mem.c | 4 ++++ 3 files changed, 24 insertions(+) commit 4c761ebfcb2d04ee36783c4c8c45ae00caf59d36 Author: Naveen Manohar Date: Fri Nov 3 19:15:02 2017 +0530 ASoC: Intel: kbl: Modify map for Headset Playback to fix pop-noise Patch fixes wrong path in commit 0b06122fc8d0 ("ASoC: Intel: kbl: Add map for new DAIs for Multi-Playback & Echo Ref") which resulted in pop noise. Current topology for Headset results in unwanted pop noise, while switching from spk->hs at the start of Headset Playback. Hence re-introduced mixin-mixout dsp module in topology for headset playback pipe to fix the regression. And the corresponding modification for headset route is updated here. Fixes: 0b06122fc8d0 ("ASoC: Intel: kbl: Add map for new DAIs for Multi-Playback & Echo Ref") Signed-off-by: Naveen Manohar Signed-off-by: Sathya Prakash M R Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_max98927.c | 2 +- sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8c059a4676038967dd6efe614538c329b61e68a1 Author: Trent Piepho Date: Wed Nov 15 11:52:32 2017 -0800 spi: imx: Update device tree binding documentation Update documentation for gpio-cs and num-cs to reflect the standard SPI bindings. The dma properties are optional. Include a warning that native CS do not work in a commonly useful manner with this hardware/driver, and therefor most users probably should use GPIO based CS lines rather than native. CC: Mark Brown CC: Shawn Guo CC: Sascha Hauer CC: Fabio Estevam CC: Oleksij Rempel Signed-off-by: Trent Piepho Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit c20c6704bf2dafaba0d90c8310ef9e919fe4d2e2 Author: Kuninori Morimoto Date: Thu Nov 16 04:36:51 2017 +0000 ASoC: rcar: revert IOMMU support so far commit 4821d914fe74 ("ASoC: rsnd: use dma_sync_single_for_xxx() for IOMMU") had supported IOMMU, but it breaks normal sound "recorde" and both PulseAudio's "playback/recorde". The sound will be noisy. That commit was using dma_sync_single_for_xxx(), and driver should make sure memory is protected during CPU or Device are using it. But if driver returns current "residue" data size correctly on pointer function, player/recorder will access to protected memory. IOMMU feature should be supported, but I don't know how to handle it without memory cache problem at this point. Thus, this patch simply revert it to avoid current noisy sound. Tested-by: Hiroyuki Yokoyama Tested-by: Ryo Kodama Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 4 +-- sound/soc/sh/rcar/dma.c | 86 ++++-------------------------------------------- 2 files changed, 8 insertions(+), 82 deletions(-) commit 97f404ad3e53bf9ac598745066ba2f57c1da3039 Author: Kirill A. Shutemov Date: Wed Nov 15 17:36:07 2017 +0300 x86/selftests: Add test for mapping placement for 5-level paging 5-level paging provides a 56-bit virtual address space for user space application. But the kernel defaults to mappings below the 47-bit address space boundary, which is the upper bound for 4-level paging, unless an application explicitely request it by using a mmap(2) address hint above the 47-bit boundary. The kernel prevents mappings which spawn across the 47-bit boundary unless mmap(2) was invoked with MAP_FIXED. Add a self-test that covers the corner cases of the interface and validates the correctness of the implementation. [ tglx: Massaged changelog once more ] Signed-off-by: Kirill A. Shutemov Signed-off-by: Thomas Gleixner Cc: Nicholas Piggin Cc: Andy Lutomirski Cc: linux-mm@kvack.org Cc: Linus Torvalds Link: https://lkml.kernel.org/r/20171115143607.81541-2-kirill.shutemov@linux.intel.com tools/testing/selftests/x86/5lvl.c | 177 +++++++++++++++++++++++++++++++++++ tools/testing/selftests/x86/Makefile | 2 +- 2 files changed, 178 insertions(+), 1 deletion(-) commit 1e0f25dbf2464df8445dd40881f4d9e732434947 Author: Kirill A. Shutemov Date: Wed Nov 15 17:36:06 2017 +0300 x86/mm: Prevent non-MAP_FIXED mapping across DEFAULT_MAP_WINDOW border In case of 5-level paging, the kernel does not place any mapping above 47-bit, unless userspace explicitly asks for it. Userspace can request an allocation from the full address space by specifying the mmap address hint above 47-bit. Nicholas noticed that the current implementation violates this interface: If user space requests a mapping at the end of the 47-bit address space with a length which causes the mapping to cross the 47-bit border (DEFAULT_MAP_WINDOW), then the vma is partially in the address space below and above. Sanity check the mmap address hint so that start and end of the resulting vma are on the same side of the 47-bit border. If that's not the case fall back to the code path which ignores the address hint and allocate from the regular address space below 47-bit. To make the checks consistent, mask out the address hints lower bits (either PAGE_MASK or huge_page_mask()) instead of using ALIGN() which can push them up to the next boundary. [ tglx: Moved the address check to a function and massaged comment and changelog ] Reported-by: Nicholas Piggin Signed-off-by: Kirill A. Shutemov Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: linux-mm@kvack.org Cc: Linus Torvalds Link: https://lkml.kernel.org/r/20171115143607.81541-1-kirill.shutemov@linux.intel.com arch/x86/include/asm/elf.h | 1 + arch/x86/kernel/sys_x86_64.c | 10 +++++++--- arch/x86/mm/hugetlbpage.c | 11 ++++++++--- arch/x86/mm/mmap.c | 46 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 6 deletions(-) commit 7adce422dd90bd673ef5c4da32c896bf740e3277 Author: Andy Shevchenko Date: Tue Oct 31 16:21:46 2017 +0200 hwmon: (w83793) Remove duplicate NULL check Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Cc: Rudolf Marek Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Signed-off-by: Andy Shevchenko Reviewed-by: Jean Delvare Signed-off-by: Guenter Roeck drivers/hwmon/w83793.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit c85a78b0785b8d2c173cde77c400ab439537ba4d Author: Andy Shevchenko Date: Tue Oct 31 16:21:45 2017 +0200 hwmon: (w83792d) Remove duplicate NULL check Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Signed-off-by: Andy Shevchenko Reviewed-by: Jean Delvare Signed-off-by: Guenter Roeck drivers/hwmon/w83792d.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 416c2a6a6ba96926ef585b574f509e1c6c6440ab Author: Andy Shevchenko Date: Tue Oct 31 16:21:44 2017 +0200 hwmon: (w83791d) Remove duplicate NULL check Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Cc: Marc Hulsman Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Signed-off-by: Andy Shevchenko Reviewed-by: Jean Delvare Signed-off-by: Guenter Roeck drivers/hwmon/w83791d.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 0ab21d0edb5deba027460961baf49433246853db Author: Andy Shevchenko Date: Tue Oct 31 16:21:43 2017 +0200 hwmon: (w83781d) Remove duplicate NULL check Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Signed-off-by: Andy Shevchenko Reviewed-by: Jean Delvare Acked-by: Wolfram Sang Signed-off-by: Guenter Roeck drivers/hwmon/w83781d.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit ab5ee24615f9dd8b0cd199403959f8b13309e7b1 Author: Guenter Roeck Date: Mon Nov 13 12:38:23 2017 -0800 hwmon: (k10temp) Correct model name for Ryzen 1600X Ryzen 1600X is a Ryzen 5 processor. Signed-off-by: Guenter Roeck drivers/hwmon/k10temp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2c48ddfc8b03b9ecb51d2832b586497b37531bc Author: Thomas Backlund Date: Tue Nov 14 12:37:51 2017 +0200 iwlwifi: fix firmware names for 9000 and A000 series hw iwlwifi 9000 and a0000 series hw contains an extra dash in firmware file name as seeen in modinfo output for kernel 4.14: firmware: iwlwifi-9260-th-b0-jf-b0--34.ucode firmware: iwlwifi-9260-th-a0-jf-a0--34.ucode firmware: iwlwifi-9000-pu-a0-jf-b0--34.ucode firmware: iwlwifi-9000-pu-a0-jf-a0--34.ucode firmware: iwlwifi-QuQnj-a0-hr-a0--34.ucode firmware: iwlwifi-QuQnj-a0-jf-b0--34.ucode firmware: iwlwifi-QuQnj-f0-hr-a0--34.ucode firmware: iwlwifi-Qu-a0-jf-b0--34.ucode firmware: iwlwifi-Qu-a0-hr-a0--34.ucode Fix that by dropping the extra adding of '"-"'. Signed-off-by: Thomas Backlund Cc: stable@vger.kernel.org # 4.13 Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 6 +++--- drivers/net/wireless/intel/iwlwifi/cfg/a000.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) commit dbc89253a7e15f8f031fb1eeb956de91204655e3 Author: Luca Coelho Date: Wed Nov 15 18:28:04 2017 +0200 iwlwifi: fix PCI IDs and configuration mapping for 9000 series A lot of PCI IDs were missing and there were some problems with the configuration and firmware selection for devices on the 9000 series. Fix the firmware selection by adding files for the B-steps; add configuration for some integrated devices; and add a bunch of PCI IDs (mostly for integrated devices) that were missing from the driver's list. Without this patch, a lot of devices will not be recognized or will try to load the wrong firmware file. Cc: stable@vger.kernel.org # 4.13 Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 67 +++++++++++- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 5 + drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 132 ++++++++++++++++++------ 3 files changed, 170 insertions(+), 34 deletions(-) commit 5c0342ca7ef17220d8dd2da68d0d349c26ab19df Author: Claudio Scordino Date: Tue Nov 14 12:19:26 2017 +0100 sched/deadline: Fix the description of runtime accounting in the documentation Signed-off-by: Claudio Scordino Signed-off-by: Luca Abeni Acked-by: Daniel Bristot de Oliveira Acked-by: Peter Zijlstra Cc: Jonathan Corbet Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Thomas Gleixner Cc: Tommaso Cucinotta Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/1510658366-28995-1-git-send-email-claudio@evidence.eu.com Signed-off-by: Ingo Molnar Documentation/scheduler/sched-deadline.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 38a9acb3bb7b2561a08144ff80a292889f389a9b Author: Bjorn Andersson Date: Wed Nov 15 22:08:33 2017 -0800 rpmsg: glink: The mbox client knows_txdone As the GLINK driver is ticking the txdone of the mailbox channel (to implement the doorbell) it needs to set knows_txdone. Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 1 + 1 file changed, 1 insertion(+) commit 34d9715ac1edd50285168dd8d80c972739a4f6a4 Author: Ming Lei Date: Thu Nov 16 08:08:44 2017 +0800 block: wake up all tasks blocked in get_request() Once blk_set_queue_dying() is done in blk_cleanup_queue(), we call blk_freeze_queue() and wait for q->q_usage_counter becoming zero. But if there are tasks blocked in get_request(), q->q_usage_counter can never become zero. So we have to wake up all these tasks in blk_set_queue_dying() first. Fixes: 3ef28e83ab157997 ("block: generic request_queue reference counting") Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e60e1ee60630cafef5e430c2ae364877e061d980 Merge: 5d352e6 f150891 Author: Linus Torvalds Date: Wed Nov 15 20:42:10 2017 -0800 Merge tag 'drm-for-v4.15' of git://people.freedesktop.org/~airlied/linux Pull drm updates from Dave Airlie: "This is the main drm pull request for v4.15. Core: - Atomic object lifetime fixes - Atomic iterator improvements - Sparse/smatch fixes - Legacy kms ioctls to be interruptible - EDID override improvements - fb/gem helper cleanups - Simple outreachy patches - Documentation improvements - Fix dma-buf rcu races - DRM mode object leasing for improving VR use cases. - vgaarb improvements for non-x86 platforms. New driver: - tve200: Faraday Technology TVE200 block. This "TV Encoder" encodes a ITU-T BT.656 stream and can be found in the StorLink SL3516 (later Cortina Systems CS3516) as well as the Grain Media GM8180. New bridges: - SiI9234 support New panels: - S6E63J0X03, OTM8009A, Seiko 43WVF1G, 7" rpi touch panel, Toshiba LT089AC19000, Innolux AT043TN24 i915: - Remove Coffeelake from alpha support - Cannonlake workarounds - Infoframe refactoring for DisplayPort - VBT updates - DisplayPort vswing/emph/buffer translation refactoring - CCS fixes - Restore GPU clock boost on missed vblanks - Scatter list updates for userptr allocations - Gen9+ transition watermarks - Display IPC (Isochronous Priority Control) - Private PAT management - GVT: improved error handling and pci config sanitizing - Execlist refactoring - Transparent Huge Page support - User defined priorities support - HuC/GuC firmware refactoring - DP MST fixes - eDP power sequencing fixes - Use RCU instead of stop_machine - PSR state tracking support - Eviction fixes - BDW DP aux channel timeout fixes - LSPCON fixes - Cannonlake PLL fixes amdgpu: - Per VM BO support - Powerplay cleanups - CI powerplay support - PASID mgr for kfd - SR-IOV fixes - initial GPU reset for vega10 - Prime mmap support - TTM updates - Clock query interface for Raven - Fence to handle ioctl - UVD encode ring support on Polaris - Transparent huge page DMA support - Compute LRU pipe tweaks - BO flag to allow buffers to opt out of implicit sync - CTX priority setting API - VRAM lost infrastructure plumbing qxl: - fix flicker since atomic rework amdkfd: - Further improvements from internal AMD tree - Usermode events - Drop radeon support nouveau: - Pascal temperature sensor support - Improved BAR2 handling - MMU rework to support Pascal MMU exynos: - Improved HDMI/mixer support - HDMI audio interface support tegra: - Prep work for tegra186 - Cleanup/fixes msm: - Preemption support for a5xx - Display fixes for 8x96 (snapdragon 820) - Async cursor plane fixes - FW loading rework - GPU debugging improvements vc4: - Prep for DSI panels - fix T-format tiling scanout - New madvise ioctl Rockchip: - LVDS support omapdrm: - omap4 HDMI CEC support etnaviv: - GPU performance counters groundwork sun4i: - refactor driver load + TCON backend - HDMI improvements - A31 support - Misc fixes udl: - Probe/EDID read fixes. tilcdc: - Misc fixes. pl111: - Support more variants adv7511: - Improve EDID handling. - HDMI CEC support sii8620: - Add remote control support" * tag 'drm-for-v4.15' of git://people.freedesktop.org/~airlied/linux: (1480 commits) drm/rockchip: analogix_dp: Use mutex rather than spinlock drm/mode_object: fix documentation for object lookups. drm/i915: Reorder context-close to avoid calling i915_vma_close() under RCU drm/i915: Move init_clock_gating() back to where it was drm/i915: Prune the reservation shared fence array drm/i915: Idle the GPU before shinking everything drm/i915: Lock llist_del_first() vs llist_del_all() drm/i915: Calculate ironlake intermediate watermarks correctly, v2. drm/i915: Disable lazy PPGTT page table optimization for vGPU drm/i915/execlists: Remove the priority "optimisation" drm/i915: Filter out spurious execlists context-switch interrupts drm/amdgpu: use irq-safe lock for kiq->ring_lock drm/amdgpu: bypass lru touch for KIQ ring submission drm/amdgpu: Potential uninitialized variable in amdgpu_vm_update_directories() drm/amdgpu: potential uninitialized variable in amdgpu_vce_ring_parse_cs() drm/amd/powerplay: initialize a variable before using it drm/amd/powerplay: suppress KASAN out of bounds warning in vega10_populate_all_memory_levels drm/amd/amdgpu: fix evicted VRAM bo adjudgement condition drm/vblank: Tune drm_crtc_accurate_vblank_count() WARN down to a debug drm/rockchip: add CONFIG_OF dependency for lvds ... commit 5d352e69c60e54b5f04d6e337a1d2bf0dbf3d94a Merge: 93ea0eb f2ecc3d Author: Linus Torvalds Date: Wed Nov 15 20:30:12 2017 -0800 Merge tag 'media/v4.15-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - Documentation for digital TV (both kAPI and uAPI) are now in sync with the implementation (except for legacy/deprecated ioctls). This is a major step, as there were always a gap there - New sensor driver: imx274 - New cec driver: cec-gpio - New platform driver for rockship rga and tegra CEC - New RC driver: tango-ir - Several cleanups at atomisp driver - Core improvements for RC, CEC, V4L2 async probing support and DVB - Lots of drivers cleanup, fixes and improvements. * tag 'media/v4.15-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (332 commits) dvb_frontend: don't use-after-free the frontend struct media: dib0700: fix invalid dvb_detach argument media: v4l2-ctrls: Don't validate BITMASK twice media: s5p-mfc: fix lockdep warning media: dvb-core: always call invoke_release() in fe_free() media: usb: dvb-usb-v2: dvb_usb_core: remove redundant code in dvb_usb_fe_sleep media: au0828: make const array addr_list static media: cx88: make const arrays default_addr_list and pvr2000_addr_list static media: drxd: make const array fastIncrDecLUT static media: usb: fix spelling mistake: "synchronuously" -> "synchronously" media: ddbridge: fix build warnings media: av7110: avoid 2038 overflow in debug print media: Don't do DMA on stack for firmware upload in the AS102 driver media: v4l: async: fix unregister for implicitly registered sub-device notifiers media: v4l: async: fix return of unitialized variable ret media: imx274: fix missing return assignment from call to imx274_mode_regs media: camss-vfe: always initialize reg at vfe_set_xbar_cfg() media: atomisp: make function calls cleaner media: atomisp: get rid of storage_class.h media: atomisp: get rid of wrong stddef.h include ... commit 93ea0eb7d77afab34657715630d692a78b8cea6a Merge: 7c225c6 a11949e Author: Linus Torvalds Date: Wed Nov 15 20:11:56 2017 -0800 Merge tag 'leaks-4.15-rc1' of git://github.com/tcharding/linux Pull leaking_addresses script updates from Tobin Harding: "Here are development patches for the leaking_addresses.pl script. Changes include: - add summary reporting to the script - add 'SigIgn' to false positives - add a file read timeout so the script doesn't block indefinitely - add infrastructure to enable multi-arch support and add support for ppc - add some exclude files/paths suggested by various people - code clean up and refactoring - overhaul command line options" * tag 'leaks-4.15-rc1' of git://github.com/tcharding/linux: leaking_addresses: add SigIgn to false positives leaking_addresses: add timeout on file read leaking_addresses: add support for ppc64 leaking_addresses: add summary reporting options leaking_addresses: add to exclude files/paths list leaking_addresses: fix comment string typo leaking_addresses: remove command line options leaking_addresses: remove dead/unused code leaking_addresses: use tabs instead of spaces commit 7c225c69f86c934e3be9be63ecde754e286838d7 Merge: 6363b3f 1b7176a Author: Linus Torvalds Date: Wed Nov 15 19:42:40 2017 -0800 Merge branch 'akpm' (patches from Andrew) Merge updates from Andrew Morton: - a few misc bits - ocfs2 updates - almost all of MM * emailed patches from Andrew Morton : (131 commits) memory hotplug: fix comments when adding section mm: make alloc_node_mem_map a void call if we don't have CONFIG_FLAT_NODE_MEM_MAP mm: simplify nodemask printing mm,oom_reaper: remove pointless kthread_run() error check mm/page_ext.c: check if page_ext is not prepared writeback: remove unused function parameter mm: do not rely on preempt_count in print_vma_addr mm, sparse: do not swamp log with huge vmemmap allocation failures mm/hmm: remove redundant variable align_end mm/list_lru.c: mark expected switch fall-through mm/shmem.c: mark expected switch fall-through mm/page_alloc.c: broken deferred calculation mm: don't warn about allocations which stall for too long fs: fuse: account fuse_inode slab memory as reclaimable mm, page_alloc: fix potential false positive in __zone_watermark_ok mm: mlock: remove lru_add_drain_all() mm, sysctl: make NUMA stats configurable shmem: convert shmem_init_inodecache() to void Unify migrate_pages and move_pages access checks mm, pagevec: rename pagevec drained field ... commit 49e37ba07a3ae697086c0a1a32c113a1f177d138 Merge: 4479ed4 00f713c Author: Dave Airlie Date: Thu Nov 16 12:39:40 2017 +1000 Merge branch 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux into drm-next Various fixes for DC for 4.15. * 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux: drm/amd/display: fix MST link training fail division by 0 drm/amd/display: Fix formatting for null pointer dereference fix drm/amd/display: Remove dangling planes on dc commit state drm/amd/display: add flip_immediate to commit update for stream drm/amd/display: Miss register MST encoder cbs drm/amd/display: Fix warnings on S3 resume drm/amd/display: use num_timing_generator instead of pipe_count drm/amd/display: use configurable FBC option in dm drm/amd/display: fix AZ clock not enabled before program AZ endpoint amdgpu/dm: Don't use DRM_ERROR in amdgpu_dm_atomic_check commit 1b7176aea0a924ac59c6a283129d3e8eb00aa915 Author: Fan Du Date: Wed Nov 15 17:39:21 2017 -0800 memory hotplug: fix comments when adding section Here, pfn_to_node should be page_to_nid. Link: http://lkml.kernel.org/r/1510735205-22540-1-git-send-email-fan.du@intel.com Signed-off-by: Fan Du Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0cd842f97069c68718bef21ad2dc96a0578567ec Author: Oscar Salvador Date: Wed Nov 15 17:39:18 2017 -0800 mm: make alloc_node_mem_map a void call if we don't have CONFIG_FLAT_NODE_MEM_MAP free_area_init_node() calls alloc_node_mem_map(), but this function does nothing unless we have CONFIG_FLAT_NODE_MEM_MAP. As a cleanup, we can move the "#ifdef CONFIG_FLAT_NODE_MEM_MAP" within alloc_node_mem_map() out of the function, and define a alloc_node_mem_map() { } when CONFIG_FLAT_NODE_MEM_MAP is not present. This also moves the printk that lays within the "#ifdef CONFIG_FLAT_NODE_MEM_MAP" block from free_area_init_node() to alloc_node_mem_map(), getting rid of the "#ifdef CONFIG_FLAT_NODE_MEM_MAP" in free_area_init_node(). [akpm@linux-foundation.org: clean up the printk while we're there] Link: http://lkml.kernel.org/r/20171114111935.GA11758@techadventures.net Signed-off-by: Oscar Salvador Acked-by: Michal Hocko Cc: Mel Gorman Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 0205f75571e3a70c35f0dd5e608773cce97d9dbb Author: Michal Hocko Date: Wed Nov 15 17:39:14 2017 -0800 mm: simplify nodemask printing alloc_warn() and dump_header() have to explicitly handle NULL nodemask which forces both paths to use pr_cont. We can do better. printk already handles NULL pointers properly so all we need is to teach nodemask_pr_args to handle NULL nodemask carefully. This allows simplification of both alloc_warn() and dump_header() and gets rid of pr_cont altogether. This patch has been motivated by patch from Joe Perches http://lkml.kernel.org/r/b31236dfe3fc924054fd7842bde678e71d193638.1509991345.git.joe@perches.com [akpm@linux-foundation.org: fix tile warning, per Arnd] Link: http://lkml.kernel.org/r/20171109100531.3cn2hcqnuj7mjaju@dhcp22.suse.cz Signed-off-by: Michal Hocko Acked-by: Joe Perches Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/nodemask.h | 4 +++- mm/oom_kill.c | 12 ++++-------- mm/page_alloc.c | 12 +++--------- 3 files changed, 10 insertions(+), 18 deletions(-) commit c50842c8e1cddcdb69d3ece4f4df005a0e6c5ceb Author: Tetsuo Handa Date: Wed Nov 15 17:39:10 2017 -0800 mm,oom_reaper: remove pointless kthread_run() error check Since oom_init() is called before userspace processes start, memory allocation failure for creating the OOM reaper kernel thread will let the OOM killer call panic() rather than wake up the OOM reaper. Link: http://lkml.kernel.org/r/1510137800-4602-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 8 -------- 1 file changed, 8 deletions(-) commit e492080e640c2d1235ddf3441cae634cfffef7e1 Author: Jaewon Kim Date: Wed Nov 15 17:39:07 2017 -0800 mm/page_ext.c: check if page_ext is not prepared online_page_ext() and page_ext_init() allocate page_ext for each section, but they do not allocate if the first PFN is !pfn_present(pfn) or !pfn_valid(pfn). Then section->page_ext remains as NULL. lookup_page_ext checks NULL only if CONFIG_DEBUG_VM is enabled. For a valid PFN, __set_page_owner will try to get page_ext through lookup_page_ext. Without CONFIG_DEBUG_VM lookup_page_ext will misuse NULL pointer as value 0. This incurrs invalid address access. This is the panic example when PFN 0x100000 is not valid but PFN 0x13FC00 is being used for page_ext. section->page_ext is NULL, get_entry returned invalid page_ext address as 0x1DFA000 for a PFN 0x13FC00. To avoid this panic, CONFIG_DEBUG_VM should be removed so that page_ext will be checked at all times. Unable to handle kernel paging request at virtual address 01dfa014 ------------[ cut here ]------------ Kernel BUG at ffffff80082371e0 [verbose debug info unavailable] Internal error: Oops: 96000045 [#1] PREEMPT SMP Modules linked in: PC is at __set_page_owner+0x48/0x78 LR is at __set_page_owner+0x44/0x78 __set_page_owner+0x48/0x78 get_page_from_freelist+0x880/0x8e8 __alloc_pages_nodemask+0x14c/0xc48 __do_page_cache_readahead+0xdc/0x264 filemap_fault+0x2ac/0x550 ext4_filemap_fault+0x3c/0x58 __do_fault+0x80/0x120 handle_mm_fault+0x704/0xbb0 do_page_fault+0x2e8/0x394 do_mem_abort+0x88/0x124 Pre-4.7 kernels also need commit f86e4271978b ("mm: check the return value of lookup_page_ext for all call sites"). Link: http://lkml.kernel.org/r/20171107094131.14621-1-jaewon31.kim@samsung.com Fixes: eefa864b701d ("mm/page_ext: resurrect struct page extending code for debugging") Signed-off-by: Jaewon Kim Acked-by: Michal Hocko Cc: Vlastimil Babka Cc: Minchan Kim Cc: Joonsoo Kim Cc: [depends on f86e427197, see above] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_ext.c | 4 ---- 1 file changed, 4 deletions(-) commit 2bce774e8245e95db81872ec39522cde8b486fc8 Author: Wang Long Date: Wed Nov 15 17:39:03 2017 -0800 writeback: remove unused function parameter The parameter `struct bdi_writeback *wb` is not been used in the function body. Remove it. Link: http://lkml.kernel.org/r/1509685485-15278-1-git-send-email-wanglong19@meituan.com Signed-off-by: Wang Long Reviewed-by: Jan Kara Acked-by: Tejun Heo Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/backing-dev.h | 2 +- mm/page-writeback.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 0a7f682d04652fd91de0cbc1ea3d7aa1e45611c7 Author: Michal Hocko Date: Wed Nov 15 17:38:59 2017 -0800 mm: do not rely on preempt_count in print_vma_addr The preempt count check on print_vma_addr has been added by commit e8bff74afbdb ("x86: fix "BUG: sleeping function called from invalid context" in print_vma_addr()") and it relied on the elevated preempt count from preempt_conditional_sti because preempt_count check doesn't work on non preemptive kernels by default. The code has evolved though and commit d99e1bd175f4 ("x86/entry/traps: Refactor preemption and interrupt flag handling") has replaced preempt_conditional_sti by an explicit preempt_disable which is noop on !PREEMPT so the check in print_vma_addr is broken. Fix the issue by using trylock on mmap_sem rather than chacking the preempt count. The allocation we are relying on has to be GFP_NOWAIT as well. There is a chance that we won't dump the vma state if the lock is contended or the memory short but this is acceptable outcome and much less fragile than the not working preemption check or tricks around it. Link: http://lkml.kernel.org/r/20171106134031.g6dbelg55mrbyc6i@dhcp22.suse.cz Fixes: d99e1bd175f4 ("x86/entry/traps: Refactor preemption and interrupt flag handling") Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Acked-by: Yang Shi Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit fcdaf842bd8f538a88059ce0243bc2822ed1b0e0 Author: Michal Hocko Date: Wed Nov 15 17:38:56 2017 -0800 mm, sparse: do not swamp log with huge vmemmap allocation failures While doing memory hotplug tests under heavy memory pressure we have noticed too many page allocation failures when allocating vmemmap memmap backed by huge page kworker/u3072:1: page allocation failure: order:9, mode:0x24084c0(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO) [...] Call Trace: dump_trace+0x59/0x310 show_stack_log_lvl+0xea/0x170 show_stack+0x21/0x40 dump_stack+0x5c/0x7c warn_alloc_failed+0xe2/0x150 __alloc_pages_nodemask+0x3ed/0xb20 alloc_pages_current+0x7f/0x100 vmemmap_alloc_block+0x79/0xb6 __vmemmap_alloc_block_buf+0x136/0x145 vmemmap_populate+0xd2/0x2b9 sparse_mem_map_populate+0x23/0x30 sparse_add_one_section+0x68/0x18e __add_pages+0x10a/0x1d0 arch_add_memory+0x4a/0xc0 add_memory_resource+0x89/0x160 add_memory+0x6d/0xd0 acpi_memory_device_add+0x181/0x251 acpi_bus_attach+0xfd/0x19b acpi_bus_scan+0x59/0x69 acpi_device_hotplug+0xd2/0x41f acpi_hotplug_work_fn+0x1a/0x23 process_one_work+0x14e/0x410 worker_thread+0x116/0x490 kthread+0xbd/0xe0 ret_from_fork+0x3f/0x70 and we do see many of those because essentially every allocation fails for each memory section. This is an excessive way to tell the user that there is nothing to really worry about because we do have a fallback mechanism to use base pages. The only downside might be a performance degradation due to TLB pressure. This patch changes vmemmap_alloc_block() to use __GFP_NOWARN and warn explicitly once on the first allocation failure. This will reduce the noise in the kernel log considerably, while we still have an indication that a performance might be impacted. [mhocko@kernel.org: forgot to git add the follow up fix] Link: http://lkml.kernel.org/r/20171107090635.c27thtse2lchjgvb@dhcp22.suse.cz Link: http://lkml.kernel.org/r/20171106092228.31098-1-mhocko@kernel.org Signed-off-by: Johannes Weiner Signed-off-by: Michal Hocko Cc: Joe Perches Cc: Vlastimil Babka Cc: Khalid Aziz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/init_64.c | 1 - mm/sparse-vmemmap.c | 12 ++++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) commit fec11bc0396bbd82b152e6ce9a47483ffd69462a Author: Colin Ian King Date: Wed Nov 15 17:38:52 2017 -0800 mm/hmm: remove redundant variable align_end Variable align_end is assigned a value but it is never read, so the variable is redundant and can be removed. Cleans up the clang warning: Value stored to 'align_end' is never read Link: http://lkml.kernel.org/r/20171017143837.23207-1-colin.king@canonical.com Signed-off-by: Colin Ian King Reviewed-by: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hmm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5b568acc3c2328f7d8da3cb03b4ef343f93545c6 Author: Gustavo A. R. Silva Date: Wed Nov 15 17:38:49 2017 -0800 mm/list_lru.c: mark expected switch fall-through In preparation for enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Link: http://lkml.kernel.org/r/20171020190754.GA24332@embeddedor.com Signed-off-by: Gustavo A. R. Silva Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/list_lru.c | 1 + 1 file changed, 1 insertion(+) commit c8402871d54a8e00016e040c1b8f5d31e96fcd94 Author: Gustavo A. R. Silva Date: Wed Nov 15 17:38:45 2017 -0800 mm/shmem.c: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Link: http://lkml.kernel.org/r/20171020191058.GA24427@embeddedor.com Signed-off-by: Gustavo A. R. Silva Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 1 + 1 file changed, 1 insertion(+) commit d135e5750205a21a212a19dbb05aeb339e2cbea7 Author: Pavel Tatashin Date: Wed Nov 15 17:38:41 2017 -0800 mm/page_alloc.c: broken deferred calculation In reset_deferred_meminit() we determine number of pages that must not be deferred. We initialize pages for at least 2G of memory, but also pages for reserved memory in this node. The reserved memory is determined in this function: memblock_reserved_memory_within(), which operates over physical addresses, and returns size in bytes. However, reset_deferred_meminit() assumes that that this function operates with pfns, and returns page count. The result is that in the best case machine boots slower than expected due to initializing more pages than needed in single thread, and in the worst case panics because fewer than needed pages are initialized early. Link: http://lkml.kernel.org/r/20171021011707.15191-1-pasha.tatashin@oracle.com Fixes: 864b9a393dcb ("mm: consider memblock reservations for deferred memory initialization sizing") Signed-off-by: Pavel Tatashin Acked-by: Michal Hocko Cc: Mel Gorman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 3 ++- mm/page_alloc.c | 27 ++++++++++++++++++--------- 2 files changed, 20 insertions(+), 10 deletions(-) commit 400e22499dd92613821374c8c6c88c7225359980 Author: Tetsuo Handa Date: Wed Nov 15 17:38:37 2017 -0800 mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft lockups when many threads concurrently called warn_alloc() (in order to warn about memory allocation stalls) due to current implementation of printk(), and it is difficult to obtain useful information due to limitation of synchronous warning approach. Current printk() implementation flushes all pending logs using the context of a thread which called console_unlock(). printk() should be able to flush all pending logs eventually unless somebody continues appending to printk() buffer. Since warn_alloc() started appending to printk() buffer while waiting for oom_kill_process() to make forward progress when oom_kill_process() is processing pending logs, it became possible for warn_alloc() to force oom_kill_process() loop inside printk(). As a result, warn_alloc() significantly increased possibility of preventing oom_kill_process() from making forward progress. ---------- Pseudo code start ---------- Before warn_alloc() was introduced: retry: if (mutex_trylock(&oom_lock)) { while (atomic_read(&printk_pending_logs) > 0) { atomic_dec(&printk_pending_logs); print_one_log(); } // Send SIGKILL here. mutex_unlock(&oom_lock) } goto retry; After warn_alloc() was introduced: retry: if (mutex_trylock(&oom_lock)) { while (atomic_read(&printk_pending_logs) > 0) { atomic_dec(&printk_pending_logs); print_one_log(); } // Send SIGKILL here. mutex_unlock(&oom_lock) } else if (waited_for_10seconds()) { atomic_inc(&printk_pending_logs); } goto retry; ---------- Pseudo code end ---------- Although waited_for_10seconds() becomes true once per 10 seconds, unbounded number of threads can call waited_for_10seconds() at the same time. Also, since threads doing waited_for_10seconds() keep doing almost busy loop, the thread doing print_one_log() can use little CPU resource. Therefore, this situation can be simplified like ---------- Pseudo code start ---------- retry: if (mutex_trylock(&oom_lock)) { while (atomic_read(&printk_pending_logs) > 0) { atomic_dec(&printk_pending_logs); print_one_log(); } // Send SIGKILL here. mutex_unlock(&oom_lock) } else { atomic_inc(&printk_pending_logs); } goto retry; ---------- Pseudo code end ---------- when printk() is called faster than print_one_log() can process a log. One of possible mitigation would be to introduce a new lock in order to make sure that no other series of printk() (either oom_kill_process() or warn_alloc()) can append to printk() buffer when one series of printk() (either oom_kill_process() or warn_alloc()) is already in progress. Such serialization will also help obtaining kernel messages in readable form. ---------- Pseudo code start ---------- retry: if (mutex_trylock(&oom_lock)) { mutex_lock(&oom_printk_lock); while (atomic_read(&printk_pending_logs) > 0) { atomic_dec(&printk_pending_logs); print_one_log(); } // Send SIGKILL here. mutex_unlock(&oom_printk_lock); mutex_unlock(&oom_lock) } else { if (mutex_trylock(&oom_printk_lock)) { atomic_inc(&printk_pending_logs); mutex_unlock(&oom_printk_lock); } } goto retry; ---------- Pseudo code end ---------- But this commit does not go that direction, for we don't want to introduce a new lock dependency, and we unlikely be able to obtain useful information even if we serialized oom_kill_process() and warn_alloc(). Synchronous approach is prone to unexpected results (e.g. too late [1], too frequent [2], overlooked [3]). As far as I know, warn_alloc() never helped with providing information other than "something is going wrong". I want to consider asynchronous approach which can obtain information during stalls with possibly relevant threads (e.g. the owner of oom_lock and kswapd-like threads) and serve as a trigger for actions (e.g. turn on/off tracepoints, ask libvirt daemon to take a memory dump of stalling KVM guest for diagnostic purpose). This commit temporarily loses ability to report e.g. OOM lockup due to unable to invoke the OOM killer due to !__GFP_FS allocation request. But asynchronous approach will be able to detect such situation and emit warning. Thus, let's remove warn_alloc(). [1] https://bugzilla.kernel.org/show_bug.cgi?id=192981 [2] http://lkml.kernel.org/r/CAM_iQpWuPVGc2ky8M-9yukECtS+zKjiDasNymX7rMcBjBFyM_A@mail.gmail.com [3] commit db73ee0d46379922 ("mm, vmscan: do not loop on too_many_isolated for ever")) Link: http://lkml.kernel.org/r/1509017339-4802-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Reported-by: Cong Wang Reported-by: yuwang.yuwang Reported-by: Johannes Weiner Acked-by: Michal Hocko Acked-by: Johannes Weiner Cc: Vlastimil Babka Cc: Mel Gorman Cc: Dave Hansen Cc: Sergey Senozhatsky Cc: Petr Mladek Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 10 ---------- 1 file changed, 10 deletions(-) commit df206988e03e8510e08b2ee77f3e65010ed97768 Author: Johannes Weiner Date: Wed Nov 15 17:38:34 2017 -0800 fs: fuse: account fuse_inode slab memory as reclaimable Fuse inodes are currently included in the unreclaimable slab counts - SUnreclaim in /proc/meminfo, slab_unreclaimable in /proc/vmstat and the per-cgroup memory.stat. But they are reclaimable just like other filesystems' inodes, and /proc/sys/vm/drop_caches frees them easily. Mark the slab cache reclaimable. Link: http://lkml.kernel.org/r/20171102202727.12539-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Cc: Miklos Szeredi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/fuse/inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b050e3769c6b4013bb937e879fc43bf1847ee819 Author: Vlastimil Babka Date: Wed Nov 15 17:38:30 2017 -0800 mm, page_alloc: fix potential false positive in __zone_watermark_ok Since commit 97a16fc82a7c ("mm, page_alloc: only enforce watermarks for order-0 allocations"), __zone_watermark_ok() check for high-order allocations will shortcut per-migratetype free list checks for ALLOC_HARDER allocations, and return true as long as there's free page of any migratetype. The intention is that ALLOC_HARDER can allocate from MIGRATE_HIGHATOMIC free lists, while normal allocations can't. However, as a side effect, the watermark check will then also return true when there are pages only on the MIGRATE_ISOLATE list, or (prior to CMA conversion to ZONE_MOVABLE) on the MIGRATE_CMA list. Since the allocation cannot actually obtain isolated pages, and might not be able to obtain CMA pages, this can result in a false positive. The condition should be rare and perhaps the outcome is not a fatal one. Still, it's better if the watermark check is correct. There also shouldn't be a performance tradeoff here. Link: http://lkml.kernel.org/r/20171102125001.23708-1-vbabka@suse.cz Fixes: 97a16fc82a7c ("mm, page_alloc: only enforce watermarks for order-0 allocations") Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Cc: Joonsoo Kim Cc: Rik van Riel Cc: David Rientjes Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 72b03fcd5d515441d4aefcad01c1c4392c8099c9 Author: Shakeel Butt Date: Wed Nov 15 17:38:26 2017 -0800 mm: mlock: remove lru_add_drain_all() lru_add_drain_all() is not required by mlock() and it will drain everything that has been cached at the time mlock is called. And that is not really related to the memory which will be faulted in (and cached) and mlocked by the syscall itself. If anything lru_add_drain_all() should be called _after_ pages have been mlocked and faulted in but even that is not strictly needed because those pages would get to the appropriate LRUs lazily during the reclaim path. Moreover follow_page_pte (gup) will drain the local pcp LRU cache. On larger machines the overhead of lru_add_drain_all() in mlock() can be significant when mlocking data already in memory. We have observed high latency in mlock() due to lru_add_drain_all() when the users were mlocking in memory tmpfs files. [mhocko@suse.com: changelog fix] Link: http://lkml.kernel.org/r/20171019222507.2894-1-shakeelb@google.com Signed-off-by: Shakeel Butt Acked-by: Michal Hocko Acked-by: Balbir Singh Acked-by: Vlastimil Babka Cc: "Kirill A. Shutemov" Cc: Joonsoo Kim Cc: Minchan Kim Cc: Yisheng Xie Cc: Ingo Molnar Cc: Greg Thelen Cc: Hugh Dickins Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mlock.c | 5 ----- 1 file changed, 5 deletions(-) commit 4518085e127dff97e74f74a8780d7564e273bec8 Author: Kemi Wang Date: Wed Nov 15 17:38:22 2017 -0800 mm, sysctl: make NUMA stats configurable This is the second step which introduces a tunable interface that allow numa stats configurable for optimizing zone_statistics(), as suggested by Dave Hansen and Ying Huang. ========================================================================= When page allocation performance becomes a bottleneck and you can tolerate some possible tool breakage and decreased numa counter precision, you can do: echo 0 > /proc/sys/vm/numa_stat In this case, numa counter update is ignored. We can see about *4.8%*(185->176) drop of cpu cycles per single page allocation and reclaim on Jesper's page_bench01 (single thread) and *8.1%*(343->315) drop of cpu cycles per single page allocation and reclaim on Jesper's page_bench03 (88 threads) running on a 2-Socket Broadwell-based server (88 threads, 126G memory). Benchmark link provided by Jesper D Brouer (increase loop times to 10000000): https://github.com/netoptimizer/prototype-kernel/tree/master/kernel/mm/bench ========================================================================= When page allocation performance is not a bottleneck and you want all tooling to work, you can do: echo 1 > /proc/sys/vm/numa_stat This is system default setting. Many thanks to Michal Hocko, Dave Hansen, Ying Huang and Vlastimil Babka for comments to help improve the original patch. [keescook@chromium.org: make sure mutex is a global static] Link: http://lkml.kernel.org/r/20171107213809.GA4314@beast Link: http://lkml.kernel.org/r/1508290927-8518-1-git-send-email-kemi.wang@intel.com Signed-off-by: Kemi Wang Signed-off-by: Kees Cook Reported-by: Jesper Dangaard Brouer Suggested-by: Dave Hansen Suggested-by: Ying Huang Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: "Luis R . Rodriguez" Cc: Kees Cook Cc: Jonathan Corbet Cc: Mel Gorman Cc: Johannes Weiner Cc: Christopher Lameter Cc: Sebastian Andrzej Siewior Cc: Andrey Ryabinin Cc: Tim Chen Cc: Andi Kleen Cc: Aaron Lu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/sysctl/vm.txt | 16 ++++++++++ include/linux/vmstat.h | 10 +++++++ kernel/sysctl.c | 9 ++++++ mm/mempolicy.c | 3 ++ mm/page_alloc.c | 6 ++++ mm/vmstat.c | 71 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 115 insertions(+) commit 9a8ec03ed022b79e56dca820cf04debbb240c7b3 Author: weiping zhang Date: Wed Nov 15 17:38:18 2017 -0800 shmem: convert shmem_init_inodecache() to void shmem_inode_cachep was created with SLAB_PANIC flag and shmem_init_inodecache() never returns non-zero, so convert this function to return void. Link: http://lkml.kernel.org/r/20170909124542.GA35224@bogon.didichuxing.com Signed-off-by: weiping zhang Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 313674661925ee265f16570c893ea13cb9e00b82 Author: Otto Ebeling Date: Wed Nov 15 17:38:14 2017 -0800 Unify migrate_pages and move_pages access checks Commit 197e7e521384 ("Sanitize 'move_pages()' permission checks") fixed a security issue I reported in the move_pages syscall, and made it so that you can't act on set-uid processes unless you have the CAP_SYS_PTRACE capability. Unify the access check logic of migrate_pages to match the new behavior of move_pages. We discussed this a bit in the security@ list and thought it'd be good for consistency even though there's no evident security impact. The NUMA node access checks are left intact and require CAP_SYS_NICE as before. Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1710011830320.6333@lakka.kapsi.fi Signed-off-by: Otto Ebeling Acked-by: Michal Hocko Cc: Eric W. Biederman Cc: Willy Tarreau Cc: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempolicy.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 7f0b5fb953e750a7410cc96c67a656d79db48bcb Author: Mel Gorman Date: Wed Nov 15 17:38:10 2017 -0800 mm, pagevec: rename pagevec drained field According to Vlastimil Babka, the drained field in pagevec is potentially misleading because it might be interpreted as draining this pagevec instead of the percpu lru pagevecs. Rename the field for clarity. Link: http://lkml.kernel.org/r/20171019093346.ylahzdpzmoriyf4v@techsingularity.net Signed-off-by: Mel Gorman Suggested-by: Vlastimil Babka Cc: Andi Kleen Cc: Dave Chinner Cc: Dave Hansen Cc: Jan Kara Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pagevec.h | 4 ++-- mm/swap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0fac3ba527f23219678c7c10c767e37d40127b51 Author: Vlastimil Babka Date: Wed Nov 15 17:38:07 2017 -0800 mm, page_alloc: simplify list handling in rmqueue_bulk() rmqueue_bulk() fills an empty pcplist with pages from the free list. It tries to preserve increasing order by pfn to the caller, because it leads to better performance with some I/O controllers, as explained in commit e084b2d95e48 ("page-allocator: preserve PFN ordering when __GFP_COLD is set"). To preserve the order, it's sufficient to add pages to the tail of the list as they are retrieved. The current code instead adds to the head of the list, but then updates the list head pointer to the last added page, in each step. This does result in the same order, but is needlessly confusing and potentially wasteful, with no apparent benefit. This patch simplifies the code and adjusts comment accordingly. Link: http://lkml.kernel.org/r/f6505442-98a9-12e4-b2cd-0fa83874c159@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Mel Gorman Cc: Andi Kleen Cc: Dave Chinner Cc: Dave Hansen Cc: Jan Kara Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 453f85d43fa9ee243f0fc3ac4e1be45615301e3f Author: Mel Gorman Date: Wed Nov 15 17:38:03 2017 -0800 mm: remove __GFP_COLD As the page free path makes no distinction between cache hot and cold pages, there is no real useful ordering of pages in the free list that allocation requests can take advantage of. Juding from the users of __GFP_COLD, it is likely that a number of them are the result of copying other sites instead of actually measuring the impact. Remove the __GFP_COLD parameter which simplifies a number of paths in the page allocator. This is potentially controversial but bear in mind that the size of the per-cpu pagelists versus modern cache sizes means that the whole per-cpu list can often fit in the L3 cache. Hence, there is only a potential benefit for microbenchmarks that alloc/free pages in a tight loop. It's even worse when THP is taken into account which has little or no chance of getting a cache-hot page as the per-cpu list is bypassed and the zeroing of multiple pages will thrash the cache anyway. The truncate microbenchmarks are not shown as this patch affects the allocation path and not the free path. A page fault microbenchmark was tested but it showed no sigificant difference which is not surprising given that the __GFP_COLD branches are a miniscule percentage of the fault path. Link: http://lkml.kernel.org/r/20171018075952.10627-9-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Andi Kleen Cc: Dave Chinner Cc: Dave Hansen Cc: Jan Kara Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- drivers/net/ethernet/amd/xgbe/xgbe-desc.c | 2 +- drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 3 +-- .../net/ethernet/cavium/liquidio/octeon_network.h | 2 +- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 5 ++--- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 4 ++-- drivers/net/ethernet/qlogic/qlge/qlge_main.c | 3 +-- drivers/net/ethernet/sfc/falcon/rx.c | 2 +- drivers/net/ethernet/sfc/rx.c | 2 +- drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c | 2 +- drivers/net/ethernet/ti/netcp_core.c | 2 +- drivers/net/virtio_net.c | 1 - drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- fs/cachefiles/rdwr.c | 6 ++---- include/linux/gfp.h | 5 ----- include/linux/pagemap.h | 8 +------- include/linux/skbuff.h | 2 +- include/linux/slab.h | 3 --- include/trace/events/mmflags.h | 1 - kernel/power/snapshot.c | 4 ++-- mm/filemap.c | 6 +++--- mm/page_alloc.c | 20 ++++++-------------- mm/percpu-vm.c | 2 +- net/core/skbuff.c | 4 ++-- tools/perf/builtin-kmem.c | 1 - 25 files changed, 32 insertions(+), 62 deletions(-) commit 2d4894b5d2ae0fe1725ea7abd57b33bfbbe45492 Author: Mel Gorman Date: Wed Nov 15 17:37:59 2017 -0800 mm: remove cold parameter from free_hot_cold_page* Most callers users of free_hot_cold_page claim the pages being released are cache hot. The exception is the page reclaim paths where it is likely that enough pages will be freed in the near future that the per-cpu lists are going to be recycled and the cache hotness information is lost. As no one really cares about the hotness of pages being released to the allocator, just ditch the parameter. The APIs are renamed to indicate that it's no longer about hot/cold pages. It should also be less confusing as there are subtle differences between them. __free_pages drops a reference and frees a page when the refcount reaches zero. free_hot_cold_page handled pages whose refcount was already zero which is non-obvious from the name. free_unref_page should be more obvious. No performance impact is expected as the overhead is marginal. The parameter is removed simply because it is a bit stupid to have a useless parameter copied everywhere. [mgorman@techsingularity.net: add pages to head, not tail] Link: http://lkml.kernel.org/r/20171019154321.qtpzaeftoyyw4iey@techsingularity.net Link: http://lkml.kernel.org/r/20171018075952.10627-8-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Andi Kleen Cc: Dave Chinner Cc: Dave Hansen Cc: Jan Kara Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/mm/mmu_context_book3s64.c | 2 +- arch/powerpc/mm/pgtable_64.c | 2 +- arch/sparc/mm/init_64.c | 2 +- arch/tile/mm/homecache.c | 2 +- include/linux/gfp.h | 4 ++-- include/trace/events/kmem.h | 11 ++++------- mm/page_alloc.c | 29 ++++++++++++----------------- mm/rmap.c | 2 +- mm/swap.c | 4 ++-- mm/vmscan.c | 6 +++--- 10 files changed, 28 insertions(+), 36 deletions(-) commit c6f92f9fbe7dbcc8903a67229aa88b4077ae4422 Author: Mel Gorman Date: Wed Nov 15 17:37:55 2017 -0800 mm: remove cold parameter for release_pages All callers of release_pages claim the pages being released are cache hot. As no one cares about the hotness of pages being released to the allocator, just ditch the parameter. No performance impact is expected as the overhead is marginal. The parameter is removed simply because it is a bit stupid to have a useless parameter copied everywhere. Link: http://lkml.kernel.org/r/20171018075952.10627-7-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Andi Kleen Cc: Dave Chinner Cc: Dave Hansen Cc: Jan Kara Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 ++---- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 6 +++--- drivers/gpu/drm/i915/i915_gem_userptr.c | 4 ++-- drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- fs/fuse/dev.c | 2 +- include/linux/pagemap.h | 2 +- include/linux/swap.h | 2 +- mm/swap.c | 8 ++++---- mm/swap_state.c | 2 +- 11 files changed, 18 insertions(+), 20 deletions(-) commit 8667982014d6048e0b5e286b6247ff24f48d4cc6 Author: Mel Gorman Date: Wed Nov 15 17:37:52 2017 -0800 mm, pagevec: remove cold parameter for pagevecs Every pagevec_init user claims the pages being released are hot even in cases where it is unlikely the pages are hot. As no one cares about the hotness of pages being released to the allocator, just ditch the parameter. No performance impact is expected as the overhead is marginal. The parameter is removed simply because it is a bit stupid to have a useless parameter copied everywhere. Link: http://lkml.kernel.org/r/20171018075952.10627-6-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Cc: Andi Kleen Cc: Dave Chinner Cc: Dave Hansen Cc: Jan Kara Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- fs/afs/write.c | 4 ++-- fs/btrfs/extent_io.c | 4 ++-- fs/buffer.c | 4 ++-- fs/cachefiles/rdwr.c | 4 ++-- fs/ceph/addr.c | 4 ++-- fs/dax.c | 2 +- fs/ext4/inode.c | 6 +++--- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/data.c | 2 +- fs/f2fs/node.c | 8 ++++---- fs/fscache/page.c | 2 +- fs/gfs2/aops.c | 2 +- fs/hugetlbfs/inode.c | 2 +- fs/nilfs2/btree.c | 2 +- fs/nilfs2/page.c | 8 ++++---- fs/nilfs2/segment.c | 4 ++-- include/linux/pagevec.h | 4 +--- mm/filemap.c | 2 +- mm/mlock.c | 4 ++-- mm/page-writeback.c | 2 +- mm/shmem.c | 6 +++--- mm/swap.c | 4 ++-- mm/truncate.c | 8 ++++---- 24 files changed, 45 insertions(+), 47 deletions(-) commit d9ed0d08b6c6a882da1d8e75bb3162fc889fd199 Author: Mel Gorman Date: Wed Nov 15 17:37:48 2017 -0800 mm: only drain per-cpu pagevecs once per pagevec usage When a pagevec is initialised on the stack, it is generally used multiple times over a range of pages, looking up entries and then releasing them. On each pagevec_release, the per-cpu deferred LRU pagevecs are drained on the grounds the page being released may be on those queues and the pages may be cache hot. In many cases only the first drain is necessary as it's unlikely that the range of pages being walked is racing against LRU addition. Even if there is such a race, the impact is marginal where as constantly redraining the lru pagevecs costs. This patch ensures that pagevec is only drained once in a given lifecycle without increasing the cache footprint of the pagevec structure. Only sparsetruncate tiny is shown here as large files have many exceptional entries and calls pagecache_release less frequently. sparsetruncate (tiny) 4.14.0-rc4 4.14.0-rc4 batchshadow-v1r1 onedrain-v1r1 Min Time 141.00 ( 0.00%) 141.00 ( 0.00%) 1st-qrtle Time 142.00 ( 0.00%) 142.00 ( 0.00%) 2nd-qrtle Time 142.00 ( 0.00%) 142.00 ( 0.00%) 3rd-qrtle Time 143.00 ( 0.00%) 143.00 ( 0.00%) Max-90% Time 144.00 ( 0.00%) 144.00 ( 0.00%) Max-95% Time 146.00 ( 0.00%) 145.00 ( 0.68%) Max-99% Time 198.00 ( 0.00%) 194.00 ( 2.02%) Max Time 254.00 ( 0.00%) 208.00 ( 18.11%) Amean Time 145.12 ( 0.00%) 144.30 ( 0.56%) Stddev Time 12.74 ( 0.00%) 9.62 ( 24.49%) Coeff Time 8.78 ( 0.00%) 6.67 ( 24.06%) Best99%Amean Time 144.29 ( 0.00%) 143.82 ( 0.32%) Best95%Amean Time 142.68 ( 0.00%) 142.31 ( 0.26%) Best90%Amean Time 142.52 ( 0.00%) 142.19 ( 0.24%) Best75%Amean Time 142.26 ( 0.00%) 141.98 ( 0.20%) Best50%Amean Time 141.90 ( 0.00%) 141.71 ( 0.13%) Best25%Amean Time 141.80 ( 0.00%) 141.43 ( 0.26%) The impact on bonnie is marginal and within the noise because a significant percentage of the file being truncated has been reclaimed and consists of shadow entries which reduce the hotness of the pagevec_release path. Link: http://lkml.kernel.org/r/20171018075952.10627-5-mgorman@techsingularity.net Signed-off-by: Mel Gorman Cc: Andi Kleen Cc: Dave Chinner Cc: Dave Hansen Cc: Jan Kara Cc: Johannes Weiner Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pagevec.h | 4 +++- mm/swap.c | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) commit f2187599189d94aeeee2fa5d9806186c7732ed37 Author: Mel Gorman Date: Wed Nov 15 17:37:44 2017 -0800 mm, truncate: remove all exceptional entries from pagevec under one lock During truncate each entry in a pagevec is checked to see if it is an exceptional entry and if so, the shadow entry is cleaned up. This is potentially expensive as multiple entries for a mapping locks/unlocks the tree lock. This batches the operation such that any exceptional entries removed from a pagevec only acquire the mapping tree lock once. The corner case where this is more expensive is where there is only one exceptional entry but this is unlikely due to temporal locality and how it affects LRU ordering. Note that for truncations of small files created recently, this patch should show no gain because it only batches the handling of exceptional entries. sparsetruncate (large) 4.14.0-rc4 4.14.0-rc4 pickhelper-v1r1 batchshadow-v1r1 Min Time 38.00 ( 0.00%) 27.00 ( 28.95%) 1st-qrtle Time 40.00 ( 0.00%) 28.00 ( 30.00%) 2nd-qrtle Time 44.00 ( 0.00%) 41.00 ( 6.82%) 3rd-qrtle Time 146.00 ( 0.00%) 147.00 ( -0.68%) Max-90% Time 153.00 ( 0.00%) 153.00 ( 0.00%) Max-95% Time 155.00 ( 0.00%) 156.00 ( -0.65%) Max-99% Time 181.00 ( 0.00%) 171.00 ( 5.52%) Amean Time 93.04 ( 0.00%) 88.43 ( 4.96%) Best99%Amean Time 92.08 ( 0.00%) 86.13 ( 6.46%) Best95%Amean Time 89.19 ( 0.00%) 83.13 ( 6.80%) Best90%Amean Time 85.60 ( 0.00%) 79.15 ( 7.53%) Best75%Amean Time 72.95 ( 0.00%) 65.09 ( 10.78%) Best50%Amean Time 39.86 ( 0.00%) 28.20 ( 29.25%) Best25%Amean Time 39.44 ( 0.00%) 27.70 ( 29.77%) bonnie 4.14.0-rc4 4.14.0-rc4 pickhelper-v1r1 batchshadow-v1r1 Hmean SeqCreate ops 71.92 ( 0.00%) 76.78 ( 6.76%) Hmean SeqCreate read 42.42 ( 0.00%) 45.01 ( 6.10%) Hmean SeqCreate del 26519.88 ( 0.00%) 27191.87 ( 2.53%) Hmean RandCreate ops 71.92 ( 0.00%) 76.95 ( 7.00%) Hmean RandCreate read 44.44 ( 0.00%) 49.23 ( 10.78%) Hmean RandCreate del 24948.62 ( 0.00%) 24764.97 ( -0.74%) Truncation of a large number of files shows a substantial gain with 99% of files being truncated 6.46% faster. bonnie shows a modest gain of 2.53% [jack@suse.cz: fix truncate_exceptional_pvec_entries()] Link: http://lkml.kernel.org/r/20171108164226.26788-1-jack@suse.cz Link: http://lkml.kernel.org/r/20171018075952.10627-4-mgorman@techsingularity.net Signed-off-by: Mel Gorman Signed-off-by: Jan Kara Reviewed-by: Jan Kara Acked-by: Johannes Weiner Cc: Andi Kleen Cc: Dave Chinner Cc: Dave Hansen Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/truncate.c | 91 +++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 63 insertions(+), 28 deletions(-) commit c7df8ad2910e965a6241b6d8f52fd122e26b0315 Author: Mel Gorman Date: Wed Nov 15 17:37:41 2017 -0800 mm, truncate: do not check mapping for every page being truncated During truncation, the mapping has already been checked for shmem and dax so it's known that workingset_update_node is required. This patch avoids the checks on mapping for each page being truncated. In all other cases, a lookup helper is used to determine if workingset_update_node() needs to be called. The one danger is that the API is slightly harder to use as calling workingset_update_node directly without checking for dax or shmem mappings could lead to surprises. However, the API rarely needs to be used and hopefully the comment is enough to give people the hint. sparsetruncate (tiny) 4.14.0-rc4 4.14.0-rc4 oneirq-v1r1 pickhelper-v1r1 Min Time 141.00 ( 0.00%) 140.00 ( 0.71%) 1st-qrtle Time 142.00 ( 0.00%) 141.00 ( 0.70%) 2nd-qrtle Time 142.00 ( 0.00%) 142.00 ( 0.00%) 3rd-qrtle Time 143.00 ( 0.00%) 143.00 ( 0.00%) Max-90% Time 144.00 ( 0.00%) 144.00 ( 0.00%) Max-95% Time 147.00 ( 0.00%) 145.00 ( 1.36%) Max-99% Time 195.00 ( 0.00%) 191.00 ( 2.05%) Max Time 230.00 ( 0.00%) 205.00 ( 10.87%) Amean Time 144.37 ( 0.00%) 143.82 ( 0.38%) Stddev Time 10.44 ( 0.00%) 9.00 ( 13.74%) Coeff Time 7.23 ( 0.00%) 6.26 ( 13.41%) Best99%Amean Time 143.72 ( 0.00%) 143.34 ( 0.26%) Best95%Amean Time 142.37 ( 0.00%) 142.00 ( 0.26%) Best90%Amean Time 142.19 ( 0.00%) 141.85 ( 0.24%) Best75%Amean Time 141.92 ( 0.00%) 141.58 ( 0.24%) Best50%Amean Time 141.69 ( 0.00%) 141.31 ( 0.27%) Best25%Amean Time 141.38 ( 0.00%) 140.97 ( 0.29%) As you'd expect, the gain is marginal but it can be detected. The differences in bonnie are all within the noise which is not surprising given the impact on the microbenchmark. radix_tree_update_node_t is a callback for some radix operations that optionally passes in a private field. The only user of the callback is workingset_update_node and as it no longer requires a mapping, the private field is removed. Link: http://lkml.kernel.org/r/20171018075952.10627-3-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Johannes Weiner Reviewed-by: Jan Kara Cc: Andi Kleen Cc: Dave Chinner Cc: Dave Hansen Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/dax.c | 2 +- include/linux/radix-tree.h | 7 +++---- include/linux/swap.h | 13 ++++++++++++- lib/idr.c | 2 +- lib/radix-tree.c | 30 +++++++++++++----------------- mm/filemap.c | 7 ++++--- mm/shmem.c | 2 +- mm/truncate.c | 2 +- mm/workingset.c | 10 ++-------- tools/testing/radix-tree/multiorder.c | 2 +- 10 files changed, 39 insertions(+), 38 deletions(-) commit 9cca35d42eb61b69e108a17215756c46173a5e6f Author: Mel Gorman Date: Wed Nov 15 17:37:37 2017 -0800 mm, page_alloc: enable/disable IRQs once when freeing a list of pages Patch series "Follow-up for speed up page cache truncation", v2. This series is a follow-on for Jan Kara's series "Speed up page cache truncation" series. We both ended up looking at the same problem but saw different problems based on the same data. This series builds upon his work. A variety of workloads were compared on four separate machines but each machine showed gains albeit at different levels. Minimally, some of the differences are due to NUMA where truncating data from a remote node is slower than a local node. The workloads checked were o sparse truncate microbenchmark, tiny o sparse truncate microbenchmark, large o reaim-io disk workfile o dbench4 (modified by mmtests to produce more stable results) o filebench varmail configuration for small memory size o bonnie, directory operations, working set size 2*RAM reaim-io, dbench and filebench all showed minor gains. Truncation does not dominate those workloads but were tested to ensure no other regressions. They will not be reported further. The sparse truncate microbench was written by Jan. It creates a number of files and then times how long it takes to truncate each one. The "tiny" configuraiton creates a number of files that easily fits in memory and times how long it takes to truncate files with page cache. The large configuration uses enough files to have data that is twice the size of memory and so timings there include truncating page cache and working set shadow entries in the radix tree. Patches 1-4 are the most relevant parts of this series. Patches 5-8 are optional as they are deleting code that is essentially useless but has a negligible performance impact. The changelogs have more information on performance but just for bonnie delete options, the main comparison is bonnie 4.14.0-rc5 4.14.0-rc5 4.14.0-rc5 jan-v2 vanilla mel-v2 Hmean SeqCreate ops 76.20 ( 0.00%) 75.80 ( -0.53%) 76.80 ( 0.79%) Hmean SeqCreate read 85.00 ( 0.00%) 85.00 ( 0.00%) 85.00 ( 0.00%) Hmean SeqCreate del 13752.31 ( 0.00%) 12090.23 ( -12.09%) 15304.84 ( 11.29%) Hmean RandCreate ops 76.00 ( 0.00%) 75.60 ( -0.53%) 77.00 ( 1.32%) Hmean RandCreate read 96.80 ( 0.00%) 96.80 ( 0.00%) 97.00 ( 0.21%) Hmean RandCreate del 13233.75 ( 0.00%) 11525.35 ( -12.91%) 14446.61 ( 9.16%) Jan's series is the baseline and the vanilla kernel is 12% slower where as this series on top gains another 11%. This is from a different machine than the data in the changelogs but the detailed data was not collected as there was no substantial change in v2. This patch (of 8): Freeing a list of pages current enables/disables IRQs for each page freed. This patch splits freeing a list of pages into two operations -- preparing the pages for freeing and the actual freeing. This is a tradeoff - we're taking two passes of the list to free in exchange for avoiding multiple enable/disable of IRQs. sparsetruncate (tiny) 4.14.0-rc4 4.14.0-rc4 janbatch-v1r1 oneirq-v1r1 Min Time 149.00 ( 0.00%) 141.00 ( 5.37%) 1st-qrtle Time 150.00 ( 0.00%) 142.00 ( 5.33%) 2nd-qrtle Time 151.00 ( 0.00%) 142.00 ( 5.96%) 3rd-qrtle Time 151.00 ( 0.00%) 143.00 ( 5.30%) Max-90% Time 153.00 ( 0.00%) 144.00 ( 5.88%) Max-95% Time 155.00 ( 0.00%) 147.00 ( 5.16%) Max-99% Time 201.00 ( 0.00%) 195.00 ( 2.99%) Max Time 236.00 ( 0.00%) 230.00 ( 2.54%) Amean Time 152.65 ( 0.00%) 144.37 ( 5.43%) Stddev Time 9.78 ( 0.00%) 10.44 ( -6.72%) Coeff Time 6.41 ( 0.00%) 7.23 ( -12.84%) Best99%Amean Time 152.07 ( 0.00%) 143.72 ( 5.50%) Best95%Amean Time 150.75 ( 0.00%) 142.37 ( 5.56%) Best90%Amean Time 150.59 ( 0.00%) 142.19 ( 5.58%) Best75%Amean Time 150.36 ( 0.00%) 141.92 ( 5.61%) Best50%Amean Time 150.04 ( 0.00%) 141.69 ( 5.56%) Best25%Amean Time 149.85 ( 0.00%) 141.38 ( 5.65%) With a tiny number of files, each file truncated has resident page cache and it shows that time to truncate is roughtly 5-6% with some minor jitter. 4.14.0-rc4 4.14.0-rc4 janbatch-v1r1 oneirq-v1r1 Hmean SeqCreate ops 65.27 ( 0.00%) 81.86 ( 25.43%) Hmean SeqCreate read 39.48 ( 0.00%) 47.44 ( 20.16%) Hmean SeqCreate del 24963.95 ( 0.00%) 26319.99 ( 5.43%) Hmean RandCreate ops 65.47 ( 0.00%) 82.01 ( 25.26%) Hmean RandCreate read 42.04 ( 0.00%) 51.75 ( 23.09%) Hmean RandCreate del 23377.66 ( 0.00%) 23764.79 ( 1.66%) As expected, there is a small gain for the delete operation. [mgorman@techsingularity.net: use page_private and set_page_private helpers] Link: http://lkml.kernel.org/r/20171018101547.mjycw7zreb66jzpa@techsingularity.net Link: http://lkml.kernel.org/r/20171018075952.10627-2-mgorman@techsingularity.net Signed-off-by: Mel Gorman Cc: Jan Kara Cc: Andi Kleen Cc: Dave Hansen Cc: Dave Chinner Cc: Vlastimil Babka Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 58 +++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 14 deletions(-) commit aa65c29ce1b6e1990cd2c7d8004bbea7ff3aff38 Author: Jan Kara Date: Wed Nov 15 17:37:33 2017 -0800 mm: batch radix tree operations when truncating pages Currently we remove pages from the radix tree one by one. To speed up page cache truncation, lock several pages at once and free them in one go. This allows us to batch radix tree operations in a more efficient way and also save round-trips on mapping->tree_lock. As a result we gain about 20% speed improvement in page cache truncation. Data from a simple benchmark timing 10000 truncates of 1024 pages (on ext4 on ramdisk but the filesystem is barely visible in the profiles). The range shows 1% and 95% percentiles of the measured times: 4.14-rc2 4.14-rc2 + batched truncation 248-256 209-219 249-258 209-217 248-255 211-239 248-255 209-217 247-256 210-218 [jack@suse.cz: convert delete_from_page_cache_batch() to pagevec] Link: http://lkml.kernel.org/r/20171018111648.13714-1-jack@suse.cz [akpm@linux-foundation.org: move struct pagevec forward declaration to top-of-file] Link: http://lkml.kernel.org/r/20171010151937.26984-8-jack@suse.cz Signed-off-by: Jan Kara Acked-by: Mel Gorman Reviewed-by: Andi Kleen Cc: Dave Chinner Cc: Dave Hansen Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pagemap.h | 4 +++ mm/filemap.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++++ mm/truncate.c | 20 ++++++++++-- 3 files changed, 105 insertions(+), 2 deletions(-) commit 5ecc4d852c03b82646bf563460091b95f6a8c7c0 Author: Jan Kara Date: Wed Nov 15 17:37:29 2017 -0800 mm: factor out checks and accounting from __delete_from_page_cache() Move checks and accounting updates from __delete_from_page_cache() into a separate function. We will reuse it when batching page cache truncation operations. Link: http://lkml.kernel.org/r/20171010151937.26984-7-jack@suse.cz Signed-off-by: Jan Kara Acked-by: Mel Gorman Reviewed-by: Andi Kleen Cc: Dave Chinner Cc: Dave Hansen Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 72 ++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 31 deletions(-) commit 2300638b124645c26d082dbb57841878202ff6f7 Author: Jan Kara Date: Wed Nov 15 17:37:26 2017 -0800 mm: move clearing of page->mapping to page_cache_tree_delete() Clearing of page->mapping makes sense in page_cache_tree_delete() as well and it will help us with batching things this way. Link: http://lkml.kernel.org/r/20171010151937.26984-6-jack@suse.cz Signed-off-by: Jan Kara Acked-by: Mel Gorman Reviewed-by: Andi Kleen Cc: Dave Chinner Cc: Dave Hansen Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 76253fbc8fbf6018401755fc5c07814a837cc832 Author: Jan Kara Date: Wed Nov 15 17:37:22 2017 -0800 mm: move accounting updates before page_cache_tree_delete() Move updates of various counters before page_cache_tree_delete() call. It will be easier to batch things this way and there is no difference whether the counters get updated before or after removal from the radix tree. Link: http://lkml.kernel.org/r/20171010151937.26984-5-jack@suse.cz Signed-off-by: Jan Kara Acked-by: Mel Gorman Reviewed-by: Andi Kleen Cc: Dave Chinner Cc: Dave Hansen Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) commit 59c66c5f8c4fb823240d70553c1686ce4e4dd331 Author: Jan Kara Date: Wed Nov 15 17:37:18 2017 -0800 mm: factor out page cache page freeing into a separate function Factor out page freeing from delete_from_page_cache() into a separate function. We will need to call the same when batching pagecache deletion operations. invalidate_complete_page2() and replace_page_cache_page() might want to call this function as well however they currently don't seem to handle THPs so it's unnecessary for them to take the hit of checking whether a page is THP or not. Link: http://lkml.kernel.org/r/20171010151937.26984-4-jack@suse.cz Signed-off-by: Jan Kara Acked-by: Mel Gorman Reviewed-by: Andi Kleen Cc: Dave Chinner Cc: Dave Hansen Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit 9f4e41f4717832e34cca153ced62b4a1d7e26c0e Author: Jan Kara Date: Wed Nov 15 17:37:15 2017 -0800 mm: refactor truncate_complete_page() Move call of delete_from_page_cache() and page->mapping check out of truncate_complete_page() into the single caller - truncate_inode_page(). Also move page_mapped() check into truncate_complete_page(). That way it will be easier to batch operations. Also rename truncate_complete_page() to truncate_cleanup_page(). Link: http://lkml.kernel.org/r/20171010151937.26984-3-jack@suse.cz Signed-off-by: Jan Kara Acked-by: Mel Gorman Reviewed-by: Andi Kleen Cc: Dave Chinner Cc: Dave Hansen Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/truncate.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 736304f3245f39392895ff3392e1325d3e49e7d2 Author: Jan Kara Date: Wed Nov 15 17:37:11 2017 -0800 mm: speed up cancel_dirty_page() for clean pages Patch series "Speed up page cache truncation", v1. When rebasing our enterprise distro to a newer kernel (from 4.4 to 4.12) we have noticed a regression in bonnie++ benchmark when deleting files. Eventually we have tracked this down to a fact that page cache truncation got slower by about 10%. There were both gains and losses in the above interval of kernels but we have been able to identify that commit 83929372f629 ("filemap: prepare find and delete operations for huge pages") caused about 10% regression on its own. After some investigation it didn't seem easily possible to fix the regression while maintaining the THP in page cache functionality so we've decided to optimize the page cache truncation path instead to make up for the change. This series is a result of that effort. Patch 1 is an easy speedup of cancel_dirty_page(). Patches 2-6 refactor page cache truncation code so that it is easier to batch radix tree operations. Patch 7 implements batching of deletes from the radix tree which more than makes up for the original regression. This patch (of 7): cancel_dirty_page() does quite some work even for clean pages (fetching of mapping, locking of memcg, atomic bit op on page flags) so it accounts for ~2.5% of cost of truncation of a clean page. That is not much but still dumb for something we don't need at all. Check whether a page is actually dirty and avoid any work if not. Link: http://lkml.kernel.org/r/20171010151937.26984-2-jack@suse.cz Signed-off-by: Jan Kara Acked-by: Mel Gorman Reviewed-by: Andi Kleen Cc: Dave Hansen Cc: Dave Chinner Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 8 +++++++- mm/page-writeback.c | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) commit 384bc41fc064bd8b12b7081aa3e81d26f3407045 Author: Colin Ian King Date: Wed Nov 15 17:37:08 2017 -0800 drivers/block/zram/zram_drv.c: make zram_page_end_io() static zram_page_end_io() is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'zram_page_end_io' was not declared. Should it be static? Link: http://lkml.kernel.org/r/20171016173336.20320-1-colin.king@canonical.com Signed-off-by: Colin Ian King Reviewed-by: Sergey Senozhatsky Cc: Minchan Kim 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 9823e51bfd47e1d556b47b0061baeb2f05497bef Author: Kees Cook Date: Wed Nov 15 17:37:04 2017 -0800 mm/page-writeback.c: convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Link: http://lkml.kernel.org/r/20171016225913.GA99214@beast Signed-off-by: Kees Cook Reviewed-by: Jan Kara Cc: Johannes Weiner Cc: Vladimir Davydov Cc: Matthew Wilcox Cc: Jeff Layton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page-writeback.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit b6b18aa87b5d61fcca8b5b35372d705e915eb374 Author: Laszlo Toth Date: Wed Nov 15 17:37:00 2017 -0800 mm, soft_offline: improve hugepage soft offlining error log On a failed attempt, we get the following entry: soft offline: 0x3c0000: migration failed 1, type 17ffffc0008008 (uptodate|head) Make this more specific to be straightforward and to follow other error log formats in soft_offline_huge_page(). Link: http://lkml.kernel.org/r/20171016171757.GA3018@ubuntu-desk-vm Signed-off-by: Laszlo Toth Acked-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 00bb31fa44acf9591018810ff9d5ab375779c1cc Author: Mike Rapoport Date: Wed Nov 15 17:36:56 2017 -0800 userfaultfd: use mmgrab instead of open-coded increment of mm_count Link: http://lkml.kernel.org/r/1508132478-7738-1-git-send-email-rppt@linux.vnet.ibm.com Signed-off-by: Mike Rapoport Cc: Andrea Arcangeli Cc: "Dr . David Alan Gilbert" Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/userfaultfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85ccc8fa81af74c3c9133cf243fb75f65d02a59a Author: Aaron Lu Date: Wed Nov 15 17:36:53 2017 -0800 mm/page_alloc: make sure __rmqueue() etc are always inline __rmqueue(), __rmqueue_fallback(), __rmqueue_smallest() and __rmqueue_cma_fallback() are all in page allocator's hot path and better be finished as soon as possible. One way to make them faster is by making them inline. But as Andrew Morton and Andi Kleen pointed out: https://lkml.org/lkml/2017/10/10/1252 https://lkml.org/lkml/2017/10/10/1279 To make sure they are inlined, we should use __always_inline for them. With the will-it-scale/page_fault1/process benchmark, when using nr_cpu processes to stress buddy, the results for will-it-scale.processes with and without the patch are: On a 2-sockets Intel-Skylake machine: compiler base head gcc-4.4.7 6496131 6911823 +6.4% gcc-4.9.4 7225110 7731072 +7.0% gcc-5.4.1 7054224 7688146 +9.0% gcc-6.2.0 7059794 7651675 +8.4% On a 4-sockets Intel-Skylake machine: compiler base head gcc-4.4.7 13162890 13508193 +2.6% gcc-4.9.4 14997463 15484353 +3.2% gcc-5.4.1 14708711 15449805 +5.0% gcc-6.2.0 14574099 15349204 +5.3% The above 4 compilers are used because I've done the tests through Intel's Linux Kernel Performance(LKP) infrastructure and they are the available compilers there. The benefit being less on 4 sockets machine is due to the lock contention there(perf-profile/native_queued_spin_lock_slowpath=81%) is less severe than on the 2 sockets machine(85%). What the benchmark does is: it forks nr_cpu processes and then each process does the following: 1 mmap() 128M anonymous space; 2 writes to each page there to trigger actual page allocation; 3 munmap() it. in a loop. https://github.com/antonblanchard/will-it-scale/blob/master/tests/page_fault1.c Binary size wise, I have locally built them with different compilers: [aaron@aaronlu obj]$ size */*/mm/page_alloc.o text data bss dec hex filename 37409 9904 8524 55837 da1d gcc-4.9.4/base/mm/page_alloc.o 38273 9904 8524 56701 dd7d gcc-4.9.4/head/mm/page_alloc.o 37465 9840 8428 55733 d9b5 gcc-5.5.0/base/mm/page_alloc.o 38169 9840 8428 56437 dc75 gcc-5.5.0/head/mm/page_alloc.o 37573 9840 8428 55841 da21 gcc-6.4.0/base/mm/page_alloc.o 38261 9840 8428 56529 dcd1 gcc-6.4.0/head/mm/page_alloc.o 36863 9840 8428 55131 d75b gcc-7.2.0/base/mm/page_alloc.o 37711 9840 8428 55979 daab gcc-7.2.0/head/mm/page_alloc.o Text size increased about 800 bytes for mm/page_alloc.o. [aaron@aaronlu obj]$ size */*/vmlinux text data bss dec hex filename 10342757 5903208 17723392 33969357 20654cd gcc-4.9.4/base/vmlinux 10342757 5903208 17723392 33969357 20654cd gcc-4.9.4/head/vmlinux 10332448 5836608 17715200 33884256 2050860 gcc-5.5.0/base/vmlinux 10332448 5836608 17715200 33884256 2050860 gcc-5.5.0/head/vmlinux 10094546 5836696 17715200 33646442 201676a gcc-6.4.0/base/vmlinux 10094546 5836696 17715200 33646442 201676a gcc-6.4.0/head/vmlinux 10018775 5828732 17715200 33562707 2002053 gcc-7.2.0/base/vmlinux 10018775 5828732 17715200 33562707 2002053 gcc-7.2.0/head/vmlinux Text size for vmlinux has no change though, probably due to function alignment. Link: http://lkml.kernel.org/r/20171013063111.GA26032@intel.com Signed-off-by: Aaron Lu Acked-by: Vlastimil Babka Cc: Dave Hansen Cc: Andi Kleen Cc: Huang Ying Cc: Tim Chen Cc: Kemi Wang Cc: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 78c943662f4b1d53ddbfc515e427827915781377 Author: Pavel Tatashin Date: Wed Nov 15 17:36:48 2017 -0800 sparc64: optimize struct page zeroing Add an optimized mm_zero_struct_page(), so struct page's are zeroed without calling memset(). We do eight to ten regular stores based on the size of struct page. Compiler optimizes out the conditions of switch() statement. SPARC-M6 with 15T of memory, single thread performance: BASE FIX OPTIMIZED_FIX bootmem_init 28.440467985s 2.305674818s 2.305161615s free_area_init_nodes 202.845901673s 225.343084508s 172.556506560s -------------------------------------------- Total 231.286369658s 227.648759326s 174.861668175s BASE: current linux FIX: This patch series without "optimized struct page zeroing" OPTIMIZED_FIX: This patch series including the current patch. bootmem_init() is where memory for struct pages is zeroed during allocation. Note, about two seconds in this function is a fixed time: it does not increase as memory is increased. Link: http://lkml.kernel.org/r/20171013173214.27300-11-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco Acked-by: David S. Miller Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Mark Rutland Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Sam Ravnborg Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sparc/include/asm/pgtable_64.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit f7f99100d8d95dbcf09e0216a143211e79418b9f Author: Pavel Tatashin Date: Wed Nov 15 17:36:44 2017 -0800 mm: stop zeroing memory during allocation in vmemmap vmemmap_alloc_block() will no longer zero the block, so zero memory at its call sites for everything except struct pages. Struct page memory is zero'd by struct page initialization. Replace allocators in sparse-vmemmap to use the non-zeroing version. So, we will get the performance improvement by zeroing the memory in parallel when struct pages are zeroed. Add struct page zeroing as a part of initialization of other fields in __init_single_page(). This single thread performance collected on: Intel(R) Xeon(R) CPU E7-8895 v3 @ 2.60GHz with 1T of memory (268400646 pages in 8 nodes): BASE FIX sparse_init 11.244671836s 0.007199623s zone_sizes_init 4.879775891s 8.355182299s -------------------------- Total 16.124447727s 8.362381922s sparse_init is where memory for struct pages is zeroed, and the zeroing part is moved later in this patch into __init_single_page(), which is called from zone_sizes_init(). [akpm@linux-foundation.org: make vmemmap_alloc_block_zero() private to sparse-vmemmap.c] Link: http://lkml.kernel.org/r/20171013173214.27300-10-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco Tested-by: Bob Picco Acked-by: Michal Hocko Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Christian Borntraeger Cc: David S. Miller Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Mark Rutland Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Sam Ravnborg Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 1 + mm/sparse-vmemmap.c | 26 ++++++++++++++++++-------- mm/sparse.c | 6 +++--- 3 files changed, 22 insertions(+), 11 deletions(-) commit e17d8025f07e4fd9d73b137a8bcab04548126b83 Author: Will Deacon Date: Wed Nov 15 17:36:40 2017 -0800 arm64/mm/kasan: don't use vmemmap_populate() to initialize shadow The kasan shadow is currently mapped using vmemmap_populate() since that provides a semi-convenient way to map pages into init_top_pgt. However, since that no longer zeroes the mapped pages, it is not suitable for kasan, which requires zeroed shadow memory. Add kasan_populate_shadow() interface and use it instead of vmemmap_populate(). Besides, this allows us to take advantage of gigantic pages and use them to populate the shadow, which should save us some memory wasted on page tables and reduce TLB pressure. Link: http://lkml.kernel.org/r/20171103185147.2688-3-pasha.tatashin@oracle.com Signed-off-by: Will Deacon Signed-off-by: Pavel Tatashin Cc: Andrey Ryabinin Cc: Steven Sistare Cc: Daniel Jordan Cc: Bob Picco Cc: Michal Hocko Cc: Alexander Potapenko Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Christian Borntraeger Cc: David S. Miller Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Mark Rutland Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Sam Ravnborg Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/Kconfig | 2 +- arch/arm64/mm/kasan_init.c | 130 ++++++++++++++++++++++++++++----------------- 2 files changed, 81 insertions(+), 51 deletions(-) commit d17a1d97dc208d664c91cc387ffb752c7f85dc61 Author: Andrey Ryabinin Date: Wed Nov 15 17:36:35 2017 -0800 x86/mm/kasan: don't use vmemmap_populate() to initialize shadow The kasan shadow is currently mapped using vmemmap_populate() since that provides a semi-convenient way to map pages into init_top_pgt. However, since that no longer zeroes the mapped pages, it is not suitable for kasan, which requires zeroed shadow memory. Add kasan_populate_shadow() interface and use it instead of vmemmap_populate(). Besides, this allows us to take advantage of gigantic pages and use them to populate the shadow, which should save us some memory wasted on page tables and reduce TLB pressure. Link: http://lkml.kernel.org/r/20171103185147.2688-2-pasha.tatashin@oracle.com Signed-off-by: Andrey Ryabinin Signed-off-by: Pavel Tatashin Cc: Steven Sistare Cc: Daniel Jordan Cc: Bob Picco Cc: Michal Hocko Cc: Alexander Potapenko Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Christian Borntraeger Cc: David S. Miller Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Mark Rutland Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Sam Ravnborg Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/Kconfig | 2 +- arch/x86/mm/kasan_init_64.c | 143 +++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 137 insertions(+), 8 deletions(-) commit a4a3ede2132ae0863e2d43e06f9b5697c51a7a3b Author: Pavel Tatashin Date: Wed Nov 15 17:36:31 2017 -0800 mm: zero reserved and unavailable struct pages Some memory is reserved but unavailable: not present in memblock.memory (because not backed by physical pages), but present in memblock.reserved. Such memory has backing struct pages, but they are not initialized by going through __init_single_page(). In some cases these struct pages are accessed even if they do not contain any data. One example is page_to_pfn() might access page->flags if this is where section information is stored (CONFIG_SPARSEMEM, SECTION_IN_PAGE_FLAGS). One example of such memory: trim_low_memory_range() unconditionally reserves from pfn 0, but e820__memblock_setup() might provide the exiting memory from pfn 1 (i.e. KVM). Since struct pages are zeroed in __init_single_page(), and not during allocation time, we must zero such struct pages explicitly. The patch involves adding a new memblock iterator: for_each_resv_unavail_range(i, p_start, p_end) Which iterates through reserved && !memory lists, and we zero struct pages explicitly by calling mm_zero_struct_page(). === Here is more detailed example of problem that this patch is addressing: Run tested on qemu with the following arguments: -enable-kvm -cpu kvm64 -m 512 -smp 2 This patch reports that there are 98 unavailable pages. They are: pfn 0 and pfns in range [159, 255]. Note, trim_low_memory_range() reserves only pfns in range [0, 15], it does not reserve [159, 255] ones. e820__memblock_setup() reports linux that the following physical ranges are available: [1 , 158] [256, 130783] Notice, that exactly unavailable pfns are missing! Now, lets check what we have in zone 0: [1, 131039] pfn 0, is not part of the zone, but pfns [1, 158], are. However, the bigger problem we have if we do not initialize these struct pages is with memory hotplug. Because, that path operates at 2M boundaries (section_nr). And checks if 2M range of pages is hot removable. It starts with first pfn from zone, rounds it down to 2M boundary (sturct pages are allocated at 2M boundaries when vmemmap is created), and checks if that section is hot removable. In this case start with pfn 1 and convert it down to pfn 0. Later pfn is converted to struct page, and some fields are checked. Now, if we do not zero struct pages, we get unpredictable results. In fact when CONFIG_VM_DEBUG is enabled, and we explicitly set all vmemmap memory to ones, the following panic is observed with kernel test without this patch applied: BUG: unable to handle kernel NULL pointer dereference at (null) IP: is_pageblock_removable_nolock+0x35/0x90 PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT ... task: ffff88001f4e2900 task.stack: ffffc90000314000 RIP: 0010:is_pageblock_removable_nolock+0x35/0x90 Call Trace: ? is_mem_section_removable+0x5a/0xd0 show_mem_removable+0x6b/0xa0 dev_attr_show+0x1b/0x50 sysfs_kf_seq_show+0xa1/0x100 kernfs_seq_show+0x22/0x30 seq_read+0x1ac/0x3a0 kernfs_fop_read+0x36/0x190 ? security_file_permission+0x90/0xb0 __vfs_read+0x16/0x30 vfs_read+0x81/0x130 SyS_read+0x44/0xa0 entry_SYSCALL_64_fastpath+0x1f/0xbd Link: http://lkml.kernel.org/r/20171013173214.27300-7-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco Tested-by: Bob Picco Acked-by: Michal Hocko Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Christian Borntraeger Cc: David S. Miller Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Mark Rutland Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Sam Ravnborg Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memblock.h | 16 ++++++++++++++++ include/linux/mm.h | 15 +++++++++++++++ mm/page_alloc.c | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) commit ea1f5f3712afe895dfa4176ec87376b4a9ac23be Author: Pavel Tatashin Date: Wed Nov 15 17:36:27 2017 -0800 mm: define memblock_virt_alloc_try_nid_raw * A new variant of memblock_virt_alloc_* allocations: memblock_virt_alloc_try_nid_raw() - Does not zero the allocated memory - Does not panic if request cannot be satisfied * optimize early system hash allocations Clients can call alloc_large_system_hash() with flag: HASH_ZERO to specify that memory that was allocated for system hash needs to be zeroed, otherwise the memory does not need to be zeroed, and client will initialize it. If memory does not need to be zero'd, call the new memblock_virt_alloc_raw() interface, and thus improve the boot performance. * debug for raw alloctor When CONFIG_DEBUG_VM is enabled, this patch sets all the memory that is returned by memblock_virt_alloc_try_nid_raw() to ones to ensure that no places excpect zeroed memory. Link: http://lkml.kernel.org/r/20171013173214.27300-6-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco Tested-by: Bob Picco Acked-by: Michal Hocko Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Christian Borntraeger Cc: David S. Miller Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Mark Rutland Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Sam Ravnborg Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/bootmem.h | 27 ++++++++++++++++++++++ mm/memblock.c | 60 +++++++++++++++++++++++++++++++++++++++++++------ mm/page_alloc.c | 15 ++++++------- 3 files changed, 87 insertions(+), 15 deletions(-) commit df8ee578894ebb591c2995cce422e6189c8bb757 Author: Pavel Tatashin Date: Wed Nov 15 17:36:22 2017 -0800 sparc64: simplify vmemmap_populate Remove duplicating code by using common functions vmemmap_pud_populate and vmemmap_pgd_populate. Link: http://lkml.kernel.org/r/20171013173214.27300-5-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco Acked-by: David S. Miller Acked-by: Michal Hocko Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Mark Rutland Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Sam Ravnborg Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sparc/mm/init_64.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) commit 2a20aa171071a334d80c4e5d5af719d8374702fc Author: Pavel Tatashin Date: Wed Nov 15 17:36:18 2017 -0800 sparc64/mm: set fields in deferred pages Without deferred struct page feature (CONFIG_DEFERRED_STRUCT_PAGE_INIT), flags and other fields in "struct page"es are never changed prior to first initializing struct pages by going through __init_single_page(). With deferred struct page feature enabled there is a case where we set some fields prior to initializing: mem_init() { register_page_bootmem_info(); free_all_bootmem(); ... } When register_page_bootmem_info() is called only non-deferred struct pages are initialized. But, this function goes through some reserved pages which might be part of the deferred, and thus are not yet initialized. mem_init register_page_bootmem_info register_page_bootmem_info_node get_page_bootmem .. setting fields here .. such as: page->freelist = (void *)type; free_all_bootmem() free_low_memory_core_early() for_each_reserved_mem_region() reserve_bootmem_region() init_reserved_page() <- Only if this is deferred reserved page __init_single_pfn() __init_single_page() memset(0) <-- Loose the set fields here We end up with similar issue as in the previous patch, where currently we do not observe problem as memory is zeroed. But, if flag asserts are changed we can start hitting issues. Also, because in this patch series we will stop zeroing struct page memory during allocation, we must make sure that struct pages are properly initialized prior to using them. The deferred-reserved pages are initialized in free_all_bootmem(). Therefore, the fix is to switch the above calls. Link: http://lkml.kernel.org/r/20171013173214.27300-4-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco Acked-by: David S. Miller Acked-by: Michal Hocko Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Mark Rutland Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Sam Ravnborg Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sparc/mm/init_64.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 353b1e7b5859e98860f984d8894fa7ddc242a90e Author: Pavel Tatashin Date: Wed Nov 15 17:36:14 2017 -0800 x86/mm: set fields in deferred pages Without deferred struct page feature (CONFIG_DEFERRED_STRUCT_PAGE_INIT), flags and other fields in "struct page"es are never changed prior to first initializing struct pages by going through __init_single_page(). With deferred struct page feature enabled, however, we set fields in register_page_bootmem_info that are subsequently clobbered right after in free_all_bootmem: mem_init() { register_page_bootmem_info(); free_all_bootmem(); ... } When register_page_bootmem_info() is called only non-deferred struct pages are initialized. But, this function goes through some reserved pages which might be part of the deferred, and thus are not yet initialized. mem_init register_page_bootmem_info register_page_bootmem_info_node get_page_bootmem .. setting fields here .. such as: page->freelist = (void *)type; free_all_bootmem() free_low_memory_core_early() for_each_reserved_mem_region() reserve_bootmem_region() init_reserved_page() <- Only if this is deferred reserved page __init_single_pfn() __init_single_page() memset(0) <-- Loose the set fields here We end up with issue where, currently we do not observe problem as memory is explicitly zeroed. But, if flag asserts are changed we can start hitting issues. Also, because in this patch series we will stop zeroing struct page memory during allocation, we must make sure that struct pages are properly initialized prior to using them. The deferred-reserved pages are initialized in free_all_bootmem(). Therefore, the fix is to switch the above calls. Link: http://lkml.kernel.org/r/20171013173214.27300-3-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco Tested-by: Bob Picco Acked-by: Michal Hocko Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Christian Borntraeger Cc: David S. Miller Cc: Dmitry Vyukov Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Mark Rutland Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Sam Ravnborg Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/init_64.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 2f47a91f4dab19aaaa05cdcfced9dfcaf3f5257e Author: Pavel Tatashin Date: Wed Nov 15 17:36:09 2017 -0800 mm: deferred_init_memmap improvements Patch series "complete deferred page initialization", v12. SMP machines can benefit from the DEFERRED_STRUCT_PAGE_INIT config option, which defers initializing struct pages until all cpus have been started so it can be done in parallel. However, this feature is sub-optimal, because the deferred page initialization code expects that the struct pages have already been zeroed, and the zeroing is done early in boot with a single thread only. Also, we access that memory and set flags before struct pages are initialized. All of this is fixed in this patchset. In this work we do the following: - Never read access struct page until it was initialized - Never set any fields in struct pages before they are initialized - Zero struct page at the beginning of struct page initialization ========================================================================== Performance improvements on x86 machine with 8 nodes: Intel(R) Xeon(R) CPU E7-8895 v3 @ 2.60GHz and 1T of memory: TIME SPEED UP base no deferred: 95.796233s fix no deferred: 79.978956s 19.77% base deferred: 77.254713s fix deferred: 55.050509s 40.34% ========================================================================== SPARC M6 3600 MHz with 15T of memory TIME SPEED UP base no deferred: 358.335727s fix no deferred: 302.320936s 18.52% base deferred: 237.534603s fix deferred: 182.103003s 30.44% ========================================================================== Raw dmesg output with timestamps: x86 base no deferred: https://hastebin.com/ofunepurit.scala x86 base deferred: https://hastebin.com/ifazegeyas.scala x86 fix no deferred: https://hastebin.com/pegocohevo.scala x86 fix deferred: https://hastebin.com/ofupevikuk.scala sparc base no deferred: https://hastebin.com/ibobeteken.go sparc base deferred: https://hastebin.com/fariqimiyu.go sparc fix no deferred: https://hastebin.com/muhegoheyi.go sparc fix deferred: https://hastebin.com/xadinobutu.go This patch (of 11): deferred_init_memmap() is called when struct pages are initialized later in boot by slave CPUs. This patch simplifies and optimizes this function, and also fixes a couple issues (described below). The main change is that now we are iterating through free memblock areas instead of all configured memory. Thus, we do not have to check if the struct page has already been initialized. ===== In deferred_init_memmap() where all deferred struct pages are initialized we have a check like this: if (page->flags) { VM_BUG_ON(page_zone(page) != zone); goto free_range; } This way we are checking if the current deferred page has already been initialized. It works, because memory for struct pages has been zeroed, and the only way flags are not zero if it went through __init_single_page() before. But, once we change the current behavior and won't zero the memory in memblock allocator, we cannot trust anything inside "struct page"es until they are initialized. This patch fixes this. The deferred_init_memmap() is re-written to loop through only free memory ranges provided by memblock. Note, this first issue is relevant only when the following change is merged: ===== This patch fixes another existing issue on systems that have holes in zones i.e CONFIG_HOLES_IN_ZONE is defined. In for_each_mem_pfn_range() we have code like this: if (!pfn_valid_within(pfn) goto free_range; Note: 'page' is not set to NULL and is not incremented but 'pfn' advances. Thus means if deferred struct pages are enabled on systems with these kind of holes, linux would get memory corruptions. I have fixed this issue by defining a new macro that performs all the necessary operations when we free the current set of pages. [pasha.tatashin@oracle.com: buddy page accessed before initialized] Link: http://lkml.kernel.org/r/20171102170221.7401-2-pasha.tatashin@oracle.com Link: http://lkml.kernel.org/r/20171013173214.27300-2-pasha.tatashin@oracle.com Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco Tested-by: Bob Picco Acked-by: Michal Hocko Cc: Christian Borntraeger Cc: Heiko Carstens Cc: David S. Miller Cc: Matthew Wilcox Cc: Michal Hocko Cc: Ard Biesheuvel Cc: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Cc: Sam Ravnborg Cc: Mel Gorman Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 188 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 105 insertions(+), 83 deletions(-) commit 783cb68ee2d25d621326366c0b615bf2ccf3b402 Author: Changbin Du Date: Wed Nov 15 17:36:06 2017 -0800 mm/swap_state.c: declare a few variables as __read_mostly These global variables are only set during initialization or rarely change, so declare them as __read_mostly. Link: http://lkml.kernel.org/r/1507802349-5554-1-git-send-email-changbin.du@intel.com Signed-off-by: Changbin Du Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap_state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4675ff05de2d76d167336b368bd07f3fef6ed5a6 Author: Levin, Alexander (Sasha Levin) Date: Wed Nov 15 17:36:02 2017 -0800 kmemcheck: rip it out Fix up makefiles, remove references, and git rm kmemcheck. Link: http://lkml.kernel.org/r/20171007030159.22241-4-alexander.levin@verizon.com Signed-off-by: Sasha Levin Cc: Steven Rostedt Cc: Vegard Nossum Cc: Pekka Enberg Cc: Michal Hocko Cc: Eric W. Biederman Cc: Alexander Potapenko Cc: Tim Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/admin-guide/kernel-parameters.txt | 7 - Documentation/dev-tools/index.rst | 1 - Documentation/dev-tools/kmemcheck.rst | 733 ------------------------ MAINTAINERS | 10 - arch/x86/Kconfig | 3 +- arch/x86/include/asm/kmemcheck.h | 42 -- arch/x86/include/asm/string_32.h | 9 - arch/x86/include/asm/string_64.h | 8 - arch/x86/kernel/cpu/intel.c | 15 - arch/x86/mm/Makefile | 2 - arch/x86/mm/init.c | 5 +- arch/x86/mm/kmemcheck/Makefile | 1 - arch/x86/mm/kmemcheck/error.c | 227 -------- arch/x86/mm/kmemcheck/error.h | 15 - arch/x86/mm/kmemcheck/kmemcheck.c | 658 --------------------- arch/x86/mm/kmemcheck/opcode.c | 106 ---- arch/x86/mm/kmemcheck/opcode.h | 9 - arch/x86/mm/kmemcheck/pte.c | 22 - arch/x86/mm/kmemcheck/pte.h | 10 - arch/x86/mm/kmemcheck/selftest.c | 70 --- arch/x86/mm/kmemcheck/selftest.h | 6 - arch/x86/mm/kmemcheck/shadow.c | 173 ------ arch/x86/mm/kmemcheck/shadow.h | 18 - include/linux/interrupt.h | 15 - include/linux/kmemcheck.h | 171 ------ kernel/softirq.c | 10 - kernel/sysctl.c | 10 - lib/Kconfig.debug | 6 +- lib/Kconfig.kmemcheck | 94 --- mm/Kconfig.debug | 1 - mm/Makefile | 2 - mm/kmemcheck.c | 125 ---- mm/slub.c | 5 +- scripts/kernel-doc | 2 - tools/include/linux/kmemcheck.h | 8 - 35 files changed, 7 insertions(+), 2592 deletions(-) commit d8be75663cec0069b85f80191abd2682ce4a512f Author: Levin, Alexander (Sasha Levin) Date: Wed Nov 15 17:35:58 2017 -0800 kmemcheck: remove whats left of NOTRACK flags Now that kmemcheck is gone, we don't need the NOTRACK flags. Link: http://lkml.kernel.org/r/20171007030159.22241-5-alexander.levin@verizon.com Signed-off-by: Sasha Levin Cc: Alexander Potapenko Cc: Eric W. Biederman Cc: Michal Hocko Cc: Pekka Enberg Cc: Steven Rostedt Cc: Tim Hansen Cc: Vegard Nossum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/include/asm/pgtable.h | 5 ----- arch/x86/include/asm/pgtable_types.h | 13 ------------- include/linux/gfp.h | 9 --------- include/linux/slab.h | 6 ------ include/trace/events/mmflags.h | 1 - mm/slub.c | 2 -- tools/perf/builtin-kmem.c | 1 - 7 files changed, 37 deletions(-) commit 75f296d93bcebcfe375884ddac79e30263a31766 Author: Levin, Alexander (Sasha Levin) Date: Wed Nov 15 17:35:54 2017 -0800 kmemcheck: stop using GFP_NOTRACK and SLAB_NOTRACK Convert all allocations that used a NOTRACK flag to stop using it. Link: http://lkml.kernel.org/r/20171007030159.22241-3-alexander.levin@verizon.com Signed-off-by: Sasha Levin Cc: Alexander Potapenko Cc: Eric W. Biederman Cc: Michal Hocko Cc: Pekka Enberg Cc: Steven Rostedt Cc: Tim Hansen Cc: Vegard Nossum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/pgalloc.h | 2 +- arch/arm64/include/asm/pgalloc.h | 2 +- arch/powerpc/include/asm/pgalloc.h | 2 +- arch/sh/kernel/dwarf.c | 4 ++-- arch/sh/kernel/process.c | 2 +- arch/sparc/mm/init_64.c | 4 ++-- arch/unicore32/include/asm/pgalloc.h | 2 +- arch/x86/kernel/espfix_64.c | 2 +- arch/x86/mm/init.c | 3 +-- arch/x86/mm/init_64.c | 2 +- arch/x86/mm/pageattr.c | 10 +++++----- arch/x86/mm/pgtable.c | 2 +- arch/x86/platform/efi/efi_64.c | 2 +- crypto/xor.c | 7 +------ include/linux/thread_info.h | 5 ++--- init/do_mounts.c | 3 +-- kernel/fork.c | 12 ++++++------ kernel/signal.c | 3 +-- mm/kmemcheck.c | 2 +- mm/slab.c | 2 +- mm/slab.h | 5 ++--- mm/slab_common.c | 2 +- mm/slub.c | 4 +--- 23 files changed, 36 insertions(+), 48 deletions(-) commit 4950276672fce5c241857540f8561c440663673d Author: Levin, Alexander (Sasha Levin) Date: Wed Nov 15 17:35:51 2017 -0800 kmemcheck: remove annotations Patch series "kmemcheck: kill kmemcheck", v2. As discussed at LSF/MM, kill kmemcheck. KASan is a replacement that is able to work without the limitation of kmemcheck (single CPU, slow). KASan is already upstream. We are also not aware of any users of kmemcheck (or users who don't consider KASan as a suitable replacement). The only objection was that since KASAN wasn't supported by all GCC versions provided by distros at that time we should hold off for 2 years, and try again. Now that 2 years have passed, and all distros provide gcc that supports KASAN, kill kmemcheck again for the very same reasons. This patch (of 4): Remove kmemcheck annotations, and calls to kmemcheck from the kernel. [alexander.levin@verizon.com: correctly remove kmemcheck call from dma_map_sg_attrs] Link: http://lkml.kernel.org/r/20171012192151.26531-1-alexander.levin@verizon.com Link: http://lkml.kernel.org/r/20171007030159.22241-2-alexander.levin@verizon.com Signed-off-by: Sasha Levin Cc: Alexander Potapenko Cc: Eric W. Biederman Cc: Michal Hocko Cc: Pekka Enberg Cc: Steven Rostedt Cc: Tim Hansen Cc: Vegard Nossum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/include/asm/dma-iommu.h | 1 - arch/openrisc/include/asm/dma-mapping.h | 1 - arch/x86/Makefile | 5 ----- arch/x86/include/asm/dma-mapping.h | 1 - arch/x86/include/asm/xor.h | 5 +---- arch/x86/kernel/traps.c | 5 ----- arch/x86/mm/fault.c | 6 ------ drivers/char/random.c | 1 - drivers/misc/c2port/core.c | 2 -- fs/dcache.c | 2 -- include/linux/c2port.h | 4 ---- include/linux/dma-mapping.h | 8 +------- include/linux/filter.h | 2 -- include/linux/mm_types.h | 8 -------- include/linux/net.h | 3 --- include/linux/ring_buffer.h | 3 --- include/linux/skbuff.h | 3 --- include/net/inet_sock.h | 3 --- include/net/inet_timewait_sock.h | 4 ---- include/net/sock.h | 3 --- init/main.c | 1 - kernel/bpf/core.c | 6 ------ kernel/locking/lockdep.c | 3 --- kernel/trace/ring_buffer.c | 3 --- mm/kmemleak.c | 9 --------- mm/page_alloc.c | 14 -------------- mm/slab.c | 14 -------------- mm/slab.h | 2 -- mm/slub.c | 20 -------------------- net/core/skbuff.c | 5 ----- net/core/sock.c | 2 -- net/ipv4/inet_timewait_sock.c | 3 --- net/ipv4/tcp_input.c | 1 - net/socket.c | 1 - 34 files changed, 2 insertions(+), 152 deletions(-) commit cdb07bdea28ebf1286a979501620745680596365 Author: Colin Ian King Date: Wed Nov 15 17:35:47 2017 -0800 mm/rmap.c: remove redundant variable cend Variable cend is set but never read, hence it is redundant and can be removed. Cleans up clang build warning: Value stored to 'cend' is never read Link: http://lkml.kernel.org/r/20171011174942.1372-1-colin.king@canonical.com Fixes: 369ea8242c0f ("mm/rmap: update to new mmu_notifier semantic v2") Signed-off-by: Colin Ian King Acked-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/rmap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f3f7c09355784b02e49853dd1403d0e2d4f991c6 Author: Shakeel Butt Date: Wed Nov 15 17:35:44 2017 -0800 fs, mm: account filp cache to kmemcg The allocations from filp cache can be directly triggered by userspace applications. A buggy application can consume a significant amount of unaccounted system memory. Though we have not noticed such buggy applications in our production but upon close inspection, we found that a lot of machines spend very significant amount of memory on these caches. One way to limit allocations from filp cache is to set system level limit of maximum number of open files. However this limit is shared between different users on the system and one user can hog this resource. To cater that, we can charge filp to kmemcg and set the maximum limit very high and let the memory limit of each user limit the number of files they can open and indirectly limiting their allocations from filp cache. One side effect of this change is that it will allow _sysctl() to return ENOMEM and the man page of _sysctl() does not specify that. However the man page also discourages to use _sysctl() at all. Link: http://lkml.kernel.org/r/20171011190359.34926-1-shakeelb@google.com Signed-off-by: Shakeel Butt Cc: Alexander Viro Cc: Vladimir Davydov Cc: Michal Hocko Cc: Greg Thelen Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/file_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af5b0f6a09e42c9f4fa87735f2a366748767b686 Author: Kirill A. Shutemov Date: Wed Nov 15 17:35:40 2017 -0800 mm: consolidate page table accounting Currently, we account page tables separately for each page table level, but that's redundant -- we only make use of total memory allocated to page tables for oom_badness calculation. We also provide the information to userspace, but it has dubious value there too. This patch switches page table accounting to single counter. mm->pgtables_bytes is now used to account all page table levels. We use bytes, because page table size for different levels of page table tree may be different. The change has user-visible effect: we don't have VmPMD and VmPUD reported in /proc/[pid]/status. Not sure if anybody uses them. (As alternative, we can always report 0 kB for them.) OOM-killer report is also slightly changed: we now report pgtables_bytes instead of nr_ptes, nr_pmd, nr_puds. Apart from reducing number of counters per-mm, the benefit is that we now calculate oom_badness() more correctly for machines which have different size of page tables depending on level or where page tables are less than a page in size. The only downside can be debuggability because we do not know which page table level could leak. But I do not remember many bugs that would be caught by separate counters so I wouldn't lose sleep over this. [akpm@linux-foundation.org: fix mm/huge_memory.c] Link: http://lkml.kernel.org/r/20171006100651.44742-2-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko [kirill.shutemov@linux.intel.com: fix build] Link: http://lkml.kernel.org/r/20171016150113.ikfxy3e7zzfvsr4w@black.fi.intel.com Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/filesystems/proc.txt | 1 - Documentation/sysctl/vm.txt | 8 +++--- fs/proc/task_mmu.c | 11 ++------ include/linux/mm.h | 58 ++++++++------------------------------ include/linux/mm_types.h | 8 +----- kernel/fork.c | 16 +++-------- mm/debug.c | 7 ++--- mm/huge_memory.c | 2 +- mm/oom_kill.c | 14 ++++----- 9 files changed, 32 insertions(+), 93 deletions(-) commit c4812909f5d5a9b7f1c85a2d95be388a066cda52 Author: Kirill A. Shutemov Date: Wed Nov 15 17:35:37 2017 -0800 mm: introduce wrappers to access mm->nr_ptes Let's add wrappers for ->nr_ptes with the same interface as for nr_pmd and nr_pud. The patch also makes nr_ptes accounting dependent onto CONFIG_MMU. Page table accounting doesn't make sense if you don't have page tables. It's preparation for consolidation of page-table counters in mm_struct. Link: http://lkml.kernel.org/r/20171006100651.44742-1-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm/mm/pgd.c | 2 +- arch/sparc/mm/hugetlbpage.c | 2 +- arch/unicore32/mm/pgd.c | 2 +- fs/proc/task_mmu.c | 2 +- include/linux/mm.h | 32 ++++++++++++++++++++++++++++++++ include/linux/mm_types.h | 2 ++ kernel/fork.c | 6 +++--- mm/debug.c | 2 +- mm/huge_memory.c | 10 +++++----- mm/khugepaged.c | 2 +- mm/memory.c | 8 ++++---- mm/oom_kill.c | 5 ++--- 12 files changed, 54 insertions(+), 21 deletions(-) commit b4e98d9ac775907cc53fb08fcb6776deb7694e30 Author: Kirill A. Shutemov Date: Wed Nov 15 17:35:33 2017 -0800 mm: account pud page tables On a machine with 5-level paging support a process can allocate significant amount of memory and stay unnoticed by oom-killer and memory cgroup. The trick is to allocate a lot of PUD page tables. We don't account PUD page tables, only PMD and PTE. We already addressed the same issue for PMD page tables, see commit dc6c9a35b66b ("mm: account pmd page tables to the process"). Introduction of 5-level paging brings the same issue for PUD page tables. The patch expands accounting to PUD level. [kirill.shutemov@linux.intel.com: s/pmd_t/pud_t/] Link: http://lkml.kernel.org/r/20171004074305.x35eh5u7ybbt5kar@black.fi.intel.com [heiko.carstens@de.ibm.com: s390/mm: fix pud table accounting] Link: http://lkml.kernel.org/r/20171103090551.18231-1-heiko.carstens@de.ibm.com Link: http://lkml.kernel.org/r/20171002080427.3320-1-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Signed-off-by: Heiko Carstens Acked-by: Rik van Riel Acked-by: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/sysctl/vm.txt | 8 ++++---- arch/powerpc/mm/hugetlbpage.c | 1 + arch/s390/include/asm/mmu_context.h | 4 +++- arch/sparc/mm/hugetlbpage.c | 1 + fs/proc/task_mmu.c | 5 ++++- include/linux/mm.h | 36 +++++++++++++++++++++++++++++++++--- include/linux/mm_types.h | 3 +++ kernel/fork.c | 4 ++++ mm/debug.c | 6 ++++-- mm/memory.c | 15 +++++++++------ mm/oom_kill.c | 8 +++++--- 11 files changed, 71 insertions(+), 20 deletions(-) commit 7d6c4dfa4de96d11b9d6adaf5aa5ca8c54670258 Author: Konstantin Khlebnikov Date: Wed Nov 15 17:35:30 2017 -0800 kmemleak: change /sys/kernel/debug/kmemleak permissions from 0444 to 0644 Kmemleak can be tweaked at runtime by writing commands into debugfs file. Root can use it anyway, but without the write-bit this interface isn't obvious. Link: http://lkml.kernel.org/r/150728996582.744328.11541332857988399411.stgit@buzz Signed-off-by: Konstantin Khlebnikov Acked-by: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kmemleak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c19a9cb1642c074aa8bc7693cd4c038643960ae Author: Jan Kara Date: Wed Nov 15 17:35:26 2017 -0800 cifs: use find_get_pages_range_tag() wdata_alloc_and_fillpages() needlessly iterates calls to find_get_pages_tag(). Also it wants only pages from given range. Make it use find_get_pages_range_tag(). Link: http://lkml.kernel.org/r/20171009151359.31984-17-jack@suse.cz Signed-off-by: Jan Kara Suggested-by: Daniel Jordan Reviewed-by: Daniel Jordan Cc: Steve French Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/cifs/file.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit aef6e415eefada1d25ec7f7775e9a02bc20bf264 Author: Jan Kara Date: Wed Nov 15 17:35:23 2017 -0800 afs: use find_get_pages_range_tag() Use find_get_pages_range_tag() in afs_writepages_region() as we are interested only in pages from given range. Remove unnecessary code after this conversion. Link: http://lkml.kernel.org/r/20171009151359.31984-16-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Daniel Jordan Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/afs/write.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 67fd707f468142d0f689a6240044bb45c1913003 Author: Jan Kara Date: Wed Nov 15 17:35:19 2017 -0800 mm: remove nr_pages argument from pagevec_lookup_{,range}_tag() All users of pagevec_lookup() and pagevec_lookup_range() now pass PAGEVEC_SIZE as a desired number of pages. Just drop the argument. Link: http://lkml.kernel.org/r/20171009151359.31984-15-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Daniel Jordan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/btrfs/extent_io.c | 6 +++--- fs/ceph/addr.c | 3 +-- fs/ext4/inode.c | 2 +- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/data.c | 2 +- fs/f2fs/node.c | 8 ++++---- fs/gfs2/aops.c | 2 +- fs/nilfs2/btree.c | 4 ++-- fs/nilfs2/page.c | 7 +++---- fs/nilfs2/segment.c | 6 +++--- include/linux/pagevec.h | 8 +++----- mm/filemap.c | 2 +- mm/page-writeback.c | 2 +- mm/swap.c | 4 ++-- 14 files changed, 27 insertions(+), 31 deletions(-) commit 4be90299a1693c2112edb20ca78d6cc9f2183326 Author: Jan Kara Date: Wed Nov 15 17:35:16 2017 -0800 ceph: use pagevec_lookup_range_nr_tag() Use new function for looking up pages since nr_pages argument from pagevec_lookup_range_tag() is going away. Link: http://lkml.kernel.org/r/20171009151359.31984-14-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: "Yan, Zheng" Reviewed-by: Daniel Jordan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ceph/addr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 93d3b7140ad379885849ad2674b4290c9e8273da Author: Jan Kara Date: Wed Nov 15 17:35:12 2017 -0800 mm: add variant of pagevec_lookup_range_tag() taking number of pages Currently pagevec_lookup_range_tag() takes number of pages to look up but most users don't need this. Create a new function pagevec_lookup_range_nr_tag() that takes maximum number of pages to lookup for Ceph which wants this functionality so that we can drop nr_pages argument from pagevec_lookup_range_tag(). Link: http://lkml.kernel.org/r/20171009151359.31984-13-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Daniel Jordan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pagevec.h | 3 +++ mm/swap.c | 9 +++++++++ 2 files changed, 12 insertions(+) commit 2b9775ae422fa46b4aee2bb2a8d2184a5a3b90e0 Author: Jan Kara Date: Wed Nov 15 17:35:09 2017 -0800 mm: use pagevec_lookup_range_tag() in write_cache_pages() Use pagevec_lookup_range_tag() in write_cache_pages() as it is interested only in pages from given range. Remove unnecessary code resulting from this. Link: http://lkml.kernel.org/r/20171009151359.31984-12-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Daniel Jordan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page-writeback.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) commit 312e9d2f7053f480627dcaf5e14f9cae78e3715a Author: Jan Kara Date: Wed Nov 15 17:35:05 2017 -0800 mm: use pagevec_lookup_range_tag() in __filemap_fdatawait_range() Use pagevec_lookup_range_tag() in __filemap_fdatawait_range() as it is interested only in pages from given range. Remove unnecessary code resulting from this. Link: http://lkml.kernel.org/r/20171009151359.31984-11-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Daniel Jordan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/filemap.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 40f9c51326efd362dbae6c0e07f0c0ada42a5e00 Author: Jan Kara Date: Wed Nov 15 17:35:02 2017 -0800 nilfs2: use pagevec_lookup_range_tag() We want only pages from given range in nilfs_lookup_dirty_data_buffers(). Use pagevec_lookup_range_tag() instead of pagevec_lookup_tag() and remove unnecessary code. Link: http://lkml.kernel.org/r/20171009151359.31984-10-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Daniel Jordan Acked-by: Ryusuke Konishi Cc: Ryusuke Konishi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/nilfs2/segment.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit d2bc5b3c67a9cce28616fd90e1651b9c9246fae8 Author: Jan Kara Date: Wed Nov 15 17:34:58 2017 -0800 gfs2: use pagevec_lookup_range_tag() We want only pages from given range in gfs2_write_cache_jdata(). Use pagevec_lookup_range_tag() instead of pagevec_lookup_tag() and remove unnecessary code. Link: http://lkml.kernel.org/r/20171009151359.31984-9-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Daniel Jordan Cc: Bob Peterson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/gfs2/aops.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) commit 8faab64229a5d5f5ab624cbe5d5286d5b74c76cd Author: Jan Kara Date: Wed Nov 15 17:34:55 2017 -0800 f2fs: use find_get_pages_tag() for looking up single page __get_first_dirty_index() wants to lookup only the first dirty page after given index. There's no point in using pagevec_lookup_tag() for that. Just use find_get_pages_tag() directly. Link: http://lkml.kernel.org/r/20171009151359.31984-8-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Chao Yu Reviewed-by: Daniel Jordan Cc: Jaegeuk Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/f2fs/file.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 028a63a6e381d7d109e19db4740085d1b655c539 Author: Jan Kara Date: Wed Nov 15 17:34:51 2017 -0800 f2fs: simplify page iteration loops In several places we want to iterate over all tagged pages in a mapping. However the code was apparently copied from places that iterate only over a limited range and thus it checks for index <= end, optimizes the case where we are coming close to range end which is all pointless when end == ULONG_MAX. So just remove this dead code. [akpm@linux-foundation.org: fix warnings] Link: http://lkml.kernel.org/r/20171009151359.31984-7-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Daniel Jordan Reviewed-by: Chao Yu Cc: Jaegeuk Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/f2fs/checkpoint.c | 13 ++++------- fs/f2fs/node.c | 65 +++++++++++++++++++--------------------------------- 2 files changed, 28 insertions(+), 50 deletions(-) commit 69c4f35d25e475c07d1e5c033bfb514db360a079 Author: Jan Kara Date: Wed Nov 15 17:34:48 2017 -0800 f2fs: use pagevec_lookup_range_tag() We want only pages from given range in f2fs_write_cache_pages(). Use pagevec_lookup_range_tag() instead of pagevec_lookup_tag() and remove unnecessary code. Link: http://lkml.kernel.org/r/20171009151359.31984-6-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Chao Yu Reviewed-by: Daniel Jordan Cc: Jaegeuk Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/f2fs/data.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit dc7f3e868a45de3cfcd3c849ad32331765547b57 Author: Jan Kara Date: Wed Nov 15 17:34:44 2017 -0800 ext4: use pagevec_lookup_range_tag() We want only pages from given range in ext4_writepages(). Use pagevec_lookup_range_tag() instead of pagevec_lookup_tag() and remove unnecessary code. Link: http://lkml.kernel.org/r/20171009151359.31984-5-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Daniel Jordan Cc: "Theodore Ts'o" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ext4/inode.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 0ed75fc8d288f414051a94743563ac8c2cb62b0c Author: Jan Kara Date: Wed Nov 15 17:34:41 2017 -0800 ceph: use pagevec_lookup_range_tag() We want only pages from given range in ceph_writepages_start(). Use pagevec_lookup_range_tag() instead of pagevec_lookup_tag() and remove unnecessary code. Link: http://lkml.kernel.org/r/20171009151359.31984-4-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Daniel Jordan Reviewed-by: "Yan, Zheng" Cc: Ilya Dryomov Cc: "Yan, Zheng" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ceph/addr.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit 4006f437f965a74a31ba407138d646fbd3f3a822 Author: Jan Kara Date: Wed Nov 15 17:34:37 2017 -0800 btrfs: use pagevec_lookup_range_tag() We want only pages from given range in btree_write_cache_pages() and extent_write_cache_pages(). Use pagevec_lookup_range_tag() instead of pagevec_lookup_tag() and remove unnecessary code. Link: http://lkml.kernel.org/r/20171009151359.31984-3-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: David Sterba Reviewed-by: Daniel Jordan Cc: David Sterba Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/btrfs/extent_io.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit 72b045aecdd856b083521f2a963705b4c2e59680 Author: Jan Kara Date: Wed Nov 15 17:34:33 2017 -0800 mm: implement find_get_pages_range_tag() Patch series "Ranged pagevec tagged lookup", v3. In this series I provide a ranged variant of pagevec_lookup_tag() and use it in places where it makes sense. This series removes some common code and it also has a potential for speeding up some operations similarly as for pagevec_lookup_range() (but for now I can think of only artificial cases where this happens). This patch (of 16): Implement a variant of find_get_pages_tag() that stops iterating at given index. Lots of users of this function (through pagevec_lookup()) actually want a range lookup and all of them are currently open-coding this. Also create corresponding pagevec_lookup_range_tag() function. Link: http://lkml.kernel.org/r/20171009151359.31984-2-jack@suse.cz Signed-off-by: Jan Kara Reviewed-by: Daniel Jordan Cc: Bob Peterson Cc: Chao Yu Cc: David Howells Cc: David Sterba Cc: Ilya Dryomov Cc: Jaegeuk Kim Cc: Ryusuke Konishi Cc: Steve French Cc: "Theodore Ts'o" Cc: "Yan, Zheng" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/pagemap.h | 12 ++++++++++-- include/linux/pagevec.h | 11 +++++++++-- mm/filemap.c | 33 ++++++++++++++++++++++++--------- mm/swap.c | 9 +++++---- 4 files changed, 48 insertions(+), 17 deletions(-) commit 6b4c54e3787bc03e810062bd257a3b05fd9c72d6 Author: Ayush Mittal Date: Wed Nov 15 17:34:30 2017 -0800 mm/page_owner.c: reduce page_owner structure size Maximum page order can be at max 10 which can be accomodated in short data type(2 bytes). last_migrate_reason is defined as enum type whose values can be accomodated in short data type (2 bytes). Total structure size is currently 16 bytes but after changing structure size it goes to 12 bytes. Vlastimil said: "Looks like it works, so why not. Before: [ 0.001000] allocated 50331648 bytes of page_ext After: [ 0.001000] allocated 41943040 bytes of page_ext" Link: http://lkml.kernel.org/r/1507623917-37991-1-git-send-email-ayush.m@samsung.com Signed-off-by: Ayush Mittal Acked-by: Vlastimil Babka Cc: Vinayak Menon Cc: Amit Sahrawat Cc: Vaneet Narang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_owner.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5984af1082f3b115082178ed88c47033d43b924d Author: Pintu Agarwal Date: Wed Nov 15 17:34:26 2017 -0800 mm/cma.c: change pr_info to pr_err for cma_alloc fail log It was observed that under cma_alloc fail log, pr_info was used instead of pr_err. This will lead to problems if printk debug level is set to below 7. In this case the cma_alloc failure log will not be captured in the log and it will be difficult to debug. Simply replace the pr_info with pr_err to capture failure log. Link: http://lkml.kernel.org/r/1507650633-4430-1-git-send-email-pintu.ping@gmail.com Signed-off-by: Pintu Agarwal Cc: Laura Abbott Cc: Greg Kroah-Hartman Cc: Jaewon Kim Cc: Doug Berger Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8745808fda84c638e45cc860c8fb600bf4b0a2a6 Author: Michal Hocko Date: Wed Nov 15 17:34:22 2017 -0800 mm, arch: remove empty_bad_page* empty_bad_page() and empty_bad_pte_table() seem to be relics from old days which is not used by any code for a long time. I have tried to find when exactly but this is not really all that straightforward due to many code movements - traces disappear around 2.4 times. Anyway no code really references neither empty_bad_page nor empty_bad_pte_table. We only allocate the storage which is not used by anybody so remove them. Link: http://lkml.kernel.org/r/20171004150045.30755-1-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Ralf Baechle Acked-by: Ingo Molnar Cc: Yoshinori Sato Cc: David Howells Cc: Rich Felker Cc: Jeff Dike Cc: Richard Weinberger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/frv/mm/init.c | 14 -------------- arch/h8300/mm/init.c | 13 ------------- arch/mips/include/asm/pgtable-64.h | 8 +------- arch/mn10300/kernel/head.S | 8 -------- arch/sh/kernel/head_64.S | 8 -------- arch/um/kernel/mem.c | 3 --- include/linux/page-flags.h | 2 +- 7 files changed, 2 insertions(+), 54 deletions(-) commit a2e16731728a285bcfcece0feaaa8cf478d24022 Author: Tim Chen Date: Wed Nov 15 17:34:18 2017 -0800 mm/swap_slots.c: fix race conditions in swap_slots cache init Memory allocations can happen before the swap_slots cache initialization is completed during cpu bring up. If we are low on memory, we could call get_swap_page() and access swap_slots_cache before it is fully initialized. Add a check in get_swap_page() for initialized swap_slots_cache to prevent this condition. Similar check already exists in free_swap_slot. Also annotate the checks to indicate the likely condition. We also added a memory barrier to make sure that the locks initialization are done before the assignment of cache->slots and cache->slots_ret pointers. This ensures the assumption that it is safe to acquire the slots cache locks and use the slots cache when the corresponding cache->slots or cache->slots_ret pointers are non null. [akpm@linux-foundation.org: tidy up comment] [akpm@linux-foundation.org: fix spello in comment] Link: http://lkml.kernel.org/r/65a9d0f133f63e66bba37b53b2fd0464b7cae771.1500677066.git.tim.c.chen@linux.intel.com Signed-off-by: Tim Chen Reported-by: Wenwei Tao Acked-by: Ying Huang Cc: Minchan Kim Cc: Rik van Riel Cc: Andrea Arcangeli Cc: Johannes Weiner Cc: Michal Hocko Cc: Hillf Danton Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap_slots.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 3a50d14d0df5776e002a8683a290c87eeac93a21 Author: Andrey Ryabinin Date: Wed Nov 15 17:34:15 2017 -0800 mm: remove unused pgdat->inactive_ratio Since commit 59dc76b0d4df ("mm: vmscan: reduce size of inactive file list") 'pgdat->inactive_ratio' is not used, except for printing "node_inactive_ratio: 0" in /proc/zoneinfo output. Remove it. Link: http://lkml.kernel.org/r/20171003152611.27483-1-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Reviewed-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmzone.h | 6 ------ mm/vmscan.c | 2 +- mm/vmstat.c | 6 ++---- 3 files changed, 3 insertions(+), 11 deletions(-) commit 4645b9fe84bf4878f04c7959a75df7c3c2d1bbb9 Author: Jérôme Glisse Date: Wed Nov 15 17:34:11 2017 -0800 mm/mmu_notifier: avoid call to invalidate_range() in range_end() This is an optimization patch that only affect mmu_notifier users which rely on the invalidate_range() callback. This patch avoids calling that callback twice in a row from inside __mmu_notifier_invalidate_range_end Existing pattern (before this patch): mmu_notifier_invalidate_range_start() pte/pmd/pud_clear_flush_notify() mmu_notifier_invalidate_range() mmu_notifier_invalidate_range_end() mmu_notifier_invalidate_range() New pattern (after this patch): mmu_notifier_invalidate_range_start() pte/pmd/pud_clear_flush_notify() mmu_notifier_invalidate_range() mmu_notifier_invalidate_range_only_end() We call the invalidate_range callback after clearing the page table under the page table lock and we skip the call to invalidate_range inside the __mmu_notifier_invalidate_range_end() function. Idea from Andrea Arcangeli Link: http://lkml.kernel.org/r/20171017031003.7481-3-jglisse@redhat.com Signed-off-by: Jérôme Glisse Cc: Andrea Arcangeli Cc: Joerg Roedel Cc: Suravee Suthikulpanit Cc: David Woodhouse Cc: Alistair Popple Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Stephen Rothwell Cc: Andrew Donnellan Cc: Nadav Amit Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mmu_notifier.h | 17 ++++++++++++++-- mm/huge_memory.c | 46 ++++++++++++++++++++++++++++++++++++++++---- mm/memory.c | 6 +++++- mm/migrate.c | 15 ++++++++++++--- mm/mmu_notifier.c | 11 +++++++++-- 5 files changed, 83 insertions(+), 12 deletions(-) commit 0f10851ea475e08896ee5d9a2036d1bb46a8f3a4 Author: Jérôme Glisse Date: Wed Nov 15 17:34:07 2017 -0800 mm/mmu_notifier: avoid double notification when it is useless This patch only affects users of mmu_notifier->invalidate_range callback which are device drivers related to ATS/PASID, CAPI, IOMMUv2, SVM ... and it is an optimization for those users. Everyone else is unaffected by it. When clearing a pte/pmd we are given a choice to notify the event under the page table lock (notify version of *_clear_flush helpers do call the mmu_notifier_invalidate_range). But that notification is not necessary in all cases. This patch removes almost all cases where it is useless to have a call to mmu_notifier_invalidate_range before mmu_notifier_invalidate_range_end. It also adds documentation in all those cases explaining why. Below is a more in depth analysis of why this is fine to do this: For secondary TLB (non CPU TLB) like IOMMU TLB or device TLB (when device use thing like ATS/PASID to get the IOMMU to walk the CPU page table to access a process virtual address space). There is only 2 cases when you need to notify those secondary TLB while holding page table lock when clearing a pte/pmd: A) page backing address is free before mmu_notifier_invalidate_range_end B) a page table entry is updated to point to a new page (COW, write fault on zero page, __replace_page(), ...) Case A is obvious you do not want to take the risk for the device to write to a page that might now be used by something completely different. Case B is more subtle. For correctness it requires the following sequence to happen: - take page table lock - clear page table entry and notify (pmd/pte_huge_clear_flush_notify()) - set page table entry to point to new page If clearing the page table entry is not followed by a notify before setting the new pte/pmd value then you can break memory model like C11 or C++11 for the device. Consider the following scenario (device use a feature similar to ATS/ PASID): Two address addrA and addrB such that |addrA - addrB| >= PAGE_SIZE we assume they are write protected for COW (other case of B apply too). [Time N] ----------------------------------------------------------------- CPU-thread-0 {try to write to addrA} CPU-thread-1 {try to write to addrB} CPU-thread-2 {} CPU-thread-3 {} DEV-thread-0 {read addrA and populate device TLB} DEV-thread-2 {read addrB and populate device TLB} [Time N+1] --------------------------------------------------------------- CPU-thread-0 {COW_step0: {mmu_notifier_invalidate_range_start(addrA)}} CPU-thread-1 {COW_step0: {mmu_notifier_invalidate_range_start(addrB)}} CPU-thread-2 {} CPU-thread-3 {} DEV-thread-0 {} DEV-thread-2 {} [Time N+2] --------------------------------------------------------------- CPU-thread-0 {COW_step1: {update page table point to new page for addrA}} CPU-thread-1 {COW_step1: {update page table point to new page for addrB}} CPU-thread-2 {} CPU-thread-3 {} DEV-thread-0 {} DEV-thread-2 {} [Time N+3] --------------------------------------------------------------- CPU-thread-0 {preempted} CPU-thread-1 {preempted} CPU-thread-2 {write to addrA which is a write to new page} CPU-thread-3 {} DEV-thread-0 {} DEV-thread-2 {} [Time N+3] --------------------------------------------------------------- CPU-thread-0 {preempted} CPU-thread-1 {preempted} CPU-thread-2 {} CPU-thread-3 {write to addrB which is a write to new page} DEV-thread-0 {} DEV-thread-2 {} [Time N+4] --------------------------------------------------------------- CPU-thread-0 {preempted} CPU-thread-1 {COW_step3: {mmu_notifier_invalidate_range_end(addrB)}} CPU-thread-2 {} CPU-thread-3 {} DEV-thread-0 {} DEV-thread-2 {} [Time N+5] --------------------------------------------------------------- CPU-thread-0 {preempted} CPU-thread-1 {} CPU-thread-2 {} CPU-thread-3 {} DEV-thread-0 {read addrA from old page} DEV-thread-2 {read addrB from new page} So here because at time N+2 the clear page table entry was not pair with a notification to invalidate the secondary TLB, the device see the new value for addrB before seing the new value for addrA. This break total memory ordering for the device. When changing a pte to write protect or to point to a new write protected page with same content (KSM) it is ok to delay invalidate_range callback to mmu_notifier_invalidate_range_end() outside the page table lock. This is true even if the thread doing page table update is preempted right after releasing page table lock before calling mmu_notifier_invalidate_range_end Thanks to Andrea for thinking of a problematic scenario for COW. [jglisse@redhat.com: v2] Link: http://lkml.kernel.org/r/20171017031003.7481-2-jglisse@redhat.com Link: http://lkml.kernel.org/r/20170901173011.10745-1-jglisse@redhat.com Signed-off-by: Jérôme Glisse Cc: Andrea Arcangeli Cc: Nadav Amit Cc: Joerg Roedel Cc: Suravee Suthikulpanit Cc: David Woodhouse Cc: Alistair Popple Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Stephen Rothwell Cc: Andrew Donnellan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/vm/mmu_notifier.txt | 93 +++++++++++++++++++++++++++++++++++++++ fs/dax.c | 9 +++- include/linux/mmu_notifier.h | 3 +- mm/huge_memory.c | 20 +++++++-- mm/hugetlb.c | 16 +++++-- mm/ksm.c | 15 ++++++- mm/rmap.c | 59 ++++++++++++++++++++++--- 7 files changed, 198 insertions(+), 17 deletions(-) commit 1aedcafbf32b3f232c159b14cd0d423fcfe2b861 Author: Sergey Senozhatsky Date: Wed Nov 15 17:34:03 2017 -0800 zsmalloc: calling zs_map_object() from irq is a bug Use BUG_ON(in_interrupt()) in zs_map_object(). This is not a new BUG_ON(), it's always been there, but was recently changed to VM_BUG_ON(). There are several problems there. First, we use use per-CPU mappings both in zsmalloc and in zram, and interrupt may easily corrupt those buffers. Second, and more importantly, we believe it's possible to start leaking sensitive information. Consider the following case: -> process P swap out zram per-cpu mapping CPU1 compress page A -> IRQ swap out zram per-cpu mapping CPU1 compress page B write page from per-cpu mapping CPU1 to zsmalloc pool iret -> process P write page from per-cpu mapping CPU1 to zsmalloc pool [*] return * so we store overwritten data that actually belongs to another page (task) and potentially contains sensitive data. And when process P will page fault it's going to read (swap in) that other task's data. Link: http://lkml.kernel.org/r/20170929045140.4055-1-sergey.senozhatsky@gmail.com Signed-off-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 0bea803e9e6bf3836d5368a6426c30a8c0e5eab5 Author: Ralph Campbell Date: Wed Nov 15 17:34:00 2017 -0800 mm/hmm: constify hmm_devmem_page_get_drvdata() parameter Constify pointer parameter to avoid issue when use from code that only has const struct page pointer to use in the first place. Link: http://lkml.kernel.org/r/1506972774-10191-1-git-send-email-jglisse@redhat.com Signed-off-by: Ralph Campbell Signed-off-by: Jérôme Glisse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/hmm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 007ab7b49acb93af650f3acec0e51d2c6b843934 Author: Anshuman Khandual Date: Wed Nov 15 17:33:56 2017 -0800 fs/hugetlbfs/inode.c: remove redundant -ENIVAL return from hugetlbfs_setattr() There is no need to have a local return code set with -EINVAL when both the conditions following it return error codes appropriately. Just remove the redundant one. Link: http://lkml.kernel.org/r/20170929145444.17611-1-khandual@linux.vnet.ibm.com Signed-off-by: Anshuman Khandual Reviewed-by: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/hugetlbfs/inode.c | 1 - 1 file changed, 1 deletion(-) commit 0b07ff3972061a5e06e168378dd578801ae3e88e Author: Sergey Senozhatsky Date: Wed Nov 15 17:33:53 2017 -0800 zram: remove zlib from the list of recommended algorithms ZSTD tends to outperform deflate/inflate, thus we remove zlib from the list of recommended algorithms and recommend zstd instead. Link: http://lkml.kernel.org/r/20170912050005.3247-2-sergey.senozhatsky@gmail.com Signed-off-by: Sergey Senozhatsky Suggested-by: Minchan Kim Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zcomp.c | 3 --- 1 file changed, 3 deletions(-) commit 5ef3a8b12556d7fcba81edc74e9d85b029615ae0 Author: Sergey Senozhatsky Date: Wed Nov 15 17:33:49 2017 -0800 zram: add zstd to the supported algorithms list Add ZSTD to the list of supported compression algorithms. ZRAM fio perf test: LZO DEFLATE ZSTD #jobs1 WRITE: (2180MB/s) (77.2MB/s) (1429MB/s) WRITE: (1617MB/s) (77.7MB/s) (1202MB/s) READ: (426MB/s) (595MB/s) (1181MB/s) READ: (422MB/s) (572MB/s) (1020MB/s) READ: (318MB/s) (67.8MB/s) (563MB/s) WRITE: (318MB/s) (67.9MB/s) (564MB/s) READ: (336MB/s) (68.3MB/s) (583MB/s) WRITE: (335MB/s) (68.2MB/s) (582MB/s) #jobs2 WRITE: (3441MB/s) (152MB/s) (2141MB/s) WRITE: (2507MB/s) (147MB/s) (1888MB/s) READ: (801MB/s) (1146MB/s) (1890MB/s) READ: (767MB/s) (1096MB/s) (2073MB/s) READ: (621MB/s) (126MB/s) (1009MB/s) WRITE: (621MB/s) (126MB/s) (1009MB/s) READ: (656MB/s) (125MB/s) (1075MB/s) WRITE: (657MB/s) (126MB/s) (1077MB/s) #jobs3 WRITE: (4772MB/s) (225MB/s) (3394MB/s) WRITE: (3905MB/s) (211MB/s) (2939MB/s) READ: (1216MB/s) (1608MB/s) (3218MB/s) READ: (1159MB/s) (1431MB/s) (2981MB/s) READ: (906MB/s) (156MB/s) (1457MB/s) WRITE: (907MB/s) (156MB/s) (1458MB/s) READ: (953MB/s) (158MB/s) (1595MB/s) WRITE: (952MB/s) (157MB/s) (1593MB/s) #jobs4 WRITE: (6036MB/s) (265MB/s) (4469MB/s) WRITE: (5059MB/s) (263MB/s) (3951MB/s) READ: (1618MB/s) (2066MB/s) (4276MB/s) READ: (1573MB/s) (1942MB/s) (3830MB/s) READ: (1202MB/s) (227MB/s) (1971MB/s) WRITE: (1200MB/s) (227MB/s) (1968MB/s) READ: (1265MB/s) (226MB/s) (2116MB/s) WRITE: (1264MB/s) (226MB/s) (2114MB/s) #jobs5 WRITE: (5339MB/s) (233MB/s) (3781MB/s) WRITE: (4298MB/s) (234MB/s) (3276MB/s) READ: (1626MB/s) (2048MB/s) (4081MB/s) READ: (1567MB/s) (1929MB/s) (3758MB/s) READ: (1174MB/s) (205MB/s) (1747MB/s) WRITE: (1173MB/s) (204MB/s) (1746MB/s) READ: (1214MB/s) (208MB/s) (1890MB/s) WRITE: (1215MB/s) (208MB/s) (1892MB/s) #jobs6 WRITE: (5666MB/s) (270MB/s) (4338MB/s) WRITE: (4828MB/s) (267MB/s) (3772MB/s) READ: (1803MB/s) (2058MB/s) (4946MB/s) READ: (1805MB/s) (2156MB/s) (4711MB/s) READ: (1334MB/s) (235MB/s) (2135MB/s) WRITE: (1335MB/s) (235MB/s) (2137MB/s) READ: (1364MB/s) (236MB/s) (2268MB/s) WRITE: (1365MB/s) (237MB/s) (2270MB/s) #jobs7 WRITE: (5474MB/s) (270MB/s) (4300MB/s) WRITE: (4666MB/s) (266MB/s) (3817MB/s) READ: (2022MB/s) (2319MB/s) (5472MB/s) READ: (1924MB/s) (2260MB/s) (5031MB/s) READ: (1369MB/s) (242MB/s) (2153MB/s) WRITE: (1370MB/s) (242MB/s) (2155MB/s) READ: (1499MB/s) (246MB/s) (2310MB/s) WRITE: (1497MB/s) (246MB/s) (2307MB/s) #jobs8 WRITE: (5558MB/s) (273MB/s) (4439MB/s) WRITE: (4763MB/s) (271MB/s) (3918MB/s) READ: (2201MB/s) (2599MB/s) (6062MB/s) READ: (2105MB/s) (2463MB/s) (5413MB/s) READ: (1490MB/s) (252MB/s) (2238MB/s) WRITE: (1488MB/s) (252MB/s) (2236MB/s) READ: (1566MB/s) (254MB/s) (2434MB/s) WRITE: (1568MB/s) (254MB/s) (2437MB/s) #jobs9 WRITE: (5120MB/s) (264MB/s) (4035MB/s) WRITE: (4531MB/s) (267MB/s) (3740MB/s) READ: (1940MB/s) (2258MB/s) (4986MB/s) READ: (2024MB/s) (2387MB/s) (4871MB/s) READ: (1343MB/s) (246MB/s) (2038MB/s) WRITE: (1342MB/s) (246MB/s) (2037MB/s) READ: (1553MB/s) (238MB/s) (2243MB/s) WRITE: (1552MB/s) (238MB/s) (2242MB/s) #jobs10 WRITE: (5345MB/s) (271MB/s) (3988MB/s) WRITE: (4750MB/s) (254MB/s) (3668MB/s) READ: (1876MB/s) (2363MB/s) (5150MB/s) READ: (1990MB/s) (2256MB/s) (5080MB/s) READ: (1355MB/s) (250MB/s) (2019MB/s) WRITE: (1356MB/s) (251MB/s) (2020MB/s) READ: (1490MB/s) (252MB/s) (2202MB/s) WRITE: (1488MB/s) (252MB/s) (2199MB/s) jobs1 perfstat instructions 52,065,555,710 ( 0.79) 855,731,114,587 ( 2.64) 54,280,709,944 ( 1.40) branches 14,020,427,116 ( 725.847) 101,733,449,582 (1074.521) 11,170,591,067 ( 992.869) branch-misses 22,626,174 ( 0.16%) 274,197,885 ( 0.27%) 25,915,805 ( 0.23%) jobs2 perfstat instructions 103,633,110,402 ( 0.75) 1,710,822,100,914 ( 2.59) 107,879,874,104 ( 1.28) branches 27,931,237,282 ( 679.203) 203,298,267,479 (1037.326) 22,185,350,842 ( 884.427) branch-misses 46,103,811 ( 0.17%) 533,747,204 ( 0.26%) 49,682,483 ( 0.22%) jobs3 perfstat instructions 154,857,283,657 ( 0.76) 2,565,748,974,197 ( 2.57) 161,515,435,813 ( 1.31) branches 41,759,490,355 ( 670.529) 304,905,605,277 ( 978.765) 33,215,805,907 ( 888.003) branch-misses 74,263,293 ( 0.18%) 759,746,240 ( 0.25%) 76,841,196 ( 0.23%) jobs4 perfstat instructions 206,215,849,076 ( 0.75) 3,420,169,460,897 ( 2.60) 215,003,061,664 ( 1.31) branches 55,632,141,739 ( 666.501) 406,394,977,433 ( 927.241) 44,214,322,251 ( 883.532) branch-misses 102,287,788 ( 0.18%) 1,098,617,314 ( 0.27%) 103,891,040 ( 0.23%) jobs5 perfstat instructions 258,711,315,588 ( 0.67) 4,275,657,533,244 ( 2.23) 269,332,235,685 ( 1.08) branches 69,802,821,166 ( 588.823) 507,996,211,252 ( 797.036) 55,450,846,129 ( 735.095) branch-misses 129,217,214 ( 0.19%) 1,243,284,991 ( 0.24%) 173,512,278 ( 0.31%) jobs6 perfstat instructions 312,796,166,008 ( 0.61) 5,133,896,344,660 ( 2.02) 323,658,769,588 ( 1.04) branches 84,372,488,583 ( 520.541) 610,310,494,402 ( 697.642) 66,683,292,992 ( 693.939) branch-misses 159,438,978 ( 0.19%) 1,396,368,563 ( 0.23%) 174,406,934 ( 0.26%) jobs7 perfstat instructions 363,211,372,930 ( 0.56) 5,988,205,600,879 ( 1.75) 377,824,674,156 ( 0.93) branches 98,057,013,765 ( 463.117) 711,841,255,974 ( 598.762) 77,879,009,954 ( 600.443) branch-misses 199,513,153 ( 0.20%) 1,507,651,077 ( 0.21%) 248,203,369 ( 0.32%) jobs8 perfstat instructions 413,960,354,615 ( 0.52) 6,842,918,558,378 ( 1.45) 431,938,486,581 ( 0.83) branches 111,812,574,884 ( 414.224) 813,299,084,518 ( 491.173) 89,062,699,827 ( 517.795) branch-misses 233,584,845 ( 0.21%) 1,531,593,921 ( 0.19%) 286,818,489 ( 0.32%) jobs9 perfstat instructions 465,976,220,300 ( 0.53) 7,698,467,237,372 ( 1.47) 486,352,600,321 ( 0.84) branches 125,931,456,162 ( 424.063) 915,207,005,715 ( 498.192) 100,370,404,090 ( 517.439) branch-misses 256,992,445 ( 0.20%) 1,782,809,816 ( 0.19%) 345,239,380 ( 0.34%) jobs10 perfstat instructions 517,406,372,715 ( 0.53) 8,553,527,312,900 ( 1.48) 540,732,653,094 ( 0.84) branches 139,839,780,676 ( 427.732) 1,016,737,699,389 ( 503.172) 111,696,557,638 ( 516.750) branch-misses 259,595,561 ( 0.19%) 1,952,570,279 ( 0.19%) 357,818,661 ( 0.32%) seconds elapsed 20.630411534 96.084546565 12.743373571 seconds elapsed 22.292627625 100.984155001 14.407413560 seconds elapsed 22.396016966 110.344880848 14.032201392 seconds elapsed 22.517330949 113.351459170 14.243074935 seconds elapsed 28.548305104 156.515193765 19.159286861 seconds elapsed 30.453538116 164.559937678 19.362492717 seconds elapsed 33.467108086 188.486827481 21.492612173 seconds elapsed 35.617727591 209.602677783 23.256422492 seconds elapsed 42.584239509 243.959902566 28.458540338 seconds elapsed 47.683632526 269.635248851 31.542404137 Over all, ZSTD has slower WRITE, but much faster READ (perhaps a static compression buffer used during the test helped ZSTD a lot), which results in faster test results. Memory consumption (zram mm_stat file): zram LZO mm_stat mm_stat (jobs1): 2147483648 23068672 33558528 0 33558528 0 0 mm_stat (jobs2): 2147483648 23068672 33558528 0 33558528 0 0 mm_stat (jobs3): 2147483648 23068672 33558528 0 33562624 0 0 mm_stat (jobs4): 2147483648 23068672 33558528 0 33558528 0 0 mm_stat (jobs5): 2147483648 23068672 33558528 0 33558528 0 0 mm_stat (jobs6): 2147483648 23068672 33558528 0 33562624 0 0 mm_stat (jobs7): 2147483648 23068672 33558528 0 33566720 0 0 mm_stat (jobs8): 2147483648 23068672 33558528 0 33558528 0 0 mm_stat (jobs9): 2147483648 23068672 33558528 0 33558528 0 0 mm_stat (jobs10): 2147483648 23068672 33558528 0 33562624 0 0 zram DEFLATE mm_stat mm_stat (jobs1): 2147483648 16252928 25178112 0 25178112 0 0 mm_stat (jobs2): 2147483648 16252928 25178112 0 25178112 0 0 mm_stat (jobs3): 2147483648 16252928 25178112 0 25178112 0 0 mm_stat (jobs4): 2147483648 16252928 25178112 0 25178112 0 0 mm_stat (jobs5): 2147483648 16252928 25178112 0 25178112 0 0 mm_stat (jobs6): 2147483648 16252928 25178112 0 25178112 0 0 mm_stat (jobs7): 2147483648 16252928 25178112 0 25190400 0 0 mm_stat (jobs8): 2147483648 16252928 25178112 0 25190400 0 0 mm_stat (jobs9): 2147483648 16252928 25178112 0 25178112 0 0 mm_stat (jobs10): 2147483648 16252928 25178112 0 25178112 0 0 zram ZSTD mm_stat mm_stat (jobs1): 2147483648 11010048 16781312 0 16781312 0 0 mm_stat (jobs2): 2147483648 11010048 16781312 0 16781312 0 0 mm_stat (jobs3): 2147483648 11010048 16781312 0 16785408 0 0 mm_stat (jobs4): 2147483648 11010048 16781312 0 16781312 0 0 mm_stat (jobs5): 2147483648 11010048 16781312 0 16781312 0 0 mm_stat (jobs6): 2147483648 11010048 16781312 0 16781312 0 0 mm_stat (jobs7): 2147483648 11010048 16781312 0 16781312 0 0 mm_stat (jobs8): 2147483648 11010048 16781312 0 16781312 0 0 mm_stat (jobs9): 2147483648 11010048 16781312 0 16785408 0 0 mm_stat (jobs10): 2147483648 11010048 16781312 0 16781312 0 0 ================================================================================== Official benchmarks [1]: Compressor name Ratio Compression Decompress. zstd 1.1.3 -1 2.877 430 MB/s 1110 MB/s zlib 1.2.8 -1 2.743 110 MB/s 400 MB/s brotli 0.5.2 -0 2.708 400 MB/s 430 MB/s quicklz 1.5.0 -1 2.238 550 MB/s 710 MB/s lzo1x 2.09 -1 2.108 650 MB/s 830 MB/s lz4 1.7.5 2.101 720 MB/s 3600 MB/s snappy 1.1.3 2.091 500 MB/s 1650 MB/s lzf 3.6 -1 2.077 400 MB/s 860 MB/s Minchan said: : I did test with my sample data and compared zstd with deflate. zstd's : compress ratio is lower a little bit but compression speed is much faster : 3 times more and decompress speed is too 2 times more. With different : data, it is different but overall, zstd would be better for speed at the : cost of a little lower compress ratio(about 5%) so I believe it's worth to : replace deflate. [1] https://github.com/facebook/zstd Link: http://lkml.kernel.org/r/20170912050005.3247-1-sergey.senozhatsky@gmail.com Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Tested-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zcomp.c | 3 +++ 1 file changed, 3 insertions(+) commit 0f6d24f878568fac579a1962d0bf7cb9f01e0ceb Author: Yafang Shao Date: Wed Nov 15 17:33:45 2017 -0800 mm/page-writeback.c: print a warning if the vm dirtiness settings are illogical The vm direct limit setting must be set greater than vm background limit setting. Otherwise print a warning to help the operator to figure out that the vm dirtiness settings is in illogical state. Link: http://lkml.kernel.org/r/1506592464-30962-1-git-send-email-laoar.shao@gmail.com Signed-off-by: Yafang Shao Cc: Jan Kara Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/sysctl/vm.txt | 7 +++++++ mm/page-writeback.c | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) commit 66e8b438bd5c75498cfe915c4219049eaebcb869 Author: Gioh Kim Date: Wed Nov 15 17:33:42 2017 -0800 mm/memblock.c: make the index explicit argument of for_each_memblock_type for_each_memblock_type macro function relies on idx variable defined in the caller context. Silent macro arguments are almost always wrong thing to do. They make code harder to read and easier to get wrong. Let's use an explicit iterator parameter for for_each_memblock_type and make the code more obious. This patch is a mere cleanup and it shouldn't introduce any functional change. Link: http://lkml.kernel.org/r/20170913133029.28911-1-gi-oh.kim@profitbricks.com Signed-off-by: Gioh Kim Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memblock.h | 8 ++++---- mm/memblock.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit ecde0f3e7f9edf8629f56b2354385dc8d0a6a24d Author: Michal Hocko Date: Wed Nov 15 17:33:38 2017 -0800 mm, memory_hotplug: remove timeout from __offline_memory We have a hardcoded 120s timeout after which the memory offline fails basically since the hot remove has been introduced. This is essentially a policy implemented in the kernel. Moreover there is no way to adjust the timeout and so we are sometimes facing memory offline failures if the system is under a heavy memory pressure or very intensive CPU workload on large machines. It is not very clear what purpose the timeout actually serves. The offline operation is interruptible by a signal so if userspace wants some timeout based termination this can be done trivially by sending a signal. If there is a strong usecase to do this from the kernel then we should do it properly and have a it tunable from the userspace with the timeout disabled by default along with the explanation who uses it and for what purporse. Link: http://lkml.kernel.org/r/20170918070834.13083-3-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: KAMEZAWA Hiroyuki Cc: Reza Arbab Cc: Yasuaki Ishimatsu Cc: Xishi Qiu Cc: Igor Mammedov Cc: Vitaly Kuznetsov Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 72b39cfc4d750e5b8c633a7a6fdd7d07927995ad Author: Michal Hocko Date: Wed Nov 15 17:33:34 2017 -0800 mm, memory_hotplug: do not fail offlining too early Patch series "mm, memory_hotplug: redefine memory offline retry logic", v2. While testing memory hotplug on a large 4TB machine we have noticed that memory offlining is just too eager to fail. The primary reason is that the retry logic is just too easy to give up. We have 4 ways out of the offline - we have a permanent failure (isolation or memory notifiers fail, or hugetlb pages cannot be dropped) - userspace sends a signal - a hardcoded 120s timeout expires - page migration fails 5 times This is way too convoluted and it doesn't scale very well. We have seen both temporary migration failures as well as 120s being triggered. After removing those restrictions we were able to pass stress testing during memory hot remove without any other negative side effects observed. Therefore I suggest dropping both hard coded policies. I couldn't have found any specific reason for them in the changelog. I neither didn't get any response [1] from Kamezawa. If we need some upper bound - e.g. timeout based - then we should have a proper and user defined policy for that. In any case there should be a clear use case when introducing it. This patch (of 2): Memory offlining can fail too eagerly under heavy memory pressure. page:ffffea22a646bd00 count:255 mapcount:252 mapping:ffff88ff926c9f38 index:0x3 flags: 0x9855fe40010048(uptodate|active|mappedtodisk) page dumped because: isolation failed page->mem_cgroup:ffff8801cd662000 memory offlining [mem 0x18b580000000-0x18b5ffffffff] failed Isolation has failed here because the page is not on LRU. Most probably because it was on the pcp LRU cache or it has been removed from the LRU already but it hasn't been freed yet. In both cases the page doesn't look non-migrable so retrying more makes sense. __offline_pages seems rather cluttered when it comes to the retry logic. We have 5 retries at maximum and a timeout. We could argue whether the timeout makes sense but failing just because of a race when somebody isoltes a page from LRU or puts it on a pcp LRU lists is just wrong. It only takes it to race with a process which unmaps some pages and remove them from the LRU list and we can fail the whole offline because of something that is a temporary condition and actually not harmful for the offline. Please note that unmovable pages should be already excluded during start_isolate_page_range. We could argue that has_unmovable_pages is racy and MIGRATE_MOVABLE check doesn't provide any hard guarantee either but kernel zones (aka < ZONE_MOVABLE) will very likely detect unmovable pages in most cases and movable zone shouldn't contain unmovable pages at all. Some of those pages might be pinned but not for ever because that would be a bug on its own. In any case the context is still interruptible and so the userspace can easily bail out when the operation takes too long. This is certainly better behavior than a hardcoded retry loop which is racy. Fix this by removing the max retry count and only rely on the timeout resp. interruption by a signal from the userspace. Also retry rather than fail when check_pages_isolated sees some !free pages because those could be a result of the race as well. Link: http://lkml.kernel.org/r/20170918070834.13083-2-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: KAMEZAWA Hiroyuki Cc: Reza Arbab Cc: Yasuaki Ishimatsu Cc: Xishi Qiu Cc: Igor Mammedov Cc: Vitaly Kuznetsov Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory_hotplug.c | 40 ++++++++++------------------------------ 1 file changed, 10 insertions(+), 30 deletions(-) commit d7ab3672c3ff7b2a2be3f15fcee77414fd9c4d7a Author: Michal Hocko Date: Wed Nov 15 17:33:30 2017 -0800 mm, page_alloc: fail has_unmovable_pages when seeing reserved pages Reserved pages should be completely ignored by the core mm because they have a special meaning for their owners. has_unmovable_pages doesn't check those so we rely on other tests (reference count, or PageLRU) to fail on such pages. Althought this happens to work it is safer to simply check for those explicitly and do not rely on the owner of the page to abuse those fields for special purposes. Please note that this is more of a further fortification of the code rahter than a fix of an existing issue. Link: http://lkml.kernel.org/r/20171013120756.jeopthigbmm3c7bl@dhcp22.suse.cz Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Igor Mammedov Cc: KAMEZAWA Hiroyuki Cc: Michael Ellerman Cc: Reza Arbab Cc: Vitaly Kuznetsov Cc: Xishi Qiu Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 3 +++ 1 file changed, 3 insertions(+) commit 4da2ce250f986060750fcc5b29112914e31803ba Author: Michal Hocko Date: Wed Nov 15 17:33:26 2017 -0800 mm: distinguish CMA and MOVABLE isolation in has_unmovable_pages() Joonsoo has noticed that "mm: drop migrate type checks from has_unmovable_pages" would break CMA allocator because it relies on has_unmovable_pages returning false even for CMA pageblocks which in fact don't have to be movable: alloc_contig_range start_isolate_page_range set_migratetype_isolate has_unmovable_pages This is a result of the code sharing between CMA and memory hotplug while each one has a different idea of what has_unmovable_pages should return. This is unfortunate but fixing it properly would require a lot of code duplication. Fix the issue by introducing the requested migrate type argument and special case MIGRATE_CMA case where CMA page blocks are handled properly. This will work for memory hotplug because it requires MIGRATE_MOVABLE. Link: http://lkml.kernel.org/r/20171019122118.y6cndierwl2vnguj@dhcp22.suse.cz Signed-off-by: Michal Hocko Reported-by: Joonsoo Kim Tested-by: Stefan Wahren Tested-by: Ran Wang Cc: Michael Ellerman Cc: Vlastimil Babka Cc: Igor Mammedov Cc: KAMEZAWA Hiroyuki Cc: Reza Arbab Cc: Vitaly Kuznetsov Cc: Xishi Qiu Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/page-isolation.h | 2 +- mm/page_alloc.c | 12 +++++++++++- mm/page_isolation.c | 10 +++++----- 3 files changed, 17 insertions(+), 7 deletions(-) commit d7b236e10cedd95373a79fd53b7e9c105bea4f08 Author: Michal Hocko Date: Wed Nov 15 17:33:22 2017 -0800 mm: drop migrate type checks from has_unmovable_pages Michael has noticed that the memory offline tries to migrate kernel code pages when doing echo 0 > /sys/devices/system/memory/memory0/online The current implementation will fail the operation after several failed page migration attempts but we shouldn't even attempt to migrate that memory and fail right away because this memory is clearly not migrateable. This will become a real problem when we drop the retry loop counter resp. timeout. The real problem is in has_unmovable_pages in fact. We should fail if there are any non migrateable pages in the area. In orther to guarantee that remove the migrate type checks because MIGRATE_MOVABLE is not guaranteed to contain only migrateable pages. It is merely a heuristic. Similarly MIGRATE_CMA does guarantee that the page allocator doesn't allocate any non-migrateable pages from the block but CMA allocations themselves are unlikely to migrateable. Therefore remove both checks. [akpm@linux-foundation.org: remove unused local `mt'] Link: http://lkml.kernel.org/r/20171013120013.698-1-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Michael Ellerman Tested-by: Michael Ellerman Acked-by: Vlastimil Babka Tested-by: Tony Lindgren Tested-by: Ran Wang Cc: Igor Mammedov Cc: KAMEZAWA Hiroyuki Cc: Reza Arbab Cc: Vitaly Kuznetsov Cc: Xishi Qiu Cc: Yasuaki Ishimatsu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 4 ---- 1 file changed, 4 deletions(-) commit 4c578dce58038a5b3cb7ffc77a5f62ef2c5d0856 Author: Tahsin Erdogan Date: Wed Nov 15 17:33:19 2017 -0800 mm/page-writeback.c: remove unused parameter from balance_dirty_pages() "mapping" parameter to balance_dirty_pages() is not used anymore. Fixes: dfb8ae567835 ("writeback: let balance_dirty_pages() work on the matching cgroup bdi_writeback") Link: http://lkml.kernel.org/r/20170927221311.23263-1-tahsin@google.com Signed-off-by: Tahsin Erdogan Acked-by: Michal Hocko Acked-by: Johannes Weiner Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page-writeback.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e9a6effa500526e2a19d5ad042cb758b55b1ef93 Author: Huang Ying Date: Wed Nov 15 17:33:15 2017 -0800 mm, swap: fix false error message in __swp_swapcount() When a page fault occurs for a swap entry, the physical swap readahead (not the VMA base swap readahead) may readahead several swap entries after the fault swap entry. The readahead algorithm calculates some of the swap entries to readahead via increasing the offset of the fault swap entry without checking whether they are beyond the end of the swap device and it relys on the __swp_swapcount() and swapcache_prepare() to check it. Although __swp_swapcount() checks for the swap entry passed in, it will complain with the error message as follow for the expected invalid swap entry. This may make the end users confused. swap_info_get: Bad swap offset entry 0200f8a7 To fix the false error message, the swap entry checking is added in swapin_readahead() to avoid to pass the out-of-bound swap entries and the swap entry reserved for the swap header to __swp_swapcount() and swapcache_prepare(). Link: http://lkml.kernel.org/r/20171102054225.22897-1-ying.huang@intel.com Fixes: e8c26ab60598 ("mm/swap: skip readahead for unreferenced swap slots") Signed-off-by: "Huang, Ying" Reported-by: Christian Kujau Acked-by: Minchan Kim Suggested-by: Minchan Kim Cc: Tim Chen Cc: Michal Hocko Cc: Hugh Dickins Cc: [4.11+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap_state.c | 3 +++ 1 file changed, 3 insertions(+) commit aa8d22a11da933dbf880b4933b58931f4aefe91c Author: Minchan Kim Date: Wed Nov 15 17:33:11 2017 -0800 mm: swap: SWP_SYNCHRONOUS_IO: skip swapcache only if swapped page has no other reference When SWP_SYNCHRONOUS_IO swapped-in pages are shared by several processes, it can cause unnecessary memory wastage by skipping swap cache. Because, with swapin fault by read, they could share a page if the page were in swap cache. Thus, it avoids allocating same content new pages. This patch makes the swapcache skipping work only if the swap pte is non-sharable. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/1507620825-5537-1-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Dan Williams Cc: Ross Zwisler Cc: Hugh Dickins Cc: Christoph Hellwig Cc: Ilya Dryomov Cc: Jens Axboe Cc: Sergey Senozhatsky Cc: Huang Ying Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 6 ++++++ mm/memory.c | 19 ++++++++++--------- mm/swapfile.c | 7 +++++++ 3 files changed, 23 insertions(+), 9 deletions(-) commit 0bcac06f27d7528591c27ac2b093ccd71c5d0168 Author: Minchan Kim Date: Wed Nov 15 17:33:07 2017 -0800 mm, swap: skip swapcache for swapin of synchronous device With fast swap storage, the platforms want to use swap more aggressively and swap-in is crucial to application latency. The rw_page() based synchronous devices like zram, pmem and btt are such fast storage. When I profile swapin performance with zram lz4 decompress test, S/W overhead is more than 70%. Maybe, it would be bigger in nvdimm. This patch aims to reduce swap-in latency by skipping swapcache if the swap device is synchronous device like rw_page based device. It enhances 45% my swapin test(5G sequential swapin, no readahead, from 2.41sec to 1.64sec). Link: http://lkml.kernel.org/r/1505886205-9671-5-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Dan Williams Cc: Ross Zwisler Cc: Hugh Dickins Cc: Christoph Hellwig Cc: Ilya Dryomov Cc: Jens Axboe Cc: Sergey Senozhatsky Cc: Huang Ying Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 11 +++++++++++ mm/memory.c | 52 ++++++++++++++++++++++++++++++++++++---------------- mm/page_io.c | 6 +++--- mm/swapfile.c | 11 +++++++---- 4 files changed, 57 insertions(+), 23 deletions(-) commit 539a6fea7fdcade532bd3e77be2862a683f8f0c9 Author: Minchan Kim Date: Wed Nov 15 17:33:04 2017 -0800 mm, swap: introduce SWP_SYNCHRONOUS_IO If rw-page based fast storage is used for swap devices, we need to detect it to enhance swap IO operations. This patch is preparation for optimizing of swap-in operation with next patch. Link: http://lkml.kernel.org/r/1505886205-9671-4-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Hugh Dickins Cc: Christoph Hellwig Cc: Dan Williams Cc: Ilya Dryomov Cc: Jens Axboe Cc: Ross Zwisler Cc: Sergey Senozhatsky Cc: Huang Ying Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/swap.h | 3 ++- mm/swapfile.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 23c47d2ada9f96731492a67b28c0072715075baa Author: Minchan Kim Date: Wed Nov 15 17:33:00 2017 -0800 bdi: introduce BDI_CAP_SYNCHRONOUS_IO As discussed at https://lkml.kernel.org/r/<20170728165604.10455-1-ross.zwisler@linux.intel.com> someday we will remove rw_page(). If so, we need something to detect such super-fast storage on which synchronous IO operations like the current rw_page are always a win. Introduces BDI_CAP_SYNCHRONOUS_IO to indicate such devices. With it, we could use various optimization techniques. Link: http://lkml.kernel.org/r/1505886205-9671-3-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Christoph Hellwig Cc: Dan Williams Cc: Ross Zwisler Cc: Hugh Dickins Cc: Ilya Dryomov Cc: Jens Axboe Cc: Sergey Senozhatsky Cc: Huang Ying Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/brd.c | 2 ++ drivers/block/zram/zram_drv.c | 2 +- drivers/nvdimm/btt.c | 3 +++ drivers/nvdimm/pmem.c | 2 ++ include/linux/backing-dev.h | 8 ++++++++ 5 files changed, 16 insertions(+), 1 deletion(-) commit e447a0151f7ce8dd884fea48279274bd64434c29 Author: Minchan Kim Date: Wed Nov 15 17:32:56 2017 -0800 zram: set BDI_CAP_STABLE_WRITES once With fast swap storage, the platform wants to use swap more aggressively and swap-in is crucial to application latency. The rw_page() based synchronous devices like zram, pmem and btt are such fast storage. When I profile swapin performance with zram lz4 decompress test, S/W overhead is more than 70%. Maybe, it would be bigger in nvdimm. This patchset reduces swap-in latency by skipping swapcache if the swap device is a synchronous device like a rw_page() based device. It enhances by 45% my swapin test (5G sequential swapin, no readahead) from 2.41sec to 1.64sec. This patch (of 4): Commit 19b7ccf8651d ("block: get rid of blk_integrity_revalidate()") fixed a weird thing (i.e., reset BDI_CAP_STABLE_WRITES flag unconditionally whenever revalidat_disk is called) so zram doesn't need to reset the flag any more when revalidating the bdev. Instead, set the flag just once when the zram device is created. It shouldn't change any behavior. Link: http://lkml.kernel.org/r/1505886205-9671-2-git-send-email-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky Cc: Ilya Dryomov Cc: Christoph Hellwig Cc: Dan Williams Cc: Ross Zwisler Cc: Jens Axboe Cc: Hugh Dickins Cc: Huang Ying Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/block/zram/zram_drv.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 41710443f790b5f7f5305eba99dacce88e259f4c Author: Changbin Du Date: Wed Nov 15 17:32:53 2017 -0800 mm: update comments for struct page.mapping struct page.mapping can be NULL or points to one object of type address_space, anon_vma or KSM private structure. Link: http://lkml.kernel.org/r/1506485067-15954-1-git-send-email-changbin.du@intel.com Signed-off-by: Changbin Du Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm_types.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c413af877ffa8a8c28796c9d156cf40a83e58994 Author: Johannes Thumshirn Date: Wed Nov 15 17:32:49 2017 -0800 net/rds/ib_fmr.c: use kmalloc_array_node() Now that we have a NUMA-aware version of kmalloc_array() we can use it instead of kmalloc_node() without an overflow check in the size calculation. Link: http://lkml.kernel.org/r/20170927082038.3782-7-jthumshirn@suse.de Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Lameter Cc: Santosh Shilimkar Cc: "David S. Miller" Cc: Christoph Hellwig Cc: Damien Le Moal Cc: David Rientjes Cc: Doug Ledford Cc: Hal Rosenstock Cc: Jens Axboe Cc: Joonsoo Kim Cc: Mike Marciniszyn Cc: Pekka Enberg Cc: Sean Hefty Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds net/rds/ib_fmr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63762f50548aa27dc4c380638fa6fed43ae72258 Author: Johannes Thumshirn Date: Wed Nov 15 17:32:45 2017 -0800 mm/mempool.c: use kmalloc_array_node() Now that we have a NUMA-aware version of kmalloc_array() we can use it instead of kmalloc_node() without an overflow check in the size calculation. Link: http://lkml.kernel.org/r/20170927082038.3782-6-jthumshirn@suse.de Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Lameter Cc: Christoph Hellwig Cc: Damien Le Moal Cc: David Rientjes Cc: "David S. Miller" Cc: Doug Ledford Cc: Hal Rosenstock Cc: Jens Axboe Cc: Joonsoo Kim Cc: Mike Marciniszyn Cc: Pekka Enberg Cc: Santosh Shilimkar Cc: Sean Hefty Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/mempool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c073478414db89ec963631f2aa46c94d4bb33da Author: Johannes Thumshirn Date: Wed Nov 15 17:32:41 2017 -0800 drivers/infiniband/sw/rdmavt/qp.c: use kmalloc_array_node() Now that we have a NUMA-aware version of kmalloc_array() we can use it instead of kmalloc_node() without an overflow check in the size calculation. Link: http://lkml.kernel.org/r/20170927082038.3782-5-jthumshirn@suse.de Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Lameter Cc: Christoph Hellwig Cc: Damien Le Moal Cc: David Rientjes Cc: "David S. Miller" Cc: Doug Ledford Cc: Hal Rosenstock Cc: Jens Axboe Cc: Joonsoo Kim Cc: Mike Marciniszyn Cc: Pekka Enberg Cc: Santosh Shilimkar Cc: Sean Hefty Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/infiniband/sw/rdmavt/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d50207163414d38e6a706904bd915db145fb8a0 Author: Johannes Thumshirn Date: Wed Nov 15 17:32:37 2017 -0800 drivers/infiniband/hw/qib/qib_init.c: use kmalloc_array_node() Now that we have a NUMA-aware version of kmalloc_array() we can use it instead of kmalloc_node() without an overflow check in the size calculation. Link: http://lkml.kernel.org/r/20170927082038.3782-4-jthumshirn@suse.de Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Lameter Cc: Mike Marciniszyn Cc: Doug Ledford Cc: Sean Hefty Cc: Hal Rosenstock Cc: Christoph Hellwig Cc: Damien Le Moal Cc: David Rientjes Cc: "David S. Miller" Cc: Jens Axboe Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Santosh Shilimkar Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/infiniband/hw/qib/qib_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d904bfa79f9ca683d4e51c8d38f79f8be0f70f2a Author: Johannes Thumshirn Date: Wed Nov 15 17:32:33 2017 -0800 block/blk-mq.c: use kmalloc_array_node() Now that we have a NUMA-aware version of kmalloc_array() we can use it instead of kmalloc_node() without an overflow check in the size calculation. Link: http://lkml.kernel.org/r/20170927082038.3782-3-jthumshirn@suse.de Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Damien Le Moal Cc: Christoph Hellwig Cc: Jens Axboe Cc: "David S. Miller" Cc: Doug Ledford Cc: Hal Rosenstock Cc: Mike Marciniszyn Cc: Santosh Shilimkar Cc: Sean Hefty Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5799b255c491d853b73fb9e0e1760210315d06cd Author: Johannes Thumshirn Date: Wed Nov 15 17:32:29 2017 -0800 include/linux/slab.h: add kmalloc_array_node() and kcalloc_node() Patch series "Add kmalloc_array_node() and kcalloc_node()". Our current memeory allocation routines suffer form an API imbalance, for one we have kmalloc_array() and kcalloc() which check for overflows in size multiplication and we have kmalloc_node() and kzalloc_node() which allow for memory allocation on a certain NUMA node but don't check for eventual overflows. This patch (of 6): We have kmalloc_array() and kcalloc() wrappers on top of kmalloc() which ensure us overflow free multiplication for the size of a memory allocation but these implementations are not NUMA-aware. Likewise we have kmalloc_node() which is a NUMA-aware version of kmalloc() but the implementation is not aware of any possible overflows in eventual size calculations. Introduce a combination of the two above cases to have a NUMA-node aware version of kmalloc_array() and kcalloc(). Link: http://lkml.kernel.org/r/20170927082038.3782-2-jthumshirn@suse.de Signed-off-by: Johannes Thumshirn Acked-by: Vlastimil Babka Cc: Christoph Hellwig Cc: Christoph Lameter Cc: Damien Le Moal Cc: David Rientjes Cc: "David S. Miller" Cc: Doug Ledford Cc: Hal Rosenstock Cc: Jens Axboe Cc: Joonsoo Kim Cc: Mike Marciniszyn Cc: Pekka Enberg Cc: Santosh Shilimkar Cc: Sean Hefty Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slab.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 11066386efa692f77171484c32ea30f6e5a0d729 Author: Miles Chen Date: Wed Nov 15 17:32:25 2017 -0800 slub: fix sysfs duplicate filename creation when slub_debug=O When slub_debug=O is set. It is possible to clear debug flags for an "unmergeable" slab cache in kmem_cache_open(). It makes the "unmergeable" cache became "mergeable" in sysfs_slab_add(). These caches will generate their "unique IDs" by create_unique_id(), but it is possible to create identical unique IDs. In my experiment, sgpool-128, names_cache, biovec-256 generate the same ID ":Ft-0004096" and the kernel reports "sysfs: cannot create duplicate filename '/kernel/slab/:Ft-0004096'". To repeat my experiment, set disable_higher_order_debug=1, CONFIG_SLUB_DEBUG_ON=y in kernel-4.14. Fix this issue by setting unmergeable=1 if slub_debug=O and the the default slub_debug contains any no-merge flags. call path: kmem_cache_create() __kmem_cache_alias() -> we set SLAB_NEVER_MERGE flags here create_cache() __kmem_cache_create() kmem_cache_open() -> clear DEBUG_METADATA_FLAGS sysfs_slab_add() -> the slab cache is mergeable now sysfs: cannot create duplicate filename '/kernel/slab/:Ft-0004096' ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x60/0x7c Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 4.14.0-rc7ajb-00131-gd4c2e9f-dirty #123 Hardware name: linux,dummy-virt (DT) task: ffffffc07d4e0080 task.stack: ffffff8008008000 PC is at sysfs_warn_dup+0x60/0x7c LR is at sysfs_warn_dup+0x60/0x7c pc : lr : pstate: 60000145 Call trace: sysfs_warn_dup+0x60/0x7c sysfs_create_dir_ns+0x98/0xa0 kobject_add_internal+0xa0/0x294 kobject_init_and_add+0x90/0xb4 sysfs_slab_add+0x90/0x200 __kmem_cache_create+0x26c/0x438 kmem_cache_create+0x164/0x1f4 sg_pool_init+0x60/0x100 do_one_initcall+0x38/0x12c kernel_init_freeable+0x138/0x1d4 kernel_init+0x10/0xfc ret_from_fork+0x10/0x18 Link: http://lkml.kernel.org/r/1510365805-5155-1-git-send-email-miles.chen@mediatek.com Signed-off-by: Miles Chen Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slub.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4fd0b46e898791009b03b2fdd6510044fa8730a6 Author: Alexey Dobriyan Date: Wed Nov 15 17:32:21 2017 -0800 slab, slub, slob: convert slab_flags_t to 32-bit struct kmem_cache::flags is "unsigned long" which is unnecessary on 64-bit as no flags are defined in the higher bits. Switch the field to 32-bit and save some space on x86_64 until such flags appear: add/remove: 0/0 grow/shrink: 0/107 up/down: 0/-657 (-657) function old new delta sysfs_slab_add 720 719 -1 ... check_object 699 676 -23 [akpm@linux-foundation.org: fix printk warning] Link: http://lkml.kernel.org/r/20171021100635.GA8287@avx2 Signed-off-by: Alexey Dobriyan Acked-by: Pekka Enberg Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/slab.h | 44 ++++++++++++++++++++++---------------------- include/linux/types.h | 2 +- mm/slab.c | 4 ++-- mm/slub.c | 6 +++--- 4 files changed, 28 insertions(+), 28 deletions(-) commit d50112edde1d0c621520e53747044009f11c656b Author: Alexey Dobriyan Date: Wed Nov 15 17:32:18 2017 -0800 slab, slub, slob: add slab_flags_t Add sparse-checked slab_flags_t for struct kmem_cache::flags (SLAB_POISON, etc). SLAB is bloated temporarily by switching to "unsigned long", but only temporarily. Link: http://lkml.kernel.org/r/20171021100225.GA22428@avx2 Signed-off-by: Alexey Dobriyan Acked-by: Pekka Enberg Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ecryptfs/main.c | 2 +- fs/xfs/kmem.h | 2 +- include/linux/kasan.h | 4 ++-- include/linux/kmemleak.h | 8 +++---- include/linux/slab.h | 60 +++++++++++++++++++++++++++++------------------- include/linux/slab_def.h | 2 +- include/linux/slub_def.h | 2 +- include/linux/types.h | 1 + include/net/sock.h | 2 +- mm/kasan/kasan.c | 2 +- mm/slab.c | 23 +++++++++---------- mm/slab.h | 26 ++++++++++----------- mm/slab_common.c | 16 ++++++------- mm/slob.c | 2 +- mm/slub.c | 26 +++++++++++---------- 15 files changed, 97 insertions(+), 81 deletions(-) commit a3ba074447824625d3a267a5fffd2ea21556ebf4 Author: David Rientjes Date: Wed Nov 15 17:32:14 2017 -0800 mm/slab.c: only set __GFP_RECLAIMABLE once SLAB_RECLAIM_ACCOUNT is a permanent attribute of a slab cache. Set __GFP_RECLAIMABLE as part of its ->allocflags rather than check the cachep flag on every page allocation. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1710171527560.140898@chino.kir.corp.google.com Signed-off-by: David Rientjes Acked-by: Vlastimil Babka Acked-by: Mel Gorman Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9f88faee3ff7d6e8b09c9d23b7d4ac0c15a3eae9 Author: Miles Chen Date: Wed Nov 15 17:32:10 2017 -0800 mm/slob.c: remove an unnecessary check for __GFP_ZERO Current flow guarantees a valid pointer when handling the __GFP_ZERO case. So remove the unnecessary NULL pointer check. Link: http://lkml.kernel.org/r/1507203141-11959-1-git-send-email-miles.chen@mediatek.com Signed-off-by: Miles Chen Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/slob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 852d8be0ad8511611eff18f28dce11d25195b654 Author: Yang Shi Date: Wed Nov 15 17:32:07 2017 -0800 mm: oom: show unreclaimable slab info when unreclaimable slabs > user memory The kernel may panic when an oom happens without killable process sometimes it is caused by huge unreclaimable slabs used by kernel. Although kdump could help debug such problem, however, kdump is not available on all architectures and it might be malfunction sometime. And, since kernel already panic it is worthy capturing such information in dmesg to aid touble shooting. Print out unreclaimable slab info (used size and total size) which actual memory usage is not zero (num_objs * size != 0) when unreclaimable slabs amount is greater than total user memory (LRU pages). The output looks like: Unreclaimable slab info: Name Used Total rpc_buffers 31KB 31KB rpc_tasks 7KB 7KB ebitmap_node 1964KB 1964KB avtab_node 5024KB 5024KB xfs_buf 1402KB 1402KB xfs_ili 134KB 134KB xfs_efi_item 115KB 115KB xfs_efd_item 115KB 115KB xfs_buf_item 134KB 134KB xfs_log_item_desc 342KB 342KB xfs_trans 1412KB 1412KB xfs_ifork 212KB 212KB [yang.s@alibaba-inc.com: v11] Link: http://lkml.kernel.org/r/1507656303-103845-4-git-send-email-yang.s@alibaba-inc.com Link: http://lkml.kernel.org/r/1507152550-46205-4-git-send-email-yang.s@alibaba-inc.com Signed-off-by: Yang Shi Acked-by: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 27 +++++++++++++++++++++++++-- mm/slab.h | 8 ++++++++ mm/slab_common.c | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 2 deletions(-) commit 5b36577109be007a6ecf4b65b54cbc9118463c2b Author: Yang Shi Date: Wed Nov 15 17:32:03 2017 -0800 mm: slabinfo: remove CONFIG_SLABINFO According to discussion with Christoph (https://marc.info/?l=linux-kernel&m=150695909709711&w=2), it sounds like it is pointless to keep CONFIG_SLABINFO around. This patch removes the CONFIG_SLABINFO config option, but /proc/slabinfo is still available. [yang.s@alibaba-inc.com: v11] Link: http://lkml.kernel.org/r/1507656303-103845-3-git-send-email-yang.s@alibaba-inc.com Link: http://lkml.kernel.org/r/1507152550-46205-3-git-send-email-yang.s@alibaba-inc.com Signed-off-by: Yang Shi Acked-by: David Rientjes Cc: Christoph Lameter Cc: Joonsoo Kim Cc: Michal Hocko Cc: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/Kconfig | 6 ------ mm/memcontrol.c | 2 +- mm/slab.c | 2 -- mm/slab_common.c | 7 +++---- mm/slub.c | 4 ++-- 5 files changed, 6 insertions(+), 15 deletions(-) commit 7ad3f188aac15772c97523dc4ca3e8e5b6294b9c Author: Yang Shi Date: Wed Nov 15 17:31:59 2017 -0800 tools: slabinfo: add "-U" option to show unreclaimable slabs only Patch series "oom: capture unreclaimable slab info in oom message", v10. Recently we ran into a oom issue, kernel panic due to no killable process. The dmesg shows huge unreclaimable slabs used almost 100% memory, but kdump doesn't capture vmcore due to some reason. So, it may sound better to capture unreclaimable slab info in oom message when kernel panic to aid trouble shooting and cover the corner case. Since kernel already panic, so capturing more information sounds worthy and doesn't bother normal oom killer. With the patchset, tools/vm/slabinfo has a new option, "-U", to show unreclaimable slab only. And, oom will print all non zero (num_objs * size != 0) unreclaimable slabs in oom killer message. This patch (of 3): Add "-U" option to show unreclaimable slabs only. "-U" and "-S" together can tell us what unreclaimable slabs use the most memory to help debug huge unreclaimable slabs issue. Link: http://lkml.kernel.org/r/1507152550-46205-2-git-send-email-yang.s@alibaba-inc.com Signed-off-by: Yang Shi Acked-by: Christoph Lameter Acked-by: David Rientjes Cc: Pekka Enberg Cc: Joonsoo Kim Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/vm/slabinfo.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 47ee9d89f04ccce34b6f076258d96d0ba3f5daa9 Author: Guozhonghua Date: Wed Nov 15 17:31:55 2017 -0800 ocfs2: remove unneeded goto in ocfs2_reserve_cluster_bitmap_bits() Link: http://lkml.kernel.org/r/71604351584F6A4EBAE558C676F37CA4F3CDE3A9@H3CMLB14-EX.srv.huawei-3com.com Signed-off-by: guozhonghua Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/suballoc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 3db409fa24f6dbeb60211dd829954102845c4e82 Author: Changwei Ge Date: Wed Nov 15 17:31:52 2017 -0800 ocfs2/dlm: get mle inuse only when it is initialized When dlm_add_migration_mle returns -EEXIST, previously input mle will not be initialized. So we can't use its associated dlm object. And we truly don't need this mle for already launched migration progress, since oldmle has taken this role. Link: http://lkml.kernel.org/r/63ADC13FD55D6546B7DECE290D39E373CED7AA61@H3CMLB14-EX.srv.huawei-3com.com Signed-off-by: Changwei Ge 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/dlm/dlmmaster.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 853bc26a7ea39e354b9f8889ae7ad1492ffa28d2 Author: alex chen Date: Wed Nov 15 17:31:48 2017 -0800 ocfs2: subsystem.su_mutex is required while accessing the item->ci_parent The subsystem.su_mutex is required while accessing the item->ci_parent, otherwise, NULL pointer dereference to the item->ci_parent will be triggered in the following situation: add node delete node sys_write vfs_write configfs_write_file o2nm_node_store o2nm_node_local_write do_rmdir vfs_rmdir configfs_rmdir mutex_lock(&subsys->su_mutex); unlink_obj item->ci_group = NULL; item->ci_parent = NULL; to_o2nm_cluster_from_node node->nd_item.ci_parent->ci_parent BUG since of NULL pointer dereference to nd_item.ci_parent Moreover, the o2nm_cluster also should be protected by the subsystem.su_mutex. [alex.chen@huawei.com: v2] Link: http://lkml.kernel.org/r/59EEAA69.9080703@huawei.com Link: http://lkml.kernel.org/r/59E9B36A.10700@huawei.com Signed-off-by: Alex Chen Reviewed-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/nodemanager.c | 63 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 8 deletions(-) commit 3e4c56d41eef5595035872a2ec5a483f42e8917f Author: alex chen Date: Wed Nov 15 17:31:44 2017 -0800 ocfs2: ip_alloc_sem should be taken in ocfs2_get_block() ip_alloc_sem should be taken in ocfs2_get_block() when reading file in DIRECT mode to prevent concurrent access to extent tree with ocfs2_dio_end_io_write(), which may cause BUGON in the following situation: read file 'A' end_io of writing file 'A' vfs_read __vfs_read ocfs2_file_read_iter generic_file_read_iter ocfs2_direct_IO __blockdev_direct_IO do_blockdev_direct_IO do_direct_IO get_more_blocks ocfs2_get_block ocfs2_extent_map_get_blocks ocfs2_get_clusters ocfs2_get_clusters_nocache() ocfs2_search_extent_list return the index of record which contains the v_cluster, that is v_cluster > rec[i]->e_cpos. ocfs2_dio_end_io ocfs2_dio_end_io_write down_write(&oi->ip_alloc_sem); ocfs2_mark_extent_written ocfs2_change_extent_flag ocfs2_split_extent ... --> modify the rec[i]->e_cpos, resulting in v_cluster < rec[i]->e_cpos. BUG_ON(v_cluster < le32_to_cpu(rec->e_cpos)) [alex.chen@huawei.com: v3] Link: http://lkml.kernel.org/r/59EF3614.6050008@huawei.com Link: http://lkml.kernel.org/r/59EF3614.6050008@huawei.com Fixes: c15471f79506 ("ocfs2: fix sparse file & data ordering issue in direct io") Signed-off-by: Alex Chen Reviewed-by: Jun Piao Reviewed-by: Joseph Qi Reviewed-by: Gang He Acked-by: Changwei Ge Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/aops.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 28f5a8a7c033cbf3e32277f4cc9c6afd74f05300 Author: alex chen Date: Wed Nov 15 17:31:40 2017 -0800 ocfs2: should wait dio before inode lock in ocfs2_setattr() we should wait dio requests to finish before inode lock in ocfs2_setattr(), otherwise the following deadlock will happen: process 1 process 2 process 3 truncate file 'A' end_io of writing file 'A' receiving the bast messages ocfs2_setattr ocfs2_inode_lock_tracker ocfs2_inode_lock_full inode_dio_wait __inode_dio_wait -->waiting for all dio requests finish dlm_proxy_ast_handler dlm_do_local_bast ocfs2_blocking_ast ocfs2_generic_handle_bast set OCFS2_LOCK_BLOCKED flag dio_end_io dio_bio_end_aio dio_complete ocfs2_dio_end_io ocfs2_dio_end_io_write ocfs2_inode_lock __ocfs2_cluster_lock ocfs2_wait_for_mask -->waiting for OCFS2_LOCK_BLOCKED flag to be cleared, that is waiting for 'process 1' unlocking the inode lock inode_dio_end -->here dec the i_dio_count, but will never be called, so a deadlock happened. Link: http://lkml.kernel.org/r/59F81636.70508@huawei.com Signed-off-by: Alex Chen Reviewed-by: Jun Piao Reviewed-by: Joseph Qi Acked-by: Changwei Ge Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/file.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 67b1b8d14aa08aa8df835377074ed629629bda50 Author: piaojun Date: Wed Nov 15 17:31:37 2017 -0800 ocfs2: clean up some unused function declarations Link: http://lkml.kernel.org/r/59C5D7D6.9050106@huawei.com Signed-off-by: Jun Piao Reviewed-by: Alex Chen Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/buffer_head_io.h | 3 --- 1 file changed, 3 deletions(-) commit 1c01967116a678fed8e2c68a6ab82abc8effeddc Author: Changwei Ge Date: Wed Nov 15 17:31:33 2017 -0800 ocfs2: fix cluster hang after a node dies When a node dies, other live nodes have to choose a new master for an existed lock resource mastered by the dead node. As for ocfs2/dlm implementation, this is done by function - dlm_move_lockres_to_recovery_list which marks those lock rsources as DLM_LOCK_RES_RECOVERING and manages them via a list from which DLM changes lock resource's master later. So without invoking dlm_move_lockres_to_recovery_list, no master will be choosed after dlm recovery accomplishment since no lock resource can be found through ::resource list. What's worse is that if DLM_LOCK_RES_RECOVERING is not marked for lock resources mastered a dead node, it will break up synchronization among nodes. So invoke dlm_move_lockres_to_recovery_list again. Fixs: 'commit ee8f7fcbe638 ("ocfs2/dlm: continue to purge recovery lockres when recovery master goes down")' Link: http://lkml.kernel.org/r/63ADC13FD55D6546B7DECE290D39E373CED6E0F9@H3CMLB14-EX.srv.huawei-3com.com Signed-off-by: Changwei Ge Reported-by: Vitaly Mayatskih Tested-by: Vitaly Mayatskikh 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/dlm/dlmrecovery.c | 1 + 1 file changed, 1 insertion(+) commit 98d6c09ec2899a9a601b16ec7ae31d54e6b100b9 Author: piaojun Date: Wed Nov 15 17:31:29 2017 -0800 ocfs2: cleanup unused func declaration and assignment Link: http://lkml.kernel.org/r/59E064BB.8000005@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/alloc.c | 2 -- fs/ocfs2/cluster/heartbeat.h | 2 -- 2 files changed, 4 deletions(-) commit 23e0813a0807754b5be18688b7564c58e0eb2f2a Author: piaojun Date: Wed Nov 15 17:31:25 2017 -0800 ocfs2: no need flush workqueue before destroying it destroy_workqueue() will do flushing work for us. Link: http://lkml.kernel.org/r/59E06476.3090502@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/dlm/dlmdomain.c | 1 - fs/ocfs2/dlmfs/dlmfs.c | 1 - fs/ocfs2/super.c | 4 +--- 3 files changed, 1 insertion(+), 5 deletions(-) commit a60874f85818aa2079fb5aefb4b32818ed2aba7d Author: Guozhonghua Date: Wed Nov 15 17:31:21 2017 -0800 ocfs2: remove unused declaration ocfs2_publish_get_mount_state() Link: http://lkml.kernel.org/r/71604351584F6A4EBAE558C676F37CA4D0743232@H3CMLB12-EX.srv.huawei-3com.com Signed-off-by: guozhonghua Acked-by: Changwei Ge Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/super.h | 3 --- 1 file changed, 3 deletions(-) commit c95f121142a41c951fd62683a5574f2a7b37c573 Author: Geert Uytterhoeven Date: Wed Nov 15 17:31:18 2017 -0800 m32r: fix endianness constraints The m32r Kconfig provides both CPU_BIG_ENDIAN and CPU_LITTLE_ENDIAN configuration options. As they are user-selectable and independent, this allows invalid configurations: - All m32r defconfigs build a big endian kernel, but CPU_BIG_ENDIAN is not set, causing compiler warnings like: include/linux/byteorder/big_endian.h:7:2: warning: #warning inconsistent configuration, needs CONFIG_CPU_BIG_ENDIAN [-Wcpp] #warning inconsistent configuration, needs CONFIG_CPU_BIG_ENDIAN ^ - Since commit 5bdfca6435b82944 ("m32r: define CPU_BIG_ENDIAN"), building an allmodconfig or allyesconfig enables both CONFIG_CPU_BIG_ENDIAN and CONFIG_CPU_LITTLE_ENDIAN. While this did get rid of the warning above, both options are obviously mutually exclusive. Fix this by making only CPU_LITTLE_ENDIAN configurable by the user, as before, and by making sure exactly one of CPU_BIG_ENDIAN and CPU_LITTLE_ENDIAN is always enabled. Link: http://lkml.kernel.org/r/1509361505-18150-1-git-send-email-geert@linux-m68k.org Fixes: 5bdfca6435b82944 ("m32r: define CPU_BIG_ENDIAN") Signed-off-by: Geert Uytterhoeven Cc: Sudip Mukherjee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/m32r/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 192efb7a1f9b69ce2ec1212ee8c24fb9b4a80a35 Author: Maninder Singh Date: Wed Nov 15 17:31:14 2017 -0800 bloat-o-meter: provide 3 different arguments for data, function and All This patch provides 3 new arguments for bloat-o-meter 1) -c -> for all (showing function and data differently) 2) -d -> data 3) -t -> function output: ./scripts/bloat-o-meter -c "file1" "file2" add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-152 (-152) Function old new delta main 412 260 -152 Total: Before=548, After=396, chg -27.74% ########################################################## add/remove: 1/0 grow/shrink: 1/0 up/down: 84/0 (84) Data old new delta arr - 64 +64 backtrace 60 80 +20 Total: Before=109, After=193, chg +77.06% ########################################################## add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-64 (-64) RO Data old new delta arr 64 - -64 Total: Before=68, After=4, chg -94.12% [maninder1.s@samsung.com: v1 -> v2] Link: http://lkml.kernel.org/r/1506569402-24787-1-git-send-email-maninder1.s@samsung.com Link: http://lkml.kernel.org/r/1506336313-27187-1-git-send-email-maninder1.s@samsung.com Signed-off-by: Vaneet Narang Signed-off-by: Maninder Singh Cc: Amit Sahrawat Cc: Andi Kleen Cc: Michal Marek Cc: Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/bloat-o-meter | 89 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 34 deletions(-) commit d618d09a68e4eed7a435beb2e355250f6f40664a Author: Jon Maloy Date: Wed Nov 15 21:23:56 2017 +0100 tipc: enforce valid ratio between skb truesize and contents The socket level flow control is based on the assumption that incoming buffers meet the condition (skb->truesize / roundup(skb->len) <= 4), where the latter value is rounded off upwards to the nearest 1k number. This does empirically hold true for the device drivers we know, but we cannot trust that it will always be so, e.g., in a system with jumbo frames and very small packets. We now introduce a check for this condition at packet arrival, and if we find it to be false, we copy the packet to a new, smaller buffer, where the condition will be true. We expect this to affect only a small fraction of all incoming packets, if at all. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/msg.c | 24 +++++++++++++++++------- net/tipc/msg.h | 7 ++++++- net/tipc/node.c | 2 +- 3 files changed, 24 insertions(+), 9 deletions(-) commit 8252fceac01570836f0cb9e922f56b4c0b1011df Author: Arnd Bergmann Date: Wed Nov 15 18:28:21 2017 +0100 netfilter: add ifdef around ctnetlink_proto_size This function is no longer marked 'inline', so we now get a warning when it is unused: net/netfilter/nf_conntrack_netlink.c:536:15: error: 'ctnetlink_proto_size' defined but not used [-Werror=unused-function] We could mark it inline again, mark it __maybe_unused, or add an #ifdef around the definition. I'm picking the third approach here since that seems to be what the rest of the file has. Fixes: 5caaed151a68 ("netfilter: conntrack: don't cache nlattr_tuple_size result in nla_size") Signed-off-by: Arnd Bergmann Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller net/netfilter/nf_conntrack_netlink.c | 2 ++ 1 file changed, 2 insertions(+) commit 9421c90150470512bd5d0fc49eaa108a0b195358 Author: Grygorii Strashko Date: Wed Nov 15 09:46:35 2017 -0600 net: ethernet: ti: cpsw: fix min eth packet size Now CPSW driver configures min eth packet size to 60 octets (ETH_ZLEN) which works in most of cases, but when port VLAN is configured on some switch port, it also can be configured to force all egress packets to be VLAN untagged. And in this case, CPSW driver will pad small packets to 60 octets, but final packet size on port egress can became less than 60 octets due to VLAN tag removal and packet will be dropped. Hence, fix it by accounting VLAN header in CPSW min eth packet size. While here, use proper defines for CPSW_MAX_PACKET_SIZE also, instead of open coding. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6ab6a0dd228220bd00d745f8eb8ca497e522f4b6 Author: Ahmed Abdelsalam Date: Wed Nov 15 15:34:23 2017 +0100 ipv6: sr: update the struct ipv6_sr_hdr The IPv6 Segment Routing Header (SRH) format has been updated (revision 6 of the SRH ietf draft). The update includes the following SRH fields: (1) The "First Segment" field changed to be "Last Entry" which contains the index, in the Segment List, of the last element of the Segment List. (2) The 16 bit "reserved" field now is used as a "tag" which tags a packet as part of a class or group of packets, e.g.,packets sharing the same set of properties. This patch updates the struct ipv6_sr_hdr, so it complies with the updated SRH draft. The 16 bit "reserved" field is changed to be "tag", In addition a comment is added to the "first_segment" field, showing that it represents the "Last Entry" field of the SRH. Signed-off-by: Ahmed Abdelsalam Signed-off-by: David S. Miller include/uapi/linux/seg6.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aefd80e874e98a864915df5b7d90824a4340b450 Author: Vitaly Kuznetsov Date: Wed Nov 15 15:12:55 2017 +0100 hv_netvsc: preserve hw_features on mtu/channels/ringparam changes rndis_filter_device_add() is called both from netvsc_probe() when we initially create the device and from set channels/mtu/ringparam routines where we basically remove the device and add it back. hw_features is reset in rndis_filter_device_add() and filled with host data. However, we lose all additional flags which are set outside of the driver, e.g. register_netdevice() adds NETIF_F_SOFT_FEATURES and many others. Unfortunately, calls to rndis_{query_hwcaps(), _set_offload_params()} calls cannot be avoided on every RNDIS reset: host expects us to set required features explicitly. Moreover, in theory hardware capabilities can change and we need to reflect the change in hw_features. Reset net->hw_features bits according to host data in rndis_netdev_set_hwcaps(), clear corresponding feature bits from net->features in case some features went missing (will never happen in real life I guess but let's be consistent). Signed-off-by: Vitaly Kuznetsov Reviewed-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 4 ++ drivers/net/hyperv/netvsc_drv.c | 2 +- drivers/net/hyperv/rndis_filter.c | 136 ++++++++++++++++++++++---------------- 3 files changed, 83 insertions(+), 59 deletions(-) commit c61a75ac1a768b8eec34da95c958f6406685faef Author: Colin Ian King Date: Wed Nov 15 14:03:20 2017 +0000 qed: use kzalloc instead of kmalloc and memset Replace kmalloc followed by a memset with kzalloc Signed-off-by: Colin Ian King Acked-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0a833c29d89656025443cb9f0ebff7052dd95ce0 Author: Michal Kubecek Date: Wed Nov 15 13:09:32 2017 +0100 genetlink: fix genlmsg_nlhdr() According to the description, first argument of genlmsg_nlhdr() points to what genlmsg_put() returns, i.e. beginning of user header. Therefore we should only subtract size of genetlink header and netlink message header, not user header. This also means we don't need to pass the pointer to genetlink family and the same is true for genl_dump_check_consistent() which is the only caller of genlmsg_nlhdr(). (Note that at the moment, these functions are only used for families which do not have user header so that they are not affected.) Fixes: 670dc2833d14 ("netlink: advertise incomplete dumps") Signed-off-by: Michal Kubecek Reviewed-by: Johannes Berg Signed-off-by: David S. Miller drivers/net/macsec.c | 2 +- drivers/net/wireless/mac80211_hwsim.c | 2 +- include/net/genetlink.h | 11 +++-------- net/nfc/netlink.c | 6 +++--- net/wireless/nl80211.c | 4 ++-- 5 files changed, 10 insertions(+), 15 deletions(-) commit 423852f89034492cc40920c00908f6de7d2dbe4f Author: Xin Long Date: Wed Nov 15 17:00:11 2017 +0800 sctp: check stream reset info len before making reconf chunk Now when resetting stream, if both in and out flags are set, the info len can reach: sizeof(struct sctp_strreset_outreq) + SCTP_MAX_STREAM(65535) + sizeof(struct sctp_strreset_inreq) + SCTP_MAX_STREAM(65535) even without duplicated stream no, this value is far greater than the chunk's max size. _sctp_make_chunk doesn't do any check for this, which would cause the skb it allocs is huge, syzbot even reported a crash due to this. This patch is to check stream reset info len before making reconf chunk and return EINVAL if the len exceeds chunk's capacity. Thanks Marcelo and Neil for making this clear. v1->v2: - move the check into sctp_send_reset_streams instead. Fixes: cc16f00f6529 ("sctp: add support for generating stream reconf ssn reset request chunk") Reported-by: Dmitry Vyukov Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/sm_make_chunk.c | 2 +- net/sctp/stream.c | 32 ++++++++++++++++++++++++-------- 2 files changed, 25 insertions(+), 9 deletions(-) commit cea0cc80a6777beb6eb643d4ad53690e1ad1d4ff Author: Xin Long Date: Wed Nov 15 16:57:26 2017 +0800 sctp: use the right sk after waking up from wait_buf sleep Commit dfcb9f4f99f1 ("sctp: deny peeloff operation on asocs with threads sleeping on it") fixed the race between peeloff and wait sndbuf by checking waitqueue_active(&asoc->wait) in sctp_do_peeloff(). But it actually doesn't work, as even if waitqueue_active returns false the waiting sndbuf thread may still not yet hold sk lock. After asoc is peeled off, sk is not asoc->base.sk any more, then to hold the old sk lock couldn't make assoc safe to access. This patch is to fix this by changing to hold the new sk lock if sk is not asoc->base.sk, meanwhile, also set the sk in sctp_sendmsg with the new sk. With this fix, there is no more race between peeloff and waitbuf, the check 'waitqueue_active' in sctp_do_peeloff can be removed. Thanks Marcelo and Neil for making this clear. v1->v2: fix it by changing to lock the new sock instead of adding a flag in asoc. Suggested-by: Neil Horman Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/socket.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit ca3af4dd28cff4e7216e213ba3b671fbf9f84758 Author: Xin Long Date: Wed Nov 15 16:55:54 2017 +0800 sctp: do not free asoc when it is already dead in sctp_sendmsg Now in sctp_sendmsg sctp_wait_for_sndbuf could schedule out without holding sock sk. It means the current asoc can be freed elsewhere, like when receiving an abort packet. If the asoc is just created in sctp_sendmsg and sctp_wait_for_sndbuf returns err, the asoc will be freed again due to new_asoc is not nil. An use-after-free issue would be triggered by this. This patch is to fix it by setting new_asoc with nil if the asoc is already dead when cpu schedules back, so that it will not be freed again in sctp_sendmsg. v1->v2: set new_asoc as nil in sctp_sendmsg instead of sctp_wait_for_sndbuf. Suggested-by: Neil Horman Reported-by: Dmitry Vyukov Signed-off-by: Xin Long Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/socket.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 4247f24c23589bcc3bc3490515ef8c9497e9ae55 Merge: 79ab67e 9f586ff Author: Dan Williams Date: Wed Nov 15 16:56:11 2017 -0800 Merge branch 'for-4.15/dax' into libnvdimm-for-next commit 79ab67ede21f536851a99ea68ee6fc1f5435e055 Author: Dan Williams Date: Wed Nov 15 10:10:48 2017 -0800 acpi, nfit: add 'Enable Latch System Shutdown Status' command support The NVDIMM_FAMILY_INTEL 'Enable Latch System Shutdown Status' command indicates to the platform that system software has acknowledged the most recent unsafe shutdown status. Signed-off-by: Dan Williams drivers/acpi/nfit/nfit.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2f3b55ac0e15857f46a3696e964bb244305223bf Author: Masahiro Yamada Date: Mon Nov 13 19:40:40 2017 +0900 selinux: remove unnecessary assignment to subdir- Makefile.clean descends into $(subdir-y). Dummy assignment to subdir- is meaningless. Signed-off-by: Masahiro Yamada Acked-by: Paul Moore scripts/selinux/Makefile | 1 - 1 file changed, 1 deletion(-) commit e474ed45777bc230648186c0db990bd290383ada Author: Masahiro Yamada Date: Mon Nov 13 19:33:19 2017 +0900 kbuild: specify FORCE in Makefile.headersinst as .PHONY target Swap the order of ".PHONY: $(PHONY)" and "PHONY += FORCE" so that FORCE is correctly specified as a .PHONY target. Use a preferred way for specifying $(subdirs) as .PHONY targets. Signed-off-by: Masahiro Yamada scripts/Makefile.headersinst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4173cbac80faa22a8e2de40bcc7c156b675652b3 Author: Masahiro Yamada Date: Mon Nov 13 19:29:39 2017 +0900 kbuild: remove redundant mkdir from ./Kbuild These two targets are added to "targets". Their directories are automatically created. Signed-off-by: Masahiro Yamada Kbuild | 2 -- 1 file changed, 2 deletions(-) commit c4da7ed0e7d715b159b11efd10408510ffed1aa3 Author: Masahiro Yamada Date: Mon Nov 13 19:29:38 2017 +0900 kbuild: optimize object directory creation for incremental build The previous commit largely optimized the object directory creation. We can optimize it more for incremental build. There are already *.cmd files in the output directory. The existing *.cmd files have been picked up by $(wildcard ...). Obviously, directories containing them exist too, so we can skip "mkdir -p". With this, Kbuild runs almost zero "mkdir -p" in incremental building. Signed-off-by: Masahiro Yamada scripts/Makefile.build | 5 +++++ 1 file changed, 5 insertions(+) commit 8a78756eb545a6fb8007fa154a626ca2bc208027 Author: Masahiro Yamada Date: Mon Nov 13 19:29:37 2017 +0900 kbuild: create object directories simpler and faster For the out-of-tree build, scripts/Makefile.build creates output directories, but this operation is not efficient. scripts/Makefile.lib calculates obj-dirs as follows: obj-dirs := $(dir $(multi-objs) $(obj-y)) Please notice $(sort ...) is not used here. Usually the result is as many "./" as objects here. For a lot of duplicated paths, the following command is invoked. _dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d))) Then, the costly shell command is run over and over again. I see many points for optimization: [1] Use $(sort ...) to cut down duplicated paths before passing them to system call [2] Use single $(shell ...) instead of repeating it with $(foreach ...) This will reduce forking. [3] We can calculate obj-dirs more simply. Most of objects are already accumulated in $(targets). So, $(dir $(targets)) is fine and more comprehensive. I also removed ugly code in arch/x86/entry/vdso/Makefile. This is now really unnecessary. Signed-off-by: Masahiro Yamada Acked-by: Ingo Molnar Tested-by: Douglas Anderson arch/x86/entry/vdso/Makefile | 4 ---- scripts/Makefile.build | 15 ++++++--------- scripts/Makefile.host | 12 ------------ scripts/Makefile.lib | 5 ----- 4 files changed, 6 insertions(+), 30 deletions(-) commit 591f66899784ae0afa13ff9a3eb5ce0a4358e48b Author: Masahiro Yamada Date: Mon Nov 13 19:29:36 2017 +0900 kbuild: filter-out PHONY targets from "targets" The variable "targets" contains object paths for which existing .*.cmd files should be included. scripts/Makefile.build automatically adds $(MAKECMDGOALS) to "targets" as follows: targets += $(extra-y) $(MAKECMDGOALS) $(always) The $(MAKECMDGOALS) is a PHONY target in several places. PHONY targets never create .*.cmd files. Signed-off-by: Masahiro Yamada scripts/Makefile.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2982c953570b2bced858613d70443c2c6a90587b Author: Masahiro Yamada Date: Mon Nov 13 19:29:35 2017 +0900 kbuild: remove redundant $(wildcard ...) for cmd_files calculation I do not see any reason why $(wildcard ...) needs to be called twice for computing cmd_files. Remove the first one. Signed-off-by: Masahiro Yamada Makefile | 3 +-- scripts/Makefile.build | 3 +-- scripts/Makefile.headersinst | 3 +-- scripts/Makefile.modpost | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) commit 9a234a2e384349f21afac8d718aa294a668ad4fa Author: Masahiro Yamada Date: Mon Nov 13 19:29:34 2017 +0900 kbuild: create directory for make cache only when necessary Currently, the existence of $(dir $(make-cache)) is always checked, and created if it is missing. We can avoid unnecessary system calls by some tricks. [1] If KBUILD_SRC is unset, we are building in the source tree. The output directory checks can be entirely skipped. [2] If at least one cache data is found, it means the cache file was included. Obviously its directory exists. Skip "mkdir -p". [3] If Makefile does not contain any call of __run-and-store, it will not create a cache file. No need to create its directory. [4] The "mkdir -p" should be only invoked by the first call of __run-and-store Signed-off-by: Masahiro Yamada Reviewed-by: Douglas Anderson scripts/Kbuild.include | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit e9e716ff2d4d8618aefac55691a4c4483abecc37 Author: Julia Lawall Date: Mon Nov 13 17:50:42 2017 +0100 docs: dev-tools: coccinelle: delete out of date wiki reference The wiki is no longer available. Signed-off-by: Julia Lawall Signed-off-by: Masahiro Yamada Documentation/dev-tools/coccinelle.rst | 3 --- 1 file changed, 3 deletions(-) commit 937c812dfc0a25343d56b07734438610a1fb7b46 Author: Julia Lawall Date: Mon Nov 13 06:53:35 2017 +0100 coccinelle: orplus: reorganize to improve performance Adding two #define constants is less common than performing & and | operations on them, so put the addition first to reduce the set of cases that have to be considered in detail. At the same time, add & and | patterns for both arguments of +, to account for commutativity and obtain more results. Running time is divided by 3 when applying this to the whole kernel on my laptop with an Intel i5-6200U CPU. Signed-off-by: Julia Lawall Signed-off-by: Masahiro Yamada scripts/coccinelle/misc/orplus.cocci | 43 ++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 14 deletions(-) commit faae19be80be7c39c9ce8b04bcc9cc10da82c29e Author: Chad Dupuis Date: Wed Nov 15 07:06:06 2017 -0800 scsi: bnx2fc: Fix hung task messages when a cleanup response is not received during abort If a cleanup task is not responded to while we are in bnx2fc_abts_cleanup, it will hang the SCSI error handler since we use wait_for_completion instead of wait_for_completion_timeout. So, use wait_for_completion_timeout so that we don't hang the SCSI error handler thread forever. Fixes the call trace: [183373.131468] INFO: task scsi_eh_16:110146 blocked for more than 120 seconds. [183373.131469] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [183373.131470] scsi_eh_16 D ffff88103f2fca14 0 110146 2 0x00000080 [183373.131472] ffff880855e77cb0 0000000000000046 ffff881050654e70 ffff880855e77fd8 [183373.131474] ffff880855e77fd8 ffff880855e77fd8 ffff881050654e70 ffff88103f2fcb48 [183373.131475] ffff88103f2fcb50 7fffffffffffffff ffff881050654e70 ffff88103f2fca14 [183373.131477] Call Trace: [183373.131479] [] schedule+0x29/0x70 [183373.131481] [] schedule_timeout+0x239/0x2d0 [183373.131486] [] ? __dev_printk+0x3e/0x90 [183373.131487] [] ? dev_printk+0x5d/0x80 [183373.131490] [] wait_for_completion+0x116/0x170 [183373.131492] [] ? wake_up_state+0x20/0x20 [183373.131494] [] bnx2fc_abts_cleanup+0x3d/0x62 [bnx2fc] [183373.131497] [] bnx2fc_eh_abort+0x470/0x580 [bnx2fc] [183373.131500] [] scsi_error_handler+0x59f/0x8b0 [183373.131501] [] ? scsi_eh_get_sense+0x250/0x250 [183373.131503] [] kthread+0xcf/0xe0 [183373.131505] [] ? kthread_create_on_node+0x140/0x140 [183373.131507] [] ret_from_fork+0x58/0x90 [183373.131509] [] ? kthread_create_on_node+0x140/0x140 Signed-off-by: Chad Dupuis Reviewed-by: Laurence Oberman Tested-by: Laurence Oberman Signed-off-by: Martin K. Petersen drivers/scsi/bnx2fc/bnx2fc_io.c | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) commit 6363b3f3ac5be096d08c8c504128befa0c033529 Merge: 1b6115f 6297fab Author: Linus Torvalds Date: Wed Nov 15 15:12:28 2017 -0800 Merge tag 'ipmi-for-4.15' of git://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "This is a fairly large rework of the IPMI code, along with a bunch of smaller fixes. The major changes have been in the next tree for a couple of months, so they should be good to do in. - Some users had IPMI systems where the GUID of the IPMI controller could change. So rescanning of the GUID was added. The naming of some sysfs things was dependent on the GUID, however, so this resulted in the sysfs interface code in IPMI changing to remove that dependency and name the IPMI BMCs like other sysfs devices. - The ipmi_si_intf.c code was fairly bloated with all the different discovery methods (PCI, ACPI, SMBIOS, OF, platform, module parameters, hot add). The structure of how the interfaces were added was redone to make them more modular, then the individual methods were pulled out into their own files" * tag 'ipmi-for-4.15' of git://github.com/cminyard/linux-ipmi: (48 commits) ipmi_si: Delete an error message for a failed memory allocation in try_smi_init() ipmi_si: fix memory leak on new_smi ipmi: remove redundant initialization of bmc ipmi: pr_err() strings should end with newlines ipmi: Clean up some print operations ipmi: Make the DMI probe into a generic platform probe ipmi: Make the IPMI proc interface configurable ipmi_ssif: Add device attrs for the things in proc ipmi_si: Add device attrs for the things in proc ipmi_si: remove ipmi_smi_alloc() function ipmi_si: Move port and mem I/O handling to their own files ipmi_si: Get rid of unused spacing and port fields ipmi_si: Move PARISC handling to another file ipmi_si: Move PCI setup to another file ipmi_si: Move platform device handling to another file ipmi_si: Move hardcode handling to a separate file. ipmi_si: Move the hotmod handling to another file. ipmi_si: Change ipmi_si_add_smi() to take just I/O info ipmi_si: Move io setup into io structure ipmi_si: Move irq setup handling into the io struct ... commit 1b6115fbe3b3db746d7baa11399dd617fc75e1c4 Merge: ad0835a 91f3140 Author: Linus Torvalds Date: Wed Nov 15 15:01:28 2017 -0800 Merge tag 'pci-v4.15-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: - detach driver before tearing down procfs/sysfs (Alex Williamson) - disable PCIe services during shutdown (Sinan Kaya) - fix ASPM oops on systems with no Root Ports (Ard Biesheuvel) - fix ASPM LTR_L1.2_THRESHOLD programming (Bjorn Helgaas) - fix ASPM Common_Mode_Restore_Time computation (Bjorn Helgaas) - fix portdrv MSI/MSI-X vector allocation (Dongdong Liu, Bjorn Helgaas) - report non-fatal AER errors only to the affected endpoint (Gabriele Paoloni) - distribute bus numbers, MMIO, and I/O space among hotplug bridges to allow more devices to be hot-added (Mika Westerberg) - fix pciehp races during initialization and surprise link down (Mika Westerberg) - handle surprise-removed devices in PME handling (Qiang) - support resizable BARs for large graphics devices (Christian König) - expose SR-IOV offset, stride, and VF device ID via sysfs (Filippo Sironi) - create SR-IOV virtfn/physfn sysfs links before attaching driver (Stuart Hayes) - fix SR-IOV "ARI Capable Hierarchy" restore issue (Tony Nguyen) - enforce Kconfig IOV/REALLOC dependency (Sascha El-Sharkawy) - avoid slot reset if bridge itself is broken (Jan Glauber) - clean up pci_reset_function() path (Jan H. Schönherr) - make pci_map_rom() fail if the option ROM is invalid (Changbin Du) - convert timers to timer_setup() (Kees Cook) - move PCI_QUIRKS to PCI bus Kconfig menu (Randy Dunlap) - constify pci_dev_type and intel_mid_pci_ops (Bhumika Goyal) - remove unnecessary pci_dev, pci_bus, resource, pcibios_set_master() declarations (Bjorn Helgaas) - fix endpoint framework overflows and BUG()s (Dan Carpenter) - fix endpoint framework issues (Kishon Vijay Abraham I) - avoid broken Cavium CN8xxx bus reset behavior (David Daney) - extend Cavium ACS capability quirks (Vadim Lomovtsev) - support Synopsys DesignWare RC in ECAM mode (Ard Biesheuvel) - turn off dra7xx clocks cleanly on shutdown (Keerthy) - fix Faraday probe error path (Wei Yongjun) - support HiSilicon STB SoC PCIe host controller (Jianguo Sun) - fix Hyper-V interrupt affinity issue (Dexuan Cui) - remove useless ACPI warning for Hyper-V pass-through devices (Vitaly Kuznetsov) - support multiple MSI on iProc (Sandor Bodo-Merle) - support Layerscape LS1012a and LS1046a PCIe host controllers (Hou Zhiqiang) - fix Layerscape default error response (Minghuan Lian) - support MSI on Tango host controller (Marc Gonzalez) - support Tegra186 PCIe host controller (Manikanta Maddireddy) - use generic accessors on Tegra when possible (Thierry Reding) - support V3 Semiconductor PCI host controller (Linus Walleij) * tag 'pci-v4.15-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (85 commits) PCI/ASPM: Add L1 Substates definitions PCI/ASPM: Reformat ASPM register definitions PCI/ASPM: Use correct capability pointer to program LTR_L1.2_THRESHOLD PCI/ASPM: Account for downstream device's Port Common_Mode_Restore_Time PCI: xgene: Rename xgene_pcie_probe_bridge() to xgene_pcie_probe() PCI: xilinx: Rename xilinx_pcie_link_is_up() to xilinx_pcie_link_up() PCI: altera: Rename altera_pcie_link_is_up() to altera_pcie_link_up() PCI: Fix kernel-doc build warning PCI: Fail pci_map_rom() if the option ROM is invalid PCI: Move pci_map_rom() error path PCI: Move PCI_QUIRKS to the PCI bus menu alpha/PCI: Make pdev_save_srm_config() static PCI: Remove unused declarations PCI: Remove redundant pci_dev, pci_bus, resource declarations PCI: Remove redundant pcibios_set_master() declarations PCI/PME: Handle invalid data when reading Root Status PCI: hv: Use effective affinity mask PCI: pciehp: Do not clear Presence Detect Changed during initialization PCI: pciehp: Fix race condition handling surprise link down PCI: Distribute available resources to hotplug-capable bridges ... commit ad0835a93008e5901415a0a27847d6a27649aa3a Merge: 22714a2 4190b4e Author: Linus Torvalds Date: Wed Nov 15 14:54:53 2017 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma updates from Doug Ledford: "This is a fairly plain pull request. Lots of driver updates across the stack, a huge number of static analysis cleanups including a close to 50 patch series from Bart Van Assche, and a number of new features inside the stack such as general CQ moderation support. Nothing really stands out, but there might be a few conflicts as you take things in. In particular, the cleanups touched some of the same lines as the new timer_setup changes. Everything in this pull request has been through 0day and at least two days of linux-next (since Stephen doesn't necessarily flag new errors/warnings until day2). A few more items (about 30 patches) from Intel and Mellanox showed up on the list on Tuesday. I've excluded those from this pull request, and I'm sure some of them qualify as fixes suitable to send any time, but I still have to review them fully. If they contain mostly fixes and little or no new development, then I will probably send them through by the end of the week just to get them out of the way. There was a break in my acceptance of patches which coincides with the computer problems I had, and then when I got things mostly back under control I had a backlog of patches to process, which I did mostly last Friday and Monday. So there is a larger number of patches processed in that timeframe than I was striving for. Summary: - Add iWARP support to qedr driver - Lots of misc fixes across subsystem - Multiple update series to hns roce driver - Multiple update series to hfi1 driver - Updates to vnic driver - Add kref to wait struct in cxgb4 driver - Updates to i40iw driver - Mellanox shared pull request - timer_setup changes - massive cleanup series from Bart Van Assche - Two series of SRP/SRPT changes from Bart Van Assche - Core updates from Mellanox - i40iw updates - IPoIB updates - mlx5 updates - mlx4 updates - hns updates - bnxt_re fixes - PCI write padding support - Sparse/Smatch/warning cleanups/fixes - CQ moderation support - SRQ support in vmw_pvrdma" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (296 commits) RDMA/core: Rename kernel modify_cq to better describe its usage IB/mlx5: Add CQ moderation capability to query_device IB/mlx4: Add CQ moderation capability to query_device IB/uverbs: Add CQ moderation capability to query_device IB/mlx5: Exposing modify CQ callback to uverbs layer IB/mlx4: Exposing modify CQ callback to uverbs layer IB/uverbs: Allow CQ moderation with modify CQ iw_cxgb4: atomically flush the qp iw_cxgb4: only call the cq comp_handler when the cq is armed iw_cxgb4: Fix possible circular dependency locking warning RDMA/bnxt_re: report vlan_id and sl in qp1 recv completion IB/core: Only maintain real QPs in the security lists IB/ocrdma_hw: remove unnecessary code in ocrdma_mbx_dealloc_lkey RDMA/core: Make function rdma_copy_addr return void RDMA/vmw_pvrdma: Add shared receive queue support RDMA/core: avoid uninitialized variable warning in create_udata RDMA/bnxt_re: synchronize poll_cq and req_notify_cq verbs RDMA/bnxt_re: Flush CQ notification Work Queue before destroying QP RDMA/bnxt_re: Set QP state in case of response completion errors RDMA/bnxt_re: Add memory barriers when processing CQ/EQ entries ... commit 22714a2ba4b55737cd7d5299db7aaf1fa8287354 Merge: 766ec76 5f2e673 Author: Linus Torvalds Date: Wed Nov 15 14:29:44 2017 -0800 Merge branch 'for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: "Cgroup2 cpu controller support is finally merged. - Basic cpu statistics support to allow monitoring by default without the CPU controller enabled. - cgroup2 cpu controller support. - /sys/kernel/cgroup files to help dealing with new / optional features" * 'for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: export list of cgroups v2 features using sysfs cgroup: export list of delegatable control files using sysfs cgroup: mark @cgrp __maybe_unused in cpu_stat_show() MAINTAINERS: relocate cpuset.c cgroup, sched: Move basic cpu stats from cgroup.stat to cpu.stat sched: Implement interface for cgroup unified hierarchy sched: Misc preps for cgroup unified hierarchy interface sched/cputime: Add dummy cputime_adjust() implementation for CONFIG_VIRT_CPU_ACCOUNTING_NATIVE cgroup: statically initialize init_css_set->dfl_cgrp cgroup: Implement cgroup2 basic CPU usage accounting cpuacct: Introduce cgroup_account_cputime[_field]() sched/cputime: Expose cputime_adjust() commit 766ec76a27aa9dfdfee3a80f29ddc1f7539c71f9 Merge: 0be5003 438a506 Author: Linus Torvalds Date: Wed Nov 15 14:17:11 2017 -0800 Merge branch 'for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu Pull percpu update from Tejun Heo: "Another minor pull request. It only contains one commit which can reclaim a bit of memory wasted during boot on UP" * 'for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: don't forget to free the temporary struct pcpu_alloc_info commit 0be500363c6709032254cd52c8059d9ace61de73 Merge: 1bc0357 9a19b46 Author: Linus Torvalds Date: Wed Nov 15 14:15:21 2017 -0800 Merge branch 'for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue updates from Tejun Heo: "There was a commit to make unbound kworkers respect cpu isolation but it conflicted with the restructuring of cpu isolation and got reverted, so the only thing left is the trivial comment fix. Will retry the cpu isolation change after this merge window" * 'for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Fix comment for unbound workqueue's attrbutes Revert "workqueue: respect isolated cpus when queueing an unbound work" workqueue: respect isolated cpus when queueing an unbound work commit 1bc03573e1c9024d4e4be97df4a1e0931edbae2c Merge: 1be2172 5bca462 Author: Linus Torvalds Date: Wed Nov 15 14:11:41 2017 -0800 Merge branch 'for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata updates from Tejun Heo: "Nothing too interesting or alarming. Other than a new power saving mode addition to ahci and crash fix on a tracepoint, all changes are trivial or device-specific" * 'for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (22 commits) ahci: imx: Handle increased read failures for IMX53 temperature sensor in low frequency mode. ata: sata_dwc_460ex: Propagate platform device ID to DMA driver ata: fixes kernel crash while tracing ata_eh_link_autopsy event ata: pata_pdc2027x: Fix space before '[' error. libata: fix spelling mistake: 'ambigious' -> 'ambiguous' ata: ceva: Add SMMU support for SATA IP ata: ceva: Correct the suspend and resume logic for SATA ata: ceva: Correct the AXI bus configuration for SATA ports ata: ceva: Add CCI support for SATA if CCI is enabled ata: ceva: Make RxWaterMark value as module parameter ata: ceva: Disable Device Sleep capability ata: ceva: Add gen 3 mode support in driver ata: ceva: Move sata port phy oob settings to device-tree devicetree: bindings: Add sata port phy config parameters in ahci-ceva ata: mark expected switch fall-throughs ata: sata_mv: remove a redundant assignment to pointer ehi ahci: Add support for Cavium's fifth generation SATA controller ata: sata_rcar: Use of_device_get_match_data() helper libata: make ata_port_type const libata: make static arrays const, reduces object code size ... commit 1be2172e96e33bfa22a5c7a651f768ef30ce3984 Merge: 3c18767 ece1996 Author: Linus Torvalds Date: Wed Nov 15 13:46:33 2017 -0800 Merge tag 'modules-for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull module updates from Jessica Yu: "Summary of modules changes for the 4.15 merge window: - treewide module_param_call() cleanup, fix up set/get function prototype mismatches, from Kees Cook - minor code cleanups" * tag 'modules-for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: module: Do not paper over type mismatches in module_param_call() treewide: Fix function prototypes for module_param_call() module: Prepare to convert all module_param_call() prototypes kernel/module: Delete an error message for a failed memory allocation in add_module_usage() commit 3c18767a45650009d02537677ffb7997bd402a2c Merge: 19b9aaf 1f90a216 Author: Linus Torvalds Date: Wed Nov 15 13:39:18 2017 -0800 Merge tag 'mailbox-v4.15' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: "Change to POLL api and fixes for FlexRM and OMAP driver. Summary: - Core: Prefer ACK method over POLL, if both supported - Test: use flag instead of special character - FlexRM: Usual driver internal minor churn - Omap: fix error path" * tag 'mailbox-v4.15' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox/omap: unregister mbox class mailbox: mailbox-test: don't rely on rx_buffer content to signal data ready mailbox: reset txdone_method TXDONE_BY_POLL if client knows_txdone mailbox: Build Broadcom FlexRM driver as loadable module for iProc SOCs mailbox: bcm-flexrm-mailbox: Use common GPL comment header mailbox: bcm-flexrm-mailbox: add depends on ARCH_BCM_IPROC mailbox: bcm-flexrm-mailbox: Print ring number in errors and warnings mailbox: bcm-flexrm-mailbox: Fix FlexRM ring flush sequence commit 646d944c2ef5a3b298c4e150494c71b9272d8b47 Author: Stefano Stabellini Date: Wed Nov 15 13:20:21 2017 -0800 xen/pvcalls: fix potential endless loop in pvcalls-front.c mutex_trylock() returns 1 if you take the lock and 0 if not. Assume you take in_mutex on the first try, but you can't take out_mutex. Next times you call mutex_trylock() in_mutex is going to fail. It's an endless loop. Solve the problem by waiting until the global refcount is 1 instead (the refcount is 1 when the only active pvcalls frontend function is pvcalls_front_release). Reported-by: Dan Carpenter Signed-off-by: Stefano Stabellini Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 19b9aaf8a5fa634b2f16c3a2cfa819b74991273e Merge: 6c4ba00 838c8af Author: Linus Torvalds Date: Wed Nov 15 13:37:15 2017 -0800 Merge tag 'for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - misc minor fixes * tag 'for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: supply: cpcap-charger: fix incorrect return value check power: supply: replace pr_* with dev_* power: supply: pcf50633-charger: remove redundant variable charging_start power: supply: generic-adc-battery: remove redundant variable pdata power: supply: max8997: Improve a size determination in probe commit 6c4ba00c40d5acb17f32d4b7e02dbcd21f336d9f Merge: 8c38fb5 8635d6b Author: Linus Torvalds Date: Wed Nov 15 13:35:43 2017 -0800 Merge tag 'hsi-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI updates from Sebastian Reichel: - add HSI OMAP4 bindings - misc small fixes * tag 'hsi-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: dt-bindings: hsi: add omap4 hsi controller bindings HSI: hsi_char: pr_err() strings should end with newlines HSI: omap_ssi_core: fix kilo to be "k" not "K" commit 8c38fb5c3dc590214991128d16867f86a4f251bd Merge: f9bab26 5794ed7 Author: Linus Torvalds Date: Wed Nov 15 13:32:56 2017 -0800 Merge tag 'selinux-pr-20171113' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull SELinux updates from Paul Moore: "Seven SELinux patches for v4.15, although five of the seven are small build fixes and cleanups. Of the remaining two patches, the only one worth really calling out is Eric's fix for the SELinux filesystem xattr set/remove code; the other patch simply converts the SELinux hash table implementation to use kmem_cache. Eric's setxattr/removexattr tweak converts SELinux back to calling the commoncap implementations when the xattr is not SELinux related. The immediate win is to fixup filesystem capabilities in user namespaces, but it makes things a bit saner overall; more information in the commit description" * tag 'selinux-pr-20171113' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: remove extraneous initialization of slots_used and max_chain_len selinux: remove redundant assignment to len selinux: remove redundant assignment to str selinux: fix build warning selinux: fix build warning by removing the unused sid variable selinux: Perform both commoncap and selinux xattr checks selinux: Use kmem_cache for hashtab_node commit f9bab2677ac77622618686b199073978ba263c12 Merge: 373c455 42d5e37 Author: Linus Torvalds Date: Wed Nov 15 13:28:48 2017 -0800 Merge tag 'audit-pr-20171113' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit updates from Paul Moore: "Another relatively small pull request for audit, nine patches total. The only real new bit of functionality is the patch from Richard which adds the ability to filter records based on the filesystem type. The remainder are bug fixes and cleanups; the bug fix highlights include: - ensuring that we properly audit init/PID-1 (me) - allowing the audit daemon to shutdown the kernel/auditd connection cleanly by setting the audit PID to zero (Steve)" * tag 'audit-pr-20171113' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: filter PATH records keyed on filesystem magic Audit: remove unused audit_log_secctx function audit: Allow auditd to set pid to 0 to end auditing audit: Add new syscalls to the perm=w filter audit: use audit_set_enabled() in audit_enable() audit: convert audit_ever_enabled to a boolean audit: don't use simple_strtol() anymore audit: initialize the audit subsystem as early as possible audit: ensure that 'audit=1' actually enables audit for PID 1 commit 373c4557d2aa362702c4c2d41288fb1e54990b7c Author: Jann Horn Date: Tue Nov 14 01:03:44 2017 +0100 mm/pagewalk.c: report holes in hugetlb ranges This matters at least for the mincore syscall, which will otherwise copy uninitialized memory from the page allocator to userspace. It is probably also a correctness error for /proc/$pid/pagemap, but I haven't tested that. Removing the `walk->hugetlb_entry` condition in walk_hugetlb_range() has no effect because the caller already checks for that. This only reports holes in hugetlb ranges to callers who have specified a hugetlb_entry callback. This issue was found using an AFL-based fuzzer. v2: - don't crash on ->pte_hole==NULL (Andrew Morton) - add Cc stable (Andrew Morton) Fixes: 1e25a271c8ac ("mincore: apply page table walker on do_mincore()") Signed-off-by: Jann Horn Cc: Signed-off-by: Linus Torvalds mm/pagewalk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5bbcc0f595fadb4cac0eddc4401035ec0bd95b09 Merge: 892204e 50895b9 Author: Linus Torvalds Date: Wed Nov 15 11:56:19 2017 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next Pull networking updates from David Miller: "Highlights: 1) Maintain the TCP retransmit queue using an rbtree, with 1GB windows at 100Gb this really has become necessary. From Eric Dumazet. 2) Multi-program support for cgroup+bpf, from Alexei Starovoitov. 3) Perform broadcast flooding in hardware in mv88e6xxx, from Andrew Lunn. 4) Add meter action support to openvswitch, from Andy Zhou. 5) Add a data meta pointer for BPF accessible packets, from Daniel Borkmann. 6) Namespace-ify almost all TCP sysctl knobs, from Eric Dumazet. 7) Turn on Broadcom Tags in b53 driver, from Florian Fainelli. 8) More work to move the RTNL mutex down, from Florian Westphal. 9) Add 'bpftool' utility, to help with bpf program introspection. From Jakub Kicinski. 10) Add new 'cpumap' type for XDP_REDIRECT action, from Jesper Dangaard Brouer. 11) Support 'blocks' of transformations in the packet scheduler which can span multiple network devices, from Jiri Pirko. 12) TC flower offload support in cxgb4, from Kumar Sanghvi. 13) Priority based stream scheduler for SCTP, from Marcelo Ricardo Leitner. 14) Thunderbolt networking driver, from Amir Levy and Mika Westerberg. 15) Add RED qdisc offloadability, and use it in mlxsw driver. From Nogah Frankel. 16) eBPF based device controller for cgroup v2, from Roman Gushchin. 17) Add some fundamental tracepoints for TCP, from Song Liu. 18) Remove garbage collection from ipv6 route layer, this is a significant accomplishment. From Wei Wang. 19) Add multicast route offload support to mlxsw, from Yotam Gigi" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2177 commits) tcp: highest_sack fix geneve: fix fill_info when link down bpf: fix lockdep splat net: cdc_ncm: GetNtbFormat endian fix openvswitch: meter: fix NULL pointer dereference in ovs_meter_cmd_reply_start netem: remove unnecessary 64 bit modulus netem: use 64 bit divide by rate tcp: Namespace-ify sysctl_tcp_default_congestion_control net: Protect iterations over net::fib_notifier_ops in fib_seq_sum() ipv6: set all.accept_dad to 0 by default uapi: fix linux/tls.h userspace compilation error usbnet: ipheth: prevent TX queue timeouts when device not ready vhost_net: conditionally enable tx polling uapi: fix linux/rxrpc.h userspace compilation errors net: stmmac: fix LPI transitioning for dwmac4 atm: horizon: Fix irq release error net-sysfs: trigger netlink notification on ifalias change via sysfs openvswitch: Using kfree_rcu() to simplify the code openvswitch: Make local function ovs_nsh_key_attr_size() static openvswitch: Fix return value check in ovs_meter_cmd_features() ... commit 892204e06cb9e89fbc4b299a678f9ca358e97cac Merge: c9b012e e0c5f36 Author: Linus Torvalds Date: Wed Nov 15 11:36:08 2017 -0800 Merge tag 'mips_4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips Pull MIPS updates from James Hogan: "These are the main MIPS changes for 4.15. Fixes: - ralink: Fix MT7620 PCI build issues (4.5) - Disable cmpxchg64() and HAVE_VIRT_CPU_ACCOUNTING_GEN for 32-bit SMP (4.1) - Fix MIPS64 FP save/restore on 32-bit kernels (4.0) - ptrace: Pick up ptrace/seccomp changed syscall numbers (3.19) - ralink: Fix MT7628 pinmux (3.19) - BCM47XX: Fix LED inversion on WRT54GSv1 (3.17) - Fix n32 core dumping as o32 since regset support (3.13) - ralink: Drop obsolete USB_ARCH_HAS_HCD select Build system: - Default to "generic" (multiplatform) system type instead of IP22 - Use generic little endian MIPS32 r2 configuration as default defconfig instead of ip22_defconfig FPU emulation: - Fix exception generation for certain R6 FPU instructions SMP: - Allow __cpu_number_map to be larger than NR_CPUS for sparse CPU id spaces Miscellaneous: - Add iomem resource for kernel bss section for kexec/kdump - Atomics: Nudge writes on bit unlock - DT files: Standardise "ok" -> "okay" Minor cleanups: - Define virt_to_pfn() - Make thread_saved_pc static - Simplify 32-bit sign extension in __read_64bit_c0_split() - DMA: Use vma_pages() helper - FPU emulation: Replace unsigned with unsigned int - MM: Removed unused lastpfn - Alchemy: Make clk_ops const - Lasat: Use setup_timer() helper - ralink: Use BIT() in MT7620 PCI driver Platform support: BMIPS: - Enable HARDIRQS_SW_RESEND Broadcom BCM63XX: - Add clkdev lookup support - Update clk driver, UART driver, DTs to handle named refclk from DTs - Split apart various clocks to more closely match hardware - Add ethernet clocks Cavium Octeon: - Remove usage of cvmx_wait() in favour of __delay() ImgTec Pistachio: - DT: Drop deprecated dwmmc num-slots property Ingenic JZ4780: - Add NFS root to Ci20 defconfig - Add watchdog to Ci20 DT & defconfig, and allow building of watchdog driver with this SoC Generic (multiplatform): - Migrate xilfpga (MIPSfpga) platform to the generic platform Lantiq xway: - Fix ASC0/ASC1 clocks" * tag 'mips_4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips: (46 commits) MIPS: Add iomem resource for kernel bss section. MIPS: cmpxchg64() and HAVE_VIRT_CPU_ACCOUNTING_GEN don't work for 32-bit SMP MIPS: BMIPS: Enable HARDIRQS_SW_RESEND MIPS: pci: Make use of the BIT() macro inside the mt7620 driver MIPS: pci: Remove KERN_WARN instance inside the mt7620 driver MIPS: pci: Remove duplicate define in mt7620 driver MIPS: ralink: Fix typo in mt7628 pinmux function MIPS: ralink: Fix MT7628 pinmux MIPS: Fix odd fp register warnings with MIPS64r2 watchdog: jz4780: Allow selection of jz4740-wdt driver MIPS/ptrace: Update syscall nr on register changes MIPS/ptrace: Pick up ptrace/seccomp changed syscalls MIPS: Fix an n32 core file generation regset support regression MIPS: Fix MIPS64 FP save/restore on 32-bit kernels MIPS: page.h: Define virt_to_pfn() MIPS: Xilfpga: Switch to using generic defconfigs MIPS: generic: Add support for MIPSfpga MIPS: Set defconfig target to a generic system for 32r2el MIPS: Kconfig: Set default MIPS system type as generic MIPS: DTS: Remove num-slots from Pistachio SoC ... commit 451cc55dd17fa5130f05629ac8d90e32facf27f6 Author: Rex Zhu Date: Wed Nov 15 16:36:30 2017 +0800 drm/amd/pp: fix dpm randomly failed on Vega10 Signed-off-by: Rex Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 29 +++++++++++----------- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h | 1 + 2 files changed, 16 insertions(+), 14 deletions(-) commit 014d6da6cb2525d7f48fb08c705cb130cc7b5f4a Author: Stefan Wahren Date: Sun Oct 29 12:49:05 2017 +0100 ARM: dts: bcm283x: Fix DTC warnings about missing phy-cells This patch fixes the DTC warnings about missing property #phy-cells. Signed-off-by: Stefan Wahren Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt arch/arm/boot/dts/bcm283x.dtsi | 1 + 1 file changed, 1 insertion(+) commit c9b012e5f4a1d01dfa8abc6318211a67ba7d5db2 Merge: b293fca 6cfa7cc Author: Linus Torvalds Date: Wed Nov 15 10:56:56 2017 -0800 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: "The big highlight is support for the Scalable Vector Extension (SVE) which required extensive ABI work to ensure we don't break existing applications by blowing away their signal stack with the rather large new vector context (<= 2 kbit per vector register). There's further work to be done optimising things like exception return, but the ABI is solid now. Much of the line count comes from some new PMU drivers we have, but they're pretty self-contained and I suspect we'll have more of them in future. Plenty of acronym soup here: - initial support for the Scalable Vector Extension (SVE) - improved handling for SError interrupts (required to handle RAS events) - enable GCC support for 128-bit integer types - remove kernel text addresses from backtraces and register dumps - use of WFE to implement long delay()s - ACPI IORT updates from Lorenzo Pieralisi - perf PMU driver for the Statistical Profiling Extension (SPE) - perf PMU driver for Hisilicon's system PMUs - misc cleanups and non-critical fixes" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (97 commits) arm64: Make ARMV8_DEPRECATED depend on SYSCTL arm64: Implement __lshrti3 library function arm64: support __int128 on gcc 5+ arm64/sve: Add documentation arm64/sve: Detect SVE and activate runtime support arm64/sve: KVM: Hide SVE from CPU features exposed to guests arm64/sve: KVM: Treat guest SVE use as undefined instruction execution arm64/sve: KVM: Prevent guests from using SVE arm64/sve: Add sysctl to set the default vector length for new processes arm64/sve: Add prctl controls for userspace vector length management arm64/sve: ptrace and ELF coredump support arm64/sve: Preserve SVE registers around EFI runtime service calls arm64/sve: Preserve SVE registers around kernel-mode NEON use arm64/sve: Probe SVE capabilities and usable vector lengths arm64: cpufeature: Move sys_caps_initialised declarations arm64/sve: Backend logic for setting the vector length arm64/sve: Signal handling support arm64/sve: Support vector length resetting for new processes arm64/sve: Core task context handling arm64/sve: Low-level CPU setup ... commit b293fca43be544483b6488d33ad4b3ed55881064 Merge: 0ef7687 fbe934d Author: Linus Torvalds Date: Wed Nov 15 10:49:15 2017 -0800 Merge tag 'riscv-for-linus-4.15-arch-v9-premerge' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux Pull RISC-V architecture support from Palmer Dabbelt: "This contains the core RISC-V Linux port, which has been through nine rounds of review on various mailing lists. The port is not complete: there's some cleanup patches moving through the review process, a whole bunch of drivers that need some work, and a lot of feature additions that will be needed. The patches contained in this tag have been through nine rounds of review on the various mailing lists. I have some outstanding cleanup patches, but since there's been so much review on these patches I thought it would be best to submit them as-is and then submit explicit cleanup patches so everyone can review them. This first patch set is big enough that it's a bit of a pain to constantly rewrite, and it's caused a few headaches with various contributors. The port is definately a work in progress. While what's there builds and boots with 4.14, it's a bit hard to actually see anything happen because there are no device drivers yet. I maintain a staging branch that contains all the device drivers and cleanup that actually works, but those patches won't all be ready for a while. I'd like to get what we currently have into your tree so everyone can start working from a single base -- of particular importance is allowing the glibc upstreaming process to proceed so we can sort out any possibly lingering user-visible ABI problems we might have. Copied below is the ChangeLog that contains the history of this patch set: (v9) As per suggestions on our v8 patch set, I've split the core architecture code out from our drivers and would like to submit this patch set to be included into linux-next, with the goal being to be merged in during the next merge window. This patch set is based on 4.14-rc2, but if it's better to have it based on something else then I can change it around. This patch set contains just the core arch code for RISC-V, so while it builds an nominally boots, you can't print or take an interrupt so it's not that useful. If you're looking to actually boot a system it would probably be better to use the full patch set listed below. We've collected a handful of tags from reviewers, and the remainder of the patch set only got minimal feedback last time. Here's what changed: - We now use the device tree to initialize the timer driver so it's less tighly coupled with the arch port. - I cleaned up the defconfigs -- there's actually now just one, and it's empty. For now I think we're OK with what the kernel sets as defaults, but I anticipate we'll begin to expand this as people start to use the port more. - The VDSO symbols version is sane. - We WFI while spinning in the boot loop. - A handful of comments have been added. While there are still a handful of FIXMEs in this patch set, we've started to get enough interest from various users and contributors that maintaining an out of tree patch set is starting to become a big burden. Hopefully the patches are good enough to merge now, which will at least get everyone working in a more reasonable manner as we clean up the remaining issues. (v8) I know it may not be the ideal time to submit a patch set right now, as it's the middle of the merge window, but things have calmed down quite a bit in the last month so I thought it would be good to get everyone on the same page. There's been a handful of changes since the last patch set, but most of them are fairly minor: - We changed PAGE_OFFSET to allowing mapping more physical memory on 64-bit systems. This is user configurable, as it triggers a different code model that generates slightly less efficient code. - The device tree binding documentation is back, I'd managed to lose it at some point. - We now pass the atomic64 test suite - The SBI timer driver has been refactored. (v7) It's been a while since my last patch set, but the changes han been fairly minimal: - The PCI cleanup patches have been dropped, we'll do them as a separate patch set later. - We've the Kconfig entries from CONFIG_ISA_* to CONFIG_RISCV_ISA_*, to make grep easier. - There have been a handful of memory model related tweaks in I/O land, particularly relating the PCI and the upcoming platform specification. There are significant comments in the relevant files. This is still a WIP, but I think we're close to getting as good as we're going to get until we end up with some more specifications. (v6) As it's been only a day since the v5 patch set, the changes are pretty minimal: - The patch set is now based on linux-next/master, which I believe is a better base now that we're getting closer to upstream. - EARLY_PRINTK is no longer an option. Since the SBI console is reasonable, there's no penalty to enabling it (and thus no benefit to disabling it). - The mmap syscalls were refactored a bit. (v5) Things have really started to calm down, so this is fairly similar to the v4 patch set. The most interesting changes include: - We've moved back to a single patch set. - SMP support has been fixed, I was accidentally running on a non-SMP configuration. There were various mistakes all over the tree as a result of this. - The cmpxchg syscalls have been removed, as they were deemed a bad idea. As a result, RISC-V Linux systems mandate the A extension. The corresponding Kconfig entry to enable builds on non-A systems has been removed. - A few more atomic fixes: mostly fence changes, but those resulted in a handful of additional macros that were no longer necessary. - riscv_early_sie has been removed. (v4) There have only been a few changes since the v3 patch set: - The cmpxchg64 syscall is no longer enabled on 32-bit systems. It's not possible to provide this on SMP systems, and it's not necessary as glibc knows not to call it. - We provide a ELF_HWCAP so users can determine the ISA of the machine the kernel is running on. - The multi-line comments are in a better form. - There were a handful of headers that could be replaced with the asm-generic versions, and a few unnecessary definitions. - We no longer use printk, but instead use pr_*. - A few Kconfig and defconfig entries have been cleaned up. (v3) A highlight of the changes since the v2 patch set includes: - We've split out all our drivers into separate patch sets, which I've already sent out to the relevant maintainers. I haven't included those patches in this patch set, but some of them are necessary to build our port. - The patch set is now split up differently: rather than being split per directory it is split per topic. Hopefully this will make it easier to review the port on the mailing list. The split is a bit rough, so you probably still want to look at the patch set as a whole. - atomic.h has been completely rewritten and is hopefully now correct. I've attempted to sanitize the various other memory model related code as well, and I think it should all be sane now aside from a handful of FIXMEs commented in the code. - We've changed the cmpexchg syscall to always exist and to not be multiplexed. There is also a VDSO entry for compare and exchange, which allows kernels with the A extension to execute user code without the A extension reasonably fast. - Our user-visible register state now contains enough space for the Q extension for 128-bit floating point, as well as a few words to allow extensibility to future ISA extensions like the eventual V extension for vectors. - A handful of driver cleanups, but these have been split into separate patch sets now so I won't duplicate them here. (v2) A highlight of the changes since the v1 patch set includes: - We've split out our drivers into the right places, which means now there's a lot more patches. I'll be submitting these patches to various subsystem maintainers and including them in any future RISC-V patch sets until they've been merged. - The SBI console driver has been completely rewritten to use the HVC helpers and is now significantly smaller. - We've begun to use weaker barriers as opposed to just the big "fence". There's still some work to do here, specifically: - We need fences in the relaxed MMIO functions. - The non-relaxed MMIO functions are missing R/W bits on their fences. - Many AMOs need the aq and rl bits set. - We now have thread_info in task_struct. As a result, sscratch now contains TP instead of SP. This was necessary because thread_info is no longer on the stack. - A few shared routines have been added that we use instead of creating another arch copy" Reviewed-by: Arnd Bergmann * tag 'riscv-for-linus-4.15-arch-v9-premerge' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux: RISC-V: Build Infrastructure RISC-V: User-facing API RISC-V: Paging and MMU RISC-V: Device, timer, IRQs, and the SBI RISC-V: Task implementation RISC-V: ELF and module implementation RISC-V: Generic library routines and assembly RISC-V: Atomic and Locking Code RISC-V: Init and Halt Code dt-bindings: RISC-V CPU Bindings lib: Add shared copies of some GCC library routines MAINTAINERS: Add RISC-V commit 7d5905dc14a87805a59f3c5bf70173aac2bb18f8 Author: Rafael J. Wysocki Date: Wed Nov 15 02:13:40 2017 +0100 x86 / CPU: Always show current CPU frequency in /proc/cpuinfo After commit 890da9cf0983 (Revert "x86: do not use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz"") the "cpu MHz" number in /proc/cpuinfo on x86 can be either the nominal CPU frequency (which is constant) or the frequency most recently requested by a scaling governor in cpufreq, depending on the cpufreq configuration. That is somewhat inconsistent and is different from what it was before 4.13, so in order to restore the previous behavior, make it report the current CPU frequency like the scaling_cur_freq sysfs file in cpufreq. To that end, modify the /proc/cpuinfo implementation on x86 to use aperfmperf_snapshot_khz() to snapshot the APERF and MPERF feedback registers, if available, and use their values to compute the CPU frequency to be reported as "cpu MHz". However, do that carefully enough to avoid accumulating delays that lead to unacceptable access times for /proc/cpuinfo on systems with many CPUs. Run aperfmperf_snapshot_khz() once on all CPUs asynchronously at the /proc/cpuinfo open time, add a single delay upfront (if necessary) at that point and simply compute the current frequency while running show_cpuinfo() for each individual CPU. Also, to avoid slowing down /proc/cpuinfo accesses too much, reduce the default delay between consecutive APERF and MPERF reads to 10 ms, which should be sufficient to get large enough numbers for the frequency computation in all cases. Fixes: 890da9cf0983 (Revert "x86: do not use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz"") Signed-off-by: Rafael J. Wysocki Acked-by: Thomas Gleixner Tested-by: Thomas Gleixner Acked-by: Ingo Molnar arch/x86/kernel/cpu/Makefile | 2 +- arch/x86/kernel/cpu/aperfmperf.c | 74 ++++++++++++++++++++++++++++------------ arch/x86/kernel/cpu/cpu.h | 3 ++ arch/x86/kernel/cpu/proc.c | 6 +++- fs/proc/cpuinfo.c | 6 ++++ include/linux/cpufreq.h | 1 + 6 files changed, 68 insertions(+), 24 deletions(-) commit 0ef76878cfcf4d6b64972b283021f576a95d9216 Merge: 9682b3d fc41efc Author: Linus Torvalds Date: Wed Nov 15 10:21:58 2017 -0800 Merge branch 'for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching Pull livepatching updates from Jiri Kosina: - shadow variables support, allowing livepatches to associate new "shadow" fields to existing data structures, from Joe Lawrence - pre/post patch callbacks API, allowing livepatch writers to register callbacks to be called before and after patch application, from Joe Lawrence * 'for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching: livepatch: __klp_disable_patch() should never be called for disabled patches livepatch: Correctly call klp_post_unpatch_callback() in error paths livepatch: add transition notices livepatch: move transition "complete" notice into klp_complete_transition() livepatch: add (un)patch callbacks livepatch: Small shadow variable documentation fixes livepatch: __klp_shadow_get_or_alloc() is local to shadow.c livepatch: introduce shadow variable API commit 9682b3dea22190a6fd449d157e3175b0e748684d Merge: 20df157 1972d6c Author: Linus Torvalds Date: Wed Nov 15 10:14:11 2017 -0800 Merge branch 'for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina: "The usual rocket-science from trivial tree for 4.15" * 'for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: MAINTAINERS: relinquish kconfig MAINTAINERS: Update my email address treewide: Fix typos in Kconfig kfifo: Fix comments init/Kconfig: Fix module signing document location misc: ibmasm: Return error on error path HID: logitech-hidpp: fix mistake in printk, "feeback" -> "feedback" MAINTAINERS: Correct path to uDraw PS3 driver tracing: Fix doc mistakes in trace sample tracing: Kconfig text fixes for CONFIG_HWLAT_TRACER MIPS: Alchemy: Remove reverted CONFIG_NETLINK_MMAP from db1xxx_defconfig mm/huge_memory.c: fixup grammar in comment lib/xz: Add fall-through comments to a switch statement commit 24e7f84db0db6b6f14581707a45d06ec5d5b88f2 Author: Boris Ostrovsky Date: Wed Nov 15 11:24:02 2017 -0500 xen/pvcalls: Add MODULE_LICENSE() Since commit ba1029c9cbc5 ("modpost: detect modules without a MODULE_LICENSE") modules without said macro will generate WARNING: modpost: missing MODULE_LICENSE() in While at it, also add module description and attribution. Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross Acked-by: Stefano Stabellini drivers/xen/pvcalls-back.c | 4 ++++ drivers/xen/pvcalls-front.c | 4 ++++ 2 files changed, 8 insertions(+) commit 20df15783a44a289aaa8c8f83b3f715f9040c9c2 Merge: 37cb8e1 01125b2 Author: Linus Torvalds Date: Wed Nov 15 09:43:57 2017 -0800 Merge branch 'for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID updates from Jiri Kosina: - high resolution mode for Dell canvas support, from Benjamin Tissoires - pen handling fixes for the Wacom driver, from Jason Gerecke - i2c-hid: Apollo-Lake based laptops improvements, from Hans de Goede - Input/Core: eraser tool support, from Ping Cheng - new ALPS touchpad (T4, found currently on HP EliteBook 1000, Zbook Stduio and HP Elite book x360) supportm from Masaki Ota - other smaller assorted fixes * 'for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (33 commits) HID: cp2112: fix broken gpio_direction_input callback HID: cp2112: fix interface specification URL HID: Wacom: switch Dell canvas into highres mode HID: wacom: generic: Send BTN_STYLUS3 when both barrel switches are set HID: sony: Fix SHANWAN pad rumbling on USB HID: i2c-hid: Add no-irq-after-reset quirk for 0911:5288 device HID: add backlight level quirk for Asus ROG laptops HID: cp2112: add HIDRAW dependency HID: Add ID 044f:b605 ThrustMaster, Inc. force feedback Racing Wheel HID: hid-logitech: remove redundant assignment to pointer value HID: wacom: generic: Recognize WACOM_HID_WD_PEN as a type of pen collection HID: rmi: Check that a device is a RMI device before calling RMI functions HID: add multi-input quirk for GamepadBlock HID: alps: add new U1 device ID HID: alps: add support for Alps T4 Touchpad device HID: alps: remove variables local to u1_init() from the device struct HID: alps: properly handle max_fingers and minimum on X and Y axis HID: alps: Separate U1 device code HID: alps: delete unnecessary struct u1_dev devInfo HID: usbhid: Convert timers to use timer_setup() ... commit ff64d695f92123f7d341473921a46add51a44a87 Author: Eugeniy Paltsev Date: Tue Nov 14 17:32:13 2017 +0300 ARC: [plat-axs10x] DTS: Add reset controller node to manage ethernet reset DW ethernet controller on axs10x hangs sometimes after SW reset. Invoke the newly aded driver (reset-axs10x.c) by adding the DT bits. With this in place, we don't need the open-coded quirk in platform code, so get rid of it as well ! Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta arch/arc/boot/dts/axs10x_mb.dtsi | 8 ++++++++ arch/arc/plat-axs10x/axs10x.c | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) commit 3aabf94c2d95fe465d5fa8590113d1c1f7d8333d Author: Kailang Yang Date: Wed Nov 8 15:28:33 2017 +0800 ALSA: hda/realtek - Fix ALC275 no sound issue Sound works after a cold boot but not after a reboot from windows. This patch will solve this issue. This is relation with Class-D power control. [ The bug was reported in Bugzilla below for Sony VAIO SVS13A1C5E -- tiwai] Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197737 Cc: Signed-off-by: Kailang Yang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 3 +++ 1 file changed, 3 insertions(+) commit 1e684d3820d8f72d877c0adb521ae17c6fc9bc88 Author: David Howells Date: Wed Nov 15 16:38:45 2017 +0000 pkcs7: Set the module licence to prevent tainting Set the module licence to prevent the kernel from being tainted if loaded as a module. Reported-by: Randy Dunlap Signed-off-by: David Howells crypto/asymmetric_keys/pkcs7_key_type.c | 1 + crypto/asymmetric_keys/pkcs7_parser.c | 5 +++++ crypto/asymmetric_keys/public_key.c | 2 ++ crypto/asymmetric_keys/x509_public_key.c | 1 + 4 files changed, 9 insertions(+) commit 0a9dd0e0711e58aa8d19ae4446cb3fe2906a8514 Author: Baolin Wang Date: Wed Nov 15 16:38:45 2017 +0000 security: keys: Replace time_t with time64_t for struct key_preparsed_payload The 'struct key_preparsed_payload' will use 'time_t' which we will try to remove in the kernel, since 'time_t' is not year 2038 safe on 32bits systems. Thus this patch replaces 'time_t' with 'time64_t' which is year 2038 safe on 32 bits system for 'struct key_preparsed_payload', moreover we should use the 'TIME64_MAX' macro to initialize the 'time64_t' type variable. Signed-off-by: Baolin Wang Reviewed-by: Arnd Bergmann Signed-off-by: David Howells Reviewed-by: James Morris include/linux/key-type.h | 2 +- security/keys/key.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 074d58989569b39f04294c90ef36dd82b8c2cc1a Author: Baolin Wang Date: Wed Nov 15 16:38:45 2017 +0000 security: keys: Replace time_t/timespec with time64_t The 'struct key' will use 'time_t' which we try to remove in the kernel, since 'time_t' is not year 2038 safe on 32bit systems. Also the 'struct keyring_search_context' will use 'timespec' type to record current time, which is also not year 2038 safe on 32bit systems. Thus this patch replaces 'time_t' with 'time64_t' which is year 2038 safe for 'struct key', and replace 'timespec' with 'time64_t' for the 'struct keyring_search_context', since we only look at the the seconds part of 'timespec' variable. Moreover we also change the codes where using the 'time_t' and 'timespec', and we can get current time by ktime_get_real_seconds() instead of current_kernel_time(), and use 'TIME64_MAX' macro to initialize the 'time64_t' type variable. Especially in proc.c file, we have replaced 'unsigned long' and 'timespec' type with 'u64' and 'time64_t' type to save the timeout value, which means user will get one 'u64' type timeout value by issuing proc_keys_show() function. Signed-off-by: Baolin Wang Reviewed-by: Arnd Bergmann Signed-off-by: David Howells Reviewed-by: James Morris include/linux/key.h | 7 ++++--- security/keys/gc.c | 20 ++++++++++---------- security/keys/internal.h | 8 ++++---- security/keys/key.c | 19 ++++++------------- security/keys/keyring.c | 20 ++++++++++---------- security/keys/permission.c | 5 ++--- security/keys/proc.c | 21 ++++++++++----------- security/keys/process_keys.c | 2 +- 8 files changed, 47 insertions(+), 55 deletions(-) commit be543dd626c0a23829e9cc1a28e1e3af4cd9ced6 Author: Eric Biggers Date: Wed Nov 15 16:38:44 2017 +0000 KEYS: fix in-kernel documentation for keyctl_read() When keyctl_read() is passed a buffer that is too small, the behavior is inconsistent. Some key types will fill as much of the buffer as possible, while others won't copy anything. Moreover, the in-kernel documentation contradicted the man page on this point. Update the in-kernel documentation to say that this point is unspecified. Signed-off-by: Eric Biggers Signed-off-by: David Howells Documentation/security/keys/core.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit dac4df1c5f2c34903f61b1bc4fc722e31b4199e7 Author: Luca Coelho Date: Fri Nov 10 14:03:36 2017 +0200 iwlwifi: mvm: support version 7 of the SCAN_REQ_UMAC FW command Newer firmware versions (such as iwlwifi-8000C-34.ucode) have introduced an API change in the SCAN_REQ_UMAC command that is not backwards compatible. The driver needs to detect and use the new API format when the firmware reports it, otherwise the scan command will not work properly, causing a command timeout. Fix this by adding a TLV that tells the driver that the new API is in use and use the correct structures for it. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=197591 Fixes: d7a5b3e9e42e ("iwlwifi: mvm: bump API to 34 for 8000 and up") Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/api/scan.h | 59 ++++++++++++---- drivers/net/wireless/intel/iwlwifi/fw/file.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 6 ++ drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 86 ++++++++++++++++++------ 4 files changed, 118 insertions(+), 34 deletions(-) commit ead710b7d82dc9e8184e10871c155a3ed8b3f673 Author: Chao Yu Date: Tue Nov 14 19:28:42 2017 +0800 f2fs: deny accessing encryption policy if encryption is off This patch adds missing feature check in encryption ioctl interface. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 5 +++++ 1 file changed, 5 insertions(+) commit e3b8a4858566a6cc25422fbfdfdd760b13b79280 Author: Filipe Manana Date: Sat Nov 4 00:16:59 2017 +0000 Btrfs: fix reported number of inode blocks after buffered append writes The patch from commit a7e3b975a0f9 ("Btrfs: fix reported number of inode blocks") introduced a regression where if we do a buffered write starting at position equal to or greater than the file's size and then stat(2) the file before writeback is triggered, the number of used blocks does not change (unless there's a prealloc/unwritten extent). Example: $ xfs_io -f -c "pwrite -S 0xab 0 64K" foobar $ du -h foobar 0 foobar $ sync $ du -h foobar 64K foobar The first version of that patch didn't had this regression and the second version, which was the one committed, was made only to address some performance regression detected by the intel test robots using fs_mark. This fixes the regression by setting the new delaloc bit in the range, and doing it at btrfs_dirty_pages() while setting the regular dealloc bit as well, so that this way we set both bits at once avoiding navigation of the inode's io tree twice. Doing it at btrfs_dirty_pages() is also the most meaninful place, as we should set the new dellaloc bit when if we set the delalloc bit, which happens only if we copied bytes into the pages at __btrfs_buffered_write(). This was making some of LTP's du tests fail, which can be quickly run using a command line like the following: $ ./runltp -q -p -l /ltp.log -f commands -s du -d /mnt Fixes: a7e3b975a0f9 ("Btrfs: fix reported number of inode blocks") Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 + fs/btrfs/extent_io.h | 5 +++-- fs/btrfs/file.c | 43 ++++++++++++++++++++++++---------------- fs/btrfs/inode.c | 9 +++++---- fs/btrfs/relocation.c | 3 ++- fs/btrfs/tests/extent-io-tests.c | 6 +++--- fs/btrfs/tests/inode-tests.c | 12 +++++------ 7 files changed, 46 insertions(+), 33 deletions(-) commit f48bf66b662e7acd6a32dbc28c4fa38931f8f0a6 Author: Filipe Manana Date: Fri Nov 3 22:26:44 2017 +0000 Btrfs: move definition of the function btrfs_find_new_delalloc_bytes Move the definition of the function btrfs_find_new_delalloc_bytes() closer to the function btrfs_dirty_pages(), because in a future commit it will be used exclusively by btrfs_dirty_pages(). This just moves the function's definition, with no functional changes at all. Signed-off-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/file.c | 82 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) commit 36331641eb4296f0c62f4bf1e320d8c30bc6a863 Merge: c1ea839 98c58f7d Author: Stephen Boyd Date: Wed Nov 15 08:16:13 2017 -0800 Merge branch 'clk-cleanup' into clk-next * clk-cleanup: clk: kona-setup: Delete error messages for failed memory allocations ARC: clk: fix spelling mistake: "configurarion" -> "configuration" clk: cdce925: remove redundant check for non-null parent_name clk: versatile: Improve sizeof() usage clk: versatile: Delete error messages for failed memory allocations clk: ux500: Improve sizeof() usage clk: ux500: Delete error messages for failed memory allocations clk: spear: Delete error messages for failed memory allocations clk: ti: Delete error messages for failed memory allocations clk: mmp: Adjust checks for NULL pointers clk: mmp: Use common error handling code in mmp_clk_register_mix() clk: mmp: Delete error messages for failed memory allocations clk: clk-xgene: Adjust six checks for null pointers clk: clk-xgene: Delete error messages for failed memory allocations clk: clk-u300: Fix a typo in two comment lines clk: clk-u300: Add some spaces for better code readability clk: clk-u300: Improve sizeof() usage clk: clk-u300: Delete error messages for failed memory allocations clk: clk-mux: Improve a size determination in clk_hw_register_mux_table() clk: clk-mux: Delete an error message for a failed memory allocation commit f38736c3c681985d9eddf2d8d19148df089cbd8e Merge: 7087cb8 20a52c0 Author: Takashi Iwai Date: Wed Nov 15 17:11:16 2017 +0100 Merge tag 'asoc-fix-v4.14-intel-kconfig' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fix for Intel Kconfig Fix the Intel Kconfig issue reported by Linus. commit 8f6596f4c94a155b93a809989314e5e8c01d0618 Author: Baolin Wang Date: Thu Nov 9 11:34:16 2017 +0800 dt-bindings: rtc: Add Spreadtrum SC27xx RTC documentation This patch adds the binding documentation for Spreadtrum SC27xx series RTC device. Signed-off-by: Baolin Wang Acked-by: Rob Herring Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/sprd,sc27xx-rtc.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit dbdc468f35ee827cab2753caa1c660bdb832243a Author: Abhishek Goel Date: Wed Nov 15 14:10:02 2017 +0530 cpupower : Fix cpupower working when cpu0 is offline cpuidle_monitor used to assume that cpu0 is always online which is not a valid assumption on POWER machines. This patch fixes this by getting the cpu on which the current thread is running, instead of always using cpu0 for monitoring which may not be online. Signed-off-by: Abhishek Goel Signed-off-by: Shuah Khan tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 53d1cd6b125fb9d69303516a1179ebc3b72f797a Author: Abhishek Goel Date: Tue Nov 7 15:17:55 2017 +0530 cpupowerutils: bench - Fix cpu online check cpupower_is_cpu_online was incorrectly checking for 0. This patch fixes this by checking for 1 when the cpu is online. Signed-off-by: Abhishek Goel Signed-off-by: Shuah Khan tools/power/cpupower/bench/system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3e0d179bff503cd56758579a2c33216b40b9b7b Author: Amit Pundir Date: Thu Nov 9 01:10:35 2017 +0530 selftests: firmware: skip unsupported custom firmware fallback tests Ignore custom firmware loading and cancellation tests on older kernel releases, which do not support this feature. Fixes: 061132d2b9c9 ("test_firmware: add test custom fallback trigger") Reviewed-by: Sumit Semwal Acked-by: Luis R. Rodriguez Acked-by: Greg Kroah-Hartman Signed-off-by: Amit Pundir Signed-off-by: Shuah Khan tools/testing/selftests/firmware/fw_fallback.sh | 38 +++++++++++++++++-------- 1 file changed, 26 insertions(+), 12 deletions(-) commit 157339a14ac41c710333b2abc18f5a6f52204625 Author: Amit Pundir Date: Thu Nov 9 01:10:34 2017 +0530 selftests: firmware: skip unsupported async loading tests Ignore async firmware loading tests on older kernel releases, which do not support this feature. Fixes: 1b1fe542b6f0: ("selftests: firmware: add empty string and async tests") Reviewed-by: Sumit Semwal Acked-by: Luis R. Rodriguez Acked-by: Greg Kroah-Hartman Signed-off-by: Amit Pundir Signed-off-by: Shuah Khan tools/testing/selftests/firmware/fw_filesystem.sh | 34 ++++++++++++++--------- 1 file changed, 21 insertions(+), 13 deletions(-) commit 4358a844fc9f9db7e826b1dfd312af89f9e3c039 Merge: a33801e 8376d3c Author: Jens Axboe Date: Wed Nov 15 08:15:50 2017 -0700 Merge branch 'for-4.15/timer' into for-linus Post initial pull timer related changes for block drivers. Not merged with the first pull, since they were dependent on this commit in mainline: commit 686fef928bba6be13cabe639f154af7d72b63120 Author: Kees Cook Date: Thu Sep 28 06:38:17 2017 -0700 timer: Prepare to change timer callback argument type commit 7d33d2b5b8581ed9f7b2ad93156cde223df718dc Author: Lei Yang Date: Sun Nov 5 18:56:40 2017 +0800 selftests: memfd_test.c: fix compilation warning. Replace '%d' by '%zu' to fix the following compilation warning. memfd_test.c:517:3: warning: format ‘%d’ expects argument of type ‘int’,but argument 2 has type ‘size_t’ [-Wformat=] printf("malloc(%d) failed: %m\n", mfd_def_size * 8); ^ memfd_test.c: In function ‘mfd_fail_grow_write’: memfd_test.c:537:3: warning: format ‘%d’ expects argument of type ‘int’,but argument 2 has type ‘size_t’ [-Wformat=] printf("malloc(%d) failed: %m\n", mfd_def_size * 8); Signed-off-by: Lei Yang Signed-off-by: Shuah Khan tools/testing/selftests/memfd/memfd_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 42534b1f58e04a5a6d245d4a8d25f7eb5fd79c7a Author: Masami Hiramatsu Date: Sat Nov 4 04:38:41 2017 +0900 selftests/ftrace: Introduce exit_pass and exit_fail As same as other results, introduce exit_pass and exit_fail functions so that we can easily understand what will happen. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan tools/testing/selftests/ftrace/ftracetest | 7 +++++++ tools/testing/selftests/ftrace/test.d/00basic/basic4.tc | 2 +- tools/testing/selftests/ftrace/test.d/event/event-enable.tc | 2 +- tools/testing/selftests/ftrace/test.d/event/event-pid.tc | 2 +- tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc | 2 +- tools/testing/selftests/ftrace/test.d/event/toplevel-enable.tc | 2 +- .../testing/selftests/ftrace/test.d/ftrace/fgraph-filter-stack.tc | 2 +- tools/testing/selftests/ftrace/test.d/ftrace/fgraph-filter.tc | 2 +- tools/testing/selftests/ftrace/test.d/ftrace/func-filter-pid.tc | 2 +- .../testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc | 5 ++--- tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc | 2 +- .../testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc | 2 +- .../selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc | 2 +- tools/testing/selftests/ftrace/test.d/instances/instance-event.tc | 2 +- tools/testing/selftests/ftrace/test.d/instances/instance.tc | 2 +- tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc | 2 +- tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args.tc | 2 +- tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_type.tc | 2 +- tools/testing/selftests/ftrace/test.d/kprobe/kretprobe_args.tc | 2 +- tools/testing/selftests/ftrace/test.d/template | 1 + .../testing/selftests/ftrace/test.d/trigger/trigger-eventonoff.tc | 2 +- tools/testing/selftests/ftrace/test.d/trigger/trigger-filter.tc | 2 +- tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc | 2 +- tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc | 2 +- tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc | 2 +- tools/testing/selftests/ftrace/test.d/trigger/trigger-snapshot.tc | 2 +- .../testing/selftests/ftrace/test.d/trigger/trigger-stacktrace.tc | 2 +- .../testing/selftests/ftrace/test.d/trigger/trigger-traceonoff.tc | 2 +- 28 files changed, 35 insertions(+), 28 deletions(-) commit f737b8f4d3c4b0e088492ee8b5134f5fe9f43b87 Author: Lei Yang Date: Sat Oct 21 18:17:50 2017 +0800 selftests: ftrace: add more config fragments We need to enable more configs to make test more without this patch,we got lots of "UNSUPPORTED" before the patch: http://pastebin.ubuntu.com/25784377/ after the patch: http://pastebin.ubuntu.com/25784387/ Signed-off-by: Lei Yang Signed-off-by: Shuah Khan tools/testing/selftests/ftrace/config | 4 ++++ 1 file changed, 4 insertions(+) commit 47a18c42d99268a25689ecfac9e28c24af13d104 Author: Pintu Agarwal Date: Wed Nov 1 13:00:39 2017 -0400 android/ion: userspace test utility for ion buffer sharing This is a test utility to verify ION buffer sharing in user space between 2 independent processes. It uses unix domain socket (with SCM_RIGHTS) as IPC to transfer an FD to another process to share the same buffer. This utility demonstrates how ION buffer sharing can be implemented between two user space processes, using various heap types. This utility is made to be run as part of kselftest framework in kernel. The utility is verified on Ubuntu-32 bit system with Linux Kernel 4.14, using ION system heap. For more information about the utility please check the README file. Signed-off-by: Pintu Agarwal Signed-off-by: Shuah Khan tools/testing/selftests/Makefile | 3 +- tools/testing/selftests/android/Makefile | 46 ++++ tools/testing/selftests/android/ion/.gitignore | 2 + tools/testing/selftests/android/ion/Makefile | 16 ++ tools/testing/selftests/android/ion/README | 101 ++++++++ tools/testing/selftests/android/ion/config | 4 + tools/testing/selftests/android/ion/ion.h | 143 ++++++++++++ tools/testing/selftests/android/ion/ion_test.sh | 55 +++++ .../testing/selftests/android/ion/ionapp_export.c | 135 +++++++++++ .../testing/selftests/android/ion/ionapp_import.c | 88 +++++++ tools/testing/selftests/android/ion/ionutils.c | 259 +++++++++++++++++++++ tools/testing/selftests/android/ion/ionutils.h | 55 +++++ tools/testing/selftests/android/ion/ipcsocket.c | 227 ++++++++++++++++++ tools/testing/selftests/android/ion/ipcsocket.h | 35 +++ tools/testing/selftests/android/run.sh | 3 + 15 files changed, 1171 insertions(+), 1 deletion(-) commit 50656ac6acfbc42d30071983205e8f6b131429e5 Author: lei.yang@windriver.com Date: Wed Oct 18 10:10:23 2017 +0800 selftests: remove obsolete kconfig fragment for cpu-hotplug Kconfig CONFIG_CPU_NOTIFIER_ERROR_INJECT has been removed since kernel 4.10 check commit: commit 530e9b76ae8f863dfdef4a6ad0b38613d32e8c3f Author: Thomas Gleixner Date: Wed Dec 21 20:19:53 2016 +0100 cpu/hotplug: Remove obsolete cpu hotplug register/unregister functions hotcpu_notifier(), cpu_notifier(), __hotcpu_notifier(), __cpu_notifier(), register_hotcpu_notifier(), register_cpu_notifier(), __register_hotcpu_notifier(), __register_cpu_notifier(), unregister_hotcpu_notifier(), unregister_cpu_notifier(), __unregister_hotcpu_notifier(), __unregister_cpu_notifier() Signed-off-by: Lei Yang Signed-off-by: Shuah Khan tools/testing/selftests/cpu-hotplug/config | 1 - 1 file changed, 1 deletion(-) commit 2650554da3f895a7bc276127dac4ec43b7b860c0 Author: Greg Hackmann Date: Wed Nov 1 14:34:26 2017 -0700 selftests: vdso_test: support ARM64 targets ARM64's vDSO exports its gettimeofday() implementation with a different name (__kernel_gettimeofday) and version (LINUX_2.6.39) from other architectures. Add a corresponding special-case to vdso_test. Signed-off-by: Greg Hackmann Signed-off-by: Shuah Khan tools/testing/selftests/vDSO/vdso_test.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 8d17a6fe5d3cd635b48818b8da58a0e3ca4c2553 Author: Masami Hiramatsu Date: Fri Oct 27 15:10:30 2017 +0900 selftests/ftrace: Do not use arch dependent do_IRQ as a target function Instead using arch-dependent do_IRQ, use do_softirq as a target function. Applying do_IRQ to set_ftrace_filter always fail on arm/arm64 and any other architectures which don't define do_IRQ. So, instead of using that, use do_softirq which is defined in kernel/softirq.c. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan tools/testing/selftests/ftrace/test.d/ftrace/func_set_ftrace_file.tc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af7dc093467a917278ec3b61aea46377b4372d8c Author: Sumit Semwal Date: Mon Oct 23 13:12:22 2017 +0530 selftests: breakpoints: fix compile error on breakpoint_test_arm64 The current mainline breakpoints test for arm64 fails to compile with breakpoint_test_arm64.c: In function ‘set_watchpoint’: breakpoint_test_arm64.c:97:28: error: storage size of ‘dreg_state’ isn’t known struct user_hwdebug_state dreg_state; Adding a direct include for asm/ptrace.h helps it to build, and passes the test on mainline on hikey. Signed-off-by: Sumit Semwal Signed-off-by: Shuah Khan tools/testing/selftests/breakpoints/breakpoint_test_arm64.c | 1 + 1 file changed, 1 insertion(+) commit d3611d72070591b4255cdccf1bc0cc4f0e56b1a0 Author: lei.yang@windriver.com Date: Tue Oct 17 15:06:48 2017 +0800 selftests: add missing test result status in memory-hotplug test it only prints FAIL status when test fails, but doesn't print PASS status when test pass,this patch is to add PASS status in the test log. Signed-off-by: Lei Yang Signed-off-by: Shuah Khan tools/testing/selftests/memory-hotplug/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d80c92d6cae986e8f3f04e64dbea9883680ae1c Author: Steve Muckle Date: Thu Oct 12 21:44:57 2017 -0700 selftests/exec: include cwd in long path calculation When creating a pathname close to PATH_MAX to test execveat, factor in the current working directory path otherwise we end up with an absolute path that is longer than PATH_MAX. While execveat() may succeed, subsequent calls to the kernel from the runtime environment which are required to successfully execute the test binary/script may fail because of this. To keep the semantics of the test the same, rework the relative pathname part of the test to be relative to the root directory so it isn't decreased by the length of the current working directory path. Signed-off-by: Steve Muckle Signed-off-by: Shuah Khan tools/testing/selftests/exec/execveat.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit d54e9a8f4430d789a7b462b5318b1012d5643fd4 Author: Shuah Khan Date: Fri Oct 13 11:06:29 2017 -0600 selftests: seccomp: update .gitignore with newly added tests Update .gitignore with newly added tests. Signed-off-by: Shuah Khan Acked-by: Kees Cook Signed-off-by: Shuah Khan tools/testing/selftests/seccomp/.gitignore | 1 + 1 file changed, 1 insertion(+) commit b5b657acc4eefed47cd19ca2ff2ab73641fb6d14 Author: Shuah Khan Date: Fri Oct 13 11:28:40 2017 -0600 selftests: vm: Update .gitignore with newly added tests Update .gitignore with newly added tests. Signed-off-by: Shuah Khan tools/testing/selftests/vm/.gitignore | 2 ++ 1 file changed, 2 insertions(+) commit e7d65f9c8b88795c5fa897cf9e6d6d166d635724 Author: Shuah Khan Date: Fri Oct 13 11:27:10 2017 -0600 selftests: timers: Update .gitignore with newly added tests Update .gitignore with newly added tests. Signed-off-by: Shuah Khan tools/testing/selftests/timers/.gitignore | 2 ++ 1 file changed, 2 insertions(+) commit 9271c0ca573e02a360b636ecd8cb408852f4e9f6 Author: Ville Syrjälä Date: Wed Nov 8 17:25:04 2017 +0200 drm/edid: Don't send non-zero YQ in AVI infoframe for HDMI 1.x sinks Apparently some sinks look at the YQ bits even when receiving RGB, and they get somehow confused when they see a non-zero YQ value. So we can't just blindly follow CEA-861-F and set YQ to match the RGB range. Unfortunately there is no good way to tell whether the sink designer claims to have read CEA-861-F. The CEA extension block revision number has generally been stuck at 3 since forever, and even a very recently manufactured sink might be based on an old design so the manufacturing date doesn't seem like something we can use. In lieu of better information let's follow CEA-861-F only for HDMI 2.0 sinks, since HDMI 2.0 is based on CEA-861-F. For HDMI 1.x sinks we'll always set YQ=0. The alternative would of course be to always set YQ=0. And if we ever encounter a HDMI 2.0+ sink with this bug that's what we'll probably have to do. Cc: stable@vger.kernel.org Cc: Jani Nikula Cc: Eric Anholt Cc: Neil Kownacki Reported-by: Neil Kownacki Tested-by: Neil Kownacki Fixes: fcc8a22cc905 ("drm/edid: Set YQ bits in the AVI infoframe according to CEA-861-F") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101639 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171108152504.12596-1-ville.syrjala@linux.intel.com Acked-by: Eric Anholt drivers/gpu/drm/drm_edid.c | 12 ++++++++++-- drivers/gpu/drm/i915/intel_hdmi.c | 3 ++- drivers/gpu/drm/vc4/vc4_hdmi.c | 3 ++- include/drm/drm_edid.h | 3 ++- 4 files changed, 16 insertions(+), 5 deletions(-) commit 30b4e122d71cbec2944a5f8b558b88936ee42f10 Author: Sean Young Date: Wed Nov 8 16:19:45 2017 -0500 media: rc: sir_ir: detect presence of port Without this test, sir_ir clumsy claims resources for a device which does not exist. The 0-day kernel test robot reports the following errors (in a loop): sir_ir sir_ir.0: Trapped in interrupt genirq: Flags mismatch irq 4. 00000000 (ttyS0) vs. 00000000 (sir_ir) When sir_ir is loaded with the default io and irq, the following happens: - sir_ir claims irq 4 - user space opens /dev/ttyS0 - in serial8250_do_startup(), some setup is done for ttyS0, which causes irq 4 to fire (in THRE test) - sir_ir does not realise it was not for it, and spins until the "trapped in interrupt" - now serial driver calls setup_irq() and fails and we get the "Flags mismatch" error. There is no port present at 0x3e8 so simply check for the presence of a port, as suggested by Linus. Reported-by: kbuild test robot Tested-by: Fengguang Wu Signed-off-by: Sean Young Cc: # 4.12+ Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/sir_ir.c | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) commit 56a0e706fcf870270878d6d72b71092ae42d229c Author: Liu Bo Date: Mon Oct 30 11:14:38 2017 -0600 Btrfs: bail out gracefully rather than BUG_ON If a file's DIR_ITEM key is invalid (due to memory errors) and gets written to disk, a future lookup_path can end up with kernel panic due to BUG_ON(). This gets rid of the BUG_ON(), meanwhile output the corrupted key and return ENOENT if it's invalid. Signed-off-by: Liu Bo Reported-by: Guillaume Bouchard Signed-off-by: David Sterba fs/btrfs/inode.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 619c47f3d4cd7a60576fd15e133a2eee4fcc0c4e Author: David Sterba Date: Mon Jun 19 14:14:22 2017 +0200 btrfs: dev_alloc_list is not protected by RCU, use normal list_del The dev_alloc_list list could be protected by various mutexes, depending on the context. The list tracks devices that can take part of allocating new chunks, so the closest mutex is chunk_mutex. Adding a new device from inside the ADD_DEV ioctl will need device_list_mutex and registering a new device from the ioctl needs uuid_mutex. All mutexes naturally guarantee exclusivity against the same context. The device ownership can move between the contexts and the exclusivity is guaranteed by other means, eg. during the mount with the uuid_mutex. There's no RCU involved for dev_alloc_list. Signed-off-by: David Sterba fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3065ae5b85654e9141b134bc7b07eb0f2ca7cfcf Author: David Sterba Date: Mon Oct 30 18:36:08 2017 +0100 btrfs: add missing device::flush_bio puts This fixes potential bio leaks, in several error paths. Unfortunatelly the device structure freeing is opencoded in many places and I missed them when introducing the flush_bio. Most of the time, devices get freed through call_rcu(..., free_device), so it at least it's not that easy to hit the leak, but it's still possible through the path that frees stale devices. Fixes: e0ae99941423 ("btrfs: preallocate device flush bio") Reviewed-by: Nikolay Borisov Reviewed-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/volumes.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 5e9f2ad5b2904a7e81df6d9a3dbef29478952eac Author: Nikolay Borisov Date: Mon Oct 23 09:58:46 2017 +0300 btrfs: Fix transaction abort during failure in btrfs_rm_dev_item btrfs_rm_dev_item calls several function under an active transaction, however it fails to abort it if an error happens. Fix this by adding explicit btrfs_abort_transaction/btrfs_end_transaction calls. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit f82b735936ffd58b6711cf1f1054616517d8ffcd Author: Liu Bo Date: Mon Oct 23 23:18:16 2017 -0600 Btrfs: add write_flags for compression bio Compression code path has only flaged bios with REQ_OP_WRITE no matter where the bios come from, but it could be a sync write if fsync starts this writeback or a normal writeback write if wb kthread starts a periodic writeback. It breaks the rule that sync writes and writeback writes need to be differentiated from each other, because from the POV of block layer, all bios need to be recognized by these flags in order to do some management, e.g. throttlling. This passes writeback_control to compression write path so that it can send bios with proper flags to block layer. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/compression.c | 7 ++++--- fs/btrfs/compression.h | 3 ++- fs/btrfs/extent_io.c | 2 +- fs/btrfs/extent_io.h | 3 ++- fs/btrfs/inode.c | 15 +++++++++++---- 5 files changed, 20 insertions(+), 10 deletions(-) commit 4d2dc2cc766c3b51929658cacbc6e34fc8e242fb Author: Jeff Layton Date: Tue Nov 14 14:42:57 2017 -0500 fcntl: don't cap l_start and l_end values for F_GETLK64 in compat syscall Currently, we're capping the values too low in the F_GETLK64 case. The fields in that structure are 64-bit values, so we shouldn't need to do any sort of fixup there. Make sure we check that assumption at build time in the future however by ensuring that the sizes we're copying will fit. With this, we no longer need COMPAT_LOFF_T_MAX either, so remove it. Fixes: 94073ad77fff2 (fs/locks: don't mess with the address limit in compat_fcntl64) Reported-by: Vitaly Lipatov Signed-off-by: Jeff Layton Reviewed-by: David Howells arch/arm64/include/asm/compat.h | 1 - arch/mips/include/asm/compat.h | 1 - arch/parisc/include/asm/compat.h | 1 - arch/powerpc/include/asm/compat.h | 1 - arch/s390/include/asm/compat.h | 1 - arch/sparc/include/asm/compat.h | 1 - arch/tile/include/asm/compat.h | 1 - arch/x86/include/asm/compat.h | 1 - fs/fcntl.c | 11 +++++------ 9 files changed, 5 insertions(+), 14 deletions(-) commit 9280a601e6080c9ff658468c1c775ff6514099a6 Author: Jeff Layton Date: Tue Nov 14 14:43:56 2017 -0500 fcntl: don't leak fd reference when fixup_compat_flock fails Currently we just return err here, but we need to put the fd reference first. Fixes: 94073ad77fff (fs/locks: don't mess with the address limit in compat_fcntl64) Signed-off-by: Jeff Layton fs/fcntl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 20a52c059be2eb470db75076d55e1d932173fcc3 Author: Vinod Koul Date: Wed Nov 15 10:11:02 2017 +0530 ASoC: Intel: Add help text for SND_SOC_INTEL_SST_TOPLEVEL Symbol SND_SOC_INTEL_SST_TOPLEVEL is user selectable so add the help text for this symbol. Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) commit 50895b9de1d3e0258e015e8e55128d835d9a9f19 Author: Eric Dumazet Date: Tue Nov 14 21:02:19 2017 -0800 tcp: highest_sack fix syzbot easily found a regression added in our latest patches [1] No longer set tp->highest_sack to the head of the send queue since this is not logical and error prone. Only sack processing should maintain the pointer to an skb from rtx queue. We might in the future only remember the sequence instead of a pointer to skb, since rb-tree should allow a fast lookup. [1] BUG: KASAN: use-after-free in tcp_highest_sack_seq include/net/tcp.h:1706 [inline] BUG: KASAN: use-after-free in tcp_ack+0x42bb/0x4fd0 net/ipv4/tcp_input.c:3537 Read of size 4 at addr ffff8801c154faa8 by task syz-executor4/12860 CPU: 0 PID: 12860 Comm: syz-executor4 Not tainted 4.14.0-next-20171113+ #41 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:429 tcp_highest_sack_seq include/net/tcp.h:1706 [inline] tcp_ack+0x42bb/0x4fd0 net/ipv4/tcp_input.c:3537 tcp_rcv_established+0x672/0x18a0 net/ipv4/tcp_input.c:5439 tcp_v4_do_rcv+0x2ab/0x7d0 net/ipv4/tcp_ipv4.c:1468 sk_backlog_rcv include/net/sock.h:909 [inline] __release_sock+0x124/0x360 net/core/sock.c:2264 release_sock+0xa4/0x2a0 net/core/sock.c:2778 tcp_sendmsg+0x3a/0x50 net/ipv4/tcp.c:1462 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:763 sock_sendmsg_nosec net/socket.c:632 [inline] sock_sendmsg+0xca/0x110 net/socket.c:642 ___sys_sendmsg+0x75b/0x8a0 net/socket.c:2048 __sys_sendmsg+0xe5/0x210 net/socket.c:2082 SYSC_sendmsg net/socket.c:2093 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2089 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x452879 RSP: 002b:00007fc9761bfbe8 EFLAGS: 00000212 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 0000000000452879 RDX: 0000000000000000 RSI: 0000000020917fc8 RDI: 0000000000000015 RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006ee3a0 R13: 00000000ffffffff R14: 00007fc9761c06d4 R15: 0000000000000000 Allocated by task 12860: 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+0x144/0x760 mm/slab.c:3638 __alloc_skb+0xf1/0x780 net/core/skbuff.c:193 alloc_skb_fclone include/linux/skbuff.h:1023 [inline] sk_stream_alloc_skb+0x11d/0x900 net/ipv4/tcp.c:870 tcp_sendmsg_locked+0x1341/0x3b80 net/ipv4/tcp.c:1299 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1461 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:763 sock_sendmsg_nosec net/socket.c:632 [inline] sock_sendmsg+0xca/0x110 net/socket.c:642 SYSC_sendto+0x358/0x5a0 net/socket.c:1749 SyS_sendto+0x40/0x50 net/socket.c:1717 entry_SYSCALL_64_fastpath+0x1f/0x96 Freed by task 12860: 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:3492 [inline] kmem_cache_free+0x77/0x280 mm/slab.c:3750 kfree_skbmem+0xdd/0x1d0 net/core/skbuff.c:603 __kfree_skb+0x1d/0x20 net/core/skbuff.c:642 sk_wmem_free_skb include/net/sock.h:1419 [inline] tcp_rtx_queue_unlink_and_free include/net/tcp.h:1682 [inline] tcp_clean_rtx_queue net/ipv4/tcp_input.c:3111 [inline] tcp_ack+0x1b17/0x4fd0 net/ipv4/tcp_input.c:3593 tcp_rcv_established+0x672/0x18a0 net/ipv4/tcp_input.c:5439 tcp_v4_do_rcv+0x2ab/0x7d0 net/ipv4/tcp_ipv4.c:1468 sk_backlog_rcv include/net/sock.h:909 [inline] __release_sock+0x124/0x360 net/core/sock.c:2264 release_sock+0xa4/0x2a0 net/core/sock.c:2778 tcp_sendmsg+0x3a/0x50 net/ipv4/tcp.c:1462 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:763 sock_sendmsg_nosec net/socket.c:632 [inline] sock_sendmsg+0xca/0x110 net/socket.c:642 ___sys_sendmsg+0x75b/0x8a0 net/socket.c:2048 __sys_sendmsg+0xe5/0x210 net/socket.c:2082 SYSC_sendmsg net/socket.c:2093 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2089 entry_SYSCALL_64_fastpath+0x1f/0x96 The buggy address belongs to the object at ffff8801c154fa80 which belongs to the cache skbuff_fclone_cache of size 456 The buggy address is located 40 bytes inside of 456-byte region [ffff8801c154fa80, ffff8801c154fc48) The buggy address belongs to the page: page:ffffea00070553c0 count:1 mapcount:0 mapping:ffff8801c154f080 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801c154f080 0000000000000000 0000000100000006 raw: ffffea00070a5a20 ffffea0006a18360 ffff8801d9ca0500 0000000000000000 page dumped because: kasan: bad access detected Fixes: 737ff314563c ("tcp: use sequence distance to detect reordering") Signed-off-by: Eric Dumazet Cc: Yuchung Cheng Reported-by: syzbot Signed-off-by: David S. Miller include/net/tcp.h | 17 +++-------------- net/ipv4/tcp_input.c | 2 +- 2 files changed, 4 insertions(+), 15 deletions(-) commit fd7eafd02121d6ef501ef1a4a891e6061366c952 Author: Hangbin Liu Date: Wed Nov 15 09:43:09 2017 +0800 geneve: fix fill_info when link down geneve->sock4/6 were added with geneve_open and released with geneve_stop. So when geneve link down, we will not able to show remote address and checksum info after commit 11387fe4a98 ("geneve: fix fill_info when using collect_metadata"). Fix this by avoid passing *_REMOTE{,6} for COLLECT_METADATA since they are mutually exclusive, and always show UDP_ZERO_CSUM6_RX info. Fixes: 11387fe4a98 ("geneve: fix fill_info when using collect_metadata") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller drivers/net/geneve.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 89ad2fa3f043a1e8daae193bcb5fe34d5f8caf28 Author: Eric Dumazet Date: Tue Nov 14 17:15:50 2017 -0800 bpf: fix lockdep splat pcpu_freelist_pop() needs the same lockdep awareness than pcpu_freelist_populate() to avoid a false positive. [ INFO: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected ] switchto-defaul/12508 [HC0[0]:SC0[6]:HE0:SE0] is trying to acquire: (&htab->buckets[i].lock){......}, at: [] __htab_percpu_map_update_elem+0x1cb/0x300 and this task is already holding: (dev_queue->dev->qdisc_class ?: &qdisc_tx_lock#2){+.-...}, at: [] __dev_queue_xmit+0 x868/0x1240 which would create a new lock dependency: (dev_queue->dev->qdisc_class ?: &qdisc_tx_lock#2){+.-...} -> (&htab->buckets[i].lock){......} but this new dependency connects a SOFTIRQ-irq-safe lock: (dev_queue->dev->qdisc_class ?: &qdisc_tx_lock#2){+.-...} ... which became SOFTIRQ-irq-safe at: [] __lock_acquire+0x42b/0x1f10 [] lock_acquire+0xbc/0x1b0 [] _raw_spin_lock+0x38/0x50 [] __dev_queue_xmit+0x868/0x1240 [] dev_queue_xmit+0x10/0x20 [] ip_finish_output2+0x439/0x590 [] ip_finish_output+0x150/0x2f0 [] ip_output+0x7d/0x260 [] ip_local_out+0x5e/0xe0 [] ip_queue_xmit+0x205/0x620 [] tcp_transmit_skb+0x5a8/0xcb0 [] tcp_write_xmit+0x242/0x1070 [] __tcp_push_pending_frames+0x3c/0xf0 [] tcp_rcv_established+0x312/0x700 [] tcp_v4_do_rcv+0x11c/0x200 [] tcp_v4_rcv+0xaa2/0xc30 [] ip_local_deliver_finish+0xa7/0x240 [] ip_local_deliver+0x66/0x200 [] ip_rcv_finish+0xdd/0x560 [] ip_rcv+0x295/0x510 [] __netif_receive_skb_core+0x988/0x1020 [] __netif_receive_skb+0x21/0x70 [] process_backlog+0x6f/0x230 [] net_rx_action+0x229/0x420 [] __do_softirq+0xd8/0x43d [] do_softirq_own_stack+0x1c/0x30 [] do_softirq+0x55/0x60 [] __local_bh_enable_ip+0xa8/0xb0 [] cpu_startup_entry+0x1c7/0x500 [] start_secondary+0x113/0x140 to a SOFTIRQ-irq-unsafe lock: (&head->lock){+.+...} ... which became SOFTIRQ-irq-unsafe at: ... [] __lock_acquire+0x82f/0x1f10 [] lock_acquire+0xbc/0x1b0 [] _raw_spin_lock+0x38/0x50 [] pcpu_freelist_pop+0x7a/0xb0 [] htab_map_alloc+0x50c/0x5f0 [] SyS_bpf+0x265/0x1200 [] entry_SYSCALL_64_fastpath+0x12/0x17 other info that might help us debug this: Chain exists of: dev_queue->dev->qdisc_class ?: &qdisc_tx_lock#2 --> &htab->buckets[i].lock --> &head->lock Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&head->lock); local_irq_disable(); lock(dev_queue->dev->qdisc_class ?: &qdisc_tx_lock#2); lock(&htab->buckets[i].lock); lock(dev_queue->dev->qdisc_class ?: &qdisc_tx_lock#2); *** DEADLOCK *** Fixes: e19494edab82 ("bpf: introduce percpu_freelist") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller kernel/bpf/percpu_freelist.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 6314dab4b8fb8493d810e175cb340376052c69b6 Author: Bjørn Mork Date: Wed Nov 15 09:35:02 2017 +0100 net: cdc_ncm: GetNtbFormat endian fix The GetNtbFormat and SetNtbFormat requests operate on 16 bit little endian values. We get away with ignoring this most of the time, because we only care about USB_CDC_NCM_NTB16_FORMAT which is 0x0000. This fails for USB_CDC_NCM_NTB32_FORMAT. Fix comparison between LE value from device and constant by converting the constant to LE. Reported-by: Ben Hutchings Fixes: 2b02c20ce0c2 ("cdc_ncm: Set NTB format again after altsetting switch for Huawei devices") Cc: Enrico Mioso Cc: Christian Panton Signed-off-by: Bjørn Mork Acked-By: Enrico Mioso Signed-off-by: David S. Miller drivers/net/usb/cdc_ncm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 01125b2d1fe9d691333cc90b17a4e2fd5bb908a2 Merge: 4b54530 5b01b3b Author: Jiri Kosina Date: Wed Nov 15 11:14:23 2017 +0100 Merge branch 'for-4.15/wacom' into for-linus - High resolution mode for DEll canvas support, from Benjamin Tissoires - A lot of improvements to pen handling in the Wacom driver, from Jason Gerecke Signed-off-by: Jiri Kosina commit 4b545304947147bd4b9890160d328780c97bac33 Merge: 6ed7a70 0ee3277 Author: Jiri Kosina Date: Wed Nov 15 11:13:23 2017 +0100 Merge branch 'for-4.15/use-timer-setup' into for-linus - usbhid: conversion to timer_setup() and from_timer() from Kees Cook Signed-off-by: Jiri Kosina commit 6ed7a70be54ef6148cbfce0d59d12d2aa41bbb23 Merge: b50b9d3 7da85fb Author: Jiri Kosina Date: Wed Nov 15 11:10:38 2017 +0100 Merge branch 'for-4.15/upstream' into for-linus - cp2112: GPIO error handling and Kconfig fixes from Sébastien Szymanski - i2c-hid: fixup / quirk for Apollo-Lake based laptops, from Hans de Goede - Input/Core: add eraser tool support, from Ping Cheng - small assorted code fixes Signed-off-by: Jiri Kosina commit b50b9d3d21e0af1b8bda94d43c569593d45587af Merge: ea3bbd0 492ca83 Author: Jiri Kosina Date: Wed Nov 15 11:09:44 2017 +0100 Merge branch 'for-4.15/sony' into for-linus - SHANWAN PS3 rumble fix from Bastien Nocera Signed-off-by: Jiri Kosina commit ea3bbd0a2117d7291ae705caffbb99089315ec7b Merge: 6101cb7 29cc309 Author: Jiri Kosina Date: Wed Nov 15 11:08:49 2017 +0100 Merge branch 'for-4.15/multitouch' into for-linus - make sure that we forward MSC_TIMESTAMP in accordance to the specification, from Nicolas Boichat Signed-off-by: Jiri Kosina commit 6101cb7ea26efd4b6b4f15b4db707bb097cf97eb Merge: e1548dc 6cb6d98 Author: Jiri Kosina Date: Wed Nov 15 11:08:23 2017 +0100 Merge branch 'for-4.15/logitech' into for-linus - small code fixes for Logitech driver from Colin Ian King commit e1548dcd21ffe4121648ca2287e2a65e40110cfc Merge: 47dd6b0 af42377 Author: Jiri Kosina Date: Wed Nov 15 11:07:46 2017 +0100 Merge branch 'for-4.15/hyperv' into for-linus - trivial printk() line termination fix for HyperV commit 47dd6b019edd9fc17ddc5b8c16690c80266cdbde Merge: 5cc619d 339ee3f Author: Jiri Kosina Date: Wed Nov 15 11:06:22 2017 +0100 Merge branch 'for-4.15/asus' into for-linus - Asus laptop fixes (fn keys, backlight), from Mustafa Kuscu and Maxime Bellengé commit 5cc619db5c34146ee821acd08382b9d78579b52e Merge: 83fd5dd 287b8e1 Author: Jiri Kosina Date: Wed Nov 15 11:04:13 2017 +0100 Merge branch 'for-4.15/alps' into for-linus - New ALPS touchpad (T4, found currently on HP EliteBook 1000, Zbook Stduio and HP Elite book x360) support from Masaki Ota commit 83fd5ddc19931d5a5b884c43ee3c9d69c673bc96 Merge: a0933a4 1477edb Author: Jiri Kosina Date: Wed Nov 15 11:02:25 2017 +0100 Merge branch 'for-4.14/upstream-fixes' into for-linus - Wacom: recognize PEN application collection properly, from Jason Gerecke - RMI: avoid cofusion caused by RMI functions being by mistake called on non-RMI devices, from Andrew Duggan - small device-ID-specific quirks/fixes Signed-off-by: Jiri Kosina commit f83e2ae2606b3754a5b9dfe9dd792c453698df6c Author: Axel Lin Date: Tue Nov 7 11:30:41 2017 +0800 pwm: stm32-lp: Remove pwm_is_enabled() check before calling pwm_disable() The same checking is done by the implementation of pwm_disable(). Signed-off-by: Axel Lin Acked-by: Fabrice Gasnier Signed-off-by: Thierry Reding drivers/pwm/pwm-stm32-lp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 424268c7494c2ae24c95565b9047bbf30309e88a Author: Zhi Mao Date: Wed Oct 25 18:11:01 2017 +0800 pwm: mediatek: Add MT2712/MT7622 support Add support for MT2712 and MT7622. Due to register offset address of pwm7 for MT2712 is not fixed 0x40, add mtk_pwm_reg_offset array for PWM register offset. Reviewed-by: Claudiu Beznea Reviewed-by: Matthias Brugger Signed-off-by: Zhi Mao Signed-off-by: Thierry Reding drivers/pwm/pwm-mediatek.c | 53 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 9 deletions(-) commit df4f6e8c9f089d8c8406f87df819b4d91277979c Author: Corentin Labbe Date: Sat Oct 21 19:38:12 2017 +0200 pwm: sunxi: Use of_device_get_match_data() The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() returns NULL. Signed-off-by: Corentin Labbe Signed-off-by: Thierry Reding drivers/pwm/pwm-sun4i.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fc41efc1843009ebcdb4850b21f1c371ad203f4e Merge: cb65dc7 89a9a1c Author: Jiri Kosina Date: Wed Nov 15 10:53:24 2017 +0100 Merge branch 'for-4.15/callbacks' into for-linus This pulls in an infrastructure/API that allows livepatch writers to register pre-patch and post-patch callbacks that allow for running a glue code necessary for finalizing the patching if necessary. Conflicts: kernel/livepatch/core.c - trivial conflict by adding a callback call into module going notifier vs. moving that code block to klp_cleanup_module_patches_limited() Signed-off-by: Jiri Kosina commit 1b3d9a93ed8313e42f108f871133346694de5ac3 Author: Romain Izard Date: Thu Oct 19 18:44:10 2017 +0200 pwm: atmel-tcb: Support backup mode Save and restore registers for the PWM on suspend and resume, which makes hibernation and backup modes possible. Signed-off-by: Romain Izard Acked-by: Nicolas Ferre Signed-off-by: Thierry Reding drivers/pwm/pwm-atmel-tcb.c | 63 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) commit ccb4e74aebb6fbd56fc6783f4d5c6ded48bc2f5d Author: Yoshihiro Shimoda Date: Wed Oct 4 19:10:38 2017 +0900 dt-bindings: pwm: Add R-Car D3 device tree bindings Add device tree bindings for the PWM controller found on R-Car D3 SoCs. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Thierry Reding Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.txt | 1 + 1 file changed, 1 insertion(+) commit cb65dc7b89043a66d4459a6a811645d43185b5f0 Merge: ef8daf8 19205da Author: Jiri Kosina Date: Wed Nov 15 10:49:14 2017 +0100 Merge branch 'for-4.15/shadow-variables' into for-linus Shadow variables allow callers to associate new shadow fields to existing data structures. This is intended to be used by livepatch modules seeking to emulate additions to data structure definitions. commit e690ae526216b913c61977193eb7e4b803511e75 Author: Ed Blake Date: Mon Oct 2 10:51:48 2017 +0100 pwm: img: Add runtime PM Add runtime PM to disable the clocks when the h/w is not in use. Signed-off-by: Ed Blake Signed-off-by: Thierry Reding drivers/pwm/pwm-img.c | 132 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 95 insertions(+), 37 deletions(-) commit a18afce522e8c469132e740f840f2b95b2008987 Author: Ed Blake Date: Mon Oct 2 10:51:47 2017 +0100 pwm: img: Add suspend / resume handling The power may be disabled during suspend, so implement suspend and resume callbacks to save and restore register state. Signed-off-by: Ed Blake [thierry.reding@gmail.com: guard using PM_SLEEP instead of PM] Signed-off-by: Thierry Reding drivers/pwm/pwm-img.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) commit 4a31b424ac0656d1bb17520ee861144fe7a19664 Author: Vasily Averin Date: Wed Nov 15 08:47:02 2017 +0300 perf/core: Fix memory leak triggered by perf --namespace perf with --namespace key leaks various memory objects including namespaces 4.14.0+ pid_namespace 1 12 2568 12 8 user_namespace 1 39 824 39 8 net_namespace 1 5 6272 5 8 This happen because perf_fill_ns_link_info() struct patch ns_path: during initialization ns_path incremented counters on related mnt and dentry, but without lost path_put nobody decremented them back. Leaked dentry is name of related namespace, and its leak does not allow to free unused namespace. Signed-off-by: Vasily Averin Acked-by: Peter Zijlstra Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Hari Bathini Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Thomas Gleixner Fixes: commit e422267322cd ("perf: Add PERF_RECORD_NAMESPACES to include namespaces related info") Link: http://lkml.kernel.org/r/c510711b-3904-e5e1-d296-61273d21118d@virtuozzo.com Signed-off-by: Ingo Molnar kernel/events/core.c | 1 + 1 file changed, 1 insertion(+) commit 0e18dd12064e07519f7cbff4149ca7fff620cbed Author: Vasily Averin Date: Wed Nov 15 08:47:02 2017 +0300 perf/core: Fix memory leak triggered by perf --namespace perf with --namespace key leaks various memory objects including namespaces 4.14.0+ pid_namespace 1 12 2568 12 8 user_namespace 1 39 824 39 8 net_namespace 1 5 6272 5 8 This happen because perf_fill_ns_link_info() struct patch ns_path: during initialization ns_path incremented counters on related mnt and dentry, but without lost path_put nobody decremented them back. Leaked dentry is name of related namespace, and its leak does not allow to free unused namespace. Signed-off-by: Vasily Averin Acked-by: Peter Zijlstra Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Hari Bathini Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Cc: Thomas Gleixner Fixes: commit e422267322cd ("perf: Add PERF_RECORD_NAMESPACES to include namespaces related info") Link: http://lkml.kernel.org/r/c510711b-3904-e5e1-d296-61273d21118d@virtuozzo.com Signed-off-by: Ingo Molnar kernel/events/core.c | 1 + 1 file changed, 1 insertion(+) commit 9f586fff6574f6ecbf323f92d44ffaf0d96225fe Author: Mikulas Patocka Date: Tue Nov 14 09:59:54 2017 -0500 dax: fix general protection fault in dax_alloc_inode Don't crash in case of allocation failure in dax_alloc_inode. syzkaller hit the following crash on e4880bc5dfb1 kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access [..] RIP: 0010:dax_alloc_inode+0x3b/0x70 drivers/dax/super.c:348 Call Trace: alloc_inode+0x65/0x180 fs/inode.c:208 new_inode_pseudo+0x69/0x190 fs/inode.c:890 new_inode+0x1c/0x40 fs/inode.c:919 mount_pseudo_xattr+0x288/0x560 fs/libfs.c:261 mount_pseudo include/linux/fs.h:2137 [inline] dax_mount+0x2e/0x40 drivers/dax/super.c:388 mount_fs+0x66/0x2d0 fs/super.c:1223 Cc: Fixes: 7b6be8444e0f ("dax: refactor dax-fs into a generic provider...") Reported-by: syzbot Signed-off-by: Mikulas Patocka Signed-off-by: Dan Williams drivers/dax/super.c | 3 +++ 1 file changed, 3 insertions(+) commit 1a5d5c592e902191bfa091ec9169aa43299a7d0f Author: Christophe JAILLET Date: Wed Nov 15 07:58:35 2017 +0100 remoteproc: qcom: Fix error handling paths in order to avoid memory leaks In case of error returned by 'q6v5_xfer_mem_ownership', we must free some resources before returning. In 'q6v5_mpss_init_image()', add a new label to undo a previous 'dma_alloc_attrs()'. In 'q6v5_mpss_load()', re-use the already existing error handling code to undo a previous 'request_firmware()', as already done in the other error handling paths of the function. Signed-off-by: Christophe JAILLET Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_q6v5_pil.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1e0d5615bbc37deb7732491798abccf8d3c3d244 Author: Bjorn Andersson Date: Tue Nov 14 21:45:34 2017 -0800 rpmsg: glink: Add missing MODULE_LICENSE The qcom_glink_native driver is missing a MODULE_LICENSE(), correct this. Fixes: 835764ddd9af ("rpmsg: glink: Move the common glink protocol implementation to glink_native.c") Cc: stable@vger.kernel.org Reported-by: Randy Dunlap Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 3 +++ 1 file changed, 3 insertions(+) commit 94802151894d482e82c324edf2c658f8e6b96508 Author: Steffen Klassert Date: Wed Nov 15 06:40:57 2017 +0100 Revert "xfrm: Fix stack-out-of-bounds read in xfrm_state_find." This reverts commit c9f3f813d462c72dbe412cee6a5cbacf13c4ad5e. This commit breaks transport mode when the policy template has widlcard addresses configured, so revert it. Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit 70f3c8b7c2e7ebcdde8354da004872e7c9184e97 Author: Nitin Gupta Date: Fri Nov 3 12:26:06 2017 -0700 sparc64: Fix page table walk for PUD hugepages For a PUD hugepage entry, we need to propagate bits [32:22] from virtual address to resolve at 4M granularity. However, the current code was incorrectly propagating bits [29:19]. This bug can cause incorrect data to be returned for pages backed with 16G hugepages. Signed-off-by: Nitin Gupta Reported-by: Al Viro Cc: Al Viro Signed-off-by: David S. Miller arch/sparc/include/asm/tsb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff0296877a8d04db27997ec216376d7bbdf75a0b Author: Allen Pais Date: Tue Oct 24 15:08:13 2017 +0530 sparc64: Convert timers to user timer_setup() Switch to using the new timer_setup() and from_timer() in LDOM Virtual I/O handshake. Cc: Kees Cook Signed-off-by: Allen Pais Signed-off-by: David S. Miller arch/sparc/kernel/viohs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cdf5976fcb7328875a0216a94ae7dafd4ee3abfb Author: Elena Reshetova Date: Fri Oct 20 10:57:57 2017 +0300 sparc64: convert mdesc_handle.refcnt from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable mdesc_handle.refcnt is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Acked-by: Shannon Nelson Signed-off-by: David S. Miller arch/sparc/kernel/mdesc.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 68fa10dce0bfe263000ea3fd147ed74f5a4342c2 Author: Kees Cook Date: Tue Oct 10 15:07:27 2017 -0700 sparc/led: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Adds a static variable to hold timeout value. Cc: "David S. Miller" Cc: Geliang Tang Cc: Ingo Molnar Cc: sparclinux@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller arch/sparc/kernel/led.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit a16036e9b2fbdadf44f9fbbdf95d173d3f78170b Merge: 9a08862 46ad8d2 Author: David S. Miller Date: Wed Nov 15 14:26:46 2017 +0900 Merge branch 'sparc64-optimized-fls' Vijay Kumar says: ==================== sparc64: Optimize fls and __fls SPARC provides lzcnt instruction (with VIS3) which can be used to optimize fls, __fls and fls64 functions. For the systems that supports lzcnt instruction, we now do boot time patching to use sparc optimized fls, __fls and fls64 functions. v3->v4: - Fixed a typo. v2->v3: - Using ENTRY(), ENDPROC() for assembler functions. - Removed BITS_PER_LONG from __fls. - Using generic fls64(). - Replaced lzcnt instruction with .word directive. v1->v2: - Fixed delay slot issue. ==================== Signed-off-by: David S. Miller commit 46ad8d2d22c17e2b577adec55ae87161666a3267 Author: Vijay Kumar Date: Wed Oct 11 12:50:06 2017 -0600 sparc64: Use sparc optimized fls and __fls for T4 and above For T4 and above, patch fls and __fls functions at the boot time to use lzcnt instruction. Signed-off-by: Vijay Kumar Signed-off-by: David S. Miller arch/sparc/kernel/head_64.S | 2 ++ arch/sparc/lib/NG4patch.S | 9 +++++++++ 2 files changed, 11 insertions(+) commit 2b41ce5df20b698436526fcd8478094140b91706 Author: Vijay Kumar Date: Wed Oct 11 12:50:05 2017 -0600 sparc64: SPARC optimized __fls function Defined SPARC optimized __fls using lzcnt opcode. Signed-off-by: Vijay Kumar Signed-off-by: David S. Miller arch/sparc/lib/NG4fls.S | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 70cbec0c53739e170ea9c418e740f007ab5bca52 Author: Vijay Kumar Date: Wed Oct 11 12:50:04 2017 -0600 sparc64: SPARC optimized fls function Defined SPARC optimized fls using lzcnt opcode. Signed-off-by: Vijay Kumar Signed-off-by: David S. Miller arch/sparc/lib/Makefile | 1 + arch/sparc/lib/NG4fls.S | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) commit be52bbe3ea1ae2619ca64d67d56e84a9c7e358f9 Author: Vijay Kumar Date: Wed Oct 11 12:50:03 2017 -0600 sparc64: Define SPARC default __fls function __fls will now require a boot time patching on T4 and above. Redefining it under arch/sparc/lib. Signed-off-by: Vijay Kumar Signed-off-by: David S. Miller arch/sparc/include/asm/bitops_64.h | 2 +- arch/sparc/lib/Makefile | 1 + arch/sparc/lib/fls64.S | 61 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) commit 41413a60352cf8a7f0dd4a869d6e5c3e25aa89b2 Author: Vijay Kumar Date: Wed Oct 11 12:50:02 2017 -0600 sparc64: Define SPARC default fls function fls will now require a boot time patching on T4 and above. Redefining it under arch/sparc/lib. Signed-off-by: Vijay Kumar Signed-off-by: David S. Miller arch/sparc/include/asm/bitops_64.h | 3 +- arch/sparc/lib/Makefile | 1 + arch/sparc/lib/fls.S | 67 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 1 deletion(-) commit 9a08862a5d2e266ecea1865547463da2745fc687 Author: Nagarathnam Muthusamy Date: Thu Sep 21 11:05:31 2017 -0400 vDSO for sparc Following patch is based on work done by Nick Alcock on 64-bit vDSO for sparc in Oracle linux. I have extended it to include support for 32-bit vDSO for sparc on 64-bit kernel. vDSO for sparc is based on the X86 implementation. This patch provides vDSO support for both 64-bit and 32-bit programs on 64-bit kernel. vDSO will be disabled on 32-bit linux kernel on sparc. *) vclock_gettime.c contains all the vdso functions. Since data page is mapped before the vdso code page, the pointer to data page is got by subracting offset from an address in the vdso code page. The return address stored in %i7 is used for this purpose. *) During compilation, both 32-bit and 64-bit vdso images are compiled and are converted into raw bytes by vdso2c program to be ready for mapping into the process. 32-bit images are compiled only if CONFIG_COMPAT is enabled. vdso2c generates two files vdso-image-64.c and vdso-image-32.c which contains the respective vDSO image in C structure. *) During vdso initialization, required number of vdso pages are allocated and raw bytes are copied into the pages. *) During every exec, these pages are mapped into the process through arch_setup_additional_pages and the location of mapping is passed on to the process through aux vector AT_SYSINFO_EHDR which is used by glibc. *) A new update_vsyscall routine for sparc is added to keep the data page in vdso updated. *) As vDSO cannot contain dynamically relocatable references, a new version of cpu_relax is added for the use of vDSO. This change also requires a putback to glibc to use vDSO. For testing, programs planning to try vDSO can be compiled against the generated vdso(64/32).so in the source. Testing: ======== [root@localhost ~]# cat vdso_test.c int main() { struct timespec tv_start, tv_end; struct timeval tv_tmp; int i; int count = 1 * 1000 * 10000; long long diff; clock_gettime(0, &tv_start); for (i = 0; i < count; i++) gettimeofday(&tv_tmp, NULL); clock_gettime(0, &tv_end); diff = (long long)(tv_end.tv_sec - tv_start.tv_sec)*(1*1000*1000*1000); diff += (tv_end.tv_nsec - tv_start.tv_nsec); printf("Start sec: %d\n", tv_start.tv_sec); printf("End sec : %d\n", tv_end.tv_sec); printf("%d cycles in %lld ns = %f ns/cycle\n", count, diff, (double)diff / (double)count); return 0; } [root@localhost ~]# cc vdso_test.c -o t32_without_fix -m32 -lrt [root@localhost ~]# ./t32_without_fix Start sec: 1502396130 End sec : 1502396140 10000000 cycles in 9565148528 ns = 956.514853 ns/cycle [root@localhost ~]# cc vdso_test.c -o t32_with_fix -m32 ./vdso32.so.dbg [root@localhost ~]# ./t32_with_fix Start sec: 1502396168 End sec : 1502396169 10000000 cycles in 798141262 ns = 79.814126 ns/cycle [root@localhost ~]# cc vdso_test.c -o t64_without_fix -m64 -lrt [root@localhost ~]# ./t64_without_fix Start sec: 1502396208 End sec : 1502396218 10000000 cycles in 9846091800 ns = 984.609180 ns/cycle [root@localhost ~]# cc vdso_test.c -o t64_with_fix -m64 ./vdso64.so.dbg [root@localhost ~]# ./t64_with_fix Start sec: 1502396257 End sec : 1502396257 10000000 cycles in 380984048 ns = 38.098405 ns/cycle V1 to V2 Changes: ================= Added hot patching code to switch the read stick instruction to read tick instruction based on the hardware. V2 to V3 Changes: ================= Merged latest changes from sparc-next and moved the initialization of clocksource_tick.archdata.vclock_mode to time_init_early. Disabled queued spinlock and rwlock configuration when simulating 32-bit config to compile 32-bit VDSO. V3 to V4 Changes: ================= Hardcoded the page size as 8192 in linker script for both 64-bit and 32-bit binaries. Removed unused variables in vdso2c.h. Added -mv8plus flag to Makefile to prevent the generation of relocation entries for __lshrdi3 in 32-bit vdso binary. Signed-off-by: Nick Alcock Signed-off-by: Nagarathnam Muthusamy Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller arch/sparc/Kbuild | 1 + arch/sparc/Kconfig | 2 + arch/sparc/Makefile | 4 + arch/sparc/include/asm/clocksource.h | 17 ++ arch/sparc/include/asm/elf_64.h | 14 ++ arch/sparc/include/asm/mmu_64.h | 1 + arch/sparc/include/asm/processor_64.h | 8 + arch/sparc/include/asm/vdso.h | 24 +++ arch/sparc/include/asm/vvar.h | 74 +++++++++ arch/sparc/include/uapi/asm/auxvec.h | 4 + arch/sparc/kernel/Makefile | 1 + arch/sparc/kernel/time_64.c | 11 +- arch/sparc/kernel/vdso.c | 70 +++++++++ arch/sparc/vdso/.gitignore | 3 + arch/sparc/vdso/Makefile | 149 ++++++++++++++++++ arch/sparc/vdso/vclock_gettime.c | 264 +++++++++++++++++++++++++++++++ arch/sparc/vdso/vdso-layout.lds.S | 104 +++++++++++++ arch/sparc/vdso/vdso-note.S | 12 ++ arch/sparc/vdso/vdso.lds.S | 25 +++ arch/sparc/vdso/vdso2c.c | 234 ++++++++++++++++++++++++++++ arch/sparc/vdso/vdso2c.h | 143 +++++++++++++++++ arch/sparc/vdso/vdso32/.gitignore | 1 + arch/sparc/vdso/vdso32/vclock_gettime.c | 26 ++++ arch/sparc/vdso/vdso32/vdso-note.S | 12 ++ arch/sparc/vdso/vdso32/vdso32.lds.S | 24 +++ arch/sparc/vdso/vma.c | 268 ++++++++++++++++++++++++++++++++ 26 files changed, 1494 insertions(+), 2 deletions(-) commit b74912a2fdae9aadd20da502644aa8848c861954 Author: Gustavo A. R. Silva Date: Tue Nov 14 14:26:16 2017 -0600 openvswitch: meter: fix NULL pointer dereference in ovs_meter_cmd_reply_start It seems that the intention of the code is to null check the value returned by function genlmsg_put. But the current code is null checking the address of the pointer that holds the value returned by genlmsg_put. Fix this by properly null checking the value returned by function genlmsg_put in order to avoid a pontential null pointer dereference. Addresses-Coverity-ID: 1461561 ("Dereference before null check") Addresses-Coverity-ID: 1461562 ("Dereference null return value") Fixes: 96fbc13d7e77 ("openvswitch: Add meter infrastructure") Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/openvswitch/meter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69d481791f38f692707254406945d35591d12f40 Merge: 6670e15 9b0ed89 Author: David S. Miller Date: Wed Nov 15 14:14:17 2017 +0900 Merge branch 'netem-fix-compilation-on-32-bit' Stephen Hemminger says: ==================== netem: fix compilation on 32 bit A couple of places where 64 bit CPU was being assumed incorrectly. ==================== Signed-off-by: David S. Miller commit 9b0ed89172efec1d9f214d173ad6046f10f6b742 Author: Stephen Hemminger Date: Tue Nov 14 11:27:02 2017 -0800 netem: remove unnecessary 64 bit modulus Fix compilation on 32 bit platforms (where doing modulus operation with 64 bit requires extra glibc functions) by truncation. The jitter for table distribution is limited to a 32 bit value because random numbers are scaled as 32 bit value. Also fix some whitespace. Fixes: 99803171ef04 ("netem: add uapi to express delay and jitter in nanoseconds") Reported-by: Randy Dunlap Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/sched/sch_netem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bce552fd6f6e37f9567c85c4f0d6d1987eef379f Author: Stephen Hemminger Date: Tue Nov 14 11:27:01 2017 -0800 netem: use 64 bit divide by rate Since times are now expressed in nanosecond, need to now do true 64 bit divide. Old code would truncate rate at 32 bits. Rename function to better express current usage. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller net/sched/sch_netem.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 6670e152447732ba90626f36dfc015a13fbf150e Author: Stephen Hemminger Date: Tue Nov 14 08:25:49 2017 -0800 tcp: Namespace-ify sysctl_tcp_default_congestion_control Make default TCP default congestion control to a per namespace value. This changes default congestion control to a pointer to congestion ops (rather than implicit as first element of available lsit). The congestion control setting of new namespaces is inherited from the current setting of the root namespace. Signed-off-by: Stephen Hemminger Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 6 ++-- net/ipv4/fib_semantics.c | 4 +-- net/ipv4/sysctl_net_ipv4.c | 19 +++++++----- net/ipv4/tcp_cong.c | 76 ++++++++++++++++++++++------------------------ net/ipv4/tcp_ipv4.c | 9 ++++++ net/ipv6/route.c | 3 +- 7 files changed, 64 insertions(+), 54 deletions(-) commit 11bf284f81b46f59d5f4a4522c13aa7852cfd560 Author: Kirill Tkhai Date: Tue Nov 14 16:51:56 2017 +0300 net: Protect iterations over net::fib_notifier_ops in fib_seq_sum() There is at least unlocked deletion of net->ipv4.fib_notifier_ops from net::fib_notifier_ops: ip_fib_net_exit() rtnl_unlock() fib4_notifier_exit() fib_notifier_ops_unregister(net->ipv4.notifier_ops) list_del_rcu(&ops->list) So fib_seq_sum() can't use rtnl_lock() only for protection. The possible solution could be to use rtnl_lock() in fib_notifier_ops_unregister(), but this adds a possible delay during net namespace creation, so we better use rcu_read_lock() till someone really needs the mutex (if that happens). Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller net/core/fib_notifier.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 094009531612246d9e13f9e0c3ae2205d7f63a0a Author: Nicolas Dichtel Date: Tue Nov 14 14:21:32 2017 +0100 ipv6: set all.accept_dad to 0 by default With commits 35e015e1f577 and a2d3f3e33853, the global 'accept_dad' flag is also taken into account (default value is 1). If either global or per-interface flag is non-zero, DAD will be enabled on a given interface. This is not backward compatible: before those patches, the user could disable DAD just by setting the per-interface flag to 0. Now, the user instead needs to set both flags to 0 to actually disable DAD. Restore the previous behaviour by setting the default for the global 'accept_dad' flag to 0. This way, DAD is still enabled by default, as per-interface flags are set to 1 on device creation, but setting them to 0 is enough to disable DAD on a given interface. - Before 35e015e1f57a7 and a2d3f3e33853: global per-interface DAD enabled [default] 1 1 yes X 0 no X 1 yes - After 35e015e1f577 and a2d3f3e33853: global per-interface DAD enabled [default] 1 1 yes 0 0 no 0 1 yes 1 0 yes - After this fix: global per-interface DAD enabled 1 1 yes 0 0 no [default] 0 1 yes 1 0 yes Fixes: 35e015e1f577 ("ipv6: fix net.ipv6.conf.all interface DAD handlers") Fixes: a2d3f3e33853 ("ipv6: fix net.ipv6.conf.all.accept_dad behaviour for real") CC: Stefano Brivio CC: Matteo Croce CC: Erik Kline Signed-off-by: Nicolas Dichtel Acked-by: Stefano Brivio Signed-off-by: David S. Miller net/ipv6/addrconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9f3eb499d84f8d4adcb2f9212ec655700b28228 Author: Dmitry V. Levin Date: Tue Nov 14 06:30:11 2017 +0300 uapi: fix linux/tls.h userspace compilation error Move inclusion of a private kernel header from uapi/linux/tls.h to its only user - net/tls.h, to fix the following linux/tls.h userspace compilation error: /usr/include/linux/tls.h:41:21: fatal error: net/tcp.h: No such file or directory As to this point uapi/linux/tls.h was totaly unusuable for userspace, cleanup this header file further by moving other redundant includes to net/tls.h. Fixes: 3c4d7559159b ("tls: kernel TLS support") Cc: # v4.13+ Signed-off-by: Dmitry V. Levin Signed-off-by: David S. Miller include/net/tls.h | 4 ++++ include/uapi/linux/tls.h | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) commit bb1b40c7cb863f0800a6410c7dcb86cf3f28d3b1 Author: Alexander Kappner Date: Mon Nov 13 17:44:20 2017 -0800 usbnet: ipheth: prevent TX queue timeouts when device not ready iOS devices require the host to be "trusted" before servicing network packets. Establishing trust requires the user to confirm a dialog on the iOS device.Until trust is established, the iOS device will silently discard network packets from the host. Currently, the ipheth driver does not detect whether an iOS device has established trust with the host, and immediately sets up the transmit queues. This causes the following problems: - Kernel taint due to WARN() in netdev watchdog. - Dmesg spam ("TX timeout"). - Disruption of user space networking activity (dhcpd, etc...) when new interface comes up but cannot be used. - Unnecessary host and device wakeups and USB traffic Example dmesg output: [ 1101.319778] NETDEV WATCHDOG: eth1 (ipheth): transmit queue 0 timed out [ 1101.319817] ------------[ cut here ]------------ [ 1101.319828] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:316 dev_watchdog+0x20f/0x220 [ 1101.319831] Modules linked in: ipheth usbmon nvidia_drm(PO) nvidia_modeset(PO) nvidia(PO) iwlmvm mac80211 iwlwifi btusb btrtl btbcm btintel qmi_wwan bluetooth cfg80211 ecdh_generic thinkpad_acpi rfkill [last unloaded: ipheth] [ 1101.319861] CPU: 0 PID: 0 Comm: swapper/0 Tainted: P O 4.13.12.1 #1 [ 1101.319864] Hardware name: LENOVO 20ENCTO1WW/20ENCTO1WW, BIOS N1EET62W (1.35 ) 11/10/2016 [ 1101.319867] task: ffffffff81e11500 task.stack: ffffffff81e00000 [ 1101.319873] RIP: 0010:dev_watchdog+0x20f/0x220 [ 1101.319876] RSP: 0018:ffff8810a3c03e98 EFLAGS: 00010292 [ 1101.319880] RAX: 000000000000003a RBX: 0000000000000000 RCX: 0000000000000000 [ 1101.319883] RDX: ffff8810a3c15c48 RSI: ffffffff81ccbfc2 RDI: 00000000ffffffff [ 1101.319886] RBP: ffff880c04ebc41c R08: 0000000000000000 R09: 0000000000000379 [ 1101.319889] R10: 00000100696589d0 R11: 0000000000000378 R12: ffff880c04ebc000 [ 1101.319892] R13: 0000000000000000 R14: 0000000000000001 R15: ffff880c2865fc80 [ 1101.319896] FS: 0000000000000000(0000) GS:ffff8810a3c00000(0000) knlGS:0000000000000000 [ 1101.319899] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1101.319902] CR2: 00007f3ff24ac000 CR3: 0000000001e0a000 CR4: 00000000003406f0 [ 1101.319905] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1101.319908] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1101.319910] Call Trace: [ 1101.319914] [ 1101.319921] ? dev_graft_qdisc+0x70/0x70 [ 1101.319928] ? dev_graft_qdisc+0x70/0x70 [ 1101.319934] ? call_timer_fn+0x2e/0x170 [ 1101.319939] ? dev_graft_qdisc+0x70/0x70 [ 1101.319944] ? run_timer_softirq+0x1ea/0x440 [ 1101.319951] ? timerqueue_add+0x54/0x80 [ 1101.319956] ? enqueue_hrtimer+0x38/0xa0 [ 1101.319963] ? __do_softirq+0xed/0x2e7 [ 1101.319970] ? irq_exit+0xb4/0xc0 [ 1101.319976] ? smp_apic_timer_interrupt+0x39/0x50 [ 1101.319981] ? apic_timer_interrupt+0x8c/0xa0 [ 1101.319983] [ 1101.319992] ? cpuidle_enter_state+0xfa/0x2a0 [ 1101.319999] ? do_idle+0x1a3/0x1f0 [ 1101.320004] ? cpu_startup_entry+0x5f/0x70 [ 1101.320011] ? start_kernel+0x444/0x44c [ 1101.320017] ? early_idt_handler_array+0x120/0x120 [ 1101.320023] ? x86_64_start_kernel+0x145/0x154 [ 1101.320028] ? secondary_startup_64+0x9f/0x9f [ 1101.320033] Code: 20 04 00 00 eb 9f 4c 89 e7 c6 05 59 44 71 00 01 e8 a7 df fd ff 89 d9 4c 89 e6 48 c7 c7 70 b7 cd 81 48 89 c2 31 c0 e8 97 64 90 ff <0f> ff eb bf 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 [ 1101.320103] ---[ end trace 0cc4d251e2b57080 ]--- [ 1101.320110] ipheth 1-5:4.2: ipheth_tx_timeout: TX timeout The last message "TX timeout" is repeated every 5 seconds until trust is established or the device is disconnected, filling up dmesg. The proposed patch eliminates the problem by, upon connection, keeping the TX queue and carrier disabled until a packet is first received from the iOS device. This is reflected by the confirmed_pairing variable in the device structure. Only after at least one packet has been received from the iOS device, the transmit queue and carrier are brought up during the periodic device poll in ipheth_carrier_set. Because the iOS device will always send a packet immediately upon trust being established, this should not delay the interface becoming useable. To prevent failed UBRs in ipheth_rcvbulk_callback from perpetually re-enabling the queue if it was disabled, a new check is added so only successful transfers re-enable the queue, whereas failed transfers only trigger an immediate poll. This has the added benefit of removing the periodic control requests to the iOS device until trust has been established and thus should reduce wakeup events on both the host and the iOS device. Signed-off-by: Alexander Kappner Signed-off-by: David S. Miller drivers/net/usb/ipheth.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) commit feb8892cb441c742d4220cf7ced001e7fa070731 Author: Jason Wang Date: Mon Nov 13 11:45:34 2017 +0800 vhost_net: conditionally enable tx polling We always poll tx for socket, this is sub optimal since this will slightly increase the waitqueue traversing time and more important, vhost could not benefit from commit 9e641bdcfa4e ("net-tun: restructure tun_do_read for better sleep/wakeup efficiency") even if we've stopped rx polling during handle_rx(), tx poll were still left in the waitqueue. Pktgen from a remote host to VM over mlx4 on two 2.00GHz Xeon E5-2650 shows 11.7% improvements on rx PPS. (from 1.28Mpps to 1.44Mpps) Cc: Wei Xu Cc: Matthew Rosato Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/vhost/net.c | 2 ++ 1 file changed, 2 insertions(+) commit 0eef304bc9f7d079a1165e8cd2f24b078e9e1f2a Author: Dmitry V. Levin Date: Mon Nov 13 03:37:06 2017 +0300 uapi: fix linux/rxrpc.h userspace compilation errors Consistently use types provided by to fix the following linux/rxrpc.h userspace compilation errors: /usr/include/linux/rxrpc.h:24:2: error: unknown type name 'u16' u16 srx_service; /* service desired */ /usr/include/linux/rxrpc.h:25:2: error: unknown type name 'u16' u16 transport_type; /* type of transport socket (SOCK_DGRAM) */ /usr/include/linux/rxrpc.h:26:2: error: unknown type name 'u16' u16 transport_len; /* length of transport address */ Use __kernel_sa_family_t instead of sa_family_t the same way as uapi/linux/in.h does, to fix the following linux/rxrpc.h userspace compilation errors: /usr/include/linux/rxrpc.h:23:2: error: unknown type name 'sa_family_t' sa_family_t srx_family; /* address family */ /usr/include/linux/rxrpc.h:28:3: error: unknown type name 'sa_family_t' sa_family_t family; /* transport address family */ Fixes: 727f8914477e ("rxrpc: Expose UAPI definitions to userspace") Cc: # v4.14 Signed-off-by: Dmitry V. Levin Signed-off-by: David S. Miller include/uapi/linux/rxrpc.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 957ac8c421ad8b5eef9b17fe98e146d8311a541e Author: Jeff Moyer Date: Tue Nov 14 20:37:27 2017 -0500 dax: fix PMD faults on zero-length files PMD faults on a zero length file on a file system mounted with -o dax will not generate SIGBUS as expected. fd = open(...O_TRUNC); addr = mmap(NULL, 2*1024*1024, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); *addr = 'a'; The problem is this code in dax_iomap_pmd_fault: max_pgoff = (i_size_read(inode) - 1) >> PAGE_SHIFT; If the inode size is zero, we end up with a max_pgoff that is way larger than 0. :) Fix it by using DIV_ROUND_UP, as is done elsewhere in the kernel. I tested this with some simple test code that ensured that SIGBUS was received where expected. Cc: Fixes: 642261ac995e ("dax: add struct iomap based DAX PMD support") Signed-off-by: Jeff Moyer Signed-off-by: Dan Williams fs/dax.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3ffa9d9e2a7c10127d8cbf91ea2be15390b450ed Author: Michael Ellerman Date: Wed Nov 15 14:25:42 2017 +1100 powerpc/64s: Fix Power9 DD2.0 workarounds by adding DD2.1 feature Recently we added a CPU feature for Power9 DD2.0, to capture the fact that some workarounds are required only on Power9 DD1 and DD2.0 but not DD2.1 or later. Then in commit 9d2f510a66ec ("powerpc/64s/idle: avoid POWER9 DD1 and DD2.0 ERAT workaround on DD2.1") and commit e3646330cf66 "powerpc/64s/idle: avoid POWER9 DD1 and DD2.0 PMU workaround on DD2.1") we changed CPU_FTR_SECTIONs to check for DD1 or DD20, eg: BEGIN_FTR_SECTION PPC_INVALIDATE_ERAT END_FTR_SECTION_IFSET(CPU_FTR_POWER9_DD1 | CPU_FTR_POWER9_DD20) Unfortunately although this reads as "if set DD1 or DD2.0", the or is a bitwise or and actually generates a mask of both bits. The code that does the feature patching then checks that the value of the CPU features masked with that mask are equal to the mask. So the end result is we're checking for DD1 and DD20 being set, which never happens. Yes the API is terrible. Removing the ERAT workaround on DD2.0 results in random SEGVs, the system tends to boot, but things randomly die including sometimes dhclient, udev etc. To fix the problem and hopefully avoid it in future, we remove the DD2.0 CPU feature and instead add a DD2.1 (or later) feature. This allows us to easily express that the workarounds are required if DD2.1 is not set. At some point we will drop the DD1 workarounds entirely and some of this can be cleaned up. Fixes: 9d2f510a66ec ("powerpc/64s/idle: avoid POWER9 DD1 and DD2.0 ERAT workaround on DD2.1") Fixes: e3646330cf66 ("powerpc/64s/idle: avoid POWER9 DD1 and DD2.0 PMU workaround on DD2.1") Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 7 ++++--- arch/powerpc/kernel/cputable.c | 6 +++--- arch/powerpc/kernel/dt_cpu_ftrs.c | 2 +- arch/powerpc/kernel/idle_book3s.S | 8 ++++---- 4 files changed, 12 insertions(+), 11 deletions(-) commit a33801e8b4735b8d473f963e5854172f9cde3e8b Author: Luca Miccio Date: Mon Nov 13 07:34:10 2017 +0100 block, bfq: move debug blkio stats behind CONFIG_DEBUG_BLK_CGROUP BFQ currently creates, and updates, its own instance of the whole set of blkio statistics that cfq creates. Yet, from the comments of Tejun Heo in [1], it turned out that most of these statistics are meant/useful only for debugging. This commit makes BFQ create the latter, debugging statistics only if the option CONFIG_DEBUG_BLK_CGROUP is set. By doing so, this commit also enables BFQ to enjoy a high perfomance boost. The reason is that, if CONFIG_DEBUG_BLK_CGROUP is not set, then BFQ has to update far fewer statistics, and, in particular, not the heaviest to update. To give an idea of the benefits, if CONFIG_DEBUG_BLK_CGROUP is not set, then, on an Intel i7-4850HQ, and with 8 threads doing random I/O in parallel on null_blk (configured with 0 latency), the throughput of BFQ grows from 310 to 400 KIOPS (+30%). We have measured similar or even much higher boosts with other CPUs: e.g., +45% with an ARM CortexTM-A53 Octa-core. Our results have been obtained and can be reproduced very easily with the script in [1]. [1] https://www.spinics.net/lists/linux-block/msg18943.html Suggested-by: Tejun Heo Suggested-by: Ulf Hansson Tested-by: Lee Tibbert Tested-by: Oleksandr Natalenko Signed-off-by: Luca Miccio Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe Documentation/block/bfq-iosched.txt | 38 +++++++-- block/bfq-cgroup.c | 148 ++++++++++++++++++++---------------- block/bfq-iosched.c | 14 ++-- block/bfq-iosched.h | 4 +- 4 files changed, 125 insertions(+), 79 deletions(-) commit 24bfd19bb7890255693ee5cb6dc100d8d215d00b Author: Paolo Valente Date: Mon Nov 13 07:34:09 2017 +0100 block, bfq: update blkio stats outside the scheduler lock bfq invokes various blkg_*stats_* functions to update the statistics contained in the special files blkio.bfq.* in the blkio controller groups, i.e., the I/O accounting related to the proportional-share policy provided by bfq. The execution of these functions takes a considerable percentage, about 40%, of the total per-request execution time of bfq (i.e., of the sum of the execution time of all the bfq functions that have to be executed to process an I/O request from its creation to its destruction). This reduces the request-processing rate sustainable by bfq noticeably, even on a multicore CPU. In fact, the bfq functions that invoke blkg_*stats_* functions cannot be executed in parallel with the rest of the code of bfq, because both are executed under the same same per-device scheduler lock. To reduce this slowdown, this commit moves, wherever possible, the invocation of these functions (more precisely, of the bfq functions that invoke blkg_*stats_* functions) outside the critical sections protected by the scheduler lock. With this change, and with all blkio.bfq.* statistics enabled, the throughput grows, e.g., from 250 to 310 KIOPS (+25%) on an Intel i7-4850HQ, in case of 8 threads doing random I/O in parallel on null_blk, with the latter configured with 0 latency. We obtained the same or higher throughput boosts, up to +30%, with other processors (some figures are reported in the documentation). For our tests, we used the script [1], with which our results can be easily reproduced. NOTE. This commit still protects the invocation of blkg_*stats_* functions with the request_queue lock, because the group these functions are invoked on may otherwise disappear before or while these functions are executed. Fortunately, tests without even this lock show, by difference, that the serialization caused by this lock has a little impact (at most ~5% of throughput reduction). [1] https://github.com/Algodev-github/IOSpeed Tested-by: Lee Tibbert Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Valente Signed-off-by: Luca Miccio Signed-off-by: Jens Axboe Documentation/block/bfq-iosched.txt | 6 +- block/bfq-iosched.c | 110 ++++++++++++++++++++++++++++++++---- block/bfq-wf2q.c | 1 - 3 files changed, 102 insertions(+), 15 deletions(-) commit 614822f81f606e0064acdae11d9ec1efd3db4190 Author: Luca Miccio Date: Mon Nov 13 07:34:08 2017 +0100 block, bfq: add missing invocations of bfqg_stats_update_io_add/remove bfqg_stats_update_io_add and bfqg_stats_update_io_remove are to be invoked, respectively, when an I/O request enters and when an I/O request exits the scheduler. Unfortunately, bfq does not fully comply with this scheme, because it does not invoke these functions for requests that are inserted into or extracted from its priority dispatch list. This commit fixes this mistake. Tested-by: Lee Tibbert Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Valente Signed-off-by: Luca Miccio Signed-off-by: Jens Axboe block/bfq-iosched.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 68017e5d87a2477d40476f1a0a06f202ee79316b Author: Paolo Valente Date: Mon Nov 13 07:34:07 2017 +0100 doc, block, bfq: update max IOPS sustainable with BFQ We have investigated more deeply the performance of BFQ, in terms of number of IOPS that can be processed by the CPU when BFQ is used as I/O scheduler. In more detail, using the script [1], we have measured the number of IOPS reached on top of a null block device configured with zero latency, as a function of the workload (sequential read, sequential write, random read, random write) and of the system (we considered desktops, laptops and embedded systems). Basing on the resulting figures, with this commit we update the current, conservative IOPS range reported in BFQ documentation. In particular, the documentation now reports, for each of three different systems, the lowest number of IOPS obtained for that system with the above test (namely, the value obtained with the workload leading to the lowest IOPS). [1] https://github.com/Algodev-github/IOSpeed Reviewed-by: Lee Tibbert Signed-off-by: Paolo Valente Signed-off-by: Luca Miccio Signed-off-by: Jens Axboe Documentation/block/bfq-iosched.txt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 4fc930896db910c39999ed0e298798b57362772a Author: Bart Van Assche Date: Wed Nov 1 15:31:49 2017 -0700 ide: Make ide_cdrom_prep_fs() initialize the sense buffer pointer The changes introduced through commit 82ed4db499b8 assume that the sense buffer pointer in struct scsi_request is initialized for all requests - passthrough and filesystem requests. Hence make sure that that pointer is initialized for filesystem requests. Remove the memset() call that clears .cmd because the scsi_req_init() call in ide_initialize_rq() already initializes the .cmd. Fixes: commit 82ed4db499b8 ("block: split scsi_request out of struct request") Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hongxu Jia Signed-off-by: Jens Axboe drivers/ide/ide-cd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8376d3c1f98988ae7f9e9bc2d1eeeb7d61fd206c Author: Kees Cook Date: Mon Oct 16 17:01:48 2017 -0700 md: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Kent Overstreet Cc: Shaohua Li Cc: Alasdair Kergon Cc: Mike Snitzer Cc: dm-devel@redhat.com Cc: linux-bcache@vger.kernel.org Cc: linux-raid@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Michael Lyle Reviewed-by: Mike Snitzer Signed-off-by: Jens Axboe drivers/md/bcache/stats.c | 8 +++----- drivers/md/dm-delay.c | 6 +++--- drivers/md/dm-integrity.c | 6 +++--- drivers/md/dm-raid1.c | 8 +++----- drivers/md/md.c | 9 ++++----- 5 files changed, 16 insertions(+), 21 deletions(-) commit b5775a6ba373f1a6e41723ab54c8a4b0fb6f0f00 Author: Kees Cook Date: Tue Oct 17 15:32:27 2017 -0700 block: swim3: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jens Axboe Cc: Johannes Thumshirn Cc: Ingo Molnar Cc: Arvind Yadav Signed-off-by: Kees Cook Signed-off-by: Jens Axboe drivers/block/swim3.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 0e0cc9df86bc56e5d55a72e0adf530d6f7fe8628 Author: Kees Cook Date: Thu Oct 5 16:13:54 2017 -0700 block/aoe: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jens Axboe Cc: "Ed L. Cashin" Cc: linux-block@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook Signed-off-by: Jens Axboe drivers/block/aoe/aoecmd.c | 6 +++--- drivers/block/aoe/aoedev.c | 9 +++------ 2 files changed, 6 insertions(+), 9 deletions(-) commit cbb9d17875d059aa5665a854fafeff922e7a7938 Author: Kees Cook Date: Wed Oct 4 17:48:38 2017 -0700 amifloppy: Convert timers to use timer_setup() This converts the amifloppy driver to pass the timer pointer to the callback instead of the drive number (and flags). It eliminates the decusagecounter flag, as it was unused, and drops the ininterrupt flag which appeared to be a needless optimization. The drive can then be calculated from the offset of the timer in the drive timer array. Additionally moves to a static data variable instead of the soon-to-be-gone timer->data field. Cc: Jens Axboe Cc: Krzysztof Halasa Cc: Greg Kroah-Hartman Cc: Thomas Gleixner Signed-off-by: Kees Cook Signed-off-by: Jens Axboe drivers/block/amiflop.c | 57 ++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 31 deletions(-) commit b1bf42105aad7c976907665923bc53ce2244e494 Author: Kees Cook Date: Wed Oct 4 17:49:29 2017 -0700 block/floppy: Convert callback to pass timer_list In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to passing in the timer pointer explicitly. Calculate the drive from the offset of the timer in the timer list. Cc: Jiri Kosina Cc: Jens Axboe Cc: Ming Lei Cc: Al Viro Cc: Geliang Tang Cc: Thomas Gleixner Signed-off-by: Kees Cook Signed-off-by: Jens Axboe drivers/block/floppy.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 37cb8e1f8e10c6e9bd2a1b95cdda0620a21b0551 Merge: 6a77d86 aa25e44 Author: Linus Torvalds Date: Tue Nov 14 18:25:40 2017 -0800 Merge tag 'devicetree-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree updates from Rob Herring: "A bigger diffstat than usual with the kbuild changes and a tree wide fix in the binding documentation. Summary: - kbuild cleanups and improvements for dtbs - Code clean-up of overlay code and fixing for some long standing memory leak and race condition in applying overlays - Improvements to DT memory usage making sysfs/kobjects optional and skipping unflattening of disabled nodes. This is part of kernel tinification efforts. - Final piece of removing storing the full path for every DT node. The prerequisite conversion of printk's to use device_node format specifier happened in 4.14. - Sync with current upstream dtc. This brings additional checks to dtb compiling. - Binding doc tree wide removal of leading 0s from examples - RTC binding documentation adding missing devices and some consolidation of duplicated bindings - Vendor prefix documentation for nutsboard, Silicon Storage Technology, shimafuji, Tecon Microprocessor Technologies, DH electronics GmbH, Opal Kelly, and Next Thing" * tag 'devicetree-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (55 commits) dt-bindings: usb: add #phy-cells to usb-nop-xceiv dt-bindings: Remove leading zeros from bindings notation kbuild: handle dtb-y and CONFIG_OF_ALL_DTBS natively in Makefile.lib MIPS: dts: remove bogus bcm96358nb4ser.dtb from dtb-y entry kbuild: clean up *.dtb and *.dtb.S patterns from top-level Makefile .gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignore .gitignore: sort normal pattern rules alphabetically dt-bindings: add vendor prefix for Next Thing Co. scripts/dtc: Update to upstream version v1.4.5-6-gc1e55a5513e9 of: dynamic: fix memory leak related to properties of __of_node_dup of: overlay: make pr_err() string unique of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove of: overlay: remove unneeded check for NULL kbasename() of: overlay: remove a dependency on device node full_name of: overlay: simplify applying symbols from an overlay of: overlay: avoid race condition between applying multiple overlays of: overlay: loosen overly strict phandle clash check of: overlay: expand check of whether overlay changeset can be removed of: overlay: detect cases where device tree may become corrupt of: overlay: minor restructuring ... commit 6a77d86655a1f22f099e5c73eef61dea9c56d633 Merge: 9f7a9b1 3faee94 Author: Linus Torvalds Date: Tue Nov 14 18:09:31 2017 -0800 Merge tag 'leds_for_4.15rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED updates from Jacek Anaszewski: "New LED class driver: - add a driver for PC Engines APU/APU2 LEDs New LED trigger: - add a system activity LED trigger LED core improvements: - replace flags bit shift with BIT() macros Convert timers to use timer_setup() in: - led-core - ledtrig-activity - ledtrig-heartbeat - ledtrig-transient LED class drivers fixes: - lp55xx: fix spelling mistake: 'cound' -> 'could' - tca6507: Remove unnecessary reg check - pca955x: Don't invert requested value in pca955x_gpio_set_value() LED documentation improvements: - update 00-INDEX file" * tag 'leds_for_4.15rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: Add driver for PC Engines APU/APU2 LEDs leds: lp55xx: fix spelling mistake: 'cound' -> 'could' leds: Convert timers to use timer_setup() Documentation: leds: Update 00-INDEX file leds: tca6507: Remove unnecessary reg check leds: ledtrig-heartbeat: Convert timers to use timer_setup() leds: Replace flags bit shift with BIT() macros leds: pca955x: Don't invert requested value in pca955x_gpio_set_value() leds: ledtrig-activity: Add a system activity LED trigger commit 9f7a9b1191b0252184b1971c7248c304d4e38e5e Merge: 4e4510f c251410 Author: Linus Torvalds Date: Tue Nov 14 18:07:18 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - three new touchscreen drivers: EETI EXC3000, HiDeep, and Samsung S6SY761 - the timer API conversion (setup_timer() -> timer_setup()) - a few drivers swiytched to using managed API for creating custom device attributes - other assorted fixed and cleanups. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (50 commits) Input: gamecon - mark expected switch fall-throughs Input: sidewinder - mark expected switch fall-throughs Input: spaceball - mark expected switch fall-throughs Input: uinput - unlock on allocation failure in ioctl Input: add support for the Samsung S6SY761 touchscreen Input: add support for HiDeep touchscreen Input: st1232 - remove obsolete platform device support Input: convert autorepeat timer to use timer_setup() media: ttpci: remove autorepeat handling and use timer_setup Input: cyttsp4 - avoid overflows when calculating memory sizes Input: mxs-lradc - remove redundant assignment to pointer input Input: add I2C attached EETI EXC3000 multi touch driver Input: goodix - support gt1151 touchpanel Input: ps2-gpio - actually abort probe when connected to sleeping GPIOs Input: hil_mlc - convert to using timer_setup() Input: hp_sdc - convert to using timer_setup() Input: touchsceen - convert timers to use timer_setup() Input: keyboard - convert timers to use timer_setup() Input: uinput - fold header into the driver proper Input: uinput - remove uinput_allocate_device() ... commit 4e4510fec4af08ead21f6934c1410af1f19a8cad Merge: 4008e6a 7087cb8 Author: Linus Torvalds Date: Tue Nov 14 18:01:46 2017 -0800 Merge tag 'sound-4.15-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "There are no big surprising changes in this cycle, yet not too boring, either. The biggest change from diffstat POV is the removal of the legacy OSS driver codes that have been already disabled for a long time. This will bring a few trivial merge conflicts. As new features in ASoC side, there are two things: a new AC97 bus implementation and AMD Stony platform support. Both include the relevant changes shared with other subsystems, e.g. AC97 MFD changes and DRM AMD changes. Some other highlighted topics are: - A bunch of USB-audio drivers got the hardening against the malicious device accesses with a new helper code for endpoint sanity check - Lots of cleanups for ASoC Intel platform code, including support for their open source audio firmware - Continued ASoC core componentization works - Support for scaling MCLK with sample rate in ASoC simple-card - Stabler PCM hot-unplug capability, especially for ASoC usages" * tag 'sound-4.15-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (302 commits) Documentation: sound: hd-audio: notes.rst ASoC: bcm2835: Support left/right justified and DSP modes ASoC: bcm2835: Enforce full symmetry ASoC: bcm2835: Support additional samplerates up to 384kHz ASoC: bcm2835: Add support for TDM modes ASoC: add mclk-fs support to audio graph card ASoC: add mclk-fs to audio graph card binding ASoC: rt5514: work around link error ASoC: rt5514: mark PM functions as __maybe_unused ASoC: rt5663: Check the JD status in the button pushing ASoC: amd: Modified DMA transfer Mechanism for Playback ASoC: rt5645: Wait for 400msec before concluding on value of RT5645_VENDOR_ID2 ASoC: sun4i-codec: fixed 32bit audio capture support for H3/H2+ ASoC: da7213: add support for DSP modes ASoC: sun8i-codec: Add a comment on the LRCK inversion ASoC: sun8i-codec: Set the BCLK divider ASoC: rt5663: Delay and retry reading rt5663 ID register ASoC: amd: use do_div rather than 64 bit division to fix 32 bit builds ASoC: cs42l56: Fix reset GPIO name in example DT binding ASoC: rt5514-spi: check irq status to schedule data copy in resume function ... commit 4008e6a9bcee2f3b61bb11951de0fb0ed764cb91 Merge: 6aa2f94 d82e99a Author: Linus Torvalds Date: Tue Nov 14 17:52:21 2017 -0800 Merge branch 'i2c/for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "This contains two bigger than usual tree-wide changes this time. They all have proper acks, caused no merge conflicts in linux-next where they have been for a while. They are namely: - to-gpiod conversion of the i2c-gpio driver and its users (touching arch/* and drivers/mfd/*) - adding a sbs-manager based on I2C core updates to SMBus alerts (touching drivers/power/*) Other notable changes: - i2c_boardinfo can now carry a dev_name to be used when the device is created. This is because some devices in ACPI world need fixed names to find the regulators. - the designware driver got a long discussed overhaul of its PM handling. img-scb and davinci got PM support, too. - at24 driver has way better OF support. And it has a new maintainer. Thanks Bartosz for stepping up! The rest is regular driver updates and fixes" * 'i2c/for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (55 commits) ARM: sa1100: simpad: Correct I2C GPIO offsets i2c: aspeed: Deassert reset in probe eeprom: at24: Add OF device ID table MAINTAINERS: new maintainer for AT24 driver i2c: nuc900: remove platform_data, too i2c: thunderx: Remove duplicate NULL check i2c: taos-evm: Remove duplicate NULL check i2c: Make i2c_unregister_device() NULL-aware i2c: xgene-slimpro: Support v2 i2c: mpc: remove useless variable initialization i2c: omap: Trigger bus recovery in lockup case i2c: gpio: Add support for named gpios in DT dt-bindings: i2c: i2c-gpio: Add support for named gpios i2c: gpio: Local vars in probe i2c: gpio: Augment all boardfiles to use open drain i2c: gpio: Enforce open drain through gpiolib gpio: Make it possible for consumers to enforce open drain i2c: gpio: Convert to use descriptors power: supply: sbs-message: fix some code style issues power: supply: sbs-battery: remove unchecked return var ... commit 6aa2f9441f1ef21f10c41f45e6453b135e9cd736 Merge: e37e0ee 24f0966 Author: Linus Torvalds Date: Tue Nov 14 17:23:44 2017 -0800 Merge tag 'gpio-v4.15-1' of ssh://gitolite.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.15 kernel cycle: Core: - Fix the semantics of raw GPIO to actually be raw. No inversion semantics as before, but also no open draining, and allow the raw operations to affect lines used for interrupts as the caller supposedly knows what they are doing if they are getting the big hammer. - Rewrote the __inner_function() notation calls to names that make more sense. I just find this kind of code disturbing. - Drop the .irq_base() field from the gpiochip since now all IRQs are mapped dynamically. This is nice. - Support for .get_multiple() in the core driver API. This allows us to read several GPIO lines with a single register read. This has high value for some usecases: it can be used to create oscilloscopes and signal analyzers and other things that rely on reading several lines at exactly the same instant. Also a generally nice optimization. This uses the new assign_bit() macro from the bitops lib that was ACKed by Andrew Morton and is implemented for two drivers, one of them being the generic MMIO driver so everyone using that will be able to benefit from this. - Do not allow requests of Open Drain and Open Source setting of a GPIO line simultaneously. If the hardware actually supports enabling both at the same time the electrical result would be disastrous. - A new interrupt chip core helper. This will be helpful to deal with "banked" GPIOs, which means GPIO controllers with several logical blocks of GPIO inside them. This is several gpiochips per device in the device model, in contrast to the case when there is a 1-to-1 relationship between a device and a gpiochip. New drivers: - Maxim MAX3191x industrial serializer, a very interesting piece of professional I/O hardware. - Uniphier GPIO driver. This is the GPIO block from the recent Socionext (ex Fujitsu and Panasonic) platform. - Tegra 186 driver. This is based on the new banked GPIO infrastructure. Other improvements: - Some documentation improvements. - Wakeup support for the DesignWare DWAPB GPIO controller. - Reset line support on the DesignWare DWAPB GPIO controller. - Several non-critical bug fixes and improvements for the Broadcom BRCMSTB driver. - Misc non-critical bug fixes like exotic errorpaths, removal of dead code etc. - Explicit comments on fall-through switch() statements" * tag 'gpio-v4.15-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (65 commits) gpio: tegra186: Remove tegra186_gpio_lock_class gpio: rcar: Add r8a77995 (R-Car D3) support pinctrl: bcm2835: Fix some merge fallout gpio: Fix undefined lock_dep_class gpio: Automatically add lockdep keys gpio: Introduce struct gpio_irq_chip.first gpio: Disambiguate struct gpio_irq_chip.nested gpio: Add Tegra186 support gpio: Export gpiochip_irq_{map,unmap}() gpio: Implement tighter IRQ chip integration gpio: Move lock_key into struct gpio_irq_chip gpio: Move irq_valid_mask into struct gpio_irq_chip gpio: Move irq_nested into struct gpio_irq_chip gpio: Move irq_chained_parent to struct gpio_irq_chip gpio: Move irq_default_type to struct gpio_irq_chip gpio: Move irq_handler to struct gpio_irq_chip gpio: Move irqdomain into struct gpio_irq_chip gpio: Move irqchip into struct gpio_irq_chip gpio: Introduce struct gpio_irq_chip pinctrl: armada-37xx: remove unused variable ... commit c1ea839c41d049604a3f64ef72712d1c7c6639d0 Author: Gabriel Fernandez Date: Wed Oct 11 08:57:24 2017 +0200 clk: stm32h7: fix test of clock config fix test of composite clock config (bad copy / past) Signed-off-by: Gabriel Fernandez Fixes: 3e4d618b0722 ("clk: stm32h7: Add stm32h743 clock driver") Signed-off-by: Stephen Boyd drivers/clk/clk-stm32h7.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e37e0ee0190034a059c9faea8adfb4982fb24ddd Merge: 23c2587 c9eb617 Author: Linus Torvalds Date: Tue Nov 14 16:54:12 2017 -0800 Merge tag 'dma-mapping-4.15' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: - turn dma_cache_sync into a dma_map_ops instance and remove implementation that purely are dead because the architecture doesn't support noncoherent allocations - add a flag for busses that need DMA configuration (Robin Murphy) * tag 'dma-mapping-4.15' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: turn dma_cache_sync into a dma_map_ops method sh: make dma_cache_sync a no-op xtensa: make dma_cache_sync a no-op unicore32: make dma_cache_sync a no-op powerpc: make dma_cache_sync a no-op mn10300: make dma_cache_sync a no-op microblaze: make dma_cache_sync a no-op ia64: make dma_cache_sync a no-op frv: make dma_cache_sync a no-op x86: make dma_cache_sync a no-op floppy: consolidate the dummy fd_cacheflush definition drivers: flag buses which demand DMA configuration commit 23c258763ba992f6a95a4b8980ffa7c1890bc8d8 Merge: e0ca382 cecd5fc Author: Linus Torvalds Date: Tue Nov 14 16:49:31 2017 -0800 Merge tag 'dmaengine-4.15-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine updates from Vinod Koul: "Updates for this cycle include: - new driver for Spreadtrum dma controller, ST MDMA and DMAMUX controllers - PM support for IMG MDC drivers - updates to bcm-sba-raid driver and improvements to sun6i driver - subsystem conversion for: - timers to use timer_setup() - remove usage of PCI pool API - usage of %p format specifier - minor updates to bunch of drivers" * tag 'dmaengine-4.15-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (49 commits) dmaengine: ti-dma-crossbar: Correct am335x/am43xx mux value type dmaengine: dmatest: warn user when dma test times out dmaengine: Revert "rcar-dmac: use TCRB instead of TCR for residue" dmaengine: stm32_mdma: activate pack/unpack feature dmaengine: at_hdmac: Remove unnecessary 0x prefixes before %pad dmaengine: coh901318: Remove unnecessary 0x prefixes before %pad MAINTAINERS: Step down from a co-maintaner of DW DMAC driver dmaengine: pch_dma: Replace PCI pool old API dmaengine: Convert timers to use timer_setup() dmaengine: sprd: Add Spreadtrum DMA driver dt-bindings: dmaengine: Add Spreadtrum SC9860 DMA controller dmaengine: sun6i: Retrieve channel count/max request from devicetree dmaengine: Build bcm-sba-raid driver as loadable module for iProc SoCs dmaengine: bcm-sba-raid: Use common GPL comment header dmaengine: bcm-sba-raid: Use only single mailbox channel dmaengine: bcm-sba-raid: serialize dma_cookie_complete() using reqs_lock dmaengine: pl330: fix descriptor allocation fail dmaengine: rcar-dmac: use TCRB instead of TCR for residue dmaengine: sun6i: Add support for Allwinner A64 and compatibles arm64: allwinner: a64: Add devicetree binding for DMA controller ... commit 6a21586a637e624ae736f94aeb0839f6a1dd0411 Author: Dan Williams Date: Sat Oct 14 17:42:02 2017 -0700 dax: stop requiring a live device for dax_flush() Now that dax_flush() is no longer a driver callback (commit c3ca015fab6d "dax: remove the pmem_dax_ops->flush abstraction"), stop requiring the dax_read_lock() to be held and the device to be alive. This is in preparation for switching filesystem-dax to store pfns instead of sectors in the radix. Reviewed-by: Christoph Hellwig Signed-off-by: Dan Williams drivers/dax/super.c | 3 --- 1 file changed, 3 deletions(-) commit 7a862fbbdec665190c5ef298c0c6ec9f3915cf45 Author: Dan Williams Date: Mon Oct 23 10:24:45 2017 -0700 brd: remove dax support DAX support in brd is awkward because its backing page frames are distinct from the ones provided by pmem, dcssblk, or axonram. We need pfn_t_devmap() entries to fully support DAX, and the limited DAX support for pfn_t_special() page frames is not interesting for brd when pmem is already a superset of brd. Lastly, brd is the only dax capable driver that may sleep in its ->direct_access() implementation. So it causes a global burden with no net gain of kernel functionality. For all these reasons, remove DAX support. Cc: Jens Axboe Cc: Matthew Wilcox Cc: Ross Zwisler Reviewed-by: Christoph Hellwig Signed-off-by: Dan Williams drivers/block/Kconfig | 12 ---------- drivers/block/brd.c | 65 --------------------------------------------------- 2 files changed, 77 deletions(-) commit 66a86cc10945648cf506ef314b98deeb7af06419 Author: Dan Williams Date: Sat Oct 14 11:32:33 2017 -0700 dax: quiet bdev_dax_supported() Before we add another failure reason, quiet the existing log messages. Leave it to the caller to decide if bdev_dax_supported() failures are errors worth emitting to the log. Reported-by: Jeff Moyer Reviewed-by: Christoph Hellwig Signed-off-by: Dan Williams drivers/dax/super.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e0ca3826b147a7ada526856af25a87c8ffad489f Merge: 2cd83ba f319967 Author: Linus Torvalds Date: Tue Nov 14 16:47:47 2017 -0800 Merge tag 'vfio-v4.15-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Virtualize PCI MPS and MRRS registers - Avoid soft lockups on SPAPR when clearing TCE - Broadcom FlexRM platform device support - Samples driver cleanup & type1 integer overflow fix * tag 'vfio-v4.15-rc1' of git://github.com/awilliam/linux-vfio: vfio: platform: reset: Add Broadcom FlexRM reset module vfio/type1: silence integer overflow warning vfio-mdev/samples: make mdev_fops const and static vfio/spapr: Add cond_resched() for huge updates vfio/pci: Virtualize Maximum Read Request Size vfio/pci: Virtualize Maximum Payload Size commit 2cd83ba5bede2f72cc6c79a19a1bddf576b50e88 Merge: 670ffcc 56f1944 Author: Linus Torvalds Date: Tue Nov 14 16:43:27 2017 -0800 Merge tag 'iommu-v4.15-rc1' of git://github.com/awilliam/linux-vfio Pull IOMMU updates from Alex Williamson: "As Joerg mentioned[1], he's out on paternity leave through the end of the year and I'm filling in for him in the interim: - Enforce MSI multiple IRQ alignment in AMD IOMMU - VT-d PASID error handling fixes - Add r8a7795 IPMMU support - Manage runtime PM links on exynos at {add,remove}_device callbacks - Fix Mediatek driver name to avoid conflict - Add terminate support to qcom fault handler - 64-bit IOVA optimizations - Simplfy IOVA domain destruction, better use of rcache, and skip anchor nodes on copy - Convert to IOMMU TLB sync API in io-pgtable-arm{-v7s} - Drop command queue lock when waiting for CMD_SYNC completion on ARM SMMU implementations supporting MSI to cacheable memory - iomu-vmsa cleanup inspired by missed IOTLB sync callbacks - Fix sleeping lock with preemption disabled for RT - Dual MMU support for TI DRA7xx DSPs - Optional flush option on IOVA allocation avoiding overhead when caller can try other options [1] https://lkml.org/lkml/2017/10/22/72" * tag 'iommu-v4.15-rc1' of git://github.com/awilliam/linux-vfio: (54 commits) iommu/iova: Use raw_cpu_ptr() instead of get_cpu_ptr() for ->fq iommu/mediatek: Fix driver name iommu/ipmmu-vmsa: Hook up r8a7795 DT matching code iommu/ipmmu-vmsa: Allow two bit SL0 iommu/ipmmu-vmsa: Make IMBUSCTR setup optional iommu/ipmmu-vmsa: Write IMCTR twice iommu/ipmmu-vmsa: IPMMU device is 40-bit bus master iommu/ipmmu-vmsa: Make use of IOMMU_OF_DECLARE() iommu/ipmmu-vmsa: Enable multi context support iommu/ipmmu-vmsa: Add optional root device feature iommu/ipmmu-vmsa: Introduce features, break out alias iommu/ipmmu-vmsa: Unify ipmmu_ops iommu/ipmmu-vmsa: Clean up struct ipmmu_vmsa_iommu_priv iommu/ipmmu-vmsa: Simplify group allocation iommu/ipmmu-vmsa: Unify domain alloc/free iommu/ipmmu-vmsa: Fix return value check in ipmmu_find_group_dma() iommu/vt-d: Clear pasid table entry when memory unbound iommu/vt-d: Clear Page Request Overflow fault bit iommu/vt-d: Missing checks for pasid tables if allocation fails iommu/amd: Limit the IOVA page range to the specified addresses ... commit 670ffccb2f9183eb6cb32fe92257aea52b3f8a7d Merge: 47f521b 341b2aa Author: Linus Torvalds Date: Tue Nov 14 16:23:44 2017 -0800 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "This is mostly updates of the usual suspects: lpfc, qla2xxx, hisi_sas, megaraid_sas, pm80xx, mpt3sas, be2iscsi, hpsa. and a host of minor updates. There's no major behaviour change or additions to the core in all of this, so the potential for regressions should be small (biggest potential being in the scsi error handler changes)" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (203 commits) scsi: lpfc: Fix hard lock up NMI in els timeout handling. scsi: mpt3sas: remove a stray KERN_INFO scsi: mpt3sas: cleanup _scsih_pcie_enumeration_event() scsi: aacraid: use timespec64 instead of timeval scsi: scsi_transport_fc: add 64GBIT and 128GBIT port speed definitions scsi: qla2xxx: Suppress a kernel complaint in qla_init_base_qpair() scsi: mpt3sas: fix dma_addr_t casts scsi: be2iscsi: Use kasprintf scsi: storvsc: Avoid excessive host scan on controller change scsi: lpfc: fix kzalloc-simple.cocci warnings scsi: mpt3sas: Update mpt3sas driver version. scsi: mpt3sas: Fix sparse warnings scsi: mpt3sas: Fix nvme drives checking for tlr. scsi: mpt3sas: NVMe drive support for BTDHMAPPING ioctl command and log info scsi: mpt3sas: Add-Task-management-debug-info-for-NVMe-drives. scsi: mpt3sas: scan and add nvme device after controller reset scsi: mpt3sas: Set NVMe device queue depth as 128 scsi: mpt3sas: Handle NVMe PCIe device related events generated from firmware. scsi: mpt3sas: API's to remove nvme drive from sml scsi: mpt3sas: API 's to support NVMe drive addition to SML ... commit 47f521ba18190e4bfbb65ead3977af5756884427 Merge: b91593f 0868b99 Author: Linus Torvalds Date: Tue Nov 14 16:07:26 2017 -0800 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD update from Shaohua Li: "This update mostly includes bug fixes: - md-cluster now supports raid10 from Guoqing - raid5 PPL fixes from Artur - badblock regression fix from Bo - suspend hang related fixes from Neil - raid5 reshape fixes from Neil - raid1 freeze deadlock fix from Nate - memleak fixes from Zdenek - bitmap related fixes from Me and Tao - other fixes and cleanups" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: (33 commits) md: free unused memory after bitmap resize md: release allocated bitset sync_set md/bitmap: clear BITMAP_WRITE_ERROR bit before writing it to sb md: be cautious about using ->curr_resync_completed for ->recovery_offset badblocks: fix wrong return value in badblocks_set if badblocks are disabled md: don't check MD_SB_CHANGE_CLEAN in md_allow_write md-cluster: update document for raid10 md: remove redundant variable q raid1: remove obsolete code in raid1_write_request md-cluster: Use a small window for raid10 resync md-cluster: Suspend writes in RAID10 if within range md-cluster/raid10: set "do_balance = 0" if area is resyncing md: use lockdep_assert_held raid1: prevent freeze_array/wait_all_barriers deadlock md: use TASK_IDLE instead of blocking signals md: remove special meaning of ->quiesce(.., 2) md: allow metadata update while suspending. md: use mddev_suspend/resume instead of ->quiesce() md: move suspend_hi/lo handling into core md code md: don't call bitmap_create() while array is quiesced. ... commit c82a2cb85973707671f1428b05f65243baf85da7 Author: Arnd Bergmann Date: Fri Sep 15 21:53:47 2017 +0200 clk: pxa: fix building on older compilers gcc-4.4 got confused by the inline assembler statement: drivers/clk/pxa/clk-pxa.c: In function 'pxa2xx_core_turbo_switch': drivers/clk/pxa/clk-pxa.c:152: error: expected string literal before ')' token This removes the extraneous ':' to let all compilers parse the driver correctly. Signed-off-by: Arnd Bergmann Acked-by: Robert Jarzmik Signed-off-by: Stephen Boyd drivers/clk/pxa/clk-pxa.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit cc54c0955d6f8618a38a999eecdc3d95306b90de Author: Mylene JOSSERAND Date: Sun Nov 5 17:51:34 2017 +0100 clk: sunxi-ng: a83t: Fix i2c buses bits i2c1 and i2c2 bits for CCU are not bit 0 but bit 1 and bit 2. Because of that, the i2c0 (bit 0) was not correctly configured. Fixed the correct bits for i2c1 and i2c2. Fixes: 05359be1176b ("clk: sunxi-ng: Add driver for A83T CCU") Signed-off-by: Mylène Josserand Acked-by: Maxime Ripard Signed-off-by: Stephen Boyd drivers/clk/sunxi-ng/ccu-sun8i-a83t.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 33ec6dbc5a02677509d97fe36cd2105753f0f0ea Author: Johan Hovold Date: Sat Nov 11 17:29:29 2017 +0100 clk: ti: dra7-atl-clock: fix child-node lookups Fix child node-lookup during probe, which ended up searching the whole device tree depth-first starting at parent rather than just matching on its children. Note that the original premature free of the parent node has already been fixed separately, but that fix was apparently never backported to stable. Fixes: 9ac33b0ce81f ("CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic)") Fixes: 660e15519399 ("clk: ti: dra7-atl-clock: Fix of_node reference counting") Cc: stable # 3.16: 660e15519399 Cc: Peter Ujfalusi Signed-off-by: Johan Hovold Acked-by: Peter Ujfalusi Signed-off-by: Stephen Boyd drivers/clk/ti/clk-dra7-atl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 43a51019cc8ff1b1cd2ba72e86563beb40d356fc Author: Johan Hovold Date: Sat Nov 11 17:29:28 2017 +0100 clk: qcom: common: fix legacy board-clock registration Make sure to search only the child nodes of "/clocks", rather than the whole device-tree depth-first starting at "/clocks" when determining whether to register a fixed clock in the legacy board-clock registration helper. Fixes: ee15faffef11 ("clk: qcom: common: Add API to register board clocks backwards compatibly") Signed-off-by: Johan Hovold Signed-off-by: Stephen Boyd drivers/clk/qcom/common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b91593fa8531a7396551dd9c0a0c51e9b9b97ca9 Merge: e2c5923 ef7afb3 Author: Linus Torvalds Date: Tue Nov 14 15:50:56 2017 -0800 Merge tag 'for-4.15/dm' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - a few conversions from atomic_t to ref_count_t - a DM core fix for a race during device destruction that could result in a BUG_ON - a stable@ fix for a DM cache race condition that could lead to data corruption when operating in writeback mode (writethrough is default) - various DM cache cleanups and improvements - add DAX support to the DM log-writes target - a fix for the DM zoned target's ability to deal with the last zone of the drive being smaller than all others - a stable@ DM crypt and DM integrity fix for a negative check that was to restrictive (prevented slab debug with XFS ontop of DM crypt from working) - a DM raid target fix for a panic that can occur when forcing a raid to sync * tag 'for-4.15/dm' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (25 commits) dm cache: lift common migration preparation code to alloc_migration() dm cache: remove usused deferred_cells member from struct cache dm cache policy smq: allocate cache blocks in order dm cache policy smq: change max background work from 10240 to 4096 blocks dm cache background tracker: limit amount of background work that may be issued at once dm cache policy smq: take origin idle status into account when queuing writebacks dm cache policy smq: handle races with queuing background_work dm raid: fix panic when attempting to force a raid to sync dm integrity: allow unaligned bv_offset dm crypt: allow unaligned bv_offset dm: small cleanup in dm_get_md() dm: fix race between dm_get_from_kobject() and __dm_destroy() dm: allocate struct mapped_device with kvzalloc dm zoned: ignore last smaller runt zone dm space map metadata: use ARRAY_SIZE dm log writes: add support for DAX dm log writes: add support for inline data buffers dm cache: simplify get_per_bio_data() by removing data_size argument dm cache: remove all obsolete writethrough-specific code dm cache: submit writethrough writes in parallel to origin and cache ... commit e2c5923c349c1738fe8fda980874d93f6fb2e5b6 Merge: abc36be a04b5de Author: Linus Torvalds Date: Tue Nov 14 15:32:19 2017 -0800 Merge branch 'for-4.15/block' of git://git.kernel.dk/linux-block Pull core block layer updates from Jens Axboe: "This is the main pull request for block storage for 4.15-rc1. Nothing out of the ordinary in here, and no API changes or anything like that. Just various new features for drivers, core changes, etc. In particular, this pull request contains: - A patch series from Bart, closing the whole on blk/scsi-mq queue quescing. - A series from Christoph, building towards hidden gendisks (for multipath) and ability to move bio chains around. - NVMe - Support for native multipath for NVMe (Christoph). - Userspace notifications for AENs (Keith). - Command side-effects support (Keith). - SGL support (Chaitanya Kulkarni) - FC fixes and improvements (James Smart) - Lots of fixes and tweaks (Various) - bcache - New maintainer (Michael Lyle) - Writeback control improvements (Michael) - Various fixes (Coly, Elena, Eric, Liang, et al) - lightnvm updates, mostly centered around the pblk interface (Javier, Hans, and Rakesh). - Removal of unused bio/bvec kmap atomic interfaces (me, Christoph) - Writeback series that fix the much discussed hundreds of millions of sync-all units. This goes all the way, as discussed previously (me). - Fix for missing wakeup on writeback timer adjustments (Yafang Shao). - Fix laptop mode on blk-mq (me). - {mq,name} tupple lookup for IO schedulers, allowing us to have alias names. This means you can use 'deadline' on both !mq and on mq (where it's called mq-deadline). (me). - blktrace race fix, oopsing on sg load (me). - blk-mq optimizations (me). - Obscure waitqueue race fix for kyber (Omar). - NBD fixes (Josef). - Disable writeback throttling by default on bfq, like we do on cfq (Luca Miccio). - Series from Ming that enable us to treat flush requests on blk-mq like any other request. This is a really nice cleanup. - Series from Ming that improves merging on blk-mq with schedulers, getting us closer to flipping the switch on scsi-mq again. - BFQ updates (Paolo). - blk-mq atomic flags memory ordering fixes (Peter Z). - Loop cgroup support (Shaohua). - Lots of minor fixes from lots of different folks, both for core and driver code" * 'for-4.15/block' of git://git.kernel.dk/linux-block: (294 commits) nvme: fix visibility of "uuid" ns attribute blk-mq: fixup some comment typos and lengths ide: ide-atapi: fix compile error with defining macro DEBUG blk-mq: improve tag waiting setup for non-shared tags brd: remove unused brd_mutex blk-mq: only run the hardware queue if IO is pending block: avoid null pointer dereference on null disk fs: guard_bio_eod() needs to consider partitions xtensa/simdisk: fix compile error nvme: expose subsys attribute to sysfs nvme: create 'slaves' and 'holders' entries for hidden controllers block: create 'slaves' and 'holders' entries for hidden gendisks nvme: also expose the namespace identification sysfs files for mpath nodes nvme: implement multipath access to nvme subsystems nvme: track shared namespaces nvme: introduce a nvme_ns_ids structure nvme: track subsystems block, nvme: Introduce blk_mq_req_flags_t block, scsi: Make SCSI quiesce and resume work reliably block: Add the QUEUE_FLAG_PREEMPT_ONLY request queue flag ... commit abc36be236358162202e86ad88616ff95a755101 Merge: f14fc0c 6ace4f6 Author: Linus Torvalds Date: Tue Nov 14 14:44:04 2017 -0800 Merge tag 'configfs-for-4.15' of git://git.infradead.org/users/hch/configfs Pull configfs updates from Christoph Hellwig: "A couple of configfs cleanups: - proper use of the bool type (Thomas Meyer) - constification of struct config_item_type (Bhumika Goyal)" * tag 'configfs-for-4.15' of git://git.infradead.org/users/hch/configfs: RDMA/cma: make config_item_type const stm class: make config_item_type const ACPI: configfs: make config_item_type const nvmet: make config_item_type const usb: gadget: configfs: make config_item_type const PCI: endpoint: make config_item_type const iio: make function argument and some structures const usb: gadget: make config_item_type structures const dlm: make config_item_type const netconsole: make config_item_type const nullb: make config_item_type const ocfs2/cluster: make config_item_type const target: make config_item_type const configfs: make ci_type field, some pointers and function arguments const configfs: make config_item_type const configfs: Fix bool initialization/comparison commit f14fc0ccee5521e5b38cdd1df4385d32c6e1805b Merge: 23281c8 838bee9 Author: Linus Torvalds Date: Tue Nov 14 14:13:11 2017 -0800 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull quota, ext2, isofs and udf fixes from Jan Kara: - two small quota error handling fixes - two isofs fixes for architectures with signed char - several udf block number overflow and signedness fixes - ext2 rework of mount option handling to avoid GFP_KERNEL allocation with spinlock held - ... it also contains a patch to implement auditing of responses to fanotify permission events. That should have been in the fanotify pull request but I mistakenly merged that patch into a wrong branch and noticed only now at which point I don't think it's worth rebasing and redoing. * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: quota: be aware of error from dquot_initialize quota: fix potential infinite loop isofs: use unsigned char types consistently isofs: fix timestamps beyond 2027 udf: Fix some sign-conversion warnings udf: Fix signed/unsigned format specifiers udf: Fix 64-bit sign extension issues affecting blocks > 0x7FFFFFFF udf: Remove some outdate references from documentation udf: Avoid overflow when session starts at large offset ext2: Fix possible sleep in atomic during mount option parsing ext2: Parse mount options into a dedicated structure audit: Record fanotify access control decisions commit 23281c8034879c47639ee0f76c34d13ef6beb8ce Merge: f0b60bf ab97f87 Author: Linus Torvalds Date: Tue Nov 14 14:08:20 2017 -0800 Merge branch 'fsnotify' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify updates from Jan Kara: - fixes of use-after-tree issues when handling fanotify permission events from Miklos - refcount_t conversions from Elena - fixes of ENOMEM handling in dnotify and fsnotify from me * 'fsnotify' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fsnotify: convert fsnotify_mark.refcnt from atomic_t to refcount_t fanotify: clean up CONFIG_FANOTIFY_ACCESS_PERMISSIONS ifdefs fsnotify: clean up fsnotify() fanotify: fix fsnotify_prepare_user_wait() failure fsnotify: fix pinning group in fsnotify_prepare_user_wait() fsnotify: pin both inode and vfsmount mark fsnotify: clean up fsnotify_prepare/finish_user_wait() fsnotify: convert fsnotify_group.refcnt from atomic_t to refcount_t fsnotify: Protect bail out path of fsnotify_add_mark_locked() properly dnotify: Handle errors from fsnotify_add_mark_locked() in fcntl_dirnotify() commit f0b60bfa952458286f43a63c07b0eea170b2cc95 Merge: 29309a4 9250e52 Author: Linus Torvalds Date: Tue Nov 14 14:06:51 2017 -0800 Merge tag 'dlm-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: "This set focuses, as usual, on fixes to the comms layer. New testing of the dlm with ocfs2 uncovered a number of bugs in the TCP connection handling during recovery, starting, and stopping" * tag 'dlm-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: dlm: remove dlm_send_rcom_lookup_dump dlm: recheck kthread_should_stop() before schedule() DLM: fix NULL pointer dereference in send_to_sock() DLM: fix to reschedule rwork DLM: fix to use sk_callback_lock correctly DLM: fix overflow dlm_cb_seq DLM: fix memory leak in tcp_accept_from_sock() DLM: fix conversion deadlock when DLM_LKF_NODLCKWT flag is set DLM: use CF_CLOSE flag to stop dlm_send correctly DLM: Reanimate CF_WRITE_PENDING flag DLM: fix race condition between dlm_recoverd_stop and dlm_recoverd DLM: close othercon at send/receive error DLM: retry rcom when dlm_wait_function is timed out. DLM: fix to use sock_mutex correctly in xxx_accept_from_sock DLM: fix race condition between dlm_send and dlm_recv DLM: fix double list_del() DLM: fix remove save_cb argument from add_sock() DLM: Fix saving of NULL callbacks DLM: Eliminate CF_WRITE_PENDING flag DLM: Eliminate CF_CONNECT_PENDING flag commit c1d0c3f623ada808904dec676da0126f5b800630 Author: Marc-André Lureau Date: Mon Nov 13 20:29:54 2017 +0100 fw_cfg: fix the command line module name Signed-off-by: Marc-André Lureau Acked-by: Gabriel Somlo Signed-off-by: Michael S. Tsirkin drivers/firmware/qemu_fw_cfg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a72b69dc083a931422cc8a5e33841aff7d5312f2 Author: Stefan Hajnoczi Date: Thu Nov 9 13:29:10 2017 +0000 vhost/vsock: fix uninitialized vhost_vsock->guest_cid The vhost_vsock->guest_cid field is uninitialized when /dev/vhost-vsock is opened until the VHOST_VSOCK_SET_GUEST_CID ioctl is called. kvmalloc(..., GFP_KERNEL | __GFP_RETRY_MAYFAIL) does not zero memory. All other vhost_vsock fields are initialized explicitly so just initialize this field too. Signed-off-by: Stefan Hajnoczi Signed-off-by: Michael S. Tsirkin drivers/vhost/vsock.c | 2 ++ 1 file changed, 2 insertions(+) commit ca2c5b33a285723f517fa296b76f7fd36c383dad Author: Michael S. Tsirkin Date: Mon Aug 21 22:33:33 2017 +0300 vhost: fix end of range for access_ok During access_ok checks, addr increases as we iterate over the data structure, thus addr + len - 1 will point beyond the end of region we are translating. Harmless since we then verify that the region covers addr, but let's not waste cpu cycles. Reported-by: Koichiro Den Signed-off-by: Michael S. Tsirkin Acked-by: Koichiro Den drivers/vhost/vhost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 816e85edff0f31bc8e4614eaaf9a0364406d7a8f Author: Byungchul Park Date: Thu Nov 9 09:00:21 2017 +0900 vhost/scsi: Use safe iteration in vhost_scsi_complete_cmd_work() The following patch changed the behavior which originally did safe iteration. Make it safe as it was. 12bdcbd539c6327c09da0503c674733cb2d82cb5 vhost/scsi: Don't reinvent the wheel but use existing llist API Signed-off-by: Byungchul Park Signed-off-by: Michael S. Tsirkin drivers/vhost/scsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c7cdff0e864713a089d7cb3a2b1136ba9a54881a Author: Michael S. Tsirkin Date: Fri Oct 13 16:11:48 2017 +0300 virtio_balloon: fix deadlock on OOM fill_balloon doing memory allocations under balloon_lock can cause a deadlock when leak_balloon is called from virtballoon_oom_notify and tries to take same lock. To fix, split page allocation and enqueue and do allocations outside the lock. Here's a detailed analysis of the deadlock by Tetsuo Handa: In leak_balloon(), mutex_lock(&vb->balloon_lock) is called in order to serialize against fill_balloon(). But in fill_balloon(), alloc_page(GFP_HIGHUSER[_MOVABLE] | __GFP_NOMEMALLOC | __GFP_NORETRY) is called with vb->balloon_lock mutex held. Since GFP_HIGHUSER[_MOVABLE] implies __GFP_DIRECT_RECLAIM | __GFP_IO | __GFP_FS, despite __GFP_NORETRY is specified, this allocation attempt might indirectly depend on somebody else's __GFP_DIRECT_RECLAIM memory allocation. And such indirect __GFP_DIRECT_RECLAIM memory allocation might call leak_balloon() via virtballoon_oom_notify() via blocking_notifier_call_chain() callback via out_of_memory() when it reached __alloc_pages_may_oom() and held oom_lock mutex. Since vb->balloon_lock mutex is already held by fill_balloon(), it will cause OOM lockup. Thread1 Thread2 fill_balloon() takes a balloon_lock balloon_page_enqueue() alloc_page(GFP_HIGHUSER_MOVABLE) direct reclaim (__GFP_FS context) takes a fs lock waits for that fs lock alloc_page(GFP_NOFS) __alloc_pages_may_oom() takes the oom_lock out_of_memory() blocking_notifier_call_chain() leak_balloon() tries to take that balloon_lock and deadlocks Reported-by: Tetsuo Handa Cc: Michal Hocko Cc: Wei Wang Signed-off-by: Michael S. Tsirkin drivers/virtio/virtio_balloon.c | 24 +++++++++++++++++++----- include/linux/balloon_compaction.h | 35 ++++++++++++++++++++++++++++++++++- mm/balloon_compaction.c | 28 +++++++++++++++++++++------- 3 files changed, 74 insertions(+), 13 deletions(-) commit 29309a4eb8a2a9163b20657ce30510406c792d79 Merge: ac446dc d0920a9 Author: Linus Torvalds Date: Tue Nov 14 13:55:51 2017 -0800 Merge tag 'gfs2-4.15.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Bob Peterson: "We've got a total of 17 GFS2 patches for this merge window. The patches are basically in three categories: (1) patches related to broken xfstest cases, (2) patches related to improving iomap and start using it in GFS2, and (3) general typos and clarifications. Please note that one of the iomap patches extends beyond GFS2 and affects other file systems, but it was publically reviewed by a variety of file system people in the community. From Andreas Gruenbacher: - rename variable 'bsize' to 'factor' to clarify the logic related to gfs2_block_map. - correctly set ctime in the setflags ioctl, which fixes broken xfstests test 277. - fix broken xfstest 258, due to an atime initialization problem. - fix broken xfstest 307, in which GFS2 was not setting ctime when setting acls. - switch general iomap code from blkno to disk offset for a variety of file systems. - add a new IOMAP_F_DATA_INLINE flag for iomap to indicate blocks that have data mixed with metadata. - implement SEEK_HOLE and SEEK_DATA via iomap in GFS2. - fix failing xfstest case 066, which was due to not properly syncing dirty inodes when changing extended attributes. - fix a minor typo in a comment. - partially fix xfstest 424, which involved GET_FLAGS and SET_FLAGS ioctl. This is also a cleanup and simplification of the translation of flags from fs flags to gfs2 flags. - add support for STATX_ATTR_ in statx, which fixed broken xfstest 424. - fix for failing xfstest 093 which fixes a recursive glock problem with gfs2_xattr_get and _set From me: - make inode height info part of the 'metapath' data structure to facilitate using iomap in GFS2. - start using iomap inside GFS2 and switch GFS2's block_map functions to use iomap under the covers. - switch GFS2's fiemap implementation from using block_map to using iomap under the covers. - fix journaled data pages not being properly synced to media when writing inodes. This was caught with xfstests. - fix another failing xfstest case in which switching a file from ordered_write to journaled data via set_flags caused a deadlock" * tag 'gfs2-4.15.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Allow gfs2_xattr_set to be called with the glock held gfs2: Add support for statx inode flags gfs2: Fix and clean up {GET,SET}FLAGS ioctl gfs2: Fix a harmless typo gfs2: Fix xattr fsync GFS2: Take inode off order_write list when setting jdata flag GFS2: flush the log and all pages for jdata as we do for WB_SYNC_ALL gfs2: Implement SEEK_HOLE / SEEK_DATA via iomap GFS2: Switch fiemap implementation to use iomap GFS2: Implement iomap for block_map GFS2: Make height info part of metapath gfs2: Always update inode ctime in set_acl gfs2: Support negative atimes gfs2: Update ctime in setflags ioctl gfs2: Clarify gfs2_block_map commit ac446dcc8360b3d31a87f0c6390ab75a18fc44ba Merge: 5cea764 88a96fa Author: Linus Torvalds Date: Tue Nov 14 13:53:18 2017 -0800 Merge tag 'jfs-4.15' of git://github.com/kleikamp/linux-shaggy Pull jfs updates from David Kleikamp: "A couple small fixes for jfs" * tag 'jfs-4.15' of git://github.com/kleikamp/linux-shaggy: jfs: Add missing NULL pointer check in __get_metapage jfs: remove increment of i_version counter commit 5cea7647e64657138138a3794ae172ee0fc175da Merge: 808eb24 d28e649 Author: Linus Torvalds Date: Tue Nov 14 13:35:29 2017 -0800 Merge branch 'for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "There are some new user features and the usual load of invisible enhancements or cleanups. New features: - extend mount options to specify zlib compression level, -o compress=zlib:9 - v2 of ioctl "extent to inode mapping", addressing a usecase where we want to retrieve more but inaccurate results and do the postprocessing in userspace, aiding defragmentation or deduplication tools - populate compression heuristics logic, do data sampling and try to guess compressibility by: looking for repeated patterns, counting unique byte values and distribution, calculating Shannon entropy; this will need more benchmarking and possibly fine tuning, but the base should be good enough - enable indexing for btrfs as lower filesystem in overlayfs - speedup page cache readahead during send on large files Internal enhancements: - more sanity checks of b-tree items when reading them from disk - more EINVAL/EUCLEAN fixups, missing BLK_STS_* conversion, other errno or error handling fixes - remove some homegrown IO-related logic, that's been obsoleted by core block layer changes (batching, plug/unplug, own counters) - add ref-verify, optional debugging feature to verify extent reference accounting - simplify code handling outstanding extents, make it more clear where and how the accounting is done - make delalloc reservations per-inode, simplify the code and make the logic more straightforward - extensive cleanup of delayed refs code Notable fixes: - fix send ioctl on 32bit with 64bit kernel" * 'for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (102 commits) btrfs: Fix bug for misused dev_t when lookup in dev state hash table. Btrfs: heuristic: add Shannon entropy calculation Btrfs: heuristic: add byte core set calculation Btrfs: heuristic: add byte set calculation Btrfs: heuristic: add detection of repeated data patterns Btrfs: heuristic: implement sampling logic Btrfs: heuristic: add bucket and sample counters and other defines Btrfs: compression: separate heuristic/compression workspaces btrfs: move btrfs_truncate_block out of trans handle btrfs: don't call btrfs_start_delalloc_roots in flushoncommit btrfs: track refs in a rb_tree instead of a list btrfs: add a comp_refs() helper btrfs: switch args for comp_*_refs btrfs: make the delalloc block rsv per inode btrfs: add tracepoints for outstanding extents mods Btrfs: rework outstanding_extents btrfs: increase output size for LOGICAL_INO_V2 ioctl btrfs: add a flags argument to LOGICAL_INO and call it LOGICAL_INO_V2 btrfs: add a flag to iterate_inodes_from_logical to find all extent refs for uncompressed extents btrfs: send: remove unused code ... commit 808eb24e0e0939b487bf90e3888a9636f1c83acb Merge: ae9a8c4 2d1d1da Author: Linus Torvalds Date: Tue Nov 14 13:15:12 2017 -0800 Merge tag 'xfs-4.15-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Darrick Wong: "xfs: great scads of new stuff for 4.15. This merge cycle, we're making some substantive changes to XFS. The in-core extent mappings have been refactored to use proper iterators and a btree to handle heavily fragmented files without needing high-order memory allocations; some important log recovery bug fixes; and the first part of the online fsck functionality. (The online fsck feature is disabled by default and more pieces of it will be coming in future release cycles.) This giant pile of patches has been run through a full xfstests run over the weekend and through a quick xfstests run against this morning's master, with no major failures reported. New in this version: - Refactor the incore extent map manipulations to use a cursor instead of directly modifying extent data. - Refactor the incore extent map cursor to use an in-memory btree instead of a single high-order allocation. This eliminates a major source of complaints about insufficient memory when opening a heavily fragmented file into a system whose memory is also heavily fragmented. - Fix a longstanding bug where deleting a file with a complex extended attribute btree incorrectly handled memory pointers, which could lead to memory corruption. - Improve metadata validation to eliminate crashing problems found while fuzzing xfs. - Move the error injection tag definitions into libxfs to be shared with userspace components. - Fix some log recovery bugs where we'd underflow log block position vector and incorrectly fail log recovery. - Drain the buffer lru after log recovery to force recovered buffers back through the verifiers after mount. On a v4 filesystem the log never attaches verifiers during log replay (v5 does), so we could end up with buffers marked verified but without having ever been verified. - Fix various other bugs. - Introduce the first part of a new online fsck tool. The new fsck tool will be able to iterate every piece of metadata in the filesystem to look for obvious errors and corruptions. In the next release cycle the checking will be extended to cross-reference with the other fs metadata, so this feature should only be used by the developers in the mean time" * tag 'xfs-4.15-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (131 commits) xfs: on failed mount, force-reclaim inodes after unmounting quota controls xfs: check the uniqueness of the AGFL entries xfs: remove u_int* type usage xfs: handle zero entries case in xfs_iext_rebalance_leaf xfs: add comments documenting the rebalance algorithm xfs: trivial indentation fixup for xfs_iext_remove_node xfs: remove a superflous assignment in xfs_iext_remove_node xfs: add some comments to xfs_iext_insert/xfs_iext_insert_node xfs: fix number of records handling in xfs_iext_split_leaf fs/xfs: Remove NULL check before kmem_cache_destroy xfs: only check da node header padding on v5 filesystems xfs: fix btree scrub deref check xfs: fix uninitialized return values in scrub code xfs: pass inode number to xfs_scrub_ino_set_{preen,warning} xfs: refactor the directory data block bestfree checks xfs: mark xlog_verify_dest_ptr STATIC xfs: mark xlog_recover_check_summary STATIC xfs: mark xfs_btree_check_lblock and xfs_btree_check_ptr static xfs: remove unreachable error injection code in xfs_qm_dqget xfs: remove unused debug counts for xfs_lock_inodes ... commit 049a2c2d486e8cc82c5cd79fa479c5b105b109e9 Author: Heiko Carstens Date: Tue Nov 14 15:20:24 2017 +0100 s390: enable CPU alternatives unconditionally Remove the CPU_ALTERNATIVES config option and enable the code unconditionally. The config option was only added to avoid a conflict with the named saved segment support. Since that code is gone there is no reason to keep the CPU_ALTERNATIVES config option. Just enable it unconditionally to also reduce the number of config options and make it less likely that something breaks. Signed-off-by: Heiko Carstens arch/s390/Kconfig | 16 ---------------- arch/s390/include/asm/alternative.h | 20 +++----------------- arch/s390/kernel/Makefile | 3 +-- arch/s390/kernel/module.c | 15 ++++++--------- 4 files changed, 10 insertions(+), 44 deletions(-) commit a6de0a91d93a47f812cf43b96ba6e639de6df6d5 Author: Heiko Carstens Date: Tue Nov 14 14:50:38 2017 +0100 s390/nmi: remove unused code Signed-off-by: Heiko Carstens arch/s390/kernel/nmi.c | 2 -- 1 file changed, 2 deletions(-) commit 2be1da8d4d3fd7b09f5c6ab952bff5cef0677ade Author: Heiko Carstens Date: Tue Nov 14 14:50:08 2017 +0100 s390/mm: remove unused code Signed-off-by: Heiko Carstens arch/s390/mm/gmap.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 78ca4fe3bb166e913d278e504d93f09a8ba3139e Author: Heiko Carstens Date: Tue Nov 14 13:47:00 2017 +0100 s390/spinlock: fix indentation checkpatch: WARNING: Statements should start on a tabstop #9499: FILE: arch/s390/lib/spinlock.c:231: + return; sparse: arch/s390/lib/spinlock.c:81 arch_load_niai4() warn: inconsistent indenting Signed-off-by: Heiko Carstens arch/s390/lib/spinlock.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 3c6153e8145f74870bad11fa4344fd20f1ad3aaf Author: Heiko Carstens Date: Tue Nov 14 13:35:14 2017 +0100 s390/vdso: add missing boot_vdso_data declaration sparse says: arch/s390/kernel/vdso.c:150:18: warning: symbol 'boot_vdso_data' was not declared. Should it be static? Signed-off-by: Heiko Carstens arch/s390/include/asm/vdso.h | 1 + 1 file changed, 1 insertion(+) commit ae9a8c4bdc91202b4236372eed53c54d2297c71b Merge: 32190f0 2325306 Author: Linus Torvalds Date: Tue Nov 14 12:59:42 2017 -0800 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: - Add support for online resizing of file systems with bigalloc - Fix a two data corruption bugs involving DAX, as well as a corruption bug after a crash during a racing fallocate and delayed allocation. - Finally, a number of cleanups and optimizations. * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: improve smp scalability for inode generation ext4: add support for online resizing with bigalloc ext4: mention noload when recovering on read-only device Documentation: fix little inconsistencies ext4: convert timers to use timer_setup() jbd2: convert timers to use timer_setup() ext4: remove duplicate extended attributes defs ext4: add ext4_should_use_dax() ext4: add sanity check for encryption + DAX ext4: prevent data corruption with journaling + DAX ext4: prevent data corruption with inline data + DAX ext4: fix interaction between i_size, fallocate, and delalloc after a crash ext4: retry allocations conservatively ext4: Switch to iomap for SEEK_HOLE / SEEK_DATA ext4: Add iomap support for inline data iomap: Add IOMAP_F_DATA_INLINE flag iomap: Switch from blkno to disk offset commit 32190f0afbf4f1c0a9142e5a886a078ee0b794fd Merge: 37dc795 a0b3bc8 Author: Linus Torvalds Date: Tue Nov 14 11:35:15 2017 -0800 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt Pull fscrypt updates from Ted Ts'o: "Lots of cleanups, mostly courtesy by Eric Biggers" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt: fscrypt: lock mutex before checking for bounce page pool fscrypt: add a documentation file for filesystem-level encryption ext4: switch to fscrypt_prepare_setattr() ext4: switch to fscrypt_prepare_lookup() ext4: switch to fscrypt_prepare_rename() ext4: switch to fscrypt_prepare_link() ext4: switch to fscrypt_file_open() fscrypt: new helper function - fscrypt_prepare_setattr() fscrypt: new helper function - fscrypt_prepare_lookup() fscrypt: new helper function - fscrypt_prepare_rename() fscrypt: new helper function - fscrypt_prepare_link() fscrypt: new helper function - fscrypt_file_open() fscrypt: new helper function - fscrypt_require_key() fscrypt: remove unneeded empty fscrypt_operations structs fscrypt: remove ->is_encrypted() fscrypt: switch from ->is_encrypted() to IS_ENCRYPTED() fs, fscrypt: add an S_ENCRYPTED inode flag fscrypt: clean up include file mess commit 37dc79565c4b7e735f190eaa6ed5bb6eb3d3968a Merge: 894025f 1d9ddde1 Author: Linus Torvalds Date: Tue Nov 14 10:52:09 2017 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "Here is the crypto update for 4.15: API: - Disambiguate EBUSY when queueing crypto request by adding ENOSPC. This change touches code outside the crypto API. - Reset settings when empty string is written to rng_current. Algorithms: - Add OSCCA SM3 secure hash. Drivers: - Remove old mv_cesa driver (replaced by marvell/cesa). - Enable rfc3686/ecb/cfb/ofb AES in crypto4xx. - Add ccm/gcm AES in crypto4xx. - Add support for BCM7278 in iproc-rng200. - Add hash support on Exynos in s5p-sss. - Fix fallback-induced error in vmx. - Fix output IV in atmel-aes. - Fix empty GCM hash in mediatek. Others: - Fix DoS potential in lib/mpi. - Fix potential out-of-order issues with padata" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (162 commits) lib/mpi: call cond_resched() from mpi_powm() loop crypto: stm32/hash - Fix return issue on update crypto: dh - Remove pointless checks for NULL 'p' and 'g' crypto: qat - Clean up error handling in qat_dh_set_secret() crypto: dh - Don't permit 'key' or 'g' size longer than 'p' crypto: dh - Don't permit 'p' to be 0 crypto: dh - Fix double free of ctx->p hwrng: iproc-rng200 - Add support for BCM7278 dt-bindings: rng: Document BCM7278 RNG200 compatible crypto: chcr - Replace _manual_ swap with swap macro crypto: marvell - Add a NULL entry at the end of mv_cesa_plat_id_table[] hwrng: virtio - Virtio RNG devices need to be re-registered after suspend/resume crypto: atmel - remove empty functions crypto: ecdh - remove empty exit() MAINTAINERS: update maintainer for qat crypto: caam - remove unused param of ctx_map_to_sec4_sg() crypto: caam - remove unneeded edesc zeroization crypto: atmel-aes - Reset the controller before each use crypto: atmel-aes - properly set IV after {en,de}crypt hwrng: core - Reset user selected rng by writing "" to rng_current ... commit 91f3140fdef61074515470243370d92a45f0b516 Merge: 5164e38 1eaa870 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:38 2017 -0600 Merge branch 'pci/host-xilinx' into next * pci/host-xilinx: PCI: xilinx: Rename xilinx_pcie_link_is_up() to xilinx_pcie_link_up() commit 5164e38a1793ed47362da0c1dc5e2e38597252f8 Merge: e9cd973 92e3145 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:37 2017 -0600 Merge branch 'pci/host-xgene' into next * pci/host-xgene: PCI: xgene: Rename xgene_pcie_probe_bridge() to xgene_pcie_probe() commit e9cd973f2bb28ef4f6ddd89c77708547af3bb183 Merge: 29d0d44 68a15eb Author: Bjorn Helgaas Date: Tue Nov 14 12:11:37 2017 -0600 Merge branch 'pci/host-v3-semi' into next * pci/host-v3-semi: PCI: v3-semi: Add V3 Semiconductor PCI host driver PCI: v3: Update the device tree bindings commit 29d0d4411fafa1a934ff6ff00840df4f880add41 Merge: d238be6 33ba90a Author: Bjorn Helgaas Date: Tue Nov 14 12:11:36 2017 -0600 Merge branch 'pci/host-thunder' into next * pci/host-thunder: PCI: Avoid slot reset if bridge itself is broken PCI: Avoid bus reset if bridge itself is broken PCI: Mark Cavium CN8xxx to avoid bus reset commit d238be6957b2e57913f602fc4429813ca6027e93 Merge: 2b61a44 9cea513 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:35 2017 -0600 Merge branch 'pci/host-tegra' into next * pci/host-tegra: PCI: tegra: Add Tegra186 PCIe support dt-bindings: pci: tegra: Document Tegra186 PCIe DT PCI: tegra: Use generic accessors where possible commit 2b61a44e115e346dcf248b4b35ae2aafed99bb78 Merge: 9ff9503 d76bdce Author: Bjorn Helgaas Date: Tue Nov 14 12:11:34 2017 -0600 Merge branch 'pci/host-tango' into next * pci/host-tango: PCI: tango: Add MSI controller support PCI: Use of_pci_dma_range_parser_init() to reduce duplication of/pci: Add of_pci_dma_range_parser_init() for dma-ranges parsing support commit 9ff950304d2b39e00e090e71e7d1316d4e9fdd9d Merge: 89000e8 f675564 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:34 2017 -0600 Merge branch 'pci/host-rcar' into next * pci/host-rcar: dt-bindings: PCI: rcar: Correct example to match reality commit 89000e89bf4df8b9a0a16e1d3856913907385bd5 Merge: aaea12f 84d897d Author: Bjorn Helgaas Date: Tue Nov 14 12:11:33 2017 -0600 Merge branch 'pci/host-layerscape' into next * pci/host-layerscape: PCI: layerscape: Change default error response behavior PCI: Disable MSI for Freescale Layerscape PCIe RC mode arm64: dts: ls1046a: Add PCIe controller DT nodes arm64: dts: ls1012a: Add PCIe controller DT node PCI: layerscape: Add support for ls1012a arm64: dts: ls1012a: Add MSI controller DT node irqchip/ls-scfg-msi: Add LS1012a MSI support commit aaea12f7fe4c309c8cfa9040cbb3cb02feae0b4d Merge: 85a8cf8 fc54bae Author: Bjorn Helgaas Date: Tue Nov 14 12:11:32 2017 -0600 Merge branch 'pci/host-iproc' into next * pci/host-iproc: PCI: iproc: Allow allocation of multiple MSIs commit 85a8cf8ebdedc6300c52a1c8f416dc670ab4df6f Merge: 22111ff4 79aa801 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:31 2017 -0600 Merge branch 'pci/host-hv' into next * pci/host-hv: PCI: hv: Use effective affinity mask commit 22111ff4d728572da485430a061fc878622e8566 Merge: d535969 bbd11bd Author: Bjorn Helgaas Date: Tue Nov 14 12:11:31 2017 -0600 Merge branch 'pci/host-hisi' into next * pci/host-hisi: PCI: hisi: Add HiSilicon STB SoC PCIe controller driver commit d535969614d547f149e9d6d31e54d5434069a31e Merge: 807dcfe 19f3f22 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:30 2017 -0600 Merge branch 'pci/host-generic' into next * pci/host-generic: dt-bindings: PCI: designware: Add binding for Designware PCIe in ECAM mode PCI: generic: Add support for Synopsys DesignWare RC in ECAM mode commit 807dcfee426b407f7175fefc4c255594c6f257f5 Merge: f21bfb5 b3c433e Author: Bjorn Helgaas Date: Tue Nov 14 12:11:29 2017 -0600 Merge branch 'pci/host-faraday' into next * pci/host-faraday: PCI: faraday: Fix wrong pointer passed to PTR_ERR() commit f21bfb5625c5278f5a48d307114eec2220ea6f79 Merge: afa7745 9c049be Author: Bjorn Helgaas Date: Tue Nov 14 12:11:28 2017 -0600 Merge branch 'pci/host-dra7xx' into next * pci/host-dra7xx: PCI: dra7xx: Add shutdown handler to cleanly turn off clocks commit afa7745692c552025b3bebe8dd79742c660c4b02 Merge: 9ceb09c 499c010 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:28 2017 -0600 Merge branch 'pci/host-altera' into next * pci/host-altera: PCI: altera: Rename altera_pcie_link_is_up() to altera_pcie_link_up() commit 9ceb09cce1a30bdbcff861d1bbbbe0dbb7de05de Merge: 9af21ac 832c418a Author: Bjorn Helgaas Date: Tue Nov 14 12:11:26 2017 -0600 Merge branch 'pci/virtualization' into next * pci/virtualization: PCI: Document reset method return values PCI: Detach driver before procfs & sysfs teardown on device remove PCI: Apply Cavium ThunderX ACS quirk to more Root Ports PCI: Set Cavium ACS capability quirk flags to assert RR/CR/SV/UF PCI: Restore ARI Capable Hierarchy before setting numVFs PCI: Create SR-IOV virtfn/physfn links before attaching driver PCI: Expose SR-IOV offset, stride, and VF device ID via sysfs PCI: Cache the VF device ID in the SR-IOV structure PCI: Add Kconfig PCI_IOV dependency for PCI_REALLOC_ENABLE_AUTO PCI: Remove unused function __pci_reset_function() PCI: Remove reset argument from pci_iov_{add,remove}_virtfn() commit 9af21ac53f970b1be81c1e1ca629da74a771a036 Merge: 104d1e4 f05f735 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:26 2017 -0600 Merge branch 'pci/switchtec' into next * pci/switchtec: switchtec: Make struct event_regs static commit 104d1e40cfcd69934f3f57c6abf13980eb703feb Merge: 8dceeaf a405f19 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:25 2017 -0600 Merge branch 'pci/resource' into next * pci/resource: PCI: Fail pci_map_rom() if the option ROM is invalid PCI: Move pci_map_rom() error path x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 00-1f, 30-3f, 60-7f) PCI: Add pci_resize_resource() for resizing BARs PCI: Add resizable BAR infrastructure PCI: Add PCI resource type mask #define commit 8dceeaf8fff35a0b70a8cf3ca66883ac4bf4c9dd Merge: 6018182 cc27b73 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:24 2017 -0600 Merge branch 'pci/portdrv' into next * pci/portdrv: PCI/portdrv: Turn off PCIe services during shutdown commit 6018182d3158505f11103adaee8ffb53424df986 Merge: 65a129d a579ba4 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:23 2017 -0600 Merge branch 'pci/msi' into next * pci/msi: PCI/portdrv: Compute MSI/MSI-X IRQ vectors after final allocation PCI/portdrv: Factor out Interrupt Message Number lookup PCI/portdrv: Consolidate comments PCI/portdrv: Add #defines for AER and DPC Interrupt Message Number masks commit 65a129d7847e4f5b24c6e56ab49090b1f6d0f3dc Merge: 8d666e5 505fb74 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:22 2017 -0600 Merge branch 'pci/misc' into next * pci/misc: PCI: Fix kernel-doc build warning PCI: Move PCI_QUIRKS to the PCI bus menu alpha/PCI: Make pdev_save_srm_config() static PCI: Remove unused declarations PCI: Remove redundant pci_dev, pci_bus, resource declarations PCI: Remove redundant pcibios_set_master() declarations PCI/PME: Handle invalid data when reading Root Status x86/pci/intel_mid_pci: Constify intel_mid_pci_ops and make it __initconst PCI: Constify pci_dev_type structure commit 8d666e53e07ac4562eb8ef73c1904d88522fcb8b Merge: 1a03bac db63d40 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:22 2017 -0600 Merge branch 'pci/hotplug' into next * pci/hotplug: PCI: pciehp: Do not clear Presence Detect Changed during initialization PCI: pciehp: Fix race condition handling surprise link down PCI: Distribute available resources to hotplug-capable bridges PCI: Distribute available buses to hotplug-capable bridges PCI: Do not allocate more buses than available in parent PCI: Open-code the two pass loop when scanning bridges PCI: Move pci_hp_add_bridge() to drivers/pci/probe.c PCI: Add for_each_pci_bridge() helper PCI: shpchp: Convert timers to use timer_setup() PCI: cpqphp: Convert timers to use timer_setup() PCI: pciehp: Convert timers to use timer_setup() PCI: ibmphp: Use common error handling code in unconfigure_boot_device() commit 1a03bac30341dcf98c0d7d181c52edcff7e248c5 Merge: 9c42da5 b7636e8 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:21 2017 -0600 Merge branch 'pci/endpoint' into next * pci/endpoint: misc: pci_endpoint_test: Fix BUG_ON error during pci_disable_msi() misc: pci_endpoint_test: Fix pci_endpoint_test not releasing resources on remove misc: pci_endpoint_test: Fix failure path return values in probe misc: pci_endpoint_test: Avoid triggering a BUG() misc: pci_endpoint_test: Prevent some integer overflows commit 9c42da50c068bd3f54cd6248efd9c92d118918ed Merge: f5b4f7ce a48f3d5 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:20 2017 -0600 Merge branch 'pci/aspm' into next * pci/aspm: PCI/ASPM: Add L1 Substates definitions PCI/ASPM: Reformat ASPM register definitions PCI/ASPM: Use correct capability pointer to program LTR_L1.2_THRESHOLD PCI/ASPM: Account for downstream device's Port Common_Mode_Restore_Time PCI/ASPM: Deal with missing root ports in link state handling commit f5b4f7ce8697209614ca516ed6ceea50e52f9600 Merge: a9a6bb4 86acc79 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:20 2017 -0600 Merge branch 'pci/aer' into next * pci/aer: PCI/AER: Report non-fatal errors only to the affected endpoint commit a9a6bb463353d6d2bc5620ade0fa3efb4ec5efae Merge: 9e66317 a0040c0 Author: Bjorn Helgaas Date: Tue Nov 14 12:11:19 2017 -0600 Merge branch 'pci/acpi' into next * pci/acpi: ACPI / PCI: Bail early in acpi_pci_add_bus() if there is no ACPI handle commit 1d96ad64c945e7c28b48ed93b7a900003dc1a6fa Merge: e8d07fd 67affb7 Author: Stephen Boyd Date: Tue Nov 14 10:07:46 2017 -0800 Merge branch 'clk-uniphier' into clk-next * clk-uniphier: clk: uniphier: fix DAPLL2 clock rate of Pro5 clk: uniphier: fix parent of miodmac clock data commit e8d07fd258a4ab8be7e85de44ffa2e362b49a743 Merge: 4c4fe16 1b5d1a5 Author: Stephen Boyd Date: Tue Nov 14 10:07:45 2017 -0800 Merge branch 'clk-gpio' into clk-next * clk-gpio: clk: clk-gpio: Request GPIO descriptor as LOW clk: clk-gpio: Make GPIO clock provider use descriptors only commit 4c4fe1697162a211ded0ccdde4c78acbbe64b5e8 Merge: eed5815 2fc0a50 Author: Stephen Boyd Date: Tue Nov 14 10:07:44 2017 -0800 Merge branch 'clk-mediatek' into clk-next * clk-mediatek: clk: mediatek: add clock support for MT7622 SoC clk: mediatek: add clocks dt-bindings required header for MT7622 SoC clk: mediatek: add the option for determining PLL source clock dt-bindings: clock: mediatek: document clk bindings for MediaTek MT7622 SoC clk: mediatek: mark mtk_infrasys_init_early __init clk: mediatek: Add MT2712 clock support clk: mediatek: Add dt-bindings for MT2712 clocks dt-bindings: ARM: Mediatek: Document bindings for MT2712 commit eed58151d606e81812448931d952ee39071d1f76 Merge: 8f62040 259bc28 Author: Stephen Boyd Date: Tue Nov 14 10:07:43 2017 -0800 Merge branch 'clk-imx' into clk-next * clk-imx: clk: imx: imx7d: Remove ARM_M0 clock clk: imx: imx7d: Fix parent clock for OCRAM_CLK clk: imx: clk-imx6ul: allow lcdif_pre_sel to change parent rate clk: imx6: refine hdmi_isfr's parent to make HDMI work on i.MX6 SoCs w/o VPU commit 8f620400861a313cfb59a43651a92f815de0da93 Merge: 7a103f0 7066fdd Author: Stephen Boyd Date: Tue Nov 14 10:07:42 2017 -0800 Merge branch 'clk-qcom' into clk-next * clk-qcom: clk: qcom: clk-smd-rpm: add msm8996 rpmclks clk: qcom: Implement RPM clocks for MSM8660/APQ8060 clk: qcom: Update DT bindings for the MSM8660/APQ8060 RPMCC clk: qcom: Elaborate on "active" clocks in the RPM clock bindings clk: qcom: Remove unused RCG ops commit 7a103f02250092df7f25e2a41917e02bf27e2b96 Merge: 2dd850e 92041a9 Author: Stephen Boyd Date: Tue Nov 14 10:07:40 2017 -0800 Merge branch 'clk-at91' into clk-next * clk-at91: clk: at91: utmi: set the mainck rate commit 2dd850ef6e1e525a06b4ba111968199a32844177 Merge: ed9c62f b87206f Author: Stephen Boyd Date: Tue Nov 14 10:07:39 2017 -0800 Merge branch 'clk-devm-provider' into clk-next * clk-devm-provider: clk: qcom: common: Migrate to devm_* APIs for resets and clk providers clk: Add devm_of_clk_add_hw_provider()/del_provider() APIs commit ed9c62f75aef10297fb6da4e24292fb354cb8307 Merge: 3b0da91 0777066 Author: Stephen Boyd Date: Tue Nov 14 10:07:38 2017 -0800 Merge branch 'clk-const' into clk-next * clk-const: clk: make clk_init_data const clk: imx: make clk_ops const clk: mmp: make clk_ops const clk: hisilicon: make clk_ops const clk: mxs: make clk_ops const clk: sirf: make clk_ops const clk: spear: make clk_ops const CLK: SPEAr: make aux_clk_masks structures const CLK: SPEAr: make structure field and function argument as const commit 3b0da91688b64290df7b6a31b515a8c903675525 Merge: bdf6bfb cb92a19 Author: Stephen Boyd Date: Tue Nov 14 10:07:37 2017 -0800 Merge branch 'clk-sunxi' into clk-next * clk-sunxi: clk: sunxi: explicitly request exclusive reset control clk: sunxi: fix build warning commit bdf6bfb3782779c2bfce588fd24956f518f9fd9d Merge: 042e2e9 3320f39 Author: Stephen Boyd Date: Tue Nov 14 10:07:35 2017 -0800 Merge branch 'clk-hikey' into clk-next * clk-hikey: clk: hi3798cv200: correct parent mux clock for 'clk_sdio0_ciu' clk: hisilicon: Delete an error message for a failed memory allocation in hisi_register_clkgate_sep() clk: hi3660: fix incorrect uart3 clock freqency clk: hi6220: mark clock cs_atb_syspll as critical commit 042e2e9c2c8bdd88e30160bfb587f825b0ce5407 Merge: 6705fc9 22ef01a Author: Stephen Boyd Date: Tue Nov 14 10:07:15 2017 -0800 Merge tag 'tegra-for-4.15-clk-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into clk-next Pull tegra clk drivers updates from Thierry Reding: This contains cleanups and minor fixes for the Tegra clock driver. * tag 'tegra-for-4.15-clk-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: clk: tegra: Use readl_relaxed_poll_timeout_atomic() in tegra210_clock_init() clk: tegra: dfll: Fix drvdata overwriting issue clk: tegra: Fix cclk_lp divisor register clk: tegra: Bump SCLK clock rate to 216 MHz clk: tegra: Use common definition of APBDMA clock gate clk: tegra: Correct parent of the APBDMA clock clk: tegra: Add AHB DMA clock entry clk: tegra: Mark APB clock as critical clk: tegra: Make tegra_clk_pll_params __ro_after_init clk: tegra: Fix sor1_out clock implementation clk: tegra: Use tegra_clk_register_periph_data() clk: tegra: Add peripheral clock registration helper clk: tegra: Check BPMP response return code dt-bindings: clock: tegra: Add sor1_out clock firmware: tegra: Propagate error code to caller commit 67affb78a4e4feb837953e3434c8402a5c3b272f Author: Masahiro Yamada Date: Thu Oct 5 11:32:59 2017 +0900 clk: uniphier: fix DAPLL2 clock rate of Pro5 The parent of DAPLL2 should be DAPLL1. Fix the clock connection. Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a5dfa7d78976fd712b63b3db4357d94dcd3c5ba Author: Masahiro Yamada Date: Thu Oct 19 09:52:46 2017 +0900 clk: uniphier: fix parent of miodmac clock data The "miodmac" is not a child of "stdmac". They are independent from each other. Fix it. Signed-off-by: Masahiro Yamada Signed-off-by: Stephen Boyd drivers/clk/uniphier/clk-uniphier-mio.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 3320f39bee899b68d4f35220764b2ab213374708 Author: Shawn Guo Date: Wed Sep 27 11:59:40 2017 -0700 clk: hi3798cv200: correct parent mux clock for 'clk_sdio0_ciu' Other than 'mmc_mux', 'clk_sdio0_ciu' uses a different parent mux clock. Let's add this mux clock as 'sdio0_mux', and correct the parent of 'clk_sdio0_ciu' to be it. Signed-off-by: Shawn Guo Signed-off-by: Stephen Boyd drivers/clk/hisilicon/crg-hi3798cv200.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 90c42090c0da3a77057ba777e2d3f8d16e55aabc Author: Markus Elfring Date: Tue Sep 26 22:00:05 2017 +0200 clk: hisilicon: Delete an error message for a failed memory allocation in hisi_register_clkgate_sep() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Leo Yan Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clkgate-separated.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d33fb1b9f0fcb67f2b9f8b1891465a088a9480f8 Author: Zhong Kaihua Date: Mon Aug 7 22:51:56 2017 +0800 clk: hi3660: fix incorrect uart3 clock freqency UART3 clock rate is doubled in previous commit. This error is not detected until recently a mezzanine board which makes real use of uart3 port (through LS connector of 96boards) was setup and tested on hi3660-hikey960 board. This patch changes clock source rate of clk_factor_uart3 to 100000000. Signed-off-by: Zhong Kaihua Signed-off-by: Guodong Xu Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clk-hi3660.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b277247b1df177a7a60f0601ebe3dc952e5dd54 Author: Christian König Date: Mon Nov 13 17:20:50 2017 +0100 drm/amdgpu: set f_mapping on exported DMA-bufs Otherwise we can't correctly CPU map TTM buffers. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c5066129af4436ab0da8eefe4289774a5409706d Author: ozeng Date: Tue Jun 6 10:53:28 2017 -0500 drm/amdgpu: Properly allocate VM invalidate eng v2 v1: Properly allocate TLB invalidation engine to avoid conflict. v2: Added comments to codes Signed-off-by: Oak Zeng Reviewed-by: Alex Deucher Acked-by: Christian Konig Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 00f713c6dc657397ba37b42d7f6887f526c730c6 Author: Eric Yang Date: Wed Nov 1 15:43:47 2017 -0400 drm/amd/display: fix MST link training fail division by 0 When link training fail in MST case, we will divide by 0 when calculating avg_time_slots_per_mtp, so we cannot proceed. Signed-off-by: Eric Yang Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 82e9781053c8a6aa3515aea3ade76546afb4c082 Author: Harry Wentland Date: Thu Oct 26 11:47:42 2017 +0530 drm/amd/display: Fix formatting for null pointer dereference fix Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 524bed9a2b9f7d7f9aa5f62547b1faec2f9bab35 Author: Leo (Sunpeng) Li Date: Tue Nov 7 13:21:02 2017 -0500 drm/amd/display: Remove dangling planes on dc commit state When disabling pipe splitting, we need to make sure we disable both planes used. This should be done for Linux as well. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 37 ++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) commit 3f0260f6fb86cdb35bf8e6974d50453e7b7f8e40 Author: Bhawanpreet Lakha Date: Tue Oct 31 14:39:36 2017 -0400 drm/amd/display: add flip_immediate to commit update for stream This struct is not updated on page flip and causes vblank_mode to not work as expected Signed-off-by: Bhawanpreet Lakha Reviewed-by: Tony Cheng Acked-by: Harry Wentland Tested-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4fc6f65965481bd2cdb8827a6fd991ed076b1006 Author: Jerry (Fangzhi) Zuo Date: Fri Nov 3 14:19:06 2017 -0400 drm/amd/display: Miss register MST encoder cbs It is to fix: MST display failed to resume from S3 Need to properly setup MST encoder cbs. Otherwise drm_device encoder doesn't register its own cbs, leading to NULL encoder->funcs in drm_atomic_helper_resume(). Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit fcb4019e090b959dbcbfc7bbbc1ebd99c924fa11 Author: Leo (Sunpeng) Li Date: Wed Nov 1 16:49:14 2017 -0400 drm/amd/display: Fix warnings on S3 resume This is a followup to the following revert: Rex Zhu Revert "drm/amd/display: Match actual state during S3 resume." Three things needed to be addressed: 1. Potential memory leak on dc_state creation in atomic_check during s3 resume 2. Warnings are now seen in dmesg during S3 resume 3. Since dc_state is now created in atomic_check, what the reverted patch was addressing needs to be reevaluated. This change addresses the above: 1. Since the suspend procedure calls drm_atomic_state_clear, our hook for releasing the dc_state is called. This frees it before atomic_check creates it during resume. The leak does not occur. 2. The dc_crtc/plane_state references kept by the atomic states need to be released before calling atomic_check, which warns if they are non-null. This is because atomic_check is responsible for creating the dc_*_states. This is a special case for S3 resume, since the atomic state duplication that occurs during suspend also copies a reference to the dc_*_states. 3. See 2. comments are also updated to reflect this. Reviewed-by: Andrey Grodzovsky Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 9fd99f4f3f5e13ce959900ae57d64b1bdb51d823 Author: Stefan Agner Date: Fri Nov 10 10:15:28 2017 +0100 drm/fsl-dcu: enable IRQ before drm_atomic_helper_resume() The resume helpers wait for a vblank to occurre hence IRQ need to be enabled. This avoids a warning as follows during resume: WARNING: CPU: 0 PID: 314 at drivers/gpu/drm/drm_atomic_helper.c:1249 drm_atomic_helper_wait_for_vblanks.part.1+0x284/0x288 [CRTC:28:crtc-0] vblank wait timed out Signed-off-by: Stefan Agner drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9306e996574f7f57136a62e49cd0075f85713623 Author: Stefan Agner Date: Thu Nov 9 15:39:56 2017 +0100 drm/fsl-dcu: avoid disabling pixel clock twice on suspend With commit 0a70c998d0c5 ("drm/fsl-dcu: enable pixel clock when enabling CRTC") the pixel clock is controlled by the CRTC code. Disabling the pixel clock in suspend leads to a warning due to the second clk_disable_unprepare call: WARNING: CPU: 0 PID: 359 at drivers/clk/clk.c:594 clk_core_disable+0x8c/0x90 Remove clk_disable_unprepare call for pixel clock to avoid unbalanced clock disable on suspend. Fixes: 0a70c998d0c5 ("drm/fsl-dcu: enable pixel clock when enabling CRTC") Signed-off-by: Stefan Agner drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 1 - 1 file changed, 1 deletion(-) commit daee54263c1202cbdab85c5e15ae30b417602efb Author: Laurent Pinchart Date: Fri Nov 10 17:38:34 2017 +0100 drm/fsl-dcu: Don't set connector DPMS property Since commit 4a97a3da420b ("drm: Don't update property values for atomic drivers") atomic drivers must not update property values as properties are read from the state instead. To catch remaining users, the drm_object_property_set_value() function now throws a warning when called by atomic drivers on non-immutable properties, and we hit that warning when creating connectors. The easy fix is to just remove the drm_object_property_set_value() as it is used here to set the initial value of the connector's DPMS property to OFF. The DPMS property applies on top of the connector's state crtc pointer (initialized to NULL) that is the main connector on/off control, and should thus default to ON. Fixes: 4a97a3da420b ("drm: Don't update property values for atomic drivers") Cc: stable@vger.kernel.org Signed-off-by: Laurent Pinchart Signed-off-by: Stefan Agner drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 5 ----- 1 file changed, 5 deletions(-) commit bb9fbe1b57503f790dbbf9f06e72cb0fb9e60740 Author: Kan Liang Date: Tue Nov 14 06:06:40 2017 -0800 perf/x86/intel/uncore: Add event constraint for BDX PCU Event select bit 7 'Use Occupancy' in PCU Box is not available for counter 0 on BDX Add a constraint to fix it. Reported-by: Stephane Eranian Signed-off-by: Kan Liang Signed-off-by: Thomas Gleixner Tested-by: Stephane Eranian Cc: peterz@infradead.org Cc: ak@linux.intel.com Link: https://lkml.kernel.org/r/1510668400-301000-1-git-send-email-kan.liang@intel.com arch/x86/events/intel/uncore_snbep.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f2ecc3d0787e05d9145722feed01d4a11ab6bec1 Merge: b1cb737 c14dd9d Author: Mauro Carvalho Chehab Date: Tue Nov 14 10:47:01 2017 -0500 Merge tag 'staging-4.15-rc1' into v4l_for_linus There are some conflicts between staging and media trees, as reported by Stephen Rothwell . So, merge from staging. * tag 'staging-4.15-rc1': (775 commits) staging: lustre: add SPDX identifiers to all lustre files staging: greybus: Remove redundant license text staging: greybus: add SPDX identifiers to all greybus driver files staging: ccree: simplify ioread/iowrite staging: ccree: simplify registers access staging: ccree: simplify error handling logic staging: ccree: remove dead code staging: ccree: handle limiting of DMA masks staging: ccree: copy IV to DMAable memory staging: fbtft: remove redundant initialization of buf staging: sm750fb: Fix parameter mistake in poke32 staging: wilc1000: Fix bssid buffer offset in Txq staging: fbtft: fb_ssd1331: fix mirrored display staging: android: Fix checkpatch.pl error staging: greybus: loopback: convert loopback to use generic async operations staging: greybus: operation: add private data with get/set accessors staging: greybus: loopback: Fix iteration count on async path staging: greybus: loopback: Hold per-connection mutex across operations staging: greybus/loopback: use ktime_get() for time intervals staging: fsl-dpaa2/eth: Extra headroom in RX buffers ... Signed-off-by: Mauro Carvalho Chehab commit 1f90a2162fb3cdfd9c44380bf16209af00f7acbe Author: Arvind Yadav Date: Sat Nov 11 23:39:18 2017 +0530 mailbox/omap: unregister mbox class platform_driver_register() can fail here and we must unregister mbox class. Signed-off-by: Arvind Yadav Acked-by: Suman Anna Signed-off-by: Jassi Brar drivers/mailbox/omap-mailbox.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e339c80af95e14de3712d69ddea09a3868fa14cd Author: Sudeep Holla Date: Thu Sep 28 11:18:53 2017 +0100 mailbox: mailbox-test: don't rely on rx_buffer content to signal data ready Currently we rely on the first byte of the Rx buffer to check if there's any data available to be read. If the first byte of the received buffer is zero (i.e. null character), then we fail to signal that data is available even when it's available. Instead introduce a boolean variable to track the data availability and update it in the channel receive callback as ready and clear it when the data is read. Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar drivers/mailbox/mailbox-test.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 33cd7123ac0ba5360656ae27db453de5b9aa711f Author: Sudeep Holla Date: Thu Sep 28 11:18:52 2017 +0100 mailbox: reset txdone_method TXDONE_BY_POLL if client knows_txdone Currently the mailbox framework sets txdone_method to TXDONE_BY_POLL if the controller sets txdone_by_poll. However some clients can have a mechanism to do TXDONE_BY_ACK which they can specify by knows_txdone. However, we endup setting both TXDONE_BY_POLL and TXDONE_BY_ACK in that case. In such scenario, we may end up with below warnings as the tx ticker is run both by mailbox framework and the client. WARNING: CPU: 1 PID: 0 at kernel/time/hrtimer.c:805 hrtimer_forward+0x88/0xd8 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.12.0-rc5 #242 Hardware name: ARM LTD ARM Juno Development Platform task: ffff8009768ca700 task.stack: ffff8009768f8000 PC is at hrtimer_forward+0x88/0xd8 LR is at txdone_hrtimer+0xd4/0xf8 Call trace: hrtimer_forward+0x88/0xd8 __hrtimer_run_queues+0xe4/0x158 hrtimer_interrupt+0xa4/0x220 arch_timer_handler_phys+0x30/0x40 handle_percpu_devid_irq+0x78/0x130 generic_handle_irq+0x24/0x38 __handle_domain_irq+0x5c/0xb8 gic_handle_irq+0x54/0xa8 This patch fixes the issue by resetting TXDONE_BY_POLL if client has set knows_txdone. Cc: Alexey Klimov Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar drivers/mailbox/mailbox.c | 4 ++-- drivers/mailbox/pcc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit a48f3d5b197494d903c97ff7bc0909dac65740f8 Author: Bjorn Helgaas Date: Mon Nov 13 08:36:40 2017 -0600 PCI/ASPM: Add L1 Substates definitions Add and use #defines for L1 Substate register fields instead of hard-coding the masks. Also update comments to use names from the spec. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Vidya Sagar drivers/pci/pcie/aspm.c | 34 ++++++++++++++++++++-------------- include/uapi/linux/pci_regs.h | 6 ++++++ 2 files changed, 26 insertions(+), 14 deletions(-) commit 7f88ba4a19b91d310eca836b647edeb100c61c8d Author: Bjorn Helgaas Date: Fri Nov 10 15:13:10 2017 -0600 PCI/ASPM: Reformat ASPM register definitions Reformat register field definitions in the style used elsewhere and align comments with names used in the spec. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Vidya Sagar include/uapi/linux/pci_regs.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit c00054f540bf81e592e1fee709b0bdbf20f478b5 Author: Bjorn Helgaas Date: Mon Nov 13 15:05:50 2017 -0600 PCI/ASPM: Use correct capability pointer to program LTR_L1.2_THRESHOLD Previously we programmed the LTR_L1.2_THRESHOLD in the parent (upstream) device using the capability pointer of the *child* (downstream) device, which corrupted some random word of the parent's config space. Use the parent's L1 SS capability pointer to program its LTR_L1.2_THRESHOLD. Fixes: aeda9adebab8 ("PCI/ASPM: Configure L1 substate settings") Signed-off-by: Bjorn Helgaas Reviewed-by: Vidya Sagar CC: stable@vger.kernel.org # v4.11+ CC: Rajat Jain drivers/pci/pcie/aspm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6851ba1a1b22ba2e0800002d531bf04ced22ec18 Author: Julia Lawall Date: Sun Nov 12 16:02:18 2017 +0100 coccinelle: use exists to improve efficiency This just needs to find any reassignment of the loop iterator, and doesn't need such a thing on all execution paths, so use exists on the first rule. Signed-off-by: Julia Lawall Signed-off-by: Masahiro Yamada scripts/coccinelle/iterators/list_entry_update.cocci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bace64800bae72c563bab66f23c7221fddaae142 Author: Sven Joachim Date: Thu Nov 9 19:27:06 2017 +0100 builddeb: Pass the kernel:debarch substvar to dpkg-genchanges At the end of "make bindeb-pkg" I noticed the following warning: dpkg-genchanges: warning: unknown substitution variable ${kernel:debarch} It turns out that since dpkg version 1.19.0 dpkg-genchanges honors substitution variables in the Description field, while earlier versions silently left them alone, see https://bugs.debian.org/856547. The result is an incomplete description of the linux-headers package in the generated .changes file. Fix it by passing the kernel:debarch substitution variable to dpkg-genchanges. Signed-off-by: Sven Joachim Signed-off-by: Masahiro Yamada scripts/package/builddeb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 69c4907ba1ee9e9428363c9419c9116bb28c402c Author: Julia Lawall Date: Sun Oct 29 01:43:09 2017 +0200 Coccinelle: use false positive annotation /// is to describe the semantic patch, while //# indicates reasons for false positives. Signed-off-by: Julia Lawall Signed-off-by: Masahiro Yamada scripts/coccinelle/misc/ifcol.cocci | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cd1af7cfbbdc7719b74ad9f3c88e50bb77713664 Author: Masahiro Yamada Date: Thu Oct 26 13:55:51 2017 +0900 coccinelle: fix verbose message about .cocci file being run If you run coccicheck with V=1 and COCCI=, you will see a strange path to the semantic patch file. For example, run the following: $ make V=1 COCCI=scripts/coccinelle/free/kfree.cocci coccicheck [ snip ] The semantic patch that makes this report is available in scriptcoccinelle/free/kfree.cocci. Notice "s/" was dropped from "scripts/coccinelle/free/kfree.cocci". When running coccicheck without O=, $srctree is expanded to ".", which represents one arbitrary character in the regular expression. Using sed is not a good choice here. Strip $srctree/ simply without sed. Signed-off-by: Masahiro Yamada Acked-by: Nicolas Palix scripts/coccicheck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0be348e4d6ebd660c9558bcee50f648491cfef6 Author: Masahiro Yamada Date: Thu Oct 26 13:50:38 2017 +0900 coccinelle: grep Options and Requires fields more precisely Currently, the required version for badzero.cocci is picked up from its "Comments:" line since it contains the word "Requires". Surprisingly, ld-version.sh can extract the version number from the string "Requires Coccinelle version 1.0.0-rc20 or later", but this expectation is fragile. Fix the .cocci file. I removed "-rc20" because ld-version.sh cannot handle it. Make the coccicheck script to see exact patterns for "Options:" and "Requires:" in order to avoid accidental matching to what just happens to appear in comment lines. Signed-off-by: Masahiro Yamada Acked-by: Julia Lawall Acked-by: Nicolas Palix scripts/coccicheck | 4 ++-- scripts/coccinelle/null/badzero.cocci | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 9ed07ada0e1476a676450056a20226b88076025e Author: Julia Lawall Date: Sun Oct 15 11:55:53 2017 +0200 Coccinelle: make DEBUG_FILE option more useful Make coccicheck checked for the existence of DEBUG_FILE on each semantic patch, and bailed if it already existed. This meant that DEBUG_FILE was useless for checking more than one semantic patch at a time. Now the check is moved to the start of make coccicheck, and the 2> is changed to a 2>> to append to the file on each semantic patch. Furthermore, the spatch command that is run for each semantic patch is also added to the DEBUG_FILE, to make clear what each stdout trace corresponds to. Signed-off-by: Julia Lawall Signed-off-by: Masahiro Yamada scripts/coccicheck | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit a44b86645a4a173a45e57d127ac037e88750ea6a Author: Julia Lawall Date: Sun Oct 8 21:18:41 2017 +0200 coccinelle: api: detect identical chip data arrays This semantic patch detects duplicate arrays declared using BQ27XXX_DATA within a single structure. It is currently specific to the file drivers/power/supply/bq27xxx_battery.c. Nevertheless, having the script in the kernel will allow others to check their code if the data structures change in the future. Signed-off-by: Julia Lawall Signed-off-by: Masahiro Yamada scripts/coccinelle/api/check_bq27xxx_data.cocci | 161 ++++++++++++++++++++++++ 1 file changed, 161 insertions(+) commit 1b18d05c7c204a59e0ac66cbfa813a7173c4426e Author: Kees Cook Date: Wed Sep 20 16:27:25 2017 -0700 coccinelle: Improve setup_timer.cocci matching This improves the patch mode of setup_timer.cocci. Several patterns were missing: - assignments-before-init_timer() cases - limit the .data case removal to the specific struct timer_list instance - handling calls by dereference (timer->field vs timer.field) Cc: Gilles Muller Cc: Nicolas Palix Cc: Michal Marek Cc: cocci@systeme.lip6.fr Signed-off-by: Kees Cook Acked-by: Julia Lawall Signed-off-by: Masahiro Yamada scripts/coccinelle/api/setup_timer.cocci | 129 +++++++++++++++++++++++++------ 1 file changed, 105 insertions(+), 24 deletions(-) commit bc27b77df1939b9567aa468c47d4a5784f40cfa1 Author: Julia Lawall Date: Wed Aug 23 15:11:13 2017 +0200 Coccinelle: setup_timer: improve messages from setup_timer Allow messages about multiple timers. Signed-off-by: Julia Lawall Signed-off-by: Masahiro Yamada scripts/coccinelle/api/setup_timer.cocci | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 8a16a070abaa61e95354755a320ca37cee544209 Author: Masahiro Yamada Date: Sat Sep 30 10:10:11 2017 +0900 kbuild: rpm-pkg: do not force -jN in submake The spec file always passes %{?_smp_mflags}, but we have two problems here. [1] "make -jN rpm-pkg" emits the following warning message: make[2]: warning: -jN forced in submake: disabling jobserver mode. [2] We can not specify the number of jobs that run in parallel. Whether we give -jN or not from the top Makefile, the spec file always passes ${?_smp_mflags} to the build commands. ${?_smp_mflags} will be useful when we run rpmbuild by hand. When we invoke it from Makefile, -jN is propagated down to submake; it should not be overridden because we want to respect the number of jobs given by the user. Set _smp_mflags to empty string in this case. Signed-off-by: Masahiro Yamada scripts/package/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit af60e207087975d069858741c44ed4f450330ac4 Author: Masahiro Yamada Date: Sat Sep 30 10:10:10 2017 +0900 kbuild: rpm-pkg: keep spec file until make mrproper If build fails during (bin)rpm-pkg, the spec file is not cleaned by anyone until the next successful build of the package. We do not have to immediately delete the spec file in case somebody may want to take a look at it. Instead, make them ignored by git, and cleaned up by make mrproper. Signed-off-by: Masahiro Yamada .gitignore | 5 +++++ scripts/package/Makefile | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 606625be47bc87b6fab0af10cd57aaa675cb9e42 Author: Masahiro Yamada Date: Sat Sep 30 10:10:09 2017 +0900 kbuild: rpm-pkg: fix jobserver unavailable warning If "make rpm-pkg" or "make binrpm-pkg" is run with -j[jobs] option, the following warning message is displayed. warning: jobserver unavailable: using -j1. Add '+' to parent make rule. Follow the suggestion. Signed-off-by: Masahiro Yamada scripts/package/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 002494d87d51cb87a4dd7bd11743113cd759e714 Author: Masahiro Yamada Date: Sat Sep 30 10:10:08 2017 +0900 kbuild: rpm-pkg: replace $RPM_BUILD_ROOT with %{buildroot} $RPM_BUILD_ROOT must be escaped to prevent shell from expanding it when generating the spec file. %{build_root} is more readable than \$RPM_BUILD_ROOT. Signed-off-by: Masahiro Yamada scripts/package/mkspec | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 0b7f12f5912de636a9c1671ee343f31f21c42b2f Author: Masahiro Yamada Date: Sat Sep 30 10:10:07 2017 +0900 kbuild: rpm-pkg: fix build error when CONFIG_MODULES is disabled When CONFIG_MODULES is disabled, make rpm-pkg / binrpm-pkg fails with the following message: The present kernel configuration has modules disabled. Type 'make config' and enable loadable module support. Then build a kernel with module support enabled. Do not install modules in the case. Also, omit the devel package. Signed-off-by: Masahiro Yamada scripts/package/mkspec | 57 ++++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 25 deletions(-) commit 8c5d4b648b46b3f5b721b9aff021c9f639d42c35 Author: Masahiro Yamada Date: Sat Sep 30 10:10:06 2017 +0900 kbuild: rpm-pkg: refactor mkspec with here doc The repeat of echo is unreadable. The here-document is a well-known device for such scripts. One difficulty is we have a bunch of PREBUILT conditionals that would split the here-document. My idea is to add "$S" annotatation to lines only for the source package spec file, then post-process it by sed. I hope it will make our life easier than repeat of "cat < scripts/package/mkspec | 218 ++++++++++++++++++++++++------------------------- 1 file changed, 105 insertions(+), 113 deletions(-) commit 4e897f5bb9af5a1d4da07ae0c6598c6ee4e08471 Author: Jeff Layton Date: Tue Nov 14 08:42:28 2017 -0500 MAINTAINERS: s/jlayton@poochiereds.net/jlayton@kernel.org/ I may go through a mail re-org in the not-too-distant future, but my kernel.org address should remain valid throughout any transition. Signed-off-by: Jeff Layton MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4497478c60c04d2bf37082e27fc98f4f835db96b Author: Niklas Cassel Date: Tue Nov 14 11:15:54 2017 +0100 net: stmmac: fix LPI transitioning for dwmac4 The LPI transitioning logic in stmmac_main uses priv->tx_path_in_lpi_mode to enter/exit LPI. However, priv->tx_path_in_lpi_mode is assigned using the return value from host_irq_status(). So for dwmac4, priv->tx_path_in_lpi_mode was always false, so stmmac_tx_clean() would always try to put us in eee mode, and stmmac_xmit() would never take us out of eee mode. To fix this, make host_irq_status() read and return the LPI irq status also for dwmac4. This also increments the existing LPI counters, so that ethtool --statistics shows LPI transitions also for dwmac4. For dwmac1000, irqs are enabled/disabled using the register named "Interrupt Mask Register", and thus setting a bit disables that specific irq. For dwmac4 the matching register is named "MAC_Interrupt_Enable", and thus setting a bit enables that specific irq. Looking at dwmac1000_core.c, the irqs that are always enabled are: LPI and PMT. Looking at dwmac4_core.c, the irqs that are always enabled are: PMT. To be able to read the LPI irq status, we need to enable the LPI irq also for dwmac4. Signed-off-by: Niklas Cassel Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 7 ++++++- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) commit bde533f2ea607cbbbe76ef8738b36243939a7bc2 Author: Arvind Yadav Date: Tue Nov 14 13:42:38 2017 +0530 atm: horizon: Fix irq release error atm_dev_register() can fail here and passed parameters to free irq which is not initialised. Initialization of 'dev->irq' happened after the 'goto out_free_irq'. So using 'irq' insted of 'dev->irq' in free_irq(). Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/atm/horizon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c92eb77aff6a11c79059e2caffdd3baede218a9e Author: Roopa Prabhu Date: Mon Nov 13 23:21:36 2017 -0800 net-sysfs: trigger netlink notification on ifalias change via sysfs This patch adds netlink notifications on iflias changes via sysfs. makes it consistent with the netlink path which also calls netdev_state_change. Also makes it consistent with other sysfs netdev_store operations. Signed-off-by: Roopa Prabhu Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller net/core/net-sysfs.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 6dc14dc40a1d1dafd8491c349b5f3e15aabc4edb Author: Wei Yongjun Date: Tue Nov 14 06:27:12 2017 +0000 openvswitch: Using kfree_rcu() to simplify the code The callback function of call_rcu() just calls a kfree(), so we can use kfree_rcu() instead of call_rcu() + callback function. Signed-off-by: Wei Yongjun Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/meter.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 06c2351fdebb38803f10ace19ed8daf9b9c91e12 Author: Wei Yongjun Date: Tue Nov 14 06:27:03 2017 +0000 openvswitch: Make local function ovs_nsh_key_attr_size() static Fixes the following sparse warnings: net/openvswitch/flow_netlink.c:340:8: warning: symbol 'ovs_nsh_key_attr_size' was not declared. Should it be static? Signed-off-by: Wei Yongjun Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/flow_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a860c2bcc84a8e4fbcabb928cd97e4c51b17d93 Author: Wei Yongjun Date: Tue Nov 14 06:20:16 2017 +0000 openvswitch: Fix return value check in ovs_meter_cmd_features() In case of error, the function ovs_meter_cmd_reply_start() returns ERR_PTR() not NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 96fbc13d7e77 ("openvswitch: Add meter infrastructure") Signed-off-by: Wei Yongjun Acked-by: Pravin B Shelar Signed-off-by: David S. Miller net/openvswitch/meter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 228aa0121c8897d97fd0864d4ee4851545f7ebac Author: Dan Carpenter Date: Tue Nov 14 09:14:17 2017 +0300 liquidio: Missing error code in liquidio_init_nic_module() We accidentally return success if lio_vf_rep_modinit() fails instead of propogating the error code. Fixes: e20f469660ad ("liquidio: synchronize VF representor names with NIC firmware") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fae45363ae4bac980b1d7451233c7bf3d66d9300 Author: Dan Carpenter Date: Tue Nov 14 09:12:03 2017 +0300 xdp: sample: Missing curly braces in read_route() The assert statement is supposed to be part of the else branch but the curly braces were accidentally left off. Fixes: 3e29cd0e6563 ("xdp: Sample xdp program implementing ip forward") Signed-off-by: Dan Carpenter Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/xdp_router_ipv4_user.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4e6759be28e4e69c397ab58c1e780b0a15d8a6fd Author: Desnes Augusto Nunes do Rosario Date: Mon Nov 13 15:59:19 2017 -0200 ibmvnic: Feature implementation of Vital Product Data (VPD) for the ibmvnic driver This patch implements and enables VDP support for the ibmvnic driver. Moreover, it includes the implementation of suitable structs, signal transmission/handling and functions which allows the retrival of firmware information from the ibmvnic card through the ethtool command. Signed-off-by: Desnes A. Nunes do Rosario Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 153 ++++++++++++++++++++++++++++++++++++- drivers/net/ethernet/ibm/ibmvnic.h | 27 ++++++- 2 files changed, 176 insertions(+), 4 deletions(-) commit fbec443bfe44f58a40e00962e969b5a9cafde457 Author: Nikolay Aleksandrov Date: Mon Nov 13 18:30:55 2017 +0200 net: bridge: add vlan_tunnel to bridge port policies Found another missing port flag policy entry for IFLA_BRPORT_VLAN_TUNNEL so add it now. CC: Roopa Prabhu Fixes: efa5356b0d97 ("bridge: per vlan dst_metadata netlink support") Signed-off-by: Nikolay Aleksandrov Acked-by: Roopa Prabhu Signed-off-by: David S. Miller net/bridge/br_netlink.c | 1 + 1 file changed, 1 insertion(+) commit 0d63785c6b94b5d2f095f90755825f90eea791f5 Author: Simon Guinot Date: Mon Nov 13 16:27:02 2017 +0100 net: mvneta: fix handling of the Tx descriptor counter The mvneta controller provides a 8-bit register to update the pending Tx descriptor counter. Then, a maximum of 255 Tx descriptors can be added at once. In the current code the mvneta_txq_pend_desc_add function assumes the caller takes care of this limit. But it is not the case. In some situations (xmit_more flag), more than 255 descriptors are added. When this happens, the Tx descriptor counter register is updated with a wrong value, which breaks the whole Tx queue management. This patch fixes the issue by allowing the mvneta_txq_pend_desc_add function to process more than 255 Tx descriptors. Fixes: 2a90f7e1d5d0 ("net: mvneta: add xmit_more support") Cc: stable@vger.kernel.org # 4.11+ Signed-off-by: Simon Guinot Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 096d1dd0f03211fb42d6c2457f248827604b7f0e Author: Johannes Berg Date: Mon Nov 13 16:19:46 2017 +0100 netlink: remove unused NETLINK SKB flags These flags are unused, remove them to be less confusing. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller include/linux/netlink.h | 3 --- 1 file changed, 3 deletions(-) commit 0c4b9169781cf15c4c1b9171dab98ff96d5c7fd7 Author: Johannes Berg Date: Mon Nov 13 15:57:30 2017 +0100 netlink: remove unnecessary forward declaration netlink_skb_destructor() is actually defined before the first usage in the file, so remove the unnecessary forward declaration. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller net/netlink/af_netlink.c | 1 - 1 file changed, 1 deletion(-) commit 1a48fbd9ec1483f5bf3da63dfd907f4272828b4a Author: Egil Hjelmeland Date: Mon Nov 13 14:25:25 2017 +0100 net: dsa: lan9303: calculate offload_fwd_mark from tag The lan9303 set bits in the host CPU tag indicating if a ingress frame is a trapped IGMP or STP frame. Use these bits to calculate skb->offload_fwd_mark more efficiently. Signed-off-by: Egil Hjelmeland Signed-off-by: David S. Miller net/dsa/tag_lan9303.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit 887c3820a3801a117a494aeca147ec52f95e1566 Author: Salil Mehta Date: Mon Nov 13 11:39:38 2017 +0000 net: hns3: Updates MSI/MSI-X alloc/free APIs(depricated) to new APIs This patch migrates the HNS3 driver code from use of depricated PCI MSI/MSI-X interrupt vector allocation/free APIs to new common APIs. Signed-off-by: Salil Mehta Suggested-by: Christoph Hellwig Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 107 +++++++-------------- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 17 ++-- 2 files changed, 43 insertions(+), 81 deletions(-) commit 97438abcfb80656d4aedaca21b8ff8db4fcc93a1 Author: Pan Bian Date: Sun Nov 12 23:38:09 2017 +0800 net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional Function devm_gpiod_get_optional() returns an ERR_PTR on failure. Its return value should not be validated by a NULL check. Instead, use IS_ERR. Signed-off-by: Pan Bian Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/lan9303-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3697d058b08d5b874f0253de173ef72e5d648f9a Author: Heiner Kallweit Date: Sun Nov 12 16:16:04 2017 +0100 net: phy: realtek: fix RTL8211F interrupt mode After commit b94d22d94ad22 "ARM64: dts: meson-gx: add external PHY interrupt on some platforms" ethernet stopped working on my Odroid-C2 which has a RTL8211F phy. It turned out that no interrupts were triggered. Further analysis showed the register INER can't be altered on page 0. Because register INSR needs to be accessed via page 0xa43 I assumed that register INER needs to be accessed via some page too. Some brute force check resulted in page 0xa42 being the right one. With this patch the phy is working properly in interrupt mode. Fixes: 3447cf2e9a11 ("net/phy: Add support for Realtek RTL8211F") Signed-off-by: Heiner Kallweit Tested-by: Jerome Brunet Signed-off-by: David S. Miller drivers/net/phy/realtek.c | 2 ++ 1 file changed, 2 insertions(+) commit 0522bab1aba552ad47f363df05bfa5d2dba80fa6 Merge: 8983487 63dd00f Author: David S. Miller Date: Tue Nov 14 21:17:08 2017 +0900 Merge branch 'mlxsw-Update-firmware-version' Jiri Pirko says: ==================== mlxsw: Update firmware version Ido says: This set adjusts the driver to use a new firmware version. The new version includes various enhancements and fixes detailed in the first patch. The second patch enables batch deletion of neighbours on a router interface (RIF) which was not possible with previous versions. ==================== Signed-off-by: David S. Miller commit 63dd00fa3e524c27cc0509190084ab147ecc8ae2 Author: Ido Schimmel Date: Sun Nov 12 09:02:56 2017 +0100 mlxsw: spectrum_router: Add batch neighbour deletion In commit 4a3c67a6e7cd ("mlxsw: spectrum_router: Don't batch neighbour deletion") I removed the support for batch deletion of neighbours on a router interface (RIF) since at that time the firmware did not support it for IPv6 neighbours. This is now supported by the version enforced by the driver, so there is no reason to delete neighbours one by one anymore. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 2f53fbd521825078c0b801d416702cdd877af262 Author: Shalom Toledo Date: Sun Nov 12 09:01:24 2017 +0100 mlxsw: spectrum: Update minimum firmware version to 13.1530.152 This new firmware contains: - Support Spectrum A1 revision - Batch deletion of IPv6 neighbours - Remove incorrect VPD capability Signed-off-by: Shalom Toledo Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8983487f5e4e377cfc873160f4b557907debd286 Author: Harald Welte Date: Mon Nov 13 07:21:34 2017 +0900 net: Mention net-next status web page in netdev-FAQ.txt According to https://www.mail-archive.com/netdev@vger.kernel.org/msg177411.html there is a status page available at http://vger.kernel.org/~davem/net-next.html to obtain the current status of the net-next tree. Let's add this information to the netdev FAQ. Signed-off-by: Harald Welte Signed-off-by: David S. Miller Documentation/networking/netdev-FAQ.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3ba88c477bac891a53ba5a0efb351285297a5e5b Author: Harald Welte Date: Mon Nov 13 07:18:45 2017 +0900 net: Extend Kernel GTP-U tunneling documentation * clarify specification references for v0/v1 * add section "APN vs. Network device" * add section "Local GTP-U entity and tunnel identification" Signed-off-by: Andreas Schultz Signed-off-by: Harald Welte Signed-off-by: David S. Miller Documentation/networking/gtp.txt | 103 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 99 insertions(+), 4 deletions(-) commit 09e15086936e01d7588020be37ea724116bcefec Author: Xiongfeng Wang Date: Thu Nov 9 14:22:39 2017 +0800 ACPI / utils: Fix memory leak in acpi_evaluate_reference() error path When package.count is larger than ACPI_MAX_HANDLES, buffer.pointer is not freed before the function returns AE_NO_MEMORY. Fix this possible memory leak by kfree'ing it. Signed-off-by: Xiongfeng Wang Signed-off-by: Rafael J. Wysocki drivers/acpi/utils.c | 1 + 1 file changed, 1 insertion(+) commit 0e54705b0e01dcaf3eb2a496bb66d5f05012056b Author: Wei Yongjun Date: Tue Nov 14 06:57:28 2017 +0000 irqchip/exiu: Fix return value check in exiu_init() In case of error, the function of_iomap() returns NULL pointer not ERR_PTR(). Replace the IS_ERR() test of the return value with NULL test and return a proper error code. Fixes: 706cffc1b912 ("irqchip/exiu: Add support for Socionext Synquacer EXIU controller") Signed-off-by: Wei Yongjun Signed-off-by: Thomas Gleixner Acked-by: Ard Biesheuvel Cc: Marc Zyngier Cc: Jason Cooper Link: https://lkml.kernel.org/r/1510642648-123574-1-git-send-email-weiyongjun1@huawei.com drivers/irqchip/irq-sni-exiu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 41cc30412d6692c25506bf2d4e65c4364c70c10a Merge: b29c6ef 29f4113 Author: Thomas Gleixner Date: Tue Nov 14 11:23:05 2017 +0100 Merge tag 'irqchip-4.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip updates for 4.15, take #4 from Marc Zyngier - A core irq fix for legacy cases where the irq trigger is not reported by firmware - A couple of GICv3/4 fixes (Kconfig, of-node refcount, error handling) - Trivial pr_err fixes commit aea3706cfc4d952ed6d32b6d5845b5ecd99ed7f5 Author: Miroslav Lichvar Date: Mon Nov 13 14:51:31 2017 -0800 timekeeping: Remove CONFIG_GENERIC_TIME_VSYSCALL_OLD As of d4d1fc61eb38f (ia64: Update fsyscall gettime to use modern vsyscall_update)the last user of CONFIG_GENERIC_TIME_VSYSCALL_OLD have been updated, the legacy support for old-style vsyscall implementations can be removed from the timekeeping code. (Thanks again to Tony Luck for helping remove the last user!) [jstultz: Commit message rework] Signed-off-by: Miroslav Lichvar Signed-off-by: John Stultz Signed-off-by: Thomas Gleixner Cc: Prarit Bhargava Cc: Tony Luck Cc: Richard Cochran Cc: Stephen Boyd Link: https://lkml.kernel.org/r/1510613491-16695-1-git-send-email-john.stultz@linaro.org include/linux/timekeeper_internal.h | 7 ------ kernel/time/Kconfig | 4 ---- kernel/time/timekeeping.c | 45 ------------------------------------- 3 files changed, 56 deletions(-) commit 558de28249508dc3ec0ec8981d1315eb8b63f0d9 Author: Benjamin Gaignard Date: Tue Nov 14 09:52:38 2017 +0100 clocksource/timer_of: Rename timer_of_exit to timer_of_cleanup Change the function name to something more explicit since it is only used in init error cases. Add __init annotation and description about the function usage. Signed-off-by: Benjamin Gaignard Signed-off-by: Thomas Gleixner Cc: mark.rutland@arm.com Cc: devicetree@vger.kernel.org Cc: alexandre.torgue@st.com Cc: arnd@arndb.de Cc: julien.thierry@arm.com Cc: daniel.lezcano@linaro.org Cc: linux@armlinux.org.uk Cc: robh+dt@kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: mcoquelin.stm32@gmail.com Cc: sudeep.holla@arm.com Cc: ludovic.barre@st.com Link: https://lkml.kernel.org/r/1510649563-22975-2-git-send-email-benjamin.gaignard@linaro.org drivers/clocksource/timer-of.c | 9 ++++++++- drivers/clocksource/timer-of.h | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) commit 838bee9e756ec46e9b5be25f9e44388d7e185a2a Merge: ac3d793 88d8ff9 Author: Jan Kara Date: Tue Nov 14 11:09:53 2017 +0100 Merge udf, isofs, quota, ext2 changes for 4.15-rc1. commit dfd4c4935de8ac39f22e0f65972140405fd27942 Author: Vasily Gorbik Date: Mon Nov 13 16:58:34 2017 +0100 s390/kbuild: get rid of a warning when compiling with KCOV This change fixes the following warning: warning: (KCOV) selects GCC_PLUGINS which has unmet direct dependencies (HAVE_GCC_PLUGINS && !COMPILE_TEST) Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens arch/s390/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 11776eaa6568f5357542bf41b0c7bb90854137cc Author: Vasily Gorbik Date: Mon Nov 13 16:37:33 2017 +0100 s390: correct some inline assembly constraints Inline assembly code changed in this patch should really use "Q" constraint "Memory reference without index register and with short displacement". The kernel does not compile with kasan support enabled otherwise (due to stack instrumentation). Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens arch/s390/include/asm/cpu_mf.h | 2 +- arch/s390/include/asm/lowcore.h | 4 ++-- arch/s390/include/asm/processor.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 0aaba41b58bc5f3074c0c0a6136b9500b5e29e19 Author: Martin Schwidefsky Date: Tue Aug 22 12:08:22 2017 +0200 s390: remove all code using the access register mode The vdso code for the getcpu() and the clock_gettime() call use the access register mode to access the per-CPU vdso data page with the current code. An alternative to the complicated AR mode is to use the secondary space mode. This makes the vdso faster and quite a bit simpler. The downside is that the uaccess code has to be changed quite a bit. Which instructions are used depends on the machine and what kind of uaccess operation is requested. The instruction dictates which ASCE value needs to be loaded into %cr1 and %cr7. The different cases: * User copy with MVCOS for z10 and newer machines The MVCOS instruction can copy between the primary space (aka user) and the home space (aka kernel) directly. For set_fs(KERNEL_DS) the kernel ASCE is loaded into %cr1. For set_fs(USER_DS) the user space is already loaded in %cr1. * User copy with MVCP/MVCS for older machines To be able to execute the MVCP/MVCS instructions the kernel needs to switch to primary mode. The control register %cr1 has to be set to the kernel ASCE and %cr7 to either the kernel ASCE or the user ASCE dependent on set_fs(KERNEL_DS) vs set_fs(USER_DS). * Data access in the user address space for strnlen / futex To use "normal" instruction with data from the user address space the secondary space mode is used. The kernel needs to switch to primary mode, %cr1 has to contain the kernel ASCE and %cr7 either the user ASCE or the kernel ASCE, dependent on set_fs. To load a new value into %cr1 or %cr7 is an expensive operation, the kernel tries to be lazy about it. E.g. for multiple user copies in a row with MVCP/MVCS the replacement of the vdso ASCE in %cr7 with the user ASCE is done only once. On return to user space a CPU bit is checked that loads the vdso ASCE again. To enable and disable the data access via the secondary space two new functions are added, enable_sacf_uaccess and disable_sacf_uaccess. The fact that a context is in secondary space uaccess mode is stored in the mm_segment_t value for the task. The code of an interrupt may use set_fs as long as it returns to the previous state it got with get_fs with another call to set_fs. The code in finish_arch_post_lock_switch simply has to do a set_fs with the current mm_segment_t value for the task. For CPUs with MVCOS: CPU running in | %cr1 ASCE | %cr7 ASCE | --------------------------------------|-----------|-----------| user space | user | vdso | kernel, USER_DS, normal-mode | user | vdso | kernel, USER_DS, normal-mode, lazy | user | user | kernel, USER_DS, sacf-mode | kernel | user | kernel, KERNEL_DS, normal-mode | kernel | vdso | kernel, KERNEL_DS, normal-mode, lazy | kernel | kernel | kernel, KERNEL_DS, sacf-mode | kernel | kernel | For CPUs without MVCOS: CPU running in | %cr1 ASCE | %cr7 ASCE | --------------------------------------|-----------|-----------| user space | user | vdso | kernel, USER_DS, normal-mode | user | vdso | kernel, USER_DS, normal-mode lazy | kernel | user | kernel, USER_DS, sacf-mode | kernel | user | kernel, KERNEL_DS, normal-mode | kernel | vdso | kernel, KERNEL_DS, normal-mode, lazy | kernel | kernel | kernel, KERNEL_DS, sacf-mode | kernel | kernel | The lines with "lazy" refer to the state after a copy via the secondary space with a delayed reload of %cr1 and %cr7. There are three hardware address spaces that can cause a DAT exception, primary, secondary and home space. The exception can be related to four different fault types: user space fault, vdso fault, kernel fault, and the gmap faults. Dependent on the set_fs state and normal vs. sacf mode there are a number of fault combinations: 1) user address space fault via the primary ASCE 2) gmap address space fault via the primary ASCE 3) kernel address space fault via the primary ASCE for machines with MVCOS and set_fs(KERNEL_DS) 4) vdso address space faults via the secondary ASCE with an invalid address while running in secondary space in problem state 5) user address space fault via the secondary ASCE for user-copy based on the secondary space mode, e.g. futex_ops or strnlen_user 6) kernel address space fault via the secondary ASCE for user-copy with secondary space mode with set_fs(KERNEL_DS) 7) kernel address space fault via the primary ASCE for user-copy with secondary space mode with set_fs(USER_DS) on machines without MVCOS. 8) kernel address space fault via the home space ASCE Replace user_space_fault() with a new function get_fault_type() that can distinguish all four different fault types. With these changes the futex atomic ops from the kernel and the strnlen_user will get a little bit slower, as well as the old style uaccess with MVCP/MVCS. All user accesses based on MVCOS will be as fast as before. On the positive side, the user space vdso code is a lot faster and Linux ceases to use the complicated AR mode. Reviewed-by: Heiko Carstens Signed-off-by: Martin Schwidefsky Signed-off-by: Heiko Carstens arch/s390/include/asm/futex.h | 9 ++- arch/s390/include/asm/lowcore.h | 33 +++++----- arch/s390/include/asm/mmu_context.h | 36 +++++------ arch/s390/include/asm/processor.h | 4 +- arch/s390/include/asm/uaccess.h | 29 +++------ arch/s390/kernel/asm-offsets.c | 2 +- arch/s390/kernel/entry.S | 26 ++++++-- arch/s390/kernel/head64.S | 2 +- arch/s390/kernel/vdso.c | 44 ++----------- arch/s390/kernel/vdso32/getcpu.S | 16 +---- arch/s390/kernel/vdso64/clock_gettime.S | 19 ++---- arch/s390/kernel/vdso64/getcpu.S | 15 +---- arch/s390/lib/uaccess.c | 90 +++++++++++++++++++++++--- arch/s390/mm/fault.c | 108 +++++++++++++++++++------------- arch/s390/mm/init.c | 1 + arch/s390/mm/pgalloc.c | 4 +- 16 files changed, 228 insertions(+), 210 deletions(-) commit c771320e9357c9b85634002daedfe5c8988f27a6 Author: Martin Schwidefsky Date: Thu Oct 5 08:44:26 2017 +0200 s390/mm,kvm: improve detection of KVM guest faults The identification of guest fault currently relies on the PF_VCPU flag. This is set in guest_entry_irqoff and cleared in guest_exit_irqoff. Both functions are called by __vcpu_run, the PF_VCPU flag is set for quite a lot of kernel code outside of the guest execution. Replace the PF_VCPU scheme with the PIF_GUEST_FAULT in the pt_regs and make the program check handler code in entry.S set the bit only for exception that occurred between the .Lsie_gmap and .Lsie_done labels. Reviewed-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky Signed-off-by: Heiko Carstens arch/s390/include/asm/ptrace.h | 2 ++ arch/s390/kernel/entry.S | 7 +++++-- arch/s390/mm/fault.c | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) commit cefbeb5df56e1daf0adda8ca5eecee03c5084af6 Author: Kees Cook Date: Wed Oct 25 03:27:37 2017 -0700 s390/ap_bus: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Harald Freudenberger Signed-off-by: Kees Cook Signed-off-by: Martin Schwidefsky Signed-off-by: Heiko Carstens drivers/s390/crypto/ap_bus.c | 10 +++++----- drivers/s390/crypto/ap_bus.h | 2 +- drivers/s390/crypto/ap_queue.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit c9602ee7d14a72086d10b50ac68e1ea5c01e7579 Author: Kees Cook Date: Mon Oct 16 16:44:30 2017 -0700 s390/sclp: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Instead of creating an external static data variable, just define a separate callback which encodes the "force restart" desire. Cc: Peter Oberparleiter Cc: Greg Kroah-Hartman Signed-off-by: Kees Cook [heiko.carstens@de.ibm.com: get rid of compile warning] Signed-off-by: Martin Schwidefsky Signed-off-by: Heiko Carstens drivers/s390/char/con3215.c | 6 +++--- drivers/s390/char/con3270.c | 10 +++++----- drivers/s390/char/sclp.c | 45 ++++++++++++++++++++++++------------------ drivers/s390/char/sclp_con.c | 5 ++--- drivers/s390/char/sclp_tty.c | 5 ++--- drivers/s390/char/sclp_vt220.c | 6 ++---- drivers/s390/char/tape_core.c | 14 ++++--------- drivers/s390/char/tty3270.c | 8 ++++---- 8 files changed, 48 insertions(+), 51 deletions(-) commit 846d0c6f794c4bef90a021b18cedde598758507c Author: Kees Cook Date: Mon Oct 16 16:43:25 2017 -0700 s390/cio: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Sebastian Ott Cc: Peter Oberparleiter Signed-off-by: Kees Cook Signed-off-by: Martin Schwidefsky Signed-off-by: Heiko Carstens drivers/s390/cio/device.c | 8 ++++---- drivers/s390/cio/device.h | 2 ++ drivers/s390/cio/device_fsm.c | 10 ++++------ drivers/s390/cio/eadm_sch.c | 9 ++++----- 4 files changed, 14 insertions(+), 15 deletions(-) commit cb9f780aa93b752ec935e6771a251717d867e603 Author: Kees Cook Date: Wed Oct 4 17:54:35 2017 -0700 s390: qdio: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Peter Oberparleiter Cc: Thomas Gleixner Signed-off-by: Kees Cook [sebott: fixed compile error due to invalid struct member] Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky Signed-off-by: Heiko Carstens drivers/s390/cio/qdio.h | 2 +- drivers/s390/cio/qdio_main.c | 4 ++-- drivers/s390/cio/qdio_setup.c | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) commit d4bfeabe9ff7967f4b8c24aabf2de1ce3a909cd9 Merge: 8a7a8e1 b29c6ef Author: Thomas Gleixner Date: Tue Nov 14 10:01:49 2017 +0100 Merge branch 'linus' into timers/urgent Get upstream changes so dependent patches can be applied. commit 92ee46efeb505ead3ab06d3c5ce695637ed5f152 Author: Jason Baron Date: Mon Nov 13 16:48:47 2017 -0500 jump_label: Invoke jump_label_test() via early_initcall() Fengguang Wu reported that running the rcuperf test during boot can cause the jump_label_test() to hit a WARN_ON(). The issue is that the core jump label code relies on kernel_text_address() to detect when it can no longer update branches that may be contained in __init sections. The kernel_text_address() in turn assumes that if the system_state variable is greter than or equal to SYSTEM_RUNNING then __init sections are no longer valid (since the assumption is that they have been freed). However, when rcuperf is setup to run in early boot it can call kernel_power_off() which sets the system_state to SYSTEM_POWER_OFF. Since rcuperf initialization is invoked via a module_init(), we can make the dependency of jump_label_test() needing to complete before rcuperf explicit by calling it via early_initcall(). Reported-by: Fengguang Wu Signed-off-by: Jason Baron Acked-by: Paul E. McKenney Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1510609727-2238-1-git-send-email-jbaron@akamai.com Signed-off-by: Ingo Molnar kernel/jump_label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6b3716dcdcd1a4c3fa05ecb6ab0a1e52b6785d0 Merge: 951b796 87c320e Author: David S. Miller Date: Tue Nov 14 16:38:46 2017 +0900 Merge branch 'net-devname_alloc_cleanups' Rasmus Villemoes says: ==================== net: core: devname allocation cleanups It's somewhat confusing to have both dev_alloc_name and dev_get_valid_name. I can't see why the former is less strict than the latter, so make them (or rather dev_alloc_name_ns and dev_get_valid_name) equivalent, hardening dev_alloc_name() a little. Obvious follow-up patches would be to only export one function, and make dev_alloc_name a static inline wrapper for that (whichever name is chosen for the exported interface). But maybe there is a good reason the two exported interfaces do different checking, so I'll refrain from including the trivial but tree-wide renaming in this series. ==================== Signed-off-by: David S. Miller commit 87c320e51519a83c496ab7bfb4e96c8f9c001e89 Author: Rasmus Villemoes Date: Mon Nov 13 00:15:10 2017 +0100 net: core: dev_get_valid_name is now the same as dev_alloc_name_ns If name contains a %, it's easy to see that this patch doesn't change anything (other than eliminate the duplicate dev_valid_name call). Otherwise, we'll now just spend a little time in snprintf() copying name to the stack buffer allocated in dev_alloc_name_ns, and do the __dev_get_by_name using that buffer rather than name. Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller net/core/dev.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit d6f295e9def0bee85b37bdffb95153721935c342 Author: Rasmus Villemoes Date: Mon Nov 13 00:15:09 2017 +0100 net: core: maybe return -EEXIST in __dev_alloc_name If we're given format string with no %d, -EEXIST is a saner error code. Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93809105cf9d43790839d8b8e29a8a505290ec68 Author: Rasmus Villemoes Date: Mon Nov 13 00:15:08 2017 +0100 net: core: check dev_valid_name in __dev_alloc_name We currently only exclude non-sysfs-friendly names via dev_get_valid_name; there doesn't seem to be a reason to allow such names when we're called via dev_alloc_name. This does duplicate the dev_valid_name check in the dev_get_valid_name() case; we'll fix that shortly. Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller net/core/dev.c | 3 +++ 1 file changed, 3 insertions(+) commit 6224abda0db8845756571833744d4414f144ecb5 Author: Rasmus Villemoes Date: Mon Nov 13 00:15:07 2017 +0100 net: core: drop pointless check in __dev_alloc_name The only caller passes a stack buffer as buf, so it won't equal the passed-in name. Moreover, we're already using buf as a scratch buffer inside the if (p) {} block, so if buf and name were the same, that snprintf() call would be overwriting its own format string. Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller net/core/dev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c46d7642e915106b0301bc4d53a79e8e806c2eb9 Author: Rasmus Villemoes Date: Mon Nov 13 00:15:06 2017 +0100 net: core: eliminate dev_alloc_name{,_ns} code duplication dev_alloc_name contained a BUG_ON(), which I moved to dev_alloc_name_ns; the only other caller of that already has the same BUG_ON. Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller net/core/dev.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 2c88b855981481970b731bf3f4508400aac429fb Author: Rasmus Villemoes Date: Mon Nov 13 00:15:05 2017 +0100 net: core: move dev_alloc_name_ns a little higher No functional change. Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller net/core/dev.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 51f299dd94bb1e28d03eefbc4fe0b9282f9ee2fa Author: Rasmus Villemoes Date: Mon Nov 13 00:15:04 2017 +0100 net: core: improve sanity checking in __dev_alloc_name __dev_alloc_name is called from the public (and exported) dev_alloc_name(), so we don't have a guarantee that strlen(name) is at most IFNAMSIZ. If somebody manages to get __dev_alloc_name called with a % char beyond the 31st character, we'd be making a snprintf() call that will very easily crash the kernel (using an appropriate %p extension, we'll likely dereference some completely bogus pointer). In the normal case where strlen() is sane, we don't even save anything by limiting to IFNAMSIZ, so just use strchr(). Signed-off-by: Rasmus Villemoes Signed-off-by: David S. Miller net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e2a3064d6a86094fecc20cd430fd96aaa801687 Author: Ricardo Neri Date: Mon Nov 13 22:29:44 2017 -0800 x86/umip: Identify the STR and SLDT instructions The STR and SLDT instructions are not emulated by the UMIP code, thus there's no functionality in the decoder to identify them. However, a subsequent commit will introduce a warning about the use of all the instructions that UMIP protect/changes, not only those that are emulated. A first step for that is to add the ability to decode/identify them. Plus, now that STR and SLDT are identified, we need to explicitly avoid their emulation (i.e., not rely on successful identification). Group together all the cases that we do not want to emulate: STR, SLDT and user long mode processes. Signed-off-by: Ricardo Neri Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi V. Shankar Cc: Thomas Gleixner Cc: Tony Luck Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1510640985-18412-4-git-send-email-ricardo.neri-calderon@linux.intel.com [ Rewrote the changelog, fixed ugly col80 artifact. ] Signed-off-by: Ingo Molnar arch/x86/kernel/umip.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 770c77557757873808a474016a3cae4b37690cb2 Author: Ricardo Neri Date: Mon Nov 13 22:29:43 2017 -0800 x86/umip: Print a line in the boot log that UMIP has been enabled Indicate that this feature has been enabled. Suggested-by: Ingo Molnar Signed-off-by: Ricardo Neri Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi V. Shankar Cc: Thomas Gleixner Cc: Tony Luck Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1510640985-18412-3-git-send-email-ricardo.neri-calderon@linux.intel.com [ Changelog tweaks. ] Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/common.c | 2 ++ 1 file changed, 2 insertions(+) commit 796ebc81b9931bfa293b4ca38ae28c21a363f4d0 Author: Ricardo Neri Date: Mon Nov 13 22:29:42 2017 -0800 x86/umip: Select X86_INTEL_UMIP by default UMIP does cause any performance penalty to the vast majority of x86 code that does not use the legacy instructions affected by UMIP. Also describe UMIP more accurately and explain the behavior that can be expected by the (few) applications that use the affected instructions. Suggested-by: Ingo Molnar Signed-off-by: Ricardo Neri Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi V. Shankar Cc: Thomas Gleixner Cc: Tony Luck Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1510640985-18412-2-git-send-email-ricardo.neri-calderon@linux.intel.com [ Spelling fixes, rewrote the changelog. ] Signed-off-by: Ingo Molnar arch/x86/Kconfig | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 951b7966959fde507e1718627b37795f40b704f4 Merge: 0a87bc2 ee181e5 Author: David S. Miller Date: Tue Nov 14 16:26:35 2017 +0900 Merge branch 'tls-misc-fixes' Ilya Lesokhin says: ==================== tls: Miscellaneous fixes Here's a set of miscellaneous fix patches. Patch 1 makes sure aead_request is initailized properly. Patches 2-3 Fix a memory leak we've encountered. patch 4 moves tls_make_aad to allow sharing it in the future. Patch 5 fixes a TOCTOU issue reported here: https://www.spinics.net/lists/kernel/msg2608603.html Patch 6 Avoids callback overriding when tls_set_sw_offload fails. ==================== Signed-off-by: David S. Miller commit ee181e5201e640a4b92b217e9eab2531dab57d2c Author: Ilya Lesokhin Date: Mon Nov 13 10:22:49 2017 +0200 tls: don't override sk_write_space if tls_set_sw_offload fails. If we fail to enable tls in the kernel we shouldn't override the sk_write_space callback Fixes: 3c4d7559159b ('tls: kernel TLS support') Signed-off-by: Ilya Lesokhin Signed-off-by: David S. Miller net/tls/tls_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 196c31b4b54474b31dee3c30352c45c2a93e9226 Author: Ilya Lesokhin Date: Mon Nov 13 10:22:48 2017 +0200 tls: Avoid copying crypto_info again after cipher_type check. Avoid copying crypto_info again after cipher_type check to avoid a TOCTOU exploits. The temporary array on the stack is removed as we don't really need it Fixes: 3c4d7559159b ('tls: kernel TLS support') Signed-off-by: Ilya Lesokhin Signed-off-by: David S. Miller net/tls/tls_main.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 213ef6e7c9c063c482d77f12cc438872628d48ec Author: Ilya Lesokhin Date: Mon Nov 13 10:22:47 2017 +0200 tls: Move tls_make_aad to header to allow sharing move tls_make_aad as it is going to be reused by the device offload code and rx path. Remove unused recv parameter. Signed-off-by: Ilya Lesokhin Signed-off-by: David S. Miller include/net/tls.h | 15 +++++++++++++++ net/tls/tls_sw.c | 18 +----------------- 2 files changed, 16 insertions(+), 17 deletions(-) commit ff45d820a2df163957ad8ab459b6eb6976144c18 Author: Ilya Lesokhin Date: Mon Nov 13 10:22:46 2017 +0200 tls: Fix TLS ulp context leak, when TLS_TX setsockopt is not used. Previously the TLS ulp context would leak if we attached a TLS ulp to a socket but did not use the TLS_TX setsockopt, or did use it but it failed. This patch solves the issue by overriding prot[TLS_BASE_TX].close and fixing tls_sk_proto_close to work properly when its called with ctx->tx_conf == TLS_BASE_TX. This patch also removes ctx->free_resources as we can use ctx->tx_conf to obtain the relevant information. Fixes: 3c4d7559159b ('tls: kernel TLS support') Signed-off-by: Ilya Lesokhin Signed-off-by: David S. Miller include/net/tls.h | 2 +- net/tls/tls_main.c | 22 ++++++++++++++-------- net/tls/tls_sw.c | 4 ++-- 3 files changed, 17 insertions(+), 11 deletions(-) commit 6d88207fcfddc002afe3e2e4a455e5201089d5d9 Author: Ilya Lesokhin Date: Mon Nov 13 10:22:45 2017 +0200 tls: Add function to update the TLS socket configuration The tx configuration is now stored in ctx->tx_conf. And sk->sk_prot is updated trough a function This will simplify things when we add rx and support for different possible tx and rx cross configurations. Signed-off-by: Ilya Lesokhin Signed-off-by: David S. Miller include/net/tls.h | 2 ++ net/tls/tls_main.c | 46 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 34 insertions(+), 14 deletions(-) commit 61ef6da622aa7b66bf92991bd272490eea6c712e Author: Ilya Lesokhin Date: Mon Nov 13 10:22:44 2017 +0200 tls: Use kzalloc for aead_request allocation Use kzalloc for aead_request allocation as we don't set all the bits in the request. Fixes: 3c4d7559159b ('tls: kernel TLS support') Signed-off-by: Ilya Lesokhin Signed-off-by: David S. Miller net/tls/tls_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a87bc2e58a687fe14817b9c7f73e68570ba33c6 Merge: 3a9b76f b6ff639 Author: David S. Miller Date: Tue Nov 14 16:20:04 2017 +0900 Merge branch 'bpf-improve-verifier-ARG_CONST_SIZE_OR_ZERO-semantics' Yonghong Song says: ==================== bpf: improve verifier ARG_CONST_SIZE_OR_ZERO semantics This patch set intends to change verifier ARG_CONST_SIZE_OR_ZERO semantics so that simpler bpf programs can be written with verifier acceptance. Patch #1 comment provided the detailed examples and the patch itself implements the new semantics. Patch #2 changes bpf_probe_read helper arg2 type from ARG_CONST_SIZE to ARG_CONST_SIZE_OR_ZERO. Patch #3 fixed a few test cases and added some for better coverage. ==================== Signed-off-by: David S. Miller commit b6ff63911232c2823e2763371ec4462ac64cc331 Author: Yonghong Song Date: Sun Nov 12 14:49:11 2017 -0800 bpf: fix and add test cases for ARG_CONST_SIZE_OR_ZERO semantics change Fix a few test cases to allow non-NULL map/packet/stack pointer with size = 0. Change a few tests using bpf_probe_read to use bpf_probe_write_user so ARG_CONST_SIZE arg can still be properly tested. One existing test case already covers size = 0 with non-NULL packet pointer, so add additional tests so all cases of size = 0 and 0 <= size <= legal_upper_bound with non-NULL map/packet/stack pointer are covered. Signed-off-by: Yonghong Song Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_verifier.c | 131 ++++++++++++++++++++++++---- 1 file changed, 112 insertions(+), 19 deletions(-) commit 9c019e2bc4b2bd8223c8c0d4b6962478b479834d Author: Yonghong Song Date: Sun Nov 12 14:49:10 2017 -0800 bpf: change helper bpf_probe_read arg2 type to ARG_CONST_SIZE_OR_ZERO The helper bpf_probe_read arg2 type is changed from ARG_CONST_SIZE to ARG_CONST_SIZE_OR_ZERO to permit size-0 buffer. Together with newer ARG_CONST_SIZE_OR_ZERO semantics which allows non-NULL buffer with size 0, this allows simpler bpf programs with verifier acceptance. The previous commit which changes ARG_CONST_SIZE_OR_ZERO semantics has details on examples. Signed-off-by: Yonghong Song Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/trace/bpf_trace.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9fd29c08e52023252f0480ab8f6906a1ecc9a8d5 Author: Yonghong Song Date: Sun Nov 12 14:49:09 2017 -0800 bpf: improve verifier ARG_CONST_SIZE_OR_ZERO semantics For helpers, the argument type ARG_CONST_SIZE_OR_ZERO permits the access size to be 0 when accessing the previous argument (arg). Right now, it requires the arg needs to be NULL when size passed is 0 or could be 0. It also requires a non-NULL arg when the size is proved to be non-0. This patch changes verifier ARG_CONST_SIZE_OR_ZERO behavior such that for size-0 or possible size-0, it is not required the arg equal to NULL. There are a couple of reasons for this semantics change, and all of them intends to simplify user bpf programs which may improve user experience and/or increase chances of verifier acceptance. Together with the next patch which changes bpf_probe_read arg2 type from ARG_CONST_SIZE to ARG_CONST_SIZE_OR_ZERO, the following two examples, which fail the verifier currently, are able to get verifier acceptance. Example 1: unsigned long len = pend - pstart; len = len > MAX_PAYLOAD_LEN ? MAX_PAYLOAD_LEN : len; len &= MAX_PAYLOAD_LEN; bpf_probe_read(data->payload, len, pstart); It does not have test for "len > 0" and it failed the verifier. Users may not be aware that they have to add this test. Converting the bpf_probe_read helper to have ARG_CONST_SIZE_OR_ZERO helps the above code get verifier acceptance. Example 2: Here is one example where llvm "messed up" the code and the verifier fails. ...... unsigned long len = pend - pstart; if (len > 0 && len <= MAX_PAYLOAD_LEN) bpf_probe_read(data->payload, len, pstart); ...... The compiler generates the following code and verifier fails: ...... 39: (79) r2 = *(u64 *)(r10 -16) 40: (1f) r2 -= r8 41: (bf) r1 = r2 42: (07) r1 += -1 43: (25) if r1 > 0xffe goto pc+3 R0=inv(id=0) R1=inv(id=0,umax_value=4094,var_off=(0x0; 0xfff)) R2=inv(id=0) R6=map_value(id=0,off=0,ks=4,vs=4095,imm=0) R7=inv(id=0) R8=inv(id=0) R9=inv0 R10=fp0 44: (bf) r1 = r6 45: (bf) r3 = r8 46: (85) call bpf_probe_read#45 R2 min value is negative, either use unsigned or 'var &= const' ...... The compiler optimization is correct. If r1 = 0, r1 - 1 = 0xffffffffffffffff > 0xffe. If r1 != 0, r1 - 1 will not wrap. r1 > 0xffe at insn #43 can actually capture both "r1 > 0" and "len <= MAX_PAYLOAD_LEN". This however causes an issue in verifier as the value range of arg2 "r2" does not properly get refined and lead to verification failure. Relaxing bpf_prog_read arg2 from ARG_CONST_SIZE to ARG_CONST_SIZE_OR_ZERO allows the following simplied code: unsigned long len = pend - pstart; if (len <= MAX_PAYLOAD_LEN) bpf_probe_read(data->payload, len, pstart); The llvm compiler will generate less complex code and the verifier is able to verify that the program is okay. Signed-off-by: Yonghong Song Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) commit 3a9b76fd0db9f0d426533f96a68a62a58753a51e Author: Eric Dumazet Date: Sat Nov 11 15:54:12 2017 -0800 tcp: allow drivers to tweak TSQ logic I had many reports that TSQ logic breaks wifi aggregation. Current logic is to allow up to 1 ms of bytes to be queued into qdisc and drivers queues. But Wifi aggregation needs a bigger budget to allow bigger rates to be discovered by various TCP Congestion Controls algorithms. This patch adds an extra socket field, allowing wifi drivers to select another log scale to derive TCP Small Queue credit from current pacing rate. Initial value is 10, meaning that this patch does not change current behavior. We expect wifi drivers to set this field to smaller values (tests have been done with values from 6 to 9) They would have to use following template : if (skb->sk && skb->sk->sk_pacing_shift != MY_PACING_SHIFT) skb->sk->sk_pacing_shift = MY_PACING_SHIFT; Ref: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1670041 Signed-off-by: Eric Dumazet Cc: Johannes Berg Cc: Toke Høiland-Jørgensen Cc: Kir Kolyshkin Acked-by: Neal Cardwell Signed-off-by: David S. Miller include/net/sock.h | 2 ++ net/core/sock.c | 1 + net/ipv4/tcp_output.c | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) commit 166c88189632b6b13612dc15e031f58d199602da Merge: 442866f dcbefc3 Author: David S. Miller Date: Tue Nov 14 16:17:38 2017 +0900 Merge tag 'rxrpc-next-20171111' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Fixes Here are some patches that fix some things in AF_RXRPC: (1) Prevent notifications from being passed to a kernel service for a call that it has ended. (2) Fix a null pointer deference that occurs under some circumstances when an ACK is generated. (3) Fix a number of things to do with call expiration. ==================== Signed-off-by: David S. Miller commit 442866ff9743d51957685cecaa722a7fd47b02e2 Author: Zhu Yanjun Date: Sat Nov 11 10:42:03 2017 -0500 bnx2x: fix slowpath null crash When "NETDEV WATCHDOG: em4 (bnx2x): transmit queue 2 timed out" occurs, BNX2X_SP_RTNL_TX_TIMEOUT is set. In the function bnx2x_sp_rtnl_task, bnx2x_nic_unload and bnx2x_nic_load are executed to shutdown and open NIC. In the function bnx2x_nic_load, bnx2x_alloc_mem allocates dma failure. The message "bnx2x: [bnx2x_alloc_mem:8399(em4)]Can't allocate memory" pops out. The variable slowpath is set to NULL. When shutdown the NIC, the function bnx2x_nic_unload is called. In the function bnx2x_nic_unload, the following functions are executed. bnx2x_chip_cleanup bnx2x_set_storm_rx_mode bnx2x_set_q_rx_mode bnx2x_set_q_rx_mode bnx2x_config_rx_mode bnx2x_set_rx_mode_e2 In the function bnx2x_set_rx_mode_e2, the variable slowpath is operated. Then the crash occurs. To fix this crash, the variable slowpath is checked. And in the function bnx2x_sp_rtnl_task, after dma memory allocation fails, another shutdown and open NIC is executed. CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun Acked-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 0c3ce16cb702e15484c4f73f7faf03cc96f27515 Merge: 8bff3685 9e5c598 Author: David S. Miller Date: Tue Nov 14 16:14:07 2017 +0900 Merge branch 'cxgb4-collect-LE-TCAM-and-SGE-queue-contexts' Rahul Lakkireddy says: ==================== cxgb4: collect LE-TCAM and SGE queue contexts Collect hardware dumps via ethtool --get-dump facility. Patch 1 collects LE-TCAM dump. Patch 2 collects SGE queue context dumps. ==================== Signed-off-by: David S. Miller commit 9e5c598c720792e210f83964441ee1c99451e8d1 Author: Rahul Lakkireddy Date: Sat Nov 11 19:48:16 2017 +0530 cxgb4: collect SGE queue context dump Collect SGE freelist queue and congestion manager contexts. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h | 8 +++ drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 78 +++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 4 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 4 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 4 ++ drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 62 ++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/t4_hw.h | 7 ++ drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 27 ++++++++ 9 files changed, 195 insertions(+) commit 03e98b9118bed1960993466f4d64f9f5a9146b66 Author: Rahul Lakkireddy Date: Sat Nov 11 19:48:15 2017 +0530 cxgb4: collect LE-TCAM dump Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h | 30 ++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 175 ++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 7 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 7 + drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 41 +++++ 6 files changed, 261 insertions(+) commit 8bff3685a4bbf175a96bc6a528f13455d8d38244 Author: Xin Long Date: Sat Nov 11 19:58:50 2017 +0800 vxlan: fix the issue that neigh proxy blocks all icmpv6 packets Commit f1fb08f6337c ("vxlan: fix ND proxy when skb doesn't have transport header offset") removed icmp6_code and icmp6_type check before calling neigh_reduce when doing neigh proxy. It means all icmpv6 packets would be blocked by this, not only ns packet. In Jianlin's env, even ping6 couldn't work through it. This patch is to bring the icmp6_code and icmp6_type check back and also removed the same check from neigh_reduce(). Fixes: f1fb08f6337c ("vxlan: fix ND proxy when skb doesn't have transport header offset") Reported-by: Jianlin Shi Signed-off-by: Xin Long Reviewed-by: Vincent Bernat Signed-off-by: David S. Miller drivers/net/vxlan.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) commit baeb0dbbb56598a2ccd98b56e0da3e9d22869112 Author: Vasily Averin Date: Sun Nov 12 22:34:03 2017 +0300 xfrm6_tunnel: exit_net cleanup check added Be sure that spi_byaddr and spi_byspi arrays initialized in net_init hook were return to initial state Signed-off-by: Vasily Averin Signed-off-by: David S. Miller net/ipv6/xfrm6_tunnel.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit e6675000f9a404f7651724c0b2e2e71f7247d3a1 Author: Vasily Averin Date: Sun Nov 12 22:33:22 2017 +0300 ppp: exit_net cleanup checks added Be sure that lists initialized in net_init hook were return to initial state. Signed-off-by: Vasily Averin Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 2 ++ 1 file changed, 2 insertions(+) commit ae61e8cd061d6ce9a2e2a13e081e7d936139e01e Author: Vasily Averin Date: Sun Nov 12 22:32:47 2017 +0300 phonet: exit_net cleanup check added Be sure that pndevs.list initialized in net_init hook was return to initial state. Signed-off-by: Vasily Averin Signed-off-by: David S. Miller net/phonet/pn_dev.c | 3 +++ 1 file changed, 3 insertions(+) commit 1e7af3b2cdf2dc9e4fd86c799414b3c504975270 Author: Vasily Averin Date: Sun Nov 12 22:30:31 2017 +0300 l2tp: exit_net cleanup check added Be sure that l2tp_session_hlist array initialized in net_init hook was return to initial state. Signed-off-by: Vasily Averin Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 4 ++++ 1 file changed, 4 insertions(+) commit ce2b7db38af1ffefa6b04b5113b4d69ad36d38ba Author: Vasily Averin Date: Sun Nov 12 22:30:01 2017 +0300 fib_rules: exit_net cleanup check added Be sure that rules_ops list initialized in net_init hook was return to initial state. Signed-off-by: Vasily Averin Signed-off-by: David S. Miller net/core/fib_rules.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0b6f59553544f47caa940c01015ac1f1113f046a Author: Vasily Averin Date: Sun Nov 12 22:29:33 2017 +0300 fib_notifier: exit_net cleanup check added Be sure that fib_notifier_ops list initilized in net_init hook was return to initial state. Signed-off-by: Vasily Averin Signed-off-by: David S. Miller net/core/fib_notifier.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ee21b18b6bdbb17a6e0b26255d2f662baf0d8409 Author: Vasily Averin Date: Sun Nov 12 22:28:46 2017 +0300 netdev: exit_net cleanup check added Be sure that dev_base_head list initialized in net_init hook was return to initial state Signed-off-by: Vasily Averin Signed-off-by: David S. Miller net/core/dev.c | 2 ++ 1 file changed, 2 insertions(+) commit 0e4ec5acad8b9dde5a42c37ae3499f7d0f230e75 Author: Vasily Averin Date: Sun Nov 12 22:28:10 2017 +0300 vxlan: exit_net cleanup checks added Be sure that sock_list array initialized in net_init hook was return to initial state Signed-off-by: Vasily Averin Signed-off-by: David S. Miller drivers/net/vxlan.c | 4 ++++ 1 file changed, 4 insertions(+) commit 669f8f1a5c6849d4522de4038c8d1a3e09fcc4ce Author: Vasily Averin Date: Sun Nov 12 22:27:49 2017 +0300 packet: exit_net cleanup check added Be sure that packet.sklist initialized in net_init hook was return to initial state. Signed-off-by: Vasily Averin Signed-off-by: David S. Miller net/packet/af_packet.c | 1 + 1 file changed, 1 insertion(+) commit ab384b63c76679712edf2578930a238329aa41a9 Author: Vasily Averin Date: Sun Nov 12 22:27:19 2017 +0300 geneve: exit_net cleanup check added Be sure that sock_list initialized in net_init hook was return to initial state. Signed-off-by: Vasily Averin Signed-off-by: David S. Miller drivers/net/geneve.c | 1 + 1 file changed, 1 insertion(+) commit 663faeab5c7e205160f9dbeb9a699c5dbdb78ce2 Author: Vasily Averin Date: Sun Nov 12 22:26:53 2017 +0300 af_key: replace BUG_ON on WARN_ON in net_exit hook Signed-off-by: Vasily Averin Signed-off-by: David S. Miller net/key/af_key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a356d2ae50790f49858ebed35da9e206336fafee Author: Ingo Molnar Date: Tue Nov 14 07:24:22 2017 +0100 tools/headers: Sync objtool UAPI header objtool grew this new warning: Warning: synced file at 'tools/objtool/arch/x86/include/asm/inat.h' differs from latest kernel version at 'arch/x86/include/asm/inat.h' which upstream header grew new INAT_SEG_* definitions. Sync up the tooling version of the header. Reported-by: Linus Torvalds Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar tools/objtool/arch/x86/include/asm/inat.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 050ab10a645097e47c01cfab3ccf24167e9b266b Merge: 9eb7198 b29c6ef Author: Ingo Molnar Date: Tue Nov 14 07:21:44 2017 +0100 Merge branch 'linus' into core/objtool, to pick up dependent commits Signed-off-by: Ingo Molnar commit 0e74aa1d79a5bbc663e03a2804399cae418a0321 Author: Herbert Xu Date: Fri Nov 10 14:14:06 2017 +1100 xfrm: Copy policy family in clone_policy The syzbot found an ancient bug in the IPsec code. When we cloned a socket policy (for example, for a child TCP socket derived from a listening socket), we did not copy the family field. This results in a live policy with a zero family field. This triggers a BUG_ON check in the af_key code when the cloned policy is retrieved. This patch fixes it by copying the family field over. Reported-by: syzbot Signed-off-by: Herbert Xu Signed-off-by: Steffen Klassert net/xfrm/xfrm_policy.c | 1 + 1 file changed, 1 insertion(+) commit 894025f24bd028942da3e602b87d9f7223109b14 Merge: fb0255f cdafb6d Author: Linus Torvalds Date: Mon Nov 13 21:14:07 2017 -0800 Merge tag 'usb-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY updates from Greg KH: "Here is the big set of USB and PHY driver updates for 4.15-rc1. There is the usual amount of gadget and xhci driver updates, along with phy and chipidea enhancements. There's also a lot of SPDX tags and license boilerplate cleanups as well, which provide some churn in the diffstat. Other major thing is the typec code that moved out of staging and into the "real" part of the drivers/usb/ tree, which was nice to see happen. All of these have been in linux-next with no reported issues for a while" * tag 'usb-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (263 commits) usb: gadget: f_fs: Fix use-after-free in ffs_free_inst USB: usbfs: compute urb->actual_length for isochronous usb: core: message: remember to reset 'ret' to 0 when necessary USB: typec: Remove remaining redundant license text USB: typec: add SPDX identifiers to some files USB: renesas_usbhs: rcar?.h: add SPDX tags USB: chipidea: ci_hdrc_tegra.c: add SPDX line USB: host: xhci-debugfs: add SPDX lines USB: add SPDX identifiers to all remaining Makefiles usb: host: isp1362-hcd: remove a couple of redundant assignments USB: adutux: remove redundant variable minor usb: core: add a new usb_get_ptm_status() helper usb: core: add a 'type' parameter to usb_get_status() usb: core: introduce a new usb_get_std_status() helper usb: core: rename usb_get_status() 'type' argument to 'recip' usb: core: add Status Type definitions USB: gadget: Remove redundant license text USB: gadget: function: Remove redundant license text USB: gadget: udc: Remove redundant license text USB: gadget: legacy: Remove redundant license text ... commit cecd5fc5512349662b9e7a9e06231055d803e3f6 Merge: 40b4ed1 f3ae7d9 Author: Vinod Koul Date: Tue Nov 14 10:37:28 2017 +0530 Merge branch 'topic/xilinx' into for-linus commit 40b4ed1a1a214d9da3db0298b2079103a9a7e32a Merge: 8e6c1db bcdc4bd Author: Vinod Koul Date: Tue Nov 14 10:37:18 2017 +0530 Merge branch 'topic/timer_api' into for-linus commit 8e6c1db351168393d8d4bfbcb1782cbf42d9ff74 Merge: d2045ba 288e756 Author: Vinod Koul Date: Tue Nov 14 10:37:13 2017 +0530 Merge branch 'topic/ti' into for-linus commit d2045ba3a479ea630991354e1ca5aa98db35634e Merge: 135ab7f 464aa6f Author: Vinod Koul Date: Tue Nov 14 10:37:07 2017 +0530 Merge branch 'topic/sun' into for-linus commit 135ab7f53cfb77bd0b215b68eed006c7825ea01e Merge: 9c60271 9b3b817 Author: Vinod Koul Date: Tue Nov 14 10:36:09 2017 +0530 Merge branch 'topic/sprd' into for-linus Kconfig and Makefile conflicts so put them in right order (sprd ones after stm ones) Signed-off-by: Vinod Koul commit fb0255fb2941ef6f21742b2bc146d6b9aef4fedc Merge: 449fcf3 57f5d64 Author: Linus Torvalds Date: Mon Nov 13 21:05:31 2017 -0800 Merge tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial updates from Greg KH: "Here is the big tty/serial driver pull request for 4.15-rc1. Lots of serial driver updates in here, some small vt cleanups, and a raft of SPDX and license boilerplate cleanups, messing up the diffstat a bit. Nothing major, with no realy functional changes except better hardware support for some platforms. All of these have been in linux-next for a while with no reported issues" * tag 'tty-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (110 commits) tty: ehv_bytechan: fix spelling mistake tty: serial: meson: allow baud-rates lower than 9600 serial: 8250_fintek: Fix crash with baud rate B0 serial: 8250_fintek: Disable delays for ports != 0 serial: 8250_fintek: Return -EINVAL on invalid configuration tty: Remove redundant license text tty: serdev: Remove redundant license text tty: hvc: Remove redundant license text tty: serial: Remove redundant license text tty: add SPDX identifiers to all remaining files in drivers/tty/ tty: serial: jsm: remove redundant pointer ts tty: serial: jsm: add space before the open parenthesis '(' tty: serial: jsm: fix coding style tty: serial: jsm: delete space between function name and '(' tty: serial: jsm: add blank line after declarations tty: serial: jsm: change the type of local variable tty: serial: imx: remove dead code imx_dma_rxint tty: serial: imx: disable ageing timer interrupt if dma in use serial: 8250: fix potential deadlock in rs485-mode serial: m32r_sio: Drop redundant .data assignment ... commit 9c6027133626efd773fa84478c5d8c9209df41f6 Merge: 2c85285 d83f413 Author: Vinod Koul Date: Tue Nov 14 10:34:56 2017 +0530 Merge branch 'topic/stm' into for-linus commit 2c8528592c3280c3e2dc85a804120ca64137de32 Merge: b683fa2 73d2a3c Author: Vinod Koul Date: Tue Nov 14 10:33:33 2017 +0530 Merge branch 'topic/sa11x0' into for-linus commit b683fa223b45edae9ef95e4607e3a70ab09966d7 Merge: c7960fc 087ffdd Author: Vinod Koul Date: Tue Nov 14 10:33:24 2017 +0530 Merge branch 'topic/renasas' into for-linus commit c7960fc5e0f445bc4c9e096814ed31efed469406 Merge: 4cd46d0 6b4faea Author: Vinod Koul Date: Tue Nov 14 10:33:16 2017 +0530 Merge branch 'topic/qcom' into for-linus commit 4cd46d0c5e6e456dedc9ac4cd2f9cc37b96a5dd5 Merge: 9427702 e588710 Author: Vinod Koul Date: Tue Nov 14 10:33:04 2017 +0530 Merge branch 'topic/pl330' into for-linus commit 9427702dcceb70d06c33d7cba9c7e8c29dad4d45 Merge: 340b11b f9d4a39 Author: Vinod Koul Date: Tue Nov 14 10:32:52 2017 +0530 Merge branch 'topic/imx' into for-linus commit 340b11b9f1b1a90d460ae4bcf1be448d6c032ef7 Merge: e143132 56d355e Author: Vinod Koul Date: Tue Nov 14 10:32:49 2017 +0530 Merge branch 'topic/img' into for-linus commit e143132a04b10c36df9c0ffa5a33efc527d5e270 Merge: 76a0370 c2cbd42 Author: Vinod Koul Date: Tue Nov 14 10:32:44 2017 +0530 Merge branch 'topic/doc' into for-linus commit 76a0370a46377c70986f1045eba95e14109c3218 Merge: 575d34b a9df21e Author: Vinod Koul Date: Tue Nov 14 10:32:36 2017 +0530 Merge branch 'topic/dmatest' into for-linus commit 575d34b6de071599317e8cc173ec7057126d1097 Merge: 049d0d3 7076a1e Author: Vinod Koul Date: Tue Nov 14 10:32:28 2017 +0530 Merge branch 'topic/bcom' into for-linus commit 049d0d38499822f9117d04d8fbaecf12814cbafa Merge: 5ddab69 008913d Author: Vinod Koul Date: Tue Nov 14 10:32:20 2017 +0530 Merge branch 'topic/axi' into for-linus commit 5ddab696e75b58a772b0bdad55fcd0c9c214b689 Merge: f855e38 77ea824 Author: Vinod Koul Date: Tue Nov 14 10:31:59 2017 +0530 Merge branch 'topic/print_fixes' into for-linus commit 449fcf3ab0baf3dde9952385e6789f2ca10c3980 Merge: 3c07399 c14dd9d Author: Linus Torvalds Date: Mon Nov 13 20:53:28 2017 -0800 Merge tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO updates from Greg KH: "Here is the "big" staging and IIO driver update for 4.15-rc1. Lots and lots of little changes, almost all minor code cleanups as the Outreachy application process happened during this development cycle. Also happened was a lot of IIO driver activity, and the typec USB code moving out of staging to drivers/usb (same commits are in the USB tree on a persistent branch to not cause merge issues.) Overall, it's a wash, I think we added a few hundred more lines than removed, but really only a few thousand were modified at all. All of these have been in linux-next for a while. There might be a merge issue with Al's vfs tree in the pi433 driver (take his changes, they are always better), and the media tree with some of the odd atomisp cleanups (take the media tree's version)" * tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (507 commits) staging: lustre: add SPDX identifiers to all lustre files staging: greybus: Remove redundant license text staging: greybus: add SPDX identifiers to all greybus driver files staging: ccree: simplify ioread/iowrite staging: ccree: simplify registers access staging: ccree: simplify error handling logic staging: ccree: remove dead code staging: ccree: handle limiting of DMA masks staging: ccree: copy IV to DMAable memory staging: fbtft: remove redundant initialization of buf staging: sm750fb: Fix parameter mistake in poke32 staging: wilc1000: Fix bssid buffer offset in Txq staging: fbtft: fb_ssd1331: fix mirrored display staging: android: Fix checkpatch.pl error staging: greybus: loopback: convert loopback to use generic async operations staging: greybus: operation: add private data with get/set accessors staging: greybus: loopback: Fix iteration count on async path staging: greybus: loopback: Hold per-connection mutex across operations staging: greybus/loopback: use ktime_get() for time intervals staging: fsl-dpaa2/eth: Extra headroom in RX buffers ... commit 475b581ff57bc01437cbc680e281869918447763 Author: Michael Ellerman Date: Tue Nov 14 15:48:47 2017 +1100 powerpc/64s: Fix masking of SRR1 bits on instruction fault On 64-bit Book3s, when we take an instruction fault the reason for the fault may be reported in SRR1. For data faults the reason is reported in DSISR (Data Storage Instruction Status Register). The reasons reported in each do not necessarily correspond, so we mask the SRR1 bits before copying them to the DSISR, which is then used by the page fault code. Prior to commit b4c001dc44f0 ("powerpc/mm: Use symbolic constants for filtering SRR1 bits on ISIs") we used a hard-coded mask of 0x58200000, which corresponds to: DSISR_NOHPTE 0x40000000 /* no translation found */ DSISR_NOEXEC_OR_G 0x10000000 /* exec of no-exec or guarded */ DSISR_PROTFAULT 0x08000000 /* protection fault */ DSISR_KEYFAULT 0x00200000 /* Storage Key fault */ That commit added a #define for the mask, DSISR_SRR1_MATCH_64S, but incorrectly used a different similarly named DSISR_BAD_FAULT_64S. This had the effect of changing the mask to 0xa43a0000, which omits everything but DSISR_KEYFAULT. Luckily this had no visible effect, because in practice we hardly use the DSISR bits. The lack of DSISR_NOHPTE means a TLB flush optimisation was missed in the native HPTE code, and DSISR_NOEXEC_OR_G and DSISR_PROTFAULT are both only used to trigger rare warnings. So we got lucky, but let's fix it. The new value only has bits between 17 and 30 set, so we can continue to use andis. Fixes: b4c001dc44f0 ("powerpc/mm: Use symbolic constants for filtering SRR1 bits on ISIs") Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c073991eb417b6f785ddc6afbbdc369eb84aa6a Merge: 04ed510 5e4b1b7 Author: Linus Torvalds Date: Mon Nov 13 20:36:37 2017 -0800 Merge tag 'devprop-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework updates from Rafael Wysocki: "These make the fwnode_handle_get() function return a pointer to the target fwnode object, which reflects the of_node_get() behavior, and add a macro for iterating over graph endpoints (Sakari Ailus)" * tag 'devprop-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: device property: Add a macro for interating over graph endpoints device property: Make fwnode_handle_get() return the fwnode commit 812c60564ca721a2527ed069c9221ec348368fd7 Author: Chao Yu Date: Mon Nov 13 17:32:40 2017 +0800 f2fs: inject fault in inc_valid_node_count This patch adds missing fault injection in inc_valid_node_count. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 28cfafb73853f0494b06649716687a3ea07681d5 Author: Chao Yu Date: Mon Nov 13 17:32:39 2017 +0800 f2fs: fix to clear FI_NO_PREALLOC We need to clear FI_NO_PREALLOC flag in error path of f2fs_file_write_iter, otherwise we will lose the chance to preallocate blocks in latter write() at one time. Fixes: dc91de78e5e1 ("f2fs: do not preallocate blocks which has wrong buffer") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 1 + 1 file changed, 1 insertion(+) commit f150891fd9878ef0d9197c4e8451ce67c3bdd014 Merge: fc150d6 691da76f Author: Dave Airlie Date: Tue Nov 14 14:12:43 2017 +1000 Merge tag 'exynos-drm-next-for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next - Improved HDMI and Mixer drivers . It moves mode setup and plane update code to commit like other CRTC drivers . It makes mode commit to be called in enable callback only one time . some cleanup and fixup to HDMI and Mixer drivers. . It adds 1024x768, 1280x1024 and 1366x768 modes support - Added HDMI audio interface driver . As of now, HDMI audio worked on boards with external audio codec connected in parallel with the HDMI audio transmitter's I2S interface. This patch is required to support HDMI audio properly. * tag 'exynos-drm-next-for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm: exynos: Add driver for HDMI audio interface drm/exynos/hdmi: add 85.5MHz pixel clock for v14 HDMI PHY drm/exynos/mixer: enable support for 1024x768 and 1280x1024 modes drm/exynos/hdmi: quirk for support mode timings conversion drm/exynos/mixer: pass actual mode on MIXER to encoder drm/exynos: add mode_fixup callback to exynos_drm_crtc_ops drm/exynos/hdmi: remove redundant mode field drm/exynos/mixer: remove mixer_resources sub-structure drm/exynos/mixer: fix mode validation code drm/exynos/mixer: move resolution configuration to single function drm/exynos/mixer: move mode commit to enable callback drm/exynos/mixer: abstract out output mode setup code commit 04ed510988f278a69872b4cdb426e565e3236215 Merge: bd2cd7d eb5fcc3 Author: Linus Torvalds Date: Mon Nov 13 20:08:22 2017 -0800 Merge tag 'acpi-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These update ACPICA to upstream revision 20170831, fix APEI to use the fixmap instead of ioremap_page_range(), add an operation region driver for TI PMIC TPS68470, add support for PCC subspace IDs to the ACPI CPPC driver, fix a few assorted issues and clean up some code. Specifics: - Update the ACPICA code to upstream revision 20170831 including * PDTT table header support (Bob Moore). * Cleanup and extension of internal string-to-integer conversion functions (Bob Moore). * Support for 64-bit hardware accesses (Lv Zheng). * ACPI PM Timer code adjustment to deal with 64-bit return values of acpi_hw_read() (Bob Moore). * Support for deferred table verification in acpiexec (Lv Zheng). - Fix APEI to use the fixmap instead of ioremap_page_range() which cannot work correctly the way the code in there attempted to use it and drop some code that's not necessary any more after that change (James Morse). - Clean up the APEI support code and make it use 64-bit timestamps (Arnd Bergmann, Dongjiu Geng, Jan Beulich). - Add operation region driver for TI PMIC TPS68470 (Rajmohan Mani). - Add support for PCC subspace IDs to the ACPI CPPC driver (George Cherian). - Fix an ACPI EC driver regression related to the handling of EC events during the "noirq" phases of system suspend/resume (Lv Zheng). - Delay the initialization of the lid state in the ACPI button driver to fix issues appearing on some systems (Hans de Goede). - Extend the KIOX000A "device always present" quirk to cover all affected BIOS versions (Hans de Goede). - Clean up some code in the ACPI core and drivers (Colin Ian King, Gustavo Silva)" * tag 'acpi-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (24 commits) ACPI: Mark expected switch fall-throughs ACPI / LPSS: Remove redundant initialization of clk ACPI / CPPC: Make CPPC ACPI driver aware of PCC subspace IDs mailbox: PCC: Move the MAX_PCC_SUBSPACES definition to header file ACPI / sysfs: Make function param_set_trace_method_name() static ACPI / button: Delay acpi_lid_initialize_state() until first user space open ACPI / EC: Fix regression related to triggering source of EC event handling APEI / ERST: use 64-bit timestamps ACPI / APEI: Remove arch_apei_flush_tlb_one() arm64: mm: Remove arch_apei_flush_tlb_one() ACPI / APEI: Remove ghes_ioremap_area ACPI / APEI: Replace ioremap_page_range() with fixmap ACPI / APEI: remove the unused dead-code for SEA/NMI notification type ACPI / x86: Extend KIOX000A quirk to cover all affected BIOS versions ACPI / APEI: adjust a local variable type in ghes_ioremap_pfn_irq() ACPICA: Update version to 20170831 ACPICA: Update acpi_get_timer for 64-bit interface to acpi_hw_read ACPICA: String conversions: Update to add new behaviors ACPICA: String conversions: Cleanup/format comments. No functional changes ACPICA: Restructure/cleanup all string-to-integer conversion functions ... commit bd2cd7d5a8f83ddc761025f42a3ca8e56351a6cc Merge: b29c6ef 990a848 Author: Linus Torvalds Date: Mon Nov 13 19:43:50 2017 -0800 Merge tag 'pm-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "There are no real big ticket items here this time. The most noticeable change is probably the relocation of the OPP (Operating Performance Points) framework to its own directory under drivers/ as it has grown big enough for that. Also Viresh is now going to maintain it and send pull requests for it to me, so you will see this change in the git history going forward (but still not right now). Another noticeable set of changes is the modifications of the PM core, the PCI subsystem and the ACPI PM domain to allow of more integration between system-wide suspend/resume and runtime PM. For now it's just a way to avoid resuming devices from runtime suspend unnecessarily during system suspend (if the driver sets a flag to indicate its readiness for that) and in the works is an analogous mechanism to allow devices to stay suspended after system resume. In addition to that, we have some changes related to supporting frequency-invariant CPU utilization metrics in the scheduler and in the schedutil cpufreq governor on ARM and changes to add support for device performance states to the generic power domains (genpd) framework. The rest is mostly fixes and cleanups of various sorts. Specifics: - Relocate the OPP (Operating Performance Points) framework to its own directory under drivers/ and add support for power domain performance states to it (Viresh Kumar). - Modify the PM core, the PCI bus type and the ACPI PM domain to support power management driver flags allowing device drivers to specify their capabilities and preferences regarding the handling of devices with enabled runtime PM during system suspend/resume and clean up that code somewhat (Rafael Wysocki, Ulf Hansson). - Add frequency-invariant accounting support to the task scheduler on ARM and ARM64 (Dietmar Eggemann). - Fix PM QoS device resume latency framework to prevent "no restriction" requests from overriding requests with specific requirements and drop the confusing PM_QOS_FLAG_REMOTE_WAKEUP device PM QoS flag (Rafael Wysocki). - Drop legacy class suspend/resume operations from the PM core and drop legacy bus type suspend and resume callbacks from ARM/locomo (Rafael Wysocki). - Add min/max frequency support to devfreq and clean it up somewhat (Chanwoo Choi). - Rework wakeup support in the generic power domains (genpd) framework and update some of its users accordingly (Geert Uytterhoeven). - Convert timers in the PM core to use timer_setup() (Kees Cook). - Add support for exposing the SLP_S0 (Low Power S0 Idle) residency counter based on the LPIT ACPI table on Intel platforms (Srinivas Pandruvada). - Add per-CPU PM QoS resume latency support to the ladder cpuidle governor (Ramesh Thomas). - Fix a deadlock between the wakeup notify handler and the notifier removal in the ACPI core (Ville Syrjälä). - Fix a cpufreq schedutil governor issue causing it to use stale cached frequency values sometimes (Viresh Kumar). - Fix an issue in the system suspend core support code causing wakeup events detection to fail in some cases (Rajat Jain). - Fix the generic power domains (genpd) framework to prevent the PM core from using the direct-complete optimization with it as that is guaranteed to fail (Ulf Hansson). - Fix a minor issue in the cpuidle core and clean it up a bit (Gaurav Jindal, Nicholas Piggin). - Fix and clean up the intel_idle and ARM cpuidle drivers (Jason Baron, Len Brown, Leo Yan). - Fix a couple of minor issues in the OPP framework and clean it up (Arvind Yadav, Fabio Estevam, Sudeep Holla, Tobias Jordan). - Fix and clean up some cpufreq drivers and fix a minor issue in the cpufreq statistics code (Arvind Yadav, Bhumika Goyal, Fabio Estevam, Gautham Shenoy, Gustavo Silva, Marek Szyprowski, Masahiro Yamada, Robert Jarzmik, Zumeng Chen). - Fix minor issues in the system suspend and hibernation core, in power management documentation and in the AVS (Adaptive Voltage Scaling) framework (Helge Deller, Himanshu Jha, Joe Perches, Rafael Wysocki). - Fix some issues in the cpupower utility and document that Shuah Khan is going to maintain it going forward (Prarit Bhargava, Shuah Khan)" * tag 'pm-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (88 commits) tools/power/cpupower: add libcpupower.so.0.0.1 to .gitignore tools/power/cpupower: Add 64 bit library detection intel_idle: Graceful probe failure when MWAIT is disabled cpufreq: schedutil: Reset cached_raw_freq when not in sync with next_freq freezer: Fix typo in freezable_schedule_timeout() comment PM / s2idle: Clear the events_check_enabled flag cpufreq: stats: Handle the case when trans_table goes beyond PAGE_SIZE cpufreq: arm_big_little: make cpufreq_arm_bL_ops structures const cpufreq: arm_big_little: make function arguments and structure pointer const cpuidle: Avoid assignment in if () argument cpuidle: Clean up cpuidle_enable_device() error handling a bit ACPI / PM: Fix acpi_pm_notifier_lock vs flush_workqueue() deadlock PM / Domains: Fix genpd to deal with drivers returning 1 from ->prepare() cpuidle: ladder: Add per CPU PM QoS resume latency support PM / QoS: Fix device resume latency framework PM / domains: Rework governor code to be more consistent PM / Domains: Remove gpd_dev_ops.active_wakeup() callback soc: rockchip: power-domain: Use GENPD_FLAG_ACTIVE_WAKEUP soc: mediatek: Use GENPD_FLAG_ACTIVE_WAKEUP ARM: shmobile: pm-rmobile: Use GENPD_FLAG_ACTIVE_WAKEUP ... commit b29c6ef7bb1257853c1e31616d84f55e561cf631 Author: Rafael J. Wysocki Date: Mon Nov 13 02:15:39 2017 +0100 x86 / CPU: Avoid unnecessary IPIs in arch_freq_get_on_cpu() Even though aperfmperf_snapshot_khz() caches the samples.khz value to return if called again in a sufficiently short time, its caller, arch_freq_get_on_cpu(), still uses smp_call_function_single() to run it which may allow user space to trigger an IPI storm by reading from the scaling_cur_freq cpufreq sysfs file in a tight loop. To avoid that, move the decision on whether or not to return the cached samples.khz value to arch_freq_get_on_cpu(). This change was part of commit 941f5f0f6ef5 ("x86: CPU: Fix up "cpu MHz" in /proc/cpuinfo"), but it was not the reason for the revert and it remains applicable. Fixes: 4815d3c56d1e (cpufreq: x86: Make scaling_cur_freq behave more as expected) Signed-off-by: Rafael J. Wysocki Reviewed-by: WANG Chao Signed-off-by: Linus Torvalds arch/x86/kernel/cpu/aperfmperf.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 99306dfc067e6098365d395168b6fd5db3095292 Merge: 3643b7e 120fc3f Author: Linus Torvalds Date: Mon Nov 13 19:07:38 2017 -0800 Merge branch 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 timer updates from Thomas Gleixner: "These updates are related to TSC handling: - Support platforms which have synchronized TSCs but the boot CPU has a non zero TSC_ADJUST value, which is considered a firmware bug on normal systems. This applies to HPE/SGI UV platforms where the platform firmware uses TSC_ADJUST to ensure TSC synchronization across a huge number of sockets, but due to power on timings the boot CPU cannot be guaranteed to have a zero TSC_ADJUST register value. - Fix the ordering of udelay calibration and kvmclock_init() - Cleanup the udelay and calibration code" * 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/tsc: Mark cyc2ns_init() and detect_art() __init x86/platform/UV: Mark tsc_check_sync as an init function x86/tsc: Make CONFIG_X86_TSC=n build work again x86/platform/UV: Add check of TSC state set by UV BIOS x86/tsc: Provide a means to disable TSC ART x86/tsc: Drastically reduce the number of firmware bug warnings x86/tsc: Skip TSC test and error messages if already unstable x86/tsc: Add option that TSC on Socket 0 being non-zero is valid x86/timers: Move simple_udelay_calibration() past kvmclock_init() x86/timers: Make recalibrate_cpu_khz() void x86/timers: Move the simple udelay calibration to tsc.h commit 3643b7e05b16a9fc4077ec56b655a1f8547d259c Merge: b18d628 2244645 Author: Linus Torvalds Date: Mon Nov 13 19:05:19 2017 -0800 Merge branch 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cache resource updates from Thomas Gleixner: "This update provides updates to RDT: - A diagnostic framework for the Resource Director Technology (RDT) user interface (sysfs). The failure modes of the user interface are hard to diagnose from the error codes. An extra last command status file provides now sensible textual information about the failure so its simpler to use. - A few minor cleanups and updates in the RDT code" * 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/intel_rdt: Fix a silent failure when writing zero value schemata x86/intel_rdt: Fix potential deadlock during resctrl mount x86/intel_rdt: Fix potential deadlock during resctrl unmount x86/intel_rdt: Initialize bitmask of shareable resource if CDP enabled x86/intel_rdt: Remove redundant assignment x86/intel_rdt/cqm: Make integer rmid_limbo_count static x86/intel_rdt: Add documentation for "info/last_cmd_status" x86/intel_rdt: Add diagnostics when making directories x86/intel_rdt: Add diagnostics when writing the cpus file x86/intel_rdt: Add diagnostics when writing the tasks file x86/intel_rdt: Add diagnostics when writing the schemata file x86/intel_rdt: Add framework for better RDT UI diagnostics commit b18d62891aaff49d0ee8367d4b6bb9452469f807 Merge: 7d58e1c 141d3b1 Author: Linus Torvalds Date: Mon Nov 13 18:29:23 2017 -0800 Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 APIC updates from Thomas Gleixner: "This update provides a major overhaul of the APIC initialization and vector allocation code: - Unification of the APIC and interrupt mode setup which was scattered all over the place and was hard to follow. This also distangles the timer setup from the APIC initialization which brings a clear separation of functionality. Great detective work from Dou Lyiang! - Refactoring of the x86 vector allocation mechanism. The existing code was based on nested loops and rather convoluted APIC callbacks which had a horrible worst case behaviour and tried to serve all different use cases in one go. This led to quite odd hacks when supporting the new managed interupt facility for multiqueue devices and made it more or less impossible to deal with the vector space exhaustion which was a major roadblock for server hibernation. Aside of that the code dealing with cpu hotplug and the system vectors was disconnected from the actual vector management and allocation code, which made it hard to follow and maintain. Utilizing the new bitmap matrix allocator core mechanism, the new allocator and management code consolidates the handling of system vectors, legacy vectors, cpu hotplug mechanisms and the actual allocation which needs to be aware of system and legacy vectors and hotplug constraints into a single consistent entity. This has one visible change: The support for multi CPU targets of interrupts, which is only available on a certain subset of CPUs/APIC variants has been removed in favour of single interrupt targets. A proper analysis of the multi CPU target feature revealed that there is no real advantage as the vast majority of interrupts end up on the CPU with the lowest APIC id in the set of target CPUs anyway. That change was agreed on by the relevant folks and allowed to simplify the implementation significantly and to replace rather fragile constructs like the vector cleanup IPI with straight forward and solid code. Furthermore this allowed to cleanly separate the allocation details for legacy, normal and managed interrupts: * Legacy interrupts are not longer wasting 16 vectors unconditionally * Managed interrupts have now a guaranteed vector reservation, but the actual vector assignment happens when the interrupt is requested. It's guaranteed not to fail. * Normal interrupts no longer allocate vectors unconditionally when the interrupt is set up (IO/APIC init or MSI(X) enable). The mechanism has been switched to a best effort reservation mode. The actual allocation happens when the interrupt is requested. Contrary to managed interrupts the request can fail due to vector space exhaustion, but drivers must handle a fail of request_irq() anyway. When the interrupt is freed, the vector is handed back as well. This solves a long standing problem with large unconditional vector allocations for a certain class of enterprise devices which prevented server hibernation due to vector space exhaustion when the unused allocated vectors had to be migrated to CPU0 while unplugging all non boot CPUs. The code has been equipped with trace points and detailed debugfs information to aid analysis of the vector space" * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (60 commits) x86/vector/msi: Select CONFIG_GENERIC_IRQ_RESERVATION_MODE PCI/MSI: Set MSI_FLAG_MUST_REACTIVATE in core code genirq: Add config option for reservation mode x86/vector: Use correct per cpu variable in free_moved_vector() x86/apic/vector: Ignore set_affinity call for inactive interrupts x86/apic: Fix spelling mistake: "symmectic" -> "symmetric" x86/apic: Use dead_cpu instead of current CPU when cleaning up ACPI/init: Invoke early ACPI initialization earlier x86/vector: Respect affinity mask in irq descriptor x86/irq: Simplify hotplug vector accounting x86/vector: Switch IOAPIC to global reservation mode x86/vector/msi: Switch to global reservation mode x86/vector: Handle managed interrupts proper x86/io_apic: Reevaluate vector configuration on activate() iommu/amd: Reevaluate vector configuration on activate() iommu/vt-d: Reevaluate vector configuration on activate() x86/apic/msi: Force reactivation of interrupts at startup time x86/vector: Untangle internal state from irq_cfg x86/vector: Compile SMP only code conditionally x86/apic: Remove unused callbacks ... commit 2c8a4a28233482ad697db92d86da10fcb498eaf7 Author: Jaegeuk Kim Date: Mon Nov 13 17:46:38 2017 -0800 f2fs: expose quota information in debugfs This patch shows # of dirty pages and # of hidden quota files. Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 11 +++++++++++ fs/f2fs/f2fs.h | 10 ++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) commit 12f9ef379a5039b8271b4636362b965267a78dda Author: Yunlei He Date: Fri Nov 10 13:36:51 2017 -0800 f2fs: separate nat entry mem alloc from nat_tree_lock This patch splits memory allocation part in nat_entry to avoid lock contention. Signed-off-by: Yunlei He Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 98 +++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 39 deletions(-) commit 7d58e1c9059eefe0066c5acf2ffa582f6f0180e3 Merge: 2bcc673 f4c09f8 Author: Linus Torvalds Date: Mon Nov 13 18:23:19 2017 -0800 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: "No functional changes, just removal of obsolete and outdated defines, macros and documentation" * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Get rid of CPU hotplug notifier leftovers cpu/hotplug: Remove obsolete notifier macros commit ee0ab7a2b00fdb65e50ed9e252900b29c8fd802f Author: Andrew Lunn Date: Sat Nov 11 16:29:41 2017 +0100 net: dsa: Fix dependencies on bridge DSA now uses one of the symbols exported by the bridge, br_vlan_enabled(). This has a stub, if the bridge is not enabled. However, if the bridge is enabled, we cannot have DSA built in and the bridge as a module, otherwise we get undefined symbols at link time: net/dsa/port.o: In function `dsa_port_vlan_add': net/dsa/port.c:255: undefined reference to `br_vlan_enabled' net/dsa/port.o: In function `dsa_port_vlan_del': net/dsa/port.c:270: undefined reference to `br_vlan_enabled' Reported-by: kbuild test robot Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 2bcc673101268dc50e52b83226c5bbf38391e16d Merge: 670310d b24591e Author: Linus Torvalds Date: Mon Nov 13 17:56:58 2017 -0800 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "Yet another big pile of changes: - More year 2038 work from Arnd slowly reaching the point where we need to think about the syscalls themself. - A new timer function which allows to conditionally (re)arm a timer only when it's either not running or the new expiry time is sooner than the armed expiry time. This allows to use a single timer for multiple timeout requirements w/o caring about the first expiry time at the call site. - A new NMI safe accessor to clock real time for the printk timestamp work. Can be used by tracing, perf as well if required. - A large number of timer setup conversions from Kees which got collected here because either maintainers requested so or they simply got ignored. As Kees pointed out already there are a few trivial merge conflicts and some redundant commits which was unavoidable due to the size of this conversion effort. - Avoid a redundant iteration in the timer wheel softirq processing. - Provide a mechanism to treat RTC implementations depending on their hardware properties, i.e. don't inflict the write at the 0.5 seconds boundary which originates from the PC CMOS RTC to all RTCs. No functional change as drivers need to be updated separately. - The usual small updates to core code clocksource drivers. Nothing really exciting" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (111 commits) timers: Add a function to start/reduce a timer pstore: Use ktime_get_real_fast_ns() instead of __getnstimeofday() timer: Prepare to change all DEFINE_TIMER() callbacks netfilter: ipvs: Convert timers to use timer_setup() scsi: qla2xxx: Convert timers to use timer_setup() block/aoe: discover_timer: Convert timers to use timer_setup() ide: Convert timers to use timer_setup() drbd: Convert timers to use timer_setup() mailbox: Convert timers to use timer_setup() crypto: Convert timers to use timer_setup() drivers/pcmcia: omap1: Fix error in automated timer conversion ARM: footbridge: Fix typo in timer conversion drivers/sgi-xp: Convert timers to use timer_setup() drivers/pcmcia: Convert timers to use timer_setup() drivers/memstick: Convert timers to use timer_setup() drivers/macintosh: Convert timers to use timer_setup() hwrng/xgene-rng: Convert timers to use timer_setup() auxdisplay: Convert timers to use timer_setup() sparc/led: Convert timers to use timer_setup() mips: ip22/32: Convert timers to use timer_setup() ... commit 98c58f7d176a025365219bf51079a004cb70cc7c Author: Markus Elfring Date: Tue Sep 26 16:54:20 2017 +0200 clk: kona-setup: Delete error messages for failed memory allocations Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Scott Branden Signed-off-by: Stephen Boyd drivers/clk/bcm/clk-kona-setup.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 658af6cbd4e4f62395d8dad7f76871de8159ee92 Author: Colin Ian King Date: Mon Sep 4 10:37:50 2017 +0100 ARC: clk: fix spelling mistake: "configurarion" -> "configuration" Trivial fix to spelling mistake in dev_dbg message Signed-off-by: Colin Ian King Signed-off-by: Stephen Boyd drivers/clk/clk-hsdk-pll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9416a5f8842a37dc356b7855867d20db6dfa9e3a Author: Colin Ian King Date: Tue Sep 5 16:03:48 2017 +0100 clk: cdce925: remove redundant check for non-null parent_name The check for a non-null parent_name is always true as there is an earlier check for a null parent_name that returns -ENODEV. Remove this redundant check and always set init.num_parents to 1. Detected by CoverityScan CID#1309477 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: Stephen Boyd drivers/clk/clk-cdce925.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a72da43c92dc09488ac2944b103de037c435302a Author: Markus Elfring Date: Wed Sep 27 21:24:43 2017 +0200 clk: versatile: Improve sizeof() usage 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. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Linus Walleij Signed-off-by: Stephen Boyd drivers/clk/versatile/clk-icst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e343b81e4d9d1551ec3a651a7d30630a268fd35e Author: Markus Elfring Date: Wed Sep 27 21:21:23 2017 +0200 clk: versatile: Delete error messages for failed memory allocations Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Linus Walleij Signed-off-by: Stephen Boyd drivers/clk/versatile/clk-icst.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 0b10adbae303ecdb78c779eabb7ab587c91d324c Author: Markus Elfring Date: Wed Sep 27 20:30:53 2017 +0200 clk: ux500: Improve sizeof() usage Replace the specification of 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. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Ulf Hansson Signed-off-by: Stephen Boyd drivers/clk/ux500/clk-prcc.c | 2 +- drivers/clk/ux500/clk-prcmu.c | 2 +- drivers/clk/ux500/clk-sysctrl.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 7a294dc6c85d6cea181055c5412bb44a499e3816 Author: Markus Elfring Date: Wed Sep 27 20:23:58 2017 +0200 clk: ux500: Delete error messages for failed memory allocations Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Ulf Hansson Signed-off-by: Stephen Boyd drivers/clk/ux500/clk-prcc.c | 4 +--- drivers/clk/ux500/clk-prcmu.c | 4 +--- drivers/clk/ux500/clk-sysctrl.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) commit 63b1a5d75090ac41369d06d609d3268dbf16d41f Author: Markus Elfring Date: Wed Sep 27 18:00:21 2017 +0200 clk: spear: Delete error messages for failed memory allocations Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Viresh Kumar Signed-off-by: Stephen Boyd drivers/clk/spear/clk-aux-synth.c | 4 +--- drivers/clk/spear/clk-frac-synth.c | 4 +--- drivers/clk/spear/clk-gpt-synth.c | 4 +--- drivers/clk/spear/clk-vco-pll.c | 8 ++------ 4 files changed, 5 insertions(+), 15 deletions(-) commit f80c8a29f94faf6d4a2a3b25d4473d62edbd7aab Author: Markus Elfring Date: Wed Sep 27 19:14:01 2017 +0200 clk: ti: Delete error messages for failed memory allocations Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/ti/divider.c | 4 +--- drivers/clk/ti/mux.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) commit 7a3aad90d331de9b78ea8d292bb4fd4f9ecdfd75 Author: Markus Elfring Date: Wed Sep 27 09:00:21 2017 +0200 clk: mmp: Adjust checks for NULL pointers The script “checkpatch.pl” pointed information out like the following: Comparison to NULL could be written !... Thus fix the affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/mmp/clk-mix.c | 4 ++-- drivers/clk/mmp/clk-mmp2.c | 6 +++--- drivers/clk/mmp/clk-pxa168.c | 6 +++--- drivers/clk/mmp/clk-pxa910.c | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) commit e9baa279949fff9f78f3ad0e1606f7b148746765 Author: Markus Elfring Date: Tue Sep 26 22:33:18 2017 +0200 clk: mmp: Use common error handling code in mmp_clk_register_mix() Add a jump target so that a bit of exception handling can be better reused at the end of this function. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/mmp/clk-mix.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 1cc36f73005427c7a74b0fdf0177cd0bf981e9ff Author: Markus Elfring Date: Tue Sep 26 22:25:38 2017 +0200 clk: mmp: Delete error messages for failed memory allocations Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/mmp/clk-frac.c | 4 +--- drivers/clk/mmp/clk-gate.c | 4 +--- drivers/clk/mmp/clk-mix.c | 9 +-------- 3 files changed, 3 insertions(+), 14 deletions(-) commit 62c73ed5bf6372bd8417897ea9dcaf1d50d50de6 Author: Markus Elfring Date: Tue Sep 26 21:27:52 2017 +0200 clk: clk-xgene: Adjust six checks for null pointers The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written ... Thus fix the affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/clk-xgene.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e335545f5d864c47768e932e08667480667d9e97 Author: Markus Elfring Date: Tue Sep 26 21:19:19 2017 +0200 clk: clk-xgene: Delete error messages for failed memory allocations Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/clk-xgene.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit bb208f211c152d3d398eed95b4e5e5d8345457cb Author: Markus Elfring Date: Tue Sep 26 19:57:50 2017 +0200 clk: clk-u300: Fix a typo in two comment lines Add a missing character in these descriptions. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/clk-u300.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e6b332ab7dcfb3119dcd513b973c182249c33717 Author: Markus Elfring Date: Tue Sep 26 19:46:51 2017 +0200 clk: clk-u300: Add some spaces for better code readability Use space characters at some source code places according to the Linux coding style convention. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/clk-u300.c | 64 +++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit 27f8a53a9decfd7ad785543eb4e2c3d44434c01e Author: Markus Elfring Date: Tue Sep 26 19:33:02 2017 +0200 clk: clk-u300: Improve sizeof() usage Replace the specification of 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. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/clk-u300.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit de8cd467e413906265eaa1f8af8d2da0f0d63c40 Author: Markus Elfring Date: Tue Sep 26 19:30:46 2017 +0200 clk: clk-u300: Delete error messages for failed memory allocations Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/clk-u300.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 670310dfbae0eefe7318ff6a61e29e67a7a7bbce Merge: 43ff2f4 ffc661c Author: Linus Torvalds Date: Mon Nov 13 17:33:11 2017 -0800 Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq core updates from Thomas Gleixner: "A rather large update for the interrupt core code and the irq chip drivers: - Add a new bitmap matrix allocator and supporting changes, which is used to replace the x86 vector allocator which comes with separate pull request. This allows to replace the convoluted nested loop allocation function in x86 with a facility which supports the recently added property of managed interrupts proper and allows to switch to a best effort vector reservation scheme, which addresses problems with vector exhaustion. - A large update to the ARM GIC-V3-ITS driver adding support for range selectors. - New interrupt controllers: - Meson and Meson8 GPIO - BCM7271 L2 - Socionext EXIU If you expected that this will stop at some point, I have to disappoint you. There are new ones posted already. Sigh! - STM32 interrupt controller support for new platforms. - A pile of fixes, cleanups and updates to the MIPS GIC driver - The usual small fixes, cleanups and updates all over the place. Most visible one is to move the irq chip drivers Kconfig switches into a separate Kconfig menu" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (70 commits) genirq: Fix type of shifting literal 1 in __setup_irq() irqdomain: Drop pointless NULL check in virq_debug_show_one genirq/proc: Return proper error code when irq_set_affinity() fails irq/work: Use llist_for_each_entry_safe irqchip: mips-gic: Print warning if inherited GIC base is used irqchip/mips-gic: Add pr_fmt and reword pr_* messages irqchip/stm32: Move the wakeup on interrupt mask irqchip/stm32: Fix initial values irqchip/stm32: Add stm32h7 support dt-bindings/interrupt-controllers: Add compatible string for stm32h7 irqchip/stm32: Add multi-bank management irqchip/stm32: Select GENERIC_IRQ_CHIP irqchip/exiu: Add support for Socionext Synquacer EXIU controller dt-bindings: Add description of Socionext EXIU interrupt controller irqchip/gic-v3-its: Fix VPE activate callback return value irqchip: mips-gic: Make IPI bitmaps static irqchip: mips-gic: Share register writes in gic_set_type() irqchip: mips-gic: Remove gic_vpes variable irqchip: mips-gic: Use num_possible_cpus() to reserve IPIs irqchip: mips-gic: Configure EIC when CPUs come online ... commit 1e28733e315e9ede15896600a475408d2a203a32 Author: Markus Elfring Date: Tue Sep 26 17:30:06 2017 +0200 clk: clk-mux: Improve a size determination in clk_hw_register_mux_table() 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. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Stephen Boyd drivers/clk/clk-mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b910402cfa0d3b3de666d68d107b30bf13e164e Author: Markus Elfring Date: Tue Sep 26 17:23:04 2017 +0200 clk: clk-mux: Delete an error message for a failed memory allocation Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring [sboyd@codeaurora.org: Cleanup commit text] Signed-off-by: Stephen Boyd drivers/clk/clk-mux.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c25141062a82ae8bddced1b3ce2b57a1c0efabe0 Merge: 26dd633 c1b433e Author: Dmitry Torokhov Date: Mon Nov 13 17:10:13 2017 -0800 Merge branch 'next' into for-linus Prepare input updates for 4.15 merge window. commit 43ff2f4db9d0f76452b77cfa645f02b471143b24 Merge: 13e57da 418492b Author: Linus Torvalds Date: Mon Nov 13 17:04:36 2017 -0800 Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform updates from Ingo Molnar: "The main changes in this cycle were: - a refactoring of the early virt init code by merging 'struct x86_hyper' into 'struct x86_platform' and 'struct x86_init', which allows simplifications and also the addition of a new ->guest_late_init() callback. (Juergen Gross) - timer_setup() conversion of the UV code (Kees Cook)" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/virt/xen: Use guest_late_init to detect Xen PVH guest x86/virt, x86/platform: Add ->guest_late_init() callback to hypervisor_x86 structure x86/virt, x86/acpi: Add test for ACPI_FADT_NO_VGA x86/virt: Add enum for hypervisors to replace x86_hyper x86/virt, x86/platform: Merge 'struct x86_hyper' into 'struct x86_platform' and 'struct x86_init' x86/platform/UV: Convert timers to use timer_setup() commit 13e57da4a5eaae0b400cf06c37b7e9b5347b7335 Merge: eb4d47c 77072f0 Author: Linus Torvalds Date: Mon Nov 13 17:02:57 2017 -0800 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 change enhancing stack traces by hiding wrapper function entries" * 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/stacktrace: Avoid recording save_stack_trace() wrappers commit eb4d47c8ce5bc2dac5f9ffc27dc9594f6bc2cacb Merge: 6a9f70b 642e641 Author: Linus Torvalds Date: Mon Nov 13 16:58:05 2017 -0800 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 changes: Propagate const/__initconst, and use ARRAY_SIZE() some more" * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/events/amd/iommu: Make iommu_pmu const and __initconst x86: Use ARRAY_SIZE commit 253696ccd613fbdaa5aba1de44c461a058e0a114 Author: Stefan Schake Date: Fri Nov 10 02:05:06 2017 +0100 drm/vc4: Account for interrupts in flight Synchronously disable the IRQ to make the following cancel_work_sync invocation effective. An interrupt in flight could enqueue further overflow mem work. As we free the binner BO immediately following vc4_irq_uninstall this caused a NULL pointer dereference in the work callback vc4_overflow_mem_work. Link: https://github.com/anholt/linux/issues/114 Signed-off-by: Stefan Schake Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.") Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1510275907-993-2-git-send-email-stschake@gmail.com drivers/gpu/drm/vc4/vc4_irq.c | 6 ++++++ 1 file changed, 6 insertions(+) commit aaa422c4c3f6ee958ea9d6c9260ac40f90a3f4e9 Author: Dan Williams Date: Mon Nov 13 16:38:44 2017 -0800 fs, dax: unify IOMAP_F_DIRTY read vs write handling policy in the dax core While reviewing whether MAP_SYNC should strengthen its current guarantee of syncing writes from the initiating process to also include third-party readers observing dirty metadata, Dave pointed out that the check of IOMAP_WRITE is misplaced. The policy of what to with IOMAP_F_DIRTY should be separated from the generic filesystem mechanism of reporting dirty metadata. Move this policy to the fs-dax core to simplify the per-filesystem iomap handlers, and further centralize code that implements the MAP_SYNC policy. This otherwise should not change behavior, it just makes it easier to change behavior in the future. Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Cc: Ross Zwisler Reported-by: Dave Chinner Signed-off-by: Dan Williams fs/dax.c | 15 +++++++++++++-- fs/ext4/inode.c | 2 +- fs/xfs/xfs_iomap.c | 4 ++-- 3 files changed, 16 insertions(+), 5 deletions(-) commit 6a9f70b0a5b3ca5db1dd5c7743ca555bfca2ae08 Merge: d6ec9d9 6c3b56b Author: Linus Torvalds Date: Mon Nov 13 16:32:30 2017 -0800 Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot updates from Ingo Molnar: "Three smaller changes: - clang fix - boot message beautification - unnecessary header inclusion removal" * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Disable Clang warnings about GNU extensions x86/boot: Remove unnecessary #include x86/boot: Spell out "boot CPU" for BP commit fb2a1748355161e050e9f49f1ea9a0ae707a148b Author: Dan Williams Date: Sun Nov 12 14:54:23 2017 -0800 tools/testing/nvdimm: unit test clear-error commands Validate command parsing in acpi_nfit_ctl for the clear error command. This tests for a crash condition introduced by commit 4b27db7e26cd "acpi, nfit: add support for the _LSI, _LSR, and _LSW label methods". Cc: Vishal Verma Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit aa25e446ce76c37bfd75ac06598c316af94e9a26 Author: Rob Herring Date: Thu Nov 9 16:00:55 2017 -0600 dt-bindings: usb: add #phy-cells to usb-nop-xceiv Consumers of usb-nop-xceiv use the phy binding, but #phy-cells is missing from the binding. This is probably because this binding predates the common phy binding. So add #phy-cells as a required property. This should not break any users as missing should be treated as 0 cells. Signed-off-by: Rob Herring Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt | 2 ++ 1 file changed, 2 insertions(+) commit f3156851616b4f3cb1d6c567fe46adcfd43ad8f8 Author: Vineet Gupta Date: Fri Nov 10 12:40:00 2017 -0800 ARCv2: boot log: updates for HS48: dual-issue, ECC, Loop Buffer Print the hardware support for ECC, Loop Buffer as well as the runtime enabled status Note that unlike the existing boot printing, this one is not read from pre-decoded hardware capabilty info cached in cpuinfo[] struct. Instead we read the AUX regs on the spot and print it, without botherign to save anywhere. There is no point in saving static hardware capabilites in memory when its use is very sporadic and non-performance critical, mainly for /proc/cpuinfo. This gets worse in SMP, given it is per-cpu, and pretty much exactly same across all cpus. So only info needed at runtime (e.g. TLB geometry) needs to be cached in cpuinfo[]. So going fwd we will start converting code to this paradigm. Signed-off-by: Vineet Gupta arch/arc/include/asm/arcregs.h | 33 +++++++++++++++++++++++++++++++- arch/arc/kernel/setup.c | 43 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 71 insertions(+), 5 deletions(-) commit e99a30de13822685110cfc843a07a035d4aa6253 Author: Ken Chalmers Date: Thu Nov 2 10:45:12 2017 -0400 drm/amd/display: use num_timing_generator instead of pipe_count The two are not necessarily the same. Signed-off-by: Ken Chalmers Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ef39a6224e0f18222a9b75f00d24cdd0c755612 Author: Roman Li Date: Thu Oct 26 18:43:58 2017 -0400 drm/amd/display: use configurable FBC option in dm Replace ENABLE_FBC macro with config option CONFIG_DRM_AMD_DC_FBC in dm. DC code has been already updated the same way. Signed-off-by: Roman Li Reviewed-by: Shirish Shankarappa Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 6a5a8ca9decab46423257e220475fa30e4e3333e Author: Charlene Liu Date: Wed Oct 25 14:12:51 2017 -0400 drm/amd/display: fix AZ clock not enabled before program AZ endpoint Signed-off-by: Charlene Liu Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 31 ++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) commit a11949ec20635b43d82ee229315fd2e3c80c22a3 Author: Tobin C. Harding Date: Tue Nov 14 09:25:11 2017 +1100 leaking_addresses: add SigIgn to false positives Signal masks are false positives, we already check for SigBlk and SigCgt but we missed SigIgn. Add SigIgn to false positive check. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 1 + 1 file changed, 1 insertion(+) commit dd98c252aea2a3dcd4014cb71bcdf9588519b800 Author: Tobin C. Harding Date: Thu Nov 9 15:37:06 2017 +1100 leaking_addresses: add timeout on file read Currently script can stall if we read certain files (like /proc/kmsg). While we have a mechanism to skip these files once they are discovered it would be nice to not stall on as yet undiscovered files of this kind. Set a timer before each file is parsed, warn user if timer expires. Suggested-by: Kees Cook Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 62139c1242b573cb647776e3abc503a69fbd2c08 Author: Tobin C. Harding Date: Thu Nov 9 15:19:40 2017 +1100 leaking_addresses: add support for ppc64 Currently script is targeted at x86_64. We can support other architectures by using the correct regular expressions for each architecture. Add the infrastructure to support multiple architectures. Add support for ppc64. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 66 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 60 insertions(+), 6 deletions(-) commit d09bd8da8812a4df69ea3303e6df846a729ec623 Author: Tobin C. Harding Date: Thu Nov 9 15:07:15 2017 +1100 leaking_addresses: add summary reporting options Currently script just dumps all results found. Potentially, this risks losing single results among multiple duplicate results. We need some way of restricting duplicates to assist users of the script. It would also be nice if we got a report instead of raw results. Duplicates can be defined in various ways, instead of trying to find a single perfect solution we can present the user with various options to display the output. Doing so will typically lead to users wanting to view the output multiple times. Currently we scan the kernel each time, this is slow and unnecessary. We can expedite the process by writing the results to file for subsequent viewing. Add command line options to enable summary reporting, including options to write to and read from file. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 191 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 188 insertions(+), 3 deletions(-) commit 1c1e3be0bf37db1396b4ecd995992643a6d92c00 Author: Tobin C. Harding Date: Thu Nov 9 14:02:41 2017 +1100 leaking_addresses: add to exclude files/paths list There are a couple more files that cause the script to stall. /sys/firmware/devicetree and its symlink /proc/device-tree, reported by Michael Ellerman. usbmon should be skipped were ever it appears. Reported by Kees Cook Add files to be excluded from parsing. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 3 +++ 1 file changed, 3 insertions(+) commit a284733e26e8e173cb5f589531a655d723ecb3ea Author: Tobin C. Harding Date: Thu Nov 9 13:28:43 2017 +1100 leaking_addresses: fix comment string typo Fix typo in comment string. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecd39dbd27d6f2907630678cbff464374edff8fe Author: Tobin C. Harding Date: Wed Nov 8 11:11:09 2017 +1100 leaking_addresses: remove command line options Currently script accepts files to skip. This was added to make running the script faster (for repeat runs). We can remove this functionality in preparation for adding sub commands (scan and format) to the script. Remove command line options. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 58 -------------------------------------------- 1 file changed, 58 deletions(-) commit fa31a58202c5d9ebb26f562913b17e81357fe0e7 Author: Tobin C. Harding Date: Wed Nov 8 11:04:27 2017 +1100 leaking_addresses: remove dead/unused code debug_arrays is not called. Also, %seen hash is not used. We should remove unused code. Remove dead code. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 9 --------- 1 file changed, 9 deletions(-) commit 7e5758f7f74a591b52c6e8a8cfe82e6288ddced0 Author: Tobin C. Harding Date: Wed Nov 8 11:01:59 2017 +1100 leaking_addresses: use tabs instead of spaces Current code uses spaces instead of tabs in places. Use tabs instead of spaces. Signed-off-by: Tobin C. Harding scripts/leaking_addresses.pl | 54 ++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit d6ec9d9a4def52a5094237564eaf6f6979fd7a27 Merge: 3e20146 91a6a6c Author: Linus Torvalds Date: Mon Nov 13 14:13:48 2017 -0800 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 core updates from Ingo Molnar: "Note that in this cycle most of the x86 topics interacted at a level that caused them to be merged into tip:x86/asm - but this should be a temporary phenomenon, hopefully we'll back to the usual patterns in the next merge window. The main changes in this cycle were: Hardware enablement: - Add support for the Intel UMIP (User Mode Instruction Prevention) CPU feature. This is a security feature that disables certain instructions such as SGDT, SLDT, SIDT, SMSW and STR. (Ricardo Neri) [ Note that this is disabled by default for now, there are some smaller enhancements in the pipeline that I'll follow up with in the next 1-2 days, which allows this to be enabled by default.] - Add support for the AMD SEV (Secure Encrypted Virtualization) CPU feature, on top of SME (Secure Memory Encryption) support that was added in v4.14. (Tom Lendacky, Brijesh Singh) - Enable new SSE/AVX/AVX512 CPU features: AVX512_VBMI2, GFNI, VAES, VPCLMULQDQ, AVX512_VNNI, AVX512_BITALG. (Gayatri Kammela) Other changes: - A big series of entry code simplifications and enhancements (Andy Lutomirski) - Make the ORC unwinder default on x86 and various objtool enhancements. (Josh Poimboeuf) - 5-level paging enhancements (Kirill A. Shutemov) - Micro-optimize the entry code a bit (Borislav Petkov) - Improve the handling of interdependent CPU features in the early FPU init code (Andi Kleen) - Build system enhancements (Changbin Du, Masahiro Yamada) - ... plus misc enhancements, fixes and cleanups" * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (118 commits) x86/build: Make the boot image generation less verbose selftests/x86: Add tests for the STR and SLDT instructions selftests/x86: Add tests for User-Mode Instruction Prevention x86/traps: Fix up general protection faults caused by UMIP x86/umip: Enable User-Mode Instruction Prevention at runtime x86/umip: Force a page fault when unable to copy emulated result to user x86/umip: Add emulation code for UMIP instructions x86/cpufeature: Add User-Mode Instruction Prevention definitions x86/insn-eval: Add support to resolve 16-bit address encodings x86/insn-eval: Handle 32-bit address encodings in virtual-8086 mode x86/insn-eval: Add wrapper function for 32 and 64-bit addresses x86/insn-eval: Add support to resolve 32-bit address encodings x86/insn-eval: Compute linear address in several utility functions resource: Fix resource_size.cocci warnings X86/KVM: Clear encryption attribute when SEV is active X86/KVM: Decrypt shared per-cpu variables when SEV is active percpu: Introduce DEFINE_PER_CPU_DECRYPTED x86: Add support for changing memory encryption attribute in early boot x86/io: Unroll string I/O when SEV is active x86/boot: Add early boot support when running with SEV active ... commit 4190b4e96954e2c3597021d29435c3f8db8d3129 Author: Leon Romanovsky Date: Mon Nov 13 10:51:19 2017 +0200 RDMA/core: Rename kernel modify_cq to better describe its usage Current ib_modify_cq() is used to set CQ moderation parameters. This patch renames ib_modify_cq() to be rdma_set_cq_moderation(), because the kernel version of RDMA API doesn't need to follow already exposed to user's API pattern (create_XXX/modify_XXX/query_XXX/destroy_XXX) and better to have more accurate name which describes the actual usage. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 2 +- drivers/infiniband/core/verbs.c | 4 ++-- drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 5 +++-- include/rdma/ib_verbs.h | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) commit 87ab3f524efd171699d21bbc98b1268acb476da5 Author: Yonatan Cohen Date: Mon Nov 13 10:51:18 2017 +0200 IB/mlx5: Add CQ moderation capability to query_device query_device can now obtain the maximum values for cq_max_count and cq_period, needed for cq moderation. Signed-off-by: Yonatan Cohen Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 0fd586de65ae6a249433e1b496f5ed9ce199be73 Author: Yonatan Cohen Date: Mon Nov 13 10:51:17 2017 +0200 IB/mlx4: Add CQ moderation capability to query_device query_device can now obtain the maximum values for cq_max_count and cq_period, needed for cq moderation. Signed-off-by: Yonatan Cohen Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 3 +++ 1 file changed, 3 insertions(+) commit 18bd90729237dc6ddbad01bc9618148224f03590 Author: Yonatan Cohen Date: Mon Nov 13 10:51:16 2017 +0200 IB/uverbs: Add CQ moderation capability to query_device The query_device function can now obtain the maximum values for cq_max_count and cq_period, needed for CQ moderation. cq_max_count is a 16 bits number that determines the number of CQEs to accumulate before generating an event. cq_period is a 16 bits number that determines the timeout in micro seconds from the last event generated, upon which a new event will be generated even if cq_max_count was not reached. Signed-off-by: Yonatan Cohen Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 9 +++++++++ include/rdma/ib_verbs.h | 6 ++++++ include/uapi/rdma/ib_user_verbs.h | 7 +++++++ 3 files changed, 22 insertions(+) commit b0e9df6da25890448ebd134b7f647f16bced9abc Author: Yonatan Cohen Date: Mon Nov 13 10:51:15 2017 +0200 IB/mlx5: Exposing modify CQ callback to uverbs layer Exposed mlx5_ib_modify_cq to be called from ib device verb list. Signed-off-by: Yonatan Cohen Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/cq.c | 3 +++ drivers/infiniband/hw/mlx5/main.c | 3 ++- include/linux/mlx5/cq.h | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) commit 34d9a270e74a412f041b528c33b75e3e6bc7a242 Author: Yonatan Cohen Date: Mon Nov 13 10:51:14 2017 +0200 IB/mlx4: Exposing modify CQ callback to uverbs layer Exposed mlx4_ib_modify_cq to be called from ib device verb list. Signed-off-by: Yonatan Cohen Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 3 +++ drivers/infiniband/hw/mlx4/mlx4_ib.h | 1 + include/linux/mlx4/cq.h | 3 +++ 3 files changed, 7 insertions(+) commit 869ddcf8b351ace5bf8860f3cd6265dccb382426 Author: Yonatan Cohen Date: Mon Nov 13 10:51:13 2017 +0200 IB/uverbs: Allow CQ moderation with modify CQ Uverbs support in modify_cq for CQ moderation only. Gives ability to change cq_max_count and cq_period. CQ moderation enhance performance by moderating the number of CQEs needed to create an event instead of application having to suffer from event per-CQE. To achieve CQ moderation the application needs to set cq_max_count and cq_period. cq_max_count - defines the number of CQEs needed to create an event. cq_period - defines the timeout (micro seconds) between last event and a new one that will occur even if cq_max_count was not satisfied Signed-off-by: Yonatan Cohen Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs.h | 1 + drivers/infiniband/core/uverbs_cmd.c | 42 +++++++++++++++++++++++++++++++++++ drivers/infiniband/core/uverbs_main.c | 1 + include/rdma/ib_verbs.h | 4 ++++ include/uapi/rdma/ib_user_verbs.h | 15 ++++++++++++- 5 files changed, 62 insertions(+), 1 deletion(-) commit bc52e9ca74b9a395897bb640c6671b2cbf716032 Author: Steve Wise Date: Thu Nov 9 07:21:26 2017 -0800 iw_cxgb4: atomically flush the qp __flush_qp() has a race condition where during the flush operation, the qp lock is released allowing another thread to possibly post a WR, which corrupts the queue state, possibly causing crashes. The lock was released to preserve the cq/qp locking hierarchy of cq first, then qp. However releasing the qp lock is not necessary; both RQ and SQ CQ locks can be acquired first, followed by the qp lock, and then the RQ and SQ flushing can be done w/o unlocking. Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/qp.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit cbb40fadd31c6bbc59104e58ac95c6ef492d038b Author: Steve Wise Date: Thu Nov 9 07:14:43 2017 -0800 iw_cxgb4: only call the cq comp_handler when the cq is armed The ULPs completion handler should only be called if the CQ is armed for notification. Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/ev.c | 8 +++++--- drivers/infiniband/hw/cxgb4/qp.c | 20 ++++++++++++-------- 2 files changed, 17 insertions(+), 11 deletions(-) commit 1c8f1da5d851b92aeb81dbbb9ebd516f6e2588f5 Author: Bharat Potnuri Date: Thu Nov 9 17:47:33 2017 +0530 iw_cxgb4: Fix possible circular dependency locking warning Locking sequence of iw_cxgb4 and RoCE drivers in ib_register_device() is slightly different and this leads to possible circular dependency locking warning when both the devices are brought up. Here is the locking sequence upto ib_register_device(): iw_cxgb4: rtnl_mutex(net stack) --> uld_mutex --> device_mutex RoCE drivers: device_mutex --> rtnl_mutex Here is the possibility of cross locking: CPU #0 (iw_cxgb4) CPU #1 (RoCE drivers) -> on interface up cxgb4_up() executed with rtnl_mutex held -> hold uld_mutex and try registering ib device -> In ib_register_device() hold device_mutex -> hold device mutex in ib_register_device -> try acquiring rtnl_mutex in ib_enum_roce_netdev() Current patch schedules the ib_register_device() functionality of iw_cxgb4 to a workqueue to prevent the possible cross-locking. Also rename the labels in c4iw_reister_device(). Signed-off-by: Potnuri Bharat Teja Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/device.c | 28 +++++++++++++--------------- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 10 +++++++++- drivers/infiniband/hw/cxgb4/provider.c | 26 +++++++++++++++++--------- 3 files changed, 39 insertions(+), 25 deletions(-) commit 3e2014637c50e5d6a77cd63d5db6c209fe29d1b1 Merge: f2be8bd 765cc3a Author: Linus Torvalds Date: Mon Nov 13 13:37:52 2017 -0800 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: "The main updates in this cycle were: - Group balancing enhancements and cleanups (Brendan Jackman) - Move CPU isolation related functionality into its separate kernel/sched/isolation.c file, with related 'housekeeping_*()' namespace and nomenclature et al. (Frederic Weisbecker) - Improve the interactive/cpu-intense fairness calculation (Josef Bacik) - Improve the PELT code and related cleanups (Peter Zijlstra) - Improve the logic of pick_next_task_fair() (Uladzislau Rezki) - Improve the RT IPI based balancing logic (Steven Rostedt) - Various micro-optimizations: - better !CONFIG_SCHED_DEBUG optimizations (Patrick Bellasi) - better idle loop (Cheng Jian) - ... plus misc fixes, cleanups and updates" * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (54 commits) sched/core: Optimize sched_feat() for !CONFIG_SCHED_DEBUG builds sched/sysctl: Fix attributes of some extern declarations sched/isolation: Document isolcpus= boot parameter flags, mark it deprecated sched/isolation: Add basic isolcpus flags sched/isolation: Move isolcpus= handling to the housekeeping code sched/isolation: Handle the nohz_full= parameter sched/isolation: Introduce housekeeping flags sched/isolation: Split out new CONFIG_CPU_ISOLATION=y config from CONFIG_NO_HZ_FULL sched/isolation: Rename is_housekeeping_cpu() to housekeeping_cpu() sched/isolation: Use its own static key sched/isolation: Make the housekeeping cpumask private sched/isolation: Provide a dynamic off-case to housekeeping_any_cpu() sched/isolation, watchdog: Use housekeeping_cpumask() instead of ad-hoc version sched/isolation: Move housekeeping related code to its own file sched/idle: Micro-optimize the idle loop sched/isolcpus: Fix "isolcpus=" boot parameter handling when !CONFIG_CPUMASK_OFFSTACK x86/tsc: Append the 'tsc=' description for the 'tsc=unstable' boot parameter sched/rt: Simplify the IPI based RT balancing logic block/ioprio: Use a helper to check for RT prio sched/rt: Add a helper to test for a RT task ... commit eeb690bceb1eb95f6c1c526079e1315dd459855e Author: Linus Walleij Date: Mon Nov 13 22:36:12 2017 +0100 pinctrl: gemini: Fix missing pad descriptions A pretty clever static checker found a bug in my patch: I added more bits to a bitmask but didn't extend the array indexed to the same bitmask. Fixes: 756a024f3983 ("pinctrl: gemini: Fix GMAC groups") Reported-by: Dan Carpenter Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-gemini.c | 2 ++ 1 file changed, 2 insertions(+) commit f2be8bd52e7410c70145f73511a2e80f4797e1a5 Merge: 3148637 783ca51 Author: Linus Torvalds Date: Mon Nov 13 13:33:39 2017 -0800 Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS updates from Ingo Molnar: "Two minor updates to AMD SMCA support, plus a timer_setup() conversion" * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/MCE/AMD: Fix mce_severity_amd_smca() signature x86/MCE/AMD: Always give panic severity for UC errors in kernel context x86/mce: Convert timers to use timer_setup() commit 84511455ac5bd2fec100c5b07b21f725eaa536f6 Author: Devesh Sharma Date: Wed Nov 8 02:48:45 2017 -0500 RDMA/bnxt_re: report vlan_id and sl in qp1 recv completion In a real RoCE v2 network it is possible to have two Sections of network have same IP hence same gid. However those may have different vlans. During connection resolution it is important to report the actual vlan on which the MAD packet was received instead of relying on other means to resolve vlan-id. ib_find_gid_index should not be used to resolve the vlan-id using sgid of the local system where the packet was received. Our device has the capability to report the actual VLAN-ID in the GSI qp completions. Since we have the capability our driver should move away from resolving the vlan-id with the help of SGID at the destination port. Signed-off-by: Devesh Sharma Reported-by: Parav Pandit Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 35 +++++++++++++++++++++++++++++++- drivers/infiniband/hw/bnxt_re/qplib_fp.c | 1 + 2 files changed, 35 insertions(+), 1 deletion(-) commit fd35b2023b617ceadfce679ff091c6f652f7c878 Author: Linus Walleij Date: Mon Nov 13 11:04:27 2017 +0100 pinctrl: Add some depends on HAS_IOMEM Some compilation fallout from UM Linux (which does not have IOMEM) makes it necessary to depend on HAS_IOMEM for drivers that doesn't have other factors restricting their selection. Cc: Phil Reid Reviewed-by: Sebastian Reichel Reported-by: R. Daneel Olivaw Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 877add28178a7fa3c68f29c450d050a8e6513f08 Author: Daniel Jurgens Date: Tue Nov 7 18:33:26 2017 +0200 IB/core: Only maintain real QPs in the security lists When modify QP is called on a shared QP update the security context for the real QP. When security is subsequently enforced the shared QP handles will be checked as well. Without this change shared QP handles get added to the port/pkey lists, which is a bug, because not all shared QP handles will be checked for access. Also the shared QP security context wouldn't get removed from the port/pkey lists causing access to free memory and list corruption when they are destroyed. Cc: stable@vger.kernel.org Fixes: d291f1a65232 ("IB/core: Enforce PKey security on QPs") Signed-off-by: Daniel Jurgens Reviewed-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/security.c | 51 +++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 23 deletions(-) commit f4e96c1a717176dc52843a41b549aaa9128279c2 Author: Gustavo A. R. Silva Date: Tue Nov 7 08:45:17 2017 -0600 IB/ocrdma_hw: remove unnecessary code in ocrdma_mbx_dealloc_lkey Check on return value and goto label mbx_err are unnecessary. Addresses-Coverity-ID: 1268780 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit e08ce2e82b2fc5cdd07de170e8b9e8327625005c Author: Yuval Shaia Date: Tue Nov 7 10:49:09 2017 +0200 RDMA/core: Make function rdma_copy_addr return void Function returns zero - make it void. While there make struct net_device const. Signed-off-by: Yuval Shaia Reviewed-by: Parav Pandit Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/addr.c | 27 ++++++++++++++------------- drivers/infiniband/core/cma.c | 8 ++------ include/rdma/ib_addr.h | 5 +++-- 3 files changed, 19 insertions(+), 21 deletions(-) commit 8b10ba783c9d0c69d53e7d78ff7f2cd921f80729 Author: Bryan Tan Date: Mon Nov 6 11:48:53 2017 -0800 RDMA/vmw_pvrdma: Add shared receive queue support Add the required functions needed to support SRQs. Currently, kernel clients are not supported. SRQs will only be available in userspace. Reviewed-by: Adit Ranadive Reviewed-by: Aditya Sarwade Reviewed-by: Jorgen Hansen Reviewed-by: Nitish Bhat Signed-off-by: Bryan Tan Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/vmw_pvrdma/Makefile | 2 +- drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 25 ++ drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h | 54 ++++ drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 59 +++- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 55 +++- drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c | 319 ++++++++++++++++++++++ drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 3 + drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h | 18 ++ include/uapi/rdma/vmw_pvrdma-abi.h | 2 + 9 files changed, 523 insertions(+), 14 deletions(-) commit cb9fd89f91337aaca9c96d265930f22b31462e5e Author: Arnd Bergmann Date: Fri Nov 10 23:10:31 2017 +0100 RDMA/core: avoid uninitialized variable warning in create_udata As Dan pointed out, the rework I did makes it harder for smatch and other static checkers to figure out what is going on with the uninitialized pointers. By open-coding the call in create_udata(), we make it more readable for both humans and tools. Reported-by: Dan Carpenter Fixes: 12f727721eee ("IB/uverbs: clean up INIT_UDATA_BUF_OR_NULL usage") Signed-off-by: Arnd Bergmann Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_std_types.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 1530578abdac4edce9244c7a1962ded3ffdb58ce Author: Boris Brezillon Date: Sat Nov 11 16:08:34 2017 +0100 mtd: Avoid probe failures when mtd->dbg.dfs_dir is invalid Commit e8e3edb95ce6 ("mtd: create per-device and module-scope debugfs entries") tried to make MTD related debugfs stuff consistent across the MTD framework by creating a root /mtd/ directory containing one directory per MTD device. The problem is that, by default, the MTD layer only registers the master device if no partitions are defined for this master. This behavior breaks all drivers that expect mtd->dbg.dfs_dir to be filled correctly after calling mtd_device_register() in order to add their own debugfs entries. The only way we can force all MTD masters to be registered no matter if they expose partitions or not is by enabling the CONFIG_MTD_PARTITIONED_MASTER option. In such situations, there's no other solution but to accept skipping debugfs initialization when dbg.dfs_dir is invalid, and when this happens, inform the user that he should consider enabling CONFIG_MTD_PARTITIONED_MASTER. Fixes: e8e3edb95ce6 ("mtd: create per-device and module-scope debugfs entries") Cc: Cc: Mario J. Rugiero Signed-off-by: Boris Brezillon Reported-by: Richard Weinberger Signed-off-by: Richard Weinberger drivers/mtd/devices/docg3.c | 7 ++++++- drivers/mtd/nand/nandsim.c | 13 +++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) commit 94ac327e043ee40d7fc57b54541da50507ef4e99 Author: Bjorn Helgaas Date: Mon Nov 13 08:50:30 2017 -0600 PCI/ASPM: Account for downstream device's Port Common_Mode_Restore_Time Every Port that supports the L1.2 substate advertises its Port Common_Mode_Restore_Time, i.e., the time the Port requires to re-establish common mode when exiting L1.2 (see PCIe r3.1, sec 7.33.2). Per sec 5.5.3.3.1, when exiting L1.2, the Downstream Port (the device at the upstream end of the link) must send TS1 training sequences for at least T(COMMONMODE) after it detects electrical idle exit on the Link. We want this to be long enough for both ends of the Link, so we should set it to the maximum of the Port Common_Mode_Restore_Time for the upstream and downstream components on the Link. Previously we only looked at the Port Common_Mode_Restore_Time of the upstream device, so if the downstream device required more time, we didn't program the upstream device's T(COMMONMODE) correctly. Fixes: f1f0366dd6be ("PCI/ASPM: Calculate and save the L1.2 timing parameters") Signed-off-by: Bjorn Helgaas Reviewed-by: Vidya Sagar Acked-by: Rajat Jain CC: stable@vger.kernel.org # v4.11+ drivers/pci/pcie/aspm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31486372a1e9a66ec2e9e2903b8792bba7e503e1 Merge: 8e9a2db fcdfafc Author: Linus Torvalds Date: Mon Nov 13 13:05:08 2017 -0800 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Ingo Molnar: "The main changes in this cycle were: Kernel: - kprobes updates: use better W^X patterns for code modifications, improve optprobes, remove jprobes. (Masami Hiramatsu, Kees Cook) - core fixes: event timekeeping (enabled/running times statistics) fixes, perf_event_read() locking fixes and cleanups, etc. (Peter Zijlstra) - Extend x86 Intel free-running PEBS support and support x86 user-register sampling in perf record and perf script. (Andi Kleen) Tooling: - Completely rework the way inline frames are handled. Instead of querying for the inline nodes on-demand in the individual tools, we now create proper callchain nodes for inlined frames. (Milian Wolff) - 'perf trace' updates (Arnaldo Carvalho de Melo) - Implement a way to print formatted output to per-event files in 'perf script' to facilitate generate flamegraphs, elliminating the need to write scripts to do that separation (yuzhoujian, Arnaldo Carvalho de Melo) - Update vendor events JSON metrics for Intel's Broadwell, Broadwell Server, Haswell, Haswell Server, IvyBridge, IvyTown, JakeTown, Sandy Bridge, Skylake, SkyLake Server - and Goldmont Plus V1 (Andi Kleen, Kan Liang) - Multithread the synthesizing of PERF_RECORD_ events for pre-existing threads in 'perf top', speeding up that phase, greatly improving the user experience in systems such as Intel's Knights Mill (Kan Liang) - Introduce the concept of weak groups in 'perf stat': try to set up a group, but if it's not schedulable fallback to not using a group. That gives us the best of both worlds: groups if they work, but still a usable fallback if they don't. E.g: (Andi Kleen) - perf sched timehist enhancements (David Ahern) - ... various other enhancements, updates, cleanups and fixes" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (139 commits) kprobes: Don't spam the build log with deprecation warnings arm/kprobes: Remove jprobe test case arm/kprobes: Fix kretprobe test to check correct counter perf srcline: Show correct function name for srcline of callchains perf srcline: Fix memory leak in addr2inlines() perf trace beauty kcmp: Beautify arguments perf trace beauty: Implement pid_fd beautifier tools include uapi: Grab a copy of linux/kcmp.h perf callchain: Fix double mapping al->addr for children without self period perf stat: Make --per-thread update shadow stats to show metrics perf stat: Move the shadow stats scale computation in perf_stat__update_shadow_stats perf tools: Add perf_data_file__write function perf tools: Add struct perf_data_file perf tools: Rename struct perf_data_file to perf_data perf script: Print information about per-event-dump files perf trace beauty prctl: Generate 'option' string table from kernel headers tools include uapi: Grab a copy of linux/prctl.h perf script: Allow creating per-event dump files perf evsel: Restore evsel->priv as a tool private area perf script: Use event_format__fprintf() ... commit f3199673e6eb29e14af45b6074a7df277f14a850 Merge: 71a7d3d e258834 Author: Alex Williamson Date: Mon Nov 13 13:59:45 2017 -0700 Merge branches 'vfio/fixes' and 'vfio/platform' into vfio-next-20171113.0 commit 051276658b86729909fb6e28e1fabab11c109615 Author: Selvin Xavier Date: Mon Nov 6 08:07:32 2017 -0800 RDMA/bnxt_re: synchronize poll_cq and req_notify_cq verbs Synchronize poll_cq and req_notify_cq verbs using cq_lock, instead of the lower level qplib->hwq.lock. Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit c88a7858d721af5e2d059e3b0b751fed0504e814 Author: Selvin Xavier Date: Mon Nov 6 08:07:31 2017 -0800 RDMA/bnxt_re: Flush CQ notification Work Queue before destroying QP Destroy_qp shall wait for any outstanding CQ notification to be flushed out before proceeding with QP destroy. Flushing the WQ before destroying the QP. Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 + drivers/infiniband/hw/bnxt_re/qplib_fp.c | 7 +++++++ drivers/infiniband/hw/bnxt_re/qplib_fp.h | 1 + 3 files changed, 9 insertions(+) commit 237379fc339750cbe6680f6a3565ab5c24e32229 Author: Selvin Xavier Date: Mon Nov 6 08:07:30 2017 -0800 RDMA/bnxt_re: Set QP state in case of response completion errors Moves the driver QP state to error in case of response completion errors. Handles the scenarios which doesn't generate a terminal CQE. Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/qplib_fp.c | 3 +++ 1 file changed, 3 insertions(+) commit 9b40183c08e48f1d26d06d39f29808c9c6037561 Author: Somnath Kotur Date: Mon Nov 6 08:07:29 2017 -0800 RDMA/bnxt_re: Add memory barriers when processing CQ/EQ entries The code determines if the next ring entry is valid before proceeding further to read the rest of the entry. The CPU can re-order and read the rest of the entry first, possibly reading a stale entry, if DMA of a new entry happens right after reading it. Signed-off-by: Somnath Kotur Signed-off-by: Selvin Xavier Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/qplib_fp.c | 21 +++++++++++++++++++++ drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 4 ++++ 2 files changed, 25 insertions(+) commit 685894dd9bd03b92803fbc72565789713f067d4c Author: Dennis Dalessandro Date: Mon Nov 6 06:39:29 2017 -0800 IB/hfi1: Handle initial value of 0 for CCTI setting When the driver is loaded it sets the default CCTI value to be 0. When the FM starts and CCA is disabled the driver sets the max value to 65535 due the driver subtracting 1 from 0 and the fact that the CCTI value is a u16. Special case the subtraction to find the index for a 0 value. Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/mad.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b64581adba467c916590c3922f64ec6c2b59a2c3 Author: Don Hiatt Date: Mon Nov 6 06:39:22 2017 -0800 IB/hfi1: Mask upper 16Bits of Extended LID prior to rvt_cq_entry Pass only the lower 16Bits of an Extended LIDs to rvt_cq_entry to avoid triggering a WARN_ON_ONCE during conversion there. These upper 16Bits are okay to drop as they are obtained elsewhere. Fixes: 62ede7779904 ("Add OPA extended LID support") Reviewed-by: Ira Weiny Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/rc.c | 2 +- drivers/infiniband/hw/hfi1/ruc.c | 2 +- drivers/infiniband/hw/hfi1/uc.c | 2 +- drivers/infiniband/hw/hfi1/ud.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) commit 19b57c6c449970763bee089466119e09a17199b1 Author: Don Hiatt Date: Mon Nov 6 06:39:15 2017 -0800 IB/core: Convert OPA AH to IB for Extended LIDs only When deciding to convert an OPA AH to IB we were incorrectly including the IB multicast range. At this layer, all Extended LIDs will be larger than IB_LID_PERMISSIVE. Change comparison accordingly. Fixes: d541e45500bd ("IB/core: Convert ah_attr from OPA to IB when copying to user") Reviewed-by: Ira Weiny Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_marshall.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e8d5aff65092aabf89624d18e048c9bf1ce65a2c Author: Jan Sokolowski Date: Mon Nov 6 06:39:07 2017 -0800 IB/hfi1: Send 'reboot' as planned down remote reason On host shutdown, driver sends 'SMA_Disabled' as a reason for link down. This is incorrect. Send 'reboot' as a linkdown reason. Signed-off-by: Jan Sokolowski Reviewed-by: Jakub Byczkowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a276672ed71eb247ef3b728e35a37bacb7749213 Author: Grzegorz Morys Date: Mon Nov 6 06:38:59 2017 -0800 IB/hfi1: Prohibit invalid Init to Armed state transition It is invalid to change Link state from Init to Armed if IsSmConfigurationStarted bit is not set in Attribute modifier for Set subnet management method in case of PortInfo and PortStateInfo attribute. Set response MAD status field bits accordingly to react correctly in such situations and avoid changing Link state. Reviewed-by: Ira Weiny Reviewed-by: Michael J. Ruhl Signed-off-by: Grzegorz Morys Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/mad.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit cc9a97ea2c74e8270f3d77d1fd4711c6fc866d7f Author: Niranjana Vishwanathapura Date: Mon Nov 6 06:38:52 2017 -0800 IB/hfi1: Do not allocate PIO send contexts for VNIC OPA VNIC does not use PIO contexts and instead only uses SDMA engines. Do not allocate PIO contexts for VNIC ports. Reviewed-by: Michael J. Ruhl Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 10 ++++----- drivers/infiniband/hw/hfi1/driver.c | 5 ++--- drivers/infiniband/hw/hfi1/init.c | 3 +-- drivers/infiniband/hw/hfi1/pio.c | 17 ---------------- drivers/infiniband/hw/hfi1/pio.h | 6 ------ drivers/infiniband/hw/hfi1/vnic_main.c | 37 ++-------------------------------- 6 files changed, 10 insertions(+), 68 deletions(-) commit e4c397eed9c93fc1cb34f7d8df96afeb320d535d Author: Jan Sokolowski Date: Mon Nov 6 06:38:45 2017 -0800 IB/hfi1: Remove unnecessary if check A for loop condition of data_iovs in user_sdma_free_request is unnecessarily repeated before the loop as an if check. Remove the if enveloping the loop. Reviewed-by: Jakub Byczkowski Signed-off-by: Jan Sokolowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_sdma.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit d61ea0751aa097182291c7ceed447bc73e020109 Author: Mike Marciniszyn Date: Mon Nov 6 06:38:38 2017 -0800 IB/hfi1: Fix a wrapping test to insure the correct timeout The "2 * UINT_MAX" statement: if ((u64)(ts - cce->timestamp) > 2 * UINT_MAX) { is equivalent to: if ((u64)(ts - cce->timestamp) > UINT_MAX - 1) { This results in a premature timeout of the cong log entry. Fix by using unsigned 64 bit integers, removing casts, and using an algebraic equivalent test to avoid the "2 * UINT_MAX" issue. Also make use of kernel API to get nanoseconds instead of open coding. Reported-by: Dan Carpenter Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/mad.c | 6 +++--- drivers/infiniband/hw/hfi1/mad.h | 2 +- drivers/infiniband/hw/hfi1/rc.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 0e31a2e195220da576c32647277f849509588391 Author: Kamenee Arumugam Date: Mon Nov 6 06:38:30 2017 -0800 IB/hfi1: Remove wrapper function in mmu_rb Wrapper functions were used to call the same function mmu_notifier_mem_invalidate for 2 callbacks in mmu_notifier. The commit 7def96f0a973 ("IB/hfi1: update to new mmu_notifier semantic") removed the invalidate_page callback. Therefore, the wrapper function is no longer needed. Reviewed-by: Michael J. Ruhl Reviewed-by: Alex Estrin Signed-off-by: Kamenee Arumugam Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/mmu_rb.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) commit 22a3ffa78086e31223865c24aeb7d1c3970e2984 Author: Jakub Byczkowski Date: Mon Nov 6 06:38:23 2017 -0800 IB/hfi1: Reduce 8051 command timeout Timeout of 20 seconds is too long for active wait performed for 8051 command completion. It was required for scenarios when transition to polling was requested before offline.quiet state was reached. Currently wait for offline.quiet is properly implemented and timeout can be reduced to 1 second. Reviewed-by: Dean Luick Reviewed-by: Duane McCrory Signed-off-by: Jakub Byczkowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 641f348bbdf1dcd30870bef8b0bd663aaf24f2ed Author: Jan Sokolowski Date: Mon Nov 6 06:38:16 2017 -0800 IB/hfi1: Allow MgmtAllowed on B2B setups HFI's are hard-wired to send Device Info frames with MgmtAllowed bit set to 0. This means in B2B setups, MgmtAllowed would never be allowed, which prevents remote opa management tools from working properly. Assume MgmtAllowed if a neighbor is also an HFI. Fixes: 98b9ee2002a8 ("IB/hfi1: Cache neighbor secure data after link up") Reviewed-by: Sebastian Sanchez Reviewed-by: Michael J. Ruhl Signed-off-by: Jan Sokolowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 39 +---------------------------------- drivers/infiniband/hw/hfi1/hfi.h | 3 +++ drivers/infiniband/hw/hfi1/intr.c | 43 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 38 deletions(-) commit 8a4580e4d298796ffe5bcc5b0c39906c83a40499 Author: Andrea Adami Date: Thu Aug 31 23:05:07 2017 +0200 mtd: sharpslpart: Add sharpslpart partition parser The Sharp SL Series (Zaurus) PXA handhelds have 16/64/128M of NAND flash and share the same layout of the first 7M partition, managed by Sharp FTL. GPL 2.4 sources: http://support.ezaurus.com/developer/source/source_dl.asp The purpose of this self-contained patch is to add a common parser and remove the hardcoded sizes in the board files (these devices are not yet converted to devicetree). Users will have benefits because the mtdparts= tag will not be necessary anymore and they will be free to repartition the little sized flash. The obsolete bootloader can not pass the partitioning info to modern kernels anymore so it has to be read from flash at known logical addresses. (see http://www.h5.dion.ne.jp/~rimemoon/zaurus/memo_006.htm ) In kernel, under arch/arm/mach-pxa we have already 8 machines: MACH_POODLE, MACH_CORGI, MACH_SHEPERD, MACH_HUSKY, MACH_AKITA, MACH_SPITZ, MACH_BORZOI, MACH_TOSA. Lost after the 2.4 vendor kernel are MACH_BOXER and MACH_TERRIER. Almost every model has different factory partitioning: add to this the units can be repartitioned by users with userspace tools (nandlogical) and installers for popular (back then) linux distributions. The Parameter Area in the first (boot) partition extends from 0x00040000 to 0x0007bfff (176k) and contains two copies of the partition table: ... 0x00060000: Partition Info1 16k 0x00064000: Partition Info2 16k 0x00668000: Model 16k ... The first 7M partition is managed by the Sharp FTL reserving 5% + 1 blocks for wear-leveling: some blocks are remapped and one layer of translation (logical to physical) is necessary. There isn't much documentation about this FTL in the 2.4 sources, just the MTD methods for reading and writing using logical addresses and the block management (wear-leveling, use counter). It seems this FTL was tailored with 16KiB eraesize in mind so to fit one param block exactly, to have two copies of the partition table on two blocks. Later pxa27x devices have same size but 128KiB erasesize and less blocks (56 vs. 448) but the same schema was adopted, even if the two tables are now in the same eraseblock. For the purpose of the MTD parser only the read part of the code was taken. The NAND drivers that can use this parser are sharpsl.c and tmio_nand.c. Signed-off-by: Andrea Adami Reviewed-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/parsers/Kconfig | 8 + drivers/mtd/parsers/Makefile | 1 + drivers/mtd/parsers/sharpslpart.c | 398 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 407 insertions(+) commit 5cdd929da53dd7347ec86afd94c3b840909c461e Author: Boris Brezillon Date: Tue Jun 27 21:22:21 2017 +0200 mtd: Add sanity checks in mtd_write/read_oob() Unlike what's done in mtd_read/write(), there are no checks to make sure the parameters passed to mtd_read/write_oob() are consistent, which forces implementers of ->_read/write_oob() to do it, which in turn leads to code duplication and possibly errors in the logic. Do general sanity checks, like ops fields consistency and range checking. Signed-off-by: Boris Brezillon Cc: Peter Pan Signed-off-by: Richard Weinberger drivers/mtd/mtdcore.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 9a5941080ef29f1a0347ac2766e4d93312123b21 Author: Nicolas Pitre Date: Tue Nov 7 22:29:48 2017 +0100 mtd: remove the get_unmapped_area method It is now unused. Signed-off-by: Nicolas Pitre Reviewed-by: Richard Weinberger Acked-by: Boris Brezillon Tested-by: Chris Brandt Signed-off-by: Richard Weinberger drivers/mtd/chips/map_ram.c | 18 ------------------ drivers/mtd/chips/map_rom.c | 17 ----------------- drivers/mtd/devices/mtdram.c | 14 -------------- drivers/mtd/mtdconcat.c | 27 --------------------------- drivers/mtd/mtdpart.c | 14 -------------- include/linux/mtd/mtd.h | 4 ---- 6 files changed, 94 deletions(-) commit 9eaa903c06f9f3129f862ef60ce106e4c3211288 Author: Nicolas Pitre Date: Mon Oct 30 14:48:32 2017 -0400 mtd: implement mtd_get_unmapped_area() using the point method The mtd->_point method is a superset of mtd->_get_unmapped_area. Especially in the NOR flash case, the point method ensures the flash memory is in array (data) mode and that it will stay that way which is precisely what callers of mtd_get_unmapped_area() would expect. Implement mtd_get_unmapped_area() in terms of mtd->_point now that all drivers that provided a _get_unmapped_area method also have the _point method implemented. Signed-off-by: Nicolas Pitre Reviewed-by: Richard Weinberger Acked-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/mtdcore.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 55100cfa339db9c391f8c4667af02a6f7160125b Author: Nicolas Pitre Date: Mon Oct 30 14:48:31 2017 -0400 mtd: chips/map_rom.c: implement point and unpoint methods This will allow for the removal of the get_unmapped_area method later. Signed-off-by: Nicolas Pitre Acked-by: Boris Brezillon Tested-by: Chris Brandt [rw: fixed build] Signed-off-by: Richard Weinberger drivers/mtd/chips/map_rom.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 2caaf2d83a76bc35b4694f48d62ff2cab2d1105d Author: Nicolas Pitre Date: Mon Oct 30 14:48:30 2017 -0400 mtd: chips/map_ram.c: implement point and unpoint methods This will allow for the removal of the get_unmapped_area method later. Signed-off-by: Nicolas Pitre Reviewed-by: Richard Weinberger Acked-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/chips/map_ram.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 877b58ebc038f5e3f0afc5674fc35db75eaaa117 Author: Nicolas Pitre Date: Mon Oct 30 14:48:29 2017 -0400 mtd: mtdram: properly handle the phys argument in the point method When the phys pointer is non null, the point method is expected to return the physical address for the pointed area. In the case of the mtdram driver we have to retrieve the physical address for the corresponding vmalloc area. However, there is no guarantee that the vmalloc area is made of physically contiguous pages. In that case we simply limit retlen to the actually contiguous pages. Signed-off-by: Nicolas Pitre Reviewed-by: Richard Weinberger Acked-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/devices/mtdram.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit a5929b64fa2bf381ac3dc57f4e7daa7f04e99dc0 Author: Arvind Yadav Date: Sun Oct 29 11:58:00 2017 +0530 mtd: mtdswap: fix spelling mistake: 'TRESHOLD' -> 'THRESHOLD' Trivial fix to spelling mistakes. Signed-off-by: Arvind Yadav Signed-off-by: Richard Weinberger drivers/mtd/mtdswap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cb9e20633d81290acefb9ec1af281ff4c650fbde Author: Roy Franz Date: Thu Oct 19 15:55:49 2017 -0700 mtd: slram: use memremap() instead of ioremap() Convert slram to use memremap() to map the memory it uses to back an MTD device, as this is the proper interface for mapping memory. This change enables normal memory to be used to back an MTD device on arm64, as arm64 prevents ioremap() being used on normal memory. Signed-off-by: Roy Franz Acked-by: Ard Biesheuvel Tested-by: David Daney Signed-off-by: Richard Weinberger drivers/mtd/devices/slram.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 9de8da47742b22ddec872a4dff5bd7caec98e5ba Author: Rob Herring Date: Mon Oct 16 17:16:31 2017 -0500 kconfig: kill off GENERIC_IO option The GENERIC_IO option is set for every architecture except tile and score as those define NO_IOMEM. The option only controls visibility of CONFIG_MTD which doesn't appear to be necessary for any reason, so let's just remove GENERIC_IO. Signed-off-by: Rob Herring Cc: Jeff Dike Cc: Richard Weinberger Cc: David Woodhouse Cc: Brian Norris Cc: Boris Brezillon Cc: Marek Vasut Cc: Cyrille Pitchen Cc: user-mode-linux-devel@lists.sourceforge.net Cc: user-mode-linux-user@lists.sourceforge.net Cc: linux-mtd@lists.infradead.org Acked-by: Richard Weinberger Acked-by: Boris Brezillon Signed-off-by: Richard Weinberger arch/um/Kconfig.common | 1 - drivers/mtd/Kconfig | 1 - lib/Kconfig | 4 ---- 3 files changed, 6 deletions(-) commit 8e9a2dba8686187d8c8179e5b86640e653963889 Merge: 6098850 450cbdd Author: Linus Torvalds Date: Mon Nov 13 12:38:26 2017 -0800 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core locking updates from Ingo Molnar: "The main changes in this cycle are: - Another attempt at enabling cross-release lockdep dependency tracking (automatically part of CONFIG_PROVE_LOCKING=y), this time with better performance and fewer false positives. (Byungchul Park) - Introduce lockdep_assert_irqs_enabled()/disabled() and convert open-coded equivalents to lockdep variants. (Frederic Weisbecker) - Add down_read_killable() and use it in the VFS's iterate_dir() method. (Kirill Tkhai) - Convert remaining uses of ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE(). Most of the conversion was Coccinelle driven. (Mark Rutland, Paul E. McKenney) - Get rid of lockless_dereference(), by strengthening Alpha atomics, strengthening READ_ONCE() with smp_read_barrier_depends() and thus being able to convert users of lockless_dereference() to READ_ONCE(). (Will Deacon) - Various micro-optimizations: - better PV qspinlocks (Waiman Long), - better x86 barriers (Michael S. Tsirkin) - better x86 refcounts (Kees Cook) - ... plus other fixes and enhancements. (Borislav Petkov, Juergen Gross, Miguel Bernal Marin)" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (70 commits) locking/x86: Use LOCK ADD for smp_mb() instead of MFENCE rcu: Use lockdep to assert IRQs are disabled/enabled netpoll: Use lockdep to assert IRQs are disabled/enabled timers/posix-cpu-timers: Use lockdep to assert IRQs are disabled/enabled sched/clock, sched/cputime: Use lockdep to assert IRQs are disabled/enabled irq_work: Use lockdep to assert IRQs are disabled/enabled irq/timings: Use lockdep to assert IRQs are disabled/enabled perf/core: Use lockdep to assert IRQs are disabled/enabled x86: Use lockdep to assert IRQs are disabled/enabled smp/core: Use lockdep to assert IRQs are disabled/enabled timers/hrtimer: Use lockdep to assert IRQs are disabled/enabled timers/nohz: Use lockdep to assert IRQs are disabled/enabled workqueue: Use lockdep to assert IRQs are disabled/enabled irq/softirqs: Use lockdep to assert IRQs are disabled/enabled locking/lockdep: Add IRQs disabled/enabled assertion APIs: lockdep_assert_irqs_enabled()/disabled() locking/pvqspinlock: Implement hybrid PV queued/unfair locks locking/rwlocks: Fix comments x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized block, locking/lockdep: Assign a lock_class per gendisk used for wait_for_completion() workqueue: Remove now redundant lock acquisitions wrt. workqueue flushes ... commit 57b0c46054999479272116ba3469006343856759 Author: Bart Van Assche Date: Fri Nov 3 16:20:56 2017 -0700 IB/srpt: Ensure that modifying the use_srq configfs attribute works The use_srq configfs attribute is created after it is read. Hence modify srpt_tpg_attrib_use_srq_store() such that this function switches dynamically between non-SRQ and SRQ mode. Reported-by: Mike Marciniszyn Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 8b6dc529ea62bc021e0cdd5b0d4342ba470b5c92 Author: Bart Van Assche Date: Fri Nov 3 16:20:55 2017 -0700 IB/srpt: Wait until channel release has finished during module unload Introduce the helper function srpt_set_enabled(). Protect sport->enabled changes with sdev->mutex. Makes configfs writes into 'enabled' wait until all channel resources have been freed. Wait until channel release has finished during kernel module unload. Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.c | 43 ++++++++++++++++------------------- 1 file changed, 20 insertions(+), 23 deletions(-) commit 01b3ee13c28456a61e61e5729b8addfaf16d5909 Author: Bart Van Assche Date: Fri Nov 3 16:20:54 2017 -0700 IB/srpt: Introduce srpt_disconnect_ch_sync() Except for changing a BUG_ON() call into a WARN_ON_ONCE() call, this patch does not change any functionality. Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.c | 51 ++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 16 deletions(-) commit c76d7d64f8067699260421509a7c11ad51761061 Author: Bart Van Assche Date: Fri Nov 3 16:20:53 2017 -0700 IB/srpt: Introduce helper functions for SRQ allocation and freeing The only functional change in this patch is in the srpt_add_one() error path: if allocating the ring buffer for the SRQ fails, fall back to non-SRQ mode instead of disabling SRP target functionality. Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.c | 115 +++++++++++++++++++++------------- 1 file changed, 72 insertions(+), 43 deletions(-) commit 321e329b9c0b3328e3f6bd4924b9c8c5cbf5c22d Author: Mike Marciniszyn Date: Fri Nov 3 16:20:52 2017 -0700 IB/srpt: Post receive work requests after qp transition to INIT state IB and iWARP specs both spell out that posting a receive work request to a queue pair in the RESET state is an invalid operation and required to fail. Postpone posting receive work requests until after the transition to the INIT state. Fixes: commit dea262094cdf ("IB/srpt: Change default behavior from using SRQ to using RC") Signed-off-by: Mike Marciniszyn Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6098850e7e6978f95a958f79a645a653228d0002 Merge: f08d8bc 72bc286 Author: Linus Torvalds Date: Mon Nov 13 12:18:10 2017 -0800 Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU updates from Ingo Molnar: "The main changes in this cycle are: - Documentation updates - RCU CPU stall-warning updates - Torture-test updates - Miscellaneous fixes Size wise the biggest updates are to documentation. Excluding documentation most of the code increase comes from a single commit which expands debugging" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) srcu: Add parameters to SRCU docbook comments doc: Rewrite confusing statement about memory barriers memory-barriers.txt: Fix typo in pairing example rcu/segcblist: Include rcupdate.h rcu: Add extended-quiescent-state testing advice rcu: Suppress lockdep false-positive ->boost_mtx complaints rcu: Do not include rtmutex_common.h unconditionally torture: Provide TMPDIR environment variable to specify tmpdir rcutorture: Dump writer stack if stalled rcutorture: Add interrupt-disable capability to stall-warning tests rcu: Suppress RCU CPU stall warnings while dumping trace rcu: Turn off tracing before dumping trace rcu: Make RCU CPU stall warnings check for irq-disabled CPUs sched,rcu: Make cond_resched() provide RCU quiescent state sched: Make resched_cpu() unconditional irq_work: Map irq_work_on_queue() to irq_work_on() in !SMP rcu: Create call_rcu_tasks() kthread at boot time rcu: Fix up pending cbs check in rcu_prepare_for_idle memory-barriers: Rework multicopy-atomicity section memory-barriers: Replace uses of "transitive" ... commit 5bca462d2d18b1c9ec86c7985753134f06fa5cd2 Author: Egor Starkov Date: Mon Nov 13 10:31:01 2017 +0000 ahci: imx: Handle increased read failures for IMX53 temperature sensor in low frequency mode. Extended testing has shown that the imx ahci driver sometimes requires more than the 100 attempts currently alotted in the driver to perform a successful temperature reading when running at minimum (throttled) CPU frequency. Debugging suggests that the read cycle can take 160 attempts (which given that the driver averages 80 readings from the ADC equates to one failure on each read). Increase the attempt limit to 200 in order to greatly reduce the likelihood of the driver failing to perform a temperature reading, especially at low CPU frequency. Signed-off-by: Egor Starkov Signed-off-by: Martyn Welch Signed-off-by: Tejun Heo drivers/ata/ahci_imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47e46613d84d2750eb70a7ff07a03ed8ffbec5af Author: Andy Shevchenko Date: Fri Nov 10 19:59:37 2017 +0200 ata: sata_dwc_460ex: Propagate platform device ID to DMA driver Propagate platform device ID to DMA driver to distinguish relationship between DMA and SATA instances. Signed-off-by: Andy Shevchenko Signed-off-by: Tejun Heo drivers/ata/sata_dwc_460ex.c | 1 + 1 file changed, 1 insertion(+) commit f08d8bcc12de5a153e587027e77de83662eefb8a Merge: f3573b8 d4d1fc6 Author: Linus Torvalds Date: Mon Nov 13 12:15:40 2017 -0800 Merge tag 'please-pull-gettime_vsyscall_update' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux Pull ia64 update from Tony Luck: "Stop ia64 being the last holdout using GENERIC_TIME_VSYSCALL_OLD so that John Stultz can drop that code" * tag 'please-pull-gettime_vsyscall_update' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: ia64: Update fsyscall gettime to use modern vsyscall_update commit f3573b8f902c507c721999cc669fbb7e045081b8 Merge: 9e09d05 610f01b Author: Linus Torvalds Date: Mon Nov 13 12:12:00 2017 -0800 Merge tag 'for-linus' of git://github.com/openrisc/linux Pull OpenRISC updates from Stafford Horne: "The OpenRISC work is a bit more interesting this time, adding SMP support and a few general cleanups. Small Things: - Move OpenRISC docs into Documentation and clean them up - Document previously undocumented devicetree bindings - Update the or1ksim dts to use stdout-path OpenRISC SMP support details: - First the "use shadow registers" and "define CPU_BIG_ENDIAN as true" get the architecture ready for SMP. - The "add 1 and 2 byte cmpxchg support" and "use qspinlocks and qrwlocks" add the SMP locking infrastructure as needed. Using the qspinlocks and qrwlocks as suggested by Peter Z while reviewing the original spinlocks implementation. - The "support for ompic" adds a new irqchip device which is used for IPI communication to support SMP. - The "initial SMP support" adds smp.c and makes changes to all of the necessary data-structures to be per-cpu. The remaining patches are bug fixes and debug helpers which I wanted to keep separate from the "initial SMP support" in order to allow them to be reviewed on their own. This includes: - add cacheflush support to fix icache aliasing - fix initial preempt state for secondary cpu tasks - sleep instead of spin on secondary wait - support framepointers and STACKTRACE_SUPPORT - enable LOCKDEP_SUPPORT and irqflags tracing - timer sync: Add tick timer sync logic - fix possible deadlock in timer sync, pointed out by mips guys Note: the irqchip patch was reviewed with Marc and we agreed to push it together with these patches" * tag 'for-linus' of git://github.com/openrisc/linux: openrisc: fix possible deadlock scenario during timer sync openrisc: pass endianness info to sparse openrisc: add tick timer multi-core sync logic openrisc: enable LOCKDEP_SUPPORT and irqflags tracing openrisc: support framepointers and STACKTRACE_SUPPORT openrisc: add simple_smp dts and defconfig for simulators openrisc: add cacheflush support to fix icache aliasing openrisc: sleep instead of spin on secondary wait openrisc: fix initial preempt state for secondary cpu tasks openrisc: initial SMP support irqchip: add initial support for ompic dt-bindings: add openrisc to vendor prefixes list openrisc: use qspinlocks and qrwlocks openrisc: add 1 and 2 byte cmpxchg support openrisc: use shadow registers to save regs on exception dt-bindings: openrisc: Add OpenRISC platform SoC Documentation: openrisc: Updates to README Documentation: Move OpenRISC docs out of arch/ MAINTAINERS: Add OpenRISC pic maintainer openrisc: dts: or1ksim: Add stdout-path commit 9e09d05cfe7df9efa7bbca7d679af534a616026e Merge: d60a540 5e387199 Author: Linus Torvalds Date: Mon Nov 13 12:10:24 2017 -0800 Merge tag 'm68k-for-v4.15-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - more printk modernization - various cleanups and fixes (incl. a race condition) for Mac - defconfig updates * tag 'm68k-for-v4.15-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/defconfig: Update defconfigs for v4.14-rc7 m68k/mac: Add mutual exclusion for IOP interrupt polling m68k/mac: Disentangle VIA/RBV and NuBus initialization m68k/mac: Disentangle VIA and OSS initialization m68k/mac: More printk modernization commit db0267e7afc72e04d92b845a00928e39be211d6a Author: Martin Brandenburg Date: Fri Nov 10 12:08:01 2017 -0500 orangefs: call op_release sooner when creating inodes Prevents holding an unnecessary op while the kernel processes another op and yields the CPU. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/namei.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit a55f2d861585006f493e933ad32d65d71ba631fa Author: Martin Brandenburg Date: Tue Nov 7 15:01:40 2017 -0500 orangefs: stop setting atime on inode dirty The previous code path was to mark the inode dirty, let orangefs_inode_dirty set a flag in our private inode, then later during inode release call orangefs_flush_inode which notices the flag and writes the atime out. The code path worked almost identically for mtime, ctime, and mode except that those flags are set explicitly and not as side effects of dirty. Now orangefs_flush_inode is removed. Marking an inode dirty does not imply an atime update. Any place where flags were set before is now an explicit call to orangefs_inode_setattr. Since OrangeFS does not utilize inode writeback, the attribute change should be written out immediately. Fixes generic/120. In namei.c, there are several places where the directory mtime and ctime are set, but only the mtime is sent to the server. These don't seem right, but I've left them as is for now. Signed-off-by: Martin Brandenburg Signed-off-by: Mike Marshall fs/orangefs/acl.c | 10 +++--- fs/orangefs/dir.c | 1 - fs/orangefs/file.c | 16 +++++---- fs/orangefs/inode.c | 17 +++++++++ fs/orangefs/namei.c | 21 ++++++++--- fs/orangefs/orangefs-kernel.h | 31 ++-------------- fs/orangefs/orangefs-utils.c | 83 +------------------------------------------ fs/orangefs/super.c | 13 ------- fs/orangefs/symlink.c | 1 + 9 files changed, 52 insertions(+), 141 deletions(-) commit 296200d3bb649f9646f60abe6e8ebb9fd8d20f4b Author: Jérémy Lefaure Date: Sun Oct 1 15:30:48 2017 -0400 orangefs: use ARRAY_SIZE Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure Signed-off-by: Mike Marshall fs/orangefs/orangefs-debug.h | 4 +++- fs/orangefs/orangefs-utils.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) commit 933f7ac1a1df37ab6b25b50a85c13fcc5ea8cd03 Author: Jeff Layton Date: Mon Oct 30 11:19:20 2017 -0400 orangefs: remove initialization of i_version ...as it's completely unused. Signed-off-by: Jeff Layton Signed-off-by: Mike Marshall fs/orangefs/super.c | 2 -- 1 file changed, 2 deletions(-) commit ba97b749979ef0ebb821e58ee8b16a84412922f6 Author: Steve Wise Date: Thu Nov 2 14:11:03 2017 -0700 iw_cxgb4: remove BUG_ON() usage. iw_cxgb4 has many BUG_ON()s that were left over from various enhancemnets made over the years. Almost all of them should just be removed. Some, however indicate a ULP usage error and can be handled w/o bringing down the system. If the condition cannot happen with correctly implemented cxgb4 sw/fw, then remove the BUG_ON. If the condition indicates a misbehaving ULP (like CQ overflows), add proper recovery logic. Signed-off-by: Steve Wise Reviewed-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 25 +++++++++---------------- drivers/infiniband/hw/cxgb4/cq.c | 10 ---------- drivers/infiniband/hw/cxgb4/id_table.c | 1 - drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 1 - drivers/infiniband/hw/cxgb4/provider.c | 4 ++-- drivers/infiniband/hw/cxgb4/qp.c | 3 --- drivers/infiniband/hw/cxgb4/t4.h | 7 ++----- 7 files changed, 13 insertions(+), 38 deletions(-) commit 063fb5bd1a01937094f40169a20e4aa5ca030db1 Author: Sriharsha Basavapatna Date: Fri Nov 3 02:39:04 2017 +0530 bnxt_re: changing the ip address shouldn't affect new connections While adding a new gid, the driver currently does not return the context back to the stack. A subsequent del_gid() (e.g, when ip address is changed) doesn't find the right context in the driver and it ends up dropping that request. This results in the HW caching a stale gid entry and traffic fails because of that. Fix by returning the proper context in bnxt_re_add_gid(). Signed-off-by: Sriharsha Basavapatna Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 + 1 file changed, 1 insertion(+) commit d6d5c59905c8af932c1cee874e1fb5cd9e83fa61 Author: Sriharsha Basavapatna Date: Tue Oct 31 14:59:17 2017 +0530 bnxt_re: fix a crash in qp error event processing In bnxt_qplib_process_qp_event(), for qp error events we look up the qp-handle and pass it for further processing. But we don't check if the handle is NULL. This could lead to a crash in the called functions when that qp-handle is dereferenced, if the qp is destroyed in the meantime. Fix this by checking for a valid qp-handle in that function. Signed-off-by: Sriharsha Basavapatna Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 2 ++ 1 file changed, 2 insertions(+) commit fc150d6bba8f446f77732cf27b09a7e646c25771 Merge: ecc325b f674bd2 Author: Dave Airlie Date: Tue Nov 14 05:53:39 2017 +1000 Merge branch 'linus-4.14-rc4-acp-prereq' of git://people.freedesktop.org/~agd5f/linux into drm-next This is a shared tree between drm and audio for some amd bits. * 'linus-4.14-rc4-acp-prereq' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu Moving amdgpu asic types to a separate file ASoC: AMD: Added asic_type as ACP DMA driver platform data drm/amd/amdgpu: Added asic_type as ACP DMA driver platform data commit d60a540ac5f2fbab3e6fe592717b445bd7343a91 Merge: 2101dd6 364a560 Author: Linus Torvalds Date: Mon Nov 13 11:47:01 2017 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Heiko Carstens: "Since Martin is on vacation you get the s390 pull request for the v4.15 merge window this time from me. Besides a lot of cleanups and bug fixes these are the most important changes: - a new regset for runtime instrumentation registers - hardware accelerated AES-GCM support for the aes_s390 module - support for the new CEX6S crypto cards - support for FORTIFY_SOURCE - addition of missing z13 and new z14 instructions to the in-kernel disassembler - generate opcode tables for the in-kernel disassembler out of a simple text file instead of having to manually maintain those tables - fast memset16, memset32 and memset64 implementations - removal of named saved segment support - hardware counter support for z14 - queued spinlocks and queued rwlocks implementations for s390 - use the stack_depth tracking feature for s390 BPF JIT - a new s390_sthyi system call which emulates the sthyi (store hypervisor information) instruction - removal of the old KVM virtio transport - an s390 specific CPU alternatives implementation which is used in the new spinlock code" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (88 commits) MAINTAINERS: add virtio-ccw.h to virtio/s390 section s390/noexec: execute kexec datamover without DAT s390: fix transactional execution control register handling s390/bpf: take advantage of stack_depth tracking s390: simplify transactional execution elf hwcap handling s390/zcrypt: Rework struct ap_qact_ap_info. s390/virtio: remove unused header file kvm_virtio.h s390: avoid undefined behaviour s390/disassembler: generate opcode tables from text file s390/disassembler: remove insn_to_mnemonic() s390/dasd: avoid calling do_gettimeofday() s390: vfio-ccw: Do not attempt to free no-op, test and tic cda. s390: remove named saved segment support s390/archrandom: Reconsider s390 arch random implementation s390/pci: do not require AIS facility s390/qdio: sanitize put_indicator s390/qdio: use atomic_cmpxchg s390/nmi: avoid using long-displacement facility s390: pass endianness info to sparse s390/decompressor: remove informational messages ... commit f17966f19575eac9d5dea68b08f6292dd3d4d3db Author: Noa Osherovich Date: Thu Nov 2 15:22:28 2017 +0200 IB/mlx5: Fix ABI alignment to 64 bit Struct mlx5_ib_striding_rq_caps was not aligned to 64 bit as it should have been. Add a 32 bit reserved field. Fixes: b4f34597a5ce ('IB/mlx5: Expose multi-packet RQ capabilities') Signed-off-by: Noa Osherovich Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/uapi/rdma/mlx5-abi.h | 1 + 1 file changed, 1 insertion(+) commit 2e4c85c6edc80fa532b2c7e1eb3597ef4d4bbb8f Author: Parav Pandit Date: Thu Nov 2 15:22:27 2017 +0200 IB/core: Avoid unnecessary return value check Since there is nothing done with non zero return value, such check is avoided. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/security.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 5f22a1d87c5315a98981ecf93cd8de226cffe6ca Author: Mark Bloch Date: Thu Nov 2 15:22:26 2017 +0200 IB/mlx4: Increase maximal message size under UD QP Maximal message should be used as a limit to the max message payload allowed, without the headers. The ConnectX-3 check is done against this value includes the headers. When the payload is 4K this will cause the NIC to drop packets. Increase maximal message to 8K as workaround, this shouldn't change current behaviour because we continue to set the MTU to 4k. To reproduce; set MTU to 4296 on the corresponding interface, for example: ifconfig eth0 mtu 4296 (both server and client) On server: ib_send_bw -c UD -d mlx4_0 -s 4096 -n 1000000 -i1 -m 4096 On client: ib_send_bw -d mlx4_0 -c UD -s 4096 -n 1000000 -i 1 -m 4096 Fixes: 6e0d733d9215 ("IB/mlx4: Allow 4K messages for UD QPs") Signed-off-by: Mark Bloch Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed8637d3615b38bd4d12ba5eb8ee6a0c3888e754 Author: Guy Levi Date: Thu Nov 2 15:22:25 2017 +0200 IB/mlx4: Add contig support for control objects Taking advantage of the optimization which was introduced in previous commit ("IB/mlx4: Use optimal numbers of MTT entries") to optimize the MTT usage for QP and CQ. Signed-off-by: Guy Levi Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/cq.c | 8 ++++++-- drivers/infiniband/hw/mlx4/mlx4_ib.h | 2 ++ drivers/infiniband/hw/mlx4/mr.c | 5 ++--- drivers/infiniband/hw/mlx4/qp.c | 8 ++++++-- 4 files changed, 16 insertions(+), 7 deletions(-) commit 9901abf583683e58f95f822da63cd0e32e7b2f0a Author: Guy Levi Date: Thu Nov 2 15:22:24 2017 +0200 IB/mlx4: Use optimal numbers of MTT entries Optimize the device performance by assigning multiple physical pages, which are contiguous, to a single MTT. As a result, the number of MTTs is reduced and in turn save cache misses of MTTs. Signed-off-by: Guy Levi Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/mr.c | 285 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 261 insertions(+), 24 deletions(-) commit 56f19441da39e5f27824bcbdf3f60980414b5bd0 Merge: 8ff0f72 395df08 4fa064b 58b8e8b 94e2cc4 Author: Alex Williamson Date: Mon Nov 13 12:40:51 2017 -0700 Merge branches 'iommu/arm/smmu', 'iommu/updates', 'iommu/vt-d', 'iommu/ipmmu-vmsa' and 'iommu/iova' into iommu-next-20171113.0 commit 2101dd64b304b034862f5ca40877c41b7ccb9c5e Merge: b33e3cc c8b61d5 Author: Linus Torvalds Date: Mon Nov 13 11:39:21 2017 -0800 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68k updates from Greg Ungerer: "The bulk of the changes are to support the ColdFire 5441x SoC family with their MMU enabled. The parts have been supported for a long time now, but only in no-MMU mode. Angelo Dureghello has a new board with a 5441x and we have ironed out the last problems with MMU enabled on it. So there is also some changes to properly support that board too. Also a fix for a link problem when selecting the traditional 68k beep device in no-MMU configurations" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: add Sysam stmark2 open board support m68k: coldfire: add dspi0 module support m68k: pull mach_beep in setup.c m68k: allow ColdFire m5441x parts to run with MMU enabled m68k: fix ColdFire node shift size calculation m68k: move coldfire MMU initialization code commit 8e96e372bceceb76b92a81f8e28bc8163287d25c Author: Roger He Date: Fri Nov 10 20:00:30 2017 +0800 drm/amd/amdgpu: if visible VRAM allocation fail, fall back to invisible try again Reviewed-by: Christian König Signed-off-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0b968650cdb117396c3625e35010e569d82369b2 Author: Tom St Denis Date: Fri Nov 10 12:54:50 2017 -0500 drm/amd/amdgpu: Fix wave mask in amdgpu_debugfs_wave_read() (v2) The bottom two bits of the simd value were being put into the upper bits of the wave value which was likely working due to the bits being ignored (or aliased). Eitherway, now we mask it correctly. (v2) Touch up using GENMASK_ULL to a couple of other functions too Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit ff4cd38943199348a53f980709e16f0bc5c0b8c9 Author: Christian König Date: Mon Nov 6 15:25:37 2017 +0100 drm/amdgpu: make AMDGPU_VA_RESERVED_SIZE 64bit Even when it's a small handle it as 64bit value as well. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) commit 822770ad49d8f5490f444e345bbd59ecfdd86a15 Author: Nicolai Hähnle Date: Sat Sep 9 00:09:29 2017 +0200 drm/amdgpu/gfx9: implement wave VGPR reading This is already hooked up to the "amdgpu_gpr" debugfs file used by the umr userspace debugging tool. Signed-off-by: Nicolai Hähnle Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f5eaffccf1b3fcf80860711cbde4fbea98b51109 Author: Ken Wang Date: Thu Nov 9 16:02:55 2017 +0800 drm/amdgpu: Add common golden settings for GFX9 Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit ecc325bb76707370cfa6f34ef8574c7ee7577a23 Merge: 9c11731 44419ce Author: Dave Airlie Date: Tue Nov 14 05:29:34 2017 +1000 Merge tag 'drm-misc-fixes-2017-11-13' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Driver Changes: - qxl: Use a shadow bo as primary and blit to it to fix flicker (Gerd) - rockchip: Convert psr spinlock to mutex (Emil) Cc: Emil Renner Berthing Cc: Gerd Hoffmann * tag 'drm-misc-fixes-2017-11-13' of git://anongit.freedesktop.org/drm/drm-misc: drm/rockchip: analogix_dp: Use mutex rather than spinlock commit 9c117313afbaba6f7613fa2b305b7da5d6058fb1 Merge: fee25cb e8c49fa Author: Dave Airlie Date: Tue Nov 14 05:18:21 2017 +1000 Merge tag 'drm-intel-next-fixes-2017-11-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-next drm/i915 fixes for v4.15 * tag 'drm-intel-next-fixes-2017-11-10' of git://anongit.freedesktop.org/drm/drm-intel: drm/i915: Reorder context-close to avoid calling i915_vma_close() under RCU drm/i915: Move init_clock_gating() back to where it was drm/i915: Prune the reservation shared fence array drm/i915: Idle the GPU before shinking everything drm/i915: Lock llist_del_first() vs llist_del_all() drm/i915: Calculate ironlake intermediate watermarks correctly, v2. drm/i915: Disable lazy PPGTT page table optimization for vGPU drm/i915/execlists: Remove the priority "optimisation" drm/i915: Filter out spurious execlists context-switch interrupts commit fee25cb965f9e1360f845a7a3fb16bca1bbadc84 Merge: e7e62c7 62676d1 Author: Dave Airlie Date: Tue Nov 14 05:17:23 2017 +1000 Merge tag 'drm-misc-fixes-2017-11-02' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Driver Changes: - qxl: Use a shadow bo as primary and blit to it to fix flicker (Gerd) * tag 'drm-misc-fixes-2017-11-02' of git://anongit.freedesktop.org/drm/drm-misc: qxl: alloc & use shadow for dumb buffers drm/qxl: replace QXL_INFO with DRM_DEBUG_DRIVER commit 7087cb8fad5e19113d82f47f351fc6b338948d5f Author: Chris Gorman Date: Mon Nov 13 12:41:23 2017 -0500 Documentation: sound: hd-audio: notes.rst Fixed reference to file HD-Audio-Models.rst which has been moved to hd-audio/models.rst Signed-off-by: Chris Gorman Signed-off-by: Takashi Iwai Documentation/sound/hd-audio/notes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b621851acb34762ca893b2528823215e0d4b98c Author: Majd Dibbiny Date: Mon Oct 30 14:23:14 2017 +0200 IB/mlx5: Fix RoCE Address Path fields When working over a RoCE network, the UDP source port should be set only for statically connected QPs (RC, UC and XRC). Fixes: 2811ba51b049 ("IB/mlx5: Add RoCE fields to Address Vector") 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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 31fde034a8bd964a5c7c1a5663fc87a913158db2 Author: Majd Dibbiny Date: Mon Oct 30 14:23:13 2017 +0200 IB/mlx5: Assign send CQ and recv CQ of UMR QP The UMR's QP is created by calling mlx5_ib_create_qp directly, and therefore the send CQ and the recv CQ on the ibqp weren't assigned. Assign them right after calling the mlx5_ib_create_qp to assure that any access to those pointers will work as expected and won't crash the system as might happen as part of reset flow. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Majd Dibbiny Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 2 ++ 1 file changed, 2 insertions(+) commit 9950acf945f55222385d85489617e1d81e45fe34 Author: Leon Romanovsky Date: Sun Oct 29 21:34:35 2017 +0200 RDMA/cxgb4: Protect from possible dereference Smatch tool reports the following error: drivers/infiniband/hw/cxgb4/qp.c:1886 c4iw_create_qp() error: we previously assumed 'ucontext' could be null (see line 1804) Cc: Steve Wise Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e32d2d7144efca745f6d182ac9abd16ee6c7598e Author: Leon Romanovsky Date: Sun Oct 29 17:05:22 2017 +0200 RDMA/bnxt_re: Remove unused vlan_tag variable The Broadcom driver produces the following compilation warning drivers/infiniband/hw/bnxt_re/ib_verbs.c: In function ‘bnxt_re_create_ah’: drivers/infiniband/hw/bnxt_re/ib_verbs.c:668:6: warning: variable ‘vlan_tag’ set but not used [-Wunused-but-set-variable] u16 vlan_tag; Let's remove it till vlan_tag will be implemented properly. Cc: Selvin Xavier Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit b33e3cc5c90b8293599318b68e61b93a89c127bb Merge: 55b3a0c e5729f8 Author: Linus Torvalds Date: Mon Nov 13 10:41:25 2017 -0800 Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security subsystem integrity updates from James Morris: "There is a mixture of bug fixes, code cleanup, preparatory code for new functionality and new functionality. Commit 26ddabfe96bb ("evm: enable EVM when X509 certificate is loaded") enabled EVM without loading a symmetric key, but was limited to defining the x509 certificate pathname at build. Included in this set of patches is the ability of enabling EVM, without loading the EVM symmetric key, from userspace. New is the ability to prevent the loading of an EVM symmetric key." * 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: ima: Remove redundant conditional operator ima: Fix bool initialization/comparison ima: check signature enforcement against cmdline param instead of CONFIG module: export module signature enforcement status ima: fix hash algorithm initialization EVM: Only complain about a missing HMAC key once EVM: Allow userspace to signal an RSA key has been loaded EVM: Include security.apparmor in EVM measurements ima: call ima_file_free() prior to calling fasync integrity: use kernel_read_file_from_path() to read x509 certs ima: always measure and audit files in policy ima: don't remove the securityfs policy file vfs: fix mounting a filesystem with i_version commit 55b3a0cb5aeef0961ee18eac058e488f149a0053 Merge: dee0277 34d8751 Author: Linus Torvalds Date: Mon Nov 13 10:30:44 2017 -0800 Merge branch 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull general security subsystem updates from James Morris: "TPM (from Jarkko): - essential clean up for tpm_crb so that ARM64 and x86 versions do not distract each other as much as before - /dev/tpm0 rejects now too short writes (shorter buffer than specified in the command header - use DMA-safe buffer in tpm_tis_spi - otherwise mostly minor fixes. Smack: - base support for overlafs Capabilities: - BPRM_FCAPS fixes, from Richard Guy Briggs: The audit subsystem is adding a BPRM_FCAPS record when auditing setuid application execution (SYSCALL execve). This is not expected as it was supposed to be limited to when the file system actually had capabilities in an extended attribute. It lists all capabilities making the event really ugly to parse what is happening. The PATH record correctly records the setuid bit and owner. Suppress the BPRM_FCAPS record on set*id. TOMOYO: - Y2038 timestamping fixes" * 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (28 commits) MAINTAINERS: update the IMA, EVM, trusted-keys, encrypted-keys entries Smack: Base support for overlayfs MAINTAINERS: remove David Safford as maintainer for encrypted+trusted keys tomoyo: fix timestamping for y2038 capabilities: audit log other surprising conditions capabilities: fix logic for effective root or real root capabilities: invert logic for clarity capabilities: remove a layer of conditional logic capabilities: move audit log decision to function capabilities: use intuitive names for id changes capabilities: use root_priveleged inline to clarify logic capabilities: rename has_cap to has_fcap capabilities: intuitive names for cap gain status capabilities: factor out cap_bprm_set_creds privileged root tpm, tpm_tis: use ARRAY_SIZE() to define TPM_HID_USR_IDX tpm: fix duplicate inline declaration specifier tpm: fix type of a local variables in tpm_tis_spi.c tpm: fix type of a local variable in tpm2_map_command() tpm: fix type of a local variable in tpm2_get_cc_attrs_tbl() tpm-dev-common: Reject too short writes ... commit dee02770cdcd8bc06a48c917ce5df2fb56cf6059 Merge: e4a8ca3 06641e8 Author: Linus Torvalds Date: Mon Nov 13 10:17:35 2017 -0800 Merge tag 'mmc-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Introduce host claiming by context to support blkmq - Preparations for enabling CQE (eMMC CMDQ) requests - Re-factorizations to prepare for blkmq support - Re-factorizations to prepare for CQE support - Fix signal voltage switch for SD cards without power cycle - Convert RPMB to a character device - Export eMMC revision via sysfs - Support eMMC DT binding for fixed driver type - Document mmc_regulator_get_supply() API MMC host: - omap_hsmmc: Updated regulator management for PBIAS - sdhci-omap: Add new OMAP SDHCI driver - meson-mx-sdio: New driver for the Amlogic Meson8 and Meson8b SoCs - sdhci-pci: Add support for Intel CDF - sdhci-acpi: Fix voltage switch for some Intel host controllers - sdhci-msm: Enable delay circuit calibration clocks - sdhci-msm: Manage power IRQ properly - mediatek: Add support of mt2701/mt2712 - mediatek: Updates management of clocks and tunings - mediatek: Upgrade eMMC HS400 support - rtsx_pci: Update tuning for gen3 PCI-Express - renesas_sdhi: Support R-Car Gen[123] fallback compatibility strings - Catch all errors when getting regulators - Various additional improvements and cleanups" * tag 'mmc-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (91 commits) sdhci-fujitsu: add support for setting the CMD_DAT_DELAY attribute dt-bindings: sdhci-fujitsu: document cmd-dat-delay property mmc: tmio: Replace msleep() of 20ms or less with usleep_range() mmc: dw_mmc: Convert timers to use timer_setup() mmc: dw_mmc: Cleanup the DTO timer like the CTO one mmc: vub300: Use common code in __download_offload_pseudocode() mmc: tmio: Use common error handling code in tmio_mmc_host_probe() mmc: Convert timers to use timer_setup() mmc: sdhci-acpi: Fix voltage switch for some Intel host controllers mmc: sdhci-acpi: Let devices define their own private data mmc: mediatek: perfer to use rise edge latching for cmd line mmc: mediatek: improve eMMC hs400 mode read performance mmc: mediatek: add latch-ck support mmc: mediatek: add support of source_cg clock mmc: mediatek: add stop_clk fix and enhance_rx support mmc: mediatek: add busy_check support mmc: mediatek: add async fifo and data tune support mmc: mediatek: add pad_tune0 support mmc: mediatek: make hs400_tune_response only for mt8173 arm64: dts: mt8173: remove "mediatek, mt8135-mmc" from mmc nodes ... commit e4a8ca3baa5557fa54557d42b5910ed0d3316922 Author: Arnd Bergmann Date: Mon Nov 13 17:51:00 2017 +0100 /proc/module: fix building without kallsyms As reported by kernelci and other build bots, we now get a link failure without CONFIG_KALLSYMS: module.c:(.text+0xf2c): undefined reference to `kallsyms_show_value' This adds a dummy helper with the same name that can be used for compilation. It's not entirely clear to me what this should return for !CONFIG_KALLSYMS, I picked an unconditional 'false', which leads to the module address being unavailable to user space. Link: https://kernelci.org/build/mainline/branch/master/kernel/v4.14-5-g516fb7f2e73d/ Fixes: 516fb7f2e73d ("/proc/module: use the same logic as /proc/kallsyms for address exposure") Signed-off-by: Arnd Bergmann Signed-off-by: Linus Torvalds include/linux/kallsyms.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 01c313dded34a16ef69e3972ceca687ba8a7cdf2 Author: Arnd Bergmann Date: Mon Nov 13 17:50:59 2017 +0100 kallsyms: fix building without printk Building kallsyms fails without CONFIG_PRINTK due to a missing declaration: kernel/kallsyms.c: In function 'kallsyms_show_value': kernel/kallsyms.c:670:10: error: 'kptr_restrict' undeclared (first use in this function); did you mean 'keyring_restrict'? This moves the declaration outside of the #ifdef guard, the definition is already available without CONFIG_PRINTK. Fixes: c0f3ea158939 ("stop using '%pK' for /proc/kallsyms pointer values") Signed-off-by: Arnd Bergmann [ I clearly need to start doing "allnoconfig" builds too, or just have a test branch for the 0day robot - Linus ] Signed-off-by: Linus Torvalds include/linux/printk.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 37c6b6f22170f781fb24b11d61a864aa905e2c89 Merge: e75427c a15fdc3 Author: Linus Torvalds Date: Mon Nov 13 09:45:34 2017 -0800 Merge tag 'regmap-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "After several quiet kernel releases we've got a couple of new features in regmap, support for using hwspinlocks as the lock for the internal data structures and a helper for polling on regmap_fields. The Kconfig dependencies on hwspinlocks were annoyingly difficult to squash between things behaving surprisingly and randconfig, I could've squashed those commits down but might've have caused hassle with other trees trying to use the new support. - support for using a hwspinlock to protect the regmap - an iopoll style helper for regmap_field" * tag 'regmap-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: Fix unused warning regmap: Try to work around Kconfig exploding on HWSPINLOCK regmap: Clean up hwspinlock on regmap exit regmap: Also protect hwspinlock in error handling path regmap: Add a config option for hwspinlock regmap: Add hardware spinlock support regmap: avoid -Wint-in-bool-context warning regmap: add iopoll-like polling macro for regmap_field regmap: constify regmap_bus structures regmap: Avoid namespace collision within macro & tidy up commit e75427c6945460c36bfcab4cd33db0adc0e17200 Merge: 5f194bf abbdb5c Author: Linus Torvalds Date: Mon Nov 13 09:43:24 2017 -0800 Merge tag 'spi-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "This release is almost entirely driver changes, there's a couple of fixes in the core but otherwise it's all drivers: - fix for mixed dynamic and static bus number assignment. - fixes for some leaks arising from confusing lifetime rules during device unregistration and improved documentation to try to help avoid this in the future. - fixes to make the native chip select support for i.MX usable. - slave mode support for i.MX. - support for Coldfire MCF5441x DSPI, Renesas R8A7443/5 and Spreadtrum ADI" * tag 'spi-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (31 commits) spi: imx: Don't require platform data chipselect array spi: imx: Fix failure path leak on GPIO request error spi: imx: GPIO based chip selects should not be required spi: sh-msiof: remove redundant pointer dev spi: s3c64xx: remove redundant pointer sci spi: spi-fsl-dspi: enabling Coldfire mcf5441x dspi spi: fix IDR collision on systems with both fixed and dynamic SPI bus numbers spi: orion: remove redundant assignment of status to zero spi: sh-msiof: Fix DMA transfer size check spi: imx: Fix failure path leak on GPIO request error spi: spi-axi: fix potential use-after-free after deregistration spi: document odd controller reference handling spi: fix use-after-free at controller deregistration spi: sprd: Fix the possible negative value of BIT() spi: sprd-adi: fix platform_no_drv_owner.cocci warnings spi: a3700: Change SPI mode before asserting chip-select spi: tegra114: correct register name in definition spi: spreadtrum adi: add hwspinlock dependency spi: sh-msiof: Use of_device_get_match_data() helper spi: rspi: Use of_device_get_match_data() helper ... commit e0c5f36b2a638fc3298200c385af7f196d3b5cd4 Author: David Daney Date: Thu Oct 12 12:50:34 2017 -0700 MIPS: Add iomem resource for kernel bss section. The kexec/kdump tools need to know where the .bss is so it can be included in the core dump. This allows vmcore-dmesg to have access to the dmesg buffers of the crashed kernel as well as allowing the debugger to examine variables in the bss section. Add a request for the bss resource in addition to the already requested code and data sections. Signed-off-by: David Daney Cc: Ralf Baechle Cc: Steven J. Hill , Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17485/ Signed-off-by: James Hogan arch/mips/kernel/setup.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5f194bf4853bcb6e7442518b70fb20a875ed34f0 Merge: 1e19bde 50b7bae Author: Linus Torvalds Date: Mon Nov 13 09:36:45 2017 -0800 Merge tag 'regulator-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "A very quiet release for regulator, there's some new device support in existing drivers here and a few fixes but nothing in the core. Summary: - New device support for Allwinner AXP813, Dialog DA223/4/5 and Qualcomm PMI8994" * tag 'regulator-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: tps65218: remove unused tps_info structure regulator: tps65218: Fix strobe assignment regulator: qcom_spmi: Include offset when translating voltages regulator: qcom_spmi: Add support for pmi8994 regulator: da9211: update for supporting da9223/4/5 ASoC: pfuze100: Remove leading zero from '@08' notation regulator: axp20x: Simplify axp20x_is_polyphase_slave implementation regulator: axp20x: Add support for AXP813 regulators commit 29f411399aaa2e53882858e01d21981f3c301e2a Author: Marc Zyngier Date: Mon Nov 13 17:25:59 2017 +0000 irqchip/gic-v3-its: Remove artificial dependency on PCI The GICv3 ITS doesn't really depend on PCI. Only the PCI/MSI part of it does, and there is no reason not to blow away most of the irqchip stack because PCI is not selected (though not selecting PCI seem to be asking for punishment, but hey...). So let's split the PCI-specific part from the ITS in the Kconfig file, and let's make that part depend on PCI. Architecture specific hacks (arch/arm{,64}/Kconfig) will be addressed in a separate patch. Reported-by: Arnd Bergmann Signed-off-by: Marc Zyngier drivers/irqchip/Kconfig | 7 +++++++ drivers/irqchip/Makefile | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) commit d447ebf9c77b16effd8aca114d7d281639e3f77f Author: Thierry Reding Date: Mon Nov 13 18:16:31 2017 +0100 fbcon: Initialize ops->info early During console takeover, which happens for all DRM/KMS setups using the fbdev helpers, fbcon_startup() is called before fbcon_init() and as a result con2fb_acquire_newinfo() will not be called (info->fbcon_par was set to non-NULL in fbcon_startup()) to assign ops->info. This causes the cursor_timer_handler() to unreference a NULL pointer. Avoid this by unconditionally assigning ops->info during fbcon_startup() so that it will be available early, but keep the additional assignment in con2fb_acquire_newinfo() to support console remapping at runtime. Signed-off-by: Thierry Reding Cc: Kees Cook Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/core/fbcon.c | 1 + 1 file changed, 1 insertion(+) commit 1e19bded7f5d5152b7f53ee7356241ecb18905b0 Merge: 1ec1699 ded0eb8 Author: Linus Torvalds Date: Mon Nov 13 08:55:46 2017 -0800 Merge tag 'hwmon-for-linus-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: - drivers for MAX31785 and MAX6621 - support for AMD family 17h (Ryzen, Threadripper) temperature sensors - various driver cleanups and minor improvements * tag 'hwmon-for-linus-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (30 commits) dt-bindings: pmbus: Add Maxim MAX31785 documentation pmbus: Add driver for Maxim MAX31785 Intelligent Fan Controller hwmon: (aspeed-pwm-tacho) Sort headers hwmon: (xgene) Minor clean up of ifdef and acpi_match_table reference hwmon: (max6621) Inverted if condition in max6621_read() hwmon: (asc7621) remove redundant assignment to newval hwmon: (xgene) Support hwmon v2 hwmon: (gpio-fan) Fix null pointer dereference at probe hwmon: (gpio-fan) Convert to use GPIO descriptors hwmon: (gpio-fan) Rename GPIO line state variables hwmon: (gpio-fan) Get rid of the gpio alarm struct hwmon: (gpio-fan) Get rid of platform data struct hwmon: (gpio-fan) Mandate OF_GPIO and cut pdata path hwmon: (gpio-fan) Send around device pointer hwmon: (gpio-fan) Localize platform data hwmon: (gpio-fan) Use local variable pointers hwmon: (gpio-fan) Move DT bindings to the right place Documentation: devicetree: add max6621 device hwmon: (max6621) Add support for Maxim MAX6621 temperature sensor hwmon: (w83793) make const array watchdog_minors static, reduces object code size ... commit 1ec1699122396be8cd56964ec49985b138968c87 Merge: 7832681 a8e9b18 Author: Linus Torvalds Date: Mon Nov 13 08:54:06 2017 -0800 Merge tag 'edac_for_4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC updates from Borislav Petkov: "The usual pile of bugfixes, cleanups and minor driver enhancements. Worth noting are the changes to ghes_edac to use a whitelist of known-good platforms on which GHES error reporting works relatively reliably. By Toshi Kani and Borislav Petkov" * tag 'edac_for_4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: EDAC, sb_edac: Fix missing break in switch MAINTAINERS: Split Cavium EDAC entry and add myself EDAC, sb_edac: Fix missing DIMM sysfs entries with KNL SNC2/SNC4 mode EDAC, skx_edac: Handle systems with segmented PCI busses EDAC, thunderx: Remove suspend/resume support EDAC, skx_edac: Fix detection of single-rank DIMMs EDAC, sb_edac: Don't create a second memory controller if HA1 is not present EDAC: Add owner check to the x86 platform drivers EDAC: Add helper which returns the loaded platform driver EDAC, ghes: Add platform check EDAC, ghes: Model a single, logical memory controller EDAC, ghes: Remove symbol exports EDAC: Handle return value of kasprintf() commit a3f143106596d739e7fbc4b84c96b1475247d876 Author: Ben Hutchings Date: Wed Oct 4 03:46:14 2017 +0100 MIPS: cmpxchg64() and HAVE_VIRT_CPU_ACCOUNTING_GEN don't work for 32-bit SMP __cmpxchg64_local_generic() is atomic only w.r.t tasks and interrupts on the same CPU (that's what the 'local' means). We can't use it to implement cmpxchg64() in SMP configurations. So, for 32-bit SMP configurations: - Don't define cmpxchg64() - Don't enable HAVE_VIRT_CPU_ACCOUNTING_GEN, which requires it Fixes: e2093c7b03c1 ("MIPS: Fall back to generic implementation of ...") Fixes: bb877e96bea1 ("MIPS: Add support for full dynticks CPU time accounting") Signed-off-by: Ben Hutchings Cc: Ralf Baechle Cc: Deng-Cheng Zhu Cc: linux-mips@linux-mips.org Cc: # 4.1+ Patchwork: https://patchwork.linux-mips.org/patch/17413/ Signed-off-by: James Hogan arch/mips/Kconfig | 2 +- arch/mips/include/asm/cmpxchg.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit 8a7a8e1eab929eb3a5b735a788a23b9731139046 Author: Dou Liyang Date: Mon Nov 13 13:49:04 2017 +0800 timekeeping: Eliminate the stale declaration of ktime_get_raw_and_real_ts64() Commit ba26621e63ce got rid of ktime_get_raw_and_real_ts64(), but left its declaration behind. Remove it. Fixes: ba26621e63ce ("time: Remove duplicated code in ktime_get_raw_and_real()") Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: Christopher S. Hall Cc: joelaf@google.com Cc: arnd@arndb.de Cc: gregkh@linuxfoundation.org Cc: john.stultz@linaro.org Cc: deepa.kernel@gmail.com Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1510552144-20831-1-git-send-email-douly.fnst@cn.fujitsu.com include/linux/timekeeping.h | 6 ------ 1 file changed, 6 deletions(-) commit 4dc4704c0024751fe2b4532cf33c80376f1add70 Author: Justin Chen Date: Wed May 24 10:55:16 2017 -0700 MIPS: BMIPS: Enable HARDIRQS_SW_RESEND HW interrupts triggered when irq_disable() were being ignored. Enable resending HW interrupts as SW interrupts. This was causing an issue where the interrupts waking the system up from a suspend state were not calling their interrupt handlers. Signed-off-by: Justin Chen Acked-by: Florian Fainelli Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16116/ Signed-off-by: James Hogan arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 7832681b365f220151d1c33cc1a8891f10ecdb6f Merge: 516fb7f 4742737 Author: Linus Torvalds Date: Mon Nov 13 08:25:06 2017 -0800 Merge tag 'docs-4.15' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "A relatively calm cycle for the docs tree again. - The old driver statement has been added to the kernel docs. - We have a couple of new helper scripts. find-unused-docs.sh from Sayli Karnic will point out kerneldoc comments that are not actually used in the documentation. Jani Nikula's documentation-file-ref-check finds references to non-existing files. - A new ftrace document from Steve Rostedt. - Vinod Koul converted the dmaengine docs to RST Beyond that, it's mostly simple fixes. This set reaches outside of Documentation/ a bit more than most. In all cases, the changes are to comment docs, mostly from Randy, in places where there didn't seem to be anybody better to take them" * tag 'docs-4.15' of git://git.lwn.net/linux: (52 commits) documentation: fb: update list of available compiled-in fonts MAINTAINERS: update DMAengine documentation location dmaengine: doc: ReSTize pxa_dma doc dmaengine: doc: ReSTize dmatest doc dmaengine: doc: ReSTize client API doc dmaengine: doc: ReSTize provider doc dmaengine: doc: Add ReST style dmaengine document ftrace/docs: Add documentation on how to use ftrace from within the kernel bug-hunting.rst: Fix an example and a typo in a Sphinx tag scripts: Add a script to find unused documentation samples: Convert timers to use timer_setup() documentation: kernel-api: add more info on bitmap functions Documentation: fix selftests related file refs Documentation: fix ref to power basic-pm-debugging Documentation: fix ref to trace stm content Documentation: fix ref to coccinelle content Documentation: fix ref to workqueue content Documentation: fix ref to sphinx/kerneldoc.py Documentation: fix locking rt-mutex doc refs docs: dev-tools: correct Coccinelle version number ... commit 47f9d0bf526058b3fdc077698fcb19748d5700e4 Author: Marc Zyngier Date: Mon Nov 13 16:21:33 2017 +0000 irqchip/gic-v4: Add forward definition of struct irq_domain_ops In some randconfig scenarios, including arm-gic-v4.h results in a spurious wawrning about the $SUBJECT structure not being defined. Adding a forward definition keeps it quiet. Reported-by: Arnd Bergmann Signed-off-by: Marc Zyngier include/linux/irqchip/arm-gic-v4.h | 1 + 1 file changed, 1 insertion(+) commit 6cfa7cc46b1a7a15d81d5389c99cfca633c12b8e Author: Dave Martin Date: Mon Nov 6 18:07:11 2017 +0000 arm64: Make ARMV8_DEPRECATED depend on SYSCTL If CONFIG_SYSCTL=n and CONFIG_ARMV8_DEPRECATED=y, the deprecated instruction emulation code currently leaks some memory at boot time, and won't have any runtime control interface. This does not feel like useful or intended behaviour... This patch adds a dependency on CONFIG_SYSCTL, so that such a kernel can't be built in the first place. It's probably not worth adding the error-handling / cleanup code that would be needed to deal with this otherwise: people who desperately need the emulation can still enable SYSCTL. Acked-by: Arnd Bergmann Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 9bfe7553fadb269e45a6e10f68b727957dff5676 Author: Jason A. Donenfeld Date: Tue Nov 7 01:49:54 2017 +0000 arm64: Implement __lshrti3 library function Commit fb8722735f50 ("arm64: support __int128 on gcc 5+") added support for the __int128 data type, but this breaks the build in some configurations where GCC ends up emitting calls to the __lshrti3 helper in libgcc, which results in a link error: kernel/sched/fair.o: In function `__calc_delta': fair.c:(.text+0xca0): undefined reference to `__lshrti3' kernel/time/timekeeping.o: In function `timekeeping_resume': timekeeping.c:(.text+0x3f60): undefined reference to `__lshrti3' make: *** [vmlinux] Error 1 Fix the build by providing an implementation of __lshrti3, like we do already for __ashlti3 and __ashrti3. Reported-by: Arnd Bergmann Signed-off-by: Jason A. Donenfeld Signed-off-by: Will Deacon arch/arm64/lib/tishift.S | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 58ba4d5a25579e5c7e312bd359c95f3a9a0a242c Author: Andi Kleen Date: Wed Nov 8 16:07:18 2017 -0800 perf/x86/intel: Hide TSX events when RTM is not supported 0day testing reported a perf test regression on Haswell systems without RTM. Commit a5df70c35 hides the in_tx/in_tx_cp attributes when RTM is not available, but the TSX events are still available in sysfs. Due to the missing attributes the event parser fails on those files. Don't show the TSX events in sysfs when RTM is not available on Haswell/Broadwell/Skylake. Fixes: a5df70c354c2 (perf/x86: Only show format attributes when supported) Reported-by: kernel test robot Tested-by: Jin Yao Signed-off-by: Andi Kleen Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20171109000718.14137-1-andi@firstfloor.org arch/x86/events/intel/core.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) commit 98bf40cd99fcfed0705812b6cbdbb3b441a42970 Author: David Howells Date: Thu Nov 2 15:27:53 2017 +0000 afs: Protect call->state changes against signals Protect call->state changes against the call being prematurely terminated due to a signal. What can happen is that a signal causes afs_wait_for_call_to_complete() to abort an afs_call because it's not yet complete whilst afs_deliver_to_call() is delivering data to that call. If the data delivery causes the state to change, this may overwrite the state of the afs_call, making it not-yet-complete again - but no further notifications will be forthcoming from AF_RXRPC as the rxrpc call has been aborted and completed, so kAFS will just hang in various places waiting for that call or on page bits that need clearing by that call. A tracepoint to monitor call state changes is also provided. Signed-off-by: David Howells fs/afs/cmservice.c | 26 ++++++------ fs/afs/internal.h | 63 ++++++++++++++++++++++++---- fs/afs/rxrpc.c | 100 ++++++++++++++++++++++++--------------------- include/trace/events/afs.h | 30 ++++++++++++++ 4 files changed, 150 insertions(+), 69 deletions(-) commit 13524ab3c6f41bcd257d28644414297bea8282b7 Author: David Howells Date: Thu Nov 2 15:27:53 2017 +0000 afs: Trace page dirty/clean Add a trace event that logs the dirtying and cleaning of pages attached to AFS inodes. Signed-off-by: David Howells fs/afs/file.c | 10 ++++++++++ fs/afs/write.c | 34 +++++++++++++++++++++------------- include/trace/events/afs.h | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 13 deletions(-) commit 1cf7a1518aefa69ac6ba0c3f9206073e4221e3c8 Author: David Howells Date: Thu Nov 2 15:27:52 2017 +0000 afs: Implement shared-writeable mmap Implement shared-writeable mmap for AFS. Signed-off-by: David Howells fs/afs/file.c | 22 +++++++++++++++++++++- fs/afs/internal.h | 1 + fs/afs/write.c | 40 ++++++++++++++++++++++++++++++++-------- 3 files changed, 54 insertions(+), 9 deletions(-) commit 4343d00872e1de9a470d951bf09bdd18bc73f555 Author: David Howells Date: Thu Nov 2 15:27:52 2017 +0000 afs: Get rid of the afs_writeback record Get rid of the afs_writeback record that kAFS is using to match keys with writes made by that key. Instead, keep a list of keys that have a file open for writing and/or sync'ing and iterate through those. Signed-off-by: David Howells fs/afs/file.c | 83 ++++--- fs/afs/fsclient.c | 24 +-- fs/afs/inode.c | 11 +- fs/afs/internal.h | 51 ++--- fs/afs/super.c | 4 +- fs/afs/write.c | 633 +++++++++++++++++++++++++++--------------------------- mm/filemap.c | 1 + 7 files changed, 412 insertions(+), 395 deletions(-) commit 215804a99283c57fdd869aab350fdf6acc3460b6 Author: David Howells Date: Thu Nov 2 15:27:52 2017 +0000 afs: Introduce a file-private data record Introduce a file-private data record for kAFS and put the key into it rather than storing the key in file->private_data. Signed-off-by: David Howells fs/afs/dir.c | 2 +- fs/afs/file.c | 39 ++++++++++++++++++++++++++++----------- fs/afs/flock.c | 10 +++++----- fs/afs/inode.c | 2 +- fs/afs/internal.h | 14 ++++++++++++++ fs/afs/write.c | 4 ++-- 6 files changed, 51 insertions(+), 20 deletions(-) commit 83732ec5146916bd49b3036b0ea7dedb7831b90e Author: Marc Dionne Date: Thu Nov 2 15:27:52 2017 +0000 afs: Use a dynamic port if 7001 is in use It is not required that the afs client operate on port 7001. The port could be in use because another kernel or userspace client has already bound to it. If the port is in use, just fallback to using a dynamic port. Signed-off-by: Marc Dionne Signed-off-by: David Howells fs/afs/rxrpc.c | 4 ++++ 1 file changed, 4 insertions(+) commit dab17c1add5c51b68027a9a3861af3a99cb5485a Author: David Howells Date: Thu Nov 2 15:27:52 2017 +0000 afs: Fix directory read/modify race Because parsing of the directory wasn't being done under any sort of lock, the pages holding the directory content can get invalidated whilst the parsing is ongoing. Further, the directory page check function gets called outside of the page lock, so if the page gets cleared or updated, this may return reports of bad magic numbers in the directory page. Also, the directory may change size whilst checking and parsing are ongoing, so more care needs to be taken here. Fix this by: (1) Perform the page check from the page filling function before we set PageUptodate and drop the page lock. (2) Check for the file having shrunk and the page having been abandoned before checking the page contents. (3) Lock the page whilst parsing it for the directory iterator. Whilst we're at it, add a tracepoint to report check failure. Signed-off-by: David Howells fs/afs/dir.c | 27 +++++++++++++++++++-------- fs/afs/file.c | 5 +++++ fs/afs/internal.h | 1 + include/trace/events/afs.h | 21 +++++++++++++++++++++ 4 files changed, 46 insertions(+), 8 deletions(-) commit 2c099014a0a456012c1778e80adce839bf956b77 Author: David Howells Date: Thu Nov 2 15:27:51 2017 +0000 afs: Trace the sending of pages Add a pair of tracepoints to log the sending of pages for an FS.StoreData or FS.StoreData64 operation. Tracepoint afs_send_pages notes each set of pages added to the operation. There may be several of these per operation as we get up at most 8 contiguous pages in one go because the bvec we're using is on the stack. Tracepoint afs_sent_pages notes the end of adding data from a whole run of pages to the operation and the completion of the request phase. Signed-off-by: David Howells fs/afs/rxrpc.c | 3 +++ include/trace/events/afs.h | 61 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) commit 025db80c9e421efef11f2b83b7f78a11476f06db Author: David Howells Date: Thu Nov 2 15:27:51 2017 +0000 afs: Trace the initiation and completion of client calls Add tracepoints to trace the initiation and completion of client calls within the kafs filesystem. The afs_make_vl_call tracepoint watches calls to the volume location database server. The afs_make_fs_call tracepoint watches calls to the file server. The afs_call_done tracepoint watches for call completion. Signed-off-by: David Howells fs/afs/fsclient.c | 75 ++++++++++++++++++++---- fs/afs/internal.h | 1 + fs/afs/rxrpc.c | 25 +++++--- fs/afs/vlclient.c | 10 +++- include/trace/events/afs.h | 142 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 233 insertions(+), 20 deletions(-) commit becfcc7e576eed03b93f412769573c93de550527 Author: David Howells Date: Thu Nov 2 15:27:51 2017 +0000 afs: Fix documentation on # vs % prefix in mount source specification The documentation that describes the #-prefix and the %-prefix used when specifying the source to mount is has the descriptions the wrong way round. Switch them over. Reported-by: Marc Dionne Signed-off-by: David Howells Documentation/filesystems/afs.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1199db603511d7463d9d3840f96f61967affc766 Author: David Howells Date: Thu Nov 2 15:27:51 2017 +0000 afs: Fix total-length calculation for multiple-page send Fix the total-length calculation in afs_make_call() when the operation being dispatched has data from a series of pages attached. Despite the patched code looking like that it should reduce mathematically to the current code, it doesn't because the 32-bit unsigned arithmetic being used to calculate the page-offset-difference doesn't correctly extend to a 64-bit value when the result is effectively negative. Without this, some FS.StoreData operations that span multiple pages fail, reporting too little or too much data. Signed-off-by: David Howells fs/afs/rxrpc.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 5f0fc8ba6a1eec510a1e43def48697985d948a2c Author: David Howells Date: Thu Nov 2 15:27:51 2017 +0000 afs: Only progress call state at end of Tx phase from rxrpc callback Only progress the AFS call state at the end of Tx phase from the callback passed to rxrpc_kernel_send_data() rather than setting it before the last data send call. Signed-off-by: David Howells fs/afs/rxrpc.c | 9 --------- 1 file changed, 9 deletions(-) commit bf99a53ce22a29d64d3190093edf52f1d44d53b3 Author: David Howells Date: Thu Nov 2 15:27:51 2017 +0000 afs: Make use of the YFS service upgrade to fully support IPv6 YFS VL servers offer an upgraded Volume Location service that can return IPv6 addresses to fileservers and volume servers in addition to IPv4 addresses using the YFSVL.GetEndpoints operation which we should use if it's available. To this end: (1) Make rxrpc_kernel_recv_data() return the call's current service ID so that the caller can detect service upgrade and see what the service was upgraded to. (2) When we see a VL server address we haven't seen before, send a VL.GetCapabilities operation to it with the service upgrade bit set. If we get an upgrade to the YFS VL service, change the service ID in the address list for that address to use the upgraded service and set a flag to note that this appears to be a YFS-compatible server. (3) If, when a server's addresses are being looked up, we note that we previously detected a YFS-compatible server, then send the YFSVL.GetEndpoints operation rather than VL.GetAddrsU. (4) Build a fileserver address list from the reply of YFSVL.GetEndpoints, including both IPv4 and IPv6 addresses. Volume server addresses are discarded. (5) The address list is sorted by address and port now, instead of just address. This allows multiple servers on the same host sitting on different ports. Signed-off-by: David Howells fs/afs/addr_list.c | 54 ++++++++- fs/afs/afs_vl.h | 16 +++ fs/afs/internal.h | 10 +- fs/afs/server.c | 5 +- fs/afs/vlclient.c | 337 ++++++++++++++++++++++++++++++++++++++++++++++++++++- fs/afs/volume.c | 16 +++ 6 files changed, 428 insertions(+), 10 deletions(-) commit d2ddc776a4581d900fc3bdc7803b403daae64d88 Author: David Howells Date: Thu Nov 2 15:27:50 2017 +0000 afs: Overhaul volume and server record caching and fileserver rotation The current code assumes that volumes and servers are per-cell and are never shared, but this is not enforced, and, indeed, public cells do exist that are aliases of each other. Further, an organisation can, say, set up a public cell and a private cell with overlapping, but not identical, sets of servers. The difference is purely in the database attached to the VL servers. The current code will malfunction if it sees a server in two cells as it assumes global address -> server record mappings and that each server is in just one cell. Further, each server may have multiple addresses - and may have addresses of different families (IPv4 and IPv6, say). To this end, the following structural changes are made: (1) Server record management is overhauled: (a) Server records are made independent of cell. The namespace keeps track of them, volume records have lists of them and each vnode has a server on which its callback interest currently resides. (b) The cell record no longer keeps a list of servers known to be in that cell. (c) The server records are now kept in a flat list because there's no single address to sort on. (d) Server records are now keyed by their UUID within the namespace. (e) The addresses for a server are obtained with the VL.GetAddrsU rather than with VL.GetEntryByName, using the server's UUID as a parameter. (f) Cached server records are garbage collected after a period of non-use and are counted out of existence before purging is allowed to complete. This protects the work functions against rmmod. (g) The servers list is now in /proc/fs/afs/servers. (2) Volume record management is overhauled: (a) An RCU-replaceable server list is introduced. This tracks both servers and their coresponding callback interests. (b) The superblock is now keyed on cell record and numeric volume ID. (c) The volume record is now tied to the superblock which mounts it, and is activated when mounted and deactivated when unmounted. This makes it easier to handle the cache cookie without causing a double-use in fscache. (d) The volume record is loaded from the VLDB using VL.GetEntryByNameU to get the server UUID list. (e) The volume name is updated if it is seen to have changed when the volume is updated (the update is keyed on the volume ID). (3) The vlocation record is got rid of and VLDB records are no longer cached. Sufficient information is stored in the volume record, though an update to a volume record is now no longer shared between related volumes (volumes come in bundles of three: R/W, R/O and backup). and the following procedural changes are made: (1) The fileserver cursor introduced previously is now fleshed out and used to iterate over fileservers and their addresses. (2) Volume status is checked during iteration, and the server list is replaced if a change is detected. (3) Server status is checked during iteration, and the address list is replaced if a change is detected. (4) The abort code is saved into the address list cursor and -ECONNABORTED returned in afs_make_call() if a remote abort happened rather than translating the abort into an error message. This allows actions to be taken depending on the abort code more easily. (a) If a VMOVED abort is seen then this is handled by rechecking the volume and restarting the iteration. (b) If a VBUSY, VRESTARTING or VSALVAGING abort is seen then this is handled by sleeping for a short period and retrying and/or trying other servers that might serve that volume. A message is also displayed once until the condition has cleared. (c) If a VOFFLINE abort is seen, then this is handled as VBUSY for the moment. (d) If a VNOVOL abort is seen, the volume is rechecked in the VLDB to see if it has been deleted; if not, the fileserver is probably indicating that the volume couldn't be attached and needs salvaging. (e) If statfs() sees one of these aborts, it does not sleep, but rather returns an error, so as not to block the umount program. (5) The fileserver iteration functions in vnode.c are now merged into their callers and more heavily macroised around the cursor. vnode.c is removed. (6) Operations on a particular vnode are serialised on that vnode because the server will lock that vnode whilst it operates on it, so a second op sent will just have to wait. (7) Fileservers are probed with FS.GetCapabilities before being used. This is where service upgrade will be done. (8) A callback interest on a fileserver is set up before an FS operation is performed and passed through to afs_make_call() so that it can be set on the vnode if the operation returns a callback. The callback interest is passed through to afs_iget() also so that it can be set there too. In general, record updating is done on an as-needed basis when we try to access servers, volumes or vnodes rather than offloading it to work items and special threads. Notes: (1) Pre AFS-3.4 servers are no longer supported, though this can be added back if necessary (AFS-3.4 was released in 1998). (2) VBUSY is retried forever for the moment at intervals of 1s. (3) /proc/fs/afs//servers no longer exists. Signed-off-by: David Howells fs/afs/Makefile | 3 +- fs/afs/addr_list.c | 31 +++ fs/afs/afs_fs.h | 1 + fs/afs/afs_vl.h | 42 +++ fs/afs/callback.c | 20 +- fs/afs/cell.c | 7 +- fs/afs/dir.c | 388 +++++++++++++++----------- fs/afs/file.c | 37 ++- fs/afs/flock.c | 108 +++++++- fs/afs/fsclient.c | 347 ++++++++++++++---------- fs/afs/inode.c | 50 +++- fs/afs/internal.h | 453 ++++++++++++++++--------------- fs/afs/main.c | 35 +-- fs/afs/proc.c | 153 ++++------- fs/afs/rotate.c | 461 +++++++++++++++++++++++++++++++ fs/afs/rxrpc.c | 45 ++-- fs/afs/security.c | 2 +- fs/afs/server.c | 750 ++++++++++++++++++++++++++++++++++++--------------- fs/afs/server_list.c | 153 +++++++++++ fs/afs/super.c | 92 ++++--- fs/afs/vlclient.c | 307 ++++++++++++++------- fs/afs/vlocation.c | 669 --------------------------------------------- fs/afs/vnode.c | 750 --------------------------------------------------- fs/afs/volume.c | 426 ++++++++++++++++++++--------- fs/afs/write.c | 38 ++- fs/afs/xattr.c | 2 +- 26 files changed, 2795 insertions(+), 2575 deletions(-) commit 9cc6fc50f7bc69ac28bee45eed13cbc65a86210f Author: David Howells Date: Thu Nov 2 15:27:50 2017 +0000 afs: Move server rotation code into its own file Move server rotation code into its own file. Signed-off-by: David Howells fs/afs/Makefile | 1 + fs/afs/rotate.c | 254 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/afs/volume.c | 250 ------------------------------------------------------- 3 files changed, 255 insertions(+), 250 deletions(-) commit 8b2a464ced77fe35be72ab7d38152a9439daf8d3 Author: David Howells Date: Thu Nov 2 15:27:50 2017 +0000 afs: Add an address list concept Add an RCU replaceable address list structure to hold a list of server addresses. The list also holds the To this end: (1) A cell's VL server address list can be loaded directly via insmod or echo to /proc/fs/afs/cells or dynamically from a DNS query for AFSDB or SRV records. (2) Anyone wanting to use a cell's VL server address must wait until the cell record comes online and has tried to obtain some addresses. (3) An FS server's address list, for the moment, has a single entry that is the key to the server list. This will change in the future when a server is instead keyed on its UUID and the VL.GetAddrsU operation is used. (4) An 'address cursor' concept is introduced to handle iteration through the address list. This is passed to the afs_make_call() as, in the future, stuff (such as abort code) that doesn't outlast the call will be returned in it. In the future, we might want to annotate the list with information about how each address fares. We might then want to propagate such annotations over address list replacement. Whilst we're at it, we allow IPv6 addresses to be specified in colon-delimited lists by enclosing them in square brackets. Signed-off-by: David Howells fs/afs/Makefile | 1 + fs/afs/addr_list.c | 308 +++++++++++++++++++++++++++++++++++++++++ fs/afs/cell.c | 169 ++++++++--------------- fs/afs/fsclient.c | 121 ++++++++--------- fs/afs/internal.h | 120 +++++++++++----- fs/afs/proc.c | 23 ++-- fs/afs/rxrpc.c | 3 +- fs/afs/server.c | 70 ++++++---- fs/afs/vlclient.c | 8 +- fs/afs/vlocation.c | 75 +++++----- fs/afs/vnode.c | 392 ++++++++++++++++++++--------------------------------- fs/afs/volume.c | 115 +++++++++++----- 12 files changed, 844 insertions(+), 561 deletions(-) commit 989782dcdc91a5e6d5999c7a52a84a60a0811e56 Author: David Howells Date: Thu Nov 2 15:27:50 2017 +0000 afs: Overhaul cell database management Overhaul the way that the in-kernel AFS client keeps track of cells in the following manner: (1) Cells are now held in an rbtree to make walking them quicker and RCU managed (though this is probably overkill). (2) Cells now have a manager work item that: (A) Looks after fetching and refreshing the VL server list. (B) Manages cell record lifetime, including initialising and destruction. (B) Manages cell record caching whereby threads are kept around for a certain time after last use and then destroyed. (C) Manages the FS-Cache index cookie for a cell. It is not permitted for a cookie to be in use twice, so we have to be careful to not allow a new cell record to exist at the same time as an old record of the same name. (3) Each AFS network namespace is given a manager work item that manages the cells within it, maintaining a single timer to prod cells into updating their DNS records. This uses the reduce_timer() facility to make the timer expire at the soonest timed event that needs happening. (4) When a module is being unloaded, cells and cell managers are now counted out using dec_after_work() to make sure the module text is pinned until after the data structures have been cleaned up. (5) Each cell's VL server list is now protected by a seqlock rather than a semaphore. Signed-off-by: David Howells fs/afs/cell.c | 916 +++++++++++++++++++++++++++++++++++++----------------- fs/afs/internal.h | 60 +++- fs/afs/main.c | 16 +- fs/afs/proc.c | 15 +- fs/afs/super.c | 12 +- fs/afs/xattr.c | 2 +- 6 files changed, 704 insertions(+), 317 deletions(-) commit be080a6f43c40976afc950ee55e9b7f8e2b53525 Author: David Howells Date: Thu Nov 2 15:27:49 2017 +0000 afs: Overhaul permit caching Overhaul permit caching in AFS by making it per-vnode and sharing permit lists where possible. When most of the fileserver operations are called, they return a status structure indicating the (revised) details of the vnode or vnodes involved in the operation. This includes the access mark derived from the ACL (named CallerAccess in the protocol definition file). This is cacheable and if the ACL changes, the server will tell us that it is breaking the callback promise, at which point we can discard the currently cached permits. With this patch, the afs_permits structure has, at the end, an array of { key, CallerAccess } elements, sorted by key pointer. This is then cached in a hash table so that it can be shared between vnodes with the same access permits. Permit lists can only be shared if they contain the exact same set of key->CallerAccess mappings. Note that that table is global rather than being per-net_ns. If the keys in a permit list cross net_ns boundaries, there is no problem sharing the cached permits, since the permits are just integer masks. Since permit lists pin keys, the permit cache also makes it easier for a future patch to find all occurrences of a key and remove them by means of setting the afs_permits::invalidated flag and then clearing the appropriate key pointer. In such an event, memory barriers will need adding. Lastly, the permit caching is skipped if the server has sent either a vnode-specific or an entire-server callback since the start of the operation. Signed-off-by: David Howells fs/afs/afs.h | 1 - fs/afs/flock.c | 4 +- fs/afs/fsclient.c | 5 +- fs/afs/inode.c | 13 +- fs/afs/internal.h | 27 ++-- fs/afs/main.c | 1 + fs/afs/security.c | 367 ++++++++++++++++++++++++++++++++---------------------- fs/afs/super.c | 1 - fs/afs/vnode.c | 12 +- 9 files changed, 244 insertions(+), 187 deletions(-) commit c435ee34551e1f5a02a253ca8e235287efd2727c Author: David Howells Date: Thu Nov 2 15:27:49 2017 +0000 afs: Overhaul the callback handling Overhaul the AFS callback handling by the following means: (1) Don't give up callback promises on vnodes that we are no longer using, rather let them just expire on the server or let the server break them. This is actually more efficient for the server as the callback lookup is expensive if there are lots of extant callbacks. (2) Only give up the callback promises we have from a server when the server record is destroyed. Then we can just give up *all* the callback promises on it in one go. (3) Servers can end up being shared between cells if cells are aliased, so don't add all the vnodes being backed by a particular server into a big FID-indexed tree on that server as there may be duplicates. Instead have each volume instance (~= superblock) register an interest in a server as it starts to make use of it and use this to allow the processor for callbacks from the server to find the superblock and thence the inode corresponding to the FID being broken by means of ilookup_nowait(). (4) Rather than iterating over the entire callback list when a mass-break comes in from the server, maintain a counter of mass-breaks in afs_server (cb_seq) and make afs_validate() check it against the copy in afs_vnode. It would be nice not to have to take a read_lock whilst doing this, but that's tricky without using RCU. (5) Save a ref on the fileserver we're using for a call in the afs_call struct so that we can access its cb_s_break during call decoding. (6) Write-lock around callback and status storage in a vnode and read-lock around getattr so that we don't see the status mid-update. This has the following consequences: (1) Data invalidation isn't seen until someone calls afs_validate() on a vnode. Unfortunately, we need to use a key to query the server, but getting one from a background thread is tricky without caching loads of keys all over the place. (2) Mass invalidation isn't seen until someone calls afs_validate(). (3) Callback breaking is going to hit the inode_hash_lock quite a bit. Could this be replaced with rcu_read_lock() since inodes are destroyed under RCU conditions. Signed-off-by: David Howells fs/afs/afs_fs.h | 1 + fs/afs/callback.c | 484 +++++++++++++++-------------------------------------- fs/afs/cmservice.c | 2 +- fs/afs/dir.c | 52 +++--- fs/afs/flock.c | 6 +- fs/afs/fsclient.c | 190 +++++++++++---------- fs/afs/inode.c | 109 ++++++------ fs/afs/internal.h | 93 +++++----- fs/afs/main.c | 7 - fs/afs/security.c | 15 +- fs/afs/server.c | 21 +-- fs/afs/super.c | 11 +- fs/afs/vnode.c | 203 ++-------------------- fs/afs/volume.c | 43 +++-- 14 files changed, 443 insertions(+), 794 deletions(-) commit d0676a16781d0972969dff8b3f3f819599cc4b07 Author: David Howells Date: Thu Nov 2 15:27:49 2017 +0000 afs: Rename struct afs_call server member to cm_server Rename the server member of struct afs_call to cm_server as we're only going to be using it for incoming calls for the Cache Manager service. This makes it easier to differentiate from the pointer to the target server for the client, which will point to a different structure to allow for callback handling. Signed-off-by: David Howells fs/afs/cmservice.c | 18 ++++++++---------- fs/afs/internal.h | 2 +- fs/afs/rxrpc.c | 1 + 3 files changed, 10 insertions(+), 11 deletions(-) commit 03dc2cfca536df89f4b1747caad9324c9be482fa Author: David Howells Date: Thu Nov 2 15:27:49 2017 +0000 afs: Fix the afs_uuid struct to make the char-sized fields signed In AFS's encoding of a UUID, the eight 'char' fields are all signed, so represent them with __s8 rather than __u8. This makes the compiler sign-extend them correctly when XDR-encoding them. Signed-off-by: David Howells fs/afs/afs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f4b3526d83c40dd8bf5948b9d7a1b2c340f0dcc8 Author: David Howells Date: Thu Nov 2 15:27:48 2017 +0000 afs: Connect up the CB.ProbeUuid The handler for the CB.ProbeUuid operation in the cache manager is implemented, but isn't listed in the switch-statement of operation selection, so won't be used. Fix this by adding it. Signed-off-by: David Howells fs/afs/cmservice.c | 3 +++ 1 file changed, 3 insertions(+) commit 33cd7f2b76717ac8dda566d8b4f518e803ae2618 Author: David Howells Date: Thu Nov 2 15:27:48 2017 +0000 afs: Potentially return call->reply[0] from afs_make_call() If call->ret_reply0 is set, return call->reply[0] on success. Change the return type of afs_make_call() to long so that this can be passed back without bit loss and then cast to a pointer if required. Signed-off-by: David Howells fs/afs/internal.h | 3 ++- fs/afs/rxrpc.c | 26 ++++++++++++++++---------- 2 files changed, 18 insertions(+), 11 deletions(-) commit 97e3043ad82c93b7c2e3c4bfc518f7401f175821 Author: David Howells Date: Thu Nov 2 15:27:48 2017 +0000 afs: Condense afs_call's reply{,2,3,4} into an array Condense struct afs_call's reply anchor members - reply{,2,3,4} - into an array. Signed-off-by: David Howells fs/afs/file.c | 2 +- fs/afs/fsclient.c | 136 +++++++++++++++++++++++++++--------------------------- fs/afs/internal.h | 5 +- fs/afs/rxrpc.c | 2 +- fs/afs/vlclient.c | 6 +-- 5 files changed, 74 insertions(+), 77 deletions(-) commit f780c8ea0e73c0d371ffbebff91bb7555697219f Author: David Howells Date: Thu Nov 2 15:27:48 2017 +0000 afs: Consolidate abort_to_error translators The AFS abort code space is shared across all services, so there's no need for separate abort_to_error translators for each service. Consolidate them into a single function and remove the function pointers for them. Signed-off-by: David Howells fs/afs/cmservice.c | 6 ------ fs/afs/fsclient.c | 18 ------------------ fs/afs/internal.h | 3 --- fs/afs/misc.c | 38 ++++++++++++++++++++++++++++++++++---- fs/afs/rxrpc.c | 5 ++--- fs/afs/vlclient.c | 43 ------------------------------------------- 6 files changed, 36 insertions(+), 77 deletions(-) commit 3838d3ecdea496699a8c13c183d4df5dfe8e1a3e Author: David Howells Date: Thu Nov 2 15:27:47 2017 +0000 afs: Allow IPv6 address specification of VL servers Allow VL server specifications to be given IPv6 addresses as well as IPv4 addresses, for example as: echo add foo.org 1111:2222:3333:0:4444:5555:6666:7777 >/proc/fs/afs/cells Note that ':' is the expected separator for separating IPv4 addresses, but if a ',' is detected or no '.' is detected in the string, the delimiter is switched to ','. This also works with DNS AFSDB or SRV record strings fetched by upcall from userspace. Signed-off-by: David Howells fs/afs/cell.c | 31 +++++++++++++++++++++---------- fs/afs/proc.c | 2 +- fs/afs/rxrpc.c | 11 +++++------ fs/afs/server.c | 5 ----- fs/afs/vlclient.c | 13 +++++++++---- 5 files changed, 36 insertions(+), 26 deletions(-) commit 4d9df9868f31df6725481135c10ac6419ce58d44 Author: David Howells Date: Thu Nov 2 15:27:47 2017 +0000 afs: Keep and pass sockaddr_rxrpc addresses rather than in_addr Keep and pass sockaddr_rxrpc addresses around rather than keeping and passing in_addr addresses to allow for the use of IPv6 and non-standard port numbers in future. This also allows the port and service_id fields to be removed from the afs_call struct. Signed-off-by: David Howells fs/afs/cell.c | 18 +++++++++++++++--- fs/afs/fsclient.c | 36 ------------------------------------ fs/afs/internal.h | 15 +++++++-------- fs/afs/proc.c | 10 +++++----- fs/afs/rxrpc.c | 18 ++++-------------- fs/afs/server.c | 31 ++++++++++++++++--------------- fs/afs/vlclient.c | 20 ++++++++++++-------- fs/afs/vlocation.c | 30 ++++++++---------------------- fs/afs/vnode.c | 28 ++++++++++++++-------------- fs/afs/volume.c | 9 ++++----- 10 files changed, 85 insertions(+), 130 deletions(-) commit ad6a942a9e74edea8a4a126a1e434feff6a6d5c2 Author: David Howells Date: Thu Nov 2 15:27:47 2017 +0000 afs: Update the cache index structure Update the cache index structure in the following ways: (1) Don't use the volume name followed by the volume type as levels in the cache index. Volumes can be renamed. Use the volume ID instead. (2) Don't store the VLDB data for a volume in the tree. If the volume database should be cached locally, then it should be done in a separate tree. (3) Expand the volume ID stored in the cache to 64 bits. (4) Expand the file/vnode ID stored in the cache to 96 bits. (5) Increment the cache structure version number to 1. Signed-off-by: David Howells fs/afs/cache.c | 239 ++++++++++------------------------------------------- fs/afs/internal.h | 21 ----- fs/afs/vlocation.c | 39 ++------- fs/afs/volume.c | 2 +- 4 files changed, 50 insertions(+), 251 deletions(-) commit 91a90380efbc896eb129878553202c97213d0861 Author: David Howells Date: Thu Nov 2 15:27:46 2017 +0000 afs: Add some protocol defs Add some protocol definitions, including max field lengths, flag defs, an XDR-encoded UUID def, more VL operation IDs and more fileserver abort codes. Signed-off-by: David Howells fs/afs/afs.h | 25 ++++++++++++++++++++----- fs/afs/afs_fs.h | 4 ++++ fs/afs/afs_vl.h | 15 +++++++++++---- 3 files changed, 35 insertions(+), 9 deletions(-) commit 9ed900b1160ef306bc74ad0228d7ab199234c758 Author: David Howells Date: Thu Nov 2 15:27:46 2017 +0000 afs: Push the net ns pointer to more places Push the network namespace pointer to more places in AFS, including the afs_server structure (which doesn't hold a ref on the netns). In particular, afs_put_cell() now takes requires a net ns parameter so that it can safely alter the netns after decrementing the cell usage count - the cell will be deallocated by a background thread after being cached for a period, which means that it's not safe to access it after reducing its usage count. Signed-off-by: David Howells fs/afs/cell.c | 14 +++++++------- fs/afs/cmservice.c | 2 +- fs/afs/dir.c | 12 ++++++------ fs/afs/inode.c | 2 +- fs/afs/internal.h | 7 ++++--- fs/afs/proc.c | 2 +- fs/afs/server.c | 7 +++---- fs/afs/super.c | 12 ++++++------ fs/afs/vlocation.c | 6 +++--- fs/afs/vnode.c | 28 ++++++++++++++-------------- fs/afs/volume.c | 20 ++++++++++---------- 11 files changed, 56 insertions(+), 56 deletions(-) commit 49566f6f06b38d7c1a5c7eacc8a38c6ea2e36549 Author: David Howells Date: Thu Nov 2 15:27:46 2017 +0000 afs: Note the cell in the superblock info also Keep a reference to the cell in the superblock info structure in addition to the volume and net pointers. This will make it easier to clean up in a future patch in which afs_put_volume() will need the cell pointer. Whilst we're at it, make the cell and volume getting functions return a pointer to the object got to make the call sites look neater. Signed-off-by: David Howells fs/afs/internal.h | 15 +++++++++++++-- fs/afs/super.c | 57 ++++++++++++++++++++++++++++++++++--------------------- 2 files changed, 48 insertions(+), 24 deletions(-) commit 59fa1c4a9f528c2a1556f4b2cd4e055b560c1c0a Author: David Howells Date: Thu Nov 2 15:27:45 2017 +0000 afs: Fix server reaping Fix server reaping and make sure it's all done before we start trying to purge cells, given that servers currently pin cells. Signed-off-by: David Howells fs/afs/internal.h | 5 ++++- fs/afs/main.c | 3 ++- fs/afs/server.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 57 insertions(+), 10 deletions(-) commit e3b2ffe0f0e1471854dc53bb69ff452e65cc88f2 Author: David Howells Date: Thu Nov 2 15:27:45 2017 +0000 afs: Close the rxrpc socket only after purging the servers Close the rxrpc socket only after we've purged the server records (and also cell and volume records which might refer to servers) so that we can give up the callbacks on each server. Signed-off-by: David Howells fs/afs/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f044c8847bb61eff5e1e95b6f6bb950e7f4a73a4 Author: David Howells Date: Thu Nov 2 15:27:45 2017 +0000 afs: Lay the groundwork for supporting network namespaces Lay the groundwork for supporting network namespaces (netns) to the AFS filesystem by moving various global features to a network-namespace struct (afs_net) and providing an instance of this as a temporary global variable that everything uses via accessor functions for the moment. The following changes have been made: (1) Store the netns in the superblock info. This will be obtained from the mounter's nsproxy on a manual mount and inherited from the parent superblock on an automount. (2) The cell list is made per-netns. It can be viewed through /proc/net/afs/cells and also be modified by writing commands to that file. (3) The local workstation cell is set per-ns in /proc/net/afs/rootcell. This is unset by default. (4) The 'rootcell' module parameter, which sets a cell and VL server list modifies the init net namespace, thereby allowing an AFS root fs to be theoretically used. (5) The volume location lists and the file lock manager are made per-netns. (6) The AF_RXRPC socket and associated I/O bits are made per-ns. The various workqueues remain global for the moment. Changes still to be made: (1) /proc/fs/afs/ should be moved to /proc/net/afs/ and a symlink emplaced from the old name. (2) A per-netns subsys needs to be registered for AFS into which it can store its per-netns data. (3) Rather than the AF_RXRPC socket being opened on module init, it needs to be opened on the creation of a superblock in that netns. (4) The socket needs to be closed when the last superblock using it is destroyed and all outstanding client calls on it have been completed. This prevents a reference loop on the namespace. (5) It is possible that several namespaces will want to use AFS, in which case each one will need its own UDP port. These can either be set through /proc/net/afs/cm_port or the kernel can pick one at random. The init_ns gets 7001 by default. Other issues that need resolving: (1) The DNS keyring needs net-namespacing. (2) Where do upcalls go (eg. DNS request-key upcall)? (3) Need something like open_socket_in_file_ns() syscall so that AFS command line tools attempting to operate on an AFS file/volume have their RPC calls go to the right place. Signed-off-by: David Howells fs/afs/afs.h | 9 +++ fs/afs/callback.c | 24 +------ fs/afs/cell.c | 130 ++++++++++++++++++------------------ fs/afs/cmservice.c | 26 ++++---- fs/afs/flock.c | 39 +---------- fs/afs/fsclient.c | 56 ++++++++++------ fs/afs/internal.h | 163 +++++++++++++++++++++++++++++++++------------ fs/afs/main.c | 153 +++++++++++++++++++++++++++++------------- fs/afs/proc.c | 64 +++++++++++------- fs/afs/rxrpc.c | 132 ++++++++++++++++++------------------ fs/afs/server.c | 82 +++++++++++------------ fs/afs/super.c | 45 +++++++------ fs/afs/vlclient.c | 10 +-- fs/afs/vlocation.c | 151 +++++++++++++++++++---------------------- fs/afs/volume.c | 10 +-- include/uapi/linux/magic.h | 1 + 16 files changed, 603 insertions(+), 492 deletions(-) commit 5e4def20381678ba3ce0a4e117f97e378ecd81bc Author: David Howells Date: Thu Nov 2 15:27:44 2017 +0000 Pass mode to wait_on_atomic_t() action funcs and provide default actions Make wait_on_atomic_t() pass the TASK_* mode onto its action function as an extra argument and make it 'unsigned int throughout. Also, consolidate a bunch of identical action functions into a default function that can do the appropriate thing for the mode. Also, change the argument name in the bit_wait*() function declarations to reflect the fact that it's the mode and not the bit number. [Peter Z gives this a grudging ACK, but thinks that the whole atomic_t wait should be done differently, though he's not immediately sure as to how] Signed-off-by: David Howells Acked-by: Peter Zijlstra cc: Ingo Molnar arch/mips/kernel/traps.c | 14 +---------- drivers/gpu/drm/drm_dp_aux_dev.c | 8 +------ drivers/gpu/drm/i915/selftests/intel_breadcrumbs.c | 10 ++------ drivers/media/platform/qcom/venus/hfi.c | 8 +------ fs/afs/rxrpc.c | 8 +------ fs/btrfs/extent-tree.c | 27 +++------------------- fs/fscache/cookie.c | 2 +- fs/fscache/internal.h | 2 -- fs/fscache/main.c | 9 -------- fs/nfs/inode.c | 4 ++-- fs/nfs/internal.h | 2 +- fs/ocfs2/filecheck.c | 8 +------ include/linux/wait_bit.h | 15 +++++++----- kernel/sched/wait_bit.c | 18 +++++++++++---- 14 files changed, 37 insertions(+), 98 deletions(-) commit 81445e63e67a1e98b1c2575fa2b406d4289d2754 Merge: ede372d b24591e Author: David Howells Date: Mon Nov 13 15:36:33 2017 +0000 Merge remote-tracking branch 'tip/timers/core' into afs-next These AFS patches need the timer_reduce() patch from timers/core. Signed-off-by: David Howells commit 3cfa3b16dd2f1787f9d19d6da2fe9652d806b387 Author: Ilya Dryomov Date: Mon Nov 13 10:35:40 2017 +0100 rbd: default to single-major device number scheme It's been 3.5 years, let's turn it on by default. Support in rbd(8) utility goes back to pre-firefly, "rbd map" has been loading the module with single_major=Y ever since. However, if the module is already loaded (whether by hand or at boot time), we end up with single_major=N. Also, some people don't install rbd(8) and use the sysfs interface directly. (With single-major=N, a major number is consumed for every mapping, imposing a limit of ~240 rbd images per host. single-major=Y allows mapping thousands of rbd images on a single machine.) Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman drivers/block/rbd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 8e7df2b5b7f245c9bd11064712db5cb69044a362 Author: Ingo Molnar Date: Mon Nov 13 07:15:41 2017 +0100 timer/debug: Change /proc/timer_list from 0444 to 0400 While it uses %pK, there's still few reasons to read this file as non-root. Suggested-by: Linus Torvalds Acked-by: Thomas Gleixner Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/time/timer_list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76727c2c3bf4a5e58dff8cca23d0147ba08fb2c8 Merge: c429bda df6a3e2 Author: Takashi Iwai Date: Mon Nov 13 15:45:57 2017 +0100 Merge tag 'asoc-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v4.15 The biggest thing this release has been the conversion of the AC98 bus to the driver model, that's been a long time coming so thanks to Robert Jarzmik for his dedication there. Due to there being some AC97 MFD there's a few fairly large changes in input and the MFD layer, mainly to the wm97xx driver. There's also some drivers/drm changes to support the new AMD Stoney platform, these are shared with the DRM subsystem and should be being merged via both. Within the subsystem the overwhelming bulk of the changes is in the Intel drivers which continue to need lots of cleanups and fixes, this release they've also gained support for their open source firmware. There's also some large changs in the core as Morimoto-san continues to mirror operations into the component level in preparation for conversion of drivers to that. - The AC97 bus has finally caught up with the driver model thanks to some dedicated and persistent work from Robert Jarzmik. - Continued work from Morimoto-san on moving us towards being able to use components for everything. - Lots of cleanups for the Intel platform code, including support for their open source audio firmware. - Support for scaling MCLK with sample rate in simple-card. - Support for AMD Stoney platform. commit c429bda21ffafb28f02fb2eb4055b4ab6879ed58 Merge: 75ee94b 9718a29 Author: Takashi Iwai Date: Mon Nov 13 15:43:04 2017 +0100 Merge branch 'for-next' into for-linus Pull 4.15 updates to take over the previous urgent fixes. Signed-off-by: Takashi Iwai commit 71192a688714079f75ba6631155581f028b0351f Author: Arvind Yadav Date: Mon Nov 13 19:23:49 2017 +0530 irqchip/gic-v3: pr_err() strings should end with newlines pr_err() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b15e0853a0641f6d641b35ad8668c839e95093c Author: Arvind Yadav Date: Mon Nov 13 19:23:48 2017 +0530 irqchip/s3c24xx: pr_err() strings should end with newlines pr_err() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav Signed-off-by: Marc Zyngier drivers/irqchip/irq-s3c24xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 859fd5860cd1bbbd0370ba4f20725999681b66c8 Author: Masahiro Yamada Date: Fri Nov 3 02:40:32 2017 +0900 sh: select KBUILD_DEFCONFIG depending on ARCH You can not select KBUILD_DEFCONFIG depending on any CONFIG option because include/config/auto.conf is not included when building config targets. So, CONFIG_SUPERH32 is never set during the configuration, then cayman_defconfig is always chosen. This commit provides a sensible way to choose shx3/cayman_defconfig. arch/sh/Kconfig sets either SUPERH32 or SUPERH64 depending on ARCH environment, like follows: config SUPERH32 def_bool ARCH = "sh" ... config SUPERH64 def_bool ARCH = "sh64" It should make sense to choose the default defconfig by ARCH, like arch/sparc/Makefile. Signed-off-by: Masahiro Yamada arch/sh/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 86a9df597cdd564d2d29c65897bcad42519e3678 Author: Nick Desaulniers Date: Mon Nov 6 10:47:54 2017 -0800 kbuild: fix linker feature test macros when cross compiling with Clang I was not seeing my linker flags getting added when using ld-option when cross compiling with Clang. Upon investigation, this seems to be due to a difference in how GCC vs Clang handle cross compilation. GCC is configured at build time to support one backend, that is implicit when compiling. Clang is explicit via the use of `-target ` and ships with all supported backends by default. GNU Make feature test macros that compile then link will always fail when cross compiling with Clang unless Clang's triple is passed along to the compiler. For example: $ clang -x c /dev/null -c -o temp.o $ aarch64-linux-android/bin/ld -E temp.o aarch64-linux-android/bin/ld: unknown architecture of input file `temp.o' is incompatible with aarch64 output aarch64-linux-android/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000400078 $ echo $? 1 $ clang -target aarch64-linux-android- -x c /dev/null -c -o temp.o $ aarch64-linux-android/bin/ld -E temp.o aarch64-linux-android/bin/ld: warning: cannot find entry symbol _start; defaulting to 00000000004002e4 $ echo $? 0 This causes conditional checks that invoke $(CC) without the target triple, then $(LD) on the result, to always fail. Suggested-by: Masahiro Yamada Signed-off-by: Nick Desaulniers Reviewed-by: Matthias Kaehlcke Signed-off-by: Masahiro Yamada scripts/Kbuild.include | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e17c400ae194945eef9d9cae38a321c92c1986fb Author: Masahiro Yamada Date: Fri Oct 13 20:25:29 2017 +0900 kbuild: shrink .cache.mk when it exceeds 1000 lines The cache files are only cleaned away by "make clean". If you continue incremental builds, the cache files will grow up little by little. It is not a big deal in general use cases because compiler flags do not change quite often. However, if you do build-test for various architectures, compilers, and kernel configurations, you will end up with huge cache files soon. When the cache file exceeds 1000 lines, shrink it down to 500 by "tail". The Least Recently Added lines are cut. (not Least Recently Used) I hope it will work well enough. Signed-off-by: Masahiro Yamada Reviewed-by: Douglas Anderson scripts/Kbuild.include | 6 ++++++ 1 file changed, 6 insertions(+) commit 433dc2ebe7d17dd21cba7ad5c362d37323592236 Author: Masahiro Yamada Date: Thu Oct 12 18:22:25 2017 +0900 kbuild: do not call cc-option before KBUILD_CFLAGS initialization Some $(call cc-option,...) are invoked very early, even before KBUILD_CFLAGS, etc. are initialized. The returned string from $(call cc-option,...) depends on KBUILD_CPPFLAGS, KBUILD_CFLAGS, and GCC_PLUGINS_CFLAGS. Since they are exported, they are not empty when the top Makefile is recursively invoked. The recursion occurs in several places. For example, the top Makefile invokes itself for silentoldconfig. "make tinyconfig", "make rpm-pkg" are the cases, too. In those cases, the second call of cc-option from the same line runs a different shell command due to non-pristine KBUILD_CFLAGS. To get the same result all the time, KBUILD_* and GCC_PLUGINS_CFLAGS must be initialized before any call of cc-option. This avoids garbage data in the .cache.mk file. Move all calls of cc-option below the config targets because target compiler flags are unnecessary for Kconfig. Signed-off-by: Masahiro Yamada Reviewed-by: Douglas Anderson Makefile | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 4e56207130eda9a27df116623e2fce7cca2c6764 Author: Douglas Anderson Date: Mon Oct 16 10:12:46 2017 -0700 kbuild: Cache a few more calls to the compiler These are a few stragglers that I left out of the original patch to cache calls to the C compiler ("kbuild: Add a cache for generated variables") because they bleed out into the main Makefile and thus uglify things a little bit. The idea is the same here, though. Signed-off-by: Douglas Anderson Tested-by: Ingo Molnar Tested-by: Guenter Roeck Signed-off-by: Masahiro Yamada Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3298b690b21cdbe6b2ae8076d9147027f396f2b1 Author: Douglas Anderson Date: Mon Oct 16 10:12:45 2017 -0700 kbuild: Add a cache for generated variables While timing a "no-op" build of the kernel (incrementally building the kernel even though nothing changed) in the Chrome OS build system I found that it was much slower than I expected. Digging into things a bit, I found that quite a bit of the time was spent invoking the C compiler even though we weren't actually building anything. Currently in the Chrome OS build system the C compiler is called through a number of wrappers (one of which is written in python!) and can take upwards of 100 ms to invoke even if we're not doing anything difficult, so these invocations of the compiler were taking a lot of time. Worse the invocations couldn't seem to take advantage of the multiple cores on my system. Certainly it seems like we could make the compiler invocations in the Chrome OS build system faster, but only to a point. Inherently invoking a program as big as a C compiler is a fairly heavy operation. Thus even if we can speed the compiler calls it made sense to track down what was happening. It turned out that all the compiler invocations were coming from usages like this in the kernel's Makefile: KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) Due to the way cc-option and similar statements work the above contains an implicit call to the C compiler. ...and due to the fact that we're storing the result in KBUILD_CFLAGS, a simply expanded variable, the call will happen every time the Makefile is parsed, even if there are no users of KBUILD_CFLAGS. Rather than redoing this computation every time, it makes a lot of sense to cache the result of all of the Makefile's compiler calls just like we do when we compile a ".c" file to a ".o" file. Conceptually this is quite a simple idea. ...and since the calls to invoke the compiler and similar tools are centrally located in the Kbuild.include file this doesn't even need to be super invasive. Implementing the cache in a simple-to-use and efficient way is not quite as simple as it first sounds, though. To get maximum speed we really want the cache in a format that make can natively understand and make doesn't really have an ability to load/parse files. ...but make _can_ import other Makefiles, so the solution is to store the cache in Makefile format. This requires coming up with a valid/unique Makefile variable name for each value to be cached, but that's solvable with some cleverness. After this change, we'll automatically create a ".cache.mk" file that will contain our cached variables. We'll load this on each invocation of make and will avoid recomputing anything that's already in our cache. The cache is stored in a format that it shouldn't need any invalidation since anything that might change should affect the "key" and any old cached value won't be used. Signed-off-by: Douglas Anderson Tested-by: Ingo Molnar Tested-by: Guenter Roeck Signed-off-by: Masahiro Yamada Makefile | 1 + scripts/Kbuild.include | 90 ++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 77 insertions(+), 14 deletions(-) commit a7d34df3d12c34304638bbe7375d91c63717c453 Author: Masahiro Yamada Date: Wed Oct 11 12:52:29 2017 +0900 kbuild: add forward declaration of default target to Makefile.asm-generic $(kbuild-file) and Kbuild.include are included before the default target "all". We will add a target into Kbuild.include. In advance, add a forward declaration of the default target. Signed-off-by: Masahiro Yamada Reviewed-by: Douglas Anderson scripts/Makefile.asm-generic | 3 +++ 1 file changed, 3 insertions(+) commit b54fcf6ae1157b35504dde93581db0810c03b4b7 Author: John Crispin Date: Mon Feb 20 10:29:44 2017 +0100 MIPS: pci: Make use of the BIT() macro inside the mt7620 driver There are a few defines that manully shift a bit. Change these to using the BIT() macro. Signed-off-by: John Crispin Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15322/ Signed-off-by: James Hogan arch/mips/pci/pci-mt7620.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8593b18ad348733b5d5ddfa0c79dcabf51dff308 Author: John Crispin Date: Mon Feb 20 10:29:43 2017 +0100 MIPS: pci: Remove KERN_WARN instance inside the mt7620 driver Switch the printk() call to the prefered pr_warn() api. Fixes: 7e5873d3755c ("MIPS: pci: Add MT7620a PCIE driver") Signed-off-by: John Crispin Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: # 4.5+ Patchwork: https://patchwork.linux-mips.org/patch/15321/ Signed-off-by: James Hogan arch/mips/pci/pci-mt7620.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab74abcee583eace43f184a29f6d10a4f93b5648 Author: John Crispin Date: Mon Feb 20 10:29:42 2017 +0100 MIPS: pci: Remove duplicate define in mt7620 driver An invalid and duplicate define has gone unnoticed for some time. lets remove it. The correct define is 3 lines below. Fixes: 7e5873d3755c ("MIPS: pci: Add MT7620a PCIE driver") Signed-off-by: John Crispin Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15320/ Signed-off-by: James Hogan arch/mips/pci/pci-mt7620.c | 1 - 1 file changed, 1 deletion(-) commit 73ed298b0605a81d8cbf212df887f7b2fe65a61b Author: Andy Shevchenko Date: Mon Nov 13 14:50:06 2017 +0200 platform/x86: Revert intel_pmc_ipc: Use MFD framework to create dependent devices Heikki discovered a runtime issue with this patch. Taking into consideration we have no time to test any fix right now, revert the commit 43aaf4f03f063b12bcba2f8b800fdec85e2acc75. Reported-by: Heikki Krogerus Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_pmc_ipc.c | 398 +++++++++++++++++++++++------------ 1 file changed, 259 insertions(+), 139 deletions(-) commit 4722476bce283149986a3463f61009dec0e7f6a1 Author: Nicholas Piggin Date: Fri Nov 10 04:27:40 2017 +1100 powerpc/64s: mm_context.addr_limit is only used on hash Radix keeps no meaningful state in addr_limit, so remove it from radix code and rename to slb_addr_limit to make it clear it applies to hash only. Signed-off-by: Nicholas Piggin Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu-hash.h | 2 +- arch/powerpc/include/asm/book3s/64/mmu.h | 2 +- arch/powerpc/include/asm/paca.h | 2 +- arch/powerpc/kernel/asm-offsets.c | 2 +- arch/powerpc/kernel/paca.c | 4 ++-- arch/powerpc/kernel/setup-common.c | 3 ++- arch/powerpc/mm/hugetlbpage-radix.c | 8 +------- arch/powerpc/mm/mmap.c | 18 ++++-------------- arch/powerpc/mm/mmu_context_book3s64.c | 4 ++-- arch/powerpc/mm/slb_low.S | 2 +- arch/powerpc/mm/slice.c | 22 +++++++++++----------- 11 files changed, 27 insertions(+), 42 deletions(-) commit 85e3f1adcb9d49300b0a943bb93f9604be375bfb Author: Nicholas Piggin Date: Fri Nov 10 04:27:39 2017 +1100 powerpc/64s/radix: Fix 128TB-512TB virtual address boundary case allocation Radix VA space allocations test addresses against mm->task_size which is 512TB, even in cases where the intention is to limit allocation to below 128TB. This results in mmap with a hint address below 128TB but address + length above 128TB succeeding when it should fail (as hash does after the previous patch). Set the high address limit to be considered up front, and base subsequent allocation checks on that consistently. Fixes: f4ea6dcb08ea ("powerpc/mm: Enable mappings above 128TB") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Nicholas Piggin Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/hugetlbpage-radix.c | 26 ++++++++++++------ arch/powerpc/mm/mmap.c | 55 ++++++++++++++++++++++--------------- 2 files changed, 50 insertions(+), 31 deletions(-) commit 35602f82d0c765f991420e319c8d3a596c921eb8 Author: Nicholas Piggin Date: Fri Nov 10 04:27:38 2017 +1100 powerpc/64s/hash: Allow MAP_FIXED allocations to cross 128TB boundary While mapping hints with a length that cross 128TB are disallowed, MAP_FIXED allocations that cross 128TB are allowed. These are failing on hash (on radix they succeed). Add an additional case for fixed mappings to expand the addr_limit when crossing 128TB. Fixes: f4ea6dcb08ea ("powerpc/mm: Enable mappings above 128TB") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Nicholas Piggin Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/slice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit effc1b25088502fbd30305c79773de2d1f7470a6 Author: Nicholas Piggin Date: Fri Nov 10 04:27:37 2017 +1100 powerpc/64s/hash: Fix fork() with 512TB process address space Hash unconditionally resets the addr_limit to default (128TB) when the mm context is initialised. If a process has > 128TB mappings when it forks, the child will not get the 512TB addr_limit, so accesses to valid > 128TB mappings will fail in the child. Fix this by only resetting the addr_limit to default if it was 0. Non zero indicates it was duplicated from the parent (0 means exec()). Fixes: f4ea6dcb08ea ("powerpc/mm: Enable mappings above 128TB") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Nicholas Piggin Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/mmu_context_book3s64.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6a72dc038b615229a1b285829d6c8378d15c2347 Author: Nicholas Piggin Date: Fri Nov 10 04:27:36 2017 +1100 powerpc/64s/hash: Fix 128TB-512TB virtual address boundary case allocation When allocating VA space with a hint that crosses 128TB, the SLB addr_limit variable is not expanded if addr is not > 128TB, but the slice allocation looks at task_size, which is 512TB. This results in slice_check_fit() incorrectly succeeding because the slice_count truncates off bit 128 of the requested mask, so the comparison to the available mask succeeds. Fix this by using mm->context.addr_limit instead of mm->task_size for testing allocation limits. This causes such allocations to fail. Fixes: f4ea6dcb08ea ("powerpc/mm: Enable mappings above 128TB") Cc: stable@vger.kernel.org # v4.12+ Reported-by: Florian Weimer Signed-off-by: Nicholas Piggin Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/slice.c | 50 ++++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) commit 7ece370996b694ae263025e056ad785afc1be5ab Author: Michael Ellerman Date: Mon Nov 13 23:17:28 2017 +1100 powerpc/64s/hash: Fix 512T hint detection to use >= 128T Currently userspace is able to request mmap() search between 128T-512T by specifying a hint address that is greater than 128T. But that means a hint of 128T exactly will return an address below 128T, which is confusing and wrong. So fix the logic to check the hint is greater than *or equal* to 128T. Fixes: f4ea6dcb08ea ("powerpc/mm: Enable mappings above 128TB") Cc: stable@vger.kernel.org # v4.12+ Suggested-by: Aneesh Kumar K.V Suggested-by: Nicholas Piggin [mpe: Split out of Nick's bigger patch] Signed-off-by: Michael Ellerman arch/powerpc/mm/slice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 05a67cc258e75ac9758e6f13d26337b8be51162a Author: Mathias Kresin Date: Thu May 11 08:11:15 2017 +0200 MIPS: ralink: Fix typo in mt7628 pinmux function There is a typo inside the pinmux setup code. The function is called refclk and not reclk. Fixes: 53263a1c6852 ("MIPS: ralink: add mt7628an support") Signed-off-by: Mathias Kresin Acked-by: John Crispin Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: # 3.19+ Patchwork: https://patchwork.linux-mips.org/patch/16047/ Signed-off-by: James Hogan arch/mips/ralink/mt7620.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ef4b43cd3794d63052d85898e42424fd3b14d24 Author: Mathias Kresin Date: Thu May 11 08:11:14 2017 +0200 MIPS: ralink: Fix MT7628 pinmux According to the datasheet the REFCLK pin is shared with GPIO#37 and the PERST pin is shared with GPIO#36. Fixes: 53263a1c6852 ("MIPS: ralink: add mt7628an support") Signed-off-by: Mathias Kresin Acked-by: John Crispin Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: # 3.19+ Patchwork: https://patchwork.linux-mips.org/patch/16046/ Signed-off-by: James Hogan arch/mips/ralink/mt7620.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f23ab3efb1b30cc5c5ef5ae4ef294ed467f30675 Author: Benjamin Herrenschmidt Date: Fri Nov 10 12:15:00 2017 +1100 powerpc: Fix DABR match on hash based systems Commit 398a719d34a1 ("powerpc/mm: Update bits used to skip hash_page") mistakenly dropped the DSISR_DABRMATCH bit from the mask of bit tested to skip trying to hash a page. As a result, the DABR matches would no longer be detected. This adds it back. We open code it in the 2 places where it matters rather than fold it into DSISR_BAD_FAULT_32S/64S because this isn't technically a bad fault and while we would never hit it with the current code, I prefer if page_fault_is_bad() didn't trigger on these. Fixes: 398a719d34a1 ("powerpc/mm: Update bits used to skip hash_page") Cc: stable@vger.kernel.org # v4.14 Tested-by: Pedro Miraglia Franco de Carvalho Signed-off-by: Benjamin Herrenschmidt arch/powerpc/kernel/exceptions-64s.S | 2 +- arch/powerpc/kernel/head_32.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b11270853fa3654f08d4a6a03b23ddb220512d8d Author: Eric Biggers Date: Mon Nov 6 21:57:26 2017 -0800 libceph: don't WARN() if user tries to add invalid key The WARN_ON(!key->len) in set_secret() in net/ceph/crypto.c is hit if a user tries to add a key of type "ceph" with an invalid payload as follows (assuming CONFIG_CEPH_LIB=y): echo -e -n '\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' \ | keyctl padd ceph desc @s This can be hit by fuzzers. As this is merely bad input and not a kernel bug, replace the WARN_ON() with return -EINVAL. Fixes: 7af3ea189a9a ("libceph: stop allocating a new cipher on every crypto request") Cc: # v4.10+ Signed-off-by: Eric Biggers Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov net/ceph/crypto.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7c084289795bc0f3b9ab315ac3c8d269dd4d0215 Author: David Disseldorp Date: Thu Nov 2 01:05:11 2017 +0100 rbd: set discard_alignment to zero RBD devices are currently incorrectly initialised with the block queue discard_alignment set to the underlying RADOS object size. As per Documentation/ABI/testing/sysfs-block: The discard_alignment parameter indicates how many bytes the beginning of the device is offset from the internal allocation unit's natural alignment. Correcting the discard_alignment parameter from the RADOS object size to zero (the blk_set_default_limits() default) has no effect on how discard requests are propagated through the block layer - @alignment in __blkdev_issue_discard() remains zero. However, it does fix the UNMAP granularity alignment value advertised to SCSI initiators via the Block Limits VPD. Signed-off-by: David Disseldorp Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 1 - 1 file changed, 1 deletion(-) commit ec1dff25b0a012711e10290039fbc8e1c5dd69fb Author: Jeff Layton Date: Tue Oct 31 15:51:14 2017 -0400 ceph: silence sparse endianness warning in encode_caps_cb sparse warns: fs/ceph/mds_client.c:2887:34: warning: incorrect type in assignment (different base types) fs/ceph/mds_client.c:2887:34: expected restricted __le32 [assigned] [usertype] flock_len fs/ceph/mds_client.c:2887:34: got int At this point, it's just being used as a flag. It gets overwritten later if the rest of the encoding succeeds. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 81302565178cfa2d419f5e9743add02997c6b2dc Author: Jeff Layton Date: Mon Oct 30 10:58:30 2017 -0400 ceph: remove the bump of i_version Eventually, we'll want to wire cephfs up to use the change attribute that the cluster tracks instead, but for now this is unneeded. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 1 - 1 file changed, 1 deletion(-) commit 080a330e1d9142b9d958a40dcef3ae5ae5d8820a Author: Jeff Layton Date: Mon Oct 23 10:58:40 2017 -0400 ceph: present consistent fsid, regardless of arch endianness Since its inception, ceph has presented the fsid as an opaque value without any sort of endianness conversion. This means that the value presented is different on architectures of different endianness. While the value that should be stuffed into f_fsid is poorly-defined, I think it would be best to strive for consistency here between architectures, and clients (we need to present this properly to the userland client as well). Change ceph_statfs to convert the opaque words to host-endian before doing the xor. On an upgrade, a big-endian box may see a different fsid than it did before, but little-endian arches should see no change with this patch. Signed-off-by: Jeff Layton Reviewed-by: Sage Weil Signed-off-by: Ilya Dryomov fs/ceph/super.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c8a96a31cb04c7664626ab6ada7f66c98c09efbd Author: Jeff Layton Date: Thu Oct 19 08:53:58 2017 -0400 ceph: clean up spinlocking and list handling around cleanup_cap_releases() Functions that release a lock taken in a parent frame are notoriously hard to follow. Split cleanup_cap_releases into two functions, one to detach the cap releases from the session (which should be called with the spinlock held), and another to dispose of those caps. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) commit 9568c93ecab92d3ee60f2f6bec4e4d91641c61a6 Author: Ilya Dryomov Date: Thu Oct 12 12:35:19 2017 +0200 rbd: get rid of rbd_mapping::read_only It is redundant -- rw/ro state is stored in hd_struct and managed by the block layer. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) commit 1de797bb248d2276337139fecaffbd3bbc0f736d Author: Ilya Dryomov Date: Thu Oct 12 12:35:19 2017 +0200 rbd: fix and simplify rbd_ioctl_set_ro() ->open_count/-EBUSY check is bogus and wrong: when an open device is set read-only, blkdev_write_iter() refuses further writes with -EPERM. This is standard behaviour and all other block devices allow this. set_disk_ro() call is also problematic: we affect the entire device when called on a single partition. All rbd_ioctl_set_ro() needs to do is refuse ro -> rw transition for mapped snapshots. Everything else can be handled by generic code. Signed-off-by: Ilya Dryomov drivers/block/rbd.c | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) commit bb0581f01c38ff525295fc6128bc3a49202dabae Author: Colin Ian King Date: Wed Oct 18 12:34:25 2017 +0100 ceph: remove unused and redundant variable dropping Variable dropping is set but never read and hence is redundant and can be removed. Cleans up clang warning: fs/ceph/caps.c:1170:2: warning: Value stored to 'dropping' is never read Signed-off-by: Colin Ian King Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 18370b36b28a6c1b059392e9b8f9a80332e51e7c Author: Gustavo A. R. Silva Date: Sun Oct 15 12:55:23 2017 -0500 ceph: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva [idryomov@gmail.com: amended "Older OSDs" comment] Signed-off-by: Ilya Dryomov net/ceph/ceph_hash.c | 12 +++++++++++- net/ceph/messenger.c | 1 + net/ceph/mon_client.c | 5 +++-- 3 files changed, 15 insertions(+), 3 deletions(-) commit 76bd6ec4988065d39983ba8e93bb738313f68050 Author: Ilya Dryomov Date: Mon Oct 16 10:32:50 2017 +0200 ceph: -EINVAL on decoding failure in ceph_mdsc_handle_fsmap() Don't set ->mdsmap_err to -ENOENT unconditionally, and drop unneeded return statement while at it. Signed-off-by: Ilya Dryomov fs/ceph/mds_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 933ad2c9c8bbb1623c2d3c5753ad340152e15d9d Author: Yan, Zheng Date: Tue Oct 10 17:06:25 2017 +0800 ceph: disable cached readdir after dropping positive dentry Ideally CEPH_CAP_FILE_SHARED should have been revoked before postive dentry get dropped. But if something goes wrong, later cached readdir may dereference the dropped dentry. Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 7271efa79f8bc01694d1a9fce597088a97b3b160 Author: Thomas Meyer Date: Sat Oct 7 16:02:21 2017 +0200 ceph: fix bool initialization/comparison Bool initializations should use true and false. Bool tests don't need comparisons. Signed-off-by: Thomas Meyer Signed-off-by: Ilya Dryomov fs/ceph/caps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b3f8d68f38a879daed1eab66c0e19bc293096d34 Author: Yan, Zheng Date: Mon Sep 11 10:58:55 2017 +0800 ceph: handle 'session get evicted while there are file locks' When session get evicted, all file locks associated with the session get released remotely by mds. File locks tracked by kernel become stale. In this situation, set an error flag on inode. The flag makes further file locks return -EIO. Another option to handle this situation is cleanup file locks tracked kernel. I do not choose it because it is inconvenient to notify user program about the error. Signed-off-by: "Yan, Zheng" Acked-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/locks.c | 52 ++++++++++++++++++++++++++++++++++++++++------------ fs/ceph/mds_client.c | 21 ++++++++++++++++----- fs/ceph/super.h | 2 ++ 3 files changed, 58 insertions(+), 17 deletions(-) commit 4deb14a2593dfade102dd94a803a63cf620cfd56 Author: Yan, Zheng Date: Mon Sep 11 10:36:28 2017 +0800 ceph: optimize flock encoding during reconnect Don't malloc if there is no flock. Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/locks.c | 17 ++++++++++------- fs/ceph/mds_client.c | 34 ++++++++++++++++++++-------------- 2 files changed, 30 insertions(+), 21 deletions(-) commit c6db84723363790160a89dee4554ad2f0687a0c5 Author: Yan, Zheng Date: Mon Sep 11 09:58:56 2017 +0800 ceph: make lock_to_ceph_filelock() static Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/locks.c | 62 ++++++++++++++++++++++++++++----------------------------- fs/ceph/super.h | 1 - 2 files changed, 31 insertions(+), 32 deletions(-) commit 89aa593010135660991d05c92528c2c9163d5900 Author: Yan, Zheng Date: Fri Sep 8 15:23:18 2017 +0800 ceph: keep auth cap when inode has flocks or posix locks file locks are tracked by inode's auth mds. dropping auth caps is equivalent to releasing all file locks. Signed-off-by: "Yan, Zheng" Acked-by: Jeff Layton Signed-off-by: Ilya Dryomov fs/ceph/inode.c | 1 + fs/ceph/locks.c | 62 ++++++++++++++++++++++++++++++++++++++++++++-------- fs/ceph/mds_client.c | 5 +++++ fs/ceph/super.h | 1 + 4 files changed, 60 insertions(+), 9 deletions(-) commit 838c8afa67f98014970c9f56107805e767ed87ad Author: Pan Bian Date: Sun Nov 12 23:52:02 2017 +0800 power: supply: cpcap-charger: fix incorrect return value check Function platform_get_irq_byname() returns a negative error code on failure, and a zero or positive number on success. However, in function cpcap_usb_init_irq(), positive IRQ numbers are also taken as error cases. Use "if (irq < 0)" instead of "if (!irq)" to validate the return value of platform_get_irq_byname(). Signed-off-by: Pan Bian Signed-off-by: Sebastian Reichel drivers/power/supply/cpcap-charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24f0966c3e3f52a96e888504d60810d9df5b2d42 Author: Axel Lin Date: Fri Nov 10 14:10:55 2017 +0800 gpio: tegra186: Remove tegra186_gpio_lock_class This is no longer required after commit 959bc7b22bd2 ("gpio: Automatically add lockdep keys") Signed-off-by: Axel Lin Acked-by: Thierry Reding Signed-off-by: Linus Walleij drivers/gpio/gpio-tegra186.c | 3 --- 1 file changed, 3 deletions(-) commit 88d8ff976abdad043cc37dc1b4f01d93603842d7 Author: Chao Yu Date: Mon Nov 13 11:31:48 2017 +0800 quota: be aware of error from dquot_initialize Commit 6184fc0b8dd7 ("quota: Propagate error from ->acquire_dquot()") missed to handle error from dquot_initialize in dquot_file_open, fix it. Signed-off-by: Chao Yu Signed-off-by: Jan Kara fs/quota/dquot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4c09f87adfe31587aa4b2aea2cb2dbde2150f54 Author: Thomas Gleixner Date: Mon Nov 13 09:39:01 2017 +0100 cpu/hotplug: Get rid of CPU hotplug notifier leftovers The CPU hotplug notifiers are history. Remove the last reminders. Reported-by: Ingo Molnar Signed-off-by: Thomas Gleixner .../fault-injection/notifier-error-inject.txt | 30 ---------------------- Documentation/power/suspend-and-cpuhotplug.txt | 9 +++---- include/linux/cpu.h | 27 ++++++++----------- 3 files changed, 14 insertions(+), 52 deletions(-) commit fcdfafcb73be8fa45909327bbddca46fb362a675 Author: Ingo Molnar Date: Mon Nov 13 07:59:10 2017 +0100 kprobes: Don't spam the build log with deprecation warnings The jprobes APIs are deprecated - but are still in occasional use for code that few people seem to care about, so stop generating deprecation warnings. Cc: Masami Hiramatsu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar include/linux/kprobes.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 516fb7f2e73dcc303fb97fc3593209fcacf2d982 Author: Linus Torvalds Date: Sun Nov 12 18:44:23 2017 -0800 /proc/module: use the same logic as /proc/kallsyms for address exposure The (alleged) users of the module addresses are the same: kernel profiling. So just expose the same helper and format macros, and unify the logic. Signed-off-by: Linus Torvalds include/linux/kallsyms.h | 8 ++++++++ kernel/kallsyms.c | 8 +------- kernel/module.c | 20 ++++++++++++++++++-- 3 files changed, 27 insertions(+), 9 deletions(-) commit 44419ce7d77e03692ed8fe799688d8dc43f9266e Author: Emil Renner Berthing Date: Wed Oct 4 19:53:46 2017 +0200 drm/rockchip: analogix_dp: Use mutex rather than spinlock On the Samsung Chromebook Plus I get this error with 4.14-rc3: BUG: scheduling while atomic: kworker/3:1/50/0x00000002 Modules linked in: CPU: 3 PID: 50 Comm: kworker/3:1 Not tainted 4.14.0-0.rc3-kevin #2 Hardware name: Google Kevin (DT) Workqueue: events analogix_dp_psr_work Call trace: [] dump_backtrace+0x0/0x320 [] show_stack+0x14/0x20 [] dump_stack+0x9c/0xbc [] __schedule_bug+0x4c/0x70 [] __schedule+0x3f0/0x458 [] schedule+0x38/0xa0 [] schedule_hrtimeout_range_clock+0x84/0xe8 [] schedule_hrtimeout_range+0x10/0x18 [] usleep_range+0x64/0x78 [] analogix_dp_transfer+0x16c/0x340 [] analogix_dpaux_transfer+0x10/0x18 [] drm_dp_dpcd_access+0x4c/0xf0 [] drm_dp_dpcd_write+0x1c/0x28 [] analogix_dp_disable_psr+0x60/0xa8 [] analogix_dp_psr_work+0x4c/0x90 [] process_one_work+0x1d4/0x348 [] worker_thread+0x48/0x478 [] kthread+0x12c/0x130 [] ret_from_fork+0x10/0x18 Changing rockchip_dp_device::psr_lock to a mutex rather than spinlock seems to fix the issue. Signed-off-by: Emil Renner Berthing Tested-by: Enric Balletbo i Serra Signed-off-by: Mark Yao Link: https://patchwork.freedesktop.org/patch/msgid/20171004175346.11956-1-kernel@esmil.dk drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit ede372dcae15d3ba1d3d52ac45be7a27ce31be28 Merge: 0d728b8 77552cf Author: David S. Miller Date: Mon Nov 13 10:44:06 2017 +0900 Merge branch 'net-improve-the-process-of-redirect-and-toobig-for-ipv6-tunnels' Xin Long says: ==================== net: improve the process of redirect and toobig for ipv6 tunnels Now let's say there are 3 kinds of icmp packets to process for tunnels, toobig(needfrag), redirect, others, their process should be: - toobig(needfrag) update the lower dst's pmtu by route cache, also update sk dst's pmtu if possible, or it will be fine if sk dst pmtu will get updated on tx path. - redirect update the lower dst's gw by route cache and return, no need to send this redirect packet to user sk. - others send the packet to user's sk, or it will also be fine to use err_count to count it and report fail link on tx path. All ipv4 tunnels basically follow this while some of ipv6 tunnels are doing in different ways, like ip6gre and ip6_tunnels update tnl dev's mtu instead of updating lower dst pmtu, no redirect process on their err_handlers, which doesn't make any sense and even causes performance problems. This patchset is to improve the process of redirect and toobig for ip6gre ip4ip6, ip6ip6 tunnels, as in ipv4 tunnels. ==================== Signed-off-by: David S. Miller commit 77552cfa39c48e695c39d0553afc8c6018e411ce Author: Xin Long Date: Sat Nov 11 19:06:53 2017 +0800 ip6_tunnel: clean up ip4ip6 and ip6ip6's err_handlers This patch is to remove some useless codes of redirect and fix some indents on ip4ip6 and ip6ip6's err_handlers. Note that redirect icmp packet is already processed in ip6_tnl_err, the old redirect codes in ip4ip6_err actually never worked even before this patch. Besides, there's no need to send redirect to user's sk, it's for lower dst, so just remove it in this patch. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) commit b00f543240b9423eda73ad06c57becdd5478bc26 Author: Xin Long Date: Sat Nov 11 19:06:52 2017 +0800 ip6_tunnel: process toobig in a better way The same improvement in "ip6_gre: process toobig in a better way" is needed by ip4ip6 and ip6ip6 as well. Note that ip4ip6 and ip6ip6 will also update sk dst pmtu in their err_handlers. Like I said before, gre6 could not do this as it's inner proto is not certain. But for all of them, sk dst pmtu will be updated in tx path if in need. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 383c1f88759bba7f387b7b705c31081e5df40b38 Author: Xin Long Date: Sat Nov 11 19:06:51 2017 +0800 ip6_tunnel: add the process for redirect in ip6_tnl_err The same process for redirect in "ip6_gre: add the process for redirect in ip6gre_err" is needed by ip4ip6 and ip6ip6 as well. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/ip6_tunnel.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit fe1a4ca0a2b7884672661284666a0b8c183b0b1e Author: Xin Long Date: Sat Nov 11 19:06:50 2017 +0800 ip6_gre: process toobig in a better way Now ip6gre processes toobig icmp packet by setting gre dev's mtu in ip6gre_err, which would cause few things not good: - It couldn't set mtu with dev_set_mtu due to it's not in user context, which causes route cache and idev->cnf.mtu6 not to be updated. - It has to update sk dst pmtu in tx path according to gredev->mtu for ip6gre, while it updates pmtu again according to lower dst pmtu in ip6_tnl_xmit. - To change dev->mtu by toobig icmp packet is not a good idea, it should only work on pmtu. This patch is to process toobig by updating the lower dst's pmtu, as later sk dst pmtu will be updated in ip6_tnl_xmit, the same way as in ip4gre. Note that gre dev's mtu will not be updated any more, it doesn't make any sense to change dev's mtu after receiving a toobig packet. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 929fc0327569aa745c9c3cb68a213c22fad3f3f9 Author: Xin Long Date: Sat Nov 11 19:06:49 2017 +0800 ip6_gre: add the process for redirect in ip6gre_err This patch is to add redirect icmp packet process for ip6gre by calling ip6_redirect() in ip6gre_err(), as in vti6_err. Prior to this patch, there's even no route cache generated after receiving redirect. Reported-by: Jianlin Shi Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0d728b844c2dd8dd3875ed304eee43967c5d14f6 Author: Zhu Yanjun Date: Fri Nov 10 21:10:00 2017 -0500 forcedeth: remove redudant assignments in xmit In xmit process, the variables are set many times. In fact, it is enough for these variables to be set once. After a long time test, the throughput performance is better than before. CC: Srinivas Eeda CC: Joe Jin CC: Junxiao Bi Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller drivers/net/ethernet/nvidia/forcedeth.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit 6afce196236c353819526a1c41fffb6d660eb2ef Merge: fd9080a 4d63adf Author: David S. Miller Date: Mon Nov 13 10:39:12 2017 +0900 Merge tag 'nfc-next-4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next Samuel Ortiz says: ==================== NFC 4.15 pull request This is the NFC pull request for 4.15. We have: - A new netlink command for explicitly deactivating NFC targets - i2c constification for all NFC drivers - One NFC device allocation error path fix ==================== Signed-off-by: David S. Miller commit fd9080a39bede82a5123fa322ae9e3d7f0a93e72 Merge: aef1e0d cd8a6c3 Author: David S. Miller Date: Mon Nov 13 10:37:08 2017 +0900 Merge branch 'Openvswitch-meter-action' Andy Zhou says: ==================== Openvswitch meter action This patch series is the first attempt to add openvswitch meter support. We have previously experimented with adding metering support in nftables. However 1) It was not clear how to expose a named nftables object cleanly, and 2) the logic that implements metering is quite small, < 100 lines of code. With those two observations, it seems cleaner to add meter support in the openvswitch module directly. --- v1(RFC)->v2: remove unused code improve locking and other review comments v2 -> v3: rebase v3 -> v4: fix undefined "__udivdi3" references on 32 bit builds. use div_u64() instead. v4 -> v5: rebase ==================== Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit cd8a6c33693c1b89d2737ffdbf9611564e9ac907 Author: Andy Zhou Date: Fri Nov 10 12:09:43 2017 -0800 openvswitch: Add meter action support Implements OVS kernel meter action support. Signed-off-by: Andy Zhou Signed-off-by: David S. Miller include/uapi/linux/openvswitch.h | 3 +++ net/openvswitch/actions.c | 6 ++++++ net/openvswitch/datapath.h | 1 + net/openvswitch/flow_netlink.c | 6 ++++++ 4 files changed, 16 insertions(+) commit 96fbc13d7e770b542d2d1fcf700d0baadc6e8063 Author: Andy Zhou Date: Fri Nov 10 12:09:42 2017 -0800 openvswitch: Add meter infrastructure OVS kernel datapath so far does not support Openflow meter action. This is the first stab at adding kernel datapath meter support. This implementation supports only drop band type. Signed-off-by: Andy Zhou Signed-off-by: David S. Miller net/openvswitch/Makefile | 1 + net/openvswitch/datapath.c | 14 +- net/openvswitch/datapath.h | 3 + net/openvswitch/meter.c | 604 +++++++++++++++++++++++++++++++++++++++++++++ net/openvswitch/meter.h | 54 ++++ 5 files changed, 674 insertions(+), 2 deletions(-) commit 9602c01e57f7b868d748c2ba2aef0efa64b71ffc Author: Andy Zhou Date: Fri Nov 10 12:09:41 2017 -0800 openvswitch: export get_dp() API. Later patches will invoke get_dp() outside of datapath.c. Export it. Signed-off-by: Andy Zhou Signed-off-by: David S. Miller net/openvswitch/datapath.c | 29 ----------------------------- net/openvswitch/datapath.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 29 deletions(-) commit 5794040647de4011598a6d005fdad95d24fd385b Author: Andy Zhou Date: Fri Nov 10 12:09:40 2017 -0800 openvswitch: Add meter netlink definitions Meter has its own netlink family. Define netlink messages and attributes for communicating with the user space programs. Signed-off-by: Andy Zhou Signed-off-by: David S. Miller include/uapi/linux/openvswitch.h | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit aef1e0d5dd3ca3acd7274c9179c8f7bf68170509 Merge: ee9d342 1160603 Author: David S. Miller Date: Mon Nov 13 10:34:55 2017 +0900 Merge branch 'dsa-b53-Support-prepended-Broadcom-tags' Florian Fainelli says: ==================== net: dsa: b53: Support prepended Broadcom tags This patch series adds support for prepended 4-bytes Broadcom tags that we already support. This type of tag will typically be used when interfaced to a SoC like BCM58xx (NorthStar Plus) which supports a Flow Accelerator (WIP). In that case, we need to support a slightly different tagging format. The first patch does a bit of re-factoring and passes a port index to the get_tag_protocol() function since at least two different drivers need that type of information (mt7530, b53) to support tagging or not. ==================== Signed-off-by: David S. Miller commit 11606039604c4ce2d3c5045e30efb0c687a6a0de Author: Florian Fainelli Date: Fri Nov 10 15:22:55 2017 -0800 net: dsa: b53: Support prepended Broadcom tags On BCM58xx devices (Northstar Plus), there is an accelerator attached to port 8 which would only work if we use prepended Broadcom tags. Resolve that difference in our get_tag_protocol() function by setting the appropriate tagging protocol in that case. We need to change b53_brcm_hdr_setup() a little bit now since we can deal with two types of Broadcom tags. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/b53/Kconfig | 1 + drivers/net/dsa/b53/b53_common.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) commit b74b70c44986dee87881fbed3d912e02c5dcf78c Author: Florian Fainelli Date: Fri Nov 10 15:22:54 2017 -0800 net: dsa: Support prepended Broadcom tag Add a new type: DSA_TAG_PROTO_PREPEND which allows us to support for the 4-bytes Broadcom tag that we already support, but in a format where it is pre-pended to the packet instead of located between the MAC SA and the Ethertyper (DSA_TAG_PROTO_BRCM). Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn 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 | 1 + net/dsa/tag_brcm.c | 39 ++++++++++++++++++++++++++++++++------- 6 files changed, 41 insertions(+), 7 deletions(-) commit f7c39e3d1e094af1c3e0676b76c00d8c1f8e7774 Author: Florian Fainelli Date: Fri Nov 10 15:22:53 2017 -0800 net: dsa: tag_brcm: Prepare for supporting prepended tag In preparation for supporting the same Broadcom tag format, but instead of inserted between the MAC SA and EtherType, prepended to the Ethernet frame, restructure the code a little bit to make that possible and take an offset parameter. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/tag_brcm.c | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) commit 5ed4e3eb021762fee584ce65620bc822131c7aa0 Author: Florian Fainelli Date: Fri Nov 10 15:22:52 2017 -0800 net: dsa: Pass a port to get_tag_protocol() A number of drivers want to check whether the configured CPU port is a possible configuration for enabling tagging, pass down the CPU port number so they verify that. Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 32 +++++++++++++------------------- drivers/net/dsa/bcm_sf2.c | 3 ++- drivers/net/dsa/dsa_loop.c | 3 ++- drivers/net/dsa/lan9303-core.c | 3 ++- drivers/net/dsa/microchip/ksz_common.c | 3 ++- drivers/net/dsa/mt7530.c | 4 ++-- drivers/net/dsa/mv88e6060.c | 3 ++- drivers/net/dsa/mv88e6xxx/chip.c | 3 ++- drivers/net/dsa/qca8k.c | 2 +- include/net/dsa.h | 3 ++- net/dsa/dsa2.c | 2 +- net/dsa/legacy.c | 2 +- 12 files changed, 32 insertions(+), 31 deletions(-) commit ee9d3429c0e47a57e3e73b638785cafa33773639 Author: Andrew Morton Date: Fri Nov 10 15:09:53 2017 -0800 net/sched/sch_red.c: work around gcc-4.4.4 anon union initializer issue gcc-4.4.4 (at lest) has issues with initializers and anonymous unions: net/sched/sch_red.c: In function 'red_dump_offload': net/sched/sch_red.c:282: error: unknown field 'stats' specified in initializer net/sched/sch_red.c:282: warning: initialization makes integer from pointer without a cast net/sched/sch_red.c:283: error: unknown field 'stats' specified in initializer net/sched/sch_red.c:283: warning: initialization makes integer from pointer without a cast net/sched/sch_red.c: In function 'red_dump_stats': net/sched/sch_red.c:352: error: unknown field 'xstats' specified in initializer net/sched/sch_red.c:352: warning: initialization makes integer from pointer without a cast Work around this. Fixes: 602f3baf2218 ("net_sch: red: Add offload ability to RED qdisc") Cc: Nogah Frankel Cc: Jiri Pirko Cc: Simon Horman Cc: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: David S. Miller net/sched/sch_red.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit a1b8714593b67d0f783a9d82ed7e5800d02776bb Author: Slava Shwartsman Date: Fri Nov 10 09:10:29 2017 +0200 net/mlx4: Use Kconfig flag to remove support of old gen2 Mellanox devices Since Mellanox focus is on newer adapters, we would like to have the ability to disable the support for old gen2 adapters. This can be done by turning off the MLX4_CORE_GEN2 Kconfig flag. We keep it turned on by default. Signed-off-by: Slava Shwartsman Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/Kconfig | 8 ++++++++ drivers/net/ethernet/mellanox/mlx4/main.c | 2 ++ 2 files changed, 10 insertions(+) commit 0642840b8bb008528dbdf929cec9f65ac4231ad0 Author: Jason A. Donenfeld Date: Thu Nov 9 13:04:44 2017 +0900 af_netlink: ensure that NLMSG_DONE never fails in dumps The way people generally use netlink_dump is that they fill in the skb as much as possible, breaking when nla_put returns an error. Then, they get called again and start filling out the next skb, and again, and so forth. The mechanism at work here is the ability for the iterative dumping function to detect when the skb is filled up and not fill it past the brim, waiting for a fresh skb for the rest of the data. However, if the attributes are small and nicely packed, it is possible that a dump callback function successfully fills in attributes until the skb is of size 4080 (libmnl's default page-sized receive buffer size). The dump function completes, satisfied, and then, if it happens to be that this is actually the last skb, and no further ones are to be sent, then netlink_dump will add on the NLMSG_DONE part: nlh = nlmsg_put_answer(skb, cb, NLMSG_DONE, sizeof(len), NLM_F_MULTI); It is very important that netlink_dump does this, of course. However, in this example, that call to nlmsg_put_answer will fail, because the previous filling by the dump function did not leave it enough room. And how could it possibly have done so? All of the nla_put variety of functions simply check to see if the skb has enough tailroom, independent of the context it is in. In order to keep the important assumptions of all netlink dump users, it is therefore important to give them an skb that has this end part of the tail already reserved, so that the call to nlmsg_put_answer does not fail. Otherwise, library authors are forced to find some bizarre sized receive buffer that has a large modulo relative to the common sizes of messages received, which is ugly and buggy. This patch thus saves the NLMSG_DONE for an additional message, for the case that things are dangerously close to the brim. This requires keeping track of the errno from ->dump() across calls. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller net/netlink/af_netlink.c | 17 +++++++++++------ net/netlink/af_netlink.h | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) commit 907a4425f73c510ffaccef9f43cf7ddc458e5493 Merge: 338d182 836af83 Author: David S. Miller Date: Mon Nov 13 10:15:47 2017 +0900 Merge branch 'netem-add-nsec-scheduling-and-slot-feature' Dave Taht says: ==================== netem: add nsec scheduling and slot feature This patch series converts netem away from the old "ticks" interface and userspace API, and adds support for a new "slot" feature intended to emulate bursty macs such as WiFi and LTE better. Changes since v2: Use u64 for packet_len_sched_time() Use simpler max(time_to_send,q->slot.slot_next) Changes since v1: Always pass new nanosecond APIs to userspace ==================== Signed-off-by: David S. Miller commit 836af83b54e3e285c4a0cc06c24aeb737d3e0e18 Author: Dave Taht Date: Wed Nov 8 15:12:28 2017 -0800 netem: support delivering packets in delayed time slots Slotting is a crude approximation of the behaviors of shared media such as cable, wifi, and LTE, which gather up a bunch of packets within a varying delay window and deliver them, relative to that, nearly all at once. It works within the existing loss, duplication, jitter and delay parameters of netem. Some amount of inherent latency must be specified, regardless. The new "slot" parameter specifies a minimum and maximum delay between transmission attempts. The "bytes" and "packets" parameters can be used to limit the amount of information transferred per slot. Examples of use: tc qdisc add dev eth0 root netem delay 200us \ slot 800us 10ms bytes 64k packets 42 A more correct example, using stacked netem instances and a packet limit to emulate a tail drop wifi queue with slots and variable packet delivery, with a 200Mbit isochronous underlying rate, and 20ms path delay: tc qdisc add dev eth0 root handle 1: netem delay 20ms rate 200mbit \ limit 10000 tc qdisc add dev eth0 parent 1:1 handle 10:1 netem delay 200us \ slot 800us 10ms bytes 64k packets 42 limit 512 Signed-off-by: Dave Taht Signed-off-by: David S. Miller include/uapi/linux/pkt_sched.h | 8 +++++ net/sched/sch_netem.c | 74 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 79 insertions(+), 3 deletions(-) commit 99803171ef04037092bf5eb29ae801e8b4d49a75 Author: Dave Taht Date: Wed Nov 8 15:12:27 2017 -0800 netem: add uapi to express delay and jitter in nanoseconds netem userspace has long relied on a horrible /proc/net/psched hack to translate the current notion of "ticks" to nanoseconds. Expressing latency and jitter instead, in well defined nanoseconds, increases the dynamic range of emulated delays and jitter in netem. It will also ease a transition where reducing a tick to nsec equivalence would constrain the max delay in prior versions of netem to only 4.3 seconds. Signed-off-by: Dave Taht Suggested-by: Eric Dumazet Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller include/uapi/linux/pkt_sched.h | 2 ++ net/sched/sch_netem.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) commit 112f9cb65643caf7b922e1a66dc752bfab40aeb1 Author: Dave Taht Date: Wed Nov 8 15:12:26 2017 -0800 netem: convert to qdisc_watchdog_schedule_ns Upgrade the internal netem scheduler to use nanoseconds rather than ticks throughout. Convert to and from the std "ticks" userspace api automatically, while allowing for finer grained scheduling to take place. Signed-off-by: Dave Taht Signed-off-by: David S. Miller net/sched/sch_netem.c | 56 +++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit 338d182fa542b3ca05456ad1ce9cebe6580083b1 Author: Francesco Ruggeri Date: Wed Nov 8 11:23:46 2017 -0800 ipv6: try not to take rtnl_lock in ip6mr_sk_done Avoid traversing the list of mr6_tables (which requires the rtnl_lock) in ip6mr_sk_done(), when we know in advance that a match will not be found. This can happen when rawv6_close()/ip6mr_sk_done() is invoked on non-mroute6 sockets. This patch helps reduce rtnl_lock contention when destroying a large number of net namespaces, each having a non-mroute6 raw socket. v2: same patch, only fixed subject line and expanded comment. Signed-off-by: Francesco Ruggeri Signed-off-by: David S. Miller net/ipv6/ip6mr.c | 4 ++++ 1 file changed, 4 insertions(+) commit 07842561a873e8f25272bcebe7f6c7f1af7c1a2d Author: Colin Ian King Date: Wed Nov 8 13:23:23 2017 +0000 net: realtek: r8169: remove redundant assignment to giga_ctrl The variable giga_ctrl is being assigned to zero however this is never read and hence the assignment is redundant, so remove it. Cleans up clang warning: drivers/net/ethernet/realtek/r8169.c:1978:3: warning: Value stored to 'giga_ctrl' is never read Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 2 -- 1 file changed, 2 deletions(-) commit 277642dcca765a1955d4c753a5a315ff7f2eb09d Author: Linus Torvalds Date: Sun Nov 12 17:00:53 2017 -0800 modules: make sysfs attribute files readable by owner only This code goes back to the historical bitkeeper tree commit 3f7b0672086 ("Module section offsets in /sys/module"), where Jonathan Corbet wanted to show people how to debug loadable modules. See https://lwn.net/Articles/88052/ from June 2004. To expose the required load address information, Jonathan added the sections subdirectory for every module in /sys/modules, and made them S_IRUGO - readable by everybody. It was a more innocent time, plus those S_IRxxx macro names are a lot more confusing than the octal numbers are, so maybe it wasn't even intentional. But here we are, thirteen years later, and I'll just change it to S_IRUSR instead. Let's see if anybody even notices. Cc: Jonathan Corbet Signed-off-by: Linus Torvalds kernel/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b33709d894f2f058566ac06d9769dbc5617268d Author: Egil Hjelmeland Date: Wed Nov 8 11:55:14 2017 +0100 net: dsa: lan9303: Documentation: Add missing word "Mbps" Signed-off-by: Egil Hjelmeland Signed-off-by: David S. Miller Documentation/networking/dsa/lan9303.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 30482e4e2885bc71d058241d5aa1691480c8f938 Author: Egil Hjelmeland Date: Wed Nov 8 11:44:36 2017 +0100 net: dsa: lan9303: Fix lan9303_alr_del_port() Fix embarrassing bug in lan9303_alr_del_port(): Instead of zeroing entr->mac_addr, I destroyed the next cache entry. Affected .port_fdb_del and .port_mdb_del. Fixes: 0620427ea0d6 ("net: dsa: lan9303: Add fdb/mdb manipulation") Signed-off-by: Egil Hjelmeland Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/lan9303-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 990a848d537e4da966907c8ccec95bc568f2911c Merge: 1efef68 82a1faa be89251 Author: Rafael J. Wysocki Date: Mon Nov 13 01:41:39 2017 +0100 Merge branches 'pm-devfreq' and 'pm-tools' * pm-devfreq: PM / devfreq: Define the constant governor name PM / devfreq: Remove unneeded conditional statement PM / devfreq: Show the all available frequencies PM / devfreq: Change return type of devfreq_set_freq_table() PM / devfreq: Use the available min/max frequency Revert "PM / devfreq: Add show_one macro to delete the duplicate code" PM / devfreq: Set min/max_freq when adding the devfreq device * pm-tools: tools/power/cpupower: add libcpupower.so.0.0.1 to .gitignore tools/power/cpupower: Add 64 bit library detection MAINTAINERS: add maintainer for tools/power/cpupower cpupower: Fix no-rounding MHz frequency output commit 1efef68262dc567f0c09da9d11924e8287cd3a8b Merge: 05d658b 0508736 Author: Rafael J. Wysocki Date: Mon Nov 13 01:41:26 2017 +0100 Merge branch 'pm-core' * pm-core: ACPI / PM: Take SMART_SUSPEND driver flag into account PCI / PM: Take SMART_SUSPEND driver flag into account PCI / PM: Drop unnecessary invocations of pcibios_pm_ops callbacks PM / core: Add SMART_SUSPEND driver flag PCI / PM: Use the NEVER_SKIP driver flag PM / core: Add NEVER_SKIP and SMART_PREPARE driver flags PM / core: Convert timers to use timer_setup() PM / core: Fix kerneldoc comments of four functions PM / core: Drop legacy class suspend/resume operations commit 05d658b5b57214944067fb4f62bce59200bf496f Merge: 794c335 2dd9789 Author: Rafael J. Wysocki Date: Mon Nov 13 01:41:20 2017 +0100 Merge branch 'pm-sleep' * pm-sleep: freezer: Fix typo in freezable_schedule_timeout() comment PM / s2idle: Clear the events_check_enabled flag PM / sleep: Remove pm_complete_with_resume_check() PM: ARM: locomo: Drop suspend and resume bus type callbacks PM: Use a more common logging style PM: Document rules on using pm_runtime_resume() in system suspend callbacks commit 794c33555f704047e4014d4601b3972cfbfe7e50 Merge: 28da439 ff16567 Author: Rafael J. Wysocki Date: Mon Nov 13 01:41:11 2017 +0100 Merge branch 'acpi-pm' * acpi-pm: ACPI / PM: Fix acpi_pm_notifier_lock vs flush_workqueue() deadlock ACPI / LPSS: Consolidate runtime PM and system sleep handling ACPI / PM: Combine device suspend routines ACPI / LPIT: Add Low Power Idle Table (LPIT) support ACPI / PM: Split code validating need for runtime resume in ->prepare() ACPI / PM: Restore acpi_subsys_complete() ACPI / PM: Combine two identical device resume routines ACPI / PM: Remove stale function header commit 28da43956b04d2bd854d8db3ab1883a223bee07d Merge: 60af981 07458f6 b6aa983 Author: Rafael J. Wysocki Date: Mon Nov 13 01:40:52 2017 +0100 Merge branches 'pm-cpufreq-sched' and 'pm-opp' * pm-cpufreq-sched: cpufreq: schedutil: Reset cached_raw_freq when not in sync with next_freq * pm-opp: PM / OPP: Add dev_pm_opp_{un}register_get_pstate_helper() PM / OPP: Support updating performance state of device's power domain PM / OPP: add missing of_node_put() for of_get_cpu_node() PM / OPP: Rename dev_pm_opp_register_put_opp_helper() PM / OPP: Add missing of_node_put(np) PM / OPP: Move error message to debug level PM / OPP: Use snprintf() to avoid kasprintf() and kfree() PM / OPP: Move the OPP directory out of power/ commit eb5fcc3134b5375593de5325ddf4b1404b36b602 Merge: 85595ad 53c5eaa 84d3f6b 3e87ead 71c50db 85b1407 Author: Rafael J. Wysocki Date: Mon Nov 13 01:37:55 2017 +0100 Merge branches 'acpi-ec', 'acpi-button', 'acpi-sysfs', 'acpi-lpss' and 'acpi-cppc' * acpi-ec: ACPI / EC: Fix regression related to triggering source of EC event handling * acpi-button: ACPI / button: Delay acpi_lid_initialize_state() until first user space open * acpi-sysfs: ACPI / sysfs: Make function param_set_trace_method_name() static * acpi-lpss: ACPI / LPSS: Remove redundant initialization of clk * acpi-cppc: ACPI / CPPC: Make CPPC ACPI driver aware of PCC subspace IDs mailbox: PCC: Move the MAX_PCC_SUBSPACES definition to header file commit 85595ada6c8f0c94d4d715db90c807d7baefb1c5 Merge: 60764eb e13452a c0041d4 1c3b44c Author: Rafael J. Wysocki Date: Mon Nov 13 01:37:17 2017 +0100 Merge branches 'acpi-pmic', 'acpi-apei' and 'acpi-x86' * acpi-pmic: ACPI / PMIC: Add TI PMIC TPS68470 operation region driver * acpi-apei: APEI / ERST: use 64-bit timestamps ACPI / APEI: Remove arch_apei_flush_tlb_one() arm64: mm: Remove arch_apei_flush_tlb_one() ACPI / APEI: Remove ghes_ioremap_area ACPI / APEI: Replace ioremap_page_range() with fixmap ACPI / APEI: remove the unused dead-code for SEA/NMI notification type ACPI / APEI: adjust a local variable type in ghes_ioremap_pfn_irq() * acpi-x86: ACPI / x86: Extend KIOX000A quirk to cover all affected BIOS versions commit 60764eb379b371b8c7145f1a0914ee56d19e689f Merge: 1be9c3a d954f94 Author: Rafael J. Wysocki Date: Mon Nov 13 01:36:58 2017 +0100 Merge branch 'acpica' * acpica: ACPICA: Update version to 20170831 ACPICA: Update acpi_get_timer for 64-bit interface to acpi_hw_read ACPICA: String conversions: Update to add new behaviors ACPICA: String conversions: Cleanup/format comments. No functional changes ACPICA: Restructure/cleanup all string-to-integer conversion functions ACPICA: Header support for the PDTT ACPI table ACPICA: acpiexec: Add testability of deferred table verification ACPICA: Hardware: Enable 64-bit support of hardware accesses commit 60af981c78a72255355c8e374e173b550d6742d6 Merge: 622ade3 f7bc9b2 Author: Rafael J. Wysocki Date: Mon Nov 13 01:34:49 2017 +0100 Merge branch 'pm-cpufreq' * pm-cpufreq: (22 commits) cpufreq: stats: Handle the case when trans_table goes beyond PAGE_SIZE cpufreq: arm_big_little: make cpufreq_arm_bL_ops structures const cpufreq: arm_big_little: make function arguments and structure pointer const cpufreq: pxa: convert to clock API cpufreq: speedstep-lib: mark expected switch fall-through cpufreq: ti-cpufreq: add missing of_node_put() cpufreq: dt: Remove support for Exynos4212 SoCs cpufreq: imx6q: Move speed grading check to cpufreq driver cpufreq: ti-cpufreq: kfree opp_data when failure cpufreq: SPEAr: pr_err() strings should end with newlines cpufreq: powernow-k8: pr_err() strings should end with newlines cpufreq: dt-platdev: drop socionext,uniphier-ld6b from whitelist arm64: wire cpu-invariant accounting support up to the task scheduler arm64: wire frequency-invariant accounting support up to the task scheduler arm: wire cpu-invariant accounting support up to the task scheduler arm: wire frequency-invariant accounting support up to the task scheduler drivers base/arch_topology: allow inlining cpu-invariant accounting support drivers base/arch_topology: provide frequency-invariant accounting support cpufreq: dt: invoke frequency-invariance setter function cpufreq: arm_big_little: invoke frequency-invariance setter function ... commit 622ade3a2ff0fc4c026f116ea6018eddaeb49925 Merge: 4762573 a4c4475 Author: Rafael J. Wysocki Date: Mon Nov 13 01:34:14 2017 +0100 Merge branch 'pm-cpuidle' * pm-cpuidle: intel_idle: Graceful probe failure when MWAIT is disabled cpuidle: Avoid assignment in if () argument cpuidle: Clean up cpuidle_enable_device() error handling a bit cpuidle: ladder: Add per CPU PM QoS resume latency support ARM: cpuidle: Refactor rollback operations if init fails ARM: cpuidle: Correct driver unregistration if init fails intel_idle: replace conditionals with static_cpu_has(X86_FEATURE_ARAT) cpuidle: fix broadcast control when broadcast can not be entered Conflicts: drivers/idle/intel_idle.c commit 4762573b934cced83b91950f0e7a9f160e3983e3 Merge: 29aaf908 0759e80 Author: Rafael J. Wysocki Date: Mon Nov 13 01:33:48 2017 +0100 Merge branch 'pm-qos' * pm-qos: PM / QoS: Fix device resume latency framework PM / QoS: Drop PM_QOS_FLAG_REMOTE_WAKEUP commit 29aaf90875de6a1a760d555f815b18e412b5ab98 Merge: 040e8a4 5241ab4 Author: Rafael J. Wysocki Date: Mon Nov 13 01:33:35 2017 +0100 Merge branch 'pm-domains' * pm-domains: PM / Domains: Fix genpd to deal with drivers returning 1 from ->prepare() PM / domains: Rework governor code to be more consistent PM / Domains: Remove gpd_dev_ops.active_wakeup() callback soc: rockchip: power-domain: Use GENPD_FLAG_ACTIVE_WAKEUP soc: mediatek: Use GENPD_FLAG_ACTIVE_WAKEUP ARM: shmobile: pm-rmobile: Use GENPD_FLAG_ACTIVE_WAKEUP PM / Domains: Allow genpd users to specify default active wakeup behavior PM / Domains: Add support to select performance-state of domains PM / Domains: Rename genpd internals from pm_genpd_* to genpd_* commit 9d5604101e40c1d9d020384de11f0d68398c8844 Merge: ba1029c c0f3ea1 Author: Linus Torvalds Date: Sun Nov 12 16:33:33 2017 -0800 Merge branch 'kallsyms-restrictions' Merge /proc/kallsyms pointer value restrictions. Instead of using %pK, and making it about root access (at the wrong time, no less), make the whole choice of whether to show the actual pointer value be very explicit to the kallsyms code. In particular, we can now default to not doing so, and yet avoid annoying kernel profiling by actually looking at whether kernel profiling is allowed or not (by default it is not). This is all mostly preparation for the real "let's stop leaking kernel addresses" work that Tobin Harding is working on. Small steps. * kallsyms-restrictions: stop using '%pK' for /proc/kallsyms pointer values commit 040e8a4a4c045b59dd9235eae0643af19edb3942 Merge: e029b9b ca67ab5 e200052 7e95d91 Author: Rafael J. Wysocki Date: Mon Nov 13 01:32:25 2017 +0100 Merge branches 'pm-pci', 'pm-avs' and 'pm-docs' * pm-pci: PCI / PM: Add dev_dbg() to print device suspend power states PCI / PM: Do not resume any devices in pci_pm_prepare() * pm-avs: PM / AVS: Use %pS printk format for direct addresses * pm-docs: PM: docs: Fix formatting typo in devices.rst commit 46725b17f1c6c815a41429259b3f070c01e71bc1 Author: Naveen N. Rao Date: Thu Aug 31 21:55:57 2017 +0530 powerpc/signal: Properly handle return value from uprobe_deny_signal() When a uprobe is installed on an instruction that we currently do not emulate, we copy the instruction into a xol buffer and single step that instruction. If that instruction generates a fault, we abort the single stepping before invoking the signal handler. Once the signal handler is done, the uprobe trap is hit again since the instruction is retried and the process repeats. We use uprobe_deny_signal() to detect if the xol instruction triggered a signal. If so, we clear TIF_SIGPENDING and set TIF_UPROBE so that the signal is not handled until after the single stepping is aborted. In this case, uprobe_deny_signal() returns true and get_signal() ends up returning 0. However, in do_signal(), we are not looking at the return value, but depending on ksig.sig for further action, all with an uninitialized ksig that is not touched in this scenario. Fix the same by initializing ksig.sig to 0. Fixes: 129b69df9c90 ("powerpc: Use get_signal() signal_setup_done()") Cc: stable@vger.kernel.org # v3.17+ Reported-by: Anton Blanchard Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dcdc46794b7bb76733d9792cca2f45871d66881f Author: Michal Suchanek Date: Mon Jun 26 16:06:01 2017 +0200 powerpc/fadump: use kstrtoint to handle sysfs store Currently sysfs store handlers in fadump use if buf[0] == 'char'. This means input "100foo" is interpreted as '1' and "01" as '0'. Change to kstrtoint so leading zeroes and the like is handled in expected way. Signed-off-by: Michal Suchanek Acked-by: Hari Bathini Signed-off-by: Michal Suchanek <msuchanek@suse.de> Signed-off-by: Michael Ellerman arch/powerpc/kernel/fadump.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 0e7f0741450b1b800b3acfc2319e7f24e8a20fcf Author: Dan Williams Date: Sun Nov 12 14:57:09 2017 -0800 acpi, nfit: validate commands against the device type Fix occasions in acpi_nfit_ctl where we check the command type without validating whether we are parsing dimm vs bus level commands. Where the command numbers alias between dimms and bus we can make the wrong assumption just checking the raw command number. For example, with a simple nfit_test mock up of the clear-error command we trigger the following: BUG: unable to handle kernel NULL pointer dereference at 0000000000000094 IP: acpi_nfit_ctl+0x29b/0x930 [nfit] [..] Call Trace: nfit_test_probe+0xb85/0xc09 [nfit_test] platform_drv_probe+0x3b/0xa0 ? platform_drv_probe+0x3b/0xa0 driver_probe_device+0x29c/0x450 ? test_alloc+0x180/0x180 [nfit_test] __driver_attach+0xe3/0xf0 ? driver_probe_device+0x450/0x450 bus_for_each_dev+0x73/0xc0 driver_attach+0x1e/0x20 bus_add_driver+0x173/0x270 driver_register+0x60/0xe0 __platform_driver_register+0x36/0x40 nfit_test_init+0x2a1/0x1000 [nfit_test] Fixes: 4b27db7e26cd ("acpi, nfit: add support for the _LSI, _LSR, and...") Reported-by: Vishal Verma Tested-by: Vishal Verma Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit ffc661c99f621152d5fdcf53f9df0d48c326318b Author: Rasmus Villemoes Date: Mon Oct 30 22:35:47 2017 +0100 genirq: Fix type of shifting literal 1 in __setup_irq() If ffz() ever returns a value >= 31 then the following shift is undefined behaviour because the literal 1 which gets shifted is treated as signed integer. In practice, the bug is probably harmless, since the first undefined shift count is 31 which results - ignoring UB - in (int)(0x80000000). This gets sign extended so bit 32-63 will be set as well and all subsequent __setup_irq() calls would just end up hitting the -EBUSY branch. However, a sufficiently aggressive optimizer may use the UB of 1<<31 to decide that doesn't happen, and hence elide the sign-extension code, so that subsequent calls can indeed get ffz > 31. In any case, the right thing to do is to make the literal 1UL. [ tglx: For this to happen a single interrupt would have to be shared by 32 devices. Hardware like that does not exist and would have way more problems than that. ] Signed-off-by: Rasmus Villemoes Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20171030213548.16831-1-linux@rasmusvillemoes.dk kernel/irq/manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 306eb5a38dfc1a4c8a5c910c9844da6a97f2b9a4 Author: Rasmus Villemoes Date: Sun Nov 12 22:29:03 2017 +0100 irqdomain: Drop pointless NULL check in virq_debug_show_one data has been already derefenced unconditionally, so it's pointless to do a NULL pointer check on it afterwards. Drop it. [ tglx: Depersonify changelog. ] Signed-off-by: Rasmus Villemoes Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Link: https://lkml.kernel.org/r/20171112212904.28574-1-linux@rasmusvillemoes.dk kernel/irq/irqdomain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6714796edcce27f7a1845e2f79783cd51bb4799b Author: Wen Yaxng Date: Wed Nov 8 09:55:03 2017 +0800 genirq/proc: Return proper error code when irq_set_affinity() fails write_irq_affinity() returns the number of written bytes, which means success, unconditionally whether the actual irq_set_affinity() call succeeded or not. Add proper error handling and pass the error code returned from irq_set_affinity() back to user space in case of failure. [ tglx: Fixed coding style and massaged changelog ] Signed-off-by: Wen Yang Signed-off-by: Thomas Gleixner Reviewed-by: Jiang Biao Cc: zhong.weidong@zte.com.cn Link: https://lkml.kernel.org/r/1510106103-184761-1-git-send-email-wen.yang99@zte.com.cn kernel/irq/proc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ba1029c9cbc5af834467bf264e58f9d1074735fb Author: Randy Dunlap Date: Sun Nov 12 11:21:45 2017 -0800 modpost: detect modules without a MODULE_LICENSE Partially revert commit 2fa365682943 ("kbuild: soften MODULE_LICENSE check") so that modpost detects modules that do not have a MODULE_LICENSE. Sam's commit also changed the fatal error to a warning, which I am leaving as is. This gives advance notice of when a module has no license and will taint the kernel if the module is loaded. This produces the following warnings on x86_64 allmodconfig: MODPOST 6520 modules WARNING: modpost: missing MODULE_LICENSE() in drivers/auxdisplay/img-ascii-lcd.o WARNING: modpost: missing MODULE_LICENSE() in drivers/gpio/gpio-ath79.o WARNING: modpost: missing MODULE_LICENSE() in drivers/gpio/gpio-iop.o WARNING: modpost: missing MODULE_LICENSE() in drivers/iio/accel/kxsd9-i2c.o WARNING: modpost: missing MODULE_LICENSE() in drivers/iio/adc/qcom-vadc-common.o WARNING: modpost: missing MODULE_LICENSE() in drivers/media/platform/mtk-vcodec/mtk-vcodec-common.o WARNING: modpost: missing MODULE_LICENSE() in drivers/media/platform/soc_camera/soc_scale_crop.o WARNING: modpost: missing MODULE_LICENSE() in drivers/mtd/nand/denali_pci.o WARNING: modpost: missing MODULE_LICENSE() in drivers/net/phy/cortina.o WARNING: modpost: missing MODULE_LICENSE() in drivers/pinctrl/pxa/pinctrl-pxa2xx.o WARNING: modpost: missing MODULE_LICENSE() in drivers/power/reset/zx-reboot.o WARNING: modpost: missing MODULE_LICENSE() in drivers/rpmsg/qcom_glink_native.o WARNING: modpost: missing MODULE_LICENSE() in drivers/staging/comedi/drivers/ni_atmio.o WARNING: modpost: missing MODULE_LICENSE() in net/9p/9pnet_xen.o WARNING: modpost: missing MODULE_LICENSE() in sound/soc/codecs/snd-soc-pcm512x-spi.o Signed-off-by: Randy Dunlap Cc: Sam Ravnborg Signed-off-by: Linus Torvalds scripts/mod/modpost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c44741d75a27985a0496cd58b123a58c7177108 Author: Oliver O'Halloran Date: Thu Oct 19 18:13:55 2017 +1100 powerpc/lib: Implement UACCESS_FLUSHCACHE API Implement the architecture specific portitions of the UACCESS_FLUSHCACHE API. This provides functions for the copy_user_flushcache iterator that ensure that when the copy is finished the destination buffer contains a copy of the original and that the destination buffer is clean in the processor caches. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/string.h | 2 ++ arch/powerpc/include/asm/uaccess.h | 5 +++++ arch/powerpc/lib/pmem.c | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+) commit 32ce3862af3c42a3890e99846a8d1ad8871a49f9 Author: Oliver O'Halloran Date: Thu Oct 19 18:13:54 2017 +1100 powerpc/lib: Implement PMEM API Implement the architecture specific cache maintence functions that make up the "PMEM API". Currently the writeback and invalidate functions are the same since the function of the DCBST (data cache block store) instruction is typically interpreted as "writeback to the point of coherency" rather than to memory. As a result implementing the API requires a full cache flush rather than just a cache write back. This will probably change in the not-too-distant future. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 1 + arch/powerpc/lib/Makefile | 2 +- arch/powerpc/lib/pmem.c | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) commit 1b2c2b12386f9bb009a2249eca00e01a9d76d7c1 Author: Alistair Popple Date: Wed Sep 6 11:49:00 2017 +1000 powerpc/powernv/npu: Don't explicitly flush nmmu tlb The nest mmu required an explicit flush as a tlbi would not flush it in the same way as the core. However an alternate firmware fix exists which should eliminate the need for this flush, so instead add a device-tree property (ibm,nmmu-flush) on the NVLink2 PHB to enable it only if required. Signed-off-by: Alistair Popple Reviewed-by: Frederic Barrat Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/npu-dma.c | 28 +++++++++++++++++++++++----- arch/powerpc/platforms/powernv/pci.h | 3 +++ 2 files changed, 26 insertions(+), 5 deletions(-) commit 2a31ad093bb1b8c1f1e04cbe222ad17bc09c4534 Author: Alistair Popple Date: Wed Sep 6 11:48:59 2017 +1000 powerpc/powernv/npu: Use flush_all_mm() instead of flush_tlb_mm() With the optimisations introduced by commit a46cc7a908 ("powerpc/mm/radix: Improve TLB/PWC flushes"), flush_tlb_mm() no longer flushes the page walk cache with radix. Switch to using flush_all_mm() to ensure the pwc and tlb are properly flushed on the nmmu. Signed-off-by: Alistair Popple Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/npu-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d4e10e9ed9450e18fbbf6a8872be0eac9fd4999 Author: Vaidyanathan Srinivasan Date: Thu Aug 24 00:28:41 2017 +0530 powerpc/powernv/idle: Round up latency and residency values On PowerNV platforms, firmware provides exit latency and target residency for each of the idle states in nano seconds. Cpuidle framework expects the values in micro seconds. Round up to nearest micro seconds to avoid errors in cases where the values are defined as fractional micro seconds. Default idle state of 'snooze' has exit latency of zero. If other states have fractional micro second exit latency, they would get rounded down to zero micro second and make cpuidle framework choose deeper idle state when snooze loop is the right choice. Reported-by: Anton Blanchard Signed-off-by: Vaidyanathan Srinivasan Reviewed-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman drivers/cpuidle/cpuidle-powernv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 00ee9a1ca5080202bc37b44e998c3b2c74d45817 Author: Johan Hovold Date: Sat Nov 11 17:51:25 2017 +0100 irqchip/gic-v3: Fix ppi-partitions lookup Fix child-node lookup during initialisation, which ended up searching the whole device tree depth-first starting at the parent rather than just matching on its children. To make things worse, the parent gic node was prematurely freed, while the ppi-partitions node was leaked. Fixes: e3825ba1af3a ("irqchip/gic-v3: Add support for partitioned PPIs") Cc: stable # 4.7 Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit b24591e2fcf852ad7ad2ccf745c8220bf378d312 Author: David Howells Date: Thu Nov 9 12:35:07 2017 +0000 timers: Add a function to start/reduce a timer Add a function, similar to mod_timer(), that will start a timer if it isn't running and will modify it if it is running and has an expiry time longer than the new time. If the timer is running with an expiry time that's the same or sooner, no change is made. The function looks like: int timer_reduce(struct timer_list *timer, unsigned long expires); This can be used by code such as networking code to make it easier to share a timer for multiple timeouts. For instance, in upcoming AF_RXRPC code, the rxrpc_call struct will maintain a number of timeouts: unsigned long ack_at; unsigned long resend_at; unsigned long ping_at; unsigned long expect_rx_by; unsigned long expect_req_by; unsigned long expect_term_by; each of which is set independently of the others. With timer reduction available, when the code needs to set one of the timeouts, it only needs to look at that timeout and then call timer_reduce() to modify the timer, starting it or bringing it forward if necessary. There is no need to refer to the other timeouts to see which is earliest and no need to take any lock other than, potentially, the timer lock inside timer_reduce(). Note, that this does not protect against concurrent invocations of any of the timer functions. As an example, the expect_rx_by timeout above, which terminates a call if we don't get a packet from the server within a certain time window, would be set something like this: unsigned long now = jiffies; unsigned long expect_rx_by = now + packet_receive_timeout; WRITE_ONCE(call->expect_rx_by, expect_rx_by); timer_reduce(&call->timer, expect_rx_by); The timer service code (which might, say, be in a work function) would then check all the timeouts to see which, if any, had triggered, deal with those: t = READ_ONCE(call->ack_at); if (time_after_eq(now, t)) { cmpxchg(&call->ack_at, t, now + MAX_JIFFY_OFFSET); set_bit(RXRPC_CALL_EV_ACK, &call->events); } and then restart the timer if necessary by finding the soonest timeout that hasn't yet passed and then calling timer_reduce(). The disadvantage of doing things this way rather than comparing the timers each time and calling mod_timer() is that you *will* take timer events unless you can finish what you're doing and delete the timer in time. The advantage of doing things this way is that you don't need to use a lock to work out when the next timer should be set, other than the timer's own lock - which you might not have to take. [ tglx: Fixed weird formatting and adopted it to pending changes ] Signed-off-by: David Howells Signed-off-by: Thomas Gleixner Cc: keyrings@vger.kernel.org Cc: linux-afs@lists.infradead.org Link: https://lkml.kernel.org/r/151023090769.23050.1801643667223880753.stgit@warthog.procyon.org.uk include/linux/timer.h | 1 + kernel/time/timer.c | 45 ++++++++++++++++++++++++++++++++++++++------- 2 files changed, 39 insertions(+), 7 deletions(-) commit df27067e6040b51188184876253d93da002433aa Author: Arnd Bergmann Date: Fri Nov 10 16:25:04 2017 +0100 pstore: Use ktime_get_real_fast_ns() instead of __getnstimeofday() __getnstimeofday() is a rather odd interface, with a number of quirks: - The caller may come from NMI context, but the implementation is not NMI safe, one way to get there from NMI is NMI handler: something bad panic() kmsg_dump() pstore_dump() pstore_record_init() __getnstimeofday() - The calling conventions are different from any other timekeeping functions, to deal with returning an error code during suspended timekeeping. Address the above issues by using a completely different method to get the time: ktime_get_real_fast_ns() is NMI safe and has a reasonable behavior when timekeeping is suspended: it returns the time at which it got suspended. As Thomas Gleixner explained, this is safe, as ktime_get_real_fast_ns() does not call into the clocksource driver that might be suspended. The result can easily be transformed into a timespec structure. Since ktime_get_real_fast_ns() was not exported to modules, add the export. The pstore behavior for the suspended case changes slightly, as it now stores the timestamp at which timekeeping was suspended instead of storing a zero timestamp. This change is not addressing y2038-safety, that's subject to a more complex follow up patch. Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Acked-by: Kees Cook Cc: Tony Luck Cc: Anton Vorontsov Cc: Stephen Boyd Cc: John Stultz Cc: Colin Cross Link: https://lkml.kernel.org/r/20171110152530.1926955-1-arnd@arndb.de fs/pstore/platform.c | 5 +---- kernel/time/timekeeping.c | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) commit acdfe93101d0f5b968d1bd7ab125517bf7444047 Author: Naveen N. Rao Date: Mon Oct 23 22:07:41 2017 +0530 powerpc/kprobes: refactor kprobe_lookup_name for safer string operations Use safer string manipulation functions when dealing with a user-provided string in kprobe_lookup_name(). Reported-by: David Laight Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 47 ++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 27 deletions(-) commit 67ac0bfe29e9b4359012a8961c196baa813c707a Author: Naveen N. Rao Date: Mon Oct 23 22:07:40 2017 +0530 powerpc/kprobes: Blacklist emulate_update_regs() from kprobes Commit 3cdfcbfd32b9d ("powerpc: Change analyse_instr so it doesn't modify *regs") introduced emulate_update_regs() to perform part of what emulate_step() was doing earlier. However, this function was not added to the kprobes blacklist. Add it so as to prevent it from being probed. Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 1 + 1 file changed, 1 insertion(+) commit f72180cc93a2c64d4efe0129fa2396ad78be80e3 Author: Naveen N. Rao Date: Mon Oct 23 22:07:39 2017 +0530 powerpc/kprobes: Do not disable interrupts for optprobes and kprobes_on_ftrace Per Documentation/kprobes.txt, we don't necessarily need to disable interrupts before invoking the kprobe handlers. Masami submitted similar changes for x86 via commit a19b2e3d783964 ("kprobes/x86: Remove IRQ disabling from ftrace-based/optimized kprobes"). Do the same for powerpc. Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes-ftrace.c | 10 ++-------- arch/powerpc/kernel/optprobes.c | 10 ---------- 2 files changed, 2 insertions(+), 18 deletions(-) commit 8a2d71a3f2737e2448aa68de2b6052cb570d3d2a Author: Naveen N. Rao Date: Mon Oct 23 22:07:38 2017 +0530 powerpc/kprobes: Disable preemption before invoking probe handler for optprobes Per Documentation/kprobes.txt, probe handlers need to be invoked with preemption disabled. Update optimized_callback() to do so. Also move get_kprobe_ctlblk() invocation post preemption disable, since it accesses pre-cpu data. This was not an issue so far since optprobes wasn't selected if CONFIG_PREEMPT was enabled. Commit a30b85df7d599f ("kprobes: Use synchronize_rcu_tasks() for optprobe with CONFIG_PREEMPT=y") changes this. Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Signed-off-by: Michael Ellerman arch/powerpc/kernel/optprobes.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fc2a5a6161a26b386eb0936b74a852ff83793fb6 Author: Stephen Rothwell Date: Thu Nov 2 17:49:36 2017 +1100 powerpc/64s: ppc_save_regs is now needed for all 64s builds Commit 78adf6c214f0 ("powerpc/64s: Implement system reset idle wakeup reason"), added a call to ppc_save_regs() in the book3s code. ppc_save_regs() is only built if XMON and/or KEXEC_CORE are enabled, which is usually the case, however if they're not enabled then the build breaks. Fix it by making the Makefile check also build ppc_save_regs.o if CONFIG_PPC_BOOK3S is enabled. Fixes: 78adf6c214f0 ("powerpc/64s: Implement system reset idle wakeup reason") Signed-off-by: Stephen Rothwell [mpe: Write change log] Signed-off-by: Michael Ellerman arch/powerpc/kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f79ad50ea3c73fb1ea5b09e95c864e5bb263adfb Author: Balbir Singh Date: Mon Oct 16 16:21:35 2017 +1100 powerpc/mm/radix: Fix crashes on Power9 DD1 with radix MMU and STRICT_RWX When using the radix MMU on Power9 DD1, to work around a hardware problem, radix__pte_update() is required to do a two stage update of the PTE. First we write a zero value into the PTE, then we flush the TLB, and then we write the new PTE value. In the normal case that works OK, but it does not work if we're updating the PTE that maps the code we're executing, because the mapping is removed by the TLB flush and we can no longer execute from it. Unfortunately the STRICT_RWX code needs to do exactly that. The exact symptoms when we hit this case vary, sometimes we print an oops and then get stuck after that, but I've also seen a machine just get stuck continually page faulting with no oops printed. The variance is presumably due to the exact layout of the text and the page size used for the mappings. In all cases we are unable to boot to a shell. There are possible solutions such as creating a second mapping of the TLB flush code, executing from that, and then jumping back to the original. However we don't want to add that level of complexity for a DD1 work around. So just detect that we're running on Power9 DD1 and refrain from changing the permissions, effectively disabling STRICT_RWX on Power9 DD1. Fixes: 7614ff3272a1 ("powerpc/mm/radix: Implement STRICT_RWX/mark_rodata_ro() for Radix") Cc: stable@vger.kernel.org # v4.13+ Reported-by: Andrew Jeffery [Changelog as suggested by Michael Ellerman ] Signed-off-by: Balbir Singh Signed-off-by: Michael Ellerman arch/powerpc/mm/pgtable-radix.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d00a08cf9ee986ad6689ce8c6fd176aff679c106 Author: Thomas Gleixner Date: Sun Nov 12 13:02:51 2017 +0100 irq/work: Use llist_for_each_entry_safe The llist_for_each_entry() loop in irq_work_run_list() is unsafe because once the works PENDING bit is cleared it can be requeued on another CPU. Use llist_for_each_entry_safe() instead. Fixes: 16c0890dc66d ("irq/work: Don't reinvent the wheel but use existing llist API") Reported-by:Chris Wilson Signed-off-by: Thomas Gleixner Cc: Frederic Weisbecker Cc: Byungchul Park Cc: Peter Zijlstra Cc: Petri Latvala Link: http://lkml.kernel.org/r/151027307351.14762.4611888896020658384@mail.alporthouse.com kernel/irq_work.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2244645ab194fe45ffcbaa08f235c8f0c7fb54fc Author: Xiaochen Shen Date: Fri Nov 10 11:16:24 2017 -0800 x86/intel_rdt: Fix a silent failure when writing zero value schemata Writing an invalid schemata with no domain values (e.g., "(L3|MB):"), results in a silent failure, i.e. the last_cmd_status returns OK, Check for an empty value and set the result string with a proper error message and return -EINVAL. Before the fix: # mkdir /sys/fs/resctrl/p1 # echo "L3:" > /sys/fs/resctrl/p1/schemata (silent failure) # cat /sys/fs/resctrl/info/last_cmd_status ok # echo "MB:" > /sys/fs/resctrl/p1/schemata (silent failure) # cat /sys/fs/resctrl/info/last_cmd_status ok After the fix: # mkdir /sys/fs/resctrl/p1 # echo "L3:" > /sys/fs/resctrl/p1/schemata -bash: echo: write error: Invalid argument # cat /sys/fs/resctrl/info/last_cmd_status Missing 'L3' value # echo "MB:" > /sys/fs/resctrl/p1/schemata -bash: echo: write error: Invalid argument # cat /sys/fs/resctrl/info/last_cmd_status Missing 'MB' value [ Tony: This is an unintended side effect of the patch earlier to allow the user to just write the value they want to change. While allowing user to specify less than all of the values, it also allows an empty value. ] Fixes: c4026b7b95a4 ("x86/intel_rdt: Implement "update" mode when writing schemata file") Signed-off-by: Xiaochen Shen Signed-off-by: Tony Luck Signed-off-by: Thomas Gleixner Cc: Vikas Shivappa Cc: Fenghua Yu Link: https://lkml.kernel.org/r/20171110191624.20280-1-tony.luck@intel.com arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c | 5 +++++ 1 file changed, 5 insertions(+) commit fdae5f37a88caed9d2105f5a1ff609322f9e5416 Merge: 7c5556d b395456 Author: David S. Miller Date: Sun Nov 12 09:17:05 2017 +0900 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit a04b5de5050ab8b891128eb2c47a0916fe8622e1 Author: Martin Wilck Date: Thu Sep 28 21:33:23 2017 +0200 nvme: fix visibility of "uuid" ns attribute "uuid" must be invisible if both ns->uuid and ns->nguid are unset, not if either one is. Fixes: d934f9848a77 "nvme: provide UUID value to userspace" Signed-off-by: Martin Wilck [hch: rebased to the nvme-4.15 tree to help resolving a conflict] Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f46a79a5a048200d4615b2509f01eed97c99b95 Author: Haren Myneni Date: Sun Sep 24 23:44:13 2017 -0700 crypto/nx: Do not initialize workmem allocation We are using percpu send window on P9 NX (powerNV) instead of opening / closing per each crypto session. Means txwin is removed from workmem. So we do not need to initialize workmem for each request. Signed-off-by: Haren Myneni Signed-off-by: Michael Ellerman drivers/crypto/nx/nx-842.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 976dd6490b1b45727733a3ee1e25e159c1d748ed Author: Haren Myneni Date: Sun Sep 24 23:43:02 2017 -0700 crypto/nx: Use percpu send window for NX requests For P9 NX, the send window is opened for each crypto session and closed upon free. But VAS supports 64K windows per chip for all coprocessors including in user space support. So there is a possibility of not getting the window for kernel requests. This patch reserves windows for each coprocessor type (NX842) and are available forever for kernel requests, Opens each window for each CPU on the corresponding chip during driver initialization. So then use the percpu txwin for NX requests depends on the CPU on which the process is executing. Signed-off-by: Haren Myneni Signed-off-by: Michael Ellerman drivers/crypto/nx/nx-842-powernv.c | 149 +++++++++++++++++-------------------- 1 file changed, 68 insertions(+), 81 deletions(-) commit 6c8e6bb2a52d5e7ae5bbde21c21f6d5dfd6e9ae8 Author: Sukadev Bhattiprolu Date: Tue Nov 7 18:23:58 2017 -0800 powerpc/vas: Add support for user receive window Add support for user space receive window (for the Fast thread-wakeup coprocessor type) Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas-window.c | 56 +++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 7 deletions(-) commit 61f3cca8cda979646c24accd9dbf3e2de7ea6ceb Author: Sukadev Bhattiprolu Date: Tue Nov 7 18:23:57 2017 -0800 powerpc/vas: Define vas_win_id() Define an interface to return a system-wide unique id for a given VAS window. The vas_win_id() will be used in a follow-on patch to generate an unique handle for a user space receive window. Applications can use this handle to pair send and receive windows for fast thread-wakeup. The hardware refers to this system-wide unique id as a Partition Send Window ID which is expected to be used during fault handling. Hence the "pswid" in the function names. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/include/asm/vas.h | 5 +++++ arch/powerpc/platforms/powernv/vas-window.c | 9 +++++++++ arch/powerpc/platforms/powernv/vas.h | 28 ++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) commit 5676be2fb7035ac32da3a96241611e7eddff6157 Author: Sukadev Bhattiprolu Date: Tue Nov 7 18:23:56 2017 -0800 powerpc/vas: Define vas_win_paste_addr() Define an interface that the NX drivers can use to find the physical paste address of a send window. This interface is expected to be used with the mmap() operation of the NX driver's device. i.e the user space process can use driver's mmap() operation to map the send window's paste address into their address space and then use copy and paste instructions to submit the CRBs to the NX engine. Note that kernel drivers will use vas_paste_crb() directly and don't need this interface. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/include/asm/vas.h | 7 +++++++ arch/powerpc/platforms/powernv/vas-window.c | 10 ++++++++++ 2 files changed, 17 insertions(+) commit 9d2a4d71332cfdf4ea90754ad9b2f05a5ee5f6c7 Author: Sukadev Bhattiprolu Date: Tue Nov 7 18:23:54 2017 -0800 powerpc: Define set_thread_uses_vas() A CP_ABORT instruction is required in processes that have mapped a VAS "paste address" with the intention of using COPY/PASTE instructions. But since CP_ABORT is expensive, we want to restrict it to only processes that use/intend to use COPY/PASTE. Define an interface, set_thread_uses_vas(), that VAS can use to indicate that the current process opened a send window. During context switch, issue CP_ABORT only for processes that have the flag set. Thanks for input from Nick Piggin, Michael Ellerman. Signed-off-by: Sukadev Bhattiprolu [mpe: Fix to not use new_thread after _switch() returns] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/processor.h | 2 ++ arch/powerpc/include/asm/switch_to.h | 2 ++ arch/powerpc/kernel/process.c | 41 +++++++++++++++++++++++++++--------- 3 files changed, 35 insertions(+), 10 deletions(-) commit ec233ede4c8654894610ea54f4dae7adc954ac62 Author: Sukadev Bhattiprolu Date: Tue Nov 7 18:23:53 2017 -0800 powerpc: Add support for setting SPRN_TIDR We need the SPRN_TIDR to be set for use with fast thread-wakeup (core- to-core wakeup) and also with CAPI. Each thread in a process needs to have a unique id within the process. But for now, we assign globally unique thread ids to all threads in the system. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Philippe Bergheaud Signed-off-by: Christophe Lombard [mpe: Simplify tidr clearing on fork() and ctx switch code] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/processor.h | 1 + arch/powerpc/include/asm/switch_to.h | 3 + arch/powerpc/kernel/process.c | 116 +++++++++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+) commit ece4e51291485bb4a71ff554964948b02ab89823 Author: Sukadev Bhattiprolu Date: Tue Nov 7 18:23:51 2017 -0800 powerpc/vas: Export HVWC to debugfs Export the VAS Window context information to debugfs. We need to hold a mutex when closing the window to prevent a race with the debugfs read(). Rather than introduce a per-instance mutex, we use the global vas_mutex for now, since it is not heavily contended. The window->cop field is only relevant to a receive window so we were not setting it for a send window (which is is paired to a receive window anyway). But to simplify reporting in debugfs, set the 'cop' field for the send window also. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/Makefile | 3 +- arch/powerpc/platforms/powernv/vas-debug.c | 209 ++++++++++++++++++++++++++++ arch/powerpc/platforms/powernv/vas-window.c | 34 ++++- arch/powerpc/platforms/powernv/vas.c | 6 +- arch/powerpc/platforms/powernv/vas.h | 14 ++ 5 files changed, 257 insertions(+), 9 deletions(-) commit d4ef61b5e8955fb913e2e1a6c1533414859a839d Author: Sukadev Bhattiprolu Date: Tue Nov 7 18:23:50 2017 -0800 powerpc/vas, nx-842: Define and use chip_to_vas_id() Define a helper, chip_to_vas_id() to map a given chip id to corresponding vas id. Normally, callers of vas_rx_win_open() and vas_tx_win_open() want the VAS window to be on the same chip where the calling thread is executing. These callers can pass in -1 for the VAS id. This interface will be useful if a thread running on one chip wants to open a window on another chip (like the NX-842 driver does during start up). Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/include/asm/vas.h | 9 +++++++++ arch/powerpc/platforms/powernv/vas.c | 11 +++++++++++ drivers/crypto/nx/nx-842-powernv.c | 18 +++--------------- 3 files changed, 23 insertions(+), 15 deletions(-) commit ca03258b6b338b392c778bed9c7dd56e6a513012 Author: Sukadev Bhattiprolu Date: Tue Nov 7 18:23:49 2017 -0800 powerpc/vas: Create cpu to vas id mapping Create a cpu to vasid mapping so callers can specify -1 instead of trying to find a VAS id. Changelog[v2] [Michael Ellerman] Use per-cpu variables to simplify code. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 6fccac16c578c699bf0714a6c930b0ceb81305a0 Author: Sukadev Bhattiprolu Date: Tue Nov 7 18:23:48 2017 -0800 powerpc/vas: poll for return of window credits Normally, the NX driver waits for the CRBs to be processed before closing the window. But it is better to ensure that the credits are returned before the window gets reassigned later. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas-window.c | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 62f659e08ccd657ead6901011f5e542dbdc477c5 Author: Sukadev Bhattiprolu Date: Tue Nov 7 18:23:47 2017 -0800 powerpc/vas: Save configured window credits Save the configured max window credits for a window in the vas_window structure. We will need this when polling for return of window credits. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas-window.c | 6 ++++-- arch/powerpc/platforms/powernv/vas.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) commit dfe954e4456277effffb2c5add47fa25390f8cea Author: Sukadev Bhattiprolu Date: Tue Nov 7 18:23:46 2017 -0800 powerpc/vas: Reduce polling interval for busy state A VAS window is normally in "busy" state for only a short duration. Reduce the time we wait for the window to go to "not-busy" state to speed-up vas_win_close() a bit. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas-window.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 36a288fe9dab9a6b0b50ffdb5c34f04c42cee2ac Author: Sukadev Bhattiprolu Date: Tue Nov 7 18:23:45 2017 -0800 powerpc/vas: Use helper to unpin/close window Use a helper to have the hardware unpin and mark a window closed. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas-window.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 4963ac3632dda7433db5149d6abdfc644a8d8ab2 Author: Sukadev Bhattiprolu Date: Tue Nov 7 18:23:44 2017 -0800 powerpc/vas: Drop poll_window_cast_out(). Polling for window cast out is listed in the spec, but turns out that it is not strictly necessary and slows down window close. Making it a stub for now. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas-window.c | 34 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 0a2c2c24cf78473da785654361ec957f129f4820 Author: Sukadev Bhattiprolu Date: Tue Nov 7 18:23:43 2017 -0800 powerpc/vas: Cleanup some debug code Clean up vas.h and the debug code around ifdef vas_debug. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas-window.c | 8 +++-- arch/powerpc/platforms/powernv/vas.h | 54 ++++++----------------------- 2 files changed, 17 insertions(+), 45 deletions(-) commit 51b537124fc24074aee67cae9ca94ec4d9c204fc Author: Sukadev Bhattiprolu Date: Tue Nov 7 18:23:42 2017 -0800 powerpc/vas: Validate window credits NX-842, the only user of VAS, sets the window credits to default values but VAS should check the credits against the possible max values. The VAS_WCREDS_MIN is not needed and can be dropped. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas-window.c | 6 ++++++ arch/powerpc/platforms/powernv/vas.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit e34917fbee1226144c94413697ddbf2d5b06d0d3 Author: Sukadev Bhattiprolu Date: Tue Nov 7 18:23:41 2017 -0800 powerpc/vas: init missing fields from [rt]xattr Initialize a few missing window context fields from the window attributes specified by the caller. These fields are currently set to their default values by the caller (NX-842), but would be good to apply them anyway. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/vas-window.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c14dd9d5f8beda9d8c621683b4e7d6cb5cd3cda7 Author: Greg Kroah-Hartman Date: Tue Nov 7 14:58:46 2017 +0100 staging: lustre: add SPDX identifiers to all lustre files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/staging/lustre files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Oleg Drokin Cc: James Simmons Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/include/linux/libcfs/curproc.h | 1 + drivers/staging/lustre/include/linux/libcfs/libcfs.h | 1 + drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h | 1 + drivers/staging/lustre/include/linux/libcfs/libcfs_crypto.h | 1 + drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h | 1 + drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h | 1 + drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h | 1 + drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h | 1 + drivers/staging/lustre/include/linux/libcfs/libcfs_private.h | 1 + drivers/staging/lustre/include/linux/libcfs/libcfs_string.h | 1 + drivers/staging/lustre/include/linux/libcfs/libcfs_time.h | 1 + drivers/staging/lustre/include/linux/libcfs/libcfs_workitem.h | 1 + drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h | 1 + drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h | 1 + drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h | 1 + drivers/staging/lustre/include/linux/lnet/api.h | 1 + drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 1 + drivers/staging/lustre/include/linux/lnet/lib-types.h | 1 + drivers/staging/lustre/include/linux/lnet/socklnd.h | 1 + drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 1 + drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 1 + drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 1 + drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c | 1 + drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 1 + drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h | 1 + drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 1 + drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c | 1 + drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c | 1 + drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c | 1 + drivers/staging/lustre/lnet/libcfs/debug.c | 1 + drivers/staging/lustre/lnet/libcfs/fail.c | 1 + drivers/staging/lustre/lnet/libcfs/hash.c | 1 + drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 1 + drivers/staging/lustre/lnet/libcfs/libcfs_lock.c | 1 + drivers/staging/lustre/lnet/libcfs/libcfs_mem.c | 1 + drivers/staging/lustre/lnet/libcfs/libcfs_string.c | 1 + drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 1 + drivers/staging/lustre/lnet/libcfs/linux/linux-crypto-adler.c | 1 + drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c | 1 + drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.h | 1 + drivers/staging/lustre/lnet/libcfs/linux/linux-curproc.c | 1 + drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c | 1 + drivers/staging/lustre/lnet/libcfs/linux/linux-mem.c | 1 + drivers/staging/lustre/lnet/libcfs/linux/linux-module.c | 1 + drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c | 1 + drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c | 1 + drivers/staging/lustre/lnet/libcfs/module.c | 1 + drivers/staging/lustre/lnet/libcfs/prng.c | 1 + drivers/staging/lustre/lnet/libcfs/tracefile.c | 1 + drivers/staging/lustre/lnet/libcfs/tracefile.h | 1 + drivers/staging/lustre/lnet/libcfs/workitem.c | 1 + drivers/staging/lustre/lnet/lnet/acceptor.c | 1 + drivers/staging/lustre/lnet/lnet/api-ni.c | 1 + drivers/staging/lustre/lnet/lnet/config.c | 1 + drivers/staging/lustre/lnet/lnet/lib-eq.c | 1 + drivers/staging/lustre/lnet/lnet/lib-md.c | 1 + drivers/staging/lustre/lnet/lnet/lib-me.c | 1 + drivers/staging/lustre/lnet/lnet/lib-move.c | 1 + drivers/staging/lustre/lnet/lnet/lib-msg.c | 1 + drivers/staging/lustre/lnet/lnet/lib-ptl.c | 1 + drivers/staging/lustre/lnet/lnet/lib-socket.c | 1 + drivers/staging/lustre/lnet/lnet/lo.c | 1 + drivers/staging/lustre/lnet/lnet/module.c | 1 + drivers/staging/lustre/lnet/lnet/net_fault.c | 1 + drivers/staging/lustre/lnet/lnet/nidstrings.c | 1 + drivers/staging/lustre/lnet/lnet/peer.c | 1 + drivers/staging/lustre/lnet/lnet/router.c | 1 + drivers/staging/lustre/lnet/lnet/router_proc.c | 1 + drivers/staging/lustre/lnet/selftest/brw_test.c | 1 + drivers/staging/lustre/lnet/selftest/conctl.c | 1 + drivers/staging/lustre/lnet/selftest/conrpc.c | 1 + drivers/staging/lustre/lnet/selftest/conrpc.h | 1 + drivers/staging/lustre/lnet/selftest/console.c | 1 + drivers/staging/lustre/lnet/selftest/console.h | 1 + drivers/staging/lustre/lnet/selftest/framework.c | 1 + drivers/staging/lustre/lnet/selftest/module.c | 1 + drivers/staging/lustre/lnet/selftest/ping_test.c | 1 + drivers/staging/lustre/lnet/selftest/rpc.c | 1 + drivers/staging/lustre/lnet/selftest/rpc.h | 1 + drivers/staging/lustre/lnet/selftest/selftest.h | 1 + drivers/staging/lustre/lnet/selftest/timer.c | 1 + drivers/staging/lustre/lnet/selftest/timer.h | 1 + drivers/staging/lustre/lustre/fid/fid_internal.h | 1 + drivers/staging/lustre/lustre/fid/fid_lib.c | 1 + drivers/staging/lustre/lustre/fid/fid_request.c | 1 + drivers/staging/lustre/lustre/fid/lproc_fid.c | 1 + drivers/staging/lustre/lustre/fld/fld_cache.c | 1 + drivers/staging/lustre/lustre/fld/fld_internal.h | 1 + drivers/staging/lustre/lustre/fld/fld_request.c | 1 + drivers/staging/lustre/lustre/fld/lproc_fld.c | 1 + drivers/staging/lustre/lustre/include/cl_object.h | 1 + drivers/staging/lustre/lustre/include/interval_tree.h | 1 + drivers/staging/lustre/lustre/include/llog_swab.h | 1 + drivers/staging/lustre/lustre/include/lprocfs_status.h | 1 + drivers/staging/lustre/lustre/include/lu_object.h | 1 + drivers/staging/lustre/lustre/include/lu_ref.h | 1 + drivers/staging/lustre/lustre/include/lustre_acl.h | 1 + drivers/staging/lustre/lustre/include/lustre_compat.h | 1 + drivers/staging/lustre/lustre/include/lustre_debug.h | 1 + drivers/staging/lustre/lustre/include/lustre_disk.h | 1 + drivers/staging/lustre/lustre/include/lustre_dlm.h | 1 + drivers/staging/lustre/lustre/include/lustre_dlm_flags.h | 1 + drivers/staging/lustre/lustre/include/lustre_export.h | 1 + drivers/staging/lustre/lustre/include/lustre_fid.h | 1 + drivers/staging/lustre/lustre/include/lustre_fld.h | 1 + drivers/staging/lustre/lustre/include/lustre_ha.h | 1 + drivers/staging/lustre/lustre/include/lustre_handles.h | 1 + drivers/staging/lustre/lustre/include/lustre_import.h | 1 + drivers/staging/lustre/lustre/include/lustre_intent.h | 1 + drivers/staging/lustre/lustre/include/lustre_kernelcomm.h | 1 + drivers/staging/lustre/lustre/include/lustre_lib.h | 1 + drivers/staging/lustre/lustre/include/lustre_linkea.h | 1 + drivers/staging/lustre/lustre/include/lustre_lmv.h | 1 + drivers/staging/lustre/lustre/include/lustre_log.h | 1 + drivers/staging/lustre/lustre/include/lustre_mdc.h | 1 + drivers/staging/lustre/lustre/include/lustre_mds.h | 1 + drivers/staging/lustre/lustre/include/lustre_net.h | 1 + drivers/staging/lustre/lustre/include/lustre_nrs.h | 1 + drivers/staging/lustre/lustre/include/lustre_nrs_fifo.h | 1 + drivers/staging/lustre/lustre/include/lustre_obdo.h | 1 + drivers/staging/lustre/lustre/include/lustre_patchless_compat.h | 1 + drivers/staging/lustre/lustre/include/lustre_req_layout.h | 1 + drivers/staging/lustre/lustre/include/lustre_sec.h | 1 + drivers/staging/lustre/lustre/include/lustre_swab.h | 1 + drivers/staging/lustre/lustre/include/obd.h | 1 + drivers/staging/lustre/lustre/include/obd_cksum.h | 1 + drivers/staging/lustre/lustre/include/obd_class.h | 1 + drivers/staging/lustre/lustre/include/obd_support.h | 1 + drivers/staging/lustre/lustre/include/seq_range.h | 1 + drivers/staging/lustre/lustre/ldlm/interval_tree.c | 1 + drivers/staging/lustre/lustre/ldlm/l_lock.c | 1 + drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 1 + drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 1 + drivers/staging/lustre/lustre/ldlm/ldlm_inodebits.c | 1 + drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 1 + drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 1 + drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 1 + drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 1 + drivers/staging/lustre/lustre/ldlm/ldlm_plain.c | 1 + drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 1 + drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 1 + drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 1 + drivers/staging/lustre/lustre/llite/dcache.c | 1 + drivers/staging/lustre/lustre/llite/dir.c | 1 + drivers/staging/lustre/lustre/llite/file.c | 1 + drivers/staging/lustre/lustre/llite/glimpse.c | 1 + drivers/staging/lustre/lustre/llite/lcommon_cl.c | 1 + drivers/staging/lustre/lustre/llite/lcommon_misc.c | 1 + drivers/staging/lustre/lustre/llite/llite_internal.h | 1 + drivers/staging/lustre/lustre/llite/llite_lib.c | 1 + drivers/staging/lustre/lustre/llite/llite_mmap.c | 1 + drivers/staging/lustre/lustre/llite/llite_nfs.c | 1 + drivers/staging/lustre/lustre/llite/lproc_llite.c | 1 + drivers/staging/lustre/lustre/llite/namei.c | 1 + drivers/staging/lustre/lustre/llite/range_lock.c | 1 + drivers/staging/lustre/lustre/llite/range_lock.h | 1 + drivers/staging/lustre/lustre/llite/rw.c | 1 + drivers/staging/lustre/lustre/llite/rw26.c | 1 + drivers/staging/lustre/lustre/llite/statahead.c | 1 + drivers/staging/lustre/lustre/llite/super25.c | 1 + drivers/staging/lustre/lustre/llite/symlink.c | 1 + drivers/staging/lustre/lustre/llite/vvp_dev.c | 1 + drivers/staging/lustre/lustre/llite/vvp_internal.h | 1 + drivers/staging/lustre/lustre/llite/vvp_io.c | 1 + drivers/staging/lustre/lustre/llite/vvp_lock.c | 1 + drivers/staging/lustre/lustre/llite/vvp_object.c | 1 + drivers/staging/lustre/lustre/llite/vvp_page.c | 1 + drivers/staging/lustre/lustre/llite/xattr.c | 1 + drivers/staging/lustre/lustre/llite/xattr_security.c | 1 + drivers/staging/lustre/lustre/lmv/lmv_fld.c | 1 + drivers/staging/lustre/lustre/lmv/lmv_intent.c | 1 + drivers/staging/lustre/lustre/lmv/lmv_internal.h | 1 + drivers/staging/lustre/lustre/lmv/lmv_obd.c | 1 + drivers/staging/lustre/lustre/lmv/lproc_lmv.c | 1 + drivers/staging/lustre/lustre/lov/lov_cl_internal.h | 1 + drivers/staging/lustre/lustre/lov/lov_dev.c | 1 + drivers/staging/lustre/lustre/lov/lov_ea.c | 1 + drivers/staging/lustre/lustre/lov/lov_internal.h | 1 + drivers/staging/lustre/lustre/lov/lov_io.c | 1 + drivers/staging/lustre/lustre/lov/lov_lock.c | 1 + drivers/staging/lustre/lustre/lov/lov_merge.c | 1 + drivers/staging/lustre/lustre/lov/lov_obd.c | 1 + drivers/staging/lustre/lustre/lov/lov_object.c | 1 + drivers/staging/lustre/lustre/lov/lov_offset.c | 1 + drivers/staging/lustre/lustre/lov/lov_pack.c | 1 + drivers/staging/lustre/lustre/lov/lov_page.c | 1 + drivers/staging/lustre/lustre/lov/lov_pool.c | 1 + drivers/staging/lustre/lustre/lov/lov_request.c | 1 + drivers/staging/lustre/lustre/lov/lovsub_dev.c | 1 + drivers/staging/lustre/lustre/lov/lovsub_lock.c | 1 + drivers/staging/lustre/lustre/lov/lovsub_object.c | 1 + drivers/staging/lustre/lustre/lov/lovsub_page.c | 1 + drivers/staging/lustre/lustre/lov/lproc_lov.c | 1 + drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 1 + drivers/staging/lustre/lustre/mdc/mdc_internal.h | 1 + drivers/staging/lustre/lustre/mdc/mdc_lib.c | 1 + drivers/staging/lustre/lustre/mdc/mdc_locks.c | 1 + drivers/staging/lustre/lustre/mdc/mdc_reint.c | 1 + drivers/staging/lustre/lustre/mdc/mdc_request.c | 1 + drivers/staging/lustre/lustre/mgc/lproc_mgc.c | 1 + drivers/staging/lustre/lustre/mgc/mgc_internal.h | 1 + drivers/staging/lustre/lustre/mgc/mgc_request.c | 1 + drivers/staging/lustre/lustre/obdclass/cl_internal.h | 1 + drivers/staging/lustre/lustre/obdclass/cl_io.c | 1 + drivers/staging/lustre/lustre/obdclass/cl_lock.c | 1 + drivers/staging/lustre/lustre/obdclass/cl_object.c | 1 + drivers/staging/lustre/lustre/obdclass/cl_page.c | 1 + drivers/staging/lustre/lustre/obdclass/class_obd.c | 1 + drivers/staging/lustre/lustre/obdclass/debug.c | 1 + drivers/staging/lustre/lustre/obdclass/genops.c | 1 + drivers/staging/lustre/lustre/obdclass/kernelcomm.c | 1 + drivers/staging/lustre/lustre/obdclass/linkea.c | 1 + drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 1 + drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c | 1 + drivers/staging/lustre/lustre/obdclass/llog.c | 1 + drivers/staging/lustre/lustre/obdclass/llog_cat.c | 1 + drivers/staging/lustre/lustre/obdclass/llog_internal.h | 1 + drivers/staging/lustre/lustre/obdclass/llog_obd.c | 1 + drivers/staging/lustre/lustre/obdclass/llog_swab.c | 1 + drivers/staging/lustre/lustre/obdclass/lprocfs_counters.c | 1 + drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 1 + drivers/staging/lustre/lustre/obdclass/lu_object.c | 1 + drivers/staging/lustre/lustre/obdclass/lu_ref.c | 1 + drivers/staging/lustre/lustre/obdclass/lustre_handles.c | 1 + drivers/staging/lustre/lustre/obdclass/lustre_peer.c | 1 + drivers/staging/lustre/lustre/obdclass/obd_config.c | 1 + drivers/staging/lustre/lustre/obdclass/obd_mount.c | 1 + drivers/staging/lustre/lustre/obdclass/obdo.c | 1 + drivers/staging/lustre/lustre/obdclass/statfs_pack.c | 1 + drivers/staging/lustre/lustre/obdclass/uuid.c | 1 + drivers/staging/lustre/lustre/obdecho/echo_client.c | 1 + drivers/staging/lustre/lustre/obdecho/echo_internal.h | 1 + drivers/staging/lustre/lustre/osc/lproc_osc.c | 1 + drivers/staging/lustre/lustre/osc/osc_cache.c | 1 + drivers/staging/lustre/lustre/osc/osc_cl_internal.h | 1 + drivers/staging/lustre/lustre/osc/osc_dev.c | 1 + drivers/staging/lustre/lustre/osc/osc_internal.h | 1 + drivers/staging/lustre/lustre/osc/osc_io.c | 1 + drivers/staging/lustre/lustre/osc/osc_lock.c | 1 + drivers/staging/lustre/lustre/osc/osc_object.c | 1 + drivers/staging/lustre/lustre/osc/osc_page.c | 1 + drivers/staging/lustre/lustre/osc/osc_quota.c | 1 + drivers/staging/lustre/lustre/osc/osc_request.c | 1 + drivers/staging/lustre/lustre/ptlrpc/client.c | 1 + drivers/staging/lustre/lustre/ptlrpc/connection.c | 1 + drivers/staging/lustre/lustre/ptlrpc/errno.c | 1 + drivers/staging/lustre/lustre/ptlrpc/events.c | 1 + drivers/staging/lustre/lustre/ptlrpc/import.c | 1 + drivers/staging/lustre/lustre/ptlrpc/layout.c | 1 + drivers/staging/lustre/lustre/ptlrpc/llog_client.c | 1 + drivers/staging/lustre/lustre/ptlrpc/llog_net.c | 1 + drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 1 + drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 1 + drivers/staging/lustre/lustre/ptlrpc/nrs.c | 1 + drivers/staging/lustre/lustre/ptlrpc/nrs_fifo.c | 1 + drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 1 + drivers/staging/lustre/lustre/ptlrpc/pers.c | 1 + drivers/staging/lustre/lustre/ptlrpc/pinger.c | 1 + drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 1 + drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c | 1 + drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 1 + drivers/staging/lustre/lustre/ptlrpc/recover.c | 1 + drivers/staging/lustre/lustre/ptlrpc/sec.c | 1 + drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 1 + drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 1 + drivers/staging/lustre/lustre/ptlrpc/sec_gc.c | 1 + drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c | 1 + drivers/staging/lustre/lustre/ptlrpc/sec_null.c | 1 + drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 1 + drivers/staging/lustre/lustre/ptlrpc/service.c | 1 + drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 1 + 271 files changed, 271 insertions(+) commit 863dbc52e7f0e5acd7b4883f3933543a81c474c7 Author: Greg Kroah-Hartman Date: Tue Nov 7 14:58:42 2017 +0100 staging: greybus: Remove redundant license text Now that the SPDX tag is in all greybus files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Vaibhav Hiremath Reviewed-by: Alex Elder Acked-by: Vaibhav Agarwal Acked-by: David Lin Acked-by: Johan Hovold Acked-by: Viresh Kumar Acked-by: Mark Greer Acked-by: Rui Miguel Silva Acked-by: "Bryan O'Donoghue" Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/arche-apb-ctrl.c | 2 -- drivers/staging/greybus/arche-platform.c | 2 -- drivers/staging/greybus/arche_platform.h | 2 -- drivers/staging/greybus/audio_apbridgea.c | 2 -- drivers/staging/greybus/audio_codec.c | 2 -- drivers/staging/greybus/audio_codec.h | 2 -- drivers/staging/greybus/audio_gb.c | 2 -- drivers/staging/greybus/audio_manager.c | 2 -- drivers/staging/greybus/audio_manager.h | 2 -- drivers/staging/greybus/audio_manager_module.c | 2 -- drivers/staging/greybus/audio_manager_private.h | 2 -- drivers/staging/greybus/audio_manager_sysfs.c | 2 -- drivers/staging/greybus/audio_module.c | 2 -- drivers/staging/greybus/audio_topology.c | 2 -- drivers/staging/greybus/authentication.c | 2 -- drivers/staging/greybus/bootrom.c | 2 -- drivers/staging/greybus/bundle.c | 2 -- drivers/staging/greybus/bundle.h | 2 -- drivers/staging/greybus/camera.c | 2 -- drivers/staging/greybus/connection.c | 2 -- drivers/staging/greybus/connection.h | 2 -- drivers/staging/greybus/control.c | 2 -- drivers/staging/greybus/control.h | 2 -- drivers/staging/greybus/core.c | 2 -- drivers/staging/greybus/debugfs.c | 2 -- drivers/staging/greybus/es2.c | 2 -- drivers/staging/greybus/firmware.h | 2 -- drivers/staging/greybus/fw-core.c | 2 -- drivers/staging/greybus/fw-download.c | 2 -- drivers/staging/greybus/fw-management.c | 2 -- drivers/staging/greybus/gb-camera.h | 2 -- drivers/staging/greybus/gbphy.c | 2 -- drivers/staging/greybus/gbphy.h | 2 -- drivers/staging/greybus/gpio.c | 2 -- drivers/staging/greybus/greybus.h | 2 -- drivers/staging/greybus/greybus_trace.h | 2 -- drivers/staging/greybus/hd.c | 2 -- drivers/staging/greybus/hd.h | 2 -- drivers/staging/greybus/hid.c | 2 -- drivers/staging/greybus/i2c.c | 2 -- drivers/staging/greybus/interface.c | 2 -- drivers/staging/greybus/interface.h | 2 -- drivers/staging/greybus/light.c | 2 -- drivers/staging/greybus/log.c | 2 -- drivers/staging/greybus/loopback.c | 2 -- drivers/staging/greybus/manifest.c | 2 -- drivers/staging/greybus/manifest.h | 2 -- drivers/staging/greybus/module.c | 2 -- drivers/staging/greybus/module.h | 2 -- drivers/staging/greybus/operation.c | 2 -- drivers/staging/greybus/operation.h | 2 -- drivers/staging/greybus/power_supply.c | 2 -- drivers/staging/greybus/pwm.c | 2 -- drivers/staging/greybus/raw.c | 2 -- drivers/staging/greybus/sdio.c | 2 -- drivers/staging/greybus/spi.c | 2 -- drivers/staging/greybus/spilib.c | 2 -- drivers/staging/greybus/svc.c | 2 -- drivers/staging/greybus/svc.h | 2 -- drivers/staging/greybus/svc_watchdog.c | 2 -- drivers/staging/greybus/uart.c | 2 -- drivers/staging/greybus/usb.c | 3 --- drivers/staging/greybus/vibrator.c | 2 -- 63 files changed, 127 deletions(-) commit eb50fd3a22c770f36be275295b782f3ea52e3215 Author: Greg Kroah-Hartman Date: Tue Nov 7 14:58:41 2017 +0100 staging: greybus: add SPDX identifiers to all greybus driver files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/staging/greybus files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Vaibhav Hiremath Cc: "Bryan O'Donoghue" Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Acked-by: Vaibhav Agarwal Acked-by: David Lin Reviewed-by: Alex Elder Acked-by: Johan Hovold Acked-by: Viresh Kumar Acked-by: Mark Greer Acked-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/Documentation/firmware/authenticate.c | 1 + drivers/staging/greybus/Documentation/firmware/firmware.c | 1 + drivers/staging/greybus/arche-apb-ctrl.c | 1 + drivers/staging/greybus/arche-platform.c | 1 + drivers/staging/greybus/arche_platform.h | 1 + drivers/staging/greybus/arpc.h | 1 + drivers/staging/greybus/audio_apbridgea.c | 1 + drivers/staging/greybus/audio_apbridgea.h | 1 + drivers/staging/greybus/audio_codec.c | 1 + drivers/staging/greybus/audio_codec.h | 1 + drivers/staging/greybus/audio_gb.c | 1 + drivers/staging/greybus/audio_manager.c | 1 + drivers/staging/greybus/audio_manager.h | 1 + drivers/staging/greybus/audio_manager_module.c | 1 + drivers/staging/greybus/audio_manager_private.h | 1 + drivers/staging/greybus/audio_manager_sysfs.c | 1 + drivers/staging/greybus/audio_module.c | 1 + drivers/staging/greybus/audio_topology.c | 1 + drivers/staging/greybus/authentication.c | 1 + drivers/staging/greybus/bootrom.c | 1 + drivers/staging/greybus/bundle.c | 1 + drivers/staging/greybus/bundle.h | 1 + drivers/staging/greybus/camera.c | 1 + drivers/staging/greybus/connection.c | 1 + drivers/staging/greybus/connection.h | 1 + drivers/staging/greybus/control.c | 1 + drivers/staging/greybus/control.h | 1 + drivers/staging/greybus/core.c | 1 + drivers/staging/greybus/debugfs.c | 1 + drivers/staging/greybus/es2.c | 1 + drivers/staging/greybus/firmware.h | 1 + drivers/staging/greybus/fw-core.c | 1 + drivers/staging/greybus/fw-download.c | 1 + drivers/staging/greybus/fw-management.c | 1 + drivers/staging/greybus/gb-camera.h | 1 + drivers/staging/greybus/gbphy.c | 1 + drivers/staging/greybus/gbphy.h | 1 + drivers/staging/greybus/gpio.c | 1 + drivers/staging/greybus/greybus.h | 1 + drivers/staging/greybus/greybus_authentication.h | 1 + drivers/staging/greybus/greybus_firmware.h | 1 + drivers/staging/greybus/greybus_manifest.h | 1 + drivers/staging/greybus/greybus_protocols.h | 1 + drivers/staging/greybus/greybus_trace.h | 1 + drivers/staging/greybus/hd.c | 1 + drivers/staging/greybus/hd.h | 1 + drivers/staging/greybus/hid.c | 1 + drivers/staging/greybus/i2c.c | 1 + drivers/staging/greybus/interface.c | 1 + drivers/staging/greybus/interface.h | 1 + drivers/staging/greybus/light.c | 1 + drivers/staging/greybus/log.c | 1 + drivers/staging/greybus/loopback.c | 1 + drivers/staging/greybus/manifest.c | 1 + drivers/staging/greybus/manifest.h | 1 + drivers/staging/greybus/module.c | 1 + drivers/staging/greybus/module.h | 1 + drivers/staging/greybus/operation.c | 1 + drivers/staging/greybus/operation.h | 1 + drivers/staging/greybus/power_supply.c | 1 + drivers/staging/greybus/pwm.c | 1 + drivers/staging/greybus/raw.c | 1 + drivers/staging/greybus/sdio.c | 1 + drivers/staging/greybus/spi.c | 1 + drivers/staging/greybus/spilib.c | 1 + drivers/staging/greybus/spilib.h | 1 + drivers/staging/greybus/svc.c | 1 + drivers/staging/greybus/svc.h | 1 + drivers/staging/greybus/svc_watchdog.c | 1 + drivers/staging/greybus/tools/lbtest | 1 + drivers/staging/greybus/tools/loopback_test.c | 1 + drivers/staging/greybus/uart.c | 1 + drivers/staging/greybus/usb.c | 1 + drivers/staging/greybus/vibrator.c | 1 + 74 files changed, 74 insertions(+) commit 7c5556decd0a629e9ee02e93653f75ba7b7da03c Merge: 39b1752 fdd0bd8 Author: David S. Miller Date: Sat Nov 11 22:37:22 2017 +0900 Merge tag 'wireless-drivers-next-for-davem-2017-11-11' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.15 Last minute patches before the merge window. Not really anything special standing out, mostly fixes or cleanup and some minor new features. Major changes: iwlwifi * some new PCI IDs ==================== Signed-off-by: David S. Miller commit 39b175211053c7a6a4d794c42e225994f1c069c2 Author: Mat Martineau Date: Fri Nov 10 14:03:51 2017 -0800 net: Remove unused skb_shared_info member ip6_frag_id was only used by UFO, which has been removed. ipv6_proxy_select_ident() only existed to set ip6_frag_id and has no in-tree callers. Signed-off-by: Mat Martineau Signed-off-by: David S. Miller include/linux/skbuff.h | 1 - include/net/ipv6.h | 1 - net/ipv6/output_core.c | 31 ------------------------------- 3 files changed, 33 deletions(-) commit 973573c49905a2dc2ef07d4395aa0e4b44fb099d Merge: 93f7ea7 da9ca82 Author: David S. Miller Date: Sat Nov 11 22:08:24 2017 +0900 Merge branch 'l2tp-avoid-aliasing-tunnels-socket-pointer' Guillaume Nault says: ==================== l2tp: avoid aliasing tunnels socket pointer We don't need to copy the tunnel's socket pointer in the pseudo-wire specific session structures. This uselessly complicates the code and hampers evolution. This series was part of an effort to protect tunnels socket pointer with RCU. But since it provides nice cleanup, I submit it separately. ==================== Signed-off-by: David S. Miller commit da9ca825ef79fd1c64297b5267d594b11a9e5b16 Author: Guillaume Nault Date: Sat Nov 11 06:06:37 2017 +0900 l2tp: remove the .tunnel_sock field from struct pppol2tp_session The last user of .tunnel_sock is pppol2tp_connect() which defensively uses it to verify internal data consistency. This check isn't necessary: l2tp_session_get() guarantees that the returned session belongs to the tunnel passed as parameter. And .tunnel_sock is never updated, so checking that it still points to the parent tunnel socket is useless; that test can never fail. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ppp.c | 10 ---------- 1 file changed, 10 deletions(-) commit 7198c77aa05560c257ee377ec1f4796812121580 Author: Guillaume Nault Date: Sat Nov 11 06:06:31 2017 +0900 l2tp: avoid using ->tunnel_sock for getting session's parent tunnel Sessions don't need to use l2tp_sock_to_tunnel(xxx->tunnel_sock) for accessing their parent tunnel. They have the .tunnel field in the l2tp_session structure for that. Furthermore, in all these cases, the session is registered, so we're guaranteed that .tunnel isn't NULL and that the session properly holds a reference on the tunnel. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ppp.c | 66 ++++++++++------------------------------------------- 1 file changed, 12 insertions(+), 54 deletions(-) commit 8fdfd6595bd739d8338fd1f3d553a9a34ed9824c Author: Guillaume Nault Date: Sat Nov 11 06:06:29 2017 +0900 l2tp: remove .tunnel_sock from struct l2tp_eth This field has never been used. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_eth.c | 2 -- 1 file changed, 2 deletions(-) commit 93f7ea74371273db09b30b9a19ff4d5de22f464d Merge: f444ef5 7edc58d Author: David S. Miller Date: Sat Nov 11 21:55:16 2017 +0900 Merge branch 'dsa-b53-Turn-on-Broadcom-tags' Florian Fainelli says: ==================== net: dsa: b53: Turn on Broadcom tags This was long overdue, with this patch series, the b53 driver now turns on Broadcom tags except for 5325 and 5365 which use an older format that we do not support yet (TBD). First patch is necessary in order for bgmac, used on BCM5301X and Northstar Plus to work correctly and successfully send ARP packets back to the requsester. Second patch is actually a bug fix, but because net/master and net-next/master diverge in that area, I am targeting net-next/master here. Finally, the last patch enables Broadcom tags after checking that the CPU port selected is either, 5, 7 or 8, since those are the only valid combinations given currently supported HW. Changes in v3: - guarded padding with netdev_uses_dsa() to let the non-DSA use cases not have a performance hit for smaller packets - added missing select NET_DSA_TAG_BRCM to drivers/net/dsa/b53/Kconfig Changes in v2: - moved a hunk between patch 2 and patch 3 to avoid a bisectability issue ==================== Signed-off-by: David S. Miller commit 7edc58d614d49c3b47ec4b9441d5e95758d0f711 Author: Florian Fainelli Date: Fri Nov 10 11:33:27 2017 -0800 net: dsa: b53: Turn on Broadcom tags Enable Broadcom tags for b53 devices, except 5325 and 5365 which use a different Broadcom tag format not yet supported by net/dsa/tag_brcm.c. We also make sure that we can turn on Broadcom tags on a CPU port number that is capable of that: 5, 7 or 8. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/b53/Kconfig | 1 + drivers/net/dsa/b53/b53_common.c | 48 ++++++++++++++++++++++++++++++++-------- 2 files changed, 40 insertions(+), 9 deletions(-) commit c499696e7901bda18385ac723b7bd27c3a4af624 Author: Florian Fainelli Date: Fri Nov 10 11:33:26 2017 -0800 net: dsa: b53: Stop using dev->cpu_port incorrectly dev->cpu_port is the driver local information that should only be used to look up register offsets for a particular port, when they differ (e.g: IMP port override), but it should certainly not be used in place of the DSA configured CPU port. Since the DSA switch layer calls port_vlan_{add,del}() on the CPU port as well, we can remove the specific setting of the CPU port within port_vlan_{add,del}. Fixes: ff39c2d68679 ("net: dsa: b53: Add bridge support") Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch") Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 4d215ae730786f51b108873227c67dc7815dbdef Author: Florian Fainelli Date: Fri Nov 10 11:33:25 2017 -0800 net: bgmac: Pad packets to a minimum size In preparation for enabling Broadcom tags with b53, pad packets to a minimum size of 64 bytes (sans FCS) in order for the Broadcom switch to accept ingressing frames. Without this, we would typically be able to DHCP, but not resolve with ARP because packets are too small and get rejected by the switch. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit f444ef510350c262a0532b95592df9e3899053e3 Merge: 940c9c4 4672cd3 Author: David S. Miller Date: Sat Nov 11 21:50:15 2017 +0900 Merge branch 'dsa-lan9303-IGMP-handling' Egil Hjelmeland says: ==================== net: dsa: lan9303: IGMP handling Set up the HW switch to trap IGMP packets to CPU port. And make sure skb->offload_fwd_mark is cleared for incoming IGMP packets. skb->offload_fwd_mark calculation is a candidate for consolidation into the DSA core. The calculation can probably be more polished when done at a point where DSA has updated skb. ==================== Signed-off-by: David S. Miller commit 4672cd36053e4a8480f7ca796758d56ef23ccb78 Author: Egil Hjelmeland Date: Fri Nov 10 12:54:35 2017 +0100 net: dsa: lan9303: Clear offload_fwd_mark for IGMP Now that IGMP packets no longer is flooded in HW, we want the SW bridge to forward packets based on bridge configuration. To make that happen, IGMP packets must have skb->offload_fwd_mark = 0. Signed-off-by: Egil Hjelmeland Signed-off-by: David S. Miller net/dsa/tag_lan9303.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 2aee43078afc24fe8073829159292664c1eed424 Author: Egil Hjelmeland Date: Fri Nov 10 12:54:34 2017 +0100 net: dsa: lan9303: Set up trapping of IGMP to CPU port IGMP packets should be trapped to the CPU port. The SW bridge knows whether to forward to other ports. With "IGMP snooping for local traffic" merged, IGMP trapping is also required for stable IGMPv2 operation. LAN9303 does not trap IGMP packets by default. Enable IGMP trapping in lan9303_setup. Signed-off-by: Egil Hjelmeland Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/lan9303-core.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 940c9c458866725e0ade96d5c1c7dbe5fcf1cf85 Author: Rahul Lakkireddy Date: Fri Nov 10 13:03:37 2017 +0530 cxgb4: collect vpd info directly from hardware Collect vpd information directly from hardware instead of software adapter context. Move EEPROM physical address to virtual address translation logic to t4_hw.c and update relevant files. Fixes: 6f92a6544f1a ("cxgb4: collect hardware misc dumps") Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h | 6 ++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 77 ++++++++++++++++++---- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 33 +--------- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 29 ++++++++ 5 files changed, 104 insertions(+), 42 deletions(-) commit 40cff8fca9e3a7f005a44d011141ec83501013be Author: Andrew Lunn Date: Fri Nov 10 00:36:41 2017 +0100 net: dsa: mv88e6xxx: Fix stats histogram mode The statistics histogram mode was not being explicitly initialized on devices other than the 6390 family. Clearing the statistics then overwrote the default setting, setting the histogram to a reserved mode. Explicitly set the histogram mode for all devices. Change the statistics clear into a read/modify/write, and since it is now more complex, move it into global1.c. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 34 +++++++++++++++++++++------------- drivers/net/dsa/mv88e6xxx/global1.c | 35 +++++++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/global1.h | 2 ++ 3 files changed, 58 insertions(+), 13 deletions(-) commit c311db92af1f8407486065637c9703b99f910c20 Merge: 8c5f9a8 87fa886 Author: David S. Miller Date: Sat Nov 11 19:33:11 2017 +0900 Merge branch 'mv88e6xxx-broadcast-flooding-in-hardware' Andrew Lunn says: ==================== mv88e6xxx broadcast flooding in hardware This patchset makes the mv88e6xxx driver perform flooding in hardware, rather than let the software bridge perform the flooding. This is a prerequisite for IGMP snooping on the bridge interface. In order to make hardware broadcasting work, a few other issues need fixing or improving. SWITCHDEV_ATTR_ID_PORT_PARENT_ID is broken, which is apparent when testing on the ZII devel board with multiple switches. Some of these patches are taken from a previous RFC patchset of IGMP support. Rebased onto net-next, with fixup for Vivien's refactoring. ==================== Signed-off-by: David S. Miller commit 87fa886e1fb7d08a35be2f39d15225d249daeea2 Author: Andrew Lunn Date: Thu Nov 9 22:29:56 2017 +0100 net: dsa: mv88e6xxx: Flood broadcast frames in hardware By default, the switch does not flood broadcast frames. Instead the broadcast address is unknown in the ATU, so the frame gets forwarded out the cpu port. The software bridge then floods it back to the individual switch ports which are members of the bridge. Add an ATU entry in the switch so that it floods broadcast frames out ports, rather than have the software bridge do it. Also, send a copy out the cpu port and any dsa ports. Rely on the port vectors to prevent broadcast frames leaking between bridges, and separated ports. Additionally, when a VLAN is added, a new FID is allocated. This represents a new table of ATU entries. A broadcast entry is added to the new FID. With offload_fwd_mark being set, the software bridge will not flood the frames it receives back to the switch. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit a4c93ae1bb675c875c5bee2fa817680cd6588240 Author: Andrew Lunn Date: Thu Nov 9 22:29:55 2017 +0100 net: dsa: mv88e6xxx: Move mv88e6xxx_port_db_load_purge() This function is going to be needed by a soon to be added new function. Move it earlier so we can avoid a forward declaration. No functional changes. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 88 ++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 44 deletions(-) commit 743fcc283edd5d3a9d61abf96d4443329c826d28 Author: Andrew Lunn Date: Thu Nov 9 22:29:54 2017 +0100 net: dsa: mv88e6xxx: Print offending port when vlan check fails When testing if a VLAN is one more than one bridge, we print an error message that the VLAN is already in use somewhere else. Print both the new port which would like the VLAN, and the port which already has it, to aid debugging. 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 cd88646994bc0b537e0e7c89c53e674b58ba22b0 Author: Andrew Lunn Date: Thu Nov 9 22:29:53 2017 +0100 net: dsa: mv88e6xxx: Fixed port netdev check for VLANs Having the same VLAN on multiple bridges is currently unsupported as an offload. mv88e6xxx_port_check_hw_vlan() is used to ensure that a VLAN is not on multiple bridges when adding a VLAN range to a port. It loops the ports and checks to see if there are ports in a different bridge with the same VLAN. While walking all switch ports, the code was checking if the new port has a netdev slave attached to it. If not, skip checking the port being walked. This seems like a typ0. If the new port does not have a slave, how has a VLAN been added to it in the first place, requiring this check be performed at all? More likely, we should be checking if the port being walked has a slave. Without the port having a slave, it cannot have a VLAN on it, so there is no need to check further for that particular port. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13edbdb6ed8b829ab3198a8c7b978c37184317b5 Author: Andrew Lunn Date: Thu Nov 9 22:29:52 2017 +0100 net: dsa: {e}dsa: set offload_fwd_mark on received packets The software bridge needs to know if a packet has already been bridged by hardware offload to ports in the same hardware offload, in order that it does not re-flood them, causing duplicates. This is particularly true for broadcast and multicast traffic which the host has requested. By setting offload_fwd_mark in the skb the bridge will only flood to ports in other offloads and other netifs. Set this flag in the DSA and EDSA tag driver. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/tag_dsa.c | 2 ++ net/dsa/tag_edsa.c | 2 ++ 2 files changed, 4 insertions(+) commit a42c8e33f2044d6b56f167b5506c7e09e5b702c2 Author: Andrew Lunn Date: Thu Nov 9 22:29:51 2017 +0100 net: dsa: Fix SWITCHDEV_ATTR_ID_PORT_PARENT_ID SWITCHDEV_ATTR_ID_PORT_PARENT_ID is used by the software bridge when determining which ports to flood a packet out. If the packet originated from a switch, it assumes the switch has already flooded the packet out the switches ports, so the bridge should not flood the packet itself out switch ports. Ports on the same switch are expected to return the same parent ID when SWITCHDEV_ATTR_ID_PORT_PARENT_ID is called. DSA gets this wrong with clusters of switches. As far as the software bridge is concerned, the cluster is all one switch. A packet from any switch in the cluster can be assumed to have been flooded as needed out of all ports of the cluster, not just the switch it originated from. Hence all ports of a cluster should return the same parent. The old implementation did not, each switch in the cluster had its own ID. Also wrong was that the ID was not unique if multiple DSA instances are in operation. Use the tree ID as the parent ID, which is the same for all switches in a cluster and unique across switch clusters. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8c5f9a8c134394ca7cf77f8095e96d4e12177f74 Merge: 3ec26c7 7558bd5 Author: David S. Miller Date: Sat Nov 11 19:30:16 2017 +0900 Merge branch 'ieee802154-for-davem-2017-11-09' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next Stefan Schmidt says: ==================== pull-request: net-next: ieee802154 2017-11-09 A small update on ieee802154 patches for net-next. Nothing dramatic, but simply housekeeping this time around. A fix for the correct mask to be applied in the mrf24j40 driver by Gustavo A. R. Silva Removal of a non existing email user for the ca8210 driver by Harry Morris A bunch of checkpatch cleanups across the subsystem from myself ==================== Signed-off-by: David S. Miller commit 3ec26c7944a405e9dbd21b31ff46a3b4e6095adb Author: Niklas Cassel Date: Thu Nov 9 18:09:26 2017 +0100 bindings: net: stmmac: correctify note about LPI interrupt There are two different combined signal for various interrupt events: In EQOS-CORE and EQOS-MTL configurations, mci_intr_o is the interrupt signal. In EQOS-DMA, EQOS-AHB and EQOS-AXI configurations, these interrupt events are combined with the events in the DMA on the sbd_intr_o signal. Depending on configuration, the device tree irq "macirq" will refer to either mci_intr_o or sbd_intr_o. The databook states: "The MAC generates the LPI interrupt when the Tx or Rx side enters or exits the LPI state. The interrupt mci_intr_o (sbd_intr_o in certain configurations) is asserted when the LPI interrupt status is set. When the MAC exits the Rx LPI state, then in addition to the mci_intr_o (sbd_intr_o in certain configurations), the sideband signal lpi_intr_o is asserted. If you do not want to gate-off the application clock during the Rx LPI state, you can leave the lpi_intr_o signal unconnected and use the mci_intr_o (sbd_intr_o in certain configurations) signal to detect Rx LPI exit." Since the "macirq" is always raised when Tx or Rx enters/exits the LPI state, "eth_lpi" must therefore refer to lpi_intr_o, which is only raised when Rx exits the LPI state. Update the DT binding description to reflect reality. Signed-off-by: Niklas Cassel Acked-by: Alexandre TORGUE Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/stmmac.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca29fd7cce5a6444d57fb86517589a1a31c759e1 Author: Keefe Liu Date: Thu Nov 9 20:09:31 2017 +0800 ipvlan: fix ipv6 outbound device When process the outbound packet of ipv6, we should assign the master device to output device other than input device. Signed-off-by: Keefe Liu Acked-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d67a5075295982fb055be6a5d5c78b0e0be3591 Author: Aleksey Makarov Date: Thu Nov 9 14:58:57 2017 +0300 net: thunderx: fix double free error This patch fixes an error in memory allocation/freeing in ThunderX PF driver. I moved the allocation to the probe() function and made it managed. >From the Colin's email: While running static analysis on linux-next with CoverityScan I found 3 double free errors in the Cavium thunder driver. The issue occurs on the err_disable_device: label of function nic_probe when nic_free_lmacmem(nic) is called and a double free occurs on nic->duplex, nic->link and nic->speed. This occurs when nic_init_hw() fails: /* Initialize hardware */ err = nic_init_hw(nic); if (err) goto err_release_regions; nic_init_hw() calls nic_get_hw_info() and this calls nic_free_lmacmem() if any of the allocations fail. This free'ing occurs again by the call to nic_free_lmacmem() on the err_release_regions exit path in nic_probe(). Reported-by: Colin Ian King Signed-off-by: Aleksey Makarov Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic_main.c | 82 ++++++++++---------------- 1 file changed, 30 insertions(+), 52 deletions(-) commit 86dabda426ac33f4782854ef71f0c9adafd24134 Author: Mika Westerberg Date: Thu Nov 9 13:46:28 2017 +0300 net: thunderbolt: Clear finished Tx frame bus address in tbnet_tx_callback() When Thunderbolt network interface is disabled or when the cable is unplugged the driver releases all allocated buffers by calling tbnet_free_buffers() for each ring. This function then calls dma_unmap_page() for each buffer it finds where bus address is non-zero. Now, we only clear this bus address when the Tx buffer is sent to the hardware so it is possible that the function finds an entry that has already been unmapped. Enabling DMA-API debugging catches this as well: thunderbolt 0000:06:00.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x0000000068321000] [size=4096 bytes] Fix this by clearing the bus address of a Tx frame right after we have unmapped the buffer. Signed-off-by: Mika Westerberg Signed-off-by: David S. Miller drivers/net/thunderbolt.c | 1 + 1 file changed, 1 insertion(+) commit 5290ada4a2e6a9dec00e849a49af8f7bf7462449 Author: Tonghao Zhang Date: Thu Nov 9 00:03:15 2017 -0800 sock: Remove the global prot_inuse counter. The per-cpu counter for init_net is prepared in core_initcall. The patch 7d720c3e ("percpu: add __percpu sparse annotations to net") and d6d9ca0fe ("net: this_cpu_xxx conversions") optimize the routines. Then remove the old counter. Cc: Pavel Emelyanov Signed-off-by: Tonghao Zhang Signed-off-by: David S. Miller net/core/sock.c | 22 ---------------------- 1 file changed, 22 deletions(-) commit 492d070f2495d4b200124ed44a35ab3d8f74ac93 Author: Colin Ian King Date: Thu Nov 9 08:01:22 2017 +0000 net: sfc: remove redundant variable start Variable start is assigned but never read hence it is redundant and can be removed. Cleans up clang warning: drivers/net/ethernet/sfc/ptp.c:655:2: warning: Value stored to 'start' is never read Signed-off-by: Colin Ian King Acked-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ptp.c | 2 -- 1 file changed, 2 deletions(-) commit 98b07e3ed019cbea5ad049df3892957d5fa90b9e Author: Colin Ian King Date: Thu Nov 9 07:52:15 2017 +0000 qlge: remove duplicated assignment to mbcp The assignment to mbcp is identical to the initiatialized value assigned to mbcp at declaration time a few lines earlier, hence we can remove the second redundant assignment. Cleans up clang warning: drivers/net/ethernet/qlogic/qlge/qlge_mpi.c:209:22: warning: Value stored to 'mbcp' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlge/qlge_mpi.c | 1 - 1 file changed, 1 deletion(-) commit a3e2ecbae0198e4cb9a63db5ac3131cbd58ec2b2 Author: Gustavo A. R. Silva Date: Wed Nov 8 22:25:08 2017 -0600 net: wan: x25_asy: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114928 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/wan/x25_asy.c | 1 + 1 file changed, 1 insertion(+) commit 0aa3b413f68dfe4c883c8164d152a1a03ce789bf Author: Gustavo A. R. Silva Date: Wed Nov 8 21:49:33 2017 -0600 net: 3com: 3c574_cs: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114888 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/ethernet/3com/3c574_cs.c | 1 + 1 file changed, 1 insertion(+) commit 75d28f461ed700fe527312cc0a8b5de86d1c09c1 Author: Gustavo A. R. Silva Date: Wed Nov 8 21:44:38 2017 -0600 net: 8390: pcnet_cs: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114891 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/ethernet/8390/pcnet_cs.c | 1 + 1 file changed, 1 insertion(+) commit 2d919149686e2da001e58e8a2ed49a0200c9db78 Author: Gustavo A. R. Silva Date: Wed Nov 8 21:38:28 2017 -0600 net: decnet: dn_table: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115106 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/decnet/dn_table.c | 1 + 1 file changed, 1 insertion(+) commit 765924e362d12f87786060b98a49abd91e11ea96 Author: Guillaume Nault Date: Thu Nov 9 08:29:52 2017 +0900 l2tp: don't close sessions in l2tp_tunnel_destruct() Sessions are already removed by the proto ->destroy() handlers, and since commit f3c66d4e144a ("l2tp: prevent creation of sessions on terminated tunnels"), we're guaranteed that no new session can be created afterwards. Furthermore, l2tp_tunnel_closeall() can sleep when there are sessions left to close. So we really shouldn't call it in a ->sk_destruct() handler, as it can be used from atomic context. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 2 -- 1 file changed, 2 deletions(-) commit f31f54db94f086d69fa457f6e0d40783469a7512 Merge: e4ec138 737ff31 Author: David S. Miller Date: Sat Nov 11 18:53:17 2017 +0900 Merge branch 'FACK-loss-recovery-remove' Yuchung Cheng says: ==================== remove FACK loss recovery This patch set removes the forward-acknowledgment (FACK) packet-based loss and reordering detection. This simplifies TCP loss recovery since the SACK scoreboard no longer needs to track the number of pending packets under highest SACKed sequence. FACK is subsumed by the time-based RACK loss detection which is more robust under reordering and second order losses. ==================== Signed-off-by: David S. Miller commit 737ff314563ca27f044f9a3a041e9d42491ef7ce Author: Yuchung Cheng Date: Wed Nov 8 13:01:27 2017 -0800 tcp: use sequence distance to detect reordering Replace the reordering distance measurement in packet unit with sequence based approach. Previously it trackes the number of "packets" toward the forward ACK (i.e. highest sacked sequence)in a state variable "fackets_out". Precisely measuring reordering degree on packet distance has not much benefit, as the degree constantly changes by factors like path, load, and congestion window. It is also complicated and prone to arcane bugs. This patch replaces with sequence-based approach that's much simpler. Signed-off-by: Yuchung Cheng Reviewed-by: Eric Dumazet Reviewed-by: Neal Cardwell Reviewed-by: Soheil Hassas Yeganeh Reviewed-by: Priyaranjan Jha Signed-off-by: David S. Miller include/linux/tcp.h | 1 - net/ipv4/tcp.c | 1 - net/ipv4/tcp_input.c | 155 +++++++++++++++++++++-------------------------- net/ipv4/tcp_minisocks.c | 1 - net/ipv4/tcp_output.c | 17 ------ 5 files changed, 68 insertions(+), 107 deletions(-) commit 713bafea92920103cd3d361657406cf04d0e22dd Author: Yuchung Cheng Date: Wed Nov 8 13:01:26 2017 -0800 tcp: retire FACK loss detection FACK loss detection has been disabled by default and the successor RACK subsumed FACK and can handle reordering better. This patch removes FACK to simplify TCP loss recovery. Signed-off-by: Yuchung Cheng Reviewed-by: Eric Dumazet Reviewed-by: Neal Cardwell Reviewed-by: Soheil Hassas Yeganeh Reviewed-by: Priyaranjan Jha Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 3 +- include/linux/tcp.h | 1 - include/net/tcp.h | 14 +-------- include/uapi/linux/snmp.h | 1 - net/ipv4/proc.c | 1 - net/ipv4/tcp.c | 2 -- net/ipv4/tcp_input.c | 53 +++++----------------------------- net/ipv4/tcp_metrics.c | 4 +-- net/ipv4/tcp_minisocks.c | 5 +--- net/ipv4/tcp_output.c | 5 +--- 10 files changed, 12 insertions(+), 77 deletions(-) commit e4ec1384132ead18e972f1180e958aa0b69abd11 Author: Gustavo A. R. Silva Date: Wed Nov 8 11:57:13 2017 -0600 fsl/fman_port: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1397960 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman_port.c | 2 ++ 1 file changed, 2 insertions(+) commit d9b9c0e027c93160c94dae07b6d29acc5cdd6d54 Author: Gustavo A. R. Silva Date: Wed Nov 8 11:24:57 2017 -0600 net: ethernet: bgmac: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1397972 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac-platform.c | 1 + 1 file changed, 1 insertion(+) commit 37798d0211315d60d92452eb54b22af199cce11d Author: Nathan Fontenot Date: Wed Nov 8 11:23:56 2017 -0600 ibmvnic: Add vnic client data to login buffer Update the login buffer to include client data for the vnic driver, this includes the OS name, LPAR name, and device name. This update allows this information to be available in the VIOS. Signed-off-by: Nathan Fontenot Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 68 ++++++++++++++++++++++++++++++++++++-- drivers/net/ethernet/ibm/ibmvnic.h | 2 ++ 2 files changed, 68 insertions(+), 2 deletions(-) commit f3edacbd697f94a743fff1a3d26910ab99948ba7 Author: David S. Miller Date: Sat Nov 11 18:24:55 2017 +0900 bpf: Revert bpf_overrid_function() helper changes. NACK'd by x86 maintainer. Signed-off-by: David S. Miller arch/Kconfig | 3 --- arch/x86/Kconfig | 1 - arch/x86/include/asm/kprobes.h | 4 ---- arch/x86/include/asm/ptrace.h | 5 ---- arch/x86/kernel/kprobes/ftrace.c | 14 ----------- include/linux/filter.h | 3 +-- include/linux/trace_events.h | 1 - include/uapi/linux/bpf.h | 7 +----- kernel/bpf/core.c | 3 --- kernel/bpf/verifier.c | 2 -- kernel/events/core.c | 7 ------ kernel/trace/Kconfig | 11 --------- kernel/trace/bpf_trace.c | 35 --------------------------- kernel/trace/trace_kprobe.c | 40 ++++++------------------------- kernel/trace/trace_probe.h | 6 ----- samples/bpf/Makefile | 4 ---- samples/bpf/test_override_return.sh | 15 ------------ samples/bpf/tracex7_kern.c | 16 ------------- samples/bpf/tracex7_user.c | 28 ---------------------- tools/include/uapi/linux/bpf.h | 7 +----- tools/testing/selftests/bpf/bpf_helpers.h | 3 +-- 21 files changed, 11 insertions(+), 204 deletions(-) commit bee955cd3ab4f1a1eb8fc16e7ed69364143df8d7 Merge: 8d6e79d 03e982e Author: David S. Miller Date: Sat Nov 11 15:52:41 2017 +0900 Merge branch 'bpf-Fix-bugs-in-sock_ops-samples' Lawrence Brakmo says: ==================== bpf: Fix bugs in sock_ops samples The programs were returning -1 in some cases when they should only return 0 or 1. Changes in the verifier now catch this issue and the programs fail to load. This is now fixed. ==================== Signed-off-by: David S. Miller commit 03e982eed419da37e9cac1d759097dbe10447190 Author: Lawrence Brakmo Date: Fri Nov 10 22:19:55 2017 -0800 bpf: Fix tcp_clamp_kern.c sample program The program was returning -1 in some cases which is not allowed by the verifier any longer. Fixes: 390ee7e29fc8 ("bpf: enforce return code for cgroup-bpf programs") Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller samples/bpf/tcp_clamp_kern.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit e1853319fc4c7279a3561b1844af4a02487c93ef Author: Lawrence Brakmo Date: Fri Nov 10 22:19:54 2017 -0800 bpf: Fix tcp_iw_kern.c sample program The program was returning -1 in some cases which is not allowed by the verifier any longer. Fixes: 390ee7e29fc8 ("bpf: enforce return code for cgroup-bpf programs") Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller samples/bpf/tcp_iw_kern.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 2ff969fbe2bfa4486b66226917352d4bb12ec1cb Author: Lawrence Brakmo Date: Fri Nov 10 22:19:53 2017 -0800 bpf: Fix tcp_cong_kern.c sample program The program was returning -1 in some cases which is not allowed by the verifier any longer. Fixes: 390ee7e29fc8 ("bpf: enforce return code for cgroup-bpf programs") Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller samples/bpf/tcp_cong_kern.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a4174f0560f849317239478b1b22afbf03a6eda2 Author: Lawrence Brakmo Date: Fri Nov 10 22:19:52 2017 -0800 bpf: Fix tcp_bufs_kern.c sample program The program was returning -1 in some cases which is not allowed by the verifier any longer. Fixes: 390ee7e29fc8 ("bpf: enforce return code for cgroup-bpf programs") Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller samples/bpf/tcp_bufs_kern.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 016e661bb0610a98b1c9ac1250e3269236fabe19 Author: Lawrence Brakmo Date: Fri Nov 10 22:19:51 2017 -0800 bpf: Fix tcp_rwnd_kern.c sample program The program was returning -1 in some cases which is not allowed by the verifier any longer. Fixes: 390ee7e29fc8 ("bpf: enforce return code for cgroup-bpf programs") Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller samples/bpf/tcp_rwnd_kern.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7863f46bac3a1716f7d547c53f367ddf509f031e Author: Lawrence Brakmo Date: Fri Nov 10 22:19:50 2017 -0800 bpf: Fix tcp_synrto_kern.c sample program The program was returning -1 in some cases which is not allowed by the verifier any longer. Fixes: 390ee7e29fc8 ("bpf: enforce return code for cgroup-bpf programs") Signed-off-by: Lawrence Brakmo Signed-off-by: David S. Miller samples/bpf/tcp_synrto_kern.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8d6e79d3ce13e34957de87f7584cbf1bcde74c57 Author: Jon Maloy Date: Wed Nov 8 09:59:26 2017 +0100 tipc: improve link resiliency when rps is activated Currently, the TIPC RPS dissector is based only on the incoming packets' source node address, hence steering all traffic from a node to the same core. We have seen that this makes the links vulnerable to starvation and unnecessary resets when we turn down the link tolerance to very low values. To reduce the risk of this happening, we exempt probe and probe replies packets from the convergence to one core per source node. Instead, we do the opposite, - we try to diverge those packets across as many cores as possible, by randomizing the flow selector key. To make such packets identifiable to the dissector, we add a new 'is_keepalive' bit to word 0 of the LINK_PROTOCOL header. This bit is set both for PROBE and PROBE_REPLY messages, and only for those. It should be noted that these packets are not part of any flow anyway, and only constitute a minuscule fraction of all packets sent across a link. Hence, there is no risk that this will affect overall performance. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller include/net/flow_dissector.h | 12 ++++----- include/net/tipc.h | 62 ++++++++++++++++++++++++++++++++++++++++++++ net/core/flow_dissector.c | 30 ++++++++++----------- net/tipc/link.c | 26 +++++++++++-------- net/tipc/msg.h | 10 +++++++ 5 files changed, 108 insertions(+), 32 deletions(-) commit 141f575f76db5a973b119146844de357b88ad36d Merge: e5c500e 66ee6a0 Author: David S. Miller Date: Sat Nov 11 15:27:45 2017 +0900 Merge branch 'macb-next' Michael Grzeschik says: ==================== net: macb: add error handling on probe and This series adds more error handling to the macb driver. ==================== Signed-off-by: David S. Miller commit 66ee6a06e620740b706b8dbde161492f6a405b26 Author: Michael Grzeschik Date: Wed Nov 8 09:56:35 2017 +0100 net: macb: add of_node_put to error paths We add the call of_node_put(bp->phy_node) to all associated error paths for memory clean up. Signed-off-by: Michael Grzeschik Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 9ce981401cce7852542cab267702b6e89f37a4b8 Author: Michael Grzeschik Date: Wed Nov 8 09:56:34 2017 +0100 net: macb: add of_phy_deregister_fixed_link to error paths We add the call of_phy_deregister_fixed_link to all associated error paths for memory clean up. Signed-off-by: Michael Grzeschik Acked-by: Nicolas Ferre Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb_main.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e5c500eb298a9f5ef9b80d16fcea9662c89467b7 Author: Miquel Raynal Date: Wed Nov 8 08:59:40 2017 +0100 net: mvpp2: fix GOP statistics loop start and stop conditions GOP statistics from all ports of one instance of the driver are gathered with one work recalled in loop in a workqueue. The loop is started when a port is up, and stopped when a port is down. This last condition is obviously wrong. Fix this by having a work per port. This way, starting and stoping it when the port is up or down will be fine, while minimizing unnecessary CPU usage. Fixes: 118d6298f6f0 ("net: mvpp2: add ethtool GOP statistics") Reported-by: Stefan Chulski Signed-off-by: Miquel Raynal Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 62 +++++++++++++++++------------------- 1 file changed, 30 insertions(+), 32 deletions(-) commit fc98135928912f85e27ee41cafebf0a6cf326d0e Merge: 28033ae c040366 Author: David S. Miller Date: Sat Nov 11 15:17:56 2017 +0900 Merge branch 'hns3-bug-fixes' Lipeng says: ==================== net: hns3: Bug fixes & Code improvements in HNS3 driver This patch-set introduces some bug fixes and code improvements. As [patch 1/2] depends on the patch {5392902 net: hns3: Consistently using GENMASK in hns3 driver}, which exists in net-next, not exists in net, so push this serise to nex-next. ==================== Signed-off-by: David S. Miller commit c040366bc4a58f719e61111dea4b550b71b2a0b4 Author: Fuyun Liang Date: Wed Nov 8 15:52:23 2017 +0800 net: hns3: cleanup mac auto-negotiation state query in hclge_update_speed_duplex When checking whether auto-negotiation is on, driver only needs to check the value of mac.autoneg(SW) directly, and does not need to query it from hardware. Because this value is always synchronized with the auto-negotiation state of hardware. This patch removes mac auto-negotiation state query in hclge_update_speed_duplex(). Fixes: 46a3df9f9718 (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support) Signed-off-by: Fuyun Liang Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 39e2151f1012eb4163b3a9f414c27d92798e4cbe Author: Fuyun Liang Date: Wed Nov 8 15:52:22 2017 +0800 net: hns3: fix a bug when getting phy address from NCL_config file Driver gets phy address from NCL_config file and uses the phy address to initialize phydev. There are 5 bits for phy address. And C22 phy address has 5 bits. So 0-31 are all valid address for phy. If there is no phy, it will crash. Because driver always get a valid phy address. This patch fixes the phy address to 8 bits, and use 0xff to indicate invalid phy address. Fixes: 46a3df9f9718 (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support) Signed-off-by: Fuyun Liang Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28033ae4e0f59782b3f3357d9c28852a7e84a894 Author: David Ahern Date: Tue Nov 7 21:59:40 2017 -0800 net: netlink: Update attr validation to require exact length for some types Attributes using NLA_U* and NLA_S* (where * is 8, 16,32 and 64) are expected to be an exact length. Split these data types from nla_attr_minlen into nla_attr_len and update validate_nla to require the attribute to have exact length for them. Signed-off-by: David Ahern Signed-off-by: David S. Miller lib/nlattr.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 2210d6b2f287d738eddf6b75f432126ce05450f8 Author: Maciej Żenczykowski Date: Tue Nov 7 21:52:09 2017 -0800 net: ipv6: sysctl to specify IPv6 ND traffic class Add a per-device sysctl to specify the default traffic class to use for kernel originated IPv6 Neighbour Discovery packets. Currently this includes: - Router Solicitation (ICMPv6 type 133) ndisc_send_rs() -> ndisc_send_skb() -> ip6_nd_hdr() - Neighbour Solicitation (ICMPv6 type 135) ndisc_send_ns() -> ndisc_send_skb() -> ip6_nd_hdr() - Neighbour Advertisement (ICMPv6 type 136) ndisc_send_na() -> ndisc_send_skb() -> ip6_nd_hdr() - Redirect (ICMPv6 type 137) ndisc_send_redirect() -> ndisc_send_skb() -> ip6_nd_hdr() and if the kernel ever gets around to generating RA's, it would presumably also include: - Router Advertisement (ICMPv6 type 134) (radvd daemon could pick up on the kernel setting and use it) Interface drivers may examine the Traffic Class value and translate the DiffServ Code Point into a link-layer appropriate traffic prioritization scheme. An example of mapping IETF DSCP values to IEEE 802.11 User Priority values can be found here: https://tools.ietf.org/html/draft-ietf-tsvwg-ieee-802-11 The expected primary use case is to properly prioritize ND over wifi. Testing: jzem22:~# cat /proc/sys/net/ipv6/conf/eth0/ndisc_tclass 0 jzem22:~# echo -1 > /proc/sys/net/ipv6/conf/eth0/ndisc_tclass -bash: echo: write error: Invalid argument jzem22:~# echo 256 > /proc/sys/net/ipv6/conf/eth0/ndisc_tclass -bash: echo: write error: Invalid argument jzem22:~# echo 0 > /proc/sys/net/ipv6/conf/eth0/ndisc_tclass jzem22:~# echo 255 > /proc/sys/net/ipv6/conf/eth0/ndisc_tclass jzem22:~# cat /proc/sys/net/ipv6/conf/eth0/ndisc_tclass 255 jzem22:~# echo 34 > /proc/sys/net/ipv6/conf/eth0/ndisc_tclass jzem22:~# cat /proc/sys/net/ipv6/conf/eth0/ndisc_tclass 34 jzem22:~# echo $[0xDC] > /proc/sys/net/ipv6/conf/eth0/ndisc_tclass jzem22:~# tcpdump -v -i eth0 icmp6 and src host jzem22.pgc and dst host fe80::1 tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes IP6 (class 0xdc, hlim 255, next-header ICMPv6 (58) payload length: 24) jzem22.pgc > fe80::1: [icmp6 sum ok] ICMP6, neighbor advertisement, length 24, tgt is jzem22.pgc, Flags [solicited] (based on original change written by Erik Kline, with minor changes) v2: fix 'suspicious rcu_dereference_check() usage' by explicitly grabbing the rcu_read_lock. Cc: Lorenzo Colitti Signed-off-by: Erik Kline Signed-off-by: Maciej Żenczykowski Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 9 +++++++++ include/linux/ipv6.h | 1 + include/uapi/linux/ipv6.h | 1 + net/ipv6/addrconf.c | 11 +++++++++++ net/ipv6/ndisc.c | 9 ++++++++- 5 files changed, 30 insertions(+), 1 deletion(-) commit 04bad8bda9e25afe676a6f4452f3b304c1fdea16 Author: Samuel Mendoza-Jonas Date: Wed Nov 8 16:30:45 2017 +1100 net/ncsi: Don't return error on normal response Several response handlers return EBUSY if the data corresponding to the command/response pair is already set. There is no reason to return an error here; the channel is advertising something as enabled because we told it to enable it, and it's possible that the feature has been enabled previously. Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller net/ncsi/ncsi-rsp.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit 9ef8690be13d8ae3130749fbcc0cc21e4e3f738c Author: Samuel Mendoza-Jonas Date: Wed Nov 8 16:30:44 2017 +1100 net/ncsi: Improve general state logging The NCSI driver is mostly silent which becomes a headache when trying to determine what has occurred on the NCSI connection. This adds additional logging in a few key areas such as state transitions and calling out certain errors more visibly. Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller net/ncsi/ncsi-aen.c | 15 +++++++++- net/ncsi/ncsi-manage.c | 76 +++++++++++++++++++++++++++++++++++++------------- net/ncsi/ncsi-rsp.c | 10 ++++++- 3 files changed, 80 insertions(+), 21 deletions(-) commit ff821d271415f17f1a704600420e92ebb9bfb32c Author: Jens Axboe Date: Fri Nov 10 22:05:12 2017 -0700 blk-mq: fixup some comment typos and lengths Various typos and/or spelling errors in comments. Fixes a few > 80 char lines as well. Signed-off-by: Jens Axboe block/blk-mq.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit a8a6f1e4ea78c5d32a6c34c52877f7eb53ef054c Merge: 329fca6 c541b73 Author: David S. Miller Date: Sat Nov 11 12:35:49 2017 +0900 Merge branch 'bpftool-show-filenames-of-pinned-objects' Prashant Bhole says: ==================== tools: bpftool: show filenames of pinned objects This patchset adds support to show pinned objects in object details. Patch1 adds a funtionality to open a path in bpf-fs regardless of its object type. Patch2 adds actual functionality by scanning the bpf-fs once and adding object information in hash table, with object id as a key. One object may be associated with multiple paths because an object can be pinned multiple times Patch3 adds command line option to enable this functionality. Making it optional because scanning bpf-fs can be costly. ==================== Acked-by: Jakub Kicinski commit c541b73466549c4aa4ee20ccd04ba52e4c95d6eb Author: Prashant Bhole Date: Wed Nov 8 13:55:49 2017 +0900 tools: bpftool: optionally show filenames of pinned objects Making it optional to show file names of pinned objects because it scans complete bpf-fs filesystem which is costly. Added option -f|--bpffs. Documentation updated. Signed-off-by: Prashant Bhole Signed-off-by: David S. Miller tools/bpf/bpftool/Documentation/bpftool-map.rst | 5 ++++- tools/bpf/bpftool/Documentation/bpftool-prog.rst | 5 ++++- tools/bpf/bpftool/main.c | 14 +++++++++++--- tools/bpf/bpftool/main.h | 3 ++- tools/bpf/bpftool/map.c | 3 ++- tools/bpf/bpftool/prog.c | 3 ++- 6 files changed, 25 insertions(+), 8 deletions(-) commit 4990f1f4610b483a60397ed2768d268df228a551 Author: Prashant Bhole Date: Wed Nov 8 13:55:48 2017 +0900 tools: bpftool: show filenames of pinned objects Added support to show filenames of pinned objects. For example: root@test# ./bpftool prog 3: tracepoint name tracepoint__irq tag f677a7dd722299a3 loaded_at Oct 26/11:39 uid 0 xlated 160B not jited memlock 4096B map_ids 4 pinned /sys/fs/bpf/softirq_prog 4: tracepoint name tracepoint__irq tag ea5dc530d00b92b6 loaded_at Oct 26/11:39 uid 0 xlated 392B not jited memlock 4096B map_ids 4,6 root@test# ./bpftool --json --pretty prog [{ "id": 3, "type": "tracepoint", "name": "tracepoint__irq", "tag": "f677a7dd722299a3", "loaded_at": "Oct 26/11:39", "uid": 0, "bytes_xlated": 160, "jited": false, "bytes_memlock": 4096, "map_ids": [4 ], "pinned": ["/sys/fs/bpf/softirq_prog" ] },{ "id": 4, "type": "tracepoint", "name": "tracepoint__irq", "tag": "ea5dc530d00b92b6", "loaded_at": "Oct 26/11:39", "uid": 0, "bytes_xlated": 392, "jited": false, "bytes_memlock": 4096, "map_ids": [4,6 ], "pinned": [] } ] root@test# ./bpftool map 4: hash name start flags 0x0 key 4B value 16B max_entries 10240 memlock 1003520B pinned /sys/fs/bpf/softirq_map1 5: hash name iptr flags 0x0 key 4B value 8B max_entries 10240 memlock 921600B root@test# ./bpftool --json --pretty map [{ "id": 4, "type": "hash", "name": "start", "flags": 0, "bytes_key": 4, "bytes_value": 16, "max_entries": 10240, "bytes_memlock": 1003520, "pinned": ["/sys/fs/bpf/softirq_map1" ] },{ "id": 5, "type": "hash", "name": "iptr", "flags": 0, "bytes_key": 4, "bytes_value": 8, "max_entries": 10240, "bytes_memlock": 921600, "pinned": [] } ] Signed-off-by: Prashant Bhole Signed-off-by: David S. Miller tools/bpf/bpftool/common.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++ tools/bpf/bpftool/main.c | 8 +++++ tools/bpf/bpftool/main.h | 17 ++++++++++ tools/bpf/bpftool/map.c | 21 ++++++++++++ tools/bpf/bpftool/prog.c | 24 ++++++++++++++ 5 files changed, 152 insertions(+) commit 1852719658c0f853b5481c9eaed862f1a9355edc Author: Prashant Bhole Date: Wed Nov 8 13:55:47 2017 +0900 tools: bpftool: open pinned object without type check This was needed for opening any file in bpf-fs without knowing its object type Signed-off-by: Prashant Bhole Signed-off-by: David S. Miller tools/bpf/bpftool/common.c | 15 +++++++++++++-- tools/bpf/bpftool/main.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) commit 329fca60a95981ea7e22ab69243f0a59c6ca2eca Merge: 5498512 eafb340 Author: David S. Miller Date: Sat Nov 11 12:18:06 2017 +0900 Merge branch 'BPF-directed-error-injection' Josef Bacik says: ==================== Add the ability to do BPF directed error injection I'm sending this through Dave since it'll conflict with other BPF changes in his tree, but since it touches tracing as well Dave would like a review from somebody on the tracing side. v4->v5: - disallow kprobe_override programs from being put in the prog map array so we don't tail call into something we didn't check. This allows us to make the normal path still fast without a bunch of percpu operations. v3->v4: - fix a build error found by kbuild test bot (I didn't wait long enough apparently.) - Added a warning message as per Daniels suggestion. v2->v3: - added a ->kprobe_override flag to bpf_prog. - added some sanity checks to disallow attaching bpf progs that have ->kprobe_override set that aren't for ftrace kprobes. - added the trace_kprobe_ftrace helper to check if the trace_event_call is a ftrace kprobe. - renamed bpf_kprobe_state to bpf_kprobe_override, fixed it so we only read this value in the kprobe path, and thus only write to it if we're overriding or clearing the override. v1->v2: - moved things around to make sure that bpf_override_return could really only be used for an ftrace kprobe. - killed the special return values from trace_call_bpf. - renamed pc_modified to bpf_kprobe_state so bpf_override_return could tell if it was being called from an ftrace kprobe context. - reworked the logic in kprobe_perf_func to take advantage of bpf_kprobe_state. - updated the test as per Alexei's review. - Original message - A lot of our error paths are not well tested because we have no good way of injecting errors generically. Some subystems (block, memory) have ways to inject errors, but they are random so it's hard to get reproduceable results. With BPF we can add determinism to our error injection. We can use kprobes and other things to verify we are injecting errors at the exact case we are trying to test. This patch gives us the tool to actual do the error injection part. It is very simple, we just set the return value of the pt_regs we're given to whatever we provide, and then override the PC with a dummy function that simply returns. Right now this only works on x86, but it would be simple enough to expand to other architectures. Thanks, ==================== Signed-off-by: David S. Miller commit eafb3401faf243f7dca0e23325242cb8c2269ee9 Author: Josef Bacik Date: Tue Nov 7 15:28:43 2017 -0500 samples/bpf: add a test for bpf_override_return This adds a basic test for bpf_override_return to verify it works. We override the main function for mounting a btrfs fs so it'll return -ENOMEM and then make sure that trying to mount a btrfs fs will fail. Acked-by: Alexei Starovoitov Signed-off-by: Josef Bacik Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/Makefile | 4 ++++ samples/bpf/test_override_return.sh | 15 +++++++++++++++ samples/bpf/tracex7_kern.c | 16 ++++++++++++++++ samples/bpf/tracex7_user.c | 28 ++++++++++++++++++++++++++++ tools/include/uapi/linux/bpf.h | 7 ++++++- tools/testing/selftests/bpf/bpf_helpers.h | 3 ++- 6 files changed, 71 insertions(+), 2 deletions(-) commit dd0bb688eaa241b5655d396d45366cba9225aed9 Author: Josef Bacik Date: Tue Nov 7 15:28:42 2017 -0500 bpf: add a bpf_override_function helper Error injection is sloppy and very ad-hoc. BPF could fill this niche perfectly with it's kprobe functionality. We could make sure errors are only triggered in specific call chains that we care about with very specific situations. Accomplish this with the bpf_override_funciton helper. This will modify the probe'd callers return value to the specified value and set the PC to an override function that simply returns, bypassing the originally probed function. This gives us a nice clean way to implement systematic error injection for all of our code paths. Acked-by: Alexei Starovoitov Signed-off-by: Josef Bacik Acked-by: Daniel Borkmann Signed-off-by: David S. Miller arch/Kconfig | 3 +++ arch/x86/Kconfig | 1 + arch/x86/include/asm/kprobes.h | 4 ++++ arch/x86/include/asm/ptrace.h | 5 +++++ arch/x86/kernel/kprobes/ftrace.c | 14 ++++++++++++++ include/linux/filter.h | 3 ++- include/linux/trace_events.h | 1 + include/uapi/linux/bpf.h | 7 ++++++- kernel/bpf/core.c | 3 +++ kernel/bpf/verifier.c | 2 ++ kernel/events/core.c | 7 +++++++ kernel/trace/Kconfig | 11 +++++++++++ kernel/trace/bpf_trace.c | 35 +++++++++++++++++++++++++++++++++++ kernel/trace/trace_kprobe.c | 40 +++++++++++++++++++++++++++++++++------- kernel/trace/trace_probe.h | 6 ++++++ 15 files changed, 133 insertions(+), 9 deletions(-) commit 8dc7a31fbce5e2dbbacd83d910da37105181b054 Author: Hongxu Jia Date: Fri Nov 10 15:59:17 2017 +0800 ide: ide-atapi: fix compile error with defining macro DEBUG Compile ide-atapi failed with defining macro "DEBUG" ... |drivers/ide/ide-atapi.c:285:52: error: 'struct request' has no member named 'cmd'; did you mean 'csd'? | debug_log("%s: rq->cmd[0]: 0x%x\n", __func__, rq->cmd[0]); ... Since we split the scsi_request out of struct request, it missed do the same thing on debug_log Fixes: 82ed4db499b8 ("block: split scsi_request out of struct request") Signed-off-by: Hongxu Jia Signed-off-by: Jens Axboe drivers/ide/ide-atapi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f906a6a0f42684715b552ccff9282b22cfe2b5a2 Author: Jens Axboe Date: Thu Nov 9 16:10:13 2017 -0700 blk-mq: improve tag waiting setup for non-shared tags If we run out of driver tags, we currently treat shared and non-shared tags the same - both cases hook into the tag waitqueue. This is a bit more costly than it needs to be on unshared tags, since we have to both grab the hctx lock, and the waitqueue lock (and disable interrupts). For the non-shared case, we can simply mark the queue as needing a restart. Split blk_mq_dispatch_wait_add() to account for both cases, and rename it to blk_mq_mark_tag_wait() to better reflect what it does now. Without this patch, shared and non-shared performance is about the same with 4 fio thread hammering on a single null_blk device (~410K, at 75% sys). With the patch, the shared case is the same, but the non-shared tags case runs at 431K at 71% sys. Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq.c | 81 +++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 55 insertions(+), 26 deletions(-) commit 15f7b41f70ddcca3b555bd0fdc7c8da7466b517e Author: Mikulas Patocka Date: Fri Nov 10 12:29:34 2017 -0500 brd: remove unused brd_mutex Remove unused mutex brd_mutex. It is unused since the commit ff26956875c2 ("brd: remove support for BLKFLSBUF"). Signed-off-by: Mikulas Patocka Signed-off-by: Jens Axboe drivers/block/brd.c | 1 - 1 file changed, 1 deletion(-) commit 79f720a751cad613620d0237e3b44f89f4a69181 Author: Jens Axboe Date: Fri Nov 10 09:13:21 2017 -0700 blk-mq: only run the hardware queue if IO is pending Currently we are inconsistent in when we decide to run the queue. Using blk_mq_run_hw_queues() we check if the hctx has pending IO before running it, but we don't do that from the individual queue run function, blk_mq_run_hw_queue(). This results in a lot of extra and pointless queue runs, potentially, on flush requests and (much worse) on tag starvation situations. This is observable just looking at top output, with lots of kworkers active. For the !async runs, it just adds to the CPU overhead of blk-mq. Move the has-pending check into the run function instead of having callers do it. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq-sched.c | 7 +------ block/blk-mq.c | 18 +++++++++++------- block/blk-mq.h | 2 -- include/linux/blk-mq.h | 2 +- 4 files changed, 13 insertions(+), 16 deletions(-) commit f0fba398fec65ff5a2e1bf8ae62718ec0450abaf Author: Colin Ian King Date: Mon Nov 6 17:53:53 2017 +0000 block: avoid null pointer dereference on null disk It is possible that the pointer disk can be null and hence we can get a null pointer deference when accessing disk->flags. Add a null pointer check to avoid the dereference. Detected by CoverityScan, CID#1461133 ("Explicit null dereferenced") Fixes: 8ddcd653257c ("block: introduce GENHD_FL_HIDDEN") Reviewed-by: Christoph Hellwig Signed-off-by: Colin Ian King Signed-off-by: Jens Axboe block/genhd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67f2519fe2903c4041c0e94394d14d372fe51399 Author: Greg Edwards Date: Tue Oct 24 11:21:48 2017 -0600 fs: guard_bio_eod() needs to consider partitions guard_bio_eod() needs to look at the partition capacity, not just the capacity of the whole device, when determining if truncation is necessary. [ 60.268688] attempt to access beyond end of device [ 60.268690] unknown-block(9,1): rw=0, want=67103509, limit=67103506 [ 60.268693] buffer_io_error: 2 callbacks suppressed [ 60.268696] Buffer I/O error on dev md1p7, logical block 4524305, async page read Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") Cc: stable@vger.kernel.org # v4.13 Reviewed-by: Christoph Hellwig Signed-off-by: Greg Edwards Signed-off-by: Jens Axboe fs/buffer.c | 10 +++++++++- include/linux/genhd.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) commit 0e78eccc552b6a9e9ce158aee72e95ae41e0e171 Author: Christoph Hellwig Date: Fri Nov 10 09:17:50 2017 +0100 xtensa/simdisk: fix compile error Fixes: d004a5e7d4dd ("block: remove __bio_kmap_atomic") Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe arch/xtensa/platforms/iss/simdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e496938b6aec67b7cfd06614164fee0fe9f13e3 Author: Hannes Reinecke Date: Fri Nov 10 10:58:23 2017 +0100 nvme: expose subsys attribute to sysfs We should be exposing the subsystem attributes like 'model' and 'subsysnqn' to sysfs to allow for easier identification of the subsystem. Signed-off-by: Hannes Reinecke Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit e9a48034d7d1318ece7d4a235838a86c94db9d68 Author: Hannes Reinecke Date: Thu Nov 9 17:57:06 2017 +0100 nvme: create 'slaves' and 'holders' entries for hidden controllers When creating nvme multipath devices we should populate the 'slaves' and 'holders' directorys properly to aid userspace topology detection. Signed-off-by: Hannes Reinecke [hch: split from a larger patch, compile fix for CONFIG_NVME_MULTIPATH=n] Reviewed-by: Keith Busch Reviewed-by: Martin K. Petersen Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 ++ drivers/nvme/host/multipath.c | 30 ++++++++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 8 ++++++++ 3 files changed, 40 insertions(+) commit 17eac0996341cfd28b4093554e662fd82aa1c237 Author: Hannes Reinecke Date: Thu Nov 9 17:57:06 2017 +0100 block: create 'slaves' and 'holders' entries for hidden gendisks When creating nvme multipath devices we should populate the 'slaves' and 'holders' directorys properly to aid userspace topology detection. Signed-off-by: Hannes Reinecke [hch: split from a larger patch] Reviewed-by: Keith Busch Reviewed-by: Martin K. Petersen Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/genhd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 5b85b826b8925b3f1910b6613eb82c4df240a5b5 Author: Christoph Hellwig Date: Thu Nov 9 13:51:03 2017 +0100 nvme: also expose the namespace identification sysfs files for mpath nodes We do this by adding a helper that returns the ns_head for a device that can belong to either the per-controller or per-subsystem block device nodes, and otherwise reuse all the existing code. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 57 +++++++++++++++++++++++-------------------- drivers/nvme/host/multipath.c | 6 +++++ drivers/nvme/host/nvme.h | 1 + 3 files changed, 38 insertions(+), 26 deletions(-) commit 32acab3181c7053c775ca128c3a5c6ce50197d7f Author: Christoph Hellwig Date: Thu Nov 2 12:59:30 2017 +0100 nvme: implement multipath access to nvme subsystems This patch adds native multipath support to the nvme driver. For each namespace we create only single block device node, which can be used to access that namespace through any of the controllers that refer to it. The gendisk for each controllers path to the name space still exists inside the kernel, but is hidden from userspace. The character device nodes are still available on a per-controller basis. A new link from the sysfs directory for the subsystem allows to find all controllers for a given subsystem. Currently we will always send I/O to the first available path, this will be changed once the NVMe Asynchronous Namespace Access (ANA) TP is ratified and implemented, at which point we will look at the ANA state for each namespace. Another possibility that was prototyped is to use the path that is closes to the submitting NUMA code, which will be mostly interesting for PCI, but might also be useful for RDMA or FC transports in the future. There is not plan to implement round robin or I/O service time path selectors, as those are not scalable with the performance rates provided by NVMe. The multipath device will go away once all paths to it disappear, any delay to keep it alive needs to be implemented at the controller level. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/nvme/host/Kconfig | 9 ++ drivers/nvme/host/Makefile | 1 + drivers/nvme/host/core.c | 147 +++++++++++++++++++++--- drivers/nvme/host/multipath.c | 255 ++++++++++++++++++++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 57 ++++++++++ 5 files changed, 455 insertions(+), 14 deletions(-) commit ed754e5deeb17f4e675c84e4b6c640cc7344e498 Author: Christoph Hellwig Date: Thu Nov 9 13:50:43 2017 +0100 nvme: track shared namespaces Introduce a new struct nvme_ns_head that holds information about an actual namespace, unlike struct nvme_ns, which only holds the per-controller namespace information. For private namespaces there is a 1:1 relation of the two, but for shared namespaces this lets us discover all the paths to it. For now only the identifiers are moved to the new structure, but most of the information in struct nvme_ns should eventually move over. To allow lockless path lookup the list of nvme_ns structures per nvme_ns_head is protected by SRCU, which requires freeing the nvme_ns structure through call_srcu. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Javier González Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 220 +++++++++++++++++++++++++++++++++++-------- drivers/nvme/host/lightnvm.c | 14 +-- drivers/nvme/host/nvme.h | 26 ++++- 3 files changed, 210 insertions(+), 50 deletions(-) commit 002fab040468f5b279f8d8d49d487e73b0c3f98a Author: Christoph Hellwig Date: Thu Nov 9 13:50:16 2017 +0100 nvme: introduce a nvme_ns_ids structure This allows us to manage the various uniqueue namespace identifiers together instead needing various variables and arguments. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 69 +++++++++++++++++++++++++++--------------------- drivers/nvme/host/nvme.h | 14 +++++++--- 2 files changed, 49 insertions(+), 34 deletions(-) commit ab9e00cc72fa4c6eb6370757b9e94c4645e91d5d Author: Christoph Hellwig Date: Thu Nov 9 13:48:55 2017 +0100 nvme: track subsystems This adds a new nvme_subsystem structure so that we can track multiple controllers that belong to a single subsystem. For now we only use it to store the NQN, and to check that we don't have duplicate NQNs unless the involved subsystems support multiple controllers. Includes code originally from Hannes Reinecke to expose the subsystems in sysfs. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 210 ++++++++++++++++++++++++++++++++++++++------ drivers/nvme/host/fabrics.c | 4 +- drivers/nvme/host/nvme.h | 27 ++++-- 3 files changed, 205 insertions(+), 36 deletions(-) commit 9a95e4ef709533efac4aafcb8bddf73f96db50ed Author: Bart Van Assche Date: Thu Nov 9 10:49:59 2017 -0800 block, nvme: Introduce blk_mq_req_flags_t Several block layer and NVMe core functions accept a combination of BLK_MQ_REQ_* flags through the 'flags' argument but there is no verification at compile time whether the right type of block layer flags is passed. Make it possible for sparse to verify this. This patch does not change any functionality. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Tested-by: Oleksandr Natalenko Cc: linux-nvme@lists.infradead.org Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Ming Lei Signed-off-by: Jens Axboe block/blk-core.c | 12 ++++++------ block/blk-mq.c | 4 ++-- block/blk-mq.h | 2 +- drivers/nvme/host/core.c | 5 +++-- drivers/nvme/host/nvme.h | 5 +++-- include/linux/blk-mq.h | 17 +++++++++++------ include/linux/blk_types.h | 2 ++ include/linux/blkdev.h | 4 ++-- 8 files changed, 30 insertions(+), 21 deletions(-) commit 3a0a529971ec4e2d933e9c7798db101dfb6b1aec Author: Bart Van Assche Date: Thu Nov 9 10:49:58 2017 -0800 block, scsi: Make SCSI quiesce and resume work reliably The contexts from which a SCSI device can be quiesced or resumed are: * Writing into /sys/class/scsi_device/*/device/state. * SCSI parallel (SPI) domain validation. * The SCSI device power management methods. See also scsi_bus_pm_ops. It is essential during suspend and resume that neither the filesystem state nor the filesystem metadata in RAM changes. This is why while the hibernation image is being written or restored that SCSI devices are quiesced. The SCSI core quiesces devices through scsi_device_quiesce() and scsi_device_resume(). In the SDEV_QUIESCE state execution of non-preempt requests is deferred. This is realized by returning BLKPREP_DEFER from inside scsi_prep_state_check() for quiesced SCSI devices. Avoid that a full queue prevents power management requests to be submitted by deferring allocation of non-preempt requests for devices in the quiesced state. This patch has been tested by running the following commands and by verifying that after each resume the fio job was still running: for ((i=0; i<10; i++)); do ( cd /sys/block/md0/md && while true; do [ "$( sync_action sleep 1 done ) & pids=($!) for d in /sys/class/block/sd*[a-z]; do bdev=${d#/sys/class/block/} hcil=$(readlink "$d/device") hcil=${hcil#../../../} echo 4 > "$d/queue/nr_requests" echo 1 > "/sys/class/scsi_device/$hcil/device/queue_depth" fio --name="$bdev" --filename="/dev/$bdev" --buffered=0 --bs=512 \ --rw=randread --ioengine=libaio --numjobs=4 --iodepth=16 \ --iodepth_batch=1 --thread --loops=$((2**31)) & pids+=($!) done sleep 1 echo "$(date) Hibernating ..." >>hibernate-test-log.txt systemctl hibernate sleep 10 kill "${pids[@]}" echo idle > /sys/block/md0/md/sync_action wait echo "$(date) Done." >>hibernate-test-log.txt done Reported-by: Oleksandr Natalenko References: "I/O hangs after resuming from suspend-to-ram" (https://marc.info/?l=linux-block&m=150340235201348). Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Tested-by: Martin Steigerwald Tested-by: Oleksandr Natalenko Cc: Martin K. Petersen Cc: Ming Lei Cc: Christoph Hellwig Cc: Johannes Thumshirn Signed-off-by: Jens Axboe block/blk-core.c | 42 ++++++++++++++++++++++++++++++++++-------- block/blk-mq.c | 4 ++-- drivers/scsi/scsi_lib.c | 42 ++++++++++++++++++++++++++++++------------ fs/block_dev.c | 4 ++-- include/linux/blkdev.h | 2 +- include/scsi/scsi_device.h | 1 + 6 files changed, 70 insertions(+), 25 deletions(-) commit c9254f2ddb19387ea9714a57ea48463c20333b92 Author: Bart Van Assche Date: Thu Nov 9 10:49:57 2017 -0800 block: Add the QUEUE_FLAG_PREEMPT_ONLY request queue flag This flag will be used in the next patch to let the block layer core know whether or not a SCSI request queue has been quiesced. A quiesced SCSI queue namely only processes RQF_PREEMPT requests. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Tested-by: Martin Steigerwald Tested-by: Oleksandr Natalenko Cc: Ming Lei Cc: Christoph Hellwig Cc: Johannes Thumshirn Signed-off-by: Jens Axboe block/blk-core.c | 30 ++++++++++++++++++++++++++++++ block/blk-mq-debugfs.c | 1 + include/linux/blkdev.h | 6 ++++++ 3 files changed, 37 insertions(+) commit 039c635f4e666b647df2100038de276a83fb3fca Author: Bart Van Assche Date: Thu Nov 9 10:49:56 2017 -0800 ide, scsi: Tell the block layer at request allocation time about preempt requests Convert blk_get_request(q, op, __GFP_RECLAIM) into blk_get_request_flags(q, op, BLK_MQ_PREEMPT). This patch does not change any functionality. Signed-off-by: Bart Van Assche Tested-by: Martin Steigerwald Acked-by: David S. Miller [ for IDE ] Acked-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Tested-by: Oleksandr Natalenko Cc: Ming Lei Cc: Christoph Hellwig Cc: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/ide/ide-pm.c | 4 ++-- drivers/scsi/scsi_lib.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 1b6d65a0bfb5df2a6029c1430e99fcc5d96bb59a Author: Bart Van Assche Date: Thu Nov 9 10:49:55 2017 -0800 block: Introduce BLK_MQ_REQ_PREEMPT Set RQF_PREEMPT if BLK_MQ_REQ_PREEMPT is passed to blk_get_request_flags(). Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Tested-by: Martin Steigerwald Tested-by: Oleksandr Natalenko Cc: Christoph Hellwig Cc: Ming Lei Cc: Johannes Thumshirn Signed-off-by: Jens Axboe block/blk-core.c | 4 +++- block/blk-mq.c | 2 ++ include/linux/blk-mq.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) commit 6a15674d1e90917f1723a814e2e8c949000440f7 Author: Bart Van Assche Date: Thu Nov 9 10:49:54 2017 -0800 block: Introduce blk_get_request_flags() A side effect of this patch is that the GFP mask that is passed to several allocation functions in the legacy block layer is changed from GFP_KERNEL into __GFP_DIRECT_RECLAIM. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Tested-by: Martin Steigerwald Tested-by: Oleksandr Natalenko Cc: Christoph Hellwig Cc: Ming Lei Cc: Johannes Thumshirn Signed-off-by: Jens Axboe block/blk-core.c | 50 +++++++++++++++++++++++++++++++++++--------------- include/linux/blkdev.h | 3 +++ 2 files changed, 38 insertions(+), 15 deletions(-) commit 055f6e18e08f5b7fd98171fce857a0bad87a919d Author: Ming Lei Date: Thu Nov 9 10:49:53 2017 -0800 block: Make q_usage_counter also track legacy requests This patch makes it possible to pause request allocation for the legacy block layer by calling blk_mq_freeze_queue() and blk_mq_unfreeze_queue(). Signed-off-by: Ming Lei [ bvanassche: Combined two patches into one, edited a comment and made sure REQ_NOWAIT is handled properly in blk_old_get_request() ] Signed-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Tested-by: Martin Steigerwald Tested-by: Oleksandr Natalenko Cc: Ming Lei Signed-off-by: Jens Axboe block/blk-core.c | 12 ++++++++++++ block/blk-mq.c | 10 ++-------- 2 files changed, 14 insertions(+), 8 deletions(-) commit eb619fdb2d4cb8b3d3419e9113921e87e7daf557 Author: Jens Axboe Date: Thu Nov 9 08:32:43 2017 -0700 blk-mq: fix issue with shared tag queue re-running This patch attempts to make the case of hctx re-running on driver tag failure more robust. Without this patch, it's pretty easy to trigger a stall condition with shared tags. An example is using null_blk like this: modprobe null_blk queue_mode=2 nr_devices=4 shared_tags=1 submit_queues=1 hw_queue_depth=1 which sets up 4 devices, sharing the same tag set with a depth of 1. Running a fio job ala: [global] bs=4k rw=randread norandommap direct=1 ioengine=libaio iodepth=4 [nullb0] filename=/dev/nullb0 [nullb1] filename=/dev/nullb1 [nullb2] filename=/dev/nullb2 [nullb3] filename=/dev/nullb3 will inevitably end with one or more threads being stuck waiting for a scheduler tag. That IO is then stuck forever, until someone else triggers a run of the queue. Ensure that we always re-run the hardware queue, if the driver tag we were waiting for got freed before we added our leftover request entries back on the dispatch list. Reviewed-by: Bart Van Assche Tested-by: Bart Van Assche Reviewed-by: Ming Lei Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 1 - block/blk-mq.c | 85 ++++++++++++++++++++++++++++---------------------- include/linux/blk-mq.h | 5 ++- 3 files changed, 50 insertions(+), 41 deletions(-) commit e454d122e22826589cfa08788a802ab09d4fae24 Author: Christoph Hellwig Date: Thu Nov 9 14:29:27 2017 +0100 nvmet: kill nvmet_inline_bio_init Much easier to just opencode this helper. Also use ARRAY_SIZE instead of passing the inline bvec array size manually. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/io-cmd.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 5e62d5c993e6889cd314d5b5de6b670152109a0e Author: Christoph Hellwig Date: Thu Nov 9 14:29:58 2017 +0100 nvmet: better data length validation Currently the NVMe target stores the expexted data length in req->data_len and uses that for data transfer decisions, but that does not take the actual transfer length in the SGLs into account. So this adds a new transfer_len field, into which the transport drivers store the actual transfer length. We then check the two match before actually executing the command. The FC transport driver already had such a field, which is removed in favour of the common one. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/core.c | 10 ++++++++++ drivers/nvme/target/fc.c | 32 ++++++++++++-------------------- drivers/nvme/target/loop.c | 3 ++- drivers/nvme/target/nvmet.h | 4 ++++ drivers/nvme/target/rdma.c | 10 ++++++---- 5 files changed, 34 insertions(+), 25 deletions(-) commit 03e0f3a65e4da497c3b7b213c68943cbc73a2e34 Author: Ming Lei Date: Thu Nov 9 19:32:07 2017 +0800 nvme-pci: avoid dereference of symbol from unloaded module The 'remove_work' may be scheduled to run after nvme_remove() returns since we can't simply cancel it in nvme_remove() for avoiding deadlock. Once nvme_remove() returns, this module(nvme) can be unloaded. On the other hand, nvme_put_ctrl() calls ctr->ops->free_ctrl which may point to nvme_pci_free_ctrl() in unloaded module. This patch avoids this issue by queuing 'remove_work' via 'nvme_wq', and flush this worqueue in nvme_exit() as suggested by Sagi. Suggested-by: Sagi Grimberg Signed-off-by: Ming Lei Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e3d7874dcf175cca2dca7795d6453f637ad8ba9b Author: Keith Busch Date: Tue Nov 7 15:13:14 2017 -0700 nvme: send uevent for some asynchronous events This will give udev a chance to observe and handle asynchronous event notifications and clear the log to unmask future events of the same type. The driver will create a change uevent of the asyncronuos event result before submitting the next AEN request to the device if a completed AEN event is of type error, smart, command set or vendor specific, Signed-off-by: Keith Busch Reviewed-by: Guan Junxiong Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 28 ++++++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 1 + include/linux/nvme.h | 4 ++++ 3 files changed, 33 insertions(+) commit d99ca609a1b55f87a5e62a11ed70e4d091d815f0 Author: Keith Busch Date: Tue Nov 7 15:13:13 2017 -0700 nvme: unexport starting async event work Async event work is for core use only and should not be called directly from drivers. Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Reviewed-by: Guan Junxiong Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 8 +------- drivers/nvme/host/nvme.h | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) commit ad22c355b707a8d8d48e282aadc01c0b0604b2e9 Author: Keith Busch Date: Tue Nov 7 15:13:12 2017 -0700 nvme: remove handling of multiple AEN requests The driver can handle tracking only one AEN request, so this patch removes handling for multiple ones. Reviewed-by: Christoph Hellwig Reviewed-by: James Smart Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 28 +++------------------------- drivers/nvme/host/fc.c | 9 +++------ drivers/nvme/host/nvme.h | 3 +-- drivers/nvme/host/pci.c | 4 ++-- drivers/nvme/host/rdma.c | 5 +---- drivers/nvme/target/loop.c | 2 +- 6 files changed, 11 insertions(+), 40 deletions(-) commit 08e1507544839b98fc3732aea935e70ed9c209ec Author: Keith Busch Date: Tue Nov 7 15:13:11 2017 -0700 nvme-fc: remove unused "queue_size" field This was being saved in a structure, but never used anywhere. The queue size is obtained through other means, so there's no reason to duplicate this without a user for it. Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch Reviewed-by: Guan Junxiong Reviewed-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 38dabe210fbab4e7e8a03670ab3ba42f247ea08f Author: Keith Busch Date: Tue Nov 7 15:13:10 2017 -0700 nvme: centralize AEN defines All the transports were unnecessarilly duplicating the AEN request accounting. This patch defines everything in one place. Signed-off-by: Keith Busch Reviewed-by: Guan Junxiong Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 +- drivers/nvme/host/fc.c | 33 ++++++++++++--------------------- drivers/nvme/host/nvme.h | 1 - drivers/nvme/host/pci.c | 16 +++------------- drivers/nvme/host/rdma.c | 14 +++----------- drivers/nvme/target/loop.c | 14 +++----------- include/linux/nvme.h | 8 ++++++++ 7 files changed, 30 insertions(+), 58 deletions(-) commit 4185f25acbc2a191341c7d8cf51e449698eceb06 Author: Sagi Grimberg Date: Wed Nov 8 12:00:30 2017 +0200 nvmet: remove redundant local variable the status is either success or some status id and we don't need a local variable for it. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/admin-cmd.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit dafc040ba6d813df225a25f8b4bc3eae2207a6be Author: Sagi Grimberg Date: Wed Nov 8 12:00:29 2017 +0200 nvmet: remove redundant memset if failed to get_smart_log failed We already allocated the buffer with kzalloc. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/admin-cmd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit aba7afc5671c23beade64d10caf86e24a9105dab Author: Bart Van Assche Date: Wed Nov 8 10:23:45 2017 -0800 blk-mq: Avoid that request queue removal can trigger list corruption Avoid that removal of a request queue sporadically triggers the following warning: list_del corruption. next->prev should be ffff8807d649b970, but was 6b6b6b6b6b6b6b6b WARNING: CPU: 3 PID: 342 at lib/list_debug.c:56 __list_del_entry_valid+0x92/0xa0 Call Trace: process_one_work+0x11b/0x660 worker_thread+0x3d/0x3b0 kthread+0x129/0x140 ret_from_fork+0x27/0x40 Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Signed-off-by: Jens Axboe block/blk-core.c | 1 + 1 file changed, 1 insertion(+) commit ab083b11f6f43af071f9b507e48d212bfbb2beb3 Author: Javier González Date: Wed Nov 8 10:59:04 2017 +0100 nvme: fix eui_show() print format Fix print formatting, but keep the original output to prevent user breakage as suggested by Joe Perches. Signed-off-by: Javier González Reviewed-by: Sagi Grimberg Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a47619b5c6ead6c2e10b8114a5e9291a1679a7c3 Author: Javier González Date: Wed Nov 8 10:59:03 2017 +0100 nvme: compare NQN string with right size Copy subnqns using NVMF_NQN_SIZE as it is < 256 Signed-off-by: Javier González Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c6af1ccd5fd9ac640aef01c8de0043837451a04 Author: Ming Lei Date: Wed Nov 8 09:11:22 2017 +0800 blk-mq: put driver tag if dispatch budget can't be got We have to put the driver tag if dispatch budget can't be got, otherwise it might cause IO deadlock, especially in case that size of tags is very small. Fixes: de1482974080(blk-mq: introduce .get_budget and .put_budget in blk_mq_ops) Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f00c4d80ffdac9e3a64947ebd57489f3232d5a74 Author: Christoph Hellwig Date: Sun Nov 5 10:36:31 2017 +0300 block: pass full fmode_t to blk_verify_command Use the obvious calling convention. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/bsg.c | 18 ++++++++---------- block/scsi_ioctl.c | 8 ++++---- drivers/scsi/sg.c | 2 +- include/linux/blkdev.h | 2 +- 4 files changed, 14 insertions(+), 16 deletions(-) commit d004a5e7d4dd6335ce6e2044af42f5e0fbebb51d Author: Christoph Hellwig Date: Wed Nov 8 19:13:48 2017 +0100 block: remove __bio_kmap_atomic This helper doesn't buy us much over calling kmap_atomic directly. In fact in the only caller it does a bit of useless work as the caller already has the bvec at hand, and said caller would even buggy for a multi-segment bio due to the use of this helper. So just remove it. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe Documentation/block/biodoc.txt | 11 +++++------ arch/xtensa/platforms/iss/simdisk.c | 4 ++-- block/blk-settings.c | 2 +- include/linux/bio.h | 12 ------------ 4 files changed, 8 insertions(+), 21 deletions(-) commit 83f5f7ed72f316eda4c4c3833beebfe6578926f4 Author: Jens Axboe Date: Wed Nov 8 11:15:37 2017 -0700 block: kill bio_kmap/kunmap_irq() There are no users of it anymore. Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe Documentation/block/biodoc.txt | 4 ++-- include/linux/bio.h | 11 ----------- 2 files changed, 2 insertions(+), 13 deletions(-) commit 05b79413946d8b2b58999ea1ae844b6fc3c54f61 Author: Jens Axboe Date: Wed Nov 8 10:38:29 2017 -0700 Revert "blk-mq: don't handle TAG_SHARED in restart" This reverts commit 358a3a6bccb74da9d63a26b2dd5f09f1e9970e0b. We have cases that aren't covered 100% in the drivers, so for now we have to retain the shared tag restart loops. Signed-off-by: Jens Axboe block/blk-mq-sched.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 74 insertions(+), 4 deletions(-) commit e10237cc76ef9a4066a84aa2cc710bfd708cc341 Author: Shaohua Li Date: Tue Nov 7 11:09:50 2017 -0800 kthread: zero the kthread data structure kthread() could bail out early before we initialize blkcg_css (if the kthread is killed very early. Please see xchg() statement in kthread()), which confuses free_kthread_struct. Instead of moving the blkcg_css initialization early, we simply zero the whole 'self' data structure, which doesn't sound much overhead. Reported-by: syzbot Fixes: 05e3db95ebfc ("kthread: add a mechanism to store cgroup info") Cc: Andrew Morton Cc: Ingo Molnar Cc: Dmitry Vyukov Acked-by: Tejun Heo Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe kernel/kthread.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 18c53e40487f56369c3ba9331ec3597d9b48d97c Author: Minwoo Im Date: Tue Nov 7 21:10:22 2017 +0900 nvmet: fix comment typos in admin-cmd.c small typos fixed in admin-cmd.c Signed-off-by: Minwoo Im Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/admin-cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1f61def985d896da5935ae85a69c79fc26c7952f Author: Max Gurtovoy Date: Mon Nov 6 16:18:51 2017 +0200 nvme-rdma: fix nvme_rdma_create_queue_ib error flow QP object is created using rdma_cm api, therefore the destruction should use the same api for symmetry. Signed-off-by: Max Gurtovoy Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43b92fd27aaef0f529c9321cfebbaec1d7b8f503 Author: Israel Rukshin Date: Sun Nov 5 08:43:01 2017 +0000 nvmet-rdma: update queue list during ib_device removal A NULL deref happens when nvmet_rdma_remove_one() is called more than once (e.g. while connected via 2 ports). The first call frees the queues related to the first ib_device but doesn't remove them from the queue list. While calling nvmet_rdma_remove_one() for the second ib_device it goes over the full queue list again and we get the NULL deref. Fixes: f1d4ef7d ("nvmet-rdma: register ib_client to not deadlock in device removal") Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/target/rdma.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6ddcf0a30adc5080504ca66f474101e7ad247dd7 Author: James Smart Date: Fri Nov 3 09:33:30 2017 -0700 lpfc: tie in to new dev_loss_tmo interface in nvme transport This patch calls the new nvme transport routine for dev_loss_tmo whenever the SCSI fc transport calls the lldd to make a dynamic change to a remote ports dev_loss_tmo. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/scsi/lpfc/lpfc_attr.c | 5 +++++ 1 file changed, 5 insertions(+) commit 158bfb8888c3f2beab747ab4f7a8197639f03e54 Author: James Smart Date: Fri Nov 3 08:13:17 2017 -0700 nvme-fc: decouple ns references from lldd references In the lldd api, a lldd may unregister a remoteport (loss of connectivity or driver unload) or localport (driver unload). The lldd must wait for the remoteport_delete or localport_delete before completing its actions post the unregister. The xxx_deletes currently occur only when the xxxport structure is fully freed after all references are removed. Thus the lldd may be held hostage until an app or in-kernel entity that has a namespace open finally closes so the namespace can be removed, the controller removed, thus the transport objects, thus the lldd. This patch decouples the transport and os-facing objects from the lldd and the remoteport and localport. There is a point in all deletions where the transport will no longer interact with the lldd on behalf of a controller. That point centers around the association established with the target/subsystem. It will access the lldd whenever it attempts to create an association and while the association is active. New associations may only be created if the remoteport is live (thus the localport is live). It will not access the lldd after deleting the association. Therefore, the patch tracks the count of active controllers - those with associations being created or that are active - on a remoteport. It also tracks the number of remoteports that have active controllers, on a a localport. When a remoteport is unregistered, as soon as there are no active controllers, the lldd's remoteport_delete may be called and the lldd may continue. Similarly, when a localport is unregistered, as soon as there are no remoteports with active controllers, the localport_delete callback may be made. This significantly speeds up unregistration with the lldd. The transport objects continue in suspended status with reconnect timers running, and upon expiration, normal ref-counting will occur and the objects will be freed. The transport object may still be held hostage by the application/kernel module, but that is acceptable. With this change, the lldd may be fully unloaded and reloaded, and if registrations occur prior to the timeouts, the nvme controller and namespaces will resume normally as if a link bounce. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 78 insertions(+), 6 deletions(-) commit c5760f300e25f7d2cea9a9002b1e058a5c18b73f Author: James Smart Date: Fri Nov 3 08:13:16 2017 -0700 nvme-fc: fix localport resume using stale values The localport resume was not updating the lldd ops structure. If the lldd is unloaded and reloaded, the ops pointers will differ. Additionally, as there are device references taken by the localport, ensure that resume only resumes if the device matches as well. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/fc.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 84fef62d135b6e47b52f4e9280b5dbc5bb0050ba Author: Keith Busch Date: Tue Nov 7 10:28:32 2017 -0700 nvme: check admin passthru command effects The NVMe standard provides a command effects log page so the host may be aware of special requirements it may need to do for a particular command. For example, the command may need to run with IO quiesced to prevent timeouts or undefined behavior, or it may change the logical block formats that determine how the host needs to construct future commands. This patch saves the nvme command effects log page if the controller supports it, and performs appropriate actions before and after an admin passthrough command is completed. If the controller does not support the command effects log page, the driver will define the effects for known opcodes. The nvme format and santize are the only commands in this patch with known effects. Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 107 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/nvme/host/nvme.h | 1 + include/linux/nvme.h | 18 ++++++++ 3 files changed, 126 insertions(+) commit c627c487ec727350c6aaa1cf217b666099e83ee2 Author: Keith Busch Date: Tue Nov 7 10:28:31 2017 -0700 nvme: factor get log into a helper And fix the warning on a successful firmware log. Reviewed-by: Javier González Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 715ea9e09dc81f18cad5ed64800f49b1c4c444df Author: Christoph Hellwig Date: Tue Nov 7 17:27:34 2017 +0100 nvme: fix and clarify the check for missing metadata Update the check in nvme_setup_rw for missing metadata so that it is together with the other metadata handling, does not contain impossible to reach conditions and warns if we get an impossible requests for a (non-PI) metadata-enabled namespace when CONFIG_BLK_DEV_INTEGRITY is not set. Also add a little helper that checks if a given metadata configuration contains protection information Signed-off-by: Christoph Hellwig Reported-by: Javier González Reviewed-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit 24b0b58c5b4a9f6f4bbd1c1efd5afb9a565da3ea Author: Christoph Hellwig Date: Thu Nov 2 21:28:56 2017 +0300 nvme: split __nvme_revalidate_disk Split out the code that applies the calculate value to a given disk/queue into new helper that can be reused by the multipath code. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 49 +++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) commit 6e78f21ae4488cdab4318f781de05c8ffc4de951 Author: Christoph Hellwig Date: Thu Nov 2 21:28:55 2017 +0300 nvme: set the chunk size before freezing the queue We don't need a frozen queue to update the chunk_size, which just is a hint, and moving it a little earlier will allow for some better code reuse with the multipath code. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 30e5e929c7bfaf87a65f926715773ef14339b79f Author: Christoph Hellwig Date: Thu Nov 2 21:28:54 2017 +0300 nvme: don't pass struct nvme_ns to nvme_config_discard To allow reusing this function for the multipath node. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 39b7baa410fd00a0fe9da864400d95b3d5008de7 Author: Christoph Hellwig Date: Thu Nov 2 21:28:53 2017 +0300 nvme: don't pass struct nvme_ns to nvme_init_integrity To allow reusing this function for the multipath node. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b5be3b392998a5f3763dfbdb1866f81d8ee631c7 Author: Christoph Hellwig Date: Thu Nov 2 21:28:52 2017 +0300 nvme: always unregister the integrity profile in __nvme_revalidate_disk This is safe because the queue is always frozen when we revalidate, and it simplifies both the existing code as well as the multipath implementation. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 40 ++++++++++------------------------------ 1 file changed, 10 insertions(+), 30 deletions(-) commit e54b064cb24c8268252336ccdd6523e08c0dcbde Author: Christoph Hellwig Date: Thu Nov 2 21:28:51 2017 +0300 nvme: move the dying queue check from cancel to completion With multipath we don't want a hard DNR bit on a request that is cancelled by a controller reset, but instead want to be able to retry it on another patch. To archive this don't always set the DNR bit when the queue is dying in nvme_cancel_request, but defer that decision to nvme_req_needs_retry. Note that it applies to any command there and not just cancelled commands, but one the queue is dying that is the right thing to do anyway. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit a6da0024ffc19e0d47712bb5ca4fd083f76b07df Author: Jens Axboe Date: Sun Nov 5 09:16:09 2017 -0700 blktrace: fix unlocked registration of tracepoints We need to ensure that tracepoints are registered and unregistered with the users of them. The existing atomic count isn't enough for that. Add a lock around the tracepoints, so we serialize access to them. This fixes cases where we have multiple users setting up and tearing down tracepoints, like this: CPU: 0 PID: 2995 Comm: syzkaller857118 Not tainted 4.14.0-rc5-next-20171018+ #36 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/0x41c kernel/panic.c:183 __warn+0x1c4/0x1e0 kernel/panic.c:546 report_bug+0x211/0x2d0 lib/bug.c:183 fixup_bug+0x40/0x90 arch/x86/kernel/traps.c:177 do_trap_no_signal arch/x86/kernel/traps.c:211 [inline] do_trap+0x260/0x390 arch/x86/kernel/traps.c:260 do_error_trap+0x120/0x390 arch/x86/kernel/traps.c:297 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:310 invalid_op+0x18/0x20 arch/x86/entry/entry_64.S:905 RIP: 0010:tracepoint_add_func kernel/tracepoint.c:210 [inline] RIP: 0010:tracepoint_probe_register_prio+0x397/0x9a0 kernel/tracepoint.c:283 RSP: 0018:ffff8801d1d1f6c0 EFLAGS: 00010293 RAX: ffff8801d22e8540 RBX: 00000000ffffffef RCX: ffffffff81710f07 RDX: 0000000000000000 RSI: ffffffff85b679c0 RDI: ffff8801d5f19818 RBP: ffff8801d1d1f7c8 R08: ffffffff81710c10 R09: 0000000000000004 R10: ffff8801d1d1f6b0 R11: 0000000000000003 R12: ffffffff817597f0 R13: 0000000000000000 R14: 00000000ffffffff R15: ffff8801d1d1f7a0 tracepoint_probe_register+0x2a/0x40 kernel/tracepoint.c:304 register_trace_block_rq_insert include/trace/events/block.h:191 [inline] blk_register_tracepoints+0x1e/0x2f0 kernel/trace/blktrace.c:1043 do_blk_trace_setup+0xa10/0xcf0 kernel/trace/blktrace.c:542 blk_trace_setup+0xbd/0x180 kernel/trace/blktrace.c:564 sg_ioctl+0xc71/0x2d90 drivers/scsi/sg.c:1089 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:0x444339 RSP: 002b:00007ffe05bb5b18 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00000000006d66c0 RCX: 0000000000444339 RDX: 000000002084cf90 RSI: 00000000c0481273 RDI: 0000000000000009 RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: ffffffffffffffff R13: 00000000c0481273 R14: 0000000000000000 R15: 0000000000000000 since we can now run these in parallel. Ensure that the exported helpers for doing this are grabbing the queue trace mutex. Reported-by: Steven Rostedt Tested-by: Dmitry Vyukov Signed-off-by: Jens Axboe kernel/trace/blktrace.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) commit 1f2cac107c591c24b60b115d6050adc213d10fc0 Author: Jens Axboe Date: Sun Nov 5 09:13:48 2017 -0700 blktrace: fix unlocked access to init/start-stop/teardown sg.c calls into the blktrace functions without holding the proper queue mutex for doing setup, start/stop, or teardown. Add internal unlocked variants, and export the ones that do the proper locking. Fixes: 6da127ad0918 ("blktrace: Add blktrace ioctls to SCSI generic devices") Tested-by: Dmitry Vyukov Signed-off-by: Jens Axboe kernel/trace/blktrace.c | 58 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 10 deletions(-) commit 0dd99ca76f473d488fa9acac67f6a42ca1d7d2b1 Author: LiFan Date: Fri Nov 10 15:41:42 2017 +0800 f2fs: validate before set/clear free nat bitmap In flush_nat_entries, all dirty nats will be flushed and if their new address isn't NULL_ADDR, their bitmaps will be updated, the free_nid_count of the bitmaps will be increaced regardless of whether the nats have already been occupied before. This could lead to wrong free_nid_count. So this patch checks the status of the bits beforeactually set/clear them. Fixes: 586d1492f301 ("f2fs: skip scanning free nid bitmap of full NAT blocks") Signed-off-by: Fan li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit fdd0bd88ceaecf729db103ac8836af5805dd2dc1 Author: Chung-Hsien Hsu Date: Fri Nov 10 17:27:15 2017 +0800 brcmfmac: add CLM download support The firmware for brcmfmac devices includes information regarding regulatory constraints. For certain devices this information is kept separately in a binary form that needs to be downloaded to the device. This patch adds support to download this so-called CLM blob file. It uses the same naming scheme as the other firmware files with extension of .clm_blob. The CLM blob file is optional. If the file does not exist, the download process will be bypassed. It will not affect the driver loading. Reviewed-by: Arend van Spriel Signed-off-by: Chung-Hsien Hsu Signed-off-by: Kalle Valo .../net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 10 ++ .../wireless/broadcom/brcm80211/brcmfmac/common.c | 157 +++++++++++++++++++++ .../wireless/broadcom/brcm80211/brcmfmac/core.c | 2 + .../wireless/broadcom/brcm80211/brcmfmac/core.h | 2 + .../broadcom/brcm80211/brcmfmac/fwil_types.h | 31 ++++ .../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 19 +++ .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 19 +++ .../net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 18 +++ 8 files changed, 258 insertions(+) commit abbdb5ce31c21a4b3c3922c56030f3d487497933 Merge: 6e69547 6ae6678 da39471 54e2fc2 979a9af Author: Mark Brown Date: Fri Nov 10 21:33:51 2017 +0000 Merge remote-tracking branches 'spi/topic/sh-msiof', 'spi/topic/slave', 'spi/topic/spreadtrum' and 'spi/topic/tegra114' into spi-next commit 6e695472505f17658b41a63ea669f65a26506f38 Merge: 704c145 ffd4db9 b7969ca f747c31 219a7bc 4132b8b Author: Mark Brown Date: Fri Nov 10 21:33:47 2017 +0000 Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/mxs', 'spi/topic/orion', 'spi/topic/rspi' and 'spi/topic/s3c64xx' into spi-next commit 704c14554ba5f26358ce4443ba1370399eb90077 Merge: b5f9208 dd7aa8d 4d5e068 32c30f7 ec7ed77 Author: Mark Brown Date: Fri Nov 10 21:33:44 2017 +0000 Merge remote-tracking branches 'spi/topic/armada', 'spi/topic/axi', 'spi/topic/davinci' and 'spi/topic/fsl-dspi' into spi-next commit b5f9208dea865ffdd075c55c6e44fcf5e45134b3 Merge: 130555c 68b892f Author: Mark Brown Date: Fri Nov 10 21:33:43 2017 +0000 Merge remote-tracking branch 'spi/topic/core' into spi-next commit 130555cf3b13ad9e187f52a2a3780af9d3b8714c Merge: 39dae59 42bdd70 3673578 Author: Mark Brown Date: Fri Nov 10 21:33:40 2017 +0000 Merge remote-tracking branches 'spi/fix/idr' and 'spi/fix/sh-msiof' into spi-linus commit 50b7baefe3e5a96f5aa8e9565fcfb0bda240b905 Merge: 9b272e6 707ce9e 26284ca 125b1192 Author: Mark Brown Date: Fri Nov 10 21:33:23 2017 +0000 Merge remote-tracking branches 'regulator/topic/da9211', 'regulator/topic/pfuze100' and 'regulator/topic/tps65218' into regulator-next commit 9b272e61185bc193cd3b6ffe02e24d619f345a67 Merge: 28c426c ca5cd8c Author: Mark Brown Date: Fri Nov 10 21:33:22 2017 +0000 Merge remote-tracking branch 'regulator/topic/qcom-spmi' into regulator-next commit 28c426c7ad9067b54fed02735f6a32eff4349c25 Merge: 46294d6 ad92cea Author: Mark Brown Date: Fri Nov 10 21:33:20 2017 +0000 Merge remote-tracking branch 'regulator/topic/axp20x' into regulator-next commit 46294d669cdfdcf8035c4b0d9a6c6a599926dc75 Merge: 39dae59 ab953b9 Author: Mark Brown Date: Fri Nov 10 21:33:18 2017 +0000 Merge remote-tracking branch 'regulator/fix/qcom-spmi' into regulator-linus commit df6a3e245541ac61cc99f2887437e0a43dd08f2e Merge: 668f21b 3d345b5 a10953f 81b3cc5 6bd25aa b614583 Author: Mark Brown Date: Fri Nov 10 21:31:33 2017 +0000 Merge remote-tracking branches 'asoc/topic/tfa9879', 'asoc/topic/ts3a277e', 'asoc/topic/wm8741', 'asoc/topic/wm97xx' and 'asoc/topic/zte' into asoc-next commit 668f21b1808d632ff9336047799a8bc0ed811b60 Merge: 84400d7 975b6a9 82ab86e 98c8dc2 8a0f95c a029ef4 Author: Mark Brown Date: Fri Nov 10 21:31:29 2017 +0000 Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/stm32', 'asoc/topic/sunxi' and 'asoc/topic/tas571x' into asoc-next commit 84400d7ff801d8cb2afa6aecf37ace5146b8e5a9 Merge: 0d7b5c9 0c279a5 f85353fdd c8a04b5 de6ae8a d081765 Author: Mark Brown Date: Fri Nov 10 21:31:25 2017 +0000 Merge remote-tracking branches 'asoc/topic/rt5645', 'asoc/topic/rt5651', 'asoc/topic/rt5659', 'asoc/topic/rt5663' and 'asoc/topic/rt5670' into asoc-next commit 0d7b5c93e52a539d900d966bdf7d79f9b7002e0a Merge: 5b04644 57f7fef c563087 Author: Mark Brown Date: Fri Nov 10 21:31:23 2017 +0000 Merge remote-tracking branches 'asoc/topic/rl6231' and 'asoc/topic/rt5514' into asoc-next commit 5b04644a48a5ba1c9c1b6561819c90f293d5b933 Merge: c9e38f3 d6e18b8 d4a8bce 79f01fe 94a6a8e Author: Mark Brown Date: Fri Nov 10 21:31:20 2017 +0000 Merge remote-tracking branches 'asoc/topic/max98925', 'asoc/topic/max98927', 'asoc/topic/msm8916' and 'asoc/topic/omap' into asoc-next commit c9e38f31a1e5ca14fb3d223d1dcaceeff574a3b0 Merge: 033d56f 0607aa3 e8639d0 f5fe8c4 Author: Mark Brown Date: Fri Nov 10 21:31:17 2017 +0000 Merge remote-tracking branches 'asoc/topic/hdmi', 'asoc/topic/img' and 'asoc/topic/kirkwood' into asoc-next commit 033d56f6c0e0e53ee4fb1b87e49d301be6f46707 Merge: 67e85d4 44860b9 9d94305 b48cc1d 7add71b 757652d Author: Mark Brown Date: Fri Nov 10 21:31:13 2017 +0000 Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/fallthrough', 'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/graph' into asoc-next commit 67e85d4e4e2eaf9614cf4db981be704890eb2869 Merge: f2470d5 4c75968 e0d746c 0c8b794 bb19ba2 Author: Mark Brown Date: Fri Nov 10 21:31:10 2017 +0000 Merge remote-tracking branches 'asoc/topic/cygnus', 'asoc/topic/da7213', 'asoc/topic/davinci' and 'asoc/topic/doc' into asoc-next commit f2470d52913883e0c34e4121a498087493198b4c Merge: 242f66c abd4f0e 8adc430 574ff44 Author: Mark Brown Date: Fri Nov 10 21:31:07 2017 +0000 Merge remote-tracking branches 'asoc/topic/bcm2835', 'asoc/topic/cs42l56' and 'asoc/topic/cs43130' into asoc-next commit 242f66c84533af20a20ecff4ea1b2c8c6a0f65ed Merge: 357c59a 6f8acad ae9d1b5 31c45b3 0340afe Author: Mark Brown Date: Fri Nov 10 21:31:02 2017 +0000 Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ac97-mfd', 'asoc/topic/amd' and 'asoc/topic/arizona-mfd' into asoc-next commit 357c59a98fec7267b5a247d49196b85637479dfd Merge: f904f84 8eae6c2 Author: Mark Brown Date: Fri Nov 10 21:31:00 2017 +0000 Merge remote-tracking branch 'asoc/topic/rockchip' into asoc-next commit f904f84609b679c4bd056095a8d778bb40a049cb Merge: 1cae414 c409c2a Author: Mark Brown Date: Fri Nov 10 21:30:57 2017 +0000 Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next commit 1cae41464ca8a1cced5ce00832f76e5881d2d23b Merge: 40e8cc5 20cf7e3 Author: Mark Brown Date: Fri Nov 10 21:30:56 2017 +0000 Merge remote-tracking branch 'asoc/topic/qcom' into asoc-next commit 40e8cc568987a9b5620672f3d1d54a21848ae8d8 Merge: c44ff31 da924c3 Author: Mark Brown Date: Fri Nov 10 21:30:54 2017 +0000 Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-next commit c44ff31ae03c0970e1b3cfe1e37f347865a9dc8b Merge: bd26974 1c0a7de Author: Mark Brown Date: Fri Nov 10 21:30:53 2017 +0000 Merge remote-tracking branch 'asoc/topic/intel' into asoc-next commit bd26974f7148d14d432f5c5eb0316e80792b4356 Merge: aa38bff c42c5ac Author: Mark Brown Date: Fri Nov 10 21:30:51 2017 +0000 Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next commit aa38bff80896e3918f357816a79a9b4a1d375c56 Merge: 73e13d0 e07bd30 Author: Mark Brown Date: Fri Nov 10 21:30:50 2017 +0000 Merge remote-tracking branch 'asoc/topic/core' into asoc-next commit 73e13d0f6c1b3d69f0379500ba6d17d8a43a50c6 Merge: 4d0210e e0dac41 Author: Mark Brown Date: Fri Nov 10 21:30:48 2017 +0000 Merge remote-tracking branch 'asoc/topic/component' into asoc-next commit 4d0210e6d0aec4b95c762e2af1afa688cc512547 Merge: 60190e4 316b775 Author: Mark Brown Date: Fri Nov 10 21:30:45 2017 +0000 Merge remote-tracking branch 'asoc/fix/sunxi' into asoc-linus commit 60190e46df7fc6e9fe558e3c0aa8af8d70ebc8fa Merge: 16a077e 3b47c9d Author: Mark Brown Date: Fri Nov 10 21:30:41 2017 +0000 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit 16a077e17ccf275a56fa21aa36a019ab063064f9 Merge: 39dae59 0bebd2f Author: Mark Brown Date: Fri Nov 10 21:30:27 2017 +0000 Merge tag 'asoc-fix-v4.14-rc6' into asoc-linus ASoC: Fixes for v4.14 I've been quite lax in sending these due to conference season but here's a fairly large collection of ASoC updates. The one thing that's not device specific is Takashi's fix for races between delayed work and PCM destruction, otherwise everything is specific to an individual device. # gpg: Signature made Thu 26 Oct 2017 15:11:23 BST # gpg: using RSA key ADE668AA675718B59FE29FEA24D68B725D5487D0 # gpg: issuer "broonie@kernel.org" # gpg: Good signature from "Mark Brown " [unknown] # gpg: aka "Mark Brown " [unknown] # gpg: aka "Mark Brown " [unknown] # gpg: aka "Mark Brown " [unknown] # gpg: aka "Mark Brown " [unknown] # gpg: aka "Mark Brown " [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 3F25 68AA C269 98F9 E813 A1C5 C3F4 36CA 30F5 D8EB # Subkey fingerprint: ADE6 68AA 6757 18B5 9FE2 9FEA 24D6 8B72 5D54 87D0 commit ffd4db9e10fdb431b559af052c17015682bbe2aa Author: Trent Piepho Date: Tue Oct 31 12:49:06 2017 -0700 spi: imx: Don't require platform data chipselect array If the array is not present, assume all chip selects are native. This is the standard behavior for SPI masters configured via the device tree and the behavior of this driver as well when it is configured via device tree. This reduces platform data vs DT differences and allows most of the platform data based boards to remove their chip select arrays. CC: Shawn Guo CC: Sascha Hauer CC: Fabio Estevam CC: Mark Brown Signed-off-by: Trent Piepho Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 4e21791e741c7c1b962c4a8327529f52310b9aac Author: Trent Piepho Date: Tue Oct 31 12:49:05 2017 -0700 spi: imx: Fix failure path leak on GPIO request error If the code that requests any chip select GPIOs fails, the cleanup of spi_bitbang_start() by calling spi_bitbang_stop() is not done. Add this to the failure path. Note that spi_bitbang_start() has to be called before requesting GPIOs because the GPIO data in the spi master is populated when the master is registed, and that doesn't happen until spi_bitbang_start() is called. CC: Shawn Guo CC: Sascha Hauer CC: Fabio Estevam CC: Mark Brown CC: Oleksij Rempel Signed-off-by: Trent Piepho Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 881a0b993e9f065cbb3673c94c395fa1de24bdcc Author: Trent Piepho Date: Tue Oct 31 12:49:04 2017 -0700 spi: imx: GPIO based chip selects should not be required The driver will fail to load if no gpio chip selects are specified, this patch changes this so that it no longer fails. It's possible to use all native chip selects, in which case there is no reason to have a gpio chip select array. This is what happens if the *optional* device tree property "cs-gpios" is omitted. The spi core already checks for the absence of gpio chip selects in the master and assigns any slaves the gpio_cs value of -ENOENT. Also have the driver respect the standard SPI device tree property "num-cs" to allow setting the number of chip selects without using cs-gpios. CC: Mark Brown CC: Shawn Guo CC: Sascha Hauer CC: Fabio Estevam CC: Oleksij Rempel Signed-off-by: Trent Piepho Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit abd4f0e1c24fd5b7241c77506006e9c0982128c0 Author: Matthias Reichl Date: Wed Nov 8 21:03:30 2017 +0100 ASoC: bcm2835: Support left/right justified and DSP modes DSP modes and left/right justified modes can be supported on bcm2835 by configuring the frame sync polarity and frame sync length registers and by adjusting the channel data position registers. Clock and frame sync polarity handling in hw_params has been refactored to make the interaction between logical rising/falling edge frame start and physical configuration (changed by normal/inverted polarity modes) clearer. Modes where the first active data bit is transmitted immediately after frame start (eg DSP mode B with slot 0 active) only work reliable if bcm2835 is configured as frame master. In frame slave mode channel swap (or shift, this isn't quite clear yet) can occur. Currently the driver only warns if an unstable configuration is detected but doensn't prevent using them. Signed-off-by: Matthias Reichl Signed-off-by: Mark Brown sound/soc/bcm/bcm2835-i2s.c | 152 +++++++++++++++++++++++++++++--------------- 1 file changed, 99 insertions(+), 53 deletions(-) commit 3d2b3c707b3f9516d6c183eb1ffbf02a6dc5dc98 Author: Matthias Reichl Date: Wed Nov 8 21:03:32 2017 +0100 ASoC: bcm2835: Enforce full symmetry bcm2835's configuration registers can't be changed when a stream is running, which means asymmetric configurations aren't supported. Channel and rate symmetry are already enforced by constraints but samplebits had been missed. As hw_params doesn't check for symmetry constraints by itself and just returns success if a stream is running this led to situations where asymmetric configurations were seeming to succeed but of course didn't work because the hardware wasn't configured at all. Fix this by adding the missing samplerate symmetry constraint. Signed-off-by: Matthias Reichl Signed-off-by: Mark Brown sound/soc/bcm/bcm2835-i2s.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 675c0ee514f56ea39f6f550299621aafe9a53fc0 Author: Matthias Reichl Date: Wed Nov 8 21:03:31 2017 +0100 ASoC: bcm2835: Support additional samplerates up to 384kHz Sample rates are only restricted by the capabilities of the clock driver, so use SNDRV_PCM_RATE_CONTINUOUS instead of SNDRV_PCM_RATE_8000_192000. Tests (eg with pcm5122) have shown that bcm2835 works fine in 384kHz/32bit stereo mode, so change the maximum allowed rate from 192kHz to 384kHz. Signed-off-by: Matthias Reichl Reviewed-by: Eric Anholt Signed-off-by: Mark Brown sound/soc/bcm/bcm2835-i2s.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9448572d98f358de9078be67a2a52d467e28fbd2 Author: Matthias Reichl Date: Wed Nov 8 21:03:29 2017 +0100 ASoC: bcm2835: Add support for TDM modes bcm2835 supports arbitrary positioning of channel data within a frame and thus is capable of supporting TDM modes. Since the driver is limited to 2-channel operations only TDM setups with exactly 2 active slots are supported. Logical TDM slot numbering follows the usual convention: For I2S-like modes, with a 50% duty-cycle frame clock, slots 0, 2, ... are transmitted in the first half of a frame, slots 1, 3, ... are transmitted in the second half. For DSP modes slot numbering is ascending: 0, 1, 2, 3, ... Channel position calculation has been refactored to use TDM info and moved out of hw_params. set_tdm_slot, set_bclk_ratio and hw_params now check more strictly if the configuration is valid. Illegal configurations like odd number of slots in I2S mode, data lengths exceeding slot width or frame sizes larger than the hardware limit of 1024 are rejected. Also hw_params now properly checks for errors from clk_set_rate. Allowed PCM formats are already guarded by stream constraints, thus the formats check in hw_params has been removed and data_length is now retrieved via params_width(). Also standard functions like snd_soc_params_to_bclk are now being used instead of manual calculations to make the code more readable. Special care has been taken to ensure that set_bclk_ratio works as before. The bclk ratio is mapped to a 2-channel TDM config with a slot width of half the ratio. In order to support odd ratios, which can't be expressed via a TDM config, the ratio (frame length) is stored and used by hw_params. Signed-off-by: Matthias Reichl Signed-off-by: Mark Brown sound/soc/bcm/bcm2835-i2s.c | 242 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 190 insertions(+), 52 deletions(-) commit 757652dd597139adb09e196a93db93feb6fb8a64 Author: Olivier Moysan Date: Thu Nov 9 15:07:58 2017 +0100 ASoC: add mclk-fs support to audio graph card Add mclk-fs support to audio graph card as it was previously implemented in simple card. Signed-off-by: Olivier Moysan Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/generic/audio-graph-card.c | 47 ++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 8 deletions(-) commit b8b0d10c3a9b6ee94d56d0c3b162d05c177fb101 Author: Olivier Moysan Date: Thu Nov 9 15:07:57 2017 +0100 ASoC: add mclk-fs to audio graph card binding Add mclk-fs support to audio graph card as initially supported in simple card. Signed-off-by: Olivier Moysan Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/audio-graph-card.txt | 1 + 1 file changed, 1 insertion(+) commit c56308775b5b81683789f9ee03f009493b51e6ab Author: Arnd Bergmann Date: Fri Nov 10 15:54:43 2017 +0100 ASoC: rt5514: work around link error The main rt5514 driver optionally calls into the SPI back-end to load the firmware. This causes a link error when one driver selects rt5514 as built-in and another driver selects rt5514-spi as a loadable module: sound/soc/codecs/rt5514.o: In function `rt5514_dsp_voice_wake_up_put': rt5514.c:(.text+0xac8): undefined reference to `rt5514_spi_burst_write' As a workaround, this adds another silent symbol, to force rt5514-spi to be built-in for that configuration. I'm not overly happy with that solution, but couldn't come up with anything better. Using 'IS_REACHABLE()' would break the case that relies on the loadable module, and all other ideas would result in more complexity. Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 4 ++++ sound/soc/codecs/Makefile | 1 + 2 files changed, 5 insertions(+) commit 7e6358ec3b6f69815a42af6203219584a80d4e22 Author: Arnd Bergmann Date: Fri Nov 10 15:54:42 2017 +0100 ASoC: rt5514: mark PM functions as __maybe_unused The new functions are only used when CONFIG_PM is enabled, leading to a harmless warning: sound/soc/codecs/rt5514-spi.c:474:12: error: 'rt5514_resume' defined but not used [-Werror=unused-function] sound/soc/codecs/rt5514-spi.c:464:12: error: 'rt5514_suspend' defined but not used [-Werror=unused-function] This marks them as __maybe_unused to make the build silent again. Fixes: 58f1c07d23cd ("ASoC: rt5514: Voice wakeup support.") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/codecs/rt5514-spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 42d5e37654e4cdb9fb2e2f3ab30045fee35c42d8 Author: Richard Guy Briggs Date: Wed Aug 23 07:03:39 2017 -0400 audit: filter PATH records keyed on filesystem magic Tracefs or debugfs were causing hundreds to thousands of PATH records to be associated with the init_module and finit_module SYSCALL records on a few modules when the following rule was in place for startup: -a always,exit -F arch=x86_64 -S init_module -F key=mod-load Provide a method to ignore these large number of PATH records from overwhelming the logs if they are not of interest. Introduce a new filter list "AUDIT_FILTER_FS", with a new field type AUDIT_FSTYPE, which keys off the filesystem 4-octet hexadecimal magic identifier to filter specific filesystem PATH records. An example rule would look like: -a never,filesystem -F fstype=0x74726163 -F key=ignore_tracefs -a never,filesystem -F fstype=0x64626720 -F key=ignore_debugfs Arguably the better way to address this issue is to disable tracefs and debugfs on boot from production systems. See: https://github.com/linux-audit/audit-kernel/issues/16 See: https://github.com/linux-audit/audit-userspace/issues/8 Test case: https://github.com/linux-audit/audit-testsuite/issues/42 Signed-off-by: Richard Guy Briggs [PM: fixed the whitespace damage in kernel/auditsc.c] Signed-off-by: Paul Moore include/uapi/linux/audit.h | 8 ++++++-- kernel/auditfilter.c | 39 ++++++++++++++++++++++++++++++++------- kernel/auditsc.c | 23 +++++++++++++++++++++++ 3 files changed, 61 insertions(+), 9 deletions(-) commit f7b53637c090bd8ce2dc74ad0f3aa1898aff2524 Author: Casey Schaufler Date: Tue Oct 24 18:52:31 2017 -0700 Audit: remove unused audit_log_secctx function The function audit_log_secctx() is unused in the upstream kernel. All it does is wrap another function that doesn't need wrapping. It claims to give you the SELinux context, but that is not true if you are using a different security module. Signed-off-by: Casey Schaufler Reviewed-by: James Morris Signed-off-by: Paul Moore include/linux/audit.h | 8 -------- kernel/audit.c | 26 -------------------------- 2 files changed, 34 deletions(-) commit 33e8a907804428109ce1d12301c3365d619cc4df Author: Steve Grubb Date: Tue Oct 17 18:29:22 2017 -0400 audit: Allow auditd to set pid to 0 to end auditing The API to end auditing has historically been for auditd to set the pid to 0. This patch restores that functionality. See: https://github.com/linux-audit/audit-kernel/issues/69 Reviewed-by: Richard Guy Briggs Signed-off-by: Steve Grubb Signed-off-by: Paul Moore kernel/audit.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) commit 6e66ec3cae02952fcfc285cb156c11dcc61f4453 Author: Steve Grubb Date: Thu Oct 12 23:24:01 2017 -0400 audit: Add new syscalls to the perm=w filter The audit subsystem allows selecting audit events based on watches for a particular behavior like writing to a file. A lot of syscalls have been added without updating the list. This patch adds 2 syscalls to the write filters: fallocate and renameat2. Signed-off-by: Steve Grubb Reviewed-by: Richard Guy Briggs [PM: cleaned up some whitespace errors] Signed-off-by: Paul Moore include/asm-generic/audit_dir_write.h | 3 +++ include/asm-generic/audit_write.h | 3 +++ 2 files changed, 6 insertions(+) commit 5d842a5b77a58160625548fa6be2dc159179ffdb Author: Paul Moore Date: Fri Sep 1 09:45:05 2017 -0400 audit: use audit_set_enabled() in audit_enable() Use audit_set_enabled() to enable auditing during early boot. This obviously won't emit an audit change record, but it will work anyway and should help prevent in future problems by consolidating the enable/disable code in one function. Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/audit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b3b4fdf6a8ae9ea51ea274e3f2f8a6a58b98cc0b Author: Paul Moore Date: Fri Sep 1 09:44:57 2017 -0400 audit: convert audit_ever_enabled to a boolean We were treating it as a boolean, let's make it a boolean to help avoid future mistakes. Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/audit.c | 2 +- kernel/audit.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 80ab4df62706b882922c3bb0b05ce2c8ab10828a Author: Paul Moore Date: Fri Sep 1 09:44:51 2017 -0400 audit: don't use simple_strtol() anymore The simple_strtol() function is deprecated, use kstrtol() instead. Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/audit.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit be4104abf25c63ccef36e1e06262c73c0df9fd60 Author: Paul Moore Date: Fri Sep 1 09:44:44 2017 -0400 audit: initialize the audit subsystem as early as possible We can't initialize the audit subsystem until after the network layer is initialized (core_initcall), but do it soon after. Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/audit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 173743dd99a49c956b124a74c8aacb0384739a4c Author: Paul Moore Date: Fri Sep 1 09:44:34 2017 -0400 audit: ensure that 'audit=1' actually enables audit for PID 1 Prior to this patch we enabled audit in audit_init(), which is too late for PID 1 as the standard initcalls are run after the PID 1 task is forked. This means that we never allocate an audit_context (see audit_alloc()) for PID 1 and therefore miss a lot of audit events generated by PID 1. This patch enables audit as early as possible to help ensure that when PID 1 is forked it can allocate an audit_context if required. Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/audit.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c7fd89a6407ea3a44a2a2fa12d290162c42499c4 Author: James Hogan Date: Fri Nov 10 11:46:54 2017 +0000 MIPS: Fix odd fp register warnings with MIPS64r2 Building 32-bit MIPS64r2 kernels produces warnings like the following on certain toolchains (such as GNU assembler 2.24.90, but not GNU assembler 2.28.51) since commit 22b8ba765a72 ("MIPS: Fix MIPS64 FP save/restore on 32-bit kernels"), due to the exposure of fpu_save_16odd from fpu_save_double and fpu_restore_16odd from fpu_restore_double: arch/mips/kernel/r4k_fpu.S:47: Warning: float register should be even, was 1 ... arch/mips/kernel/r4k_fpu.S:59: Warning: float register should be even, was 1 ... This appears to be because .set mips64r2 does not change the FPU ABI to 64-bit when -march=mips64r2 (or e.g. -march=xlp) is provided on the command line on that toolchain, from the default FPU ABI of 32-bit due to the -mabi=32. This makes access to the odd FPU registers invalid. Fix by explicitly changing the FPU ABI with .set fp=64 directives in fpu_save_16odd and fpu_restore_16odd, and moving the undefine of fp up in asmmacro.h so fp doesn't turn into $30. Fixes: 22b8ba765a72 ("MIPS: Fix MIPS64 FP save/restore on 32-bit kernels") Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: # 4.0+: 22b8ba765a72: MIPS: Fix MIPS64 FP save/restore on 32-bit kernels Cc: # 4.0+ Patchwork: https://patchwork.linux-mips.org/patch/17656/ arch/mips/include/asm/asmmacro.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ef7afb3656854de04fe03b0b9b4f3722b5722d8d Author: Mike Snitzer Date: Thu Nov 9 11:59:37 2017 -0500 dm cache: lift common migration preparation code to alloc_migration() Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit ede6507d67e9f10a8df7f96ed0176d639cd25beb Author: Joe Thornber Date: Thu Nov 9 11:14:28 2017 -0500 dm cache: remove usused deferred_cells member from struct cache Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 2 -- 1 file changed, 2 deletions(-) commit 9768a10dd35c6bca9ea58ae23bd5d5c2500d7005 Author: Joe Thornber Date: Thu Nov 9 11:41:05 2017 -0500 dm cache policy smq: allocate cache blocks in order Previously, cache blocks were being allocated in reverse order. Fix this by pulling the block off the head of the free list. Shouldn't have any impact on performance or latency but it is more correct to have the cache blocks allocated/mapped in ascending order. This fix will slightly increase the chances of two adjacent oblocks being in adjacent cblocks. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-policy-smq.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 8ee18ede74328906b692403fadb2658cf56f26b3 Author: Joe Thornber Date: Thu Nov 9 11:16:56 2017 -0500 dm cache policy smq: change max background work from 10240 to 4096 blocks 10240 blocks was too much, lowering this reduces the latency of copying and consumes less memory. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-policy-smq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64748b1645b81399d01ad86657c5bbe097c1701c Author: Joe Thornber Date: Wed Nov 8 06:41:43 2017 -0500 dm cache background tracker: limit amount of background work that may be issued at once On large systems the cache policy can be over enthusiastic and queue far too much dirty data to be written back. This consumes memory. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-background-tracker.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit deb71918ae29e23ff7f4537f5ff654f8b6580af2 Author: Joe Thornber Date: Wed Nov 8 06:09:38 2017 -0500 dm cache policy smq: take origin idle status into account when queuing writebacks If the origin device is idle try and writeback more data. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-policy-smq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1e72a8e809f030bd4e318a49c497ee38e47e82c1 Author: Joe Thornber Date: Wed Nov 8 05:56:11 2017 -0500 dm cache policy smq: handle races with queuing background_work The background_tracker holds a set of promotions/demotions that the cache policy wishes the core target to implement. When adding a new operation to the tracker it's possible that an operation on the same block is already present (but in practise this doesn't appear to be happening). Catch these situations and do the appropriate cleanup. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-policy-smq.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 233978449074ca7e45d9c959f9ec612d1b852893 Author: Heinz Mauelshagen Date: Thu Nov 2 19:58:28 2017 +0100 dm raid: fix panic when attempting to force a raid to sync Requesting a sync on an active raid device via a table reload (see 'sync' parameter in Documentation/device-mapper/dm-raid.txt) skips the super_load() call that defines the superblock size (rdev->sb_size) -- resulting in an oops if/when super_sync()->memset() is called. Fix by moving the initialization of the superblock start and size out of super_load() to the caller (analyse_superblocks). Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer drivers/md/dm-raid.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 95b1369a9638cfa322ad1c0cde8efbe524059884 Author: Mikulas Patocka Date: Tue Nov 7 10:40:40 2017 -0500 dm integrity: allow unaligned bv_offset When slub_debug is enabled kmalloc returns unaligned memory. XFS uses this unaligned memory for its buffers (if an unaligned buffer crosses a page, XFS frees it and allocates a full page instead - see the function xfs_buf_allocate_memory). dm-integrity checks if bv_offset is aligned on page size and this check fail with slub_debug and XFS. Fix this bug by removing the bv_offset check, leaving only the check for bv_len. Fixes: 7eada909bfd7 ("dm: add integrity target") Cc: stable@vger.kernel.org # v4.12+ Reported-by: Bruno Prémont Reviewed-by: Milan Broz Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer drivers/md/dm-integrity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0440d5c0ca9744b92a07aeb6df0a9a75db6f4280 Author: Mikulas Patocka Date: Tue Nov 7 10:35:57 2017 -0500 dm crypt: allow unaligned bv_offset When slub_debug is enabled kmalloc returns unaligned memory. XFS uses this unaligned memory for its buffers (if an unaligned buffer crosses a page, XFS frees it and allocates a full page instead - see the function xfs_buf_allocate_memory). dm-crypt checks if bv_offset is aligned on page size and these checks fail with slub_debug and XFS. Fix this bug by removing the bv_offset checks. Switch to checking if bv_len is aligned instead of bv_offset (this check should be sufficient to prevent overruns if a bio with too small bv_len is received). Fixes: 8f0009a22517 ("dm crypt: optionally support larger encryption sector size") Cc: stable@vger.kernel.org # v4.12+ Reported-by: Bruno Prémont Tested-by: Bruno Prémont Signed-off-by: Mikulas Patocka Reviewed-by: Milan Broz Signed-off-by: Mike Snitzer drivers/md/dm-crypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 49de5769702cdf997e87359ba4e9ae289c1044e0 Author: Mike Snitzer Date: Mon Nov 6 16:40:10 2017 -0500 dm: small cleanup in dm_get_md() Makes dm_get_md() and dm_get_from_kobject() have similar code. Signed-off-by: Mike Snitzer drivers/md/dm.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit b9a41d21dceadf8104812626ef85dc56ee8a60ed Author: Hou Tao Date: Wed Nov 1 15:42:36 2017 +0800 dm: fix race between dm_get_from_kobject() and __dm_destroy() The following BUG_ON was hit when testing repeat creation and removal of DM devices: kernel BUG at drivers/md/dm.c:2919! CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44 Call Trace: [] dm_get_from_kobject+0x34/0x3a [] dm_attr_show+0x2b/0x5e [] ? mutex_lock+0x26/0x44 [] sysfs_kf_seq_show+0x83/0xcf [] kernfs_seq_show+0x23/0x25 [] seq_read+0x16f/0x325 [] kernfs_fop_read+0x3a/0x13f [] __vfs_read+0x26/0x9d [] ? security_file_permission+0x3c/0x44 [] ? rw_verify_area+0x83/0xd9 [] vfs_read+0x8f/0xcf [] ? __fdget_pos+0x12/0x41 [] SyS_read+0x4b/0x76 [] system_call_fastpath+0x12/0x71 The bug can be easily triggered, if an extra delay (e.g. 10ms) is added between the test of DMF_FREEING & DMF_DELETING and dm_get() in dm_get_from_kobject(). To fix it, we need to ensure the test of DMF_FREEING & DMF_DELETING and dm_get() are done in an atomic way, so _minor_lock is used. The other callers of dm_get() have also been checked to be OK: some callers invoke dm_get() under _minor_lock, some callers invoke it under _hash_lock, and dm_start_request() invoke it after increasing md->open_count. Cc: stable@vger.kernel.org Signed-off-by: Hou Tao Signed-off-by: Mike Snitzer drivers/md/dm.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 856eb0916d181da6d043cc33e03f54d5c5bbe54a Author: Mikulas Patocka Date: Tue Oct 31 19:33:02 2017 -0400 dm: allocate struct mapped_device with kvzalloc The structure srcu_struct can be very big, its size is proportional to the value CONFIG_NR_CPUS. The Fedora kernel has CONFIG_NR_CPUS 8192, the field io_barrier in the struct mapped_device has 84kB in the debugging kernel and 50kB in the non-debugging kernel. The large size may result in failure of the function kzalloc_node. In order to avoid the allocation failure, we use the function kvzalloc_node, this function falls back to vmalloc if a large contiguous chunk of memory is not available. This patch also moves the field io_barrier to the last position of struct mapped_device - the reason is that on many processor architectures, short memory offsets result in smaller code than long memory offsets - on x86-64 it reduces code size by 320 bytes. Note to stable kernel maintainers - the kernels 4.11 and older don't have the function kvzalloc_node, you can use the function vzalloc_node instead. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer drivers/md/dm-core.h | 3 ++- drivers/md/dm.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 114e025968b5990ad0b57bf60697ea64ee206aac Author: Damien Le Moal Date: Sat Oct 28 16:39:34 2017 +0900 dm zoned: ignore last smaller runt zone The SCSI layer allows ZBC drives to have a smaller last runt zone. For such a device, specifying the entire capacity for a dm-zoned target table entry fails because the specified capacity is not aligned on a device zone size indicated in the request queue structure of the device. Fix this problem by ignoring the last runt zone in the entry length when seting up the dm-zoned target (ctr method) and when iterating table entries of the target (iterate_devices method). This allows dm-zoned users to still easily setup a target using the entire device capacity (as mandated by dm-zoned) or the aligned capacity excluding the last runt zone. While at it, replace direct references to the device queue chunk_sectors limit with calls to the accessor blk_queue_zone_sectors(). Reported-by: Peter Desnoyers Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Mike Snitzer drivers/md/dm-zoned-target.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit fbc61291d7da41ec19f339311297f59213165227 Author: Jérémy Lefaure Date: Sun Oct 1 15:30:49 2017 -0400 dm space map metadata: use ARRAY_SIZE Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure Signed-off-by: Mike Snitzer drivers/md/persistent-data/dm-space-map-metadata.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 98d82f48f1983ceef5c8d2f6c87bfee2918790ee Author: Ross Zwisler Date: Thu Oct 19 23:24:04 2017 -0600 dm log writes: add support for DAX Now that we have the ability log filesystem writes using a flat buffer, add support for DAX. The motivation for this support is the need for an xfstest that can test the new MAP_SYNC DAX flag. By logging the filesystem activity with dm-log-writes we can show that the MAP_SYNC page faults are writing out their metadata as they happen, instead of requiring an explicit msync/fsync. Unfortunately we can't easily track data that has been written via mmap() now that the dax_flush() abstraction was removed by commit c3ca015fab6d ("dax: remove the pmem_dax_ops->flush abstraction"). Otherwise we could just treat each flush as a big write, and store the data that is being synced to media. It may be worthwhile to add the dax_flush() entry point back, just as a notifier so we can do this logging. Signed-off-by: Ross Zwisler Signed-off-by: Mike Snitzer drivers/md/dm-log-writes.c | 88 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) commit e5a20660a15d1c4c15f3aad92b3bac3d56042870 Author: Ross Zwisler Date: Thu Oct 19 23:24:03 2017 -0600 dm log writes: add support for inline data buffers Currently dm-log-writes supports writing filesystem data via BIOs, and writing internal metadata from a flat buffer via write_metadata(). For DAX writes, though, we won't have a BIO, but will instead have an iterator that we'll want to use to fill a flat data buffer. So, create write_inline_data() which allows us to write filesystem data using a flat buffer as a source, and wire it up in log_one_block(). Signed-off-by: Ross Zwisler Signed-off-by: Mike Snitzer drivers/md/dm-log-writes.c | 87 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 84 insertions(+), 3 deletions(-) commit 693b960ea891d1b7f89c644cd7eb125554fb2e88 Author: Mike Snitzer Date: Thu Oct 19 21:44:32 2017 -0400 dm cache: simplify get_per_bio_data() by removing data_size argument There is only one per_bio_data size now that writethrough-specific data was removed from the per_bio_data structure. Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 61 ++++++++++++++++---------------------------- 1 file changed, 22 insertions(+), 39 deletions(-) commit 9958f1d9a04efb3db19134482b3f4c6897e0e7b8 Author: Mike Snitzer Date: Thu Oct 19 17:30:20 2017 -0400 dm cache: remove all obsolete writethrough-specific code Now that the writethrough code is much simpler there is no need to track so much state or cascade bio submission (as was done, via writethrough_endio(), to issue origin then cache IO in series). As such the obsolete writethrough list and workqueue is also removed. Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 82 +------------------------------------------- 1 file changed, 1 insertion(+), 81 deletions(-) commit 2df3bae9a6543e90042291707b8db0cbfbae9ee9 Author: Mike Snitzer Date: Thu Oct 19 17:16:54 2017 -0400 dm cache: submit writethrough writes in parallel to origin and cache Discontinue issuing writethrough write IO in series to the origin and then cache. Use bio_clone_fast() to create a new origin clone bio that will be mapped to the origin device and then bio_chain() it to the bio that gets remapped to the cache device. The origin clone bio does _not_ have a copy of the per_bio_data -- as such check_if_tick_bio_needed() will not be called. The cache bio (parent bio) will not complete until the origin bio has completed -- this fulfills bio_clone_fast()'s requirements as well as the requirement to not complete the original IO until the write IO has completed to both the origin and cache device. Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 54 ++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 17 deletions(-) commit 8e3c3827776fc93728c0c8d7c7b731226dc6ee23 Author: Mike Snitzer Date: Thu Oct 19 21:01:04 2017 -0400 dm cache: pass cache structure to mode functions No functional changes, just a bit cleaner than passing cache_features structure. Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit d1260e2a3f85f4c1010510a15f89597001318b1b Author: Joe Thornber Date: Fri Nov 10 07:53:31 2017 -0500 dm cache: fix race condition in the writeback mode overwrite_bio optimisation When a DM cache in writeback mode moves data between the slow and fast device it can often avoid a copy if the triggering bio either: i) covers the whole block (no point copying if we're about to overwrite it) ii) the migration is a promotion and the origin block is currently discarded Prior to this fix there was a race with case (ii). The discard status was checked with a shared lock held (rather than exclusive). This meant another bio could run in parallel and write data to the origin, removing the discard state. After the promotion the parallel write would have been lost. With this fix the discard status is re-checked once the exclusive lock has been aquired. If the block is no longer discarded it falls back to the slower full copy path. Fixes: b29d4986d ("dm cache: significant rework to leverage dm-bio-prison-v2") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer drivers/md/dm-cache-target.c | 86 +++++++++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 33 deletions(-) commit 19526d74cfbe31b04fb81b64c2884687a321f4a0 Author: Chao Yu Date: Fri Nov 10 09:30:42 2017 +0800 f2fs: avoid opened loop codes in __add_ino_entry We will keep __add_ino_entry success all the time, for ENOMEM failure case, we have already handled it by using __GFP_NOFAIL flag, so we don't have to use additional opened loop codes here, remove them. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 0868b99c214a3d55486c700de7c3f770b7243e7c Author: Zdenek Kabelac Date: Wed Nov 8 13:44:56 2017 +0100 md: free unused memory after bitmap resize When bitmap is resized, the old kalloced chunks just are not released once the resized bitmap starts to use new space. This fixes in particular kmemleak reports like this one: unreferenced object 0xffff8f4311e9c000 (size 4096): comm "lvm", pid 19333, jiffies 4295263268 (age 528.265s) hex dump (first 32 bytes): 02 80 02 80 02 80 02 80 02 80 02 80 02 80 02 80 ................ 02 80 02 80 02 80 02 80 02 80 02 80 02 80 02 80 ................ backtrace: [] kmemleak_alloc+0x4a/0xa0 [] kmem_cache_alloc_trace+0x14e/0x2e0 [] bitmap_checkpage+0x7c/0x110 [] bitmap_get_counter+0x45/0xd0 [] bitmap_set_memory_bits+0x43/0xe0 [] bitmap_init_from_disk+0x23c/0x530 [] bitmap_load+0xbe/0x160 [] raid_preresume+0x203/0x2f0 [dm_raid] [] dm_table_resume_targets+0x4f/0xe0 [] dm_resume+0x122/0x140 [] dev_suspend+0x18f/0x290 [] ctl_ioctl+0x287/0x560 [] dm_ctl_ioctl+0x13/0x20 [] do_vfs_ioctl+0xa6/0x750 [] SyS_ioctl+0x79/0x90 [] entry_SYSCALL_64_fastpath+0x1f/0xc2 Signed-off-by: Zdenek Kabelac Signed-off-by: Shaohua Li drivers/md/md-bitmap.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 0202ce8a90efdc81600e7bf9712d8c324081a924 Author: Zdenek Kabelac Date: Wed Nov 8 13:44:55 2017 +0100 md: release allocated bitset sync_set Patch fixes kmemleak on md_stop() path used likely only by dm-raid wrapper. Code of md is using mddev_put() where both bitsets are released however this freeing is not shared. Also set NULL to bio_set and sync_set pointers just like mddev_put is doing. Signed-off-by: Zdenek Kabelac Signed-off-by: Shaohua Li drivers/md/md.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b1383aa64121778d9419cc982e387e27d9e96c64 Author: Noa Osherovich Date: Sun Oct 29 13:59:45 2017 +0200 IB/mlx5: Add PCI write end padding support Add the PCI write end padding flag to device_cap_flags enum and set it during mlx5_ib_query_device so it will be reported to user-space. During WQ/QP creation, set that capability for WQ/QP if user requested it and HW supports it. PCI write end padding modification is not supported for now. There's no such flag for a QP but for a WQ, create and modify use the same flag. Return an error if PCI write end padding flag is set during modify_wq. Signed-off-by: Noa Osherovich Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 3 +++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 ++- drivers/infiniband/hw/mlx5/qp.c | 36 +++++++++++++++++++++++++++++++++--- 3 files changed, 38 insertions(+), 4 deletions(-) commit e1d2e88733695038754d3303b180f8005a02b6f1 Author: Noa Osherovich Date: Sun Oct 29 13:59:44 2017 +0200 IB/core: Add PCI write end padding flags for WQ and QP There are root complexes that are able to optimize their performance when incoming data is multiple full cache lines. PCI write end padding is the device's ability to pad the ending of incoming packets (scatter) to full cache line such that the last upstream write generated by an incoming packet will be a full cache line. Add a relevant entry to ib_device_cap_flags to report such capability of an RDMA device. Add the QP and WQ create flags: * A QP/WQ created with a scatter end padding flag will cause HW to pad the last upstream write generated by a packet to cache line. User should consider several factors before activating this feature: - In case of high CPU memory load (which may cause PCI back pressure in turn), if a large percent of the writes are partial cache line, this feature should be checked as an optional solution. - This feature might reduce performance if most packets are between one and two cache lines and PCIe throughput has reached its maximum capacity. E.g. 65B packet from the network port will lead to 128B write on PCIe, which may cause traffic on PCIe to reach high throughput. Signed-off-by: Noa Osherovich Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 3 ++- include/rdma/ib_verbs.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 3192c53e5affe767472176197b83c9bc0b1e459d Author: Thomas Bogendoerfer Date: Tue Oct 31 11:16:46 2017 +0100 IB/rxe: don't crash, if allocation of crc algorithm failed Following crash happens, if crc algorithm couldn't be allocated: [ 1087.989072] rdma_rxe: loaded [ 1097.855397] PCLMULQDQ-NI instructions are not detected. [ 1097.901220] rdma_rxe: failed to allocate crc algorithmi err:-2 [ 1097.901248] BUG: unable to handle kernel [ 1097.901249] NULL pointer dereference [ 1097.901250] at 0000000000000046 [...] Reason is that rxe->tfm is assigned the error return, which will then be used for crypto_free_shash() in rxe_cleanup. Fix by using a temporary variable and assigning it rxe->tfm after allocation succeeded. Fixes: cee2688e3cd6 ("IB/rxe: Offload CRC calculation when possible") Signed-off-by: Thomas Bogendoerfer Reviewed-by: Leon Romanovsky Acked-by: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_verbs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit c1b433e04ef9c0a1c4d65bfe918472ffa334dff4 Author: Gustavo A. R. Silva Date: Fri Nov 10 10:23:59 2017 -0800 Input: gamecon - mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114761 Addresses-Coverity-ID: 114762 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Dmitry Torokhov drivers/input/joystick/gamecon.c | 3 +++ 1 file changed, 3 insertions(+) commit 56c78bb32b2b1504a18f34e913fe0ccbf074ec21 Author: Gustavo A. R. Silva Date: Fri Nov 10 10:23:35 2017 -0800 Input: sidewinder - mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114763 Addresses-Coverity-ID: 114764 Addresses-Coverity-ID: 114765 Addresses-Coverity-ID: 114766 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Dmitry Torokhov drivers/input/joystick/sidewinder.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 005161c864e1d0aedbbdac13ce75696b954d4e44 Author: Gustavo A. R. Silva Date: Fri Nov 10 10:23:14 2017 -0800 Input: spaceball - mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114767 Addresses-Coverity-ID: 114768 Addresses-Coverity-ID: 114769 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Dmitry Torokhov drivers/input/joystick/spaceball.c | 4 ++++ 1 file changed, 4 insertions(+) commit 781f2dd0a5eb8e660c0a5dbb11a69aed72f26657 Author: Dan Carpenter Date: Fri Nov 10 10:21:53 2017 -0800 Input: uinput - unlock on allocation failure in ioctl We have to unlock before returning if input_allocate_device() fails. Fixes: 04ce40a61a91 ("Input: uinput - remove uinput_allocate_device()") Signed-off-by: Dan Carpenter Signed-off-by: Dmitry Torokhov drivers/input/misc/uinput.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 89548bcafec7ecfeea58c553f0834b5d575a66eb Author: Parav Pandit Date: Tue Oct 31 10:33:18 2017 -0500 IB/core: Avoid crash on pkey enforcement failed in received MADs Below kernel crash is observed when Pkey security enforcement fails on received MADs. This issue is reported in [1]. ib_free_recv_mad() accesses the rmpp_list, whose initialization is needed before accessing it. When security enformcent fails on received MADs, MAD processing avoided due to security checks failed. OpenSM[3770]: SM port is down kernel: BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 kernel: IP: ib_free_recv_mad+0x44/0xa0 [ib_core] kernel: PGD 0 kernel: P4D 0 kernel: kernel: Oops: 0002 [#1] SMP kernel: CPU: 0 PID: 2833 Comm: kworker/0:1H Tainted: P IO 4.13.4-1-pve #1 kernel: Hardware name: Dell XS23-TY3 /9CMP63, BIOS 1.71 09/17/2013 kernel: Workqueue: ib-comp-wq ib_cq_poll_work [ib_core] kernel: task: ffffa069c6541600 task.stack: ffffb9a729054000 kernel: RIP: 0010:ib_free_recv_mad+0x44/0xa0 [ib_core] kernel: RSP: 0018:ffffb9a729057d38 EFLAGS: 00010286 kernel: RAX: ffffa069cb138a48 RBX: ffffa069cb138a10 RCX: 0000000000000000 kernel: RDX: ffffb9a729057d38 RSI: 0000000000000000 RDI: ffffa069cb138a20 kernel: RBP: ffffb9a729057d60 R08: ffffa072d2d49800 R09: ffffa069cb138ae0 kernel: R10: ffffa069cb138ae0 R11: ffffa072b3994e00 R12: ffffb9a729057d38 kernel: R13: ffffa069d1c90000 R14: 0000000000000000 R15: ffffa069d1c90880 kernel: FS: 0000000000000000(0000) GS:ffffa069dba00000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: CR2: 0000000000000008 CR3: 00000011f51f2000 CR4: 00000000000006f0 kernel: Call Trace: kernel: ib_mad_recv_done+0x5cc/0xb50 [ib_core] kernel: __ib_process_cq+0x5c/0xb0 [ib_core] kernel: ib_cq_poll_work+0x20/0x60 [ib_core] kernel: process_one_work+0x1e9/0x410 kernel: worker_thread+0x4b/0x410 kernel: kthread+0x109/0x140 kernel: ? process_one_work+0x410/0x410 kernel: ? kthread_create_on_node+0x70/0x70 kernel: ? SyS_exit_group+0x14/0x20 kernel: ret_from_fork+0x25/0x30 kernel: RIP: ib_free_recv_mad+0x44/0xa0 [ib_core] RSP: ffffb9a729057d38 kernel: CR2: 0000000000000008 [1] : https://www.spinics.net/lists/linux-rdma/msg56190.html Fixes: 47a2b338fe63 ("IB/core: Enforce security on management datagrams") Cc: stable@vger.kernel.org # 4.13+ Signed-off-by: Parav Pandit Reported-by: Chris Blake Reviewed-by: Daniel Jurgens Reviewed-by: Hal Rosenstock Signed-off-by: Doug Ledford drivers/infiniband/core/mad.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0145a7141e597e14c60f7561add76bea874768b2 Author: Andi Shyti Date: Thu Nov 9 23:10:06 2017 -0800 Input: add support for the Samsung S6SY761 touchscreen The S6SY761 touchscreen is a capicitive multi-touch controller for mobile use. It's connected with i2c at the address 0x48. This commit provides a basic version of the driver which can handle only initialization, touch events and power states. The controller is controlled by a firmware which, in the version I currently have, doesn't provide all the possible functionalities mentioned in the datasheet. Signed-off-by: Andi Shyti Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../bindings/input/touchscreen/samsung,s6sy761.txt | 34 ++ drivers/input/touchscreen/Kconfig | 11 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/s6sy761.c | 559 +++++++++++++++++++++ 4 files changed, 605 insertions(+) commit 842ff286166e8512450573f6b6eb5e04e626a07f Author: Anthony Kim Date: Wed Oct 25 14:57:04 2017 -0700 Input: add support for HiDeep touchscreen The HiDeep touchscreen device is a capacitive multi-touch controller mainly for multi-touch supported devices use. It use I2C interface for communication to IC and provide axis X, Y, Z locations for ten finger touch through input event interface to userspace. It support the Crimson and the Lime two type IC. They are different the number of channel supported and FW size. But the working protocol is same. Signed-off-by: Anthony Kim Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../bindings/input/touchscreen/hideep.txt | 42 + .../devicetree/bindings/vendor-prefixes.txt | 1 + drivers/input/touchscreen/Kconfig | 11 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/hideep.c | 1120 ++++++++++++++++++++ 5 files changed, 1175 insertions(+) commit 7d7d065a5eec7e218174d5c64a9f53f99ffdb119 Author: Leon Romanovsky Date: Wed Oct 25 23:10:19 2017 +0300 RDMA/cxgb4: Annotate r2 and stag as __be32 Chelsio cxgb4 HW is big-endian, hence there is need to properly annotate r2 and stag fields as __be32 and not __u32 to fix the following sparse warnings. drivers/infiniband/hw/cxgb4/qp.c:614:16: warning: incorrect type in assignment (different base types) expected unsigned int [unsigned] [usertype] r2 got restricted __be32 [usertype] drivers/infiniband/hw/cxgb4/qp.c:615:18: warning: incorrect type in assignment (different base types) expected unsigned int [unsigned] [usertype] stag got restricted __be32 [usertype] Cc: Steve Wise Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/t4fw_ri_api.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 108809a0571cd1e1b317c5c083a371e163e1f8f9 Author: Guy Levi Date: Wed Oct 25 22:39:35 2017 +0300 IB/mlx4: Fix RSS's QPC attributes assignments In the modify QP handler the base_qpn_udp field in the RSS QPC is overwrite later by irrelevant value assignment. Hence, ingress packets which gets to the RSS QP will be steered then to a garbage QPN. The patch fixes this by skipping the above assignment when a RSS QP is modified, also, the RSS context's attributes assignments are relocated just before the context is posted to avoid future issues like this. Additionally, this patch takes the opportunity to change the code to be disciplined to the device's manual and assigns the RSS QP context just at RESET to INIT transition. Fixes:3078f5f1bd8b ("IB/mlx4: Add support for RSS QP") Signed-off-by: Guy Levi Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/qp.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 09d208b258a2e012aad399b80a9595c4aa95e6dc Author: Guy Levi Date: Wed Oct 25 22:39:34 2017 +0300 IB/mlx4: Add report for RSS capabilities by vendor channel The mlx4's RSS patches submission missed a report of RSS capabilities which should be reported by the vendor channel in query_device. Signed-off-by: Guy Levi Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 17 +++++++++++++++++ drivers/infiniband/hw/mlx4/mlx4_ib.h | 16 +++++++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) commit fec99ededf6be46178d7f571b34dae80fc05f090 Author: Leon Romanovsky Date: Wed Oct 25 18:56:49 2017 +0300 RDMA/umem: Avoid partial declaration of non-static function The RDMA/umem uses generic RB-trees macros to generate various ib_umem access functions. The generation is performed with INTERVAL_TREE_DEFINE macro, which allows one of two modes: declare all functions as static or declare none of the function to be static. The second mode of operation produces the following sparse errors: drivers/infiniband/core/umem_rbtree.c:69:1: warning: symbol 'rbt_ib_umem_iter_first' was not declared. Should it be static? drivers/infiniband/core/umem_rbtree.c:69:1: warning: symbol 'rbt_ib_umem_iter_next' was not declared. Should it be static? Code relocation together with declaration of such functions to be "static" solves the issue. Because there is no need to have separate file for two functions, let's consolidate umem_rtree.c and umem_odp.c into one file. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/Makefile | 2 +- drivers/infiniband/core/umem_odp.c | 72 ++++++++++++++++++++++ drivers/infiniband/core/umem_rbtree.c | 109 ---------------------------------- include/rdma/ib_umem_odp.h | 4 -- 4 files changed, 73 insertions(+), 114 deletions(-) commit 364a5607d6988b05b54cc0138cf8229203b9a33e Author: Cornelia Huck Date: Fri Nov 10 15:56:11 2017 +0100 MAINTAINERS: add virtio-ccw.h to virtio/s390 section The file arch/s390/include/uapi/asm/virtio-ccw.h belongs to the s390 virtio drivers as well. Signed-off-by: Cornelia Huck Signed-off-by: Heiko Carstens MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit d0e810eeb3d326978f248b8f0233a2f30f58c72d Author: Heiko Carstens Date: Thu Nov 9 23:00:14 2017 +0100 s390/noexec: execute kexec datamover without DAT Rebooting into a new kernel with kexec fails (system dies) if tried on a machine that has no-execute support. Reason for this is that the so called datamover code gets executed with DAT on (MMU is active) and the page that contains the datamover is marked as non-executable. Therefore when branching into the datamover an unexpected program check happens and afterwards the machine is dead. This can be simply avoided by disabling DAT, which also disables any no-execute checks, just before the datamover gets executed. In fact the first thing done by the datamover is to disable DAT. The code in the datamover that disables DAT can be removed as well. Thanks to Michael Holzheu and Gerald Schaefer for tracking this down. Reviewed-by: Michael Holzheu Reviewed-by: Philipp Rudo Cc: Gerald Schaefer Cc: Martin Schwidefsky Fixes: 57d7f939e7bd ("s390: add no-execute support") Cc: # v4.11+ Signed-off-by: Heiko Carstens arch/s390/kernel/machine_kexec.c | 1 + arch/s390/kernel/relocate_kernel.S | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) commit a1c5befc1c24eb9c1ee83f711e0f21ee79cbb556 Author: Heiko Carstens Date: Thu Nov 9 12:29:34 2017 +0100 s390: fix transactional execution control register handling Dan Horák reported the following crash related to transactional execution: User process fault: interruption code 0013 ilc:3 in libpthread-2.26.so[3ff93c00000+1b000] CPU: 2 PID: 1 Comm: /init Not tainted 4.13.4-300.fc27.s390x #1 Hardware name: IBM 2827 H43 400 (z/VM 6.4.0) task: 00000000fafc8000 task.stack: 00000000fafc4000 User PSW : 0705200180000000 000003ff93c14e70 R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:1 AS:0 CC:2 PM:0 RI:0 EA:3 User GPRS: 0000000000000077 000003ff00000000 000003ff93144d48 000003ff93144d5e 0000000000000000 0000000000000002 0000000000000000 000003ff00000000 0000000000000000 0000000000000418 0000000000000000 000003ffcc9fe770 000003ff93d28f50 000003ff9310acf0 000003ff92b0319a 000003ffcc9fe6d0 User Code: 000003ff93c14e62: 60e0b030 std %f14,48(%r11) 000003ff93c14e66: 60f0b038 std %f15,56(%r11) #000003ff93c14e6a: e5600000ff0e tbegin 0,65294 >000003ff93c14e70: a7740006 brc 7,3ff93c14e7c 000003ff93c14e74: a7080000 lhi %r0,0 000003ff93c14e78: a7f40023 brc 15,3ff93c14ebe 000003ff93c14e7c: b2220000 ipm %r0 000003ff93c14e80: 8800001c srl %r0,28 There are several bugs with control register handling with respect to transactional execution: - on task switch update_per_regs() is only called if the next task has an mm (is not a kernel thread). This however is incorrect. This breaks e.g. for user mode helper handling, where the kernel creates a kernel thread and then execve's a user space program. Control register contents related to transactional execution won't be updated on execve. If the previous task ran with transactional execution disabled then the new task will also run with transactional execution disabled, which is incorrect. Therefore call update_per_regs() unconditionally within switch_to(). - on startup the transactional execution facility is not enabled for the idle thread. This is not really a bug, but an inconsistency to other facilities. Therefore enable the facility if it is available. - on fork the new thread's per_flags field is not cleared. This means that a child process inherits the PER_FLAG_NO_TE flag. This flag can be set with a ptrace request to disable transactional execution for the current process. It should not be inherited by new child processes in order to be consistent with the handling of all other PER related debugging options. Therefore clear the per_flags field in copy_thread_tls(). Reported-and-tested-by: Dan Horák Fixes: d35339a42dd1 ("s390: add support for transactional memory") Cc: # v3.7+ Cc: Martin Schwidefsky Reviewed-by: Christian Borntraeger Reviewed-by: Hendrik Brueckner Signed-off-by: Heiko Carstens arch/s390/include/asm/switch_to.h | 2 +- arch/s390/kernel/early.c | 4 +++- arch/s390/kernel/process.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) commit 78372709bf95c2ef5c886780efc268f7f052168a Author: Michael Holzheu Date: Tue Nov 7 19:16:25 2017 +0100 s390/bpf: take advantage of stack_depth tracking Make use of the "stack_depth" tracking feature introduced with commit 8726679a0fa31 ("bpf: teach verifier to track stack depth") for the s390 JIT, so that stack usage can be reduced. Signed-off-by: Michael Holzheu Signed-off-by: Heiko Carstens arch/s390/net/bpf_jit.h | 7 +++++-- arch/s390/net/bpf_jit_comp.c | 26 +++++++++++++------------- 2 files changed, 18 insertions(+), 15 deletions(-) commit 22841cea1a10832d07f16720c718f6795f35fe2a Merge: baaf9be 408358b Author: Heiko Carstens Date: Fri Nov 10 18:54:11 2017 +0100 Merge tag 'vfio-ccw-20171109' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into features Pull vfio-ccw update from Cornelia Huck: "A vfio-ccw bugfix: avoid freeing that which should not be freed." commit 26beb85f4168dba76a197883065398a55ce11cf4 Author: oulijun Date: Fri Nov 10 16:55:53 2017 +0800 RDMA/hns: Modify the usage of cmd_sn in hip08 The cmd_sn field of CQ doorbell inits for 0. It should be increment on each first db rung after a completion Event. if the cmd_sn of notify doorbell Adjacent two times is the same, the hardware will distinguish it for the same notify request and update its type according to the priority level of next event and solicited event. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cq.c | 2 ++ drivers/infiniband/hw/hns/hns_roce_device.h | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) commit 0203b14c4f32b9b6e526db910844222705fc6e5f Author: oulijun Date: Fri Nov 10 16:55:52 2017 +0800 RDMA/hns: Unify the calculation for hem index in hip08 The calculation of hem index are different between hns_roce_table_get and hns_roce_table_find. When the table chunk size of TRRL is not divisible by object size, it will faile to find the trrl table. This patch is to update the calculation of the hem index in the hns_roce_table_find to the same as which in the hns_roce_table_get. Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hem.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit e8d1853357d237e6af69e384d6b05a23e3a70b93 Author: oulijun Date: Fri Nov 10 16:55:51 2017 +0800 RDMA/hns: Set the owner field of SQWQE in hip08 RoCE the owner need to be set when posting sqwqe in hip08 RoCE. The owner be used according to the below algorithm: The value of owner should be 1 in the first lap, it should be 0 in the second lap and in turn. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Yixian Liu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 5 +++++ 1 file changed, 5 insertions(+) commit b5fddb7ce768a2e97dcf90614c5da4a7824bdc81 Author: oulijun Date: Fri Nov 10 16:55:50 2017 +0800 RDMA/hns: Add sq_invld_flg field in QP context In hip08 RoCE, it need to add the sq_invld_flg field in QP context for RoCE hardware. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Yixian Liu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 ++ drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit 2872646134aa5cb99f674d81c1fdb0d595243499 Author: oulijun Date: Fri Nov 10 16:55:49 2017 +0800 RDMA/hns: Update the usage of ack timeout in hip08 The ack timeout's value in qp context shall be a 5-bit value and be assgined by users. When at of qpc is set zero, the timer is disabled. When attr_mask set for IB_QP_TIMEOUT, The ack timeout field is effective. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Yixian Liu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit befb63b43df535917cd73e961e701d0b157b92d0 Author: oulijun Date: Fri Nov 10 16:55:48 2017 +0800 RDMA/hns: Set sq_cur_sge_blk_addr field in QPC in hip08 If the extend sges exist, the sq_cur_sge_blk_addr field in QPC (qp context) should be configured. Signed-off-by: Lijun Ou Signed-off-by: Shaobo Xu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Yixian Liu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 16 ++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) commit a49d761fc10ee64f1d97aba0b4b6244854d288bc Author: oulijun Date: Fri Nov 10 16:55:47 2017 +0800 RDMA/hns: Enable the cqe field of sqwqe of RC When sig_type of qpc is non-selectable, all sq's wqes will produce cqe and not depend on the cqe attribute of wqe. When sig_type of qpc is selectable, The cqe attribute of wqe will decide whether to produce the cqe. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Yixian Liu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 492b2bd0267d466845042c6f1dfff8a6bc8f871b Author: oulijun Date: Fri Nov 10 16:55:46 2017 +0800 RDMA/hns: Set se attribute of sqwqe in hip08 When send flags is IB_SEND_SOLICITED, the se(solicated event) field of sqwqe will be set. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Yixian Liu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 +++ 1 file changed, 3 insertions(+) commit 651487c229d5fe7c6d65acbfb061089d8c899729 Author: oulijun Date: Fri Nov 10 16:55:45 2017 +0800 RDMA/hns: Configure fence attribute in hip08 RoCE When post wr for mixed rdma operation, we need to use fence mechanism to keep the correct execute order. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Yixian Liu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e92f2c182bcfdda4f05fd8ebf269c0b5bfe18e7d Author: oulijun Date: Fri Nov 10 16:55:44 2017 +0800 RDMA/hns: Configure TRRL field in hip08 RoCE device The TRRL(Target RDMA Read/aTOMIC List) record the information of receiving RDMA READ or ATOMIC operation in hip08. It will be used the hardware. The driver need to assign a continuous physical address for trrl_ba field of qp context. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Yixian Liu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 2 ++ drivers/infiniband/hw/hns/hns_roce_hem.c | 3 +++ drivers/infiniband/hw/hns/hns_roce_hem.h | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 23 +++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 1 + drivers/infiniband/hw/hns/hns_roce_main.c | 21 ++++++++++++++++++++- drivers/infiniband/hw/hns/hns_roce_qp.c | 19 ++++++++++++++++++- 7 files changed, 68 insertions(+), 2 deletions(-) commit d55142461759890ac6dc3e93b4c5a4271937b1cf Author: oulijun Date: Fri Nov 10 16:55:43 2017 +0800 RDMA/hns: Update calculation of irrl_ba field for hip08 The irrl(initiator RDMA Read/Atomic list) base address of qp context is assigned for addr[63:6]. This patch mainly fixed it. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Yixian Liu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b5ff0f610b523478a167ae6f07e30c9f75d0c538 Author: Wei Hu(Xavier) Date: Thu Oct 26 17:10:25 2017 +0800 RDMA/hns: Configure sgid type for hip08 RoCE The hardware vendors need to generate RoCEv1 or RoCEv2 packet according to the sgid type configured. Besides, update the gid table size for hip08 RoCE device. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Yixian Liu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 4 ++-- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 7 +++++-- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 25 +++++++++++++++++++++---- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 7 +++++++ drivers/infiniband/hw/hns/hns_roce_main.c | 11 +++++++---- 5 files changed, 42 insertions(+), 12 deletions(-) commit 023c1477b0d0b123c0dec6466ec568a25928bef2 Author: Wei Hu(Xavier) Date: Thu Oct 26 17:10:24 2017 +0800 RDMA/hns: Generate gid type of RoCEv2 HNS_ROCE_CAP_FALG_ROCE_V1_V2 is added for selecting capability of RoCE in hns driver. When HNS_ROCE_CAP_FALG_ROCE_V1_V2 is set, driver will inform ib core that the related hns device can support RoCEv2, and ib core can generate the gid of the related type. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Yixian Liu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 ++- drivers/infiniband/hw/hns/hns_roce_main.c | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) commit a2c80b7b41194417b597d4c96c9892e4355f57a4 Author: Wei Hu(Xavier) Date: Thu Oct 26 17:10:23 2017 +0800 RDMA/hns: Add rereg mr support for hip08 This patch adds rereg mr support for hip08. Signed-off-by: Shaobo Xu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Lijun Ou Signed-off-by: Yixian Liu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cmd.h | 3 + drivers/infiniband/hw/hns/hns_roce_device.h | 12 +++ drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 53 ++++++++++++ drivers/infiniband/hw/hns/hns_roce_main.c | 4 + drivers/infiniband/hw/hns/hns_roce_mr.c | 123 ++++++++++++++++++++++++++++ 5 files changed, 195 insertions(+) commit 60636a5d0fa2f8bc6d0c23c4027100ba20866f9b Author: Tony Lindgren Date: Fri Nov 10 09:00:16 2017 -0800 ARM: dts: Add remote-wakeup-connected for omap OHCI Add remote-wakeup-connected for omap OHCI as that's needed by ohci-platform driver. Cc: devicetree@vger.kernel.org Cc: Hans de Goede Cc: Rob Herring Cc: Sebastian Reichel Cc: Yoshihiro Shimoda Acked-by: Alan Stern Acked-by: Roger Quadros Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3.dtsi | 1 + arch/arm/boot/dts/omap4.dtsi | 1 + arch/arm/boot/dts/omap5.dtsi | 1 + 3 files changed, 3 insertions(+) commit f0e11ff8ff6595cb49bc18929b525d35721b8383 Author: Rob Herring Date: Thu Nov 9 16:26:14 2017 -0600 ARM: dts: am33xx: Add missing #phy-cells to ti,am335x-usb-phy "ti,am335x-usb-phy" is using the phy binding, but is missing #phy-cells property. Fixes the following warning in TI dts files: Warning (phys_property): Missing property '#phy-cells' in node ... Signed-off-by: Rob Herring Cc: "Benoît Cousson" Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Signed-off-by: Tony Lindgren Documentation/devicetree/bindings/usb/am33xx-usb.txt | 2 ++ arch/arm/boot/dts/am33xx.dtsi | 2 ++ arch/arm/boot/dts/dm814x.dtsi | 1 + 3 files changed, 5 insertions(+) commit f568f6f554b817edafebf28a06b73ec9b4986dd1 Author: Rob Herring Date: Thu Nov 9 16:26:13 2017 -0600 ARM: dts: omap: Add missing #phy-cells to usb-nop-xceiv "usb-nop-xceiv" is using the phy binding, but is missing #phy-cells property. This is probably because the binding was the precursor to the phy binding. Fixes the following warning in OMAP dts files: Warning (phys_property): Missing property '#phy-cells' in node ... Signed-off-by: Rob Herring Cc: "Benoît Cousson" Cc: Tony Lindgren Cc: Enric Balletbo i Serra Cc: Javier Martinez Canillas Cc: linux-omap@vger.kernel.org Signed-off-by: Tony Lindgren arch/arm/boot/dts/logicpd-som-lv.dtsi | 1 + arch/arm/boot/dts/omap3-beagle-xm.dts | 1 + arch/arm/boot/dts/omap3-beagle.dts | 1 + arch/arm/boot/dts/omap3-cm-t3x.dtsi | 2 ++ arch/arm/boot/dts/omap3-evm-common.dtsi | 1 + arch/arm/boot/dts/omap3-gta04.dtsi | 1 + arch/arm/boot/dts/omap3-igep0020-common.dtsi | 1 + arch/arm/boot/dts/omap3-igep0030-common.dtsi | 1 + arch/arm/boot/dts/omap3-lilly-a83x.dtsi | 1 + arch/arm/boot/dts/omap3-overo-base.dtsi | 1 + arch/arm/boot/dts/omap3-pandora-common.dtsi | 1 + arch/arm/boot/dts/omap3-tao3530.dtsi | 1 + arch/arm/boot/dts/omap4-droid4-xt894.dts | 1 + arch/arm/boot/dts/omap4-duovero.dtsi | 1 + arch/arm/boot/dts/omap4-panda-common.dtsi | 1 + arch/arm/boot/dts/omap4-var-som-om44.dtsi | 1 + arch/arm/boot/dts/omap5-board-common.dtsi | 2 ++ arch/arm/boot/dts/omap5-cm-t54.dts | 2 ++ 18 files changed, 21 insertions(+) commit 6c78935777d12ead2d32adf3eb525a24faf02d04 Author: Kees Cook Date: Fri Nov 10 16:34:52 2017 +0100 video: fbdev: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. One tracking pointer was added. Signed-off-by: Kees Cook Cc: Benjamin Herrenschmidt Cc: Tomi Valkeinen Cc: David Lechner Cc: Daniel Vetter Cc: Sean Paul Cc: Jean Delvare Cc: Hans de Goede Cc: "Gustavo A. R. Silva" [b.zolnierkie: ported it over pxa3xx_gcu changes] Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/aty/radeon_base.c | 8 +++----- drivers/video/fbdev/core/fbcon.c | 10 +++++----- drivers/video/fbdev/core/fbcon.h | 1 + drivers/video/fbdev/omap/hwa742.c | 6 ++---- drivers/video/fbdev/omap2/omapfb/dss/dsi.c | 6 ++---- 5 files changed, 13 insertions(+), 18 deletions(-) commit e4a67df75a7b93b1bcddf576fa9122da2305dc8b Author: Kees Cook Date: Fri Nov 10 16:34:51 2017 +0100 video: fbdev: pxa3xx_gcu: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This also fixes the use of the "priv" variable in QERROR(), since it was pointing to struct timer_list, not struct pxa3xx_gcu_priv. Signed-off-by: Kees Cook Cc: "Gustavo A. R. Silva" Cc: Himanshu Jha [b.zolnierkie: trivial build fixup] Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/pxa3xx-gcu.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit eaa1dc7ba18db14842fbee9c57e71d28ae1c407d Author: Alexandre Belloni Date: Fri Nov 10 09:59:31 2017 +0100 rtc: at91rm9200: fix reading alarm value When alarm value is read at boot time, at91_alarm_year is not yet set to the proper value so the year is always set to 1900. This results in that kind of message at boot: rtc rtc0: invalid alarm value: 1900-1-14 2:11:39 There is no way to recover from that as the alarm is now only read when booting. Instead, rely on the rtc core to figure out the proper year. Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni drivers/rtc/rtc-at91rm9200.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 275ebe2b8fcab4ba4a774e6ee1e3e28d495cff3e Author: Alexandre Belloni Date: Fri Nov 10 09:59:30 2017 +0100 rtc: at91rm9200: stop calculating yday in at91_rtc_readalarm Calculating yday in the read_alarm callback is useless as this value is never used later. Also, it was buggy anyway because at the time this is done, tm_year is always 0 as the alarm register doesn't hold the year. Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni drivers/rtc/rtc-at91rm9200.c | 1 - 1 file changed, 1 deletion(-) commit d82e99a6f9b38cb1a044b4cd979bd49fd3f67cd2 Author: Linus Walleij Date: Tue Nov 7 21:18:57 2017 +0100 ARM: sa1100: simpad: Correct I2C GPIO offsets Arnd reported the following build bug bug: In file included from arch/arm/mach-sa1100/simpad.c:20:0: arch/arm/mach-sa1100/include/mach/SA-1100.h:1118:18: error: large integer implicitly truncated to unsigned type [-Werror=overflow] (0x00000001 << (Nb)) ^ include/linux/gpio/machine.h:56:16: note: in definition of macro 'GPIO_LOOKUP_IDX' .chip_hwnum = _chip_hwnum, ^~~~~~~~~~~ arch/arm/mach-sa1100/include/mach/SA-1100.h:1140:21: note: in expansion of macro 'GPIO_GPIO' ^~~~~~~~~ arch/arm/mach-sa1100/simpad.c:331:27: note: in expansion of macro 'GPIO_GPIO21' GPIO_LOOKUP_IDX("gpio", GPIO_GPIO21, NULL, 0, This is what happened: commit b2e63555592f81331c8da3afaa607d8cf83e8138 "i2c: gpio: Convert to use descriptors" commit 4d0ce62c0a02e41a65cfdcfe277f5be430edc371 "i2c: gpio: Augment all boardfiles to use open drain" together uncovered an old bug in the Simpad board file: as theGPIO_LOOKUP_IDX() encodes GPIO offsets on gpiochips in an u16 (see ) these GPIO "numbers" does not fit, since in arch/arm/mach-sa1100/include/mach/SA-1100.h it is defined as: #define GPIO_GPIO(Nb) (0x00000001 << (Nb)) (...) #define GPIO_GPIO21 GPIO_GPIO(21) /* GPIO [21] */ This is however provably wrong, since the i2c-gpio driver uses proper GPIO numbers, albeit earlier from the global number space, whereas this GPIO_GPIO21 is the local line offset in the GPIO register, which is used in other code but certainly not in the gpiolib GPIO driver in drivers/gpio/gpio-sa1100.c, which has code like this: static void sa1100_gpio_set(struct gpio_chip *chip, unsigned offset, int value) { int reg = value ? R_GPSR : R_GPCR; writel_relaxed(BIT(offset), sa1100_gpio_chip(chip)->membase + reg); } So far everything however compiled fine as an unsigned int was used to pass the GPIO numbers in struct i2c_gpio_platform_data. We can trace the actual error back to commit dbd406f9d0a1d33a1303eb75cbe3f9435513d339 "ARM: 7025/1: simpad: add GPIO based device definitions." This added the i2c_gpio with the wrong offsets. This commit was before the SA1100 was converted to use the gpiolib, but as can be seen from the contemporary gpio.c in mach-sa1100, it was already using: static int sa1100_gpio_get(struct gpio_chip *chip, unsigned offset) { return GPLR & GPIO_GPIO(offset); } And GPIO_GPIO() is essentially the BIT() macro. Reported-by: Arnd Bergmann Signed-off-by: Linus Walleij Acked-by: Arnd Bergmann Signed-off-by: Wolfram Sang arch/arm/mach-sa1100/simpad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 96271654f55c74ff7325fbdfc535466c9deb0ce6 Author: Christoph Hellwig Date: Sat Nov 4 13:44:46 2017 +0300 coredump: call do_unlinkat directly instead of sys_unlink And stop messing with the address limit. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/coredump.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit da2f1362c8bdf187c171a59a2c84b8ed3566d5fe Author: Christoph Hellwig Date: Sat Nov 4 13:44:45 2017 +0300 fs: expose do_unlinkat for built-in callers And make it take a struct filename instead of a user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro fs/internal.h | 1 + fs/namei.c | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) commit e145b35bb97eaf86205b99feef524254c581895c Author: Al Viro Date: Fri Sep 29 21:39:59 2017 -0400 ext4: take handling of EXT4_IOC_GROUP_ADD into a helper, get rid of set_fs() Signed-off-by: Al Viro fs/ext4/ioctl.c | 86 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) commit 24219d21c75f188d9e25053b0da22f2d698ca688 Author: Al Viro Date: Fri Sep 29 20:42:14 2017 -0400 ipmi: get rid of pointless access_ok() Signed-off-by: Al Viro drivers/char/ipmi/bt-bmc.c | 6 ------ 1 file changed, 6 deletions(-) commit 50271d388fa4171565a8fdb995b3255f067e150d Author: Al Viro Date: Fri Sep 29 14:07:09 2017 -0400 pi433: sanitize ioctl a) those access_ok() are pointless b) guarding against the ioctl number declaration changes in that way is pointless, especially since we _know_ the size of object we want to copy. [folded braino fixes from Colin Ian King and Dan Carpenter] Signed-off-by: Al Viro drivers/staging/pi433/pi433_if.c | 92 ++++++---------------------------------- 1 file changed, 14 insertions(+), 78 deletions(-) commit 450cbdd0125cfa5d7bbf9e2a6b6961cc48d29730 Author: Michael S. Tsirkin Date: Fri Oct 27 19:14:31 2017 +0300 locking/x86: Use LOCK ADD for smp_mb() instead of MFENCE MFENCE appears to be way slower than a locked instruction - let's use LOCK ADD unconditionally, as we always did on old 32-bit. Performance testing results: perf stat -r 10 -- ./virtio_ring_0_9 --sleep --host-affinity 0 --guest-affinity 0 Before: 0.922565990 seconds time elapsed ( +- 1.15% ) After: 0.578667024 seconds time elapsed ( +- 1.21% ) i.e. about ~60% faster. Just poking at SP would be the most natural, but if we then read the value from SP, we get a false dependency which will slow us down. This was noted in this article: http://shipilev.net/blog/2014/on-the-fence-with-dependencies/ And is easy to reproduce by sticking a barrier in a small non-inline function. So let's use a negative offset - which avoids this problem since we build with the red zone disabled. For userspace, use an address just below the redzone. The one difference between LOCK ADD and MFENCE is that LOCK ADD does not affect CLFLUSH, previous patches converted all uses of CLFLUSH to call mb(), such that changes to smp_mb() won't affect it. Update mb/rmb/wmb() on 32-bit to use the negative offset, too, for consistency. As a follow-up, it might be worth considering switching users of CLFLUSH to another API (e.g. clflush_mb()?) - we will then be able to convert mb() to smp_mb() again. Also arguably, GCC should switch to use LOCK ADD for __sync_synchronize(). This might be worth pursuing separately. Suggested-by: Andy Lutomirski Signed-off-by: Michael S. Tsirkin Acked-by: Peter Zijlstra Acked-by: Thomas Gleixner Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Paul E. McKenney Cc: qemu-devel@nongnu.org Cc: virtualization@lists.linux-foundation.org Link: http://lkml.kernel.org/r/1509118355-4890-1-git-send-email-mst@redhat.com Signed-off-by: Ingo Molnar arch/x86/include/asm/barrier.h | 12 ++++++++---- tools/virtio/ringtest/main.h | 4 ++++ 2 files changed, 12 insertions(+), 4 deletions(-) commit de6ae8afb9c098a874c3e81e3cc63938cc9f5bbc Author: oder_chiou@realtek.com Date: Fri Nov 10 13:16:44 2017 +0800 ASoC: rt5663: Check the JD status in the button pushing Check the JD status in the button pushing to prevent the IRQ that is locked by button pushing event while the jack unpluging. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5663.c | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) commit 125b1192bd48544d9429e240c8f8e64d1533b2c1 Author: Keerthy Date: Fri Nov 10 17:22:44 2017 +0530 regulator: tps65218: remove unused tps_info structure remove unused tps_info structure. Signed-off-by: Keerthy Signed-off-by: Mark Brown include/linux/mfd/tps65218.h | 19 ------------------- 1 file changed, 19 deletions(-) commit efeb88c68bd0dbd317c4d24a1b5b58c5e5bd68aa Author: Keerthy Date: Fri Nov 10 17:22:43 2017 +0530 regulator: tps65218: Fix strobe assignment Currentlly tps_info structure is no longer used. So use the strobes parameter in tps65218 structure to capture the info. Fixes: 2dc4940360d4c0c (regulator: tps65218: Remove all the compatibles) Signed-off-by: Keerthy Signed-off-by: Mark Brown drivers/regulator/tps65218-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7da85fbf1c87d4f73621e0e7666a3387497075a9 Author: Sébastien Szymanski Date: Fri Nov 10 10:01:43 2017 +0100 HID: cp2112: fix broken gpio_direction_input callback When everything goes smoothly, ret is set to 0 which makes the function to return EIO error. Fixes: 8e9faa15469e ("HID: cp2112: fix gpio-callback error handling") Signed-off-by: Sébastien Szymanski Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-cp2112.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1d9ddde12e3c9bab7f3d3484eb9446315e3571ca Author: Eric Biggers Date: Tue Nov 7 14:15:27 2017 -0800 lib/mpi: call cond_resched() from mpi_powm() loop On a non-preemptible kernel, if KEYCTL_DH_COMPUTE is called with the largest permitted inputs (16384 bits), the kernel spends 10+ seconds doing modular exponentiation in mpi_powm() without rescheduling. If all threads do it, it locks up the system. Moreover, it can cause rcu_sched-stall warnings. Notwithstanding the insanity of doing this calculation in kernel mode rather than in userspace, fix it by calling cond_resched() as each bit from the exponent is processed. It's still noninterruptible, but at least it's preemptible now. Do the cond_resched() once per bit rather than once per MPI limb because each limb might still easily take 100+ milliseconds on slow CPUs. Cc: # v4.12+ Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu lib/mpi/mpi-pow.c | 2 ++ 1 file changed, 2 insertions(+) commit 63c53823f00f0ffd13e8c86b05c1486614a2df85 Author: Lionel Debieve Date: Mon Nov 6 23:41:52 2017 +0100 crypto: stm32/hash - Fix return issue on update When data append reached the threshold for processing, we must inform that processing is on going to wait before managing the next request. Signed-off-by: Lionel Debieve Signed-off-by: Herbert Xu drivers/crypto/stm32/stm32-hash.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit ced6a58638432c9f731184f908208d539725ba82 Author: Eric Biggers Date: Sun Nov 5 18:30:48 2017 -0800 crypto: dh - Remove pointless checks for NULL 'p' and 'g' Neither 'p' nor 'g' can be NULL, as they were unpacked using crypto_dh_decode_key(). And it makes no sense for them to be optional. So remove the NULL checks that were copy-and-pasted into both modules. Signed-off-by: Eric Biggers Reviewed-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/dh.c | 3 --- drivers/crypto/qat/qat_common/qat_asym_algs.c | 3 --- 2 files changed, 6 deletions(-) commit 5829cc8da94f500b0c1fe82688d89fd36a1a9a41 Author: Eric Biggers Date: Sun Nov 5 18:30:47 2017 -0800 crypto: qat - Clean up error handling in qat_dh_set_secret() Update the error handling in qat_dh_set_secret() to mirror dh_set_secret(). The new version is less error-prone because freeing memory and setting the pointers to NULL is now only done in one place. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_asym_algs.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit ccd9888f14a8019c0bbdeeae758aba1f58693712 Author: Eric Biggers Date: Sun Nov 5 18:30:46 2017 -0800 crypto: dh - Don't permit 'key' or 'g' size longer than 'p' The "qat-dh" DH implementation assumes that 'key' and 'g' can be copied into a buffer with size 'p_size'. However it was never checked that that was actually the case, which most likely allowed users to cause a buffer underflow via KEYCTL_DH_COMPUTE. Fix this by updating crypto_dh_decode_key() to verify this precondition for all DH implementations. Fixes: c9839143ebbf ("crypto: qat - Add DH support") Cc: # v4.8+ Signed-off-by: Eric Biggers Reviewed-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/dh_helper.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 199512b1234f09e44d592153ec82b44212b2f0c4 Author: Eric Biggers Date: Sun Nov 5 18:30:45 2017 -0800 crypto: dh - Don't permit 'p' to be 0 If 'p' is 0 for the software Diffie-Hellman implementation, then dh_max_size() returns 0. In the case of KEYCTL_DH_COMPUTE, this causes ZERO_SIZE_PTR to be passed to sg_init_one(), which with CONFIG_DEBUG_SG=y triggers the 'BUG_ON(!virt_addr_valid(buf));' in sg_set_buf(). Fix this by making crypto_dh_decode_key() reject 0 for 'p'. p=0 makes no sense for any DH implementation because 'p' is supposed to be a prime number. Moreover, 'mod 0' is not mathematically defined. Bug report: kernel BUG at ./include/linux/scatterlist.h:140! invalid opcode: 0000 [#1] SMP KASAN CPU: 0 PID: 27112 Comm: syz-executor2 Not tainted 4.14.0-rc7-00010-gf5dbb5d0ce32-dirty #7 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.3-20171021_125229-anatol 04/01/2014 task: ffff88006caac0c0 task.stack: ffff88006c7c8000 RIP: 0010:sg_set_buf include/linux/scatterlist.h:140 [inline] RIP: 0010:sg_init_one+0x1b3/0x240 lib/scatterlist.c:156 RSP: 0018:ffff88006c7cfb08 EFLAGS: 00010216 RAX: 0000000000010000 RBX: ffff88006c7cfe30 RCX: 00000000000064ee RDX: ffffffff81cf64c3 RSI: ffffc90000d72000 RDI: ffffffff92e937e0 RBP: ffff88006c7cfb30 R08: ffffed000d8f9fab R09: ffff88006c7cfd30 R10: 0000000000000005 R11: ffffed000d8f9faa R12: ffff88006c7cfd30 R13: 0000000000000000 R14: 0000000000000010 R15: ffff88006c7cfc50 FS: 00007fce190fa700(0000) GS:ffff88003ea00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fffc6b33db8 CR3: 000000003cf64000 CR4: 00000000000006f0 Call Trace: __keyctl_dh_compute+0xa95/0x19b0 security/keys/dh.c:360 keyctl_dh_compute+0xac/0x100 security/keys/dh.c:434 SYSC_keyctl security/keys/keyctl.c:1745 [inline] SyS_keyctl+0x72/0x2c0 security/keys/keyctl.c:1641 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x4585c9 RSP: 002b:00007fce190f9bd8 EFLAGS: 00000216 ORIG_RAX: 00000000000000fa RAX: ffffffffffffffda RBX: 0000000000738020 RCX: 00000000004585c9 RDX: 000000002000d000 RSI: 0000000020000ff4 RDI: 0000000000000017 RBP: 0000000000000046 R08: 0000000020008000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000216 R12: 00007fff6e610cde R13: 00007fff6e610cdf R14: 00007fce190fa700 R15: 0000000000000000 Code: 03 0f b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 33 5b 45 89 6c 24 14 41 5c 41 5d 41 5e 41 5f 5d c3 e8 fd 8f 68 ff <0f> 0b e8 f6 8f 68 ff 0f 0b e8 ef 8f 68 ff 0f 0b e8 e8 8f 68 ff 20 RIP: sg_set_buf include/linux/scatterlist.h:140 [inline] RSP: ffff88006c7cfb08 RIP: sg_init_one+0x1b3/0x240 lib/scatterlist.c:156 RSP: ffff88006c7cfb08 Fixes: 802c7f1c84e4 ("crypto: dh - Add DH software implementation") Cc: # v4.8+ Reviewed-by: Tudor Ambarus Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu crypto/dh_helper.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 12d41a023efb01b846457ccdbbcbe2b65a87d530 Author: Eric Biggers Date: Sun Nov 5 18:30:44 2017 -0800 crypto: dh - Fix double free of ctx->p When setting the secret with the software Diffie-Hellman implementation, if allocating 'g' failed (e.g. if it was longer than MAX_EXTERN_MPI_BITS), then 'p' was freed twice: once immediately, and once later when the crypto_kpp tfm was destroyed. Fix it by using dh_free_ctx() (renamed to dh_clear_ctx()) in the error paths, as that correctly sets the pointers to NULL. KASAN report: MPI: mpi too large (32760 bits) ================================================================== BUG: KASAN: use-after-free in mpi_free+0x131/0x170 Read of size 4 at addr ffff88006c7cdf90 by task reproduce_doubl/367 CPU: 1 PID: 367 Comm: reproduce_doubl Not tainted 4.14.0-rc7-00040-g05298abde6fe #7 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: dump_stack+0xb3/0x10b ? mpi_free+0x131/0x170 print_address_description+0x79/0x2a0 ? mpi_free+0x131/0x170 kasan_report+0x236/0x340 ? akcipher_register_instance+0x90/0x90 __asan_report_load4_noabort+0x14/0x20 mpi_free+0x131/0x170 ? akcipher_register_instance+0x90/0x90 dh_exit_tfm+0x3d/0x140 crypto_kpp_exit_tfm+0x52/0x70 crypto_destroy_tfm+0xb3/0x250 __keyctl_dh_compute+0x640/0xe90 ? kasan_slab_free+0x12f/0x180 ? dh_data_from_key+0x240/0x240 ? key_create_or_update+0x1ee/0xb20 ? key_instantiate_and_link+0x440/0x440 ? lock_contended+0xee0/0xee0 ? kfree+0xcf/0x210 ? SyS_add_key+0x268/0x340 keyctl_dh_compute+0xb3/0xf1 ? __keyctl_dh_compute+0xe90/0xe90 ? SyS_add_key+0x26d/0x340 ? entry_SYSCALL_64_fastpath+0x5/0xbe ? trace_hardirqs_on_caller+0x3f4/0x560 SyS_keyctl+0x72/0x2c0 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x43ccf9 RSP: 002b:00007ffeeec96158 EFLAGS: 00000246 ORIG_RAX: 00000000000000fa RAX: ffffffffffffffda RBX: 000000000248b9b9 RCX: 000000000043ccf9 RDX: 00007ffeeec96170 RSI: 00007ffeeec96160 RDI: 0000000000000017 RBP: 0000000000000046 R08: 0000000000000000 R09: 0248b9b9143dc936 R10: 0000000000001000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000409670 R14: 0000000000409700 R15: 0000000000000000 Allocated by task 367: save_stack_trace+0x16/0x20 kasan_kmalloc+0xeb/0x180 kmem_cache_alloc_trace+0x114/0x300 mpi_alloc+0x4b/0x230 mpi_read_raw_data+0xbe/0x360 dh_set_secret+0x1dc/0x460 __keyctl_dh_compute+0x623/0xe90 keyctl_dh_compute+0xb3/0xf1 SyS_keyctl+0x72/0x2c0 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 367: save_stack_trace+0x16/0x20 kasan_slab_free+0xab/0x180 kfree+0xb5/0x210 mpi_free+0xcb/0x170 dh_set_secret+0x2d7/0x460 __keyctl_dh_compute+0x623/0xe90 keyctl_dh_compute+0xb3/0xf1 SyS_keyctl+0x72/0x2c0 entry_SYSCALL_64_fastpath+0x1f/0xbe Fixes: 802c7f1c84e4 ("crypto: dh - Add DH software implementation") Cc: # v4.8+ Signed-off-by: Eric Biggers Reviewed-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/dh.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) commit c3577f6100ca43261cd1d00cd46fde014c5b51ad Author: Florian Fainelli Date: Wed Nov 1 16:20:06 2017 -0700 hwrng: iproc-rng200 - Add support for BCM7278 BCM7278 features a RNG200 hardware random number generator block, add support for this chip by matching the chip-specific compatible string and extending the Kconfig dependencies to allow building on ARCH_BRCMSTB (base platform for 7278). Signed-off-by: Florian Fainelli Signed-off-by: Herbert Xu drivers/char/hw_random/Kconfig | 6 +++--- drivers/char/hw_random/iproc-rng200.c | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) commit 8ddef132a36f4081b7cc7a34bce6a666e78083e3 Author: Florian Fainelli Date: Wed Nov 1 16:20:05 2017 -0700 dt-bindings: rng: Document BCM7278 RNG200 compatible BCM7278 includes a RGN200 hardware random number generator, document the compatible string for that version of the IP. Signed-off-by: Florian Fainelli Acked-by: Rob Herring Signed-off-by: Herbert Xu Documentation/devicetree/bindings/rng/brcm,iproc-rng200.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1696d0fb7fcd18160c9cc92a3f2b2d68e6923dd8 Author: Nicholas Piggin Date: Tue Oct 24 21:44:44 2017 +1000 powerpc/64: Set DSCR default initially from SPR Take the DSCR value set by firmware as the dscr_default value, rather than zero. POWER9 recommends DSCR default to a non-zero value. Signed-off-by: From: Nicholas Piggin [mpe: Make record_spr_defaults() __init] Signed-off-by: Michael Ellerman arch/powerpc/kernel/setup.h | 6 ++++++ arch/powerpc/kernel/setup_64.c | 9 +++++++++ arch/powerpc/kernel/sysfs.c | 11 +++++++++++ 3 files changed, 26 insertions(+) commit 339a3293f4e493a6c40f71e4faab0c8389174313 Author: Nicholas Piggin Date: Mon Oct 23 18:05:07 2017 +1000 powerpc/powernv: Avoid waiting for secondary hold spinloop with OPAL OPAL boot does not insert secondaries at 0x60 to wait at the secondary hold spinloop. Instead they are started later, and inserted at generic_secondary_smp_init(), which is after the secondary hold spinloop. Avoid waiting on this spinloop when booting with OPAL firmware. This wait always times out that case. This saves 100ms boot time on powernv, and 10s of seconds of real time when booting on the simulator in SMP. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/head_64.S | 16 +++++++++++----- arch/powerpc/kernel/setup_64.c | 10 +++++++++- 2 files changed, 20 insertions(+), 6 deletions(-) commit 91d2c740f3eac6923a3f692d5dc38570a49f2bdc Author: Arnd Bergmann Date: Tue Nov 7 15:12:36 2017 +0100 pinctrl: samsung/s3c24xx: add CONFIG_OF dependency The driver fails to build without CONFIG_OF: drivers/pinctrl/samsung/pinctrl-samsung.c: In function 'samsung_gpiolib_register': drivers/pinctrl/samsung/pinctrl-samsung.c:936:5: error: 'struct gpio_chip' has no member named 'of_node' This configuration is now possible since we can now select the PINCTRL subsystem on S3C24xx machines other than the device tree based ones. Fixes: d219b924611a ("pinctrl: change Kconfig PINCTRL variable to a menuconfig") Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij drivers/pinctrl/samsung/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b2f5a8a792755c88bd786f89712a9fac9967b2b Author: Nicholas Piggin Date: Tue Nov 7 18:53:09 2017 +1100 powerpc/64s/radix: Improve TLB flushing for page table freeing Unmaps that free page tables always flush the entire PID, which is sub-optimal. Provide TLB range flushing with an additional PWC flush that can be use for va range invalidations with PWC flush. Time to munmap N pages of memory including last level page table teardown (after mmap, touch), local invalidate: N 1 2 4 8 16 32 64 vanilla 3.2us 3.3us 3.4us 3.6us 4.1us 5.2us 7.2us patched 1.4us 1.5us 1.7us 1.9us 2.6us 3.7us 6.2us Global invalidate: N 1 2 4 8 16 32 64 vanilla 2.2us 2.3us 2.4us 2.6us 3.2us 4.1us 6.2us patched 2.1us 2.5us 3.4us 5.2us 8.7us 15.7us 6.2us Local invalidates get much better across the board. Global ones have the same issue where multiple tlbies for va flush do get slower than the single tlbie to invalidate the PID. None of this test captures the TLB benefits of avoiding killing everything. Global gets worse, but it is brought in to line with global invalidate for munmap()s that do not free page tables. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb-radix.c | 90 ++++++++++++++++++++++++++++++--------------- 1 file changed, 61 insertions(+), 29 deletions(-) commit f6f27951fdf84a6edca3ea14077268ad629b57ac Author: Nicholas Piggin Date: Tue Nov 7 18:53:08 2017 +1100 powerpc/64s/radix: Introduce local single page ceiling for TLB range flush The single page flush ceiling is the cut-off point at which we switch from invalidating individual pages, to invalidating the entire process address space in response to a range flush. Introduce a local variant of this heuristic because local and global tlbie have significantly different properties: - Local tlbiel requires 128 instructions to invalidate a PID, global tlbie only 1 instruction. - Global tlbie instructions are expensive broadcast operations. The local ceiling has been made much higher, 2x the number of instructions required to invalidate the entire PID (i.e., 256 pages). Time to mprotect N pages of memory (after mmap, touch), local invalidate: N 32 34 64 128 256 512 vanilla 7.4us 9.0us 14.6us 26.4us 50.2us 98.3us patched 7.4us 7.8us 13.8us 26.4us 51.9us 98.3us The behaviour of both is identical at N=32 and N=512. Between there, the vanilla kernel does a PID invalidate and the patched kernel does a va range invalidate. At N=128, these require the same number of tlbiel instructions, so the patched version can be sen to be cheaper when < 128, and more expensive when > 128. However this does not well capture the cost of invalidated TLB. The additional cost at 256 pages does not seem prohibitive. It may be the case that increasing the limit further would continue to be beneficial to avoid invalidating all of the process's TLB entries. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb-radix.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit cbf09c837720f72f5e63ab7a2d331ec6cc9a3417 Author: Nicholas Piggin Date: Tue Nov 7 18:53:07 2017 +1100 powerpc/64s/radix: Optimize flush_tlb_range Currently for radix, flush_tlb_range flushes the entire PID, because the Linux mm code does not tell us about page size here for THP vs regular pages. This is quite sub-optimal for small mremap / mprotect / change_protection. So implement va range flushes with two flush passes, one for each page size (regular and THP). The second flush has an order of matnitude fewer tlbie instructions than the first, so it is a relatively small additional cost. There is still room for improvement here with some changes to generic APIs, particularly if there are mostly THP pages to be invalidated, the small page flushes could be reduced. Time to mprotect 1 page of memory (after mmap, touch): vanilla 2.9us 1.8us patched 1.2us 1.6us Time to mprotect 30 pages of memory (after mmap, touch): vanilla 8.2us 7.2us patched 6.9us 17.9us Time to mprotect 34 pages of memory (after mmap, touch): vanilla 9.1us 8.0us patched 9.0us 8.0us 34 pages is the point at which the invalidation switches from va to entire PID, which tlbie can do in a single instruction. This is why in the case of 30 pages, the new code runs slower for this test. This is a deliberate tradeoff already present in the unmap and THP promotion code, the idea is that the benefit from avoiding flushing entire TLB for this PID on all threads in the system. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb-radix.c | 138 +++++++++++++++++++++++++++++++++----------- 1 file changed, 103 insertions(+), 35 deletions(-) commit d665767e39fa4a9e725f92d77ba2060c5ce273dc Author: Nicholas Piggin Date: Tue Nov 7 18:53:06 2017 +1100 powerpc/64s/radix: Implement _tlbie(l)_va_range flush functions Move the barriers and range iteration down into the _tlbie* level, which improves readability. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb-radix.c | 69 +++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 30 deletions(-) commit 14001c60939a754717893672209160cec1e2ac18 Author: Nicholas Piggin Date: Tue Nov 7 18:53:05 2017 +1100 powerpc/64s/radix: Optimize TLB range flush barriers Short range flushes issue a sequences of tlbie(l) instructions for individual effective addresses. These do not all require individual barrier sequences, only one covering all tlbie(l) instructions. Commit f7327e0ba3 ("powerpc/mm/radix: Remove unnecessary ptesync") made a similar optimization for tlbiel for PID flushing. For tlbie, the ISA says: The tlbsync instruction provides an ordering function for the effects of all tlbie instructions executed by the thread executing the tlbsync instruction, with respect to the memory barrier created by a subsequent ptesync instruction executed by the same thread. Time to munmap 30 pages of memory (after mmap, touch): local global vanilla 10.9us 22.3us patched 3.4us 14.4us Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb-radix.c | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) commit ce4dd820d7bc4352e042bd3c7100d509b34ab6ba Author: Sébastien Szymanski Date: Thu Nov 2 12:12:42 2017 +0100 HID: cp2112: fix interface specification URL Signed-off-by: Sébastien Szymanski Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-cp2112.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a54c61f46e25345e99eec06a402f746fe33febc6 Merge: 77fad8b 7ecb37f Author: Michael Ellerman Date: Fri Nov 10 20:55:03 2017 +1100 Merge branch 'fixes' into next We have some dependencies & conflicts between patches in fixes and things to go in next, both in the radix TLB flush code and the IMC PMU driver. So merge fixes into next. commit 90dc7122a3090ade1ffc6452b7b912cc73562021 Author: Marc Zyngier Date: Fri Nov 10 09:00:41 2017 +0000 irqchip/gic-v4: Clear IRQ_DISABLE_UNLAZY again if mapping fails Should the call to irq_set_vcpu_affinity() fail at map time, we should restore the normal lazy-disable behaviour instead of staying with the eager disable that GICv4 requires. Reported-by: Eric Auger Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v4.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4f8413a3a799c958f7a10a6310a451e6b8aef5ad Author: Marc Zyngier Date: Thu Nov 9 14:17:59 2017 +0000 genirq: Track whether the trigger type has been set When requesting a shared interrupt, we assume that the firmware support code (DT or ACPI) has called irqd_set_trigger_type already, so that we can retrieve it and check that the requester is being reasonnable. Unfortunately, we still have non-DT, non-ACPI systems around, and these guys won't call irqd_set_trigger_type before requesting the interrupt. The consequence is that we fail the request that would have worked before. We can either chase all these use cases (boring), or address it in core code (easier). Let's have a per-irq_desc flag that indicates whether irqd_set_trigger_type has been called, and let's just check it when checking for a shared interrupt. If it hasn't been set, just take whatever the interrupt requester asks. Fixes: 382bd4de6182 ("genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs") Cc: stable@vger.kernel.org Reported-and-tested-by: Petr Cvek Signed-off-by: Marc Zyngier include/linux/irq.h | 11 ++++++++++- kernel/irq/manage.c | 13 ++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) commit 54985120a1c461b74f9510e5d730971f2a2383b1 Author: Girish Moodalbail Date: Tue Nov 7 11:32:11 2017 -0800 net: fix incorrect comment with regard to VLAN packet handling The commit bcc6d4790361 ("net: vlan: make non-hw-accel rx path similar to hw-accel") unified accel and non-accel path for VLAN RX. With that fix we do not register any packet_type handler for VLANs anymore, so fix the incorrect comment. Signed-off-by: Girish Moodalbail Signed-off-by: David S. Miller include/linux/netdevice.h | 8 -------- 1 file changed, 8 deletions(-) commit 418492ba40b2c2bbdaf1a169aac5b1673bde8189 Author: Juergen Gross Date: Thu Nov 9 14:27:39 2017 +0100 x86/virt/xen: Use guest_late_init to detect Xen PVH guest In case we are booted via the default boot entry by a generic loader like grub or OVMF it is necessary to distinguish between a HVM guest with a device model supporting legacy devices and a PVH guest without device model. PVH guests will always have x86_platform.legacy.no_vga set and x86_platform.legacy.rtc cleared, while both won't be true for HVM guests. Test for both conditions in the guest_late_init hook and set xen_pvh to true if they are met. Move some of the early PVH initializations to the new hook in order to avoid duplicated code. Signed-off-by: Juergen Gross Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: boris.ostrovsky@oracle.com Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20171109132739.23465-6-jgross@suse.com Signed-off-by: Ingo Molnar arch/x86/xen/enlighten_hvm.c | 24 ++++++++++++++++++++++-- arch/x86/xen/enlighten_pvh.c | 9 --------- 2 files changed, 22 insertions(+), 11 deletions(-) commit f3614646005a1b59f836ff54351c9bd2224b6005 Author: Juergen Gross Date: Thu Nov 9 14:27:38 2017 +0100 x86/virt, x86/platform: Add ->guest_late_init() callback to hypervisor_x86 structure Add a new guest_late_init callback to the hypervisor_x86 structure. It will replace the current kvm_guest_init() call which is changed to make use of the new callback. Signed-off-by: Juergen Gross Acked-by: Thomas Gleixner Acked-by: Paolo Bonzini Cc: Linus Torvalds Cc: Peter Zijlstra Cc: kvm@vger.kernel.org Cc: rkrcmar@redhat.com Link: http://lkml.kernel.org/r/20171109132739.23465-5-jgross@suse.com Signed-off-by: Ingo Molnar arch/x86/include/asm/kvm_para.h | 2 -- arch/x86/include/asm/x86_init.h | 2 ++ arch/x86/kernel/kvm.c | 3 ++- arch/x86/kernel/setup.c | 2 +- arch/x86/kernel/x86_init.c | 1 + 5 files changed, 6 insertions(+), 4 deletions(-) commit 6d7305254ea947d575a066711c3349fafbebaffa Author: Juergen Gross Date: Thu Nov 9 14:27:37 2017 +0100 x86/virt, x86/acpi: Add test for ACPI_FADT_NO_VGA Add a test for ACPI_FADT_NO_VGA when scanning the FADT and set the new flag x86_platform.legacy.no_vga accordingly. Signed-off-by: Juergen Gross Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: len.brown@intel.com Cc: linux-pm@vger.kernel.org Cc: pavel@ucw.cz Cc: rjw@rjwysocki.net Link: http://lkml.kernel.org/r/20171109132739.23465-4-jgross@suse.com Signed-off-by: Ingo Molnar arch/x86/include/asm/x86_init.h | 1 + arch/x86/kernel/acpi/boot.c | 5 +++++ 2 files changed, 6 insertions(+) commit 03b2a320b19f1424e9ac9c21696be9c60b6d0d93 Author: Juergen Gross Date: Thu Nov 9 14:27:36 2017 +0100 x86/virt: Add enum for hypervisors to replace x86_hyper The x86_hyper pointer is only used for checking whether a virtual device is supporting the hypervisor the system is running on. Use an enum for that purpose instead and drop the x86_hyper pointer. Signed-off-by: Juergen Gross Acked-by: Thomas Gleixner Acked-by: Xavier Deguillard Cc: Linus Torvalds Cc: Peter Zijlstra Cc: akataria@vmware.com Cc: arnd@arndb.de Cc: boris.ostrovsky@oracle.com Cc: devel@linuxdriverproject.org Cc: dmitry.torokhov@gmail.com Cc: gregkh@linuxfoundation.org Cc: haiyangz@microsoft.com Cc: kvm@vger.kernel.org Cc: kys@microsoft.com Cc: linux-graphics-maintainer@vmware.com Cc: linux-input@vger.kernel.org Cc: moltmann@vmware.com Cc: pbonzini@redhat.com Cc: pv-drivers@vmware.com Cc: rkrcmar@redhat.com Cc: sthemmin@microsoft.com Cc: virtualization@lists.linux-foundation.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20171109132739.23465-3-jgross@suse.com Signed-off-by: Ingo Molnar arch/x86/hyperv/hv_init.c | 2 +- arch/x86/include/asm/hypervisor.h | 23 ++++++++++++++--------- arch/x86/kernel/cpu/hypervisor.c | 12 +++++++++--- arch/x86/kernel/cpu/mshyperv.c | 4 ++-- arch/x86/kernel/cpu/vmware.c | 4 ++-- arch/x86/kernel/kvm.c | 4 ++-- arch/x86/xen/enlighten_hvm.c | 4 ++-- arch/x86/xen/enlighten_pv.c | 4 ++-- drivers/hv/vmbus_drv.c | 2 +- drivers/input/mouse/vmmouse.c | 10 ++++------ drivers/misc/vmw_balloon.c | 2 +- 11 files changed, 40 insertions(+), 31 deletions(-) commit f72e38e8ec8869ac0ba5a75d7d2f897d98a1454e Author: Juergen Gross Date: Thu Nov 9 14:27:35 2017 +0100 x86/virt, x86/platform: Merge 'struct x86_hyper' into 'struct x86_platform' and 'struct x86_init' Instead of x86_hyper being either NULL on bare metal or a pointer to a struct hypervisor_x86 in case of the kernel running as a guest merge the struct into x86_platform and x86_init. This will remove the need for wrappers making it hard to find out what is being called. With dummy functions added for all callbacks testing for a NULL function pointer can be removed, too. Suggested-by: Ingo Molnar Signed-off-by: Juergen Gross Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: akataria@vmware.com Cc: boris.ostrovsky@oracle.com Cc: devel@linuxdriverproject.org Cc: haiyangz@microsoft.com Cc: kvm@vger.kernel.org Cc: kys@microsoft.com Cc: pbonzini@redhat.com Cc: rkrcmar@redhat.com Cc: rusty@rustcorp.com.au Cc: sthemmin@microsoft.com Cc: virtualization@lists.linux-foundation.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20171109132739.23465-2-jgross@suse.com Signed-off-by: Ingo Molnar arch/x86/include/asm/hypervisor.h | 25 ++++-------------- arch/x86/include/asm/x86_init.h | 24 +++++++++++++++++ arch/x86/kernel/apic/apic.c | 2 +- arch/x86/kernel/cpu/hypervisor.c | 54 +++++++++++++++++++-------------------- arch/x86/kernel/cpu/mshyperv.c | 2 +- arch/x86/kernel/cpu/vmware.c | 4 +-- arch/x86/kernel/kvm.c | 2 +- arch/x86/kernel/x86_init.c | 9 +++++++ arch/x86/mm/init.c | 2 +- arch/x86/xen/enlighten_hvm.c | 8 +++--- arch/x86/xen/enlighten_pv.c | 2 +- include/linux/hypervisor.h | 8 ++++-- 12 files changed, 81 insertions(+), 61 deletions(-) commit 120fc3fbb7787fb70240190cc9c113d1f6523c42 Author: Dou Liyang Date: Wed Nov 8 18:09:52 2017 +0800 x86/tsc: Mark cyc2ns_init() and detect_art() __init These two functions are only called by tsc_init(), which is an __init function during boot time, so mark them __init as well. Signed-off-by: Dou Liyang Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1510135792-17429-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/kernel/tsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 95b110ab9a093b5baf3a72e51f71279368d618e2 Author: Christoffer Dall Date: Fri Nov 10 09:34:54 2017 +0100 KVM: arm/arm64: Don't queue VLPIs on INV/INVALL Since VLPIs are injected directly by the hardware there's no need to mark these as pending in software and queue them on the AP list. Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 9a06da2ecc92a81e969bd8c3768f63b63cb02e80 Author: Baolin Wang Date: Thu Nov 9 15:09:20 2017 +0800 rtc: sysfs: Use time64_t variables to set time/alarm Use time64_t variables and related APIs for sysfs interfaces to support setting time or alarm after the year 2038 on 32-bit system. Signed-off-by: Baolin Wang Reviewed-by: Arnd Bergmann Signed-off-by: Alexandre Belloni drivers/rtc/rtc-sysfs.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 3d1ad640f8c94a9ae9c7c8bbb311614bc0332a7e Author: Christoffer Dall Date: Fri Nov 10 09:16:23 2017 +0100 KVM: arm/arm64: Fix GICv4 ITS initialization issues We should only try to initialize GICv4 data structures on a GICv4 capable system. Move the vgic_supports_direct_msis() check inito vgic_v4_init() so that any KVM VGIC initialization path does not fail on non-GICv4 systems. Also be slightly more strict in the checking of the return value in vgic_its_create, and only error out on negative return values from the vgic_v4_init() function. This is important because the kvm device code only treats negative values as errors and only cleans up in this case. Errornously treating a positive return value as an error from the vgic_v4_init() function can lead to NULL pointer dereferences, as has recently been observed. Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-init.c | 8 +++----- virt/kvm/arm/vgic/vgic-its.c | 2 +- virt/kvm/arm/vgic/vgic-v4.c | 3 +++ 3 files changed, 7 insertions(+), 6 deletions(-) commit ed8703a506a8241f921feb63a656d0ff5a090895 Author: Marc Zyngier Date: Fri Oct 27 15:28:55 2017 +0100 KVM: arm/arm64: GICv4: Theory of operations Yet another braindump so I can free some cells... Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-v4.c | 67 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit a75460547e13c99762c2f9dbfcdd13ad416f91c5 Author: Marc Zyngier Date: Fri Oct 27 15:28:54 2017 +0100 KVM: arm/arm64: GICv4: Enable VLPI support All it takes is the has_v4 flag to be set in gic_kvm_info as well as "kvm-arm.vgic_v4_enable=1" being passed on the command line for GICv4 to be enabled in KVM. Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall Documentation/admin-guide/kernel-parameters.txt | 4 ++++ virt/kvm/arm/vgic/vgic-v3.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+) commit d3d83f7fef9dfa8bf5a279497dcaa3dd690bce2f Author: Marc Zyngier Date: Fri Oct 27 15:28:53 2017 +0100 KVM: arm/arm64: GICv4: Prevent userspace from changing doorbell affinity We so far allocate the doorbell interrupts without taking any special measure regarding the affinity of these interrupts. We simply move them around as required when the vcpu gets scheduled on a different CPU. But that's counting without userspace (and the evil irqbalance) that can try and move the VPE interrupt around, causing the ITS code to emit VMOVP commands and remap the doorbell to another redistributor. Worse, this can happen while the vcpu is running, causing all kind of trouble if the VPE is already resident, and we end-up in UNPRED territory. So let's take a definitive action and prevent userspace from messing with us. This is just a matter of adding IRQ_NO_BALANCING to the set of flags we already have, letting the kernel in sole control of the affinity. Acked-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-v4.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit bd94e7aea40387524b1d6c76b09785f5c3319116 Author: Marc Zyngier Date: Fri Oct 27 15:28:52 2017 +0100 KVM: arm/arm64: GICv4: Prevent a VM using GICv4 from being saved The GICv4 architecture doesn't make it easy for save/restore to work, as it doesn't give any guarantee that the pending state is written into the pending table. So let's not take any chance, and let's return an error if we encounter any LPI that has the HW bit set. In order for userspace to distinguish this error from other failure modes, use -EACCES as an error code. Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall Documentation/virtual/kvm/devices/arm-vgic-its.txt | 2 ++ virt/kvm/arm/vgic/vgic-its.c | 9 +++++++++ 2 files changed, 11 insertions(+) commit 374be35e231e818ffbdb3f876e2775f22b727e80 Author: Marc Zyngier Date: Fri Oct 27 15:28:51 2017 +0100 KVM: arm/arm64: GICv4: Enable virtual cpuif if VLPIs can be delivered In order for VLPIs to be delivered to the guest, we must make sure that the virtual cpuif is always enabled, irrespective of the presence of virtual interrupt in the LRs. 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 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 6277579778d63125671509e2502597fdf6a56c00 Author: Marc Zyngier Date: Fri Oct 27 15:28:50 2017 +0100 KVM: arm/arm64: GICv4: Hook vPE scheduling into vgic flush/sync The redistributor needs to be told which vPE is about to be run, and tells us whether there is any pending VLPI on exit. Let's add the scheduling calls to the vgic flush/sync functions, allowing the VLPIs to be delivered to the guest. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-v4.c | 39 +++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.c | 4 ++++ virt/kvm/arm/vgic/vgic.h | 2 ++ 3 files changed, 45 insertions(+) commit df9ba95993b9d59e077aa4613f7a4edd20a4064c Author: Marc Zyngier Date: Fri Oct 27 15:28:49 2017 +0100 KVM: arm/arm64: GICv4: Use the doorbell interrupt as an unblocking source The doorbell interrupt is only useful if the vcpu is blocked on WFI. In all other cases, recieving a doorbell interrupt is just a waste of cycles. So let's only enable the doorbell if a vcpu is getting blocked, and disable it when it is unblocked. This is very similar to what we're doing for the background timer. Reviewed-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall include/kvm/arm_vgic.h | 3 +++ virt/kvm/arm/arm.c | 2 ++ virt/kvm/arm/vgic/vgic-v4.c | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+) commit bdb2d2ccac65dfee0db8fa4a8247df788a942439 Author: Marc Zyngier Date: Fri Oct 27 15:28:48 2017 +0100 KVM: arm/arm64: GICv4: Add doorbell interrupt handling When a vPE is not running, a VLPI being made pending results in a doorbell interrupt being delivered. Let's handle this interrupt and update the pending_last flag that indicates that VLPIs are pending. The corresponding vcpu is also kicked into action. Special care is taken to prevent the doorbell from being enabled at request time (this is controlled separately), and to make the disabling on the interrupt non-lazy. Reviewed-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-v4.c | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit c971968071d3ec5e8605f9da9e867441e2edf000 Author: Marc Zyngier Date: Fri Oct 27 15:28:47 2017 +0100 KVM: arm/arm64: GICv4: Use pending_last as a scheduling hint When a vPE exits, the pending_last flag is set when there are pending VLPIs stored in the pending table. Similarily, this flag will be set when a doorbell interrupt fires, as it indicates the same condition. Let's update kvm_vgic_vcpu_pending_irq() to account for that flag as well, making a vcpu runnable when set. Acked-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic.c | 3 +++ 1 file changed, 3 insertions(+) commit 5b01b3b8b122fde7fbe116803f7863667b4c5beb Author: Benjamin Tissoires Date: Fri Nov 3 18:29:47 2017 +0100 HID: Wacom: switch Dell canvas into highres mode The Dell Canvas exports 2 collections for the Pen part. The only difference between the 2 is that the default one has half the resolution of the second one. The Windows driver switches the tablet into the second mode, so we should behave the same. Signed-off-by: Benjamin Tissoires Reviewed-by: Jason Gerecke drivers/hid/wacom_sys.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d9768076068f81687b3dbddbd76b5e108f5d53d0 Author: Amir Goldstein Date: Sun Sep 24 13:00:19 2017 +0300 ovl: remove unneeded arg from ovl_verify_origin() Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 4 ++-- fs/overlayfs/overlayfs.h | 4 ++-- fs/overlayfs/super.c | 8 +++----- 3 files changed, 7 insertions(+), 9 deletions(-) commit 5455f92b54e516995a9ca45bbf790d3629c27a93 Author: Vivek Goyal Date: Wed Nov 1 15:37:22 2017 -0400 ovl: Put upperdentry if ovl_check_origin() fails If ovl_check_origin() fails, we should put upperdentry. We have a reference on it by now. So goto out_put_upper instead of out. Fixes: a9d019573e88 ("ovl: lookup non-dir copy-up-origin by file handle") Cc: #4.12 Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad204488d3046b3baee2d2b1b05323d956a7c45b Author: Miklos Szeredi Date: Fri Nov 10 09:39:16 2017 +0100 ovl: rename ufs to ofs Rename all "struct ovl_fs" pointers to "ofs". The "ufs" name is historical and can only be found in overlayfs/super.c. Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 228 +++++++++++++++++++++++++-------------------------- 1 file changed, 114 insertions(+), 114 deletions(-) commit 4155c10a0309523924b934b81d08aac03f15c990 Author: Miklos Szeredi Date: Fri Nov 10 09:39:15 2017 +0100 ovl: clean up getting lower layers Move calling ovl_get_lower_layers() into ovl_get_lowerstack(). ovl_get_lowerstack() now returns the root dentry's filled in ovl_entry. Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 100 +++++++++++++++++++++++++-------------------------- 1 file changed, 48 insertions(+), 52 deletions(-) commit bca44b52f8355b9b391fadfe6e6e8662f23238c2 Author: Miklos Szeredi Date: Fri Nov 10 09:39:15 2017 +0100 ovl: clean up workdir creation Move calling ovl_get_workdir() into ovl_get_workpath(). Rename ovl_get_workdir() to ovl_make_workdir() and ovl_get_workpath() to ovl_get_workdir(). Workpath is now not needed outside ovl_get_workdir(). Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 5064975e7fecdf9c7fc550ddef345aa50d0b04bb Author: Miklos Szeredi Date: Fri Nov 10 09:39:15 2017 +0100 ovl: clean up getting upper layer Merge ovl_get_upper() and ovl_get_upperpath(). The resulting function is named ovl_get_upper(), though it still returns upperpath as well. Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) commit 520d7c867f26d216730e0d0e43b2f2ac90953a2d Author: Miklos Szeredi Date: Fri Nov 10 09:39:15 2017 +0100 ovl: move ovl_get_workdir() and ovl_get_lower_layers() Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 202 +++++++++++++++++++++++++-------------------------- 1 file changed, 101 insertions(+), 101 deletions(-) commit 6e88256e197d2a3b5aa0d054e6e2f553469bf389 Author: Miklos Szeredi Date: Fri Nov 10 09:39:15 2017 +0100 ovl: reduce the number of arguments for ovl_workdir_create() Remove "sb" and "dentry" arguments of ovl_workdir_create() and related functions. Move setting MS_RDONLY flag to callers. Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit c6fe62549313555ed56b83bb8338383d78e768cb Author: Miklos Szeredi Date: Fri Nov 10 09:39:15 2017 +0100 ovl: change order of setup in ovl_fill_super() Move ovl_get_upper() immediately after ovl_get_upperpath(), ovl_get_workdir() immediately after ovl_get_workdir() and ovl_get_lower_layers() immediately after ovl_get_lowerstack(). Also move prepare_creds() up to where other allocations are happening. Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit a9075cdb467dd3b01b57f8786e6ea1eca05a76b4 Author: Miklos Szeredi Date: Fri Nov 10 09:39:15 2017 +0100 ovl: factor out ovl_free_fs() helper This can be called both from ovl_put_super() and in the error cleanup path from ovl_fill_super(). Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 72 ++++++++++++++++++++-------------------------------- 1 file changed, 27 insertions(+), 45 deletions(-) commit 6ce18e3a5f3308670b49093b1c350d2834428358 Author: Marc Zyngier Date: Fri Oct 27 15:28:46 2017 +0100 KVM: arm/arm64: GICv4: Handle INVALL applied to a vPE There is no need to perform an INV for each interrupt when updating multiple interrupts. Instead, we can rely on the final VINVALL that gets sent to the ITS to do the work for all of them. Acked-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit af340f992c56f824eb9b2cab6dce8d46ec31c98c Author: Marc Zyngier Date: Fri Oct 27 15:28:45 2017 +0100 KVM: arm/arm64: GICv4: Propagate property updates to VLPIs Upon updating a property, we propagate it all the way to the physical ITS, and ask for an INV command to be executed there. Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 3 +++ 1 file changed, 3 insertions(+) commit ff9c114394aaed2061df112b75be9835a1394be4 Author: Marc Zyngier Date: Fri Oct 27 15:28:44 2017 +0100 KVM: arm/arm64: GICv4: Handle MOVALL applied to a vPE The current implementation of MOVALL doesn't allow us to call into the core ITS code as we hold a number of spinlocks. Let's try a method used in other parts of the code, were we copy the intids of the candicate interrupts, and then do whatever we need to do with them outside of the critical section. This allows us to move the interrupts one by one, at the expense of a bit of CPU time. Who cares? MOVALL is such a stupid command anyway... Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit fb0cada604fcda82813f654b0d95963ee165770f Author: Marc Zyngier Date: Fri Oct 27 15:28:43 2017 +0100 KVM: arm/arm64: GICv4: Handle CLEAR applied to a VLPI Handling CLEAR is pretty easy. Just ask the ITS driver to clear the corresponding pending bit (which will turn into a CLEAR command on the physical side). Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0fc9a58ee45532e7a298c7aa626b3fe5ff8cdf87 Author: Marc Zyngier Date: Fri Oct 27 15:28:42 2017 +0100 KVM: arm/arm64: GICv4: Propagate affinity changes to the physical ITS When the guest issues an affinity change, we need to tell the physical ITS that we're now targetting a new vcpu. This is done by extracting the current mapping, updating the target, and reapplying the mapping. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 07b46ed116cf0893200c97db2f72e0f7839b7f91 Author: Marc Zyngier Date: Fri Oct 27 15:28:41 2017 +0100 KVM: arm/arm64: GICv4: Unmap VLPI when freeing an LPI When freeing an LPI (on a DISCARD command, for example), we need to unmap the VLPI down to the physical ITS level. Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1b7fe468b0ca6a4b47a447cf583455e445bf0246 Author: Marc Zyngier Date: Fri Oct 27 15:28:40 2017 +0100 KVM: arm/arm64: GICv4: Handle INT command applied to a VLPI If the guest issues an INT command targetting a VLPI, let's call into the irq_set_irqchip_state() helper to make it pending on the physical side. This works just as well if userspace decides to inject an interrupt using the normal userspace API... Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 4 ++++ 1 file changed, 4 insertions(+) commit 196b136498b35f1cd787b84465f235e69dbc757c Author: Marc Zyngier Date: Fri Oct 27 15:28:39 2017 +0100 KVM: arm/arm64: GICv4: Wire mapping/unmapping of VLPIs in VFIO irq bypass Let's use the irq bypass mechanism also used for x86 posted interrupts to intercept the virtual PCIe endpoint configuration and establish our LPI->VLPI mapping. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall include/kvm/arm_vgic.h | 8 ++++ virt/kvm/arm/arm.c | 6 ++- virt/kvm/arm/vgic/vgic-v4.c | 104 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+), 2 deletions(-) commit 74fe55dc9ab77142e3c4783ecc5b87d494164452 Author: Marc Zyngier Date: Fri Oct 27 15:28:38 2017 +0100 KVM: arm/arm64: GICv4: Add init/teardown of the per-VM vPE irq domain In order to control the GICv4 view of virtual CPUs, we rely on an irqdomain allocated for that purpose. Let's add a couple of helpers to that effect. At the same time, the vgic data structures gain new fields to track all this... erm... wonderful stuff. The way we hook into the vgic init is slightly convoluted. We need the vgic to be initialized (in order to guarantee that the number of vcpus is now fixed), and we must have a vITS (otherwise this is all very pointless). So we end-up calling the init from both vgic_init and vgic_its_create. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/Makefile | 1 + arch/arm64/kvm/Makefile | 1 + include/kvm/arm_vgic.h | 19 ++++++++++ virt/kvm/arm/vgic/vgic-init.c | 9 +++++ virt/kvm/arm/vgic/vgic-its.c | 8 +++++ virt/kvm/arm/vgic/vgic-v4.c | 83 +++++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.h | 2 ++ 7 files changed, 123 insertions(+) commit e7c48059248e013772d8da69351ac8b262d8fce2 Author: Marc Zyngier Date: Fri Oct 27 15:28:37 2017 +0100 KVM: arm/arm64: GICv4: Add property field and per-VM predicate Add a new has_gicv4 field in the global VGIC state that indicates whether the HW is GICv4 capable, as a per-VM predicate indicating if there is a possibility for a VM to support direct injection (the above being true and the VM having an ITS). Reviewed-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall include/kvm/arm_vgic.h | 3 +++ virt/kvm/arm/vgic/vgic-mmio-v3.c | 5 +++++ virt/kvm/arm/vgic/vgic.h | 2 ++ 3 files changed, 10 insertions(+) commit 08c9fd04211754a34dddbb1471d6265a717ef7fd Author: Marc Zyngier Date: Fri Oct 27 15:28:36 2017 +0100 KVM: arm/arm64: vITS: Add a helper to update the affinity of an LPI In order to help integrating the vITS code with GICv4, let's add a new helper that deals with updating the affinity of an LPI, which will later be augmented with super duper extra GICv4 goodness. Reviewed-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit bebfd2a203736a42510ecf48ae82c9d7e801eeb0 Author: Marc Zyngier Date: Fri Oct 27 15:28:35 2017 +0100 KVM: arm/arm64: vITS: Add MSI translation helpers The whole MSI injection process is fairly monolithic. An MSI write gets turned into an injected LPI in one swift go. But this is actually a more fine-grained process: - First, a virtual ITS gets selected using the doorbell address - Then the DevID/EventID pair gets translated into an LPI - Finally the LPI is injected Since the GICv4 code needs the first two steps in order to match an IRQ routing entry to an LPI, let's expose them as helpers, and refactor the existing code to use them Reviewed-by: Christoffer Dall Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 95 +++++++++++++++++++++++++------------------- virt/kvm/arm/vgic/vgic.h | 4 ++ 2 files changed, 58 insertions(+), 41 deletions(-) commit b5cd3b51e247473e290be5cd09e77171e466cd89 Merge: 376f3bc 1c9dbd4 Author: Ingo Molnar Date: Fri Nov 10 08:21:08 2017 +0100 Merge branch 'linus' into x86/platform, to refresh the branch Signed-off-by: Ingo Molnar commit 91a6a6cfee8ad34ea4cc10a54c0765edfe437cdb Merge: d04fdaf 1c9dbd4 Author: Ingo Molnar Date: Fri Nov 10 08:06:47 2017 +0100 Merge branch 'linus' into x86/asm, to resolve conflict Conflicts: arch/x86/mm/mem_encrypt.c Signed-off-by: Ingo Molnar commit d04fdafc066fed10cc9610b2f36f1d0ff0327864 Merge: 7980f02 c5e2608 Author: Ingo Molnar Date: Fri Nov 10 08:05:30 2017 +0100 Merge branch 'x86/mm' into x86/asm, to merge branches Most of x86/mm is already in x86/asm, so merge the rest too. Signed-off-by: Ingo Molnar commit b79c069a8ceb5a7520a4b1e98066851ca148e52a Merge: cbad52e 4c5b9d9 Author: David S. Miller Date: Fri Nov 10 15:32:20 2017 +0900 Merge branch 'act_vlan-rcu' Manish Kurup says: ==================== net_sched actions: act_vlan now uses RCU This commit consists of 3 patches: patch1 (1/3): The VLAN action maintains one set of stats across all cores, and uses a spinlock to synchronize updates to it from the same. Changed this to use a per-CPU stats context instead. This change will result in better performance. patch2 (2/3): Modified netronome nfp flower action to use VLAN helper functions instead of accessing/referencing TC act_vlan private structures directly. patch3 (3/3): Using a spinlock in the VLAN action causes performance issues when the VLAN action is used on multiple cores. Rewrote the VLAN action to use RCU read locking for reads and updates instead. All functions now use an RCU dereferenced pointer to access the VLAN action context. Modified helper functions used by other modules, to use the RCU as opposed to directly accessing the structure. As part of this review, there were some changes suggested by reviewers. I have incorporated all the changes that were requested. Here're the changes: v2: Fixed all helper functions to use RCU (rtnl_dereference) - Eric, Jamal v2: Fixed indentation, extra line nits - Jamal, Jiri v2: Moved rcu_head to the end of the struct - Jiri v2: Re-formatted locals to reverse-christmas-tree - Jiri v2: Removed mismatched spin_lock() - Cong v2: Removed spin_lock_bh() in tcf_vlan_init, rtnl_dereference() should suffice - Cong, Jiri v4: Modified the nfp flower action code to use the VLAN helper functions instead of referencing the structure directly. Isolated this into a separate patch - Pieter Jansen v5: Got rid of the unlikely() for the allocation case - Simon Horman v6: Had forgotten cleanup functions for RCU alloc, added them - Dave Miller v7: Re-formatted more locals to reverse-christmas-tree - Pieter V v8: Reverted reverse-christmas-tree(v7), not required when dependencies make it difficult to implement - Alexander D v9: Cover letter subject change - Jamal ==================== Signed-off-by: David S. Miller commit 4c5b9d9642c859f7369338fc42c0f62f4151bef3 Author: Manish Kurup Date: Tue Nov 7 15:49:05 2017 -0500 act_vlan: VLAN action rewrite to use RCU lock/unlock and update Using a spinlock in the VLAN action causes performance issues when the VLAN action is used on multiple cores. Rewrote the VLAN action to use RCU read locking for reads and updates instead. All functions now use an RCU dereferenced pointer to access the VLAN action context. Modified helper functions used by other modules, to use the RCU as opposed to directly accessing the structure. Acked-by: Jamal Hadi Salim Acked-by: Jiri Pirko Signed-off-by: Manish Kurup Signed-off-by: David S. Miller include/net/tc_act/tc_vlan.h | 46 +++++++++++++++++++++------ net/sched/act_vlan.c | 75 ++++++++++++++++++++++++++++++-------------- 2 files changed, 88 insertions(+), 33 deletions(-) commit bf068bdd3c1e29c516ef0dc5cfb3c2b95fd450d1 Author: Manish Kurup Date: Tue Nov 7 15:48:45 2017 -0500 nfp flower action: Modified to use VLAN helper functions Modified netronome nfp flower action to use VLAN helper functions instead of accessing/referencing TC act_vlan private structures directly. Reviewed-by: Pieter Jansen van Vuuren Signed-off-by: Manish Kurup Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/action.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e0496cbbf8fb5d831e74b8cedb54236a49413679 Author: Manish Kurup Date: Tue Nov 7 15:48:15 2017 -0500 act_vlan: Change stats update to use per-core stats The VLAN action maintains one set of stats across all cores, and uses a spinlock to synchronize updates to it from the same. Changed this to use a per-CPU stats context instead. This change will result in better performance. Acked-by: Jamal Hadi Salim Acked-by: Jiri Pirko Signed-off-by: Manish Kurup Signed-off-by: David S. Miller net/sched/act_vlan.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit cbad52e92ad7f01f0be4ca58bde59462dc1afe3a Author: Robert Stonehouse Date: Tue Nov 7 17:30:30 2017 +0000 sfc: don't warn on successful change of MAC Fixes: 535a61777f44e ("sfc: suppress handled MCDI failures when changing the MAC address") Signed-off-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4effc094c91706c5737530ef9ae6298e1d67512 Author: Colin Ian King Date: Tue Nov 7 15:47:24 2017 +0000 net: vxge: remove redundant assignments and pointers There are several pointers that are being assigned but never read so remove these as they are redundant. Also remove an assignment to function_mode that is never read. Cleans up several clang warnings: vxge-main.c:1139:2: warning: Value stored to 'hldev' is never read vxge-main.c:1294:2: warning: Value stored to 'hldev' is never read vxge-main.c:2188:2: warning: Value stored to 'dev' is never read vxge-main.c:2188:2: warning: Value stored to 'dev' is never read vxge-main.c:2723:2: warning: Value stored to 'function_mode' is never read Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/neterion/vxge/vxge-main.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit be61a484af474c1f9c7a25a71a7065efe20984b8 Merge: c7947e4 a0efab6 Author: David S. Miller Date: Fri Nov 10 14:39:54 2017 +0900 Merge branch 'ip_gre-flags-update' Xin Long says: ==================== ip_gre: add support for i/o_flags update ip_gre is using as many ip_tunnel apis as possible, newlink works fine as gre would do it's own part in .ndo_init. But when changing link, ip_tunnel_changelink doesn't even update i/o_flags, and also the update of these flags would cause some other gre's properties need to be updated or recalculated. These two patch are to add i/o_flags update and then do adjustment on some gre's properties according to the new i/o_flags. ==================== Signed-off-by: David S. Miller commit a0efab67aeb9406e30b6a19dd6dd335e24f6bd66 Author: Xin Long Date: Tue Nov 7 16:33:09 2017 +0800 ip_gre: add the support for i/o_flags update via ioctl As patch 'ip_gre: add the support for i/o_flags update via netlink' did for netlink, we also need to do the same job for these update via ioctl. This patch is to update i/o_flags and call ipgre_link_update to recalculate these gre properties after ip_tunnel_ioctl does the common update. Signed-off-by: Xin Long Acked-by: William Tu Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit dd9d598c6657e2d2eed4497ff2c5d744015201dc Author: Xin Long Date: Tue Nov 7 16:33:08 2017 +0800 ip_gre: add the support for i/o_flags update via netlink Now ip_gre is using ip_tunnel_changelink to update it's properties, but ip_tunnel_changelink in ip_tunnel doesn't update i/o_flags as a common function. o_flags updates would cause that tunnel->tun_hlen / hlen and dev->mtu / needed_headroom need to be recalculated, and dev->(hw_)features need to be updated as well. Therefore, we can't just add the update into ip_tunnel_update called in ip_tunnel_changelink, and it's also better not to touch ip_tunnel codes. This patch updates i/o_flags and calls ipgre_link_update to recalculate these gre properties after ip_tunnel_changelink does the common update. Note that since ipgre_link_update doesn't know the lower dev, it will update gre->hlen, dev->mtu and dev->needed_headroom with the value of 'new tun_hlen - old tun_hlen'. In this way, we can avoid many redundant codes, unlike ip6_gre. Reported-by: Jianlin Shi Signed-off-by: Xin Long Acked-by: William Tu Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) commit c7947e4339b8a3b04f5d90c881f1ce8c05ad8cea Merge: 2ea7a67 356d183 Author: David S. Miller Date: Fri Nov 10 14:34:58 2017 +0900 Merge branch 'tcp-ns-rmem-wmem' Eric Dumazet says: ==================== net: Namespace-ify sysctl_tcp_rmem and sysctl_tcp_wmem We need to get per netns sysctl for sysctl_[proto]_rmem and sysctl_[proto]_wmem This patch series adds the basic infrastructure allowing per proto conversion, and takes care of TCP. ==================== Signed-off-by: David S. Miller commit 356d1833b638bd465672aefeb71def3ab93fc17d Author: Eric Dumazet Date: Tue Nov 7 00:29:28 2017 -0800 tcp: Namespace-ify sysctl_tcp_rmem and sysctl_tcp_wmem Note that when a new netns is created, it inherits its sysctl_tcp_rmem and sysctl_tcp_wmem from initial netns. This change is needed so that we can refine TCP rcvbuf autotuning, to take RTT into consideration. Signed-off-by: Eric Dumazet Cc: Wei Wang Signed-off-by: David S. Miller include/net/netns/ipv4.h | 2 ++ include/net/tcp.h | 2 -- net/ipv4/sysctl_net_ipv4.c | 32 ++++++++++++++++---------------- net/ipv4/tcp.c | 21 ++++++++------------- net/ipv4/tcp_input.c | 14 ++++++++------ net/ipv4/tcp_ipv4.c | 13 ++++++++++--- net/ipv4/tcp_output.c | 2 +- net/ipv6/tcp_ipv6.c | 4 ++-- 8 files changed, 47 insertions(+), 43 deletions(-) commit a3dcaf17ee54f1d01d22cc2b22cab0b4f60d78cf Author: Eric Dumazet Date: Tue Nov 7 00:29:27 2017 -0800 net: allow per netns sysctl_rmem and sysctl_wmem for protos As we want to gradually implement per netns sysctl_rmem and sysctl_wmem on per protocol basis, add two new fields in struct proto, and two new helpers : sk_get_wmem0() and sk_get_rmem0() First user will be TCP. Then UDP and SCTP can be easily converted, while DECNET probably wont get this support. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/sock.h | 22 ++++++++++++++++++++++ include/trace/events/sock.h | 2 +- net/core/sock.c | 10 ++++++---- 3 files changed, 29 insertions(+), 5 deletions(-) commit 2ea7a679ca2abd251c1ec03f20508619707e1749 Author: Andrew Lunn Date: Tue Nov 7 00:04:24 2017 +0100 net: dsa: Don't add vlans when vlan filtering is disabled The software bridge can be build with vlan filtering support included. However, by default it is turned off. In its turned off state, it still passes VLANs via switchev, even though they are not to be used. Don't pass these VLANs to the hardware. Only do so when vlan filtering is enabled. This fixes at least one corner case. There are still issues in other corners, such as when vlan_filtering is later enabled. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/port.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 4fdc3023c67c1c951d0b5594f37a2066d5191bdc Merge: 5d37636 f938dae Author: David S. Miller Date: Fri Nov 10 13:44:46 2017 +0900 Merge tag 'mlx5-updates-2017-11-09' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2017-11-09 This series introduces vlan offloads related improvements for mlx5 ethernet netdev driver, from Gal Pressman. - Add support for 802.1ad vlan filter - Add support for 802.1ad vlan insertion - Add vlan offloads statistics to ethtool (inserted/stripped vlans) - CHECKSUM_COMPLETE support for vlan traffic when vlan stripping is off! (Finally) ==================== Signed-off-by: David S. Miller commit 5d37636abd15ace8686a54167b488364ee79e88d Merge: 4dc6758 ae45102 Author: David S. Miller Date: Fri Nov 10 13:41:40 2017 +0900 Merge branch 'IGMP-snooping-for-local-traffic' Andrew Lunn says: ==================== IGMP snooping for local traffic The linux bridge supports IGMP snooping. It will listen to IGMP reports on bridge ports and keep track of which groups have been joined on an interface. It will then forward multicast based on this group membership. When the bridge adds or removed groups from an interface, it uses switchdev to request the hardware add an mdb to a port, so the hardware can perform the selective forwarding between ports. What is not covered by the current bridge code, is IGMP joins/leaves from the host on the brX interface. These are not reported via switchdev so that hardware knows the local host is interested in the multicast frames. Luckily, the bridge does track joins/leaves on the brX interface. The code is obfusticated, which is why i missed it with my first attempt. So the first patch tries to remove this obfustication. Currently, there is no notifications sent when the bridge interface joins a group. The second patch adds them. bridge monitor then shows joins/leaves in the same way as for other ports of the bridge. Then starts the work passing down to the hardware that the host has joined/left a group. The existing switchdev mdb object cannot be used, since the semantics are different. The existing SWITCHDEV_OBJ_ID_PORT_MDB is used to indicate a specific multicast group should be forwarded out that port of the switch. However here we require the exact opposite. We want multicast frames for the group received on the port to the forwarded to the host. Hence add a new object SWITCHDEV_OBJ_ID_HOST_MDB, a multicast database entry to forward to the host. This new object is then propagated through the DSA layers. No DSA driver changes should be needed, this should just work... This version fixes up the nitpick from Nikolay, removes an unrelated white space change, and adds in a patch adding a few const attributes to a couple of functions taking a port parameter, in order to stop the following patch produces warnings. ==================== Acked-by: Stephen Hemminger Signed-off-by: David S. Miller commit ae45102c9d247516e52f41b3381e195bbc25a362 Author: Andrew Lunn Date: Thu Nov 9 23:11:02 2017 +0100 net: dsa: switch: Don't add CPU port to an mdb by default Now that the host indicates when a multicast group should be forwarded from the switch to the host, don't do it by default. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb9f603174545c01aea92f116803aeb0e6478b28 Author: Andrew Lunn Date: Thu Nov 9 23:11:01 2017 +0100 net: dsa: add more const attributes The notify mechanism does not need to modify the port it is notifying. So make the parameter const. Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 4 ++-- net/dsa/port.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 5f4dbc50ce4d74b6f57a25fa114fcefe55acce17 Author: Andrew Lunn Date: Thu Nov 9 23:11:00 2017 +0100 net: dsa: slave: Handle switchdev host mdb add/del Add code to handle switchdev host mdb add/del. Since DSA uses one of the switch ports as a transport to the host, we just need to add an MDB on this port. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/slave.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 47d5b6db2afa766d7af85db684d0b5f092e4fc46 Author: Andrew Lunn Date: Thu Nov 9 23:10:59 2017 +0100 net: bridge: Add/del switchdev object on host join/leave When the host joins or leaves a multicast group, use switchdev to add an object to the hardware to forward traffic for the group to the host. Signed-off-by: Andrew Lunn Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/net/switchdev.h | 1 + net/bridge/br_mdb.c | 43 +++++++++++++++++++++++++++++++++++++++++++ net/switchdev/switchdev.c | 2 ++ 3 files changed, 46 insertions(+) commit 2a26028d119267a2386733dd71d256f269e70f52 Author: Andrew Lunn Date: Thu Nov 9 23:10:58 2017 +0100 net: bridge: Send notification when host join/leaves a group The host can join or leave a multicast group on the brX interface, as indicated by IGMP snooping. This is tracked within the bridge multicast code. Send a notification when this happens, in the same way a notification is sent when a port of the bridge joins/leaves a group because of IGMP snooping. Signed-off-by: Andrew Lunn Acked-by: Nikolay Aleksandrov Acked-by: Florian Fainelli Signed-off-by: David S. Miller net/bridge/br_mdb.c | 9 ++++++--- net/bridge/br_multicast.c | 6 +++++- 2 files changed, 11 insertions(+), 4 deletions(-) commit ff0fd34eaee9978f9ed7f6e2ac47f9590d4afac3 Author: Andrew Lunn Date: Thu Nov 9 23:10:57 2017 +0100 net: bridge: Rename mglist to host_joined The boolean mglist indicates the host has joined a particular multicast group on the bridge interface. It is badly named, obscuring what is means. Rename it. Signed-off-by: Andrew Lunn Acked-by: Nikolay Aleksandrov Acked-by: Florian Fainelli Signed-off-by: David S. Miller net/bridge/br_input.c | 2 +- net/bridge/br_mdb.c | 2 +- net/bridge/br_multicast.c | 14 +++++++------- net/bridge/br_private.h | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) commit e7e62c7ef382f5db0de5e492e558efc9c3d60943 Author: Dave Airlie Date: Thu Nov 9 09:35:04 2017 +1000 drm/mode_object: fix documentation for object lookups. The lease updates missed a few bits of docs, fixed up the wrong name on the property lookup fn as well. Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie drivers/gpu/drm/drm_framebuffer.c | 1 + drivers/gpu/drm/drm_mode_object.c | 1 + include/drm/drm_connector.h | 1 + include/drm/drm_crtc.h | 1 + include/drm/drm_encoder.h | 1 + include/drm/drm_plane.h | 1 + include/drm/drm_property.h | 3 ++- 7 files changed, 8 insertions(+), 1 deletion(-) commit 2d1d1da3d9cc387262193e83f0a96d753b040720 Author: Darrick J. Wong Date: Wed Nov 8 16:26:49 2017 -0800 xfs: on failed mount, force-reclaim inodes after unmounting quota controls When mounting fails, we must force-reclaim inodes (and disable delayed reclaim) /after/ the realtime and quota control have let go of the realtime and quota inodes. Without this, we corrupt the timer list and cause other weird problems. Found by xfs/376 fuzzing u3.bmbt[0].lastoff on an rmap filesystem to force a bogus post-eof extent reclaim that causes the fs to go down. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/xfs_mount.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit d44b47fdd1c13f79a9b50a07576929f1c6c33c7f Author: Darrick J. Wong Date: Thu Nov 2 15:58:36 2017 -0700 xfs: check the uniqueness of the AGFL entries Make sure we don't list a block twice in the agfl by copying the contents of the AGFL to an array, sorting it, and looking for duplicates. We can easily check that the number of agfl entries we see actually matches the flcount, so do that too. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/agheader.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) commit 4775ae7afec62e6ae1bc1f99ab57db2a36b8807e Author: Gustavo A. R. Silva Date: Mon Nov 6 15:53:21 2017 -0600 rsi: rsi_91x_ps: remove redundant code in str_psstate "INVALID_STATE" is already being returned in the default case and this code cannot be reached. Addresses-Coverity-ID: 1398384 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_ps.c | 1 - 1 file changed, 1 deletion(-) commit f87eba996baceed0b2573153ab353fe4db8afb3f Author: Arnd Bergmann Date: Mon Nov 6 15:03:59 2017 +0100 rt2x00: use monotonic timestamps for frame dump rt2x00 uses the deprecated do_gettimeofday() function to get a timestamp for its debugfs "dump" file interface. The timestamp is using an unsigned 32-bit value, so we could make it work until 2106 by using ktime_get_real_ts64(), but it seems better to use monotonic times, as we normally want for timestamps. Since this is an interface change, I'm incrementing the DUMP_HEADER_VERSION number, so user space can figure out whether the timestamps are monotonic or not. Most likely the tools won't care either way. Generally speaking, ABI version numbers and in particular changing them is a bad idea. However since this is in debugfs, we don't put any API stability rules on the interface according to Documentation/filesystems/debugfs.txt, and we can take the easy way out here; anyone using the frame dump feature can probably work out the differences here. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00debug.c | 7 ++++--- drivers/net/wireless/ralink/rt2x00/rt2x00dump.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) commit bfa62a52cad93686bb8d8171ea5288813248a7c6 Author: Stanislaw Gruszka Date: Thu Nov 9 11:59:24 2017 +0100 rt2x00usb: mark device removed when get ENOENT usb error ENOENT usb error mean "specified interface or endpoint does not exist or is not enabled". Mark device not present when we encounter this error similar like we do with ENODEV error. Otherwise we can have infinite loop in rt2x00usb_work_rxdone(), because we remove and put again RX entries to the queue infinitely. We can have similar situation when submit urb will fail all the time with other error, so we need consider to limit number of entries processed by rxdone work. But for now, since the patch fixes reproducible soft lockup issue on single processor systems and taken ENOENT error meaning, let apply this fix. Patch adds additional ENOENT check not only in rx kick routine, but also on other places where we check for ENODEV error. Reported-by: Richard Genoud Debugged-by: Richard Genoud Cc: stable@vger.kernel.org Signed-off-by: Stanislaw Gruszka Tested-by: Richard Genoud Signed-off-by: Kalle Valo drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c9889671736cbc6324aa31cffab5fed0e3f74a2f Author: Igor Mitsyanko Date: Mon Oct 30 18:04:55 2017 -0700 qtnfmac: pass all CONNECT cmd params to wireless card for processing Specifically, following parameters are needed for wireless device configuration but were not available to it before: - HT/VHT capabilities and capabilities masks. - full channel info (not just IEEE number) - BSSID hint - previous BSSID for reassoc request Move Management Frame Protection setting from common encr info structure into STA-specific .connect command parameters. Make sure that all new qlink structure definitions are alignment-safe. Signed-off-by: Igor Mitsyanko Reviewed-by: Sergey Matyukevich Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/commands.c | 63 +++++++++++++++-------- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 32 +++++++++--- 2 files changed, 65 insertions(+), 30 deletions(-) commit a3945f43761c3e15bebe56e5eb5674caf00f0d32 Author: Igor Mitsyanko Date: Mon Oct 30 18:04:54 2017 -0700 qtnfmac: include HTCAP and VHTCAP into config AP command Include HT/VHT caps directly into command so that they won't have to be searched for in IEs. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/commands.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 17011da0b8f079b1f6458893d4140cf65a265536 Author: Igor Mitsyanko Date: Mon Oct 30 18:04:53 2017 -0700 qtnfmac: configure and start AP interface with a single command Current logic artificially divides "start AP" procedure into three stages: - generic interface configuration (security, channel etc) - IE's processing - enable AP mode on interface This separation would not allow to do a proper device configuration as first stage needs to use information from IEs that are processed on a second stage. Which means first and second stages have to be meged. In that case there is no point anymore to keep third stage either, so merge all three into a single command. This new command carries all the same info as contained in "struct cfg80211_ap_settings". Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 17 +----- drivers/net/wireless/quantenna/qtnfmac/commands.c | 72 +++++++++++++---------- drivers/net/wireless/quantenna/qtnfmac/commands.h | 5 +- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 5 +- 4 files changed, 47 insertions(+), 52 deletions(-) commit 4d1f0fabdc4515db1b57da2dfdfdeb931cd49e92 Author: Igor Mitsyanko Date: Mon Oct 30 18:04:52 2017 -0700 qtnfmac: convert "Append IEs" command to QTN_TLV_ID_IE_SET usage Data contained within "Append IEs" command (QLINK_CMD_MGMT_SET_APPIE) duplicates QTN_TLV_ID_IE_SET TLV. Convert the command to use that TLV instead. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 12 ++++++------ drivers/net/wireless/quantenna/qtnfmac/commands.c | 17 ++++------------- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 15 --------------- 3 files changed, 10 insertions(+), 34 deletions(-) commit 5face518d4467868e7a82a321955236b2bb65bdc Author: Igor Mitsyanko Date: Mon Oct 30 18:04:51 2017 -0700 qtnfmac: SCAN results: retreive frame type information from "IE set" TLV "IE set" TLV carries the same information as qlink_event_scan_result::frame_type. Convert the event to make use of TLV and drop frame_type member. While at it, make qlink_event_scan_result structure alignement-safe. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/event.c | 25 ++++++++++++------------- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 11 ++--------- 2 files changed, 14 insertions(+), 22 deletions(-) commit 18b7470f92dfbea3e5ef82cab70edfc559d46735 Author: Igor Mitsyanko Date: Mon Oct 30 18:04:50 2017 -0700 qtnfmac: extend "IE set" TLV to include frame type info Specifying frame type for "IE set" TLV will allow to use several TLVs in a single message. Modify users accordingly. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/commands.c | 25 +++++++--- drivers/net/wireless/quantenna/qtnfmac/event.c | 58 +++++++++++++---------- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 27 +++++++++++ 3 files changed, 80 insertions(+), 30 deletions(-) commit d1398b5b34cca945cadf75f29833785cf6a675b1 Author: Igor Mitsyanko Date: Mon Oct 30 18:04:49 2017 -0700 qtnfmac: get rid of PHYMODE capabilities flags Supported WiFi operation modes are now identified per-band based on HT/VHT capabilities of each band. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 3 --- drivers/net/wireless/quantenna/qtnfmac/commands.c | 1 - drivers/net/wireless/quantenna/qtnfmac/core.h | 1 - drivers/net/wireless/quantenna/qtnfmac/qlink.h | 11 ++--------- 4 files changed, 2 insertions(+), 14 deletions(-) commit d42df85f7d853ae155d7708cc57118a0d6925d4f Author: Igor Mitsyanko Date: Mon Oct 30 18:04:48 2017 -0700 qtnfmac: initialize HT/VHT caps "can override" masks Information on which HT/VHT capabilities can be overridden is reported per-MAC by wireless device. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 2 ++ drivers/net/wireless/quantenna/qtnfmac/commands.c | 7 ++++--- drivers/net/wireless/quantenna/qtnfmac/core.h | 4 ++-- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 8 ++++---- 4 files changed, 12 insertions(+), 9 deletions(-) commit e294cbfda05640063a0da3ec69b9b19ed13ea2f8 Author: Igor Mitsyanko Date: Mon Oct 30 18:04:47 2017 -0700 qtnfmac: use per-band HT/VHT info from wireless device HT/VHT capabilities must be reported per each band supported by a radio, not for all bands on a radio. Furthermore, driver better not assume any capabilities and just use whetever is reported by device itself. To support this, convert "get channels" command into "get band info" command. Difference is that it may also carry HT/VHT capabilities along with channels information. While at it, also add "num_bitrates" field to "get band info" command, for future use. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 30 +-------- drivers/net/wireless/quantenna/qtnfmac/commands.c | 77 +++++++++++++++++++---- drivers/net/wireless/quantenna/qtnfmac/commands.h | 4 +- drivers/net/wireless/quantenna/qtnfmac/core.c | 3 +- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 29 +++++---- 5 files changed, 84 insertions(+), 59 deletions(-) commit bd99a3013bdc00f8fc7534c657b39616792b4467 Author: Arend Van Spriel Date: Wed Nov 8 14:36:37 2017 +0100 brcmfmac: move configuration of probe request IEs The configuration of the IEs for probe requests was done in a P2P related function, which is not very obvious. Moving it to .scan callback function, ie. brcmf_cfg80211_scan(). 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 | 5 +++++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) commit bbf35414cd23a9d7230bfd7046e1e2c26020e7eb Author: Arend Van Spriel Date: Wed Nov 8 14:36:36 2017 +0100 brcmfmac: get rid of struct brcmf_cfg80211_info::active_scan field The field struct brcmf_cfg80211_info::active_scan is set to true upon initializing the driver instance, but it is never changed so simply get rid of it. 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 | 10 +--------- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h | 2 -- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 5 +---- 3 files changed, 2 insertions(+), 15 deletions(-) commit 588378f15cff285ac81c929239ccba01d7f71d50 Author: Arend Van Spriel Date: Wed Nov 8 14:36:35 2017 +0100 brcmfmac: get rid of brcmf_cfg80211_escan() function The function brcmf_cfg80211_escan() is only called by brcmf_cfg80211_scan() so there is no reason to split in two function especially since the latter does not do an awful lot. 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 | 34 +++++++--------------- 1 file changed, 10 insertions(+), 24 deletions(-) commit df2d8388bc96c0f29d27d121f2a4cd054f8b3900 Author: Arend Van Spriel Date: Wed Nov 8 14:36:34 2017 +0100 brcmfmac: use msecs_to_jiffies() instead of calculation using HZ Minor cleanup using provided macro to convert milliseconds interval to jiffies in brcmf_cfg80211_escan(). 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8c6efda22f5f9f73fc948f517424466be01ae84d Author: Arend Van Spriel Date: Wed Nov 8 14:36:33 2017 +0100 brcmfmac: cleanup brcmf_cfg80211_escan() function The function brcmf_cfg80211_escan() was always called with a non-null request parameter and null pointer for this_ssid parameter. Clean up the function removing the dead code path. 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 | 76 ++++------------------ 1 file changed, 11 insertions(+), 65 deletions(-) commit 6c219b0088158da839a5be63c5b3d96c145501d2 Author: Franky Lin Date: Wed Nov 8 14:36:32 2017 +0100 brcmfmac: disable packet filtering in promiscuous mode Disable arp and nd offload to allow all packets sending to host. Reported-by: Phil Elwell Tested-by: Phil Elwell Reviewed-by: Arend Van Spriel Signed-off-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmfmac/cfg80211.c | 41 ---------------------- .../wireless/broadcom/brcm80211/brcmfmac/core.c | 38 ++++++++++++++++++++ .../wireless/broadcom/brcm80211/brcmfmac/core.h | 1 + 3 files changed, 39 insertions(+), 41 deletions(-) commit 2fd3877b5bb7d39782c3205a1dcda02023b8514a Author: Arend Van Spriel Date: Wed Nov 8 14:36:31 2017 +0100 brcmfmac: handle FWHALT mailbox indication The firmware uses a mailbox to communicate to the host what is going on. In the driver we validate the bit received. Various people seen the following message: brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012 Bit 4 is cause of this message, but this actually indicates the firmware has halted. Handle this bit by giving a more meaningful error message. 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/sdio.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 4dc6758d7824a6d25717ccceefc488cafdb07210 Merge: 19aeeb9 3fefc31 Author: David S. Miller Date: Fri Nov 10 10:00:18 2017 +0900 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Simple cases of overlapping changes in the packet scheduler. Must easier to resolve this time. Which probably means that I screwed it up somehow. Signed-off-by: David S. Miller commit 92e31454f1ee0a078baf418d6f1cc20a7109a87f Author: Bjorn Helgaas Date: Thu Nov 9 18:12:01 2017 -0600 PCI: xgene: Rename xgene_pcie_probe_bridge() to xgene_pcie_probe() Rename xgene_pcie_probe_bridge() to xgene_pcie_probe() to follow the convention of other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Lorenzo Pieralisi drivers/pci/host/pci-xgene.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 65a7935ddc9a1f0c723842776259d76394b4bd11 Author: Darrick J. Wong Date: Thu Nov 9 09:34:28 2017 -0800 xfs: remove u_int* type usage Use the uint* types instead of the u_int* types. This will (hopefully) pair with an xfsprogs cleanup. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_format.h | 2 +- fs/xfs/xfs_attr_list.c | 4 ++-- fs/xfs/xfs_ioctl.c | 4 ++-- fs/xfs/xfs_ioctl.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) commit 01e28f9c03aa88edfda313e6d309c816690d4b10 Author: Michel Dänzer Date: Thu Nov 9 18:38:09 2017 +0100 amdgpu/dm: Don't use DRM_ERROR in amdgpu_dm_atomic_check The atomic_check hook is expected to fail in some cases, e.g. if the modeset operation requested by userspace cannot be performed, so it must not spam dmesg on failure. Fixes spurious [drm:amdgpu_dm_atomic_check [amdgpu]] *ERROR* Atomic state validation failed with error :-35 ! error messages on DPMS off with CONFIG_DEBUG_WW_MUTEX_SLOWPATH enabled. While we're at it, fix up the existing DRM_DEBUG_DRIVER strings. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 1ec9b0afbdc32800ea1ff10ce61c52f5ceba4431 Author: Colin Ian King Date: Thu Nov 9 11:35:00 2017 +0000 drm/amd/powerplay: fix copy-n-paste error on vddci_buf index The index to vddci_buf is using profile->ucElbVDDC_Num rather than profile->ucElbVDDCI_Num; this looks like a copy-n-paste error from previous code for the vddc_buf array and I'm pretty sure this is incorrect. Fix this by using the correct variable. Detected by CoverityScan, CID#1457172 ("Copy-paste error") Fixes: 970d9804b00d ("drm/amd/powerplay: Add support functions for CI to ppatomctrl.c") Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdadab89f8cc37dd6101e2bbab50037d72e0e1d0 Author: Emily Deng Date: Thu Nov 9 17:18:18 2017 +0800 drm/amdgpu: Fix null pointer issue in amdgpu_cs_wait_any_fence The array[first] may be null when the fence has already been signaled. BUG: SWDEV-136239 Signed-off-by: Emily Deng Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ab6613b7eaefe85dadfc86025e901c55d71c0379 Author: Ken Wang Date: Wed Nov 8 14:48:50 2017 +0800 drm/amdgpu: Remove check which is not valid for certain VBIOS Fixes vbios fetching on certain headless boards. Signed-off-by: Ken Wang Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 6 ------ 1 file changed, 6 deletions(-) commit 27e8524d80b7f7fa28a3c1adae5176715231caf2 Merge: 48c926c 7e7962d Author: Rob Herring Date: Thu Nov 9 17:05:15 2017 -0600 Merge branch 'dt/kbuild' into dt/next commit 48c926cd3414c7e628909f6f831394184816da87 Author: Marco Franchi Date: Wed Nov 8 14:27:48 2017 -0200 dt-bindings: Remove leading zeros from bindings notation Improve the binding example by removing all the leading zeros to fix the following dtc warnings: Warning (unit_address_format): Node /XXX unit name should not have leading 0s Converted using the following command: perl -p -i -e 's/\@0+([0-9a-f])/\@$1/g' `find ./Documentation/devicetree/bindings "*.txt"` Some unnecessary changes were manually fixed. Signed-off-by: Marco Franchi Signed-off-by: Rob Herring Documentation/devicetree/bindings/arm/samsung/pmu.txt | 2 +- .../devicetree/bindings/arm/samsung/samsung-boards.txt | 2 +- Documentation/devicetree/bindings/arm/sp810.txt | 2 +- .../devicetree/bindings/arm/vexpress-sysreg.txt | 2 +- Documentation/devicetree/bindings/ata/ahci-platform.txt | 2 +- Documentation/devicetree/bindings/ata/imx-sata.txt | 2 +- Documentation/devicetree/bindings/bus/imx-weim.txt | 2 +- Documentation/devicetree/bindings/bus/sunxi-rsb.txt | 2 +- .../devicetree/bindings/clock/arm-syscon-icst.txt | 2 +- .../devicetree/bindings/clock/clk-exynos-audss.txt | 2 +- .../devicetree/bindings/clock/clk-s5pv210-audss.txt | 2 +- .../devicetree/bindings/clock/dove-divider-clock.txt | 2 +- Documentation/devicetree/bindings/clock/imx1-clock.txt | 4 ++-- Documentation/devicetree/bindings/clock/imx6q-clock.txt | 4 ++-- .../devicetree/bindings/clock/maxim,max77686.txt | 4 ++-- Documentation/devicetree/bindings/clock/st/st,clkgen.txt | 2 +- Documentation/devicetree/bindings/clock/sunxi-ccu.txt | 4 ++-- Documentation/devicetree/bindings/clock/sunxi.txt | 16 ++++++++-------- Documentation/devicetree/bindings/clock/ti,cdce706.txt | 2 +- Documentation/devicetree/bindings/crypto/sun4i-ss.txt | 2 +- .../devicetree/bindings/display/etnaviv/etnaviv-drm.txt | 2 +- Documentation/devicetree/bindings/display/imx/hdmi.txt | 4 ++-- .../devicetree/bindings/display/simple-framebuffer.txt | 2 +- .../devicetree/bindings/display/sunxi/sun4i-drm.txt | 4 ++-- Documentation/devicetree/bindings/dma/sun4i-dma.txt | 4 ++-- Documentation/devicetree/bindings/dma/sun6i-dma.txt | 2 +- Documentation/devicetree/bindings/dma/ti-edma.txt | 6 +++--- Documentation/devicetree/bindings/dma/zxdma.txt | 2 +- .../bindings/firmware/nvidia,tegra186-bpmp.txt | 2 +- .../devicetree/bindings/gpio/gpio-dsp-keystone.txt | 2 +- .../devicetree/bindings/gpio/gpio-tz1090-pdc.txt | 2 +- Documentation/devicetree/bindings/gpio/gpio-tz1090.txt | 2 +- Documentation/devicetree/bindings/i2c/i2c-axxia.txt | 2 +- Documentation/devicetree/bindings/i2c/i2c-sunxi-p2wi.txt | 2 +- .../devicetree/bindings/iio/magnetometer/ak8974.txt | 2 +- .../devicetree/bindings/iio/magnetometer/ak8975.txt | 2 +- .../devicetree/bindings/input/sun4i-lradc-keys.txt | 2 +- .../devicetree/bindings/input/touchscreen/egalax-ts.txt | 2 +- .../devicetree/bindings/input/touchscreen/imx6ul_tsc.txt | 2 +- .../interrupt-controller/allwinner,sunxi-nmi.txt | 2 +- .../bindings/interrupt-controller/ti,keystone-irq.txt | 2 +- Documentation/devicetree/bindings/iommu/qcom,iommu.txt | 2 +- .../devicetree/bindings/leds/register-bit-led.txt | 16 ++++++++-------- .../devicetree/bindings/mailbox/ti,message-manager.txt | 2 +- Documentation/devicetree/bindings/marvell.txt | 4 ++-- Documentation/devicetree/bindings/media/i2c/tc358743.txt | 2 +- Documentation/devicetree/bindings/media/img-ir-rev1.txt | 2 +- Documentation/devicetree/bindings/media/stih-cec.txt | 2 +- .../devicetree/bindings/media/stih407-c8sectpfe.txt | 2 +- Documentation/devicetree/bindings/media/sunxi-ir.txt | 2 +- Documentation/devicetree/bindings/mfd/max77686.txt | 2 +- Documentation/devicetree/bindings/mfd/max77802.txt | 2 +- Documentation/devicetree/bindings/mfd/mfd.txt | 2 +- Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt | 4 ++-- Documentation/devicetree/bindings/mfd/sun6i-prcm.txt | 2 +- Documentation/devicetree/bindings/mfd/syscon.txt | 2 +- Documentation/devicetree/bindings/mmc/mmc.txt | 2 +- Documentation/devicetree/bindings/mmc/sdhci-st.txt | 4 ++-- Documentation/devicetree/bindings/mmc/sunxi-mmc.txt | 4 ++-- Documentation/devicetree/bindings/mtd/sunxi-nand.txt | 2 +- .../devicetree/bindings/net/allwinner,sun4i-emac.txt | 2 +- .../devicetree/bindings/net/allwinner,sun4i-mdio.txt | 4 ++-- .../devicetree/bindings/net/allwinner,sun7i-a20-gmac.txt | 2 +- Documentation/devicetree/bindings/net/brcm,bcmgenet.txt | 2 +- Documentation/devicetree/bindings/net/can/m_can.txt | 2 +- Documentation/devicetree/bindings/net/can/sun4i_can.txt | 4 ++-- .../bindings/net/wireless/brcm,bcm43xx-fmac.txt | 2 +- .../devicetree/bindings/nvmem/allwinner,sunxi-sid.txt | 4 ++-- Documentation/devicetree/bindings/nvmem/brcm,ocotp.txt | 2 +- Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | 2 +- Documentation/devicetree/bindings/nvmem/nvmem.txt | 2 +- Documentation/devicetree/bindings/nvmem/qfprom.txt | 2 +- .../devicetree/bindings/pci/nvidia,tegra20-pcie.txt | 12 ++++++------ .../devicetree/bindings/phy/brcm,cygnus-pcie-phy.txt | 2 +- Documentation/devicetree/bindings/phy/mxs-usb-phy.txt | 2 +- Documentation/devicetree/bindings/phy/sun9i-usb-phy.txt | 2 +- .../bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 2 +- .../devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt | 4 ++-- .../bindings/pinctrl/img,tz1090-pdc-pinctrl.txt | 4 ++-- .../devicetree/bindings/pinctrl/img,tz1090-pinctrl.txt | 4 ++-- .../bindings/pinctrl/nvidia,tegra124-xusb-padctl.txt | 2 +- .../devicetree/bindings/pinctrl/pinctrl-mt65xx.txt | 2 +- Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt | 2 +- .../devicetree/bindings/pinctrl/qcom,msm8996-pinctrl.txt | 2 +- Documentation/devicetree/bindings/power/fsl,imx-gpc.txt | 4 ++-- .../bindings/power/reset/imx-snvs-poweroff.txt | 2 +- .../devicetree/bindings/power/reset/keystone-reset.txt | 4 ++-- .../devicetree/bindings/powerpc/fsl/mcu-mpc8349emitx.txt | 2 +- Documentation/devicetree/bindings/pwm/pwm-sun4i.txt | 2 +- Documentation/devicetree/bindings/regulator/max77686.txt | 2 +- Documentation/devicetree/bindings/regulator/max77802.txt | 2 +- .../bindings/reset/allwinner,sunxi-clock-reset.txt | 2 +- Documentation/devicetree/bindings/reset/fsl,imx-src.txt | 6 +++--- .../devicetree/bindings/reset/ti-syscon-reset.txt | 2 +- Documentation/devicetree/bindings/rtc/sun6i-rtc.txt | 2 +- Documentation/devicetree/bindings/rtc/sunxi-rtc.txt | 2 +- .../devicetree/bindings/soc/fsl/cpm_qe/qe/par_io.txt | 2 +- .../devicetree/bindings/soc/fsl/cpm_qe/qe/pincfg.txt | 2 +- .../devicetree/bindings/soc/ti/sci-pm-domain.txt | 2 +- .../devicetree/bindings/sound/cdns,xtfpga-i2s.txt | 2 +- Documentation/devicetree/bindings/sound/fsl,asrc.txt | 2 +- Documentation/devicetree/bindings/sound/fsl,esai.txt | 2 +- Documentation/devicetree/bindings/sound/fsl,spdif.txt | 2 +- Documentation/devicetree/bindings/sound/imx-audmux.txt | 2 +- Documentation/devicetree/bindings/sound/samsung-i2s.txt | 2 +- Documentation/devicetree/bindings/sound/sun4i-codec.txt | 4 ++-- Documentation/devicetree/bindings/sound/sun4i-i2s.txt | 2 +- .../devicetree/bindings/sound/sun8i-a33-codec.txt | 2 +- .../devicetree/bindings/sound/sun8i-codec-analog.txt | 2 +- .../devicetree/bindings/sound/sunxi,sun4i-spdif.txt | 2 +- Documentation/devicetree/bindings/sound/zte,zx-spdif.txt | 2 +- Documentation/devicetree/bindings/spi/spi-sun4i.txt | 2 +- Documentation/devicetree/bindings/spi/spi-sun6i.txt | 4 ++-- Documentation/devicetree/bindings/sram/samsung-sram.txt | 2 +- Documentation/devicetree/bindings/sram/sunxi-sram.txt | 4 ++-- .../bindings/timer/allwinner,sun5i-a13-hstimer.txt | 2 +- .../devicetree/bindings/usb/allwinner,sun4i-a10-musb.txt | 2 +- Documentation/devicetree/bindings/usb/am33xx-usb.txt | 2 +- Documentation/devicetree/bindings/usb/atmel-usb.txt | 4 ++-- Documentation/devicetree/bindings/usb/ohci-da8xx.txt | 2 +- Documentation/devicetree/bindings/usb/usb-ehci.txt | 2 +- Documentation/devicetree/bindings/usb/usb-ohci.txt | 2 +- Documentation/devicetree/bindings/usb/usb3503.txt | 2 +- Documentation/devicetree/bindings/usb/usbmisc-imx.txt | 2 +- Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 2 +- Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 2 +- 126 files changed, 172 insertions(+), 172 deletions(-) commit 4d63adfe12dd9cb61ed8badb4d798955399048c2 Author: Mark Greer Date: Thu Jun 15 20:34:22 2017 -0700 NFC: Add NFC_CMD_DEACTIVATE_TARGET support Once an NFC target (i.e., a tag) is found, it remains active until there is a failure reading or writing it (often caused by the target moving out of range). While the target is active, the NFC adapter and antenna must remain powered. This wastes power when the target remains in range but the client application no longer cares whether it is there or not. To mitigate this, add a new netlink command that allows userspace to deactivate an active target. When issued, this command will cause the NFC subsystem to act as though the target was moved out of range. Once the command has been executed, the client application can power off the NFC adapter to reduce power consumption. Signed-off-by: Mark Greer Signed-off-by: Samuel Ortiz include/uapi/linux/nfc.h | 2 ++ net/nfc/netlink.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit 72ad533acc22870156736c2fef4674c01307695e Author: Mark Greer Date: Thu Jun 15 20:34:21 2017 -0700 NFC: digital: Abort cmd when deactivating target When deactivating an active target, the outstanding command should be aborted. Signed-off-by: Mark Greer Signed-off-by: Samuel Ortiz net/nfc/digital_core.c | 1 + 1 file changed, 1 insertion(+) commit 7e7962dd1a5307bca1793a3f9a98ad5514306c7a Author: Masahiro Yamada Date: Sun Nov 5 14:30:53 2017 +0900 kbuild: handle dtb-y and CONFIG_OF_ALL_DTBS natively in Makefile.lib If CONFIG_OF_ALL_DTBS is enabled, "make ARCH=arm64 dtbs" compiles each DTB twice; one from arch/arm64/boot/dts/*/Makefile and the other from the dtb-$(CONFIG_OF_ALL_DTBS) line in arch/arm64/boot/dts/Makefile. It could be a race problem when building DTBS in parallel. Another minor issue is CONFIG_OF_ALL_DTBS covers only *.dts in vendor sub-directories, so this broke when Broadcom added one more hierarchy in arch/arm64/boot/dts/broadcom//. One idea to fix the issues in a clean way is to move DTB handling to Kbuild core scripts. Makefile.dtbinst already recognizes dtb-y natively, so it should not hurt to do so. Add $(dtb-y) to extra-y, and $(dtb-) as well if CONFIG_OF_ALL_DTBS is enabled. All clutter things in Makefiles go away. As a bonus clean-up, I also removed dts-dirs. Just use subdir-y directly to traverse sub-directories. Signed-off-by: Masahiro Yamada Acked-by: Arnd Bergmann [robh: corrected BUILTIN_DTB to CONFIG_BUILTIN_DTB] Signed-off-by: Rob Herring arch/arc/boot/dts/Makefile | 7 ++- arch/arm/boot/dts/Makefile | 5 -- arch/arm64/boot/dts/Makefile | 58 ++++++++++-------------- arch/arm64/boot/dts/actions/Makefile | 3 -- arch/arm64/boot/dts/al/Makefile | 3 -- arch/arm64/boot/dts/allwinner/Makefile | 3 -- arch/arm64/boot/dts/altera/Makefile | 3 -- arch/arm64/boot/dts/amd/Makefile | 3 -- arch/arm64/boot/dts/amlogic/Makefile | 3 -- arch/arm64/boot/dts/apm/Makefile | 3 -- arch/arm64/boot/dts/arm/Makefile | 3 -- arch/arm64/boot/dts/broadcom/Makefile | 6 +-- arch/arm64/boot/dts/broadcom/northstar2/Makefile | 3 -- arch/arm64/boot/dts/broadcom/stingray/Makefile | 3 -- arch/arm64/boot/dts/cavium/Makefile | 3 -- arch/arm64/boot/dts/exynos/Makefile | 3 -- arch/arm64/boot/dts/freescale/Makefile | 3 -- arch/arm64/boot/dts/hisilicon/Makefile | 3 -- arch/arm64/boot/dts/lg/Makefile | 3 -- arch/arm64/boot/dts/marvell/Makefile | 3 -- arch/arm64/boot/dts/mediatek/Makefile | 3 -- arch/arm64/boot/dts/nvidia/Makefile | 2 - arch/arm64/boot/dts/qcom/Makefile | 3 -- arch/arm64/boot/dts/realtek/Makefile | 3 -- arch/arm64/boot/dts/renesas/Makefile | 2 - arch/arm64/boot/dts/rockchip/Makefile | 3 -- arch/arm64/boot/dts/socionext/Makefile | 2 - arch/arm64/boot/dts/sprd/Makefile | 3 -- arch/arm64/boot/dts/xilinx/Makefile | 3 -- arch/arm64/boot/dts/zte/Makefile | 3 -- arch/h8300/boot/dts/Makefile | 5 -- arch/metag/boot/dts/Makefile | 5 -- arch/mips/boot/dts/Makefile | 32 ++++++------- arch/mips/boot/dts/brcm/Makefile | 2 - arch/mips/boot/dts/cavium-octeon/Makefile | 2 - arch/mips/boot/dts/img/Makefile | 2 - arch/mips/boot/dts/ingenic/Makefile | 2 - arch/mips/boot/dts/lantiq/Makefile | 2 - arch/mips/boot/dts/mti/Makefile | 2 - arch/mips/boot/dts/netlogic/Makefile | 2 - arch/mips/boot/dts/ni/Makefile | 2 - arch/mips/boot/dts/pic32/Makefile | 2 - arch/mips/boot/dts/qca/Makefile | 2 - arch/mips/boot/dts/ralink/Makefile | 2 - arch/mips/boot/dts/xilfpga/Makefile | 2 - arch/xtensa/boot/dts/Makefile | 7 ++- scripts/Makefile.dtbinst | 6 +-- scripts/Makefile.lib | 5 ++ 48 files changed, 53 insertions(+), 182 deletions(-) commit 3cad14d56adbf7d621fc5a35db42f3acc0a2d6e8 Author: Masahiro Yamada Date: Sun Nov 5 14:30:52 2017 +0900 MIPS: dts: remove bogus bcm96358nb4ser.dtb from dtb-y entry arch/mips/boot/dts/brcm/bcm96358nb4ser.dts does not exist, so we cannot build bcm96358nb4ser.dtb . Signed-off-by: Masahiro Yamada Fixes: 695835511f96 ("MIPS: BMIPS: rename bcm96358nb4ser to bcm6358-neufbox4-sercom") Cc: stable@vger.kernel.org # 4.9+ Acked-by: James Hogan Signed-off-by: Rob Herring arch/mips/boot/dts/brcm/Makefile | 1 - 1 file changed, 1 deletion(-) commit be89251d636d02b384aa22c8fe2e6ea6876dc3a3 Merge: 10f2fe6 69b6f8a Author: Rafael J. Wysocki Date: Thu Nov 9 23:33:43 2017 +0100 Merge tag 'linux-cpupower-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux into pm-tools Pull cpupower utility changes for v4.15 from Shuah Khan. This cpupower update consists of fixes to the MHz frequency output and adding 64-bit library detection. * tag 'linux-cpupower-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: tools/power/cpupower: add libcpupower.so.0.0.1 to .gitignore tools/power/cpupower: Add 64 bit library detection cpupower: Fix no-rounding MHz frequency output commit 1eaa8702129e38b3288a6b50530192ff8bb4fe0a Author: Bjorn Helgaas Date: Thu Nov 9 16:19:47 2017 -0600 PCI: xilinx: Rename xilinx_pcie_link_is_up() to xilinx_pcie_link_up() Rename xilinx_pcie_link_is_up() to xilinx_pcie_link_up() to follow the convention of other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Lorenzo Pieralisi Acked-by: Michal Simek drivers/pci/host/pcie-xilinx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 499c0106f59d1da447cb0d99fdb74db0de5d8c1d Author: Bjorn Helgaas Date: Thu Nov 9 16:17:39 2017 -0600 PCI: altera: Rename altera_pcie_link_is_up() to altera_pcie_link_up() Rename altera_pcie_link_is_up() to altera_pcie_link_up() to follow the convention of other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Lorenzo Pieralisi Acked-by: Ley Foon Tan drivers/pci/host/pcie-altera.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ae82968ee9b404b9fc101f9d75e171c78797a4d1 Author: Christoph Hellwig Date: Thu Nov 9 09:11:43 2017 -0800 xfs: handle zero entries case in xfs_iext_rebalance_leaf And also rename fill to nr_entries to match the rest of the code. Reported-by: Brian Foster Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_iext_tree.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 3e27c418a7a13b8dbf33f6eb49b0e461f011bdcd Author: Christoph Hellwig Date: Thu Nov 9 09:11:43 2017 -0800 xfs: add comments documenting the rebalance algorithm Reported-by: Brian Foster Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_iext_tree.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit b9aee1d5fe58160a44556224b5479bd151a3e1a5 Author: Christoph Hellwig Date: Thu Nov 9 09:11:42 2017 -0800 xfs: trivial indentation fixup for xfs_iext_remove_node Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_iext_tree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f1be313697f2d2ee925bd559a53d58312dec8b5a Author: Christoph Hellwig Date: Thu Nov 9 09:11:42 2017 -0800 xfs: remove a superflous assignment in xfs_iext_remove_node Reported-by: Brian Foster Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_iext_tree.c | 1 - 1 file changed, 1 deletion(-) commit fc258f4b8bb578c39223ff572b4dec8d56a2ed81 Author: Christoph Hellwig Date: Thu Nov 9 09:11:41 2017 -0800 xfs: add some comments to xfs_iext_insert/xfs_iext_insert_node Reported-by: Brian Foster Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_iext_tree.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 43d193aa0212691254d574b8d207609ef22018b8 Author: Christoph Hellwig Date: Thu Nov 9 09:11:41 2017 -0800 xfs: fix number of records handling in xfs_iext_split_leaf Fix to check the correct value, and remove a duplicate handling of the uneven record number split algorith, Reported-by: Brian Foster Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_iext_tree.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 5e387199c17c4d2fb8b72ada82fbf81f4ba6f317 Author: Geert Uytterhoeven Date: Mon Oct 30 08:13:32 2017 +0100 m68k/defconfig: Update defconfigs for v4.14-rc7 Signed-off-by: Geert Uytterhoeven arch/m68k/configs/amiga_defconfig | 6 ++++-- arch/m68k/configs/apollo_defconfig | 6 ++++-- arch/m68k/configs/atari_defconfig | 6 ++++-- arch/m68k/configs/bvme6000_defconfig | 6 ++++-- arch/m68k/configs/hp300_defconfig | 6 ++++-- arch/m68k/configs/mac_defconfig | 6 ++++-- arch/m68k/configs/multi_defconfig | 6 ++++-- arch/m68k/configs/mvme147_defconfig | 6 ++++-- arch/m68k/configs/mvme16x_defconfig | 6 ++++-- arch/m68k/configs/q40_defconfig | 6 ++++-- arch/m68k/configs/sun3_defconfig | 6 ++++-- arch/m68k/configs/sun3x_defconfig | 6 ++++-- 12 files changed, 48 insertions(+), 24 deletions(-) commit 92178fcabbcd39fc9ccd4e58ec4be83dd5323a46 Author: Finn Thain Date: Thu Oct 26 22:45:24 2017 -0400 m68k/mac: Add mutual exclusion for IOP interrupt polling The IOP interrupt handler iop_ism_irq() is used by the adb-iop driver to poll for ADB request completion. Unfortunately, it is not re-entrant. Fix the race condition by adding an iop_ism_irq_poll() function with suitable mutual exclusion. Tested-by: Stan Johnson Signed-off-by: Finn Thain Cc: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Geert Uytterhoeven arch/m68k/include/asm/mac_iop.h | 1 + arch/m68k/mac/iop.c | 9 +++++++++ drivers/macintosh/adb-iop.c | 4 +--- 3 files changed, 11 insertions(+), 3 deletions(-) commit 8ee90c5c3fd1af8e68133defb15cfc66c1de3f88 Author: Finn Thain Date: Thu Oct 26 22:45:24 2017 -0400 m68k/mac: Disentangle VIA/RBV and NuBus initialization The Nubus subsystem should not be concerned with differences between VIA, RBV and OSS platforms. It should be portable across Macs and PowerMacs. This goal has implications for the initialization code relating to bus locking and slot interrupts. During Nubus initialization, bus transactions are "unlocked": on VIA2 and RBV machines, via_nubus_init() sets a bit in the via2[gBufB] register to allow bus-mastering Nubus cards to arbitrate for the bus. This happens upon subsys_initcall(nubus_init). But because nubus_init() has no effect on card state, this sequence is arbitrary. Moreover, when Penguin is used to boot Linux, the bus is already unlocked when Linux starts. On OSS machines there's no attempt to unlock Nubus transactions at all. (Maybe there's no benefit on that platform or maybe no-one knows how.) All of this demonstrates that there's no benefit in locking out bus-mastering cards, as yet. (If the need arises, we could lock the bus for the duration of a timing-critical operation.) NetBSD unlocks the Nubus early (at VIA initialization) and we can do the same. via_nubus_init() is also responsible for some VIA interrupt setup that should happen earlier than subsys_initcall(nubus_init). And actually, the Nubus subsystem need not be involved with slot interrupts: SLOT2IRQ works fine because Nubus slot IRQs are geographically assigned (regardless of platform). For certain platforms with PDS slots, some Nubus IRQs may be platform IRQs and this is not something that the NuBus subsystem should worry about. So let's invoke via_nubus_init() earlier and make the platform responsible for bus unlocking and interrupt setup instead of the NuBus subsystem. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/mac/oss.c | 8 -------- arch/m68k/mac/via.c | 5 ++++- drivers/nubus/nubus.c | 13 ------------- 3 files changed, 4 insertions(+), 22 deletions(-) commit 7a0bb4427024f426668f3ed63542328135282422 Author: Finn Thain Date: Thu Oct 26 22:45:24 2017 -0400 m68k/mac: Disentangle VIA and OSS initialization macintosh_config->via_type is meaningless on Mac IIfx (i.e. the only model with OSS chip), so skip the via_type switch statement. Call oss_init() before via_init() because it is more important and because that is the right place to initialize the oss_present flag. On this model, bringing forward oss_init() and delaying via_init() is no problem because those functions are independent. The only requirement here is that oss_register_interrupts() happens after via_init(). That is, mac_init_IRQ() happens after config_mac(). Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/mac/config.c | 2 +- arch/m68k/mac/oss.c | 8 ++++---- arch/m68k/mac/via.c | 32 +++++++++++++------------------- 3 files changed, 18 insertions(+), 24 deletions(-) commit 0e37a23ebdadc0e34176b816770da6f4ac64043e Author: Finn Thain Date: Thu Oct 26 22:45:24 2017 -0400 m68k/mac: More printk modernization Log message fragments used to be printed on one line but now get split up. Fix this. Also, suppress log spam that merely prints known pointer values. Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven arch/m68k/mac/baboon.c | 2 +- arch/m68k/mac/iop.c | 4 ++-- arch/m68k/mac/psc.c | 6 ++---- arch/m68k/mac/via.c | 18 +++++------------- 4 files changed, 10 insertions(+), 20 deletions(-) commit 4f0a03d34dd46afcec5d9c9ada8ab97712d64cf8 Author: Hyunchul Lee Date: Thu Nov 9 14:51:27 2017 +0900 f2fs: apply write hints to select the type of segments for buffered write Write hints helps F2FS to determine which type of segments would be selected for buffered write. This patch implements the mapping from write hints to segment types as shown below. hints segment type ----- ------------ WRITE_LIFE_SHORT CURSEG_HOT_DATA WRITE_LIFE_EXTREME CURSEG_COLD_DATA others CURSEG_WARM_DATA the F2FS poliy for hot/cold seperation has precedence over this hints. And hints are not applied in in-place update. Signed-off-by: Hyunchul Lee Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 2fbaa25fde4615fc5f32f71992510d83e427371b Author: Chao Yu Date: Wed Nov 8 17:47:36 2017 +0800 f2fs: introduce scan_curseg_cache for cleanup Commit 4ac912427c42 ("f2fs: introduce free nid bitmap") copied codes from __build_free_nids() into scan_free_nid_bits(), they are redundant, introduce one common function scan_curseg_cache for cleanup. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 49 +++++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 26 deletions(-) commit 69b6f8a9b7961efd7dcc11ab9b1d5be55ed8a15e Author: Prarit Bhargava Date: Wed Nov 1 20:48:32 2017 -0400 tools/power/cpupower: add libcpupower.so.0.0.1 to .gitignore Commit ac5a181d065d ("cpupower: Add cpuidle parts into library") added libcpupower.so.0.0.1 which should be hidden from git commands. This patch changes the ignore to all libcpupower.so.* . Signed-off-by: Prarit Bhargava Cc: Shuah Khan Signed-off-by: Shuah Khan tools/power/cpupower/.gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d4dbfa4bb4c624636eeef9efc6d87c4b7bf2c611 Author: Prarit Bhargava Date: Wed Nov 1 20:48:17 2017 -0400 tools/power/cpupower: Add 64 bit library detection The kernel-tools-lib rpm is installing the library to /usr/lib64, and not /usr/lib as the cpupower Makefile is doing in the kernel tree. This resulted in a conflict between the two libraries. After looking at how other tools installed libraries, and looking at the perf code in tools/perf it looks like installing to /usr/lib64 for 64-bit arches is the correct thing to do. Checks with 'ldd cpupower' on SLES, RHEL, Fedora, and Ubuntu result in the correct binary AFAICT: [root@testsystem cpupower]# ldd cpupower | grep cpupower libcpupower.so.0 => /lib64/libcpupower.so.0 (0x00007f1dab447000) Commit ac5a181d065d ("cpupower: Add cpuidle parts into library") added a new cpupower library version. On Fedora, executing the cpupower binary then resulted in this error [root@testsystem cpupower]# ./cpupower monitor ./cpupower: symbol lookup error: ./cpupower: undefined symbol: get_cpu_topology 64-bit libraries should be installed to /usr/lib64, and other libraries should be installed to /usr/lib. This code was taken from the perf Makefile.config which supports /usr/lib and /usr/lib64. Signed-off-by: Prarit Bhargava Cc: Shuah Khan Signed-off-by: Shuah Khan tools/power/cpupower/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) commit 974565744955b6154a93c85b77cb94026c85ff5a Author: Fan Li Date: Tue Nov 7 19:14:24 2017 +0800 f2fs: optimize the way of traversing free_nid_bitmap We call scan_free_nid_bits only when there isn't many free nids left, it means that marked bits in free_nid_bitmap are supposed to be few, use find_next_bit_le is more efficient in such case. According to my tests, use find_next_bit_le instead of test_bit_le will cut down the traversal time to one third of its original. Signed-off-by: Fan li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 31c45b3e8d0ecc3a5cbfbf3dfe18adeab2f17a48 Author: Vijendar Mukunda Date: Thu Nov 9 12:35:52 2017 -0500 ASoC: amd: Modified DMA transfer Mechanism for Playback Before rendering starts, DMA driver copies full buffer valid data to ACP SRAM for the first time, after that ACP SRAM to I2S FIFO DMA will be initiated. After rendering first half of ACP SRAM, IOC will be raised then Audio data will be copied from first half of System Memory to first half of ACP SRAM. Similarly after rendering second half of ACP SRAM, IOC will be raised then Audio Data will be copied from second half of the System Memory to second half of the ACP SRAM in ping-pong way till rendering stops. Old design introducing latency issues resulting stutter sound observed during playback. Signed-off-by: Vijendar Mukunda Signed-off-by: Akshu Agrawal Signed-off-by: Alex Deucher Signed-off-by: Mark Brown sound/soc/amd/acp-pcm-dma.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) commit 74986213adaff2ceab81fc0bb29dbb80d05665b3 Author: Fan Li Date: Tue Nov 7 11:04:33 2017 +0800 f2fs: keep scanning until enough free nids are acquired In current version, after scan_free_nid_bits, the scan is over if nid_cnt[FREE_NID] != 0. In most cases, there are still free nids in the free list during the scan, and scan_free_nid_bits usually can't increase nid_cnt[FREE_NID]. It causes that __build_free_nids is called many times without solving the shortage of the free nids. This patch fixes that. Signed-off-by: Fan li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c279a590fde66f4307c93ab2d4f680c7f41bbfa Author: Akshu Agrawal Date: Thu Nov 9 12:35:51 2017 -0500 ASoC: rt5645: Wait for 400msec before concluding on value of RT5645_VENDOR_ID2 Minimum time required between power On of codec and read of RT5645_VENDOR_ID2 is 400msec. We should wait that long before reading the value. TEST=Cold boot the device and check for sound device. Signed-off-by: Akshu Agrawal Signed-off-by: Bard Liao Signed-off-by: Alex Deucher Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 478f8da0f7c95f847a02f8e3b808926c894e3830 Author: Tim Hansen Date: Wed Nov 8 12:00:40 2017 -0800 fs/xfs: Remove NULL check before kmem_cache_destroy kmem_cache_destroy already checks for null values. Signed-off-by: Tim Hansen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/kmem.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4da4b10b5bde05d5b666405c74362a93da4b5ec4 Author: Darrick J. Wong Date: Wed Nov 8 12:21:05 2017 -0800 xfs: only check da node header padding on v5 filesystems It turns out that we only started zeroing a new da btree node's block header on v5 filesystems. Prior to that, we just wouldn't set anything at all, which means that the pad field never got set and would retain whatever happened to be in memory. Therefore, we can only check the pad for zeroness on v5 filesystems. shared/006 on a v4 filesystem exposes this scrub bug. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/dabtree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a605e86912ba6fc4b79084c286b1b45e753b72cc Author: Darrick J. Wong Date: Mon Nov 6 12:09:29 2017 -0800 xfs: fix btree scrub deref check The btree scrubber has some custom code to retrieve and check a btree block via xfs_btree_lookup_get_block. This function will either return an error code (verifiers failed) or a *pblock will be untouched (bad pointer). Since we previously set *pblock to NULL, we need to check *pblock, not pblock, to trigger the early bailout. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72f76f73642fa8528cab098b5f66abb299f1a018 Author: Darrick J. Wong Date: Mon Nov 6 12:01:48 2017 -0800 xfs: fix uninitialized return values in scrub code Fix smatch complaints about uninitialized return codes. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/dir.c | 2 +- fs/xfs/scrub/parent.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 0a1e1567b386b96c710d385181330c13ca03ffe3 Author: Darrick J. Wong Date: Mon Nov 6 11:46:15 2017 -0800 xfs: pass inode number to xfs_scrub_ino_set_{preen,warning} There are two ways to scrub an inode -- calling xfs_iget and checking the raw inode core, or by loading the inode cluster buffer and checking the on-disk contents directly. The second method is only useful if _iget fails the verifiers; when this is the case, sc->ip is NULL and calling the tracepoint will cause a system crash. Therefore, pass the raw inode number directly into the _preen and _warning functions. Reported-by: Dan Carpenter Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/attr.c | 2 +- fs/xfs/scrub/common.c | 6 ++++-- fs/xfs/scrub/common.h | 5 +++-- fs/xfs/scrub/inode.c | 8 ++++---- 4 files changed, 12 insertions(+), 9 deletions(-) commit 35ce85233412354d6737b8407738174eb251fd32 Author: Darrick J. Wong Date: Mon Nov 6 11:37:46 2017 -0800 xfs: refactor the directory data block bestfree checks In a directory data block, the zeroth bestfree item must point to the longest free space. Therefore, when we check the bestfree block's records against the data blocks, we only need to compare with bf[0] and don't need the loop. The weird loop was most probably the result of an earlier refactoring gone bad. Reported-by: Dan Carpenter Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/dir.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit fe1a5cbc78f7ac00f763c34d2b5b0273f5c4b951 Author: Mathieu Malaterre Date: Fri Sep 8 20:35:54 2017 +0200 watchdog: jz4780: Allow selection of jz4740-wdt driver This driver works for jz4740 & jz4780. Suggested-by: Maarten ter Huurne Signed-off-by: Mathieu Malaterre Acked-by: Guenter Roeck Cc: Ralf Baechle Cc: Wim Van Sebroeck Cc: Paul Cercueil Cc: linux-mips@linux-mips.org Cc: linux-watchdog@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17251/ Signed-off-by: James Hogan drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac831a379d34109451b3c41a44a20ee10ecb615f Author: Geert Uytterhoeven Date: Thu Nov 9 18:09:33 2017 +0100 fbdev: controlfb: Add missing modes to fix out of bounds access Dan's static analysis says: drivers/video/fbdev/controlfb.c:560 control_setup() error: buffer overflow 'control_mac_modes' 20 <= 21 Indeed, control_mac_modes[] has only 20 elements, while VMODE_MAX is 22, which may lead to an out of bounds read when parsing vmode commandline options. The bug was introduced in v2.4.5.6, when 2 new modes were added to macmodes.h, but control_mac_modes[] wasn't updated: https://kernel.opensuse.org/cgit/kernel/diff/include/video/macmodes.h?h=v2.5.2&id=29f279c764808560eaceb88fef36cbc35c529aad Augment control_mac_modes[] with the two new video modes to fix this. Reported-by: Dan Carpenter Signed-off-by: Geert Uytterhoeven Cc: Dan Carpenter Cc: Benjamin Herrenschmidt Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/controlfb.h | 2 ++ 1 file changed, 2 insertions(+) commit 826bb728796249d30b0e054c14b929c37afcb517 Author: Gustavo A. R. Silva Date: Thu Nov 9 18:09:33 2017 +0100 video: fbdev: sis_main: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115025 Addresses-Coverity-ID: 115026 Addresses-Coverity-ID: 115027 Addresses-Coverity-ID: 115028 Signed-off-by: Gustavo A. R. Silva Cc: Thomas Winischhofer Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sis/sis_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8c152208685ad1b01efdf540ac4a1c155de3451d Author: Gustavo A. R. Silva Date: Thu Nov 9 18:09:32 2017 +0100 video: fbdev: cirrusfb: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I placed the "fall through" comment on its own line, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/cirrusfb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0101f48ae50d700becafbbba2c57005174c54658 Author: Gustavo A. R. Silva Date: Thu Nov 9 18:09:32 2017 +0100 video: fbdev: aty: radeon_pm: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Cc: Benjamin Herrenschmidt Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/aty/radeon_pm.c | 3 +++ 1 file changed, 3 insertions(+) commit f5ed28d318ac4b4a835892f69135701757e5aeab Author: Gustavo A. R. Silva Date: Thu Nov 9 18:09:32 2017 +0100 video: fbdev: sm501fb: mark expected switch fall-through in sm501fb_blank_crt In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sm501fb.c | 1 + 1 file changed, 1 insertion(+) commit 3725369f94a364c5cbfd52d1852b51fa8eb9ebfe Author: Colin Ian King Date: Thu Nov 9 18:09:32 2017 +0100 video: fbdev: intelfb: remove redundant variables Variables err_max, err_target and f_best are being assigned values but these are never read, hence they are redundant variables and can be removed. Cleans up clang warnings: drivers/video/fbdev/intelfb/intelfbhw.c:946:2: warning: Value stored to 'err_max' is never read drivers/video/fbdev/intelfb/intelfbhw.c:947:2: warning: Value stored to 'err_target' is never read drivers/video/fbdev/intelfb/intelfbhw.c:995:6: warning: Value stored to 'f_best' is never read Signed-off-by: Colin Ian King Cc: Maik Broemme Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/intelfb/intelfbhw.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 6b04e9f2564a609cfaebae1ff9556118f3ae0a2e Author: Markus Elfring Date: Thu Nov 9 18:09:31 2017 +0100 video/fbdev/dnfb: Use common error handling code in dnfb_probe() Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/dnfb.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit ffb66624caa4db72e3a00aba8d27862395173b20 Author: Sudip Mukherjee Date: Thu Nov 9 18:09:31 2017 +0100 sm501fb: suspend and resume fb if it exists There are cases when panel and crt both are not defined and only one of them is defined and initialized. In such cases, suspend or resume it only if it is defined. Signed-off-by: Sudip Mukherjee Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sm501fb.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 35bfbf70b2928ce5fbc117a410915eeee457202b Author: Sudip Mukherjee Date: Thu Nov 9 18:09:31 2017 +0100 sm501fb: unregister framebuffer only if registered There are cases when panel and crt both are not defined and only one of them is defined and initialized. In such cases, while removing the device, unregister the framebuffer only if it was registered. Signed-off-by: Sudip Mukherjee Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sm501fb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d9b1fe651606c8da040adca6edf37b853dfd9514 Author: Sudip Mukherjee Date: Thu Nov 9 18:09:31 2017 +0100 sm501fb: deallocate colormap only if allocated There are cases when panel and crt both are not defined and only one of them is defined and initialized. In such cases, while removing the device deallocate the colormap only if that particular fb is defined. Signed-off-by: Sudip Mukherjee Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sm501fb.c | 3 +++ 1 file changed, 3 insertions(+) commit 31ff6b2a42979bb223def9609093ff1d8dcfb67e Author: Aleksandar Markovic Date: Thu Nov 9 18:09:31 2017 +0100 video: goldfishfb: Add support for device tree bindings Add ability to the Goldfish FB driver to be recognized by OS via DT. Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Cc: Douglas Leung Cc: James Hogan Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/goldfishfb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit bad12f43d0b164aad2a32b48bdc09d0d9680a213 Author: Aleksandar Markovic Date: Thu Nov 9 18:09:30 2017 +0100 Documentation: Add device tree binding for Goldfish FB driver Add documentation for DT binding of Goldfish FB driver. The compatible string used by OS for binding the driver is "google,goldfish-fb". Signed-off-by: Miodrag Dinic Signed-off-by: Goran Ferenc Signed-off-by: Aleksandar Markovic Acked-by: Rob Herring Cc: David Airlie Cc: Douglas Leung Cc: James Hogan Cc: Mark Rutland Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Signed-off-by: Bartlomiej Zolnierkiewicz .../devicetree/bindings/display/google,goldfish-fb.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit c98769475575c8a585f5b3952f4b5f90266f699b Author: Ladislav Michl Date: Thu Nov 9 18:09:30 2017 +0100 video: udlfb: Fix read EDID timeout While usb_control_msg function expects timeout in miliseconds, a value of HZ is used. Replace it with USB_CTRL_GET_TIMEOUT and also fix error message which looks like: udlfb: Read EDID byte 78 failed err ffffff92 as error is either negative errno or number of bytes transferred use %d format specifier. Returned EDID is in second byte, so return error when less than two bytes are received. Fixes: 18dffdf8913a ("staging: udlfb: enhance EDID and mode handling support") Signed-off-by: Ladislav Michl Cc: Bernie Thompson Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/udlfb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1e7d4beba2f5c8d22c46e15d3b89559934356501 Author: Bartlomiej Zolnierkiewicz Date: Thu Nov 9 18:09:30 2017 +0100 video: fbdev: remove dead igafb driver igafb driver hasn't compiled since at least kernel v2.6.34 as commit 6016a363f6b5 ("of: unify phandle name in struct device_node") missed updating igafb.c to use dp->phandle instead of dp->node. Cc: "David S. Miller" Cc: Bhumika Goyal Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/Kconfig | 10 - drivers/video/fbdev/Makefile | 1 - drivers/video/fbdev/igafb.c | 579 ------------------------------------------- include/video/iga.h | 24 -- 4 files changed, 614 deletions(-) commit 2d81482821e9a825030cf4ba60de990f1a2bdfd0 Author: Stefan Agner Date: Thu Nov 9 18:09:30 2017 +0100 video: fbdev: mxsfb: fix pixelclock polarity The PIXDATA flags of the display_flags enum are controller centric, e.g. NEGEDGE means the controller shall drive the data signals on pixelclocks negative edge. However, the drivers flag is display centric: Sample the data on negative (falling) edge. Therefore, change the if statement to check for the POSEDGE flag (which is typically not set): Drive on positive edge => sample on negative edge Signed-off-by: Stefan Agner Acked-by: Shawn Guo Cc: Jean-Christophe Plagniol-Villard Cc: Sascha Hauer Cc: Liu Ying Cc: Lothar Waßmann Cc: Fabio Estevam Cc: Max Krummenacher Cc: Mauro Salvini Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/mxsfb.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit ab798b908737e999e5d9bcebe972e9d5002583cc Author: Christophe JAILLET Date: Thu Nov 9 18:09:30 2017 +0100 video: fbdev: au1200fb: Style clean up Style clean-up. Signed-off-by: Christophe JAILLET Cc: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/au1200fb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0620865611c9e398f8feaccbe49be946bc6e04d1 Author: Christophe JAILLET Date: Thu Nov 9 18:09:29 2017 +0100 video: fbdev: au1200fb: Propagate an error code We should propagate the error code returned by 'fb_alloc_cmap()' instead of returning -EFAULT. Signed-off-by: Christophe JAILLET Cc: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/au1200fb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 58a81afcffeb457e56e8498c8bf5b73c1623c0b5 Author: Christophe JAILLET Date: Thu Nov 9 18:09:29 2017 +0100 video: fbdev: au1200fb: Remove some dead code There is no need to shut gcc up. It should not complain. Axe 'fbdev', it is never used in this function. Signed-off-by: Christophe JAILLET Cc: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/au1200fb.c | 6 ------ 1 file changed, 6 deletions(-) commit 6bbbb6805a72bd8c3e9ee626add6b6e8527bb971 Author: Christophe JAILLET Date: Thu Nov 9 18:09:29 2017 +0100 video: fbdev: au1200fb: Fix error handling path Rewrite the exit path based on 'au1200fb_drv_remove()'. We can safely iterate for all already handled planes. Even if not completely initialized, the functions that are called will silently accept the 'fb_info' structure that is passed. As soon as we find a NULL in the '_au1200fb_infos' array, we know that we have released all what we needed to release. So we can 'break'. Signed-off-by: Christophe JAILLET Cc: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/au1200fb.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 703a4af427a9bf3028f1a9369fcec7bfcf56f0ed Author: Christophe JAILLET Date: Thu Nov 9 18:09:29 2017 +0100 video: fbdev: au1200fb: Fix incorrect IRQ freeing 'au1200fb_drv_probe()' can not fail after a successful call to 'request_irq()'. So there is no point to call 'free_irq()' in the error handling path. Moreover, the hard coded AU1200_LCD_INT looks boggus since commit 1630d85a8312 ("au1200fb: fix hardcoded IRQ"). So, remove it. Signed-off-by: Christophe JAILLET Cc: Tejun Heo [b.zolnierkie: patch summary and description fixups] Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/au1200fb.c | 2 -- 1 file changed, 2 deletions(-) commit 451f130602619a17c8883dd0b71b11624faffd51 Author: Christophe JAILLET Date: Thu Nov 9 18:09:28 2017 +0100 video: fbdev: au1200fb: Release some resources if a memory allocation fails We should go through the error handling code instead of returning -ENOMEM directly. Signed-off-by: Christophe JAILLET Cc: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/au1200fb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8cae353e6b01ac3f18097f631cdbceb5ff28c7f3 Author: Christophe JAILLET Date: Thu Nov 9 18:09:28 2017 +0100 video: fbdev: au1200fb: Return an error code if a memory allocation fails 'ret' is known to be 0 at this point. In case of memory allocation error in 'framebuffer_alloc()', return -ENOMEM instead. Signed-off-by: Christophe JAILLET Cc: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/au1200fb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2e307cba0c56eba45649eb0f0f43b999e64aae94 Author: Christophe JAILLET Date: Thu Nov 9 18:09:28 2017 +0100 video: fbdev: au1200fb: Fix a potential double free If 'fb_alloc_cmap()' fails, 'fbi->pseudo_palette' is freed and an error code is returned by 'au1200fb_init_fbinfo()'. The only caller, 'au1200fb_drv_probe()' goes to an error handling path where resources allocated in 'fb_alloc_cmap()' are freed. This leads to a double free of 'fbi->pseudo_palette'. Fix it by letting the caller free all resources in case of failure in 'au1200fb_init_fbinfo()'. Signed-off-by: Christophe JAILLET Cc: Tejun Heo Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/au1200fb.c | 1 - 1 file changed, 1 deletion(-) commit baaf9be8d05c63c5cca9729ff05e69c6afed4fc5 Author: Heiko Carstens Date: Thu Nov 9 13:20:12 2017 +0100 s390: simplify transactional execution elf hwcap handling Just use MACHINE_HAS_TE to decide if HWCAP_S390_TE needs to be added to elf_hwcap. Suggested-by: Dan Horák Reviewed-by: Christian Borntraeger Reviewed-by: Hendrik Brueckner Signed-off-by: Heiko Carstens arch/s390/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56c5c6834e330caca7584445f4dc103515eb7175 Author: Harald Freudenberger Date: Mon Oct 30 12:10:54 2017 +0100 s390/zcrypt: Rework struct ap_qact_ap_info. The ap_qact_ap_info struct can get more easy handled when the fields in there can be accessed by their names but also the struct as a whole with just an unsigned long value. This patch reworks this struct to be a union and adapt the using code accordingly. Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens drivers/s390/crypto/ap_asm.h | 40 ++++++++++++++++++++-------------------- drivers/s390/crypto/ap_bus.c | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) commit da9a1446d248f673a8560ce46251ff620214ab7b Author: Christian Borntraeger Date: Thu Nov 9 10:00:45 2017 +0100 KVM: s390: provide a capability for AIS state migration The AIS capability was introduced in 4.12, while the interface to migrate the state was added in 4.13. Unfortunately it is not possible for userspace to detect the migration capability without creating a flic kvm device. As in QEMU the cpu model detection runs on the "none" machine this will result in cpu model issues regarding the "ais" capability. To get the "ais" capability properly let's add a new KVM capability that tells userspace that AIS states can be migrated. Signed-off-by: Christian Borntraeger Reviewed-by: Cornelia Huck Reviewed-by: David Hildenbrand Acked-by: Halil Pasic Documentation/virtual/kvm/api.txt | 9 +++++++++ Documentation/virtual/kvm/devices/s390_flic.txt | 2 ++ arch/s390/kvm/kvm-s390.c | 1 + include/uapi/linux/kvm.h | 1 + 4 files changed, 13 insertions(+) commit 97f0eb9f0fec0563c1c796d95123e871b8bb65c0 Author: Hou Tao Date: Mon Nov 6 10:11:25 2017 +0800 md/bitmap: clear BITMAP_WRITE_ERROR bit before writing it to sb For a RAID1 device using a file-based bitmap, if a bitmap write error occurs but the later writes succeed, it's possible both BITMAP_STALE and BITMAP_WRITE_ERROR bits will be written to the bitmap super block, the BITMAP_STALE bit will be handled properly and be cleared, but the BITMAP_WRITE_ERROR bit in sb->flags will make bitmap_create() to fail. So clear it to protect against the write failure-and-then-recovery case. Signed-off-by: Hou Tao Signed-off-by: Shaohua Li drivers/md/md-bitmap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit db0505d320660b6ad92418847e7eca6b61b246ac Author: NeilBrown Date: Tue Oct 17 16:18:36 2017 +1100 md: be cautious about using ->curr_resync_completed for ->recovery_offset The ->recovery_offset shows how much of a non-InSync device is actually in sync - how much has been recoveryed. When performing a recovery, ->curr_resync and ->curr_resync_completed follow the device address being recovered and so can be used to update ->recovery_offset. When performing a reshape, ->curr_resync* might follow the device addresses (raid5) or might follow array addresses (raid10), so cannot in general be used to set ->recovery_offset. When reshaping backwards, ->curre_resync* measures from the *end* of the array-or-device, so is particularly unhelpful. So change the common code in md.c to only use ->curr_resync_complete for the simple recovery case, and add code to raid5.c to update ->recovery_offset during a forwards reshape. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 33 ++++++++++++++++++++++----------- drivers/md/raid5.c | 24 ++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 11 deletions(-) commit 61d750773df388632b11a6170098e2865977e1f6 Merge: f0d438e 432953b Author: Radim Krčmář Date: Thu Nov 9 16:25:22 2017 +0100 Merge tag 'kvm-ppc-next-4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc Second PPC KVM update for 4.15 This merges in my kvm-ppc-fixes branch to resolve the conflicts between the fixes that have been applied there and the changes made in my patch series to allow HPT guests to run on a radix host on POWER9. It also resolves another conflict in the code for the KVM_CAP_PPC_HTM capability. commit de8cd0dc834f2294bcf20240ea037c3864bc4f9a Author: James Hogan Date: Fri Aug 11 21:56:52 2017 +0100 MIPS/ptrace: Update syscall nr on register changes Update the thread_info::syscall field when registers are modified via ptrace to change or cancel the system call being entered. This is important to allow seccomp and the syscall entry and exit trace events to observe the new syscall number changed by the normal ptrace hook or seccomp. That includes allowing seccomp's recheck of the system call number after SECCOMP_RET_TRACE to notice if the syscall is changed to a denied one, which happens in seccomp since commit ce6526e8afa4 ("seccomp: recheck the syscall after RET_TRACE") in v4.8. In the process of doing this, the logic to determine whether an indirect system call is in progress (i.e. the O32 ABI's syscall()) is abstracted into mips_syscall_is_indirect(), and a new mips_syscall_update_nr() is used to update the thread_info::syscall based on the register state. The following ptrace operations are updated: - PTRACE_SETREGS (ptrace_setregs()). - PTRACE_SETREGSET with NT_PRSTATUS (gpr32_set() and gpr64_set()). - PTRACE_POKEUSR with 2/v0 or 4/a0 for indirect syscall ([compat_]arch_ptrace()). Fixes: c2d9f1775731 ("MIPS: Fix syscall_get_nr for the syscall exit tracing.") Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Lars Persson Cc: Oleg Nesterov Cc: Kees Cook Cc: Andy Lutomirski Cc: Will Drewry Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16995/ arch/mips/include/asm/syscall.h | 29 +++++++++++++++++++++++++---- arch/mips/kernel/ptrace.c | 15 +++++++++++++++ arch/mips/kernel/ptrace32.c | 7 +++++++ 3 files changed, 47 insertions(+), 4 deletions(-) commit b6318a903d068e2319eaef95966f4440114973f7 Author: James Hogan Date: Fri Aug 11 21:56:51 2017 +0100 MIPS/ptrace: Pick up ptrace/seccomp changed syscalls The MIPS syscall_trace_enter() allows the system call number to be altered or cancelled by a ptrace tracer, via the normal ptrace hook (PTRACE_SYSCALL) and changing the system call number register on entry, and similarly via seccomp (PTRACE_EVENT_SECCOMP when a seccomp filter returns SECCOMP_RET_TRACE). Be sure to update the syscall local variable if this happens, so that seccomp will filter the correct system call number if the normal ptrace hook changes it first, and so that if either the normal ptrace hook or seccomp change it the correct system call number is passed to the trace event. This won't have any effect until the next commit, which fixes ptrace to update thread_info::syscall. Fixes: c2d9f1775731 ("MIPS: Fix syscall_get_nr for the syscall exit tracing.") Signed-off-by: James Hogan Reviewed-by: Kees Cook Cc: Ralf Baechle Cc: Lars Persson Cc: Oleg Nesterov Cc: Kees Cook Cc: Andy Lutomirski Cc: Will Drewry Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16996/ arch/mips/kernel/ptrace.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 547da673173de51f73887377eb275304775064ad Author: Maciej W. Rozycki Date: Tue Nov 7 19:09:20 2017 +0000 MIPS: Fix an n32 core file generation regset support regression Fix a commit 7aeb753b5353 ("MIPS: Implement task_user_regset_view.") regression, then activated by commit 6a9c001b7ec3 ("MIPS: Switch ELF core dumper to use regsets.)", that caused n32 processes to dump o32 core files by failing to set the EF_MIPS_ABI2 flag in the ELF core file header's `e_flags' member: $ file tls-core tls-core: ELF 32-bit MSB executable, MIPS, N32 MIPS64 rel2 version 1 (SYSV), [...] $ ./tls-core Aborted (core dumped) $ file core core: ELF 32-bit MSB core file MIPS, MIPS-I version 1 (SYSV), SVR4-style $ Previously the flag was set as the result of a: statement placed in arch/mips/kernel/binfmt_elfn32.c, however in the regset case, i.e. when CORE_DUMP_USE_REGSET is set, ELF_CORE_EFLAGS is no longer used by `fill_note_info' in fs/binfmt_elf.c, and instead the `->e_flags' member of the regset view chosen is. We have the views defined in arch/mips/kernel/ptrace.c, however only an o32 and an n64 one, and the latter is used for n32 as well. Consequently an o32 core file is incorrectly dumped from n32 processes (the ELF32 vs ELF64 class is chosen elsewhere, and the 32-bit one is correctly selected for n32). Correct the issue then by defining an n32 regset view and using it as appropriate. Issue discovered in GDB testing. Fixes: 7aeb753b5353 ("MIPS: Implement task_user_regset_view.") Signed-off-by: Maciej W. Rozycki Cc: Ralf Baechle Cc: Djordje Todorovic Cc: linux-mips@linux-mips.org Cc: # 3.13+ Patchwork: https://patchwork.linux-mips.org/patch/17617/ Signed-off-by: James Hogan arch/mips/kernel/ptrace.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit a401917bc3e2d251ce5210527d8de0b0b83f3b44 Author: Christian Borntraeger Date: Thu Nov 9 08:57:47 2017 +0100 s390/virtio: remove unused header file kvm_virtio.h With commit 7fb2b2d51244 ("s390/virtio: remove the old KVM virtio transport") the pre-ccw virtio transport for s390 was removed. To complete the removal the uapi header file that contains the related data structures must also be removed. Signed-off-by: Christian Borntraeger Signed-off-by: Heiko Carstens arch/s390/include/uapi/asm/kvm_virtio.h | 64 --------------------------------- arch/s390/kernel/setup.c | 1 - 2 files changed, 65 deletions(-) commit e8c49fa96838101435b9e4884d49b30da7a4e0c6 Author: Chris Wilson Date: Thu Nov 9 08:55:40 2017 +0000 drm/i915: Reorder context-close to avoid calling i915_vma_close() under RCU When we close the VMA, we unbind it from the ppgtt and tear down the page directory pointing at it. That may trigger us to return WC pages back to the system, requiring conversion back to WB which itself may sleep. That makes i915_vma_close() unsuitable for use inside the RCU read lock, which we need to hold to iterate the radixtree. The fix is quite simple, we can close all the VMA as we close the ppgtt, we only need to do that instead of closing them during destruction of the LUT. v2: Order between closing the LUT and the ppgtt is important; we use the vma inside the LUT as a means of retrieving the object, and so we must clear the LUT before freeing the VMA when closing the ppgtt. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103638 Fixes: 547da76b5777 ("drm/i915: Hold rcu_read_lock when iterating over the radixtree (vma idr)") Fixes: d1b48c1e7184 ("drm/i915: Replace execbuf vma ht with an idr") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20171109085540.32264-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin (cherry picked from commit 94dec87159af6f3dcc0b78d3f909aefa9e29c01a) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_context.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 6ac43272768ca901daac4076a66c2c4e3c7b9321 Author: Ville Syrjälä Date: Wed Nov 8 15:35:55 2017 +0200 drm/i915: Move init_clock_gating() back to where it was Apparently setting up a bunch of GT registers before we've properly initialized the rest of the GT hardware leads to these setting being lost. So looks like I broke HSW with commit b7048ea12fbb ("drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks") by doing init_clock_gating() too early. This should actually affect other platforms as well, but apparently not to such a great degree. What I was ultimately after in that commit was to move the ilk_init_lp_watermarks() call earlier. So let's undo the damage and move init_clock_gating() back to where it was, and call ilk_init_lp_watermarks() just before the watermark state readout. This highlights how fragile and messed up our init order really is. I wonder why we even initialize the display before gem. The opposite order would make much more sense to me... v2: Keep WaRsPkgCStateDisplayPMReq:hsw early as it really must be done before all planes might get disabled. Cc: stable@vger.kernel.org Cc: Chris Wilson Cc: Mark Janes Cc: Maarten Lankhorst Cc: Daniel Vetter Cc: Joonas Lahtinen Cc: Oscar Mateo Cc: Mika Kuoppala Reported-by: Mark Janes Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103549 Fixes: b7048ea12fbb ("drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks") References: https://lists.freedesktop.org/archives/intel-gfx/2017-November/145432.html Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171108133555.14091-1-ville.syrjala@linux.intel.com Tested-by: Chris Wilson Reviewed-by: Chris Wilson (cherry picked from commit f72b84c677d61f201b869223a8d6e389c7bb7d3d) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 14 ++++++++++-- drivers/gpu/drm/i915/intel_pm.c | 44 +++++++++++++++--------------------- 2 files changed, 30 insertions(+), 28 deletions(-) commit 398c13b9632027d044a0ab41538743214284c2a2 Author: Chris Wilson Date: Tue Nov 7 22:06:56 2017 +0000 drm/i915: Prune the reservation shared fence array The shared fence array is not autopruning and may continue to grow as an object is shared between new timelines. Take the opportunity when we think the object is idle (we have to confirm that any external fence is also signaled) to decouple all the fences. We apply a similar trick after waiting on an object, see commit e54ca9774777 ("drm/i915: Remove completed fences after a wait") v2: No longer need to handle the batch pool as a special case. v3: Need to trylock from within i915_vma_retire as this may be called form the shrinker - and we may later try to allocate underneath the reservation lock, so a deadlock is possible. References: https://bugs.freedesktop.org/show_bug.cgi?id=102936 Fixes: d07f0e59b2c7 ("drm/i915: Move GEM activity tracking into a common struct reservation_object") Fixes: 80b204bce8f2 ("drm/i915: Enable multiple timelines") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171107220656.5020-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen (cherry picked from commit 1ab22356b37ab08a391d6f007fda4c822bef9fb5) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_vma.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 0676e79415a1e1a2186ba2529abad3d3329bea95 Author: Chris Wilson Date: Wed Nov 8 09:44:00 2017 +0000 drm/i915: Idle the GPU before shinking everything The handling of contexts are peculiar. Instead of tieing their vma to activity, we pin the context. This means that we cannot simply unbind the context object itself at will (which would normally cause us to wait for the vma to be idle), but must manually idle the GPU and retire requests first. A consequence of this peculiarity is when doing a last desperate attempt to recover memory. If the memory is tied up inside active context objects, we will fail to recover any memory simply by trying to unbind the objects without first doing a wait-for-idle. A side-effect of removing the call to shrinker_lock_uninterruptible() from i915_gem_shrinker_oom() was that we removed an unlocked wait-for-idle, and so lost the "natural" shrinkage of context objects. By replacing that with a locked wait from inside i915_gem_shrink(), we not only replace it with the ability to recover all context objects, but do so for all i915_gem_shrink_all() callers. v2: Switching requires request allocation, which is not permitted from inside the shrinker as it only uses ordinary allocations. References: https://bugs.freedesktop.org/show_bug.cgi?id=102936 Fixes: f2123818ffad ("drm/i915: Move dev_priv->mm.[un]bound_list to its own lock") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171108094400.1386-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen (cherry picked from commit 2f6a3783833dde63f1c08982943a8b2229b97afb) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_shrinker.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 0f763ff370a538c07f8f266a787ebc1a63d5c7dc Author: Chris Wilson Date: Mon Nov 6 11:15:08 2017 +0000 drm/i915: Lock llist_del_first() vs llist_del_all() An oversight in commit 87701b4b5593 ("drm/i915: Only free the oldest stale object before a fresh allocation") was that not only do we have to serialise concurrent users of llist_del_first(), but we also have to lock llist_del_first() vs llist_del_all(). From llist.h, * This can be summarized as follows: * * | add | del_first | del_all * add | - | - | - * del_first | | L | L * del_all | | | - * * Where, a particular row's operation can happen concurrently with a column's * operation, with "-" being no lock needed, while "L" being lock is needed. This should hopefully explain: <4>[ 89.287106] general protection fault: 0000 [#1] PREEMPT SMP <4>[ 89.287126] Modules linked in: snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal intel_powerclamp coretemp i915 crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core r8169 mii mei_me mei snd_pcm prime_numbers i2c_hid pinctrl_geminilake pinctrl_intel <4>[ 89.287226] CPU: 2 PID: 23 Comm: ksoftirqd/2 Tainted: G U 4.14.0-rc8-CI-CI_DRM_3315+ #1 <4>[ 89.287247] Hardware name: Intel Corp. Geminilake/GLK RVP2 LP4SD (07), BIOS GELKRVPA.X64.0062.B30.1708222146 08/22/2017 <4>[ 89.287270] task: ffff88017ab34ec0 task.stack: ffffc90000128000 <4>[ 89.287290] RIP: 0010:llist_add_batch+0x4/0x20 <4>[ 89.287301] RSP: 0018:ffffc9000012bdb8 EFLAGS: 00010296 <4>[ 89.287314] RAX: ffffffff811017ad RBX: 6e468801a1560000 RCX: ef3e53fceecdeb81 <4>[ 89.287330] RDX: 6e468801a1566130 RSI: ffff880103d73d98 RDI: ffff880103d73d98 <4>[ 89.287346] RBP: ffffc9000012bdb8 R08: ffff88017ab35780 R09: 0000000000000000 <4>[ 89.287361] R10: ffffc9000012bd68 R11: 00000000abb18c3d R12: ffffffffa01369e0 <4>[ 89.287377] R13: ffff88017fd1b8f8 R14: ffff88017ab34ec0 R15: 000000000000000a <4>[ 89.287393] FS: 0000000000000000(0000) GS:ffff88017fd00000(0000) knlGS:0000000000000000 <4>[ 89.287411] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4>[ 89.287424] CR2: 00007ff0c0755018 CR3: 000000016df9b000 CR4: 00000000003406e0 <4>[ 89.287440] Call Trace: <4>[ 89.287511] __i915_gem_free_object_rcu+0x20/0x40 [i915] <4>[ 89.287527] rcu_process_callbacks+0x27a/0x730 <4>[ 89.287544] __do_softirq+0xc0/0x4ae <4>[ 89.287559] ? smpboot_thread_fn+0x2d/0x280 <4>[ 89.287571] run_ksoftirqd+0x1f/0x70 <4>[ 89.287582] smpboot_thread_fn+0x18a/0x280 <4>[ 89.287595] kthread+0x114/0x150 <4>[ 89.287605] ? sort_range+0x30/0x30 <4>[ 89.287615] ? kthread_create_on_node+0x40/0x40 <4>[ 89.287628] ret_from_fork+0x27/0x40 <4>[ 89.287641] Code: 0d 48 83 ea 01 4c 89 c1 48 83 fa ff 74 12 48 23 0c d7 74 ed 48 c1 e2 06 48 0f bd c9 48 8d 04 0a 5d c3 90 90 90 90 90 55 48 89 e5 <48> 8b 0a 48 89 0e 48 89 c8 f0 48 0f b1 3a 48 39 c1 75 ed 48 85 <1>[ 89.287774] RIP: llist_add_batch+0x4/0x20 RSP: ffffc9000012bdb8 <4>[ 89.287826] ---[ end trace e775d15174d8ae02 ]--- (Lockless lists are only easy (and lockless) when only using llist_add/llist_del_all!) Fixes: 87701b4b5593 ("drm/i915: Only free the oldest stale object before a fresh allocation") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171106111508.11941-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala (cherry picked from commit f991c492aa55fb1c6834882c5d786d5bb3b25f07) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 90c702b88e5b5bbe2be53848aa3aba7c2b64223f Author: Maarten Lankhorst Date: Thu Oct 19 17:13:41 2017 +0200 drm/i915: Calculate ironlake intermediate watermarks correctly, v2. The watermarks it should calculate against are the old optimal watermarks. The currently active crtc watermarks are pure fiction, and are invalid in case of a nonblocking modeset, page flip enabling/disabling planes or any other reason. When the crtc is disabled or during a modeset the intermediate watermarks don't need to be programmed separately, and could be directly assigned to the optimal watermarks. Changes since v1: - Use intel_atomic_get_old_crtc_state. (ville) Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20171019151341.4579-2-maarten.lankhorst@linux.intel.com [mlankhorst: Add cc stable and bugzilla link, since previous patch doesn't fix issue by itself] Cc: stable@vger.kernel.org #v4.8+ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102373 (cherry picked from commit b6b178a77210055b153dbc175e4468bd3c7122df) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_pm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit b58d4bef1070c6ca57008756d86f79a687d2bbea Author: Joonas Lahtinen Date: Mon Oct 23 18:32:09 2017 +0300 drm/i915: Disable lazy PPGTT page table optimization for vGPU When running under virtualization (vGPU active), we must disable the lazy PPGTT page table initialization optimization introduced by commit 14826673247e ("drm/i915: Only initialize partially filled pagetables"). We must do this because GVT-g makes unduly assumptions about guest behaviour, which this optimization breaks. This results in following looking errors in the host: ERROR gvt: guest page write error -22, gfn 0x7ada8, pa 0x7ada89a8, var 0x6, len 1 The real fix is to not to depend on i915 driver behaviour, but instead either rely on only the contracts that i915 has with the hardware, or add some paravirtualization. While the real fix is en route, it won't be finished in time for 4.15, so the best option is to disable the optimization for now when vGPU is active to avoid breaking 4.15 guests in existing VM environments. Fixes: 14826673247e ("drm/i915: Only initialize partially filled pagetables") Suggested-by: Xiaolin Zhang Signed-off-by: Xiaolin Zhang [Joonas: Rewrote the commit message and added tags.] Signed-off-by: Joonas Lahtinen Cc: Zhenyu Wang Cc: Zhi Wang Cc: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Cc: Jani Nikula Cc: Rodrigo Vivi Acked-by: Chris Wilson Acked-by: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20171023153209.10527-1-joonas.lahtinen@linux.intel.com (cherry picked from commit 22a8a4fc93b14b5a8cfc785edbdc6f7bd98bffb6) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2487174af332f46456048f96ddd2a8c28a3839e Author: Chris Wilson Date: Tue Oct 24 12:55:01 2017 +0100 drm/i915/execlists: Remove the priority "optimisation" Originally we set the priority to max upon inserting the request into the execlists queue (and removing it from the scheduler lists). We could then use the prio==INT_MAX as a shortcut within execlists_schedule() to detect the end of the dependency chain. Since commit 1f181225f8ec ("drm/i915/execlists: Keep request->priority for its lifetime") this is no longer true as we use the request completion as an indicator the schedule dependency chain is complete instead. (This allows us to then reschedule requests even when its context is in flight.) However, this makes the GEM_BUG_ON() inside execlists_schedule() racy as we may change the rq->prio at the same time. As the assertion is useful, let's keep the assertion and remove the micro-optimisation. Fixes: 1f181225f8ec ("drm/i915/execlists: Keep request->priority for its lifetime") Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171024115501.21033-1-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski (cherry picked from commit 64b80085dd3603d401fc05879f700b86a3a5c8e8) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_lrc.c | 2 -- 1 file changed, 2 deletions(-) commit 5d266692372dfb412150006df420185b666658f9 Author: Chris Wilson Date: Mon Oct 23 22:32:36 2017 +0100 drm/i915: Filter out spurious execlists context-switch interrupts Back in commit a4b2b01523a8 ("drm/i915: Don't mark an execlists context-switch when idle") we noticed the presence of late context-switch interrupts. We were able to filter those out by looking at whether the ELSP remained active, but in commit beecec901790 ("drm/i915/execlists: Preemption!") that became problematic as we now anticipate receiving a context-switch event for preemption while ELSP may be empty. To restore the spurious interrupt suppression, add a counter for the expected number of pending context-switches and skip if we do not need to handle this interrupt to make forward progress. v2: Don't forget to switch on for preempt. v3: Reduce the counter to a on/off boolean tracker. Declare the HW as active when we first submit, and idle after the final completion event (with which we confirm the HW says it is idle), and track each source of activity separately. With a finite number of sources, it should aide us in debugging which gets stuck. Fixes: beecec901790 ("drm/i915/execlists: Preemption!") Signed-off-by: Chris Wilson Cc: Michal Winiarski Cc: Tvrtko Ursulin Cc: Arkadiusz Hiler Cc: Mika Kuoppala Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171023213237.26536-3-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala (cherry picked from commit 4a118ecbe99c93cf9f9582e83a88d03f18d6cb84) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_guc_submission.c | 3 +++ drivers/gpu/drm/i915/i915_irq.c | 6 ++++-- drivers/gpu/drm/i915/intel_engine_cs.c | 5 +++-- drivers/gpu/drm/i915/intel_lrc.c | 27 ++++++++++++++++++------ drivers/gpu/drm/i915/intel_ringbuffer.h | 34 ++++++++++++++++++++++++++++-- 5 files changed, 62 insertions(+), 13 deletions(-) commit 22b8ba765a726d90e9830ff6134c32b04f12c10f Author: James Hogan Date: Mon Jul 3 23:41:47 2017 +0100 MIPS: Fix MIPS64 FP save/restore on 32-bit kernels 32-bit kernels can be configured to support MIPS64, in which case neither CONFIG_64BIT or CONFIG_CPU_MIPS32_R* will be set. This causes the CP0_Status.FR checks at the point of floating point register save and restore to be compiled out, which results in odd FP registers not being saved or restored to the task or signal context even when CP0_Status.FR is set. Fix the ifdefs to use CONFIG_CPU_MIPSR2 and CONFIG_CPU_MIPSR6, which are enabled for the relevant revisions of either MIPS32 or MIPS64, along with some other CPUs such as Octeon (r2), Loongson1 (r2), XLP (r2), Loongson 3A R2. The suspect code originates from commit 597ce1723e0f ("MIPS: Support for 64-bit FP with O32 binaries") in v3.14, however the code in __enable_fpu() was consistent and refused to set FR=1, falling back to software FPU emulation. This was suboptimal but should be functionally correct. Commit fcc53b5f6c38 ("MIPS: fpu.h: Allow 64-bit FPU on a 64-bit MIPS R6 CPU") in v4.2 (and stable tagged back to 4.0) later introduced the bug by updating __enable_fpu() to set FR=1 but failing to update the other similar ifdefs to enable FR=1 state handling. Fixes: fcc53b5f6c38 ("MIPS: fpu.h: Allow 64-bit FPU on a 64-bit MIPS R6 CPU") Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Paul Burton Cc: linux-mips@linux-mips.org Cc: # 4.0+ Patchwork: https://patchwork.linux-mips.org/patch/16739/ arch/mips/include/asm/asmmacro.h | 8 ++++---- arch/mips/kernel/r4k_fpu.S | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) commit 37d15948eb72533757ff352cf6f92dc64daa291f Author: Florian Fainelli Date: Thu Mar 9 13:11:49 2017 -0800 MIPS: page.h: Define virt_to_pfn() Define virt_to_pfn() based on the existing definition of virt_to_page() which already does a PFN_DOWN(vir_to_phys(kaddr)). Signed-off-by: Florian Fainelli Cc: Ralf Baechle Cc: Paul Burton Cc: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15409/ Signed-off-by: James Hogan arch/mips/include/asm/page.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a4c447533a18ee86e07232d6344ba12b1f9c5077 Author: Len Brown Date: Thu Nov 9 02:19:39 2017 -0500 intel_idle: Graceful probe failure when MWAIT is disabled When MWAIT is disabled, intel_idle refuses to probe. But it may mis-lead the user by blaming this on the model number: intel_idle: does not run on family 6 modesl 79 So defer the check for MWAIT until after the model# white-list check succeeds, and if the MWAIT check fails, tell the user how to fix it: intel_idle: Please enable MWAIT in BIOS SETUP Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 924d4db29f1237f9fe90a7439d2ee81837d282bd Author: Yoshihiro Shimoda Date: Thu Nov 9 11:39:20 2017 +0100 gpio: rcar: Add r8a77995 (R-Car D3) support This patch adds binding for r8a77995 (R-Car D3). This SoC can use "renesas,rcar-gen3-gpio" fallback compatibility. So, this patch doesn't modify the gpio-rcar driver. Signed-off-by: Yoshihiro Shimoda Acked-by: Simon Horman Acked-by: Rob Herring Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt | 1 + 1 file changed, 1 insertion(+) commit 9e429d564926d3bca49907fa03031da705ad6f2c Author: Jason Gerecke Date: Tue Nov 7 08:25:17 2017 -0800 HID: wacom: generic: Send BTN_STYLUS3 when both barrel switches are set The Wacom Pro Pen 3D includes a third barrel switch which is intended to be particularly useful in applications where one frequency uses pan, zoom, and rotate to navigate around a scene or model. The pen is compatible with the MobileStudio Pro, 2nd-gen Intuos Pro, and Cintiq Pro. When the third button is pressed, these devices set both the HID_DG_BARRELSWITCH and HID_DG_BARRELSWITCH2 usages since their HID descriptors do not include a usage specific to the button. Rather than send both BTN_STYLUS and BTN_STYLUS2 when the third button is pressed, userspace (libinput) has requested that we detect this condition and report a newly-defined BTN_STYLUS3 event instead. We could define a quirk specific to devices compatible with the Pro Pen 3D, but the liklihood of seeing both barrel switch bits set with other pens/devices is low enough to not worry about (pens mechanically prevent accidental activation of multiple switches). Signed-off-by: Jason Gerecke Acked-by: Dmitry Torokhov Acked-by: Peter Hutterer Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 18 ++++++++++++++++-- drivers/hid/wacom_wac.h | 2 ++ include/uapi/linux/input-event-codes.h | 1 + 3 files changed, 19 insertions(+), 2 deletions(-) commit 492ca83c3d19fba1622164f07cd7b775596a7db2 Author: Bastien Nocera Date: Tue Nov 7 15:24:47 2017 +0100 HID: sony: Fix SHANWAN pad rumbling on USB The SHANWAN PS3 clone joypad will start its rumble motors as soon as it is plugged in via USB. As the additional USB interrupt does nothing on the original PS3 Sixaxis joypads, and makes a number of other clone joypads actually start sending data, disable that call for the SHANWAN so the rumble motors aren't started on plug. Signed-off-by: Bastien Nocera Signed-off-by: Jiri Kosina drivers/hid/hid-sony.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit cdafb6d8b8da7fde266f79b3287ac221aa841879 Author: Andrew Gabbasov Date: Wed Nov 8 10:13:15 2017 -0700 usb: gadget: f_fs: Fix use-after-free in ffs_free_inst KASAN enabled configuration reports an error BUG: KASAN: use-after-free in ffs_free_inst+... [usb_f_fs] at addr ... Write of size 8 by task ... This is observed after "ffs-test" is run and interrupted. If after that functionfs is unmounted and g_ffs module is unloaded, that use-after-free occurs during g_ffs module removal. Although the report indicates ffs_free_inst() function, the actual use-after-free condition occurs in _ffs_free_dev() function, which is probably inlined into ffs_free_inst(). This happens due to keeping the ffs_data reference in device structure during functionfs unmounting, while ffs_data itself is freed as no longer needed. The fix is to clear that reference in ffs_closed() function, which is a counterpart of ffs_ready(), where the reference is stored. Fixes: 3262ad824307 ("usb: gadget: f_fs: Stop ffs_closed NULL pointer dereference") Cc: stable@vger.kernel.org Signed-off-by: Andrew Gabbasov Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_fs.c | 1 + 1 file changed, 1 insertion(+) commit 2ef47001b3ee3ded579b7532ebdcf8680e4d8c54 Author: Alan Stern Date: Wed Nov 8 12:23:17 2017 -0500 USB: usbfs: compute urb->actual_length for isochronous The USB kerneldoc says that the actual_length field "is read in non-iso completion functions", but the usbfs driver uses it for all URB types in processcompl(). Since not all of the host controller drivers set actual_length for isochronous URBs, programs using usbfs with some host controllers don't work properly. For example, Minas reports that a USB camera controlled by libusb doesn't work properly with a dwc2 controller. It doesn't seem worthwhile to change the HCDs and the documentation, since the in-kernel USB class drivers evidently don't rely on actual_length for isochronous transfers. The easiest solution is for usbfs to calculate the actual_length value for itself, by adding up the lengths of the individual packets in an isochronous transfer. Signed-off-by: Alan Stern CC: Minas Harutyunyan Reported-and-tested-by: wlf CC: Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devio.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit d656fa32b13424701bb85f6b5183ea869b363799 Author: Felipe Balbi Date: Thu Nov 9 12:59:58 2017 +0200 usb: core: message: remember to reset 'ret' to 0 when necessary usb_control_msg() will return the amount of bytes transferred, if that amount matches what we wanted to transfer, we need to reset 'ret' to 0 from usb_get_status(). Fixes: 2e43f0fe379c ("usb: core: add a 'type' parameter to usb_get_status()") Reported-by: Tony Lindgren Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/core/message.c | 2 ++ 1 file changed, 2 insertions(+) commit 9dc505d6df5c607a4ea088b5f1907540079a9859 Merge: 722c908 666740f Author: Thomas Gleixner Date: Thu Nov 9 12:57:46 2017 +0100 Merge tag 'irqchip-4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates for 4.15, take #3 from Marc Zyngier: - New Socionext Synquacer EXIU driver - stm32 new platform support and fixes - One GICv4 bugfix - A couple of MIPS GIC cleanups commit 402946a8ef71ebfd1cbb19829db2da62906f0519 Author: Hans de Goede Date: Tue Nov 7 13:28:00 2017 +0100 HID: i2c-hid: Add no-irq-after-reset quirk for 0911:5288 device Several cheap Apollo Lake based laptops / 2-in-1s use an i2c-hid mt touchpad which is advertised by the DSDT with an ACPI HID of "SYNA3602", this touchpad can be found on e.g. the Cube Thinker and the EZBook 3 Pro. On my "T-bao Tbook air" the i2c-hid driver fails to bind to this touchpad: "i2c_hid i2c-SYNA3602:00: failed to reset device.". After some debuging this it seems that this touchpad simply never sends an interrupt after a reset as expected by the i2c hid driver. This commit adds a quirk for this device, making i2c_hid_command sleep 100ms after a reset instead of waiting for an irq, fixing i2c-hid failing to bind to this touchpad. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 3 +++ drivers/hid/i2c-hid/i2c-hid.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 339ee3fcbdab736adbc30b7a3d675005c61a2a40 Author: Mustafa Kuscu Date: Sat Oct 28 10:31:40 2017 +0300 HID: add backlight level quirk for Asus ROG laptops On laptops such as Asus GL553VD, setting keyboard backlight levels does not work. This change enables F3/F4 keys to set backlight levels (from 0 to 3, total 4 levels) on such laptops. It is intended only to the following device: 0x0b05 1854: P: Vendor=0b05 ProdID=1854 Rev=03.02 S: Manufacturer=ITE Tech. Inc. S: Product=ITE Device(8910) [jkosina@suse.cz: massage changelog a little bit] Signed-off-by: Mustafa C Kuscu Signed-off-by: Jiri Kosina drivers/hid/hid-asus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cde3076bdc38bf436e517a379759a9092c6ffd4f Author: Sébastien Szymanski Date: Thu Nov 2 12:12:43 2017 +0100 HID: cp2112: add HIDRAW dependency Otherwise, with HIDRAW=n, the probe function crashes because of null dereference of hdev->hidraw. Cc: stable@vger.kernel.org Fixes: 42cb6b35b9e6 ("HID: cp2112: use proper hidraw name with minor number") Signed-off-by: Sébastien Szymanski Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a0f95ce48304364979066600eba7cc5c939ba83 Author: Andrea Bondavalli Date: Tue Oct 31 12:58:18 2017 +0100 ASoC: sun4i-codec: fixed 32bit audio capture support for H3/H2+ 32bit and 24bit audio capture formats for H3/H2+ are broken because the RX_SAMPLE_BITS and the RX_FIFO_MODE bits of AC_ADC_FIFOC register of the audio codec are not set to operate in 24bit mode but in 16bit mode only. The following patch sets the H3 audio codec registers and the DMA bus width properly when a 24/32bit capture is requested. Signed-off-by: Andrea Bondavalli Signed-off-by: Mark Brown sound/soc/sunxi/sun4i-codec.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) commit e0d746cc0155a51cc24eb56286cd21a2c5aa4985 Author: Pierre-Louis Bossart Date: Wed Nov 8 16:42:31 2017 -0600 ASoC: da7213: add support for DSP modes DSP modes are documented in the data sheet but not enabled in the driver. The work-around already implemented for DA7218/9 is also required to make sure the bit clock handling in DSP modes follows ASoC conventions. Tested with ARD-AUDIO-DA7212 and Minnowmax Turbot boards Signed-off-by: Pierre-Louis Bossart Acked-by: Adam Thomson Signed-off-by: Mark Brown sound/soc/codecs/da7213.c | 58 +++++++++++++++++++++++++++++++++++++++-------- sound/soc/codecs/da7213.h | 1 + 2 files changed, 49 insertions(+), 10 deletions(-) commit e7b8a6d3efa8316dfe786e9cd559c62e9152337c Author: Maxime Ripard Date: Thu Nov 9 10:40:46 2017 +0100 ASoC: sun8i-codec: Add a comment on the LRCK inversion The current code might be a bit intriguing without having experienced the issue before, and might come up as a mistake. Make explicit what's going on by adding a comment. Signed-off-by: Maxime Ripard Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 316b7758c998fb13371d14bb6c9e45ab129c19a7 Author: Maxime Ripard Date: Thu Nov 9 10:39:24 2017 +0100 ASoC: sun8i-codec: Set the BCLK divider While the current code was reporting to be able to work in master mode, it failed to do so because the BCLK divider wasn't programmed, meaning that the BCLK would run at the PLL's frequency no matter the sample rate. It was obviously a bit too fast. Add support to retrieve the divider to use, and set it. Since our PLL is not always able to generate a perfect multiple of the sample rate, we'll have to choose the closest divider that matches our setup. Fixes: 36c684936fae ("ASoC: Add sun8i digital audio codec") Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Signed-off-by: Mark Brown Cc: sound/soc/sunxi/sun8i-codec.c | 51 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit ba68fa318442d25586d057c1e8c9165bdc62c1b3 Author: Oder Chiou Date: Thu Nov 9 19:28:10 2017 +0800 ASoC: rt5663: Delay and retry reading rt5663 ID register In the probe, the codec may not be ready for I2C reading or there are some glitches on the i2c line. So if the i2c reading value is incorrect, it will read again after delay. This issue is similar the patch https://patchwork.kernel.org/patch/9681421/. In current project, these 2 devices were connected to the same i2c line, and they met the same problem. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5663.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 666740fde412567aa0a8ea251ffee3004a6fa3a6 Author: Matt Redfearn Date: Thu Nov 9 11:02:45 2017 +0000 irqchip: mips-gic: Print warning if inherited GIC base is used If the physical address of the GIC resource cannot be read from device tree, then the code falls back to reading it from the gcr_gic_base register. Hopefully this has been set to a sane value by the bootloader or some platform code, but is defined by the hardware manual to have "undefined" reset state. Using it as the address at which the GIC will be mapped into physical memory space can therefore be risky if it has not been initialised, since it may result in the GIC being mapped to an effectively random address anywhere in physical memory, where it might conflict with peripherals or RAM and lead to weird crashes. Since a "sane value" is very platform specific because it is particular to the platform's memory map, it is difficult to test for. At the very least, a warning message should be printed in the case that we trust the inherited value. Reported-by: Amit Kama Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Signed-off-by: Marc Zyngier drivers/irqchip/irq-mips-gic.c | 2 ++ 1 file changed, 2 insertions(+) commit 1f19aee0ec404112cec08f0c852fcd291690fbc7 Author: Matt Redfearn Date: Thu Nov 9 11:02:44 2017 +0000 irqchip/mips-gic: Add pr_fmt and reword pr_* messages Several messages from the MIPS GIC driver include the text "GIC", but the format is not standard. Add a pr_fmt of "irq-mips-gic: " and reword the messages now that they will be prefixed with the driver name. Signed-off-by: Matt Redfearn Reviewed-by: Paul Burton Signed-off-by: Marc Zyngier drivers/irqchip/irq-mips-gic.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit b3fe565bf47de3f79bb5dff9bee1112b46ba5434 Merge: 1c10bbe 3653bc9 Author: Thomas Gleixner Date: Thu Nov 9 11:42:52 2017 +0100 Merge tag 'timers-conversion-next5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into timers/core Pull the 5th batch of timer conversions from Kees Cook - qla2xxx patches have passed testing - ipvs patches have been Acked - prepare for more tree-wide DEFINE_TIMER() changes commit 339cd0ea082287ea8e2b7e7159a5a33665a2cbe3 Author: Neil Armstrong Date: Fri Nov 3 16:43:24 2017 +0100 soc: amlogic: meson-gx-pwrc-vpu: fix power-off when powered by bootloader In the case the VPU power domain has been powered on by the bootloader and no driver are attached to this power domain, the genpd will power it off after a certain amount of time, but the clocks hasn't been enabled by the kernel itself and the power-off will trigger some faults. This patch enable the clocks to have a coherent state for an eventual poweroff and switches to the pm_domain_always_on_gov governor. Fixes: 75fcb5ca4b46 ("soc: amlogic: add Meson GX VPU Domains driver") Signed-off-by: Neil Armstrong Tested-by: Kevin Hilman Signed-off-by: Arnd Bergmann drivers/soc/amlogic/meson-gx-pwrc-vpu.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) commit 95e6d4177cb7a2d7a760180e13f32adaf4188833 Author: Miklos Szeredi Date: Thu Nov 9 10:23:29 2017 +0100 ovl: grab reference to workbasedir early and related cleanups. Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit f7e3a7d947f83684f6622b592136da54bed922e6 Author: Miklos Szeredi Date: Thu Nov 9 10:23:28 2017 +0100 ovl: split out ovl_get_indexdir() from ovl_fill_super() It's okay to get rid of the intermediate error label due to ufs being zeroed on allocation. Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 69 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 29 deletions(-) commit c0d91fb9101100b8c13779b95f70b2ef75b54526 Author: Miklos Szeredi Date: Thu Nov 9 10:23:28 2017 +0100 ovl: split out ovl_get_lower_layers() from ovl_fill_super() Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 90 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 52 insertions(+), 38 deletions(-) commit 8ed61dc37ee0a33c7581d38d16977a5d1897de9f Author: Miklos Szeredi Date: Thu Nov 9 10:23:28 2017 +0100 ovl: split out ovl_get_workdir() from ovl_fill_super() Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 111 ++++++++++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 51 deletions(-) commit 21a3b317a60197b19c8f67e8016b633942e36bbf Author: Miklos Szeredi Date: Thu Nov 9 10:23:28 2017 +0100 ovl: split out ovl_get_upper() from ovl_fill_super() And don't clobber ufs->upper_mnt on error. Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit 53dbb0b4787ef57834f74bdccfba4c63eb12da69 Author: Miklos Szeredi Date: Thu Nov 9 10:23:28 2017 +0100 ovl: split out ovl_get_lowerstack() from ovl_fill_super() Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 122 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 72 insertions(+), 50 deletions(-) commit 87ad447a9d4f807b5542e6d92c6d740103b82bda Author: Miklos Szeredi Date: Thu Nov 9 10:23:28 2017 +0100 ovl: split out ovl_get_workpath() from ovl_fill_super() It's okay to get rid of the intermediate error label due to ufs being zeroed on allocation. Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 61 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 24 deletions(-) commit 6ee8acf0f72b89b3c6d9df9cbe9b815711af3c7b Author: Miklos Szeredi Date: Thu Nov 9 10:23:28 2017 +0100 ovl: split out ovl_get_upperpath() from ovl_fill_super() It's okay to get rid of the intermediate error label due to ufs being zeroed on allocation. Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 59 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 24 deletions(-) commit 8aafcb593d25e81c13be49310550e80d8788b995 Author: Miklos Szeredi Date: Thu Nov 9 10:23:28 2017 +0100 ovl: use path_put_init() in error paths for ovl_fill_super() This allows simplifying the error cleanup later. Signed-off-by: Miklos Szeredi fs/overlayfs/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f121aadede37bcbb77ea552d195a09c734486fe7 Author: Miklos Szeredi Date: Thu Nov 9 10:23:28 2017 +0100 vfs: add path_put_init() This one initializes the struct path to all zeroes so that multiple path_put_init() on the path is safe. Signed-off-by: Miklos Szeredi include/linux/path.h | 6 ++++++ 1 file changed, 6 insertions(+) commit f30536f0f955d9d3eb5a7e32033af4e3649de173 Author: Amir Goldstein Date: Wed Nov 1 17:33:13 2017 +0200 ovl: update cache version of impure parent on rename ovl_rename() updates dir cache version for impure old parent if an entry with copy up origin is moved into old parent, but it did not update cache version if the entry moved out of old parent has a copy up origin. [SzM] Same for new dir: we updated the version if an entry with origin was moved in, but not if an entry with origin was moved out. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a0c5ad307ac09fa1c73b57bfd94f4c3fd6ba92d8 Author: Amir Goldstein Date: Wed Nov 1 00:45:40 2017 +0200 ovl: relax same fs constraint for constant st_ino For the case of all layers not on the same fs, return the copy up origin inode st_dev/st_ino for non-dir from stat(2). This guaranties constant st_dev/st_ino for non-dir across copy up. Like the same fs case, st_ino of non-dir is also persistent. If the st_dev/st_ino for copied up object would have been the same as that of the real underlying lower file, running diff on underlying lower file and overlay copied up file would result in diff reporting that the two files are equal when in fact, they may have different content. Therefore, unlike the same fs case, st_dev is not persistent because it uses the unique anonymous bdev allocated for the lower layer. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) commit ba1e563cdc6b07f2d5d9eee854fb3cdf3596470f Author: Chandan Rajendra Date: Mon Jul 24 01:57:54 2017 -0500 ovl: return anonymous st_dev for lower inodes For non-samefs setup, to make sure that st_dev/st_ino pair is unique across the system, we return a unique anonymous st_dev for stat(2) of lower layer inode. A following patch is going to fix constant st_dev/st_ino across copy up by returning origin st_dev/st_ino for copied up objects. If the st_dev/st_ino for copied up object would have been the same as that of the real underlying lower file, running diff on underlying lower file and overlay copied up file would result in diff reporting that the 2 files are equal when in fact, they may have different content. [amir: simplify ovl_get_pseudo_dev() split from allocate anonymous bdev patch] Signed-off-by: Chandan Rajendra Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 2a9c6d066e98c1fe51a735b1439929f2f2afd891 Author: Chandan Rajendra Date: Wed Nov 1 20:12:49 2017 +0200 ovl: allocate anonymous devs for lowerdirs Generate unique values of st_dev per lower layer for non-samefs overlay mount. The unique values are obtained by allocating anonymous bdevs for each of the lowerdirs in the overlayfs instance. The anonymous bdev is going to be returned by stat(2) for lowerdir non-dir entries in non-samefs case. [amir: split from ovl_getattr() and re-structure patches] Signed-off-by: Chandan Rajendra Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/ovl_entry.h | 1 + fs/overlayfs/super.c | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) commit b93436320c1e9089a055941523571cd7c037f7cb Author: Chandan Rajendra Date: Mon Jul 24 01:57:54 2017 -0500 ovl: re-structure overlay lower layers in-memory Define new structures to represent overlay instance lower layers and overlay merge dir lower layers to make room for storing more per layer information in-memory. Instead of keeping the fs instance lower layers in an array of struct vfsmount, keep them in an array of new struct ovl_layer, that has a pointer to struct vfsmount. Instead of keeping the dentry lower layers in an array of struct path, keep them in an array of new struct ovl_path, that has a pointer to struct dentry and to struct ovl_layer. Add a small helper to find the fs layer id that correspopnds to a lower struct ovl_path and use it in ovl_lookup(). [amir: split re-structure from anonymous bdev patch] Signed-off-by: Chandan Rajendra Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/namei.c | 52 ++++++++++++++++++++++++---------------- fs/overlayfs/overlayfs.h | 4 ++-- fs/overlayfs/ovl_entry.h | 13 ++++++++-- fs/overlayfs/readdir.c | 4 ++-- fs/overlayfs/super.c | 62 ++++++++++++++++++++++++++---------------------- fs/overlayfs/util.c | 7 +++++- 6 files changed, 86 insertions(+), 56 deletions(-) commit ee023c30d7d6bc21d3a85f3625a30209bdcc41e6 Author: Amir Goldstein Date: Mon Oct 30 13:33:11 2017 +0200 ovl: move include of ovl_entry.h into overlayfs.h Most overlayfs c files already explicitly include ovl_entry.h to use overlay entry struct definitions and upcoming changes are going to require even more c files to include this header. All overlayfs c files include overlayfs.h and overlayfs.h itself refers to some structs defined in ovl_entry.h, so it seems more logic to include ovl_entry.h from overlayfs.h than from c files. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 1 - fs/overlayfs/inode.c | 1 - fs/overlayfs/namei.c | 1 - fs/overlayfs/overlayfs.h | 1 + fs/overlayfs/super.c | 1 - fs/overlayfs/util.c | 1 - 6 files changed, 1 insertion(+), 5 deletions(-) commit 07f6fff148364ad7c0174d6536a124a0679177a2 Author: zhangyi (F) Date: Tue Jul 4 13:02:27 2017 +0300 ovl: fix rmdir problem on non-merge dir with origin xattr An "origin && non-merge" upper dir may have leftover whiteouts that were created in past mount. overlayfs does no clear this dir when we delete it, which may lead to rmdir fail or temp file left in workdir. Simple reproducer: mkdir lower upper work merge mkdir -p lower/dir touch lower/dir/a mount -t overlay overlay -olowerdir=lower,upperdir=upper,\ workdir=work merge rm merge/dir/a umount merge rm -rf lower/* touch lower/dir (*) mount -t overlay overlay -olowerdir=lower,upperdir=upper,\ workdir=work merge rm -rf merge/dir Syslog dump: overlayfs: cleanup of 'work/#7' failed (-39) (*): if we do not create the regular file, the result is different: rm: cannot remove "dir/": Directory not empty This patch adds a check for the case of non-merge dir that may contain whiteouts, and calls ovl_check_empty_dir() to check and clear whiteouts from upper dir when an empty dir is being deleted. [amir: split patch from ovl_check_empty_dir() cleanup rename ovl_is_origin() to ovl_may_have_whiteouts() check OVL_WHITEOUTS flag instead of checking origin xattr] Signed-off-by: zhangyi (F) Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 95e598e7ace2d89717cc3370c2126570667e2007 Author: zhangyi (F) Date: Tue Oct 31 22:57:00 2017 +0200 ovl: simplify ovl_check_empty_and_clear() Filter out non-whiteout non-upper entries from list of merge dir entries while checking if merge dir is empty in ovl_check_empty_dir(). The remaining work for ovl_clear_empty() is to clear all entries on the list. [amir: split patch from rmdir bug fix] Signed-off-by: zhangyi (F) Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 5 ++--- fs/overlayfs/readdir.c | 27 ++++++++++++++++++++------- 2 files changed, 22 insertions(+), 10 deletions(-) commit b79e05aaa166755fafbf02db275175edb5175df8 Author: Amir Goldstein Date: Sun Jun 25 16:37:17 2017 +0300 ovl: no direct iteration for dir with origin xattr If a non-merge dir in an overlay mount has an overlay.origin xattr, it means it was once an upper merge dir, which may contain whiteouts and then the lower dir was removed under it. Do not iterate real dir directly in this case to avoid exposing whiteouts. [SzM] Set OVL_WHITEOUT for all merge directories as well. [amir] A directory that was just copied up does not have the OVL_WHITEOUTS flag. We need to set it to fix merge dir iteration. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/copy_up.c | 7 ++++++- fs/overlayfs/inode.c | 10 ++++++++++ fs/overlayfs/overlayfs.h | 4 ++++ fs/overlayfs/readdir.c | 24 ++++++++++++++++++++---- fs/overlayfs/super.c | 2 ++ fs/overlayfs/util.c | 13 +++++++++++++ 6 files changed, 55 insertions(+), 5 deletions(-) commit 4eae06de482bf370144704e31f65cd6dfbcebe94 Author: Amir Goldstein Date: Fri Oct 27 15:44:08 2017 +0300 ovl: lockdep annotate of nested OVL_I(inode)->lock This fixes a lockdep splat when mounting a nested overlayfs. Fixes: a015dafcaf5b ("ovl: use ovl_inode mutex to synchronize...") Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi fs/overlayfs/inode.c | 4 ++++ 1 file changed, 4 insertions(+) commit b2596d70351370530d3fce16f3b6e6f1cd4dbdf0 Author: Fabio Estevam Date: Wed Sep 20 12:51:51 2017 -0300 dt-bindings: mfd: mc13xxx: Remove obsolete property The 'fsl,spi-num-chipselects' property is obsolete according to Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt, so remove it from the example. Signed-off-by: Fabio Estevam Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/mc13xxx.txt | 1 - 1 file changed, 1 deletion(-) commit 4dd6f17eb913d3d23dd6c07950627ac2c3068dca Author: Michael Mueller Date: Thu Jul 6 14:22:20 2017 +0200 KVM: s390: clear_io_irq() requests are not expected for adapter interrupts There is a chance to delete not yet delivered I/O interrupts if an exploiter uses the subsystem identification word 0x0000 while processing a KVM_DEV_FLIC_CLEAR_IO_IRQ ioctl. -EINVAL will be returned now instead in that case. Classic interrupts will always have bit 0x10000 set in the schid while adapter interrupts have a zero schid. The clear_io_irq interface is only useful for classic interrupts (as adapter interrupts belong to many devices). Let's make this interface more strict and forbid a schid of 0. Signed-off-by: Michael Mueller Reviewed-by: Halil Pasic Reviewed-by: Christian Borntraeger Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger Documentation/virtual/kvm/devices/s390_flic.txt | 3 +++ arch/s390/kvm/interrupt.c | 2 ++ 2 files changed, 5 insertions(+) commit ee739f4b216e9394281cf99e6d93c67bdf4a37d2 Author: Michael Mueller Date: Mon Jul 3 15:32:50 2017 +0200 KVM: s390: abstract conversion between isc and enum irq_types The abstraction of the conversion between an isc value and an irq_type by means of functions isc_to_irq_type() and irq_type_to_isc() allows to clarify the respective operations where used. Signed-off-by: Michael Mueller Reviewed-by: Halil Pasic Reviewed-by: Pierre Morel Reviewed-by: Christian Borntraeger Reviewed-by: Cornelia Huck Reviewed-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/interrupt.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit f7a6509fe002e3909cb41c09e807b7f3ca4a361b Author: David Hildenbrand Date: Fri Sep 1 17:11:43 2017 +0200 KVM: s390: vsie: use common code functions for pinning We will not see -ENOMEM (gfn_to_hva() will return KVM_ERR_PTR_BAD_PAGE for all errors). So we can also get rid of special handling in the callers of pin_guest_page() and always assume that it is a g2 error. As also kvm_s390_inject_program_int() should never fail, we can simplify pin_scb(), too. Signed-off-by: David Hildenbrand Message-Id: <20170901151143.22714-1-david@redhat.com> Acked-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/kvm/vsie.c | 50 +++++++++++++++++------------------------------- include/linux/kvm_host.h | 1 + virt/kvm/kvm_main.c | 4 ++-- 3 files changed, 21 insertions(+), 34 deletions(-) commit ba850a8e64fbbd5f6407d5931124d00ced0528cc Author: Tony Krowiak Date: Fri Oct 13 13:38:46 2017 -0400 KVM: s390: SIE considerations for AP Queue virtualization The Crypto Control Block (CRYCB) is referenced by the SIE state description and controls KVM guest access to the Adjunct Processor (AP) adapters, usage domains and control domains. This patch defines the AP control blocks to be used for controlling guest access to the AP adapters and domains. Signed-off-by: Tony Krowiak Message-Id: <1507916344-3896-2-git-send-email-akrowiak@linux.vnet.ibm.com> Acked-by: Cornelia Huck Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit bee67c7c9d7d3252dce69c960a53e53fd6b04e09 Merge: 756a024 9e9355b Author: Linus Walleij Date: Thu Nov 9 09:38:42 2017 +0100 Merge branch 'gpio-irqchip-rework' of /home/linus/linux-gpio into devel commit 9e9355bb2096c3a9e8baa2ff2e09ac43eeeadc72 Author: Linus Walleij Date: Thu Nov 9 09:36:07 2017 +0100 pinctrl: bcm2835: Fix some merge fallout Fixing a small merge problem in BCM2835 related to the new irqchip code. Cc: Thierry Reding Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 72e1ad4200d5ed5c5adf120b77fb2900a29a48e5 Author: Christian Borntraeger Date: Tue Sep 19 12:34:06 2017 +0200 KVM: s390: document memory ordering for kvm_s390_vcpu_wakeup swait_active does not enforce any ordering and it can therefore trigger some subtle races when the CPU moves the read for the check before a previous store and that store is then used on another CPU that is preparing the swait. On s390 there is a call to swait_active in kvm_s390_vcpu_wakeup. The good thing is, on s390 all potential races cannot happen because all callers of kvm_s390_vcpu_wakeup do not store (no race) or use an atomic operation, which handles memory ordering. Since this is not guaranteed by the Linux semantics (but by the implementation on s390) let's add smp_mb_after_atomic to make this obvious and document the ordering. Suggested-by: Paolo Bonzini Acked-by: Halil Pasic Reviewed-by: Cornelia Huck Reviewed-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/kvm/interrupt.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 765cc3a4b224e22bf524fabe40284a524f37cdd0 Author: Patrick Bellasi Date: Wed Nov 8 18:41:01 2017 +0000 sched/core: Optimize sched_feat() for !CONFIG_SCHED_DEBUG builds When the kernel is compiled with !CONFIG_SCHED_DEBUG support, we expect that all SCHED_FEAT are turned into compile time constants being propagated to support compiler optimizations. Specifically, we expect that code blocks like this: if (sched_feat(FEATURE_NAME) [&& ]) { /* FEATURE CODE */ } are turned into dead-code in case FEATURE_NAME defaults to FALSE, and thus being removed by the compiler from the finale image. For this mechanism to properly work it's required for the compiler to have full access, from each translation unit, to whatever is the value defined by the sched_feat macro. This macro is defined as: #define sched_feat(x) (sysctl_sched_features & (1UL << __SCHED_FEAT_##x)) and thus, the compiler can optimize that code only if the value of sysctl_sched_features is visible within each translation unit. Since: 029632fbb ("sched: Make separate sched*.c translation units") the scheduler code has been split into separate translation units however the definition of sysctl_sched_features is part of kernel/sched/core.c while, for all the other scheduler modules, it is visible only via kernel/sched/sched.h as an: extern const_debug unsigned int sysctl_sched_features Unfortunately, an extern reference does not allow the compiler to apply constants propagation. Thus, on !CONFIG_SCHED_DEBUG kernel we still end up with code to load a memory reference and (eventually) doing an unconditional jump of a chunk of code. This mechanism is unavoidable when sched_features can be turned on and off at run-time. However, this is not the case for "production" kernels compiled with !CONFIG_SCHED_DEBUG. In this case, sysctl_sched_features is just a constant value which cannot be changed at run-time and thus memory loads and jumps can be avoided altogether. This patch fixes the case of !CONFIG_SCHED_DEBUG kernel by declaring a local version of the sysctl_sched_features constant for each translation unit. This will ultimately allow the compiler to perform constants propagation and dead-code pruning. Tests have been done, with !CONFIG_SCHED_DEBUG on a v4.14-rc8 with and without the patch, by running 30 iterations of: perf bench sched messaging --pipe --thread --group 4 --loop 50000 on a 40 cores Intel(R) Xeon(R) CPU E5-2690 v2 @ 3.00GHz using the powersave governor to rule out variations due to frequency scaling. Statistics on the reported completion time: count mean std min 99% max v4.14-rc8 30.0 15.7831 0.176032 15.442 16.01226 16.014 v4.14-rc8+patch 30.0 15.5033 0.189681 15.232 15.93938 15.962 ... show a 1.8% speedup on average completion time and 0.5% speedup in the 99 percentile. Signed-off-by: Patrick Bellasi Signed-off-by: Chris Redpath Reviewed-by: Dietmar Eggemann Reviewed-by: Brendan Jackman Acked-by: Peter Zijlstra Cc: Juri Lelli Cc: Linus Torvalds Cc: Morten Rasmussen Cc: Thomas Gleixner Cc: Vincent Guittot Link: http://lkml.kernel.org/r/20171108184101.16006-1-patrick.bellasi@arm.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 9 ++++++--- kernel/sched/sched.h | 25 ++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) commit 7980f029d05d8a3b4634aa6952e1ec51bce9431f Author: Changbin Du Date: Thu Nov 9 14:09:11 2017 +0800 x86/build: Make the boot image generation less verbose This change suppresses the 'dd' output and adds the '-quiet' parameter to mkisofs tool. It also removes the 'Using ...' messages, as none of the messages matter to the user normally. "make V=1" can still be used for a more verbose build. The new build messages are now a streamlined set of: $ make isoimage ... Kernel: arch/x86/boot/bzImage is ready (#75) GENIMAGE arch/x86/boot/image.iso Kernel: arch/x86/boot/image.iso is ready Signed-off-by: Changbin Du Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1510207751-22166-1-git-send-email-changbin.du@intel.com Signed-off-by: Ingo Molnar arch/x86/boot/genimage.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 77fad8bfb1d2f8225b05e4ea34457875fcfae37e Author: Gustavo Romero Date: Wed Nov 1 15:23:41 2017 -0400 selftests/powerpc: Check FP/VEC on exception in TM Add a self test to check if FP/VEC/VSX registers are sane (restored correctly) after a FP/VEC/VSX unavailable exception is caught during a transaction. This test checks all possibilities in a thread regarding the combination of MSR.[FP|VEC] states in a thread and for each scenario raises a FP/VEC/VSX unavailable exception in transactional state, verifying if vs0 and vs32 registers, which are representatives of FP/VEC/VSX reg sets, are not corrupted. Signed-off-by: Gustavo Romero Signed-off-by: Breno Leitao Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/tm/.gitignore | 1 + tools/testing/selftests/powerpc/tm/Makefile | 3 +- .../testing/selftests/powerpc/tm/tm-unavailable.c | 371 +++++++++++++++++++++ tools/testing/selftests/powerpc/tm/tm.h | 5 + 4 files changed, 379 insertions(+), 1 deletion(-) commit 432953b4455d8a48af0500a77826c71871671161 Author: Paul Mackerras Date: Thu Nov 9 15:37:10 2017 +1100 KVM: PPC: Book3S HV: Cosmetic post-merge cleanups This rearranges the code in kvmppc_run_vcpu() and kvmppc_run_vcpu_hv() to be neater and clearer. Deeply indented code in kvmppc_run_vcpu() is moved out to a helper function, kvmhv_setup_mmu(). In kvmppc_vcpu_run_hv(), make use of the existing variable 'kvm' in place of 'vcpu->kvm'. No functional change. Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) commit f938daeee95eb36ef6b431bf054a5cc6cdada112 Author: Gal Pressman Date: Wed Aug 30 15:12:45 2017 +0300 net/mlx5e: CHECKSUM_COMPLETE offload for VLAN/QinQ packets When the VLAN tag is present in the packet buffer (i.e VLAN stripping disabled, QinQ) the driver will currently report CHECKSUM_UNNECESSARY. Instead of using CHECKSUM_COMPLETE offload for packets with first ethertype of IPv4/6, use it for packets with last ethertype of IPv4/6 to cover the former cases as well. The checksum field present in the CQE is calculated from the IP header until the end of the packet. When the first ethertype is different than IPv4/6 (for ex. 802.1Q VLAN) a checksum of the VLAN header/s should be added. The small header/s checksum calculation will allow us to use CHECKSUM_COMPLETE instead of CHECKSUM_UNNECESSARY. Testing bandwidth of one and 8 TCP streams to a single RQ, LRO and VLAN stripping offloads disabled: CPU: Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz NIC: Mellanox Technologies MT27710 Family [ConnectX-4 Lx] Before: +--------------+--------------------+---------------------+----------------------+ | Traffic type | 1 Stream BW [Mbps] | 8 Streams BW [Mbps] | Checksum offload | +--------------+--------------------+---------------------+----------------------+ | Untagged | 28,247.35 | 24,716.88 | CHECKSUM_COMPLETE | | VLAN | 27,516.69 | 23,752.26 | CHECKSUM_UNNECESSARY | | QinQ | 6,961.30 | 20,667.04 | CHECKSUM_UNNECESSARY | +--------------+--------------------+---------------------+----------------------+ Now: +--------------+--------------------+---------------------+-------------------+ | Traffic type | 1 Stream BW [Mbps] | 8 Streams BW [Mbps] | Checksum offload | +--------------+--------------------+---------------------+-------------------+ | Untagged | 28,521.28 | 24,926.32 | CHECKSUM_COMPLETE | | VLAN | 27,389.37 | 23,715.34 | CHECKSUM_COMPLETE | | QinQ | 6,901.77 | 20,845.73 | CHECKSUM_COMPLETE | +--------------+--------------------+---------------------+-------------------+ No performance degradation observed. Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit f24686e878914c260331b1067898a3925b598c6e Author: Gal Pressman Date: Sun Sep 10 13:49:59 2017 +0300 net/mlx5e: Add VLAN offloads statistics The following counters are now exposed through ethtool -S: rx[i]_removed_vlan_packets (per channel) rx_removed_vlan_packets tx[i]_added_vlan_packets (per channel) tx_added_vlan_packets rx_removed_vlan_packets: The number of packets that had their outer VLAN header stripped to the CQE by the hardware. tx_added_vlan_packets: The number of packets that had their outer VLAN header inserted by the hardware. Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 +++- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 4 ++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 4 ++++ drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 2 ++ 5 files changed, 15 insertions(+), 1 deletion(-) commit 4382c7b92a1db397874ca62c73aa8b023af6dba8 Author: Gal Pressman Date: Sun Sep 10 13:22:51 2017 +0300 net/mlx5e: Add 802.1ad VLAN insertion support Report VLAN insertion support for S-tagged packets and add support by choosing the correct VLAN type in the WQE. Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 2 ++ include/linux/mlx5/qp.h | 1 + 3 files changed, 4 insertions(+) commit 7d92d580334a18800aaf66aaf2e103271c48bafb Author: Gal Pressman Date: Sun Sep 10 10:36:43 2017 +0300 net/mlx5e: Add 802.1ad VLAN filter steering rules When a user chooses to use 802.1ad VLAN the proper steering rules will be added to the VLAN flow table (matching the specific S-tag VID). Due to current hardware limitation, when using 802.1ad, we must disable C-tag VLAN stripping on the RQs. Signed-off-by: Gal Pressman Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 + drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 102 +++++++++++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 21 +++++ 3 files changed, 112 insertions(+), 13 deletions(-) commit 03eda9541f351fb289fe18c87cb111f8bfca9837 Author: Gal Pressman Date: Mon Sep 18 13:09:18 2017 +0300 net/mlx5e: Declare bitmap using kernel macro Replace explicit declaration of bitmap with DECLARE_BITMAP kernel macro. Signed-off-by: Gal Pressman Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 375ef2b1f0d0b43b0d36ffdd521637ff59b0c13c Author: Gal Pressman Date: Sun Sep 17 13:43:58 2017 +0300 net: Introduce netdev_*_once functions Extend the net device error logging with netdev_*_once macros. netdev_*_once are the equivalents of the dev_*_once macros which are useful for messages that should only be logged once. Also add netdev_WARN_ONCE, which is the "once" extension for the already existing netdev_WARN macro. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed include/linux/netdevice.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 355368d530460aa19b9d4291e2da2c6fd8929c76 Author: Gal Pressman Date: Thu Sep 14 16:24:19 2017 +0300 net/mlx5e: Add rollback on add VLAN failure When add VLAN rule fails the active vlan bit should be cleared. Fixes: afb736e9330a ("net/mlx5: Ethernet resource handling files") Signed-off-by: Gal Pressman Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2b52a283907b7f6d439444bfdde7f2241ddde735 Author: Gal Pressman Date: Sun Sep 10 17:51:10 2017 +0300 net/mlx5e: Rename VLAN related variables and functions Rename VLAN related symbols to better reflect the fact that they are associated to C-tag VLAN. Signed-off-by: Gal Pressman Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 10 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 56 +++++++++++------------ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 8 ++-- 3 files changed, 37 insertions(+), 37 deletions(-) commit 072df8130c6b602c8ee219f7b06394680cafad2f Merge: c010150 38c53af Author: Paul Mackerras Date: Thu Nov 9 14:30:24 2017 +1100 Merge branch 'kvm-ppc-fixes' into kvm-ppc-next This merges in a couple of fixes from the kvm-ppc-fixes branch that modify the same areas of code as some commits from the kvm-ppc-next branch, in order to resolve the conflicts. Signed-off-by: Paul Mackerras commit 232530680290ba94ca37852ab10d9556ea28badf Author: Theodore Ts'o Date: Wed Nov 8 22:23:20 2017 -0500 ext4: improve smp scalability for inode generation ->s_next_generation is protected by s_next_gen_lock but its usage pattern is very primitive. We don't actually need sequentially increasing new generation numbers, so let's use prandom_u32() instead. Reported-by: Dmitry Monakhov Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 2 -- fs/ext4/ialloc.c | 4 +--- fs/ext4/ioctl.c | 8 +++----- fs/ext4/super.c | 2 -- 4 files changed, 4 insertions(+), 12 deletions(-) commit 4479ed411cf41b42b1c548f73099287fff2330ff Merge: 26c860d f368d3b Author: Dave Airlie Date: Thu Nov 9 12:01:08 2017 +1000 Merge branch 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux into drm-next A bunch of smatch fixes for the dc code. * 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux: amd/display: Fix potential null dereference in dce_calcs.c amdgpu/dm: Remove unused forward declaration drm/amdgpu: Remove unused dc_stream from amdgpu_crtc amdgpu/dc: Fix double unlock in amdgpu_dm_commit_planes amdgpu/dc: Fix missing null checks in amdgpu_dm.c amdgpu/dc: Fix potential null dereferences in amdgpu_dm.c amdgpu/dc: fix more indentation warnings amdgpu/dc: handle allocation failures in dc_commit_planes_to_stream. amdgpu/dc: fix indentation warning from smatch. amdgpu/dc: fix non-ansi function decls. drm/amd/display: remove some unneeded code drm/amd/display: checking for NULL instead of IS_ERR() drm/amd/display: small cleanup in destruct() commit a9386bb051931778436db3dd6e3a163f7db92b56 Merge: 0867117 a111fbc Author: Dave Airlie Date: Thu Nov 9 11:59:30 2017 +1000 Merge tag 'drm-misc-next-fixes-2017-11-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 4.15 merge window fixes, round 2: randconfig fix from Arnd, plus the vblank WARN_ON fix from Ville. * tag 'drm-misc-next-fixes-2017-11-08' of git://anongit.freedesktop.org/drm/drm-misc: drm/vblank: Tune drm_crtc_accurate_vblank_count() WARN down to a debug drm/rockchip: add CONFIG_OF dependency for lvds commit 086711708b5a0b1662fb86a10dbf2ae9b3c18d0a Merge: d65d313 cdd9a8b Author: Dave Airlie Date: Thu Nov 9 11:14:47 2017 +1000 Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next A few more fixes for 4.15. * 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: use irq-safe lock for kiq->ring_lock drm/amdgpu: bypass lru touch for KIQ ring submission drm/amdgpu: Potential uninitialized variable in amdgpu_vm_update_directories() drm/amdgpu: potential uninitialized variable in amdgpu_vce_ring_parse_cs() drm/amd/powerplay: initialize a variable before using it drm/amd/powerplay: suppress KASAN out of bounds warning in vega10_populate_all_memory_levels drm/amd/amdgpu: fix evicted VRAM bo adjudgement condition commit 19aeeb9f46cb4b9474ebeb50cb01b9a1adba73b8 Merge: b2d0f5d b4fbb34 Author: David S. Miller Date: Thu Nov 9 09:26:50 2017 +0900 Merge branch 'dsa-setup-stage' Vivien Didelot says: ==================== net: dsa: setup stage When probing a DSA switch, there is basically two stages. The first stage is the parsing of the switch device, from either device tree or platform data. It fetches the DSA tree to which it belongs, and validates its ports. The switch device is then added to the tree, and the second stage is called if this was the last switch of the tree. The second stage is the setup of the tree, which validates that the tree is complete, sets up the routing tables, the default CPU port for user ports, sets up the switch drivers and finally the master interfaces, which makes the whole switch fabric functional. This patch series covers the second setup stage. The setup and teardown of a switch tree have been separated into logical steps, and the probing of a switch now simply parses and adds a switch to a tree. ==================== Signed-off-by: David S. Miller commit b4fbb347fe4cd7988d0f9453a7e3ab0cd1b4a75a Author: Vivien Didelot Date: Mon Nov 6 16:11:53 2017 -0500 net: dsa: rename probe and remove switch functions This commit brings no functional changes. It gets rid of the underscore prefixed _dsa_register_switch and _dsa_unregister_switch functions in favor of dsa_switch_probe() which parses and adds a switch to a tree and dsa_switch_remove() which removes a switch from a tree. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 308173546ac4342103541e8d4e4ce83d1a5e7eba Author: Vivien Didelot Date: Mon Nov 6 16:11:52 2017 -0500 net: dsa: setup a tree when adding a switch to it Now that the tree setup is centralized, we can simplify the code a bit more by setting up or tearing down the tree directly when adding or removing a switch to/from it. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) commit 34c09a8916fb52aac948dfc861b33c0b3b37ac29 Author: Vivien Didelot Date: Mon Nov 6 16:11:51 2017 -0500 net: dsa: setup routing table The *_complete() functions take too much arguments to do only one thing: they try to fetch the dsa_port structures corresponding to device nodes under the "link" list property of DSA ports, and use them to setup the routing table of switches. This patch simplifies them by providing instead simpler dsa_{port,switch,tree}_setup_routing_table functions which return a boolean value, true if the tree is complete. dsa_tree_setup_routing_table is called inside dsa_tree_setup which simplifies the switch registering function as well. A switch's routing table is now initialized before its setup. This also makes dsa_port_is_valid obsolete, remove it. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 108 ++++++++++++++++++++------------------------------------- 1 file changed, 37 insertions(+), 71 deletions(-) commit c52866655558e5fc87ceae8aac528a7e410c8a77 Author: Vivien Didelot Date: Mon Nov 6 16:11:50 2017 -0500 net: dsa: use of_for_each_phandle The OF code provides a of_for_each_phandle() helper to iterate over phandles. Use it instead of arbitrary iterating ourselves over the list of phandles hanging to the "link" property of the port's device node. The of_phandle_iterator_next() helper calls of_node_put() itself on it.node. Thus We must only do it ourselves if we break the loop. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit f163da8853aa9d8060157a96ed314299b87ba070 Author: Vivien Didelot Date: Mon Nov 6 16:11:49 2017 -0500 net: dsa: add find port by node helper Instead of having two dsa_ds_find_port_dn (which returns a bool) and dsa_dst_find_port_dn (which returns a switch) functions, provide a more explicit dsa_tree_find_port_by_node function which returns a matching port. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) commit 1d27732f411d57f0168af30be2adb504b8b7749d Author: Vivien Didelot Date: Mon Nov 6 16:11:48 2017 -0500 net: dsa: setup and teardown ports The dsa_dsa_port_apply and dsa_cpu_port_apply functions do exactly the same. The dsa_user_port_apply function does not try to register a fixed link but try to create a slave. This commit factorizes and scopes all that in two convenient dsa_port_setup and dsa_port_teardown functions. It won't hurt to register a devlink_port for unused port as well. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 173 ++++++++++++++++++++------------------------------------- 1 file changed, 59 insertions(+), 114 deletions(-) commit 1f08f9e9cbc63d92c246f40ae4221cba86ef8ec6 Author: Vivien Didelot Date: Mon Nov 6 16:11:47 2017 -0500 net: dsa: setup and teardown switches This patches brings no functional changes. It removes the unused dst argument from the dsa_ds_apply and dsa_ds_unapply functions, rename them to dsa_switch_setup and dsa_switch_teardown for a more explicit scope. This clarifies the steps of the setup or teardown of a switch fabric. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 62 ++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 23 deletions(-) commit ec15dd4269d0cbf947c9a2dfdcf08a917098fab1 Author: Vivien Didelot Date: Mon Nov 6 16:11:46 2017 -0500 net: dsa: setup and teardown tree This commit provides better scope for the DSA tree setup and teardown functions. It renames the "applied" bool to "setup" and print a message when the tree is setup, as it is done during teardown. At the same time, check dst->setup in dsa_tree_setup, where it is set to true. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 2 +- net/dsa/dsa2.c | 32 ++++++++++++++++++-------------- 2 files changed, 19 insertions(+), 15 deletions(-) commit 17a22fcfc84a422d98a0f54e67d4ee8ee3875849 Author: Vivien Didelot Date: Mon Nov 6 16:11:45 2017 -0500 net: dsa: setup and teardown master device Add DSA helpers to setup and teardown a master net device wired to its CPU port. This centralizes the dsa_ptr assignment. This also makes the master ethtool helpers static at the same time. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 36 +++++++++++++++++++----------------- net/dsa/dsa_priv.h | 4 ++-- net/dsa/legacy.c | 20 ++------------------ net/dsa/master.c | 30 ++++++++++++++++++++++++++++-- 4 files changed, 51 insertions(+), 39 deletions(-) commit f070464cf000131928b2c3fd592efd1946610eea Author: Vivien Didelot Date: Mon Nov 6 16:11:44 2017 -0500 net: dsa: setup and teardown default CPU port The dsa_dst_parse function called just before dsa_dst_apply does not parse the tree but does only one thing: it assigns the default CPU port to dst->cpu_dp and to each user ports. This patch simplifies this by calling a dsa_tree_setup_default_cpu function at the beginning of dsa_dst_apply directly. A dsa_port_is_user helper is added for convenience. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 153 +++++++++++++++++++++++++-------------------------------- 1 file changed, 68 insertions(+), 85 deletions(-) commit 24a9332a58b7f41a0d36c35a2c6897242bffdbc0 Author: Vivien Didelot Date: Mon Nov 6 16:11:43 2017 -0500 net: dsa: constify cpu_dp member of dsa_port A DSA port has a dedicated CPU port assigned to it, stored in the cpu_dp member. It is not meant to be modified by a port, thus make it const. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 2 +- net/dsa/slave.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 573e2bf05421d0dc69dc3c604f286b3473d2f2cd Author: Arnd Bergmann Date: Wed Nov 8 13:08:10 2017 +0100 rtc: xgene: mark PM functions as __maybe_unused The new xgene_rtc_alarm_irq_enabled() function is only accessed from PM code, which is inside of an #ifdef; this causes a harmless build warning when CONFIG_PM is disabled: drivers/rtc/rtc-xgene.c:108:12: error: 'xgene_rtc_alarm_irq_enabled' defined but not used [-Werror=unused-function] Just remove the #ifdef and use __maybe_unused annotations instead, to make the code more robust here. Fixes: d0bcd82b1379 ("rtc: xgene: Fix suspend/resume") Signed-off-by: Arnd Bergmann Reviewed-by: Loc Ho Signed-off-by: Alexandre Belloni drivers/rtc/rtc-xgene.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d0bcd82b13794c4bc89876e9383000fc1cb069d2 Author: Loc Ho Date: Mon Apr 14 12:09:04 2014 -0600 rtc: xgene: Fix suspend/resume This patch fixes suspend/resume functions properly for the APM X-Gene SoC RTC driver. Signed-off-by: Loc Ho Reviewed-by: Mark Brown Signed-off-by: Alexandre Belloni drivers/rtc/rtc-xgene.c | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) commit 1856e0b2ace70a0231a94ec9d1286904c6ffa1ca Author: Alexandre Belloni Date: Wed Nov 8 05:27:45 2017 +0100 rtc: pcf8563: don't alway enable the alarm Allow setting the alarm and later enable it instead of enabling it unconditionally. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf8563.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3350f9c57ffad569c40f7320b89da1f3061c5bb Author: Philipp Zabel Date: Tue Nov 7 13:12:17 2017 +0100 rtc: pcf8563: fix output clock rate The pcf8563_clkout_recalc_rate function erroneously ignores the frequency index read from the CLKO register and always returns 32768 Hz. Fixes: a39a6405d5f9 ("rtc: pcf8563: add CLKOUT to common clock framework") Signed-off-by: Philipp Zabel Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf8563.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 804a6cfeb5c9e1caae86b345a5a8a50f77ddccc4 Author: Akshay Bhat Date: Wed Nov 8 14:58:14 2017 -0500 rtc: rx8010: Fix for incorrect return value The err variable is not being reset after a successful read. Explicitly return 0 at the end of function call to account for all return paths. Reported-by: Jens-Peter Oswald Signed-off-by: Akshay Bhat Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx8010.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1be9c3a0a03330c8e61db30d442b31522092c291 Author: Gustavo A. R. Silva Date: Thu Oct 12 13:49:18 2017 -0500 ACPI: Mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Rafael J. Wysocki drivers/acpi/ac.c | 1 + drivers/acpi/acpi_processor.c | 1 + drivers/acpi/dock.c | 1 + drivers/acpi/resource.c | 1 + 4 files changed, 4 insertions(+) commit 3653bc95bcc7daa938c0fdcd64ff199ed8f7f208 Author: Kees Cook Date: Mon Oct 9 21:52:09 2017 -0700 timer: Prepare to change all DEFINE_TIMER() callbacks Before we can globally change the function prototype of all timer callbacks, we have to change those set up by DEFINE_TIMER(). Prepare for this by casting the callbacks until the prototype changes globally. Cc: Thomas Gleixner Signed-off-by: Kees Cook include/linux/timer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8ef81c65485b94c59b8ae43ed7d1d75c3562a835 Author: Kees Cook Date: Fri Oct 20 22:24:18 2017 -0700 netfilter: ipvs: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Wensong Zhang Cc: Simon Horman Cc: Julian Anastasov Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Cc: "David S. Miller" Cc: netdev@vger.kernel.org Cc: lvs-devel@vger.kernel.org Cc: netfilter-devel@vger.kernel.org Cc: coreteam@netfilter.org Signed-off-by: Kees Cook Acked-by: Julian Anastasov Acked-by: Simon Horman net/netfilter/ipvs/ip_vs_conn.c | 10 +++++----- net/netfilter/ipvs/ip_vs_ctl.c | 7 +++---- net/netfilter/ipvs/ip_vs_est.c | 6 +++--- net/netfilter/ipvs/ip_vs_lblc.c | 11 ++++++----- net/netfilter/ipvs/ip_vs_lblcr.c | 11 ++++++----- 5 files changed, 23 insertions(+), 22 deletions(-) commit 8e5f4ba0cd5ed3879d484472657122742a749e9c Author: Kees Cook Date: Sun Sep 3 13:23:32 2017 -0700 scsi: qla2xxx: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: qla2xxx-upstream@qlogic.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen Tested-by: Bart Van Assche drivers/scsi/qla2xxx/qla_gbl.h | 6 +++--- drivers/scsi/qla2xxx/qla_init.c | 4 ++-- drivers/scsi/qla2xxx/qla_inline.h | 4 +--- drivers/scsi/qla2xxx/qla_mid.c | 2 +- drivers/scsi/qla2xxx/qla_os.c | 11 +++++------ 5 files changed, 12 insertions(+), 15 deletions(-) commit 71c50dbe1f4e5b964786e3680f4b92df9ccc630b Author: Colin Ian King Date: Sun Oct 15 12:50:34 2017 +0100 ACPI / LPSS: Remove redundant initialization of clk The pointer clk is being initialized to ERR_PTR(-ENODEV) however this value is never read before it is set to clk_data->clk. Thus the initialization is redundant and can be mored. Cleans up clang warning: Value stored to 'clk' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_lpss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85b1407bf6d2f4a1583e9201b8c163703df733cc Author: George Cherian Date: Wed Oct 11 08:54:58 2017 +0000 ACPI / CPPC: Make CPPC ACPI driver aware of PCC subspace IDs Based on ACPI 6.2 Section 8.4.7.1.9 If the PCC register space is used, all PCC registers, for all processors in the same performance domain (as defined by _PSD), must be defined to be in the same subspace. Based on Section 14.1 of ACPI specification, it is possible to have a maximum of 256 PCC subspace IDs. Add support of multiple PCC subspace ID instead of using a single global pcc_data structure. While at that, fix the time_delta check in send_pcc_cmd() so that last_mpar_reset and mpar_count are initialized properly. Signed-off-by: George Cherian Reviewed-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki drivers/acpi/cppc_acpi.c | 240 +++++++++++++++++++++++++++++------------------ 1 file changed, 151 insertions(+), 89 deletions(-) commit c4b766c2f3fc4d847f16a3735913b7edf3136343 Author: George Cherian Date: Wed Oct 11 08:54:57 2017 +0000 mailbox: PCC: Move the MAX_PCC_SUBSPACES definition to header file Move the MAX_PCC_SUBSPACES definition to acpi/pcc.h file in preparation to add subspace ID support for cppc_acpi driver. Signed-off-by: George Cherian Reviewed-by: Prashanth Prakash Signed-off-by: Rafael J. Wysocki drivers/mailbox/pcc.c | 1 - include/acpi/pcc.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit 3e87ead41224fca9dbc3c8646b5cff8168348aba Author: Colin Ian King Date: Mon Oct 2 15:40:33 2017 +0100 ACPI / sysfs: Make function param_set_trace_method_name() static The function param_set_trace_method_name is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'param_set_trace_method_name' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki drivers/acpi/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 84d3f6b76447896919c63b28ad71f71238cefcce Author: Hans de Goede Date: Mon Sep 11 16:07:06 2017 +0200 ACPI / button: Delay acpi_lid_initialize_state() until first user space open ACPI _LID methods may depend on OpRegions and do not always handle handlers for those OpRegions not being present properly e.g. : Method (_LID, 0, NotSerialized) // _LID: Lid Status { If ((^^I2C5.PMI1.AVBL == One) && (^^GPO2.AVBL == One)) { Return (^^GPO2.LPOL) /* \_SB_.GPO2.LPOL */ } } Note the missing Return (1) when either of the OpRegions is not available, this causes (in this case) a report of the lid-switch being closed, which causes userspace to do an immediate suspend at boot. This commit delays getting the initial state and thus calling _LID for the first time until userspace opens the /dev/input/event# node. This ensures that all drivers will have had a chance to load and registerer their OpRegions before the first _LID call, fixing this issue. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/button.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 341b2aa83368e6f23bf0cc3d04604896337ad7cb Author: Dick Kennedy Date: Tue Nov 7 12:59:02 2017 -0800 scsi: lpfc: Fix hard lock up NMI in els timeout handling. System crashed due to a hard lockup at lpfc_els_timeout_handler+0x128. The els ring's txcmplq list is corrupted: the last element in the list does not point back the the head causing a loop. Issue is the els processing path for sli4 hbas are using the hbalock instead of the ring_lock for removing elements from the txcmplq list. Use the adapter SLI_REV to determine which lock should be used for removing iocbqs from the els rings txcmplq. note: the future refactoring will address this so that we don't have this ugly type-based lock code. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 53c5eaabaea9a1b7a96f95ccc486d2ad721d95bb Author: Lv Zheng Date: Tue Sep 26 16:54:03 2017 +0800 ACPI / EC: Fix regression related to triggering source of EC event handling Originally the Samsung quirks removed by commit 4c237371 can be covered by commit e923e8e7 and ec_freeze_events=Y mode. But commit 9c40f956 changed ec_freeze_events=Y back to N, making this problem re-surface. Actually, if commit e923e8e7 is robust enough, we can freely change ec_freeze_events mode, so this patch fixes the issue by improving commit e923e8e7. Related commits listed in the merged order: Commit: e923e8e79e18fd6be9162f1be6b99a002e9df2cb Subject: ACPI / EC: Fix an issue that SCI_EVT cannot be detected after event is enabled Commit: 4c237371f290d1ed3b2071dd43554362137b1cce Subject: ACPI / EC: Remove old CLEAR_ON_RESUME quirk Commit: 9c40f956ce9b331493347d1b3cb7e384f7dc0581 Subject: Revert "ACPI / EC: Enable event freeze mode..." to fix a regression This patch not only fixes the reported post-resume EC event triggering source issue, but also fixes an unreported similar issue related to the driver bind by adding EC event triggering source in ec_install_handlers(). Fixes: e923e8e79e18 (ACPI / EC: Fix an issue that SCI_EVT cannot be detected after event is enabled) Fixes: 4c237371f290 (ACPI / EC: Remove old CLEAR_ON_RESUME quirk) Fixes: 9c40f956ce9b (Revert "ACPI / EC: Enable event freeze mode..." to fix a regression) Link: https://bugzilla.kernel.org/show_bug.cgi?id=196833 Signed-off-by: Lv Zheng Reported-by: Alistair Hamilton Tested-by: Alistair Hamilton Cc: 4.11+ # 4.11+ Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 505fb74664d534618258f4120d7e110a8b885c87 Author: Randy Dunlap Date: Sun Oct 29 17:07:11 2017 -0700 PCI: Fix kernel-doc build warning Fix build error in kernel-doc notation: ../drivers/pci/pci.c:3479: ERROR: Unexpected indentation. "::" tells the kernel-doc "reStructuredText" processor that the following block is a literal block of some blob that should be kept as is. Signed-off-by: Randy Dunlap [bhelgaas: add hint about "::" meaning] Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 268eb4989410619c39b041d453a05a71b26b24c6 Author: Dan Carpenter Date: Wed Nov 8 11:38:20 2017 +0300 scsi: mpt3sas: remove a stray KERN_INFO pr_info() has a KERN_INFO already so the second KERN_INFO isn't needed. Signed-off-by: Dan Carpenter Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e4b1b707b7ed795585b8ee28c44ce692aa8dfef Author: Sakari Ailus Date: Tue Sep 19 12:39:12 2017 +0300 device property: Add a macro for interating over graph endpoints Add a convenience macro for iterating over graph endpoints. Iterating over graph endpoints using fwnode_graph_get_next_endpoint() is a recurring pattern, and this macro allows calling that function in a slightly more convenient way. For instance, for (child = NULL; (child = fwnode_graph_get_next_endpoint(fwnode, child)); ) becomes fwnode_graph_for_each_endpoint(fwnode, child) Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki include/linux/property.h | 4 ++++ 1 file changed, 4 insertions(+) commit cf89a31ca55272e1dfb9527b5a61eee4d417747a Author: Sakari Ailus Date: Tue Sep 19 12:39:11 2017 +0300 device property: Make fwnode_handle_get() return the fwnode The fwnode_handle_get() function is used to obtain a reference to an fwnode. A common usage pattern for the OF equivalent of the function is: mynode = of_node_get(node); Similarly make fwnode_handle_get() return the fwnode to which the reference was obtained. Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki drivers/base/property.c | 9 +++++++-- drivers/of/property.c | 4 ++-- include/linux/fwnode.h | 2 +- include/linux/property.h | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) commit 6767aced2ff1d4f214b2f0632d04dce02e6b6b2a Author: Dan Carpenter Date: Wed Nov 8 11:38:01 2017 +0300 scsi: mpt3sas: cleanup _scsih_pcie_enumeration_event() The indenting wasn't right, because the last two prints weren't indented far enough. Also it used pr_info() where it was supposed to use pr_cont(). I reversed the if statement and pulled the code in one tab and did a couple other minor cleanups. Fixes: 4318c7347847 ("scsi: mpt3sas: Handle NVMe PCIe device related events generated from firmware.") Signed-off-by: Dan Carpenter Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit c0041d40ba6a352e5a5304d656e8a26e2fba1f63 Author: Arnd Bergmann Date: Thu Nov 2 12:42:50 2017 +0100 APEI / ERST: use 64-bit timestamps 32-bit timestamps are deprecated in the kernel, so we should not use get_seconds(). In this case, the 'struct cper_record_header' structure already contains a 64-bit field, so the only required change is to use the safe ktime_get_real_seconds() interface as a replacement. Signed-off-by: Arnd Bergmann Reviewed-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/erst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 820f188659122602ab217dd80cfa32b3ac0c55c0 Author: Arnd Bergmann Date: Tue Nov 7 11:46:05 2017 +0100 scsi: aacraid: use timespec64 instead of timeval aacraid passes the current time to the firmware in one of two ways, either as year/month/day/... or as 32-bit unsigned seconds. The first one is broken on 32-bit architectures as it cannot go past year 2038. Using timespec64 here makes it behave properly on both 32-bit and 64-bit architectures, and avoids relying on signed integer overflow to pass times into the second interface. The interface used in aac_send_hosttime() however is still problematic in year 2106 when 32-bit seconds overflow. Hopefully we don't have to worry about aacraid by that time. Signed-off-by: Arnd Bergmann Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen drivers/scsi/aacraid/commsup.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 335f83b9113421a65bfb19e0fa6a2b262ca86c26 Author: James Smart Date: Fri Nov 3 16:26:08 2017 -0700 scsi: scsi_transport_fc: add 64GBIT and 128GBIT port speed definitions Add 64GBIT and 128GBIT port speed definitions. Upcoming hardware will reference these speeds. Signed-off-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_fc.c | 2 ++ include/scsi/scsi_transport_fc.h | 2 ++ 2 files changed, 4 insertions(+) commit 07458f6a5171d97511dfbdf6ce549ed2ca0280c7 Author: Viresh Kumar Date: Wed Nov 8 20:23:55 2017 +0530 cpufreq: schedutil: Reset cached_raw_freq when not in sync with next_freq 'cached_raw_freq' is used to get the next frequency quickly but should always be in sync with sg_policy->next_freq. There is a case where it is not and in such cases it should be reset to avoid switching to incorrect frequencies. Consider this case for example: - policy->cur is 1.2 GHz (Max) - New request comes for 780 MHz and we store that in cached_raw_freq. - Based on 780 MHz, we calculate the effective frequency as 800 MHz. - We then see the CPU wasn't idle recently and choose to keep the next freq as 1.2 GHz. - Now we have cached_raw_freq is 780 MHz and sg_policy->next_freq is 1.2 GHz. - Now if the utilization doesn't change in then next request, then the next target frequency will still be 780 MHz and it will match with cached_raw_freq. But we will choose 1.2 GHz instead of 800 MHz here. Fixes: b7eaf1aab9f8 (cpufreq: schedutil: Avoid reducing frequency of busy CPUs prematurely) Signed-off-by: Viresh Kumar Cc: 4.12+ # 4.12+ Signed-off-by: Rafael J. Wysocki kernel/sched/cpufreq_schedutil.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit cdd9a8b8599b952e2b39763090689ec2ad8e40c3 Author: pding Date: Tue Nov 7 14:32:36 2017 +0800 drm/amdgpu: use irq-safe lock for kiq->ring_lock This lock is used during register accessing in SRIOV guest. The register accessing could happen both in irq enabled and irq disabled cases. Always use irq-safe lock. Signed-off-by: Pixel Ding Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit dce1e131dd4dc68099ff1b70aa03cd2d0acf8639 Author: Pixel Ding Date: Wed Nov 8 10:20:01 2017 +0800 drm/amdgpu: bypass lru touch for KIQ ring submission KIQ ring submission is used for register accessing on SRIOV VF that could happen both in irq enabled and irq disabled cases. Inversion lock could happen on adev->ring_lru_list_lock, while this operation is useless and just adds overhead in this use case. Signed-off-by: Pixel Ding Reviewed-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 78aa02c713fcf19e9bc8511ab61a5fd6c877cc01 Author: Dan Carpenter Date: Sat Sep 30 11:14:13 2017 +0300 drm/amdgpu: Potential uninitialized variable in amdgpu_vm_update_directories() After commit ea09729c9302 ("drm/amdgpu: rework page directory filling v2") then it becomes a lot harder to verify that "r" is initialized. My static checker complains and so I've reviewed the code. It does look like it might be buggy... Anyway, it doesn't hurt to set "r" to zero at the start. Reviewed-by: Christian König Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40a9960b046290939b56ce8e51f365258f27f264 Author: Dan Carpenter Date: Sat Sep 30 11:13:28 2017 +0300 drm/amdgpu: potential uninitialized variable in amdgpu_vce_ring_parse_cs() We shifted some code around in commit 9cca0b8e5df0 ("drm/amdgpu: move amdgpu_cs_sysvm_access_required into find_mapping") and now my static checker complains that "r" might not be initialized at the end of the function. I've reviewed the code, and that seems possible, but it's also possible I may have missed something. Reviewed-by: Christian König Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2dd9789c76ffde05d5f4c56f45c3cb71b3936694 Author: Himanshu Jha Date: Sun Nov 5 03:27:32 2017 +0530 freezer: Fix typo in freezable_schedule_timeout() comment Signed-off-by: Himanshu Jha Acked-by: Luis R. Rodriguez Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki include/linux/freezer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0861aa1251c749bbec4ee124ee21660c2f263da4 Author: Zubair Lutfullah Kakakhel Date: Fri Mar 31 10:00:42 2017 +0100 MIPS: Xilfpga: Switch to using generic defconfigs Use the generic platform code and remove arch/mips/xilfpga Signed-off-by: Zubair Lutfullah Kakakhel Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15847/ [jhogan@kernel.org: Update arch/mips/Makefile snippet and move to end] Signed-off-by: James Hogan arch/mips/Kbuild.platforms | 1 - arch/mips/Kconfig | 24 ------------ arch/mips/Makefile | 4 ++ arch/mips/configs/xilfpga_defconfig | 75 ------------------------------------- arch/mips/xilfpga/Kconfig | 9 ----- arch/mips/xilfpga/Makefile | 7 ---- arch/mips/xilfpga/Platform | 3 -- arch/mips/xilfpga/init.c | 44 ---------------------- arch/mips/xilfpga/intc.c | 22 ----------- arch/mips/xilfpga/time.c | 41 -------------------- 10 files changed, 4 insertions(+), 226 deletions(-) commit b35565bb16a55e5b8c5067e891b7b31a4359bda6 Author: Zubair Lutfullah Kakakhel Date: Fri Mar 31 10:00:41 2017 +0100 MIPS: generic: Add support for MIPSfpga Add support for the MIPSfpga platform to generic kernel. Signed-off-by: Zubair Lutfullah Kakakhel Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/15846/ [jhogan@kernel.org: Use separate board-xilfpga.its.S. Add 32r2 and little endian requires to board-xilfpga.config] Signed-off-by: James Hogan arch/mips/boot/dts/xilfpga/Makefile | 2 +- arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 8 ++++++++ arch/mips/configs/generic/board-xilfpga.config | 22 ++++++++++++++++++++++ arch/mips/generic/Kconfig | 6 ++++++ arch/mips/generic/board-xilfpga.its.S | 22 ++++++++++++++++++++++ 5 files changed, 59 insertions(+), 1 deletion(-) commit 95b982b45122c57da2ee0b46cce70775e1d987af Author: Rajat Jain Date: Tue Oct 31 14:44:24 2017 -0700 PM / s2idle: Clear the events_check_enabled flag Problem: This flag does not get cleared currently in the suspend or resume path in the following cases: * In case some driver's suspend routine returns an error. * Successful s2idle case * etc? Why is this a problem: What happens is that the next suspend attempt could fail even though the user did not enable the flag by writing to /sys/power/wakeup_count. This is 1 use case how the issue can be seen (but similar use case with driver suspend failure can be thought of): 1. Read /sys/power/wakeup_count 2. echo count > /sys/power/wakeup_count 3. echo freeze > /sys/power/wakeup_count 4. Let the system suspend, and wakeup the system using some wake source that calls pm_wakeup_event() e.g. power button or something. 5. Note that the combined wakeup count would be incremented due to the pm_wakeup_event() in the resume path. 6. After resuming the events_check_enabled flag is still set. At this point if the user attempts to freeze again (without writing to /sys/power/wakeup_count), the suspend would fail even though there has been no wake event since the past resume. Address that by clearing the flag just before a resume is completed, so that it is always cleared for the corner cases mentioned above. Signed-off-by: Rajat Jain Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki kernel/power/suspend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7bc9b209e27c0b617378400136cc663a6314d0c Author: Gautham R. Shenoy Date: Tue Nov 7 13:39:29 2017 +0530 cpufreq: stats: Handle the case when trans_table goes beyond PAGE_SIZE On platforms with large number of Pstates, the transition table, which is a NxN matrix, can overflow beyond the PAGE_SIZE boundary. This can be seen on POWER9 which has 100+ Pstates. As a result, each time the trans_table is read for any of the CPUs, we will get the following error. --------------------------------------------------- fill_read_buffer: show+0x0/0xa0 returned bad count --------------------------------------------------- This patch ensures that in case of an overflow, we print a warning once in the dmesg and return FILE TOO LARGE error for this and all subsequent accesses of trans_table. Signed-off-by: Gautham R. Shenoy Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki Documentation/cpu-freq/cpufreq-stats.txt | 3 +++ drivers/cpufreq/cpufreq_stats.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit f368d3bfde225199eef2216b03e0ba4944a3434a Author: Ernst Sjöstrand Date: Wed Nov 8 22:47:06 2017 +0100 amd/display: Fix potential null dereference in dce_calcs.c Reported by smatch: bw_calcs() error: potential null dereference 'data' Reviewed-by: Alex Deucher Signed-off-by: Ernst Sjöstrand Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 2 ++ 1 file changed, 2 insertions(+) commit d83e87b239ec42eeda34850da342b3d8f104812b Author: Harry Wentland Date: Tue Nov 7 19:29:40 2017 -0500 amdgpu/dm: Remove unused forward declaration dc_stream has long been renamed to dc_stream_state, so this forward declaration hasn't been used at all. Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 -- 1 file changed, 2 deletions(-) commit cd3f6ad8389a5065811a5fd3befab7999ac4e117 Author: Harry Wentland Date: Tue Nov 7 19:33:55 2017 -0500 drm/amdgpu: Remove unused dc_stream from amdgpu_crtc It's no longer used. In fact, there is no more dc_stream object. Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 -- 1 file changed, 2 deletions(-) commit 04d8405e714e66e52718436eb6eb6e8ba6afb823 Author: Matt Redfearn Date: Wed Dec 14 15:09:43 2016 +0000 MIPS: Set defconfig target to a generic system for 32r2el The default system type should be a MIPS generic kernel. In order to include some level of board support, select a 32r2el generic defconfig by default. The alternative would be to use "generic_defconfig" but rather unintuitvely that is a bare bones configuration with no platform support so is not usable in practice. Signed-off-by: Matt Redfearn Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14715/ Signed-off-by: James Hogan arch/mips/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d41e6858ba58c039fe84a4f341c1088c475b2537 Author: Matt Redfearn Date: Wed Dec 14 15:09:42 2016 +0000 MIPS: Kconfig: Set default MIPS system type as generic The generic MIPS system type allows building a board agnostic kernel and should be the default starting point for users, so set it as the default system type in Kconfig. Since ip22 is no longer the default, update ip22_defconfig to select CONFIG_SGI_IP22. Signed-off-by: Matt Redfearn Cc: Ralf Baechle Cc: David Howells Cc: Borislav Petkov Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14714/ Signed-off-by: James Hogan arch/mips/Kconfig | 2 +- arch/mips/configs/ip22_defconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 0011c6da99ddc428a35456d5819d6e476005f6f2 Author: Bhumika Goyal Date: Thu Oct 19 12:59:15 2017 +0200 cpufreq: arm_big_little: make cpufreq_arm_bL_ops structures const Make these const as they are only getting passed to the functions bL_cpufreq_{register/unregister} having the arguments as const. Signed-off-by: Bhumika Goyal Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/arm_big_little_dt.c | 2 +- drivers/cpufreq/scpi-cpufreq.c | 2 +- drivers/cpufreq/vexpress-spc-cpufreq.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit cd6ce860eb1920568361cf270fe4f89674cf411b Author: Bhumika Goyal Date: Thu Oct 19 12:59:14 2017 +0200 cpufreq: arm_big_little: make function arguments and structure pointer const Make the arguments of functions bL_cpufreq_{register/unregister} as const as the ops pointer does not modify the fields of the cpufreq_arm_bL_ops structure it points to. The pointer arm_bL_ops is also getting initialized with ops but the pointer does not modify the fields. So, make the function argument and the structure pointer const. Add const to function prototypes too. Signed-off-by: Bhumika Goyal Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/arm_big_little.c | 6 +++--- drivers/cpufreq/arm_big_little.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 84fbfc33eaad549dd7fa513ad764d9bfe1cbf507 Author: Shawn Lin Date: Wed Jul 5 15:04:48 2017 +0800 MIPS: DTS: Remove num-slots from Pistachio SoC dwmmc driver deprecated num-slots and plan to get rid of it finally. Just move a step to cleanup it from DT. Cc: Jaehoon Chung Signed-off-by: Shawn Lin Acked-by: James Hartley Cc: Ralf Baechle Cc: Jaehoon Chung Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16741/ Signed-off-by: James Hogan arch/mips/boot/dts/img/pistachio.dtsi | 1 - 1 file changed, 1 deletion(-) commit 3fc74bd8a723c91a5b4627079c511fcaf3c75017 Author: Gaurav Jindal Date: Sat Sep 2 00:56:38 2017 +0530 cpuidle: Avoid assignment in if () argument Clean up cpuidle_enable_device() to avoid doing an assignment in an expression evaluated as an argument of if (), which also makes the code in question more readable. Signed-off-by: Gaurav Jindal [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit e629cfa36ea0877371427b71bdfc701bc46b9880 Author: Allen Pais Date: Fri Sep 22 17:13:35 2017 +0530 MIPS: Lasat: Use setup_timer() helper Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17341/ Signed-off-by: James Hogan arch/mips/lasat/picvue_proc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e7b06a09e7d87ec0d6d8b17eec50fbb93667eee1 Author: Gaurav Jindal Date: Fri Sep 1 20:37:26 2017 +0530 cpuidle: Clean up cpuidle_enable_device() error handling a bit Do not fetch per CPU drv if cpuidle_curr_governor is NULL to avoid useless per CPU processing. Signed-off-by: Gaurav Jindal [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ff1656790b3a4caca94505c52fd0250f981ea187 Author: Ville Syrjälä Date: Tue Nov 7 23:08:10 2017 +0200 ACPI / PM: Fix acpi_pm_notifier_lock vs flush_workqueue() deadlock acpi_remove_pm_notifier() ends up calling flush_workqueue() while holding acpi_pm_notifier_lock, and that same lock is taken by by the work via acpi_pm_notify_handler(). This can deadlock. To fix the problem let's split the single lock into two: one to protect the dev->wakeup between the work vs. add/remove, and another one to handle notifier installation vs. removal. After commit a1d14934ea4b "workqueue/lockdep: 'Fix' flush_work() annotation" I was able to kill the machine (Intel Braswell) very easily with 'powertop --auto-tune', runtime suspending i915, and trying to wake it up via the USB keyboard. The cases when it didn't die are presumably explained by lockdep getting disabled by something else (cpu hotplug locking issues usually). Fortunately I still got a lockdep report over netconsole (trickling in very slowly), even though the machine was otherwise practically dead: [ 112.179806] ====================================================== [ 114.670858] WARNING: possible circular locking dependency detected [ 117.155663] 4.13.0-rc6-bsw-bisect-00169-ga1d14934ea4b #119 Not tainted [ 119.658101] ------------------------------------------------------ [ 121.310242] xhci_hcd 0000:00:14.0: xHCI host not responding to stop endpoint command. [ 121.313294] xhci_hcd 0000:00:14.0: xHCI host controller not responding, assume dead [ 121.313346] xhci_hcd 0000:00:14.0: HC died; cleaning up [ 121.313485] usb 1-6: USB disconnect, device number 3 [ 121.313501] usb 1-6.2: USB disconnect, device number 4 [ 134.747383] kworker/0:2/47 is trying to acquire lock: [ 137.220790] (acpi_pm_notifier_lock){+.+.}, at: [] acpi_pm_notify_handler+0x2f/0x80 [ 139.721524] [ 139.721524] but task is already holding lock: [ 144.672922] ((&dpc->work)){+.+.}, at: [] process_one_work+0x160/0x720 [ 147.184450] [ 147.184450] which lock already depends on the new lock. [ 147.184450] [ 154.604711] [ 154.604711] the existing dependency chain (in reverse order) is: [ 159.447888] [ 159.447888] -> #2 ((&dpc->work)){+.+.}: [ 164.183486] __lock_acquire+0x1255/0x13f0 [ 166.504313] lock_acquire+0xb5/0x210 [ 168.778973] process_one_work+0x1b9/0x720 [ 171.030316] worker_thread+0x4c/0x440 [ 173.257184] kthread+0x154/0x190 [ 175.456143] ret_from_fork+0x27/0x40 [ 177.624348] [ 177.624348] -> #1 ("kacpi_notify"){+.+.}: [ 181.850351] __lock_acquire+0x1255/0x13f0 [ 183.941695] lock_acquire+0xb5/0x210 [ 186.046115] flush_workqueue+0xdd/0x510 [ 190.408153] acpi_os_wait_events_complete+0x31/0x40 [ 192.625303] acpi_remove_notify_handler+0x133/0x188 [ 194.820829] acpi_remove_pm_notifier+0x56/0x90 [ 196.989068] acpi_dev_pm_detach+0x5f/0xa0 [ 199.145866] dev_pm_domain_detach+0x27/0x30 [ 201.285614] i2c_device_probe+0x100/0x210 [ 203.411118] driver_probe_device+0x23e/0x310 [ 205.522425] __driver_attach+0xa3/0xb0 [ 207.634268] bus_for_each_dev+0x69/0xa0 [ 209.714797] driver_attach+0x1e/0x20 [ 211.778258] bus_add_driver+0x1bc/0x230 [ 213.837162] driver_register+0x60/0xe0 [ 215.868162] i2c_register_driver+0x42/0x70 [ 217.869551] 0xffffffffa0172017 [ 219.863009] do_one_initcall+0x45/0x170 [ 221.843863] do_init_module+0x5f/0x204 [ 223.817915] load_module+0x225b/0x29b0 [ 225.757234] SyS_finit_module+0xc6/0xd0 [ 227.661851] do_syscall_64+0x5c/0x120 [ 229.536819] return_from_SYSCALL_64+0x0/0x7a [ 231.392444] [ 231.392444] -> #0 (acpi_pm_notifier_lock){+.+.}: [ 235.124914] check_prev_add+0x44e/0x8a0 [ 237.024795] __lock_acquire+0x1255/0x13f0 [ 238.937351] lock_acquire+0xb5/0x210 [ 240.840799] __mutex_lock+0x75/0x940 [ 242.709517] mutex_lock_nested+0x1c/0x20 [ 244.551478] acpi_pm_notify_handler+0x2f/0x80 [ 246.382052] acpi_ev_notify_dispatch+0x44/0x5c [ 248.194412] acpi_os_execute_deferred+0x14/0x30 [ 250.003925] process_one_work+0x1ec/0x720 [ 251.803191] worker_thread+0x4c/0x440 [ 253.605307] kthread+0x154/0x190 [ 255.387498] ret_from_fork+0x27/0x40 [ 257.153175] [ 257.153175] other info that might help us debug this: [ 257.153175] [ 262.324392] Chain exists of: [ 262.324392] acpi_pm_notifier_lock --> "kacpi_notify" --> (&dpc->work) [ 262.324392] [ 267.391997] Possible unsafe locking scenario: [ 267.391997] [ 270.758262] CPU0 CPU1 [ 272.431713] ---- ---- [ 274.060756] lock((&dpc->work)); [ 275.646532] lock("kacpi_notify"); [ 277.260772] lock((&dpc->work)); [ 278.839146] lock(acpi_pm_notifier_lock); [ 280.391902] [ 280.391902] *** DEADLOCK *** [ 280.391902] [ 284.986385] 2 locks held by kworker/0:2/47: [ 286.524895] #0: ("kacpi_notify"){+.+.}, at: [] process_one_work+0x160/0x720 [ 288.112927] #1: ((&dpc->work)){+.+.}, at: [] process_one_work+0x160/0x720 [ 289.727725] Fixes: c072530f391e (ACPI / PM: Revork the handling of ACPI device wakeup notifications) Signed-off-by: Ville Syrjälä Cc: 3.17+ # 3.17+ Signed-off-by: Rafael J. Wysocki drivers/acpi/device_pm.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit d3a0b968186a7e197b7551e4d6080676372152ce Author: Maciej W. Rozycki Date: Fri Sep 29 16:26:31 2017 +0100 MIPS: Use SLL by 0 for 32-bit truncation in `__read_64bit_c0_split' Optimize `__read_64bit_c0_split' and reduce the instruction count by 1, observing that a DSLL/DSRA pair by 32, is equivalent to SLL by 0, which architecturally truncates the value requested to 32 bits on 64-bit MIPS hardware regardless of whether the input operand is or is not a properly sign-extended 32-bit value. Signed-off-by: Maciej W. Rozycki Reviewed-by: James Hogan Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17399/ Signed-off-by: James Hogan arch/mips/include/asm/mipsregs.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 7db08b2cb36cbfbcb06c44dc8e48ccb6a119466f Author: Guenter Roeck Date: Wed Nov 8 16:34:54 2017 -0500 ASoC: amd: use do_div rather than 64 bit division to fix 32 bit builds ERROR: "__aeabi_uldivmod" [sound/soc/amd/snd-soc-acp-pcm.ko] undefined! 64-bit divides require special operations to avoid build errors on 32-bit systems. [Reword the commit message to make it clearer - Alex] fixes: 61add8147942 (ASoC: amd: Report accurate hw_ptr during dma) Signed-off-by: Guenter Roeck Reviewed-on: https://chromium-review.googlesource.com/678919 Reviewed-by: Jason Clinton Reviewed-on: https://chromium-review.googlesource.com/681618 Signed-off-by: Alex Deucher Signed-off-by: Mark Brown sound/soc/amd/acp-pcm-dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8adc430603d67e76a0f8491df21654f691acda62 Author: Andrew F. Davis Date: Wed Nov 8 15:24:59 2017 -0600 ASoC: cs42l56: Fix reset GPIO name in example DT binding The binding states the reset GPIO property shall be named "cirrus,gpio-nreset" and this is what the driver looks for, but the example uses "gpio-reset". Fix this here. Fixes: 3bb40619aca8 ("ASoC: cs42l56: bindings: sound: Add bindings for CS42L56 CODEC") Signed-off-by: Andrew F. Davis Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/cs42l56.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffe15f83ef856ba451e99c41b07d46763bd72a0f Author: Joao Martins Date: Wed Nov 8 17:19:58 2017 +0000 MAINTAINERS: xen, kvm: track pvclock-abi.h changes This file defines an ABI shared between guest and hypervisor(s) (KVM, Xen) and as such there should be an correspondent entry in MAINTAINERS file. Notice that there's already a text notice at the top of the header file, hence this commit simply enforces it more explicitly and have both peers noticed when such changes happen. Signed-off-by: Joao Martins Acked-by: Juergen Gross Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Paolo Bonzini Signed-off-by: Boris Ostrovsky MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 2229f70b5bbb025e1394b61007938a68060afbfb Author: Joao Martins Date: Wed Nov 8 17:19:57 2017 +0000 x86/xen/time: setup vcpu 0 time info page In order to support pvclock vdso on xen we need to setup the time info page for vcpu 0 and register the page with Xen using the VCPUOP_register_vcpu_time_memory_area hypercall. This hypercall will also forcefully update the pvti which will set some of the necessary flags for vdso. Afterwards we check if it supports the PVCLOCK_TSC_STABLE_BIT flag which is mandatory for having vdso/vsyscall support. And if so, it will set the cpu 0 pvti that will be later on used when mapping the vdso image. The xen headers are also updated to include the new hypercall for registering the secondary vcpu_time_info struct. Signed-off-by: Joao Martins Reviewed-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky arch/x86/xen/suspend.c | 4 ++ arch/x86/xen/time.c | 90 +++++++++++++++++++++++++++++++++++++++++++- arch/x86/xen/xen-ops.h | 2 + include/xen/interface/vcpu.h | 42 +++++++++++++++++++++ 4 files changed, 137 insertions(+), 1 deletion(-) commit b888808093113ae7d63d213272d01fea4b8329ed Author: Joao Martins Date: Wed Nov 8 17:19:56 2017 +0000 x86/xen/time: set pvclock flags on xen_time_init() Specifically check for PVCLOCK_TSC_STABLE_BIT and if this bit is set, then set it too on pvclock flags. This allows Xen clocksource to use it and thus speeding up xen_clocksource_read() callers (i.e. sched_clock()) Signed-off-by: Joao Martins Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky arch/x86/xen/time.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9f08890ab906abaf9d4c1bad8111755cbd302260 Author: Joao Martins Date: Wed Nov 8 17:19:55 2017 +0000 x86/pvclock: add setter for pvclock_pvti_cpu0_va Right now there is only a pvclock_pvti_cpu0_va() which is defined on kvmclock since: commit dac16fba6fc5 ("x86/vdso: Get pvclock data from the vvar VMA instead of the fixmap") The only user of this interface so far is kvm. This commit adds a setter function for the pvti page and moves pvclock_pvti_cpu0_va to pvclock, which is a more generic place to have it; and would allow other PV clocksources to use it, such as Xen. While moving pvclock_pvti_cpu0_va into pvclock, rename also this function to pvclock_get_pvti_cpu0_va (including its call sites) to be symmetric with the setter (pvclock_set_pvti_cpu0_va). Signed-off-by: Joao Martins Acked-by: Andy Lutomirski Acked-by: Paolo Bonzini Acked-by: Thomas Gleixner Signed-off-by: Boris Ostrovsky arch/x86/entry/vdso/vma.c | 2 +- arch/x86/include/asm/pvclock.h | 19 ++++++++++--------- arch/x86/kernel/kvmclock.c | 7 +------ arch/x86/kernel/pvclock.c | 14 ++++++++++++++ drivers/ptp/ptp_kvm.c | 2 +- 5 files changed, 27 insertions(+), 17 deletions(-) commit 001f60e1f662a6dee1630a2915401aaf5959d479 Author: Joao Martins Date: Wed Nov 8 17:19:54 2017 +0000 ptp_kvm: probe for kvm guest availability In the event of moving pvclock_pvti_cpu0_va() definition to common pvclock code, this function would return a value on non KVM guests. Later on this would fail with a GPF on ptp_kvm_init when running on a Xen guest. Therefore, ptp_kvm_init() should check whether it is running in a KVM guest. Signed-off-by: Joao Martins Acked-by: Radim Krčmář Signed-off-by: Boris Ostrovsky drivers/ptp/ptp_kvm.c | 3 +++ 1 file changed, 3 insertions(+) commit e9c50aa6bd3996924b5fd87ab59289888cd5704a Author: oder_chiou@realtek.com Date: Wed Nov 8 15:04:22 2017 +0800 ASoC: rt5514-spi: check irq status to schedule data copy in resume function For wake on voice use case, we need to copy data from DSP buffer to PCM stream when system wakes up by voice. However the edge triggered IRQ could be missed when system wakes up, in that case the irq function will not be called. If the substream was constructed beforce suspend, we will schedule data copy in resume function. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5514-spi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 58f1c07d23cddbc4c8aa99a214934eb7d33e8523 Author: oder_chiou@realtek.com Date: Wed Nov 8 15:04:21 2017 +0800 ASoC: rt5514: Voice wakeup support. If the rt5514 Wake on Voice device is opened while suspended, it will be able to wake up the system when a voice command is detected. This patch also supports user-space policy to override wakeup behavior by /sys/bus/spi/drivers/rt5514/spi2.0/power/wakeup. Signed-off-by: Chinyue Chen Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5514-spi.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 9d94305a7df4ce6af5070baa92cc784786b748b9 Author: Gustavo A. R. Silva Date: Wed Nov 8 14:04:43 2017 -0600 ASoC: wm8994: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 402005 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown sound/soc/codecs/wm8994.c | 2 ++ 1 file changed, 2 insertions(+) commit cdf45e49adb2ba39e6e270717b86fe844e4c59c8 Author: Gustavo A. R. Silva Date: Wed Nov 8 14:04:38 2017 -0600 ASoC: wm8993: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115168 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown sound/soc/codecs/wm8993.c | 2 ++ 1 file changed, 2 insertions(+) commit b0e92b515e2cbcad923ee1211f59c4b62e94ee37 Author: Gustavo A. R. Silva Date: Wed Nov 8 14:04:31 2017 -0600 ASoC: wm8753: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 146568 Addresses-Coverity-ID: 146569 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown sound/soc/codecs/wm8753.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 402954f8e573e4b610da6858b8431d4edfd754c8 Author: Gustavo A. R. Silva Date: Wed Nov 8 14:04:22 2017 -0600 ASoC: tpa6130a2: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115164 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown sound/soc/codecs/tpa6130a2.c | 1 + 1 file changed, 1 insertion(+) commit 09fc38c1af4cb888255e9ecf267bf9757c12885d Author: Gustavo A. R. Silva Date: Wed Nov 8 14:04:17 2017 -0600 ASoC: tlv320dac31xx: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1195220 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic31xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a47043ec35d4198b3858cb1eb4c38d712154ae99 Author: Gustavo A. R. Silva Date: Wed Nov 8 14:04:12 2017 -0600 ASoC: tlv320aic23: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 146566 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown sound/soc/codecs/tlv320aic23.c | 1 + 1 file changed, 1 insertion(+) commit dc10622bb32f08383cf5a9942a91042d8f38bf3d Author: Gustavo A. R. Silva Date: Wed Nov 8 14:04:09 2017 -0600 ASoC: msm8916-wcd-analog: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1397957 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown sound/soc/codecs/msm8916-wcd-analog.c | 1 + 1 file changed, 1 insertion(+) commit e07bd30bb87f6a6ca1f75fa41df71ff5e7bc6a3f Author: Kuninori Morimoto Date: Mon Nov 6 01:49:06 2017 +0000 ASoC: add snd_soc_dapm_kcontrol_component() snd_soc_dapm_kcontrol_codec() (= for Codec) will be removed soon. This patch Component version of it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 474db2c9991cc624e7415770c8b80fc7acf40cdd Author: Kuninori Morimoto Date: Mon Nov 6 01:48:52 2017 +0000 ASoC: add snd_soc_component_cache_sync() snd_soc_cache_sync() (= for Codec) will be removed soon. This patch Component version of it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 10e079d9874802c35dc3f51af922531e5423a6bf Author: Kuninori Morimoto Date: Mon Nov 6 01:48:37 2017 +0000 ASoC: add snd_soc_component_xxx_bias_level() snd_soc_codec_xxx_bias_level() (= for Codec) will be removed soon. This patch Component version of it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 738b49efe6c6ba485e2b45265db535c58bbd54e7 Author: Kuninori Morimoto Date: Mon Nov 6 01:48:19 2017 +0000 ASoC: add snd_soc_component_read32 Current codec drivers are using snd_soc_read(). It will be replaced into snd_soc_component_read(), but these 2 are using different style. For example, it will be - val = snd_soc_read(xxx, reg); + ret = snd_soc_component_read(xxx, reg, &val); + if (ret < 0) { + ... + } To more smooth replace, let's add snd_soc_component_read32 which is copied from snd_soc_read() - val = snd_soc_read(xxx, reg); + val = snd_soc_component_read32(xxx, reg); Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 2 ++ sound/soc/soc-io.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) commit ead7a22e9b6eff225afb127f8835a1d3da271a89 Author: Heiko Carstens Date: Wed Nov 8 11:18:29 2017 +0100 s390: avoid undefined behaviour At a couple of places smatch emits warnings like this: arch/s390/mm/vmem.c:409 vmem_map_init() warn: right shifting more than type allows In fact shifting a signed type right is undefined. Avoid this and add an unsigned long cast. The shifted values are always positive. Signed-off-by: Heiko Carstens arch/s390/mm/init.c | 4 ++-- arch/s390/mm/vmem.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 8bc1e4ec79c0fcd48ff8914566fe960c34f27bc2 Author: Heiko Carstens Date: Mon Nov 6 13:29:56 2017 +0100 s390/disassembler: generate opcode tables from text file The current way of adding new instructions to the opcode tables is painful and error prone. Therefore add, similar to binutils, a text file which contains all opcodes and the corresponding mnemonics and instruction formats. A small gen_opcode_table tool then generates a header file with the required enums and opcode table initializers at the prepare step of the kernel build. This way only a simple text file has to be maintained, which can be rather easily extended. Unlike before where there were plenty of opcode tables and a large switch statement to find the correct opcode table, there is now only one opcode table left which contains all instructions. A second opcode offset table now contains offsets within the opcode table to find instructions which have the same opcode prefix. In order to save space all 1-byte opcode instructions are grouped together at the end of the opcode table. This is also quite similar to like it was before. In addition also move and change code and definitions within the disassembler. As a side effect this reduces the size required for the code and opcode tables by ~1.5k. Signed-off-by: Heiko Carstens arch/s390/Makefile | 1 + arch/s390/include/asm/dis.h | 27 +- arch/s390/kernel/dis.c | 2112 +++++------------------------------- arch/s390/tools/Makefile | 10 + arch/s390/tools/gen_opcode_table.c | 336 ++++++ arch/s390/tools/opcodes.txt | 1183 ++++++++++++++++++++ 6 files changed, 1813 insertions(+), 1856 deletions(-) commit dac6dc267d0e906fa9263462d4ebd78970a8b511 Author: Heiko Carstens Date: Mon Nov 6 13:28:38 2017 +0100 s390/disassembler: remove insn_to_mnemonic() insn_to_mnemonic() was introduced ages ago for KVM debugging, but is unused in the meantime. Therefore remove it. Acked-by: Christian Borntraeger Signed-off-by: Heiko Carstens arch/s390/include/asm/dis.h | 1 - arch/s390/kernel/dis.c | 28 ---------------------------- 2 files changed, 29 deletions(-) commit 399c5acd5837f6c93d784d8dd25ebae5a50362e1 Author: Arnd Bergmann Date: Mon Nov 6 15:02:41 2017 +0100 s390/dasd: avoid calling do_gettimeofday() do_gettimeofday() is deprecated because it's not y2038-safe on 32-bit architectures. Since it is basically a wrapper around ktime_get_real_ts64(), we can just call that function directly instead. Signed-off-by: Arnd Bergmann [sth@linux.vnet.ibm.com: fix build] Signed-off-by: Stefan Haberland Signed-off-by: Heiko Carstens drivers/s390/block/dasd_eer.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 307ab2a99d190d3a7949258b8551b66887ce8cf4 Author: Mario Limonciello Date: Sun Nov 5 21:34:34 2017 -0600 platform/x86: dell-smbios-wmi: release mutex lock on WMI call failure Unbound devices may race with calling this function causing the mutex to stay locked. This failure mode should have released the mutex too. Signed-off-by: Mario Limonciello Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-smbios-wmi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 5e3e22971fb0b0d7d03286f1a619d0348748a243 Author: Mario Limonciello Date: Sun Nov 5 21:34:33 2017 -0600 platform/x86: wmi: release mutex on module acquistion failure This failure mode should have also released the mutex. Signed-off-by: Mario Limonciello Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 54d11736ec3179954b6cdea4b4e1136d6bb39f39 Author: Arnd Bergmann Date: Wed Nov 8 13:08:39 2017 +0100 platform/x86: dell-smbios: fix string overflow The new sysfs code overwrites two fixed-length character arrays that are each one byte shorter than they need to be, to hold the trailing \0: drivers/platform/x86/dell-smbios.c: In function 'build_tokens_sysfs': drivers/platform/x86/dell-smbios.c:494:42: error: 'sprintf' writing a terminating nul past the end of the destination [-Werror=format-overflow=] sprintf(buffer_location, "%04x_location", drivers/platform/x86/dell-smbios.c:494:3: note: 'sprintf' output 14 bytes into a destination of size 13 drivers/platform/x86/dell-smbios.c:506:36: error: 'sprintf' writing a terminating nul past the end of the destination [-Werror=format-overflow=] sprintf(buffer_value, "%04x_value", drivers/platform/x86/dell-smbios.c:506:3: note: 'sprintf' output 11 bytes into a destination of size 10 This changes it to just use kasprintf(), which always gets it right. Discovered with gcc-7.1.1 with the following commit reverted: bd664f6b3e disable new gcc-7.1.1 warnings for now Fixes: 33b9ca1e53b4 ("platform/x86: dell-smbios: Add a sysfs interface for SMBIOS tokens") Signed-off-by: Arnd Bergmann Acked-by: Mario Limonciello [dvhart: add subject prefix and reproducer details for context] Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-smbios.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit c0f3ea1589394deac2d840c685f57c69e4ac4243 Author: Linus Torvalds Date: Wed Nov 8 12:51:04 2017 -0800 stop using '%pK' for /proc/kallsyms pointer values Not only is it annoying to have one single flag for all pointers, as if that was a global choice and all kernel pointers are the same, but %pK can't get the 'access' vs 'open' time check right anyway. So make the /proc/kallsyms pointer value code use logic specific to that particular file. We do continue to honor kptr_restrict, but the default (which is unrestricted) is changed to instead take expected users into account, and restrict access by default. Right now the only actual expected user is kernel profiling, which has a separate sysctl flag for kernel profile access. There may be others. Signed-off-by: Linus Torvalds kernel/kallsyms.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) commit a405f191f42ead45a03c000110a16683d30f7333 Author: Changbin Du Date: Tue Nov 7 18:26:53 2017 -0600 PCI: Fail pci_map_rom() if the option ROM is invalid If we detect a invalid PCI option ROM (e.g., invalid ROM header signature), we should unmap it immediately and fail. It doesn't make any sense to return a mapped area with size of 0. I have seen this case on Intel GVTg vGPU, which has no VBIOS. It will not cause a real problem, but we should skip it as early as possible. Signed-off-by: Changbin Du [bhelgaas: split non-functional change into separate patch] Signed-off-by: Bjorn Helgaas drivers/pci/rom.c | 5 +++++ 1 file changed, 5 insertions(+) commit a48a687d8cdf9a51a6283cc91f9637403b221ed3 Author: Changbin Du Date: Tue Nov 7 18:22:26 2017 -0600 PCI: Move pci_map_rom() error path Move pci_map_rom() error code to the end to prepare for adding another error path. No functional change intended. Signed-off-by: Changbin Du [bhelgaas: split non-functional change into separate patch] Signed-off-by: Bjorn Helgaas drivers/pci/rom.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit ec47873e1f29223d949aab69f7820c09f1b65f9d Author: Linus Walleij Date: Wed Nov 8 21:40:41 2017 +0100 gpio: Fix undefined lock_dep_class The struct is wrong, this is named lock_class_key. Cc: Thierry Reding Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5729f86a2987c9404f9b2fb494b9a6fc4412baf Author: Thiago Jung Bauermann Date: Tue Oct 17 22:53:14 2017 -0200 ima: Remove redundant conditional operator A non-zero value is converted to 1 when assigned to a bool variable, so the conditional operator in is_ima_appraise_enabled is redundant. The value of a comparison operator is either 1 or 0 so the conditional operator in ima_inode_setxattr is redundant as well. Confirmed that the patch is correct by comparing the object file from before and after the patch. They are identical. Signed-off-by: Thiago Jung Bauermann Signed-off-by: Mimi Zohar security/integrity/ima/ima_appraise.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 39adb92598a7466e00f72bb8a197d8811017418a Author: Thomas Meyer Date: Sat Oct 7 16:02:21 2017 +0200 ima: Fix bool initialization/comparison Bool initializations should use true and false. Bool tests don't need comparisons. Signed-off-by: Thomas Meyer Signed-off-by: Mimi Zohar security/integrity/ima/ima_fs.c | 2 +- security/integrity/ima/ima_policy.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 7c9bc0983f890ed9782e755a0e070930cd979333 Author: Bruno E. O. Meneguele Date: Tue Oct 24 15:37:01 2017 -0200 ima: check signature enforcement against cmdline param instead of CONFIG When the user requests MODULE_CHECK policy and its kernel is compiled with CONFIG_MODULE_SIG_FORCE not set, all modules would not load, just those loaded in initram time. One option the user would have would be set a kernel cmdline param (module.sig_enforce) to true, but the IMA module check code doesn't rely on this value, it checks just CONFIG_MODULE_SIG_FORCE. This patch solves this problem checking for the exported value of module.sig_enforce cmdline param intead of CONFIG_MODULE_SIG_FORCE, which holds the effective value (CONFIG || param). Signed-off-by: Bruno E. O. Meneguele Signed-off-by: Mimi Zohar security/integrity/ima/ima_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fda784e50aace694ec2e4e16e2de07b91a938563 Author: Bruno E. O. Meneguele Date: Tue Oct 24 15:37:00 2017 -0200 module: export module signature enforcement status A static variable sig_enforce is used as status var to indicate the real value of CONFIG_MODULE_SIG_FORCE, once this one is set the var will hold true, but if the CONFIG is not set the status var will hold whatever value is present in the module.sig_enforce kernel cmdline param: true when =1 and false when =0 or not present. Considering this cmdline param take place over the CONFIG value when it's not set, other places in the kernel could misbehave since they would have only the CONFIG_MODULE_SIG_FORCE value to rely on. Exporting this status var allows the kernel to rely in the effective value of module signature enforcement, being it from CONFIG value or cmdline param. Signed-off-by: Bruno E. O. Meneguele Signed-off-by: Mimi Zohar include/linux/module.h | 7 +++++++ kernel/module.c | 10 ++++++++++ 2 files changed, 17 insertions(+) commit ebe7c0a7be92bbd34c6ff5b55810546a0ee05bee Author: Boshi Wang Date: Fri Oct 20 16:01:03 2017 +0800 ima: fix hash algorithm initialization The hash_setup function always sets the hash_setup_done flag, even when the hash algorithm is invalid. This prevents the default hash algorithm defined as CONFIG_IMA_DEFAULT_HASH from being used. This patch sets hash_setup_done flag only for valid hash algorithms. Fixes: e7a2ad7eb6f4 "ima: enable support for larger default filedata hash algorithms" Signed-off-by: Boshi Wang Signed-off-by: Mimi Zohar security/integrity/ima/ima_main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0485d066d82c308e28e76b7fc6cdec46ae46eeb6 Author: Matthew Garrett Date: Wed Oct 11 12:11:12 2017 -0700 EVM: Only complain about a missing HMAC key once A system can validate EVM digital signatures without requiring an HMAC key, but every EVM validation will generate a kernel error. Change this so we only generate an error once. Signed-off-by: Matthew Garrett Signed-off-by: Mimi Zohar security/integrity/evm/evm_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f00d79750712511d0a83c108eea0d44b680a915f Author: Matthew Garrett Date: Wed Oct 11 12:10:14 2017 -0700 EVM: Allow userspace to signal an RSA key has been loaded EVM will only perform validation once a key has been loaded. This key may either be a symmetric trusted key (for HMAC validation and creation) or the public half of an asymmetric key (for digital signature validation). The /sys/kernel/security/evm interface allows userland to signal that a symmetric key has been loaded, but does not allow userland to signal that an asymmetric public key has been loaded. This patch extends the interface to permit userspace to pass a bitmask of loaded key types. It also allows userspace to block loading of a symmetric key in order to avoid a compromised system from being able to load an additional key type later. Signed-off-by: Matthew Garrett Signed-off-by: Mimi Zohar Documentation/ABI/testing/evm | 47 ++++++++++++++++++++++++++------------ security/integrity/evm/evm.h | 3 +++ security/integrity/evm/evm_secfs.c | 29 +++++++++++++---------- 3 files changed, 53 insertions(+), 26 deletions(-) commit 096b85464832d2a7bd7bd6d4db2fafed2ab77244 Author: Matthew Garrett Date: Fri Oct 13 15:09:25 2017 -0700 EVM: Include security.apparmor in EVM measurements Apparmor will be gaining support for security.apparmor labels, and it would be helpful to include these in EVM validation now so appropriate signatures can be generated even before full support is merged. Signed-off-by: Matthew Garrett Acked-by: John Johansen Signed-off-by: Mimi Zohar include/uapi/linux/xattr.h | 3 +++ security/integrity/evm/evm_main.c | 3 +++ 2 files changed, 6 insertions(+) commit bb02b186d02f90f693bc573c392df843b024f4ef Author: Mimi Zohar Date: Wed Jun 21 21:13:18 2017 -0400 ima: call ima_file_free() prior to calling fasync The file hash is calculated and written out as an xattr after calling fasync(). In order for the file data and metadata to be written out to disk at the same time, this patch calculates the file hash and stores it as an xattr before calling fasync. Signed-off-by: Mimi Zohar fs/file_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7d3d0392a325d630225b7dbccf2558f944114e5 Author: Christoph Hellwig Date: Sun Sep 10 09:49:45 2017 +0200 integrity: use kernel_read_file_from_path() to read x509 certs The CONFIG_IMA_LOAD_X509 and CONFIG_EVM_LOAD_X509 options permit loading x509 signed certificates onto the trusted keyrings without verifying the x509 certificate file's signature. This patch replaces the call to the integrity_read_file() specific function with the common kernel_read_file_from_path() function. To avoid verifying the file signature, this patch defines READING_X509_CERTFICATE. Signed-off-by: Christoph Hellwig Signed-off-by: Mimi Zohar include/linux/fs.h | 1 + security/integrity/digsig.c | 14 +++++++---- security/integrity/iint.c | 49 --------------------------------------- security/integrity/ima/ima_main.c | 4 ++++ security/integrity/integrity.h | 2 -- 5 files changed, 14 insertions(+), 56 deletions(-) commit f3cc6b25dcc5616f0d5c720009b2ac66f97df2ff Author: Mimi Zohar Date: Sat Jun 17 23:56:23 2017 -0400 ima: always measure and audit files in policy All files matching a "measure" rule must be included in the IMA measurement list, even when the file hash cannot be calculated. Similarly, all files matching an "audit" rule must be audited, even when the file hash can not be calculated. The file data hash field contained in the IMA measurement list template data will contain 0's instead of the actual file hash digest. Note: In general, adding, deleting or in anyway changing which files are included in the IMA measurement list is not a good idea, as it might result in not being able to unseal trusted keys sealed to a specific TPM PCR value. This patch not only adds file measurements that were not previously measured, but specifies that the file hash value for these files will be 0's. As the IMA measurement list ordering is not consistent from one boot to the next, it is unlikely that anyone is sealing keys based on the IMA measurement list. Remote attestation servers should be able to process these new measurement records, but might complain about these unknown records. Signed-off-by: Mimi Zohar Reviewed-by: Dmitry Kasatkin security/integrity/ima/ima_api.c | 67 +++++++++++++++++++++++-------------- security/integrity/ima/ima_crypto.c | 10 ++++++ security/integrity/ima/ima_main.c | 9 +++-- 3 files changed, 56 insertions(+), 30 deletions(-) commit 2068626d1345f23fd2b926d834d4f74b37cd7134 Author: Mimi Zohar Date: Tue Jun 27 16:10:39 2017 -0400 ima: don't remove the securityfs policy file The securityfs policy file is removed unless additional rules can be appended to the IMA policy (CONFIG_IMA_WRITE_POLICY), regardless as to whether the policy is configured so that it can be displayed. This patch changes this behavior, removing the securityfs policy file, only if CONFIG_IMA_READ_POLICY is also not enabled. Signed-off-by: Mimi Zohar security/integrity/ima/ima_fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 46cdc6d533c925c7477feea7caa404466bac7ac8 Author: Mimi Zohar Date: Sat Oct 7 22:12:48 2017 -0400 vfs: fix mounting a filesystem with i_version The mount i_version flag is not enabled in the new sb_flags. This patch adds the missing SB_I_VERSION flag. Fixes: e462ec5 "VFS: Differentiate mount flags (MS_*) from internal superblock flags" Cc: David Howells Cc: Al Viro Signed-off-by: Mimi Zohar fs/namespace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 02196144a0a0ad71fb75bd4a5a4785ab36c3b78e Merge: 7f3d1f9 fe9c058 Author: Russell King Date: Wed Nov 8 19:42:47 2017 +0000 Merge branch 'devel-stable' into for-next commit 7f3d1f984336377074ebf804ff53869ef1906fbe Merge: b9dd05c 2a14b80 de854b3 Author: Russell King Date: Wed Nov 8 19:42:43 2017 +0000 Merge branches 'fixes', 'misc' and 'sa1111-for-next' into for-next commit 1c0a7de226660b0306b54aaf2cb52312e74723eb Author: Subhransu S. Prusty Date: Tue Nov 7 16:16:26 2017 +0530 ASoC: hdac_hdmi: Fix possible memory leak on parse and map nid failure During failure, widgets in cvt_list and pin_list are not freed. So fix the possible memory leak by freeing them when failure occurs. Signed-off-by: Subhransu S. Prusty Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) commit eb50fa1739a63cc4b202b40a62d71055a2d7b80c Author: Subhransu S. Prusty Date: Tue Nov 7 16:16:25 2017 +0530 ASoC: hdac_hdmi: Fix possible NULL pointer dereference Pointers hdac_hdmi_pcm and hda_device_id can be NULL, so add check for valid pointer to avoid NULL pointer dereference. Signed-off-by: Subhransu S. Prusty Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 70e97a2d9c5266487dfec4cade28f8e587927f04 Author: Subhransu S. Prusty Date: Tue Nov 7 16:16:24 2017 +0530 ASoC: hdac_hdmi: Fix static checker warning for sprintf usage Use snprintf instead of sprintf to shut the warning. Signed-off-by: Subhransu S. Prusty Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/hdac_hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d956147473ec1843c2660a89ef0fba80b66c6657 Author: Sriram Periyasamy Date: Tue Nov 7 16:16:23 2017 +0530 ASoC: Intel: Skylake: Add dynamic module id support Module id is a property of firmware manifest and can vary between platforms so use the uuid instead of module id for pins. Signed-off-by: Sriram Periyasamy Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit 22ebd6666efd8663a06715a052f74b6a7e904dc3 Author: Sriram Periyasamy Date: Tue Nov 7 16:16:22 2017 +0530 ASoC: Intel: Skylake: Optimize UUID handling to fill pin info Modify skl_tplg_get_uuid() to copy just UUID rather than only for module UUID and skl_tplg_fill_pin() to fill the pin info which can include UUID token also. Signed-off-by: Sriram Periyasamy Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 46 +++++++++++++++++----------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit 3b47c9dc75be097bc0e2f3ac4b176fbf3eed85f2 Author: Pankaj Bharadiya Date: Tue Nov 7 16:16:21 2017 +0530 ASoC: Intel: Skylake: Check for NHLT ACPI header signature In certain buggy BIOS acpi_evaluate_dsm() may not return the correct NHLT table, so check the NHLT table header signature before accessing it. Signed-off-by: Pankaj Bharadiya Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-nhlt.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit f8e066521192c7debe59127d90abbe2773577e25 Author: Pankaj Bharadiya Date: Tue Nov 7 16:16:19 2017 +0530 ASoC: Intel: Skylake: Fix uuid_module memory leak in failure case In the loop that adds the uuid_module to the uuid_list list, allocated memory is not properly freed in the error path free uuid_list whenever any of the memory allocation in the loop fails to avoid memory leak. Signed-off-by: Pankaj Bharadiya Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-sst-utils.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 0265ddd7b713bd8b68a9ec451761bcb87bbac4b3 Author: Pankaj Bharadiya Date: Tue Nov 7 16:16:18 2017 +0530 ASoC: Intel: Skylake: Fix potential NULL pointer dereference Pointer 'mconfig' returned from call to skl_tplg_fe_get_cpr_module() can be NULL. So check for the valid pointer before dereferencing. Signed-off-by: Pankaj Bharadiya Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit da3417fe1f6d54c864b05fd5710979bdffe78034 Author: Guneshwor Singh Date: Tue Nov 7 16:16:17 2017 +0530 ASoC: Intel: Skylake: Add channel map in updown mixer module IPC DSP expects channel map to be sent in the IPC for updown mixer module. So add ch_map info in updown mixer module config. Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 1 + sound/soc/intel/skylake/skl-topology.h | 1 + 2 files changed, 2 insertions(+) commit 3e1b96c80f1a73594b2123173c551bb0fc829b21 Author: Guneshwor Singh Date: Tue Nov 7 16:16:16 2017 +0530 ASoC: Intel: Skylake: Fix updown mixer module format DSP expects length of the coefficient for updown mixer module to be 8. So fix the max coefficient length and since we are using default values for coefficient select which is zero, we need not explicitly initialize it. Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 8 -------- sound/soc/intel/skylake/skl-topology.h | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) commit 18c1bf35c1c09bca05cf70bc984a4764e0b0372b Author: Maxime Ripard Date: Wed Nov 8 16:47:10 2017 +0100 ASoC: sun8i-codec: Fix left and right channels inversion Since its introduction, the codec had an inversion of the left and right channels. It turned out to be pretty simple as it appears that the codec doesn't have the same polarity on the LRCK signal than the I2S block. Fix this by inverting our bit value for the LRCK inversion. Fixes: 36c684936fae ("ASoC: Add sun8i digital audio codec") Cc: Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Signed-off-by: Mark Brown sound/soc/sunxi/sun8i-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdd2a858afd55cc11723df9dd2841241a4c49ce5 Author: Akshu Agrawal Date: Wed Nov 8 12:24:02 2017 -0500 ASoC: amd: Make the driver name consistent across files This fixes the issue of driver not getting auto loaded with MODULE_ALIAS. find /sys/devices -name modalias -print0 | xargs -0 grep 'audio' /sys/devices/pci0000:00/0000:00:01.0/acp_audio_dma.0.auto/modalias:platform:acp_audio_dma TEST=boot and check for device in lsmod [Removed yet more ChromeOS crap from the changelog -- broonie] Signed-off-by: Akshu Agrawal Tested-by: Jason Clinton Reviewed-by: Jason Clinton Signed-off-by: Alex Deucher Signed-off-by: Mark Brown sound/soc/amd/Makefile | 4 ++-- sound/soc/amd/acp-pcm-dma.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 560bfe774f058e97596f30ff71cffdac52b72914 Author: Maxime Ripard Date: Wed Nov 8 16:47:08 2017 +0100 ASoC: sun8i-codec: Invert Master / Slave condition The current code had the condition backward when checking if the codec should be running in slave or master mode. Fix it, and make the comment a bit more readable. Fixes: 36c684936fae ("ASoC: Add sun8i digital audio codec") Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Signed-off-by: Mark Brown Cc: sound/soc/sunxi/sun8i-codec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 960115b842886999a64a87d8baadb81dce4293b4 Author: Arnd Bergmann Date: Wed Nov 8 14:03:20 2017 +0100 ASoC: Intel: improve SND_SOC_INTEL_MACH dependencies I ran into a build error with CONFIG_SND_SOC_INTEL_COMMON=m and SND_SOC_INTEL_MACH=y: ERROR: "snd_soc_acpi_intel_broadwell_machines" [sound/soc/intel/common/snd-soc-sst-acpi.ko] undefined! ERROR: "snd_soc_acpi_intel_haswell_machines" [sound/soc/intel/common/snd-soc-sst-acpi.ko] undefined! ERROR: "snd_soc_acpi_intel_cherrytrail_machines" [sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined! ERROR: "snd_soc_acpi_intel_baytrail_machines" [sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined! The problem here is that the sound/soc/intel/common/ directory is then entered only for building modules, but the sst-acpi.o never gets built since it depends on a built-in Kconfig symbol. That configuration obviously makes no sense since all options below SND_SOC_INTEL_MACH also depend on something else that in turn depends on CONFIG_SND_SOC_INTEL_COMMON. Adding a SND_SOC_INTEL_SST_TOPLEVEL dependency to SND_SOC_INTEL_MACH solves the build error. I notice we can also consolidate the 'depends on SND_SOC_INTEL_MACH' lines by using an 'if' block to simplify it further and make sure the configuration stays sane. Signed-off-by: Arnd Bergmann Acked-By: Vinod Koul Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/Kconfig | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) commit 326c4aa27a801918136df15d507f74968c7093fb Author: Arnd Bergmann Date: Wed Nov 8 14:03:19 2017 +0100 ASoC: Intel: improve DMADEVICES dependency As pointed out by Pierre-Louis Bossart, the dependency I added was broader than necessary, only Baytrail and Haswell/Broadwell actually need it, the others don't. At the same time, we have individual entries for the codecs that all have the 'select' statement but now don't need it any more. Fixes: f7a88db6fffd ("ASoC: Intel: fix Kconfig dependencies") Signed-off-by: Arnd Bergmann Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 3 ++- sound/soc/intel/boards/Kconfig | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) commit 4670269faba728683f7250319a65390946c028e3 Author: Arvind Yadav Date: Fri Jun 30 15:03:23 2017 +0530 eCryptfs: 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 6122 636 24 6782 1a7e fs/ecryptfs/main.o File size After adding 'const': text data bss dec hex filename 6186 604 24 6814 1a9e fs/ecryptfs/main.o Signed-off-by: Arvind Yadav Signed-off-by: Tyler Hicks fs/ecryptfs/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74ce1896c6c65b2f8cccbf59162d542988835835 Author: Masahiro Yamada Date: Thu Nov 2 11:51:25 2017 +0900 kbuild: clean up *.dtb and *.dtb.S patterns from top-level Makefile We need to add "clean-files" in Makfiles to clean up DT blobs, but we often miss to do so. Since there are no source files that end with .dtb or .dtb.S, so we can clean-up those files from the top-level Makefile. Signed-off-by: Masahiro Yamada Acked-by: Arnd Bergmann Signed-off-by: Rob Herring Documentation/kbuild/makefiles.txt | 1 - Makefile | 2 +- arch/arc/boot/dts/Makefile | 1 - arch/arm/boot/dts/Makefile | 1 - arch/arm64/boot/dts/actions/Makefile | 1 - arch/arm64/boot/dts/al/Makefile | 1 - arch/arm64/boot/dts/allwinner/Makefile | 1 - arch/arm64/boot/dts/altera/Makefile | 1 - arch/arm64/boot/dts/amd/Makefile | 1 - arch/arm64/boot/dts/amlogic/Makefile | 1 - arch/arm64/boot/dts/apm/Makefile | 1 - arch/arm64/boot/dts/arm/Makefile | 1 - arch/arm64/boot/dts/broadcom/Makefile | 1 - arch/arm64/boot/dts/broadcom/northstar2/Makefile | 1 - arch/arm64/boot/dts/broadcom/stingray/Makefile | 1 - arch/arm64/boot/dts/cavium/Makefile | 1 - arch/arm64/boot/dts/exynos/Makefile | 1 - arch/arm64/boot/dts/freescale/Makefile | 1 - arch/arm64/boot/dts/hisilicon/Makefile | 1 - arch/arm64/boot/dts/lg/Makefile | 1 - arch/arm64/boot/dts/marvell/Makefile | 1 - arch/arm64/boot/dts/mediatek/Makefile | 1 - arch/arm64/boot/dts/nvidia/Makefile | 1 - arch/arm64/boot/dts/qcom/Makefile | 1 - arch/arm64/boot/dts/realtek/Makefile | 1 - arch/arm64/boot/dts/renesas/Makefile | 1 - arch/arm64/boot/dts/rockchip/Makefile | 1 - arch/arm64/boot/dts/socionext/Makefile | 1 - arch/arm64/boot/dts/sprd/Makefile | 1 - arch/arm64/boot/dts/xilinx/Makefile | 1 - arch/arm64/boot/dts/zte/Makefile | 1 - arch/c6x/boot/dts/Makefile | 2 -- arch/cris/boot/dts/Makefile | 2 -- arch/h8300/boot/dts/Makefile | 1 - arch/metag/boot/dts/Makefile | 1 - arch/microblaze/boot/Makefile | 2 +- arch/mips/boot/dts/Makefile | 1 - arch/mips/boot/dts/brcm/Makefile | 1 - arch/mips/boot/dts/cavium-octeon/Makefile | 1 - arch/mips/boot/dts/img/Makefile | 1 - arch/mips/boot/dts/ingenic/Makefile | 1 - arch/mips/boot/dts/lantiq/Makefile | 1 - arch/mips/boot/dts/mti/Makefile | 1 - arch/mips/boot/dts/netlogic/Makefile | 1 - arch/mips/boot/dts/ni/Makefile | 1 - arch/mips/boot/dts/pic32/Makefile | 1 - arch/mips/boot/dts/qca/Makefile | 1 - arch/mips/boot/dts/ralink/Makefile | 1 - arch/mips/boot/dts/xilfpga/Makefile | 1 - arch/nios2/boot/Makefile | 2 -- arch/openrisc/boot/dts/Makefile | 2 -- arch/powerpc/boot/Makefile | 2 +- arch/sh/boot/dts/Makefile | 2 -- arch/xtensa/boot/dts/Makefile | 2 -- 54 files changed, 3 insertions(+), 60 deletions(-) commit 10b62a2f785ab55857380f0c63d9fa468fd8c676 Author: Masahiro Yamada Date: Tue Oct 31 00:33:46 2017 +0900 .gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignore Most of DT files are compiled under arch/*/boot/dts/, but we have some other directories, like drivers/of/unittest-data/. We often miss to add gitignore patterns per directory. Since there are no source files that end with .dtb or .dtb.S, we can ignore the patterns globally. Signed-off-by: Masahiro Yamada Signed-off-by: Rob Herring .gitignore | 2 ++ arch/arc/boot/.gitignore | 1 - arch/arm/boot/.gitignore | 1 - arch/arm64/boot/dts/.gitignore | 1 - arch/metag/boot/.gitignore | 1 - arch/microblaze/boot/.gitignore | 1 - arch/mips/boot/.gitignore | 1 - arch/nios2/boot/.gitignore | 1 - arch/powerpc/boot/.gitignore | 1 - arch/xtensa/boot/.gitignore | 1 - drivers/of/unittest-data/.gitignore | 2 -- 11 files changed, 2 insertions(+), 11 deletions(-) commit 1377dd3e29878b8f5d9f5c9000975f50a428a0cd Author: Masahiro Yamada Date: Tue Oct 31 00:33:45 2017 +0900 .gitignore: sort normal pattern rules alphabetically We are having more and more ignore patterns. Sort the list alphabetically. We will easily catch duplicated patterns if any. Signed-off-by: Masahiro Yamada Signed-off-by: Rob Herring .gitignore | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit 41cb3301c04d7f0b046ed296a34ef261c456dde8 Author: Vishal Verma Date: Tue Nov 7 15:48:21 2017 -0700 tools/testing/nvdimm: stricter bounds checking for error injection commands Ensure that the in/out sizes passed in the nd_cmd_package are sane for the fixed output size commands (i.e. inject error and clear injected error). Reported-by: Dariusz Dokupil Signed-off-by: Vishal Verma Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 61add8147942d23519b91f0edc30980d7c14482c Author: Vijendar Mukunda Date: Fri Nov 3 16:35:43 2017 -0400 ASoC: amd: Report accurate hw_ptr during dma Using hw register to read transmitted byte count and report accordingly the hw pointer. TEST= modprobe snd-soc-acp-pcm.ko modprobe snd-soc-acp-rt5645.ko aplay Signed-off-by: Vijendar Mukunda Signed-off-by: Akshu Agrawal Tested-by: Akshu Agrawal Reviewed-by: Jason Clinton Signed-off-by: Alex Deucher Signed-off-by: Mark Brown sound/soc/amd/acp-pcm-dma.c | 71 ++++++++++++++++++++++++++++----------------- sound/soc/amd/acp.h | 10 +++++++ 2 files changed, 55 insertions(+), 26 deletions(-) commit f0d438e4fb35244efc035a0c55ef876cc75a0abb Merge: 6d6ab94 a2b8313 Author: Radim Krčmář Date: Wed Nov 8 15:28:34 2017 +0100 Merge tag 'kvm-arm-for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into next KVM/ARM Changes for v4.15 Changes include: - Optimized arch timer handling for KVM/ARM - Improvements to the VGIC ITS code and introduction of an ITS reset ioctl - Unification of the 32-bit fault injection logic - More exact external abort matching logic commit 288e7560e4d3e259aa28f8f58a8dfe63627a1bf6 Author: Peter Ujfalusi Date: Wed Nov 8 12:02:25 2017 +0200 dmaengine: ti-dma-crossbar: Correct am335x/am43xx mux value type The used 0x1f mask is only valid for am335x family of SoC, different family using this type of crossbar might have different number of electable events. In case of am43xx family 0x3f mask should have been used for example. Instead of trying to handle each family's mask, just use u8 type to store the mux value since the event offsets are aligned to byte offset. Fixes: 42dbdcc6bf965 ("dmaengine: ti-dma-crossbar: Add support for crossbar on AM33xx/AM43xx") Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/ti-dma-crossbar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 52847bb79b524c6f6c177d3247e824ad7487b31c Author: Colin Ian King Date: Wed Nov 8 13:00:30 2017 +0000 xen/privcmd: remove unused variable pageidx Variable pageidx is assigned a value but it is never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/xen/privcmd.c:199:2: warning: Value stored to 'pageidx' is never read Signed-off-by: Colin Ian King Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/privcmd.c | 3 --- 1 file changed, 3 deletions(-) commit 408358b50deaf59b07c82a7bff8c7e7cce031fae Author: Jason J. Herne Date: Tue Nov 7 10:22:32 2017 -0500 s390: vfio-ccw: Do not attempt to free no-op, test and tic cda. Because we do not make use of the cda (channel data address) for test, no-op ccws no address translation takes place. This means cda could contain a guest address which we do not want to attempt to free. Let's check the command type and skip cda free when it is not needed. For a TIC ccw, ccw->cda points to either a ccw in an existing chain or it points to a whole new allocated chain. In either case the data will be freed when the owning chain is freed. Signed-off-by: Jason J. Herne Reviewed-by: Dong Jia Shi Reviewed-by: Pierre Morel Message-Id: <1510068152-21988-1-git-send-email-jjherne@linux.vnet.ibm.com> Reviewed-by: Halil Pasic Acked-by: Christian Borntraeger Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 2 ++ 1 file changed, 2 insertions(+) commit 57f5d648c45c3d40a3257c06629c14fd53c383bc Author: Arvind Yadav Date: Sun Oct 29 12:20:10 2017 +0530 tty: ehv_bytechan: fix spelling mistake Trivial fix to spelling mistakes "interupt" -> "interrupt". Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/tty/ehv_bytechan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f13d1a8a801dae552ef495c84a223280586a9f67 Author: Martyn Welch Date: Tue Oct 24 08:27:40 2017 +0200 VME: Return -EBUSY when DMA list in use The VME subsystem currently returns -EBUSY when trying to free a DMA resource that is busy, but returns -EINVAL when trying to free a DMA list that is in use. Switch to returning -EBUSY when trying to free a DMA list that is in use for consistency and correctness. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman drivers/vme/vme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f53459c00871a7c3db5b69b49d840ca9d497a695 Author: Alexey Khoroshilov Date: Sun Oct 22 01:03:44 2017 +0300 w1: keep balance of mutex locks and refcnts w1_therm_eeprom() and w1_DS18B20_precision() decrement THERM_REFCNT on error paths, while they did not increment it yet. read_therm() unlocks bus mutex on some error paths, while it is not acquired. The patch makes sure all the functions keep the balance in usage of the mutex and the THERM_REFCNT. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Greg Kroah-Hartman drivers/w1/slaves/w1_therm.c | 59 +++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 28 deletions(-) commit d4035a8c1ff7288af9e47d6d05384f14c9308ea1 Author: Martyn Welch Date: Mon Oct 23 12:37:16 2017 +0200 MAINTAINERS: Update VME subsystem tree. VME Subsystem lists driver-core repository as canonical tree. Greg has stated that char-misc should be used for submissions instead[1]. [1] https://lkml.org/lkml/2017/9/1/486 Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 959bc7b22bd25a3a907fbb9b26a1d0cbdf98ef40 Author: Thierry Reding Date: Tue Nov 7 19:15:59 2017 +0100 gpio: Automatically add lockdep keys In order to avoid lockdep boilerplate in individual drivers, turn the gpiochip_add_data() function into a macro that creates a unique class key for each driver. Note that this has the slight disadvantage of adding a key for each driver registered with the system. However, these keys are 8 bytes in size, which is negligible and a small price to pay for generic infrastructure. Suggested-by: Grygorii Strashko Signed-off-by: Thierry Reding Acked-by: Grygorii Strashko [renane __gpiochip_add_data() to gpiochip_add_data_with_key] Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 41 ++++++++++++----------------------------- include/linux/gpio/driver.h | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 30 deletions(-) commit b7fe57b802c4f12da20920229acb9fff92300ad4 Author: Icenowy Zheng Date: Tue Oct 24 10:54:34 2017 +0100 nvmem: sunxi-sid: add support for A64/H5's SID controller Allwinner A64/H5 SoCs come with a SID controller like the one in H3, but without the silicon bug that makes the initial value at 0x200 wrong, so the value at 0x200 can be directly read. Add support for this kind of SID controller. Signed-off-by: Icenowy Zheng Acked-by: Rob Herring Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt | 1 + drivers/nvmem/sunxi_sid.c | 6 ++++++ 2 files changed, 7 insertions(+) commit aef9a4de2afa25c02b1d112211ce29e6453ad210 Author: Bryan O'Donoghue Date: Tue Oct 24 10:54:33 2017 +0100 nvmem: imx-ocotp: Update module description This imx-ocotp driver encapsulates support for a subset of both i.MX6 and i.MX7 processors. Update the module description to reflect. Fixes: 711d45477931 ("nvmem: octop: Add i.MX7D support") Signed-off-by: Bryan O'Donoghue Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a32bab320fe1e9d5c4fd70f1d7ad92be46a9fcd3 Author: Bryan O'Donoghue Date: Tue Oct 24 10:54:32 2017 +0100 nvmem: imx-ocotp: Enable i.MX7D OTP write support After applying patches for both banked access and write timings we can re-enable the OTP write interface on i.MX7D processors. Fixes: 0642bac7da42 ("nvmem: imx-ocotp: add write support") Signed-off-by: Bryan O'Donoghue Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 2 -- 1 file changed, 2 deletions(-) commit 828ae7a47caf86570f19b78d0923b3ea89714168 Author: Bryan O'Donoghue Date: Tue Oct 24 10:54:31 2017 +0100 nvmem: imx-ocotp: Add i.MX7D timing write clock setup support This patch adds logic to correctly setup the write timing parameters when blowing an OTP fuse for the i.MX7S/D. Fixes: 0642bac7da42 ("nvmem: imx-ocotp: add write support") Signed-off-by: Bryan O'Donoghue Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) commit b50cb68f16ce393db040f755dcb26b9a246180c4 Author: Bryan O'Donoghue Date: Tue Oct 24 10:54:30 2017 +0100 nvmem: imx-ocotp: Move i.MX6 write clock setup to dedicated function The i.MX7S/D has a different set of timing requirements, as a pre-cursor to adding the i.MX7 timing parameters, move the i.MX6 stuff to a dedicated function. Fixes: 0642bac7da42 ("nvmem: imx-ocotp: add write support") Signed-off-by: Bryan O'Donoghue Reviewed-by: Philipp Zabel Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) commit ffd9115f6548c51d347489e76bfb7d10e728f43d Author: Bryan O'Donoghue Date: Tue Oct 24 10:54:29 2017 +0100 nvmem: imx-ocotp: Add support for banked OTP addressing The i.MX7S/D takes the bank address in the CTRLn.ADDR field and the data value in one of the DATAx {0, 1, 2, 3} register fields. The current write routine is based on writing the CTRLn.ADDR field and writing a single DATA register only. Fixes: 0642bac7da42 ("nvmem: imx-ocotp: add write support") Signed-off-by: Bryan O'Donoghue Reviewed-by: Philipp Zabel Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 68 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 4 deletions(-) commit e20d2b291ba2f5441fd4aacd746c21e60d48b559 Author: Bryan O'Donoghue Date: Tue Oct 24 10:54:28 2017 +0100 nvmem: imx-ocotp: Pass parameters via a struct It will be useful in later patches to know the register access mode and bit-shift to apply to a given input offset. Fixes: 0642bac7da42 ("nvmem: imx-ocotp: add write support") Signed-off-by: Bryan O'Donoghue Reviewed-by: Philipp Zabel Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 44 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) commit 9d6a8dab8d8b94975d7d78a7866053bd1c9444ca Author: Bryan O'Donoghue Date: Tue Oct 24 10:54:27 2017 +0100 nvmem: imx-ocotp: Restrict OTP write to IMX6 processors i.MX7S/D have a different scheme for addressing the OTP registers inside the OCOTP block. Currently it's possible to address the wrong OTP registers given the disparity between IMX6 and IMX7 OTP addressing. Since OTP programming is one-time destructive its important we restrict this interface ASAP. Fixes: 0642bac7da42 ("nvmem: imx-ocotp: add write support") Signed-off-by: Bryan O'Donoghue Acked-by: Philipp Zabel Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-ocotp.c | 2 ++ 1 file changed, 2 insertions(+) commit 71c5dd5002b11d240c9b0e4adc972903183000aa Author: Keiji Hayashibara Date: Tue Oct 24 10:54:26 2017 +0100 nvmem: uniphier: add UniPhier eFuse driver Add eFuse driver for Socionext UniPhier series SoC. Note that eFuse device is under soc-glue and this register implements as read only. Signed-off-by: Keiji Hayashibara Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/Kconfig | 11 +++++ drivers/nvmem/Makefile | 2 + drivers/nvmem/uniphier-efuse.c | 97 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+) commit 2a96c818f484bcc16f42a09b030a470f2b44df04 Author: Keiji Hayashibara Date: Tue Oct 24 10:54:25 2017 +0100 dt-bindings: nvmem: add description for UniPhier eFuse Add uniphier-efuse dt-bindings documentation. Signed-off-by: Keiji Hayashibara Acked-by: Rob Herring Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/nvmem/uniphier-efuse.txt | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 8302cf585288f75fd253f6b9a094d51ae371a3f3 Author: Thierry Reding Date: Tue Nov 7 19:15:58 2017 +0100 gpio: Introduce struct gpio_irq_chip.first Some GPIO chips cannot support sparse IRQ numbering and therefore need to manually allocate their interrupt descriptors statically. For these cases, a driver can pass the first allocated IRQ via the struct gpio_irq_chip's "first" field and thereby cause the IRQ domain to map all IRQs during initialization. Suggested-by: Grygorii Strashko Signed-off-by: Thierry Reding Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 3 ++- include/linux/gpio/driver.h | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) commit 60ed54cae8dc0f2d41cafbd477bbed6deb716615 Author: Thierry Reding Date: Tue Nov 7 19:15:57 2017 +0100 gpio: Disambiguate struct gpio_irq_chip.nested The nested field in struct gpio_irq_chip currently has two meanings. On one hand it marks an IRQ chip as being nested (as opposed to chained), while on the other hand it also means that an IRQ chip uses nested thread handlers. However, nested IRQ chips can already be identified by the fact that they don't pass a parent handler (the driver would instead already have installed a nested handler using request_irq()). Therefore, the only use for the nested attribute is to inform gpiolib that an IRQ chip uses nested thread handlers (as opposed to regular, non-threaded handlers). To clarify its purpose, rename the field to "threaded". Signed-off-by: Thierry Reding Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 24 ++++++++++-------------- include/linux/gpio/driver.h | 8 ++++---- 2 files changed, 14 insertions(+), 18 deletions(-) commit 5b2b135a87fcfb2b27c3c192fd7c3b053f0c5fa2 Author: Thierry Reding Date: Tue Nov 7 19:15:56 2017 +0100 gpio: Add Tegra186 support Tegra186 has two GPIO controllers that are largely register compatible between one another but are completely different from the controller found on earlier generations. Signed-off-by: Thierry Reding Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 9 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-tegra186.c | 623 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 633 insertions(+) commit 1b95b4eb567aab1cafcdcb14c60a7dd9d56236a9 Author: Thierry Reding Date: Tue Nov 7 19:15:55 2017 +0100 gpio: Export gpiochip_irq_{map,unmap}() Export these functions so that drivers can explicitly use these when setting up their IRQ domain. Signed-off-by: Thierry Reding Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 8 +++++--- include/linux/gpio/driver.h | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) commit e0d89728981393b7d694bd3419b7794b9882c92d Author: Thierry Reding Date: Tue Nov 7 19:15:54 2017 +0100 gpio: Implement tighter IRQ chip integration Currently GPIO drivers are required to add the GPIO chip and its corresponding IRQ chip separately, which can result in a lot of boilerplate. Use the newly introduced struct gpio_irq_chip, embedded in struct gpio_chip, that drivers can fill in if they want the GPIO core to automatically register the IRQ chip associated with a GPIO chip. Signed-off-by: Thierry Reding Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 108 +++++++++++++++++++++++++++++++++++++++++++- include/linux/gpio/driver.h | 7 +++ 2 files changed, 114 insertions(+), 1 deletion(-) commit ca9df053fb2bb2fcc64f37a1668321c7e19edd04 Author: Thierry Reding Date: Tue Nov 7 19:15:53 2017 +0100 gpio: Move lock_key into struct gpio_irq_chip In order to consolidate the multiple ways to associate an IRQ chip with a GPIO chip, move more fields into the new struct gpio_irq_chip. Signed-off-by: Thierry Reding Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 4 ++-- include/linux/gpio/driver.h | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) commit dc7b0387ee894c115ef5ddcaaf794125d6d9058c Author: Thierry Reding Date: Tue Nov 7 19:15:52 2017 +0100 gpio: Move irq_valid_mask into struct gpio_irq_chip In order to consolidate the multiple ways to associate an IRQ chip with a GPIO chip, move more fields into the new struct gpio_irq_chip. Signed-off-by: Thierry Reding Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij Documentation/gpio/driver.txt | 4 ++-- drivers/gpio/gpio-aspeed.c | 4 ++-- drivers/gpio/gpio-stmpe.c | 4 ++-- drivers/gpio/gpiolib.c | 16 ++++++++-------- drivers/pinctrl/intel/pinctrl-baytrail.c | 4 ++-- drivers/pinctrl/intel/pinctrl-cherryview.c | 4 ++-- drivers/platform/x86/intel_int0002_vgpio.c | 4 ++-- include/linux/gpio/driver.h | 21 +++++++++++++++------ 8 files changed, 35 insertions(+), 26 deletions(-) commit dc6bafee86897419b0908e8d1e52ef46ca0ea487 Author: Thierry Reding Date: Tue Nov 7 19:15:51 2017 +0100 gpio: Move irq_nested into struct gpio_irq_chip In order to consolidate the multiple ways to associate an IRQ chip with a GPIO chip, move more fields into the new struct gpio_irq_chip. Signed-off-by: Thierry Reding Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 8 ++++---- include/linux/gpio/driver.h | 9 +++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) commit 39e5f0969514fbfd6c235ac52586c72ca77cee00 Author: Thierry Reding Date: Tue Nov 7 19:15:50 2017 +0100 gpio: Move irq_chained_parent to struct gpio_irq_chip In order to consolidate the multiple ways to associate an IRQ chip with a GPIO chip, move more fields into the new struct gpio_irq_chip. Signed-off-by: Thierry Reding Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 17 ++++++++++++----- include/linux/gpio/driver.h | 19 +++++++++++++++---- 2 files changed, 27 insertions(+), 9 deletions(-) commit 3634eeb0fe9176e453c99834749dce21ea1305c1 Author: Thierry Reding Date: Tue Nov 7 19:15:49 2017 +0100 gpio: Move irq_default_type to struct gpio_irq_chip In order to consolidate the multiple ways to associate an IRQ chip with a GPIO chip, move more fields into the new struct gpio_irq_chip. Signed-off-by: Thierry Reding Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 6 +++--- include/linux/gpio/driver.h | 11 ++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) commit c7a0aa59524c5bb20bebaca360f7c5faaec6b806 Author: Thierry Reding Date: Tue Nov 7 19:15:48 2017 +0100 gpio: Move irq_handler to struct gpio_irq_chip In order to consolidate the multiple ways to associate an IRQ chip with a GPIO chip, move more fields into the new struct gpio_irq_chip. Signed-off-by: Thierry Reding Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 4 ++-- include/linux/gpio/driver.h | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) commit f0fbe7bce733561b76a5b55c5f4625888acd3792 Author: Thierry Reding Date: Tue Nov 7 19:15:47 2017 +0100 gpio: Move irqdomain into struct gpio_irq_chip In order to consolidate the multiple ways to associate an IRQ chip with a GPIO chip, move more fields into the new struct gpio_irq_chip. Signed-off-by: Thierry Reding Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij Documentation/gpio/driver.txt | 2 +- drivers/bcma/driver_gpio.c | 2 +- drivers/gpio/gpio-104-dio-48e.c | 2 +- drivers/gpio/gpio-104-idi-48.c | 2 +- drivers/gpio/gpio-104-idio-16.c | 2 +- drivers/gpio/gpio-adnp.c | 2 +- drivers/gpio/gpio-altera.c | 4 ++-- drivers/gpio/gpio-aspeed.c | 2 +- drivers/gpio/gpio-ath79.c | 2 +- drivers/gpio/gpio-crystalcove.c | 2 +- drivers/gpio/gpio-dln2.c | 2 +- drivers/gpio/gpio-ftgpio010.c | 2 +- drivers/gpio/gpio-ingenic.c | 2 +- drivers/gpio/gpio-intel-mid.c | 2 +- drivers/gpio/gpio-lynxpoint.c | 2 +- drivers/gpio/gpio-max732x.c | 2 +- drivers/gpio/gpio-merrifield.c | 2 +- drivers/gpio/gpio-omap.c | 2 +- drivers/gpio/gpio-pca953x.c | 2 +- drivers/gpio/gpio-pcf857x.c | 2 +- drivers/gpio/gpio-pci-idio-16.c | 2 +- drivers/gpio/gpio-pl061.c | 2 +- drivers/gpio/gpio-rcar.c | 2 +- drivers/gpio/gpio-reg.c | 4 ++-- drivers/gpio/gpio-stmpe.c | 2 +- drivers/gpio/gpio-tc3589x.c | 2 +- drivers/gpio/gpio-vf610.c | 2 +- drivers/gpio/gpio-wcove.c | 2 +- drivers/gpio/gpio-ws16c48.c | 2 +- drivers/gpio/gpio-xgene-sb.c | 2 +- drivers/gpio/gpio-xlp.c | 2 +- drivers/gpio/gpio-zx.c | 2 +- drivers/gpio/gpio-zynq.c | 2 +- drivers/gpio/gpiolib.c | 22 ++++++++++++---------- drivers/pinctrl/bcm/pinctrl-bcm2835.c | 4 ++-- drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 2 +- drivers/pinctrl/intel/pinctrl-baytrail.c | 2 +- drivers/pinctrl/intel/pinctrl-cherryview.c | 2 +- drivers/pinctrl/intel/pinctrl-intel.c | 2 +- drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 2 +- drivers/pinctrl/nomadik/pinctrl-nomadik.c | 4 ++-- drivers/pinctrl/pinctrl-amd.c | 2 +- drivers/pinctrl/pinctrl-at91.c | 2 +- drivers/pinctrl/pinctrl-coh901.c | 2 +- drivers/pinctrl/pinctrl-mcp23s08.c | 2 +- drivers/pinctrl/pinctrl-oxnas.c | 2 +- drivers/pinctrl/pinctrl-pic32.c | 2 +- drivers/pinctrl/pinctrl-pistachio.c | 2 +- drivers/pinctrl/pinctrl-st.c | 2 +- drivers/pinctrl/pinctrl-sx150x.c | 2 +- drivers/pinctrl/qcom/pinctrl-msm.c | 2 +- drivers/pinctrl/sirf/pinctrl-atlas7.c | 2 +- drivers/pinctrl/sirf/pinctrl-sirf.c | 2 +- drivers/pinctrl/spear/pinctrl-plgpio.c | 2 +- drivers/platform/x86/intel_int0002_vgpio.c | 2 +- include/linux/gpio/driver.h | 11 ++++++++--- 56 files changed, 78 insertions(+), 71 deletions(-) commit da80ff81a8f54611b834d73149f8ac0d59151c87 Author: Thierry Reding Date: Tue Nov 7 19:15:46 2017 +0100 gpio: Move irqchip into struct gpio_irq_chip In order to consolidate the multiple ways to associate an IRQ chip with a GPIO chip, move more fields into the new struct gpio_irq_chip. Signed-off-by: Thierry Reding Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 14 +++++++------- include/linux/gpio/driver.h | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 9 deletions(-) commit c44eafd79be666e7c81d22e215c945b27f2785f7 Author: Thierry Reding Date: Tue Nov 7 19:15:45 2017 +0100 gpio: Introduce struct gpio_irq_chip This new structure will be used to group all fields related to interrupt handling in a GPIO chip. Doing so will properly namespace these fields and make it easier to distinguish which fields are used for IRQ support. Signed-off-by: Thierry Reding Acked-by: Grygorii Strashko Signed-off-by: Linus Walleij include/linux/gpio/driver.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 17eb18d674d586e609a3e268975edd728d5c84a3 Author: Masahiro Yamada Date: Sat Oct 21 01:57:42 2017 +0900 nvmem: set nvmem->owner to nvmem->dev->driver->owner if unset All nvmem drivers are supposed to set the owner field of struct nvmem_config, but this matches nvmem->dev->driver->owner. As far as I see in drivers/nvmem/ directory, all the drivers are the case. So, make nvmem_register() set the nvmem's owner to the associated driver's owner unless nvmem_config sets otherwise. Remove .owner settings in the drivers that are now redundant. Signed-off-by: Masahiro Yamada Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/bcm-ocotp.c | 1 - drivers/nvmem/core.c | 2 ++ drivers/nvmem/imx-iim.c | 1 - drivers/nvmem/imx-ocotp.c | 1 - drivers/nvmem/lpc18xx_eeprom.c | 1 - drivers/nvmem/lpc18xx_otp.c | 1 - drivers/nvmem/meson-efuse.c | 1 - drivers/nvmem/mtk-efuse.c | 1 - drivers/nvmem/mxs-ocotp.c | 1 - drivers/nvmem/qfprom.c | 1 - drivers/nvmem/rockchip-efuse.c | 1 - drivers/nvmem/sunxi_sid.c | 1 - drivers/nvmem/vf610-ocotp.c | 1 - 13 files changed, 2 insertions(+), 12 deletions(-) commit ec3672b81fc8ff490e478bc5124f68c2be7174ee Author: Masahiro Yamada Date: Sat Oct 21 01:57:41 2017 +0900 nvmem: qfprom: fix different address space warnings of sparse Fix the following sparse warnings: drivers/nvmem/qfprom.c:23:30: warning: incorrect type in initializer (different address spaces) drivers/nvmem/qfprom.c:23:30: expected void [noderef] *base drivers/nvmem/qfprom.c:23:30: got void *context drivers/nvmem/qfprom.c:36:30: warning: incorrect type in initializer (different address spaces) drivers/nvmem/qfprom.c:36:30: expected void [noderef] *base drivers/nvmem/qfprom.c:36:30: got void *context drivers/nvmem/qfprom.c:76:22: warning: incorrect type in assignment (different address spaces) drivers/nvmem/qfprom.c:76:22: expected void *static [toplevel] [assigned] priv drivers/nvmem/qfprom.c:76:22: got void [noderef] *[assigned] base The type of nvmem_config->priv is (void *), so sparse complains about assignment of the base address with (void __iomem *) type. Even if we cast it out, sparse still warns: warning: cast removes address space of expression Of course, we can shut up the sparse by marking __force, but a more correct way is to put the base address into driver private data. Signed-off-by: Masahiro Yamada Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/qfprom.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit a48f1fff7e2fe5fbaf0295ff7705909fd31f1c35 Author: Masahiro Yamada Date: Sat Oct 21 01:57:40 2017 +0900 nvmem: mtk-efuse: fix different address space warnings of sparse Fix the following sparse warnings: drivers/nvmem/mtk-efuse.c:24:30: warning: incorrect type in initializer (different address spaces) drivers/nvmem/mtk-efuse.c:24:30: expected void [noderef] *base drivers/nvmem/mtk-efuse.c:24:30: got void *context drivers/nvmem/mtk-efuse.c:37:30: warning: incorrect type in initializer (different address spaces) drivers/nvmem/mtk-efuse.c:37:30: expected void [noderef] *base drivers/nvmem/mtk-efuse.c:37:30: got void *context drivers/nvmem/mtk-efuse.c:69:23: warning: incorrect type in assignment (different address spaces) drivers/nvmem/mtk-efuse.c:69:23: expected void *priv drivers/nvmem/mtk-efuse.c:69:23: got void [noderef] *[assigned] base The type of nvmem_config->priv is (void *), so sparse complains about assignment of the base address with (void __iomem *) type. Even if we cast it out, sparse still warns: warning: cast removes address space of expression Of course, we can shut up the sparse by marking __force, but a more correct way is to put the base address into driver private data. Signed-off-by: Masahiro Yamada Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/mtk-efuse.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 4dd5f60e9a841da5c14c2a0a23290adddb4b5087 Author: Masahiro Yamada Date: Sat Oct 21 01:57:39 2017 +0900 nvmem: mtk-efuse: use stack for nvmem_config instead of malloc'ing it nvmem_register() copies all the members of nvmem_config to nvmem_device. So, nvmem_config is one-time use data during probing. There is no point to keep it until the driver detach. Using stack should be no problem because nvmem_config is pretty small. Signed-off-by: Masahiro Yamada Acked-by: Sean Wang Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/mtk-efuse.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 01d35cabd5abda28c352f63c87109c477fc84886 Author: Masahiro Yamada Date: Sat Oct 21 01:57:38 2017 +0900 nvmem: imx-iim: use stack for nvmem_config instead of malloc'ing it nvmem_register() copies all the members of nvmem_config to nvmem_device. So, nvmem_config is one-time use data during probing. There is no point to keep it until the driver detach. Using stack should be no problem because nvmem_config is pretty small. Signed-off-by: Masahiro Yamada Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/imx-iim.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit 756a024f3983093d26a8756fe4677e34b38bd519 Author: Linus Walleij Date: Mon Nov 6 21:27:34 2017 +0100 pinctrl: gemini: Fix GMAC groups The GMII groups need to be split across GMAC0 and GMAC1 since GMAC0 is always available but GMAC1 masks GPIO2 lines 0-7 so we might want just one interface out. Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-gemini.c | 79 +++++++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 25 deletions(-) commit 03e40f1e76808886f452b61761a292ddad25f43f Author: Colin Ian King Date: Tue Nov 7 18:56:30 2017 +0000 zd1201: remove unused variable framelen Variable framelen is assigned but never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/zydas/zd1201.c:234:3: warning: Value stored to 'framelen' is never read Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/zydas/zd1201.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9b741b2a3148250e652f9dfc1a5bbc4410ec1a57 Author: Colin Ian King Date: Fri Nov 3 13:45:28 2017 +0000 orinoco_usb: remove redundant pointer dev The pointer dev is assigned but never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/intersil/orinoco/orinoco_usb.c:1468:2: warning: Value stored to 'dev' is never read Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 2 -- 1 file changed, 2 deletions(-) commit 6c6e253113123189c06ff7433c67d917cc9f68df Author: Colin Ian King Date: Wed Nov 1 09:26:22 2017 +0000 iwlegacy: remove redundant pointer sta_priv Pointer sta_priv is assigned but never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/intel/iwlegacy/4965-rs.c:2163:2: warning: Value stored to 'sta_priv' is never read Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlegacy/4965-rs.c | 2 -- 1 file changed, 2 deletions(-) commit 0ff26c662d5f3b26674d5205c8899d901f766acb Author: Adrian Hunter Date: Thu Nov 2 11:22:53 2017 +0200 driver core: Fix device link deferred probe A device probe deferred because of a device link is never probed again because it is not added to the deferred_probe_pending_list. Add it, taking care of the race with driver_deferred_probe_trigger(). Signed-off-by: Adrian Hunter Reviewed-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman drivers/base/dd.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 8d6cfb14088e340acd56264f52a60c8f8f735854 Author: Rajendra Nayak Date: Thu Nov 2 14:59:42 2017 +0530 pinctrl: qcom: spmi-gpio: Add pmi8994 gpio support Update the binding and driver for pmi8994-gpios Signed-off-by: Rajendra Nayak Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt | 2 ++ drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 + 2 files changed, 3 insertions(+) commit 13dc48a8833e0b12c9dfeca99fbd326f662d3a9e Author: Colin Ian King Date: Tue Oct 31 11:20:51 2017 +0000 pinctrl: ti-iodelay: remove redundant unused variable dev The pointer dev is being assigned but is never used, hence it is redundant and can be removed. Cleans up clang warnings: drivers/pinctrl/ti/pinctrl-ti-iodelay.c:582:2: warning: Value stored to 'dev' is never read drivers/pinctrl/ti/pinctrl-ti-iodelay.c:701:2: warning: Value stored to 'dev' is never read Signed-off-by: Colin Ian King Signed-off-by: Linus Walleij drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 4 ---- 1 file changed, 4 deletions(-) commit 752caf9aca6281a0e45825338ac12f54fbc23190 Author: Markus Elfring Date: Mon Oct 30 14:55:52 2017 +0100 pinctrl: max77620: Use common error handling code in max77620_pinconf_set() * Add a jump target so that a specific error message is stored only once at the end of this function implementation. * Replace two calls of the function "dev_err" by goto statements. * Adjust two condition checks. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-max77620.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 60ad481f74a6d5ffb38e2c2ea325324e82081e7e Author: Linus Walleij Date: Sat Oct 28 15:37:19 2017 +0200 pinctrl: gemini: Implement clock skew/delay config This enabled pin config on the Gemini driver and implements pin skew/delay so that the ethernet pins clocking can be properly configured. Acked-by: Hans Ulli Kroll Signed-off-by: Linus Walleij .../bindings/pinctrl/cortina,gemini-pinctrl.txt | 10 +- drivers/pinctrl/pinctrl-gemini.c | 178 ++++++++++++++++++++- 2 files changed, 182 insertions(+), 6 deletions(-) commit 1c5b7f3c3452584d3239f0594904685150c4dc0d Author: Linus Walleij Date: Sat Oct 28 15:37:18 2017 +0200 pinctrl: gemini: Use generic DT parser We can just use the generic Device Tree parser code in this driver and save some code. Acked-by: Hans Ulli Kroll Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/pinctrl-gemini.c | 66 +++------------------------------------- 2 files changed, 5 insertions(+), 62 deletions(-) commit e0e1e39de490a2d9b8a173363ccf2415ddada871 Author: Linus Walleij Date: Sat Oct 28 15:37:17 2017 +0200 pinctrl: Add skew-delay pin config and bindings Some pin controllers (such as the Gemini) can control the expected clock skew and output delay on certain pins with a sub-nanosecond granularity. This is typically done by shunting in a number of double inverters in front of or behind the pin. Make it possible to configure this with a generic binding. Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Acked-by: Hans Ulli Kroll Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | 4 ++++ drivers/pinctrl/pinconf-generic.c | 2 ++ include/linux/pinctrl/pinconf-generic.h | 5 +++++ 3 files changed, 11 insertions(+) commit f80ead1cd5fa9da78a3c2aad1de18f01e2ca18f2 Author: Colin Ian King Date: Sat Nov 4 19:37:59 2017 +0000 rtlwifi: remove redundant initialization to cfg_cmd cfg_cmd is initialized to zero and this value is never read, instead it is over-written in the start of a do-while loop. Remove the redundant initialization. Cleans up clang warning: drivers/net/wireless/realtek/rtlwifi/core.c:1750:22: warning: Value stored to 'cfg_cmd' during its initialization is never read Signed-off-by: Colin Ian King Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82e730e521ce6d4c633c7ff7edfd8fb4242c0c6e Author: Colin Ian King Date: Fri Nov 3 14:09:22 2017 +0000 rtlwifi: remove redundant pointer tid_data tid_data is assigned but never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/net/wireless/realtek/rtlwifi/base.c:1581:2: warning: Value stored to 'tid_data' is never read Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 2 -- 1 file changed, 2 deletions(-) commit ac978dc79a91939a97a271f646ba891d62fce5d2 Author: Arnd Bergmann Date: Mon Nov 6 14:55:37 2017 +0100 rtlwifi: drop unused ppsc->last_wakeup_time The calculation of ppsc->last_wakeup_time is not y2038-safe, but the variable is not used at all, so we can simply drop it. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 5 ----- drivers/net/wireless/realtek/rtlwifi/wifi.h | 2 -- 2 files changed, 7 deletions(-) commit 3c92d5517af8eeab81da3aee4fc14faa198bbb8b Author: Arnd Bergmann Date: Mon Nov 6 14:55:36 2017 +0100 rtlwifi: use ktime_get_real_seconds() for suspend time do_gettimeofday() is deprecated and slower than necessary for the purpose of reading the seconds. This changes rtl_op_suspend/resume to use ktime_get_real_seconds() instead, which is simpler and avoids confusion about whether it is y2038-safe or not. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/core.c | 10 ++++------ drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 3 +-- drivers/net/wireless/realtek/rtlwifi/wifi.h | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) commit 3f2a162fab15aee243178b5308bb5d1206fc4043 Author: Arnd Bergmann Date: Mon Nov 6 14:55:35 2017 +0100 rtlwifi: fix uninitialized rtlhal->last_suspend_sec time We set rtlhal->last_suspend_sec to an uninitialized stack variable, but unfortunately gcc never warned about this, I only found it while working on another patch. I opened a gcc bug for this. Presumably the value of rtlhal->last_suspend_sec is not all that important, but it does get used, so we probably want the patch backported to stable kernels. Cc: stable@vger.kernel.org Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82839 Signed-off-by: Arnd Bergmann Acked-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 1 + 1 file changed, 1 insertion(+) commit c1b586402c159427fd5d4f553d1d4ef75bab84c7 Author: Ping-Ke Shih Date: Wed Nov 1 10:29:22 2017 -0500 rtlwifi: rtl_pci: Extend recognized interrupt parameters from two to four ISR 8822be checks H2CQ by int_d, so we extend to four ISR. Also, irq_mask is extended to four. 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/pci.c | 3 ++- drivers/net/wireless/realtek/rtlwifi/pci.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.h | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.h | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.h | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.h | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.h | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.h | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.h | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.h | 3 ++- drivers/net/wireless/realtek/rtlwifi/wifi.h | 3 ++- 19 files changed, 36 insertions(+), 19 deletions(-) commit 68929a83800079164143d44b0d017678f7a05d86 Author: Ping-Ke Shih Date: Wed Nov 1 10:29:21 2017 -0500 rtlwifi: rtl_pci: Add ID for 8822BE When the driver for the RTL8822BE is added, it will need an ID for further use. 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/pci.c | 5 +++++ drivers/net/wireless/realtek/rtlwifi/pci.h | 1 + 2 files changed, 6 insertions(+) commit 89d3e8abcf24462fec0c3c82c5917196e9345e3e Author: Ping-Ke Shih Date: Wed Nov 1 10:29:20 2017 -0500 rtlwifi: rtl_pci: Add fill_tx_special_desc to issue H2C data, and process TXOK in interrupt. With the RTL8822BE, an H2C tx queue is added to download FW and special data. This change implements the support code in rtl_pci. 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/pci.c | 11 +++++++++++ drivers/net/wireless/realtek/rtlwifi/pci.h | 1 + drivers/net/wireless/realtek/rtlwifi/wifi.h | 4 ++++ 3 files changed, 16 insertions(+) commit 57869e4ba77a75714ffcec628c9c440baaafa836 Author: Ping-Ke Shih Date: Wed Nov 1 10:29:19 2017 -0500 rtlwifi: rtl_pci: Add support for 8822be TX/RX BD The number of TX/RX BD desc for 8822BE is 512. The TX/RX BD architecture of 8822BE is the same as 8192EE. 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/pci.c | 14 +++++++++++--- drivers/net/wireless/realtek/rtlwifi/pci.h | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) commit 5f647f4dfe419106274b6a509e33ee4a5db1133f Author: Larry Finger Date: Wed Nov 1 10:29:18 2017 -0500 rtlwifi: rtl_pci: Simplify some code be eliminating extraneous variables In several places, the code assigns a variable inside an "if" or "case" block, but uses it only once. The code is simplified by eliminating the extraneous variable. With this change, one level of indenting is saved. This patch does not cause any functional changes in the binary code. 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/pci.c | 35 ++++++++++-------------------- 1 file changed, 11 insertions(+), 24 deletions(-) commit ae0122b6793d51f04b3841f900c8aa5aeee40ee3 Author: Larry Finger Date: Wed Nov 1 10:29:17 2017 -0500 rtlwifi: rtl_pci: Fix formatting problems in pci.c Checkpatch.pl reports a number of formatting problems in this source file. None of the changes cause any functional changes in the driver. 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/pci.c | 207 +++++++++++++---------------- 1 file changed, 93 insertions(+), 114 deletions(-) commit 6bc05d5d8e9d65f67b6e6f8cf3b240668146338f Author: Larry Finger Date: Wed Nov 1 10:29:16 2017 -0500 rtlwifi: rtl_pci: Fix formatting errors in pci.h Checkpatch.pl reports a number of formatting problems in this header file. None of the changes cause any functional changes in the driver. 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/pci.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 9b11f19e414b1d1314ee581e8c1e084bced8e5cc Author: Thomas Rohloff Date: Sun Nov 5 20:36:30 2017 +0100 tty: serial: meson: allow baud-rates lower than 9600 Devices like DCF77 receivers need the baud-rate to be as low as 50. I have tested this on a Meson GXL device with uart_A. Cc: Jiri Slaby Cc: Carlo Caione Cc: Kevin Hilman Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Thomas Rohloff Reviewed-by: Neil Armstrong Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/meson_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07a708f0a16f040b319db647452bcb8884cd04be Author: Ji-Ze Hong (Peter Hong) Date: Wed Nov 8 11:05:46 2017 +0800 serial: 8250_fintek: Fix crash with baud rate B0 The 8250_fintek.c is support the Fintek F81866/F81216 with dynamic clock. But It'll generate "division by zero" exception and crash in fintek_8250_set_termios() with baud rate 0 on baudrate_table[i] % baud. It can be tested with following C code: ... struct termios options; tcgetattr(fd, &options); ... options.c_cflag = CS8 | CREAD; /* baud rate 0 */ tcsetattr(fd, TCSANOW, &options); tcflush(fd, TCIOFLUSH); Fixes: 195638b6d44f ("serial: 8250_fintek: UART dynamic clocksource on Fintek F81866") Reported-by: Lukas Redlinger Cc: Lukas Redlinger Signed-off-by: Ji-Ze Hong (Peter Hong) Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_fintek.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 21c4e7f255e38620bb4c5d1119c64114ab280e2e Author: Ricardo Ribalda Delgado Date: Mon Nov 6 11:49:13 2017 +0100 serial: 8250_fintek: Disable delays for ports != 0 According to the datasheet, only the first port supports delay before send and delay after send. Reported-by: "Ji-Ze Hong (Peter Hong)" Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_fintek.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7ecc77011c6fb40d3eef7c6a0ebcec61e69b3ec3 Author: Ricardo Ribalda Delgado Date: Mon Nov 6 11:49:12 2017 +0100 serial: 8250_fintek: Return -EINVAL on invalid configuration Hardware does not support having the same RTS level during RX and TX when RS485 mode is on (URA in Fintek terminology). The manufacturer has also confirmed that the delays are not enabled if the RS485 mode is not enabled. Therefore we should return -EINVAL if the user wants to have the same value for RTS_ON_SEND and RTS_AFTER_SEND. Cc: "Ji-Ze Hong (Peter Hong)" Cc: Lukas Wunner Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_fintek.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit e5656d43dce828bfcacbecd614e22355073e918b Author: Greg Kroah-Hartman Date: Mon Nov 6 18:11:55 2017 +0100 tty: Remove redundant license text Now that the SPDX tag is in all tty files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Jiri Slaby Cc: James Hogan Signed-off-by: Greg Kroah-Hartman drivers/tty/bfin_jtag_comm.c | 2 -- drivers/tty/ehv_bytechan.c | 4 ---- drivers/tty/goldfish.c | 10 ---------- drivers/tty/isicom.c | 5 ----- drivers/tty/metag_da.c | 5 ----- drivers/tty/mips_ejtag_fdc.c | 4 ---- drivers/tty/moxa.c | 5 ----- drivers/tty/mxser.c | 5 ----- drivers/tty/n_gsm.c | 13 ------------- drivers/tty/n_hdlc.c | 2 -- drivers/tty/n_null.c | 13 ------------- drivers/tty/n_r3964.c | 3 --- drivers/tty/n_tracerouter.c | 11 ----------- drivers/tty/n_tracesink.c | 11 ----------- drivers/tty/n_tracesink.h | 11 ----------- drivers/tty/n_tty.c | 3 --- drivers/tty/nozomi.c | 14 -------------- drivers/tty/rocket.c | 14 -------------- drivers/tty/synclink.c | 2 -- drivers/tty/synclink_gt.c | 2 -- drivers/tty/synclinkmp.c | 1 - drivers/tty/tty_audit.c | 5 +---- drivers/tty/tty_ldsem.c | 3 --- 23 files changed, 1 insertion(+), 147 deletions(-) commit 4e17ff37f185c4abba98afe372cadeac368cde89 Author: Greg Kroah-Hartman Date: Mon Nov 6 18:11:54 2017 +0100 tty: serdev: Remove redundant license text Now that the SPDX tag is in all tty files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Rob Herring Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/core.c | 9 --------- drivers/tty/serdev/serdev-ttyport.c | 9 --------- 2 files changed, 18 deletions(-) commit a9f96f014f36cc872d6d235787963ba90e101448 Author: Greg Kroah-Hartman Date: Mon Nov 6 18:11:53 2017 +0100 tty: hvc: Remove redundant license text Now that the SPDX tag is in all tty files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Jiri Slaby Cc: Paul Mackerras Cc: Michael Ellerman Cc: Chris Metcalf Acked-by: Benjamin Herrenschmidt Signed-off-by: Greg Kroah-Hartman drivers/tty/hvc/hvc_bfin_jtag.c | 2 -- drivers/tty/hvc/hvc_console.c | 14 -------------- drivers/tty/hvc/hvc_console.h | 14 -------------- drivers/tty/hvc/hvc_dcc.c | 12 +----------- drivers/tty/hvc/hvc_opal.c | 15 --------------- drivers/tty/hvc/hvc_rtas.c | 14 -------------- drivers/tty/hvc/hvc_tile.c | 10 ---------- drivers/tty/hvc/hvc_udbg.c | 14 -------------- drivers/tty/hvc/hvc_vio.c | 14 -------------- drivers/tty/hvc/hvc_xen.c | 14 -------------- drivers/tty/hvc/hvcs.c | 14 -------------- drivers/tty/hvc/hvsi.c | 14 -------------- 12 files changed, 1 insertion(+), 150 deletions(-) commit 4793f2ebff1c890386a514998606205a2948011c Author: Greg Kroah-Hartman Date: Mon Nov 6 18:11:52 2017 +0100 tty: serial: Remove redundant license text Now that the SPDX tag is in all tty files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Jiri Slaby Cc: Eric Anholt Cc: Stefan Wahren Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Joachim Eastwood Cc: Matthias Brugger Cc: Masahiro Yamada Cc: Tobias Klauser Cc: Russell King Cc: Vineet Gupta Cc: Richard Genoud Cc: Alexander Shiyan Cc: Baruch Siach Cc: Pat Gefre Cc: "Guilherme G. Piccoli" Cc: Jason Wessel Cc: Vladimir Zapolskiy Cc: Sylvain Lemieux Cc: Carlo Caione Cc: Kevin Hilman Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Andy Gross Cc: David Brown Cc: "Andreas Färber" Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Kevin Cernekee Cc: Laxman Dewangan Cc: Thierry Reding Cc: Jonathan Hunter Cc: Barry Song Cc: Patrice Chotard Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: Chris Metcalf Cc: Peter Korsgaard Cc: Timur Tabi Cc: Tony Prisk Cc: Michal Simek Cc: "Sören Brinkmann" Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250.h | 5 ----- drivers/tty/serial/8250/8250_accent.c | 4 ---- drivers/tty/serial/8250/8250_acorn.c | 4 ---- drivers/tty/serial/8250/8250_aspeed_vuart.c | 5 ----- drivers/tty/serial/8250/8250_bcm2835aux.c | 5 ----- drivers/tty/serial/8250/8250_boca.c | 4 ---- drivers/tty/serial/8250/8250_core.c | 5 ----- drivers/tty/serial/8250/8250_dma.c | 5 ----- drivers/tty/serial/8250/8250_dw.c | 5 ----- drivers/tty/serial/8250/8250_early.c | 4 ---- drivers/tty/serial/8250/8250_em.c | 13 ------------- drivers/tty/serial/8250/8250_exar.c | 4 ---- drivers/tty/serial/8250/8250_exar_st16c554.c | 4 ---- drivers/tty/serial/8250/8250_fintek.c | 5 ----- drivers/tty/serial/8250/8250_fourport.c | 4 ---- drivers/tty/serial/8250/8250_fsl.c | 4 ---- drivers/tty/serial/8250/8250_gsc.c | 5 ----- drivers/tty/serial/8250/8250_hub6.c | 4 ---- drivers/tty/serial/8250/8250_ingenic.c | 9 --------- drivers/tty/serial/8250/8250_lpc18xx.c | 5 ----- drivers/tty/serial/8250/8250_lpss.c | 4 ---- drivers/tty/serial/8250/8250_mid.c | 4 ---- drivers/tty/serial/8250/8250_moxa.c | 4 ---- drivers/tty/serial/8250/8250_mtk.c | 10 ---------- drivers/tty/serial/8250/8250_of.c | 6 ------ drivers/tty/serial/8250/8250_pci.c | 4 ---- drivers/tty/serial/8250/8250_pnp.c | 4 ---- drivers/tty/serial/8250/8250_port.c | 5 ----- drivers/tty/serial/8250/8250_pxa.c | 6 ------ drivers/tty/serial/8250/8250_uniphier.c | 10 ---------- drivers/tty/serial/altera_jtaguart.c | 5 ----- drivers/tty/serial/altera_uart.c | 5 ----- drivers/tty/serial/amba-pl010.c | 14 -------------- drivers/tty/serial/amba-pl011.c | 14 -------------- drivers/tty/serial/ar933x_uart.c | 4 ---- drivers/tty/serial/arc_uart.c | 4 ---- drivers/tty/serial/atmel_serial.c | 15 --------------- drivers/tty/serial/atmel_serial.h | 5 ----- drivers/tty/serial/bcm63xx_uart.c | 4 ---- drivers/tty/serial/bfin_sport_uart.c | 2 -- drivers/tty/serial/bfin_sport_uart.h | 2 -- drivers/tty/serial/bfin_uart.c | 2 -- drivers/tty/serial/clps711x.c | 5 ----- drivers/tty/serial/cpm_uart/cpm_uart.h | 5 ----- drivers/tty/serial/cpm_uart/cpm_uart_core.c | 15 --------------- drivers/tty/serial/cpm_uart/cpm_uart_cpm1.c | 15 --------------- drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c | 15 --------------- drivers/tty/serial/digicolor-usart.c | 5 ----- drivers/tty/serial/earlycon-arm-semihost.c | 12 ------------ drivers/tty/serial/earlycon.c | 4 ---- drivers/tty/serial/fsl_lpuart.c | 5 ----- drivers/tty/serial/icom.c | 15 --------------- drivers/tty/serial/icom.h | 14 -------------- drivers/tty/serial/ifx6x60.c | 14 -------------- drivers/tty/serial/ifx6x60.h | 17 ----------------- drivers/tty/serial/imx.c | 10 ---------- drivers/tty/serial/ioc3_serial.c | 4 ---- drivers/tty/serial/ioc4_serial.c | 4 ---- drivers/tty/serial/jsm/jsm.h | 10 ---------- drivers/tty/serial/jsm/jsm_cls.c | 10 ---------- drivers/tty/serial/jsm/jsm_driver.c | 10 ---------- drivers/tty/serial/jsm/jsm_neo.c | 10 ---------- drivers/tty/serial/jsm/jsm_tty.c | 10 ---------- drivers/tty/serial/kgdb_nmi.c | 4 ---- drivers/tty/serial/kgdboc.c | 4 ---- drivers/tty/serial/lantiq.c | 13 ------------- drivers/tty/serial/lpc32xx_hs.c | 10 ---------- drivers/tty/serial/m32r_sio.c | 5 ----- drivers/tty/serial/m32r_sio_reg.h | 3 --- drivers/tty/serial/max3100.c | 6 ------ drivers/tty/serial/max310x.c | 5 ----- drivers/tty/serial/mcf.c | 5 ----- drivers/tty/serial/men_z135_uart.c | 4 ---- drivers/tty/serial/meson_uart.c | 10 ---------- drivers/tty/serial/mpc52xx_uart.c | 4 ---- drivers/tty/serial/mps2-uart.c | 4 ---- drivers/tty/serial/mpsc.c | 5 +---- drivers/tty/serial/msm_serial.c | 9 --------- drivers/tty/serial/mux.c | 5 ----- drivers/tty/serial/mvebu-uart.c | 12 ------------ drivers/tty/serial/mxs-auart.c | 4 ---- drivers/tty/serial/netx-serial.c | 13 ------------- drivers/tty/serial/omap-serial.c | 5 ----- drivers/tty/serial/owl-uart.c | 13 ------------- drivers/tty/serial/pch_uart.c | 13 ------------- drivers/tty/serial/pic32_uart.c | 2 -- drivers/tty/serial/pic32_uart.h | 2 -- drivers/tty/serial/pmac_zilog.c | 14 -------------- drivers/tty/serial/pnx8xxx_uart.c | 5 ----- drivers/tty/serial/pxa.c | 5 ----- drivers/tty/serial/rp2.c | 4 ---- drivers/tty/serial/sa1100.c | 14 -------------- drivers/tty/serial/samsung.c | 4 ---- drivers/tty/serial/samsung.h | 4 ---- drivers/tty/serial/sb1250-duart.c | 5 ----- drivers/tty/serial/sc16is7xx.c | 6 ------ drivers/tty/serial/sccnxp.c | 5 ----- drivers/tty/serial/serial-tegra.c | 12 ------------ drivers/tty/serial/serial_core.c | 14 -------------- drivers/tty/serial/serial_ks8695.c | 6 ------ drivers/tty/serial/serial_mctrl_gpio.c | 10 ---------- drivers/tty/serial/serial_mctrl_gpio.h | 11 ----------- drivers/tty/serial/serial_txx9.c | 4 ---- drivers/tty/serial/sh-sci.c | 4 ---- drivers/tty/serial/sirfsoc_uart.c | 2 -- drivers/tty/serial/sirfsoc_uart.h | 2 -- drivers/tty/serial/sn_console.c | 19 ------------------- drivers/tty/serial/sprd_serial.c | 9 --------- drivers/tty/serial/st-asc.c | 6 ------ drivers/tty/serial/stm32-usart.c | 1 - drivers/tty/serial/stm32-usart.h | 1 - drivers/tty/serial/tilegx.c | 10 ---------- drivers/tty/serial/timbuart.c | 13 ------------- drivers/tty/serial/timbuart.h | 13 ------------- drivers/tty/serial/uartlite.c | 4 ---- drivers/tty/serial/ucc_uart.c | 5 +---- drivers/tty/serial/vr41xx_siu.c | 14 -------------- drivers/tty/serial/vt8500_serial.c | 9 --------- drivers/tty/serial/xilinx_uartps.c | 6 ------ 119 files changed, 2 insertions(+), 844 deletions(-) commit e3b3d0f549c1d19b94e6ac55c66643166ea649ef Author: Greg Kroah-Hartman Date: Mon Nov 6 18:11:51 2017 +0100 tty: add SPDX identifiers to all remaining files in drivers/tty/ It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/tty files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Jiri Slaby Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Chris Metcalf Cc: Jiri Kosina Cc: David Sterba Cc: James Hogan Cc: Rob Herring Cc: Eric Anholt Cc: Stefan Wahren Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Joachim Eastwood Cc: Matthias Brugger Cc: Masahiro Yamada Cc: Tobias Klauser Cc: Russell King Cc: Vineet Gupta Cc: Richard Genoud Cc: Alexander Shiyan Cc: Baruch Siach Cc: "Maciej W. Rozycki" Cc: "Uwe Kleine-König" Cc: Pat Gefre Cc: "Guilherme G. Piccoli" Cc: Jason Wessel Cc: Vladimir Zapolskiy Cc: Sylvain Lemieux Cc: Carlo Caione Cc: Kevin Hilman Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Andy Gross Cc: David Brown Cc: "Andreas Färber" Cc: Kevin Cernekee Cc: Laxman Dewangan Cc: Thierry Reding Cc: Jonathan Hunter Cc: Barry Song Cc: Patrice Chotard Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: "David S. Miller" Cc: Peter Korsgaard Cc: Timur Tabi Cc: Tony Prisk Cc: Michal Simek Cc: "Sören Brinkmann" Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman drivers/tty/amiserial.c | 1 + drivers/tty/bfin_jtag_comm.c | 1 + drivers/tty/cyclades.c | 1 + drivers/tty/ehv_bytechan.c | 1 + drivers/tty/goldfish.c | 1 + drivers/tty/hvc/hvc_bfin_jtag.c | 1 + drivers/tty/hvc/hvc_console.c | 1 + drivers/tty/hvc/hvc_console.h | 1 + drivers/tty/hvc/hvc_dcc.c | 1 + drivers/tty/hvc/hvc_opal.c | 1 + drivers/tty/hvc/hvc_rtas.c | 1 + drivers/tty/hvc/hvc_tile.c | 1 + drivers/tty/hvc/hvc_udbg.c | 1 + drivers/tty/hvc/hvc_vio.c | 1 + drivers/tty/hvc/hvc_xen.c | 1 + drivers/tty/hvc/hvcs.c | 1 + drivers/tty/hvc/hvsi.c | 1 + drivers/tty/ipwireless/main.c | 1 + drivers/tty/isicom.c | 1 + drivers/tty/metag_da.c | 1 + drivers/tty/mips_ejtag_fdc.c | 1 + drivers/tty/moxa.c | 1 + drivers/tty/mxser.c | 1 + drivers/tty/n_gsm.c | 1 + drivers/tty/n_hdlc.c | 1 + drivers/tty/n_null.c | 1 + drivers/tty/n_r3964.c | 1 + drivers/tty/n_tracerouter.c | 1 + drivers/tty/n_tracesink.c | 1 + drivers/tty/n_tracesink.h | 1 + drivers/tty/n_tty.c | 1 + drivers/tty/nozomi.c | 1 + drivers/tty/rocket.c | 1 + drivers/tty/serdev/core.c | 1 + drivers/tty/serdev/serdev-ttyport.c | 1 + drivers/tty/serial/21285.c | 1 + drivers/tty/serial/8250/8250.h | 1 + drivers/tty/serial/8250/8250_accent.c | 1 + drivers/tty/serial/8250/8250_acorn.c | 1 + drivers/tty/serial/8250/8250_aspeed_vuart.c | 1 + drivers/tty/serial/8250/8250_bcm2835aux.c | 1 + drivers/tty/serial/8250/8250_boca.c | 1 + drivers/tty/serial/8250/8250_core.c | 1 + drivers/tty/serial/8250/8250_dma.c | 1 + drivers/tty/serial/8250/8250_dw.c | 1 + drivers/tty/serial/8250/8250_early.c | 1 + drivers/tty/serial/8250/8250_em.c | 1 + drivers/tty/serial/8250/8250_exar.c | 1 + drivers/tty/serial/8250/8250_exar_st16c554.c | 1 + drivers/tty/serial/8250/8250_fintek.c | 1 + drivers/tty/serial/8250/8250_fourport.c | 1 + drivers/tty/serial/8250/8250_fsl.c | 1 + drivers/tty/serial/8250/8250_gsc.c | 1 + drivers/tty/serial/8250/8250_hp300.c | 1 + drivers/tty/serial/8250/8250_hub6.c | 1 + drivers/tty/serial/8250/8250_ingenic.c | 1 + drivers/tty/serial/8250/8250_lpc18xx.c | 1 + drivers/tty/serial/8250/8250_lpss.c | 1 + drivers/tty/serial/8250/8250_mid.c | 1 + drivers/tty/serial/8250/8250_moxa.c | 1 + drivers/tty/serial/8250/8250_mtk.c | 1 + drivers/tty/serial/8250/8250_of.c | 1 + drivers/tty/serial/8250/8250_omap.c | 1 + drivers/tty/serial/8250/8250_pci.c | 1 + drivers/tty/serial/8250/8250_pnp.c | 1 + drivers/tty/serial/8250/8250_port.c | 1 + drivers/tty/serial/8250/8250_pxa.c | 1 + drivers/tty/serial/8250/8250_uniphier.c | 1 + drivers/tty/serial/8250/serial_cs.c | 1 + drivers/tty/serial/altera_jtaguart.c | 1 + drivers/tty/serial/altera_uart.c | 1 + drivers/tty/serial/amba-pl010.c | 1 + drivers/tty/serial/amba-pl011.c | 1 + drivers/tty/serial/apbuart.c | 1 + drivers/tty/serial/ar933x_uart.c | 1 + drivers/tty/serial/arc_uart.c | 1 + drivers/tty/serial/atmel_serial.c | 1 + drivers/tty/serial/atmel_serial.h | 1 + drivers/tty/serial/bcm63xx_uart.c | 1 + drivers/tty/serial/bfin_sport_uart.c | 1 + drivers/tty/serial/bfin_sport_uart.h | 1 + drivers/tty/serial/bfin_uart.c | 1 + drivers/tty/serial/clps711x.c | 1 + drivers/tty/serial/cpm_uart/cpm_uart.h | 1 + drivers/tty/serial/cpm_uart/cpm_uart_core.c | 1 + drivers/tty/serial/cpm_uart/cpm_uart_cpm1.c | 1 + drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c | 1 + drivers/tty/serial/digicolor-usart.c | 1 + drivers/tty/serial/dz.c | 1 + drivers/tty/serial/earlycon-arm-semihost.c | 1 + drivers/tty/serial/earlycon.c | 1 + drivers/tty/serial/efm32-uart.c | 1 + drivers/tty/serial/fsl_lpuart.c | 1 + drivers/tty/serial/icom.c | 1 + drivers/tty/serial/icom.h | 1 + drivers/tty/serial/ifx6x60.c | 1 + drivers/tty/serial/ifx6x60.h | 1 + drivers/tty/serial/imx.c | 1 + drivers/tty/serial/ioc3_serial.c | 1 + drivers/tty/serial/ioc4_serial.c | 1 + drivers/tty/serial/ip22zilog.c | 1 + drivers/tty/serial/jsm/jsm.h | 1 + drivers/tty/serial/jsm/jsm_cls.c | 1 + drivers/tty/serial/jsm/jsm_driver.c | 1 + drivers/tty/serial/jsm/jsm_neo.c | 1 + drivers/tty/serial/jsm/jsm_tty.c | 1 + drivers/tty/serial/kgdb_nmi.c | 1 + drivers/tty/serial/kgdboc.c | 1 + drivers/tty/serial/lantiq.c | 1 + drivers/tty/serial/lpc32xx_hs.c | 1 + drivers/tty/serial/m32r_sio.c | 1 + drivers/tty/serial/m32r_sio_reg.h | 1 + drivers/tty/serial/max3100.c | 1 + drivers/tty/serial/max310x.c | 1 + drivers/tty/serial/mcf.c | 1 + drivers/tty/serial/men_z135_uart.c | 1 + drivers/tty/serial/meson_uart.c | 1 + drivers/tty/serial/mpc52xx_uart.c | 1 + drivers/tty/serial/mps2-uart.c | 1 + drivers/tty/serial/mpsc.c | 1 + drivers/tty/serial/msm_serial.c | 1 + drivers/tty/serial/mux.c | 1 + drivers/tty/serial/mvebu-uart.c | 1 + drivers/tty/serial/mxs-auart.c | 1 + drivers/tty/serial/netx-serial.c | 1 + drivers/tty/serial/omap-serial.c | 1 + drivers/tty/serial/owl-uart.c | 1 + drivers/tty/serial/pch_uart.c | 1 + drivers/tty/serial/pic32_uart.c | 1 + drivers/tty/serial/pic32_uart.h | 1 + drivers/tty/serial/pmac_zilog.c | 1 + drivers/tty/serial/pnx8xxx_uart.c | 1 + drivers/tty/serial/pxa.c | 1 + drivers/tty/serial/rp2.c | 1 + drivers/tty/serial/sa1100.c | 1 + drivers/tty/serial/samsung.c | 1 + drivers/tty/serial/samsung.h | 1 + drivers/tty/serial/sb1250-duart.c | 1 + drivers/tty/serial/sc16is7xx.c | 1 + drivers/tty/serial/sccnxp.c | 1 + drivers/tty/serial/serial-tegra.c | 1 + drivers/tty/serial/serial_core.c | 1 + drivers/tty/serial/serial_ks8695.c | 1 + drivers/tty/serial/serial_mctrl_gpio.c | 1 + drivers/tty/serial/serial_mctrl_gpio.h | 1 + drivers/tty/serial/serial_txx9.c | 1 + drivers/tty/serial/sh-sci.c | 1 + drivers/tty/serial/sirfsoc_uart.c | 1 + drivers/tty/serial/sirfsoc_uart.h | 1 + drivers/tty/serial/sprd_serial.c | 1 + drivers/tty/serial/st-asc.c | 1 + drivers/tty/serial/stm32-usart.c | 1 + drivers/tty/serial/stm32-usart.h | 1 + drivers/tty/serial/suncore.c | 1 + drivers/tty/serial/sunhv.c | 1 + drivers/tty/serial/sunsab.c | 1 + drivers/tty/serial/sunsu.c | 1 + drivers/tty/serial/sunzilog.c | 1 + drivers/tty/serial/tilegx.c | 1 + drivers/tty/serial/timbuart.c | 1 + drivers/tty/serial/timbuart.h | 1 + drivers/tty/serial/uartlite.c | 1 + drivers/tty/serial/ucc_uart.c | 1 + drivers/tty/serial/vr41xx_siu.c | 1 + drivers/tty/serial/vt8500_serial.c | 1 + drivers/tty/serial/xilinx_uartps.c | 1 + drivers/tty/serial/zs.c | 1 + drivers/tty/synclink.c | 1 + drivers/tty/synclink_gt.c | 1 + drivers/tty/synclinkmp.c | 1 + drivers/tty/tty_audit.c | 1 + drivers/tty/tty_baudrate.c | 1 + drivers/tty/tty_buffer.c | 1 + drivers/tty/tty_io.c | 1 + drivers/tty/tty_ioctl.c | 1 + drivers/tty/tty_jobctrl.c | 1 + drivers/tty/tty_ldisc.c | 1 + drivers/tty/tty_ldsem.c | 1 + drivers/tty/tty_port.c | 1 + drivers/tty/vt/consolemap.c | 1 + drivers/tty/vt/keyboard.c | 1 + drivers/tty/vt/vt.c | 1 + 182 files changed, 182 insertions(+) commit 2e67c95022977a839c9c1c3acee19c4ec98a0d62 Author: Colin Ian King Date: Tue Nov 7 11:41:07 2017 +0000 tty: serial: jsm: remove redundant pointer ts Pointer ts is assigned a value that is never read, ts is therefore redundant and can be removed. Cleans up clang warning: drivers/tty/serial/jsm/jsm_tty.c:285:2: warning: Value stored to 'ts' is never read Signed-off-by: Colin Ian King Acked-by: Guilherme G. Piccoli Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/jsm/jsm_tty.c | 2 -- 1 file changed, 2 deletions(-) commit 8191762a21a056faefb00a11eabe3d377ad88c39 Author: Gimcuan Hui Date: Sun Nov 5 05:06:22 2017 +0000 tty: serial: jsm: add space before the open parenthesis '(' This patch fixes the checkpatch.pl complains: space required before the open parenthesis '('. Signed-off-by: Gimcuan Hui Acked-by: Guilherme G. Piccoli Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/jsm/jsm_tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 67c6f4b660985f5754fa7c98bd53705020814d32 Author: Gimcuan Hui Date: Sun Nov 5 05:06:21 2017 +0000 tty: serial: jsm: fix coding style This patch fixes the checkpatch.pl complain: ERROR: else should follow close brace '}'. Signed-off-by: Gimcuan Hui Acked-by: Guilherme G. Piccoli Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/jsm/jsm_tty.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 24719a8dfa1999b4c7d5374480ca5fc6373536ff Author: Gimcuan Hui Date: Sun Nov 5 05:06:20 2017 +0000 tty: serial: jsm: delete space between function name and '(' This patch fixes checkpatch.pl warning: space prohibited between function name and open parenthesis '('. Signed-off-by: Gimcuan Hui Acked-by: Guilherme G. Piccoli Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/jsm/jsm_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d13551d1c9010b063a147839e29503ff8c632342 Author: Gimcuan Hui Date: Sun Nov 5 05:06:19 2017 +0000 tty: serial: jsm: add blank line after declarations This patch fixes checkpatch.pl warning: Missing a blank line after declarations. Signed-off-by: Gimcuan Hui Acked-by: Guilherme G. Piccoli Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/jsm/jsm_tty.c | 1 + 1 file changed, 1 insertion(+) commit c100a3f132e4981d4b2b874657b390a137c6c32e Author: Gimcuan Hui Date: Sun Nov 5 05:06:18 2017 +0000 tty: serial: jsm: change the type of local variable The return type of jsm_get_mstat was int, and the local var result was for the return should be int, make the change. This patch fixes the checkpatch.pl warning: Prefer 'unsigned int' to bare use of 'unsigned'. Signed-off-by: Gimcuan Hui Acked-by: Guilherme G. Piccoli Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/jsm/jsm_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4a71ff78e668a75a4a3cfd9ebbfbd5cbe8da5fb Author: Oder Chiou Date: Wed Nov 8 19:21:47 2017 +0800 ASoC: rt5514-spi: Let the buf_size to align with period_bytes The patch lets the buf_size to align with period_bytes to prevent the buffer reading over the real size of the DSP buffer and also avoid to calculate the wrong size of remaining data. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5514-spi.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5241ab40f6e742f8a1631f8826faf6dc6412b3b5 Author: Ulf Hansson Date: Wed Nov 8 10:11:02 2017 +0100 PM / Domains: Fix genpd to deal with drivers returning 1 from ->prepare() During system-wide PM, genpd relies on its PM callbacks to be invoked for all its attached devices, as to deal with powering off/on the PM domain. In other words, genpd is not compatible with the direct_complete path, if executed by the PM core for any of its attached devices. However, when genpd's ->prepare() callback invokes pm_generic_prepare(), it does not take into account that it may return 1. Instead it treats that as an error internally and expects the PM core to abort the prepare phase and roll back. This leads to genpd not properly powering on/off the PM domain, because its internal counters gets wrongly balanced. To fix the behaviour, allow drivers to return 1 from their ->prepare() callbacks, but let's return 0 from genpd's ->prepare() callback in such case, as that prevents the PM core from running the direct_complete path for the device. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c523c68da2117a3f9f777110839b1cf7ed7221be Author: Ramesh Thomas Date: Thu Oct 26 19:01:34 2017 -0700 cpuidle: ladder: Add per CPU PM QoS resume latency support Individual CPUs may have special requirements to not enter deep idle states. For example, a CPU running real time applications would not want to enter deep idle states to avoid latency impacts. At the same time other CPUs that do not have such a requirement could allow deep idle states to save power. This was already implemented in the menu governor. Implementing similar changes in the ladder governor which gets selected when CONFIG_NO_HZ and CONFIG_NO_HZ_IDLE are not set. Refer following commits for the menu governor changes. Signed-off-by: Ramesh Thomas Signed-off-by: Rafael J. Wysocki drivers/cpuidle/governors/ladder.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 4e37fd4d5dfd39f547b0b00fa184a440a1e44b96 Merge: 7943bfa 0759e80 Author: Rafael J. Wysocki Date: Wed Nov 8 12:15:50 2017 +0100 Merge branch 'pm-qos' into pm-cpuidle commit 0759e80b84e34a84e7e46e2b1adb528c83d84a47 Author: Rafael J. Wysocki Date: Tue Nov 7 11:33:49 2017 +0100 PM / QoS: Fix device resume latency framework The special value of 0 for device resume latency PM QoS means "no restriction", but there are two problems with that. First, device resume latency PM QoS requests with 0 as the value are always put in front of requests with positive values in the priority lists used internally by the PM QoS framework, causing 0 to be chosen as an effective constraint value. However, that 0 is then interpreted as "no restriction" effectively overriding the other requests with specific restrictions which is incorrect. Second, the users of device resume latency PM QoS have no way to specify that *any* resume latency at all should be avoided, which is an artificial limitation in general. To address these issues, modify device resume latency PM QoS to use S32_MAX as the "no constraint" value and 0 as the "no latency at all" one and rework its users (the cpuidle menu governor, the genpd QoS governor and the runtime PM framework) to follow these changes. Also add a special "n/a" value to the corresponding user space I/F to allow user space to indicate that it cannot accept any resume latencies at all for the given device. Fixes: 85dc0b8a4019 (PM / QoS: Make it possible to expose PM QoS latency constraints) Link: https://bugzilla.kernel.org/show_bug.cgi?id=197323 Reported-by: Reinette Chatre Signed-off-by: Rafael J. Wysocki Tested-by: Reinette Chatre Tested-by: Geert Uytterhoeven Tested-by: Tero Kristo Reviewed-by: Ramesh Thomas Documentation/ABI/testing/sysfs-devices-power | 4 ++- drivers/base/cpu.c | 3 +- drivers/base/power/domain.c | 2 +- drivers/base/power/domain_governor.c | 40 +++++++++++---------------- drivers/base/power/qos.c | 5 +++- drivers/base/power/runtime.c | 2 +- drivers/base/power/sysfs.c | 25 ++++++++++++++--- drivers/cpuidle/governors/menu.c | 4 +-- include/linux/pm_qos.h | 26 +++++++++++------ 9 files changed, 68 insertions(+), 43 deletions(-) commit 31f18230e480d6224e71910e9ab43a097d811fb0 Merge: 20f97ca 704d2ce Author: Rafael J. Wysocki Date: Wed Nov 8 12:14:38 2017 +0100 Merge branch 'pm-domains' into pm-qos commit 704d2ce6603f7e40bb607ae9452ff18a4cec701f Author: Rafael J. Wysocki Date: Tue Nov 7 02:23:18 2017 +0100 PM / domains: Rework governor code to be more consistent The genpd governor currently uses negative PM QoS values to indicate the "no suspend" condition and 0 as "no restriction", but it doesn't use them consistently. Moreover, it tries to refresh QoS values for already suspended devices in a quite questionable way. For the above reasons, rework it to be a bit more consistent. First off, note that dev_pm_qos_read_value() in dev_update_qos_constraint() and __default_power_down_ok() is evaluated for devices in suspend. Moreover, that only happens if the effective_constraint_ns value for them is negative (meaning "no suspend"). It is not evaluated in any other cases, so effectively the QoS values are only updated for devices in suspend that should not have been suspended in the first place. In all of the other cases, the QoS values taken into account are the effective ones from the time before the device has been suspended, so generally devices need to be resumed and suspended again for new QoS values to take effect anyway. Thus evaluating dev_update_qos_constraint() in those two places doesn't make sense at all, so drop it. Second, initialize effective_constraint_ns to 0 ("no constraint") rather than to (-1) ("no suspend"), which makes more sense in general and in case effective_constraint_ns is never updated (the device is in suspend all the time or it is never suspended) it doesn't affect the device's parent and so on. Finally, rework default_suspend_ok() to explicitly handle the "no restriction" and "no suspend" special cases. Signed-off-by: Rafael J. Wysocki Tested-by: Geert Uytterhoeven Tested-by: Tero Kristo Reviewed-by: Ramesh Thomas drivers/base/power/domain.c | 2 +- drivers/base/power/domain_governor.c | 71 +++++++++++++++++++++++++----------- 2 files changed, 50 insertions(+), 23 deletions(-) commit 80eff6c484799722736471d15ff9cc86b64cae7a Author: Balbir Singh Date: Mon Oct 30 22:01:12 2017 +1100 powerpc/xmon: Support dumping software pagetables It would be nice to be able to dump page tables in a particular context. eg: dumping vmalloc space: 0:mon> dv 0xd00037fffff00000 pgd @ 0xc0000000017c0000 pgdp @ 0xc0000000017c00d8 = 0x00000000f10b1000 pudp @ 0xc0000000f10b13f8 = 0x00000000f10d0000 pmdp @ 0xc0000000f10d1ff8 = 0x00000000f1102000 ptep @ 0xc0000000f1102780 = 0xc0000000f1ba018e Maps physical address = 0x00000000f1ba0000 Flags = Accessed Dirty Read Write This patch does not replicate the complex code of dump_pagetable and has no support for bolted linear mapping, thats why I've it's called dump virtual page table support. The format of the PTE can be expanded even further to add more useful information about the flags in the PTE if required. Signed-off-by: Balbir Singh [mpe: Bike shed the output format, show the pgdir, fix build failures] Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 116 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) commit da924c3a0d3f45bf8c46e83a7aa1b75b86f1e7a0 Author: Mark Brown Date: Thu Sep 7 14:22:48 2017 +0100 ASoC: pcm512x: Scrub my work address from the driver It's difficult for me to handle upstream mail that ends up in my work account and this was done outside of work anyway so replace my work address with my usual address for upstream stuff. Signed-off-by: Mark Brown sound/soc/codecs/pcm512x-i2c.c | 4 ++-- sound/soc/codecs/pcm512x-spi.c | 2 +- sound/soc/codecs/pcm512x.c | 4 ++-- sound/soc/codecs/pcm512x.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit 29fae2c1db242a39c5c7c49434fb183f990df2f8 Author: Colin Ian King Date: Sun Nov 5 11:53:26 2017 +0000 backlight: ili922x: Remove redundant variable len The variable len is assigned but never read, therefore it is redundant and can be removed. Cleans up clang warning: drivers/video/backlight/ili922x.c:276:2: warning: Value stored to 'len' is never read Signed-off-by: Colin Ian King Acked-by: Daniel Thompson Acked-by: Jingoo Han Signed-off-by: Lee Jones drivers/video/backlight/ili922x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 47427379ea80f1368ccec6ba20874fc19a9f0cc4 Author: Randy Dunlap Date: Tue Nov 7 10:28:06 2017 -0800 documentation: fb: update list of available compiled-in fonts Update list of available compiled-in fonts in lib/fonts/: add 6x10 and drop RomanLarge (which was reverted 12 years ago). Also sort the list alphabetically. Signed-off-by: Randy Dunlap Acked-by: Geert Uytterhoeven # v1 Signed-off-by: Jonathan Corbet Documentation/fb/fbcon.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b2ec33d438cca839fbb5764bcf5e29cffb3b9721 Author: James Hogan Date: Wed Nov 8 09:21:15 2017 +0000 MIPS: ralink: Drop obsolete USB_ARCH_HAS_HCD select Building an allnoconfig kernel based on the ralink platform results in the following warning: warning: (SOC_RT305X) selects USB_ARCH_HAS_HCD which has unmet direct dependencies (USB_SUPPORT) This is because SOC_RT305X unconditionally selects USB_ARCH_HAS_HCD which depends on USB_SUPPORT. However USB_ARCH_HAS_HCD has been effectively obsolete since commit d9ea21a77927 ("usb: host: make USB_ARCH_HAS_?HCI obsolete") in 3.11. USB_ARCH_HAS_HCD is now set by default whenever USB_SUPPORT is, so drop the select to silence the warning. Signed-off-by: James Hogan Cc: Ralf Baechle Cc: John Crispin Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17618/ arch/mips/ralink/Kconfig | 1 - 1 file changed, 1 deletion(-) commit a9e017d5619eb371460c8e516f4684def62bef3a Author: Ricardo Neri Date: Sun Nov 5 18:27:57 2017 -0800 selftests/x86: Add tests for the STR and SLDT instructions The STR and SLDT instructions are not valid when running on virtual-8086 mode and generate an invalid operand exception. These two instructions are protected by the Intel User-Mode Instruction Prevention (UMIP) security feature. In protected mode, if UMIP is enabled, these instructions generate a general protection fault if called from CPL > 0. Linux traps the general protection fault and emulates the instructions sgdt, sidt and smsw; but not str and sldt. These tests are added to verify that the emulation code does not emulate these two instructions but the expected invalid operand exception is seen. Tests fallback to exit with INT3 in case emulation does happen. Signed-off-by: Ricardo Neri Reviewed-by: Thomas Gleixner Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Chen Yucong Cc: Chris Metcalf Cc: Dave Hansen Cc: Denys Vlasenko Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Huang Rui Cc: Jiri Slaby Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Ravi V. Shankar Cc: Shuah Khan Cc: Tony Luck Cc: Vlastimil Babka Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1509935277-22138-13-git-send-email-ricardo.neri-calderon@linux.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/entry_from_vm86.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 9390afebe1d3f5a0be18b1afdd0ce09d67cebf9e Author: Ricardo Neri Date: Sun Nov 5 18:27:56 2017 -0800 selftests/x86: Add tests for User-Mode Instruction Prevention Certain user space programs that run on virtual-8086 mode may utilize instructions protected by the User-Mode Instruction Prevention (UMIP) security feature present in new Intel processors: SGDT, SIDT and SMSW. In such a case, a general protection fault is issued if UMIP is enabled. When such a fault happens, the kernel traps it and emulates the results of these instructions with dummy values. The purpose of this new test is to verify whether the impacted instructions can be executed without causing such #GP. If no #GP exceptions occur, we expect to exit virtual-8086 mode from INT3. The instructions protected by UMIP are executed in representative use cases: a) displacement-only memory addressing b) register-indirect memory addressing c) results stored directly in operands Unfortunately, it is not possible to check the results against a set of expected values because no emulation will occur in systems that do not have the UMIP feature. Instead, results are printed for verification. A simple verification is done to ensure that results of all tests are identical. Signed-off-by: Ricardo Neri Reviewed-by: Thomas Gleixner Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Chen Yucong Cc: Chris Metcalf Cc: Dave Hansen Cc: Denys Vlasenko Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Huang Rui Cc: Jiri Slaby Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Ravi V. Shankar Cc: Shuah Khan Cc: Tony Luck Cc: Vlastimil Babka Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1509935277-22138-12-git-send-email-ricardo.neri-calderon@linux.intel.com Signed-off-by: Ingo Molnar tools/testing/selftests/x86/entry_from_vm86.c | 73 ++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) commit 6fc9dc81bff0ea461db534e2672acfdaf76f3e4e Author: Ricardo Neri Date: Sun Nov 5 18:27:55 2017 -0800 x86/traps: Fix up general protection faults caused by UMIP If the User-Mode Instruction Prevention CPU feature is available and enabled, a general protection fault will be issued if the instructions sgdt, sldt, sidt, str or smsw are executed from user-mode context (CPL > 0). If the fault was caused by any of the instructions protected by UMIP, fixup_umip_exception() will emulate dummy results for these instructions as follows: in virtual-8086 and protected modes, sgdt, sidt and smsw are emulated; str and sldt are not emulated. No emulation is done for user-space long mode processes. If emulation is successful, the emulated result is passed to the user space program and no SIGSEGV signal is emitted. Signed-off-by: Ricardo Neri Reviewed-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Cc: Andrew Morton Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Chen Yucong Cc: Chris Metcalf Cc: Dave Hansen Cc: Denys Vlasenko Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Huang Rui Cc: Jiri Slaby Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Ravi V. Shankar Cc: Shuah Khan Cc: Tony Luck Cc: Vlastimil Babka Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1509935277-22138-11-git-send-email-ricardo.neri-calderon@linux.intel.com [ Added curly braces. ] Signed-off-by: Ingo Molnar arch/x86/kernel/traps.c | 6 ++++++ 1 file changed, 6 insertions(+) commit aa35f896979d9610bb11df485cf7bb6ca241febb Author: Ricardo Neri Date: Sun Nov 5 18:27:54 2017 -0800 x86/umip: Enable User-Mode Instruction Prevention at runtime User-Mode Instruction Prevention (UMIP) is enabled by setting/clearing a bit in %cr4. It makes sense to enable UMIP at some point while booting, before user spaces come up. Like SMAP and SMEP, is not critical to have it enabled very early during boot. This is because UMIP is relevant only when there is a user space to be protected from. Given these similarities, UMIP can be enabled along with SMAP and SMEP. At the moment, UMIP is disabled by default at build time. It can be enabled at build time by selecting CONFIG_X86_INTEL_UMIP. If enabled at build time, it can be disabled at run time by adding clearcpuid=514 to the kernel parameters. Signed-off-by: Ricardo Neri Reviewed-by: Thomas Gleixner Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Chen Yucong Cc: Chris Metcalf Cc: Dave Hansen Cc: Denys Vlasenko Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Huang Rui Cc: Jiri Slaby Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Ravi V. Shankar Cc: Shuah Khan Cc: Tony Luck Cc: Vlastimil Babka Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1509935277-22138-10-git-send-email-ricardo.neri-calderon@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/Kconfig | 10 ++++++++++ arch/x86/kernel/cpu/common.c | 25 ++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) commit c6a960bbf6a36572a06bde866d94a7338c7f256a Author: Ricardo Neri Date: Sun Nov 5 18:27:53 2017 -0800 x86/umip: Force a page fault when unable to copy emulated result to user fixup_umip_exception() will be called from do_general_protection(). If the former returns false, the latter will issue a SIGSEGV with SEND_SIG_PRIV. However, when emulation is successful but the emulated result cannot be copied to user space memory, it is more accurate to issue a SIGSEGV with SEGV_MAPERR with the offending address. A new function, inspired in force_sig_info_fault(), is introduced to model the page fault. Signed-off-by: Ricardo Neri Reviewed-by: Thomas Gleixner Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Chen Yucong Cc: Chris Metcalf Cc: Dave Hansen Cc: Denys Vlasenko Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Huang Rui Cc: Jiri Slaby Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Ravi V. Shankar Cc: Shuah Khan Cc: Tony Luck Cc: Vlastimil Babka Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1509935277-22138-9-git-send-email-ricardo.neri-calderon@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/umip.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) commit 1e5db223696afa55e6a038fac638f759e1fdcc01 Author: Ricardo Neri Date: Sun Nov 5 18:27:52 2017 -0800 x86/umip: Add emulation code for UMIP instructions The feature User-Mode Instruction Prevention present in recent Intel processor prevents a group of instructions (sgdt, sidt, sldt, smsw, and str) from being executed with CPL > 0. Otherwise, a general protection fault is issued. Rather than relaying to the user space the general protection fault caused by the UMIP-protected instructions (in the form of a SIGSEGV signal), it can be trapped and the instruction emulated to provide a dummy result. This allows to both conserve the current kernel behavior and not reveal the system resources that UMIP intends to protect (i.e., the locations of the global descriptor and interrupt descriptor tables, the segment selectors of the local descriptor table, the value of the task state register and the contents of the CR0 register). This emulation is needed because certain applications (e.g., WineHQ and DOSEMU2) rely on this subset of instructions to function. Given that sldt and str are not commonly used in programs that run on WineHQ or DOSEMU2, they are not emulated. Also, emulation is provided only for 32-bit processes; 64-bit processes that attempt to use the instructions that UMIP protects will receive the SIGSEGV signal issued as a consequence of the general protection fault. The instructions protected by UMIP can be split in two groups. Those which return a kernel memory address (sgdt and sidt) and those which return a value (smsw, sldt and str; the last two not emulated). For the instructions that return a kernel memory address, applications such as WineHQ rely on the result being located in the kernel memory space, not the actual location of the table. The result is emulated as a hard-coded value that lies close to the top of the kernel memory. The limit for the GDT and the IDT are set to zero. The instruction smsw is emulated to return the value that the register CR0 has at boot time as set in the head_32. Care is taken to appropriately emulate the results when segmentation is used. That is, rather than relying on USER_DS and USER_CS, the function insn_get_addr_ref() inspects the segment descriptor pointed by the registers in pt_regs. This ensures that we correctly obtain the segment base address and the address and operand sizes even if the user space application uses a local descriptor table. Signed-off-by: Ricardo Neri Reviewed-by: Thomas Gleixner Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Chen Yucong Cc: Chris Metcalf Cc: Dave Hansen Cc: Denys Vlasenko Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Huang Rui Cc: Jiri Slaby Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Ravi V. Shankar Cc: Shuah Khan Cc: Tony Luck Cc: Vlastimil Babka Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1509935277-22138-8-git-send-email-ricardo.neri-calderon@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/umip.h | 12 ++ arch/x86/kernel/Makefile | 1 + arch/x86/kernel/umip.c | 321 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 334 insertions(+) commit 3522c2a6a4f341058b8291326a945e2a2d2aaf55 Author: Ricardo Neri Date: Sun Nov 5 18:27:51 2017 -0800 x86/cpufeature: Add User-Mode Instruction Prevention definitions User-Mode Instruction Prevention is a security feature present in new Intel processors that, when set, prevents the execution of a subset of instructions if such instructions are executed in user mode (CPL > 0). Attempting to execute such instructions causes a general protection exception. The subset of instructions comprises: * SGDT - Store Global Descriptor Table * SIDT - Store Interrupt Descriptor Table * SLDT - Store Local Descriptor Table * SMSW - Store Machine Status Word * STR - Store Task Register This feature is also added to the list of disabled-features to allow a cleaner handling of build-time configuration. Signed-off-by: Ricardo Neri Reviewed-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Chen Yucong Cc: Chris Metcalf Cc: Dave Hansen Cc: Denys Vlasenko Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Huang Rui Cc: Jiri Slaby Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Ravi V. Shankar Cc: Shuah Khan Cc: Tony Luck Cc: Vlastimil Babka Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1509935277-22138-7-git-send-email-ricardo.neri-calderon@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/disabled-features.h | 8 +++++++- arch/x86/include/uapi/asm/processor-flags.h | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) commit 9c6c799faeed54b17857c2eed9058a25b8ee3614 Author: Ricardo Neri Date: Sun Nov 5 18:27:50 2017 -0800 x86/insn-eval: Add support to resolve 16-bit address encodings Tasks running in virtual-8086 mode, in protected mode with code segment descriptors that specify 16-bit default address sizes via the D bit, or via an address override prefix will use 16-bit addressing form encodings as described in the Intel 64 and IA-32 Architecture Software Developer's Manual Volume 2A Section 2.1.5, Table 2-1. 16-bit addressing encodings differ in several ways from the 32-bit/64-bit addressing form encodings: ModRM.rm points to different registers and, in some cases, effective addresses are indicated by the addition of the value of two registers. Also, there is no support for SIB bytes. Thus, a separate function is needed to parse this form of addressing. Three functions are introduced. get_reg_offset_16() obtains the offset from the base of pt_regs of the registers indicated by the ModRM byte of the address encoding. get_eff_addr_modrm_16() computes the effective address from the value of the register operands. get_addr_ref_16() computes the linear address using the obtained effective address and the base address of the segment. Segment limits are enforced when running in protected mode. Signed-off-by: Ricardo Neri Reviewed-by: Thomas Gleixner Cc: Adam Buchbinder Cc: Adrian Hunter Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Chen Yucong Cc: Chris Metcalf Cc: Colin Ian King Cc: Dave Hansen Cc: Denys Vlasenko Cc: Dmitry Vyukov Cc: H. Peter Anvin Cc: Huang Rui Cc: Jiri Slaby Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kees Cook Cc: Linus Torvalds Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Qiaowei Ren Cc: Ravi V. Shankar Cc: Shuah Khan Cc: Thomas Garnier Cc: Tony Luck Cc: Vlastimil Babka Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1509935277-22138-6-git-send-email-ricardo.neri-calderon@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/lib/insn-eval.c | 213 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 212 insertions(+), 1 deletion(-) commit 86cc35109029b7f1b195cef6c74654bad95e81af Author: Ricardo Neri Date: Sun Nov 5 18:27:49 2017 -0800 x86/insn-eval: Handle 32-bit address encodings in virtual-8086 mode It is possible to utilize 32-bit address encodings in virtual-8086 mode via an address override instruction prefix. However, the range of the effective address is still limited to [0x-0xffff]. In such a case, return error. Also, linear addresses in virtual-8086 mode are limited to 20 bits. Enforce such limit by truncating the most significant bytes of the computed linear address. Signed-off-by: Ricardo Neri Reviewed-by: Thomas Gleixner Cc: Adam Buchbinder Cc: Adrian Hunter Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Chen Yucong Cc: Chris Metcalf Cc: Colin Ian King Cc: Dave Hansen Cc: Denys Vlasenko Cc: Dmitry Vyukov Cc: H. Peter Anvin Cc: Huang Rui Cc: Jiri Slaby Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kees Cook Cc: Linus Torvalds Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Qiaowei Ren Cc: Ravi V. Shankar Cc: Shuah Khan Cc: Thomas Garnier Cc: Tony Luck Cc: Vlastimil Babka Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1509935277-22138-5-git-send-email-ricardo.neri-calderon@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/lib/insn-eval.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit cd9b594a9ef122a41bc961c330a55d87e226822f Author: Ricardo Neri Date: Sun Nov 5 18:27:48 2017 -0800 x86/insn-eval: Add wrapper function for 32 and 64-bit addresses The function insn_get_addr_ref() is capable of handling only 64-bit addresses. A previous commit introduced a function to handle 32-bit addresses. Invoke these two functions from a third wrapper function that calls the appropriate routine based on the address size specified in the instruction structure (obtained by looking at the code segment default address size and the address override prefix, if present). While doing this, rename the original function insn_get_addr_ref() with the more appropriate name get_addr_ref_64(), ensure it is only used for 64-bit addresses. Also, since 64-bit addresses are not possible in 32-bit builds, provide a dummy function such case. Signed-off-by: Ricardo Neri Reviewed-by: Thomas Gleixner Cc: Adam Buchbinder Cc: Adrian Hunter Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Chen Yucong Cc: Chris Metcalf Cc: Colin Ian King Cc: Dave Hansen Cc: Denys Vlasenko Cc: Dmitry Vyukov Cc: H. Peter Anvin Cc: Huang Rui Cc: Jiri Slaby Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kees Cook Cc: Linus Torvalds Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Qiaowei Ren Cc: Ravi V. Shankar Cc: Shuah Khan Cc: Thomas Garnier Cc: Tony Luck Cc: Vlastimil Babka Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1509935277-22138-4-git-send-email-ricardo.neri-calderon@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/lib/insn-eval.c | 60 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 5 deletions(-) commit 7a6daf79123a086f03b8cdfbc953958c8e1c1287 Author: Ricardo Neri Date: Sun Nov 5 18:27:47 2017 -0800 x86/insn-eval: Add support to resolve 32-bit address encodings 32-bit and 64-bit address encodings are identical. Thus, the same logic could be used to resolve the effective address. However, there are two key differences: address size and enforcement of segment limits. If running a 32-bit process on a 64-bit kernel, it is best to perform the address calculation using 32-bit data types. In this manner hardware is used for the arithmetic, including handling of signs and overflows. 32-bit addresses are generally used in protected mode; segment limits are enforced in this mode. This implementation obtains the limit of the segment associated with the instruction operands and prefixes. If the computed address is outside the segment limits, an error is returned. It is also possible to use 32-bit address in long mode and virtual-8086 mode by using an address override prefix. In such cases, segment limits are not enforced. Support to use 32-bit arithmetic is added to the utility functions that compute effective addresses. However, the end result is stored in a variable of type long (which has a width of 8 bytes in 64-bit builds). Hence, once a 32-bit effective address is computed, the 4 most significant bytes are masked out to avoid sign extension. The newly added function get_addr_ref_32() is almost identical to the existing function insn_get_addr_ref() (used for 64-bit addresses). The only difference is that it verifies that the effective address is within the limits of the segment. Signed-off-by: Ricardo Neri Reviewed-by: Thomas Gleixner Cc: Adam Buchbinder Cc: Adrian Hunter Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Chen Yucong Cc: Chris Metcalf Cc: Colin Ian King Cc: Dave Hansen Cc: Denys Vlasenko Cc: Dmitry Vyukov Cc: H. Peter Anvin Cc: Huang Rui Cc: Jiri Slaby Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kees Cook Cc: Linus Torvalds Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Qiaowei Ren Cc: Ravi V. Shankar Cc: Shuah Khan Cc: Thomas Garnier Cc: Tony Luck Cc: Vlastimil Babka Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1509935277-22138-3-git-send-email-ricardo.neri-calderon@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/lib/insn-eval.c | 112 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 106 insertions(+), 6 deletions(-) commit 70e57c0f4b502f2435b7649a201861fe212c2e4e Author: Ricardo Neri Date: Sun Nov 5 18:27:46 2017 -0800 x86/insn-eval: Compute linear address in several utility functions Computing a linear address involves several steps. The first step is to compute the effective address. This requires determining the addressing mode in use and perform arithmetic operations on the operands. Plus, each addressing mode has special cases that must be handled. Once the effective address is known, the base address of the applicable segment is added to obtain the linear address. Clearly, this is too much work for a single function. Instead, handle each addressing mode in a separate utility function. This improves readability and gives us the opportunity to handler errors better. At the moment, arithmetic to compute the effective address uses 64-byte variables. Thus, limit support to 64-bit addresses. While reworking the function insn_get_addr_ref(), the variable addr_offset is renamed as regoff to reflect its actual use (i.e., offset, from the base of pt_regs, of the register used as operand). Suggested-by: Borislav Petkov Signed-off-by: Ricardo Neri Reviewed-by: Thomas Gleixner Cc: Adam Buchbinder Cc: Adrian Hunter Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: Chen Yucong Cc: Chris Metcalf Cc: Colin Ian King Cc: Dave Hansen Cc: Denys Vlasenko Cc: Dmitry Vyukov Cc: H. Peter Anvin Cc: Huang Rui Cc: Jiri Slaby Cc: Jonathan Corbet Cc: Josh Poimboeuf Cc: Kees Cook Cc: Linus Torvalds Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Qiaowei Ren Cc: Ravi V. Shankar Cc: Shuah Khan Cc: Thomas Garnier Cc: Tony Luck Cc: Vlastimil Babka Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1509935277-22138-2-git-send-email-ricardo.neri-calderon@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/lib/insn-eval.c | 243 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 185 insertions(+), 58 deletions(-) commit b04db8e19fc2e9131524dec43057c1b96d5ba3ba Author: Frederic Weisbecker Date: Mon Nov 6 16:01:30 2017 +0100 rcu: Use lockdep to assert IRQs are disabled/enabled Lockdep now has an integrated IRQs disabled/enabled sanity check. Just use it instead of the ad-hoc RCU version. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Acked-by: Paul E. McKenney Cc: David S . Miller Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Tejun Heo Link: http://lkml.kernel.org/r/1509980490-4285-15-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar kernel/rcu/tree.c | 16 ++++++++-------- kernel/rcu/tree_plugin.h | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) commit af0733937317e1e03b60f3af8cf9cd59d665593c Author: Frederic Weisbecker Date: Mon Nov 6 16:01:29 2017 +0100 netpoll: Use lockdep to assert IRQs are disabled/enabled Use lockdep to check that IRQs are enabled or disabled as expected. This way the sanity check only shows overhead when concurrency correctness debug code is enabled. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: David S. Miller Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Tejun Heo Link: http://lkml.kernel.org/r/1509980490-4285-14-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar net/core/netpoll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a69682200db9c2c26594188f81dd2df560af4683 Author: Frederic Weisbecker Date: Mon Nov 6 16:01:28 2017 +0100 timers/posix-cpu-timers: Use lockdep to assert IRQs are disabled/enabled Use lockdep to check that IRQs are enabled or disabled as expected. This way the sanity check only shows overhead when concurrency correctness debug code is enabled. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: David S . Miller Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Tejun Heo Link: http://lkml.kernel.org/r/1509980490-4285-13-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar kernel/time/posix-cpu-timers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2c11dba00a39007b457c7607c1b1a4db95ca04bc Author: Frederic Weisbecker Date: Mon Nov 6 16:01:27 2017 +0100 sched/clock, sched/cputime: Use lockdep to assert IRQs are disabled/enabled Use lockdep to check that IRQs are enabled or disabled as expected. This way the sanity check only shows overhead when concurrency correctness debug code is enabled. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: David S . Miller Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Tejun Heo Link: http://lkml.kernel.org/r/1509980490-4285-12-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar kernel/sched/clock.c | 2 +- kernel/sched/cputime.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit 3c7169a3bf8216a56761a8edf775072dd36a00a0 Author: Frederic Weisbecker Date: Mon Nov 6 16:01:26 2017 +0100 irq_work: Use lockdep to assert IRQs are disabled/enabled Use lockdep to check that IRQs are enabled or disabled as expected. This way the sanity check only shows overhead when concurrency correctness debug code is enabled. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: David S . Miller Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Tejun Heo Link: http://lkml.kernel.org/r/1509980490-4285-11-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar kernel/irq_work.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a934d4d15f040cdd254350e7270b35cc7521e12e Author: Frederic Weisbecker Date: Mon Nov 6 16:01:25 2017 +0100 irq/timings: Use lockdep to assert IRQs are disabled/enabled Use lockdep to check that IRQs are enabled or disabled as expected. This way the sanity check only shows overhead when concurrency correctness debug code is enabled. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: David S . Miller Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Tejun Heo Link: http://lkml.kernel.org/r/1509980490-4285-10-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar kernel/irq/timings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 164446455a5d3f1402b5a0ea42acce33fd576ed7 Author: Frederic Weisbecker Date: Mon Nov 6 16:01:24 2017 +0100 perf/core: Use lockdep to assert IRQs are disabled/enabled Use lockdep to check that IRQs are enabled or disabled as expected. This way the sanity check only shows overhead when concurrency correctness debug code is enabled. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: David S . Miller Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Tejun Heo Link: http://lkml.kernel.org/r/1509980490-4285-9-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar kernel/events/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7a10e2a9190628a4024ea394ce7bd641ae40ffd1 Author: Frederic Weisbecker Date: Mon Nov 6 16:01:23 2017 +0100 x86: Use lockdep to assert IRQs are disabled/enabled Use lockdep to check that IRQs are enabled or disabled as expected. This way the sanity check only shows overhead when concurrency correctness debug code is enabled. It also makes no more sense to fix the IRQ flags when a bug is detected as the assertion is now pure config-dependent debugging. And to quote Peter Zijlstra: The whole if !disabled, disable logic is uber paranoid programming, but I don't think we've ever seen that WARN trigger, and if it does (and then burns the kernel) we at least know what happend. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: David S . Miller Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Tejun Heo Link: http://lkml.kernel.org/r/1509980490-4285-8-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/common.c | 4 +--- arch/x86/kernel/smpboot.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) commit 83efcbd028ad3aec36b5a3882cfa32490c135df7 Author: Frederic Weisbecker Date: Mon Nov 6 16:01:22 2017 +0100 smp/core: Use lockdep to assert IRQs are disabled/enabled Use lockdep to check that IRQs are enabled or disabled as expected. This way the sanity check only shows overhead when concurrency correctness debug code is enabled. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: David S . Miller Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Tejun Heo Link: http://lkml.kernel.org/r/1509980490-4285-7-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53bef3fd47f69e40b52c9f9acd3551dfff9f8702 Author: Frederic Weisbecker Date: Mon Nov 6 16:01:21 2017 +0100 timers/hrtimer: Use lockdep to assert IRQs are disabled/enabled Use lockdep to check that IRQs are enabled or disabled as expected. This way the sanity check only shows overhead when concurrency correctness debug code is enabled. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: David S . Miller Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Tejun Heo Link: http://lkml.kernel.org/r/1509980490-4285-6-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar kernel/time/hrtimer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ebf3adbad012b89c4a51a3beae718a587d988a3a Author: Frederic Weisbecker Date: Mon Nov 6 16:01:20 2017 +0100 timers/nohz: Use lockdep to assert IRQs are disabled/enabled Use lockdep to check that IRQs are enabled or disabled as expected. This way the sanity check only shows overhead when concurrency correctness debug code is enabled. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: David S . Miller Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Tejun Heo Link: http://lkml.kernel.org/r/1509980490-4285-5-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar kernel/time/tick-sched.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8e8eb730759f9cfd7a761b0b4ee41d714e720993 Author: Frederic Weisbecker Date: Mon Nov 6 16:01:19 2017 +0100 workqueue: Use lockdep to assert IRQs are disabled/enabled Use lockdep to check that IRQs are enabled or disabled as expected. This way the sanity check only shows overhead when concurrency correctness debug code is enabled. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Acked-by: Tejun Heo Cc: David S . Miller Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1509980490-4285-4-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar kernel/workqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f71b74bca637fca7de78f1d44eaefde5bc900f9f Author: Frederic Weisbecker Date: Mon Nov 6 16:01:18 2017 +0100 irq/softirqs: Use lockdep to assert IRQs are disabled/enabled Use lockdep to check that IRQs are enabled or disabled as expected. This way the sanity check only shows overhead when concurrency correctness debug code is enabled. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: David S . Miller Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Tejun Heo Link: http://lkml.kernel.org/r/1509980490-4285-3-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar kernel/softirq.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f54bb2ec02c839f6bfe3e8d438cd93d30b4809dd Author: Frederic Weisbecker Date: Mon Nov 6 16:01:17 2017 +0100 locking/lockdep: Add IRQs disabled/enabled assertion APIs: lockdep_assert_irqs_enabled()/disabled() Checking whether IRQs are enabled or disabled is a very common sanity check, however not free of overhead especially on fastpath where such assertion is very common. Lockdep is a good host for such concurrency correctness check and it even already tracks down IRQs disablement state. Just reuse its machinery. This will allow us to get rid of the flags pop and check overhead from fast path when kernel is built for production. Suggested-by: Peter Zijlstra Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: David S . Miller Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Tejun Heo Link: http://lkml.kernel.org/r/1509980490-4285-2-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar include/linux/lockdep.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 93c08089c06da402394605223b4faa73fe3730d2 Merge: 9275b933 7127126 Author: Ingo Molnar Date: Wed Nov 8 10:55:48 2017 +0100 Merge branch 'x86/mpx' into x86/asm, to pick up dependent commits The UMIP series is based on top of changes already queued up in the x86/mpx branch, so merge it. Signed-off-by: Ingo Molnar commit 97488c73190bb785cba818bf31e7361a27aded41 Author: Dan Carpenter Date: Wed Nov 8 11:44:15 2017 +0300 tcmu: Add a missing unlock on an error path We added a new error path here but we forgot to drop the lock first before returning. Fixes: 0d44374c1aae ("tcmu: fix double se_cmd completion") Signed-off-by: Dan Carpenter Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 1 + 1 file changed, 1 insertion(+) commit 16b932770417b1bc304d87c48aa0bb8a3c1164e1 Author: Dan Carpenter Date: Wed Nov 8 11:43:44 2017 +0300 tcmu: Fix some memory corruption "udev->nl_reply_supported" is an int but on 64 bit arches we are writing 8 bytes of data to it so it corrupts four bytes beyond the end of the struct. Fixes: b849b4567549 ("target: Add netlink command reply supported option for each device") Signed-off-by: Dan Carpenter Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8a103df440afea30c91ebd42e61dc644e647f4bd Merge: a9903f0 fbc3edf Author: Ingo Molnar Date: Wed Nov 8 10:17:15 2017 +0100 Merge branch 'linus' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit 11752adb68a388724b1935d57bf543897c34d80b Author: Waiman Long Date: Tue Nov 7 16:18:06 2017 -0500 locking/pvqspinlock: Implement hybrid PV queued/unfair locks Currently, all the lock waiters entering the slowpath will do one lock stealing attempt to acquire the lock. That helps performance, especially in VMs with over-committed vCPUs. However, the current pvqspinlocks still don't perform as good as unfair locks in many cases. On the other hands, unfair locks do have the problem of lock starvation that pvqspinlocks don't have. This patch combines the best attributes of an unfair lock and a pvqspinlock into a hybrid lock with 2 modes - queued mode & unfair mode. A lock waiter goes into the unfair mode when there are waiters in the wait queue but the pending bit isn't set. Otherwise, it will go into the queued mode waiting in the queue for its turn. On a 2-socket 36-core E5-2699 v3 system (HT off), a kernel build (make -j) was done in a VM with unpinned vCPUs 3 times with the best time selected and is the number of vCPUs available. The build times of the original pvqspinlock, hybrid pvqspinlock and unfair lock with various number of vCPUs are as follows: vCPUs pvqlock hybrid pvqlock unfair lock ----- ------- -------------- ----------- 30 342.1s 329.1s 329.1s 36 314.1s 305.3s 307.3s 45 345.0s 302.1s 306.6s 54 365.4s 308.6s 307.8s 72 358.9s 293.6s 303.9s 108 343.0s 285.9s 304.2s The hybrid pvqspinlock performs better or comparable to the unfair lock. By turning on QUEUED_LOCK_STAT, the table below showed the number of lock acquisitions in unfair mode and queue mode after a kernel build with various number of vCPUs. vCPUs queued mode unfair mode ----- ----------- ----------- 30 9,130,518 294,954 36 10,856,614 386,809 45 8,467,264 11,475,373 54 6,409,987 19,670,855 72 4,782,063 25,712,180 It can be seen that as the VM became more and more over-committed, the ratio of locks acquired in unfair mode increases. This is all done automatically to get the best overall performance as possible. Using a kernel locking microbenchmark with number of locking threads equals to the number of vCPUs available on the same machine, the minimum, average and maximum (min/avg/max) numbers of locking operations done per thread in a 5-second testing interval are shown below: vCPUs hybrid pvqlock unfair lock ----- -------------- ----------- 36 822,135/881,063/950,363 75,570/313,496/ 690,465 54 542,435/581,664/625,937 35,460/204,280/ 457,172 72 397,500/428,177/499,299 17,933/150,679/ 708,001 108 257,898/288,150/340,871 3,085/181,176/1,257,109 It can be seen that the hybrid pvqspinlocks are more fair and performant than the unfair locks in this test. The table below shows the kernel build times on a smaller 2-socket 16-core 32-thread E5-2620 v4 system. vCPUs pvqlock hybrid pvqlock unfair lock ----- ------- -------------- ----------- 16 436.8s 433.4s 435.6s 36 366.2s 364.8s 364.5s 48 423.6s 376.3s 370.2s 64 433.1s 376.6s 376.8s Again, the performance of the hybrid pvqspinlock was comparable to that of the unfair lock. Signed-off-by: Waiman Long Reviewed-by: Juergen Gross Reviewed-by: Eduardo Valentin Acked-by: Peter Zijlstra Cc: Boris Ostrovsky Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1510089486-3466-1-git-send-email-longman@redhat.com Signed-off-by: Ingo Molnar kernel/locking/qspinlock_paravirt.h | 47 ++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 9 deletions(-) commit 9eb719855f6c9b21eb5889d9ac2ca1c60527ad89 Author: Josh Poimboeuf Date: Tue Nov 7 21:01:52 2017 -0600 objtool: Fix cross-build Stephen Rothwell reported this cross-compilation build failure: | In file included from orc_dump.c:19:0: | orc.h:21:10: fatal error: asm/orc_types.h: No such file or directory | ... Caused by: 6a77cff819ae ("objtool: Move synced files to their original relative locations") Use the proper arch header files location, not the host-arch location. Bisected-by: Stephen Rothwell Reported-by: Stephen Rothwell Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Linux-Next Mailing List Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171108030152.bd76eahiwjwjt3kp@treble Signed-off-by: Ingo Molnar tools/objtool/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 978fa72e82e375764e6e31e7a721408c5186918f Author: Heiko Carstens Date: Thu Nov 2 12:51:45 2017 +0100 s390: remove named saved segment support Remove the support to create a z/VM named saved segment (NSS). This feature is not supported since quite a while in favour of jump labels, function tracing and (now) CPU alternatives. All of these features require to write to the kernel text section which is not possible if the kernel is contained within an NSS. Given that memory savings are minimal if kernel images are shared and in addition updates of shared images are painful, the NSS feature can be removed. Reviewed-by: Hendrik Brueckner Signed-off-by: Heiko Carstens arch/s390/Kconfig | 13 ---- arch/s390/include/asm/ipl.h | 3 +- arch/s390/include/asm/sections.h | 2 +- arch/s390/include/asm/setup.h | 3 - arch/s390/kernel/early.c | 141 --------------------------------------- arch/s390/kernel/ipl.c | 36 ---------- arch/s390/kernel/machine_kexec.c | 4 -- arch/s390/kernel/suspend.c | 8 +-- arch/s390/kernel/vmlinux.lds.S | 5 -- arch/s390/mm/vmem.c | 4 +- 10 files changed, 9 insertions(+), 210 deletions(-) commit f44fa88745eda1530083b361e300e1ca4e15a6c5 Author: Harald Freudenberger Date: Fri Oct 27 15:53:49 2017 +0200 s390/archrandom: Reconsider s390 arch random implementation The reworked version of the random device driver now calls the arch_get_random_* functions on a very high frequency. It does about 100.000 calls to arch_get_random_long for providing 10 MB via /dev/urandom. Each invocation was fetching entropy from the hardware random generator which has a rate limit of about 4 MB/s. As the trng invocation waits until enough entropy is gathered, the random device driver is slowed down dramatically. The s390 true random generator is not designed for such a high rate. The TRNG is more designed to be used together with the arch_get_random_seed_* functions. This is similar to the way how powerpc has implemented their arch random functionality. This patch removes the invocations of the s390 TRNG for arch_get_random_long() and arch_get_random_int() but leaving the invocations for arch_get_random_seed_long() and arch_get_random_seed_int(). So the s390 arch random implementation now contributes high quality entropy to the kernel random device for reseeding. Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens arch/s390/include/asm/archrandom.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 48070c73058be6de9c0d754d441ed7092dfc8f12 Author: Christian Borntraeger Date: Mon Oct 30 14:38:58 2017 +0100 s390/pci: do not require AIS facility As of today QEMU does not provide the AIS facility to its guest. This prevents Linux guests from using PCI devices as the ais facility is checked during init. As this is just a performance optimization, we can move the ais check into the code where we need it (calling the SIC instruction). This is used at initialization and on interrupt. Both places do not require any serialization, so we can simply skip the instruction. Since we will now get all interrupts, we can also avoid the 2nd scan. As we can have multiple interrupts in parallel we might trigger spurious irqs more often for the non-AIS case but the core code can handle that. Signed-off-by: Christian Borntraeger Reviewed-by: Pierre Morel Reviewed-by: Halil Pasic Acked-by: Sebastian Ott Signed-off-by: Heiko Carstens arch/s390/include/asm/pci_insn.h | 2 +- arch/s390/pci/pci.c | 5 +++-- arch/s390/pci/pci_insn.c | 6 +++++- 3 files changed, 9 insertions(+), 4 deletions(-) commit b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3 Author: Yi Yang Date: Tue Nov 7 21:07:02 2017 +0800 openvswitch: enable NSH support v16->17 - Fixed disputed check code: keep them in nsh_push and nsh_pop but also add them in __ovs_nla_copy_actions v15->v16 - Add csum recalculation for nsh_push, nsh_pop and set_nsh pointed out by Pravin - Move nsh key into the union with ipv4 and ipv6 and add check for nsh key in match_validate pointed out by Pravin - Add nsh check in validate_set and __ovs_nla_copy_actions v14->v15 - Check size in nsh_hdr_from_nlattr - Fixed four small issues pointed out By Jiri and Eric v13->v14 - Rename skb_push_nsh to nsh_push per Dave's comment - Rename skb_pop_nsh to nsh_pop per Dave's comment v12->v13 - Fix NSH header length check in set_nsh v11->v12 - Fix missing changes old comments pointed out - Fix new comments for v11 v10->v11 - Fix the left three disputable comments for v9 but not fixed in v10. v9->v10 - Change struct ovs_key_nsh to struct ovs_nsh_key_base base; __be32 context[NSH_MD1_CONTEXT_SIZE]; - Fix new comments for v9 v8->v9 - Fix build error reported by daily intel build because nsh module isn't selected by openvswitch v7->v8 - Rework nested value and mask for OVS_KEY_ATTR_NSH - Change pop_nsh to adapt to nsh kernel module - Fix many issues per comments from Jiri Benc v6->v7 - Remove NSH GSO patches in v6 because Jiri Benc reworked it as another patch series and they have been merged. - Change it to adapt to nsh kernel module added by NSH GSO patch series v5->v6 - Fix the rest comments for v4. - Add NSH GSO support for VxLAN-gpe + NSH and Eth + NSH. v4->v5 - Fix many comments by Jiri Benc and Eric Garver for v4. v3->v4 - Add new NSH match field ttl - Update NSH header to the latest format which will be final format and won't change per its author's confirmation. - Fix comments for v3. v2->v3 - Change OVS_KEY_ATTR_NSH to nested key to handle length-fixed attributes and length-variable attriubte more flexibly. - Remove struct ovs_action_push_nsh completely - Add code to handle nested attribute for SET_MASKED - Change PUSH_NSH to use the nested OVS_KEY_ATTR_NSH to transfer NSH header data. - Fix comments and coding style issues by Jiri and Eric v1->v2 - Change encap_nsh and decap_nsh to push_nsh and pop_nsh - Dynamically allocate struct ovs_action_push_nsh for length-variable metadata. OVS master and 2.8 branch has merged NSH userspace patch series, this patch is to enable NSH support in kernel data path in order that OVS can support NSH in compat mode by porting this. Signed-off-by: Yi Yang Acked-by: Jiri Benc Acked-by: Eric Garver Acked-by: Pravin Shelar Signed-off-by: David S. Miller include/net/nsh.h | 3 + include/uapi/linux/openvswitch.h | 29 ++++ net/nsh/nsh.c | 60 +++++++ net/openvswitch/Kconfig | 1 + net/openvswitch/actions.c | 116 +++++++++++++ net/openvswitch/flow.c | 51 ++++++ net/openvswitch/flow.h | 7 + net/openvswitch/flow_netlink.c | 343 ++++++++++++++++++++++++++++++++++++++- net/openvswitch/flow_netlink.h | 5 + 9 files changed, 613 insertions(+), 2 deletions(-) commit 7f5d3f2721b07ab5896526c5992edd2ab1665561 Author: Arnd Bergmann Date: Tue Nov 7 11:38:32 2017 +0100 pktgen: document 32-bit timestamp overflow Timestamps in pktgen are currently retrieved using the deprecated do_gettimeofday() function that wraps its signed 32-bit seconds in 2038 (on 32-bit architectures) and requires a division operation to calculate microseconds. The pktgen header is also defined with the same limitations, hardcoding to a 32-bit seconds field that can be interpreted as unsigned to produce times that only wrap in 2106. Whatever code reads the timestamps should be aware of that problem in general, but probably doesn't care too much as we are mostly interested in the time passing between packets, and that is correctly represented. Using 64-bit nanoseconds would be cheaper and good for 584 years. Using monotonic times would also make this unambiguous by avoiding the overflow, but would make it harder to correlate to the times with those on remote machines. Either approach would require adding a new runtime flag and implementing the same thing on the remote side, which we probably don't want to do unless someone sees it as a real problem. Also, this should be coordinated with other pktgen implementations and might need a new magic number. For the moment, I'm documenting the overflow in the source code, and changing the implementation over to an open-coded ktime_get_real_ts64() plus division, so we don't have to look at it again while scanning for deprecated time interfaces. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller net/core/pktgen.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit abf57f73ef0f88f215d35c1418bba0ab7bdee710 Author: Akshay Bhat Date: Fri Nov 3 13:32:40 2017 -0400 rtc: rx8010: Specify correct address for RX8010_RESV31 Define for reserved register 31 had the incorrect address. Specify the correct address. Reported-by: Jens-Peter Oswald Signed-off-by: Akshay Bhat Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx8010.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0b6576fcd01b7dea606312d36b91ed0c047673b Author: Akshay Bhat Date: Fri Nov 3 13:32:39 2017 -0400 rtc: rx8010: Remove duplicate define Remove duplicate define for RX8010_YEAR Signed-off-by: Akshay Bhat Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rx8010.c | 1 - 1 file changed, 1 deletion(-) commit 05a03bf260e0480bfc0db91b1fdbc2115e3f193b Author: Troy Kisky Date: Thu Nov 2 18:58:16 2017 -0700 rtc: m41t80: remove unneeded checks from m41t80_sqw_set_rate m41t80_sqw_set_rate will be called with the result from m41t80_sqw_round_rate, so might as well make m41t80_sqw_set_rate(n) same as m41t80_sqw_set_rate(m41t80_sqw_round_rate(n)) As Russell King wrote[1], "clk_round_rate() is supposed to tell you what you end up with if you ask clk_set_rate() to set the exact same value you passed in - but clk_round_rate() won't modify the hardware." [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2012-January/080175.html Signed-off-by: Troy Kisky Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 13bb1d78f2e372ec0d9b30489ac63768240140fc Author: Troy Kisky Date: Thu Nov 2 18:58:15 2017 -0700 rtc: m41t80: avoid i2c read in m41t80_sqw_is_prepared This is a little more efficient and avoids the warning WARNING: possible circular locking dependency detected 4.14.0-rc7-00010 #16 Not tainted ------------------------------------------------------ kworker/2:1/70 is trying to acquire lock: (prepare_lock){+.+.}, at: [] clk_prepare_lock+0x80/0xf4 but task is already holding lock: (i2c_register_adapter){+.+.}, at: [] i2c_adapter_lock_bus+0x14/0x18 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (i2c_register_adapter){+.+.}: rt_mutex_lock+0x44/0x5c i2c_adapter_lock_bus+0x14/0x18 i2c_transfer+0xa8/0xbc i2c_smbus_xfer+0x20c/0x5d8 i2c_smbus_read_byte_data+0x38/0x48 m41t80_sqw_is_prepared+0x18/0x28 Signed-off-by: Troy Kisky Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 2cb90ed3de1e279dbaf23df141f54eb9fb1861e6 Author: Troy Kisky Date: Thu Nov 2 18:58:14 2017 -0700 rtc: m41t80: avoid i2c read in m41t80_sqw_recalc_rate This is a little more efficient, and avoids the warning WARNING: possible circular locking dependency detected 4.14.0-rc7-00007 #14 Not tainted ------------------------------------------------------ alsactl/330 is trying to acquire lock: (prepare_lock){+.+.}, at: [] clk_prepare_lock+0x80/0xf4 but task is already holding lock: (i2c_register_adapter){+.+.}, at: [] i2c_adapter_lock_bus+0x14/0x18 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (i2c_register_adapter){+.+.}: rt_mutex_lock+0x44/0x5c i2c_adapter_lock_bus+0x14/0x18 i2c_transfer+0xa8/0xbc i2c_smbus_xfer+0x20c/0x5d8 i2c_smbus_read_byte_data+0x38/0x48 m41t80_sqw_recalc_rate+0x24/0x58 Signed-off-by: Troy Kisky Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit c8384bb04261b9d32fe7402a6068ddaf38913b23 Author: Troy Kisky Date: Thu Nov 2 18:58:13 2017 -0700 rtc: m41t80: fix m41t80_sqw_round_rate return value Previously it was returning the best of 32768, 8192, 1024, 64, 2, 0 Now, best of 32768, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 0 Signed-off-by: Troy Kisky Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit de6042d2fa8afe22b76e3c68fd6e9584c9415a3b Author: Troy Kisky Date: Thu Nov 2 18:58:12 2017 -0700 rtc: m41t80: m41t80_sqw_set_rate should return 0 on success Previously it was returning -EINVAL upon success. Signed-off-by: Troy Kisky Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m41t80.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a9687aa2764dd2669602bd19dc636cbeef5293d5 Author: Eric Nelson Date: Wed Nov 1 08:01:20 2017 -0700 rtc: add support for NXP PCF85363 real-time clock Note that alarms are not currently implemented. 64 bytes of nvmem is supported and exposed in sysfs (# is the instance number, starting with 0): /sys/bus/nvmem/devices/pcf85363-#/nvmem Signed-off-by: Eric Nelson Reviewed-by: Fabio Estevam Tested-by: Alexandre Belloni Acked-by: Rob Herring Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/rtc/pcf85363.txt | 17 ++ drivers/rtc/Kconfig | 13 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-pcf85363.c | 220 +++++++++++++++++++++ 4 files changed, 251 insertions(+) commit b6ee15efe6788113c4184843365f74fde08e6284 Author: Alexandre Belloni Date: Tue Oct 31 17:27:31 2017 +0100 rtc: omap: Support scratch registers Register an nvmem device to expose the 3 scratch registers (total of 12 bytes) to both userspace and kernel space. Reviewed-by: Sekhar Nori Tested-by: Keerthy Reviewed-by: Keerthy Signed-off-by: Alexandre Belloni drivers/rtc/rtc-omap.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit a9df21e34b422f79d9a9fa5c3eff8c2a53491be6 Author: Adam Wallis Date: Thu Nov 2 08:53:30 2017 -0400 dmaengine: dmatest: warn user when dma test times out Commit adfa543e7314 ("dmatest: don't use set_freezable_with_signal()") introduced a bug (that is in fact documented by the patch commit text) that leaves behind a dangling pointer. Since the done_wait structure is allocated on the stack, future invocations to the DMATEST can produce undesirable results (e.g., corrupted spinlocks). Ideally, this would be cleaned up in the thread handler, but at the very least, the kernel is left in a very precarious scenario that can lead to some long debug sessions when the crash comes later. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197605 Signed-off-by: Adam Wallis Signed-off-by: Vinod Koul drivers/dma/dmatest.c | 1 + 1 file changed, 1 insertion(+) commit 087ffdd2880b5dd7724ac6d0ca663da398fe1ccf Author: Vinod Koul Date: Wed Nov 8 11:01:45 2017 +0530 dmaengine: Revert "rcar-dmac: use TCRB instead of TCR for residue" This reverts commit 847449f23dcb: ("dmaengine: rcar-dmac: use TCRB instead of TCR for residue") as it breaks small serial console. Reported-by: Geert Uytterhoeven Signed-off-by: Vinod Koul drivers/dma/sh/rcar-dmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2eb3ed33e55d003d721d4d1a5e72fe323c12b4c0 Merge: 118d629 ba0e4d9 Author: David S. Miller Date: Wed Nov 8 14:22:50 2017 +0900 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next The following patchset contains Netfilter/IPVS updates for your net-next tree, they are: 1) Speed up table replacement on busy systems with large tables (and many cores) in x_tables. Now xt_replace_table() synchronizes by itself by waiting until all cpus had an even seqcount and we use no use seqlock when fetching old counters, from Florian Westphal. 2) Add nf_l4proto_log_invalid() and nf_ct_l4proto_log_invalid() to speed up packet processing in the fast path when logging is not enabled, from Florian Westphal. 3) Precompute masked address from configuration plane in xt_connlimit, from Florian. 4) Don't use explicit size for set selection if performance set policy is selected. 5) Allow to get elements from an existing set in nf_tables. 6) Fix incorrect check in nft_hash_deactivate(), from Florian. 7) Cache netlink attribute size result in l4proto->nla_size, from Florian. 8) Handle NFPROTO_INET in nf_ct_netns_get() from conntrack core. 9) Use power efficient workqueue in conntrack garbage collector, from Vincent Guittot. 10) Remove unnecessary parameter, in conntrack l4proto functions, also from Florian. 11) Constify struct nf_conntrack_l3proto definitions, from Florian. 12) Remove all typedefs in nf_conntrack_h323 via coccinelle semantic patch, from Harsha Sharma. 13) Don't store address in the rbtree nodes in xt_connlimit, they are never used, from Florian. 14) Fix out of bound access in the conntrack h323 helper, patch from Eric Sesterhenn. 15) Print symbols for the address returned with %pS in IPVS, from Helge Deller. 16) Proc output should only display its own netns in IPVS, from KUWAZAWA Takuya. 17) Small clean up in size_entry_mwt(), from Colin Ian King. 18) Use test_and_clear_bit from nf_nat_proto_clean() instead of separated non-atomic test and then clear bit, from Florian Westphal. 19) Consolidate prefix length maps in ipset, from Aaron Conole. 20) Fix sparse warnings in ipset, from Jozsef Kadlecsik. 21) Simplify list_set_memsize(), from simran singhal. ==================== Signed-off-by: David S. Miller commit d83f4131c2e06ef93cd3d6d44bb3475728790ab6 Author: Pierre-Yves MORDRET Date: Tue Oct 17 15:43:47 2017 +0200 dmaengine: stm32_mdma: activate pack/unpack feature If source and destination bus width differs pack/unpack MDMA feature has to be activated for alignment. This pack/unpack feature implies to have both source/destination address and buffer length aligned on bus width. Fixes: a4ffb13c8946 ("dmaengine: Add STM32 MDMA driver") Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Vinod Koul drivers/dma/stm32-mdma.c | 84 ++++++++++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 34 deletions(-) commit 77ea824c6d5430b887b00cda923397f43274d6e7 Author: Vinod Koul Date: Fri Nov 3 10:33:11 2017 +0530 dmaengine: at_hdmac: Remove unnecessary 0x prefixes before %pad Since commit 3cab1e711297 ("lib/vsprintf: refactor duplicate code to special_hex_number()") %pad doesn't need 0x prefix so drop that. Acked-by: Linus Walleij Signed-off-by: Vinod Koul drivers/dma/at_hdmac_regs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d82e05b3c4e2cdda861d43daf9df7b23afc3f1a Author: Vinod Koul Date: Fri Nov 3 10:33:11 2017 +0530 dmaengine: coh901318: Remove unnecessary 0x prefixes before %pad Since commit 3cab1e711297 ("lib/vsprintf: refactor duplicate code to special_hex_number()") %pad doesn't need 0x prefix so drop that. Acked-by: Ludovic Desroches Signed-off-by: Vinod Koul drivers/dma/coh901318.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 118d6298f6f0556e54331a6e86de2313d134fdbb Author: Miquel Raynal Date: Mon Nov 6 22:56:53 2017 +0100 net: mvpp2: add ethtool GOP statistics Add ethtool statistics support by reading the GOP statistics from the hardware counters. Also implement a workqueue to gather the statistics every second or some 32-bit counters could overflow. Suggested-by: Stefan Chulski Signed-off-by: Miquel Raynal Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 228 ++++++++++++++++++++++++++++++++++- 1 file changed, 223 insertions(+), 5 deletions(-) commit 403466feb1ac978a734518f7cee3cd9e63cb773c Merge: 03ac738 e51f37b Author: David S. Miller Date: Wed Nov 8 13:53:34 2017 +0900 Merge branch 'fsl-fman-next' Christophe JAILLET says: ==================== fsl/fman: Fix some error handling code in mac_probe Commit c6e26ea8c893 ("dpaa_eth: change device used") generated some conflicts in my patches waiting for submission. So I took a closer look at it. So here is a serie of 4 patches. The 1st one is just about a spurious call to 'dev_set_drvdata()', which is done in only 1 error handling path in the function. The 2nd one removes some devm_iounmap/release/kfree functions which look useless to me. The 3rd one fixes a missing of_node_put. The 4th one is just cosmetic and removes a useless message. ==================== Signed-off-by: David S. Miller commit e51f37bd3ae8e09d131bce5485ec7c5b03726b02 Author: Christophe JAILLET Date: Mon Nov 6 22:53:32 2017 +0100 fsl/fman: Remove a useless 'dev_err()' call Memory allocation functions already display some informaton in case of memory allocation failure. There is no need to add an extra 'dev_err' here. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/mac.c | 1 - 1 file changed, 1 deletion(-) commit 25850c31c8b5c2ce7fb922f5e80de7227ecf6be4 Author: Christophe JAILLET Date: Mon Nov 6 22:53:31 2017 +0100 fsl/fman: Add a missing 'of_node_put()' call in an error handling path If 'of_phy_find_device()' fails, we must undo the previous 'of_node_get()' call, as done the the following error handling code. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/mac.c | 1 + 1 file changed, 1 insertion(+) commit 336eac4347e74589f868e5da9ca0106953942aa8 Author: Christophe JAILLET Date: Mon Nov 6 22:53:30 2017 +0100 fsl/fman: Remove some useless code There is no need to release explicitly some devm_ allocated resources. If the 'mac_probe()' probe function fails, they will be released automatically, as already done in the other error handling paths of this function. Also goto '_return_of_get_parent' as in the other error handling paths. This is useless (priv->fixed_link is NULL at this point), but at least it is consistent. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/mac.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 5adb55c92918225005873aaac5e6af36789bf0ad Author: Christophe JAILLET Date: Mon Nov 6 22:53:29 2017 +0100 fsl/fman: Remove a useless call to 'dev_set_drvdata()' Commit c6e26ea8c893 ("dpaa_eth: change device used") has removed usage of 'dev_set_drvdata()' in the 'mac_probe() function. This call should also be axed. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/mac.c | 1 - 1 file changed, 1 deletion(-) commit 03ac738d5cf2f97ffa1209f6fd5d4bc211a933de Author: Colin Ian King Date: Mon Nov 6 15:04:54 2017 +0000 rtnetlink: fix missing size for IFLA_IF_NETNSID The size for IFLA_IF_NETNSID is missing from the size calculation because the proceeding semicolon was not removed. Fix this by removing the semicolon. Detected by CoverityScan, CID#1461135 ("Structurally dead code") Fixes: 79e1ad148c84 ("rtnetlink: use netnsid to query interface") Signed-off-by: Colin Ian King Acked-by: Jiri Benc Signed-off-by: David S. Miller net/core/rtnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac71a1f94418b9b83c9bf04f76954570d88c9590 Author: Egil Hjelmeland Date: Mon Nov 6 15:19:49 2017 +0100 net: dsa: lan9303: Drop port range check Now that ds->num_ports is 3, there is no need to check range of "port" parameter. Signed-off-by: Egil Hjelmeland Signed-off-by: David S. Miller drivers/net/dsa/lan9303-core.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) commit 7dfaa7bc99498da1c6c4a48bee8d2d5265161a8c Author: Arnd Bergmann Date: Mon Nov 6 15:04:39 2017 +0100 bnxt: fix bnxt_hwrm_fw_set_time for y2038 On 32-bit architectures, rtc_time_to_tm() returns incorrect results in 2038 or later, and do_gettimeofday() is broken for the same reason. This changes the code to use ktime_get_real_seconds() and time64_to_tm() instead, both of them are 2038-safe, and we can also get rid of the CONFIG_RTC_LIB dependency that way. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 96c623e51f1c40bf524decc48c6fac7ce5dd41f7 Author: Arnd Bergmann Date: Mon Nov 6 14:26:10 2017 +0100 of: add of_property_read_variable_* dummy helpers Commit a67e9472da42 ("of: Add array read functions with min/max size limits") added a new interface for reading variable-length arrays from DT properties. One user was added in dsa recently and this causes a build error because that code can be built with CONFIG_OF disabled: net/dsa/dsa2.c: In function 'dsa_switch_parse_member_of': net/dsa/dsa2.c:678:7: error: implicit declaration of function 'of_property_read_variable_u32_array'; did you mean 'of_property_read_u32_array'? [-Werror=implicit-function-declaration] This adds a dummy functions for of_property_read_variable_u32_array() and a few others that had been missing here. I decided to move of_property_read_string() and of_property_read_string_helper() in the process to make it easier to compare the two sets of function prototypes to make sure they match. Fixes: 975e6e32215e ("net: dsa: rework switch parsing") Signed-off-by: Arnd Bergmann Acked-by: Rob Herring Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller include/linux/of.h | 62 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 12 deletions(-) commit 42ca728b829b8fee8ac85adb79eaffd36f0b4e06 Author: Dan Carpenter Date: Mon Nov 6 14:43:01 2017 +0300 bnxt: delete some unreachable code We return on the previous line so this "return 0;" statement should just be deleted. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 1 - 1 file changed, 1 deletion(-) commit a8938773c1f8a10876e4be0d82f628be196e39aa Merge: d86fd11 92f25ca Author: David S. Miller Date: Wed Nov 8 13:29:06 2017 +0900 Merge branch 'dsa-lan9303-Linting' Egil Hjelmeland says: ==================== net: dsa: lan9303: Linting This series is non-functional. - Correct some errors in comments and documentation. Remove scripts/checkpatch.pl WARNINGs and most CHECKs: - Replace msleep(1) with usleep_range() - Adjust indenting Changes v1 -> v2: - Removed patch 4 "Remove unnecessary parentheses", to be addressed later ==================== Signed-off-by: David S. Miller commit 92f25cafe821f6bd7f7815128bc7584a69512f68 Author: Egil Hjelmeland Date: Mon Nov 6 12:42:04 2017 +0100 net: dsa: lan9303: Adjust indenting Remove scripts/checkpatch.pl CHECKs by adjusting indenting. Signed-off-by: Egil Hjelmeland Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/lan9303_i2c.c | 2 +- drivers/net/dsa/lan9303_mdio.c | 2 +- net/dsa/tag_lan9303.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit ec5c91c6ca8b2d5ca6edfc968dbfeeaae4ed5572 Author: Egil Hjelmeland Date: Mon Nov 6 12:42:03 2017 +0100 net: dsa: lan9303: Replace msleep(1) with usleep_range() Remove scripts/checkpatch.pl WARNING by replacing msleep(1) with usleep_range() Signed-off-by: Egil Hjelmeland Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/lan9303-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 68d50fa494f6265288b60151a6460b33290593c2 Author: Egil Hjelmeland Date: Mon Nov 6 12:42:02 2017 +0100 net: dsa: lan9303: Fix syntax errors in device tree examples Signed-off-by: Egil Hjelmeland Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/dsa/lan9303.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 620a5c860b774a81ce3f193eefb52bf4d128cca5 Author: Egil Hjelmeland Date: Mon Nov 6 12:42:01 2017 +0100 net: dsa: lan9303: Correct register names in comments Two comments refer to registers, but lack the LAN9303_ prefix. Fix that. Signed-off-by: Egil Hjelmeland Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller include/linux/dsa/lan9303.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit d86fd113ebbb37726ef7c7cc6fd6d5ce377455d6 Author: Wei Yongjun Date: Mon Nov 6 11:11:28 2017 +0000 mlxsw: spectrum: Fix error return code in mlxsw_sp_port_create() Fix to return a negative error code from the VID create error handling case instead of 0, as done elsewhere in this function. Fixes: c57529e1d5d8 ("mlxsw: spectrum: Replace vPorts with Port-VLAN") Signed-off-by: Wei Yongjun Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 + 1 file changed, 1 insertion(+) commit 29130853fe6dee04ad88d0586ff39182fa408a75 Author: Wei Yongjun Date: Mon Nov 6 11:12:08 2017 +0000 dpaa_eth: fix error return code in dpaa_eth_probe() Fix to return a negative error code from the dpaa_bp_alloc() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3fc9fb13a4b2576aeab86c62fd64eb29ab68659c Author: Nicholas Bellinger Date: Fri Oct 27 20:52:56 2017 -0700 iscsi-target: Fix non-immediate TMR reference leak This patch fixes a se_cmd->cmd_kref reference leak that can occur when a non immediate TMR is proceeded our of command sequence number order, and CMDSN_LOWER_THAN_EXP is returned by iscsit_sequence_cmd(). To address this bug, call target_put_sess_cmd() during this special case following what iscsit_process_scsi_cmd() does upon CMDSN_LOWER_THAN_EXP. Cc: Mike Christie Cc: Hannes Reinecke Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ae072726f6109bb1c94841d6fb3a82dde298ea85 Author: Nicholas Bellinger Date: Fri Oct 27 12:32:59 2017 -0700 iscsi-target: Make TASK_REASSIGN use proper se_cmd->cmd_kref Since commit 59b6986dbf fixed a potential NULL pointer dereference by allocating a se_tmr_req for ISCSI_TM_FUNC_TASK_REASSIGN, the se_tmr_req is currently leaked by iscsit_free_cmd() because no iscsi_cmd->se_cmd.se_tfo was associated. To address this, treat ISCSI_TM_FUNC_TASK_REASSIGN like any other TMR and call transport_init_se_cmd() + target_get_sess_cmd() to setup iscsi_cmd->se_cmd.se_tfo with se_cmd->cmd_kref of 2. This will ensure normal release operation once se_cmd->cmd_kref reaches zero and target_release_cmd_kref() is invoked, se_tmr_req will be released via existing target_free_cmd_mem() and core_tmr_release_req() code. Reported-by: Donald White Cc: Donald White Cc: Mike Christie Cc: Hannes Reinecke Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 1c21a48055a67ceb693e9c2587824a8de60a217c Author: Nicholas Bellinger Date: Fri Oct 27 22:19:26 2017 -0800 target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK This patch fixes bug where early se_cmd exceptions that occur before backend execution can result in use-after-free if/when a subsequent ABORT_TASK occurs for the same tag. Since an early se_cmd exception will have had se_cmd added to se_session->sess_cmd_list via target_get_sess_cmd(), it will not have CMD_T_COMPLETE set by the usual target_complete_cmd() backend completion path. This causes a subsequent ABORT_TASK + __target_check_io_state() to signal ABORT_TASK should proceed. As core_tmr_abort_task() executes, it will bring the outstanding se_cmd->cmd_kref count down to zero releasing se_cmd, after se_cmd has already been queued with error status into fabric driver response path code. To address this bug, introduce a CMD_T_PRE_EXECUTE bit that is set at target_get_sess_cmd() time, and cleared immediately before backend driver dispatch in target_execute_cmd() once CMD_T_ACTIVE is set. Then, check CMD_T_PRE_EXECUTE within __target_check_io_state() to determine when an early exception has occured, and avoid aborting this se_cmd since it will have already been queued into fabric driver response path code. Reported-by: Donald White Cc: Donald White Cc: Mike Christie Cc: Hannes Reinecke Cc: stable@vger.kernel.org # 3.14+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_tmr.c | 9 +++++++++ drivers/target/target_core_transport.c | 2 ++ include/target/target_core_base.h | 1 + 3 files changed, 12 insertions(+) commit 9574a497df2bbc0a676b609ce0dd24d237cee3a6 Author: Nicholas Bellinger Date: Fri Sep 29 16:43:11 2017 -0700 target: Fix quiese during transport_write_pending_qf endless loop This patch fixes a potential end-less loop during QUEUE_FULL, where cmd->se_tfo->write_pending() callback fails repeatedly but __transport_wait_for_tasks() has already been invoked to quiese the outstanding se_cmd descriptor. To address this bug, this patch adds a CMD_T_STOP|CMD_T_ABORTED check within transport_write_pending_qf() and invokes the existing se_cmd->t_transport_stop_comp to signal quiese completion back to __transport_wait_for_tasks(). Cc: Mike Christie Cc: Hannes Reinecke Cc: Bryant G. Ly Cc: Michael Cyr Cc: Potnuri Bharat Teja Cc: Sagi Grimberg Cc: stable@vger.kernel.org # 4.11+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit fd2f928b0ddd2fe8876d4f1344df2ace2b715a4d Author: Nicholas Bellinger Date: Fri Sep 29 16:03:24 2017 -0700 target: Fix caw_sem leak in transport_generic_request_failure With the recent addition of transport_check_aborted_status() within transport_generic_request_failure() to avoid sending a SCSI status exception after CMD_T_ABORTED w/ TAS=1 has occured, it introduced a COMPARE_AND_WRITE early failure regression. Namely when COMPARE_AND_WRITE fails and se_device->caw_sem has been taken by sbc_compare_and_write(), if the new check for transport_check_aborted_status() returns true and exits, cmd->transport_complete_callback() -> compare_and_write_post() is skipped never releasing se_device->caw_sem. This regression was originally introduced by: commit e3b88ee95b4e4bf3e9729a4695d695b9c7c296c8 Author: Bart Van Assche Date: Tue Feb 14 16:25:45 2017 -0800 target: Fix handling of aborted failed commands To address this bug, move the transport_check_aborted_status() call after transport_complete_task_attr() and cmd->transport_complete_callback(). Cc: Mike Christie Cc: Hannes Reinecke Cc: Bart Van Assche Cc: stable@vger.kernel.org # 4.11+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 1c79df1f349fb6050016cea4ef1dfbc3853a5685 Author: Nicholas Bellinger Date: Fri Sep 22 16:48:28 2017 -0700 target: Fix QUEUE_FULL + SCSI task attribute handling This patch fixes a bug during QUEUE_FULL where transport_complete_qf() calls transport_complete_task_attr() after it's already been invoked by target_complete_ok_work() or transport_generic_request_failure() during initial completion, preceeding QUEUE_FULL. This will result in se_device->simple_cmds, se_device->dev_cur_ordered_id and/or se_device->dev_ordered_sync being updated multiple times for a single se_cmd. To address this bug, clear SCF_TASK_ATTR_SET after the first call to transport_complete_task_attr(), and avoid updating SCSI task attribute related counters for any subsequent calls. Also, when a se_cmd is deferred due to ordered tags and executed via target_restart_delayed_cmds(), set CMD_T_SENT before execution matching what target_execute_cmd() does. Cc: Michael Cyr Cc: Bryant G. Ly Cc: Mike Christie Cc: Hannes Reinecke Cc: stable@vger.kernel.org # 4.1+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 4 ++++ 1 file changed, 4 insertions(+) commit c221fe40a89c2dc757bd872bcccc8395d1e91b33 Merge: aaf151b 3670756 Author: David S. Miller Date: Wed Nov 8 12:23:39 2017 +0900 Merge branch 'qdisc-RED-offload' Jiri Pirko says: ==================== qdisc RED offload Nogah says: Add an offload support for RED qdisc for mlxsw driver. The first patch adds the ability to offload RED qdisc by using ndo_setup_tc. It gives RED three commands, to offload, change or delete the qdisc, to get the qdisc generic stats and to get it's RED xstats. There is no enforcement on a driver to offload or not offload the qdisc and it is up to the driver to decide. RED qdisc is first being created and only later graft to a parent (unless it is a root qdisc). For that reason the return value of the offload replace command that is called in the init process doesn't reflect actual offload state. The offload state is determined in the dump function so it can be reflected to the user. This function is also responsible for stats update. The patchses 2-3 change the name of TC_SETUP_MQPRIO & TC_SETUP_CBS to match with the new convention of QDISC prefix. The rest of the patchset is driver support for the qdisc. Currently only as root qdisc that is being set on the default traffic class. It supports only the following parameters of RED: min, max, probability and ECN mode. Limit and burst size related params are being ignored at this moment. --- v7->v8 internal: (external RFC->v1) - patch 1/9: - unite the offload and un-offload functions - clean the OFFLOAD flag when the qdisc in not offloaded - patch 2/9: - minor change to avoid a conflict - patch 5/9: - check for bad min/max values - clean the offloaded qdisc after a bad config call ==================== Signed-off-by: David S. Miller commit 3670756fe6f370c0748b0c9227f3807fddf0e1ac Author: Nogah Frankel Date: Mon Nov 6 07:23:49 2017 +0100 mlxsw: spectrum: Support general qdisc stats Add support for ndo_setup_tc with enum tc_setup_type value of TC_SETUP_QDISC_STATS. This call updates the generic qdisc stats from the cache if the handle ID that is asked for matching the root qdisc ID and fails otherwise. Currently doesn't support qlen and rqueues. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 5 +++ .../net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 51 ++++++++++++++++++++++ 2 files changed, 56 insertions(+) commit 861fb8294d83ad950dfaa62b0bf8384c66e2cd5e Author: Nogah Frankel Date: Mon Nov 6 07:23:48 2017 +0100 mlxsw: spectrum: Support RED xstats Add support for ndo_setup_tc with enum tc_setup_type value of TC_SETUP_RED_XSTATS. This call returns the RED qdisc xstats from the cache if the handle ID that is asked for matching the root qdisc ID and fails otherwise. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 9 ++++ .../net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 51 ++++++++++++++++++++++ 2 files changed, 60 insertions(+) commit 075ab8adaf4e7443159bee6412cb85434c63ed15 Author: Nogah Frankel Date: Mon Nov 6 07:23:47 2017 +0100 mlxsw: spectrum: Collect tclass related stats periodically Add more statistics to be collected from the HW periodically. These stats are tclass based (beside ECN marked packet, that exist only port based). They are needed to expose RED qdisc stats and xstats correctly. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 34 ++++++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 9 +++++++ 2 files changed, 43 insertions(+) commit 0afc1221ffecbbe4a9fdd6b46697cc7c31ecf8aa Author: Yuval Mintz Date: Mon Nov 6 07:23:46 2017 +0100 mlxsw: reg: Add ext and tc-cong counter groups This adds the counter group definitions for 2 new counter groups which are necessary for gaining ECN & wred counters. Signed-off-by: Yuval Mintz Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 96f17e0776c285b7373bdccbfc7300dbeac3878c Author: Nogah Frankel Date: Mon Nov 6 07:23:45 2017 +0100 mlxsw: spectrum: Support RED qdisc offload Add support for ndo_setup_tc with enum tc_setup_type value of TC_SETUP_RED. This call sets RED qdisc on a traffic class. This patch supports RED qdisc only as a root qdisc and set in on the default tclass. It can be set with or without ECN. Signed-off-by: Yuval Mintz Signed-off-by: Nogah Frankel 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 | 2 + drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 15 ++ .../net/ethernet/mellanox/mlxsw/spectrum_qdisc.c | 174 +++++++++++++++++++++ 4 files changed, 193 insertions(+), 1 deletion(-) commit ad53fa06c126d2d739563802cc412cdcc9c32e63 Author: Nogah Frankel Date: Mon Nov 6 07:23:44 2017 +0100 mlxsw: reg: Add cwtp & cwtpm registers This patch adds 2 new registers: - Congestion WRED ECN TClass Profile Register [CWTP] - Congestion WRED ECN TClass and Pool Mapping Register [CWTPM] These registers would later be needed to offload RED-related functionality to the HW. Signed-off-by: Yuval Mintz Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 187 ++++++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) commit 8521db4c7e155d12fb280686c0552e47f77e9110 Author: Nogah Frankel Date: Mon Nov 6 07:23:43 2017 +0100 net_sch: cbs: Change TC_SETUP_CBS to TC_SETUP_QDISC_CBS Change TC_SETUP_CBS to TC_SETUP_QDISC_CBS to match the new convention.. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Reviewed-by: Simon Horman Acked-by: Vinicius Costa Gomes Signed-off-by: David S. Miller drivers/net/ethernet/intel/igb/igb_main.c | 2 +- include/linux/netdevice.h | 2 +- net/sched/sch_cbs.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 575ed7d39e2fbe602a3894bc766a8cb49af83bd3 Author: Nogah Frankel Date: Mon Nov 6 07:23:42 2017 +0100 net_sch: mqprio: Change TC_SETUP_MQPRIO to TC_SETUP_QDISC_MQPRIO Change TC_SETUP_MQPRIO to TC_SETUP_QDISC_MQPRIO to match the new convention. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 2 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 2 +- drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- drivers/net/ethernet/sfc/falcon/tx.c | 2 +- drivers/net/ethernet/sfc/tx.c | 2 +- drivers/net/ethernet/ti/netcp_core.c | 2 +- include/linux/netdevice.h | 2 +- net/sched/sch_mqprio.c | 5 +++-- 15 files changed, 17 insertions(+), 16 deletions(-) commit 602f3baf22188aad24b9a58be3209ab774b97d74 Author: Nogah Frankel Date: Mon Nov 6 07:23:41 2017 +0100 net_sch: red: Add offload ability to RED qdisc Add the ability to offload RED qdisc by using ndo_setup_tc. There are four commands for RED offloading: * TC_RED_SET: handles set and change. * TC_RED_DESTROY: handle qdisc destroy. * TC_RED_STATS: update the qdiscs counters (given as reference) * TC_RED_XSTAT: returns red xstats. Whether RED is being offloaded is being determined every time dump action is being called because parent change of this qdisc could change its offload state but doesn't require any RED function to be called. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Reviewed-by: Simon Horman Signed-off-by: David S. Miller include/linux/netdevice.h | 1 + include/net/pkt_cls.h | 30 ++++++++++++++++ include/uapi/linux/pkt_sched.h | 1 + net/sched/sch_red.c | 79 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 111 insertions(+) commit aaf151b9e68101b03ba42d581e8a424bdd0110fe Author: Lawrence Brakmo Date: Sun Nov 5 18:44:10 2017 -0800 bpf: Rename tcp_bbf.readme to tcp_bpf.readme The original patch had the wrong filename. Fixes: bfdf75693875 ("bpf: create samples/bpf/tcp_bpf.readme") Signed-off-by: Lawrence Brakmo Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/tcp_bbf.readme | 26 -------------------------- samples/bpf/tcp_bpf.readme | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 26 deletions(-) commit 8bd1ee2e2f798060eeee589c7ae70a0ec2e9608b Merge: 3e29cd0 7afc19b Author: David S. Miller Date: Wed Nov 8 11:21:28 2017 +0900 Merge branch 'ila-make-identifier-format-optional-and-other-fixes' Tom Herbert says: ==================== ila: make identifier format optional and other fixes The identifier type and checksum neutral mapping bits are optional in identifier formats. This patch set fixes the implementation to make them optional and configurable. Specific items: - Clean up checksum diff code in ILA - Add checksum neutral mapping auto so that checksum neutral mapping can be configured without requiring use of the C-bit - Add identifier type configuration and allow identifier type to be configured so that the identifier type field does not need to be present - Added ILA documention: ila.txt I have fixes for ILA in iproute2 that will be poseted separately. Tested: Ran netperf TCP_RR on various combinations of checksum mode and the two supported identifier types. v2: - Add proper sign off - In ILA LWT, only check prefix length includes identifier type if identifier type is enabled (ILA_ATYPE_USE_FORMAT). - Add a hook type so that it can be specified whether ILA translation is done on input or output route funciton in LWT. ==================== Signed-off-by: David S. Miller commit 7afc19bc217475000e5cd8eb0009665453c8439e Author: Tom Herbert Date: Sun Nov 5 15:58:26 2017 -0800 ila: Add ila.txt Add documenation for kernel ILA. This describes ILA, features, configuration gives some examples. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller Documentation/networking/ila.txt | 285 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 285 insertions(+) commit fddb231ebe647749782a9ebf11106a81f7168ba7 Author: Tom Herbert Date: Sun Nov 5 15:58:25 2017 -0800 ila: Add a hook type for LWT routes In LWT tunnels both an input and output route method is defined. If both of these are executed in the same path then double translation happens and the effect is not correct. This patch adds a new attribute that indicates the hook type. Two values are defined for route output and route output. ILA translation is only done for the one that is set. The default is to enable ILA on route output. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/uapi/linux/ila.h | 7 +++++++ net/ipv6/ila/ila_lwt.c | 39 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 43 insertions(+), 3 deletions(-) commit 70d5aef48a421a68bd9d1bf8f8267af406681580 Author: Tom Herbert Date: Sun Nov 5 15:58:24 2017 -0800 ila: allow configuration of identifier type Allow identifier to be explicitly configured for a mapping. This can either be one of the identifier types specified in the ILA draft or a value of ILA_ATYPE_USE_FORMAT which means the identifier type is inferred from the identifier type field. If a value other than ILA_ATYPE_USE_FORMAT is set for a mapping then it is assumed that the identifier type field is not present in an identifier. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/uapi/linux/ila.h | 13 ++++++++++++ net/ipv6/ila/ila.h | 12 +----------- net/ipv6/ila/ila_lwt.c | 51 +++++++++++++++++++++++++++++++++++++++++------- net/ipv6/ila/ila_xlat.c | 18 ++++++++++++----- 4 files changed, 71 insertions(+), 23 deletions(-) commit 84287bb3285634b60c55c00a1d5ed843b44fde92 Author: Tom Herbert Date: Sun Nov 5 15:58:23 2017 -0800 ila: add checksum neutral map auto Add checksum neutral auto that performs checksum neutral mapping without using the C-bit. This is enabled by configuration of a mapping. The checksum neutral function has been split into ila_csum_do_neutral_fmt and ila_csum_do_neutral_nofmt. The former handles the C-bit and includes it in the adjustment value. The latter just sets the adjustment value on the locator diff only. Added configuration for checksum neutral map aut in ila_lwt and ila_xlat. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller include/uapi/linux/ila.h | 1 + net/ipv6/ila/ila_common.c | 65 ++++++++++++++++++++++++++++------------------- net/ipv6/ila/ila_lwt.c | 29 +++++++++++---------- net/ipv6/ila/ila_xlat.c | 10 +++++--- 4 files changed, 61 insertions(+), 44 deletions(-) commit 80661e7687f202514ee5eea0e74916d3c50c2606 Author: Tom Herbert Date: Sun Nov 5 15:58:22 2017 -0800 ila: cleanup checksum diff Consolidate computing checksum diff into one function. Add get_csum_diff_iaddr that computes the checksum diff between an address argument and locator being written. get_csum_diff calls this using the destination address in the IP header as the argument. Also moved ila_init_saved_csum to be close to the checksum diff functions. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller net/ipv6/ila/ila_common.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) commit 4a1a57df97636b9323c4221cc75a35694b6d34c7 Author: Geert Uytterhoeven Date: Tue Oct 31 09:47:28 2017 -0700 Input: st1232 - remove obsolete platform device support Commit 1fa59bda21c7fa36 ("ARM: shmobile: Remove legacy board code for Armadillo-800 EVA"), removed the last user of st1232_pdata and the "st1232-ts" platform device. All remaining users use DT. Signed-off-by: Geert Uytterhoeven Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/st1232.c | 16 +++------------- include/linux/platform_data/st1232_pdata.h | 14 -------------- 2 files changed, 3 insertions(+), 27 deletions(-) commit 0f1cd81d4a50ca99fb0b5cd8f68584bc5acab081 Merge: 4e974c1 39dae59 Author: Dmitry Torokhov Date: Tue Nov 7 18:11:56 2017 -0800 Merge tag 'v4.14-rc8' into next Merge with mainline to bring in SPDX markings to avoid annoying merge problems when some header files get deleted. commit 3e29cd0e6563d5fefd59e7225750ee9922f2dad5 Author: Christina Jacob Date: Sun Nov 5 08:52:30 2017 +0530 xdp: Sample xdp program implementing ip forward Implements port to port forwarding with route table and arp table lookup for ipv4 packets using bpf_redirect helper function and lpm_trie map. Signed-off-by: Christina Jacob Signed-off-by: David S. Miller samples/bpf/Makefile | 4 + samples/bpf/xdp_router_ipv4_kern.c | 186 +++++++++++ samples/bpf/xdp_router_ipv4_user.c | 659 +++++++++++++++++++++++++++++++++++++ 3 files changed, 849 insertions(+) commit 4ad1ceec05e49175d0f967cc87628101e79176f6 Author: Troy Kisky Date: Fri Nov 3 10:29:59 2017 -0700 net: fec: Let fec_ptp have its own interrupt routine This is better for code locality and should slightly speed up normal interrupts. This also allows PPS clock output to start working for i.mx7. This is because i.mx7 was already using the limit of 3 interrupts, and needed another. Signed-off-by: Troy Kisky Acked-by: Fugang Duan Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/fsl-fec.txt | 13 ++++ drivers/net/ethernet/freescale/fec.h | 3 +- drivers/net/ethernet/freescale/fec_main.c | 31 ++++++--- drivers/net/ethernet/freescale/fec_ptp.c | 82 +++++++++++++---------- 4 files changed, 84 insertions(+), 45 deletions(-) commit ca1b17b7e843123f5a1e4c8bd2d7b6596ffe6e93 Merge: 3928ee6 b5eb819 Author: David S. Miller Date: Wed Nov 8 10:28:54 2017 +0900 Merge branch 'hv_netvsc-fix-a-hang-on-channel-mtu-changes' Vitaly Kuznetsov says: ==================== hv_netvsc: fix a hang on channel/mtu changes It was found that netvsc driver doesn't survive e.g. test. I was able to identify a hang in guest/host communication, it is fixed by PATCH1 of this series. PATCH2 is a cosmetic change masking unneeded messages. Changes since v1: - Throw away patches 2 and 3 of the original series as one is unneeded and the other is not justified [Eric Dumazet, Stephen Hemminger] so I'm only fixing the hang now, the crash doesn't reproduce. Will keep an eye on it. ==================== Signed-off-by: David S. Miller commit b5eb819dcbcbeca7a047573a5218cb8f703709c9 Author: Vitaly Kuznetsov Date: Thu Nov 2 11:35:31 2017 +0100 hv_netvsc: hide warnings about uninitialized/missing rndis device Hyper-V hosts are known to send RNDIS messages even after we halt the device in rndis_filter_halt_device(). Remove user visible messages as they are not really useful. Signed-off-by: Vitaly Kuznetsov Signed-off-by: David S. Miller drivers/net/hyperv/rndis_filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0cf737808ae7cb25e952be619db46b9147a92f46 Author: Vitaly Kuznetsov Date: Thu Nov 2 11:35:30 2017 +0100 hv_netvsc: netvsc_teardown_gpadl() split It was found that in some cases host refuses to teardown GPADL for send/ receive buffers (probably when some work with these buffere is scheduled or ongoing). Change the teardown logic to be: 1) Send NVSP_MSG1_TYPE_REVOKE_* messages 2) Close the channel 3) Teardown GPADLs. This seems to work reliably. Signed-off-by: Vitaly Kuznetsov Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 69 +++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 33 deletions(-) commit 3928ee6485a316c8abde7e24c7f82033a1c8d3ae Author: Maciej S. Szmigiero Date: Thu Nov 2 00:49:18 2017 +0100 net: phy: leds: Add support for "link" trigger Currently, we create a LED trigger for any link speed known to a PHY. These triggers only fire when their exact link speed had been negotiated (they aren't cumulative, that is, they don't fire for "their or any higher" link speed). What we are missing, however, is a trigger which will fire on any link speed known to the PHY. Such trigger can then be used for implementing a poor man's substitute of the "link" LED on boards that lack it. Let's add it. Signed-off-by: Maciej S. Szmigiero Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 7 +++++-- drivers/net/phy/phy_led_triggers.c | 43 +++++++++++++++++++++++++++++++++++--- include/linux/phy.h | 2 ++ 3 files changed, 47 insertions(+), 5 deletions(-) commit ff198cdb9642851e01e41cdeb76d6cd86e8c427c Author: Maciej S. Szmigiero Date: Thu Nov 2 00:48:45 2017 +0100 net: phy: leds: Refactor "no link" handler into a separate function Currently, phy_led_trigger_change_speed() is handling a "no link" condition like it was some kind of an error (using "goto" to a code at the function end). However, having no link at PHY is an ordinary operational state, so let's handle it in an appropriately named separate function so it is more obvious what the code is doing. Signed-off-by: Maciej S. Szmigiero Signed-off-by: David S. Miller drivers/net/phy/phy_led_triggers.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 03ea2263c2ef22dd57f8fc6d54c44ccad3214520 Author: Randy Dunlap Date: Thu Nov 2 15:14:02 2017 -0700 PCI: Move PCI_QUIRKS to the PCI bus menu Localize PCI_QUIRKS in the PCI bus menu. Move PCI_QUIRKS to the PCI bus menu instead of the (often broken) General Setup EXPERT menu. The prompt still depends on EXPERT. Signed-off-by: Randy Dunlap Signed-off-by: Bjorn Helgaas drivers/pci/Kconfig | 9 +++++++++ init/Kconfig | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 03f41f288f7092311464d73af5621008f491f7cc Author: Bjorn Helgaas Date: Thu Sep 28 16:52:51 2017 -0500 alpha/PCI: Make pdev_save_srm_config() static pdev_save_srm_config() and struct pdev_srm_saved_conf are only used in arch/alpha/kernel/pci.c, so make them static there. Signed-off-by: Bjorn Helgaas Reviewed-by: Ingo Molnar arch/alpha/kernel/pci.c | 11 ++++++++++- arch/alpha/kernel/pci_impl.h | 8 -------- 2 files changed, 10 insertions(+), 9 deletions(-) commit 7b30aa1f237045fd54a0e9b050c7c06dff6b711a Author: Bjorn Helgaas Date: Wed Oct 4 15:40:46 2017 -0500 PCI: Remove unused declarations Remove these unused declarations: pcibios_config_init() # never defined anywhere pcibios_scan_root() # only defined by x86 pcibios_get_irq_routing_table() # only defined by x86 pcibios_set_irq_routing() # only defined by x86 Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Gleixner Reviewed-by: Ingo Molnar arch/cris/include/asm/pci.h | 6 ------ arch/ia64/include/asm/pci.h | 2 -- arch/mn10300/unit-asb2305/pci-asb2305.h | 3 --- arch/x86/include/asm/pci.h | 1 - 4 files changed, 12 deletions(-) commit be2d877aaa043d23c0522fd3c7491b8ef7b631fa Author: Bjorn Helgaas Date: Wed Oct 4 15:15:22 2017 -0500 PCI: Remove redundant pci_dev, pci_bus, resource declarations defines struct pci_bus and struct pci_dev and includes the struct resource definition before including . Nobody includes directly, so they don't need their own declarations. Remove the redundant struct pci_dev, pci_bus, resource declarations. Signed-off-by: Bjorn Helgaas Reviewed-by: Ingo Molnar Acked-by: Jesper Nilsson # CRIS Acked-by: Ralf Baechle # MIPS arch/alpha/include/asm/pci.h | 3 --- arch/cris/include/asm/pci.h | 2 -- arch/frv/include/asm/pci.h | 2 -- arch/ia64/include/asm/pci.h | 2 -- arch/mips/include/asm/pci.h | 2 -- arch/mn10300/include/asm/pci.h | 2 -- arch/parisc/include/asm/pci.h | 7 ------- arch/powerpc/include/asm/pci.h | 2 -- arch/sh/include/asm/pci.h | 2 -- arch/sparc/include/asm/pci_32.h | 2 -- arch/xtensa/include/asm/pci.h | 2 -- 11 files changed, 28 deletions(-) commit 137ed9f0ee20b72e03492f8f0358cb19f74a89c4 Author: Bjorn Helgaas Date: Thu Sep 28 17:02:42 2017 -0500 PCI: Remove redundant pcibios_set_master() declarations All users of pcibios_set_master() include , which already has a declaration. Remove the unnecessary declarations from the files. Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Gleixner Reviewed-by: Ingo Molnar Acked-by: Jesper Nilsson # CRIS Acked-by: Ralf Baechle # MIPS arch/alpha/include/asm/pci.h | 2 -- arch/cris/include/asm/pci.h | 1 - arch/frv/include/asm/pci.h | 2 -- arch/mips/include/asm/pci.h | 2 -- arch/mn10300/include/asm/pci.h | 2 -- arch/parisc/include/asm/pci.h | 1 - arch/sh/include/asm/pci.h | 2 -- arch/x86/include/asm/pci.h | 1 - 8 files changed, 13 deletions(-) commit 3ad3f8ce50914288731a3018b27ee44ab803e170 Author: Qiang Date: Thu Sep 28 11:54:34 2017 +0800 PCI/PME: Handle invalid data when reading Root Status PCIe PME and native hotplug share the same interrupt number, so hotplug interrupts are also processed by PME. In some cases, e.g., a Link Down interrupt, a device may be present but unreachable, so when we try to read its Root Status register, the read fails and we get all ones data (0xffffffff). Previously, we interpreted that data as PCI_EXP_RTSTA_PME being set, i.e., "some device has asserted PME," so we scheduled pcie_pme_work_fn(). This caused an infinite loop because pcie_pme_work_fn() tried to handle PME requests until PCI_EXP_RTSTA_PME is cleared, but with the link down, PCI_EXP_RTSTA_PME can't be cleared. Check for the invalid 0xffffffff data everywhere we read the Root Status register. 1469d17dd341 ("PCI: pciehp: Handle invalid data when reading from non-existent devices") added similar checks in the hotplug driver. Signed-off-by: Qiang Zheng [bhelgaas: changelog, also check in pcie_pme_work_fn(), use "~0" to follow other similar checks] Signed-off-by: Bjorn Helgaas drivers/pci/pcie/pme.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 79aa801e899417a56863d6713f76c4e108856000 Author: Dexuan Cui Date: Wed Nov 1 20:30:53 2017 +0000 PCI: hv: Use effective affinity mask The effective_affinity_mask is always set when an interrupt is assigned in __assign_irq_vector() -> apic->cpu_mask_to_apicid(), e.g. for struct apic apic_physflat: -> default_cpu_mask_to_apicid() -> irq_data_update_effective_affinity(), but it looks d->common->affinity remains all-1's before the user space or the kernel changes it later. In the early allocation/initialization phase of an IRQ, we should use the effective_affinity_mask, otherwise Hyper-V may not deliver the interrupt to the expected CPU. Without the patch, if we assign 7 Mellanox ConnectX-3 VFs to a 32-vCPU VM, one of the VFs may fail to receive interrupts. Tested-by: Adrian Suhov Signed-off-by: Dexuan Cui Signed-off-by: Bjorn Helgaas Reviewed-by: Jake Oshins Cc: stable@vger.kernel.org Cc: Jork Loeser Cc: Stephen Hemminger Cc: K. Y. Srinivasan drivers/pci/host/pci-hyperv.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit d0af45f1f6528949e05385976eb61c5ebd31854e Author: Geert Uytterhoeven Date: Tue Nov 7 13:48:15 2017 +0100 PM / Domains: Remove gpd_dev_ops.active_wakeup() callback There are no more users left of the gpd_dev_ops.active_wakeup() callback. All have been converted to GENPD_FLAG_ACTIVE_WAKEUP. Hence remove the callback. Signed-off-by: Geert Uytterhoeven Acked-by: Ulf Hansson Reviewed-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 14 +++----------- include/linux/pm_domain.h | 1 - 2 files changed, 3 insertions(+), 12 deletions(-) commit 89c7aea915c0c9820191a533e1f304e234074b2d Author: Geert Uytterhoeven Date: Tue Nov 7 13:48:14 2017 +0100 soc: rockchip: power-domain: Use GENPD_FLAG_ACTIVE_WAKEUP Set the newly introduced GENPD_FLAG_ACTIVE_WAKEUP, which allows to remove the driver's own flag-based callback. Signed-off-by: Geert Uytterhoeven Acked-by: Ulf Hansson Acked-by: Heiko Stuebner Signed-off-by: Rafael J. Wysocki drivers/soc/rockchip/pm_domains.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 7534d181a8e60dff0c2a8e12aa6515a87a25b47d Author: Geert Uytterhoeven Date: Tue Nov 7 13:48:13 2017 +0100 soc: mediatek: Use GENPD_FLAG_ACTIVE_WAKEUP Set the newly introduced GENPD_FLAG_ACTIVE_WAKEUP, which allows to remove the driver's own flag-based callback. Signed-off-by: Geert Uytterhoeven Acked-by: Ulf Hansson Acked-by: Matthias Brugger Signed-off-by: Rafael J. Wysocki drivers/soc/mediatek/mtk-scpsys.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit eb0ddf9dd22be098301ab8a09e9be5a13ae8c804 Author: Geert Uytterhoeven Date: Tue Nov 7 13:48:12 2017 +0100 ARM: shmobile: pm-rmobile: Use GENPD_FLAG_ACTIVE_WAKEUP Set the newly introduced GENPD_FLAG_ACTIVE_WAKEUP, which allows to remove the driver's own "always true" callback. Signed-off-by: Geert Uytterhoeven Acked-by: Ulf Hansson Acked-by: Simon Horman Signed-off-by: Rafael J. Wysocki arch/arm/mach-shmobile/pm-rmobile.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 95a20ef6f7e54c6a982715a7d0da2fd81790db28 Author: Geert Uytterhoeven Date: Tue Nov 7 13:48:11 2017 +0100 PM / Domains: Allow genpd users to specify default active wakeup behavior It is quite common for PM Domains to require slave devices to be kept active during system suspend if they are to be used as wakeup sources. To enable this, currently each PM Domain or driver has to provide its own gpd_dev_ops.active_wakeup() callback. Introduce a new flag GENPD_FLAG_ACTIVE_WAKEUP to consolidate this. If specified, all slave devices configured as wakeup sources will be kept active during system suspend. PM Domains that need more fine-grained controls, based on the slave device, can still provide their own callbacks, as before. Signed-off-by: Geert Uytterhoeven Acked-by: Ulf Hansson Reviewed-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 3 +++ include/linux/pm_domain.h | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) commit 56a46acf62af5ba44fca2f3f1c7c25a2d5385b19 Author: Mirko Parthey Date: Thu May 18 21:30:03 2017 +0200 MIPS: BCM47XX: Fix LED inversion for WRT54GSv1 The WLAN LED on the Linksys WRT54GSv1 is active low, but the software treats it as active high. Fix the inverted logic. Fixes: 7bb26b169116 ("MIPS: BCM47xx: Fix LEDs on WRT54GS V1.0") Signed-off-by: Mirko Parthey Looks-ok-by: Rafał Miłecki Cc: Hauke Mehrtens Cc: linux-mips@linux-mips.org Cc: # 3.17+ Patchwork: https://patchwork.linux-mips.org/patch/16071/ Signed-off-by: James Hogan arch/mips/bcm47xx/leds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44a374c0667df6b5de63266a4cf15f400827a29a Author: Martin Schiller Date: Tue May 30 06:34:34 2017 +0200 MIPS: Lantiq: Fix ASC0/ASC1 clocks ASC1 is available on every Lantiq SoC (also AmazonSE) and should be enabled like the other generic xway clocks instead of ASC0, which is only available for AR9 and Danube. Signed-off-by: Martin Schiller Acked-by: Hauke Mehrtens Cc: Ralf Baechle Cc: John Crispin Cc: Arnd Bergmann Cc: Felix Fietkau Cc: Martin Schiller Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/16145/ [jhogan@kernel.org: Drop braces] Signed-off-by: James Hogan arch/mips/lantiq/xway/sysctrl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 22700f3c6df55387cec2ee27c533a7b23c76dc51 Author: Trond Myklebust Date: Tue Oct 10 17:31:43 2017 -0400 SUNRPC: Improve ordering of transport processing Since it can take a while before a specific thread gets scheduled, it is better to just implement a first come first served queue mechanism. That way, if a thread is already scheduled and is idle, it can pick up the work to do from the queue. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields include/linux/sunrpc/svc.h | 1 + net/sunrpc/svc_xprt.c | 100 ++++++++++++++------------------------------- 2 files changed, 31 insertions(+), 70 deletions(-) commit 95da1b3a5aded124dd1bda1e3cdb876184813140 Author: Andrew Elble Date: Fri Nov 3 14:06:31 2017 -0400 nfsd: deal with revoked delegations appropriately If a delegation has been revoked by the server, operations using that delegation should error out with NFS4ERR_DELEG_REVOKED in the >4.1 case, and NFS4ERR_BAD_STATEID otherwise. The server needs NFSv4.1 clients to explicitly free revoked delegations. If the server returns NFS4ERR_DELEG_REVOKED, the client will do that; otherwise it may just forget about the delegation and be unable to recover when it later sees SEQ4_STATUS_RECALLABLE_STATE_REVOKED set on a SEQUENCE reply. That can cause the Linux 4.1 client to loop in its stage manager. Signed-off-by: Andrew Elble Reviewed-by: Trond Myklebust Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 77a08867a66796f8316449e030e0bfc84f2a3f66 Author: Chuck Lever Date: Fri Oct 27 10:49:51 2017 -0400 svcrdma: Enqueue after setting XPT_CLOSE in completion handlers I noticed the server was sometimes not closing the connection after a flushed Send. For example, if the client responds with an RNR NAK to a Reply from the server, that client might be deadlocked, and thus wouldn't send any more traffic. Thus the server wouldn't have any opportunity to notice the XPT_CLOSE bit has been set. Enqueue the transport so that svcxprt notices the bit even if there is no more transport activity after a flushed completion, QP access error, or device removal event. Signed-off-by: Chuck Lever Reviewed-By: Devesh Sharma Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_transport.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 7e981a8afa6d8d1d93e2b3d162aa81cc7b537208 Author: Vasily Averin Date: Mon Nov 6 16:46:04 2017 +0300 nfsd: use nfs->ns.inum as net ID Publishing of net pointer is not safe, let's use nfs->ns.inum instead Signed-off-by: Vasily Averin Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1754eb2b27d7a58e5b9038c6297a1e7bbff4ed52 Author: J. Bruce Fields Date: Tue Oct 24 14:58:11 2017 -0400 rpc: remove some BUG()s It would be kinder to WARN() and recover in several spots here instead of BUG()ing. Also, it looks like the read_u32_from_xdr_buf() call could actually fail, though it might require a broken (or malicious) client, so convert that to just an error return. Reported-by: Weston Andros Adamson Signed-off-by: J. Bruce Fields net/sunrpc/auth_gss/svcauth_gss.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 0bad47cada5defba13e98827d22d06f13258dfb3 Author: Chuck Lever Date: Mon Oct 16 12:14:33 2017 -0400 svcrdma: Preserve CB send buffer across retransmits During each NFSv4 callback Call, an RDMA Send completion frees the page that contains the RPC Call message. If the upper layer determines that a retransmit is necessary, this is too soon. One possible symptom: after a GARBAGE_ARGS response an NFSv4.1 callback request, the following BUG fires on the NFS server: kernel: BUG: Bad page state in process kworker/0:2H pfn:7d3ce2 kernel: page:ffffea001f4f3880 count:-2 mapcount:0 mapping: (null) index:0x0 kernel: flags: 0x2fffff80000000() kernel: raw: 002fffff80000000 0000000000000000 0000000000000000 fffffffeffffffff kernel: raw: dead000000000100 dead000000000200 0000000000000000 0000000000000000 kernel: page dumped because: nonzero _refcount kernel: Modules linked in: cts rpcsec_gss_krb5 ocfs2_dlmfs ocfs2_stack_o2cb ocfs2_dlm ocfs2_nodemanager ocfs2_stackglue rpcrdm a ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pc lmul crc32_pclmul ghash_clmulni_intel pcbc iTCO_wdt iTCO_vendor_support aesni_intel crypto_simd glue_helper cryptd pcspkr lpc_ich i2c_i801 mei_me mf d_core mei raid0 sg wmi ioatdma ipmi_si ipmi_devintf ipmi_msghandler shpchp acpi_power_meter acpi_pad nfsd nfs_acl lockd auth_rpcgss grace sunrpc ip_tables xfs libcrc32c mlx4_en mlx4_ib mlx5_ib ib_core sd_mod sr_mod cdrom ast drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm ahci crc32c_intel libahci drm mlx5_core igb libata mlx4_core dca i2c_algo_bit i2c_core nvme kernel: ptp nvme_core pps_core dm_mirror dm_region_hash dm_log dm_mod dax kernel: CPU: 0 PID: 11495 Comm: kworker/0:2H Not tainted 4.14.0-rc3-00001-g577ce48 #811 kernel: Hardware name: Supermicro Super Server/X10SRL-F, BIOS 1.0c 09/09/2015 kernel: Workqueue: ib-comp-wq ib_cq_poll_work [ib_core] kernel: Call Trace: kernel: dump_stack+0x62/0x80 kernel: bad_page+0xfe/0x11a kernel: free_pages_check_bad+0x76/0x78 kernel: free_pcppages_bulk+0x364/0x441 kernel: ? ttwu_do_activate.isra.61+0x71/0x78 kernel: free_hot_cold_page+0x1c5/0x202 kernel: __put_page+0x2c/0x36 kernel: svc_rdma_put_context+0xd9/0xe4 [rpcrdma] kernel: svc_rdma_wc_send+0x50/0x98 [rpcrdma] This issue exists all the way back to v4.5, but refactoring and code re-organization prevents this simple patch from applying to kernels older than v4.12. The fix is the same, however, if someone needs to backport it. Reported-by: Ben Coddington BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=314 Fixes: 5d252f90a800 ('svcrdma: Add class for RDMA backwards ... ') Cc: stable@vger.kernel.org # v4.12 Signed-off-by: Chuck Lever Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields net/sunrpc/xprtrdma/svc_rdma_backchannel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 256a89fa3deb6bb699b794e5bf00a72e2fe558b0 Author: Arnd Bergmann Date: Thu Oct 19 12:04:11 2017 +0200 nfds: avoid gettimeofday for nfssvc_boot time do_gettimeofday() is deprecated and we should generally use time64_t based functions instead. In case of nfsd, all three users of nfssvc_boot only use the initial time as a unique token, and are not affected by it overflowing, so they are not affected by the y2038 overflow. This converts the structure to timespec64 anyway and adds comments to all uses, to document that we have thought about it and avoid having to look at it again. Signed-off-by: Arnd Bergmann Signed-off-by: J. Bruce Fields fs/nfsd/netns.h | 2 +- fs/nfsd/nfs3xdr.c | 10 ++++++---- fs/nfsd/nfs4proc.c | 5 +++-- fs/nfsd/nfssvc.c | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) commit 818a34eb266449b1c89242596039a5e44c9be04c Author: Elena Reshetova Date: Fri Oct 20 12:53:30 2017 +0300 fs, nfsd: convert nfs4_file.fi_ref from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable nfs4_file.fi_ref is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 6 +++--- fs/nfsd/state.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit cff7cb2ece397760195ff8a5fc6bf3c860810246 Author: Elena Reshetova Date: Fri Oct 20 12:53:29 2017 +0300 fs, nfsd: convert nfs4_cntl_odstate.co_odcount from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable nfs4_cntl_odstate.co_odcount is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 6 +++--- fs/nfsd/state.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit a15dfcd529ab43265e70ec32d3b9d2286872d412 Author: Elena Reshetova Date: Fri Oct 20 12:53:28 2017 +0300 fs, nfsd: convert nfs4_stid.sc_count from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable nfs4_stid.sc_count is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: J. Bruce Fields fs/nfsd/nfs4layouts.c | 4 ++-- fs/nfsd/nfs4state.c | 24 ++++++++++++------------ fs/nfsd/state.h | 3 ++- 3 files changed, 16 insertions(+), 15 deletions(-) commit dc3033e16c59a2c4e62b31341258a5786cbcee56 Author: Vasily Averin Date: Fri Oct 20 17:33:18 2017 +0300 lockd: double unregister of inetaddr notifiers lockd_up() can call lockd_unregister_notifiers twice: inside lockd_start_svc() when it calls lockd_svc_exit_thread() and then in error path of lockd_up() Patch forces lockd_start_svc() to unregister notifiers in all error cases and removes extra unregister in error path of lockd_up(). Fixes: cb7d224f82e4 "lockd: unregister notifier blocks if the service ..." Signed-off-by: Vasily Averin Cc: stable@vger.kernel.org Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/lockd/svc.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 53da6a53e1d414e05759fa59b7032ee08f4e22d7 Author: J. Bruce Fields Date: Tue Oct 17 20:38:49 2017 -0400 nfsd4: catch some false session retries The spec allows us to return NFS4ERR_SEQ_FALSE_RETRY if we notice that the client is making a call that matches a previous (slot, seqid) pair but that *isn't* actually a replay, because some detail of the call doesn't actually match the previous one. Catching every such case is difficult, but we may as well catch a few easy ones. This also handles the case described in the previous patch, in a different way. The spec does however require us to catch the case where the difference is in the rpc credentials. This prevents somebody from snooping another user's replies by fabricating retries. (But the practical value of the attack is limited by the fact that the replies with the most sensitive data are READ replies, which are not normally cached.) Tested-by: Olga Kornievskaia Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 37 ++++++++++++++++++++++++++++++++++++- fs/nfsd/state.h | 1 + 2 files changed, 37 insertions(+), 1 deletion(-) commit 085def3ade52f2ffe3e31f42e98c27dcc222dd37 Author: J. Bruce Fields Date: Wed Oct 18 16:17:18 2017 -0400 nfsd4: fix cached replies to solo SEQUENCE compounds Currently our handling of 4.1+ requests without "cachethis" set is confusing and not quite correct. Suppose a client sends a compound consisting of only a single SEQUENCE op, and it matches the seqid in a session slot (so it's a retry), but the previous request with that seqid did not have "cachethis" set. The obvious thing to do might be to return NFS4ERR_RETRY_UNCACHED_REP, but the protocol only allows that to be returned on the op following the SEQUENCE, and there is no such op in this case. The protocol permits us to cache replies even if the client didn't ask us to. And it's easy to do so in the case of solo SEQUENCE compounds. So, when we get a solo SEQUENCE, we can either return the previously cached reply or NFSERR_SEQ_FALSE_RETRY if we notice it differs in some way from the original call. Currently, we're returning a corrupt reply in the case a solo SEQUENCE matches a previous compound with more ops. This actually matters because the Linux client recently started doing this as a way to recover from lost replies to idempotent operations in the case the process doing the original reply was killed: in that case it's difficult to keep the original arguments around to do a real retry, and the client no longer cares what the result is anyway, but it would like to make sure that the slot's sequence id has been incremented, and the solo SEQUENCE assures that: if the server never got the original reply, it will increment the sequence id. If it did get the original reply, it won't increment, and nothing else that about the reply really matters much. But we can at least attempt to return valid xdr! Tested-by: Olga Kornievskaia Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 20 +++++++++++++++----- fs/nfsd/state.h | 1 + fs/nfsd/xdr4.h | 13 +++++++++++-- 3 files changed, 27 insertions(+), 7 deletions(-) commit da36e6dbf478cb67a5df0da6afcd78df226e4c64 Author: Colin Ian King Date: Mon Oct 16 14:40:21 2017 +0100 sunrcp: make function _svc_create_xprt static The function _svc_create_xprt is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol '_svc_create_xprt' was not declared. Should it be static? Signed-off-by: Colin Ian King Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields net/sunrpc/svc_xprt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0d1da3c15291c478193b7310dfef023add2249cc Author: Nicolas Iooss Date: Sun Sep 3 14:00:57 2017 +0200 drm/amd/powerplay: initialize a variable before using it Function vega10_apply_state_adjust_rules() only initializes stable_pstate_sclk_dpm_percentage when data->registry_data.stable_pstate_sclk_dpm_percentage is not between 1 and 100. The variable is then used to compute stable_pstate_sclk, which therefore uses an uninitialized value. Fix this by initializing stable_pstate_sclk_dpm_percentage to data->registry_data.stable_pstate_sclk_dpm_percentage. This issue has been found while building the kernel with clang. The compiler reported a -Wsometimes-uninitialized warning. Reviewed-by: Alex Deucher Fixes: f83a9991648b ("drm/amd/powerplay: add Vega10 powerplay support (v5)") Signed-off-by: Nicolas Iooss Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 ++ 1 file changed, 2 insertions(+) commit 1d864b82a2bde6c583f23dfc7183d07dc9b48b6d Author: Evan Quan Date: Mon Nov 6 10:33:45 2017 +0800 drm/amd/powerplay: suppress KASAN out of bounds warning in vega10_populate_all_memory_levels Signed-off-by: Evan Quan Tested-and-Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7da2e3e09e3186b672822aaade407d17eb35551f Author: Roger He Date: Thu Nov 2 13:14:27 2017 +0800 drm/amd/amdgpu: fix evicted VRAM bo adjudgement condition Reviewed-by: Christian König Signed-off-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 53a23207f2a17fd990c85bd84c45d243463e21bb Author: Ernst Sjöstrand Date: Tue Nov 7 21:18:06 2017 +0100 amdgpu/dc: Fix double unlock in amdgpu_dm_commit_planes Reported by smartch: amdgpu_dm_commit_planes() error: double unlock 'spin_lock:&crtc->dev->event_lock' amdgpu_dm_commit_planes() error: double unlock 'irqsave:flags' The error path doesn't return so we only need a single unlock. Reviewed-by: Harry Wentland Signed-off-by: Ernst Sjöstrand Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 1 file changed, 1 deletion(-) commit 423788c7a866cb7f5265af9b96952e8a4bf48fd5 Author: Ernst Sjöstrand Date: Tue Nov 7 21:06:59 2017 +0100 amdgpu/dc: Fix missing null checks in amdgpu_dm.c From smatch: error: we previously assumed X could be null Acked-by: Christian König Reviewed-by: Harry Wentland Signed-off-by: Ernst Sjöstrand Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 2a55f09643acf51ec0f1c72d92fdd4515e9a8aa7 Author: Ernst Sjöstrand Date: Tue Nov 7 21:06:58 2017 +0100 amdgpu/dc: Fix potential null dereferences in amdgpu_dm.c Acked-by: Christian König Reviewed-by: Harry Wentland Signed-off-by: Ernst Sjöstrand Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit b349f76ece33be50943c1e6f78ccffd1b3e9627e Author: Ernst Sjöstrand Date: Tue Nov 7 21:06:57 2017 +0100 amdgpu/dc: fix more indentation warnings More "warn: inconsistent indenting" fixes from smatch. Acked-by: Christian König Reviewed-by: Harry Wentland Signed-off-by: Ernst Sjöstrand Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 +++++----- .../gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit f7dbc385c15084d6e11192e8a5dd901eb96dbec2 Author: Dave Airlie Date: Tue Nov 7 05:21:18 2017 +1000 amdgpu/dc: handle allocation failures in dc_commit_planes_to_stream. Reported-by smatch: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:966 dc_commit_planes_to_stream() error: potential null dereference 'flip_addr'. (kcalloc returns null) drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:968 dc_commit_planes_to_stream() error: potential null dereference 'plane_info'. (kcalloc returns null) drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:978 dc_commit_planes_to_stream() error: potential null dereference 'scaling_info'. (kcalloc returns null) Reviewed-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit bf5563ede9f254fba083c6b56e4ca8b836babb1d Author: Dave Airlie Date: Tue Nov 7 05:30:47 2017 +1000 amdgpu/dc: fix indentation warning from smatch. This fixes all the current smatch: warn: inconsistent indenting Reviewed-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 2 +- .../gpu/drm/amd/display/dc/bios/command_table2.c | 18 ++++++------- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 +-- drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 26 +++++++++---------- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 16 ++++++------ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 30 +++++++++++----------- .../display/dc/dce120/dce120_timing_generator.c | 7 +++-- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 2 +- .../dc/i2caux/dce110/i2c_hw_engine_dce110.c | 30 +++++++++++----------- 10 files changed, 68 insertions(+), 69 deletions(-) commit a4718a5bca77954ffaa5f828158c45aae40a7ec8 Author: Dave Airlie Date: Tue Nov 7 05:17:12 2017 +1000 amdgpu/dc: fix non-ansi function decls. smatch reported: drivers/gpu/drm/amd/amdgpu/../display/dc/bios/dce80/command_table_helper_dce80.c:351:71: warning: non-ANSI function declaration of function 'dal_cmd_tbl_helper_dce80_get_table' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/dce110/command_table_helper_dce110.c:361:72: warning: non-ANSI function declaration of function 'dal_cmd_tbl_helper_dce110_get_table' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/dce112/command_table_helper_dce112.c:415:72: warning: non-ANSI function declaration of function 'dal_cmd_tbl_helper_dce112_get_table' drivers/gpu/drm/amd/amdgpu/../display/dc/bios/dce112/command_table_helper2_dce112.c:415:73: warning: non-ANSI function declaration of function 'dal_cmd_tbl_helper_dce112_get_table2' drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_surface.c:148:34: warning: non-ANSI function declaration of function 'dc_create_gamma' drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_surface.c:178:50: warning: non-ANSI function declaration of function 'dc_create_transfer_func' This fixes them. Reviewed-by: Harry Wentland Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/bios/dce110/command_table_helper_dce110.c | 2 +- .../gpu/drm/amd/display/dc/bios/dce112/command_table_helper2_dce112.c | 2 +- .../gpu/drm/amd/display/dc/bios/dce112/command_table_helper_dce112.c | 2 +- .../gpu/drm/amd/display/dc/bios/dce80/command_table_helper_dce80.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) commit f05f1b3da5a531d1569194b24dd7eb33b4a067ca Author: Dan Carpenter Date: Mon Nov 6 14:44:22 2017 +0300 drm/amd/display: remove some unneeded code We assign "v_init = asic_blank_start;" a few lines earlier so there is no need to do it again inside the if statements. Also "v_init" is unsigned so it can't be less than zero. Acked-by: Christian König Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 3 --- 1 file changed, 3 deletions(-) commit 74baea4275ee130c67400b33c532da8999b530af Author: Dan Carpenter Date: Mon Nov 6 14:43:41 2017 +0300 drm/amd/display: checking for NULL instead of IS_ERR() backlight_device_register() never returns NULL, it returns error pointers on error so the check here is wrong. Acked-by: Christian König Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 620fd73edfd7297307e0e3ac581e65247c9dd8db Author: Dan Carpenter Date: Mon Nov 6 10:07:33 2017 +0300 drm/amd/display: small cleanup in destruct() Static analysis tools get annoyed that we don't indent this if statement. Actually, the if statement isn't required because kfree() can handle NULL pointers just fine. The DCE110STRENC_FROM_STRENC() macro is a wrapper around container_of() but it's basically a no-op or a cast. Anyway, it's not really appropriate here so it should be removed as well. Acked-by: Christian König Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8530762f2391164394fc8d99d7a5a55f521b6131 Author: Robert P. J. Day Date: Sat Sep 2 03:09:06 2017 -0400 MIPS: Standardize DTS files, status "ok" -> "okay" While the current kernel code in drivers/of/ allows developers to be sloppy and use the status value "ok", the current DTSpec 0.1 makes it clear that the only officially proper spelling is "okay", so adjust the very small number of DTS files under arch/mips/. Signed-off-by: Robert P. J. Day Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17227/ Signed-off-by: James Hogan arch/mips/boot/dts/brcm/bcm63268-comtrend-vr-3032u.dts | 2 +- arch/mips/boot/dts/brcm/bcm6358-neufbox4-sercomm.dts | 2 +- arch/mips/boot/dts/ralink/rt3052_eval.dts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 9275b933d409d3a4efa08102ca813557b93fb0b9 Author: kbuild test robot Date: Wed Nov 8 03:18:01 2017 +0800 resource: Fix resource_size.cocci warnings arch/x86/kernel/crash.c:627:34-37: ERROR: Missing resource_size with res arch/x86/kernel/crash.c:528:16-19: ERROR: Missing resource_size with res Use resource_size function on resource object instead of explicit computation. Generated by: scripts/coccinelle/api/resource_size.cocci Fixes: 1d2e733b13b4 ("resource: Provide resource struct in resource walk callback") Signed-off-by: Fengguang Wu Signed-off-by: Thomas Gleixner Cc: Juergen Gross Cc: Tom Lendacky Cc: Brijesh Singh Cc: Kees Cook Cc: Michael Ellerman Cc: kbuild-all@01.org Cc: tipbuild@zytor.com Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20171107191801.GA91887@lkp-snb01 arch/x86/kernel/crash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b2d8788dd565cbe1ab22da6a1bc63d0934a80eb Author: Greg Kroah-Hartman Date: Tue Nov 7 17:01:46 2017 +0100 debugfs: Remove redundant license text Now that the SPDX tag is in all debugfs files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Nicolai Stange Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 5 ----- fs/debugfs/inode.c | 5 ----- fs/debugfs/internal.h | 5 ----- include/linux/debugfs.h | 4 ---- 4 files changed, 19 deletions(-) commit 3bce94fd5f4c05337dedbe218501fb9f8789fc40 Author: Greg Kroah-Hartman Date: Tue Nov 7 16:59:23 2017 +0100 debugfs: add SPDX identifiers to all debugfs files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the debugfs files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Cc: Nicolai Stange Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 1 + fs/debugfs/inode.c | 1 + fs/debugfs/internal.h | 1 + include/linux/debugfs.h | 1 + 4 files changed, 4 insertions(+) commit 7d39bc50c47b3f8ed0e1a9d671ecb9ec02f10a2d Author: Nicolai Stange Date: Tue Oct 31 00:15:54 2017 +0100 debugfs: defer debugfs_fsdata allocation to first usage Currently, __debugfs_create_file allocates one struct debugfs_fsdata instance for every file created. However, there are potentially many debugfs file around, most of which are never touched by userspace. Thus, defer the allocations to the first usage, i.e. to the first debugfs_file_get(). A dentry's ->d_fsdata starts out to point to the "real", user provided fops. After a debugfs_fsdata instance has been allocated (and the real fops pointer has been moved over into its ->real_fops member), ->d_fsdata is changed to point to it from then on. The two cases are distinguished by setting BIT(0) for the real fops case. struct debugfs_fsdata's foremost purpose is to track active users and to make debugfs_remove() block until they are done. Since no debugfs_fsdata instance means no active users, make debugfs_remove() return immediately in this case. Take care of possible races between debugfs_file_get() and debugfs_remove(): either debugfs_remove() must see a debugfs_fsdata instance and thus wait for possible active users or debugfs_file_get() must see a dead dentry and return immediately. Make a dentry's ->d_release(), i.e. debugfs_release_dentry(), check whether ->d_fsdata is actually a debugfs_fsdata instance before kfree()ing it. Similarly, make debugfs_real_fops() check whether ->d_fsdata is actually a debugfs_fsdata instance before returning it, otherwise emit a warning. The set of possible error codes returned from debugfs_file_get() has grown from -EIO to -EIO and -ENOMEM. Make open_proxy_open() and full_proxy_open() pass the -ENOMEM onwards to their callers. Signed-off-by: Nicolai Stange Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 55 ++++++++++++++++++++++++++++++++++++++++++--------- fs/debugfs/inode.c | 36 +++++++++++++++++---------------- fs/debugfs/internal.h | 8 ++++++++ 3 files changed, 73 insertions(+), 26 deletions(-) commit 154b9d7512ae012aca7b4e90af67a72419ad1941 Author: Nicolai Stange Date: Tue Oct 31 00:15:53 2017 +0100 debugfs: call debugfs_real_fops() only after debugfs_file_get() The current implementation of debugfs_real_fops() relies on a debugfs_fsdata instance to be installed at ->d_fsdata. With future patches introducing lazy allocation of these, this requirement will be guaranteed to be fullfilled only inbetween a debugfs_file_get()/debugfs_file_put() pair. The full proxies' fops implemented by debugfs happen to be the only offenders. Fix them up by moving their debugfs_real_fops() calls past those to debugfs_file_get(). full_proxy_release() is special as it doesn't invoke debugfs_file_get() at all. Leave it alone for now. Signed-off-by: Nicolai Stange Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c9afbec27089cd6b4e621b639f41c7fc726c3bf1 Author: Nicolai Stange Date: Tue Oct 31 00:15:52 2017 +0100 debugfs: purge obsolete SRCU based removal protection Purge the SRCU based file removal race protection in favour of the new, refcount based debugfs_file_get()/debugfs_file_put() API. Fixes: 49d200deaa68 ("debugfs: prevent access to removed files' private data") Signed-off-by: Nicolai Stange Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 48 ------------------------------------------------ fs/debugfs/inode.c | 7 ------- include/linux/debugfs.h | 19 ------------------- lib/Kconfig.debug | 1 - 4 files changed, 75 deletions(-) commit 7cda7b8f97da9382bb945d541a85cde58d5dac27 Author: Nicolai Stange Date: Tue Oct 31 00:15:51 2017 +0100 IB/hfi1: convert to debugfs_file_get() and -put() Convert all calls to the now obsolete debugfs_use_file_start() and debugfs_use_file_finish() to the new debugfs_file_get() and debugfs_file_put() API. Fixes: 49d200deaa68 ("debugfs: prevent access to removed files' private data") Signed-off-by: Nicolai Stange Reviewed-by: Dennis Dalessandro Signed-off-by: Greg Kroah-Hartman drivers/infiniband/hw/hfi1/debugfs.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 69d29f9e6a53559895e6f785f6cf72daa738f132 Author: Nicolai Stange Date: Tue Oct 31 00:15:50 2017 +0100 debugfs: convert to debugfs_file_get() and -put() Convert all calls to the now obsolete debugfs_use_file_start() and debugfs_use_file_finish() from the debugfs core itself to the new debugfs_file_get() and debugfs_file_put() API. Fixes: 49d200deaa68 ("debugfs: prevent access to removed files' private data") Signed-off-by: Nicolai Stange Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 106 ++++++++++++++++++++++++++---------------------------- 1 file changed, 50 insertions(+), 56 deletions(-) commit 055ab8e3e3d52e005d2047b14ce63551b3a8b8b5 Author: Nicolai Stange Date: Tue Oct 31 00:15:49 2017 +0100 debugfs: debugfs_real_fops(): drop __must_hold sparse annotation Currently, debugfs_real_fops() is annotated with a __must_hold(&debugfs_srcu) sparse annotation. With the conversion of the SRCU based protection of users against concurrent file removals to a per-file refcount based scheme, this becomes wrong. Drop this annotation. Signed-off-by: Nicolai Stange Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 6 +----- include/linux/debugfs.h | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) commit e9117a5a4bf65d8e99f060d356a04d27a60b436d Author: Nicolai Stange Date: Tue Oct 31 00:15:48 2017 +0100 debugfs: implement per-file removal protection Since commit 49d200deaa68 ("debugfs: prevent access to removed files' private data"), accesses to a file's private data are protected from concurrent removal by covering all file_operations with a SRCU read section and sychronizing with those before returning from debugfs_remove() by means of synchronize_srcu(). As pointed out by Johannes Berg, there are debugfs files with forever blocking file_operations. Their corresponding SRCU read side sections would block any debugfs_remove() forever as well, even unrelated ones. This results in a livelock. Because a remover can't cancel any indefinite blocking within foreign files, this is a problem. Resolve this by introducing support for more granular protection on a per-file basis. This is implemented by introducing an 'active_users' refcount_t to the per-file struct debugfs_fsdata state. At file creation time, it is set to one and a debugfs_remove() will drop that initial reference. The new debugfs_file_get() and debugfs_file_put(), intended to be used in place of former debugfs_use_file_start() and debugfs_use_file_finish(), increment and decrement it respectively. Once the count drops to zero, debugfs_file_put() will signal a completion which is possibly being waited for from debugfs_remove(). Thus, as long as there is a debugfs_file_get() not yet matched by a corresponding debugfs_file_put() around, debugfs_remove() will block. Actual users of debugfs_use_file_start() and -finish() will get converted to the new debugfs_file_get() and debugfs_file_put() by followup patches. Fixes: 49d200deaa68 ("debugfs: prevent access to removed files' private data") Reported-by: Johannes Berg Signed-off-by: Nicolai Stange Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/debugfs/inode.c | 29 +++++++++++++++++++++++------ fs/debugfs/internal.h | 2 ++ include/linux/debugfs.h | 11 +++++++++++ 4 files changed, 84 insertions(+), 6 deletions(-) commit 7c8d469877b16d2c1cecf101a0abb7b218db85bc Author: Nicolai Stange Date: Tue Oct 31 00:15:47 2017 +0100 debugfs: add support for more elaborate ->d_fsdata Currently, the user provided fops, "real_fops", are stored directly into ->d_fsdata. In order to be able to store more per-file state and thus prepare for more granular file removal protection, wrap the real_fops into a dynamically allocated container struct, debugfs_fsdata. A struct debugfs_fsdata gets allocated at file creation and freed from the newly intoduced ->d_release(). Finally, move the implementation of debugfs_real_fops() out of the public debugfs header such that struct debugfs_fsdata's declaration can be kept private. Signed-off-by: Nicolai Stange Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 12 ++++++++++++ fs/debugfs/inode.c | 22 +++++++++++++++++++--- fs/debugfs/internal.h | 4 ++++ include/linux/debugfs.h | 20 +++----------------- 4 files changed, 38 insertions(+), 20 deletions(-) commit d65d31388a23b14df9494135ad6c6549a59a3caa Merge: 8a6fb5b e073db5 Author: Dave Airlie Date: Wed Nov 8 05:22:49 2017 +1000 Merge tag 'drm-misc-next-fixes-2017-11-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Fixes for 4.15 merge window: Just the cherry-picked vc4 fix plus a GFP_NOFAIL annotation (there's apparently some new options in-flight to change/audit too-small-to-fail kmalloc semantics or something like that). * tag 'drm-misc-next-fixes-2017-11-07' of git://anongit.freedesktop.org/drm/drm-misc: drm/vc4: Fix wrong printk format in vc4_bo_stats_debugfs() drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all commit a111fbc4c44d2981f1a8fef64418685be5e30280 Author: Ville Syrjälä Date: Mon Oct 23 18:25:40 2017 +0300 drm/vblank: Tune drm_crtc_accurate_vblank_count() WARN down to a debug Since commit 632c6e4edef1 ("drm/vblank: Fix flip event vblank count") even drivers that don't implement accurate vblank timestamps will end up using drm_crtc_accurate_vblank_count(). That leads to a WARN every time drm_crtc_arm_vblank_event() gets called. The could be as often as every frame for each active crtc. Considering drm_crtc_accurate_vblank_count() is never any worse than the drm_vblank_count() we used previously, let's just skip the WARN unless DRM_UT_VBL is enabled. That way people won't be bothered by this unless they're debugging vblank code. And let's also change it to WARN_ONCE() so that even when you're debugging vblank code you won't get drowned by constant WARNs. Cc: stable@vger.kernel.org Cc: Daniel Vetter Cc: "Szyprowski, Marek" Cc: Andrzej Hajda Reported-by: Andrzej Hajda Fixes: 632c6e4edef1 ("drm/vblank: Fix flip event vblank count") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171023152540.15364-1-ville.syrjala@linux.intel.com Acked-by: Benjamin Gaignard Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_vblank.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 072916f55ddbb94330dd14118a126930c0e20751 Author: Jonas Gorski Date: Wed Sep 20 13:14:08 2017 +0200 MIPS: BCM63XX: split out swpkt_sar/usb clocks Make the secondary switch clocks their own clocks. This allows proper enable reference counting between SAR/XTM and the main switch clocks, and controlling them individually from drivers. Signed-off-by: Jonas Gorski Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Mark Rutland Cc: Florian Fainelli Cc: Kevin Cernekee Cc: Russell King Cc: linux-mips@linux-mips.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-serial@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com Patchwork: https://patchwork.linux-mips.org/patch/17332/ Signed-off-by: Ralf Baechle Signed-off-by: James Hogan arch/mips/bcm63xx/clk.c | 61 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 51 insertions(+), 10 deletions(-) commit ef4235159555e8c8d20cb47f04a74cb4abacd63a Author: Jonas Gorski Date: Wed Sep 20 13:14:07 2017 +0200 MIPS: BCM63XX: provide enet clocks as "enet" to the ethernet devices Add lookups to provide the appropriate enetX clocks as just "enet" to the ethernet devices. Reviewed-by: Florian Fainelli Signed-off-by: Jonas Gorski Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Mark Rutland Cc: Kevin Cernekee Cc: Russell King Cc: linux-mips@linux-mips.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-serial@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com Patchwork: https://patchwork.linux-mips.org/patch/17331/ Signed-off-by: Ralf Baechle Signed-off-by: James Hogan arch/mips/bcm63xx/clk.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5d691036cbb7290289de9b5044a2071cc0133dc5 Author: Jonas Gorski Date: Wed Sep 20 13:14:06 2017 +0200 MIPS: BCM63XX: move the HSSPI PLL HZ into its own clock Split up the HSSPL clock into rate and a gate clock, to more closely match the actual hardware. Reviewed-by: Florian Fainelli Signed-off-by: Jonas Gorski Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Mark Rutland Cc: Kevin Cernekee Cc: Russell King Cc: linux-mips@linux-mips.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-serial@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com Patchwork: https://patchwork.linux-mips.org/patch/17330/ Signed-off-by: Ralf Baechle Signed-off-by: James Hogan arch/mips/bcm63xx/clk.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit bed8d2a23e0115a05a1102a9a11677027b2ea7e5 Author: Jonas Gorski Date: Wed Sep 20 13:14:05 2017 +0200 MIPS: BMIPS: name the refclk clock for uart Add the clock name to the uart nodes, to name the input clock properly. Reviewed-by: Florian Fainelli Signed-off-by: Jonas Gorski Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Mark Rutland Cc: Kevin Cernekee Cc: Russell King Cc: linux-mips@linux-mips.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-serial@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com Patchwork: https://patchwork.linux-mips.org/patch/17329/ Signed-off-by: Ralf Baechle Signed-off-by: James Hogan arch/mips/boot/dts/brcm/bcm3368.dtsi | 2 ++ arch/mips/boot/dts/brcm/bcm63268.dtsi | 2 ++ arch/mips/boot/dts/brcm/bcm6328.dtsi | 2 ++ arch/mips/boot/dts/brcm/bcm6358.dtsi | 2 ++ arch/mips/boot/dts/brcm/bcm6362.dtsi | 2 ++ arch/mips/boot/dts/brcm/bcm6368.dtsi | 2 ++ 6 files changed, 12 insertions(+) commit fa1e6a8aec47d5623f8361907f57e44f112a8f4f Author: Jonas Gorski Date: Wed Sep 20 13:14:04 2017 +0200 tty/bcm63xx_uart: allow naming clock in device tree Codify using a named clock for the refclk of the uart. This makes it easier if we might need to add a gating clock (like present on the BCM6345). Signed-off-by: Jonas Gorski Acked-by: Rob Herring Acked-by: Greg Kroah-Hartman Reviewed-by: Florian Fainelli Cc: Mark Rutland Cc: Kevin Cernekee Cc: Russell King Cc: linux-mips@linux-mips.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-serial@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com Patchwork: https://patchwork.linux-mips.org/patch/17328/ Signed-off-by: Ralf Baechle Signed-off-by: James Hogan Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt | 6 ++++++ drivers/tty/serial/bcm63xx_uart.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit 9a9cc02a6a558cf4d9ebeeda0832c5e2b8128f33 Author: Jonas Gorski Date: Wed Sep 20 13:14:03 2017 +0200 tty/bcm63xx_uart: use refclk for the expected clock name We now have the clock available under refclk, so use that. Signed-off-by: Jonas Gorski Acked-by: Greg Kroah-Hartman Reviewed-by: Florian Fainelli Cc: Rob Herring Cc: Mark Rutland Cc: Kevin Cernekee Cc: Russell King Cc: linux-mips@linux-mips.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-serial@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com Patchwork: https://patchwork.linux-mips.org/patch/17327/ Signed-off-by: Ralf Baechle Signed-off-by: James Hogan drivers/tty/serial/bcm63xx_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 243fa279a8eccd5b49e32ba7740f752be0d2aa5e Author: Jonas Gorski Date: Wed Sep 20 13:14:02 2017 +0200 MIPS: BCM63XX: provide periph clock as refclk for uart Add a lookup as "refclk" to describe its function for the uarts. Reviewed-by: Florian Fainelli Signed-off-by: Jonas Gorski Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Mark Rutland Cc: Kevin Cernekee Cc: Russell King Cc: linux-mips@linux-mips.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-serial@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com Patchwork: https://patchwork.linux-mips.org/patch/17326/ Signed-off-by: Ralf Baechle Signed-off-by: James Hogan arch/mips/bcm63xx/clk.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit c5af3c2dd0760737f4fee9c414a7d647957ca767 Author: Jonas Gorski Date: Wed Sep 20 13:14:01 2017 +0200 MIPS: BCM63XX: add clkdev lookup support Enable clkdev lookup support to allow us providing clocks under different names to devices more easily, so we don't need to care about clock name clashes anymore. Reviewed-by: Florian Fainelli Signed-off-by: Jonas Gorski Cc: Greg Kroah-Hartman Cc: Rob Herring Cc: Mark Rutland Cc: Kevin Cernekee Cc: Russell King Cc: linux-mips@linux-mips.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-serial@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com Patchwork: https://patchwork.linux-mips.org/patch/17325/ Signed-off-by: Ralf Baechle Signed-off-by: James Hogan arch/mips/Kconfig | 1 + arch/mips/bcm63xx/clk.c | 150 +++++++++++++++++++++++++++++++++++++----------- 2 files changed, 116 insertions(+), 35 deletions(-) commit c05afeec17cdba6c5c70de4226c136ceee5568df Author: Bhumika Goyal Date: Tue Sep 26 19:21:05 2017 +0530 MIPS: Alchemy: make clk_ops const Make these const as they are only stored in the "const " ops field of a clk_init_data structure. Structure found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal Cc: julia.lawall@lip6.fr Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17374/ Signed-off-by: Ralf Baechle Signed-off-by: James Hogan arch/mips/alchemy/common/clock.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a58f85b5d5bbe44ee9dc8eae03a4f21fa3e087cc Author: Aleksandar Markovic Date: Thu Nov 2 12:13:59 2017 +0100 MIPS: math-emu: Use preferred flavor of unsigned integer declarations Fix occurences of unsigned integer variable declarations that are not preferred by standards of checkpatch scripts. This removes a significant number of checkpatch warnings for files in math-emu directory (several files become completely warning-free), and thus makes easier to spot (now and in the future) other, perhaps more significant, checkpatch errors and warnings. Signed-off-by: Aleksandar Markovic Reviewed-by: James Hogan Cc: Ralf Baechle Cc: Douglas Leung Cc: Goran Ferenc Cc: "Maciej W. Rozycki" Cc: Manuel Lauss Cc: Miodrag Dinic Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17582/ Signed-off-by: James Hogan arch/mips/math-emu/cp1emu.c | 18 ++++++++++-------- arch/mips/math-emu/dp_maddf.c | 8 ++++---- arch/mips/math-emu/dp_mul.c | 8 ++++---- arch/mips/math-emu/dp_sqrt.c | 4 ++-- arch/mips/math-emu/ieee754.h | 15 ++++++++------- arch/mips/math-emu/ieee754int.h | 6 +++--- arch/mips/math-emu/ieee754sp.c | 4 ++-- arch/mips/math-emu/ieee754sp.h | 2 +- arch/mips/math-emu/sp_div.c | 4 ++-- arch/mips/math-emu/sp_fint.c | 2 +- arch/mips/math-emu/sp_maddf.c | 6 +++--- arch/mips/math-emu/sp_mul.c | 10 +++++----- 12 files changed, 45 insertions(+), 42 deletions(-) commit 409fcace9963c1e8d2cb0f7ac62e8b34d47ef979 Author: Aleksandar Markovic Date: Thu Nov 2 12:13:58 2017 +0100 MIPS: math-emu: Fix final emulation phase for certain instructions Fix final phase of . emulation. Provide proper generation of SIGFPE signal and updating debugfs FP exception stats in cases of any exception flags set in preceding phases of emulation. CLASS. instruction may generate "Unimplemented Operation" FP exception. . instructions may generate "Inexact", "Unimplemented Operation", "Invalid Operation", "Overflow", and "Underflow" FP exceptions. . instructions can generate "Unimplemented Operation" and "Invalid Operation" FP exceptions. The proper final processing of the cases when any FP exception flag is set is achieved by replacing "break" statement with "goto copcsr" statement. With such solution, this patch brings the final phase of emulation of the above instructions consistent with the one corresponding to the previously implemented emulation of other related FPU instructions (ADD, SUB, etc.). Fixes: 38db37ba069f ("MIPS: math-emu: Add support for the MIPS R6 CLASS FPU instruction") Fixes: e24c3bec3e8e ("MIPS: math-emu: Add support for the MIPS R6 MADDF FPU instruction") Fixes: 83d43305a1df ("MIPS: math-emu: Add support for the MIPS R6 MSUBF FPU instruction") Fixes: a79f5f9ba508 ("MIPS: math-emu: Add support for the MIPS R6 MAX{, A} FPU instruction") Fixes: 4e9561b20e2f ("MIPS: math-emu: Add support for the MIPS R6 MIN{, A} FPU instruction") Signed-off-by: Aleksandar Markovic Cc: Ralf Baechle Cc: Douglas Leung Cc: Goran Ferenc Cc: "Maciej W. Rozycki" Cc: Miodrag Dinic Cc: Paul Burton Cc: Petar Jovanovic Cc: Raghu Gandham Cc: linux-mips@linux-mips.org Cc: # 4.3+ Patchwork: https://patchwork.linux-mips.org/patch/17581/ Signed-off-by: James Hogan arch/mips/math-emu/cp1emu.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit edf188bee1d908ea8181d2067ddaeefab9264688 Author: Steven J. Hill Date: Thu Sep 28 12:34:05 2017 -0500 MIPS: Octeon: Remove usage of cvmx_wait() everywhere. Signed-off-by: Steven J. Hill Acked-by: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17389/ Signed-off-by: James Hogan arch/mips/cavium-octeon/executive/cvmx-helper.c | 2 +- arch/mips/cavium-octeon/executive/cvmx-spi.c | 10 +++++----- arch/mips/include/asm/octeon/cvmx-fpa.h | 4 +++- arch/mips/include/asm/octeon/cvmx.h | 15 ++------------- arch/mips/pci/pcie-octeon.c | 12 ++++++------ 5 files changed, 17 insertions(+), 26 deletions(-) commit 7820b84be844d8d863122b1323f2a4bc2441b783 Author: David Daney Date: Thu Sep 28 12:34:04 2017 -0500 MIPS: Allow __cpu_number_map to be larger than NR_CPUS In systems where the CPU id space is sparse, this allows a smaller NR_CPUS to be chosen, thus keeping internal data structures smaller. Signed-off-by: David Daney Signed-off-by: Carlos Munoz Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17388/ [jhogan@kernel.org: Add depends on SMP to fix "warning: symbol value '' invalid for MIPS_NR_CPU_NR_MAP"] Signed-off-by: James Hogan arch/mips/Kconfig | 12 +++++++++++- arch/mips/include/asm/smp.h | 2 +- arch/mips/kernel/smp.c | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) commit bf9fc98b736b8a3837040d5ce3a7caf04fa0859c Author: Minwoo Im Date: Tue Nov 7 09:25:37 2017 -0700 null_blk: add an usage for shared tags in documentation Add usage explanation for a shared_tags, introduced by commit: 82f402fefa50 ("null_blk: add support for shared tags") Signed-off-by: Minwoo Im Reworded slightly. Signed-off-by: Jens Axboe Documentation/block/null_blk.txt | 5 +++++ 1 file changed, 5 insertions(+) commit e8815241173ebba4ccad490d4907b354b795fa5c Author: Minwoo Im Date: Tue Nov 7 22:23:01 2017 +0900 null_blk: fix default values in documentation null_blk.c has initial value of (1) nr_devices as 1. (2) completion_nsec as 10,000ns, not 10.000ns. documentation should be updated for fixes above. Signed-off-by: Minwoo Im Signed-off-by: Jens Axboe Documentation/block/null_blk.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fa32475ad56d339178c9be12678906f2b39e3b47 Merge: ff4f032 6c2eb3e7 Author: Arnd Bergmann Date: Tue Nov 7 16:32:04 2017 +0100 Merge tag 'actions-arm-soc-for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/soc Pull "Actions Semi Arm SoC for v4.15" from Andreas Färber: This cleans up the S500 SMP code. * tag 'actions-arm-soc-for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions: ARM: owl: smp: Drop owl_secondary_boot() ARM: owl: smp: Use __pa_symbol() commit ad54c3e75d27686ac7e97e17d242fbc568f6c2e3 Merge: 5b143d2a a622c64 Author: Arnd Bergmann Date: Tue Nov 7 16:31:01 2017 +0100 Merge tag 'gpmc-omap-for-v4.15-pt2' of https://github.com/rogerq/linux into next/drivers Pull "OMAP-GPMC: driver updates for v4.15, part 2" from Roger Quadros: * get rid of unused function gpmc_update_nand_reg(). * tag 'gpmc-omap-for-v4.15-pt2' of https://github.com/rogerq/linux: memory: omap-gpmc: Remove deprecated gpmc_update_nand_reg() commit ff4f0321c533f4cde844829854735da64a4a327f Author: Anup Patel Date: Thu Oct 5 22:19:58 2017 +0530 ARM: multi_v7_defconfig: Select RPMSG_VIRTIO as module The RPMSG_VIRTIO is now user selectable option so we explicitly select it in multi_v7_defconfig. Till now RPMSG_VIRTIO was selected by ST_REMOTEPROC=m in multi_v7_defconfig. Signed-off-by: Anup Patel Acked-by: Bjorn Andersson Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 5b143d2a6edeae59700420c948f7d793da3356a8 Author: Sebastien Bourdelin Date: Wed Nov 1 13:14:33 2017 -0400 bus: add driver for the Technologic Systems NBUS This driver implements a GPIOs bit-banged bus, called the NBUS by Technologic Systems. It is used to communicate with the peripherals in the FPGA on the TS-4600 SoM. Signed-off-by: Sebastien Bourdelin Acked-by: Linus Walleij Signed-off-by: Arnd Bergmann drivers/bus/Kconfig | 8 ++ drivers/bus/Makefile | 1 + drivers/bus/ts-nbus.c | 375 ++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/ts-nbus.h | 18 +++ 4 files changed, 402 insertions(+) commit ec473a9c40416ef1802088e9f9d44d40c16aac6a Author: Sebastien Bourdelin Date: Thu Nov 2 14:17:12 2017 -0400 dt-bindings: bus: Add documentation for the Technologic Systems NBUS Add binding documentation for the Technologic Systems NBUS that is used to interface with peripherals in the FPGA of the TS-4600 SoM. Signed-off-by: Sebastien Bourdelin Acked-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Arnd Bergmann Documentation/devicetree/bindings/bus/ts-nbus.txt | 50 +++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 1e11cbf720c294c6d574b6f57a4f2a8ba99a441c Merge: 87f89ac 6f8c539 Author: Arnd Bergmann Date: Tue Nov 7 16:23:57 2017 +0100 Merge tag 'v4.15-rockchip-dts64-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt Pull "Rockchip dts64 updates for 4.15 part2" from Heiko Stübner: Support for the RGA (raster graphics accelerator) on rk3399 and efuses on rk3368. * tag 'v4.15-rockchip-dts64-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: add efuse for RK3368 SoCs arm64: dts: rockchip: add RGA device node for RK3399 clk: rockchip: add more rk3188 graphics clock ids clk: rockchip: add clock id for PCLK_EFUSE256 of RK3368 SoCs commit 87f89ace81d0978a1049a92c6a9921de5aa0a9e3 Merge: ea7cdc0 be84dfa Author: Arnd Bergmann Date: Tue Nov 7 16:21:18 2017 +0100 Merge tag 'v4.15-rockchip-dts32-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt Pull "Rockchip dts32 updates for 4.15 part2" from Heiko Stübner: CEC support for the two rk3288-firefly variants and general hdmi support for the firefly-reload. A lot of additions and corrections for the rk3288-vyasa and thermal support for the rv1108. * tag 'v4.15-rockchip-dts32-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: enable the hdmi output on the rk3288-firefly-reload ARM: dts: rockchip: define the two possible rk3288 CEC pins ARM: dts: rockchip: add the cec clk for dw-hdmi on rk3288 ARM: dts: rockchip: Add io domains for rk3288-vyasa ARM: dts: rockchip: Add usb otg for rk3288-vyasa ARM: dts: rockchip: Add usb host for rk3288-vyasa ARM: dts: rockchip: Add gmac support for rk3288-vyasa board ARM: dts: rockchip: Add regulators for rk3288-vyasa ARM: dts: rockchip: Use vmmc-supply from PMIC on rk3288-vyasa ARM: dts: rockchip: Remove vdd_log from rk808, DCDC_REG1 on rk3288-vyasa ARM: dts: rockchip: enable tsadc module on RV1108 evaluation board ARM: dts: rockchip: add thermal nodes for RV1108 SoC ARM: dts: rockchip: add tsadc node for RV1108 SoC ARM: dts: rockchip: add RGA device node for RK3288 commit ea7cdc066e479cb7d8a3551d206c7aa9c7f8b33a Merge: 2cdc614 1641608 Author: Arnd Bergmann Date: Tue Nov 7 16:20:25 2017 +0100 Merge tag 'sunxi-dt64-for-4.15-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Pull "Allwinner arm64 changes, take 2" from Maxime Ripard: Reintroduction of the EMAC bindings that were reverted in 4.13. * tag 'sunxi-dt64-for-4.15-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: add snps,dwmac-mdio compatible to emac/mdio arm64: dts: allwinner: A64: Restore EMAC changes commit 2cdc614b07bc284115f136c20a898a86e632cbf7 Merge: 0b30cf2f c3c08c5 Author: Arnd Bergmann Date: Tue Nov 7 16:18:56 2017 +0100 Merge tag 'mvebu-dt64-4.15-2' of git://git.infradead.org/linux-mvebu into next/dt Pull "mvebu dt64 for 4.15 (part 2)" from Gregory CLEMENT: Add the extended UART support on Armada 3700 * tag 'mvebu-dt64-4.15-2' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: armada-3720-espressobin: fill UART nodes arm64: dts: marvell: armada-3720-db: enable second UART port arm64: dts: marvell: armada-37xx: add second UART port arm64: dts: marvell: armada-37xx: add UART clock commit 0b30cf2fb435310ae0e8aefa6d14511da9f0f72b Merge: 9c7f85a f2f221c Author: Arnd Bergmann Date: Tue Nov 7 16:12:46 2017 +0100 Merge tag 'sunxi-dt-for-4.15-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Pull "Allwinner DT changes for 4.15, take 2" from Maxime Ripard: Here are a few commits that would be great to get in 4.15, given how long they've been hanging around. The first and most important one is the reintroduction of the EMAC DT changes after they've been reverted at the last minute in 4.13. There's a arm64 patch that crept in because the H5 and H3 share a common DTSI that is located in arch/arm, and merging that patch through the arm64 PR, especially given the pull requests that have already been sent, would just have generated too many conflicts. * tag 'sunxi-dt-for-4.15-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sun8i: a711: Enable USB OTG ARM: dts: sun8i: a711: Add regulator support ARM: dts: sun8i: a83t: bananapi-m3: Enable AP6212 WiFi on mmc1 ARM: dts: sun8i: a83t: cubietruck-plus: Enable AP6330 WiFi on mmc1 ARM: dts: sun8i: a83t: Move mmc1 pinctrl setting to dtsi file ARM: dts: sun8i: a83t: allwinner-h8homlet-v2: Add AXP818 regulator nodes ARM: dts: sun8i: a83t: bananapi-m3: Add AXP813 regulator nodes ARM: dts: sun8i: a83t: cubietruck-plus: Add AXP818 regulator nodes ARM: dts: sunxi: Add dtsi for AXP81x PMIC arm64: dts: allwinner: H5: Restore EMAC changes ARM: dts: sunxi: Restore EMAC changes (boards) ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac arm: dts: sunxi: h3/h5: Restore EMAC changes dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY dt-bindings: net: Restore sun8i dwmac binding commit 9c7f85ad3f0e05f631e733c6c772fc2edc1aa96d Merge: 2d2cf52 eb54a52 Author: Arnd Bergmann Date: Tue Nov 7 16:10:54 2017 +0100 Merge tag 'v4.14-next-dts32-2' of https://github.com/mbgg/linux-mediatek into next/dt Pull "Mediatek: 32-bit DTS updates for v4.15" from Matthias Brugger: - mt7623 update nodes to binding description - mt2701 add display pwn nodes - mt2701 update audio node description * tag 'v4.14-next-dts32-2' of https://github.com/mbgg/linux-mediatek: arm: dts: mt7623: remove unused compatible string for pio node arm: dts: mt7623: update usb related nodes arm: dts: mt7623: update crypto node arm: dts: mediatek: update audio node for mt2701 and mt7623 arm: dts: mt2701: enable display pwm backlight arm: dts: mt2701: add pwm backlight device node commit 2d2cf5283f01c854ed403dec76d098f1b1a74767 Merge: 3ab6dd0 a9ce6f8 Author: Arnd Bergmann Date: Tue Nov 7 16:08:58 2017 +0100 Merge tag 'realtek-arm64-dt-for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek into next/dt Pull "Realtek ARM64 based SoC DT for v4.15" from Andreas Färber: This refactors the RTD1295 DT, preparing for (but not yet adding) RTD1293 and RTD1296. Superfluous reg property entries are dropped. DTs for PROBOX2 AVA and MeLE V9 TV boxes are added. * tag 'realtek-arm64-dt-for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-realtek: arm64: dts: realtek: Add MeLE V9 dt-bindings: arm: realtek: Document MeLE V9 dt-bindings: Add vendor prefix for MeLE arm64: dts: realtek: Factor out common RTD129x parts arm64: dts: realtek: Add ProBox2 Ava dt-bindings: arm: realtek: Add ProBox2 AVA dt-bindings: Add vendor prefix for ProBox2 arm64: dts: realtek: Clean up RTD1295 UART reg property commit 3ab6dd0416a9ca5b3d32d0dca1b2e85bfbb9f9a0 Merge: b4eebd8 965f94c Author: Arnd Bergmann Date: Tue Nov 7 16:06:26 2017 +0100 Merge tag 'actions-arm64-dt-for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/dt Pull "Actions Semi ARM64 based SoC DT for v4.15" from Andreas Färber: This updates the Bubblegum-96 DT with a clock node for the debug UART. * tag 'actions-arm64-dt-for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions: arm64: dts: actions: s900-bubblegum-96: Add fake uart5 clock commit b4eebd88c2234a644132568eeaf7691d5b07c01a Merge: d29d307 7f6a78f Author: Arnd Bergmann Date: Tue Nov 7 16:04:45 2017 +0100 Merge tag 'actions-arm-dt-for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/dt Pull "Actions Semi ARM based SoC DT for v4.15" from Andreas Färber: This updates the Guitar board DT with a clock node for the debug UART and adds a new DT for the CubieBoard6. It also updates the S500 DT with CPU power domains. * tag 'actions-arm-dt-for-4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions: ARM: dts: owl-s500: Add CubieBoard6 dt-bindings: arm: actions: Add CubieBoard6 ARM: dts: owl-s500-guitar-bb-rev-b: Add fake uart3 clock ARM: dts: owl-s500: Set power domains for CPU2 and CPU3 commit 0c3b34a569f83b281c4c0ef4542cf59d7b186a88 Author: Greg Kroah-Hartman Date: Mon Nov 6 16:34:12 2017 +0100 USB: typec: Remove remaining redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Guenter Roeck Cc: Hans de Goede Cc: Yueyao Zhu Acked-by: Heikki Krogerus Acked-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/fusb302/fusb302.c | 10 ---------- drivers/usb/typec/fusb302/fusb302_reg.h | 10 ---------- drivers/usb/typec/tcpm.c | 10 ---------- drivers/usb/typec/tps6598x.c | 4 ---- 4 files changed, 34 deletions(-) commit 956c36c297a232f33f608886a504d47216338fc6 Author: Greg Kroah-Hartman Date: Mon Nov 6 16:34:11 2017 +0100 USB: typec: add SPDX identifiers to some files Due to these typec files being moved into the drivers/usb/ directory in this tree, they missed the larger "add SPDX tags to all files" work. So add the correct SPDX license tag, based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Cc: Guenter Roeck Cc: Hans de Goede Cc: Yueyao Zhu Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Acked-by: Heikki Krogerus Acked-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/fusb302/fusb302.c | 1 + drivers/usb/typec/fusb302/fusb302_reg.h | 1 + drivers/usb/typec/tcpm.c | 1 + drivers/usb/typec/tps6598x.c | 1 + drivers/usb/typec/ucsi/trace.c | 1 + 5 files changed, 5 insertions(+) commit fc9904d3c46e92c103414606fc407c7aa24d443b Author: Greg Kroah-Hartman Date: Mon Nov 6 16:34:10 2017 +0100 USB: renesas_usbhs: rcar?.h: add SPDX tags These files somehow never got an SPDX tag added to them, maybe due to the small size. So provide the default identifier of the whole project: SPDX-License-Identifier: GPL-2.0 The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Cc: Rob Herring Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Acked-by: Felipe Balbi Acked-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/rcar2.h | 1 + drivers/usb/renesas_usbhs/rcar3.h | 1 + 2 files changed, 2 insertions(+) commit df636f3f4278a912cd171ca1d575408b28466805 Author: Greg Kroah-Hartman Date: Mon Nov 6 16:34:09 2017 +0100 USB: chipidea: ci_hdrc_tegra.c: add SPDX line The license text was removed from this file, yet they somehow missed the big "add SPDX tags to all files" sweep due to them being new. So add the proper SPDX license tag to them, based on the original license text in the file. Cc: Thierry Reding Cc: Jonathan Hunter Acked-by: Peter Chen Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/ci_hdrc_tegra.c | 1 + 1 file changed, 1 insertion(+) commit f70ee2ad5e9818d8e15060d4450c2fb5cf4a67e8 Author: Greg Kroah-Hartman Date: Mon Nov 6 16:34:08 2017 +0100 USB: host: xhci-debugfs: add SPDX lines The license text was removed from these files, yet they somehow missed the big "add SPDX tags to all files" sweep due to them being new. So add the proper SPDX license tag to them, based on the original license text in the file. Acked-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-debugfs.c | 1 + drivers/usb/host/xhci-debugfs.h | 1 + 2 files changed, 2 insertions(+) commit 3efe891f61479a98edc5c3c7b91b92b69d99e592 Author: Greg Kroah-Hartman Date: Mon Nov 6 16:34:07 2017 +0100 USB: add SPDX identifiers to all remaining Makefiles It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. This updates the remaining drivers/usb/*Makefile* that were missing SPDX identifiers. They all get the following identifier: SPDX-License-Identifier: GPL-2.0 The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Cc: Peter Korsgaard Cc: Thomas Winischhofer Cc: Johan Hovold Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/c67x00/Makefile | 1 + drivers/usb/class/Makefile | 1 + drivers/usb/early/Makefile | 1 + drivers/usb/image/Makefile | 1 + drivers/usb/isp1760/Makefile | 1 + drivers/usb/misc/sisusbvga/Makefile | 1 + drivers/usb/mon/Makefile | 1 + drivers/usb/serial/Makefile-keyspan_pda_fw | 1 + drivers/usb/typec/Makefile | 1 + drivers/usb/typec/fusb302/Makefile | 1 + 10 files changed, 10 insertions(+) commit 15dfeb6dee4a2ea60efe2f94c7c293ab4ba3cb30 Author: Colin Ian King Date: Tue Nov 7 12:21:40 2017 +0000 usb: host: isp1362-hcd: remove a couple of redundant assignments Variable index is being initialized and the value is never read, it is being updated a few statements later, so remove the redundant initialization. Variable total is being updated but the value is never read, so this is also redundant and can be removed. Cleans up two clang warnings: drivers/usb/host/isp1362-hcd.c:715:6: warning: Value stored to 'index' during its initialization is never read drivers/usb/host/isp1362-hcd.c:2254:2: warning: Value stored to 'total' is never read Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/usb/host/isp1362-hcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8444efc4a052332d643ed5c8aebcca148c7de032 Author: Colin Ian King Date: Tue Nov 7 11:45:27 2017 +0000 USB: adutux: remove redundant variable minor Variable minor is being assigned but never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/usb/misc/adutux.c:770:2: warning: Value stored to 'minor' is never read Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/adutux.c | 2 -- 1 file changed, 2 deletions(-) commit f8f3e4acbde3dff2e433d02476034606e07ac742 Author: Felipe Balbi Date: Thu Nov 2 10:57:42 2017 +0200 usb: core: add a new usb_get_ptm_status() helper Drivers who are interested in the PTM status stype, should use this new helper to make sure they issue the correct GetStatus message. Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman include/linux/usb.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 2e43f0fe379c317d1ca27a69d860e397682ce957 Author: Felipe Balbi Date: Thu Nov 2 10:57:41 2017 +0200 usb: core: add a 'type' parameter to usb_get_status() This new 'type' parameter will allows interested drivers to request for PTM status or Standard status. Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/core/message.c | 47 +++++++++++++++++++++++++++++++++++++++------- include/linux/usb.h | 5 +++-- 2 files changed, 43 insertions(+), 9 deletions(-) commit d9e1e1484ade396b3a979ba6c68798dbaceed1b9 Author: Felipe Balbi Date: Thu Nov 2 10:57:40 2017 +0200 usb: core: introduce a new usb_get_std_status() helper This new helper is a simple wrapper around usb_get_status(). This patch is in preparation to adding support for fetching PTM_STATUS types. No functional changes. Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x_usb.c | 4 ++-- drivers/usb/core/driver.c | 4 ++-- drivers/usb/core/hub.c | 8 ++++---- drivers/usb/misc/usbtest.c | 8 ++++---- include/linux/usb.h | 7 +++++++ 5 files changed, 19 insertions(+), 12 deletions(-) commit 3c377ef1000d57cb1faf8b86ea77cfa47141db33 Author: Felipe Balbi Date: Thu Nov 2 10:57:39 2017 +0200 usb: core: rename usb_get_status() 'type' argument to 'recip' This makes it a lot clearer that we're expecting a recipient as the argument. A follow-up patch will use the argument 'type' as the status type selector (standard or ptm). Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/core/message.c | 6 +++--- include/linux/usb.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 6f27f4f97ee8cbec99b429b653333f4e781a47a1 Author: Felipe Balbi Date: Thu Nov 2 10:57:38 2017 +0200 usb: core: add Status Type definitions USB 3.1 added a PTM_STATUS type. Let's add a define for it and following patches will let usb_get_status() accept the new argument. Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/core/message.c | 4 ++-- include/uapi/linux/usb/ch9.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) commit e79bfcb795f9cabc7d5903eb779bed3f4d14b364 Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:33 2017 +0100 USB: gadget: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/composite.c | 5 ----- drivers/usb/gadget/config.c | 5 ----- drivers/usb/gadget/epautoconf.c | 5 ----- drivers/usb/gadget/u_f.c | 4 ---- drivers/usb/gadget/u_f.h | 4 ---- drivers/usb/gadget/u_os_desc.h | 4 ---- drivers/usb/gadget/usbstring.c | 5 ----- 7 files changed, 32 deletions(-) commit 24ceb9c669bc18c7de3ae38863ffed8b68ceae9b Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:32 2017 +0100 USB: gadget: function: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Oliver Neukum Cc: Johan Hovold Cc: Jerry Zhang Cc: John Keeping Cc: Krzysztof Opasiak Cc: Abdulhadi Mohamed Cc: Matthew Wilcox Cc: Janusz Dziedzic Acked-by: Felipe Balbi Acked-by: Michal Nazarewicz Acked-by: Laurent Pinchart Acked-by: Vincent Pelletier Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_acm.c | 4 ---- drivers/usb/gadget/function/f_ecm.c | 5 ----- drivers/usb/gadget/function/f_eem.c | 5 ----- drivers/usb/gadget/function/f_fs.c | 5 ----- drivers/usb/gadget/function/f_hid.c | 5 ----- drivers/usb/gadget/function/f_loopback.c | 5 ----- drivers/usb/gadget/function/f_midi.c | 2 -- drivers/usb/gadget/function/f_ncm.c | 5 ----- drivers/usb/gadget/function/f_obex.c | 5 ----- drivers/usb/gadget/function/f_phonet.c | 4 ---- drivers/usb/gadget/function/f_printer.c | 5 ----- drivers/usb/gadget/function/f_rndis.c | 5 ----- drivers/usb/gadget/function/f_serial.c | 4 ---- drivers/usb/gadget/function/f_sourcesink.c | 5 ----- drivers/usb/gadget/function/f_subset.c | 5 ----- drivers/usb/gadget/function/f_tcm.c | 1 - drivers/usb/gadget/function/f_uac1.c | 5 ----- drivers/usb/gadget/function/f_uac1_legacy.c | 2 -- drivers/usb/gadget/function/f_uac2.c | 5 ----- drivers/usb/gadget/function/f_uvc.c | 5 ----- drivers/usb/gadget/function/f_uvc.h | 5 ----- drivers/usb/gadget/function/rndis.c | 4 ---- drivers/usb/gadget/function/rndis.h | 4 ---- drivers/usb/gadget/function/storage_common.c | 5 ----- drivers/usb/gadget/function/u_audio.c | 10 ---------- drivers/usb/gadget/function/u_audio.h | 11 ----------- drivers/usb/gadget/function/u_ecm.h | 4 ---- drivers/usb/gadget/function/u_eem.h | 4 ---- drivers/usb/gadget/function/u_ether.c | 5 ----- drivers/usb/gadget/function/u_ether.h | 5 ----- drivers/usb/gadget/function/u_ether_configfs.h | 4 ---- drivers/usb/gadget/function/u_fs.h | 4 ---- drivers/usb/gadget/function/u_gether.h | 4 ---- drivers/usb/gadget/function/u_hid.h | 4 ---- drivers/usb/gadget/function/u_midi.h | 4 ---- drivers/usb/gadget/function/u_ncm.h | 4 ---- drivers/usb/gadget/function/u_phonet.h | 4 ---- drivers/usb/gadget/function/u_printer.h | 4 ---- drivers/usb/gadget/function/u_rndis.h | 4 ---- drivers/usb/gadget/function/u_serial.c | 4 ---- drivers/usb/gadget/function/u_serial.h | 4 ---- drivers/usb/gadget/function/u_tcm.h | 4 ---- drivers/usb/gadget/function/u_uac1.h | 4 ---- drivers/usb/gadget/function/u_uac1_legacy.c | 2 -- drivers/usb/gadget/function/u_uac1_legacy.h | 2 -- drivers/usb/gadget/function/u_uac2.h | 4 ---- drivers/usb/gadget/function/u_uvc.h | 4 ---- drivers/usb/gadget/function/uvc.h | 5 ----- drivers/usb/gadget/function/uvc_configfs.c | 4 ---- drivers/usb/gadget/function/uvc_configfs.h | 4 ---- drivers/usb/gadget/function/uvc_queue.c | 5 ----- drivers/usb/gadget/function/uvc_v4l2.c | 5 ----- drivers/usb/gadget/function/uvc_v4l2.h | 4 ---- drivers/usb/gadget/function/uvc_video.c | 5 ----- drivers/usb/gadget/function/uvc_video.h | 4 ---- 55 files changed, 244 deletions(-) commit 229e3682393c31349539c79131996feeee6d5387 Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:31 2017 +0100 USB: gadget: udc: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Kevin Cernekee Cc: Florian Fainelli Cc: Vladimir Zapolskiy Cc: Sylvain Lemieux Cc: Daniel Mack Cc: Haojian Zhuang Cc: Michal Simek Cc: "Sören Brinkmann" Cc: Raviteja Garimella Cc: Romain Perier Cc: Johan Hovold Cc: Al Cooper Cc: Srinath Mannam Cc: Roger Quadros Cc: Krzysztof Opasiak Cc: Stefan Agner Cc: Alan Stern Cc: "Felix Hädicke" Cc: Peter Chen Cc: Allen Pais Cc: Yuyang Du Acked-by: Felipe Balbi Acked-by: Nicolas Ferre Acked-by: Robert Jarzmik Acked-by: Li Yang Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/amd5536udc.h | 5 ----- drivers/usb/gadget/udc/amd5536udc_pci.c | 5 ----- drivers/usb/gadget/udc/at91_udc.c | 5 ----- drivers/usb/gadget/udc/at91_udc.h | 5 ----- drivers/usb/gadget/udc/atmel_usba_udc.c | 4 ---- drivers/usb/gadget/udc/atmel_usba_udc.h | 4 ---- drivers/usb/gadget/udc/bcm63xx_udc.c | 5 ----- drivers/usb/gadget/udc/bdc/bdc.h | 6 ------ drivers/usb/gadget/udc/bdc/bdc_cmd.c | 6 ------ drivers/usb/gadget/udc/bdc/bdc_cmd.h | 6 ------ drivers/usb/gadget/udc/bdc/bdc_core.c | 6 ------ drivers/usb/gadget/udc/bdc/bdc_dbg.c | 6 ------ drivers/usb/gadget/udc/bdc/bdc_dbg.h | 6 ------ drivers/usb/gadget/udc/bdc/bdc_ep.c | 6 ------ drivers/usb/gadget/udc/bdc/bdc_ep.h | 6 ------ drivers/usb/gadget/udc/bdc/bdc_pci.c | 6 ------ drivers/usb/gadget/udc/bdc/bdc_udc.c | 6 ------ drivers/usb/gadget/udc/core.c | 12 ------------ drivers/usb/gadget/udc/dummy_hcd.c | 5 ----- drivers/usb/gadget/udc/fotg210-udc.c | 4 ---- drivers/usb/gadget/udc/fotg210.h | 5 ----- drivers/usb/gadget/udc/fsl_mxc_udc.c | 5 ----- drivers/usb/gadget/udc/fsl_qe_udc.c | 5 ----- drivers/usb/gadget/udc/fsl_qe_udc.h | 5 ----- drivers/usb/gadget/udc/fsl_udc_core.c | 5 ----- drivers/usb/gadget/udc/fsl_usb2_udc.h | 5 ----- drivers/usb/gadget/udc/fusb300_udc.c | 4 ---- drivers/usb/gadget/udc/fusb300_udc.h | 4 ---- drivers/usb/gadget/udc/goku_udc.c | 4 ---- drivers/usb/gadget/udc/goku_udc.h | 4 ---- drivers/usb/gadget/udc/gr_udc.c | 5 ----- drivers/usb/gadget/udc/gr_udc.h | 5 ----- drivers/usb/gadget/udc/lpc32xx_udc.c | 14 -------------- drivers/usb/gadget/udc/m66592-udc.c | 4 ---- drivers/usb/gadget/udc/m66592-udc.h | 4 ---- drivers/usb/gadget/udc/mv_u3d.h | 4 ---- drivers/usb/gadget/udc/mv_u3d_core.c | 4 ---- drivers/usb/gadget/udc/mv_udc.h | 5 ----- drivers/usb/gadget/udc/mv_udc_core.c | 5 ----- drivers/usb/gadget/udc/net2272.c | 14 -------------- drivers/usb/gadget/udc/net2272.h | 14 -------------- drivers/usb/gadget/udc/net2280.c | 5 ----- drivers/usb/gadget/udc/net2280.h | 5 ----- drivers/usb/gadget/udc/omap_udc.c | 5 ----- drivers/usb/gadget/udc/pch_udc.c | 4 ---- drivers/usb/gadget/udc/pxa25x_udc.c | 5 ----- drivers/usb/gadget/udc/pxa25x_udc.h | 6 ------ drivers/usb/gadget/udc/pxa27x_udc.c | 5 ----- drivers/usb/gadget/udc/pxa27x_udc.h | 5 ----- drivers/usb/gadget/udc/r8a66597-udc.c | 4 ---- drivers/usb/gadget/udc/r8a66597-udc.h | 4 ---- drivers/usb/gadget/udc/renesas_usb3.c | 4 ---- drivers/usb/gadget/udc/s3c-hsudc.c | 6 +----- drivers/usb/gadget/udc/s3c2410_udc.c | 5 ----- drivers/usb/gadget/udc/s3c2410_udc.h | 5 ----- drivers/usb/gadget/udc/snps_udc_core.c | 5 ----- drivers/usb/gadget/udc/snps_udc_plat.c | 9 --------- drivers/usb/gadget/udc/trace.c | 9 --------- drivers/usb/gadget/udc/trace.h | 12 ------------ drivers/usb/gadget/udc/udc-xilinx.c | 6 ------ 60 files changed, 1 insertion(+), 346 deletions(-) commit d7e285367916b0b57fc24b1c481ffbaa026019a3 Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:30 2017 +0100 USB: gadget: legacy: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Johan Hovold Cc: Ruslan Bilovol Cc: Peter Chen Cc: Alan Stern Cc: David Windsor Acked-by: Felipe Balbi Acked-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/legacy/acm_ms.c | 5 ----- drivers/usb/gadget/legacy/audio.c | 2 -- drivers/usb/gadget/legacy/cdc2.c | 5 ----- drivers/usb/gadget/legacy/ether.c | 5 ----- drivers/usb/gadget/legacy/g_ffs.c | 5 ----- drivers/usb/gadget/legacy/gmidi.c | 3 --- drivers/usb/gadget/legacy/hid.c | 5 ----- drivers/usb/gadget/legacy/inode.c | 5 ----- drivers/usb/gadget/legacy/mass_storage.c | 5 ----- drivers/usb/gadget/legacy/multi.c | 5 ----- drivers/usb/gadget/legacy/ncm.c | 5 ----- drivers/usb/gadget/legacy/nokia.c | 4 ---- drivers/usb/gadget/legacy/printer.c | 5 ----- drivers/usb/gadget/legacy/serial.c | 4 ---- drivers/usb/gadget/legacy/tcm_usb_gadget.c | 1 - drivers/usb/gadget/legacy/webcam.c | 5 ----- drivers/usb/gadget/legacy/zero.c | 5 ----- 17 files changed, 74 deletions(-) commit ba2e73bb879b3865e8ba8e80a829f6f760998322 Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:29 2017 +0100 USB: host: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Felipe Balbi Cc: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/host/bcma-hcd.c | 2 -- drivers/usb/host/fotg210-hcd.c | 14 -------------- drivers/usb/host/fsl-mph-dr-of.c | 5 ----- drivers/usb/host/hwa-hc.c | 15 --------------- drivers/usb/host/oxu210hp-hcd.c | 14 -------------- drivers/usb/host/r8a66597-hcd.c | 14 -------------- drivers/usb/host/r8a66597.h | 14 -------------- drivers/usb/host/ssb-hcd.c | 2 -- drivers/usb/host/u132-hcd.c | 5 ----- 9 files changed, 85 deletions(-) commit 545c8274d9eb65723cb8bc012fa06c4890d9840d Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:28 2017 +0100 USB: host: imx21: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Johan Hovold Cc: Felipe Balbi Cc: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/usb/host/imx21-dbg.c | 14 -------------- drivers/usb/host/imx21-hcd.c | 14 -------------- drivers/usb/host/imx21-hcd.h | 14 -------------- 3 files changed, 42 deletions(-) commit fc4e404d586572b2de42f7eab373064408c1647a Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:27 2017 +0100 USB: host: fhci: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Felipe Balbi Cc: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/host/fhci-dbg.c | 5 ----- drivers/usb/host/fhci-hcd.c | 5 ----- drivers/usb/host/fhci-hub.c | 5 ----- drivers/usb/host/fhci-mem.c | 5 ----- drivers/usb/host/fhci-q.c | 5 ----- drivers/usb/host/fhci-sched.c | 5 ----- drivers/usb/host/fhci-tds.c | 5 ----- drivers/usb/host/fhci.h | 5 ----- 8 files changed, 40 deletions(-) commit d214109875b419c85c596d39b032692133bf58ba Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:26 2017 +0100 USB: host: ehci: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-atmel.c | 4 ---- drivers/usb/host/ehci-dbg.c | 11 ----------- drivers/usb/host/ehci-exynos.c | 6 ------ drivers/usb/host/ehci-fsl.c | 14 -------------- drivers/usb/host/ehci-fsl.h | 14 -------------- drivers/usb/host/ehci-grlib.c | 14 -------------- drivers/usb/host/ehci-hcd.c | 14 -------------- drivers/usb/host/ehci-hub.c | 14 -------------- drivers/usb/host/ehci-mem.c | 14 -------------- drivers/usb/host/ehci-mv.c | 5 ----- drivers/usb/host/ehci-mxc.c | 14 -------------- drivers/usb/host/ehci-omap.c | 15 --------------- drivers/usb/host/ehci-orion.c | 4 ---- drivers/usb/host/ehci-pci.c | 14 -------------- drivers/usb/host/ehci-platform.c | 2 -- drivers/usb/host/ehci-pmcmsp.c | 5 ----- drivers/usb/host/ehci-ps3.c | 13 ------------- drivers/usb/host/ehci-q.c | 14 -------------- drivers/usb/host/ehci-sched.c | 14 -------------- drivers/usb/host/ehci-sh.c | 4 ---- drivers/usb/host/ehci-spear.c | 4 ---- drivers/usb/host/ehci-st.c | 4 ---- drivers/usb/host/ehci-sysfs.c | 14 -------------- drivers/usb/host/ehci-tegra.c | 11 ----------- drivers/usb/host/ehci-tilegx.c | 10 ---------- drivers/usb/host/ehci-timer.c | 10 ---------- drivers/usb/host/ehci-w90x900.c | 5 ----- drivers/usb/host/ehci-xilinx-of.c | 15 --------------- drivers/usb/host/ehci.h | 14 -------------- 29 files changed, 296 deletions(-) commit ef1362d9c0a7256cd7a00780858deff17e90f73e Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:25 2017 +0100 USB: host: ohci: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-da8xx.c | 4 ---- drivers/usb/host/ohci-exynos.c | 6 ------ drivers/usb/host/ohci-nxp.c | 5 +---- drivers/usb/host/ohci-platform.c | 2 -- drivers/usb/host/ohci-ps3.c | 13 ------------- drivers/usb/host/ohci-spear.c | 4 ---- drivers/usb/host/ohci-st.c | 4 ---- drivers/usb/host/ohci-tilegx.c | 10 ---------- drivers/usb/host/ohci-tmio.c | 4 ---- 9 files changed, 1 insertion(+), 51 deletions(-) commit 3905118912c2fb2960aa5ead389b4905d15bbdcd Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:24 2017 +0100 USB: host: whci: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Felipe Balbi Cc: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/host/whci/asl.c | 12 ------------ drivers/usb/host/whci/debug.c | 12 ------------ drivers/usb/host/whci/hcd.c | 12 ------------ drivers/usb/host/whci/hw.c | 12 ------------ drivers/usb/host/whci/init.c | 12 ------------ drivers/usb/host/whci/int.c | 12 ------------ drivers/usb/host/whci/pzl.c | 12 ------------ drivers/usb/host/whci/qset.c | 12 ------------ drivers/usb/host/whci/whcd.h | 14 -------------- drivers/usb/host/whci/whci-hc.h | 14 -------------- drivers/usb/host/whci/wusb.c | 12 ------------ 11 files changed, 136 deletions(-) commit 9ed64195e35efa8901d20a0cd8ff3668ae68e7d6 Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:23 2017 +0100 USB: host: xhci: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Matthias Brugger Cc: Thierry Reding Cc: Jonathan Hunter Acked-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-dbg.c | 13 ------------- drivers/usb/host/xhci-debugfs.c | 4 ---- drivers/usb/host/xhci-debugfs.h | 4 ---- drivers/usb/host/xhci-ext-caps.h | 13 ------------- drivers/usb/host/xhci-hub.c | 13 ------------- drivers/usb/host/xhci-mem.c | 13 ------------- drivers/usb/host/xhci-mtk-sch.c | 10 ---------- drivers/usb/host/xhci-mtk.c | 10 ---------- drivers/usb/host/xhci-mtk.h | 10 ---------- drivers/usb/host/xhci-mvebu.c | 4 ---- drivers/usb/host/xhci-mvebu.h | 4 ---- drivers/usb/host/xhci-pci.c | 13 ------------- drivers/usb/host/xhci-plat.c | 4 ---- drivers/usb/host/xhci-plat.h | 4 ---- drivers/usb/host/xhci-rcar.c | 4 ---- drivers/usb/host/xhci-rcar.h | 4 ---- drivers/usb/host/xhci-ring.c | 13 ------------- drivers/usb/host/xhci-tegra.c | 4 ---- drivers/usb/host/xhci-trace.c | 4 ---- drivers/usb/host/xhci-trace.h | 4 ---- drivers/usb/host/xhci.c | 13 ------------- drivers/usb/host/xhci.h | 13 ------------- 22 files changed, 178 deletions(-) commit 3e08b64f665838a818ec656c8a6396dd58d67e45 Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:22 2017 +0100 USB: early: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Acked-by: Lu Baolu Signed-off-by: Greg Kroah-Hartman drivers/usb/early/xhci-dbc.c | 4 ---- drivers/usb/early/xhci-dbc.h | 4 ---- 2 files changed, 8 deletions(-) commit 12c3de7ef7420de6974bbffc4f7d321577aad2d4 Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:21 2017 +0100 USB: c67x00: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Peter Korsgaard Signed-off-by: Greg Kroah-Hartman drivers/usb/c67x00/c67x00-drv.c | 15 --------------- drivers/usb/c67x00/c67x00-hcd.c | 15 --------------- drivers/usb/c67x00/c67x00-hcd.h | 15 --------------- drivers/usb/c67x00/c67x00-ll-hpi.c | 15 --------------- drivers/usb/c67x00/c67x00-sched.c | 15 --------------- drivers/usb/c67x00/c67x00.h | 15 --------------- 6 files changed, 90 deletions(-) commit 6c2d03e8f74c8f3fbcc10d68f4b87f8ed2da3ef4 Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:20 2017 +0100 USB: dwc2: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: John Youn Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc2/debug.h | 9 --------- drivers/usb/dwc2/debugfs.c | 9 --------- drivers/usb/dwc2/gadget.c | 4 ---- 3 files changed, 22 deletions(-) commit b5ea47570b5ea4215406d55fe2cb633331f42957 Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:19 2017 +0100 USB: dwc3: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Patrice Chotard Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/dwc3/core.c | 12 ------------ drivers/usb/dwc3/core.h | 9 --------- drivers/usb/dwc3/debug.h | 9 --------- drivers/usb/dwc3/debugfs.c | 9 --------- drivers/usb/dwc3/drd.c | 12 ------------ drivers/usb/dwc3/dwc3-exynos.c | 9 --------- drivers/usb/dwc3/dwc3-keystone.c | 9 --------- drivers/usb/dwc3/dwc3-of-simple.c | 9 --------- drivers/usb/dwc3/dwc3-omap.c | 9 --------- drivers/usb/dwc3/dwc3-pci.c | 9 --------- drivers/usb/dwc3/dwc3-st.c | 5 ----- drivers/usb/dwc3/ep0.c | 9 --------- drivers/usb/dwc3/gadget.c | 9 --------- drivers/usb/dwc3/gadget.h | 9 --------- drivers/usb/dwc3/host.c | 9 --------- drivers/usb/dwc3/io.h | 9 --------- drivers/usb/dwc3/trace.c | 9 --------- drivers/usb/dwc3/trace.h | 9 --------- drivers/usb/dwc3/ulpi.c | 4 ---- 19 files changed, 168 deletions(-) commit 51b751f112dcbb24b46051fe64c2ddbe8aa367ea Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:18 2017 +0100 USB: chipidea: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Thierry Reding Cc: Jonathan Hunter Acked-by: Peter Chen Signed-off-by: Greg Kroah-Hartman drivers/usb/chipidea/bits.h | 4 ---- drivers/usb/chipidea/ci.h | 4 ---- drivers/usb/chipidea/ci_hdrc_imx.c | 7 ------- drivers/usb/chipidea/ci_hdrc_imx.h | 7 ------- drivers/usb/chipidea/ci_hdrc_msm.c | 7 +------ drivers/usb/chipidea/ci_hdrc_pci.c | 4 ---- drivers/usb/chipidea/ci_hdrc_tegra.c | 4 ---- drivers/usb/chipidea/ci_hdrc_usb2.c | 4 ---- drivers/usb/chipidea/ci_hdrc_zevio.c | 5 ----- drivers/usb/chipidea/core.c | 4 ---- drivers/usb/chipidea/host.c | 13 ------------- drivers/usb/chipidea/otg.c | 4 ---- drivers/usb/chipidea/otg.h | 4 ---- drivers/usb/chipidea/otg_fsm.c | 4 ---- drivers/usb/chipidea/otg_fsm.h | 4 ---- drivers/usb/chipidea/udc.c | 4 ---- drivers/usb/chipidea/udc.h | 4 ---- drivers/usb/chipidea/ulpi.c | 9 --------- drivers/usb/chipidea/usbmisc_imx.c | 7 ------- 19 files changed, 1 insertion(+), 102 deletions(-) commit a2c1b455fc2ced7ee85a48ab90f2056b5edc4389 Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:17 2017 +0100 USB: isp1760: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Felipe Balbi Cc: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/isp1760/isp1760-core.c | 4 ---- drivers/usb/isp1760/isp1760-core.h | 4 ---- drivers/usb/isp1760/isp1760-regs.h | 4 ---- drivers/usb/isp1760/isp1760-udc.c | 4 ---- drivers/usb/isp1760/isp1760-udc.h | 4 ---- 5 files changed, 20 deletions(-) commit 4c55a1577424c400e49a8ae8695a01ed6258ba25 Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:16 2017 +0100 USB: mtu3: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Acked-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3.h | 10 ---------- drivers/usb/mtu3/mtu3_core.c | 10 ---------- drivers/usb/mtu3/mtu3_dr.c | 10 ---------- drivers/usb/mtu3/mtu3_dr.h | 10 ---------- drivers/usb/mtu3/mtu3_gadget.c | 10 ---------- drivers/usb/mtu3/mtu3_gadget_ep0.c | 10 ---------- drivers/usb/mtu3/mtu3_host.c | 10 ---------- drivers/usb/mtu3/mtu3_hw_regs.h | 10 ---------- drivers/usb/mtu3/mtu3_plat.c | 10 ---------- drivers/usb/mtu3/mtu3_qmu.c | 10 ---------- drivers/usb/mtu3/mtu3_qmu.h | 10 ---------- 11 files changed, 110 deletions(-) commit 21b650c23611998ab3a69a401115740b32594d2e Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:15 2017 +0100 USB: musb: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Maxime Ripard Cc: Chen-Yu Tsai Acked-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/am35x.c | 17 ----------------- drivers/usb/musb/blackfin.c | 2 -- drivers/usb/musb/blackfin.h | 5 ----- drivers/usb/musb/da8xx.c | 17 ----------------- drivers/usb/musb/davinci.c | 17 ----------------- drivers/usb/musb/davinci.h | 5 ----- drivers/usb/musb/jz4740.c | 9 --------- drivers/usb/musb/musb_core.c | 26 -------------------------- drivers/usb/musb/musb_core.h | 26 -------------------------- drivers/usb/musb/musb_debug.h | 26 -------------------------- drivers/usb/musb/musb_debugfs.c | 26 -------------------------- drivers/usb/musb/musb_dma.h | 26 -------------------------- drivers/usb/musb/musb_dsps.c | 16 ---------------- drivers/usb/musb/musb_gadget.c | 26 -------------------------- drivers/usb/musb/musb_gadget.h | 26 -------------------------- drivers/usb/musb/musb_gadget_ep0.c | 26 -------------------------- drivers/usb/musb/musb_host.c | 26 -------------------------- drivers/usb/musb/musb_host.h | 26 -------------------------- drivers/usb/musb/musb_io.h | 26 -------------------------- drivers/usb/musb/musb_regs.h | 26 -------------------------- drivers/usb/musb/musb_trace.c | 9 --------- drivers/usb/musb/musb_trace.h | 9 --------- drivers/usb/musb/musb_virthub.c | 26 -------------------------- drivers/usb/musb/musbhsdma.c | 26 -------------------------- drivers/usb/musb/musbhsdma.h | 26 -------------------------- drivers/usb/musb/omap2430.c | 17 ----------------- drivers/usb/musb/omap2430.h | 5 ----- drivers/usb/musb/sunxi.c | 10 ---------- drivers/usb/musb/tusb6010.c | 4 ---- drivers/usb/musb/tusb6010.h | 4 ---- drivers/usb/musb/tusb6010_omap.c | 4 ---- drivers/usb/musb/ux500.c | 14 -------------- drivers/usb/musb/ux500_dma.c | 13 ------------- 33 files changed, 567 deletions(-) commit a8f523fb5971f3a724a02b248f1fbbc8db703897 Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:14 2017 +0100 USB: typec: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Johan Hovold Cc: Guenter Roeck Cc: Felipe Balbi Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/typec.c | 4 ---- drivers/usb/typec/typec_wcove.c | 4 ---- drivers/usb/typec/ucsi/ucsi.c | 4 ---- drivers/usb/typec/ucsi/ucsi_acpi.c | 4 ---- 4 files changed, 16 deletions(-) commit fb3967b95c4e9c06f84d10b79ed7c3913ddbf536 Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:13 2017 +0100 USB: phy: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Thierry Reding Cc: Jonathan Hunter Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/of.c | 5 ----- drivers/usb/phy/phy-ab8500-usb.c | 15 --------------- drivers/usb/phy/phy-fsl-usb.c | 14 -------------- drivers/usb/phy/phy-fsl-usb.h | 17 +---------------- drivers/usb/phy/phy-generic.c | 14 -------------- drivers/usb/phy/phy-gpio-vbus-usb.c | 4 ---- drivers/usb/phy/phy-isp1301-omap.c | 14 -------------- drivers/usb/phy/phy-isp1301.c | 4 ---- drivers/usb/phy/phy-keystone.c | 10 ---------- drivers/usb/phy/phy-mv-usb.c | 5 ----- drivers/usb/phy/phy-mv-usb.h | 5 ----- drivers/usb/phy/phy-mxs-usb.c | 7 ------- drivers/usb/phy/phy-omap-otg.c | 9 --------- drivers/usb/phy/phy-tahvo.c | 9 --------- drivers/usb/phy/phy-tegra-usb.c | 10 ---------- drivers/usb/phy/phy-twl6030-usb.c | 14 -------------- drivers/usb/phy/phy-ulpi-viewport.c | 10 ---------- drivers/usb/phy/phy-ulpi.c | 14 -------------- drivers/usb/phy/phy.c | 5 ----- 19 files changed, 1 insertion(+), 184 deletions(-) commit 1250413a81612f49a0ae9f89342108c625779280 Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:12 2017 +0100 USB: renesas_usbhs: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Rob Herring Cc: Simon Horman Cc: Geert Uytterhoeven Cc: Chanwoo Choi Cc: Johan Hovold Cc: Kazuya Mizuguchi Cc: Bhumika Goyal Acked-by: Felipe Balbi Acked-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 10 ---------- drivers/usb/renesas_usbhs/common.h | 10 ---------- drivers/usb/renesas_usbhs/fifo.c | 10 ---------- drivers/usb/renesas_usbhs/fifo.h | 10 ---------- drivers/usb/renesas_usbhs/mod.c | 10 ---------- drivers/usb/renesas_usbhs/mod.h | 10 ---------- drivers/usb/renesas_usbhs/mod_gadget.c | 10 ---------- drivers/usb/renesas_usbhs/mod_host.c | 10 ---------- drivers/usb/renesas_usbhs/pipe.c | 10 ---------- drivers/usb/renesas_usbhs/pipe.h | 10 ---------- drivers/usb/renesas_usbhs/rcar2.c | 6 ------ drivers/usb/renesas_usbhs/rcar3.c | 5 ----- 12 files changed, 111 deletions(-) commit 7f2b019c8d8b0330c142a5934dd77089d5282c74 Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:11 2017 +0100 USB: usbip: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Valentina Manea Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/stub.h | 15 --------------- drivers/usb/usbip/stub_dev.c | 15 --------------- drivers/usb/usbip/stub_main.c | 15 --------------- drivers/usb/usbip/stub_rx.c | 15 --------------- drivers/usb/usbip/stub_tx.c | 15 --------------- drivers/usb/usbip/usbip_common.c | 15 --------------- drivers/usb/usbip/usbip_common.h | 15 --------------- drivers/usb/usbip/usbip_event.c | 15 --------------- drivers/usb/usbip/vhci.h | 6 ------ drivers/usb/usbip/vhci_hcd.c | 15 --------------- drivers/usb/usbip/vhci_rx.c | 15 --------------- drivers/usb/usbip/vhci_sysfs.c | 15 --------------- drivers/usb/usbip/vhci_tx.c | 15 --------------- drivers/usb/usbip/vudc.h | 13 ------------- drivers/usb/usbip/vudc_dev.c | 13 ------------- drivers/usb/usbip/vudc_main.c | 13 ------------- drivers/usb/usbip/vudc_rx.c | 13 ------------- drivers/usb/usbip/vudc_sysfs.c | 13 ------------- drivers/usb/usbip/vudc_transfer.c | 13 ------------- drivers/usb/usbip/vudc_tx.c | 13 ------------- 20 files changed, 277 deletions(-) commit 060b694929a45e30181b8d8aa9b7e896f4f12f81 Author: Greg Kroah-Hartman Date: Mon Nov 6 15:37:10 2017 +0100 USB: wusbcore: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Felipe Balbi Cc: Johan Hovold Cc: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/usb/wusbcore/cbaf.c | 15 --------------- drivers/usb/wusbcore/crypto.c | 15 --------------- drivers/usb/wusbcore/dev-sysfs.c | 15 --------------- drivers/usb/wusbcore/devconnect.c | 15 --------------- drivers/usb/wusbcore/mmc.c | 15 --------------- drivers/usb/wusbcore/pal.c | 12 ------------ drivers/usb/wusbcore/reservation.c | 12 ------------ drivers/usb/wusbcore/rh.c | 15 --------------- drivers/usb/wusbcore/security.c | 15 --------------- drivers/usb/wusbcore/wa-hc.c | 15 --------------- drivers/usb/wusbcore/wa-hc.h | 15 --------------- drivers/usb/wusbcore/wa-nep.c | 15 --------------- drivers/usb/wusbcore/wa-rpipe.c | 15 --------------- drivers/usb/wusbcore/wa-xfer.c | 15 --------------- drivers/usb/wusbcore/wusbhc.c | 15 --------------- drivers/usb/wusbcore/wusbhc.h | 15 --------------- 16 files changed, 234 deletions(-) commit 819aeee065e5d1b417ecd633897427c89f3253ec Author: Brijesh Singh Date: Fri Oct 20 09:30:59 2017 -0500 X86/KVM: Clear encryption attribute when SEV is active The guest physical memory area holding the struct pvclock_wall_clock and struct pvclock_vcpu_time_info are shared with the hypervisor. It periodically updates the contents of the memory. When SEV is active, the encryption attributes from the shared memory pages must be cleared so that both hypervisor and guest can access the data. Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Tested-by: Borislav Petkov Cc: Tom Lendacky Cc: kvm@vger.kernel.org Cc: Radim Krčmář Cc: Borislav Petkov Cc: Paolo Bonzini Link: https://lkml.kernel.org/r/20171020143059.3291-18-brijesh.singh@amd.com arch/x86/entry/vdso/vma.c | 5 ++-- arch/x86/kernel/kvmclock.c | 65 ++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 57 insertions(+), 13 deletions(-) commit 4716276184ec67a123a4eab81609a0688b1d650b Author: Brijesh Singh Date: Fri Oct 20 09:30:58 2017 -0500 X86/KVM: Decrypt shared per-cpu variables when SEV is active When SEV is active, guest memory is encrypted with a guest-specific key, a guest memory region shared with the hypervisor must be mapped as decrypted before it can be shared. Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Tested-by: Borislav Petkov Cc: Tom Lendacky Cc: kvm@vger.kernel.org Cc: Radim Krčmář Cc: Borislav Petkov Cc: Paolo Bonzini Link: https://lkml.kernel.org/r/20171020143059.3291-17-brijesh.singh@amd.com arch/x86/kernel/kvm.c | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) commit ac26963a1175c813e3ed21c0d2435b083173136e Author: Brijesh Singh Date: Fri Oct 20 09:30:57 2017 -0500 percpu: Introduce DEFINE_PER_CPU_DECRYPTED KVM guest defines three per-CPU variables (steal-time, apf_reason, and kvm_pic_eoi) which are shared between a guest and a hypervisor. When SEV is active, memory is encrypted with a guest-specific key, and if the guest OS wants to share the memory region with the hypervisor then it must clear the C-bit (i.e set decrypted) before sharing it. DEFINE_PER_CPU_DECRYPTED can be used to define the per-CPU variables which will be shared between a guest and a hypervisor. Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Tested-by: Borislav Petkov Acked-by: Tejun Heo Reviewed-by: Borislav Petkov Cc: linux-arch@vger.kernel.org Cc: Tom Lendacky Cc: kvm@vger.kernel.org Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Christoph Lameter Link: https://lkml.kernel.org/r/20171020143059.3291-16-brijesh.singh@amd.com include/asm-generic/vmlinux.lds.h | 19 +++++++++++++++++++ include/linux/percpu-defs.h | 15 +++++++++++++++ 2 files changed, 34 insertions(+) commit dfaaec9033b80d71056e21cda920752e55f2c514 Author: Brijesh Singh Date: Fri Oct 20 09:30:56 2017 -0500 x86: Add support for changing memory encryption attribute in early boot Some KVM-specific custom MSRs share the guest physical address with the hypervisor in early boot. When SEV is active, the shared physical address must be mapped with memory encryption attribute cleared so that both hypervisor and guest can access the data. Add APIs to change the memory encryption attribute in early boot code. Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Tested-by: Borislav Petkov Cc: Tom Lendacky Cc: kvm@vger.kernel.org Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20171020143059.3291-15-brijesh.singh@amd.com arch/x86/include/asm/mem_encrypt.h | 8 +++ arch/x86/mm/mem_encrypt.c | 130 +++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+) commit 606b21d4a6498c23632a4693c81b7b24feedd038 Author: Tom Lendacky Date: Fri Oct 20 09:30:55 2017 -0500 x86/io: Unroll string I/O when SEV is active Secure Encrypted Virtualization (SEV) does not support string I/O, so unroll the string I/O operation into a loop operating on one element at a time. [ tglx: Gave the static key a real name instead of the obscure __sev ] Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Tested-by: Borislav Petkov Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: kvm@vger.kernel.org Cc: David Laight Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20171020143059.3291-14-brijesh.singh@amd.com arch/x86/include/asm/io.h | 43 +++++++++++++++++++++++++++++++++++++++---- arch/x86/mm/mem_encrypt.c | 8 ++++++++ 2 files changed, 47 insertions(+), 4 deletions(-) commit 1958b5fc401067662ec11a6fcbe0daa26c813603 Author: Tom Lendacky Date: Fri Oct 20 09:30:54 2017 -0500 x86/boot: Add early boot support when running with SEV active Early in the boot process, add checks to determine if the kernel is running with Secure Encrypted Virtualization (SEV) active. Checking for SEV requires checking that the kernel is running under a hypervisor (CPUID 0x00000001, bit 31), that the SEV feature is available (CPUID 0x8000001f, bit 1) and then checking a non-interceptable SEV MSR (0xc0010131, bit 0). This check is required so that during early compressed kernel booting the pagetables (both the boot pagetables and KASLR pagetables (if enabled) are updated to include the encryption mask so that when the kernel is decompressed into encrypted memory, it can boot properly. After the kernel is decompressed and continues booting the same logic is used to check if SEV is active and set a flag indicating so. This allows to distinguish between SME and SEV, each of which have unique differences in how certain things are handled: e.g. DMA (always bounce buffered with SEV) or EFI tables (always access decrypted with SME). Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Tested-by: Borislav Petkov Cc: Laura Abbott Cc: Kees Cook Cc: kvm@vger.kernel.org Cc: Konrad Rzeszutek Wilk Cc: Radim Krčmář Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Paolo Bonzini Cc: "Kirill A. Shutemov" Link: https://lkml.kernel.org/r/20171020143059.3291-13-brijesh.singh@amd.com arch/x86/boot/compressed/Makefile | 1 + arch/x86/boot/compressed/head_64.S | 16 +++++ arch/x86/boot/compressed/mem_encrypt.S | 120 +++++++++++++++++++++++++++++++++ arch/x86/boot/compressed/misc.h | 2 + arch/x86/boot/compressed/pagetable.c | 8 ++- arch/x86/include/asm/msr-index.h | 3 + arch/x86/include/uapi/asm/kvm_para.h | 1 - arch/x86/mm/mem_encrypt.c | 50 +++++++++++--- 8 files changed, 186 insertions(+), 15 deletions(-) commit d7b417fa08d1187923c270bc33a3555c2fcff8b9 Author: Tom Lendacky Date: Fri Oct 20 09:30:53 2017 -0500 x86/mm: Add DMA support for SEV memory encryption DMA access to encrypted memory cannot be performed when SEV is active. In order for DMA to properly work when SEV is active, the SWIOTLB bounce buffers must be used. Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov C Tested-by: Borislav Petkov Cc: kvm@vger.kernel.org Cc: Konrad Rzeszutek Wilk Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20171020143059.3291-12-brijesh.singh@amd.com arch/x86/mm/mem_encrypt.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++ lib/swiotlb.c | 5 +-- 2 files changed, 89 insertions(+), 2 deletions(-) commit 0e4c12b45aa88e74fdda117896d2b61c4e510cb9 Author: Tom Lendacky Date: Fri Oct 20 09:30:52 2017 -0500 x86/mm, resource: Use PAGE_KERNEL protection for ioremap of memory pages In order for memory pages to be properly mapped when SEV is active, it's necessary to use the PAGE_KERNEL protection attribute as the base protection. This ensures that memory mapping of, e.g. ACPI tables, receives the proper mapping attributes. Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Tested-by: Borislav Petkov Cc: Laura Abbott Cc: Kees Cook Cc: kvm@vger.kernel.org Cc: Jérôme Glisse Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Andrew Morton Cc: Dan Williams Cc: "Kirill A. Shutemov" Link: https://lkml.kernel.org/r/20171020143059.3291-11-brijesh.singh@amd.com arch/x86/mm/ioremap.c | 79 ++++++++++++++++++++++++++++++++++++++++++-------- include/linux/ioport.h | 3 ++ kernel/resource.c | 19 ++++++++++++ 3 files changed, 89 insertions(+), 12 deletions(-) commit 1d2e733b13b450e5854f4a8f8efcd77fa7362d62 Author: Tom Lendacky Date: Fri Oct 20 09:30:51 2017 -0500 resource: Provide resource struct in resource walk callback In preperation for a new function that will need additional resource information during the resource walk, update the resource walk callback to pass the resource structure. Since the current callback start and end arguments are pulled from the resource structure, the callback functions can obtain them from the resource structure directly. Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Reviewed-by: Borislav Petkov Tested-by: Borislav Petkov Cc: kvm@vger.kernel.org Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: linuxppc-dev@lists.ozlabs.org Link: https://lkml.kernel.org/r/20171020143059.3291-10-brijesh.singh@amd.com arch/powerpc/kernel/machine_kexec_file_64.c | 12 +++++++++--- arch/x86/kernel/crash.c | 18 +++++++++--------- arch/x86/kernel/pmem.c | 2 +- include/linux/ioport.h | 4 ++-- include/linux/kexec.h | 2 +- kernel/kexec_file.c | 5 +++-- kernel/resource.c | 9 +++++---- 7 files changed, 30 insertions(+), 22 deletions(-) commit 4ac2aed837cbdbb21c12a28c04718e34c1dc225f Author: Tom Lendacky Date: Fri Oct 20 09:30:50 2017 -0500 resource: Consolidate resource walking code The walk_iomem_res_desc(), walk_system_ram_res() and walk_system_ram_range() functions each have much of the same code. Create a new function that consolidates the common code from these functions in one place to reduce the amount of duplicated code. Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Tested-by: Borislav Petkov Cc: kvm@vger.kernel.org Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20171020143059.3291-9-brijesh.singh@amd.com kernel/resource.c | 52 +++++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 27 deletions(-) commit 1379edd5967346a1fa79b8dc3e9ca261576c6bc9 Author: Tom Lendacky Date: Fri Oct 20 09:30:49 2017 -0500 x86/efi: Access EFI data as encrypted when SEV is active EFI data is encrypted when the kernel is run under SEV. Update the page table references to be sure the EFI memory areas are accessed encrypted. Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Tested-by: Borislav Petkov Cc: linux-efi@vger.kernel.org Cc: kvm@vger.kernel.org Cc: Ard Biesheuvel Cc: Matt Fleming Cc: Borislav Petkov Cc: Andy Lutomirski Link: https://lkml.kernel.org/r/20171020143059.3291-8-brijesh.singh@amd.com arch/x86/platform/efi/efi_64.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit a72ec5a34dca3b635eb2de3b485d0a1b2e591a5c Author: Tom Lendacky Date: Fri Oct 20 09:30:48 2017 -0500 x86/mm: Include SEV for encryption memory attribute changes The current code checks only for sme_active() when determining whether to perform the encryption attribute change. Include sev_active() in this check so that memory attribute changes can occur under SME and SEV. Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Tested-by: Borislav Petkov Cc: Laura Abbott Cc: John Ogness Cc: kvm@vger.kernel.org Cc: Matt Fleming Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Dan Williams Cc: "Kirill A. Shutemov" Link: https://lkml.kernel.org/r/20171020143059.3291-7-brijesh.singh@amd.com arch/x86/mm/pageattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 072f58c6ce29cf6cf429480fcd1b1e87d1d5ed18 Author: Tom Lendacky Date: Fri Oct 20 09:30:47 2017 -0500 x86/mm: Use encrypted access of boot related data with SEV When Secure Encrypted Virtualization (SEV) is active, boot data (such as EFI related data, setup data) is encrypted and needs to be accessed as such when mapped. Update the architecture override in early_memremap to keep the encryption attribute when mapping this data. Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Tested-by: Borislav Petkov Cc: Laura Abbott Cc: kvm@vger.kernel.org Cc: Matt Fleming Cc: Borislav Petkov Cc: Andy Lutomirski Cc: "Kirill A. Shutemov" Link: https://lkml.kernel.org/r/20171020143059.3291-6-brijesh.singh@amd.com arch/x86/mm/ioremap.c | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) commit fcdcd6cdd98ff4d0cf876f863024a2fb0b491d41 Author: Tom Lendacky Date: Fri Oct 20 09:30:46 2017 -0500 x86/realmode: Don't decrypt trampoline area under SEV When SEV is active the trampoline area will need to be in encrypted memory so only mark the area decrypted if SME is active. Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Tested-by: Borislav Petkov Cc: Laura Abbott Cc: kvm@vger.kernel.org Cc: Borislav Petkov Cc: Andy Lutomirski Cc: "Kirill A. Shutemov" Link: https://lkml.kernel.org/r/20171020143059.3291-5-brijesh.singh@amd.com arch/x86/realmode/init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 682af54399b6111730aec0be63e5f6a3a3359a76 Author: Tom Lendacky Date: Fri Oct 20 09:30:45 2017 -0500 x86/mm: Don't attempt to encrypt initrd under SEV When SEV is active the initrd/initramfs will already have already been placed in memory encrypted so do not try to encrypt it. Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Tested-by: Borislav Petkov Cc: kvm@vger.kernel.org Cc: Borislav Petkov Cc: Andy Lutomirski Link: https://lkml.kernel.org/r/20171020143059.3291-4-brijesh.singh@amd.com arch/x86/kernel/setup.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d8aa7eea78a1401cce39b3bb61ead0150044a3df Author: Tom Lendacky Date: Fri Oct 20 09:30:44 2017 -0500 x86/mm: Add Secure Encrypted Virtualization (SEV) support Provide support for Secure Encrypted Virtualization (SEV). This initial support defines a flag that is used by the kernel to determine if it is running with SEV active. Signed-off-by: Tom Lendacky Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Tested-by: Borislav Petkov Cc: kvm@vger.kernel.org Cc: Borislav Petkov Cc: Andy Lutomirski Link: https://lkml.kernel.org/r/20171020143059.3291-3-brijesh.singh@amd.com arch/x86/include/asm/mem_encrypt.h | 6 ++++++ arch/x86/mm/mem_encrypt.c | 26 ++++++++++++++++++++++++++ include/linux/mem_encrypt.h | 7 +++++-- 3 files changed, 37 insertions(+), 2 deletions(-) commit 33e63acc119d15c2fac3e3775f32d1ce7a01021b Author: Brijesh Singh Date: Fri Oct 20 09:30:43 2017 -0500 Documentation/x86: Add AMD Secure Encrypted Virtualization (SEV) description Update the AMD memory encryption document describing the Secure Encrypted Virtualization (SEV) feature. Signed-off-by: Brijesh Singh Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Tom Lendacky Cc: kvm@vger.kernel.org Cc: Jonathan Corbet Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20171020143059.3291-2-brijesh.singh@amd.com Documentation/x86/amd-memory-encryption.txt | 30 +++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) commit f0f14a7a815de478669bd2906e35eef6da730d83 Author: Kuninori Morimoto Date: Tue Nov 7 08:26:07 2017 +0000 renesas_usbhs: use renesas_usbhs_get_info() We already have renesas_usbhs_get_info() macro. Let's use it. Signed-off-by: Kuninori Morimoto Acked-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman drivers/usb/renesas_usbhs/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6c51441cd0710330ccdb8dd0288e5316256d1c8e Author: Arnd Bergmann Date: Tue Nov 7 11:39:57 2017 +0100 usbip: use monotonic timestamps This gets rid of the deprecated do_gettimeofday() function in usbip. The comment above vgadget_get_frame() mentions that it suffers from issues with the time jumps due to suspend and settimeofday, so I'm changing it to use ktime_get_ts64() to use monotonic times that don't have this problem. I couldn't tell whether we should use CLOCK_MONOTONIC or CLOCK_MONOTONIC_RAW here, the difference being the exact rate when correcting for NTP. I picked monotonic time since it doesn't change the speed to the existing code and should be better synchronized with other machines we talk to. Signed-off-by: Arnd Bergmann Reviewed-by: Krzysztof Opasiak Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vudc.h | 2 +- drivers/usb/usbip/vudc_dev.c | 7 +++---- drivers/usb/usbip/vudc_sysfs.c | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) commit 15081e85cca45e495144eb0c108926e629fde486 Author: Arnd Bergmann Date: Tue Nov 7 11:39:56 2017 +0100 usbip: fix off-by-one frame number calculation vgadget_get_frame returns a frame number from 0 to 2046, which may require an expensive division operation to wrap at one lower than the usual number. I can't see any reason for this, and all other drivers wrap at a power-of-two number. My best explanation is that it was a simple typo, so I'm changing the % modulo operator into a cheaper bitmask that the other drivers use, to make it wrap after 0x7ff rather than before it. Signed-off-by: Arnd Bergmann Reviewed-by: Krzysztof Opasiak Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vudc_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12f28144cf2cf69e1520e238eee7c384719ca44b Author: Lu Baolu Date: Tue Nov 7 10:28:16 2017 +0800 USB: serial: Change DbC debug device binding ID The product ID for "Linux USB GDB Target device" has been changed. Change the driver binding table accordingly. This patch should be back-ported to kernels as old as v4.12, that contain the commit 57fb47279a04 ("usb/serial: Add DBC debug device support to usb_debug"). Cc: # v4.12+ Cc: Johan Hovold Signed-off-by: Lu Baolu Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/usb_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c67678ec78eff9cf1e7e997fe6c37c9fcccfc5b8 Author: Lu Baolu Date: Tue Nov 7 10:28:15 2017 +0800 USB: early: Use new USB product ID and strings for DbC device The DbC register set defines an interface for system software to specify the vendor id and product id for the debug device. These two values will be presented by the debug device in its device descriptor idVendor and idProduct fields. The current used product ID is a place holder. We now have a valid one. The description strings are changed accordingly. This patch should be back-ported to kernels as old as v4.12, that contain the commit aeb9dd1de98c ("usb/early: Add driver for xhci debug capability"). Cc: # v4.12+ Signed-off-by: Lu Baolu Signed-off-by: Greg Kroah-Hartman drivers/usb/early/xhci-dbc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b1cb7372fa822af6c06c8045963571d13ad6348b Author: Mauro Carvalho Chehab Date: Tue Nov 7 08:39:39 2017 -0500 dvb_frontend: don't use-after-free the frontend struct dvb_frontend_invoke_release() may free the frontend struct. So, the free logic can't update it anymore after calling it. That's OK, as __dvb_frontend_free() is called only when the krefs are zeroed, so nobody is using it anymore. That should fix the following KASAN error: The KASAN report looks like this (running on kernel 3e0cc09a3a2c40ec1ffb6b4e12da86e98feccb11 (4.14-rc5+)): ================================================================== BUG: KASAN: use-after-free in __dvb_frontend_free+0x113/0x120 Write of size 8 at addr ffff880067d45a00 by task kworker/0:1/24 CPU: 0 PID: 24 Comm: kworker/0:1 Not tainted 4.14.0-rc5-43687-g06ab8a23e0e6 #545 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:16 dump_stack+0x292/0x395 lib/dump_stack.c:52 print_address_description+0x78/0x280 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 kasan_report+0x23d/0x350 mm/kasan/report.c:409 __asan_report_store8_noabort+0x1c/0x20 mm/kasan/report.c:435 __dvb_frontend_free+0x113/0x120 drivers/media/dvb-core/dvb_frontend.c:156 dvb_frontend_put+0x59/0x70 drivers/media/dvb-core/dvb_frontend.c:176 dvb_frontend_detach+0x120/0x150 drivers/media/dvb-core/dvb_frontend.c:2803 dvb_usb_adapter_frontend_exit+0xd6/0x160 drivers/media/usb/dvb-usb/dvb-usb-dvb.c:340 dvb_usb_adapter_exit drivers/media/usb/dvb-usb/dvb-usb-init.c:116 dvb_usb_exit+0x9b/0x200 drivers/media/usb/dvb-usb/dvb-usb-init.c:132 dvb_usb_device_exit+0xa5/0xf0 drivers/media/usb/dvb-usb/dvb-usb-init.c:295 usb_unbind_interface+0x21c/0xa90 drivers/usb/core/driver.c:423 __device_release_driver drivers/base/dd.c:861 device_release_driver_internal+0x4f1/0x5c0 drivers/base/dd.c:893 device_release_driver+0x1e/0x30 drivers/base/dd.c:918 bus_remove_device+0x2f4/0x4b0 drivers/base/bus.c:565 device_del+0x5c4/0xab0 drivers/base/core.c:1985 usb_disable_device+0x1e9/0x680 drivers/usb/core/message.c:1170 usb_disconnect+0x260/0x7a0 drivers/usb/core/hub.c:2124 hub_port_connect drivers/usb/core/hub.c:4754 hub_port_connect_change drivers/usb/core/hub.c:5009 port_event drivers/usb/core/hub.c:5115 hub_event+0x1318/0x3740 drivers/usb/core/hub.c:5195 process_one_work+0xc73/0x1d90 kernel/workqueue.c:2119 worker_thread+0x221/0x1850 kernel/workqueue.c:2253 kthread+0x363/0x440 kernel/kthread.c:231 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431 Allocated by task 24: save_stack_trace+0x1b/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x11e/0x2d0 mm/slub.c:2772 kmalloc ./include/linux/slab.h:493 kzalloc ./include/linux/slab.h:666 dtt200u_fe_attach+0x4c/0x110 drivers/media/usb/dvb-usb/dtt200u-fe.c:212 dtt200u_frontend_attach+0x35/0x80 drivers/media/usb/dvb-usb/dtt200u.c:136 dvb_usb_adapter_frontend_init+0x32b/0x660 drivers/media/usb/dvb-usb/dvb-usb-dvb.c:286 dvb_usb_adapter_init drivers/media/usb/dvb-usb/dvb-usb-init.c:86 dvb_usb_init drivers/media/usb/dvb-usb/dvb-usb-init.c:162 dvb_usb_device_init+0xf73/0x17f0 drivers/media/usb/dvb-usb/dvb-usb-init.c:277 dtt200u_usb_probe+0xa1/0xe0 drivers/media/usb/dvb-usb/dtt200u.c:155 usb_probe_interface+0x35d/0x8e0 drivers/usb/core/driver.c:361 really_probe drivers/base/dd.c:413 driver_probe_device+0x610/0xa00 drivers/base/dd.c:557 __device_attach_driver+0x230/0x290 drivers/base/dd.c:653 bus_for_each_drv+0x161/0x210 drivers/base/bus.c:463 __device_attach+0x26b/0x3c0 drivers/base/dd.c:710 device_initial_probe+0x1f/0x30 drivers/base/dd.c:757 bus_probe_device+0x1eb/0x290 drivers/base/bus.c:523 device_add+0xd0b/0x1660 drivers/base/core.c:1835 usb_set_configuration+0x104e/0x1870 drivers/usb/core/message.c:1932 generic_probe+0x73/0xe0 drivers/usb/core/generic.c:174 usb_probe_device+0xaf/0xe0 drivers/usb/core/driver.c:266 really_probe drivers/base/dd.c:413 driver_probe_device+0x610/0xa00 drivers/base/dd.c:557 __device_attach_driver+0x230/0x290 drivers/base/dd.c:653 bus_for_each_drv+0x161/0x210 drivers/base/bus.c:463 __device_attach+0x26b/0x3c0 drivers/base/dd.c:710 device_initial_probe+0x1f/0x30 drivers/base/dd.c:757 bus_probe_device+0x1eb/0x290 drivers/base/bus.c:523 device_add+0xd0b/0x1660 drivers/base/core.c:1835 usb_new_device+0x7b8/0x1020 drivers/usb/core/hub.c:2457 hub_port_connect drivers/usb/core/hub.c:4903 hub_port_connect_change drivers/usb/core/hub.c:5009 port_event drivers/usb/core/hub.c:5115 hub_event+0x194d/0x3740 drivers/usb/core/hub.c:5195 process_one_work+0xc73/0x1d90 kernel/workqueue.c:2119 worker_thread+0x221/0x1850 kernel/workqueue.c:2253 kthread+0x363/0x440 kernel/kthread.c:231 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431 Freed by task 24: save_stack_trace+0x1b/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:524 slab_free_hook mm/slub.c:1390 slab_free_freelist_hook mm/slub.c:1412 slab_free mm/slub.c:2988 kfree+0xf6/0x2f0 mm/slub.c:3919 dtt200u_fe_release+0x3c/0x50 drivers/media/usb/dvb-usb/dtt200u-fe.c:202 dvb_frontend_invoke_release.part.13+0x1c/0x30 drivers/media/dvb-core/dvb_frontend.c:2790 dvb_frontend_invoke_release drivers/media/dvb-core/dvb_frontend.c:2789 __dvb_frontend_free+0xad/0x120 drivers/media/dvb-core/dvb_frontend.c:153 dvb_frontend_put+0x59/0x70 drivers/media/dvb-core/dvb_frontend.c:176 dvb_frontend_detach+0x120/0x150 drivers/media/dvb-core/dvb_frontend.c:2803 dvb_usb_adapter_frontend_exit+0xd6/0x160 drivers/media/usb/dvb-usb/dvb-usb-dvb.c:340 dvb_usb_adapter_exit drivers/media/usb/dvb-usb/dvb-usb-init.c:116 dvb_usb_exit+0x9b/0x200 drivers/media/usb/dvb-usb/dvb-usb-init.c:132 dvb_usb_device_exit+0xa5/0xf0 drivers/media/usb/dvb-usb/dvb-usb-init.c:295 usb_unbind_interface+0x21c/0xa90 drivers/usb/core/driver.c:423 __device_release_driver drivers/base/dd.c:861 device_release_driver_internal+0x4f1/0x5c0 drivers/base/dd.c:893 device_release_driver+0x1e/0x30 drivers/base/dd.c:918 bus_remove_device+0x2f4/0x4b0 drivers/base/bus.c:565 device_del+0x5c4/0xab0 drivers/base/core.c:1985 usb_disable_device+0x1e9/0x680 drivers/usb/core/message.c:1170 usb_disconnect+0x260/0x7a0 drivers/usb/core/hub.c:2124 hub_port_connect drivers/usb/core/hub.c:4754 hub_port_connect_change drivers/usb/core/hub.c:5009 port_event drivers/usb/core/hub.c:5115 hub_event+0x1318/0x3740 drivers/usb/core/hub.c:5195 process_one_work+0xc73/0x1d90 kernel/workqueue.c:2119 worker_thread+0x221/0x1850 kernel/workqueue.c:2253 kthread+0x363/0x440 kernel/kthread.c:231 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431 The buggy address belongs to the object at ffff880067d45500 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1280 bytes inside of 2048-byte region [ffff880067d45500, ffff880067d45d00) The buggy address belongs to the page: page:ffffea00019f5000 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x100000000008100(slab|head) raw: 0100000000008100 0000000000000000 0000000000000000 00000001000f000f raw: dead000000000100 dead000000000200 ffff88006c002d80 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff880067d45900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff880067d45980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff880067d45a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff880067d45a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff880067d45b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Fixes: ead666000a5f ("media: dvb_frontend: only use kref after initialized") Reported-by: Andrey Konovalov Suggested-by: Matthias Schwarzott Tested-by: Andrey Konovalov Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 06641e8deae68ee2769c734158bc9170be257bb9 Author: Ard Biesheuvel Date: Mon Nov 6 15:29:23 2017 +0000 sdhci-fujitsu: add support for setting the CMD_DAT_DELAY attribute The Socionext SynQuacer SoC inherits this IP from Fujitsu, but requires the F_SDH30_CMD_DAT_DELAY bit to be set in the F_SDH30_ESD_CONTROL control register. So set this bit if the DT node has the 'fujitsu,cmd-dat-delay-select' property. Signed-off-by: Ard Biesheuvel Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci_f_sdh30.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 167e5b6f98d27901c7a00b566938ce1973af4395 Author: Ard Biesheuvel Date: Mon Nov 6 15:29:22 2017 +0000 dt-bindings: sdhci-fujitsu: document cmd-dat-delay property Document a new boolean property of the sdhci-fujitsu binding that indicates whether the CMD_DAT_DELAY bit needs to be set in the F_SDH30_ESD_CONTROL register. Acked-by: Rob Herring Signed-off-by: Ard Biesheuvel Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt | 2 ++ 1 file changed, 2 insertions(+) commit 1f27ddf0b50b45eaf0f95565125cf10f9c821746 Author: Masaharu Hayakawa Date: Fri Nov 3 10:36:28 2017 +0100 mmc: tmio: Replace msleep() of 20ms or less with usleep_range() As documented in Documentation/timers/timers-howto.txt as follows, replace msleep() with usleep_range(). msleep(1~20) may not do what the caller intends, and will often sleep longer (~20 ms actual sleep for any value given in the 1~20ms range). In many cases this is not the desired behavior. Signed-off-by: Masaharu Hayakawa Signed-off-by: Simon Horman Acked-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit bf751e30b41cdf2568cccaf5de4156a3d78683df Author: Michal Suchanek Date: Tue Jul 11 13:26:26 2017 +0200 powerpc/mm/hash: Remove stale comment. In commit e6f81a92015b ("powerpc/mm/hash: Support 68 bit VA") the masking is folded into ASM_VSID_SCRAMBLE but the comment about masking is removed only from the firt use of ASM_VSID_SCRAMBLE. Signed-off-by: Michal Suchanek Signed-off-by: Michael Ellerman arch/powerpc/mm/slb_low.S | 4 ---- 1 file changed, 4 deletions(-) commit 9003a249815a15704f415954039d1c7ea27da9ad Author: Alexey Kardashevskiy Date: Tue Nov 7 14:43:01 2017 +1100 powerpc/powernv/ioda: Remove explicit max window size check DMA windows can only have a size of power of two on IODA2 hardware and using memory_hotplug_max() to determine the upper limit won't work correcly if it returns not power of two value. This removes the check as the platform code does this check in pnv_pci_ioda2_setup_default_config() anyway; the other client is VFIO and that thing checks against locked_vm limit which prevents the userspace from locking too much memory. It is expected to impact DPDK on machines with non-power-of-two RAM size, mostly. KVM guests are less likely to be affected as usually guests get less than half of hosts RAM. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/pci-ioda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90af7c254ffb94b0df47bf6f613e3f3173df05d1 Author: Ludovic Barre Date: Mon Nov 6 18:03:36 2017 +0100 irqchip/stm32: Move the wakeup on interrupt mask Move irq_set_wake on interrupt mask, needed to wake up from low power mode as the event mask is not able to do so. Signed-off-by: Ludovic Barre Signed-off-by: Marc Zyngier drivers/irqchip/irq-stm32-exti.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2ca6b9bcaad4a78af255be9e16b3f3062a6d7c32 Author: Ludovic Barre Date: Mon Nov 6 18:03:35 2017 +0100 irqchip/stm32: Fix initial values -After cold boot, imr default value depends on hardware configuration. -After hot reboot the registers must be cleared to avoid residue. Signed-off-by: Ludovic Barre Signed-off-by: Marc Zyngier drivers/irqchip/irq-stm32-exti.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 539c603e147c1566f90623d863fa0d64ecb6c89d Author: Ludovic Barre Date: Mon Nov 6 18:03:34 2017 +0100 irqchip/stm32: Add stm32h7 support stm32h7 has up to 96 inputs (3 banks of 32 inputs max). Signed-off-by: Ludovic Barre Signed-off-by: Marc Zyngier drivers/irqchip/irq-stm32-exti.c | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit ce0b7e39c5a0c65bdce6fc36bba2991ea8f915b7 Author: Ludovic Barre Date: Mon Nov 6 18:03:33 2017 +0100 dt-bindings/interrupt-controllers: Add compatible string for stm32h7 This patch updates stm32-exti documentation with stm32h7-exti compatible string. Acked-by: Rob Herring Signed-off-by: Ludovic Barre Signed-off-by: Marc Zyngier .../devicetree/bindings/interrupt-controller/st,stm32-exti.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6dd64ee17e04c3949f21630b6426f149252ff8b1 Author: Ludovic Barre Date: Mon Nov 6 18:03:32 2017 +0100 irqchip/stm32: Add multi-bank management -Prepare to manage multi-bank of external interrupts (N banks of 32 inputs). -Prepare to manage registers offsets by compatible (registers offsets could be different follow per stm32 platform). Signed-off-by: Ludovic Barre Signed-off-by: Marc Zyngier drivers/irqchip/irq-stm32-exti.c | 149 +++++++++++++++++++++++++++------------ 1 file changed, 103 insertions(+), 46 deletions(-) commit 0e7d780721bd259d061ac0c1076e40e326d1b32b Author: Ludovic Barre Date: Mon Nov 6 18:03:31 2017 +0100 irqchip/stm32: Select GENERIC_IRQ_CHIP This patch adds GENERIC_IRQ_CHIP to stm32 exti config. Signed-off-by: Ludovic Barre Signed-off-by: Marc Zyngier drivers/irqchip/Kconfig | 1 + 1 file changed, 1 insertion(+) commit f791dd2589d7e217625d7e411621a5bac71cbf69 Author: Cheng Jian Date: Fri Nov 3 18:59:48 2017 +0800 locking/rwlocks: Fix comments - fix the list of locking API headers in kernel/locking/spinlock.c - fix an #endif comment Signed-off-by: Cheng Jian Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: huawei.libin@huawei.com Cc: xiexiuqi@huawei.com Link: http://lkml.kernel.org/r/1509706788-152547-1-git-send-email-cj.chengjian@huawei.com Signed-off-by: Ingo Molnar include/linux/rwlock_api_smp.h | 2 +- kernel/locking/spinlock.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit e846d13958066828a9483d862cc8370a72fadbb6 Author: Zhou Chengming Date: Thu Nov 2 09:18:21 2017 +0800 kprobes, x86/alternatives: Use text_mutex to protect smp_alt_modules We use alternatives_text_reserved() to check if the address is in the fixed pieces of alternative reserved, but the problem is that we don't hold the smp_alt mutex when call this function. So the list traversal may encounter a deleted list_head if another path is doing alternatives_smp_module_del(). One solution is that we can hold smp_alt mutex before call this function, but the difficult point is that the callers of this functions, arch_prepare_kprobe() and arch_prepare_optimized_kprobe(), are called inside the text_mutex. So we must hold smp_alt mutex before we go into these arch dependent code. But we can't now, the smp_alt mutex is the arch dependent part, only x86 has it. Maybe we can export another arch dependent callback to solve this. But there is a simpler way to handle this problem. We can reuse the text_mutex to protect smp_alt_modules instead of using another mutex. And all the arch dependent checks of kprobes are inside the text_mutex, so it's safe now. Signed-off-by: Zhou Chengming Reviewed-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) 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 Cc: bp@suse.de Fixes: 2cfa197 "ftrace/alternatives: Introducing *_text_reserved functions" Link: http://lkml.kernel.org/r/1509585501-79466-1-git-send-email-zhouchengming1@huawei.com Signed-off-by: Ingo Molnar arch/x86/kernel/alternative.c | 26 +++++++++++++------------- kernel/extable.c | 2 ++ 2 files changed, 15 insertions(+), 13 deletions(-) commit 706cffc1b912342668e621526c860fb093dfc2d5 Author: Ard Biesheuvel Date: Mon Nov 6 18:34:37 2017 +0000 irqchip/exiu: Add support for Socionext Synquacer EXIU controller The Socionext Synquacer SoC has an external interrupt unit (EXIU) that forwards a block of 32 configurable input lines to 32 adjacent level-high type GICv3 SPIs. The EXIU has per-interrupt level/edge and polarity controls, and mask bits that keep the outgoing lines de-asserted, even though the controller may still latch interrupt conditions that occur while the line is masked. Signed-off-by: Ard Biesheuvel Signed-off-by: Marc Zyngier arch/arm64/Kconfig.platforms | 3 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-sni-exiu.c | 227 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 231 insertions(+) commit 0ea04c7322b0dbbc4e7a862451855b10ef9922d3 Author: Ard Biesheuvel Date: Mon Nov 6 18:34:36 2017 +0000 dt-bindings: Add description of Socionext EXIU interrupt controller Add a description of the External Interrupt Unit (EXIU) interrupt controller as found on the Socionext SynQuacer SoC. Acked-by: Rob Herring Signed-off-by: Ard Biesheuvel Signed-off-by: Marc Zyngier .../socionext,synquacer-exiu.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit c5e260890d5fd6687287f2b532c738a359a61a82 Author: Tom Lendacky Date: Wed Nov 1 11:54:26 2017 -0500 x86/mm: Remove unnecessary TLB flush for SME in-place encryption A TLB flush is not required when doing in-place encryption or decryption since the area's pagetable attributes are not being altered. To avoid confusion between what the routine is doing and what is documented in the AMD APM, delete the local_flush_tlb() call. Suggested-by: Dave Hansen Signed-off-by: Tom Lendacky Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171101165426.1388.24866.stgit@tlendack-t1.amdoffice.net Signed-off-by: Ingo Molnar arch/x86/mm/mem_encrypt.c | 1 - 1 file changed, 1 deletion(-) commit 4a75aeacda3c2455954596593d89187df5420d0a Author: James Morse Date: Mon Nov 6 18:44:27 2017 +0000 ACPI / APEI: Remove arch_apei_flush_tlb_one() Nothing calls arch_apei_flush_tlb_one() anymore, instead relying on __set_pte_vaddr() to do the invalidation when called from clear_fixmap() Remove arch_apei_flush_tlb_one(). Signed-off-by: James Morse Reviewed-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki Cc: All applicable arch/x86/kernel/acpi/apei.c | 5 ----- include/acpi/apei.h | 1 - 2 files changed, 6 deletions(-) commit 18b4b276b490a8b9f86c512de8a6054c27bb87c2 Author: James Morse Date: Mon Nov 6 18:44:26 2017 +0000 arm64: mm: Remove arch_apei_flush_tlb_one() Nothing calls arch_apei_flush_tlb_one() anymore, instead relying on __set_fixmap() to do the invalidation. Remove it. Move the IPI-considered-harmful comment to __set_fixmap(). Signed-off-by: James Morse Acked-by: Will Deacon Tested-by: Tyler Baicar Signed-off-by: Rafael J. Wysocki Cc: All applicable arch/arm64/include/asm/acpi.h | 12 ------------ arch/arm64/mm/mmu.c | 4 ++++ 2 files changed, 4 insertions(+), 12 deletions(-) commit 520e18a5080d2c444a03280d99c8a35cb667d321 Author: James Morse Date: Mon Nov 6 18:44:25 2017 +0000 ACPI / APEI: Remove ghes_ioremap_area Now that nothing is using the ghes_ioremap_area pages, rip them out. Signed-off-by: James Morse Reviewed-by: Borislav Petkov Tested-by: Tyler Baicar Signed-off-by: Rafael J. Wysocki Cc: All applicable drivers/acpi/apei/ghes.c | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) commit 4f89fa286f6729312e227e7c2d764e8e7b9d340e Author: James Morse Date: Mon Nov 6 18:44:24 2017 +0000 ACPI / APEI: Replace ioremap_page_range() with fixmap Replace ghes_io{re,un}map_pfn_{nmi,irq}()s use of ioremap_page_range() with __set_fixmap() as ioremap_page_range() may sleep to allocate a new level of page-table, even if its passed an existing final-address to use in the mapping. The GHES driver can only be enabled for architectures that select HAVE_ACPI_APEI: Add fixmap entries to both x86 and arm64. clear_fixmap() does the TLB invalidation in __set_fixmap() for arm64 and __set_pte_vaddr() for x86. In each case its the same as the respective arch_apei_flush_tlb_one(). Reported-by: Fengguang Wu Suggested-by: Linus Torvalds Signed-off-by: James Morse Reviewed-by: Borislav Petkov Tested-by: Tyler Baicar Tested-by: Toshi Kani [ For the arm64 bits: ] Acked-by: Will Deacon [ For the x86 bits: ] Acked-by: Ingo Molnar Signed-off-by: Rafael J. Wysocki Cc: All applicable arch/arm64/include/asm/fixmap.h | 7 +++++++ arch/x86/include/asm/fixmap.h | 6 ++++++ drivers/acpi/apei/ghes.c | 44 +++++++++++++---------------------------- 3 files changed, 27 insertions(+), 30 deletions(-) commit 6ef930f20c30f8a7dcffa50fa9f33a9211727a6e Author: Marc Zyngier Date: Tue Nov 7 10:04:38 2017 +0000 irqchip/gic-v3-its: Fix VPE activate callback return value its_vpe_irq_domain_activate should always return 0. Really. There is not a single case why it wouldn't. So this "return true;" is really a copy/paste issue that got revealed now that we actually check the return value of the activate method. Brown paper bag day. Fixes: 2247e1bf7063 ("irqchip/gic-v3-its: Limit scope of VPE mapping to be per ITS") Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c10bbee8cf7c8df4e5d9e8ccc9754b200f625ff Merge: c7c2f3d 5ea2208 Author: Thomas Gleixner Date: Tue Nov 7 11:59:40 2017 +0100 Merge tag 'timers-conversion-next4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into timers/core Pull the 4th timer conversion batch from Kees Cook - A couple fixes for less common build configurations - More stragglers that have either been reviewed or gone long enough on list commit eb0c19942288569e0ae492476534d5a485fb8ab4 Author: Andrey Konovalov Date: Thu Nov 2 10:38:21 2017 -0400 media: dib0700: fix invalid dvb_detach argument dvb_detach(arg) calls symbol_put_addr(arg), where arg should be a pointer to a function. Right now a pointer to state->dib7000p_ops is passed to dvb_detach(), which causes a BUG() in symbol_put_addr() as discovered by syzkaller. Pass state->dib7000p_ops.set_wbd_ref instead. ------------[ cut here ]------------ kernel BUG at kernel/module.c:1081! invalid opcode: 0000 [#1] PREEMPT SMP KASAN Modules linked in: CPU: 1 PID: 1151 Comm: kworker/1:1 Tainted: G W 4.14.0-rc1-42251-gebb2c2437d80 #224 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: usb_hub_wq hub_event task: ffff88006a336300 task.stack: ffff88006a7c8000 RIP: 0010:symbol_put_addr+0x54/0x60 kernel/module.c:1083 RSP: 0018:ffff88006a7ce210 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff880062a8d190 RCX: 0000000000000000 RDX: dffffc0000000020 RSI: ffffffff85876d60 RDI: ffff880062a8d190 RBP: ffff88006a7ce218 R08: 1ffff1000d4f9c12 R09: 1ffff1000d4f9ae4 R10: 1ffff1000d4f9bed R11: 0000000000000000 R12: ffff880062a8d180 R13: 00000000ffffffed R14: ffff880062a8d190 R15: ffff88006947c000 FS: 0000000000000000(0000) GS:ffff88006c900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f6416532000 CR3: 00000000632f5000 CR4: 00000000000006e0 Call Trace: stk7070p_frontend_attach+0x515/0x610 drivers/media/usb/dvb-usb/dib0700_devices.c:1013 dvb_usb_adapter_frontend_init+0x32b/0x660 drivers/media/usb/dvb-usb/dvb-usb-dvb.c:286 dvb_usb_adapter_init drivers/media/usb/dvb-usb/dvb-usb-init.c:86 dvb_usb_init drivers/media/usb/dvb-usb/dvb-usb-init.c:162 dvb_usb_device_init+0xf70/0x17f0 drivers/media/usb/dvb-usb/dvb-usb-init.c:277 dib0700_probe+0x171/0x5a0 drivers/media/usb/dvb-usb/dib0700_core.c:886 usb_probe_interface+0x35d/0x8e0 drivers/usb/core/driver.c:361 really_probe drivers/base/dd.c:413 driver_probe_device+0x610/0xa00 drivers/base/dd.c:557 __device_attach_driver+0x230/0x290 drivers/base/dd.c:653 bus_for_each_drv+0x161/0x210 drivers/base/bus.c:463 __device_attach+0x26e/0x3d0 drivers/base/dd.c:710 device_initial_probe+0x1f/0x30 drivers/base/dd.c:757 bus_probe_device+0x1eb/0x290 drivers/base/bus.c:523 device_add+0xd0b/0x1660 drivers/base/core.c:1835 usb_set_configuration+0x104e/0x1870 drivers/usb/core/message.c:1932 generic_probe+0x73/0xe0 drivers/usb/core/generic.c:174 usb_probe_device+0xaf/0xe0 drivers/usb/core/driver.c:266 really_probe drivers/base/dd.c:413 driver_probe_device+0x610/0xa00 drivers/base/dd.c:557 __device_attach_driver+0x230/0x290 drivers/base/dd.c:653 bus_for_each_drv+0x161/0x210 drivers/base/bus.c:463 __device_attach+0x26e/0x3d0 drivers/base/dd.c:710 device_initial_probe+0x1f/0x30 drivers/base/dd.c:757 bus_probe_device+0x1eb/0x290 drivers/base/bus.c:523 device_add+0xd0b/0x1660 drivers/base/core.c:1835 usb_new_device+0x7b8/0x1020 drivers/usb/core/hub.c:2457 hub_port_connect drivers/usb/core/hub.c:4903 hub_port_connect_change drivers/usb/core/hub.c:5009 port_event drivers/usb/core/hub.c:5115 hub_event+0x194d/0x3740 drivers/usb/core/hub.c:5195 process_one_work+0xc7f/0x1db0 kernel/workqueue.c:2119 worker_thread+0x221/0x1850 kernel/workqueue.c:2253 kthread+0x3a1/0x470 kernel/kthread.c:231 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431 Code: ff ff 48 85 c0 74 24 48 89 c7 e8 48 ea ff ff bf 01 00 00 00 e8 de 20 e3 ff 65 8b 05 b7 2f c2 7e 85 c0 75 c9 e8 f9 0b c1 ff eb c2 <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 b8 00 00 RIP: symbol_put_addr+0x54/0x60 RSP: ffff88006a7ce210 ---[ end trace b75b357739e7e116 ]--- Signed-off-by: Andrey Konovalov Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dib0700_devices.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 38929ea9a45ea8fe7fba34c09ada267cc2c10545 Author: Andy Shevchenko Date: Fri Nov 3 09:35:39 2017 -0400 media: v4l2-ctrls: Don't validate BITMASK twice There is no need to repeat what check_range() does for us, i.e. BITMASK validation in v4l2_ctrl_new(). Signed-off-by: Andy Shevchenko Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls.c | 4 ---- 1 file changed, 4 deletions(-) commit 55a839a09395aaa21646cea328fb9afd7342dce6 Author: Shuah Khan Date: Mon Oct 30 17:04:57 2017 -0400 media: s5p-mfc: fix lockdep warning The driver mmap functions shouldn't take lock when calling vb2_mmap(). Fix it to not take the lock. The following lockdep warning is fixed with this change. [ 2106.181412] ====================================================== [ 2106.187563] WARNING: possible circular locking dependency detected [ 2106.193718] 4.14.0-rc2-00002-gfab205f-dirty #4 Not tainted [ 2106.199175] ------------------------------------------------------ [ 2106.205328] qtdemux0:sink/2614 is trying to acquire lock: [ 2106.210701] (&dev->mfc_mutex){+.+.}, at: [] s5p_mfc_mmap+0x28/0xd4 [s5p_mfc] [ 2106.218672] [ 2106.218672] but task is already holding lock: [ 2106.224477] (&mm->mmap_sem){++++}, at: [] vm_mmap_pgoff+0x44/0xb8 [ 2106.231497] [ 2106.231497] which lock already depends on the new lock. [ 2106.231497] [ 2106.239642] [ 2106.239642] the existing dependency chain (in reverse order) is: [ 2106.247095] [ 2106.247095] -> #1 (&mm->mmap_sem){++++}: [ 2106.252473] __might_fault+0x80/0xb0 [ 2106.256567] video_usercopy+0x1cc/0x510 [videodev] [ 2106.261845] v4l2_ioctl+0xa4/0xdc [videodev] [ 2106.266596] do_vfs_ioctl+0xa0/0xa18 [ 2106.270667] SyS_ioctl+0x34/0x5c [ 2106.274395] ret_fast_syscall+0x0/0x28 [ 2106.278637] [ 2106.278637] -> #0 (&dev->mfc_mutex){+.+.}: [ 2106.284186] lock_acquire+0x6c/0x88 [ 2106.288173] __mutex_lock+0x68/0xa34 [ 2106.292244] mutex_lock_interruptible_nested+0x1c/0x24 [ 2106.297893] s5p_mfc_mmap+0x28/0xd4 [s5p_mfc] [ 2106.302747] v4l2_mmap+0x54/0x88 [videodev] [ 2106.307409] mmap_region+0x3a8/0x638 [ 2106.311480] do_mmap+0x330/0x3a4 [ 2106.315207] vm_mmap_pgoff+0x90/0xb8 [ 2106.319279] SyS_mmap_pgoff+0x90/0xc0 [ 2106.323439] ret_fast_syscall+0x0/0x28 [ 2106.327683] [ 2106.327683] other info that might help us debug this: [ 2106.327683] [ 2106.335656] Possible unsafe locking scenario: [ 2106.335656] [ 2106.341548] CPU0 CPU1 [ 2106.346053] ---- ---- [ 2106.350559] lock(&mm->mmap_sem); [ 2106.353939] lock(&dev->mfc_mutex); [ 2106.353939] lock(&dev->mfc_mutex); [ 2106.365897] lock(&dev->mfc_mutex); [ 2106.369450] [ 2106.369450] *** DEADLOCK *** [ 2106.369450] [ 2106.375344] 1 lock held by qtdemux0:sink/2614: [ 2106.379762] #0: (&mm->mmap_sem){++++}, at: [] vm_mmap_pgoff+0x44/0xb8 [ 2106.387214] [ 2106.387214] stack backtrace: [ 2106.391550] CPU: 7 PID: 2614 Comm: qtdemux0:sink Not tainted 4.14.0-rc2-00002-gfab205f-dirty #4 [ 2106.400213] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 2106.406285] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 2106.413995] [] (show_stack) from [] (dump_stack+0x98/0xc4) [ 2106.421187] [] (dump_stack) from [] (print_circular_bug+0x254/0x410) [ 2106.429245] [] (print_circular_bug) from [] (check_prev_add+0x468/0x938) [ 2106.437651] [] (check_prev_add) from [] (__lock_acquire+0x1314/0x14fc) [ 2106.445883] [] (__lock_acquire) from [] (lock_acquire+0x6c/0x88) [ 2106.453596] [] (lock_acquire) from [] (__mutex_lock+0x68/0xa34) [ 2106.461221] [] (__mutex_lock) from [] (mutex_lock_interruptible_nested+0x1c/0x24) [ 2106.470425] [] (mutex_lock_interruptible_nested) from [] (s5p_mfc_mmap+0x28/0xd4 [s5p_mfc]) [ 2106.480494] [] (s5p_mfc_mmap [s5p_mfc]) from [] (v4l2_mmap+0x54/0x88 [videodev]) [ 2106.489575] [] (v4l2_mmap [videodev]) from [] (mmap_region+0x3a8/0x638) [ 2106.497875] [] (mmap_region) from [] (do_mmap+0x330/0x3a4) [ 2106.505068] [] (do_mmap) from [] (vm_mmap_pgoff+0x90/0xb8) [ 2106.512260] [] (vm_mmap_pgoff) from [] (SyS_mmap_pgoff+0x90/0xc0) [ 2106.520059] [] (SyS_mmap_pgoff) from [] (ret_fast_syscall+0x0/0x28) Signed-off-by: Shuah Khan Suggested-by: Hans Verkuil Acked-by: Marek Szyprowski Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 4 ---- 1 file changed, 4 deletions(-) commit 62229de19ff2b7f3e0ebf4d48ad99061127d0281 Author: Daniel Scheller Date: Sun Oct 29 11:43:22 2017 -0400 media: dvb-core: always call invoke_release() in fe_free() Follow-up to: ead666000a5f ("media: dvb_frontend: only use kref after initialized") The aforementioned commit fixed refcount OOPSes when demod driver attaching succeeded but tuner driver didn't. However, the use count of the attached demod drivers don't go back to zero and thus couldn't be cleanly unloaded. Improve on this by calling dvb_frontend_invoke_release() in __dvb_frontend_free() regardless of fepriv being NULL, instead of returning when fepriv is NULL. This is safe to do since _invoke_release() will check for passed pointers being valid before calling the .release() function. [mchehab@s-opensource.com: changed the logic a little bit to reduce conflicts with another bug fix patch under review] Fixes: ead666000a5f ("media: dvb_frontend: only use kref after initialized") Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit a443026a48ad7a8b1b966b00fb5d7111b81a219b Author: Masami Hiramatsu Date: Sat Nov 4 13:31:21 2017 +0900 arm/kprobes: Remove jprobe test case Remove the jprobes test case because jprobes is a deprecated feature. Signed-off-by: Masami Hiramatsu Cc: Arnd Bergmann Cc: Jon Medhurst Cc: Linus Torvalds Cc: Mark Brown Cc: Peter Zijlstra Cc: Russell King Cc: Stephen Rothwell Cc: Thomas Gleixner Cc: Wang Nan Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/150976988105.2012.13618117383683725047.stgit@devbox Signed-off-by: Ingo Molnar arch/arm/probes/kprobes/test-core.c | 57 ------------------------------------- 1 file changed, 57 deletions(-) commit 4650209b166789182657c8eb0612cecd5b54d591 Author: Masami Hiramatsu Date: Sat Nov 4 13:30:52 2017 +0900 arm/kprobes: Fix kretprobe test to check correct counter test_kretprobe() uses jprobe_func_called at the last test, but it must check kretprobe_handler_called. Signed-off-by: Masami Hiramatsu Cc: Arnd Bergmann Cc: Jon Medhurst Cc: Linus Torvalds Cc: Mark Brown Cc: Peter Zijlstra Cc: Russell King Cc: Stephen Rothwell Cc: Thomas Gleixner Cc: Wang Nan Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/150976985182.2012.15495311380682779381.stgit@devbox Signed-off-by: Ingo Molnar arch/arm/probes/kprobes/test-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d786f05175fae09cc39dfa5769c62649341caeb4 Author: Changbin Du Date: Mon Nov 6 11:32:59 2017 +0800 x86/build: Add more generated files to the .gitignore file Some of the files generated by the build process were not listed. Signed-off-by: Changbin Du Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: yamada.masahiro@socionext.com Link: http://lkml.kernel.org/r/1509939179-7556-5-git-send-email-changbin.du@intel.com Signed-off-by: Ingo Molnar arch/x86/boot/.gitignore | 3 +++ 1 file changed, 3 insertions(+) commit c306ba7b909408dbf935bb4a8dc62fae64cb337c Author: Changbin Du Date: Mon Nov 6 11:32:58 2017 +0800 x86/build: Specify -input-charset=utf-8 for mkisofs It avoids the following warning triggered by newer versions of mkisofs: -input-charset not specified, using utf-8 (detected in locale settings) Signed-off-by: Changbin Du Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: yamada.masahiro@socionext.com Link: http://lkml.kernel.org/r/1509939179-7556-4-git-send-email-changbin.du@intel.com Signed-off-by: Ingo Molnar arch/x86/boot/genimage.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8a7546a04ecb7c9388a3e935c6cfcc7c2c4c6b67 Author: Changbin Du Date: Mon Nov 6 11:32:57 2017 +0800 x86/build: Add new paths for isolinux.bin and ldlinux.c32 Recently I failed to build isoimage target, because the path of isolinux.bin changed to /usr/xxx/ISOLINUX/isolinux.bin, as well as ldlinux.c32 which changed to /usr/xxx/syslinux/modules/bios/ldlinux.c32. This patch improves the file search logic: - Show a error message instead of silent fail. - Add above new paths. Signed-off-by: Changbin Du Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: yamada.masahiro@socionext.com Link: http://lkml.kernel.org/r/1509939179-7556-3-git-send-email-changbin.du@intel.com Signed-off-by: Ingo Molnar arch/x86/boot/genimage.sh | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 4366d57af19e89d23ef9154414b2539f1c3d18fa Author: Changbin Du Date: Mon Nov 6 11:32:56 2017 +0800 x86/build: Factor out fdimage/isoimage generation commands to standalone script The build messages for fdimage/isoimage generation are pretty unstructured, just the raw shell command blocks are printed. Emit shortened messages similar to existing kbuild messages, and move the Makefile commands into a separate shell script - which is much easier to handle. This patch factors out the commands used for fdimage/isoimage generation from arch/x86/boot/Makefile to a new script arch/x86/boot/genimage.sh. Then it adds the new kbuild command 'genimage' which invokes the new script. All fdimages/isoimage files are now generated by a call to 'genimage' with different parameters. Now 'make isoimage' becomes: ... Kernel: arch/x86/boot/bzImage is ready (#30) GENIMAGE arch/x86/boot/image.iso Size of boot image is 4 sectors -> No emulation 15.37% done, estimate finish Sun Nov 5 23:36:57 2017 30.68% done, estimate finish Sun Nov 5 23:36:57 2017 46.04% done, estimate finish Sun Nov 5 23:36:57 2017 61.35% done, estimate finish Sun Nov 5 23:36:57 2017 76.69% done, estimate finish Sun Nov 5 23:36:57 2017 92.00% done, estimate finish Sun Nov 5 23:36:57 2017 Total translation table size: 2048 Total rockridge attributes bytes: 659 Total directory bytes: 0 Path table size(bytes): 10 Max brk space used 0 32608 extents written (63 MB) Kernel: arch/x86/boot/image.iso is ready Before: Kernel: arch/x86/boot/bzImage is ready (#63) rm -rf arch/x86/boot/isoimage mkdir arch/x86/boot/isoimage for i in lib lib64 share end ; do \ if [ -f /usr/$i/syslinux/isolinux.bin ] ; then \ cp /usr/$i/syslinux/isolinux.bin arch/x86/boot/isoimage ; \ if [ -f /usr/$i/syslinux/ldlinux.c32 ]; then \ cp /usr/$i/syslinux/ldlinux.c32 arch/x86/boot/isoimage ; \ fi ; \ break ; \ fi ; \ if [ $i = end ] ; then exit 1 ; fi ; \ done ... Suggested-by: Ingo Molnar Signed-off-by: Changbin Du Cc: Linus Torvalds Cc: Masahiro Yamada Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1509939179-7556-2-git-send-email-changbin.du@intel.com Signed-off-by: Ingo Molnar arch/x86/boot/Makefile | 59 +++++--------------------- arch/x86/boot/genimage.sh | 105 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+), 48 deletions(-) commit 629a359bdb0e0652a8227b4ff3125431995fec6e Author: Kirill A. Shutemov Date: Tue Nov 7 11:33:37 2017 +0300 mm/sparsemem: Fix ARM64 boot crash when CONFIG_SPARSEMEM_EXTREME=y Since commit: 83e3c48729d9 ("mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y") we allocate the mem_section array dynamically in sparse_memory_present_with_active_regions(), but some architectures, like arm64, don't call the routine to initialize sparsemem. Let's move the initialization into memory_present() it should cover all architectures. Reported-and-tested-by: Sudeep Holla Tested-by: Bjorn Andersson Signed-off-by: Kirill A. Shutemov Acked-by: Will Deacon Cc: Andrew Morton Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Fixes: 83e3c48729d9 ("mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y") Link: http://lkml.kernel.org/r/20171107083337.89952-1-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar mm/page_alloc.c | 10 ---------- mm/sparse.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) commit fec8f5ae1715a01c72ad52cb2ecd8aacaf142302 Author: Andy Lutomirski Date: Sat Nov 4 04:19:52 2017 -0700 selftests/x86/ldt_get: Add a few additional tests for limits We weren't testing the .limit and .limit_in_pages fields very well. Add more tests. This addition seems to trigger the "bits 16:19 are undefined" issue that was fixed in an earlier patch. I think that, at least on my CPU, the high nibble of the limit ends in LAR bits 16:19. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/5601c15ea9b3113d288953fd2838b18bedf6bc67.1509794321.git.luto@kernel.org Signed-off-by: Ingo Molnar tools/testing/selftests/x86/ldt_gdt.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit adedf2893c192dd09b1cc2f2dcfdd7cad99ec49d Author: Andy Lutomirski Date: Sat Nov 4 04:19:51 2017 -0700 selftests/x86/ldt_gdt: Run most existing LDT test cases against the GDT as well Now that the main test infrastructure supports the GDT, run tests that will pass the kernel's GDT permission tests against the GDT. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/686a1eda63414da38fcecc2412db8dba1ae40581.1509794321.git.luto@kernel.org Signed-off-by: Ingo Molnar tools/testing/selftests/x86/ldt_gdt.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit d744dcad39094c9187075e274d1cdef79c57c8b5 Author: Andy Lutomirski Date: Sat Nov 4 04:19:50 2017 -0700 selftests/x86/ldt_gdt: Add infrastructure to test set_thread_area() Much of the test design could apply to set_thread_area() (i.e. GDT), not just modify_ldt(). Add set_thread_area() to the install_valid_mode() helper. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/02c23f8fba5547007f741dc24c3926e5284ede02.1509794321.git.luto@kernel.org Signed-off-by: Ingo Molnar tools/testing/selftests/x86/ldt_gdt.c | 53 ++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 16 deletions(-) commit d60ad744c9741586010d4bea286f09a063a90fbd Author: Andy Lutomirski Date: Sat Nov 4 04:19:49 2017 -0700 selftests/x86/ldt_gdt: Robustify against set_thread_area() and LAR oddities Bits 19:16 of LAR's result are undefined, and some upcoming improvements to the test case seem to trigger this. Mask off those bits to avoid spurious failures. commit 5b781c7e317f ("x86/tls: Forcibly set the accessed bit in TLS segments") adds a valid case in which LAR's output doesn't quite agree with set_thread_area()'s input. This isn't triggered in the test as is, but it will be if we start calling set_thread_area() with the accessed bit clear. Work around this discrepency. I've added a Fixes tag so that -stable can pick this up if neccesary. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 5b781c7e317f ("x86/tls: Forcibly set the accessed bit in TLS segments") Link: http://lkml.kernel.org/r/b82f3f89c034b53580970ac865139fd8863f44e2.1509794321.git.luto@kernel.org Signed-off-by: Ingo Molnar tools/testing/selftests/x86/ldt_gdt.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 693cb5580fdb026922363aa103add64b3ecd572e Author: Andy Lutomirski Date: Sat Nov 4 04:19:48 2017 -0700 selftests/x86/protection_keys: Fix syscall NR redefinition warnings On new enough glibc, the pkey syscalls numbers are available. Check first before defining them to avoid warnings like: protection_keys.c:198:0: warning: "SYS_pkey_alloc" redefined Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1fbef53a9e6befb7165ff855fc1a7d4788a191d6.1509794321.git.luto@kernel.org Signed-off-by: Ingo Molnar tools/testing/selftests/x86/protection_keys.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 783ca517bfd62ca516178712775e4b273292d5b1 Author: Yazen Ghannam Date: Mon Nov 6 18:46:33 2017 +0100 x86/MCE/AMD: Fix mce_severity_amd_smca() signature Change the err_ctx type to "enum context" to match the type passed in. No functionality change. Suggested-by: Borislav Petkov Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20171106174633.13576-2-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce-severity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d65dfc81bb3894fdb68cbc74bbf5fb48d2354071 Author: Yazen Ghannam Date: Mon Nov 6 18:46:32 2017 +0100 x86/MCE/AMD: Always give panic severity for UC errors in kernel context The AMD severity grading function was introduced in kernel 4.1. The current logic can possibly give MCE_AR_SEVERITY for uncorrectable errors in kernel context. The system may then get stuck in a loop as memory_failure() will try to handle the bad kernel memory and find it busy. Return MCE_PANIC_SEVERITY for all UC errors IN_KERNEL context on AMD systems. After: b2f9d678e28c ("x86/mce: Check for faults tagged in EXTABLE_CLASS_FAULT exception table entries") was accepted in v4.6, this issue was masked because of the tail-end attempt at kernel mode recovery in the #MC handler. However, uncorrectable errors IN_KERNEL context should always be considered unrecoverable and cause a panic. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Cc: # 4.9.x Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Fixes: bf80bbd7dcf5 (x86/mce: Add an AMD severities-grading function) Link: http://lkml.kernel.org/r/20171106174633.13576-1-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/mcheck/mce-severity.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit f3a624e901c633593156f7b00ca743a6204a29bc Author: Ingo Molnar Date: Tue Oct 31 13:17:23 2017 +0100 x86/cpufeatures: Fix various details in the feature definitions Kept this commit separate from the re-tabulation changes, to make the changes easier to review: - add better explanation for entries with no explanation - fix/enhance the text of some of the entries - fix the vertical alignment of some of the feature number definitions - fix inconsistent capitalization - ... and lots of other small details i.e. make it all more of a coherent unit, instead of a patchwork of years of additions. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171031121723.28524-4-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 149 ++++++++++++++++++------------------- 1 file changed, 74 insertions(+), 75 deletions(-) commit acbc845ffefd9fb70466182cd8555a26189462b2 Author: Ingo Molnar Date: Tue Oct 31 13:17:22 2017 +0100 x86/cpufeatures: Re-tabulate the X86_FEATURE definitions Over the years asm/cpufeatures.h has become somewhat of a mess: the original tabulation style was too narrow, while x86 feature names also kept growing in length, creating frequent field width overflows. Re-tabulate it to make it wider and easier to read/modify. Also harmonize the tabulation of the other defines in this file to match it. Cc: Andrew Morton Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171031121723.28524-3-mingo@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 508 ++++++++++++++++++------------------- 1 file changed, 254 insertions(+), 254 deletions(-) commit 67caadc611eb1bf4aefc7c7a33dde30d12832569 Merge: b3d9a13 af8e947 Author: Ingo Molnar Date: Tue Nov 7 10:54:30 2017 +0100 Merge branch 'x86/build' into x86/asm, to fix up conflicts Conflicts: arch/x86/entry/syscalls/Makefile Signed-off-by: Ingo Molnar commit b3d9a136815ca9284ade2a897a3b7d2b0084c33c Merge: c7da092 e4880bc5 Author: Ingo Molnar Date: Tue Nov 7 10:53:06 2017 +0100 Merge branch 'linus' into x86/asm, to pick up fixes and resolve conflicts Conflicts: arch/x86/kernel/cpu/Makefile Signed-off-by: Ingo Molnar commit 141d3b1daacd11bdbd6fa74c2b163093e10d17ee Merge: c201c91 e4880bc5 Author: Ingo Molnar Date: Tue Nov 7 10:51:10 2017 +0100 Merge branch 'linus' into x86/apic, to resolve conflicts Conflicts: arch/x86/include/asm/x2apic.h Signed-off-by: Ingo Molnar commit 3bd51c5a371de917e4e7401c9df006b5998579df Author: Josh Poimboeuf Date: Mon Nov 6 07:21:51 2017 -0600 objtool: Move kernel headers/code sync check to a script Replace the nasty diff checks in the objtool Makefile with a clean bash script, and make the warnings more specific. Heavily inspired by tools/perf/check-headers.sh. Suggested-by: Ingo Molnar Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/ab015f15ccd8c0c6008493c3c6ee3d495eaf2927.1509974346.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/Makefile | 16 +--------------- tools/objtool/sync-check.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 15 deletions(-) commit 6a77cff819ae3e31992bde6432c9b5720748a89b Author: Josh Poimboeuf Date: Mon Nov 6 07:21:50 2017 -0600 objtool: Move synced files to their original relative locations This will enable more straightforward comparisons, and it also makes the files 100% identical. Suggested-by: Ingo Molnar Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/407b2aaa317741f48fcf821592c0e96ab3be1890.1509974346.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/.gitignore | 2 +- tools/objtool/Makefile | 22 +- tools/objtool/arch/x86/Build | 10 +- tools/objtool/arch/x86/decode.c | 6 +- tools/objtool/arch/x86/include/asm/inat.h | 234 +++++ tools/objtool/arch/x86/include/asm/inat_types.h | 29 + tools/objtool/arch/x86/include/asm/insn.h | 211 ++++ tools/objtool/arch/x86/include/asm/orc_types.h | 107 ++ tools/objtool/arch/x86/insn/gen-insn-attr-x86.awk | 393 -------- tools/objtool/arch/x86/insn/inat.c | 97 -- tools/objtool/arch/x86/insn/inat.h | 234 ----- tools/objtool/arch/x86/insn/inat_types.h | 29 - tools/objtool/arch/x86/insn/insn.c | 606 ----------- tools/objtool/arch/x86/insn/insn.h | 211 ---- tools/objtool/arch/x86/insn/x86-opcode-map.txt | 1063 -------------------- tools/objtool/arch/x86/lib/inat.c | 97 ++ tools/objtool/arch/x86/lib/insn.c | 606 +++++++++++ tools/objtool/arch/x86/lib/x86-opcode-map.txt | 1063 ++++++++++++++++++++ tools/objtool/arch/x86/tools/gen-insn-attr-x86.awk | 393 ++++++++ tools/objtool/orc.h | 2 +- tools/objtool/orc_types.h | 107 -- 21 files changed, 2762 insertions(+), 2760 deletions(-) commit 10259821ac47dbefa6f83ae57f1fa9f1f2c54b3d Author: Josh Poimboeuf Date: Mon Nov 6 07:17:38 2017 -0600 objtool: Make unreachable annotation inline asms explicitly volatile Add 'volatile' to the unreachable annotation macro inline asm statements. They're already implicitly volatile because they don't have output constraints, but it's clearer and more robust to make them explicitly volatile. Suggested-by: Linus Torvalds Signed-off-by: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/28659257b7a6adf4a7f65920dad70b2b0226e996.1509974104.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar include/linux/compiler.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d0c2e691d1cbe43662df3a08a4933f13acc352c3 Author: Josh Poimboeuf Date: Mon Nov 6 07:17:37 2017 -0600 objtool: Add a comment for the unreachable annotation macros Add a comment for the unreachable annotation macros to explain their purpose and the '__COUNTER__' label hack. Suggested-by: Linus Torvalds Signed-off-by: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1570e48d9f87e0fc6f0126c32e7e1de6e109cb67.1509974104.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar include/linux/compiler.h | 5 +++++ 1 file changed, 5 insertions(+) commit 783711f0d2458ca1bd716000e767c478cef27144 Merge: 6a93bb7 e4880bc5 Author: Ingo Molnar Date: Tue Nov 7 10:48:05 2017 +0100 Merge branch 'linus' into core/objtool, to pick up dependent fixes Signed-off-by: Ingo Molnar commit b4b138a9d31924cb9ab535138deb150d6ec418a5 Author: Gustavo A. R. Silva Date: Mon Nov 6 09:22:18 2017 -0500 media: usb: dvb-usb-v2: dvb_usb_core: remove redundant code in dvb_usb_fe_sleep Check on return value and goto instruction is redundant as the code that follows is the goto label err. Addresses-Coverity-ID: 1268783 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8c5db92a705d9e2c986adec475980d1120fa07b4 Merge: ca5d376 e4880bc5 Author: Ingo Molnar Date: Tue Nov 7 10:32:44 2017 +0100 Merge branch 'linus' into locking/core, to resolve conflicts Conflicts: include/linux/compiler-clang.h include/linux/compiler-gcc.h include/linux/compiler-intel.h include/uapi/linux/stddef.h Signed-off-by: Ingo Molnar commit 15bcdc9477b03eb035052412c3a087e11e855e76 Merge: 340b531 e4880bc5 Author: Ingo Molnar Date: Tue Nov 7 10:30:18 2017 +0100 Merge branch 'linus' into perf/core, to fix conflicts Conflicts: tools/perf/arch/arm/annotate/instructions.c tools/perf/arch/arm64/annotate/instructions.c tools/perf/arch/powerpc/annotate/instructions.c tools/perf/arch/s390/annotate/instructions.c tools/perf/arch/x86/tests/intel-cqm.c tools/perf/ui/tui/progress.c tools/perf/util/zlib.c Signed-off-by: Ingo Molnar commit 1477edb4853bd730e3ab37fa9165651c03c2cc05 Author: Viktor Chapliev Date: Tue Nov 7 11:13:16 2017 +0300 HID: Add ID 044f:b605 ThrustMaster, Inc. force feedback Racing Wheel Add ID 044f:b605 ThrustMaster, Inc. force feedback Racing Wheel Signed-off-by: Viktor Chapliev Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 1 + drivers/hid/hid-tmff.c | 2 ++ 2 files changed, 3 insertions(+) commit 213bc75a750363879792fd3793be8007a56ac477 Author: Colin Ian King Date: Thu Nov 2 13:26:48 2017 -0400 media: au0828: make const array addr_list static Don't populate array addr_list on the stack but instead make it static. Makes the object code smaller by over 360 bytes: Before: text data bss dec hex filename 8036 1488 192 9716 25f4 au0828-input.o After: text data bss dec hex filename 7696 1488 192 9376 24a0 au0828-input.o (gcc version 7.2.0 x86_64) Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b8a14c8f89def80e50a3feb5b8b797cd54e1f2a Author: Colin Ian King Date: Thu Nov 2 13:16:59 2017 -0400 media: cx88: make const arrays default_addr_list and pvr2000_addr_list static Don't populate arrays default_addr_list and pvr2000_addr_list on the stack but instead make them static. Makes the object code smaller by over 340 bytes: Before: text data bss dec hex filename 12520 2800 64 15384 3c18 drivers/media/pci/cx88/cx88-input.o After: text data bss dec hex filename 12142 2832 64 15038 3abe drivers/media/pci/cx88/cx88-input.o (gcc version 7.2.0 x86_64) Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx88/cx88-input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eaa8c79eadc04b06d1434be09207074c9989cefb Author: Colin Ian King Date: Thu Nov 2 12:49:08 2017 -0400 media: drxd: make const array fastIncrDecLUT static Don't populate array fastIncrDecLUT on the stack but instead make it static. Makes the object code smaller by over 360 bytes: text data bss dec hex filename 32680 944 64 33688 8398 drxd_hard.o text data bss dec hex filename 32223 1040 64 33327 822f drxd_hard.o (gcc version 7.2.0 x86_64) Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/drxd_hard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b436e26e484d259e0b658d558eb99b7ab004e997 Author: Colin Ian King Date: Thu Nov 2 06:11:53 2017 -0400 media: usb: fix spelling mistake: "synchronuously" -> "synchronously" Trivial fix to spelling mistake in error message text [mchehab@s-opensource.org: folded all similar patches into one] Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-video.c | 4 ++-- drivers/media/usb/cx231xx/cx231xx-dvb.c | 4 ++-- drivers/media/usb/cx231xx/cx231xx-vbi.c | 4 ++-- drivers/media/usb/cx231xx/cx231xx-video.c | 4 ++-- drivers/media/usb/em28xx/em28xx-dvb.c | 4 ++-- drivers/media/usb/em28xx/em28xx-video.c | 4 ++-- drivers/media/usb/msi2500/msi2500.c | 2 +- drivers/media/usb/pwc/pwc-if.c | 3 ++- drivers/media/usb/stk1160/stk1160-video.c | 4 ++-- drivers/media/usb/tm6000/tm6000-dvb.c | 4 ++-- drivers/media/usb/tm6000/tm6000-video.c | 4 ++-- 11 files changed, 21 insertions(+), 20 deletions(-) commit f3eff2096a8d0ceb2782fa2e10fac3aa2d5b127c Author: Randy Dunlap Date: Mon Nov 6 13:21:06 2017 -0500 media: ddbridge: fix build warnings Fix 2 build warnings. These functions are void, so drop the "return"s. ./drivers/media/pci/ddbridge/ddbridge-io.h: warning: 'return' with a value, in function returning void [enabled by default]: => 50:2, 55:2 Signed-off-by: Randy Dunlap Reported-by: Geert Uytterhoeven Cc: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ddbridge/ddbridge-io.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fe3652858a36bb1aa116f23258ea9cc353426566 Author: Arnd Bergmann Date: Mon Nov 6 09:06:50 2017 -0500 media: av7110: avoid 2038 overflow in debug print Using the deprecated do_gettimeofday() in print_time() will overflow in 2038 on 32-bit architectures. It'sbetter to use a structure that is safe everywhere. While we're at it, fix the missing leading zeroes on the sub-second portion. Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/ttpci/av7110.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b3120d2cc447ee77b9d69bf4ad7b452c9adb4d39 Author: Michele Baldessari Date: Mon Nov 6 08:50:22 2017 -0500 media: Don't do DMA on stack for firmware upload in the AS102 driver Firmware load on AS102 is using the stack which is not allowed any longer. We currently fail with: kernel: transfer buffer not dma capable kernel: ------------[ cut here ]------------ kernel: WARNING: CPU: 0 PID: 598 at drivers/usb/core/hcd.c:1595 usb_hcd_map_urb_for_dma+0x41d/0x620 kernel: Modules linked in: amd64_edac_mod(-) edac_mce_amd as102_fe dvb_as102(+) kvm_amd kvm snd_hda_codec_realtek dvb_core snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_intel snd_hda_codec irqbypass crct10dif_pclmul crc32_pclmul snd_hda_core snd_hwdep snd_seq ghash_clmulni_intel sp5100_tco fam15h_power wmi k10temp i2c_piix4 snd_seq_device snd_pcm snd_timer parport_pc parport tpm_infineon snd tpm_tis soundcore tpm_tis_core tpm shpchp acpi_cpufreq xfs libcrc32c amdgpu amdkfd amd_iommu_v2 radeon hid_logitech_hidpp i2c_algo_bit drm_kms_helper crc32c_intel ttm drm r8169 mii hid_logitech_dj kernel: CPU: 0 PID: 598 Comm: systemd-udevd Not tainted 4.13.10-200.fc26.x86_64 #1 kernel: Hardware name: ASUS All Series/AM1I-A, BIOS 0505 03/13/2014 kernel: task: ffff979933b24c80 task.stack: ffffaf83413a4000 kernel: RIP: 0010:usb_hcd_map_urb_for_dma+0x41d/0x620 systemd-fsck[659]: /dev/sda2: clean, 49/128016 files, 268609/512000 blocks kernel: RSP: 0018:ffffaf83413a7728 EFLAGS: 00010282 systemd-udevd[604]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable. kernel: RAX: 000000000000001f RBX: ffff979930bce780 RCX: 0000000000000000 kernel: RDX: 0000000000000000 RSI: ffff97993ec0e118 RDI: ffff97993ec0e118 kernel: RBP: ffffaf83413a7768 R08: 000000000000039a R09: 0000000000000000 kernel: R10: 0000000000000001 R11: 00000000ffffffff R12: 00000000fffffff5 kernel: R13: 0000000001400000 R14: 0000000000000001 R15: ffff979930806800 kernel: FS: 00007effaca5c8c0(0000) GS:ffff97993ec00000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: CR2: 00007effa9fca962 CR3: 0000000233089000 CR4: 00000000000406f0 kernel: Call Trace: kernel: usb_hcd_submit_urb+0x493/0xb40 kernel: ? page_cache_tree_insert+0x100/0x100 kernel: ? xfs_iunlock+0xd5/0x100 [xfs] kernel: ? xfs_file_buffered_aio_read+0x57/0xc0 [xfs] kernel: usb_submit_urb+0x22d/0x560 kernel: usb_start_wait_urb+0x6e/0x180 kernel: usb_bulk_msg+0xb8/0x160 kernel: as102_send_ep1+0x49/0xe0 [dvb_as102] kernel: ? devres_add+0x3f/0x50 kernel: as102_firmware_upload.isra.0+0x1dc/0x210 [dvb_as102] kernel: as102_fw_upload+0xb6/0x1f0 [dvb_as102] kernel: as102_dvb_register+0x2af/0x2d0 [dvb_as102] kernel: as102_usb_probe+0x1f3/0x260 [dvb_as102] kernel: usb_probe_interface+0x124/0x300 kernel: driver_probe_device+0x2ff/0x450 kernel: __driver_attach+0xa4/0xe0 kernel: ? driver_probe_device+0x450/0x450 kernel: bus_for_each_dev+0x6e/0xb0 kernel: driver_attach+0x1e/0x20 kernel: bus_add_driver+0x1c7/0x270 kernel: driver_register+0x60/0xe0 kernel: usb_register_driver+0x81/0x150 kernel: ? 0xffffffffc0807000 kernel: as102_usb_driver_init+0x1e/0x1000 [dvb_as102] kernel: do_one_initcall+0x50/0x190 kernel: ? __vunmap+0x81/0xb0 kernel: ? kfree+0x154/0x170 kernel: ? kmem_cache_alloc_trace+0x15f/0x1c0 kernel: ? do_init_module+0x27/0x1e9 kernel: do_init_module+0x5f/0x1e9 kernel: load_module+0x2602/0x2c30 kernel: SYSC_init_module+0x170/0x1a0 kernel: ? SYSC_init_module+0x170/0x1a0 kernel: SyS_init_module+0xe/0x10 kernel: do_syscall_64+0x67/0x140 kernel: entry_SYSCALL64_slow_path+0x25/0x25 kernel: RIP: 0033:0x7effab6cf3ea kernel: RSP: 002b:00007fff5cfcbbc8 EFLAGS: 00000246 ORIG_RAX: 00000000000000af kernel: RAX: ffffffffffffffda RBX: 00005569e0b83760 RCX: 00007effab6cf3ea kernel: RDX: 00007effac2099c5 RSI: 0000000000009a13 RDI: 00005569e0b98c50 kernel: RBP: 00007effac2099c5 R08: 00005569e0b83ed0 R09: 0000000000001d80 kernel: R10: 00007effab98db00 R11: 0000000000000246 R12: 00005569e0b98c50 kernel: R13: 00005569e0b81c60 R14: 0000000000020000 R15: 00005569dfadfdf7 kernel: Code: 48 39 c8 73 30 80 3d 59 60 9d 00 00 41 bc f5 ff ff ff 0f 85 26 ff ff ff 48 c7 c7 b8 6b d0 92 c6 05 3f 60 9d 00 01 e8 24 3d ad ff <0f> ff 8b 53 64 e9 09 ff ff ff 65 48 8b 0c 25 00 d3 00 00 48 8b kernel: ---[ end trace c4cae366180e70ec ]--- kernel: as10x_usb: error during firmware upload part1 Let's allocate the the structure dynamically so we can get the firmware loaded correctly: [ 14.243057] as10x_usb: firmware: as102_data1_st.hex loaded with success [ 14.500777] as10x_usb: firmware: as102_data2_st.hex loaded with success Signed-off-by: Michele Baldessari Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/as102/as102_fw.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit cd77b5ce208c153260ed7882d8910f2395bfaabd Author: Shriya Date: Fri Oct 13 10:06:41 2017 +0530 powerpc/powernv/cpufreq: Fix the frequency read by /proc/cpuinfo The call to /proc/cpuinfo in turn calls cpufreq_quick_get() which returns the last frequency requested by the kernel, but may not reflect the actual frequency the processor is running at. This patch makes a call to cpufreq_get() instead which returns the current frequency reported by the hardware. Fixes: fb5153d05a7d ("powerpc: powernv: Implement ppc_md.get_proc_freq()") Signed-off-by: Shriya Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1453ad81a2be1bef9243671480694d483ab0dad0 Author: Niklas Söderlund Date: Fri Nov 3 22:25:56 2017 -0400 media: v4l: async: fix unregister for implicitly registered sub-device notifiers The commit aef69d54755d45ed ("media: v4l: fwnode: Add a convenience function for registering sensors") adds the function v4l2_async_notifier_parse_fwnode_sensor_common() to parse and register a subdevice and a subdev-notifier by parsing firmware information. This new subdev-notifier is stored in the new field 'subdev_notifier' in struct v4l2_subdev. In v4l2_async_unregister_subdev() this field is used to unregister and cleanup the subdev-notifier. A check for if the subdev-notifier is initialized or not was forgotten leading to a NULL pointer dereference in v4l2_async_notifier_cleanup() if a subdevice do not use the optional convince function to initialize the field. Fix this by checking in v4l2_async_notifier_cleanup() that it is provided whit a notifier making it safe to call with a NULL parameter. Fixes: aef69d54755d45ed ("media: v4l: fwnode: Add a convenience function for registering sensors") Signed-off-by: Niklas Söderlund Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 580db6ca62c168733c6fd338cd2f0ebf39135283 Author: Colin Ian King Date: Fri Nov 3 02:58:27 2017 -0400 media: v4l: async: fix return of unitialized variable ret A shadow declaration of variable ret is being assigned a return error status and this value is being lost when the error exit goto's jump out of the local scope. This leads to an uninitalized error return value in the outer scope being returned. Fix this by removing the inner scoped declaration of variable ret. Detected by CoverityScan, CID#1460380 ("Uninitialized scalar variable") Fixes: fb45f436b818 ("media: v4l: async: Fix notifier complete callback error handling") Signed-off-by: Colin Ian King Reviewed-by: Niklas Söderlund Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 1 - 1 file changed, 1 deletion(-) commit 2b00e30fc33de720cedad69427931aa393cdbaf0 Author: Colin Ian King Date: Fri Nov 3 02:41:06 2017 -0400 media: imx274: fix missing return assignment from call to imx274_mode_regs The variable ret is being checked for failure however it is not being set from the return status from the call to imx274_mode_regs. Currently ret is alwayus zero and the check is redundant. Fix this by assigning it. Detected by CoverityScan, CID#1460278 ("Logically dead code") Fixes: 0985dd306f72 ("media: imx274: V4l2 driver for Sony imx274 CMOS sensor") Signed-off-by: Colin Ian King Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/imx274.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f2a4342a8bf24c644204311f0cf154f78489b53 Author: Bjorn Andersson Date: Mon Nov 6 22:26:41 2017 -0800 remoteproc: qcom: Drop pr_err in q6v5_xfer_mem_ownership() The pr_err() in q6v5_xfer_mem_ownership() prints, upon failure, the memory range that failed to be transitioned. But on 32-bit architectures with CONFIG_PHYS_ADDR_T_64BIT set we cannot cast the phys_addr_t variable to a pointer, per below build error. Instead these should be formatted with %pap. In file included from include/linux/kernel.h:14:0, from include/linux/clk.h:16, from drivers/remoteproc/qcom_q6v5_pil.c:18: drivers/remoteproc/qcom_q6v5_pil.c: In function 'q6v5_xfer_mem_ownership': drivers/remoteproc/qcom_q6v5_pil.c:337:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] (void *)addr, (void *)(addr + size), ^ Most callers will upon failure print a specific error message describing which memory region that we failed to pass ownership of, so rather than fixing the format string this patch fixes up the last callers and drop the print from this function, saving us from spamming the log in most of these error cases. Fixes: 6c5a9dc2481b ("remoteproc: qcom: Make secure world call for mem ownership switch") Reported-by: Arnd Bergmann Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_q6v5_pil.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit d048236dfdfe454f059a0837431c3ae3d166d4d6 Author: Baolin Wang Date: Sat Nov 4 14:37:48 2017 +0800 hwspinlock: Change hwspinlock to a bool Change hwspinlock to a bool in case some drivers will meet dependency issue when hwspinlock is built as a module. Signed-off-by: Baolin Wang Signed-off-by: Bjorn Andersson drivers/hwspinlock/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b89188394164a5df4bd649380f75ec74e6b8a4d3 Author: Loic Pallardy Date: Mon Nov 6 18:09:56 2017 +0100 remoteproc: debug: add carveouts list dump feature This patch offers the capability to dump memory carveouts associated to one remoteprocessor. Signed-off-by: Loic Pallardy Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_debugfs.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit bdd8edb9b0cd552f09a81c32d699af041155a390 Author: Loic Pallardy Date: Mon Nov 6 18:09:55 2017 +0100 remoteproc: debug: add resource table dump feature This patch adds the capability to display the content of the resource table associated to a remote processor firmware. Signed-off-by: Loic Pallardy Signed-off-by: Bjorn Andersson drivers/remoteproc/remoteproc_debugfs.c | 99 +++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) commit 8653188763b56e0bcbdcab30cc7b059672c900ac Author: Bart Van Assche Date: Mon Nov 6 11:59:05 2017 -0800 scsi: qla2xxx: Suppress a kernel complaint in qla_init_base_qpair() Avoid that the following is reported while loading the qla2xxx kernel module: BUG: using smp_processor_id() in preemptible [00000000] code: modprobe/783 caller is debug_smp_processor_id+0x17/0x20 CPU: 7 PID: 783 Comm: modprobe Not tainted 4.14.0-rc8-dbg+ #2 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 Call Trace: dump_stack+0x8e/0xce check_preemption_disabled+0xe3/0xf0 debug_smp_processor_id+0x17/0x20 qla2x00_probe_one+0xf43/0x26c0 [qla2xxx] pci_device_probe+0xca/0x140 driver_probe_device+0x2e2/0x440 __driver_attach+0xa3/0xe0 bus_for_each_dev+0x5f/0x90 driver_attach+0x19/0x20 bus_add_driver+0x1c0/0x260 driver_register+0x5b/0xd0 __pci_register_driver+0x63/0x70 qla2x00_module_init+0x1d6/0x222 [qla2xxx] do_one_initcall+0x3c/0x163 do_init_module+0x55/0x1eb load_module+0x20a2/0x2890 SYSC_finit_module+0xd7/0xf0 SyS_finit_module+0x9/0x10 entry_SYSCALL_64_fastpath+0x23/0xc2 Fixes: commit 8abfa9e22683 ("scsi: qla2xxx: Add function call to qpair for door bell") Signed-off-by: Bart Van Assche Cc: Quinn Tran Cc: Himanshu Madhani Cc: Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8335ae2b453f9efb2e88b71ae3cde0c010a5ac0 Author: Arnd Bergmann Date: Mon Nov 6 14:35:16 2017 +0100 scsi: mpt3sas: fix dma_addr_t casts The newly added base_make_prp_nvme function triggers a build warning on some 32-bit configurations: drivers/scsi/mpt3sas/mpt3sas_base.c: In function 'base_make_prp_nvme': drivers/scsi/mpt3sas/mpt3sas_base.c:1664:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] msg_phys = (dma_addr_t)mpt3sas_base_get_pcie_sgl_dma(ioc, smid); After taking a closer look, I found that the problem is that the new code mixes up pointers and dma_addr_t values unnecessarily. This changes it to use the correct types consistently, which lets us get rid of a lot of type casts in the process. I'm also renaming some variables to avoid confusion between physical and dma address spaces that are often distinct. Fixes: 016d5c35e278 ("scsi: mpt3sas: SGL to PRP Translation for I/Os to NVMe devices") Signed-off-by: Arnd Bergmann Acked-by: Sathya Prakash Veerichetty Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 62 +++++++++++++++++-------------------- drivers/scsi/mpt3sas/mpt3sas_base.h | 2 +- 2 files changed, 30 insertions(+), 34 deletions(-) commit d38c9a803b42d19d125aff586dfaac77b5702d05 Author: Himanshu Jha Date: Wed Oct 11 21:06:14 2017 +0530 scsi: be2iscsi: Use kasprintf Use kasprintf instead of combination of kmalloc and sprintf. Also, remove BEISCSI_MSI_NAME macro used to specify size of string as kasprintf handles size computations. Signed-off-by: Himanshu Jha Reviewed-by: Kyle Fortin Reviewed-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 12 +++++------- drivers/scsi/be2iscsi/be_main.h | 2 -- 2 files changed, 5 insertions(+), 9 deletions(-) commit c58cc70fde299866bc261296166d26a87b4fa7ef Author: Long Li Date: Tue Oct 31 14:58:08 2017 -0700 scsi: storvsc: Avoid excessive host scan on controller change When there are multiple disks attached to the same SCSI controller, the host may send several VSTOR_OPERATION_REMOVE_DEVICE or VSTOR_OPERATION_ENUMERATE_BUS messages in a row, to indicate there is a change on the SCSI controller. In response, storvsc rescans the SCSI host. There is no need to do multiple scans on the same host. Fix the code to do only one scan. [mkp: applied by hand] Signed-off-by: Long Li Tested-by: Cathy Avery Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit c8b61d508986b7e77bab11f8252b67e6e2b9a7cc Author: Angelo Dureghello Date: Fri Oct 13 00:42:51 2017 +0200 m68k: add Sysam stmark2 open board support Add support for Sysam stmark2 board, an open hardware embedded Linux board, see http://sysam.it/cff_stmark2.html for any info. Signed-off-by: Angelo Dureghello Signed-off-by: Greg Ungerer arch/m68k/Kconfig.machine | 6 ++ arch/m68k/coldfire/Makefile | 3 +- arch/m68k/coldfire/stmark2.c | 119 ++++++++++++++++++++++++++++++++++++ arch/m68k/configs/stmark2_defconfig | 92 ++++++++++++++++++++++++++++ 4 files changed, 219 insertions(+), 1 deletion(-) commit 08fe92e2052c79e79d0570902f64bf991d6dd563 Author: Angelo Dureghello Date: Fri Oct 13 01:09:32 2017 +0200 m68k: coldfire: add dspi0 module support This patch adds initial module base address and irq for dspi0. It also defines the dspi0 clock to be used by the Freescale driver. Signed-off-by: Angelo Dureghello Signed-off-by: Greg Ungerer arch/m68k/coldfire/m5441x.c | 3 ++- arch/m68k/include/asm/m5441xsim.h | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit fffcefe967a02997be7a296a4f0766b29dcd1a67 Author: Eric Dumazet Date: Mon Nov 6 14:13:29 2017 -0800 ipv6: addrconf: fix a lockdep splat Fixes a case where GFP_ATOMIC allocation must be used instead of GFP_KERNEL one. [ 54.891146] lock_acquire+0xb3/0x2f0 [ 54.891153] ? fs_reclaim_acquire.part.60+0x5/0x30 [ 54.891165] fs_reclaim_acquire.part.60+0x29/0x30 [ 54.891170] ? fs_reclaim_acquire.part.60+0x5/0x30 [ 54.891178] kmem_cache_alloc_trace+0x3f/0x500 [ 54.891186] ? cyc2ns_read_end+0x1e/0x30 [ 54.891196] ipv6_add_addr+0x15a/0xc30 [ 54.891217] ? ipv6_create_tempaddr+0x2ea/0x5d0 [ 54.891223] ipv6_create_tempaddr+0x2ea/0x5d0 [ 54.891238] ? manage_tempaddrs+0x195/0x220 [ 54.891249] ? addrconf_prefix_rcv_add_addr+0x1c0/0x4f0 [ 54.891255] addrconf_prefix_rcv_add_addr+0x1c0/0x4f0 [ 54.891268] addrconf_prefix_rcv+0x2e5/0x9b0 [ 54.891279] ? neigh_update+0x446/0xb90 [ 54.891298] ? ndisc_router_discovery+0x5ab/0xf00 [ 54.891303] ndisc_router_discovery+0x5ab/0xf00 [ 54.891311] ? retint_kernel+0x2d/0x2d [ 54.891331] ndisc_rcv+0x1b6/0x270 [ 54.891340] icmpv6_rcv+0x6aa/0x9f0 [ 54.891345] ? ipv6_chk_mcast_addr+0x176/0x530 [ 54.891351] ? do_csum+0x17b/0x260 [ 54.891360] ip6_input_finish+0x194/0xb20 [ 54.891372] ip6_input+0x5b/0x2c0 [ 54.891380] ? ip6_rcv_finish+0x320/0x320 [ 54.891389] ip6_mc_input+0x15a/0x250 [ 54.891396] ipv6_rcv+0x772/0x1050 [ 54.891403] ? consume_skb+0xbe/0x2d0 [ 54.891412] ? ip6_make_skb+0x2a0/0x2a0 [ 54.891418] ? ip6_input+0x2c0/0x2c0 [ 54.891425] __netif_receive_skb_core+0xa0f/0x1600 [ 54.891436] ? process_backlog+0xac/0x400 [ 54.891441] process_backlog+0xfa/0x400 [ 54.891448] ? net_rx_action+0x145/0x1130 [ 54.891456] net_rx_action+0x310/0x1130 [ 54.891524] ? RTUSBBulkReceive+0x11d/0x190 [mt7610u_sta] [ 54.891538] __do_softirq+0x140/0xaba [ 54.891553] irq_exit+0x10b/0x160 [ 54.891561] do_IRQ+0xbb/0x1b0 Fixes: f3d9832e56c4 ("ipv6: addrconf: cleanup locking in ipv6_add_addr") Signed-off-by: Eric Dumazet Reported-by: Valdis Kletnieks Acked-by: David Ahern Tested-by: David Ahern Signed-off-by: David S. Miller net/ipv6/addrconf.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit ded0eb83449e8fcba22fd2736826336e101ffbcb Author: Andrew Jeffery Date: Fri Nov 3 15:53:01 2017 +1100 dt-bindings: pmbus: Add Maxim MAX31785 documentation Signed-off-by: Andrew Jeffery Acked-by: Rob Herring Signed-off-by: Guenter Roeck .../devicetree/bindings/hwmon/max31785.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit a5fd505092863c520ddf26bd188716b532c1efcf Author: Chao Yu Date: Mon Nov 6 22:51:45 2017 +0800 f2fs: trace checkpoint reason in fsync() This patch slightly changes need_do_checkpoint to return the detail info that indicates why we need do checkpoint, then caller could print it with trace message. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 12 ++++++++++++ fs/f2fs/file.c | 34 ++++++++++++++++++---------------- include/trace/events/f2fs.h | 24 ++++++++++++++++++------ 3 files changed, 48 insertions(+), 22 deletions(-) commit e8ed90a6d9a478938ef967a474a5c2a398759f4d Author: Chao Yu Date: Sun Nov 5 21:53:30 2017 +0800 f2fs: keep isize once block is reserved cross EOF Without FADVISE_KEEP_SIZE_BIT, we will try to recover file size according to last non-hole block, so in fallocate(), we must set FADVISE_KEEP_SIZE_BIT flag once we have preallocated block cross EOF, instead of when all preallocation is success. Otherwise, file size will be incorrect due to lack of this flag. Simple testcase to reproduce this: 1. echo 2 > /sys/fs/f2fs//inject_type 2. echo 10 > /sys/fs/f2fs//inject_rate 3. run tests/generic/392 4. disable fault injection 5. do remount Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit db63d40017a523d127ec78328fed643918c7c54c Author: Mika Westerberg Date: Fri Oct 13 21:35:47 2017 +0300 PCI: pciehp: Do not clear Presence Detect Changed during initialization It is possible that the hotplug event has already happened before the driver is attached to a PCIe hotplug downstream port. If we just clear the status we never get the hotplug interrupt and thus the event will be missed. To make sure that does not happen, we leave Presence Detect Changed bit untouched during initialization. Then once the event is unmasked we get an interrupt and handle the hotplug event properly. Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas drivers/pci/hotplug/pciehp_hpc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 499022396a381d1b681105b74ac366017ce051e9 Author: Mika Westerberg Date: Fri Oct 13 21:35:46 2017 +0300 PCI: pciehp: Fix race condition handling surprise link down A surprise link down may retrain very quickly causing the same slot generate a link up event before handling the link down event completes. Since the link is active, the power off work queued from the first link down will cause a second down event when power is disabled. However, the link up event sets the slot state to POWERON_STATE before the event to handle this is enqueued, making the second down event believe it needs to do something. This creates constant link up and down event cycle. To prevent this it is better to handle each event at the time in order it occurred, so change the driver to use ordered workqueue instead. A normal device hotplug triggers two events (presense detect and link up) that are already handled properly in the driver but we currently log an error if we find an existing device in the slot. Since this is not an error change the log level to be debug instead to avoid scaring users. This is based on the original work by Ashok Raj. Link: https://patchwork.kernel.org/patch/9469023 Suggested-by: Bjorn Helgaas Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas drivers/pci/hotplug/pciehp_ctrl.c | 7 ++++--- drivers/pci/hotplug/pciehp_hpc.c | 2 +- drivers/pci/hotplug/pciehp_pci.c | 6 +++++- 3 files changed, 10 insertions(+), 5 deletions(-) commit 1a5767725cecedd80a541799c83c0c97b8b5b624 Author: Mika Westerberg Date: Fri Oct 13 21:35:45 2017 +0300 PCI: Distribute available resources to hotplug-capable bridges The same problem that we have with bus space applies to other resources as well. Linux only allocates the minimal amount of resources so that the devices currently present barely fit there. This prevents extending the chain later on because the resource windows allocated for hotplug downstream ports are too small. Follow what we already did for bus number and assign all available extra resources to hotplug-capable bridges. This makes it possible to extend the hierarchy later. Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas drivers/pci/setup-bus.c | 177 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) commit 1c02ea81006548a5cd55f7ac6df77cf8d7b08e00 Author: Mika Westerberg Date: Fri Oct 13 21:35:44 2017 +0300 PCI: Distribute available buses to hotplug-capable bridges System BIOS sometimes allocates extra bus space for hotplug-capable PCIe root/downstream ports. This space is needed if the device plugged to the port will have more hotplug-capable downstream ports. A good example of this is Thunderbolt. Each Thunderbolt device contains a PCIe switch and one or more hotplug-capable PCIe downstream ports where the daisy chain can be extended. Currently Linux only allocates minimal bus space to make sure all the enumerated devices barely fit there. The BIOS reserved extra space is not taken into consideration at all. Because of this we run out of bus space pretty quickly when more PCIe devices are attached to hotplug downstream ports in order to extend the chain. Modify the PCI core so we distribute the available BIOS allocated bus space equally between hotplug-capable bridges to make sure there is enough bus space for extending the hierarchy later on. Update kernel docs of the affected functions. Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 156 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 138 insertions(+), 18 deletions(-) commit a20c7f36bd3d20d245616ae223bb9d05dfb6f050 Author: Mika Westerberg Date: Fri Oct 13 21:35:43 2017 +0300 PCI: Do not allocate more buses than available in parent One can ask more buses to be reserved for hotplug bridges by passing pci=hpbussize=N in the kernel command line. If the parent bus does not have enough bus space available we incorrectly create child bus with the requested number of subordinate buses. In the example below hpbussize is set to one more than we have available buses in the root port: pci 0000:07:00.0: [8086:1578] type 01 class 0x060400 pci 0000:07:00.0: scanning [bus 00-00] behind bridge, pass 0 pci 0000:07:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring pci 0000:07:00.0: scanning [bus 00-00] behind bridge, pass 1 pci_bus 0000:08: busn_res: can not insert [bus 08-ff] under [bus 07-3f] (conflicts with (null) [bus 07-3f]) pci_bus 0000:08: scanning bus ... pci_bus 0000:0a: bus scan returning with max=40 pci_bus 0000:0a: busn_res: [bus 0a-ff] end is updated to 40 pci_bus 0000:0a: [bus 0a-40] partially hidden behind bridge 0000:07 [bus 07-3f] pci_bus 0000:08: bus scan returning with max=40 pci_bus 0000:08: busn_res: [bus 08-ff] end is updated to 40 Instead of allowing this, limit the subordinate number to be less than or equal the maximum subordinate number allocated for the parent bus (if it has any). Signed-off-by: Mika Westerberg [bhelgaas: remove irrelevant dmesg messages] Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4147c2fd9b12ae1e0bdbb2dbb9a9163c94a10a22 Author: Mika Westerberg Date: Fri Oct 13 21:35:42 2017 +0300 PCI: Open-code the two pass loop when scanning bridges The current scanning code is really hard to understand because it calls the same function in a loop where pass value is changed without any comments explaining it: for (pass = 0; pass < 2; pass++) for_each_pci_bridge(dev, bus) max = pci_scan_bridge(bus, dev, max, pass); Unfamiliar reader cannot tell easily what is the purpose of this loop without looking at internals of pci_scan_bridge(). In order to make this bit easier to understand, open-code the loop in pci_scan_child_bus() and pci_hp_add_bridge() with added comments. No functional changes intended. Signed-off-by: Mika Westerberg Signed-off-by: Bjorn Helgaas drivers/pci/probe.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) commit 95e3ba9772331502cc33f1e1d4a96f3310e2f31e Author: Mika Westerberg Date: Fri Oct 13 21:35:41 2017 +0300 PCI: Move pci_hp_add_bridge() to drivers/pci/probe.c There is not much point of having a file with a single function in it. Instead we can just move pci_hp_add_bridge() to drivers/pci/probe.c and make it available always when PCI core is enabled. Signed-off-by: Mika Westerberg [bhelgaas: convert printk to dev_err()] Signed-off-by: Bjorn Helgaas drivers/pci/Makefile | 3 --- drivers/pci/hotplug-pci.c | 29 ----------------------------- drivers/pci/probe.c | 23 +++++++++++++++++++++++ 3 files changed, 23 insertions(+), 32 deletions(-) commit 24a0c654d7d6063301c51361f911369264342b3c Author: Andy Shevchenko Date: Fri Oct 20 15:38:54 2017 -0500 PCI: Add for_each_pci_bridge() helper The following pattern is often used: list_for_each_entry(dev, &bus->devices, bus_list) { if (pci_is_bridge(dev)) { ... } } Add a for_each_pci_bridge() helper to make that code easier to write and read by reducing indentation level. It also saves one or few lines of code in each occurrence. Convert PCI core parts here at the same time. Signed-off-by: Andy Shevchenko [bhelgaas: fold in http://lkml.kernel.org/r/20171013165352.25550-1-andriy.shevchenko@linux.intel.com] Signed-off-by: Bjorn Helgaas drivers/pci/hotplug/acpiphp_glue.c | 15 ++++++--------- drivers/pci/hotplug/cpci_hotplug_pci.c | 7 ++----- drivers/pci/hotplug/pciehp_pci.c | 5 ++--- drivers/pci/hotplug/shpchp_pci.c | 6 ++---- drivers/pci/probe.c | 6 ++---- drivers/pci/setup-bus.c | 7 +++---- drivers/pcmcia/cardbus.c | 5 ++--- include/linux/pci.h | 4 ++++ 8 files changed, 23 insertions(+), 32 deletions(-) commit 3691314a905fd716de46735d944da3f374246550 Author: Kees Cook Date: Fri Oct 20 15:11:42 2017 -0500 PCI: shpchp: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Bjorn Helgaas Cc: Ingo Molnar Cc: Arvind Yadav Cc: Quentin Lambert Cc: Aleksandr Bezzubikov Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum drivers/pci/hotplug/shpchp_hpc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 34d773f6ca5b4b5b1961836b557d34314226aa23 Author: Kees Cook Date: Mon Oct 16 16:18:02 2017 -0700 PCI: cpqphp: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This has the result of fixing pushbutton_helper_thread(), which was truncating the event pointer to 32 bits. Signed-off-by: Kees Cook Signed-off-by: Bjorn Helgaas Cc: Ingo Molnar Cc: Arvind Yadav Cc: Quentin Lambert Cc: Aleksandr Bezzubikov Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum drivers/pci/hotplug/cpqphp.h | 2 +- drivers/pci/hotplug/cpqphp_core.c | 3 +-- drivers/pci/hotplug/cpqphp_ctrl.c | 19 ++++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) commit c4459a086748848b8a498282780f708c235a06a5 Author: Kees Cook Date: Wed Oct 4 17:53:48 2017 -0700 PCI: pciehp: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This fixes what appears to be a bug in passing the wrong pointer to the timer handler (address of ctrl pointer instead of ctrl pointer). Signed-off-by: Kees Cook Signed-off-by: Bjorn Helgaas Cc: Mika Westerberg Cc: Mayurkumar Patel Cc: Keith Busch Cc: Thomas Gleixner drivers/pci/hotplug/pciehp_hpc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 05196e258a617ee14dd3255c480cbc3f0caff5ce Author: Markus Elfring Date: Mon Oct 30 13:26:32 2017 +0100 PCI: ibmphp: Use common error handling code in unconfigure_boot_device() Combine two error paths that emit the same message and return the same error code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas drivers/pci/hotplug/ibmphp_pci.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit cc27b735ad3a75574a6ab1a66ed6b09385e77e5e Author: Sinan Kaya Date: Wed Oct 25 15:01:02 2017 -0400 PCI/portdrv: Turn off PCIe services during shutdown Some of the PCIe services such as AER are being left enabled during shutdown. This might cause spurious AER errors while SOC is being powered down. Clean up the PCIe services gracefully during shutdown to clear these false positives. Signed-off-by: Sinan Kaya Signed-off-by: Bjorn Helgaas drivers/pci/pcie/portdrv_pci.c | 1 + 1 file changed, 1 insertion(+) commit ba0e4d9917b43dfa746cbbcb4477da59aae73bd6 Author: Pablo Neira Ayuso Date: Mon Oct 9 19:52:28 2017 +0200 netfilter: nf_tables: get set elements via netlink This patch adds a new get operation to look up for specific elements in a set via netlink interface. You can also use it to check if an interval already exists. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 5 ++ net/netfilter/nf_tables_api.c | 184 ++++++++++++++++++++++++++------------ net/netfilter/nft_set_bitmap.c | 18 ++++ net/netfilter/nft_set_hash.c | 39 ++++++++ net/netfilter/nft_set_rbtree.c | 73 +++++++++++++++ 5 files changed, 264 insertions(+), 55 deletions(-) commit 644e334eeec01a25138b62ebd576b3a798183c7c Author: Pablo Neira Ayuso Date: Mon Nov 6 05:57:13 2017 +0100 netfilter: nf_tables: performance set policy skips size description in selection Use the complexity and space notations if policy is performance, this results in placing the bitmap set representation over the hashtable for key <= 16 for better performance as we discussed during the last NFWS in Faro, Portugal. Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 0984d427c1d3cb2aa882c9ad9e787ba973cf2915 Author: Vincent Guittot Date: Thu Nov 2 16:16:07 2017 +0100 netfilter: conntrack: use power efficient workqueue conntrack uses the bounded system_long_wq workqueue for its works that don't have to run on the cpu they have been queued. Using bounded workqueue prevents the scheduler to make smart decision about the best place to schedule the work. This patch replaces system_long_wq with system_power_efficient_wq. the work stays bounded to a cpu by default unless the CONFIG_WQ_POWER_EFFICIENT is enable. In the latter case, the work can be scheduled on the best cpu from a power or a performance point of view. Signed-off-by: Vincent Guittot Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 971e4aeeaa126b207d1e85eec6dc6e29bead316e Author: Pavel Machek Date: Sat Sep 23 22:13:14 2017 +0200 mtd: Fix C++ comment in include/linux/mtd/mtd.h C++ comments look wrong in kernel tree. Fix one. Signed-off-by: Pavel Machek Acked-by: Boris Brezillon Signed-off-by: Richard Weinberger include/linux/mtd/mtd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4906688d49150eb77ddc9baafc3ea14bc158f03 Author: Arvind Yadav Date: Mon Aug 28 13:54:57 2017 +0530 mtd: constify mtd_partition mtd_partition are not supposed to change at runtime. Functions 'mtd_device_parse_register' working with const mtd_partition provided by . So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Richard Weinberger drivers/mtd/devices/lart.c | 2 +- drivers/mtd/maps/cfi_flagadm.c | 2 +- drivers/mtd/maps/impa7.c | 2 +- drivers/mtd/maps/netsc520.c | 2 +- drivers/mtd/maps/nettel.c | 2 +- drivers/mtd/maps/sbc_gxx.c | 2 +- drivers/mtd/maps/ts5500_flash.c | 2 +- drivers/mtd/maps/uclinux.c | 2 +- drivers/mtd/nand/ams-delta.c | 2 +- drivers/mtd/nand/cmx270_nand.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) commit 2e442aebed99fd27eaa4e3539d9c50ef1cc67013 Author: Anton Vasilyev Date: Tue Aug 22 16:24:11 2017 +0300 mtd: plat-ram: Replace manual resource management by devm Driver contains unsuitable request_mem_region() and release_resource() calls. The patch switches manual resource management by devm interface for readability and error-free simplification. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Suggested-by: Boris Brezillon Signed-off-by: Richard Weinberger drivers/mtd/maps/plat-ram.c | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) commit 6a468d5990ecd1c2d07dd85f8633bbdd0ba61c40 Author: Josef Bacik Date: Mon Nov 6 16:11:58 2017 -0500 nbd: don't start req until after the dead connection logic We can end up sleeping for a while waiting for the dead timeout, which means we could get the per request timer to fire. We did handle this case, but if the dead timeout happened right after we submitted we'd either tear down the connection or possibly requeue as we're handling an error and race with the endio which can lead to panics and other hilarity. Fixes: 560bc4b39952 ("nbd: handle dead connections") Cc: stable@vger.kernel.org Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit ff57dc94faec023abc267cdc45766fccff497557 Author: Josef Bacik Date: Mon Nov 6 16:11:57 2017 -0500 nbd: wait uninterruptible for the dead timeout If we have a pending signal or the user kills their application then it'll bring down the whole device, which is less than awesome. Instead wait uninterruptible for the dead timeout so we're sure we gave it our best shot. Fixes: 560bc4b39952 ("nbd: handle dead connections") Cc: stable@vger.kernel.org Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3faee9423ce07186fc9dcec2981d4eb8af8872bb Author: Alan Mizrahi Date: Fri Nov 3 10:38:07 2017 +0900 leds: Add driver for PC Engines APU/APU2 LEDs This patch implements the driver to support the front panel LEDs for PC Engines APU and APU2 boards. Signed-off-by: Alan Mizrahi Signed-off-by: Jacek Anaszewski drivers/leds/Kconfig | 10 ++ drivers/leds/Makefile | 1 + drivers/leds/leds-apu.c | 278 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 289 insertions(+) commit 8dca4d96c7d8058e7c97daad9ae0a76569ea31e6 Author: Juergen Gross Date: Thu Nov 2 10:19:21 2017 +0100 xen: select grant interface version Grant v2 will be needed in cases where a frame number in the grant table can exceed 32 bits. For PV guests this is a host feature, while for HVM guests this is a guest feature. So select grant v2 in case frame numbers can be larger than 32 bits and grant v1 else. For testing purposes add a way to specify the grant interface version via a boot parameter. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/xen/grant-table.c | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) commit 223c8f3349f9ce52847dfa266b32761ac223b9ac Author: Juergen Gross Date: Thu Nov 2 10:19:20 2017 +0100 xen: update arch/x86/include/asm/xen/cpuid.h Update arch/x86/include/asm/xen/cpuid.h from the Xen tree to get newest definitions. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky arch/x86/include/asm/xen/cpuid.h | 42 ++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) commit 83c69324f43816f8259d1a361062a974f4bdb86d Author: Juergen Gross Date: Thu Nov 2 10:19:19 2017 +0100 xen: add grant interface version dependent constants to gnttab_ops Instead of having multiple variables with constants like grant_table_version or grefs_per_grant_frame add those to struct gnttab_ops and access them just via the gnttab_interface pointer. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/xen/grant-table.c | 73 ++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 30 deletions(-) commit 56c9c700c4399858e50971d98ac44b5842b06a87 Author: Juergen Gross Date: Thu Nov 2 10:19:18 2017 +0100 xen: limit grant v2 interface to the v1 functionality As there is currently no user for sub-page grants or transient grants remove that functionality. This at once makes it possible to switch from grant v2 to grant v1 without restrictions, as there is no loss of functionality other than the limited frame number width related to the switch. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/xen/grant-table.c | 150 ---------------------------------------------- include/xen/grant_table.h | 25 -------- 2 files changed, 175 deletions(-) commit b988b8ff072ab04abd62d10d3fe44ec544be8a7d Author: Juergen Gross Date: Thu Nov 2 10:19:17 2017 +0100 xen: re-introduce support for grant v2 interface The grant v2 support was removed from the kernel with commit 438b33c7145ca8a5131a30c36d8f59bce119a19a ("xen/grant-table: remove support for V2 tables") as the higher memory footprint of v2 grants resulted in less grants being possible for a kernel compared to the v1 grant interface. As machines with more than 16TB of memory are expected to be more common in the near future support of grant v2 is mandatory in order to be able to run a Xen pv domain at any memory location. So re-add grant v2 support basically by reverting above commit. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky arch/arm/xen/grant-table.c | 9 +- arch/x86/xen/grant-table.c | 60 ++++++++- drivers/xen/grant-table.c | 312 ++++++++++++++++++++++++++++++++++++++++++++- include/xen/grant_table.h | 30 ++++- 4 files changed, 398 insertions(+), 13 deletions(-) commit 5ea22086ed42bef8dde93f45a42a3ace486eb788 Author: Kees Cook Date: Wed Aug 30 14:53:24 2017 -0700 block/aoe: discover_timer: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This refactors the discover_timer to remove the needless locking and state machine used for synchronizing timer death. Using del_timer_sync() will already do the right thing. Cc: Jens Axboe Cc: "Ed L. Cashin" Cc: Thomas Gleixner Signed-off-by: Kees Cook drivers/block/aoe/aoemain.c | 44 ++++++++------------------------------------ 1 file changed, 8 insertions(+), 36 deletions(-) commit 10738ba8e02bc8cb1c4e832611621aa9666f4a24 Author: Kees Cook Date: Tue Oct 17 21:06:32 2017 -0700 ide: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: linux-ide@vger.kernel.org Signed-off-by: Kees Cook drivers/ide/ide-io.c | 4 ++-- drivers/ide/ide-probe.c | 2 +- include/linux/ide.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 2bccef39c0d94b9ee428ae777c59cef1fced786c Author: Kees Cook Date: Tue Oct 17 20:33:01 2017 -0700 drbd: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Philipp Reisner Cc: Lars Ellenberg Cc: drbd-dev@lists.linbit.com Signed-off-by: Kees Cook drivers/block/drbd/drbd_int.h | 4 ++-- drivers/block/drbd/drbd_main.c | 18 +++++++----------- drivers/block/drbd/drbd_receiver.c | 2 +- drivers/block/drbd/drbd_req.c | 4 ++-- drivers/block/drbd/drbd_req.h | 2 +- drivers/block/drbd/drbd_worker.c | 8 ++++---- 6 files changed, 17 insertions(+), 21 deletions(-) commit c6f15047dd8681f1a6387b044188ef028306c4bf Author: Kees Cook Date: Sun Oct 22 16:08:43 2017 -0700 mailbox: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Ley Foon Tan Cc: Jassi Brar Cc: nios2-dev@lists.rocketboards.org Signed-off-by: Kees Cook drivers/mailbox/mailbox-altera.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f34d8d506eeff1375f0b3533839ce0b77b748437 Author: Kees Cook Date: Thu Oct 19 16:43:19 2017 -0700 crypto: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jesper Nilsson Cc: Lars Persson Cc: Niklas Cassel Cc: Herbert Xu Cc: "David S. Miller" Cc: Jamie Iles Cc: linux-arm-kernel@axis.com Cc: linux-crypto@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Kees Cook Acked-by: Jamie Iles Acked-by: Lars Persson # for axis drivers/crypto/axis/artpec6_crypto.c | 6 +++--- drivers/crypto/mv_cesa.c | 4 ++-- drivers/crypto/picoxcell_crypto.c | 7 +++---- 3 files changed, 8 insertions(+), 9 deletions(-) commit 439dc05fbfdbcf01995f4941ac597b8668e00ec3 Author: Kees Cook Date: Sat Nov 4 19:32:31 2017 -0700 drivers/pcmcia: omap1: Fix error in automated timer conversion One part of automated timer conversion tools did not take into account void * variables when searching out prior direct timer callback usage, which resulted in an attempt to dereference the timer field without a proper type. Reported-by: kbuild test robot Signed-off-by: Kees Cook drivers/pcmcia/omap_cf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 14c8276d3bdfbadb033e3aaca6ac39781f20e44d Author: Kees Cook Date: Fri Nov 3 13:33:23 2017 -0700 ARM: footbridge: Fix typo in timer conversion This fixes a missing semi-colon. It went unnoticed initially since it is only built under certain defconfigs. Reported-by: kbuild test robot Signed-off-by: Kees Cook arch/arm/mach-footbridge/dc21285.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f2e673405b742be64e7c3604ed4ed3ac14f35ce Author: Roman Gushchin Date: Mon Nov 6 13:30:29 2017 -0500 cgroup: export list of cgroups v2 features using sysfs The active development of cgroups v2 sometimes leads to a creation of interfaces, which are not turned on by default (to provide backward compatibility). It's handy to know from userspace, which cgroup v2 features are supported without calculating it based on the kernel version. So, let's export the list of such features using /sys/kernel/cgroup/features pseudo-file. The list is hardcoded and has to be extended when new functionality is added. Each feature is printed on a new line. Example: $ cat /sys/kernel/cgroup/features nsdelegate Signed-off-by: Roman Gushchin Cc: Tejun Heo Cc: kernel-team@fb.com Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 01ee6cfb1483fe57c9cbd8e73817dfbf9bacffd3 Author: Roman Gushchin Date: Mon Nov 6 13:30:28 2017 -0500 cgroup: export list of delegatable control files using sysfs Delegatable cgroup v2 control files may require special handling (e.g. chowning), and the exact list of such files varies between kernel versions (and likely to be extended in the future). To guarantee correctness of this list and simplify the life of userspace (systemd, first of all), let's export the list via /sys/kernel/cgroup/delegate pseudo-file. Format is siple: each control file name is printed on a new line. Example: $ cat /sys/kernel/cgroup/delegate cgroup.procs cgroup.subtree_control Signed-off-by: Roman Gushchin Cc: Tejun Heo Cc: kernel-team@fb.com Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 181fdfe662716450ce64be4134157d7152e6402e Author: Christoph Hellwig Date: Mon Nov 6 11:54:02 2017 -0800 xfs: mark xlog_verify_dest_ptr STATIC We already did it in the forward declaration, but not for the function body itself. Signed-off-by: Christoph Hellwig 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 e89fbb5ee1893f3cf5fad6a12e1f9e37b91cf69d Author: Christoph Hellwig Date: Mon Nov 6 11:54:01 2017 -0800 xfs: mark xlog_recover_check_summary STATIC We already did it in the forward declaration, but not for the function body itself. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_recover.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4483eb566b2c045f69f2fa01629aca7772cdf95e Author: Christoph Hellwig Date: Mon Nov 6 11:54:01 2017 -0800 xfs: mark xfs_btree_check_lblock and xfs_btree_check_ptr static Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_btree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a61a2c8683a28cb34ce24f054a07c6da4637cdc6 Author: Christoph Hellwig Date: Mon Nov 6 11:54:00 2017 -0800 xfs: remove unreachable error injection code in xfs_qm_dqget Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_dquot.c | 17 ----------------- 1 file changed, 17 deletions(-) commit afd72454e1a845e1b2f1f6b654b8d12fbc5d6099 Author: Christoph Hellwig Date: Mon Nov 6 11:54:00 2017 -0800 xfs: remove unused debug counts for xfs_lock_inodes Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_inode.c | 21 --------------------- 1 file changed, 21 deletions(-) commit 4371155e8040b6bbfe0c20101a55fae7cafc2461 Author: Christoph Hellwig Date: Mon Nov 6 11:53:59 2017 -0800 xfs: mark xfs_errortag_ktype static Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88aa5de46ba4eecbed2cea7e74fa8ef7bea12c87 Author: Christoph Hellwig Date: Mon Nov 6 11:53:58 2017 -0800 xfs: trivial sparse fixes for the new scrub code [darrick: fix broken initializer in xfs_scrub_xattr] Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/scrub/attr.c | 4 ++-- fs/xfs/scrub/bmap.c | 2 +- fs/xfs/scrub/btree.c | 2 +- fs/xfs/scrub/dir.c | 2 +- fs/xfs/scrub/scrub.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit fc41e2a1931041b04e0f3230effd1c7a9364c8fc Author: Christoph Hellwig Date: Mon Nov 6 11:53:58 2017 -0800 xfs: always define STATIC to static noinline Ever since we added the noinline tag there is no good reason to define away the static for debug builds - we'll get just as good debug information with our without it, so don't mess up sparse and other checkers due to it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs.h | 1 - fs/xfs/xfs_linux.h | 14 ++------------ 2 files changed, 2 insertions(+), 13 deletions(-) commit 866d7826c966d0d17cb31eaf394728a163ad7227 Author: Christoph Hellwig Date: Fri Nov 3 10:34:47 2017 -0700 xfs: move xfs_bmbt_irec and xfs_exntst_t to xfs_types.h Neither defines an on-disk format, so move them out of xfs_format.h. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_format.h | 18 ------------------ fs/xfs/libxfs/xfs_types.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 18 deletions(-) commit dac9c9b137950421a87c1d9ba29f3a6ee54d0e8a Author: Christoph Hellwig Date: Fri Nov 3 10:34:47 2017 -0700 xfs: pass struct xfs_bmbt_irec to xfs_bmbt_validate_extent This removed an unaligned load per extent, as well as the manual poking into the on-disk extent format. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 4 ++-- fs/xfs/libxfs/xfs_bmap_btree.h | 4 ++-- fs/xfs/libxfs/xfs_inode_fork.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) commit c38ccf599022e7454a861145ce1a94c5b5d7e658 Author: Christoph Hellwig Date: Fri Nov 3 10:34:47 2017 -0700 xfs: remove the nr_extents argument to xfs_iext_remove We only have two places that remove 2 extents at the same time, so unroll the loop there. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 26 ++++++++++++++------------ fs/xfs/libxfs/xfs_iext_tree.c | 30 ++++++++---------------------- fs/xfs/libxfs/xfs_inode_fork.h | 2 +- 3 files changed, 23 insertions(+), 35 deletions(-) commit 0254c2f253d6fe11ea2ce5046ed6acfddbe4ee17 Author: Christoph Hellwig Date: Fri Nov 3 10:34:46 2017 -0700 xfs: remove the nr_extents argument to xfs_iext_insert We only have two places that insert 2 extents at the same time, so unroll the loop there. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 31 ++++++++++++++++--------------- fs/xfs/libxfs/xfs_iext_tree.c | 31 ++++++++----------------------- fs/xfs/libxfs/xfs_inode_fork.c | 2 +- fs/xfs/libxfs/xfs_inode_fork.h | 2 +- 4 files changed, 26 insertions(+), 40 deletions(-) commit 6bdcf26ade8825ffcdc692338e715cd7ed0820d8 Author: Christoph Hellwig Date: Fri Nov 3 10:34:46 2017 -0700 xfs: use a b+tree for the in-core extent list Replace the current linear list and the indirection array for the in-core extent list with a b+tree to avoid the need for larger memory allocations for the indirection array when lots of extents are present. The current extent list implementations leads to heavy pressure on the memory allocator when modifying files with a high extent count, and can lead to high latencies because of that. The replacement is a b+tree with a few quirks. The leaf nodes directly store the extent record in two u64 values. The encoding is a little bit different from the existing in-core extent records so that the start offset and length which are required for lookups can be retreived with simple mask operations. The inner nodes store a 64-bit key containing the start offset in the first half of the node, and the pointers to the next lower level in the second half. In either case we walk the node from the beginninig to the end and do a linear search, as that is more efficient for the low number of cache lines touched during a search (2 for the inner nodes, 4 for the leaf nodes) than a binary search. We store termination markers (zero length for the leaf nodes, an otherwise impossible high bit for the inner nodes) to terminate the key list / records instead of storing a count to use the available cache lines as efficiently as possible. One quirk of the algorithm is that while we normally split a node half and half like usual btree implementations we just spill over entries added at the very end of the list to a new node on its own. This means we get a 100% fill grade for the common cases of bulk insertion when reading an inode into memory, and when only sequentially appending to a file. The downside is a slightly higher chance of splits on the first random insertions. Both insert and removal manually recurse into the lower levels, but the bulk deletion of the whole tree is still implemented as a recursive function call, although one limited by the overall depth and with very little stack usage in every iteration. For the first few extents we dynamically grow the list from a single extent to the next powers of two until we have a first full leaf block and that building the actual tree. The code started out based on the generic lib/btree.c code from Joern Engel based on earlier work from Peter Zijlstra, but has since been rewritten beyond recognition. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_bmap.c | 20 +- fs/xfs/libxfs/xfs_bmap_btree.c | 103 +--- fs/xfs/libxfs/xfs_bmap_btree.h | 7 +- fs/xfs/libxfs/xfs_format.h | 4 - fs/xfs/libxfs/xfs_iext_tree.c | 1035 ++++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_inode_fork.c | 1035 +--------------------------------------- fs/xfs/libxfs/xfs_inode_fork.h | 84 +--- fs/xfs/libxfs/xfs_types.h | 3 +- fs/xfs/scrub/bmap.c | 5 +- fs/xfs/xfs_inode.c | 2 +- fs/xfs/xfs_inode_item.c | 2 - fs/xfs/xfs_trace.h | 51 +- 13 files changed, 1093 insertions(+), 1259 deletions(-) commit 135dcc10d6ebf6184686042ec8b098e376252fff Author: Christoph Hellwig Date: Fri Nov 3 10:34:45 2017 -0700 xfs: allow unaligned extent records in xfs_bmbt_disk_set_all To make life a little simpler make xfs_bmbt_set_all unaligned access aware so that we can use it directly on the destination buffer. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap_btree.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 43518812d297179ae1e432d5cd640ec168596283 Author: Christoph Hellwig Date: Fri Nov 3 10:34:45 2017 -0700 xfs: remove support for inlining data/extents into the inode fork Supporting a small bit of data inside the inode fork blows up the fork size a lot, removing the 32 bytes of inline data halves the effective size of the inode fork (and it still has a lot of unused padding left), and the performance of a single kmalloc doesn't show up compared to the size to read an inode or create one. It also simplifies the fork management code a lot. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_inode_fork.c | 185 +++-------------------------------------- fs/xfs/libxfs/xfs_inode_fork.h | 11 --- fs/xfs/xfs_bmap_util.c | 15 ---- 3 files changed, 13 insertions(+), 198 deletions(-) commit b121459c7a56d2fb5a8ca6727bf9f87982738b01 Author: Christoph Hellwig Date: Fri Nov 3 10:34:44 2017 -0700 xfs: simplify xfs_reflink_convert_cow Instead of looking up extents to convert and calling xfs_bmapi_write on each of them just let xfs_bmapi_write handle the full range. To make this robust add a new XFS_BMAPI_CONVERT_ONLY that only converts ranges and never allocates blocks. [darrick: shorten the stringified CONVERT_ONLY trace flag] Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 3 ++- fs/xfs/libxfs/xfs_bmap.h | 6 +++++- fs/xfs/xfs_reflink.c | 29 +++++++++++------------------ 3 files changed, 18 insertions(+), 20 deletions(-) commit 41caabd0ab997bcfa9a4822fac32c0803f1cc3df Author: Christoph Hellwig Date: Fri Nov 3 10:34:44 2017 -0700 xfs: iterate backwards in xfs_reflink_cancel_cow_blocks Match the iteration order for extent deletion in the truncate and reflink I/O completion path. This also happens to make implementing the new incore extent list a lot easier. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_reflink.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit b2b1712a640824e7c131bfdd2585d57bf8ccb39a Author: Christoph Hellwig Date: Fri Nov 3 10:34:43 2017 -0700 xfs: introduce the xfs_iext_cursor abstraction Add a new xfs_iext_cursor structure to hide the direct extent map index manipulations. In addition to the existing lookup/get/insert/ remove and update routines new primitives to get the first and last extent cursor, as well as moving up and down by one extent are provided. Also new are convenience to increment/decrement the cursor and retreive the new extent, as well as to peek into the previous/next extent without updating the cursor and last but not least a macro to iterate over all extents in a fork. [darrick: rename for_each_iext to for_each_xfs_iext] Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 441 ++++++++++++++++++++--------------------- fs/xfs/libxfs/xfs_bmap.h | 12 +- fs/xfs/libxfs/xfs_inode_fork.c | 75 +++---- fs/xfs/libxfs/xfs_inode_fork.h | 87 +++++++- fs/xfs/libxfs/xfs_types.h | 3 + fs/xfs/scrub/bmap.c | 6 +- fs/xfs/scrub/dir.c | 14 +- fs/xfs/xfs_bmap_util.c | 12 +- fs/xfs/xfs_dir2_readdir.c | 8 +- fs/xfs/xfs_dquot.c | 4 +- fs/xfs/xfs_iomap.c | 14 +- fs/xfs/xfs_reflink.c | 56 +++--- fs/xfs/xfs_trace.h | 12 +- 13 files changed, 407 insertions(+), 337 deletions(-) commit 906abed501bf5a2103946deb7a4a40b31c56f027 Author: Christoph Hellwig Date: Fri Nov 3 10:34:43 2017 -0700 xfs: iterate over extents in xfs_bmap_extents_to_btree This actually makes the function very slightly less efficient for now as we detour through the expanded irect format between the in-core extent format and the on-disk one instead of just endian swapping them. But with the incore extent btree the in-core one will use a different format and the representation will be entirely hidden. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 71565f4b92048321ba3078877dd1a1149a23550d Author: Christoph Hellwig Date: Fri Nov 3 10:34:42 2017 -0700 xfs: iterate over extents in xfs_iextents_copy This actually makes the function very slightly less efficient for now as we detour through the expanded irect format between the in-core extent format and the on-disk one instead of just endian swapping them. But with the incore extent btree the in-core one will use a different format and the representation will be entirely hidden. It also happens to make the function a whole more readable. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_inode_fork.c | 53 +++++++++++------------------------------- 1 file changed, 13 insertions(+), 40 deletions(-) commit f36bc228e1b94d9994915cba67588104ebe763ae Author: Christoph Hellwig Date: Fri Nov 3 10:34:42 2017 -0700 xfs: pass an on-disk extent to xfs_bmbt_validate_extent This prepares for getting rid of the current in-memory extent format. At the end of the series we will change the calling convention again to pass the xfs_bmbt_irec structure once it is available everywhere. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 6 +++--- fs/xfs/libxfs/xfs_bmap_btree.h | 4 ++-- fs/xfs/libxfs/xfs_inode_fork.c | 9 ++++----- 3 files changed, 9 insertions(+), 10 deletions(-) commit 42630361003461edd7607c1d459ab9d66ef97813 Author: Christoph Hellwig Date: Fri Nov 3 10:34:41 2017 -0700 xfs: treat idx as a cursor in xfs_bmap_collapse_extents Stop poking before and after the index and just increment or decrement it while doing our operations on it to prepare for a new extent list implementation. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 657fcb23362c9e8a72593b3e4755135f003a7a74 Author: Christoph Hellwig Date: Fri Nov 3 10:34:41 2017 -0700 xfs: treat idx as a cursor in xfs_bmap_del_extent_* Stop poking before and after the index and just increment or decrement it while doing our operations on it to prepare for a new extent list implementation. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a681847796df31c036810bce97003f687e1db5f4 Author: Christoph Hellwig Date: Fri Nov 3 10:34:40 2017 -0700 xfs: treat idx as a cursor in xfs_bmap_add_extent_unwritten_real Stop poking before and after the index and just increment or decrement it while doing our operations on it to prepare for a new extent list implementation. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 1d2e0089e16642928c76f032c1dbd0eb6da22935 Author: Christoph Hellwig Date: Fri Nov 3 10:34:40 2017 -0700 xfs: treat idx as a cursor in xfs_bmap_add_extent_hole_real Stop poking before and after the index and just increment or decrement it while doing our operations on it to prepare for a new extent list implementation. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 41d196f439509fd8b09364ca1ba48194cccc6d6e Author: Christoph Hellwig Date: Fri Nov 3 10:34:39 2017 -0700 xfs: treat idx as a cursor in xfs_bmap_add_extent_hole_delay Stop poking before and after the index and just increment or decrement it while doing our operations on it to prepare for a new extent list implementation. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 0d045540ed57e68b9ddcf5c325279a7e5ede7bbf Author: Christoph Hellwig Date: Fri Nov 3 10:34:39 2017 -0700 xfs: treat idx as a cursor in xfs_bmap_add_extent_delay_real Stop poking before and after the index and just increment or decrement it while doing our operations on it to prepare for a new extent list implementation. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit bf99971c8200fcb3e16d880194f5d559aca09576 Author: Christoph Hellwig Date: Fri Nov 3 10:34:38 2017 -0700 xfs: remove a duplicate assignment in xfs_bmap_add_extent_delay_real Reported-by: Brian Foster Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bfd7618cbf2de630c845f60f5370671c2cd1c5d Author: Christoph Hellwig Date: Fri Nov 3 10:34:38 2017 -0700 xfs: don't create overlapping extents in xfs_bmap_add_extent_delay_real Two cases in xfs_bmap_add_extent_delay_real currently insert a new extent before updating the existing one that is being split. While this works fine with a simple extent list, a more complex tree can't easily cope with overlapping extent. Reshuffle the code a bit to update the slot of the existing delalloc extent to the new real extent before inserting the shortened delalloc extent before or after it. This avoids the overlapping extents while still allowing to update the br_startblock field of the delalloc extent with the updated indirect block reservation. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 92d44128241f8aa129cf2f3672786a1b52053510 Author: Vineet Gupta Date: Mon Nov 6 10:55:51 2017 -0800 ARCv2: Accomodate HS48 MMUv5 by relaxing MMU ver checking HS48 cpus will have a new MMUv5, although Linux is currently not explicitly supporting the newer features (so remains at V4). The existing software/hardware version check is very tight and causes boot abort. Given that the MMUv5 hardware is backwards compatible, relax the boot check to allow current kernel support level to work with new hardware. Also while at it, move the ancient MMU related code to under ARCompact builds as baseline MMU for HS cpus is v4. Signed-off-by: Vineet Gupta arch/arc/mm/tlb.c | 57 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 24 deletions(-) commit 94e2cc4dba39efbb63e84cd4f7243627c16ceac5 Author: Sebastian Andrzej Siewior Date: Thu Sep 21 17:21:40 2017 +0200 iommu/iova: Use raw_cpu_ptr() instead of get_cpu_ptr() for ->fq get_cpu_ptr() disabled preemption and returns the ->fq object of the current CPU. raw_cpu_ptr() does the same except that it not disable preemption which means the scheduler can move it to another CPU after it obtained the per-CPU object. In this case this is not bad because the data structure itself is protected with a spin_lock. This change shouldn't matter however on RT it does because the sleeping lock can't be accessed with disabled preemption. Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org Reported-by: vinadhy@gmail.com Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Alex Williamson drivers/iommu/iova.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0695a3c744d851cc75d19cea9e63bc2f7dde836f Author: Jeff Layton Date: Mon Oct 30 11:01:31 2017 -0400 ecryptfs: remove unnecessary i_version bump There is no need to bump the i_version counter here, as ecryptfs does not set the SB_I_VERSION flag, and doesn't use it internally. It also only bumps it when the inode is instantiated, which doesn't make much sense. Signed-off-by: Jeff Layton Signed-off-by: Tyler Hicks fs/ecryptfs/inode.c | 1 - 1 file changed, 1 deletion(-) commit 02f9876ebb5e9cd31013c62b8839508b2dc152f0 Author: Jérémy Lefaure Date: Sun Oct 1 15:30:46 2017 -0400 ecryptfs: use ARRAY_SIZE Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure Signed-off-by: Tyler Hicks fs/ecryptfs/crypto.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 5032f360dd31e6cf59aadad0478df1244bfd30f8 Author: Markus Elfring Date: Sat Aug 19 18:00:22 2017 +0200 ecryptfs: Adjust four checks for null pointers The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Tyler Hicks fs/ecryptfs/crypto.c | 6 +++--- fs/ecryptfs/keystore.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit a463ce5bbd99fef6e1012cebe7b6764794ec07d8 Author: Markus Elfring Date: Sat Aug 19 17:51:53 2017 +0200 ecryptfs: Return an error code only as a constant in ecryptfs_add_global_auth_tok() * Return an error code without storing it in an intermediate variable. * Delete the jump target "out" and the local variable "rc" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Signed-off-by: Tyler Hicks fs/ecryptfs/keystore.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 1a0bba4ff086d73a88f9dbadaf4831aefce55f27 Author: Markus Elfring Date: Sat Aug 19 17:37:30 2017 +0200 ecryptfs: Delete 21 error messages for a failed memory allocation Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Tyler Hicks fs/ecryptfs/crypto.c | 16 ---------------- fs/ecryptfs/inode.c | 3 --- fs/ecryptfs/keystore.c | 33 ++++++--------------------------- fs/ecryptfs/messaging.c | 6 ------ fs/ecryptfs/miscdev.c | 6 +----- fs/ecryptfs/mmap.c | 2 -- 6 files changed, 7 insertions(+), 59 deletions(-) commit db86be3a12d0b6e5c5b51c2ab2a48f06329cb590 Author: Dan Carpenter Date: Tue Aug 22 23:41:28 2017 +0300 eCryptfs: use after free in ecryptfs_release_messaging() We're freeing the list iterator so we should be using the _safe() version of hlist_for_each_entry(). Fixes: 88b4a07e6610 ("[PATCH] eCryptfs: Public key transport mechanism") Signed-off-by: Dan Carpenter Cc: Signed-off-by: Tyler Hicks fs/ecryptfs/messaging.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit edd20e95bca4a5434f264d8ab40d729761479825 Author: Joel Stanley Date: Wed Nov 1 10:53:30 2017 +1030 i2c: aspeed: Deassert reset in probe In order to use i2c from a cold boot, the i2c peripheral must be taken out of reset. We request a shared reset controller each time a bus driver is loaded, as the reset is shared between the 14 i2c buses. On remove the reset is asserted, which only touches the hardware once the last i2c bus is removed. The reset is required as the I2C buses will not work without releasing the reset. Previously the driver only worked with out of tree hacks that released this reset before the driver was loaded. Update the device tree bindings to reflect this. Signed-off-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-aspeed.txt | 7 +++++-- drivers/i2c/busses/i2c-aspeed.c | 12 ++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) commit 395df08d2e1de238a9c8c33fdcd0e2160efd63a9 Author: Matthias Brugger Date: Mon Oct 30 12:37:55 2017 +0100 iommu/mediatek: Fix driver name There exist two Mediatek iommu drivers for the two different generations of the device. But both drivers have the same name "mtk-iommu". This breaks the registration of the second driver: Error: Driver 'mtk-iommu' is already registered, aborting... Fix this by changing the name for first generation to "mtk-iommu-v1". Fixes: b17336c55d89 ("iommu/mediatek: add support for mtk iommu generation one HW") Signed-off-by: Matthias Brugger Signed-off-by: Alex Williamson drivers/iommu/mtk_iommu_v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58b8e8bf409236cdea379b8a3ab5d7b85a003d22 Author: Magnus Damm Date: Mon Oct 16 21:30:50 2017 +0900 iommu/ipmmu-vmsa: Hook up r8a7795 DT matching code Tie in r8a7795 features and update the IOMMU_OF_DECLARE compat string to include the updated compat string. Signed-off-by: Magnus Damm Signed-off-by: Alex Williamson drivers/iommu/ipmmu-vmsa.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit c295f504fb5a38abbb4094e687ee333a75613a0c Author: Magnus Damm Date: Mon Oct 16 21:30:39 2017 +0900 iommu/ipmmu-vmsa: Allow two bit SL0 Introduce support for two bit SL0 bitfield in IMTTBCR by using a separate feature flag. Signed-off-by: Magnus Damm Signed-off-by: Alex Williamson drivers/iommu/ipmmu-vmsa.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit f5c858912acd2b17059ebe6f34abac183bdfbf80 Author: Magnus Damm Date: Mon Oct 16 21:30:28 2017 +0900 iommu/ipmmu-vmsa: Make IMBUSCTR setup optional Introduce a feature to allow opt-out of setting up IMBUSCR. The default case is unchanged. Signed-off-by: Magnus Damm Signed-off-by: Alex Williamson drivers/iommu/ipmmu-vmsa.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit d574893aee991efa67fefa849347c49de5df8108 Author: Magnus Damm Date: Mon Oct 16 21:30:18 2017 +0900 iommu/ipmmu-vmsa: Write IMCTR twice Write IMCTR both in the root device and the leaf node. To allow access of IMCTR introduce the following function: - ipmmu_ctx_write_all() While at it also rename context functions: - ipmmu_ctx_read() -> ipmmu_ctx_read_root() - ipmmu_ctx_write() -> ipmmu_ctx_write_root() Signed-off-by: Magnus Damm Signed-off-by: Alex Williamson drivers/iommu/ipmmu-vmsa.c | 56 +++++++++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 21 deletions(-) commit 1c894225bf5b1cdffac0c6ef935b61273203d7d5 Author: Magnus Damm Date: Mon Oct 16 21:30:07 2017 +0900 iommu/ipmmu-vmsa: IPMMU device is 40-bit bus master The r8a7795 IPMMU supports 40-bit bus mastering. Both the coherent DMA mask and the streaming DMA mask are set to unlock the 40-bit address space for coherent allocations and streaming operations. Signed-off-by: Magnus Damm Signed-off-by: Alex Williamson drivers/iommu/ipmmu-vmsa.c | 1 + 1 file changed, 1 insertion(+) commit cda52fcd999f389c6f24f079910a62e53912d411 Author: Magnus Damm Date: Mon Oct 16 21:29:57 2017 +0900 iommu/ipmmu-vmsa: Make use of IOMMU_OF_DECLARE() Hook up IOMMU_OF_DECLARE() support in case CONFIG_IOMMU_DMA is enabled. The only current supported case for 32-bit ARM is disabled, however for 64-bit ARM usage of OF is required. Signed-off-by: Magnus Damm Signed-off-by: Alex Williamson drivers/iommu/ipmmu-vmsa.c | 50 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 9 deletions(-) commit 5fd163416fb7b6592521c39f867d5ae6360e7924 Author: Magnus Damm Date: Mon Oct 16 21:29:46 2017 +0900 iommu/ipmmu-vmsa: Enable multi context support Add support for up to 8 contexts. Each context is mapped to one domain. One domain is assigned one or more slave devices. Contexts are allocated dynamically and slave devices are grouped together based on which IPMMU device they are connected to. This makes slave devices tied to the same IPMMU device share the same IOVA space. Signed-off-by: Magnus Damm Signed-off-by: Alex Williamson drivers/iommu/ipmmu-vmsa.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit fd5140e29a59e04a6c3e8cc56536bda3e60bbf49 Author: Magnus Damm Date: Mon Oct 16 21:29:36 2017 +0900 iommu/ipmmu-vmsa: Add optional root device feature Add root device handling to the IPMMU driver by allowing certain DT compat strings to enable has_cache_leaf_nodes that in turn will support both root devices with interrupts and leaf devices that face the actual IPMMU consumer devices. Signed-off-by: Magnus Damm Signed-off-by: Alex Williamson drivers/iommu/ipmmu-vmsa.c | 90 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 73 insertions(+), 17 deletions(-) commit 33f3ac9b511612153bae1d328b0c84c0367cd08d Author: Magnus Damm Date: Mon Oct 16 21:29:25 2017 +0900 iommu/ipmmu-vmsa: Introduce features, break out alias Introduce struct ipmmu_features to track various hardware and software implementation changes inside the driver for different kinds of IPMMU hardware. Add use_ns_alias_offset as a first example of a feature to control if the secure register bank offset should be used or not. Signed-off-by: Magnus Damm Signed-off-by: Alex Williamson drivers/iommu/ipmmu-vmsa.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 49c875f030523d676a508e53f7dc3e592e9439d7 Author: Robin Murphy Date: Fri Oct 13 19:23:42 2017 +0100 iommu/ipmmu-vmsa: Unify ipmmu_ops The remaining difference between the ARM-specific and iommu-dma ops is in the {add,remove}_device implementations, but even those have some overlap and duplication. By stubbing out the few arm_iommu_*() calls, we can get rid of the rest of the inline #ifdeffery to both simplify the code and improve build coverage. Signed-off-by: Robin Murphy Signed-off-by: Alex Williamson drivers/iommu/ipmmu-vmsa.c | 69 +++++++++++++--------------------------------- 1 file changed, 19 insertions(+), 50 deletions(-) commit e4efe4a9a2ace658a36b5a4f515c11d4d36400a8 Author: Robin Murphy Date: Fri Oct 13 19:23:41 2017 +0100 iommu/ipmmu-vmsa: Clean up struct ipmmu_vmsa_iommu_priv Now that the IPMMU instance pointer is the only thing remaining in the private data structure, we no longer need the extra level of indirection and can simply stash that directlty in the fwspec. Signed-off-by: Robin Murphy Signed-off-by: Alex Williamson drivers/iommu/ipmmu-vmsa.c | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) commit b354c73edc7eb8d6ee643866e9e4de7842213b06 Author: Robin Murphy Date: Fri Oct 13 19:23:40 2017 +0100 iommu/ipmmu-vmsa: Simplify group allocation We go through quite the merry dance in order to find masters behind the same IPMMU instance, so that we can ensure they are grouped together. None of which is really necessary, since the master's private data already points to the particular IPMMU it is associated with, and that IPMMU instance data is the perfect place to keep track of a per-instance group directly. Signed-off-by: Robin Murphy Signed-off-by: Alex Williamson drivers/iommu/ipmmu-vmsa.c | 53 ++++++++-------------------------------------- 1 file changed, 9 insertions(+), 44 deletions(-) commit 1c7e7c0278df968221a5edb1a293423e13b13814 Author: Robin Murphy Date: Fri Oct 13 19:23:39 2017 +0100 iommu/ipmmu-vmsa: Unify domain alloc/free We have two implementations for ipmmu_ops->alloc depending on CONFIG_IOMMU_DMA, the difference being whether they accept the IOMMU_DOMAIN_DMA type or not. However, iommu_dma_get_cookie() is guaranteed to return an error when !CONFIG_IOMMU_DMA, so if ipmmu_domain_alloc_dma() was actually checking and handling the return value correctly, it would behave the same as ipmmu_domain_alloc() anyway. Similarly for freeing; iommu_put_dma_cookie() is robust by design. Signed-off-by: Robin Murphy Signed-off-by: Alex Williamson drivers/iommu/ipmmu-vmsa.c | 65 +++++++++++++++++----------------------------- 1 file changed, 24 insertions(+), 41 deletions(-) commit 105a004e2187609a74f75d55fd0f9a054b49d60a Author: weiyongjun (A) Date: Tue Oct 17 12:11:22 2017 +0000 iommu/ipmmu-vmsa: Fix return value check in ipmmu_find_group_dma() In case of error, the function iommu_group_get() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 3ae47292024f ("iommu/ipmmu-vmsa: Add new IOMMU_DOMAIN_DMA ops") Signed-off-by: Wei Yongjun Signed-off-by: Alex Williamson drivers/iommu/ipmmu-vmsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a2e373438f72391493a4425efc1b82030b6b4fd5 Author: Gustavo A. R. Silva Date: Sat Nov 4 23:52:54 2017 -0500 thunderbolt: tb: fix use after free in tb_activate_pcie_devices Add a ̣̣continue statement in order to avoid using a previously free'd pointer tunnel in list_add. Addresses-Coverity-ID: 1415336 Fixes: 9d3cce0b6136 ("thunderbolt: Introduce thunderbolt bus and connection manager") Signed-off-by: Gustavo A. R. Silva Acked-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman drivers/thunderbolt/tb.c | 1 + 1 file changed, 1 insertion(+) commit cc5284142268bbcb70cafdf110d6cf4c4f9714e5 Author: Mika Westerberg Date: Mon Nov 6 20:12:55 2017 +0300 MAINTAINERS: Add git tree for Thunderbolt development I will be gathering Thunderbolt related patches to this git tree with help of other Thunderbolt maintainers. Signed-off-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit b2c9a85dd75a8cfa18da94b19e84eb0199011187 Author: Marc Zyngier Date: Fri Oct 27 15:28:34 2017 +0100 KVM: arm/arm64: vgic: Move kvm_vgic_destroy call around The way we call kvm_vgic_destroy is a bit bizarre. We call it *after* having freed the vcpus, which sort of defeats the point of cleaning up things before that point. Let's move kvm_vgic_destroy towards the beginning of kvm_arch_destroy_vm, which seems more sensible. Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/arm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7129a9d8a6f352e93647264a495281f789a87aa0 Author: Marc Zyngier Date: Fri Oct 27 15:28:33 2017 +0100 KVM: arm: Select ARM_GIC_V3 and ARM_GIC_V3_ITS The GICv4 support introduces a hard dependency between the KVM core and the ITS infrastructure. arm64 already selects it at the architecture level, but 32bit doesn't. In order to avoid littering the kernel with #ifdefs, let's just select the whole of the GICv3 suport code. You know you want it. Acked-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 47bbd31f740c4e693d01766f367ad3366fb49a6d Author: Eric Auger Date: Fri Oct 27 15:28:32 2017 +0100 KVM: arm/arm64: vgic: restructure kvm_vgic_(un)map_phys_irq We want to reuse the core of the map/unmap functions for IRQ forwarding. Let's move the computation of the hwirq in kvm_vgic_map_phys_irq and pass the linux IRQ as parameter. the host_irq is added to struct vgic_irq. We introduce kvm_vgic_map/unmap_irq which take a struct vgic_irq handle as a parameter. Acked-by: Christoffer Dall Signed-off-by: Eric Auger Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall include/kvm/arm_vgic.h | 8 ++++--- virt/kvm/arm/arch_timer.c | 24 +------------------ virt/kvm/arm/vgic/vgic.c | 60 +++++++++++++++++++++++++++++++++++------------ 3 files changed, 51 insertions(+), 41 deletions(-) commit 2412405b3141cfe943d05a28a2160187d45f1c9a Author: Eric Auger Date: Fri Oct 27 15:28:31 2017 +0100 KVM: arm/arm64: register irq bypass consumer on ARM/ARM64 This patch selects IRQ_BYPASS_MANAGER and HAVE_KVM_IRQ_BYPASS configs for ARM/ARM64. kvm_arch_has_irq_bypass() now is implemented and returns true. As a consequence the irq bypass consumer will be registered for ARM/ARM64 with the forwarding callbacks: - stop/start: halt/resume guest execution - add/del_producer: set/unset forwarding at vgic/irqchip level We don't have any actual support yet, so nothing gets actually forwarded. Acked-by: Christoffer Dall Signed-off-by: Eric Auger [maz: dropped the DEOI stuff for the time being in order to reduce the dependency chain, amended commit message] Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/Kconfig | 3 +++ arch/arm64/kvm/Kconfig | 3 +++ virt/kvm/arm/arm.c | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) commit 80f77e54f18c6a16c54797fd4b3d3b454d6f560c Merge: a2b8313 722c908 Author: Christoffer Dall Date: Mon Nov 6 16:49:26 2017 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core commit 7e35ec0e8044f1ede852f55948f71a1963903219 Author: Pablo Neira Ayuso Date: Fri Nov 3 16:26:32 2017 +0100 netfilter: conntrack: move nf_ct_netns_{get,put}() to core So we can call this from other expression that need conntrack in place to work. Signed-off-by: Pablo Neira Ayuso Acked-by: Florian Westphal net/netfilter/nf_conntrack_proto.c | 37 ++++++++++++++++++++++++++++++++++-- net/netfilter/nft_ct.c | 39 +++----------------------------------- 2 files changed, 38 insertions(+), 38 deletions(-) commit 5caaed151a68ae36aca2981cc245f5960a0a7603 Author: Florian Westphal Date: Thu Nov 2 19:41:09 2017 +0100 netfilter: conntrack: don't cache nlattr_tuple_size result in nla_size We currently call ->nlattr_tuple_size() once at register time and cache result in l4proto->nla_size. nla_size is the only member that is written to, avoiding this would allow to make l4proto trackers const. We can use ->nlattr_tuple_size() at run time, and cache result in the individual trackers instead. This is an intermediate step, next patch removes nlattr_size() callback and computes size at compile time, then removes nla_size. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_l4proto.h | 4 ++-- net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 9 +++++++-- net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 9 +++++++-- net/netfilter/nf_conntrack_core.c | 9 +++++++-- net/netfilter/nf_conntrack_netlink.c | 10 +++++++--- net/netfilter/nf_conntrack_proto.c | 2 -- net/netfilter/nf_conntrack_proto_tcp.c | 9 +++++++-- 7 files changed, 37 insertions(+), 15 deletions(-) commit 7f4dae2d7f03d2aaf3b7d8343d4509c8d9d7ca9b Author: Florian Westphal Date: Thu Nov 2 19:04:47 2017 +0100 netfilter: nft_hash: fix nft_hash_deactivate Jindřich Makovička says: The logical OR looks fishy to me. Shouldn't be && there instead? Link: https://bugzilla.netfilter.org/show_bug.cgi?id=1199 Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_set_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f5ce9dddbab6c76f7b7aa040c4c0bfb00530047 Author: Gilad Ben-Yossef Date: Mon Nov 6 06:55:52 2017 +0000 staging: ccree: simplify ioread/iowrite Registers ioread/iowrite operations were done via macros, sometime using a "magical" implicit parameter. Replace all register access with simple inline macros. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_hal.h | 33 ------------------ drivers/staging/ccree/cc_regs.h | 35 -------------------- drivers/staging/ccree/dx_reg_base_host.h | 25 -------------- drivers/staging/ccree/ssi_driver.c | 47 ++++++++++++-------------- drivers/staging/ccree/ssi_driver.h | 20 +++++++++-- drivers/staging/ccree/ssi_fips.c | 12 +++---- drivers/staging/ccree/ssi_pm.c | 4 +-- drivers/staging/ccree/ssi_request_mgr.c | 57 ++++++++++++++++---------------- drivers/staging/ccree/ssi_sysfs.c | 11 +++--- 9 files changed, 78 insertions(+), 166 deletions(-) commit 57a1f2a04a74e8b21bfb7bda4aa18adc8ae9f57c Author: Gilad Ben-Yossef Date: Mon Nov 6 06:55:51 2017 +0000 staging: ccree: simplify registers access The register offset calculation macro was taking a HW block base parameter that was not actually used. Simplify the whole thing by dropping it and rename the macro for better readability. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_regs.h | 15 ++++-------- drivers/staging/ccree/ssi_driver.c | 42 ++++++++++++++++----------------- drivers/staging/ccree/ssi_fips.c | 10 ++++---- drivers/staging/ccree/ssi_pm.c | 4 ++-- drivers/staging/ccree/ssi_request_mgr.c | 33 +++++++++++++------------- drivers/staging/ccree/ssi_sysfs.c | 10 ++++---- 6 files changed, 53 insertions(+), 61 deletions(-) commit e979f35675862fdd38b63475d1c1fdf66361460d Author: Gilad Ben-Yossef Date: Mon Nov 6 06:55:50 2017 +0000 staging: ccree: simplify error handling logic Turn the code sites that don't require any special handling on error return to a simple return. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_driver.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit 642ed0c32bc89a6cc221b0d007ede057bae464a6 Author: Gilad Ben-Yossef Date: Thu Nov 2 08:10:23 2017 +0000 staging: ccree: remove dead code The inflight_counter field is updated in a single location and never used. Remove it. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_cipher.c | 4 ---- drivers/staging/ccree/ssi_driver.h | 1 - 2 files changed, 5 deletions(-) commit 414a48e88d9a840ba110e4ade938236216cf06bf Author: Gilad Ben-Yossef Date: Thu Nov 2 08:10:22 2017 +0000 staging: ccree: handle limiting of DMA masks Properly handle limiting of DMA masks based on device and bus capabilities. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_driver.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit e7cdcba451b3ddd68e714875be13e782577c9e4a Author: Gilad Ben-Yossef Date: Thu Nov 2 08:10:21 2017 +0000 staging: ccree: copy IV to DMAable memory We are being passed an IV buffer from unknown origin, which may be stack allocated and thus not safe for DMA. Allocate a DMA safe buffer for the IV and use that instead. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_cipher.c | 20 ++++++++++++++++++-- drivers/staging/ccree/ssi_cipher.h | 1 + 2 files changed, 19 insertions(+), 2 deletions(-) commit 98c8dc2fd59fdad77d26d7b0d7007776c5fbec16 Author: olivier moysan Date: Mon Nov 6 16:18:53 2017 +0100 ASoC: stm32: spdifrx: fix control DMA error management Fix DMA channel request error handling. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_spdifrx.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 9036e4acc81700a51e5f42820ba4570bea9b6f48 Author: olivier moysan Date: Mon Nov 6 16:18:52 2017 +0100 ASoC: stm32: spdifrx: fix 16 bits capture Change DMA bus width to manage properly 16 bits packed format. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_spdifrx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 42996f2d8e540b2baa7c26a4dac2f50dbbc9344d Author: Colin Ian King Date: Fri Nov 3 13:17:51 2017 +0000 staging: fbtft: remove redundant initialization of buf The pointer buf is being set on each iteration of a for-loop and so the initialization of buf at declaration time is redundant and can be removed. Cleans up clang warning: drivers/staging/fbtft/fb_uc1701.c:130:6: warning: Value stored to 'buf' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_uc1701.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16808dcf605e6302319a8c3266789b76d4c0983b Author: Huacai Chen Date: Mon Nov 6 08:43:03 2017 +0800 staging: sm750fb: Fix parameter mistake in poke32 In commit c075b6f2d357ea9 ("staging: sm750fb: Replace POKE32 and PEEK32 by inline functions"), POKE32 has been replaced by the inline function poke32. But it exchange the "addr" and "data" parameters by mistake, so fix it. Fixes: c075b6f2d357ea9 ("staging: sm750fb: Replace POKE32 and PEEK32 by inline functions"), Signed-off-by: Huacai Chen Signed-off-by: Liangliang Huang Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_chip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bbf6a6d4091affb27ec0a19d7aa7887ce72f610 Author: Aditya Shankar Date: Fri Nov 3 14:26:27 2017 +0530 staging: wilc1000: Fix bssid buffer offset in Txq Commit 46949b48568b ("staging: wilc1000: New cfg packet format in handle_set_wfi_drv_handler") updated the frame format sent from host to the firmware. The code to update the bssid offset in the new frame was part of a second patch in the series which did not make it in and thus causes connection problems after associating to an AP. This fix adds the proper offset of the bssid value in the Tx queue buffer to fix the connection issues. Fixes: 46949b48568b ("staging: wilc1000: New cfg packet format in handle_set_wfi_drv_handler") Cc: stable@vger.kernel.org Signed-off-by: Aditya Shankar Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be077edb469b0c84efbb117af59c39b9ec6615b3 Author: Johannes H. Jensen Date: Sun Nov 5 15:46:53 2017 +0100 staging: fbtft: fb_ssd1331: fix mirrored display When the row scan order is reversed (the default) we also need to reverse the column scan order. This was not done previously, resulting in a mirrored display. Also add support for 180 degree display rotation, in which case simply disable reversed row and column scan order. Tested on an Adafruit 0.96" mini Color OLED display. Signed-off-by: Johannes H. Jensen Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ssd1331.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 0088d782518a208f7015f3c36799a31cc43ce315 Author: Sidong Yang Date: Sun Nov 5 16:52:54 2017 +0000 staging: android: Fix checkpatch.pl error Remove space prohibited before the close parenthesis ')'. Signed-off-by: Sidong Yang Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 262edc359d429488af243eb45e007d360a738211 Author: Bryan O'Donoghue Date: Mon Nov 6 01:32:22 2017 +0000 staging: greybus: loopback: convert loopback to use generic async operations Loopback has its own internal method for tracking and timing out asynchronous operations however previous patches make it possible to use functionality provided by operation.c to do this instead. Using the code in operation.c means we can completely subtract the timer, the work-queue, the kref and the cringe-worthy 'pending' flag. The completion callback triggered by operation.c will provide an authoritative result code - including -ETIMEDOUT for asynchronous operations. Signed-off-by: Bryan O'Donoghue Reviewed-by: Johan Hovold Cc: Alex Elder Cc: Kees Cook Cc: Mitch Tasman Cc: greybus-dev@lists.linaro.org Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 168 +++++++------------------------------ 1 file changed, 29 insertions(+), 139 deletions(-) commit 200543c1b94da9249b35ea1b8726cd0cdee128d5 Author: Bryan O'Donoghue Date: Mon Nov 6 01:32:21 2017 +0000 staging: greybus: operation: add private data with get/set accessors Asynchronous operation completion handler's lives are made easier if there is a generic pointer that can store private data associated with the operation. This patch adds a pointer field to struct gb_operation and get/set methods to access that pointer. Signed-off-by: Bryan O'Donoghue Cc: Johan Hovold Cc: Alex Elder Cc: Mitch Tasman Cc: greybus-dev@lists.linaro.org Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/operation.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 44b02da39210e6dd67e39ff1f48d30c56d384240 Author: Bryan O'Donoghue Date: Mon Nov 6 01:32:20 2017 +0000 staging: greybus: loopback: Fix iteration count on async path Commit 12927835d211 ("greybus: loopback: Add asynchronous bi-directional support") does what it says on the tin - namely, adds support for asynchronous bi-directional loopback operations. What it neglects to do though is increment the per-connection gb->iteration_count on an asynchronous operation error. This patch fixes that omission. Fixes: 12927835d211 ("greybus: loopback: Add asynchronous bi-directional support") Signed-off-by: Bryan O'Donoghue Reported-by: Mitch Tasman Reviewed-by: Johan Hovold Cc: Alex Elder Cc: Mitch Tasman Cc: greybus-dev@lists.linaro.org Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5a70524bbf3b2764a2e2cd32f5109fd22c8a135f Author: Bryan O'Donoghue Date: Mon Nov 6 01:32:19 2017 +0000 staging: greybus: loopback: Hold per-connection mutex across operations Commit d9fb3754ecf8 ("greybus: loopback: Relax locking during loopback operations") changes the holding of the per-connection mutex to be less restrictive because at the time of that commit per-connection mutexes were encapsulated by a per-driver level gb_dev.mutex. Commit 8e1d6c336d74 ("greybus: loopback: drop bus aggregate calculation") on the other hand subtracts the driver level gb_dev.mutex but neglects to move the mutex back to the place it was prior to commit d9fb3754ecf8 ("greybus: loopback: Relax locking during loopback operations"), as a result several members of the per connection struct gb_loopback are racy. The solution is restoring the old location of mutex_unlock(&gb->mutex) as it was in commit d9fb3754ecf8 ("greybus: loopback: Relax locking during loopback operations"). Fixes: 8e1d6c336d74 ("greybus: loopback: drop bus aggregate calculation") Signed-off-by: Bryan O'Donoghue Reviewed-by: Johan Hovold Cc: Alex Elder Cc: Mitch Tasman Cc: greybus-dev@lists.linaro.org Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 31408d16c21bf19587bf7c862354ea1b37a2ed9c Author: Arnd Bergmann Date: Thu Nov 2 15:32:52 2017 +0100 staging: greybus/loopback: use ktime_get() for time intervals This driver is the only one using the deprecated timeval_to_ns() helper. Changing it from do_gettimeofday() to ktime_get() makes the code more efficient, more robust against concurrent settimeofday(), more accurate and lets us get rid of that helper in the future. Signed-off-by: Arnd Bergmann Reviewed-by: Viresh Kumar Acked-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 42 ++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 24 deletions(-) commit 7558bd50201f0b21129a9a5c220c11cf3bfc6efe Author: Stefan Schmidt Date: Fri Sep 22 14:14:01 2017 +0200 ieee802154: ca8210: use __func__ macro for debug messages Instead of having the function name hard-coded (it might change and we forgot to update them in the debug output) we can use __func__ instead and also shorter the line so we do not need to break it. Found by checkpatch. Signed-off-by: Stefan Schmidt Acked-by: Harry Morris Signed-off-by: Stefan Schmidt drivers/net/ieee802154/ca8210.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit dc1281e1f8550337e09487348d3a27491fd31f66 Author: Stefan Schmidt Date: Fri Sep 22 14:14:00 2017 +0200 ieee802154: ca8210: fix some kernel coding style errors Remove unneeded parentheses and fix format for pointer style. Signed-off-by: Stefan Schmidt Acked-by: Harry Morris Signed-off-by: Stefan Schmidt drivers/net/ieee802154/ca8210.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 395cef423358dccfefc0a8ea6a73730c0084df7f Author: Stefan Schmidt Date: Fri Sep 22 14:13:52 2017 +0200 ieee802154: adf7242: use unsigned int over only unsigned Bring it in line with the rest of the ieee802154 drivers. Found by checkpatch. Signed-off-by: Stefan Schmidt Acked-by: Michael Hennerich Signed-off-by: Stefan Schmidt drivers/net/ieee802154/adf7242.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 30cfcf01665f3c8d8dc3ebb3dfb1a8248f53404a Author: Arnd Bergmann Date: Mon Nov 6 14:58:43 2017 +0100 drm/rockchip: add CONFIG_OF dependency for lvds Build-testing on randconfig kernels revealed a dependency in the newly added lvds sub-driver: drivers/gpu/drm/rockchip/rockchip_lvds.c: In function 'rockchip_lvds_bind': drivers/gpu/drm/rockchip/rockchip_lvds.c:380:24: error: 'struct drm_bridge' has no member named 'of_node' remote = lvds->bridge->of_node; We could work around that in the code, adding a Kconfig dependency seems easier. Fixes: 34cc0aa25456 ("drm/rockchip: Add support for Rockchip Soc LVDS") Signed-off-by: Arnd Bergmann Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20171106135852.1355487-1-arnd@arndb.de drivers/gpu/drm/rockchip/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0be7fc7e08e7c6a5ec3837960d420e377380d1a8 Author: Gustavo A. R. Silva Date: Tue Oct 31 01:31:27 2017 -0500 ieee802154: mrf24j40: fix incorrect mask in mrf24j40_stop It seems that this is a copy/paste error and the proper bit masking is: BIT_TXNIE | BIT_RXIE This issue was detected with the help of Coccinelle. Reported-by: Julia Lawall Signed-off-by: Gustavo A. R. Silva Fixes: 7d840545e5b9 ("mrf24j40: replace magic numbers") Acked-by: Alan Ott Signed-off-by: Stefan Schmidt drivers/net/ieee802154/mrf24j40.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd3a21b5bd27b9b92df7025e72cb4275c5ea6e58 Author: Stefan Schmidt Date: Fri Sep 22 14:14:04 2017 +0200 ieee802154: cc2520: switch from BUG_ON() to WARN_ON() on problem The check is valid but it does not warrant to crash the kernel. A WARN_ON() is good enough here. Found by checkpatch. Signed-off-by: Stefan Schmidt Acked-by: Varka Bhadram Signed-off-by: Stefan Schmidt drivers/net/ieee802154/cc2520.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a8ab042c8099a4fe4d81cccec09f67556697dedd Author: Stefan Schmidt Date: Fri Sep 22 14:14:03 2017 +0200 ieee802154: cc2520: use __func__ macro for debug messages Instead of having the function name hard-coded (it might change and we forgot to update them in the debug output) we can use __func__ instead and also shorter the line so we do not need to break it. Found by checkpatch. Signed-off-by: Stefan Schmidt Acked-by: Varka Bhadram Signed-off-by: Stefan Schmidt drivers/net/ieee802154/cc2520.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 3ee0275d8db8757b2895c01868361550d38ae109 Author: Stefan Schmidt Date: Fri Sep 22 14:14:02 2017 +0200 ieee802154: cc2520: fix some kernel coding style errors Fix some spacing and needed new line. Signed-off-by: Stefan Schmidt Acked-by: Varka Bhadram Signed-off-by: Stefan Schmidt drivers/net/ieee802154/cc2520.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a2b83133339067c1b27f902e32506ab2871e2320 Author: Dongjiu Geng Date: Mon Oct 30 14:05:18 2017 +0800 KVM: arm/arm64: fix the incompatible matching for external abort kvm_vcpu_dabt_isextabt() tries to match a full fault syndrome, but calls kvm_vcpu_trap_get_fault_type() that only returns the fault class, thus reducing the scope of the check. This doesn't cause any observable bug yet as we end-up matching a closely related syndrome for which we return the same value. Using kvm_vcpu_trap_get_fault() instead fixes it for good. Signed-off-by: Dongjiu Geng Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_emulate.h | 2 +- arch/arm64/include/asm/kvm_emulate.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 74a64a981662ab34289b3c90f6f964aa38ec1d9f Author: Marc Zyngier Date: Sun Oct 29 02:18:09 2017 +0000 KVM: arm/arm64: Unify 32bit fault injection Both arm and arm64 implementations are capable of injecting faults, and yet have completely divergent implementations, leading to different bugs and reduced maintainability. Let's elect the arm64 version as the canonical one and move it into aarch32.c, which is common to both architectures. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/asm/kvm_emulate.h | 36 ++++++++- arch/arm/kvm/emulate.c | 139 ----------------------------------- arch/arm64/include/asm/kvm_emulate.h | 3 + arch/arm64/kvm/inject_fault.c | 74 +------------------ virt/kvm/arm/aarch32.c | 97 ++++++++++++++++++++++-- 5 files changed, 131 insertions(+), 218 deletions(-) commit 3eb4271b4ab6d38a3c113a19f358f606702e08ef Author: Eric Auger Date: Thu Oct 26 17:23:11 2017 +0200 KVM: arm/arm64: vgic-its: Implement KVM_DEV_ARM_ITS_CTRL_RESET On reset we clear the valid bits of GITS_CBASER and GITS_BASER. We also clear command queue registers and free the cache (device, collection, and lpi lists). As we need to take the same locks as save/restore functions, we create a vgic_its_ctrl() wrapper that handles KVM_DEV_ARM_VGIC_GRP_CTRL group functions. Reviewed-by: Christoffer Dall Reviewed-by: Marc Zyngier Signed-off-by: Eric Auger Signed-off-by: Christoffer Dall arch/arm/include/uapi/asm/kvm.h | 1 + arch/arm64/include/uapi/asm/kvm.h | 1 + virt/kvm/arm/vgic/vgic-its.c | 105 ++++++++++++++++++++------------------ 3 files changed, 58 insertions(+), 49 deletions(-) commit ae204f80ca4074b6db07bd28c75faf02718735a0 Author: Eric Auger Date: Thu Oct 26 17:23:10 2017 +0200 KVM: arm/arm64: Document KVM_DEV_ARM_ITS_CTRL_RESET At the moment, the in-kernel emulated ITS is not properly reset. On guest restart/reset some registers keep their old values and internal structures like device, ITE, and collection lists are not freed. This may lead to various bugs. Among them, we can have incorrect state backup or failure when saving the ITS state at early guest boot stage. This patch documents a new attribute, KVM_DEV_ARM_ITS_CTRL_RESET in the KVM_DEV_ARM_VGIC_GRP_CTRL group. Upon this action, we can reset registers and especially those pointing to tables previously allocated by the guest and free the internal data structures storing the list of devices, collections and lpis. The usual approach for device reset of having userspace write the reset values of the registers to the kernel via the register read/write APIs doesn't work for the ITS because it has some internal state (caches) which is not exposed as registers, and there is no register interface for "drop cached data without writing it back to RAM". So we need a KVM API which mimics the hardware's reset line, to provide the equivalent behaviour to a "pull the power cord out of the back of the machine" reset. Reviewed-by: Christoffer Dall Reviewed-by: Marc Zyngier Signed-off-by: Eric Auger Reported-by: wanghaibin Signed-off-by: Christoffer Dall Documentation/virtual/kvm/devices/arm-vgic-its.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 36d6961c2b481614e8d37495896436d9322df052 Author: Eric Auger Date: Thu Oct 26 17:23:09 2017 +0200 KVM: arm/arm64: vgic-its: Free caches when GITS_BASER Valid bit is cleared When the GITS_BASER.Valid gets cleared, the data structures in guest RAM are not valid anymore. The device, collection and LPI lists stored in the in-kernel ITS represent the same information in some form of cache. So let's void the cache. Reviewed-by: Marc Zyngier Reviewed-by: Christoffer Dall Signed-off-by: Eric Auger Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 2f609a03391f24ac31f12f27790194ac49dff832 Author: wanghaibin Date: Thu Oct 26 17:23:08 2017 +0200 KVM: arm/arm64: vgic-its: New helper functions to free the caches We create two new functions that free the device and collection lists. They are currently called by vgic_its_destroy() and other callers will be added in subsequent patches. We also remove the check on its->device_list.next. Lists are initialized in vgic_create_its() and the device is added to the device list only if this latter succeeds. vgic_its_destroy is the device destroy ops. This latter is called by kvm_destroy_devices() which loops on all created devices. So at this point the list is initialized. Acked-by: Marc Zyngier Signed-off-by: wanghaibin Signed-off-by: Eric Auger Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) commit 0a0d389ea63ced83e0e6da2b78c964b9cb3764ba Author: Eric Auger Date: Thu Oct 26 17:23:07 2017 +0200 KVM: arm/arm64: vgic-its: Remove kvm_its_unmap_device Let's remove kvm_its_unmap_device and use kvm_its_free_device as both functions are identical. Signed-off-by: Eric Auger Acked-by: Marc Zyngier Acked-by: Christoffer Dall Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 4a2c4da1250d09c1477eff8e14a82b2573481f32 Author: Christoffer Dall Date: Sun Oct 29 02:04:55 2017 +0100 arm/arm64: KVM: Load the timer state when enabling the timer After being lazy with saving/restoring the timer state, we defer that work to vcpu_load and vcpu_put, which ensure that the timer state is loaded on the hardware timers whenever the VCPU runs. Unfortunately, we are failing to do that the first time vcpu_load() runs, because the timer has not yet been enabled at that time. As long as the initialized timer state matches what happens to be in the hardware (a disabled timer, because we never leave the timer screaming), this does not show up as a problem, but is nevertheless incorrect. The solution is simple; disable preemption while setting the timer to be enabled, and call the timer load function when first enabling the timer. Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/arch_timer.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1c88ab7ec8c53c4d806bb2b6871ddafdebbffa8b Author: Christoffer Dall Date: Fri Jan 6 16:07:48 2017 +0100 KVM: arm/arm64: Rework kvm_timer_should_fire kvm_timer_should_fire() can be called in two different situations from the kvm_vcpu_block(). The first case is before calling kvm_timer_schedule(), used for wait polling, and in this case the VCPU thread is running and the timer state is loaded onto the hardware so all we have to do is check if the virtual interrupt lines are asserted, becasue the timer interrupt handler functions will raise those lines as appropriate. The second case is inside the wait loop of kvm_vcpu_block(), where we have already called kvm_timer_schedule() and therefore the hardware will be disabled and the software view of the timer state is up to date (timer->loaded is false), and so we can simply check if the timer should fire by looking at the software state. Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier include/kvm/arm_arch_timer.h | 3 ++- virt/kvm/arm/arch_timer.c | 22 +++++++++++++++++++++- virt/kvm/arm/arm.c | 3 +-- 3 files changed, 24 insertions(+), 4 deletions(-) commit 7e90c8e5704cbb299d48e7debb1e61614cb12f41 Author: Christoffer Dall Date: Tue Jun 20 07:56:20 2017 -0700 KVM: arm/arm64: Get rid of kvm_timer_flush_hwstate Now when both the vtimer and the ptimer when using both the in-kernel vgic emulation and a userspace IRQ chip are driven by the timer signals and at the vcpu load/put boundaries, instead of recomputing the timer state at every entry/exit to/from the guest, we can get entirely rid of the flush hwstate function. Signed-off-by: Christoffer Dall Acked-by: Marc Zyngier include/kvm/arm_arch_timer.h | 1 - virt/kvm/arm/arch_timer.c | 24 ------------------------ virt/kvm/arm/arm.c | 1 - 3 files changed, 26 deletions(-) commit bbdd52cfcba290560909498c7d5681f19894587b Author: Christoffer Dall Date: Sun Jun 18 01:42:55 2017 -0700 KVM: arm/arm64: Avoid phys timer emulation in vcpu entry/exit There is no need to schedule and cancel a hrtimer when entering and exiting the guest, because we know when the physical timer is going to fire when the guest programs it, and we can simply program the hrtimer at that point. Now when the register modifications from the guest go through the kvm_arm_timer_set/get_reg functions, which always call kvm_timer_update_state(), we can simply consider the timer state in this function and schedule and cancel the timers as needed. This avoids looking at the physical timer emulation state when entering and exiting the VCPU, allowing for faster servicing of the VM when needed. Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier virt/kvm/arm/arch_timer.c | 75 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 24 deletions(-) commit cda93b7aa4657f2a9df28d56df8259226be8b0e9 Author: Christoffer Dall Date: Sun Jun 18 01:41:06 2017 -0700 KVM: arm/arm64: Move phys_timer_emulate function We are about to call phys_timer_emulate() from kvm_timer_update_state() and modify phys_timer_emulate() at the same time. Moving the function and modifying it in a single patch makes the diff hard to read, so do this separately first. No functional change. Signed-off-by: Christoffer Dall Acked-by: Marc Zyngier virt/kvm/arm/arch_timer.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit c1b135af8387bc6c6d43ed61a65647c68f231ea1 Author: Christoffer Dall Date: Fri Jun 16 23:12:06 2017 -0700 KVM: arm/arm64: Use kvm_arm_timer_set/get_reg for guest register traps When trapping on a guest access to one of the timer registers, we were messing with the internals of the timer state from the sysregs handling code, and that logic was about to receive more added complexity when optimizing the timer handling code. Therefore, since we already have timer register access functions (to access registers from userspace), reuse those for the timer register traps from a VM and let the timer code maintain its own consistency. Signed-off-by: Christoffer Dall Acked-by: Marc Zyngier arch/arm64/kvm/sys_regs.c | 41 ++++++++++++++--------------------------- 1 file changed, 14 insertions(+), 27 deletions(-) commit 5c5196da4e966cc23af6a1576ad2a9e45bed3f99 Author: Christoffer Dall Date: Fri Jun 16 23:08:57 2017 -0700 KVM: arm/arm64: Support EL1 phys timer register access in set/get reg Add suport for the physical timer registers in kvm_arm_timer_set_reg and kvm_arm_timer_get_reg so that these functions can be reused to interact with the rest of the system. Note that this paves part of the way for the physical timer state save/restore, but we still need to add those registers to KVM_GET_REG_LIST before we support migrating the physical timer state. Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/include/uapi/asm/kvm.h | 6 ++++++ arch/arm64/include/uapi/asm/kvm.h | 6 ++++++ virt/kvm/arm/arch_timer.c | 33 +++++++++++++++++++++++++++++++-- 3 files changed, 43 insertions(+), 2 deletions(-) commit b103cc3f10c06fb81faacd4ee6f88bbd21246073 Author: Christoffer Dall Date: Sun Oct 16 20:30:38 2016 +0200 KVM: arm/arm64: Avoid timer save/restore in vcpu entry/exit We don't need to save and restore the hardware timer state and examine if it generates interrupts on on every entry/exit to the guest. The timer hardware is perfectly capable of telling us when it has expired by signaling interrupts. When taking a vtimer interrupt in the host, we don't want to mess with the timer configuration, we just want to forward the physical interrupt to the guest as a virtual interrupt. We can use the split priority drop and deactivate feature of the GIC to do this, which leaves an EOI'ed interrupt active on the physical distributor, making sure we don't keep taking timer interrupts which would prevent the guest from running. We can then forward the physical interrupt to the VM using the HW bit in the LR of the GIC, like we do already, which lets the guest directly deactivate both the physical and virtual timer simultaneously, allowing the timer hardware to exit the VM and generate a new physical interrupt when the timer output is again asserted later on. We do need to capture this state when migrating VCPUs between physical CPUs, however, which we use the vcpu put/load functions for, which are called through preempt notifiers whenever the thread is scheduled away from the CPU or called directly if we return from the ioctl to userspace. One caveat is that we have to save and restore the timer state in both kvm_timer_vcpu_[put/load] and kvm_timer_[schedule/unschedule], because we can have the following flows: 1. kvm_vcpu_block 2. kvm_timer_schedule 3. schedule 4. kvm_timer_vcpu_put (preempt notifier) 5. schedule (vcpu thread gets scheduled back) 6. kvm_timer_vcpu_load (preempt notifier) 7. kvm_timer_unschedule And a version where we don't actually call schedule: 1. kvm_vcpu_block 2. kvm_timer_schedule 7. kvm_timer_unschedule Since kvm_timer_[schedule/unschedule] may not be followed by put/load, but put/load also may be called independently, we call the timer save/restore functions from both paths. Since they rely on the loaded flag to never save/restore when unnecessary, this doesn't cause any harm, and we ensure that all invokations of either set of functions work as intended. An added benefit beyond not having to read and write the timer sysregs on every entry and exit is that we no longer have to actively write the active state to the physical distributor, because we configured the irq for the vtimer to only get a priority drop when handling the interrupt in the GIC driver (we called irq_set_vcpu_affinity()), and the interrupt stays active after firing on the host. Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall include/kvm/arm_arch_timer.h | 16 ++- virt/kvm/arm/arch_timer.c | 237 +++++++++++++++++++++++++++---------------- virt/kvm/arm/arm.c | 19 +++- 3 files changed, 178 insertions(+), 94 deletions(-) commit 40f4cba9a579fe7ad1431269db8aec745c290ba0 Author: Christoffer Dall Date: Wed Jul 5 12:50:27 2017 +0200 KVM: arm/arm64: Set VCPU affinity for virt timer irq As we are about to take physical interrupts for the virtual timer on the host but want to leave those active while running the VM (and let the VM deactivate them), we need to set the vtimer PPI affinity accordingly. Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier virt/kvm/arm/arch_timer.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 688c50aa72f64ca21767486e5eef876ec23e418c Author: Christoffer Dall Date: Wed Jan 4 16:10:28 2017 +0100 KVM: arm/arm64: Move timer save/restore out of the hyp code As we are about to be lazy with saving and restoring the timer registers, we prepare by moving all possible timer configuration logic out of the hyp code. All virtual timer registers can be programmed from EL1 and since the arch timer is always a level triggered interrupt we can safely do this with interrupts disabled in the host kernel on the way to the guest without taking vtimer interrupts in the host kernel (yet). The downside is that the cntvoff register can only be programmed from hyp mode, so we jump into hyp mode and back to program it. This is also safe, because the host kernel doesn't use the virtual timer in the KVM code. It may add a little performance performance penalty, but only until following commits where we move this operation to vcpu load/put. Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier arch/arm/include/asm/kvm_asm.h | 2 ++ arch/arm/include/asm/kvm_hyp.h | 4 +-- arch/arm/kvm/hyp/switch.c | 7 ++-- arch/arm64/include/asm/kvm_asm.h | 2 ++ arch/arm64/include/asm/kvm_hyp.h | 4 +-- arch/arm64/kvm/hyp/switch.c | 6 ++-- virt/kvm/arm/arch_timer.c | 48 ++++++++++++++++++++++++++ virt/kvm/arm/hyp/timer-sr.c | 74 +++++++++++++++++----------------------- 8 files changed, 95 insertions(+), 52 deletions(-) commit f2a2129e0ac8d8fa79c3f85425c36f6e3368f022 Author: Christoffer Dall Date: Sun Jun 18 00:32:08 2017 -0700 KVM: arm/arm64: Use separate timer for phys timer emulation We were using the same hrtimer for emulating the physical timer and for making sure a blocking VCPU thread would be eventually woken up. That worked fine in the previous arch timer design, but as we are about to actually use the soft timer expire function for the physical timer emulation, change the logic to use a dedicated hrtimer. This has the added benefit of not having to cancel any work in the sync path, which in turn allows us to run the flush and sync with IRQs disabled. Note that the hrtimer used to program the host kernel's timer to generate an exit from the guest when the emulated physical timer fires never has to inject any work, and to share the soft_timer_cancel() function with the bg_timer, we change the function to only cancel any pending work if the pointer to the work struct is not null. Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall include/kvm/arm_arch_timer.h | 3 +++ virt/kvm/arm/arch_timer.c | 21 ++++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) commit ee9bb9a1e3c6e40874c1611ac24b76c87d2cba7b Author: Christoffer Dall Date: Sun Oct 16 20:24:30 2016 +0200 KVM: arm/arm64: Move timer/vgic flush/sync under disabled irq As we are about to play tricks with the timer to be more lazy in saving and restoring state, we need to move the timer sync and flush functions under a disabled irq section and since we have to flush the vgic state after the timer and PMU state, we do the whole flush/sync sequence with disabled irqs. The only downside is a slightly longer delay before being able to process hardware interrupts and run softirqs. Signed-off-by: Christoffer Dall Reviewed-by: Marc Zyngier virt/kvm/arm/arm.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 14d61fa98f03cb01f3aea7e3069fdf460caf5587 Author: Christoffer Dall Date: Sat Jun 17 07:33:02 2017 -0700 KVM: arm/arm64: Rename soft timer to bg_timer As we are about to introduce a separate hrtimer for the physical timer, call this timer bg_timer, because we refer to this timer as the background timer in the code and comments elsewhere. Signed-off-by: Christoffer Dall Acked-by: Marc Zyngier include/kvm/arm_arch_timer.h | 2 +- virt/kvm/arm/arch_timer.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 8409a06f2a2c0baeb6e6ff020b2c5a4592b3078d Author: Christoffer Dall Date: Sat Jun 17 01:09:19 2017 -0700 KVM: arm/arm64: Make timer_arm and timer_disarm helpers more generic We are about to add an additional soft timer to the arch timer state for a VCPU and would like to be able to reuse the functions to program and cancel a timer, so we make them slightly more generic and rename to make it more clear that these functions work on soft timers and not the hardware resource that this code is managing. The armed flag on the timer state is only used to assert a condition, and we don't rely on this assertion in any meaningful way, so we can simply get rid of this flack and slightly reduce complexity. Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall include/kvm/arm_arch_timer.h | 3 --- virt/kvm/arm/arch_timer.c | 33 +++++++++++---------------------- 2 files changed, 11 insertions(+), 25 deletions(-) commit d33a3c8c48c3264419a683885a27a5c85df35f12 Author: Christoffer Dall Date: Tue Dec 6 22:00:52 2016 +0100 KVM: arm/arm64: Check that system supports split eoi/deactivate Some systems without proper firmware and/or hardware description data don't support the split EOI and deactivate operation. On such systems, we cannot leave the physical interrupt active after the timer handler on the host has run, so we cannot support KVM with an in-kernel GIC with the timer changes we are about to introduce. This patch makes sure that trying to initialize the KVM GIC code will fail on such systems. Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall drivers/irqchip/irq-gic-v3.c | 8 ++++++-- drivers/irqchip/irq-gic.c | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) commit 006df0f34930e18d0aa52f05705bdfe1fc565943 Author: Christoffer Dall Date: Sun Oct 16 22:19:11 2016 +0200 KVM: arm/arm64: Support calling vgic_update_irq_pending from irq context We are about to optimize our timer handling logic which involves injecting irqs to the vgic directly from the irq handler. Unfortunately, the injection path can take any AP list lock and irq lock and we must therefore make sure to use spin_lock_irqsave where ever interrupts are enabled and we are taking any of those locks, to avoid deadlocking between process context and the ISR. This changes a lot of the VGIC code, but the good news are that the changes are mostly mechanical. Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall virt/kvm/arm/vgic/vgic-its.c | 17 +++++++----- virt/kvm/arm/vgic/vgic-mmio-v2.c | 22 +++++++++------ virt/kvm/arm/vgic/vgic-mmio-v3.c | 17 +++++++----- virt/kvm/arm/vgic/vgic-mmio.c | 44 ++++++++++++++++++------------ virt/kvm/arm/vgic/vgic-v2.c | 5 ++-- virt/kvm/arm/vgic/vgic-v3.c | 12 ++++---- virt/kvm/arm/vgic/vgic.c | 59 ++++++++++++++++++++++++---------------- virt/kvm/arm/vgic/vgic.h | 3 +- 8 files changed, 107 insertions(+), 72 deletions(-) commit f39d16cbabf9f939745a3850a33760910d22ef35 Author: Christoffer Dall Date: Wed Oct 19 12:40:17 2016 +0200 KVM: arm/arm64: Guard kvm_vgic_map_is_active against !vgic_initialized If the vgic is not initialized, don't try to grab its spinlocks or traverse its data structures. This is important because we soon have to start considering the active state of a virtual interrupts when doing vcpu_load, which may happen early on before the vgic is initialized. Signed-off-by: Christoffer Dall Acked-by: Marc Zyngier virt/kvm/arm/vgic/vgic.c | 3 +++ 1 file changed, 3 insertions(+) commit e6d68b00e989f27116fd8575f1f9c217873e9b0e Author: Christoffer Dall Date: Wed Jul 5 11:04:28 2017 +0200 arm64: Use physical counter for in-kernel reads when booted in EL2 Using the physical counter allows KVM to retain the offset between the virtual and physical counter as long as it is actively running a VCPU. As soon as a VCPU is released, another thread is scheduled or we start running userspace applications, we reset the offset to 0, so that userspace accessing the virtual timer can still read the virtual counter and get the same view of time as the kernel. This opens up potential improvements for KVM performance, but we have to make a few adjustments to preserve system consistency. Currently get_cycles() is hardwired to arch_counter_get_cntvct() on arm64, but as we move to using the physical timer for the in-kernel time-keeping on systems that boot in EL2, we should use the same counter for get_cycles() as for other in-kernel timekeeping operations. Similarly, implementations of arch_timer_set_next_event_phys() is modified to use the counter specific to the timer being programmed. VHE kernels or kernels continuing to use the virtual timer are unaffected. Cc: Will Deacon Cc: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/timex.h | 2 +- drivers/clocksource/arm_arch_timer.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) commit f2e600c149fda3453344f89c7e9353fe278ebd32 Author: Christoffer Dall Date: Wed Oct 18 13:06:25 2017 +0200 arm64: Implement arch_counter_get_cntpct to read the physical counter As we are about to use the physical counter on arm64 systems that have KVM support, implement arch_counter_get_cntpct() and the associated errata workaround functionality for stable timer reads. Cc: Will Deacon Cc: Mark Rutland Acked-by: Catalin Marinas Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm64/include/asm/arch_timer.h | 8 +++----- drivers/clocksource/arm_arch_timer.c | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) commit 16869e470b573a45af7f4f6b0fed77b709469f43 Author: Harry Morris Date: Tue Oct 31 11:22:06 2017 +0000 MAINTAINERS: Update ca8210 driver contact emails Remove non-functioning secondary email address from maintainer information. Signed-off-by: Harry Morris Signed-off-by: Stefan Schmidt MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit bd910a960f0c4e817d945b061c8ca75aed3d1091 Author: Stefan Schmidt Date: Fri Sep 22 14:13:58 2017 +0200 ieee802154: atusb: switch from BUG_ON() to WARN_ON() on problem The check is valid but it does not warrant to crash the kernel. A WARN_ON() is good enough here. Found by checkpatch. Signed-off-by: Stefan Schmidt drivers/net/ieee802154/atusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f150344497d8b7c2cdd38e3200e2f11e805cc3a Author: Stefan Schmidt Date: Fri Sep 22 14:13:57 2017 +0200 ieee802154: atusb: fix some kernel coding style errors Fix a long line, wrong comment format and misaligned indent. Signed-off-by: Stefan Schmidt drivers/net/ieee802154/atusb.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 5f0cbf4e50c874fd07a30fbc115bce7c5da96a13 Author: Stefan Schmidt Date: Fri Sep 22 14:13:56 2017 +0200 ieee802154: atusb: use __func__ macro for debug messages Instead of having the function name hard-coded (it might change and we forgot to update them in the debug output) we can use __func__ instead and also shorter the line so we do not need to break it. Found by checkpatch. Signed-off-by: Stefan Schmidt drivers/net/ieee802154/atusb.c | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) commit 909dcf9b16738d2dee46b688378d64fc771712b8 Author: Stefan Schmidt Date: Fri Sep 22 14:13:55 2017 +0200 ieee802154: atusb: switch from uint8_t to u8 Switch top the preferred kernel type naming. Found by checkpatch. Signed-off-by: Stefan Schmidt drivers/net/ieee802154/atusb.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 9a19b463863e757e649c37af245b6af101410c1e Author: Wang Long Date: Thu Nov 2 23:05:12 2017 -0400 workqueue: Fix comment for unbound workqueue's attrbutes Signed-off-by: Wang Long Signed-off-by: Tejun Heo kernel/workqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9718a29d40b7e5ae4692796eb23c54f25559d35e Author: Konstantinos Tsimpoukas Date: Sun Nov 5 14:11:01 2017 -0600 ALSA: ice1712: define i2c eeprom addr to header file Signed-off-by: Konstantinos Tsimpoukas Signed-off-by: Takashi Iwai sound/pci/ice1712/ice1712.c | 2 +- sound/pci/ice1712/ice1712.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit aed328fec0ebd4acce384556b98fd58974874246 Merge: 727dede f9a1c37 Author: Takashi Iwai Date: Mon Nov 6 15:04:35 2017 +0100 Merge branch 'topic/usb-ep-check-v2' into for-next Pull another fix of URB EP type check. Signed-off-by: Takashi Iwai commit f9a1c372299fed53d4b72bb601f7f3bfe6f9999c Author: Takashi Iwai Date: Mon Nov 6 10:47:14 2017 +0100 ALSA: usx2y: Fix invalid stream URBs The us122l driver creates URBs per the fixed endpoints, and this may end up with URBs with inconsistent pipes when a fuzzer or a malicious program deals with the manipulated endpoints. It ends up with a kernel warning like: usb 1-1: BOGUS urb xfer, pipe 0 != type 3 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 24 at drivers/usb/core/urb.c:471 usb_submit_urb+0x113e/0x1400 Call Trace: usb_stream_start+0x48a/0x9f0 sound/usb/usx2y/usb_stream.c:690 us122l_start+0x116/0x290 sound/usb/usx2y/us122l.c:365 us122l_create_card sound/usb/usx2y/us122l.c:502 us122l_usb_probe sound/usb/usx2y/us122l.c:588 .... For avoiding the bad access, this patch adds a few sanity checks of the validity of created URBs like previous similar fixes using the new usb_urb_ep_type_check() helper function. Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Takashi Iwai sound/usb/usx2y/usb_stream.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit b1fc1372c48027a5b99943905cf7cfa6d622d6a9 Author: Florian Westphal Date: Thu Nov 2 12:50:38 2017 +0100 netfilter: xt_connlimit: remove mask argument Instead of passing mask to all the helpers, just fixup the search key early. After rbtree conversion, each rbtree node stores connections of same 'addr & mask', so no need to pass the mask too. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_connlimit.c | 52 +++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 32 deletions(-) commit 9912156c2e42a5b0100da37275622262ece02c05 Author: Colin Ian King Date: Mon Oct 16 11:24:02 2017 +0100 netfilter: ebtables: clean up initialization of buf buf is initialized to buf_start and then set on the next statement to buf_start + offsets[i]. Clean this up to just initialize buf to buf_start + offsets[i] to clean up the clang build warning: "Value stored to 'buf' during its initialization is never read" Signed-off-by: Colin Ian King Signed-off-by: Pablo Neira Ayuso net/bridge/netfilter/ebtables.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c5504f724c86ee925e7ffb80aa342cfd57959b13 Author: KUWAZAWA Takuya Date: Sun Oct 15 20:54:10 2017 +0900 netfilter: ipvs: Fix inappropriate output of procfs Information about ipvs in different network namespace can be seen via procfs. How to reproduce: # ip netns add ns01 # ip netns add ns02 # ip netns exec ns01 ip a add dev lo 127.0.0.1/8 # ip netns exec ns02 ip a add dev lo 127.0.0.1/8 # ip netns exec ns01 ipvsadm -A -t 10.1.1.1:80 # ip netns exec ns02 ipvsadm -A -t 10.1.1.2:80 The ipvsadm displays information about its own network namespace only. # ip netns exec ns01 ipvsadm -Ln IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags -> RemoteAddress:Port Forward Weight ActiveConn InActConn TCP 10.1.1.1:80 wlc # ip netns exec ns02 ipvsadm -Ln IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags -> RemoteAddress:Port Forward Weight ActiveConn InActConn TCP 10.1.1.2:80 wlc But I can see information about other network namespace via procfs. # ip netns exec ns01 cat /proc/net/ip_vs IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags -> RemoteAddress:Port Forward Weight ActiveConn InActConn TCP 0A010101:0050 wlc TCP 0A010102:0050 wlc # ip netns exec ns02 cat /proc/net/ip_vs IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags -> RemoteAddress:Port Forward Weight ActiveConn InActConn TCP 0A010102:0050 wlc Signed-off-by: KUWAZAWA Takuya Acked-by: Julian Anastasov Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_ctl.c | 4 ++++ 1 file changed, 4 insertions(+) commit c5cc0c697149345ded2f792a919097cd51464274 Author: Helge Deller Date: Wed Sep 6 22:28:00 2017 +0200 netfilter: ipvs: Use %pS printk format for direct addresses The debug and error printk functions in ipvs uses wrongly the %pF instead of the %pS printk format specifier for printing symbols for the address returned by _builtin_return_address(0). Fix it for the ia64, ppc64 and parisc64 architectures. Signed-off-by: Helge Deller Cc: Wensong Zhang Cc: netdev@vger.kernel.org Cc: lvs-devel@vger.kernel.org Cc: netfilter-devel@vger.kernel.org Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso net/netfilter/ipvs/ip_vs_conn.c | 2 +- net/netfilter/ipvs/ip_vs_ctl.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 33a7067732cf1b86b5dc672cfa9bbc15460117e5 Author: Aishwarya Pant Date: Tue Oct 10 20:09:18 2017 +0530 power: supply: replace pr_* with dev_* Use kernel preferred dev_* family of functions in place of pr_*, wherever a device object is present. Done with the help of coccinelle. Signed-off-by: Aishwarya Pant Signed-off-by: Sebastian Reichel drivers/power/supply/power_supply_core.c | 2 +- drivers/power/supply/twl4030_charger.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 05087360fd7acf2cc9b7bbb243c12765c44c7693 Author: Rafael J. Wysocki Date: Fri Oct 27 10:10:16 2017 +0200 ACPI / PM: Take SMART_SUSPEND driver flag into account Make the ACPI PM domain take DPM_FLAG_SMART_SUSPEND into account in its system suspend callbacks. [Note that the pm_runtime_suspended() check in acpi_dev_needs_resume() is an optimization, because if is not passed, all of the subsequent checks may be skipped and some of them are much more overhead in general.] Also use the observation that if the device is in runtime suspend at the beginning of the "late" phase of a system-wide suspend-like transition, its state cannot change going forward (runtime PM is disabled for it at that time) until the transition is over and the subsequent system-wide PM callbacks should be skipped for it (as they generally assume the device to not be suspended), so add checks for that in acpi_subsys_suspend_late/noirq() and acpi_subsys_freeze_late/noirq(). Moreover, if acpi_subsys_resume_noirq() is called during the subsequent system-wide resume transition and if the device was left in runtime suspend previously, its runtime PM status needs to be changed to "active" as it is going to be put into the full-power state going forward, so add a check for that too in there. In turn, if acpi_subsys_thaw_noirq() runs after the device has been left in runtime suspend, the subsequent "thaw" callbacks need to be skipped for it (as they may not work correctly with a suspended device), so set the power.direct_complete flag for the device then to make the PM core skip those callbacks. On top of the above, make the analogous changes in the acpi_lpss driver that uses the ACPI PM domain callbacks. Signed-off-by: Rafael J. Wysocki Acked-by: Greg Kroah-Hartman drivers/acpi/acpi_lpss.c | 13 +++++- drivers/acpi/device_pm.c | 113 +++++++++++++++++++++++++++++++++++++++++++---- include/linux/acpi.h | 10 +++++ 3 files changed, 126 insertions(+), 10 deletions(-) commit c4b65157aeefad29b2351a00a010e8c40ce7fd0e Author: Rafael J. Wysocki Date: Thu Oct 26 12:12:22 2017 +0200 PCI / PM: Take SMART_SUSPEND driver flag into account Make the PCI bus type take DPM_FLAG_SMART_SUSPEND into account in its system-wide PM callbacks and make sure that all code that should not run in parallel with pci_pm_runtime_resume() is executed in the "late" phases of system suspend, freeze and poweroff transitions. [Note that the pm_runtime_suspended() check in pci_dev_keep_suspended() is an optimization, because if is not passed, all of the subsequent checks may be skipped and some of them are much more overhead in general.] Also use the observation that if the device is in runtime suspend at the beginning of the "late" phase of a system-wide suspend-like transition, its state cannot change going forward (runtime PM is disabled for it at that time) until the transition is over and the subsequent system-wide PM callbacks should be skipped for it (as they generally assume the device to not be suspended), so add checks for that in pci_pm_suspend_late/noirq(), pci_pm_freeze_late/noirq() and pci_pm_poweroff_late/noirq(). Moreover, if pci_pm_resume_noirq() or pci_pm_restore_noirq() is called during the subsequent system-wide resume transition and if the device was left in runtime suspend previously, its runtime PM status needs to be changed to "active" as it is going to be put into the full-power state, so add checks for that too to these functions. In turn, if pci_pm_thaw_noirq() runs after the device has been left in runtime suspend, the subsequent "thaw" callbacks need to be skipped for it (as they may not work correctly with a suspended device), so set the power.direct_complete flag for the device then to make the PM core skip those callbacks. In addition to the above add a core helper for checking if DPM_FLAG_SMART_SUSPEND is set and the device runtime PM status is "suspended" at the same time, which is done quite often in the new code (and will be done elsewhere going forward too). Signed-off-by: Rafael J. Wysocki Acked-by: Greg Kroah-Hartman Acked-by: Bjorn Helgaas Documentation/power/pci.txt | 14 ++++++ drivers/base/power/main.c | 6 +++ drivers/pci/pci-driver.c | 103 ++++++++++++++++++++++++++++++++++++-------- include/linux/pm.h | 2 + 4 files changed, 108 insertions(+), 17 deletions(-) commit 302666d8a55ce7eb5fb0bd9fbd9437d74e0ce77c Author: Rafael J. Wysocki Date: Thu Oct 26 12:12:16 2017 +0200 PCI / PM: Drop unnecessary invocations of pcibios_pm_ops callbacks The only user of non-empty pcibios_pm_ops is s390 and it only uses "noirq" callbacks, so drop the invocations of the other pcibios_pm_ops callbacks from the PCI PM code. That will allow subsequent changes to be somewhat simpler. Signed-off-by: Rafael J. Wysocki Acked-by: Greg Kroah-Hartman Acked-by: Bjorn Helgaas Reviewed-by: Ulf Hansson drivers/pci/pci-driver.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 0eab11c9ae3b3cc5dd76f20b81d0247647a6e96f Author: Rafael J. Wysocki Date: Thu Oct 26 12:12:08 2017 +0200 PM / core: Add SMART_SUSPEND driver flag Define and document a SMART_SUSPEND flag to instruct bus types and PM domains that the system suspend callbacks provided by the driver can cope with runtime-suspended devices, so from the driver's perspective it should be safe to leave devices in runtime suspend during system suspend. Setting that flag may also cause middle-layer code (bus types, PM domains etc.) to skip invocations of the ->suspend_late and ->suspend_noirq callbacks provided by the driver if the device is in runtime suspend at the beginning of the "late" phase of the system-wide suspend transition, in which case the driver's system-wide resume callbacks may be invoked back-to-back with its ->runtime_suspend callback, so the driver has to be able to cope with that too. Signed-off-by: Rafael J. Wysocki Acked-by: Greg Kroah-Hartman Reviewed-by: Ulf Hansson Documentation/driver-api/pm/devices.rst | 20 ++++++++++++++++++++ drivers/base/power/main.c | 3 +++ include/linux/pm.h | 8 ++++++++ 3 files changed, 31 insertions(+) commit c2eac4d3a115e2f511844e7bcf73f4e877fbf5da Author: Rafael J. Wysocki Date: Wed Oct 25 14:16:46 2017 +0200 PCI / PM: Use the NEVER_SKIP driver flag Replace the PCI-specific flag PCI_DEV_FLAGS_NEEDS_RESUME with the PM core's DPM_FLAG_NEVER_SKIP one everywhere and drop it. Signed-off-by: Rafael J. Wysocki Acked-by: Greg Kroah-Hartman Acked-by: Bjorn Helgaas Reviewed-by: Ulf Hansson drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/misc/mei/pci-me.c | 2 +- drivers/misc/mei/pci-txe.c | 2 +- drivers/pci/pci.c | 3 +-- include/linux/pci.h | 7 +------ 5 files changed, 5 insertions(+), 11 deletions(-) commit 08810a4119aaebf6318f209ec5dd9828e969cba4 Author: Rafael J. Wysocki Date: Wed Oct 25 14:12:29 2017 +0200 PM / core: Add NEVER_SKIP and SMART_PREPARE driver flags The motivation for this change is to provide a way to work around a problem with the direct-complete mechanism used for avoiding system suspend/resume handling for devices in runtime suspend. The problem is that some middle layer code (the PCI bus type and the ACPI PM domain in particular) returns positive values from its system suspend ->prepare callbacks regardless of whether the driver's ->prepare returns a positive value or 0, which effectively prevents drivers from being able to control the direct-complete feature. Some drivers need that control, however, and the PCI bus type has grown its own flag to deal with this issue, but since it is not limited to PCI, it is better to address it by adding driver flags at the core level. To that end, add a driver_flags field to struct dev_pm_info for flags that can be set by device drivers at the probe time to inform the PM core and/or bus types, PM domains and so on on the capabilities and/or preferences of device drivers. Also add two static inline helpers for setting that field and testing it against a given set of flags and make the driver core clear it automatically on driver remove and probe failures. Define and document two PM driver flags related to the direct- complete feature: NEVER_SKIP and SMART_PREPARE that can be used, respectively, to indicate to the PM core that the direct-complete mechanism should never be used for the device and to inform the middle layer code (bus types, PM domains etc) that it can only request the PM core to use the direct-complete mechanism for the device (by returning a positive value from its ->prepare callback) if it also has been requested by the driver. While at it, make the core check pm_runtime_suspended() when setting power.direct_complete so that it doesn't need to be checked by ->prepare callbacks. Signed-off-by: Rafael J. Wysocki Acked-by: Greg Kroah-Hartman Acked-by: Bjorn Helgaas Reviewed-by: Ulf Hansson Documentation/driver-api/pm/devices.rst | 14 ++++++++++++++ Documentation/power/pci.txt | 19 +++++++++++++++++++ drivers/acpi/device_pm.c | 13 +++++++++---- drivers/base/dd.c | 2 ++ drivers/base/power/main.c | 4 +++- drivers/pci/pci-driver.c | 5 ++++- include/linux/device.h | 10 ++++++++++ include/linux/pm.h | 20 ++++++++++++++++++++ 8 files changed, 81 insertions(+), 6 deletions(-) commit 69a10ca747c2d2d7c0354a883335e097c067ed35 Merge: 96428e9 a192aa9 Author: Rafael J. Wysocki Date: Mon Nov 6 13:54:47 2017 +0100 Merge branch 'acpi-pm' into pm-core commit e7c984cc6f35766019039867875c788c4545147a Author: Colin Ian King Date: Tue Oct 31 13:48:23 2017 +0000 power: supply: pcf50633-charger: remove redundant variable charging_start Variable charging_start is being set but is never read, it is therefore redundant and can be removed. Cleans up sparse warning: drivers/power/supply/pcf50633-charger.c:61:3: warning: Value stored to 'charging_start' is never read Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel drivers/power/supply/pcf50633-charger.c | 2 -- 1 file changed, 2 deletions(-) commit 393ce139d5234a00200f9aaecb6048be138e0833 Author: Colin Ian King Date: Tue Oct 31 10:40:00 2017 +0000 power: supply: generic-adc-battery: remove redundant variable pdata Pointer pdata is assigned but never used, so remove it. Cleans up the clang warning: drivers/power/supply/generic-adc-battery.c:211:2: warning: Value stored to 'pdata' is never read Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel drivers/power/supply/generic-adc-battery.c | 2 -- 1 file changed, 2 deletions(-) commit c09c65ca5c76cc50412fc65e5c91f5dff3e401c5 Author: Markus Elfring Date: Mon Nov 6 13:46:10 2017 +0100 power: supply: max8997: Improve a size determination in 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. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sebastian Reichel drivers/power/supply/max8997_charger.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fe9c0589eeef4b3edbaad9f7500679a2eeafe951 Author: Arnd Bergmann Date: Thu Nov 2 13:20:31 2017 +0100 ARM: 8719/1: NOMMU: work around maybe-uninitialized warning The reworked MPU code produces a new warning in some configurations, presumably starting with the code move after the compiler now makes different inlining decisions: arch/arm/mm/pmsa-v7.c: In function 'adjust_lowmem_bounds_mpu': arch/arm/mm/pmsa-v7.c:310:5: error: 'specified_mem_size' may be used uninitialized in this function [-Werror=maybe-uninitialized] This appears to be harmless, as we know that there is always at least one memblock, and the only way this could get triggered is if the for_each_memblock() loop was never entered. I could not come up with a better workaround than initializing the specified_mem_size to zero, but at least that is the value that the variable would have in the hypothetical case of no memblocks. Fixes: 877ec119dbbf ("ARM: 8706/1: NOMMU: Move out MPU setup in separate module") Signed-off-by: Arnd Bergmann Reviewed-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/mm/pmsa-v7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a14b80cb03bee9a4973e5a91e0ed48df25b57ce Author: Nicolas Pitre Date: Thu Nov 2 21:58:41 2017 +0100 ARM: 8717/2: debug printch/printascii: translate '\n' to "\r\n" not "\n\r" Some terminals apparently have issues with "\n\r" and mess up the display. Let's use the traditional "\r\n" ordering. Signed-off-by: Nicolas Pitre Reported-by: Chris Brandt Tested-by: Chris Brandt Signed-off-by: Russell King arch/arm/kernel/debug.S | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit e3646330cf6667d5cced780ade80f67850c81872 Author: Nicholas Piggin Date: Fri Nov 3 15:13:21 2017 +1100 powerpc/64s/idle: avoid POWER9 DD1 and DD2.0 PMU workaround on DD2.1 DD2.1 does not have to save MMCR0 for all state-loss idle states, only after deep idle states (like other PMU registers). Reviewed-by: Vaidyanathan Srinivasan Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) commit 9d2f510a66ec60411536b83dab831ee091c84307 Author: Nicholas Piggin Date: Fri Nov 3 15:13:20 2017 +1100 powerpc/64s/idle: avoid POWER9 DD1 and DD2.0 ERAT workaround on DD2.1 DD2.1 does not have to flush the ERAT after a state-loss idle. Performance testing was done on a DD2.1 using only the stop0 idle state (the shallowest state which supports state loss), using context_switch selftest configured to ping-poing between two threads on the same core and two different cores. Performance improvement for same core is 7.0%, different cores is 14.8%. Reviewed-by: Vaidyanathan Srinivasan Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/idle_book3s.S | 2 ++ 1 file changed, 2 insertions(+) commit b6b3755e9bec9c686a34ec81eacced0075370cbc Author: Nicholas Piggin Date: Fri Nov 3 15:13:19 2017 +1100 powerpc: add POWER9_DD20 feature Cc: Michael Neuling Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 5 ++++- arch/powerpc/kernel/cputable.c | 20 ++++++++++++++++++++ arch/powerpc/kernel/dt_cpu_ftrs.c | 2 ++ 3 files changed, 26 insertions(+), 1 deletion(-) commit a15fdc340db10ac6f8d73e11f966f012a5e938a7 Merge: e7f774c 9c2e5cb c077fad Author: Mark Brown Date: Mon Nov 6 11:39:41 2017 +0000 Merge remote-tracking branches 'regmap/topic/const' and 'regmap/topic/hwspinlock' into regmap-next commit e7f774c94254adf43e05f84d7501eff0ccd9d5b9 Merge: 0b07194 1b0c22e Author: Mark Brown Date: Mon Nov 6 11:39:39 2017 +0000 Merge remote-tracking branch 'regmap/topic/core' into regmap-next commit c409c2a963475f0288ba3bb47a10f04f6441ffb9 Author: Kuninori Morimoto Date: Mon Nov 6 01:07:27 2017 +0000 ASoC: rsnd: return -EIO if rsnd_dmaen_request_channel() failed PTR_ERR(NULL) is success. Normally when a function returns both NULL and error pointers, it means that NULL is not a error. But, rsnd_dmaen_request_channel() returns NULL if requested resource was failed. Let's return -EIO if rsnd_dmaen_request_channel() was failed on rsnd_dmaen_nolock_start(). This patch fixes commit edce5c496c6a ("ASoC: rsnd: Request/Release DMA channel eachtime") Reported-by: Dan Carpenter Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c077fadf4d1e05bcdd7ddb07758cbd8acf0033f6 Author: Baolin Wang Date: Sat Nov 4 14:08:23 2017 +0800 regmap: Fix unused warning This patch fixes the warning of label 'err_map' defined but not used. Signed-off-by: Baolin Wang Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca0db18da26a47f824fe79e6870ad19470a45525 Author: Mark Brown Date: Mon Nov 6 11:18:37 2017 +0000 regmap: Try to work around Kconfig exploding on HWSPINLOCK Trying to work with hwspinlock from built in code is painful as it can be built modular. Invert the test for REGMAP_HWSPINLOCK for now so we end up requiring users to depend on HWSPINLOCK=y in order to turn on the hwspinlock code. Signed-off-by: Mark Brown drivers/base/regmap/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b13b3cdfd758cd54a475f54b80d838297a023b5b Merge: 2798b80 57b36f7f Author: Kalle Valo Date: Mon Nov 6 12:31:07 2017 +0200 Merge tag 'iwlwifi-next-for-kalle-2017-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next iwlwifi updates * Some new PCI IDs; * A bunch of cleanups; * The timers update by Kees; * Add more register dump call-sites; * A fix for a locking issue in the TX flush code; * Actual implementation of the TX flush code for A000; * An optimization to drop RX frames during restart to avoid BA issues; commit 6f700d38a8c9dc4d786ac4a831073194f17c5076 Author: Cyril Bur Date: Thu Nov 2 14:09:06 2017 +1100 powerpc: Remove facility loadups on transactional {fp, vec, vsx} unavailable After handling a transactional FP, Altivec or VSX unavailable exception. The return to userspace code will detect that the TIF_RESTORE_TM bit is set and call restore_tm_state(). restore_tm_state() will call restore_math() to ensure that the correct facilities are loaded. This means that all the loadup code in {fp,altivec,vsx}_unavailable_tm() is doing pointless work and can simply be removed. Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/kernel/traps.c | 30 ------------------------------ 1 file changed, 30 deletions(-) commit eb5c3f1c86470fc1a57ab28cce15c12e4d6cdf8b Author: Cyril Bur Date: Thu Nov 2 14:09:05 2017 +1100 powerpc: Always save/restore checkpointed regs during treclaim/trecheckpoint Lazy save and restore of FP/Altivec means that a userspace process can be sent to userspace with FP or Altivec disabled and loaded only as required (by way of an FP/Altivec unavailable exception). Transactional Memory complicates this situation as a transaction could be started without FP/Altivec being loaded up. This causes the hardware to checkpoint incorrect registers. Handling FP/Altivec unavailable exceptions while a thread is transactional requires a reclaim and recheckpoint to ensure the CPU has correct state for both sets of registers. tm_reclaim() has optimisations to not always save the FP/Altivec registers to the checkpointed save area. This was originally done because the caller might have information that the checkpointed registers aren't valid due to lazy save and restore. We've also been a little vague as to how tm_reclaim() leaves the FP/Altivec state since it doesn't necessarily always save it to the thread struct. This has lead to an (incorrect) assumption that it leaves the checkpointed state on the CPU. tm_recheckpoint() has similar optimisations in reverse. It may not always reload the checkpointed FP/Altivec registers from the thread struct before the trecheckpoint. It is therefore quite unclear where it expects to get the state from. This didn't help with the assumption made about tm_reclaim(). These optimisations sit in what is by definition a slow path. If a process has to go through a reclaim/recheckpoint then its transaction will be doomed on returning to userspace. This mean that the process will be unable to complete its transaction and be forced to its failure handler. This is already an out if line case for userspace. Furthermore, the cost of copying 64 times 128 bits from registers isn't very long[0] (at all) on modern processors. As such it appears these optimisations have only served to increase code complexity and are unlikely to have had a measurable performance impact. Our transactional memory handling has been riddled with bugs. A cause of this has been difficulty in following the code flow, code complexity has not been our friend here. It makes sense to remove these optimisations in favour of a (hopefully) more stable implementation. This patch does mean that some times the assembly will needlessly save 'junk' registers which will subsequently get overwritten with the correct value by the C code which calls the assembly function. This small inefficiency is far outweighed by the reduction in complexity for general TM code, context switching paths, and transactional facility unavailable exception handler. 0: I tried to measure it once for other work and found that it was hiding in the noise of everything else I was working with. I find it exceedingly likely this will be the case here. Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/include/asm/tm.h | 5 ++-- arch/powerpc/kernel/process.c | 22 ++++++--------- arch/powerpc/kernel/signal_32.c | 2 +- arch/powerpc/kernel/signal_64.c | 2 +- arch/powerpc/kernel/tm.S | 59 ++++++++++++----------------------------- arch/powerpc/kernel/traps.c | 26 +++++------------- 6 files changed, 35 insertions(+), 81 deletions(-) commit 91381b9cb1c3afc162f830ebf698721402c7d577 Author: Cyril Bur Date: Thu Nov 2 14:09:04 2017 +1100 powerpc: Force reload for recheckpoint during tm {fp, vec, vsx} unavailable exception Lazy save and restore of FP/Altivec means that a userspace process can be sent to userspace with FP or Altivec disabled and loaded only as required (by way of an FP/Altivec unavailable exception). Transactional Memory complicates this situation as a transaction could be started without FP/Altivec being loaded up. This causes the hardware to checkpoint incorrect registers. Handling FP/Altivec unavailable exceptions while a thread is transactional requires a reclaim and recheckpoint to ensure the CPU has correct state for both sets of registers. tm_reclaim() has optimisations to not always save the FP/Altivec registers to the checkpointed save area. This was originally done because the caller might have information that the checkpointed registers aren't valid due to lazy save and restore. We've also been a little vague as to how tm_reclaim() leaves the FP/Altivec state since it doesn't necessarily always save it to the thread struct. This has lead to an (incorrect) assumption that it leaves the checkpointed state on the CPU. tm_recheckpoint() has similar optimisations in reverse. It may not always reload the checkpointed FP/Altivec registers from the thread struct before the trecheckpoint. It is therefore quite unclear where it expects to get the state from. This didn't help with the assumption made about tm_reclaim(). This patch is a minimal fix for ease of backporting. A more correct fix which removes the msr parameter to tm_reclaim() and tm_recheckpoint() altogether has been upstreamed to apply on top of this patch. Fixes: dc3106690b20 ("powerpc: tm: Always use fp_state and vr_state to store live registers") Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 4 ++-- arch/powerpc/kernel/traps.c | 22 +++++++++++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) commit a7771176b4392fbc3a17399c51a8c11f2f681afe Author: Cyril Bur Date: Thu Nov 2 14:09:03 2017 +1100 powerpc: Don't enable FP/Altivec if not checkpointed Lazy save and restore of FP/Altivec means that a userspace process can be sent to userspace with FP or Altivec disabled and loaded only as required (by way of an FP/Altivec unavailable exception). Transactional Memory complicates this situation as a transaction could be started without FP/Altivec being loaded up. This causes the hardware to checkpoint incorrect registers. Handling FP/Altivec unavailable exceptions while a thread is transactional requires a reclaim and recheckpoint to ensure the CPU has correct state for both sets of registers. Lazy save and restore of FP/Altivec cannot be done if a process is transactional. If a facility was enabled it must remain enabled whenever a thread is transactional. Commit dc16b553c949 ("powerpc: Always restore FPU/VEC/VSX if hardware transactional memory in use") ensures that the facilities are always enabled if a thread is transactional. A bug in the introduced code may cause it to inadvertently enable a facility that was (and should remain) disabled. The problem with this extraneous enablement is that the registers for the erroneously enabled facility have not been correctly recheckpointed - the recheckpointing code assumed the facility would remain disabled. Further compounding the issue, the transactional {fp,altivec,vsx} unavailable code has been incorrectly using the MSR to enable facilities. The presence of the {FP,VEC,VSX} bit in the regs->msr simply means if the registers are live on the CPU, not if the kernel should load them before returning to userspace. This has worked due to the bug mentioned above. This causes transactional threads which return to their failure handler to observe incorrect checkpointed registers. Perhaps an example will help illustrate the problem: A userspace process is running and uses both FP and Altivec registers. This process then continues to run for some time without touching either sets of registers. The kernel subsequently disables the facilities as part of lazy save and restore. The userspace process then performs a tbegin and the CPU checkpoints 'junk' FP and Altivec registers. The process then performs a floating point instruction triggering a fp unavailable exception in the kernel. The kernel then loads the FP registers - and only the FP registers. Since the thread is transactional it must perform a reclaim and recheckpoint to ensure both the checkpointed registers and the transactional registers are correct. It then (correctly) enables MSR[FP] for the process. Later (on exception exist) the kernel also (inadvertently) enables MSR[VEC]. The process is then returned to userspace. Since the act of loading the FP registers doomed the transaction we know CPU will fail the transaction, restore its checkpointed registers, and return the process to its failure handler. The problem is that we're now running with Altivec enabled and the 'junk' checkpointed registers are restored. The kernel had only recheckpointed FP. This patch solves this by only activating FP/Altivec if userspace was using them when it entered the kernel and not simply if the process is transactional. Fixes: dc16b553c949 ("powerpc: Always restore FPU/VEC/VSX if hardware transactional memory in use") Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 18 ++++++++++++++++-- arch/powerpc/kernel/traps.c | 8 ++++---- 2 files changed, 20 insertions(+), 6 deletions(-) commit 6f469b67ff8a3ec2698ef1041229e111065013ce Author: Cyril Bur Date: Fri Nov 3 13:41:46 2017 +1100 mtd: powernv_flash: Use opal_async_wait_response_interruptible() The OPAL calls performed in this driver shouldn't be using opal_async_wait_response() as this performs a wait_event() which, on long running OPAL calls could result in hung task warnings. wait_event() prevents timely signal delivery which is also undesirable. This patch also attempts to quieten down the use of dev_err() when errors haven't actually occurred and also to return better information up the stack rather than always -EIO. Signed-off-by: Cyril Bur Acked-by: Boris Brezillon Signed-off-by: Michael Ellerman drivers/mtd/devices/powernv_flash.c | 57 +++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 22 deletions(-) commit 77adbd2207e858f5923aa94e4a7d2f29f09217ed Author: Cyril Bur Date: Fri Nov 3 13:41:45 2017 +1100 powerpc/powernv: Add OPAL_BUSY to opal_error_code() Also export opal_error_code() so that it can be used in modules Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal.c | 2 ++ 1 file changed, 2 insertions(+) commit 9aab24495c5644b25ced0d11816cc3c061bf74fc Author: Cyril Bur Date: Fri Nov 3 13:41:44 2017 +1100 powerpc/opal: Add opal_async_wait_response_interruptible() to opal-async This patch adds an _interruptible version of opal_async_wait_response(). This is useful when a long running OPAL call is performed on behalf of a userspace thread, for example, the opal_flash_{read,write,erase} functions performed by the powernv-flash MTD driver. It is foreseeable that these functions would take upwards of two minutes causing the wait_event() to block long enough to cause hung task warnings. Furthermore, wait_event_interruptible() is preferable as otherwise there is no way for signals to stop the process which is going to be confusing in userspace. Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal.h | 2 + arch/powerpc/platforms/powernv/opal-async.c | 84 +++++++++++++++++++++++++++-- 2 files changed, 82 insertions(+), 4 deletions(-) commit 95e1bc1daaeee4d598b235dc85b64b7a0bcc3060 Author: Stewart Smith Date: Fri Nov 3 13:41:43 2017 +1100 powernv/opal-sensor: remove not needed lock Parallel sensor reads could run out of async tokens due to opal_get_sensor_data grabbing tokens but then doing the sensor read behind a mutex, essentially serializing the (possibly asynchronous and relatively slow) sensor read. It turns out that the mutex isn't needed at all, not only should the OPAL interface allow concurrent reads, the implementation is certainly safe for that, and if any sensor we were reading from somewhere isn't, doing the mutual exclusion in the kernel is the wrong place to do it, OPAL should be doing it for the kernel. So, remove the mutex. Additionally, we shouldn't be printing out an error when we don't get a token as the only way this should happen is if we've been interrupted in down_interruptible() on the semaphore. Reported-by: Robert Lippert Signed-off-by: Stewart Smith Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-sensor.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 86cd6d98020924f65a6773784c66c5b842e3e320 Author: Cyril Bur Date: Fri Nov 3 13:41:42 2017 +1100 powerpc/opal: Rework the opal-async interface Future work will add an opal_async_wait_response_interruptible() which will call wait_event_interruptible(). This work requires extra token state to be tracked as wait_event_interruptible() can return and the caller could release the token before OPAL responds. Currently token state is tracked with two bitfields which are 64 bits big but may not need to be as OPAL informs Linux how many async tokens there are. It also uses an array indexed by token to store response messages for each token. The bitfields make it difficult to add more state and also provide a hard maximum as to how many tokens there can be - it is possible that OPAL will inform Linux that there are more than 64 tokens. Rather than add a bitfield to track the extra state, rework the internals slightly. Signed-off-by: Cyril Bur [mpe: Fix __opal_async_get_token() when no tokens are free] Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-async.c | 92 ++++++++++++++++------------- 1 file changed, 51 insertions(+), 41 deletions(-) commit 59cf9a1cfcd9de6392d218fcd69413f2e77babbe Author: Cyril Bur Date: Fri Nov 3 13:41:41 2017 +1100 powerpc/opal: Make __opal_async_{get, release}_token() static There are no callers of both __opal_async_get_token() and __opal_async_release_token(). This patch also removes the possibility of "emergency through synchronous call to __opal_async_get_token()" as such it makes more sense to initialise opal_sync_sem for the maximum number of async tokens. Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal.h | 2 -- arch/powerpc/platforms/powernv/opal-async.c | 10 +++------- 2 files changed, 3 insertions(+), 9 deletions(-) commit efe6941450b80927d3a5721594b7f103cb0c7428 Author: Cyril Bur Date: Fri Nov 3 13:41:40 2017 +1100 mtd: powernv_flash: Don't return -ERESTARTSYS on interrupted token acquisition Because the MTD core might split up a read() or write() from userspace into several calls to the driver, we may fail to get a token but already have done some work, best to return -EINTR back to userspace and have them decide what to do. Signed-off-by: Cyril Bur Acked-by: Boris Brezillon Signed-off-by: Michael Ellerman drivers/mtd/devices/powernv_flash.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e32ec15a2d57977f9f69b222b7b0395a2d60a71c Author: Cyril Bur Date: Fri Nov 3 13:41:39 2017 +1100 mtd: powernv_flash: Remove pointless goto in driver init powernv_flash_probe() has pointless goto statements which jump to the end of the function to simply return a variable. Rather than checking for error and going to the label, just return the error as soon as it is detected. Signed-off-by: Cyril Bur Acked-by: Boris Brezillon Signed-off-by: Michael Ellerman drivers/mtd/devices/powernv_flash.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 25ee52e66949b6e5f041aedff4db9a7d84a6fb2b Author: Cyril Bur Date: Fri Nov 3 13:41:38 2017 +1100 mtd: powernv_flash: Don't treat OPAL_SUCCESS as an error While this driver expects to interact asynchronously, OPAL is well within its rights to return OPAL_SUCCESS to indicate that the operation completed without the need for a callback. We shouldn't treat OPAL_SUCCESS as an error rather we should wrap up and return promptly to the caller. Signed-off-by: Cyril Bur Acked-by: Boris Brezillon Signed-off-by: Michael Ellerman drivers/mtd/devices/powernv_flash.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 44e2aa2b16a872fa8aa4901b3793132e6cfd293a Author: Cyril Bur Date: Fri Nov 3 13:41:37 2017 +1100 mtd: powernv_flash: Use WARN_ON_ONCE() rather than BUG_ON() BUG_ON() should be reserved in situations where we can not longer guarantee the integrity of the system. In the case where powernv_flash_async_op() receives an impossible op, we can still guarantee the integrity of the system. Signed-off-by: Cyril Bur Acked-by: Boris Brezillon Signed-off-by: Michael Ellerman drivers/mtd/devices/powernv_flash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 71e24d7731a2903b1ae2bba2b2971c654d9c2aa6 Author: William A. Kennington III Date: Fri Sep 22 16:58:00 2017 -0700 powerpc/opal: Fix EBUSY bug in acquiring tokens The current code checks the completion map to look for the first token that is complete. In some cases, a completion can come in but the token can still be on lease to the caller processing the completion. If this completed but unreleased token is the first token found in the bitmap by another tasks trying to acquire a token, then the __test_and_set_bit call will fail since the token will still be on lease. The acquisition will then fail with an EBUSY. This patch reorganizes the acquisition code to look at the opal_async_token_map for an unleased token. If the token has no lease it must have no outstanding completions so we should never see an EBUSY, unless we have leased out too many tokens. Since opal_async_get_token_inrerruptible is protected by a semaphore, we will practically never see EBUSY anymore. Fixes: 8d7248232208 ("powerpc/powernv: Infrastructure to support OPAL async completion") Signed-off-by: William A. Kennington III Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-async.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c7da092a1f243bfd1bfb4124f538e69e941882da Author: Borislav Petkov Date: Fri Nov 3 11:20:28 2017 +0100 x86/mm: Define _PAGE_TABLE using _KERNPG_TABLE ... so that the difference is obvious. No functionality change. Signed-off-by: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171103102028.20284-1-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/include/asm/pgtable_types.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 75ec4eb3dc84ee78533bd59bbb71992187bd86fd Merge: 19c5787 15670bf Author: Ingo Molnar Date: Mon Nov 6 09:49:28 2017 +0100 Merge branch 'x86/mm' into x86/asm, to pick up pending changes Concentrate x86 MM and asm related changes into a single super-topic, in preparation for larger changes. Signed-off-by: Ingo Molnar commit abfa2b377f752a13e6caaa8c6c4add6ab9b71ba8 Author: Gustavo A. R. Silva Date: Fri Nov 3 11:58:23 2017 -0500 crypto: chcr - Replace _manual_ swap with swap macro Make use of the swap macro and remove unnecessary variable temp. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 9c9034464860707669e91ce367c9eeb65e4175cd Author: Boris BREZILLON Date: Fri Nov 3 17:52:01 2017 +0100 crypto: marvell - Add a NULL entry at the end of mv_cesa_plat_id_table[] struct platform_device_id should be NULL terminated to let the core detect where the last entry is. Fixes: 07c50a8be41a ("crypto: marvell - Add a platform_device_id table") Signed-off-by: Boris Brezillon Signed-off-by: Herbert Xu drivers/crypto/marvell/cesa.c | 1 + 1 file changed, 1 insertion(+) commit e5cc6e79bbe0b06d3ec56f5210bd4fc90bcf4d2b Author: Jim Quigley Date: Fri Nov 3 09:57:21 2017 +0000 hwrng: virtio - Virtio RNG devices need to be re-registered after suspend/resume The patch for commit: 5c06273401f2eb7b290cadbae18ee00f8f65e893 Author: Amit Shah Date: Sun Jul 27 07:34:01 2014 +0930 virtio: rng: delay hwrng_register() till driver is ready moved the call to hwrng_register() out of the probe routine into the scan routine. We need to call hwrng_register() after a suspend/restore cycle to re-register the device, but the scan function is not invoked for the restore. Add the call to hwrng_register() to virtio_restore(). Reviewed-by: Liam Merwick Signed-off-by: Jim Quigley Signed-off-by: Herbert Xu drivers/char/hw_random/virtio-rng.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 747f6ec6e8f59bb946a5b0a4d4b8d1f45109b6ab Author: Tudor-Dan Ambarus Date: Thu Nov 2 17:12:25 2017 +0200 crypto: atmel - remove empty functions Pointer members of an object with static storage duration, if not explicitly initialized, will be initialized to a NULL pointer. The crypto API checks if these pointers are not NULL before using them, therefore we can safely remove these empty functions. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu drivers/crypto/atmel-aes.c | 20 -------------------- drivers/crypto/atmel-tdes.c | 18 ------------------ 2 files changed, 38 deletions(-) commit f560acc3bbb05a6e974ea245562c94eb5d344768 Author: Tudor-Dan Ambarus Date: Thu Nov 2 16:46:47 2017 +0200 crypto: ecdh - remove empty exit() Pointer members of an object with static storage duration, if not explicitly initialized, will be initialized to a NULL pointer. The crypto API checks if this pointer is not NULL before using it, we are safe to remove the function. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/ecdh.c | 6 ------ 1 file changed, 6 deletions(-) commit 3c24f992a4fc2ebe17b5f0aafabc49ab14876ed3 Author: Salvatore Benedetto Date: Thu Nov 2 09:09:06 2017 +0000 MAINTAINERS: update maintainer for qat Removing myself as I'm not longer following QAT development. Signed-off-by: Salvatore Benedetto Signed-off-by: Herbert Xu MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit dfcd8393efefb7a111f9cb6af69058ecaf4a4d72 Author: Horia Geantă Date: Wed Nov 1 09:13:11 2017 +0200 crypto: caam - remove unused param of ctx_map_to_sec4_sg() ctx_map_to_sec4_sg() function, added in commit 045e36780f115 ("crypto: caam - ahash hmac support") has never used the "desc" parameter, so let's drop it. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f2ac67746534fab0cbc0bc29bfc3e507b1f58474 Author: Horia Geantă Date: Wed Nov 1 09:13:10 2017 +0200 crypto: caam - remove unneeded edesc zeroization Extended descriptor allocation has been changed by commit dde20ae9d6383 ("crypto: caam - Change kmalloc to kzalloc to avoid residual data") to provide zeroized memory, meaning we no longer have to sanitize its members - edesc->src_nents and edesc->dst_dma. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamhash.c | 4 ---- 1 file changed, 4 deletions(-) commit edfd17ff39bce59886e8249e645d6ecfc3e3829c Author: Arnd Bergmann Date: Sat Nov 4 22:26:52 2017 +0100 powerpc/eeh: Stop using do_gettimeofday() This interface is inefficient and deprecated because of the y2038 overflow. ktime_get_seconds() is an appropriate replacement here, since it has sufficient granularity but is more efficient and uses monotonic time. Signed-off-by: Arnd Bergmann Reviewed-by: Andrew Donnellan Acked-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/include/asm/eeh.h | 2 +- arch/powerpc/kernel/eeh_driver.c | 2 +- arch/powerpc/kernel/eeh_pe.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) commit 8a6fb5b5823d863b07f670dc9e791d4622d5b7e9 Merge: 36a5fdf 767601d Author: Dave Airlie Date: Mon Nov 6 16:18:59 2017 +1000 Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next some more amd/ttm fixes. * 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux: drm/ttm: Downgrade pr_err to pr_debug for memory allocation failures drm/ttm: Always and only destroy bo->ttm_resv in ttm_bo_release_list drm/amd/amdgpu: Enabling ACP clock in hw_init (v2) drm/amdgpu/virt: don't dereference undefined 'module' struct commit cbb55eeb49b116bb3880137661ad8ce1ed45d672 Author: Vaibhav Jain Date: Wed Oct 11 18:00:20 2017 +0530 cxl: Rework the implementation of cxl_stop_trace_psl9() Presently the PSL9 specific cxl_stop_trace_psl9() only stops the RX0 traces on the CXL adapter when a PSL error irq is triggered. The patch updates the function to stop all the traces arrays and move them to the FIN state. The implementation issues the mmio to TRACECFG register to stop the trace array iff it already not in FIN state. This prevents the issue of trace data being reset in case of multiple stop mmio issued for a single trace array. Also the patch does some refactoring of existing cxl_stop_trace_psl9() and cxl_stop_trace_psl8() functions by moving them to 'pci.c' from 'debugfs.c' file and marking them as static. Signed-off-by: Vaibhav Jain Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 14 ++++---------- drivers/misc/cxl/debugfs.c | 22 ---------------------- drivers/misc/cxl/pci.c | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 32 deletions(-) commit ac0761ebcb08830d8f64b9181f6736b1a00bf746 Author: Sandipan Das Date: Sat Sep 2 00:23:01 2017 +0530 bpf: take advantage of stack_depth tracking in powerpc JIT Take advantage of stack_depth tracking, originally introduced for x64, in powerpc JIT as well. Round up allocated stack by 16 bytes to make sure it stays aligned for functions called from JITed bpf program. Signed-off-by: Sandipan Das Reviewed-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/net/bpf_jit64.h | 7 ++++--- arch/powerpc/net/bpf_jit_comp64.c | 16 ++++++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) commit 632f0574167ad3f5d646dad6af87d976a703d93e Author: Michael Ellerman Date: Thu Oct 12 15:45:25 2017 +1100 powerpc/tm: Don't check for WARN in TM Bad Thing handling Currently when we take a TM Bad Thing program check exception, we search the bug table to see if the program check was generated by a WARN/WARN_ON etc. That makes no sense, the WARN macros use trap instructions, which should never generate a TM Bad Thing exception. If they ever did that would be a bug and we should oops. We do have some hand-coded bugs in tm.S, using EMIT_BUG_ENTRY, but those are all BUGs not WARNs, and they all use trap instructions anyway. Almost certainly this check was incorrectly copied from the REASON_TRAP handling in the same function. Remove it. Signed-off-by: Michael Ellerman Acked-By: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/kernel/traps.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 1fd6c02207107c8892219dacef01de7ced3d4ce7 Author: Michael Ellerman Date: Tue Oct 24 17:48:49 2017 +0200 powerpc/mm: Add a CONFIG option to choose if radix is used by default Currently if the hardware supports the radix MMU we will use it, *unless* "disable_radix" is passed on the kernel command line. However some users would like the reverse semantics. ie. The kernel uses the hash MMU by default, unless radix is explicitly requested on the command line. So add a CONFIG option to choose whether we use radix by default or not, and expand the disable_radix command line option to allow "disable_radix=no" which *enables* radix. Signed-off-by: Michael Ellerman arch/powerpc/mm/init_64.c | 13 +++++++++++-- arch/powerpc/platforms/Kconfig.cputype | 13 +++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) commit 4e003747043d57aa75c9762fa148ef38afe68dd8 Author: Michael Ellerman Date: Thu Oct 19 15:08:43 2017 +1100 powerpc/64s: Replace CONFIG_PPC_STD_MMU_64 with CONFIG_PPC_BOOK3S_64 CONFIG_PPC_STD_MMU_64 indicates support for the "standard" powerpc MMU on 64-bit CPUs. The "standard" MMU refers to the hash page table MMU found in "server" processors, from IBM mainly. Currently CONFIG_PPC_STD_MMU_64 is == CONFIG_PPC_BOOK3S_64. While it's annoying to have two symbols that always have the same value, it's not quite annoying enough to bother removing one. However with the arrival of Power9, we now have the situation where CONFIG_PPC_STD_MMU_64 is enabled, but the kernel is running using the Radix MMU - *not* the "standard" MMU. So it is now actively confusing to use it, because it implies that code is disabled or inactive when the Radix MMU is in use, however that is not necessarily true. So s/CONFIG_PPC_STD_MMU_64/CONFIG_PPC_BOOK3S_64/, and do some minor formatting updates of some of the affected lines. This will be a pain for backports, but c'est la vie. Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 6 +++--- arch/powerpc/include/asm/nohash/64/pgtable.h | 2 +- arch/powerpc/include/asm/paca.h | 10 +++++----- arch/powerpc/include/asm/page_64.h | 6 +++--- arch/powerpc/include/asm/pgtable-be-types.h | 2 +- arch/powerpc/include/asm/pgtable-types.h | 4 ++-- arch/powerpc/include/asm/tlbflush.h | 2 +- arch/powerpc/kernel/asm-offsets.c | 4 ++-- arch/powerpc/kernel/entry_64.S | 4 ++-- arch/powerpc/kernel/exceptions-64s.S | 8 ++++---- arch/powerpc/kernel/machine_kexec_64.c | 4 ++-- arch/powerpc/kernel/mce_power.c | 4 ++-- arch/powerpc/kernel/paca.c | 12 ++++++------ arch/powerpc/kernel/pci_64.c | 4 ++-- arch/powerpc/kernel/process.c | 12 ++++++------ arch/powerpc/kernel/prom.c | 2 +- arch/powerpc/kernel/setup-common.c | 4 ++-- arch/powerpc/mm/Makefile | 6 +++--- arch/powerpc/mm/dump_hashpagetable.c | 2 +- arch/powerpc/mm/dump_linuxpagetables.c | 10 +++++----- arch/powerpc/mm/init_64.c | 8 ++++---- arch/powerpc/mm/pgtable_64.c | 2 +- arch/powerpc/platforms/Kconfig.cputype | 6 +----- arch/powerpc/platforms/pseries/lpar.c | 8 ++++---- arch/powerpc/platforms/pseries/lparcfg.c | 2 +- arch/powerpc/xmon/xmon.c | 6 +++--- 26 files changed, 68 insertions(+), 72 deletions(-) commit c1807e3f84668c4c1e838386fdc3f6e63df1156c Author: Michael Ellerman Date: Thu Oct 19 15:08:19 2017 +1100 powerpc/64: Free up CPU_FTR_ICSWX The last user of CPU_FTR_ICSWX was removed in commit 6ff4d3e96652 ("powerpc: Remove old unused icswx based coprocessor support"), so free the bit up for future use. Signed-off-by: Michael Ellerman arch/powerpc/include/asm/cputable.h | 6 +++--- arch/powerpc/kernel/dt_cpu_ftrs.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 7f142661d41e5243c99c6ad2ff72aa8647f5eb87 Author: Aneesh Kumar K.V Date: Mon Oct 16 12:31:40 2017 +0530 powerpc/mm/hash: Add pr_fmt() to hash_utils64.c Make the printks look a bit nicer by adding a prefix. Radix config now do radix-mmu: Page sizes from device-tree: radix-mmu: Page size shift = 12 AP=0x0 radix-mmu: Page size shift = 16 AP=0x5 radix-mmu: Page size shift = 21 AP=0x1 radix-mmu: Page size shift = 30 AP=0x2 This patch update hash config to do similar dmesg output. With the patch we have hash-mmu: Page sizes from device-tree: hash-mmu: base_shift=12: shift=12, sllp=0x0000, avpnm=0x00000000, tlbiel=1, penc=0 hash-mmu: base_shift=12: shift=16, sllp=0x0000, avpnm=0x00000000, tlbiel=1, penc=7 hash-mmu: base_shift=12: shift=24, sllp=0x0000, avpnm=0x00000000, tlbiel=1, penc=56 hash-mmu: base_shift=16: shift=16, sllp=0x0110, avpnm=0x00000000, tlbiel=1, penc=1 hash-mmu: base_shift=16: shift=24, sllp=0x0110, avpnm=0x00000000, tlbiel=1, penc=8 hash-mmu: base_shift=20: shift=20, sllp=0x0111, avpnm=0x00000000, tlbiel=0, penc=2 hash-mmu: base_shift=24: shift=24, sllp=0x0100, avpnm=0x00000001, tlbiel=0, penc=0 hash-mmu: base_shift=34: shift=34, sllp=0x0120, avpnm=0x000007ff, tlbiel=0, penc=3 Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/hash_utils_64.c | 1 + 1 file changed, 1 insertion(+) commit 6b148a7ce72a7f87c81cbcde48af014abc0516a9 Author: Christophe Leroy Date: Wed Oct 18 11:16:47 2017 +0200 powerpc/ipic: Fix status get and status clear IPIC Status is provided by register IPIC_SERSR and not by IPIC_SERMR which is the mask register. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman arch/powerpc/sysdev/ipic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d6f934fd48803d9e58040e2cbab2feafe9bb9f01 Author: Alexey Kardashevskiy Date: Wed Sep 27 16:52:31 2017 +1000 powerpc/powernv: Reserve a hole which appears after enabling IOV In order to make generic IOV code work, the physical function IOV BAR should start from offset of the first VF. Since M64 segments share PE number space across PHB, and some PEs may be in use at the time when IOV is enabled, the existing code shifts the IOV BAR to the index of the first PE/VF. This creates a hole in IOMEM space which can be potentially taken by some other device. This reserves a temporary hole on a parent and releases it when IOV is disabled; the temporary resources are stored in pci_dn to avoid kmalloc/free. Signed-off-by: Alexey Kardashevskiy Acked-by: Bjorn Helgaas Signed-off-by: Michael Ellerman arch/powerpc/include/asm/pci-bridge.h | 1 + arch/powerpc/platforms/powernv/pci-ioda.c | 24 +++++++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) commit b8f89fea599d91e674497aad572613eb63181f31 Author: Tyrel Datwyler Date: Thu Sep 28 20:19:20 2017 -0400 powerpc/pseries/vio: Dispose of virq mapping on vdevice unregister When a vdevice is DLPAR removed from the system the vio subsystem doesn't bother unmapping the virq from the irq_domain. As a result we have a virq mapped to a hardware irq that is no longer valid for the irq_domain. A side effect is that we are left with /proc/irq/ affinity entries, and attempts to modify the smp_affinity of the irq will fail. In the following observed example the kernel log is spammed by ics_rtas_set_affinity errors after the removal of a VSCSI adapter. This is a result of irqbalance trying to adjust the affinity every 10 seconds. rpadlpar_io: slot U8408.E8E.10A7ACV-V5-C25 removed ics_rtas_set_affinity: ibm,set-xive irq=655385 returns -3 ics_rtas_set_affinity: ibm,set-xive irq=655385 returns -3 This patch fixes the issue by calling irq_dispose_mapping() on the virq of the viodev on unregister. Fixes: f2ab6219969f ("powerpc/pseries: Add PFO support to the VIO bus") Signed-off-by: Tyrel Datwyler Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/vio.c | 2 ++ 1 file changed, 2 insertions(+) commit 30b49ec798f0984b905fd94d1957d62530f08578 Author: Nicholas Piggin Date: Tue Oct 24 23:06:54 2017 +1000 powerpc/64s/radix: Fix process table entry cache invalidation According to the architecture, the process table entry cache must be flushed with tlbie RIC=2. Currently the process table entry is set to invalid right before the PID is returned to the allocator, with no invalidation. This works on existing implementations that are known to not cache the process table entry for any except the current PIDR. It is architecturally correct and cleaner to invalidate with RIC=2 after clearing the process table entry and before the PID is returned to the allocator. This can be done in arch_exit_mmap that runs before the final flush, and to ensure the final flush (fullmm) is always a RIC=2 variant. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mmu_context.h | 4 ++++ arch/powerpc/mm/mmu_context_book3s64.c | 25 ++++++++++++++++++++----- arch/powerpc/mm/tlb-radix.c | 6 +++++- 3 files changed, 29 insertions(+), 6 deletions(-) commit dffe8449c5dd63ff18b47709de75553586582cd8 Author: Nicholas Piggin Date: Tue Oct 24 23:06:53 2017 +1000 powerpc/64s/radix: Improve preempt handling in TLB code Preempt should be consistently disabled for mm_is_thread_local tests, so bring the rest of these under preempt_disable(). Preempt does not need to be disabled for the mm->context.id tests, which allows simplification and removal of gotos. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb-radix.c | 48 ++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 25 deletions(-) commit 63c9d8a4b394f9d8e995292a7c74648760235b44 Author: Nicholas Piggin Date: Mon Oct 23 17:08:15 2017 +1000 powerpc/powernv: Use FIXUP_ENDIAN_HV in OPAL return Close the recoverability gap for OPAL calls by using FIXUP_ENDIAN_HV in the return path. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-wrappers.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8ca9c08d0c8f6d68db9b592dc149cb8284173ca8 Author: Nicholas Piggin Date: Mon Oct 23 17:08:14 2017 +1000 powerpc/book3s: Add an HV variant of FIXUP_ENDIAN that is recoverable Add an HV variant of FIXUP_ENDIAN which uses HSRR[01] and does not clear MSR[RI], which improves recoverability. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ppc_asm.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit f848ea7f5960ec2684c3bd1c0692e6f5ad47a27d Author: Nicholas Piggin Date: Mon Oct 23 17:08:13 2017 +1000 powerpc/book3s: Use label for FIXUP_ENDIAN macro branch Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/ppc_asm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ff967900c9d4740f6337c6456f111104267633cb Author: Nicholas Piggin Date: Sat Oct 21 17:56:06 2017 +1000 powerpc/64: Fix latency tracing for lazy irq replay When returning from an exception to a soft-enabled context, pending IRQs are replayed but IRQ tracing is not reset, so a number of them can get chained together into the same IRQ-disabled trace. Fix this by having __check_irq_replay re-set IRQ trace. This is conceptually where we respond to the next interrupt, so it fits the semantics of the IRQ tracer. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/irq.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6de6638b35daa0dfb7daefd78d55015655b4d8f3 Author: Nicholas Piggin Date: Sun Nov 5 23:33:55 2017 +1100 KVM: PPC: Book3S HV: Handle host system reset in guest mode If the host takes a system reset interrupt while a guest is running, the CPU must exit the guest before processing the host exception handler. After this patch, taking a sysrq+x with a CPU running in a guest gives a trace like this: cpu 0x27: Vector: 100 (System Reset) at [c000000fdf5776f0] pc: c008000010158b80: kvmppc_run_core+0x16b8/0x1ad0 [kvm_hv] lr: c008000010158b80: kvmppc_run_core+0x16b8/0x1ad0 [kvm_hv] sp: c000000fdf577850 msr: 9000000002803033 current = 0xc000000fdf4b1e00 paca = 0xc00000000fd4d680 softe: 3 irq_happened: 0x01 pid = 6608, comm = qemu-system-ppc Linux version 4.14.0-rc7-01489-g47e1893a404a-dirty #26 SMP [c000000fdf577a00] c008000010159dd4 kvmppc_vcpu_run_hv+0x3dc/0x12d0 [kvm_hv] [c000000fdf577b30] c0080000100a537c kvmppc_vcpu_run+0x44/0x60 [kvm] [c000000fdf577b60] c0080000100a1ae0 kvm_arch_vcpu_ioctl_run+0x118/0x310 [kvm] [c000000fdf577c00] c008000010093e98 kvm_vcpu_ioctl+0x530/0x7c0 [kvm] [c000000fdf577d50] c000000000357bf8 do_vfs_ioctl+0xd8/0x8c0 [c000000fdf577df0] c000000000358448 SyS_ioctl+0x68/0x100 [c000000fdf577e30] c00000000000b220 system_call+0x58/0x6c --- Exception: c01 (System Call) at 00007fff76868df0 SP (7fff7069baf0) is in userspace Fixes: e36d0a2ed5 ("powerpc/powernv: Implement NMI IPI with OPAL_SIGNAL_SYSTEM_RESET") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/hw_irq.h | 1 + arch/powerpc/kernel/exceptions-64s.S | 2 ++ arch/powerpc/kernel/irq.c | 3 ++- arch/powerpc/kvm/book3s_hv.c | 7 ++++++- 4 files changed, 11 insertions(+), 2 deletions(-) commit 19c5787a5ff88a959e5854ab6ddef7f5777c5837 Merge: 1e4c4f6 1943dc0 Author: Ingo Molnar Date: Mon Nov 6 01:43:13 2017 +0100 Merge branch 'x86/fpu' into x86/asm, to pick up fix Signed-off-by: Ingo Molnar commit bb06664a534ba4833373f19ae018efff91ab2908 Author: Chao Yu Date: Fri Nov 3 10:21:05 2017 +0800 f2fs: avoid race in between GC and block exchange During block exchange in {insert,collapse,move}_range, page-block mapping is unstable due to mapping moving or recovery, so there should be no concurrent cache read operation rely on such mapping, nor cache write operation to mess up block exchange. So this patch let background GC be aware of that. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 26 +++++++++++++++++++++----- fs/f2fs/gc.c | 7 +++++++ 2 files changed, 28 insertions(+), 5 deletions(-) commit f6986ede80c9a03babb1cff870964f4de1e763e8 Author: Fan Li Date: Thu Nov 2 11:02:52 2017 +0800 f2fs: save a multiplication for last_nid calculation Use a slightly easier way to calculate last_nid. Signed-off-by: Fan li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b60311dd1ae80d061b17a38e0a4d7f4eb558a17 Author: Chao Yu Date: Thu Nov 2 20:41:03 2017 +0800 f2fs: fix summary info corruption Sometimes, after running generic/270 of fstest, fsck reports summary info and actual position of block address in direct node becoming inconsistent. The root cause is race in between __f2fs_replace_block and change_curseg as below: Thread A Thread B - __clone_blkaddrs - f2fs_replace_block - __f2fs_replace_block - segnoA = GET_SEGNO(sbi, blkaddrA); - type = se->type:=CURSEG_HOT_DATA - if (!IS_CURSEG(sbi, segnoA)) type = CURSEG_WARM_DATA - allocate_data_block - allocate_segment - get_ssr_segment - change_curseg(segnoA, CURSEG_HOT_DATA) - change_curseg(segnoA, CURSEG_WARM_DATA) - reset_curseg - __set_sit_entry_type - change se->type from CURSEG_HOT_DATA to CURSEG_WARM_DATA So finally, hot curseg locates in segnoA, but type of segnoA becomes CURSEG_WARM_DATA. Then if we invoke __f2fs_replace_block(blkaddrB, blkaddrA, true, false), as blkaddrA locates in segnoA, so we will move warm type curseg to segnoA, then change its summary cache and writeback it to summary block. But segnoA is used by hot type curseg too, once it moves or persist, it will cover summary block content with inner old summary cache, result in inconsistent status. This patch tries to fix this issue by introduce global curseg lock to avoid race in between __f2fs_replace_block and change_curseg. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 ++ fs/f2fs/segment.c | 28 +++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) commit 0537b8115387f0b032472037d19e3025f8733ef7 Author: Chao Yu Date: Thu Nov 2 20:41:02 2017 +0800 f2fs: remove dead code in update_meta_page After commit a468f0ef516f ("f2fs: use crc and cp version to determine roll-forward recovery"), last caller of update_meta_page passing @src with NULL is gone, so remove related dead code there. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit dee668c14313bdc3a6a532980200908c046dda11 Author: Chao Yu Date: Thu Nov 2 20:41:01 2017 +0800 f2fs: remove unneeded semicolon Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1954ab4c9aa67a0d5a2457120cbc8c02594de6a Author: Jeff Layton Date: Mon Oct 30 11:11:56 2017 -0400 f2fs: don't bother with inode->i_version f2fs does not set the SB_I_VERSION flag, so the i_version will never be incremented on write. It was recently changed to increment the i_version on a quota write, which isn't necessary here. Signed-off-by: Jeff Layton Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 2 -- 1 file changed, 2 deletions(-) commit bf34c93d264509422e9eb11e2dbcea8d8e875efd Author: Chao Yu Date: Mon Oct 30 17:49:54 2017 +0800 f2fs: check curseg space before foreground GC When we are closing to trigger foreground GC, if there are only a few of dirty metas, we can log these dirty metas in left space of opened segments instead of triggering foreground GC. With this patch, total count of foreground GC triggered by test/generic/* of fstest suit reduce from 254 to 184. So let's do the check before foreground GC anyway. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 3d26fa6be3c487fac7d87dc4a6f02a9ff0f6b1ef Author: Chao Yu Date: Mon Oct 30 17:49:53 2017 +0800 f2fs: use rw_semaphore to protect SIT cache There are some cases user didn't update SIT cache under this lock, so let's use rw_semaphore instead of mutex to enhance concurrently accessing. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 12 ++++++------ fs/f2fs/segment.c | 34 +++++++++++++++++++--------------- fs/f2fs/segment.h | 2 +- 3 files changed, 26 insertions(+), 22 deletions(-) commit ea6767337f86312ebe473585899a159bf50ef1b7 Author: Jaegeuk Kim Date: Fri Oct 6 09:14:28 2017 -0700 f2fs: support quota sys files This patch supports hidden quota files in the system, which will be used for Android. It requires up-to-date f2fs-tools later than v1.9.0. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 9 ++- fs/f2fs/f2fs.h | 9 ++- fs/f2fs/recovery.c | 8 ++- fs/f2fs/super.c | 149 +++++++++++++++++++++++++++++++++++++++++++----- include/linux/f2fs_fs.h | 1 - 5 files changed, 157 insertions(+), 19 deletions(-) commit 234a9689614272d93271b308adbd303b59d266e3 Author: Jaegeuk Kim Date: Thu Oct 5 21:03:06 2017 -0700 f2fs: add quota_ino feature infra This patch adds quota_ino feature infra to be used for quota files. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 6 ++++++ fs/f2fs/sysfs.c | 7 +++++++ include/linux/f2fs_fs.h | 6 +++++- 3 files changed, 18 insertions(+), 1 deletion(-) commit 37a0ab2a3b58d8b922393717442e1f4d4196282e Author: Fan Li Date: Mon Oct 30 15:19:48 2017 +0800 f2fs: optimize __update_nat_bits Make three modification for __update_nat_bits: 1. Take the codes of dealing the nat with nid 0 out of the loop Such nat only needs to be dealt with once at beginning. 2. Use " nat_index == 0" instead of " start_nid == 0" to decide if it's the first nat block It's better that we don't assume @start_nid is the first nid of the nat block it's in. 3. Use " if (nat_blk->entries[i].block_addr != NULL_ADDR)" to explicitly comfirm the value of block_addr use constant to make sure the codes is right, even if the value of NULL_ADDR changes. Signed-off-by: Fan li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit f15194fcfa6bfcb2a4b8dc49fc8c7af2d952e530 Author: Yunlei He Date: Mon Oct 30 14:18:55 2017 +0800 f2fs: modify for accurate fggc node io stat modify for accurate fggc node io stat Signed-off-by: Yunlei He Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 62 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit 65f1b80b33378501ea552ef085e9c31739af356c Author: Yunlong Song Date: Mon Oct 30 09:33:41 2017 +0800 Revert "f2fs: handle dirty segments inside refresh_sit_entry" This reverts commit 5e443818fa0b2a2845561ee25bec181424fb2889 The commit should be reverted because call sequence of below two parts of code must be kept: a. update sit information, it needs to be updated before segment allocation since latter allocation may trigger SSR, and SSR allocation needs latest valid block information of all segments. b. update segment status, it needs to be updated after segment allocation since we can skip updating current opened segment status. Fixes: 5e443818fa0b ("f2fs: handle dirty segments inside refresh_sit_entry") Suggested-by: Chao Yu Signed-off-by: Yunlong Song Reviewed-by: Chao Yu [Jaegeuk Kim: remove refresh_sit_entry function] Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 1 - fs/f2fs/segment.c | 27 ++++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) commit a0761f63ea66e5b70c77ebc4447da84eaa27ac2a Author: Fan Li Date: Sat Oct 28 19:03:37 2017 +0800 f2fs: add a function to move nid This patch add a new function to move nid from one state to another. Move operation is heavily used, by adding a new function for it we can cut down some branches from several flow. Signed-off-by: Fan li Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 57 ++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 21 deletions(-) commit a2a12b679f367014fa86d2cf3309e37c59e155c2 Author: Chao Yu Date: Sat Oct 28 16:52:33 2017 +0800 f2fs: export SSR allocation threshold This patch exports min_ssr_segments threshold in sysfs to let user control triggering SSR allocation flexibly. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++++++ fs/f2fs/f2fs.h | 2 ++ fs/f2fs/segment.c | 3 ++- fs/f2fs/sysfs.c | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) commit 0ea805129d1bc5dacb588392d191f686c91a70bb Author: Chao Yu Date: Sat Oct 28 16:52:32 2017 +0800 f2fs: give correct trimmed blocks in fstrim We have supported to issue discard in specified range during fstrim, it needs to return caller with successfully trimmed bytes in that range instead of bytes of invalid blocks which are scanned in checkpoint. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 1 - fs/f2fs/segment.c | 27 +++++++++++++++++++-------- 2 files changed, 19 insertions(+), 9 deletions(-) commit d62fe971485f15fa08fec2a75ac4e4ffead40a5a Author: Chao Yu Date: Sat Oct 28 16:52:31 2017 +0800 f2fs: support bio allocation error injection This patch adds to support bio allocation error injection to simulate out-of-memory test scenario. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 4 ++-- fs/f2fs/f2fs.h | 23 +++++++++++++++++------ fs/f2fs/segment.c | 2 +- fs/f2fs/super.c | 1 + 4 files changed, 21 insertions(+), 9 deletions(-) commit 01eccef7930f137bed9501bf0923931f45909b94 Author: Chao Yu Date: Sat Oct 28 16:52:30 2017 +0800 f2fs: support get_page error injection This patch adds to support get_page error injection to simulate out-of-memory test scenario. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 2 +- fs/f2fs/f2fs.h | 14 ++++++++++++++ fs/f2fs/gc.c | 4 ++-- fs/f2fs/node.c | 3 ++- fs/f2fs/super.c | 1 + 5 files changed, 20 insertions(+), 4 deletions(-) commit b32d73abc6f0a63503f68a7227b1d46aff1f46af Author: Chao Yu Date: Sat Oct 28 16:52:29 2017 +0800 f2fs: add missing sysfs description There are some missing sysfs entries' description in document, add them. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 80d421450187e894af841849d66614a0456912f9 Author: Yunlong Song Date: Fri Oct 27 20:45:05 2017 +0800 f2fs: support soft block reservation It supports to extend reserved_blocks sysfs interface to be soft threshold, which allows user configure it exceeding current available user space. This patch also introduces a new sysfs interface called current_reserved_blocks, which shows the current blocks that have already been reserved. Signed-off-by: Yunlong Song Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Documentation/ABI/testing/sysfs-fs-f2fs | 13 ++++++++++++- fs/f2fs/f2fs.h | 13 +++++++++++-- fs/f2fs/super.c | 3 ++- fs/f2fs/sysfs.c | 15 ++++++++++++--- 4 files changed, 37 insertions(+), 7 deletions(-) commit bf9c14278545a878b1c1982260123330b5dc05e4 Author: Jaegeuk Kim Date: Mon Oct 16 15:05:16 2017 -0700 f2fs: handle error case when adding xattr entry This patch fixes recovering incomplete xattr entries remaining in inline xattr and xattr block, caused by any kind of errors. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/xattr.c | 47 ++++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 19 deletions(-) commit 6afc662e68b5f988282ff20afd58a89b1c279dca Author: Chao Yu Date: Wed Sep 6 21:59:50 2017 +0800 f2fs: support flexible inline xattr size Now, in product, more and more features based on file encryption were introduced, their demand of xattr space is increasing, however, inline xattr has fixed-size of 200 bytes, once inline xattr space is full, new increased xattr data would occupy additional xattr block which may bring us more space usage and performance regression during persisting. In order to resolve above issue, it's better to expand inline xattr size flexibly according to user's requirement. So this patch introduces new filesystem feature 'flexible inline xattr', and new mount option 'inline_xattr_size=%u', once mkfs enables the feature, we can use the option to make f2fs supporting flexible inline xattr size. To support this feature, we add extra attribute i_inline_xattr_size in inode layout, indicating that how many space inline xattr borrows from block address mapping space in inode layout, by this, we can easily locate and store flexible-sized inline xattr data in inode. Inode disk layout: +----------------------+ | .i_mode | | ... | | .i_ext | +----------------------+ | .i_extra_isize | | .i_inline_xattr_size |-----------+ | ... | | +----------------------+ | | .i_addr | | | - block address or | | | - inline data | | +----------------------+<---+ v | inline xattr | +---inline xattr range +----------------------+<---+ | .i_nid | +----------------------+ | node_footer | | (nid, ino, offset) | +----------------------+ Note that, we have to cnosider backward compatibility which reserved inline_data space, 200 bytes, all the time, reported by Sheng Yong. Previous inline data or directory always reserved 200 bytes in inode layout, even if inline_xattr is disabled. In order to keep inline_dentry's structure for backward compatibility, we get the space back only from inline_data. Signed-off-by: Chao Yu Reported-by: Sheng Yong Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 39 ++++++++++++++++++++++++++------------- fs/f2fs/inode.c | 21 +++++++++++++++++++++ fs/f2fs/namei.c | 13 +++++++++++++ fs/f2fs/node.c | 10 ++++++++-- fs/f2fs/super.c | 32 +++++++++++++++++++++++++++++++- fs/f2fs/sysfs.c | 7 +++++++ fs/f2fs/xattr.c | 18 +++++++++--------- include/linux/f2fs_fs.h | 5 +++-- 8 files changed, 118 insertions(+), 27 deletions(-) commit b4b153f8c27bdf5cfcb92ab0380f3762d98723cc Author: Jaegeuk Kim Date: Thu Oct 26 10:31:22 2017 +0200 f2fs: show current cp state This patch shows whether checkpoint met any error case. Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d8d1389ea1902560b84649b7ef572b117d09d338 Author: Jaegeuk Kim Date: Mon Oct 23 23:50:15 2017 +0200 f2fs: add missing quota_initialize This patch adds to call quota_intialize in f2fs_set_acl, f2fs_unlink, and f2fs_rename. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/namei.c | 9 +++++++++ fs/f2fs/xattr.c | 4 ++++ 2 files changed, 13 insertions(+) commit 8f1572f7ce6169a4687cec1a89ce9c85cbf14eee Author: Jaegeuk Kim Date: Tue Oct 24 09:46:54 2017 +0200 f2fs: show # of dirty segments via sysfs This patch adds one sysfs entry to show # of dirty segments which can be used for gc timing by user. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/sysfs.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1f227a3e215d3613ea6cbc2fbe29caafbcaa8f71 Author: Jaegeuk Kim Date: Mon Oct 23 23:48:49 2017 +0200 f2fs: stop all the operations by cp_error flag This patch replaces to use cp_error flag instead of RDONLY for quota off. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/acl.c | 3 +++ fs/f2fs/checkpoint.c | 1 - fs/f2fs/file.c | 26 ++++++++++++++++++++++++++ fs/f2fs/namei.c | 30 ++++++++++++++++++++++++++++++ fs/f2fs/super.c | 3 +++ 5 files changed, 62 insertions(+), 1 deletion(-) commit 4b519bb493e0866de7659b88dd22dc2cd89dd628 Author: Allen Pais Date: Wed Oct 11 16:03:44 2017 +0530 NFC: Convert timers to use timer_setup() Switch to using the new timer_setup() and from_timer() for net/nfc/* Signed-off-by: Allen Pais Reviewed-by: Kees Cook Signed-off-by: Samuel Ortiz net/nfc/core.c | 8 +++----- net/nfc/hci/core.c | 7 +++---- net/nfc/hci/llc_shdlc.c | 23 +++++++++-------------- net/nfc/llcp_core.c | 14 ++++++-------- 4 files changed, 21 insertions(+), 31 deletions(-) commit 81ade1cd6761e791904801ca9bfc960de4b94916 Author: Colin Ian King Date: Thu Oct 5 10:47:12 2017 +0100 NFC: fdp: make struct nci_ops static The structure nci_ops is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'nci_ops' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Samuel Ortiz drivers/nfc/fdp/fdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5057f6647b3286eee2d9a7eff7f3c072ea7573d9 Author: Colin Ian King Date: Tue Sep 19 15:25:15 2017 +0100 nfc: s3fwrn5: make array match static const Don't populate the read-only array match on the stack, instead make it static const. Makes the object code smaller by over 310 bytes: Before: text data bss dec hex filename 8304 1084 128 9516 252c drivers/nfc/s3fwrn5/firmware.o After: text data bss dec hex filename 7894 1180 128 9202 23f2 drivers/nfc/s3fwrn5/firmware.o Signed-off-by: Colin Ian King Signed-off-by: Samuel Ortiz drivers/nfc/s3fwrn5/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c02b1a9b41c2e728289f96850580a3651e0a8b5f Author: Mateusz Guzik Date: Tue Oct 3 12:58:15 2017 +0200 vfs: grab the lock instead of blocking in __fd_install during resizing Explicit locking in the fallback case provides a safe state of the table. Getting rid of blocking semantics makes __fd_install usable again in non-sleepable contexts, which easies backporting efforts. There is a side effect of slightly nicer assembly for the common case as might_sleep can now be removed. Signed-off-by: Mateusz Guzik Signed-off-by: Al Viro Documentation/filesystems/porting | 4 ---- fs/file.c | 11 +++++++---- 2 files changed, 7 insertions(+), 8 deletions(-) commit 5297908270549b734c7c2556745e2385b6d4941d Author: Mateusz Guzik Date: Tue Oct 3 12:58:14 2017 +0200 vfs: stop clearing close on exec when closing a fd Codepaths allocating a fd always make sure the bit is set/unset depending on flags, thus clearing on close is redundant. Signed-off-by: Mateusz Guzik Signed-off-by: Al Viro fs/file.c | 1 - 1 file changed, 1 deletion(-) commit a122ffd0911d563f4b5e95120259ec5d2e8e3c4f Author: Arvind Yadav Date: Mon Aug 21 22:34:00 2017 +0530 nfc: st21nfca: constify i2c_device_id i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Samuel Ortiz drivers/nfc/st21nfca/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 984553078497082008b8a2bd681facdc789b5acf Author: Arvind Yadav Date: Mon Aug 21 22:33:59 2017 +0530 nfc: st-nci: constify i2c_device_id i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Samuel Ortiz drivers/nfc/st-nci/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81251cc599acfac63d68caa69c6284b546c66fe0 Author: Arvind Yadav Date: Mon Aug 21 22:33:58 2017 +0530 nfc: s3fwrn5: constify i2c_device_id i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Samuel Ortiz drivers/nfc/s3fwrn5/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3737ff15b0e88fd9d4942118c2c9ece917ddc68f Author: Arvind Yadav Date: Mon Aug 21 22:33:57 2017 +0530 nfc: pn544: constify i2c_device_id i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Samuel Ortiz drivers/nfc/pn544/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f98786da9d18ee1ecfac4a68e532b1859cf7d1c0 Author: Arvind Yadav Date: Mon Aug 21 22:33:56 2017 +0530 nfc: pn533: constify i2c_device_id i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Samuel Ortiz drivers/nfc/pn533/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01e682ad085d0e7d253c3bad557a2a4b08bbf5fe Author: Arvind Yadav Date: Mon Aug 21 22:33:55 2017 +0530 nfc: nxp-nci: constify i2c_device_id i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Samuel Ortiz drivers/nfc/nxp-nci/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab1df981574bdb06c2d7f8b6817d5007c2f4a10d Author: Arvind Yadav Date: Mon Aug 21 22:33:54 2017 +0530 nfc: nfcmrvl: constify i2c_device_id i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Samuel Ortiz drivers/nfc/nfcmrvl/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f98bc10e0eb90075665516c6ddc81761d42b3525 Author: Arvind Yadav Date: Mon Aug 21 22:33:53 2017 +0530 nfc: microread: constify i2c_device_id i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Samuel Ortiz drivers/nfc/microread/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63dcb81e5b9e1faadf4b55450141bc4446e5a3d3 Author: Mike Rapoport Date: Tue Oct 3 08:53:07 2017 +0300 include/linux/fs.h: fix comment about struct address_space Before commit 9c5d760b8d22 ("mm: split gfp_mask and mapping flags into separate fields") the private_* fields of struct adrress_space were grouped together and using "ditto" in comments describing the last fields was correct. With introduction of gpf_mask between private_lock and private_list "ditto" references the wrong description. Fix it by using the elaborate description. Signed-off-by: Mike Rapoport Signed-off-by: Al Viro include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c45e3e4c5b134b081e8af362109905427967eb19 Author: Johan Hovold Date: Sun Jul 9 13:08:58 2017 +0200 NFC: fix device-allocation error return A recent change fixing NFC device allocation itself introduced an error-handling bug by returning an error pointer in case device-id allocation failed. This is clearly broken as the callers still expected NULL to be returned on errors as detected by Dan's static checker. Fix this up by returning NULL in the event that we've run out of memory when allocating a new device id. Note that the offending commit is marked for stable (3.8) so this fix needs to be backported along with it. Fixes: 20777bc57c34 ("NFC: fix broken device allocation") Cc: stable # 3.8 Reported-by: Dan Carpenter Signed-off-by: Johan Hovold Signed-off-by: Samuel Ortiz net/nfc/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ceac204e1da942a634d3bb0db3e959edc78e47c7 Author: Josef Bacik Date: Fri Sep 29 15:24:06 2017 -0400 fs: make fiemap work from compat_ioctl We don't need to do anything special with fiemap to make it work with a 64bit kernel from 32bit userspace, so just go down to do_vfs_ioctl(). Without this patch we were incorrectly failing to do fiemap with a 32bit userspace on a 64bit kernel. Signed-off-by: Josef Bacik Reviewed-by: Christoph Hellwig Signed-off-by: Al Viro fs/compat_ioctl.c | 1 + 1 file changed, 1 insertion(+) commit d337b66a4c52c7b04eec661d86c2ef6e168965a2 Author: Jan Harkes Date: Wed Sep 27 15:52:12 2017 -0400 coda: fix 'kernel memory exposure attempt' in fsync When an application called fsync on a file in Coda a small request with just the file identifier was allocated, but the declared length was set to the size of union of all possible upcall requests. This bug has been around for a very long time and is now caught by the extra checking in usercopy that was introduced in Linux-4.8. The exposure happens when the Coda cache manager process reads the fsync upcall request at which point it is killed. As a result there is nobody servicing any further upcalls, trapping any processes that try to access the mounted Coda filesystem. Cc: stable@vger.kernel.org Signed-off-by: Jan Harkes Signed-off-by: Al Viro fs/coda/upcall.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit dfd6fa39d96f5049edb7af26578873e65dbafc9a Author: Hirofumi Nakagawa Date: Tue Sep 26 03:21:27 2017 +0900 pstore: remove unneeded unlikely() IS_ERR() macro it is already including unlikely(). Signed-off-by: Hirofumi Nakagawa Signed-off-by: Al Viro fs/pstore/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 684e73bee4b5ef626a017c101a20f91cf28a75e6 Author: Hirofumi Nakagawa Date: Tue Sep 26 03:21:26 2017 +0900 vfs: remove unneeded unlikely() IS_ERR() macro it is already including unlikely(). Signed-off-by: Hirofumi Nakagawa Signed-off-by: Al Viro fs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 375bc91e634195b094aa4acb30e1d19807122eca Author: Alexandre Belloni Date: Thu Sep 28 11:44:52 2017 +0200 m68k: pull mach_beep in setup.c It is possible to select INPUT_M68K_BEEP in a nommu configuration. This results in the following link error: drivers/input/misc/m68kspkr.o: In function `m68kspkr_event': m68kspkr.c:(.text+0x3a): undefined reference to `mach_beep' m68kspkr.c:(.text+0x5e): undefined reference to `mach_beep' m68kspkr.c:(.text+0x78): undefined reference to `mach_beep' drivers/input/misc/m68kspkr.o: In function `m68kspkr_init': m68kspkr.c:(.init.text+0x4): undefined reference to `mach_beep' Pull the mach_beep definition in setup.c to avoid it. Signed-off-by: Alexandre Belloni Acked-by: Geert Uytterhoeven Signed-off-by: Greg Ungerer arch/m68k/kernel/setup.c | 5 +++++ arch/m68k/kernel/setup_mm.c | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) commit b47c7b6f9f97f3e5596c348bea433ed09cad131d Author: Greg Ungerer Date: Tue Jan 10 22:52:32 2017 +1000 m68k: allow ColdFire m5441x parts to run with MMU enabled The Freescale ColdFire M5441x system-on-chip parts have full paged MMU hardware support. So far though we have only allowed them to be configured for use in non-MMU mode. All required kernel changes to support operation of the M5441x parts with MMU enabled have been pushed into the kernel, so now we can allow it to be configured and used with the MMU enabled. Tested-by: Angelo Dureghello Signed-off-by: Greg Ungerer arch/m68k/Kconfig.cpu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f55ab8f27548ff3431a6567d400c6757c49fd520 Author: Greg Ungerer Date: Tue Sep 5 22:57:06 2017 +1000 m68k: fix ColdFire node shift size calculation The m68k pg_data_table is a fix size array defined in arch/m68k/mm/init.c. Index numbers within it are defined based on memory size. But for Coldfire these don't take into account a non-zero physical RAM base address, and this causes us to access past the end of this array at system start time. Change the node shift calculation so that we keep the index inside its range. Reported-by: Angelo Dureghello Tested-by: Angelo Dureghello Signed-off-by: Greg Ungerer arch/m68k/mm/mcfmmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34fa9b2177a2abec05ae5976eaadbcce648a0982 Author: Greg Ungerer Date: Tue Sep 5 22:48:42 2017 +1000 m68k: move coldfire MMU initialization code The M54[78]x ColdFire parts are not the only members of the ColdFire family that have an MMU. But currently some of the early MMU initialization code is inside the startup code specific to only the ColdFire M54[78]x parts. Move that early ColdFire MMU init code so that it is run for other ColdFire parts running with MMU enabled. Specifically this means that the MMU initialization code will now also be run for the ColdFire M5441x parts when running with MMU enabled. The code move meant that the extern definition for the mmu_context_init() function had to be moved as well. To make it clear that is ColdFire specific I have renamed that with a "cf_" in front of it and put its extern definition in the mcfmmu.h (which is already included by the setup code). Reported-by: Angelo Dureghello Tested-by: Angelo Dureghello Signed-off-by: Greg Ungerer arch/m68k/coldfire/m54xx.c | 4 ---- arch/m68k/include/asm/mcfmmu.h | 1 + arch/m68k/include/asm/mmu_context.h | 1 - arch/m68k/kernel/setup_mm.c | 2 ++ arch/m68k/mm/mcfmmu.c | 2 +- 5 files changed, 4 insertions(+), 6 deletions(-) commit 7f2a2f0d0d66b2d834c793df45af3277bb5f10f4 Author: Javier Martinez Canillas Date: Sun Oct 1 12:49:48 2017 +0200 eeprom: at24: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. To maintain backward compatibility with old Device Trees, only use the OF device ID table .data if the device was registered via OF and the OF node compatible matches an entry in the OF device ID table. Suggested-by: Wolfram Sang Signed-off-by: Javier Martinez Canillas Signed-off-by: Wolfram Sang drivers/misc/eeprom/at24.c | 71 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) commit e78707f2eee7bcfaf400e925581b09425aab1b41 Author: Vinod Koul Date: Fri Nov 3 10:19:42 2017 +0530 MAINTAINERS: update DMAengine documentation location WIth ReST style documentation, we moved it to driver-api/dmaengine so update this in MAINTAINERS entry Signed-off-by: Vinod Koul Signed-off-by: Jonathan Corbet MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbbe0bff9d2aa6f7b2d34059fca2ee808c04a651 Author: Vinod Koul Date: Fri Nov 3 10:19:41 2017 +0530 dmaengine: doc: ReSTize pxa_dma doc This converts and moves pxa_dma file with some format changes for RST style Signed-off-by: Vinod Koul Signed-off-by: Jonathan Corbet Documentation/dmaengine/pxa_dma.txt | 153 -------------------- Documentation/driver-api/dmaengine/index.rst | 10 ++ Documentation/driver-api/dmaengine/pxa_dma.rst | 190 +++++++++++++++++++++++++ 3 files changed, 200 insertions(+), 153 deletions(-) commit 179a214e9e985ef9b14d7e5d9fff20acddb9315b Author: Vinod Koul Date: Fri Nov 3 10:19:40 2017 +0530 dmaengine: doc: ReSTize dmatest doc This converts and moves dmatest file with some format changes for RST style Signed-off-by: Vinod Koul Signed-off-by: Jonathan Corbet Documentation/dmaengine/dmatest.txt | 92 --------------------- Documentation/driver-api/dmaengine/dmatest.rst | 110 +++++++++++++++++++++++++ Documentation/driver-api/dmaengine/index.rst | 10 +++ 3 files changed, 120 insertions(+), 92 deletions(-) commit eeb1c6435293e9d3c30b21579bd5154c013f2843 Author: Vinod Koul Date: Fri Nov 3 10:19:39 2017 +0530 dmaengine: doc: ReSTize client API doc This converts and moves client API file with some format changes for RST style Signed-off-by: Vinod Koul Signed-off-by: Jonathan Corbet Documentation/dmaengine/client.txt | 222 --------------------- Documentation/driver-api/dmaengine/client.rst | 275 ++++++++++++++++++++++++++ Documentation/driver-api/dmaengine/index.rst | 11 ++ 3 files changed, 286 insertions(+), 222 deletions(-) commit 77fe661214d784878d666a226116057191de097b Author: Vinod Koul Date: Fri Nov 3 10:19:38 2017 +0530 dmaengine: doc: ReSTize provider doc This moves and converts provider file with some format changes for RST style Signed-off-by: Vinod Koul Signed-off-by: Jonathan Corbet Documentation/dmaengine/provider.txt | 424 -------------------- Documentation/driver-api/dmaengine/index.rst | 11 + Documentation/driver-api/dmaengine/provider.rst | 508 ++++++++++++++++++++++++ 3 files changed, 519 insertions(+), 424 deletions(-) commit 8a0698c19e37019562d2504d4d724811d7fd411c Author: Vinod Koul Date: Fri Nov 3 10:19:37 2017 +0530 dmaengine: doc: Add ReST style dmaengine document This removes the index file and adds the index.rst as placeholder and update driver-api index to add dmaengine. As a consequence dmaengine documentation will be in driver-api/ Signed-off-by: Vinod Koul Signed-off-by: Jonathan Corbet Documentation/dmaengine/00-INDEX | 8 -------- Documentation/driver-api/dmaengine/index.rst | 13 +++++++++++++ Documentation/driver-api/index.rst | 1 + 3 files changed, 14 insertions(+), 8 deletions(-) commit b4d9421098f863bc7f92a7be8fb21e32fa5df99e Author: Steven Rostedt Date: Tue Oct 31 10:07:05 2017 -0400 ftrace/docs: Add documentation on how to use ftrace from within the kernel With the coming removal of jprobes, using ftrace callbacks is one of the utilities that replace the jprobes functionality. Having a document that explains how to use ftrace as such will help in the transition from jprobes to ftrace. This document is for kernel developers that require attaching a callback to a function within the kernel. Link: http://lkml.kernel.org/r/150724519527.5014.10207042218696587159.stgit@devbox Signed-off-by: Steven Rostedt (VMware) [jc: fixed one formatting issue that broke the docs build] Signed-off-by: Jonathan Corbet Documentation/trace/ftrace-uses.rst | 293 ++++++++++++++++++++++++++++++++++++ 1 file changed, 293 insertions(+) commit 34d8751fd4ffa34e85ee7e85d34168b3f3f62b42 Author: Mimi Zohar Date: Fri Nov 3 11:08:36 2017 -0400 MAINTAINERS: update the IMA, EVM, trusted-keys, encrypted-keys entries Update the mailing list information. Signed-off-by: Mimi Zohar Signed-off-by: James Morris MAINTAINERS | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 2798b80b385384d51a81832556ee9ad25d175f9b Merge: 488e5b3 37f1ba0 Author: David S. Miller Date: Sun Nov 5 23:26:51 2017 +0900 Merge branch 'eBPF-based-device-cgroup-controller' Roman Gushchin says: ==================== eBPF-based device cgroup controller This patchset introduces an eBPF-based device controller for cgroup v2. Patches (1) and (2) are a preparational work required to share some code with the existing device controller implementation. Patch (3) is the main patch, which introduces a new bpf prog type and all necessary infrastructure. Patch (4) moves cgroup_helpers.c/h to use them by patch (4). Patch (5) implements an example of eBPF program which controls access to device files and corresponding userspace test. v3: Renamed constants introduced by patch (3) to BPF_DEVCG_* v2: Added patch (1). v1: https://lkml.org/lkml/2017/11/1/363 ==================== Signed-off-by: David S. Miller commit 37f1ba0909dfa12c75f8e8ea7a2f01355ebd60f1 Author: Roman Gushchin Date: Sun Nov 5 08:15:34 2017 -0500 selftests/bpf: add a test for device cgroup controller Add a test for device cgroup controller. The test loads a simple bpf program which logs all device access attempts using trace_printk() and forbids all operations except operations with /dev/zero and /dev/urandom. Then the test creates and joins a test cgroup, and attaches the bpf program to it. Then it tries to perform some simple device operations and checks the result: create /dev/null (should fail) create /dev/zero (should pass) copy data from /dev/urandom to /dev/zero (should pass) copy data from /dev/urandom to /dev/full (should fail) copy data from /dev/random to /dev/zero (should fail) Signed-off-by: Roman Gushchin Acked-by: Alexei Starovoitov Acked-by: Tejun Heo Cc: Daniel Borkmann Signed-off-by: David S. Miller tools/testing/selftests/bpf/Makefile | 4 +- tools/testing/selftests/bpf/dev_cgroup.c | 60 +++++++++++++++++ tools/testing/selftests/bpf/test_dev_cgroup.c | 93 +++++++++++++++++++++++++++ 3 files changed, 155 insertions(+), 2 deletions(-) commit 9d1f15941967cd80fc3baa3322751fab532f98a4 Author: Roman Gushchin Date: Sun Nov 5 08:15:33 2017 -0500 bpf: move cgroup_helpers from samples/bpf/ to tools/testing/selftesting/bpf/ The purpose of this move is to use these files in bpf tests. Signed-off-by: Roman Gushchin Acked-by: Alexei Starovoitov Acked-by: Tejun Heo Cc: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/Makefile | 5 +- samples/bpf/cgroup_helpers.c | 178 --------------------------- samples/bpf/cgroup_helpers.h | 17 --- tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/cgroup_helpers.c | 178 +++++++++++++++++++++++++++ tools/testing/selftests/bpf/cgroup_helpers.h | 17 +++ 6 files changed, 199 insertions(+), 198 deletions(-) commit ebc614f687369f9df99828572b1d85a7c2de3d92 Author: Roman Gushchin Date: Sun Nov 5 08:15:32 2017 -0500 bpf, cgroup: implement eBPF-based device controller for cgroup v2 Cgroup v2 lacks the device controller, provided by cgroup v1. This patch adds a new eBPF program type, which in combination of previously added ability to attach multiple eBPF programs to a cgroup, will provide a similar functionality, but with some additional flexibility. This patch introduces a BPF_PROG_TYPE_CGROUP_DEVICE program type. A program takes major and minor device numbers, device type (block/character) and access type (mknod/read/write) as parameters and returns an integer which defines if the operation should be allowed or terminated with -EPERM. Signed-off-by: Roman Gushchin Acked-by: Alexei Starovoitov Acked-by: Tejun Heo Cc: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf-cgroup.h | 15 ++++++++++ include/linux/bpf_types.h | 3 ++ include/linux/device_cgroup.h | 8 ++++- include/uapi/linux/bpf.h | 15 ++++++++++ kernel/bpf/cgroup.c | 67 ++++++++++++++++++++++++++++++++++++++++++ kernel/bpf/syscall.c | 7 +++++ kernel/bpf/verifier.c | 1 + tools/include/uapi/linux/bpf.h | 15 ++++++++++ 8 files changed, 130 insertions(+), 1 deletion(-) commit ecf8fecb7828648cba0e42de7464a7e600c93459 Author: Roman Gushchin Date: Sun Nov 5 08:15:31 2017 -0500 device_cgroup: prepare code for bpf-based device controller This is non-functional change to prepare the device cgroup code for adding eBPF-based controller for cgroups v2. The patch performs the following changes: 1) __devcgroup_inode_permission() and devcgroup_inode_mknod() are moving to the device-cgroup.h and converting into static inline. 2) __devcgroup_check_permission() is exported. 3) devcgroup_check_permission() wrapper is introduced to be used by both existing and new bpf-based implementations. Signed-off-by: Roman Gushchin Acked-by: Tejun Heo Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/device_cgroup.h | 61 ++++++++++++++++++++++++++++++++++++++++--- security/device_cgroup.c | 47 ++------------------------------- 2 files changed, 59 insertions(+), 49 deletions(-) commit 67e306fdbed71ab0a6e0d5985e088a49061c523f Author: Roman Gushchin Date: Sun Nov 5 08:15:30 2017 -0500 device_cgroup: add DEVCG_ prefix to ACC_* and DEV_* constants Rename device type and access type constants defined in security/device_cgroup.c by adding the DEVCG_ prefix. The reason behind this renaming is to make them global namespace friendly, as they will be moved to the corresponding header file by following patches. Signed-off-by: Roman Gushchin Cc: David S. Miller Cc: Tejun Heo Cc: Alexei Starovoitov Cc: Daniel Borkmann Signed-off-by: David S. Miller security/device_cgroup.c | 72 ++++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 36 deletions(-) commit 488e5b30d384ec0b9e3151dee69f4a65c548fe34 Merge: bfe26ba 0088cbb Author: David S. Miller Date: Sun Nov 5 23:25:02 2017 +0900 Merge tag 'mlx5-updates-2017-11-04' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2017-11-04 This series includes: From Huy: dscp to priority mapping for Ethernet packet. =================================================== First six patches enable differentiated services code point (dscp) to priority mapping for Ethernet packet. Once this feature is enabled, the packet is routed to the corresponding priority based on its dscp. User can combine this feature with priority flow control (pfc) feature to have priority flow control based on the dscp. Firmware interface: Mellanox firmware provides two control knobs for this feature: QPTS register allow changing the trust state between dscp and pcp mode. The default is pcp mode. Once in dscp mode, firmware will route the packet based on its dscp value if the dscp field exists. QPDPM register allow mapping a specific dscp (0 to 63) to a specific priority (0 to 7). By default, all the dscps are mapped to priority zero. Software interface: This feature is controlled via application priority TLV. IEEE specification P802.1Qcd/D2.1 defines priority selector id 5 for application priority TLV. This APP TLV selector defines DSCP to priority map. This APP TLV can be sent by the switch or can be set locally using software such as lldptool. In mlx5 drivers, we add the support for net dcb's getapp and setapp call back. Mlx5 driver only handles the selector id 5 application entry (dscp application priority application entry). If user sends multiple dscp to priority APP TLV entries on the same dscp, the last sent one will take effect. All the previous sent will be deleted. The firmware trust state (in QPTS register) is changed based on the number of dscp to priority application entries. When the first dscp to priority application entry is added by the user, the trust state is changed to dscp. When the last dscp to priority application entry is deleted by the user, the trust state is changed to pcp. When the port is in DSCP trust state, the transmit queue is selected based on the dscp of the skb. When the port is in DSCP trust state and vport inline mode is not NONE, firmware requires mlx5 driver to copy the IP header to the wqe ethernet segment inline header if the skb has it. This is done by changing the transmit queue sq's min inline mode to L3. Note that the min inline mode of sqs that belong to other features such as xdpsq, icosq are not modified. =================================================== Plus to the dscp series, some small misc changes are include as well: From Inbar, Ethtool msglvl support and some debug prints in DCBNL logic From Or Gerlitz, Enlarge the NIC TC offload table size From Rabie, Initialize destination_flow struct to 0 From Feras, Add inner TTC table to IPoIB flow steering From Tal, Enable CQE based moderation on TX CQ ==================== Signed-off-by: David S. Miller commit bfe26ba94cb7524534a7922e1c7432d0dbb5be2e Merge: 1f25569 0d08709 Author: David S. Miller Date: Sun Nov 5 23:23:27 2017 +0900 Merge branch 'nfp-ethtool-and-related-improvements' Simon Horman says: ==================== nfp: ethtool and related improvements Dirk van der Merwe says: This patch series throws a couple of loosely related items into a single series. Patch 1: Clang compilation fix reported by Matthias Kaehlcke Patch 2: Driver can now do MAC reinit on load when there has been a media override set in the NSP. Patch 3: Refactor the nfp_app_reprs_set API. Patch 4: Similar to vNICs, representors must be able to deal with media override changes in the NSP. Patch 5: Since representors can now handle media overrides, we can allocate the get/set link ndo's to them. Patch 6 & 7: Add support for FEC mode modification. ==================== Signed-off-by: David S. Miller commit 0d08709383377087bc50825db4b47c058c7ab70a Author: Dirk van der Merwe Date: Sat Nov 4 16:49:00 2017 +0100 nfp: implement ethtool FEC mode settings Add support in the driver ethtool ops to modify the NFP FEC modes. The FEC modes can be set for vNIC associated with physical ports or for MAC representor netdevs. Signed-off-by: Dirk van der Merwe Signed-off-by: Simon Horman Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 117 ++++++++++++++++++++- 1 file changed, 116 insertions(+), 1 deletion(-) commit b471232e2caa054e006fa4b5fd4bf15544b00b0f Author: Dirk van der Merwe Date: Sat Nov 4 16:48:59 2017 +0100 nfp: add helpers for FEC support Implement helpers to determine and modify FEC modes via the NSP. The NSP advertises FEC capabilities on a per port basis and provides support for: * Auto mode selection * Reed Solomon * BaseR * None/Off Signed-off-by: Dirk van der Merwe Signed-off-by: Simon Horman Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h | 30 ++++++++++ .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 64 ++++++++++++++++++++++ 2 files changed, 94 insertions(+) commit a564d30ec2b859205d5fdd521df3fb6d342dc461 Author: Dirk van der Merwe Date: Sat Nov 4 16:48:58 2017 +0100 nfp: add get/set link settings ndos to representors Since it is now safe to modify link settings for representors, we can attach the get/set link settings ndos to it. The get/set link settings are nfp_port based operations. If a port becomes invalid, the representor will be removed in the same way a vnic would be. Signed-off-by: Dirk van der Merwe Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 ++ 1 file changed, 2 insertions(+) commit 5fa27d59af2a36c32156e56b6370387f60b67052 Author: Dirk van der Merwe Date: Sat Nov 4 16:48:57 2017 +0100 nfp: resync repr state when port table sync If the NSP port table has been refreshed, resync the representor state with the new port information. At the moment, this only entails looking for invalid ports and killing off representors associated with them. The repr instance becomes NULL which is safe since the app accessor function for reprs returns NULL when it cannot access a repr. Signed-off-by: Dirk van der Merwe Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 6 +++ drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 47 +++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_net_repr.h | 1 + 3 files changed, 54 insertions(+) commit 51ccc37d9d3392884024b272089fd3e864d3cf3c Author: Dirk van der Merwe Date: Sat Nov 4 16:48:56 2017 +0100 nfp: refactor nfp_app_reprs_set The criteria that reprs cannot be replaced with another new set of reprs has been removed. This check is not needed since the only use case that could exercise this at the moment, would be to modify the number of SRIOV VFs without first disabling them. This case is explicitly disallowed in any case and subsequent patches in this series need to be able to replace the running set of reprs. All cases where the return code used to be checked for the nfp_app_reprs_set function have been removed. As stated above, it is not possible for the current code to encounter a case where reprs exist and need to be replaced. Signed-off-by: Dirk van der Merwe Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/main.c | 16 ++++------------ drivers/net/ethernet/netronome/nfp/nfp_app.c | 6 ------ 2 files changed, 4 insertions(+), 18 deletions(-) commit 7717c319d8c025aba426f10f41a9d7f9ea8af192 Author: Jakub Kicinski Date: Sat Nov 4 16:48:55 2017 +0100 nfp: make use of MAC reinit Recent management FW images can perform full reinit of MAC cores without requiring a reboot. When loading the driver check if there are changes pending and if so call NSP MAC reinit. Full application FW reload is still required, and all MACs need to be reinited at the same time (not only the ones which have been reconfigured, and thus potentially causing disruption to unrelated netdevs) therefore for now changing MAC config without reloading the driver still remains future work. Signed-off-by: Jakub Kicinski Tested-by: Dirk van der Merwe Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_main.c | 28 +++++++++++++++++++++- .../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 2 +- .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 5 ++++ .../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h | 6 +++++ 5 files changed, 40 insertions(+), 3 deletions(-) commit 4e59532541c865c85c92d42be4edf2ba6aa4af64 Author: Jakub Kicinski Date: Sat Nov 4 16:48:54 2017 +0100 nfp: don't depend on compiler constant propagation Matthias reports: nfp_eth_set_bit_config() is marked as __always_inline to allow gcc to identify the 'mask' parameter as known to be constant at compile time, which is required to use the FIELD_GET() macro. The forced inlining does the trick for gcc, but for kernel builds with clang it results in undefined symbols: drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.o: In function `__nfp_eth_set_aneg': drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c:(.text+0x787): undefined reference to `__compiletime_assert_492' drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c:(.text+0x7b1): undefined reference to `__compiletime_assert_496' These __compiletime_assert_xyx() calls would have been optimized away if the compiler had seen 'mask' as a constant. Add a macro to extract the mask and shift and pass those to nfp_eth_set_bit_config() separately. Reported-by: Matthias Kaehlcke Signed-off-by: Jakub Kicinski Tested-by: Dirk van der Merwe Signed-off-by: Simon Horman Signed-off-by: David S. Miller .../ethernet/netronome/nfp/nfpcore/nfp_nsp_eth.c | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 1f2556916d974cfb62b6af51660186b5f58bd869 Author: Priyaranjan Jha Date: Fri Nov 3 16:38:48 2017 -0700 tcp: higher throughput under reordering with adaptive RACK reordering wnd Currently TCP RACK loss detection does not work well if packets are being reordered beyond its static reordering window (min_rtt/4).Under such reordering it may falsely trigger loss recoveries and reduce TCP throughput significantly. This patch improves that by increasing and reducing the reordering window based on DSACK, which is now supported in major TCP implementations. It makes RACK's reo_wnd adaptive based on DSACK and no. of recoveries. - If DSACK is received, increment reo_wnd by min_rtt/4 (upper bounded by srtt), since there is possibility that spurious retransmission was due to reordering delay longer than reo_wnd. - Persist the current reo_wnd value for TCP_RACK_RECOVERY_THRESH (16) no. of successful recoveries (accounts for full DSACK-based loss recovery undo). After that, reset it to default (min_rtt/4). - At max, reo_wnd is incremented only once per rtt. So that the new DSACK on which we are reacting, is due to the spurious retx (approx) after the reo_wnd has been updated last time. - reo_wnd is tracked in terms of steps (of min_rtt/4), rather than absolute value to account for change in rtt. In our internal testing, we observed significant increase in throughput, in scenarios where reordering exceeds min_rtt/4 (previous static value). Signed-off-by: Priyaranjan Jha Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 1 + include/linux/tcp.h | 9 +++++-- include/net/tcp.h | 2 ++ net/ipv4/tcp.c | 1 + net/ipv4/tcp_input.c | 7 +++++ net/ipv4/tcp_minisocks.c | 4 +++ net/ipv4/tcp_recovery.c | 48 ++++++++++++++++++++++++++++++++-- 7 files changed, 68 insertions(+), 4 deletions(-) commit 4d420a6a9ddd72bd25baa6e667dd0581506eeacb Author: Andrew Jeffery Date: Fri Nov 3 15:53:02 2017 +1100 pmbus: Add driver for Maxim MAX31785 Intelligent Fan Controller The Maxim MAX31785 is a PMBus device providing closed-loop, multi-channel fan management with temperature and remote voltage sensing. It supports various fan control features, including PWM frequency control, temperature hysteresis, dual tachometer measurements, and fan health monitoring. This patch presents a basic driver using only the existing features of the PMBus subsystem. Signed-off-by: Andrew Jeffery [groeck: Modified description to clarify that fan control is not yet provided] Signed-off-by: Guenter Roeck Documentation/hwmon/max31785 | 51 ++++++++++++++++++ drivers/hwmon/pmbus/Kconfig | 10 ++++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/max31785.c | 116 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 178 insertions(+) commit 6c49b5e26004eef86e7a47093a53be290554351c Merge: 9524846 7354fcb Author: David S. Miller Date: Sun Nov 5 22:31:39 2017 +0900 Merge branch 'dsa-parsing-stage' Vivien Didelot says: ==================== net: dsa: parsing stage When registering a DSA switch, there is basically two stages. The first stage is the parsing of the switch device, from either device tree or platform data. It fetches the DSA tree to which it belongs, and validates its ports. The switch device is then added to the tree, and the second stage is called if this was the last switch of the tree. The second stage is the setup of the tree, which validates that the tree is complete, sets up the routing tables, the default CPU port for user ports, sets up the switch drivers and finally the master interfaces, which makes the whole switch fabric functional. This patch series covers the first parsing stage. It fixes the type of the switch and tree indexes to unsigned int, simplifies the tree reference counting and the switch and CPU ports parsing. ==================== Signed-off-by: David S. Miller commit 7354fcb0a3a3a5518107f8de117a6ce5ce08cc7c Author: Vivien Didelot Date: Fri Nov 3 19:05:30 2017 -0400 net: dsa: resolve tagging protocol at parse time Extend the dsa_port_parse_cpu() function to resolve the tagging protocol at port parsing time, instead of waiting for the whole tree to be complete. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 06e24d0868a361774fc46d0819450915e63a2815 Author: Vivien Didelot Date: Fri Nov 3 19:05:29 2017 -0400 net: dsa: add one port parsing function per type Add dsa_port_parse_user, dsa_port_parse_dsa and dsa_port_parse_cpu functions to factorize the code shared by both OF and pdata parsing. They don't do much for the moment but will be extended later to support tagging protocol resolution for example. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 56 ++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 20 deletions(-) commit 54df6fa9541752b3b28106eb1a9764dcda815fd2 Author: Vivien Didelot Date: Fri Nov 3 19:05:28 2017 -0400 net: dsa: only check presence of link property When parsing a port, simply use of_property_read_bool which checks the presence of a given property, instead of parsing the link phandle. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 975e6e32215e6cbc09b65d762865b1a46e8e9103 Author: Vivien Didelot Date: Fri Nov 3 19:05:27 2017 -0400 net: dsa: rework switch parsing When parsing a switch, we have to identify to which tree it belongs and parse its ports. Provide two functions to separate the OF and platform data specific paths. Also use the of_property_read_variable_u32_array function to parse the OF member array instead of calling of_property_read_u32_index twice. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 117 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 58 insertions(+), 59 deletions(-) commit 0eefe2c1730020c6207bc9695fd466e558301dbb Author: Vivien Didelot Date: Fri Nov 3 19:05:26 2017 -0400 net: dsa: get tree before parsing ports We will need a reference to the dsa_switch_tree when parsing a CPU port, so fetch it right after parsing the member and before parsing ports. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 6da2a940ac6a0680e50b3aaf945e409cea03c346 Author: Vivien Didelot Date: Fri Nov 3 19:05:25 2017 -0400 net: dsa: rework switch addition and removal This patch removes the unnecessary index argument from the dsa_dst_add_ds and dsa_dst_del_ds functions and renames them to dsa_tree_add_switch and dsa_tree_remove_switch respectively. In addition to a more explicit scope, we now check the presence of an existing switch with the same index directly within dsa_tree_add_switch. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) commit 1ca28ec9abff927178b1ea9d6431e4c320145b10 Author: Vivien Didelot Date: Fri Nov 3 19:05:24 2017 -0400 net: dsa: provide a find or new tree helper Rename dsa_get_dst to dsa_tree_find since it doesn't increment the reference counter, rename dsa_add_dst to dsa_tree_alloc for symmetry with dsa_tree_free, and provide a convenient dsa_tree_touch function to find or allocate a new tree. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) commit 65254108b4655dc55e8d8f62ee895960085e73f4 Author: Vivien Didelot Date: Fri Nov 3 19:05:23 2017 -0400 net: dsa: get and put tree reference counting Provide convenient dsa_tree_get and dsa_tree_put functions scoping a DSA tree used to increment and decrement its reference counter, instead of poking directly its kref structure. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) commit 8e5bf9759a06be2251fa96cfd8b412f1808c62f9 Author: Vivien Didelot Date: Fri Nov 3 19:05:22 2017 -0400 net: dsa: simplify tree reference counting DSA trees have a refcount used to automatically free the dsa_switch_tree structure once there is no switch devices inside of it. The refcount is incremented when a switch is added to the tree, and decremented when it is removed from it. But because of kref_init, the refcount is also incremented at initialization, and when looking up the tree from the list for symmetry. Thus the current code stores the number of switches plus one, and makes the switch registration more complex. To simplify the switch registration function, we reset the refcount to zero after initialization and don't increment it when looking up a tree. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) commit 49463b7f2da1a115404b02c5533bc2c2125833a3 Author: Vivien Didelot Date: Fri Nov 3 19:05:21 2017 -0400 net: dsa: make tree index unsigned Similarly to a DSA switch and port, rename the tree index from "tree" to "index" and make it an unsigned int because it isn't supposed to be less than 0. u32 is an OF specific data used to retrieve the value and has no need to be propagated up to the tree index. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 2 +- net/dsa/dsa2.c | 14 +++++++------- net/dsa/slave.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit 99feaafcdb566e8f032e7acc2a303713ad6bf196 Author: Vivien Didelot Date: Fri Nov 3 19:05:20 2017 -0400 net: dsa: make switch index unsigned Define the DSA switch index as an unsigned int, because it will never be less than 0. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 952484610cc2f67303be4feedb0e52a519c31470 Author: Intiyaz Basha Date: Fri Nov 3 14:32:33 2017 -0700 liquidio: do not consider packets dropped by network stack as driver Rx dropped netdev->rx_dropped was including packets dropped by napi_gro_receive. If a packet is dropped by network stack, it should not be counted under driver Rx dropped. Made necessary changes to not include network stack drops under netdev->rx_dropped. Signed-off-by: Intiyaz Basha Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_core.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 0b1c27db12fd338ed912fec18f5cc02d7bd4e54e Author: Quentin Monnet Date: Fri Nov 3 13:59:07 2017 -0700 tools: bpftool: move p_err() and p_info() from main.h to common.c The two functions were declared as static inline in a header file. There is no particular reason why they should be inlined, they just happened to remain in the same header file when they were turned from macros to functions in a precious commit. Make them non-inlined functions and move them to common.c file instead. Suggested-by: Joe Perches Signed-off-by: Quentin Monnet Signed-off-by: Jakub Kicinski Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/bpf/bpftool/common.c | 31 +++++++++++++++++++++++++++++++ tools/bpf/bpftool/main.h | 34 +++------------------------------- 2 files changed, 34 insertions(+), 31 deletions(-) commit 8a3b718ac2c29abcba8e12636710cff3cee8c01b Merge: 28e8c19 b37a530 Author: David S. Miller Date: Sun Nov 5 22:26:20 2017 +0900 Merge branch 'bpf-add-offload-as-a-first-class-citizen' Jakub Kicinski says: ==================== bpf: add offload as a first class citizen This series is my stab at what was discussed at a recent IOvisor bi-weekly call. The idea is to make the device translator run at the program load time. This makes the offload more explicit to the user space. It also makes it easy for the device translator to insert information into the original verifier log. v2: - include linux/bug.h instead of asm/bug.h; - rebased on top of Craig's verifier fix (no changes, the last patch just removes more code now). I checked the set doesn't conflict with Jiri's, Josef's or Roman's patches, but missed Craig's fix :( v1: - rename the ifindex member on load; - improve commit messages; - split nfp patches more. ==================== Signed-off-by: David S. Miller commit b37a530613104aa3f592376c67a462823298759c Author: Jakub Kicinski Date: Fri Nov 3 13:56:30 2017 -0700 bpf: remove old offload/analyzer Thanks to the ability to load a program for a specific device, running verifier twice is no longer needed. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller include/linux/bpf_verifier.h | 5 --- kernel/bpf/verifier.c | 75 -------------------------------------------- net/core/filter.c | 42 ------------------------- 3 files changed, 122 deletions(-) commit c6c580d7bc390f864488c66153a487057e76d9d8 Author: Jakub Kicinski Date: Fri Nov 3 13:56:29 2017 -0700 nfp: bpf: move to new BPF program offload infrastructure Following steps are taken in the driver to offload an XDP program: XDP_SETUP_PROG: * prepare: - allocate program state; - run verifier (bpf_analyzer()); - run translation; * load: - stop old program if needed; - load program; - enable BPF if not enabled; * clean up: - free program image. With new infrastructure the flow will look like this: BPF_OFFLOAD_VERIFIER_PREP: - allocate program state; BPF_OFFLOAD_TRANSLATE: - run translation; XDP_SETUP_PROG: - stop old program if needed; - load program; - enable BPF if not enabled; BPF_OFFLOAD_DESTROY: - free program image. Take advantage of the new infrastructure. Allocation of driver metadata has to be moved from jit.c to offload.c since it's now done at a different stage. Since there is no separate driver private data for verification step, move temporary nfp_meta pointer into nfp_prog. We will now use user space context offsets. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 35 ++++----- drivers/net/ethernet/netronome/nfp/bpf/main.c | 4 + drivers/net/ethernet/netronome/nfp/bpf/main.h | 15 +++- drivers/net/ethernet/netronome/nfp/bpf/offload.c | 85 ++++++++++------------ drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 43 ++--------- drivers/net/ethernet/netronome/nfp/nfp_app.h | 37 ++++++++++ .../net/ethernet/netronome/nfp/nfp_net_common.c | 8 ++ 7 files changed, 121 insertions(+), 106 deletions(-) commit 9314c442d7ddf749d29c09ab48ffa5333d2bf48e Author: Jakub Kicinski Date: Fri Nov 3 13:56:28 2017 -0700 nfp: bpf: move translation prepare to offload.c struct nfp_prog is currently only used internally by the translator. This means there is a lot of parameter passing going on, between the translator and different stages of offload. Simplify things by allocating nfp_prog in offload.c already. We will now use kmalloc() to allocate the program area and only DMA map it for the time of loading (instead of allocating DMA coherent memory upfront). Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 43 ++------ drivers/net/ethernet/netronome/nfp/bpf/main.h | 14 +-- drivers/net/ethernet/netronome/nfp/bpf/offload.c | 128 +++++++++++++++-------- 3 files changed, 94 insertions(+), 91 deletions(-) commit c1c88eae8a8155c55dbbc7363f1f127c43e1b5d1 Author: Jakub Kicinski Date: Fri Nov 3 13:56:27 2017 -0700 nfp: bpf: move program prepare and free into offload.c Most of offload/translation prepare logic will be moved to offload.c. To help git generate more reasonable diffs move nfp_prog_prepare() and nfp_prog_free() functions there as a first step. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 33 ------------------------ drivers/net/ethernet/netronome/nfp/bpf/main.h | 5 ++++ drivers/net/ethernet/netronome/nfp/bpf/offload.c | 33 ++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 33 deletions(-) commit e4a91cd565e2c4e299abe9eb906c506ecc01032a Author: Jakub Kicinski Date: Fri Nov 3 13:56:26 2017 -0700 nfp: bpf: require seamless reload for program replace Firmware supports live replacement of programs for quite some time now. Remove the software-fallback related logic and depend on the FW for program replace. Seamless reload will become a requirement if maps are present, anyway. Load and start stages have to be split now, since replace only needs a load, start has already been done on add. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/main.c | 11 ++--- drivers/net/ethernet/netronome/nfp/bpf/main.h | 2 +- drivers/net/ethernet/netronome/nfp/bpf/offload.c | 62 ++++++++++++------------ drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 - 4 files changed, 35 insertions(+), 42 deletions(-) commit 9ce7a956327ad6c14e1a7eb9f4cb5300c8b61db6 Author: Jakub Kicinski Date: Fri Nov 3 13:56:25 2017 -0700 nfp: bpf: refactor offload logic We currently create a fake cls_bpf offload object when we want to offload XDP. Simplify and clarify the code by moving the TC/XDP specific logic out of common offload code. This is easy now that we don't support legacy TC actions. We only need the bpf program and state of the skip_sw flag. Temporarily set @code to NULL in nfp_net_bpf_offload(), compilers seem to have trouble recognizing it's always initialized. Next patches will eliminate that variable. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/main.c | 67 +++++++++++----------- drivers/net/ethernet/netronome/nfp/bpf/main.h | 4 +- drivers/net/ethernet/netronome/nfp/bpf/offload.c | 73 ++++++++++-------------- 3 files changed, 67 insertions(+), 77 deletions(-) commit 5559eedb78127d6b76c36e3918a75bbc2801653a Author: Jakub Kicinski Date: Fri Nov 3 13:56:24 2017 -0700 nfp: bpf: remove unnecessary include of nfp_net.h BPF offload's main header does not need to include nfp_net.h. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/main.h | 1 - 1 file changed, 1 deletion(-) commit 94508438e8ea4391696c5171527678e9dbd08789 Author: Jakub Kicinski Date: Fri Nov 3 13:56:23 2017 -0700 nfp: bpf: remove the register renumbering leftovers The register renumbering was removed and will not be coming back in its old, naive form, given that it would be fundamentally incompatible with calling functions. Remove the leftovers. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 4 ---- drivers/net/ethernet/netronome/nfp/bpf/main.h | 6 ------ drivers/net/ethernet/netronome/nfp/bpf/offload.c | 13 ++++--------- 3 files changed, 4 insertions(+), 19 deletions(-) commit 012bb8a8b5a2688590f829884acc83697d68a96d Author: Jakub Kicinski Date: Fri Nov 3 13:56:22 2017 -0700 nfp: bpf: drop support for cls_bpf with legacy actions Only support BPF_PROG_TYPE_SCHED_CLS programs in direct action mode. This simplifies preparing the offload since there will now be only one mode of operation for that type of program. We need to know the attachment mode type of cls_bpf programs, because exit codes are interpreted differently for legacy vs DA mode. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 87 ++--------------- drivers/net/ethernet/netronome/nfp/bpf/main.c | 33 ++----- drivers/net/ethernet/netronome/nfp/bpf/main.h | 30 +----- drivers/net/ethernet/netronome/nfp/bpf/offload.c | 108 +--------------------- drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 11 +-- 5 files changed, 22 insertions(+), 247 deletions(-) commit 6c8dfe21c435cf2953e3cee43e12180cbc4f0820 Author: Jakub Kicinski Date: Fri Nov 3 13:56:21 2017 -0700 cls_bpf: allow attaching programs loaded for specific device If TC program is loaded with skip_sw flag, we should allow the device-specific programs to be accepted. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller kernel/bpf/syscall.c | 1 + net/sched/cls_bpf.c | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) commit 248f346ffe9508dee0039db4ac839cb31ba3bdec Author: Jakub Kicinski Date: Fri Nov 3 13:56:20 2017 -0700 xdp: allow attaching programs loaded for specific device Pass the netdev pointer to bpf_prog_get_type(). This way BPF code can decide whether the device matches what the code was loaded/translated for. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller include/linux/bpf.h | 10 ++++++++++ kernel/bpf/syscall.c | 33 +++++++++++++++++++++++++++++---- net/core/dev.c | 6 +++++- 3 files changed, 44 insertions(+), 5 deletions(-) commit 928631e05495fa1f0e9775f555b94dbcbb4e2fb5 Author: Jakub Kicinski Date: Fri Nov 3 13:56:19 2017 -0700 bpftool: print program device bound info If program is bound to a device, print the name of the relevant interface or unknown if the netdev has since been removed. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller tools/bpf/bpftool/prog.c | 31 +++++++++++++++++++++++++++++++ tools/include/uapi/linux/bpf.h | 7 +++++++ 2 files changed, 38 insertions(+) commit bd601b6ada11fdfb9e277f24ad2eb54bc599156b Author: Jakub Kicinski Date: Fri Nov 3 13:56:18 2017 -0700 bpf: report offload info to user space Extend struct bpf_prog_info to contain information about program being bound to a device. Since the netdev may get destroyed while program still exists we need a flag to indicate the program is loaded for a device, even if the device is gone. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller include/linux/bpf.h | 1 + include/uapi/linux/bpf.h | 6 ++++++ kernel/bpf/offload.c | 12 ++++++++++++ kernel/bpf/syscall.c | 5 +++++ 4 files changed, 24 insertions(+) commit ab3f0063c48c26c927851b6767824e35a716d878 Author: Jakub Kicinski Date: Fri Nov 3 13:56:17 2017 -0700 bpf: offload: add infrastructure for loading programs for a specific netdev The fact that we don't know which device the program is going to be used on is quite limiting in current eBPF infrastructure. We have to reverse or limit the changes which kernel makes to the loaded bytecode if we want it to be offloaded to a networking device. We also have to invent new APIs for debugging and troubleshooting support. Make it possible to load programs for a specific netdev. This helps us to bring the debug information closer to the core eBPF infrastructure (e.g. we will be able to reuse the verifer log in device JIT). It allows device JITs to perform translation on the original bytecode. __bpf_prog_get() when called to get a reference for an attachment point will now refuse to give it if program has a device assigned. Following patches will add a version of that function which passes the expected netdev in. @type argument in __bpf_prog_get() is renamed to attach_type to make it clearer that it's only set on attachment. All calls to ndo_bpf are protected by rtnl, only verifier callbacks are not. We need a wait queue to make sure netdev doesn't get destroyed while verifier is still running and calling its driver. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller include/linux/bpf.h | 36 +++++++++ include/linux/bpf_verifier.h | 10 +++ include/linux/netdevice.h | 14 ++++ include/uapi/linux/bpf.h | 1 + kernel/bpf/Makefile | 1 + kernel/bpf/core.c | 10 ++- kernel/bpf/offload.c | 182 +++++++++++++++++++++++++++++++++++++++++++ kernel/bpf/syscall.c | 17 +++- kernel/bpf/verifier.c | 15 +++- 9 files changed, 278 insertions(+), 8 deletions(-) commit f4e63525ee35f9c02e9f51f90571718363e9a9a9 Author: Jakub Kicinski Date: Fri Nov 3 13:56:16 2017 -0700 net: bpf: rename ndo_xdp to ndo_bpf ndo_xdp is a control path callback for setting up XDP in the driver. We can reuse it for other forms of communication between the eBPF stack and the drivers. Rename the callback and associated structures and definitions. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 2 +- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 4 +-- drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 +-- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 6 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 +-- .../net/ethernet/netronome/nfp/nfp_net_common.c | 4 +-- drivers/net/ethernet/qlogic/qede/qede.h | 2 +- drivers/net/ethernet/qlogic/qede/qede_filter.c | 2 +- drivers/net/ethernet/qlogic/qede/qede_main.c | 4 +-- drivers/net/tun.c | 4 +-- drivers/net/virtio_net.c | 4 +-- include/linux/netdevice.h | 23 ++++++++------- net/core/dev.c | 34 +++++++++++----------- net/core/rtnetlink.c | 4 +-- 17 files changed, 56 insertions(+), 55 deletions(-) commit 28e8c1914a20d020893978b67a6d2c618756bc3f Author: Gustavo A. R. Silva Date: Fri Nov 3 11:52:45 2017 -0500 mISDN: l1oip_core: replace _manual_ swap with swap macro Make use of the swap macro and remove unnecessary variables skb and cnt. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/isdn/mISDN/l1oip_core.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 9525d69a36672f9505006b461fb5f7e8f580dfdd Author: Gustavo A. R. Silva Date: Fri Nov 3 09:31:53 2017 -0500 net: plip: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114893 Addresses-Coverity-ID: 114894 Addresses-Coverity-ID: 114895 Addresses-Coverity-ID: 114896 Addresses-Coverity-ID: 114897 Addresses-Coverity-ID: 114898 Addresses-Coverity-ID: 114899 Addresses-Coverity-ID: 114900 Addresses-Coverity-ID: 114901 Addresses-Coverity-ID: 114902 Addresses-Coverity-ID: 114903 Addresses-Coverity-ID: 114904 Addresses-Coverity-ID: 114905 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/plip/plip.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 35e00da36cf42d54270ce25110ce304d12b18586 Author: Eric Dumazet Date: Fri Nov 3 06:18:59 2017 -0700 tcp: do not clear again skb->csum in tcp_init_nondata_skb() tcp_init_nondata_skb() is fed with freshly allocated skbs. They already have a cleared csum field, no need to clear it again. This is based on Neal review on commit 3b11775033dc ("tcp: do not mangle skb->cb[] in tcp_make_synack()"), noticing I did not clear skb->csum. Signed-off-by: Eric Dumazet Reported-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 1 - 1 file changed, 1 deletion(-) commit d0f36847016276920d860d5c089934ff3fea7e30 Author: Eric Dumazet Date: Fri Nov 3 06:09:17 2017 -0700 tcp: tcp_mtu_probing() cleanup Reduce one indentation level to make code more readable. tcp_sync_mss() can be factorized. Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_timer.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit f21506cb42112b1c0b391dae7a700e69a42128e8 Author: Arnd Bergmann Date: Fri Nov 3 13:52:24 2017 +0100 dpaa_eth: avoid uninitialized variable false-positive warning We can now build this driver on ARM, so I ran into a randconfig build warning that presumably had existed on powerpc already. drivers/net/ethernet/freescale/dpaa/dpaa_eth.c: In function 'sg_fd_to_skb': drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:1712:18: error: 'skb' may be used uninitialized in this function [-Werror=maybe-uninitialized] I'm slightly changing the logic here, to make it obvious to the compiler that 'skb' is always initialized. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 727d5fbbadba945c9839de0f78ad22c91cff8e47 Merge: 27c565a 79e1ad1 Author: David S. Miller Date: Sun Nov 5 21:49:17 2017 +0900 Merge branch 'openvswitch-netns' Flavio Leitner says: ==================== Allow openvswitch to query ports in another netns. Today Open vSwitch users are moving internal ports to other namespaces and although packets are flowing OK, the userspace daemon can't find out basic information like if the port is UP or DOWN, for instance. This patchset extends openvswitch API to retrieve the current netnsid of a port. It will be used by the userspace daemon to find out in which netns the port is located. This patchset also extends the rtnetlink getlink call to accept and operate on a given netnsid. More details are available in each patch. ==================== Signed-off-by: David S. Miller commit 79e1ad148c844f5c8b9d76b36b26e3886dca95ae Author: Jiri Benc Date: Thu Nov 2 17:04:38 2017 -0200 rtnetlink: use netnsid to query interface Currently, when an application gets netnsid from the kernel (for example as the result of RTM_GETLINK call on one end of the veth pair), it's not much useful. There's no reliable way to get to the netns fd from the netnsid, nor does any kernel API accept netnsid. Extend the RTM_GETLINK call to also accept netnsid. It will operate on the netns with the given netnsid in such case. Of course, the calling process needs to have enough capabilities in the target name space; for now, require CAP_NET_ADMIN. This can be relaxed in the future. To signal to the calling process that the kernel understood the new IFLA_IF_NETNSID attribute in the query, it will include it in the response. This is needed to detect older kernels, as they will just ignore IFLA_IF_NETNSID and query in the current name space. This patch implemetns IFLA_IF_NETNSID only for get and dump. For set operations, this can be extended later. Signed-off-by: Jiri Benc Signed-off-by: David S. Miller include/uapi/linux/if_link.h | 1 + net/core/rtnetlink.c | 103 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 86 insertions(+), 18 deletions(-) commit 9354d452034273a50a4fd703bea31e5d6b1fc20b Author: Jiri Benc Date: Thu Nov 2 17:04:37 2017 -0200 openvswitch: reliable interface indentification in port dumps This patch allows reliable identification of netdevice interfaces connected to openvswitch bridges. In particular, user space queries the netdev interfaces belonging to the ports for statistics, up/down state, etc. Datapath dump needs to provide enough information for the user space to be able to do that. Currently, only interface names are returned. This is not sufficient, as openvswitch allows its ports to be in different name spaces and the interface name is valid only in its name space. What is needed and generally used in other netlink APIs, is the pair ifindex+netnsid. The solution is addition of the ifindex+netnsid pair (or only ifindex if in the same name space) to vport get/dump operation. On request side, ideally the ifindex+netnsid pair could be used to get/set/del the corresponding vport. This is not implemented by this patch and can be added later if needed. Signed-off-by: Jiri Benc Signed-off-by: David S. Miller include/uapi/linux/openvswitch.h | 2 ++ net/openvswitch/datapath.c | 47 +++++++++++++++++++++++++++++----------- net/openvswitch/datapath.h | 4 ++-- net/openvswitch/dp_notify.c | 4 ++-- 4 files changed, 40 insertions(+), 17 deletions(-) commit 7cbebc8a142238da3c2966f87b81ace491c8f089 Author: Jiri Benc Date: Thu Nov 2 17:04:36 2017 -0200 net: export peernet2id_alloc It will be used by openvswitch. Signed-off-by: Jiri Benc Signed-off-by: David S. Miller net/core/net_namespace.c | 1 + 1 file changed, 1 insertion(+) commit 8aee55759643676c46d120c2bae821f2669969c6 Author: Wolfram Sang Date: Thu Nov 2 00:18:59 2017 +0100 MAINTAINERS: new maintainer for AT24 driver Bartosz agreed to take over maintainership from me. Thank you very much and good luck and have fun! :) Signed-off-by: Wolfram Sang Acked-by: Bartosz Golaszewski MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eb3b05fb0ff2cf0097e70b6c5e3afbe854a8deb7 Author: Wolfram Sang Date: Sat Nov 4 21:49:26 2017 +0100 i2c: nuc900: remove platform_data, too Commit 7da62cb1853025 ("i2c: nuc900: remove driver") removed the driver, we should remove the platform_data as well. Signed-off-by: Wolfram Sang include/linux/platform_data/i2c-nuc900.h | 9 --------- 1 file changed, 9 deletions(-) commit 43aaf4f03f063b12bcba2f8b800fdec85e2acc75 Author: Kuppuswamy Sathyanarayanan Date: Sun Oct 29 02:49:55 2017 -0700 platform/x86: intel_pmc_ipc: Use MFD framework to create dependent devices Currently, we have lot of repetitive code in dependent device resource allocation and device creation handling code. This logic can be improved if we use MFD framework for dependent device creation. This patch adds this support. Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_pmc_ipc.c | 398 ++++++++++++----------------------- 1 file changed, 139 insertions(+), 259 deletions(-) commit 6cc8cbbc8868033f279b63e98b26b75eaa0006ab Author: Kuppuswamy Sathyanarayanan Date: Sun Oct 29 02:49:54 2017 -0700 platform/x86: intel_punit_ipc: Fix resource ioremap warning For PUNIT device, ISPDRIVER_IPC and GTDDRIVER_IPC resources are not mandatory. So when PMC IPC driver creates a PUNIT device, if these resources are not available then it creates dummy resource entries for these missing resources. But during PUNIT device probe, doing ioremap on these dummy resources generates following warning messages. intel_punit_ipc: can't request region for resource [mem 0x00000000] intel_punit_ipc: can't request region for resource [mem 0x00000000] intel_punit_ipc: can't request region for resource [mem 0x00000000] intel_punit_ipc: can't request region for resource [mem 0x00000000] This patch fixes this issue by adding extra check for resource size before performing ioremap operation. Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_punit_ipc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ce7ff1cffdaf82354aca5f4c8691e5c85474fbde Author: Colin Ian King Date: Tue Oct 31 11:03:18 2017 +0000 platform/x86: dell-smo8800: remove redundant assignments to byte_data Variable byte_data is being initialized and re-assigned with values that are never read. Remove these as these redundant assignments. Cleans up clang warning: drivers/platform/x86/dell-smo8800.c:106:2: warning: Value stored to 'byte_data' is never read Signed-off-by: Colin Ian King Acked-by: Pali Rohár Signed-off-by: Andy Shevchenko drivers/platform/x86/dell-smo8800.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9968e12a291e639dd51d1218b694d440b22a917f Author: Stefan Brüns Date: Fri Nov 3 03:01:53 2017 +0100 platform/x86: hp-wmi: Fix tablet mode detection for convertibles Commit f9cf3b2880cc ("platform/x86: hp-wmi: Refactor dock and tablet state fetchers") consolidated the methods for docking and laptop mode detection, but omitted to apply the correct mask for the laptop mode (it always uses the constant for docking). Fixes: f9cf3b2880cc ("platform/x86: hp-wmi: Refactor dock and tablet state fetchers") Signed-off-by: Stefan Brüns Signed-off-by: Andy Shevchenko drivers/platform/x86/hp-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbc15e30400c9d927eda37445c78a7811a68e4a7 Author: Kees Cook Date: Wed Oct 4 17:54:21 2017 -0700 platform/x86: intel_ips: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Moves timer structure off stack and into struct ips_driver. Cc: Darren Hart Cc: Andy Shevchenko Cc: platform-driver-x86@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_ips.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit e4a18052bb99e25d2c0074981120b76638285c22 Author: Markus Elfring Date: Wed Nov 1 19:00:59 2017 +0100 platform/x86: sony-laptop: Drop variable assignment in sony_nc_setup_rfkill() The local variable "err" will eventually be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Andy Shevchenko drivers/platform/x86/sony-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6c8a317ab208aee223776327c06f23342492d54 Author: Markus Elfring Date: Wed Nov 1 18:42:45 2017 +0100 platform/x86: sony-laptop: Fix error handling in sony_nc_setup_rfkill() Source code review for a specific software refactoring showed the need for another correction because the error code "-1" was returned so far if a call of the function "sony_call_snc_handle" failed here. Thus assign the return value from these two function calls also to the variable "err" and provide it in case of a failure. Fixes: d6f15ed876b83a1a0eba1d0473eef58acc95444a ("sony-laptop: use soft rfkill status stored in hw") Suggested-by: Andy Shevchenko Link: https://lkml.org/lkml/2017/10/31/463 Link: https://lkml.kernel.org/r/ Signed-off-by: Markus Elfring Signed-off-by: Andy Shevchenko drivers/platform/x86/sony-laptop.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit e9c16affe064c84cdccbe96d9896fe149602bceb Author: Kees Cook Date: Sat Nov 4 19:36:43 2017 -0700 drivers/pcmcia: omap1: Fix error in automated timer conversion One part of automated timer conversion tools did not take into account void * variables when searching out prior direct timer callback usage, which resulted in an attempt to dereference the timer field without a proper type. Reported-by: kbuild test robot Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/pcmcia/omap_cf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0088cbbc4b66b287132a8a04b3e2509d44a6387c Author: Tal Gilboa Date: Tue Sep 26 16:20:43 2017 +0300 net/mlx5e: Enable CQE based moderation on TX CQ By using CQE based moderation on TX CQ we can reduce the number of TX interrupt rate. Besides the benefit of less interrupts, this also allows the kernel to better utilize TSO. Since TSO has some CPU overhead, it might not aggregate when CPU is under high stress. By reducing the interrupt rate and the CPU utilization, we can get better aggregation and better overall throughput. The feature is enabled by default and has a private flag in ethtool for control. Throughput, interrupt rate and TSO utilization improvements: (ConnectX-4Lx 40GbE, unidirectional, 1/16 TCP streams, 64B packets) --------------------------------------------------------- Metric | Streams | CQE Based | EQE Based | improvement --------------------------------------------------------- BW | 1 | 2.4Gb/s | 2.15Gb/s | +11.6% IR | 1 | 27Kips | 50.6Kips | -46.7% TSO Util | 1 | 74.6% | 71% | +5% BW | 16 | 29Gb/s | 25.85Gb/s | +12.2% IR | 16 | 482Kips | 745Kips | -35.3% TSO Util | 16 | 69.1% | 49% | +41.1% *BW = Bandwidth, IR = Interrupt rate, ips = interrupt per second. TSO Util = bytes in TSO sessions / all bytes transferred Signed-off-by: Tal Gilboa Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 9 +++-- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 39 +++++++++++++++++----- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 38 +++++++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c | 8 +++-- 4 files changed, 71 insertions(+), 23 deletions(-) commit 458821c72bd02fcd484b9e46526c55e4ab6f57a4 Author: Feras Daoud Date: Thu Sep 7 16:05:10 2017 +0300 net/mlx5e: IPoIB, Add inner TTC table to IPoIB flow steering For supported platforms, add inner TTC flow table to enhanced IPoIB flow steering. Signed-off-by: Feras Daoud Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 12 +++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) commit 4c5009c5256d065696d280f3a8f16af090bea3e2 Author: Rabie Loulou Date: Wed Oct 18 17:58:42 2017 +0300 net/mlx5: Initialize destination_flow struct to 0 This is needed in order to enlarge it with more members that will get value of 0 when not set. Signed-off-by: Rabie Loulou Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c | 10 +++++----- drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 8 ++++---- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 6 +++--- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) commit 21b9c1449d21f347e57ba5e69eec460066e5182a Author: Or Gerlitz Date: Thu Jan 12 16:19:29 2017 +0200 net/mlx5: Enlarge the NIC TC offload table size The NIC TC offload table size was hard coded to 1k. Change it to be min(max NIC RX table size, min(max flow counters, 64k) * num flow groups) where the max values are read from the firmware and the number of flow groups is hard-coded as before this change. We don't know upfront the division of flows to groups (== different masks). This setup allows each group to be of size up to the where we want to go (when supported, all offloaded flows use counters). Thus, we don't expect multiple occurences for a group which in turn would add steering hops. Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 5da8bc3effb61f0f165ca45c80f4818a234c9f91 Author: Inbar Karmy Date: Sun Jun 18 09:47:35 2017 +0300 net/mlx5e: DCBNL, Add debug messages log Add debug print when changing the configuration of QoS through dcbnl. Use ethtool -s msglvl hw on/off to toggle debug messages. Signed-off-by: Inbar Karmy Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 79c48764e1da40341b0e8149417c00efc9849b43 Author: Gal Pressman Date: Tue Jul 28 09:35:31 2015 +0300 net/mlx5e: Add support for ethtool msglvl support Use ethtool -s msglvl on/off to toggle debug messages. Signed-off-by: Gal Pressman Signed-off-by: Inbar Karmy Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 11 +++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 13 +++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 1 + 3 files changed, 25 insertions(+) commit fbcb127e89ba8a4ccbec609a27f8d110474044c8 Author: Huy Nguyen Date: Tue Jul 18 16:34:51 2017 -0500 net/mlx5e: Support DSCP trust state to Ethernet's IP packet on SQ If the port is in DSCP trust state, packets are placed in the right priority queue based on the dscp value. This is done by selecting the transmit queue based on the dscp of the skb. Until now select_queue honors priority only from the vlan header. However that is not sufficient in cases where port trust state is DSCP mode as packet might not even contain vlan header. Therefore if the port is in dscp trust state and vport's min inline mode is not NONE, copy the IP header to the eseg's inline header if the skb has it. This is done by changing the transmit queue sq's min inline mode to L3. Note that the min inline mode of sqs that belong to other features such as xdpsq, icosq are not modified. Signed-off-by: Huy Nguyen Reviewed-by: Parav Pandit Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + .../net/ethernet/mellanox/mlx5/core/en_common.c | 12 +++++++ drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 37 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +-- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 24 ++++++++++++-- 5 files changed, 73 insertions(+), 6 deletions(-) commit 2a5e7a1344f4dff71bb921ee0c9ecf7f5932e570 Author: Huy Nguyen Date: Tue Jul 18 16:23:36 2017 -0500 net/mlx5e: Add dcbnl dscp to priority support This patch implements dcbnl hooks to set and delete DSCP to priority map as defined by the DCB subsystem. Device maintains internal trust state which needs to be set to DSCP state for performing DSCP to priority mapping. When the first dscp to priority APP entry is added by the user, the trust state is changed to dscp. When the last dscp to priority APP entry is deleted by the user, the trust state is changed to pcp. If user sends multiple dscp to priority APP entries on the same dscp, the last sent one will take effect. All the previous sent will be deleted. The dscp to priority APP entries are added and deleted in the net/dcb APP database using dcb_ieee_setapp/getapp. Signed-off-by: Huy Nguyen Reviewed-by: Parav Pandit Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 15 +- drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 204 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 15 +- 3 files changed, 232 insertions(+), 2 deletions(-) commit 415a64aa8dc6b4fc478609c549ca652d95a12f13 Author: Huy Nguyen Date: Tue Jul 18 16:08:46 2017 -0500 net/mlx5: QPTS and QPDPM register firmware command support The QPTS register allows changing the priority trust state between pcp and dscp. Add support to get/set trust state from device. When the port is in pcp/dscp trust state, packet is routed by hardware to matching priority based on its pcp/dscp value respectively. The QPDPM register allow channing the dscp to priority mapping. Add support to get/set dscp to priority mapping from device. Note that to change a dscp mapping, the "e" bit of this dscp structure must be set in the QPDPM firmware command. Signed-off-by: Huy Nguyen Reviewed-by: Parav Pandit Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/port.c | 99 ++++++++++++++++++++++++++ include/linux/mlx5/driver.h | 7 ++ include/linux/mlx5/mlx5_ifc.h | 20 ++++++ include/linux/mlx5/port.h | 5 ++ 4 files changed, 131 insertions(+) commit 71c70eb21c33c60433b95e72a59d40bb128db649 Author: Huy Nguyen Date: Wed Aug 2 21:36:23 2017 -0500 net/mlx5: Add MLX5_SET16 and MLX5_GET16 Add MLX5_SET16 and MLX5_GET16 for 16bit structure field in firmware command. Signed-off-by: Huy Nguyen Reviewed-by: Parav Pandit Reviewed-by: Eli Cohen Signed-off-by: Saeed Mahameed include/linux/mlx5/device.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit c02762eb20cb57ec5b7c037b056c37d5838c803f Author: Huy Nguyen Date: Tue Jul 18 16:03:17 2017 -0500 net/mlx5: QCAM register firmware command support The QCAM register provides capability bit for all the QoS registers using ACCESS_REG command. Signed-off-by: Huy Nguyen Reviewed-by: Parav Pandit Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fw.c | 10 ++++++ .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/port.c | 12 +++++++ include/linux/mlx5/device.h | 14 ++++++++ include/linux/mlx5/driver.h | 2 ++ include/linux/mlx5/mlx5_ifc.h | 40 +++++++++++++++++++++- 6 files changed, 79 insertions(+), 1 deletion(-) commit ee20598194500e82c477cf13e52b58e569446ed0 Author: Huy Nguyen Date: Tue Jul 18 15:42:15 2017 -0500 net/dcb: Add dscp to priority selector type IEEE specification P802.1Qcd/D2.1 defines priority selector 5. This APP TLV selector defines DSCP to priority map. This patch defines such DSCP selector. Signed-off-by: Huy Nguyen Reviewed-by: Parav Pandit Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed include/uapi/linux/dcbnl.h | 1 + 1 file changed, 1 insertion(+) commit 27c565ae9d554fa1c00c799754cff43476c8d3b5 Author: Eric Dumazet Date: Sat Nov 4 08:53:27 2017 -0700 ipv6: remove IN6_ADDR_HSIZE from addrconf.h IN6_ADDR_HSIZE is private to addrconf.c, move it here to avoid confusion. Signed-off-by: Eric Dumazet Acked-by: David Ahern Signed-off-by: David S. Miller include/net/addrconf.h | 3 --- net/ipv6/addrconf.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) commit df7e8e2e3e59fe29c24f09d7c3b68e732d661af3 Author: Eric Dumazet Date: Sat Nov 4 08:27:14 2017 -0700 pktgen: do not abuse IN6_ADDR_HSIZE pktgen accidentally used IN6_ADDR_HSIZE, instead of using the size of an IPv6 address. Since IN6_ADDR_HSIZE recently was increased from 16 to 256, this old bug is hitting us. Fixes: 3f27fb23219e ("ipv6: addrconf: add per netns perturbation in inet6_addr_hash()") Signed-off-by: Eric Dumazet Reported-by: Dan Carpenter Signed-off-by: David S. Miller net/core/pktgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17c45b90061a76fceadffbce8d85a9107a05a918 Author: Markus Elfring Date: Fri Nov 3 22:20:38 2017 +0100 iSCSI-target: Use common error handling code in iscsi_decode_text_input() Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_parameters.c | 39 ++++++++++++-------------- 1 file changed, 18 insertions(+), 21 deletions(-) commit abbae6d560c1d562c5c0d10785469734784ef961 Author: Rasmus Villemoes Date: Wed Sep 21 01:17:24 2016 +0200 ecryptfs: remove private bin2hex implementation Calling sprintf in a loop is not very efficient, and in any case, we already have an implementation of bin-to-hex conversion in lib/ which we might as well use. Note that ecryptfs_to_hex used to nul-terminate the destination (and the kernel doc was wrong about the required output size), while bin2hex doesn't. [All but one user of ecryptfs_to_hex explicitly nul-terminates the result anyway.] Signed-off-by: Rasmus Villemoes [tyhicks: Include in ecryptfs_kernel.h] Signed-off-by: Tyler Hicks fs/ecryptfs/crypto.c | 15 --------------- fs/ecryptfs/ecryptfs_kernel.h | 9 ++++++++- 2 files changed, 8 insertions(+), 16 deletions(-) commit 0996b67df6c1354f2df09c33ac652c37e2e2471f Author: Colin Ian King Date: Tue Sep 27 05:18:02 2016 -0700 ecryptfs: add missing \n to end of various error messages Trival fix, some error messages are missing a \n, so add it. Signed-off-by: Colin Ian King Signed-off-by: Tyler Hicks fs/ecryptfs/keystore.c | 2 +- fs/ecryptfs/main.c | 2 +- fs/ecryptfs/miscdev.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 6eaf69e4ec075f5af236c0c89f75639a195db904 Author: Bart Van Assche Date: Tue Oct 31 11:03:18 2017 -0700 target/iscsi: Detect conn_cmd_list corruption early Certain behavior of the initiator can cause the target driver to send both a reject and a SCSI response. If that happens two target_put_sess_cmd() calls will occur without the command having been removed from conn_cmd_list. In other words, conn_cmd_list will get corrupted once the freed memory is reused. Although the Linux kernel can detect list corruption if list debugging is enabled, in this case the context in which list corruption is detected is not related to the context that caused list corruption. Hence add WARN_ON() statements that report the context that is causing list corruption. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Mike Christie Reviewed-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_util.c | 4 ++++ 1 file changed, 4 insertions(+) commit cfe2b621bb18d86e93271febf8c6e37622da2d14 Author: Bart Van Assche Date: Tue Oct 31 11:03:17 2017 -0700 target/iscsi: Fix a race condition in iscsit_add_reject_from_cmd() Avoid that cmd->se_cmd.se_tfo is read after a command has already been freed. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Mike Christie Reviewed-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e1dfb21f004f403a16539e8a037963b57a25e0ad Author: Bart Van Assche Date: Tue Oct 31 11:03:16 2017 -0700 target/iscsi: Modify iscsit_do_crypto_hash_buf() prototype Change the type of the last two arguments from u8 * into const void * and void * respectively such that the u8 * casts can be left out from the callers. This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Mike Christie Reviewed-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 41 +++++++++++++++---------------------- 1 file changed, 17 insertions(+), 24 deletions(-) commit de3493aea656ad7ae2e8dd492ee928712d147c74 Author: Bart Van Assche Date: Tue Oct 31 11:03:15 2017 -0700 target/iscsi: Fix endianness in an error message Since hdr->offset is a big endian number, convert it to CPU endian before printing it. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Mike Christie Reviewed-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 919765e9680fe26acdcad782ee693f31dbde2def Author: Bart Van Assche Date: Tue Oct 31 11:03:14 2017 -0700 target/iscsi: Use min() in iscsit_dump_data_payload() instead of open-coding it This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Mike Christie Reviewed-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_erl1.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 8d973ab5d4520f84e89aaa38e0a50bb2876b09eb Author: Bart Van Assche Date: Tue Oct 31 11:03:13 2017 -0700 target/iscsi: Define OFFLOAD_BUF_SIZE once The constant OFFLOAD_BUF_SIZE is defined twice - once in iscsi_target_seq_pdu_list.c and once in iscsi_target_erl1.c. Since that constant is not used in the former source file, remove its definition from that source file. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Mike Christie Reviewed-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_seq_pdu_list.c | 2 -- 1 file changed, 2 deletions(-) commit c01706982350224a6c3653ca5b6f24f37dbbecad Author: Bart Van Assche Date: Tue Oct 31 11:03:11 2017 -0700 target: Inline transport_put_cmd() Since all transput_put_cmd() does is to call target_put_sess_cmd(), inline transport_put_cmd() into its callers. Leave out the BUG_ON() statement because if cmd->se_tfo == NULL then cmd->cmd_kref is 0 and kref_put() will complain anyway. Notes: - transport_init_se_cmd() initializes both .se_tfo and .cmd_kref. - The only target driver that does not call transport_init_se_cmd() for all commands is the iSCSI target driver. See also iscsi_target_rx_opcode(). Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Mike Christie Reviewed-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) commit d7e595ddd5b243aa9ba1948d5e0a37783b5415af Author: Bart Van Assche Date: Tue Oct 31 11:03:10 2017 -0700 target: Suppress gcc 7 fallthrough warnings Avoid that gcc 7 reports the following warning when building with W=1: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Mike Christie Cc: Varun Prakash Reviewed-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/iscsi/cxgbit/cxgbit_main.c | 1 + drivers/target/target_core_pr.c | 2 ++ drivers/target/target_core_transport.c | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) commit c48e5594d02f224c788cc57b192c61653a117b56 Author: Bart Van Assche Date: Tue Oct 31 11:03:09 2017 -0700 target: Move a declaration of a global variable into a header file This patch avoids that sparse reports the following warning: drivers/target/target_core_configfs.c:2267:33: warning: symbol 'target_core_dev_item_ops' was not declared. Should it be static? Fixes: c17cd24959cd ("target/configfs: Kill se_device->dev_link_magic") Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Mike Christie Reviewed-by: Hannes Reinecke Signed-off-by: Nicholas Bellinger drivers/target/target_core_fabric_configfs.c | 2 -- drivers/target/target_core_internal.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) commit 0d44374c1aaec7c81b470d3b5f955bc270711f9c Author: Mike Christie Date: Wed Oct 25 11:47:15 2017 -0500 tcmu: fix double se_cmd completion If cmd_time_out != 0, then tcmu_queue_cmd_ring could end up sleeping waiting for ring space, timing out and then returning failure to lio, and tcmu_check_expired_cmd could also detect the timeout and call target_complete_cmd on the cmd. This patch just delays setting up the deadline value and adding the cmd to the udev->commands idr until we have allocated ring space and are about to send the cmd to userspace. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 54 ++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 23 deletions(-) commit a271eac46a9a2457f4e8c757f9b7fc92a445cf48 Author: Mike Christie Date: Wed Oct 25 11:47:14 2017 -0500 target: return SAM_STAT_TASK_SET_FULL for TCM_OUT_OF_RESOURCES TCM_OUT_OF_RESOURCES is getting translated to TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE which seems like a heavy error when we just cannot allocate a resource that may be allocatable later. This has us translate TCM_OUT_OF_RESOURCES to SAM_STAT_TASK_SET_FULL instead. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_transport.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 55435badda8bd8e4c97a8b6c3fa9eef79b02fe44 Author: David Disseldorp Date: Thu Oct 19 01:39:20 2017 +0200 target: fix ALUA state file path truncation A sufficiently long Unit Serial string, dbroot path, and/or ALUA target portal group name may result in truncation of the ALUA state file path prior to usage. Fix this by using kasprintf() instead. Fixes: fdddf932269a ("target: use new "dbroot" target attribute") Signed-off-by: David Disseldorp Reviewed-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger drivers/target/target_core_alua.c | 51 +++++++++++++++++++++------------------ drivers/target/target_core_alua.h | 9 ------- 2 files changed, 28 insertions(+), 32 deletions(-) commit bdc79f0ed12ff55a9b56a91da04d0c8d8a786b9c Author: David Disseldorp Date: Thu Oct 19 01:39:19 2017 +0200 target: fix PR state file path truncation If an LIO backstore is configured with a sufficiently long Unit Serial string, alongside a similarly long dbroot path, then a truncated Persistent Reservation APTPL state file path will be used. This truncation can unintentionally lead to two LUs with differing serial numbers sharing PR state file. Fixes: fdddf932269a ("target: use new "dbroot" target attribute") Signed-off-by: David Disseldorp Reviewed-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger drivers/target/target_core_pr.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 1ae01724ae92004be36a6c11c4d5a9f94e915204 Author: Varun Prakash Date: Wed Oct 4 22:03:35 2017 +0530 cxgbit: Abort the TCP connection in case of data out timeout If DDP is programmed for a WRITE cmd and data out timer gets expired then abort the TCP connection before freeing the cmd to avoid any possibility of DDP after freeing the cmd. Signed-off-by: Varun Prakash Signed-off-by: Nicholas Bellinger drivers/target/iscsi/cxgbit/cxgbit.h | 2 ++ drivers/target/iscsi/cxgbit/cxgbit_cm.c | 45 ++++++++++++++++++++++++++++++++ drivers/target/iscsi/cxgbit/cxgbit_ddp.c | 8 ++++++ 3 files changed, 55 insertions(+) commit b849b4567549d5a54ab34ffacfd48fca05e8b34e Author: Kenjiro Nakayama Date: Wed Sep 13 14:01:22 2017 +0900 target: Add netlink command reply supported option for each device Currently netlink command reply support option (TCMU_ATTR_SUPP_KERN_CMD_REPLY) can be enabled only on module scope. Because of that, once an application enables the netlink command reply support, all applications using target_core_user.ko would be expected to support the netlink reply. To make matters worse, users will not be able to add a device via configfs manually. To fix these issues, this patch adds an option to make netlink command reply disabled on each device through configfs. Original TCMU_ATTR_SUPP_KERN_CMD_REPLY is still enabled on module scope to keep backward-compatibility and used by default, however once users set nl_reply_supported= via configfs for a particular device, the device disables the netlink command reply support. Signed-off-by: Kenjiro Nakayama Reviewed-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 59 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) commit b5ab697c62724b3d31556d91c6f9b76d2e264e4b Author: Kenjiro Nakayama Date: Fri Sep 15 14:44:55 2017 +0900 target/tcmu: Use macro to call container_of in tcmu_cmd_time_out_show This patch makes a tiny change that using TCMU_DEV in tcmu_cmd_time_out_show so it is consistent with other functions. Signed-off-by: Kenjiro Nakayama Reviewed-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c22adc0b0cbe3768619eedc240bf58d88a1d6ed7 Author: Xiubo Li Date: Thu Sep 14 09:30:05 2017 +0800 tcmu: fix crash when removing the tcmu device Before the nl REMOVE msg has been sent to the userspace, the ring's and other resources have been released, but the userspace maybe still using them. And then we can see the crash messages like: ring broken, not handling completions BUG: unable to handle kernel paging request at ffffffffffffffd0 IP: tcmu_handle_completions+0x134/0x2f0 [target_core_user] PGD 11bdc0c067 P4D 11bdc0c067 PUD 11bdc0e067 PMD 0 Oops: 0000 [#1] SMP cmd_id not found, ring is broken RIP: 0010:tcmu_handle_completions+0x134/0x2f0 [target_core_user] RSP: 0018:ffffb8a2d8983d88 EFLAGS: 00010296 RAX: 0000000000000000 RBX: ffffb8a2aaa4e000 RCX: 00000000ffffffff RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000220 R10: 0000000076c71401 R11: ffff8d2e76c713f0 R12: ffffb8a2aad56bc0 R13: 000000000000001c R14: ffff8d2e32c90000 R15: ffff8d2e76c713f0 FS: 00007f411ffff700(0000) GS:ffff8d1e7fdc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd0 CR3: 0000001027070000 CR4: 00000000001406e0 Call Trace: ? tcmu_irqcontrol+0x2a/0x40 [target_core_user] ? uio_write+0x7b/0xc0 [uio] ? __vfs_write+0x37/0x150 ? __getnstimeofday64+0x3b/0xd0 ? vfs_write+0xb2/0x1b0 ? syscall_trace_enter+0x1d0/0x2b0 ? SyS_write+0x55/0xc0 ? do_syscall_64+0x67/0x150 ? entry_SYSCALL64_slow_path+0x25/0x25 Code: 41 5d 41 5e 41 5f 5d c3 83 f8 01 0f 85 cf 01 00 00 48 8b 7d d0 e8 dd 5c 1d f3 41 0f b7 74 24 04 48 8b 7d c8 31 d2 e8 5c c7 1b f3 <48> 8b 7d d0 49 89 c7 c6 07 00 0f 1f 40 00 4d 85 ff 0f 84 82 01 RIP: tcmu_handle_completions+0x134/0x2f0 [target_core_user] RSP: ffffb8a2d8983d88 CR2: ffffffffffffffd0 And the crash also could happen in tcmu_page_fault and other places. Signed-off-by: Zhang Zhuoyu Signed-off-by: Xiubo Li Reviewed-by: Mike Christie Signed-off-by: Nicholas Bellinger drivers/target/target_core_user.c | 92 ++++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 45 deletions(-) commit a0884d489e016606e5e040624edaa13efefc3fcb Author: tangwenji Date: Fri Sep 15 17:18:07 2017 +0800 iscsi-target: fix memory leak in iscsit_release_discovery_tpg() Need to release the param_list for tpg in iscsi_release_discovery_tpg function, this is also required before the iscsit_load_discovery_tpg function exits abnormally. Signed-off-by: tangwenji Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_tpg.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 12d5a43b2dffb6cd28062b4e19024f7982393288 Author: tangwenji Date: Fri Sep 15 16:03:13 2017 +0800 iscsi-target: fix memory leak in lio_target_tiqn_addtpg() tpg must free when call core_tpg_register() return fail Signed-off-by: tangwenji Signed-off-by: Nicholas Bellinger drivers/target/iscsi/iscsi_target_configfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 24528f089d0a444070aa4f715ace537e8d6bf168 Author: tangwenji Date: Thu Aug 24 19:59:37 2017 +0800 target:fix condition return in core_pr_dump_initiator_port() When is pr_reg->isid_present_at_reg is false,this function should return. This fixes a regression originally introduced by: commit d2843c173ee53cf4c12e7dfedc069a5bc76f0ac5 Author: Andy Grover Date: Thu May 16 10:40:55 2013 -0700 target: Alter core_pr_dump_initiator_port for ease of use Signed-off-by: tangwenji Signed-off-by: Nicholas Bellinger drivers/target/target_core_pr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a2db857bf9ec62e91a6120a16436251be8e1c5ca Author: tangwenji Date: Tue Aug 22 20:29:50 2017 +0800 target: fix match_token option in target_core_configfs.c The match_token function does not recognize the option 'l', so that both the mapped_lun and target_lun parameters can not be resolved correctly. And parsed u64-type parameters should use match_u64(). (Use %u instead of %s for Opt_mapped_lun + Opt_target_lun - nab) Signed-off-by: tangwenji Signed-off-by: Nicholas Bellinger drivers/target/target_core_configfs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 79dd6f2fd170e19f979d31cd1ebc9eea6de1a75f Author: tangwenji Date: Mon Aug 21 20:55:41 2017 +0800 target: add sense code INSUFFICIENT REGISTRATION RESOURCES If a PERSISTENT RESERVE OUT command with a REGISTER service action or a REGISTER AND IGNORE EXISTING KEY service action or REGISTER AND MOVE service action is attempted, but there are insufficient device server resources to complete the operation, then the command shall be terminated with CHECK CONDITION status, with the sense key set to ILLEGAL REQUEST,and the additonal sense code set to INSUFFICIENT REGISTRATION RESOURCES. Signed-off-by: tangwenji Signed-off-by: Nicholas Bellinger drivers/target/target_core_pr.c | 16 ++++++++-------- drivers/target/target_core_transport.c | 15 +++++++++++++++ include/target/target_core_base.h | 1 + 3 files changed, 24 insertions(+), 8 deletions(-) commit e437fa3e5d1fde522fcc345ab1fe32a671b943f0 Author: tangwenji Date: Mon Aug 21 20:17:18 2017 +0800 target: fix double unmap data sg in core_scsi3_emulate_pro_register_and_move() Signed-off-by: tangwenji Signed-off-by: Nicholas Bellinger drivers/target/target_core_pr.c | 2 -- 1 file changed, 2 deletions(-) commit c58a252beb04cf0e02d6a746b2ed7ea89b6deb71 Author: tangwenji Date: Thu Aug 17 19:51:54 2017 +0800 target: fix buffer offset in core_scsi3_pri_read_full_status When at least two initiators register pr on the same LUN, the target returns the exception data due to buffer offset error, therefore the initiator executes command 'sg_persist -s' may cause the initiator to appear segfault error. This fixes a regression originally introduced by: 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 Signed-off-by: tangwenji Cc: stable@vger.kernel.org # 4.13+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_pr.c | 1 + 1 file changed, 1 insertion(+) commit 88fb2fa7db7510bf1078226ab48d162d9854f3d4 Author: tangwenji Date: Wed Aug 16 16:39:00 2017 +0800 target: fix null pointer regression in core_tmr_drain_tmr_list The target system kernel crash when the initiator executes the sg_persist -A command,because of the second argument to be set to NULL when core_tmr_lun_reset is called in core_scsi3_pro_preempt function. This fixes a regression originally introduced by: commit 51ec502a32665fed66c7f03799ede4023b212536 Author: Bart Van Assche Date: Tue Feb 14 16:25:54 2017 -0800 target: Delete tmr from list before processing Signed-off-by: tangwenji Cc: stable@vger.kernel.org # 4.11+ Signed-off-by: Nicholas Bellinger drivers/target/target_core_tmr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 594e25e73440863981032d76c9b1e33409ceff6e Author: Jiang Yi Date: Fri Aug 11 11:29:44 2017 +0800 target/file: Do not return error for UNMAP if length is zero The function fd_execute_unmap() in target_core_file.c calles ret = file->f_op->fallocate(file, mode, pos, len); Some filesystems implement fallocate() to return error if length is zero (e.g. btrfs) but according to SCSI Block Commands spec UNMAP should return success for zero length. Signed-off-by: Jiang Yi Signed-off-by: Nicholas Bellinger drivers/target/target_core_file.c | 4 ++++ 1 file changed, 4 insertions(+) commit 923218f6166a84688973acdc39094f3bee1e9ad4 Author: Ming Lei Date: Thu Nov 2 23:24:38 2017 +0800 blk-mq: don't allocate driver tag upfront for flush rq The idea behind it is simple: 1) for none scheduler, driver tag has to be borrowed for flush rq, otherwise we may run out of tag, and that causes an IO hang. And get/put driver tag is actually noop for none, so reordering tags isn't necessary at all. 2) for a real I/O scheduler, we need not allocate a driver tag upfront for flush rq. It works just fine to follow the same approach as normal requests: allocate driver tag for each rq just before calling ->queue_rq(). One driver visible change is that the driver tag isn't shared in the flush request sequence. That won't be a problem, since we always do that in legacy path. Then flush rq need not be treated specially wrt. get/put driver tag. This cleans up the code - for instance, reorder_tags_to_front() can be removed, and we needn't worry about request ordering in dispatch list for avoiding I/O deadlock. Also we have to put the driver tag before requeueing. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-flush.c | 35 ++++++++++++++++++++++++++--------- block/blk-mq-sched.c | 42 +++++------------------------------------- block/blk-mq.c | 41 ++++++----------------------------------- 3 files changed, 37 insertions(+), 81 deletions(-) commit 244c65a3ccaa06fd15cc940315606674d3108b2f Author: Ming Lei Date: Sat Nov 4 12:39:57 2017 -0600 blk-mq: move blk_mq_put_driver_tag*() into blk-mq.h We need this helper to put the driver tag for flush rq, since we will not share tag in the flush request sequence in the following patch in case that I/O scheduler is applied. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 32 -------------------------------- block/blk-mq.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 32 deletions(-) commit a6a252e6491443c1c18eab7e254daee63d4a7a04 Author: Ming Lei Date: Thu Nov 2 23:24:36 2017 +0800 blk-mq-sched: decide how to handle flush rq via RQF_FLUSH_SEQ In case of IO scheduler we always pre-allocate one driver tag before calling blk_insert_flush(), and flush request will be marked as RQF_FLUSH_SEQ once it is in flush machinery. So if RQF_FLUSH_SEQ isn't set, we call blk_insert_flush() to handle the request, otherwise the flush request is dispatched to ->dispatch list directly. This is a preparation patch for not preallocating a driver tag for flush requests, and for not treating flush requests as a special case. This is similar to what the legacy path does. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-sched.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) commit 598906f814280762157629ba8833bf5cb11def74 Author: Ming Lei Date: Thu Nov 2 23:24:35 2017 +0800 blk-flush: use blk_mq_request_bypass_insert() In the following patch, we will use RQF_FLUSH_SEQ to decide: 1) if the flag isn't set, the flush rq need to be inserted via blk_insert_flush() 2) otherwise, the flush rq need to be dispatched directly since it is in flush machinery now. So we use blk_mq_request_bypass_insert() for requests of bypassing flush machinery, just like the legacy path did. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-flush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0850297c749ea79a5717d597931366b3d7f4b09 Author: Ming Lei Date: Thu Nov 2 23:24:34 2017 +0800 block: pass 'run_queue' to blk_mq_request_bypass_insert Block flush need this function without running the queue, so add a parameter controlling whether we run it or not. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-core.c | 2 +- block/blk-mq.c | 5 +++-- block/blk-mq.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) commit 9c71c83c857e7a84a5be5a56ea88da7098f51db8 Author: Ming Lei Date: Thu Nov 2 23:24:33 2017 +0800 blk-flush: don't run queue for requests bypassing flush blk_insert_flush() should only insert request since run queue always follows it. In case of bypassing flush, we don't need to run queue because every blk_insert_flush() follows one run queue. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-flush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d6f167ce74158903e7fc20dfbecf89c71aa1c00 Author: Jianchao Wang Date: Thu Nov 2 23:24:32 2017 +0800 blk-mq: put the driver tag of nxt rq before first one is requeued When freeing the driver tag of the next rq with an I/O scheduler configured, we get the first entry of the list. However, this can race with requeue of a request, and we end up getting the wrong request from the head of the list. Free the driver tag of next rq before the failed one is requeued in the failure branch of queue_rq callback. Signed-off-by: Jianchao Wang Signed-off-by: Jens Axboe block/blk-mq.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit e84010732225c4c7c3464ee1169d395751c3adfa Author: weiping zhang Date: Tue Oct 17 23:56:21 2017 +0800 blkcg: add sanity check for blkcg policy operations blkcg policy should keep cpd/pd's alloc_fn and free_fn in pairs, otherwise policy would register fail. Reviewed-by: Johannes Thumshirn Signed-off-by: weiping zhang Signed-off-by: Jens Axboe block/blk-cgroup.c | 5 +++++ 1 file changed, 5 insertions(+) commit 88022d7201e96b43f1754b0358fc6bcd8dbdcde1 Author: Ming Lei Date: Sun Nov 5 02:21:12 2017 +0800 blk-mq: don't handle failure in .get_budget It is enough to just check if we can get the budget via .get_budget(). And we don't need to deal with device state change in .get_budget(). For SCSI, one issue to be fixed is that we have to call scsi_mq_uninit_cmd() to free allocated ressources if SCSI device fails to handle the request. And it isn't enough to simply call blk_mq_end_request() to do that if this request is marked as RQF_DONTPREP. Fixes: 0df21c86bdbf(scsi: implement .get_budget and .put_budget for blk-mq) Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-sched.c | 14 ++------------ block/blk-mq.c | 17 ++++------------- block/blk-mq.h | 5 ++--- drivers/scsi/scsi_lib.c | 11 +++-------- include/linux/blk-mq.h | 2 +- 5 files changed, 12 insertions(+), 37 deletions(-) commit 54b943e69691329805349440b157b36e34051a57 Author: Joel Date: Thu Nov 2 14:53:47 2017 +1100 hwmon: (aspeed-pwm-tacho) Sort headers Sort the headers in preperation for future changes. Signed-off-by: Joel Stanley Signed-off-by: Guenter Roeck drivers/hwmon/aspeed-pwm-tacho.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 10f2fe6efa5c3fc91ec6b700d3fc530845f5c1ab Author: Shuah Khan Date: Thu Nov 2 13:19:47 2017 -0600 MAINTAINERS: add maintainer for tools/power/cpupower Based on discussions with Rafael J. Wysocki, cpupower is need of an active maintainer. I decided to on take the task of maintaining this tool. Patches will flow through the pm sub-systems to the mainline. Suggested-by: Rafael J. Wysocki Signed-off-by: Shuah Khan Acked-by: Thomas Renninger Signed-off-by: Rafael J. Wysocki MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 826a70a08b1210bbfdbda812ab43eb986e25b5c2 Author: Ming Lei Date: Sat Nov 4 09:55:34 2017 +0800 SCSI: don't get target/host busy_count in scsi_mq_get_budget() It is very expensive to atomic_inc/atomic_dec the host wide counter of host->busy_count, and it should have been avoided via blk-mq's mechanism of getting driver tag, which uses the more efficient way of sbitmap queue. Also we don't check atomic_read(&sdev->device_busy) in scsi_mq_get_budget() and don't run queue if the counter becomes zero, so IO hang may be caused if all requests are completed just before the current SCSI device is added to shost->starved_list. Fixes: 0df21c86bdbf(scsi: implement .get_budget and .put_budget for blk-mq) Reported-by: Bart Van Assche Signed-off-by: Ming Lei Signed-off-by: Jens Axboe drivers/scsi/scsi_lib.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit e4f36b249b4d4e7599f1cf0c8fb50f196e52677e Author: Christoph Hellwig Date: Fri Oct 20 16:45:23 2017 +0200 block: fix peeking requests during PM We need to look for an active PM request until the next softbarrier instead of looking for the first non-PM request. Otherwise any cause of request reordering might starve the PM request(s). Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-core.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 767601d100a53e653233aebca7c262ce0addfa99 Author: Michel Dänzer Date: Fri Nov 3 16:00:35 2017 +0100 drm/ttm: Downgrade pr_err to pr_debug for memory allocation failures Memory allocation failure should generally be handled gracefully by callers. In particular, with transparent hugepage support, attempts to allocate huge pages can fail under memory pressure, but the callers fall back to allocating individual pages instead. In that case, there would be spurious [TTM] Unable to get page %u error messages in dmesg. Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 13 ++++++------- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 12 ++++++------ 2 files changed, 12 insertions(+), 13 deletions(-) commit e1fc12c5d9ad06a2a74e97a91f1b0c5f4c723b50 Author: Michel Dänzer Date: Fri Nov 3 16:00:35 2017 +0100 drm/ttm: Always and only destroy bo->ttm_resv in ttm_bo_release_list Fixes a use-after-free due to a race condition in ttm_bo_cleanup_refs_and_unlock, which allows one task to reserve a BO and destroy its ttm_resv while another task is waiting for it to signal in reservation_object_wait_timeout_rcu. v2: * Always initialize bo->ttm_resv in ttm_bo_init_reserved (Christian König) Fixes: 0d2bd2ae045d "drm/ttm: fix memory leak while individualizing BOs" Reviewed-by: Chunming Zhou # v1 Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 0f04d057515275099c6e4f767b95a278be4681bf Author: Colin Ian King Date: Fri Nov 3 08:09:45 2017 +0000 net: sched: cls_u32: use bitwise & rather than logical && on n->flags Currently n->flags is being operated on by a logical && operator rather than a bitwise & operator. This looks incorrect as these should be bit flag operations. Fix this. Detected by CoverityScan, CID#1460398 ("Logical vs. bitwise operator") Fixes: 245dc5121a9b ("net: sched: cls_u32: call block callbacks for offload") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller net/sched/cls_u32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 991a26af2e65e0422b2a899e373c0146f2436cae Author: Konstantin Khlebnikov Date: Thu Nov 2 17:07:05 2017 +0300 tcp_nv: use do_div() instead of expensive div64_u64() Average RTT is 32-bit thus full 64-bit division is redundant. Signed-off-by: Konstantin Khlebnikov Suggested-by: Stephen Hemminger Suggested-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_nv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 9d917c207d6b212eb5fb4d8ca31826e5b75b4d28 Author: Vadim Fedorenko Date: Thu Nov 2 15:49:08 2017 +0300 add support of IFF_XMIT_DST_RELEASE bit in vlan Some time ago Eric Dumazet suggested a "hack the IFF_XMIT_DST_RELEASE flag on the vlan netdev". But the last comment was "does not support properly bonding/team.(If the real_dev->privflags IFF_XMIT_DST_RELEASE bit changes, we want to update all the vlans at the same time )" I've extended that patch to support changes of IFF_XMIT_DST_RELEASE in bonding/team. Both bonding and team call netdev_change_features() after recalculation of features including priv_flags IFF_XMIT_DST_RELEASE bit. So the only thing needed to support is to recheck this bit in vlan_transfer_features(). Suggested-by: Eric Dumazet Signed-off-by: Vadim Fedorenko Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller net/8021q/vlan.c | 3 +++ net/8021q/vlan_netlink.c | 1 + 2 files changed, 4 insertions(+) commit 1ec6e53029e7fddd73bb92500a2dca05fc393e8d Author: Wei Yongjun Date: Thu Nov 2 11:14:48 2017 +0000 phylink: make local function phylink_phy_change() static Fixes the following sparse warnings: drivers/net/phy/phylink.c:570:6: warning: symbol 'phylink_phy_change' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9ce99a3a9284cfb8d45a7abc43346f880da338cc Author: Troy Kisky Date: Fri Oct 20 14:20:20 2017 -0700 tty: serial: imx: remove dead code imx_dma_rxint Since commit 4dec2f119e86 ("imx-serial: RX DMA startup latency") the interrupt routine no longer will start rx dma. imx_dma_rxint no longer needs to be called to try and start dma. It won't start dma because dma_is_rxing is already true meaning dma is already started. Signed-off-by: Troy Kisky Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) commit 52108109fa125ffb11df178e1ac5eb9650f0743d Author: Troy Kisky Date: Fri Oct 20 14:20:19 2017 -0700 tty: serial: imx: disable ageing timer interrupt if dma in use Since commit 4dec2f119e86 ("imx-serial: RX DMA startup latency") the interrupt routine no longer will start rx dma. So, we no longer need to enable this interrupt to start dma. Signed-off-by: Troy Kisky Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 4 ---- 1 file changed, 4 deletions(-) commit b86f86e8e7c5264bb8f5835d60f9ec840d9f5a7a Author: Tomas Melin Date: Fri Oct 27 15:16:30 2017 +0300 serial: 8250: fix potential deadlock in rs485-mode Canceling hrtimer when holding uart spinlock can deadlock. CPU0: syscall write -> get uart port spinlock -> write uart -> start_tx_rs485 -> hrtimer_cancel -> wait for hrtimer callback to finish CPU1: hrtimer IRQ -> run hrtimer -> em485_handle_stop_tx -> get uart port spinlock CPU0 is waiting for the hrtimer callback to finish, but the hrtimer callback running on CPU1 is waiting to get the uart port spinlock. This deadlock can be avoided by not canceling the hrtimers in these paths. Setting active_timer=NULL can be done without accessing hrtimer, and that will effectively cancel operations that would otherwise have been performed by the hrtimer callback. Signed-off-by: Tomas Melin Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 3 --- 1 file changed, 3 deletions(-) commit 4fefcbff8be52c7e68feefa0c96fb8e06923aab3 Author: Kees Cook Date: Tue Oct 24 02:59:40 2017 -0700 serial: m32r_sio: Drop redundant .data assignment With the timer converted to using the new timer_setup()/from_timer() API, setting the .data field is redundant (and the field will be removed soon), so drop it. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/m32r_sio.c | 1 - 1 file changed, 1 deletion(-) commit 94be6d74d040c614a332555f5b6d57c26dc272fc Author: Philipp Zabel Date: Wed Nov 1 13:51:41 2017 +0100 serial: imx: add hibernation support During hibernation, freeze/thaw/restore dev_pm_ops are called instead of suspend/resume. Hook up the hibernation ops. The _noirq parts are identical, but suspend/resume are replaced with variants that do not enable wakeup from i.MX UART. There is no need to restore register contents in thaw_noirq. Signed-off-by: Philipp Zabel Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 2a76fa2830981e15bfa33c2b0e5f2dfd35b0455c Author: Lukas Wunner Date: Wed Oct 25 10:06:33 2017 +0200 serial: pl011: Adopt generic flag to store auto RTS status Back in 2010, commit 3b43816f685f ("ARM: 5933/1: amba-pl011: support hardware flow control") added an autorts flag to this driver to store whether automatic hardware flow control is requested. In 2015, commit 391f93f2ec9f ("serial: core: Rework hw-assisted flow control support") added a flag with identical functionality to generic code. Switch over to that flag and drop the driver-specific one. Cc: Rabin Vincent Cc: Peter Hurley Cc: Russell King Signed-off-by: Lukas Wunner Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 3236a965486ba0c6043cf2c7b51943d8b382ae29 Author: Lukas Wunner Date: Sat Oct 28 11:35:49 2017 +0200 serial: 8250_fintek: Fix rs485 disablement on invalid ioctl() This driver's ->rs485_config callback checks if SER_RS485_RTS_ON_SEND and SER_RS485_RTS_AFTER_SEND have the same value. If they do, it means the user has passed in invalid data with the TIOCSRS485 ioctl() since RTS must have a different polarity when sending and when not sending. In this case, rs485 mode is not enabled (the RS485_URA bit is not set in the RS485 Enable Register) and this is supposed to be signaled back to the user by clearing the SER_RS485_ENABLED bit in struct serial_rs485 ... except a missing tilde character is preventing that from happening. Fixes: 28e3fb6c4dce ("serial: Add support for Fintek F81216A LPC to 4 UART") Cc: Ricardo Ribalda Delgado Cc: "Ji-Ze Hong (Peter Hong)" Signed-off-by: Lukas Wunner Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_fintek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9356335faf9f65568dbdb9bba2a07117f69d34c5 Author: Colin Ian King Date: Wed Nov 1 10:49:23 2017 +0000 serial: core: remove redundant assignment to port The final assignment to port is never read, hence it is redundant and can be removed. Also move the declaration of port to a more local scope. Cleans up clang warning: drivers/tty/serial/serial_core.c:1498:2: warning: Value stored to 'port' is never read Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 1be2266392196de82d1cfcc8a68e770cf8f48c60 Author: Takatoshi Akiyama Date: Thu Nov 2 11:14:55 2017 +0100 serial: sh-sci: Fix unlocked access to SCSCR register The SCSCR register access in sci_break_ctl() is not locked. sci_start_tx() and sci_set_termios() changes the SCSCR register, but does not lock sci_port. Therefore, this patch adds lock during register access. Also, remove the log output that leads to a double lock. Some analysis of where locks are not taken is as follows. It appears that the lock is not taken in: - sci_start_tx(), sci_stop_tx() as this is installed as a callback. And all callers of the callback take the lock. - start_rx as callers take the lock. - stop_rx. this is both installed as a callback and called directly. In both cases the caller takes the lock. Signed-off-by: Takatoshi Akiyama Signed-off-by: Takeshi Kihara Signed-off-by: Simon Horman Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit 0ea46e6e58ab7447222bcaa10be0adcd9f92284d Author: Arnd Bergmann Date: Thu Nov 2 12:34:24 2017 +0100 serial: mvebu-uart: drop incorrect memset gcc points out that the length passed into memset here is wrong: drivers/tty/serial/mvebu-uart.c: In function 'mvebu_uart_probe': arch/x86/include/asm/string_32.h:324:29: error: 'memset' used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size] Moreover, the structure was allocated with kzalloc a few lines earlier, so that memset is also unnecessary. Let's drop it to shut up the compiler warning. Fixes: 95f787685a22 ("serial: mvebu-uart: dissociate RX and TX interrupts") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mvebu-uart.c | 1 - 1 file changed, 1 deletion(-) commit 5de15cc2526132440415209e12633636e206d531 Author: Colin Ian King Date: Thu Nov 2 14:01:44 2017 +0000 tty: max3100: remove unused variable rts and remove unused assignment Variable rts is being assigned but it is never read, hence it can be removed. The assignment to param_new to zero is redundant as it is being updates a few statements later, so remove this redundant assignment. Cleans up two clang warnings: drivers/tty/serial/max3100.c:277:3: warning: Value stored to 'rts' is never read drivers/tty/serial/max3100.c:439:2: warning: Value stored to 'param_new' is never read Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max3100.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e7e51dcf3b8a5f65c5653a054ad57eb2492a90d0 Author: Johan Hovold Date: Fri Nov 3 15:18:05 2017 +0100 tty: fix tty_ldisc_receive_buf() documentation The tty_ldisc_receive_buf() helper returns the number of bytes processed so drop the bogus "not" from the kernel doc comment. Fixes: 8d082cd300ab ("tty: Unify receive_buf() code paths") Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 991f8f1c6eb634688952fa6a03cc0ce949b6e363 Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:16 2017 -0700 hyper-v: trace channel events Added an additional set of trace points for when channel gets notified or signals host. Suggested-by: Stephen Hemminger Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 2 ++ drivers/hv/connection.c | 2 ++ drivers/hv/hv_trace.h | 23 +++++++++++++++++++++++ drivers/hv/vmbus_drv.c | 2 ++ 4 files changed, 29 insertions(+) commit 98f31a0050ca8ba47b57c6d67599013cdbdd2122 Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:15 2017 -0700 hyper-v: trace vmbus_send_tl_connect_request() Add tracepoint to CHANNELMSG_TL_CONNECT_REQUEST sender. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 7 ++++++- drivers/hv/hv_trace.h | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) commit 259cc665e9c08d054549a877c1b53b793de15753 Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:14 2017 -0700 hyper-v: trace vmbus_release_relid() Add tracepoint to CHANNELMSG_RELID_RELEASED sender. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 7 +++++-- drivers/hv/hv_trace.h | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) commit 034ebf552e0a3403eeb7e7f8a3a502fc0c70a24c Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:13 2017 -0700 hyper-v: trace vmbus_negotiate_version() Add tracepoint to CHANNELMSG_INITIATE_CONTACT sender. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/connection.c | 3 +++ drivers/hv/hv_trace.h | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit 09cdf8f87c15dbe9a3eeb6de04aaafd0cd922d6d Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:12 2017 -0700 hyper-v: trace vmbus_teardown_gpadl() Add tracepoint to CHANNELMSG_GPADL_TEARDOWN sender. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 2 ++ drivers/hv/hv_trace.h | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) commit 69edbd5f4729a58e11437b2804103bf8ea52745c Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:11 2017 -0700 hyper-v: trace vmbus_establish_gpadl() Add tracepoint to CHANNELMSG_GPADL_HEADER/CHANNELMSG_GPADL_BODY sender. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 6 ++++++ drivers/hv/hv_trace.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) commit 633b005df0dff555c0d4f22b5f1f8b04dba67ac5 Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:10 2017 -0700 hyper-v: trace vmbus_close_internal() Add tracepoint to CHANNELMSG_CLOSECHANNEL sender. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 2 ++ drivers/hv/hv_trace.h | 15 +++++++++++++++ 2 files changed, 17 insertions(+) commit 9202d771ca37514bfbc2c3a8fdcb018f40a6bd8a Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:09 2017 -0700 hyper-v: trace vmbus_open() Add tracepoint to CHANNELMSG_OPENCHANNEL sender. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 2 ++ drivers/hv/hv_trace.h | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit d6706e63367a9c783974db4b94cf8980d31c4cb2 Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:08 2017 -0700 hyper-v: trace vmbus_request_offers() Add tracepoint to CHANNELMSG_REQUESTOFFERS sender. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 4 +++- drivers/hv/hv_trace.h | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit c7924fb07a2646c9ff661efcad1167a1106d6019 Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:07 2017 -0700 hyper-v: trace vmbus_onversion_response() Add tracepoint to CHANNELMSG_VERSION_RESPONSE handler. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 3 +++ drivers/hv/hv_trace.h | 11 +++++++++++ 2 files changed, 14 insertions(+) commit 602a8c525c8c7b2ff446894fc6b21f42471c952f Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:06 2017 -0700 hyper-v: trace vmbus_ongpadl_torndown() Add tracepoint to CHANNELMSG_GPADL_TORNDOWN handler. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 8 ++++++++ 2 files changed, 10 insertions(+) commit a13bf0ea4a60a7946bf335bd57e60adc344033bd Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:05 2017 -0700 hyper-v: trace vmbus_ongpadl_created() Add tracepoint to CHANNELMSG_GPADL_CREATED handler. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) commit 9f23ce1a23b6bf471d5920bdca5cc40940419e60 Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:04 2017 -0700 hyper-v: trace vmbus_onopen_result() Add tracepoint to CHANNELMSG_OPENCHANNEL_RESULT handler. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) commit 5175167c77afb19993bd86ab8b4be63d9cb4a928 Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:03 2017 -0700 hyper-v: trace vmbus_onoffer_rescind() Add tracepoint to CHANNELMSG_RESCIND_CHANNELOFFER handler. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 8 ++++++++ 2 files changed, 10 insertions(+) commit 03b81e66c78b076bfc127714ce6fd25655784600 Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:02 2017 -0700 hyper-v: trace vmbus_onoffer() Add tracepoint to CHANNELMSG_OFFERCHANNEL handler. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) commit 716fa52fb474a36ddd3cbc981108f93610c973ef Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:01 2017 -0700 hyper-v: trace vmbus_on_message() Add tracepoint to vmbus_on_message() which is called when we start processing a blocking from work context. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel_mgmt.c | 2 ++ drivers/hv/hv_trace.h | 5 +++++ 2 files changed, 7 insertions(+) commit c9fe0f8fa4136c2451dcc012e48fbf4470d6b592 Author: Vitaly Kuznetsov Date: Sun Oct 29 12:21:00 2017 -0700 hyper-v: trace vmbus_on_msg_dpc() Add tracing subsystem to Hyper-V VMBus module and add tracepoint to vmbus_on_msg_dpc() which is called when we receive a message from host. Signed-off-by: Vitaly Kuznetsov Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/Makefile | 4 +++- drivers/hv/hv_trace.c | 4 ++++ drivers/hv/hv_trace.h | 29 +++++++++++++++++++++++++++++ drivers/hv/hyperv_vmbus.h | 2 ++ drivers/hv/vmbus_drv.c | 2 ++ 5 files changed, 40 insertions(+), 1 deletion(-) commit 32946cc2d5686d320aab9fb162d8949c767f7519 Author: Kees Cook Date: Tue Oct 24 03:23:31 2017 -0700 drivers/pcmcia: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Cc: David Howells Cc: Arnd Bergmann Cc: linux-pcmcia@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Kees Cook Acked-by: Russell King Signed-off-by: Greg Kroah-Hartman drivers/pcmcia/bcm63xx_pcmcia.c | 6 +++--- drivers/pcmcia/bfin_cf_pcmcia.c | 6 +++--- drivers/pcmcia/i82365.c | 6 ++---- drivers/pcmcia/omap_cf.c | 8 ++++---- drivers/pcmcia/pd6729.c | 7 +++---- drivers/pcmcia/soc_common.c | 7 +++---- drivers/pcmcia/tcic.c | 8 +++----- drivers/pcmcia/yenta_socket.c | 7 +++---- 8 files changed, 24 insertions(+), 31 deletions(-) commit 4e826adcaafa4b599811ddf39b6b814b8e1b4f5e Author: Kees Cook Date: Tue Oct 24 03:23:39 2017 -0700 drivers/sgi-xp: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Cliff Whickman Signed-off-by: Kees Cook Acked-by: Robin Holt Signed-off-by: Greg Kroah-Hartman drivers/misc/sgi-xp/xpc_main.c | 15 ++++++--------- drivers/misc/sgi-xp/xpc_sn2.c | 15 ++++++--------- 2 files changed, 12 insertions(+), 18 deletions(-) commit 7e0471078781dc60a564a442d56b4f846504c43c Author: Kees Cook Date: Wed Oct 25 03:22:57 2017 -0700 auxdisplay: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Miguel Ojeda Sandonis Signed-off-by: Kees Cook Reviewed-by: Paul Burton Tested-by: Paul Burton Signed-off-by: Greg Kroah-Hartman drivers/auxdisplay/img-ascii-lcd.c | 10 ++++------ drivers/auxdisplay/panel.c | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) commit 026cb4329df6169eb820815d220a391d97550cc5 Author: Kees Cook Date: Tue Oct 24 03:00:03 2017 -0700 tty/serial: atmel: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Richard Genoud Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Richard Genoud Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit a8497b31fee650846fcc5a1e41f4ef22318a9925 Author: Kees Cook Date: Tue Oct 24 03:00:18 2017 -0700 tty: cyclades: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Moves timer structures from global to attached to struct cyclades_port. Cc: Jiri Slaby Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/tty/cyclades.c | 16 ++++++---------- include/linux/cyclades.h | 3 +++ 2 files changed, 9 insertions(+), 10 deletions(-) commit 4790b6dc7ad6c0f1eb71b94c4babe10a9c41c697 Author: Kees Cook Date: Tue Oct 24 03:00:10 2017 -0700 tty: vcc: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Jiri Slaby Cc: sparclinux@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/tty/vcc.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit ad0cda7a90f26970d65163095c5da39f541921bc Author: Kees Cook Date: Tue Oct 24 02:59:56 2017 -0700 tty/serial: altera_uart: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Tobias Klauser Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Cc: nios2-dev@lists.rocketboards.org Signed-off-by: Kees Cook Acked-by: Tobias Klauser Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/altera_uart.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fc3b00d7dd7fe51e9315e5894c224132405e4499 Author: Kees Cook Date: Tue Oct 24 02:59:49 2017 -0700 serial: sccnxp: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sccnxp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 1209a81369366b158e001d8a249693525c463eb0 Author: Kees Cook Date: Tue Oct 24 02:59:31 2017 -0700 serial: bfin_uart: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jiri Slaby Cc: adi-buildroot-devel@lists.sourceforge.net Cc: linux-serial@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/bfin_uart.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 7c3356457aeb07d183dfe9c6bb69dceee5a06ca9 Author: Kees Cook Date: Tue Oct 24 02:59:17 2017 -0700 serial: 8250: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jiri Slaby Cc: Vignesh R Cc: Ed Blake Cc: Matthias Brugger Cc: Sean Young Cc: linux-serial@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_core.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit a0fea6027f19c62727315aba1a7fae75a9caa842 Author: Bernhard Rosenkraenzer Date: Fri Nov 3 16:46:02 2017 +0100 USB: Add delay-init quirk for Corsair K70 LUX keyboards Without this patch, K70 LUX keyboards don't work, saying usb 3-3: unable to read config index 0 descriptor/all usb 3-3: can't read configurations, error -110 usb usb3-port3: unable to enumerate USB device Signed-off-by: Bernhard Rosenkraenzer Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) commit 627cfa89b1fe8d189ee71718fe9eb607026db301 Author: Johan Hovold Date: Fri Nov 3 18:12:08 2017 +0100 USB: serial: fix module-license macros Several GPL-2.0 drivers used "GPL" rather than "GPL v2" in their MODULE_LICENSE macros; fix the macros to match the licenses. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/aircable.c | 2 +- drivers/usb/serial/ch341.c | 2 +- drivers/usb/serial/cp210x.c | 2 +- drivers/usb/serial/empeg.c | 2 +- drivers/usb/serial/metro-usb.c | 2 +- drivers/usb/serial/mos7720.c | 2 +- drivers/usb/serial/navman.c | 2 +- drivers/usb/serial/omninet.c | 2 +- drivers/usb/serial/opticon.c | 2 +- drivers/usb/serial/option.c | 2 +- drivers/usb/serial/oti6858.c | 2 +- drivers/usb/serial/pl2303.c | 2 +- drivers/usb/serial/qcaux.c | 2 +- drivers/usb/serial/quatech2.c | 2 +- drivers/usb/serial/sierra.c | 2 +- drivers/usb/serial/ssu100.c | 2 +- drivers/usb/serial/symbolserial.c | 2 +- drivers/usb/serial/usb-serial-simple.c | 2 +- drivers/usb/serial/usb-serial.c | 2 +- drivers/usb/serial/usb_debug.c | 2 +- drivers/usb/serial/usb_wwan.c | 2 +- drivers/usb/serial/visor.c | 2 +- drivers/usb/serial/xsens_mt.c | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) commit 366122afb8198d4d6a9bd4301eabbe8282691e93 Author: Greg Kroah-Hartman Date: Fri Nov 3 12:41:03 2017 +0100 USB: common: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Heikki Krogerus Cc: Peter Chen Cc: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/common/common.c | 4 ---- drivers/usb/common/led.c | 5 ----- drivers/usb/common/ulpi.c | 4 ---- drivers/usb/common/usb-otg-fsm.c | 14 -------------- 4 files changed, 27 deletions(-) commit f64cdd0e94f1faf3b7f2b03af71f70dc6d8da0c2 Author: Greg Kroah-Hartman Date: Fri Nov 3 12:41:04 2017 +0100 USB: usb-skeleton: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Signed-off-by: Greg Kroah-Hartman drivers/usb/usb-skeleton.c | 5 ----- 1 file changed, 5 deletions(-) commit f9d4d453db3a1b8e58705217e106db5b63a4d3fb Author: Greg Kroah-Hartman Date: Fri Nov 3 12:41:02 2017 +0100 USB: core: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Signed-off-by: Greg Kroah-Hartman Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/devices.c | 14 -------------- drivers/usb/core/devio.c | 14 -------------- drivers/usb/core/hcd-pci.c | 14 -------------- drivers/usb/core/hcd.c | 14 -------------- drivers/usb/core/hub.h | 9 --------- drivers/usb/core/ledtrig-usbport.c | 4 ---- drivers/usb/core/of.c | 12 ------------ drivers/usb/core/otg_whitelist.h | 5 ----- drivers/usb/core/port.c | 10 ---------- drivers/usb/core/quirks.c | 6 ------ drivers/usb/core/usb-acpi.c | 5 ----- 11 files changed, 107 deletions(-) commit 6748fa8f1128ed3fcb1b63f7145389c210f4ef19 Author: Greg Kroah-Hartman Date: Fri Nov 3 12:41:01 2017 +0100 USB: image: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Signed-off-by: Greg Kroah-Hartman drivers/usb/image/mdc800.c | 14 -------------- 1 file changed, 14 deletions(-) commit adb393dc558e8bf4f14375c0134711b288f53f5a Author: Greg Kroah-Hartman Date: Fri Nov 3 12:41:00 2017 +0100 USB: class: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Oliver Neukum Signed-off-by: Greg Kroah-Hartman drivers/usb/class/cdc-acm.c | 14 -------------- drivers/usb/class/usblp.c | 16 ---------------- drivers/usb/class/usbtmc.c | 13 ------------- 3 files changed, 43 deletions(-) commit 4a8635ae08e8fa3134cff66a089a3e112f29c8f8 Author: Greg Kroah-Hartman Date: Fri Nov 3 12:40:59 2017 +0100 USB: atm: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Duncan Sands Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/cxacru.c | 15 --------------- drivers/usb/atm/speedtch.c | 15 --------------- drivers/usb/atm/usbatm.c | 15 --------------- drivers/usb/atm/usbatm.h | 15 --------------- drivers/usb/atm/xusbatm.c | 15 --------------- 5 files changed, 75 deletions(-) commit 5d62afbe9572138a25d67b8468d27ec65777824d Author: Greg Kroah-Hartman Date: Fri Nov 3 12:40:58 2017 +0100 USB: misc: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Keith Packard Cc: Juergen Stuber Cc: Cesar Miquel Cc: Richard Leitner Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/adutux.c | 5 ----- drivers/usb/misc/appledisplay.c | 14 -------------- drivers/usb/misc/chaoskey.c | 9 --------- drivers/usb/misc/cypress_cy7c63.c | 4 ---- drivers/usb/misc/cytherm.c | 5 ----- drivers/usb/misc/ehset.c | 9 --------- drivers/usb/misc/emi26.c | 4 ---- drivers/usb/misc/emi62.c | 4 ---- drivers/usb/misc/ezusb.c | 4 ---- drivers/usb/misc/ftdi-elan.c | 5 ----- drivers/usb/misc/idmouse.c | 5 ----- drivers/usb/misc/isight_firmware.c | 4 ---- drivers/usb/misc/ldusb.c | 5 ----- drivers/usb/misc/legousbtower.c | 5 ----- drivers/usb/misc/lvstest.c | 4 ---- drivers/usb/misc/rio500.c | 14 -------------- drivers/usb/misc/rio500_usb.h | 18 ------------------ drivers/usb/misc/trancevibrator.c | 14 -------------- drivers/usb/misc/usb251xb.c | 10 ---------- drivers/usb/misc/usb3503.c | 14 -------------- drivers/usb/misc/usb4604.c | 10 ---------- drivers/usb/misc/usb_u132.h | 5 ----- drivers/usb/misc/usbsevseg.c | 5 ----- drivers/usb/misc/uss720.c | 14 -------------- drivers/usb/misc/yurex.c | 5 ----- 25 files changed, 195 deletions(-) commit 7cb2d993c4617c842230949f901d1cfe8c0b2f11 Author: Greg Kroah-Hartman Date: Fri Nov 3 12:40:57 2017 +0100 USB: storage: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Oliver Neukum Signed-off-by: Greg Kroah-Hartman Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/alauda.c | 14 -------------- drivers/usb/storage/cypress_atacb.c | 14 -------------- drivers/usb/storage/datafab.c | 14 -------------- drivers/usb/storage/debug.c | 14 -------------- drivers/usb/storage/debug.h | 14 -------------- drivers/usb/storage/ene_ub6250.c | 16 ---------------- drivers/usb/storage/freecom.c | 14 -------------- drivers/usb/storage/initializers.c | 14 -------------- drivers/usb/storage/initializers.h | 14 -------------- drivers/usb/storage/isd200.c | 14 -------------- drivers/usb/storage/jumpshot.c | 14 -------------- drivers/usb/storage/karma.c | 14 -------------- drivers/usb/storage/onetouch.c | 18 ------------------ drivers/usb/storage/option_ms.c | 14 -------------- drivers/usb/storage/protocol.c | 14 -------------- drivers/usb/storage/protocol.h | 14 -------------- drivers/usb/storage/realtek_cr.c | 13 ------------- drivers/usb/storage/scsiglue.c | 14 -------------- drivers/usb/storage/scsiglue.h | 14 -------------- drivers/usb/storage/sddr09.c | 14 -------------- drivers/usb/storage/sddr55.c | 14 -------------- drivers/usb/storage/shuttle_usbat.c | 14 -------------- drivers/usb/storage/transport.c | 14 -------------- drivers/usb/storage/transport.h | 14 -------------- drivers/usb/storage/uas.c | 2 -- drivers/usb/storage/unusual_alauda.h | 14 -------------- drivers/usb/storage/unusual_cypress.h | 14 -------------- drivers/usb/storage/unusual_datafab.h | 14 -------------- drivers/usb/storage/unusual_devs.h | 14 -------------- drivers/usb/storage/unusual_ene_ub6250.h | 17 ----------------- drivers/usb/storage/unusual_freecom.h | 14 -------------- drivers/usb/storage/unusual_isd200.h | 14 -------------- drivers/usb/storage/unusual_jumpshot.h | 14 -------------- drivers/usb/storage/unusual_karma.h | 14 -------------- drivers/usb/storage/unusual_onetouch.h | 14 -------------- drivers/usb/storage/unusual_realtek.h | 13 ------------- drivers/usb/storage/unusual_sddr09.h | 14 -------------- drivers/usb/storage/unusual_sddr55.h | 14 -------------- drivers/usb/storage/unusual_uas.h | 14 -------------- drivers/usb/storage/unusual_usbat.h | 14 -------------- drivers/usb/storage/usb.c | 14 -------------- drivers/usb/storage/usb.h | 14 -------------- drivers/usb/storage/usual-tables.c | 14 -------------- 43 files changed, 597 deletions(-) commit 6ca98bc2843e0bc4c2745ff6be7d46694c1398d1 Author: Greg Kroah-Hartman Date: Fri Nov 3 12:40:56 2017 +0100 USB: serial: Remove redundant license text Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Signed-off-by: Greg Kroah-Hartman Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/aircable.c | 4 ---- drivers/usb/serial/ark3116.c | 5 ----- drivers/usb/serial/belkin_sa.c | 5 ----- drivers/usb/serial/belkin_sa.h | 5 ----- drivers/usb/serial/bus.c | 4 ---- drivers/usb/serial/ch341.c | 4 ---- drivers/usb/serial/console.c | 4 ---- drivers/usb/serial/cp210x.c | 4 ---- drivers/usb/serial/cyberjack.c | 5 ----- drivers/usb/serial/cypress_m8.c | 5 ----- drivers/usb/serial/digi_acceleport.c | 5 ----- drivers/usb/serial/empeg.c | 4 ---- drivers/usb/serial/f81232.c | 5 ----- drivers/usb/serial/f81534.c | 5 ----- drivers/usb/serial/ftdi_sio.c | 5 ----- drivers/usb/serial/garmin_gps.c | 14 -------------- drivers/usb/serial/generic.c | 4 ---- drivers/usb/serial/io_16654.h | 4 ---- drivers/usb/serial/io_edgeport.c | 5 ----- drivers/usb/serial/io_edgeport.h | 6 ------ drivers/usb/serial/io_ionsp.h | 5 ----- drivers/usb/serial/io_ti.c | 5 ----- drivers/usb/serial/io_ti.h | 6 ------ drivers/usb/serial/io_usbvend.h | 4 ---- drivers/usb/serial/ipaq.c | 5 ----- drivers/usb/serial/ipw.c | 5 ----- drivers/usb/serial/ir-usb.c | 5 ----- drivers/usb/serial/iuu_phoenix.c | 6 ------ drivers/usb/serial/iuu_phoenix.h | 6 ------ drivers/usb/serial/keyspan.c | 5 ----- drivers/usb/serial/keyspan_pda.c | 5 ----- drivers/usb/serial/kl5kusb105.c | 5 ----- drivers/usb/serial/kobil_sct.c | 5 ----- drivers/usb/serial/mct_u232.c | 5 ----- drivers/usb/serial/mct_u232.h | 5 ----- drivers/usb/serial/mos7720.c | 4 ---- drivers/usb/serial/mos7840.c | 14 -------------- drivers/usb/serial/mxuport.c | 5 ----- drivers/usb/serial/navman.c | 4 ---- drivers/usb/serial/omninet.c | 4 ---- drivers/usb/serial/opticon.c | 4 ---- drivers/usb/serial/option.c | 4 ---- drivers/usb/serial/oti6858.c | 4 ---- drivers/usb/serial/oti6858.h | 5 ----- drivers/usb/serial/pl2303.c | 4 ---- drivers/usb/serial/pl2303.h | 6 ------ drivers/usb/serial/qcaux.c | 4 ---- drivers/usb/serial/qcserial.c | 5 ----- drivers/usb/serial/quatech2.c | 5 ----- drivers/usb/serial/safe_serial.c | 5 ----- drivers/usb/serial/sierra.c | 4 ---- drivers/usb/serial/spcp8x5.c | 5 ----- drivers/usb/serial/symbolserial.c | 4 ---- drivers/usb/serial/ti_usb_3410_5052.c | 5 ----- drivers/usb/serial/upd78f0730.c | 4 ---- drivers/usb/serial/usb-serial-simple.c | 4 ---- drivers/usb/serial/usb-serial.c | 4 ---- drivers/usb/serial/usb_debug.c | 4 ---- drivers/usb/serial/usb_wwan.c | 4 ---- drivers/usb/serial/visor.c | 4 ---- drivers/usb/serial/visor.h | 5 ----- drivers/usb/serial/whiteheat.c | 5 ----- drivers/usb/serial/whiteheat.h | 5 ----- drivers/usb/serial/wishbone-serial.c | 5 ----- drivers/usb/serial/xsens_mt.c | 4 ---- 65 files changed, 322 deletions(-) commit 5fd54ace4721fc5ce2bb5aef6318fcf17f421460 Author: Greg Kroah-Hartman Date: Fri Nov 3 11:28:30 2017 +0100 USB: add SPDX identifiers to all remaining files in drivers/usb/ It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/usb/ and include/linux/usb* files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner Cc: Kate Stewart Cc: Philippe Ombredanne Signed-off-by: Greg Kroah-Hartman Acked-by: Felipe Balbi Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/cxacru.c | 1 + drivers/usb/atm/speedtch.c | 1 + drivers/usb/atm/ueagle-atm.c | 1 + drivers/usb/atm/usbatm.c | 1 + drivers/usb/atm/usbatm.h | 1 + drivers/usb/atm/xusbatm.c | 1 + drivers/usb/c67x00/c67x00-drv.c | 1 + drivers/usb/c67x00/c67x00-hcd.c | 1 + drivers/usb/c67x00/c67x00-hcd.h | 1 + drivers/usb/c67x00/c67x00-ll-hpi.c | 1 + drivers/usb/c67x00/c67x00-sched.c | 1 + drivers/usb/c67x00/c67x00.h | 1 + drivers/usb/chipidea/bits.h | 1 + drivers/usb/chipidea/ci.h | 1 + drivers/usb/chipidea/ci_hdrc_imx.c | 1 + drivers/usb/chipidea/ci_hdrc_imx.h | 1 + drivers/usb/chipidea/ci_hdrc_msm.c | 1 + drivers/usb/chipidea/ci_hdrc_pci.c | 1 + drivers/usb/chipidea/ci_hdrc_usb2.c | 1 + drivers/usb/chipidea/ci_hdrc_zevio.c | 1 + drivers/usb/chipidea/core.c | 1 + drivers/usb/chipidea/host.c | 1 + drivers/usb/chipidea/otg.c | 1 + drivers/usb/chipidea/otg.h | 1 + drivers/usb/chipidea/otg_fsm.c | 1 + drivers/usb/chipidea/otg_fsm.h | 1 + drivers/usb/chipidea/udc.c | 1 + drivers/usb/chipidea/udc.h | 1 + drivers/usb/chipidea/ulpi.c | 1 + drivers/usb/chipidea/usbmisc_imx.c | 1 + drivers/usb/class/cdc-acm.c | 1 + drivers/usb/class/cdc-wdm.c | 1 + drivers/usb/class/usblp.c | 1 + drivers/usb/class/usbtmc.c | 1 + drivers/usb/common/common.c | 1 + drivers/usb/common/led.c | 1 + drivers/usb/common/ulpi.c | 1 + drivers/usb/common/usb-otg-fsm.c | 1 + drivers/usb/core/devices.c | 1 + drivers/usb/core/devio.c | 1 + drivers/usb/core/hcd-pci.c | 1 + drivers/usb/core/hcd.c | 1 + drivers/usb/core/hub.h | 1 + drivers/usb/core/ledtrig-usbport.c | 1 + drivers/usb/core/of.c | 1 + drivers/usb/core/otg_whitelist.h | 1 + drivers/usb/core/port.c | 1 + drivers/usb/core/quirks.c | 1 + drivers/usb/core/usb-acpi.c | 1 + drivers/usb/dwc2/core.c | 1 + drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/core_intr.c | 1 + drivers/usb/dwc2/debug.h | 1 + drivers/usb/dwc2/debugfs.c | 1 + drivers/usb/dwc2/gadget.c | 1 + drivers/usb/dwc2/hcd.c | 1 + drivers/usb/dwc2/hcd.h | 1 + drivers/usb/dwc2/hcd_ddma.c | 1 + drivers/usb/dwc2/hcd_intr.c | 1 + drivers/usb/dwc2/hcd_queue.c | 1 + drivers/usb/dwc2/hw.h | 1 + drivers/usb/dwc2/params.c | 1 + drivers/usb/dwc2/pci.c | 1 + drivers/usb/dwc2/platform.c | 1 + drivers/usb/dwc3/core.c | 1 + drivers/usb/dwc3/core.h | 1 + drivers/usb/dwc3/debug.h | 1 + drivers/usb/dwc3/debugfs.c | 1 + drivers/usb/dwc3/drd.c | 1 + drivers/usb/dwc3/dwc3-exynos.c | 1 + drivers/usb/dwc3/dwc3-keystone.c | 1 + drivers/usb/dwc3/dwc3-of-simple.c | 1 + drivers/usb/dwc3/dwc3-omap.c | 1 + drivers/usb/dwc3/dwc3-pci.c | 1 + drivers/usb/dwc3/dwc3-st.c | 1 + drivers/usb/dwc3/ep0.c | 1 + drivers/usb/dwc3/gadget.c | 1 + drivers/usb/dwc3/gadget.h | 1 + drivers/usb/dwc3/host.c | 1 + drivers/usb/dwc3/io.h | 1 + drivers/usb/dwc3/trace.c | 1 + drivers/usb/dwc3/trace.h | 1 + drivers/usb/dwc3/ulpi.c | 1 + drivers/usb/early/ehci-dbgp.c | 1 + drivers/usb/early/xhci-dbc.c | 1 + drivers/usb/early/xhci-dbc.h | 1 + drivers/usb/gadget/composite.c | 1 + drivers/usb/gadget/config.c | 1 + drivers/usb/gadget/configfs.c | 1 + drivers/usb/gadget/epautoconf.c | 1 + drivers/usb/gadget/function/f_acm.c | 1 + drivers/usb/gadget/function/f_ecm.c | 1 + drivers/usb/gadget/function/f_eem.c | 1 + drivers/usb/gadget/function/f_fs.c | 1 + drivers/usb/gadget/function/f_hid.c | 1 + drivers/usb/gadget/function/f_loopback.c | 1 + drivers/usb/gadget/function/f_mass_storage.c | 1 + drivers/usb/gadget/function/f_midi.c | 1 + drivers/usb/gadget/function/f_ncm.c | 1 + drivers/usb/gadget/function/f_obex.c | 1 + drivers/usb/gadget/function/f_phonet.c | 1 + drivers/usb/gadget/function/f_printer.c | 1 + drivers/usb/gadget/function/f_rndis.c | 1 + drivers/usb/gadget/function/f_serial.c | 1 + drivers/usb/gadget/function/f_sourcesink.c | 1 + drivers/usb/gadget/function/f_subset.c | 1 + drivers/usb/gadget/function/f_tcm.c | 1 + drivers/usb/gadget/function/f_uac1.c | 1 + drivers/usb/gadget/function/f_uac1_legacy.c | 1 + drivers/usb/gadget/function/f_uac2.c | 1 + drivers/usb/gadget/function/f_uvc.c | 1 + drivers/usb/gadget/function/f_uvc.h | 1 + drivers/usb/gadget/function/rndis.c | 1 + drivers/usb/gadget/function/rndis.h | 1 + drivers/usb/gadget/function/storage_common.c | 1 + drivers/usb/gadget/function/u_audio.c | 1 + drivers/usb/gadget/function/u_audio.h | 1 + drivers/usb/gadget/function/u_ecm.h | 1 + drivers/usb/gadget/function/u_eem.h | 1 + drivers/usb/gadget/function/u_ether.c | 1 + drivers/usb/gadget/function/u_ether.h | 1 + drivers/usb/gadget/function/u_ether_configfs.h | 1 + drivers/usb/gadget/function/u_fs.h | 1 + drivers/usb/gadget/function/u_gether.h | 1 + drivers/usb/gadget/function/u_hid.h | 1 + drivers/usb/gadget/function/u_midi.h | 1 + drivers/usb/gadget/function/u_ncm.h | 1 + drivers/usb/gadget/function/u_phonet.h | 1 + drivers/usb/gadget/function/u_printer.h | 1 + drivers/usb/gadget/function/u_rndis.h | 1 + drivers/usb/gadget/function/u_serial.c | 1 + drivers/usb/gadget/function/u_serial.h | 1 + drivers/usb/gadget/function/u_tcm.h | 1 + drivers/usb/gadget/function/u_uac1.h | 1 + drivers/usb/gadget/function/u_uac1_legacy.c | 1 + drivers/usb/gadget/function/u_uac1_legacy.h | 1 + drivers/usb/gadget/function/u_uac2.h | 1 + drivers/usb/gadget/function/u_uvc.h | 1 + drivers/usb/gadget/function/uvc.h | 1 + drivers/usb/gadget/function/uvc_configfs.c | 1 + drivers/usb/gadget/function/uvc_configfs.h | 1 + drivers/usb/gadget/function/uvc_queue.c | 1 + drivers/usb/gadget/function/uvc_v4l2.c | 1 + drivers/usb/gadget/function/uvc_v4l2.h | 1 + drivers/usb/gadget/function/uvc_video.c | 1 + drivers/usb/gadget/function/uvc_video.h | 1 + drivers/usb/gadget/functions.c | 1 + drivers/usb/gadget/legacy/acm_ms.c | 1 + drivers/usb/gadget/legacy/audio.c | 1 + drivers/usb/gadget/legacy/cdc2.c | 1 + drivers/usb/gadget/legacy/dbgp.c | 1 + drivers/usb/gadget/legacy/ether.c | 1 + drivers/usb/gadget/legacy/g_ffs.c | 1 + drivers/usb/gadget/legacy/gmidi.c | 1 + drivers/usb/gadget/legacy/hid.c | 1 + drivers/usb/gadget/legacy/inode.c | 1 + drivers/usb/gadget/legacy/mass_storage.c | 1 + drivers/usb/gadget/legacy/multi.c | 1 + drivers/usb/gadget/legacy/ncm.c | 1 + drivers/usb/gadget/legacy/nokia.c | 1 + drivers/usb/gadget/legacy/printer.c | 1 + drivers/usb/gadget/legacy/serial.c | 1 + drivers/usb/gadget/legacy/tcm_usb_gadget.c | 1 + drivers/usb/gadget/legacy/webcam.c | 1 + drivers/usb/gadget/legacy/zero.c | 1 + drivers/usb/gadget/u_f.c | 1 + drivers/usb/gadget/u_f.h | 1 + drivers/usb/gadget/u_os_desc.h | 1 + drivers/usb/gadget/udc/amd5536udc.h | 1 + drivers/usb/gadget/udc/amd5536udc_pci.c | 1 + drivers/usb/gadget/udc/at91_udc.c | 1 + drivers/usb/gadget/udc/at91_udc.h | 1 + drivers/usb/gadget/udc/atmel_usba_udc.c | 1 + drivers/usb/gadget/udc/atmel_usba_udc.h | 1 + drivers/usb/gadget/udc/bcm63xx_udc.c | 1 + drivers/usb/gadget/udc/bdc/bdc.h | 1 + drivers/usb/gadget/udc/bdc/bdc_cmd.c | 1 + drivers/usb/gadget/udc/bdc/bdc_cmd.h | 1 + drivers/usb/gadget/udc/bdc/bdc_core.c | 1 + drivers/usb/gadget/udc/bdc/bdc_dbg.c | 1 + drivers/usb/gadget/udc/bdc/bdc_dbg.h | 1 + drivers/usb/gadget/udc/bdc/bdc_ep.c | 1 + drivers/usb/gadget/udc/bdc/bdc_ep.h | 1 + drivers/usb/gadget/udc/bdc/bdc_pci.c | 1 + drivers/usb/gadget/udc/bdc/bdc_udc.c | 1 + drivers/usb/gadget/udc/core.c | 1 + drivers/usb/gadget/udc/dummy_hcd.c | 1 + drivers/usb/gadget/udc/fotg210-udc.c | 1 + drivers/usb/gadget/udc/fotg210.h | 1 + drivers/usb/gadget/udc/fsl_mxc_udc.c | 1 + drivers/usb/gadget/udc/fsl_qe_udc.c | 1 + drivers/usb/gadget/udc/fsl_qe_udc.h | 1 + drivers/usb/gadget/udc/fsl_udc_core.c | 1 + drivers/usb/gadget/udc/fsl_usb2_udc.h | 1 + drivers/usb/gadget/udc/fusb300_udc.c | 1 + drivers/usb/gadget/udc/fusb300_udc.h | 1 + drivers/usb/gadget/udc/goku_udc.c | 1 + drivers/usb/gadget/udc/goku_udc.h | 1 + drivers/usb/gadget/udc/gr_udc.c | 1 + drivers/usb/gadget/udc/gr_udc.h | 1 + drivers/usb/gadget/udc/lpc32xx_udc.c | 1 + drivers/usb/gadget/udc/m66592-udc.c | 1 + drivers/usb/gadget/udc/m66592-udc.h | 1 + drivers/usb/gadget/udc/mv_u3d.h | 1 + drivers/usb/gadget/udc/mv_u3d_core.c | 1 + drivers/usb/gadget/udc/mv_udc.h | 1 + drivers/usb/gadget/udc/mv_udc_core.c | 1 + drivers/usb/gadget/udc/net2272.c | 1 + drivers/usb/gadget/udc/net2272.h | 1 + drivers/usb/gadget/udc/net2280.c | 1 + drivers/usb/gadget/udc/net2280.h | 1 + drivers/usb/gadget/udc/omap_udc.c | 1 + drivers/usb/gadget/udc/pch_udc.c | 1 + drivers/usb/gadget/udc/pxa25x_udc.c | 1 + drivers/usb/gadget/udc/pxa25x_udc.h | 1 + drivers/usb/gadget/udc/pxa27x_udc.c | 1 + drivers/usb/gadget/udc/pxa27x_udc.h | 1 + drivers/usb/gadget/udc/r8a66597-udc.c | 1 + drivers/usb/gadget/udc/r8a66597-udc.h | 1 + drivers/usb/gadget/udc/renesas_usb3.c | 1 + drivers/usb/gadget/udc/s3c-hsudc.c | 1 + drivers/usb/gadget/udc/s3c2410_udc.c | 1 + drivers/usb/gadget/udc/s3c2410_udc.h | 1 + drivers/usb/gadget/udc/snps_udc_core.c | 1 + drivers/usb/gadget/udc/snps_udc_plat.c | 1 + drivers/usb/gadget/udc/trace.c | 1 + drivers/usb/gadget/udc/trace.h | 1 + drivers/usb/gadget/udc/udc-xilinx.c | 1 + drivers/usb/gadget/usbstring.c | 1 + drivers/usb/host/bcma-hcd.c | 1 + drivers/usb/host/ehci-atmel.c | 1 + drivers/usb/host/ehci-dbg.c | 1 + drivers/usb/host/ehci-exynos.c | 1 + drivers/usb/host/ehci-fsl.c | 1 + drivers/usb/host/ehci-fsl.h | 1 + drivers/usb/host/ehci-grlib.c | 1 + drivers/usb/host/ehci-hcd.c | 1 + drivers/usb/host/ehci-hub.c | 1 + drivers/usb/host/ehci-mem.c | 1 + drivers/usb/host/ehci-mv.c | 1 + drivers/usb/host/ehci-mxc.c | 1 + drivers/usb/host/ehci-omap.c | 1 + drivers/usb/host/ehci-orion.c | 1 + drivers/usb/host/ehci-pci.c | 1 + drivers/usb/host/ehci-platform.c | 1 + drivers/usb/host/ehci-pmcmsp.c | 1 + drivers/usb/host/ehci-ppc-of.c | 1 + drivers/usb/host/ehci-ps3.c | 1 + drivers/usb/host/ehci-q.c | 1 + drivers/usb/host/ehci-sched.c | 1 + drivers/usb/host/ehci-sh.c | 1 + drivers/usb/host/ehci-spear.c | 1 + drivers/usb/host/ehci-st.c | 1 + drivers/usb/host/ehci-sysfs.c | 1 + drivers/usb/host/ehci-tegra.c | 1 + drivers/usb/host/ehci-tilegx.c | 1 + drivers/usb/host/ehci-timer.c | 1 + drivers/usb/host/ehci-w90x900.c | 1 + drivers/usb/host/ehci-xilinx-of.c | 1 + drivers/usb/host/ehci.h | 1 + drivers/usb/host/fhci-dbg.c | 1 + drivers/usb/host/fhci-hcd.c | 1 + drivers/usb/host/fhci-hub.c | 1 + drivers/usb/host/fhci-mem.c | 1 + drivers/usb/host/fhci-q.c | 1 + drivers/usb/host/fhci-sched.c | 1 + drivers/usb/host/fhci-tds.c | 1 + drivers/usb/host/fhci.h | 1 + drivers/usb/host/fotg210-hcd.c | 1 + drivers/usb/host/fsl-mph-dr-of.c | 1 + drivers/usb/host/hwa-hc.c | 1 + drivers/usb/host/imx21-dbg.c | 1 + drivers/usb/host/imx21-hcd.c | 1 + drivers/usb/host/imx21-hcd.h | 1 + drivers/usb/host/isp116x-hcd.c | 1 + drivers/usb/host/isp1362-hcd.c | 1 + drivers/usb/host/max3421-hcd.c | 1 + drivers/usb/host/ohci-at91.c | 1 + drivers/usb/host/ohci-da8xx.c | 1 + drivers/usb/host/ohci-dbg.c | 1 + drivers/usb/host/ohci-exynos.c | 1 + drivers/usb/host/ohci-hcd.c | 1 + drivers/usb/host/ohci-hub.c | 1 + drivers/usb/host/ohci-mem.c | 1 + drivers/usb/host/ohci-nxp.c | 1 + drivers/usb/host/ohci-omap.c | 1 + drivers/usb/host/ohci-pci.c | 1 + drivers/usb/host/ohci-platform.c | 1 + drivers/usb/host/ohci-ppc-of.c | 1 + drivers/usb/host/ohci-ps3.c | 1 + drivers/usb/host/ohci-pxa27x.c | 1 + drivers/usb/host/ohci-q.c | 1 + drivers/usb/host/ohci-s3c2410.c | 1 + drivers/usb/host/ohci-sa1111.c | 1 + drivers/usb/host/ohci-sm501.c | 1 + drivers/usb/host/ohci-spear.c | 1 + drivers/usb/host/ohci-st.c | 1 + drivers/usb/host/ohci-tilegx.c | 1 + drivers/usb/host/ohci-tmio.c | 1 + drivers/usb/host/ohci.h | 1 + drivers/usb/host/oxu210hp-hcd.c | 1 + drivers/usb/host/pci-quirks.c | 1 + drivers/usb/host/r8a66597-hcd.c | 1 + drivers/usb/host/r8a66597.h | 1 + drivers/usb/host/sl811-hcd.c | 1 + drivers/usb/host/sl811_cs.c | 1 + drivers/usb/host/ssb-hcd.c | 1 + drivers/usb/host/u132-hcd.c | 1 + drivers/usb/host/uhci-hcd.c | 1 + drivers/usb/host/whci/asl.c | 1 + drivers/usb/host/whci/debug.c | 1 + drivers/usb/host/whci/hcd.c | 1 + drivers/usb/host/whci/hw.c | 1 + drivers/usb/host/whci/init.c | 1 + drivers/usb/host/whci/int.c | 1 + drivers/usb/host/whci/pzl.c | 1 + drivers/usb/host/whci/qset.c | 1 + drivers/usb/host/whci/whcd.h | 1 + drivers/usb/host/whci/whci-hc.h | 1 + drivers/usb/host/whci/wusb.c | 1 + drivers/usb/host/xhci-dbg.c | 1 + drivers/usb/host/xhci-ext-caps.h | 1 + drivers/usb/host/xhci-hub.c | 1 + drivers/usb/host/xhci-mem.c | 1 + drivers/usb/host/xhci-mtk-sch.c | 1 + drivers/usb/host/xhci-mtk.c | 1 + drivers/usb/host/xhci-mtk.h | 1 + drivers/usb/host/xhci-mvebu.c | 1 + drivers/usb/host/xhci-mvebu.h | 1 + drivers/usb/host/xhci-pci.c | 1 + drivers/usb/host/xhci-plat.c | 1 + drivers/usb/host/xhci-plat.h | 1 + drivers/usb/host/xhci-rcar.c | 1 + drivers/usb/host/xhci-rcar.h | 1 + drivers/usb/host/xhci-ring.c | 1 + drivers/usb/host/xhci-tegra.c | 1 + drivers/usb/host/xhci-trace.c | 1 + drivers/usb/host/xhci-trace.h | 1 + drivers/usb/host/xhci.c | 1 + drivers/usb/host/xhci.h | 1 + drivers/usb/image/mdc800.c | 1 + drivers/usb/image/microtek.c | 1 + drivers/usb/isp1760/isp1760-core.c | 1 + drivers/usb/isp1760/isp1760-core.h | 1 + drivers/usb/isp1760/isp1760-regs.h | 1 + drivers/usb/isp1760/isp1760-udc.c | 1 + drivers/usb/isp1760/isp1760-udc.h | 1 + drivers/usb/misc/adutux.c | 1 + drivers/usb/misc/appledisplay.c | 1 + drivers/usb/misc/chaoskey.c | 1 + drivers/usb/misc/cypress_cy7c63.c | 1 + drivers/usb/misc/cytherm.c | 1 + drivers/usb/misc/ehset.c | 1 + drivers/usb/misc/emi26.c | 1 + drivers/usb/misc/emi62.c | 1 + drivers/usb/misc/ezusb.c | 1 + drivers/usb/misc/ftdi-elan.c | 1 + drivers/usb/misc/idmouse.c | 1 + drivers/usb/misc/iowarrior.c | 1 + drivers/usb/misc/isight_firmware.c | 1 + drivers/usb/misc/ldusb.c | 1 + drivers/usb/misc/legousbtower.c | 1 + drivers/usb/misc/lvstest.c | 1 + drivers/usb/misc/rio500.c | 1 + drivers/usb/misc/rio500_usb.h | 1 + drivers/usb/misc/sisusbvga/sisusb.c | 1 + drivers/usb/misc/sisusbvga/sisusb.h | 1 + drivers/usb/misc/sisusbvga/sisusb_con.c | 1 + drivers/usb/misc/sisusbvga/sisusb_init.c | 1 + drivers/usb/misc/sisusbvga/sisusb_init.h | 1 + drivers/usb/misc/sisusbvga/sisusb_struct.h | 1 + drivers/usb/misc/trancevibrator.c | 1 + drivers/usb/misc/usb251xb.c | 1 + drivers/usb/misc/usb3503.c | 1 + drivers/usb/misc/usb4604.c | 1 + drivers/usb/misc/usb_u132.h | 1 + drivers/usb/misc/usblcd.c | 1 + drivers/usb/misc/usbsevseg.c | 1 + drivers/usb/misc/usbtest.c | 1 + drivers/usb/misc/uss720.c | 1 + drivers/usb/misc/yurex.c | 1 + drivers/usb/mon/mon_main.c | 1 + drivers/usb/mtu3/mtu3.h | 1 + drivers/usb/mtu3/mtu3_core.c | 1 + drivers/usb/mtu3/mtu3_dr.c | 1 + drivers/usb/mtu3/mtu3_dr.h | 1 + drivers/usb/mtu3/mtu3_gadget.c | 1 + drivers/usb/mtu3/mtu3_gadget_ep0.c | 1 + drivers/usb/mtu3/mtu3_host.c | 1 + drivers/usb/mtu3/mtu3_hw_regs.h | 1 + drivers/usb/mtu3/mtu3_plat.c | 1 + drivers/usb/mtu3/mtu3_qmu.c | 1 + drivers/usb/mtu3/mtu3_qmu.h | 1 + drivers/usb/musb/am35x.c | 1 + drivers/usb/musb/blackfin.c | 1 + drivers/usb/musb/blackfin.h | 1 + drivers/usb/musb/cppi_dma.c | 1 + drivers/usb/musb/da8xx.c | 1 + drivers/usb/musb/davinci.c | 1 + drivers/usb/musb/davinci.h | 1 + drivers/usb/musb/jz4740.c | 1 + drivers/usb/musb/musb_am335x.c | 1 + drivers/usb/musb/musb_core.c | 1 + drivers/usb/musb/musb_core.h | 1 + drivers/usb/musb/musb_cppi41.c | 1 + drivers/usb/musb/musb_debug.h | 1 + drivers/usb/musb/musb_debugfs.c | 1 + drivers/usb/musb/musb_dma.h | 1 + drivers/usb/musb/musb_dsps.c | 1 + drivers/usb/musb/musb_gadget.c | 1 + drivers/usb/musb/musb_gadget.h | 1 + drivers/usb/musb/musb_gadget_ep0.c | 1 + drivers/usb/musb/musb_host.c | 1 + drivers/usb/musb/musb_host.h | 1 + drivers/usb/musb/musb_io.h | 1 + drivers/usb/musb/musb_regs.h | 1 + drivers/usb/musb/musb_trace.c | 1 + drivers/usb/musb/musb_trace.h | 1 + drivers/usb/musb/musb_virthub.c | 1 + drivers/usb/musb/musbhsdma.c | 1 + drivers/usb/musb/musbhsdma.h | 1 + drivers/usb/musb/omap2430.c | 1 + drivers/usb/musb/omap2430.h | 1 + drivers/usb/musb/sunxi.c | 1 + drivers/usb/musb/tusb6010.c | 1 + drivers/usb/musb/tusb6010.h | 1 + drivers/usb/musb/tusb6010_omap.c | 1 + drivers/usb/musb/ux500.c | 1 + drivers/usb/musb/ux500_dma.c | 1 + drivers/usb/phy/of.c | 1 + drivers/usb/phy/phy-ab8500-usb.c | 1 + drivers/usb/phy/phy-am335x-control.c | 1 + drivers/usb/phy/phy-am335x.c | 1 + drivers/usb/phy/phy-fsl-usb.c | 1 + drivers/usb/phy/phy-fsl-usb.h | 1 + drivers/usb/phy/phy-generic.c | 1 + drivers/usb/phy/phy-gpio-vbus-usb.c | 1 + drivers/usb/phy/phy-isp1301-omap.c | 1 + drivers/usb/phy/phy-isp1301.c | 1 + drivers/usb/phy/phy-keystone.c | 1 + drivers/usb/phy/phy-mv-usb.c | 1 + drivers/usb/phy/phy-mv-usb.h | 1 + drivers/usb/phy/phy-mxs-usb.c | 1 + drivers/usb/phy/phy-omap-otg.c | 1 + drivers/usb/phy/phy-tahvo.c | 1 + drivers/usb/phy/phy-tegra-usb.c | 1 + drivers/usb/phy/phy-twl6030-usb.c | 1 + drivers/usb/phy/phy-ulpi-viewport.c | 1 + drivers/usb/phy/phy-ulpi.c | 1 + drivers/usb/phy/phy.c | 1 + drivers/usb/renesas_usbhs/common.c | 1 + drivers/usb/renesas_usbhs/common.h | 1 + drivers/usb/renesas_usbhs/fifo.c | 1 + drivers/usb/renesas_usbhs/fifo.h | 1 + drivers/usb/renesas_usbhs/mod.c | 1 + drivers/usb/renesas_usbhs/mod.h | 1 + drivers/usb/renesas_usbhs/mod_gadget.c | 1 + drivers/usb/renesas_usbhs/mod_host.c | 1 + drivers/usb/renesas_usbhs/pipe.c | 1 + drivers/usb/renesas_usbhs/pipe.h | 1 + drivers/usb/renesas_usbhs/rcar2.c | 1 + drivers/usb/renesas_usbhs/rcar3.c | 1 + drivers/usb/serial/aircable.c | 1 + drivers/usb/serial/ark3116.c | 1 + drivers/usb/serial/belkin_sa.c | 1 + drivers/usb/serial/belkin_sa.h | 1 + drivers/usb/serial/bus.c | 1 + drivers/usb/serial/ch341.c | 1 + drivers/usb/serial/console.c | 1 + drivers/usb/serial/cp210x.c | 1 + drivers/usb/serial/cyberjack.c | 1 + drivers/usb/serial/cypress_m8.c | 1 + drivers/usb/serial/digi_acceleport.c | 1 + drivers/usb/serial/empeg.c | 1 + drivers/usb/serial/f81232.c | 1 + drivers/usb/serial/f81534.c | 1 + drivers/usb/serial/ftdi_sio.c | 1 + drivers/usb/serial/garmin_gps.c | 1 + drivers/usb/serial/generic.c | 1 + drivers/usb/serial/io_16654.h | 1 + drivers/usb/serial/io_edgeport.c | 1 + drivers/usb/serial/io_edgeport.h | 1 + drivers/usb/serial/io_ionsp.h | 1 + drivers/usb/serial/io_ti.c | 1 + drivers/usb/serial/io_ti.h | 1 + drivers/usb/serial/io_usbvend.h | 1 + drivers/usb/serial/ipaq.c | 1 + drivers/usb/serial/ipw.c | 1 + drivers/usb/serial/ir-usb.c | 1 + drivers/usb/serial/iuu_phoenix.c | 1 + drivers/usb/serial/iuu_phoenix.h | 1 + drivers/usb/serial/keyspan.c | 1 + drivers/usb/serial/keyspan_pda.c | 1 + drivers/usb/serial/kl5kusb105.c | 1 + drivers/usb/serial/kobil_sct.c | 1 + drivers/usb/serial/mct_u232.c | 1 + drivers/usb/serial/mct_u232.h | 1 + drivers/usb/serial/metro-usb.c | 1 + drivers/usb/serial/mos7720.c | 1 + drivers/usb/serial/mos7840.c | 1 + drivers/usb/serial/mxuport.c | 1 + drivers/usb/serial/navman.c | 1 + drivers/usb/serial/omninet.c | 1 + drivers/usb/serial/opticon.c | 1 + drivers/usb/serial/option.c | 1 + drivers/usb/serial/oti6858.c | 1 + drivers/usb/serial/oti6858.h | 1 + drivers/usb/serial/pl2303.c | 1 + drivers/usb/serial/pl2303.h | 1 + drivers/usb/serial/qcaux.c | 1 + drivers/usb/serial/qcserial.c | 1 + drivers/usb/serial/quatech2.c | 1 + drivers/usb/serial/safe_serial.c | 1 + drivers/usb/serial/sierra.c | 1 + drivers/usb/serial/spcp8x5.c | 1 + drivers/usb/serial/ssu100.c | 1 + drivers/usb/serial/symbolserial.c | 1 + drivers/usb/serial/ti_usb_3410_5052.c | 1 + drivers/usb/serial/upd78f0730.c | 1 + drivers/usb/serial/usb-serial-simple.c | 1 + drivers/usb/serial/usb-serial.c | 1 + drivers/usb/serial/usb_debug.c | 1 + drivers/usb/serial/usb_wwan.c | 1 + drivers/usb/serial/visor.c | 1 + drivers/usb/serial/visor.h | 1 + drivers/usb/serial/whiteheat.c | 1 + drivers/usb/serial/whiteheat.h | 1 + drivers/usb/serial/wishbone-serial.c | 1 + drivers/usb/serial/xsens_mt.c | 1 + drivers/usb/storage/alauda.c | 1 + drivers/usb/storage/cypress_atacb.c | 1 + drivers/usb/storage/datafab.c | 1 + drivers/usb/storage/debug.c | 1 + drivers/usb/storage/debug.h | 1 + drivers/usb/storage/ene_ub6250.c | 1 + drivers/usb/storage/freecom.c | 1 + drivers/usb/storage/initializers.c | 1 + drivers/usb/storage/initializers.h | 1 + drivers/usb/storage/isd200.c | 1 + drivers/usb/storage/jumpshot.c | 1 + drivers/usb/storage/karma.c | 1 + drivers/usb/storage/onetouch.c | 1 + drivers/usb/storage/option_ms.c | 1 + drivers/usb/storage/protocol.c | 1 + drivers/usb/storage/protocol.h | 1 + drivers/usb/storage/realtek_cr.c | 1 + drivers/usb/storage/scsiglue.c | 1 + drivers/usb/storage/scsiglue.h | 1 + drivers/usb/storage/sddr09.c | 1 + drivers/usb/storage/sddr55.c | 1 + drivers/usb/storage/shuttle_usbat.c | 1 + drivers/usb/storage/transport.c | 1 + drivers/usb/storage/transport.h | 1 + drivers/usb/storage/uas.c | 1 + drivers/usb/storage/unusual_alauda.h | 1 + drivers/usb/storage/unusual_cypress.h | 1 + drivers/usb/storage/unusual_datafab.h | 1 + drivers/usb/storage/unusual_devs.h | 1 + drivers/usb/storage/unusual_ene_ub6250.h | 1 + drivers/usb/storage/unusual_freecom.h | 1 + drivers/usb/storage/unusual_isd200.h | 1 + drivers/usb/storage/unusual_jumpshot.h | 1 + drivers/usb/storage/unusual_karma.h | 1 + drivers/usb/storage/unusual_onetouch.h | 1 + drivers/usb/storage/unusual_realtek.h | 1 + drivers/usb/storage/unusual_sddr09.h | 1 + drivers/usb/storage/unusual_sddr55.h | 1 + drivers/usb/storage/unusual_uas.h | 1 + drivers/usb/storage/unusual_usbat.h | 1 + drivers/usb/storage/usb.c | 1 + drivers/usb/storage/usb.h | 1 + drivers/usb/storage/usual-tables.c | 1 + drivers/usb/typec/typec.c | 1 + drivers/usb/typec/typec_wcove.c | 1 + drivers/usb/typec/ucsi/ucsi.c | 1 + drivers/usb/typec/ucsi/ucsi_acpi.c | 1 + drivers/usb/usb-skeleton.c | 1 + drivers/usb/usbip/stub.h | 1 + drivers/usb/usbip/stub_dev.c | 1 + drivers/usb/usbip/stub_main.c | 1 + drivers/usb/usbip/stub_rx.c | 1 + drivers/usb/usbip/stub_tx.c | 1 + drivers/usb/usbip/usbip_common.c | 1 + drivers/usb/usbip/usbip_common.h | 1 + drivers/usb/usbip/usbip_event.c | 1 + drivers/usb/usbip/vhci.h | 1 + drivers/usb/usbip/vhci_hcd.c | 1 + drivers/usb/usbip/vhci_rx.c | 1 + drivers/usb/usbip/vhci_sysfs.c | 1 + drivers/usb/usbip/vhci_tx.c | 1 + drivers/usb/usbip/vudc.h | 1 + drivers/usb/usbip/vudc_dev.c | 1 + drivers/usb/usbip/vudc_main.c | 1 + drivers/usb/usbip/vudc_rx.c | 1 + drivers/usb/usbip/vudc_sysfs.c | 1 + drivers/usb/usbip/vudc_transfer.c | 1 + drivers/usb/usbip/vudc_tx.c | 1 + drivers/usb/wusbcore/cbaf.c | 1 + drivers/usb/wusbcore/crypto.c | 1 + drivers/usb/wusbcore/dev-sysfs.c | 1 + drivers/usb/wusbcore/devconnect.c | 1 + drivers/usb/wusbcore/mmc.c | 1 + drivers/usb/wusbcore/pal.c | 1 + drivers/usb/wusbcore/reservation.c | 1 + drivers/usb/wusbcore/rh.c | 1 + drivers/usb/wusbcore/security.c | 1 + drivers/usb/wusbcore/wa-hc.c | 1 + drivers/usb/wusbcore/wa-hc.h | 1 + drivers/usb/wusbcore/wa-nep.c | 1 + drivers/usb/wusbcore/wa-rpipe.c | 1 + drivers/usb/wusbcore/wa-xfer.c | 1 + drivers/usb/wusbcore/wusbhc.c | 1 + drivers/usb/wusbcore/wusbhc.h | 1 + include/linux/usb/association.h | 1 + include/linux/usb/audio-v2.h | 1 + include/linux/usb/audio.h | 1 + include/linux/usb/c67x00.h | 1 + include/linux/usb/cdc-wdm.h | 1 + include/linux/usb/cdc.h | 1 + include/linux/usb/cdc_ncm.h | 1 + include/linux/usb/composite.h | 1 + include/linux/usb/ehci_def.h | 1 + include/linux/usb/ehci_pdriver.h | 1 + include/linux/usb/g_hid.h | 1 + include/linux/usb/gadget.h | 1 + include/linux/usb/gpio_vbus.h | 1 + include/linux/usb/hcd.h | 1 + include/linux/usb/input.h | 1 + include/linux/usb/isp1301.h | 1 + include/linux/usb/m66592.h | 1 + include/linux/usb/musb-ux500.h | 1 + include/linux/usb/net2280.h | 1 + include/linux/usb/of.h | 1 + include/linux/usb/ohci_pdriver.h | 1 + include/linux/usb/otg-fsm.h | 1 + include/linux/usb/phy_companion.h | 1 + include/linux/usb/r8a66597.h | 1 + include/linux/usb/renesas_usbhs.h | 1 + include/linux/usb/rndis_host.h | 1 + include/linux/usb/samsung_usb_phy.h | 1 + include/linux/usb/serial.h | 1 + include/linux/usb/storage.h | 1 + include/linux/usb/tegra_usb_phy.h | 1 + include/linux/usb/tilegx.h | 1 + include/linux/usb/ulpi.h | 1 + include/linux/usb/usb338x.h | 1 + include/linux/usb/usbnet.h | 1 + include/linux/usb/wusb-wa.h | 1 + include/linux/usb/wusb.h | 1 + include/linux/usb/xhci-dbgp.h | 1 + include/linux/usbdevice_fs.h | 1 + 651 files changed, 651 insertions(+) commit 965f94c77552d80f824229a6a68f7ca92a59e5ff Author: Andreas Färber Date: Mon Feb 20 17:24:04 2017 +0100 arm64: dts: actions: s900-bubblegum-96: Add fake uart5 clock Give the serial driver a fixed-clock as input for baudrate 115200. Signed-off-by: Andreas Färber arch/arm64/boot/dts/actions/s900-bubblegum-96.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit 7f6a78fe34f041da317e46813254abab776d46f7 Author: Andreas Färber Date: Sat Sep 9 17:43:49 2017 +0200 ARM: dts: owl-s500: Add CubieBoard6 Add a Device Tree for Cubietech CubieBoard6. Cc: support@cubietech.com Signed-off-by: Andreas Färber arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/owl-s500-cubieboard6.dts | 44 ++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) commit fa687604fa750f934dbbebb7a5b6cda570e88cb8 Author: Andreas Färber Date: Mon Sep 11 00:31:52 2017 +0200 dt-bindings: arm: actions: Add CubieBoard6 Define a compatible string for Cubietech CubieBoard6. Cc: support@cubietech.com Acked-by: Rob Herring Signed-off-by: Andreas Färber Documentation/devicetree/bindings/arm/actions.txt | 1 + 1 file changed, 1 insertion(+) commit 80793e0d7f3e443341f810bb0056ace14a0e2500 Author: Andreas Färber Date: Fri Feb 24 02:39:08 2017 +0100 ARM: dts: owl-s500-guitar-bb-rev-b: Add fake uart3 clock Add a fixed-clock for baudrate 115200. Signed-off-by: Andreas Färber arch/arm/boot/dts/owl-s500-guitar-bb-rev-b.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit 4dc8bf927c3d50885dab14c1e3dd21b797cf3c24 Author: Andreas Färber Date: Mon Jun 5 21:20:17 2017 +0200 ARM: dts: owl-s500: Set power domains for CPU2 and CPU3 CPU2 has its own power domain PD_CPU2, and CPU3 has PD_CPU3. Signed-off-by: Andreas Färber arch/arm/boot/dts/owl-s500.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 6e300769dcbaba7bfacbc02ec9c3fcc595eec755 Merge: 2a17178 e226fb5 Author: David S. Miller Date: Sat Nov 4 18:07:50 2017 +0900 Merge tag 'wireless-drivers-next-for-davem-2017-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.15 Mostly fixes this time, but also few new features. Major changes: wil6210 * remove ssid debugfs file rsi * add WOWLAN support for suspend, hibernate and shutdown states ath10k * add support for CCMP-256, GCMP and GCMP-256 ciphers on hardware where it's supported (QCA99x0 and QCA4019) ==================== Signed-off-by: David S. Miller commit 2a171788ba7bb61995e98e8163204fc7880f63b2 Merge: bf53458 d4c2e9f Author: David S. Miller Date: Sat Nov 4 09:26:51 2017 +0900 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Files removed in 'net-next' had their license header updated in 'net'. We take the remove from 'net-next'. Signed-off-by: David S. Miller commit bf5345882bd18bc1b4966d170c0491ebe5c9a7d6 Author: Vijaya Mohan Guvva Date: Fri Nov 3 12:17:44 2017 -0700 liquidio: Fix an issue with multiple switchdev enable disables Return success if the same dispatch function is being registered for a given opcode and subcode, there by allow multiple switchdev enable and disables. Signed-off-by: Vijaya Mohan Guvva Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/octeon_device.c | 4 ++++ drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 4 ++-- drivers/net/ethernet/cavium/liquidio/octeon_droq.h | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) commit de4cc8bd68c0aefdbbdbdaad28185f1c0ac18442 Merge: 6ee79b6 44b0fff Author: David S. Miller Date: Sat Nov 4 09:15:18 2017 +0900 Merge branch 'mlxsw-Handle-changes-in-GRE-configuration' Jiri Pirko says: ==================== mlxsw: Handle changes in GRE configuration Petr says: Until now, when an IP tunnel was offloaded by the mlxsw driver, the offload was pretty much static, and changes in Linux configuration were not reflected in the hardware. That led to discrepancies between traffic flows in slow path and fast path. The work-around used to be to remove all routes that forward to the netdevice and re-add them. This is clearly suboptimal, but actually, as of the decap-only patchset, it's not even enough anymore, and one needs to go all the way and simply drop the tunnel and recreate it correctly. With this patchset, the NETDEV_CHANGE events that are generated for changes of up'd tunnel netdevices are captured and interpreted to correctly reconfigure the HW in accordance with changes requested at the software layer. In addition, NETDEV_CHANGEUPPER, NETDEV_UP and NETDEV_DOWN are now handled not only for tunnel devices themselves, but also for their bound devices. Each change is then translated to one or more of the following updates to the HW configuration: - refresh of offload of local route that corresponds to tunnel's local address - refresh of the loopback RIF - refresh of offloads of routes that forward to the changed tunnel - removal of tunnel offloads These tools are used to implement the following configuration changes: - addition of a new offloadable tunnel with local address that conflicts with that of an already-offloaded tunnel (the existing tunnel is onloaded, the new one isn't offloaded) - changes to TTL, TOS that make tunnel unsuitable for offloading - changes to ikey, okey, remote - changes to local, which when they cause conflict with another tunnel, lead to onloading of both newly-conflicting tunnels - migration of a bound device of an offloaded tunnel device to a different VRF - changes to what device is bound to a tunnel device (i.e. like what "ip tunnel change name g dev another" does) - changes to up / down state of a bound device. A down bound device doesn't forward encapsulated traffic anymore, but decap still works. This patchset starts with a suite of patches that adapt the existing code base step by step to facilitate introduction of the offloading code. The five substantial patches at the end then implement the changes mentioned above. ==================== Signed-off-by: David S. Miller commit 44b0fff1d8a461a5cd66cfc3a15ff05959d77df5 Author: Petr Machata Date: Fri Nov 3 10:03:44 2017 +0100 mlxsw: spectrum_router: Handle down of tunnel underlay When the bound device of a tunnel device is down, encapsulated packets are not egressed anymore, but tunnel decap still works. Extend mlxsw_sp_nexthop_rif_update() to take IFF_UP into consideration when deciding whether a given next hop should be offloaded. Because the new logic was added to mlxsw_sp_nexthop_rif_update(), this fixes the case where a newly-added tunnel has a down bound device, which would previously be fully offloaded. Now the down state of the bound device is noted and next hops forwarding to such tunnel are not offloaded. In addition to that, notice NETDEV_UP and NETDEV_DOWN of a bound device to force refresh of tunnel encap route offloads. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 57 +++++++++++++++++++++- 1 file changed, 55 insertions(+), 2 deletions(-) commit 89c2b7dabaafee2220e516d314c9b7757fc8176e Author: Petr Machata Date: Fri Nov 3 10:03:43 2017 +0100 mlxsw: spectrum_ipip: Handle underlay device change When a bound device of an IP-in-IP tunnel changes, such as through 'ip tunnel change name $name dev $dev', the loopback backing the tunnel needs to be recreated. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4cf04f3ff4da9dd536d9f70127868908a03aaf0a Author: Petr Machata Date: Fri Nov 3 10:03:42 2017 +0100 mlxsw: spectrum: Handle NETDEV_CHANGE on L3 tunnels Changes to L3 tunnel netdevices (through `ip tunnel change' as well as `ip link set') lead to NETDEV_CHANGE being generated on the tunnel device. Because what is relevant for the tunnel in question depends on the tunnel type, handling of the event is dispatched to the IPIP module through a newly-added interface mlxsw_sp_ipip_ops.ol_netdev_change(). IPIP tunnels now remember the last set of tunnel parameters in struct mlxsw_sp_ipip_entry.parms, and use it to figure out what exactly has changed. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_ipip.c | 67 ++++++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_ipip.h | 5 ++ .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 42 +++++++++++--- .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 7 +++ 4 files changed, 114 insertions(+), 7 deletions(-) commit 61481f2fcea9112944330b34767192d7f1696fca Author: Petr Machata Date: Fri Nov 3 10:03:41 2017 +0100 mlxsw: spectrum: Support IPIP underlay VRF migration When a bound device of a tunnel netdevice changes VRF, the loopback RIF that backs the tunnel needs to be updated and existing encapsulating routes need to be refreshed. Note that several tunnels can share the same bound device, in which case all the impacted tunnels need to be updated. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 3 + drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 7 ++ .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 100 +++++++++++++++++++++ 3 files changed, 110 insertions(+) commit af641713e97da4126439c3fb1dee031f7e497654 Author: Petr Machata Date: Fri Nov 3 10:03:40 2017 +0100 mlxsw: spectrum_router: Onload conflicting tunnels The approach for offloading IP tunnels implemented currently by mlxsw doesn't allow two tunnels that have the same local IP address in the same (underlay) VRF. Previously, offloads were introduced on demand as encap routes were formed. When such a route was created that would cause offload of a conflicting tunnel, mlxsw_sp_ipip_entry_create() would detect it and return -EEXIST, which would propagate up and cause FIB abort. Now however IPIP entries are created as soon as an offloadable netdevice is created, and the failure prevents creation of such device. Furthermore, if the driver is installed at the point where such conflicting tunnels exist, the failure actually prevents successful modprobe. Furthermore, follow-up patches implement handling of NETDEV_CHANGE due to the local address change. However, NETDEV_CHANGE can't be vetoed. The failure merely means that the offloads weren't updated, but the change in Linux configuration is not rolled back. It is thus desirable to have a robust way of handling these conflicts, which can later be reused for handling NETDEV_CHANGE as well. To fix this, when a conflicting tunnel is created, instead of failing, simply pull the old tunnel to slow path and reject offloading the new one. Introduce two functions: mlxsw_sp_ipip_entry_demote_tunnel() and mlxsw_sp_ipip_demote_tunnel_by_saddr() to handle this. Make them both public, because they will be useful later on in this patchset. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 73 +++++++++++++++------- .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 8 +++ 2 files changed, 60 insertions(+), 21 deletions(-) commit 4526cc8aed2b4bf481709911fc1fee9f040ccda1 Author: Petr Machata Date: Fri Nov 3 10:03:39 2017 +0100 mlxsw: spectrum_router: Fix saddr deduction in mlxsw_sp_ipip_entry_create() When trying to determine whether there are other offloaded tunnels with the same local address, mlxsw_sp_ipip_entry_create() should look for a tunnel with matching UL protocol, matching saddr, in the same VRF. However instead of taking into account the UL protocol of the tunnel netdevice (which mlxsw_sp_ipip_entry_saddr_matches() then compares to the UL protocol of inspected IPIP entry), it deduces the UL protocol from the inspected IPIP entry (and that's compared to itself). This is currently immaterial, because only one tunnel type is offloaded, and therefore the UL protocol always matches, but introducing support for a tunnel with IPv6 underlay would uncover this error. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0c5f1cd5ba8c03567c67910816a7a0fb9fee5746 Author: Petr Machata Date: Fri Nov 3 10:03:38 2017 +0100 mlxsw: spectrum_router: Generalize __mlxsw_sp_ipip_entry_update_tunnel() The work that needs to be done to update HW configuration in response to changes is similar to what __mlxsw_sp_ipip_entry_update_tunnel() already does, but with a number of twists: each change requires a different subset of things to happen. Extend the function to support all these uses, and allow finely-grained configuration of what should happen at each call through a suite of function arguments. Publish the updated function to allow use from the spectrum_ipip module. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 47 ++++++++++++++++++++-- .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 7 ++++ 2 files changed, 50 insertions(+), 4 deletions(-) commit 65a6121b30a65bb4b61322c895bf835fedd6e315 Author: Petr Machata Date: Fri Nov 3 10:03:37 2017 +0100 mlxsw: spectrum_router: Extract __mlxsw_sp_ipip_entry_update_tunnel() The work that's done by mlxsw_sp_netdevice_ipip_ol_vrf_event() is a good basis for a more versatile function that would take care of all sorts of tunnel updates requests: __mlxsw_sp_ipip_entry_update_tunnel(). Extract that function. Factor out a helper mlxsw_sp_ipip_entry_ol_lb_update() as well. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 74 ++++++++++++++-------- 1 file changed, 46 insertions(+), 28 deletions(-) commit 7e75af6366b90bbd0cfb62c9c5aeb5e3ec37bcd4 Author: Petr Machata Date: Fri Nov 3 10:03:36 2017 +0100 mlxsw: spectrum: Propagate extack for tunnel events The function mlxsw_sp_rif_create() takes an extack parameter. So far, for creation of loopback interfaces, NULL was passed. For some events however the extack can be extracted and passed along. So do that for NETDEV_CHANGEUPPER handler. Use the opportunity to update the type of info argument that mlxsw_sp_netdevice_ipip_ol_event() takes. Follow-up patches will introduce handling of more changes, and some of them carry an extack as well, but in an info structure of a different type. Though not strictly erroneous (the pointer could be cast whichever way), it makes no sense to pretend the value is always of a certain type, when in fact it isn't. So change the prototype of the above-mentioned function as well. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 9 +++---- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 31 +++++++++++++--------- 2 files changed, 23 insertions(+), 17 deletions(-) commit 47518ca5d293dd62ca428581941ee51271a4e468 Author: Petr Machata Date: Fri Nov 3 10:03:35 2017 +0100 mlxsw: spectrum_router: Extract mlxsw_sp_ipip_entry_ol_up_event() The piece of logic to promote decap route, if any, is useful for generic tunnel updates, not just for handling of NETDEV_UP events on tunnel interfaces. Extract it to a separate function. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 23 +++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 6d4de44550a8a434b89666088a8f98850e6348c2 Author: Petr Machata Date: Fri Nov 3 10:03:34 2017 +0100 mlxsw: spectrum_router: Make mlxsw_sp_netdevice_ipip_ol_up_event() void This function only ever returns 0, so don't pretend it returns anything useful and just make it void. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a3fe198ecda678e7360c9a08942f0a0e43b6bb2c Author: Petr Machata Date: Fri Nov 3 10:03:33 2017 +0100 mlxsw: spectrum_router: Extract mlxsw_sp_ipip_entry_ol_down_event() Signed-off-by: Petr Machata Reviewed-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, 10 insertions(+), 2 deletions(-) commit 9fb7bd77d11ab03b4a969279de9f54d8fd6fe988 Author: Petr Machata Date: Fri Nov 3 10:03:32 2017 +0100 mlxsw: spectrum_ipip: Split accessor functions To implement NETDEV_CHANGE notifications on IP-in-IP tunnels, the handler needs to figure out what actually changed, to understand how exactly to update the offloads. It will do so by storing struct ip_tunnel_parm with previous configuration, and comparing that to the new version. To facilitate these comparisons, extract the code that operates on struct ip_tunnel_parm from the existing accessor functions, and make those a thin wrapper that extracts tunnel parameters and dispatches. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_ipip.c | 100 ++++++++++++++------- .../net/ethernet/mellanox/mlxsw/spectrum_ipip.h | 3 + 2 files changed, 70 insertions(+), 33 deletions(-) commit 474f0ff618ae4305637e972746b42fabe2245b99 Author: Petr Machata Date: Fri Nov 3 10:03:31 2017 +0100 mlxsw: spectrum: Move mlxsw_sp_ipip_netdev_{s, d}addr{, 4}() These functions ideologically belong to the IPIP module, and some follow-up work will benefit from their presence there. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_ipip.c | 53 ++++++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_ipip.h | 4 ++ .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 53 ---------------------- .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 7 --- 4 files changed, 57 insertions(+), 60 deletions(-) commit cafdb2a0d4216c694971a06edf26029a08026ba4 Author: Petr Machata Date: Fri Nov 3 10:03:30 2017 +0100 mlxsw: spectrum_router: Extract mlxsw_sp_netdevice_ipip_can_offload() Some of the code down the road needs this logic as well. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 796ec7769d452fd75a3afca3d768f25c120b6c50 Author: Petr Machata Date: Fri Nov 3 10:03:29 2017 +0100 mlxsw: spectrum: Rename IPIP-related netdevice handlers To distinguish between events related to tunnel device itself and its bound device, rename a number of functions related to handling tunneling netdevice events to include _ol_ (for "overlay") in the name. That leaves room in the namespace for underlay-related functions, which would have _ul_ in the name. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 5 ++- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 12 +++--- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 45 +++++++++++----------- 3 files changed, 32 insertions(+), 30 deletions(-) commit 9d64fc08f6fe59a7d71e84f650dd2c0f080254dd Author: Mario Limonciello Date: Wed Nov 1 14:25:37 2017 -0500 tools/wmi: add a sample for dell smbios communication over WMI This application uses the character device /dev/wmi/dell-smbios to perform SMBIOS communications from userspace. It offers demonstrations of a few simple tasks: - Running a class/select command - Querying a token value - Activating a token Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Signed-off-by: Darren Hart (VMware) MAINTAINERS | 1 + tools/Makefile | 14 +-- tools/wmi/Makefile | 18 ++++ tools/wmi/dell-smbios-example.c | 210 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 237 insertions(+), 6 deletions(-) commit f2645fa317b8905b8934f06a0601d5b7fa66aba0 Author: Mario Limonciello Date: Wed Nov 1 14:25:36 2017 -0500 platform/x86: dell-smbios-wmi: introduce userspace interface It's important for the driver to provide a R/W ioctl to ensure that two competing userspace processes don't race to provide or read each others data. This userspace character device will be used to perform SMBIOS calls from any applications. It provides an ioctl that will allow passing the WMI calling interface buffer between userspace and kernel space. This character device is intended to deprecate the dcdbas kernel module and the interface that it provides to userspace. To perform an SMBIOS IOCTL call using the character device userspace will perform a read() on the the character device. The WMI bus will provide a u64 variable containing the necessary size of the IOCTL buffer. The API for interacting with this interface is defined in documentation as well as the WMI uapi header provides the format of the structures. Not all userspace requests will be accepted. The dell-smbios filtering functionality will be used to prevent access to certain tokens and calls. All whitelisted commands and tokens are now shared out to userspace so applications don't need to define them in their own headers. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Signed-off-by: Darren Hart (VMware) Documentation/ABI/testing/dell-smbios-wmi | 41 +++++++++++++++++++++++ drivers/platform/x86/dell-smbios-wmi.c | 54 ++++++++++++++++++++++++------- drivers/platform/x86/dell-smbios.h | 32 ++---------------- include/uapi/linux/wmi.h | 47 +++++++++++++++++++++++++++ 4 files changed, 133 insertions(+), 41 deletions(-) commit 44b6b7661132b1b0e5fd3147ded66f1e4a817ca9 Author: Mario Limonciello Date: Wed Nov 1 14:25:35 2017 -0500 platform/x86: wmi: create userspace interface for drivers For WMI operations that are only Set or Query readable and writable sysfs attributes created by WMI vendor drivers or the bus driver makes sense. For other WMI operations that are run on Method, there needs to be a way to guarantee to userspace that the results from the method call belong to the data request to the method call. Sysfs attributes don't work well in this scenario because two userspace processes may be competing at reading/writing an attribute and step on each other's data. When a WMI vendor driver declares a callback method in the wmi_driver the WMI bus driver will create a character device that maps to that function. This callback method will be responsible for filtering invalid requests and performing the actual call. That character device will correspond to this path: /dev/wmi/$driver Performing read() on this character device will provide the size of the buffer that the character device needs to perform calls. This buffer size can be set by vendor drivers through a new symbol or when MOF parsing is available by the MOF. Performing ioctl() on this character device will be interpretd by the WMI bus driver. It will perform sanity tests for size of data, test them for a valid instance, copy the data from userspace and pass iton to the vendor driver to further process and run. This creates an implicit policy that each driver will only be allowed a single character device. If a module matches multiple GUID's, the wmi_devices will need to be all handled by the same wmi_driver. The WMI vendor drivers will be responsible for managing inappropriate access to this character device and proper locking on data used by it. When a WMI vendor driver is unloaded the WMI bus driver will clean up the character device and any memory allocated for the call. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Signed-off-by: Darren Hart (VMware) MAINTAINERS | 1 + drivers/platform/x86/wmi.c | 189 ++++++++++++++++++++++++++++++++++++++++++++- include/linux/wmi.h | 5 ++ include/uapi/linux/wmi.h | 26 +++++++ 4 files changed, 219 insertions(+), 2 deletions(-) commit 1f8543a5d602b816b9b64a62cafd6caae2af4ca6 Author: Mario Limonciello Date: Wed Nov 1 14:25:34 2017 -0500 platform/x86: dell-smbios: Add filtering support When a userspace interface is introduced to dell-smbios filtering support will be used to make sure that userspace doesn't make calls deemed unsafe or that can cause the kernel drivers to get out of sync. A blacklist is provided for the following: - Items that are in use by other kernel drivers - Items that are deemed unsafe (diagnostics, write-once, etc) - Any items in the blacklist will be rejected. Following that a whitelist is provided as follows: - Each item has an associated capability. If a userspace interface accesses this item, that capability will be tested to filter the request. - If the process provides CAP_SYS_RAWIO the whitelist will be overridden. When an item is not in the blacklist, or whitelist and the process is run with insufficient capabilities the call will be rejected. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-smbios.c | 192 +++++++++++++++++++++++++++++++++++++ drivers/platform/x86/dell-smbios.h | 11 +++ 2 files changed, 203 insertions(+) commit da1f607ed6e6a904463396bb6a28bf96584c61cc Author: Mario Limonciello Date: Wed Nov 1 14:25:33 2017 -0500 platform/x86: dell-smbios-smm: test for WSMT WSMT is as an attestation to the OS that the platform won't modify memory outside of pre-defined areas. If a platform has WSMT enabled in BIOS setup, SMM calls through dcdbas will fail. The only way to access platform data in these instances is through the WMI SMBIOS calling interface. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-smbios-smm.c | 33 +++++++++++++++++++++++++++++++++ drivers/platform/x86/dell-smbios.h | 2 ++ 2 files changed, 35 insertions(+) commit 1a258e670434f404a4500b65ba1afea2c2b29bba Author: Mario Limonciello Date: Wed Nov 1 14:25:32 2017 -0500 platform/x86: dell-smbios-wmi: Add new WMI dispatcher driver The dell-smbios stack only currently uses an SMI interface which grants direct access to physical memory to the firmware SMM methods via a pointer. This dispatcher driver adds a WMI-ACPI interface that is detected by WMI probe and preferred over the SMI interface in dell-smbios. Changing this to operate over WMI-ACPI will use an ACPI OperationRegion for a buffer of data storage when SMM calls are performed. This is a safer approach to use in kernel drivers as the SMM will only have access to that OperationRegion. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Signed-off-by: Darren Hart (VMware) MAINTAINERS | 6 + drivers/platform/x86/Kconfig | 14 ++ drivers/platform/x86/Makefile | 1 + drivers/platform/x86/dell-smbios-wmi.c | 236 +++++++++++++++++++++++++++++++++ 4 files changed, 257 insertions(+) commit 549b4930f057658dc50d8010e66219233119a4d8 Author: Mario Limonciello Date: Wed Nov 1 14:25:31 2017 -0500 platform/x86: dell-smbios: Introduce dispatcher for SMM calls This splits up the dell-smbios driver into two drivers: * dell-smbios * dell-smbios-smm dell-smbios can operate with multiple different dispatcher drivers to perform SMBIOS operations. Also modify the interface that dell-laptop and dell-wmi use align to this model more closely. Rather than a single global buffer being allocated for all drivers, each driver will allocate and be responsible for it's own buffer. The pointer will be passed to the calling function and each dispatcher driver will then internally copy it to the proper location to perform it's call. Add defines for calls used by these methods in the dell-smbios.h header for tracking purposes. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Signed-off-by: Darren Hart (VMware) MAINTAINERS | 6 + drivers/platform/x86/Kconfig | 15 +- drivers/platform/x86/Makefile | 1 + drivers/platform/x86/dell-laptop.c | 283 ++++++++++++--------------------- drivers/platform/x86/dell-smbios-smm.c | 163 +++++++++++++++++++ drivers/platform/x86/dell-smbios.c | 121 +++++++------- drivers/platform/x86/dell-smbios.h | 46 +++++- drivers/platform/x86/dell-wmi.c | 11 +- 8 files changed, 398 insertions(+), 248 deletions(-) commit 33b9ca1e53b45f7cacdba9d4fba5cb1387b26827 Author: Mario Limonciello Date: Wed Nov 1 14:25:30 2017 -0500 platform/x86: dell-smbios: Add a sysfs interface for SMBIOS tokens Currently userspace tools can access system tokens via the dcdbas kernel module and a SMI call that will cause the platform to execute SMM code. With a goal in mind of deprecating the dcdbas kernel module a different method for accessing these tokens from userspace needs to be created. This is intentionally marked to only be readable as a process with CAP_SYS_ADMIN as it can contain sensitive information about the platform's configuration. While adding this interface I found that some tokens are duplicated. These need to be ignored from sysfs to avoid duplicate files. MAINTAINERS was missing for this driver. Add myself and Pali to maintainers list for it. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Signed-off-by: Darren Hart (VMware) .../ABI/testing/sysfs-platform-dell-smbios | 21 ++ MAINTAINERS | 7 + drivers/platform/x86/dell-smbios.c | 213 ++++++++++++++++++++- 3 files changed, 240 insertions(+), 1 deletion(-) commit 980f481d63f57bb62ac171a66294de3e14d52b77 Author: Mario Limonciello Date: Wed Nov 1 14:25:29 2017 -0500 platform/x86: dell-smbios: only run if proper oem string is detected The proper way to indicate that a system is a 'supported' Dell System is by the presence of this string in OEM strings. Allowing the driver to load on non-Dell systems will have undefined results. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-smbios.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f97e058cfe8032504e310bd5c20e35d640ef2858 Author: Mario Limonciello Date: Wed Nov 1 14:25:28 2017 -0500 platform/x86: wmi: Don't allow drivers to get each other's GUIDs The only driver using this was dell-wmi, and it really was a hack. The driver was getting a data attribute from another driver and this type of action should not be encouraged. Rather drivers that need to interact with one another should pass data back and forth via exported functions. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Reviewed-by: Pali Rohár Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 17 ----------------- include/linux/wmi.h | 4 ---- 2 files changed, 21 deletions(-) commit 92b8c540bce7b1662212dff35f503f5b1266725b Author: Mario Limonciello Date: Wed Nov 1 14:25:27 2017 -0500 platform/x86: dell-wmi-descriptor: split WMI descriptor into it's own driver All communication on individual GUIDs should occur in separate drivers. Allowing a driver to communicate with the bus to another GUID is just a hack that discourages drivers to adopt the bus model. The information found from the WMI descriptor driver is now exported for use by other drivers. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Signed-off-by: Darren Hart (VMware) MAINTAINERS | 5 + drivers/platform/x86/Kconfig | 5 + drivers/platform/x86/Makefile | 1 + drivers/platform/x86/dell-wmi-descriptor.c | 170 +++++++++++++++++++++++++++++ drivers/platform/x86/dell-wmi-descriptor.h | 21 ++++ drivers/platform/x86/dell-wmi.c | 80 +------------- 6 files changed, 208 insertions(+), 74 deletions(-) commit fa9f924c7ff95f9299e11657c4441288d7f01dbd Author: Mario Limonciello Date: Wed Nov 1 14:25:26 2017 -0500 platform/x86: dell-wmi: don't check length returned This is intended to be variable and provided by the platform. Some platforms this year will be adopting a 32k WMI buffer, so don't complain when encountering those platforms or any other future changes. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Reviewed-by: Pali Rohár Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-wmi.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 7e6dcbebcbc5d8cd7d9e564d9cfbf523c2fbcb68 Author: Mario Limonciello Date: Wed Nov 1 14:25:25 2017 -0500 platform/x86: dell-wmi: clean up wmi descriptor check Some cases the wrong type was used for errors and checks can be done more cleanly. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Suggested-by: Andy Shevchenko Reviewed-by: Pali Rohár Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-wmi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d0bf42d83e9492ffc80108b0913f596dbbd220c0 Author: Mario Limonciello Date: Wed Nov 1 14:25:24 2017 -0500 platform/x86: dell-wmi: increase severity of some failures There is a lot of error checking in place for the format of the WMI descriptor buffer, but some of the potentially raised issues should be considered critical failures. If the buffer size or header don't match, this is a good indication that the buffer format changed in a way that the rest of the data should not be relied upon. For the remaining data set vectors, continue to notate a warning in undefined results, but as those are fields that the descriptor intended to refer to other applications, don't fail if they're new values. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Reviewed-by: Pali Rohár Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-wmi.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 722c856d46c6ca74a246b54a72f14751fec01aae Author: Mario Limonciello Date: Wed Nov 1 14:25:23 2017 -0500 platform/x86: wmi: Add new method wmidev_evaluate_method Drivers properly using the wmibus can pass their wmi_device pointer rather than the GUID back to the WMI bus to evaluate the proper methods. Any "new" drivers added that use the WMI bus should use this rather than the old wmi_evaluate_method that would take the GUID. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Reviewed-by: Pali Rohár Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 28 ++++++++++++++++++++++++---- include/linux/wmi.h | 6 ++++++ 2 files changed, 30 insertions(+), 4 deletions(-) commit f35a8efe2c34496eaf45f8a9bd5bb7625d34bb5c Author: Mario Limonciello Date: Wed Nov 1 14:25:22 2017 -0500 platform/x86: dell-smbios: Prefix class/select with cmd_ Later on these structures will be brought up to userspace. the word "class" is a reserved word in c++ and this will prevent uapi headers from being included directly in c++ programs. To make life easier on these applications, prepare the change now. Signed-off-by: Mario Limonciello Reviewed-by: Edward O'Callaghan Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-smbios.c | 4 ++-- drivers/platform/x86/dell-smbios.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit b53b8300bf8ef8acfb604e07d818ead723be6ea3 Author: Arnd Bergmann Date: Thu Nov 2 15:29:13 2017 +0100 pinctrl: armada-37xx: remove unused variable A cleanup left behind a temporary variable that is now unused: drivers/pinctrl/mvebu/pinctrl-armada-37xx.c: In function 'armada_37xx_irq_startup': drivers/pinctrl/mvebu/pinctrl-armada-37xx.c:693:20: error: unused variable 'chip' [-Werror=unused-variable] This removes the declarations as well. Fixes: 3ee9e605caea ("pinctrl: armada-37xx: Stop using struct gpio_chip.irq_base") Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 2 -- 1 file changed, 2 deletions(-) commit ec4001c3f29ebb3d4147aaec7be9c687ddadb7c8 Author: Paul Durrant Date: Fri Nov 3 17:04:11 2017 +0000 xen: support priv-mapping in an HVM tools domain If the domain has XENFEAT_auto_translated_physmap then use of the PV- specific HYPERVISOR_mmu_update hypercall is clearly incorrect. This patch adds checks in xen_remap_domain_gfn_array() and xen_unmap_domain_gfn_array() which call through to the approprate xlate_mmu function if the feature is present. A check is also added to xen_remap_domain_gfn_range() to fail with -EOPNOTSUPP since this should not be used in an HVM tools domain. Signed-off-by: Paul Durrant Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky arch/x86/xen/mmu.c | 14 ++++++++++++-- include/xen/xen-ops.h | 24 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) commit e8419c40a5ad58eaa112173f554148accc6794f3 Author: Mark Brown Date: Fri Nov 3 19:53:56 2017 +0000 regmap: Clean up hwspinlock on regmap exit We should free any hwspinlocks when we destroy the regmap, do so. Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 2 ++ 1 file changed, 2 insertions(+) commit 267f3e4f18f1ccf9e8cf72c3b4689df03025516d Author: Mark Brown Date: Fri Nov 3 19:50:20 2017 +0000 regmap: Also protect hwspinlock in error handling path The previous patch to allow the hwspinlock code to be disabled missed handling the free in the error path, do so using the better IS_ENABLED() pattern as suggested by Baolin. While we're at it also check that we have a hardware spinlock before freeing it - the core code reports an error when freeing an invalid lock. Suggested-by: Baolin Wang Signed-off-by: Mark Brown drivers/base/regmap/regmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4e974c120039e35b90d2cb0459452bd9a6a71594 Author: Kees Cook Date: Fri Nov 3 12:21:48 2017 -0700 Input: convert autorepeat timer to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Dmitry Torokhov drivers/input/input.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 5aeaa3e668de0782d1502f3d5751e2266a251d7c Author: Sean Young Date: Fri Nov 3 12:19:28 2017 -0700 media: ttpci: remove autorepeat handling and use timer_setup Leave the autorepeat handling up to the input layer, and move to the new timer API. Compile tested only. Signed-off-by: Sean Young Acked-by: Mauro Carvalho Chehab Signed-off-by: Dmitry Torokhov drivers/media/pci/ttpci/av7110.h | 2 +- drivers/media/pci/ttpci/av7110_ir.c | 56 +++++++++++++------------------------ 2 files changed, 21 insertions(+), 37 deletions(-) commit a2c714e8cb538406d61e321c627b55ed5362991e Author: Vince Kim Date: Tue Oct 31 11:33:40 2017 -0700 Input: cyttsp4 - avoid overflows when calculating memory sizes There are several places to perform subtraction to calculate buffer size such as: si->si_ofs.cydata_size = si->si_ofs.test_ofs - si->si_ofs.cydata_ofs; ... p = krealloc(si->si_ptrs.cydata, si->si_ofs.cydata_size, GFP_KERNEL); Actually, data types of above variables during subtraction are size_t, so it is unsigned. That means if second operand(si->si_ofs.cydata_ofs) is greater than the first operand(si->si_ofs.test_ofs), then resulting si->si_ofs.cydata_size could result in an unsigned integer wrap which is not desirable. The proper way to correct this problem is to perform a test of both operands to avoid having unsigned wrap. Signed-off-by: Vince Kim Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/cyttsp4_core.c | 52 ++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 12 deletions(-) commit 37c5f2c99adf63adf13f1ca309a1ffce25c5589a Author: Akshu Agrawal Date: Mon Sep 18 12:26:07 2017 +0530 drm/amd/amdgpu: Enabling ACP clock in hw_init (v2) Enabling of ACP in hw_init does away with requirement of order of probe on designware_i2s and acp dma driver. designware_i2s reads i2s registers and this use to fail if acp dma driver was not probed prior to it. BUG=:b:62103837 TEST=modprobe snd-soc-acp-pcm modprobe snd-soc-acp-rt5645-mach aplay -l **** List of PLAYBACK Hardware Devices **** card 0: acprt5650 [acprt5650], device 0: RT5645_AIF1 rt5645-aif1-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 v2: use proper device in dev_err to fix warnings (Alex) Signed-off-by: Akshu Agrawal Reviewed-on: https://chromium-review.googlesource.com/670207 Reviewed-by: Jason Clinton Reviewed-on: https://chromium-review.googlesource.com/676628 Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 159 +++++++++++++++++++++++++------- 1 file changed, 124 insertions(+), 35 deletions(-) commit 36a5fdf76d3281345e000e115f33817570a76420 Merge: bf6eb60 cdc1cdc Author: Dave Airlie Date: Sat Nov 4 05:43:44 2017 +1000 Merge tag 'drm-intel-next-2017-10-23' of git://anongit.freedesktop.org/drm/drm-intel into drm-next This time really the last i915 batch for v4.15: - PSR state tracking in crtc state (Ville) - Fix eviction when the GGTT is idle but full (Chris) - BDW DP aux channel timeout fix (James) - LSPCON detection fixes (Shashank) - Use for_each_pipe to iterate over pipes (Mika Kahola) - Replace *_reference/unreference() or *_ref/unref with _get/put() (Harsha) - Refactoring and preparation for DDI encoder type cleanup (Ville) - Broadwell DDI FDI buf translation fix (Chris) - Read CSB and CSB write pointer from HWSP in GVT-g VM if available (Weinan) - GuC/HuC firmware loader refactoring (Michal) - Make shrinking more effective and not stall so much (Chris) - Cannonlake PLL fixes (Rodrigo) - DP MST connector error propagation fixes (James) - Convert timers to use timer_setup (Kees Cook) - Skylake plane enable/disable unification (Juha-Pekka) - Fix to actually free driver internal objects when requested (Chris) - DDI buf trans refactoring (Ville) - Skip waking the device to service pwrite (Chris) - Improve DSI VBT backlight parsing abstraction (Madhav) - Cannonlake VBT DDC pin mapping fix (Rodrigo) * tag 'drm-intel-next-2017-10-23' of git://anongit.freedesktop.org/drm/drm-intel: (87 commits) drm/i915: Update DRIVER_DATE to 20171023 drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin. drm/i915: Let's use more enum intel_dpll_id pll_id. drm/i915: Use existing DSI backlight ports info drm/i915: Parse DSI backlight/cabc ports. drm/i915: Skip waking the device to service pwrite drm/i915/crt: split compute_config hook by platforms drm/i915: remove g4x lowfreq_avail and has_pipe_cxsr drm/i915: Drop the redundant hdmi prefix/suffix from a lot of variables drm/i915: Unify error handling for missing DDI buf trans tables drm/i915: Centralize the SKL DDI A/E vs. B/C/D buf trans handling drm/i915: Kill off the BXT buf_trans default_index drm/i915: Pass encoder type to cnl_ddi_vswing_sequence() explicitly drm/i915: Integrate BXT into intel_ddi_dp_voltage_max() drm/i915: Pass the level to intel_prepare_hdmi_ddi_buffers() drm/i915: Pass the encoder type explicitly to skl_set_iboost() drm/i915: Extract intel_ddi_get_buf_trans_hdmi() drm/i915: Relocate intel_ddi_get_buf_trans_*() functions drm/i915: Flush the idle-worker for debugfs/i915_drop_caches drm/i915: adjust get_crtc_fence_y_offset() to use base.y instead of crtc.y ... commit 81b3cc55afc3cde54df98f93fbd4704fab7cc0e0 Author: Sergej Sawazki Date: Fri Nov 3 19:34:28 2017 +0100 ASoC: wm8741: Fix setting BCLK and LRCLK polarity After checking the code and the datasheet, it seems like we are handling the clock inversion (SND_SOC_DAIFMT_NB_IF and SND_SOC_DAIFMT_IB_IF) not correctly. >From the datasheet (Table 58): R5 Format Control, BITS[5:4], [BCP:LRP]: (0) 00 = normal BCLK, normal LRCLK (1) 01 = normal BCLK, inverted LRCLK <-- Fix this (2) 10 = inverted BCLK, normal LRCLK (3) 11 = inverted BCLK, inverted LRCLK <-- Fix this Signed-off-by: Sergej Sawazki Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8741.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21e768b442bb587123ea924620e74d6e5655d717 Author: Bart Van Assche Date: Mon Oct 16 16:32:26 2017 -0700 blk-mq: Make blk_mq_get_request() error path less confusing blk_mq_get_tag() can modify data->ctx. This means that in the error path of blk_mq_get_request() data->ctx should be passed to blk_mq_put_ctx() instead of local_ctx. Note: since blk_mq_put_ctx() ignores its argument, this patch does not change any functionality. References: commit 1ad43c0078b7 ("blk-mq: don't leak preempt counter/q_usage_counter when allocating rq failed") Reviewed-by: Ming Lei Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Bart Van Assche Cc: Ming Lei Signed-off-by: Jens Axboe block/blk-mq.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 39b4954c0a1556f8f7f1fdcf59a227117fcd8a0b Author: Liu Bo Date: Fri Nov 3 11:24:44 2017 -0600 badblocks: fix wrong return value in badblocks_set if badblocks are disabled MD's rdev_set_badblocks() expects that badblocks_set() returns 1 if badblocks are disabled, otherwise, rdev_set_badblocks() will record superblock changes and return success in that case and md will fail to report an IO error which it should. This bug has existed since badblocks were introduced in commit 9e0e252a048b ("badblocks: Add core badblock management code"). Signed-off-by: Liu Bo Acked-by: Guoqing Jiang Signed-off-by: Shaohua Li block/badblocks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2e82a234873d905260a3bd0aca9577e85619bda Author: weiping zhang Date: Fri Sep 22 23:36:28 2017 +0800 blk-mq: fix nr_requests wrong value when modify it from sysfs if blk-mq use "none" io scheduler, nr_request get a wrong value when input a number > tag_set->queue_depth. blk_mq_tag_update_depth will get the smaller one min(nr, set->queue_depth), and then q->nr_request get a wrong value. Reproduce: echo none > /sys/block/nvme0n1/queue/scheduler echo 1000000 > /sys/block/nvme0n1/queue/nr_requests cat /sys/block/nvme0n1/queue/nr_requests 1000000 Signed-off-by: weiping zhang Signed-off-by: Jens Axboe block/blk-mq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6ae6678344af52cf1c05475ff3ec2f43b8b532ef Author: Colin Ian King Date: Fri Nov 3 13:58:29 2017 +0000 spi: sh-msiof: remove redundant pointer dev The pointer dev is assigned but never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/spi/spi-sh-msiof.c:1198:2: warning: Value stored to 'dev' is never read Signed-off-by: Colin Ian King Signed-off-by: Mark Brown drivers/spi/spi-sh-msiof.c | 2 -- 1 file changed, 2 deletions(-) commit 4132b8b9107badf75bf30c8b4b3ac2cebd03389d Author: Colin Ian King Date: Fri Nov 3 13:35:25 2017 +0000 spi: s3c64xx: remove redundant pointer sci The pointer sci is assigned but never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/spi/spi-s3c64xx.c:791:2: warning: Value stored to 'sci' is never read Signed-off-by: Colin Ian King Signed-off-by: Mark Brown drivers/spi/spi-s3c64xx.c | 3 --- 1 file changed, 3 deletions(-) commit e073db5c5d7ad311efa8f4192a2047b006bbc5f3 Author: Boris BREZILLON Date: Wed Nov 1 10:57:31 2017 +0100 drm/vc4: Fix wrong printk format in vc4_bo_stats_debugfs() vc4->purgeable.size and vc4->purgeable.purged_size are size_t fields and should be printed with a %zd specifier. Fixes: b9f19259b84d ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl") Signed-off-by: Boris Brezillon Reviewed-by: Gustavo Padovan Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20171101095731.14878-1-boris.brezillon@free-electrons.com (cherry picked from commit 50f365cde4ffb5ae70c3f02384bbb46698aba65c) Signed-off-by: Eric Anholt drivers/gpu/drm/vc4/vc4_bo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a116895fc7b61de4f26548c9b635a06515ec7563 Author: Jens Axboe Date: Fri Nov 3 11:00:03 2017 -0600 cdrom: hide CONFIG_CDROM menu selection We don't need to expose this. The point is that drivers select the uniform CDROM layer, if they need it, the user should not have to make a conscious decision on whether to include this separately or not. Fixes: 2a750166a5be ("block: Rework drivers/cdrom/Makefile") Signed-off-by: Jens Axboe drivers/block/Kconfig | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 4fa064b26c2eb9e1c38460ba327765dff16a4b14 Author: Lu Baolu Date: Fri Nov 3 10:51:34 2017 -0600 iommu/vt-d: Clear pasid table entry when memory unbound In intel_svm_unbind_mm(), pasid table entry must be cleared during svm free. Otherwise, hardware may be set up with a wild pointer. Suggested-by: Ashok Raj Signed-off-by: Lu Baolu Signed-off-by: Alex Williamson drivers/iommu/intel-svm.c | 2 ++ 1 file changed, 2 insertions(+) commit 973b546451fdf11e518cc96d1b137af893a38db5 Author: Lu Baolu Date: Fri Nov 3 10:51:33 2017 -0600 iommu/vt-d: Clear Page Request Overflow fault bit Currently Page Request Overflow bit in IOMMU Fault Status register is not cleared. Not clearing this bit would mean that any future page-request is going to be automatically dropped by IOMMU. Suggested-by: Ashok Raj Signed-off-by: Lu Baolu Signed-off-by: Alex Williamson drivers/iommu/dmar.c | 3 ++- include/linux/intel-iommu.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 2e2e35d512798193b4165ed884a5d1d9b181e231 Author: Lu Baolu Date: Fri Nov 3 10:51:32 2017 -0600 iommu/vt-d: Missing checks for pasid tables if allocation fails intel_svm_alloc_pasid_tables() might return an error but never be checked by the callers. Later when intel_svm_bind_mm() is called, there are no checks for valid pasid tables before enabling them. Signed-off-by: Ashok Raj Signed-off-by: Lu Baolu Reviewed-by: Liu, Yi L Signed-off-by: Alex Williamson drivers/iommu/intel-svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b92b4fb5c14257c0e7eae291ecc1f7b1962e1699 Author: Gary R Hook Date: Fri Nov 3 10:50:34 2017 -0600 iommu/amd: Limit the IOVA page range to the specified addresses The extent of pages specified when applying a reserved region should include up to the last page of the range, but not the page following the range. Signed-off-by: Gary R Hook Fixes: 8d54d6c8b8f3 ('iommu/amd: Implement apply_dm_region call-back') Signed-off-by: Alex Williamson drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 049541e178d5b1d003584aa0ad2a96101f0694d2 Author: Rob Clark Date: Fri Nov 3 10:50:33 2017 -0600 iommu: qcom: wire up fault handler This is quite useful for debugging. Currently, always TERMINATE the translation when the fault handler returns (since this is all we need for debugging drivers). But I expect the SVM work should eventually let us do something more clever. Signed-off-by: Rob Clark Signed-off-by: Alex Williamson drivers/iommu/qcom_iommu.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 2c40367cbff6f9ed1efda238685837fb5f0d9e3c Author: Colin Ian King Date: Fri Nov 3 10:50:32 2017 -0600 iommu/amd: remove unused variable flush_addr Variable flush_addr is being assigned but is never read; it is redundant and can be removed. Cleans up the clang warning: drivers/iommu/amd_iommu.c:2388:2: warning: Value stored to 'flush_addr' is never read Signed-off-by: Colin Ian King Signed-off-by: Alex Williamson drivers/iommu/amd_iommu.c | 2 -- 1 file changed, 2 deletions(-) commit 07d1c91b6c649705fdd9acf58001071845ecf068 Author: Alex Williamson Date: Fri Nov 3 10:50:31 2017 -0600 iommu/amd: Fix alloc_irq_index() increment On an is_allocated() interrupt index, we ALIGN() the current index and then increment it via the for loop, guaranteeing that it is no longer aligned for alignments >1. We instead need to align the next index, to guarantee forward progress, moving the increment-only to the case where the index was found to be unallocated. Fixes: 37946d95fc1a ('iommu/amd: Add align parameter to alloc_irq_index()') Signed-off-by: Alex Williamson drivers/iommu/amd_iommu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0dca060c2a5a83dc8bd28eb2d8b559bd33238175 Author: Darrick J. Wong Date: Thu Nov 2 12:48:11 2017 -0700 xfs: scrub: avoid uninitialized return code The newly added xfs_scrub_da_btree_block() function has one code path that returns the 'error' variable without initializing it first, as shown by this compiler warning: fs/xfs/scrub/dabtree.c: In function 'xfs_scrub_da_btree_block': fs/xfs/scrub/dabtree.c:462:9: error: 'error' may be used uninitialized in this function [-Werror=maybe-uninitialized] Return zero since the caller will exit the scrub code if we don't produce a buffer pointer. Fixes: 7c4a07a424c1 ("xfs: scrub directory/attribute btrees") Reported-by: Arnd Bergmann Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/scrub/dabtree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 350976ae21873b0d36584ea005076356431b8f79 Author: Eryu Guan Date: Wed Nov 1 21:43:50 2017 -0700 xfs: truncate pagecache before writeback in xfs_setattr_size() On truncate down, if new size is not block size aligned, we zero the rest of block to avoid exposing stale data to user, and iomap_truncate_page() skips zeroing if the range is already in unwritten state or a hole. Then we writeback from on-disk i_size to the new size if this range hasn't been written to disk yet, and truncate page cache beyond new EOF and set in-core i_size. The problem is that we could write data between di_size and newsize before removing the page cache beyond newsize, as the extents may still be in unwritten state right after a buffer write. As such, the page of data that newsize lies in has not been zeroed by page cache invalidation before it is written, and xfs_do_writepage() hasn't triggered it's "zero data beyond EOF" case because we haven't updated in-core i_size yet. Then a subsequent mmap read could see non-zeros past EOF. I occasionally see this in fsx runs in fstests generic/112, a simplified fsx operation sequence is like (assuming 4k block size xfs): fallocate 0x0 0x1000 0x0 keep_size write 0x0 0x1000 0x0 truncate 0x0 0x800 0x1000 punch_hole 0x0 0x800 0x800 mapread 0x0 0x800 0x800 where fallocate allocates unwritten extent but doesn't update i_size, buffer write populates the page cache and extent is still unwritten, truncate skips zeroing page past new EOF and writes the page to disk, punch_hole invalidates the page cache, at last mapread reads the block back and sees non-zero beyond EOF. Fix it by moving truncate_setsize() to before writeback so the page cache invalidation zeros the partial page at the new EOF. This also triggers "zero data beyond EOF" in xfs_do_writepage() at writeback time, because newsize has been set and page straddles the newsize. Also fixed the wrong 'end' param of filemap_write_and_wait_range() call while we're at it, the 'end' is inclusive and should be 'newsize - 1'. Suggested-by: Dave Chinner Signed-off-by: Eryu Guan Acked-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_iops.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit ea435e1b9392a33deceaea2a16ebaa3397bead93 Author: Christoph Hellwig Date: Thu Nov 2 21:29:54 2017 +0300 block: add a poll_fn callback to struct request_queue That we we can also poll non blk-mq queues. Mostly needed for the NVMe multipath code, but could also be useful elsewhere. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-core.c | 11 +++++++++++ block/blk-mq.c | 14 +++++--------- drivers/nvme/target/io-cmd.c | 2 +- fs/block_dev.c | 4 ++-- fs/direct-io.c | 2 +- fs/iomap.c | 2 +- include/linux/blkdev.h | 4 +++- mm/page_io.c | 2 +- 8 files changed, 25 insertions(+), 16 deletions(-) commit 8ddcd653257c18a669fcb75ee42c37054908e0d6 Author: Christoph Hellwig Date: Thu Nov 2 21:29:53 2017 +0300 block: introduce GENHD_FL_HIDDEN With this flag a driver can create a gendisk that can be used for I/O submission inside the kernel, but which is not registered as user facing block device. This will be useful for the NVMe multipath implementation. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/genhd.c | 68 +++++++++++++++++++++++++++++++++++++-------------- include/linux/genhd.h | 1 + 2 files changed, 51 insertions(+), 18 deletions(-) commit 517bf3c306bad4fe0da631f90ae2ec40924dee2b Author: Christoph Hellwig Date: Thu Nov 2 21:29:52 2017 +0300 block: don't look at the struct device dev_t in disk_devt The hidden gendisks introduced in the next patch need to keep the dev field in their struct device empty so that udev won't try to create block device nodes for them. To support that rewrite disk_devt to look at the major and first_minor fields in the gendisk itself instead of looking into the struct device. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/genhd.c | 4 ---- include/linux/genhd.h | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) commit ef71de8b15d891b27b8c983a9a8972b11cb4576a Author: Christoph Hellwig Date: Thu Nov 2 21:29:51 2017 +0300 block: add a blk_steal_bios helper This helpers allows to bounce steal the uncompleted bios from a request so that they can be reissued on another path. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-core.c | 21 +++++++++++++++++++++ include/linux/blkdev.h | 2 ++ 2 files changed, 23 insertions(+) commit f421e1d9ade4e1b88183e54425cf50e390d16a7f Author: Christoph Hellwig Date: Thu Nov 2 21:29:50 2017 +0300 block: provide a direct_make_request helper This helper allows reinserting a bio into a new queue without much overhead, but requires all queue limits to be the same for the upper and lower queues, and it does not provide any recursion preventions. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Javier González Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe block/blk-core.c | 34 ++++++++++++++++++++++++++++++++++ include/linux/blkdev.h | 1 + 2 files changed, 35 insertions(+) commit 96222bcc732d0504363dc772637c50e53b4bd41e Author: Christoph Hellwig Date: Thu Nov 2 21:29:49 2017 +0300 block: add REQ_DRV bit Set aside a bit in the request/bio flags for driver use. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe include/linux/blk_types.h | 5 +++++ 1 file changed, 5 insertions(+) commit 8977f563845bdd61fc61c4dfb399270b7d5667c6 Author: Christoph Hellwig Date: Thu Nov 2 21:29:48 2017 +0300 block: move REQ_NOWAIT This flag should be before the operation-specific REQ_NOUNMAP bit. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe include/linux/blk_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3e2cb3ad47500ed12d4c8b4cbd737dca352e38e4 Merge: 474f5da a806c6c Author: Jens Axboe Date: Fri Nov 3 10:28:51 2017 -0600 Merge branch 'nvme-4.15' of git://git.infradead.org/nvme into for-4.15/block Pull NVMe changes from Christoph: "Below are the currently queue nvme updates for Linux 4.15. There are a few more things that could make it for this merge window, but I'd like to get things into linux-next, especially for the unlikely case that Linus decided to cut -rc8. Highlights: - support for SGLs in the PCIe driver (Chaitanya Kulkarni) - disable I/O schedulers for the admin queue (Israel Rukshin) - various Fibre Channel fixes and enhancements (James Smart) - various refactoring for better code sharing between transports (Sagi Grimberg and me) as well as lots of little bits from various contributors." commit 1c356ec5e932c8d4c83d9782ab3c4164b6471d5d Author: Vasyl Gomonovych Date: Wed Oct 11 21:42:41 2017 +0200 scsi: lpfc: fix kzalloc-simple.cocci warnings drivers/scsi/lpfc/lpfc_debugfs.c:5460:22-29: WARNING: kzalloc should be used for phba -> nvmeio_trc, instead of kmalloc/memset drivers/scsi/lpfc/lpfc_debugfs.c:2230:20-27: WARNING: kzalloc should be used for phba -> nvmeio_trc, instead of kmalloc/memset Use kzalloc rather than kmalloc followed by memset with 0 Generated by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Signed-off-by: Vasyl Gomonovych Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_debugfs.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 62d2f77438873d366807e0db81bd05a8bab566d8 Author: Suganath Prabu Subramani Date: Tue Oct 31 18:02:39 2017 +0530 scsi: mpt3sas: Update mpt3sas driver version. Updated mpt3sas driver version to 17.100.00.00 Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 494f401bcd07d6b39f49f114e4eaa788842f16fe Author: Suganath Prabu Subramani Date: Tue Oct 31 18:02:38 2017 +0530 scsi: mpt3sas: Fix sparse warnings 1) Used variable __le64/__le32 whichever required in building NVME PRP, and passed to LE Controller. 2) Remove unused functions, And Declared functions as static which are used only in mpt3sas_scsih.c. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 22 ++++++++++----------- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 37 +++++------------------------------- 2 files changed, 16 insertions(+), 43 deletions(-) commit cd5897eda27dc155146f25ddf4b0dd9967b3e2bb Author: Suganath Prabu Subramani Date: Tue Oct 31 18:02:37 2017 +0530 scsi: mpt3sas: Fix nvme drives checking for tlr. Check for NVMe drives before enabling or checking tlr. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 45aa6a1a2cca3847caed029e2b788fb4ae41c93c Author: Suganath Prabu Subramani Date: Tue Oct 31 18:02:36 2017 +0530 scsi: mpt3sas: NVMe drive support for BTDHMAPPING ioctl command and log info * Added debug prints for pcie devices in ioctl debug path. Which will be helpful for debugging. * Added PCIe device support for ioctl BTDHMAPPING ioctl. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_ctl.c | 88 +++++++++++++++++++++++++------------- 1 file changed, 58 insertions(+), 30 deletions(-) commit 6ce2f1d16cac243fa00ede738d0f1567df13ad8c Author: Suganath Prabu Subramani Date: Tue Oct 31 18:02:35 2017 +0530 scsi: mpt3sas: Add-Task-management-debug-info-for-NVMe-drives. Added debug information for NVMe/PCIe drives in target rest path Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 80 ++++++++++++++++++++++++++++++++---- 1 file changed, 71 insertions(+), 9 deletions(-) commit ec051e5a4bbaa98994ca7512eac68565406cfe8b Author: Suganath Prabu Subramani Date: Tue Oct 31 18:02:34 2017 +0530 scsi: mpt3sas: scan and add nvme device after controller reset After Controller reset, Scan and add nvme device back to the topology. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 194 ++++++++++++++++++++++++++++++++++- 1 file changed, 190 insertions(+), 4 deletions(-) commit d1b01d14b7baa8a4bb4c11305c8cca73456b2f7c Author: Suganath Prabu Subramani Date: Tue Oct 31 18:02:33 2017 +0530 scsi: mpt3sas: Set NVMe device queue depth as 128 Sets nvme device queue depth, name and displays device capabilities Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.h | 2 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 50 ++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) commit 4318c73478474f974f1922b3d8946d41e2d855d6 Author: Suganath Prabu Subramani Date: Tue Oct 31 18:02:32 2017 +0530 scsi: mpt3sas: Handle NVMe PCIe device related events generated from firmware. * The controller firmware sends separate events for NVMe devices and PCIe switches similar to existing SAS events. * NVMe device detection, addition and removal are reported by the firmware through PCIe Topology Change list events. * The PCIe device state change events are sent when the firmware detects any abnormal conditions with a NVMe device or switch. * The enumeration event are sent when the firmware starts PCIe device enumeration and stops. * This patch has the code change to handle the events and add/remove NVMe devices in driver's inventory. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 30 ++- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 471 ++++++++++++++++++++++++++++++++++- 2 files changed, 495 insertions(+), 6 deletions(-) commit 3075ac49024e7e5ef7c08337609e5ec9760e9275 Author: Suganath Prabu Subramani Date: Tue Oct 31 18:02:31 2017 +0530 scsi: mpt3sas: API's to remove nvme drive from sml The following functions are called in nvme drive remove path: _scsih_pcie_device_remove_by_handle _scsih_pcie_device_remove_from_sml [mkp: clarify commit message] Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 148 ++++++++++++++++++++++++++++++++++- 1 file changed, 145 insertions(+), 3 deletions(-) commit c102e00cf4b8a9aa4a24be5ddbdcb28fc9765920 Author: Suganath Prabu Subramani Date: Tue Oct 31 18:02:30 2017 +0530 scsi: mpt3sas: API 's to support NVMe drive addition to SML Below Functions are added in various paths to support NVMe drive addition. _scsih_pcie_add_device _scsih_pcie_device_add _scsih_pcie_device_init_add _scsih_check_pcie_access_status _scsih_pcie_check_device mpt3sas_get_pdev_by_handle mpt3sas_config_get_pcie_device_pg0 mpt3sas_config_get_pcie_device_pg2 Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.h | 10 + drivers/scsi/mpt3sas/mpt3sas_config.c | 100 ++++++++ drivers/scsi/mpt3sas/mpt3sas_scsih.c | 457 +++++++++++++++++++++++++++++++++- 3 files changed, 565 insertions(+), 2 deletions(-) commit aff39e61218f9a6d5cad1b62bd5a75ae8d4f7890 Author: Suganath Prabu Subramani Date: Tue Oct 31 18:02:29 2017 +0530 scsi: mpt3sas: Added support for nvme encapsulated request message. * Mpt3sas driver uses the NVMe Encapsulated Request message to send an NVMe command to an NVMe device attached to the IOC. * Normal I/O commands like reads and writes are passed to the controller as SCSI commands and the controller has the ability to translate the commands to NVMe equivalent. * This encapsulated NVMe command is used by applications to send direct NVMe commands to NVMe drives. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 276 +++++++++++++++++++++++++++++++++++- drivers/scsi/mpt3sas/mpt3sas_base.h | 4 + drivers/scsi/mpt3sas/mpt3sas_ctl.c | 69 ++++++++- 3 files changed, 342 insertions(+), 7 deletions(-) commit 016d5c35e27824f31c394009dd0f72f2c6b0dc85 Author: Suganath Prabu Subramani Date: Tue Oct 31 18:02:28 2017 +0530 scsi: mpt3sas: SGL to PRP Translation for I/Os to NVMe devices * Added support for translating the SGLs associated with incoming commands either to IEE SGL or NVMe PRPs for NVMe devices. * The hardware translation of IEEE SGL to NVMe PRPs has limitations and if a command cannot be translated by hardware then it will go to firmware and the firmware needs to translate it. This will have a performance impact. To avoid that, the driver proactively checks whether the translation will be done in hardware or not. If not, then driver translates. [mkp: clarified commit message] Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 339 ++++++++++++++++++++++++++++++- drivers/scsi/mpt3sas/mpt3sas_base.h | 41 +++- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 1 + drivers/scsi/mpt3sas/mpt3sas_scsih.c | 14 +- drivers/scsi/mpt3sas/mpt3sas_warpdrive.c | 2 +- 5 files changed, 380 insertions(+), 17 deletions(-) commit d88e1eaba6eee7bfe10480e575b33ab8a3a68e77 Author: Suganath Prabu Subramani Date: Tue Oct 31 18:02:27 2017 +0530 scsi: mpt3sas: Add nvme device support in slave alloc, target alloc and probe 1) Added support for probing pcie device and adding NVMe drives to SML and driver's internal list pcie_device_list. 2) Added support for determing NVMe as boot device. 3) Added nvme device support for call back functions scan_finished target_alloc,slave_alloc,target destroy and slave destroy. a) During scan, pcie devices are probed and added to SML to drivers internal list. b) target_alloc & slave alloc API's allocates resources for (MPT3SAS_TARGET & MPT3SAS_DEVICE) private datas and holds information like handle, target_id etc. c) slave_destroy & target_destroy are called when driver unregisters or removes device. Also frees allocated resources and info. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.h | 110 ++++++++- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 430 ++++++++++++++++++++++++++++++++--- 2 files changed, 506 insertions(+), 34 deletions(-) commit b5c5d0adf75cd4c0fb037ba2ca0ed80ae9ba3d05 Author: Colin Ian King Date: Thu Nov 2 10:18:10 2017 +0000 scsi: megaraid_sas: fix spelling mistake: "thershold" -> "threshold" Trivial fix to spelling mistake in dev_info message Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 773aaadcd474d0a4f85915787118891d47b60983 Author: Colin Ian King Date: Fri Nov 3 09:20:47 2017 +0000 xen/pvcalls: remove redundant check for irq >= 0 This is a moot point, but irq is always less than zero at the label out_error, so the check for irq >= 0 is redundant and can be removed. Detected by CoverityScan, CID#1460371 ("Logically dead code") Fixes: cb1c7d9bbc87 ("xen/pvcalls: implement connect command") Signed-off-by: Colin Ian King Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 95110ac88d5139c73eef6ede37eff23c4089f4f2 Author: Colin Ian King Date: Fri Nov 3 08:42:02 2017 +0000 xen/pvcalls: fix unsigned less than zero error check The check on bedata->ref is never true because ref is an unsigned integer. Fix this by assigning signed int ret to the return of the call to gnttab_claim_grant_reference so the -ve return can be checked. Detected by CoverityScan, CID#1460358 ("Unsigned compared against 0") Fixes: 219681909913 ("xen/pvcalls: connect to the backend") Signed-off-by: Colin Ian King Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit b5494ad83fb52a8e5a7dc1d30cb42cbca5d617f1 Author: Boris Ostrovsky Date: Thu Nov 2 18:18:03 2017 -0400 xen/time: Return -ENODEV from xen_get_wallclock() For any other error sync_cmos_clock() will reschedule itself every second or so, for no good reason. Suggested-by: Paolo Bonzini Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky arch/x86/xen/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d8765d4f52a0050343bfa99a1a2aa5ef7d841e5 Author: Gustavo A. R. Silva Date: Thu Nov 2 13:51:22 2017 -0500 xen/pvcalls-front: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I placed the "fall through" comment on its own line, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5fa916f7ace1d4dd246ac3b5ebbe2800f7e1ac04 Author: Gustavo A. R. Silva Date: Thu Nov 2 13:41:07 2017 -0500 xen: xenbus_probe_frontend: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 146562 Addresses-Coverity-ID: 146563 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky drivers/xen/xenbus/xenbus_probe_frontend.c | 2 ++ 1 file changed, 2 insertions(+) commit 436ad941335386c5fc7faa915a8fbdfe8c908084 Author: Cathy Avery Date: Tue Oct 31 08:52:06 2017 -0400 scsi: storvsc: Allow only one remove lun work item to be issued per lun When running multipath on a VM if all available paths go down the driver can schedule large amounts of storvsc_remove_lun work items to the same lun. In response to the failing paths typically storvsc responds by taking host->scan_mutex and issuing a TUR per lun. If there has been heavy IO to the failed device all the failed IOs are returned from the host. A remove lun work item is issued per failed IO. If the outstanding TURs have not been completed in a timely manner the scan_mutex is never released or released too late. Consequently the many remove lun work items are not completed as scsi_remove_device also tries to take host->scan_mutex. This results in dragging the VM down and sometimes completely. This patch only allows one remove lun to be issued to a particular lun while it is an instantiated member of the scsi stack. Signed-off-by: Cathy Avery Reviewed-by: Christoph Hellwig Reviewed-by: Long Li Signed-off-by: Martin K. Petersen drivers/scsi/storvsc_drv.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 9da779c324db87ca340e0eb1259c949874f17bed Author: Prarit Bhargava Date: Wed Oct 25 09:51:32 2017 -0400 cpupower: Fix no-rounding MHz frequency output 'cpupower frequency-info -ln' returns kHz values on systems with MHz range minimum CPU frequency range. For example, on a 800MHz to 4.20GHz system the command returns hardware limits: 800000 MHz - 4.200000 GHz The code that causes this error can be removed. The next else if clause will handle the output correctly such that hardware limits: 800.000 MHz - 4.200000 GHz is displayed correctly. [v2]: Remove two lines instead of fixing broken code. Signed-off-by: Prarit Bhargava Cc: Thomas Renninger Cc: Stafford Horne Cc: Shuah Khan Reviewed-by: Stafford Horne Signed-off-by: Shuah Khan tools/power/cpupower/utils/cpufreq-info.c | 2 -- 1 file changed, 2 deletions(-) commit ca6958b4da8b7fd9f6ac3bf94def9cfb8a1d6c25 Author: Yisheng Xie Date: Wed Oct 25 17:57:07 2017 +0800 scsi: megaraid: Remove redundant code in megasas_alloc_cmds megasas_alloc_cmds is to alloc cmd_list of instance instead of fusion, and fusion is useless in this function. Just remove it. Signed-off-by: Yisheng Xie Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 2 -- 1 file changed, 2 deletions(-) commit fb8722735f50cd51204bfbeefa2e5e7e9ff5b2be Author: Jason A. Donenfeld Date: Fri Nov 3 15:18:58 2017 +0100 arm64: support __int128 on gcc 5+ Versions of gcc prior to gcc 5 emitted a __multi3 function call when dealing with TI types, resulting in failures when trying to link to libgcc, and more generally, bad performance. However, since gcc 5, the compiler supports actually emitting fast instructions, which means we can at long last enable this option and receive the speedups. The gcc commit that added proper Aarch64 support is: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=d1ae7bb994f49316f6f63e6173f2931e837a351d This commit appears to be part of the gcc 5 release. There are still a few instructions, __ashlti3 and __ashrti3, which require libgcc, which is fine. Rather than linking to libgcc, we simply provide them ourselves, since they're not that complicated. Signed-off-by: Jason A. Donenfeld Signed-off-by: Will Deacon arch/arm64/Makefile | 2 ++ arch/arm64/lib/Makefile | 2 +- arch/arm64/lib/tishift.S | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) commit ce6990813f15f4cabadf325791e35bd4af8152f5 Author: Dave Martin Date: Tue Oct 31 15:51:20 2017 +0000 arm64/sve: Add documentation This patch adds basic documentation of the user/kernel interface provided by the for SVE. Signed-off-by: Dave Martin Reviewed-by: Catalin Marinas Cc: Alan Hayward Cc: Alex Bennée Cc: Mark Rutland Cc: Michael Kerrisk Cc: Szabolcs Nagy Cc: linux-api@vger.kernel.org Signed-off-by: Will Deacon Documentation/arm64/sve.txt | 508 +++++++++++++++++++++++++++++++ arch/arm64/include/uapi/asm/sigcontext.h | 3 + 2 files changed, 511 insertions(+) commit 43994d824e8443263dc98b151e6326bf677be52e Author: Dave Martin Date: Tue Oct 31 15:51:19 2017 +0000 arm64/sve: Detect SVE and activate runtime support This patch enables detection of hardware SVE support via the cpufeatures framework, and reports its presence to the kernel and userspace via the new ARM64_SVE cpucap and HWCAP_SVE hwcap respectively. Userspace can also detect SVE using ID_AA64PFR0_EL1, using the cpufeatures MRS emulation. When running on hardware that supports SVE, this enables runtime kernel support for SVE, and allows user tasks to execute SVE instructions and make of the of the SVE-specific user/kernel interface extensions implemented by this series. Signed-off-by: Dave Martin Reviewed-by: Suzuki K Poulose Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon Documentation/arm64/cpu-feature-registers.txt | 6 +++++- Documentation/arm64/elf_hwcaps.txt | 4 ++++ arch/arm64/include/asm/cpucaps.h | 3 ++- arch/arm64/include/asm/cpufeature.h | 3 ++- arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 17 +++++++++++++++++ arch/arm64/kernel/cpuinfo.c | 1 + arch/arm64/kernel/entry.S | 7 ++++--- 8 files changed, 36 insertions(+), 6 deletions(-) commit 07d79fe7c22364de34618e58b92a8f091bd7e03d Author: Dave Martin Date: Tue Oct 31 15:51:18 2017 +0000 arm64/sve: KVM: Hide SVE from CPU features exposed to guests KVM guests cannot currently use SVE, because SVE is always configured to trap to EL2. However, a guest that sees SVE reported as present in ID_AA64PFR0_EL1 may legitimately expect that SVE works and try to use it. Instead of working, the guest will receive an injected undef exception, which may cause the guest to oops or go into a spin. To avoid misleading the guest into believing that SVE will work, this patch masks out the SVE field from ID_AA64PFR0_EL1 when a guest attempts to read this register. No support is explicitly added for ID_AA64ZFR0_EL1 either, so that is still emulated as reading as zero, which is consistent with SVE not being implemented. This is a temporary measure, and will be removed in a later series when full KVM support for SVE is implemented. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Acked-by: Marc Zyngier Acked-by: Catalin Marinas Acked-by: Christoffer Dall Signed-off-by: Will Deacon arch/arm64/kvm/sys_regs.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit aac45ffd1f8eff7b919df3deaa06d872b665eb09 Author: Dave Martin Date: Tue Oct 31 15:51:17 2017 +0000 arm64/sve: KVM: Treat guest SVE use as undefined instruction execution When trapping forbidden attempts by a guest to use SVE, we want the guest to see a trap consistent with SVE not being implemented. This patch injects an undefined instruction exception into the guest in response to such an exception. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Acked-by: Catalin Marinas Acked-by: Christoffer Dall Signed-off-by: Will Deacon arch/arm64/kvm/handle_exit.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 17eed27b02da88560b4592390952b9a71042ab8b Author: Dave Martin Date: Tue Oct 31 15:51:16 2017 +0000 arm64/sve: KVM: Prevent guests from using SVE Until KVM has full SVE support, guests must not be allowed to execute SVE instructions. This patch enables the necessary traps, and also ensures that the traps are disabled again on exit from the guest so that the host can still use SVE if it wants to. On guest exit, high bits of the SVE Zn registers may have been clobbered as a side-effect the execution of FPSIMD instructions in the guest. The existing KVM host FPSIMD restore code is not sufficient to restore these bits, so this patch explicitly marks the CPU as not containing cached vector state for any task, thus forcing a reload on the next return to userspace. This is an interim measure, in advance of adding full SVE awareness to KVM. This marking of cached vector state in the CPU as invalid is done using __this_cpu_write(fpsimd_last_state, NULL) in fpsimd.c. Due to the repeated use of this rather obscure operation, it makes sense to factor it out as a separate helper with a clearer name. This patch factors it out as fpsimd_flush_cpu_state(), and ports all callers to use it. As a side effect of this refactoring, a this_cpu_write() in fpsimd_cpu_pm_notifier() is changed to __this_cpu_write(). This should be fine, since cpu_pm_enter() is supposed to be called only with interrupts disabled. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Reviewed-by: Christoffer Dall Acked-by: Catalin Marinas Acked-by: Marc Zyngier Cc: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm/include/asm/kvm_host.h | 3 +++ arch/arm64/include/asm/fpsimd.h | 1 + arch/arm64/include/asm/kvm_arm.h | 4 +++- arch/arm64/include/asm/kvm_host.h | 11 +++++++++++ arch/arm64/kernel/fpsimd.c | 31 +++++++++++++++++++++++++++++-- arch/arm64/kvm/hyp/switch.c | 6 +++--- virt/kvm/arm/arm.c | 3 +++ 7 files changed, 53 insertions(+), 6 deletions(-) commit 4ffa09a939ab6d95655b3aee6ff79de48df95be7 Author: Dave Martin Date: Tue Oct 31 15:51:15 2017 +0000 arm64/sve: Add sysctl to set the default vector length for new processes Because of the effect of SVE on the size of the signal frame, the default vector length used for new processes involves a tradeoff between performance of SVE-enabled software on the one hand, and reliability of non-SVE-aware software on the other hand. For this reason, the best choice depends on the repertoire of userspace software in use and is thus best left up to distro maintainers, sysadmins and developers. If CONFIG_SYSCTL and CONFIG_PROC_SYSCTL are enabled, this patch exposes the default vector length in /proc/sys/abi/sve_default_vector_length, where boot scripts or the adventurous can poke it. In common with other arm64 ABI sysctls, this control is currently global: setting it requires CAP_SYS_ADMIN in the root user namespace, but the value set is effective for subsequent execs in all namespaces. The control only affects _new_ processes, however: changing it does not affect the vector length of any existing process. The intended usage model is that if userspace is known to be fully SVE-tolerant (or a developer is curious to find out) then this parameter can be cranked up during system startup. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 62 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) commit 2d2123bc7c7f843aa9db87720de159a049839862 Author: Dave Martin Date: Tue Oct 31 15:51:14 2017 +0000 arm64/sve: Add prctl controls for userspace vector length management This patch adds two arm64-specific prctls, to permit userspace to control its vector length: * PR_SVE_SET_VL: set the thread's SVE vector length and vector length inheritance mode. * PR_SVE_GET_VL: get the same information. Although these prctls resemble instruction set features in the SVE architecture, they provide additional control: the vector length inheritance mode is Linux-specific and nothing to do with the architecture, and the architecture does not permit EL0 to set its own vector length directly. Both can be used in portable tools without requiring the use of SVE instructions. Signed-off-by: Dave Martin Reviewed-by: Catalin Marinas Cc: Alex Bennée [will: Fixed up prctl constants to avoid clash with PDEATHSIG] Signed-off-by: Will Deacon arch/arm64/include/asm/fpsimd.h | 14 +++++++++++ arch/arm64/include/asm/processor.h | 4 +++ arch/arm64/kernel/fpsimd.c | 50 ++++++++++++++++++++++++++++++++++++++ include/uapi/linux/prctl.h | 4 +++ kernel/sys.c | 12 +++++++++ 5 files changed, 84 insertions(+) commit 43d4da2c45b2f5d62f8a79ff7c6f95089bb24656 Author: Dave Martin Date: Tue Oct 31 15:51:13 2017 +0000 arm64/sve: ptrace and ELF coredump support This patch defines and implements a new regset NT_ARM_SVE, which describes a thread's SVE register state. This allows a debugger to manipulate the SVE state, as well as being included in ELF coredumps for post-mortem debugging. Because the regset size and layout are dependent on the thread's current vector length, it is not possible to define a C struct to describe the regset contents as is done for existing regsets. Instead, and for the same reasons, NT_ARM_SVE is based on the freeform variable-layout approach used for the SVE signal frame. Additionally, to reduce debug overhead when debugging threads that might or might not have live SVE register state, NT_ARM_SVE may be presented in one of two different formats: the old struct user_fpsimd_state format is embedded for describing the state of a thread with no live SVE state, whereas a new variable-layout structure is embedded for describing live SVE state. This avoids a debugger needing to poll NT_PRFPREG in addition to NT_ARM_SVE, and allows existing userspace code to handle the non-SVE case without too much modification. For this to work, NT_ARM_SVE is defined with a fixed-format header of type struct user_sve_header, which the recipient can use to figure out the content, size and layout of the reset of the regset. Accessor macros are defined to allow the vector-length-dependent parts of the regset to be manipulated. Signed-off-by: Alan Hayward Signed-off-by: Dave Martin Reviewed-by: Catalin Marinas Cc: Alex Bennée Cc: Okamoto Takayuki Signed-off-by: Will Deacon arch/arm64/include/asm/fpsimd.h | 12 +- arch/arm64/include/uapi/asm/ptrace.h | 138 +++++++++++++++++ arch/arm64/kernel/fpsimd.c | 60 ++++++++ arch/arm64/kernel/ptrace.c | 280 ++++++++++++++++++++++++++++++++++- include/uapi/linux/elf.h | 1 + 5 files changed, 482 insertions(+), 9 deletions(-) commit fdfa976cae5cbd46aa4b4f9e554a93c9f8b35c62 Author: Dave Martin Date: Tue Oct 31 15:51:12 2017 +0000 arm64/sve: Preserve SVE registers around EFI runtime service calls The EFI runtime services ABI allows EFI to make free use of the FPSIMD registers during EFI runtime service calls, subject to the callee-save requirements of the AArch64 procedure call standard. However, the SVE architecture allows upper bits of the SVE vector registers to be zeroed as a side-effect of FPSIMD V-register writes. This means that the SVE vector registers must be saved in their entirety in order to avoid data loss: non-SVE-aware EFI implementations cannot restore them correctly. The non-IRQ case is already handled gracefully by kernel_neon_begin(). For the IRQ case, this patch allocates a suitable per-CPU stash buffer for the full SVE register state and uses it to preserve the affected registers around EFI calls. It is currently unclear how the EFI runtime services ABI will be clarified with respect to SVE, so it safest to assume that the predicate registers and FFR must be saved and restored too. No attempt is made to restore the restore the vector length after a call, for now. It is deemed rather insane for EFI to change it, and contemporary EFI implementations certainly won't. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Reviewed-by: Catalin Marinas Cc: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 67 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 6 deletions(-) commit 1bd3f93641ec710015fcb3badca07dacd58c91d3 Author: Dave Martin Date: Tue Oct 31 15:51:11 2017 +0000 arm64/sve: Preserve SVE registers around kernel-mode NEON use Kernel-mode NEON will corrupt the SVE vector registers, due to the way they alias the FPSIMD vector registers in the hardware. This patch ensures that any live SVE register content for the task is saved by kernel_neon_begin(). The data will be restored in the usual way on return to userspace. Signed-off-by: Dave Martin Reviewed-by: Ard Biesheuvel Reviewed-by: Alex Bennée Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2e0f2478ea37eba945bee007884a2988b8f7d332 Author: Dave Martin Date: Tue Oct 31 15:51:10 2017 +0000 arm64/sve: Probe SVE capabilities and usable vector lengths This patch uses the cpufeatures framework to determine common SVE capabilities and vector lengths, and configures the runtime SVE support code appropriately. ZCR_ELx is not really a feature register, but it is convenient to use it as a template for recording the maximum vector length supported by a CPU, using the LEN field. This field is similar to a feature field in that it is a contiguous bitfield for which we want to determine the minimum system-wide value. This patch adds ZCR as a pseudo-register in cpuinfo/cpufeatures, with appropriate custom code to populate it. Finding the minimum supported value of the LEN field is left to the cpufeatures framework in the usual way. The meaning of ID_AA64ZFR0_EL1 is not architecturally defined yet, so for now we just require it to be zero. Note that much of this code is dormant and SVE still won't be used yet, since system_supports_sve() remains hardwired to false. Signed-off-by: Dave Martin Reviewed-by: Suzuki K Poulose Reviewed-by: Catalin Marinas Cc: Alex Bennée Signed-off-by: Will Deacon arch/arm64/include/asm/cpu.h | 4 ++ arch/arm64/include/asm/cpufeature.h | 36 ++++++++++++ arch/arm64/include/asm/fpsimd.h | 14 +++++ arch/arm64/kernel/cpufeature.c | 52 ++++++++++++++++ arch/arm64/kernel/cpuinfo.c | 6 ++ arch/arm64/kernel/fpsimd.c | 114 +++++++++++++++++++++++++++++++++++- 6 files changed, 223 insertions(+), 3 deletions(-) commit 8f1eec57cdccd17faeaf7f593505124376340fd0 Author: Dave Martin Date: Tue Oct 31 15:51:09 2017 +0000 arm64: cpufeature: Move sys_caps_initialised declarations update_cpu_features() currently cannot tell whether it is being called during early or late secondary boot. This doesn't desperately matter for anything it currently does. However, SVE will need to know here whether the set of available vector lengths is known or still to be determined when booting a CPU, so that it can be updated appropriately. This patch simply moves the sys_caps_initialised stuff to the top of the file so that it can be used more widely. There doesn't seem to be a more obvious place to put it. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Reviewed-by: Suzuki K Poulose Acked-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 7582e22038a266444eb87bc07c372592ad647439 Author: Dave Martin Date: Tue Oct 31 15:51:08 2017 +0000 arm64/sve: Backend logic for setting the vector length This patch implements the core logic for changing a task's vector length on request from userspace. This will be used by the ptrace and prctl frontends that are implemented in later patches. The SVE architecture permits, but does not require, implementations to support vector lengths that are not a power of two. To handle this, logic is added to check a requested vector length against a possibly sparse bitmap of available vector lengths at runtime, so that the best supported value can be chosen. Signed-off-by: Dave Martin Reviewed-by: Catalin Marinas Cc: Alex Bennée Signed-off-by: Will Deacon arch/arm64/include/asm/fpsimd.h | 8 +++ arch/arm64/kernel/fpsimd.c | 137 +++++++++++++++++++++++++++++++++++++++- include/uapi/linux/prctl.h | 5 ++ 3 files changed, 149 insertions(+), 1 deletion(-) commit 8cd969d28fd2848dbfd86f6954dbd71f394f55f3 Author: Dave Martin Date: Tue Oct 31 15:51:07 2017 +0000 arm64/sve: Signal handling support This patch implements support for saving and restoring the SVE registers around signals. A fixed-size header struct sve_context is always included in the signal frame encoding the thread's vector length at the time of signal delivery, optionally followed by a variable-layout structure encoding the SVE registers. Because of the need to preserve backwards compatibility, the FPSIMD view of the SVE registers is always dumped as a struct fpsimd_context in the usual way, in addition to any sve_context. The SVE vector registers are dumped in full, including bits 127:0 of each register which alias the corresponding FPSIMD vector registers in the hardware. To avoid any ambiguity about which alias to restore during sigreturn, the kernel always restores bits 127:0 of each SVE vector register from the fpsimd_context in the signal frame (which must be present): userspace needs to take this into account if it wants to modify the SVE vector register contents on return from a signal. FPSR and FPCR, which are used by both FPSIMD and SVE, are not included in sve_context because they are always present in fpsimd_context anyway. For signal delivery, a new helper fpsimd_signal_preserve_current_state() is added to update _both_ the FPSIMD and SVE views in the task struct, to make it easier to populate this information into the signal frame. Because of the redundancy between the two views of the state, only one is updated otherwise. Reviewed-by: Catalin Marinas Signed-off-by: Dave Martin Cc: Alex Bennée Cc: Ard Biesheuvel Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/include/asm/fpsimd.h | 1 + arch/arm64/kernel/fpsimd.c | 55 ++++++++++--- arch/arm64/kernel/signal.c | 167 ++++++++++++++++++++++++++++++++++++++-- arch/arm64/kernel/signal32.c | 2 +- 4 files changed, 206 insertions(+), 19 deletions(-) commit 79ab047c75d6a9f95d8840d94f405e20cbacac4b Author: Dave Martin Date: Tue Oct 31 15:51:06 2017 +0000 arm64/sve: Support vector length resetting for new processes It's desirable to be able to reset the vector length to some sane default for new processes, since the new binary and its libraries may or may not be SVE-aware. This patch tracks the desired post-exec vector length (if any) in a new thread member sve_vl_onexec, and adds a new thread flag TIF_SVE_VL_INHERIT to control whether to inherit or reset the vector length. Currently these are inactive. Subsequent patches will provide the capability to configure them. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/processor.h | 1 + arch/arm64/include/asm/thread_info.h | 1 + arch/arm64/kernel/fpsimd.c | 16 ++++++++++++---- 3 files changed, 14 insertions(+), 4 deletions(-) commit bc0ee476036478a85beeed51f0d94c8729fd0544 Author: Dave Martin Date: Tue Oct 31 15:51:05 2017 +0000 arm64/sve: Core task context handling This patch adds the core support for switching and managing the SVE architectural state of user tasks. Calls to the existing FPSIMD low-level save/restore functions are factored out as new functions task_fpsimd_{save,load}(), since SVE now dynamically may or may not need to be handled at these points depending on the kernel configuration, hardware features discovered at boot, and the runtime state of the task. To make these decisions as fast as possible, const cpucaps are used where feasible, via the system_supports_sve() helper. The SVE registers are only tracked for threads that have explicitly used SVE, indicated by the new thread flag TIF_SVE. Otherwise, the FPSIMD view of the architectural state is stored in thread.fpsimd_state as usual. When in use, the SVE registers are not stored directly in thread_struct due to their potentially large and variable size. Because the task_struct slab allocator must be configured very early during kernel boot, it is also tricky to configure it correctly to match the maximum vector length provided by the hardware, since this depends on examining secondary CPUs as well as the primary. Instead, a pointer sve_state in thread_struct points to a dynamically allocated buffer containing the SVE register data, and code is added to allocate and free this buffer at appropriate times. TIF_SVE is set when taking an SVE access trap from userspace, if suitable hardware support has been detected. This enables SVE for the thread: a subsequent return to userspace will disable the trap accordingly. If such a trap is taken without sufficient system- wide hardware support, SIGILL is sent to the thread instead as if an undefined instruction had been executed: this may happen if userspace tries to use SVE in a system where not all CPUs support it for example. The kernel will clear TIF_SVE and disable SVE for the thread whenever an explicit syscall is made by userspace. For backwards compatibility reasons and conformance with the spirit of the base AArch64 procedure call standard, the subset of the SVE register state that aliases the FPSIMD registers is still preserved across a syscall even if this happens. The remainder of the SVE register state logically becomes zero at syscall entry, though the actual zeroing work is currently deferred until the thread next tries to use SVE, causing another trap to the kernel. This implementation is suboptimal: in the future, the fastpath case may be optimised to zero the registers in-place and leave SVE enabled for the task, where beneficial. TIF_SVE is also cleared in the following slowpath cases, which are taken as reasonable hints that the task may no longer use SVE: * exec * fork and clone Code is added to sync data between thread.fpsimd_state and thread.sve_state whenever enabling/disabling SVE, in a manner consistent with the SVE architectural programmer's model. Signed-off-by: Dave Martin Reviewed-by: Catalin Marinas Cc: Ard Biesheuvel Cc: Alex Bennée [will: added #include to fix allnoconfig build] [will: use enable_daif in do_sve_acc] Signed-off-by: Will Deacon arch/arm64/include/asm/fpsimd.h | 16 ++ arch/arm64/include/asm/processor.h | 2 + arch/arm64/include/asm/thread_info.h | 4 + arch/arm64/include/asm/traps.h | 2 + arch/arm64/kernel/entry.S | 39 ++++- arch/arm64/kernel/fpsimd.c | 325 ++++++++++++++++++++++++++++++++++- arch/arm64/kernel/process.c | 24 +++ arch/arm64/kernel/traps.c | 6 +- 8 files changed, 407 insertions(+), 11 deletions(-) commit 22043a3c082a584434a8c0d8b5e04cb6da985296 Author: Dave Martin Date: Tue Oct 31 15:51:04 2017 +0000 arm64/sve: Low-level CPU setup To enable the kernel to use SVE, SVE traps from EL1 to EL2 must be disabled. To take maximum advantage of the hardware, the full available vector length also needs to be enabled for EL1 by programming ZCR_EL2.LEN. (The kernel will program ZCR_EL1.LEN as required, but this cannot override the limit set by ZCR_EL2.) This patch makes the appropriate changes to the EL2 early setup code. Signed-off-by: Dave Martin Reviewed-by: Catalin Marinas Cc: Alex Bennée Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit d0b8cd3187889476144bd9b13bf36a932c3e7952 Author: Dave Martin Date: Tue Oct 31 15:51:03 2017 +0000 arm64/sve: Signal frame and context structure definition This patch defines the representation that will be used for the SVE register state in the signal frame, and implements support for saving and restoring the SVE registers around signals. The same layout will also be used for the in-kernel task state. Due to the variability of the SVE vector length, it is not possible to define a fixed C struct to describe all the registers. Instead, Macros are defined in sigcontext.h to facilitate access to the parts of the structure. Signed-off-by: Dave Martin Reviewed-by: Catalin Marinas Cc: Alex Bennée Signed-off-by: Will Deacon arch/arm64/include/uapi/asm/sigcontext.h | 117 ++++++++++++++++++++++++++++++- 1 file changed, 116 insertions(+), 1 deletion(-) commit ddd25ad1fde8456810dee1b26a870395bcd6339d Author: Dave Martin Date: Tue Oct 31 15:51:02 2017 +0000 arm64/sve: Kconfig update and conditional compilation support This patch adds CONFIG_ARM64_SVE to control building of SVE support into the kernel, and adds a stub predicate system_supports_sve() to control conditional compilation and runtime SVE support. system_supports_sve() just returns false for now: it will be replaced with a non-trivial implementation in a later patch, once SVE support is complete enough to be enabled safely. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/Kconfig | 11 +++++++++++ arch/arm64/include/asm/cpufeature.h | 5 +++++ 2 files changed, 16 insertions(+) commit 1fc5dce78ad15dce2f23336d339e5f7290b61e19 Author: Dave Martin Date: Tue Oct 31 15:51:01 2017 +0000 arm64/sve: Low-level SVE architectural state manipulation functions Manipulating the SVE architectural state, including the vector and predicate registers, first-fault register and the vector length, requires the use of dedicated instructions added by SVE. This patch adds suitable assembly functions for saving and restoring the SVE registers and querying the vector length. Setting of the vector length is done as part of register restore. Since people building kernels may not all get an SVE-enabled toolchain for a while, this patch uses macros that generate explicit opcodes in place of assembler mnemonics. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Acked-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/fpsimd.h | 5 ++ arch/arm64/include/asm/fpsimdmacros.h | 148 ++++++++++++++++++++++++++++++++++ arch/arm64/kernel/entry-fpsimd.S | 17 ++++ 3 files changed, 170 insertions(+) commit 672365649ccac68cf6fafecad1a7913951e7493b Author: Dave Martin Date: Tue Oct 31 15:51:00 2017 +0000 arm64/sve: System register and exception syndrome definitions The SVE architecture adds some system registers, ID register fields and a dedicated ESR exception class. This patch adds the appropriate definitions that will be needed by the kernel. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/esr.h | 3 ++- arch/arm64/include/asm/kvm_arm.h | 1 + arch/arm64/include/asm/sysreg.h | 21 +++++++++++++++++++++ arch/arm64/kernel/traps.c | 1 + 4 files changed, 25 insertions(+), 1 deletion(-) commit 9cf5b54fafedbc381df77c7f8d2aab61f4900657 Author: Dave Martin Date: Tue Oct 31 15:50:59 2017 +0000 arm64: fpsimd: Simplify uses of {set,clear}_ti_thread_flag() The existing FPSIMD context switch code contains a couple of instances of {set,clear}_ti_thread(task_thread_info(task)). Since there are thread flag manipulators that operate directly on task_struct, this verbosity isn't strictly needed. For consistency, this patch simplifies the affected calls. This should have no impact on behaviour. Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Reviewed-by: Catalin Marinas Acked-by: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 38b9aeb32fa732a0678cc0078ea3f4829a3cb89b Author: Dave Martin Date: Tue Oct 31 15:50:58 2017 +0000 arm64: Port deprecated instruction emulation to new sysctl interface Currently, armv8_deprected.c takes charge of the "abi" sysctl directory, which makes life difficult for other code that wants to register sysctls in the same directory. There is a "new" [1] sysctl registration interface that removes the need to define ctl_tables for parent directories explicitly, which is ideal here. This patch ports register_insn_emulation_sysctl() over to the register_sysctl() interface and removes the redundant ctl_table for "abi". Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Reviewed-by: Catalin Marinas [1] fea478d4101a (sysctl: Add register_sysctl for normal sysctl users) The commit message notes an intent to port users of the pre-existing interfaces over to register_sysctl(), though the number of users of the new interface currently appears negligible. Signed-off-by: Will Deacon arch/arm64/kernel/armv8_deprecated.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit b472db6cf8c603809c9e177680a2fb0139218bba Author: Dave Martin Date: Tue Oct 31 15:50:57 2017 +0000 arm64: efi: Add missing Kconfig dependency on KERNEL_MODE_NEON The EFI runtime services ABI permits calls to EFI to clobber certain FPSIMD/NEON registers, as per the AArch64 procedure call standard. Saving/restoring the clobbered registers around such calls needs KERNEL_MODE_NEON, but the dependency is missing from Kconfig. This patch adds the missing dependency. This will aid bisection of the patches implementing support for the ARM Scalable Vector Extension (SVE). Signed-off-by: Dave Martin Reviewed-by: Alex Bennée Acked-by: Catalin Marinas Cc: Ard Biesheuvel Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 93390c0a1b20b98a59ee0ef1a850687b3fbc304e Author: Dave Martin Date: Tue Oct 31 15:50:56 2017 +0000 arm64: KVM: Hide unsupported AArch64 CPU features from guests Currently, a guest kernel sees the true CPU feature registers (ID_*_EL1) when it reads them using MRS instructions. This means that the guest may observe features that are present in the hardware but the host doesn't understand or doesn't provide support for. A guest may legimitately try to use such a feature as per the architecture, but use of the feature may trap instead of working normally, triggering undef injection into the guest. This is not a problem for the host, but the guest may go wrong when running on newer hardware than the host knows about. This patch hides from guest VMs any AArch64-specific CPU features that the host doesn't support, by exposing to the guest the sanitised versions of the registers computed by the cpufeatures framework, instead of the true hardware registers. To achieve this, HCR_EL2.TID3 is now set for AArch64 guests, and emulation code is added to KVM to report the sanitised versions of the affected registers in response to MRS and register reads from userspace. The affected registers are removed from invariant_sys_regs[] (since the invariant_sys_regs handling is no longer quite correct for them) and added to sys_reg_desgs[], with appropriate access(), get_user() and set_user() methods. No runtime vcpu storage is allocated for the registers: instead, they are read on demand from the cpufeatures framework. This may need modification in the future if there is a need for userspace to customise the features visible to the guest. Attempts by userspace to write the registers are handled similarly to the current invariant_sys_regs handling: writes are permitted, but only if they don't attempt to change the value. This is sufficient to support VM snapshot/restore from userspace. Because of the additional registers, restoring a VM on an older kernel may not work unless userspace knows how to handle the extra VM registers exposed to the KVM user ABI by this patch. Under the principle of least damage, this patch makes no attempt to handle any of the other registers currently in invariant_sys_regs[], or to emulate registers for AArch32: however, these could be handled in a similar way in future, as necessary. Signed-off-by: Dave Martin Reviewed-by: Marc Zyngier Acked-by: Catalin Marinas Acked-by: Christoffer Dall Signed-off-by: Will Deacon arch/arm64/include/asm/sysreg.h | 3 + arch/arm64/kvm/hyp/switch.c | 6 + arch/arm64/kvm/sys_regs.c | 282 +++++++++++++++++++++++++++++++++------- 3 files changed, 246 insertions(+), 45 deletions(-) commit abf73988a7c2b2130fbee7cd19d2f57695566050 Author: Dave Martin Date: Tue Oct 31 15:50:55 2017 +0000 arm64: signal: Verify extra data is user-readable in sys_rt_sigreturn Currently sys_rt_sigreturn() verifies that the base sigframe is readable, but no similar check is performed on the extra data to which an extra_context record points. This matters because the extra data will be read with the unprotected user accessors. However, this is not a problem at present because the extra data base address is required to be exactly at the end of the base sigframe. So, there would need to be a non-user-readable kernel address within about 59K (SIGFRAME_MAXSZ - sizeof(struct rt_sigframe)) of some address for which access_ok(VERIFY_READ) returns true, in order for sigreturn to be able to read kernel memory that should be inaccessible to the user task. This is currently impossible due to the untranslatable address hole between the TTBR0 and TTBR1 address ranges. Disappearance of the hole between the TTBR0 and TTBR1 mapping ranges would require the VA size for TTBR0 and TTBR1 to grow to at least 55 bits, and either the disabling of tagged pointers for userspace or enabling of tagged pointers for kernel space; none of which is currently envisaged. Even so, it is wrong to use the unprotected user accessors without an accompanying access_ok() check. To avoid the potential for future surprises, this patch does an explicit access_ok() check on the extra data space when parsing an extra_context record. Fixes: 33f082614c34 ("arm64: signal: Allow expansion of the signal frame") Reviewed-by: Catalin Marinas Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/kernel/signal.c | 4 ++++ 1 file changed, 4 insertions(+) commit 94ef7ecbdf6f7d7f13bdf44b9eab4001e71208d6 Author: Dave Martin Date: Tue Oct 31 15:50:54 2017 +0000 arm64: fpsimd: Correctly annotate exception helpers called from asm A couple of FPSIMD exception handling functions that are called from entry.S are currently not annotated as such. This is not a big deal since asmlinkage does nothing on arm/arm64, but fixing the annotations is more consistent and may help avoid future surprises. This patch adds appropriate asmlinkage annotations for do_fpsimd_acc() and do_fpsimd_exc(). Reviewed-by: Catalin Marinas Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/kernel/fpsimd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 27e64b4be4b863d884f3ec1686a2f744ae93a1b9 Author: Dave Martin Date: Tue Oct 31 15:50:53 2017 +0000 regset: Add support for dynamically sized regsets Currently the regset API doesn't allow for the possibility that regsets (or at least, the amount of meaningful data in a regset) may change in size. In particular, this results in useless padding being added to coredumps if a regset's current size is smaller than its theoretical maximum size. This patch adds a get_size() function to struct user_regset. Individual regset implementations can implement this function to return the current size of the regset data. A regset_size() function is added to provide callers with an abstract interface for determining the size of a regset without needing to know whether the regset is dynamically sized or not. The only affected user of this interface is the ELF coredump code: This patch ports ELF coredump to dump regsets with their actual size in the coredump. This has no effect except for new regsets that are dynamically sized and provide a get_size() implementation. Signed-off-by: Dave Martin Reviewed-by: Catalin Marinas Cc: Oleg Nesterov Cc: Alexander Viro Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Dmitry Safonov Cc: H. J. Lu Signed-off-by: Will Deacon fs/binfmt_elf.c | 10 ++++---- include/linux/regset.h | 67 ++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 65 insertions(+), 12 deletions(-) commit c7f5828bf77dcbd61d51f4736c1d5aa35663fbb4 Author: Suzuki K Poulose Date: Fri Nov 3 11:45:18 2017 +0000 arm-ccn: perf: Prevent module unload while PMU is in use When the PMU driver is built as a module, the perf expects the pmu->module to be valid, so that the driver is prevented from being unloaded while it is in use. Fix the CCN pmu driver to fill in this field. Fixes: a33b0daab73a0 ("bus: ARM CCN PMU driver") Cc: Pawel Moll Cc: Will Deacon Acked-by: Mark Rutland Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon drivers/bus/arm-ccn.c | 1 + 1 file changed, 1 insertion(+) commit 19b4aff2025b4336392c30bb638b7d01c6263301 Author: Suzuki K Poulose Date: Fri Nov 3 11:45:17 2017 +0000 perf: arm_spe: Prevent module unload while the PMU is in use When the PMU driver is built as a module, the perf expects the pmu->module to be valid, so that the driver is prevented from being unloaded while it is in use. Fix the SPE pmu driver to fill in this field. Cc: Will Deacon Acked-by: Mark Rutland Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon drivers/perf/arm_spe_pmu.c | 1 + 1 file changed, 1 insertion(+) commit ad95028a2e88e59fadda79141e74546d12ba3b4b Author: Petros Koutoupis Date: Mon Oct 30 16:38:10 2017 -0500 scsi: scsi_error: DID_SOFT_ERROR comment clean up Updated comment. We are keeping track of maximum number of retries per command via retries/allowed in struct scsi_cmnd. Corrected comment positioning. [mkp: applied by hand] Signed-off-by: Petros Koutoupis Signed-off-by: Martin K. Petersen drivers/scsi/scsi_error.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 4b2d9fe8795074626a29579e9afeedd52f1eeb83 Author: Bogdan Purcareata Date: Sun Oct 29 08:20:43 2017 +0000 staging: fsl-dpaa2/eth: Extra headroom in RX buffers The needed headroom that we ask the stack to reserve for us in TX skbs is larger than the headroom available in RX frames, which leads to skb reallocations in forwarding scenarios involving two DPNI interfaces. Configure the hardware to reserve some extra space in the RX frame headroom to avoid this situation. The value is chosen based on the Tx frame data offset, the Rx buffer alignment value and the netdevice required headroom. The network stack will take care to reserve space for HH_DATA_MOD when building the skb, so there's no need to account for it in the netdevice needed headroom. Signed-off-by: Bogdan Purcareata Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 85 +++++++++++++++----------- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 39 ++++++++---- 2 files changed, 76 insertions(+), 48 deletions(-) commit 8a4fd8778b929ac9459ad740f5e9812b2aa87bca Author: Bogdan Purcareata Date: Sun Oct 29 08:20:42 2017 +0000 staging: fsl-dpaa2/eth: Change RX buffer alignment The WRIOP hardware block v1.0.0 (found on LS2080A board) requires data in RX buffers to be aligned to 256B, but newer revisions (e.g. on LS2088A, LS1088A) only require 64B alignment. Check WRIOP version and decide at runtime which alignment requirement to configure for ingress buffers. Signed-off-by: Bogdan Purcareata Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 18 +++++++++++++---- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 27 ++++++++++++++++++-------- 2 files changed, 33 insertions(+), 12 deletions(-) commit 3c2192863f2dfc64384a6c201dcf96a887367b30 Author: Bogdan Purcareata Date: Sun Oct 29 08:20:41 2017 +0000 staging: fsl-dpaa2/eth: Don't account SWA in tx_data_offset When configuring the Tx buffer layout, the software annotation size is mentioned, and MC accounts for it when configuring the frame tx_data_offset. No need to handle it in the driver as well. This results in 64B less memory allocated per frame. Signed-off-by: Bogdan Purcareata Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 3 --- 1 file changed, 3 deletions(-) commit 308f64e7e2736fa24eb81f6454ee5b7efa5c5d39 Author: Ioana Radulescu Date: Sun Oct 29 08:20:40 2017 +0000 staging: fsl-dpaa2/eth: Split function Since setup_dpni() became a bit too long, move the buffer layout configuration to a separate function. Signed-off-by: Ioana Radulescu Signed-off-by: Bogdan Purcareata Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 79 +++++++++++++++----------- 1 file changed, 45 insertions(+), 34 deletions(-) commit f6dda8090237ede40f6ee6ff6d9188bfc670c5c9 Author: Ioana Radulescu Date: Sun Oct 29 08:20:39 2017 +0000 staging: fsl-dpaa2/eth: Label cleanup Clean up goto labels in a couple of functions, by removing/renaming redundant ones. Signed-off-by: Ioana Radulescu Signed-off-by: Bogdan Purcareata Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 35 +++++++++++--------------- 1 file changed, 15 insertions(+), 20 deletions(-) commit 7cd310f3fda3605caaa947221e8838eac5f2e45f Author: gregkh@linuxfoundation.org Date: Fri Nov 3 15:47:04 2017 +0100 staging: unisys: don't care about debugfs errors A caller should never care about a debugfs error return value, and it should never abort its normal operation if something "odd" goes on. Fix up the unisys init code to not care if the root debugfs directory for the subsystem is created or not, as no place it is used will matter. Cc: David Kershner Cc: Tim Sell Cc: Sameer Wadgaonkar Cc: David Binder Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 2 -- 1 file changed, 2 deletions(-) commit 7a373fd74a8d1c4882e0236cc38345cec1393505 Author: Romain Izard Date: Tue Oct 31 16:25:24 2017 +0100 crypto: atmel-aes - Reset the controller before each use When using the rfc4543(gcm(aes))) mode, the registers of the hardware engine are not empty after use. If the engine is not reset before its next use, the following results will be invalid. Always reset the hardware engine. Signed-off-by: Romain Izard Signed-off-by: Herbert Xu drivers/crypto/atmel-aes.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 91308019ecb46047b81d3c769cf5bf6b129ddf02 Author: Romain Izard Date: Tue Oct 31 16:25:23 2017 +0100 crypto: atmel-aes - 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. Fix this issue for the Atmel AES hardware engine. The tcrypt test case for cts(cbc(aes)) is now correctly passed. In the case of in-place decryption, copy the ciphertext in an intermediate buffer before decryption. Signed-off-by: Romain Izard Signed-off-by: Herbert Xu drivers/crypto/atmel-aes.c | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) commit 142a27f0a731ddcf467546960a5585970ca98e21 Author: PrasannaKumar Muralidharan Date: Fri Oct 27 22:34:04 2017 +0530 hwrng: core - Reset user selected rng by writing "" to rng_current User is able to select a chosen rng by writing its name to rng_current but there is no way to reset it without unbinding the rng. Let user write "" to rng_current and delesect the chosen rng. Signed-off-by: PrasannaKumar Muralidharan reviewed-by: Harald Freudenberger Signed-off-by: Herbert Xu drivers/char/hw_random/core.c | 51 +++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 19 deletions(-) commit c2afad6c6105783a72a2f7b69834a489120a1a7c Author: Kamil Konieczny Date: Wed Oct 25 17:27:35 2017 +0200 crypto: s5p-sss - Add HASH support for Exynos Add support for MD5, SHA1, SHA256 hash algorithms for Exynos HW. It uses the crypto framework asynchronous hash api. It is based on omap-sham.c driver. S5P has some HW differencies and is not implemented. Modifications in s5p-sss: - Add hash supporting structures and functions. - Modify irq handler to handle both aes and hash signals. - Resize resource end in probe if EXYNOS_HASH is enabled in Kconfig. - Add new copyright line and new author. - Tested on Odroid-U3 with Exynos 4412 CPU, kernel 4.13-rc6 with crypto run-time self test testmgr and with tcrypt module with: modprobe tcrypt sec=1 mode=N where N=402, 403, 404 (MD5, SHA1, SHA256). Modifications in drivers/crypto/Kconfig: - Add new CRYPTO_DEV_EXYNOS_HASH, depend on !EXYNOS_RNG and CRYPTO_DEV_S5P - Select sw algorithms MD5, SHA1 and SHA256 in EXYNOS_HASH as they are needed for fallback. Acked-by: Vladimir Zapolskiy Reviewed-by: Krzysztof Kozlowski Signed-off-by: Kamil Konieczny Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 14 + drivers/crypto/s5p-sss.c | 1406 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 1410 insertions(+), 10 deletions(-) commit e5e4090884cbd109dab00f1ff96b98f551e55445 Author: Kamil Konieczny Date: Wed Oct 25 17:27:34 2017 +0200 crypto: s5p-sss - Change spaces to tabs Change #define lines to use tabs consistently. Acked-by: Vladimir Zapolskiy Reviewed-by: Krzysztof Kozlowski Signed-off-by: Kamil Konieczny Signed-off-by: Herbert Xu drivers/crypto/s5p-sss.c | 190 +++++++++++++++++++++++------------------------ 1 file changed, 95 insertions(+), 95 deletions(-) commit f947732aa64cf99e802486ed9d1a93a4da37118b Author: Kees Cook Date: Wed Oct 25 03:18:42 2017 -0700 crypto: drivers - Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Herbert Xu Cc: Jesper Nilsson Cc: Lars Persson Cc: Niklas Cassel Cc: "David S. Miller" Cc: Jamie Iles Cc: linux-arm-kernel@axis.com Cc: linux-crypto@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Kees Cook Acked-by: Jamie Iles Acked-by: Lars Persson Signed-off-by: Herbert Xu drivers/crypto/axis/artpec6_crypto.c | 6 +++--- drivers/crypto/picoxcell_crypto.c | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) commit d3b5a87c4a8178b34b93a463870eca549a103aee Author: Horia Geantă Date: Tue Oct 24 09:27:31 2017 +0300 crypto: caam/qi - abort algorithm setup on DPAA2 parts caam/qi frontend (i.e. caamalg_qi) mustn't be used in case it runs on a DPAA2 part (this could happen when using a multiplatform kernel). Fixes: 297b9cebd2fc ("crypto: caam/jr - add support for DPAA2 parts") Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg_qi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit cc2f8ab5334a736fa0e775cfccf06c1e268667f0 Author: Radu Alexe Date: Tue Oct 24 09:27:30 2017 +0300 crypto: caam - fix incorrect define Fixes: 3ebfa92f49a6 ("crypto: caam - Add new macros for building extended SEC descriptors (> 64 words)") Signed-off-by: Radu Alexe Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu drivers/crypto/caam/desc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d472e42aafd6ab13a5981defb696874cc6bc26b3 Author: Tudor-Dan Ambarus Date: Mon Oct 23 18:34:41 2017 +0300 crypto: atmel - remove useless irq init irq would be set to -1 and then unused, if we failed to get IORESOURCE_MEM. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu drivers/crypto/atmel-aes.c | 2 -- drivers/crypto/atmel-sha.c | 2 -- drivers/crypto/atmel-tdes.c | 2 -- 3 files changed, 6 deletions(-) commit 3c88761e8a7bee9252c6ed1e2552eb0cfefa521d Author: Tudor-Dan Ambarus Date: Mon Oct 23 18:34:39 2017 +0300 crypto: atmel - return appropriate error code Return -ENODEV when dma_request_slave_channel_compat() fails. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu drivers/crypto/atmel-aes.c | 3 +-- drivers/crypto/atmel-sha.c | 3 +-- drivers/crypto/atmel-tdes.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) commit aba973c69e3658e3190d8983eed7dddd3c44dd1e Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:52 2017 +0100 crypto: doc - adapt api sample to use async. op wait The code sample is waiting for an async. crypto op completion. Adapt sample to use the new generic infrastructure to do the same. This also fixes a possible data coruption bug created by the use of wait_for_completion_interruptible() without dealing correctly with an interrupt aborting the wait prior to the async op finishing. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu Documentation/crypto/api-samples.rst | 52 +++++++----------------------------- 1 file changed, 10 insertions(+), 42 deletions(-) commit 591b95af3da027412be17ecbcb4dbd33990b557c Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:51 2017 +0100 crypto: mediatek - move to generic async completion The mediatek driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Acked-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) commit c70e5f9403103c0a754c4c726e00ddbd7c2c3bf4 Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:50 2017 +0100 crypto: qce - move to generic async completion The qce driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu drivers/crypto/qce/sha.c | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) commit f1c90ac3d71324ac7a6beebc33b0d493c4cbbf1a Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:49 2017 +0100 crypto: talitos - move to generic async completion The talitos driver starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Tested-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) commit 646710419a978c6f82342a2ad5eb28adb5f47bc4 Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:48 2017 +0100 crypto: tcrypt - move to generic async completion tcrypt starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu crypto/tcrypt.c | 84 +++++++++++++++++---------------------------------------- 1 file changed, 25 insertions(+), 59 deletions(-) commit 46f1414c8a92d85b4391bc324dd58eace8c48837 Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:47 2017 +0100 ima: move to generic async completion ima starts several async crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Acked-by: Mimi Zohar Signed-off-by: Herbert Xu security/integrity/ima/ima_crypto.c | 56 +++++++++++-------------------------- 1 file changed, 17 insertions(+), 39 deletions(-) commit a5186b85fe7f4413324054b9b97c2f26056f9bbb Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:46 2017 +0100 cifs: move to generic async completion cifs starts an async. crypto op and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Acked-by: Pavel Shilovsky Signed-off-by: Herbert Xu fs/cifs/smb2ops.c | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) commit 12f1ffc40a81fe825eedb02b63dc3e1bd6f7e689 Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:45 2017 +0100 dm: move dm-verity to generic async completion dm-verity is starting async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. This also avoids a future potential data coruption bug created by the use of wait_for_completion_interruptible() without dealing correctly with an interrupt aborting the wait prior to the async op finishing, should this code ever move to a context where signals are not masked. Signed-off-by: Gilad Ben-Yossef CC: Mikulas Patocka Signed-off-by: Herbert Xu drivers/md/dm-verity-target.c | 81 +++++++++++-------------------------------- drivers/md/dm-verity.h | 5 --- 2 files changed, 20 insertions(+), 66 deletions(-) commit d0082e1a7c8dfee55b06e442f137097230a1102a Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:44 2017 +0100 fscrypt: move to generic async completion fscrypt starts several async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu fs/crypto/crypto.c | 28 ++++------------------------ fs/crypto/fname.c | 36 ++++++------------------------------ fs/crypto/fscrypt_private.h | 10 ---------- fs/crypto/keyinfo.c | 21 +++------------------ 4 files changed, 13 insertions(+), 82 deletions(-) commit 7f39713684acb2745506be195d31f73ce410fb24 Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:43 2017 +0100 crypto: testmgr - move to generic async completion testmgr is starting async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. This also provides a test of the generic crypto async. wait code. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu crypto/testmgr.c | 204 ++++++++++++++++++------------------------------------- 1 file changed, 66 insertions(+), 138 deletions(-) commit 76c6739477fa9e16a75633d1f57c62a8a57388ad Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:42 2017 +0100 crypto: gcm - move to generic async completion gcm is starting an async. crypto op and waiting for it complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu crypto/gcm.c | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) commit 85a2dea4bdbfa7565818ca094d08e838cf62da77 Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:41 2017 +0100 crypto: drbg - move to generic async completion DRBG is starting an async. crypto op and waiting for it complete. Move it over to generic code doing the same. The code now also passes CRYPTO_TFM_REQ_MAY_SLEEP flag indicating crypto request memory allocation may use GFP_KERNEL which should be perfectly fine as the code is obviously sleeping for the completion of the request any way. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu crypto/drbg.c | 36 +++++++++--------------------------- include/crypto/drbg.h | 3 +-- 2 files changed, 10 insertions(+), 29 deletions(-) commit 0ca2a04ac398a71e49b0b093f365d1188cc13e01 Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:40 2017 +0100 crypto: move pub key to generic async completion public_key_verify_signature() is starting an async crypto op and waiting for it to complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu crypto/asymmetric_keys/public_key.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) commit 2c3f8b162106a7d12097d02eb22459f57fab8247 Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:39 2017 +0100 crypto: algif - move to generic async completion algif starts several async crypto ops and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu crypto/af_alg.c | 27 --------------------------- crypto/algif_aead.c | 8 ++++---- crypto/algif_hash.c | 30 ++++++++++++++---------------- crypto/algif_skcipher.c | 9 ++++----- include/crypto/if_alg.h | 15 +-------------- 5 files changed, 23 insertions(+), 66 deletions(-) commit ada69a1639eca54ff74d839a6513c43db8d57d70 Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:38 2017 +0100 crypto: introduce crypto wait for async op Invoking a possibly async. crypto op and waiting for completion while correctly handling backlog processing is a common task in the crypto API implementation and outside users of it. This patch adds a generic implementation for doing so in preparation for using it across the board instead of hand rolled versions. Signed-off-by: Gilad Ben-Yossef CC: Eric Biggers CC: Jonathan Cameron Signed-off-by: Herbert Xu crypto/api.c | 13 +++++++++++++ include/linux/crypto.h | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) commit 3d549e325e3c7dd294b96720f22cbc39ec2e02e9 Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:37 2017 +0100 crypto: marvell/cesa - remove redundant backlog checks on EBUSY Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef Acked-by: Boris Brezillon Signed-off-by: Herbert Xu drivers/crypto/marvell/cesa.c | 3 +-- drivers/crypto/marvell/cesa.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit 4e5b0ad5827163bd8e57ea595be2681cad12e5c2 Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:36 2017 +0100 crypto: remove redundant backlog checks on EBUSY Now that -EBUSY return code only indicates backlog queueing we can safely remove the now redundant check for the CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu crypto/ahash.c | 12 +++--------- crypto/cts.c | 6 ++---- crypto/lrw.c | 8 ++------ crypto/rsa-pkcs1pad.c | 16 ++++------------ crypto/xts.c | 8 ++------ 5 files changed, 13 insertions(+), 37 deletions(-) commit 068c2e703577dca8cd634421f14b90959589ec85 Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:35 2017 +0100 net: use -ENOSPC for transient busy indication Replace -EBUSY with -ENOSPC when handling transient busy indication in the absence of backlog. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu net/ipv4/ah4.c | 2 +- net/ipv4/esp4.c | 2 +- net/ipv6/ah6.c | 2 +- net/ipv6/esp6.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit cfba73d25f0eca9f01f565f0243e3083f4667234 Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:34 2017 +0100 crypto: ccp - use -ENOSPC for transient busy indication Replace -EBUSY with -ENOSPC when reporting transient busy indication in the absence of backlog. Signed-off-by: Gilad Ben-Yossef Reviewed-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-crypto-main.c | 8 +++----- drivers/crypto/ccp/ccp-dev.c | 7 +++++-- 2 files changed, 8 insertions(+), 7 deletions(-) commit 6b80ea389a0bceee6a0a801474b78ad0a8cd034d Author: Gilad Ben-Yossef Date: Wed Oct 18 08:00:33 2017 +0100 crypto: change transient busy return code to -ENOSPC The crypto API was using the -EBUSY return value to indicate both a hard failure to submit a crypto operation into a transformation provider when the latter was busy and the backlog mechanism was not enabled as well as a notification that the operation was queued into the backlog when the backlog mechanism was enabled. Having the same return code indicate two very different conditions depending on a flag is both error prone and requires extra runtime check like the following to discern between the cases: if (err == -EINPROGRESS || (err == -EBUSY && (ahash_request_flags(req) & CRYPTO_TFM_REQ_MAY_BACKLOG))) This patch changes the return code used to indicate a crypto op failed due to the transformation provider being transiently busy to -ENOSPC. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu crypto/algapi.c | 6 ++++-- crypto/cryptd.c | 4 +--- 2 files changed, 5 insertions(+), 5 deletions(-) commit c8dd5e456d2483f051bc92f9c67f01144d122a0b Author: Kees Cook Date: Mon Oct 16 16:38:34 2017 -0700 hwrng: xgene - Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Matt Mackall Cc: Herbert Xu Cc: linux-crypto@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Herbert Xu drivers/char/hw_random/xgene-rng.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit ab387f0af24e661fc1c2f609664ec9ae6618e3f0 Merge: e666d4e 9e66317 Author: Herbert Xu Date: Fri Nov 3 22:10:18 2017 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux Merge 4.14-rc3 in order to pick up the new timer_setup function. commit 340b5319c98eb14f7a70947a38e17d06f5beea88 Merge: 0d3d73a 7285cf3 Author: Ingo Molnar Date: Fri Nov 3 15:06:53 2017 +0100 Merge tag 'perf-core-for-mingo-4.15-20171103' 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: - Beautify the 'kcmp' and 'prctl' syscall arguments in 'perf trace' (Arnaldo Carvalho de Melo) - Implement a way to print formatted output to per-event files in 'perf script' to facilitate generate flamegraphs, elliminating the need to write scripts to do that separation (yuzhoujian, Arnaldo Carvalho de Melo) Make 'perf stat --per-thread' update shadow stats to show metrics (Jiri Olsa) - Fix double mapping al->addr in callchain processing for children without self period (Namhyung Kim) - Fix memory leak in addr2inlines() when libbfd is not used (Namhyung Kim) - Show correct function name for srcline of callchains when libbfd is not used (Namhyung Kim) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit edbfd9112f70c34b2965580a67dad5fb306fb6c9 Author: Tejun Heo Date: Fri Nov 3 07:02:15 2017 -0700 Revert "workqueue: respect isolated cpus when queueing an unbound work" This reverts commit b5149873a0c299195b5346fe4dc2c5b04ae2f995. It conflicts with the following isolcpus change from the sched branch. edb9382175c3 ("sched/isolation: Move isolcpus= handling to the housekeeping code") Let's revert for now. Signed-off-by: Tejun Heo kernel/workqueue.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit f725fc6b489648770a4483cab8bc6679dd63c804 Author: NeilBrown Date: Mon Oct 23 11:53:49 2017 +1100 staging: lustre: ldlm: remove unused field 'fwd_generation' With this field gone, we don't need local variables 'imp' or 'obd' any more. Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) commit 4a8d3fb10dd758af27984ef92a44e619d598c3e0 Author: NeilBrown Date: Mon Oct 23 11:53:49 2017 +1100 staging: lustre: ldlm: remove unnecessary 'ownlocks' variable. Now that the code has been simplified, 'ownlocks' is not necessary. The loop which sets it exits with 'lock' having the same value as 'ownlocks', or pointing to the head of the list if ownlocks is NULL. The current code then tests ownlocks and sets 'lock' to exactly the value that it currently has. So discard 'ownlocks'. Also remove unnecessary initialization of 'lock'. Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 3ac5a675caf4dde2788a7a1ac32b95986bffe901 Author: NeilBrown Date: Mon Oct 23 11:53:49 2017 +1100 staging: lustre: ldlm: tidy list walking in ldlm_flock() Use list_for_each_entry variants to avoid the explicit list_entry() calls. This allows us to use list_for_each_entry_safe_from() instread of adding a local list-walking macro. Also improve some comments so that it is more obvious that the locks are sorted per-owner and that we need to find the insertion point. Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 45 +++++++++++-------------- 1 file changed, 19 insertions(+), 26 deletions(-) commit 60751d49e0a7fe93b8467bd8c50101cc9367c605 Author: NeilBrown Date: Mon Oct 23 11:53:49 2017 +1100 staging: lustre: ldlm: remove 'flags' arg from ldlm_flock_destroy() The only value ever passed in LDLM_FL_WAIT_NOREPROC, so assume that instead of passing it. Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 36 +++++++++++-------------- 1 file changed, 16 insertions(+), 20 deletions(-) commit f95e8c7120234a53f302b0eeecee8e4ada25581c Author: NeilBrown Date: Mon Oct 23 11:53:49 2017 +1100 staging: lustre: ldlm: remove unused 'overlaps' variable 'overlaps' is never used, only incremented. Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 3 --- 1 file changed, 3 deletions(-) commit ace5cb0fd27e1392f42f27a68372b51a390333b4 Author: NeilBrown Date: Mon Oct 23 11:53:49 2017 +1100 staging: lustre: ldlm: remove 'flags' arg from ldlm_process_flock_lock() This is only ever set to LDLM_FL_WAIT_NOREPROC, so we can remove the arg and discard any code that is only run when it doesn't have that value. Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 110 +++++------------------- 1 file changed, 21 insertions(+), 89 deletions(-) commit 990d86bded87f793f0e03a83e52ea86d3c50a48e Author: NeilBrown Date: Mon Oct 23 11:53:49 2017 +1100 staging: lustre: ldlm: remove unneeded 'err' arg to ldlm_process_flock_lock() This arg is used to return an error code, but the returned code is never looked at. So there is no point returning it. Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit f88faec4d403e5e2096072685e8cb36eeb43507d Author: NeilBrown Date: Mon Oct 23 11:53:49 2017 +1100 staging: lustre: ldlm: remove unused 'work_list' arg from ldlm_process_flock_lock() 'work_list' is only set to NULL, and is never used. So discard it. Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 09d61fdb8684297897cadacdb627255f22f2291b Author: NeilBrown Date: Mon Oct 23 11:53:49 2017 +1100 staging: lustre: ldlm: remove 'first_enq' arg from ldlm_process_flock_lock() it is only ever set to '1', so we can just assume that and remove the code. Signed-off-by: NeilBrown Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit e666d4e9ceec94c0a88c94b7db31d56474da43b3 Author: Paulo Flabiano Smorigo Date: Mon Oct 16 20:54:19 2017 -0200 crypto: vmx - Use skcipher for ctr fallback Signed-off-by: Paulo Flabiano Smorigo Signed-off-by: Herbert Xu drivers/crypto/vmx/aes_ctr.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit e6cd5bf64855cc78054d6f8714f6c9983b7bb8bd Author: Boris BREZILLON Date: Fri Oct 13 15:30:32 2017 +0200 crypto: marvell - Switch cipher algs to the skcipher interface crypto_alg is not supposed to be directly implemented by crypto engine driver. Drivers should instead implement specialized interfaces like ahash_alg or skcipher_alg. Migrate to all cipher algorithms to the skcipher_alg interface. While at it, get rid of all references to ablkcipher including in internal struct or function names. Signed-off-by: Boris Brezillon Signed-off-by: Herbert Xu drivers/crypto/marvell/cesa.c | 10 +- drivers/crypto/marvell/cesa.h | 25 ++- drivers/crypto/marvell/cipher.c | 476 ++++++++++++++++++++-------------------- 3 files changed, 251 insertions(+), 260 deletions(-) commit ca70f415407c4562ee110bee1048152070a48f7b Author: Horia Geantă Date: Fri Oct 13 15:01:23 2017 +0300 MAINTAINERS: update caam crypto driver maintainers list Dan steps down as caam maintainer, being replaced by Aymen. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3d062a6a27762f860b74f7723fa335115ccc880 Author: Gustavo A. R. Silva Date: Thu Oct 12 17:55:29 2017 -0500 crypto: qat - mark expected switch fall-throughs in qat_uclo In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_uclo.c | 3 +++ 1 file changed, 3 insertions(+) commit 9c290c507ca22ccf9ca2ab3fcb04e4e0e1422190 Author: Colin Ian King Date: Thu Oct 12 18:04:56 2017 +0100 crypto: qat - remove unused and redundant pointer vf_info The pointer vf_info is being assigned but never read, it is redundant and therefore can be removed. Cleans up clang warning: Value stored to 'vf_info' is never read Fixes: ed8ccaef52fa ("crypto: qat - Add support for SRIOV") Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/adf_dev_mgr.c | 3 --- 1 file changed, 3 deletions(-) commit 745952aeb599634025b568e1695fc6793b771682 Author: Colin Ian King Date: Thu Oct 12 17:55:41 2017 +0100 crypto: ccp - remove unused variable qim Variable qim is assigned but never read, it is redundant and can be removed. Cleans up clang warning: Value stored to 'qim' is never read Fixes: 4b394a232df7 ("crypto: ccp - Let a v5 CCP provide the same function as v3") Signed-off-by: Colin Ian King Acked-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dev-v5.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2f1fedca9b97e87413db52c54745e9cc28b70169 Author: Colin Ian King Date: Thu Oct 12 17:44:06 2017 +0100 crypto: cavium - clean up clang warning on unread variable offset The variable offset is being assigned and not being used; it should be passed as the 2nd argument to call to function nitrox_write_csr but has been omitted. Fix this. Cleans up clang warning: Value stored to 'offset' is never read Fixes: 14fa93cdcd9b ("crypto: cavium - Add support for CNN55XX adapters.") Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu drivers/crypto/cavium/nitrox/nitrox_hal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27b43fd95b144484713855c6d4fe832d22e48838 Author: Boris BREZILLON Date: Wed Oct 11 15:16:19 2017 +0200 crypto: marvell - Remove the old mv_cesa driver All defconfigs selecting the old driver have been patched to select the new one instead. We can now remove the old driver along with the allhwsupports module parameter in the new driver that was used to check whether the new driver was allowed to take control of the CESA engine or not. Signed-off-by: Boris Brezillon Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 22 +- drivers/crypto/Makefile | 1 - drivers/crypto/marvell/cesa.c | 7 - drivers/crypto/mv_cesa.c | 1213 ----------------------------------------- drivers/crypto/mv_cesa.h | 150 ----- 5 files changed, 3 insertions(+), 1390 deletions(-) commit 729ec4c57d5fbed25b800fc1fc35f9f1f676c810 Author: Boris BREZILLON Date: Wed Oct 11 15:16:18 2017 +0200 ARM: configs: Stop selecting the old CESA driver A new driver has been developed to support the CESA IP. Switch remaining users of the old driver to the new driver in order to remove the old one. Signed-off-by: Boris Brezillon Signed-off-by: Herbert Xu arch/arm/configs/dove_defconfig | 2 +- arch/arm/configs/multi_v5_defconfig | 2 +- arch/arm/configs/orion5x_defconfig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 7b0c3d693ce65900dd3c79766185f539fa37a29a Author: Boris BREZILLON Date: Wed Oct 11 15:16:17 2017 +0200 crypto: marvell - Add a platform_device_id table Add a platform_device_id table to allow using this driver on orion platforms that have not been converted to DT. Signed-off-by: Boris Brezillon Signed-off-by: Herbert Xu drivers/crypto/marvell/cesa.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7aacbfcb331ceff3ac43096d563a1f93ed46e35e Author: Robert Baronescu Date: Tue Oct 10 13:22:00 2017 +0300 crypto: tcrypt - fix buffer lengths in test_aead_speed() Fix the way the length of the buffers used for encryption / decryption are computed. For e.g. in case of encryption, input buffer does not contain an authentication tag. Signed-off-by: Robert Baronescu Signed-off-by: Herbert Xu crypto/tcrypt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 59517226a35a4041e41d114d085846ac94ebfbf2 Author: Gustavo A. R. Silva Date: Mon Oct 9 14:43:21 2017 -0500 crypto: tcrypt - mark expected switch fall-throughs in do_test() In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Herbert Xu crypto/tcrypt.c | 108 ++++++++++++++++++++++++++------------------------------ 1 file changed, 51 insertions(+), 57 deletions(-) commit 396d34f9537619842b081cbe0b5ce8dbbfa00a81 Author: Harsh Jain Date: Sun Oct 8 13:37:24 2017 +0530 crypto: chelsio - Fix memory leak Fix memory leak when device does not support crypto. Reported-by: Dan Carpenter Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2f47d58043110b0aeac1952494db668fc0fc7c0a Author: Harsh Jain Date: Sun Oct 8 13:37:23 2017 +0530 crypto: chelsio - Move DMA un/mapping to chcr from lld cxgb4 driver Allow chcr to do DMA mapping/Unmapping instead of lld cxgb4. It moves "Copy AAD to dst buffer" requirement from driver to firmware. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 1645 ++++++++++++++++++------------ drivers/crypto/chelsio/chcr_algo.h | 44 +- drivers/crypto/chelsio/chcr_crypto.h | 114 ++- drivers/net/ethernet/chelsio/cxgb4/sge.c | 8 +- 4 files changed, 1116 insertions(+), 695 deletions(-) commit 2956f36c954ee6e31068a02cf2ca551efa5235f1 Author: Harsh Jain Date: Sun Oct 8 13:37:22 2017 +0530 crypto: chelsio - Remove allocation of sg list to implement 2K limit of dsgl header Update DMA address index instead of allocating new sg list to impose 2k size limit for each entry. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 237 +++++++++++------------------------ drivers/crypto/chelsio/chcr_algo.h | 3 +- drivers/crypto/chelsio/chcr_core.h | 2 +- drivers/crypto/chelsio/chcr_crypto.h | 6 - 4 files changed, 76 insertions(+), 172 deletions(-) commit de1a00ac7da115ccafb4415364d484834638aa7f Author: Harsh Jain Date: Sun Oct 8 13:37:21 2017 +0530 crypto: chelsio - Use x8_ble gf multiplication to calculate IV. gf128mul_x8_ble() will reduce gf Multiplication iteration by 8. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 11 +++++++++-- drivers/crypto/chelsio/chcr_crypto.h | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) commit acfc587810bea08fdd62c9d5ed7cefe8be874a4f Author: Harsh Jain Date: Sun Oct 8 13:37:20 2017 +0530 crypto: gf128mul - The x8_ble multiplication functions It multiply GF(2^128) elements in the ble format. It will be used by chelsio driver to speed up gf multiplication. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu crypto/gf128mul.c | 13 +++++++++++++ include/crypto/gf128mul.h | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) commit 40cdbe1a1bd989b608f86dbdc5e83c6ba777961b Author: Yeshaswi M R Gowda Date: Sun Oct 8 13:37:19 2017 +0530 crypto: chelsio - Check error code with IS_ERR macro Check and return proper error code. Signed-off-by: Jitendra Lulla Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 570265bf9c8d6113d5745c8f01f5eb64e161ce3c Author: Yeshaswi M R Gowda Date: Sun Oct 8 13:37:18 2017 +0530 crypto: chelsio - Remove unused parameter Remove unused parameter sent to latest fw. Signed-off-by: Harsh Jain Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 43 +++++++++++++++----------------------- drivers/crypto/chelsio/chcr_algo.h | 12 +++++------ 2 files changed, 23 insertions(+), 32 deletions(-) commit e8b1844a7e59fc35c086358021d9d42b4ce3ee22 Author: Kees Cook Date: Tue Oct 24 01:27:23 2017 -0700 staging: rtl8723bs: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This performs some refactoring to remove needless wrapper functions, and adds a pointer back to the desired adapter. Cc: Greg Kroah-Hartman Cc: Shreeya Patel Cc: Hans de Goede Cc: Larry Finger Cc: Himanshu Jha Cc: Joe Perches Cc: Derek Robson Cc: Harsha Sharma Cc: Dan Carpenter Cc: "David S. Miller" Cc: Stephen Hemminger Cc: yuan linyu Cc: Johannes Berg Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme.c | 10 +++++-- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 15 +++++++--- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 23 +++++++-------- drivers/staging/rtl8723bs/core/rtw_recv.c | 15 ++++++---- drivers/staging/rtl8723bs/include/osdep_service.h | 2 -- .../rtl8723bs/include/osdep_service_linux.h | 11 ------- drivers/staging/rtl8723bs/include/rtw_mlme.h | 10 +++---- drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 8 ++--- drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 1 + drivers/staging/rtl8723bs/include/rtw_recv.h | 2 +- drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 34 ++++++++++++---------- drivers/staging/rtl8723bs/os_dep/osdep_service.c | 7 ----- drivers/staging/rtl8723bs/os_dep/recv_linux.c | 5 ++-- 13 files changed, 69 insertions(+), 74 deletions(-) commit 1663b8faad61439a4236e013a9146985494fe235 Author: Martyn Welch Date: Tue Oct 24 10:20:37 2017 +0200 staging: VME: Remove PIO2 driver The PIO2 device is (as far as I know) no longer manufactured. I no longer have access to the device and this seems unlikely to change. The only changes to this driver in a long time have been as a result of API changes else where. Time to remove it... Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman drivers/staging/vme/devices/Kconfig | 13 - drivers/staging/vme/devices/Makefile | 3 - drivers/staging/vme/devices/vme_pio2.h | 244 -------------- drivers/staging/vme/devices/vme_pio2_cntr.c | 71 ---- drivers/staging/vme/devices/vme_pio2_core.c | 493 ---------------------------- drivers/staging/vme/devices/vme_pio2_gpio.c | 220 ------------- 6 files changed, 1044 deletions(-) commit c40a45a465e9eab72cfdd3ab69d15cf8ef8b89c8 Author: Stanislaw Gruszka Date: Mon Oct 23 11:35:59 2017 +0200 staging: rtl8822be: fix wrong dma unmap len Patch fixes splat: r8822be 0000:04:00.0: DMA-API: device driver frees DMA memory with different size [device address=0x0000000078477000] [map size=4096 bytes] [unmap size=424 bytes] Call Trace: debug_dma_unmap_page+0xa5/0xb0 ? unmap_single+0x2f/0x40 _rtl8822be_send_bcn_or_cmd_packet+0x2c5/0x300 [r8822be] ? _rtl8822be_send_bcn_or_cmd_packet+0x2c5/0x300 [r8822be] rtl8822b_halmac_cb_write_data_rsvd_page+0x51/0xc0 [r8822be] _halmac_write_data_rsvd_page+0x22/0x30 [r8822be] halmac_download_rsvd_page_88xx+0xee/0x1f0 [r8822be] halmac_dlfw_to_mem_88xx+0x80/0x120 [r8822be] halmac_download_firmware_88xx.part.47+0x477/0x600 [r8822be] halmac_download_firmware_88xx+0x32/0x40 [r8822be] rtl_halmac_dlfw+0x70/0x120 [r8822be] rtl_halmac_init_hal+0x5f/0x1b0 [r8822be] rtl8822be_hw_init+0x8a2/0x1040 [r8822be] Signed-off-by: Stanislaw Gruszka Acked-by: Larry Finger Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/rtl8822be/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e477e940dad1836c6f6d23353e424665b9316b6e Author: Arnd Bergmann Date: Thu Nov 2 12:25:39 2017 +0100 drm/amdgpu/virt: don't dereference undefined 'module' struct Accessing the THIS_MODULE directly is only possible when modules are enabled, otherwise we get a build failure: drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c: In function 'amdgpu_virt_init_data_exchange': drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c:331:20: error: dereferencing pointer to incomplete type 'struct module' Further, THIS_MODULE is NULL when the driver is built-in, so the code would likely cause a NULL pointer dereference. This adds an #ifdef check to avoid the compile-time error, plus a NULL pointer check before dereferencing THIS_MODULE. It might be better to find a way to avoid using the module version altogether. Fixes: 2dc8f81e4f82 ("drm/amdgpu: SR-IOV data exchange between PF&VF") Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher Reviewed-by: Harry Wentland Reviewed-By: Xiangliang Yu drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 2 ++ 1 file changed, 2 insertions(+) commit a39e596baa07cb1dc19c2ead14c9fd2a30f22352 Author: Christoph Hellwig Date: Wed Nov 1 16:36:47 2017 +0100 xfs: support for synchronous DAX faults Return IOMAP_F_DIRTY from xfs_file_iomap_begin() when asked to prepare blocks for writing and the inode is pinned, and has dirty fields other than the timestamps. In __xfs_filemap_fault() we then detect this case and call dax_finish_sync_fault() to make sure all metadata is committed, and to insert the page table entry. Note that this will also dirty corresponding radix tree entry which is what we want - fsync(2) will still provide data integrity guarantees for applications not using userspace flushing. And applications using userspace flushing can avoid calling fsync(2) and thus avoid the performance overhead. [JK: Added VM_SYNC flag handling] Reviewed-by: Ross Zwisler Signed-off-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/xfs/xfs_file.c | 15 ++++++++++++++- fs/xfs/xfs_iomap.c | 5 +++++ 2 files changed, 19 insertions(+), 1 deletion(-) commit 7b565c9f965bac269cc6a1f25c819f77044abf9d Author: Jan Kara Date: Wed Nov 1 16:36:46 2017 +0100 xfs: Implement xfs_filemap_pfn_mkwrite() using __xfs_filemap_fault() xfs_filemap_pfn_mkwrite() duplicates a lot of __xfs_filemap_fault(). It will also need to handle flushing for synchronous page faults. So just make that function use __xfs_filemap_fault(). Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/xfs/xfs_file.c | 29 ++++------------------------- fs/xfs/xfs_trace.h | 2 -- 2 files changed, 4 insertions(+), 27 deletions(-) commit b8a6176c214cf9aa2679131ed7e4515cddaadc33 Author: Jan Kara Date: Wed Nov 1 16:36:45 2017 +0100 ext4: Support for synchronous DAX faults We return IOMAP_F_DIRTY flag from ext4_iomap_begin() when asked to prepare blocks for writing and the inode has some uncommitted metadata changes. In the fault handler ext4_dax_fault() we then detect this case (through VM_FAULT_NEEDDSYNC return value) and call helper dax_finish_sync_fault() to flush metadata changes and insert page table entry. Note that this will also dirty corresponding radix tree entry which is what we want - fsync(2) will still provide data integrity guarantees for applications not using userspace flushing. And applications using userspace flushing can avoid calling fsync(2) and thus avoid the performance overhead. Reviewed-by: Ross Zwisler Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/ext4/file.c | 15 ++++++++++++++- fs/ext4/inode.c | 15 +++++++++++++++ fs/jbd2/journal.c | 17 +++++++++++++++++ include/linux/jbd2.h | 1 + 4 files changed, 47 insertions(+), 1 deletion(-) commit 497f6926d880c57f65bf7c3f1086526fa774c55e Author: Jan Kara Date: Wed Nov 1 16:36:44 2017 +0100 ext4: Simplify error handling in ext4_dax_huge_fault() If transaction starting fails, just bail out of the function immediately instead of checking for that condition throughout the function. Reviewed-by: Ross Zwisler Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/ext4/file.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 71eab6dfd91eabf06fe782a590c07e8a0795f5ea Author: Jan Kara Date: Wed Nov 1 16:36:43 2017 +0100 dax: Implement dax_finish_sync_fault() Implement a function that filesystems can call to finish handling of synchronous page faults. It takes care of syncing appropriare file range and insertion of page table entry. Reviewed-by: Ross Zwisler Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/dax.c | 83 +++++++++++++++++++++++++++++++++++++++++++ include/linux/dax.h | 2 ++ include/trace/events/fs_dax.h | 2 ++ 3 files changed, 87 insertions(+) commit caa51d26f85c248f1c4f43a870ad3ef84bf9eb8f Author: Jan Kara Date: Wed Nov 1 16:36:42 2017 +0100 dax, iomap: Add support for synchronous faults Add a flag to iomap interface informing the caller that inode needs fdstasync(2) for returned extent to become persistent and use it in DAX fault code so that we don't map such extents into page tables immediately. Instead we propagate the information that fdatasync(2) is necessary from dax_iomap_fault() with a new VM_FAULT_NEEDDSYNC flag. Filesystem fault handler is then responsible for calling fdatasync(2) and inserting pfn into page tables. Reviewed-by: Ross Zwisler Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/dax.c | 39 +++++++++++++++++++++++++++++++++++++-- include/linux/iomap.h | 5 +++++ include/linux/mm.h | 6 +++++- 3 files changed, 47 insertions(+), 3 deletions(-) commit b6fb293f2497a9841d94f6b57bd2bb2cd222da43 Author: Jan Kara Date: Wed Nov 1 16:36:41 2017 +0100 mm: Define MAP_SYNC and VM_SYNC flags Define new MAP_SYNC flag and corresponding VMA VM_SYNC flag. As the MAP_SYNC flag is not part of LEGACY_MAP_MASK, currently it will be refused by all MAP_SHARED_VALIDATE map attempts and silently ignored for everything else. Reviewed-by: Ross Zwisler Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/proc/task_mmu.c | 1 + include/linux/mm.h | 1 + include/linux/mman.h | 8 ++++++-- include/uapi/asm-generic/mman.h | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) commit f5b7b74876cff5664ea8b2ef7f002c54cd6e7c90 Author: Jan Kara Date: Wed Nov 1 16:36:40 2017 +0100 dax: Allow tuning whether dax_insert_mapping_entry() dirties entry Currently we dirty radix tree entry whenever dax_insert_mapping_entry() gets called for a write fault. With synchronous page faults we would like to insert clean radix tree entry and dirty it only once we call fdatasync() and update page tables to save some unnecessary cache flushing. Add 'dirty' argument to dax_insert_mapping_entry() for that. Reviewed-by: Ross Zwisler Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/dax.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 9a0dd42251439de635088b97533109a935864a84 Author: Jan Kara Date: Wed Nov 1 16:36:39 2017 +0100 dax: Allow dax_iomap_fault() to return pfn For synchronous page fault dax_iomap_fault() will need to return PFN which will then need to be inserted into page tables after fsync() completes. Add necessary parameter to dax_iomap_fault(). Reviewed-by: Christoph Hellwig Reviewed-by: Ross Zwisler Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/dax.c | 13 +++++++------ fs/ext2/file.c | 2 +- fs/ext4/file.c | 2 +- fs/xfs/xfs_file.c | 4 ++-- include/linux/dax.h | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) commit cec04e8c825eaa5a4bb1a3ce0d3784628e965196 Author: Jan Kara Date: Wed Nov 1 16:36:38 2017 +0100 dax: Fix comment describing dax_iomap_fault() Add missing argument description. Reviewed-by: Christoph Hellwig Reviewed-by: Ross Zwisler Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/dax.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 302a5e312b3a106fec49ba08da3f6545c9b7ee18 Author: Jan Kara Date: Wed Nov 1 16:36:37 2017 +0100 dax: Inline dax_pmd_insert_mapping() into the callsite dax_pmd_insert_mapping() has only one callsite and we will need to further fine tune what it does for synchronous faults. Just inline it into the callsite so that we don't have to pass awkward bools around. Reviewed-by: Christoph Hellwig Reviewed-by: Ross Zwisler Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/dax.c | 47 +++++++++++++++++-------------------------- include/trace/events/fs_dax.h | 1 - 2 files changed, 19 insertions(+), 29 deletions(-) commit 1b5a1cb21e0cdfb001050c76dc31039cdece1a63 Author: Jan Kara Date: Wed Nov 1 16:36:36 2017 +0100 dax: Inline dax_insert_mapping() into the callsite dax_insert_mapping() has only one callsite and we will need to further fine tune what it does for synchronous faults. Just inline it into the callsite so that we don't have to pass awkward bools around. Reviewed-by: Christoph Hellwig Reviewed-by: Ross Zwisler Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/dax.c | 46 +++++++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 27 deletions(-) commit d2c43ef13327478b299db0f58193495367c6d4ae Author: Jan Kara Date: Wed Nov 1 16:36:35 2017 +0100 dax: Create local variable for vmf->flags & FAULT_FLAG_WRITE test There are already two users and more are coming. Reviewed-by: Christoph Hellwig Reviewed-by: Ross Zwisler Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/dax.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a0987ad5c576626fdb40547f5ac99b4f90608dda Author: Jan Kara Date: Wed Nov 1 16:36:34 2017 +0100 dax: Create local variable for VMA in dax_iomap_pte_fault() There are already two users and more are coming. Reviewed-by: Christoph Hellwig Reviewed-by: Ross Zwisler Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/dax.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5e161e4066d3ebeaff95a4b979b42f8bf00494d5 Author: Jan Kara Date: Wed Nov 1 16:36:33 2017 +0100 dax: Factor out getting of pfn out of iomap Factor out code to get pfn out of iomap that is shared between PTE and PMD fault path. Reviewed-by: Christoph Hellwig Reviewed-by: Ross Zwisler Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/dax.c | 83 +++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 43 insertions(+), 40 deletions(-) commit 31a6f1a6e5a4a26040b67d8fa4256539b36f5893 Author: Jan Kara Date: Wed Nov 1 16:36:32 2017 +0100 dax: Simplify arguments of dax_insert_mapping() dax_insert_mapping() has lots of arguments and a lot of them is actuall duplicated by passing vm_fault structure as well. Change the function to take the same arguments as dax_pmd_insert_mapping(). Reviewed-by: Ross Zwisler Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Dan Williams fs/dax.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit d81b8a722f691a3907eb4a6df410ab517ba5bfcc Author: Jan Kara Date: Wed Nov 1 16:36:31 2017 +0100 mm: Remove VM_FAULT_HWPOISON_LARGE_MASK It is unused. Reviewed-by: Ross Zwisler Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara Signed-off-by: Dan Williams include/linux/mm.h | 2 -- 1 file changed, 2 deletions(-) commit 1c9725974074a047f6080eecc62c50a8e840d050 Author: Dan Williams Date: Wed Nov 1 16:36:30 2017 +0100 mm: introduce MAP_SHARED_VALIDATE, a mechanism to safely define new mmap flags The mmap(2) syscall suffers from the ABI anti-pattern of not validating unknown flags. However, proposals like MAP_SYNC need a mechanism to define new behavior that is known to fail on older kernels without the support. Define a new MAP_SHARED_VALIDATE flag pattern that is guaranteed to fail on all legacy mmap implementations. It is worth noting that the original proposal was for a standalone MAP_VALIDATE flag. However, when that could not be supported by all archs Linus observed: I see why you *think* you want a bitmap. You think you want a bitmap because you want to make MAP_VALIDATE be part of MAP_SYNC etc, so that people can do ret = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_SYNC, fd, 0); and "know" that MAP_SYNC actually takes. And I'm saying that whole wish is bogus. You're fundamentally depending on special semantics, just make it explicit. It's already not portable, so don't try to make it so. Rename that MAP_VALIDATE as MAP_SHARED_VALIDATE, make it have a value of 0x3, and make people do ret = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED_VALIDATE | MAP_SYNC, fd, 0); and then the kernel side is easier too (none of that random garbage playing games with looking at the "MAP_VALIDATE bit", but just another case statement in that map type thing. Boom. Done. Similar to ->fallocate() we also want the ability to validate the support for new flags on a per ->mmap() 'struct file_operations' instance basis. Towards that end arrange for flags to be generically validated against a mmap_supported_flags exported by 'struct file_operations'. By default all existing flags are implicitly supported, but new flags require MAP_SHARED_VALIDATE and per-instance-opt-in. Cc: Jan Kara Cc: Arnd Bergmann Cc: Andy Lutomirski Cc: Andrew Morton Suggested-by: Christoph Hellwig Suggested-by: Linus Torvalds Reviewed-by: Ross Zwisler Signed-off-by: Dan Williams Signed-off-by: Jan Kara Signed-off-by: Dan Williams arch/alpha/include/uapi/asm/mman.h | 1 + arch/mips/include/uapi/asm/mman.h | 1 + arch/parisc/include/uapi/asm/mman.h | 1 + arch/xtensa/include/uapi/asm/mman.h | 1 + include/linux/fs.h | 1 + include/linux/mman.h | 39 ++++++++++++++++++++++++++++ include/uapi/asm-generic/mman-common.h | 1 + mm/mmap.c | 15 +++++++++++ tools/include/uapi/asm-generic/mman-common.h | 1 + 9 files changed, 61 insertions(+) commit 592e254502041f953e84d091eae2c68cba04c10b Author: Jan Kara Date: Fri Nov 3 12:21:21 2017 +0100 mm: Handle 0 flags in _calc_vm_trans() macro _calc_vm_trans() does not handle the situation when some of the passed flags are 0 (which can happen if these VM flags do not make sense for the architecture). Improve the _calc_vm_trans() macro to return 0 in such situation. Since all passed flags are constant, this does not add any runtime overhead. Signed-off-by: Jan Kara Signed-off-by: Dan Williams include/linux/mman.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f1601113ddc0339a745e702f4fb1ca37d4875e65 Author: Rameshwar Prasad Sahu Date: Thu Nov 2 16:31:07 2017 +0530 ata: fixes kernel crash while tracing ata_eh_link_autopsy event When tracing ata link error event, the kernel crashes when the disk is removed due to NULL pointer access by trace_ata_eh_link_autopsy API. This occurs as the dev is NULL when the disk disappeared. This patch fixes this crash by calling trace_ata_eh_link_autopsy only if "dev" is not NULL. v2 changes: Removed direct passing "link" pointer instead of "dev" in trace API. Signed-off-by: Rameshwar Prasad Sahu Signed-off-by: Tejun Heo Fixes: 255c03d15a29 ("libata: Add tracepoints") Cc: stable@vger.kernel.org # v4.1+ drivers/ata/libata-eh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a622c641665c32a879348efb2abc389527479ee4 Author: Ladislav Michl Date: Wed Oct 25 20:42:57 2017 +0200 memory: omap-gpmc: Remove deprecated gpmc_update_nand_reg() Deprecated gpmc_update_nand_reg() is no longer used, remove. Signed-off-by: Ladislav Michl Signed-off-by: Roger Quadros drivers/memory/omap-gpmc.c | 53 +++++++++++++++++++++------------------------- include/linux/omap-gpmc.h | 12 ----------- 2 files changed, 24 insertions(+), 41 deletions(-) commit 6ee79b6ebf6613f1c5bf2be0c3dca4e51817f2ca Merge: aa5fbf0 4620940 Author: David S. Miller Date: Fri Nov 3 21:57:35 2017 +0900 Merge branch 'net-mini_Qdisc' Jiri Pirko says: ==================== net: core: introduce mini_Qdisc and eliminate usage of tp->q for clsact fastpath This patchset's main patch is patch number 2. It carries the description. Patch 1 is just a dependency. --- v3->v4: - rebased to be applicable on top of the current net-next v2->v3: - Using head change callback to replace miniq pointer every time tp head changes. This eliminates one rcu dereference and makes the claim "without added overhead" valid. v1->v2: - Use dev instead of skb->dev in sch_handle_egress as pointed out by Daniel - Fixed synchronize_rcu_bh() in mini_qdisc_disable and commented ==================== Signed-off-by: David S. Miller commit 46209401f8f6116bd0b2c2d14a63958e83ffca0b Author: Jiri Pirko Date: Fri Nov 3 11:46:25 2017 +0100 net: core: introduce mini_Qdisc and eliminate usage of tp->q for clsact fastpath In sch_handle_egress and sch_handle_ingress tp->q is used only in order to update stats. So stats and filter list are the only things that are needed in clsact qdisc fastpath processing. Introduce new mini_Qdisc struct to hold those items. Also, introduce a helper to swap the mini_Qdisc structures in case filter list head changes. This removes need for tp->q usage without added overhead. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/linux/netdevice.h | 9 ++++++--- include/net/sch_generic.h | 32 ++++++++++++++++++++++++++++++++ net/core/dev.c | 21 +++++++++++---------- net/sched/sch_generic.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ net/sched/sch_ingress.c | 19 ++++++++++++++----- 5 files changed, 109 insertions(+), 18 deletions(-) commit c7eb7d7230509ec862d4144f7a831f995bc5d028 Author: Jiri Pirko Date: Fri Nov 3 11:46:24 2017 +0100 net: sched: introduce chain_head_change callback Add a callback that is to be called whenever head of the chain changes. Also provide a callback for the default case when the caller gets a block using non-extended getter. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/pkt_cls.h | 14 ++++++------ include/net/sch_generic.h | 5 ++++- net/sched/cls_api.c | 54 ++++++++++++++++++++++++++++------------------- net/sched/sch_ingress.c | 36 +++++++++++++++++-------------- 4 files changed, 62 insertions(+), 47 deletions(-) commit aa5fbf07541bbec0d79f4b32415aff2233971853 Merge: 739c596 439adf8 Author: David S. Miller Date: Fri Nov 3 21:36:50 2017 +0900 Merge branch 'hns3-ethtool-ksettings' Lipeng says: ==================== net: hns3: support set_link_ksettings and for nway_reset ethtool command This patch-set adds support for set_link_ksettings && for nway_resets ethtool command and fixes some related ethtool bugs. 1, patch[4/6] adds support for ethtool_ops.set_link_ksettings. 2, patch[5/6] adds support ethtool_ops.for nway_reset. 3, patch[1/6,2/6,3/6,6/6] fix some bugs for getting port information by ethtool command(ethtool ethx). ==================== Signed-off-by: David S. Miller commit 439adf885e6dd3b2a64941a167b4c18d3728c6dc Author: Fuyun Liang Date: Fri Nov 3 12:18:30 2017 +0800 net: hns3: fix a bug for phy supported feature initialization This patch fixes a bug for phy supported feature initialization. Currently, the value of phydev->supported is initialized by kernel. So it includes many features that we do not support, such as SUPPORTED_FIBRE and SUPPORTED_BNC. This patch fixes it. Fixes: 256727d (net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC) Signed-off-by: Fuyun Liang Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d63671d27cd1cc1f93f5fcb86eaeee57c8190d46 Author: Fuyun Liang Date: Fri Nov 3 12:18:29 2017 +0800 net: hns3: add support for nway_reset This patch adds nway_reset support for ethtool cmd. Signed-off-by: Fuyun Liang Signed-off-by: Lipeng Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 80cb5f3d97aa22ce3aac2737da03d4679722c60f Author: Fuyun Liang Date: Fri Nov 3 12:18:28 2017 +0800 net: hns3: add support for set_link_ksettings This patch adds set_link_ksettings support for ethtool cmd. Signed-off-by: Fuyun Liang Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 3e1a8f10a1375133ea4a943f21138f00b4d06dc2 Author: Fuyun Liang Date: Fri Nov 3 12:18:27 2017 +0800 net: hns3: fix a bug in hns3_driv_to_eth_caps The value of link_modes.advertising and the value of link_modes.supported is initialized to zero every time in for loop in hns3_driv_to_eth_caps(). But we just want to set specified bit for them. Initialization is unnecessary. This patch fixes it. Fixes: 496d03e (net: hns3: Add Ethtool support to HNS3 driver) Signed-off-by: Fuyun Liang Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 2b39cabb2a283cea0c3d96d9370575371726164f Author: Fuyun Liang Date: Fri Nov 3 12:18:26 2017 +0800 net: hns3: fix for getting advertised_caps in hns3_get_link_ksettings This patch fixes a bug for ethtool's get_link_ksettings(). The advertising for autoneg is always added to advertised_caps whether autoneg is enable or disable. This patch fixes it. Fixes: 496d03e (net: hns3: Add Ethtool support to HNS3 driver) Signed-off-by: Fuyun Liang Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 3 +++ 1 file changed, 3 insertions(+) commit 16b5e50147c21edef7133f204c43465f0c03c3f5 Author: Fuyun Liang Date: Fri Nov 3 12:18:25 2017 +0800 net: hns3: fix for getting autoneg in hns3_get_link_ksettings This patch fixes a bug for ethtool's get_link_ksettings(). When phy exists, we should get autoneg from phy rather than from mac. Because the value of mac.autoneg is invalid when phy exists. Fixes: 496d03e (net: hns3: Add Ethtool support to HNS3 driver) Signed-off-by: Fuyun Liang Signed-off-by: Lipeng Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 739c5960a4142585f804a06c6d06b1816cd7d214 Merge: 8f918d3 b153cbc Author: David S. Miller Date: Fri Nov 3 21:33:31 2017 +0900 Merge branch 'bnxt_en-next' Michael Chan says: ==================== bnxt_en: Fix IRQ coalescing regressions. There was a typo and missing guard-rail against illegal values in the recent code clean up. All reported by Andy Gospodarek. ==================== Signed-off-by: David S. Miller commit b153cbc507946f52d5aa687fd64f45d82cb36a3b Author: Michael Chan Date: Fri Nov 3 03:32:39 2017 -0400 bnxt_en: Fix IRQ coalescing regression. Recent IRQ coalescing clean up has removed a guard-rail for the max DMA buffer coalescing value. This is a 6-bit value and must not be 0. We already have a check for 0 but 64 is equivalent to 0 and will cause non-stop interrupts. Fix it by adding the proper check. Fixes: f8503969d27b ("bnxt_en: Refactor and simplify coalescing code.") Reported-by: Andy Gospodarek 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 de4a10ef6eff0eb0ced97a39dc3edd0d3101b6ed Author: Andy Gospodarek Date: Fri Nov 3 03:32:38 2017 -0400 bnxt_en: fix typo in bnxt_set_coalesce Recent refactoring of coalesce settings contained a typo that prevents receive settings from being set properly. Fixes: 18775aa8a91f ("bnxt_en: Reorganize the coalescing parameters.") Signed-off-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f918d3ff4a1283a1693afe2b4c8e1844674ca15 Author: Cong Wang Date: Thu Nov 2 17:32:08 2017 -0700 net_sched: check NULL in tcf_block_put() Callers of tcf_block_put() could pass NULL so we can't use block->q before checking if block is NULL or not. tcf_block_put_ext() callers are fine, it is always non-NULL. Fixes: 8c4083b30e56 ("net: sched: add block bind/unbind notif. and extended block_get/put") Reported-by: Dave Taht Cc: Jiri Pirko Signed-off-by: Cong Wang Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_api.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f3c3a0b66ab514345f7a7f8f41afc9dd5025d712 Author: Arnd Bergmann Date: Thu Nov 2 15:31:10 2017 +0100 staging: rtl8723bs: remove unused variables A cleanup patch removed the only user of two local variables: drivers/staging/rtl8723bs/hal/hal_btcoex.c: In function 'hal_btcoex_Initialize': drivers/staging/rtl8723bs/hal/hal_btcoex.c:1415:5: error: unused variable 'ret2' [-Werror=unused-variable] drivers/staging/rtl8723bs/hal/hal_btcoex.c:1414:5: error: unused variable 'ret1' [-Werror=unused-variable] This removes the declarations as well. Fixes: 95b3b4238581 ("staging: rtl8723bs: remove ternary operators in assignmet statments") Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 ---- 1 file changed, 4 deletions(-) commit 8563a49c4382adcb9b4ce21da46bd0067b90db31 Author: Arnd Bergmann Date: Thu Nov 2 15:32:51 2017 +0100 staging: greybus: remove unused kfifo_ts As of commit 8e1d6c336d74 ("greybus: loopback: drop bus aggregate calculation"), nothing ever reads from kfifo_ts, so there is no reason to write to it or even allocate it any more. Signed-off-by: Arnd Bergmann Reviewed-by: Viresh Kumar Reviewed-by: Bryan O'Donoghue Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/loopback.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) commit d771d62e3139986cc62d2067b37ebbe33a6d3b08 Author: Arnd Bergmann Date: Wed Oct 18 10:04:28 2017 +0200 soc: qcom: remove unused label The newly added driver comes with a harmless warning: drivers/soc/qcom/rmtfs_mem.c: In function 'qcom_rmtfs_mem_probe': drivers/soc/qcom/rmtfs_mem.c:211:1: error: label 'remove_cdev' defined but not used [-Werror=unused-label] This removes the unused label to avoid the warning. Fixes: 702baebb8e00 ("soc: qcom: Remote filesystem memory driver") Signed-off-by: Arnd Bergmann drivers/soc/qcom/rmtfs_mem.c | 2 -- 1 file changed, 2 deletions(-) commit d125bffcefb290743e4eac536886dba689edf1eb Author: Julien Thierry Date: Fri Nov 3 11:44:16 2017 +0000 arm64: Fix static use of function graph Function graph does not work currently when CONFIG_DYNAMIC_TRACE is not set. This is because ftrace_function_trace is not always set to ftrace_stub when function_graph is in use. Do not skip checking of graph tracer functions when ftrace_function_trace is set. Signed-off-by: Julien Thierry Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Acked-by: Steven Rostedt (VMware) Reviewed-by: AKASHI Takahiro Signed-off-by: Will Deacon arch/arm64/kernel/entry-ftrace.S | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit ec7ed7708e009e046d1e16ed53ba4d6048748d07 Author: Angelo Dureghello Date: Sat Oct 28 00:23:01 2017 +0200 spi: spi-fsl-dspi: enabling Coldfire mcf5441x dspi Signed-off-by: Angelo Dureghello Signed-off-by: Mark Brown drivers/spi/Kconfig | 2 +- drivers/spi/spi-fsl-dspi.c | 66 +++++++++++++++++++++++++++------------- include/linux/spi/spi-fsl-dspi.h | 31 +++++++++++++++++++ 3 files changed, 77 insertions(+), 22 deletions(-) commit 455e027f33a03ddffe82c36f430a4d173e840b75 Author: Hans de Goede Date: Wed Oct 11 11:41:21 2017 +0200 platform/x86: intel_cht_int33fe: Update fusb302 type string, add properties The fusb302 driver as merged in staging uses "typec_fusb302" as i2c-id rather then just "fusb302" and needs us to set a number of device- properties, adjust the intel_cht_int33fe driver accordingly. One of the properties set is max-snk-mv which makes the fusb302 driver negotiate up to 12V charging voltage, which is a bad idea on boards which are not setup to handle this, so this commit also adds 2 extra sanity checks to make sure that the expected Whiskey Cove PMIC + TI bq24292i charger combo, which can handle 12V, is present. Signed-off-by: Hans de Goede Acked-by: Andy Shevchenko Signed-off-by: Andy Shevchenko drivers/platform/x86/Kconfig | 6 ++++- drivers/platform/x86/intel_cht_int33fe.c | 44 +++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) commit 7d9a6ef558f6ff375aab9e29f08124cb0daa9bc5 Merge: 3fcf2b2 0224d45 Author: Andy Shevchenko Date: Fri Nov 3 13:50:41 2017 +0200 Merge branch 'i2c/cht-wc-fusb302-immutable' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c/cht-wc-fusb302-immutable immutable branch from Wolfram Sang: as discussed before, here is the immutable branch for the i2c-cht-wc driver, so you can safely apply Hans' patch [1] "platform/x86: intel_cht_int33fe: Update fusb302 type string, add properties" on top of this. [1] http://patchwork.ozlabs.org/patch/824314/ commit 7a6038f28934166031bea2f8a150b4c1cbaab46f Author: Arvind Yadav Date: Wed Oct 25 21:27:48 2017 +0530 staging: rtl8723bs: Fix space before '[' error. Fix checkpatch.pl error: ERROR: space prohibited before open square bracket '['. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/rtw_proc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2f9115820982df7a529f3375c94db3bdc1b4fc41 Author: Kees Cook Date: Tue Oct 24 01:26:29 2017 -0700 staging: rtlwifi: Remove unused variable This removes an unused variable to silence the associated build warning. Fixes: f8af6a323368 ("staging: rtlwifi: Convert timers to use timer_setup()") Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/base.c | 1 - 1 file changed, 1 deletion(-) commit 8a81f7491655f1fd9398c63048700351cb713471 Author: Kees Cook Date: Tue Oct 24 01:26:09 2017 -0700 staging: ks7010: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Greg Kroah-Hartman Cc: "Tobin C. Harding" Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 313144c1bcd6dd22f2375a602a8cb6efa759c8cd Author: Woohyung Jeon Date: Mon Oct 23 17:33:24 2017 +0900 Staging: rtlwifi: pci: fixed a coding style issue Fixed a coding style issue. There was a prohibited space. Removed. Signed-off-by: Woohyung-Jeon Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06eeebe6f7f9058c592857c8ec9f882ed11ba0e7 Author: Sidong Yang Date: Sun Oct 22 05:52:13 2017 +0000 staging: rtl8723bs: Fix checkpatch.pl error Replaces spaces to tabs for indent. Signed-off-by: Sidong Yang Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 123c0aab0050cd0e07ce18e453389fbbb0a5a425 Author: Colin Ian King Date: Fri Oct 20 20:40:24 2017 +0200 staging: rtl8188eu: avoid a null dereference on pmlmepriv There is a check on pmlmepriv before dereferencing it when vfree'ing pmlmepriv->free_bss_buf however the previous call to rtw_free_mlme_priv_ie_data deferences pmlmepriv causing a null pointer deference if it is null. Avoid this by also calling rtw_free_mlme_priv_ie_data if the pointer is non-null. Detected by CoverityScan, CID#1230262 ("Dereference before null check") Fixes: 7b464c9fa5cc ("staging: r8188eu: Add files for new driver - part 4") Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 28aef24d726f8d503fde24ccf8a14b214355cfb5 Author: oder_chiou@realtek.com Date: Thu Nov 2 19:21:16 2017 +0800 ASoC: rt5514: The ACPI also should use the function rt5514_parse_dp() The patch fixed that the ACPI cannot access the device property from the function rt5514_parse_dp(). Signed-off-by: Oder Chiou Signed-off-by: Mark Brown sound/soc/codecs/rt5514.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f25637a6b89e59eddf79f6df39b23e202753f555 Author: Mark Brown Date: Fri Nov 3 12:38:04 2017 +0100 regmap: Add a config option for hwspinlock Unlike other lock types hwspinlocks are optional and can be built modular so we can't use them unconditionally in regmap so add a config option that drivers that want to use hwspinlocks with regmap can select which will ensure that hwspinlock is built in. Signed-off-by: Mark Brown drivers/base/regmap/Kconfig | 4 ++++ drivers/base/regmap/regmap.c | 7 +++++++ 2 files changed, 11 insertions(+) commit 3fcf2b2a2529e268c537d8ad9dac5987ebc8a2f7 Author: Sergey Tshovrebov Date: Fri Oct 27 12:27:07 2017 +0200 platform/x86: silead_dmi: Add entry for the Digma e200 tablet Add touchscreen platform data for the Digma e200 tablet. Signed-off-by: Sergey Tshovrebov Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko drivers/platform/x86/silead_dmi.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 5c24c05efa4800bbe42de0ad3e752c5fd75fa351 Author: Hans de Goede Date: Thu Oct 19 09:44:14 2017 +0200 platform/x86: silead_dmi: Fix GP-electronic T701 entry The GP-electronic T701 has its LCD panel mounted upside-down, initially my plan was to fix this by transparently rotating the image in the i915 driver (my "drm/i915: Deal with upside-down mounted LCD" patch), but that approach has been rejected instead the kernel will now export a "panel orientation" property on the drm-connector for the panel and let userspace deal with it. But userspace expects the touchscreen coordinates to match the panel coordinates *before* applying any rotation, so now that we no longer hide the upside-down-ness of the LCD panel from userspace the coordinates being generated are wrong and we need to apply a rotation of 180 degrees to the coordinates to fix this. Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko drivers/platform/x86/silead_dmi.c | 2 ++ 1 file changed, 2 insertions(+) commit f6c7b8031d7e177c837c23d1065204b697fb54b7 Author: Hans de Goede Date: Mon Oct 30 14:07:38 2017 +0100 platform/x86: peaq-wmi: Remove unnecessary checks from peaq_wmi_exit peaq_wmi_exit will only ever get called if peaq_wmi_init succeeds, so there is no need to repeat the checks from peaq_wmi_init. Suggested-by: Andy Shevchenko Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko drivers/platform/x86/peaq-wmi.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit d6fa71f1c003fb2bc824276bb424a4171f9a717f Author: Hans de Goede Date: Mon Oct 30 14:07:37 2017 +0100 platform/x86: peaq_wmi: Fix missing terminating entry for peaq_dmi_table Add missing terminating entry to peaq_dmi_table. Fixes: 3b95206110a2 ("platform/x86: peaq-wmi: Add DMI check before ...") Cc: stable@vger.kernel.org Reported-by: Fengguang Wu Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko drivers/platform/x86/peaq-wmi.c | 1 + 1 file changed, 1 insertion(+) commit 42bdd7061a6e24d7b21d3d21973615fecef544ef Author: Lucas Stach Date: Mon Oct 16 12:27:58 2017 +0200 spi: fix IDR collision on systems with both fixed and dynamic SPI bus numbers On systems where some controllers get a dynamic ID assigned and some have a fixed number from DT, the current implemention might run into an IDR collision if the dynamic controllers gets probed first and get an IDR number, which is later requested by the controller with the fixed numbering. When this happens the fixed controller will fail to register with the SPI core. Fix this by skipping all known alias numbers when assigning the dynamic IDs. Fixes: 9b61e302210e (spi: Pick spi bus number from Linux idr or spi alias) Signed-off-by: Lucas Stach Signed-off-by: Mark Brown drivers/spi/spi.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 57b36f7fcb39c5eae8c1f463699f747af69643ba Author: Ihab Zhaika Date: Tue Oct 24 17:04:24 2017 +0300 iwlwifi: add new cards for a000 series add four new PCI ID'S for a000 series Signed-off-by: Ihab Zhaika Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7cddbef445631109bd530ce7cdacaa04ff0a62d1 Author: Ihab Zhaika Date: Tue Oct 24 17:38:12 2017 +0300 iwlwifi: add new cards for 8265 series add two new PCI ID'S for 8265 series Signed-off-by: Ihab Zhaika Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 ++ 1 file changed, 2 insertions(+) commit d669fc2d42a43ee0abcf2396df6e9c5a124aa984 Author: Ihab Zhaika Date: Tue Oct 24 17:36:43 2017 +0300 iwlwifi: add new cards for 8260 series add three new PCI ID'S for 8260 series Signed-off-by: Ihab Zhaika Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 3 +++ 1 file changed, 3 insertions(+) commit 364a1ab91df160f96da5f8d9f778cfbafd5f6d81 Author: Shahar S Matityahu Date: Wed Oct 25 11:40:24 2017 +0300 iwlwifi: drop RX frames during hardware restart In case of a hardware restart the BA session data in HW is lost so the reorder buffer simply passes the frames to mac80211 as is as there is no NSSN set. Instead, we will drop these frames before they reach the reorder buffer. mac80211 drops such frames anyway, but we shouldn't rely on that. In addition it saves some processing time Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 3 +++ 1 file changed, 3 insertions(+) commit 8cef5344b5f24883c97180c15e17b35d46fc4f37 Author: Kees Cook Date: Tue Oct 24 02:29:37 2017 -0700 iwlwifi: mvm: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. The RCU lifetime on baid_data is unclear, so this adds a direct copy of the rcu_ptr passed to the original callback. It may be possible to improve this to just use baid_data->mvm->baid_map[baid_data->baid] instead. Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: Sara Sharon Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 ++- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 18 +++++++++--------- 3 files changed, 13 insertions(+), 12 deletions(-) commit 309c4848c0481f71f4cb20290e6f5bded1e54131 Author: Luca Coelho Date: Tue Oct 24 22:04:15 2017 +0300 iwlwifi: mvm: hold mutex when flushing in iwl_mvm_flush_no_vif() The iwl_mvm_flush_tx_path() function sends a synchronous command to the firmware. When doing that, we must hold the mutex. The iwl_mvm_flush_no_vif() function was mistakenly not holding the mutex. Fix it. Fixes: 6110d9e5bdd1 ("iwlwifi: mvm: Flush non STA TX queues") Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 06195639c66d80d21146d0e982f7fc94406ed331 Author: Sara Sharon Date: Tue Sep 12 10:52:53 2017 +0300 iwlwifi: mvm: add missing implementation of flush for a000 devices In the mac flush flow, we should flush all existing queues. Since FW API for a000 devices is flush per RA-TID, simply flush all stations with all tids. From FW perspective, asking to flush a TID that doesn't have a queue is valid, so we can just set all bits in the TID mask. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 435d0827fe1f3eb7c47f3090c51d55f9dc729d94 Author: Sara Sharon Date: Tue Sep 12 11:06:24 2017 +0300 iwlwifi: mvm: refactor iwl_mvm_flush_no_vif This function is very indented and hard to read. Refactor it. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 40 +++++++++++------------ 1 file changed, 19 insertions(+), 21 deletions(-) commit cb8550e15bd1c90ebce9444769a856b799340320 Author: Sara Sharon Date: Thu Oct 19 08:46:50 2017 +0300 iwlwifi: fix multi queue notification for a000 devices Currently we return early from sync_rx_queues for a000 devices. This may cause, in case of a non-empty reorder buffer, a warning later on since the RX queue isn't getting the notification to empty it. A better approach would be to send the notification for the default queue only. Do this hard coded for now, until we will have the API to enable multi queue for a000 devices. Fixes: bc0294696456 ("iwlwifi: mvm: disable RX queue notification for a000 devices") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit fb12777ab59b4c8319c931970e28a5406d1aa702 Author: Kirtika Ruchandani Date: Sun Oct 8 14:20:42 2017 -0700 iwlwifi: Add more call-sites for pcie reg dumper Commit a6d24fad00d9 ("iwlwifi: pcie: dump registers when HW becomes inaccessible") added a function to dump pcie config registers and memory mapped registers on a failure. It is currently only accessible within trans.c. Add it to struct iwl_trans_ops, so that failure cases in other files can call it. While there, add a call to this function from iwl_pcie_load_firmware_chunk in pcie/tx.c, since this is a common failure case seen on some platforms. Signed-off-by: Kirtika Ruchandani [modified the commit message slightly] Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 11 +++++++++++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 7 ++++--- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 1 + 3 files changed, 16 insertions(+), 3 deletions(-) commit 4ae827ffc173dc969c67e4f8b35d17a44f76ed40 Author: Emmanuel Grumbach Date: Tue Oct 17 14:11:16 2017 +0300 iwlwifi: remove host assisted paging This was used for internal devices that are now deprecated. All the currently existing devices can do paging without any help from the host. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/api/paging.h | 24 ----- drivers/net/wireless/intel/iwlwifi/fw/paging.c | 103 +++------------------ drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 14 --- 3 files changed, 12 insertions(+), 129 deletions(-) commit fb7eba711d2169fbd40bc487c191f360332e8b22 Author: Emmanuel Grumbach Date: Tue Oct 17 10:30:24 2017 +0300 iwlwifi: remove dead code for internal devices only We had a bunch of code that was relevant for internal devices only. Those devices are now being depreceated. Kill all the now unneeded code. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/cfg/8000.c | 51 ------------------------- drivers/net/wireless/intel/iwlwifi/fw/file.h | 2 +- drivers/net/wireless/intel/iwlwifi/fw/img.h | 8 ---- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 3 -- drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 2 - drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 6 --- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 17 --------- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 15 -------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 - drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 - 10 files changed, 1 insertion(+), 105 deletions(-) commit 14a1f85bdc27283898358af09ee506d7f3344d3c Author: Sara Sharon Date: Tue Oct 17 12:06:52 2017 +0300 iwlwifi: mvm: improve latency when there is a reorder timeout When there is a reorder timeout, we may get to a situation where we have the timeout latency for all the next 64 frames. This happens since NSSN is behind for a while, and the driver won't release the frames, since it is not allowed by NSSN. As a result the frame is stored in the reorder buffer although there is no hole, and released 100 ms later. Add a direct comparison to the reorder buffer head, and release immediately if possible. For example: Frame 0 is missed. We receive frame 1, and store it in the buffer. After 100 ms, frame 1 is released and reorder buffer head is 2. We then receive frame 2, with NSSN 0, and store it instead of releasing it. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 82d2b9a62699f3d6a61323774c41cebe920e5dc5 Author: Emmanuel Grumbach Date: Wed Oct 18 13:09:38 2017 +0300 iwlwifi: mvm: rs: remove the ANT C from the toogle antenna logic We don't plan to have products with 3 antennas in the near future. All the rest of the code follows the same assumption as well. Remove the support for antenna C from rs_toggle_ant. When trying to toggle from ANT_B, this avoids to go through ANT_C, discover that it doesn't exist and continue to ANT_A. In MIMO, this avoids to do ANT_AB -> ANT_BC -> ANT_AC and back to ANT_AB. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 5d39051a328c0508b0fb0247227197059edd2da9 Author: Liad Kaufman Date: Tue Oct 17 16:26:00 2017 +0300 iwlwifi: mvm: reset seq num after restart After a FW reset on A000 NICs, the driver doesn't set the seq number when re-allocating the queues. This in turn leads to a mismatch between the seq number the driver thinks each frame has, and the actual seq num given by the HW. This especially causes issues with aggregations, since the driver could be waiting to start an aggregation and queue traffic from the mac80211 until then, when actually it shouldn't be waiting. Fixes: 310181ec34e2 ("iwlwifi: move to TVQM mode") Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0ec9257b0a2ceb4eeec552684b390b06705bbad7 Author: Sara Sharon Date: Mon Oct 16 09:45:10 2017 +0300 iwlwifi: mvm: cleanup references to aggregation count limit Currently the code is mixing defines and is inconsistent. When enabling a queue, we usually configure the scheduler with IWL_FRAME_LIMIT - 64. When sending to firmware the rate scaling, we limit aggregation to LINK_QUAL_AGG_FRAME_LIMIT_DEF - 63, due to a scheduler bug. Given that, clean up the following: - Fix a stray queue enablement with LINK_QUAL_AGG_FRAME_LIMIT_DEF. - Change the comparison that tests if queue needs to be reconfigured to be compared directly to how it was configured. This also saves the redundant round down of the buffer size just for the sake of comparing it, making the code more readable. - Better document gen2 logic Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit b67ce55dbd964f1e80652007bfb83d09c393300d Author: Sara Sharon Date: Sun Oct 15 13:52:54 2017 +0300 iwlwifi: mvm: use RS macro instead of duplicating the code There is a macro for converting TX response rate to a rate scale value, use it. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8af620f06f015eb9e9062f6398204ee011b5ef22 Author: Colin Ian King Date: Thu Nov 2 15:53:25 2017 +0000 usb: gadget: udc: renesas_usb3: make const array max_packet_array static Don't populate the const array max_packet_array on the stack, instead make it static. Makes the object code smaller by over 90 bytes: Before: text data bss dec hex filename 34337 5612 128 40077 9c8d renesas_usb3.o After: text data bss dec hex filename 34149 5708 128 39985 9c31 renesas_usb3.o (gcc version 7.2.0 x86_64) Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/renesas_usb3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17c0899682a55666e58f2200d5599f3a7b22867f Author: Jack Pham Date: Thu Nov 2 17:21:41 2017 -0700 usb: remove msm_hsusb_hw.h The last two remaining drivers (ehci-msm.c and phy-msm-usb.c) that needed this header were recently removed, so delete this now-unused file. Signed-off-by: Jack Pham Signed-off-by: Greg Kroah-Hartman include/linux/usb/msm_hsusb_hw.h | 77 ---------------------------------------- 1 file changed, 77 deletions(-) commit aa1f3bb56761cf627ed53a40607bead16d6e23bc Author: Greg Kroah-Hartman Date: Fri Nov 3 09:18:41 2017 +0100 USB: core: move existing SPDX tags to top of the file To match the rest of the kernel, the SPDX tags for the drivers/usb/core/ files are moved to the first line of the file. This makes it more obvious the tag is present as well as making it match the other 12k files in the tree with this location. It also uses // to match the "expected style" as well. Signed-off-by: Greg Kroah-Hartman drivers/usb/core/buffer.c | 2 +- drivers/usb/core/config.c | 2 +- drivers/usb/core/driver.c | 2 +- drivers/usb/core/endpoint.c | 2 +- drivers/usb/core/file.c | 2 +- drivers/usb/core/generic.c | 2 +- drivers/usb/core/hub.c | 2 +- drivers/usb/core/message.c | 2 +- drivers/usb/core/notify.c | 2 +- drivers/usb/core/sysfs.c | 2 +- drivers/usb/core/urb.c | 2 +- drivers/usb/core/usb.c | 2 +- drivers/usb/core/usb.h | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) commit f67971e683e81d7ba4739728511ae6e52a1b6321 Author: Eric Dumazet Date: Thu Nov 2 18:10:03 2017 -0700 tcp: tcp_fragment() should not assume rtx skbs While stress testing MTU probing, we had crashes in list_del() that we root-caused to the fact that tcp_fragment() is unconditionally inserting the freshly allocated skb into tsorted_sent_queue list. But this list is supposed to contain skbs that were sent. This was mostly harmless until MTU probing was enabled. Fortunately we can use the tcp_queue enum added later (but in same linux version) for rtx-rb-tree to fix the bug. Fixes: e2080072ed2d ("tcp: new list for sent but unacked skbs for RACK recovery") Signed-off-by: Eric Dumazet Cc: Yuchung Cheng Cc: Neal Cardwell Cc: Soheil Hassas Yeganeh Cc: Alexei Starovoitov Cc: Priyaranjan Jha Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a806c6c81e6c0d07c8a8b2643bad4a37a196d681 Author: Minwoo Im Date: Thu Nov 2 18:07:44 2017 +0900 nvme: comment typo fixed in clearing AER a tiny typo fixed in a comment. Signed-off-by: Minwoo Im Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30e8eb867122183076b7994f9b83920f9ec5451b Author: Sebastian Ott Date: Thu Oct 26 16:47:25 2017 +0200 s390/qdio: sanitize put_indicator qdio maintains an array of struct indicator_t. put_indicator takes a pointer to a member of a struct indicator_t within that array, calculates the index, and uses the array and the index to get the struct indicator_t. Simply use the pointer directly. Although the pointer happens to point to the first member of that struct use the container_of macro. Signed-off-by: Sebastian Ott Acked-by: Ursula Braun Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_thinint.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 648a6f4495b183d4e0d8983ff768facb9a2185bb Author: Sebastian Ott Date: Thu Oct 26 16:36:45 2017 +0200 s390/qdio: use atomic_cmpxchg qdio uses atomic_read to find an unused indicator and atomic_set to flag it as used. This could lead to multiple users getting the same indicator. Use atomic_cmpxchg instead. Signed-off-by: Sebastian Ott Acked-by: Ursula Braun Signed-off-by: Martin Schwidefsky drivers/s390/cio/qdio_thinint.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit c509a8229d8df29c8308c4b03a1f6d69eb287acd Author: Kees Cook Date: Thu Nov 2 16:18:07 2017 -0700 mISDN: hfcpci: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Karsten Keil Cc: "David S. Miller" Cc: Arvind Yadav Cc: Geliang Tang Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/isdn/hardware/mISDN/hfcpci.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 5212dfa3ea591df2dc1520675622856ac0bb63e4 Author: Gustavo A. R. Silva Date: Thu Nov 2 16:14:14 2017 -0500 ISDN: eicon: message: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114780 Addresses-Coverity-ID: 114781 Addresses-Coverity-ID: 114782 Addresses-Coverity-ID: 114783 Addresses-Coverity-ID: 114784 Addresses-Coverity-ID: 114785 Addresses-Coverity-ID: 114786 Addresses-Coverity-ID: 114787 Addresses-Coverity-ID: 114788 Addresses-Coverity-ID: 114789 Addresses-Coverity-ID: 114790 Addresses-Coverity-ID: 114791 Addresses-Coverity-ID: 114792 Addresses-Coverity-ID: 114793 Addresses-Coverity-ID: 114794 Addresses-Coverity-ID: 114795 Addresses-Coverity-ID: 200521 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/isdn/hardware/eicon/message.c | 70 +++++++++++++++++++++++++++++------ 1 file changed, 58 insertions(+), 12 deletions(-) commit 53b3847be5cbdf819cf366ea9160369ff00dcf8e Author: Colin Ian King Date: Thu Nov 2 20:04:12 2017 +0000 net: sched: cls_bpf: use bitwise & rather than logical && on gen_flags Currently gen_flags is being operated on by a logical && operator rather than a bitwise & operator. This looks incorrect as these should be bit flag operations. Fix this. Detected by CoverityScan, CID#1460305 ("Logical vs. bitwise operator") Fixes: 3f7889c4c79b ("net: sched: cls_bpf: call block callbacks for offload) Signed-off-by: Colin Ian King Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/sched/cls_bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9eba9353388da7bfac9694dfe94c15365d49ebd6 Author: Eric Dumazet Date: Thu Nov 2 11:53:04 2017 -0700 tcp: fix a lockdep issue in tcp_fastopen_reset_cipher() icsk_accept_queue.fastopenq.lock is only fully initialized at listen() time. LOCKDEP is not happy if we attempt a spin_lock_bh() on it, because of missing annotation. (Although kernel runs just fine) Lets use net->ipv4.tcp_fastopen_ctx_lock to protect ctx access. Fixes: 1fba70e5b6be ("tcp: socket option to set TCP fast open key") Signed-off-by: Eric Dumazet Cc: Yuchung Cheng Cc: Christoph Paasch Reviewed-by: Christoph Paasch Signed-off-by: David S. Miller net/ipv4/tcp_fastopen.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 8c01c4f896aa3404af948880dcb29a2d51c833dc Author: Craig Gallek Date: Thu Nov 2 11:18:01 2017 -0400 bpf: fix verifier NULL pointer dereference do_check() can fail early without allocating env->cur_state under memory pressure. Syzkaller found the stack below on the linux-next tree because of this. 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: 27062 Comm: syz-executor5 Not tainted 4.14.0-rc7+ #106 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801c2c74700 task.stack: ffff8801c3e28000 RIP: 0010:free_verifier_state kernel/bpf/verifier.c:347 [inline] RIP: 0010:bpf_check+0xcf4/0x19c0 kernel/bpf/verifier.c:4533 RSP: 0018:ffff8801c3e2f5c8 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 00000000fffffff4 RCX: 0000000000000000 RDX: 0000000000000070 RSI: ffffffff817d5aa9 RDI: 0000000000000380 RBP: ffff8801c3e2f668 R08: 0000000000000000 R09: 1ffff100387c5d9f R10: 00000000218c4e80 R11: ffffffff85b34380 R12: ffff8801c4dc6a28 R13: 0000000000000000 R14: ffff8801c4dc6a00 R15: ffff8801c4dc6a20 FS: 00007f311079b700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000004d4a24 CR3: 00000001cbcd0000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bpf_prog_load+0xcbb/0x18e0 kernel/bpf/syscall.c:1166 SYSC_bpf kernel/bpf/syscall.c:1690 [inline] SyS_bpf+0xae9/0x4620 kernel/bpf/syscall.c:1652 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x452869 RSP: 002b:00007f311079abe8 EFLAGS: 00000212 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 0000000000452869 RDX: 0000000000000030 RSI: 0000000020168000 RDI: 0000000000000005 RBP: 00007f311079aa20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b7550 R13: 00007f311079ab58 R14: 00000000004b7560 R15: 0000000000000000 Code: df 48 c1 ea 03 80 3c 02 00 0f 85 e6 0b 00 00 4d 8b 6e 20 48 b8 00 00 00 00 00 fc ff df 49 8d bd 80 03 00 00 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 b6 0b 00 00 49 8b bd 80 03 00 00 e8 d6 0c 26 RIP: free_verifier_state kernel/bpf/verifier.c:347 [inline] RSP: ffff8801c3e2f5c8 RIP: bpf_check+0xcf4/0x19c0 kernel/bpf/verifier.c:4533 RSP: ffff8801c3e2f5c8 ---[ end trace c8d37f339dc64004 ]--- Fixes: 638f5b90d460 ("bpf: reduce verifier memory consumption") Fixes: 1969db47f8d0 ("bpf: fix verifier memory leaks") Signed-off-by: Craig Gallek Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit fa36882682db0692ecbea20f859180f978923d72 Author: Jon Maloy Date: Thu Nov 2 15:44:15 2017 +0100 tipc: eliminate unnecessary probing The neighbor monitor employs a threshold, default set to 32 peer nodes, where it activates the "Overlapping Neighbor Monitoring" algorithm. Below that threshold, monitoring is full-mesh, and no "domain records" are passed between the nodes. Because of this, a node never received a peer's ack that it has received the most recent update of the own domain. Hence, the field 'acked_gen' in struct tipc_monitor_state remains permamently at zero, whereas the own domain generation is incremented for each added or removed peer. This has the effect that the function tipc_mon_get_state() always sets the field 'probing' in struct tipc_monitor_state true, again leading the tipc_link_timeout() of the link in question to always send out a probe, even when link->silent_intv_count is zero. This is functionally harmless, but leads to some unncessary probing, which can easily be eliminated by setting the 'probing' field of the said struct correctly in such cases. At the same time, we explictly invalidate the sent domain records when the algorithm is not activated. This will eliminate any risk that an invalid domain record might be inadverently accepted by the peer. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/monitor.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 4bb1b116b7f37a64c08d28213a2e6f87fcef2d8b Author: Jiri Pirko Date: Thu Nov 2 15:07:01 2017 +0100 net: sched: move block offload unbind after all chains are flushed Currently, the offload unbind is done before the chains are flushed. That causes driver to unregister block callback before it can get all the callback calls done during flush, leaving the offloaded tps inside the HW. So fix the order to prevent this situation and restore the original behaviour. Reported-by: Alexander Duyck Reported-by: Jakub Kicinski 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 9a7b96b3462679a2fcf7205d396dbf1f8f28454c Author: Ganesh Goudar Date: Thu Nov 2 19:28:20 2017 +0530 cxgb4vf: define get_fecparam ethtool callback Add support to new ethtool operation get_fecparam to fetch FEC parameters. Original Work by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller .../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 36bf994a80571aeee2549db1bc93e34342f40c24 Author: Ganesh Goudar Date: Thu Nov 2 19:26:58 2017 +0530 cxgb4: add new T6 pci device id's Add 0x6086 T6 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 5a6d80034471d4407052c4bf3758071df5cadf33 Author: Wei Yongjun Date: Thu Nov 2 11:15:28 2017 +0000 net/ncsi: Make local function ncsi_get_filter() static Fixes the following sparse warnings: net/ncsi/ncsi-manage.c:41:5: warning: symbol 'ncsi_get_filter' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller net/ncsi/ncsi-manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a3deb11d66ec4509462bbe9f162fc4bb991b061 Author: Allen Pais Date: Fri Nov 3 11:51:11 2017 +0530 net: bridge: Convert timers to use timer_setup() switch to using the new timer_setup() and from_timer() api's. Signed-off-by: Allen Pais Signed-off-by: David S. Miller net/bridge/br_stp_timer.c | 48 +++++++++++++++++++---------------------------- 1 file changed, 19 insertions(+), 29 deletions(-) commit 88c1f37f05f30d74f56aec1f3bc10d238c9ba152 Author: Allen Pais Date: Fri Nov 3 11:51:10 2017 +0530 net: bridge: Convert timers to use timer_setup() switch to using the new timer_setup() and from_timer() api's. Signed-off-by: Allen Pais Signed-off-by: David S. Miller net/bridge/br_multicast.c | 79 +++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 40 deletions(-) commit 6437b112f70612212c20359a708af106a564d17c Merge: a882d20 28678f0 Author: David S. Miller Date: Fri Nov 3 15:40:42 2017 +0900 Merge branch 'mlxsw-Align-multipath-hash-parameters-with-kernels' Jiri Pirko says: ==================== mlxsw: Align multipath hash parameters with kernel's Ido says: This set makes sure the device is using the same parameters as the kernel when it computes the multipath hash during IP forwarding. First patch adds a new netevent to let interested listeners know that the multipath hash policy has changed. Next two patches do small and non-functional changes in the mlxsw driver. Last patches configure the multipath hash policy upon driver initialization and as a response to netevents. ==================== Signed-off-by: David S. Miller commit 28678f07f127d151354ff12b0d05557ae897e972 Author: Ido Schimmel Date: Thu Nov 2 17:14:10 2017 +0100 mlxsw: spectrum_router: Update multipath hash parameters upon netevents Make sure the device and the kernel are performing the multipath hash according to the same parameters by updating the device whenever the relevant netevent is generated. 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 | 31 +++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) commit af658b6a0e6da7a9d9b82fa536d610a7457f37fd Author: Ido Schimmel Date: Thu Nov 2 17:14:09 2017 +0100 mlxsw: spectrum_router: Align multipath hash parameters with kernel's Up until now we used the hardware's defaults for multipath hash computation. This patch aligns the hardware's multipath parameters with the kernel's. For IPv4 packets, the parameters are determined according to the 'fib_multipath_hash_policy' sysctl during module initialization. In case L3-mode is requested, only the source and destination IP addresses are used. There is no special handling of ICMP error packets. In case L4-mode is requested, a 5-tuple is used: source and destination IP addresses, source and destination ports and IP protocol. Note that the layer 4 fields are not considered for fragmented packets. For IPv6 packets, the source and destination IP addresses are used, as well as the flow label and the next header fields. 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 | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit e471859b72fc2d9fe0f3163a7c238029271259ec Author: Ido Schimmel Date: Thu Nov 2 17:14:08 2017 +0100 mlxsw: reg: Add Router ECMP Configuration Register Version 2 The RECRv2 register is used for setting up the router's ECMP hash configuration. 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 | 132 ++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) commit ceb8881ddf6d79c257c916763b0e558d053b2560 Author: Ido Schimmel Date: Thu Nov 2 17:14:07 2017 +0100 mlxsw: spectrum_router: Properly name netevent work struct The struct containing the work item queued from the netevent handler is named after the only event it is currently used for, which is neighbour updates. Use a more appropriate name for the struct, as we are going to use it for more events. 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 | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 48fac8852637f00abcb05b1af3489e3cd45cda58 Author: Ido Schimmel Date: Thu Nov 2 17:14:06 2017 +0100 mlxsw: spectrum_router: Embed netevent notifier block in router struct We are going to need to respond to netevents notifying us about multipath hash updates by configuring the device's hash parameters. Embed the netevent notifier in the router struct so that we could retrieve it upon notifications and use it to configure the device. 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.c | 7 ------- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 -- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 14 ++++++++++++-- 3 files changed, 12 insertions(+), 11 deletions(-) commit 3ae6ec08292f01c6782d1a80be0b2cc675e0ecfc Author: Ido Schimmel Date: Thu Nov 2 17:14:05 2017 +0100 ipv4: Send a netevent whenever multipath hash policy is changed Devices performing IPv4 forwarding need to update their multipath hash policy whenever it is changed. Inform these devices by generating a netevent. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Jiri Pirko Acked-by: David Ahern Signed-off-by: David S. Miller include/net/netevent.h | 1 + net/ipv4/sysctl_net_ipv4.c | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) commit a882d20cdb7775ff8b4aac880255eff6a2c1c85e Author: Wei Yongjun Date: Thu Nov 2 11:15:07 2017 +0000 cxgb4: fix error return code in cxgb4_set_hash_filter() Fix to return a negative error code from thecxgb4_alloc_atid() error handling case instead of 0. Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters") Signed-off-by: Wei Yongjun Acked-By: Kumar Sanghvi Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit eba0c929d1d0f16c4b03628b7bf8ce363b9e5c9a Author: Arnd Bergmann Date: Thu Nov 2 12:05:52 2017 +0100 bpf: fix out-of-bounds access warning in bpf_check The bpf_verifer_ops array is generated dynamically and may be empty depending on configuration, which then causes an out of bounds access: kernel/bpf/verifier.c: In function 'bpf_check': kernel/bpf/verifier.c:4320:29: error: array subscript is above array bounds [-Werror=array-bounds] This adds a check to the start of the function as a workaround. I would assume that the function is never called in that configuration, so the warning is probably harmless. Fixes: 00176a34d9e2 ("bpf: remove the verifier ops from program structure") Signed-off-by: Arnd Bergmann Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7cce782ef32f5003c18ab8f9f586f2ed5ce2c33e Author: Arnd Bergmann Date: Thu Nov 2 12:05:51 2017 +0100 bpf: fix link error without CONFIG_NET I ran into this link error with the latest net-next plus linux-next trees when networking is disabled: kernel/bpf/verifier.o:(.rodata+0x2958): undefined reference to `tc_cls_act_analyzer_ops' kernel/bpf/verifier.o:(.rodata+0x2970): undefined reference to `xdp_analyzer_ops' It seems that the code was written to deal with varying contents of the arrray, but the actual #ifdef was missing. Both tc_cls_act_analyzer_ops and xdp_analyzer_ops are defined in the core networking code, so adding a check for CONFIG_NET seems appropriate here, and I've verified this with many randconfig builds Fixes: 4f9218aaf8a4 ("bpf: move knowledge about post-translation offsets out of verifier") Signed-off-by: Arnd Bergmann Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 2 ++ 1 file changed, 2 insertions(+) commit 054287295b1132c8742ea55f8e3af9cbd630c932 Author: Egil Hjelmeland Date: Thu Nov 2 10:36:48 2017 +0100 net: Define eth_stp_addr in linux/etherdevice.h The lan9303 driver defines eth_stp_addr as a synonym to eth_reserved_addr_base to get the STP ethernet address 01:80:c2:00:00:00. eth_reserved_addr_base is also used to define the start of Bridge Reserved ethernet address range, which happen to be the STP address. br_dev_setup refer to eth_reserved_addr_base as a definition of STP address. Clean up by: - Move the eth_stp_addr definition to linux/etherdevice.h - Use eth_stp_addr instead of eth_reserved_addr_base in br_dev_setup. Signed-off-by: Egil Hjelmeland Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller include/linux/dsa/lan9303.h | 2 -- include/linux/etherdevice.h | 1 + net/bridge/br_device.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) commit 25c5f715381e0f52993972567fae653b700126fa Author: Felix Manlunas Date: Wed Nov 1 18:14:49 2017 -0700 liquidio: bump up driver version to 1.7.0 to match newer NIC firmware Signed-off-by: Felix Manlunas Acked-by: Derek Chickles Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/liquidio_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 610f01b9a88a9ef8b506709a825c17395c56a62a Author: Stafford Horne Date: Fri Nov 3 12:22:27 2017 +0900 openrisc: fix possible deadlock scenario during timer sync OpenRISC borrows its timer sync logic from MIPS, Matt helped to review the OpenRISC implementation and noted that we may suffer the same deadlock case that MIPS has faced. The case being: "the MIPS timer synchronization code contained the possibility of deadlock. If you mark a CPU online before it goes into the synchronize loop, then the boot CPU can schedule a different thread and send IPIs to all "online" CPUs. It gets stuck waiting for the secondary to ack it's IPI, since this secondary CPU has not enabled IRQs yet, and is stuck waiting for the master to synchronise with it. The system then deadlocks." Fix this by moving set_cpu_online() to after timer sync. Reported-by: Matt Redfearn Signed-off-by: Stafford Horne arch/openrisc/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit afa83808817357e10b0a4e6d5b89f7b899dabd49 Author: Luc Van Oostenryck Date: Tue Oct 31 18:22:05 2017 +0100 openrisc: pass endianness info to sparse openrisc is big-endian only but sparse assumes the same endianness as the building machine. This is problematic for code which expect __BYTE_ORDER__ being correctly predefined by the compiler which sparse can then pre-process differently from what gcc would, depending on the building machine endianness. Fix this by letting sparse know about the architecture endianness. To: Jonas Bonn To: Stefan Kristiansson To: Stafford Horne Signed-off-by: Luc Van Oostenryck Signed-off-by: Stafford Horne arch/openrisc/Makefile | 1 + 1 file changed, 1 insertion(+) commit 4553474d977d1ee8a81067cfbc588f1df84ce3e9 Author: Stafford Horne Date: Fri Jul 7 06:06:30 2017 +0900 openrisc: add tick timer multi-core sync logic In case timers are not in sync when cpus start (i.e. hot plug / offset resets) we need to synchronize the secondary cpus internal timer with the main cpu. This is needed as in OpenRISC SMP there is only one clocksource registered which reads from the same ttcr register on each cpu. This synchronization routine heavily borrows from mips implementation that does something similar. Signed-off-by: Stafford Horne arch/openrisc/include/asm/time.h | 8 +++ arch/openrisc/kernel/Makefile | 2 +- arch/openrisc/kernel/smp.c | 3 + arch/openrisc/kernel/sync-timer.c | 120 ++++++++++++++++++++++++++++++++++++++ arch/openrisc/kernel/time.c | 15 ++++- 5 files changed, 145 insertions(+), 3 deletions(-) commit 78cdfb5cf15e0f9fb4c2a9176a13a907a1d024f0 Author: Stafford Horne Date: Mon Jul 24 21:55:16 2017 +0900 openrisc: enable LOCKDEP_SUPPORT and irqflags tracing Lockdep is needed for proving the spinlocks and rwlocks work fine on our platform. It also requires calling the trace_hardirqs_off() and trace_hardirqs_on() pair of routines when entering and exiting an interrupt. For OpenRISC the interrupt stack frame does not support frame pointers, so to call trace_hardirqs_on() and trace_hardirqs_off() here the macro's build up a stack frame each time. There is one necessary small change in _sys_call_handler to move interrupt enabling later so they can get re-enabled during syscall restart. This was done to fix lockdep warnings that are now possible due to this patch. Signed-off-by: Stafford Horne arch/openrisc/Kconfig | 3 ++ arch/openrisc/kernel/entry.S | 74 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 74 insertions(+), 3 deletions(-) commit eecac38b0423a69715073ecbde581dafd1abb28b Author: Stafford Horne Date: Mon Jul 24 21:44:35 2017 +0900 openrisc: support framepointers and STACKTRACE_SUPPORT For lockdep support a reliable stack trace mechanism is needed. This patch adds support in OpenRISC for the stacktrace framework, implemented by a simple unwinder api. The unwinder api supports both framepointer and basic stack tracing. The unwinder is now used to replace the stack_dump() implementation as well. The new traces are inline with other architectures trace format: Call trace: [] show_stack+0x3c/0x58 [] dump_stack+0xa8/0xe4 [] __cpu_up+0x64/0x130 [] bringup_cpu+0x3c/0x178 [] cpuhp_invoke_callback+0xa8/0x1fc [] cpuhp_up_callbacks+0x44/0x14c [] cpu_up+0x14c/0x1bc [] smp_init+0x104/0x15c [] ? kernel_init+0x0/0x140 [] kernel_init_freeable+0xbc/0x25c [] ? kernel_init+0x0/0x140 [] kernel_init+0x1c/0x140 [] ? schedule_tail+0x18/0xa0 [] ret_from_fork+0x1c/0x9c Signed-off-by: Stafford Horne arch/openrisc/Kconfig | 4 ++ arch/openrisc/include/asm/unwinder.h | 20 +++++++ arch/openrisc/kernel/Makefile | 3 +- arch/openrisc/kernel/stacktrace.c | 86 ++++++++++++++++++++++++++++ arch/openrisc/kernel/traps.c | 54 +++--------------- arch/openrisc/kernel/unwinder.c | 105 +++++++++++++++++++++++++++++++++++ 6 files changed, 224 insertions(+), 48 deletions(-) commit 306e5e50a32140452849fff42fca104511fd6668 Author: Stefan Kristiansson Date: Sun May 18 10:54:47 2014 +0300 openrisc: add simple_smp dts and defconfig for simulators Simple enough to be compatible with simulation environments, such as verilated systems, QEMU and other targets supporting OpenRISC SMP. This also supports our base FPGA SoC's if the cpu frequency is upped to 50Mhz. Signed-off-by: Stefan Kristiansson [shorne@gmail.com: Added defconfig] Signed-off-by: Stafford Horne arch/openrisc/boot/dts/simple_smp.dts | 63 ++++++++++++++++++++++++++++ arch/openrisc/configs/simple_smp_defconfig | 66 ++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+) commit 4ee93d80ad73980826d582c7c37caa9597822001 Author: Jan Henrik Weinstock Date: Wed Nov 4 17:26:10 2015 +0100 openrisc: add cacheflush support to fix icache aliasing On OpenRISC the icache does not snoop data stores. This can cause aliasing as reported by Jan. This patch fixes the issue to ensure icache is properly synchronized when code is written to memory. It supports both SMP and UP flushing. This supports dcache flush as well for architectures that do not support write-through caches; most OpenRISC implementations do implement write-through cache however. Dcache flushes are done only on a single core as OpenRISC dcaches all support snooping of bus stores. Signed-off-by: Jan Henrik Weinstock [shorne@gmail.com: Squashed patches and wrote commit message] Signed-off-by: Stafford Horne arch/openrisc/Kconfig | 11 ++++ arch/openrisc/include/asm/Kbuild | 1 - arch/openrisc/include/asm/cacheflush.h | 96 ++++++++++++++++++++++++++++++++++ arch/openrisc/include/asm/pgtable.h | 16 +++--- arch/openrisc/kernel/smp.c | 15 ++++++ arch/openrisc/mm/Makefile | 2 +- arch/openrisc/mm/cache.c | 61 +++++++++++++++++++++ 7 files changed, 194 insertions(+), 8 deletions(-) commit c056718464512da06d7f65a27d5e4f1707b24c80 Author: Stafford Horne Date: Sat Jun 24 07:09:59 2017 +0900 openrisc: sleep instead of spin on secondary wait Currently we do a spin on secondary cpus when waiting to boot. This theoretically causes issues with power consumption and does cause issues with qemu cycle burning (it starves cpu 0 from actually being able to boot.) This change puts each secondary cpu to sleep if they have a power management unit, then signals them to wake via IPI when its time to boot. If the cpus have no power management unit they will loop as before. Note: The wakeup IPI requires a special interrupt handler as on secondary cpu's the interrupt infrastructure is not yet established. This interrupt handler is set and reset by updating SPR_EVBAR. Signed-off-by: Stafford Horne arch/openrisc/kernel/head.S | 51 +++++++++++++++++++++++++++++++++++++++++++-- arch/openrisc/kernel/smp.c | 5 +++++ 2 files changed, 54 insertions(+), 2 deletions(-) commit b441aab7aa0e15955c432736b08a218a6a4c77f0 Author: Stafford Horne Date: Wed Jul 12 17:20:38 2017 +0900 openrisc: fix initial preempt state for secondary cpu tasks During SMP testing we were getting the below warning after booting the secondary cpu: [ 0.060000] BUG: scheduling while atomic: swapper/1/0/0x00000000 This change follows similar patterns from other architectures to start the schduler with preempt disabled. Signed-off-by: Stafford Horne arch/openrisc/include/asm/thread_info.h | 2 +- arch/openrisc/kernel/smp.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 8e6d08e0a15e7d4d4b608b56597350d4cdd77710 Author: Stefan Kristiansson Date: Sun May 11 21:49:34 2014 +0300 openrisc: initial SMP support This patch introduces the SMP support for the OpenRISC architecture. The SMP architecture requires cores which have multi-core features which have been introduced a few years back including: - New SPRS SPR_COREID SPR_NUMCORES - Shadow SPRs - Atomic Instructions - Cache Coherency - A wired in IPI controller This patch adds all of the SMP specific changes to core infrastructure, it looks big but it needs to go all together as its hard to split this one up. Boot loader spinning of second cpu is not supported yet, it's assumed that Linux is booted straight after cpu reset. The bulk of these changes are trivial changes to refactor to use per cpu data structures throughout. The addition of the smp.c and changes in time.c are the changes. Some specific notes: MM changes ---------- The reason why this is created as an array, and not with DEFINE_PER_CPU is that doing it this way, we'll save a load in the tlb-miss handler (the load from __per_cpu_offset). TLB Flush --------- The SMP implementation of flush_tlb_* works by sending out a function-call IPI to all the non-local cpus by using the generic on_each_cpu() function. Currently, all flush_tlb_* functions will result in a flush_tlb_all(), which has always been the behaviour in the UP case. CPU INFO -------- This creates a per cpu cpuinfo struct and fills it out accordingly for each activated cpu. show_cpuinfo is also updated to reflect new version information in later versions of the spec. SMP API ------- This imitates the arm64 implementation by having a smp_cross_call callback that can be set by set_smp_cross_call to initiate an IPI and a handle_IPI function that is expected to be called from an IPI irqchip driver. Signed-off-by: Stefan Kristiansson [shorne@gmail.com: added cpu stop, checkpatch fixes, wrote commit message] Signed-off-by: Stafford Horne arch/openrisc/Kconfig | 17 ++- arch/openrisc/include/asm/cpuinfo.h | 7 +- arch/openrisc/include/asm/mmu_context.h | 2 +- arch/openrisc/include/asm/pgtable.h | 2 +- arch/openrisc/include/asm/serial.h | 2 +- arch/openrisc/include/asm/smp.h | 26 ++++ arch/openrisc/include/asm/spr_defs.h | 14 ++ arch/openrisc/include/asm/time.h | 15 ++ arch/openrisc/include/asm/tlbflush.h | 25 +++- arch/openrisc/kernel/Makefile | 1 + arch/openrisc/kernel/dma.c | 14 +- arch/openrisc/kernel/head.S | 97 ++++++++++++- arch/openrisc/kernel/setup.c | 165 ++++++++++++++-------- arch/openrisc/kernel/smp.c | 235 ++++++++++++++++++++++++++++++++ arch/openrisc/kernel/time.c | 51 ++++--- arch/openrisc/lib/delay.c | 2 +- arch/openrisc/mm/fault.c | 4 +- arch/openrisc/mm/init.c | 2 +- arch/openrisc/mm/tlb.c | 16 +-- 19 files changed, 584 insertions(+), 113 deletions(-) commit 9b54470afd836278a7e6f0f08194e2e2dca4b6eb Author: Stafford Horne Date: Mon Oct 30 21:38:35 2017 +0900 irqchip: add initial support for ompic IPI driver for the Open Multi-Processor Interrupt Controller (ompic) as described in the Multi-core support section of the OpenRISC 1.2 architecture specification: https://github.com/openrisc/doc/raw/master/openrisc-arch-1.2-rev0.pdf Each OpenRISC core contains a full interrupt controller which is used in the SMP architecture for interrupt balancing. This IPI device, the ompic, is the only external device required for enabling SMP on OpenRISC. Pending ops are stored in a memory bit mask which can allow multiple pending operations to be set and serviced at a time. This is mostly borrowed from the alpha IPI implementation. Reviewed-by: Marc Zyngier Acked-by: Rob Herring Signed-off-by: Stefan Kristiansson [shorne@gmail.com: converted ops to bitmask, wrote commit message] Signed-off-by: Stafford Horne .../interrupt-controller/openrisc,ompic.txt | 22 +++ MAINTAINERS | 1 + arch/openrisc/Kconfig | 1 + drivers/irqchip/Kconfig | 3 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-ompic.c | 202 +++++++++++++++++++++ 6 files changed, 230 insertions(+) commit fab8be88ac0478b0157859f74fad5088c292356b Author: Stafford Horne Date: Thu Sep 7 22:55:18 2017 +0900 dt-bindings: add openrisc to vendor prefixes list Add OpenRISC.io to vendor prefixes. This is reserved for softcores developed by the OpenRISC community. The OpenRISC community has separated from OpenCores.org requiring a new prefix. Reviewed-by: Andreas Färber Acked-by: Rob Herring Signed-off-by: Stafford Horne Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit b5f8217615bb197af33c0cc71b14783b194fed6e Author: Stafford Horne Date: Fri Mar 24 07:13:03 2017 +0900 openrisc: use qspinlocks and qrwlocks Enable OpenRISC to use qspinlocks and qrwlocks for upcoming SMP support. Signed-off-by: Stafford Horne arch/openrisc/Kconfig | 2 ++ arch/openrisc/include/asm/Kbuild | 4 ++++ arch/openrisc/include/asm/spinlock.h | 12 +++++++++++- arch/openrisc/include/asm/spinlock_types.h | 7 +++++++ 4 files changed, 24 insertions(+), 1 deletion(-) commit 489e0f802db708c69004f64d92a3e1b70731614a Author: Stafford Horne Date: Thu Mar 23 23:27:12 2017 +0900 openrisc: add 1 and 2 byte cmpxchg support OpenRISC only supports hardware instructions that perform 4 byte atomic operations. For enabling qrwlocks for upcoming SMP support 1 and 2 byte implementations are needed. To do this we leverage the 4 byte atomic operations and shift/mask the 1 and 2 byte areas as needed. This heavily borrows ideas and routines from sh and mips, which do something similar. Cc: Peter Zijlstra Signed-off-by: Stafford Horne arch/openrisc/include/asm/cmpxchg.h | 147 ++++++++++++++++++++++++++++-------- 1 file changed, 115 insertions(+), 32 deletions(-) commit 91993c8c2ed52781a0f42bf7f40e28adc96e2bb2 Author: Stefan Kristiansson Date: Sun May 11 12:08:37 2014 +0300 openrisc: use shadow registers to save regs on exception Previously, the area between 0x0-0x100 have been used as a "scratch" memory area to temporarily store regs during exception entry. In a multi-core environment, this will not work. This change is to use shadow registers for nested context. Currently only the "critical" temp load/stores are covered, the EMERGENCY_PRINT ones are left as is (when they are used, it's game over anyway), they need to be handled as well in the future. Signed-off-by: Stefan Kristiansson Signed-off-by: Stafford Horne arch/openrisc/Kconfig | 11 ++++++ arch/openrisc/kernel/head.S | 95 ++++++++++++++++++++++++++++++++------------- 2 files changed, 80 insertions(+), 26 deletions(-) commit ddc92bec6d7d7e8a07794a8dbeade19476891b53 Author: Stafford Horne Date: Sat Oct 21 22:39:35 2017 +0900 dt-bindings: openrisc: Add OpenRISC platform SoC Add devicetree binding documentation for the OpenRISC platform opencores,or1ksim. This is the main OpenRISC reference platform supporting multiple FPGA SoC's. This format is based on some of the mips binding docs as we have similar requirements. Also, update maintainers so openrisc related binding changes are visible to the openrisc team. Acked-by: Rob Herring Suggested-by: Pavel Machek Signed-off-by: Stafford Horne .../bindings/openrisc/opencores/or1ksim.txt | 39 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 40 insertions(+) commit cf34ce3da1e41579296364509266c7dac573822a Author: Song Liu Date: Mon Oct 30 14:41:35 2017 -0700 tcp: add tracepoint trace_tcp_retransmit_synack() This tracepoint can be used to trace synack retransmits. It maintains pointer to struct request_sock. We cannot simply reuse trace_tcp_retransmit_skb() here, because the sk here is the LISTEN socket. The IP addresses and ports should be extracted from struct request_sock. Note that, like many other tracepoints, this patch uses IS_ENABLED in TP_fast_assign macro, which triggers sparse warning like: ./include/trace/events/tcp.h:274:1: error: directive in argument list ./include/trace/events/tcp.h:281:1: error: directive in argument list However, there is no good solution to avoid these warnings. To the best of our knowledge, these warnings are harmless. Signed-off-by: Song Liu Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/trace/events/tcp.h | 56 ++++++++++++++++++++++++++++++++++++++++++++++ net/ipv4/tcp_output.c | 1 + 2 files changed, 57 insertions(+) commit 47d3d7ac656a1ffb9d0f0d3c845663ed6fd7e78d Author: Tom Herbert Date: Mon Oct 30 14:16:00 2017 -0700 ipv6: Implement limits on Hop-by-Hop and Destination options RFC 8200 (IPv6) defines Hop-by-Hop options and Destination options extension headers. Both of these carry a list of TLVs which is only limited by the maximum length of the extension header (2048 bytes). By the spec a host must process all the TLVs in these options, however these could be used as a fairly obvious denial of service attack. I think this could in fact be a significant DOS vector on the Internet, one mitigating factor might be that many FWs drop all packets with EH (and obviously this is only IPv6) so an Internet wide attack might not be so effective (yet!). By my calculation, the worse case packet with TLVs in a standard 1500 byte MTU packet that would be processed by the stack contains 1282 invidual TLVs (including pad TLVS) or 724 two byte TLVs. I wrote a quick test program that floods a whole bunch of these packets to a host and sure enough there is substantial time spent in ip6_parse_tlv. These packets contain nothing but unknown TLVS (that are ignored), TLV padding, and bogus UDP header with zero payload length. 25.38% [kernel] [k] __fib6_clean_all 21.63% [kernel] [k] ip6_parse_tlv 4.21% [kernel] [k] __local_bh_enable_ip 2.18% [kernel] [k] ip6_pol_route.isra.39 1.98% [kernel] [k] fib6_walk_continue 1.88% [kernel] [k] _raw_write_lock_bh 1.65% [kernel] [k] dst_release This patch adds configurable limits to Destination and Hop-by-Hop options. There are three limits that may be set: - Limit the number of options in a Hop-by-Hop or Destination options extension header. - Limit the byte length of a Hop-by-Hop or Destination options extension header. - Disallow unrecognized options in a Hop-by-Hop or Destination options extension header. The limits are set in corresponding sysctls: ipv6.sysctl.max_dst_opts_cnt ipv6.sysctl.max_hbh_opts_cnt ipv6.sysctl.max_dst_opts_len ipv6.sysctl.max_hbh_opts_len If a max_*_opts_cnt is less than zero then unknown TLVs are disallowed. The number of known TLVs that are allowed is the absolute value of this number. If a limit is exceeded when processing an extension header the packet is dropped. Default values are set to 8 for options counts, and set to INT_MAX for maximum length. Note the choice to limit options to 8 is an arbitrary guess (roughly based on the fact that the stack supports three HBH options and just one destination option). These limits have being proposed in draft-ietf-6man-rfc6434-bis. Tested (by Martin Lau) I tested out 1 thread (i.e. one raw_udp process). I changed the net.ipv6.max_dst_(opts|hbh)_number between 8 to 2048. With sysctls setting to 2048, the softirq% is packed to 100%. With 8, the softirq% is almost unnoticable from mpstat. v2; - Code and documention cleanup. - Change references of RFC2460 to be RFC8200. - Add reference to RFC6434-bis where the limits will be in standard. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller Documentation/networking/ip-sysctl.txt | 24 ++++++++++++ include/net/ipv6.h | 40 ++++++++++++++++++++ include/net/netns/ipv6.h | 4 ++ net/ipv6/af_inet6.c | 4 ++ net/ipv6/exthdrs.c | 67 ++++++++++++++++++++++++++++------ net/ipv6/sysctl_net_ipv6.c | 32 ++++++++++++++++ 6 files changed, 159 insertions(+), 12 deletions(-) commit bf6eb600e5b835a96d676b2b9df603362a1e714c Merge: 9ad472e d34ded7 Author: Dave Airlie Date: Fri Nov 3 09:17:08 2017 +1000 Merge branch 'linux-4.15' of git://github.com/skeggsb/linux into drm-next nouveau next fixes. Fixes arm32 build. * 'linux-4.15' of git://github.com/skeggsb/linux: drm/nouveau/bios/timing: mark expected switch fall-throughs drm/nouveau/devinit/nv04: mark expected switch fall-throughs drm/nouveau/bios: make const arrays hwsq_signature and edid_sig static drm/nouveau/core/memory: fix missing mutex unlock drm/nouveau/mmu: swap out round for ALIGN commit d34ded7ece57782e75bf31bb145836b9f280750f Author: Gustavo A. R. Silva Date: Thu Nov 2 15:20:33 2017 -0500 drm/nouveau/bios/timing: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1260018 Addresses-Coverity-ID: 1260019 Addresses-Coverity-ID: 1260022 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bios/timing.c | 5 +++++ 1 file changed, 5 insertions(+) commit 21dce3f4643eb541c7058e37b89a44a573ac95f6 Author: Gustavo A. R. Silva Date: Thu Nov 2 15:06:25 2017 -0500 drm/nouveau/devinit/nv04: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 143119 Addresses-Coverity-ID: 143120 Addresses-Coverity-ID: 143121 Addresses-Coverity-ID: 143122 Addresses-Coverity-ID: 143123 Addresses-Coverity-ID: 143124 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/devinit/nv04.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1a5c8164b335fb841fd9b41cd3d659de2f1c912b Author: Colin Ian King Date: Thu Nov 2 18:48:12 2017 +0000 drm/nouveau/bios: make const arrays hwsq_signature and edid_sig static Don't populate arrays hwsq_signature and edid_sig on the stack but instead make them static. Makes the object code smaller by over 190 bytes: Before: text data bss dec hex filename 35676 3312 64 39052 988c nouveau_bios.o After: text data bss dec hex filename 35319 3472 64 38855 97c7 nouveau_bios.o (gcc version 7.2.0 x86_64) Signed-off-by: Colin Ian King Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_bios.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 690f43ab1b659a7e072a2a0b33ff5783828c168b Author: Ben Skeggs Date: Fri Nov 3 08:37:27 2017 +1000 drm/nouveau/core/memory: fix missing mutex unlock Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/core/memory.c | 1 + 1 file changed, 1 insertion(+) commit 6497c2baf2c66938bfff51af9806d495bbb506f9 Author: Ben Skeggs Date: Fri Nov 3 08:36:25 2017 +1000 drm/nouveau/mmu: swap out round for ALIGN Rounding value is guaranteed to be power-of-two, so this is better anyway. Fixes build on 32-bit. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c7c2f3d9e86c2f09a514247d1623f00850125636 Merge: 6082a6e 25b42fa Author: Thomas Gleixner Date: Fri Nov 3 00:06:08 2017 +0100 Merge tag 'timers-conversion-next3' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into timers/core Pull the 3rd batch of timer conversions from Kees Cook: - various per-architecture conversions - several driver conversions not picked up by a specific maintainer - other Acked/Reviewed conversions to go through tip commit 25b42fa8f8a45d863f704bbfe3c79a46958cf4dc Author: Kees Cook Date: Sun Oct 22 14:49:58 2017 -0700 drivers/sgi-xp: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Cliff Whickman Signed-off-by: Kees Cook Acked-by: Robin Holt drivers/misc/sgi-xp/xpc_main.c | 15 ++++++--------- drivers/misc/sgi-xp/xpc_sn2.c | 15 ++++++--------- 2 files changed, 12 insertions(+), 18 deletions(-) commit 41760d0e0f1a013e607956eaf22a60ff6dd03784 Author: Kees Cook Date: Sat Oct 21 12:09:17 2017 -0700 drivers/pcmcia: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Cc: David Howells Cc: Arnd Bergmann Cc: linux-pcmcia@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Kees Cook Acked-by: Russell King # for soc_common.c drivers/pcmcia/bcm63xx_pcmcia.c | 6 +++--- drivers/pcmcia/bfin_cf_pcmcia.c | 6 +++--- drivers/pcmcia/i82365.c | 6 ++---- drivers/pcmcia/omap_cf.c | 8 ++++---- drivers/pcmcia/pd6729.c | 7 +++---- drivers/pcmcia/soc_common.c | 7 +++---- drivers/pcmcia/tcic.c | 8 +++----- drivers/pcmcia/yenta_socket.c | 7 +++---- 8 files changed, 24 insertions(+), 31 deletions(-) commit 6243d38fc0775e9dc1a38835aef55efb273ac4d5 Author: Kees Cook Date: Sun Oct 22 14:43:33 2017 -0700 drivers/memstick: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Maxim Levitsky Cc: Alex Dubov Signed-off-by: Kees Cook drivers/memstick/host/jmb38x_ms.c | 10 ++++++---- drivers/memstick/host/r592.c | 7 +++---- drivers/memstick/host/tifm_ms.c | 6 +++--- 3 files changed, 12 insertions(+), 11 deletions(-) commit 0788f28575801dadbddbfbe11e0bcc8174fffee3 Author: Kees Cook Date: Sat Oct 21 13:43:53 2017 -0700 drivers/macintosh: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Kees Cook drivers/macintosh/smu.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 200d24d63303cc2131c9da571f4ef72887e3aa82 Author: Kees Cook Date: Wed Oct 11 15:55:48 2017 -0700 hwrng/xgene-rng: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Matt Mackall Cc: Herbert Xu Cc: linux-crypto@vger.kernel.org Signed-off-by: Kees Cook drivers/char/hw_random/xgene-rng.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 607a6301074fecfb855f08ecdd65b18d089e4143 Author: Kees Cook Date: Thu Oct 19 14:08:22 2017 -0700 auxdisplay: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Paul Burton Cc: Miguel Ojeda Sandonis Signed-off-by: Kees Cook Reviewed-by: Paul Burton Tested-by: Paul Burton # for img-ascii-lcd drivers/auxdisplay/img-ascii-lcd.c | 10 ++++------ drivers/auxdisplay/panel.c | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) commit db275f2a02cd35d7a53564100ccf18ccb8a1130d Author: Kees Cook Date: Mon Oct 9 21:26:26 2017 -0700 sparc/led: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Adds a static variable to hold timeout value. Cc: "David S. Miller" Cc: Geliang Tang Cc: Ingo Molnar Cc: sparclinux@vger.kernel.org Signed-off-by: Kees Cook arch/sparc/kernel/led.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit a66b899dfbb51201e6ee176d77f27885dc362fc6 Author: Kees Cook Date: Mon Oct 9 21:42:26 2017 -0700 mips: ip22/32: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Adds a static variable to hold timeout value. Cc: Ralf Baechle Cc: Paul Gortmaker Cc: Ingo Molnar Cc: James Hogan Cc: Arnd Bergmann Cc: linux-mips@linux-mips.org Signed-off-by: Kees Cook arch/mips/sgi-ip22/ip22-reset.c | 26 ++++++++++++-------------- arch/mips/sgi-ip32/ip32-reset.c | 21 ++++++++++----------- 2 files changed, 22 insertions(+), 25 deletions(-) commit 96d130824f6f965418c2c36061842c354ab60178 Author: Kees Cook Date: Tue Oct 10 17:13:01 2017 -0700 arm: pxa: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Adds a static variable to hold the interrupt private data pointer. Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Kees Cook arch/arm/mach-pxa/lubbock.c | 15 ++++++--------- arch/arm/mach-pxa/sharpsl_pm.c | 8 ++++---- 2 files changed, 10 insertions(+), 13 deletions(-) commit b7bea32f0cc42b155eac995e60c97cff56390376 Author: Kees Cook Date: Thu Oct 19 16:30:38 2017 -0700 ARM: footbridge: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Kees Cook arch/arm/mach-footbridge/dc21285.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) commit 2c513d4f7da7d5616d9e19232376edd4e18fef24 Author: Kees Cook Date: Thu Oct 19 14:24:01 2017 -0700 ia64: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. One less trivial change was removing the repeated casting for callers of bte_error_handler() by fixing its function declaration and adding a small wrapper for the timer callback instead. Cc: Tony Luck Cc: Fenghua Yu Cc: Ingo Molnar Cc: Joe Perches Cc: Andrew Morton Cc: Thomas Gleixner Cc: Sebastian Andrzej Siewior Cc: linux-ia64@vger.kernel.org Signed-off-by: Kees Cook arch/ia64/include/asm/sn/bte.h | 4 +++- arch/ia64/kernel/mca.c | 8 ++++---- arch/ia64/kernel/salinfo.c | 5 ++--- arch/ia64/sn/kernel/bte.c | 12 ++++++++---- arch/ia64/sn/kernel/bte_error.c | 17 ++++++----------- arch/ia64/sn/kernel/huberror.c | 2 +- arch/ia64/sn/kernel/mca.c | 5 ++--- 7 files changed, 26 insertions(+), 27 deletions(-) commit d8479a21a98baf1bb50426986d15605cee96ec36 Author: Kees Cook Date: Thu Oct 19 16:40:49 2017 -0700 xtensa: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Signed-off-by: Kees Cook arch/xtensa/platforms/iss/console.c | 9 ++++----- arch/xtensa/platforms/iss/network.c | 13 +++++-------- 2 files changed, 9 insertions(+), 13 deletions(-) commit 3142692a5e94a45a50abd78b4ae1c52f75eae41e Author: Kees Cook Date: Thu Oct 19 16:37:43 2017 -0700 x86, calgary: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Muli Ben-Yehuda Cc: Jon Mason Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: iommu@lists.linux-foundation.org Signed-off-by: Kees Cook arch/x86/kernel/pci-calgary_64.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 5943cf4a59c831944474803223d5febec58deaad Author: Kees Cook Date: Thu Oct 12 15:47:30 2017 -0700 powerpc/watchdog: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Kees Cook arch/powerpc/kernel/watchdog.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d1cadcb7cade0f98eb4c3b1e4c808cc8169da5e3 Author: Kees Cook Date: Tue Sep 12 16:14:07 2017 -0700 watchdog: lpc18xx_wdt: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Joachim Eastwood Cc: linux-watchdog@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Kees Cook Acked-by: Guenter Roeck drivers/watchdog/lpc18xx_wdt.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 4fa42b4e5ddca6a58d8fcf24d51e6fe2f8c50253 Author: Kees Cook Date: Fri Oct 20 22:47:37 2017 -0700 watchdog: cpwd: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Switches to using the global that is used everywhere else. Cc: Wim Van Sebroeck Cc: linux-watchdog@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Guenter Roeck drivers/watchdog/cpwd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8da0edf2f90b6c74b69ad420fdd230c9bd2bd1ed Author: Kees Cook Date: Fri Oct 20 16:37:39 2017 -0700 media: pvrusb2: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Mike Isely Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Signed-off-by: Kees Cook Acked-By: Mike Isely Acked-by: Hans Verkuil drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 64 ++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 28 deletions(-) commit 43b7052426848758a7bc012b8289f358bc6995d1 Author: Kees Cook Date: Thu Oct 12 16:21:12 2017 -0700 drm/etnaviv: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Cc: David Airlie Cc: etnaviv@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Kees Cook drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit d5272003b87d5d6144745543004512cf792e345e Author: Kees Cook Date: Thu Oct 12 16:19:27 2017 -0700 ACPI / APEI: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Tony Luck Cc: Borislav Petkov Cc: Tyler Baicar Cc: Will Deacon Cc: James Morse Cc: "Jonathan (Zhixiong) Zhang" Cc: Shiju Jose Cc: linux-acpi@vger.kernel.org Signed-off-by: Kees Cook Tested-by: Tyler Baicar drivers/acpi/apei/ghes.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9b5dfbdd1f51558d321ccf15ac1e45ef1f593e83 Author: Kees Cook Date: Tue Aug 29 21:00:21 2017 -0700 fs/ncpfs: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Petr Vandrovec Cc: Jan Kara Cc: Jens Axboe Cc: Al Viro Signed-off-by: Kees Cook Reviewed-by: Jan Kara fs/ncpfs/inode.c | 4 +--- fs/ncpfs/ncp_fs_sb.h | 2 +- fs/ncpfs/sock.c | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) commit fd30b717b86dc30ffe25596f8de6542a02ae9401 Author: Kees Cook Date: Sun Oct 22 17:58:54 2017 -0700 rcu: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Lai Jiangshan Signed-off-by: Kees Cook kernel/rcu/rcutorture.c | 4 ++-- kernel/rcu/tree_plugin.h | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) commit 30f3b0678ce6fc46bcdde61ca35821032d0f25b5 Author: Arnd Bergmann Date: Thu Nov 2 23:39:54 2017 +0100 soc: amlogic: gx pm domain: add PM and OF dependencies The new driver introduces harmless warnings: warning: (PM_RMOBILE && ARCH_RCAR_GEN1 && ARCH_RCAR_GEN2 && ARCH_R7S72100 && MESON_GX_PM_DOMAINS) selects PM_GENERIC_DOMAINS which has unmet direct dependencies (PM) warning: (MESON_GX_PM_DOMAINS) selects PM_GENERIC_DOMAINS_OF which has unmet direct dependencies (PM_GENERIC_DOMAINS && OF) This adds CONFIG_OF and CONFIG_PM dependencies to ensure it will only be enabled in valid configurations. Fixes: 75fcb5ca4b46 ("soc: amlogic: add Meson GX VPU Domains driver") Signed-off-by: Arnd Bergmann drivers/soc/amlogic/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 16271224bcf09f7bbc9b00f70df7928a3e75fc89 Merge: 20b2fc7 30863e38 Author: Richard Weinberger Date: Thu Nov 2 22:30:37 2017 +0100 Merge tag 'nand/for-4.15' of git://git.infradead.org/l2-mtd From Boris: " Core changes: * Add a flag to mark NANDs that require 3 address cycles to encode a page address * Set a default ECC/free layout when NAND_ECC_NONE is requested * Fix a bug in panic_nand_write() Driver changes: * Another batch of cleanups for the denali driver * Fix PM support in the atmel driver * Remove support for platform data in the omap driver * Fix subpage write in the omap driver * Fix irq handling in the mtk driver * Change link order of mtk_ecc and mtk_nand drivers to speed up boot time * Change log level of ECC error messages in the mxc driver * Patch the pxa3xx driver to support Armada 8k platforms * Add BAM DMA support to the qcom driver * Convert gpio-nand to the GPIO desc API * Fix ECC handling in the mt29f driver " commit 20b2fc79a224dd4741e1481e5bff39d02a416fcc Merge: 0b07194 ec0a9f6 Author: Richard Weinberger Date: Thu Nov 2 22:29:24 2017 +0100 Merge tag 'spi-nor/for-4.15' of git://git.infradead.org/l2-mtd This pull-request contains the following notable changes: From Cyrille: " Core changes: * Introduce system power management support. * New mechanism to select the proper .quad_enable() hook by JEDEC ID, when needed, instead of only by manufacturer ID. * Add support to new memory parts from Gigadevice, Winbond, Macronix and Everspin. Driver changes: * Maintainance for Cadence, Intel, Mediatek and STM32 drivers. " commit 5e25f5db6abb96ca8ee2aaedcb863daa6dfcc07a Author: Dongli Zhang Date: Wed Nov 1 09:46:33 2017 +0800 xen/time: do not decrease steal time after live migration on xen After guest live migration on xen, steal time in /proc/stat (cpustat[CPUTIME_STEAL]) might decrease because steal returned by xen_steal_lock() might be less than this_rq()->prev_steal_time which is derived from previous return value of xen_steal_clock(). For instance, steal time of each vcpu is 335 before live migration. cpu 198 0 368 200064 1962 0 0 1340 0 0 cpu0 38 0 81 50063 492 0 0 335 0 0 cpu1 65 0 97 49763 634 0 0 335 0 0 cpu2 38 0 81 50098 462 0 0 335 0 0 cpu3 56 0 107 50138 374 0 0 335 0 0 After live migration, steal time is reduced to 312. cpu 200 0 370 200330 1971 0 0 1248 0 0 cpu0 38 0 82 50123 500 0 0 312 0 0 cpu1 65 0 97 49832 634 0 0 312 0 0 cpu2 39 0 82 50167 462 0 0 312 0 0 cpu3 56 0 107 50207 374 0 0 312 0 0 Since runstate times are cumulative and cleared during xen live migration by xen hypervisor, the idea of this patch is to accumulate runstate times to global percpu variables before live migration suspend. Once guest VM is resumed, xen_get_runstate_snapshot_cpu() would always return the sum of new runstate times and previously accumulated times stored in global percpu variables. Comment above HYPERVISOR_suspend() has been removed as it is inaccurate: the call can return an error code (e.g., possibly -EPERM in the future). Similar and more severe issue would impact prior linux 4.8-4.10 as discussed by Michael Las at https://0xstubs.org/debugging-a-flaky-cpu-steal-time-counter-on-a-paravirtualized-xen-guest, which would overflow steal time and lead to 100% st usage in top command for linux 4.8-4.10. A backport of this patch would fix that issue. [boris: added linux/slab.h to driver/xen/time.c, slightly reformatted commit message] References: https://0xstubs.org/debugging-a-flaky-cpu-steal-time-counter-on-a-paravirtualized-xen-guest Signed-off-by: Dongli Zhang Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky drivers/xen/manage.c | 7 ++--- drivers/xen/time.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++-- include/xen/xen-ops.h | 1 + 3 files changed, 73 insertions(+), 7 deletions(-) commit 26c860d5579684528114c3875ef88f7796330eb5 Merge: af91113 1f3493f Author: Dave Airlie Date: Fri Nov 3 05:32:08 2017 +1000 Merge branch 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux into drm-next A few fixes for DC for 4.15. * 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu/display: fix integer arithmetic problem drm/amdgpu/display: remove unused REG_OFFSET macro drm/amdgpu/display: provide ASSERT macros unconditionally drm/amd/display: Read resource_straps from registers for DCE12 drm/amd: Add DCE12 resource strap registers drm/amd/display: Explicitly call ->reset for each object drm/amd/display: Use single fail label in init_drm_dev drm/amd/display: Use plane pointer to avoid line breaks drm/amd/display: fix null pointer dereference amdgpu/dc: Avoid dereferencing NULL pointer drm/amd/display: Don't print error when bo_pin is interrupted drm/amd/display: Use constants from atom.h for HDMI caps read drm/amd/display: check if modeset is required before adding plane drm/amd/display: fix high part address in dm_plane_helper_prepare_fb() drm/amd/display : add high part address calculation for underlay drm/amd/display: Fix no display on Fiji Revert "drm/amd/display: Match actual state during S3 resume." commit 9ad472e337f830118bb589f756d2759f642228bb Merge: 85f6e0f 894a829 Author: Dave Airlie Date: Fri Nov 3 05:12:24 2017 +1000 Merge tag 'drm-amdkfd-next-2017-11-02' of git://people.freedesktop.org/~gabbayo/linux into drm-next - Usermode Events The current events code implemented some data structures (waitqueue, fifo) that were already implemented in the kernel. The patches below addresses this issue by replacing them with the standard kernel implementation. In addition, they simplify allocation of events IDs and memory for the events. The patches also increase the maximum number of events while maintaining compatibility with the older userspace library. - Remove radeon support Because Kaveri is fully supported in amdgpu and because current and future versions of userspace libraries will only support amdgpu, we removed radeon support from kfd. Current users can move to amdgpu while using the same userspace libraries. - Various bug fixes and cleanups * tag 'drm-amdkfd-next-2017-11-02' of git://people.freedesktop.org/~gabbayo/linux: (26 commits) drm/amdkfd: Minor cleanups drm/amdkfd: Update queue_count before mapping queues drm/amdkfd: Cleanup DQM ASIC-specific ops drm/amdkfd: Register/Deregister process on qpd resolution drm/amdkfd: Fix debug unregister procedure on process termination drm/amdkfd: Avoid calling amd_iommu_unbind_pasid() when suspending drm/amdkfd: Disable CP/SDMA ring/doorbell in MQD drm/amdkfd: Clean up the data structure in kfd_process drm/radeon: deprecate and remove KFD interface drm/amdkfd: use a high priority workqueue for IH work drm/amdkfd: wait only for IH work on IH exit drm/amdkfd: increase IH num entries to 8192 drm/amdkfd: use standard kernel kfifo for IH drm/amdkfd: increase limit of signal events to 4096 per process drm/amdkfd: Make event limit dependent on user mode mapping size drm/amdkfd: Use IH context ID for signal lookup drm/amdkfd: Simplify event ID and signal slot management drm/amdkfd: Simplify events page allocator drm/amdkfd: Use wait_queue_t to implement event waiting drm/amdkfd: remove redundant kfd_event_waiter.input_index ... commit 85f6e0f63ed5f4faaf38514738368f704002dfaf Merge: 2ef7a95 710931c Author: Dave Airlie Date: Fri Nov 3 05:10:37 2017 +1000 Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next Some amdgpu/ttm fixes. * 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux: drm/amd/powerplay: wrong control mode cause the fan spins faster unnecessarily drm/amd/powerplay: fix memory leak of hardcoded pptable drm/amdgpu:add fw-vram-usage for atomfirmware drm/radeon: fix atombios on big endian drm/ttm:fix memory leak due to individualize drm/amdgpu: fix error handling in amdgpu_bo_do_create drm/ttm: once more fix ttm_buffer_object_transfer drm/amd/powerplay: change ASIC temperature reading on Vega10 commit eb54a522f164f89587381d665307d53acf75f114 Author: Ryder Lee Date: Fri Oct 20 17:46:47 2017 +0800 arm: dts: mt7623: remove unused compatible string for pio node MT7623 has its own compatible in pinctrl driver so we don't need the backward compatible for it. Signed-off-by: Ryder Lee Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt7623.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e4316d6f2ccdeb2776d13651d32a6107cced274c Author: Ryder Lee Date: Fri Oct 20 17:46:46 2017 +0800 arm: dts: mt7623: update usb related nodes The current usb related nodes are out-of-date, so we make them be consistent with the binding documents. Signed-off-by: Ryder Lee Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt7623.dtsi | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit a336ba44feb2b022872987e97125e3283d07bfc2 Author: Ryder Lee Date: Fri Oct 20 17:46:45 2017 +0800 arm: dts: mt7623: update crypto node This patch updates compatible string and clocks for the crypto node. Signed-off-by: Ryder Lee Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt7623.dtsi | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 722c908f84c67bf120105ca870675cadc1bb7b20 Merge: 10d94ff 61dc367 Author: Thomas Gleixner Date: Thu Nov 2 19:18:08 2017 +0100 Merge tag 'irqchip-4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull the second batch of irqchip updates for 4.15 from marc Zyngier: - A number of MIPS GIC updates and cleanups - One GICv4 update - Another firmware workaround for GICv2 - Support for Mason8 GPIOs - Tiny documentation fix commit 20ef800babd03d3d0b5aca212ac4df935e4cef2e Author: Arnd Bergmann Date: Thu Nov 2 15:30:20 2017 +0100 usb: mtu3: fix dma_addr_t printk output again The support for 36-bit addresses originally came with an incorrect printk format for dma addresses. Felipe changed the format string it while applying, but the result was still incorrect, since we now have to pass a pointer to the address instead of the integer value: drivers/usb/mtu3/mtu3_qmu.c: In function 'mtu3_prepare_tx_gpd': drivers/usb/mtu3/mtu3_qmu.c:261:25: error: format '%p' expects argument of type 'void *', but argument 7 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=] drivers/usb/mtu3/mtu3_qmu.c: In function 'mtu3_prepare_rx_gpd': drivers/usb/mtu3/mtu3_qmu.c:300:25: error: format '%p' expects argument of type 'void *', but argument 7 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=] This fixes the printk argument accordingly. Fixes: 1a46dfea0841 ("usb: mtu3: support 36-bit DMA address") Signed-off-by: Arnd Bergmann Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/mtu3/mtu3_qmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9506b146fad96b2888732a12711d6a3cec5ec4d4 Author: Arnd Bergmann Date: Thu Nov 2 15:34:27 2017 +0100 usb: xhci: tegra: use time64_t for printing timestamp The time_t type and time_to_tm() function are deprecated because of y2038 problems. In this driver, they are used to pretty-print the timestamp of the firmware build. This is fine as long as we don't get a firmware build past 2038. Converting to time64_t and time64_to_tm() avoids the deprecated interfaces and works until 2106, when the firmware-defined data structure overflows. Signed-off-by: Arnd Bergmann Acked-by: Thierry Reding Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-tegra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e226fb5affccca98c405de80527180224d93d251 Merge: e6b3b2e 7ac7676 Author: Kalle Valo Date: Thu Nov 2 19:48:25 2017 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.15. Major changes: wil6210 * remove ssid debugfs file commit 1f3493faa8d73b0332d46ea79448b10b66fb1af0 Author: Arnd Bergmann Date: Thu Nov 2 12:26:43 2017 +0100 drm/amdgpu/display: fix integer arithmetic problem gcc warns about an ambiguous integer calculation: drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c: In function 'calculate_bandwidth': drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:534:5: error: this decimal constant is unsigned only in ISO C90 [-Werror] data->lb_line_pitch = bw_ceil2(bw_mul(bw_div(bw_frc_to_fixed(2401171875, 100000000), bw_int_to_fixed(3)), bw_ceil2(data->source_width_in_lb, bw_int_to_fixed(8))), bw_int_to_fixed(48)); ^~~~ Marking the constant as explicitly unsigned makes it work fine everywhere without warnings. Reviewed-by: Harry Wentland Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8d46ae97ffd4ace4b8a7f45c232ff4bb8b6c129 Author: Arnd Bergmann Date: Thu Nov 2 12:26:42 2017 +0100 drm/amdgpu/display: remove unused REG_OFFSET macro The name conflicts with another macro of the same name on the ARM ixp4xx platform, leading to build errors. Neither of the users actually should use a name that generic, but the other one was here first and the dc driver doesn't actually use it. Reviewed-by: Harry Wentland Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dm_services.h | 3 --- 1 file changed, 3 deletions(-) commit 5e096ef3b29e6113a7aa6a7dc4871987efa99bcb Author: Vishal Verma Date: Mon Oct 30 13:22:23 2017 -0700 nfit_test: when clearing poison, also remove badrange entries The injected badrange entries can only be cleared from the kernel's accounting by writing to the affected blocks, so when such a write sends the clear errror DSM to nfit_test, also clear the ranges from nfit_test's badrange list. This lets an 'ARS Inject error status' DSM to return the correct status, omitting the cleared ranges. Cc: Dave Jiang Cc: Dan Williams Signed-off-by: Vishal Verma Reviewed-by: Dave Jiang Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 89360b87c3efa5d265a3b43dd8fc245c8f4356e3 Author: Vishal Verma Date: Mon Oct 30 13:22:21 2017 -0700 libnvdimm, badrange: remove a WARN for list_empty Now that we're reusing the badrange functions for nfit_test, and that exposes badrange injection/clearing to userspace via the DSM paths, it is plausible that a user may call the clear DSM multiple times. Since it is harmless to do so, we can remove the WARN in badrange_forget. Cc: Dave Jiang Cc: Dan Williams Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/nvdimm/badrange.c | 1 - 1 file changed, 1 deletion(-) commit 9fb1a1903345fea598f48277576a3589a972b72e Author: Dave Jiang Date: Mon Oct 30 13:22:20 2017 -0700 nfit_test: add error injection DSMs Add nfit_test emulation for the new ACPI 6.2 error injectino DSMs. This will allow unit tests to selectively inject the errors they wish to test for. Signed-off-by: Dave Jiang [vishal: Move injection functions to ND_CMD_CALL] [vishal: Add support for the notification option] [vishal: move an nfit_test private definition into a local header] Signed-off-by: Vishal Verma Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 187 +++++++++++++++++++++++++++++----- tools/testing/nvdimm/test/nfit_test.h | 5 + 2 files changed, 168 insertions(+), 24 deletions(-) commit aa9ad44a42b4cf4387f8ecddaf8e51707fdcda5a Author: Dave Jiang Date: Wed Aug 23 12:48:26 2017 -0700 libnvdimm: move poison list functions to a new 'badrange' file nfit_test needs to use the poison list manipulation code as well. Make it more generic and in the process rename poison to badrange, and move all the related helpers to a new file. Signed-off-by: Dave Jiang [vishal: Add badrange.o to nfit_test's Kbuild] [vishal: add a missed include in bus.c for the new badrange functions] [vishal: rename all instances of 'be' to 'bre'] Signed-off-by: Vishal Verma Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 2 +- drivers/acpi/nfit/mce.c | 2 +- drivers/nvdimm/Makefile | 1 + drivers/nvdimm/badrange.c | 294 ++++++++++++++++++++++++++++++++++++++++++++ drivers/nvdimm/bus.c | 24 ++-- drivers/nvdimm/core.c | 260 +-------------------------------------- drivers/nvdimm/nd-core.h | 3 +- drivers/nvdimm/nd.h | 6 - include/linux/libnvdimm.h | 21 +++- tools/testing/nvdimm/Kbuild | 1 + 10 files changed, 332 insertions(+), 282 deletions(-) commit d8eed8263aa09c0c92416d06321eae4ad3eda343 Author: Arnd Bergmann Date: Thu Nov 2 15:24:40 2017 +0100 drm/amdgpu/display: provide ASSERT macros unconditionally It seems impossible to build this driver without setting either CONFIG_DEBUG_KERNEL or CONFIG_DEBUG_DRIVER: drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h: In function 'set_reg_field_value_ex': drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:132:2: error: implicit declaration of function 'ASSERT'; did you mean 'IS_ERR'? [-Werror=implicit-function-declaration] This moves the ASSERT() macro and related helpers outside of the #ifdef to get it to build again. Reviewed-by: Harry Wentland Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/os_types.h | 4 ---- 1 file changed, 4 deletions(-) commit e6b3b2ed3d270b3c7080c9cf7d28636dc74b0387 Author: Amitkumar Karwar Date: Wed Nov 1 17:42:45 2017 +0530 rsi: fix kbuild reported build errors with CONFIG_PM off Some wowlan related code was outside CONFIG_PM flag which caused these build errors. They are fixed by moving that code under CONFIG_PM flag. Reported-by: kbuild test robot Fixes: ef71ed0608c ("rsi: sdio: Add WOWLAN support for S5 shutdown state") Fixes: a24e35fcee0 ("rsi: sdio: Add WOWLAN support for S4 hibernate state") Fixes: e1ced6422a3 ("rsi: sdio: add WOWLAN support for S3 suspend state") Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_mac80211.c | 5 ++++- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 2 ++ drivers/net/wireless/rsi/rsi_common.h | 2 ++ drivers/net/wireless/rsi/rsi_mgmt.h | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) commit 39f1332c526cd9d6de59a72520e8334e54b62cda Author: Amitkumar Karwar Date: Wed Nov 1 17:42:44 2017 +0530 rsi: move rsi_sdio_reinit_device() out of CONFIG_PM This function is generic. It doesn't contain wowlan specific code. It should not be under CONFIG_PM. This patch resolves compilation errors observed when CONFIG_PM flag is disabled. Reported-by: kbuild test robot Fixes: ef71ed0608c ("rsi: sdio: Add WOWLAN support for S5 shutdown state") Fixes: a24e35fcee0 ("rsi: sdio: Add WOWLAN support for S4 hibernate state") Fixes: e1ced6422a3 ("rsi: sdio: add WOWLAN support for S3 suspend state") Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_sdio.c | 52 ++++++++++++++++----------------- drivers/net/wireless/rsi/rsi_sdio.h | 1 - 2 files changed, 26 insertions(+), 27 deletions(-) commit 6d6ab940dc8b1c84fc86195c0f15a82ef282c8a3 Merge: 9ffd986 c010150 Author: Paolo Bonzini Date: Thu Nov 2 18:21:26 2017 +0100 Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD Apart from various bugfixes and code cleanups, the major new feature is the ability to run guests using the hashed page table (HPT) MMU mode on a host that is using the radix MMU mode. Because of limitations in the current POWER9 chip (all SMT threads in each core must use the same MMU mode, HPT or radix), this requires the host to be configured to run similar to POWER8: the host runs in single-threaded mode (only thread 0 of each core online), and have KVM be able to wake up the other threads when a KVM guest is to be run, and use the other threads for running guest VCPUs. A new module parameter, called "indep_threads_mode", is normally Y on POWER9 but must be set to N before any HPT guests can be run on a radix host: # echo N >/sys/module/kvm_hv/parameters/indep_threads_mode # ppc64_cpu --smt=off Signed-off-by: Paolo Bonzini commit 4a74635ce23a4b8758047a733faf791e38032263 Author: Leo (Sunpeng) Li Date: Wed Nov 1 10:24:51 2017 -0400 drm/amd/display: Read resource_straps from registers for DCE12 Now that the registers exist, assign them to the resource_straps struct. v2: Fix indentation v3: Fix trailing whitespace and checkpatch warnings. bug: https://bugs.freedesktop.org/show_bug.cgi?id=103404 Reviewed-by: Harry Wentland Signed-off-by: Leo (Sunpeng) Li Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce120/dce120_resource.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit b7fa8519057319aef8405923dc8fa6782fce969f Author: Leo (Sunpeng) Li Date: Tue Oct 31 16:28:57 2017 -0400 drm/amd: Add DCE12 resource strap registers We need them for initializing audio properly. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/asic_reg/vega10/DC/dce_12_0_offset.h | 4 ++++ drivers/gpu/drm/amd/include/asic_reg/vega10/DC/dce_12_0_sh_mask.h | 8 ++++++++ 2 files changed, 12 insertions(+) commit 96719c5439b4d75bfd6b3c5cb24f1a8e537125bb Author: Harry Wentland Date: Fri Oct 20 08:43:40 2017 -0400 drm/amd/display: Explicitly call ->reset for each object We need to avoid calling reset after detection because the next commit adds freesync properties on the atomic_state which are set during detection. Calling reset after this clears them. The easiest way to accomplish this right now is to call ->reset on the connector right after creation but before detection. To stay consistent call ->reset on every other object as well after creation. v2: Provide better reason for this change in commit msg. Signed-off-by: Harry Wentland Reviewed-by: Roman Li Acked-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit cd8a2ae8dc08a92d4804a7adda645f1f8d1f7586 Author: Harry Wentland Date: Fri Oct 20 08:28:59 2017 -0400 drm/amd/display: Use single fail label in init_drm_dev No need for multiple labels as kfree will always do a NULL check before freeing the memory. Signed-off-by: Harry Wentland Reviewed-by: Bhawanpreet Lakha Reviewed-by: Tony Cheng Acked-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 24 +++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) commit efa6a8b7ca0f1c6073a2ac7f5a02f8ea333daf92 Author: Harry Wentland Date: Fri Oct 20 08:42:41 2017 -0400 drm/amd/display: Use plane pointer to avoid line breaks Signed-off-by: Harry Wentland Reviewed-by: Mikita Lipski Reviewed-by: Tony Cheng Acked-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 55d9038b0c680ec90e3a7d2440e717ac6a2a8064 Author: Shirish S Date: Thu Oct 26 11:47:42 2017 +0530 drm/amd/display: fix null pointer dereference While setting cursor position in case of mpo, input_pixel_processor is not available for underlay, hence add check of the same to avoid null pointer access issue. Signed-off-by: Shirish S Reviewed-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5ba60fefa00ca789c4eb35df38b171d532b3155 Author: Drew Davenport Date: Fri Oct 27 12:34:46 2017 -0600 amdgpu/dc: Avoid dereferencing NULL pointer crtc is dereferenced from within drm_atomic_get_new_crtc_state, so check for NULL before initializing new_crtc_state. Signed-off-by: Drew Davenport Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 30b7c6147d18d77c6120a8f689d04d2518d3f5e4 Author: Harry Wentland Date: Thu Oct 26 15:35:14 2017 -0400 drm/amd/display: Don't print error when bo_pin is interrupted v2: Also don't print for ERESTARTSYS or EAGAIN v3: Best practice is to only ignore ERESTARTSYS Signed-off-by: Harry Wentland Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cc57306f426e3953118f1fcf8a7254dbad46c5f6 Author: Andrew Jiang Date: Fri Oct 20 16:40:45 2017 -0400 drm/amd/display: Use constants from atom.h for HDMI caps read Get rid of the constant we copied over before and just directly use the constants from the file. Signed-off-by: Andrew Jiang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 29ce32ecca842d73cd1c82f540a6fbde5d1ad44b Merge: dc586a6 7c36e6e Author: Greg Kroah-Hartman Date: Thu Nov 2 17:42:47 2017 +0100 Merge tag 'usb-serial-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v4.15-rc1 Here are the USB-serial updates for 4.15-rc1, including: - three fixes for longstanding issues in garmin_gps and metro-usb which could lead to NULL-pointer dereferences and memory leaks - a workaround for broken f81534 firmware-handling of overruns - f81534 break support, and - conversion to timer_setup() Included are also various clean ups and a new qcserial device id. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold commit 6297fabd93f93182245383ba7de56bef829a796b Merge: d7e17fe ece1996 Author: Corey Minyard Date: Thu Nov 2 11:19:15 2017 -0500 Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux into for-next The IPMI SI driver was split into different pieces, merge the module tree to accountfor that. Signed-off-by: Corey Minyard commit ab953b9db3a1169fbc675c8de3d2dab919ce3211 Author: Stephen Boyd Date: Wed Nov 1 22:06:19 2017 -0700 regulator: qcom_spmi: Include offset when translating voltages This driver converts voltages from a non-linear range in hardware to a linear range in software and vice versa. During the conversion, we exclude certain voltages that are invalid to use because the software interface is more flexible than reality. For example, the FTSMPS2P5 regulators have a voltage range from 80000uV to 1355000uV that software could support, but we only want to use the range of 350000uV to 1355000uV. If we don't account for the hw selectors between 80000uV and 350000uV we'll pick a hw selector of 0 to mean 350000uV when it really means 80000uV. This can cause us to program voltages into the hardware that are significantly lower than what we're expecting. And when we read it back from the hardware we'll have the same problem, voltages that are in the invalid band will end up being calculated as some software selector that represents a larger voltage than what is programmed and the user will be confused. Fix all this by properly offsetting the software selector and hw selector when converting from one number space to another. Fixes: 1b5b19689278 ("regulator: qcom_spmi: Only use selector based regulator ops") Signed-off-by: Stephen Boyd Signed-off-by: Mark Brown drivers/regulator/qcom_spmi-regulator.c | 39 ++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 6 deletions(-) commit 61dc367e5d767e1c56147f6e497d13cc2771abb1 Author: Paul Burton Date: Tue Oct 31 09:41:51 2017 -0700 irqchip: mips-gic: Make IPI bitmaps static We have 2 bitmaps used to keep track of interrupts dedicated to IPIs in the MIPS GIC irqchip driver. These bitmaps are only used from the one compilation unit of that driver, and so can be made static. Do so in order to avoid polluting the symbol table & global namespace. Signed-off-by: Paul Burton Cc: Jason Cooper Cc: Marc Zyngier Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Signed-off-by: Marc Zyngier drivers/irqchip/irq-mips-gic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5af3e93e16b39231f04623469eb4ac0e4406c0d1 Author: Paul Burton Date: Tue Oct 31 09:41:50 2017 -0700 irqchip: mips-gic: Share register writes in gic_set_type() The gic_set_type() function included writes to the MIPS GIC polarity, trigger & dual-trigger registers in each case of a switch statement determining the IRQs type. This is all well & good when we only have a single cluster & thus a single GIC whose register we want to update. It will lead to significant duplication once we have multi-cluster support & multiple GICs to update. Refactor this such that we determine values for the polarity, trigger & dual-trigger registers and then have a single set of register writes following the switch statement. This will allow us to write the same values to each GIC in a multi-cluster system in a later patch, rather than needing to duplicate more register writes in each case. Signed-off-by: Paul Burton Cc: Jason Cooper Cc: Marc Zyngier Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Signed-off-by: Marc Zyngier drivers/irqchip/irq-mips-gic.c | 46 +++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) commit 82857688ca749cc9a91ff1f4495cc20f834a9f7d Author: Paul Burton Date: Tue Oct 31 09:41:49 2017 -0700 irqchip: mips-gic: Remove gic_vpes variable Following the past few patches nothing uses the gic_vpes variable any longer. Remove the dead code. Signed-off-by: Paul Burton Cc: Jason Cooper Cc: Marc Zyngier Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Signed-off-by: Marc Zyngier drivers/irqchip/irq-mips-gic.c | 5 ----- 1 file changed, 5 deletions(-) commit 25c51dad664d1e69f90541c2558a39fd86a506e6 Author: Paul Burton Date: Tue Oct 31 09:41:48 2017 -0700 irqchip: mips-gic: Use num_possible_cpus() to reserve IPIs Reserving a number of IPIs based upon the number of VPs reported by the GIC makes little sense for a few reasons: - The kernel may have been configured with NR_CPUS less than the number of VPs in the cluster, in which case using gic_vpes causes us to reserve more interrupts for IPIs than we will possibly use. - If a kernel is configured without support for multi-threading & runs on a system with multi-threading & multiple VPs per core then we'll similarly reserve more interrupts for IPIs than we will possibly use. - In systems with multiple clusters the GIC can only provide us with the number of VPs in its cluster, not across all clusters. In this case we'll reserve fewer interrupts for IPIs than we need. Fix these issues by using num_possible_cpus() instead, which in all cases is actually indicative of how many IPIs we may need. Signed-off-by: Paul Burton Cc: Jason Cooper Cc: Marc Zyngier Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Signed-off-by: Marc Zyngier drivers/irqchip/irq-mips-gic.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 890f6b55e5a5cc4e1a2efe36026c6fe3fb253b3b Author: Paul Burton Date: Tue Oct 31 09:41:47 2017 -0700 irqchip: mips-gic: Configure EIC when CPUs come online Rather than configuring EIC mode for all CPUs during boot, configure it locally on each when they come online. This will become important with multi-cluster support, since clusters may be powered on & off (for example via hotplug) and would lose the EIC configuration when powered off. Signed-off-by: Paul Burton Cc: Jason Cooper Cc: Marc Zyngier Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Signed-off-by: Marc Zyngier drivers/irqchip/irq-mips-gic.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 25ac19e1b076e52c41d713138cb21d6dd2339440 Author: Paul Burton Date: Tue Oct 31 09:41:46 2017 -0700 irqchip: mips-gic: Mask local interrupts when CPUs come online We currently walk through the range 0..gic_vpes-1, expecting these values all to be valid Linux CPU numbers to provide to mips_cm_vp_id(), and masking all routable local interrupts during boot. This approach has a few drawbacks: - In multi-cluster systems we won't have access to all CPU's GIC local registers when the driver is probed, since clusters (and their GICs) may be powered down at this point & only brought online later. - In multi-cluster systems we may power down clusters at runtime, for example if we offline all CPUs within it via hotplug, and the cluster's GIC may lose state. We therefore need to reinitialise it when powering back up, which this approach does not take into account. - The range 0..gic_vpes-1 may not all be valid Linux CPU numbers, for example if we run a kernel configured to support fewer CPUs than the system it is running on actually has. In this case we'll get garbage values from mips_cm_vp_id() as we read past the end of the cpu_data array. Fix this and simplify the code somewhat by writing an all-bits-set value to the VP-local reset mask register when a CPU is brought online, before any local interrupts are configured for it. This removes the need for us to access all CPUs during driver probe, removing all of the problems described above. In the name of simplicity we drop the checks for routability of interrupts and simply clear the mask bits for all interrupts. Bits for non-routable local interrupts will have no effect so there's no point performing extra work to avoid modifying them. Signed-off-by: Paul Burton Cc: Jason Cooper Cc: Marc Zyngier Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Signed-off-by: Marc Zyngier drivers/irqchip/irq-mips-gic.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit da61fcf9d62a05f3508f5646d353a9c2604bac76 Author: Paul Burton Date: Tue Oct 31 09:41:45 2017 -0700 irqchip: mips-gic: Use irq_cpu_online to (un)mask all-VP(E) IRQs The gic_all_vpes_local_irq_controller chip currently attempts to operate on all CPUs/VPs in the system when masking or unmasking an interrupt. This has a few drawbacks: - In multi-cluster systems we may not always have access to all CPUs in the system. When all CPUs in a cluster are powered down that cluster's GIC may also power down, in which case we cannot configure its state. - Relatedly, if we power down a cluster after having configured interrupts for CPUs within it then the cluster's GIC may lose state & we need to reconfigure it. The current approach doesn't take this into account. - It's wasteful if we run Linux on fewer VPs than are present in the system. For example if we run a uniprocessor kernel on CPU0 of a system with 16 CPUs then there's no point in us configuring CPUs 1-15. - The implementation is also lacking in that it expects the range 0..gic_vpes-1 to represent valid Linux CPU numbers which may not always be the case - for example if we run on a system with more VPs than the kernel is configured to support. Fix all of these issues by only configuring the affected interrupts for CPUs which are online at the time, and recording the configuration in a new struct gic_all_vpes_chip_data for later use by CPUs being brought online. We register a CPU hotplug state (reusing CPUHP_AP_IRQ_GIC_STARTING which the ARM GIC driver uses, and which seems suitably generic for reuse with the MIPS GIC) and execute irq_cpu_online() in order to configure the interrupts on the newly onlined CPU. Signed-off-by: Paul Burton Cc: Jason Cooper Cc: Marc Zyngier Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Signed-off-by: Marc Zyngier drivers/irqchip/irq-mips-gic.c | 72 ++++++++++++++++++++++++++++++++---------- include/linux/cpuhotplug.h | 1 + 2 files changed, 57 insertions(+), 16 deletions(-) commit 63b746b19fa660737df603f97fd5f435c511d1b5 Author: Paul Burton Date: Tue Oct 31 09:41:44 2017 -0700 irqchip: mips-gic: Inline gic_local_irq_domain_map() The gic_local_irq_domain_map() function has only one callsite in gic_irq_domain_map(), and the split between the two functions makes it unclear that they duplicate calculations & checks. Inline gic_local_irq_domain_map() into gic_irq_domain_map() in order to clean this up. Doing this makes the following small issues obvious, and the patch tidies them up: - Both functions used GIC_HWIRQ_TO_LOCAL() to convert a hwirq number to a local IRQ number. We now only do this once. Although the compiler ought to have optimised this away before anyway, the change leaves us with less duplicate code. - gic_local_irq_domain_map() had a check for invalid local interrupt numbers (intr > GIC_LOCAL_INT_FDC). This condition can never occur because any hwirq higher than those used for local interrupts is a shared interrupt, which gic_irq_domain_map() already handles separately. We therefore remove this check. - The decision of whether to map the interrupt to gic_cpu_pin or timer_cpu_pin can be handled within the existing switch statement in gic_irq_domain_map(), shortening the code a little. The change additionally prepares us nicely for the following patch of the series which would otherwise need to duplicate the check for whether a local interrupt should be percpu_devid or just percpu (ie. the switch statement from gic_irq_domain_map()) in gic_local_irq_domain_map(). Signed-off-by: Paul Burton Cc: Jason Cooper Cc: Marc Zyngier Cc: Thomas Gleixner Cc: linux-mips@linux-mips.org Signed-off-by: Marc Zyngier drivers/irqchip/irq-mips-gic.c | 58 ++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 36 deletions(-) commit 4e4cb1b183d6e9df57f4e54c8b1a5231995da820 Author: Martin Blumenstingl Date: Mon Oct 30 00:05:21 2017 +0100 irqchip/meson-gpio: add support for Meson8 SoCs Meson8 uses the same GPIO interrupt controller IP block as the other Meson SoCs. A total of 134 pins can be spied on, which is the sum of: - 22 pins on bank GPIOX - 17 pins on bank GPIOY - 30 pins on bank GPIODV - 10 pins on bank GPIOH - 15 pins on bank GPIOZ - 7 pins on bank CARD - 19 pins on bank BOOT - 14 pins in the AO domain Acked-by: Kevin Hilman Acked-by: Rob Herring Signed-off-by: Martin Blumenstingl Signed-off-by: Marc Zyngier .../bindings/interrupt-controller/amlogic,meson-gpio-intc.txt | 1 + drivers/irqchip/irq-meson-gpio.c | 5 +++++ 2 files changed, 6 insertions(+) commit 4b82130077d93539c9fbb0f5eee21965cea9cfe9 Author: Dou Liyang Date: Mon Oct 30 10:15:00 2017 +0800 irqdomain: Update the comments of fwnode field of irq_domain structure Commit: f110711a6053 ("irqdomain: Convert irqdomain-%3Eof_node to fwnode") converted of_node field to fwnode, but didn't update its comments. Update it. Fixes: f110711a6053 ("irqdomain: Convert irqdomain-%3Eof_node to fwnode") Signed-off-by: Dou Liyang Signed-off-by: Marc Zyngier include/linux/irqdomain.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0962289b1cd91534f7111e763d3e6a17dcd47ecb Author: Marc Zyngier Date: Fri Oct 27 10:34:22 2017 +0200 irqchip/gic: Deal with broken firmware exposing only 4kB of GICv2 CPU interface There is a lot of broken firmware out there that don't really expose the information the kernel requires when it comes with dealing with GICv2: (1) Firmware that only describes the first 4kB of GICv2 (2) Firmware that describe 128kB of CPU interface, while the usable portion of the address space is between 60 and 68kB So far, we only deal with (2). But we have platforms exhibiting behaviour (1), resulting in two sub-cases: (a) The GIC is occupying 8kB, as required by the GICv2 architecture (b) It is actually spread 128kB, and this is likely to be a version of (2) This patch tries to work around both (a) and (b) by poking at the outside of the described memory region, and try to work out what is actually there. This is of course unsafe, and should only be enabled if there is no way to otherwise fix the DT provided by the firmware (we provide a "irqchip.gicv2_force_probe" option to that effect). Note that for the time being, we restrict ourselves to GICv2 implementations provided by ARM, since there I have no knowledge of an alternative implementations. This could be relaxed if such an implementation comes to light on a broken platform. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Documentation/admin-guide/kernel-parameters.txt | 7 +++ drivers/irqchip/irq-gic.c | 71 +++++++++++++++++++++---- 2 files changed, 69 insertions(+), 9 deletions(-) commit d4d7b4ad2f05c03fb25252aea66f9f3cd7cfbe06 Author: Marc Zyngier Date: Thu Oct 26 10:44:07 2017 +0100 irqchip/gic-v3-its: Setup VLPI properties at map time So far, we require the hypervisor to update the VLPI properties once the the VLPI mapping has been established. While this makes it easy for the ITS driver, it creates a window where an incoming interrupt can be delivered with an unknown set of properties. Not very nice. Instead, let's add a "properties" field to the mapping structure, and use that to configure the VLPI before it actually gets mapped. Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 18 ++++++++++++++++-- include/linux/irqchip/arm-gic-v4.h | 2 ++ 2 files changed, 18 insertions(+), 2 deletions(-) commit a92d4d1454ab8b43b80b89fa31fcedb8821f8164 Author: Xie XiuQi Date: Thu Nov 2 12:12:42 2017 +0000 arm64: entry.S: move SError handling into a C function for future expansion Today SError is taken using the inv_entry macro that ends up in bad_mode. SError can be used by the RAS Extensions to notify either the OS or firmware of CPU problems, some of which may have been corrected. To allow this handling to be added, add a do_serror() C function that just panic()s. Add the entry.S boiler plate to save/restore the CPU registers and unmask debug exceptions. Future patches may change do_serror() to return if the SError Interrupt was notification of a corrected error. Signed-off-by: Xie XiuQi Signed-off-by: Wang Xiongfeng [Split out of a bigger patch, added compat path, renamed, enabled debug exceptions] Signed-off-by: James Morse Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/kernel/entry.S | 36 +++++++++++++++++++++++++++++------- arch/arm64/kernel/traps.c | 13 +++++++++++++ 2 files changed, 42 insertions(+), 7 deletions(-) commit b282e1ce29bb677224ba8fb38e94f5e94e2656d5 Author: James Morse Date: Thu Nov 2 12:12:41 2017 +0000 arm64: entry.S: convert elX_irq Following our 'dai' order, irqs should be processed with debug and serror exceptions unmasked. Add a helper to unmask these two, (and fiq for good measure). Signed-off-by: James Morse Reviewed-by: Julien Thierry Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 5 +++++ arch/arm64/kernel/entry.S | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 746647c75afb5a1706426c2563ff02884a15530d Author: James Morse Date: Thu Nov 2 12:12:40 2017 +0000 arm64: entry.S convert el0_sync el0_sync also unmasks exceptions on a case-by-case basis, debug exceptions are enabled, unless this was a debug exception. Irqs are unmasked for some exception types but not for others. el0_dbg should run with everything masked to prevent us taking a debug exception from do_debug_exception. For the other cases we can unmask everything. This changes the behaviour of fpsimd_{acc,exc} and el0_inv which previously ran with irqs masked. This patch removed the last user of enable_dbg_and_irq, remove it. Signed-off-by: James Morse Reviewed-by: Julien Thierry Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 9 --------- arch/arm64/kernel/entry.S | 24 ++++++++++-------------- 2 files changed, 10 insertions(+), 23 deletions(-) commit b55a5a1b0a7d4f51b6c8eec0d4d78ace8f5fa2b3 Author: James Morse Date: Thu Nov 2 12:12:39 2017 +0000 arm64: entry.S: convert el1_sync el1_sync unmasks exceptions on a case-by-case basis, debug exceptions are unmasked, unless this was a debug exception. IRQs are unmasked for instruction and data aborts only if the interupted context had irqs unmasked. Following our 'dai' order, el1_dbg should run with everything masked. For the other cases we can inherit whatever we interrupted. Add a macro inherit_daif to set daif based on the interrupted pstate. Signed-off-by: James Morse Reviewed-by: Julien Thierry Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 6 ++++++ arch/arm64/kernel/entry.S | 12 ++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) commit 84d0fb1bb6257d5d5d45f5e3554ab441b4ff5a74 Author: James Morse Date: Thu Nov 2 12:12:38 2017 +0000 arm64: entry.S: Remove disable_dbg enable_step_tsk is the only user of disable_dbg, which doesn't respect our 'dai' order for exception masking. enable_step_tsk may enable single-step, so previously needed to mask debug exceptions to prevent us from single-stepping kernel_exit. enable_step_tsk is called at the end of the ret_to_user loop, which has already masked all exceptions so this is no longer needed. Remove disable_dbg, add a comment that enable_step_tsk's caller should have masked debug. Signed-off-by: James Morse Reviewed-by: Julien Thierry Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 8d66772e869e79ffb94eed7492ca3d2267e150e8 Author: James Morse Date: Thu Nov 2 12:12:37 2017 +0000 arm64: Mask all exceptions during kernel_exit To take RAS Exceptions as quickly as possible we need to keep SError unmasked as much as possible. We need to mask it during kernel_exit as taking an error from this code will overwrite the exception-registers. Adding a naked 'disable_daif' to kernel_exit causes a performance problem for micro-benchmarks that do no real work, (e.g. calling getpid() in a loop). This is because the ret_to_user loop has already masked IRQs so that the TIF_WORK_MASK thread flags can't change underneath it, adding disable_daif is an additional self-synchronising operation. In the future, the RAS APEI code may need to modify the TIF_WORK_MASK flags from an SError, in which case the ret_to_user loop must mask SError while it examines the flags. Disable all exceptions for return to EL1. For return to EL0 get the ret_to_user loop to leave all exceptions masked once it has done its work, this avoids an extra pstate-write. Signed-off-by: James Morse Reviewed-by: Julien Thierry Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/kernel/entry.S | 10 +++++----- arch/arm64/kernel/signal.c | 8 ++++++-- 2 files changed, 11 insertions(+), 7 deletions(-) commit 41bd5b5d22b77c7300df2a2fa5397cbe785189b4 Author: James Morse Date: Thu Nov 2 12:12:36 2017 +0000 arm64: Move the async/fiq helpers to explicitly set process context flags Remove the local_{async,fiq}_{en,dis}able macros as they don't respect our newly defined order and are only used to set the flags for process context when we bring CPUs online. Add a helper to do this. The IRQ flag varies as we want it masked on the boot CPU until we are ready to handle interrupts. The boot CPU unmasks SError during early boot once it can print an error message. If we can print an error message about SError, we can do the same for FIQ. Debug exceptions are already enabled by __cpu_setup(), which has also configured MDSCR_EL1 to disable MDE and KDE. Signed-off-by: James Morse Reviewed-by: Julien Thierry Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/daifflags.h | 3 +++ arch/arm64/include/asm/irqflags.h | 6 ------ arch/arm64/kernel/setup.c | 8 +++++--- arch/arm64/kernel/smp.c | 3 +-- 4 files changed, 9 insertions(+), 11 deletions(-) commit 65be7a1b799f11ff16f4c154ba4cf82eeb722ec7 Author: James Morse Date: Thu Nov 2 12:12:35 2017 +0000 arm64: introduce an order for exceptions Currently SError is always masked in the kernel. To support RAS exceptions using SError on hardware with the v8.2 RAS Extensions we need to unmask SError as much as possible. Let's define an order for masking and unmasking exceptions. 'dai' is memorable and effectively what we have today. Disabling debug exceptions should cause all other exceptions to be masked. Masking SError should mask irq, but not disable debug exceptions. Masking irqs has no side effects for other flags. Keeping to this order makes it easier for entry.S to know which exceptions should be unmasked. FIQ is never expected, but we mask it when we mask debug exceptions, and unmask it at all other times. Given masking debug exceptions masks everything, we don't need macros to save/restore that bit independently. Remove them and switch the last caller over to use the daif calls. Signed-off-by: James Morse Reviewed-by: Julien Thierry Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/irqflags.h | 34 +++++++++++++--------------------- arch/arm64/kernel/debug-monitors.c | 5 +++-- 2 files changed, 16 insertions(+), 23 deletions(-) commit 0fbeb318754860b37150fd42c2058d636a431426 Author: James Morse Date: Thu Nov 2 12:12:34 2017 +0000 arm64: explicitly mask all exceptions There are a few places where we want to mask all exceptions. Today we do this in a piecemeal fashion, typically we expect the caller to have masked irqs and the arch code masks debug exceptions, ignoring serror which is probably masked. Make it clear that 'mask all exceptions' is the intention by adding helpers to do exactly that. This will let us unmask SError without having to add 'oh and SError' to these paths. Signed-off-by: James Morse Reviewed-by: Julien Thierry Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 17 ++++++++++ arch/arm64/include/asm/daifflags.h | 69 ++++++++++++++++++++++++++++++++++++++ arch/arm64/kernel/hibernate.c | 5 +-- arch/arm64/kernel/machine_kexec.c | 4 +-- arch/arm64/kernel/smp.c | 9 ++--- arch/arm64/kernel/suspend.c | 7 ++-- arch/arm64/kernel/traps.c | 3 +- arch/arm64/mm/proc.S | 9 +++-- 8 files changed, 104 insertions(+), 19 deletions(-) commit 05f3647359f8bf44e000122cee6a848f5129e2e3 Merge: 7bdeb7f 9e66317 Author: Marc Zyngier Date: Thu Nov 2 15:53:54 2017 +0000 Merge tag 'v4.14-rc3' into irq/irqchip-4.15 Required merge to get mainline irqchip updates. Signed-off-by: Marc Zyngier commit da18392fd04d9579e1c11d8aefa80626a1763959 Merge: 707ad7e d9ecbef Author: Arnd Bergmann Date: Thu Nov 2 16:39:46 2017 +0100 Merge tag 'omap-for-v4.15/coccinelle-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc Pull "omap coccinelle warning fixes for v4.15 merge window" from Tony Lindgren: Few coccinelle robot clean-up patches for careless human coding issues for v4.15 merge window sent by their human operatorrrrrs. * tag 'omap-for-v4.15/coccinelle-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP3: Delete an unnecessary variable initialisation in omap3xxx_hwmod_init() ARM: OMAP3: Use common error handling code in omap3xxx_hwmod_init() ARM: omap1: add const and initconst to omap_lcd_config commit d29d30782acd9266c0afed08cb8f40a95e4f2212 Merge: 18ea0db a067fb4 Author: Arnd Bergmann Date: Thu Nov 2 16:37:53 2017 +0100 Merge tag 'socfpga_dts_for_v4.15_part2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/dt Pull "SoCFPGA DTS updates for v4.15, part 2" from Dinh Nguyen: - Stratix10 platform update - Enable GPIO and LEDs for Stratix10 devkit * tag 'socfpga_dts_for_v4.15_part2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: dts: stratix10: fix interrupt number for gpio1 arm64: dts: stratix10: enable gpio and leds arm64: dts: stratix10: add gpio header commit e54a7867f3c6a631ccfdc6db86f33a2fac4e103e Merge: 51d3290 8fca9e9 Author: Arnd Bergmann Date: Thu Nov 2 16:36:23 2017 +0100 Merge tag 'amlogic-drivers-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/drivers Pull "Amlogic drivers for v4.15, round 2" from Kevin Hilman: - add PM domain driver for GX VPU * tag 'amlogic-drivers-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: dt-bindings: power: add amlogic meson power domain bindings soc: amlogic: add Meson GX VPU Domains driver commit 51d3290c3ad6ba691bd66df8ead6e7c19dc995f1 Author: Lorenzo Pieralisi Date: Tue Oct 24 16:02:33 2017 +0100 drivers/firmware: psci_checker: Add missing destroy_timer_on_stack() The PSCI checker suspend_test_thread() function (ie executed for the suspend test) requires an on-stack timer to carry out the test it executes; it sets it up through the setup_timer_on_stack() API. setup_timer_on_stack() requires its counterpart destroy_timer_on_stack() to be called when the timer is disposed of but the PSCI checker code is currently missing that call, leaving the timer object in an incosistent state when the PSCI checker stops the thread executing the suspend test. Add the missing destroy_timer_on_stack() call to fix the omission. Fixes: ea8b1c4a6019 ("drivers: psci: PSCI checker module") Signed-off-by: Lorenzo Pieralisi Reported-by: Kees Cook Cc: Kees Cook Cc: Mark Rutland Signed-off-by: Arnd Bergmann drivers/firmware/psci_checker.c | 1 + 1 file changed, 1 insertion(+) commit 9855b3db5121a3900f43e9392285b44b71247adc Merge: 84cbda2 f32fbba Author: Arnd Bergmann Date: Thu Nov 2 16:29:56 2017 +0100 Merge tag 'v4.14-next-soc' of https://github.com/mbgg/linux-mediatek into next/drivers Pull "Mediatek: soc driver updates for v4.15" from Matthias Brugger: - add 32 bit read/write support to pwrap - add mt7622 support to pwrap - test build all mediatek soc drivers - fix compiler issues - clean up Kconfig description * tag 'v4.14-next-soc' of https://github.com/mbgg/linux-mediatek: soc: mediatek: pwrap: fix fatal compiler error soc: mediatek: pwrap: fix compiler errors arm64: mediatek: cleanup message for platform selection soc: Allow test-building of MediaTek drivers soc: mediatek: place Kconfig for all SoC drivers under menu soc: mediatek: pwrap: add support for MT7622 SoC soc: mediatek: pwrap: add common way for setup CS timing extenstion soc: mediatek: pwrap: add MediaTek MT6380 as one slave of pwrap soc: mediatek: pwrap: refactor pwrap_init for the various PMIC types soc: mediatek: pwrap: add pwrap_write32 for writing in 32-bit mode soc: mediatek: pwrap: add pwrap_read32 for reading in 32-bit mode dt-bindings: arm: mediatek: add MT7622 string to the PMIC wrapper doc ARM: mediatek: Cocci spatch "of_table" soc: mediatek: pwrap: fixup warnings from coding style commit 84cbda2fec8813fc40b33e6d8e0f2476ab43d5ce Merge: f3e69db faec5ee Author: Arnd Bergmann Date: Thu Nov 2 16:28:44 2017 +0100 Merge tag 'at91-ab-4.15-soc' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/drivers Pull "soc for 4.15" from Alexandre Belloni: - add SoC ids for the sama5d2 SiPs - Improve the AT91 maintainers entry * tag 'at91-ab-4.15-soc' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: MAINTAINERS: Add SoC drivers to AT91 entry drivers: soc: atmel: Add basic support for new sama5d2 SiPs commit f3e69db2c0346d2f66ea91b6e157f8749cfddaf4 Merge: ae1d77f 5e68c0f Author: Arnd Bergmann Date: Thu Nov 2 16:26:05 2017 +0100 Merge tag 'amlogic-drivers' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/drivers Pull "Amlogic drivers for v4.15" from Kevin Hilman: - add SoC info driver for 32-bit Amlogic SoCs * tag 'amlogic-drivers' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: soc: amlogic: Add Meson6/Meson8/Meson8b/Meson8m2 SoC Information driver commit ae1d77fce71637b86a99ade650609cd3df34b295 Merge: 5e9b41f d1de6d6 Author: Arnd Bergmann Date: Thu Nov 2 16:24:36 2017 +0100 Merge tag 'qcom-drivers-for-4.15-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/drivers Pull "Qualcomm ARM Based Driver Updates for v4.15 Part 2" from Andy Gross: * Add Qualcomm Remote Filesystem Memory driver * Add OF linkage for RMTFS * tag 'qcom-drivers-for-4.15-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/agross/linux: soc: qcom: Remote filesystem memory driver dt-binding: soc: qcom: Add binding for rmtfs memory of: reserved_mem: Accessor for acquiring reserved_mem of/platform: Generalize /reserved-memory handling commit 5e9b41ff0968e94bdae030296cce94f418b74ed3 Merge: 3330bec 595f3a9 Author: Arnd Bergmann Date: Thu Nov 2 16:22:21 2017 +0100 Merge tag 'keystone_soc_drivers_4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/drivers Pull "Keystone SOC for 4.15" from Santosh Shilimkar * tag 'keystone_soc_drivers_4.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: ti_sci: Use %pS printk format for direct addresses commit 3330becb479fd26cfeeea1e06f8999c3b10806cc Merge: 78af0be 04c3767 Author: Arnd Bergmann Date: Thu Nov 2 16:21:03 2017 +0100 Merge tag 'arm-soc/for-4.15/drivers-part2' of http://github.com/Broadcom/stblinux into next/drivers Pull "Broadcom drivers changes for 4.15 (part 2)" from Florian Fainelli: This pull request contains Broadcom ARM/ARM64/MIPS SoCs changes for 4.15 (second part), please pull the following: - Markus updates the Broadcom STB DPFE driver to avoid loading the firmware when unnecessary to accomodate for specific platform restrictions - Florian adds support for the Broadcom Hurricane 2 SoC iProc PLL clock needed to get the proper CPU clock frequency * tag 'arm-soc/for-4.15/drivers-part2' of http://github.com/Broadcom/stblinux: clk: bcm: Add Broadcom Hurricane 2 clock support memory: brcmstb: dpfe: skip downloading firmware when possible memory: brcmstb: dpfe: introduce is_dcpu_enabled() commit dcbefc30fbc2c1926bcecdd62579e3e107653d82 Author: David Howells Date: Thu Nov 2 15:06:26 2017 +0000 rxrpc: Fix call expiry handling Fix call expiry handling in the following ways (1) If all the request data from a client call is acked, don't send a follow up IDLE ACK with firstPacket == 1 and previousPacket == 0 as this appears to fool some servers into thinking everything has been accepted. (2) Never send an abort back to the server once it has ACK'd all the request packets; rather just try to reuse the channel for the next call. The first request DATA packet of the next call on the same channel will implicitly ACK the entire reply of the dead call - even if we haven't transmitted it yet. (3) Don't send RX_CALL_TIMEOUT in an ABORT packet, librx uses abort codes to pass local errors to the caller in addition to remote errors, and this is meant to be local only. The following also need to be addressed in future patches: (4) Service calls should send PING ACKs as 'keep alives' if the server is still processing the call. (5) VERSION REPLY packets should be sent to the peers of service connections to act as keep-alives. This is used to keep firewall routes in place. The AFS CM should enable this. Signed-off-by: David Howells net/rxrpc/call_event.c | 2 +- net/rxrpc/input.c | 2 -- net/rxrpc/output.c | 10 ++++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) commit 1457cc4cfb93511de347d1d0a1c9da3e826b66fe Author: David Howells Date: Thu Nov 2 15:06:55 2017 +0000 rxrpc: Fix a null ptr deref in rxrpc_fill_out_ack() rxrpc_fill_out_ack() needs to be passed the connection pointer from its caller rather than using call->conn as the call may be disconnected in parallel with it, clearing call->conn, leading to: BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 IP: rxrpc_send_ack_packet+0x231/0x6a4 Signed-off-by: David Howells net/rxrpc/output.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 78af0be67b297c3c4207b034e24c94e14c66b20c Merge: 4e53097 7afebed Author: Arnd Bergmann Date: Thu Nov 2 16:17:30 2017 +0100 Merge tag 'tegra-for-4.15-thermal' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers Pull "thermal: tegra: Changes for v4.15-rc1" from Thierry Reding: This contains the Tegra186 BPMP thermal driver. It is used to monitor and access several thermal sensors found in the SoC. * tag 'tegra-for-4.15-thermal' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux: thermal: Add Tegra BPMP thermal sensor driver dt-bindings: Add bindings for nvidia,tegra186-bpmp-thermal dt-bindings: clock: tegra: Add sor1_out clock commit 4e53097313523727bea5b786685f16191ec44b5d Merge: 097924c 775dba8 Author: Arnd Bergmann Date: Thu Nov 2 16:16:09 2017 +0100 Merge tag 'tegra-for-4.15-soc' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers Pull "soc/tegra: Changes for v4.15-rc1" from Thierry Reding: Contains a fix to the generic power domain driver to properly report errors propagated from BPMP. * tag 'tegra-for-4.15-soc' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: bpmp: Check BPMP response return code commit 097924c67798164dbbb2b856b171b5257343ac4b Merge: 1c6788e f2381f6 Author: Arnd Bergmann Date: Thu Nov 2 16:14:18 2017 +0100 Merge tag 'tegra-for-4.15-firmware' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers Pull "firmware: tegra: Changes for v4.15-rc1" from Thierry Reding: This contains a couple of (non-critical) fixes and improvements for the BPMP driver as well as support for debugfs. * tag 'tegra-for-4.15-firmware' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: Add BPMP debugfs support firmware: tegra: Add stubs when BPMP not enabled firmware: tegra: Expose tegra_bpmp_mrq_return() firmware: tegra: Propagate error code to caller commit 20acbd9a7aeee0b0af7107f3de791a52c949f3ac Author: David Howells Date: Thu Nov 2 15:06:08 2017 +0000 rxrpc: Lock around calling a kernel service Rx notification Place a spinlock around the invocation of call->notify_rx() for a kernel service call and lock again when ending the call and replace the notification pointer with a pointer to a dummy function. This is required because it's possible for rxrpc_notify_socket() to be called after the call has been ended by the kernel service if called from the asynchronous work function rxrpc_process_call(). However, rxrpc_notify_socket() currently only holds the RCU read lock when invoking ->notify_rx(), which means that the afs_call struct would need to be disposed of by call_rcu() rather than by kfree(). But we shouldn't see any notifications from a call after calling rxrpc_kernel_end_call(), so a lock is required in rxrpc code. Without this, we may see the call wait queue as having a corrupt spinlock: BUG: spinlock bad magic on CPU#0, kworker/0:2/1612 general protection fault: 0000 [#1] SMP ... Workqueue: krxrpcd rxrpc_process_call task: ffff88040b83c400 task.stack: ffff88040adfc000 RIP: 0010:spin_bug+0x161/0x18f RSP: 0018:ffff88040adffcc0 EFLAGS: 00010002 RAX: 0000000000000032 RBX: 6b6b6b6b6b6b6b6b RCX: ffffffff81ab16cf RDX: ffff88041fa14c01 RSI: ffff88041fa0ccb8 RDI: ffff88041fa0ccb8 RBP: ffff88040adffcd8 R08: 00000000ffffffff R09: 00000000ffffffff R10: ffff88040adffc60 R11: 000000000000022c R12: ffff88040aca2208 R13: ffffffff81a58114 R14: 0000000000000000 R15: 0000000000000000 .... Call Trace: do_raw_spin_lock+0x1d/0x89 _raw_spin_lock_irqsave+0x3d/0x49 ? __wake_up_common_lock+0x4c/0xa7 __wake_up_common_lock+0x4c/0xa7 ? __lock_is_held+0x47/0x7a __wake_up+0xe/0x10 afs_wake_up_call_waiter+0x11b/0x122 [kafs] rxrpc_notify_socket+0x12b/0x258 rxrpc_process_call+0x18e/0x7d0 process_one_work+0x298/0x4de ? rescuer_thread+0x280/0x280 worker_thread+0x1d1/0x2ae ? rescuer_thread+0x280/0x280 kthread+0x12c/0x134 ? kthread_create_on_node+0x3a/0x3a ret_from_fork+0x27/0x40 In this case, note the corrupt data in EBX. The address of the offending afs_call is in R12, plus the offset to the spinlock. Signed-off-by: David Howells net/rxrpc/af_rxrpc.c | 16 ++++++++++++++++ net/rxrpc/ar-internal.h | 1 + net/rxrpc/call_object.c | 1 + net/rxrpc/recvmsg.c | 2 ++ 4 files changed, 20 insertions(+) commit 88a96fa84186deadb8b1ecc8cb066cd7afeb5bf2 Author: Juerg Haefliger Date: Wed Oct 4 04:24:41 2017 -0400 jfs: Add missing NULL pointer check in __get_metapage alloc_metapage can return a NULL pointer so check for that. Signed-off-by: Juerg Haefliger Signed-off-by: Dave Kleikamp fs/jfs/jfs_metapage.c | 2 ++ 1 file changed, 2 insertions(+) commit c10f0d06ad2652913acd21a630f4c2a97cebbfbd Author: Yisheng Xie Date: Wed Nov 1 17:46:19 2017 +0800 arm64: suspend: remove useless included file After commit 9e8e865bbe29 ("arm64: unify idmap removal"), we no need to flush tlb in suspend.c, so the included file tlbflush.h can be removed. Signed-off-by: Yisheng Xie Signed-off-by: Will Deacon arch/arm64/kernel/suspend.c | 1 - 1 file changed, 1 deletion(-) commit 474f5da2354e9fd5376b968e4c5a0f1807dc19e8 Author: Arnd Bergmann Date: Thu Nov 2 12:42:00 2017 +0100 skd: use ktime_get_real_seconds() Like many storage drivers, skd uses an unsigned 32-bit number for interchanging the current time with the firmware. This will overflow in y2106 and is otherwise safe. However, the get_seconds() function is generally considered deprecated since the behavior is different between 32-bit and 64-bit architectures, and using it may indicate a bigger problem. To annotate that we've thought about this, let's add a comment here and migrate to the ktime_get_real_seconds() function that consistently returns a 64-bit number. Signed-off-by: Arnd Bergmann Signed-off-by: Jens Axboe drivers/block/skd_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c091fbe9a26ee116d99e2c0ed010afb957a10365 Author: Arnd Bergmann Date: Thu Nov 2 12:19:32 2017 +0100 block: fix CDROM dependency on BLK_DEV After the cdrom cleanup, I get randconfig warnings for some configurations: warning: (BLK_DEV_IDECD && BLK_DEV_SR) selects CDROM which has unmet direct dependencies (BLK_DEV) This adds an explicit BLK_DEV dependency for both drivers. The other drivers that select 'CDROM' already have this and don't need a change. Fixes: 2a750166a5be ("block: Rework drivers/cdrom/Makefile") Signed-off-by: Arnd Bergmann Signed-off-by: Jens Axboe drivers/ide/Kconfig | 1 + drivers/scsi/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 379777297cb130b8b23f82b34ea889c31e828a8c Author: Kees Cook Date: Mon Oct 30 14:45:00 2017 -0700 mmc: dw_mmc: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jaehoon Chung Cc: Ulf Hansson Cc: linux-mmc@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 93c23ae385299f889606b42507b12b40e50d6088 Author: Douglas Anderson Date: Thu Oct 12 13:11:18 2017 -0700 mmc: dw_mmc: Cleanup the DTO timer like the CTO one The recent CTO timer introduced in commit 03de19212ea3 ("mmc: dw_mmc: introduce timer for broken command transfer over scheme") was causing observable problems due to race conditions. Previous patches have fixed those race conditions. It can be observed that these same race conditions ought to be theoretically possible with the DTO timer too though they are massively less likely to happen because the data timeout is always set to 0xffffff right now. That means even at a 200 MHz card clock we were arming the DTO timer for 94 ms: >>> (0xffffff * 1000. / 200000000) + 10 93.886075 We always also were setting the DTO timer _after_ starting the transfer, unlike how the old code was seting the CTO timer. In any case, even though the DTO timer is much less likely to have races, it still makes sense to add code to handle it _just in case_. Signed-off-by: Douglas Anderson Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 55 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 3 deletions(-) commit eaaffcefaa8015aaf496590707ddfa70905e0001 Merge: 2d1d31d 9d9491a Author: Ulf Hansson Date: Thu Nov 2 15:20:33 2017 +0100 Merge branch 'fixes' into next commit 2d1d31dda766b146bbd77db5e4e1534f64c92c2b Author: Markus Elfring Date: Fri Oct 27 21:21:40 2017 +0200 mmc: vub300: Use common code in __download_offload_pseudocode() Add a jump target so that a specific string copy operation is stored only once at the end of this function implementation. Replace two calls of the function "strncpy" by goto statements. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Ulf Hansson drivers/mmc/host/vub300.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 7f8e446b032bd6bbcec7c2f068d0a4f2d5929249 Author: Markus Elfring Date: Fri Oct 27 19:09:17 2017 +0200 mmc: tmio: Use common error handling code in tmio_mmc_host_probe() * Add a jump target so that a bit of exception handling can be better reused at the end of this function. * Adjust condition checks. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 2ee4f6200597bda9713e28a9c1e65a392615b4b5 Author: Kees Cook Date: Tue Oct 24 08:03:45 2017 -0700 mmc: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Ludovic Desroches Cc: Ulf Hansson Cc: Jaehoon Chung Cc: Carlo Caione Cc: Kevin Hilman Cc: Nicolas Pitre Cc: Jarkko Lavinen Cc: Adrian Hunter Cc: Alex Dubov Cc: Bruce Chang Cc: Harald Welte Cc: Tony Olech Cc: Pierre Ossman Cc: Linus Walleij Cc: Paul Cercueil Cc: Heiner Kallweit Cc: Shawn Lin Cc: Arvind Yadav Cc: Allen Cc: linux-mmc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-omap@vger.kernel.org Cc: linux-usb@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Ulf Hansson drivers/mmc/host/atmel-mci.c | 13 ++++++------- drivers/mmc/host/jz4740_mmc.c | 7 +++---- drivers/mmc/host/meson-mx-sdio.c | 7 +++---- drivers/mmc/host/mvsdio.c | 6 +++--- drivers/mmc/host/mxcmmc.c | 7 +++---- drivers/mmc/host/omap.c | 20 +++++++++----------- drivers/mmc/host/sdhci.c | 13 ++++++------- drivers/mmc/host/tifm_sd.c | 6 +++--- drivers/mmc/host/via-sdmmc.c | 6 +++--- drivers/mmc/host/vub300.c | 17 +++++++++-------- drivers/mmc/host/wbsd.c | 7 +++---- 11 files changed, 51 insertions(+), 58 deletions(-) commit 1c451c139ee4cca63b293eb30eb4e38ab7ca05af Author: Adrian Hunter Date: Thu Oct 19 13:41:46 2017 +0300 mmc: sdhci-acpi: Fix voltage switch for some Intel host controllers Some Intel host controllers use an ACPI device-specific method to ensure correct voltage switching. Fix voltage switch for those, by adding a call to the DSM. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-acpi.c | 108 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) commit f07b7952df3b3ff014e83952b402425cf50c51ce Author: Adrian Hunter Date: Thu Oct 19 13:41:45 2017 +0300 mmc: sdhci-acpi: Let devices define their own private data Let devices define their own private data to facilitate device-specific operations. The size of the private structure is specified in the sdhci_acpi_slot structure, then sdhci_acpi_probe() will allocate extra space for it, and sdhci_acpi_priv() can be used to get a reference to it. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-acpi.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 6b10c9abfbceaf94ef227d98317020c557996186 Author: Chaotian Jing Date: Mon Oct 16 09:46:39 2017 +0800 mmc: mediatek: perfer to use rise edge latching for cmd line data lines have applied to perfer to use rise edge, also need apply it to cmd line. Signed-off-by: Chaotian Jing Tested-by: Sean Wang Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c8609b22529755be6f75d9b0aeb2577f4bfa83de Author: Chaotian Jing Date: Mon Oct 16 09:46:38 2017 +0800 mmc: mediatek: improve eMMC hs400 mode read performance enlarge outstanding value to improve read performance Signed-off-by: Chaotian Jing Tested-by: Sean Wang Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d17bb71c2c2cc2be23b1e20778fc87c80f8a7c9d Author: Chaotian Jing Date: Mon Oct 16 09:46:37 2017 +0800 mmc: mediatek: add latch-ck support some platform(eg.mt2701) does not support "stop clk fix", in this case, need set correct latch-ck to avoid crc error caused by stop clock block-internally. Signed-off-by: Chaotian Jing Tested-by: Sean Wang Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 3c1a8844369880d077f858f448afc4ef553d962a Author: Chaotian Jing Date: Mon Oct 16 09:46:36 2017 +0800 mmc: mediatek: add support of source_cg clock source clock need an independent cg to control, when doing clk mode switch, need gate source clock to avoid hw issue(multi-bit sync hw hang) Signed-off-by: Chaotian Jing Tested-by: Sean Wang Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit d9dcbfc880126b193eab418d7b64b3774cb57152 Author: Chaotian Jing Date: Mon Oct 16 09:46:35 2017 +0800 mmc: mediatek: add stop_clk fix and enhance_rx support mt2712 supports stop_clk fix and enhance_rx, which can improve host stability. Signed-off-by: Chaotian Jing Tested-by: Sean Wang Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) commit acde28c434623bde0812cb3051eeea63428871e8 Author: Chaotian Jing Date: Mon Oct 16 09:46:34 2017 +0800 mmc: mediatek: add busy_check support bit7 of PATCH_BIT1 has different meaning in new design, to compatible with previous platform, clear this bit in new platform. Signed-off-by: Chaotian Jing Tested-by: Sean Wang Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 2fea581926703a7cbcf92fa7e3d74d83b5e40d3c Author: Chaotian Jing Date: Mon Oct 16 09:46:33 2017 +0800 mmc: mediatek: add async fifo and data tune support mt2701/mt2712 supports async fifo & data tune, which can improve host stability. Signed-off-by: Chaotian Jing Tested-by: Sean Wang Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 52 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) commit 39add2521f64bcd53307367902e28e91536a00c3 Author: Chaotian Jing Date: Mon Oct 16 09:46:32 2017 +0800 mmc: mediatek: add pad_tune0 support from mt2701, the register of PAD_TUNE has been phased out, while there is a new register of PAD_TUNE0 Signed-off-by: Chaotian Jing Tested-by: Sean Wang Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 51 ++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 18 deletions(-) commit 7f3d58523d12e233de9896fd26781862ca4985d6 Author: Chaotian Jing Date: Mon Oct 16 09:46:31 2017 +0800 mmc: mediatek: make hs400_tune_response only for mt8173 the origin design of hs400_tune_response is for mt8173 because of mt8173 has a special design. for doing that, we add a new member "compatible", by now it's only for mt8173. Signed-off-by: Chaotian Jing Tested-by: Sean Wang Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 689362b3c9ebfb8c6f8f903d107fb784d78e79b1 Author: Chaotian Jing Date: Mon Oct 16 09:46:30 2017 +0800 arm64: dts: mt8173: remove "mediatek, mt8135-mmc" from mmc nodes devicetree bindings has been updated to support multi-platforms, so that each platform has its owns compatible name. And, this compatible name may used in driver to distinguish with other platform. Signed-off-by: Chaotian Jing Tested-by: Sean Wang Signed-off-by: Ulf Hansson Acked-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt8173.dtsi | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 1943dc07b45e347c52c1bfdd4a37e04a86e399aa Author: Thomas Gleixner Date: Thu Nov 2 13:30:03 2017 +0100 bitops: Revert cbe96375025e ("bitops: Add clear/set_bit32() to linux/bitops.h") These ops are not endian safe and may break on architectures which have aligment requirements. Reverts: cbe96375025e ("bitops: Add clear/set_bit32() to linux/bitops.h") Reported-by: Peter Zijlstra Signed-off-by: Thomas Gleixner Cc: Andi Kleen include/linux/bitops.h | 26 -------------------------- 1 file changed, 26 deletions(-) commit 06dd688ddda5819025e014b79aea9af6ab475fa2 Author: Thomas Gleixner Date: Thu Nov 2 13:22:35 2017 +0100 x86/cpuid: Replace set/clear_bit32() Peter pointed out that the set/clear_bit32() variants are broken in various aspects. Replace them with open coded set/clear_bit() and type cast cpu_info::x86_capability as it's done in all other places throughout x86. Fixes: 0b00de857a64 ("x86/cpuid: Add generic table for CPUID dependencies") Reported-by: Peter Ziljstra Signed-off-by: Thomas Gleixner Cc: Andi Kleen arch/x86/kernel/cpu/cpuid-deps.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 80b6eb04b5d05a472a37ae33647b213dd04e59b6 Author: Will Deacon Date: Tue Oct 31 15:56:11 2017 +0000 arm64: Don't walk page table for user faults in do_mem_abort Commit 42dbf54e8890 ("arm64: consistently log ESR and page table") dumps page table entries for user faults hitting do_bad entries in the fault handler table. Whilst this shouldn't really happen in practice, it's not beyond the realms of possibility if e.g. running an old kernel on a new CPU. Generally, we want to avoid exposing physical addresses under the control of userspace (see commit bf396c09c24 ("arm64: mm: don't print out page table entries on EL0 faults")), so walk the page tables only on exceptions from EL1. Reported-by: Kristina Martsenko Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f747c3104efd1e21528d368910afd978fbcd6a78 Author: Colin Ian King Date: Thu Nov 2 12:16:25 2017 +0000 spi: orion: remove redundant assignment of status to zero The assignment of status to zero is never read, status is either updated in the next iteration of the of the loop or several lines after the end of the loop. Remove it, cleans up clang warning: drivers/spi/spi-orion.c:674:4: warning: Value stored to 'status' is never read Signed-off-by: Colin Ian King Signed-off-by: Mark Brown drivers/spi/spi-orion.c | 1 - 1 file changed, 1 deletion(-) commit 1e4c4f610f774df6088d7c065b2dd4d22adba698 Author: Borislav Petkov Date: Thu Nov 2 13:09:26 2017 +0100 x86/entry/64: Shorten TEST instructions Convert TESTL to TESTB and save 3 bytes per callsite. No functionality change. Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171102120926.4srwerqrr7g72e2k@pd.tnic Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d2faaf0568b4946d9abeb4e541227b4ca259840 Merge: 9691cea c6dc521 Author: David S. Miller Date: Thu Nov 2 21:28:36 2017 +0900 Merge branch 'hns3-add-support-for-reset' Lipeng says: ==================== net: hns3: add support for reset There are 4 reset types for HNS3 PF driver, include global reset, core reset, IMP reset, PF reset.The core reset will reset all datapath of all functions except IMP, MAC and PCI interface. Global reset is equal with the core reset plus all MAC reset. IMP reset is caused by watchdog timer expiration, the same range with core reset. PF reset will reset whole physical function. This patchset adds reset support for hns3 driver and fix some related bugs. --- Change log: V1 -> V2: 1, fix some comments from Yunsheng Lin. ==================== Signed-off-by: David S. Miller commit c6dc52130536d6d3d750bf1097b3bc897f7ef054 Author: qumingguang Date: Thu Nov 2 20:45:23 2017 +0800 net: hns3: hns3:fix a bug about statistic counter in reset process All member of Struct hdev->hw_stats is initialized to 0 as hdev is allocated by devm_kzalloc. But in reset process, hdev will not be allocated again, so need clear hdev->hw_stats in reset process, otherwise the statistic will be wrong after reset. This patch set all of the statistic counters to zero after reset. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ae064e6123f89f90af7e4ea190cc0c612643ca93 Author: qumingguang Date: Thu Nov 2 20:45:22 2017 +0800 net: hns3: Fix a misuse to devm_free_irq we should use free_irq to free the nic irq during the unloading time. because we use request_irq to apply it when nic up. It will crash if up net device after reset the port. This patch fixes the issue. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit bb6b94a896d4dd4dcdeccca87c3fd22521c652c0 Author: Lipeng Date: Thu Nov 2 20:45:21 2017 +0800 net: hns3: Add reset interface implementation in client This patch implement the interface of reset notification in hns3_enet, it will do resetting business which include shutdown nic device, free and initialize client side resource. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 153 +++++++++++++++++++++ 1 file changed, 153 insertions(+) commit f8fa222ca57cccb066d18767010275e9e3a2b9fe Author: Lipeng Date: Thu Nov 2 20:45:20 2017 +0800 net: hns3: Add timeout process in hns3_enet This patch add timeout handler in hns3_enet.c to handle TX side timeout event, when TX timeout event occur, it will triger NIC driver into reset process. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 86 ++++++++++++++++++++++ .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.h | 2 + 2 files changed, 88 insertions(+) commit 4ed340ab8f49275a83337cb66e8f53e544f34674 Author: Lipeng Date: Thu Nov 2 20:45:19 2017 +0800 net: hns3: Add reset process in hclge_main This patch adds reset support for PF,it include : global reset, core reset, IMP reset, PF reset.The core reset will Reset all datapath of all functions except IMP, MAC and PCI interface. Global reset is equal with the core reset plus all MAC reset. IMP reset is caused by watchdog timer expiration, the same with core reset in the reset flow. PF reset will reset whole physical function. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 19 ++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 7 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 285 +++++++++++++++++++++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 15 ++ 4 files changed, 326 insertions(+) commit 466b0c00391bf160d1355489e542ecbfc86f4d98 Author: Lipeng Date: Thu Nov 2 20:45:18 2017 +0800 net: hns3: Add support for misc interrupt This patch adds initialization and deinitialization for misc interrupt. This interrupt will be used to handle reset message(IRQ). Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 5 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 74 ++++++++++++++++++++++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 2 + 3 files changed, 81 insertions(+) commit 3efb960f056d855d4b1f07095df1f313c05765f4 Author: Lipeng Date: Thu Nov 2 20:45:17 2017 +0800 net: hns3: Refactor the initialization of command queue There is no necessary to reallocate the descriptor and remap the descriptor memory in reset process, But there is still some other action exist in both reset process and initialization process. To reuse the common interface in reset process and initialization process, This patch moves out the descriptor allocate and memory maping from interface cmdq_init. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 39 +++++++++++++--------- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 1 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 9 ++++- 3 files changed, 33 insertions(+), 16 deletions(-) commit cf9cca2dd903b78d04ea7ad4cde0231988944d0f Author: qumingguang Date: Thu Nov 2 20:45:16 2017 +0800 net: hns3: Refactor mac_init function It needs initialize mdio in initialization process, but reset process does not reset mdio, so do not initialize mdio in reset process. This patch move out the mdio configuration function from the mac_init. So mac_init can be used both in reset process and initialization process. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 7df7dad633e2c6d43ee9b39c267ee0add9798384 Author: Lipeng Date: Thu Nov 2 20:45:15 2017 +0800 net: hns3: Refactor the mapping of tqp to vport This patch refactor the mapping of tqp to vport, making the maping function can be used both in the reset process and initialization process. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 61 ++++++++++++++++++---- 1 file changed, 50 insertions(+), 11 deletions(-) commit 6082a6e44434a17f194048b7d48df56f148ec6d4 Author: Randy Dunlap Date: Wed Nov 1 11:04:51 2017 -0700 kernel/time/Kconfig: Fix typo in comment Fix typo in Kconfig comment text. Signed-off-by: Randy Dunlap Signed-off-by: Thomas Gleixner Cc: John Stultz Cc: Stephen Boyd Cc: Jiri Kosina Link: https://lkml.kernel.org/r/0e586dd4-2b27-864e-c252-bc72df52fd01@infradead.org kernel/time/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9691cea91c9d35f09d6b31a5e8dbfc631d40903a Author: Arnd Bergmann Date: Thu Nov 2 12:13:36 2017 +0100 net: seeq: fix timer conversion One of the timer conversion patches evidently escaped build testing until I ran into in on ARM randconfig builds: drivers/net/ethernet/seeq/ether3.c: In function 'ether3_ledoff': drivers/net/ethernet/seeq/ether3.c:175:40: error: 'priv' undeclared (first use in this function); did you mean 'pid'? drivers/net/ethernet/seeq/ether3.c:176:27: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] This fixes the two small typos that caused the problems. Fixes: 6fd9c53f7186 ("net: seeq: Convert timers to use timer_setup()") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/ethernet/seeq/ether3.c | 2 +- drivers/net/ethernet/seeq/ether3.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2a2d7befd40c95fd0d27d14edd0ec3b479fcf21f Author: Vasily Gorbik Date: Fri Oct 27 12:44:48 2017 +0200 s390/nmi: avoid using long-displacement facility __LC_MCESAD is currently 4528 /* offsetof(struct lowcore, mcesad) */ that would require long-displacement facility for lg, which we don't have on z900. Fixes: 3037a52f9846 ("s390/nmi: do register validation as early as possible") Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/kernel/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b35be415499ad257954813f8def9c84f49f1ff34 Author: Egil Hjelmeland Date: Thu Nov 2 10:20:58 2017 +0100 net: dsa: lan9303: Added Documentation/networking/dsa/lan9303.txt Provide a rough overview of the state of the driver. And explain that the driver operates in two modes: bridged and port-separated. Signed-off-by: Egil Hjelmeland Signed-off-by: David S. Miller Documentation/networking/dsa/lan9303.txt | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 6e1a2882c6dcb680fb8776062719f51d95a0ec0b Merge: cdc89c9 18f7619 Author: David S. Miller Date: Thu Nov 2 20:27:12 2017 +0900 Merge branch 'nfp-TC-block-fixes-app-fallback-and-dev_alloc' Jakub Kicinski says: ==================== nfp: TC block fixes, app fallback and dev_alloc() This series has three parts. First of all John and I fix some fallout from the TC block conversion. John also fixes sleeping in the neigh notifier. Secondly I reorganise the nfp_app table to make it easier to deal with excluding apps which have unmet Kconfig dependencies. Last but not least after the fixes which went into -net some time ago I refactor the page allocation, add a ethtool counter for failed allocations and clean the ethtool stat code while at it. ==================== Signed-off-by: David S. Miller commit 18f76191796ad478e42528cfafcae0b11d4c8db4 Author: Jakub Kicinski Date: Thu Nov 2 01:31:36 2017 -0700 nfp: improve defines for constants in ethtool We split rvector stats into two categories - per queue and stats which are added up into one total counter. Improve the defines denoting their number. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 16f50cda06ae023cb7beb15c88233fc516c03a2a Author: Jakub Kicinski Date: Thu Nov 2 01:31:35 2017 -0700 nfp: use a counter instead of log message for allocation failures Add a counter incremented when allocation of replacement RX page fails. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net.h | 3 +++ drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 15 ++++++++++----- drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 12 +++++++----- 3 files changed, 20 insertions(+), 10 deletions(-) commit 790a399171831d31c8016a27294ef69130d3e7cc Author: Jakub Kicinski Date: Thu Nov 2 01:31:34 2017 -0700 nfp: switch to dev_alloc_page() Use the dev_alloc_page() networking helper to allocate pages for RX packets. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43b45245e5a6c274f374ecb49e5bca39f28dbfad Author: Jakub Kicinski Date: Thu Nov 2 01:31:33 2017 -0700 nfp: bpf: fall back to core NIC app if BPF not selected If kernel config does not include BPF just replace the BPF app handler with the handler for basic NIC. The BPF app will now be built only if BPF infrastructure is selected in kernel config. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 4 ++-- drivers/net/ethernet/netronome/nfp/bpf/offload.c | 3 --- drivers/net/ethernet/netronome/nfp/nfp_app.c | 4 ++++ 3 files changed, 6 insertions(+), 5 deletions(-) commit 2c4197a041dfbb5101aaa8be7b378ba69b91e765 Author: Jakub Kicinski Date: Thu Nov 2 01:31:32 2017 -0700 nfp: reorganize the app table The app table is an unordered array right now. We have to search apps by ID. It also makes it harder to fall back to core NIC if advanced functions are not compiled into the kernel (e.g. eBPF). Make the table keyed by app id. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_app.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit f449657f83532807f388b9b99cf0c3f7be65eda9 Author: Jakub Kicinski Date: Thu Nov 2 01:31:31 2017 -0700 nfp: bpf: reject TC offload if XDP loaded Recent TC changes dropped the check protecting us from trying to offload a TC program if XDP programs are already loaded. Fixes: 90d97315b3e7 ("nfp: bpf: Convert ndo_setup_tc offloads to block callbacks") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/main.c | 3 +++ 1 file changed, 3 insertions(+) commit dc4646a950153242313ed340f0a404de38b21d5c Author: John Hurley Date: Thu Nov 2 01:31:30 2017 -0700 nfp: flower: vxlan - ensure no sleep in atomic context Functions called by the netevent notifier must be in atomic context. Change the mutex to spinlock and ensure mem allocations are done with the atomic flag. Also, remove unnecessary locking after notifiers are unregistered. Signed-off-by: John Hurley Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 9 +++-- drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 2 +- drivers/net/ethernet/netronome/nfp/flower/main.h | 2 +- .../net/ethernet/netronome/nfp/flower/offload.c | 2 +- .../ethernet/netronome/nfp/flower/tunnel_conf.c | 47 +++++++++------------- 5 files changed, 28 insertions(+), 34 deletions(-) commit 2df7b2d20622f98bca2f001bb0e8d8bee01782ac Author: John Hurley Date: Thu Nov 2 01:31:29 2017 -0700 nfp: flower: app should use struct nfp_repr Ensure priv netdev data in flower app is cast to nfp_repr and not nfp_net as in other apps. Fixes: 363fc53b8b58 ("nfp: flower: Convert ndo_setup_tc offloads to block callbacks") Signed-off-by: John Hurley Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/offload.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 36735783fdb599c94b9c86824583df367c65900b Author: Hiromitsu Yamasaki Date: Thu Nov 2 10:32:36 2017 +0100 spi: sh-msiof: Fix DMA transfer size check DMA supports 32-bit words only, even if BITLEN1 of SITMDR2 register is 16bit. Fixes: b0d0ce8b6b91 ("spi: sh-msiof: Add DMA support") Signed-off-by: Hiromitsu Yamasaki Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven Acked-by: Dirk Behme Signed-off-by: Mark Brown drivers/spi/spi-sh-msiof.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cdc89c91987bd6efa962b36d4ea86d0c9152eb11 Author: Prashant Bhole Date: Thu Nov 2 17:09:45 2017 +0900 tools: bpf: handle long path in jit disasm Use PATH_MAX instead of hardcoded array size 256 Signed-off-by: Prashant Bhole Signed-off-by: David S. Miller tools/bpf/bpf_jit_disasm.c | 3 ++- tools/bpf/bpftool/jit_disasm.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit ca5cd8c9400c7eeeda84e34fa773c6c245e65c82 Author: Rajendra Nayak Date: Thu Nov 2 14:54:00 2017 +0530 regulator: qcom_spmi: Add support for pmi8994 Document the regulators available on pmi8994 and add support for this PMIC to the SPMI PMIC regulator driver. Signed-off-by: Rajendra Nayak Signed-off-by: Mark Brown .../devicetree/bindings/regulator/qcom,spmi-regulator.txt | 13 +++++++++++++ drivers/regulator/qcom_spmi-regulator.c | 9 +++++++++ 2 files changed, 22 insertions(+) commit adebc5321852da0b6ed13888e3aa291dfb011072 Author: Arnd Bergmann Date: Thu Nov 2 12:08:00 2017 +0100 ASoC: intel: include linux/module.h as needed The MODULE_DESCRIPTION() macro is only available when including the linux/module.h header. Apparently this is included indirectly from sst-firmware.c in some configurations, but not in others: sound/soc/intel/common/sst-firmware.c:1278:20: error: expected declaration specifiers or '...' before string constant MODULE_DESCRIPTION("Intel SST Firmware Loader"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/intel/common/sst-firmware.c:1279:16: error: expected declaration specifiers or '...' before string constant This adds the missing include line. Fixes: a395bdd6b24b ("ASoC: intel: Fix sst-dsp dependency on dw stuff") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/intel/common/sst-firmware.c | 1 + 1 file changed, 1 insertion(+) commit f7a88db6fffdd193d792de5dae7890528b995cc0 Author: Arnd Bergmann Date: Thu Nov 2 12:07:04 2017 +0100 ASoC: Intel: fix Kconfig dependencies I ran into multiple problems during randconfig builds of the recently changed Kconfig logic for Intel ASoC drivers: - Building without DMADEVICES doesn't work in general - With that dependency added, we can relax the 'depends on X86' again and allow compile-testing, except for SND_SST_ATOM_HIFI2_PLATFORM, which depends on X86 for asm/platform_sst_audio.h - Skylake requires SND_SOC_INTEL_SST_ACPI, so we have to depend on ACPI in turn - Haswell needs SND_DMA_SGBUF for snd_sgbuf_aligned_pages() With the new set of dependencies, I no longer get any build failures. Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 7e751e375ae7218f8b49f0b47e855cf9bbbdbcf9 Author: olivier moysan Date: Thu Nov 2 11:20:09 2017 +0100 ASoC: stm32: sai: fix warning in stm32_sai_set_config() Fix uninitialized warning introduced by "Move static settings to DAI init" commit in stm32_sai_set_config() function. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_sai_sub.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 66d32fdcbf03851724a8b551d490ae1ddfe6eef2 Author: Hans de Goede Date: Thu Nov 2 10:30:13 2017 +0100 staging: rtl8188eu: Revert 4 commits breaking ARP Commit 2ba8444c97b1 ("staging:r8188eu: move IV/ICV trimming into decrypt() and also place it after rtl88eu_mon_recv_hook()") breaks ARP. After this commit ssh-ing to a laptop with r8188eu wifi no longer works if the machine connecting has never communicated with the laptop before. This is 100% reproducable using "arp -d && ssh " to ssh to a laptop with r8188eu wifi. This commit reverts 4 commits in total: 1. Commit 79650ffde38e ("staging:r8188eu: trim IV/ICV fields in validate_recv_data_frame()") This commit depends on 2 of the other commits being reverted. 2. Commit 02b19b4c4920 ("staging:r8188eu: inline unprotect_frame() in mon_recv_decrypted_recv()") The inline code is wrong the un-inlined version contains: if (skb->len < hdr_len + iv_len + icv_len) return; ... Where as the inline-ed code introduced by this commit does: if (skb->len < hdr_len + iv_len + icv_len) { ... Note the same check, but now to actually continue doing ... instead of to not do it, so this commit is no good. 3. Commit d86e16da6a5d ("staging:r8188eu: use different mon_recv_decrypted() inside rtl88eu_mon_recv_hook() and rtl88eu_mon_xmit_hook().") This commit introduced a 1:1 copy of a function so that one of the 2 copies can be modified in the 2 commits we're already reverting. 4. Commit 2ba8444c97b1 ("staging:r8188eu: move IV/ICV trimming into decrypt() and also place it after rtl88eu_mon_recv_hook()") This is the commit actually breaking ARP. Note this commit is a straight-forward squash of the revert of these 4 commits, without any changes. Cc: stable@vger.kernel.org Cc: Ivan Safonov Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_recv.c | 83 +++++++++++++++++++------------ drivers/staging/rtl8188eu/os_dep/mon.c | 34 ++----------- 2 files changed, 55 insertions(+), 62 deletions(-) commit d96e8c10f81f0ecbaa3c3bd70c0c76a18ae15a7e Author: Hans de Goede Date: Thu Nov 2 10:30:12 2017 +0100 staging: rtl8188eu: Fix bug introduced by convert timers to use timer_setup() Commit b7749656e946 ("staging: rtl8188eu: Convert timers to use timer_setup()") introduces a copy and paste error which causes the rtl8188eu driver to no longer function. This commit fixes this. Fixes: b7749656e946 ("staging: rtl8188eu: Convert timers to use timer_setup()") Cc: Kees Cook Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4004a9870bbefdb6644c3d2033f5315920a3b669 Author: Hans de Goede Date: Thu Nov 2 10:30:11 2017 +0100 staging: rtl8188eu: Revert part of "staging: rtl8188eu: fix comments with lines over 80 characters" Commit 74e1e498e84e ("staging: rtl8188eu: fix comments with lines over 80 characters") not only changed comments but also changed an if check: -if (pmlmepriv->cur_network.join_res != true) { +if (!(pmlmepriv->cur_network.join_res)) { This is not equivalent as join_res is an int and can have values such as -2 and -3. Note for the next time, please only make one type of changes in a single clean-up commit. Fixes: 74e1e498e84e ("staging: rtl8188eu: fix comments with lines over 80 ...") Cc: Juliana Rodrigues Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_ap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62ec1808b98dfbaea1b17c3b4caa991c28102ba5 Author: Tom Saeger Date: Tue Oct 31 10:30:01 2017 -0500 staging: unisys: Fix incorrect unisys MAINTAINERS pattern Fix stale path to documentation in MAINTAINERS file. Signed-off-by: Tom Saeger Acked-by: David Kershner Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd1335936e85652817613e815cb234ae022c3e90 Author: Benjamin Gaignard Date: Mon Oct 23 17:55:36 2017 +0200 staging: ion: simplify ioctl args checking function Make arguments checking more easy to read. Signed-off-by: Benjamin Gaignard Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion-ioctl.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 198277f29dcfa98328a8a429725edab3d92b65be Author: Colin Ian King Date: Tue Oct 31 14:02:49 2017 +0000 staging: android: ion: remove redundant variable table Variable table is being set but is never read, it is therefore redundant and can be removed. Cleans up clang warning: drivers/staging/android/ion/ion.c:112:2: warning: Value stored to 'table' is never read Signed-off-by: Colin Ian King Acked-by: Laura Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.c | 2 -- 1 file changed, 2 deletions(-) commit dbc0f57200d60962103b3cf68faaaa43bdbea066 Author: Kees Cook Date: Mon Oct 30 15:26:15 2017 -0700 staging: vc04_services: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Additionally removes invalid NULL check, as pointed out by Dan Carpenter. Cc: Greg Kroah-Hartman Cc: Eric Anholt Cc: Stefan Wahren Cc: Michael Zoran Cc: Keerthi Reddy Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook Tested-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 17 +++++++---------- .../vc04_services/interface/vchiq_arm/vchiq_arm.h | 1 + 2 files changed, 8 insertions(+), 10 deletions(-) commit 770b03c2ca4aa44d226cf248f86aa23e546147d0 Author: Johan Hovold Date: Sun Oct 29 13:01:33 2017 +0100 staging: greybus: spilib: fix use-after-free after deregistration Remove erroneous spi_master_put() after controller deregistration which would access the already freed spi controller. Note that spi_unregister_master() drops our only controller reference. Fixes: ba3e67001b42 ("greybus: SPI: convert to a gpbridge driver") Cc: stable # 4.9 Signed-off-by: Johan Hovold Reviewed-by: Rui Miguel Silva Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/spilib.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 1dc2f73a17843379d555d5150657333c79b9c697 Author: Stephen Brennan Date: Fri Oct 27 07:53:18 2017 -0700 staging: ccree: Fix indentation in ssi_buffer_mgr.c In particular, fixes some over-indented if statement bodies as well as a couple lines indented with spaces. checkpatch.pl now reports no warnings on this file other than 80 character warnings. Signed-off-by: Stephen Brennan Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_buffer_mgr.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e0b3f39092a1cff5548cbaf40096ec25e7721de6 Author: Gilad Ben-Yossef Date: Mon Oct 30 13:38:03 2017 +0000 staging: ccree: fix 64 bit scatter/gather DMA ops Fix a wrong offset used in splitting a 64 DMA address to MSB/LSB parts needed for scatter/gather HW descriptors causing operations relying on them to fail on 64 bit platforms. Fixes: c6f7f2f4591f ("staging: ccree: refactor LLI access macros") Reported-by: Stuart Yoder Signed-off-by: Gilad Ben-Yossef Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/cc_lli_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3383642c2f9d4f5b4fa37436db4a109a1a10018c Author: Andy Lutomirski Date: Thu Nov 2 00:59:17 2017 -0700 x86/traps: Use a new on_thread_stack() helper to clean up an assertion Let's keep the stack-related logic together rather than open-coding a comparison in an assertion in the traps code. Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/856b15bee1f55017b8f79d3758b0d51c48a08cf8.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/processor.h | 6 ++++++ arch/x86/kernel/traps.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) commit d375cf1530595e33961a8844192cddab913650e3 Author: Andy Lutomirski Date: Thu Nov 2 00:59:16 2017 -0700 x86/entry/64: Remove thread_struct::sp0 On x86_64, we can easily calculate sp0 when needed instead of storing it in thread_struct. On x86_32, a similar cleanup would be possible, but it would require cleaning up the vm86 code first, and that can wait for a later cleanup series. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/719cd9c66c548c4350d98a90f050aee8b17f8919.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/compat.h | 1 + arch/x86/include/asm/processor.h | 28 +++++++++------------------- arch/x86/include/asm/switch_to.h | 6 ++++++ arch/x86/kernel/process_64.c | 1 - 4 files changed, 16 insertions(+), 20 deletions(-) commit cd493a6deb8b78eca280d05f7fa73fd69403ae29 Author: Andy Lutomirski Date: Thu Nov 2 00:59:15 2017 -0700 x86/entry/32: Fix cpu_current_top_of_stack initialization at boot cpu_current_top_of_stack's initialization forgot about TOP_OF_KERNEL_STACK_PADDING. This bug didn't matter because the idle threads never enter user mode. Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/e5e370a7e6e4fddd1c4e4cf619765d96bb874b21.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/smpboot.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 46f5a10a721ce8dce8cc8fe55279b49e1c6b3288 Author: Andy Lutomirski Date: Thu Nov 2 00:59:14 2017 -0700 x86/entry/64: Remove all remaining direct thread_struct::sp0 reads The only remaining readers in context switch code or vm86(), and they all just want to update TSS.sp0 to match the current task. Replace them all with a new helper update_sp0(). Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/2d231687f4ff288c9d9e98d7861b7df374246ac3.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/switch_to.h | 6 ++++++ arch/x86/kernel/process_32.c | 2 +- arch/x86/kernel/process_64.c | 2 +- arch/x86/kernel/vm86_32.c | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) commit 20bb83443ea79087b5e5f8dab4e9d80bb9bf7acb Author: Andy Lutomirski Date: Thu Nov 2 00:59:13 2017 -0700 x86/entry/64: Stop initializing TSS.sp0 at boot In my quest to get rid of thread_struct::sp0, I want to clean up or remove all of its readers. Two of them are in cpu_init() (32-bit and 64-bit), and they aren't needed. This is because we never enter userspace at all on the threads that CPUs are initialized in. Poison the initial TSS.sp0 and stop initializing it on CPU init. The comment text mostly comes from Dave Hansen. Thanks! Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/ee4a00540ad28c6cff475fbcc7769a4460acc861.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/common.c | 13 ++++++++++--- arch/x86/kernel/process.c | 8 +++++++- 2 files changed, 17 insertions(+), 4 deletions(-) commit f16b3da1dc936c0f8121741d0a1731bf242f2f56 Author: Andy Lutomirski Date: Thu Nov 2 00:59:12 2017 -0700 x86/xen/64, x86/entry/64: Clean up SP code in cpu_initialize_context() I'm removing thread_struct::sp0, and Xen's usage of it is slightly dubious and unnecessary. Use appropriate helpers instead. While we're at at, reorder the code slightly to make it more obvious what's going on. Signed-off-by: Andy Lutomirski Reviewed-by: Juergen Gross Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/d5b9a3da2b47c68325bd2bbe8f82d9554dee0d0f.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/xen/smp_pv.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 3500130b84a3cdc5b6796eba1daf178944935efe Author: Andy Lutomirski Date: Thu Nov 2 00:59:11 2017 -0700 x86/entry: Add task_top_of_stack() to find the top of a task's stack This will let us get rid of a few places that hardcode accesses to thread.sp0. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/b49b3f95a8ff858c40c9b0f5b32be0355324327d.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/processor.h | 2 ++ 1 file changed, 2 insertions(+) commit da51da189a24bb9b7e2d5a123be096e51a4695a5 Author: Andy Lutomirski Date: Thu Nov 2 00:59:10 2017 -0700 x86/entry/64: Pass SP0 directly to load_sp0() load_sp0() had an odd signature: void load_sp0(struct tss_struct *tss, struct thread_struct *thread); Simplify it to: void load_sp0(unsigned long sp0); Also simplify a few get_cpu()/put_cpu() sequences to preempt_disable()/preempt_enable(). Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/2655d8b42ed940aa384fe18ee1129bbbcf730a08.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/paravirt.h | 5 ++--- arch/x86/include/asm/paravirt_types.h | 2 +- arch/x86/include/asm/processor.h | 9 ++++----- arch/x86/kernel/cpu/common.c | 4 ++-- arch/x86/kernel/process_32.c | 2 +- arch/x86/kernel/process_64.c | 2 +- arch/x86/kernel/vm86_32.c | 14 ++++++-------- arch/x86/xen/enlighten_pv.c | 7 +++---- 8 files changed, 20 insertions(+), 25 deletions(-) commit bd7dc5a6afac719d8ce4092391eef2c7e83c2a75 Author: Andy Lutomirski Date: Thu Nov 2 00:59:09 2017 -0700 x86/entry/32: Pull the MSR_IA32_SYSENTER_CS update code out of native_load_sp0() This causes the MSR_IA32_SYSENTER_CS write to move out of the paravirt callback. This shouldn't affect Xen PV: Xen already ignores MSR_IA32_SYSENTER_ESP writes. In any event, Xen doesn't support vm86() in a useful way. Note to any potential backporters: This patch won't break lguest, as lguest didn't have any SYSENTER support at all. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/75cf09fe03ae778532d0ca6c65aa58e66bc2f90c.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/include/asm/processor.h | 7 ------- arch/x86/include/asm/switch_to.h | 12 ++++++++++++ arch/x86/kernel/process_32.c | 4 +++- arch/x86/kernel/process_64.c | 2 +- arch/x86/kernel/vm86_32.c | 6 +++++- 5 files changed, 21 insertions(+), 10 deletions(-) commit 929bacec21478a72c78e4f29f98fb799bd00105a Author: Andy Lutomirski Date: Thu Nov 2 00:59:08 2017 -0700 x86/entry/64: De-Xen-ify our NMI code Xen PV is fundamentally incompatible with our fancy NMI code: it doesn't use IST at all, and Xen entries clobber two stack slots below the hardware frame. Drop Xen PV support from our NMI code entirely. Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/bfbe711b5ae03f672f8848999a8eb2711efc7f98.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 43e4111086a70c78bedb6ad990bee97f17b27a6e Author: Juergen Gross Date: Thu Nov 2 00:59:07 2017 -0700 xen, x86/entry/64: Add xen NMI trap entry Instead of trying to execute any NMI via the bare metal's NMI trap handler use a Xen specific one for PV domains, like we do for e.g. debug traps. As in a PV domain the NMI is handled via the normal kernel stack this is the correct thing to do. This will enable us to get rid of the very fragile and questionable dependencies between the bare metal NMI handler and Xen assumptions believed to be broken anyway. Signed-off-by: Juergen Gross Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/5baf5c0528d58402441550c5770b98e7961e7680.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 2 +- arch/x86/include/asm/traps.h | 2 +- arch/x86/xen/enlighten_pv.c | 2 +- arch/x86/xen/xen-asm_64.S | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit c39858de696f0cc160a544455e8403d663d577e9 Author: Andy Lutomirski Date: Thu Nov 2 00:59:06 2017 -0700 x86/entry/64: Remove the RESTORE_..._REGS infrastructure All users of RESTORE_EXTRA_REGS, RESTORE_C_REGS and such, and REMOVE_PT_GPREGS_FROM_STACK are gone. Delete the macros. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/c32672f6e47c561893316d48e06c7656b1039a36.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/calling.h | 52 ------------------------------------------------ 1 file changed, 52 deletions(-) commit 471ee4832209e986029b9fabdaad57b1eecb856b Author: Andy Lutomirski Date: Thu Nov 2 00:59:05 2017 -0700 x86/entry/64: Use POP instead of MOV to restore regs on NMI return This gets rid of the last user of the old RESTORE_..._REGS infrastructure. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/652a260f17a160789bc6a41d997f98249b73e2ab.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit a512210643da8082cb44181dba8b18e752bd68f0 Author: Andy Lutomirski Date: Thu Nov 2 00:59:04 2017 -0700 x86/entry/64: Merge the fast and slow SYSRET paths They did almost the same thing. Remove a bunch of pointless instructions (mostly hidden in macros) and reduce cognitive load by merging them. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1204e20233fcab9130a1ba80b3b1879b5db3fc1f.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4fbb39108f972437c44e5ffa781b56635d496826 Author: Andy Lutomirski Date: Thu Nov 2 00:59:03 2017 -0700 x86/entry/64: Use pop instead of movq in syscall_return_via_sysret Saves 64 bytes. Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/6609b7f74ab31c36604ad746e019ea8495aec76c.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit e53178328c9b96fbdbc719e78c93b5687ee007c3 Author: Andy Lutomirski Date: Thu Nov 2 00:59:02 2017 -0700 x86/entry/64: Shrink paranoid_exit_restore and make labels local paranoid_exit_restore was a copy of restore_regs_and_return_to_kernel. Merge them and make the paranoid_exit internal labels local. Keeping .Lparanoid_exit makes the code a bit shorter because it allows a 2-byte jnz instead of a 5-byte jnz. Saves 96 bytes of text. ( This is still a bit suboptimal in a non-CONFIG_TRACE_IRQFLAGS kernel, but fixing that would make the code rather messy. ) Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/510d66a1895cda9473c84b1086f0bb974f22de6a.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit e872045bfd9c465a8555bab4b8567d56a4d2d3bb Author: Andy Lutomirski Date: Thu Nov 2 00:59:01 2017 -0700 x86/entry/64: Simplify reg restore code in the standard IRET paths The old code restored all the registers with movq instead of pop. In theory, this was done because some CPUs have higher movq throughput, but any gain there would be tiny and is almost certainly outweighed by the higher text size. This saves 96 bytes of text. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/ad82520a207ccd851b04ba613f4f752b33ac05f7.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/calling.h | 21 +++++++++++++++++++++ arch/x86/entry/entry_64.S | 12 ++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) commit 8a055d7f411d41755ce30db5bb65b154777c4b78 Author: Andy Lutomirski Date: Thu Nov 2 00:59:00 2017 -0700 x86/entry/64: Move SWAPGS into the common IRET-to-usermode path All of the code paths that ended up doing IRET to usermode did SWAPGS immediately beforehand. Move the SWAPGS into the common code. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/27fd6f45b7cd640de38fb9066fd0349bcd11f8e1.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 32 ++++++++++++++------------------ arch/x86/entry/entry_64_compat.S | 3 +-- 2 files changed, 15 insertions(+), 20 deletions(-) commit 26c4ef9c49d8a0341f6d97ce2cfdd55d1236ed29 Author: Andy Lutomirski Date: Thu Nov 2 00:58:59 2017 -0700 x86/entry/64: Split the IRET-to-user and IRET-to-kernel paths These code paths will diverge soon. Signed-off-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/dccf8c7b3750199b4b30383c812d4e2931811509.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 34 +++++++++++++++++++++++++--------- arch/x86/entry/entry_64_compat.S | 2 +- arch/x86/kernel/head_64.S | 2 +- 3 files changed, 27 insertions(+), 11 deletions(-) commit 9da78ba6b47b46428cfdfc0851511ab29c869798 Author: Andy Lutomirski Date: Thu Nov 2 00:58:58 2017 -0700 x86/entry/64: Remove the restore_c_regs_and_iret label The only user was the 64-bit opportunistic SYSRET failure path, and that path didn't really need it. This change makes the opportunistic SYSRET code a bit more straightforward and gets rid of the label. Signed-off-by: Andy Lutomirski Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/be3006a7ad3326e3458cf1cc55d416252cbe1986.1509609304.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 50da9d439392fdd91601d36e7f05728265bff262 Merge: 3357b0d c128dbf Author: Ingo Molnar Date: Thu Nov 2 10:58:29 2017 +0100 Merge branch 'x86/fpu' into x86/asm We are about to commit complex rework of various x86 entry code details - create a unified base tree (with FPU commits included) before doing that. Signed-off-by: Ingo Molnar commit 3357b0d3c7323d73806571192e9f633bb6ba3d54 Merge: 82c62fa e27c310 Author: Ingo Molnar Date: Thu Nov 2 10:57:24 2017 +0100 Merge branch 'x86/mpx/prep' into x86/asm Pick up some of the MPX commits that modify the syscall entry code, to have a common base and to reduce conflicts. Signed-off-by: Ingo Molnar commit 71271269ef9a997fb4416b2f8ef3558dd846c7cb Author: Ricardo Neri Date: Fri Oct 27 16:51:38 2017 -0700 x86/insn-eval: Extend get_seg_base_addr() to also obtain segment limit In protected mode, it is common to want to obtain the limit of a segment along with its base address. This is useful, for instance, to verify that an effective address lies within a segment before computing a linear address. Up to this point, this library only computes linear addresses in long mode. Subsequent patches will include support for protected mode. Support to verify the segment limit will be needed. Signed-off-by: Ricardo Neri Cc: Adam Buchbinder Cc: Adrian Hunter Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: Chen Yucong Cc: Chris Metcalf Cc: Colin Ian King Cc: Dave Hansen Cc: Dmitry Vyukov Cc: Huang Rui Cc: Jiri Slaby Cc: Jonathan Corbet Cc: Kees Cook Cc: Linus Torvalds Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Qiaowei Ren Cc: Ravi V. Shankar Cc: Shuah Khan Cc: Thomas Garnier Cc: Thomas Gleixner Cc: Vlastimil Babka Cc: ricardo.neri@intel.com Link: http://lkml.kernel.org/r/1509148310-30862-2-git-send-email-ricardo.neri-calderon@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/lib/insn-eval.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit 1e032393d9680c1f3b5238ec0f3f4eb006ee83d2 Merge: 023b7b0 501a5c7 6ed5ed1 fe9ba5b Author: Zhang Rui Date: Thu Nov 2 16:32:25 2017 +0800 Merge branches 'thermal-core', 'thermal-tool', 'thermal-intel' and 'thermal-soc' into next commit fe9ba5bc73af01f7d53bb6b2b31204f799dd09be Merge: b2fd708 531fcde Author: Zhang Rui Date: Thu Nov 2 16:31:52 2017 +0800 Merge branch 'imx-nvmem' into thermal-soc commit 6ed5ed14e25914dab92ed492565f6feb80ae0559 Author: Srinivas Pandruvada Date: Wed Nov 1 09:39:51 2017 -0700 thermal: pch: Add Cannon Lake support Added Cannon Lake PCH ids. Signed-off-by: Srinivas Pandruvada Signed-off-by: Zhang Rui drivers/thermal/intel_pch_thermal.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit eea4a69a4636867b18b6ba414b964cdc21c53789 Author: Srinivas Pandruvada Date: Wed Nov 1 09:39:50 2017 -0700 thermal: int340x: processor_thermal: Add Coffee Lake support Add new PCI id for Coffee lake processor thermal device. Signed-off-by: Srinivas Pandruvada Signed-off-by: Zhang Rui drivers/thermal/int340x_thermal/processor_thermal_device.c | 2 ++ 1 file changed, 2 insertions(+) commit 42c0a36c1c96382e4f9ce158abc64276751bd505 Author: Srinivas Pandruvada Date: Wed Nov 1 09:39:49 2017 -0700 thermal: int340x: processor_thermal: Add Cannon Lake support Added PCI-ID of Cannon Lake thermal device. Signed-off-by: Srinivas Pandruvada Signed-off-by: Zhang Rui drivers/thermal/int340x_thermal/processor_thermal_device.c | 4 ++++ 1 file changed, 4 insertions(+) commit d83870a5bedeca22027cb5e81cdd1e6975e02f81 Author: Colin Ian King Date: Wed Nov 1 09:41:18 2017 +0000 thermal: bxt: remove redundant variable trip Variable trip is assigned but never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/thermal/intel_bxt_pmic_thermal.c:204:4: warning: Value stored to 'trip' is never read Signed-off-by: Colin Ian King Signed-off-by: Zhang Rui drivers/thermal/intel_bxt_pmic_thermal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f855e3844af09fcdc40ed2c8ccf88d51da95ef2c Author: Andy Shevchenko Date: Tue Oct 31 14:56:07 2017 +0200 MAINTAINERS: Step down from a co-maintaner of DW DMAC driver As discussed at ELCE 2017 there is little to anticipate from me in the future with regard to the driver, and since I have many things to keep an eye on, I would like to step down to simple designated reviewer. Signed-off-by: Andy Shevchenko Acked-by: Viresh Kumar Signed-off-by: Vinod Koul MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b5d1a58a51324b1b6c851abec3bf40bd539cbb2 Author: Linus Walleij Date: Sun Sep 24 18:19:19 2017 +0200 clk: clk-gpio: Request GPIO descriptor as LOW Requesting the GPIOD_OUT_LOW low will make sure the GPIO is deasserted when requested. The gpiolib core will make sure that if the GPIO line is active low, it will be logically driven high when deasserted, see drivers/gpiolib.c gpiod_configure_flags(). Cc: Sergej Sawazki Cc: Jyri Sarha Signed-off-by: Linus Walleij Signed-off-by: Stephen Boyd drivers/clk/clk-gpio.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 908a543ac7cdf3aa8a283ec42cab3c16e2fc45a2 Author: Linus Walleij Date: Sun Sep 24 18:19:18 2017 +0200 clk: clk-gpio: Make GPIO clock provider use descriptors only After som grep:ing it turns out nothing in the kernel is really calling clk_[hw_]_register_gpio_[gate|mux](). All existing instances are just created directly from the device tree probe functions at the bottom of the clk-gpio.c clock provider file. This means we can change the signature of the function without any consequences! Everyone should be using GPIO descriptors now, so let's just go in and enforce that. This saves a bit of code since GPIO descriptors know inherently if they are active low so no need for the code keeping track of that. We leave it to the caller to come up with the GPIO descriptor. It is nowadays possible to do that even without a corresponding device, so no excuse not to pass them around. The one in-kernel user lifecycles it using devm_gpiod_get() in gpio_clk_driver_probe(). Cc: Sergej Sawazki Cc: Jyri Sarha Signed-off-by: Linus Walleij Signed-off-by: Stephen Boyd drivers/clk/clk-gpio.c | 90 +++++++++++++++++--------------------------- include/linux/clk-provider.h | 12 +++--- 2 files changed, 41 insertions(+), 61 deletions(-) commit 2fc0a509e4ee858a450f28a4efb430835004dd70 Author: Sean Wang Date: Thu Oct 5 11:50:24 2017 +0800 clk: mediatek: add clock support for MT7622 SoC Add all supported clocks exported from every susbystem found on MT7622 SoC such as topckgen, apmixedsys, infracfg, pericfg , pciessys, ssusbsys, ethsys and audsys. Signed-off-by: Chen Zhong Signed-off-by: Sean Wang Signed-off-by: Stephen Boyd drivers/clk/mediatek/Kconfig | 30 ++ drivers/clk/mediatek/Makefile | 4 + drivers/clk/mediatek/clk-mt7622-aud.c | 195 +++++++++ drivers/clk/mediatek/clk-mt7622-eth.c | 156 +++++++ drivers/clk/mediatek/clk-mt7622-hif.c | 169 ++++++++ drivers/clk/mediatek/clk-mt7622.c | 780 ++++++++++++++++++++++++++++++++++ 6 files changed, 1334 insertions(+) commit bda921fad518b4d5d2249d41432025ce5b368173 Author: Chen Zhong Date: Thu Oct 5 11:50:25 2017 +0800 clk: mediatek: add clocks dt-bindings required header for MT7622 SoC Add the required header for the entire clocks dt-bindings exported from topckgen, apmixedsys, infracfg, pericfg, ethsys, pciesys, ssusbsys and audsys which could be found on MT7622 SoC. Signed-off-by: Chen Zhong Signed-off-by: Sean Wang Signed-off-by: Stephen Boyd include/dt-bindings/clock/mt7622-clk.h | 289 +++++++++++++++++++++++++++++++++ 1 file changed, 289 insertions(+) commit f2f221c7810b824e15b57fe3d6c30b354299120f Author: Maxime Ripard Date: Mon Jul 24 18:31:36 2017 +0200 ARM: dts: sun8i: a711: Enable USB OTG The TBS A711 has a micro-USB connector that can be used in OTG mode. Enable it. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 7 +++++++ 1 file changed, 7 insertions(+) commit 90c5d7cdae64577f4f33c9d98ccaebdcb7b33433 Author: Maxime Ripard Date: Mon Jul 24 18:29:29 2017 +0200 ARM: dts: sun8i: a711: Add regulator support The TBS A711 is using an AXP813 PMIC. Let's add all the regulators for that board, and migrate the current, dumb, regulators to the actual ones. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 165 ++++++++++++++++++++++++++++-- 1 file changed, 155 insertions(+), 10 deletions(-) commit c955bf3998efa3355790a4d8c82874582f1bc727 Author: Chen Zhong Date: Thu Oct 5 11:50:23 2017 +0800 clk: mediatek: add the option for determining PLL source clock Since the previous setup always sets the PLL using crystal 26MHz, this doesn't always happen in every MediaTek platform. So the patch added flexibility for assigning extra member for determining the PLL source clock. Signed-off-by: Chen Zhong Signed-off-by: Sean Wang Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mtk.h | 1 + drivers/clk/mediatek/clk-pll.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 808ecf4ad087f80c2eee99af67549f05d5315694 Author: Sean Wang Date: Thu Oct 5 11:50:22 2017 +0800 dt-bindings: clock: mediatek: document clk bindings for MediaTek MT7622 SoC This patch adds the binding documentation for apmixedsys, ethsys, hifsys, infracfg, pericfg, topckgen and audsys for MT7622. Signed-off-by: Chen Zhong Signed-off-by: Sean Wang Acked-by: Rob Herring Signed-off-by: Stephen Boyd .../bindings/arm/mediatek/mediatek,apmixedsys.txt | 1 + .../bindings/arm/mediatek/mediatek,audsys.txt | 22 ++++++++++++++++++++++ .../bindings/arm/mediatek/mediatek,ethsys.txt | 1 + .../bindings/arm/mediatek/mediatek,hifsys.txt | 1 + .../bindings/arm/mediatek/mediatek,infracfg.txt | 1 + .../bindings/arm/mediatek/mediatek,pciesys.txt | 22 ++++++++++++++++++++++ .../bindings/arm/mediatek/mediatek,pericfg.txt | 1 + .../bindings/arm/mediatek/mediatek,sgmiisys.txt | 22 ++++++++++++++++++++++ .../bindings/arm/mediatek/mediatek,ssusbsys.txt | 22 ++++++++++++++++++++++ .../bindings/arm/mediatek/mediatek,topckgen.txt | 1 + 10 files changed, 94 insertions(+) commit 5ef288d42aefef63f728116818a097b3caf000a5 Author: Arnd Bergmann Date: Fri Sep 15 21:28:30 2017 +0200 clk: mediatek: mark mtk_infrasys_init_early __init On gcc-4.6, we get a harmless link-time warning: WARNING: vmlinux.o(.text.unlikely+0x196a0): Section mismatch in reference from the function mtk_infrasys_init_early() to the function .init.text:mtk_clk_register_cpumuxes() The function mtk_infrasys_init_early() references the function __init mtk_clk_register_cpumuxes(). This is often because mtk_infrasys_init_early lacks a __init annotation or the annotation of mtk_clk_register_cpumuxes is wrong. Newer compilers inline this function so they don't warn, but marking it __init is the right solution for all versions. Fixes: e9862118272a ("clk: mediatek: Add MT2701 clock support") Signed-off-by: Arnd Bergmann Signed-off-by: Stephen Boyd drivers/clk/mediatek/clk-mt2701.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 337cce7ec3caadbbc8098a19446d9195da62335b Author: Chen-Yu Tsai Date: Wed Oct 18 16:31:38 2017 +0800 ARM: dts: sun8i: a83t: bananapi-m3: Enable AP6212 WiFi on mmc1 The WiFi side of the AP6212 WiFi/BT combo module is connected to mmc1. There are also GPIOs for enable and interrupts. An external clock from the AC100 RTC is also used. Enable WiFi on this board by enabling mmc1 and adding the power sequencing clocks and GPIO, as well as the chip's interrupt line. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit f346019be711dc0bc10d40e8510644005e38d53a Author: Chen-Yu Tsai Date: Wed Oct 18 16:31:37 2017 +0800 ARM: dts: sun8i: a83t: cubietruck-plus: Enable AP6330 WiFi on mmc1 The WiFi side of the AP6330 WiFi/BT combo module is connected to mmc1. There are also GPIOs for enable and interrupts. An external clock from the AC100 RTC is also used. Enable WiFi on this board by enabling mmc1 and adding the power sequencing clocks and GPIO, as well as the chip's interrupt line. For the WiFi module to correctly detect the frequency of its main oscillator, the external low power clock must be set to 32768 Hz. Their does not seem to be proper out-of-band interrupt support for the BCM4330 chip within the AP6330 module. This part is left out for now. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit b5bc9ce3d47c9701433a385e4f17e928c8ca6c46 Author: Chen-Yu Tsai Date: Wed Oct 18 16:31:36 2017 +0800 ARM: dts: sun8i: a83t: Move mmc1 pinctrl setting to dtsi file mmc1 only has 1 possible pinmux setting. Move any settings to the dtsi file and set it by default. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 2 -- arch/arm/boot/dts/sun8i-a83t.dtsi | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit f9573c09b3a371fb434ae062a2d09228795b24e2 Author: Chen-Yu Tsai Date: Wed Oct 18 16:31:35 2017 +0800 ARM: dts: sun8i: a83t: allwinner-h8homlet-v2: Add AXP818 regulator nodes This patch adds device nodes for all the regulators of the AXP818 PMIC. Sunxi common regulators are removed, and USB VBUS regulators are added. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard .../boot/dts/sun8i-a83t-allwinner-h8homlet-v2.dts | 147 +++++++++++++++++++-- 1 file changed, 134 insertions(+), 13 deletions(-) commit d7c5f6863550d6c219aeeb1d4c777fb3658387bc Author: Chen-Yu Tsai Date: Wed Oct 18 16:31:34 2017 +0800 ARM: dts: sun8i: a83t: bananapi-m3: Add AXP813 regulator nodes This patch adds device nodes for all the regulators of the AXP813 PMIC. Sunxi common regulators are removed, and USB VBUS regulators are added. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 141 +++++++++++++++++++++++++-- 1 file changed, 132 insertions(+), 9 deletions(-) commit 2730766f1b86391f44001cfff8f559b136584cb3 Author: Chen-Yu Tsai Date: Wed Oct 18 16:31:33 2017 +0800 ARM: dts: sun8i: a83t: cubietruck-plus: Add AXP818 regulator nodes This patch adds device nodes for all the regulators of the AXP818 PMIC. Sunxi common regulators are removed, and USB VBUS regulators are added. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts | 167 +++++++++++++++++++++-- 1 file changed, 155 insertions(+), 12 deletions(-) commit 11a5176882614ffd664ce74bd2b0b51bac1fe4a9 Author: Chen-Yu Tsai Date: Wed Oct 18 16:31:32 2017 +0800 ARM: dts: sunxi: Add dtsi for AXP81x PMIC The AXP81x family of PMIC is used with the Allwinner A83T and H8 SoCs. This includes the AXP813 and AXP818. There is no discernible difference except the labeling. The AXP813 is paired with the A83T, while the AXP818 is paired with the H8. This patch adds a dtsi file for all the common bindings for these two PMICs. Currently this is just listing all the regulator nodes. The regulators are initialized based on their device node names. In the future this would be expanded to include power supplies and GPIO controllers. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/axp81x.dtsi | 139 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) commit e20f469660ad526fcd9bf865e30ee491ae4e4a86 Author: Vijaya Mohan Guvva Date: Wed Nov 1 16:19:49 2017 -0700 liquidio: synchronize VF representor names with NIC firmware LiquidIO firmware supports a vswitch that needs to know the names of the VF representors in the host to maintain compatibility for direct programming using external Openflow agents. So, for each VF representor, send its name to the firmware when it gets registered and when its name changes. Signed-off-by: Vijaya Mohan Guvva Signed-off-by: Raghu Vatsavayi Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 15 +++++ drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c | 68 ++++++++++++++++++++++ drivers/net/ethernet/cavium/liquidio/lio_vf_rep.h | 2 + .../net/ethernet/cavium/liquidio/liquidio_common.h | 8 ++- 4 files changed, 92 insertions(+), 1 deletion(-) commit e2f744a82d725ab55091cccfb8e527b4220471f0 Author: weiyi.lu@mediatek.com Date: Mon Oct 23 12:10:34 2017 +0800 clk: mediatek: Add MT2712 clock support Add MT2712 clock support, include topckgen, apmixedsys, infracfg, pericfg, mcucfg and subsystem clocks. Signed-off-by: Weiyi Lu [sboyd@codeaurora.org: Static on top_clk_data] Signed-off-by: Stephen Boyd drivers/clk/mediatek/Kconfig | 50 ++ drivers/clk/mediatek/Makefile | 8 + drivers/clk/mediatek/clk-mt2712-bdp.c | 102 +++ drivers/clk/mediatek/clk-mt2712-img.c | 80 ++ drivers/clk/mediatek/clk-mt2712-jpgdec.c | 76 ++ drivers/clk/mediatek/clk-mt2712-mfg.c | 75 ++ drivers/clk/mediatek/clk-mt2712-mm.c | 170 ++++ drivers/clk/mediatek/clk-mt2712-vdec.c | 94 ++ drivers/clk/mediatek/clk-mt2712-venc.c | 77 ++ drivers/clk/mediatek/clk-mt2712.c | 1435 ++++++++++++++++++++++++++++++ drivers/clk/mediatek/clk-mtk.h | 2 + drivers/clk/mediatek/clk-pll.c | 13 +- 12 files changed, 2180 insertions(+), 2 deletions(-) commit 44a94c7ef989317de81e3e7f84385be2bf1b5fe2 Author: Corentin Labbe Date: Tue Oct 31 09:19:14 2017 +0100 arm64: dts: allwinner: H5: Restore EMAC changes The original dwmac-sun8i DT bindings have some issue on how to handle integrated PHY and was reverted in last RC of 4.13. But now we have a solution so we need to get back that was reverted. This patch restore arm64 DT about dwmac-sun8i for H5 This reverts a part of commit 87e1f5e8bb4b ("arm64: dts: allwinner: Revert EMAC changes") Signed-off-by: Corentin Labbe Acked-by: Florian Fainelli Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts | 17 +++++++++++++++++ .../arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 17 +++++++++++++++++ .../boot/dts/allwinner/sun50i-h5-orangepi-prime.dts | 17 +++++++++++++++++ 3 files changed, 51 insertions(+) commit 4904337fe34fa7fc529d6f4d9ee8b96fe7db310a Author: Corentin Labbe Date: Tue Oct 31 09:19:12 2017 +0100 ARM: dts: sunxi: Restore EMAC changes (boards) The original dwmac-sun8i DT bindings have some issue on how to handle integrated PHY and was reverted in last RC of 4.13. But now we have a solution so we need to get back that was reverted. This patch restore all boards DT about dwmac-sun8i This reverts partially commit fe45174b72ae ("arm: dts: sunxi: Revert EMAC changes") Signed-off-by: Corentin Labbe Acked-by: Florian Fainelli 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-m1-plus.dts | 29 +++++++++++++++++++++++ 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 +++++++++++++ 10 files changed, 131 insertions(+) commit 776245ae02f63ba2b94596b892c597676e190e78 Author: Corentin Labbe Date: Tue Oct 31 09:19:11 2017 +0100 ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac Since dwmac-sun8i could use either an integrated PHY or an external PHY (which could be at same MDIO address), we need to represent this selection by a MDIO switch. Signed-off-by: Corentin Labbe Acked-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: Maxime Ripard arch/arm/boot/dts/sunxi-h3-h5.dtsi | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit 4b236a0fe51259ccde06aed046fe20bfe6e25dce Author: Corentin Labbe Date: Tue Oct 31 09:19:10 2017 +0100 arm: dts: sunxi: h3/h5: Restore EMAC changes The original dwmac-sun8i DT bindings have some issue on how to handle integrated PHY and was reverted in last RC of 4.13. But now we have a solution so we need to get back that was reverted. This patch restore sunxi-h3-h5.dtsi This reverts partially commit fe45174b72ae ("arm: dts: sunxi: Revert EMAC changes") Signed-off-by: Corentin Labbe Acked-by: Florian Fainelli Signed-off-by: Maxime Ripard arch/arm/boot/dts/sunxi-h3-h5.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 079573e373d3714acd53aad02a3c52355fb177ab Author: Corentin Labbe Date: Tue Oct 31 09:19:09 2017 +0100 dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY This patch add documentation about the MDIO switch used on sun8i-h3-emac for integrated PHY. Signed-off-by: Corentin Labbe Acked-by: Florian Fainelli Acked-by: Rob Herring Reviewed-by: Andrew Lunn Signed-off-by: Maxime Ripard .../devicetree/bindings/net/dwmac-sun8i.txt | 147 +++++++++++++++++++-- 1 file changed, 135 insertions(+), 12 deletions(-) commit 74b200d566f1d6367ffba7c467dfd2626779f79f Merge: 1495dc9 634eab1 Author: David S. Miller Date: Thu Nov 2 17:01:39 2017 +0900 Merge branch 'BPF-range-marking-improvements-for-meta-data' Daniel Borkmann says: ==================== BPF range marking improvements for meta data The set contains improvements for direct packet access range markings related to data_meta pointer and test cases for all such access patterns that the verifier matches on. ==================== Signed-off-by: David S. Miller commit 634eab11bd96d60d3a877182baa5b4b8bbed8685 Author: Daniel Borkmann Date: Wed Nov 1 23:58:11 2017 +0100 bpf: add test cases to bpf selftests to cover all meta tests Lets also add test cases to cover all possible data_meta access tests for good/bad access cases so we keep tracking them. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: John Fastabend Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_verifier.c | 442 ++++++++++++++++++++++++++++ 1 file changed, 442 insertions(+) commit 5beca081be9195b4316ac5f32921df0234ee8e0e Author: Daniel Borkmann Date: Wed Nov 1 23:58:10 2017 +0100 bpf: also improve pattern matches for meta access Follow-up to 0fd4759c5515 ("bpf: fix pattern matches for direct packet access") to cover also the remaining data_meta/data matches in the verifier. The matches are also refactored a bit to simplify handling of all the cases. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: John Fastabend Signed-off-by: David S. Miller kernel/bpf/verifier.c | 165 +++++++++++++++++++++++++++++--------------------- 1 file changed, 96 insertions(+), 69 deletions(-) commit b06723da824af1e979eb1699623881b5f45a783c Author: Daniel Borkmann Date: Wed Nov 1 23:58:09 2017 +0100 bpf: minor cleanups after merge Two minor cleanups after Dave's recent merge in f8ddadc4db6c ("Merge git://git.kernel.org...") of net into net-next in order to get the code in line with what was done originally in the net tree: i) use max() instead of max_t() since both ranges are u16, ii) don't split the direct access test cases in the middle with bpf_exit test cases from 390ee7e29fc ("bpf: enforce return code for cgroup-bpf programs"). Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: John Fastabend Signed-off-by: David S. Miller kernel/bpf/verifier.c | 2 +- tools/testing/selftests/bpf/test_verifier.c | 144 ++++++++++++++-------------- 2 files changed, 73 insertions(+), 73 deletions(-) commit b7f1a721bb3e493627d9db0a00edfb53c70ba823 Author: weiyi.lu@mediatek.com Date: Mon Oct 23 12:10:33 2017 +0800 clk: mediatek: Add dt-bindings for MT2712 clocks Add MT2712 clock dt-bindings, include topckgen, apmixedsys, infracfg, pericfg, mcucfg and subsystem clocks. Signed-off-by: Weiyi Lu Acked-by: Rob Herring Signed-off-by: Stephen Boyd include/dt-bindings/clock/mt2712-clk.h | 427 +++++++++++++++++++++++++++++++++ 1 file changed, 427 insertions(+) commit eb522df40e41915210856f1d654e0c31650cb526 Author: weiyi.lu@mediatek.com Date: Mon Oct 23 12:10:32 2017 +0800 dt-bindings: ARM: Mediatek: Document bindings for MT2712 This patch adds the binding documentation for apmixedsys, bdpsys, imgsys, imgsys, infracfg, mcucfg, mfgcfg, mmsys, pericfg, topckgen, vdecsys and vencsys for Mediatek MT2712. Acked-by: Rob Herring Signed-off-by: Weiyi Lu Signed-off-by: Stephen Boyd .../bindings/arm/mediatek/mediatek,apmixedsys.txt | 1 + .../bindings/arm/mediatek/mediatek,bdpsys.txt | 1 + .../bindings/arm/mediatek/mediatek,imgsys.txt | 1 + .../bindings/arm/mediatek/mediatek,infracfg.txt | 1 + .../bindings/arm/mediatek/mediatek,jpgdecsys.txt | 22 ++++++++++++++++++++++ .../bindings/arm/mediatek/mediatek,mcucfg.txt | 22 ++++++++++++++++++++++ .../bindings/arm/mediatek/mediatek,mfgcfg.txt | 22 ++++++++++++++++++++++ .../bindings/arm/mediatek/mediatek,mmsys.txt | 1 + .../bindings/arm/mediatek/mediatek,pericfg.txt | 1 + .../bindings/arm/mediatek/mediatek,topckgen.txt | 1 + .../bindings/arm/mediatek/mediatek,vdecsys.txt | 1 + .../bindings/arm/mediatek/mediatek,vencsys.txt | 1 + 12 files changed, 75 insertions(+) commit 1495dc9f0a711a54f8fec849ce7f3a8f585a11e5 Author: Jakub Kicinski Date: Wed Nov 1 11:48:00 2017 -0700 security: bpf: replace include of linux/bpf.h with forward declarations Touching linux/bpf.h makes us rebuild a surprisingly large portion of the kernel. Remove the unnecessary dependency from security.h, it only needs forward declarations. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/security.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3ded76a8ff53fd2a9b011e86c6f3588a984d432d Author: Florian Fainelli Date: Wed Nov 1 11:29:47 2017 -0700 net: systemport: Only inspect valid switch port & queues Hesoteric board configurations where port 0 is not available would still make SYSTEMPORT inspect the switch port 0, queue 0, which, not being enabled, would cause transmit timeouts over time. Just ignore those unconfigured rings instead. Fixes: 84ff33eeb23d ("net: systemport: Establish DSA network device queue mapping") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 9 +++++++-- drivers/net/ethernet/broadcom/bcmsysport.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) commit 9681ab0667642db54200ab63a361d650ce302781 Merge: 07d3c4a 254ef4d Author: David S. Miller Date: Thu Nov 2 16:47:30 2017 +0900 Merge branch 'nfp-bpf-rename-ALU_OP_NEG-and-support-BPF_NEG' Jakub Kicinski says: ==================== nfp: bpf: rename ALU_OP_NEG and support BPF_NEG Jiong says: Compilers are starting to use BPF_NEG, for example LLVM. However, NFP does not support JITing it. This patch set adds this. Unit test is added as well. Meanwhile, the current NFP_ALU_NEG is actually doing bitwise NOT (one's complement) operation, so the name is misleading. This patch set corrects this. ==================== Signed-off-by: David S. Miller commit 254ef4d746878162bb095484fc4b53d713620c33 Author: Jiong Wang Date: Wed Nov 1 10:38:25 2017 -0700 nfp: bpf: support [BPF_ALU | BPF_ALU64] | BPF_NEG This patch supports BPF_NEG under both BPF_ALU64 and BPF_ALU. LLVM recently starts to generate it. NOTE: BPF_NEG takes single operand which is an register and serve as both input and output. Signed-off-by: Jiong Wang Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 5d42ced1950c7a7b5f5aa5c1c7e2c78dde9f8ca4 Author: Jiong Wang Date: Wed Nov 1 10:38:24 2017 -0700 nfp: bpf: rename ALU_OP_NEG to ALU_OP_NOT The current ALU_OP_NEG is Op encoding 0x4 for NPF ALU instruction. It is actually performing "~B" operation which is bitwise NOT. The using naming ALU_OP_NEG is misleading as NEG is -B which is not the same as ~B. Signed-off-by: Jiong Wang Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_asm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 259bc283069975004067c51cc09525a50db4b470 Author: Adriana Reus Date: Mon Oct 2 13:32:11 2017 +0300 clk: imx: imx7d: Remove ARM_M0 clock IMX7d does not have an M0 Core and this particular clock doesn't seem connected to anything else. Remove this entry from the CCM driver. Signed-off-by: Adriana Reus Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx7d.c | 9 --------- include/dt-bindings/clock/imx7d-clock.h | 8 ++++---- 2 files changed, 4 insertions(+), 13 deletions(-) commit edc5a8e754aba9c6eaeddd18cb1e72462f99b16c Author: Adriana Reus Date: Mon Oct 2 13:32:10 2017 +0300 clk: imx: imx7d: Fix parent clock for OCRAM_CLK The parent of OCRAM_CLK should be axi_main_root_clk and not axi_post_div. before: axi_src 1 1 332307692 0 0 axi_cg 1 1 332307692 0 0 axi_pre_div 1 1 332307692 0 0 axi_post_div 1 1 332307692 0 0 ocram_clk 0 0 332307692 0 0 main_axi_root_clk 1 1 332307692 0 0 after: axi_src 1 1 332307692 0 0 axi_cg 1 1 332307692 0 0 axi_pre_div 1 1 332307692 0 0 axi_post_div 1 1 332307692 0 0 main_axi_root_clk 1 1 332307692 0 0 ocram_clk 0 0 332307692 0 0 Reference Doc: i.MX 7D Reference Manual - Chap 5, p 516 (https://www.nxp.com/docs/en/reference-manual/IMX7DRM.pdf) Fixes: 8f6d8094b215 ("ARM: imx: add imx7d clk tree support") Signed-off-by: Adriana Reus Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx7d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f218065c136cc643e4773cad5e742f2c597988c Author: Philipp Zabel Date: Thu Oct 12 15:29:35 2017 +0200 clk: imx: clk-imx6ul: allow lcdif_pre_sel to change parent rate Allowing the lcdif_pre_sel to propagate rate changes to its parent PLL allows more fine grained control over the LCDIF pixel clock rate. For example, the Innovision AT043TN24 LCD panel described in the imx6ul-14x14-evk device tree requires a 9 MHz pixel clock. Before this patch, the lcdif_pre_sel clock rate is fixed, and just setting the lcdif_pred and lcdif_podf dividers only allows to get as close as about 8.44 MHz: pll3 1 1 480000000 0 0 pll3_bypass 1 1 480000000 0 0 pll3_usb_otg 1 1 480000000 0 0 pll3_pfd1_540m 1 1 540000000 0 0 lcdif_pre_sel 1 1 540000000 0 0 lcdif_pred 1 1 67500000 0 0 lcdif_podf 1 1 8437500 0 0 lcdif_pix 1 1 8437500 0 0 Once lcdif_pre_sel is allowed to propagate rate requests to its parent, the actual pixel clock matches the requested value: pll3 1 1 480000000 0 0 pll3_bypass 1 1 480000000 0 0 pll3_usb_otg 1 1 480000000 0 0 pll3_pfd1_540m 1 1 288000000 0 0 lcdif_pre_sel 1 1 288000000 0 0 lcdif_pred 1 1 36000000 0 0 lcdif_podf 1 1 9000000 0 0 lcdif_pix 1 1 9000000 0 0 Signed-off-by: Philipp Zabel Reviewed-by: Fabio Estevam Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx6ul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c68ee58d9ee7b856ac722f18f4f26579c8fbd2b4 Author: Sébastien Szymanski Date: Tue Aug 1 12:40:07 2017 +0200 clk: imx6: refine hdmi_isfr's parent to make HDMI work on i.MX6 SoCs w/o VPU On i.MX6 SoCs without VPU (in my case MCIMX6D4AVT10AC), the hdmi driver fails to probe: [ 2.540030] dwhdmi-imx 120000.hdmi: Unsupported HDMI controller (0000:00:00) [ 2.548199] imx-drm display-subsystem: failed to bind 120000.hdmi (ops dw_hdmi_imx_ops): -19 [ 2.557403] imx-drm display-subsystem: master bind failed: -19 That's because hdmi_isfr's parent, video_27m, is not correctly ungated. As explained in commit 5ccc248cc537 ("ARM: imx6q: clk: Add support for mipi_core_cfg clock as a shared clock gate"), video_27m is gated by CCM_CCGR3[CG8]. On i.MX6 SoCs with VPU, the hdmi is working thanks to the CCM_CMEOR[mod_en_ov_vpu] bit which makes the video_27m ungated whatever is in CCM_CCGR3[CG8]. The issue can be reproduced by setting CCMEOR[mod_en_ov_vpu] to 0. Make the HDMI work in every case by setting hdmi_isfr's parent to mipi_core_cfg. Signed-off-by: Sébastien Szymanski Reviewed-by: Fabio Estevam Signed-off-by: Stephen Boyd drivers/clk/imx/clk-imx6q.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07d3c4afc55870a4445d322adf4190463580da7d Merge: 03c4cc3 d7bcde4 Author: David S. Miller Date: Thu Nov 2 16:15:26 2017 +0900 Merge branch 'dpaa-cleanups' yuan linyu says: ==================== net: dpaa: two minor cleanup original i try to remove duplicate code which clean allocated per-cpu area, thanks to David S. Miller, there are two build warning as errors. path 1: fix old code maybe-uninitialized warning. path 2: remove duplicate code and fix unused var warning. ==================== Signed-off-by: David S. Miller commit d7bcde417b6b2e6f99ed9c2c38a0771b66efb060 Author: yuan linyu Date: Wed Nov 1 21:11:11 2017 +0800 net: dpaa: remove init which already done in per-cpu allocation Signed-off-by: yuan linyu Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 5 ----- 1 file changed, 5 deletions(-) commit a35c52b71580a1fb29df11270b1461f6d17f5670 Author: yuan linyu Date: Wed Nov 1 21:10:32 2017 +0800 net: dpaa: fix maybe uninitialized var in dpaa_open() Signed-off-by: yuan linyu Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 03c4cc385faaa46e5877f499c6b997fef792f8d3 Author: Jesper Dangaard Brouer Date: Wed Nov 1 12:44:45 2017 +0100 bpf: cpumap micro-optimization in cpu_map_enqueue Discovered that the compiler laid-out asm code in suboptimal way when studying perf report during benchmarking of cpumap. Help the compiler by the marking unlikely code paths. Signed-off-by: Jesper Dangaard Brouer Acked-by: John Fastabend Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/cpumap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14e83bf82961aeebef41976139c61ab82c84a238 Merge: 9289906 70b5aee Author: David S. Miller Date: Thu Nov 2 16:10:40 2017 +0900 Merge branch 'net-sched-block-callbacks-follow-up' Jiri Pirko says: ==================== net: sched: block callbacks follow-up This patchset does a bit of cleanup of leftovers after block callbacks patchset. The main part is patch 2, which restores the original handling of tc offload feature flag. --- v1->v2: - rebased on top of current net-next (bnxt changes) ==================== Signed-off-by: David S. Miller commit 70b5aee46782208c14d93b715e9f62f7fec844f1 Author: Jiri Pirko Date: Wed Nov 1 11:47:41 2017 +0100 net: sched: remove ndo_setup_tc check from tc_can_offload Since tc_can_offload is always called from block callback or egdev callback, no need to check if ndo_setup_tc exists. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/pkt_cls.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 7612fb0387d6ffcfc3173527466fe3f596657c58 Author: Jiri Pirko Date: Wed Nov 1 11:47:40 2017 +0100 net: sched: remove tc_can_offload check from egdev call Since the only user, mlx5 driver does the check in mlx5e_setup_tc_block_cb, no need to check here. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44ae12a768b7212976a362c590075716a77e8f28 Author: Jiri Pirko Date: Wed Nov 1 11:47:39 2017 +0100 net: sched: move the can_offload check from binding phase to rule insertion phase This restores the original behaviour before the block callbacks were introduced. Allow the drivers to do binding of block always, no matter if the NETIF_F_HW_TC feature is on or off. Move the check to the block callback which is called for rule insertion. Reported-by: Alexander Duyck Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 +++ drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 +++ drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 3 +++ drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 3 +++ drivers/net/ethernet/netronome/nfp/bpf/main.c | 3 +++ drivers/net/ethernet/netronome/nfp/flower/offload.c | 3 +++ net/dsa/slave.c | 3 +++ net/sched/cls_api.c | 2 +- 11 files changed, 27 insertions(+), 3 deletions(-) commit 0b5a89caee5c9958c18cd933c7f8891e35b21781 Author: Jiri Pirko Date: Wed Nov 1 11:47:38 2017 +0100 net: sched: remove unused tc_should_offload helper tc_should_offload is no longer used, remove it. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/pkt_cls.h | 7 ------- 1 file changed, 7 deletions(-) commit 7066fdd0d7427f1ba455d186e75213c442c9663b Author: Rajendra Nayak Date: Tue Oct 10 14:27:13 2017 +0530 clk: qcom: clk-smd-rpm: add msm8996 rpmclks Add all RPM controlled clocks on msm8996 platform [srini: Fixed various issues with offsets and made names specific to msm8996] Signed-off-by: Srinivas Kandagatla Signed-off-by: Rajendra Nayak Acked-by: Rob Herring Acked-by: Bjorn Andersson Signed-off-by: Stephen Boyd .../devicetree/bindings/clock/qcom,rpmcc.txt | 1 + drivers/clk/qcom/clk-smd-rpm.c | 82 ++++++++++++++++++++++ include/dt-bindings/clock/qcom,rpmcc.h | 14 ++++ include/linux/soc/qcom/smd-rpm.h | 4 ++ 4 files changed, 101 insertions(+) commit 928990631327cf00a9195e30fa22f7ae5f8d7e67 Author: Nikolay Aleksandrov Date: Wed Nov 1 12:18:13 2017 +0200 net: bridge: add notifications for the bridge dev on vlan change Currently the bridge device doesn't generate any notifications upon vlan modifications on itself because it doesn't use the generic bridge notifications. With the recent changes we know if anything was modified in the vlan config thus we can generate a notification when necessary for the bridge device so add support to br_ifinfo_notify() similar to how other combined functions are done - if port is present it takes precedence, otherwise notify about the bridge. I've explicitly marked the locations where the notification should be always for the port by setting bridge to NULL. I've also taken the liberty to rearrange each modified function's local variables in reverse xmas tree as well. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br.c | 2 +- net/bridge/br_if.c | 4 ++-- net/bridge/br_ioctl.c | 2 +- net/bridge/br_netlink.c | 58 ++++++++++++++++++++++++++--------------------- net/bridge/br_private.h | 3 ++- net/bridge/br_stp.c | 6 ++--- net/bridge/br_stp_if.c | 4 ++-- net/bridge/br_stp_timer.c | 2 +- net/bridge/br_sysfs_if.c | 2 +- 9 files changed, 45 insertions(+), 38 deletions(-) commit ad88d35a6216c54a005480d2693ed0a888ac1b7c Author: Colin Ian King Date: Wed Nov 1 10:17:15 2017 +0000 net: hns3: remove a couple of redundant assignments The assignment to kinfo is redundant as this is a duplicate of the initialiation of kinfo a few lines earlier, so it can be removed. The assignment to v_tc_info is never read, so this variable is redundant and can be removed completely. Cleans up two clang warnings: drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c:433:34: warning: Value stored to 'kinfo' during its initialization is never read drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c:775:3: warning: Value stored to 'v_tc_info' is never read Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 3 --- 1 file changed, 3 deletions(-) commit a666960d182cfb7074640bdb004633ffb2e58f26 Author: Colin Ian King Date: Wed Nov 1 09:09:13 2017 +0000 liquidio: remove redundant setting of inst_processed to zero The zero value assigned to inst_processed at the end of each iteration of the do-while loop is overwritten on the next iteration and hence it is a redundant assignment and can be removed. Cleans up clang warning: drivers/net/ethernet/cavium/liquidio/request_manager.c:480:3: warning: Value stored to 'inst_processed' is never read Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/request_manager.c | 2 -- 1 file changed, 2 deletions(-) commit 3b42c17a7e264ce4b351d2de205d4c39f725af0f Author: Luc Van Oostenryck Date: Tue Oct 31 18:22:08 2017 +0100 s390: pass endianness info to sparse s390 is big-endian only but sparse assumes the same endianness as the building machine. This is problematic for code which expect __BYTE_ORDER__ being correctly predefined by the compiler which sparse can then pre-process differently from what gcc would, depending on the building machine endianness. Fix this by letting sparse know about the architecture endianness. Signed-off-by: Luc Van Oostenryck Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5618c8e24ad6ab09282f6583a228d80c1fd14c65 Author: Colin Ian King Date: Wed Nov 1 08:57:37 2017 +0000 net: dl2k: remove redundant re-assignment to np The pointer np is initialized and then re-assigned the same value a few lines later. Remove the redundant duplicated assignment. Cleans up clang warning: drivers/net/ethernet/dlink/dl2k.c:314:25: warning: Value stored to 'np' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/dlink/dl2k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4a69583dee775826c02fa64e20fbf6ab193a3fc Author: Linus Walleij Date: Fri Oct 13 13:59:17 2017 +0200 clk: qcom: Implement RPM clocks for MSM8660/APQ8060 The RPM clocks were missing for MSM8660/APQ8060. For this to be completed we need to add a special fixed rate RPM clock that is used for the PLL4 on these SoCs. The rest of the clocks are pretty similar to the other supported platforms. The "active" clock pattern is mirrored in all the clocks. I guess that the PLL4 that clocks the LPASS is actually never used as "active only" since the low-power audio subsystem should be left on when the CPU goes to idle, so that it can be used as a stand-alone MP3 player type of device. The PLL4 seems to be enabled only on behalf of the booting LPASS Hexagon - which will cast its own vote once its booted - and as such we only configure the active state (meaning both states will have same configuration). The result is that PLL4 will be on from prepare() to unprepare() regardless of what the application CPU does. Signed-off-by: Linus Walleij Signed-off-by: Stephen Boyd drivers/clk/qcom/clk-rpm.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit 3a1246fcbcb43b33c4540d74c36119d6389a24b4 Author: Colin Ian King Date: Wed Nov 1 08:49:45 2017 +0000 wan: wanxl: remove redundant assignment to stat stat set to zero and the value is never read, instead stat is set again in the do-loop. Hence the setting to zero is redundant and can be removed. Cleans up clang warning: drivers/net/wan/wanxl.c:737:2: warning: Value stored to 'stat' is never read Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/wan/wanxl.c | 1 - 1 file changed, 1 deletion(-) commit 856e6bb91e198c4fb0ca2f4f3ee0e7f660b3e0ca Author: Linus Walleij Date: Fri Oct 13 13:59:16 2017 +0200 clk: qcom: Update DT bindings for the MSM8660/APQ8060 RPMCC These compatible strings need to be added to extend support for the RPM CC to cover MSM8660/APQ8060. We also need to add enumberators to the include file for a few clocks that were missing. Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Stephen Boyd Documentation/devicetree/bindings/clock/qcom,rpmcc.txt | 2 ++ include/dt-bindings/clock/qcom,rpmcc.h | 3 +++ 2 files changed, 5 insertions(+) commit 5e70ca8753c8d9749d206a4fdb14f22a6ba1d893 Author: Linus Walleij Date: Fri Oct 13 13:26:35 2017 +0200 clk: qcom: Elaborate on "active" clocks in the RPM clock bindings The concept of "active" clocks is just explained in a bried comment in the device driver, let's explain it a bit more in the device tree bindings so everyone understands this. Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Linus Walleij Signed-off-by: Stephen Boyd Documentation/devicetree/bindings/clock/qcom,rpmcc.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit a49580ec9af037b932d04f48ae83fc4a3bd9b0a4 Author: Georgi Djakov Date: Thu Aug 24 20:36:44 2017 +0300 clk: qcom: Remove unused RCG ops The RCGs ops for shared branches are not used now, so remove it. Signed-off-by: Georgi Djakov Signed-off-by: Stephen Boyd drivers/clk/qcom/clk-rcg.h | 3 -- drivers/clk/qcom/clk-rcg2.c | 79 --------------------------------------------- 2 files changed, 82 deletions(-) commit 92041a9ff003858f117009501c14f2d075dd68ce Author: Ludovic Desroches Date: Wed Sep 6 11:51:59 2017 +0200 clk: at91: utmi: set the mainck rate By default, it is assumed that the UTMI clock is generated from a 12 MHz reference clock (MAINCK). If it's not the case, the FREQ field of the SFR_UTMICKTRIM has to be updated to generate the UTMI clock in the proper way. The UTMI clock has a fixed rate of 480 MHz. In fact, there is no multiplier we can configure. The multiplier is managed internally, depending on the reference clock frequency, to achieve the target of 480 MHz. Signed-off-by: Ludovic Desroches Acked-by: Ingo van Lil Signed-off-by: Stephen Boyd drivers/clk/at91/clk-utmi.c | 95 +++++++++++++++++++++++++++++++++++++------- include/soc/at91/atmel-sfr.h | 2 + 2 files changed, 83 insertions(+), 14 deletions(-) commit b87206f8addc52b07e0aba30f8c8ee1a5093cfa9 Author: Stephen Boyd Date: Fri Sep 1 16:16:41 2017 -0700 clk: qcom: common: Migrate to devm_* APIs for resets and clk providers Now that we have devm APIs for the reset controller and of clk hw provider APIs we can remove the custom code here. Signed-off-by: Stephen Boyd drivers/clk/qcom/common.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) commit aa795c41d9cd41dc9c915dd1956ddd0e4ae44485 Author: Stephen Boyd Date: Fri Sep 1 16:16:40 2017 -0700 clk: Add devm_of_clk_add_hw_provider()/del_provider() APIs Sometimes we only have one of_clk_del_provider() call in driver error and remove paths, because we're missing a devm_of_clk_add_hw_provider() API. Introduce the API so we can convert drivers to use this and potentially reduce the amount of code needed to remove providers in drivers. Signed-off-by: Stephen Boyd Documentation/driver-model/devres.txt | 1 + drivers/clk/clk.c | 52 +++++++++++++++++++++++++++++++++++ include/linux/clk-provider.h | 13 +++++++++ 3 files changed, 66 insertions(+) commit 0777066dcee8a4f16db09fd21dfd58b6d83b12f9 Author: Bhumika Goyal Date: Fri Aug 18 15:38:17 2017 +0530 clk: make clk_init_data const Make these const as they are only stored in the init field of a clk_hw structure, which is const. Signed-off-by: Bhumika Goyal Signed-off-by: Stephen Boyd drivers/clk/clk-twl6040.c | 2 +- drivers/clk/clk-wm831x.c | 6 ++-- drivers/clk/sirf/clk-atlas6.c | 2 +- drivers/clk/sirf/clk-atlas7.c | 18 +++++----- drivers/clk/sirf/clk-common.c | 80 +++++++++++++++++++++---------------------- drivers/clk/sirf/clk-prima2.c | 2 +- 6 files changed, 55 insertions(+), 55 deletions(-) commit fa1da981f5ee603610bd8f8920c4ec393e95ceeb Author: Bhumika Goyal Date: Tue Aug 22 18:48:29 2017 +0530 clk: imx: make clk_ops const Make these const as they are only stored in the const field of a clk_init_data structure. Signed-off-by: Bhumika Goyal Signed-off-by: Stephen Boyd drivers/clk/imx/clk-busy.c | 4 ++-- drivers/clk/imx/clk-gate2.c | 2 +- drivers/clk/imx/clk-pllv1.c | 2 +- drivers/clk/imx/clk-pllv2.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit e90a7da4f75435ba0e5fcb12ed65fa6d4bd7a364 Author: Bhumika Goyal Date: Tue Aug 22 19:05:55 2017 +0530 clk: mmp: make clk_ops const Make these const as they are only stored in the const field of a clk_init_data structure. Signed-off-by: Bhumika Goyal Signed-off-by: Stephen Boyd drivers/clk/mmp/clk-apbc.c | 2 +- drivers/clk/mmp/clk-apmu.c | 2 +- drivers/clk/mmp/clk-frac.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 9108620d2d52d7a58bbf6192e56903355eace907 Author: Bhumika Goyal Date: Tue Aug 22 19:12:07 2017 +0530 clk: hisilicon: make clk_ops const Make these const as they are only stored in the const field of a clk_init_data structure. Signed-off-by: Bhumika Goyal Signed-off-by: Stephen Boyd drivers/clk/hisilicon/clk-hi3620.c | 2 +- drivers/clk/hisilicon/clk-hix5hd2.c | 4 ++-- drivers/clk/hisilicon/clkgate-separated.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit ed3f2d12213b3d13ca0b941199c250c66a318b72 Author: Bhumika Goyal Date: Tue Aug 22 19:22:47 2017 +0530 clk: mxs: make clk_ops const Make these const as they are only stored in the const field of a clk_init_data structure. Signed-off-by: Bhumika Goyal Signed-off-by: Stephen Boyd drivers/clk/mxs/clk-div.c | 2 +- drivers/clk/mxs/clk-frac.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8f435057e9c5eca9da7c02ab398971280ba80056 Author: Bhumika Goyal Date: Tue Aug 22 19:32:21 2017 +0530 clk: sirf: make clk_ops const Make these const as they are only stored in the const field of a clk_init_data structure. Signed-off-by: Bhumika Goyal Signed-off-by: Stephen Boyd drivers/clk/sirf/clk-common.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ba3892df525b9ff203d0ad116a41306bf5081215 Author: Bhumika Goyal Date: Tue Aug 22 18:44:50 2017 +0530 clk: spear: make clk_ops const Make these const as they are only stored in the const field of a clk_init_data structure. Signed-off-by: Bhumika Goyal Acked-by: Viresh Kumar Signed-off-by: Stephen Boyd drivers/clk/spear/clk-aux-synth.c | 2 +- drivers/clk/spear/clk-frac-synth.c | 2 +- drivers/clk/spear/clk-gpt-synth.c | 2 +- drivers/clk/spear/clk-vco-pll.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) commit ed29668d1aa2c6f01e61dd616df13b5241cee7e0 Merge: 65c959a 3a99df9 Author: David S. Miller Date: Thu Nov 2 14:59:52 2017 +0900 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Smooth Cong Wang's bug fix into 'net-next'. Basically put the bulk of the tcf_block_put() logic from 'net' into tcf_block_put_ext(), but after the offload unbind. Signed-off-by: David S. Miller commit 37d2f45d940bfdd7c9a5323f3d3462bea3a3e957 Author: Bhumika Goyal Date: Tue Oct 17 16:38:34 2017 +0200 CLK: SPEAr: make aux_clk_masks structures const Make these const as they are either stored in the masks 'const' field of a clk_aux structure or passed to the function clk_register_aux having the argument as const. Signed-off-by: Bhumika Goyal Acked-by: Viresh Kumar Signed-off-by: Stephen Boyd drivers/clk/spear/clk-aux-synth.c | 2 +- drivers/clk/spear/spear1310_clock.c | 2 +- drivers/clk/spear/spear1340_clock.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 71bf5ab8638fe333ac8a984b46fc3f4ea0c5120a Author: Bhumika Goyal Date: Tue Oct 17 16:38:33 2017 +0200 CLK: SPEAr: make structure field and function argument as const Make the masks field of clk_aux structure const as it do not modify the fields of the aux_clk_masks structure it points to. Make the struct aux_clk_masks *aux argument of the function clk_register_aux as const as the argument is only stored in the masks field of a clk_aux structure which is now made const. Signed-off-by: Bhumika Goyal Acked-by: Viresh Kumar Signed-off-by: Stephen Boyd drivers/clk/spear/clk-aux-synth.c | 2 +- drivers/clk/spear/clk.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit cb92a19b9977706ac69e26c67dcccb69ae6deeb0 Author: Philipp Zabel Date: Wed Jul 19 17:25:13 2017 +0200 clk: sunxi: explicitly request exclusive reset control Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting reset lines") started to transition the reset control request API calls to explicitly state whether the driver needs exclusive or shared reset control behavior. Convert all drivers requesting exclusive resets to the explicit API call so the temporary transition helpers can be removed. No functional changes. Cc: "Emilio López" Cc: Michael Turquette Cc: Stephen Boyd Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: linux-clk@vger.kernel.org Signed-off-by: Philipp Zabel Signed-off-by: Stephen Boyd drivers/clk/sunxi/clk-sun9i-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 02e0114ae1eb776b22f0744762fb0137208c4850 Author: Corentin LABBE Date: Tue Oct 24 19:06:16 2017 +0200 clk: sunxi: fix build warning This patch fix the following build warning: drivers/clk/sunxi/clk-factors.c:279:14: warning: variable 'name' set but not used [-Wunused-but-set-variable] Fixes: 4cbeaebb8af1 ("clk: sunxi: factors: Add unregister function") Acked-by: Maxime Ripard Signed-off-by: Corentin Labbe Signed-off-by: Stephen Boyd drivers/clk/sunxi/clk-factors.c | 2 -- 1 file changed, 2 deletions(-) commit 65c959a39b7e9ad6b443b74904486b4a75b0232f Merge: de21807 a4b6ade Author: David S. Miller Date: Thu Nov 2 14:19:53 2017 +0900 Merge branch 'samples-pktgen-updates' Jesper Dangaard Brouer says: ==================== Updates for samples/pktgen This patchset updates samples/pktgen and synchronize with changes maintained in https://github.com/netoptimizer/network-testing/ Features wise Robert Hoo added support for detecting and determining dev NUMA node IRQs, and added a new script named pktgen_sample06_numa_awared_queue_irq_affinity.sh that use these features. Cleanup remove last of the old sample files, as IPv6 is covered by existing sample code. ==================== Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller commit a4b6ade8359fc265fb4f8691fea33f4eaa66c951 Author: Jesper Dangaard Brouer Date: Wed Nov 1 11:41:24 2017 +0100 samples/pktgen: remove remaining old pktgen sample scripts Since commit 0f06a6787e05 ("samples: Add an IPv6 '-6' option to the pktgen scripts") the newer pktgen_sampleXX script does show howto use IPv6 with pktgen. Thus, there is no longer a reason to keep the older sample scripts around. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller samples/pktgen/pktgen.conf-1-1-ip6 | 60 ---------------------------- samples/pktgen/pktgen.conf-1-1-ip6-rdos | 63 ------------------------------ samples/pktgen/pktgen.conf-1-2 | 69 --------------------------------- 3 files changed, 192 deletions(-) commit 9efc44d74b586218e923e3dafb3462d21948c5c6 Author: Jesper Dangaard Brouer Date: Wed Nov 1 11:41:19 2017 +0100 samples/pktgen: update sample03, no need for clones when bursting Like sample05, don't use pktgen clone_skb feature when using 'burst' feature, it is not really needed. This brings the burst users in sync. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller samples/pktgen/pktgen_sample03_burst_single_flow.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 029e1ea65e37fd26c22012bf8828ab540e108767 Author: Robert Hoo Date: Wed Nov 1 11:41:14 2017 +0100 samples/pktgen: add script pktgen_sample06_numa_awared_queue_irq_affinity.sh This script simply does: * Detect $DEV's NUMA node belonging. * Bind each thread (processor of NUMA locality) with each $DEV queue's irq affinity, 1:1 mapping. * How many '-t' threads input determines how many queues will be utilized. If '-f' designates first cpu id, then offset in the NUMA node's cpu list. (Changes by Jesper: allow changing count from cmdline via '-n') Signed-off-by: Robert Hoo Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller ...tgen_sample06_numa_awared_queue_irq_affinity.sh | 97 ++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit 22ac5ad4a7d4e201d19b7f04ce8d79346c80a34b Author: Robert Hoo Date: Wed Nov 1 11:41:09 2017 +0100 samples/pktgen: Add some helper functions 1. given a device, get its NUMA belongings 2. given a device, get its queues' irq numbers. 3. given a NUMA node, get its cpu id list. Signed-off-by: Robert Hoo Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller samples/pktgen/functions.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit de218073e16f967620c4a4b2620525ea3d2e0d5f Merge: 59c1cec 8af67d3 Author: David S. Miller Date: Thu Nov 2 14:17:12 2017 +0900 Merge branch 'enic-Additional-ethtool-support' Parvi Kaustubhi says: ==================== enic: Additional ethtool support This patch set allows the user to show or modify rx/tx ring sizes using ethtool. v2: - remove unused variable to fix build warning. - update list of maintainers for cisco vic ethernet nic driver. ==================== Signed-off-by: David S. Miller commit 8af67d34915d879ea3a2e8ad153c71a65031d174 Author: Parvi Kaustubhi Date: Wed Nov 1 08:44:48 2017 -0700 MAINTAINERS: update MAINTAINERS for cisco vic Add myself to list of maintainers for cisco vic ethernet nic driver. Remove Neel as he left. Signed-off-by: Parvi Kaustubhi Signed-off-by: David S. Miller MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed519b7488a42ce549ef7eae8dd13e043dde10a4 Author: Parvi Kaustubhi Date: Wed Nov 1 08:44:47 2017 -0700 enic: Add support for 'ethtool -g/-G' Add support for displaying and modifying rx and tx ring sizes using ethtool. Also, increasing version to 2.3.0.45 Signed-off-by: Parvi Kaustubhi Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic.h | 2 +- drivers/net/ethernet/cisco/enic/enic_ethtool.c | 77 ++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) commit e6cdfcc581866625980a89391be4e6a8b379d0c5 Author: Parvi Kaustubhi Date: Wed Nov 1 08:44:46 2017 -0700 enic: reset fetch index Since we are allowing rx ring size modification, reset fetch index everytime. Otherwise it could have a stale value that can lead to a null pointer dereference. Signed-off-by: Govindarajulu Varadarajan Signed-off-by: Parvi Kaustubhi Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/vnic_rq.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit b90f6ff080c52e2f05364210733df120e3c4e597 Author: Artur Paszkiewicz Date: Thu Oct 26 15:56:54 2017 +0200 md: don't check MD_SB_CHANGE_CLEAN in md_allow_write Only MD_SB_CHANGE_PENDING should be used to wait for transition from clean to dirty. Checking also MD_SB_CHANGE_CLEAN is unnecessary and can race with e.g. md_do_sync(). This sporadically causes a hang when changing consistency policy during resync: INFO: task mdadm:6183 blocked for more than 30 seconds. Not tainted 4.14.0-rc3+ #391 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. mdadm D12752 6183 6022 0x00000000 Call Trace: __schedule+0x93f/0x990 schedule+0x6b/0x90 md_allow_write+0x100/0x130 [md_mod] ? do_wait_intr_irq+0x90/0x90 resize_stripes+0x3a/0x5b0 [raid456] ? kernfs_fop_write+0xbe/0x180 raid5_change_consistency_policy+0xa6/0x200 [raid456] consistency_policy_store+0x2e/0x70 [md_mod] md_attr_store+0x90/0xc0 [md_mod] sysfs_kf_write+0x42/0x50 kernfs_fop_write+0x119/0x180 __vfs_write+0x28/0x110 ? rcu_sync_lockdep_assert+0x12/0x60 ? __sb_start_write+0x15a/0x1c0 ? vfs_write+0xa3/0x1a0 vfs_write+0xb4/0x1a0 SyS_write+0x49/0xa0 entry_SYSCALL_64_fastpath+0x18/0xad Fixes: 2214c260c72b ("md: don't return -EAGAIN in md_allow_write for external metadata arrays") Cc: Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li drivers/md/md.c | 1 - 1 file changed, 1 deletion(-) commit f0e230ad877855567607fe2f40802b6317ad38f3 Author: Guoqing Jiang Date: Tue Oct 24 15:11:53 2017 +0800 md-cluster: update document for raid10 Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li Documentation/md/md-cluster.txt | 3 ++- drivers/md/Kconfig | 5 +++-- drivers/md/md-cluster.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) commit fc33060ba0c78310f6398357ffca8f55a4c41cee Author: Colin Ian King Date: Fri Oct 27 16:59:06 2017 +0100 md: remove redundant variable q The pointer q is assigned but never read; it is redundant and can be removed. Cleans up clang warning: drivers/md/md-multipath.c:260:4: warning: Value stored to 'q' is never read Signed-off-by: Colin Ian King Signed-off-by: Shaohua Li drivers/md/md-multipath.c | 2 -- 1 file changed, 2 deletions(-) commit f81f7302e86f5c0a21b59c94164f2510812b7764 Author: Guoqing Jiang Date: Tue Oct 24 15:33:33 2017 +0800 raid1: remove obsolete code in raid1_write_request There are some lines could be removed due to recent change for raid1 such as commit 3956df15d634 ("md: move suspend_hi/lo handling into core md code"). Also, seems some comments are put to wrong place, move them before wait_barrier. Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/raid1.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 8db87912c9a8771c53b98845cd5516ea63b22e1e Author: Guoqing Jiang Date: Tue Oct 24 15:11:52 2017 +0800 md-cluster: Use a small window for raid10 resync Suspending the entire device for resync could take too long. Resync in small chunks. cluster's resync window is maintained in r10conf as cluster_sync_low and cluster_sync_high, and processed in raid10's sync_request(). If the current resync is outside the cluster resync window: 1. Set the cluster_sync_low to curr_resync_completed. 2. Set cluster_sync_high to cluster_sync_low + stripe size. 3. Send a message to all nodes so they may add it in their suspension list. Note: We only support "near" raid10 so far, resync a far or offset raid10 array could have trouble. So raid10_run checks the layout of clustered raid10, it will refuse to run if the layout is not correct. With the "near" layout we process one stripe at a time progressing monotonically through the address space. So we can have a sliding window of whole-stripes which moves through the array suspending IO on other nodes, and both resync which uses array addresses and recovery which uses device addresses can stay within this window. Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/raid10.c | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++- drivers/md/raid10.h | 6 +++ 2 files changed, 118 insertions(+), 1 deletion(-) commit cb8a7a7e1098e74d36378b992a6d012668ec10d9 Author: Guoqing Jiang Date: Tue Oct 24 15:11:51 2017 +0800 md-cluster: Suspend writes in RAID10 if within range If there is a resync going on, all nodes must suspend writes to the range. This is recorded in suspend_info and suspend_list. If there is an I/O within the ranges of any of the suspend_info, area_resyncing will return 1. Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/raid10.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit d4098c7262a47f529765d89614484a957363d623 Author: Guoqing Jiang Date: Tue Oct 24 15:11:50 2017 +0800 md-cluster/raid10: set "do_balance = 0" if area is resyncing Just like clustered raid1, it is impossible for cluster raid10 to choose the best device for read balance when the area of array is resyncing. Because we cannot trust the data to be the same on all devices at that time, so we choose just the first one to use, so set do_balance to 0. Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/raid10.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit efa4b77b00b56138fb7e68d2fe8fd1b3c15cd503 Author: Shaohua Li Date: Wed Oct 18 22:08:13 2017 -0700 md: use lockdep_assert_held lockdep_assert_held is a better way to assert lock held, and it works for UP. Signed-off-by: Shaohua Li drivers/md/md.c | 4 ++-- drivers/md/md.h | 5 ----- drivers/md/raid5-cache.c | 12 ++++++------ 3 files changed, 8 insertions(+), 13 deletions(-) commit f6eca2d43ed694ab8124dd24c88277f7eca93b7d Author: Nate Dailey Date: Tue Oct 17 08:17:03 2017 -0400 raid1: prevent freeze_array/wait_all_barriers deadlock If freeze_array is attempted in the middle of close_sync/ wait_all_barriers, deadlock can occur. freeze_array will wait for nr_pending and nr_queued to line up. wait_all_barriers increments nr_pending for each barrier bucket, one at a time, but doesn't actually issue IO that could be counted in nr_queued. So freeze_array is blocked until wait_all_barriers completes and allow_all_barriers runs. At the same time, when _wait_barrier sees array_frozen == 1, it stops and waits for freeze_array to complete. Prevent the deadlock by making close_sync call _wait_barrier and _allow_barrier for one bucket at a time, instead of deferring the _allow_barrier calls until after all _wait_barriers are complete. Signed-off-by: Nate Dailey Fix: fd76863e37fe(RAID1: a new I/O barrier implementation to remove resync window) Reviewed-by: Coly Li Cc: stable@vger.kernel.org (v4.11) Signed-off-by: Shaohua Li drivers/md/raid1.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) commit ae89fd3de4793c0dc2ec7e9f26b58a357d74a6c7 Author: Mikulas Patocka Date: Wed Oct 18 19:01:11 2017 -0400 md: use TASK_IDLE instead of blocking signals Hi - I submit this patch for the next merge window: Some times ago, I made a patch f9c79bc05a2a that blocks signals around the schedule() calls in MD. The MD subsystem needs to do an uninterruptible sleep that is not accounted in load average - so we block signals and use interruptible sleep. The kernel has a special TASK_IDLE state for this purpose, so we can use it instead of blocking signals. This patch doesn't fix any bug, it just makes the code simpler. Signed-off-by: Mikulas Patocka Acked-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid1.c | 7 +------ drivers/md/raid5.c | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) commit b03e0ccb5ab9df3efbe51c87843a1ffbecbafa1f Author: NeilBrown Date: Thu Oct 19 12:49:15 2017 +1100 md: remove special meaning of ->quiesce(.., 2) The '2' argument means "wake up anything that is waiting". This is an inelegant part of the design and was added to help support management of suspend_lo/suspend_hi setting. Now that suspend_lo/hi is managed in mddev_suspend/resume, that need is gone. These is still a couple of places where we call 'quiesce' with an argument of '2', but they can safely be changed to call ->quiesce(.., 1); ->quiesce(.., 0) which achieve the same result at the small cost of pausing IO briefly. This removes a small "optimization" from suspend_{hi,lo}_store, but it isn't clear that optimization served a useful purpose. The code now is a lot clearer. Suggested-by: Shaohua Li Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md-cluster.c | 6 +++--- drivers/md/md.c | 34 ++++++++++------------------------ drivers/md/md.h | 9 ++++----- drivers/md/raid0.c | 2 +- drivers/md/raid1.c | 13 +++---------- drivers/md/raid10.c | 10 +++------- drivers/md/raid5-cache.c | 12 ++++++------ drivers/md/raid5-log.h | 2 +- drivers/md/raid5.c | 18 ++++++------------ 9 files changed, 37 insertions(+), 69 deletions(-) commit 35bfc52187f6df8779d0f1cebdb52b7f797baf4e Author: NeilBrown Date: Tue Oct 17 13:46:43 2017 +1100 md: allow metadata update while suspending. There are various deadlocks that can occur when a thread holds reconfig_mutex and calls ->quiesce(mddev, 1). As some write request block waiting for metadata to be updated (e.g. to record device failure), and as the md thread updates the metadata while the reconfig mutex is held, holding the mutex can stop write requests completing, and this prevents ->quiesce(mddev, 1) from completing. ->quiesce() is now usually called from mddev_suspend(), and it is always called with reconfig_mutex held. So at this time it is safe for the thread to update metadata without explicitly taking the lock. So add 2 new flags, one which says the unlocked updates is allowed, and one which ways it is happening. Then allow it while the quiesce completes, and then wait for it to finish. Reported-and-tested-by: Xiao Ni Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 14 ++++++++++++++ drivers/md/md.h | 6 ++++++ 2 files changed, 20 insertions(+) commit 9e1cc0a54556a6c63dc0cfb7cd7d60d43337bba6 Author: NeilBrown Date: Tue Oct 17 13:46:43 2017 +1100 md: use mddev_suspend/resume instead of ->quiesce() mddev_suspend() is a more general interface than calling ->quiesce() and is so more extensible. A future patch will make use of this. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit b3143b9a38d5039bcd1f2d1c94039651bfba8043 Author: NeilBrown Date: Tue Oct 17 13:46:43 2017 +1100 md: move suspend_hi/lo handling into core md code responding to ->suspend_lo and ->suspend_hi is similar to responding to ->suspended. It is best to wait in the common core code without incrementing ->active_io. This allows mddev_suspend()/mddev_resume() to work while requests are waiting for suspend_lo/hi to change. This is will be important after a subsequent patch which uses mddev_suspend() to synchronize updating for suspend_lo/hi. So move the code for testing suspend_lo/hi out of raid1.c and raid5.c, and place it in md.c Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 29 +++++++++++++++++++++++------ drivers/md/raid1.c | 14 +++++--------- drivers/md/raid5.c | 22 ---------------------- 3 files changed, 28 insertions(+), 37 deletions(-) commit 52a0d49de3d592a3118e13f35985e3d99eaf43df Author: NeilBrown Date: Tue Oct 17 13:46:43 2017 +1100 md: don't call bitmap_create() while array is quiesced. bitmap_create() allocates memory with GFP_KERNEL and so can wait for IO. If called while the array is quiesced, it could wait indefinitely for write out to the array - deadlock. So call bitmap_create() before quiescing the array. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 4d5324f760aacaefeb721b172aa14bf66045c332 Author: NeilBrown Date: Thu Oct 19 12:17:16 2017 +1100 md: always hold reconfig_mutex when calling mddev_suspend() Most often mddev_suspend() is called with reconfig_mutex held. Make this a requirement in preparation a subsequent patch. Also require reconfig_mutex to be held for mddev_resume(), partly for symmetry and partly to guarantee no races with incr/decr of mddev->suspend. Taking the mutex in r5c_disable_writeback_async() is a little tricky as this is called from a work queue via log->disable_writeback_work, and flush_work() is called on that while holding ->reconfig_mutex. If the work item hasn't run before flush_work() is called, the work function will not be able to get the mutex. So we use mddev_trylock() inside the wait_event() call, and have that abort when conf->log is set to NULL, which happens before flush_work() is called. We wait in mddev->sb_wait and ensure this is woken when any of the conditions change. This requires waking mddev->sb_wait in mddev_unlock(). This is only like to trigger extra wake_ups of threads that needn't be woken when metadata is being written, and that doesn't happen often enough that the cost would be noticeable. Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/dm-raid.c | 10 ++++++++-- drivers/md/md.c | 3 +++ drivers/md/raid5-cache.c | 18 +++++++++++++----- 3 files changed, 24 insertions(+), 7 deletions(-) commit 230b55fa8d64007339319539f8f8e68114d08529 Author: NeilBrown Date: Tue Oct 17 14:24:09 2017 +1100 md: forbid a RAID5 from having both a bitmap and a journal. Having both a bitmap and a journal is pointless. Attempting to do so can corrupt the bitmap if the journal replay happens before the bitmap is initialized. Rather than try to avoid this corruption, simply refuse to allow arrays with both a bitmap and a journal. So: - if raid5_run sees both are present, fail. - if adding a bitmap finds a journal is present, fail - if adding a journal finds a bitmap is present, fail. Cc: stable@vger.kernel.org (4.10+) Signed-off-by: NeilBrown Tested-by: Joshua Kinard Acked-by: Joshua Kinard Signed-off-by: Shaohua Li drivers/md/md-bitmap.c | 6 ++++++ drivers/md/md.c | 2 +- drivers/md/raid5.c | 7 +++++++ 3 files changed, 14 insertions(+), 1 deletion(-) commit 2ef7a95fe537c0e2ee039179ecab27e6d63fa1e1 Merge: 7a88cbd 46bda4f Author: Dave Airlie Date: Thu Nov 2 14:00:35 2017 +1000 Merge branch 'linux-4.15' of git://github.com/skeggsb/linux into drm-next - Pascal temperature sensor support - Improved BAR2 handling, greatly reduces time required to suspend - Rework of the MMU code - Allows us to properly support Pascal's new MMU layout (implemented) - Lays the groundwork for improved userspace APIs later - Misc other fixes * 'linux-4.15' of git://github.com/skeggsb/linux: (151 commits) drm/nouveau/gr/gf100-: don't prevent module load if firmware missing drm/nouveau/mmu: remove old vmm frontend drm/nouveau: improve selection of GPU page size drm/nouveau: switch over to new memory and vmm interfaces drm/nouveau: remove unused nouveau_fence_work() drm/nouveau: queue delayed unmapping of VMAs on client workqueue drm/nouveau: implement per-client delayed workqueue with fence support drm/nouveau: determine memory class for each client drm/nouveau: pass handle of vmm object to channel allocation ioctls drm/nouveau: switch to vmm limit drm/nouveau: allocate vmm object for every client drm/nouveau: replace use of cpu_coherent with memory types drm/nouveau: use nvif_mmu_type to determine BAR1 caching drm/nouveau: fetch memory type indices that we care about for ttm drm/nouveau: consolidate handling of dma mask drm/nouveau: check kind validity against mmu object drm/nouveau: allocate mmu object for every client drm/nouveau: remove trivial cases of nvxx_device() usage drm/nouveau/mmu: define user interfaces to mmu vmm opertaions drm/nouveau/mmu: define user interfaces to mmu memory allocation ... commit 46bda4f4af5d061ce07148e833ff4deb50737536 Author: Ben Skeggs Date: Wed Nov 1 03:56:20 2017 +1000 drm/nouveau/gr/gf100-: don't prevent module load if firmware missing Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 632b740c5481988152a3a60319aaa49c99577b77 Author: Ben Skeggs Date: Wed Nov 1 03:56:20 2017 +1000 drm/nouveau/mmu: remove old vmm frontend Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/device.h | 2 - drivers/gpu/drm/nouveau/include/nvkm/core/client.h | 2 - drivers/gpu/drm/nouveau/include/nvkm/core/os.h | 2 - drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 14 -- drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 26 +-- drivers/gpu/drm/nouveau/nouveau_drm.c | 6 - drivers/gpu/drm/nouveau/nouveau_drv.h | 1 - drivers/gpu/drm/nouveau/nouveau_gem.c | 7 - drivers/gpu/drm/nouveau/nouveau_vmm.c | 1 - drivers/gpu/drm/nouveau/nouveau_vmm.h | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c | 6 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.c | 10 -- drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf108.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk104.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk20a.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm107.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm20b.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp100.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp102.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp10b.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv04.c | 9 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv10.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv1a.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv20.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv25.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv30.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv35.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv36.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv40.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv41.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv44.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv46.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv47.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv49.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv4e.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c | 19 -- drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.h | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h | 5 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c | 9 - .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 11 -- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 195 --------------------- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/g84.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c | 78 ++++----- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk104.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk20a.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm200.c | 4 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm20b.c | 4 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp100.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c | 4 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv41.c | 4 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c | 4 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv50.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 3 - 57 files changed, 40 insertions(+), 427 deletions(-) commit 7dc6a446da7caf5ea5cf48f2b8843366ee8b0979 Author: Ben Skeggs Date: Wed Nov 1 03:56:20 2017 +1000 drm/nouveau: improve selection of GPU page size Enables the use of Pascal's 2MiB pages for larger buffers. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_bo.c | 48 ++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 10 deletions(-) commit d7722134b8254bcee6086230723814cddf9ab54b Author: Ben Skeggs Date: Wed Nov 1 03:56:20 2017 +1000 drm/nouveau: switch over to new memory and vmm interfaces Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/device.h | 2 - drivers/gpu/drm/nouveau/nouveau_bo.c | 92 +++++++----- drivers/gpu/drm/nouveau/nouveau_chan.c | 11 ++ drivers/gpu/drm/nouveau/nouveau_gem.c | 1 + drivers/gpu/drm/nouveau/nouveau_mem.c | 192 +++++++++++++++----------- drivers/gpu/drm/nouveau/nouveau_mem.h | 21 +-- drivers/gpu/drm/nouveau/nouveau_sgdma.c | 2 +- drivers/gpu/drm/nouveau/nouveau_ttm.c | 18 +-- drivers/gpu/drm/nouveau/nouveau_vmm.c | 24 ++-- drivers/gpu/drm/nouveau/nouveau_vmm.h | 2 - 10 files changed, 209 insertions(+), 156 deletions(-) commit 10842ba074e95efad1ac7de2f5279910988f3e68 Author: Ben Skeggs Date: Wed Nov 1 03:56:20 2017 +1000 drm/nouveau: remove unused nouveau_fence_work() Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_fence.c | 56 --------------------------------- drivers/gpu/drm/nouveau/nouveau_fence.h | 1 - 2 files changed, 57 deletions(-) commit 00d041d087c1715039bf7a610140ffe1af347b55 Author: Ben Skeggs Date: Wed Nov 1 03:56:20 2017 +1000 drm/nouveau: queue delayed unmapping of VMAs on client workqueue VMAs are about to not take references on the VMM they belong to, which means more care is required when handling delayed unmapping. Queuing it on the client workqueue ensures all pending VMA unmaps will have completed before the VMM is destroyed. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_gem.c | 36 +++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) commit 814a23243bd2aaa9aafe03d85d0502a73be42b58 Author: Ben Skeggs Date: Wed Nov 1 03:56:20 2017 +1000 drm/nouveau: implement per-client delayed workqueue with fence support Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_drm.c | 56 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/nouveau/nouveau_drv.h | 14 +++++++++ 2 files changed, 70 insertions(+) commit 7f50762423b4825674ee7fe10fa37abdafdcf754 Author: Ben Skeggs Date: Wed Nov 1 03:56:20 2017 +1000 drm/nouveau: determine memory class for each client Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_drm.c | 16 ++++++++++++++++ drivers/gpu/drm/nouveau/nouveau_drv.h | 1 + 2 files changed, 17 insertions(+) commit 832ca2ac3c95feb01e53c24fcd1a00b4cf05cbdc Author: Ben Skeggs Date: Wed Nov 1 03:56:20 2017 +1000 drm/nouveau: pass handle of vmm object to channel allocation ioctls Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/cl506e.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl506f.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl826e.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl826f.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cl906f.h | 2 +- drivers/gpu/drm/nouveau/include/nvif/cla06f.h | 2 +- drivers/gpu/drm/nouveau/nouveau_chan.c | 7 ++++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 12 +++++++----- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c | 7 +++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.c | 7 +++++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.h | 4 ++-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmag84.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv50.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifog84.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 8 +++++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 14 ++++++++------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifonv50.c | 6 +++--- 17 files changed, 54 insertions(+), 41 deletions(-) commit 3c5026395bcdaa956fa5c6ec7571f1a04847c74b Author: Ben Skeggs Date: Wed Nov 1 03:56:20 2017 +1000 drm/nouveau: switch to vmm limit Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_chan.c | 12 +++++------- drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) commit 96da0bcd51964ca708d8de2987ff473a9da4406d Author: Ben Skeggs Date: Wed Nov 1 03:56:20 2017 +1000 drm/nouveau: allocate vmm object for every client Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_drm.c | 50 ++++++++++++++++++----------------- drivers/gpu/drm/nouveau/nouveau_drv.h | 1 + drivers/gpu/drm/nouveau/nouveau_gem.c | 8 +++--- drivers/gpu/drm/nouveau/nouveau_mem.h | 5 ---- drivers/gpu/drm/nouveau/nouveau_vmm.c | 12 ++++++--- drivers/gpu/drm/nouveau/nouveau_vmm.h | 4 ++- 6 files changed, 44 insertions(+), 36 deletions(-) commit acb16cfa95f1cc6fb4b1b52da27bdbeb079ef115 Author: Ben Skeggs Date: Wed Nov 1 03:56:20 2017 +1000 drm/nouveau: replace use of cpu_coherent with memory types Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_bo.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit b34720200bb1334c78aaecb999cc2b18a71b9277 Author: Ben Skeggs Date: Wed Nov 1 03:56:20 2017 +1000 drm/nouveau: use nvif_mmu_type to determine BAR1 caching Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/device.h | 1 - drivers/gpu/drm/nouveau/nouveau_bo.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 658c71f4e7cabce658692a81732563e74de0c952 Author: Ben Skeggs Date: Wed Nov 1 03:56:20 2017 +1000 drm/nouveau: fetch memory type indices that we care about for ttm Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_drv.h | 3 +++ drivers/gpu/drm/nouveau/nouveau_ttm.c | 30 +++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) commit 325a72827c2c000f6f3810a3e680fa1101d94456 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: consolidate handling of dma mask Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_ttm.c | 31 +--------------------- drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 24 ++++++++--------- drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 2 -- 3 files changed, 13 insertions(+), 44 deletions(-) commit a220dd73215be28285f6c90355abbe9e21974c77 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: check kind validity against mmu object This is already handled in the top-level gem_new() ioctl in another manner, but this will be removed in a future commit. Ideally we'd not need to check up-front at all, and let the VMM code handle error checking, but there are paths in the current BO management code where this isn't possible due to map() not always being called during BO creation, and map() calls not being allowed to fail during buffer migration. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_bo.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 01670a79d5fa2f6659d18af6d52cca6c44f73646 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: allocate mmu object for every client Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_drm.c | 20 ++++++++++++++++++++ drivers/gpu/drm/nouveau/nouveau_drv.h | 2 ++ 2 files changed, 22 insertions(+) commit 359088d5b8ec06196a9ea53e7e59167514220465 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: remove trivial cases of nvxx_device() usage Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_abi16.c | 30 +++++++++++++++----------- drivers/gpu/drm/nouveau/nouveau_bo.c | 38 ++++++++++++--------------------- 2 files changed, 31 insertions(+), 37 deletions(-) commit 920d2b5ef2157e169d85cb778feca558c56b8370 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu: define user interfaces to mmu vmm opertaions Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/if000c.h | 61 +++++ drivers/gpu/drm/nouveau/include/nvif/vmm.h | 42 +++ drivers/gpu/drm/nouveau/nvif/Kbuild | 1 + drivers/gpu/drm/nouveau/nvif/vmm.c | 167 ++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ummu.c | 9 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c | 352 +++++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.h | 14 + 8 files changed, 647 insertions(+) commit c83c4097eba8950bc7028f0846c21f9718dd8697 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu: define user interfaces to mmu memory allocation Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/if000a.h | 9 + drivers/gpu/drm/nouveau/include/nvif/mem.h | 18 ++ drivers/gpu/drm/nouveau/include/nvkm/core/client.h | 3 + drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 1 + drivers/gpu/drm/nouveau/nvif/Kbuild | 1 + drivers/gpu/drm/nouveau/nvif/mem.c | 88 ++++++++++ drivers/gpu/drm/nouveau/nvkm/core/client.c | 2 + drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/umem.c | 192 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/umem.h | 26 +++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ummu.c | 21 +++ 12 files changed, 363 insertions(+), 1 deletion(-) commit eea5cf0f0170fbc54fbb3c501b0ec7cce7f68369 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu: define user interfaces to mmu Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 5 + drivers/gpu/drm/nouveau/include/nvif/if0008.h | 42 ++++++ drivers/gpu/drm/nouveau/include/nvif/mmu.h | 56 ++++++++ drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 2 + drivers/gpu/drm/nouveau/nvif/Kbuild | 1 + drivers/gpu/drm/nouveau/nvif/mmu.c | 117 +++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/device/user.c | 5 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 4 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/g84.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk104.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk20a.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm200.c | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm20b.c | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp100.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv41.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv50.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 4 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ummu.c | 148 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ummu.h | 14 ++ 24 files changed, 413 insertions(+), 1 deletion(-) commit 68af607d269cd8ea74d789f256ab0a522e5dad4f Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/gf100-: type-based vram allocation and bar mapping Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 1 + drivers/gpu/drm/nouveau/include/nvif/if900b.h | 23 ++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk104.c | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk20a.c | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm200.c | 3 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm20b.c | 3 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp100.c | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b.c | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/mem.h | 5 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/memgf100.c | 94 ++++++++++++++++++++++ 12 files changed, 140 insertions(+) commit 0766116157bf10a0680f4dc7530717e3b4d1a31e Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/nv50,g84: type-based vram allocation and bar mapping Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 1 + drivers/gpu/drm/nouveau/include/nvif/if500b.h | 25 +++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/g84.c | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/mem.h | 5 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/memnv50.c | 88 +++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv50.c | 2 + 7 files changed, 124 insertions(+) commit 957e18a70da19373f966c20dcf3ae5e1d49f9ed0 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/nv04-nv4x: type-based vram allocation and bar mapping Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 1 + drivers/gpu/drm/nouveau/include/nvif/if000b.h | 11 ++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/mem.h | 5 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/memnv04.c | 69 +++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv41.c | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c | 2 + 8 files changed, 93 insertions(+) commit eaf1a69110f4497746d5b6e35929dbdc860040d2 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu: add base for type-based memory allocation Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 2 + drivers/gpu/drm/nouveau/include/nvif/if000a.h | 13 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/mem.c | 242 +++++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/mem.h | 8 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 8 + 6 files changed, 275 insertions(+) commit 51645eb71485dd3d72d9fe2acd0298057afdf437 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu: build up information on available memory types Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 20 ++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 120 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/g84.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk104.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk20a.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm200.c | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm20b.c | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp100.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 1 + 11 files changed, 151 insertions(+) commit 3a314f747ba5b4cca22a36603768c176d1761afd Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: remove explicit unmaps If the VMA is being deleted, we don't need to explicity unmap first anymore. The MMU code will automatically merge the operations into a single page tree walk. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_bo.c | 1 - drivers/gpu/drm/nouveau/nouveau_mem.c | 10 ++-------- drivers/gpu/drm/nouveau/nouveau_vmm.c | 4 +--- 3 files changed, 3 insertions(+), 12 deletions(-) commit 2cabefcbd097e27def6d29d52d5d2cf8797c11e4 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/gr/gf100-: replace hardcoded instance/vmm setup in grctx generation Could be useful for if/when a future GPU removes support for the GF100 PT layout. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 110 ++++++++++++---------- 1 file changed, 58 insertions(+), 52 deletions(-) commit 019e4d76c6e91b3eae1d8d88b8683a24c1ec26d3 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/gr/gf100-: use new interfaces for vmm operations Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 13 +++----- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf108.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk104.c | 6 ++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c | 9 ++---- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp100.c | 6 ++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp102.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 39 +++++++++++------------ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 7 ++-- 10 files changed, 39 insertions(+), 52 deletions(-) commit 01f349fcad68d80939db53d9110135e6341b786d Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/fifo/gf100-: use new interfaces for vmm operations Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/changf100.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/changk104.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 12 ++++++------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 12 ++++++------ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 16 ++++++---------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 16 ++++++---------- 8 files changed, 28 insertions(+), 36 deletions(-) commit 8c967c554818a0f98f8cad86cc561ab43bbbf1e7 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/secboot/gm200: use new interfaces for vmm operations Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 9202d732e6bc3b46566db3ed25f7a5a3eeaee3c1 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem/nv50-: use new interfaces for vmm operations Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 45 +++++++++++++--------- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 28 +++++++------- 2 files changed, 41 insertions(+), 32 deletions(-) commit 6f4dc18c166cd36d8e9dfd130874060065bedd1c Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/fb/ram: use new interfaces for vmm operations Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit f66c57d9229c313de3adf340c604b1c7a40e5306 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/fifo: initialise vmm with new interfaces Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 33 ++++++++++++---------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c | 6 +--- .../gpu/drm/nouveau/nvkm/engine/fifo/changf100.h | 2 -- .../gpu/drm/nouveau/nvkm/engine/fifo/changk104.h | 2 -- .../gpu/drm/nouveau/nvkm/engine/fifo/channv50.c | 8 +----- .../gpu/drm/nouveau/nvkm/engine/fifo/channv50.h | 1 - .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 13 ++------- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 13 ++------- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 8 +++--- 10 files changed, 31 insertions(+), 57 deletions(-) commit 85f7c3a03689d300acdbc82270246f83e2a5d472 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/secboot/gm200: initialise vmm with new interfaces Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 18 +++++++++--------- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm200.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) commit 7eac5f4eb06a661ddee9b2ebb75799bf0c7cbf65 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/bar/gf100: initialise vmm with new interfaces Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 30 +++++++++++-------------- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.h | 2 +- 2 files changed, 14 insertions(+), 18 deletions(-) commit fc584e1a4a579c3279ed563b890415c13b2f85ac Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/bar/nv50: initialise vmm with new interfaces Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 33 +++++++++++++------------- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.h | 4 ++-- 2 files changed, 19 insertions(+), 18 deletions(-) commit f9463a4bc8ea2df5ea25c4d6e0be72011e559b95 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu: implement new vmm frontend These are the new priviledged interfaces to the VMM backends, and expose some functionality that wasn't previously available. It's now possible to allocate a chunk of address-space (even all of it), without causing page tables to be allocated up-front, and then map into it at arbitrary locations. This is the basic primitive used to support features such as sparse mapping, or to allow userspace control over its own address-space, or HMM (where the GPU driver isn't in control of the address-space layout). Rather than being tied to a subtle combination of memory object and VMA properties, arguments that control map flags (ro, kind, etc) are passed explicitly at map time. The compatibility hacks to implement the old frontend on top of the new driver backends have been replaced with something similar to implement the old frontend's interfaces on top of the new frontend. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 4 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 48 +- drivers/gpu/drm/nouveau/nouveau_mem.h | 2 + .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 152 +--- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 787 ++++++++++++++++++++- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 17 +- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/priv.h | 1 + 8 files changed, 858 insertions(+), 154 deletions(-) commit 26880e76863ace2dd34c14fcadaedf97a2ace417 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu: remove support for old backends Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 1 - drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 3 - drivers/gpu/drm/nouveau/nouveau_mem.c | 30 --- drivers/gpu/drm/nouveau/nouveau_mem.h | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 288 +--------------------- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/g84.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk104.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk20a.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm200.c | 4 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm20b.c | 4 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv41.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv50.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 14 -- 16 files changed, 3 insertions(+), 358 deletions(-) commit f9400afb1e11c33830bd99a0c9fafe3f4d07a7cc Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/gp100,gp10b: implement new vmm backend Adds support for: - 64KiB/2MiB big page sizes (128KiB not supported by HW with new PT layout). - System-memory PTs. - LPTE "invalid" state. - (Tegra) Use of video memory aperture. - Sparse PDEs/PTEs. - Additional blocklinear kinds. - 49-bit address-space. GP100 supports an entirely new 5-level page table layout that provides an expanded 49-bit address-space. It also supports the layout present on previous generations, which we've been making do with until now. This commit implements support for the new layout, and enables it by default. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/ifc00d.h | 13 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c | 123 ---------- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp100.c | 3 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b. | 0 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b.c | 3 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 7 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c | 258 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp10b.c | 3 + 10 files changed, 281 insertions(+), 133 deletions(-) commit e12cf6ad43888c152c3b2edb59525587cd98a227 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/gm200,gm20b: implement new vmm backend Adds support for: - 64KiB big page size. - System-memory PTs. - LPTE "invalid" state. - (Tegra) Use of video memory aperture. - Sparse PDEs/PTEs. - Additional blocklinear kinds. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/ifb00d.h | 13 ++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm200.c | 54 ++++++++++++++++++---- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm20b.c | 12 +---- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgm200.c | 34 ++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgm20b.c | 6 +++ 6 files changed, 101 insertions(+), 20 deletions(-) commit b597764327e1af1b4948f6e7478acc5c7f1f6c49 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/gk104,gk20a: implement new vmm backend Adds support for: - 64KiB big page size. - System-memory PTs. - LPTE "invalid" state. - (Tegra) Use of video memory aperture. Adds support for marking LPTEs invalid, resulting in the corresponding SPTEs being ignored, which is supposed to speed up TLB invalidates. On The Tegra side, this will switch to using the video memory aperture for all mappings. The HW will still target non-coherent system memory, but this aperture needs to be selected in order to support compression. Tegra's instmem backend somewhat cheated to get this effect previously. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk104.c | 6 +----- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk20a.c | 6 +----- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 4 ++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgk104.c | 17 +++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgk20a.c | 18 ++++++++++++++++++ 5 files changed, 41 insertions(+), 10 deletions(-) commit b77791da0ee009dcb1813d8b00919962b6a5f851 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/gf100: implement new vmm backend Adds support for: - 64KiB big page size. - System-memory PTs. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/if900d.h | 13 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 15 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c | 12 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 12 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.c | 258 +++++++++++++++++++++ 6 files changed, 306 insertions(+), 5 deletions(-) commit fd542a3e525c9f7a7de186cb24208c035bcea2d1 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/nv50,g84: implement new vmm backend Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/if500d.h | 13 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 19 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/g84.c | 6 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv50.c | 213 +++------------- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 10 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmnv50.c | 293 +++++++++++++++++++++- 6 files changed, 360 insertions(+), 194 deletions(-) commit 6ce513529aa57a8c4f61e588142643a9252037ae Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/nv44: implement new vmm backend Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c | 144 +------------------ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmnv44.c | 165 ++++++++++++++++++++++ 2 files changed, 168 insertions(+), 141 deletions(-) commit 473f9aca6c1063bf77cd61c2683fc496850d63b3 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/nv41: implement new vmm backend Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv41.c | 69 ----------------------- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmnv41.c | 64 +++++++++++++++++++++ 2 files changed, 64 insertions(+), 69 deletions(-) commit dd12d158eb91442674111a423d88abee4180b5a9 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/nv04: implement new vmm backend Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/if000d.h | 4 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c | 57 ---------------------- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmnv04.c | 58 ++++++++++++++++++++++- 4 files changed, 62 insertions(+), 58 deletions(-) commit eb813999f20097d24310836dfa07a97e2eb0c936 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu: implement new vmm backend This is the common code to support a rework of the VMM backends. It adds support for more than 2 levels of page table nesting, which is required to be able to support GP100's MMU layout. Sparse mappings (that don't cause MMU faults when accessed) are now supported, where the backend provides it. Dual-PT handling had to become more sophisticated to support sparse, but this also allows us to support an optimisation the MMU provides on GK104 and newer. Certain operations can now be combined into a single page tree walk to avoid some overhead, but also enables optimsations like skipping PTE unmap writes when the PT will be destroyed anyway. The old backend has been hacked up to forward requests onto the new backend, if present, so that it's possible to bisect between issues in the backend changes vs the upcoming frontend changes. Until the new frontend has been merged, new backends will leak BAR2 page tables on module unload. This is expected, and it's not worth the effort of hacking around this as it doesn't effect runtime. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/Kconfig | 7 + drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 23 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 117 ++++- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 580 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 112 +++++ 5 files changed, 836 insertions(+), 3 deletions(-) commit bda9e379f61f937af7ee9b2a32d54bc50a94cd80 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/fb/gm200: enable NV_PFB_MMU_CTRL_USE_FULL_COMP_TAG_LINE where appropriate To avoid wasting compression tags when using 64KiB pages, we need to enable this so we can select between upper/lower comptagline in PTEs. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f8a1203920e7de49bd99bfed76a82f0c93de2020 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/ltc/gm200: limit NV_MMU_PTE_COMPTAGLINE bits to 16 where required If NV_PFB_MMU_CTRL_USE_FULL_COMP_TAG_LINE is TRUE, then the last bit of NV_MMU_PTE_COMPTAGLINE is re-purposed to select the upper/lower half of a compression tag when using 64KiB big pages. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ac47c15b76d0f2c42eedde7e993a0d3db92f215d Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/fifo/nv04-nv40: fix missing nvkm_kmap() calls around ramfc access Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c | 2 ++ 1 file changed, 2 insertions(+) commit d30af7ce2c96e57b503da1d70454818331f0a6d5 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu: handle instance block setup We previously required each VMM user to allocate their own page directory and fill in the instance block themselves. It makes more sense to handle this in a common location. Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/engine/falcon.h | 4 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 8 +-- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chang84.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/fifo/changf100.h | 1 - .../gpu/drm/nouveau/nvkm/engine/fifo/changk104.h | 1 - .../gpu/drm/nouveau/nvkm/engine/fifo/channv50.c | 5 +- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 19 +---- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 19 +---- drivers/gpu/drm/nouveau/nvkm/falcon/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/falcon/v1.c | 6 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 30 +++----- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.h | 3 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 20 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 81 +++++----------------- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c | 38 +++++----- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv50.c | 14 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 6 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 2 +- .../gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 21 ++---- .../gpu/drm/nouveau/nvkm/subdev/secboot/gm200.h | 3 +- 20 files changed, 93 insertions(+), 192 deletions(-) commit af3b8d53869c175fce424b6bfd1f49c1b53baef1 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu: remove old vm creation hooks Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 30 +------------------------ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/g84.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c | 8 ------- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk104.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk20a.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm200.c | 2 -- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm20b.c | 2 -- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv50.c | 11 --------- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 10 --------- 9 files changed, 1 insertion(+), 65 deletions(-) commit 8e39abff45888a54b3d9dc20434940dabeda077f Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/gp100,gp10b: implement vmm on top of new base Adds support for: - Selection of old/new-style page table layout (GP100MmuLayout=0/1). - System-memory PDs. New layout disabled by default for the moment, as we don't have a backend that can handle it yet. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 1 + drivers/gpu/drm/nouveau/include/nvif/ifc00d.h | 8 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp100.c | 23 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b.c | 23 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 11 +++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c | 89 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp10b.c | 46 +++++++++++ 8 files changed, 179 insertions(+), 24 deletions(-) commit 5f300fed645597689f1e6fed8800fc7e3d01e212 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/gm200,gm20b: implement vmm on top of new base Adds support for: - Per-VMM selection of big page size. - System-memory PDs. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 1 + drivers/gpu/drm/nouveau/include/nvif/ifb00d.h | 14 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm200.c | 25 +++- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm20b.c | 25 +++- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 23 ++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgm200.c | 151 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgm20b.c | 64 +++++++++ 8 files changed, 303 insertions(+), 2 deletions(-) commit 7de078aa7902fc515286735219173ad263a7610c Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/gk104,gk20a: implement vmm on top of new base Adds support for: - Selection of a 64KiB big page size (NvFbBigPage=16). - System-memory PDs. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk104.c | 5 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk20a.c | 5 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 9 +++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgk104.c | 85 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgk20a.c | 53 ++++++++++++++ 6 files changed, 157 insertions(+), 2 deletions(-) commit 540a1dde57bf4ce7acd2c5cc494bea03aa261484 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/gf100: implement vmm on top of new base Adds support for: - Selection of a 64KiB big page size (NvFbBigPage=16). - System-memory PDs. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 1 + drivers/gpu/drm/nouveau/include/nvif/if900d.h | 8 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c | 6 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 12 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.c | 145 +++++++++++++++++++++ 6 files changed, 171 insertions(+), 2 deletions(-) commit 9f6219fde7457df7a982174d496a012f4f42e776 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/nv50,g84: implement vmm on top of new base Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 1 + drivers/gpu/drm/nouveau/include/nvif/if500d.h | 8 ++ drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/g84.c | 5 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv50.c | 6 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 9 +++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmnv50.c | 94 +++++++++++++++++++++++ 10 files changed, 122 insertions(+), 5 deletions(-) commit 03b0ba7b545ba0c5b19fedb14a771a3517a1328e Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/nv44: implement vmm on top of new base Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 3 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 5 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c | 27 ---------- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.h | 17 ------ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c | 61 +++++++-------------- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 5 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmnv44.c | 65 +++++++++++++++++++++++ 10 files changed, 96 insertions(+), 91 deletions(-) commit 77783435c31182166c4679ad75358e1756d1e5da Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/nv41: implement vmm on top of new base Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv41.c | 44 ++++++++------------ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 3 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmnv41.c | 49 +++++++++++++++++++++++ 4 files changed, 69 insertions(+), 28 deletions(-) commit 5b17f3624efa5473e78ff9b09177e3db0806bb27 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/nv04: implement vmm on top of new base Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 3 +- drivers/gpu/drm/nouveau/include/nvif/if000d.h | 8 +++ drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c | 5 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c | 33 ++------- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 4 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 11 ++- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmnv04.c | 84 ++++++++++++++++++++++ 8 files changed, 113 insertions(+), 36 deletions(-) commit 806a7335653743a33f476a3705d55bada95b7dfe Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu: implement base for new vm management This is the first chunk of the new VMM code that provides the structures needed to describe a GPU virtual address-space layout, as well as common interfaces to handle VMM creation, and connecting instances to a VMM. The constructor now allocates the PD itself, rather than having the user handle that manually. This won't/can't be used until after all backends have been ported to these interfaces, so a little bit of memory will be wasted on Fermi and newer for a couple of commits in the series. Compatibility has been hacked into the old code to allow each GPU backend to be ported individually. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/class.h | 2 + drivers/gpu/drm/nouveau/include/nvif/if000c.h | 3 + drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 16 ++- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 76 +++++++++-- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c | 4 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 8 ++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 147 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 111 ++++++++++++++++ 9 files changed, 350 insertions(+), 19 deletions(-) commit f1280394109a3a3a7ef1c37950d4356b12e75cb9 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu: implement page table sub-allocation GP100 "big" (which is a funny name, when it supports "even bigger") page tables are small enough that we want to be able to suballocate them from a larger block of memory. This builds on the previous page table cache interfaces so that the VMM code doesn't need to know the difference. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 98 +++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 2 + 3 files changed, 101 insertions(+), 1 deletion(-) commit 9a45ddaaa674aa103cd74a0df9a3f9c2c8fb3124 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu: implement page table cache Builds up and maintains a small cache of each page table size in order to reduce the frequency of expensive allocations, particularly in the pathological case where an address range ping-pongs between allocated and free. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 5 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 132 +++++++++++++++++++++- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 15 +++ 3 files changed, 150 insertions(+), 2 deletions(-) commit 5e075fdeb166098a3dc493026534c7631e845782 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu: automatically handle "un-bootstrapping" of vmm Removes the need to expose internals outside of MMU, and GP100 is both different, and a lot harder to deal with. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 5 +---- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 5 +---- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 3 +++ 4 files changed, 7 insertions(+), 8 deletions(-) commit 6359c982243ee8e4da4ca93cf30ac746a925ea1b Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/gp10b: fork from gf100 Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b.c | 43 +++++++++++++++++++++++ 3 files changed, 45 insertions(+) commit b86a45877ead1d0235674cae58dac7d07f00fa88 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/gp100: fork from gf100 Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 12 +++---- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp100.c | 43 +++++++++++++++++++++++ 4 files changed, 51 insertions(+), 6 deletions(-) commit cedc4d57df26170a2f1536cec276c5cc809a2462 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/gm20b: fork from gf100 Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm20b.c | 43 +++++++++++++++++++++++ 4 files changed, 46 insertions(+), 1 deletion(-) commit e1e33c791a233cb4cc84175109e42bdd6467889c Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/gm200: fork from gf100 Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 6 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gm200.c | 43 +++++++++++++++++++++++ 4 files changed, 48 insertions(+), 3 deletions(-) commit d1f6c8d2e9df49eb7387b04b880d643348e97625 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/gk20a: fork from gf100 Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk20a.c | 43 +++++++++++++++++++++++ 4 files changed, 46 insertions(+), 1 deletion(-) commit db018585a51a08fd80ade568ada7b985abcbaf6e Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/gk104: fork from gf100 Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 18 +++++----- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c | 12 +++---- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gk104.c | 43 +++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 10 ++++++ 6 files changed, 70 insertions(+), 15 deletions(-) commit 0f43715fac003613a028d28a2c76fbab4c9f9177 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/g84: fork from nv50 Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 26 +++++++------- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mmu/g84.c | 43 +++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv50.c | 12 +++---- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/priv.h | 10 ++++++ 6 files changed, 74 insertions(+), 19 deletions(-) commit b4e114f1aa6ac1fd7c12223e032ec429be7d8152 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/fb/ram: remove old allocators Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 4 -- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h | 5 -- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 67 -------------------- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf108.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm107.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm200.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/rammcp77.c | 2 - drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c | 77 ----------------------- 11 files changed, 167 deletions(-) commit 1de3377555f14495c49c935810c220f014dbef71 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: allocate vram with nvkm_ram_get() This will cause a subtle behaviour change on GPUs that are in mixed-memory configurations in that VRAM in the degraded section of VRAM will no longer be used for TTM buffer objects. That section of VRAM is not meant to be used for displayable/compressed surfaces, and we have no reliable way with the current interfaces to be able to make that decision properly. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_mem.c | 39 +++++++++++++++++++++++++++-------- drivers/gpu/drm/nouveau/nouveau_ttm.c | 6 ++---- 2 files changed, 32 insertions(+), 13 deletions(-) commit 7b8656636add64ea5c184a5de4a326d33a1d021e Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: directly handle comptag allocation Another transition step to allow finer-grained patches transitioning to new MMU backends. Old backends will continue operate as before (accessing nvkm_mem::tag), and new backends will get a reference to the tags allocated here. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h | 2 -- drivers/gpu/drm/nouveau/nouveau_mem.c | 38 +++++++++++++++++++++-- drivers/gpu/drm/nouveau/nouveau_mem.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 20 ------------ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c | 15 --------- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c | 18 ----------- 6 files changed, 37 insertions(+), 57 deletions(-) commit bd275f1d1a982db62edcd22f3aebf6253583ea37 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: wrap nvkm_mem objects in nvkm_memory interfaces This is a transition step, to enable finer-grained commits while transitioning to new MMU interfaces. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 3 ++ drivers/gpu/drm/nouveau/nouveau_mem.c | 33 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nouveau_mem.h | 7 +++++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c | 1 + .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 9 ++++++ 5 files changed, 53 insertions(+) commit bd447053b33d9c2a173e1d3953c95a7cd5182656 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/ltc/gf100-: allocate tagram with nvkm_ram_get() Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c | 5 ++--- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c | 11 ++++++----- 3 files changed, 9 insertions(+), 9 deletions(-) commit 7f4f82af6e48c22b3fa5e41aab4dc0fdf0a7717e Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem/nv50: allocate memory with nvkm_ram_get() Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 37 ++++++++-------------- 1 file changed, 14 insertions(+), 23 deletions(-) commit 2bfa0b01146586e5098327462a1de090e09b541d Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/fb/ram/gt215: allocate training buffer with nvkm_ram_get() Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit e9a8b218044c693a12a852c558f745267a6b6eb8 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/fb/ram: add interface to allocate vram as an nvkm_memory object Upcoming MMU changes use nvkm_memory as its basic representation of memory, so we need to be able to allocate VRAM like this. The code is basically identical to the current chipset-specific allocators, minus support for compression tags (which will be handled elsewhere anyway). Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 4 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c | 122 +++++++++++++++++++++++ 2 files changed, 126 insertions(+) commit c09597f083960cea492e1d658b9039b06d8a6839 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/core/memory: add some useful accessor macros Adds support for 64-bit writes, and optimised filling of buffers with fixed 32/64-bit values. These will all be used by the upcoming MMU changes. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvif/os.h | 14 ----------- drivers/gpu/drm/nouveau/include/nvkm/core/memory.h | 28 +++++++++++++++++++++- drivers/gpu/drm/nouveau/include/nvkm/core/os.h | 20 ++++++++++++++++ 3 files changed, 47 insertions(+), 15 deletions(-) commit 997a89003c2d950466bc289147ffb823c0c51fb0 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/core/memory: add reference counting We need to be able to prevent memory from being freed while it's still mapped in a GPU's address-space. Will be used by upcoming MMU changes. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/memory.h | 4 +++- drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c | 2 +- drivers/gpu/drm/nouveau/nvkm/core/memory.c | 28 ++++++++++++++++++---- drivers/gpu/drm/nouveau/nvkm/engine/falcon.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 6 ++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 6 ++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv50.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 6 ++--- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c | 6 ++--- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c | 6 ++--- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c | 2 +- 19 files changed, 57 insertions(+), 37 deletions(-) commit 2c9c4910f8b126d18fa2a08087f3ae1553e706bc Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/core/memory: add mechanism to retrieve allocation granularity Needed by VMM code to determine whether an allocation is compatible with a given page size (ie. you can't map 4KiB system memory pages into 64KiB GPU pages). Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/memory.h | 2 ++ 1 file changed, 2 insertions(+) commit 19a82e492c3d71efe8763d50496a1701dfcf3f15 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/core/memory: change map interface to support upcoming mmu changes Map flags (access, kind, etc) are currently defined in either the VMA, or the memory object, which turns out to not be ideal for things like suballocated buffers, etc. These will become per-map flags instead, so we need to support passing these arguments in nvkm_memory_map(). Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/gpuobj.h | 7 +--- drivers/gpu/drm/nouveau/include/nvkm/core/memory.h | 10 +++-- drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c | 43 ++++++++++++---------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 3 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 3 +- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogf100.c | 15 ++++++-- .../gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c | 15 ++++++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 11 +++++- .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 9 +++-- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 8 ++-- .../gpu/drm/nouveau/nvkm/subdev/secboot/gm200.c | 9 ++++- 11 files changed, 83 insertions(+), 50 deletions(-) commit 7f53d6dc9a728d54cc4e1d70259376e09675f924 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/core/memory: comptag allocation nvkm_memory is going to be used by the upcoming mmu rework for the basic representation of a memory allocation, as such, this commit adds support for comptag allocation to nvkm_memory. This is very simple for now, in that it requires comptags for the entire memory allocation even if only certain ranges are compressed. Support for tracking ranges will be added at a later date. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/memory.h | 12 ++++ drivers/gpu/drm/nouveau/nvkm/core/memory.c | 71 ++++++++++++++++++++++ 2 files changed, 83 insertions(+) commit 6cd7670c1e2a4a70a3d421521aea548e68992621 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/ltc: init comptag mm in fb subdev A single location for the MM allows us to share allocation logic. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c | 7 ++++--- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c | 6 ++++-- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp100.c | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) commit b1e839f3b3d82a0774c296f9950214057b045b72 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/fb/gf100: clear comptags at allocation time rather than mmu map We probably don't want to destroy compression data when doing multiple mappings of a memory object. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 6 +++++- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gf100.c | 3 --- 4 files changed, 8 insertions(+), 6 deletions(-) commit af793b8cd9f62880852379897519bbe69fb59c05 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/fb: move comptag init out of ram submodule Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c | 12 +++++++++++- drivers/gpu/drm/nouveau/nvkm/subdev/fb/g84.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/gt215.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv20.c | 8 ++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv25.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv30.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv35.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv36.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv40.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv41.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv47.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv49.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.c | 11 +++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c | 16 +++------------- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h | 6 ++---- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/rammcp77.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv04.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv10.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv20.c | 3 +-- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c | 7 +++---- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv41.c | 3 +-- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv44.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv49.c | 3 +-- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv4e.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c | 3 +-- 30 files changed, 63 insertions(+), 38 deletions(-) commit 7ef44bee64c68db7b7bc0cb341eec41891c6d0a5 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/fb: move comptags mm into nvkm_fb We're moving towards having a central place to handle comptag allocation, and as some GPUs don't have a ram submodule (ie. Tegra), we need to move the mm somewhere else. It probably never belonged in ram anyways. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv20.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv25.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv30.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv35.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv36.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/nv40.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c | 5 ++--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c | 4 ++-- 10 files changed, 13 insertions(+), 13 deletions(-) commit b7e1f3f1ba0de8585ddb5a921714b06fcb92f16e Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/core/mm: introduce functions to access info about a given allocation These will be used in upcoming patches. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/mm.h | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 4d058fab63f79e5cf13d21edd9db1a63748da0a1 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/core/mm: have users explicitly define heap identifiers Different sections of VRAM may have different properties (ie. can't be used for compression/display, can't be mapped, etc). We currently already support this, but it's a bit magic. This change makes it more obvious where we're allocating from. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/mm.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 4 ++++ drivers/gpu/drm/nouveau/nouveau_abi16.c | 2 +- drivers/gpu/drm/nouveau/nvkm/core/gpuobj.c | 2 +- drivers/gpu/drm/nouveau/nvkm/core/mm.c | 5 +++-- drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c | 5 +++-- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c | 9 ++++++--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/rammcp77.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 2 +- 15 files changed, 31 insertions(+), 20 deletions(-) commit 24e8375b1bfdf7f6014b9e3d7903d6a8f81aa249 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: separate constant-va tracking from nvkm vma structure Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/Kbuild | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 2 - drivers/gpu/drm/nouveau/nouveau_abi16.c | 10 +- drivers/gpu/drm/nouveau/nouveau_abi16.h | 2 +- drivers/gpu/drm/nouveau/nouveau_bo.c | 51 +-------- drivers/gpu/drm/nouveau/nouveau_bo.h | 7 -- drivers/gpu/drm/nouveau/nouveau_chan.c | 19 ++-- drivers/gpu/drm/nouveau/nouveau_chan.h | 3 +- drivers/gpu/drm/nouveau/nouveau_display.h | 5 +- drivers/gpu/drm/nouveau/nouveau_dma.c | 15 +-- drivers/gpu/drm/nouveau/nouveau_dma.h | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 11 +- drivers/gpu/drm/nouveau/nouveau_drv.h | 4 +- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 7 +- drivers/gpu/drm/nouveau/nouveau_fence.h | 2 +- drivers/gpu/drm/nouveau/nouveau_gem.c | 68 ++++-------- drivers/gpu/drm/nouveau/nouveau_vmm.c | 128 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nouveau_vmm.h | 32 ++++++ drivers/gpu/drm/nouveau/nv50_fbcon.c | 9 +- drivers/gpu/drm/nouveau/nv84_fence.c | 9 +- drivers/gpu/drm/nouveau/nvc0_fbcon.c | 9 +- 21 files changed, 245 insertions(+), 151 deletions(-) commit 9ce523cc3bf2ac19922e0a5d4b491221da01d1bc Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: separate buffer object backing memory from nvkm structures Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/Kbuild | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 6 - drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 5 +- drivers/gpu/drm/nouveau/nouveau_bo.c | 111 +++++++++------- drivers/gpu/drm/nouveau/nouveau_mem.c | 114 ++++++++++++++++ drivers/gpu/drm/nouveau/nouveau_mem.h | 35 +++++ drivers/gpu/drm/nouveau/nouveau_sgdma.c | 54 ++++---- drivers/gpu/drm/nouveau/nouveau_ttm.c | 143 +++++++-------------- .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 1 - 10 files changed, 285 insertions(+), 186 deletions(-) commit cb7e88e70f52878f4be0fbcc04350cff72f67278 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: hang drm client of a master TTM memory allocations will be hanging off the DRM's client, but the locking needed to do so gets really tricky with all the other use of the DRM's object tree. To solve this, we make the normal DRM client a child of a new master, where the memory allocations will be done from instead. This also solves a potential race with client creation. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_drm.c | 20 ++++++++++++++++---- drivers/gpu/drm/nouveau/nouveau_drv.h | 3 +++ 2 files changed, 19 insertions(+), 4 deletions(-) commit 6be4421a9f5f6d1e980a88e189453cb766744cac Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: consolidate identical functions in nouveau_ttm.c Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_ttm.c | 63 ++++++++++------------------------- 1 file changed, 17 insertions(+), 46 deletions(-) commit 792067e00b4e1db30b6d27749a6b902d92564c1f Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: remove unnecessary use of ttm_mem_type_manager::priv Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_ttm.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit a48296ab9dbe8b384ba58db5e8553ba35b774bb2 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: swap loop order in move_notify() hook The conditional is the same for every mapping. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_bo.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 425b34f7df63a2eacf24b721a6f450126e691b6a Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: simplify const-va map condition We don't really care about where the memory is, just that it's compatible with a VMA allocated for a given page size. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_bo.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 7760a2e38a8324688e83b91f91ff7be710e70db1 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: split various bo flags out into their own members It's far more convenient to deal with like this. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_bo.c | 71 +++++++++++++++++++--------------- drivers/gpu/drm/nouveau/nouveau_bo.h | 10 +++-- drivers/gpu/drm/nouveau/nouveau_gem.c | 11 +++++- drivers/gpu/drm/nouveau/nouveau_gem.h | 3 -- drivers/gpu/drm/nouveau/nouveau_ttm.c | 14 +++---- drivers/gpu/drm/nouveau/nv50_display.c | 8 ++-- 6 files changed, 66 insertions(+), 51 deletions(-) commit bc3b0c7aff4d91605d966c01571f579827449d38 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: remove unused sysmem fence code Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_fence.c | 2 -- drivers/gpu/drm/nouveau/nouveau_fence.h | 4 ---- drivers/gpu/drm/nouveau/nv84_fence.c | 38 ++------------------------------- 3 files changed, 2 insertions(+), 42 deletions(-) commit e75c091baf99dd739f6c3c1135fd667af174bd45 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: store nouveau_drm in nouveau_cli, as opposed to drm_device Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drv.h | 4 ++-- drivers/gpu/drm/nouveau/nouveau_gem.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit b6838c14a28c06ea51a60a829ec290e6aec9d128 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/gr/gf100-gk208: copy big page size setting from fb Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 223eaf4bf8a8c9668b82cb4a1c3a4acb60d33aba Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/gr/gf100-gk208: make use of init_gpc_mmu() hook to share setup Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 27 ++++++++++++++++--------- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf108.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf110.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf119.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk104.c | 13 ++---------- drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110b.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk208.c | 1 + 11 files changed, 29 insertions(+), 20 deletions(-) commit 2854ab8dd81b73ffd867399fd506f44f6f624bca Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/fb: finalise big page size selection in constructor MMU will need to know this during its constructor, so we can't delay deciding this until init-time. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c | 12 +++++++++--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.c | 14 ++++++-------- drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.h | 2 -- drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf108.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk104.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk20a.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm107.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c | 17 +++++++---------- drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm20b.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h | 8 +++++--- 10 files changed, 32 insertions(+), 26 deletions(-) commit 0b11b30de9d2960d87373e50223800c8f9f6a89f Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/mmu/nv04-nv4x: move global vmm to nvkm_mmu In a future commit, this will be constructed by common code. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 2 ++ drivers/gpu/drm/nouveau/nouveau_ttm.c | 5 +---- drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c | 3 +-- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.c | 12 ++++++------ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv04.h | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv41.c | 8 ++++---- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c | 8 ++++---- 7 files changed, 18 insertions(+), 21 deletions(-) commit ffd937bbd219331e4b67344c104dea09b9ed4a6a Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem: use fast-path for resume restore Before: "imem: init completed in 299277us" After: "imem: init completed in 11574us" Suspend from Fedora 26 gnome desktop on GP102. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c | 13 +++++++++++-- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 3 +-- 3 files changed, 12 insertions(+), 5 deletions(-) commit e9be3c7d7ae0aa6e273ac5cf66dfd2d53479bdbf Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem: use fast-path for suspend backup Before: "imem: suspend completed in 5540487us" After: "imem: suspend completed in 1871526us" Suspend from Fedora 26 gnome desktop on GP102. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) commit b00b8430468d2922c5ea9a0557c7a36136df98c2 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem: separate pre-BAR2-bootstrap objects from the rest These will require slow-path access during suspend/resume. Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/subdev/instmem.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c | 27 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/instmem/priv.h | 1 + 4 files changed, 30 insertions(+) commit 54c70e3ac6d5634982edd586418710eb7fbb7c76 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem: switch to kvmalloc/kvfree for suspend/resume backup Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d52ddc953e7f74a8271c88fc0aa3bd0d436b04f0 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem: separate suspend/resume backup handling into their own functions Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c | 76 +++++++++++++--------- 1 file changed, 46 insertions(+), 30 deletions(-) commit 71370e620a97fe98daebea86c6ae3775cf0f4fc8 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem: remove now-unused wrapper for backend objects Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c | 164 +-------------------- .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/instmem/priv.h | 4 - 6 files changed, 2 insertions(+), 170 deletions(-) commit 03edf1b31a091254e95793a688abf02b96cfdd85 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem/nv50: support eviction of BAR2 mappings A good deal of the structures we map into here aren't accessed very often at all, and Fedora 26 has exposed an issue where after creating a heap of channels, BAR2 space would run out, and we'd need to make use of the slow path while accessing important structures like page tables. This implements an LRU on BAR2 space, which allows eviction of mappings that aren't currently needed, to make space for other objects. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 72 ++++++++++++++++++++-- 1 file changed, 67 insertions(+), 5 deletions(-) commit 69b136f200006ee37b039195eaeb08942c419ecc Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem/nv50: prevent fast-path for mapped objects when BAR isn't ready Another piece of solving the "GP100 BAR2 VMM bootstrap" puzzle. Without doing this, we'd attempt to write PDEs for the lower page table levels through BAR2 before BAR2 access has been fully initialised. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit dfcbd5506817c7bfba67c7c2232610f7693b1938 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem/nv50: map bar2 write-combined Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit be55287aa5ba6895e9d4d3ed2f08a1be7a065957 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem/nv50: embed nvkm_instobj directly into nv04_instobj This is not as simple as it was for earlier GPUs, due to the need to swap accessor functions depending on whether BAR2 is usable or not. We were previously protected by nvkm_instobj's accessor functions keeping an object mapped permanently, with some unclear magic that managed to hit the slow-path where needed even if an object was marked as mapped. That's been replaced here by reference counting maps (some objects, like page tables can be accessed concurrently), and swapping the functions as necessary. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 134 ++++++++++++++++----- 1 file changed, 102 insertions(+), 32 deletions(-) commit af515ec8d3fbd8376513eee9648a52d5ab92bbac Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem/nv50: move slow-path locking into rd/wr functions This is to simplify upcoming changes. The slow-path is something that currently occurs during bootstrap of the BAR2 VMM, while backing up an object during suspend/resume, or when BAR2 address space runs out. The latter is a real problem that can happen at runtime, and occurs in Fedora 26 already (due to some change that causes a lot of channels to be created at login), so ideally we'd prefer not to make it any slower. We'd also like suspend/resume speed to not suffer. Upcoming commits will solve those problems in a better way, making the extra overhead of moving the locking here a non-issue. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit f584bde6095af4d91e917be54c487258856ace89 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem/nv50: split object map out from api functions acquire()/boot() will need different logic in addition to performing the actual mapping. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 57 ++++++++++++---------- 1 file changed, 32 insertions(+), 25 deletions(-) commit b807270cbd87bfd2ab72904f6d9d92c17ccfeaab Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem/nv40: map bar2 write-combined Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 62465ac51883ef19af83c575d5fee5526732ffcb Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem/nv40: embed nvkm_instobj directly into nv04_instobj Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 87717e7f28c9536a71738e54338aafffd9d5a724 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem/nv04: directly embed nvkm_instobj into nv04_instobj Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 49814f62a26bd5b8f2ad5a16ccb1340ede30ee1a Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem: allow nvkm_instobj to be directly embedded in backend object This will eliminate a step through the call chain, and give backends more flexibility. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c | 36 ++++++++++++++-------- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/priv.h | 15 +++++++++ 2 files changed, 38 insertions(+), 13 deletions(-) commit 07bbc1c5f49b64323d9e5c1e0d5d7d201e1f2627 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/core/memory: split info pointers from accessor pointers The accessor functions can change as a result of acquire()/release() calls, and are protected by any refcounting done there. Other functions must remain constant, as they can be called any time. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/gpuobj.h | 5 +- drivers/gpu/drm/nouveau/include/nvkm/core/memory.h | 10 +- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c | 17 ++- .../gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 10 +- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv04.c | 51 ++++---- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c | 47 ++++---- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 133 +++++++++++---------- 7 files changed, 155 insertions(+), 118 deletions(-) commit dde59b9c341a1b5ce2229f7d4a57f19435da82d7 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/imem: add some useful debug output Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 70433b904a8b6865558ae33cadd8bb85c0d98e12 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/bar/gm107-: wait for instance block binding to complete Discovered by accident while working to use BAR2 access to instmem objects on more paths. We've apparently been relying on luck up until now! Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/bar.h | 2 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 26 ++++----- drivers/gpu/drm/nouveau/nvkm/subdev/bar/Kbuild | 2 + drivers/gpu/drm/nouveau/nvkm/subdev/bar/gm107.c | 65 +++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/bar/gm20b.c | 42 +++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/bar/priv.h | 2 + 6 files changed, 126 insertions(+), 13 deletions(-) commit 8e644cb29c33dcd2fb718d78d8c33d4eb88cf6f7 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/bar: initialise bar2 during oneinit If we initialise BAR2 earlier, we're able to complete BAR1 setup using the instmem fast-path. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 3 +++ drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 3 +++ 2 files changed, 6 insertions(+) commit bb7e501a661f820788279063fd9e225bbe9c38e9 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/bar: prevent BAR2 mapping of objects during destructor GP100's page table nests a lot more deeply than the GF100-compatible layout we're currently using, which means our hackish-but-simple way of dealing with BAR2 VMM teardown won't work anymore. In order to sanely handle the chicken-and-egg (BAR2's PTs get mapped into themselves) problem, we need prevent page tables getting mapped back into BAR2 during the destruction of its VMM. To do this, we simply key off the state that's now maintained by the BAR2 init/fini functions. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a78dbce9a161a3a985b837bd07afd8651d42cabd Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/bar: modify interface to bar2 vmm mapping Match API with the BAR1 version. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/bar.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c | 19 +++++++++++-------- drivers/gpu/drm/nouveau/nvkm/subdev/bar/g84.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 16 ++++++++-------- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 14 +++++++------- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.h | 3 +-- drivers/gpu/drm/nouveau/nvkm/subdev/bar/priv.h | 1 - drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 3 +-- 9 files changed, 31 insertions(+), 30 deletions(-) commit 570889dc5070e1f98b5898dce426f970c9b9329b Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/bar: modify interface to bar1 vmm mapping Upcoming changes will remove the nvkm_vmm pointer from nvkm_vma, instead requiring it to be explicitly specified on each operation. It's not currently possible to get this information for BAR1 mappings, so let's fix that ahead of time. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/os.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/bar.h | 2 +- drivers/gpu/drm/nouveau/nouveau_bo.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 5 ++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 6 ++++-- drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/bar/g84.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 9 ++++----- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gk20a.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 15 +++++++-------- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/priv.h | 2 +- 13 files changed, 32 insertions(+), 28 deletions(-) commit e988952eefd923a40cea1077bcb939025dafb0f1 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/bar: expose interface to bar2 teardown Will prevent spurious MMU fault interrupts if something decides to touch BAR1 after we've unloaded the driver. Exposed external to BAR so that INSTMEM can use it to better control the suspend/resume fast-path access. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/bar.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c | 12 +++++++++++- drivers/gpu/drm/nouveau/nvkm/subdev/bar/g84.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 7 +++++++ drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 7 +++++++ drivers/gpu/drm/nouveau/nvkm/subdev/bar/priv.h | 2 ++ 6 files changed, 29 insertions(+), 1 deletion(-) commit 48fe02478a0ddb89930f3595f8217fa2dfd98796 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/bar: expose interface to bar2 initialisation If we want to be able to hit the instmem fast-path in a few trickier cases, we need to be more flexible with when we can initialise BAR2 access. There's probably a decent case to be made for merging BAR/INSTMEM into BUS, but that's something to ponder another day. Flushes have been added after the write to bind the instance block, as later commits will reveal the need for them. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/subdev/bar.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c | 16 +++++++++++++++- drivers/gpu/drm/nouveau/nvkm/subdev/bar/g84.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 19 ++++++++----------- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 15 ++++++++++++--- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/bar/priv.h | 2 +- 8 files changed, 42 insertions(+), 17 deletions(-) commit bbb163e18960a90b0c5974fe448ad78a5df8e5d7 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/bar: implement bar1 teardown Will prevent spurious MMU fault interrupts if something decides to touch BAR1 after we've unloaded the driver. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c | 9 +++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/bar/g84.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 7 +++++++ drivers/gpu/drm/nouveau/nvkm/subdev/bar/gk20a.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 7 +++++++ drivers/gpu/drm/nouveau/nvkm/subdev/bar/priv.h | 5 +++++ 6 files changed, 30 insertions(+) commit 7313cfa4f6e30384fa04083698d1e865cf812a6a Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/bar: move bar1 initialisation into its own function BAR2 being done for practical reasons, this is just for consistency. Flushes have been added after the write to bind the instance block, as later commits will reveal the need for them. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/bar/g84.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 22 +++++++++++++++++++--- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/bar/gk20a.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 17 ++++++++++++++++- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/bar/priv.h | 6 ++++++ 8 files changed, 51 insertions(+), 5 deletions(-) commit 269fe32d3343b7b9e48ba533887f58eb877581c8 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/bar: swap oneinit/init ordering, and rename bar3 to bar2 NVIDIA call it BAR2, Linux APIs treat it as BAR3 due to BAR1 being a 64-bit BAR, which I presume take two slots or something. No actual code changes here, just to make future commits less messy. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c | 10 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 48 +++++++++--------- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.h | 4 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 66 ++++++++++++------------- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.h | 4 +- 5 files changed, 66 insertions(+), 66 deletions(-) commit c9e70592963d1588da4a300209cd4913d12ae689 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/bar: remove NV_PMC_ENABLE_PFIFO twiddling It's handled by FIFO preinit() now. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 3 --- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 3 --- 2 files changed, 6 deletions(-) commit e69dae85c90b3e07ed5538a8ad8a7ee807fbbf64 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/bar/nv50,g84: drop mmu invalidate Will already be done by MMU as a result of the PT writes that occur during BAR2 bootstrapping. This is likely just a left-over from the days when it was hardcoded. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c | 3 ++- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 4 +--- drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 9 +-------- drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.h | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/priv.h | 2 +- 6 files changed, 7 insertions(+), 15 deletions(-) commit 5e721ad198a0518a6059003b1651fdb183e32dd5 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/fifo: perform reset from preinit RM appears to do this really early in its initialisation, before DEVINIT. We currently do this before BAR2 initialisation for some reason. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/engine.h | 1 + drivers/gpu/drm/nouveau/nvkm/core/engine.c | 10 ++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 8 ++++++++ 3 files changed, 19 insertions(+) commit b5078d731fad979e7426e1ef55c44ea469a71191 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/disp: add missing newline in ior debug messages Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12973a37c47a33c275017c92327340ab61558d83 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/secboot: add missing newline in debug message Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/secboot/ls_ucode_msgqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4246b92cf9fb32da8d8b060c92d8302797c6fbea Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/core/device: remove object include to prevent unnecessary rebuilds nvkm_device hasn't subclassed nvkm_object in a long time. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 2 +- drivers/gpu/drm/nouveau/include/nvkm/engine/dma.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 1 + drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 2 +- drivers/gpu/drm/nouveau/nvkm/core/ramht.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv50.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/pm/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.h | 4 +++- drivers/gpu/drm/nouveau/nvkm/engine/sw/nvsw.h | 2 +- 17 files changed, 19 insertions(+), 5 deletions(-) commit 82be74ee3baafff58d6b1f40ac7687c32a74d93a Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/core/subdev: compile out messages for unwanted debug levels Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 153b642fcb8ce912575e594f9af079d17757a6bd Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/core/gpuobj: remove embedded struct nvkm_object nvkm_gpuobj hasn't subclassed nvkm_object in a long time. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/gpuobj.h | 2 -- drivers/gpu/drm/nouveau/include/nvkm/core/ramht.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) commit 8e0042d505e86299544cf000e26408bdd252e36b Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/core/object: plumb the unmap ioctl through MMU will be using this for BAR mappings. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/object.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 1 + drivers/gpu/drm/nouveau/nvkm/core/object.c | 9 +++++++++ drivers/gpu/drm/nouveau/nvkm/core/oproxy.c | 7 +++++++ 4 files changed, 19 insertions(+) commit 01326050391ceee2cf1b6c91c108414a35f40861 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/core/object: allow arguments to be passed to map function MMU will be needing this to specify kind info on BAR mappings. We have no userspace currently using these interfaces, so break the ABI instead of supporting both. NVIF version bump so any future use can be guarded. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/dispnv04/disp.c | 2 +- drivers/gpu/drm/nouveau/include/nvif/ioctl.h | 10 ++- drivers/gpu/drm/nouveau/include/nvif/object.h | 7 +- drivers/gpu/drm/nouveau/include/nvkm/core/object.h | 11 ++- drivers/gpu/drm/nouveau/nouveau_chan.c | 2 +- drivers/gpu/drm/nouveau/nv50_display.c | 2 +- drivers/gpu/drm/nouveau/nvif/object.c | 87 +++++++++++++++------- drivers/gpu/drm/nouveau/nvkm/core/ioctl.c | 12 ++- drivers/gpu/drm/nouveau/nvkm/core/object.c | 5 +- drivers/gpu/drm/nouveau/nvkm/core/oproxy.c | 6 +- drivers/gpu/drm/nouveau/nvkm/engine/device/user.c | 4 +- .../gpu/drm/nouveau/nvkm/engine/disp/channv50.c | 4 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 4 +- 13 files changed, 108 insertions(+), 48 deletions(-) commit 1f474be9a89e7848649034c8854c55996bb29459 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/core/object: separate oclass data out into its own header Want to be able to include this from core/device.h without pulling in core/object.h. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/include/nvkm/core/object.h | 28 +------------------ drivers/gpu/drm/nouveau/include/nvkm/core/oclass.h | 31 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 27 deletions(-) commit bbb10e639819e6a14e487ce14b3d8575767573b8 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: fix handling of GART OOM on pre-NV50 chipsets The correct thing to do on OOM is to return 0 and set mm_node to NULL, otherwise TTM will assume some other kind of error, and not attempt to evict other buffers to make space. Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_ttm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9551efcf7664b73d881de7eb88e4626c9561b624 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/kms/nv50: prevent oops in failure paths Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nv50_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a0bc8cb9b102229ad26ae3788cef8c6c5273be1 Author: Ilia Mirkin Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/kms: add 8.1Gbps DP link rate This was already done in dcb.c inside nvkm, but the other parser did not get the update. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_bios.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 73cef6cee71b7a1029e4951a97095c2e4fee4be7 Author: Jérémy Lefaure Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/bios/init: use ARRAY_SIZE Using the ARRAY_SIZE macro improves the readability of the code. Also, it is useless to re-invent it. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Reviewed-by: Thierry Reding Signed-off-by: Jérémy Lefaure Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f5a5b5232b899c06626960b601d1943cc2fb21d9 Author: Ben Skeggs Date: Wed Nov 1 03:56:19 2017 +1000 remove some useless semicolons Reported-by: Dave Airlie Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bios/iccsense.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pci/base.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 451b58d2d03d2033f00d346fb0b0335e536ae5ae Author: Rhys Kidd Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau: Document nouveau support for Tegra in DRIVER_DESC nouveau supports the Tegra K1 and higher after the SoC-based GPUs converged with the main GeForce GPU families. v2: - Qualify that support is Tegra K1+ (Martin Peres) Signed-off-by: Rhys Kidd Reviewed-by: Martin Peres Acked-by: Pierre Moreau Acked-by: Thierry Reding Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nouveau_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d32656373857839c82e3941a9e26cf228ca319b3 Author: Rhys Kidd Date: Wed Nov 1 03:56:19 2017 +1000 drm/nouveau/therm/gp100: initial implementation of new gp1xx temperature sensor v2: - add nv138 and drop nv13b chipsets (Ilia Mirkin) - refactor out status variable and instead mask tsensor (Ilia Mirkin) - switch SHADOWed state message away from nvkm_error() (Ilia Mirkin) - rename internal temperature variable (Karol Herbst) v3: - use nvkm_trace() for SHADOWed state message (Ben Skeggs) Signed-off-by: Rhys Kidd Signed-off-by: Ben Skeggs .../gpu/drm/nouveau/include/nvkm/subdev/therm.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 6 +++ drivers/gpu/drm/nouveau/nvkm/subdev/therm/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c | 3 +- drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c | 56 ++++++++++++++++++++++ 5 files changed, 66 insertions(+), 1 deletion(-) commit 710931c2be5a784c0651111f54bd083e3681c309 Author: Evan Quan Date: Wed Nov 1 16:52:08 2017 +0800 drm/amd/powerplay: wrong control mode cause the fan spins faster unnecessarily The fan control mode can either be FDO_PWM_MODE_STATIC or FDO_PWM_MODE_STATIC_RPM. Setting it as AMD_FAN_CTRL_AUTO will cause the fan spin faster wrongly. This can be reproduced by: '# cat /sys/class/hwmon/hwmon0/pwm1 38 '# cat /sys/class/hwmon/hwmon0/pwm1_enable 2 '# echo "2" > /sys/class/hwmon/hwmon0/pwm1_enable '# cat /sys/class/hwmon/hwmon0/pwm1 122 The fan speed get faster wrongly even with its original mode echo back. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b38a49d75fb5e90512e63038449222c2ef651ef Author: Eric Huang Date: Tue Oct 31 17:35:28 2017 -0400 drm/amd/powerplay: fix memory leak of hardcoded pptable Signed-off-by: Eric Huang Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 3 +++ 1 file changed, 3 insertions(+) commit 24738d7c8750784e5660bd200f0cc2643499417a Author: Monk Liu Date: Tue Oct 31 19:45:11 2017 +0800 drm/amdgpu:add fw-vram-usage for atomfirmware otherwise PF & VF exchange is broken Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 7a88cbd8d65d622c00bd76ba4ae1d893b292c91c Merge: 0a4334c 0b07194 Author: Dave Airlie Date: Thu Nov 2 12:40:41 2017 +1000 Backmerge tag 'v4.14-rc7' into drm-next Linux 4.14-rc7 Requested by Ben Skeggs for nouveau to avoid major conflicts, and things were getting a bit conflicty already, esp around amdgpu reverts. commit 0a4334c9e5405f836c46375c6e279cfdda7da6b5 Merge: 87331c8 a2f0424 Author: Dave Airlie Date: Thu Nov 2 11:36:55 2017 +1000 Merge tag 'drm-hisilicon-next-2017-11-01' of github.com:xin3liang/linux into drm-next For 4.15 * tag 'drm-hisilicon-next-2017-11-01' of github.com:xin3liang/linux: drm/hisilicon: Ensure LDI regs are properly configured. commit 87331c83797b5d5763a82f09f26fbb6e1a7e6661 Merge: 43106e2 39ae0d3 Author: Dave Airlie Date: Thu Nov 2 11:29:28 2017 +1000 Merge tag 'drm-msm-next-2017-11-01' of git://people.freedesktop.org/~robclark/linux into drm-next + preemption support for a5xx[1][2] + display fixes for 8x96 (snapdragon 820) including fixes for 4k scanout (hwpipe assignment re-work to handle multiple hwpipe assigned to plane for wide scanout) + async cursor plane updates and fixes + refactor adreno_bind/hwinit.. still defer fw loading until device open, but move clk/irq/etc to probe/bind time to fix issues when fw isn't present in filesys + clk/dt bindings cleanups w/ backward compat via msm_clk_get() (dt docs part ack'ed by Rob Herring) + fw loading re-work with helper to handle either /lib/firmware/qcom/$fw or /lib/firmware/$fw.. background, we've started landing fw for some of generations in linux-firmware, but there is a preference to put fw files under 'qcom' subdirectory, which is not what was done on android or for people who copied fw from android. So now we first look in qcom subdir and then fallback to the original location. + bunch of GPU debugging enhancements, to dump full cmdline of processes that trigger faults, and to add a new debugfs to capture cmdstream of just submits that triggered faults.. both quite useful for piglit ;-) * tag 'drm-msm-next-2017-11-01' of git://people.freedesktop.org/~robclark/linux: (38 commits) drm/msm: use %z format modifier for printing size_t drm/msm/mdp5: Don't use async plane update path if plane visibility changes drm/msm/mdp5: mdp5_crtc: Restore cursor state only if LM cursors are enabled drm/msm/mdp5: Update mdp5_pipe_assign to spit out both planes drm/msm/mdp5: Prepare mdp5_pipe_assign for some rework drm/msm: remove mdp5_cursor_plane_funcs drm/msm: update cursors asynchronously through atomic drm/msm/atomic: switch to drm_atomic_helper_check drm/msm/mdp5: restore cursor state when enabling crtc drm/msm/mdp5: don't use autosuspend drm/msm/mdp5: ignore planes that are not visible drm/msm: dump submits which triggered gpu hang drm/msm: preserve IOVAs in submit's bo table drm/msm/rd: allow adding addition msg to top of dump drm/msm: split rd debugfs file drm/msm: add special _get_vaddr_active() for cmdstream dumps drm/msm: show task cmdline in gpu recovery messages drm/msm: dump a rd GPUADDR header for all buffers in the command drm/msm: Removed unused struct_mutex_task drm/msm: Implement preemption for A5XX targets ... commit d6d80cb57be45fc1a7d08c30526ab81ae9e7bc3d Author: Casey Schaufler Date: Thu Sep 28 14:54:50 2017 -0700 Smack: Base support for overlayfs Supply the Smack module hooks in support of overlayfs. Ensure that the Smack label of new files gets the correct value when a directory is transmuting. Original implementation by Romanini Daniele, with a few tweaks added. Signed-off-by: Romanini Daniele Signed-off-by: Casey Schaufler Signed-off-by: James Morris security/smack/smack_lsm.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit 894a8293aaa702a5aef758bc069162a671ca7a07 Author: Felix Kuehling Date: Wed Nov 1 19:21:33 2017 -0400 drm/amdkfd: Minor cleanups These were missed previously when rebasing changes for upstreaming. v2: Remove redundant sched_policy conditions Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 10 ++++------ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 ++ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit 096d1a3efc8b0914a4cfb1203c147ed597907191 Author: Felix Kuehling Date: Wed Nov 1 19:21:32 2017 -0400 drm/amdkfd: Update queue_count before mapping queues map_queues_cpsch uses the queue_count to decide whether to upload a new runlist. So update the counter before calling it. Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit bfd5e378a98d0387b45a4864528a11b65d038f0c Author: Yong Zhao Date: Wed Nov 1 19:21:31 2017 -0400 drm/amdkfd: Cleanup DQM ASIC-specific ops Remove empty initialize function. Rename register_process to update_qpd to avoid confusion with the non-ASIC-specific register_process. Shorten ops_asic_specific to asic_ops. Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 19 +++++++------------ .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 11 ++++++----- .../drm/amd/amdkfd/kfd_device_queue_manager_cik.c | 20 +++++++------------- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager_vi.c | 20 +++++++------------- 4 files changed, 27 insertions(+), 43 deletions(-) commit 5a29ad6b9e0899cd17988895fa64fd3e9408ab8e Author: Ben Goz Date: Wed Nov 1 19:21:30 2017 -0400 drm/amdkfd: Register/Deregister process on qpd resolution Process registration needs to happen on each device. So use per-device queue lists to determine when to register/deregister the process. Signed-off-by: Ben Goz Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 062c5672d5f66963f6c87249a38226d0e70b1c4b Author: Yair Shachar Date: Wed Nov 1 19:21:29 2017 -0400 drm/amdkfd: Fix debug unregister procedure on process termination Take the dbgmgr lock and unregister before destroying the debug manager. Do this before destroying the queues. v2: Correct locking order in kfd_ioctl_dbg_register to ake sure the process mutex and dbgmgr mutex are always taken in the same order. Signed-off-by: Yair Shachar Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 4 ++-- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 37 +++++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 12 deletions(-) commit e2a8e99964ded3a156137c1a02832493ee727721 Author: Yong Zhao Date: Wed Nov 1 19:21:28 2017 -0400 drm/amdkfd: Avoid calling amd_iommu_unbind_pasid() when suspending When kfd suspending on APU, we do not need to call amd_iommu_unbind_pasid(), because pasid will be unbound automatically when power goes off. On the other hand, calling amd_iommu_unbind_pasid() will trigger kfd_process_iommu_unbind_callback() if the process is not terminating. By design, kfd_process_iommu_unbind_callback() should only be called for process terminating. So we would rather not to call amd_iommu_unbind_pasid() when suspending. Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_process.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit bba9662db79cb21c532bff2e83843037a616ed86 Author: Jay Cornwall Date: Wed Nov 1 19:21:27 2017 -0400 drm/amdkfd: Disable CP/SDMA ring/doorbell in MQD The MQD represents an inactive context and should not have ring or doorbell enable bits set. Doing so interferes with HWS which streams the MQD onto the HQD. If enable bits are set this activates the ring or doorbell before the HQD is fully configured. Signed-off-by: Jay Cornwall Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 34 +++++++----------------- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 7 ++--- 2 files changed, 11 insertions(+), 30 deletions(-) commit ab40cba30333cc264cf2731626565c3e1f29e4d1 Author: Yong Zhao Date: Wed Nov 1 19:21:26 2017 -0400 drm/amdkfd: Clean up the data structure in kfd_process A list of per-process queues is maintained in the kfd_process_queue_manager, so the queues array in kfd_process is redundant and in fact unused. Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 6 ------ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 18 ------------------ 2 files changed, 24 deletions(-) commit 620c50dc0b301f09b85ce27022d8f7420bf14e7f Author: Andy Shevchenko Date: Tue Oct 31 16:21:37 2017 +0200 i2c: thunderx: Remove duplicate NULL check Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Signed-off-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-thunderx-pcidrv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bfd9621259970904b25ad198030275328f09ed46 Author: Andy Shevchenko Date: Tue Oct 31 16:21:36 2017 +0200 i2c: taos-evm: Remove duplicate NULL check Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Signed-off-by: Andy Shevchenko Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-taos-evm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7b43dd19c9b13a3f5478b9d88a49a5495399ad29 Author: Andy Shevchenko Date: Tue Oct 31 16:21:35 2017 +0200 i2c: Make i2c_unregister_device() NULL-aware It's a common pattern to be NULL-aware when freeing resources. Signed-off-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit da24b8240fe6afdeef388a2ef1da662b25675a5a Author: Hoan Tran Date: Mon Oct 30 15:24:16 2017 -0700 i2c: xgene-slimpro: Support v2 This patch supports xgene-slimpro-i2c v2 which uses the non-cachable memory as the PCC shared memory. Signed-off-by: Hoan Tran Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xgene-slimpro.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) commit af3366753fb530528349e05e0953b7357504084a Author: Wolfram Sang Date: Fri Oct 27 22:24:44 2017 +0200 i2c: mpc: remove useless variable initialization cppcheck rightfully says: drivers/i2c/busses/i2c-mpc.c:329: style: Variable 'node' is reassigned a value before the old one has been used. Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6d2953643164525b22edcc09720c2cbf2e52d21 Merge: 4ee045f 4cf419a Author: Wolfram Sang Date: Wed Nov 1 23:49:36 2017 +0100 Merge branch 'i2c/sbs-manager' into i2c/for-4.15 commit 4ee045f4e9b73c4635ceedbb1ee40e0b3ecbdbcc Merge: 93367bf 05c7477 Author: Wolfram Sang Date: Wed Nov 1 23:44:52 2017 +0100 Merge branch 'for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio into i2c/for-4.15 Refactor i2c-gpio and its users to use gpiod. Done by GPIO maintainer LinusW. commit 5d0eda0307ca20c5c58b1abd2a8ba822e0763b43 Author: Dave Chinner Date: Wed Nov 1 15:02:48 2017 -0700 xfs: convert remaining xfs_sb_version_... checks to bool Some were missed in the pass that converted the function return values from int to bool. Update the remaining ones for consistency. Signed-Off-By: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_format.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 13791d3b833428e7dc7253e066eef8cae75cd1c0 Author: Darrick J. Wong Date: Tue Oct 31 12:10:02 2017 -0700 xfs: scrub extended attribute leaf space As we walk the attribute btree, explicitly check the structure of the attribute leaves to make sure the pointers make sense and the freemap is sensible. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/attr.c | 253 +++++++++++++++++++++++++++++++++++++++++++++---- fs/xfs/scrub/dabtree.c | 4 +- fs/xfs/scrub/dabtree.h | 3 +- fs/xfs/scrub/dir.c | 2 +- 4 files changed, 238 insertions(+), 24 deletions(-) commit e9e899a2a8c3c23b3084b048466f417ed92286d3 Author: Darrick J. Wong Date: Tue Oct 31 12:04:49 2017 -0700 xfs: move error injection tags into their own file Move the error injection tag names into a libxfs header so that we can share it between kernel and userspace. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_ag_resv.c | 1 + fs/xfs/libxfs/xfs_alloc.c | 1 + fs/xfs/libxfs/xfs_bmap.c | 1 + fs/xfs/libxfs/xfs_btree.c | 1 + fs/xfs/libxfs/xfs_dir2.c | 1 + fs/xfs/libxfs/xfs_errortag.h | 106 ++++++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_ialloc.c | 1 + fs/xfs/libxfs/xfs_inode_buf.c | 1 + fs/xfs/libxfs/xfs_refcount.c | 1 + fs/xfs/libxfs/xfs_rmap.c | 1 + fs/xfs/xfs_buf.c | 1 + fs/xfs/xfs_error.c | 1 + fs/xfs/xfs_error.h | 83 --------------------------------- fs/xfs/xfs_inode.c | 1 + fs/xfs/xfs_iomap.c | 1 + fs/xfs/xfs_log.c | 1 + fs/xfs/xfs_trans_ail.c | 1 + 17 files changed, 121 insertions(+), 83 deletions(-) commit 06b1132120d446bbaf844cbbae51f0afd3baacb8 Author: Darrick J. Wong Date: Tue Oct 31 12:04:24 2017 -0700 xfs: remove inode log format typedef Remove xfs_inode_log_format_t now that xfs_inode_log_format is explicitly padded and therefore is a real on-disk structure. This enables xfs/122 to check the size of the structure. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_log_format.h | 4 ++-- fs/xfs/xfs_inode_item.h | 2 +- fs/xfs/xfs_log_recover.c | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) commit efb5b43a5410fefa0516691af8e73f255260f598 Author: Martin Blumenstingl Date: Sun Oct 29 14:25:48 2017 +0100 dt-bindings: add vendor prefix for Next Thing Co. Next Thing Co. is the company behind the C.H.I.P. and C.H.I.P. Pro miniature single board computers. The "nextthing" vendor-prefix is already used for these two board as well as their own "GR8" SoC. Cc: Alexander Kaplan Signed-off-by: Martin Blumenstingl Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 108904442850c2884679f81121df3ef42d88cb9c Author: Ricardo Neri Date: Fri Oct 27 13:25:45 2017 -0700 x86/insn-eval: Incorporate segment base in linear address computation insn_get_addr_ref() returns the effective address as defined by the section 3.7.5.1 Vol 1 of the Intel 64 and IA-32 Architectures Software Developer's Manual. In order to compute the linear address, we must add to the effective address the segment base address as set in the segment descriptor. The segment descriptor to use depends on the register used as operand and segment override prefixes, if any. In most cases, the segment base address will be 0 if the USER_DS/USER32_DS segment is used or if segmentation is not used. However, the base address is not necessarily zero if a user programs defines its own segments. This is possible by using a local descriptor table. Since the effective address is a signed quantity, the unsigned segment base address is saved in a separate variable and added to the final, unsigned, effective address. Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Adrian Hunter Cc: Paul Gortmaker Cc: Huang Rui Cc: Qiaowei Ren Cc: Shuah Khan Cc: Kees Cook Cc: Jonathan Corbet Cc: Jiri Slaby Cc: Dmitry Vyukov Cc: "Ravi V. Shankar" Cc: Chris Metcalf Cc: Brian Gerst Cc: Arnaldo Carvalho de Melo Cc: Andy Lutomirski Cc: Colin Ian King Cc: Chen Yucong Cc: Adam Buchbinder Cc: Vlastimil Babka Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Paolo Bonzini Cc: Andrew Morton Cc: Thomas Garnier Link: https://lkml.kernel.org/r/1509135945-13762-19-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/lib/insn-eval.c | 55 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 3 deletions(-) commit e526a302e425ab11111efc5f59e52449bbcc768e Author: Ricardo Neri Date: Fri Oct 27 13:25:44 2017 -0700 x86/insn-eval: Indicate a 32-bit displacement if ModRM.mod is 0 and ModRM.rm is 101b Section 2.2.1.3 of the Intel 64 and IA-32 Architectures Software Developer's Manual volume 2A states that when ModRM.mod is zero and ModRM.rm is 101b, a 32-bit displacement follows the ModRM byte. This means that none of the registers are used in the computation of the effective address. A return value of -EDOM indicates callers that they should not use the value of registers when computing the effective address for the instruction. In long mode, the effective address is given by the 32-bit displacement plus the location of the next instruction. In protected mode, only the displacement is used. The instruction decoder takes care of obtaining the displacement. Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Adrian Hunter Cc: Paul Gortmaker Cc: Huang Rui Cc: Qiaowei Ren Cc: Shuah Khan Cc: Kees Cook Cc: Jonathan Corbet Cc: Jiri Slaby Cc: Dmitry Vyukov Cc: "Ravi V. Shankar" Cc: Chris Metcalf Cc: Brian Gerst Cc: Arnaldo Carvalho de Melo Cc: Andy Lutomirski Cc: Colin Ian King Cc: Chen Yucong Cc: Adam Buchbinder Cc: Vlastimil Babka Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Paolo Bonzini Cc: Andrew Morton Cc: Thomas Garnier Link: https://lkml.kernel.org/r/1509135945-13762-18-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/lib/insn-eval.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 4efea85fb56fa1691b79af1eea4c1425660cf4e3 Author: Ricardo Neri Date: Fri Oct 27 13:25:43 2017 -0700 x86/insn-eval: Add function to get default params of code segment Obtain the default values of the address and operand sizes as specified in the D and L bits of the the segment descriptor selected by the register CS. The function can be used for both protected and long modes. For virtual-8086 mode, the default address and operand sizes are always 2 bytes. The returned parameters are encoded in a signed 8-bit data type. Auxiliar macros are provided to encode and decode such values. Improvements-by: Borislav Petkov Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Adrian Hunter Cc: Paul Gortmaker Cc: Huang Rui Cc: Qiaowei Ren Cc: Shuah Khan Cc: Kees Cook Cc: Jonathan Corbet Cc: Jiri Slaby Cc: Dmitry Vyukov Cc: "Ravi V. Shankar" Cc: Chris Metcalf Cc: Brian Gerst Cc: Arnaldo Carvalho de Melo Cc: Andy Lutomirski Cc: Colin Ian King Cc: Chen Yucong Cc: Adam Buchbinder Cc: Vlastimil Babka Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Paolo Bonzini Cc: Andrew Morton Cc: Thomas Garnier Link: https://lkml.kernel.org/r/1509135945-13762-17-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/include/asm/insn-eval.h | 5 ++++ arch/x86/lib/insn-eval.c | 64 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) commit bd5a410a5de3a6893eaacc749e706b85506dc908 Author: Ricardo Neri Date: Fri Oct 27 13:25:42 2017 -0700 x86/insn-eval: Add utility functions to get segment descriptor base address and limit With segmentation, the base address of the segment is needed to compute a linear address. This base address is obtained from the applicable segment descriptor. Such segment descriptor is referenced from a segment selector. These new functions obtain the segment base and limit of the segment selector indicated by segment register index given as argument. This index is any of the INAT_SEG_REG_* family of #define's. The logic to obtain the segment selector is wrapped in the function get_segment_selector() with the inputs described above. Once the selector is known, the base address is determined. In protected mode, the selector is used to obtain the segment descriptor and then its base address. In long mode, the segment base address is zero except when FS or GS are used. In virtual-8086 mode, the base address is computed as the value of the segment selector shifted 4 positions to the left. In protected mode, segment limits are enforced. Thus, a function to determine the limit of the segment is added. Segment limits are not enforced in long or virtual-8086. For the latter, addresses are limited to 20 bits; address size will be handled when computing the linear address. Improvements-by: Borislav Petkov Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Adrian Hunter Cc: Paul Gortmaker Cc: Huang Rui Cc: Qiaowei Ren Cc: Shuah Khan Cc: Kees Cook Cc: Jonathan Corbet Cc: Jiri Slaby Cc: Dmitry Vyukov Cc: "Ravi V. Shankar" Cc: Chris Metcalf Cc: Brian Gerst Cc: Arnaldo Carvalho de Melo Cc: Andy Lutomirski Cc: Colin Ian King Cc: Chen Yucong Cc: Adam Buchbinder Cc: Vlastimil Babka Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Paolo Bonzini Cc: Andrew Morton Cc: Thomas Garnier Link: https://lkml.kernel.org/r/1509135945-13762-16-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/include/asm/insn-eval.h | 1 + arch/x86/lib/insn-eval.c | 114 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+) commit 670f928ba09b06712da34a3c44be6c8fa561fb19 Author: Ricardo Neri Date: Fri Oct 27 13:25:41 2017 -0700 x86/insn-eval: Add utility function to get segment descriptor The segment descriptor contains information that is relevant to how linear addresses need to be computed. It contains the default size of addresses as well as the base address of the segment. Thus, given a segment selector, we ought to look at segment descriptor to correctly calculate the linear address. In protected mode, the segment selector might indicate a segment descriptor from either the global descriptor table or a local descriptor table. Both cases are considered in this function. This function is a prerequisite for functions in subsequent commits that will obtain the aforementioned attributes of the segment descriptor. Improvements-by: Borislav Petkov Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Adrian Hunter Cc: Paul Gortmaker Cc: Huang Rui Cc: Qiaowei Ren Cc: Shuah Khan Cc: Kees Cook Cc: Jonathan Corbet Cc: Jiri Slaby Cc: Dmitry Vyukov Cc: "Ravi V. Shankar" Cc: Chris Metcalf Cc: Brian Gerst Cc: Arnaldo Carvalho de Melo Cc: Andy Lutomirski Cc: Colin Ian King Cc: Chen Yucong Cc: Adam Buchbinder Cc: Vlastimil Babka Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Paolo Bonzini Cc: Andrew Morton Cc: Thomas Garnier Link: https://lkml.kernel.org/r/1509135945-13762-15-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/lib/insn-eval.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 32d0b95300db03c2b23b2ea2c94769a4a138e79d Author: Ricardo Neri Date: Fri Oct 27 13:25:40 2017 -0700 x86/insn-eval: Add utility functions to get segment selector When computing a linear address and segmentation is used, we need to know the base address of the segment involved in the computation. In most of the cases, the segment base address will be zero as in USER_DS/USER32_DS. However, it may be possible that a user space program defines its own segments via a local descriptor table. In such a case, the segment base address may not be zero. Thus, the segment base address is needed to calculate correctly the linear address. If running in protected mode, the segment selector to be used when computing a linear address is determined by either any of segment override prefixes in the instruction or inferred from the registers involved in the computation of the effective address; in that order. Also, there are cases when the segment override prefixes shall be ignored (i.e., code segments are always selected by the CS segment register; string instructions always use the ES segment register when using rDI register as operand). In long mode, segment registers are ignored, except for FS and GS. In these two cases, base addresses are obtained from the respective MSRs. For clarity, this process can be split into four steps (and an equal number of functions): determine if segment prefixes overrides can be used; parse the segment override prefixes, and use them if found; if not found or cannot be used, use the default segment registers associated with the operand registers. Once the segment register to use has been identified, read its value to obtain the segment selector. The method to obtain the segment selector depends on several factors. In 32-bit builds, segment selectors are saved into a pt_regs structure when switching to kernel mode. The same is also true for virtual-8086 mode. In 64-bit builds, segmentation is mostly ignored, except when running a program in 32-bit legacy mode. In this case, CS and SS can be obtained from pt_regs. DS, ES, FS and GS can be read directly from the respective segment registers. In order to identify the segment registers, a new set of #defines is introduced. It also includes two special identifiers. One of them indicates when the default segment register associated with instruction operands shall be used. Another one indicates that the contents of the segment register shall be ignored; this identifier is used when in long mode. Improvements-by: Borislav Petkov Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Adrian Hunter Cc: Paul Gortmaker Cc: Huang Rui Cc: Qiaowei Ren Cc: Shuah Khan Cc: Kees Cook Cc: Jonathan Corbet Cc: Jiri Slaby Cc: Dmitry Vyukov Cc: "Ravi V. Shankar" Cc: Chris Metcalf Cc: Brian Gerst Cc: Arnaldo Carvalho de Melo Cc: Andy Lutomirski Cc: Colin Ian King Cc: Chen Yucong Cc: Adam Buchbinder Cc: Vlastimil Babka Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Paolo Bonzini Cc: Andrew Morton Cc: Thomas Garnier Link: https://lkml.kernel.org/r/1509135945-13762-14-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/include/asm/inat.h | 10 ++ arch/x86/lib/insn-eval.c | 340 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 350 insertions(+) commit 536b815388f7f4d2a7cd1418939902fb037ea370 Author: Ricardo Neri Date: Fri Oct 27 13:25:39 2017 -0700 x86/insn-eval: Add utility function to identify string instructions String instructions are special because, in protected mode, the linear address is always obtained via the ES segment register in operands that use the (E)DI register; the DS segment register in operands that use the (E)SI register. Furthermore, segment override prefixes are ignored when calculating a linear address involving the (E)DI register; segment override prefixes can be used when calculating linear addresses involving the (E)SI register. It follows that linear addresses are calculated differently for the case of string instructions. The purpose of this utility function is to identify such instructions for callers to determine a linear address correctly. Note that this function only identifies string instructions; it does not determine what segment register to use in the address computation. That is left to callers. A subsequent commmit introduces a function to determine the segment register to use given the instruction, operands and segment override prefixes. Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Adrian Hunter Cc: Paul Gortmaker Cc: Huang Rui Cc: Qiaowei Ren Cc: Shuah Khan Cc: Kees Cook Cc: Jonathan Corbet Cc: Jiri Slaby Cc: Dmitry Vyukov Cc: "Ravi V. Shankar" Cc: Chris Metcalf Cc: Brian Gerst Cc: Arnaldo Carvalho de Melo Cc: Andy Lutomirski Cc: Colin Ian King Cc: Chen Yucong Cc: Adam Buchbinder Cc: Vlastimil Babka Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Paolo Bonzini Cc: Andrew Morton Cc: Thomas Garnier Link: https://lkml.kernel.org/r/1509135945-13762-13-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/lib/insn-eval.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit e5e45f11110191740ecb365fa8c7a25814ce8ac8 Author: Ricardo Neri Date: Fri Oct 27 13:25:38 2017 -0700 x86/insn-eval: Add a utility function to get register offsets The function get_reg_offset() returns the offset to the register the argument specifies as indicated in an enumeration of type offset. Callers of this function would need the definition of such enumeration. This is not needed. Instead, add helper functions for this purpose. These functions are useful in cases when, for instance, the caller needs to decide whether the operand is a register or a memory location by looking at the rm part of the ModRM byte. As of now, this is the only helper function that is needed. Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Adrian Hunter Cc: Paul Gortmaker Cc: Huang Rui Cc: Qiaowei Ren Cc: Shuah Khan Cc: Kees Cook Cc: Jonathan Corbet Cc: Jiri Slaby Cc: Dmitry Vyukov Cc: "Ravi V. Shankar" Cc: Chris Metcalf Cc: Brian Gerst Cc: Arnaldo Carvalho de Melo Cc: Andy Lutomirski Cc: Colin Ian King Cc: Chen Yucong Cc: Adam Buchbinder Cc: Vlastimil Babka Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Paolo Bonzini Cc: Andrew Morton Cc: Thomas Garnier Link: https://lkml.kernel.org/r/1509135945-13762-12-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/include/asm/insn-eval.h | 1 + arch/x86/lib/insn-eval.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) commit ed594e4ba5bfe268d63d7cee3c1a827e3dd5056f Author: Ricardo Neri Date: Fri Oct 27 13:25:37 2017 -0700 x86/insn-eval: Do not BUG on invalid register type We are not in a critical failure path. The invalid register type is caused when trying to decode invalid instruction bytes from a user-space program. Thus, simply print an error message. To prevent this warning from being abused from user space programs, use the rate-limited variant of pr_err(). along with a descriptive prefix. Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Adrian Hunter Cc: Paul Gortmaker Cc: Huang Rui Cc: Qiaowei Ren Cc: Shuah Khan Cc: Kees Cook Cc: Jonathan Corbet Cc: Jiri Slaby Cc: Dmitry Vyukov Cc: "Ravi V. Shankar" Cc: Chris Metcalf Cc: Brian Gerst Cc: Arnaldo Carvalho de Melo Cc: Andy Lutomirski Cc: Colin Ian King Cc: Chen Yucong Cc: Adam Buchbinder Cc: Vlastimil Babka Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Paolo Bonzini Cc: Andrew Morton Cc: Thomas Garnier Link: https://lkml.kernel.org/r/1509135945-13762-11-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/lib/insn-eval.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 32542ee295bec38e5e1608f8c9d6d28e5a7e6112 Author: Ricardo Neri Date: Fri Oct 27 13:25:36 2017 -0700 x86/mpx, x86/insn: Relocate insn util functions to a new insn-eval file Other kernel submodules can benefit from using the utility functions defined in mpx.c to obtain the addresses and values of operands contained in the general purpose registers. An instance of this is the emulation code used for instructions protected by the Intel User-Mode Instruction Prevention feature. Thus, these functions are relocated to a new insn-eval.c file. The reason to not relocate these utilities into insn.c is that the latter solely analyses instructions given by a struct insn without any knowledge of the meaning of the values of instruction operands. This new utility insn- eval.c aims to be used to resolve userspace linear addresses based on the contents of the instruction operands as well as the contents of pt_regs structure. These utilities come with a separate header. This is to avoid taking insn.c out of sync from the instructions decoders under tools/obj and tools/perf. This also avoids adding cumbersome #ifdef's for the #include'd files required to decode instructions in a kernel context. Functions are simply relocated. There are not functional or indentation changes. Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Adrian Hunter Cc: Paul Gortmaker Cc: Huang Rui Cc: Qiaowei Ren Cc: Shuah Khan Cc: Kees Cook Cc: Jonathan Corbet Cc: Jiri Slaby Cc: Dmitry Vyukov Cc: "Ravi V. Shankar" Cc: Chris Metcalf Cc: Brian Gerst Cc: Arnaldo Carvalho de Melo Cc: Andy Lutomirski Cc: Colin Ian King Cc: Chen Yucong Cc: Adam Buchbinder Cc: Vlastimil Babka Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Paolo Bonzini Cc: Andrew Morton Cc: Thomas Garnier Link: https://lkml.kernel.org/r/1509135945-13762-10-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/include/asm/insn-eval.h | 16 ++++ arch/x86/lib/Makefile | 2 +- arch/x86/lib/insn-eval.c | 163 +++++++++++++++++++++++++++++++++++++++ arch/x86/mm/mpx.c | 156 +------------------------------------ 4 files changed, 182 insertions(+), 155 deletions(-) commit 4578f06fc93fb73c9c644ed838f4cdabbfdc4df1 Author: Ricardo Neri Date: Fri Oct 27 13:25:35 2017 -0700 x86/mpx: Do not use SIB.base if its value is 101b and ModRM.mod = 0 Section 2.2.1.2 of the Intel 64 and IA-32 Architectures Software Developer's Manual volume 2A states that if a SIB byte is used and SIB.base is 101b and ModRM.mod is zero, then the base part of the base part of the effective address computation is null. To signal this situation, a -EDOM error is returned to indicate callers to ignore the base value present in the register operand. In this scenario, a 32-bit displacement follows the SIB byte. Displacement is obtained when the instruction decoder parses the operands. Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Adan Hawthorn Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Paul Gortmaker Cc: Huang Rui Cc: Qiaowei Ren Cc: Shuah Khan Cc: Jonathan Corbet Cc: Jiri Slaby Cc: Nathan Howard Cc: "Ravi V. Shankar" Cc: Chris Metcalf Cc: Brian Gerst Cc: Andy Lutomirski Cc: Colin Ian King Cc: Chen Yucong Cc: Adam Buchbinder Cc: Vlastimil Babka Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Joe Perches Cc: Paolo Bonzini Cc: Andrew Morton Link: https://lkml.kernel.org/r/1509135945-13762-9-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/mm/mpx.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit ff9d78025c519046cfbc212b34f09116685402fc Author: Ricardo Neri Date: Fri Oct 27 13:25:34 2017 -0700 x86/mpx: Do not use SIB.index if its value is 100b and ModRM.mod is not 11b Section 2.2.1.2 of the Intel 64 and IA-32 Architectures Software Developer's Manual volume 2A states that when ModRM.mod !=11b and ModRM.rm = 100b indexed register-indirect addressing is used. In other words, a SIB byte follows the ModRM byte. In the specific case of SIB.index = 100b, the scale*index portion of the computation of the effective address is null. To signal callers of this particular situation, get_reg_offset() can return -EDOM (-EINVAL continues to indicate that an error when decoding the SIB byte). An example of this situation can be the following instruction: 8b 4c 23 80 mov -0x80(%rbx,%riz,1),%rcx ModRM: 0x4c [mod:1b][reg:1b][rm:100b] SIB: 0x23 [scale:0b][index:100b][base:11b] Displacement: 0x80 (1-byte, as per ModRM.mod = 1b) The %riz 'register' indicates a null index. In long mode, a REX prefix may be used. When a REX prefix is present, REX.X adds a fourth bit to the register selection of SIB.index. This gives the ability to refer to all the 16 general purpose registers. When REX.X is 1b and SIB.index is 100b, the index is indicated in %r12. In our example, this would look like: 42 8b 4c 23 80 mov -0x80(%rbx,%r12,1),%rcx REX: 0x42 [W:0b][R:0b][X:1b][B:0b] ModRM: 0x4c [mod:1b][reg:1b][rm:100b] SIB: 0x23 [scale:0b][.X: 1b, index:100b][.B:0b, base:11b] Displacement: 0x80 (1-byte, as per ModRM.mod = 1b) %r12 is a valid register to use in the scale*index part of the effective address computation. Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Adan Hawthorn Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Paul Gortmaker Cc: Huang Rui Cc: Qiaowei Ren Cc: Shuah Khan Cc: Jonathan Corbet Cc: Jiri Slaby Cc: Nathan Howard Cc: "Ravi V. Shankar" Cc: Chris Metcalf Cc: Brian Gerst Cc: Andy Lutomirski Cc: Colin Ian King Cc: Chen Yucong Cc: Adam Buchbinder Cc: Vlastimil Babka Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Joe Perches Cc: Paolo Bonzini Cc: Andrew Morton Link: https://lkml.kernel.org/r/1509135945-13762-8-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/mm/mpx.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit b8d2eff3b1c6e46238a5fb3f56843e9974b4889f Author: Ricardo Neri Date: Fri Oct 27 13:25:33 2017 -0700 x86/mpx: Use signed variables to compute effective addresses Even though memory addresses are unsigned, the operands used to compute the effective address do have a sign. This is true for ModRM.rm, SIB.base, SIB.index as well as the displacement bytes. Thus, signed variables shall be used when computing the effective address from these operands. Once the signed effective address has been computed, it is casted to an unsigned long to determine the linear address. Variables are renamed to better reflect the type of address being computed. Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Adan Hawthorn Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Paul Gortmaker Cc: Huang Rui Cc: Qiaowei Ren Cc: Shuah Khan Cc: Jonathan Corbet Cc: Jiri Slaby Cc: Nathan Howard Cc: "Ravi V. Shankar" Cc: Chris Metcalf Cc: Brian Gerst Cc: Andy Lutomirski Cc: Colin Ian King Cc: Chen Yucong Cc: Adam Buchbinder Cc: Vlastimil Babka Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Joe Perches Cc: Paolo Bonzini Cc: Andrew Morton Link: https://lkml.kernel.org/r/1509135945-13762-7-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/mm/mpx.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit e27c310af5c05cf876d9cad006928076c27f54d4 Author: Ricardo Neri Date: Fri Oct 27 13:25:30 2017 -0700 ptrace,x86: Make user_64bit_mode() available to 32-bit builds In its current form, user_64bit_mode() can only be used when CONFIG_X86_64 is selected. This implies that code built with CONFIG_X86_64=n cannot use it. If a piece of code needs to be built for both CONFIG_X86_64=y and CONFIG_X86_64=n and wants to use this function, it needs to wrap it in an #ifdef/#endif; potentially, in multiple places. This can be easily avoided with a single #ifdef/#endif pair within user_64bit_mode() itself. Suggested-by: Borislav Petkov Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Adrian Hunter Cc: Paul Gortmaker Cc: Huang Rui Cc: Qiaowei Ren Cc: Shuah Khan Cc: Kees Cook Cc: Jonathan Corbet Cc: Jiri Slaby Cc: Dmitry Vyukov Cc: "Ravi V. Shankar" Cc: Chris Metcalf Cc: Brian Gerst Cc: Arnaldo Carvalho de Melo Cc: Andy Lutomirski Cc: Colin Ian King Cc: Chen Yucong Cc: Adam Buchbinder Cc: Vlastimil Babka Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Paolo Bonzini Cc: Andrew Morton Cc: Thomas Garnier Link: https://lkml.kernel.org/r/1509135945-13762-4-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/include/asm/ptrace.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b15d70df6e685912be8bbcb7557d277d48aa942c Author: Ricardo Neri Date: Fri Oct 27 13:25:32 2017 -0700 x86/mpx: Simplify handling of errors when computing linear addresses When errors occur in the computation of the linear address, -1L is returned. Rather than having a separate return path for errors, the variable used to return the computed linear address can be initialized with the error value. Hence, only one return path is needed. This makes the function easier to read. While here, ensure that the error value is -1L, a 64-bit value, rather than -1, a 32-bit value. Suggested-by: Borislav Petkov Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Adan Hawthorn Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Paul Gortmaker Cc: Huang Rui Cc: Qiaowei Ren Cc: Shuah Khan Cc: Jonathan Corbet Cc: Jiri Slaby Cc: Nathan Howard Cc: "Ravi V. Shankar" Cc: Chris Metcalf Cc: Brian Gerst Cc: Andy Lutomirski Cc: Colin Ian King Cc: Chen Yucong Cc: Adam Buchbinder Cc: Vlastimil Babka Cc: Lorenzo Stoakes Cc: Masami Hiramatsu Cc: Joe Perches Cc: Paolo Bonzini Cc: Andrew Morton Link: https://lkml.kernel.org/r/1509135945-13762-6-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/mm/mpx.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit ed40a10431701d683bfd59f7ca01a8c97408cf67 Author: Ricardo Neri Date: Fri Oct 27 13:25:31 2017 -0700 uprobes/x86: Use existing definitions for segment override prefixes Rather than using hard-coded values of the segment override prefixes, leverage the existing definitions provided in inat.h. Suggested-by: Borislav Petkov Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Srikar Dronamraju Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Paul Gortmaker Cc: Huang Rui Cc: Shuah Khan Cc: Jonathan Corbet Cc: Jiri Slaby Cc: "Ravi V. Shankar" Cc: Denys Vlasenko Cc: Chris Metcalf Cc: Brian Gerst Cc: Andy Lutomirski Cc: Chen Yucong Cc: Vlastimil Babka Cc: Masami Hiramatsu Cc: Paolo Bonzini Cc: Andrew Morton Link: https://lkml.kernel.org/r/1509135945-13762-5-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/kernel/uprobes.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit b0ce5b8c95c83a7b98c679b117e3d6ae6f97154b Author: Ricardo Neri Date: Fri Oct 27 13:25:29 2017 -0700 x86/boot: Relocate definition of the initial state of CR0 Both head_32.S and head_64.S utilize the same value to initialize the control register CR0. Also, other parts of the kernel might want to access this initial definition (e.g., emulation code for User-Mode Instruction Prevention uses this state to provide a sane dummy value for CR0 when emulating the smsw instruction). Thus, relocate this definition to a header file from which it can be conveniently accessed. Suggested-by: Borislav Petkov Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Andy Lutomirski Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: linux-mm@kvack.org Cc: Paul Gortmaker Cc: Huang Rui Cc: Shuah Khan Cc: linux-arch@vger.kernel.org Cc: Jonathan Corbet Cc: Jiri Slaby Cc: "Ravi V. Shankar" Cc: Denys Vlasenko Cc: Chris Metcalf Cc: Brian Gerst Cc: Josh Poimboeuf Cc: Chen Yucong Cc: Vlastimil Babka Cc: Dave Hansen Cc: Andy Lutomirski Cc: Masami Hiramatsu Cc: Paolo Bonzini Cc: Andrew Morton Cc: Linus Torvalds Link: https://lkml.kernel.org/r/1509135945-13762-3-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/include/uapi/asm/processor-flags.h | 3 +++ arch/x86/kernel/head_32.S | 3 --- arch/x86/kernel/head_64.S | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) commit 1067f030994c69ca1fba8c607437c8895dcf8509 Author: Ricardo Neri Date: Fri Oct 27 13:25:28 2017 -0700 x86/mm: Relocate page fault error codes to traps.h Up to this point, only fault.c used the definitions of the page fault error codes. Thus, it made sense to keep them within such file. Other portions of code might be interested in those definitions too. For instance, the User- Mode Instruction Prevention emulation code will use such definitions to emulate a page fault when it is unable to successfully copy the results of the emulated instructions to user space. While relocating the error code enumeration, the prefix X86_ is used to make it consistent with the rest of the definitions in traps.h. Of course, code using the enumeration had to be updated as well. No functional changes were performed. Signed-off-by: Ricardo Neri Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Reviewed-by: Andy Lutomirski Cc: "Michael S. Tsirkin" Cc: Peter Zijlstra Cc: Dave Hansen Cc: ricardo.neri@intel.com Cc: Paul Gortmaker Cc: Huang Rui Cc: Shuah Khan Cc: Jonathan Corbet Cc: Jiri Slaby Cc: "Ravi V. Shankar" Cc: Chris Metcalf Cc: Brian Gerst Cc: Josh Poimboeuf Cc: Chen Yucong Cc: Vlastimil Babka Cc: Masami Hiramatsu Cc: Paolo Bonzini Cc: Andrew Morton Cc: "Kirill A. Shutemov" Link: https://lkml.kernel.org/r/1509135945-13762-2-git-send-email-ricardo.neri-calderon@linux.intel.com arch/x86/include/asm/traps.h | 18 +++++++++ arch/x86/mm/fault.c | 88 +++++++++++++++++--------------------------- 2 files changed, 52 insertions(+), 54 deletions(-) commit da2963e8fcd77c328f3da40c0aa8b650f18ed9ed Merge: 00ed87da 856ec53 Author: Thomas Gleixner Date: Wed Nov 1 21:00:19 2017 +0100 Merge tag 'timers-conversion-next2' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into timers/core Pull the next batch of timer conversions from Kees Cook: - Second batch of scsi conversions that have been Reviewed and/or Acked. - Various *_on_stack() changes for USB, Acked by Greg. - DRM conversion that was declared too late for drm's tree, but Acked for timers. - RAS driver conversion, Acked. commit d28e649a5c58b779b303c252c66ee84a0f2c3b32 Author: Gu JinXiang Date: Thu Oct 19 09:49:27 2017 +0800 btrfs: Fix bug for misused dev_t when lookup in dev state hash table. Fix bug of commit 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index"). bio_dev(bio) is used to find the dev state in function __btrfsic_submit_bio. But when dev_state is added to the hashtable, it is using dev_t of block_device. bio_dev(bio) returns a dev_t of part0 which is different from dev_t in block_device(bd_dev). bd_dev in block_device represents the exact partition. block_device.bd_dev = bio->bi_partno (same as block_device.bd_partno) + bio_dev(bio). When adding a dev_state into hashtable, we use the exact partition dev_t. So when looking it up, it should also use the exact partition dev_t. Reproducer of this bug: Use MOUNT_OPTIONS="-o check_int" and run btrfs/001 in fstests. Then there will be WARNING like below. WARNING: btrfs: attempt to write superblock which references block M @29523968 (sda7 /1111654400/2) which is never written! Signed-off-by: Gu JinXiang Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19562430c6213925faba3baa9e8cb224ddd47ee6 Author: Timofey Titovets Date: Sun Oct 8 16:11:59 2017 +0300 Btrfs: heuristic: add Shannon entropy calculation Byte distribution check in heuristic will filter edge data cases and some time fail to classify input data. Let's fix that by adding Shannon entropy calculation, that will cover classification of most other data types. As Shannon entropy needs log2 with some precision to work, let's use ilog2(N) and for increased precision, by do ilog2(pow(N, 4)). Shannon entropy has been slightly changed to avoid signed numbers and division. The calculation is direct by the formula, successor of precalculated table or chains of if-else. The accuracy errors of ilog2 are compensated by @ENTROPY_LVL_ACEPTABLE 70 -> 65 @ENTROPY_LVL_HIGH 85 -> 80 Signed-off-by: Timofey Titovets Reviewed-by: David Sterba [ update comments ] Signed-off-by: David Sterba fs/btrfs/compression.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 1 deletion(-) commit 858177d38d4681dad6efc015b99e4c786a34aca5 Author: Timofey Titovets Date: Thu Sep 28 17:33:41 2017 +0300 Btrfs: heuristic: add byte core set calculation Calculate byte core set for data sample: - sort buckets' numbers in decreasing order - count how many values cover 90% of the sample If the core set size is low (<=25%), data are easily compressible. If the core set size is high (>=80%), data are not compressible. Signed-off-by: Timofey Titovets Reviewed-by: David Sterba [ update comments ] Signed-off-by: David Sterba fs/btrfs/compression.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit a288e92cacdc4729ad8f83d018fb0f3f5ded6c37 Author: Timofey Titovets Date: Thu Sep 28 17:33:40 2017 +0300 Btrfs: heuristic: add byte set calculation Calculate byte set size for data sample: - calculate how many unique bytes have been in the sample - for all bytes count > 0, check if we're still in the low count range (~25%), such data are easily compressible, otherwise furhter analysis is needed Signed-off-by: Timofey Titovets Reviewed-by: David Sterba [ update comments ] Signed-off-by: David Sterba fs/btrfs/compression.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 1fe4f6fa5ae7dd1e63145e1ced7b9b38854da9f4 Author: Timofey Titovets Date: Thu Sep 28 17:33:39 2017 +0300 Btrfs: heuristic: add detection of repeated data patterns Walk over data sample and use memcmp to detect repeated patterns, like zeros, but a bit more general. Signed-off-by: Timofey Titovets Reviewed-by: David Sterba [ minor coding style fixes ] Signed-off-by: David Sterba fs/btrfs/compression.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit a440d48c7f93af5bae86af676cc6cd4e9fd6015f Author: Timofey Titovets Date: Thu Sep 28 17:33:38 2017 +0300 Btrfs: heuristic: implement sampling logic Copy sample data from the input data range to sample buffer then calculate byte value count for that sample into bucket. Signed-off-by: Timofey Titovets [ minor comment updates ] Signed-off-by: David Sterba fs/btrfs/compression.c | 71 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 62 insertions(+), 9 deletions(-) commit 17b5a6c17e265ca84fac9c3256ff86c691f04aab Author: Timofey Titovets Date: Thu Sep 28 17:33:37 2017 +0300 Btrfs: heuristic: add bucket and sample counters and other defines Add basic defines and structures for data sampling. Added macros: - For future sampling algo - For bucket size Heuristic workspace: - Add bucket for storing byte type counters - Add sample array for storing partial copy of input data range - Add counter for store current sample size to workspace Signed-off-by: Timofey Titovets Reviewed-by: David Sterba [ minor coding style fixes, comments updated ] Signed-off-by: David Sterba fs/btrfs/compression.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) commit 4e439a0b184f014a5833fa468af36cc9f59b8fb1 Author: Timofey Titovets Date: Thu Sep 28 17:33:36 2017 +0300 Btrfs: compression: separate heuristic/compression workspaces Compression heuristic itself is not a compression type, as current infrastructure provides workspaces for several compression types, it's difficult to just add heuristic workspace. Just refactor the code to support compression/heuristic workspaces with maximum code sharing and minimum changes in it. Signed-off-by: Timofey Titovets Reviewed-by: David Sterba [ coding style fixes ] Signed-off-by: David Sterba fs/btrfs/compression.c | 139 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 121 insertions(+), 18 deletions(-) commit ddfae63cc8e03ef48622cb780e6c66367b2d4f1a Author: Josef Bacik Date: Thu Oct 19 14:16:02 2017 -0400 btrfs: move btrfs_truncate_block out of trans handle Since we do a delalloc reserve in btrfs_truncate_block we can deadlock with freeze. If somebody else is trying to allocate metadata for this inode and it gets stuck in start_delalloc_inodes because of freeze we will deadlock. Be safe and move this outside of a trans handle. This also has a side-effect of making sure that we're not leaving stale data behind in the other_encoding or encryption case. Not an issue now since nobody uses it, but it would be a problem in the future. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/inode.c | 120 +++++++++++++++++++++---------------------------------- 1 file changed, 45 insertions(+), 75 deletions(-) commit ce8ea7cc6eb3139f4c730d647325e69354159b0f Author: Josef Bacik Date: Thu Oct 19 14:16:01 2017 -0400 btrfs: don't call btrfs_start_delalloc_roots in flushoncommit We're holding the sb_start_intwrite lock at this point, and doing async filemap_flush of the inodes will result in a deadlock if we freeze the fs during this operation. This is because we could do a btrfs_join_transaction() in the thread we are waiting on which would block at sb_start_intwrite, and thus deadlock. Using writeback_inodes_sb() side steps the problem by not introducing all of these extra locking dependencies. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/transaction.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 0e0adbcfdc908684317c99a9bf5e13383f03b7ec Author: Josef Bacik Date: Thu Oct 19 14:16:00 2017 -0400 btrfs: track refs in a rb_tree instead of a list If we get a significant amount of delayed refs for a single block (think modifying multiple snapshots) we can end up spending an ungodly amount of time looping through all of the entries trying to see if they can be merged. This is because we only add them to a list, so we have O(2n) for every ref head. This doesn't make any sense as we likely have refs for different roots, and so they cannot be merged. Tracking in a tree will allow us to break as soon as we hit an entry that doesn't match, making our worst case O(n). With this we can also merge entries more easily. Before we had to hope that matching refs were on the ends of our list, but with the tree we can search down to exact matches and merge them at insert time. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/backref.c | 5 ++- fs/btrfs/delayed-ref.c | 108 +++++++++++++++++++++++++------------------------ fs/btrfs/delayed-ref.h | 5 +-- fs/btrfs/disk-io.c | 10 +++-- fs/btrfs/extent-tree.c | 21 ++++++---- 5 files changed, 82 insertions(+), 67 deletions(-) commit 1d148e5939f55c76d06108548c7c0226e55dde8e Author: Josef Bacik Date: Thu Oct 19 14:15:59 2017 -0400 btrfs: add a comp_refs() helper Instead of open-coding the delayed ref comparisons, add a helper to do the comparisons generically and use that everywhere. We compare sequence numbers last for following patches. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/delayed-ref.c | 54 ++++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 24 deletions(-) commit c7ad7c843965d8691269f581e132633a4ca9ef91 Author: Josef Bacik Date: Thu Oct 19 14:15:58 2017 -0400 btrfs: switch args for comp_*_refs Make it more consistent, we want the inserted ref to be compared against what's already in there. This will make the order go from lowest seq -> highest seq, which will make us more likely to make forward progress if there's a seqlock currently held. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/delayed-ref.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 69fe2d75dd91d0124ad2ab6e9fef07633bd730e0 Author: Josef Bacik Date: Thu Oct 19 14:15:57 2017 -0400 btrfs: make the delalloc block rsv per inode The way we handle delalloc metadata reservations has gotten progressively more complicated over the years. There is so much cruft and weirdness around keeping the reserved count and outstanding counters consistent and handling the error cases that it's impossible to understand. Fix this by making the delalloc block rsv per-inode. This way we can calculate the actual size of the outstanding metadata reservations every time we make a change, and then reserve the delta based on that amount. This greatly simplifies the code everywhere, and makes the error handling in btrfs_delalloc_reserve_metadata far less terrifying. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 26 ++-- fs/btrfs/ctree.h | 5 +- fs/btrfs/delayed-inode.c | 46 +------ fs/btrfs/disk-io.c | 18 ++- fs/btrfs/extent-tree.c | 320 ++++++++++++++++------------------------------- fs/btrfs/inode.c | 18 +-- 6 files changed, 141 insertions(+), 292 deletions(-) commit dd48d4072e0cdac51edcbff66342fe2f21b5b588 Author: Josef Bacik Date: Thu Oct 19 14:15:56 2017 -0400 btrfs: add tracepoints for outstanding extents mods This is handy for tracing problems with modifying the outstanding extents counters. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 2 ++ include/trace/events/btrfs.h | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) commit 8b62f87bad9cf06e536799bf8cb942ab95f6bfa4 Author: Josef Bacik Date: Thu Oct 19 14:15:55 2017 -0400 Btrfs: rework outstanding_extents Right now we do a lot of weird hoops around outstanding_extents in order to keep the extent count consistent. This is because we logically transfer the outstanding_extent count from the initial reservation through the set_delalloc_bits. This makes it pretty difficult to get a handle on how and when we need to mess with outstanding_extents. Fix this by revamping the rules of how we deal with outstanding_extents. Now instead everybody that is holding on to a delalloc extent is required to increase the outstanding extents count for itself. This means we'll have something like this btrfs_delalloc_reserve_metadata - outstanding_extents = 1 btrfs_set_extent_delalloc - outstanding_extents = 2 btrfs_release_delalloc_extents - outstanding_extents = 1 for an initial file write. Now take the append write where we extend an existing delalloc range but still under the maximum extent size btrfs_delalloc_reserve_metadata - outstanding_extents = 2 btrfs_set_extent_delalloc btrfs_set_bit_hook - outstanding_extents = 3 btrfs_merge_extent_hook - outstanding_extents = 2 btrfs_delalloc_release_extents - outstanding_extnets = 1 In order to make the ordered extent transition we of course must now make ordered extents carry their own outstanding_extent reservation, so for cow_file_range we end up with btrfs_add_ordered_extent - outstanding_extents = 2 clear_extent_bit - outstanding_extents = 1 btrfs_remove_ordered_extent - outstanding_extents = 0 This makes all manipulations of outstanding_extents much more explicit. Every successful call to btrfs_delalloc_reserve_metadata _must_ now be combined with btrfs_release_delalloc_extents, even in the error case, as that is the only function that actually modifies the outstanding_extents counter. The drawback to this is now we are much more likely to have transient cases where outstanding_extents is much larger than it actually should be. This could happen before as we manipulated the delalloc bits, but now it happens basically at every write. This may put more pressure on the ENOSPC flushing code, but I think making this code simpler is worth the cost. I have another change coming to mitigate this side-effect somewhat. I also added trace points for the counter manipulation. These were used by a bpf script I wrote to help track down leak issues. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/btrfs_inode.h | 17 ++++++ fs/btrfs/ctree.h | 2 + fs/btrfs/extent-tree.c | 139 ++++++++++++++++++++++++++++--------------- fs/btrfs/file.c | 22 +++---- fs/btrfs/inode-map.c | 3 +- fs/btrfs/inode.c | 114 +++++++++++------------------------ fs/btrfs/ioctl.c | 2 + fs/btrfs/ordered-data.c | 21 ++++++- fs/btrfs/relocation.c | 3 + fs/btrfs/tests/inode-tests.c | 18 ++---- 10 files changed, 185 insertions(+), 156 deletions(-) commit b115e3bc81aeb624fe7c4eccecbd094601ebde84 Author: Zygo Blaxell Date: Fri Sep 22 13:58:47 2017 -0400 btrfs: increase output size for LOGICAL_INO_V2 ioctl Build-server workloads have hundreds of references per file after dedup. Multiply by a few snapshots and we quickly exhaust the limit of 2730 references per extent that can fit into a 64K buffer. Raise the limit to 16M to be consistent with other btrfs ioctls (e.g. TREE_SEARCH_V2, FILE_EXTENT_SAME). To minimize surprising userspace behavior, apply this change only to the LOGICAL_INO_V2 ioctl. Signed-off-by: Zygo Blaxell Reviewed-by: Hans van Kranenburg Tested-by: Hans van Kranenburg Signed-off-by: David Sterba fs/btrfs/ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d24a67b2d997c860a42516076f3315c2ad2d2884 Author: Zygo Blaxell Date: Fri Sep 22 13:58:46 2017 -0400 btrfs: add a flags argument to LOGICAL_INO and call it LOGICAL_INO_V2 Now that check_extent_in_eb()'s extent offset filter can be turned off, we need a way to do it from userspace. Add a 'flags' field to the btrfs_logical_ino_args structure to disable extent offset filtering, taking the place of one of the existing reserved[] fields. Previous versions of LOGICAL_INO neglected to check whether any of the reserved fields have non-zero values. Assigning meaning to those fields now may change the behavior of existing programs that left these fields uninitialized. The lack of a zero check also means that new programs have no way to know whether the kernel is honoring the flags field. To avoid these problems, define a new ioctl LOGICAL_INO_V2. We can use the same argument layout as LOGICAL_INO, but shorten the reserved[] array by one element and turn it into the 'flags' field. The V2 ioctl explicitly checks that reserved fields and unsupported flag bits are zero so that userspace can negotiate future feature bits as they are defined. Since the memory layouts of the two ioctls' arguments are compatible, there is no need for a separate function for logical_to_ino_v2 (contrast with tree_search_v2 vs tree_search where the layout and code are quite different). A version parameter and an 'if' statement will suffice. Now that we have a flags field in logical_ino_args, add a flag BTRFS_LOGICAL_INO_ARGS_IGNORE_OFFSET to get the behavior we want, and pass it down the stack to iterate_inodes_from_logical. Motivation and background, copied from the patchset cover letter: Suppose we have a file with one extent: root@tester:~# zcat /usr/share/doc/cpio/changelog.gz > /test/a root@tester:~# sync Split the extent by overwriting it in the middle: root@tester:~# cat /dev/urandom | dd bs=4k seek=2 skip=2 count=1 conv=notrunc of=/test/a We should now have 3 extent refs to 2 extents, with one block unreachable. The extent tree looks like: root@tester:~# btrfs-debug-tree /dev/vdc -t 2 [...] item 9 key (1103101952 EXTENT_ITEM 73728) itemoff 15942 itemsize 53 extent refs 2 gen 29 flags DATA extent data backref root 5 objectid 261 offset 0 count 2 [...] item 11 key (1103175680 EXTENT_ITEM 4096) itemoff 15865 itemsize 53 extent refs 1 gen 30 flags DATA extent data backref root 5 objectid 261 offset 8192 count 1 [...] and the ref tree looks like: root@tester:~# btrfs-debug-tree /dev/vdc -t 5 [...] item 6 key (261 EXTENT_DATA 0) itemoff 15825 itemsize 53 extent data disk byte 1103101952 nr 73728 extent data offset 0 nr 8192 ram 73728 extent compression(none) item 7 key (261 EXTENT_DATA 8192) itemoff 15772 itemsize 53 extent data disk byte 1103175680 nr 4096 extent data offset 0 nr 4096 ram 4096 extent compression(none) item 8 key (261 EXTENT_DATA 12288) itemoff 15719 itemsize 53 extent data disk byte 1103101952 nr 73728 extent data offset 12288 nr 61440 ram 73728 extent compression(none) [...] There are two references to the same extent with different, non-overlapping byte offsets: [------------------72K extent at 1103101952----------------------] [--8K----------------|--4K unreachable----|--60K-----------------] ^ ^ | | [--8K ref offset 0--][--4K ref offset 0--][--60K ref offset 12K--] | v [-----4K extent-----] at 1103175680 We want to find all of the references to extent bytenr 1103101952. Without the patch (and without running btrfs-debug-tree), we have to do it with 18 LOGICAL_INO calls: root@tester:~# btrfs ins log 1103101952 -P /test/ Using LOGICAL_INO inode 261 offset 0 root 5 root@tester:~# for x in $(seq 0 17); do btrfs ins log $((1103101952 + x * 4096)) -P /test/; done 2>&1 | grep inode inode 261 offset 0 root 5 inode 261 offset 4096 root 5 <- same extent ref as offset 0 (offset 8192 returns empty set, not reachable) inode 261 offset 12288 root 5 inode 261 offset 16384 root 5 \ inode 261 offset 20480 root 5 | inode 261 offset 24576 root 5 | inode 261 offset 28672 root 5 | inode 261 offset 32768 root 5 | inode 261 offset 36864 root 5 \ inode 261 offset 40960 root 5 > all the same extent ref as offset 12288. inode 261 offset 45056 root 5 / More processing required in userspace inode 261 offset 49152 root 5 | to figure out these are all duplicates. inode 261 offset 53248 root 5 | inode 261 offset 57344 root 5 | inode 261 offset 61440 root 5 | inode 261 offset 65536 root 5 | inode 261 offset 69632 root 5 / In the worst case the extents are 128MB long, and we have to do 32768 iterations of the loop to find one 4K extent ref. With the patch, we just use one call to map all refs to the extent at once: root@tester:~# btrfs ins log 1103101952 -P /test/ Using LOGICAL_INO_V2 inode 261 offset 0 root 5 inode 261 offset 12288 root 5 The TREE_SEARCH ioctl allows userspace to retrieve the offset and extent bytenr fields easily once the root, inode and offset are known. This is sufficient information to build a complete map of the extent and all of its references. Userspace can use this information to make better choices to dedup or defrag. Signed-off-by: Zygo Blaxell Reviewed-by: Hans van Kranenburg Tested-by: Hans van Kranenburg [ copy background and motivation from cover letter ] Signed-off-by: David Sterba fs/btrfs/ioctl.c | 26 +++++++++++++++++++++++--- include/uapi/linux/btrfs.h | 8 +++++++- 2 files changed, 30 insertions(+), 4 deletions(-) commit c995ab3cda3f4178c1f1a47926bea5f8372880cb Author: Zygo Blaxell Date: Fri Sep 22 13:58:45 2017 -0400 btrfs: add a flag to iterate_inodes_from_logical to find all extent refs for uncompressed extents The LOGICAL_INO ioctl provides a backward mapping from extent bytenr and offset (encoded as a single logical address) to a list of extent refs. LOGICAL_INO complements TREE_SEARCH, which provides the forward mapping (extent ref -> extent bytenr and offset, or logical address). These are useful capabilities for programs that manipulate extents and extent references from userspace (e.g. dedup and defrag utilities). When the extents are uncompressed (and not encrypted and not other), check_extent_in_eb performs filtering of the extent refs to remove any extent refs which do not contain the same extent offset as the 'logical' parameter's extent offset. This prevents LOGICAL_INO from returning references to more than a single block. To find the set of extent references to an uncompressed extent from [a, b), userspace has to run a loop like this pseudocode: for (i = a; i < b; ++i) extent_ref_set += LOGICAL_INO(i); At each iteration of the loop (up to 32768 iterations for a 128M extent), data we are interested in is collected in the kernel, then deleted by the filter in check_extent_in_eb. When the extents are compressed (or encrypted or other), the 'logical' parameter must be an extent bytenr (the 'a' parameter in the loop). No filtering by extent offset is done (or possible?) so the result is the complete set of extent refs for the entire extent. This removes the need for the loop, since we get all the extent refs in one call. Add an 'ignore_offset' argument to iterate_inodes_from_logical, [...several levels of function call graph...], and check_extent_in_eb, so that we can disable the extent offset filtering for uncompressed extents. This flag can be set by an improved version of the LOGICAL_INO ioctl to get either behavior as desired. There is no functional change in this patch. The new flag is always false. Signed-off-by: Zygo Blaxell Reviewed-by: David Sterba [ minor coding style fixes ] Signed-off-by: David Sterba fs/btrfs/backref.c | 63 ++++++++++++++++++++++++++----------------- fs/btrfs/backref.h | 8 +++--- fs/btrfs/inode.c | 2 +- fs/btrfs/ioctl.c | 2 +- fs/btrfs/qgroup.c | 8 +++--- fs/btrfs/scrub.c | 6 ++--- fs/btrfs/send.c | 2 +- fs/btrfs/tests/qgroup-tests.c | 30 ++++++++++++++------- 8 files changed, 73 insertions(+), 48 deletions(-) commit eb7b9d6a467409cc0b6c369b0a72489bf3be6801 Author: Nikolay Borisov Date: Mon Oct 16 16:29:23 2017 +0300 btrfs: send: remove unused code This code was first introduced in 31db9f7c23fb ("Btrfs: introduce BTRFS_IOC_SEND for btrfs send/receive") and it was not functional, then it got slightly refactored in e938c8ad543c ("Btrfs: code cleanups for send/receive"), alas it was still dead. So let's remove it for good! Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/send.c | 6 ------ 1 file changed, 6 deletions(-) commit 6dd38f81f9c90fb5eec358d46f393f4366c9de50 Author: Anand Jain Date: Tue Oct 17 06:53:50 2017 +0800 btrfs: remove BUG_ON in btrfs_rm_dev_replace_free_srcdev() That was only an extra check to tackle a few bugs around this area, now its safe to remove it. Replace it by an ASSERT. Signed-off-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/volumes.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit fa4d885a482ef52ad3efa12a5799a3f6408b0718 Author: Adam Borowski Date: Fri Sep 15 17:36:58 2017 +0200 btrfs: allow setting zlib compression level via :9 This is bikeshedding, but it seems people are drastically more likely to understand "zlib:9" as compression level rather than an algorithm version compared to "zlib9". Based on feedback on the mailinglist, the ":9" will be the only accepted syntax. The level must be a single digit. Unrecognized format will result to the default, for forward compatibility in a similar way the compression algorithm specifier was relaxed in commit a7164fa4e055daf6368c ("btrfs: prepare for extensions in compression options"). Signed-off-by: Adam Borowski Reviewed-by: David Sterba [ tighten the accepted format ] Signed-off-by: David Sterba fs/btrfs/compression.c | 5 +++-- fs/btrfs/super.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit f51d2b59120ff364a5e612a594ed358767e1cd09 Author: David Sterba Date: Fri Sep 15 17:36:57 2017 +0200 btrfs: allow to set compression level for zlib Preliminary support for setting compression level for zlib, the following works: $ mount -o compess=zlib # default $ mount -o compess=zlib0 # same $ mount -o compess=zlib9 # level 9, slower sync, less data $ mount -o compess=zlib1 # level 1, faster sync, more data $ mount -o remount,compress=zlib3 # level set by remount The compress-force works the same as compress'. The level is visible in the same format in /proc/mounts. Level set via file property does not work yet. Required patch: "btrfs: prepare for extensions in compression options" Signed-off-by: David Sterba fs/btrfs/compression.c | 20 +++++++++++++++++++- fs/btrfs/compression.h | 6 +++++- fs/btrfs/ctree.h | 1 + fs/btrfs/inode.c | 5 ++++- fs/btrfs/lzo.c | 5 +++++ fs/btrfs/super.c | 8 ++++++-- fs/btrfs/zlib.c | 15 ++++++++++++++- fs/btrfs/zstd.c | 5 +++++ 8 files changed, 59 insertions(+), 6 deletions(-) commit 5c08681b4857684795e386781696908fc8e8a5d0 Merge: 31acd18 b4d91ae Author: Doug Ledford Date: Wed Nov 1 15:25:27 2017 -0400 Merge branch 'k.o/for-rc' into k.o/for-next Pick up the missing netlink oops fix Signed-off-by: Doug Ledford commit 856ec53fcab37f52b184b0b2e3757702005455ff Author: Kees Cook Date: Thu Oct 19 17:02:56 2017 -0700 drm: gma500: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Patrik Jakobsson Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Signed-off-by: Kees Cook Acked-by: Daniel Vetter drivers/gpu/drm/gma500/psb_lid.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 7d221856add016ef6cc0f4c0cad8e5d2612feedb Author: Kees Cook Date: Sun Oct 22 17:57:22 2017 -0700 usb: usbtest: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Also adds missing call to destroy_timer_on_stack(); Cc: Greg Kroah-Hartman Cc: Felipe Balbi Cc: Alan Stern Cc: "Gustavo A. R. Silva" Cc: linux-usb@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Greg Kroah-Hartman drivers/usb/misc/usbtest.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 254db5bd075427b0f71ea112b30c924fb22bd0fd Author: Kees Cook Date: Sat Oct 21 08:37:11 2017 -0700 RAS/CEC: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Christophe JAILLET Cc: Nicolas Iooss Cc: Ingo Molnar Signed-off-by: Kees Cook Reviewed-by: Borislav Petkov drivers/ras/cec.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit f7c9564a7cfa3ff69be74bcb1867c898772748b6 Author: Kees Cook Date: Sun Oct 22 14:58:45 2017 -0700 target/iscsi: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Includes a fix for correcting an on-stack timer usage. Cc: "Nicholas A. Bellinger" Cc: Bart Van Assche Cc: Jiang Yi Cc: Varun Prakash Cc: linux-scsi@vger.kernel.org Cc: target-devel@vger.kernel.org Reviewed-and-Tested-by: Bart Van Assche Signed-off-by: Kees Cook drivers/target/iscsi/iscsi_target.c | 3 +-- drivers/target/iscsi/iscsi_target_erl0.c | 4 ++-- drivers/target/iscsi/iscsi_target_erl0.h | 2 +- drivers/target/iscsi/iscsi_target_erl1.c | 4 ++-- drivers/target/iscsi/iscsi_target_erl1.h | 2 +- drivers/target/iscsi/iscsi_target_login.c | 15 +++++++-------- drivers/target/iscsi/iscsi_target_login.h | 2 +- drivers/target/iscsi/iscsi_target_nego.c | 23 +++++++++++++++-------- drivers/target/iscsi/iscsi_target_util.c | 11 +++++------ drivers/target/iscsi/iscsi_target_util.h | 4 ++-- 10 files changed, 37 insertions(+), 33 deletions(-) commit 8a47aa9dc636db851254615ea79ba91a52cf9206 Author: Bart Van Assche Date: Tue May 23 16:48:50 2017 -0700 target/iscsi: Simplify timer manipulation code Move timer initialization from before add_timer() to the context where the containing object is initialized. Use setup_timer() and mod_timer() instead of open coding these. Use 'jiffies' instead of get_jiffies_64() when calculating expiry times because expiry times have type unsigned long, just like 'jiffies'. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Signed-off-by: Kees Cook drivers/target/iscsi/iscsi_target.c | 3 +++ drivers/target/iscsi/iscsi_target_erl0.c | 10 +++------- drivers/target/iscsi/iscsi_target_erl0.h | 1 + drivers/target/iscsi/iscsi_target_erl1.c | 8 ++------ drivers/target/iscsi/iscsi_target_erl1.h | 1 + drivers/target/iscsi/iscsi_target_login.c | 16 ++++++++++------ drivers/target/iscsi/iscsi_target_login.h | 1 + drivers/target/iscsi/iscsi_target_nego.c | 8 +++----- drivers/target/iscsi/iscsi_target_util.c | 26 ++++++++------------------ drivers/target/iscsi/iscsi_target_util.h | 2 ++ 10 files changed, 34 insertions(+), 42 deletions(-) commit d744644ad7088ec04c0e1ad7c6c1adcec849c51c Author: Kees Cook Date: Sat Oct 21 08:39:39 2017 -0700 scsi: qla4xxx: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: QLogic-Storage-Upstream@qlogic.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen Acked-by: Manish Rangankar drivers/scsi/qla4xxx/ql4_os.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 77570eedd92adfcf69fdde31183a56324f82ca5c Author: Kees Cook Date: Tue Aug 22 16:05:14 2017 -0700 scsi: sas: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This requires adding a pointer to hold the timer's target task, as there isn't a link back from slow_task. Cc: John Garry Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Jack Wang Cc: lindar_liu@usish.com Cc: Jens Axboe Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Benjamin Block Cc: Baoyou Xie Cc: Wei Yongjun Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen Acked-by: John Garry # for hisi_sas part Tested-by: John Garry # basic sanity test for hisi_sas Reviewed-by: Jack Wang drivers/scsi/hisi_sas/hisi_sas.h | 1 - drivers/scsi/hisi_sas/hisi_sas_main.c | 14 ++++++-------- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 6 +++--- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 24 +++++++++++------------- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +- drivers/scsi/libsas/sas_expander.c | 8 ++++---- drivers/scsi/libsas/sas_init.c | 3 ++- drivers/scsi/libsas/sas_scsi_host.c | 2 +- drivers/scsi/mvsas/mv_init.c | 3 +-- drivers/scsi/mvsas/mv_sas.c | 15 +++++++-------- drivers/scsi/mvsas/mv_sas.h | 1 - drivers/scsi/pm8001/pm8001_sas.c | 11 +++++------ include/scsi/libsas.h | 1 + 13 files changed, 42 insertions(+), 49 deletions(-) commit dc586a60a11d0260308db1bebe788ad8973e2729 Author: Gustavo A. R. Silva Date: Wed Nov 1 12:44:54 2017 -0500 usb: host: isp1362-hcd: fix missing break in switch Add missing break statement to prevent the code for case C_HUB_OVER_CURRENT from falling through to case C_HUB_LOCAL_POWER. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/host/isp1362-hcd.c | 1 + 1 file changed, 1 insertion(+) commit 242b56579ee853bcbdd7c7f9fcd62890103c52e8 Author: Kees Cook Date: Tue Aug 22 12:48:29 2017 -0700 scsi: pmcraid: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen drivers/scsi/pmcraid.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) commit c251a7be46b0ee64d02b321081e24ea51fae2cfe Author: Kees Cook Date: Sun Oct 22 15:30:04 2017 -0700 scsi: megaraid: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Also consolidates the timer setup functions arguments, which are all identical, and corrects on-stack timer usage. Cc: Kashyap Desai Cc: Sumit Saxena Cc: Shivasharan S Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: megaraidlinux.pdl@broadcom.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_ioctl.h | 6 +++++ drivers/scsi/megaraid/megaraid_mbox.c | 26 ++++++++++----------- drivers/scsi/megaraid/megaraid_mm.c | 27 +++++++++++----------- drivers/scsi/megaraid/megaraid_sas_base.c | 35 +++++++++++------------------ drivers/scsi/megaraid/megaraid_sas_fusion.c | 15 +++---------- 5 files changed, 47 insertions(+), 62 deletions(-) commit f22eb4d31c21ac2be001fa7bcd079e2d7d02a8f1 Author: Kees Cook Date: Wed Sep 6 20:24:26 2017 -0700 scsi: lpfc: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: James Smart Cc: Dick Kennedy Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_crtn.h | 16 ++++++++-------- drivers/scsi/lpfc/lpfc_ct.c | 4 ++-- drivers/scsi/lpfc/lpfc_els.c | 12 ++++++------ drivers/scsi/lpfc/lpfc_hbadisc.c | 7 +++---- drivers/scsi/lpfc/lpfc_init.c | 39 ++++++++++++++++----------------------- drivers/scsi/lpfc/lpfc_scsi.c | 4 ++-- drivers/scsi/lpfc/lpfc_sli.c | 8 ++++---- 7 files changed, 41 insertions(+), 49 deletions(-) commit 738c6ec546aaba5acde6a4e1d2b7f56aec249d62 Author: Kees Cook Date: Fri Aug 18 16:53:24 2017 -0700 scsi: ipr: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Brian King Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen drivers/scsi/ipr.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 9a5d04fcbabd20aa06e5624b824c86f7d260cc80 Author: Kees Cook Date: Mon Oct 9 20:54:48 2017 -0700 scsi: ibmvscsi: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "Martin K. Petersen" Cc: Tyrel Datwyler Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen Acked-by: Tyrel Datwyler drivers/scsi/ibmvscsi/ibmvfc.c | 14 ++++++-------- drivers/scsi/ibmvscsi/ibmvscsi.c | 7 +++---- 2 files changed, 9 insertions(+), 12 deletions(-) commit cd07f958e88250e39c3e8b0a93ac17165d483fd3 Author: Kees Cook Date: Mon Aug 28 10:13:50 2017 -0700 scsi: cxgbi: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Karen Xie Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen drivers/scsi/cxgbi/cxgb3i/cxgb3i.c | 8 ++++---- drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 8 ++++---- drivers/scsi/cxgbi/libcxgbi.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit fa60a31b0cf07794d643924328cd7e3a78e99aca Author: Kees Cook Date: Sun Oct 22 15:15:33 2017 -0700 scsi: csiostor: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "Martin K. Petersen" Cc: "James E.J. Bottomley" Cc: Varun Prakash Cc: Johannes Thumshirn Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen drivers/scsi/csiostor/csio_hw.c | 15 ++++++--------- drivers/scsi/csiostor/csio_mb.c | 9 +++------ drivers/scsi/csiostor/csio_mb.h | 3 ++- 3 files changed, 11 insertions(+), 16 deletions(-) commit 8c4602f3c147caaecf33adf3aaf0c5bc84c6b409 Author: Kees Cook Date: Fri Aug 18 16:26:35 2017 -0700 scsi: aic7xxx: Convert timers to use timer_setup() stat_timer only ever assigns the same function and data, so consolidate to using timer_setup(), adjust callback, drop everything else used to pass things around, and remove needless typedefs. reset_timer is unused; remove it. Cc: Hannes Reinecke Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen drivers/scsi/aic7xxx/aic79xx.h | 5 +---- drivers/scsi/aic7xxx/aic79xx_core.c | 29 ++++++++--------------------- drivers/scsi/aic7xxx/aic79xx_osm.h | 7 ------- 3 files changed, 9 insertions(+), 32 deletions(-) commit 00ed87da35e88a7a4d7f41673beab52ef828f12b Author: Kees Cook Date: Wed Nov 1 07:32:50 2017 -0700 timer: Add parenthesis around timer_setup() macro arguments In the case where expressions are passed as macro arguments, the LOCKDEP version of the timer macros need enclosing parenthesis. Reported-by: Stephen Rothwell Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20171101143250.GA65266@beast include/linux/timer.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 20a7f3ad6227d193b5cba0876cc1f07a4c5e27c9 Author: Masahiro Yamada Date: Thu Nov 2 01:01:59 2017 +0900 usb: ohci-platform: use reset array API Generic drivers like this need to control arbitrary number of reset lines. Instead of hard-coding the maximum number of resets, use the reset array API. It can manage a bunch of resets behind the scene. Signed-off-by: Masahiro Yamada Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-platform.c | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) commit 8e84f8aa5306bb360edc857b82fc5ac73916f81d Author: Masahiro Yamada Date: Thu Nov 2 01:01:58 2017 +0900 usb: ehci-platform: use reset array API Generic drivers like this need to control arbitrary number of reset lines. Instead of hard-coding the maximum number of resets, use the reset array API. It can manage a bunch of resets behind the scene. Signed-off-by: Masahiro Yamada Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-platform.c | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) commit 39c82caff8610d57ffe32157cb3130dfabe12fbe Author: Prasad Sodagudi Date: Thu Oct 26 11:37:22 2017 -0700 clockevents: Update clockevents device next_event on stop clockevent_device::next_event holds the next timer event of a clock event device. The value is updated in clockevents_program_event(), i.e. when the hardware timer is armed for the next expiry. When there are no software timers armed on a CPU, the corresponding per CPU clockevent device is brought into ONESHOT_STOPPED state, but clockevent_device::next_event is not updated, because clockevents_program_event() is not called. So the content of clockevent_device::next_event is stale, which is not an issue when real hardware is used. But the hrtimer broadcast device relies on that information and the stale value causes spurious wakeups. Update clockevent_device::next_event to KTIME_MAX when it has been brought into ONESHOT_STOPPED state to avoid spurious wakeups. This reflects the proper expiry time of the stopped timer: infinity. [ tglx: Massaged changelog ] Signed-off-by: Prasad Sodagudi Signed-off-by: Thomas Gleixner Cc: viresh.kumar@linaro.org Link: https://lkml.kernel.org/r/1509043042-32486-1-git-send-email-psodagud@codeaurora.org kernel/time/tick-oneshot.c | 1 + 1 file changed, 1 insertion(+) commit 9917fbcfa20ab987d6381fd0365665e5c1402d75 Author: Mauro Carvalho Chehab Date: Wed Nov 1 08:09:59 2017 -0400 media: camss-vfe: always initialize reg at vfe_set_xbar_cfg() if output->wm_num is bigger than 2, the value for reg is not initialized, as warned by smatch: drivers/media/platform/qcom/camss-8x16/camss-vfe.c:633 vfe_set_xbar_cfg() error: uninitialized symbol 'reg'. drivers/media/platform/qcom/camss-8x16/camss-vfe.c:637 vfe_set_xbar_cfg() error: uninitialized symbol 'reg'. That shouldn't happen in practice, so add a logic that will break the loop if i > 1, fixing the warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Todor Tomov drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 3 +++ 1 file changed, 3 insertions(+) commit 58364c505d60cd49f287dd3ee0a4a085f412d3b1 Author: Mauro Carvalho Chehab Date: Tue Oct 31 11:54:07 2017 -0400 media: atomisp: make function calls cleaner The #ifs inside the code makes confusing for reviewers and also cause problems with smatch: drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:2937:1: error: directive in argument list drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:2939:1: error: directive in argument list drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:2941:1: error: directive in argument list Signed-off-by: Mauro Carvalho Chehab Acked-by: Sakari Ailus drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4c5133f5c51647caa7715ba7025b86086a42a922 Author: Mauro Carvalho Chehab Date: Tue Oct 31 11:03:04 2017 -0400 media: atomisp: get rid of storage_class.h Don't hide function declaration on ugly macros. Signed-off-by: Mauro Carvalho Chehab Acked-by: Sakari Ailus .../base/circbuf/interface/ia_css_circbuf.h | 39 +++++++++++----------- .../base/circbuf/interface/ia_css_circbuf_desc.h | 15 ++++----- .../css_2401_csi2p_system/host/csi_rx_private.h | 18 +++++----- .../hive_isp_css_common/host/fifo_monitor.c | 8 ++--- .../css2400/hive_isp_css_common/host/gdc.c | 8 ++--- .../hive_isp_css_common/host/input_system.c | 20 +++++------ .../css2400/hive_isp_css_common/host/irq.c | 12 +++---- .../css2400/hive_isp_css_include/assert_support.h | 3 +- .../atomisp2/css2400/hive_isp_css_include/bamem.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/csi_rx.h | 5 --- .../atomisp2/css2400/hive_isp_css_include/debug.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/dma.h | 7 ++-- .../css2400/hive_isp_css_include/event_fifo.h | 7 ++-- .../css2400/hive_isp_css_include/fifo_monitor.h | 7 ++-- .../css2400/hive_isp_css_include/gdc_device.h | 7 ++-- .../css2400/hive_isp_css_include/gp_device.h | 7 ++-- .../css2400/hive_isp_css_include/gp_timer.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/gpio.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/hmem.h | 7 ++-- .../hive_isp_css_include/host/csi_rx_public.h | 18 +++++----- .../css2400/hive_isp_css_include/host/gdc_public.h | 6 ++-- .../css2400/hive_isp_css_include/host/isp_op1w.h | 9 +++-- .../css2400/hive_isp_css_include/host/isp_op2w.h | 9 +++-- .../css2400/hive_isp_css_include/host/mmu_public.h | 8 ++--- .../hive_isp_css_include/host/ref_vector_func.h | 9 +++-- .../css2400/hive_isp_css_include/ibuf_ctrl.h | 7 ++-- .../css2400/hive_isp_css_include/input_formatter.h | 7 ++-- .../css2400/hive_isp_css_include/input_system.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/irq.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/isp.h | 7 ++-- .../css2400/hive_isp_css_include/isys_dma.h | 7 ++-- .../css2400/hive_isp_css_include/isys_irq.h | 9 +++-- .../hive_isp_css_include/isys_stream2mmio.h | 7 ++-- .../css2400/hive_isp_css_include/math_support.h | 25 +++++++------- .../css2400/hive_isp_css_include/mmu_device.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/mpmath.h | 9 +++-- .../atomisp2/css2400/hive_isp_css_include/osys.h | 7 ++-- .../css2400/hive_isp_css_include/pixelgen.h | 7 ++-- .../hive_isp_css_include/platform_support.h | 1 - .../css2400/hive_isp_css_include/print_support.h | 3 +- .../atomisp2/css2400/hive_isp_css_include/queue.h | 7 ++-- .../css2400/hive_isp_css_include/resource.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/socket.h | 7 ++-- .../pci/atomisp2/css2400/hive_isp_css_include/sp.h | 7 ++-- .../css2400/hive_isp_css_include/storage_class.h | 34 ------------------- .../css2400/hive_isp_css_include/stream_buffer.h | 7 ++-- .../css2400/hive_isp_css_include/string_support.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/tag.h | 7 ++-- .../css2400/hive_isp_css_include/timed_ctrl.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/vamem.h | 7 ++-- .../css2400/hive_isp_css_include/vector_func.h | 7 ++-- .../css2400/hive_isp_css_include/vector_ops.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/vmem.h | 7 ++-- .../atomisp2/css2400/hive_isp_css_include/xmem.h | 7 ++-- .../isp/kernels/s3a/s3a_1.0/ia_css_s3a.host.c | 2 +- .../pci/atomisp2/css2400/runtime/bufq/src/bufq.c | 2 +- .../css2400/runtime/debug/interface/ia_css_debug.h | 2 +- .../css2400/runtime/inputfifo/src/inputfifo.c | 28 ++++++++-------- .../css2400/runtime/rmgr/interface/ia_css_rmgr.h | 7 ++-- .../atomisp/pci/atomisp2/css2400/sh_css_internal.h | 4 +-- 60 files changed, 230 insertions(+), 314 deletions(-) commit 3708713fbf9b31f2241dca0519d80ebc247d272c Author: Mauro Carvalho Chehab Date: Tue Oct 31 10:53:51 2017 -0400 media: atomisp: get rid of wrong stddef.h include The places at atomisp.h that use stddef.h are wrong: the types it needs are actually defined at linux/types.h. Also, it causes lots of smatch warnings due to the redefinition of ofsetof() macro: /opt/gcc-7.1.0/x86/lib/gcc/x86_64-pc-linux-gnu/7.1.0/include/stddef.h:417:9: warning: preprocessor token offsetof redefined ./include/linux/stddef.h:16:9: this was the original definition Signed-off-by: Mauro Carvalho Chehab Acked-by: Sakari Ailus .../css2400/hive_isp_css_common/host/dma.c | 2 +- .../hive_isp_css_include/host/hmem_public.h | 4 +-- .../css2400/hive_isp_css_include/type_support.h | 42 ---------------------- 3 files changed, 3 insertions(+), 45 deletions(-) commit fb5b78a5f660c8537f4e85ae1a613d37f1384bcd Author: Mauro Carvalho Chehab Date: Tue Oct 31 10:29:06 2017 -0400 media: atomisp: fix other inconsistent identing As reported by smatch: drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c:607 pipeline_stage_create() warn: inconsistent indenting drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:255 ov2680_write_reg_array() warn: inconsistent indenting drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:401 __ov2680_set_exposure() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:4269 sh_css_params_write_to_ddr_internal() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c:1008 atomisp_register_entities() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c:1709 ia_css_binary_find() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab Acked-by: Sakari Ailus drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 8 ++-- .../media/atomisp/i2c/ov5693/atomisp-ov5693.c | 4 +- .../media/atomisp/pci/atomisp2/atomisp_v4l2.c | 2 +- .../atomisp2/css2400/runtime/binary/src/binary.c | 12 ++--- .../css2400/runtime/pipeline/src/pipeline.c | 2 +- .../atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c | 2 +- .../atomisp/pci/atomisp2/css2400/sh_css_params.c | 54 +++++++++++----------- 7 files changed, 43 insertions(+), 41 deletions(-) commit 15b1f47df08800a082b82c90af54ca8352adf8d1 Author: Mauro Carvalho Chehab Date: Tue Oct 31 09:17:28 2017 -0400 media: atomisp: fix switch coding style at input_system.c Fix a switch at input_system.c that were causing smatch warnings: drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:610 rx_channel_get_state() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:616 rx_channel_get_state() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:622 rx_channel_get_state() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:610 rx_channel_get_state() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:616 rx_channel_get_state() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:622 rx_channel_get_state() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab Acked-by: Sakari Ailus .../hive_isp_css_common/host/input_system.c | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) commit b5eb7ac16ee5f00a338f59fc0cb647302db5234c Author: Mauro Carvalho Chehab Date: Tue Oct 31 09:48:43 2017 -0400 media: atomisp: fix spatch warnings at sh_css.c drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:5801:1: error: directive in argument list drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:5803:1: error: directive in argument list drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:3795 create_host_acc_pipeline() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:4343 ia_css_pipe_enqueue_buffer() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:6029 sh_css_pipe_configure_viewfinder() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:8693 ia_css_stream_capture() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:9781 ia_css_stream_create() warn: if statement not indented drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:9988 ia_css_stream_load() warn: inconsistent indenting drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:10525 ia_css_update_continuous_frames() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab Acked-by: Sakari Ailus .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 91 +++++++++++----------- 1 file changed, 46 insertions(+), 45 deletions(-) commit 130b31eccf3365bd5a2b8c49906dfbdfeb1b424f Author: Mauro Carvalho Chehab Date: Tue Oct 31 09:07:18 2017 -0400 media: atomisp: fix ident for assert/return On lots of places, assert/return are starting at the first column, causing indentation issues, as complained by spatch: drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/irq_private.h:32 irq_reg_store() warn: inconsistent indenting Used this small script to fix such occurrences: for i in $(git grep -l -E "^(assert|return)" drivers/staging/media/); do perl -ne 's/^(assert|return)\b/\t$1/; print $_' <$i >a && mv a $i; done Signed-off-by: Mauro Carvalho Chehab Acked-by: Sakari Ailus .../pci/atomisp2/css2400/camera/util/src/util.c | 2 +- .../hive_isp_css_common/host/event_fifo_private.h | 2 +- .../host/fifo_monitor_private.h | 28 +++++----- .../css2400/hive_isp_css_common/host/gdc.c | 8 +-- .../css2400/hive_isp_css_common/host/gp_device.c | 2 +- .../hive_isp_css_common/host/gp_device_private.h | 16 +++--- .../hive_isp_css_common/host/gpio_private.h | 4 +- .../hive_isp_css_common/host/hmem_private.h | 4 +- .../host/input_formatter_private.h | 16 +++--- .../hive_isp_css_common/host/input_system.c | 28 +++++----- .../host/input_system_private.h | 64 +++++++++++----------- .../css2400/hive_isp_css_common/host/irq.c | 30 +++++----- .../css2400/hive_isp_css_common/host/irq_private.h | 12 ++-- .../css2400/hive_isp_css_common/host/isp.c | 4 +- .../css2400/hive_isp_css_common/host/mmu.c | 6 +- .../css2400/hive_isp_css_common/host/mmu_private.h | 12 ++-- .../css2400/hive_isp_css_common/host/sp_private.h | 60 ++++++++++---------- .../atomisp/pci/atomisp2/css2400/sh_css_hrt.c | 2 +- 18 files changed, 150 insertions(+), 150 deletions(-) commit e2cec86528becf143341e2c5c59921bd6cfa1f45 Author: Mauro Carvalho Chehab Date: Wed Nov 1 09:12:13 2017 -0400 media: v4l2-fwnode: use a typedef for a function callback That allows having a kernel-doc markup for the function prototype. It also prevents the need of describing the return values twice. Signed-off-by: Mauro Carvalho Chehab Acked-by: Sakari Ailus include/media/v4l2-fwnode.h | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) commit 2bb80de74d76095c4ef5e1ad9d5223ab990534d8 Author: Chris Mayo Date: Tue Oct 17 17:54:52 2017 +0100 usb: Kconfig: clarify use of USB_PCI Make the intended use of this option easier to grasp. Signed-off-by: Chris Mayo Signed-off-by: Greg Kroah-Hartman drivers/usb/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 69a0c69aab9622186e7b93f1b900a8e17effbcd9 Author: Serge Semin Date: Sun Oct 22 23:38:12 2017 +0300 usb: usb251xb: Use GPIO descriptor consumer interface The driver used to be developed with legacy GPIO API support. It's better to use descriptor-based interface for several reasons. First of all the legacy API doesn't support the ACTIVE_LOW/HIGH flag of dts nodes, which is essential since different hardware may have different GPIOs connectivity including the logical value inversion. Secondly, by requesting the reset GPIO descriptor the driver prevent the other applications from changing its value. And last but not least the legacy GPIO interface should be avoided in the new code due to it obsolescence. Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usb251xb.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) commit 4ed466ae69692c851fcd4ea7f02b696df7804712 Author: Serge Semin Date: Sun Oct 22 23:38:11 2017 +0300 usb: usb251xb: Add max power/current dts property support This parameters may be varied in accordance with hardware specifics. So lets add the corresponding settings to the usb251xb driver dts specification. Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usb251xb.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit 287c2bb6e1b5b1299da59537fe58515001286c85 Author: Serge Semin Date: Sun Oct 22 23:38:10 2017 +0300 usb: usb251xb: Fix property_u32 NULL pointer dereference The methods like of_property_read_u32 utilizing the specified pointer permit only the pointer to a preallocated u32 storage as the third argument. As a result the driver crashes on NULL pointer dereference in case if "oc-delay-us" or "power-on-time-ms" declared in dts file. Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usb251xb.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 2818e13ae174bf6a607db3e3fc405bbf5f66b1ce Author: Serge Semin Date: Sun Oct 22 23:38:09 2017 +0300 usb: usb251xb: Add USB2517 LED settings USB2517 supports two LED modes: USB mode and speed (default) indication mode. The last one can be switched on by corresponding dts property. Since USB251xb hubs doesn't support LEDs settings, we need to ignore this setting. Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usb251xb.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit dd99d106de255eb48ad7fce8a44afe3ee1526cef Author: Serge Semin Date: Sun Oct 22 23:38:08 2017 +0300 usb: usb251xb: Add battery enable setting flag Battery charging settings are supported by USB251xb hubs only. USB2517i isn't one of them. So we need to reflect it within the device-specific data structure. The driver doesn't support dts property changing this setting, but instead defaults it with zero. So the flag isn't used anywhere in the driver, but still can be helpful in future, when necessity of the corresponding dts setting arises. Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usb251xb.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit ccdddc0343b8a1955ca9217e02d693546f792392 Author: Serge Semin Date: Sun Oct 22 23:38:07 2017 +0300 usb: usb251xb: Add 5,6,7 ports boost settings USB electrical signaling drive strength boost bit is also supported by USB2517 hub. Since it got three addition ports, the designers needed to add one more register for initialization. It turned out to be formerly reserved 0xF7. As before we just initialize it with default zeros. Signed-off-by: Serge Semin Acked-by: Richard Leitner Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usb251xb.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit db234b9a1b571a5f57917a3a0aeb7d53d9e1aa75 Author: Serge Semin Date: Sun Oct 22 23:38:06 2017 +0300 usb: usb251xb: Add 5,6,7 ports mapping def setting USB2517 got three additionl downstream ports, which can as well be mapped to another logical ports. USB251xb driver currently doesn't fully support such setting configuration from dts file. This patch doesn't change this, but adds usb2517 spcific ports default liner mapping. Signed-off-by: Serge Semin Acked-by: Richard Leitner Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usb251xb.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 384811286f2db6845758eb5789b0dec015d40719 Author: Serge Semin Date: Sun Oct 22 23:38:05 2017 +0300 usb: usb251xb: Add USB251x specific port count setting USB251xb as well as USB2517 datasheet states, that all these hubs differ by number of ports declared as the last digit in the model name. So USB2512 got two ports, USB2513 - three, and so on. Such setting must be reflected in the device specific data structure and corresponding dts property should be checked whether it doesn't get out of available ports. Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usb251xb.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit 7fcf55847178c644f3bbe127b72a0c6dc378419a Author: Serge Semin Date: Sun Oct 22 23:38:04 2017 +0300 usb: usb251xb: Add USB2517i specific struct and IDs There are USB2517 and USB2517i hubs, which have almost the same registers space as already supported USB251xBi series. The difference it in DIDs and in a few functions. This patch adds the USB2517/i data structures to the driver, so it would have different setting depending on the device discovered on i2c-bus. Signed-off-by: Serge Semin Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/Kconfig | 4 ++-- drivers/usb/misc/usb251xb.c | 23 +++++++++++++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) commit a8a5267756c32308681a1c9a42bd8079a76ff4a4 Author: Serge Semin Date: Sun Oct 22 23:38:03 2017 +0300 usb: usb251xb: Update usb251xb bindings Since hub usb2517 is going to be supported by the usb251xb driver, the bindings need to be properly updated. Particularly: - add "microchip,usb2517" and "microchip,usb2517i" compatible strings. - add "boolean" description to all the properties, which really accept a boolean value including a new one "led-{usb,speed}-mode". - move reset-gpios property to the optional section. It isn't defined as required in the code and shouldn't be required at all, since hardware may handle reset pins by itself. - add new led-{usb,speed}-mode mode property. USB2517 device supports two LED modes: USB mode and speed (default) indication mode. The last one can be switched on by this property. - add {bp,sp}-max-{total,removable}-current-microamp property measured in microamp. It hasn't been defined as property before. Since the limitation specified by these parameters is hardware specific it needs to be defined in dts. Signed-off-by: Serge Semin Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/usb251xb.txt | 46 +++++++++++++++------- 1 file changed, 32 insertions(+), 14 deletions(-) commit 9b796ffcd16dfaf820ecc6a9dc287e6d758a556e Author: Jules Maselbas Date: Tue Oct 31 11:32:57 2017 +0100 dt-bindings: usb: max3421: Interrupt-parent is optional Documentation modification, now interrupt-parent is an optional property. Also fix few typos. Signed-off-by: Jules Maselbas Reported-by: Sergei Shtylyov Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/maxim,max3421.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 892f6ebc53ac1a12a26c21eb26d18064461a7007 Author: Jules Maselbas Date: Tue Oct 31 11:40:33 2017 +0100 usb: host: max3421-hcd: Remove pdata test in max3421_hub_control() We do not have to test if platform_data pointer is null in max3421_hub_control(), as the driver probe will fail if no platform_data is found. Fixes: 721fdc83b31b ("usb: max3421: Add devicetree support") Signed-off-by: Jules Maselbas Reported-by: Julia Lawall Reported-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/usb/host/max3421-hcd.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 4756f35fdf1403f7f7afaed67a16b6c4a702b903 Author: Alex Elder Date: Tue Oct 31 08:11:31 2017 -0500 usb: phy: remove phy-qcom-8x16-usb.c No Qualcomm SoC requires the "phy-qcom-8x16-usb.c" USB phy driver support any more, so remove the code. Suggested-by: Stephen Boyd Signed-off-by: Alex Elder Acked-by: Bjorn Andersson Acked-by: Andy Gross Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/Kconfig | 14 -- drivers/usb/phy/Makefile | 1 - drivers/usb/phy/phy-qcom-8x16-usb.c | 366 ------------------------------------ 3 files changed, 381 deletions(-) commit a170a1e9ccc549e81945818b9a403e131a2e132f Author: Alex Elder Date: Tue Oct 31 08:11:30 2017 -0500 usb: phy: remove phy-msm-usb.c No Qualcomm SoC requires the "phy-msm-usb.c" USB phy driver support any more, so remove the code. Suggested-by: Stephen Boyd Signed-off-by: Alex Elder Acked-by: Bjorn Andersson Acked-by: Andy Gross Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/Kconfig | 15 - drivers/usb/phy/Makefile | 1 - drivers/usb/phy/phy-msm-usb.c | 2086 ----------------------------------------- 3 files changed, 2102 deletions(-) commit 8b3f863033f9f8daa41e18fe7a344b4046434116 Author: Alex Elder Date: Tue Oct 31 08:11:29 2017 -0500 usb: host: remove ehci-msm.c No Qualcomm SoC requires the "ehci-msm.c" code any more. So remove it. Suggested-by: Stephen Boyd Signed-off-by: Alex Elder Acked-by: Bjorn Andersson Acked-by: Andy Gross Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/Kconfig | 12 -- drivers/usb/host/Makefile | 1 - drivers/usb/host/ehci-msm.c | 265 -------------------------------------------- 3 files changed, 278 deletions(-) commit 612a1b948c185cf24384e02c564512091633de30 Author: Colin Ian King Date: Wed Nov 1 10:01:22 2017 +0000 USB: c67x00: remove redundant pointer urbp Pointer urbp is assigned but is never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/usb/c67x00/c67x00-sched.c:975:2: warning: Value stored to 'urbp' is never read Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/usb/c67x00/c67x00-sched.c | 2 -- 1 file changed, 2 deletions(-) commit 098a006927b8843a335503aee2569c3f2b030cb6 Author: Gustavo A. R. Silva Date: Wed Oct 25 13:49:51 2017 -0500 usb: host: pci-quirks: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/host/pci-quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff504f572cf8667414a44e88c06ea0d421b42566 Author: Gustavo A. R. Silva Date: Wed Oct 25 13:49:38 2017 -0500 usb: host: xhci-hub: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 1 + 1 file changed, 1 insertion(+) commit 8787971ec7d0632abc83082a4abd3518a79eac78 Author: Gustavo A. R. Silva Date: Wed Oct 25 13:49:32 2017 -0500 usb: host: oxu210hp-hcd: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/host/oxu210hp-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ecbf2e9158586e9dde1286e6f5e03d7980d0ac3 Author: Gustavo A. R. Silva Date: Wed Oct 25 13:49:21 2017 -0500 usb: host: ehci-hcd: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5a3908e88704397e213d46b352feccef36eb92c Author: Gustavo A. R. Silva Date: Wed Oct 25 13:49:14 2017 -0500 usb: host: ohci-hcd: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1356cedd99aab15a60c4c4ade79e52c4b5200fdf Author: Gustavo A. R. Silva Date: Wed Oct 25 13:49:10 2017 -0500 usb: host: xhci-mem: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 1 + 1 file changed, 1 insertion(+) commit 7d864999814e777fe083c2fd156112ccf9058882 Author: Gustavo A. R. Silva Date: Wed Oct 25 13:49:01 2017 -0500 usb: host: xhci: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 1 + 1 file changed, 1 insertion(+) commit c3a831aedb8d985c0424b47fb2b5b7dc7d5116e4 Author: Gustavo A. R. Silva Date: Wed Oct 25 13:48:52 2017 -0500 usb: host: fotg210-hcd: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/host/fotg210-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f10f4715bd6e383ebe3f20ac060cb8beecca47dc Author: Gustavo A. R. Silva Date: Mon Oct 23 22:02:07 2017 -0500 usb: image: mdc800: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/image/mdc800.c | 1 + 1 file changed, 1 insertion(+) commit 4f4ee7d87989df17aaca80a2e2d62b15d3f3cacc Author: Gustavo A. R. Silva Date: Mon Oct 23 22:25:43 2017 -0500 usb: core: urb: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1162594 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/core/urb.c | 1 + 1 file changed, 1 insertion(+) commit 685b2df48e8f3f01b646f5951188804dbed58298 Author: Gustavo A. R. Silva Date: Tue Oct 24 11:48:19 2017 -0500 usb: storage: uas: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115016 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/uas.c | 1 + 1 file changed, 1 insertion(+) commit 3ef598377d7653aaf53af31ec392c9e3122a9f3e Author: Gustavo A. R. Silva Date: Tue Oct 24 14:47:28 2017 -0500 usb: host: isp116x-hcd: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115006 Addresses-Coverity-ID: 115007 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/host/isp116x-hcd.c | 3 +++ 1 file changed, 3 insertions(+) commit 74fef19f66c304cf73c1d399c9865e5dce84aecd Author: Kees Cook Date: Tue Oct 24 03:08:03 2017 -0700 usb: gadget: zero: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Adds a static tracking variable to match the timer global. Signed-off-by: Kees Cook Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/legacy/zero.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 8e4e276a3857461b2bb5dd596768fcbe2a469d5a Author: Kees Cook Date: Tue Oct 24 03:08:42 2017 -0700 usb: r8a66597-hcd: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This rearranges the arrays of timers to minimize the need for a pointer back to the main structure. Cc: Chris Brandt Cc: Julia Lawall Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/usb/host/r8a66597-hcd.c | 27 ++++++++++++++------------- drivers/usb/host/r8a66597.h | 11 +++++++++-- 2 files changed, 23 insertions(+), 15 deletions(-) commit 7e33da59a6a60c7ba486b01b121b683ada3a50bc Author: Kees Cook Date: Tue Oct 24 03:08:09 2017 -0700 usb: isp1760: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "Gustavo A. R. Silva" Cc: Bhumika Goyal Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/usb/isp1760/isp1760-hcd.c | 8 +++++--- drivers/usb/isp1760/isp1760-udc.c | 7 +++---- 2 files changed, 8 insertions(+), 7 deletions(-) commit 09e005c44cba626bdc2fc7867d72b8107af5a225 Author: Kees Cook Date: Tue Oct 24 03:09:05 2017 -0700 usb: usbip: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Valentina Manea Cc: Shuah Khan Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vudc_transfer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 32bf9fd50ff439184ddcf925cfb3c6bc0138f7c5 Author: Alan Stern Date: Wed Oct 25 10:40:05 2017 -0400 usb-storage: make use of srb local variable Commit 8b52291a0743 ("usb-storage: fix deadlock involving host lock and scsi_done") added a local variable to usb_stor_control_thread() in the usb-storage driver. This local variable holds the value of us->srb, for use after the host lock has been released. But as long as we have the value in a local variable, we may as well use it instead of dereferencing the us pointer all over the place. This patch makes no functional change; it just makes the code a little shorter and a little neater. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/usb.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit f93de0c27e87ad3d28ddd094a46bbf294183a71e Author: Gustavo A. R. Silva Date: Wed Oct 25 12:28:00 2017 -0500 usb: gadget: udc: dummy_hcd: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/dummy_hcd.c | 3 +++ 1 file changed, 3 insertions(+) commit 624916a95029d1aa44167cba1b4c28ef8d45740d Author: Gustavo A. R. Silva Date: Wed Oct 25 12:22:50 2017 -0500 usb: gadget: composite: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/composite.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0f8838a8a0738d74afecf6d198c083e259ee389e Author: Gustavo A. R. Silva Date: Tue Oct 24 14:52:59 2017 -0500 usb: gadget: f_phonet: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115004 Addresses-Coverity-ID: 115005 Signed-off-by: Gustavo A. R. Silva Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/function/f_phonet.c | 2 ++ 1 file changed, 2 insertions(+) commit 9c4c41bb4fd5d1365dfc94bf59400c619c23dc49 Author: Gustavo A. R. Silva Date: Fri Oct 27 16:01:13 2017 -0500 usb: typec: tps6598x: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tps6598x.c | 1 + 1 file changed, 1 insertion(+) commit b6565a07ca67f9b94fdc21ea1bc958236fcd7a71 Author: Himanshu Jha Date: Tue Oct 17 17:14:30 2017 +0530 usb: wusbcore: Use put_unaligned_le32 Use put_unaligned_le32 rather than using byte ordering function and memcpy which makes code clear. Also, add the header file where it is declared. Done using Coccinelle and semantic patch used is : @ rule1 @ identifier tmp; expression ptr,x; type T; @@ - tmp = cpu_to_le32(x); <+... when != tmp - memcpy(ptr, (T)&tmp, ...); + put_unaligned_le32(x,ptr); ...+> @ depends on rule1 @ type j; identifier tmp; @@ - j tmp; ...when != tmp Signed-off-by: Himanshu Jha Signed-off-by: Greg Kroah-Hartman drivers/usb/wusbcore/security.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 06211656233f76643e5b82c343b726457689bec1 Author: Gustavo A. R. Silva Date: Wed Oct 25 19:57:21 2017 -0500 usb: wusbcore: wa-xfer: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/wusbcore/wa-xfer.c | 1 + 1 file changed, 1 insertion(+) commit b82162bcd26770731a94a65d09e46f8355c60179 Author: Bin Liu Date: Mon Oct 30 11:29:56 2017 -0500 usb: musb: dsps: remove the duplicated timer Now struct musb has the timer (dev_timer) for glue drivers, so let's remove the duplicated timer defined in dsps glue driver, and use dev_timer defined in struct musb. Signed-off-by: Bin Liu Reviewed-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_dsps.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 05678497276e1ff9394f7f815d80b1f2d47e92f4 Author: Kees Cook Date: Tue Oct 24 03:08:35 2017 -0700 usb: musb: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Instead of a per-device static timer variable, a spare timer "dev_timer" is added to the musb structure for devices to use for their per-device timer. Cc: linux-usb@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/am35x.c | 24 +++++++++++------------- drivers/usb/musb/blackfin.c | 13 ++++++------- drivers/usb/musb/blackfin.h | 2 -- drivers/usb/musb/da8xx.c | 26 ++++++++++++-------------- drivers/usb/musb/davinci.c | 20 +++++++++----------- drivers/usb/musb/musb_core.c | 6 +++--- drivers/usb/musb/musb_core.h | 1 + drivers/usb/musb/musb_dsps.c | 7 ++++--- drivers/usb/musb/tusb6010.c | 20 +++++++++----------- 9 files changed, 55 insertions(+), 64 deletions(-) commit d2a3671ebe6479483a12f94fcca63c058d95ad64 Author: Leo Yan Date: Fri Sep 1 08:47:14 2017 +0800 clk: hi6220: mark clock cs_atb_syspll as critical Clock cs_atb_syspll is pll used for coresight trace bus; when clock cs_atb_syspll is disabled and operates its child clock node cs_atb results in system hang. So mark clock cs_atb_syspll as critical to keep it enabled. Cc: Guodong Xu Cc: Zhangfei Gao Cc: Haojian Zhuang Signed-off-by: Leo Yan Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1504226835-2115-2-git-send-email-leo.yan@linaro.org drivers/clk/hisilicon/clk-hi6220.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3639efef8fb128f99ae38bf603189639efc3850d Author: Keith Busch Date: Fri Oct 20 16:18:03 2017 -0600 nvme: Remove unused headers Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 4 ---- 1 file changed, 4 deletions(-) commit a96d4bd867129e6124e3cd1006fcbcfea3341179 Author: James Smart Date: Fri Oct 27 13:12:49 2017 -0700 nvmet: fix fatal_err_work deadlock Below is a stack trace for an issue that was reported. What's happening is that the nvmet layer had it's controller kato timeout fire, which causes it to schedule its fatal error handler via the fatal_err_work element. The error handler is invoked, which calls the transport delete_ctrl() entry point, and as the transport tears down the controller, nvmet_sq_destroy ends up doing the final put on the ctlr causing it to enter its free routine. The ctlr free routine does a cancel_work_sync() on fatal_err_work element, which then does a flush_work and wait_for_completion. But, as the wait is in the context of the work element being flushed, its in a catch-22 and the thread hangs. [ 326.903131] nvmet: ctrl 1 keep-alive timer (15 seconds) expired! [ 326.909832] nvmet: ctrl 1 fatal error occurred! [ 327.643100] lpfc 0000:04:00.0: 0:6313 NVMET Defer ctx release xri x114 flg x2 [ 494.582064] INFO: task kworker/0:2:243 blocked for more than 120 seconds. [ 494.589638] Not tainted 4.14.0-rc1.James+ #1 [ 494.594986] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 494.603718] kworker/0:2 D 0 243 2 0x80000000 [ 494.609839] Workqueue: events nvmet_fatal_error_handler [nvmet] [ 494.616447] Call Trace: [ 494.619177] __schedule+0x28d/0x890 [ 494.623070] schedule+0x36/0x80 [ 494.626571] schedule_timeout+0x1dd/0x300 [ 494.631044] ? dequeue_task_fair+0x592/0x840 [ 494.635810] ? pick_next_task_fair+0x23b/0x5c0 [ 494.640756] wait_for_completion+0x121/0x180 [ 494.645521] ? wake_up_q+0x80/0x80 [ 494.649315] flush_work+0x11d/0x1a0 [ 494.653206] ? wake_up_worker+0x30/0x30 [ 494.657484] __cancel_work_timer+0x10b/0x190 [ 494.662249] cancel_work_sync+0x10/0x20 [ 494.666525] nvmet_ctrl_put+0xa3/0x100 [nvmet] [ 494.671482] nvmet_sq_:q+0x64/0xd0 [nvmet] [ 494.676540] nvmet_fc_delete_target_queue+0x202/0x220 [nvmet_fc] [ 494.683245] nvmet_fc_delete_target_assoc+0x6d/0xc0 [nvmet_fc] [ 494.689743] nvmet_fc_delete_ctrl+0x137/0x1a0 [nvmet_fc] [ 494.695673] nvmet_fatal_error_handler+0x30/0x40 [nvmet] [ 494.701589] process_one_work+0x149/0x360 [ 494.706064] worker_thread+0x4d/0x3c0 [ 494.710148] kthread+0x109/0x140 [ 494.713751] ? rescuer_thread+0x380/0x380 [ 494.718214] ? kthread_park+0x60/0x60 Correct by having the fc transport convert to a different workq context for the actual controller teardown which may call the cancel_work_sync. Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/fc.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 2b632970da4f288e6dbdc826c34fbf74f40ec94c Author: James Smart Date: Wed Oct 25 16:43:17 2017 -0700 nvme-fc: add dev_loss_tmo timeout and remoteport resume support When a remoteport is unregistered (connectivity lost), the following actions are taken: - the remoteport is marked DELETED - the time when dev_loss_tmo would expire is set in the remoteport - all controllers on the remoteport are reset. After a controller resets, it will stall in a RECONNECTING state waiting for one of the following: - the controller will continue to attempt reconnect per max_retries and reconnect_delay. As no remoteport connectivity, the reconnect attempt will immediately fail. If max reconnects has not been reached, a new reconnect_delay timer will be schedule. If the current time plus another reconnect_delay exceeds when dev_loss_tmo expires on the remote port, then the reconnect_delay will be shortend to schedule no later than when dev_loss_tmo expires. If max reconnect attempts are reached (e.g. ctrl_loss_tmo reached) or dev_loss_tmo ix exceeded without connectivity, the controller is deleted. - the remoteport is re-registered prior to dev_loss_tmo expiring. The resume of the remoteport will immediately attempt to reconnect each of its suspended controllers. Signed-off-by: James Smart Reviewed-by: Hannes Reinecke [hch: updated to use nvme_delete_ctrl] Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 278 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 239 insertions(+), 39 deletions(-) commit 3cec7f9de448131778a1428100621fd371db75f4 Author: James Smart Date: Wed Oct 25 16:43:13 2017 -0700 nvme: allow controller RESETTING to RECONNECTING transition Transport will typically transition from LIVE to RESETTING when initially performing a reset or recovering from an error. Adding this transition allows a transport to transition to RECONNECTING when it checks/waits for connectivity then creates new transport connections and reinits the controller. Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 1 + 1 file changed, 1 insertion(+) commit 96e24801056467c6483f68ef71d642fb925c3100 Author: James Smart Date: Wed Oct 25 16:43:16 2017 -0700 nvme-fc: check connectivity before initiating reconnects Check remoteport connectivity before initiating reconnects Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit ac7fe82b6fcf77e757e88005c33b8147c1b7b73f Author: James Smart Date: Wed Oct 25 16:43:15 2017 -0700 nvme-fc: add a dev_loss_tmo field to the remoteport Add a dev_loss_tmo value, paralleling the SCSI FC transport, for device connectivity loss. The transport initializes the value in the nvme_fc_register_remoteport() call. If the value is not set, a default of 60s is set. Add a new routine to the api, nvme_fc_set_remoteport_devloss() routine, which allows the lldd to dynamically update the value on an existing remoteport. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 31 +++++++++++++++++++++++++++++++ include/linux/nvme-fc-driver.h | 11 +++++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) commit 44c6ec77e12c387aaba420b30a54b94966f0d9e8 Author: James Smart Date: Wed Oct 25 16:43:14 2017 -0700 nvme-fc: change ctlr state assignments during reset/reconnect Clean up some of the controller state checks and add the RESETTING->RECONNECTING state transition. Specifically: - the movement of the RESETTING state change and schedule of reset_work to core doesn't work wiht nvme_fc_error_recovery setting state to RECONNECTING before attempting to reset. Remove the state change as the reset request does it. - In the rare cases where an error occurs right as we're transitioning to LIVE, defer the controller start actions. - In error handling on teardown of associations while performing initial controller creation - avoid quiesce calls on the admin_q. They are unneeded. - Add the RESETTING->RECONNECTING transition in the reset handler. Signed-off-by: James Smart Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 4054637c9b4fbe9feef0cf6f2516ef00d8053560 Author: Sagi Grimberg Date: Sun Oct 29 14:21:02 2017 +0200 nvme: flush reset_work before safely continuing with delete operation Prevent racing controller reset and delete flows. reset_work must not ever self-requeue so flushing it suffices. Reported-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 1 + drivers/nvme/host/fc.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 12fa1304badde26c5cf495d5af48df22a31c3a52 Author: Sagi Grimberg Date: Sun Oct 29 14:21:01 2017 +0200 nvme-rdma: reuse nvme_delete_ctrl when reconnect attempts expire instead of just queueing delete work Reported-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cd53d14aaa006b5543f06fbf5e1680ce61c6c6e Author: Christoph Hellwig Date: Sun Oct 29 10:44:31 2017 +0200 nvme: consolidate common code from ->reset_work No change in behavior except that the FC code cancels two work items a little later now. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 4 ++++ drivers/nvme/host/fc.c | 13 ------------- drivers/nvme/host/rdma.c | 4 ---- drivers/nvme/target/loop.c | 4 ---- 4 files changed, 4 insertions(+), 21 deletions(-) commit e9bc25874c0bde47b65c58ccd01e339a603a7f40 Author: Christoph Hellwig Date: Sun Oct 29 10:44:30 2017 +0200 nvme-rdma: remove nvme_rdma_remove_ctrl It is only used in two places, and some of the work done by it will be taken into common code soon. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit c5017e85705bfea721732e153305d1988ff965c2 Author: Christoph Hellwig Date: Sun Oct 29 10:44:29 2017 +0200 nvme: move controller deletion to common code Move the ->delete_work and the associated helpers to common code instead of duplicating them in every driver. This also adds the missing reference get/put for the loop driver. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 38 ++++++++++++++++++++++++++++++++++- drivers/nvme/host/fabrics.c | 2 +- drivers/nvme/host/fc.c | 42 +++++---------------------------------- drivers/nvme/host/nvme.h | 5 ++++- drivers/nvme/host/rdma.c | 45 ++++++------------------------------------ drivers/nvme/target/loop.c | 48 +++++++++------------------------------------ 6 files changed, 62 insertions(+), 118 deletions(-) commit 29c09648734b94e42802f021658a47361169403b Author: Christoph Hellwig Date: Sun Oct 29 10:44:28 2017 +0200 nvme-fc: merge __nvme_fc_schedule_delete_work into __nvme_fc_del_ctrl No need to have two functions doing the same thing. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 71c691fd06cc2625966620c93ce21bdcce32ed95 Author: James Smart Date: Thu Sep 28 09:56:31 2017 -0700 nvme-fc: avoid workqueue flush stalls There's no need to wait for the full nvme_wq, which is now shared, to flush. flush only the delete_work item. Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39ae0d3e561d360e41f2a3d1c427d5d9142468da Author: Arnd Bergmann Date: Thu Aug 3 13:50:48 2017 +0200 drm/msm: use %z format modifier for printing size_t The return type of ARRAY_SIZE() is size_t, so we have to use %zu instead of %lu to avoid this warning: drivers/gpu/drm/msm/msm_gpu.c: In function 'msm_gpu_init': drivers/gpu/drm/msm/msm_gpu.c:742:31: error: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'unsigned int' [-Werror=format=] The warning it otherwise harmless as size_t is always the same size as unsigned long in all supported architectures, but gcc doesn't know that. Fixes: c2fceabca6d5 ("drm/msm: Support multiple ringbuffers") Signed-off-by: Arnd Bergmann Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7285cf3325b4a1dfb336d31eebc27dfbc30fb9aa Author: Namhyung Kim Date: Tue Oct 31 11:06:54 2017 +0900 perf srcline: Show correct function name for srcline of callchains When libbfd is not used, it doesn't show proper function name and reuse the original symbol of the sample. That's because it passes the original sym to inline_list__append(). As `addr2line -f` returns function names as well, use that to create an inline_sym and pass it to inline_list__append(). For example, following data shows that inlined entries of main have same name (main). Before: $ perf report -g srcline -q | head 45.22% inlining libm-2.26.so [.] __hypot_finite | ---__hypot_finite ??:0 | |--44.15%--hypot ??:0 | main complex:589 | main complex:597 | main complex:654 | main complex:664 | main inlining.cpp:14 After: $ perf report -g srcline -q | head 45.22% inlining libm-2.26.so [.] __hypot_finite | ---__hypot_finite | |--44.15%--hypot | std::__complex_abs complex:589 (inlined) | std::abs complex:597 (inlined) | std::_Norm_helper::_S_do_it complex:654 (inlined) | std::norm complex:664 (inlined) | main inlining.cpp:14 Signed-off-by: Namhyung Kim Reviewed-by: Jiri Olsa Reviewed-by: Milian Wolff Cc: Jin Yao Cc: Peter Zijlstra Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20171031020654.31163-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/srcline.c | 95 +++++++++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 40 deletions(-) commit b7b75a60b291cc699ca9bb2a8517a1b3b08bbeb1 Author: Namhyung Kim Date: Tue Oct 31 11:06:53 2017 +0900 perf srcline: Fix memory leak in addr2inlines() When libbfd is not used, addr2inlines() executes `addr2line -i` and process output line by line. But it resets filename to NULL in the loop so getline() allocates additional memory everytime instead of realloc. Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Jin Yao Cc: Milian Wolff Cc: Peter Zijlstra Cc: kernel-team@lge.com Link: http://lkml.kernel.org/r/20171031020654.31163-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/srcline.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 2a750166a5bee7fda186c12269e37ba52b26c017 Author: Bart Van Assche Date: Mon Oct 30 09:02:19 2017 -0700 block: Rework drivers/cdrom/Makefile Instead of referring from inside drivers/cdrom/Makefile to all the drivers that use this driver, let these drivers select the cdrom driver. This change makes the cdrom build code follow the approach that is used for most other drivers, namely refer from the higher layers to the lower layer instead of from the lower layer to the higher layers. Reviewed-by: Hannes Reinecke Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/block/Kconfig | 12 ++++++++++++ drivers/block/paride/Kconfig | 1 + drivers/cdrom/Makefile | 15 ++------------- drivers/ide/Kconfig | 1 + drivers/scsi/Kconfig | 1 + 5 files changed, 17 insertions(+), 13 deletions(-) commit 1f460b63d4b37f504d8d0affc2cd492eb005ea97 Author: Ming Lei Date: Fri Oct 27 12:43:30 2017 +0800 blk-mq: don't restart queue when .get_budget returns BLK_STS_RESOURCE SCSI restarts its queue in scsi_end_request() automatically, so we don't need to handle this case in blk-mq. Especailly any request won't be dequeued in this case, we needn't to worry about IO hang caused by restart vs. dispatch. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-sched.c | 45 ++++++++++++++++++++------------------------- block/blk-mq-sched.h | 2 +- block/blk-mq.c | 8 ++------ 3 files changed, 23 insertions(+), 32 deletions(-) commit 358a3a6bccb74da9d63a26b2dd5f09f1e9970e0b Author: Ming Lei Date: Fri Oct 27 12:43:29 2017 +0800 blk-mq: don't handle TAG_SHARED in restart Now restart is used in the following cases, and TAG_SHARED is for SCSI only. 1) .get_budget() returns BLK_STS_RESOURCE - if resource in target/host level isn't satisfied, this SCSI device will be added in shost->starved_list, and the whole queue will be rerun (via SCSI's built-in RESTART) in scsi_end_request() after any request initiated from this host/targe is completed. Forget to mention, host level resource can't be an issue for blk-mq at all. - the same is true if resource in the queue level isn't satisfied. - if there isn't outstanding request on this queue, then SCSI's RESTART can't work(blk-mq's can't work too), and the queue will be run after SCSI_QUEUE_DELAY, and finally all starved sdevs will be handled by SCSI's RESTART when this request is finished 2) scsi_dispatch_cmd() returns BLK_STS_RESOURCE - if there isn't onprogressing request on this queue, the queue will be run after SCSI_QUEUE_DELAY - otherwise, SCSI's RESTART covers the rerun. 3) blk_mq_get_driver_tag() failed - BLK_MQ_S_TAG_WAITING covers the cross-queue RESTART for driver allocation. In one word, SCSI's built-in RESTART is enough to cover the queue rerun, and we don't need to pay special attention to TAG_SHARED wrt. restart. In my test on scsi_debug(8 luns), this patch improves IOPS by 20% ~ 30% when running I/O on these 8 luns concurrently. Aslo Roman Pen reported the current RESTART is very expensive especialy when there are lots of LUNs attached in one host, such as in his test, RESTART causes half of IOPS be cut. Fixes: https://marc.info/?l=linux-kernel&m=150832216727524&w=2 Fixes: 6d8c6c0f97ad ("blk-mq: Restart a single queue if tag sets are shared") Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-sched.c | 78 +++------------------------------------------------- 1 file changed, 4 insertions(+), 74 deletions(-) commit 0df21c86bdbfd17dec9ab898312af9bfb74d5d86 Author: Ming Lei Date: Sat Oct 14 17:22:32 2017 +0800 scsi: implement .get_budget and .put_budget for blk-mq We need to tell blk-mq to reserve resources before queuing one request, so implement these two callbacks. Then blk-mq can avoid to dequeue request too early, and IO merging can be improved a lot. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe drivers/scsi/scsi_lib.c | 75 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 23 deletions(-) commit aeec77629a4ac6f8c248f3a82e80d4170a881f22 Author: Ming Lei Date: Sat Oct 14 17:22:31 2017 +0800 scsi: allow passing in null rq to scsi_prep_state_check() In the following patch, we will implement scsi_get_budget() which need to call scsi_prep_state_check() when rq isn't dequeued yet. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe drivers/scsi/scsi_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b347689ffbca745ac457ee27400ce1affd571c6f Author: Ming Lei Date: Sat Oct 14 17:22:30 2017 +0800 blk-mq-sched: improve dispatching from sw queue SCSI devices use host-wide tagset, and the shared driver tag space is often quite big. However, there is also a queue depth for each lun( .cmd_per_lun), which is often small, for example, on both lpfc and qla2xxx, .cmd_per_lun is just 3. So lots of requests may stay in sw queue, and we always flush all belonging to same hw queue and dispatch them all to driver. Unfortunately it is easy to cause queue busy because of the small .cmd_per_lun. Once these requests are flushed out, they have to stay in hctx->dispatch, and no bio merge can happen on these requests, and sequential IO performance is harmed. This patch introduces blk_mq_dequeue_from_ctx for dequeuing a request from a sw queue, so that we can dispatch them in scheduler's way. We can then avoid dequeueing too many requests from sw queue, since we don't flush ->dispatch completely. This patch improves dispatching from sw queue by using the .get_budget and .put_budget callbacks. Reviewed-by: Omar Sandoval Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-sched.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++-- block/blk-mq.c | 39 ++++++++++++++++++++++++++ block/blk-mq.h | 2 ++ include/linux/blk-mq.h | 2 ++ 4 files changed, 114 insertions(+), 3 deletions(-) commit de1482974080ec9ef414bf048b2646b246b63f6e Author: Ming Lei Date: Sat Oct 14 17:22:29 2017 +0800 blk-mq: introduce .get_budget and .put_budget in blk_mq_ops For SCSI devices, there is often a per-request-queue depth, which needs to be respected before queuing one request. Currently blk-mq always dequeues the request first, then calls .queue_rq() to dispatch the request to lld. One obvious issue with this approach is that I/O merging may not be successful, because when the per-request-queue depth can't be respected, .queue_rq() has to return BLK_STS_RESOURCE, and then this request has to stay in hctx->dispatch list. This means it never gets a chance to be merged with other IO. This patch introduces .get_budget and .put_budget callback in blk_mq_ops, then we can try to get reserved budget first before dequeuing request. If the budget for queueing I/O can't be satisfied, we don't need to dequeue request at all. Hence the request can be left in the IO scheduler queue, for more merging opportunities. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-sched.c | 55 +++++++++++++++++++++++++++++++++++++++++--------- block/blk-mq-sched.h | 2 +- block/blk-mq.c | 43 ++++++++++++++++++++++++++++++++++----- block/blk-mq.h | 20 +++++++++++++++++- include/linux/blk-mq.h | 11 ++++++++++ 5 files changed, 114 insertions(+), 17 deletions(-) commit 63ba8e31c3ac6393b07c6e18538814a730478766 Author: Ming Lei Date: Sat Oct 14 17:22:28 2017 +0800 block: kyber: check if there are requests in ctx in kyber_has_work() There may be request in sw queue, and not fetched to domain queue yet, so check it in kyber_has_work(). Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/kyber-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7930d0a00ff5dbcc80f793d1a7a6b8de4e591f1a Author: Ming Lei Date: Sat Oct 14 17:22:27 2017 +0800 sbitmap: introduce __sbitmap_for_each_set() For blk-mq, we need to be able to iterate software queues starting from any queue in a round robin fashion, so introduce this helper. Reviewed-by: Omar Sandoval Cc: Omar Sandoval Signed-off-by: Ming Lei Signed-off-by: Jens Axboe include/linux/sbitmap.h | 64 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 47 insertions(+), 17 deletions(-) commit caf8eb0d604a0eaeb8111eb4d36853a6d08eebe7 Author: Ming Lei Date: Sat Oct 14 17:22:26 2017 +0800 blk-mq-sched: move actual dispatching into one helper So that it becomes easy to support to dispatch from sw queue in the following patch. No functional change. Reviewed-by: Bart Van Assche Reviewed-by: Omar Sandoval Suggested-by: Christoph Hellwig # for simplifying dispatch logic Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-sched.c | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) commit 5e3d02bbafad38975099b5848f5ebadedcf7bb7e Author: Ming Lei Date: Sat Oct 14 17:22:25 2017 +0800 blk-mq-sched: dispatch from scheduler IFF progress is made in ->dispatch When the hw queue is busy, we shouldn't take requests from the scheduler queue any more, otherwise it is difficult to do IO merge. This patch fixes the awful IO performance on some SCSI devices(lpfc, qla2xxx, ...) when mq-deadline/kyber is used by not taking requests if hw queue is busy. Reviewed-by: Omar Sandoval Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe block/blk-mq-sched.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 22ef01a203d27fee8b7694020b7e722db7efd2a7 Author: Nicolin Chen Date: Fri Sep 15 12:10:13 2017 -0700 clk: tegra: Use readl_relaxed_poll_timeout_atomic() in tegra210_clock_init() Below is the call trace of tegra210_init_pllu() function: start_kernel() -> time_init() --> of_clk_init() ---> tegra210_clock_init() ----> tegra210_pll_init() -----> tegra210_init_pllu() Because the preemption is disabled in the start_kernel before calling time_init, tegra210_init_pllu is actually in an atomic context while it includes a readl_relaxed_poll_timeout that might sleep. So this patch just changes this readl_relaxed_poll_timeout() to its atomic version. Signed-off-by: Nicolin Chen Acked-By: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra210.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1752c9ee23fb20e5bfdbedf677e91f927f2b8d80 Author: Nicolin Chen Date: Thu Oct 12 16:09:59 2017 -0700 clk: tegra: dfll: Fix drvdata overwriting issue Both tegra124-dfll and clk-dfll are using platform_set_drvdata to set drvdata of the exact same pdev while they use different pointers for the drvdata. Once the drvdata has been overwritten by tegra124-dfll, clk-dfll will never get its td pointer as it expects. Since tegra124-dfll merely needs its soc pointer in its remove function, this patch fixes the bug by removing the overwriting in the tegra124-dfll file and letting the tegra_dfll_unregister return an soc pointer for it. Signed-off-by: Nicolin Chen Acked-By: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk-dfll.c | 10 +++++----- drivers/clk/tegra/clk-dfll.h | 2 +- drivers/clk/tegra/clk-tegra124-dfll-fcpu.c | 12 +++++------- 3 files changed, 11 insertions(+), 13 deletions(-) commit 54eff2264d3e9fd7e3987de1d7eba1d3581c631e Author: Michał Mirosław Date: Tue Sep 19 04:48:10 2017 +0200 clk: tegra: Fix cclk_lp divisor register According to comments in code and common sense, cclk_lp uses its own divisor, not cclk_g's. Fixes: b08e8c0ecc42 ("clk: tegra: add clock support for Tegra30") Signed-off-by: Michał Mirosław Acked-By: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d80a32fe98b7ce428669b774c3d10ecae3bc6e6d Author: Dmitry Osipenko Date: Wed Oct 4 02:02:41 2017 +0300 clk: tegra: Bump SCLK clock rate to 216 MHz AHB DMA is a running on 1/2 of SCLK rate, APB DMA on 1/4. Increasing SCLK rate results in an increased DMA transfer rate. Signed-off-by: Dmitry Osipenko Acked-By: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra20.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a6b184a36b8f5ff01ce93c9251996e4f96310d7 Author: Dmitry Osipenko Date: Wed Oct 4 02:02:40 2017 +0300 clk: tegra: Use common definition of APBDMA clock gate The APBDMA clock is defined in the common clock gates table that is used by Tegra30+. Tegra20 can use it too, let's remove the custom definition and use the common one. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra20.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 3ff46fd0b22abbb8d921d7e5657912bfbd41b6f0 Author: Dmitry Osipenko Date: Wed Oct 4 02:02:39 2017 +0300 clk: tegra: Correct parent of the APBDMA clock APBDMA represents a clock gate to the APB DMA controller, the actual clock source for the controller is PCLK. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra-periph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 899f8095e66c562888ff617686e46019b758611b Author: Dmitry Osipenko Date: Wed Oct 4 02:02:38 2017 +0300 clk: tegra: Add AHB DMA clock entry AHB DMA engine presents on Tegra20/30. Add missing clock entries, so that driver for the AHB DMA controller could be implemented. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding drivers/clk/tegra/clk-id.h | 1 + drivers/clk/tegra/clk-tegra-periph.c | 1 + drivers/clk/tegra/clk-tegra20.c | 1 + drivers/clk/tegra/clk-tegra30.c | 1 + 4 files changed, 4 insertions(+) commit eaf8abcfb21ecb5f6460d0505b03da4c3b7eee98 Author: Charles Keepax Date: Wed Nov 1 11:03:25 2017 +0000 ASoC: wm8741: Use snd_soc_update_bits rather than hard coding Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8741.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit 109eba2eb61ab92fc1f92e02d69ee0aa16e10c6a Author: Jon Hunter Date: Mon Oct 23 12:12:52 2017 +0100 clk: tegra: Mark APB clock as critical Currently, the APB clock is registered with the CLK_IGNORE_UNUSED flag to prevent the clock from being disabled if unused on boot. However, even if it is used, it still needs to be always kept enabled so that it doesn't get inadvertently disabled when all of its children are, and so update the flag for the APB clock to be CLK_IS_CRITICAL. Suggested-by: Peter De Schrijver Signed-off-by: Jon Hunter Acked-By: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra-super-gen4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd5f6279732e8885061d7455b9d86fdcfdf7f183 Author: zhangyi (F) Date: Wed Nov 1 18:40:45 2017 +0800 quota: fix potential infinite loop In dquot_writeback_dquots(), we write back dquot from dirty dquots list. There is a potential infinite loop if ->write_dquot() failure and forget remove dquot from the list. This patch clear dirty bit anyway to avoid it. Signed-off-by: zhangyi (F) Signed-off-by: Jan Kara fs/quota/dquot.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 2305a18ba9ffa105ad1686f40a7861718c338e3c Author: hotran Date: Tue Oct 31 13:58:07 2017 -0700 hwmon: (xgene) Minor clean up of ifdef and acpi_match_table reference This patch removes the un-necessary ifdef CONFIG_ACPI and directly uses the acpi_match_table from the driver pdev. Signed-off-by: Hoan Tran [groeck: Dropped unnecessary initialization] Signed-off-by: Guenter Roeck drivers/hwmon/xgene-hwmon.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 59c1cecce340d173234fd130c0647693a072009b Merge: 1969db4 0338b1b Author: David S. Miller Date: Wed Nov 1 22:08:48 2017 +0900 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-11-01 Here's one more bluetooth-next pull request for the 4.15 kernel. - New NFA344A device entry for btusb drvier - Fix race conditions in hci_ldisc - Fix for isochronous interface assignments in btusb driver - A few other smaller fixes & improvements Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 1969db47f8d0e800397abd4ee4e8d27d2b578587 Author: Alexei Starovoitov Date: Wed Nov 1 00:08:04 2017 -0700 bpf: fix verifier memory leaks fix verifier memory leaks Fixes: 638f5b90d460 ("bpf: reduce verifier memory consumption") Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/verifier.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit 4bfbe53f41f26de7877da4565e9a0a3a870c92f8 Merge: 1f2c897 3eb8b62 Author: David S. Miller Date: Wed Nov 1 22:06:04 2017 +0900 Merge branch 'cxgb4-add-hash-filter-support-to-tc-flower-offload' Rahul Lakkireddy says: ==================== cxgb4: add hash-filter support to tc-flower offload This series of patches add support to create hash-filters; a.k.a exact-match filters, to tc-flower offload. T6 supports creating ~500K hash-filters in hw and can theoretically be expanded up to ~1 million. Patch 1 fetches and saves the configured hw filter tuple field shifts and filter mask. Patch 2 initializes the driver to use hash-filter configuration. Patch 3 adds support to create hash filters in hw. Patch 4 adds support to delete hash filters in hw. Patch 5 adds support to retrieve filter stats for hash filters. Patch 6 converts the flower table to use rhashtable instead of static hlist. Patch 7 finally adds support to create hash filters via tc-flower offload. ==================== Signed-off-by: David S. Miller commit 3eb8b62d5a260fcd9683b0ce89beb3b28b12a304 Author: Kumar Sanghvi Date: Wed Nov 1 08:53:05 2017 +0530 cxgb4: add support to create hash-filters via tc-flower offload Determine whether the flow classifies as exact-match with respect to 4-tuple and configured tuple mask in hw. If successfully classified as exact-match, offload the flow as hash-filter in hw. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 148 +++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h | 2 + .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 16 ++- 3 files changed, 161 insertions(+), 5 deletions(-) commit 79e6d46a65abfd721de378bf496833a04ea10afe Author: Kumar Sanghvi Date: Wed Nov 1 08:53:04 2017 +0530 cxgb4: convert flower table to use rhashtable T6 supports ~500K hash filters and can theoretically climb up to ~1 million hash filters. Preallocated hash table is not efficient in terms of memory usage. So, use rhashtable instead which gives the flexibility to grow based on usage. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 4 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 +- .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 106 ++++++++++++++------- .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h | 4 +- 4 files changed, 82 insertions(+), 36 deletions(-) commit 9d922d4b016d3d7908dd70112aaf46a38313d866 Author: Kumar Sanghvi Date: Wed Nov 1 08:53:03 2017 +0530 cxgb4: add support to retrieve stats for hash filters Add support to retrieve packet-count and byte-count for hash-filters by retrieving filter-entry appropriately based on whether the request is for hash-filter or not. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 30 ++++++++++++++-------- .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 6 +++-- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 2 +- 3 files changed, 25 insertions(+), 13 deletions(-) commit 3b0b3bee56dd4e5cd1976a046f391a1435d727b2 Author: Kumar Sanghvi Date: Wed Nov 1 08:53:02 2017 +0530 cxgb4: add support to delete hash filter Use a combined ulptx work-request to send hash filter deletion request to hw. Hash filter deletion reply is processed on getting cpl_abort_rpl_rss. Release any L2T/SMT/CLIP entries on filter deletion. Also, free up the corresponding filter entry. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 159 ++++++++++++++++++++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h | 2 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 + .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 2 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c | 4 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 4 +- drivers/net/ethernet/chelsio/cxgb4/t4_tcb.h | 5 + 7 files changed, 173 insertions(+), 7 deletions(-) commit 12b276fbf6e092adca08a8125afcc4e7f530a0b6 Author: Kumar Sanghvi Date: Wed Nov 1 08:53:01 2017 +0530 cxgb4: add support to create hash filters Add support to create hash (exact-match) filters based on the value of 'hash' field in ch_filter_specification. Allocate SMT/L2T entries if DMAC-rewrite/SMAC-rewrite is requested. Allocate CLIP entry in case of IPv6 filter. Use cpl_act_open_req[6] to send hash filter create request to hw. Also, the filter tuple is calculated as part of sending this request. Hash-filter reply is processed on getting cpl_act_open_rpl. In case of success, various bits/fields in filter-tcb are set per filter requirement, such as enabling filter hitcnts, and/or various header rewrite operations, such as VLAN-rewrite, NAT or (L3/L4)-rewrite, and SMAC/DMAC-rewrite. In case of failure, clear the filter entry and release any hw resources occupied by it. The patch also moves the functions set_tcb_field, set_tcb_tflag and configure_filter_smac towards beginning of file. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 10 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 573 ++++++++++++++++++++-- drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h | 3 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 + drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 5 + drivers/net/ethernet/chelsio/cxgb4/t4_tcb.h | 17 + 6 files changed, 562 insertions(+), 50 deletions(-) commit 5c31254e35a8a5767c3b23377c34018d8bdd0567 Author: Kumar Sanghvi Date: Wed Nov 1 08:53:00 2017 +0530 cxgb4: initialize hash-filter configuration Add support for hash-filter configuration on T6. Also, do basic checks for the related initialization. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 6 ++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 22 ++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 14 ++++++++++---- drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 14 ++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 1 + 6 files changed, 54 insertions(+), 4 deletions(-) commit 0ba9a3b65c794982f4dc7fcdc8110c327359916b Author: Kumar Sanghvi Date: Wed Nov 1 08:52:59 2017 +0530 cxgb4: save additional filter tuple field shifts in tp_params Save additional filter tuple field shifts in tp_params based on configured filter tuple fields. Also, save the combined filter tuple mask based on configured filter tuple fields. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 12 ++++++++++-- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 18 ++++++++++++++++-- drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 3 +++ 3 files changed, 29 insertions(+), 4 deletions(-) commit 1f2c897cb1ceb97cd6060eac353754fe926cb3be Merge: a95157d f849772 Author: David S. Miller Date: Wed Nov 1 21:30:24 2017 +0900 Merge branch 'lan9303-Fix-STP-and-flooding-issues' Egil Hjelmeland says: ==================== net: dsa: lan9303: Fix STP and flooding issues This patch set finishes the STP support, and fixes flooding issues. Patch 1 fixes a flooding issue in the previous patch set. Patch 2 finishes STP support by adding a ALR entry. Patch 3 prevent duplicate flooding in HW and SW bridge. ==================== Signed-off-by: David S. Miller commit f849772915e5501c25f69f4815daa8cd86194634 Author: Egil Hjelmeland Date: Tue Oct 31 15:48:02 2017 +0100 net: dsa: lan9303: lan9303_rcv set skb->offload_fwd_mark The chip flood broadcast and unknown multicast frames. On receive set skb->offload_fwd_mark to prevent the SW from flooding to the same ports. One exception: Because the ALR is set up to forward STP BPDUs only to CPU, the SW bridge should flood STP BPDUs if local STP is not enabled. This is archived by not setting skb->offload_fwd_mark on STP BPDUs. Signed-off-by: Egil Hjelmeland Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/tag_lan9303.c | 2 ++ 1 file changed, 2 insertions(+) commit e9292f2c03851ef81bef38579a0ee9c42140e586 Author: Egil Hjelmeland Date: Tue Oct 31 15:48:01 2017 +0100 net: dsa: lan9303: Add STP ALR entry on port 0 STP BPDUs arriving on user ports must sent to CPU port only, for processing by the SW bridge. Add an ALR entry with STP state override to fix that. Signed-off-by: Egil Hjelmeland Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/lan9303-core.c | 2 ++ include/linux/dsa/lan9303.h | 2 ++ net/dsa/tag_lan9303.c | 1 - 3 files changed, 4 insertions(+), 1 deletion(-) commit 909fb9ae322154648d7354bcf7cdd0f705fb67f1 Author: Egil Hjelmeland Date: Tue Oct 31 15:48:00 2017 +0100 net: dsa: lan9303: Transmit using ALR when unicast lan9303_xmit_use_arl() introduced in previous patch set is wrong. The chip flood broadcast and unknown multicast frames. The effect is that broadcasts and multicasts are duplicated on egress. It is not possible to configure the chip to direct unknown multicasts to CPU port only. This means that only unicast frames can be transmitted using ALR lookup. Signed-off-by: Egil Hjelmeland Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/tag_lan9303.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a95157d72d638913422773ea6faa384ebe4d366d Author: Colin Ian King Date: Tue Oct 31 14:37:55 2017 +0000 net: thunderx: remove a couple of redundant assignments The assignment to pointer msg is redundant as it is never read, so remove msg. Also remove the first assignment to qset as this is not read before the next re-assignment of a new value to qset in the for-loop. Cleans up two clang warnings: drivers/net/ethernet/cavium/thunder/nic_main.c:589:2: warning: Value stored to 'msg' is never read drivers/net/ethernet/cavium/thunder/nic_main.c:611:2: warning: Value stored to 'qset' is never read Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic_main.c | 4 ---- 1 file changed, 4 deletions(-) commit 855a34b1b4893c7d9fd39e3f61834354f2149ba7 Author: Andy Shevchenko Date: Tue Oct 31 16:37:18 2017 +0200 MAINTAINERS: Add lib/net_utils.c to NETWORKING (general) It looks like the best place in MAINTAINERS data base to cover this orphaned module. Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 6978729fbd02ced7060f15b9f7e1ba5b39d9bbf3 Author: Edward Cree Date: Tue Oct 31 14:29:47 2017 +0000 sfc: support rx-fcs and rx-all Ethernet FCS inclusion (rx-fcs) is supported on EF10 NICs, conditional on a firmware capability bit (MC_CMD_GET_CAPABILITIES_OUT_RX_INCLUDE_FCS). To receive frames with bad FCS (rx-all) we just don't return the discard flag EFX_RX_PKT_DISCARD from efx_ef10_handle_rx_event_errors() or efx_farch_handle_rx_not_ok(). Signed-off-by: Edward Cree Signed-off-by: David S. Miller drivers/net/ethernet/sfc/ef10.c | 16 ++++++++++++---- drivers/net/ethernet/sfc/efx.c | 14 ++++++++++---- drivers/net/ethernet/sfc/farch.c | 4 ++++ drivers/net/ethernet/sfc/mcdi_port.c | 4 ++++ 4 files changed, 30 insertions(+), 8 deletions(-) commit e0337f92f6f36040ba91215bbe47203c410f472f Author: Colin Ian King Date: Tue Oct 31 14:23:24 2017 +0000 net: macb: remove redundant assignment to variable work_done Variable work_done is set to zero and this value is never read, instead it is set to another value a few statements later. Remove the redundant assignment. Cleans up clang warning: drivers/net/ethernet/cadence/macb_main.c:1221:2: warning: Value stored to 'work_done' is never read Signed-off-by: Colin Ian King Tested-by: Alexander Dahl Signed-off-by: David S. Miller drivers/net/ethernet/cadence/macb_main.c | 2 -- 1 file changed, 2 deletions(-) commit 032a480202245e384fdbcac92da720d697384d8e Author: Paolo Abeni Date: Tue Oct 31 14:32:38 2017 +0100 ipv4: fix validate_source for VRF setup David reported breakages of VRF scenarios due to the commit 6e617de84e87 ("net: avoid a full fib lookup when rp_filter is disabled."): the local addresses based test is too strict when VRFs are in place. With this change we fall-back to a full lookup when custom fib rules are in place; so that we address the VRF use case and possibly other similar issues in non trivial setups. v1 -> v2: - fix build breakage when CONFIG_IP_MULTIPLE_TABLES is not defined, reported by the kbuild test robot Reported-by: David Ahern Fixes: 6e617de84e87 ("net: avoid a full fib lookup when rp_filter is disabled.") Signed-off-by: Paolo Abeni Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv4/fib_frontend.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit dc82673f0cb5175dcec87041441cdb107932cd07 Author: Wei Yongjun Date: Tue Oct 31 13:28:16 2017 +0000 sctp: fix error return code in sctp_send_add_streams() Fix to returnerror code -ENOMEM from the sctp_make_strreset_addstrm() error handling case instead of 0. 'retval' can be overwritten to 0 after call sctp_stream_alloc_out(). Fixes: e090abd0d81c ("sctp: factor out stream->out allocation") Signed-off-by: Wei Yongjun Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/stream.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 85cf7a62924927119bce5e65b008fcb8ed455914 Author: Colin Ian King Date: Tue Oct 31 12:01:47 2017 +0000 net: hso: remove redundant unused variable dev The pointer dev is being assigned but is never used, hence it is redundant and can be removed. Cleans up clang warning: drivers/net/usb/hso.c:2280:2: warning: Value stored to 'dev' is never read Signed-off-by: Colin Ian King Reviewed-by: Johan Hovold Signed-off-by: David S. Miller drivers/net/usb/hso.c | 2 -- 1 file changed, 2 deletions(-) commit f02b2320b27c16b644691267ee3b5c110846f49e Author: Gao Feng Date: Tue Oct 31 18:25:37 2017 +0800 ppp: Destroy the mutex when cleanup The mutex_destroy only makes sense when enable DEBUG_MUTEX. For the good readbility, it's better to invoke it in exit func when the init func invokes mutex_init. Signed-off-by: Gao Feng Acked-by: Guillaume Nault Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 1 + 1 file changed, 1 insertion(+) commit 687d4f2bea322077cc70be0555ad2a1cd48b812a Author: Colin Ian King Date: Tue Oct 31 10:08:23 2017 +0000 net: ethernet: slicoss: remove redundant initialization of idx Variable idx is being initialized and later on over-written by a new value in a do-loop without the initial value ever being read. Hence the initializion is redundant and can be removed. Cleans up clang warning: drivers/net/ethernet/alacritech/slicoss.c:358:15: warning: Value stored to 'idx' during its initialization is never read Signed-off-by: Colin Ian King Acked-by: Lino Sanfilippo Signed-off-by: David S. Miller drivers/net/ethernet/alacritech/slicoss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f631f7bd3df947862027f5c7f8adffd1e9e33446 Merge: 2e39748 54a2fc6 Author: David S. Miller Date: Wed Nov 1 21:15:09 2017 +0900 Merge branch 'PHYLINK-cosmetic-and-build-fixes' Florian Fainelli says: ==================== PHYLINK cosmetic and build fixes Please find two small "fixes" one that corrects some stylistic changes and another one that fixes an actual build failure in sfp.c. Since PHYLINK is not directly visible to user, and there are no in-tree users yet (coming) this is not targeted at "net" but "net-next" instead. ==================== Signed-off-by: David S. Miller commit 54a2fc628a4aa172c62c34ef466b31c2c2e8ce9c Author: Florian Fainelli Date: Mon Oct 30 21:42:58 2017 -0700 net: phy: Fix sfp.c build against GPIO definitions include/gpio.h does not contain the references we want, we should be including linux/gpio/consumer.h instead. Fixes: 73970055450e ("sfp: add SFP module support") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/sfp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 516b29edc3b3324016ffe90d661463b9ed5ec473 Author: Florian Fainelli Date: Mon Oct 30 21:42:57 2017 -0700 net: phy: Cosmetic fixes to phylink/sfp/sfp-bus.c Perform a number of stylistic changes to phylink.c, sfp.c and sfp-bus.c: - align with netdev-style comments - align function arguments to the opening parenthesis - remove blank lines - fixup a few lines over 80 columns Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/phylink.c | 13 ++++++------- drivers/net/phy/sfp-bus.c | 11 +++-------- drivers/net/phy/sfp.c | 27 +++++++++++++-------------- 3 files changed, 22 insertions(+), 29 deletions(-) commit 2e39748a4231a893f057567e9b880ab34ea47aef Author: Alexei Starovoitov Date: Mon Oct 30 19:39:56 2017 -0700 bpf: document answers to common questions about BPF to address common misconceptions about what BPF is and what it's not add short BPF Q&A that clarifies core BPF design principles and answers some common questions. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Jakub Kicinski Signed-off-by: David S. Miller Documentation/bpf/bpf_design_QA.txt | 156 ++++++++++++++++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 157 insertions(+) commit da13c59b9936dfedcf9f2203bd29fbf83ad672bf Author: Vishwanath Pai Date: Mon Oct 30 19:38:52 2017 -0400 net: display hw address of source machine during ipv6 DAD failure This patch updates the error messages displayed in kernel log to include hwaddress of the source machine that caused ipv6 duplicate address detection failures. Examples: a) When we receive a NA packet from another machine advertising our address: ICMPv6: NA: 34:ab:cd:56:11:e8 advertised our address 2001:db8:: on eth0! b) When we detect DAD failure during address assignment to an interface: IPv6: eth0: IPv6 duplicate address 2001:db8:: used by 34:ab:cd:56:11:e8 detected! v2: Changed %pI6 to %pI6c in ndisc_recv_na() Chaged the v6 address in the commit message to 2001:db8:: Suggested-by: Igor Lubashev Signed-off-by: Vishwanath Pai Acked-by: David Ahern Signed-off-by: David S. Miller include/net/addrconf.h | 2 +- net/ipv6/addrconf.c | 6 +++--- net/ipv6/ndisc.c | 9 +++++---- 3 files changed, 9 insertions(+), 8 deletions(-) commit cdb583cfe7d79b784a74b97deb2997fccb5dcf9b Author: Florian Fainelli Date: Mon Oct 30 15:17:20 2017 -0700 net: dsa: b53: Have b53_hdr_setup() enable/disable tagging Have b53_hdr_setup() check what kind of tagging protocol is configured (Broadcom or none) and apply the correct settings in both cases. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 6683ed96b5d788a5876f1c6f84bed2b93b002a07 Merge: 31b102b 31f74f0 Author: David S. Miller Date: Wed Nov 1 20:46:41 2017 +0900 Merge branch 'netrom-cleanups' Gustavo A. R. Silva says: ==================== netrom: refactor code and mark expected switch fall-throughs The aim of this patchset is firstly to refactor code in nr_route.c in order to make it easier to read and maintain and, secondly, to mark some expected switch fall-throughs in preparation to enabling -Wimplicit-fallthrough. I have to mention that I did not implement any unit test. If someone has any suggestions on how I could test this piece of code it'd be greatly appreciated. Changes in v2: - Make use of the swap macro and remove inline keyword as suggested by Walter Harms and Kevin Dawson. Changes in v3: - Update subject for both patches. - Add this cover letter as suggested by David Miller. ==================== Signed-off-by: David S. Miller commit 31f74f0f4e8dfe5b30ff59d9a38a370fbb725f38 Author: Gustavo A. R. Silva Date: Fri Oct 27 00:51:08 2017 -0500 net: netrom: nr_route: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/netrom/nr_route.c | 3 +++ 1 file changed, 3 insertions(+) commit 4c31606920bab227de10d2c9bf9b4dd8d4327638 Author: Gustavo A. R. Silva Date: Fri Oct 27 00:51:04 2017 -0500 net: netrom: nr_route: refactor code in nr_add_node Code refactoring in order to make the code easier to read and maintain. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/netrom/nr_route.c | 59 ++++++++++++++------------------------------------- 1 file changed, 16 insertions(+), 43 deletions(-) commit bb19ba2a345439b4de3f6d59819da9853500ac4d Author: Randy Dunlap Date: Sun Oct 29 17:10:34 2017 -0700 ASoC: fix build warning in soc-core.c Fix kernel-doc build error. A symbol that ends with an underscore character ('_') has special meaning in reST (reStructuredText), so add a '*' to prevent this error and to indicate that there are several of these values to choose from. ../sound/soc/soc-core.c:2799: ERROR: Unknown target name: "snd_soc_daifmt". Signed-off-by: Randy Dunlap Signed-off-by: Mark Brown sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8698b9364710e7bac84b3af07dd410e39c8c2e08 Author: Baolin Wang Date: Wed Nov 1 10:11:55 2017 +0800 regmap: Add hardware spinlock support On some platforms, when reading or writing some special registers through regmap, we should acquire one hardware spinlock to synchronize between the multiple subsystems. Thus this patch adds the hardware spinlock support for regmap. Signed-off-by: Baolin Wang Signed-off-by: Mark Brown drivers/base/regmap/internal.h | 2 + drivers/base/regmap/regmap.c | 101 ++++++++++++++++++++++++++++++++++------- include/linux/regmap.h | 6 +++ 3 files changed, 93 insertions(+), 16 deletions(-) commit 9b6ea25066b05c4b8bc4ea69037741bd67649cd1 Author: Kuninori Morimoto Date: Wed Nov 1 07:17:34 2017 +0000 ASoC: rsnd: remove NULL check from rsnd_mod_name()/rsnd_mod_id() Current rsnd driver has rsnd_mod_id() which returns mod ID, and it returns -1 if mod was NULL. In the same time, this driver has rsnd_mod_name() which returns mod name, and it returns "unknown" if mod or mod->ops was NULL. Basically these "mod" never be NULL, but the reason why rsnd driver has such behavior is that DMA path finder is assuming memory as "mod == NULL". Thus, current DMA path debug code prints like below. Here "unknown[-1]" means it was memory. ... rcar_sound ec500000.sound: unknown[-1] from rcar_sound ec500000.sound: src[0] to rcar_sound ec500000.sound: ctu[2] rcar_sound ec500000.sound: mix[0] rcar_sound ec500000.sound: dvc[0] rcar_sound ec500000.sound: ssi[0] rcar_sound ec500000.sound: audmac[0] unknown[-1] -> src[0] ... 1st issue is that it is confusable for user. 2nd issue is rsnd driver has something like below code. mask |= 1 << rsnd_mod_id(mod); Because of this kind of code, some statically code checker will reports "Shifting by a negative value is undefined behaviour". But this "mod" never be NULL, thus negative shift never happen. To avoid these issues, this patch adds new dummy "mem" to indicate memory, and use it to indicate debug information, and, remove unneeded "NULL mod" behavior from rsnd_mod_id() and rsnd_mod_name(). The debug information will be like below by this patch ... rcar_sound ec500000.sound: mem[0] from rcar_sound ec500000.sound: src[0] to rcar_sound ec500000.sound: ctu[2] rcar_sound ec500000.sound: mix[0] rcar_sound ec500000.sound: dvc[0] rcar_sound ec500000.sound: ssi[0] rcar_sound ec500000.sound: audmac[0] mem[0] -> src[0] ... Reported-by: Hiroyuki Yokoyama Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 8 -------- sound/soc/sh/rcar/dma.c | 24 ++++++++++++++++++------ sound/soc/sh/rcar/rsnd.h | 6 +++--- 3 files changed, 21 insertions(+), 17 deletions(-) commit 21781e87881f9c420871b1d1f3f29d4cd7bffb10 Author: Kuninori Morimoto Date: Wed Nov 1 07:16:58 2017 +0000 ASoC: rsnd: rsnd_ssi_run_mods() needs to care ssi_parent_mod SSI parent mod might be NULL. ssi_parent_mod() needs to care about it. Otherwise, it uses negative shift. This patch fixes it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/ssi.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 9a43206bffe83459d9a609105aa4c379a9b6f6d4 Author: Chen-Yu Tsai Date: Wed Oct 18 16:31:31 2017 +0800 mfd: axp20x: Add axp20x-regulator cell for AXP813 Now that axp20x-regulator supports AXP813, we can add a cell for it to enable it. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Tested-by: Maxime Ripard Signed-off-by: Lee Jones drivers/mfd/axp20x.c | 2 ++ 1 file changed, 2 insertions(+) commit 25ca4ae43466a47c563b5b82d49c72f5cc918de8 Author: Baolin Wang Date: Wed Nov 1 10:32:08 2017 +0800 mfd: Add Spreadtrum SC27xx series PMICs driver This patch adds support for Spreadtrum SC27xx series PMIC MFD core, and It provides communication through the SPI interfaces. The SC27xx series PMICs contains the following 6 major components: - DCDCs - LDOs - Battery management system - Audio codec - User interface function, such as indicator, flash LED - IC level function, such as power on/off, type-c Signed-off-by: Baolin Wang Signed-off-by: Lee Jones drivers/mfd/Kconfig | 16 +++ drivers/mfd/Makefile | 1 + drivers/mfd/sprd-sc27xx-spi.c | 259 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 276 insertions(+) commit 9f17ceaa01133e9a67fd796617446e9499570e3d Author: Baolin Wang Date: Wed Nov 1 10:32:07 2017 +0800 dt-bindings: mfd: Add Spreadtrum SC27xx PMIC documentation This patch adds the binding documentation for Spreadtrum SC27xx series PMIC device. Signed-off-by: Baolin Wang Acked-by: Rob Herring Acked-by: Lee Jones Signed-off-by: Lee Jones .../devicetree/bindings/mfd/sprd,sc27xx-pmic.txt | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit f38aa351d0c73280ac0f3a0cef52e3dc298bb73c Author: Benjamin Gaignard Date: Wed Oct 25 16:15:01 2017 +0200 mfd: ssbi: Use devm_of_platform_populate() Use devm_of_platform_populate() instead of 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/ssbi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1acce5f72cfabcafee5e101b9ac7d71ebe1c7af9 Author: Mauro Carvalho Chehab Date: Tue Oct 31 14:18:03 2017 -0400 media: v4l2-fwnode: use the cached value instead of getting again There is a get/put operation in order to get firmware is_available data there at the __v4l2_async_notifier_parse_fwnode_endpoints() function. However, instead of using it, the code just reads again without the lock. That's a bug, as dev_fwnode isn't guaranteed to be there once fwnode_handle_put() has been called on it. This solves this smatch warning: drivers/media/v4l2-core/v4l2-fwnode.c:453:8: warning: variable 'is_available' set but not used [-Wunused-but-set-variable] bool is_available; ^~~~~~~~~~~~ Fixes: 9ca465312132 ("media: v4l: fwnode: Support generic parsing of graph endpoints in a device") Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-fwnode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 10d94ff4d558b96bfc4f55bb0051ae4d938246fe Author: Rakib Mullick Date: Wed Nov 1 10:14:51 2017 +0600 irq/core: Fix boot crash when the irqaffinity= boot parameter is passed on CPUMASK_OFFSTACK=y kernels(v1) When the irqaffinity= kernel parameter is passed in a CPUMASK_OFFSTACK=y kernel, it fails to boot, because zalloc_cpumask_var() cannot be used before initializing the slab allocator to allocate a cpumask. So, use alloc_bootmem_cpumask_var() instead. Also do some cleanups while at it: in init_irq_default_affinity() remove an #ifdef via using cpumask_available(). Signed-off-by: Rakib Mullick Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171026045800.27087-1-rakib.mullick@gmail.com Link: http://lkml.kernel.org/r/20171101041451.12581-1-rakib.mullick@gmail.com Signed-off-by: Ingo Molnar kernel/irq/irqdesc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit a9903f04e0a4ea522d959c2f287cdf0ab029e324 Author: Matthias Kaehlcke Date: Mon Oct 30 11:08:16 2017 -0700 sched/sysctl: Fix attributes of some extern declarations The definition of sysctl_sched_migration_cost, sysctl_sched_nr_migrate and sysctl_sched_time_avg includes the attribute const_debug. This attribute is not part of the extern declaration of these variables in include/linux/sched/sysctl.h, while it is in kernel/sched/sched.h, and as a result Clang generates warnings like this: kernel/sched/sched.h:1618:33: warning: section attribute is specified on redeclared variable [-Wsection] extern const_debug unsigned int sysctl_sched_time_avg; ^ ./include/linux/sched/sysctl.h:42:21: note: previous declaration is here extern unsigned int sysctl_sched_time_avg; The header only declares the variables when CONFIG_SCHED_DEBUG is defined, therefore it is not necessary to duplicate the definition of const_debug. Instead we can use the attribute __read_mostly, which is the expansion of const_debug when CONFIG_SCHED_DEBUG=y is set. Signed-off-by: Matthias Kaehlcke Reviewed-by: Nick Desaulniers Cc: Douglas Anderson Cc: Guenter Roeck Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shile Zhang Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171030180816.170850-1-mka@chromium.org Signed-off-by: Ingo Molnar include/linux/sched/sysctl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c01015091a77035de1939ef106bfbcaf9a21395f Author: Paul Mackerras Date: Thu Oct 19 14:11:23 2017 +1100 KVM: PPC: Book3S HV: Run HPT guests on POWER9 radix hosts This patch removes the restriction that a radix host can only run radix guests, allowing us to run HPT (hashed page table) guests as well. This is useful because it provides a way to run old guest kernels that know about POWER8 but not POWER9. Unfortunately, POWER9 currently has a restriction that all threads in a given code must either all be in HPT mode, or all in radix mode. This means that when entering a HPT guest, we have to obtain control of all 4 threads in the core and get them to switch their LPIDR and LPCR registers, even if they are not going to run a guest. On guest exit we also have to get all threads to switch LPIDR and LPCR back to host values. To make this feasible, we require that KVM not be in the "independent threads" mode, and that the CPU cores be in single-threaded mode from the host kernel's perspective (only thread 0 online; threads 1, 2 and 3 offline). That allows us to use the same code as on POWER8 for obtaining control of the secondary threads. To manage the LPCR/LPIDR changes required, we extend the kvm_split_info struct to contain the information needed by the secondary threads. All threads perform a barrier synchronization (where all threads wait for every other thread to reach the synchronization point) on guest entry, both before and after loading LPCR and LPIDR. On guest exit, they all once again perform a barrier synchronization both before and after loading host values into LPCR and LPIDR. Finally, it is also currently necessary to flush the entire TLB every time we enter a HPT guest on a radix host. We do this on thread 0 with a loop of tlbiel instructions. Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_book3s_asm.h | 13 +++- arch/powerpc/kernel/asm-offsets.c | 3 + arch/powerpc/kvm/book3s_hv.c | 47 ++++++++++++--- arch/powerpc/kvm/book3s_hv_builtin.c | 99 ++++++++++++++++++++++++++++++- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 67 +++++++++++++++++++-- 5 files changed, 212 insertions(+), 17 deletions(-) commit 516f7898ae20d9dd902a85522676055a4de9dc9b Author: Paul Mackerras Date: Mon Oct 16 16:11:57 2017 +1100 KVM: PPC: Book3S HV: Allow for running POWER9 host in single-threaded mode This patch allows for a mode on POWER9 hosts where we control all the threads of a core, much as we do on POWER8. The mode is controlled by a module parameter on the kvm_hv module, called "indep_threads_mode". The normal mode on POWER9 is the "independent threads" mode, with indep_threads_mode=Y, where the host is in SMT4 mode (or in fact any desired SMT mode) and each thread independently enters and exits from KVM guests without reference to what other threads in the core are doing. If indep_threads_mode is set to N at the point when a VM is started, KVM will expect every core that the guest runs on to be in single threaded mode (that is, threads 1, 2 and 3 offline), and will set the flag that prevents secondary threads from coming online. We can still use all four threads; the code that implements dynamic micro-threading on POWER8 will become active in over-commit situations and will allow up to three other VCPUs to be run on the secondary threads of the core whenever a VCPU is run. The reason for wanting this mode is that this will allow us to run HPT guests on a radix host on a POWER9 machine that does not support "mixed mode", that is, having some threads in a core be in HPT mode while other threads are in radix mode. It will also make it possible to implement a "strict threads" mode in future, if desired. Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kvm/book3s_hv.c | 87 ++++++++++++++++++++------------- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 2 + 3 files changed, 57 insertions(+), 33 deletions(-) commit 18c3640cefc7f1c6986b7be48f5013a8d5e394cb Author: Paul Mackerras Date: Wed Sep 13 16:00:10 2017 +1000 KVM: PPC: Book3S HV: Add infrastructure for running HPT guests on radix host This sets up the machinery for switching a guest between HPT (hashed page table) and radix MMU modes, so that in future we can run a HPT guest on a radix host on POWER9 machines. * The KVM_PPC_CONFIGURE_V3_MMU ioctl can now specify either HPT or radix mode, on a radix host. * The KVM_CAP_PPC_MMU_HASH_V3 capability now returns 1 on POWER9 with HV KVM on a radix host. * The KVM_PPC_GET_SMMU_INFO returns information about the HPT MMU on a radix host. * The KVM_PPC_ALLOCATE_HTAB ioctl on a radix host will switch the guest to HPT mode and allocate a HPT. * For simplicity, we now allocate the rmap array for each memslot, even on a radix host, since it will be needed if the guest switches to HPT mode. * Since we cannot yet run a HPT guest on a radix host, the KVM_RUN ioctl will return an EINVAL error in that case. Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_ppc.h | 3 ++ arch/powerpc/kvm/book3s_64_mmu_hv.c | 22 +++++---- arch/powerpc/kvm/book3s_64_mmu_radix.c | 1 + arch/powerpc/kvm/book3s_hv.c | 87 ++++++++++++++++++++++++---------- arch/powerpc/kvm/powerpc.c | 3 +- 5 files changed, 79 insertions(+), 37 deletions(-) commit e641a317830b6bd26e6dc2ef5fe2c1c181dd5cc2 Author: Paul Mackerras Date: Thu Oct 26 16:39:19 2017 +1100 KVM: PPC: Book3S HV: Unify dirty page map between HPT and radix Currently, the HPT code in HV KVM maintains a dirty bit per guest page in the rmap array, whether or not dirty page tracking has been enabled for the memory slot. In contrast, the radix code maintains a dirty bit per guest page in memslot->dirty_bitmap, and only does so when dirty page tracking has been enabled. This changes the HPT code to maintain the dirty bits in the memslot dirty_bitmap like radix does. This results in slightly less code overall, and will mean that we do not lose the dirty bits when transitioning between HPT and radix mode in future. There is one minor change to behaviour as a result. With HPT, when dirty tracking was enabled for a memslot, we would previously clear all the dirty bits at that point (both in the HPT entries and in the rmap arrays), meaning that a KVM_GET_DIRTY_LOG ioctl immediately following would show no pages as dirty (assuming no vcpus have run in the meantime). With this change, the dirty bits on HPT entries are not cleared at the point where dirty tracking is enabled, so KVM_GET_DIRTY_LOG would show as dirty any guest pages that are resident in the HPT and dirty. This is consistent with what happens on radix. This also fixes a bug in the mark_pages_dirty() function for radix (in the sense that the function no longer exists). In the case where a large page of 64 normal pages or more is marked dirty, the addressing of the dirty bitmap was incorrect and could write past the end of the bitmap. Fortunately this case was never hit in practice because a 2MB large page is only 32 x 64kB pages, and we don't support backing the guest with 1GB huge pages at this point. Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_book3s.h | 3 +- arch/powerpc/include/asm/kvm_book3s_64.h | 24 +++++++++++++ arch/powerpc/include/asm/kvm_host.h | 3 -- arch/powerpc/kvm/book3s_64_mmu_hv.c | 39 ++++++--------------- arch/powerpc/kvm/book3s_64_mmu_radix.c | 50 +++++--------------------- arch/powerpc/kvm/book3s_hv.c | 30 +++++++--------- arch/powerpc/kvm/book3s_hv_rm_mmu.c | 60 ++++++++++++++++++++------------ 7 files changed, 96 insertions(+), 113 deletions(-) commit 1b151ce466175746b1b1a87d42ba5f5a050a5aba Author: Paul Mackerras Date: Wed Sep 13 15:53:48 2017 +1000 KVM: PPC: Book3S HV: Rename hpte_setup_done to mmu_ready This renames the kvm->arch.hpte_setup_done field to mmu_ready because we will want to use it for radix guests too -- both for setting things up before vcpu execution, and for excluding vcpus from executing while MMU-related things get changed, such as in future switching the MMU from radix to HPT mode or vice-versa. This also moves the call to kvmppc_setup_partition_table() that was done in kvmppc_hv_setup_htab_rma() for HPT guests, and the setting of mmu_ready, into the caller in kvmppc_vcpu_run_hv(). Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_host.h | 2 +- arch/powerpc/kvm/book3s_64_mmu_hv.c | 36 +++++++++++++++++----------------- arch/powerpc/kvm/book3s_hv.c | 39 ++++++++++++++++++++++++------------- 3 files changed, 44 insertions(+), 33 deletions(-) commit 8dc6cca556e4126f77b71cf8e0c45ccc78d1d213 Author: Paul Mackerras Date: Mon Sep 11 15:29:45 2017 +1000 KVM: PPC: Book3S HV: Don't rely on host's page size information This removes the dependence of KVM on the mmu_psize_defs array (which stores information about hardware support for various page sizes) and the things derived from it, chiefly hpte_page_sizes[], hpte_page_size(), hpte_actual_page_size() and get_sllp_encoding(). We also no longer rely on the mmu_slb_size variable or the MMU_FTR_1T_SEGMENTS feature bit. The reason for doing this is so we can support a HPT guest on a radix host. In a radix host, the mmu_psize_defs array contains information about page sizes supported by the MMU in radix mode rather than the page sizes supported by the MMU in HPT mode. Similarly, mmu_slb_size and the MMU_FTR_1T_SEGMENTS bit are not set. Instead we hard-code knowledge of the behaviour of the HPT MMU in the POWER7, POWER8 and POWER9 processors (which are the only processors supported by HV KVM) - specifically the encoding of the LP fields in the HPT and SLB entries, and the fact that they have 32 SLB entries and support 1TB segments. Signed-off-by: Paul Mackerras arch/powerpc/include/asm/kvm_book3s_64.h | 116 +++++++++++++++++++++++++------ arch/powerpc/kvm/book3s_64_mmu_hv.c | 13 ++-- arch/powerpc/kvm/book3s_hv.c | 39 +++++------ arch/powerpc/kvm/book3s_hv_rm_mmu.c | 11 +-- 4 files changed, 126 insertions(+), 53 deletions(-) commit 3e8f150a3bc30214c15e5f8d27e4b2d904bd929e Merge: 93897a1 2a3d655 Author: Paul Mackerras Date: Wed Nov 1 15:33:39 2017 +1100 Merge remote-tracking branch 'remotes/powerpc/topic/ppc-kvm' into kvm-ppc-next This merges in the ppc-kvm topic branch of the powerpc tree to get the commit that reverts the patch "KVM: PPC: Book3S HV: POWER9 does not require secondary thread management". This is needed for subsequent patches which will be applied on this branch. Signed-off-by: Paul Mackerras commit 93897a1f4b1a96171b4a445207a371df1b0d4601 Author: Nicholas Piggin Date: Sat Oct 21 14:32:30 2017 +1000 KVM: PPC: Book3S: Fix gas warning due to using r0 as immediate 0 This fixes the message: arch/powerpc/kvm/book3s_segment.S: Assembler messages: arch/powerpc/kvm/book3s_segment.S:330: Warning: invalid register expression Signed-off-by: Nicholas Piggin Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_slb.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4093ee9d0bd8299ccdb26120a35bfe293fe95e7 Author: Greg Kurz Date: Mon Oct 16 12:29:44 2017 +0200 KVM: PPC: Book3S PR: Only install valid SLBs during KVM_SET_SREGS Userland passes an array of 64 SLB descriptors to KVM_SET_SREGS, some of which are valid (ie, SLB_ESID_V is set) and the rest are likely all-zeroes (with QEMU at least). Each of them is then passed to kvmppc_mmu_book3s_64_slbmte(), which assumes to find the SLB index in the 3 lower bits of its rb argument. When passed zeroed arguments, it happily overwrites the 0th SLB entry with zeroes. This is exactly what happens while doing live migration with QEMU when the destination pushes the incoming SLB descriptors to KVM PR. When reloading the SLBs at the next synchronization, QEMU first clears its SLB array and only restore valid ones, but the 0th one is now gone and we cannot access the corresponding memory anymore: (qemu) x/x $pc c0000000000b742c: Cannot access memory To avoid this, let's filter out non-valid SLB entries. While here, we also force a full SLB flush before installing new entries. Since SLB is for 64-bit only, we now build this path conditionally to avoid a build break on 32-bit, which doesn't define SLB_ESID_V. Signed-off-by: Greg Kurz Reviewed-by: David Gibson Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_pr.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 00bb6ae5006205e041ce9784c819460562351d47 Author: Paul Mackerras Date: Thu Oct 26 17:00:22 2017 +1100 KVM: PPC: Book3S HV: Don't call real-mode XICS hypercall handlers if not enabled When running a guest on a POWER9 system with the in-kernel XICS emulation disabled (for example by running QEMU with the parameter "-machine pseries,kernel_irqchip=off"), the kernel does not pass the XICS-related hypercalls such as H_CPPR up to userspace for emulation there as it should. The reason for this is that the real-mode handlers for these hypercalls don't check whether a XICS device has been instantiated before calling the xics-on-xive code. That code doesn't check either, leading to potential NULL pointer dereferences because vcpu->arch.xive_vcpu is NULL. Those dereferences won't cause an exception in real mode but will lead to kernel memory corruption. This fixes it by adding kvmppc_xics_enabled() checks before calling the XICS functions. Cc: stable@vger.kernel.org # v4.11+ Fixes: 5af50993850a ("KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller") Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_builtin.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 31b102bb501bea50ebc10f4aecf9d788305b8b87 Author: Kees Cook Date: Mon Oct 30 14:06:45 2017 -0700 net: tipc: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jon Maloy Cc: Ying Xue Cc: "David S. Miller" Cc: netdev@vger.kernel.org Cc: tipc-discussion@lists.sourceforge.net Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/tipc/discover.c | 6 +++--- net/tipc/monitor.c | 6 +++--- net/tipc/node.c | 8 ++++---- net/tipc/socket.c | 10 +++++----- net/tipc/subscr.c | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) commit 1556770a1a071435ba7e67c1bc809099dc1de849 Author: Kees Cook Date: Mon Oct 30 14:05:41 2017 -0700 drivers/net: tundra: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Philippe Reynes Cc: "yuval.shaia@oracle.com" Cc: Eric Dumazet Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/tundra/tsi108_eth.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2fd2f61e6d409f66d9f178ad708b9ced8defbf59 Author: Kees Cook Date: Mon Oct 30 14:05:12 2017 -0700 drivers/net: ntb_netdev: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jon Mason Cc: Dave Jiang Cc: Allen Hubbe Cc: linux-ntb@googlegroups.com Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ntb_netdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 07c41a295c5f25928a7cb689fdec816bd0089fe8 Author: Yonghong Song Date: Mon Oct 30 13:50:22 2017 -0700 bpf: avoid rcu_dereference inside bpf_event_mutex lock region During perf event attaching/detaching bpf programs, the tp_event->prog_array change is protected by the bpf_event_mutex lock in both attaching and deteching functions. Although tp_event->prog_array is a rcu pointer, rcu_derefrence is not needed to access it since mutex lock will guarantee ordering. Verified through "make C=2" that sparse locking check still happy with the new change. Also change the label name in perf_event_{attach,detach}_bpf_prog from "out" to "unlock" to reflect the code action after the label. Signed-off-by: Yonghong Song Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller kernel/trace/bpf_trace.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 3051fbec206eb6967b7fdecedb63ebb1ed67a1a7 Author: David Ahern Date: Mon Oct 30 10:07:17 2017 -0700 net: sit: Update lookup to handle links set to L3 slave Using SIT tunnels with VRFs works fine if the underlay device is in a VRF and the link parameter is set to the VRF device. e.g., ip tunnel add jtun mode sit remote local dev myvrf Update the device check to allow the link to be the enslaved device as well. e.g., ip tunnel add jtun mode sit remote local dev eth4 where eth4 is enslaved to myvrf. Reported-by: Jeff Barnhill <0xeffeff@gmail.com> Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/sit.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit 8caae31a8c2759fcdca7edc2bd41bba8d230a5cc Author: Arvind Yadav Date: Mon Oct 30 21:22:03 2017 +0530 atm: iphase: Fix space before '[' error. Fix checkpatch.pl error: ERROR: space prohibited before open square bracket '['. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/atm/iphase.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1a3fbd3fdec55007f1b18cf96c4a9e486c6e875b Author: Nikolay Aleksandrov Date: Mon Oct 30 12:56:33 2017 +0200 net: bridge: add neigh_suppress to bridge port policies Add an entry for IFLA_BRPORT_NEIGH_SUPPRESS to bridge port policies. Fixes: 821f1b21cabb ("bridge: add new BR_NEIGH_SUPPRESS port flag to suppress arp and nd flood") Signed-off-by: Nikolay Aleksandrov Acked-by: Roopa Prabhu Signed-off-by: David S. Miller net/bridge/br_netlink.c | 1 + 1 file changed, 1 insertion(+) commit d2fcde08ee06b18293bd47697e3953854aefa7a4 Merge: 26a8ba2 6eb5d37 Author: David S. Miller Date: Wed Nov 1 12:28:33 2017 +0900 Merge branch 'mvpp2-various-improvements' Antoine Tenart says: ==================== net: mvpp2: various improvements This series includes various patches improving the Marvell PPv2 driver. I send them as a series to avoid any possible merge conflict. - Patches 1 and 2 improve the initializing of the Tx and Rx FIFO. - Patch 3 initialize the RSS table to evenly distribute the ingress packets across multiple Rx queues based on their hashes. - Patch 4 limits the number of TSO segments sent to the driver, to avoid having more segments to handle than the corresponding number of available descriptors. - Patch 5 and 6 are cosmetic improvements. This applies on today's net-next branch, The patches were tested extensively (I ran iperf and http downloads in parallel, transferring TBs of data). ==================== Signed-off-by: David S. Miller commit 6eb5d375cefcbd60ebb4251b150ea95d47140fe0 Author: Antoine Tenart Date: Mon Oct 30 11:23:33 2017 +0100 net: mvpp2: simplify the Tx desc set DMA logic Two functions were always used to set the DMA addresses in Tx descriptors, because this address is split into a base+offset in the descriptors. A mask was used to come up with the base and offset addresses and two functions were called, mvpp2_txdesc_dma_addr_set() and mvpp2_txdesc_offset_set(). This patch moves the base+offset calculation logic to mvpp2_txdesc_dma_addr_set(), and removes mvpp2_txdesc_offset_set() to simplify things. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 39 ++++++++++++------------------------ 1 file changed, 13 insertions(+), 26 deletions(-) commit 02856a3ba6333c536f13d27cc847fcb442a23d9b Author: Antoine Tenart Date: Mon Oct 30 11:23:32 2017 +0100 net: mvpp2: use the aggr txq size define everywhere Cosmetic patch using the MVPP2_AGGR_TXQ_SIZE everywhere instead of the size field of aggr_txq, as the size never change and is always equal to the MVPP2_AGGR_TXQ_SIZE define. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1d17db08c056c1f7f4abbff6aff8711b7c3a3b7f Author: Antoine Tenart Date: Mon Oct 30 11:23:31 2017 +0100 net: mvpp2: limit TSO segments and use stop/wake thresholds Too many TSO descriptors can be required for the default queue size, when using small MSS values for example. Prevent this by adding a maximum number of allowed TSO segments (300). In addition set a stop and a wake thresholds to stop the queue when there's no room for a 1 "worst case scenario skb". Wake up the queue when the number of descriptors is low enough. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 1d7d15d79fb4660bec3a86e748c50aac7c5d2121 Author: Antoine Tenart Date: Mon Oct 30 11:23:30 2017 +0100 net: mvpp2: initialize the RSS tables This patch initialize the RSS tables to evenly (depending on the packets RSS hashes) distribute the packets across port Rx queues. This helps to handle packets on different CPUs to improve performances, as more queues will be used in parallel. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 7c10f9742d76ec18bed5de14f5f4ed08859f7b7a Author: Antoine Tenart Date: Mon Oct 30 11:23:29 2017 +0100 net: mvpp2: initialize the Tx FIFO size So far only the Rx FIFO size was initialized. For PPv2.2 the Tx FIFO size can be set as well. This patch initializes the Tx FIFO size for PPv2.2 controllers to 3K. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit 2d1d7df8a3652697da7f7929791d555e6c5981c2 Author: Antoine Tenart Date: Mon Oct 30 11:23:28 2017 +0100 net: mvpp2: set the Rx FIFO size depending on the port speeds for PPv2.2 The Rx FIFO size was set to the same value for all ports. This patch sets it depending on the maximum speed a given port can handle. This is only working for PPv2.2. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 52 +++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 6 deletions(-) commit 26a8ba2c8b36840da8e068d551e1578b684dcd33 Merge: 28ef7de7 eee12df Author: David S. Miller Date: Wed Nov 1 12:16:14 2017 +0900 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-10-30 1) Change some variables that can't be negative from int to unsigned int. From Alexey Dobriyan. 2) Remove a redundant header initialization in esp6. From Colin Ian King. 3) Some BUG to BUG_ON conversions. From Gustavo A. R. Silva. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 28ef7de70dde7762cb81eecf411e2c78a25c457d Author: Colin Ian King Date: Sun Oct 29 13:30:25 2017 +0000 mkiss: remove redundant assignment of len to ax->mtu Variable len is being assigned a value that is never read, hence the assignment is redundant and can be removed. Cleans up clang warning: drivers/net/hamradio/mkiss.c:443:3: warning: Value stored to 'len' is never read Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/hamradio/mkiss.c | 1 - 1 file changed, 1 deletion(-) commit 81ba4e1ac4f1d3e9d980ca0f003dd3038559b3fa Author: Alexei Starovoitov Date: Sat Oct 28 17:17:13 2017 -0700 selftests/bpf: remove useless bpf_trace_printk sockmap test is using two programs that use bpf_trace_printk() which prints into trace_pipe, but nothing is reading it. Remove it. Fixes: 6f6d33f3b3d0 ("bpf: selftests add sockmap tests") Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/testing/selftests/bpf/sockmap_parse_prog.c | 3 --- tools/testing/selftests/bpf/sockmap_verdict_prog.c | 2 -- 2 files changed, 5 deletions(-) commit 54df7ef51193641010a934c231c5aba117aea46d Author: Gustavo A. R. Silva Date: Sat Oct 28 15:48:47 2017 -0500 net: dccp: ccids: lib: packet_history: use swap macro in tfrc_rx_hist_swap Make use of the swap macro and remove unnecessary variable tmp. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/dccp/ccids/lib/packet_history.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3a7943ba5b7763488753305fddb0a50e911e0617 Author: Gustavo A. R. Silva Date: Sat Oct 28 15:39:48 2017 -0500 net: decnet: dn_nsp_out: use swap macro in dn_mk_ack_header Make use of the swap macro and remove unnecessary variable tmp. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/decnet/dn_nsp_out.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 68ad08c4f8ee6254ab814d15b9765f7f82ed0ae7 Author: Gustavo A. R. Silva Date: Sat Oct 28 14:38:45 2017 -0500 net: decnet: dn_nsp_in: use swap macro in dn_nsp_rx_packet Make use of the swap macro and remove unnecessary variable tmp. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/decnet/dn_nsp_in.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit e8992e408273334375bfe8f03267dcdef3a8c2e6 Author: Zhu Yanjun Date: Sat Oct 28 08:25:30 2017 -0400 forcedeth: replace pci_alloc_consistent with dma_alloc_coherent The functions pci_alloc_consistent is obsolete. So it is replaced with dma_alloc_coherent Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller drivers/net/ethernet/nvidia/forcedeth.c | 61 ++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 20 deletions(-) commit db32919005d81a375093936a1f625f2d08c2d299 Author: Xin Long Date: Sat Oct 28 19:46:21 2017 +0800 ip_vti: remove the useless err_count check in vti_xmit Unlike ipip and gre, ip_vti never uses err_count in vti4_err, so no need to check err_count in vti_xmit, it's value always 0. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/ipv4/ip_vti.c | 9 --------- 1 file changed, 9 deletions(-) commit aa7365e19f8410659ec30503cd8ce866a176c9f4 Author: Wei Yongjun Date: Sat Oct 28 05:05:46 2017 +0000 net: bcmgenet: Avoid calling platform_device_put() twice in bcmgenet_mii_exit() Remove platform_device_put() call after platform_device_unregister() from function bcmgenet_mii_exit(), otherwise, we will call platform_device_put() twice. Fixes: 9a4e79697009 ("net: bcmgenet: utilize generic Broadcom UniMAC MDIO controller driver") Signed-off-by: Wei Yongjun Acked-by: Doug Berger Acked-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmmii.c | 1 - 1 file changed, 1 deletion(-) commit 985b6e6d039ef3dcbba4119f81763862123cfc98 Merge: a7b216b 1f27923 Author: David S. Miller Date: Wed Nov 1 11:50:43 2017 +0900 Merge branch 'extack-nonfatal' David Ahern says: ==================== net: Allow non-fatal messages to be passed in extack There are many cases where networking subsystems throw non-fatal warning messages that end up in dmesg / kernel log to which a user making the change is completely oblivious. This set makes the extack facility usable for returning such messages. The case in point here is spectrum and adding FIB rules which causes an offload abort. Make the use case more user friendly by letting the user know that offload is no longer happening because of the rule change. v2 - kept the offload abort in a work queue entry per Ido's comment ==================== Signed-off-by: David S. Miller commit 1f279233affe115dd3f65c89716a4f4315bb4cfe Author: David Ahern Date: Fri Oct 27 17:37:14 2017 -0700 mlxsw: spectrum_router: Return extack message on abort due to fib rules Adding a FIB rule on a spectrum platform silently aborts FIB offload: $ ip ru add pref 99 from all to 192.168.1.1 table 10 $ dmesg -c [ 623.144736] mlxsw_spectrum 0000:03:00.0: FIB abort triggered. Note that FIB entries are no longer being offloaded to this device. This patch reworks FIB rule handling to return a message to the user: $ ip ru add pref 99 from all to 8.8.8.8 table 11 Error: spectrum: FIB rules not supported. Aborting offload. spectrum currently only checks whether the fib rule is a default rule or an l3mdev rule, both of which it knows how to handle. Any other it aborts FIB offload. Move the processing to check the rule type inline with the user request. If the rule is an unsupported one, then a work queue entry is used to abort the offload. Change the rule delete handling to just return since it does nothing at the moment. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 108 +++++++++++++-------- 1 file changed, 66 insertions(+), 42 deletions(-) commit 6c31e5a91fde2e718e59c8a627c56451f88be54c Author: David Ahern Date: Fri Oct 27 17:37:13 2017 -0700 net: Add extack to fib_notifier_info Add extack to fib_notifier_info and plumb through stack to call_fib_rule_notifiers, call_fib_entry_notifiers and call_fib6_entry_notifiers. This allows notifer handlers to return messages to user. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller include/net/fib_notifier.h | 1 + net/core/fib_rules.c | 9 ++++++--- net/ipv4/fib_trie.c | 13 ++++++++----- net/ipv6/ip6_fib.c | 15 +++++++++------ 4 files changed, 24 insertions(+), 14 deletions(-) commit 4f6265d485ea0a2507692ded8ed47b323f49587c Author: David Ahern Date: Fri Oct 27 17:37:12 2017 -0700 netlink: Allow ext_ack to carry non-error messages The NLMSGERR API already carries data (eg, a cookie) on the success path. Allow a message string to be returned as well. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/netlink/af_netlink.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit a7b216b1e1cbbe7dceec2d69403bf249bb804abe Merge: 638f5b9 951259aa Author: David S. Miller Date: Wed Nov 1 11:47:45 2017 +0900 Merge branch 'dsa-port-parsing' Vivien Didelot says: ==================== net: dsa: add port parsing functions This patchset adds port parsing functions called early in the new bindings parsing stage, which regroup all the fetching of static data available at the port level, including the port's type, name and CPU master interface. This simplifies the rest of the code which does not need to dig into device tree or platform data again in order to check a port's type or name. ==================== Signed-off-by: David S. Miller commit 951259aa60180e2897d28b538bf68a3a213da471 Author: Vivien Didelot Date: Fri Oct 27 15:55:19 2017 -0400 net: dsa: remove name arg from slave create Now that slave dsa_port always have their name set, there is no need to pass it to dsa_slave_create() anymore. Remove this argument. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 3 +-- net/dsa/dsa_priv.h | 2 +- net/dsa/legacy.c | 2 +- net/dsa/slave.c | 3 ++- 4 files changed, 5 insertions(+), 5 deletions(-) commit 1838fa89a22cbc9ec87e995683e241a82d87e6df Author: Vivien Didelot Date: Fri Oct 27 15:55:18 2017 -0400 net: dsa: get port name at parse time Get the optional "label" property and assign a default one directly at parse time instead of doing it when creating the slave. For legacy, simply assign the port name stored in cd->port_names. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 10 +++++----- net/dsa/legacy.c | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) commit cbabb0ac01052f79cf96d7b7e3d3451ffd275864 Author: Vivien Didelot Date: Fri Oct 27 15:55:17 2017 -0400 net: dsa: get master device at port parsing time Fetching the master device can be done directly when a port is parsed from device tree or pdata, instead of waiting until dsa_dst_parse. Now that -EPROBE_DEFER is returned before we add the switch to the tree, there is no need to check for this error after dsa_dst_parse. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) commit 6d4e5c570c2d66c806ecc6bd851fcf881fe8a38e Author: Vivien Didelot Date: Fri Oct 27 15:55:15 2017 -0400 net: dsa: get port type at parse time Assign a port's type at parsed time instead of waiting for the tree to be completed. Because this is now done earlier, we can use the port's type in dsa_port_is_* helpers instead of digging again in topology description. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit fd223e2e66eb076b5dda586db9a5a3c99f76f99a Author: Vivien Didelot Date: Fri Oct 27 15:55:14 2017 -0400 net: dsa: add port parse functions Add symmetrical DSA port parsing functions for pdata and device tree, used to parse and validate a given port node or platform data. They don't do much for the moment but will be extended later on to assign a port type and get device references. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) commit 5b32fe070c2ddf31adc42c26dab8af346b652538 Author: Vivien Didelot Date: Fri Oct 27 15:55:13 2017 -0400 net: dsa: get ports within parsing code There is no point into hiding the -EINVAL error code in ERR_PTR from a dsa_get_ports function, simply get the "ports" node directly from within the dsa_parse_ports_dn function. This also has the effect to make the pdata and device tree handling code symmetrical inside _dsa_register_switch. At the same time, rename dsa_parse_ports_dn to dsa_parse_ports_of because _of is a more common suffix for device tree parsing functions. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) commit 638f5b90d46016372a8e3e0a434f199cc5e12b8c Author: Alexei Starovoitov Date: Tue Oct 31 18:16:05 2017 -0700 bpf: reduce verifier memory consumption the verifier got progressively smarter over time and size of its internal state grew as well. Time to reduce the memory consumption. Before: sizeof(struct bpf_verifier_state) = 6520 After: sizeof(struct bpf_verifier_state) = 896 It's done by observing that majority of BPF programs use little to no stack whereas verifier kept all of 512 stack slots ready always. Instead dynamically reallocate struct verifier state when stack access is detected. Runtime difference before vs after is within a noise. The number of processed instructions stays the same. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 8 +- include/linux/bpf_verifier.h | 16 +- kernel/bpf/verifier.c | 437 ++++++++++++++-------- 3 files changed, 305 insertions(+), 156 deletions(-) commit 3179698d48eb2ac19387a9c5e971314e22239b12 Merge: 2278f51 d4be8eb Author: David S. Miller Date: Wed Nov 1 11:39:52 2017 +0900 Merge branch 'liquidio-switchdev-support' Vijaya Mohan Guvva says: ==================== liquidio: switchdev support for LiquidIO NIC patch1 of this patch set adds switchdev support for SRIOV capable LiquidIO NIC, so that for every SRIOV VF on LiquidIO, a representor netdev is created on hypervisor. It also has changes to send representor interface configurations like admin state and MTU to LiquidIO firmware and to retrieve HW counted VF stats for VF representor. patch2 adds support for switchdev enable/disable from devlink Patchset Change Log: V2 -> V3: * Use mac address as the physical switchID. * Check for eswitch_mode before returning switchID V1 -> V2: * Name the representors "pfXvfY". * Drop patch3 (ethtool support for switchdev ports) that was in V1 because it's not necessary. ==================== Signed-off-by: David S. Miller commit d4be8ebefb449c43b7daa5c9d23b22cd20c17258 Author: Vijaya Mohan Guvva Date: Tue Oct 31 16:04:57 2017 -0700 liquidio: Configure switchdev with devlink Enable and disable switchdev on SRIOV capable LiquidIO NIC with devlink. Create representor netdev for each SRIOV VF function on SRIOV enable and and do the cleanup on SRIOV disable. Signed-off-by: Vijaya Mohan Guvva Signed-off-by: Satanand Burla Signed-off-by: Raghu Vatsavayi Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/Kconfig | 1 + drivers/net/ethernet/cavium/liquidio/lio_main.c | 93 ++++++++++++++++++++++ drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c | 6 ++ .../net/ethernet/cavium/liquidio/liquidio_common.h | 1 + .../net/ethernet/cavium/liquidio/octeon_device.h | 7 ++ 5 files changed, 108 insertions(+) commit 1f233f327913f3dee0602cba9c64df1903772b55 Author: Vijaya Mohan Guvva Date: Tue Oct 31 16:04:53 2017 -0700 liquidio: switchdev support for LiquidIO NIC Enable switchdev for SRIOV capable LiquidIO NIC. It registers a representor netdev (with switchdev_ops) for each SRIOV VF created. It also has changes to send representor interface configurations like admin state and MTU to LiquidIO firmware and to retrieve HW counted VF stats for VF representor. Signed-off-by: Vijaya Mohan Guvva Signed-off-by: Satanand Burla Signed-off-by: Raghu Vatsavayi Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/Makefile | 2 +- drivers/net/ethernet/cavium/liquidio/lio_main.c | 25 + drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c | 621 +++++++++++++++++++++ drivers/net/ethernet/cavium/liquidio/lio_vf_rep.h | 47 ++ .../net/ethernet/cavium/liquidio/liquidio_common.h | 49 ++ .../net/ethernet/cavium/liquidio/octeon_device.h | 7 + 6 files changed, 750 insertions(+), 1 deletion(-) commit 2278f51421f54432dc2e4e25c39d46925f59a359 Merge: e8a8d86 1fe8500 Author: David S. Miller Date: Wed Nov 1 11:37:17 2017 +0900 Merge tag 'mlx5-updates-2017-10-31' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2017-10-31 mlx5e stats groups This series from Kamal introduces an important refactoring for mlx5e stats handling, which groups the stats into generic groups structure which allows to control the behavior and stats reporting per group in a modular way. In the first patch Kamal introduces a new data type "mlx5e_stats_grp" This change defines a new API to create a group of stats and simplifies the way of handling them. This struct will define the following behavior per group: - get_num_stats() - return the number of counters in the group. - fill_strings() - fill counters strings within the group. - fill_stats() - fill counters values within the group. All other patches will be straight forward refactoring per stats group, where Kamal will move each mlx5e stats group to use the new API. The idea is to have better flexibility and modularity to add new counters, all ethtool logic was rendered generic and loops through the generic stats groups and calls the groups callbacks to figure out how and what to report back to user space. Introducing new file en_stats.c to hold all the new stat groups logic and implementation. Static structures (counters descriptors) moved from en_stats.h to en_stats.c which reduces the mlx5_core binary footprint, originally reported and addressed by Stephen Hemminger: ("mlx5: fix space waste from ethtool descriptions") which was waived due to this re-design. ==================== Signed-off-by: David S. Miller commit a2f042430784d86eb2b7a6d2a869f552da30edba Author: Peter Griffin Date: Tue Aug 15 15:14:25 2017 +0100 drm/hisilicon: Ensure LDI regs are properly configured. This patch fixes the following soft lockup: BUG: soft lockup - CPU#0 stuck for 23s! [weston:307] On weston idle-timeout the IP is powered down and reset asserted. On weston resume we get a massive vblank IRQ storm due to the LDI registers having lost some state. This state loss is caused by ade_crtc_atomic_begin() not calling ade_ldi_set_mode(). With this patch applied resuming from Weston idle-timeout works well. Signed-off-by: Peter Griffin Tested-by: John Stultz Cc: stable@vger.kernel.org Reviewed-by: Xinliang Liu Signed-off-by: Xinliang Liu drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 3 +++ 1 file changed, 3 insertions(+) commit b2fd708ffa7f43ce8680271924e1771e26a3ec91 Author: Arvind Yadav Date: Tue Oct 24 13:20:39 2017 +0530 thermal: cpu_cooling: pr_err() strings should end with newlines pr_err() messages should end with a new-line to avoid other messages being concatenated. Acked-by: Viresh Kumar Acked-by: Javi Merino Signed-off-by: Arvind Yadav Signed-off-by: Eduardo Valentin drivers/thermal/cpu_cooling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e03cf1b2dd54733d0d2c5811b78257d78562c03 Author: Brian Norris Date: Tue Sep 26 14:27:59 2017 -0700 thermal: add brcmstb AVS TMON driver The AVS TMON core provides temperature readings, a pair of configurable high- and low-temperature threshold interrupts, and an emergency over-temperature chip reset. The driver utilizes the first two to provide temperature readings and high-temperature notifications to applications. The over-temperature reset is not exposed to applications; this reset threshold is critical to the system and should be set with care within the bootloader. Applications may choose to utilize the notification mechanism, the temperature reading mechanism (e.g., through polling), or both. Signed-off-by: Brian Norris Signed-off-by: Doug Berger Signed-off-by: Markus Mayer Signed-off-by: Eduardo Valentin drivers/thermal/Kconfig | 2 +- drivers/thermal/broadcom/Kconfig | 7 + drivers/thermal/broadcom/Makefile | 1 + drivers/thermal/broadcom/brcmstb_thermal.c | 387 +++++++++++++++++++++++++++++ 4 files changed, 396 insertions(+), 1 deletion(-) commit b590c51c9b956f465acc73a2864d3a1444c76c3b Author: Brian Norris Date: Tue Sep 26 14:27:58 2017 -0700 Documentation: devicetree: add binding for Broadcom STB AVS TMON Add binding for Broadcom STB thermal. Signed-off-by: Brian Norris Acked-by: Rob Herring Signed-off-by: Markus Mayer Signed-off-by: Eduardo Valentin .../devicetree/bindings/thermal/brcm,avs-tmon.txt | 20 ++++++++++++++++++++ MAINTAINERS | 8 ++++++++ 2 files changed, 28 insertions(+) commit 2bb60a8ea721900c13b580689d647a6423e88104 Author: Kevin Wangtao Date: Sun Oct 22 10:54:35 2017 +0200 thermal/drivers/hisi: Add support for hi3660 SoC This patch adds the support for thermal sensor on the Hi3660 SoC. Hi3660 tsensor support alarm in alarm threshold, it also has a configurable hysteresis interval, interrupt will be triggered when temperature rise above the alarm threshold or fall below the hysteresis threshold. Signed-off-by: Kevin Wangtao Tested-by: Daniel Lezcano # hikey6220 Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 145 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 144 insertions(+), 1 deletion(-) commit a160a465297362c515db28848b79eb876ceab9c0 Author: Kevin Wangtao Date: Sun Oct 22 10:54:34 2017 +0200 thermal/drivers/hisi: Prepare to add support for other hisi platforms For platform compatibility, add the tsensor ops to a thermal data structure. Each platform has its own probe function to register proper tsensor ops function to the pointer, platform related resource request are also implemented in the platform probe function. Signed-off-by: Kevin Wangtao Tested-by: Daniel Lezcano # hikey6220 Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 132 +++++++++++++++++++++++++++-------------- 1 file changed, 87 insertions(+), 45 deletions(-) commit 5ed82b79e526f755bf0630a7c47a31ca2f4a7ad5 Author: Kevin Wangtao Date: Sun Oct 22 10:54:33 2017 +0200 thermal/drivers/hisi: Add platform prefix to function name As the next patches will provide support for the hikey3660's sensor, several functions with the same purpose but for different platforms will be introduced. In order to make a clear distinction between them, let's prefix the function names with the platform name. This patch has no functional changes, only name changes. Signed-off-by: Kevin Wangtao Tested-by: Daniel Lezcano # hikey6220 Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 145 +++++++++++++++++++++-------------------- 1 file changed, 73 insertions(+), 72 deletions(-) commit a0678da82ca01771db57f53bfb7f0a5a7494900e Author: Kevin Wangtao Date: Sun Oct 22 10:54:32 2017 +0200 thermal/drivers/hisi: Put platform code together Reorganize the code for next patches by moving the functions upper in the file which will prevent a forward declaration. There is no functional change here. Signed-off-by: Kevin Wangtao Tested-by: Daniel Lezcano # hikey6220 Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 76 +++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 38 deletions(-) commit 7a4ca51b704038d1d7f5e31177a7fa4d9dcb839e Author: Daniel Lezcano Date: Thu Oct 19 19:06:00 2017 +0200 thermal/drivers/qcom-spmi: Use devm_iio_channel_get The iio_channel_get() function has now its devm_ version. Use it and remove all the rollback code for iio_channel_release() as well as the .remove ops. [Compiled tested only] Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin drivers/thermal/qcom-spmi-temp-alarm.c | 43 +++++++++++----------------------- 1 file changed, 14 insertions(+), 29 deletions(-) commit d377aba193111419341fabaec6cab92df25e1b28 Author: Daniel Lezcano Date: Thu Oct 19 19:05:59 2017 +0200 thermal/drivers/generic-iio-adc: Switch tz request to devm version Everything mentionned here: https://lkml.org/lkml/2016/4/20/850 This driver was added before the devm_iio_channel_get() function version was merged. The sensor should be released before the iio channel, thus we had to use the non-devm version of thermal_zone_of_sensor_register(). Now the devm_iio_channel_get() is available, do the corresponding change in this driver and remove gadc_thermal_remove(). [Compiled tested only] Acked-by: Laxman Dewangan Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin drivers/thermal/thermal-generic-adc.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) commit 07209fcf33542c1ff1e29df2dbdf8f29cdaacb10 Author: Daniel Lezcano Date: Thu Oct 19 19:05:58 2017 +0200 thermal/drivers/step_wise: Fix temperature regulation misbehavior There is a particular situation when the cooling device is cpufreq and the heat dissipation is not efficient enough where the temperature increases little by little until reaching the critical threshold and leading to a SoC reset. The behavior is reproducible on a hikey6220 with bad heat dissipation (eg. stacked with other boards). Running a simple C program doing while(1); for each CPU of the SoC makes the temperature to reach the passive regulation trip point and ends up to the maximum allowed temperature followed by a reset. This issue has been also reported by running the libhugetlbfs test suite. What is observed is a ping pong between two cpu frequencies, 1.2GHz and 900MHz while the temperature continues to grow. It appears the step wise governor calls get_target_state() the first time with the throttle set to true and the trend to 'raising'. The code selects logically the next state, so the cpu frequency decreases from 1.2GHz to 900MHz, so far so good. The temperature decreases immediately but still stays greater than the trip point, then get_target_state() is called again, this time with the throttle set to true *and* the trend to 'dropping'. From there the algorithm assumes we have to step down the state and the cpu frequency jumps back to 1.2GHz. But the temperature is still higher than the trip point, so get_target_state() is called with throttle=1 and trend='raising' again, we jump to 900MHz, then get_target_state() is called with throttle=1 and trend='dropping', we jump to 1.2GHz, etc ... but the temperature does not stabilizes and continues to increase. [ 237.922654] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=1,throttle=1 [ 237.922678] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=1,throttle=1 [ 237.922690] thermal cooling_device0: cur_state=0 [ 237.922701] thermal cooling_device0: old_target=0, target=1 [ 238.026656] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=2,throttle=1 [ 238.026680] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=2,throttle=1 [ 238.026694] thermal cooling_device0: cur_state=1 [ 238.026707] thermal cooling_device0: old_target=1, target=0 [ 238.134647] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=1,throttle=1 [ 238.134667] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=1,throttle=1 [ 238.134679] thermal cooling_device0: cur_state=0 [ 238.134690] thermal cooling_device0: old_target=0, target=1 In this situation the temperature continues to increase while the trend is oscillating between 'dropping' and 'raising'. We need to keep the current state untouched if the throttle is set, so the temperature can decrease or a higher state could be selected, thus preventing this oscillation. Keeping the next_target untouched when 'throttle' is true at 'dropping' time fixes the issue. The following traces show the governor does not change the next state if trend==2 (dropping) and throttle==1. [ 2306.127987] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=1,throttle=1 [ 2306.128009] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=1,throttle=1 [ 2306.128021] thermal cooling_device0: cur_state=0 [ 2306.128031] thermal cooling_device0: old_target=0, target=1 [ 2306.231991] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=2,throttle=1 [ 2306.232016] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=2,throttle=1 [ 2306.232030] thermal cooling_device0: cur_state=1 [ 2306.232042] thermal cooling_device0: old_target=1, target=1 [ 2306.335982] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=0,throttle=1 [ 2306.336006] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=0,throttle=1 [ 2306.336021] thermal cooling_device0: cur_state=1 [ 2306.336034] thermal cooling_device0: old_target=1, target=1 [ 2306.439984] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=2,throttle=1 [ 2306.440008] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=2,throttle=0 [ 2306.440022] thermal cooling_device0: cur_state=1 [ 2306.440034] thermal cooling_device0: old_target=1, target=0 [ ... ] After a while, if the temperature continues to increase, the next state becomes 2 which is 720MHz on the hikey. That results in the temperature stabilizing around the trip point. [ 2455.831982] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=1,throttle=1 [ 2455.832006] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=1,throttle=0 [ 2455.832019] thermal cooling_device0: cur_state=1 [ 2455.832032] thermal cooling_device0: old_target=1, target=1 [ 2455.935985] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=0,throttle=1 [ 2455.936013] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=0,throttle=0 [ 2455.936027] thermal cooling_device0: cur_state=1 [ 2455.936040] thermal cooling_device0: old_target=1, target=1 [ 2456.043984] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=0,throttle=1 [ 2456.044009] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=0,throttle=0 [ 2456.044023] thermal cooling_device0: cur_state=1 [ 2456.044036] thermal cooling_device0: old_target=1, target=1 [ 2456.148001] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=1,throttle=1 [ 2456.148028] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=1,throttle=1 [ 2456.148042] thermal cooling_device0: cur_state=1 [ 2456.148055] thermal cooling_device0: old_target=1, target=2 [ 2456.252009] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=2,throttle=1 [ 2456.252041] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=2,throttle=0 [ 2456.252058] thermal cooling_device0: cur_state=2 [ 2456.252075] thermal cooling_device0: old_target=2, target=1 IOW, this change is needed to keep the state for a cooling device if the temperature trend is oscillating while the temperature increases slightly. Without this change, the situation above leads to a catastrophic crash by a hardware reset on hikey. This issue has been reported to happen on an OMAP dra7xx also. Signed-off-by: Daniel Lezcano Cc: Keerthy Cc: John Stultz Cc: Leo Yan Tested-by: Keerthy Reviewed-by: Keerthy Signed-off-by: Eduardo Valentin drivers/thermal/step_wise.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit e42bbe1160c3b5fcab8d5afcc49d8647adff6c9c Author: Kevin Wangtao Date: Thu Oct 19 19:05:57 2017 +0200 thermal/drivers/hisi: Use round up step value Use round up division to ensure the programmed value of threshold and the lag are not less than what we set, and in order to keep the accuracy while using round up division, the step value should be a rounded up value. There is no need to use hisi_thermal_round_temp. Signed-off-by: Kevin Wangtao Tested-by: Daniel Lezcano # hikey6220 Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 943c0f6abfb6010065b80943356975885a33233c Author: Kevin Wangtao Date: Thu Oct 19 19:05:56 2017 +0200 thermal/drivers/hisi: Move the clk setup in the corresponding functions The sensor's clock is enabled and disabled outside of the probe and disable function. Moving the corresponding action in the hisi_thermal_setup() and hisi_thermal_disable_sensor(), factors out some lines of code and makes the code more symmetric. Signed-off-by: Kevin Wangtao Tested-by: Daniel Lezcano # hikey6220 Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit cc1ab38d2b2ad3290426c2234cf83e7a323554c7 Author: Daniel Lezcano Date: Thu Oct 19 19:05:55 2017 +0200 thermal/drivers/hisi: Remove mutex_lock in the code The mutex is used to protect against writes in the configuration register. That happens at probe time, with no possible race yet. Then when the module is unloaded and at suspend/resume. When the module is unloaded, it is an userspace operation, thus via a process. Suspending the system goes through the freezer to suspend all the tasks synchronously before continuing. So it is not possible to hit the suspend ops in this driver while we are unloading it. The resume is the same situation than the probe. In other words, even if there are several places where we write the configuration register, there is no situation where we can write it at the same time, so far as I can judge Signed-off-by: Daniel Lezcano Reviewed-by: Leo Yan Tested-by: Leo Yan Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 6 ------ 1 file changed, 6 deletions(-) commit 81d7cb7946f03d339244e1a822b7da246d8c79ff Author: Daniel Lezcano Date: Thu Oct 19 19:05:54 2017 +0200 thermal/drivers/hisi: Remove thermal data back pointer The presence of the thermal data pointer in the sensor structure has the unique purpose of accessing the thermal data in the interrupt handler. The sensor pointer is passed when registering the interrupt handler, replace the cookie by the thermal data pointer, so the back pointer is no longer needed. Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit bc02ef6d98a601a39f735cbbb67807fb752b5138 Author: Daniel Lezcano Date: Thu Oct 19 19:05:53 2017 +0200 thermal/drivers/hisi: Convert long to int There is no point to specify the temperature as long variable, the int is enough. Replace all long variables to int, so making the code consistent. Signed-off-by: Daniel Lezcano Reviewed-by: Leo Yan Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 609f26dcbb340d7d6b30b1951c8b525611a97c20 Author: Daniel Lezcano Date: Thu Oct 19 19:05:52 2017 +0200 thermal/drivers/hisi: Rename and remove unused field Rename the 'sensors' field to 'sensor' as we describe only one sensor. Remove the 'sensor_temp' as it is no longer used. Signed-off-by: Daniel Lezcano Reviewed-by: Leo Yan Tested-by: Leo Yan Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 10d7e9a9181f4637640f388d334c6740c1b5d0e8 Author: Daniel Lezcano Date: Thu Oct 19 19:05:51 2017 +0200 thermal/drivers/hisi: Remove costly sensor inspection The sensor is all setup, bind, resetted, acked, etc... every single second. That was the way to workaround a problem with the interrupt bouncing again and again. With the following changes, we fix all in one: - Do the setup, one time, at probe time - Add the IRQF_ONESHOT, ack the interrupt in the threaded handler - Remove the interrupt handler - Set the correct value for the LAG register - Remove all the irq_enabled stuff in the code as the interruption handling is fixed - Remove the 3ms delay - Reorder the initialization routine to be in the right order It ends up to a nicer code and more efficient, the 3-5ms delay is removed from the get_temp() path. Signed-off-by: Daniel Lezcano Reviewed-by: Leo Yan Tested-by: Leo Yan Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 203 +++++++++++++++++++---------------------- 1 file changed, 93 insertions(+), 110 deletions(-) commit b424315a287c70eeb5f920f84c92492bd2f5658e Author: Daniel Lezcano Date: Thu Oct 19 19:05:50 2017 +0200 thermal/drivers/hisi: Fix configuration register setting The TEMP0_CFG configuration register contains different field to set up the temperature controller. However in the code, nothing prevents a setup to overwrite the previous one: eg. writing the hdak value overwrites the sensor selection, the sensor selection overwrites the hdak value. In order to prevent such thing, use a regmap-like mechanism by reading the value before, set the corresponding bits and write the result. Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) commit 1e11b014271ceccb5ea04ae58f4829ac8209a86d Author: Daniel Lezcano Date: Thu Oct 19 19:05:49 2017 +0200 thermal/drivers/hisi: Encapsulate register writes into helpers Hopefully, the function name can help to clarify the semantic of the operations when writing in the register. Signed-off-by: Daniel Lezcano Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 92 ++++++++++++++++++++++++++++++++---------- 1 file changed, 70 insertions(+), 22 deletions(-) commit 2d4fa7b4c6f8080ced2e8237c9f46fb1fc110d64 Author: Daniel Lezcano Date: Thu Oct 19 19:05:48 2017 +0200 thermal/drivers/hisi: Remove pointless lock The threaded interrupt inspect the sensors structure to look in the temp threshold field, but this field is read-only in all the code, except in the probe function before the threaded interrupt is set. In other words there is not race window in the threaded interrupt when reading the field value. Signed-off-by: Daniel Lezcano Reviewed-by: Leo Yan Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit db2b0332608c8e648ea1e44727d36ad37cdb56cb Author: Daniel Lezcano Date: Thu Oct 19 19:05:47 2017 +0200 thermal/drivers/hisi: Fix multiple alarm interrupts firing The DT specifies a threshold of 65000, we setup the register with a value in the temperature resolution for the controller, 64656. When we reach 64656, the interrupt fires, the interrupt is disabled. Then the irq thread runs and calls thermal_zone_device_update() which will call in turn hisi_thermal_get_temp(). The function will look if the temperature decreased, assuming it was more than 65000, but that is not the case because the current temperature is 64656 (because of the rounding when setting the threshold). This condition being true, we re-enable the interrupt which fires immediately after exiting the irq thread. That happens again and again until the temperature goes to more than 65000. Potentially, there is here an interrupt storm if the temperature stabilizes at this temperature. A very unlikely case but possible. In any case, it does not make sense to handle dozens of alarm interrupt for nothing. Fix this by rounding the threshold value to the controller resolution so the check against the threshold is consistent with the one set in the controller. Signed-off-by: Daniel Lezcano Reviewed-by: Leo Yan Tested-by: Leo Yan Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 48880b979cdc9ef5a70af020f42b8ba1e51dbd34 Author: Daniel Lezcano Date: Thu Oct 19 19:05:46 2017 +0200 thermal/drivers/hisi: Simplify the temperature/step computation The step and the base temperature are fixed values, we can simplify the computation by converting the base temperature to milli celsius and use a pre-computed step value. That saves us a lot of mult + div for nothing at runtime. Take also the opportunity to change the function names to be consistent with the rest of the code. Signed-off-by: Daniel Lezcano Reviewed-by: Leo Yan Tested-by: Leo Yan Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) commit 2cb4de785c40d4a2132cfc13e63828f5a28c3351 Author: Daniel Lezcano Date: Thu Oct 19 19:05:45 2017 +0200 thermal/drivers/hisi: Fix kernel panic on alarm interrupt The threaded interrupt for the alarm interrupt is requested before the temperature controller is setup. This one can fire an interrupt immediately leading to a kernel panic as the sensor data is not initialized. In order to prevent that, move the threaded irq after the Tsensor is setup. Signed-off-by: Daniel Lezcano Reviewed-by: Leo Yan Tested-by: Leo Yan Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit ff4ec2997df8fe7cc40513dbe5f86d9f88fb6be7 Author: Daniel Lezcano Date: Thu Oct 19 19:05:44 2017 +0200 thermal/drivers/hisi: Remove the multiple sensors support By essence, the tsensor does not really support multiple sensor at the same time. It allows to set a sensor and use it to get the temperature, another sensor could be switched but with a delay of 3-5ms. It is difficult to read simultaneously several sensors without a big delay. Today, just one sensor is used, it is not necessary to deal with multiple sensors in the code. Remove them and if it is needed in the future add them on top of a code which will be clean up in the meantime. Signed-off-by: Daniel Lezcano Reviewed-by: Leo Yan Acked-by: Wangtao (Kevin, Kirin) Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 75 +++++++++++------------------------------- 1 file changed, 19 insertions(+), 56 deletions(-) commit c176b10b025acee4dc8f2ab1cd64eb73b5ccef53 Author: Daniel Lezcano Date: Thu Oct 19 19:05:43 2017 +0200 thermal/drivers/hisi: Fix missing interrupt enablement The interrupt for the temperature threshold is not enabled at the end of the probe function, enable it after the setup is complete. On the other side, the irq_enabled is not correctly set as we are checking if the interrupt is masked where 'yes' means irq_enabled=false. irq_get_irqchip_state(data->irq, IRQCHIP_STATE_MASKED, &data->irq_enabled); As we are always enabling the interrupt, it is pointless to check if the interrupt is masked or not, just set irq_enabled to 'true'. Signed-off-by: Daniel Lezcano Reviewed-by: Leo Yan Tested-by: Leo Yan Signed-off-by: Eduardo Valentin drivers/thermal/hisi_thermal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ba817a8cfc2e128b59af7fe8b6af72ed38763b87 Author: Tony Lindgren Date: Mon Oct 16 14:07:14 2017 -0700 thermal: ti-soc-thermal: Fix ti_thermal_unregister_cpu_cooling NULL pointer on unload While debugging some PM issues and trying to remove all the loaded modules, I ran across the following when unloading ti-soc-thermal: Unable to handle kernel NULL pointer dereference at virtual address 000000b4 ... [] (kobject_put) from [] (ti_thermal_unregister_cpu_cooling+0x20/0x28 [ti_soc_thermal]) [] (ti_thermal_unregister_cpu_cooling [ti_soc_thermal]) from [] (ti_bandgap_remove+0x3c/0x104 [ti_soc_thermal]) [] (ti_bandgap_remove [ti_soc_thermal]) from [] (platform_drv_remove+0x24/0x3c) [] (platform_drv_remove) from [] (device_release_driver_internal+0x160/0x208) [] (device_release_driver_internal) from [] (driver_detach+0x38/0x6c) [] (driver_detach) from [] (bus_remove_driver+0x4c/0xa0) [] (bus_remove_driver) from [] (SyS_delete_module+0x168/0x238) [] (SyS_delete_module) from [] (ret_fast_syscall+0x0/0x28) Cc: Keerthy Signed-off-by: Tony Lindgren Signed-off-by: Eduardo Valentin drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d668c807aa6ef3c3eef57b4e9e785ec0cfab4f6d Author: Niklas Söderlund Date: Tue Oct 17 13:36:13 2017 +0200 thermal: rcar_gen3_thermal: fix initialization sequence for H3 ES2.0 The initialization sequence for H3 (r8a7795) ES1.x and ES2.0 is different. H3 ES2.0 and later uses the same sequence as M3 (r8a7796) ES1.0. Fix this by not looking at compatible strings and instead defaulting to the r8a7796 initialization sequence and use soc_device_match() to check for H3 ES1.x. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Acked-by: Wolfram Sang Signed-off-by: Eduardo Valentin drivers/thermal/rcar_gen3_thermal.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) commit 0cf3a1ac3e10a5920531e38cf2ae99fa1e4d45a2 Author: Baruch Siach Date: Thu Sep 14 18:06:57 2017 +0300 thermal: armada: fix formula documentation comment The formula implementation at armada_get_temp() indicates that the sign in the formula is inverted. Cc: Ezequiel Garcia Signed-off-by: Baruch Siach Signed-off-by: Eduardo Valentin drivers/thermal/armada_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fba81cc09bd3cd71ca43cd66ca7223217eaa054 Author: Nicolin Chen Date: Tue Sep 5 00:41:16 2017 -0700 thermal: tegra: remove null check for dev pointer The dev pointer is going through a null check after a dereference. So this patch removes that useless check since the driver does not pass a null dev pointer in any case. Signed-off-by: Nicolin Chen Signed-off-by: Eduardo Valentin drivers/thermal/tegra/soctherm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fec3624f0bcdb6b20ef9ccf9d9d55d0d75d776f8 Author: Allen Wild Date: Tue Sep 26 19:37:44 2017 +0200 thermal: enable broadcom menu for arm64 bcm2835 Moving the bcm2835 thermal driver to the broadcom directory prevented it from getting enabled for arm64 builds, since the broadcom directory is only available when 32-bit specific ARCH_BCM is set. Fix this by enabling the Broadcom menu for ARCH_BCM or ARCH_BCM2835. Fixes: 6892cf07e733 ("thermal: bcm2835: move to the broadcom subdirectory") Reviewed-by: Eric Anholt Signed-off-by: Allen Wild Signed-off-by: Stefan Wahren Signed-off-by: Eduardo Valentin drivers/thermal/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4eca8cac256a9557f9e1295147df8135c0b3540f Author: Rocky Hao Date: Thu Aug 24 18:27:52 2017 +0800 thermal: rockchip: Support the RV1108 SoC in thermal driver RV1108 SOC has one Temperature Sensor for CPU. Reviewed-by: Caesar Wang Signed-off-by: Rocky Hao Signed-off-by: Eduardo Valentin drivers/thermal/rockchip_thermal.c | 67 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit 1027d759c9517a255f663d4365d98d78d8680b20 Author: Rocky Hao Date: Thu Aug 24 18:27:51 2017 +0800 dt-bindings: rockchip-thermal: Support the RV1108 SoC compatible Add a new compatible for thermal founding on RV1108 SoCs. Acked-by: Rob Herring Signed-off-by: Rocky Hao Signed-off-by: Eduardo Valentin Documentation/devicetree/bindings/thermal/rockchip-thermal.txt | 1 + 1 file changed, 1 insertion(+) commit e8a8d8672824474720f86b91e30eeec2a258bc42 Merge: 170b8ff 2f4b411 Author: David S. Miller Date: Wed Nov 1 11:08:18 2017 +0900 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-10-31 This series contains updates to i40e, i40evf and net/sched. Arnd Bergmann cleans up the power management code to resolve a build warning. Shannon Nelson fixes i40e to only redistribute our vectors when we did not get the full count that we requested. Alex reverts a previous commit because it potentially causes a memory leak when combined with the current page recycling scheme. Amritha enables configuring cloud filters in i40e using the tc-flower classifier. The classification function of the filter is to match a packet to a traffic class. cls_flower is extended to offload classid to hardware. Hardware traffic classes are identified using classid values reserved in the range :ffe0 - :ffef. The cloud filters are added for a VSI and are cleaned up when the VSI is deleted. The filters that match on L4 ports needs enhanced admin queue functions with big buffer support for extended fields in cloud filter commands. ==================== Signed-off-by: David S. Miller commit 170b8ffa71412eeacb20589b807f4bc75a61e507 Author: Brenda J. Butler Date: Tue Oct 31 14:29:03 2017 -0400 tc-testing: better test case file error reporting tdc.py reads a bunch of test cases in json files. When a json file cannot be parsed, tdc just exits and does not run any tests. This patch will cause tdc to print a message with the file name and line number, then that file will be ignored and the rest of the tests will be processed. Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tdc.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 6c26c3fbc3295ce71f5e03caccc9eeb7369123ca Author: Brenda J. Butler Date: Tue Oct 31 14:28:35 2017 -0400 tc-testing: better check if thing is list Check if tcase[k] is an instance of a list (is or is derived from list) instead of checking if it is a list. This will be useful if the data structures change to be something that implements list, instead of being an actual list. In that case, this code will not have to change. Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tdc_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ae677fb85f46c6b1c0545a0558c507ab940d7c4 Author: Brenda J. Butler Date: Tue Oct 31 14:28:02 2017 -0400 tc-testing: correction to docstring in get_unique_item Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tdc_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 181d6610f5311868f092d033f0273140dd44fb8a Author: Brenda J. Butler Date: Tue Oct 31 14:27:28 2017 -0400 tc-testing: split config file Move the config customization into a site-local file tdc_config_local.py, so that updates of the tdc test software does not require hand-editing of the config. This patch includes a template for the site-local customization file. In addition, this makes it easy to revert to a stock tdc environment for testing the test framework and/or the core tests. Also it makes it harder for any custom config to be submitted back to the kernel tdc. Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tdc_config.py | 14 +++++++++++++ .../tc-testing/tdc_config_local_template.py | 23 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit a5a5efe9998d6f28263324b8aa3e77a1b6cc465e Author: Brenda J. Butler Date: Tue Oct 31 14:26:54 2017 -0400 tc-testing: gitignore, ignore standard python artifacts Ignore .pyc files, "python compiled" files, that get created when a python script is run. They should never be committed. Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/.gitignore | 1 + 1 file changed, 1 insertion(+) commit 7dfbe5b64fe8f619bc056a7f81421e8beab373f1 Author: Brenda J. Butler Date: Tue Oct 31 14:25:46 2017 -0400 tc-testing: very simple example test cases As part of documentation, supply some very simple test cases to illustrate how test cases work. One test case shows commands in the setup, command, verify and teardown stages. Other test cases show how to have a working test case that does not have commands in the setup, verify and/or teardown stages. Specifically, the command lists for setup and teardown can be empty. And the verify command must have a command, but it can be /bin/true. The regex must have a string, we recommend a single space, and the count of matches must be zero if you do not want to use the match feature of verify. Verify will always look for a return code of success (0) so we give /bin/true when we do not want to make a check there. Also, update the documentation for testcases to be more specific in the cases of: - accepting non-success return codes in setup and teardown stages - how to write the test when no setup, teardown and/or verify are desired. To run the example test cases: $ sudo -E ./tdc.py -f creating-testcases/example.json -l 1f: (example) simple test to test framework 2f: (example) simple test, no need for verify 3f: (example) simple test, no need for setup or teardown (or verify) $ sudo -E ./tdc.py -f creating-testcases/example.json Test 1f: simple test to test framework Test 2f: simple test, no need for verify Test 3f: simple test, no need for setup or teardown (or verify) All test results: 1..3 ok 1 1f simple test to test framework ok 2 2f simple test, no need for verify ok 3 3f simple test, no need for setup or teardown (or verify) $ Signed-off-by: Brenda J. Butler Acked-by: Lucas Bates Signed-off-by: David S. Miller .../creating-testcases/AddingTestCases.txt | 12 +++++ .../tc-testing/creating-testcases/example.json | 55 ++++++++++++++++++++++ .../tc-testing/creating-testcases/template.json | 15 +++++- 3 files changed, 80 insertions(+), 2 deletions(-) commit ee7d1631966c083b5f1edb6e83ada4d6e4e72784 Merge: aa2bc73 675080f Author: David S. Miller Date: Wed Nov 1 10:57:24 2017 +0900 Merge branch 'l2tp-remove-unused-code' Guillaume Nault says: ==================== l2tp: remove unused code Patch #1 removes the ref/deref mechanism that was originally used to prevent ppp pseudowires from dropping their sockets. This mechanism was error prone and isn't used anymore. Patch #2 removes some module specific refcount debugging. Patches #3 and #4 take care of some dead code. ==================== Signed-off-by: David S. Miller commit 675080f2391f8b6ecb2c807e3eb7693e12847502 Author: Guillaume Nault Date: Tue Oct 31 17:36:46 2017 +0100 l2tp: remove field 'dev' from struct l2tp_eth This field has never been used. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_eth.c | 5 ----- 1 file changed, 5 deletions(-) commit c7fa745d988812c4dea7dbc645f025c5bfa4917e Author: Guillaume Nault Date: Tue Oct 31 17:36:45 2017 +0100 l2tp: remove l2tp_tunnel_count and l2tp_session_count These variables have never been used. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 10 ---------- 1 file changed, 10 deletions(-) commit 9ff672ba4eefd0821b4ad696511d7b4e94b7e539 Author: Guillaume Nault Date: Tue Oct 31 17:36:44 2017 +0100 l2tp: remove l2tp specific refcount debugging With conversion to refcount_t, such manual debugging code doesn't make sense anymore. The tunnel part was already dropped by 54652eb12c1b ("l2tp: hold tunnel while looking up sessions in l2tp_netlink"). Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.h | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) commit a4346210c4e092de50594b728300766121a3b00d Author: Guillaume Nault Date: Tue Oct 31 17:36:42 2017 +0100 l2tp: remove ->ref() and ->deref() The ->ref() and ->deref() callbacks are unused since PPP stopped using them in ee40fb2e1eb5 ("l2tp: protect sock pointer of struct pppol2tp_session with RCU"). We can thus remove them from struct l2tp_session and drop the do_ref parameter of l2tp_session_get*(). Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 52 ++++++++----------------------------------------- net/l2tp/l2tp_core.h | 10 +++------- net/l2tp/l2tp_debugfs.c | 4 +--- net/l2tp/l2tp_ip.c | 4 +--- net/l2tp/l2tp_ip6.c | 4 +--- net/l2tp/l2tp_netlink.c | 20 ++++++++----------- net/l2tp/l2tp_ppp.c | 10 +++------- 7 files changed, 25 insertions(+), 79 deletions(-) commit 6705fc944107756857f5f2301f99a9ba7f702a04 Merge: b177571 47e3ec0 Author: Stephen Boyd Date: Tue Oct 31 16:28:02 2017 -0700 Merge tag 'v4.15-rockchip-clk-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-next Pull Rockchip clk drivers updates from Heiko Stuebner: - new clock ids for rk3188 and rk3368 - removal of a superfluous memory allocation error message * tag 'v4.15-rockchip-clk-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: use new cif/vdpu clock ids on rk3188 clk: rockchip: export clock pclk_efuse_256 for RK3368 SoCs clk: rockchip: add more rk3188 graphics clock ids clk: rockchip: add clock id for PCLK_EFUSE256 of RK3368 SoCs clk: rockchip: Remove superfluous error message in rockchip_clk_register_cpuclk() commit b177571b9d2d25e40879a043cd04633b035600ae Merge: 319663c 3f7a4d0 Author: Stephen Boyd Date: Tue Oct 31 16:25:38 2017 -0700 Merge tag 'clk-renesas-for-v4.15-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-next Pull Renesas clk driver updates from Geert Uytterhoeven: - Add support for the second display unit clock on RZ/G1E, - Add git repository to MAINTAINERS, - Add suspend/resume support for R-Car Gen3 CPG/MSSR, - Small fixes and cleanups. * tag 'clk-renesas-for-v4.15-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: rcar-gen3: Restore R clock during resume clk: renesas: rcar-gen3: Restore SDHI clocks during resume clk: renesas: div6: Restore clock state during resume clk: renesas: cpg-mssr: Add support to restore core clocks during resume clk: renesas: cpg-mssr: Restore module clocks during resume MAINTAINERS: Add git repository to Renesas clock driver section clk: renesas: cpg-mssr: Add du1 clock to R8A7745 clk: renesas: rz: clk-rz is meant for RZ/A1 clk: renesas: r8a77995: Correct parent clock of INTC-AP clk: renesas: r8a7796: Correct parent clock of INTC-AP clk: renesas: r8a7795: Correct parent clock of INTC-AP commit 319663c7d16e9f2329958205d8ff92c9ccb3ea21 Merge: ffc3eb6 762a1f2 Author: Stephen Boyd Date: Tue Oct 31 16:25:07 2017 -0700 Merge tag 'meson-clk-for-4.15' of git://github.com/baylibre/clk-meson into clk-next Pull Amlogic clock driver updates from Neil Armstrong: - Addition of Video Processing Unit VPU and VAPB clocks * tag 'meson-clk-for-4.15' of git://github.com/baylibre/clk-meson: clk: meson: gxbb: Add VPU and VAPB clocks data clk: meson: gxbb: Add VPU and VAPB clockids commit eccbf5fbb4dbeece1c611a4897a1b3679510b8bf Merge: fb56d68 f48729a Author: Thomas Gleixner Date: Wed Nov 1 00:11:16 2017 +0100 Merge branch 'clockevents/4.15' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clockevent updates from Daniel Lezcano: - Improve the generic clockevents dependency by factoring out the option in the Kconfig menu option (Arnd Bergmann) - Add missing "\n" in pr_err messages for fttmr010, owl and rockchip (Arvind Yadav) - Add missing timer_of_exit function to rollback timer_of_init (Benjamin Gaignard) - Fix path and add bindings to timers (Daniel Lezcano) - Cleanup and remove support for renesas,cmt-32* (Geert Uytterhoeven) - Add support for separate R-Car Gen2 (Magnus Damm) - Fix DEFINE_PER_CPU length definition to prevent warning at expansion time for the arm_arch_timer (Mark Rutland) - Remove pointless irq_save,restore in an already irq-disabled callback and add a shortcut optimization for the local cpu on mips-gic-timer (Matt Redfearn) commit 4f626a4ac8f57ddabf06d03870adab91e463217f Author: Roman Kapl Date: Mon Oct 30 11:56:13 2017 +0100 drm/radeon: fix atombios on big endian The function for byteswapping the data send to/from atombios was buggy for num_bytes not divisible by four. The function must be aware of the fact that after byte-swapping the u32 units, valid bytes might end up after the num_bytes boundary. This patch was tested on kernel 3.12 and allowed us to sucesfully use DisplayPort on and Radeon SI card. Namely it fixed the link training and EDID readout. The function is patched both in radeon and amd drivers, since the functions and the fixes are identical. Signed-off-by: Roman Kapl Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 38 +++++++++++++--------------- drivers/gpu/drm/radeon/atombios_dp.c | 38 +++++++++++++--------------- 2 files changed, 36 insertions(+), 40 deletions(-) commit bbb4d8d9ee81714b98c25df39a1ed90fa075e90a Author: Monk Liu Date: Mon Oct 23 10:30:57 2017 +0800 drm/ttm:fix memory leak due to individualize after individualize we need manually call reservation_object_fini() if all fences on resv signaled during test, otherwise kmemory leak Signed-off-by: Monk Liu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3fda0e737e906ce73220b20c27e7f792d0aac6a8 Author: Eric W. Biederman Date: Tue Oct 31 17:15:30 2017 -0500 userns: Simplify insert_extent Consolidate the code to write to the new mapping at the end of the function to remove the duplication. Move the increase in the number of mappings into insert_extent, keeping the logic together. Just a small increase in readability and maintainability. Signed-off-by: "Eric W. Biederman" kernel/user_namespace.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit ece66133979b211324cc6aff9285889b425243d2 Author: Eric W. Biederman Date: Tue Oct 31 16:53:09 2017 -0500 userns: Make map_id_down a wrapper for map_id_range_down There is no good reason for this code duplication, the number of cache line accesses not the number of instructions are the bottleneck in this code. Therefore simplify maintenance by removing unnecessary code. Signed-off-by: "Eric W. Biederman" kernel/user_namespace.c | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) commit d5e7b3c5f51fc6d34e12b6d87bfd30ab277c4625 Author: Eric W. Biederman Date: Tue Oct 31 17:09:34 2017 -0500 userns: Don't read extents twice in m_start This is important so reading /proc//{uid_map,gid_map,projid_map} while the map is being written does not do strange things. Signed-off-by: "Eric W. Biederman" kernel/user_namespace.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3edf652fa16562fb57a5a4b996ba72e2d7cdc38b Author: Eric W. Biederman Date: Tue Oct 31 16:27:29 2017 -0500 userns: Simplify the user and group mapping functions Consolidate reading the number of extents and computing the return value in the map_id_down, map_id_range_down and map_id_range. This removal of one read of extents makes one smp_rmb unnecessary and makes the code safe it is executed during the map write. Reading the number of extents twice and depending on the result being the same is not safe, as it could be 0 the first time and > 5 the second time, which would lead to misinterpreting the union fields. The consolidation of the return value just removes a duplicate caluculation which should make it easier to understand and maintain the code. Signed-off-by: "Eric W. Biederman" kernel/user_namespace.c | 132 +++++++++++++++++++++--------------------------- 1 file changed, 58 insertions(+), 74 deletions(-) commit 11a8b9270e16e36d5fb607ba4b60db2958b7c625 Author: Eric W. Biederman Date: Tue Oct 31 15:54:32 2017 -0500 userns: Don't special case a count of 0 We can always use a count of 1 so there is no reason to have a special case of a count of 0. Signed-off-by: Eric W. Biederman kernel/user_namespace.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 6397fac4915ab3002dc15aae751455da1a852f25 Author: Christian Brauner Date: Wed Oct 25 00:04:41 2017 +0200 userns: bump idmap limits to 340 There are quite some use cases where users run into the current limit for {g,u}id mappings. Consider a user requesting us to map everything but 999, and 1001 for a given range of 1000000000 with a sub{g,u}id layout of: some-user:100000:1000000000 some-user:999:1 some-user:1000:1 some-user:1001:1 some-user:1002:1 This translates to: MAPPING-TYPE | CONTAINER | HOST | RANGE | -------------|-----------|---------|-----------| uid | 999 | 999 | 1 | uid | 1001 | 1001 | 1 | uid | 0 | 1000000 | 999 | uid | 1000 | 1001000 | 1 | uid | 1002 | 1001002 | 999998998 | ------------------------------------------------ gid | 999 | 999 | 1 | gid | 1001 | 1001 | 1 | gid | 0 | 1000000 | 999 | gid | 1000 | 1001000 | 1 | gid | 1002 | 1001002 | 999998998 | which is already the current limit. As discussed at LPC simply bumping the number of limits is not going to work since this would mean that struct uid_gid_map won't fit into a single cache-line anymore thereby regressing performance for the base-cases. The same problem seems to arise when using a single pointer. So the idea is to use struct uid_gid_extent { u32 first; u32 lower_first; u32 count; }; struct uid_gid_map { /* 64 bytes -- 1 cache line */ u32 nr_extents; union { struct uid_gid_extent extent[UID_GID_MAP_MAX_BASE_EXTENTS]; struct { struct uid_gid_extent *forward; struct uid_gid_extent *reverse; }; }; }; For the base cases we will only use the struct uid_gid_extent extent member. If we go over UID_GID_MAP_MAX_BASE_EXTENTS mappings we perform a single 4k kmalloc() which means we can have a maximum of 340 mappings (340 * size(struct uid_gid_extent) = 4080). For the latter case we use two pointers "forward" and "reverse". The forward pointer points to an array sorted by "first" and the reverse pointer points to an array sorted by "lower_first". We can then perform binary search on those arrays. Performance Testing: When Eric introduced the extent-based struct uid_gid_map approach he measured the performanc impact of his idmap changes: > My benchmark consisted of going to single user mode where nothing else was > running. On an ext4 filesystem opening 1,000,000 files and looping through all > of the files 1000 times and calling fstat on the individuals files. This was > to ensure I was benchmarking stat times where the inodes were in the kernels > cache, but the inode values were not in the processors cache. My results: > v3.4-rc1: ~= 156ns (unmodified v3.4-rc1 with user namespace support disabled) > v3.4-rc1-userns-: ~= 155ns (v3.4-rc1 with my user namespace patches and user namespace support disabled) > v3.4-rc1-userns+: ~= 164ns (v3.4-rc1 with my user namespace patches and user namespace support enabled) I used an identical approach on my laptop. Here's a thorough description of what I did. I built a 4.14.0-rc4 mainline kernel with my new idmap patches applied. I booted into single user mode and used an ext4 filesystem to open/create 1,000,000 files. Then I looped through all of the files calling fstat() on each of them 1000 times and calculated the mean fstat() time for a single file. (The test program can be found below.) Here are the results. For fun, I compared the first version of my patch which scaled linearly with the new version of the patch: | # MAPPINGS | PATCH-V1 | PATCH-NEW | |--------------|------------|-----------| | 0 mappings | 158 ns | 158 ns | | 1 mappings | 164 ns | 157 ns | | 2 mappings | 170 ns | 158 ns | | 3 mappings | 175 ns | 161 ns | | 5 mappings | 187 ns | 165 ns | | 10 mappings | 218 ns | 199 ns | | 50 mappings | 528 ns | 218 ns | | 100 mappings | 980 ns | 229 ns | | 200 mappings | 1880 ns | 239 ns | | 300 mappings | 2760 ns | 240 ns | | 340 mappings | not tested | 248 ns | Here's the test program I used. I asked Eric what he did and this is a more "advanced" implementation of the idea. It's pretty straight-forward: #define __GNU_SOURCE #define __STDC_FORMAT_MACROS #include #include #include #include #include #include #include #include #include #include #include int main(int argc, char *argv[]) { int ret; size_t i, k; int fd[1000000]; int times[1000]; char pathname[4096]; struct stat st; struct timeval t1, t2; uint64_t time_in_mcs; uint64_t sum = 0; if (argc != 2) { fprintf(stderr, "Please specify a directory where to create " "the test files\n"); exit(EXIT_FAILURE); } for (i = 0; i < sizeof(fd) / sizeof(fd[0]); i++) { sprintf(pathname, "%s/idmap_test_%zu", argv[1], i); fd[i]= open(pathname, O_RDWR | O_CREAT, S_IXUSR | S_IXGRP | S_IXOTH); if (fd[i] < 0) { ssize_t j; for (j = i; j >= 0; j--) close(fd[j]); exit(EXIT_FAILURE); } } for (k = 0; k < 1000; k++) { ret = gettimeofday(&t1, NULL); if (ret < 0) goto close_all; for (i = 0; i < sizeof(fd) / sizeof(fd[0]); i++) { ret = fstat(fd[i], &st); if (ret < 0) goto close_all; } ret = gettimeofday(&t2, NULL); if (ret < 0) goto close_all; time_in_mcs = (1000000 * t2.tv_sec + t2.tv_usec) - (1000000 * t1.tv_sec + t1.tv_usec); printf("Total time in micro seconds: %" PRIu64 "\n", time_in_mcs); printf("Total time in nanoseconds: %" PRIu64 "\n", time_in_mcs * 1000); printf("Time per file in nanoseconds: %" PRIu64 "\n", (time_in_mcs * 1000) / 1000000); times[k] = (time_in_mcs * 1000) / 1000000; } close_all: for (i = 0; i < sizeof(fd) / sizeof(fd[0]); i++) close(fd[i]); if (ret < 0) exit(EXIT_FAILURE); for (k = 0; k < 1000; k++) { sum += times[k]; } printf("Mean time per file in nanoseconds: %" PRIu64 "\n", sum / 1000); exit(EXIT_SUCCESS);; } Signed-off-by: Christian Brauner CC: Serge Hallyn CC: Eric Biederman Signed-off-by: Eric W. Biederman include/linux/user_namespace.h | 7 +- kernel/user_namespace.c | 350 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 324 insertions(+), 33 deletions(-) commit aa4bf44dc851c6bdd4f7b61b5f2c56c84dfe2ff0 Author: Christian Brauner Date: Wed Oct 25 00:04:40 2017 +0200 userns: use union in {g,u}idmap struct - Add a struct containing two pointer to extents and wrap both the static extent array and the struct into a union. This is done in preparation for bumping the {g,u}idmap limits for user namespaces. - Add brackets around anonymous union when using designated initializers to initialize members in order to please gcc <= 4.4. Signed-off-by: Christian Brauner Signed-off-by: Eric W. Biederman include/linux/user_namespace.h | 18 +++++++++++++----- kernel/user.c | 30 ++++++++++++++++++------------ 2 files changed, 31 insertions(+), 17 deletions(-) commit fb56d689fb1c8f13d4d7168abf3838657b042885 Merge: 6c1e272 6546911 Author: Thomas Gleixner Date: Tue Oct 31 23:17:28 2017 +0100 Merge branch 'fortglx/4.15/time' of https://git.linaro.org/people/john.stultz/linux into timers/core Pull timekeeping updates from John Stultz: - More y2038 work from Arnd Bergmann - A new mechanism to allow RTC drivers to specify the resolution of the RTC so the suspend/resume code can make informed decisions whether to inject the suspended time or not in case of fast suspend/resume cycles. commit a695e43712242c354748e9bae5d137d4337a7694 Author: Christian König Date: Tue Oct 31 09:36:13 2017 +0100 drm/amdgpu: fix error handling in amdgpu_bo_do_create The bo structure is freed up in case of an error, so we can't do any accounting if that happens. Signed-off-by: Christian König Reviewed-by: Michel Dänzer CC: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4d98e5ee6084f6d7bc578c5d5f86de7156aaa4cb Author: Christian König Date: Mon Oct 30 14:57:43 2017 +0100 drm/ttm: once more fix ttm_buffer_object_transfer When the mutex is locked just in the moment we copy it we end up with a warning that we release a locked mutex. Fix this by properly reinitializing the mutex. Signed-off-by: Christian König Reviewed-by: Alex Deucher CC: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo_util.c | 1 + 1 file changed, 1 insertion(+) commit ffc3eb6f3a836ad2c05040989ac3ae7a113efcdd Merge: ae74ac0 4328a21 Author: Stephen Boyd Date: Tue Oct 31 14:52:21 2017 -0700 Merge tag 'sunxi-clk-for-4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-next Pull Allwinner clock driver updates from Maxime Ripard: - Addition of sigma/delta modulation for the audio PLLs on the newer SoCs - A83t Display clocks supports - minor fixes that didn't have any impact on current features * tag 'sunxi-clk-for-4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: sun4i: Export video PLLs clk: sunxi-ng: Add A83T display clocks clk: sunxi-ng: sun8i: a23: Use sigma-delta modulation for audio PLL clk: sunxi-ng: sun6i: Use sigma-delta modulation for audio PLL clk: sunxi-ng: sun5i: Use sigma-delta modulation for audio PLL clk: sunxi-ng: sun4i: Use sigma-delta modulation for audio PLL clk: sunxi-ng: sun8i: h3: Use sigma-delta modulation for audio PLL clk: sunxi-ng: nm: Add support for sigma-delta modulation clk: sunxi-ng: Add sigma-delta modulation support clk: sunxi-ng: nm: Check if requested rate is supported by fractional clock clk: sunxi-ng: sun5i: Fix bit offset of audio PLL post-divider clk: sunxi-ng: a83t: Fix invalid csi-mclk mux offset clk: sunxi-ng: sun6i: Rename HDMI DDC clock to avoid name collision clk: sunxi-ng: sun6i: Export video PLLs clk: sunxi-ng: Implement reset control status readback clk: sunxi-ng: Fix missing CLK_SET_RATE_PARENT in ccu-sun4i-a10.c clk: sunxi-ng: add CLK_SET_RATE_PARENT flag to H3 GPU clock clk: sunxi-ng: add CLK_SET_RATE_UNGATE to all H3 PLLs commit b231669ca350d98cd126841627d3f083046a81ef Author: Philipp Hug Date: Tue Oct 24 16:32:22 2017 +0200 platform/x86: ideapad-laptop: Add Lenovo Yoga 920-13IKB to no_hw_rfkill dmi list The Lenovo Yoga 920-13IKB does not have a hw rfkill switch, and trying to read the hw rfkill switch through the ideapad module causes it to always report as blocked. This commit adds the Lenovo Yoga 920-13IKB to the no_hw_rfkill dmi list, fixing the WiFI breakage. Signed-off-by: Philipp Hug Signed-off-by: Darren Hart (VMware) drivers/platform/x86/ideapad-laptop.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 1fe850062c9ee15a3bea1ae90aef386a492a1c5e Author: Kamal Heib Date: Wed Aug 23 15:08:19 2017 +0300 net/mlx5e: Switch channels counters to use stats group API Switch the channels counters to use the new stats group API. Signed-off-by: Kamal Heib Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 47 +--------- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 103 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 45 --------- 3 files changed, 106 insertions(+), 89 deletions(-) commit e185d43f59ccde68dff474f1f2b38b62f915d74c Author: Kamal Heib Date: Wed Aug 23 15:07:20 2017 +0300 net/mlx5e: Switch ipsec counters to use stats group API Switch the ipsec counters to use the new stats group API. Signed-off-by: Kamal Heib Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 10 +-------- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 24 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 9 deletions(-) commit 0e6f01a49d9c006e3ee3104ca5d4ccf722e154db Author: Kamal Heib Date: Wed Aug 23 15:05:58 2017 +0300 net/mlx5e: Switch pme counters to use stats group API Switch the pme counters to use the new stats group API. Signed-off-by: Kamal Heib Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 20 -------- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 54 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 10 ---- 3 files changed, 54 insertions(+), 30 deletions(-) commit 4377bea27696f45834d77b8e3c7206874d5a66e6 Author: Kamal Heib Date: Wed Aug 23 15:04:47 2017 +0300 net/mlx5e: Switch per prio pfc counters to use stats group API Switch the per prio pfc counters to use the new stats group API. Signed-off-by: Kamal Heib Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 73 +------------- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 111 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 14 --- 3 files changed, 113 insertions(+), 85 deletions(-) commit e6000651cf009280fedee6cbf951747a0beaffb4 Author: Kamal Heib Date: Wed Aug 23 15:03:03 2017 +0300 net/mlx5e: Switch per prio traffic counters to use stats group API Switch the per prio traffic counters to use the new stats group API. Signed-off-by: Kamal Heib Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 13 ------ drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 50 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 11 ----- 3 files changed, 50 insertions(+), 24 deletions(-) commit 9fd2b5f137f5f723c03f5018acb822dcebfba8f0 Author: Kamal Heib Date: Wed Aug 23 15:01:58 2017 +0300 net/mlx5e: Switch pcie counters to use stats group API Switch the pcie counters to use the new stats group API. Signed-off-by: Kamal Heib Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 25 ------ drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 94 +++++++++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 32 -------- 3 files changed, 93 insertions(+), 58 deletions(-) commit 3488bd4c3549ea805c48de522a8ede1edc902e4b Author: Kamal Heib Date: Wed Aug 23 15:00:40 2017 +0300 net/mlx5e: Switch ethernet extended counters to use stats group API Switch the ethernet extended counters to use the new stats group API. Signed-off-by: Kamal Heib Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 8 ---- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 47 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 13 +----- 3 files changed, 48 insertions(+), 20 deletions(-) commit 2e4df0b2415744548f612f26a33c701bd2ce37d8 Author: Kamal Heib Date: Wed Aug 23 14:58:47 2017 +0300 net/mlx5e: Switch physical statistical counters to use stats group API Switch the physical statistical counters to use the new stats group API. Signed-off-by: Kamal Heib Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 8 ---- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 45 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 14 +------ 3 files changed, 46 insertions(+), 21 deletions(-) commit e0e0def9e2a8c6320b5d8cb5b79b795a5a7df732 Author: Kamal Heib Date: Wed Aug 23 14:56:48 2017 +0300 net/mlx5e: Switch RFC 2819 counters to use stats group API Switch the RFC 2819 counters to use the new stats group API. Signed-off-by: Kamal Heib Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 8 ---- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 52 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 23 +--------- 3 files changed, 53 insertions(+), 30 deletions(-) commit fc8e64a3118ee13bc4cafa6a31ea74daf2d644d9 Author: Kamal Heib Date: Wed Aug 23 14:51:27 2017 +0300 net/mlx5e: Switch RFC 2863 counters to use stats group API Switch the RFC 2863 counters to use the new stats group API. Signed-off-by: Kamal Heib Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 8 ----- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 42 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 13 +------ 3 files changed, 43 insertions(+), 20 deletions(-) commit 6e6ef814d27b1fb3cd30fe62d700208065656401 Author: Kamal Heib Date: Wed Aug 23 14:49:57 2017 +0300 net/mlx5e: Switch IEEE 802.3 counters to use stats group API Switch the IEEE 802.3 counters to use the new stats group API. Signed-off-by: Kamal Heib Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 9 ---- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 57 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 28 +---------- 3 files changed, 58 insertions(+), 36 deletions(-) commit 40cab9f16cc378f61f5cff0710cdd6caa7db549b Author: Kamal Heib Date: Wed Aug 23 14:47:58 2017 +0300 net/mlx5e: Switch vport counters to use the stats group API Switch the vport counters to use the new stats group API. Signed-off-by: Kamal Heib Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 11 +--- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 77 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 45 ------------- 3 files changed, 78 insertions(+), 55 deletions(-) commit fd8dcdb8d2e72f6ab7caf63392bece01344b4b47 Author: Kamal Heib Date: Wed Aug 23 14:46:33 2017 +0300 net/mlx5e: Switch Q counters to use the stats group API Switch the Q counters to use the new stats group API. Signed-off-by: Kamal Heib Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 10 ------ drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 36 +++++++++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 5 --- 3 files changed, 35 insertions(+), 16 deletions(-) commit c0752f2bd6ee77aa9334da4f69e8f54a325d282b Author: Kamal Heib Date: Wed Aug 23 14:42:03 2017 +0300 net/mlx5e: Introduce stats group API Currently the mlx5e driver has multiple groups of stats, each group is used for different purposes and it may depend on hardware capabilities or not. The problem with the current implementation is that there is no clear API to create a new group of stats. This change define a new API to create a group of stats and simplifies the way of handling them by defining a new struct "mlx5e_stats_grp" which have the following three function pointers: - get_num_stats() - return the number of counters in the group. - fill_strings() - fill counters strings within the group. - fill_stats() - fill counters values within the group. The above function pointers are used within the ethtool callbaks while calling "ethtool -S" from userspace. This change also switch the SW group to use the new API. Signed-off-by: Kamal Heib Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 16 +-- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 107 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 50 ++-------- 4 files changed, 127 insertions(+), 48 deletions(-) commit 0e7d3a8d4ec3f662faa7ef7f2957459b33f2481d Author: Scott Bauer Date: Tue Oct 31 14:15:02 2017 -0600 MAINTAINERS: Remove Rafael from Opal maintainers. He is no longer working on storage. Signed-off-by: Scott Bauer Signed-off-by: Jens Axboe MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit b7636e816adcb52bc96b6fb7bc9d141cbfd17ddb Author: Kishon Vijay Abraham I Date: Wed Oct 11 14:14:38 2017 +0530 misc: pci_endpoint_test: Fix BUG_ON error during pci_disable_msi() pci_disable_msi() throws a Kernel BUG if the driver has successfully requested an IRQ and not released it. Fix it here by freeing IRQs before invoking pci_disable_msi(). Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/misc/pci_endpoint_test.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 139838fffec40296d7235982a1a9b917ba31530f Author: Kishon Vijay Abraham I Date: Wed Oct 11 14:14:37 2017 +0530 misc: pci_endpoint_test: Fix pci_endpoint_test not releasing resources on remove sscanf(misc_device->name, DRV_MODULE_NAME ".%d", &id) in pci_endpoint_test_remove() returns 0, which results in returning early without releasing the resources. This is as a result of misc_device not having a valid name. Fix it here. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/misc/pci_endpoint_test.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 80068c93688f6143100859c4856f895801c1a1d9 Author: Kishon Vijay Abraham I Date: Wed Oct 11 14:14:36 2017 +0530 misc: pci_endpoint_test: Fix failure path return values in probe Return value of pci_endpoint_test_probe is not set properly in a couple of failure cases. Fix it here. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Bjorn Helgaas drivers/misc/pci_endpoint_test.c | 2 ++ 1 file changed, 2 insertions(+) commit a2db2663bd72053ca1e4b4f36dfd31ba233c3a65 Author: Dan Carpenter Date: Sat Sep 30 11:16:51 2017 +0300 misc: pci_endpoint_test: Avoid triggering a BUG() If you call ida_simple_remove(&pci_endpoint_test_ida, id) with a negative "id" then it triggers an immediate BUG_ON(). Let's not allow that. Fixes: 2c156ac71c6b ("misc: Add host side PCI driver for PCI test function device") Signed-off-by: Dan Carpenter Signed-off-by: Bjorn Helgaas Acked-by: Kishon Vijay Abraham I drivers/misc/pci_endpoint_test.c | 2 ++ 1 file changed, 2 insertions(+) commit 1de3038d0082a1c2edd7a7b1b3381e38f42af0e7 Author: Arnaldo Carvalho de Melo Date: Tue Oct 31 11:32:23 2017 -0300 perf trace beauty kcmp: Beautify arguments For some unknown reason there is no entry in tracefs's syscalls for kcmp, i.e. no tracefs/events/syscalls/sys_{enter,exit}_kcmp, so we need to provide a data dictionary for the fields. To beautify the 'type' argument we automatically generate a strarray from tools/include/uapi/kcmp.h, the idx1 and idx2 args, nowadays used only if type == KCMP_FILE, are masked for all the other types and a lookup is made for the thread and fd to show the path, if possible, getting it from the probe:vfs_getname if in place or from procfs, races allowing. A system wide strace like tracing session, with callchains shows just one user so far in this fedora 25 machine: # perf trace --max-stack 5 -e kcmp 1502914.400 ( 0.001 ms): systemd/1 kcmp(pid1: 1 (systemd), pid2: 1 (systemd), type: FILE, idx1: 271, idx2: 25) = -1 ENOSYS Function not implemented syscall (/usr/lib64/libc-2.25.so) same_fd (/usr/lib/systemd/libsystemd-shared-233.so) service_add_fd_store (/usr/lib/systemd/systemd) service_notify_message.lto_priv.127 (/usr/lib/systemd/systemd) 1502914.407 ( 0.001 ms): systemd/1 kcmp(pid1: 1 (systemd), pid2: 1 (systemd), type: FILE, idx1: 270, idx2: 25) = -1 ENOSYS Function not implemented syscall (/usr/lib64/libc-2.25.so) same_fd (/usr/lib/systemd/libsystemd-shared-233.so) service_add_fd_store (/usr/lib/systemd/systemd) service_notify_message.lto_priv.127 (/usr/lib/systemd/systemd) The backtraces seem to agree this is really kcmp(), but this system doesn't have the sys_kcmp(), bummer: # uname -a Linux jouet 4.14.0-rc3+ #1 SMP Fri Oct 13 12:21:12 -03 2017 x86_64 x86_64 x86_64 GNU/Linux # grep kcmp /proc/kallsyms ffffffffb60b8890 W sys_kcmp $ grep CONFIG_CHECKPOINT_RESTORE ../build/v4.14.0-rc3+/.config # CONFIG_CHECKPOINT_RESTORE is not set $ So systemd uses it, good fedora kernel config has it: $ grep CONFIG_CHECKPOINT_RESTORE /boot/config-4.13.4-200.fc26.x86_64 CONFIG_CHECKPOINT_RESTORE=y [acme@jouet linux]$ /me goes to rebuild a kernel... Cc: Adrian Hunter Cc: Andrey Vagin Cc: Cyrill Gorcunov Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-gz5fca968viw8m7hryjqvrln@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 9 ++++++++ tools/perf/builtin-trace.c | 6 +++++ tools/perf/trace/beauty/Build | 1 + tools/perf/trace/beauty/beauty.h | 6 +++++ tools/perf/trace/beauty/kcmp.c | 44 ++++++++++++++++++++++++++++++++++++ tools/perf/trace/beauty/kcmp_type.sh | 10 ++++++++ 6 files changed, 76 insertions(+) commit 0a2f7540abc08e32f89ff273506eeeeb6910794f Author: Arnaldo Carvalho de Melo Date: Tue Oct 31 11:30:09 2017 -0300 perf trace beauty: Implement pid_fd beautifier One that given a pid and a fd, will try to get the path for that fd. Will be used in the upcoming kcmp's KCMP_FILE beautifier. Cc: Adrian Hunter Cc: Andrey Vagin Cc: Cyrill Gorcunov Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-7ketygp2dvs9h13wuakfncws@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 17 +++++++++++++++++ tools/perf/trace/beauty/beauty.h | 3 +++ 2 files changed, 20 insertions(+) commit 735e215e95e53b857000aaabe1b4707878b10f43 Author: Arnaldo Carvalho de Melo Date: Tue Oct 31 10:04:11 2017 -0300 tools include uapi: Grab a copy of linux/kcmp.h We will use it to generate tables for beautifying kcmp's 'type' arg. Cc: Adrian Hunter Cc: Andrey Vagin Cc: Cyrill Gorcunov Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-r35zr79invmpinfe1zu57cas@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/kcmp.h | 27 +++++++++++++++++++++++++++ tools/perf/check-headers.sh | 1 + 2 files changed, 28 insertions(+) commit d6332a176b869df1839abb26c8f80026a66d21d6 Author: Namhyung Kim Date: Fri Oct 20 14:15:33 2017 +0900 perf callchain: Fix double mapping al->addr for children without self period Milian Wolff found a problem he described in [1] and that for him would get fixed: "Note how most of the large offset values are now gone. Most notably, we get proper srcline resolution for the random.h and complex headers." Then Namhyung found the root cause: "I looked into it and found a bug handling cumulative (children) entries. For children entries that have no self period, the al->addr (so he->ip) ends up having an doubly-mapped address. It seems to be there from the beginning but only affects entries that have no srclines - finding srcline itself is done using a different address but it will show the invalid address if no srcline was found. I think we should fix the commit c7405d85d7a3 ("perf tools: Update cpumode for each cumulative entry")." [1] https://lkml.kernel.org/r/20171018185350.14893-7-milian.wolff@kdab.com Reported-by: Milian Wolff Signed-off-by: Namhyung Kim Tested-by: Milian Wolff Cc: Jin Yao Cc: Jiri Olsa Cc: kernel-team@lge.com Fixes: c7405d85d7a3 ("perf tools: Update cpumode for each cumulative entry") Link: https://lkml.kernel.org/r/20171020051533.GA2746@sejong Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/callchain.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit c06641169e861d6446a220cd7f0d22c6c88da8e1 Author: Colin Ian King Date: Tue Oct 31 09:56:06 2017 -0700 xfs: remove redundant assignment to variable bit Variable bit is being assigned a value that is never read, hence the assignment is redundant and can be removed. Cleans up clang warning: fs/xfs/libxfs/xfs_rtbitmap.c:675:3: warning: Value stored to 'bit' is never read Signed-off-by: Colin Ian King Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_rtbitmap.c | 1 - 1 file changed, 1 deletion(-) commit 2f4b411a3d6766e6362ffbf00e0495a2dfe92507 Author: Amritha Nambiar Date: Fri Oct 27 02:36:01 2017 -0700 i40e: Enable cloud filters via tc-flower This patch enables tc-flower based hardware offloads. tc flower filter provided by the kernel is configured as driver specific cloud filter. The patch implements functions and admin queue commands needed to support cloud filters in the driver and adds cloud filters to configure these tc-flower filters. The classification function of the filter is to direct matched packets to a traffic class. The hardware traffic class is set based on the the classid reserved in the range :ffe0 - :ffef. Match Dst MAC and route to TC0: prio 1 flower dst_mac 3c:fd:fe:a0:d6:70 skip_sw\ hw_tc 1 Match Dst IPv4,Dst Port and route to TC1: prio 2 flower dst_ip 192.168.3.5/32\ ip_proto udp dst_port 25 skip_sw\ hw_tc 2 Match Dst IPv6,Dst Port and route to TC1: prio 3 flower dst_ip fe8::200:1\ ip_proto udp dst_port 66 skip_sw\ hw_tc 2 Delete tc flower filter: Example: Flow Director Sideband is disabled while configuring cloud filters via tc-flower and until any cloud filter exists. Unsupported matches when cloud filters are added using enhanced big buffer cloud filter mode of underlying switch include: 1. source port and source IP 2. Combined MAC address and IP fields. 3. Not specifying L4 port These filter matches can however be used to redirect traffic to the main VSI (tc 0) which does not require the enhanced big buffer cloud filter support. Signed-off-by: Amritha Nambiar Signed-off-by: Kiran Patil Signed-off-by: Anjali Singhai Jain Signed-off-by: Jingjing Wu Acked-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 54 +- drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 3 + drivers/net/ethernet/intel/i40e/i40e_common.c | 189 ++++ drivers/net/ethernet/intel/i40e/i40e_main.c | 957 ++++++++++++++++++++- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 16 + drivers/net/ethernet/intel/i40e/i40e_type.h | 1 + .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 3 + 7 files changed, 1192 insertions(+), 31 deletions(-) commit ceb3c45b43ffd69220233e309f0f6f0a9d3125a6 Author: Sakari Ailus Date: Thu Aug 17 02:51:16 2017 -0400 media: arm: dts: omap3: N9/N950: Add flash references to the camera Add flash and indicator LED phandles to the sensor node. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Pavel Machek Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab arch/arm/boot/dts/omap3-n9.dts | 1 + arch/arm/boot/dts/omap3-n950-n9.dtsi | 4 ++-- arch/arm/boot/dts/omap3-n950.dts | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) commit 2e8a9fbb79508261703835dd4977014249c9e18f Author: Sakari Ailus Date: Mon Sep 25 05:50:16 2017 -0400 media: ov13858: Add support for flash and lens devices Parse async sub-devices related to the sensor by switching the async sub-device registration function. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov13858.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a42e78da596b18319ebc447f60c22fd6ce32322b Author: Sakari Ailus Date: Mon Sep 25 05:51:25 2017 -0400 media: ov5670: Add support for flash and lens devices Parse async sub-devices related to the sensor by switching the async sub-device registration function. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5670.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aaf66502b624784c2ff3cd54834e2598d1c40027 Author: Amritha Nambiar Date: Fri Oct 27 02:35:56 2017 -0700 i40e: Clean up of cloud filters Introduce the cloud filter data structure and cleanup of cloud filters associated with the device. Signed-off-by: Amritha Nambiar Acked-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 9 +++++++++ drivers/net/ethernet/intel/i40e/i40e_main.c | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit d8932f38c10ffb4b604c97d0765b500e8964cbd1 Author: Sakari Ailus Date: Mon Sep 25 05:51:51 2017 -0400 media: et8ek8: Add support for flash and lens devices Parse async sub-devices related to the sensor by switching the async sub-device registration function. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Pavel Machek Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/et8ek8/et8ek8_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c121ce59152a9cc00fbff0ca12becfc0ef0b8663 Author: Sakari Ailus Date: Sun Sep 24 18:53:38 2017 -0400 media: smiapp: Add support for flash and lens devices Parse async sub-devices related to the sensor by switching the async sub-device registration function. These types devices aren't directly related to the sensor, but are nevertheless handled by the smiapp driver due to the relationship of these component to the main part of the camera module --- the sensor. This does not yet address providing the user space with information on how to associate the sensor or lens devices but the kernel now has the necessary information to do that. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Pavel Machek Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4219f9f9c98ae28874c2b7390a561a2a77e6f64 Author: Sakari Ailus Date: Sun Sep 3 15:41:53 2017 -0400 media: dt: bindings: smiapp: Document lens-focus and flash-leds properties Document optional lens-focus and flash-leds properties for the smiapp driver. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Pavel Machek Acked-by: Rob Herring Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/i2c/nokia,smia.txt | 2 ++ 1 file changed, 2 insertions(+) commit 2c0015238f7d357f179249f101d6ed0327bc642a Author: Amritha Nambiar Date: Fri Oct 27 02:35:51 2017 -0700 i40e: Admin queue definitions for cloud filters Add new admin queue definitions and extended fields for cloud filter support. Define big buffer for extended general fields in Add/Remove Cloud filters command. Signed-off-by: Amritha Nambiar Signed-off-by: Kiran Patil Signed-off-by: Jingjing Wu Acked-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 107 ++++++++++++++++++++- .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 107 ++++++++++++++++++++- 2 files changed, 210 insertions(+), 4 deletions(-) commit aef69d54755d45edefbf347a51efd1673d7daed9 Author: Sakari Ailus Date: Sun Sep 24 18:47:44 2017 -0400 media: v4l: fwnode: Add a convenience function for registering sensors Add a convenience function for parsing firmware for information on related devices using v4l2_async_notifier_parse_fwnode_sensor_common() registering the notifier and finally the async sub-device itself. This should be useful for sensor drivers that do not have device specific requirements related to firmware information parsing or the async framework. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Reviewed-by: Niklas Söderlund Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 19 ++++++++++++---- drivers/media/v4l2-core/v4l2-fwnode.c | 41 +++++++++++++++++++++++++++++++++++ include/media/v4l2-async.h | 22 +++++++++++++++++++ include/media/v4l2-subdev.h | 3 +++ 4 files changed, 81 insertions(+), 4 deletions(-) commit 7a9ec808ad46d1e02e5e766a83adc5f88e5df264 Author: Sakari Ailus Date: Wed Sep 6 08:35:42 2017 -0400 media: v4l: fwnode: Add convenience function for parsing common external refs Add v4l2_fwnode_parse_reference_sensor_common for parsing common sensor properties that refer to adjacent devices such as flash or lens driver chips. As this is an association only, there's little a regular driver needs to know about these devices as such. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Pavel Machek Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-fwnode.c | 35 +++++++++++++++++++++++++++++++++++ include/media/v4l2-async.h | 3 ++- include/media/v4l2-fwnode.h | 21 +++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) commit a1699a4e525dedd2ecd03ce5f92e80c058e14e28 Author: Sakari Ailus Date: Thu Jun 22 08:03:28 2017 -0400 media: v4l: fwnode: Add a helper function to obtain device / integer references v4l2_fwnode_reference_parse_int_prop() will find an fwnode such that under the device's own fwnode, it will follow child fwnodes with the given property-value pair and return the resulting fwnode. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-fwnode.c | 287 ++++++++++++++++++++++++++++++++++ 1 file changed, 287 insertions(+) commit d84285390f0722fb6844880c48fbe7db8a183fc1 Author: Sakari Ailus Date: Tue Jun 20 07:47:24 2017 -0400 media: v4l: fwnode: Add a helper function for parsing generic references Add function v4l2_fwnode_reference_parse() for parsing them as async sub-devices. This can be done on e.g. flash or lens async sub-devices that are not part of but are associated with a sensor. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Niklas Söderlund Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-fwnode.c | 69 +++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit baf249e40fddd1793c7970b5afe7f10945dcfb0c Author: Sakari Ailus Date: Tue Aug 29 06:13:19 2017 -0400 media: v4l: fwnode: Move KernelDoc documentation to the header In V4L2 the practice is to have the KernelDoc documentation in the header and not in .c source code files. This consequently makes the V4L2 fwnode function documentation part of the Media documentation build. Also correct the link related function and argument naming in documentation and add an asterisk to v4l2_fwnode_endpoint_free() documentation to make it proper KernelDoc documentation. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund Acked-by: Hans Verkuil Acked-by: Pavel Machek Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-fwnode.c | 75 -------------------------------- include/media/v4l2-fwnode.h | 81 ++++++++++++++++++++++++++++++++++- 2 files changed, 80 insertions(+), 76 deletions(-) commit 95293f79d53995142ed1f66be70216a6cbfc36f4 Author: Sakari Ailus Date: Fri Mar 3 17:07:51 2017 -0500 media: dt: bindings: Add lens-focus binding for image sensors The lens-focus property contains a phandle to the lens voice coil driver that is associated to the sensor; typically both are contained in the same camera module. Signed-off-by: Sakari Ailus Cc: devicetree@vger.kernel.org Acked-by: Pavel Machek Reviewed-by: Sebastian Reichel Acked-by: Rob Herring Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/video-interfaces.txt | 2 ++ 1 file changed, 2 insertions(+) commit 26baf6dd63ddd2808561926cae6ecf16f56de38c Author: Sakari Ailus Date: Fri Mar 3 13:14:02 2017 -0500 media: dt: bindings: Add a binding for flash LED devices associated to a sensor Camera flash drivers (and LEDs) are separate from the sensor devices in DT. In order to make an association between the two, provide the association information to the software. Signed-off-by: Sakari Ailus Cc: devicetree@vger.kernel.org Acked-by: Hans Verkuil Acked-by: Pavel Machek Acked-by: Rob Herring Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/video-interfaces.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit d4d1fc61eb38ff8e5af657e2d2f2290859a277f2 Author: Tony Luck Date: Tue Oct 31 10:43:39 2017 -0700 ia64: Update fsyscall gettime to use modern vsyscall_update John Stultz provided the outline for this patch back in May 2014 here: http://patches.linaro.org/patch/30501/ but I let this sit on the shelf for too long and in the intervening years almost every field in "struct timekeeper" was changed. So this is almost completely different from his original. Though the key change in arch/ia64/kernel/fsys.S remains the same. The core logic change with the updated vsyscall method is that we preserve the base nanosecond value in shifted nanoseconds, which allows us to avoid truncating and rounding up to the next nanosecond every tick to avoid inconsistencies. Thus the logic moved from nsec = ((cycle_delta * mult)>>shift) + base_nsec; to nsec = ((cycle_delta * mult) + base_snsec) >> shift; Cc: John Stultz Cc: linux-ia64@vger.kernel.org Signed-off-by: Tony Luck arch/ia64/Kconfig | 2 +- arch/ia64/kernel/asm-offsets.c | 2 ++ arch/ia64/kernel/fsys.S | 8 +++---- arch/ia64/kernel/fsyscall_gtod_data.h | 10 +++++++-- arch/ia64/kernel/time.c | 40 ++++++++++++++++++----------------- 5 files changed, 36 insertions(+), 26 deletions(-) commit 466cae66eaa13c4895a80c19d7d8d3019c46ae6b Author: Sakari Ailus Date: Wed Sep 20 03:51:54 2017 -0400 media: v4l: async: Ensure only unique fwnodes are registered to notifiers While registering a notifier, check that each newly added fwnode is unique, and return an error if it is not. Also check that a newly added notifier does not have the same fwnodes twice. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Niklas Söderlund Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 86 +++++++++++++++++++++++++++++++++--- 1 file changed, 79 insertions(+), 7 deletions(-) commit 5efe0c6c2cafa7f458d793c85a1298e713af50e4 Author: Amritha Nambiar Date: Fri Oct 27 02:35:45 2017 -0700 i40e: Cloud filter mode for set_switch_config command Add definitions for L4 filters and switch modes based on cloud filters modes and extend the set switch config command to include the additional cloud filter mode. Signed-off-by: Amritha Nambiar Signed-off-by: Kiran Patil Acked-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 30 ++++++++++++++++++++++- drivers/net/ethernet/intel/i40e/i40e_common.c | 4 ++- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 2 +- drivers/net/ethernet/intel/i40e/i40e_type.h | 9 +++++++ 6 files changed, 44 insertions(+), 5 deletions(-) commit 2cab00bb076b9f0e8442e3d72425843d2b441143 Author: Sakari Ailus Date: Sun Sep 24 20:54:31 2017 -0400 media: v4l: async: Allow binding notifiers to sub-devices Registering a notifier has required the knowledge of struct v4l2_device for the reason that sub-devices generally are registered to the v4l2_device (as well as the media device, also available through v4l2_device). This information is not available for sub-device drivers at probe time. What this patch does is that it allows registering notifiers without having v4l2_device around. Instead the sub-device pointer is stored in the notifier. Once the sub-device of the driver that registered the notifier is registered, the notifier will gain the knowledge of the v4l2_device, and the binding of async sub-devices from the sub-device driver's notifier may proceed. The complete callback of the root notifier will be called only when the v4l2_device is available and no notifier has pending sub-devices to bind. No complete callbacks are supported for sub-device notifiers. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Niklas Söderlund Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 212 ++++++++++++++++++++++++++++------- include/media/v4l2-async.h | 19 +++- 2 files changed, 189 insertions(+), 42 deletions(-) commit a3620cb48d303f07160694c00d9c1c8f0ea96690 Author: Sakari Ailus Date: Sun Sep 24 20:48:08 2017 -0400 media: v4l: async: Prepare for async sub-device notifiers Refactor the V4L2 async framework a little in preparation for async sub-device notifiers. This avoids making some structural changes in the patch actually implementing sub-device notifiers, making that patch easier to review. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Niklas Söderlund Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 69 ++++++++++++++++++++++++++---------- 1 file changed, 50 insertions(+), 19 deletions(-) commit 479bc5a8c662e9d9de47e95ee26ebaf15f36a771 Author: Sakari Ailus Date: Wed Sep 6 10:48:33 2017 -0400 media: v4l: async: Allow async notifier register call succeed with no subdevs The information on how many async sub-devices would be bindable to a notifier is typically dependent on information from platform firmware and it's not driver's business to be aware of that. Many V4L2 main drivers are perfectly usable (and useful) without async sub-devices and so if there aren't any around, just proceed call the notifier's complete callback immediately without registering the notifier itself. If a driver needs to check whether there are async sub-devices available, it can be done by inspecting the notifier's num_subdevs field which tells the number of async sub-devices. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Niklas Söderlund Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 24def9b586349ec1ecea7989fc219e688d1d1e74 Author: Sakari Ailus Date: Mon Jul 17 10:04:20 2017 -0400 media: v4l: async: Register sub-devices before calling bound callback Register the sub-device before calling the notifier's bound callback. Doing this the other way around is problematic as the struct v4l2_device has not assigned for the sub-device yet and may be required by the bound callback. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Pavel Machek Acked-by: Niklas Söderlund Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ddddc18b219ada692704c5467d16fff8c79cf287 Author: Sakari Ailus Date: Fri Sep 1 08:27:32 2017 -0400 media: v4l: async: Introduce helpers for calling async ops callbacks Add three helper functions to call async operations callbacks. Besides simplifying callbacks, this allows async notifiers to have no ops set, i.e. it can be left NULL. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Pavel Machek Acked-by: Niklas Söderlund Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 56 +++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 17 deletions(-) commit b6ee3f0dcf43dc3e8dbbe9be9c4e728c8d52f1ba Author: Laurent Pinchart Date: Wed Aug 30 13:18:04 2017 -0400 media: v4l: async: Move async subdev notifier operations to a separate structure The async subdev notifier .bound(), .unbind() and .complete() operations are function pointers stored directly in the v4l2_async_subdev structure. As the structure isn't immutable, this creates a potential security risk as the function pointers are mutable. To fix this, move the function pointers to a new v4l2_async_subdev_operations structure that can be made const in drivers. Signed-off-by: Laurent Pinchart Acked-by: Hans Verkuil Acked-by: Niklas Söderlund Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/am437x/am437x-vpfe.c | 8 +++++-- drivers/media/platform/atmel/atmel-isc.c | 10 ++++++--- drivers/media/platform/atmel/atmel-isi.c | 10 ++++++--- drivers/media/platform/davinci/vpif_capture.c | 8 +++++-- drivers/media/platform/davinci/vpif_display.c | 8 +++++-- drivers/media/platform/exynos4-is/media-dev.c | 8 +++++-- drivers/media/platform/omap3isp/isp.c | 6 +++++- drivers/media/platform/pxa_camera.c | 8 +++++-- drivers/media/platform/qcom/camss-8x16/camss.c | 8 +++++-- drivers/media/platform/rcar-vin/rcar-core.c | 10 ++++++--- drivers/media/platform/rcar_drif.c | 10 ++++++--- drivers/media/platform/soc_camera/soc_camera.c | 14 ++++++------ drivers/media/platform/stm32/stm32-dcmi.c | 10 ++++++--- drivers/media/platform/ti-vpe/cal.c | 8 +++++-- drivers/media/platform/xilinx/xilinx-vipp.c | 8 +++++-- drivers/media/v4l2-core/v4l2-async.c | 30 ++++++++++++-------------- drivers/staging/media/imx/imx-media-dev.c | 8 +++++-- include/media/v4l2-async.h | 29 ++++++++++++++++--------- 18 files changed, 135 insertions(+), 66 deletions(-) commit bce9e317cec9c4ffff3dde1170c0ad70f5e690c8 Author: Sakari Ailus Date: Fri Sep 1 19:43:31 2017 -0400 media: omap3isp: Print the name of the entity where no source pads could be found If no source pads are found in an entity, print the name of the entity. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Pavel Machek Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/isp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit eae4cf8f262e35b60928058e36ce1e841a2ab917 Author: Sakari Ailus Date: Fri Sep 1 19:42:05 2017 -0400 media: omap3isp: Fix check for our own sub-devices We only want to link sub-devices that were bound to the async notifier the isp driver registered but there may be other sub-devices in the v4l2_device as well. Check for the correct async notifier. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Pavel Machek Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/isp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0b3bc855374c50b5ea85273553485af48caf2f7 Author: Eric Biggers Date: Sun Oct 29 06:30:19 2017 -0400 fscrypt: lock mutex before checking for bounce page pool fscrypt_initialize(), which allocates the global bounce page pool when an encrypted file is first accessed, uses "double-checked locking" to try to avoid locking fscrypt_init_mutex. However, it doesn't use any memory barriers, so it's theoretically possible for a thread to observe a bounce page pool which has not been fully initialized. This is a classic bug with "double-checked locking". While "only a theoretical issue" in the latest kernel, in pre-4.8 kernels the pointer that was checked was not even the last to be initialized, so it was easily possible for a crash (NULL pointer dereference) to happen. This was changed only incidentally by the large refactor to use fs/crypto/. Solve both problems in a trivial way that can easily be backported: just always take the mutex. It's theoretically less efficient, but it shouldn't be noticeable in practice as the mutex is only acquired very briefly once per encrypted file. Later I'd like to make this use a helper macro like DO_ONCE(). However, DO_ONCE() runs in atomic context, so we'd need to add a new macro that allows blocking. Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/crypto.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 85999e8ec0ee7cf1039152b34a3fc3d91e7e27c3 Author: Sakari Ailus Date: Fri Sep 1 18:41:19 2017 -0400 media: rcar-vin: Use generic parser for parsing fwnode endpoints Instead of using a custom driver implementation, use v4l2_async_notifier_parse_fwnode_endpoints() to parse the fwnode endpoints of the device. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar-vin/rcar-core.c | 107 +++++++++------------------- drivers/media/platform/rcar-vin/rcar-dma.c | 10 +-- drivers/media/platform/rcar-vin/rcar-v4l2.c | 14 ++-- drivers/media/platform/rcar-vin/rcar-vin.h | 4 +- 4 files changed, 46 insertions(+), 89 deletions(-) commit f4f864c1219cd88c01fd6359ffc870da9b4acf92 Author: Eric Biggers Date: Sun Oct 29 06:30:14 2017 -0400 fscrypt: add a documentation file for filesystem-level encryption Perhaps long overdue, add a documentation file for filesystem-level encryption, a.k.a. fscrypt or fs/crypto/, to the Documentation directory. The new file is based loosely on the latest version of the "EXT4 Encryption Design Document (public version)" Google Doc, but with many improvements made, including: - Reflect the reality that it is not specific to ext4 anymore. - More thoroughly document the design and user-visible API/behavior. - Replace outdated information, such as the outdated explanation of how encrypted filenames are hashed for indexed directories and how encrypted filenames are presented to userspace without the key. (This was changed just before release.) For now the focus is on the design and user-visible API/behavior, not on how to add encryption support to a filesystem --- since the internal API is still pretty messy and any standalone documentation for it would become outdated as things get refactored over time. Reviewed-by: Michael Halcrow Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Documentation/filesystems/fscrypt.rst | 610 ++++++++++++++++++++++++++++++++++ Documentation/filesystems/index.rst | 11 + MAINTAINERS | 1 + 3 files changed, 622 insertions(+) commit df4975663f2002f6e6ce9a203f63bfcc51742732 Author: Sakari Ailus Date: Fri Sep 1 17:56:32 2017 -0400 media: omap3isp: Use generic parser for parsing fwnode endpoints Instead of using a custom driver implementation, use v4l2_async_notifier_parse_fwnode_endpoints() to parse the fwnode endpoints of the device. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Reviewed-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap3isp/isp.c | 121 +++++++++++----------------------- drivers/media/platform/omap3isp/isp.h | 5 +- 2 files changed, 40 insertions(+), 86 deletions(-) commit aa5cb02ae938d450be882adac4023d8116a5acd5 Author: Amritha Nambiar Date: Fri Oct 27 02:35:40 2017 -0700 i40e: Map TCs with the VSI seids Add mapping of TCs with the seids of the channel VSIs. TC0 will be mapped to the main VSI seid and all other TCs are mapped to the seid of the corresponding channel VSI. Signed-off-by: Amritha Nambiar Acked-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++ 2 files changed, 3 insertions(+) commit 9ca4653121329595443df4e7a458154e8f745edf Author: Sakari Ailus Date: Thu Aug 17 11:28:21 2017 -0400 media: v4l: fwnode: Support generic parsing of graph endpoints in a device Add two functions for parsing devices graph endpoints: v4l2_async_notifier_parse_fwnode_endpoints and v4l2_async_notifier_parse_fwnode_endpoints_by_port. The former iterates over all endpoints whereas the latter only iterates over the endpoints in a given port. The former is mostly useful for existing drivers that currently implement the iteration over all the endpoints themselves whereas the latter is especially intended for devices with both sinks and sources: async sub-devices for external devices connected to the device's sources will have already been set up, or the external sub-devices are part of the master device. Depends-on: ("device property: preserve usecount for node passed to of_fwnode_graph_get_port_parent()") Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 31 ++++++ drivers/media/v4l2-core/v4l2-fwnode.c | 196 ++++++++++++++++++++++++++++++++++ include/media/v4l2-async.h | 24 ++++- include/media/v4l2-fwnode.h | 118 ++++++++++++++++++++ 4 files changed, 367 insertions(+), 2 deletions(-) commit 384c181e3780ddc45e70483e29d84495b484730d Author: Amritha Nambiar Date: Fri Oct 27 02:35:34 2017 -0700 net: sched: Identify hardware traffic classes using classid This patch offloads the classid to hardware and uses the classid reserved in the range :ffe0 - :ffef to identify hardware traffic classes reported via dev->num_tc. tcf_result structure contains the class ID of the class to which the packet belongs and is offloaded to hardware via flower filter. A new helper function is introduced to represent HW traffic classes 0 through 15 using the reserved classid values :ffe0 - :ffef. Signed-off-by: Amritha Nambiar Acked-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher include/net/pkt_cls.h | 1 + include/net/sch_generic.h | 7 +++++++ net/sched/cls_flower.c | 2 ++ 3 files changed, 10 insertions(+) commit d65b34135ff86e8e04144ccdfcc2824127e0a7e8 Author: Sakari Ailus Date: Tue Aug 29 06:17:06 2017 -0400 media: v4l: async: Add V4L2 async documentation to the documentation build The V4L2 async wasn't part of the documentation build. Fix this. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund Acked-by: Hans Verkuil Reviewed-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/v4l2-async.rst | 3 +++ Documentation/media/kapi/v4l2-core.rst | 1 + 2 files changed, 4 insertions(+) commit aa250f1186319f1e0b9b4a1d99022fe32251b8b6 Author: Alexander Duyck Date: Sat Oct 21 17:51:50 2017 -0700 i40e/i40evf: Revert "i40e/i40evf: bump tail only in multiples of 8" This reverts commit 11f29003d6376fb123b7c3779dba49bb56fb0815. I am reverting this as I am fairly certain this can result in a memory leak when combined with the current page recycling scheme. Specifically we end up attempting to allocate fewer buffers than we recycled and this results in us rewinding the next to alloc pointer which leads to leaks when we overwrite the rx_buffer_info when processing the next frame. Fixes: 11f29003d637 ("i40e/i40evf: bump tail only in multiples of 8") Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 9 --------- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 9 --------- 2 files changed, 18 deletions(-) commit 3e6b1cf7613393a7c8648133daf0e853c4e05220 Author: Shannon Nelson Date: Tue Oct 10 14:56:58 2017 -0700 i40e: only redistribute MSI-X vectors when needed Whether or not there are vectors_left, we only need to redistribute our vectors if we didn't get as many as we requested. With the current check, the code will try to redistribute even if we did in fact get all the vectors we requested - this can happen when we have more CPUs than we do vectors. This restores an earlier check to be sure we only redistribute if we didn't get the full count we requested. Fixes: 4ce20abc645f (i40e: fix MSI-X vector redistribution if hw limit is reached) Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 254d152a216750f508442cc3e502130e5f539ab4 Author: Arnd Bergmann Date: Tue Oct 10 10:17:38 2017 +0200 i40e: mark PM functions as __maybe_unused A cleanup of the PM code left an incorrect #ifdef in place, leading to a harmless build warning: drivers/net/ethernet/intel/i40e/i40e_main.c:12223:12: error: 'i40e_resume' defined but not used [-Werror=unused-function] drivers/net/ethernet/intel/i40e/i40e_main.c:12185:12: error: 'i40e_suspend' defined but not used [-Werror=unused-function] It's easier to use __maybe_unused attributes here, since you can't pick the wrong one. Fixes: 0e5d3da40055 ("i40e: use newer generic PM support instead of legacy PM callbacks") Signed-off-by: Arnd Bergmann Tested-by: Andrew Bowers Acked-by: Jacob Keller Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit cb91775711b2f3f7adea8d33aa83104baf75ee07 Author: Arnd Bergmann Date: Thu Oct 19 16:47:49 2017 +0200 isofs: use unsigned char types consistently Based on the discussion about the signed character field for the year, I went through all fields in the iso9660 and rockridge standards to see whether they should used signed or unsigned characters. Only a single 8-bit value is defined as signed per 'section 7.1.2': the timezone offset in a timestamp, this has always been handled correctly through explicit sign-extension. All others are either '7.1.1 8-bit unsigned numerical values' or composite fields. I also read the linux source code and came to the same conclusion, also I could not find any other part of the implementation that actually behaves differently for signed or unsigned values. Since it is still ambigous to use plain 'char' in interface definitions, I'm changing all fields representing numbers and reserved bytes to the unambiguous '__u8'. Fields that hold actual strings are left as 'char' arrays. I built the code with '-Wpointer-sign -Wsign-compare' to see if anything got left out, but couldn't find anything wrong with the remaining warnings. This patch should not change runtime behavior and does not need to be backported. Signed-off-by: Arnd Bergmann Signed-off-by: Jan Kara fs/isofs/isofs.h | 20 +++--- fs/isofs/rock.h | 62 ++++++++--------- include/uapi/linux/iso_fs.h | 162 ++++++++++++++++++++++---------------------- 3 files changed, 122 insertions(+), 122 deletions(-) commit 34be4dbf87fc3e474a842305394534216d428f5d Author: Arnd Bergmann Date: Thu Oct 19 16:47:48 2017 +0200 isofs: fix timestamps beyond 2027 isofs uses a 'char' variable to load the number of years since 1900 for an inode timestamp. On architectures that use a signed char type by default, this results in an invalid date for anything beyond 2027. This changes the function argument to a 'u8' array, which is defined the same way on all architectures, and unambiguously lets us use years until 2155. This should be backported to all kernels that might still be in use by that date. Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Jan Kara fs/isofs/isofs.h | 2 +- fs/isofs/rock.h | 2 +- fs/isofs/util.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit ab97f87325e28b7ef7717e6cb62e8da14a7176e1 Author: Elena Reshetova Date: Fri Oct 20 13:26:02 2017 +0300 fsnotify: convert fsnotify_mark.refcnt from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable fsnotify_mark.refcnt is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: Jan Kara fs/notify/inotify/inotify_user.c | 4 ++-- fs/notify/mark.c | 14 +++++++------- include/linux/fsnotify_backend.h | 2 +- kernel/audit_tree.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) commit 6685df31255493c3f0e9e0b8bf885e4c9762fc5d Author: Miklos Szeredi Date: Mon Oct 30 21:14:56 2017 +0100 fanotify: clean up CONFIG_FANOTIFY_ACCESS_PERMISSIONS ifdefs The only negative from this patch should be an addition of 32bytes to 'struct fsnotify_group' if CONFIG_FANOTIFY_ACCESS_PERMISSIONS is not defined. Reviewed-by: Amir Goldstein Signed-off-by: Miklos Szeredi Signed-off-by: Jan Kara fs/notify/fanotify/fanotify.c | 30 +++++++------------------- fs/notify/fanotify/fanotify.h | 8 +++++-- fs/notify/fanotify/fanotify_user.c | 43 ++++++++++++++------------------------ include/linux/fsnotify_backend.h | 2 -- 4 files changed, 29 insertions(+), 54 deletions(-) commit 3427ce7155412341aeb635c22c3ca2c2c9d1a978 Author: Miklos Szeredi Date: Mon Oct 30 21:14:56 2017 +0100 fsnotify: clean up fsnotify() Use helpers to get first and next marks from connector. Also get rid of inode_node/vfsmount_node local variables, which just refers to the same objects as iter_info. There was an srcu_dereference() for foo_node, but that's completely superfluous since we've already done it when obtaining foo_node. Also get rid of inode_group/vfsmount_group local variables; checking against non-NULL for these is the same as checking against non-NULL inode_mark/vfsmount_mark. Reviewed-by: Amir Goldstein Signed-off-by: Miklos Szeredi Signed-off-by: Jan Kara fs/notify/fsnotify.c | 105 ++++++++++++++++++++++----------------------------- 1 file changed, 45 insertions(+), 60 deletions(-) commit f37650f1c7c71cf5180b43229d13b421d81e7170 Author: Miklos Szeredi Date: Mon Oct 30 21:14:56 2017 +0100 fanotify: fix fsnotify_prepare_user_wait() failure If fsnotify_prepare_user_wait() fails, we leave the event on the notification list. Which will result in a warning in fsnotify_destroy_event() and later use-after-free. Instead of adding a new helper to remove the event from the list in this case, I opted to move the prepare/finish up into fanotify_handle_event(). This will allow these to be moved further out into the generic code later, and perhaps let us move to non-sleeping RCU. Reviewed-by: Amir Goldstein Signed-off-by: Miklos Szeredi Fixes: 05f0e38724e8 ("fanotify: Release SRCU lock when waiting for userspace response") Cc: # v4.12 Signed-off-by: Jan Kara fs/notify/fanotify/fanotify.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit 9a31d7ad997f55768c687974ce36b759065b49e5 Author: Miklos Szeredi Date: Mon Oct 30 21:14:56 2017 +0100 fsnotify: fix pinning group in fsnotify_prepare_user_wait() Blind increment of group's user_waits is not enough, we could be far enough in the group's destruction that it isn't taken into account (i.e. grabbing the mark ref afterwards doesn't guarantee that it was the ref coming from the _group_ that was grabbed). Instead we need to check (under lock) that the mark is still attached to the group after having obtained a ref to the mark. If not, skip it. Reviewed-by: Amir Goldstein Signed-off-by: Miklos Szeredi Fixes: 9385a84d7e1f ("fsnotify: Pass fsnotify_iter_info into handle_event handler") Cc: # v4.12 Signed-off-by: Jan Kara fs/notify/mark.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit 0d6ec079d6aaa098b978d6395973bb027c752a03 Author: Miklos Szeredi Date: Mon Oct 30 21:14:55 2017 +0100 fsnotify: pin both inode and vfsmount mark We may fail to pin one of the marks in fsnotify_prepare_user_wait() when dropping the srcu read lock, resulting in use after free at the next iteration. Solution is to store both marks in iter_info instead of just the one we'll be sending the event for. Reviewed-by: Amir Goldstein Signed-off-by: Miklos Szeredi Fixes: 9385a84d7e1f ("fsnotify: Pass fsnotify_iter_info into handle_event handler") Cc: # v4.12 Signed-off-by: Jan Kara fs/notify/fsnotify.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 24c20305c7fc8959836211cb8c50aab93ae0e54f Author: Miklos Szeredi Date: Mon Oct 30 21:14:55 2017 +0100 fsnotify: clean up fsnotify_prepare/finish_user_wait() This patch doesn't actually fix any bug, just paves the way for fixing mark and group pinning. Reviewed-by: Amir Goldstein Signed-off-by: Miklos Szeredi Cc: # v4.12 Signed-off-by: Jan Kara fs/notify/mark.c | 96 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) commit 7761daa6a1599fa5479b8da367470f632a1927e0 Author: Elena Reshetova Date: Fri Oct 20 13:26:01 2017 +0300 fsnotify: convert fsnotify_group.refcnt from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable fsnotify_group.refcnt is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: Jan Kara fs/notify/group.c | 6 +++--- include/linux/fsnotify_backend.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) commit 9cf90cef362d44b2f3fcdb7d0694849a6308b620 Author: Jan Kara Date: Tue Oct 31 10:09:25 2017 +0100 fsnotify: Protect bail out path of fsnotify_add_mark_locked() properly When fsnotify_add_mark_locked() fails it cleans up the mark it was adding. Since the mark is already visible in group's list, we should protect update of mark->flags with mark->lock. I'm not aware of any real issues this could cause (since we also hold group->mark_mutex) but better be safe and obey locking rules properly. Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/mark.c | 2 ++ 1 file changed, 2 insertions(+) commit c8114d90707d04922a8f23345a88eb6baa19424f Author: Sakari Ailus Date: Mon Sep 4 12:44:39 2017 -0400 media: v4l: async: Use more intuitive names for internal functions Rename internal functions to make the names of the functions better describe what they do. Old name New name v4l2_async_test_notify v4l2_async_match_notify v4l2_async_belongs v4l2_async_find_match Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Pavel Machek Reviewed-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Acked-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit b3a0066005821acdc0cdb092cb72587182ab583f Author: Jan Kara Date: Tue Oct 31 09:53:28 2017 +0100 dnotify: Handle errors from fsnotify_add_mark_locked() in fcntl_dirnotify() fsnotify_add_mark_locked() can fail but we do not check its return value. This didn't matter before commit 9dd813c15b2c "fsnotify: Move mark list head from object into dedicated structure" as none of possible failures could happen for dnotify but after that commit -ENOMEM can be returned. Handle this error properly in fcntl_dirnotify() as otherwise we just hit BUG_ON(dn_mark->dn) in dnotify_free_mark(). Reviewed-by: Amir Goldstein Reported-by: syzkaller Fixes: 9dd813c15b2c101168808d4f5941a29985758973 Signed-off-by: Jan Kara fs/notify/dnotify/dnotify.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 7fc4fdb9e1bd821c0bd39543d233ac5246aef2de Author: Sakari Ailus Date: Tue Oct 3 02:26:32 2017 -0400 media: v4l: async: Correctly serialise async sub-device unregistration The check whether an async sub-device is bound to a notifier was performed without list_lock held, making it possible for another process to unbind the async sub-device before the sub-device unregistration function proceeds to take the lock. Fix this by first acquiring the lock and then proceeding with the check. Signed-off-by: Sakari Ailus Reviewed-by: Sebastian Reichel Acked-by: Hans Verkuil Acked-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit d18d1a5ac811d12f7ebc1129230312b5f2c50cb8 Author: Chris Wilson Date: Tue Oct 31 11:55:35 2017 +0000 drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all To acquire all modeset locks requires a ww_ctx to be allocated. As this is the legacy path and the allocation small, to reduce the changes required (and complex untested error handling) to the legacy drivers, we simply assume that the allocation succeeds. At present, it relies on the too-small-to-fail rule, but syzbot found that by injecting a failure here we would hit the WARN. Document that this allocation must succeed with __GFP_NOFAIL. Signed-off-by: Chris Wilson Cc: Daniel Vetter Reported-by: syzbot Signed-off-by: Daniel Vetter Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171031115535.15166-1-chris@chris-wilson.co.uk drivers/gpu/drm/drm_modeset_lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57072758623fa4f3019bce65e2b00f24af8dfdd7 Author: Alexandre Belloni Date: Fri Oct 13 00:06:45 2017 +0200 rtc: omap: 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-omap.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 26e480f7bb7840fc0daa9c3af7c4501b2cf5902f Author: Alexandre Belloni Date: Fri Oct 13 00:06:44 2017 +0200 rtc: omap: fix error path when pinctrl_register fails If pinctrl_register() fails probe will return with an error without locking the RTC and disabling pm_runtime. Set ret and jump to err instead. Fixes: 97ea1906b3c2 ("rtc: omap: Support ext_wakeup configuration") Signed-off-by: Alexandre Belloni drivers/rtc/rtc-omap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fb45f436b8186cafc95939087ce1dc565be26c3d Author: Sakari Ailus Date: Mon Oct 2 06:24:54 2017 -0400 media: v4l: async: Fix notifier complete callback error handling The notifier complete callback may return an error. This error code was simply returned to the caller but never handled properly. Move calling the complete callback function to the caller from v4l2_async_test_notify and undo the work that was done either in async sub-device or async notifier registration. Reported-by: Russell King Signed-off-by: Sakari Ailus Acked-by: Niklas Söderlund Reviewed-by: Sebastian Reichel Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 78 +++++++++++++++++++++++++++--------- 1 file changed, 60 insertions(+), 18 deletions(-) commit e33d7c56450b0a5c7290cbf9e1581fab5174f552 Author: Douglas Gilbert Date: Sun Oct 29 10:47:19 2017 -0400 scsi: scsi_debug: write_same: fix error report The scsi_debug driver incorrectly suggests there is an error with the SCSI WRITE SAME command when the number_of_logical_blocks is greater than 1. It will also suggest there is an error when NDOB (no data-out buffer) is set and the number_of_logical_blocks is greater than 0. Both are valid, fix. Signed-off-by: Douglas Gilbert Signed-off-by: Martin K. Petersen drivers/scsi/scsi_debug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 013ee633465a2edf4d22548d268ac7367b6bf851 Author: Arvind Yadav Date: Sun Oct 29 11:39:46 2017 +0530 scsi: scsi_transport_iscsi: fix spelling mistake: 'Cound' -> 'Could' Trivial fix to spelling mistakes in 'iscsi_get_host_stats'. Signed-off-by: Arvind Yadav Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39bef87c140aa9586ba55ede3bb856261c5e9d57 Author: Finn Thain Date: Thu Oct 26 16:51:50 2017 +1100 scsi: NCR5380: Suppress SDTR and WDTR message logging The 5380 drivers only support asynchronous transfers and the 5380 controllers only have narrow busses. Hence, the core driver will reject any SDTR and WDTR messages from target devices. Don't log this, it's expected behaviour. Also, fix the off-by-one array indices in the arguments to scmd_printk(). Tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen drivers/scsi/NCR5380.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit d84c198f43c50c6c0bd57571acbf0f000165bd56 Author: Matthew R. Ochs Date: Wed Oct 25 16:36:29 2017 -0500 scsi: cxlflash: Derive pid through accessors The cxlflash driver tracks process IDs alongside contexts to validate context ownership. Currently, the process IDs are derived by directly accessing values from the 'current' task pointer. While this method of access is fine for the current process, it is incorrect when the parent process ID is needed as the access requires serialization. To address the incorrect issue and provide a consistent means of deriving the process ID within the cxlflash driver, use the task accessors defined linux/sched.h. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/superpipe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0d4191305e69e42b3f7f11bbcf077d1d42929f94 Author: Matthew R. Ochs Date: Wed Oct 25 16:36:20 2017 -0500 scsi: cxlflash: Allow cards without WWPN VPD to configure Currently, all adapters that cxlflash supports must have WWPN VPD keywords to complete configuration. This was required as cards with external FC ports needed to be programmed with WWPNs. Newer supported cards do not have an external FC interface and therefore do not require WWPN. To support backwards compatibility, these devices have included 'dummy' WWPN VPD with WWPN values of zero. This however places a dependency that all future cards have WWPN VPD, which may not always be the case. Allow for cards to not have WWPN, designating which cards are expected to have it in order to configure properly. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/main.c | 24 +++++++++++++++++------- drivers/scsi/cxlflash/main.h | 3 ++- 2 files changed, 19 insertions(+), 8 deletions(-) commit 285e6670d0229b0157a9167eb8b2626b445a5a0e Author: Matthew R. Ochs Date: Wed Oct 25 16:35:57 2017 -0500 scsi: cxlflash: Use derived maximum write same length The existing write same routine within the cxlflash driver uses a statically defined value for the maximum write same transfer length. While this is close to the value reflected by the original device that was supported by cxlflash, newer devices are capable of much larger lengths. Supporting what the device is capable of offers substantial performance improvement as the scrub routine within cxlflash operates on 'chunk size' units (256MB with a 4K sector size). Instead of a #define, use the write same maximum length that is stored in the block layer in units of 512 byte sectors. This value is initially determined from the block limits VPD page during device discovery and can also be manipulated from sysfs. As a general cleanup, designate the timeout used when executing the write same command as constant. Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen drivers/scsi/cxlflash/sislite.h | 3 --- drivers/scsi/cxlflash/vlun.c | 6 ++++-- 2 files changed, 4 insertions(+), 5 deletions(-) commit 4a6125c5038c93dd1fd1b1b75f3463b54eca543a Author: Xiaofei Tan Date: Tue Oct 24 23:51:49 2017 +0800 scsi: hisi_sas: add v3 hw port AXI error handling Add support for servicing AXI errors handling. We do a host controller reset for such errors. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 42 ++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 5 deletions(-) commit fa2314081571f549bff4b2d7857603b2dada5c2f Author: Xiaofei Tan Date: Tue Oct 24 23:51:48 2017 +0800 scsi: hisi_sas: add v3 hw support for AXI fatal error Add support for processing AXI bus fatal errors. If AXI bus fatal error happen, do controller reset to recover. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 125 +++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) commit 571295f8055c0b69c9911021ae6cf1a6973cf517 Author: Xiaofei Tan Date: Tue Oct 24 23:51:47 2017 +0800 scsi: hisi_sas: complete all tasklets prior to host reset The CQ event is handled in tasklet context, and it could be delayed if the system loading is high. It is possible to run into some problems when executing a host reset when cq_tasklet_vx_hw() is being executed. So, prior to host reset, execute tasklet_kill() to ensure that all CQ tasklets are complete. Besides, as the function hisi_sas_wait_tasklets_done() is added to do tasklet_kill(), this patch refactors some code where tasklet_kill() is used. Signed-off-by: Xiaofei Tan 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 | 11 +++++++++++ drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 8 ++------ drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 ++- 4 files changed, 16 insertions(+), 7 deletions(-) commit 13cd5ed612dad10f998e341e0ab1e0019aeb4217 Author: Xiang Chen Date: Tue Oct 24 23:51:46 2017 +0800 scsi: hisi_sas: fix a bug when free device for v3 hw Use completion to wait on ITCT CLR interrupt finishing before processing other things when freeing a device. This is safer than the pre-existing process of polling the register. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) commit b4241f0fa3e445ad4e2d06b7370d45195fd7a627 Author: Xiaofei Tan Date: Tue Oct 24 23:51:45 2017 +0800 scsi: hisi_sas: add hisi_hba.rst_work init for v3 hw Add init code of hisi_hba->rst_work for v3 hw. Because v3 hw also need it to recover controller when some hw errors occurs. Signed-off-by: Xiaofei Tan 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 | 3 ++- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) commit ffc8f149c2b03e7232d24e819f3d235dce62502f Author: Xiaofei Tan Date: Tue Oct 24 23:51:44 2017 +0800 scsi: hisi_sas: add v3 hw DFX feature Realise get_events() to add DFX feature for v3 hw. Just like v2 hw, We support the following errors: - loss_of_dword_sync_count - invalid_dword_count - phy_reset_problem_count - running_disparity_error_count Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit d40bfb0dc0e397fe08c37789729f3ce26cb19dc2 Author: Xiaofei Tan Date: Tue Oct 24 23:51:43 2017 +0800 scsi: hisi_sas: init connect cfg register for v3 hw Add initialization of register CON_CFG_DRIVER for v3 hw, to limit number of the times of setup connection. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 +++ 1 file changed, 3 insertions(+) commit 0e3231fc930b25a6db5cf709457c2221d520edf9 Author: Xiaofei Tan Date: Tue Oct 24 23:51:42 2017 +0800 scsi: hisi_sas: check PHY state in get_wideport_bitmap_v3_hw() We should check register PHY_STATE when getting the bitmap of a wideport, as, if the PHY is not ready, the value of register PHY_PORT_NUM_MA is not valid. V2 hw has done this check, and v3 hw should do this check too. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 633d185b7239a4b342bab4cc15a414f7d74635ad Author: Niklas Söderlund Date: Mon Oct 2 16:16:52 2017 -0400 media: v4l: async: fix unbind error in v4l2_async_notifier_unregister() The call to v4l2_async_cleanup() will set sd->asd to NULL so passing it to notifier->unbind() has no effect and leaves the notifier confused. Call the unbind() callback prior to cleaning up the subdevice to avoid this. Signed-off-by: Niklas Söderlund Signed-off-by: Sakari Ailus Reviewed-by: Sebastian Reichel Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 99b7a995a4a02522292ea6313bd626a33fb0e037 Author: Sakari Ailus Date: Tue Oct 3 07:10:41 2017 -0400 media: v4l: async: Don't set sd->dev NULL in v4l2_async_cleanup v4l2_async_cleanup() is called when the async sub-device is unbound from the media device. As the pointer is set by the driver registering the async sub-device, leave the pointer as set by the driver. Signed-off-by: Sakari Ailus Reviewed-by: Sebastian Reichel Acked-by: Hans Verkuil Acked-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 1 - 1 file changed, 1 deletion(-) commit de8dd7b2afc3108a0dddd70f0fd897ab89e141ed Author: Sakari Ailus Date: Tue Sep 5 08:11:59 2017 -0400 media: v4l: async: Remove re-probing support Remove V4L2 async re-probing support. The re-probing support has been there to support cases where the sub-devices require resources provided by the main driver's hardware to function, such as clocks. Reprobing has allowed unbinding and again binding the main driver without explicitly unbinding the sub-device drivers. This is certainly not a common need, and the responsibility will be the user's going forward. An alternative could have been to introduce notifier specific locks. Considering the complexity of the re-probing and that it isn't really a solution to a problem but a workaround, remove re-probing instead. If there is a need to support the clock provider unregister/register cycle while keeping the clock references in the consumers in the future, this should be implemented in the clock framework instead, not in V4L2. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Acked-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Acked-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-async.c | 54 +----------------------------------- 1 file changed, 1 insertion(+), 53 deletions(-) commit f283c01b8094da9454f4b51c997f578227c29d95 Author: Akinobu Mita Date: Mon Oct 23 13:30:26 2017 -0400 media: ov9650: remove unnecessary terminated entry in menu items array The test_pattern_menu[] array has two valid items and a null terminated item. So the control's maximum value which is passed to v4l2_ctrl_new_std_menu_items() should be one. However, 'ARRAY_SIZE(test_pattern_menu) - 1' is actually passed and it's not correct. Fix it by removing unnecessary terminated entry and let the correct control's maximum value be passed to v4l2_ctrl_new_std_menu_items(). Cc: Sylwester Nawrocki Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov9650.c | 1 - 1 file changed, 1 deletion(-) commit dae82d9d47e0ffeed7f7efee4e760863cf6fd542 Author: Akinobu Mita Date: Thu Oct 19 12:31:23 2017 -0400 media: ov5640: don't clear V4L2_SUBDEV_FL_IS_I2C The v4l2_i2c_subdev_init() sets V4L2_SUBDEV_FL_IS_I2C flag in the subdev->flags. But this driver overwrites subdev->flags immediately after calling v4l2_i2c_subdev_init(). So V4L2_SUBDEV_FL_IS_I2C is not set after all. This stops breaking subdev->flags and preserves V4L2_SUBDEV_FL_IS_I2C. Side note: According to the comment in v4l2_device_unregister(), this is problematic only if the device is platform bus device. Device tree or ACPI based devices are not affected. Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b725eb682a634c6742660f85aa5736ee1009a42 Author: Akinobu Mita Date: Thu Oct 19 12:31:22 2017 -0400 media: ov2640: don't clear V4L2_SUBDEV_FL_IS_I2C The v4l2_i2c_subdev_init() sets V4L2_SUBDEV_FL_IS_I2C flag in the subdev->flags. But this driver overwrites subdev->flags immediately after calling v4l2_i2c_subdev_init(). So V4L2_SUBDEV_FL_IS_I2C is not set after all. This stops breaking subdev->flags and preserves V4L2_SUBDEV_FL_IS_I2C. Side note: According to the comment in v4l2_device_unregister(), this is problematic only if the device is platform bus device. Device tree or ACPI based devices are not affected. Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit baf1b186eaa1e0ac3a385c92b1a955b10c59ee84 Author: Akinobu Mita Date: Thu Oct 19 12:31:21 2017 -0400 media: max2175: don't clear V4L2_SUBDEV_FL_IS_I2C The v4l2_i2c_subdev_init() sets V4L2_SUBDEV_FL_IS_I2C flag in the subdev->flags. But this driver overwrites subdev->flags immediately after calling v4l2_i2c_subdev_init(). So V4L2_SUBDEV_FL_IS_I2C is not set after all. This stops breaking subdev->flags and preserves V4L2_SUBDEV_FL_IS_I2C. Side note: According to the comment in v4l2_device_unregister(), this is problematic only if the device is platform bus device. Device tree or ACPI based devices are not affected. Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita Acked-by: Ramesh Shanmugasundaram Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/max2175.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cc72c472654c493c461898d892e87cde97994be Author: Akinobu Mita Date: Thu Oct 19 12:31:20 2017 -0400 media: adv7180: don't clear V4L2_SUBDEV_FL_IS_I2C The v4l2_i2c_subdev_init() sets V4L2_SUBDEV_FL_IS_I2C flag in the subdev->flags. But this driver overwrites subdev->flags immediately after calling v4l2_i2c_subdev_init(). So V4L2_SUBDEV_FL_IS_I2C is not set after all. This stops breaking subdev->flags and preserves V4L2_SUBDEV_FL_IS_I2C. Side note: According to the comment in v4l2_device_unregister(), this is problematic only if the device is platform bus device. Device tree or ACPI based devices are not affected. Cc: Lars-Peter Clausen Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7180.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30863e38ebeb500a31cecee8096fb5002677dd9b Author: Brent Taylor Date: Mon Oct 30 22:32:45 2017 -0500 mtd: nand: Fix writing mtdoops to nand flash. When mtdoops calls mtd_panic_write(), it eventually calls panic_nand_write() in nand_base.c. In order to properly wait for the nand chip to be ready in panic_nand_wait(), the chip must first be selected. When using the atmel nand flash controller, a panic would occur due to a NULL pointer exception. Fixes: 2af7c6539931 ("mtd: Add panic_write for NAND flashes") Cc: Signed-off-by: Brent Taylor Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit ece1996a21eeb344b49200e627c6660111009c10 Author: Kees Cook Date: Tue Oct 17 19:04:43 2017 -0700 module: Do not paper over type mismatches in module_param_call() The module_param_call() macro was explicitly casting the .set and .get function prototypes away. This can lead to hard-to-find type mismatches. Now that all the function prototypes have been fixed tree-wide, we can drop these casts, and use named initializers too. Signed-off-by: Kees Cook Signed-off-by: Jessica Yu include/linux/moduleparam.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4dca7b7aa08b22893c45485d222b5807c1375ae Author: Kees Cook Date: Tue Oct 17 19:04:42 2017 -0700 treewide: Fix function prototypes for module_param_call() Several function prototypes for the set/get functions defined by module_param_call() have a slightly wrong argument types. This fixes those in an effort to clean up the calls when running under type-enforced compiler instrumentation for CFI. This is the result of running the following semantic patch: @match_module_param_call_function@ declarer name module_param_call; identifier _name, _set_func, _get_func; expression _arg, _mode; @@ module_param_call(_name, _set_func, _get_func, _arg, _mode); @fix_set_prototype depends on match_module_param_call_function@ identifier match_module_param_call_function._set_func; identifier _val, _param; type _val_type, _param_type; @@ int _set_func( -_val_type _val +const char * _val , -_param_type _param +const struct kernel_param * _param ) { ... } @fix_get_prototype depends on match_module_param_call_function@ identifier match_module_param_call_function._get_func; identifier _val, _param; type _val_type, _param_type; @@ int _get_func( -_val_type _val +char * _val , -_param_type _param +const struct kernel_param * _param ) { ... } Two additional by-hand changes are included for places where the above Coccinelle script didn't notice them: drivers/platform/x86/thinkpad_acpi.c fs/lockd/svc.c Signed-off-by: Kees Cook Signed-off-by: Jessica Yu arch/powerpc/platforms/pseries/cmm.c | 2 +- arch/x86/oprofile/nmi_int.c | 2 +- drivers/acpi/button.c | 6 ++++-- drivers/acpi/ec.c | 6 ++++-- drivers/acpi/sysfs.c | 8 +++++--- drivers/android/binder.c | 2 +- drivers/char/ipmi/ipmi_poweroff.c | 2 +- drivers/char/ipmi/ipmi_si_intf.c | 4 ++-- drivers/edac/edac_mc_sysfs.c | 2 +- drivers/edac/edac_module.c | 3 ++- drivers/hid/hid-magicmouse.c | 3 ++- drivers/ide/ide.c | 4 ++-- drivers/infiniband/hw/qib/qib_iba7322.c | 4 ++-- drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +- drivers/isdn/hardware/mISDN/avmfritz.c | 2 +- drivers/isdn/hardware/mISDN/mISDNinfineon.c | 2 +- drivers/isdn/hardware/mISDN/netjet.c | 2 +- drivers/isdn/hardware/mISDN/speedfax.c | 2 +- drivers/isdn/hardware/mISDN/w6692.c | 2 +- drivers/md/md.c | 6 +++--- drivers/media/pci/tw686x/tw686x-core.c | 4 ++-- drivers/media/usb/uvc/uvc_driver.c | 4 ++-- drivers/message/fusion/mptbase.c | 4 ++-- drivers/misc/kgdbts.c | 3 ++- drivers/mtd/devices/block2mtd.c | 2 +- drivers/mtd/devices/phram.c | 2 +- drivers/mtd/ubi/build.c | 2 +- drivers/pci/pcie/aspm.c | 5 +++-- drivers/platform/x86/thinkpad_acpi.c | 2 +- drivers/scsi/fcoe/fcoe_transport.c | 20 ++++++++++++-------- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 +- drivers/tty/serial/kgdboc.c | 3 ++- fs/fuse/inode.c | 4 ++-- fs/lockd/svc.c | 2 +- fs/ocfs2/dlmfs/dlmfs.c | 4 ++-- include/net/netfilter/nf_conntrack.h | 2 +- net/netfilter/nf_conntrack_core.c | 2 +- net/netfilter/nf_nat_ftp.c | 2 +- net/netfilter/nf_nat_irc.c | 2 +- net/sunrpc/svc.c | 4 ++-- security/apparmor/lsm.c | 16 ++++++++-------- 42 files changed, 87 insertions(+), 72 deletions(-) commit b2f270e8747387335d80428c576118e7d87f69cc Author: Kees Cook Date: Tue Oct 17 19:04:41 2017 -0700 module: Prepare to convert all module_param_call() prototypes After actually converting all module_param_call() function prototypes, we no longer need to do a tricky sizeof(func(thing)) type-check. Remove it. Signed-off-by: Kees Cook Signed-off-by: Jessica Yu include/linux/moduleparam.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 16416084e06e1ebff51a9e7721a8cc4ccc186f28 Author: Corentin Labbe Date: Tue Oct 31 09:19:15 2017 +0100 arm64: dts: allwinner: add snps,dwmac-mdio compatible to emac/mdio stmmac bindings docs said that its mdio node must have compatible = "snps,dwmac-mdio"; Since dwmac-sun8i does not have any good reasons to not doing it, all their MDIO node must have it. Signed-off-by: Corentin Labbe Acked-by: Florian Fainelli Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 1 + 1 file changed, 1 insertion(+) commit 94f442886711c6c4f4383a1c5a6994a788ba05d8 Author: Corentin Labbe Date: Tue Oct 31 09:19:13 2017 +0100 arm64: dts: allwinner: A64: Restore EMAC changes The original dwmac-sun8i DT bindings have some issue on how to handle integrated PHY and was reverted in last RC of 4.13. But now we have a solution so we need to get back that was reverted. This patch restore arm64 DT about dwmac-sun8i for A64 This reverts commit 87e1f5e8bb4b ("arm64: dts: allwinner: Revert EMAC changes") Signed-off-by: Corentin Labbe Acked-by: Florian Fainelli 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 ++++++++++++++++++++ 5 files changed, 84 insertions(+) commit 2bf209b8e28a5cf0a843d16005cfc7a432db888b Author: Corentin Labbe Date: Tue Oct 31 09:19:08 2017 +0100 dt-bindings: net: Restore sun8i dwmac binding The original dwmac-sun8i DT bindings have some issue on how to handle integrated PHY and was reverted in last RC of 4.13. But now we have a solution so we need to get back that was reverted. This patch restore dt-bindings documentation about dwmac-sun8i This reverts commit 8aa33ec2f481 ("dt-bindings: net: Revert sun8i dwmac binding") Signed-off-by: Corentin Labbe Acked-by: Rob Herring Acked-by: Florian Fainelli Signed-off-by: Maxime Ripard .../devicetree/bindings/net/dwmac-sun8i.txt | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) commit d0920a9cd7e735c429c510b523a100db82c937a1 Author: Andreas Gruenbacher Date: Fri Oct 13 00:39:38 2017 +0200 gfs2: Allow gfs2_xattr_set to be called with the glock held On the following call path: gfs2_setattr -> setattr_prepare -> ... -> cap_inode_killpriv -> ... -> gfs2_xattr_set the glock is locked in gfs2_setattr, so check for recursive locking in gfs2_xattr_set as gfs2_xattr_get already does. While at it, get rid of need_unlock in gfs2_xattr_get. Fixes xfstest generic/093. Signed-off-by: Andreas Gruenbacher Acked-by: Abhijith Das Signed-off-by: Bob Peterson fs/gfs2/xattr.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit b2623c2fe6eb1f757eff5a8fb515fe584caac667 Author: Andreas Gruenbacher Date: Mon Oct 9 17:55:58 2017 +0200 gfs2: Add support for statx inode flags Add support for the STATX_ATTR_ flags in statx. (Compression, encryption, and the nodump flag are not supported by gfs2.) Partially fixes xfstest generic/424. Signed-off-by: Andreas Gruenbacher Reviewed-by: Andrew Price Signed-off-by: Bob Peterson fs/gfs2/inode.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit b16f7e57b7811d5c60ef1858bd92339be28359bf Author: Andreas Gruenbacher Date: Mon Oct 9 16:15:30 2017 +0200 gfs2: Fix and clean up {GET,SET}FLAGS ioctl Switch to a simple array for mapping between the FS_*_FL and GFS_DIF_* flags. Clarify how the mapping between FS_JOURNAL_DATA_FL and the filesystem flags works. The GFS2_DIF_SYSTEM flag cannot be set from user space, so remove it from GFS2_FLAGS_USER_SET. Fail with -EINVAL when trying to set flags that are not supported instead of silently ignoring those flags. Partially fixes xfstest generic/424. Signed-off-by: Andreas Gruenbacher Reviewed-by: Andrew Price Signed-off-by: Bob Peterson fs/gfs2/file.c | 102 ++++++++++++++++++++++++++------------------------------- 1 file changed, 47 insertions(+), 55 deletions(-) commit 61d6899ad4268b6d95187053740fcb17a0d31632 Author: Andreas Gruenbacher Date: Wed Oct 4 16:39:18 2017 +0200 gfs2: Fix a harmless typo Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/trans.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6862c44ec5ad0261968c3bc47d23cffb088b6836 Author: Andreas Gruenbacher Date: Wed Oct 4 16:21:19 2017 +0200 gfs2: Fix xattr fsync Make sure that changing xattrs marks the corresponding inode dirty so that a subsequent fsync will sync those changes to disk. We set I_DIRTY_SYNC as well as I_DIRTY_DATASYNC so that both fsync and fdatasync will sync xattr changes: xattrs can contain information critical to how the data can be accessed, so we don't want fdatasync to skip them. Fixes xfstest generic/066. Signed-off-by: Andreas Gruenbacher Reviewed-by: Andrew Price Signed-off-by: Bob Peterson fs/gfs2/xattr.c | 40 ++++++++-------------------------------- 1 file changed, 8 insertions(+), 32 deletions(-) commit cc555b09d8c3817aeebda43a14ab67049a5653f7 Author: Bob Peterson Date: Wed Sep 20 08:30:04 2017 -0500 GFS2: Take inode off order_write list when setting jdata flag This patch fixes a deadlock caused when the jdata flag is set for inodes that are already on the ordered write list. Since it is on the ordered write list, log_flush calls gfs2_ordered_write which calls filemap_fdatawrite. But since the inode had the jdata flag set, that calls gfs2_jdata_writepages, which tries to start a new transaction. A new transaction cannot be started because it tries to acquire the log_flush rwsem which is already locked by the log flush operation. The bottom line is: We cannot switch an inode from ordered to jdata until we eliminate any ordered data pages (via log flush) or any log_flush operation afterward will create the circular dependency above. So we need to flush the log before setting the diskflags to switch the file mode, then we need to remove the inode from the ordered writes list. Before this patch, the log flush was done for jdata->ordered, but that's wrong. If we're going from jdata to ordered, we don't need to call gfs2_log_flush because the call to filemap_fdatawrite will do it for us: filemap_fdatawrite() -> __filemap_fdatawrite_range() __filemap_fdatawrite_range() -> do_writepages() do_writepages() -> gfs2_jdata_writepages() gfs2_jdata_writepages() -> gfs2_log_flush() This patch modifies function do_gfs2_set_flags so that if a file has its jdata flag set, and it's already on the ordered write list, the log will be flushed and it will be removed from the list before setting the flag. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher Acked-by: Abhijith Das fs/gfs2/file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit adbc3ddf28ad9c2742fb9fc82e2aacfd414a16c1 Author: Bob Peterson Date: Wed Oct 11 16:22:07 2017 +0200 GFS2: flush the log and all pages for jdata as we do for WB_SYNC_ALL In function gfs2_write_inode, starting with patch a9185b41a4f84, we only flush the log and call filemap_fdatawait if we're passed in a wbc sync_mode of WB_SYNC_ALL. We also need to do these things if we're evicting a jdata inode, because we might have jdata pages still attached to bufdata descriptors that need to be revoked, but by the time it gets to evict() it's too late to start a new transaction. This patch changes it to treat jdata inodes as if WB_SYNC_ALL had been specified. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher Acked-by: Abhijith Das fs/gfs2/super.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3a27411cb4bc3ce31db228e3569ad01b462a4310 Author: Andreas Gruenbacher Date: Wed Mar 15 19:12:59 2017 +0100 gfs2: Implement SEEK_HOLE / SEEK_DATA via iomap So far, lseek on gfs2 did not report holes. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/file.c | 17 ++++++++++++++--- fs/gfs2/inode.c | 38 ++++++++++++++++++++++++++++++++++++++ fs/gfs2/inode.h | 2 ++ 3 files changed, 54 insertions(+), 3 deletions(-) commit aac1a55b450c623ec236c0635cdb68408f632e9c Author: Bob Peterson Date: Thu Feb 16 21:13:54 2017 +0100 GFS2: Switch fiemap implementation to use iomap This patch switches GFS2's implementation of fiemap from the old block_map code to the new iomap interface. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher fs/gfs2/Kconfig | 1 + fs/gfs2/inode.c | 34 +++++++++------------------------- 2 files changed, 10 insertions(+), 25 deletions(-) commit 3974320ca6aa68d479051f208d5c95afd1e47a4c Author: Bob Peterson Date: Thu Feb 16 10:27:16 2017 -0500 GFS2: Implement iomap for block_map This patch implements iomap for block mapping, and switches the block_map function to use it under the covers. The additional IOMAP_F_BOUNDARY iomap flag indicates when iomap has reached a "metadata boundary" and fetching the next mapping is likely to incur an additional I/O. This flag is used for setting the bh buffer boundary flag. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher fs/gfs2/bmap.c | 273 +++++++++++++++++++++++++++++++++++++------------- fs/gfs2/bmap.h | 4 + fs/gfs2/trace_gfs2.h | 65 ++++++++++++ include/linux/iomap.h | 3 +- 4 files changed, 276 insertions(+), 69 deletions(-) commit 5f8bd4440d94729d1977fba6ca0b4875c2ee1515 Author: Bob Peterson Date: Fri Oct 28 14:29:29 2016 -0500 GFS2: Make height info part of metapath This patch eliminates height parameters from function gfs2_bmap_alloc. Function find_metapath determines the metapath's "find height", also known as the desired height. Function lookup_metapath determines the metapath's "actual height", previously known as starting height or sheight. Function gfs2_bmap_alloc now gets both height values from the metapath. This simplification was done as a step toward switching the block_map functions to using iomap. The bh_map responsibilities are also removed from function gfs2_bmap_alloc for the same reason. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher fs/gfs2/bmap.c | 109 ++++++++++++++++++++++++++++++++------------------------- 1 file changed, 62 insertions(+), 47 deletions(-) commit 6f0e8bf16730a36ff6773802d8c8df56d10e60cd Author: Juergen Gross Date: Fri Oct 27 19:49:37 2017 +0200 xen: support 52 bit physical addresses in pv guests Physical addresses on processors supporting 5 level paging can be up to 52 bits wide. For a Xen pv guest running on such a machine those physical addresses have to be supported in order to be able to use any memory on the machine even if the guest itself does not support 5 level paging. So when reading/writing a MFN from/to a pte don't use the kernel's PTE_PFN_MASK but a new XEN_PTE_MFN_MASK allowing full 40 bit wide MFNs. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky arch/x86/include/asm/xen/page.h | 11 ++++++++++- arch/x86/xen/mmu_pv.c | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) commit 5eee149ab9f83d1d0eb16c6b32a97d7060eeb490 Author: Stefano Stabellini Date: Mon Oct 30 15:41:03 2017 -0700 xen: introduce a Kconfig option to enable the pvcalls frontend Also add pvcalls-front to the Makefile. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/Kconfig | 11 +++++++++++ drivers/xen/Makefile | 1 + 2 files changed, 12 insertions(+) commit 235a71c5390316429e2c7823119c5ea439816beb Author: Stefano Stabellini Date: Mon Oct 30 15:41:02 2017 -0700 xen/pvcalls: implement release command Send PVCALLS_RELEASE to the backend and wait for a reply. Take both in_mutex and out_mutex to avoid concurrent accesses. Then, free the socket. For passive sockets, check whether we have already pre-allocated an active socket for the purpose of being accepted. If so, free that as well. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 98 +++++++++++++++++++++++++++++++++++++++++++++ drivers/xen/pvcalls-front.h | 1 + 2 files changed, 99 insertions(+) commit 5842c83596fcfa742978ec2840440ab56c7fdf79 Author: Stefano Stabellini Date: Mon Oct 30 15:41:01 2017 -0700 xen/pvcalls: implement poll command For active sockets, check the indexes and use the inflight_conn_req waitqueue to wait. For passive sockets if an accept is outstanding (PVCALLS_FLAG_ACCEPT_INFLIGHT), check if it has been answered by looking at bedata->rsp[req_id]. If so, return POLLIN. Otherwise use the inflight_accept_req waitqueue. If no accepts are inflight, send PVCALLS_POLL to the backend. If we have outstanding POLL requests awaiting for a response use the inflight_req waitqueue: inflight_req is awaken when a new response is received; on wakeup we check whether the POLL response is arrived by looking at the PVCALLS_FLAG_POLL_RET flag. We set the flag from pvcalls_front_event_handler, if the response was for a POLL command. In pvcalls_front_event_handler, get the struct sock_mapping from the poll id (we previously converted struct sock_mapping* to uintptr_t and used it as id). Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 144 +++++++++++++++++++++++++++++++++++++++++--- drivers/xen/pvcalls-front.h | 3 + 2 files changed, 138 insertions(+), 9 deletions(-) commit ae0d04052e077ccb71772bf5c7cb1049f4d587d2 Author: Stefano Stabellini Date: Mon Oct 30 15:41:00 2017 -0700 xen/pvcalls: implement recvmsg Implement recvmsg by copying data from the "in" ring. If not enough data is available and the recvmsg call is blocking, then wait on the inflight_conn_req waitqueue. Take the active socket in_mutex so that only one function can access the ring at any given time. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 111 ++++++++++++++++++++++++++++++++++++++++++++ drivers/xen/pvcalls-front.h | 4 ++ 2 files changed, 115 insertions(+) commit 45ddce214a797de65c0418bebf90c1b564c3ee3d Author: Stefano Stabellini Date: Mon Oct 30 15:40:59 2017 -0700 xen/pvcalls: implement sendmsg Send data to an active socket by copying data to the "out" ring. Take the active socket out_mutex so that only one function can access the ring at any given time. If not enough room is available on the ring, rather than returning immediately or sleep-waiting, spin for up to 5000 cycles. This small optimization turns out to improve performance significantly. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 121 ++++++++++++++++++++++++++++++++++++++++++++ drivers/xen/pvcalls-front.h | 3 ++ 2 files changed, 124 insertions(+) commit 9774c6cca26610d065a75d2ac8c5e3fcf0a209b3 Author: Stefano Stabellini Date: Mon Oct 30 15:40:58 2017 -0700 xen/pvcalls: implement accept command Introduce a waitqueue to allow only one outstanding accept command at any given time and to implement polling on the passive socket. Introduce a flags field to keep track of in-flight accept and poll commands. Send PVCALLS_ACCEPT to the backend. Allocate a new active socket. Make sure that only one accept command is executed at any given time by setting PVCALLS_FLAG_ACCEPT_INFLIGHT and waiting on the inflight_accept_req waitqueue. Convert the new struct sock_mapping pointer into an uintptr_t and use it as id for the new socket to pass to the backend. Check if the accept call is non-blocking: in that case after sending the ACCEPT command to the backend store the sock_mapping pointer of the new struct and the inflight req_id then return -EAGAIN (which will respond only when there is something to accept). Next time accept is called, we'll check if the ACCEPT command has been answered, if so we'll pick up where we left off, otherwise we return -EAGAIN again. Note that, differently from the other commands, we can use wait_event_interruptible (instead of wait_event) in the case of accept as we are able to track the req_id of the ACCEPT response that we are waiting. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 145 ++++++++++++++++++++++++++++++++++++++++++++ drivers/xen/pvcalls-front.h | 3 + 2 files changed, 148 insertions(+) commit 1853f11d72ed46310ff3c5a60264b2f8a53f8c25 Author: Stefano Stabellini Date: Mon Oct 30 15:40:57 2017 -0700 xen/pvcalls: implement listen command Send PVCALLS_LISTEN to the backend. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 57 +++++++++++++++++++++++++++++++++++++++++++++ drivers/xen/pvcalls-front.h | 1 + 2 files changed, 58 insertions(+) commit 67ea9893cbc2f892f491ec620d6bbab262b80770 Author: Stefano Stabellini Date: Mon Oct 30 15:40:56 2017 -0700 xen/pvcalls: implement bind command Send PVCALLS_BIND to the backend. Introduce a new structure, part of struct sock_mapping, to store information specific to passive sockets. Introduce a status field to keep track of the status of the passive socket. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 66 +++++++++++++++++++++++++++++++++++++++++++++ drivers/xen/pvcalls-front.h | 3 +++ 2 files changed, 69 insertions(+) commit cb1c7d9bbc878a67af270ccd2d23f6d1450579db Author: Stefano Stabellini Date: Mon Oct 30 15:40:55 2017 -0700 xen/pvcalls: implement connect command Send PVCALLS_CONNECT to the backend. Allocate a new ring and evtchn for the active socket. Introduce fields in struct sock_mapping to keep track of active sockets. Introduce a waitqueue to allow the frontend to wait on data coming from the backend on the active socket (recvmsg command). Two mutexes (one of reads and one for writes) will be used to protect the active socket in and out rings from concurrent accesses. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 158 ++++++++++++++++++++++++++++++++++++++++++++ drivers/xen/pvcalls-front.h | 2 + 2 files changed, 160 insertions(+) commit 2195046bfd69e487d9a76dc47840f15c8412840c Author: Stefano Stabellini Date: Mon Oct 30 15:40:54 2017 -0700 xen/pvcalls: implement socket command and handle events Send a PVCALLS_SOCKET command to the backend, use the masked req_prod_pvt as req_id. This way, req_id is guaranteed to be between 0 and PVCALLS_NR_REQ_PER_RING. We already have a slot in the rsp array ready for the response, and there cannot be two outstanding responses with the same req_id. Wait for the response by waiting on the inflight_req waitqueue and check for the req_id field in rsp[req_id]. Use atomic accesses and barriers to read the field. Note that the barriers are simple smp barriers (as opposed to virt barriers) because they are for internal frontend synchronization, not frontend<->backend communication. Once a response is received, clear the corresponding rsp slot by setting req_id to PVCALLS_INVALID_ID. Note that PVCALLS_INVALID_ID is invalid only from the frontend point of view. It is not part of the PVCalls protocol. pvcalls_front_event_handler is in charge of copying responses from the ring to the appropriate rsp slot. It is done by copying the body of the response first, then by copying req_id atomically. After the copies, wake up anybody waiting on waitqueue. socket_lock protects accesses to the ring. Convert the pointer to sock_mapping into an uintptr_t and use it as id for the new socket to pass to the backend. The struct will be fully initialized later on connect or bind. sock->sk->sk_send_head is not used for ip sockets: reuse the field to store a pointer to the struct sock_mapping corresponding to the socket. This way, we can easily get the struct sock_mapping from the struct socket. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 131 ++++++++++++++++++++++++++++++++++++++++++++ drivers/xen/pvcalls-front.h | 8 +++ 2 files changed, 139 insertions(+) commit 21968190991320c0d9b6d1280e7dfda420164db1 Author: Stefano Stabellini Date: Mon Oct 30 15:40:53 2017 -0700 xen/pvcalls: connect to the backend Implement the probe function for the pvcalls frontend. Read the supported versions, max-page-order and function-calls nodes from xenstore. Only one frontend<->backend connection is supported at any given time for a guest. Store the active frontend device to a static pointer. Introduce a stub functions for the event handler. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 132 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) commit aa7ba37678307fab5a57c0b4868db7ce60701d7a Author: Stefano Stabellini Date: Mon Oct 30 15:40:52 2017 -0700 xen/pvcalls: implement frontend disconnect Introduce a data structure named pvcalls_bedata. It contains pointers to the command ring, the event channel, a list of active sockets and a list of passive sockets. Lists accesses are protected by a spin_lock. Introduce a waitqueue to allow waiting for a response on commands sent to the backend. Introduce an array of struct xen_pvcalls_response to store commands responses. Introduce a new struct sock_mapping to keep track of sockets. In this patch the struct sock_mapping is minimal, the fields will be added by the next patches. pvcalls_refcount is used to keep count of the outstanding pvcalls users. Only remove connections once the refcount is zero. Implement pvcalls frontend removal function. Go through the list of active and passive sockets and free them all, one at a time. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 71 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) commit 416efba0bd69b2f57da95049d505fff289269c11 Author: Stefano Stabellini Date: Mon Oct 30 15:40:51 2017 -0700 xen/pvcalls: introduce the pvcalls xenbus frontend Introduce a xenbus frontend for the pvcalls protocol, as defined by https://xenbits.xen.org/docs/unstable/misc/pvcalls.html. This patch only adds the stubs, the code will be added by the following patches. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky drivers/xen/pvcalls-front.c | 61 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 7ed4325a44ea5a683547d4ce62578f812938cf94 Author: K. Y. Srinivasan Date: Sun Oct 29 11:33:41 2017 -0700 Drivers: hv: vmbus: Make panic reporting to be more useful Hyper-V allows the guest to report panic and the guest can pass additional information. All this is logged on the host. Currently Linux is passing back information that is not particularly useful. Make the following changes: 1. Windows uses crash MSR P0 to report bugcheck code. Follow the same convention for Linux as well. 2. It will be useful to know the gust ID of the Linux guest that has paniced. Pass back this information. These changes will help in better supporting Linux on Hyper-V Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman arch/x86/hyperv/hv_init.c | 15 +++++++++------ arch/x86/include/asm/mshyperv.h | 2 +- drivers/hv/vmbus_drv.c | 4 ++-- 3 files changed, 12 insertions(+), 9 deletions(-) commit 6981fbf3780366093858c5d2dcdaadcd1fbb04be Author: Stephen Hemminger Date: Sun Oct 29 11:33:40 2017 -0700 Drivers: hv: vmbus: Expose per-channel interrupts and events counters When investigating performance, it is useful to be able to look at the number of host and guest events per-channel. This is equivalent to per-device interrupt statistics. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman Documentation/ABI/stable/sysfs-bus-vmbus | 26 ++++++++++++++++++++------ drivers/hv/connection.c | 2 ++ drivers/hv/vmbus_drv.c | 16 ++++++++++++++++ include/linux/hyperv.h | 4 ++++ 4 files changed, 42 insertions(+), 6 deletions(-) commit eb3288992864616b66e6442fecfba9e3474e42c5 Author: Ard Biesheuvel Date: Fri Oct 27 21:21:48 2017 +0100 gpio: mb86s70: Revert "Return error if requesting an already assigned gpio" Commit fd9c963c5661 ("gpio: mb86s70: Return error if requesting an already assigned gpio") adds code that infers from the state of the GPIO Pin Function Register (PFR) whether a GPIO has been assigned already. This assumes that the pin functions are set to 'peripheral' when the driver is loaded, which is not guaranteed. Also, the GPIO layer is perfectly capable of keeping track of which GPIOs have been assigned already, so we shouldn't need this check in the first place. This reverts commit fd9c963c5661af3403e77e312c0d9941773b6c1b. Cc: Axel Lin Signed-off-by: Ard Biesheuvel Acked-by: Axel Lin Signed-off-by: Linus Walleij drivers/gpio/gpio-mb86s7x.c | 5 ----- 1 file changed, 5 deletions(-) commit e1289dba18bf905870a42b994c003586688d9353 Author: Ard Biesheuvel Date: Fri Oct 27 21:21:47 2017 +0100 gpio: mb86s7x: share with other SoCs as module In order to reuse this driver for the Socionext Synquacer SC2A11 SoC, which inherited this IP from Fujitsu, remove the ARCH_MB86S7X Kconfig dependency, and revert the changes that prevent it from being built as a module. This reverts commits d65aa4b67b4f47f303bdeaef1e4d42ef18e6b293 and d5610e514e92144d19bd5e39e5cf3804bbf85f3e. Cc: Geliang Tang Cc: Paul Gortmaker Signed-off-by: Ard Biesheuvel [Folded in module_platform_driver() fixup] Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 3 +-- drivers/gpio/gpio-mb86s7x.c | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) commit 30ac0d3b0702ea3b6ad19b0c1452831526fe03d5 Author: Ken Ma Date: Thu Oct 19 15:10:03 2017 +0200 pinctrl: armada-37xx: Add edge both type gpio irq support Current edge both type gpio irqs which need to swap polarity in each interrupt are not supported, this patch adds edge both type gpio irq support. Signed-off-by: Ken Ma Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 64 +++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit 10c191a11c79bb576817f280e93bdfe4bb8b1cd0 Author: Romain Perier Date: Mon Oct 23 19:59:55 2017 +0200 dmaengine: pch_dma: Replace PCI pool old API The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin Signed-off-by: Vinod Koul drivers/dma/pch_dma.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3fa013be95bb046490d3b11d546bf06d73c7e0e3 Author: Gustavo A. R. Silva Date: Mon Oct 30 00:18:47 2017 -0400 media: st-hva: hva-h264: use swap macro in hva_h264_encode Make use of the swap macro and remove unnecessary variable tmp_frame. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/hva/hva-h264.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit d7ca1c9c15e309344e8dcd19826434359dff33b7 Author: Wenyou Yang Date: Sun Oct 29 20:46:50 2017 -0400 media: atmel-isc: Fix clock ID for clk_prepare/unprepare Fix the clock ID to do the runtime pm should be ISC_ISPCK, instead of ISC_MCK in clk_prepare(), clk_unprepare() and isc_clk_is_enabled(). Signed-off-by: Wenyou Yang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bf3881707b6f6350c3f8f8ff15524b6d719847bc Author: Colin Ian King Date: Sun Oct 29 09:43:39 2017 -0400 media: bdisp: remove redundant assignment to pix Pointer pix is being initialized to a value and a little later being assigned the same value again. Remove the initial assignment to avoid a duplicate assignment. Cleans up the clang warning: drivers/media/platform/sti/bdisp/bdisp-v4l2.c:726:26: warning: Value stored to 'pix' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a10444cc04eace87e49dea36e360a799112cd889 Author: Colin Ian King Date: Sun Oct 29 09:06:07 2017 -0400 media: gspca: remove redundant assignment to variable j Variable j is being set to zero before a loop and also immediately inside the loop and is not used after the loop. Hence the first assignment is redundant and can be removed. Cleans up clang warning: drivers/media/usb/gspca/gspca.c:1078:2: warning: Value stored to 'j' is never read Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/gspca.c | 1 - 1 file changed, 1 deletion(-) commit d1e2885e1e9bbc8d2d8d90d16c53977477c8d115 Author: Colin Ian King Date: Sun Oct 29 08:50:58 2017 -0400 media: mxl111sf: remove redundant assignment to index Variable index is set to zero and then set to zero again a few lines later in a for loop initialization. Remove the redundant setting of index to zero. Cleans up the clang warning: drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c:519:3: warning: Value stored to 'index' is never read Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c | 1 - 1 file changed, 1 deletion(-) commit da6a7a7806dfec0d7358bba474084abba03046a3 Author: Hans Verkuil Date: Sat Oct 28 05:19:50 2017 -0400 media: camss-video.c: drop unused header Drop unused vb1 header. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/camss-8x16/camss-video.c | 1 - 1 file changed, 1 deletion(-) commit 66b72cf1857b508d99f4eabea278e9ec366ee7fd Author: Colin Ian King Date: Fri Oct 27 12:20:08 2017 -0400 media: radio-raremono: remove redundant initialization of freq Variable freq is initialized to f->frequency however this value is never read and freq is later updated; hence the initialization is redundant and can be removed. Cleans up clang warning: drivers/media/radio/radio-raremono.c:257:6: warning: Value stored to 'freq' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/radio-raremono.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3168c87c0492661badc3e908f977d79e7738a41 Author: Adam Sampson Date: Tue Oct 24 16:14:46 2017 -0400 media: usbtv: fix brightness and contrast controls Because the brightness and contrast controls share a register, usbtv_s_ctrl needs to read the existing values for both controls before inserting the new value. However, the code accidentally wrote to the registers (from an uninitialised stack array), rather than reading them. The user-visible effect of this was that adjusting the brightness would also set the contrast to a random value, and vice versa -- so it wasn't possible to correctly adjust the brightness of usbtv's video output. Tested with an "EasyDAY" UTV007 device. Fixes: c53a846c48f2 ("usbtv: add video controls") Signed-off-by: Adam Sampson Reviewed-by: Lubomir Rintel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/usbtv/usbtv-video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 74ee0477512b56c95ad2f7b0035120ada58b88fd Author: Kees Cook Date: Tue Oct 24 11:23:21 2017 -0400 media: s2255: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Mauro Carvalho Chehab Cc: Laurent Pinchart Cc: Sakari Ailus Cc: Bhumika Goyal Cc: Mike Isely Cc: Arvind Yadav Signed-off-by: Kees Cook Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/s2255/s2255drv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 297fced0f86a27b55729afa6a8e53f45095433a3 Author: Kees Cook Date: Tue Oct 24 11:23:03 2017 -0400 media: radio: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Cc: "David S. Miller" Cc: Johannes Berg Signed-off-by: Kees Cook Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/radio-cadet.c | 7 +++---- drivers/media/radio/wl128x/fmdrv_common.c | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) commit 162e6376ac58440beb6a2d2ee294f5d88ea58dd1 Author: Kees Cook Date: Tue Oct 24 11:22:42 2017 -0400 media: pci: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Andy Walls Cc: Sergey Kozlov Cc: Abylay Ospan Cc: Ezequiel Garcia Cc: Arvind Yadav Cc: Geliang Tang Cc: Sean Young Cc: "Pali Rohár" Signed-off-by: Kees Cook [hans.verkuil@cisco.com: dropped pci/ttpci/av7110_ir.c patch chunk] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/bt8xx/bttv-driver.c | 6 +++--- drivers/media/pci/bt8xx/bttv-input.c | 19 ++++++++++--------- drivers/media/pci/bt8xx/bttvp.h | 1 + drivers/media/pci/cx18/cx18-fileops.c | 4 ++-- drivers/media/pci/cx18/cx18-fileops.h | 2 +- drivers/media/pci/cx18/cx18-streams.c | 2 +- drivers/media/pci/ivtv/ivtv-driver.c | 3 +-- drivers/media/pci/ivtv/ivtv-irq.c | 4 ++-- drivers/media/pci/ivtv/ivtv-irq.h | 2 +- drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 7 +++---- drivers/media/pci/tw686x/tw686x-core.c | 7 +++---- 11 files changed, 28 insertions(+), 29 deletions(-) commit 3ddad1ae10c23a700e060edab11eb13ec01ea380 Author: Hans Verkuil Date: Sat Oct 21 04:37:49 2017 -0400 media: tegra-cec: fix messy probe() cleanup The probe() cleanup code ('goto foo_error') was very messy. It appears that this code wasn't updated when I switched to the devm_ functions in an earlier version. Update the code to use 'return error' where it can and do proper cleanup where it needs to. Note that the original code wasn't buggy, it was just messy. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/tegra-cec/tegra_cec.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit 6981d6e55c70b831acf8bea99545adcf940949b5 Author: Jaejoong Kim Date: Fri Oct 20 03:25:28 2017 -0400 media: usb: usbtv: remove duplicate & operation usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] by & operation with 0x7ff. So, we can remove the duplicate & operation with 0x7ff. Signed-off-by: Jaejoong Kim Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/usbtv/usbtv-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94b28441c9c7168bfdef932703f968a43ba77f97 Author: Arnd Bergmann Date: Thu Oct 19 05:30:34 2017 -0400 media: rockchip/rga: annotate PM functions as __maybe_unused The newly added driver has incorrect #ifdef annotations on its PM functions, leading to a harmless compile-time warning when CONFIG_PM is disabled: drivers/media/platform/rockchip/rga/rga.c:760:13: error: 'rga_disable_clocks' defined but not used [-Werror=unused-function] static void rga_disable_clocks(struct rockchip_rga *rga) ^~~~~~~~~~~~~~~~~~ drivers/media/platform/rockchip/rga/rga.c:728:12: error: 'rga_enable_clocks' defined but not used [-Werror=unused-function] This removes the #ifdef and marks the functions as __maybe_unused, so gcc can silently drop all the unused code. Fixes: f7e7b48e6d79 ("[media] rockchip/rga: v4l2 m2m support") Signed-off-by: Arnd Bergmann Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rga/rga.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 60757ee62be7ef4f2452265ab20cdf1f0b5d7934 Author: Hans Verkuil Date: Wed Oct 18 04:11:46 2017 -0400 media: cec-pin: use IS_ERR instead of PTR_ERR_OR_ZERO cec_allocate_adapter never returns NULL, so just use IS_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-pin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cac9d2fb2fe0e0cadacdb94415b3fe49e3f724f Author: Ricardo Ribalda Date: Tue Oct 17 11:48:50 2017 -0400 media: v4l2-ctrl: Fix flags field on Control events VIDIOC_DQEVENT and VIDIOC_QUERY_EXT_CTRL should give the same output for the control flags field. This patch creates a new function user_flags(), that calculates the user exported flags value (which is different than the kernel internal flags structure). This function is then used by all the code that exports the internal flags to userspace. Reported-by: Dimitrios Katsaros Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Cc: # for v3.17 and up Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 974488e4ce1ed0b39f2c711c13f523c5912128a1 Author: Trent Piepho Date: Thu Oct 26 18:08:39 2017 -0700 spi: imx: Fix failure path leak on GPIO request error If the code that requests any chip select GPIOs fails, the cleanup of spi_bitbang_start() by calling spi_bitbang_stop() is not done. Fix this by moving spi_bitbang_start() to after the code that requets GPIOs. The GPIOs are dev managed and don't need explicit cleanup. Since spi_bitbang_start() is now the last operation, it doesn't need to be cleaned up in the failure path. CC: Shawn Guo CC: Sascha Hauer CC: Fabio Estevam CC: Mark Brown Reviewed-by: Oleksij Rempel Signed-off-by: Trent Piepho Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 0cba3f438cd6154621a3b4d66e0875ba213cd7ab Author: Bhumika Goyal Date: Tue Oct 17 08:27:25 2017 -0400 media: davinci: make ccdc_hw_device structures const Make these structures const as they are only getting passed to the functions vpfe_{register/unregister}_ccdc_device having the argument as const. Structures found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/dm355_ccdc.c | 2 +- drivers/media/platform/davinci/dm644x_ccdc.c | 2 +- drivers/media/platform/davinci/isif.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 1e6be014466e07d3ba95b396d0ea64d11ac0a79d Author: Bhumika Goyal Date: Tue Oct 17 08:27:24 2017 -0400 media: davinci: make function arguments const Make the function arguments of functions vpfe_{register/unregister}_ccdc_device const as the pointer dev does not modify the fields of the structure it points to. Also, declare the variable ccdc_dev const as it points to the same structure as dev but it does not modify the fields as well. Signed-off-by: Bhumika Goyal Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/ccdc_hw_device.h | 4 ++-- drivers/media/platform/davinci/vpfe_capture.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit cedb6415f9ece6d3368aa0ac8a433caff799792a Author: Vinod Koul Date: Tue Oct 31 16:47:27 2017 +0530 ASoC: Intel: kbl: fix jack name Commit d1c4cb447a7e ("ASoC: Intel: Skylake: Fix jack name format substitution") added Jack name but erroneously added a space as well, so remove the space in Jack name. Fixes: d1c4cb447a7e ("ASoC: Intel: Skylake: Fix jack name format substitution") Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d5e0689dc9d5640ad46cdfbe1896b74d8df1661 Author: Johan Hovold Date: Mon Oct 30 11:35:27 2017 +0100 spi: spi-axi: fix potential use-after-free after deregistration Take an extra reference to the controller before deregistering it to prevent use-after-free in the interrupt handler in case an interrupt fires before the line is disabled. Fixes: b1353d1c1d45 ("spi: Add Analog Devices AXI SPI Engine controller support") Acked-by: Lars-Peter Clausen Signed-off-by: Johan Hovold Signed-off-by: Mark Brown drivers/spi/spi-axi-spi-engine.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1e7126b4a86ad69e870099fb6b922a3b6e29598b Author: Kees Cook Date: Mon Oct 16 19:11:30 2017 -0400 media: saa7134: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Geliang Tang Signed-off-by: Kees Cook Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/saa7134/saa7134-core.c | 6 +++--- drivers/media/pci/saa7134/saa7134-input.c | 9 ++++----- drivers/media/pci/saa7134/saa7134-ts.c | 3 +-- drivers/media/pci/saa7134/saa7134-vbi.c | 3 +-- drivers/media/pci/saa7134/saa7134-video.c | 3 +-- drivers/media/pci/saa7134/saa7134.h | 2 +- 6 files changed, 11 insertions(+), 15 deletions(-) commit 68b892f1fdc493d7cd4e4067596879cd097c1f62 Author: Johan Hovold Date: Mon Oct 30 11:35:26 2017 +0100 spi: document odd controller reference handling Document the fact that a reference to the controller is dropped as part of deregistration. This is an odd pattern as the reference is typically taken in __spi_alloc_controller() rather than spi_register_controller(). Most controller drivers gets it right these days and notably the device-managed interface relies on this behaviour. Signed-off-by: Johan Hovold Signed-off-by: Mark Brown drivers/spi/spi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 67f7b2781fafcc0f52464880154b320fea1ae982 Author: Johan Hovold Date: Mon Oct 30 11:35:25 2017 +0100 spi: fix use-after-free at controller deregistration The controller is typically freed as part of device_unregister() so store the bus id before deregistration to avoid use-after-free when the id is later released. Fixes: 9b61e302210e ("spi: Pick spi bus number from Linux idr or spi alias") Signed-off-by: Johan Hovold Signed-off-by: Mark Brown Cc: stable drivers/spi/spi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e78407fb7ed38fded024def7a76e4c91bc814080 Author: Harsha Priya N Date: Thu Oct 26 11:44:03 2017 -0700 ASoC: Intel: Fix setting of SSP parameters in Kabylake machine driver This patch sets the SSP params based on FE and BE dai links for kabylake machine driver that uses rt5663 and max98927 codecs Signed-off-by: Naveen M Signed-off-by: Harsha Priya Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_max98927.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit 7a679ea75a1bc4ea6216aa6877a8bd47fd83e790 Author: Harsha Priya N Date: Thu Oct 26 11:44:02 2017 -0700 ASoC: Intel: Enable tdm slots for max98927 In this patch the SSP0 BE's mode is changed from I2S mode to DSP_B with 8 slots of 16 bits. It enables 4 slot for IV feedback and 2 slots for playback on max98927 for kabylake machine driver The layout of SSP0 Tx and Rx slots is as follows; 1. Playback uses Tx slots 0 and 1 2. Capture uses Rx slots 4,5,6,7. Slots 0 through 3 of Rx are used by DMIC codec RT5514 in another flavor of Kabylake platform. We are using the same slots 4 through 7 on all Kabylake platforms for max98927 in order to reuse same NHLT configuration. Signed-off-by: Naveen M Signed-off-by: Harsha Priya Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_max98927.c | 40 +++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) commit ce548931207c0d0059bd90171e2c458f897354d7 Author: Kuninori Morimoto Date: Tue Oct 31 00:40:32 2017 +0000 ASoC: rsnd: Don't check SSISR::DIRQ when Capture When stop case, it was Playback, it need to check all data were completely sent. But in Capture case, it might not receive data anymore. SSISR::DIRQ check is not need for Capture case. Reported-by: Hiroyuki Yokoyama Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/ssi.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 8fce974bc4d5478d4ddee2443a3e268532ab35a8 Author: Kuninori Morimoto Date: Tue Oct 31 00:39:45 2017 +0000 ASoC: rsnd: use snd_pcm_running() in rsnd_io_is_working() Let's use more common style to checking running/working Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ed3ac14ca90074d51f365dba5ed535e76ea155ea Author: Kuninori Morimoto Date: Tue Oct 31 00:39:17 2017 +0000 ASoC: rsnd: NULL check is not needed for clk_unprepare() clk_unprepare() is checking parameter by IS_ERR_OR_NULL(). clk NULL check is not needed on rsnd_mod_quit() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b12f1e3a798e19727ca632d92abe619b418ad0d0 Author: Kuninori Morimoto Date: Tue Oct 31 00:38:36 2017 +0000 ASoC: rsnd: tidyup rsnd_mod_next() for loop method Let's remove point less "continue" Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 138f878647f2ac0d7700f669b860cb130306e062 Author: Kuninori Morimoto Date: Tue Oct 31 00:38:09 2017 +0000 ASoC: rsnd: don't use io->mod[] directly We have rsnd_io_to_mod() macro. Let's use it Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50f510a33c7c906f8f75b02e3d1104984ebf6f78 Author: Bard Liao Date: Mon Oct 30 15:26:05 2017 +0800 ASoC: rt5645: remove unexisting route on new rt5645 "SPOL MIX DAC R1 Switch" and "SPOL MIX SPKVOL R Switch" are only exist in the early version of rt5645. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 707ce9eac5fc3b68f98c887dddea3911a8fc4f9f Author: James Ban Date: Mon Oct 30 11:32:38 2017 +0900 regulator: da9211: update for supporting da9223/4/5 This is update for supporting additional devices da9223/4/5. Only device strings is added because only package type is different. Signed-off-by: James Ban Signed-off-by: Mark Brown .../devicetree/bindings/regulator/da9211.txt | 82 ++++++++++++++++++++-- drivers/regulator/Kconfig | 2 +- drivers/regulator/da9211-regulator.c | 14 ++-- drivers/regulator/da9211-regulator.h | 2 +- include/linux/regulator/da9211.h | 5 +- 5 files changed, 91 insertions(+), 14 deletions(-) commit 60793f4d3e79c3b90314f649d56ffd583046752d Author: Kees Cook Date: Mon Oct 16 19:10:53 2017 -0400 media: tvaudio: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tvaudio.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit e7e0e2cfd1169ff8b53cdc182b3c10be3e088e61 Author: Kees Cook Date: Mon Oct 16 19:10:47 2017 -0400 media: dvb-core: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: devendra sharma Signed-off-by: Kees Cook Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dmxdev.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 12a83612ed23fccafe168828cafcce514f02e74d Author: Kees Cook Date: Mon Oct 16 19:10:42 2017 -0400 media: saa7146: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/saa7146/saa7146_fops.c | 4 ++-- drivers/media/common/saa7146/saa7146_vbi.c | 3 +-- drivers/media/common/saa7146/saa7146_video.c | 3 +-- include/media/drv-intf/saa7146_vv.h | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) commit a88cd60fc94e7e04e61adeb1c6f6ba16031913f8 Author: Kees Cook Date: Mon Oct 16 19:10:27 2017 -0400 media: tc358743: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Mats Randgaard Signed-off-by: Kees Cook Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 3e3149173fd831e554f45c694e5349370601dd5f Author: Kees Cook Date: Mon Oct 16 19:10:12 2017 -0400 media: media/saa7146: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This requires adding a pointer to hold the timer's target file, as there won't be a way to pass this in the future. Signed-off-by: Kees Cook Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/saa7146/saa7146_fops.c | 2 +- drivers/media/common/saa7146/saa7146_vbi.c | 9 +++++---- include/media/drv-intf/saa7146_vv.h | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) commit 82fad4762565ccae181c2d5ee332d47456e6ed7f Author: Bhumika Goyal Date: Wed Sep 27 04:38:29 2017 -0400 media: radio-si470x: make si470x_viddev_template const Make this const as it is only used in a copy operation in the files referencing it. Add const to declaration in the header too. Structure found using Coccienlle and changes done by hand. Signed-off-by: Bhumika Goyal Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/radio/si470x/radio-si470x-common.c | 2 +- drivers/media/radio/si470x/radio-si470x.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0dd7054129c9b3d54c3716b8e38dcfcb43fe305d Author: Bhumika Goyal Date: Wed Sep 27 04:05:43 2017 -0400 media: cx231xx: make cx231xx_vbi_qops const Make this const as it is only passed to the const argument of the function videobuf_queue_vmalloc_init in the file referencing it. Also, make the declaration in the header const. Structure found using Coccienlle and changes done by hand. Signed-off-by: Bhumika Goyal Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-vbi.c | 2 +- drivers/media/usb/cx231xx/cx231xx-vbi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bfba2b3e21b9426c0f9aca00f3cad8631b2da170 Author: Markus Elfring Date: Sun Sep 24 05:00:57 2017 -0400 media: omap_vout: Fix a possible null pointer dereference in omap_vout_open() Move a debug message so that a null pointer access can not happen for the variable "vout" in this function. Fixes: 5c7ab6348e7b3fcca2b8ee548306c774472971e2 ("V4L/DVB: V4L2: Add support for OMAP2/3 V4L2 display driver on top of DSS2") Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/omap/omap_vout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1bfbb88564b17bbc2187cbce9e867628532ce1a8 Author: Oleh Kravchenko Date: Sat Oct 28 09:38:20 2017 -0400 media: cx231xx: Fix NTSC/PAL on Astrometa T2hybrid Signed-off-by: Oleh Kravchenko Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-cards.c | 1 + 1 file changed, 1 insertion(+) commit 9d377dae7f2d44d47f891b03d91cb8f695ddb06f Author: Oleh Kravchenko Date: Sat Oct 28 09:38:19 2017 -0400 media: cx231xx: Fix NTSC/PAL on Evromedia USB Full Hybrid Full HD Signed-off-by: Oleh Kravchenko Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-cards.c | 1 + 1 file changed, 1 insertion(+) commit 8ff19cdbeee49e4148deb958d7af9ab389e94cac Author: Oleh Kravchenko Date: Sat Oct 28 09:38:18 2017 -0400 media: rc: mceusb: add support for 15f4:0135 Astrometa T2hybrid (15f4:0135) has IR on Interface 0. Signed-off-by: Oleh Kravchenko Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/mceusb.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit ad596b68ad26bc2d3da9a0be3c5c21a265f5edcb Author: Oleh Kravchenko Date: Sat Oct 28 09:38:17 2017 -0400 media: rc: Add Astrometa T2hybrid keymap module Add the keymap module for Astrometa T2hybrid remote control commands. Signed-off-by: Oleh Kravchenko Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-astrometa-t2hybrid.c | 70 ++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 72 insertions(+) commit 47f42f3e21182171686efec7fae48da9411fb1a0 Author: Oleh Kravchenko Date: Sat Oct 28 09:38:16 2017 -0400 media: rc: mceusb: add support for 1b80:d3b2 Evromedia USB Full Hybrid Full HD (1b80:d3b2) has IR on Interface 0. Remote controller supplied with this tuner fully compatible with RC_MAP_MSI_DIGIVOX_III. Signed-off-by: Oleh Kravchenko Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/mceusb.c | 9 +++++++++ drivers/media/usb/cx231xx/cx231xx-cards.c | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) commit b17ec78a42713a477151e9a78c07eb7dea0e10e9 Author: Kees Cook Date: Tue Oct 24 11:23:14 2017 -0400 media: rc: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Maxim Levitsky Cc: James Hogan Cc: Hans Verkuil Cc: "Antti Seppälä" Cc: Heiner Kallweit Cc: "David Härdeman" Cc: Andi Shyti Signed-off-by: Kees Cook Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ene_ir.c | 7 +++---- drivers/media/rc/igorplugusb.c | 6 +++--- drivers/media/rc/img-ir/img-ir-hw.c | 13 ++++++------- drivers/media/rc/img-ir/img-ir-raw.c | 6 +++--- drivers/media/rc/imon.c | 7 +++---- drivers/media/rc/ir-mce_kbd-decoder.c | 7 +++---- drivers/media/rc/rc-ir-raw.c | 8 ++++---- drivers/media/rc/rc-main.c | 7 +++---- drivers/media/rc/sir_ir.c | 4 ++-- 9 files changed, 30 insertions(+), 35 deletions(-) commit 715e3f4d01957df0d256d08fb7ed3b389f7a8523 Author: Sakari Ailus Date: Fri Oct 27 06:35:11 2017 -0400 media: staging: atomisp: Add videobuf2 switch to TODO The atomisp driver uses the videobuf1 framework for buffer management. The framework is being removed; switch to videobuf2 needs to be made. There are only a handful of remaining non-staging drivers using videobuf1. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/TODO | 2 ++ 1 file changed, 2 insertions(+) commit fdbc17101e4eb68dda73abda1df72f2852eaeda0 Author: Kees Cook Date: Tue Oct 24 04:22:11 2017 -0400 media: staging: atomisp: i2c: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit b5027c520f35979f702bf42b4e55640f4168c317 Author: Andy Shevchenko Date: Wed Sep 27 14:25:08 2017 -0400 media: staging: atomisp: Remove FSF snail address Snail address is subject to change, remove it completely from the code. This has been done using the following script: sed -i '/You should/,/02110-1301/d' \ $(git grep -n -w Franklin -- drivers/staging/media/atomisp/ | cut -f1 -d:) No functional change intended. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/atomisp-libmsrlisthelper.c | 4 ---- drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 4 ---- drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 4 ---- drivers/staging/media/atomisp/i2c/gc0310.h | 4 ---- drivers/staging/media/atomisp/i2c/mt9m114.h | 4 ---- drivers/staging/media/atomisp/i2c/ov2680.h | 4 ---- drivers/staging/media/atomisp/i2c/ov2722.h | 4 ---- drivers/staging/media/atomisp/i2c/ov5693/ad5823.h | 4 ---- drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c | 4 ---- drivers/staging/media/atomisp/i2c/ov5693/ov5693.h | 4 ---- drivers/staging/media/atomisp/i2c/ov8858.c | 4 ---- drivers/staging/media/atomisp/i2c/ov8858.h | 4 ---- drivers/staging/media/atomisp/i2c/ov8858_btns.h | 4 ---- drivers/staging/media/atomisp/include/linux/atomisp.h | 4 ---- drivers/staging/media/atomisp/include/linux/atomisp_platform.h | 4 ---- drivers/staging/media/atomisp/include/linux/libmsrlisthelper.h | 4 ---- drivers/staging/media/atomisp/include/media/lm3554.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp-regs.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_common.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_csi2.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_csi2.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_dfs_tables.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_file.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_file.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_helper.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_tables.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_trace_event.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_vm.c | 4 ---- .../media/atomisp/pci/atomisp2/hrt/hive_isp_css_custom_host_hrt.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_bo.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_bo_dev.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_common.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_pool.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_vm.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/include/mmu/isp_mmu.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/include/mmu/sh_mmu.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/include/mmu/sh_mmu_mrfld.h | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c | 4 ---- drivers/staging/media/atomisp/pci/atomisp2/mmu/sh_mmu_mrfld.c | 4 ---- 68 files changed, 272 deletions(-) commit 3a698c9fd7cfeaf1a79c46d289f3dad94300b96a Author: Andy Shevchenko Date: Wed Sep 27 14:25:06 2017 -0400 media: staging: atomisp: Remove Gmin dead code #2 media/lm3642.h is not used anywhere. Moreover, there is a driver under LEDs framework for very same IP which would be used anyway. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../staging/media/atomisp/include/media/lm3642.h | 153 --------------------- 1 file changed, 153 deletions(-) commit 3118eea4cfc705768411447604e70457c19bc1b3 Author: Andy Shevchenko Date: Wed Sep 27 14:25:05 2017 -0400 media: staging: atomisp: Remove Gmin dead code #1 struct camera_af_platform_data and bound functions are not used anywhere. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/include/linux/atomisp_platform.h | 6 --- .../platform/intel-mid/atomisp_gmin_platform.c | 43 ---------------------- 2 files changed, 49 deletions(-) commit 4eee79141bc51ff5de9145f50298d8495dc67a8b Author: Andy Shevchenko Date: Wed Sep 27 14:25:04 2017 -0400 media: staging: atomisp: Remove unused members of camera_sensor_platform_data Remove unused members along with dead code. Mostly done with help of coccinelle. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 13 ------------- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 13 ------------- drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 9 --------- drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 13 ------------- drivers/staging/media/atomisp/i2c/ov8858.c | 13 ------------- .../staging/media/atomisp/include/linux/atomisp_platform.h | 5 ----- drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 9 +-------- .../atomisp/platform/intel-mid/atomisp_gmin_platform.c | 12 ------------ 8 files changed, 1 insertion(+), 86 deletions(-) commit a760bca51edc9410d409a87a96319798a1b9a00b Author: Andy Shevchenko Date: Wed Sep 27 14:25:07 2017 -0400 media: staging: atomisp: Remove duplicate declaration in header There are 3 declarations that are present in atomisp_platform.h and atomisp_gmin_platform.h. Remove duplications from the latter. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/linux/atomisp_gmin_platform.h | 3 --- 1 file changed, 3 deletions(-) commit ab9a68834a43c6a6b30d835268615a0c7734515e Author: Andy Shevchenko Date: Wed Sep 27 14:25:03 2017 -0400 media: staging: atomisp: Remove ->power_ctrl() callback There is redundant callback which does nothing in upstreamed version of the driver. Remove it along with user call places. Mostly done with help of coccinelle. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 4 ---- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 4 ---- drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 4 ---- drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 4 ---- drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 4 ---- drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c | 4 ---- drivers/staging/media/atomisp/i2c/ov8858.c | 4 ---- drivers/staging/media/atomisp/include/linux/atomisp_platform.h | 8 ++++---- 8 files changed, 4 insertions(+), 32 deletions(-) commit 32471bdaa28291e18108d91f7b1c56b68e032c03 Author: Andy Shevchenko Date: Wed Sep 27 14:25:02 2017 -0400 media: staging: atomisp: Remove ->gpio_ctrl() callback There is redundant callback which does nothing in upstreamed version of the driver. Remove it along with user call places. Mostly done with help of coccinelle. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 4 ---- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 4 ---- drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 4 ---- drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 4 ---- drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 4 ---- drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c | 4 ---- drivers/staging/media/atomisp/i2c/ov8858.c | 4 ---- drivers/staging/media/atomisp/include/linux/atomisp_platform.h | 2 -- 8 files changed, 30 deletions(-) commit d2cde88348ec2d0cfaad5cd3f6339eeef69e5c7f Author: Andy Shevchenko Date: Wed Sep 27 14:25:01 2017 -0400 media: staging: atomisp: Remove unneeded gpio.h inclusion GPIO handling is done only in two modules, the rest do not need to include linux/gpio.h header. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 1 - drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 1 - drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 1 - drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 1 - drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 1 - drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c | 1 - 6 files changed, 6 deletions(-) commit 81050aff3093bd34c186e36ac4b6be2a7eb17d5d Author: Andy Shevchenko Date: Wed Sep 27 14:25:00 2017 -0400 media: staging: atomisp: Do not set GPIO twice gpiod_get() configures GPIO line at the time of successful request. Thus, no need to do this explicitly. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../atomisp/platform/intel-mid/atomisp_gmin_platform.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit e19c92059a700453a304061ff4291dfc2de2902b Author: Andy Shevchenko Date: Wed Sep 27 14:24:59 2017 -0400 media: staging: atomisp: Switch i2c drivers to use ->probe_new() Since most of the drivers are being used on ACPI enabled platforms there is no need to keep legacy API support for them. Thus, switch to ->probe_new() callback and remove orphaned code. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/Kconfig | 9 +++++++-- drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 12 ++++-------- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 13 +++++-------- drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 18 ++++-------------- drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 11 +++-------- drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 14 ++++---------- drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 13 ++++--------- drivers/staging/media/atomisp/i2c/gc0310.h | 7 ------- drivers/staging/media/atomisp/i2c/gc2235.h | 7 ------- drivers/staging/media/atomisp/i2c/mt9m114.h | 5 ----- drivers/staging/media/atomisp/i2c/ov2680.h | 10 ---------- drivers/staging/media/atomisp/i2c/ov2722.h | 7 ------- drivers/staging/media/atomisp/i2c/ov5693/Kconfig | 2 +- .../media/atomisp/i2c/ov5693/atomisp-ov5693.c | 12 ++++-------- drivers/staging/media/atomisp/i2c/ov5693/ov5693.h | 7 ------- drivers/staging/media/atomisp/i2c/ov8858.c | 20 +++++--------------- drivers/staging/media/atomisp/i2c/ov8858.h | 1 - drivers/staging/media/atomisp/i2c/ov8858_btns.h | 1 - drivers/staging/media/atomisp/include/media/lm3554.h | 1 - 19 files changed, 41 insertions(+), 129 deletions(-) commit 2cb63c4cf56fbe1a6dcc52595885eb2692a7df01 Author: Andy Shevchenko Date: Wed Sep 27 14:24:58 2017 -0400 media: staging: atomisp: Use module_i2c_driver() macro This is done using coccinelle semantic patch: // @a@ identifier f, x; @@ -static f(...) { return i2c_add_driver(&x); } @b depends on a@ identifier e, a.x; @@ -static e(...) { i2c_del_driver(&x); } @c depends on a && b@ identifier a.f; declarer name module_init; @@ -module_init(f); @d depends on a && b && c@ identifier b.e, a.x; declarer name module_exit; declarer name module_i2c_driver; @@ -module_exit(e); +module_i2c_driver(x); // Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 15 +-------------- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 15 +-------------- drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 13 +------------ drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 14 +------------- drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 16 +--------------- drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 15 +-------------- .../staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c | 15 +-------------- drivers/staging/media/atomisp/i2c/ov8858.c | 14 +------------- 8 files changed, 8 insertions(+), 109 deletions(-) commit d4870725b99a622e6d05ef62b6a648a3e28adfc3 Author: Andy Shevchenko Date: Wed Sep 27 14:24:57 2017 -0400 media: staging: atomisp: Remove AP1302 sensor support This sensor is not used by any known ACPI-enabled platform (and no kernel users for it so far). Just remove it for good until we get a platform which actually uses it. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/Kconfig | 12 - drivers/staging/media/atomisp/i2c/Makefile | 2 - drivers/staging/media/atomisp/i2c/ap1302.h | 198 ---- drivers/staging/media/atomisp/i2c/atomisp-ap1302.c | 1253 -------------------- 4 files changed, 1465 deletions(-) commit 3a81c7660f8021967dccd52624fa1a6fcf117000 Author: Andy Shevchenko Date: Wed Sep 27 14:24:56 2017 -0400 media: staging: atomisp: Remove IMX sensor support This sensor is not used by any known ACPI-enabled platform (and no kernel users for it so far). Just remove it for good until we get a platform which actually uses it. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/Kconfig | 1 - drivers/staging/media/atomisp/i2c/Makefile | 1 - drivers/staging/media/atomisp/i2c/imx/Kconfig | 9 - drivers/staging/media/atomisp/i2c/imx/Makefile | 13 - drivers/staging/media/atomisp/i2c/imx/ad5816g.c | 216 -- drivers/staging/media/atomisp/i2c/imx/ad5816g.h | 49 - drivers/staging/media/atomisp/i2c/imx/common.h | 65 - drivers/staging/media/atomisp/i2c/imx/drv201.c | 208 -- drivers/staging/media/atomisp/i2c/imx/drv201.h | 38 - drivers/staging/media/atomisp/i2c/imx/dw9714.c | 222 -- drivers/staging/media/atomisp/i2c/imx/dw9714.h | 63 - drivers/staging/media/atomisp/i2c/imx/dw9718.c | 233 -- drivers/staging/media/atomisp/i2c/imx/dw9718.h | 64 - drivers/staging/media/atomisp/i2c/imx/dw9719.c | 198 -- drivers/staging/media/atomisp/i2c/imx/dw9719.h | 58 - drivers/staging/media/atomisp/i2c/imx/imx.c | 2477 -------------- drivers/staging/media/atomisp/i2c/imx/imx.h | 737 ----- drivers/staging/media/atomisp/i2c/imx/imx132.h | 566 ---- drivers/staging/media/atomisp/i2c/imx/imx134.h | 2464 -------------- drivers/staging/media/atomisp/i2c/imx/imx135.h | 3374 -------------------- drivers/staging/media/atomisp/i2c/imx/imx175.h | 1959 ------------ drivers/staging/media/atomisp/i2c/imx/imx208.h | 550 ---- drivers/staging/media/atomisp/i2c/imx/imx219.h | 227 -- drivers/staging/media/atomisp/i2c/imx/imx227.h | 726 ----- drivers/staging/media/atomisp/i2c/imx/otp.c | 39 - .../media/atomisp/i2c/imx/otp_brcc064_e2prom.c | 80 - drivers/staging/media/atomisp/i2c/imx/otp_e2prom.c | 89 - drivers/staging/media/atomisp/i2c/imx/otp_imx.c | 190 -- drivers/staging/media/atomisp/i2c/imx/vcm.c | 45 - 29 files changed, 14961 deletions(-) commit ef674997e49760137ca9a90aac41a9922ac399b2 Author: Kees Cook Date: Wed Oct 4 20:47:38 2017 -0400 media: staging: atomisp: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Mauro Carvalho Chehab Cc: Greg Kroah-Hartman Cc: Alan Cox Cc: Daeseok Youn Cc: Arnd Bergmann Cc: devel@driverdev.osuosl.org Cc: Thomas Gleixner Signed-off-by: Kees Cook Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 13 ++++--------- drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.h | 6 +----- .../media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 2 +- drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 15 +++++---------- 4 files changed, 11 insertions(+), 25 deletions(-) commit 309167b966b61c2aef2c268c4a0c25334d6310bd Author: Aishwarya Pant Date: Tue Oct 17 09:14:47 2017 -0400 media: staging: atomisp: cleanup out of memory messages Logging of explicit out of memory messages is redundant since memory allocation failures produce a backtrace. Done with the help of the following cocci script: @@ expression ex, ret; statement s; constant char[] c; constant err; identifier f, l; @@ ex = \(kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...) ... when != ex if ( ( !ex | unlikely(!ex) ) ) - { - f(..., c, ...); ( return ex; | return; | return err; | goto l; ) - } else s Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/atomisp-ap1302.c | 4 +--- drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 4 +--- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 4 +--- drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 4 +--- drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 4 +--- drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 4 +--- drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 4 +--- drivers/staging/media/atomisp/i2c/imx/imx.c | 4 +--- drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c | 4 +--- drivers/staging/media/atomisp/i2c/ov8858.c | 6 +----- drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c | 4 +--- drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 9 ++------- .../media/atomisp/pci/atomisp2/css2400/sh_css_param_shading.c | 4 +--- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 10 ++-------- .../staging/media/atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c | 6 +----- .../staging/media/atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c | 5 +---- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_vm.c | 4 +--- .../media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 4 +--- 18 files changed, 20 insertions(+), 68 deletions(-) commit 727dede0ba8afbd8d19116d39f2ae8d19d00033d Author: Takashi Iwai Date: Tue Oct 24 09:15:23 2017 +0200 sound: Retire OSS Since no complaints have been raised after disabling the build of OSS (Open Sound System) by the commit 31cbee6a5611 ("sound: Disable the build of OSS drivers"), let's finally drop the whole code and documentation. Some glue codes are still left intact since sound/oss/dmasound stuff remains -- which is an independent implementation solely for m68k, and it's not covered by ALSA yet. Also, a couple of API header files (linux/sound.h and linux/soundcard.h) are kept remaining as well, since the OSS API itself is still supported by ALSA OSS emulation, and applications can refer to these. Where we're at it, some help texts in the top-level Kconfig are adjusted, too (who still needs to specify I/O port in kbuild nowadays?). Reviewed-by: Jaroslav Kysela Signed-off-by: Takashi Iwai Documentation/sound/oss/ALS | 66 - Documentation/sound/oss/AudioExcelDSP16 | 101 - Documentation/sound/oss/CMI8330 | 152 -- Documentation/sound/oss/ESS | 34 - Documentation/sound/oss/ESS1868 | 55 - Documentation/sound/oss/Introduction | 459 ----- Documentation/sound/oss/MultiSound | 1137 ----------- Documentation/sound/oss/OPL3 | 6 - Documentation/sound/oss/Opti | 218 -- Documentation/sound/oss/PAS16 | 162 -- Documentation/sound/oss/PSS | 41 - Documentation/sound/oss/PSS-updates | 88 - Documentation/sound/oss/README.OSS | 1455 ------------- Documentation/sound/oss/README.modules | 106 - Documentation/sound/oss/README.ymfsb | 107 - Documentation/sound/oss/SoundPro | 105 - Documentation/sound/oss/Soundblaster | 53 - Documentation/sound/oss/Tropez+ | 26 - Documentation/sound/oss/VIBRA16 | 80 - Documentation/sound/oss/WaveArtist | 170 -- Documentation/sound/oss/btaudio | 92 - Documentation/sound/oss/mwave | 185 -- Documentation/sound/oss/oss-parameters.txt | 51 - Documentation/sound/oss/ultrasound | 30 - MAINTAINERS | 11 - sound/Kconfig | 33 +- sound/Makefile | 3 +- sound/oss/CHANGELOG | 369 ---- sound/oss/Kconfig | 533 ----- sound/oss/Makefile | 107 - sound/oss/README.FIRST | 6 - sound/oss/ad1848.c | 3062 ---------------------------- sound/oss/ad1848.h | 24 - sound/oss/ad1848_mixer.h | 253 --- sound/oss/aedsp16.c | 1373 ------------- sound/oss/audio.c | 985 --------- sound/oss/bin2hex.c | 39 - sound/oss/coproc.h | 12 - sound/oss/dev_table.c | 256 --- sound/oss/dev_table.h | 390 ---- sound/oss/dmabuf.c | 1268 ------------ sound/oss/hex2hex.c | 101 - sound/oss/kahlua.c | 229 --- sound/oss/midi_ctrl.h | 22 - sound/oss/midi_synth.c | 712 ------- sound/oss/midi_synth.h | 47 - sound/oss/midibuf.c | 427 ---- sound/oss/mpu401.c | 1804 ---------------- sound/oss/mpu401.h | 11 - sound/oss/msnd.c | 413 ---- sound/oss/msnd.h | 278 --- sound/oss/msnd_classic.c | 3 - sound/oss/msnd_classic.h | 185 -- sound/oss/msnd_pinnacle.c | 1941 ------------------ sound/oss/msnd_pinnacle.h | 246 --- sound/oss/opl3.c | 1255 ------------ sound/oss/opl3_hw.h | 246 --- sound/oss/os.h | 45 - sound/oss/pas2.h | 20 - sound/oss/pas2_card.c | 458 ----- sound/oss/pas2_midi.c | 262 --- sound/oss/pas2_mixer.c | 327 --- sound/oss/pas2_pcm.c | 419 ---- sound/oss/pss.c | 1270 ------------ sound/oss/sb.h | 185 -- sound/oss/sb_audio.c | 1097 ---------- sound/oss/sb_card.c | 354 ---- sound/oss/sb_card.h | 149 -- sound/oss/sb_common.c | 1287 ------------ sound/oss/sb_ess.c | 1822 ----------------- sound/oss/sb_ess.h | 34 - sound/oss/sb_midi.c | 206 -- sound/oss/sb_mixer.c | 770 ------- sound/oss/sb_mixer.h | 105 - sound/oss/sequencer.c | 1661 --------------- sound/oss/sleep.h | 18 - sound/oss/sound_calls.h | 87 - sound/oss/sound_config.h | 144 -- sound/oss/sound_firmware.h | 29 - sound/oss/sound_timer.c | 327 --- sound/oss/soundcard.c | 733 ------- sound/oss/soundvers.h | 2 - sound/oss/swarm_cs4297a.c | 2781 ------------------------- sound/oss/sys_timer.c | 280 --- sound/oss/trix.c | 525 ----- sound/oss/tuning.h | 23 - sound/oss/uart401.c | 477 ----- sound/oss/uart6850.c | 361 ---- sound/oss/ulaw.h | 69 - sound/oss/v_midi.c | 290 --- sound/oss/v_midi.h | 14 - sound/oss/vidc.c | 557 ----- sound/oss/vidc.h | 63 - sound/oss/vidc_fill.S | 218 -- sound/oss/waveartist.c | 2043 ------------------- sound/oss/waveartist.h | 92 - 96 files changed, 2 insertions(+), 41225 deletions(-) commit c128dbfa0f879f8ce7b79054037889b0b2240728 Author: Gayatri Kammela Date: Mon Oct 30 18:20:29 2017 -0700 x86/cpufeatures: Enable new SSE/AVX/AVX512 CPU features Add a few new SSE/AVX/AVX512 instruction groups/features for enumeration in /proc/cpuinfo: AVX512_VBMI2, GFNI, VAES, VPCLMULQDQ, AVX512_VNNI, AVX512_BITALG. CPUID.(EAX=7,ECX=0):ECX[bit 6] AVX512_VBMI2 CPUID.(EAX=7,ECX=0):ECX[bit 8] GFNI CPUID.(EAX=7,ECX=0):ECX[bit 9] VAES CPUID.(EAX=7,ECX=0):ECX[bit 10] VPCLMULQDQ CPUID.(EAX=7,ECX=0):ECX[bit 11] AVX512_VNNI CPUID.(EAX=7,ECX=0):ECX[bit 12] AVX512_BITALG Detailed information of CPUID bits for these features can be found in the Intel Architecture Instruction Set Extensions and Future Features Programming Interface document (refer to Table 1-1. and Table 1-2.). A copy of this document is available at https://bugzilla.kernel.org/show_bug.cgi?id=197239 Signed-off-by: Gayatri Kammela Acked-by: Thomas Gleixner Cc: Andi Kleen Cc: Fenghua Yu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Ricardo Neri Cc: Yang Zhong Cc: bp@alien8.de Link: http://lkml.kernel.org/r/1509412829-23380-1-git-send-email-gayatri.kammela@intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 6 ++++++ arch/x86/kernel/cpu/cpuid-deps.c | 6 ++++++ 2 files changed, 12 insertions(+) commit eab638a8ae6e874a226e61b57e35032ee461e0bf Author: Srishti Sharma Date: Sat Oct 7 09:52:02 2017 -0400 media: Staging: media: atomisp: pci: Eliminate use of typedefs for struct The use of typedefs for struct is discouraged, and hence can be eliminated. Done using the following semantic patch by coccinelle. @r1@ type T; @@ typedef struct {...} T; @script: python p@ T << r1.T; T1; @@ if T[-2:] == "_t" or T[-2:] == "_T": coccinelle.T1 = T[:-2] else: coccinelle.T1 = T print T, T1 @r2@ type r1.T; identifier p.T1; @@ - typedef struct + T1 { ... } - T Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp2/css2400/runtime/spctrl/src/spctrl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6c3b56b1973083e2bb4e87eb90ea5368455706dc Author: Matthias Kaehlcke Date: Mon Oct 30 12:43:51 2017 -0700 x86/boot: Disable Clang warnings about GNU extensions The kernel makes use of several GCC extensions, disable Clang warnings about that in the boot code, as we already do for the rest of the kernel. This suppresses the following warning when building with clang: ./include/linux/cgroup-defs.h:391:16: warning: field 'cgrp' with variable sized type 'struct cgroup' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end] struct cgroup cgrp; Reported-by: Nick Desaulniers Signed-off-by: Matthias Kaehlcke Acked-by: Thomas Gleixner Cc: Douglas Anderson Cc: Guenter Roeck Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20171030194351.122090-1-mka@chromium.org Signed-off-by: Ingo Molnar arch/x86/boot/compressed/Makefile | 1 + 1 file changed, 1 insertion(+) commit 4714221b0c62e6dc3f7ac31d1f50478f16259e71 Author: Doug Berger Date: Tue Oct 24 12:54:51 2017 -0700 gpio: brcmstb: implement suspend/resume/shutdown This commit corrects problems with the previous wake implementation by implementing suspend and resume power management operations and the driver shutdown operation. Wake masks are used to keep track of which GPIO should wake the device. On suspend the GPIO state is saved and the possible wakeup sources are explicitly unmasked in the hardware. Non-wakeup sources are explicitly masked so IRQCHIP_MASK_ON_SUSPEND is no longer necessary. The saved state of the GPIO is restored upon resume. It is important not to write to the GPIO status register since this has the effect of clearing bits. The status register is explicitly removed from the register save and restore to ensure this. The shutdown operation allows the hardware to be put into the same quiesced state as the suspend operation and removes the need for the reboot notifier. Unfortunately, there appears to be some confusion about whether a pending disabled wake interrupt should wake the system. If a wake capable interrupt is disabled using the default "lazy disable" behavior and it is triggered before the suspend_device_irq call the interrupt hardware will be acknowledged by mask_ack_irq and the IRQS_PENDING flag is added to its state. However, the IRQS_PENDING flag of wake interrupts is not checked to prevent the transition to suspend and the hardware has been acked which prevents its wakeup. If the lazy disabled interrupt is triggered after the call to suspend_device_irqs then the wakeup logic will abort the suspend. The irq_disable method is defined by this GPIO driver to prevent lazy disable so that the pending hardware state remains asserted allowing the hardware to wake and providing a consistent behavior. In addition, the IRQ_DISABLE_UNLAZY flag is set for the non-wake parent interrupt as a convenience to prevent the need to add code to the brcmstb_gpio_irq_handler to support "lazy disable" of the non-wake parent interrupt when it is disabled during suspend and resume. Chained interrupt parents are not normally disabled, but these GPIO devices have different parent interrupts for wake and non-wake handling. It is convenient to mask the non-wake parent when suspending to preserve the hardware state for proper wakeup accounting when the driver is resumed. Signed-off-by: Doug Berger Acked-by: Gregory Fong Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij drivers/gpio/gpio-brcmstb.c | 201 +++++++++++++++++++++++++++++++++----------- 1 file changed, 151 insertions(+), 50 deletions(-) commit c80ed088a519da53f27b798a69748eaabc66aadf Author: Mark Rutland Date: Mon Oct 30 21:23:19 2017 +0000 arm64: vdso: fix clock_getres for 4GiB-aligned res The vdso tries to check for a NULL res pointer in __kernel_clock_getres, but only checks the lower 32 bits as is uses CBZ on the W register the res pointer is held in. Thus, if the res pointer happened to be aligned to a 4GiB boundary, we'd spuriously skip storing the timespec to it, while returning a zero error code to the caller. Prevent this by checking the whole pointer, using CBZ on the X register the res pointer is held in. Fixes: 9031fefde6f2ac1d ("arm64: VDSO support") Signed-off-by: Mark Rutland Reported-by: Andrew Pinski Reported-by: Mark Salyzyn Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/kernel/vdso/gettimeofday.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ba31dc201deb4f47277d7ff676b45da31c530e4 Author: Doug Berger Date: Tue Oct 24 12:54:50 2017 -0700 gpio: brcmstb: consolidate interrupt domains The GPIOLIB IRQ chip helpers were very appealing, but badly broke the 1:1 mapping between a GPIO controller's device_node and its interrupt domain. When another device-tree node references a GPIO device as its interrupt parent, the irq_create_of_mapping() function looks for the irq domain of the GPIO device and since all bank irq domains reference the same GPIO device node it always resolves to the irq domain of the first bank regardless of which bank the number of the GPIO should resolve. This domain can only map hwirq numbers 0-31 so interrupts on GPIO above that can't be mapped by the device-tree. This commit effectively reverts the patch from Gregory Fong [1] that was accepted upstream and replaces it with a consolidated irq domain implementation with one larger interrupt domain per GPIO controller instance spanning multiple GPIO banks based on an earlier patch [2] also submitted by Gregory Fong. [1] https://patchwork.kernel.org/patch/6921561/ [2] https://patchwork.kernel.org/patch/6347811/ Fixes: 19a7b6940b78 ("gpio: brcmstb: Add interrupt and wakeup source support") Signed-off-by: Doug Berger Reviewed-by: Gregory Fong Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-brcmstb.c | 188 ++++++++++++++++++++++++++++++++++---------- 2 files changed, 146 insertions(+), 44 deletions(-) commit ec62464e83beacd8b8856e8313a4cae4a91ea90b Author: Mauro Carvalho Chehab Date: Tue Oct 31 05:32:02 2017 -0400 media: atmel-isc: get rid of an unused var drivers/media/platform/atmel/atmel-isc.c: In function 'isc_async_complete': drivers/media/platform/atmel/atmel-isc.c:1900:28: warning: variable 'sd_entity' set but not used [-Wunused-but-set-variable] struct isc_subdev_entity *sd_entity; ^~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc.c | 3 --- 1 file changed, 3 deletions(-) commit 633007a36e51c5dd85a20e9ebd17de12566cf2c2 Author: Doug Berger Date: Tue Oct 24 12:54:49 2017 -0700 gpio: brcmstb: correct the configuration of level interrupts This commit corrects a bug when configuring the GPIO hardware for IRQ_TYPE_LEVEL_LOW and IRQ_TYPE_LEVEL_HIGH interrupt types. The hardware is now correctly configured to support those types. Fixes: 19a7b6940b78 ("gpio: brcmstb: Add interrupt and wakeup source support") Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Acked-by: Gregory Fong Signed-off-by: Linus Walleij drivers/gpio/gpio-brcmstb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2c218b9f1bcc30969195d472e7d29f59e4e2ced6 Author: Doug Berger Date: Tue Oct 24 12:54:48 2017 -0700 gpio: brcmstb: switch to handle_level_irq flow Reading and writing the gpio bank status register each time a pending interrupt bit is serviced could cause new pending bits to be cleared without servicing the associated interrupts. By using the handle_level_irq flow instead of the handle_simple_irq flow we get proper handling of interrupt masking as well as acking of interrupts. The irq_ack method is added to support this. Fixes: 19a7b6940b78 ("gpio: brcmstb: Add interrupt and wakeup source support") Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Acked-by: Gregory Fong Signed-off-by: Linus Walleij drivers/gpio/gpio-brcmstb.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit b0d40d2b22fe48cfcbbfb137fd198be0a1cd8a85 Author: Frederic Weisbecker Date: Tue Oct 31 04:18:34 2017 +0100 sched/isolation: Document isolcpus= boot parameter flags, mark it deprecated Document the latest updates on the isolcpus= boot option. While at it, let's also fix the details about the preferred way to isolate a set of CPUs from the scheduler general domains. Cpusets offer a much better interface to achieve that. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Acked-by: Peter Zijlstra Cc: Chris Metcalf Cc: Christoph Lameter Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Rik van Riel Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1509419914-16179-1-git-send-email-frederic@kernel.org [ Clarified the text some more, marked the boot option deprecated. ] Signed-off-by: Ingo Molnar Documentation/admin-guide/kernel-parameters.txt | 39 ++++++++++++++++--------- 1 file changed, 26 insertions(+), 13 deletions(-) commit 142c168e0e50164e67c9399c28dedd65a307cfe5 Author: Doug Berger Date: Tue Oct 24 12:54:47 2017 -0700 gpio: brcmstb: release the bgpio lock during irq handlers The basic memory-mapped GPIO controller lock must be released before calling the registered GPIO interrupt handlers to allow the interrupt handlers to access the hardware. Examples of why a GPIO interrupt handler might want to access the GPIO hardware include an interrupt that is configured to trigger on rising and falling edges that needs to read the current level of the input to know how to respond, or an interrupt that causes a change in a GPIO output in the same bank. If the lock is not released before enterring the handler the hardware accesses will deadlock when they attempt to grab the lock. Since the lock is only needed to protect the calculation of unmasked pending interrupts create a dedicated function to perform this and hide the complexity. Fixes: 19a7b6940b78 ("gpio: brcmstb: Add interrupt and wakeup source support") Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Acked-by: Gregory Fong Signed-off-by: Linus Walleij drivers/gpio/gpio-brcmstb.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 0752df6611f1783d71394a4987d3c134c9ba3fdd Author: Doug Berger Date: Tue Oct 24 12:54:46 2017 -0700 gpio: brcmstb: allow all instances to be wakeup sources This commit allows a wakeup parent interrupt to be shared between instances. It also removes the redundant can_wake member of the private data structure by using whether the parent_wake_irq has been defined to indicate that the GPIO device can wake. Fixes: 19a7b6940b78 ("gpio: brcmstb: Add interrupt and wakeup source support") Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Acked-by: Gregory Fong Signed-off-by: Linus Walleij drivers/gpio/gpio-brcmstb.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 16c0890dc66d258fdeccf7b15a133f3930b19143 Author: Byungchul Park Date: Tue Oct 31 02:46:54 2017 +0100 irq/work: Don't reinvent the wheel but use existing llist API Use the proper llist APIs instead of open-coded variants of them. Signed-off-by: Byungchul Park Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1509414414-14987-1-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar kernel/irq_work.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 0cc449f675604107b6b195a04a3624dcd722e1d8 Author: Masahiro Yamada Date: Tue Oct 24 13:11:11 2017 +0900 pinctrl: uniphier: remove eMMC hardware reset pin-mux This is handled by the mmc-pwrseq-emmc driver, which controls an eMMC hardware reset via a GPIO line. Remove it from the function pin-mux settings. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c | 4 ++-- drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c | 4 ++-- drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 4e96fd3042d9cfd2c5ed176ada7d3bd2b1674f88 Author: Heiko Stuebner Date: Sat Oct 21 10:53:10 2017 +0200 pinctrl: rockchip: Add iomux-route switching support for rk3288 The rk3288 also has one function that can be routed to one of two pins, the hdmi cec functionality can use either gpio7c0 or gpio7c7. So add the route switching support for it. Signed-off-by: Heiko Stuebner Tested-by: Hans Verkuil Reviewed-by: David Wu Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 0f80dbc133e3ebf82766b5276d8d0fe998a6f0db Author: Mika Westerberg Date: Mon Oct 23 15:40:26 2017 +0300 pinctrl: intel: Add Intel Cedar Fork PCH pin controller support Intel Cedar Fork PCH is the successor of Intel Denverton PCH but it is based on the newer GPIO/pinctrl hardware block. Add a new pinctrl/GPIO driver to support it. Signed-off-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/Kconfig | 8 + drivers/pinctrl/intel/Makefile | 1 + drivers/pinctrl/intel/pinctrl-cedarfork.c | 375 ++++++++++++++++++++++++++++++ 3 files changed, 384 insertions(+) commit cf769bd86bccf210e4063540634a7abf2b99581f Author: Mika Westerberg Date: Mon Oct 23 15:40:25 2017 +0300 pinctrl: intel: Make offset to interrupt status register configurable Some GPIO blocks have the interrupt status (GPI_IS) offset different than it normally is, so make it configurable. If no offset is specified we use the default. While there remove two unused constants from the core driver. Signed-off-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-intel.c | 20 ++++++++++++-------- drivers/pinctrl/intel/pinctrl-intel.h | 3 +++ 2 files changed, 15 insertions(+), 8 deletions(-) commit 5ac9d2df5bdd7c4e58700ad42aa7c9356bbf154d Author: Markus Elfring Date: Sun Oct 22 20:21:55 2017 +0200 gpio-adnp: Use common error handling code in adnp_gpio_dbg_show() Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Linus Walleij drivers/gpio/gpio-adnp.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit 5a24d4b601561da08a70c065d4630bd9fadb37e8 Author: Sergei Shtylyov Date: Fri Oct 13 00:08:14 2017 +0300 gpio-rcar: use devm_ioremap_resource() Using devm_ioremap_resource() has several advantages over devm_ioremap(): - it checks the passed resource's validity; - it calls devm_request_mem_region() to check for the resource overlap; - it prints an error message in case of error. We can call devm_ioremap_resource() instead of devm_ioremap_nocache() as ioremap() and ioremap_nocache() are implemented identically on ARM. Doing this saves 2 LoCs and 80 bytes (AArch64 gcc 4.8.5). Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Linus Walleij drivers/gpio/gpio-rcar.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 7c36e6e14da53a0a9c0893c363163afe629b2ee5 Author: Ji-Ze Hong (Peter Hong) Date: Fri Oct 13 10:21:35 2017 +0800 USB: serial: f81534: implement break control Implement Fintek f81534 break on/off with LCR register. It's the same with 16550A LCR register layout. Signed-off-by: Ji-Ze Hong (Peter Hong) Signed-off-by: Johan Hovold drivers/usb/serial/f81534.c | 47 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 6 deletions(-) commit 1396007286b1e2fd5dd10ae6a5ccaaaed51ab762 Author: Maxime Ripard Date: Mon Oct 9 22:53:39 2017 +0200 pinctrl: sunxi: Enforce the strict mode by default The strict mode should always have been enabled on our driver, and leaving it unchecked just makes it harder to find a migration path as time passes. Let's enable it by default now so that hopefully the new SoCs should be safe. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sunxi.c | 1 + 1 file changed, 1 insertion(+) commit cd70387f892205bcd7b8093b0837269b0739cbe0 Author: Maxime Ripard Date: Mon Oct 9 22:53:38 2017 +0200 pinctrl: sunxi: Disable strict mode for old pinctrl drivers Old pinctrl drivers will need to disable strict mode for various reasons, among which: - Some DT will still have a pinctrl group for each GPIO used, which will be rejected by pin_request. While we could remove those nodes, we still have to deal with old DTs. - Some GPIOs on these boards need to have their pin configuration changed (for bias or current), and there's no clear migration path Let's disable the strict mode on those SoCs so that there's no breakage. Signed-off-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun5i.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun6i-a31-r.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun8i-a23-r.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun8i-a23.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun8i-a33.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun8i-h3-r.c | 3 ++- drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c | 3 ++- drivers/pinctrl/sunxi/pinctrl-sun9i-a80-r.c | 1 + drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c | 1 + 11 files changed, 13 insertions(+), 2 deletions(-) commit aae842a3ff3385f27f1df8a9ee1494a416ec032d Author: Maxime Ripard Date: Mon Oct 9 22:53:37 2017 +0200 pinctrl: sunxi: Introduce the strict flag Our pinctrl device should have had strict set all along. However, it wasn't the case, and most of our old device trees also have a pinctrl group in addition to the GPIOs properties, which mean that we can't really turn it on now. All our new SoCs don't have that group, so we should still enable that mode on the newer one though. In order to enable it by default, add a flag that will allow to disable that mode that should be set by pinctrl drivers that cannot be migrated. Signed-off-by: Maxime Ripard Signed-off-by: Linus Walleij drivers/pinctrl/sunxi/pinctrl-sunxi.c | 12 +++++++++++- drivers/pinctrl/sunxi/pinctrl-sunxi.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) commit dea744bae7a55cc71dd8d54cdb76639907fce1ec Author: Ji-Ze Hong (Peter Hong) Date: Fri Oct 13 10:21:34 2017 +0800 USB: serial: f81534: fix hang-up on overrun The F81532/534 without this patch will hang-up on data overrun. It's caused by enable LSR interrupt in IER by default and occur data overrun, the chip will busy for process LSR interrupt but not read LSR internally. It will not responed for USB control endpoint0 and we can't read LSR from driver in this situration. So we'll disable the LSR interrupt in probe() and submit the LSR worker to clear LSR state when reported LSR error bit with bulk-in data in f81534_process_per_serial_block(). Signed-off-by: Ji-Ze Hong (Peter Hong) Signed-off-by: Johan Hovold drivers/usb/serial/f81534.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit ed6e26baa7431ebfad890f275e191e32b5a4103c Author: Christophe JAILLET Date: Fri Oct 20 21:49:14 2017 +0200 bug-hunting.rst: Fix an example and a typo in a Sphinx tag - Use the same file name in the explanation and in the example (conex.c vs sonixj.c) - Add a missing ':' in a :ref: tag which leads to incorrect Shpinx output - Add some missing ',' and ';' Signed-off-by: Christophe JAILLET Signed-off-by: Jonathan Corbet Documentation/admin-guide/bug-hunting.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 771394a54148f18926ca86414e51c69eda27d0cd Author: Douglas Fischer Date: Sun Oct 29 23:29:55 2017 +0000 USB: serial: qcserial: add pid/vid for Sierra Wireless EM7355 fw update Add USB PID/VID for Sierra Wireless EM7355 LTE modem QDL firmware update mode. Signed-off-by: Douglas Fischer Cc: stable Signed-off-by: Johan Hovold drivers/usb/serial/qcserial.c | 1 + 1 file changed, 1 insertion(+) commit 290318702bb2e7d74c24fbe52d8184fc79a17e93 Author: Chris Lew Date: Thu Oct 26 15:28:56 2017 -0700 rpmsg: glink: Use best fit intent during tx Intents can vary in size, try to find the best fitting remote intent instead of first fit when sending a message to the remote proc. Signed-off-by: Chris Lew Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 073893778dc2f68e41d65d79925ca89db526b4ab Author: Chris Lew Date: Thu Oct 26 15:28:55 2017 -0700 rpmsg: glink: Add support to preallocate intents The base intents prequeued during channel creation may not satisfy a channel's throughput requirement. Add support for intents dt-binding to allow channels to specify the size and amount of intents to prequeue during endpoint announcement. Signed-off-by: Chris Lew [bjorn: Altered how defaults are expressed] Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) commit eace566c3406cac3131d44198f05b7b55f79651f Author: Chris Lew Date: Thu Oct 26 15:28:54 2017 -0700 dt-bindings: soc: qcom: Support GLINK intents Virtual GLINK channels may know what throughput to expect from a remoteproc. An intent advertises to the remoteproc this channel is ready to receive data. Allow a channel to define the size and amount of intents to be prequeued. Acked-by: Rob Herring Signed-off-by: Chris Lew Signed-off-by: Bjorn Andersson Documentation/devicetree/bindings/soc/qcom/qcom,glink.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2394facb17bcace4b3c19b50202177a5d8903b64 Author: Arun Kumar Neelakantam Date: Mon Oct 30 11:11:24 2017 +0530 rpmsg: glink: Initialize the "intent_req_comp" completion variable The "intent_req_comp" variable is used without initialization which results in NULL pointer dereference in qcom_glink_request_intent(). we need to initialize the completion variable before using it. Fixes: 27b9c5b66b23 ("rpmsg: glink: Request for intents when unavailable") Signed-off-by: Arun Kumar Neelakantam Signed-off-by: Bjorn Andersson drivers/rpmsg/qcom_glink_native.c | 1 + 1 file changed, 1 insertion(+) commit 9f058fa2efb10cd75884c4ee6c357bab07715f02 Author: Avaneesh Kumar Dwivedi Date: Tue Oct 24 21:22:27 2017 +0530 remoteproc: qcom: Add support for mss remoteproc on msm8996 This patch add support for mss boot on msm8996. Major changes include initializing mss rproc for msm8996, making appropriate change for executing mss reset sequence etc. Tested-and-acked-by: Bjorn Andersson Signed-off-by: Avaneesh Kumar Dwivedi Signed-off-by: Bjorn Andersson .../devicetree/bindings/remoteproc/qcom,q6v5.txt | 1 + drivers/remoteproc/qcom_q6v5_pil.c | 164 ++++++++++++++++++--- 2 files changed, 141 insertions(+), 24 deletions(-) commit 6c5a9dc2481b4819c00bbcef8005b59c04d64963 Author: Avaneesh Kumar Dwivedi Date: Tue Oct 24 21:22:26 2017 +0530 remoteproc: qcom: Make secure world call for mem ownership switch MSS proc on msm8996 can not access fw loaded region without stage second translation of memory pages where mpss image are loaded. This patch in order to enable mss boot on msm8996 invoke scm call to switch or share ownership between apps and modem. Signed-off-by: Avaneesh Kumar Dwivedi [bjorn: Corrected error path in q6v5_start()] Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_q6v5_pil.c | 106 +++++++++++++++++++++++++++++++++++-- 1 file changed, 101 insertions(+), 5 deletions(-) commit 94c907859a4c678de8e74eeece5c0487b5629361 Author: Avaneesh Kumar Dwivedi Date: Tue Oct 24 21:22:25 2017 +0530 remoteproc: qcom: refactor mss fw image loading sequence This patch refactor code to first load all firmware blobs and then update modem proc to authenticate and boot fw. Tested-and-acked-by: Bjorn Andersson Signed-off-by: Avaneesh Kumar Dwivedi Signed-off-by: Bjorn Andersson drivers/remoteproc/qcom_q6v5_pil.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit d82bd359972a7fe71a778396cf287bc9f9f3b981 Author: Avaneesh Kumar Dwivedi Date: Tue Oct 24 21:22:24 2017 +0530 firmware: scm: Add new SCM call API for switching memory ownership Two different processors on a SOC need to switch memory ownership during load/unload. To enable this, second level memory map table need to be updated, which is done by secure layer. This patch adds the interface for making secure monitor call for memory ownership switching request. Acked-by: Andy Gross Signed-off-by: Avaneesh Kumar Dwivedi [bjorn: Minor style and kerneldoc updates] Signed-off-by: Bjorn Andersson drivers/firmware/qcom_scm-32.c | 7 ++++ drivers/firmware/qcom_scm-64.c | 27 ++++++++++++ drivers/firmware/qcom_scm.c | 95 ++++++++++++++++++++++++++++++++++++++++++ drivers/firmware/qcom_scm.h | 5 +++ include/linux/qcom_scm.h | 16 +++++++ 5 files changed, 150 insertions(+) commit ae74ac0828868af3295395be7bc892e0d0aba376 Merge: faa865f 7679eb2 Author: Stephen Boyd Date: Mon Oct 30 17:59:10 2017 -0700 Merge tag 'clk-v4.15-exynos-pm' of git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk into clk-next Pull Samsung clk driver updates from Sylwester Nawrocki: - An addition of separate driver for the Exynos 4412 ISP CMU, needed to model and properly handle the clock controller's dependencies on the ISP power domain. - Adding __maybe_unused attributes to the exynos5433_cmu_{suspend, resume} ops to suppress compiler warnings with CONFIG_PM disabled. * tag 'clk-v4.15-exynos-pm' of git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk: clk: samsung: Add a separate driver for Exynos4412 ISP clocks clk: samsung: Add dt bindings for Exynos4412 ISP clock controller clk: samsung: Instantiate Exynos4412 ISP clocks only when available clk: samsung: exynos5433: mark PM functions as __maybe_unused commit aa2bc739ef4a181a7589eb009be96a870cc1788f Author: Jakub Kicinski Date: Mon Oct 30 13:46:47 2017 -0700 net: filter: remove unused variable and fix warning bpf_getsockopt bpf call sets the ret variable to zero and never changes it. What's worse in case CONFIG_INET is not selected the variable is completely unused generating a warning. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Acked-by: Lawrence Brakmo Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 04d73f86e35d41410ec55242b90330ec23dfe2b0 Author: Jeff Layton Date: Mon Oct 30 11:16:07 2017 -0400 jfs: remove increment of i_version counter JFS does not set SB_I_VERSION and doesn't use the i_version counter internally. Just remove this increment. Signed-off-by: Jeff Layton Signed-off-by: Dave Kleikamp fs/jfs/super.c | 1 - 1 file changed, 1 deletion(-) commit 6546911ed369af8d747215ff8b6144618e91c6ab Author: Arnd Bergmann Date: Thu Oct 19 13:14:49 2017 +0200 time: Move old timekeeping interfaces to timekeeping32.h The interfaces based on 'struct timespec' and 'unsigned long' seconds are no longer recommended for new code, and we are trying to migrate to ktime_t based interfaces and other y2038-safe variants. This moves all the legacy interfaces from linux/timekeeping.h into a new timekeeping32.h to better document this. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Miroslav Lichvar Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Signed-off-by: Arnd Bergmann Signed-off-by: John Stultz include/linux/ktime.h | 1 + include/linux/timekeeping.h | 137 +------------------------------------- include/linux/timekeeping32.h | 151 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 154 insertions(+), 135 deletions(-) commit abc8f96e3eb846fcf6333395ee1f6ed4a734576c Author: Arnd Bergmann Date: Thu Oct 19 13:14:48 2017 +0200 time: Move time_t conversion helpers to time32.h On 64-bit architectures, the timespec64 based helpers in linux/time.h are defined as macros pointing to their timespec based counterparts. This made sense when they were first introduced, but as we are migrating away from timespec in general, it's much less intuitive now. This changes the macros to work in the exact opposite way: we always provide the timespec64 based helpers and define the old interfaces as macros for them. Now we can move those macros into linux/time32.h, which already contains the respective helpers for 32-bit architectures. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Miroslav Lichvar Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Signed-off-by: Arnd Bergmann Signed-off-by: John Stultz include/linux/time32.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/time64.h | 50 +------------------------------------------------- kernel/time/time.c | 5 +++-- 3 files changed, 49 insertions(+), 51 deletions(-) commit 5dbf20127f8cca8588ad0b0e3e8ded587ac7afa0 Author: Arnd Bergmann Date: Thu Oct 19 13:14:47 2017 +0200 time: Move time_t based interfaces to time32.h Interfaces based on 'struct timespec' or 'struct timeval' should no longer be used for new code, which can use either ktime_t or 'struct timespec64' instead. To make this a little clearer, this moves the various helpers into a new time32.h header. For the moment, this gets included by the normal time.h, but we may be able to separate it entirely when most users of time32.h are gone. Individual helpers in the new file can get removed once they become unused in the future. Since the contents of time32.h look a lot like what's in time64.h, I'm reordering them during the move to make them more similar, and to allow a follow-up patch to redirect the 'timespec' based functions to thei 'timespec64' based counterparts on 64-bit architectures later. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Miroslav Lichvar Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Signed-off-by: Arnd Bergmann [jstultz: Whitespace & checkpatch fixups] Signed-off-by: John Stultz include/linux/time.h | 163 +-------------------------------------------- include/linux/time32.h | 176 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 177 insertions(+), 162 deletions(-) commit 85bf19e7df2479140eff2348a4e6a9c19b5c3960 Author: Arnd Bergmann Date: Thu Oct 19 13:14:46 2017 +0200 time: Remove unused functions The (slow but) ongoing work on conversion from timespec to timespec64 has led some timespec based helper functions to become unused. No new code should use them, so we can remove the functions entirely. I'm planning to obsolete additional interfaces next and remove more of these. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Miroslav Lichvar Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Signed-off-by: Arnd Bergmann Signed-off-by: John Stultz include/linux/time.h | 18 ------------------ include/linux/time64.h | 28 ---------------------------- kernel/time/time.c | 18 ------------------ 3 files changed, 64 deletions(-) commit 1572fa03784831b81ec26ec379374cf6bdec04fb Author: Arnd Bergmann Date: Thu Oct 19 13:14:45 2017 +0200 timekeeping: Use timespec64 in timekeeping_inject_offset As part of changing all the timekeeping code to use 64-bit time_t consistently, this removes the uses of timeval and timespec as much as possible from do_adjtimex() and timekeeping_inject_offset(). The timeval_inject_offset_valid() and timespec_inject_offset_valid() just complicate this, so I'm folding them into the respective callers. This leaves the actual 'struct timex' definition, which is part of the user-space ABI and should be dealt with separately when we have agreed on the ABI change. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Miroslav Lichvar Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Signed-off-by: Arnd Bergmann Signed-off-by: John Stultz kernel/time/timekeeping.c | 72 ++++++++++++++++------------------------------- 1 file changed, 25 insertions(+), 47 deletions(-) commit e0956dcc4ba74ec4b17e32fc9a156fcba1ef6610 Author: Arnd Bergmann Date: Thu Oct 19 13:14:44 2017 +0200 timekeeping: Consolidate timekeeping_inject_offset code The code to check the adjtimex() or clock_adjtime() arguments is spread out across multiple files for presumably only historic reasons. As a preparatation for a rework to get rid of the use of 'struct timeval' and 'struct timespec' in there, this moves all the portions into kernel/time/timekeeping.c and marks them as 'static'. The warp_clock() function here is not as closely related as the others, but I feel it still makes sense to move it here in order to consolidate all callers of timekeeping_inject_offset(). Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Miroslav Lichvar Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Signed-off-by: Arnd Bergmann [jstultz: Whitespace fixup] Signed-off-by: John Stultz include/linux/time.h | 26 ---------- kernel/time/ntp.c | 61 ---------------------- kernel/time/ntp_internal.h | 1 - kernel/time/time.c | 36 +------------ kernel/time/timekeeping.c | 123 ++++++++++++++++++++++++++++++++++++++++++++- kernel/time/timekeeping.h | 2 +- 6 files changed, 123 insertions(+), 126 deletions(-) commit 0f295b0650c90362b4111f46d7f9149a0a4191be Author: Jason Gunthorpe Date: Fri Oct 13 11:54:33 2017 -0600 rtc: Allow rtc drivers to specify the tv_nsec value for ntp ntp is currently hardwired to try and call the rtc set when wall clock tv_nsec is 0.5 seconds. This historical behaviour works well with certain PC RTCs, but is not universal to all rtc hardware. Change how this works by introducing the driver specific concept of set_offset_nsec, the delay between current wall clock time and the target time to set (with a 0 tv_nsecs). For x86-style CMOS set_offset_nsec should be -0.5 s which causes the last second to be written 0.5 s after it has started. For compat with the old rtc_set_ntp_time, the value is defaulted to + 0.5 s, which causes the next second to be written 0.5s before it starts, as things were before this patch. Testing shows many non-x86 RTCs would like set_offset_nsec ~= 0, so ultimately each RTC driver should set the set_offset_nsec according to its needs, and non x86 architectures should stop using update_persistent_clock64 in order to access this feature. Future patches will revise the drivers as needed. Since CMOS and RTC now have very different handling they are split into two dedicated code paths, sharing the support code, and ifdefs are replaced with IS_ENABLED. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Miroslav Lichvar Cc: Richard Cochran Cc: Prarit Bhargava Cc: Stephen Boyd Signed-off-by: Jason Gunthorpe Signed-off-by: John Stultz drivers/rtc/class.c | 3 + drivers/rtc/systohc.c | 53 +++++++++++----- include/linux/rtc.h | 43 ++++++++++++- kernel/time/ntp.c | 166 ++++++++++++++++++++++++++++++++++---------------- 4 files changed, 196 insertions(+), 69 deletions(-) commit 330a4db89d39a6b43f36da16824eaa7a7509d34d Author: Liang Chen Date: Mon Oct 30 14:46:35 2017 -0700 bcache: explicitly destroy mutex while exiting mutex_destroy does nothing most of time, but it's better to call it to make the code future proof and it also has some meaning for like mutex debug. As Coly pointed out in a previous review, bcache_exit() may not be able to handle all the references properly if userspace registers cache and backing devices right before bch_debug_init runs and bch_debug_init failes later. So not exposing userspace interface until everything is ready to avoid that issue. Signed-off-by: Liang Chen Reviewed-by: Michael Lyle Reviewed-by: Coly Li Reviewed-by: Eric Wheeler Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c157313791a999646901b3e3c6888514ebc36d62 Author: tang.junhui Date: Mon Oct 30 14:46:34 2017 -0700 bcache: fix wrong cache_misses statistics Currently, Cache missed IOs are identified by s->cache_miss, but actually, there are many situations that missed IOs are not assigned a value for s->cache_miss in cached_dev_cache_miss(), for example, a bypassed IO (s->iop.bypass = 1), or the cache_bio allocate failed. In these situations, it will go to out_put or out_submit, and s->cache_miss is null, which leads bch_mark_cache_accounting() to treat this IO as a hit IO. [ML: applied by 3-way merge] Signed-off-by: tang.junhui Reviewed-by: Michael Lyle Reviewed-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/request.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d44c2f9e7cc0041f0cd88df1fe7a1fceb713ab14 Author: Tang Junhui Date: Mon Oct 30 14:46:33 2017 -0700 bcache: update bucket_in_use in real time bucket_in_use is updated in gc thread which triggered by invalidating or writing sectors_to_gc dirty data, It's a long interval. Therefore, when we use it to compare with the threshold, it is often not timely, which leads to inaccurate judgment and often results in bucket depletion. We have send a patch before, by the means of updating bucket_in_use periodically In gc thread, which Coly thought that would lead high latency, In this patch, we add avail_nbuckets to record the count of available buckets, and we calculate bucket_in_use when alloc or free bucket in real time. [edited by ML: eliminated some whitespace errors] Signed-off-by: Tang Junhui Signed-off-by: Michael Lyle Reviewed-by: Michael Lyle Reviewed-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/alloc.c | 10 ++++++++++ drivers/md/bcache/bcache.h | 1 + drivers/md/bcache/btree.c | 17 ++++++++++------- drivers/md/bcache/btree.h | 2 +- 4 files changed, 22 insertions(+), 8 deletions(-) commit 3b304d24a718ae779ee9c7f2014dd3b2d0893b70 Author: Elena Reshetova Date: Mon Oct 30 14:46:32 2017 -0700 bcache: convert cached_dev.count from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable cached_dev.count is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Reviewed-by: Michael Lyle Signed-off-by: Elena Reshetova Signed-off-by: Jens Axboe drivers/md/bcache/bcache.h | 7 ++++--- drivers/md/bcache/super.c | 6 +++--- drivers/md/bcache/writeback.h | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) commit d59b23795933678c9638fd20c942d2b4f3cd6185 Author: Coly Li Date: Mon Oct 30 14:46:31 2017 -0700 bcache: only permit to recovery read error when cache device is clean When bcache does read I/Os, for example in writeback or writethrough mode, if a read request on cache device is failed, bcache will try to recovery the request by reading from cached device. If the data on cached device is not synced with cache device, then requester will get a stale data. For critical storage system like database, providing stale data from recovery may result an application level data corruption, which is unacceptible. With this patch, for a failed read request in writeback or writethrough mode, recovery a recoverable read request only happens when cache device is clean. That is to say, all data on cached device is up to update. For other cache modes in bcache, read request will never hit cached_dev_read_error(), they don't need this patch. Please note, because cache mode can be switched arbitrarily in run time, a writethrough mode might be switched from a writeback mode. Therefore checking dc->has_data in writethrough mode still makes sense. Changelog: V4: Fix parens error pointed by Michael Lyle. v3: By response from Kent Oversteet, he thinks recovering stale data is a bug to fix, and option to permit it is unnecessary. So this version the sysfs file is removed. v2: rename sysfs entry from allow_stale_data_on_failure to allow_stale_data_on_failure, and fix the confusing commit log. v1: initial patch posted. [small change to patch comment spelling by mlyle] Signed-off-by: Coly Li Signed-off-by: Michael Lyle Reported-by: Arne Wolf Reviewed-by: Michael Lyle Cc: Kent Overstreet Cc: Nix Cc: Kai Krakow Cc: Eric Wheeler Cc: Junhui Tang Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe drivers/md/bcache/request.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 82ab86e82911107ead6fc7cd73568f75bc266a57 Author: Mark Brown Date: Mon Oct 30 19:40:25 2017 +0000 Revert "ASoC: rt5651: Enable jack detection on JD* pins" This reverts commit 60d5a1a47b9a8381c08d2263b11ac9c757c87746. Signed-off-by: Mark Brown include/sound/rt5651.h | 8 --- sound/soc/codecs/rt5651.c | 168 +--------------------------------------------- sound/soc/codecs/rt5651.h | 4 -- 3 files changed, 2 insertions(+), 178 deletions(-) commit f2ea85d760fbfb8f9f81c7309c6e361119ce7a32 Author: Arvind Yadav Date: Sun Oct 29 11:25:47 2017 +0530 leds: lp55xx: fix spelling mistake: 'cound' -> 'could' Trivial fix to spelling mistakes in 'lp5523_init_program_engine'. Signed-off-by: Arvind Yadav Signed-off-by: Jacek Anaszewski drivers/leds/leds-lp5523.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e9b6f20828ac880dbc1fa2fdbafae779473d1af Author: Bart Van Assche Date: Thu Oct 19 10:00:48 2017 -0700 block: Fix a race between blk_cleanup_queue() and timeout handling Make sure that if the timeout timer fires after a queue has been marked "dying" that the affected requests are finished. Reported-by: chenxiang (M) Fixes: commit 287922eb0b18 ("block: defer timeouts to a workqueue") Signed-off-by: Bart Van Assche Tested-by: chenxiang (M) Cc: Christoph Hellwig Cc: Keith Busch Cc: Hannes Reinecke Cc: Ming Lei Cc: Johannes Thumshirn Cc: Signed-off-by: Jens Axboe block/blk-core.c | 2 ++ block/blk-timeout.c | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) commit 31acd18b61a48bf9225f106a6ff74774583ee375 Author: Mike Marciniszyn Date: Mon Oct 23 06:06:32 2017 -0700 IB/hfi1: Take advantage of kvzalloc_node in sdma initialization The code that allocates the tx ring in the sdma code fails to take advantage of kvzalloc variations. Fix by converting to use kvzalloc_node. Reported-by: Leon Romanovsky Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/sdma.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 45a041cce7c4b393e6ee242b7f090393dd1bf9ac Author: Kamenee Arumugam Date: Mon Oct 23 06:06:24 2017 -0700 IB/hfi1: Don't modify num_user_contexts module parameter The driver parameter num_user_contexts controls global behavior and should not be modified by the driver. This patch eliminates modification of num_user_contexts by using a local variable to keep track of the value. Reviewed-by: Michael J. Ruhl Signed-off-by: Kamenee Arumugam Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 2d9544aacf9e6bdfd4fed44207f815fc7b4d9fc1 Author: Mike Marciniszyn Date: Mon Oct 23 06:06:16 2017 -0700 IB/hfi1: Insure int mask for in-kernel receive contexts is clear The only use for the urg interrupt is for priority PSM packets. There is no reason for this interrupt to be enabled for kernel contexts. Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) commit 1b311f8931cfe5b678c43904cb6f838489afdc0f Author: Mike Marciniszyn Date: Mon Oct 23 06:06:08 2017 -0700 IB/hfi1: Add tx_opcode_stats like the opcode_stats This patch adds tx_opcode_stats to parallel the (rx)opcode_stats in the debugfs. Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/debugfs.c | 56 +++++++++++++++++++++++++++++++----- drivers/infiniband/hw/hfi1/hfi.h | 6 ++-- drivers/infiniband/hw/hfi1/init.c | 7 +++++ drivers/infiniband/hw/hfi1/verbs.c | 24 ++++++++++++++++ 4 files changed, 83 insertions(+), 10 deletions(-) commit 406310c66d95781e58e29a36c3d1528248aaf941 Author: Sebastian Sanchez Date: Wed Oct 25 08:15:18 2017 -0700 IB/hfi1: Validate PKEY for incoming GSI MAD packets These are the use-cases where the pkey needs to be tested to see if a packet needs to be dropped. a) Check if pkey is not FULL_MGMT_P_KEY or LIM_MGMT_P_KEY, drop the packet as it's not part of the management partition. Self-originated packets are an exception. b) If pkey index points to FULL_MGMT_P_KEY and LIM_MGMT_P_KEY is in the table, the packet is coming from a management node, and the receiving node is also a management node, so it is safe for the packet to go through. c) If pkey index points to FULL_MGMT_P_KEY and LIM_MGMT_P_KEY is NOT in the table, drop the packet as LIM_MGMT_P_KEY should always be in the pkey table. It could be a misconfiguration. d) If pkey index points to LIM_MGMT_P_KEY and FULL_MGMT_P_KEY is NOT in the table, it is safe for the packet to go through since a non-management node is talking to another non-managment node. e) If pkey index points to LIM_MGMT_P_KEY and FULL_MGMT_P_KEY is in the table, drop the packet because a non-management node is talking to a management node, and it could be an attack. For the implementation, these rules can be simplied to only checking for (a) and (e). There's no need to check for rule (b) as the packet doesn't need to be dropped. Rule (c) is not possible in the driver as LIM_MGMT_P_KEY is always in the pkey table. Reviewed-by: Michael J. Ruhl Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/mad.c | 86 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 2 deletions(-) commit 00f9203119dd2774564407c7a67b17d81916298b Author: Patel Jay P Date: Mon Oct 23 06:05:53 2017 -0700 Ib/hfi1: Return actual operational VLs in port info query __subn_get_opa_portinfo stores value returned by hfi1_get_ib_cfg() as operational vls. hfi1_get_ib_cfg() returns vls_operational field in hfi1_pportdata. The problem with this is that the value is always equal to vls_supported field in hfi1_pportdata. The logic to calculate operational_vls is to set value passed by FM (in __subn_set_opa_portinfo routine). If no value is passed then default value is stored in operational_vls. Field actual_vls_operational is calculated on the basis of buffer control table. Hence, modifying hfi1_get_ib_cfg() to return actual_operational_vls when used with HFI1_IB_CFG_OP_VLS parameter Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Patel Jay P Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4061f3a4da4574b8c9f11a82c767aaaed3ef2aa9 Author: Michael J. Ruhl Date: Mon Oct 23 06:05:45 2017 -0700 IB/hfi1: Race condition between user notification and driver state The handler for link init state (HLS_UP_INIT) notifies userspace (update_statusp()) before enabling the device (RCV_CTRL_RCV_PORT_ENABLE_SMASK) or setting the device state (ppd->host_link_state). This causes a race condition where the userspace thinks the interface is in the INIT state before the driver has set that state. Rework the code path to eliminate the race. Delay setting the init state until after a HW settling period. Reviewed-by: Sebastian Sanchez Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 27 ++++++++++++++++++--------- drivers/infiniband/hw/hfi1/intr.c | 14 +++++++++++++- 2 files changed, 31 insertions(+), 10 deletions(-) commit 11e142701609546632ba1fda586252d391026a3f Author: Dan Williams Date: Fri Oct 20 15:39:43 2017 -0700 acpi, nfit: add support for NVDIMM_FAMILY_INTEL v1.6 DSMs Per v1.6 of the NVDIMM_FAMILY_INTEL command set [1] some of the new commands require rev-id 2. In addition to enabling ND_CMD_CALL for these new function numbers, add a lookup table for revision-ids by family and function number. [1]: http://pmem.io/documents/NVDIMM_DSM_Interface-V1.6.pdf Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 45 ++++++++++++++++++++++++++++++++++++++++----- drivers/acpi/nfit/nfit.h | 26 +++++++++++++++++++++++++- 2 files changed, 65 insertions(+), 6 deletions(-) commit f0c96c6d40312b1a76cd36709dc3eb5948c1b97f Author: Tony Lindgren Date: Mon Oct 30 10:01:39 2017 -0700 ARM: OMAP2+: Fix smatch found issue for omap_device The patch d85a2d61432a: "ARM: OMAP2+: Populate legacy resources for dma and smartreflex" from Oct 10, 2017, leads to the following Smatch complaint: arch/arm/mach-omap2/omap_device.c:453 omap_device_copy_resources() error: we previously assumed 'oh' could be null (see line 394) Fixes: d85a2d61432a: ("ARM: OMAP2+: Populate legacy resources for dma and smartreflex") Reported-by: Dan Carpenter Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_device.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 021b462a51de48dd84f12f5046b5b57a362d6506 Author: Jiri Olsa Date: Thu Oct 12 13:21:01 2017 +0200 perf stat: Make --per-thread update shadow stats to show metrics We should support this because it would allow easily to collect metrics for different threads in applications. Original patch from posted by Jin Yao in here [1]. 1. Current output, for example: root@skl:/tmp# perf stat --per-thread -p 21623 ^C Performance counter stats for process id '21623': vmstat-21623 0.517479 task-clock (msec) # 0.000 CPUs utilized vmstat-21623 1 context-switches vmstat-21623 0 cpu-migrations vmstat-21623 0 page-faults vmstat-21623 461,306 cycles vmstat-21623 630,724 instructions vmstat-21623 136,265 branches vmstat-21623 2,520 branch-misses 1.444020756 seconds time elapsed root@skl:/tmp# perf stat --per-thread --metrics ipc -p 21623 ^C Performance counter stats for process id '21623': vmstat-21623 631,185 inst_retired.any vmstat-21623 605,893 cpu_clk_unhalted.thread 1.415679293 seconds time elapsed 2. With this patch, the result would be: root@skl:/tmp# perf stat --per-thread -p 21623 ^C Performance counter stats for process id '21623': vmstat-21623 0.533759 task-clock (msec) # 0.000 CPUs utilized vmstat-21623 1 context-switches # 0.002 M/sec vmstat-21623 0 cpu-migrations # 0.000 K/sec vmstat-21623 0 page-faults # 0.000 K/sec vmstat-21623 473,896 cycles # 0.888 GHz vmstat-21623 631,072 instructions # 1.33 insn per cycle vmstat-21623 136,307 branches # 255.372 M/sec vmstat-21623 2,524 branch-misses # 1.85% of all branches 1.544862861 seconds time elapsed root@skl:/tmp# perf stat --per-thread --metrics ipc -p 21623 ^C Performance counter stats for process id '21623': vmstat-21623 1,259,104 inst_retired.any # 1.2 IPC vmstat-21623 1,056,756 cpu_clk_unhalted.thread 2.040954502 seconds time elapsed [1] https://marc.info/?l=linux-kernel&m=150777054620511&w=2 Originally-from: Jin Yao Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: Changbin Du Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-tr8ntktxmy4qc5769ajg5u6c@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat.c | 2 ++ 1 file changed, 2 insertions(+) commit 54830dd0c342525de2ff10f8be7cf0a9f062b896 Author: Jiri Olsa Date: Mon Jan 23 22:42:56 2017 +0100 perf stat: Move the shadow stats scale computation in perf_stat__update_shadow_stats Move the shadow stats scale computation to the perf_stat__update_shadow_stats() function, so it's centralized and we don't forget to do it. It also saves few lines of code. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: Changbin Du Cc: David Ahern Cc: Jin Yao Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-htg7mmyxv6pcrf57qyo6msid@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 3 +-- tools/perf/util/stat-shadow.c | 48 ++++++++++++++++++++++--------------------- tools/perf/util/stat.c | 6 ++---- tools/perf/util/stat.h | 2 +- 4 files changed, 29 insertions(+), 30 deletions(-) commit e268687bfb73bb7bfe65f23f5cba5c8a0e5bb050 Author: Jiri Olsa Date: Mon Jan 23 22:42:56 2017 +0100 perf tools: Add perf_data_file__write function Adding perf_data_file__write function to provide single file write operation. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: Changbin Du Cc: David Ahern Cc: Jin Yao Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-c3f9p4xzykr845ktqcek6p4t@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/data.c | 8 +++++++- tools/perf/util/data.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) commit eae8ad8042d82775da1ddf3faa915b32854d9cf4 Author: Jiri Olsa Date: Mon Jan 23 22:25:41 2017 +0100 perf tools: Add struct perf_data_file Add struct perf_data_file to represent a single file within a perf_data struct. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: Changbin Du Cc: David Ahern Cc: Jin Yao Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-c3f9p4xzykr845ktqcek6p4t@git.kernel.org [ Fixup recent changes in 'perf script --per-event-dump' ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-annotate.c | 4 ++-- tools/perf/builtin-buildid-cache.c | 4 ++-- tools/perf/builtin-buildid-list.c | 8 ++++--- tools/perf/builtin-c2c.c | 4 ++-- tools/perf/builtin-diff.c | 12 +++++----- tools/perf/builtin-evlist.c | 8 ++++--- tools/perf/builtin-inject.c | 12 ++++++---- tools/perf/builtin-kmem.c | 2 +- tools/perf/builtin-kvm.c | 8 ++++--- tools/perf/builtin-lock.c | 8 ++++--- tools/perf/builtin-mem.c | 8 ++++--- tools/perf/builtin-record.c | 6 ++--- tools/perf/builtin-report.c | 6 ++--- tools/perf/builtin-sched.c | 16 ++++++++----- tools/perf/builtin-script.c | 14 ++++++----- tools/perf/builtin-stat.c | 6 ++--- tools/perf/builtin-timechart.c | 8 ++++--- tools/perf/builtin-trace.c | 8 ++++--- tools/perf/tests/topology.c | 14 +++++++---- tools/perf/util/data-convert-bt.c | 8 +++---- tools/perf/util/data.c | 48 +++++++++++++++++++------------------- tools/perf/util/data.h | 10 +++++--- tools/perf/util/header.c | 2 +- 23 files changed, 127 insertions(+), 97 deletions(-) commit 8ceb41d7e305f186543c58178d2e1fe34f708948 Author: Jiri Olsa Date: Mon Jan 23 22:07:59 2017 +0100 perf tools: Rename struct perf_data_file to perf_data Rename struct perf_data_file to perf_data, because we will add the possibility to have multiple files under perf.data, so the 'perf_data' name fits better. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: Changbin Du Cc: David Ahern Cc: Jin Yao Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-39wn4d77phel3dgkzo3lyan0@git.kernel.org [ Fixup recent changes in 'perf script --per-event-dump' ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-annotate.c | 10 ++--- tools/perf/builtin-buildid-cache.c | 8 ++-- tools/perf/builtin-buildid-list.c | 8 ++-- tools/perf/builtin-c2c.c | 10 ++--- tools/perf/builtin-diff.c | 18 ++++---- tools/perf/builtin-evlist.c | 4 +- tools/perf/builtin-inject.c | 26 +++++------ tools/perf/builtin-kmem.c | 8 ++-- tools/perf/builtin-kvm.c | 6 +-- tools/perf/builtin-lock.c | 4 +- tools/perf/builtin-mem.c | 4 +- tools/perf/builtin-record.c | 50 ++++++++++----------- tools/perf/builtin-report.c | 14 +++--- tools/perf/builtin-sched.c | 8 ++-- tools/perf/builtin-script.c | 20 ++++----- tools/perf/builtin-stat.c | 32 ++++++------- tools/perf/builtin-timechart.c | 6 +-- tools/perf/builtin-trace.c | 4 +- tools/perf/tests/topology.c | 10 ++--- tools/perf/util/auxtrace.c | 4 +- tools/perf/util/data-convert-bt.c | 6 +-- tools/perf/util/data.c | 92 +++++++++++++++++++------------------- tools/perf/util/data.h | 32 ++++++------- tools/perf/util/header.c | 20 ++++----- tools/perf/util/intel-bts.c | 6 +-- tools/perf/util/intel-pt.c | 6 +-- tools/perf/util/jit.h | 2 +- tools/perf/util/jitdump.c | 10 ++--- tools/perf/util/session.c | 44 +++++++++--------- tools/perf/util/session.h | 4 +- 30 files changed, 238 insertions(+), 238 deletions(-) commit e00b19e28c35f28332dce1af05c7ae46a80e696a Author: Arvind Yadav Date: Mon Oct 30 21:34:19 2017 +0530 ata: pata_pdc2027x: Fix space before '[' error. Fix checkpatch.pl error: ERROR: space prohibited before open square bracket '['. Signed-off-by: Arvind Yadav Signed-off-by: Tejun Heo drivers/ata/pata_pdc2027x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6301d58477bc11116c78c9542871f27ae374278d Author: Tero Kristo Date: Mon Oct 30 11:11:04 2017 +0200 ARM: OMAP2/3: CM: fix cm_split_idlest functionality cm_split_idlest doesn't take the CM base offset into account right now, causing it to read reserved registers which show idlestatus as active always. This will cause the wait_module_ready functionality to be effectively an expensive NOP, which will cause problems if the module hasn't really activated during its execution. Fix by adding the CM offset into the calculation so the wait_module_ready will access correct register. Signed-off-by: Tero Kristo Reported-by: Filip Matijevic Signed-off-by: Tony Lindgren arch/arm/mach-omap2/cm_common.c | 6 +++++- arch/arm/mach-omap2/prcm-common.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) commit 3c4d296e58a23687f2076d8ad531e6ae2b725846 Author: Tero Kristo Date: Mon Oct 30 11:11:03 2017 +0200 ARM: OMAP3: hwmod_data: add missing module_offs for MMC3 MMC3 hwmod data is missing the module_offs definition. MMC3 belongs under core, so add CORE_MOD for it. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 1 + 1 file changed, 1 insertion(+) commit 642ee1c6df4c8571d8a6846a2623fb54f925ef92 Author: Arnaldo Carvalho de Melo Date: Mon Oct 30 13:11:15 2017 -0300 perf script: Print information about per-event-dump files For a file generated by "perf sched record sleep 50": # perf script --per-event-dump [ perf script: Wrote 23.121 MB perf.data.sched:sched_switch.dump (206015 samples) ] [ perf script: Wrote 0.000 MB perf.data.sched:sched_stat_wait.dump (0 samples) ] [ perf script: Wrote 0.000 MB perf.data.sched:sched_stat_sleep.dump (0 samples) ] [ perf script: Wrote 0.000 MB perf.data.sched:sched_stat_iowait.dump (0 samples) ] [ perf script: Wrote 17.680 MB perf.data.sched:sched_stat_runtime.dump (129342 samples) ] [ perf script: Wrote 0.000 MB perf.data.sched:sched_process_fork.dump (24 samples) ] [ perf script: Wrote 11.328 MB perf.data.sched:sched_wakeup.dump (106770 samples) ] [ perf script: Wrote 0.000 MB perf.data.sched:sched_wakeup_new.dump (24 samples) ] [ perf script: Wrote 2.477 MB perf.data.sched:sched_migrate_task.dump (20434 samples) ] # Similar to what is generated by 'perf record'. Based-on-a-patch-by: yuzhoujian Suggested-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1508921599-10832-3-git-send-email-yuzhoujian@didichuxing.com Link: http://lkml.kernel.org/n/tip-xuketkkjuk2c0qz546ypd1u7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 77 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 69 insertions(+), 8 deletions(-) commit 4e13d47c5806bafb5e524b08a9d759b606b1851c Author: Masahiro Yamada Date: Tue Oct 10 20:43:21 2017 +0900 kbuild: remove KBUILD_SUBDIR_ASFLAGS and KBUILD_SUBDIR_CCFLAGS Accumulate subdir-{cc,as}flags-y directly to KBUILD_{A,C}FLAGS. Remove KBUILD_SUBDIR_{AS,CC}FLAGS. Signed-off-by: Masahiro Yamada Reviewed-by: Cao jin scripts/Makefile.lib | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3a5befc146175de8bf6c4eb68866a4f5ad46265a Author: Cao jin Date: Mon Oct 9 15:11:47 2017 +0800 hexagon/kbuild: replace CFLAGS_MODULE with KBUILD_CFLAGS_MODULE As kbuild document & commit 6588169d51 says: KBUILD_CFLAGS_MODULE is used to add arch-specific options for $(CC). From commandline, CFLAGS_MODULE shall be used. Doesn't have any functional change, but just follow kbuild rules. Signed-off-by: Cao jin CC: linux-hexagon@vger.kernel.org Acked-by: Richard Kuo Signed-off-by: Masahiro Yamada arch/hexagon/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 265444a008ae4451f69a24efda7b3f542cb30f7d Author: Cao jin Date: Mon Oct 9 15:11:46 2017 +0800 c6x/kbuild: replace CFLAGS_MODULE with KBUILD_CFLAGS_MODULE As kbuild document & commit 6588169d51 says: KBUILD_CFLAGS_MODULE is used to add arch-specific options for $(CC). From commandline, CFLAGS_MODULE shall be used. Doesn't have any functional change, but just follow kbuild rules. Signed-off-by: Cao jin CC: Mark Salter CC: Aurelien Jacquiot CC: linux-c6x-dev@linux-c6x.org Signed-off-by: Masahiro Yamada arch/c6x/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 336303ae7fad4a491290a800547b3fde80ac8865 Author: Cao jin Date: Mon Oct 9 15:11:45 2017 +0800 arm/kbuild: replace {C, LD}FLAGS_MODULE with KBUILD_{C, LD}FLAGS_MODULE As kbuild document & commit 6588169d51 says: KBUILD_{C,LD}FLAGS_MODULE are used to add arch-specific options for $(CC) and $(LD). From commandline, {C,LD}FLAGS_MODULE shall be used. Doesn't have any functional change, but just follow kbuild rules. Signed-off-by: Cao jin CC: Russell King CC: linux-arm-kernel@lists.infradead.org Signed-off-by: Masahiro Yamada arch/arm/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9afe77ed849de6af8532b4c1b9310102eed9edf7 Author: Maxim Akristiniy Date: Mon Oct 23 19:51:48 2017 +0300 added new line symbol after warning about dropped messages so this message will not mess with the next one Cc: Steven Rostedt Signed-off-by: Maxim Akristiniy Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek kernel/printk/printk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3ba13298709f46e72b22d087d0aa02bd012e4b0 Author: Tejun Heo Date: Mon Oct 30 08:13:14 2017 -0700 cgroup: mark @cgrp __maybe_unused in cpu_stat_show() The local variable @cgrp isn't used if !CONFIG_CGROUP_SCHED. Mark the variable with __maybe_unused to avoid a compile warning. Reported-by: "kbuild-all@01.org" Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9de55351eeb82106e3b70a282d86a5aa367a6d2e Author: Arvind Yadav Date: Sat Oct 28 23:51:47 2017 +0530 libata: fix spelling mistake: 'ambigious' -> 'ambiguous' Trivial fix to spelling mistakes in ata_parse_force_one(). Signed-off-by: Arvind Yadav Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3c08c5d32d819a73f75a76b315e229a2081680a Author: Miquel Raynal Date: Fri Oct 13 11:02:00 2017 +0200 arm64: dts: marvell: armada-3720-espressobin: fill UART nodes Fill ESPRESSObin uart0 node with pinctrl information like in the Armada-3720-DB device tree (which uses the same node). Also explain how to enable the second UART port available on the headers. This second port is not enabled by default because both headers are dedicated to expose general purpose pins and remapping some of them to use the second UART would break existing users. Suggested-by: László ÁSHIN Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 71e278ce814d9ffc9d02fed76ed9a40ce4aaffcd Author: Miquel Raynal Date: Fri Oct 13 11:01:59 2017 +0200 arm64: dts: marvell: armada-3720-db: enable second UART port Enable Armada-3720-DB second UART port by adding the corresponding device tree node in the board DTS and enabling it. Signed-off-by: Miquel Raynal Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-db.dts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 7c48dc201bf9aa8636716bccaa78f37a165e725b Author: Miquel Raynal Date: Fri Oct 13 11:01:58 2017 +0200 arm64: dts: marvell: armada-37xx: add second UART port Add a node in Armada 37xx DTSI file for the second UART, with a different compatible due to its extended IP which has some differences with the first UART already in place. Make use of this commit to also fully describe the first port and use the same clear and named interrupt bindings for both ports. The standard UART (UART0) uses level-interrupts while the extended UART (UART1) uses edge-triggered interrupts. Signed-off-by: Miquel Raynal Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 2ff0d0b5bb397c3dc5c9b97bd0f20948f0b77740 Author: Miquel Raynal Date: Fri Oct 13 11:01:57 2017 +0200 arm64: dts: marvell: armada-37xx: add UART clock Add the missing clock property to armada-3700 UART node. This clock will be used to derive the prescaler value to comply with the requested baudrate. Signed-off-by: Miquel Raynal Acked-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 1 + 1 file changed, 1 insertion(+) commit 0338b1b393ec7910898e8f7b25b3bf31a7282e16 Author: Ronald Tschalär Date: Wed Oct 25 22:15:19 2017 -0700 Bluetooth: hci_ldisc: Fix another race when closing the tty. The following race condition still existed: P1 P2 cancel_work_sync() hci_uart_tx_wakeup() hci_uart_write_work() hci_uart_dequeue() clear_bit(HCI_UART_PROTO_READY) hci_unregister_dev(hdev) hci_free_dev(hdev) hu->proto->close(hu) kfree(hu) access to hdev and hu Cancelling the work after clearing the HCI_UART_PROTO_READY bit avoids this as any hci_uart_tx_wakeup() issued after the flag is cleared will detect that and not schedule further work. Signed-off-by: Ronald Tschalär Reviewed-by: Lukas Wunner Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ldisc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 663d46736993ed4ab397f878d5cc93991e29bc59 Author: Chao Yu Date: Mon Oct 30 17:02:32 2017 +0800 MAINTAINERS: relocate cpuset.c Commit 201af4c0fab0 ("cgroup: move cgroup files under kernel/cgroup/") have renamed kernel/cpuset.c to kernel/cgroup/cpuset.c, but forgot to update entry of cpuset module in MAINTAINERS, fix it. Signed-off-by: Chao Yu Signed-off-by: Tejun Heo MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc8293663b953c23ff7b73eb15f82393425e5e47 Author: Baoquan He Date: Sun Oct 22 22:30:55 2017 +0800 printk: fix typo in printk_safe.c Link: http://lkml.kernel.org/r/1508682655-27293-1-git-send-email-bhe@redhat.com Cc: rostedt@goodmis.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Baoquan He Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek kernel/printk/printk_safe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe1f68a08fbffd8c84bf8e7f72d2d531a3fe8f50 Author: Gustavo A. R. Silva Date: Tue Oct 24 11:52:46 2017 -0500 USB: serial: kobil_sct: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115014 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Johan Hovold drivers/usb/serial/kobil_sct.c | 1 + 1 file changed, 1 insertion(+) commit da25f490a0b3d9c234d659b21024d61fe2d08c8e Author: Oded Gabbay Date: Thu Oct 26 11:43:34 2017 +0300 microblaze: add missing include to mmu_context_mm.h mmu_context_mm.h is using struct task_struct, which is defined in linux/sched.h. Source files that include mm_context_mm.h (directly or indirectly) and doesn't include linux/sched.h will generate an error. An example of that is drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c This patch adds an include of linux/sched.h to mmu_context_mm.h to avoid such errors. Signed-off-by: Oded Gabbay Signed-off-by: Michal Simek arch/microblaze/include/asm/mmu_context_mm.h | 1 + 1 file changed, 1 insertion(+) commit 93367bfca98f36cece57c01dbce6ea1b4ac58245 Author: Claudio Foellmi Date: Wed Oct 4 11:43:45 2017 +0200 i2c: omap: Trigger bus recovery in lockup case A very conservative check for bus activity (to prevent interference in multimaster setups) prevented the bus recovery methods from being triggered in the case that SDA or SCL was stuck low. This defeats the purpose of the recovery mechanism, which was introduced for exactly this situation (a slave device keeping SDA pulled down). Also added a check to make sure SDA is low before attempting recovery. If SDA is not stuck low, recovery will not help, so we can skip it. Note that bus lockups can persist across reboots. The only other options are to reset or power cycle the offending slave device, and many i2c slaves do not even have a reset pin. If we see that one of the lines is low for the entire timeout duration, we can actually be sure that there is no other master driving the bus. It is therefore save for us to attempt a bus recovery. Signed-off-by: Claudio Foellmi Tested-by: Vignesh R Reviewed-by: Grygorii Strashko [wsa: fixed one return code to -EBUSY] Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-omap.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit fd9dde6abcb9bfe6c6bee48834e157999f113971 Author: Nick Desaulniers Date: Fri Oct 27 09:33:41 2017 -0700 arm64: prevent regressions in compressed kernel image size when upgrading to binutils 2.27 Upon upgrading to binutils 2.27, we found that our lz4 and gzip compressed kernel images were significantly larger, resulting is 10ms boot time regressions. As noted by Rahul: "aarch64 binaries uses RELA relocations, where each relocation entry includes an addend value. This is similar to x86_64. On x86_64, the addend values are also stored at the relocation offset for relative relocations. This is an optimization: in the case where code does not need to be relocated, the loader can simply skip processing relative relocations. In binutils-2.25, both bfd and gold linkers did this for x86_64, but only the gold linker did this for aarch64. The kernel build here is using the bfd linker, which stored zeroes at the relocation offsets for relative relocations. Since a set of zeroes compresses better than a set of non-zero addend values, this behavior was resulting in much better lz4 compression. The bfd linker in binutils-2.27 is now storing the actual addend values at the relocation offsets. The behavior is now consistent with what it does for x86_64 and what gold linker does for both architectures. The change happened in this upstream commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=1f56df9d0d5ad89806c24e71f296576d82344613 Since a bunch of zeroes got replaced by non-zero addend values, we see the side effect of lz4 compressed image being a bit bigger. To get the old behavior from the bfd linker, "--no-apply-dynamic-relocs" flag can be used: $ LDFLAGS="--no-apply-dynamic-relocs" make With this flag, the compressed image size is back to what it was with binutils-2.25. If the kernel is using ASLR, there aren't additional runtime costs to --no-apply-dynamic-relocs, as the relocations will need to be applied again anyway after the kernel is relocated to a random address. If the kernel is not using ASLR, then presumably the current default behavior of the linker is better. Since the static linker performed the dynamic relocs, and the kernel is not moved to a different address at load time, it can skip applying the relocations all over again." Some measurements: $ ld -v GNU ld (binutils-2.25-f3d35cf6) 2.25.51.20141117 ^ $ ls -l vmlinux -rwxr-x--- 1 ndesaulniers eng 300652760 Oct 26 11:57 vmlinux $ ls -l Image.lz4-dtb -rw-r----- 1 ndesaulniers eng 16932627 Oct 26 11:57 Image.lz4-dtb $ ld -v GNU ld (binutils-2.27-53dd00a1) 2.27.0.20170315 ^ pre patch: $ ls -l vmlinux -rwxr-x--- 1 ndesaulniers eng 300376208 Oct 26 11:43 vmlinux $ ls -l Image.lz4-dtb -rw-r----- 1 ndesaulniers eng 18159474 Oct 26 11:43 Image.lz4-dtb post patch: $ ls -l vmlinux -rwxr-x--- 1 ndesaulniers eng 300376208 Oct 26 12:06 vmlinux $ ls -l Image.lz4-dtb -rw-r----- 1 ndesaulniers eng 16932466 Oct 26 12:06 Image.lz4-dtb By Siqi's measurement w/ gzip: binutils 2.27 with this patch (with --no-apply-dynamic-relocs): Image 41535488 Image.gz 13404067 binutils 2.27 without this patch (without --no-apply-dynamic-relocs): Image 41535488 Image.gz 14125516 Any compression scheme should be able to get better results from the longer runs of zeros, not just GZIP and LZ4. 10ms boot time savings isn't anything to get excited about, but users of arm64+compression+bfd-2.27 should not have to pay a penalty for no runtime improvement. Reported-by: Gopinath Elanchezhian Reported-by: Sindhuri Pentyala Reported-by: Wei Wang Suggested-by: Ard Biesheuvel Suggested-by: Rahul Chaudhry Suggested-by: Siqi Lin Suggested-by: Stephen Hines Signed-off-by: Nick Desaulniers Reviewed-by: Ard Biesheuvel [will: added comment to Makefile] Signed-off-by: Will Deacon arch/arm64/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 707ad7efbd0474bace6a63f41ab17b10dedbe818 Author: Masahiro Yamada Date: Mon Oct 30 19:00:37 2017 +0900 ARM: multi_v7_defconfig: enable CONFIG_GPIO_UNIPHIER Enable the GPIO controller driver used for UniPhier SoC family. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit d0e470e0db7ead4e5dc43057b8ede78451d0dd6b Author: Masahiro Yamada Date: Mon Oct 30 19:00:52 2017 +0900 arm64: defconfig: enable CONFIG_GPIO_UNIPHIER Enable the GPIO controller driver used for UniPhier SoC family. Signed-off-by: Masahiro Yamada Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 18ea0db3081fff8279c037cd0eeb8f9003cf49e1 Merge: e45cba7 b94d22d Author: Arnd Bergmann Date: Mon Oct 30 14:40:14 2017 +0100 Merge tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt Pull "Amlogic 64-bit DT updates for v4.15, round 2" from Kevin Hilman: - add support for new GPIO IRQ driver * tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM64: dts: meson-gx: add external PHY interrupt on some platforms ARM64: dts: meson-gx: add gpio interrupt controller ARM64: meson: enable MESON_IRQ_GPIO in Kconfig ARM64: dts: meson-gxbb-odroidc2: fix usb1 power supply commit e45cba78c6a0df67383df36086f65950c5239e76 Merge: 25b8384 e54b911 Author: Arnd Bergmann Date: Mon Oct 30 14:38:56 2017 +0100 Merge tag 'imx-dt64-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt Pull "Freescale arm64 device tree updates for 4.15" from Shawn Guo: - Add GICv3 ITS node and PCIe devcies for LS1088A support. - Enable PCIe support for LS2088A SoC. - Add OP-TEE support for various Layerscape SoCs, LS1012A, LS1043A, LS1046A, LS1088A and LS208XA. - Update DPAA QBMan nodes to use constant defines in the interrupt description. - Add DSPI device to support SPI-NOR on LS1012A based boards. * tag 'imx-dt64-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: update the DPAA QBMan nodes arm64: dts: ls1088a: add PCIe controller DT nodes arm64: dts: ls1088a: add gicv3 ITS DT node arm64: dts: ls2088a: add pcie support arm64: dts: ls: Add optee node dt-bindings: mtd: add sst25wf040b and en25s64 to sip-nor list dt-bindings: spi: Add fsl,ls1012a-dspi compatible string arm64: dts: ls1012a: add the DTS node for DSPI support commit 25b838489824d226b3b1ae45d6a640c00b18f751 Merge: a5494ae f5a3d78 Author: Arnd Bergmann Date: Mon Oct 30 14:37:50 2017 +0100 Merge tag 'v4.14-next-dts64' of https://github.com/mbgg/linux-mediatek into next/dt Pull "Mediatek: 64-bit DT update for v4.15" from Matthias Brugger: - mt2712: add cpuidle support * tag 'v4.14-next-dts64' of https://github.com/mbgg/linux-mediatek: arm64: dts: mediatek: Add cpuidle support for MT2712 commit a5494aed0d94a2e6b12be963d28b57cfffe0f9e9 Merge: b295477 9d59b70 Author: Arnd Bergmann Date: Mon Oct 30 14:34:03 2017 +0100 Merge tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt Pull "Amlogic 64-bit platforms: DT updates for v4.15" from Kevin Hilman: - new SoC support: A113D - new boards: Tronsmart Vega S96, Khadas vim2 - reserved memory fixups - gpio-names cleanups - MMC cleanups, enable high-speed modes - misc cleanups * tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson-axg: add initial A113D SoC DT support dt-bindings: arm: amlogic: Add Meson AXG binding ARM64: dts: meson-gx: remove unnecessary uart compatible ARM64: dts: meson-gx: remove unnecessary clocks properties ARM64: dts: meson-gxl: Add alternate ARM Trusted Firmware reserved memory zone ARM64: dts: meson-gxm: enable HS400 on the vim2 ARM64: dts: meson-gxbb-nexbox-a95x: Enable USB Nodes dt-bindings: arm: amlogic: Add Tronsmart Vega S96 binding ARM64: dts: meson-gxm: Add Vega S96 board ARM64: dts: meson-gxm: Add support for Khadas VIM2 ARM64: dts: meson-gxl: Take eMMC data strobe out of eMMC pins ARM64: dts: meson-gxl: adjust libretech-cc gpio-line-names ARM64: dts: meson-gxl: adjust kvim gpio-line-names ARM64: dts: meson-gxbb: adjust odroid-c2 gpio-line-names ARM64: dts: meson-gxbb: adjust nanopi-k2 gpio-line-names ARM64: dts: meson-gx: adjust gpio-ranges for TEST_N ARM64: dts: meson-gx: remove gpio offset ARM: dts: meson8: remove gpio offset ARM64: dts: meson-gxl-libretech-cc: enable internal phy leds ARM64: dts: meson-gxl-libretech-cc: enable saradc commit b295477e0026b92cceba642b111a3efd569d3cc5 Merge: a2c614a c4e3bf2 Author: Arnd Bergmann Date: Mon Oct 30 14:32:45 2017 +0100 Merge tag 'mvebu-dt64-4.15-1' of git://git.infradead.org/linux-mvebu into next/dt Pull "mvebu dt64 for 4.15 (part 1)" from Gregory CLEMENT: On Armada 7K/8k: - Improve network support at SoC and board level - Enable watchdog - Add UART muxing - On 7040 DB: add CD SDIO and NAND support - On 8040 DB: add PCIE more ports and SPI1 On Armada 37xx: - Fix UART register size - Add vmmc regulator for SD on 3720 DB * tag 'mvebu-dt64-4.15-1' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: 7040-db: Add the carrier detect pin for SD card on CP arm64: dts: marvell: 7040-db: Document the gpio expander arm64: dts: marvell: enable additional PCIe ports on Armada 8040 DB arm64: dts: marvell: add NAND support on the 7040-DB board arm64: dts: marvell: Enable Armada-8040-DB CPS SPI1 arm64: dts: marvell: 8040-db: enable the SFP ports arm64: dts: marvell: 7040-db: enable the SFP port arm64: dts: marvell: 7040-db: add comphy reference to Ethernet port arm64: dts: marvell: mcbin: add comphy references to Ethernet ports arm64: dts: marvell: 37xx: remove empty line arm64: dts: marvell: cp110: add PPv2 port interrupts arm64: dts: marvell: add comphy nodes on cp110 master and slave arm64: dts: marvell: extend the cp110 syscon register area length arm64: dts: marvell: enable AP806 watchdog arm64: dts: marvell: Fix A37xx UART0 register size arm64: dts: marvell: armada-3720-db: Add vmmc regulator for SD slot arm64: dts: marvell: add UART muxing on Armada 7K/8K commit a2c614a7db32b28e19c283b8764fabd786216d0f Merge: 918c822 15274c2 Author: Arnd Bergmann Date: Mon Oct 30 14:27:50 2017 +0100 Merge tag 'tegra-for-4.15-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt Pull "arm64: tegra: Device tree changes for v4.15-rc1" from Thierry Reding: Enables host1x, VIC, PCIe and the BPMP thermal sensor on Tegra186. * tag 'tegra-for-4.15-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Add BPMP thermal sensor to Tegra186 arm64: tegra: Enable PCIe on Jetson TX2 arm64: tegra: Add PCIe node for Tegra186 arm64: tegra: Add VIC on Tegra186 arm64: tegra: Add host1x on Tegra186 arm64: tegra: Add #power-domain-cells for BPMP commit 918c822374431a2555c8a4f6e29ab1f93e556742 Merge: 11c3889 e9ce353 Author: Arnd Bergmann Date: Mon Oct 30 14:26:01 2017 +0100 Merge tag 'renesas-arm64-dt2-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Pull "Second Round of Renesas ARM64 Based SoC DT Updates for v4.15" from Simon Horman: * r8a7795 (H3) and r8a7796 (M3-W) SoCs - Use R-Car Gen 3 fallback compat string for GPIO Simon Horman says "Use newly added R-Car GPIO Gen 1, 2 and 3 fallback compat strings in peace of now deprecated non-generation specific R-Car GPIO fallback compat string in the DT of Renesas ARM and arm64 based SoCs. * r8a7795 (H3) and r8a7796 (M3-W) Salvator boards - Add dr_mode property for USB2.0 channel 0 Shimoda-san says "Since Salvator-X[S] have a USB2.0 dual-role channel (CN9), this patch adds dr_mode property for USB2.0 channel 0 (EHCI/OHCI and HS-USB) as "otg". Using dual-role channel (or not) is related to the type of USB receptor on board specification. So, I added the property into the salvator-common.dtsi." - Add pfc node for USB3.0 channel 0 Shimoda-san says "Since a R-Car Gen3 bootloader enables the PFC of USB3.0 channel 0, the USB3.0 host controller works without this setting on the kernel. But, this setting should have salvator-common.dtsi. So, this patch adds the pfc node for USB3.0 channel 0." * r8a7795 (H3) and r8a7796 (M3-W) Salvator and ULCB boards - Correct audio_clkout Morimoto-san says ""audio_clkout" is dummy clock of <&rcar_sound 0> to avoid clock loop which invites probe conflct. Thus <&rcar_sound 0> and "audio_clkout" should be same value." * r8a7795 (H3) and r8a7796 (M3-W) Salvator and ULCB, and r8a77995 (D3) Draak boards - Drop "avb_phy_int" from avb_pins Shimoda-san says "Since the Ethernet AVB driver doesn't support AVB_PHY_INT handling and it will be handled by a phy driver as a gpio pin, this patch removes the "avb_phy_int" from the avb_pins node." * r8a77995 (D3) Draak board - Enable PWM channels Shimoda-san says "Each channel connects to LTC2644 for brightness control." * r8a77970 (V3M) Eagle and ULCB Kingfisher boards - Add initial device tree support * tag 'renesas-arm64-dt2-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (31 commits) arm64: dts: renesas: salvator-common: add dr_mode property for USB2.0 channel 0 arm64: dts: r8a7796: Use R-Car GPIO Gen3 fallback compat string arm64: dts: r8a7795: Use R-Car GPIO Gen3 fallback compat string arm64: renesas: ulcb: fixup audio_clkout arm64: renesas: salvator-common: fixup audio_clkout arm64: dts: renesas: eagle: add EtherAVB support arm64: dts: r8a77995: Add INTC-EX device node arm64: dts: r8a77970: Add INTC-EX device node arm64: dts: r8a7796: Add INTC-EX device node arm64: dts: ulcb-kf: hog USB3 hub control gpios arm64: dts: ulcb-kf: enable PCA9548 on I2C4 arm64: dts: ulcb-kf: enable PCA9548 on I2C2 arm64: dts: ulcb-kf: enable TCA9539 on I2C4 arm64: dts: ulcb-kf: enable TCA9539 on I2C2 arm64: dts: ulcb-kf: enable USB3.0 Host arm64: dts: ulcb-kf: enable PCIE0/1 arm64: dts: ulcb-kf: enable USB2.0 Host channel 0 arm64: dts: ulcb-kf: enable HSUSB arm64: dts: ulcb-kf: enable CAN0/1 arm64: dts: ulcb-kf: enable SCIF1 ... commit 11c3889c237b8ff4ff62420d9a964b10e15f330d Merge: add5c42 76c48e1 Author: Arnd Bergmann Date: Mon Oct 30 14:17:29 2017 +0100 Merge tag 'uniphier-dt64-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt Pull "UniPhier ARM64 SoC DT updates for v4.15" from Masahiro Yamada: - add thermal monitor and thermal zone nodes - add efuse nodes - fix W=2 warnings - add GPIO controller nodes and related properties - add resets properties * tag 'uniphier-dt64-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: arm64: dts: uniphier: add resets properties arm64: dts: uniphier: add eMMC hardware reset provider node arm64: dts: uniphier: add GPIO hog definition arm64: dts: uniphier: route on-board device IRQ to GPIO controller arm64: dts: uniphier: add GPIO controller nodes arm64: dts: uniphier: fix W=2 build warnings arm64: dts: uniphier: enable NAND for PXs3 reference board arm64: dts: uniphier: add efuse node for LD11, LD20, and PXs3 arm64: dts: uniphier: add nodes of thermal monitor and thermal zone for LD20 commit f4fa88ab28ab61941a22f938eda3d93d1fe371af Author: Christian König Date: Mon Oct 30 14:16:21 2017 +0100 drm/radeon: deprecate and remove KFD interface To quote Felix: "For testing KV with current user mode stack, please use amdgpu. I don't expect this to work with radeon and I'm not planning to spend any effort on making radeon work with a current user mode stack." Only compile tested, but should be straight forward. Signed-off-by: Christian König Signed-off-by: Oded Gabbay MAINTAINERS | 2 - drivers/gpu/drm/amd/amdkfd/Kconfig | 2 +- drivers/gpu/drm/radeon/Makefile | 3 +- drivers/gpu/drm/radeon/cik.c | 14 +- drivers/gpu/drm/radeon/cikd.h | 2 - drivers/gpu/drm/radeon/radeon.h | 3 - drivers/gpu/drm/radeon/radeon_drv.c | 10 - drivers/gpu/drm/radeon/radeon_kfd.c | 901 ------------------------------------ drivers/gpu/drm/radeon/radeon_kfd.h | 47 -- drivers/gpu/drm/radeon/radeon_kms.c | 7 - 10 files changed, 4 insertions(+), 987 deletions(-) commit add5c42e99b2d88542e4a194ba586930756c94ff Merge: 9f4fb20 d25d418 Author: Arnd Bergmann Date: Mon Oct 30 14:13:31 2017 +0100 Merge tag 'sunxi-dt64-for-4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Pull "Allwinner arm64 DT changes for 4.15" from Maxime Ripard: Most notable changes: - SPI and DMA support on the a64 - New boards: NanoPi NEO Plus2 * tag 'sunxi-dt64-for-4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm: allwinner: Correct unit name in devicetree binding example arm64: allwinner: a64: add dma controller references to spi nodes arm64: allwinner: a64: Add device node for DMA controller arm64: allwinner: a64: Fix node with unit name and no reg property arm64: allwinner: a64: Fix simple-bus unit address format error arm64: allwinner: h5: add NanoPi NEO Plus2 DT support arm64: allwinner: a64: add SPI nodes commit 9f4fb2081ba9bb61757531bed48d98d15f26aac3 Merge: b3a8704 2cb51a8 Author: Arnd Bergmann Date: Mon Oct 30 14:11:46 2017 +0100 Merge tag 'amlogic-dt-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt Pull "Amlogic 32-bit DT updates for v4.15, round 2" from Kevin Hilman: - enable new GPIO IRQ controller - add efuse node * tag 'amlogic-dt-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM: dts: meson: add the efuse node ARM: dts: meson8b: enable gpio interrupt controller ARM: dts: meson8b: add support for booting the secondary CPU cores ARM: dts: meson8: add support for booting the secondary CPU cores commit b3a87044464d2c6ecdca07c24b844a3b522ad8a1 Merge: da7920e 854106b Author: Arnd Bergmann Date: Mon Oct 30 14:10:39 2017 +0100 Merge tag 'at91-ab-4.15-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/dt Pull" ARM: at91: DT for 4.15" from Alexandre Belloni: - sama5d2 xplained: add charger and SD card power supply - sama5d27_som1_ek: many adjustments - at91sam9x25ek: add pwm0 and can1 * tag 'at91-ab-4.15-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: ARM: dts: at91: at91sam9x5ek: use DMA for USART0 ARM: dts: at91: at91sam9x25ek: add pwm0 ARM: dts: at91: at91sam9x25ek: add CAN1 interface ARM: dts: at91: sama5d2_xplained: remove pull-up on SD/MMC lines ARM: dts: at91: sama5d2_xplained: add pinmuxing for pwm0 ARM: dts: at91: sama5d2_xplained: set PB_USER as wakeup source ARM: dts: at91: sama5d27_som1_ek: remove pull-up on SD/MMC lines ARM: dts: at91: sama5d27_som1_ek: remove not connected CAN0 ARM: dts: at91: sama5d27_som1_ek: add pinmuxing for pwm0 ARM: dts: at91: sama5d27_som1_ek: add aliases for i2c ARM: dts: at91: sama5d27_som1_ek: set USER button as a wakeup source ARM: dts: at91: sama5d27_som1_ek: update serial aliases ARM: dts: at91: sama5d27_som1_ek: enable i2c2 ARM: dts: at91: sama5d27_som1_ek: add disabled status ARM: dts: at91: usb_a9g20: fix rtc node ARM: dts: at91: sama5d2 Xplained: Describe the SD card power supply ARM: dts: at91: sama5d2_xplained: Add charger node commit da7920e31de98a149ab4048d7f05913429b84c2f Merge: 0292f8a 27e1acb Author: Arnd Bergmann Date: Mon Oct 30 14:06:39 2017 +0100 Merge tag 'imx-dt-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt Pull "i.MX device tree updates for 4.15" from Shawn Guo: - New board support: i.MX51 ZII RDU1, i.MX53 GE Healthcare PPD, i.MX6 TX modules for MB7 from Ka-Ro Electronics, i.MX6 Wandboard revd1 variants, i.MX6 LWN DISPLAY5 board, Pistachio i.MX6Q board, i.MX6SX Vining-2000 board. - Use the 'vpcie-supply' property for PCIe device for boards imx6qdl-sabresd, imx6q-novena and imx6q-cm-fx6. - A series from Jagan Teki to update imx6qdl-icore board with audio, touch and CAN support. - Switch to nvmem for accessing OCOTP from tempmon for i.MX6SX and add tempmon support for i.MX6UL. - A bunch of patches from Lothar Waßmann updating Ka-Ro i.MX28, i.MX53 and i.MX6 TX modules. - Fix DTC warnings in i.MX device trees, dropping leading zeros from unit address, correcting display nodes notation and display port names, fixing nodes with unit name and no reg property. - Other random device updates for various board support. * tag 'imx-dt-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (63 commits) ARM: dts: imx53-tx53: fix interrupt flags ARM: dts: imx28-tx28: fix interrupt flags ARM: dts: display5: Device tree description of LWN's DISPLAY5 board ARM: dts: imx53-qsb-common: Fix 'led_gpio7_7@0' node with unit name and no reg property ARM: dts: imx53-m53evk: Fix 'led_gpio@0' node with unit name and no reg property ARM: dts: imx53: Fix 'usbphy@x' node with unit name and no reg property ARM: dts: imx51-ts4800: Fix 'port@0' node with unit name and no reg property ARM: dts: imx51-apf51dev: Fix 'backlight@bl1' node with unit name and no reg property ARM: dts: imx: add ZII RDU1 board ARM: dts: imx: add support for TX6 modules on MB7 baseboard ARM: dts: imx: add support for TX6QP ARM: dts: imx6-tx6: add a .dtsi file for the MB7 baseboard ARM: dts: imx6-tx6: move display configuration to .dtsi file ARM: dts: imx6-tx6: add support for I2C bus recovery ARM: dts: imx6-tx6: convert to using simple-audio-card ARM: dts: imx6-tx6: specify ethernet phy reset post-delay ARM: dts: imx6-tx6: improve ethernet related pinctrl setup ARM: dts: imx6-tx6: add trickle-charge config for DS1339 ARM: dts: imx6-tx6: remove obsolete ipu1 alias ARM: dts: imx6-tx6: remove obsolete eeti,egalax_ts ... [arnd: made sure we have no new leading zeroes in unit address during merge] commit 0292f8a8f8e9d74ad8519c92d712039edb8f08b4 Merge: 2132910 a1763a8 Author: Arnd Bergmann Date: Mon Oct 30 13:43:36 2017 +0100 Merge tag 'uniphier-dt-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into next/dt Pull "UniPhier ARM SoC DT updates for v4.15" from Masahiro Yamada: - add thermal monitor and thermal zone nodes - fix W=2 warnings - add GPIO controller nodes and related properties - add resets properties * tag 'uniphier-dt-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: ARM: dts: uniphier: add resets properties ARM: dts: uniphier: add GPIO hog definition ARM: dts: uniphier: route on-board device IRQ to GPIO controller ARM: dts: uniphier: add GPIO controller nodes ARM: dts: uniphier: fix W=2 build warnings ARM: dts: uniphier: add nodes of thermal monitor and thermal zone for PXs2 commit 6218f96c58dbf44a06aeaf767aab1f54fc397838 Author: Catalin Marinas Date: Thu Oct 26 18:36:47 2017 +0100 arm64: Implement arch-specific pte_access_permitted() The generic pte_access_permitted() implementation only checks for pte_present() (together with the write permission where applicable). However, for both kernel ptes and PROT_NONE mappings pte_present() also returns true on arm64 even though such mappings are not user accessible. Additionally, arm64 now supports execute-only user permission (PROT_EXEC) which is implemented by clearing the PTE_USER bit. With this patch the arm64 implementation of pte_access_permitted() checks for the PTE_VALID and PTE_USER bits together with writable access if applicable. Cc: Reported-by: Al Viro Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon arch/arm64/include/asm/pgtable.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit e4082de21c5c4f9001b8e44b39b5e72f7ed3b2a7 Author: Stafford Horne Date: Sat Oct 21 22:39:09 2017 +0900 Documentation: openrisc: Updates to README Update the OpenRISC readme to provide some more up-to-date information on how to get started with OpenRISC. This includes: - remove references to southpole who no longer are consulting for OpenRISC (confirmed with Jonas) - suggested QEMU instead of the old or1ksim as QEMU is well supported - include instructions on how to get an FPGA board running Suggested-by: Pavel Machek Signed-off-by: Stafford Horne Documentation/openrisc/README | 65 +++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 27 deletions(-) commit 00aa61d36da1969b139dc10b9b555677ebb03c42 Author: Stafford Horne Date: Tue Sep 19 22:55:54 2017 +0900 Documentation: Move OpenRISC docs out of arch/ The OpenRISC docs have traditionally been in arch/ but that does not seem like the correct place to be. Move them so they will be more visible to others. Also update MAINTAINERS to make sure we get notifications of changes. Signed-off-by: Stafford Horne Documentation/openrisc/README | 99 +++++++++++++++++++++++++++++++++++++++++++ Documentation/openrisc/TODO | 12 ++++++ MAINTAINERS | 1 + arch/openrisc/README.openrisc | 99 ------------------------------------------- arch/openrisc/TODO.openrisc | 12 ------ 5 files changed, 112 insertions(+), 111 deletions(-) commit 7f340fea3a78201f8d5d14b414d6a314cb67452a Author: Stafford Horne Date: Tue Sep 19 22:39:31 2017 +0900 MAINTAINERS: Add OpenRISC pic maintainer The OpenRISC team is the maintainer of the irqchip or1k-pic driver under drivers/irqchip. Signed-off-by: Stafford Horne MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 85936eeb48e59af43b0130291027485dc19239ef Author: Stafford Horne Date: Tue Sep 19 22:33:00 2017 +0900 openrisc: dts: or1ksim: Add stdout-path During reviews of the OpenRISC SMP patch series it was suggested to add stdout-path to the SMP dts file. Add stdout-path to our other dts files to be a good example. Cc: Geert Uytterhoeven Signed-off-by: Stafford Horne arch/openrisc/boot/dts/or1ksim.dts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2132910ec924bbbba62de36f19121f3ef79147d4 Merge: b51c5cb 88b1b18 Author: Arnd Bergmann Date: Mon Oct 30 13:19:09 2017 +0100 Merge tag 'amlogic-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/dt Pull "Amlogic 32-bit platforms: DT updates for v4.15" - add SDIO MMC controller - reserved memory fixes - SoC info driver nodes - enable USB host controller * tag 'amlogic-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM: dts: meson: add the SDIO MMC controller ARM: dts: meson8b: add reserved memory zone to fix silent freezes ARM: dts: meson: add SoC information nodes dt-bindings: Amlogic: add documentation for the SoC info register areas ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b ARM: dts: meson: enabling the USB Host controller on Odroid-C1/C1+ board commit b51c5cb56fa3a51bbf12bda03f3f10fa5796c376 Merge: 877b203 1efed40 Author: Arnd Bergmann Date: Mon Oct 30 13:16:33 2017 +0100 Merge tag 'keystone_dts_for_4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/dt Pull "ARM: Keystone DTS update for 4.15" from Santosh Shilimkar: - McASP support for K2G EVM - I2C support for K2G EVM - USB support for K2G EVM - SPI & SPI NOR flash support for K2G EVM - ECAP PWM support for K2G EVM * tag 'keystone_dts_for_4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: ARM: dts: keystone-k2g-evm: add bindings for SPI NOR flash ARM: dts: keystone-k2g: Add SPI nodes ARM: dts: keystone-k2g-evm: Enable PWM ECAP0 ARM: dts: keystone-k2g: Add ECAP PWM DT nodes ARM: dts: k2g-evm: Enable USB 0 and 1 ARM: dts: k2g: Add USB instances ARM: dts: keystone-k2g-evm: Add I2C EEPROM DT entry ARM: dts: keystone-k2g: Add I2C nodes ARM: dts: keystone-k2g: Add McASP nodes commit e1ea2f9856b765a2eaabb403a6751f70efc9ba4c Merge: aad93c7 0b07194 Author: David S. Miller Date: Mon Oct 30 14:10:01 2017 +0900 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Several conflicts here. NFP driver bug fix adding nfp_netdev_is_nfp_repr() check to nfp_fl_output() needed some adjustments because the code block is in an else block now. Parallel additions to net/pkt_cls.h and net/sch_generic.h A bug fix in __tcp_retransmit_skb() conflicted with some of the rbtree changes in net-next. The tc action RCU callback fixes in 'net' had some overlap with some of the recent tcf_block reworking. Signed-off-by: David S. Miller commit 877b203e15d34d14b2551ba97f9a58daac96f60e Merge: d524dc3 bc79cce Author: Arnd Bergmann Date: Mon Oct 30 12:43:54 2017 +0100 Merge tag 'arm-soc/for-4.15/devicetree' of http://github.com/Broadcom/stblinux into next/dt Pull "Broadcom devicetree changes for 4.15" from Florian Fainelli: This pull request contains Broadcom ARM-based Device Tree changes for 4.15, please pull the following: - Eric adds support for the CLCD and PWM controller on Cygnus chis - Loic fixes the console path on the Raspberry Pi 3 (already submitted as fixes) and then proceeds with enabling the BCM43438 bluetooth chip on the Raspberry Pi 3 - Rafal specifies the USB ports on the Luxul XWR-1200 - Dan adds support for the Luxul ABR-4500 based on BCM47094, the Luxul XAP-810 and XAP-1440 both based on BCM53573 - Florian adds support for the Broadcom Hurricane 2 SoC by adding general machine binding, clock binding, SoC DTS include file and a DTS for the Ubiquiti Networks UniFi Switch 8 * tag 'arm-soc/for-4.15/devicetree' of http://github.com/Broadcom/stblinux: ARM: dts: Hurricane 2: Add basic support for Ubiquiti UniFi Switch 8 dt-bindings: Add Ubiquiti Networks vendor prefix ARM: dts: Add Broadcom Hurricane 2 DTS include file dt-bindings: Document Broadcom Hurricane 2 clocks dt-bindings: Add documentation for Broadcom Hurricane 2 SoCs ARM: dts: BCM53573: Add DT for Luxul XAP-1440 ARM: dts: BCM53573: Add DT for Luxul XAP-810 ARM: dts: BCM5301X: Add DT for Luxul ABR-4500 ARM: dts: BCM5301X: Add DT for Luxul XBR-4500 ARM: dts: BCM5301X: Specify USB ports for USB LED of Luxul XWR-1200 ARM: dts: bcm2837-rpi-3-b: Add bcm43438 serial slave ARM: dts: bcm283x: Fix console path on RPi3 ARM: dts: cygnus: Add the PWM node ARM: dts: cygnus: Add the CLCD controller commit d4417e22551377c6e589c15ff2b931610e5230bc Author: Nikolay Borisov Date: Mon Oct 16 16:48:40 2017 +0300 btrfs: Replace opencoded sizes with their symbolic constants Currently btrfs' code uses a mix of opencoded sizes and defines from sizes.h. Let's unifiy the code base to always use the symbolic constants. No functional changes Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 +- fs/btrfs/disk-io.c | 2 +- fs/btrfs/super.c | 2 +- fs/btrfs/tests/inode-tests.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 859a58a2074858dc03943c1fa1a2975576f9b0b8 Author: Gu JinXiang Date: Wed Oct 11 16:44:27 2017 +0800 btrfs: Use bd_dev to generate index when dev_state_hashtable add items. Fix missing change from commit f8f84b2dfda5 ("btrfs: index check-integrity state hash by a dev_t"). Function btrfsic_dev_state_hashtable_lookup uses dev_t to generate hashval when look in up a btrfsic_dev_state in hash table. So when we add a btrfsic_dev_state into the hash table, it should also use dev_t. Reproducer of this bug: Use MOUNT_OPTIONS="-o check_int" when running xfstest, device can not be mounted successfully. So xfstest can not run. Signed-off-by: Gu JinXiang Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 102ed2c5ff932439bbbe74c7bd63e6d5baa9f732 Author: Anand Jain Date: Sat Oct 14 08:34:02 2017 +0800 btrfs: fix false EIO for missing device When one of the device is missing, bbio_error() takes care of setting the error status. And if its only IO that is pending in that stripe, it fails to check the status of the other IO at %bbio_error before setting the error %bi_status for the %orig_bio. Fix this by checking if %bbio->error has exceeded the %bbio->max_errors. Reproducer as below fdatasync error is seen intermittently. mount -o degraded /dev/sdc /btrfs dd status=none if=/dev/zero of=$(mktemp /btrfs/XXX) bs=4096 count=1 conv=fdatasync dd: fdatasync failed for ‘/btrfs/LSe’: Input/output error The reason for the intermittences of the problem is because the following conditions have to be met, which depends on timing: In btrfs_map_bio() - the RAID1 the missing device has to be at %dev_nr = 1 In bbio_error() . before bbio_error() is called the bio of the not-missing device at %dev_nr = 0 must be completed so that the below condition is true if (atomic_dec_and_test(&bbio->stripes_pending)) { Signed-off-by: Anand Jain Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/volumes.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit de48373454aceaf65877f9953eaf942505e83cc5 Author: Anand Jain Date: Thu Oct 12 16:43:00 2017 +0800 btrfs: use need_full_stripe() in __btrfs_map_block() A cleanup patch, use need_full_stripe() to replace the open code. Signed-off-by: Anand Jain Reviewed-by: Qu Wenruo Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/volumes.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 79f015f216539dfdf0d3ef0b3bbb9dc7754364cd Author: Goldwyn Rodrigues Date: Mon Oct 16 05:43:21 2017 -0500 btrfs: cleanup extent locking sequence Code cleanup for better understanding: Variable needs_unlock to be called extent_locked to show state as opposed to action. Changed the type to int, to reduce code in the critical path. Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/file.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 2dbe0c77186c691386b74391039899808a4d3f59 Author: Anand Jain Date: Sat Oct 14 08:35:56 2017 +0800 btrfs: use BLK_STS defines where needed At few places we could use BLK_STS_OK and BLK_STS_NOSUPP. Signed-off-by: Anand Jain Reviewed-by: Satoru Taekeuchi Reviewed-by: David Sterba [ dropped first hunk btrfs_endio_direct_read ] Signed-off-by: David Sterba fs/btrfs/compression.c | 3 ++- fs/btrfs/inode.c | 2 +- fs/btrfs/volumes.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) commit bf2681cb94d13d91326fc098ca98620b595a9d6b Author: Josef Bacik Date: Fri Sep 29 15:44:05 2017 -0400 btrfs: add assertions for releasing trans handle reservations These are useful for debugging problems where we mess with trans->block_rsv to make sure we're not screwing something up. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3b60d436a165f890597d0226def17858973fa985 Author: Josef Bacik Date: Fri Sep 29 15:43:58 2017 -0400 btrfs: remove type argument from comp_tree_refs We can get this from the ref we've passed in. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/delayed-ref.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit d278850eff3053ef166cf64c16f798dfe36278a2 Author: Josef Bacik Date: Fri Sep 29 15:43:57 2017 -0400 btrfs: remove delayed_ref_node from ref_head This is just excessive information in the ref_head, and makes the code complicated. It is a relic from when we had the heads and the refs in the same tree, which is no longer the case. With this removal I've cleaned up a bunch of the cruft around this old assumption as well. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/backref.c | 4 +- fs/btrfs/delayed-ref.c | 126 +++++++++++++++++++------------------------ fs/btrfs/delayed-ref.h | 49 ++++++----------- fs/btrfs/disk-io.c | 12 ++--- fs/btrfs/extent-tree.c | 90 ++++++++++++------------------- include/trace/events/btrfs.h | 13 ++--- 6 files changed, 119 insertions(+), 175 deletions(-) commit c1103f7a5d7a544dfdaca6102de68792909dc834 Author: Josef Bacik Date: Fri Sep 29 15:43:56 2017 -0400 btrfs: move all ref head cleanup to the helper function We do a couple different cleanup operations on the ref head. We adjust counters, we'll free any reserved space if we didn't end up using the ref, and we clear the pending csum bytes. Move all these disparate things into cleanup_ref_head and clean up the logic in __btrfs_run_delayed_refs so that it handles the !ref case a lot cleaner, as well as making run_one_delayed_ref() only deal with real refs and not the ref head. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 145 ++++++++++++++++++++++--------------------------- 1 file changed, 64 insertions(+), 81 deletions(-) commit 1ce7a5ec44c8b148c4600e25c696a135319734db Author: Josef Bacik Date: Fri Sep 29 15:43:55 2017 -0400 btrfs: move ref_mod modification into the if (ref) logic We only use this logic if our ref isn't a ref_head, so move it up into the if (ref) case since we know that this is a normal ref and not a delayed ref head. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 194ab0bc21cc99c5b804040aa785e0bdcc214656 Author: Josef Bacik Date: Fri Sep 29 15:43:54 2017 -0400 btrfs: breakout empty head cleanup to a helper Move this code out to a helper function to further simplivy __btrfs_run_delayed_refs. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 79 ++++++++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 34 deletions(-) commit b00e62507ec6a9b63d9b3019795584e694085b65 Author: Josef Bacik Date: Fri Sep 29 15:43:53 2017 -0400 btrfs: move extent_op cleanup to a helper Move the extent_op cleanup for an empty head ref to a helper function to help simplify __btrfs_run_delayed_refs. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 77 ++++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 37 deletions(-) commit 2eadaa22c17ac3c546850f70d9d20fa19459dbce Author: Josef Bacik Date: Fri Sep 29 15:43:52 2017 -0400 btrfs: add a helper to return a head ref Simplify the error handling in __btrfs_run_delayed_refs by breaking out the code used to return a head back to the delayed_refs tree for processing into a helper function. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit 7c777430e855898461d54efd14b3942c763ee8de Author: Josef Bacik Date: Fri Sep 29 15:43:51 2017 -0400 Btrfs: only check delayed ref usage in should_end_transaction We were only doing btrfs_check_space_for_delayed_refs() if the metadata space was full, ie we couldn't allocate chunks. This assumes we'll be able to allocate chunks during transaction commit, but since nothing does a LIMIT flush during the transaction commit this won't actually happen unless we happen to run shy of actual space. We already take into account a full fs in btrfs_check_space_for_delayed_refs() so just kill this extra check to make sure we're ending the transaction when we need to. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/transaction.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fd708b81d972a0714b02a60eb4792fdbf15868c4 Author: Josef Bacik Date: Fri Sep 29 15:43:50 2017 -0400 Btrfs: add a extent ref verify tool We were having corruption issues that were tied back to problems with the extent tree. In order to track them down I built this tool to try and find the culprit, which was pretty successful. If you compile with this tool on it will live verify every ref update that the fs makes and make sure it is consistent and valid. I've run this through with xfstests and haven't gotten any false positives. Thanks, Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ update error messages, add fixup from Dan Carpenter to handle errors of read_tree_block ] Signed-off-by: David Sterba fs/btrfs/Kconfig | 11 + fs/btrfs/Makefile | 1 + fs/btrfs/ctree.h | 5 + fs/btrfs/disk-io.c | 6 + fs/btrfs/extent-tree.c | 22 ++ fs/btrfs/ref-verify.c | 1031 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/ref-verify.h | 62 +++ 7 files changed, 1138 insertions(+) commit 84f7d8e6242ceb377c7af10a7133c653cc7fea5f Author: Josef Bacik Date: Fri Sep 29 15:43:49 2017 -0400 btrfs: pass root to various extent ref mod functions We need the actual root for the ref verifier tool to work, so change these functions to pass the root around instead. This will be used in a subsequent patch. Signed-off-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/ctree.c | 2 +- fs/btrfs/ctree.h | 7 ++++--- fs/btrfs/extent-tree.c | 24 +++++++++++++----------- fs/btrfs/file.c | 10 +++++----- fs/btrfs/inode.c | 9 +++++---- fs/btrfs/ioctl.c | 2 +- fs/btrfs/relocation.c | 14 +++++++------- fs/btrfs/tree-log.c | 2 +- 8 files changed, 37 insertions(+), 33 deletions(-) commit fb592373cddeb4ed6c21eef4d6063f15176ab463 Author: Josef Bacik Date: Fri Sep 29 15:43:48 2017 -0400 btrfs: add ref-verify mount option This adds the infrastructure for turning ref verify on and off for a mount, to be used by a later patch. Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ enhnance btrfs_print_mod_info to print if ref-verify is compiled in ] Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 + fs/btrfs/super.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) commit 6273b7f8ed78d1acc3db6774b9ab07f04115f520 Author: David Sterba Date: Wed Oct 4 17:30:11 2017 +0200 btrfs: get rid of sector_t and use u64 offset in submit_extent_page The use of sector_t in the callchain of submit_extent_page is not necessary. Switch to u64 and rename the variable and use byte units instead of 512b, ie. dropping the >> 9 shifts and avoiding the con(tro)versions of sector_t. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 6c5a4e2c12597ba7cc0c6c644e7c9d04a627001c Author: David Sterba Date: Wed Oct 4 17:10:34 2017 +0200 btrfs: rename page offset parameter in submit_extent_page We're going to remove sector_t and will use 'offset', so this patch frees the name. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/extent_io.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6aa21263e3a0594c2bd37eac784a0259e47dabbd Author: David Sterba Date: Wed Oct 4 17:07:07 2017 +0200 btrfs: scrub: get rid of sector_t The use of sector_t is not necessry, it's just for a warning. Switch to u64 and rename the variable and use byte units instead of 512b, ie. dropping the >> 9 shifts. The messages are adjusted as well. Reviewed-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/scrub.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 2351f431f727223b4d82851ee8fc045bf51edd34 Author: Josef Bacik Date: Wed Sep 27 10:43:13 2017 -0400 btrfs: fix send ioctl on 32bit with 64bit kernel We pass in a pointer in our send arg struct, this means the struct size doesn't match with 32bit user space and 64bit kernel space. Fix this by adding a compat mode and doing the appropriate conversion. Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ move structure to the beginning, next to receive 32bit compat ] Signed-off-by: David Sterba fs/btrfs/ioctl.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- fs/btrfs/send.c | 12 ++---------- fs/btrfs/send.h | 2 +- 3 files changed, 56 insertions(+), 12 deletions(-) commit 2b902dfc896ffab875842ed62820dca0b99ff461 Author: Anand Jain Date: Mon Oct 9 11:07:46 2017 +0800 btrfs: fix use of error or warning for missing device When device is missing without the -o degraded option then its an error so report it as an error instead of a warning. And when -o degraded option is provided, log the missing device as warning. Signed-off-by: Anand Jain Reviewed-by: David Sterba [ switch error to bool ] Signed-off-by: David Sterba fs/btrfs/volumes.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 5a2b8e601c572527adfc4986941311c21effae6c Author: Anand Jain Date: Mon Oct 9 11:07:45 2017 +0800 btrfs: declare btrfs_report_missing_device() static Signed-off-by: Anand Jain Signed-off-by: David Sterba fs/btrfs/volumes.c | 12 ++++++------ fs/btrfs/volumes.h | 2 -- 2 files changed, 6 insertions(+), 8 deletions(-) commit 45dbdbc9f66c749fa329130dcd641eb0606129d0 Author: Anand Jain Date: Mon Oct 9 11:07:44 2017 +0800 btrfs: fix EIO misuse to report missing degraded option EIO is only for the IO failure to the device, avoid it. Use ENOENT as that's the closest error code describing what happened. Signed-off-by: Anand Jain Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba fs/btrfs/volumes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit adfb69af7d8cb6a3958f75aad1ef4bc96891d116 Author: Anand Jain Date: Wed Oct 11 12:46:18 2017 +0800 btrfs: add_missing_dev() should return the actual error add_missing_dev() can return device pointer so that IS_ERR/PTR_ERR can be used to check for the actual error that occurred in the function. Signed-off-by: Anand Jain Reviewed-by: Liu Bo [ minor error message adjustment ] Signed-off-by: David Sterba fs/btrfs/volumes.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 9e882d6d059ae79afb7b8748cb5ffd83acd058e2 Author: Christos Gkekas Date: Thu Oct 12 22:40:42 2017 +0100 btrfs: Clean up unused variables in free-space-tree.c Remove variables 'start' and 'end', which are set but never used. Signed-off-by: Christos Gkekas Reviewed-by: Omar Sandoval Signed-off-by: David Sterba fs/btrfs/free-space-tree.c | 4 ---- 1 file changed, 4 deletions(-) commit 709a95c3eb21e3b53fa602d75031a89c7118f50b Author: Arnd Bergmann Date: Fri Oct 13 11:27:35 2017 +0200 btrfs: tree-checker: use %zu format string for size_t We now get a harmless compile-time on 32-bit architectures: fs/btrfs/tree-checker.c: In function 'check_extent_data_item': fs/btrfs/tree-checker.c:189:70: error: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'unsigned int' [-Werror=format=] This changes the format string to use %zu instead of %lu for size_t. Fixes: c1f6520bf360 ("btrfs: tree-checker: Enhance output for check_extent_data_item") Signed-off-by: Arnd Bergmann Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/tree-checker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 736cd52e0c720103f52ab9da47b6cc3af6b083f6 Author: Liu Bo Date: Thu Sep 7 11:22:22 2017 -0600 Btrfs: remove nr_async_submits and async_submit_draining Now that we have the combo of flushing twice, which can make sure IO have started since the second flush will wait for page lock which won't be unlocked unless setting page writeback and queuing ordered extents, we don't need %async_submit_draining, %async_delalloc_pages and %nr_async_submits to tell whether the IO has actually started. Moreover, all the flushers in use are followed by functions that wait for ordered extents to complete, so %nr_async_submits, which tracks whether bio's async submit has made progress, doesn't really make sense. However, %async_delalloc_pages is still required by shrink_delalloc() as that function doesn't flush twice in the normal case (just issues a writeback with WB_REASON_FS_FREE_SPACE). Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ctree.h | 2 -- fs/btrfs/disk-io.c | 24 ------------------------ fs/btrfs/inode.c | 28 ---------------------------- 3 files changed, 54 deletions(-) commit 80e03a2c512bd78858c130d6fe3b11982a61c0c5 Author: Liu Bo Date: Thu Sep 7 11:22:21 2017 -0600 Btrfs: do not make defrag wait on async_delalloc_pages By setting compression for a defrag task, the task will start IO at the end of defrag. After the combo of filemap_flush(), we've already made sure that dirty pages have made progress via async compress thread because the second filemap_flush() will wait for page lock, which won't be unlocked until those pages have been marked as writeback and ordered extents have been queued. And this is for per-inode defrag, it's not helpful to wait on a global %async_delalloc_pages and %nr_async_submits from fs_info. Although waiting on %nr_async_submits means that all bios are submitted down to per-device schedule IO lists, it doesn't wait for their completions, thus users still need to do fsync/sync to make sure the data is on disk. While with this change, it makes sure that pages are marked with writeback bits and will be submitted asynchronously shortly, therefore, the behavior of defrag option '-c' remains unchanged. Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ioctl.c | 15 --------------- 1 file changed, 15 deletions(-) commit f851689b5ae3eb8e1b4d397eaf2805ccfd88bf77 Author: Liu Bo Date: Thu Sep 7 11:22:20 2017 -0600 Btrfs: remove nr_async_bios This was intended to congest higher layers to not send bios, but as 1) the congested bit has been taken by writeback Async bios come from buffered writes and DIO writes. For DIO writes, we want to submit them ASAP, while for buffered writes, writeback uses balance_dirty_pages() to throttle how much dirty pages we can have. 2) and no one is waiting for %nr_async_bios down to zero, Historically, it was introduced along with changes which let checksumming workload spread accross different cpus. And at that time, pdflush was used instead of per-bdi flushing, perhaps pdflush did not have the necessary information for writeback to do throttling. We can safely remove them now. Signed-off-by: Liu Bo [ additional explanation from mails, removed unused variable 'limit' ] Signed-off-by: David Sterba fs/btrfs/ctree.h | 1 - fs/btrfs/disk-io.c | 1 - fs/btrfs/volumes.c | 17 ----------------- 3 files changed, 19 deletions(-) commit 8806d7185bf7a81c28ea46ce67f78669f91f0591 Author: Qu Wenruo Date: Mon Oct 9 01:51:06 2017 +0000 btrfs: tree-checker: Enhance output for check_extent_data_item Output the invalid member name and its bad value, along with its expected value range or alignment. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/tree-checker.c | 97 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 69 insertions(+), 28 deletions(-) commit d508c5f07cd6a6570947e980a598674fa34406dc Author: Qu Wenruo Date: Mon Oct 9 01:51:05 2017 +0000 btrfs: tree-checker: Enhance output for check_csum_item Output the bad value and expected good value (or its alignment). Signed-off-by: Qu Wenruo [ unindent long strings ] Signed-off-by: David Sterba fs/btrfs/tree-checker.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 478d01b3fcf04f35aa33226637fe0becf6a35183 Author: Qu Wenruo Date: Mon Oct 9 01:51:04 2017 +0000 btrfs: tree-checker: Enhance output for btrfs_check_leaf Enhance the output to print: 1) the eason 2) the ad value, if reason is not sufficient 3) good value (range) Signed-off-by: Qu Wenruo [ wording, unidented long strings ] Signed-off-by: David Sterba fs/btrfs/tree-checker.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) commit bba4f29896c986c4cec17bc0f19f2ce644fceae1 Author: Qu Wenruo Date: Mon Oct 9 01:51:03 2017 +0000 btrfs: tree-checker: Enhance btrfs_check_node output Use inline function to replace macro since we don't need stringification. (Macro still exists until all callers get updated) And add more info about the error, and replace EIO with EUCLEAN. For nr_items error, report if it's too large or too small, and output the valid value range. For node block pointer, added a new alignment checker. For key order, also output the next key to make the problem more obvious. Signed-off-by: Qu Wenruo [ wording adjustments, unindented long strings ] Signed-off-by: David Sterba fs/btrfs/tree-checker.c | 68 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 7 deletions(-) commit 557ea5dd003d371536f6b4e8f7c8209a2b6fd4e3 Author: Qu Wenruo Date: Mon Oct 9 01:51:02 2017 +0000 btrfs: Move leaf and node validation checker to tree-checker.c It's no doubt the comprehensive tree block checker will become larger, so moving them into their own files is quite reasonable. Signed-off-by: Qu Wenruo [ wording adjustments ] Signed-off-by: David Sterba fs/btrfs/Makefile | 2 +- fs/btrfs/disk-io.c | 285 +------------------------------------------- fs/btrfs/tree-checker.c | 309 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/tree-checker.h | 26 ++++ 4 files changed, 340 insertions(+), 282 deletions(-) commit 1170862d783a3b47e49a1506fe15fa074e35bbb5 Author: Timofey Titovets Date: Tue Oct 3 18:06:01 2017 +0300 Btrfs: compress_file_range remove dead variable num_bytes Remove dead assigment of num_bytes. Also as num_bytes only used in the will_compress block as copy of total_in just replace that with total_in and drop num_bytes entirely. Signed-off-by: Timofey Titovets Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit a7e3c5f2f7ba3f1f413df5548ed51eb25cd1c74d Author: Rakesh Pandit Date: Tue Oct 10 13:48:05 2017 +0300 btrfs: use appropriate replacements for __sb_{start,end}_write calls Commit a53f4f8e9c8eb ("btrfs: Don't call btrfs_start_transaction() on frozen fs to avoid deadlock.") started using internal calls and we replace them with more suitable ones. Signed-off-by: Rakesh Pandit Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a969f4cc1349fc123eb412332d264de51b05d2ed Author: Hans van Kranenburg Date: Sun Oct 8 22:30:58 2017 +0200 btrfs: prefix sysfs attribute struct names Currently struct names for sysfs are generated only based on the attribute names. This means that attribute names cannot be reused in multiple places throughout the complete btrfs sysfs hierarchy. E.g. allocation/data/total_bytes and allocation/data/single/total_bytes result in the same struct name btrfs_attr_total_bytes. A workaround for this case was made in the past by ad hoc creating an extra macro wrapper, BTRFS_RAID_ATTR, that inserts some extra text in the struct name. Instead of polluting sysfs.h with such kind of extra macro definitions, and only doing so when there are collisions, use a prefix which gets inserted in the struct name, so we keep everything nicely grouped together by default. Current collections of attributes are: * (the toplevel, empty prefix) * allocation * space_info * raid * features Signed-off-by: Hans van Kranenburg Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/sysfs.c | 63 ++++++++++++++++++++++++++++---------------------------- fs/btrfs/sysfs.h | 26 ++++++++++------------- 2 files changed, 43 insertions(+), 46 deletions(-) commit 897ca8194cd1b287bc5e7d8a5edc2b9a041e15ba Author: Thomas Meyer Date: Sat Oct 7 16:02:21 2017 +0200 btrfs: Fix bool initialization/comparison Bool initializations should use true and false. Bool tests don't need comparisons. Signed-off-by: Thomas Meyer Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 4 ++-- fs/btrfs/file.c | 2 +- fs/btrfs/inode.c | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) commit efd38150af45375b46576d0110a323d7fab7e142 Author: Nikolay Borisov Date: Thu Sep 28 11:45:26 2017 +0300 btrfs: Refactor transaction handling in received subvolume ioctl If btrfs_transaction_commit fails it will proceed to call cleanup_transaction, which in turn already does btrfs_abort_transaction. So let's remove the unnecessary code duplication. Also let's be explicit about handling failure of btrfs_uuid_tree_add by calling btrfs_end_transaction. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ioctl.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 9417ebc8a676487c6ec8825f92fb28f7dbeb5f4b Author: Nikolay Borisov Date: Thu Sep 28 10:53:17 2017 +0300 btrfs: Explicitly handle btrfs_update_root failure btrfs_udpate_root can fail and it aborts the transaction, the correct way to handle an aborted transaction is to explicitly end with btrfs_end_transaction. Even now the code is correct since btrfs_commit_transaction would handle an aborted transaction but this is more of an implementation detail. So let's be explicit in handling failure in btrfs_update_root. Furthermore btrfs_commit_transaction can also fail and by ignoring it's return value we could have left the in-memory copy of the root item in an inconsistent state. So capture the error value which allows us to correctly revert the RO/RW flags in case of commit failure. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/ioctl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 7132a262595a43abd483f1c5139afc038c67fbbb Author: Anand Jain Date: Thu Sep 28 14:51:11 2017 +0800 btrfs: error out if btrfs_attach_transaction() fails btrfs_init_new_device() calls btrfs_attach_transaction() to commit sys chunks, and it should error out if it fails. Signed-off-by: Anand Jain Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/volumes.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit d31c32f6745a646b34ed3e29456cc95b12a70e11 Author: Anand Jain Date: Thu Sep 28 14:51:10 2017 +0800 btrfs: fix BUG_ON in btrfs_init_new_device() Instead of BUG_ON return error to the caller. And handle the fail condition by calling the abort transaction and going through the error path. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/volumes.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 0af2c4bf5a012a40a2f9230458087d7f068339d0 Author: Anand Jain Date: Thu Sep 28 14:51:09 2017 +0800 btrfs: undo writable superblocke when sprouting fails When new device is being added to seed FS, seed FS is marked writable, but when we fail to bring in the new device, we missed to undo the writable part. This patch fixes it. Signed-off-by: Anand Jain Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba fs/btrfs/volumes.c | 2 ++ 1 file changed, 2 insertions(+) commit 4b865cab96fe2a30ed512cf667b354bd291b3b0a Author: Qu Wenruo Date: Wed Aug 23 16:57:59 2017 +0900 btrfs: Add checker for EXTENT_CSUM EXTENT_CSUM checker is a relatively easy one, only needs to check: 1) Objectid Fixed to BTRFS_EXTENT_CSUM_OBJECTID 2) Key offset alignment Must be aligned to sectorsize 3) Item size alignedment Must be aligned to csum size Signed-off-by: Qu Wenruo Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 40c3c40947324d9f40bf47830c92c59a9bbadf4a Author: Qu Wenruo Date: Wed Aug 23 16:57:58 2017 +0900 btrfs: Add sanity check for EXTENT_DATA when reading out leaf Add extra checks for item with EXTENT_DATA type. This checks the following thing: 0) Key offset All key offsets must be aligned to sectorsize. Inline extent must have 0 for key offset. 1) Item size Uncompressed inline file extent size must match item size. (Compressed inline file extent has no information about its on-disk size.) Regular/preallocated file extent size must be a fixed value. 2) Every member of regular file extent item Including alignment for bytenr and offset, possible value for compression/encryption/type. 3) Type/compression/encode must be one of the valid values. This should be the most comprehensive and strict check in the context of btrfs_item for EXTENT_DATA. Signed-off-by: Qu Wenruo Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba [ switch to BTRFS_FILE_EXTENT_TYPES, similar to what BTRFS_COMPRESS_TYPES does ] Signed-off-by: David Sterba fs/btrfs/disk-io.c | 103 ++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/btrfs_tree.h | 1 + 2 files changed, 104 insertions(+) commit 7f43d4affb2a254d421ab20b0cf65ac2569909fb Author: Qu Wenruo Date: Wed Aug 23 16:57:57 2017 +0900 btrfs: Check if item pointer overlaps with the item itself Function check_leaf() checks if any item pointer points outside of the leaf, but it doesn't check if the pointer overlaps with the item itself. Normally only the last item may be the victim, but adding such check is never a bad idea anyway. Signed-off-by: Qu Wenruo Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c3267bbaa9cae09b62960eafe33ad19196803285 Author: Qu Wenruo Date: Wed Aug 23 16:57:56 2017 +0900 btrfs: Refactor check_leaf function for later expansion Current check_leaf() function does a good job checking key order and item offset/size. However it only checks from slot 0 to the last but one slot, this is good but makes later expansion hard. So this refactoring iterates from slot 0 to the last slot. For key comparison, it uses a key with all 0 as initial key, so all valid keys should be larger than that. And for item size/offset checks, it compares current item end with previous item offset. For slot 0, use leaf end as a special case. This makes later item/key offset checks and item size checks easier to be implemented. Also, makes check_leaf() to return -EUCLEAN other than -EIO to indicate error. Signed-off-by: Qu Wenruo Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) commit 6018ba0a0e1bc2378bdab353958e2db1a3d253fc Author: Timofey Titovets Date: Fri Sep 15 01:57:26 2017 +0300 Btrfs: cleanup 'start' subtraction from try uncompressed inline extent Was added in: c8b978188c9a0fd3d535c13debd19d522b726f1f "Btrfs: Add zlib compression support" Survive to near time (from 08.10.2008). Because 'start' checked for zero before branch, so it's safe to remove that subtraction. Signed-off-by: Timofey Titovets Reviewed-by: Satoru Takeuchi Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 996478ca9c460886ac147eb0d00e99841b71d31b Author: Josef Bacik Date: Tue Aug 22 16:00:39 2017 -0400 btrfs: change how we decide to commit transactions during flushing Nikolay reported that generic/273 was failing currently with ENOSPC. Turns out this is because we get to the point where the outstanding reservations are greater than the pinned space on the fs. This is a mistake, previously we used the current reservation amount in may_commit_transaction, not the entire outstanding reservation amount. Fix this to find the minimum byte size needed to make progress in flushing, and pass that into may_commit_transaction. From there we can make a smarter decision on whether to commit the transaction or not. This fixes the failure in generic/273. From Nikolai, IOW: when we go to the final stage of deciding whether to do trans commit, instead of passing all the reservations from all tickets we just pass the reservation for the current ticket. Otherwise, in case all reservations exceed pinned space, then we don't commit transaction and fail prematurely. Before we passed num_bytes from flush_space, where num_bytes was the sum of all pending reserverations, but now all we do is take the first ticket and commit the trans if we can satisfy that. Fixes: 957780eb2788 ("Btrfs: introduce ticketed enospc infrastructure") Cc: stable@vger.kernel.org # 4.8 Reported-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: Nikolay Borisov Tested-by: Nikolay Borisov [ added Nikolai's comment ] Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) commit eef16ba269ea1d55ca1b4eab8d91f02e185835c9 Author: Kuanling Huang Date: Fri Sep 15 16:47:45 2017 +0800 Btrfs: send, apply asynchronous page cache readahead to enhance page read By analyzing the perf on btrfs send, we found it take large amount of cpu time on page_cache_sync_readahead. This effort can be reduced after switching to asynchronous one. Overall performance gain on HDD and SSD were 9 and 15 percent if simply send a large file. Signed-off-by: Kuanling Huang Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/send.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit 785884fc31883a11e88710d89c525bb7f76e33df Author: Liu Bo Date: Fri Sep 22 12:11:18 2017 -0600 Btrfs: fix memory leak in raid56 The local bio_list may have pending bios when doing cleanup, it can end up with memory leak if they don't get freed. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/raid56.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 315d8e98aa4fb67e2765b4c8df10fdf0c0bf0bfb Author: Colin Ian King Date: Tue Sep 19 16:01:23 2017 +0100 btrfs: make array types static const, reduces object code size Don't populate the read-only array types on the stack, instead make it static const. Makes the object code smaller by nearly 60 bytes: Before: text data bss dec hex filename 90536 6552 64 97152 17b80 fs/btrfs/ioctl.o After: text data bss dec hex filename 90414 6616 64 97094 17b46 fs/btrfs/ioctl.o Signed-off-by: Colin Ian King Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ioctl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 3afb0c501414aa3c4a7cfea9ae1a0acfbf7be14f Author: Allen Pais Date: Wed Sep 20 11:47:46 2017 +0530 btrfs: return -ENOMEM on allocation failure in btrfsic Forward the correct return value -ENOMEM from btrfsic_dev_state_alloc() too. Signed-off-by: Allen Pais Reviewed-by: Anand Jain Reviewed-by: David Sterba [ adjust changelog ] Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6939f667247ed792535c0697a99f600d6770f127 Author: Liu Bo Date: Wed Sep 13 12:09:28 2017 -0600 Btrfs: fix confusing worker helper info in stacktrace We've seen the following backtrace stack in ftrace or dmesg log, kworker/u16:10-4244 [000] 241942.480955: function: btrfs_put_ordered_extent kworker/u16:10-4244 [000] 241942.480956: kernel_stack: => finish_ordered_fn (ffffffffa0384475) => btrfs_scrubparity_helper (ffffffffa03ca577) <-----"incorrect" => btrfs_freespace_write_helper (ffffffffa03ca98e) <-----"correct" => process_one_work (ffffffff81117b2f) => worker_thread (ffffffff81118c2a) => kthread (ffffffff81121de0) => ret_from_fork (ffffffff81d7087a) btrfs_freespace_write_helper is actually calling normal_worker_helper instead of btrfs_scrubparity_helper, so somehow kernel has parsed the incorrect function address while unwinding the stack, btrfs_scrubparity_helper really shouldn't be shown up. It's caused by compiler doing inline for our helper function, adding a noinline tag can fix that. Signed-off-by: Liu Bo Reviewed-by: David Sterba [ use noinline_for_stack ] Signed-off-by: David Sterba fs/btrfs/async-thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18fdc67900c5bfd1eeb41cfa50ea6f2eb7266f73 Author: Liu Bo Date: Wed Sep 13 12:18:22 2017 -0600 Btrfs: remove bio_flags which indicates a meta block of log-tree Since both committing transaction and writing log-tree are doing plugging on metadata IO, we can unify to use %sync_writers to benefit both cases, instead of checking bio_flags while writing meta blocks of log-tree. We can remove this bio_flags because in order to write dirty blocks, log tree also uses btrfs_write_marked_extents(), inside which we have enabled %sync_writers, therefore, every write goes in a synchronous way, so does checksuming. Please also note that, bio_flags is applied per-context while %sync_writers is applied per-inode, so this might incur some overhead, ie. 1) while log tree is flushing its dirty blocks via btrfs_write_marked_extents(), in which %sync_writers is increased by one. 2) in the meantime, some writeback operations may happen upon btrfs's metadata inode, so these writes go synchronously, too. However, AFAICS, the overhead is not a big one while the win is that we unify the two places that needs synchronous way and remove a special hack/flag. This removes the bio_flags related stuff for writing log-tree. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 6 ++---- fs/btrfs/extent_io.c | 13 ++----------- fs/btrfs/extent_io.h | 1 - 3 files changed, 4 insertions(+), 16 deletions(-) commit 6300463b14c1c2665674eb8f15843e5bb7a7ff84 Author: Liu Bo Date: Mon Aug 21 15:49:59 2017 -0600 Btrfs: make plug in writing meta blocks really work We have started plug in btrfs_write_and_wait_marked_extents() but the generated IOs actually go to device's schedule IO list where the work is doing in another task, thus the started plug doesn't make any sense. And since we wait for IOs immediately after writing meta blocks, it's the same case as writing log tree, doing sync submit can merge more IOs. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 6 ++++-- fs/btrfs/transaction.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) commit d8953d69bca83fab616f37693152384cea49f964 Author: Satoru Takeuchi Date: Tue Sep 12 20:08:08 2017 +0900 btrfs: convert all mount option checking code to use btrfs_test_opt Signed-off-by: Satoru Takeuchi Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 2 +- fs/btrfs/super.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3993b112dac968612b0b213ed59cb30f50b0015b Author: Colin Ian King Date: Mon Sep 11 16:15:28 2017 +0100 btrfs: avoid null pointer dereference on fs_info when calling btrfs_crit There are checks on fs_info in __btrfs_panic to avoid dereferencing a null fs_info, however, there is a call to btrfs_crit that may also dereference a null fs_info. Fix this by adding a check to see if fs_info is null and only print the s_id if fs_info is non-null. Detected by CoverityScan CID#401973 ("Dereference after null check") Fixes: efe120a067c8 ("Btrfs: convert printk to btrfs_ and fix BTRFS prefix") Signed-off-by: Colin Ian King Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fa0d0888bda13bc96d99024cba40ae3a135de385 Author: Christos Gkekas Date: Sat Sep 9 15:29:34 2017 +0100 btrfs: Clean up dead code in root-tree The value of variable 'can_recover' is never used after being set, thus it should be removed, as it was never used since the first commit 68a7342c51c95042 ("Btrfs: cleanup orphaned root orphan item"). Signed-off-by: Christos Gkekas Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/root-tree.c | 4 ---- 1 file changed, 4 deletions(-) commit 9ca2e97fa3c3216200afe35a3b111ec51cc796d2 Author: Christophe JAILLET Date: Sun Sep 10 13:19:38 2017 +0200 btrfs: tests: Fix a memory leak in error handling path in 'run_test()' If 'btrfs_alloc_path()' fails, we must free the resources already allocated, as done in the other error handling paths in this function. Signed-off-by: Christophe JAILLET Reviewed-by: Qu Wenruo Signed-off-by: David Sterba fs/btrfs/tests/free-space-tree-tests.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c434d21c6442b107af7030be2d716cf6c89c5606 Author: Nikolay Borisov Date: Mon Aug 21 12:43:50 2017 +0300 btrfs: Remove redundant argument of __link_block_group __link_block_group is called from only 2 places and at each call site the space_info being passed is the same as the space info assigned to the passed cache struct. Let's remove the redundant argument and make the function reference the space_info from the passed block_group_cache. No functional changes Signed-off-by: Nikolay Borisov Reviewed-by: Josef Bacik Reviewed-by: David Sterba [ renamed to link_block_group ] Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1efb72a3c3ea8e430d1984774692ecbe3235600a Author: Nikolay Borisov Date: Mon Aug 21 12:43:49 2017 +0300 btrfs: Rework error handling of add_extent_mapping in __btrfs_alloc_chunk Currently the code executes add_extent_mapping and if it is successful it links the new mapping, it then proceeds to unlock the extent mapping tree and check for failure and handle them. Instead, rework the code to only perform a single check if add_extent_mapping has failed and handle it, otherwise the code continues in a linear fashion. No functional changes Signed-off-by: Nikolay Borisov Reviewed-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8c70c9f81eac82f497a37e901fb09c1cc2f0733f Author: Nikolay Borisov Date: Mon Aug 21 12:43:46 2017 +0300 btrfs: Remove unused parameter from check_direct_IO Introduced by 5a5f79b57069 ("Btrfs: allow unaligned DIO") and never used. The buffered fallback from unaligned DIO works as expected. Signed-off-by: Nikolay Borisov Reviewed-by: Timofey Titovets Reviewed-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/inode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ee8c494f88736c1a1873fdd65559828f9a734bcf Author: Nikolay Borisov Date: Mon Aug 21 12:43:45 2017 +0300 btrfs: Remove unused arguments from btrfs_changed_cb_t btrfs_changed_cb_t represents the signature of the callback being passed to btrfs_compare_trees. Currently there is only one such callback, namely changed_cb in send.c. This function doesn't really uses the first 2 parameters, i.e. the roots. Since there are not other functions implementing the btrfs_changed_cb_t let's remove the unused parameters from the prototype and implementation. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/ctree.c | 15 +++++---------- fs/btrfs/ctree.h | 4 +--- fs/btrfs/send.c | 8 +++----- 3 files changed, 9 insertions(+), 18 deletions(-) commit a0357511f29f9b83e2c0d12621c339a5900eaa5a Author: Nikolay Borisov Date: Mon Aug 21 12:43:44 2017 +0300 btrfs: Remove unused parameters from various functions iterate_dir_item:found_key - introduced in 31db9f7c23fb ("Btrfs: introduce BTRFS_IOC_SEND for btrfs send/receive"), yet never used. record_ref:num - ditto This is a first pass with the low-hanging fruit. There are still quite a few unsued parameters in some function which have to abide by a callback interface. Signed-off-by: Nikolay Borisov Reviewed-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/send.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit 8ca199501ec1695273f158cf92def37480e23f32 Author: Nikolay Borisov Date: Mon Aug 21 12:43:43 2017 +0300 btrfs: Remove unused variable Src was initially part of 31ff1cd25d37 ("Btrfs: Copy into the log tree in big batches"), however 16e7549f045d ("Btrfs: incompatible format change to remove hole extents") changed parameters passed to copy_items which made the src variable redundant. Signed-off-by: Nikolay Borisov Reviewed-by: Timofey Titovets Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/tree-log.c | 2 -- 1 file changed, 2 deletions(-) commit 9b4a9b283d5efbe9a221e2282e41e272e9db5ae9 Author: Liu Bo Date: Fri Aug 18 11:54:02 2017 -0600 Btrfs: do not async submit for nodatasum inodes While we submit direct writes, if the inode is flagged with nodatasum, there's no benefit to submit asynchronously, because a) we don't have to calculate checksum across processors, b) and direct IO has started a plug, but async submit makes us queue IO on each device's scheduled IO list instead of DIO's plug list, so that IOs get much less merges in general. Lets use sync submit for nodatasum inodes. Signed-off-by: Liu Bo Reviewed-by: Josef Bacik Signed-off-by: David Sterba fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cd3a7eb8507deb3c75077739a07ccccad0dc991 Author: Liu Bo Date: Thu Aug 3 13:53:31 2017 -0600 Btrfs: search parity device wisely After mapping block with BTRFS_MAP_WRITE, parities have been sorted to the end position, so this search can start from the first parity stripe. Signed-off-by: Liu Bo Reviewed-by: David Sterba [ copied changelog as a comment ] Signed-off-by: David Sterba fs/btrfs/raid56.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit ee87cf5ed9fe8e41d057f5f5c7f49c18b6d3f94c Author: Anand Jain Date: Tue Aug 1 18:35:08 2017 +0800 btrfs: copy fsid to super_block s_uuid We didn't copy fsid to struct super_block.s_uuid so Overlay disables index feature with btrfs as the lower FS. kernel: overlayfs: fs on '/lower' does not support file handles, falling back to index=off. Fix this by publishing the fsid through struct super_block.s_uuid. [ dsterba: I think that setting s_uuid is the last missing bit. Overlay needs the file handle encoding support from the lower filesystem, which is supported. Filling the whole filesystem id is correct, the subvolume id is encoded in the file handle buffer from inside btrfs_encode_fh. ] Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 1 + 1 file changed, 1 insertion(+) commit 718dc5fade1a97cff58aa6581d05c0ab8a9fcf1d Author: Omar Sandoval Date: Tue Aug 22 23:46:05 2017 -0700 Btrfs: fix __user casting in ioctl.c Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ioctl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c9162bdfd6174edeaa276a4c235851113625c555 Author: Omar Sandoval Date: Tue Aug 22 23:46:04 2017 -0700 Btrfs: make some volumes.c functions static These aren't used outside of volumes.c. Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 012e513e1bfeb39e1ce393f5a444f772ea27e954 Author: Anand Jain Date: Wed Aug 30 22:36:48 2017 +0800 btrfs: declare TRACE_DEFINE_ENUM for each of show_flush_state enum So that perf can show the state symbol. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba include/trace/events/btrfs.h | 7 +++++++ 1 file changed, 7 insertions(+) commit f78541ddb1da92050a8315cbd09fb5fe7735d150 Author: Nikolay Borisov Date: Thu Aug 31 11:48:51 2017 +0300 btrfs: Remove redundant forward declarations Some static functions are needlessly forward declared. Let's remove those declarations since they add no value. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/extent-tree.c | 12 ------------ 1 file changed, 12 deletions(-) commit 49e83f5735cf1aca03ca8b4eadca475c1f3b0b14 Author: Liu Bo Date: Fri Sep 1 16:14:30 2017 -0600 Btrfs: protect conditions within root->log_mutex while waiting Both wait_for_commit() and wait_for_writer() are checking the condition out of the mutex lock. This refactors code a bit to be lock safe. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/tree-log.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 45bac0f3d24a76f127a118e7b95a54e616449d16 Author: Liu Bo Date: Fri Sep 1 16:14:29 2017 -0600 Btrfs: use wait_event instead of a single function Since TASK_UNINTERRUPTIBLE has been used here, wait_event() can do the same job. Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/ioctl.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) commit 69cc7151ee8055e6bf7241a21211231a1a208abd Author: Liu Bo Date: Fri Sep 1 16:14:28 2017 -0600 Btrfs: move finish_wait out of the loop If we're still going to wait after schedule(), we don't have to do finish_wait() to remove our %wait_queue_entry since prepare_to_wait() won't add the same %wait_queue_entry twice. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 219d33b26ac498ca472a02b9217b4e450474fc90 Author: Liu Bo Date: Fri Sep 1 16:14:26 2017 -0600 Btrfs: remove batch plug in run_scheduled_IO Block layer has a limit on plug, ie. BLK_MAX_REQUEST_COUNT == 16, so we don't gain benefits by batching 64 bios here. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/volumes.c | 6 ------ 1 file changed, 6 deletions(-) commit c7b3e98e4d0ada6aeaa8cc37a7e9ab16e7b3a4fe Author: Michał Kępień Date: Wed Oct 25 06:29:46 2017 +0200 platform/x86: fujitsu-laptop: Fix radio LED detection Radio LED detection method implemented in commit 4f62568c1fcf ("fujitsu-laptop: Support radio LED") turned out to be incorrect as it causes a radio LED to be erroneously detected on a Fujitsu Lifebook E751 which has a slide switch (and thus no radio LED). Use bit 17 of flags_supported (the value returned by method S000 of ACPI device FUJ02E3) to determine whether a radio LED is present as it seems to be a more reliable indicator, based on comparing DSDT tables of four Fujitsu Lifebook models (E744, E751, S7110, S8420). Fixes: 4f62568c1fcf ("fujitsu-laptop: Support radio LED") Reported-by: Heinrich Siebmanns Signed-off-by: Michał Kępień Tested-by: Heinrich Siebmanns Signed-off-by: Andy Shevchenko drivers/platform/x86/fujitsu-laptop.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit d524dc30a57d48a4efffe1dbdee906588ea8eef2 Merge: c4db01ed 33dfb1e Author: Arnd Bergmann Date: Mon Oct 30 12:07:10 2017 +0100 Merge tag 'tegra-for-4.15-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt Pull "ARM: tegra: Device tree changes for v4.15-rc1" from Thierry Reding: Adds support for the CEC controller found on Tegra124 and enables it on Tegra K1. * tag 'tegra-for-4.15-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: Enable CEC support on Jetson TK1 ARM: tegra: Add CEC support for Tegra124 commit c4db01edbac83f8b06adefe6654f98951dad3ecb Merge: 6ac5482 3e09b15 Author: Arnd Bergmann Date: Mon Oct 30 12:04:32 2017 +0100 Merge tag 'tegra-for-4.15-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt Pull "dt-bindings: Updates for v4.15-rc1" from Thierry Reding: This contains the addition of a clock alias which will be used to fix the implementation of the SOR1 clock. Also included are the bindings for the Tegra186 BPMP thermal driver, a prerequisite for both the driver and device tree changes. * tag 'tegra-for-4.15-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: Add bindings for nvidia,tegra186-bpmp-thermal dt-bindings: clock: tegra: Add sor1_out clock commit 762d491a8bff7aea33a521ddc896a62d323df0a9 Author: Chaotian Jing Date: Mon Oct 16 09:46:29 2017 +0800 mmc: mediatek: add support of mt2701/mt2712 mt2701/mt2712 has 12bit clock div, which is not compatible with mt8135/mt8173. and, some additional features will be added in mt2701/mt2712, so that need distinguish it by comatibale name. Signed-off-by: Chaotian Jing Tested-by: Sean Wang Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 82 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 69 insertions(+), 13 deletions(-) commit 6ac5482ee67d7b959eeae081e2b514d125598113 Merge: c0dec1e b6d3b64 Author: Arnd Bergmann Date: Mon Oct 30 12:02:31 2017 +0100 Merge tag 'renesas-dt2-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt Pull "Second Round of Renesas ARM Based SoC DT Updates for v4.15" from Simon Horman: * r8a77430 (RZ/G1M) SoC - Add XHCI support to SoC DT. Boards may enable this as appropriate * All Renesas ARM based SoCs - Add missing clocks for ARM CPU cores Geert Uytterhoeven says "This series improves DT hardware descriptions for Renesas arm32 SoCs by adding missing clocks properties to the device nodes corresponding to ARM CPU cores." * R-Car Gen 1 and 2, and RZ/G SoCs - Use R-Car Fallback compat strings for GPIO Simon Horman says "Use newly added R-Car GPIO Gen 1, 2 and 3 fallback compat strings in peace of now deprecated non-generation specific R-Car GPIO fallback compat string in the DT of Renesas ARM and arm64 based SoCs. As noted in the changelogs for the r8a777[89] changes, this introduces an incompatibility with pre-v4.14 kernels used with new DTBs. There is no run-time effect for other SoCs updated by this changeset." * r7s72100 (RZ/A1H) GR-Peach board - Add pin configuration subnode for ETHER pin group. This avoids relying on boot-loader configuration of these pins. - Enable ostm0 and ostm1 timers Jacopo Mondi says these are "to be used as clock source and clockevent source. The timers provides greater accuracy than the already enabled mtu2 one." - Correct leds node name indent - Enable MTU2 timer pulse unit Jacopo Mondi says "MTU2 multi-function/multi-channel timer/counter is not enabled for GR-Peach board. The timer is used as clock event source to schedule wake-ups, and without this enabled all sleeps not performed through busy waiting hang the board." * r8a7743 (RZ/G1M) iW-RainboW-G20M-Qseven SoM - Add USB function support * r8a7745 (RZ/G1E) iW-RainboW-G22D development platform - Add USB2.0 Host support * r8a7743 (RZ/G1M) iW-RainboW-G20D-Qseven development platform - Rework DT architecture and add DT for camera DB Fabrizio Castro says "Some of the serial interfaces are exposed on the camera daughter board. The camera daughter board can be connected to the carrier board by means of expansion connectors 1, 2 and 3. The carrier board may host an RZ/G1M or an RZ/G1N based SoM. While adding support for the serial interfaces on the camera daughter board we faced the dilemma of how to properly describe all of the possible HW configurations and how to maximize code reuse. The best option would be to use device tree overlays, however there is still some work to be done on that front before actually using them, therefore for the time being we decided to provide .dtsi files to describe the carrier board and the camera daughter board, and provide .dts files to describe the HW configurations we need to support." * r8a779[0-4] R-Car Gen2 SoCs - Use generic node name for VSP1 nodes Geert Uytterhoeven says "This patch series replaces the specific node names used for the VSP1 nodes by the preferred generic node names, cfr. commit 0e1bfb72b076b07d ("v4l: vsp1: Use generic node name")." * tag 'renesas-dt2-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (42 commits) ARM: dts: r8a7743: Add xhci support to SoC dtsi ARM: dts: r7s72100: Add clock for CA9 CPU core dt-bindings: clk: r7s72100: Add missing I and G clocks ARM: dts: sh73a0: Add clocks for CA9 CPU cores ARM: dts: r8a7794: Add missing clock for secondary CA7 CPU core ARM: dts: r8a7793: Add missing clock for secondary CA15 CPU core ARM: dts: r8a7792: Add missing clock for secondary CA15 CPU core ARM: dts: r8a7791: Add missing clock for secondary CA15 CPU core ARM: dts: r8a7790: Add clocks for CA7 CPU cores ARM: dts: r8a7790: Add missing clocks for secondary CA15 CPU cores ARM: dts: r8a7779: Add clocks for CA9 CPU cores ARM: dts: r8a7778: Add clock for CA9 CPU core ARM: dts: r8a7743: Add missing clock for secondary CA15 CPU core ARM: dts: r8a73a4: Add clock for CA15 CPU0 core ARM: dts: r8a7794: Use R-Car GPIO Gen2 fallback compat string ARM: dts: r8a7793: Use R-Car GPIO Gen2 fallback compat string ARM: dts: r8a7792: Use R-Car GPIO Gen2 fallback compat string ARM: dts: r8a7791: Use R-Car GPIO Gen2 fallback compat string ARM: dts: r8a7790: Use R-Car GPIO Gen2 fallback compat string ARM: dts: r8a7743: Use R-Car GPIO Gen2 fallback compat string ... commit d91ca84edeb04fad89faf0f723029b692f6b13b4 Author: Chaotian Jing Date: Mon Oct 16 09:46:28 2017 +0800 mmc: dt-bindings: Add reg/source_cg/latch-ck for Mediatek MMC bindings Change the comptiable for support of multi-platform Make compatible explicit, as MMC host of mt8173 has difference with mt8135(mt8173 supports hs400 and hs400_tune),so that need separate mt8173/mt8135 compatible name. Add description for reg Add description for source_cg Add description for mediatek,latch-ck Note that source_cg and mediatek,latch-ck are optional for some projects, eg, MT2701 do not have source_cg, and MT2712 do not need mediatek,latch-ck Signed-off-by: Chaotian Jing Acked-by: Rob Herring Tested-by: Sean Wang Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/mtk-sd.txt | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit c0dec1ec33d74ac7b07caf32506a84495e0a062f Merge: 0922831 1357bdb Author: Arnd Bergmann Date: Mon Oct 30 11:46:58 2017 +0100 Merge tag 'sunxi-dt-for-4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/dt Pull "Allwinner DT changes for 4.15" from Maxime Ripard: The most notable changes are: - Conversion to the last SoC (A10, A20) to the new clock framework - HDMI and dual pipeline support for the A10, A20 and A31 DRM driver - Support for the various power supplies on a number of boards - Fix of DTC warnings on a number of SoCs, but most of them still need some work - New boards: A20-OLinuXino-MICRO-eMMC, TBS A711, Banana Pi M2 Berry, Banana Pi M2 Ultra - New R40 SoC support * tag 'sunxi-dt-for-4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (63 commits) ARM: sun8i: r40: enable USB host for Banana Pi M2 Ultra ARM: sun8i: v40: add 5V regulator for Banana Pi M2 Berry ARM: sun8i: r40: add 5V regulator for Banana Pi M2 Ultra ARM: sun8i: r40: add USB host port nodes for R40 ARM: dts: sun4i: Enable HDMI support on some A10 devices ARM: dts: sun7i: Enable HDMI support on some A20 devices ARM: dts: sun7i: Add device nodes for display pipelines ARM: dts: sun4i: Add device nodes for display pipelines ARM: dts: sun8i: r40: add watchdog device node ARM: dts: sun5i: reference-design-tablet: Enable AXP209 AC and battery ARM: dts: sun9i: Change node names to remove underscores ARM: dts: sun9i: Change node names to remove underscores ARM: dts: sun4i: Remove underscores from nodes names ARM: dts: sun4i: Provide default muxing for relevant controllers ARM: dts: sun4i: Change pinctrl nodes to avoid warning ARM: dts: sun6i: Enable HDMI support on some A31/A31s devices ARM: dts: sun6i: Add device node for HDMI controller ARM: dts: sun4i: Change LRADC node names to avoid warnings ARM: dts: sun4i: Remove skeleton and memory to avoid warnings ARM: dts: sun4i: Remove gpio-keys warnings ... commit db5c6d4a9b92f0bc64cedb667043af23a81dae7c Author: Igor Mitsyanko Date: Mon Oct 30 13:13:50 2017 +0300 qtnfmac: advertise support of inactivity timeout Wireless device may implement a logic to kick-out STA due to inactivity for a certain period of time. This feature needs to be advertised to higher layers if supported. Timeout value is still taken from parameters to START_AP command, nothing changes here. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 5 ++++- drivers/net/wireless/quantenna/qtnfmac/commands.c | 5 +++-- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 11 ++++++++++- 3 files changed, 17 insertions(+), 4 deletions(-) commit c35c0d54a77d0ff9c101cb3f4e975793f8cb7067 Author: Sergey Matyukevich Date: Mon Oct 30 13:13:49 2017 +0300 qtnfmac: modify full Tx queue recovery Current recovery approach is to wake s/w Tx queues for skb->dev netdevice. However this approach doesn't cover the case when h/w queue is full of packets from a single wireless interface. Suppose xmit attempt from the second wireless interface fails due to failed reclaim. Then the second interface will not have a chance to recover even if subsequent reclaims succeed. Possible solution is to attempt to wake all the s/w queues belonging to driver interfaces. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/core.c | 27 ++++++++++++++++++++++ drivers/net/wireless/quantenna/qtnfmac/core.h | 1 + .../net/wireless/quantenna/qtnfmac/pearl/pcie.c | 13 +++++++---- .../quantenna/qtnfmac/pearl/pcie_bus_priv.h | 1 + 4 files changed, 37 insertions(+), 5 deletions(-) commit bf024645ac9df78292e65e939b60c9a58e7b9fbb Author: Sergey Matyukevich Date: Mon Oct 30 13:13:48 2017 +0300 qtnfmac: drop nonexistent function declaration Function qtnf_classify_skb_no_mbss has been used for debug during early stage of development. Drop its declaration. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/core.h | 3 --- 1 file changed, 3 deletions(-) commit 3dd06cecb1b84c07c231859c40b55d5ac0516349 Author: Sergey Matyukevich Date: Mon Oct 30 13:13:47 2017 +0300 qtnfmac: enable registration of more mgmt frames Support registration for more mgmt frame types for debug and monitoring purposes. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit e9931f984dd1e80adb3b5e095ef175fe383bc92d Author: Sergey Matyukevich Date: Mon Oct 30 13:13:46 2017 +0300 qtnfmac: modify full Tx queue error reporting Under heavy load it is normal that h/w Tx queue is almost full all the time and reclaim should be done before transmitting next packet. Warning still should be reported as well as s/w Tx queues should be stopped in the case when reclaim failed. Signed-off-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 ec0a9f62b393ed0c5bb9185a8efebb0ad00b7d0d Author: Kuppuswamy Sathyanarayanan Date: Sun Oct 29 15:17:35 2017 -0700 mtd: intel-spi: Add Intel Lewisburg PCH SPI super SKU PCI ID This patch adds Intel Lewisburg PCH SPI serial flash controller super SKU PCI ID. Signed-off-by: Kuppuswamy Sathyanarayanan Acked-by: Mika Westerberg Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/intel-spi-pci.c | 1 + 1 file changed, 1 insertion(+) commit 361eeda0ca1674e54ba66ac4435865ebbed702e0 Author: Adrian Hunter Date: Thu Oct 19 15:04:13 2017 +0300 mmc: sdhci-pci: Tidy o2micro definitions We keep PCI Ids in sdhci-pci.h and the O2-specific definitions belong in sdhci-pci-o2micro.c. Move those definitions accordingly. Remove unused O2 definitions in sdhci-pci-core.c. The 3 o2micro external function declarations might as well be in sdhci-pci.h as well, so move them there and get rid of sdhci-pci-o2micro.h entirely. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 10 ----- drivers/mmc/host/sdhci-pci-o2micro.c | 35 ++++++++++++++++- drivers/mmc/host/sdhci-pci-o2micro.h | 73 ------------------------------------ drivers/mmc/host/sdhci-pci.h | 12 ++++++ 4 files changed, 46 insertions(+), 84 deletions(-) commit 159cd328e34891898d5db686d753f9acc1f6ed73 Author: Adrian Hunter Date: Thu Oct 19 13:41:44 2017 +0300 mmc: sdhci-acpi: Tidy Intel slot probe functions into one Tidy Intel slot probe functions into one. A single function can be used because the logic uses hid / uid as necessary to identify devices anyway. This gets rid of some pointless comments and checks for variables that cannot possibly be NULL, as well as giving the function a name that identifies it as specific to Intel controllers. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-acpi.c | 48 ++++++------------------------------------- 1 file changed, 6 insertions(+), 42 deletions(-) commit a2038497e817107f194b8c34632df6aabe50eb30 Author: Adrian Hunter Date: Thu Oct 19 13:41:43 2017 +0300 mmc: sdhci-acpi: Use helper function acpi_device_uid() Make use of acpi_device_uid() instead of open coding. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6dc425ae595e14026beac3720e43edd70215dc8 Author: Simon Horman Date: Wed Oct 18 09:00:23 2017 +0200 mmc: renesas_sdhi: implement R-Car Gen[123] fallback compatibility strings Implement fallback compatibility strings for R-Car Gen 1, 2 and 3. In the case of Renesas R-Car hardware we know that there are generations of SoCs, f.e. 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 is being adopted for drivers for Renesas SoCs. Also, improve readability by listing the shmobile fallback compatibility string after the more-specific compatibility strings they provide a fallback for. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Acked-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/renesas_sdhi_internal_dmac.c | 1 + drivers/mmc/host/renesas_sdhi_sys_dmac.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 54839d012d5f98cde2fa102fdcd22e1da661d138 Author: Simon Horman Date: Wed Oct 18 09:00:22 2017 +0200 dt-bindings: mmc: renesas_sdhi: add R-Car Gen[123] fallback compatibility strings Add fallback compatibility strings for R-Car Gen 1, 2 and 3. In the case of Renesas R-Car hardware we know that there are generations of SoCs, f.e. 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 is being adopted for drivers for Renesas SoCs. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Acked-by: Wolfram Sang Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 95e91ade6900547a74ac8e3ce35213aacfbdd0d3 Author: Simon Horman Date: Wed Oct 18 09:00:21 2017 +0200 dt-bindings: mmc: renesas_sdhi: provide example in bindings documentation Provide an example of the usage of the DT bindings for TMIO in their documentation. The example given is for the r8a7790 (R-Car H2). Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Acked-by: Wolfram Sang Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 6186d06c519e217351fac95b545f334f8582af90 Author: Wolfram Sang Date: Sun Oct 15 14:46:14 2017 +0200 mmc: parse new binding for eMMC fixed driver type Parse the new binding and store it in the host struct after doing some sanity checks. The code is designed to support fixed SD driver type if we ever need that. Signed-off-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson drivers/mmc/core/host.c | 13 ++++++++++++- drivers/mmc/core/mmc.c | 11 ++++++++--- include/linux/mmc/host.h | 2 ++ 3 files changed, 22 insertions(+), 4 deletions(-) commit f7834cbd907abb5d4d84f85dba5a7321e5a37b83 Author: Wolfram Sang Date: Sun Oct 15 14:46:13 2017 +0200 dt-bindings: mmc: describe new eMMC binding for fixed driver type Some boards may have to use a certain driver type (or drive strength) to achieve stable eMMC communication. Describe a binding to set this up via DT. Signed-off-by: Wolfram Sang Acked-by: Rob Herring Reviewed-by: Simon Horman Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/mmc.txt | 3 +++ 1 file changed, 3 insertions(+) commit 2d87ddd7b63e276a2e0a11788fce9e91c4d23a86 Author: Wolfram Sang Date: Sat Oct 14 21:17:19 2017 +0200 mmc: usdhi6rol0: catch all errors when getting regulators Bail out everytime when mmc_regulator_get_supply() returns an errno, not only when probing gets deferred. This is currently a no-op, because this function only returns -EPROBE_DEFER or 0 right now. But if it will throw another error somewhen, it will be for a reason. (This still doesn't change that getting regulators is optional, so 0 can still mean no regulators found). So, let us a) be future proof and b) have driver code which is easier to understand. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/usdhi6rol0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a63303d9b87cfc3f08144e54daab718a8173e15 Author: Wolfram Sang Date: Sat Oct 14 21:17:18 2017 +0200 mmc: sdhci: catch all errors when getting regulators Bail out everytime when mmc_regulator_get_supply() returns an errno, not only when probing gets deferred. This is currently a no-op, because this function only returns -EPROBE_DEFER or 0 right now. But if it will throw another error somewhen, it will be for a reason. (This still doesn't change that getting regulators is optional, so 0 can still mean no regulators found). So, let us a) be future proof and b) have driver code which is easier to understand. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b649a73692464cbd48eeb9785eeda9eaff5b5e5 Author: Wolfram Sang Date: Sat Oct 14 21:17:17 2017 +0200 mmc: omap_hsmmc: catch all errors when getting regulators Bail out everytime when mmc_regulator_get_supply() returns an errno, not only when probing gets deferred. This is currently a no-op, because this function only returns -EPROBE_DEFER or 0 right now. But if it will throw another error somewhen, it will be for a reason. (This still doesn't change that getting regulators is optional, so 0 can still mean no regulators found). So, let us a) be future proof and b) have driver code which is easier to understand. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/omap_hsmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 337d7c8a4ee7c966aba8e246d1b3096b03673a46 Author: Wolfram Sang Date: Sat Oct 14 21:17:16 2017 +0200 mmc: mxcmmc: catch all errors when getting regulators Bail out everytime when mmc_regulator_get_supply() returns an errno, not only when probing gets deferred. This is currently a no-op, because this function only returns -EPROBE_DEFER or 0 right now. But if it will throw another error somewhen, it will be for a reason. (This still doesn't change that getting regulators is optional, so 0 can still mean no regulators found). So, let us a) be future proof and b) have driver code which is easier to understand. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/mxcmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f98ef63b19004a114ce3b6d659176069bb3b96d Author: Wolfram Sang Date: Sat Oct 14 21:17:15 2017 +0200 mmc: mtk-sd: catch all errors when getting regulators Bail out everytime when mmc_regulator_get_supply() returns an errno, not only when probing gets deferred. This is currently a no-op, because this function only returns -EPROBE_DEFER or 0 right now. But if it will throw another error somewhen, it will be for a reason. (This still doesn't change that getting regulators is optional, so 0 can still mean no regulators found). So, let us a) be future proof and b) have driver code which is easier to understand. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/mtk-sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 510069527bd8dddea719bb88a28ce9cb5d0c8378 Author: Wolfram Sang Date: Sat Oct 14 21:17:14 2017 +0200 mmc: mmci: catch all errors when getting regulators Bail out everytime when mmc_regulator_get_supply() returns an errno, not only when probing gets deferred. This is currently a no-op, because this function only returns -EPROBE_DEFER or 0 right now. But if it will throw another error somewhen, it will be for a reason. (This still doesn't change that getting regulators is optional, so 0 can still mean no regulators found). So, let us a) be future proof and b) have driver code which is easier to understand. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/mmci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa5754c7d169b7ff5da9f97ead2327ba62565237 Author: Wolfram Sang Date: Sat Oct 14 21:17:13 2017 +0200 mmc: meson-mx-sdio: catch all errors when getting regulators Bail out everytime when mmc_regulator_get_supply() returns an errno, not only when probing gets deferred. This is currently a no-op, because this function only returns -EPROBE_DEFER or 0 right now. But if it will throw another error somewhen, it will be for a reason. (This still doesn't change that getting regulators is optional, so 0 can still mean no regulators found). So, let us a) be future proof and b) have driver code which is easier to understand. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/meson-mx-sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa54f3e359d6d007f6c3f0f990c35d10a46b9919 Author: Wolfram Sang Date: Sat Oct 14 21:17:12 2017 +0200 mmc: meson-gx-mmc: catch all errors when getting regulators Bail out everytime when mmc_regulator_get_supply() returns an errno, not only when probing gets deferred. This is currently a no-op, because this function only returns -EPROBE_DEFER or 0 right now. But if it will throw another error somewhen, it will be for a reason. (This still doesn't change that getting regulators is optional, so 0 can still mean no regulators found). So, let us a) be future proof and b) have driver code which is easier to understand. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/meson-gx-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f3a47b80090cc4843f3ea6dea5c02b4f559698f Author: Wolfram Sang Date: Sat Oct 14 21:17:11 2017 +0200 mmc: dw_mmc: catch all errors when getting regulators Bail out everytime when mmc_regulator_get_supply() returns an errno, not only when probing gets deferred. This is currently a no-op, because this function only returns -EPROBE_DEFER or 0 right now. But if it will throw another error somewhen, it will be for a reason. (This still doesn't change that getting regulators is optional, so 0 can still mean no regulators found). So, let us a) be future proof and b) have driver code which is easier to understand. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10b0b012d2f7b0bf56588cd57fdb0ddc49c63e8b Author: Wolfram Sang Date: Sat Oct 14 21:17:10 2017 +0200 mmc: cavium: catch all errors when getting regulators Bail out everytime when mmc_regulator_get_supply() returns an errno, not only when probing gets deferred. This is currently a no-op, because this function only returns -EPROBE_DEFER or 0 right now. But if it will throw another error somewhen, it will be for a reason. (This still doesn't change that getting regulators is optional, so 0 can still mean no regulators found). So, let us a) be future proof and b) have driver code which is easier to understand. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/cavium.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f90e9a38c469e5abc1c7e06a8dd33dd9d2b922d Author: Wolfram Sang Date: Sat Oct 14 21:17:09 2017 +0200 mmc: add kerneldoc to mmc_regulator_get_supply() Especially, make clear what the return value means. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f02cebdfe91a3818d4d71eb96a34fd90c9192c52 Author: Masahiro Yamada Date: Fri Oct 13 21:50:31 2017 +0900 mmc: sdhci-cadence: use bitfield access macros for cleanup Accessing register fields generally need mask and shift part. Defining them separately, like SDHCI_CDNS_HRS06_TUNE_{SHIFT,MASK}, is tedious. Register fields can be always defined by GENMASK (or, BIT if it it a single bit). They are nicely handled by FIELD_* macros. Signed-off-by: Masahiro Yamada Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-cadence.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 2f129d39adb37899dec2c872bea0a6d1034f4325 Author: Dan Carpenter Date: Fri Oct 13 14:20:49 2017 +0300 mmc: meson-mx-sdio: Cleanup IS_ERR() checks Using PTR_ERR_OR_ZERO() instead of IS_ERR() works, but it's not how you're supposed to write these conditions. Signed-off-by: Dan Carpenter Acked-by: Martin Blumenstingl Signed-off-by: Ulf Hansson drivers/mmc/host/meson-mx-sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 063848c3e1558e40879522562aaf905fdcf0d7f1 Author: Karun Eagalapati Date: Fri Oct 27 16:55:57 2017 +0530 rsi: sdio: Add WOWLAN support for S5 shutdown state Unlike other power states, WoWLAN configuration does not come from mac80211 for shutdown. Hence configuring the WoWLAN from shut down callback it self. Remaining steps of disabling SDIO interrupts, setting 'MMC_PM_KEEP_POWER' flag are same as other power states. Signed-off-by: Karun Eagalapati Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_mac80211.c | 1 + drivers/net/wireless/rsi/rsi_91x_sdio.c | 31 +++++++++++++++++++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) commit b6c8d06c8a6465c054befd416d8b067ad495fa06 Author: Karun Eagalapati Date: Fri Oct 27 16:55:56 2017 +0530 rsi: sdio: Add WOWLAN support for S4 hibernate state We are disabling of interrupts from firmware in freeze handler. Also setting power management capability KEEP_MMC_POWER to make device wakeup for WoWLAN trigger. At restore, we observed a device reset on some platforms. Hence reloading of firmware and device initialization is performed. Signed-off-by: Karun Eagalapati Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_core.c | 2 + drivers/net/wireless/rsi/rsi_91x_mac80211.c | 9 +++ drivers/net/wireless/rsi/rsi_91x_main.c | 1 + drivers/net/wireless/rsi/rsi_91x_mgmt.c | 7 +- drivers/net/wireless/rsi/rsi_91x_sdio.c | 111 ++++++++++++++++++++++++++++ drivers/net/wireless/rsi/rsi_main.h | 4 + drivers/net/wireless/rsi/rsi_sdio.h | 1 + 7 files changed, 134 insertions(+), 1 deletion(-) commit f3ac4e7394a1aa89c5ca49f8a5344a98b56df046 Author: Karun Eagalapati Date: Fri Oct 27 16:55:55 2017 +0530 rsi: sdio: add WOWLAN support for S3 suspend state WoWLAN is supported in RS9113 device through GPIO pin2. wowlan config frame is internally sent to firmware in mac80211 suspend handler. Also beacon miss threshold and keep-alive time values are increased to avoid un-necessary disconnection with AP. Signed-off-by: Karun Eagalapati Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_core.c | 6 ++ drivers/net/wireless/rsi/rsi_91x_mac80211.c | 118 ++++++++++++++++++++++++++++ drivers/net/wireless/rsi/rsi_91x_mgmt.c | 60 +++++++++++--- drivers/net/wireless/rsi/rsi_91x_sdio.c | 7 ++ drivers/net/wireless/rsi/rsi_common.h | 1 + drivers/net/wireless/rsi/rsi_main.h | 8 +- drivers/net/wireless/rsi/rsi_mgmt.h | 31 +++++++- 7 files changed, 220 insertions(+), 11 deletions(-) commit 7599b8493292ae28295127f617148b1c7394c27d Author: Dan Carpenter Date: Fri Oct 13 14:19:43 2017 +0300 mmc: meson-mx-sdio: return correct error code This has a copy and paste bug so we use "host->fixed_factor_clk" which is a valid pointer instead of "host->cfg_div_clk" which holds the error code. Fixes: ed80a13bb4c4 ("mmc: meson-mx-sdio: Add a driver for the Amlogic Meson8 and Meson8b SoCs") Signed-off-by: Dan Carpenter Acked-by: Martin Blumenstingl Signed-off-by: Ulf Hansson drivers/mmc/host/meson-mx-sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6c65a8411cf0842c9036e30ed1e7a6ccd7fdf41 Author: Ganapathi Bhat Date: Fri Oct 27 15:32:49 2017 +0530 mwifiex: do not transmit in 11N rates when connected in TKIP security Driver is transmitting in 11N rates, when connected to an AP in TKIP security mode. Add a check to disable_11n to fix the issue. Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/fw.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 39a9cd5a0e4e64d02b1b201bb767fde22712405a Author: Johannes Berg Date: Tue Oct 17 21:37:45 2017 +0200 libertas: don't write wdev->ssid/_len When joining an IBSS network, wdev->ssid/_len will already be set, so there's no need to write them. In any case, they are internal cfg80211 values, and have very little user-visible impact. Signed-off-by: Johannes Berg Signed-off-by: Kalle Valo drivers/net/wireless/marvell/libertas/cfg.c | 3 --- 1 file changed, 3 deletions(-) commit 04fa0540255ee5707a1addf4c7c2a5ba4ac2c407 Author: Jin Qian Date: Thu Oct 12 10:46:59 2017 -0700 mmc: core: export emmc revision Expose emmc revision as part of device attributes. Signed-off-by: Jin Qian Signed-off-by: Ulf Hansson Documentation/ABI/testing/sysfs-bus-mmc | 4 ++++ drivers/mmc/core/mmc.c | 2 ++ 2 files changed, 6 insertions(+) commit 9ccfa81725b92f9aec78bfb3e6c3e2e3c903e701 Author: Arnd Bergmann Date: Tue Oct 10 11:14:16 2017 +0200 mmc: sdhci-msm: fix x86 build error The __WARN_printf() function is not portable across architectures and causes a compile-time error on x86 and others that don't use the asm-generic version of asm/bug.h: drivers/mmc/host/sdhci-msm.c: In function 'sdhci_msm_check_power_status': drivers/mmc/host/sdhci-msm.c:1066:4: error: implicit declaration of function '__WARN_printf'; did you mean '__dev_printk'? [-Werror=implicit-function-declaration] __WARN_printf("%s: pwr_irq for req: (%d) timed out\n", ^~~~~~~~~~~~~ The change that introduced this error, "mmc: sdhci-msm: Add sdhci msm register write APIs which wait for pwr irq", likely meant to use dev_warn(), so I'm changing over to that. Signed-off-by: Arnd Bergmann Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a3d95d1d4007b1fefd6d8b12db26fda05de05cfb Author: Fabrizio Castro Date: Fri Sep 22 12:22:17 2017 +0100 mmc: tmio: check mmc_regulator_get_supply return value mmc_regulator_get_supply returns -EPROBE_DEFER if either vmmc or vqmmc regulators had their probing deferred. vqmmc regulator is needed by UHS to work properly, therefore this patch checks the value returned by mmc_regulator_get_supply to make sure we have a reference to both vmmc and vqmmc (if found in the DT). Signed-off-by: Fabrizio Castro Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/tmio_mmc_core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit aaab3c46557029b760a476d5afc070a55df935b4 Author: Wolfram Sang Date: Sun Oct 8 16:50:08 2017 +0200 mmc: sunxi: drop superfluous error message This error message can go because a) currently nothing else than EPROBE_DEFER is returned and b) if this is going to change a much more detailed error message should come from mmc_regulator_get_supply() anyhow. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson drivers/mmc/host/sunxi-mmc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ed80a13bb4c4c9a66aca11228930c5950d21c6f7 Author: Carlo Caione Date: Tue Oct 3 13:24:17 2017 +0200 mmc: meson-mx-sdio: Add a driver for the Amlogic Meson8 and Meson8b SoCs Add a driver for the SDIO/MMC host found on the Amlogic Meson SoCs. This is an MMC controller which provides an interface between the application processor and various memory cards. It supports the SD specification v2.0 and the eMMC specification v4.41. The controller provides an internal "mux" which allows connecting up to three MMC devices to it. Only one device can be used at a time though since the registers are shared across all devices. The driver takes care of synchronizing access (similar to the dw_mmc driver). The maximum supported bus-width is 4-bits. Amlogic's GPL kernel sources call the corresponding driver "aml_sdio" to differentiate it from the other MMC controller in (at least the Meson8 and Meson8b) the SoCs (they call the other drivers aml_sdhc and aml_sdhc_m8, which seem to support a bus-width of up to 8-bits). This means that there are three different MMC host controller IP blocks from Amlogic (each of them with completely own register layout and features): - "SDIO": 1 and 4 bit bus width, support for high-speed modes up to UHS-I SDR50, part of Meson6, Meson8 and Meson8b (the driver from this patch targets this controller) - "SDHC": 1, 4 and 8 bit bus width, compatible with standard iNAND interface, support for speeds up to HS200 and MMC spec up to version 4.5x, part of Meson8 and Meson8b SoCs (there is no mainline driver for this controller yet) - "SDEMMC": 1, 4 and 8 bit bus width, support for speeds up to HS400 and MMC spec up to version 5.0, part of the Meson GX (64-bit) SoCs (supported by the meson-gx MMC host driver) Signed-off-by: Carlo Caione Signed-off-by: Martin Blumenstingl Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 13 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/meson-mx-sdio.c | 769 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 783 insertions(+) commit 17f5e716703b3281293790e83ad3d6a0bd8b9681 Author: Carlo Caione Date: Tue Oct 3 13:24:16 2017 +0200 dt-bindings: mmc: Document the Amlogic Meson8 and Meson8b SDIO bindings This documents the devicetree bindings for the SDIO/MMC host found in Amlogic Meson8 and Meson8b SoCs. It supports the SD specification v2.0 and the eMMC specification v4.41. It has an internal "mux" which allows connecting up to three MMC devices to it. The maximum supported bus-width is 4-bits. Amlogic's GPL kernel sources call it "SDIO" to differentiate it from the other MMC controller in (at least the Meson8 and Meson8b) the SoCs (they call the other one "SDHC", which supports a bus-width of up to 8-bits). Signed-off-by: Carlo Caione Signed-off-by: Martin Blumenstingl Acked-by: Rob Herring Signed-off-by: Ulf Hansson .../bindings/mmc/amlogic,meson-mx-sdio.txt | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 519c51af0d176aef90ba9d3266cccbbb09e68d0c Author: Colin Ian King Date: Tue Oct 3 11:06:36 2017 +0100 mmc: sdhci-of-at91: make function sdhci_at91_set_uhs_signaling static The function sdhci_at91_set_uhs_signaling is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'sdhci_at91_set_uhs_signaling' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-at91.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 085cc3ab39d44ccb0ee051b0bc58f4dd0c0cbfaf Author: Colin Ian King Date: Tue Oct 3 10:56:54 2017 +0100 mmc: dw_mmc-k3: make array hs_timing_cfg static The array hs_timing_cfg is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'hs_timing_cfg' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc-k3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a8e9cad3e6d7870a789ffd6de0b8687691e10c9 Author: Marek Szyprowski Date: Wed Oct 4 08:38:24 2017 +0200 mmc: sdhci-s3c: Fix driver data for Exynos4 SoCs Support for non-dt based initialization for Exynos SoCs has been removed, so there is no need to keep driver IDs for this case. While touching this, replace odd conditional code for instantiating driver data for Exynos4 SoCs with a simple reference and move that driver data under CONFIG_OF. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-s3c.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) commit 62467bbbbc4e37a0f491588bb6059bce56f31737 Author: Jan Glauber Date: Mon Oct 2 14:02:41 2017 +0200 mmc: cavium: Depend on GPIO driver Without the ThunderX/OcteonTx GPIO driver the MMC driver would not power up any MMC devices. Therefore add a dependency to the GPIO driver and remove the unneeded GPIOLIB dependency. Signed-off-by: Jan Glauber Acked-by: David Daney Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0309b3803fed96cc9adb0a8701e271177f5cb04 Author: Vijay Viswanath Date: Wed Sep 27 11:04:43 2017 +0530 mmc: sdhci-msm: Add sdhci msm register write APIs which wait for pwr irq Register writes which change voltage of IO lines or turn the IO bus on/off require controller to be ready before progressing further. When the controller is ready, it will generate a power irq which needs to be handled. The thread which initiated the register write should wait for power irq to complete. This will be done through the new sdhc msm write APIs which will check whether the particular write can trigger a power irq and wait for it with a timeout if it is expected. The SDHC core power control IRQ gets triggered when - * There is a state change in power control bit (bit 0) of SDHCI_POWER_CONTROL register. * There is a state change in 1.8V enable bit (bit 3) of SDHCI_HOST_CONTROL2 register. * Bit 1 of SDHCI_SOFTWARE_RESET is set. Also add support APIs which are used by sdhc msm write APIs to check if power irq is expected to be generated and wait for the power irq to come and complete if the irq is expected. This patch requires CONFIG_MMC_SDHCI_IO_ACCESSORS to be enabled. Signed-off-by: Sahitya Tummala Signed-off-by: Vijay Viswanath Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 173 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 171 insertions(+), 2 deletions(-) commit 99d570da309813f67e9c741edeff55bafc6c1d5e Author: Vijay Viswanath Date: Wed Sep 27 11:04:42 2017 +0530 mmc: Kconfig: Enable CONFIG_MMC_SDHCI_IO_ACCESSORS Enable CONFIG_MMC_SDHCI_IO_ACCESSORS so that SDHC controller specific register read and write APIs, if registered, can be used. Signed-off-by: Vijay Viswanath Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 401b2d06c4ed69f5d491f9297651bed3fbbfe69b Author: Sahitya Tummala Date: Wed Sep 27 11:04:41 2017 +0530 mmc: sdhci-msm: Fix HW issue with power IRQ handling during reset There is a rare scenario in HW, where the first clear pulse could be lost when the actual reset and clear/read of status register are happening at the same time. Fix this by retrying upto 10 times to ensure the status register gets cleared. Otherwise, this will lead to a spurious power IRQ which results in system instability. Signed-off-by: Sahitya Tummala Signed-off-by: Vijay Viswanath Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 46 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) commit c7ccee224d2d551f712752c4a16947f6529d6506 Author: Subhash Jadavani Date: Wed Sep 27 11:04:40 2017 +0530 mmc: sdhci-msm: fix issue with power irq SDCC controller reset (SW_RST) during probe may trigger power irq if previous status of PWRCTL was either BUS_ON or IO_HIGH_V. So before we enable the power irq interrupt in GIC (by registering the interrupt handler), we need to ensure that any pending power irq interrupt status is acknowledged otherwise power irq interrupt handler would be fired prematurely. Signed-off-by: Subhash Jadavani Signed-off-by: Vijay Viswanath Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 6a11fc47f175c8d87018e89cb58e2d36c66534cb Author: Adrian Hunter Date: Mon Sep 25 11:29:04 2017 +0300 mmc: sd: Fix signal voltage when there is no power cycle Some boards have SD card connectors where the power rail cannot be switched off by the driver. However there are various circumstances when a card might be re-initialized, such as after system resume, warm re-boot, or error handling. However, a UHS card will continue to use 1.8V signaling unless it is power cycled. If the card has not been power cycled, it may still be using 1.8V signaling. According to the SD spec., the Bus Speed Mode (function group 1) bits 2 to 4 are zero if the card is initialized at 3.3V signal level. Thus they can be used to determine if the card has already switched to 1.8V signaling. Detect that situation and try to initialize a UHS-I (1.8V) transfer mode. Tested with the following cards: Transcend 4GB High Speed Kingston 64GB SDR104 Lexar by Micron HIGH-PERFORMANCE 300x 16GB DDR50 SanDisk Ultra 8GB DDR50 Transcend Ultimate 600x 16GB SDR104 Transcend Premium 300x 64GB SDR104 Lexar by Micron Professional 1000x 32GB UHS-II SDR104 SanDisk Extreme Pro 16GB SDR104 Signed-off-by: Adrian Hunter Tested-by: Zhoujie Wu Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/core/sd.c | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) commit 3f496afb6fb361b282f37968ff7d3d80b0f1b5cb Author: Adrian Hunter Date: Mon Sep 25 11:29:03 2017 +0300 mmc: core: Factor out mmc_host_set_uhs_voltage() Factor out mmc_host_set_uhs_voltage() so it can be reused. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 38 ++++++++++++++++++++++++-------------- drivers/mmc/core/core.h | 1 + 2 files changed, 25 insertions(+), 14 deletions(-) commit cb39f61e9b1e675c8df86df69d53f08334b34077 Author: Adrian Hunter Date: Fri Sep 22 15:36:59 2017 +0300 mmc: core: Export a few functions needed for blkmq support The following functions are needed by the mmc block device driver, once it converts to blkmq, therefore let's export them. mmc_start_bkops() mmc_start_request() mmc_retune_hold_now() mmc_retune_release() Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 3 ++- drivers/mmc/core/core.h | 2 ++ drivers/mmc/core/host.c | 7 +------ drivers/mmc/core/host.h | 7 ++++++- drivers/mmc/core/mmc_ops.c | 1 + 5 files changed, 12 insertions(+), 8 deletions(-) commit 27d70d368021160fada401d3e2641fbd38a9d10a Author: Colin Ian King Date: Sun Sep 3 14:39:50 2017 +0100 mmc: dw_mmc: make const arrays mszs static Don't populate the const arrays mszs on the stack, instead make them static. Makes the object code smaller by over 310 bytes: Before: text data bss dec hex filename 47527 8528 320 56375 dc37 drivers/mmc/host/dw_mmc.o After: text data bss dec hex filename 47055 8688 320 56063 daff drivers/mmc/host/dw_mmc.o Signed-off-by: Colin Ian King Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2afcbdb0d88b41dace18d7dd2ace62ce4b997319 Author: Ziyuan Date: Wed Aug 30 10:58:21 2017 +0800 mmc: dw_mmc: correct outdated comment for use_dma Since commit 3fc7eaef44db ("mmc: dw_mmc: Add external dma interface support") use_dma no longer means only the data transfer mode, and includes dma transmission channel. So make it more clear. Signed-off-by: Ziyuan Signed-off-by: Ulf Hansson drivers/mmc/host/dw_mmc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c7ddaa2ec992a096905d897fc00ae4901a912f2f Author: Allen Date: Fri Sep 22 17:37:26 2017 +0530 mmc-host: mxcmmc: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/mxcmmc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 15e8c7d9c17b3f2eb6d2547658582a67e15a93ac Author: Allen Date: Fri Sep 22 17:37:25 2017 +0530 mmc-host: vub300: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/vub300.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 4ffd3aaf37b785536810b3783ce0f58d52e9a57e Author: Allen Date: Fri Sep 22 17:37:24 2017 +0530 mmc-host: via: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/via-sdmmc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ec32e106a112e79385e4c78a7aede39dc34cad6a Author: Allen Date: Fri Sep 22 17:37:23 2017 +0530 mmc-host: wbsd: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson drivers/mmc/host/wbsd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 563be8b60324f8947e9c71ec81a8cb67ea2f2127 Author: rui_feng Date: Fri Sep 22 16:07:35 2017 +0800 mmc: rtsx: fix tuning fail on gen3 PCI-Express On gen3 PCI-Express we should send command one by one. If sending many commands in one packet will lead to a failure. Signed-off-by: rui_feng Signed-off-by: Ulf Hansson drivers/mmc/host/rtsx_pci_sdmmc.c | 38 ++++++++++++++++++-------------------- include/linux/mfd/rtsx_pci.h | 1 + 2 files changed, 19 insertions(+), 20 deletions(-) commit c8b5fd031a3004dc382e201f69ea9a44ec62c04f Author: Adrian Hunter Date: Fri Sep 22 15:36:57 2017 +0300 mmc: block: Factor out mmc_setup_queue() Factor out some common code that will also be used with blk-mq. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/queue.c | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) commit 93482b3d70c2120aadb0f1d1281a59199866e70a Author: Adrian Hunter Date: Fri Sep 22 15:36:56 2017 +0300 mmc: block: Prepare CQE data Enhance mmc_blk_data_prep() to support CQE requests. That means adding some things that for non-CQE requests would be encoded into the command arguments - such as the block address, reliable-write flag, and data tag flag. Also the request tag is needed to provide the command queue task id, and a comment is added to explain the future possibility of defining a priority. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit d3377c012f4d7a0a822e289f1effba997da3e295 Author: Adrian Hunter Date: Fri Sep 22 15:36:55 2017 +0300 mmc: block: Use local variables in mmc_blk_data_prep() Use local variables in mmc_blk_data_prep() in preparation for adding CQE support which doesn't use the output variables. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit f690f4409ddd79a481efddaf6e4cb65cf1a747cb Author: Adrian Hunter Date: Fri Sep 22 15:36:54 2017 +0300 mmc: mmc: Enable CQE's Enable or disable CQE when a card is added or removed respectively. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/bus.c | 7 +++++++ drivers/mmc/core/mmc.c | 12 ++++++++++++ 2 files changed, 19 insertions(+) commit 98d4f7809d99bbf456f93816ef9895616cdd1b2d Author: Adrian Hunter Date: Fri Sep 22 15:36:53 2017 +0300 mmc: mmc: Enable Command Queuing Enable the Command Queue if the host controller supports a command queue engine. It is not compatible with Packed Commands, so make a note of that in the comment. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/mmc.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 72a5af554df837e373efb0d6c8fc68c568f9a7ac Author: Adrian Hunter Date: Fri Sep 22 15:36:52 2017 +0300 mmc: core: Add support for handling CQE requests Add core support for handling CQE requests, including starting, completing and recovering. Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/core.c | 163 +++++++++++++++++++++++++++++++++++++++++++++-- drivers/mmc/core/core.h | 4 ++ include/linux/mmc/host.h | 2 + 3 files changed, 164 insertions(+), 5 deletions(-) commit 6c0cedd1ef9527ef13e66875746570e76a3188a7 Author: Adrian Hunter Date: Fri Sep 22 15:36:51 2017 +0300 mmc: core: Introduce host claiming by context Currently the host can be claimed by a task. Change this so that the host can be claimed by a context that may or may not be a task. This provides for the host to be claimed by a block driver queue to support blk-mq, while maintaining compatibility with the existing use of mmc_claim_host(). Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 4 ++-- drivers/mmc/core/core.c | 48 ++++++++++++++++++++++++++++++++++++++------- drivers/mmc/core/core.h | 9 +++++---- drivers/mmc/core/mmc.c | 4 ++-- drivers/mmc/core/sd.c | 4 ++-- drivers/mmc/core/sdio_irq.c | 3 ++- include/linux/mmc/host.h | 7 ++++++- 7 files changed, 60 insertions(+), 19 deletions(-) commit 9ca28c5cd967e07e708a407eec59894e2e643670 Author: Adrian Hunter Date: Fri Sep 22 15:36:50 2017 +0300 mmc: core: Remove unnecessary host claim Callers already have the host claimed, so remove the unnecessary calls to mmc_claim_host() and mmc_release_host(). Signed-off-by: Adrian Hunter Reviewed-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/mmc_ops.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 1c87f73578497a6c3cc77bcbfd2e5bf15fe753c7 Author: Linus Walleij Date: Wed Oct 4 11:10:07 2017 +0200 mmc: block: Fix bug when removing RPMB chardev I forgot to account for the fact that the device core holds a reference to a device added with device_initialize() that need to be released with a corresponding put_device() to reach a 0 refcount at the end of the lifecycle. This led to a NULL pointer reference when freeing the device when e.g. unbidning the host device in sysfs. Fix this and use the device .release() callback to free the IDA and free:ing the memory used by the RPMB device. Before this patch: /sys/bus/amba/drivers/mmci-pl18x$ echo 80114000.sdi4_per2 > unbind [ 29.797332] mmc3: card 0001 removed [ 29.810791] Unable to handle kernel NULL pointer dereference at virtual address 00000050 [ 29.818878] pgd = de70c000 [ 29.821624] [00000050] *pgd=1e70a831, *pte=00000000, *ppte=00000000 [ 29.827911] Internal error: Oops: 17 [#1] PREEMPT SMP ARM [ 29.833282] Modules linked in: [ 29.836334] CPU: 1 PID: 154 Comm: sh Not tainted 4.14.0-rc3-00039-g83318e309566-dirty #736 [ 29.844604] Hardware name: ST-Ericsson Ux5x0 platform (Device Tree Support) [ 29.851562] task: de572700 task.stack: de742000 [ 29.856079] PC is at kernfs_find_ns+0x8/0x100 [ 29.860443] LR is at kernfs_find_and_get_ns+0x30/0x48 After this patch: /sys/bus/amba/drivers/mmci-pl18x$ echo 80005000.sdi4_per2 > unbind [ 20.623382] mmc3: card 0001 removed Fixes: 97548575bef3 ("mmc: block: Convert RPMB to a character device") Reported-by: Adrian Hunter Signed-off-by: Linus Walleij Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit 14f4ca7e4d2825f9f71e22905ae177b899959f1d Author: Linus Walleij Date: Wed Sep 20 10:02:01 2017 +0200 mmc: block: Delete mmc_access_rpmb() This function is used by the block layer queue to bail out of requests if the current request is towards an RPMB "block device". This was done to avoid boot time scanning of this "block device" which was never really a block device, thus duct-taping over the fact that it was badly engineered. This problem is now gone as we removed the offending RPMB block device in another patch and replaced it with a character device. Cc: Tomas Winkler Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 12 ------------ drivers/mmc/core/queue.c | 2 +- drivers/mmc/core/queue.h | 2 -- 3 files changed, 1 insertion(+), 15 deletions(-) commit 97548575bef38abd06690a5a6f6816200c7e77f7 Author: Linus Walleij Date: Wed Sep 20 10:02:00 2017 +0200 mmc: block: Convert RPMB to a character device The RPMB partition on the eMMC devices is a special area used for storing cryptographically safe information signed by a special secret key. To write and read records from this special area, authentication is needed. The RPMB area is *only* and *exclusively* accessed using ioctl():s from userspace. It is not really a block device, as blocks cannot be read or written from the device, also the signed chunks that can be stored on the RPMB are actually 256 bytes, not 512 making a block device a real bad fit. Currently the RPMB partition spawns a separate block device named /dev/mmcblkNrpmb for each device with an RPMB partition, including the creation of a block queue with its own kernel thread and all overhead associated with this. On the Ux500 HREFv60 platform, for example, the two eMMCs means that two block queues with separate threads are created for no use whatsoever. I have concluded that this block device design for RPMB is actually pretty wrong. The RPMB area should have been designed to be accessed from /dev/mmcblkN directly, using ioctl()s on the main block device. It is however way too late to change that, since userspace expects to open an RPMB device in /dev/mmcblkNrpmb and we cannot break userspace. This patch tries to amend the situation using the following strategy: - Stop creating a block device for the RPMB partition/area - Instead create a custom, dynamic character device with the same name. - Make this new character device support exactly the same set of ioctl()s as the old block device. - Wrap the requests back to the same ioctl() handlers, but issue them on the block queue of the main partition/area, i.e. /dev/mmcblkN We need to create a special "rpmb" bus type in order to get udev and/or busybox hot/coldplug to instantiate the device node properly. Before the patch, this appears in 'ps aux': 101 root 0:00 [mmcqd/2rpmb] 123 root 0:00 [mmcqd/3rpmb] After applying the patch these surplus block queue threads are gone, but RPMB is as usable as ever using the userspace MMC tools, such as 'mmc rpmb read-counter'. We get instead those dynamice devices in /dev: brw-rw---- 1 root root 179, 0 Jan 1 2000 mmcblk0 brw-rw---- 1 root root 179, 1 Jan 1 2000 mmcblk0p1 brw-rw---- 1 root root 179, 2 Jan 1 2000 mmcblk0p2 brw-rw---- 1 root root 179, 5 Jan 1 2000 mmcblk0p5 brw-rw---- 1 root root 179, 8 Jan 1 2000 mmcblk2 brw-rw---- 1 root root 179, 16 Jan 1 2000 mmcblk2boot0 brw-rw---- 1 root root 179, 24 Jan 1 2000 mmcblk2boot1 crw-rw---- 1 root root 248, 0 Jan 1 2000 mmcblk2rpmb brw-rw---- 1 root root 179, 32 Jan 1 2000 mmcblk3 brw-rw---- 1 root root 179, 40 Jan 1 2000 mmcblk3boot0 brw-rw---- 1 root root 179, 48 Jan 1 2000 mmcblk3boot1 brw-rw---- 1 root root 179, 33 Jan 1 2000 mmcblk3p1 crw-rw---- 1 root root 248, 1 Jan 1 2000 mmcblk3rpmb Notice the (248,0) and (248,1) character devices for RPMB. Cc: Tomas Winkler Signed-off-by: Linus Walleij Signed-off-by: Ulf Hansson drivers/mmc/core/block.c | 283 +++++++++++++++++++++++++++++++++++++++++++---- drivers/mmc/core/queue.h | 2 + 2 files changed, 263 insertions(+), 22 deletions(-) commit dd3f6983b4a468efca9e8caa0e2b4aa20946d801 Author: yangbo lu Date: Thu Sep 21 16:43:31 2017 +0800 mmc: sdhci-of-esdhc: disable SD clock for clock value 0 SD clock should be disabled for clock value 0. It's not right to just return. This may cause failure of signal voltage switching. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-of-esdhc.c | 58 ++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 28 deletions(-) commit cdaba732ff2fde83685bce889eddc70964404381 Author: Adrian Hunter Date: Mon Sep 18 15:17:05 2017 +0300 mmc: sdhci-pci: Add support for Intel CDF Add PCI Id for Intel CDF. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-pci-core.c | 1 + drivers/mmc/host/sdhci-pci.h | 1 + 2 files changed, 2 insertions(+) commit 79ea73b05aaa83b7451a3aee48a5e835fb0f3864 Author: Wolfram Sang Date: Fri Sep 15 20:13:28 2017 +0200 mmc: sdhci-pci: remove outdated declaration The function was removed half a year ago, so this declaration can go, too. Fixes: 51ced59cc02e0d ("mmc: sdhci-pci: Use ACPI DSM to get driver strength for some Intel devices") Signed-off-by: Wolfram Sang Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson include/linux/mmc/sdhci-pci-data.h | 3 --- 1 file changed, 3 deletions(-) commit 4946b3af5e8e96f0f0ceec53701541f1faae714d Author: Bjorn Andersson Date: Fri Sep 15 16:35:24 2017 -0700 mmc: sdhci-msm: Enable delay circuit calibration clocks The delay circuit used to support HS400 is calibrated based on two additional clocks. When these clocks are not available and FF_CLK_SW_RST_DIS is not set in CORE_HC_MODE, reset might fail. But on some platforms this doesn't work properly and below dump can be seen in the kernel log. mmc0: Reset 0x1 never completed. mmc0: sdhci: ============ SDHCI REGISTER DUMP =========== mmc0: sdhci: Sys addr: 0x00000000 | Version: 0x00001102 mmc0: sdhci: Blk size: 0x00004000 | Blk cnt: 0x00000000 mmc0: sdhci: Argument: 0x00000000 | Trn mode: 0x00000000 mmc0: sdhci: Present: 0x01f80000 | Host ctl: 0x00000000 mmc0: sdhci: Power: 0x00000000 | Blk gap: 0x00000000 mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x00000002 mmc0: sdhci: Timeout: 0x00000000 | Int stat: 0x00000000 mmc0: sdhci: Int enab: 0x00000000 | Sig enab: 0x00000000 mmc0: sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000 mmc0: sdhci: Caps: 0x742dc8b2 | Caps_1: 0x00008007 mmc0: sdhci: Cmd: 0x00000000 | Max curr: 0x00000000 mmc0: sdhci: Resp[0]: 0x00000000 | Resp[1]: 0x00000000 mmc0: sdhci: Resp[2]: 0x00000000 | Resp[3]: 0x00000000 mmc0: sdhci: Host ctl2: 0x00000000 mmc0: sdhci: ============================================ Add support for the additional calibration clocks to allow these platforms to be configured appropriately. Cc: Venkat Gopalakrishnan Cc: Ritesh Harjani Signed-off-by: Bjorn Andersson Acked-by: Rob Herring Tested-by: Jeremy McNicoll Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-msm.txt | 2 ++ drivers/mmc/host/sdhci-msm.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit e4bf91f6723e493175eedfd2760f0ffda19756fa Author: Bjorn Andersson Date: Fri Sep 15 16:35:23 2017 -0700 mmc: sdhci-msm: Utilize bulk clock API By stuffing the runtime controlled clocks into a clk_bulk_data array we can utilize the newly introduced bulk clock operations and clean up the error paths. This allow us to handle additional clocks in subsequent patch, without the added complexity. Cc: Ritesh Harjani Signed-off-by: Bjorn Andersson Tested-by: Jeremy McNicoll Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-msm.c | 80 +++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 46 deletions(-) commit 68481a7e1c84b652c03bd714c1028fb8ea680a9d Author: Krishna Reddy Date: Fri Sep 8 12:48:33 2017 -0700 mmc: tegra: Mark 64 bit dma broken on Tegra186 SDHCI controllers on Tegra186 support 40 bit addressing. IOVA addresses are 48-bit wide on Tegra186. SDHCI host common code sets dma mask as either 32-bit or 64-bit. To avoid access issues when SMMU is enabled, disable 64-bit dma. Signed-off-by: Krishna Reddy Tested-by: Thierry Reding Acked-by: Thierry Reding Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-tegra.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit faf73fa17cfe40259c1eafb922b4c5db96ed65e0 Merge: 35ed78a 48e1dc1 Author: Ulf Hansson Date: Mon Oct 30 11:37:50 2017 +0100 Merge branch 'fixes' into next commit 35ed78a044e4cc14fb0bb3f99d3c62d4fab2bda1 Merge: 0b07194 ddde0e7 Author: Ulf Hansson Date: Mon Oct 30 11:36:42 2017 +0100 Merge branch 'omap_hsmmc' into next commit 459232fc0e2505d489e2dc3befc1ad01dcdccb47 Author: Marcel Holtmann Date: Tue Oct 24 19:42:45 2017 +0200 Bluetooth: btusb: Fix isochronous interface assignments The recent MacBook's with multi-function USB interfaces for HID and Bluetooth operation have the isochronous interface on number 3 instead of number 1. Store the interface number and use it. P: Vendor=05ac ProdID=8290 Rev= 1.40 S: Manufacturer=Broadcom Corp. S: Product=Bluetooth USB Host Controller C:* #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr= 0mA A: FirstIf#= 2 IfCount= 4 Cls=ff(vend.) Sub=01 Prot=01 I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid E: Ad=85(I) Atr=03(Int.) MxPS= 8 Ivl=10ms I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid E: Ad=86(I) Atr=03(Int.) MxPS= 8 Ivl=10ms I:* If#= 2 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#= 3 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 3 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 3 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 3 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 3 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 3 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms I:* If#= 4 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#= 5 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none) Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg drivers/bluetooth/btusb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit af3715e5cef8859571cabecc71e1cd4cc5869d6a Author: Jaya P G Date: Mon Oct 30 11:01:22 2017 +0100 Bluetooth: btusb: Update firmware filename for Intel 9x60 and later The format of Intel Bluetooth firmware for bootloader product is ibt--.sfi and .ddc. But for the SKU's 9x60, there a 3 variants of FW, which cannot be differentiated just with hw_variant and devision_revision_id. So to pick the appropriate FW file for 9x60 SKU's, it will be differentiated using hw_variant, hw_revision and fw_revision rather than hw_variant and device_revision_id only. Format will be like this: ibt---.sfi and .ddc Signed-off-by: Jaya P G Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg drivers/bluetooth/btusb.c | 54 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 7 deletions(-) commit 2064ee332e4c1b7495cf68b84355c213d8fe71fd Author: Marcel Holtmann Date: Mon Oct 30 10:42:59 2017 +0100 Bluetooth: Use bt_dev_err and bt_dev_info when possible In case of using BT_ERR and BT_INFO, convert to bt_dev_err and bt_dev_info when possible. This allows for controller specific reporting. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg drivers/bluetooth/bpa10x.c | 15 ++-- drivers/bluetooth/bt3c_cs.c | 2 +- drivers/bluetooth/btbcm.c | 103 ++++++++++++------------- drivers/bluetooth/btintel.c | 42 +++++------ drivers/bluetooth/btqca.c | 6 +- drivers/bluetooth/btrtl.c | 21 +++--- drivers/bluetooth/btusb.c | 155 ++++++++++++++++++-------------------- drivers/bluetooth/hci_ath.c | 2 +- drivers/bluetooth/hci_h4.c | 2 +- drivers/bluetooth/hci_qca.c | 12 +-- drivers/bluetooth/hci_serdev.c | 9 +-- include/net/bluetooth/bluetooth.h | 3 + net/bluetooth/a2mp.c | 2 +- net/bluetooth/amp.c | 4 +- net/bluetooth/hci_conn.c | 4 +- net/bluetooth/hci_core.c | 35 +++++---- net/bluetooth/hci_event.c | 46 +++++------ net/bluetooth/hci_request.c | 16 ++-- net/bluetooth/hci_sysfs.c | 2 +- net/bluetooth/mgmt.c | 56 +++++++------- net/bluetooth/smp.c | 22 +++--- 21 files changed, 279 insertions(+), 280 deletions(-) commit 682e3efa4d23c0587eba784ede6ce6fcff5acee5 Merge: 16511ee dea5426 Author: Arnd Bergmann Date: Mon Oct 30 11:23:13 2017 +0100 Merge tag 'amlogic-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/soc Pull "Amlogic SoC updates for v4.15" from Kevin Hilman: - add SMP support to Meson8/8b * tag 'amlogic-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM: meson: enable MESON_IRQ_GPIO in Kconfig for meson8b ARM: meson: Add SMP bringup code for Meson8 and Meson8b ARM: smp_scu: allow the platform code to read the SCU CPU status ARM: smp_scu: add a helper for powering on a specific CPU dt-bindings: Amlogic: Add Meson8 and Meson8b SMP related documentation commit 16511ee20b1febad53720210673f82a46867a5c0 Merge: 457e3b1 8e2b04b Author: Arnd Bergmann Date: Mon Oct 30 11:21:18 2017 +0100 Merge tag 'imx-soc-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/soc Pull "i.MX SoC changes for 4.15" from Shawn Guo: - A series from Marco Franchi from to clean up build warnings see with W=1 in arch/arm/mach-imx/. - Move i.MX6 speed grading check from i.MX platform code to cpufreq driver. The patch is suggested by cpufreq folks to go through arm-soc tree. - Enable cpuidle support on i.MX6DL starting from IMX_CHIP_REVISION_1_1. - Constify platform_suspend_ops for MXS platform. * tag 'imx-soc-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: cpufreq: imx6q: Move speed grading check to cpufreq driver ARM: imx: Enable cpuidle for i.MX6DL starting at 1.1 ARM: imx: mach-mx31lite: Make mx31lite_map_io static ARM: imx: cpuidle-imx5: Include "cpuidle.h" header file ARM: imx: 3ds-debugboard: Include "3ds_debugboard.h" header file ARM: imx: imx31moboard: Include "board-mx31moboard.h" header file ARM: mxs: constify platform_suspend_ops commit 82a1faa94989d92b65ef137030329b75aaa2737f Merge: 0b07194 aa7c352 Author: Rafael J. Wysocki Date: Mon Oct 30 11:11:21 2017 +0100 Merge tag 'pullreq_20171026' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq into pm-devfreq Pull devfreq changes for v4.15 from MyungJoo Ham. * tag 'pullreq_20171026' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq: PM / devfreq: Define the constant governor name PM / devfreq: Remove unneeded conditional statement PM / devfreq: Show the all available frequencies PM / devfreq: Change return type of devfreq_set_freq_table() PM / devfreq: Use the available min/max frequency Revert "PM / devfreq: Add show_one macro to delete the duplicate code" PM / devfreq: Set min/max_freq when adding the devfreq device commit 457e3b10fb39d3aa3d73c8948df5c139f77f0718 Merge: 141f70e 97b79f9 Author: Arnd Bergmann Date: Mon Oct 30 11:08:53 2017 +0100 Merge tag 'arm-soc/for-4.15/maintainers' of http://github.com/Broadcom/stblinux into next/soc Pull "Broadcom maintainers changes for 4.15" from Florian Fainelli: This pull request contains Broadcom ARM-based SoCs MAINTAINERS file update for 4.15, please pull the following: - Florian updates the MAINTAINERS entry for Broadcom SoCs with the Hurricane 2 regexp to match new files being added commit 141f70ea2bbc540187fa0d4a477667db151ef0d2 Merge: 688de98 fa1e581 Author: Arnd Bergmann Date: Mon Oct 30 11:03:28 2017 +0100 Merge tag 'arm-soc/for-4.15/soc-part2' of http://github.com/Broadcom/stblinux into next/soc Pull "Broadcom soc changes for 4.15 (part 2)" from Florian Fainelli: This pull request contains Broadcom ARM-based SoC changes for 4.15 (second part), please pull the following: - Florian adds support for the Broadcom Hurricane 2 SoC machine entry point and defines the debug UART address for use with earlyprintk/DEBUG_LL * tag 'arm-soc/for-4.15/soc-part2' of http://github.com/Broadcom/stblinux: ARM: debug: Add Hurricane 2 UART2 debug addresses ARM: bcm: Add support for Broadcom Hurricane 2 SoC commit 688de98f3488b55b333601030c790a923183169d Merge: 4ba845d 675a157 Author: Arnd Bergmann Date: Mon Oct 30 11:02:01 2017 +0100 Merge tag 'arm-soc/for-4.15/defconfig' of http://github.com/Broadcom/stblinux into next/soc Pull "Broadcom defconfig changes for 4.15" from Florian Fainelli: This pull request contains Broadcom ARM-based SoCs multi_v7_defconfig file updates for 4.15, please pull the following: - Florian enables the Broadcom Hurricane 2 SoC in multi_v7_defconfig (CONFIG_ARCH_BCM_HR2) * tag 'arm-soc/for-4.15/defconfig' of http://github.com/Broadcom/stblinux: ARM: multi_v7_defconfig: Enable CONFIG_ARCH_BCM_HR2 commit 4ba845dad9b90ca9137cdfec3d61cb8c7002f033 Merge: 0a02a25 fc88a06 Author: Arnd Bergmann Date: Mon Oct 30 11:00:01 2017 +0100 Merge tag 'keystone_config_4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/soc Pull "ARM: Keystone config update for 4.15" from Santosh Shilimkar: ARM: Enable PWM driver config * tag 'keystone_config_4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: ARM: configs: keystone: Enable TIECAP PWM driver commit 0a02a25856cd05492c748aa15b7fa60941d524e3 Merge: 2a10276 fce107a Author: Arnd Bergmann Date: Mon Oct 30 10:58:30 2017 +0100 Merge tag 'amlogic-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into next/soc Pull "Amlogic: defconfig updates for v4.15" from Kevin Hilman: - enable SDIO/MMC controller * tag 'amlogic-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM: multi_v7_defconfig: enable the Meson MX SDIO/MMC controller commit 2a10276cf42536615755a8c4173e593192c5763f Merge: 5068d87 a8ca183 Author: Arnd Bergmann Date: Mon Oct 30 10:43:07 2017 +0100 Merge tag 'imx-defconfig-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/soc Pull "i.MX defconfig updates for 4.15" from Shawn Guo: - Turn on DRM_DW_HDMI_CEC option to get HDMI CEC support. - Enable MUX_MMIO to get ADV7180 probe on Gateworks GW51xx boards. * tag 'imx-defconfig-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx_v6_v7_defconfig: Select the CEC driver ARM: imx_v6_v7_defconfig: Select CONFIG_MUX_MMIO commit 5068d8710026f7db6ad36201fd650ae2f93144b3 Merge: 17a8045 f5bdfbe Author: Arnd Bergmann Date: Mon Oct 30 10:38:07 2017 +0100 Merge tag 'mvebu-arm64-4.15-1' of git://git.infradead.org/linux-mvebu into next/soc Pull "mvebu arm64 for 4.15 (part 1)" from Gregory CLEMENT: For Armada 7K/8K, enable NAND, RTC, comphy and 10G PHY in the defconfig * tag 'mvebu-arm64-4.15-1' of git://git.infradead.org/linux-mvebu: arm64: defconfig: enable RTC on Armada 7K/8K SoCs arm64: defconfig: enable NAND on Armada 7K/8K SoCs arm64: defconfig: enable Marvell CP110 comphy arm64: defconfig: enable the Marvell 10G PHY as a module commit 17a8045ba32b48c69ff82336e556c344c05ed012 Merge: 84d711c a9e6753 Author: Arnd Bergmann Date: Mon Oct 30 10:36:47 2017 +0100 Merge tag 'tegra-for-4.15-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/soc Pull "arm64: tegra: Default configuration updates for v4.15-rc1" from Thierry Reding: This enables the PCI host controller on 64-bit ARM. It is supported and enabled via device tree on Tegra210 and Tegra186. * tag 'tegra-for-4.15-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: defconfig: Enable Tegra PCI controller commit 15670bfe19905b1dcbb63137f40d718b59d84479 Author: Baoquan He Date: Sat Oct 28 09:30:38 2017 +0800 x86/mm/64: Rename the register_page_bootmem_memmap() 'size' parameter to 'nr_pages' register_page_bootmem_memmap()'s 3rd 'size' parameter is named in a somewhat misleading fashion - rename it to 'nr_pages' which makes the units of it much clearer. Meanwhile rename the existing local variable 'nr_pages' to 'nr_pmd_pages', a more expressive name, to avoid conflict with new function parameter 'nr_pages'. (Also clean up the unnecessary parentheses in which get_order() is called.) Signed-off-by: Baoquan He Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: akpm@linux-foundation.org Link: http://lkml.kernel.org/r/1509154238-23250-1-git-send-email-bhe@redhat.com Signed-off-by: Ingo Molnar arch/x86/mm/init_64.c | 10 +++++----- include/linux/mm.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit 84d711caed82ef0cb323b27565b7a8bf54f6550d Merge: ab63d1e 14e25a0 Author: Arnd Bergmann Date: Mon Oct 30 10:30:17 2017 +0100 Merge tag 'sunxi-core-for-4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into next/soc Pull "Allwinner core changes for 4.15" from Maxime Ripard: A bunch of patches for the sunxi documentation and mach-sunxi. The most notable feature is the introduction of the R40 support. * tag 'sunxi-core-for-4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: sunxi: add support for R40 SoC ARM: sunxi: fix the core number of V3s in sunxi README dt-bindings: add compatible string for Allwinner V3s SoC commit e17bae3266cc3d828003bdf78b5aa019db3ffa95 Merge: 773dd2f 0b07194 Author: Ingo Molnar Date: Mon Oct 30 10:30:09 2017 +0100 Merge tag 'v4.14-rc7' into x86/mm, to pick up fixes Signed-off-by: Ingo Molnar commit 0c63636440504f0f14cc3da5fb208eeb1598a840 Author: Gustavo A. R. Silva Date: Fri Oct 27 11:51:59 2017 -0500 usb: musb_core: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1397608 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/musb_core.c | 1 + 1 file changed, 1 insertion(+) commit 2c411e0da9baae03de857e87d721e98f47e9da8f Author: Alexandre Bailon Date: Fri Oct 27 11:51:58 2017 -0500 usb: musb: da8xx: Remove duplicated defines There is some registers defined in da8xx.c though they are not used. These registers are also defined and used in musb_cppi41.c Remove these defines from da8xx.c. Signed-off-by: Alexandre Bailon Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/da8xx.c | 3 --- 1 file changed, 3 deletions(-) commit c2300cd67c9583c8084767dd4dac19287afc5498 Author: Gustavo A. R. Silva Date: Fri Oct 27 15:49:28 2017 -0500 usb: storage: sddr55: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/sddr55.c | 1 + 1 file changed, 1 insertion(+) commit 1f4d31f9aa016b5cb8ebcc2061fb59b295d51c76 Merge: 3a851c0 2a53e06 Author: Greg Kroah-Hartman Date: Mon Oct 30 09:47:40 2017 +0100 Merge tag 'usb-ci-v4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next Peter writes: The main change for this rc is notify USB charger present when vbus is there using new USB charger API. commit 1d2fcdcf33339c7c8016243de0f7f31cf6845e8d Author: Xiaolei Li Date: Mon Oct 30 10:39:56 2017 +0800 mtd: nand: mtk: fix infinite ECC decode IRQ issue For MT2701 NAND Controller, there may generate infinite ECC decode IRQ during long time burn test on some platforms. Once this issue occurred, the ECC decode IRQ status cannot be cleared in the IRQ handler function, and threads cannot be scheduled. ECC HW generates decode IRQ each sector, so there will have more than one decode IRQ if read one page of large page NAND. Currently, ECC IRQ handle flow is that we will check whether it is decode IRQ at first by reading the register ECC_DECIRQ_STA. This is a read-clear type register. If this IRQ is decode IRQ, then the ECC IRQ signal will be cleared at the same time. Secondly, we will check whether all sectors are decoded by reading the register ECC_DECDONE. This is because the current IRQ may be not dealed in time, and the next sectors have been decoded before reading the register ECC_DECIRQ_STA. Then, the next sectors's decode IRQs will not be generated. Thirdly, if all sectors are decoded by comparing with ecc->sectors, then we will complete ecc->done, set ecc->sectors as 0, and disable ECC IRQ by programming the register ECC_IRQ_REG(op) as 0. Otherwise, wait for the next ECC IRQ. But, there is a timing issue between step one and two. When we read the reigster ECC_DECIRQ_STA, all sectors are decoded except the last sector, and the ECC IRQ signal is cleared. But the last sector is decoded before reading ECC_DECDONE, so the ECC IRQ signal is enabled again by ECC HW, and it means we will receive one extra ECC IRQ later. In step three, we will find that all sectors were decoded, then disable ECC IRQ and return. When deal with the extra ECC IRQ, the ECC IRQ status cannot be cleared anymore. That is because the register ECC_DECIRQ_STA can only be cleared when the register ECC_IRQ_REG(op) is enabled. But actually we have disabled ECC IRQ in the previous ECC IRQ handle. So, there will keep receiving ECC decode IRQ. Now, we read the register ECC_DECIRQ_STA once again before completing the ecc done event. This ensures that there will be no extra ECC decode IRQ. Also, remove writel(0, ecc->regs + ECC_IRQ_REG(op)) from irq handler, because ECC IRQ is disabled in mtk_ecc_disable(). And clear ECC_DECIRQ_STA in mtk_ecc_disable() in case there is a timeout to wait decode IRQ. Fixes: 1d6b1e464950 ("mtd: mediatek: driver for MTK Smart Device") Cc: Signed-off-by: Xiaolei Li Signed-off-by: Boris Brezillon drivers/mtd/nand/mtk_ecc.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit ca5d376e17072c1b60c3fee66f3be58ef018952d Author: Dou Liyang Date: Sat Oct 28 14:06:44 2017 +0800 x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized Commit: 9043442b43b1 ("locking/paravirt: Use new static key for controlling call of virt_spin_lock()") sets the static virt_spin_lock_key to a value before jump_label_init() has been called, which will result in a WARN(). Reorder the initialization sequence: - Move the native_pv_lock_init() into native_smp_prepare_cpus() - set the value in xen_init_lock_cpu() to avoid calling into the not yet initialized static keys subsystem. Suggested-by: Juergen Gross Reported-by: Juergen Gross Signed-off-by: Dou Liyang Reviewed-by: Juergen Gross Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: boris.ostrovsky@oracle.com Cc: bp@suse.de Cc: luto@kernel.org Cc: vkuznets@redhat.com Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1509170804-3813-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar arch/x86/kernel/smpboot.c | 3 ++- arch/x86/xen/spinlock.c | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit a9ee77af751f435675054f5a7e2d2e69cbfe9e33 Author: Sebastian Andrzej Siewior Date: Thu Sep 21 15:51:23 2017 +0200 Bluetooth: avoid recursive locking in hci_send_to_channel() Mart reported a deadlock in -RT in the call path: hci_send_monitor_ctrl_event() -> hci_send_to_channel() because both functions acquire the same read lock hci_sk_list.lock. This is also a mainline issue because the qrwlock implementation is writer fair (the traditional rwlock implementation is reader biased). To avoid the deadlock there is now __hci_send_to_channel() which expects the readlock to be held. Fixes: 38ceaa00d02d ("Bluetooth: Add support for sending MGMT commands and events to monitor") Reported-by: Mart van de Wege Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Marcel Holtmann net/bluetooth/hci_sock.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 05c74778858d7d9907d607172fcc9646b70b6364 Author: Linus Walleij Date: Sat Sep 16 23:56:49 2017 +0200 i2c: gpio: Add support for named gpios in DT This adds support for using the "sda" and "scl" GPIOs in device tree instead of anonymously using index 0 and 1 of the "gpios" property. We add a helper function to retrieve the GPIO descriptors and some explicit error handling since the probe may have to be deferred. At least this happened to me when moving to using named "sda" and "scl" lines (all of a sudden this started to probe before the GPIO driver) so we need to gracefully defer probe when we ge -ENOENT in the error pointer. Suggested-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Signed-off-by: Linus Walleij drivers/i2c/busses/i2c-gpio.c | 59 +++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 16 deletions(-) commit 7d29f509d2cfd807b2fccc643ac1f7066b9b1949 Author: Geert Uytterhoeven Date: Thu Aug 24 09:21:12 2017 +0200 dt-bindings: i2c: i2c-gpio: Add support for named gpios The current i2c-gpio DT bindings use a single unnamed "gpios" property to refer to the SDA and SCL signal lines by index. This is error-prone for the casual DT writer and reviewer, as one has to look up the order in the DT bindings. Fix this by amending the DT bindings to use two separate named gpios properties, and deprecate the old unnamed variant. Take this opportunity to clearly deprecate the "i2c-gpio,sda-open-drain" and "i2c-gpio,scl-open-drain" flags as well. The commit describes in detail what these flags actually mean, and why they should not be used in new device trees. Cc: devicetree@vger.kernel.org Signed-off-by: Geert Uytterhoeven [Augmented to what I and Rob would like] Tested-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Linus Walleij Documentation/devicetree/bindings/i2c/i2c-gpio.txt | 32 ++++++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) commit b9ab0517efc0111b516878ab872e2b3dd7bb40a9 Author: Linus Walleij Date: Sun Sep 10 23:15:35 2017 +0200 i2c: gpio: Local vars in probe By creating local variables for *dev and *np, the code become much easier to read, in my opinion. Tested-by: Geert Uytterhoeven Signed-off-by: Linus Walleij drivers/i2c/busses/i2c-gpio.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 4d0ce62c0a02e41a65cfdcfe277f5be430edc371 Author: Linus Walleij Date: Sun Sep 10 23:03:32 2017 +0200 i2c: gpio: Augment all boardfiles to use open drain We now handle the open drain mode internally in the I2C GPIO driver, but we will get warnings from the gpiolib that we override the default mode of the line so it becomes open drain. We can fix all in-kernel users by simply passing the right flag along in the descriptor table, and we already touched all of these files in the series so let's just tidy it up. Cc: Steven Miao Cc: Ralf Baechle Acked-by: Olof Johansson Acked-by: Lee Jones Acked-by: Robert Jarzmik Acked-by: Ralf Baechle Acked-by: Wu, Aaron Acked-by: Arnd Bergmann Tested-by: Geert Uytterhoeven Signed-off-by: Linus Walleij arch/arm/mach-ep93xx/core.c | 6 ++++-- arch/arm/mach-ixp4xx/avila-setup.c | 4 ++-- arch/arm/mach-ixp4xx/dsmg600-setup.c | 4 ++-- arch/arm/mach-ixp4xx/fsg-setup.c | 4 ++-- arch/arm/mach-ixp4xx/ixdp425-setup.c | 4 ++-- arch/arm/mach-ixp4xx/nas100d-setup.c | 4 ++-- arch/arm/mach-ixp4xx/nslu2-setup.c | 4 ++-- arch/arm/mach-ks8695/board-acs5k.c | 6 ++++-- arch/arm/mach-pxa/palmz72.c | 6 ++++-- arch/arm/mach-pxa/viper.c | 8 ++++---- arch/arm/mach-sa1100/simpad.c | 6 ++++-- arch/blackfin/mach-bf533/boards/blackstamp.c | 4 ++-- arch/blackfin/mach-bf533/boards/ezkit.c | 4 ++-- arch/blackfin/mach-bf533/boards/stamp.c | 4 ++-- arch/blackfin/mach-bf561/boards/ezkit.c | 4 ++-- arch/mips/alchemy/board-gpr.c | 4 ++++ arch/mips/ath79/mach-pb44.c | 4 ++-- drivers/mfd/sm501.c | 4 ++-- 18 files changed, 48 insertions(+), 36 deletions(-) commit 7bb75029ef34838604357350b4f24d6535e9d01f Author: Linus Walleij Date: Sun Sep 10 19:54:21 2017 +0200 i2c: gpio: Enforce open drain through gpiolib The I2C GPIO bitbang driver currently emulates open drain behaviour by implementing what the gpiolib already does: not actively driving the line high, instead setting it to input. This makes no sense. Use the new facility in gpiolib to request the lines enforced into open drain mode, and let the open drain emulation already present in the gpiolib kick in and handle this. As a bonus: if the GPIO driver in the back-end actually supports open drain in hardware using the .set_config() callback, it will be utilized. That's correct: we never used that hardware feature before, instead relying on emulating open drain even if the GPIO controller could actually handle this for us. Users will sometimes get messages like this: gpio-485 (?): enforced open drain please flag it properly in DT/ACPI DSDT/board file gpio-486 (?): enforced open drain please flag it properly in DT/ACPI DSDT/board file i2c-gpio gpio-i2c: using lines 485 (SDA) and 486 (SCL) Which is completely proper: since the line is used as open drain, it should actually be flagged properly with e.g. gpios = <&gpio0 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>, <&gpio0 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; Or similar facilities in board file descriptor tables or ACPI DSDT. Tested-by: Geert Uytterhoeven Signed-off-by: Linus Walleij drivers/i2c/busses/i2c-gpio.c | 102 ++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 63 deletions(-) commit f926dfc112bc6cf41d7068ee5e3f261e13a5bec8 Author: Linus Walleij Date: Sun Sep 10 19:26:22 2017 +0200 gpio: Make it possible for consumers to enforce open drain Some busses, like I2C, strictly need to have the line handled as open drain, i.e. not actively driven high. For this reason the i2c-gpio.c bit-banged I2C driver is reimplementing open drain handling outside of gpiolib. This is not very optimal. Instead make it possible for a consumer to explcitly express that the line must be handled as open drain instead of allowing local hacks papering over this issue. The descriptor tables, whether DT, ACPI or board files, should of course have flagged these lines as open drain. E.g.: enum gpio_lookup_flags GPIO_OPEN_DRAIN for a board file, or gpios = <&foo 42 GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN>; in a device tree using But more often than not, these descriptors are wrong. So we need to make it possible for consumers to enforce this open drain behaviour. We now have two new enumerated GPIO descriptor config flags: GPIOD_OUT_LOW_OPEN_DRAIN and GPIOD_OUT_HIGH_OPEN_DRAIN that will set up the lined enforced as open drain as output low or high, using open drain (if the driver supports it) or using open drain emulation (setting the line as input to drive it high) from the gpiolib core. Cc: linux-gpio@vger.kernel.org Tested-by: Geert Uytterhoeven Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 13 +++++++++++++ include/linux/gpio/consumer.h | 6 ++++++ 2 files changed, 19 insertions(+) commit b2e63555592f81331c8da3afaa607d8cf83e8138 Author: Linus Walleij Date: Sun Sep 10 01:30:46 2017 +0200 i2c: gpio: Convert to use descriptors This converts the GPIO-based I2C-driver to using GPIO descriptors instead of the old global numberspace-based GPIO interface. We: - Convert the driver to unconditionally grab two GPIOs from the device by index 0 (SDA) and 1 (SCL) which will work fine with device tree and descriptor tables. The existing device trees will continue to work just like before, but without any roundtrip through the global numberspace. - Brutally convert all boardfiles still passing global GPIOs by registering descriptor tables associated with the devices instead so this driver does not need to keep supporting passing any GPIO numbers as platform data. There is no stepwise approach as elegant as this, I strongly prefer this big hammer over any antsteps for this conversion. This way the old GPIO numbers go away and NEVER COME BACK. Special conversion for the different boards utilizing I2C-GPIO: - EP93xx (arch/arm/mach-ep93xx): pretty straight forward as all boards were using the same two GPIO lines, just define these two in a lookup table for "i2c-gpio" and register these along with the device. None of them define any other platform data so just pass NULL as platform data. This platform selects GPIOLIB so all should be smooth. The pins appear on a gpiochip for bank "G" as pins 1 (SDA) and 0 (SCL). - IXP4 (arch/arm/mach-ixp4): descriptor tables have to be registered for each board separately. They all use "IXP4XX_GPIO_CHIP" so it is pretty straight forward. Most board define no other platform data than SCL/SDA so they can drop the #include of and assign NULL to platform data. The "goramo_mlr" (Goramo Multilink Router) board is a bit worrisome: it implements its own I2C bit-banging in the board file, and optionally registers an I2C serial port, but claims the same GPIO lines for itself in the board file. This is not going to work: there will be competition for the GPIO lines, so delete the optional extra I2C bus instead, no I2C devices are registered on it anyway, there are just hints that it may contain an EEPROM that may be accessed from userspace. This needs to be fixed up properly by the serial clock using I2C emulation so drop a note in the code. - KS8695 board acs5k (arch/arm/mach-ks8695/board-acs5.c) has some platform data in addition to the pins so it needs to be kept around sans GPIO lines. Its GPIO chip is named "KS8695" and the arch selects GPIOLIB. - PXA boards (arch/arm/mach-pxa/*) use some of the platform data so it needs to be preserved here. The viper board even registers two GPIO I2Cs. The gpiochip is named "gpio-pxa" and the arch selects GPIOLIB. - SA1100 Simpad (arch/arm/mach-sa1100/simpad.c) defines a GPIO I2C bus, and the arch selects GPIOLIB. - Blackfin boards (arch/blackfin/bf533 etc) for these I assume their I2C GPIOs refer to the local gpiochip defined in arch/blackfin/kernel/bfin_gpio.c names "BFIN-GPIO". The arch selects GPIOLIB. The boards get spiked with IF_ENABLED(I2C_GPIO) but that is a side effect of it being like that already (I would just have Kconfig select I2C_GPIO and get rid of them all.) I also delete any platform data set to 0 as it will get that value anyway from static declartions of platform data. - The MIPS selects GPIOLIB and the Alchemy machine is using two local GPIO chips, one of them has a GPIO I2C. We need to adjust the local offset from the global number space here. The ATH79 has a proper GPIO driver in drivers/gpio/gpio-ath79.c and AFAICT the chip is named "ath79-gpio" and the PB44 PCF857x expander spawns from this on GPIO 1 and 0. The latter board only use the platform data to specify pins so it can be cut altogether after this. - The MFD Silicon Motion SM501 is a special case. It dynamically spawns an I2C bus off the MFD using sm501_create_subdev(). We use an approach to dynamically create a machine descriptor table and attach this to the "SM501-LOW" or "SM501-HIGH" gpiochip. We use chip-local offsets to grab the right lines. We can get rid of two local static inline helpers as part of this refactoring. Cc: Steven Miao Cc: Ralf Baechle Cc: Guenter Roeck Cc: Ville Syrjälä Cc: Magnus Damm Cc: Ben Dooks Cc: Heiko Schocher Acked-by: Wu, Aaron Acked-by: Olof Johansson Acked-by: Lee Jones Acked-by: Ralf Baechle Tested-by: Geert Uytterhoeven Signed-off-by: Linus Walleij arch/arm/mach-ep93xx/core.c | 39 ++++---- arch/arm/mach-ep93xx/edb93xx.c | 15 +-- arch/arm/mach-ep93xx/include/mach/platform.h | 4 +- arch/arm/mach-ep93xx/simone.c | 12 +-- arch/arm/mach-ep93xx/snappercl15.c | 12 +-- arch/arm/mach-ep93xx/vision_ep9307.c | 7 +- arch/arm/mach-ixp4xx/avila-setup.c | 17 +++- arch/arm/mach-ixp4xx/dsmg600-setup.c | 16 +++- arch/arm/mach-ixp4xx/fsg-setup.c | 16 +++- arch/arm/mach-ixp4xx/goramo_mlr.c | 24 ++--- arch/arm/mach-ixp4xx/ixdp425-setup.c | 16 +++- arch/arm/mach-ixp4xx/nas100d-setup.c | 16 +++- arch/arm/mach-ixp4xx/nslu2-setup.c | 16 +++- arch/arm/mach-ks8695/board-acs5k.c | 13 ++- arch/arm/mach-pxa/palmz72.c | 12 ++- arch/arm/mach-pxa/viper.c | 27 +++++- arch/arm/mach-sa1100/simpad.c | 12 ++- arch/blackfin/mach-bf533/boards/blackstamp.c | 19 +++- arch/blackfin/mach-bf533/boards/ezkit.c | 18 +++- arch/blackfin/mach-bf533/boards/stamp.c | 18 +++- arch/blackfin/mach-bf561/boards/ezkit.c | 18 +++- arch/mips/alchemy/board-gpr.c | 19 +++- arch/mips/ath79/mach-pb44.c | 16 +++- drivers/i2c/busses/i2c-gpio.c | 134 +++++++++++++-------------- drivers/mfd/sm501.c | 49 +++++----- include/linux/i2c-gpio.h | 4 - 26 files changed, 327 insertions(+), 242 deletions(-) commit 80057cb417b2873cf645ac85568118c32f038f4c Author: Linus Walleij Date: Thu Oct 19 23:30:12 2017 +0200 gpio-mmio: Use the new .get_multiple() callback It is possible to read all lines of a generic MMIO GPIO chip with a single register read so support this if we are in native endianness. Add an especially quirky callback to read multiple lines for the variants that require you to read values from the output registers if and only if the line is set as output. We managed to do that with a maximum of two register reads, and just one read if the requested lines are all input or all output. Cc: Anton Vorontsov Cc: Lukas Wunner Signed-off-by: Linus Walleij drivers/gpio/gpio-mmio.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 84 insertions(+), 3 deletions(-) commit 3f1185d6c9d3fe91aa85ec8d3f4d71207452c458 Author: Randy Dunlap Date: Sun Oct 29 17:08:52 2017 -0700 ALSA: fix kernel-doc build warning Fix kernel-doc build error. A symbol that ends with an underscore character ('_') has special meaning in reST (reStructuredText), so add a '*' to prevent this error and to indicate that there are several of these values to choose from. ../sound/core/jack.c:312: ERROR: Unknown target name: "snd_jack_btn". Signed-off-by: Randy Dunlap Signed-off-by: Takashi Iwai sound/core/jack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5813da157f7dbe03d268c8d0dd9425d0e3944910 Author: Dan Carpenter Date: Tue Oct 24 12:47:42 2017 +0300 hwmon: (max6621) Inverted if condition in max6621_read() We intended to test for failure here but accidentally tested for success. It means that we don't set "*val" to true and it means that if i2c_smbus_write_byte() does fail then we return success. Fixes: e7895864b0d7 ("hwmon: (max6621) Add support for Maxim MAX6621 temperature sensor") Signed-off-by: Dan Carpenter Acked-by: Vadim Pasternak Signed-off-by: Guenter Roeck drivers/hwmon/max6621.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3bdc5b5bd369fcab8306b80d2c740e332183d20 Author: Colin Ian King Date: Wed Oct 18 13:10:38 2017 +0100 hwmon: (asc7621) remove redundant assignment to newval The setting of newval to zero is redundant as the following if/else stanzas will always update newval to a new value. Remove the redundant setting, cleans up clang build warning: drivers/hwmon/asc7621.c:582:2: warning: Value stored to 'newval' is never read Signed-off-by: Colin Ian King Signed-off-by: Guenter Roeck drivers/hwmon/asc7621.c | 1 - 1 file changed, 1 deletion(-) commit 749d782d80de6db454af4336a4f4c8dfe79a5fc4 Author: hotran Date: Tue Oct 17 11:28:34 2017 -0700 hwmon: (xgene) Support hwmon v2 This patch supports xgene-hwmon v2 which uses the non-cachable memory as the PCC shared memory. Signed-off-by: Hoan Tran Signed-off-by: Guenter Roeck drivers/hwmon/xgene-hwmon.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) commit 534e28d876926669bba0dc31519a0b0026f3dfcb Author: Miquel Raynal Date: Mon Oct 16 14:12:10 2017 +0200 hwmon: (gpio-fan) Fix null pointer dereference at probe A previous commit changed the argument list of gpio_fan_get_of_data(), removing the "struct *dev" argument and retrieving it instead from the gpio_fan_data structure. The "dev" entry of gpio_fan_data was then dereferenced to access the of_node field, leading to a kernel panic during the probe as the "dev" entry of the gpio_fan_data structure was not filled yet. Fix this by setting fan_data->dev before calling gpio_fan_get_of_data(). Fixes: 5859d8d30737 ("hwmon: (gpio-fan) Get rid of platform data struct") Signed-off-by: Miquel Raynal Signed-off-by: Guenter Roeck drivers/hwmon/gpio-fan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9de382fddf18f673436f1058d822e1236a0b4c2a Author: Linus Walleij Date: Mon Oct 9 01:14:32 2017 +0200 hwmon: (gpio-fan) Convert to use GPIO descriptors This converts the GPIO fan driver to use GPIO descriptors. This way we avoid indirection since the gpiolib anyway just use descriptors inside, and we also get rid of explicit polarity handling: the descriptors internally knows if the line is active high or active low. Signed-off-by: Linus Walleij [groeck: Line length] Signed-off-by: Guenter Roeck drivers/hwmon/gpio-fan.c | 88 ++++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 56 deletions(-) commit e99c2e5d6cde7f06dac0444b5edd6ed0d1abc431 Author: Linus Walleij Date: Tue Sep 26 01:09:10 2017 +0200 hwmon: (gpio-fan) Rename GPIO line state variables The "ctrl" and "num_ctrl" entries in the state container struct is ambiguously named "ctrl" and "num_ctrl" overlapping with some hwmon lingo and making it hard to understand. Since this array actually contains the GPIO line numbers, from the Linux global GPIO numberspace, used to control the different fan speeds. Rename these fields to "gpios" (pluralis) and "num_gpios" so as to make it unambiguous. Convert some instances of "unsigned" to "unsigned int" to keep checkpatch happy. Signed-off-by: Linus Walleij Signed-off-by: Guenter Roeck drivers/hwmon/gpio-fan.c | 51 ++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 25 deletions(-) commit c9933cb16f166de57b0b8bce170c1b9476b89836 Author: Linus Walleij Date: Tue Sep 26 01:09:09 2017 +0200 hwmon: (gpio-fan) Get rid of the gpio alarm struct There is no point in storing the GPIO alarm settings in their own struct so merge this into the main state container. Convert the variables from "unsigned" to "unsigned int" to make checkpatch happy. Signed-off-by: Linus Walleij Signed-off-by: Guenter Roeck drivers/hwmon/gpio-fan.c | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) commit b5482f7e6cc5639440bfa0b9bb4a3a9732883f53 Author: Linus Walleij Date: Tue Sep 26 01:09:08 2017 +0200 hwmon: (gpio-fan) Get rid of platform data struct We are not passing the platform data struct into the driver from the outside, there is no point of having it around separately so instead of first populating the platform data struct and assigning the result into the same variables in the state container (struct gpio_fan_data) just assign the configuration from the device tree directly into the state container members. Signed-off-by: Linus Walleij Signed-off-by: Guenter Roeck drivers/hwmon/gpio-fan.c | 88 +++++++++++++++++------------------------------- 1 file changed, 30 insertions(+), 58 deletions(-) commit a9b4c8afcd3d6c2b068e6ecf1a22ab26dd8c200e Author: Linus Walleij Date: Tue Sep 26 01:09:07 2017 +0200 hwmon: (gpio-fan) Mandate OF_GPIO and cut pdata path We have no users of platform data, we made platform data driver-local, so cut all #ifdefs for the platform data case, and depend on the Kconfig CONFIG_OF_GPIO symbol. Signed-off-by: Linus Walleij Signed-off-by: Guenter Roeck drivers/hwmon/Kconfig | 1 + drivers/hwmon/gpio-fan.c | 36 ++++++++++-------------------------- 2 files changed, 11 insertions(+), 26 deletions(-) commit 8c0eb9bc52fad2fec7a5ff40d5da85b74232f5de Author: Linus Walleij Date: Tue Sep 26 01:09:06 2017 +0200 hwmon: (gpio-fan) Send around device pointer The driver is storing the struct platform_device *pdev pointer but what it is really using and want to pass around is a struct device *dev pointer. Signed-off-by: Linus Walleij Signed-off-by: Guenter Roeck drivers/hwmon/gpio-fan.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit ef7a612415958de1f9afd86235d38b14975d0b7c Author: Linus Walleij Date: Tue Sep 26 01:09:05 2017 +0200 hwmon: (gpio-fan) Localize platform data There is not a single user of the platform data header in . We can conclude that all current users are probing from the device tree, so start simplifying the code by pulling the header into the driver. Convert "unsigned" to "unsigned int" in the process to make checkpatch happy. Signed-off-by: Linus Walleij Signed-off-by: Guenter Roeck drivers/hwmon/gpio-fan.c | 23 ++++++++++++++++++++++- include/linux/gpio-fan.h | 36 ------------------------------------ 2 files changed, 22 insertions(+), 37 deletions(-) commit f9013c1677426df09022fe6fa0121e6fe9e1a0fa Author: Linus Walleij Date: Tue Sep 26 01:09:04 2017 +0200 hwmon: (gpio-fan) Use local variable pointers Create local struct device *dev and device_node *np pointers to make the code easier to read. Signed-off-by: Linus Walleij Signed-off-by: Guenter Roeck drivers/hwmon/gpio-fan.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 9dfe310ed5f0802cba5ec29f2b5f5f92ba8ad9e9 Author: Linus Walleij Date: Tue Sep 26 01:09:03 2017 +0200 hwmon: (gpio-fan) Move DT bindings to the right place This moves the GPIO fan bindings to the hwmon bindings. The GPIO fan is a hwmon class hardware, not related to GPIO other than being a consumer of GPIOs. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Guenter Roeck .../devicetree/bindings/gpio/gpio-fan.txt | 40 ---------------------- .../devicetree/bindings/hwmon/gpio-fan.txt | 40 ++++++++++++++++++++++ 2 files changed, 40 insertions(+), 40 deletions(-) commit 24fae2b5b61da0cec6b94059552ae97ccc498ccc Author: Vadim Pasternak Date: Tue Oct 3 18:08:28 2017 +0000 Documentation: devicetree: add max6621 device Add device record for Maxim MAX6621 temperature sensor device. Signed-off-by: Vadim Pasternak Acked-by: Rob Herring Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/trivial-devices.txt | 1 + 1 file changed, 1 insertion(+) commit 92b64580f14b24a3d5cfd1e9dff0b745826a824b Author: Vadim Pasternak Date: Tue Oct 3 18:08:27 2017 +0000 hwmon: (max6621) Add support for Maxim MAX6621 temperature sensor MAX6621 is a PECI-to-I2C translator provides an efficient, low-cost solution for PECI-to-SMBus/I2C protocol conversion. It allows reading the temperature from the PECI-compliant host directly from up to four PECI-enabled CPUs. Signed-off-by: Vadim Pasternak Signed-off-by: Guenter Roeck drivers/hwmon/Kconfig | 14 ++ drivers/hwmon/Makefile | 1 + drivers/hwmon/max6621.c | 593 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 608 insertions(+) commit 7a76a7f34afdfb080ec8e51ed18891b4f72ec907 Author: Colin Ian King Date: Fri Sep 22 15:36:20 2017 +0100 hwmon: (w83793) make const array watchdog_minors static, reduces object code size Don't populate const array watchdog_minors on the stack, instead make it static. Makes the object code smaller by over 350 bytes: Before: text data bss dec hex filename 48019 38144 256 86419 15193 drivers/hwmon/w83793.o After: text data bss dec hex filename 47574 38232 256 86062 1502e drivers/hwmon/w83793.o (gcc 6.3.0, x86-64) Signed-off-by: Colin Ian King Signed-off-by: Guenter Roeck drivers/hwmon/w83793.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 762b1e88801357770889d013c5d20fe110d1f456 Author: Patrick Venture Date: Mon Sep 11 15:41:55 2017 -0700 hwmon: (aspeed-pwm-tacho) increase fan tach period The previous value reduced the time required to determine the fan value, however, it's also used as the final timeout mechanism. The prevous value would work for any fan speed greater than around 3k RPM. This increased value, lets the fan speeds return quickly but will wait longer to handle speeds below 3k RPM. Testing: this value was determined through experimentation on the ast2400 on the Quanta-q71l. This configurations runs 8 fans attached to the controller. Signed-off-by: Patrick Venture Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck drivers/hwmon/aspeed-pwm-tacho.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd53f62160e5fcea18f6adcddd40ba429dc127b6 Author: Alan Tull Date: Mon Sep 11 14:16:49 2017 -0500 hwmon: (max1619) Add dt binding Add new device tree binding for max1619. Signed-off-by: Alan Tull Cc: Jean Delvare Cc: Guenter Roeck Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Guenter Roeck drivers/hwmon/max1619.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0ec54a2e8ee22b13e9a89dfd76e66e5b75ca9885 Author: Alan Tull Date: Mon Sep 11 14:16:48 2017 -0500 dt-bindings: hwmon: add compatible for max1619 Add new device tree bindings document for max1619 device including a new compatible string. Signed-off-by: Alan Tull Cc: Jean Delvare Cc: Guenter Roeck Cc: Rob Herring Cc: Mark Rutland Acked-by: Rob Herring Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/hwmon/max1619.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 90b863dd63d63f4d97c3f5b6d6ed5bd239500f7b Author: Colin Ian King Date: Mon Sep 18 15:45:48 2017 +0100 hwmon: (sht15) remove redundant check on status and send of status value A previous commit removed bit or'ing into to the integer status so now status is now always zero. This means that the non-zero check on status and the sht15_send_status call will never occur; it is deadcode. Clean this up by removing the dead code. Detected by: CoverityScan CID#1456835 ("Logically dead code") Fixes: aa7ab80c578c ("hwmon: (sht15) Root out platform data") Signed-off-by: Colin Ian King Signed-off-by: Guenter Roeck drivers/hwmon/sht15.c | 8 -------- 1 file changed, 8 deletions(-) commit 186731145f920fb1514200043bcaf9c689693857 Author: Linus Walleij Date: Sun Sep 10 11:44:46 2017 +0200 hwmon: (sht15) Root out platform data After finding out there are active users of this sensor I noticed: - It has a single PXA27x board file using the platform data - The platform data is only used to carry two GPIO pins, all other fields are unused - The driver does not use GPIO descriptors but the legacy GPIO API I saw we can swiftly fix this by: - Killing off the platform data entirely - Define a GPIO descriptor lookup table in the board file - Use the standard devm_gpiod_get() to grab the GPIO descriptors from either the device tree or the board file table. This compiles, but needs testing. Cc: arm@kernel.org Cc: Marco Franchi Cc: Davide Hug Cc: Jonathan Cameron Signed-off-by: Linus Walleij Acked-by: Arnd Bergmann Tested-by: Marco Franchi Acked-by: Arnd Bergmann Signed-off-by: Guenter Roeck Documentation/hwmon/sht15 | 3 +- arch/arm/mach-pxa/stargate2.c | 17 ++-- drivers/hwmon/sht15.c | 167 ++++++++++++------------------------ include/linux/platform_data/sht15.h | 38 -------- 4 files changed, 65 insertions(+), 160 deletions(-) commit 1b50b776355fa6c6d7b3281a63c275d5c18d629d Author: Guenter Roeck Date: Mon Sep 4 18:33:53 2017 -0700 hwmon: (k10temp) Add support for temperature offsets Add support for handling temperature offset values for various AMD CPUs, similar to the code used in the coretemp driver for Intel CPUs. This is primarily for Ryzen CPUs (which has documented temperature offsets), but the code is kept generic to simplify adding additional CPUs. Signed-off-by: Guenter Roeck drivers/hwmon/k10temp.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 9af0a9aecdb945cd5513941ffdcbcc031009b402 Author: Guenter Roeck Date: Mon Sep 4 18:33:53 2017 -0700 hwmon: (k10temp) Add support for family 17h Add support for temperature sensors on Family 17h (Ryzen) processors. Signed-off-by: Guenter Roeck drivers/hwmon/k10temp.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 68546abf7a3a63f199e53d6dcaa7375df37a6aaa Author: Guenter Roeck Date: Mon Sep 4 18:33:53 2017 -0700 hwmon: (k10temp) Move chip specific code into probe function Introduce a local data structure and determine the temperature read function at probe time to reduce runtime complexity. Signed-off-by: Guenter Roeck drivers/hwmon/k10temp.c | 62 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 17 deletions(-) commit fc483a9bf795ebf49bf0c872d125391d8fee2f3f Author: Jean Delvare Date: Tue Sep 19 14:59:34 2017 +0200 hwmon: (stts751) Fix buffer size passed to snprintf Function snprintf already cares for the terminating NUL at the end of the string, the caller doesn't need to do it. Signed-off-by: Jean Delvare Cc: Andrea Merello Cc: Guenter Roeck Signed-off-by: Guenter Roeck drivers/hwmon/stts751.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 6dcf2fb5e8db3704f50af1f198256cb4e2453f8b Author: Edward A. James Date: Fri Oct 27 11:55:05 2017 -0500 hwmon: (pmbus/core) Prevent unintentional setting of page to 0xFF The pmbus core may call read/write word data functions with a page value of -1, intending to perform the operation without setting the page. However, the read/write word data functions accept only unsigned 8-bit page numbers, and therefore cannot check for negative page number to avoid setting the page. This results in setting the page number to 0xFF. This may result in errors or undefined behavior of some devices (specifically the ir35221, which allows the page to be set to 0xFF, but some subsequent operations to read registers may fail). Switch the pmbus_set_page page parameter to an integer and perform the check for negative page there. Make read/write functions consistent in accepting an integer page number parameter. Signed-off-by: Edward A. James Fixes: cbcdec6202c9 ("hwmon: (pmbus): Access word data for STATUS_WORD") Signed-off-by: Guenter Roeck drivers/hwmon/pmbus/pmbus.h | 6 +++--- drivers/hwmon/pmbus/pmbus_core.c | 25 +++++++++++-------------- 2 files changed, 14 insertions(+), 17 deletions(-) commit 4fbaf649ebbc625189e349fd6d07a4fe22a863f8 Author: Vineet Gupta Date: Fri Oct 27 15:23:44 2017 -0700 ARC: [plat-axs10x] auto-select AXS101 or AXS103 given the ISA config AXS10x platform has two flavours: - AXS101 (ARC700 cpu, ARCompact ISA) - AXS103 (ARC HS38x cpu, ARCv2 ISA) So depending on the ISA support configured, pre-select the AXS10x variant. Signed-off-by: Vineet Gupta arch/arc/plat-axs10x/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 282e45dc64d1832c9b51d2c6f6eb0a634c924fa7 Author: Philipp Puschmann Date: Thu Oct 19 10:12:47 2017 +0200 mtd: spi-nor: Add support for mr25h128 Add Everspin mr25h128 16KB MRAM to the list of supported chips. Signed-off-by: Philipp Puschmann Signed-off-by: Cyrille Pitchen Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt | 1 + drivers/mtd/devices/m25p80.c | 1 + drivers/mtd/spi-nor/spi-nor.c | 1 + 3 files changed, 3 insertions(+) commit 1c782b9a851770b152ddd711d0a0cb295872ab50 Author: Xiaolei Li Date: Sat Oct 28 14:52:23 2017 +0800 mtd: nand: mtk: change the compile sequence of mtk_nand.o and mtk_ecc.o There will get mtk ecc handler during mtk nand probe now. If mtk ecc module is not initialized, then mtk nand probe will return -EPROBE_DEFER, and retry later. Change the compile sequence of mtk_nand.o and mtk_ecc.o, initialize mtk ecc module before mtk nand module. This makes mtk nand module initialized as soon as possible. Signed-off-by: Xiaolei Li Signed-off-by: Boris Brezillon drivers/mtd/nand/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9b1504d3c6d6831c822cd785e095fc5fb155346 Author: Dan Williams Date: Sun Oct 29 12:13:07 2017 -0700 acpi, nfit: hide unknown commands from nmemX/commands For vendor specific commands that do not have a common kernel translation, hide them from nmemX/commands. For example, the following results from new enabling to probe for support of the new NVDIMM_FAMILY_INTEL DSMs specified in v1.6 of the command specification [1]: # cat /sys/bus/nd/devices/nmem0/commands smart smart_thresh flags get_size get_data set_data effect_size effect_log vendor cmd_call unknown unknown unknown unknown unknown unknown unknown unknown [1]: https://pmem.io/documents/NVDIMM_DSM_Interface-V1.6.pdf Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 10 ++++++++-- drivers/acpi/nfit/nfit.h | 6 ++++++ 2 files changed, 14 insertions(+), 2 deletions(-) commit f48729a999ee57b9e831245779e68200dd2bde09 Author: Benjamin Gaignard Date: Mon Oct 23 11:58:37 2017 +0200 clocksource/drivers/timer-of: Add timer_of_exit function The timer-of API does not provide a function to undo what has been done by the timer_of_init() function. Add a timer_of_exit() function. Signed-off-by: Benjamin Gaignard Signed-off-by: Daniel Lezcano drivers/clocksource/timer-of.c | 12 ++++++++++++ drivers/clocksource/timer-of.h | 3 +++ 2 files changed, 15 insertions(+) commit d342b6a973af459f6104cad6effc8efc71a0558d Author: Roman Yeryomin Date: Mon Sep 18 00:54:16 2017 +0300 mtd: spi-nor: enable 4B opcodes for mx66l51235l Signed-off-by: Roman Yeryomin Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10cd4b7b7432d529d7f8b73979a846e33a573a9e Author: Ludovic Barre Date: Thu Oct 26 17:12:34 2017 +0200 mtd: spi-nor: stm32-quadspi: fix prefetching outside fsize When memory-mapped mode is used, a prefetching mechanism fully managed by the hardware allows to optimize the read from external the QSPI memory. A 32-bytes FIFO is used for prefetching. When the limit of flash size - fifo size is reached the prefetching mechanism tries to read outside the fsize. The stm32 quadspi hardware become busy and should be aborted. Signed-off-by: Ludovic Barre Reported-by: Bruno Herrera Tested-by: Bruno Herrera Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/stm32-quadspi.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit e812963b918656d875beb47c277fd0e29bd826af Author: Ludovic Barre Date: Thu Oct 26 17:12:35 2017 +0200 mtd: spi-nor: stm32-quadspi: change license text -Change the license text with long template. -Change Copyright to STMicroelectronics. Signed-off-by: Ludovic Barre Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/stm32-quadspi.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 05521bd3d117704a1458eb4d0c3ae821858658f2 Author: Geert Uytterhoeven Date: Thu Oct 26 17:12:33 2017 +0200 mtd: spi-nor: stm32-quadspi: Fix uninitialized error return code With gcc 4.1.2: drivers/mtd/spi-nor/stm32-quadspi.c: In function ‘stm32_qspi_tx_poll’: drivers/mtd/spi-nor/stm32-quadspi.c:230: warning: ‘ret’ may be used uninitialized in this function Indeed, if stm32_qspi_cmd.len is zero, ret will be uninitialized. This length is passed from outside the driver using the spi_nor.{read,write}{,_reg}() callbacks. Several functions in drivers/mtd/spi-nor/spi-nor.c (e.g. write_enable(), write_disable(), and erase_chip()) call spi_nor.write_reg() with a zero length. Fix this by returning an explicit zero on success. Fixes: 0d43d7ab277a048c ("mtd: spi-nor: add driver for STM32 quad spi flash controller") Signed-off-by: Geert Uytterhoeven Acked-by: Ludovic Barre Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/stm32-quadspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2cb51a8ddd69dbd9e6b3d19dfdacd4ebfdd166a8 Author: Martin Blumenstingl Date: Tue Oct 3 01:28:04 2017 +0200 ARM: dts: meson: add the efuse node Meson6, Meson8 and Meson8b use a similar IP block which has access to 512 bytes of efuse data. During SoC manufacturing some calibration settings for the CVBS connector and the internal temperature sensor are written to this efuse. On some boards it additionally stores for example the MAC addresses. The efuse is enabled on Meson8 and Meson8b but kept disabled on Meson6 since we do not have a clock driver there (which is required to read data from the efuse). Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson.dtsi | 15 +++++++++++++++ arch/arm/boot/dts/meson6.dtsi | 3 +++ arch/arm/boot/dts/meson8.dtsi | 6 ++++++ arch/arm/boot/dts/meson8b.dtsi | 7 +++++++ 4 files changed, 31 insertions(+) commit 7d32bc03bcfbe4a9ca22b5c84a42f4f8cc4ba003 Author: Jerome Brunet Date: Thu Oct 19 14:01:41 2017 +0200 ARM: dts: meson8b: enable gpio interrupt controller Add gpio interrupt controller node to the meson8b boards Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson.dtsi | 9 +++++++++ arch/arm/boot/dts/meson8b.dtsi | 6 ++++++ 2 files changed, 15 insertions(+) commit b94d22d94ad226eeea3b6ec4579fb4bf8a199e5c Author: Jerome Brunet Date: Thu Oct 19 14:01:43 2017 +0200 ARM64: dts: meson-gx: add external PHY interrupt on some platforms Add the external PHY interrupt on the nanopi-k2, odroid-c2, p200, p230 and q200 Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 2 ++ arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 ++ arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts | 2 ++ arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts | 2 ++ arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts | 2 ++ 5 files changed, 10 insertions(+) commit 9dbb56ea0917a036dc966663a09baf3d5a471f54 Author: Jerome Brunet Date: Thu Oct 19 14:01:42 2017 +0200 ARM64: dts: meson-gx: add gpio interrupt controller Add gpio interrupt controller to Amlogic GX family SoCs Signed-off-by: Jerome Brunet Reviewed-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 | 6 ++++++ arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 6 ++++++ 3 files changed, 21 insertions(+) commit f2c2122a6cbccbe558ac54c9c5773f1df86ac3b6 Author: Jerome Brunet Date: Thu Oct 19 14:01:40 2017 +0200 ARM64: meson: enable MESON_IRQ_GPIO in Kconfig select MESON_IRQ_GPIO in Kconfig for Amlogic's meson SoC family Signed-off-by: Jerome Brunet Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) commit e841ec956e539f4002f5e9fe9f9e904dcca12d5d Author: Neil Armstrong Date: Thu Oct 19 12:31:09 2017 +0200 ARM64: dts: meson-gxbb-odroidc2: fix usb1 power supply Looking at the schematics, the USB Power Supply is shared between the two USB interfaces, If the usb0 fails to initialize, the second one won't have power. Fixes: 5a0803bd5ae2 ("ARM64: dts: meson-gxbb-odroidc2: Enable USB Nodes") Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 1 + 1 file changed, 1 insertion(+) commit dea54268f3925d05e75b9c6dec487a6515dc0ed5 Author: Jerome Brunet Date: Thu Oct 19 14:01:39 2017 +0200 ARM: meson: enable MESON_IRQ_GPIO in Kconfig for meson8b select MESON_IRQ_GPIO in Kconfig for Amlogic's meson8b SoC Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm/mach-meson/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 4692142a3dc82d60f9f290f98a6e1f8f627ba90a Author: Carlo Caione Date: Sun Sep 17 18:45:23 2017 +0200 ARM: dts: meson8b: add support for booting the secondary CPU cores Booting the secondary CPU cores involves the following nodes/devices: - SCU (Snoop-Control-Unit, for which we already have a DT node) - a reset line for each CPU core, provided by the reset-controller which is built into the clock-controller - the PMU (power management unit) which controls the power of the CPU cores - a range in the SRAM specifically reserved for booting secondary CPU cores - the "enable-method" which activates booting the secondary CPU cores This adds all required nodes and properties to boot the secondary CPU cores. Signed-off-by: Carlo Caione Signed-off-by: Martin Blumenstingl Tested-by: Linus Lüssing Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 4a5a27116b447d00d0a0d3f554ea37ffe387657f Author: Martin Blumenstingl Date: Sun Sep 17 18:45:22 2017 +0200 ARM: dts: meson8: add support for booting the secondary CPU cores Booting the secondary CPU cores involves the following nodes/devices: - SCU (Snoop-Control-Unit, for which we already have a DT node) - a reset line for each CPU core, provided by the reset-controller which is built into the clock-controller - the PMU (power management unit) which controls the power of the CPU cores - a range in the SRAM specifically reserved for booting secondary CPU cores - the "enable-method" which activates booting the secondary CPU cores This adds all required nodes and properties to boot the secondary CPU cores. Suggested-by: Carlo Caione Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit d850f3e5d2966e5c9eb55f66181cee960737e04c Author: Martin Blumenstingl Date: Sun Sep 17 18:45:21 2017 +0200 ARM: meson: Add SMP bringup code for Meson8 and Meson8b This adds the necessary SMP-operations and startup code to use the additional cores on the Amlogic Meson8/Meson8m2 (both are using the same sequence) and Meson8b (using a slightly difference sequence) SoCs. Signed-off-by: Carlo Caione [add Meson8/Meson8m2 support and allow taking CPU cores offline as well] Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/Makefile | 1 + arch/arm/mach-meson/Kconfig | 1 + arch/arm/mach-meson/Makefile | 1 + arch/arm/mach-meson/platsmp.c | 440 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 443 insertions(+) commit 936a4174435b376557ee2610eae03592baeb9016 Author: Martin Blumenstingl Date: Sun Sep 17 18:45:20 2017 +0200 ARM: smp_scu: allow the platform code to read the SCU CPU status On Amlogic Meson8 / Meson8m2 (both Cortex-A9) and Meson8b (Cortex-A5) the CPU hotplug code needs to wait until the SCU status of the CPU that is being taken offline is SCU_PM_POWEROFF. Provide a utility function (which can be invoked for example from .cpu_kill()) which allows reading the SCU status of a CPU. While here, replace the magic number 0x3 with a preprocessor macro (SCU_CPU_STATUS_MASK) so we don't have to duplicate this magic number in the new function. Signed-off-by: Martin Blumenstingl Acked-by: Russell King Signed-off-by: Kevin Hilman arch/arm/include/asm/smp_scu.h | 6 ++++++ arch/arm/kernel/smp_scu.c | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) commit 0606326effc66201223de26d71c2779a108ee452 Author: Martin Blumenstingl Date: Sun Sep 17 18:45:19 2017 +0200 ARM: smp_scu: add a helper for powering on a specific CPU To boot the secondary CPUs on the Amlogic Meson8/Meson8m2 (Cortex-A9) and Meson8b (Cortex-A5) SoCs we have to enable SCU mode SCU_PM_NORMAL, otherwise the secondary cores will not start. This patch adds a scu_cpu_power_enable() function which can be used to enable SCU_PM_NORMAL for a specific (logical) CPU. An internal helper function is also created, to avoid code duplication with scu_power_mode(). Signed-off-by: Martin Blumenstingl Acked-by: Russell King Signed-off-by: Kevin Hilman arch/arm/include/asm/smp_scu.h | 6 ++++++ arch/arm/kernel/smp_scu.c | 35 +++++++++++++++++++++++++---------- 2 files changed, 31 insertions(+), 10 deletions(-) commit 9c52aaf756ecaec195517e17875b136eb4d176bf Author: Carlo Caione Date: Sun Sep 17 18:45:18 2017 +0200 dt-bindings: Amlogic: Add Meson8 and Meson8b SMP related documentation With this patch we add documentation for: * power-management-unit: the PMU is used to bring up the cores during SMP operations * sram: among other things the sram is used to store the first code executed by the core when it is powered up * cpu-enable-method: the CPU enable method used by Amlogic Meson8 and Meson8b SoCs Signed-off-by: Carlo Caione [also add Meson8 to the documentation] Signed-off-by: Martin Blumenstingl Acked-by: Rob Herring Signed-off-by: Kevin Hilman .../devicetree/bindings/arm/amlogic/pmu.txt | 18 ++++++++++++ .../devicetree/bindings/arm/amlogic/smp-sram.txt | 32 ++++++++++++++++++++++ Documentation/devicetree/bindings/arm/cpus.txt | 2 ++ 3 files changed, 52 insertions(+) commit 250a53d6fcd86012935d1cf71eb2e3d6e88c412c Author: Christoffer Dall Date: Fri Oct 27 10:34:33 2017 +0200 genirq: Document vcpu_info usage for percpu_devid interrupts It is currently unclear how to set the VCPU affinity for a percpu_devid interrupt , since the Linux irq_data structure describes the state for multiple interrupts, one for each physical CPU on the system. Since each such interrupt can be associated with different VCPUs or none at all, associating a single VCPU state with such an interrupt does not capture the necessary semantics. The implementers of irq_set_affinity are the Intel and AMD IOMMUs, and the ARM GIC irqchip. The Intel and AMD callers do not appear to use percpu_devid interrupts, and the ARM GIC implementation only checks the pointer against NULL vs. non-NULL. Therefore, simply update the function documentation to explain the expected use in the context of percpu_devid interrupts, allowing future changes or additions to irqchip implementers to do the right thing. Signed-off-by: Christoffer Dall Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: kvm@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: Eric Auger Cc: kvmarm@lists.cs.columbia.edu Cc: linux-arm-kernel@lists.infradead.org Link: https://lkml.kernel.org/r/1509093281-15225-13-git-send-email-cdall@linaro.org kernel/irq/manage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8fca9e95243128961357577ba394ec1d4bd8c92c Author: Neil Armstrong Date: Sat Oct 28 18:40:17 2017 +0200 dt-bindings: power: add amlogic meson power domain bindings Acked-by: Rob Herring Signed-off-by: Neil Armstrong [khilman: minor whitespace fixups] Signed-off-by: Kevin Hilman .../bindings/power/amlogic,meson-gx-pwrc.txt | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 75fcb5ca4b465580565e63cd9ca807b37169c798 Author: Neil Armstrong Date: Sat Oct 28 18:40:16 2017 +0200 soc: amlogic: add Meson GX VPU Domains driver The Video Processing Unit needs a specific Power Domain powering scheme this driver handles this as a PM Power Domain driver. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman drivers/soc/amlogic/Kconfig | 10 ++ drivers/soc/amlogic/Makefile | 1 + drivers/soc/amlogic/meson-gx-pwrc-vpu.c | 234 ++++++++++++++++++++++++++++++++ 3 files changed, 245 insertions(+) commit d77147ff443b255d82c907a632c825b2cc610b10 Author: harshads Date: Sun Oct 29 09:38:46 2017 -0400 ext4: add support for online resizing with bigalloc This patch adds support for online resizing on bigalloc file system by implementing EXT4_IOC_RESIZE_FS ioctl. Old resize interfaces (add block groups and extend last block group) are left untouched. Tests performed with cluster sizes of 1, 2, 4 and 8 blocks (of size 4k) per cluster. I will add these tests to xfstests. Signed-off-by: Harshad Shirwadkar Signed-off-by: Theodore Ts'o fs/ext4/ext4.h | 4 +-- fs/ext4/ioctl.c | 6 ---- fs/ext4/mballoc.c | 28 ++++++++------- fs/ext4/resize.c | 104 ++++++++++++++++++++++++++++++++++-------------------- 4 files changed, 84 insertions(+), 58 deletions(-) commit 1f01d8be0e6a04bd682a55f6d50c14c1679e7571 Author: Konrad Zapałowicz Date: Tue Oct 17 15:53:49 2017 +0200 Bluetooth: increase timeout for le auto connections This patch increases the connection timeout for LE connections that are triggered by the advertising report to 4 seconds. It has been observed that devices equipped with wifi+bt combo SoC fail to create a connection with BLE devices due to their coexistence issues. Increasing this timeout gives them enough time to complete the connection with success. Signed-off-by: Konrad Zapałowicz Signed-off-by: Marcel Holtmann include/net/bluetooth/hci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13df5000d39a1570a88daa44855ebe0b0f966b14 Author: Loic Poulain Date: Thu Oct 19 14:29:10 2017 +0200 Bluetooth: hci_ath: Add ath_vendor_cmd helper Introduce ath_vendor_cmd function which can be used to configure 'tags' and patch the firmware. ATH vendor command has the following format: | OPCODE (u8) | INDEX (LE16) | DLEN (U8) | DATA (U8 * DLEN) | BD address configuration tag is at index 0x0001. Signed-off-by: Loic Poulain Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ath.c | 49 +++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 17 deletions(-) commit f17d858ed0a48270db4368d8cf370e3839ee6f4f Author: Jaganath Kanakkassery Date: Wed Oct 25 10:58:48 2017 +0530 Bluetooth: Fix potential memory leak If command is added to req then it should be freed in case if hdev is down or HCI_ADVERTISING flag is set. This introduces a helper in hci_request to purge the cmd_q to make cmd_q internal to hci_request which is used to fix the leak. This also replace accessing of cmd_q in hci_conn with the new helper. Signed-off-by: Jaganath Kanakkassery Signed-off-by: Marcel Holtmann net/bluetooth/hci_conn.c | 2 +- net/bluetooth/hci_request.c | 5 +++++ net/bluetooth/hci_request.h | 1 + net/bluetooth/mgmt.c | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) commit 858ff38af77fc660092e82474ecc6ac135ed29fe Author: Bartosz Chronowski Date: Thu Oct 26 10:22:43 2017 +0200 Bluetooth: btusb: Add new NFA344A entry. This change allows proper low power mode entry in suspend. /sys/kernel/debug/usb/devices entry: T: Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0489 ProdID=e09f Rev= 0.01 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms Signed-off-by: Bartosz Chronowski Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 1 + 1 file changed, 1 insertion(+) commit 67d2f8781b9f00d1089aafcfa3dc09fcd0f343e2 Author: Ronald Tschalär Date: Wed Oct 25 22:14:53 2017 -0700 Bluetooth: hci_ldisc: Allow sleeping while proto locks are held. Commit dec2c92880cc5435381d50e3045ef018a762a917 ("Bluetooth: hci_ldisc: Use rwlocking to avoid closing proto races") introduced locks in hci_ldisc that are held while calling the proto functions. These locks are rwlock's, and hence do not allow sleeping while they are held. However, the proto functions that hci_bcm registers use mutexes and hence need to be able to sleep. In more detail: hci_uart_tty_receive() and hci_uart_dequeue() both acquire the rwlock, after which they call proto->recv() and proto->dequeue(), respectively. In the case of hci_bcm these point to bcm_recv() and bcm_dequeue(). The latter both acquire the bcm_device_lock, which is a mutex, so doing so results in a call to might_sleep(). But since we're holding a rwlock in hci_ldisc, that results in the following BUG (this for the dequeue case - a similar one for the receive case is omitted for brevity): BUG: sleeping function called from invalid context at kernel/locking/mutex.c in_atomic(): 1, irqs_disabled(): 0, pid: 7303, name: kworker/7:3 INFO: lockdep is turned off. CPU: 7 PID: 7303 Comm: kworker/7:3 Tainted: G W OE 4.13.2+ #17 Hardware name: Apple Inc. MacBookPro13,3/Mac-A5C67F76ED83108C, BIOS MBP133.8 Workqueue: events hci_uart_write_work [hci_uart] Call Trace: dump_stack+0x8e/0xd6 ___might_sleep+0x164/0x250 __might_sleep+0x4a/0x80 __mutex_lock+0x59/0xa00 ? lock_acquire+0xa3/0x1f0 ? lock_acquire+0xa3/0x1f0 ? hci_uart_write_work+0xd3/0x160 [hci_uart] mutex_lock_nested+0x1b/0x20 ? mutex_lock_nested+0x1b/0x20 bcm_dequeue+0x21/0xc0 [hci_uart] hci_uart_write_work+0xe6/0x160 [hci_uart] process_one_work+0x253/0x6a0 worker_thread+0x4d/0x3b0 kthread+0x133/0x150 We can't replace the mutex in hci_bcm, because there are other calls there that might sleep. Therefore this replaces the rwlock's in hci_ldisc with rw_semaphore's (which allow sleeping). This is a safer approach anyway as it reduces the restrictions on the proto callbacks. Also, because acquiring write-lock is very rare compared to acquiring the read-lock, the percpu variant of rw_semaphore is used. Lastly, because hci_uart_tx_wakeup() may be called from an IRQ context, we can't block (sleep) while trying acquire the read lock there, so we use the trylock variant. Signed-off-by: Ronald Tschalär Reviewed-by: Lukas Wunner Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ldisc.c | 38 ++++++++++++++++++++++---------------- drivers/bluetooth/hci_uart.h | 2 +- 2 files changed, 23 insertions(+), 17 deletions(-) commit 6c1e272f962da249f289846cec944bcd1c162a49 Merge: 52f737c 74a0f57 Author: Thomas Gleixner Date: Sun Oct 29 12:33:40 2017 +0100 Merge tag 'timers-conversion-next' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into timers/core Pull first batch of scsi conversions that have been Reviewed or Acked from Kees Cook. commit aad93c70b9a3b80dbc383a31e77a119f69bdd856 Merge: 995231c fe89aa6 Author: David S. Miller Date: Sun Oct 29 18:39:58 2017 +0900 Merge branch 'ipvlan-private-vepa' Mahesh Bandewar says: ==================== add 'private' and 'vepa' attributes to ipvlan modes IPvlan has always been operating in bridge-mode for its supported modes i.e. if the packets are destined to the adjacent neighbor dev, then IPvlan driver will switch the packet internally without needing the packets to hit the wire or get routed. However, there are situations where this bridge-mode is not needed. e.g. two private processes running inside two namespaces which are having one IPvlan slave each for its namespace but sharing the master. These processes should reach the outside world through the master device but at the same time the bridge function should not work. Currently that's not possible hence the private attribute for the selected mode comes in play. VEPA or 802.1Qbg on the other hand has limited appeal with IPvlan since IPvlan uses the mac-address of the lower device. So packets that are destined to the adjacent neighbor slave-dev will have same src and dest mac. When these packets reach the external switch/router, they will send you the redirect message which the host will have to deal with. Having said that this attribute will have appeal in debugging as IPvlan will not switch / short-circuit packets internally. e.g. using VEPA mode with lower-device in loopback mode will avoid some complicated set-ups that use non-local-bind with some route jugglery. This patch-set implements these attributes for the existing modes that IPvlan has. Please see individual patches for their detailed implementation. A subsequent ip-utils patch is needed and will be sent soon. ==================== Signed-off-by: David S. Miller commit fe89aa6b250c1011ccf425fbb7998e96bd54263f Author: Mahesh Bandewar Date: Thu Oct 26 15:09:25 2017 -0700 ipvlan: implement VEPA mode This is very similar to the Macvlan VEPA mode, however, there is some difference. IPvlan uses the mac-address of the lower device, so the VEPA mode has implications of ICMP-redirects for packets destined for its immediate neighbors sharing same master since the packets will have same source and dest mac. The external switch/router will send redirect msg. Having said that, this will be useful tool in terms of debugging since IPvlan will not switch packets within its slaves and rely completely on the external entity as intended in 802.1Qbg. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller Documentation/networking/ipvlan.txt | 12 +++++++++++- drivers/net/ipvlan/ipvlan.h | 15 +++++++++++++++ drivers/net/ipvlan/ipvlan_core.c | 17 ++++++++++------- drivers/net/ipvlan/ipvlan_main.c | 13 +++++++++++-- include/uapi/linux/if_link.h | 1 + 5 files changed, 48 insertions(+), 10 deletions(-) commit a190d04db93710ae166749055b6985397c6d13f5 Author: Mahesh Bandewar Date: Thu Oct 26 15:09:21 2017 -0700 ipvlan: introduce 'private' attribute for all existing modes. IPvlan has always operated in bridge mode. However there are scenarios where each slave should be able to talk through the master device but not necessarily across each other. Think of an environment where each of a namespace is a private and independant customer. In this scenario the machine which is hosting these namespaces neither want to tell who their neighbor is nor the individual namespaces care to talk to neighbor on short-circuited network path. This patch implements the mode that is very similar to the 'private' mode in macvlan where individual slaves can send and receive traffic through the master device, just that they can not talk among slave devices. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller Documentation/networking/ipvlan.txt | 30 ++++++++++++++++++++++++++--- drivers/net/ipvlan/ipvlan.h | 16 ++++++++++++++++ drivers/net/ipvlan/ipvlan_core.c | 15 ++++++++++++--- drivers/net/ipvlan/ipvlan_main.c | 38 +++++++++++++++++++++++++++++++++++-- include/uapi/linux/if_link.h | 3 +++ 5 files changed, 94 insertions(+), 8 deletions(-) commit 995231c820e3bd3633cb38bf4ea6f2541e1da331 Author: Quentin Monnet Date: Thu Oct 26 14:16:05 2017 -0700 tools: bpftool: add bash completion for bpftool Add a completion file for bash. The completion function runs bpftool when needed, making it smart enough to help users complete ids or tags for eBPF programs and maps currently on the system. Update Makefile to install completion file to /usr/share/bash-completion/completions when running `make install`. Emacs file mode and (at the end) Vim modeline have been added, to keep the style in use for most existing bash completion files. In this, it differs from tools/perf/perf-completion.sh, which seems to be the only other completion file among the kernel sources repository. This is also valid for indent style: 4-space indents, as in other completion files. Signed-off-by: Quentin Monnet Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller tools/bpf/bpftool/Makefile | 3 + tools/bpf/bpftool/bash-completion/bpftool | 354 ++++++++++++++++++++++++++++++ 2 files changed, 357 insertions(+) commit 2660d226d9901c2c82c81f0b3dc5e6737eed2dfe Author: Wei Yongjun Date: Sat Oct 28 05:03:38 2017 +0000 net: aquantia: Make local functions static Fixes the following sparse warnings: drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c:224:5: warning: symbol 'aq_ethtool_get_coalesce' was not declared. Should it be static? drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c:245:5: warning: symbol 'aq_ethtool_set_coalesce' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2ea2352ede9d97585164a7e19224955f4e4ca8db Author: Wei Wang Date: Fri Oct 27 17:30:12 2017 -0700 ipv6: prevent user from adding cached routes Cached routes should only be created by the system when receiving pmtu discovery or ip redirect msg. Users should not be allowed to create cached routes. Furthermore, after the patch series to move cached routes into exception table, user added cached routes will trigger the following warning in fib6_add(): WARNING: CPU: 0 PID: 2985 at net/ipv6/ip6_fib.c:1137 fib6_add+0x20d9/0x2c10 net/ipv6/ip6_fib.c:1137 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 2985 Comm: syzkaller320388 Not tainted 4.14.0-rc3+ #74 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:181 __warn+0x1c4/0x1d9 kernel/panic.c:542 report_bug+0x211/0x2d0 lib/bug.c:183 fixup_bug+0x40/0x90 arch/x86/kernel/traps.c:178 do_trap_no_signal arch/x86/kernel/traps.c:212 [inline] do_trap+0x260/0x390 arch/x86/kernel/traps.c:261 do_error_trap+0x120/0x390 arch/x86/kernel/traps.c:298 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:311 invalid_op+0x18/0x20 arch/x86/entry/entry_64.S:905 RIP: 0010:fib6_add+0x20d9/0x2c10 net/ipv6/ip6_fib.c:1137 RSP: 0018:ffff8801cf09f6a0 EFLAGS: 00010297 RAX: ffff8801ce45e340 RBX: 1ffff10039e13eec RCX: ffff8801d749c814 RDX: 0000000000000000 RSI: ffff8801d749c700 RDI: ffff8801d749c780 RBP: ffff8801cf09fa08 R08: 0000000000000000 R09: ffff8801cf09f360 R10: ffff8801cf09f2d8 R11: 1ffff10039c8befb R12: 0000000000000001 R13: dffffc0000000000 R14: ffff8801d749c700 R15: ffffffff860655c0 __ip6_ins_rt+0x6c/0x90 net/ipv6/route.c:1011 ip6_route_add+0x148/0x1a0 net/ipv6/route.c:2782 ipv6_route_ioctl+0x4d5/0x690 net/ipv6/route.c:3291 inet6_ioctl+0xef/0x1e0 net/ipv6/af_inet6.c:521 sock_do_ioctl+0x65/0xb0 net/socket.c:961 sock_ioctl+0x2c2/0x440 net/socket.c:1058 vfs_ioctl fs/ioctl.c:45 [inline] do_vfs_ioctl+0x1b1/0x1530 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 So we fix this by failing the attemp to add cached routes from userspace with returning EINVAL error. Fixes: 2b760fcf5cfb ("ipv6: hook up exception table to store dst cache") Signed-off-by: Wei Wang Signed-off-by: Eric Dumazet Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/uapi/linux/ipv6_route.h | 2 +- net/ipv6/route.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 21d72af7dcf0c9f78f4fbdb93315568731014e66 Author: Tushar Dave Date: Fri Oct 27 17:28:22 2017 -0700 samples/bpf: adjust rlimit RLIMIT_MEMLOCK for xdp_redirect_map Default rlimit RLIMIT_MEMLOCK is 64KB, causes bpf map failure. e.g. [root@labbpf]# ./xdp_redirect_map $( $( Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/xdp_redirect_map_user.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6dfca831c03ef654b1f7bff1b8d487d330e9f76b Author: Tushar Dave Date: Fri Oct 27 16:12:30 2017 -0700 samples/bpf: adjust rlimit RLIMIT_MEMLOCK for xdp1 Default rlimit RLIMIT_MEMLOCK is 64KB, causes bpf map failure. e.g. [root@lab bpf]#./xdp1 -N $( Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/xdp1_user.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5c1a6eaf0d4eb51e96f193a603af59b55660cb08 Author: Florian Fainelli Date: Fri Oct 27 15:56:01 2017 -0700 net: dsa: b53: Export b53_configure_vlan() bcm_sf2 and b53 replicate the same operations: clear all VLANs and set their ports to the default VLAN tag (1 for these devices) so export the b53 function doing just that. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 6 ++++-- drivers/net/dsa/b53/b53_priv.h | 1 + drivers/net/dsa/bcm_sf2.c | 41 +--------------------------------------- 3 files changed, 6 insertions(+), 42 deletions(-) commit 641da8ed3d8c54a5357d85a0f18d1d537c4205b9 Author: Felix Manlunas Date: Fri Oct 27 14:37:03 2017 -0700 liquidio: get rid of false alarm "Unknown cmd 27" in dmesg Creating a macvtap interface with the liquidio VF driver as lower device causes this alarming message to show up in dmesg: liquidio_link_ctrl_cmd_completion Unknown cmd 27 That's actually a false alarm because cmd 27 is the value of the macro OCTNET_CMD_SET_UC_LIST which is known. It's a control command sent from host to NIC firmware to set the unicast MAC address list of the macvtap lower device. Make the false alarm go away by adding a case for OCTNET_CMD_SET_UC_LIST in liquidio_link_ctrl_cmd_completion(). Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_core.c | 1 + 1 file changed, 1 insertion(+) commit a6fb6aa3cfa9047b62653dbcfc9bcde6e2272b41 Author: Haiyang Zhang Date: Fri Oct 27 12:36:38 2017 -0700 hv_netvsc: Set tx_table to equal weight after subchannels open In some cases, like internal vSwitch, the host doesn't provide send indirection table updates. This patch sets the table to be equal weight after subchannels are all open. Otherwise, all workload will be on one TX channel. As tested, this patch has largely increased the throughput over internal vSwitch. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/rndis_filter.c | 3 +++ 1 file changed, 3 insertions(+) commit 90e229ef61fad240554f5899eb122fbe44990f78 Author: Matteo Croce Date: Fri Oct 27 20:08:23 2017 +0200 ppp: allow usage in namespaces Check for CAP_NET_ADMIN with ns_capable() instead of capable() to allow usage of ppp in user namespace other than the init one. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87e3de1e4e21f8d00dd5eacbf4825b8b15bdbe87 Merge: 05ce8bd 05f9d3e Author: David S. Miller Date: Sun Oct 29 11:20:28 2017 +0900 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-10-27 This patchset is a proposal of how the Traffic Control subsystem can be used to offload the configuration of the Credit Based Shaper (defined in the IEEE 802.1Q-2014 Section 8.6.8.2) into supported network devices. As part of this work, we've assessed previous public discussions related to TSN enabling: patches from Henrik Austad (Cisco), the presentation from Eric Mann at Linux Plumbers 2012, patches from Gangfeng Huang (National Instruments) and the current state of the OpenAVNU project (https://github.com/AVnu/OpenAvnu/). Overview ======== Time-sensitive Networking (TSN) is a set of standards that aim to address resources availability for providing bandwidth reservation and bounded latency on Ethernet based LANs. The proposal described here aims to cover mainly what is needed to enable the following standards: 802.1Qat and 802.1Qav. The initial target of this work is the Intel i210 NIC, but other controllers' datasheet were also taken into account, like the Renesas RZ/A1H RZ/A1M group and the Synopsis DesignWare Ethernet QoS controller. Proposal ======== Feature-wise, what is covered here is the configuration interfaces for HW implementations of the Credit-Based shaper (CBS, 802.1Qav). CBS is a per-queue shaper. Given that this feature is related to traffic shaping, and that the traffic control subsystem already provides a queueing discipline that offloads config into the device driver (i.e. mqprio), designing a new qdisc for the specific purpose of offloading the config for the CBS shaper seemed like a good fit. For steering traffic into the correct queues, we use the socket option SO_PRIORITY and then a mechanism to map priority to traffic classes / Tx queues. The qdisc mqprio is currently used in our tests. As for the CBS config interface, this patchset is proposing a new qdisc called 'cbs'. Its 'tc' cmd line is: $ tc qdisc add dev IFACE parent ID cbs locredit N hicredit M sendslope S \ idleslope I Note that the parameters for this qdisc are the ones defined by the 802.1Q-2014 spec, so no hardware specific functionality is exposed here. Per-stream shaping, as defined by IEEE 802.1Q-2014 Section 34.6.1, is not yet covered by this proposal. v2: Merged patch 6 of the original series into patch 4 based on feedback from David Miller. ==================== Signed-off-by: David S. Miller commit 05ce8bd43f3bd62996a4a70a6f3494a66ace11ca Merge: 949cf8b f98be6c Author: David S. Miller Date: Sun Oct 29 11:16:22 2017 +0900 Merge branch 'l2tp-register-sessions-atomically' Guillaume Nault says: ==================== l2tp: register sessions atomically Currently l2tp_session_create() allocates a session, partially initialises it and finally registers it. It therefore exposes sessions that aren't fully initialised to the rest of the system, because pseudo-wire specific initialisation can only happen after l2tp_session_create() returns. This leads to several crashes when these sessions are used or deleted. This series starts by splitting session registration out of l2tp_session_create() (patch #1). Thus allowing pseudo-wires code to terminate the initialisation phase before registration. Then patch #2 fixes the eth pseudo-wire code. This requires protecting the session's netdevice pointer with RCU, because it still needs to be updated concurrently after the session got registered. Remaining patches take care of ppp pseudo-wires. RCU protection is needed there too, for the same reasons. This time it's the pppol2tp socket pointer that gets protected. For clarity, and since the conversion requires more modifications, introducing RCU is done in its own patch (#3). Then patch #4 only has to take care of fixing sessions initialisation and registration (and adapting part of the deletion process). ==================== Signed-off-by: David S. Miller commit f98be6c6359e7e4a61aaefb9964c1db31cb9ec0c Author: Guillaume Nault Date: Fri Oct 27 16:51:52 2017 +0200 l2tp: initialise PPP sessions before registering them pppol2tp_connect() initialises L2TP sessions after they've been exposed to the rest of the system by l2tp_session_register(). This puts sessions into transient states that are the source of several races, in particular with session's deletion path. This patch centralises the initialisation code into pppol2tp_session_init(), which is called before the registration phase. The only field that can't be set before session registration is the pppol2tp socket pointer, which has already been converted to RCU. So pppol2tp_connect() should now be race-free. The session's .session_close() callback is now set before registration. Therefore, it's always called when l2tp_core deletes the session, even if it was created by pppol2tp_session_create() and hasn't been plugged to a pppol2tp socket yet. That'd prevent session free because the extra reference taken by pppol2tp_session_close() wouldn't be dropped by the socket's ->sk_destruct() callback (pppol2tp_session_destruct()). We could set .session_close() only while connecting a session to its pppol2tp socket, or teach pppol2tp_session_close() to avoid grabbing a reference when the session isn't connected, but that'd require adding some form of synchronisation to be race free. Instead of that, we can just let the pppol2tp socket hold a reference on the session as soon as it starts depending on it (that is, in pppol2tp_connect()). Then we don't need to utilise pppol2tp_session_close() to hold a reference at the last moment to prevent l2tp_core from dropping it. When releasing the socket, pppol2tp_release() now deletes the session using the standard l2tp_session_delete() function, instead of merely removing it from hash tables. l2tp_session_delete() drops the reference the sessions holds on itself, but also makes sure it doesn't remove a session twice. So it can safely be called, even if l2tp_core already tried, or is concurrently trying, to remove the session. Finally, pppol2tp_session_destruct() drops the reference held by the socket. Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ppp.c | 69 +++++++++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 31 deletions(-) commit ee40fb2e1eb5bc0ddd3f2f83c6e39a454ef5a741 Author: Guillaume Nault Date: Fri Oct 27 16:51:52 2017 +0200 l2tp: protect sock pointer of struct pppol2tp_session with RCU pppol2tp_session_create() registers sessions that can't have their corresponding socket initialised. This socket has to be created by userspace, then connected to the session by pppol2tp_connect(). Therefore, we need to protect the pppol2tp socket pointer of L2TP sessions, so that it can safely be updated when userspace is connecting or closing the socket. This will eventually allow pppol2tp_connect() to avoid generating transient states while initialising its parts of the session. To this end, this patch protects the pppol2tp socket pointer using RCU. The pppol2tp socket pointer is still set in pppol2tp_connect(), but only once we know the function isn't going to fail. It's eventually reset by pppol2tp_release(), which now has to wait for a grace period to elapse before it can drop the last reference on the socket. This ensures that pppol2tp_session_get_sock() can safely grab a reference on the socket, even after ps->sk is reset to NULL but before this operation actually gets visible from pppol2tp_session_get_sock(). The rest is standard RCU conversion: pppol2tp_recv(), which already runs in atomic context, is simply enclosed by rcu_read_lock() and rcu_read_unlock(), while other functions are converted to use pppol2tp_session_get_sock() followed by sock_put(). pppol2tp_session_setsockopt() is a special case. It used to retrieve the pppol2tp socket from the L2TP session, which itself was retrieved from the pppol2tp socket. Therefore we can just avoid dereferencing ps->sk and directly use the original socket pointer instead. With all users of ps->sk now handling NULL and concurrent updates, the L2TP ->ref() and ->deref() callbacks aren't needed anymore. Therefore, rather than converting pppol2tp_session_sock_hold() and pppol2tp_session_sock_put(), we can just drop them. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_ppp.c | 154 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 101 insertions(+), 53 deletions(-) commit ee28de6bbd78c2e18111a0aef43ea746f28d2073 Author: Guillaume Nault Date: Fri Oct 27 16:51:51 2017 +0200 l2tp: initialise l2tp_eth sessions before registering them Sessions must be initialised before being made externally visible by l2tp_session_register(). Otherwise the session may be concurrently deleted before being initialised, which can confuse the deletion path and eventually lead to kernel oops. Therefore, we need to move l2tp_session_register() down in l2tp_eth_create(), but also handle the intermediate step where only the session or the netdevice has been registered. We can't just call l2tp_session_register() in ->ndo_init() because we'd have no way to properly undo this operation in ->ndo_uninit(). Instead, let's register the session and the netdevice in two different steps and protect the session's device pointer with RCU. And now that we allow the session's .dev field to be NULL, we don't need to prevent the netdevice from being removed anymore. So we can drop the dev_hold() and dev_put() calls in l2tp_eth_create() and l2tp_eth_dev_uninit(). Fixes: d9e31d17ceba ("l2tp: Add L2TP ethernet pseudowire support") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_eth.c | 106 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 75 insertions(+), 31 deletions(-) commit 3953ae7b218df4d1e544b98a393666f9ae58a78c Author: Guillaume Nault Date: Fri Oct 27 16:51:50 2017 +0200 l2tp: don't register sessions in l2tp_session_create() Sessions created by l2tp_session_create() aren't fully initialised: some pseudo-wire specific operations need to be done before making the session usable. Therefore the PPP and Ethernet pseudo-wires continue working on the returned l2tp session while it's already been exposed to the rest of the system. This can lead to various issues. In particular, the session may enter the deletion process before having been fully initialised, which will confuse the session removal code. This patch moves session registration out of l2tp_session_create(), so that callers can control when the session is exposed to the rest of the system. This is done by the new l2tp_session_register() function. Only pppol2tp_session_create() can be easily converted to avoid modifying its session after registration (the debug message is dropped in order to avoid the need for holding a reference on the session). For pppol2tp_connect() and l2tp_eth_create()), more work is needed. That'll be done in followup patches. For now, let's just register the session right after its creation, like it was done before. The only difference is that we can easily take a reference on the session before registering it, so, at least, we're sure it's not going to be freed while we're working on it. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 21 +++++++-------------- net/l2tp/l2tp_core.h | 3 +++ net/l2tp/l2tp_eth.c | 9 +++++++++ net/l2tp/l2tp_ppp.c | 23 +++++++++++++++++------ 4 files changed, 36 insertions(+), 20 deletions(-) commit 949cf8b1dd39f6d306a681503b6031299fd7ced8 Author: David S. Miller Date: Sun Oct 29 11:14:08 2017 +0900 tcp: Remove "linux/unaligned/access_ok.h" include. This causes build failures: In file included from net/ipv4/tcp_input.c:79:0: ./include/linux/unaligned/access_ok.h:7:28: error: redefinition of 'get_unaligned_le16' In file included from ./include/asm-generic/unaligned.h:17:0, from ./arch/arm/include/generated/asm/unaligned.h:1, from net/ipv4/tcp_input.c:76: ./include/linux/unaligned/le_struct.h:6:19: note: previous definition of 'get_unaligned_le16' was here In file included from net/ipv4/tcp_input.c:79:0: ./include/linux/unaligned/access_ok.h:12:28: error: redefinition of 'get_unaligned_le32' Plain "asm/access_ok.h", which is already included, is sufficient. Fixes: 60e2a7780793 ("tcp: TCP experimental option for SMC") Reported-by: Egil Hjelmeland Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 1 - 1 file changed, 1 deletion(-) commit c69fe407803d4b554b7397fad9598a04717ac255 Author: Arjun Vynipadath Date: Fri Oct 27 18:08:21 2017 +0530 cxgb3: Check and handle the dma mapping errors This patch adds checks at approprate places whether *dma_map*() call has succeeded or not. Original Work by: Santosh Rastapur Signed-off-by: Arjun Vynipadath Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb3/sge.c | 118 ++++++++++++++++++++++++------- 1 file changed, 92 insertions(+), 26 deletions(-) commit 509708310cf917a05fbceb41ad67da1416b81bd0 Author: Francois Romieu Date: Fri Oct 27 13:24:49 2017 +0300 r8169: Add support for interrupt coalesce tuning (ethtool -C) Kirr: In particular with ethtool -C rx-usecs 0 rx-frames 0 now it is possible to disable RX delays when NIC usage requires low-latency. See this thread for context: https://www.spinics.net/lists/netdev/msg217665.html My specific case is that: We have many computers with gigabit Realtek NICs. For 2 such computers connected to a gigabit store-and-forward switch the minimum round-trip time for small pings (`ping -i 0 -w 3 -s 56 -q peer`) is ~ 30μs. However it turned out that when Ethernet frame length transitions 127 -> 128 bytes (`ping -i 0 -w 3 -s {81 -> 82} -q peer`) the lowest RTT transitions step-wise to ~ 270μs. As David Light said this is RX interrupt mitigation done by NIC which creates the latency. For workloads when low-latency is required with e.g. Intel, BCM etc NIC drivers one just uses `ethtool -C rx-usecs ...` to reduce the time NIC delays before interrupting CPU, but it turned out `ethtool -C` is not supported by r8169 driver. Like Stéphane ANCELOT I've traced the problem down to IntrMitigate being hardcoded to != 0 for our chips (we have 8168 based NICs): https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/realtek/r8169.c#n5460 static void rtl_hw_start_8169(struct net_device *dev) { ... /* * Undocumented corner. Supposedly: * (TxTimer << 12) | (TxPackets << 8) | (RxTimer << 4) | RxPackets */ RTL_W16(IntrMitigate, 0x0000); https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/realtek/r8169.c#n6346 static void rtl_hw_start_8168(struct net_device *dev) { ... RTL_W16(IntrMitigate, 0x5151); and then I've also found https://www.spinics.net/lists/netdev/msg217665.html and original Francois' patch: https://www.spinics.net/lists/netdev/msg217984.html https://www.spinics.net/lists/netdev/msg218207.html So could we please finally get support for tuning r8169 interrupt coalescing in tree? (so that next poor soul who hits the problem does not need to go all the way to dig into driver sources and internet wildly and finally patch locally -RTL_W16(IntrMitigate, 0x5151); +RTL_W16(IntrMitigate, 0x5100); guessing whether it is right or not and also having to care to deploy the patch everywhere it needs to be used, etc...). To do so I've took original Francois's patch from 2012 and reworked it a bit: - updated to latest net-next.git; - adjusted scaling setup based on feedback from Hayes to pick up scaling vector depending not only on link speed but also on CPlusCmd[0:1] and to adjust CPlusCmd[0:1] correspondingly when setting timings; - improved a bit (I think so) error handling. I've tested the patch on "RTL8168d/8111d" (XID 083000c0) and with it and `ethtool -C rx-usecs 0 rx-frames 0` on both ends it improves: - minimum RTT latency: ~270μs -> ~30μs (small packet), ~330μs -> ~110μs (full 1.5K ethernet frame) - average RTT latency: ~480μs -> ~50μs (small packet), ~560μs -> ~125μs (full 1.5K ethernet frame) ( before: root@neo1:# ping -i 0 -w 3 -s 82 -q neo2 PING neo2.kirr.nexedi.com (192.168.102.21) 82(110) bytes of data. --- neo2.kirr.nexedi.com ping statistics --- 5906 packets transmitted, 5905 received, 0% packet loss, time 2999ms rtt min/avg/max/mdev = 0.274/0.485/0.607/0.026 ms, ipg/ewma 0.508/0.489 ms root@neo1:# ping -i 0 -w 3 -s 1472 -q neo2 PING neo2.kirr.nexedi.com (192.168.102.21) 1472(1500) bytes of data. --- neo2.kirr.nexedi.com ping statistics --- 5073 packets transmitted, 5073 received, 0% packet loss, time 2999ms rtt min/avg/max/mdev = 0.330/0.566/0.710/0.028 ms, ipg/ewma 0.591/0.544 ms after: root@neo1# ping -i 0 -w 3 -s 82 -q neo2 PING neo2.kirr.nexedi.com (192.168.102.21) 82(110) bytes of data. --- neo2.kirr.nexedi.com ping statistics --- 45815 packets transmitted, 45815 received, 0% packet loss, time 3000ms rtt min/avg/max/mdev = 0.036/0.051/0.368/0.010 ms, ipg/ewma 0.065/0.053 ms root@neo1:# ping -i 0 -w 3 -s 1472 -q neo2 PING neo2.kirr.nexedi.com (192.168.102.21) 1472(1500) bytes of data. --- neo2.kirr.nexedi.com ping statistics --- 21250 packets transmitted, 21250 received, 0% packet loss, time 3000ms rtt min/avg/max/mdev = 0.112/0.125/0.390/0.007 ms, ipg/ewma 0.141/0.125 ms the small -> 1.5K latency growth is understandable as it takes ~15μs to transmit 1.5K on 1Gbps on the wire and with 2 hosts and 1 switch and ICMP ECHO + ECHO reply the packet has to travel 4 ethernet segments which is already 60μs; probably something a bit else is also there as e.g. on Linux, even with `cpupower frequency-set -g performance`, on some computers I've noticed the kernel can be spending more time in software-only mode when incoming packets go in less frequently. E.g. this program can demonstrate the effect for ICMP ECHO processing: https://lab.nexedi.com/kirr/bcc/blob/43cfc13b/tools/pinglat.py (later this was found to be partly due to C-states exit latencies) ) We have this patch running in our testing setup for 1 months already without any issues observed. It remains to be clarified whether RX and TX timers use the same base. For now I've set them equally, but Francois's original patch version suggests it could be not the same. I've got no feedback at all to my original posting of this patch and questions https://www.spinics.net/lists/netdev/msg457173.html neither from Francois, nor from any people from Realtek during one month. So I suggest we simply apply it to net-next.git now. Cc: Francois Romieu Cc: Hayes Wang Cc: Realtek linux nic maintainers Cc: David Laight Cc: Stéphane ANCELOT Cc: Eric Dumazet Signed-off-by: Kirill Smelkov Tested-by: Holger Hoffstätte Signed-off-by: David S. Miller drivers/net/ethernet/realtek/r8169.c | 231 +++++++++++++++++++++++++++++++++++ 1 file changed, 231 insertions(+) commit 8ef2097edf3c633207ab4e1a69a8f847a77a559e Merge: 5b52a4c f418af6 Author: David S. Miller Date: Sun Oct 29 11:03:44 2017 +0900 Merge branch 'bridge-make-setlink-dellink-notifications-more-accurate' Nikolay Aleksandrov says: ==================== bridge: make setlink/dellink notifications more accurate Before this set the bridge would generate a notification on vlan add or del even if they didn't actually do any changes, which confuses listeners and is generally not preferred. We could also lose notifications on actual changes if one adds a range of vlans and there's an error in the middle. The problem with just breaking and returning an error is that we could break existing user-space scripts which rely on the vlan delete to clear all existing entries in the specified range and ignore the non-existing errors (typically used to clear the current vlan config). So in order to make the notifications more accurate while keeping backwards compatibility we add a boolean that tracks if anything actually changed during the config calls. The vlan add is more difficult to fix because it always returns 0 even if nothing changed, but we cannot use a specific error because the drivers can return anything and we may mask it, also we'd need to update all places that directly return the add result, thus to signal that a vlan was created or updated and in order not to break overlapping vlan range add we pass down the new boolean that tracks changes to the add functions to check if anything was actually updated. v6: moved "changed" in else branch in br|nbp_vlan_add, thanks to Toshiaki Makita and retested everything again v5: fix br_vlan_add return (v1 leftover) spotted by Toshiaki Makita v4: set changed always to false in the non-vlan config case and retested v3: rebased to latest net-next and fixed non-vlan config functions reported by kbuild test bot v2: pass changed down to vlan add instead of masking errors ==================== Signed-off-by: David S. Miller commit f418af6343fbfaaa3306e7cf15906be4f20c69ff Author: Nikolay Aleksandrov Date: Fri Oct 27 13:19:37 2017 +0300 bridge: vlan: signal if anything changed on vlan add Before this patch there was no way to tell if the vlan add operation actually changed anything, thus we would always generate a notification on adds. Let's make the notifications more precise and generate them only if anything changed, so use the new bool parameter to signal that the vlan was updated. We cannot return an error because there are valid use cases that will be broken (e.g. overlapping range add) and also we can't risk masking errors due to calls into drivers for vlan add which can potentially return anything. Signed-off-by: Nikolay Aleksandrov Reviewed-by: Toshiaki Makita Signed-off-by: David S. Miller net/bridge/br_netlink.c | 9 ++++-- net/bridge/br_private.h | 14 ++++++--- net/bridge/br_vlan.c | 78 ++++++++++++++++++++++++++++++++++++------------- 3 files changed, 73 insertions(+), 28 deletions(-) commit e19b42a1a0669ed5b8009930c5269a5a87cc363c Author: Nikolay Aleksandrov Date: Fri Oct 27 13:19:36 2017 +0300 bridge: netlink: make setlink/dellink notifications more accurate Before this patch we had cases that either sent notifications when there were in fact no changes (e.g. non-existent vlan delete) or didn't send notifications when there were changes (e.g. vlan add range with an error in the middle, port flags change + vlan update error). This patch sends down a boolean to the functions setlink/dellink use and if there is even a single configuration change (port flag, vlan add/del, port state) then we always send a notification. This is all done to keep backwards compatibility with the opportunistic vlan delete, where one could specify a vlan range that has missing vlans inside and still everything in that range will be cleared, this is mostly used to clear the whole vlan config with a single call, i.e. range 1-4094. Signed-off-by: Nikolay Aleksandrov Acked-by: Stephen Hemminger Signed-off-by: David S. Miller net/bridge/br_netlink.c | 44 +++++++++++++++++++++++++----------------- net/bridge/br_netlink_tunnel.c | 14 +++++++++----- net/bridge/br_private_tunnel.h | 3 ++- 3 files changed, 37 insertions(+), 24 deletions(-) commit 4cf419a2b4c2e5bb0583e32e5fe079995c987c0f Author: Wolfram Sang Date: Sun Oct 29 00:49:14 2017 +0200 power: supply: sbs-message: fix some code style issues Use 'unsigned int' and curly braces for 'else'. Reviewed-by: Sebastian Reichel Signed-off-by: Wolfram Sang drivers/power/supply/sbs-manager.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5e9bee5267fe626df39ca04d6c30e135a9e8b157 Author: Wolfram Sang Date: Sun Oct 29 00:45:59 2017 +0200 power: supply: sbs-battery: remove unchecked return var Since the return value is not checked anyhow, we don't need to store it. Reviewed-by: Sebastian Reichel Signed-off-by: Wolfram Sang drivers/power/supply/sbs-battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9410b7d71032cc76c4211cbf8f76bad322f0c334 Author: Wolfram Sang Date: Sun Oct 29 00:42:10 2017 +0200 power: supply: sbs-battery: remove superfluous variable init Those variables are immediately assigned a value afterwards. Reviewed-by: Sebastian Reichel Signed-off-by: Wolfram Sang drivers/power/supply/sbs-battery.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 1cf855535b034579ac4d39f49da853594ce968dc Author: Phil Reid Date: Thu Aug 24 17:31:10 2017 +0800 power: supply: sbs-battery: move gpio present detect to sbs_get_property Currently when a gpio is defined for battery presence it is only used in the sbs_get_battery_presence_and_health function for 2 properties. All other properties currently try to read data form the battery before returning an error if not present. We should know in advance that no data is going to returned. As the driver tries multiple times to access a property, this prevents a lot of smbus accesses, which had a significant effect on device boot-up. As when the device is registered lots of property accesses are attempted during boot. If no gpio is used for presence detection no change in behaviour should occur. Signed-off-by: Phil Reid Reviewed-by: Sebastian Reichel Signed-off-by: Wolfram Sang drivers/power/supply/sbs-battery.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit a0b8839e2afc6613566ab723f8e3f0e698e9e007 Author: Phil Reid Date: Thu Aug 24 17:31:09 2017 +0800 power: supply: sbs-manager: Add alert callback and battery change notification This adds smb alert support via the smbus_alert driver to generate power_supply_changed notifications when either external power is removed / applied or a battery inserted / removed. Use the i2c alert callback to notify the attached battery driver that a change has occurred. Signed-off-by: Phil Reid Acked-by: Sebastian Reichel Signed-off-by: Wolfram Sang drivers/power/supply/Kconfig | 3 +- drivers/power/supply/sbs-manager.c | 129 +++++++++++++++++++++++++++++++++++-- 2 files changed, 127 insertions(+), 5 deletions(-) commit dbc4deda03fe61a1c29d8218269714bf2c334b9b Author: Karl-Heinz Schneider Date: Thu Aug 24 17:31:08 2017 +0800 power: Adds support for Smart Battery System Manager This patch adds support for Smart Battery System Manager. A SBSM is a device listening at I2C/SMBus address 0x0a and is capable of communicating up to four I2C smart battery devices. All smart battery devices are listening at address 0x0b, so the SBSM muliplexes between them. The driver makes use of the I2C-Mux framework to allow smart batteries to be bound via device tree, i.e. the sbs-battery driver. Via sysfs interface the online state and charge type are presented. If the driver is bound as ltc1760 (an implementation of a Dual Smart Battery System Manager) the charge type can also be changed from trickle to fast. Signed-off-by: Karl-Heinz Schneider Signed-off-by: Phil Reid Reviewed-by: Sebastian Reichel Signed-off-by: Wolfram Sang drivers/power/supply/Kconfig | 13 ++ drivers/power/supply/Makefile | 1 + drivers/power/supply/sbs-manager.c | 323 +++++++++++++++++++++++++++++++++++++ 3 files changed, 337 insertions(+) commit 26b61a652f6d52ec9c14f6be7c5a854a4fe831ae Author: Karl-Heinz Schneider Date: Thu Aug 24 17:31:07 2017 +0800 Documentation: Add sbs-manager device tree node documentation This patch adds device tree documentation for the sbs-manager Signed-off-by: Karl-Heinz Schneider Signed-off-by: Phil Reid Acked-by: Rob Herring Reviewed-by: Sebastian Reichel Signed-off-by: Wolfram Sang .../bindings/power/supply/sbs,sbs-manager.txt | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) commit e460617e85db8af533c9f70c9ab94d4fa111b379 Author: Phil Reid Date: Thu Aug 24 17:31:06 2017 +0800 i2c: mux: pca954x: Return error if irq_create_mapping fails irq_create_mapping can return an error, report error to log and return. Cleanup will occur in the probe function when an error is returned. Suggested-by: Peter Rosin Acked-by: Peter Rosin Signed-off-by: Phil Reid Signed-off-by: Wolfram Sang drivers/i2c/muxes/i2c-mux-pca954x.c | 4 ++++ 1 file changed, 4 insertions(+) commit 148baf1ddfb65019ee510ba2a76c2e7cd9752982 Author: Phil Reid Date: Thu Aug 24 17:31:05 2017 +0800 i2c: mux: pca954x: call request irq after adding mux segments The pca954x device do not have the ability to mask interrupts. For i2c slave devices that also don't have masking ability (eg ltc1760 smbalert output) delay registering the irq until after the mux segments have been configured. During the mux add_adaptor call the core i2c system can register an smbalert handler which would then be called immediately when the irq is registered. This smbalert handler will then clear the pending irq. This removes the need for the irq_mask / irq_unmask calls that were original used to do this. Signed-off-by: Phil Reid Acked-by: Peter Rosin Signed-off-by: Wolfram Sang drivers/i2c/muxes/i2c-mux-pca954x.c | 91 ++++++++++++------------------------- 1 file changed, 28 insertions(+), 63 deletions(-) commit f8756c67b3de71a46255aa478ab590ff28e60ac9 Author: Phil Reid Date: Thu Aug 24 17:31:04 2017 +0800 i2c: core: call of_i2c_setup_smbus_alert in i2c_register_adapter Add a call to of_i2c_setup_smbus_alert when a i2c adapter is registered so the the smbalert driver can be registered. Signed-off-by: Phil Reid Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 69d17246ab255dda8e71c8d65396b4aa6121b7ad Author: Phil Reid Date: Thu Aug 24 17:31:03 2017 +0800 i2c: i2c-smbus: add of_i2c_setup_smbus_alert This commit adds of_i2c_setup_smbus_alert which allows the smbalert driver to be attached to an i2c adapter via the device tree. Signed-off-by: Phil Reid Acked-by: Rob Herring Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c.txt | 4 ++-- drivers/i2c/i2c-core-smbus.c | 22 ++++++++++++++++++++++ drivers/i2c/i2c-smbus.c | 10 +++++++++- include/linux/i2c-smbus.h | 9 +++++++++ 4 files changed, 42 insertions(+), 3 deletions(-) commit 3c0a60bee1d157d4ed9ae6a9727d508158d002c7 Author: Phil Reid Date: Thu Aug 24 17:31:02 2017 +0800 i2c: i2c-smbus: Move i2c_setup_smbus_alert from i2c-smbus to i2c-core-smbus In preparation to adding of_i2c_setup_smbus_alert() move i2c_setup_smbus_alert() to core module. of_i2c_setup_smbus_alert() will call i2c_setup_smbus_alert() and this avoid module dependecy issues. Signed-off-by: Phil Reid Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-smbus.c | 33 +++++++++++++++++++++++++++++++++ drivers/i2c/i2c-smbus.c | 32 -------------------------------- 2 files changed, 33 insertions(+), 32 deletions(-) commit 9b9f2b8bc2ac98d91da714660c53d1cdac999e09 Author: Phil Reid Date: Thu Aug 24 17:31:01 2017 +0800 i2c: i2c-smbus: Use threaded irq for smbalert Prior to this commit the smbalert_irq was handling in the hard irq context. This change switch to using a thread irq which avoids the need for the work thread. Using threaded irq also removes the need for the edge_triggered flag as the enabling / disabling of the hard irq for level triggered interrupts will be handled by the irq core. Without this change have an irq connected to something like an i2c gpio resulted in a null ptr deferences. Specifically handle_nested_irq calls the threaded irq handler. There are currently 3 in tree drivers affected by this change. i2c-parport driver calls i2c_handle_smbus_alert in a hard irq context. This driver use edge trigger interrupts which skip the enable / disable calls. But it still need to handle the smbus transaction on a thread. So the work thread is kept for this driver. i2c-parport-light & i2c-thunderx-pcidrv provide the irq number in the setup which will result in the thread irq being used. i2c-parport-light is edge trigger so the enable / disable call was skipped as well. i2c-thunderx-pcidrv is getting the edge / level trigger setting from of data and was setting the flag as required. However the irq core should handle this automatically. Signed-off-by: Phil Reid Reviewed-by: Benjamin Tissoires Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-parport-light.c | 1 - drivers/i2c/busses/i2c-parport.c | 1 - drivers/i2c/busses/i2c-thunderx-pcidrv.c | 6 ----- drivers/i2c/i2c-smbus.c | 41 +++++++++++++------------------- include/linux/i2c-smbus.h | 1 - 5 files changed, 17 insertions(+), 33 deletions(-) commit 1f35b8653687b9c08c8d58489c1b5cb9cf961c17 Author: Claudio Foellmi Date: Thu Oct 5 14:44:14 2017 +0200 i2c: generic recovery: check SCL before SDA Move the check for a stuck SCL before the check for a high SDA. This prevent false positives in the specific case that SDA is fine and SCL is stuck, which previously returned 0. Also check SDA again after the loop, if we can. Together, these changes should lead to a lot more failed recoveries being caught and returning error codes. Signed-off-by: Claudio Foellmi Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 18075d0d4849c670a09ec2056a4fecb994c6ee3e Author: Archit Taneja Date: Fri Oct 27 16:27:32 2017 +0530 drm/msm/mdp5: Don't use async plane update path if plane visibility changes When a plane moves out of bounds (i.e, outside the crtc clip region), the plane state's "visible" parameter changes to false. When this happens, we (a) release the hwpipe resources away from it, and (b) unstage the corresponding hwpipe(s) from the Layer Mixers in the CRTC. (a) requires use to acquire the global atomic state and assign a new hwpipe. (b) requires us to re-configure the Layer Mixer, which is done in the CRTC. We don't want to do these things in the async plane update path, so return an error if the new state's "visible" isn't the same as the current state's "visible". Cc: Gustavo Padovan Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit aa649e875daf6919bae8d406f115d38a6f39e59c Author: Archit Taneja Date: Fri Oct 27 16:27:31 2017 +0530 drm/msm/mdp5: mdp5_crtc: Restore cursor state only if LM cursors are enabled MDP5 on newer SoCs support cursor planes (i.e, cursor SSPPs). They are a separate entity unlike the cursors within LM. Do not try to restore the MDP5 LM cursor registers, or the corresponding CTL bits if we are not using LM cursors. Also, since we've introduced a new variable 'lm_cursor_enabled', we can now use it to avoid creating a different sets of crtc_funcs for CRTCs with LM cursors and CRTCs with cursor planes. Fixes: "drm/msm/mdp5: restore cursor state when enabling crtc" Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 66 ++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 29 deletions(-) commit b14892801078085cb54dcbe3389057e12c1746a2 Author: Archit Taneja Date: Fri Oct 27 16:27:30 2017 +0530 drm/msm/mdp5: Update mdp5_pipe_assign to spit out both planes We currently call mdp5_pipe_assign() twice to assign the left and right hwpipes for our drm_plane. When merging 2 hwpipes, there are a few constraints that we need to keep in mind: - Only the same types of SSPPs are preferred. I.e, a RGB pipe should be paired with another RGB pipe, VIG with VIG etc. - The hwpipe staged on the left should have a higher priority than the hwpipe staged on the right. The priorities are as follows: VIG0 > VIG1 > VIG2 > VIG3 RGB0 > RGB1 > RGB2 > RGB3 DMA0 > DMA1 We can't apply these constraints easily if mdp5_pipe_assign() is called twice. Update mdp5_pipe_assign() to find both hwpipes in one go, and add the extra constraints needed. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_pipe.c | 45 ++++++++++++++++++++++++++++--- drivers/gpu/drm/msm/mdp/mdp5/mdp5_pipe.h | 7 ++--- drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 25 +++++++++-------- 3 files changed, 57 insertions(+), 20 deletions(-) commit 9866601e67adc5589302d7dfe12d8325d5b894f8 Author: Archit Taneja Date: Fri Oct 27 16:27:29 2017 +0530 drm/msm/mdp5: Prepare mdp5_pipe_assign for some rework mdp5_pipe_assign currently returns the hwpipe pointer for the drm_plane. Return it indirectly by setting a pointer passed as an argument. This is needed because we want the func to find out the right hwpipe too. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_pipe.c | 32 +++++++++++++++---------------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_pipe.h | 4 ++-- drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 18 ++++++++--------- 3 files changed, 27 insertions(+), 27 deletions(-) commit ba49f0623dfd7307eb55b9e184389b513f1b3a2b Author: Gustavo Padovan Date: Fri Jun 30 15:03:21 2017 -0300 drm/msm: remove mdp5_cursor_plane_funcs After converting legacy cursor updates to atomic async commits mdp5_cursor_plane_funcs just duplicates mdp5_plane_funcs now. Cc: Rob Clark Cc: Archit Taneja Signed-off-by: Gustavo Padovan Tested-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) commit 224a4c970987fc685bc04854c5fb2d94ef46b2ee Author: Gustavo Padovan Date: Fri Jun 30 15:03:20 2017 -0300 drm/msm: update cursors asynchronously through atomic Add support to async updates of cursors by using the new atomic interface for that. Basically what this commit does is do what mdp5_update_cursor_plane_legacy() did but through atomic. v5: call drm_atomic_helper_async_check() from the check hook v4: add missing atomic async commit call to msm_atomic_commit(Archit Taneja) v3: move size checks back to drivers (Ville Syrjälä) v2: move fb setting to core and use new state (Eric Anholt) Cc: Rob Clark Cc: Archit Taneja Signed-off-by: Gustavo Padovan Tested-by: Archit Taneja (v4) [added comment about not hitting async update path if hwpipes are re-assigned or global state is touched] Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 151 +++++++++++++----------------- drivers/gpu/drm/msm/msm_atomic.c | 12 +++ 2 files changed, 75 insertions(+), 88 deletions(-) commit 1f920175fff934b2bef0168cb70cf82b690f2d96 Author: Rob Clark Date: Wed Oct 25 12:30:51 2017 -0400 drm/msm/atomic: switch to drm_atomic_helper_check Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_atomic.c | 29 ----------------------------- drivers/gpu/drm/msm/msm_drv.c | 2 +- drivers/gpu/drm/msm/msm_drv.h | 2 -- 3 files changed, 1 insertion(+), 32 deletions(-) commit 9d9ea7a9c6005a42e9837da96ff138a6ddcd593c Author: Rob Clark Date: Thu Oct 19 16:00:31 2017 -0400 drm/msm/mdp5: restore cursor state when enabling crtc Since we enabled runtime PM, we cannot count on cursor registers to retain their values. This can result in situations where we think the cursor is enabled when we enable the CRTC but it is trying to scan out null (and the rest of cursor position/size is lost), resulting in faults and generally angering the hw when coming out of DPMS with a cursor enabled. stable backport note: reverting 774e39ee3572 is also a suitable fix Fixes: 774e39ee3572 drm/msm/mdp5: Set up runtime PM for MDSS Signed-off-by: Rob Clark Reviewed-by: Archit Taneja drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 100 +++++++++++++++++++++---------- 1 file changed, 68 insertions(+), 32 deletions(-) commit 3c352b66905b29689bbf1c8e3722c26de65f086d Author: Rob Clark Date: Fri Oct 20 08:17:43 2017 -0400 drm/msm/mdp5: don't use autosuspend It's only likely to paper over bugs. Unlike the gpu, where we want to keep things alive a bit longer in expectation of the next frame's submit, when the display is shut down we can power off immediately. Signed-off-by: Rob Clark Acked-by: Archit Taneja drivers/gpu/drm/msm/mdp/mdp5/mdp5_cmd_encoder.c | 2 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 6 +++--- drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c | 2 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c | 10 +++++----- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) commit a055cf3a972e6a01933f9dfde564f5de944adde0 Author: Rob Clark Date: Tue Oct 24 10:19:42 2017 -0400 drm/msm/mdp5: ignore planes that are not visible Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 96169f4e755a507a5c0b4fc12882d1d42abd5ab5 Author: Rob Clark Date: Fri Sep 15 11:04:44 2017 -0400 drm/msm: dump submits which triggered gpu hang Note we need to move update_fences() to after msm_rd_dump_submit(), otherwise the bo's referenced by the submit may no longer be valid. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gpu.c | 47 +++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 20 deletions(-) commit 544a32dbf05888ec012868db2e813233078bbdfb Author: Rob Clark Date: Fri Sep 15 10:58:13 2017 -0400 drm/msm: preserve IOVAs in submit's bo table We need this if we want to dump the submit after cleanup (ie. from hang or fault). But in the backoff/unpin case we want to clear them. So add a flag so we can skip clearing the IOVAs in at cleanup. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem_submit.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 998b9a588314faa334dd0f94007e1c685bf664dd Author: Rob Clark Date: Fri Sep 15 10:46:45 2017 -0400 drm/msm/rd: allow adding addition msg to top of dump For faults or hangs, it is nice to be able to include a bit more information. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.h | 3 ++- drivers/gpu/drm/msm/msm_gpu.c | 2 +- drivers/gpu/drm/msm/msm_rd.c | 15 +++++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) commit 2165e2b9cba277a5088c2e771af477e95dcc37bf Author: Rob Clark Date: Fri Sep 15 09:04:52 2017 -0400 drm/msm: split rd debugfs file Split into two instances, the existing $debugfs/rd which continues to dump all submits, and $debugfs/hangrd which will be used to dump just submits that cause gpu hangs (and eventually faults, but that will require some iommu framework enhancements). Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.h | 5 ++- drivers/gpu/drm/msm/msm_gpu.c | 2 +- drivers/gpu/drm/msm/msm_rd.c | 101 +++++++++++++++++++++++++++++++----------- 3 files changed, 79 insertions(+), 29 deletions(-) commit fad33f4b1073a423a9ecd2a335de05e7a3ec1f37 Author: Rob Clark Date: Fri Sep 15 08:38:20 2017 -0400 drm/msm: add special _get_vaddr_active() for cmdstream dumps Prep work for adding a debugfs file that dumps just submits which trigger hangs/faults. In this case the bo may already be in the MADV_DONTNEED state, but will be still on the active list (since the submit hasn't completed yet). So the normal check that the bo is in the WILLNEED state does not apply. (But of course the bo should definitely not be in the PURGED state!) Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.h | 1 + drivers/gpu/drm/msm/msm_gem.c | 22 ++++++++++++++++++++-- drivers/gpu/drm/msm/msm_rd.c | 2 +- 3 files changed, 22 insertions(+), 3 deletions(-) commit 18bb8a6c899d9e503a86198220f2a48814870bef Author: Rob Clark Date: Wed Sep 13 10:17:18 2017 -0400 drm/msm: show task cmdline in gpu recovery messages Now that freedreno gallium driver defaults to using submit_queue task (render reordering), just showing task->comm is not so useful (ie. it is always "flush_queue:0"), so also dump the cmdline. This should also be more useful for piglit/shader_runner. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gpu.c | 55 +++++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 12 deletions(-) commit 78b8e5b847b4c80b731d2ad8a9ce1a377ea68ef2 Author: Jordan Crouse Date: Fri Oct 20 11:07:03 2017 -0600 drm/msm: dump a rd GPUADDR header for all buffers in the command Currently the rd dump avoids any buffers marked as WRITE under the assumption that the contents are not interesting. While it is true that the contents are uninteresting we should still print the iova and size for all buffers so that any listening replay tools can correctly construct the submission. Print the header for all buffers but only dump the contents for buffers marked as READ. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_rd.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 3ceaa1411da4d0d5f3ea89e9ecd03af1b7bcd5eb Author: Jordan Crouse Date: Fri Oct 20 11:07:02 2017 -0600 drm/msm: Removed unused struct_mutex_task Recent changes to locking have rendered struct_mutex_task unused. Unused since 0e08270a1f01. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_drv.h | 6 ------ drivers/gpu/drm/msm/msm_gem_submit.c | 2 -- 2 files changed, 8 deletions(-) commit b1fc2839d2f92d09da90d1e09156a73ddaba8a93 Author: Jordan Crouse Date: Fri Oct 20 11:07:01 2017 -0600 drm/msm: Implement preemption for A5XX targets Implement preemption for A5XX targets - this allows multiple ringbuffers for different priorities with automatic preemption of a lower priority ringbuffer if a higher one is ready. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/Makefile | 1 + drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 176 ++++++++++++++++- drivers/gpu/drm/msm/adreno/a5xx_gpu.h | 107 ++++++++++- drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 305 ++++++++++++++++++++++++++++++ drivers/gpu/drm/msm/adreno/adreno_gpu.c | 14 +- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 7 +- drivers/gpu/drm/msm/msm_drv.h | 2 +- drivers/gpu/drm/msm/msm_gpu.c | 5 +- drivers/gpu/drm/msm/msm_ringbuffer.c | 1 + drivers/gpu/drm/msm/msm_ringbuffer.h | 1 + 10 files changed, 599 insertions(+), 20 deletions(-) commit 4d87fc32dfd20ad0d4ffd5204f6e5d41d281e128 Author: Jordan Crouse Date: Fri Oct 20 11:07:00 2017 -0600 drm/msm: Make the value of RB_CNTL (almost) generic We use a global ringbuffer size and block size for all targets and at least for 5XX preemption we need to know the value the RB_CNTL in several locations so it makes sense to calculate it once and use it everywhere. The only monkey wrench is that we need to disable the RPTR shadow for A430 targets but that only needs to be done once and doesn't affect A5XX so we can or in the value at init time. 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.h | 5 +++++ 2 files changed, 12 insertions(+), 5 deletions(-) commit 4c7085a5d581a547232086b4ac0f553024eb9cec Author: Jordan Crouse Date: Fri Oct 20 11:06:59 2017 -0600 drm/msm: Shadow current pointer in the ring until command is complete Add a shadow pointer to track the current command being written into the ring. Don't commit it as 'cur' until the command is submitted. Because 'cur' is used to construct the software copy of the wptr this ensures that somebody peeking in on the ring doesn't assume that a command is inflight while it is being written. This isn't a huge deal with a single ring (though technically the hangcheck could assume the system is prematurely busy when it isn't) but it will be rather important for preemption where the decision to preempt is based on a non-empty ringbuffer. Without a shadow an aggressive preemption scheme could assume that the ringbuffer is non empty and switch to it before the CPU is done writing the command and boom. Even though preemption won't be supported for all targets because of the way the code is organized it is simpler to make this generic for all targets. The extra load for non-preemption targets should be minimal. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_gpu.c | 9 +++++++-- drivers/gpu/drm/msm/msm_ringbuffer.c | 1 + drivers/gpu/drm/msm/msm_ringbuffer.h | 12 ++++++++---- 3 files changed, 16 insertions(+), 6 deletions(-) commit a6e29a0eea3ccbf6fb8a908a3fc3e931f3ba2ae4 Author: Jordan Crouse Date: Fri Oct 20 11:06:58 2017 -0600 drm/msm: Add a parameter query for the number of ringbuffers In order to manage ringbuffer priority to its fullest userspace should know how many ringbuffers it has to work with. Add a parameter to return the number of active rings. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 +++ include/uapi/drm/msm_drm.h | 1 + 2 files changed, 4 insertions(+) commit f97decac5f4c2d862e5b848694e3ffb29fc8acdd Author: Jordan Crouse Date: Fri Oct 20 11:06:57 2017 -0600 drm/msm: Support multiple ringbuffers Add the infrastructure to support the idea of multiple ringbuffers. Assign each ringbuffer an id and use that as an index for the various ring specific operations. The biggest delta is to support legacy fences. Each fence gets its own sequence number but the legacy functions expect to use a unique integer. To handle this we return a unique identifier for each submission but map it to a specific ring/sequence under the covers. Newer users use a dma_fence pointer anyway so they don't care about the actual sequence ID or ring. The actual mechanics for multiple ringbuffers are very target specific so this code just allows for the possibility but still only defines one ringbuffer for each target family. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 9 +- drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 9 +- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 54 +- drivers/gpu/drm/msm/adreno/a5xx_gpu.h | 2 +- drivers/gpu/drm/msm/adreno/a5xx_power.c | 6 +- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 136 +++-- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 20 +- drivers/gpu/drm/msm/msm_drv.c | 23 +- drivers/gpu/drm/msm/msm_drv.h | 8 +- drivers/gpu/drm/msm/msm_fence.c | 2 +- drivers/gpu/drm/msm/msm_fence.h | 2 +- drivers/gpu/drm/msm/msm_gem.h | 4 +- drivers/gpu/drm/msm/msm_gem_submit.c | 12 +- drivers/gpu/drm/msm/msm_gpu.c | 163 ++++-- drivers/gpu/drm/msm/msm_gpu.h | 42 +- drivers/gpu/drm/msm/msm_ringbuffer.c | 34 +- drivers/gpu/drm/msm/msm_ringbuffer.h | 20 +- drivers/gpu/drm/msm/msm_submitqueue.c | 27 +- include/dt-bindings/msm/msm-bus-ids.h | 887 ++++++++++++++++++++++++++++++++ include/uapi/drm/msm_drm.h | 1 + 20 files changed, 1251 insertions(+), 210 deletions(-) commit cd414f3d931687eb1ebeb87533d85537e315f195 Author: Jordan Crouse Date: Fri Oct 20 11:06:56 2017 -0600 drm/msm: Move memptrs to msm_gpu When we move to multiple ringbuffers we're going to store the data in the memptrs on a per-ring basis. In order to prepare for that move the current memptrs from the adreno namespace into msm_gpu. This is way cleaner and immediately lets us kill off some sub functions so there is much less cost later when we do move to per-ring structs. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 1 - drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 1 - drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 8 ++--- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 55 +++++++-------------------------- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 16 ---------- drivers/gpu/drm/msm/msm_gpu.c | 32 ++++++++++++++++--- drivers/gpu/drm/msm/msm_gpu.h | 17 ++++++++-- 7 files changed, 58 insertions(+), 72 deletions(-) commit f7de15450e906ed6586b29bde609a5686cd0d034 Author: Jordan Crouse Date: Fri Oct 20 11:06:55 2017 -0600 drm/msm: Add per-instance submit queues Currently the behavior of a command stream is provided by the user application during submission and the application is expected to internally maintain the settings for each 'context' or 'rendering queue' and specify the correct ones. This works okay for simple cases but as applications become more complex we will want to set context specific flags and do various permission checks to allow certain contexts to enable additional privileges. Add kernel-side submit queues to be analogous to 'contexts' or 'rendering queues' on the application side. Each file descriptor instance will maintain its own list of queues. Queues cannot be shared between file descriptors. For backwards compatibility context id '0' is defined as a default context specifying no priority and no special flags. This is intended to be the usual configuration for 99% of applications so that a garden variety application can function correctly without creating a queue. Only those applications requiring the specific benefit of different queues need create one. Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/Makefile | 3 +- drivers/gpu/drm/msm/msm_drv.c | 56 ++++++++++++-- drivers/gpu/drm/msm/msm_drv.h | 20 +++-- drivers/gpu/drm/msm/msm_gem.h | 1 + drivers/gpu/drm/msm/msm_gem_submit.c | 14 +++- drivers/gpu/drm/msm/msm_gpu.h | 15 ++++ drivers/gpu/drm/msm/msm_submitqueue.c | 135 ++++++++++++++++++++++++++++++++++ include/uapi/drm/msm_drm.h | 22 ++++++ 8 files changed, 250 insertions(+), 16 deletions(-) commit 0033e1b523f6d6a60ff7beaaa923cd7656a72959 Author: Rob Clark Date: Tue Oct 17 09:39:53 2017 -0400 drm/msm/mdp5: disable vblanks when crtc is off Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit cae923e6bf2168d1e332977e1de224ee5da1a32c Author: Rob Clark Date: Tue Oct 17 09:39:39 2017 -0400 drm/msm/mdp4: disable vblanks when crtc is off Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 63d51e36b5add80bb2d94e67de3d643854faaf10 Author: Rob Clark Date: Mon Oct 16 17:04:16 2017 -0400 dt-bindings: display: msm: update clk names Now that drm/msm is converted over to use msm_get_clk() everywhere (that matters), which handles falling back to looking for a clock with the "_clk" suffix, we can remove "_clk" from the documentation so that new dts files added do not include "_clk" in the name. Previously we were doing this for the more recently upstreamed bindings but not for (nearly) all. Signed-off-by: Rob Clark Acked-by: Rob Herring .../devicetree/bindings/display/msm/dsi.txt | 36 +++++++++++----------- .../devicetree/bindings/display/msm/edp.txt | 20 ++++++------ .../devicetree/bindings/display/msm/hdmi.txt | 8 ++--- .../devicetree/bindings/display/msm/mdp5.txt | 32 +++++++++---------- 4 files changed, 48 insertions(+), 48 deletions(-) commit aede1e9ee4ec3d7a7b996d260ce7297a6b4dc4ca Author: Rob Clark Date: Mon Oct 16 16:56:28 2017 -0400 drm/msm/hdmi: convert to msm_clk_get() We already have, as a result of upstreaming the gpu bindings, msm_clk_get() which will try to get the clock both without and with a "_clk" suffix. Use this in HDMI code so we can drop the "_clk" suffix in bindings while maintaing backwards compatibility. Signed-off-by: Rob Clark Reviewed-by: Sean Paul drivers/gpu/drm/msm/hdmi/hdmi.c | 10 +++++----- drivers/gpu/drm/msm/hdmi/hdmi_phy.c | 2 +- drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c | 2 +- drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 3 +-- drivers/gpu/drm/msm/hdmi/hdmi_phy_8x74.c | 3 +-- 5 files changed, 9 insertions(+), 11 deletions(-) commit cf52ec24b2c64fab3146991071d410f389a0bc9c Author: Rob Clark Date: Mon Oct 16 16:39:59 2017 -0400 drm/msm/edp: convert to msm_clk_get() We already have, as a result of upstreaming the gpu bindings, msm_clk_get() which will try to get the clock both without and with a "_clk" suffix. Use this in eDP code so we can drop the "_clk" suffix in bindings while maintaing backwards compatibility. Signed-off-by: Rob Clark Reviewed-by: Sean Paul drivers/gpu/drm/msm/edp/edp_ctrl.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit db9a3750eb6fec2381b4090b4f10e56fafe512fe Author: Rob Clark Date: Mon Oct 16 13:35:57 2017 -0400 drm/msm/dsi: convert to msm_clk_get() We already have, as a result of upstreaming the gpu bindings, msm_clk_get() which will try to get the clock both without and with a "_clk" suffix. Use this in DSI code so we can drop the "_clk" suffix in bindings while maintaing backwards compatibility. Signed-off-by: Rob Clark Reviewed-by: Sean Paul drivers/gpu/drm/msm/dsi/dsi_cfg.c | 8 ++++---- drivers/gpu/drm/msm/dsi/dsi_host.c | 30 +++++++++++++++--------------- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) commit e9acce2bb94c1db47fd0463c8d16ba9794111ca5 Author: Rob Clark Date: Mon Oct 16 12:52:48 2017 -0400 drm/msm/mdp5: always print mdp5 version This is useful to see in the log, without requiring drm.debug. Signed-off-by: Rob Clark drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c41ef1b6f7d791f61a09bbabbb4f8fc4736d508 Author: Rob Clark Date: Mon Oct 16 10:46:23 2017 -0400 drm/msm/adreno: deal with linux-firmware fw paths When firmware was added to linux-firmware, it was put in a qcom sub- directory, unlike what we'd been using before. For a300_pfp.fw and a300_pm4.fw symlinks were created, but we'd prefer not to have to do this in the future. So add support to look in both places when loading firmware. Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 23 +++++++++-- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 67 ++++++++++++++++++++++++++++++--- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 21 +++++++++++ 3 files changed, 103 insertions(+), 8 deletions(-) commit e8f3de96a9d36813beba892fec18b05a1e39a122 Author: Rob Clark Date: Mon Oct 16 10:13:15 2017 -0400 drm/msm/adreno: split out helper to load fw Prep work for the next patch. Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 11 +++++----- drivers/gpu/drm/msm/adreno/a5xx_power.c | 3 ++- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 36 ++++++++++++++++++++++----------- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 2 ++ 4 files changed, 34 insertions(+), 18 deletions(-) commit eec874ce5ff1fe1742317513904a2292af749c7d Author: Rob Clark Date: Mon Oct 16 09:22:38 2017 -0400 drm/msm/adreno: load gpu at probe/bind time Previously, in an effort to defer initializing the gpu until firmware was available (ie. rootfs mounted), the gpu was not loaded at when the subdevice was bound. Which resulted that clks/etc were requested in a place that devm couldn't really help unwind if something failed. Instead move request_firmware() to gpu->hw_init() and construct the gpu earlier in adreno_bind(). To avoid the rest of the driver needing to be aware of a gpu that hasn't managed to load firmware and hw_init() yet, stash the gpu ptr in the adreno device's drvdata, and don't set priv->gpu() until hw_init() succeeds. Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 5 +- drivers/gpu/drm/msm/adreno/adreno_device.c | 78 +++++++++++++++--------------- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 45 +++++++++++------ drivers/gpu/drm/msm/msm_drv.c | 10 ---- 4 files changed, 73 insertions(+), 65 deletions(-) commit aacd9e6bdb7f7e66e779ca0316257cce667d3431 Author: Archit Taneja Date: Wed Jun 14 13:36:10 2017 +0530 drm/msm/hdmi: Remove mmagic_iface_clk from the 8x96 PHY clocks This was used as a placeholder. It was never really input to the MDSS/HDMI clocks. Signed-off-by: Archit Taneja Signed-off-by: Rob Clark drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 1 - 1 file changed, 1 deletion(-) commit ad5149c4f65f7cb984ab85b366c6e7b573eaf48f Author: Rob Clark Date: Tue Sep 12 14:23:05 2017 -0400 drm/msm: fix _NO_IMPLICIT fencing case We need to call reservation_object_reserve_shared() in both cases, but this wasn't happening in the _NO_IMPLICIT submit case. Fixes: f0a42bb ("drm/msm: submit support for in-fences") Reported-by: Jordan Crouse Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem.c | 11 ----------- drivers/gpu/drm/msm/msm_gem_submit.c | 24 ++++++++++++++++++------ 2 files changed, 18 insertions(+), 17 deletions(-) commit 3ded0512e96fcd654c45d8245f6d7ea2e435a8c9 Merge: 93222bd fcc0468 Author: Wolfram Sang Date: Sat Oct 28 14:14:46 2017 +0200 Merge tag 'i2c-mux/for-4.15-2' of https://github.com/peda-r/i2c-mux into i2c/for-4.15 This trivial patch managed to fall through the cracks and was forgotten in the first pull request, as noticed by Wolfram. commit 93222bd9b966105f43418fd336654ad10045783a Author: Ed Blake Date: Sat Oct 28 12:44:34 2017 +0100 i2c: img-scb: Add runtime PM The i2c-img-scb driver already dynamically enables / disables clocks to save power, but doesn't use the runtime PM framework. Convert the driver to use runtime PM, so that dynamic clock management will be disabled when runtime PM is disabled, and so that autosuspend can be used to avoid unnecessarily disabling and re-enabling clocks repeatedly during a sequence of transactions. Signed-off-by: Ed Blake Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-img-scb.c | 97 ++++++++++++++++++++++++++++++++-------- 1 file changed, 78 insertions(+), 19 deletions(-) commit 5b52a4c3acf5f4b4854d1c3ddc8be8770330a79c Author: Alexei Starovoitov Date: Fri Oct 27 10:01:39 2017 -0700 tcp: remove unnecessary include two extra #include are not necessary in tcp.h Remove them. Fixes: 40304b2a1567 ("bpf: BPF support for sock_ops") Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller include/net/tcp.h | 3 --- 1 file changed, 3 deletions(-) commit 871da0a761dc967d9bd79c0d4b4cb3828c0281a1 Merge: 267146d c26e91f Author: David S. Miller Date: Sat Oct 28 19:24:39 2017 +0900 Merge branch 'tcp-more-perns-sysctls' Eric Dumazet says: ==================== tcp: move 12 sysctls to namespaces Ideally all TCP sysctls should be per netns. This patch series takes care of 12 sysctls. Remains the ones that need discussion : sysctl_tcp_mem, sysctl_tcp_rmem, sysctl_tcp_wmem, and sysctl_tcp_max_orphans ==================== Signed-off-by: David S. Miller commit c26e91f8b9b8e1fd252e07c1f60e50220cd7ebab Author: Eric Dumazet Date: Fri Oct 27 07:47:32 2017 -0700 tcp: Namespace-ify sysctl_tcp_pacing_ca_ratio Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 2 -- net/ipv4/sysctl_net_ipv4.c | 18 +++++++++--------- net/ipv4/tcp_input.c | 4 +--- net/ipv4/tcp_ipv4.c | 1 + 5 files changed, 12 insertions(+), 14 deletions(-) commit 23a7102a2d1068508fa2a0ce593a0df7f8fdc0ac Author: Eric Dumazet Date: Fri Oct 27 07:47:31 2017 -0700 tcp: Namespace-ify sysctl_tcp_pacing_ss_ratio Also remove an obsolete comment about TCP pacing. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 18 +++++++++--------- net/ipv4/tcp_input.c | 9 +-------- net/ipv4/tcp_ipv4.c | 1 + 5 files changed, 12 insertions(+), 18 deletions(-) commit 4170ba6b589ced82da56c7e4f71cc84b2be036d6 Author: Eric Dumazet Date: Fri Oct 27 07:47:30 2017 -0700 tcp: Namespace-ify sysctl_tcp_invalid_ratelimit Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_input.c | 3 +-- net/ipv4/tcp_ipv4.c | 1 + 5 files changed, 10 insertions(+), 10 deletions(-) commit 790f00e19f65673c3c169dfc137c09a9236847d5 Author: Eric Dumazet Date: Fri Oct 27 07:47:29 2017 -0700 tcp: Namespace-ify sysctl_tcp_autocorking Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 18 +++++++++--------- net/ipv4/tcp.c | 4 +--- net/ipv4/tcp_ipv4.c | 1 + 5 files changed, 12 insertions(+), 13 deletions(-) commit bd239704295c66196e6b77c5717ec4aec076ddd5 Author: Eric Dumazet Date: Fri Oct 27 07:47:28 2017 -0700 tcp: Namespace-ify sysctl_tcp_min_rtt_wlen Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_input.c | 3 +-- net/ipv4/tcp_ipv4.c | 1 + 5 files changed, 10 insertions(+), 10 deletions(-) commit 26e9596e5b8f11025b57b12e7265df649129ab00 Author: Eric Dumazet Date: Fri Oct 27 07:47:27 2017 -0700 tcp: Namespace-ify sysctl_tcp_min_tso_segs Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 18 +++++++++--------- net/ipv4/tcp.c | 2 -- net/ipv4/tcp_ipv4.c | 1 + net/ipv4/tcp_output.c | 3 ++- 6 files changed, 13 insertions(+), 13 deletions(-) commit b530b68148301d73775cd27cc136ce4dd5738ae8 Author: Eric Dumazet Date: Fri Oct 27 07:47:26 2017 -0700 tcp: Namespace-ify sysctl_tcp_challenge_ack_limit Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_input.c | 14 ++++++-------- net/ipv4/tcp_ipv4.c | 2 ++ 5 files changed, 16 insertions(+), 16 deletions(-) commit 9184d8bb448a3d2c2d9f90f1e2f5de625292e769 Author: Eric Dumazet Date: Fri Oct 27 07:47:25 2017 -0700 tcp: Namespace-ify sysctl_tcp_limit_output_bytes Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_ipv4.c | 2 ++ net/ipv4/tcp_output.c | 6 ++---- 5 files changed, 12 insertions(+), 12 deletions(-) commit ceef9ab6be7234f9e49f79769e0da88d1dccfcc7 Author: Eric Dumazet Date: Fri Oct 27 07:47:24 2017 -0700 tcp: Namespace-ify sysctl_tcp_workaround_signed_windows 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 | 2 +- net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_minisocks.c | 2 +- net/ipv4/tcp_output.c | 14 +++++--------- net/ipv6/syncookies.c | 2 +- 7 files changed, 18 insertions(+), 21 deletions(-) commit d06a99045837d3f4d5431793c4c390b0daf2a08d Author: Eric Dumazet Date: Fri Oct 27 07:47:23 2017 -0700 tcp: Namespace-ify sysctl_tcp_tso_win_divisor Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_ipv4.c | 5 +++++ net/ipv4/tcp_output.c | 8 +------- 5 files changed, 14 insertions(+), 15 deletions(-) commit 4540c0cf98b8892a642d2453eec20ae3eb5696fb Author: Eric Dumazet Date: Fri Oct 27 07:47:22 2017 -0700 tcp: Namespace-ify sysctl_tcp_moderate_rcvbuf Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_input.c | 5 ++--- net/ipv4/tcp_ipv4.c | 1 + 5 files changed, 11 insertions(+), 11 deletions(-) commit ec36e416f06f6a8659281053fdc46ce484ad2211 Author: Eric Dumazet Date: Fri Oct 27 07:47:21 2017 -0700 tcp: Namespace-ify sysctl_tcp_nometrics_save Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_metrics.c | 4 +--- 4 files changed, 9 insertions(+), 11 deletions(-) commit 267146d44718771aa0b375e78b33c81d137db09d Author: Kees Cook Date: Thu Oct 26 22:55:42 2017 -0700 drivers/net: smsc: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: "yuval.shaia@oracle.com" Cc: Eric Dumazet Cc: Philippe Reynes Cc: Allen Pais Cc: Tobias Klauser Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/smsc/epic100.c | 10 +++++----- drivers/net/ethernet/smsc/smc91c92_cs.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) commit 8089c6f4777f394407d63e217314f934b85a7947 Author: Kees Cook Date: Thu Oct 26 22:55:34 2017 -0700 drivers/net: packetengines: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Allen Pais Cc: yuan linyu Cc: Philippe Reynes Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/packetengines/hamachi.c | 14 +++++++------- drivers/net/ethernet/packetengines/yellowfin.c | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) commit 15735c9d8a36cadb23ac5e9e29ea083f517767e4 Author: Kees Cook Date: Thu Oct 26 22:55:27 2017 -0700 drivers/net: natsemi: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Allen Pais Cc: Eric Dumazet Cc: Philippe Reynes Cc: Wei Yongjun Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/natsemi/natsemi.c | 10 +++++----- drivers/net/ethernet/natsemi/ns83820.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) commit 0365b047dea70ae931f99594bf8e5976ffec7fae Author: Kees Cook Date: Thu Oct 26 22:55:20 2017 -0700 drivers/net: mellanox: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Saeed Mahameed Cc: Matan Barak Cc: Leon Romanovsky Cc: netdev@vger.kernel.org Cc: linux-rdma@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/health.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 34309b36e4f1ab53fcc696275c1fa2849bc80709 Author: Kees Cook Date: Thu Oct 26 22:55:13 2017 -0700 drivers/net: korina: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Roman Yeryomin Cc: Florian Fainelli Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/korina.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8b3718dc2c3cf3043f474e067c374546ba17c403 Author: Kees Cook Date: Thu Oct 26 22:55:07 2017 -0700 drivers/net: fealnx: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: "yuval.shaia@oracle.com" Cc: Allen Pais Cc: Stephen Hemminger Cc: Philippe Reynes Cc: Johannes Berg Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/fealnx.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 9cb618c295016966b8781a57616b07d8b4d9cb21 Author: Kees Cook Date: Thu Oct 26 22:54:59 2017 -0700 drivers/net: dlink: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Denis Kirjanov Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Denis Kirjanov Signed-off-by: David S. Miller drivers/net/ethernet/dlink/sundance.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0e23daeb640773adf5528e5e08e7cb81fc12775d Author: Kees Cook Date: Thu Oct 26 22:54:53 2017 -0700 drivers/net: chelsio/cxgb*: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Santosh Raspatur Cc: Ganesh Goudar Cc: Casey Leedom Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb3/sge.c | 12 ++++++------ drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 7 +++---- drivers/net/ethernet/chelsio/cxgb4/sge.c | 12 ++++++------ drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 12 ++++++------ 4 files changed, 21 insertions(+), 22 deletions(-) commit 70a42ac1c2487edf06a2dcf06812622ffd825cbc Author: Kees Cook Date: Thu Oct 26 22:54:45 2017 -0700 drivers/net: appletalk/cops: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Allen Pais Cc: "David S. Miller" Cc: David Howells Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/appletalk/cops.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit c6c52ba1514120db3ad2d36391ed37bafcfc43d7 Author: Kees Cook Date: Thu Oct 26 22:54:38 2017 -0700 drivers/net: amd: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Tom Lendacky Cc: "David S. Miller" Cc: Allen Pais Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/amd/a2065.c | 13 ++++++++++--- drivers/net/ethernet/amd/am79c961a.c | 9 +++++---- drivers/net/ethernet/amd/am79c961a.h | 1 + drivers/net/ethernet/amd/declance.c | 10 ++++++---- drivers/net/ethernet/amd/pcnet32.c | 10 +++++----- drivers/net/ethernet/amd/sunlance.c | 8 ++++---- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 14 ++++++-------- 7 files changed, 37 insertions(+), 28 deletions(-) commit c63144e4dda7967f2419fa3c2cc5db1228a7fccf Author: Kees Cook Date: Thu Oct 26 22:54:25 2017 -0700 drivers/net: 8390: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/8390/axnet_cs.c | 10 +++++----- drivers/net/ethernet/8390/pcnet_cs.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) commit 74b6551b9f4106a3e69ab46e60b52a8947dcf60c Author: Gustavo A. R. Silva Date: Thu Oct 26 23:10:35 2017 -0500 ipv6: exthdrs: use swap macro in ipv6_dest_hao make use of the swap macro and remove unnecessary variable tmp_addr. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/ipv6/exthdrs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a830405ee452ddc4101c3c9334e6fedd42c6b357 Author: Bhadram Varka Date: Fri Oct 27 08:22:02 2017 +0530 stmmac: copy unicast mac address to MAC registers Currently stmmac driver not copying the valid ethernet MAC address to MAC registers. This patch takes care of updating the MAC register with MAC address. Signed-off-by: Bhadram Varka Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit a267eaebfcaeb27ad3b83303b6c9f8f739d757aa Author: Pablo Cascón Date: Thu Oct 26 17:35:38 2017 -0700 nfp: inform the VF driver needs to be restarted after changing the MAC Add message to inform the VF MAC was changed and the need to restart the VF driver for the changes to be effective. Signed-off-by: Pablo Cascón Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_sriov.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit aa28667cfbe4ff6f14454dda210b1f2e485f99b5 Author: Felix Manlunas Date: Thu Oct 26 16:46:36 2017 -0700 liquidio: fix kernel panic in VF driver Doing ifconfig down on VF driver in the middle of receiving line rate traffic causes a kernel panic: LiquidIO_VF 0000:02:00.3: should not come here should not get rx when poll mode = 0 for vf BUG: unable to handle kernel NULL pointer dereference at (null) . . . Call Trace: ? tasklet_action+0x102/0x120 __do_softirq+0x91/0x292 irq_exit+0xb6/0xc0 do_IRQ+0x4f/0xd0 common_interrupt+0x93/0x93 RIP: 0010:cpuidle_enter_state+0x142/0x2f0 RSP: 0018:ffffffffa6403e20 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff59 RAX: 0000000000000000 RBX: 0000000000000003 RCX: 000000000000001f RDX: 0000000000000000 RSI: 000000002ab7519f RDI: 0000000000000000 RBP: ffffffffa6403e58 R08: 0000000000000084 R09: 0000000000000018 R10: ffffffffa6403df0 R11: 00000000000003c7 R12: 0000000000000003 R13: ffffd27ebd806800 R14: ffffffffa64d40d8 R15: 0000007be072823f cpuidle_enter+0x17/0x20 call_cpuidle+0x23/0x40 do_idle+0x18c/0x1f0 cpu_startup_entry+0x64/0x70 rest_init+0xa5/0xb0 start_kernel+0x45e/0x46b x86_64_start_reservations+0x24/0x26 x86_64_start_kernel+0x6f/0x72 secondary_startup_64+0xa5/0xa5 Code: Bad RIP value. RIP: (null) RSP: ffff9246ed003f28 CR2: 0000000000000000 ---[ end trace 92731e80f31b7d7d ]--- Kernel panic - not syncing: Fatal exception in interrupt Kernel Offset: 0x24000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) ---[ end Kernel panic - not syncing: Fatal exception in interrupt Reason is: in the function assigned to net_device_ops->ndo_stop, the steps for bringing down the interface are done in the wrong order. The step that notifies the NIC firmware to stop forwarding packets to host is done too late. Fix it by moving that step to the beginning. Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 57ab1ca215971702df534ae93cd76c15ca084c77 Author: Vivien Didelot Date: Thu Oct 26 10:50:07 2017 -0400 net: dsa: move fixed link registration helpers The new bindings (dsa2.c) and the old bindings (legacy.c) share two helpers dsa_cpu_dsa_setup and dsa_cpu_dsa_destroy, used to register or deregister a fixed PHY if a given port has a corresponding device node. Unclutter the code by moving them into two new port.c helpers, dsa_port_fixed_link_register_of and dsa_port_fixed_link_(un)register_of. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa.c | 39 --------------------------------------- net/dsa/dsa2.c | 8 ++++---- net/dsa/dsa_priv.h | 5 +++-- net/dsa/legacy.c | 4 ++-- net/dsa/port.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 56 insertions(+), 47 deletions(-) commit 952c5719aac6587f1e0add97dca79f9e73887f9b Author: Michael Chan Date: Sat Oct 28 01:56:10 2017 -0400 bnxt_en: Fix randconfig build errors. Fix undefined symbols when CONFIG_VLAN_8021Q or CONFIG_INET is not set. Fixes: 8c95f773b4a3 ("bnxt_en: add support for Flower based vxlan encap/decap offload") Reported-by: Jakub Kicinski Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 48e876a20e79566f1736413d4f42dc66f3ab2f16 Author: Andres Rodriguez Date: Fri Oct 27 19:35:34 2017 -0400 drm/amdkfd: use a high priority workqueue for IH work In systems under heavy load the IH work may experience significant scheduling delays. Under load + system workqueue: Max Latency: 7.023695 ms Avg Latency: 0.263994 ms Under load + high priority workqueue: Max Latency: 1.162568 ms Avg Latency: 0.163213 ms Further work is required to measure the impact of per-cpu settings on IH performance. Signed-off-by: Andres Rodriguez Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_device.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 3 ++- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) commit 0f875e3f3e422d28bb80757269837def75009778 Author: Andres Rodriguez Date: Fri Oct 27 19:35:33 2017 -0400 drm/amdkfd: wait only for IH work on IH exit We don't need to wait for all work to complete in the IH exit function. We only need to make sure the interrupt_work has finished executing to guarantee that ih_kfifo is no longer in use. Signed-off-by: Andres Rodriguez Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 27232055b12902073f3dbc17cdfa2def27f70d85 Author: Andres Rodriguez Date: Fri Oct 27 19:35:32 2017 -0400 drm/amdkfd: increase IH num entries to 8192 A larger buffer will let us accommodate applications with a large amount of semi-simultaneous event signals. Signed-off-by: Andres Rodriguez Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04ad47bd14a0f7a268124c4fc468e964e457a702 Author: Andres Rodriguez Date: Fri Oct 27 19:35:31 2017 -0400 drm/amdkfd: use standard kernel kfifo for IH Replace our implementation of a lockless ring buffer with the standard linux kernel kfifo. We shouldn't maintain our own version of a standard data structure. Signed-off-by: Andres Rodriguez Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 78 ++++++++++-------------------- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 6 +-- 2 files changed, 27 insertions(+), 57 deletions(-) commit 7e86a365a8319970e002f83c73701a86d95a69e6 Author: Oded Gabbay Date: Fri Oct 27 19:35:30 2017 -0400 drm/amdkfd: increase limit of signal events to 4096 per process Signed-off-by: Oded Gabbay Reviewed-by: Ben Goz Signed-off-by: Felix Kuehling include/uapi/linux/kfd_ioctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9a5d0a5db802277c93667c6af93e699bb8c773e Author: Felix Kuehling Date: Fri Oct 27 19:35:29 2017 -0400 drm/amdkfd: Make event limit dependent on user mode mapping size This allows increasing the KFD_SIGNAL_EVENT_LIMIT in kfd_ioctl.h without breaking processes built with older kfd_ioctl.h versions. Signed-off-by: Felix Kuehling Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_events.c | 25 +++++++++++++++++++------ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 + 2 files changed, 20 insertions(+), 6 deletions(-) commit 3f04f9614831b4d18dcaf228cff0617a20073f9d Author: Felix Kuehling Date: Fri Oct 27 19:35:28 2017 -0400 drm/amdkfd: Use IH context ID for signal lookup This speeds up signal lookup when the IH ring entry includes a valid context ID or partial context ID. Only if the context ID is found to be invalid, fall back to an exhaustive search of all signaled events. Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c | 7 ++- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 73 +++++++++++++++++++----- 2 files changed, 64 insertions(+), 16 deletions(-) commit 482f07775cf559c82cb3d086e3c4fad91582e4cb Author: Felix Kuehling Date: Fri Oct 27 19:35:27 2017 -0400 drm/amdkfd: Simplify event ID and signal slot management Signal slots are identical to event IDs. Replace the used_slot_bitmap and events hash table with an IDR to allocate and lookup event IDs and signal slots more efficiently. Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_events.c | 230 ++++++++++---------------------- drivers/gpu/drm/amd/amdkfd/kfd_events.h | 14 +- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 6 +- 3 files changed, 80 insertions(+), 170 deletions(-) commit 50cb7dd94cb43a6204813376e1be1d21780b71fb Author: Felix Kuehling Date: Fri Oct 27 19:35:26 2017 -0400 drm/amdkfd: Simplify events page allocator The first event page is always big enough to handle all events. Handling of multiple events pages is not supported by user mode, and not necessary. Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_events.c | 197 +++++++++++--------------------- drivers/gpu/drm/amd/amdkfd/kfd_events.h | 1 - drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 4 +- 3 files changed, 70 insertions(+), 132 deletions(-) commit 74e4071665da243e0ff1b7a0e1b8ac7d89cdb3ca Author: Felix Kuehling Date: Fri Oct 27 19:35:25 2017 -0400 drm/amdkfd: Use wait_queue_t to implement event waiting Use standard wait queues for waiting and waking up waiting threads instead of inventing our own. We still have our own wait loop because the HSA event semantics require the ability to have one thread waiting on multiple wait queues (events) at the same time. Signed-off-by: Kent Russell Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_events.c | 59 ++++++++++++--------------------- drivers/gpu/drm/amd/amdkfd/kfd_events.h | 3 +- 2 files changed, 24 insertions(+), 38 deletions(-) commit ebf947fe93dd3627774f6bb4daa57b4e2897929d Author: Felix Kuehling Date: Fri Oct 27 19:35:24 2017 -0400 drm/amdkfd: remove redundant kfd_event_waiter.input_index This always identical with the index of the event_waiter in the array. No need to store it in the waiter record. Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_events.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit fe528c13acc764965929b7fcb5fadf2c15b57373 Author: Felix Kuehling Date: Fri Oct 27 19:35:23 2017 -0400 drm/amdkfd: Fix event destruction with pending waiters When an event with pending waiters is destroyed, those waiters may end up sleeping forever unless they are notified and woken up. Implement the notification by clearing the waiter->event pointer, which becomes invalid anyway, when the event is freed, and waking up the waiting tasks. Waiters on an event that's destroyed return failure. Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_events.c | 72 +++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 26 deletions(-) commit fdf0c8332a0309ac619e22e82b6014c77b2a3518 Author: Felix Kuehling Date: Fri Oct 27 19:35:22 2017 -0400 drm/amdkfd: Clean up kfd_wait_on_events Cleaned up the code while resolving some potential bugs and inconsistencies in the process. Clean-ups: * Remove enum kfd_event_wait_result, which duplicates KFD_IOC_EVENT_RESULT definitions * alloc_event_waiters can be called without holding p->event_mutex * Return an error code from copy_signaled_event_data instead of bool * Clean up error handling code paths to minimize duplication in kfd_wait_on_events Fixes: * Consistently return an error code from kfd_wait_on_events and set wait_result to KFD_IOC_WAIT_RESULT_FAIL in all failure cases. * Always call free_waiters while holding p->event_mutex * copy_signaled_event_data might sleep. Don't call it while the task state is TASK_INTERRUPTIBLE. Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 5 +-- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 71 ++++++++++++++------------------ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 8 +--- 3 files changed, 32 insertions(+), 52 deletions(-) commit d9aeec4cbb58599008e6dd4cc23f5bfbdbd0f4ff Author: Sean Keely Date: Fri Oct 27 19:35:21 2017 -0400 drm/amdkfd: Fix scheduler race in kfd_wait_on_events sleep loop Signed-off-by: Sean Keely Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_events.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 1f9d09becb9aa6ddc67a44391f05cb96bfab80df Author: Sean Keely Date: Fri Oct 27 19:35:20 2017 -0400 drm/amdkfd: Short cut for kfd_wait_on_events without waiting If kfd_wait_on_events can return immediately, we don't need to populate the wait list and don't need to enter the sleep-loop. Signed-off-by: Sean Keely Signed-off-by: Felix Kuehling Acked-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_events.c | 43 ++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 4 deletions(-) commit 9b56bb115460cee92a80bf85232b4b7da2f080e6 Author: Felix Kuehling Date: Fri Oct 27 19:35:19 2017 -0400 drm/amdkfd: Don't dereference kfd_process.mm The kfd_process doesn't own a reference to the mm_struct, so it can disappear without warning even while the kfd_process still exists. Therefore, avoid dereferencing the kfd_process.mm pointer and make it opaque. Use get_task_mm to get a temporary reference to the mm when it's needed. v2: removed unnecessary WARN_ON Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_events.c | 19 +++++++++++++++---- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 7 ++++++- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 1 - 3 files changed, 21 insertions(+), 6 deletions(-) commit 66b783b4465de05ce6b370b1ae97e95b0fc14a34 Author: Besar Wicaksono Date: Fri Oct 27 19:35:18 2017 -0400 drm/amdkfd: Add SDMA trap src id to the KFD isr wanted list This enables SDMA signalling with event interrupt. Signed-off-by: Besar Wicaksono Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c | 3 +++ drivers/gpu/drm/amd/amdkfd/cik_int.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 11772c9c185735e244731e23b1983d5c7ab03c80 Author: Colin Ian King Date: Fri Oct 27 15:29:24 2017 -0700 Input: mxs-lradc - remove redundant assignment to pointer input The pointer 'input' is being initialized with ts->ts_input and this value is not being read as it is updated a few lines later with the return value from the call to devm_input_allocate_device. Remove the redundant initialization assignment. Cleans up clang warning: drivers/input/touchscreen/mxs-lradc-ts.c:587:20: warning: Value Xi stored to 'input' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/mxs-lradc-ts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcc046801b934ad27ba80e20e3e0f4c97957af58 Author: Geert Uytterhoeven Date: Thu Sep 21 14:52:29 2017 +0200 dt-bindings: i2c: i2c-mux: spelling s/required is/required if/ Fix both instances. Signed-off-by: Geert Uytterhoeven Signed-off-by: Peter Rosin Documentation/devicetree/bindings/i2c/i2c-mux.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 750bd8b990856ec89a3af5836c7915ea6e2dd712 Author: Julia Lawall Date: Fri Aug 5 10:56:44 2016 +0200 i2c: mpc: use of_property_read_bool Use of_property_read_bool to check for the existence of a property. Signed-off-by: Julia Lawall Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-mpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b73b6e8094523d8440a48a15feb7684141e4b140 Author: Eric Huang Date: Fri Oct 27 15:24:38 2017 -0400 drm/amd/powerplay: change ASIC temperature reading on Vega10 ASIC temperature reading from HOTSPOT to ASIC edge which makes things consistent with previous asics. Signed-off-by: Eric Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d982d66514192cdbe74eababa63d0a69be4b0ce1 Author: Chris Brandt Date: Fri Oct 27 10:37:56 2017 -0500 i2c: riic: remove clock and frequency restrictions Remove the restriction that the parent clock has to be a specific frequency and also allow any speed to be supported. Signed-off-by: Chris Brandt Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-riic.c | 115 +++++++++++++++++++++++++++++------------- 1 file changed, 81 insertions(+), 34 deletions(-) commit 163ca80013aafb6dc9cb295de3db7aeab9ab43f8 Author: Osama Khan Date: Sat Oct 21 10:42:21 2017 +0000 platform/x86: hp_accel: Add quirk for HP ProBook 440 G4 Added support for HP ProBook 440 G4 laptops by including the accelerometer orientation quirk for that device. Testing was performed based on the axis orientation guidelines here: https://www.kernel.org/doc/Documentation/misc-devices/lis3lv02d which states "If the left side is elevated, X increases (becomes positive)". When tested, on lifting the left edge, x values became increasingly negative thus indicating an inverted x-axis on the installed lis3lv02d chip. This was compensated by adding an entry for this device in hp_accel.c specifying the quirk as x_inverted. The patch was tested on a ProBook 440 G4 device and x-axis as well as y and z-axis values are now generated as per spec. Signed-off-by: Osama Khan Signed-off-by: Andy Shevchenko drivers/platform/x86/hp_accel.c | 1 + 1 file changed, 1 insertion(+) commit 5520437bebf7c65507a12bb111eba79f35efba1d Author: Srinivas Pandruvada Date: Sat Oct 21 09:52:00 2017 -0700 platform/x86: intel_turbo_max_3: Add Skylake platform Ev Kontsevoy reported that he can't see the presence of "/proc/sys/kernel/sched_itmt_enabled" on i9-7900x with Asrock x299 Taichi system even if he enabled "Turbo 3.0" in the BIOS. The problem is that even if one core max is 200MHz more than others, the current implementation couldn't enumerate that with the way the system is configured. The system by default configured for legacy mode (no HWP or speed shift technology), in this mode only way we can enumerate via the mail box interface as implemented in this driver. We were planing to only use this driver for Broadwell, but we need to extend this because some Skylake system has same issue as Braodwell systems. On this system BIOS allows to change to HWP mode, where we expect that we can enumerate favored core with ACPI-CPPC. But on this system the core priority is 0xff for all cores in CPPC object. So this is not an option. Hence this change allows Skylake systems to be enumerate favored core similar to Broadwell in legacy mode. Reported-and-tested-by: Ev Kontsevoy Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_turbo_max_3.c | 1 + 1 file changed, 1 insertion(+) commit 7bef1af3b9c2a5690a41298b5986dbde82fbedbc Author: Shirish S Date: Fri Oct 27 03:25:55 2017 +0000 drm/amd/display: check if modeset is required before adding plane Adding affected planes without checking if modeset is requested from the user space causes performance regression in video p/b scenarios when full screen p/b is not composited. Hence add a check before adding a plane as affected. bug: https://bugs.freedesktop.org/show_bug.cgi?id=103408 Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Shirish S Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+) commit 56087b31f4b2861c773185ec45d313b55dbbb69d Author: Shirish S Date: Thu Oct 26 16:15:01 2017 +0530 drm/amd/display: fix high part address in dm_plane_helper_prepare_fb() The high part calculation of luma and chroma address' was missing in dm_plane_helper_prepare_fb(). This fix brings uniformity in the address' at atomic_check and atomic_commit for both RGB & YUV planes. Signed-off-by: Shirish S Reviewed-by: Michel Dänzer Reviewed-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 4d3e00dad80a2c317d542358620facd8ca698428 Author: Shirish S Date: Thu Oct 19 22:34:15 2017 +0530 drm/amd/display : add high part address calculation for underlay Currently the high part of the address structure is not populated in case of luma and chroma. This patch adds this calculation. Signed-off-by: Shirish S Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 3b21b6d239f43c0d797bf0deb8c0f8c846862eb1 Author: Jerry Zuo Date: Tue Oct 17 15:36:13 2017 -0400 drm/amd/display: Fix no display on Fiji Allocate memory for the second pipe allocate_mem_input() needs to be done prior to program pipe front end. It shows sensitive to Fiji. Failure to do so will cause error in allocate memory  allocate_mem_input() on the second connected display. Signed-off-by: Jerry Zuo Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 9a68db7220d05fb28de139a7db93bd6866cc86fa Author: Rex Zhu Date: Thu Oct 26 00:03:27 2017 -0400 Revert "drm/amd/display: Match actual state during S3 resume." This reverts commit 4f346e655d24140fb40b46f814506ba17ac34ea1. fix s3 hang issue. Acked-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 33 ----------------------- 1 file changed, 33 deletions(-) commit 05f9d3e1ae6eaf7507e3bd95b0eef2acd4b84ea8 Author: Andre Guedes Date: Mon Oct 16 18:01:28 2017 -0700 igb: Add support for CBS offload This patch adds support for Credit-Based Shaper (CBS) qdisc offload from Traffic Control system. This support enable us to leverage the Forwarding and Queuing for Time-Sensitive Streams (FQTSS) features from Intel i210 Ethernet Controller. FQTSS is the former 802.1Qav standard which was merged into 802.1Q in 2014. It enables traffic prioritization and bandwidth reservation via the Credit-Based Shaper which is implemented in hardware by i210 controller. The patch introduces the igb_setup_tc() function which implements the support for CBS qdisc hardware offload in the IGB driver. CBS offload is the only traffic control offload supported by the driver at the moment. FQTSS transmission mode from i210 controller is automatically enabled by the IGB driver when the CBS is enabled for the first hardware queue. Likewise, FQTSS mode is automatically disabled when CBS is disabled for the last hardware queue. Changing FQTSS mode requires NIC reset. FQTSS feature is supported by i210 controller only. Signed-off-by: Andre Guedes Tested-by: Aaron Brown Tested-by: Henrik Austad Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/e1000_defines.h | 23 ++ drivers/net/ethernet/intel/igb/e1000_regs.h | 8 + drivers/net/ethernet/intel/igb/igb.h | 6 + drivers/net/ethernet/intel/igb/igb_main.c | 347 +++++++++++++++++++++++++ 4 files changed, 384 insertions(+) commit 3d0bd028ffb4a4915cb64cfa0d2cee1578cc0321 Author: Vinicius Costa Gomes Date: Mon Oct 16 18:01:27 2017 -0700 net/sched: Add support for HW offloading for CBS This adds support for offloading the CBS algorithm to the controller, if supported. Drivers wanting to support CBS offload must implement the .ndo_setup_tc callback and handle the TC_SETUP_CBS (introduced here) type. Signed-off-by: Vinicius Costa Gomes Tested-by: Henrik Austad Signed-off-by: Jeff Kirsher include/linux/netdevice.h | 1 + include/net/pkt_sched.h | 9 ++++ net/sched/sch_cbs.c | 104 ++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 102 insertions(+), 12 deletions(-) commit 585d763af09cc21daf48ecc873604ccdb70f6014 Author: Vinicius Costa Gomes Date: Mon Oct 16 18:01:26 2017 -0700 net/sched: Introduce Credit Based Shaper (CBS) qdisc This queueing discipline implements the shaper algorithm defined by the 802.1Q-2014 Section 8.6.8.2 and detailed in Annex L. It's primary usage is to apply some bandwidth reservation to user defined traffic classes, which are mapped to different queues via the mqprio qdisc. Only a simple software implementation is added for now. Signed-off-by: Vinicius Costa Gomes Signed-off-by: Jesus Sanchez-Palencia Tested-by: Henrik Austad Signed-off-by: Jeff Kirsher include/uapi/linux/pkt_sched.h | 19 +++ net/sched/Kconfig | 11 ++ net/sched/Makefile | 1 + net/sched/sch_cbs.c | 293 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 324 insertions(+) commit 0f7787b4133fb26b6dc0779e4867408e07711d8e Author: Jesus Sanchez-Palencia Date: Mon Oct 16 18:01:25 2017 -0700 net/sched: Add select_queue() class_ops for mqprio When replacing a child qdisc from mqprio, tc_modify_qdisc() must fetch the netdev_queue pointer that the current child qdisc is associated with before creating the new qdisc. Currently, when using mqprio as root qdisc, the kernel will end up getting the queue #0 pointer from the mqprio (root qdisc), which leaves any new child qdisc with a possibly wrong netdev_queue pointer. Implementing the Qdisc_class_ops select_queue() on mqprio fixes this issue and avoid an inconsistent state when child qdiscs are replaced. Signed-off-by: Jesus Sanchez-Palencia Tested-by: Henrik Austad Signed-off-by: Jeff Kirsher net/sched/sch_mqprio.c | 7 +++++++ 1 file changed, 7 insertions(+) commit ce8a75f60b75831947569229616cf1bc94f2d965 Author: Jesus Sanchez-Palencia Date: Mon Oct 16 18:01:24 2017 -0700 net/sched: Change behavior of mq select_queue() Currently, the class_ops select_queue() implementation on sch_mq returns a pointer to netdev_queue #0 when it receives and invalid qdisc id. That can be misleading since all of mq's inner qdiscs are attached to a valid netdev_queue. Here we fix that by returning NULL when a qdisc id is invalid. This is aligned with how select_queue() is implemented for sch_mqprio in the next patch on this series, keeping a consistent behavior between these two qdiscs. Signed-off-by: Jesus Sanchez-Palencia Tested-by: Henrik Austad Signed-off-by: Jeff Kirsher net/sched/sch_mq.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 26aa0459fad28725aa0bc12a3615cc9a0bd7118f Author: Jesus Sanchez-Palencia Date: Mon Oct 16 18:01:23 2017 -0700 net/sched: Check for null dev_queue on create flow In qdisc_alloc() the dev_queue pointer was used without any checks being performed. If qdisc_create() gets a null dev_queue pointer, it just passes it along to qdisc_alloc(), leading to a crash. That happens if a root qdisc implements select_queue() and returns a null dev_queue pointer for an "invalid handle", for example, or if the dev_queue associated with the parent qdisc is null. This patch is in preparation for the next in this series, where select_queue() is being added to mqprio and as it may return a null dev_queue. Signed-off-by: Jesus Sanchez-Palencia Tested-by: Henrik Austad Signed-off-by: Jeff Kirsher net/sched/sch_generic.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 4eadcf9a417a4689e596e3c2a99857c2e3603049 Author: Brian Foster Date: Fri Oct 27 09:20:28 2017 -0700 xfs: fix unused variable warning in xfs_buf_set_ref() Fix an unused variable warning on non-DEBUG builds introduced by commit 7561d27e90 ("xfs: buffer lru reference count error injection tag"). Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2fdbec5cbeb93349836d682b1caa5cc72d1b7018 Author: Darrick J. Wong Date: Wed Oct 25 15:03:46 2017 -0700 xfs: compare btree block keys to parent block's keys during scrub When we're done checking all the records/keys in a btree block, compute the low and high key of the block and compare them to the associated key in the parent btree block. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_btree.c | 4 ++-- fs/xfs/libxfs/xfs_btree.h | 4 ++++ fs/xfs/scrub/btree.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) commit 8210f4dda2d7642cb7c882db55e53d899cced401 Author: Darrick J. Wong Date: Wed Oct 25 16:59:43 2017 -0700 xfs: abort dir/attr btree operation if btree is obviously weird Abort an dir/attr btree operation if the attr btree has obvious problems like loops back to the root or pointers don't point down the tree. Found by fuzzing btree[0].before to zero in xfs/402, which livelocks on the cycle in the attr btree. Apply the same checks to xfs_da3_node_lookup_int. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/libxfs/xfs_da_btree.c | 22 +++++++++++++++++++++- fs/xfs/xfs_attr_list.c | 20 ++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) commit bdaac93f80b84aad2dd9316a3ffb6626b86c13e0 Author: Darrick J. Wong Date: Wed Oct 25 16:59:42 2017 -0700 xfs: refactor extended attribute list operation When we're iterating the attribute list and we can't find our previous location based off the attribute cursor, we'll instead walk down the attribute btree from the root trying to find where we left off. Move this code into a separate function for later cleanups. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_attr_list.c | 130 +++++++++++++++++++++++++++++-------------------- 1 file changed, 78 insertions(+), 52 deletions(-) commit 026930bc06e95b93c3200036ab3b44b783dc6f9d Author: Andy Shevchenko Date: Fri Oct 27 17:30:16 2017 +0300 platform/x86: intel_telemetry: Remove useless default in Kconfig 'default n' is a default behaviour of Kconfig options. So, remove explicit line from Kconfig. Signed-off-by: Andy Shevchenko drivers/platform/x86/Kconfig | 1 - 1 file changed, 1 deletion(-) commit cfab22c01258389578358eb93cb8e973307df6f2 Author: Andy Shevchenko Date: Fri Oct 27 17:25:50 2017 +0300 platform/x86: intel_telemetry: Add needed inclusion linux/io.h defines readq() and ioremap_nocache() / iounmap() functions. If not included, the build fails: intel_telemetry_pltdrv.c:1165:31: warning: assignment makes pointer from integer without a cast [-Wint-conversion] intel_telemetry_pltdrv.c:1165:33: error: implicit declaration of function 'ioremap_nocache' [-Werror=implicit-function-declaration] intel_telemetry_pltdrv.c:1202:3: error: implicit declaration of function 'iounmap' [-Werror=implicit-function-declaration] intel_telemetry_pltdrv.c:900:20: error: implicit declaration of function 'readq' [-Werror=implicit-function-declaration] Fix this by including linux/io.h. Reported-by: kbuild test robot Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_telemetry_pltdrv.c | 2 ++ 1 file changed, 2 insertions(+) commit c62cf662a2cbaa1f5ad2a5e1998b4662ed15a316 Author: Younian Wang Date: Thu Oct 19 21:43:30 2017 +0200 media: rc/keymaps: add support for RC of hisilicon poplar board This is a NEC protocol type remote controller distributed with 96boards poplar@tocoding board. Signed-off-by: Younian Wang Signed-off-by: Jiancheng Xue Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-hisi-poplar.c | 69 +++++++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 71 insertions(+) commit ce5aa6d205576904552b98e4e6ca88d8d285849f Author: Younian Wang Date: Thu Oct 19 21:43:29 2017 +0200 media: rc/keymaps: add support for RC of hisilicon TV demo boards This is a NEC protocol type remote controller distributed with hisilicon TV demo boards. Signed-off-by: Younian Wang Signed-off-by: Jiancheng Xue Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-hisi-tv-demo.c | 81 ++++++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 83 insertions(+) commit 7dc31b82dd5da5eb596f9091b67326742135732c Author: Kees Cook Date: Tue Oct 17 01:10:36 2017 +0200 media: serial_ir: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Mauro Carvalho Chehab Signed-off-by: Kees Cook Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/serial_ir.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 58fd55e838276a0c13d1dc7c387f90f25063cbf3 Author: Arvind Yadav Date: Mon Oct 9 20:14:48 2017 +0200 media: imon: Fix null-ptr-deref in imon_probe It seems that the return value of usb_ifnum_to_if() can be NULL and needs to be checked. Signed-off-by: Arvind Yadav Tested-by: Andrey Konovalov Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/imon.c | 5 +++++ 1 file changed, 5 insertions(+) commit c859e21a35ce5604dde0b618169680aa3c7e3bdb Author: Intiyaz Basha Date: Thu Oct 26 16:18:20 2017 -0700 liquidio: xmit_more support Defer ringing the Tx doorbell if skb->xmit_more is set unless the Tx queue is full or stopped. To keep latency low, use a deferral limit of 8 packets. We chose 8 because Octeon can fetch at most 8 packets in a single PCI read, and our tests show that 8 results in low latency. Signed-off-by: Intiyaz Basha Signed-off-by: Satanand Burla Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_core.c | 6 ++++-- drivers/net/ethernet/cavium/liquidio/lio_main.c | 18 ++++++++++++------ drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 17 ++++++++++++----- drivers/net/ethernet/cavium/liquidio/octeon_config.h | 2 ++ drivers/net/ethernet/cavium/liquidio/octeon_iq.h | 3 +++ drivers/net/ethernet/cavium/liquidio/octeon_main.h | 2 +- drivers/net/ethernet/cavium/liquidio/octeon_nic.c | 5 +++-- drivers/net/ethernet/cavium/liquidio/octeon_nic.h | 3 ++- drivers/net/ethernet/cavium/liquidio/request_manager.c | 18 ++++++++++++++++-- 9 files changed, 55 insertions(+), 19 deletions(-) commit bbae615636155fa43a9b0fe0ea31c678984be864 Author: Aishwarya Pant Date: Tue Oct 17 15:14:09 2017 +0200 media: staging: atomisp2: cleanup null check on memory allocation For memory allocation functions that fail with a NULL return value, it is preferred to use the (!x) test in place of (x == NULL). Changes in atomisp2/css2400/sh_css.c were done by hand. Done with the help of the following cocci script: @@ type T; T* p; statement s,s1; @@ p = \(devm_kzalloc\|devm_ioremap\|usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\| kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...) ...when != p if ( - p == NULL + !p ) s else s1 -- Changes in v3: Rebase changes over atomisp-next branch of the media tree Changes in atomisp2/css2400/sh_css.c were done by hand, the above script was not able to match the pattern if (a->b != null). Signed-off-by: Aishwarya Pant Acked-by: Julia Lawall Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 36 +++++++++++----------- .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 7 ++--- .../pci/atomisp2/css2400/sh_css_param_shading.c | 2 +- 3 files changed, 22 insertions(+), 23 deletions(-) commit d7b1d22d3821ecc946848f5db3e7c728696d9722 Author: Will Deacon Date: Thu Oct 19 13:27:11 2017 +0100 arm64: uapi: Remove PSR_Q_BIT PSTATE.Q only exists for AArch32, which can be referred to using COMPAT_PSR_Q_BIT. Remove PSR_Q_BIT, since the native bit doesn't exist in the architecture Tested-by: Laura Abbott Signed-off-by: Will Deacon arch/arm64/include/uapi/asm/ptrace.h | 1 - 1 file changed, 1 deletion(-) commit b7300d4c035cc98c7f5c40e2c4e53f58c16617ea Author: Will Deacon Date: Thu Oct 19 13:26:26 2017 +0100 arm64: traps: Pretty-print pstate in register dumps We can decode the PSTATE easily enough, so pretty-print it in register dumps. Tested-by: Laura Abbott Signed-off-by: Will Deacon arch/arm64/kernel/process.c | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) commit a25ffd3a6302a67814280274d8f1aa4ae2ea4b59 Author: Will Deacon Date: Thu Oct 19 13:19:20 2017 +0100 arm64: traps: Don't print stack or raw PC/LR values in backtraces Printing raw pointer values in backtraces has potential security implications and are of questionable value anyway. This patch follows x86's lead and removes the "Exception stack:" dump from kernel backtraces, as well as converting PC/LR values to symbols such as "sysrq_handle_crash+0x20/0x30". Tested-by: Laura Abbott Signed-off-by: Will Deacon arch/arm64/kernel/process.c | 8 +++--- arch/arm64/kernel/traps.c | 65 +++------------------------------------------ 2 files changed, 6 insertions(+), 67 deletions(-) commit 42dbf54e88906ffb8ee992c14e45dd36483f5011 Author: Mark Rutland Date: Thu Oct 19 11:19:55 2017 +0100 arm64: consistently log ESR and page table When we take a fault we can't handle, we try to dump some relevant information, but we're not consistent about doing so. In do_mem_abort(), we log the full ESR, but don't dump a page table walk. In __do_kernel_fault, we dump an attempted decoding of the ESR (but not the ESR itself) along with a page table walk. Let's try to make things more consistent by dumping the full ESR in mem_abort_decode(), and having do_mem_abort dump a page table walk. The existing dump of the ESR in do_mem_abort() is rendered redundant, and removed. Tested-by: Laura Abbott Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Julien Thierry Cc: Kristina Martsenko Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit bc4747514a442b8ca50259a013072ab4f0ce91f3 Merge: c9d0dc4 2a1bf51 Author: David S. Miller Date: Sat Oct 28 00:23:59 2017 +0900 Merge branch 'ibmvnic-Tunable-parameter-support' John Allen says: ==================== ibmvnic: Tunable parameter support This series implements support for changing tunable parameters such as the mtu, number of tx/rx queues, and number of buffers per queue via ethtool and ifconfig. v2: -Fix conflict with Tom's recently applied TSO/SG patches v3: -Initialize rc in __ibmvnic_reset fixing build warning -Fix buggy behavior with pending mac changes. Use boolean flag to track if mac change is needed on open rather than relying on the desired->mac pointer. -Directly include tunable structs in the adapter struct rather than keeping pointers, eliminating the need to directly allocate them. ==================== Signed-off-by: David S. Miller commit 2a1bf51111975846f412f47449edefdf6fa17ee4 Author: John Allen Date: Thu Oct 26 16:24:15 2017 -0500 ibmvnic: Fix failover error path for non-fatal resets For all non-fatal reset conditions, the hypervisor will send a failover when we attempt to initialize the crq and the vnic client is expected to handle that failover instead of the existing non-fatal reset. To handle this, we need to return from init with a return code that indicates that we have hit this case. Signed-off-by: John Allen Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 4 ++-- drivers/net/ethernet/ibm/ibmvnic.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit c26eba03e4073bd32ef6c0ea2ba2a3ff5eed11da Author: John Allen Date: Thu Oct 26 16:23:25 2017 -0500 ibmvnic: Update reset infrastructure to support tunable parameters Update ibmvnic reset infrastructure to include a new reset option that will allow changing of tunable parameters. There currently is no way to request different capabilities from the vnic server on the fly so this patch achieves this by resetting the driver and attempting to log in with the requested changes. If the reset operation fails, the old values of the tunable parameters are stored in the "fallback" struct and we attempt to login with the fallback values. Signed-off-by: John Allen Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 213 ++++++++++++++++++++++++++++++++----- drivers/net/ethernet/ibm/ibmvnic.h | 24 ++++- 2 files changed, 209 insertions(+), 28 deletions(-) commit c9d0dc4b119ee9cab57977924f8d9aeb2bd48eb9 Merge: cc49c8f ca32fb0 Author: David S. Miller Date: Sat Oct 28 00:10:24 2017 +0900 Merge branch 'qualcomm-rmnet-Add-64-bit-stats-and-GRO' Subash Abhinov Kasiviswanathan says: ==================== net: qualcomm: rmnet: Add 64 bit stats and GRO This series adds support for 64 bit per cpu stats and GRO Patches 1-2 are cleanups of return code and a redundant condition Patch 3 adds support for 64 bit per cpu stats Patch 4 adds support for GRO using GRO cells v1->v2: Since gro_cells_init() could potentially fail, move it from device setup to ndo_init() as mentioned by Eric. ==================== Signed-off-by: David S. Miller commit ca32fb034c19e00cfb5e0fd7217eb92f81302048 Author: Subash Abhinov Kasiviswanathan Date: Thu Oct 26 11:06:49 2017 -0600 net: qualcomm: rmnet: Add support for GRO Add gro_cells so that rmnet devices can call gro_cells_receive instead of netif_receive_skb. Signed-off-by: Subash Abhinov Kasiviswanathan Cc: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/Kconfig | 1 + drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 2 ++ drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 4 +++- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 8 ++++++++ 4 files changed, 14 insertions(+), 1 deletion(-) commit 192c4b5d48f2ae25a4ce323b4cb8b024fac3efd2 Author: Subash Abhinov Kasiviswanathan Date: Thu Oct 26 11:06:48 2017 -0600 net: qualcomm: rmnet: Add support for 64 bit stats Implement 64 bit per cpu stats. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 14 ++++ drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 76 ++++++++++++++++++++-- 2 files changed, 85 insertions(+), 5 deletions(-) commit 85355d775ff70d9ba77a5f94dd786b23852e1c72 Author: Subash Abhinov Kasiviswanathan Date: Thu Oct 26 11:06:47 2017 -0600 net: qualcomm: rmnet: Always assign rmnet dev in deaggregation path The rmnet device needs to assigned for all packets in the deaggregation path based on the mux id, so the check is not needed. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2ffbbf0f91288f909b3d495cbf029d8e4cc7db66 Author: Subash Abhinov Kasiviswanathan Date: Thu Oct 26 11:06:46 2017 -0600 net: qualcomm: rmnet: Fix the return value of rmnet_rx_handler() Since packet is always consumed by rmnet_rx_handler(), we always return RX_HANDLER_CONSUMED. There is no need to pass on this value through multiple functions. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller .../net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 31 +++++++++------------- drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h | 3 +-- .../ethernet/qualcomm/rmnet/rmnet_map_command.c | 4 +-- 3 files changed, 14 insertions(+), 24 deletions(-) commit cc49c8ff68144d64de18fc5d0039356e0060c0e4 Author: Florian Fainelli Date: Thu Oct 26 09:11:48 2017 -0700 MAINAINTERS: Add Doug as GENET maintainer Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit cf0e5c44f21923023b864e82624dacf2fb22f8fa Merge: e324615 cd66358 Author: David S. Miller Date: Sat Oct 28 00:02:46 2017 +0900 Merge branch 'bnxt_en-next' Michael Chan says: ==================== bnxt_en: Updates for net-next. This series includes firmware interface update, some optimizations, some new PCI IDs, new MTU checks, ethtool reset method, interrupt coalescing code cleanup, and TC flower offload for vxlan encap/decap from Sathya Perla. ==================== Signed-off-by: David S. Miller commit cd66358e52f74585f043ef63089727273b3421d3 Author: Sathya Perla Date: Thu Oct 26 11:51:32 2017 -0400 bnxt_en: alloc tc_info{} struct only when tc flower is enabled TC flower is not enabled on VFs and when there's no FW support. Alloc the tc_info{} struct at init time only when TC flower is being enabled. Signed-off-by: Sathya Perla Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 47 ++++++++++++++++----------- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 3 ++ 5 files changed, 34 insertions(+), 22 deletions(-) commit 5a84acbebb22f93dfc9ce1e5f0427c45c94acb33 Author: Sathya Perla Date: Thu Oct 26 11:51:31 2017 -0400 bnxt_en: query cfa flow stats periodically to compute 'lastused' attribute This patch implements periodic querying of cfa flow stats in batches to compute the 'lastused' attribute of TC flow stats. Signed-off-by: Sathya Perla 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 | 14 ++ drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 256 ++++++++++++++++++--------- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h | 24 ++- 4 files changed, 218 insertions(+), 85 deletions(-) commit f484f6782e013138946122ae09c100c9e4b547e3 Author: Sathya Perla Date: Thu Oct 26 11:51:30 2017 -0400 bnxt_en: add hwrm FW cmds for cfa_encap_record and decap_filter Add routines for issuing the hwrm_cfa_encap_record_alloc/free and hwrm_cfa_decap_filter_alloc/free FW cmds needed for supporting vxlan encap/decap offload. Signed-off-by: Sathya Perla Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 129 ++++++++++++++++++++++++++- 1 file changed, 125 insertions(+), 4 deletions(-) commit 8c95f773b4a367f7b9bcca7ab5f85675cfc812e9 Author: Sathya Perla Date: Thu Oct 26 11:51:29 2017 -0400 bnxt_en: add support for Flower based vxlan encap/decap offload This patch adds IPv4 vxlan encap/decap action support to TC-flower offload. For vxlan encap, the driver maintains a tunnel encap hash-table. When a new flow with a tunnel encap action arrives, this table is looked up; if an encap entry exists, it uses the already programmed encap_record_handle as the tunnel_handle in the hwrm_cfa_flow_alloc cmd. Else, a new encap node is added and the L2 header fields are queried via a route lookup. hwrm_cfa_encap_record_alloc cmd is used to create a new encap record and the encap_record_handle is used as the tunnel_handle while adding the flow. For vxlan decap, the driver maintains a tunnel decap hash-table. When a new flow with a tunnel decap action arrives, this table is looked up; if a decap entry exists, it uses the already programmed decap_filter_handle as the tunnel_handle in the hwrm_cfa_flow_alloc cmd. Else, a new decap node is added and a decap_filter_handle is alloc'd via the hwrm_cfa_decap_filter_alloc cmd. This handle is used as the tunnel_handle while adding the flow. The code to issue the HWRM FW cmds is introduced in a follow-up patch. Signed-off-by: Sathya Perla Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.h | 9 + drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 566 +++++++++++++++++++++- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h | 66 ++- 4 files changed, 631 insertions(+), 12 deletions(-) commit f8503969d27b2b26ff0adbce4b7d7cf4ba5e43c2 Author: Michael Chan Date: Thu Oct 26 11:51:28 2017 -0400 bnxt_en: Refactor and simplify coalescing code. The mapping of the ethtool coalescing parameters to hardware parameters is now done in bnxt_hwrm_set_coal_params(). The same function can handle both RX and TX settings. The code is now more clear. Some adjustments have been made to get better hardware settings. The coal_frames setting is now accurately set in hardware. The max_timer is set to coal_ticks value. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 81 +++++++++++++------------------ 1 file changed, 35 insertions(+), 46 deletions(-) commit 18775aa8a91fcd4cd07c722d575b4b852e3624c3 Author: Michael Chan Date: Thu Oct 26 11:51:27 2017 -0400 bnxt_en: Reorganize the coalescing parameters. The current IRQ coalescing logic is a little messy. The ethtool parameters are mapped to hardware parameters in a way that is difficult to understand. The first step is to better organize the parameters by adding the new structure bnxt_coal. The structure is used by both the RX and TX sets of coalescing parameters. Adjust the default coal_ticks to 14 us and 28 us for RX and TX. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 60 ++++++++++++++--------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 21 +++++--- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 50 +++++++++++-------- 3 files changed, 79 insertions(+), 52 deletions(-) commit 49f7972fd16407b3d1f03c2d447d2f1e1b95e9ba Author: Vasundhara Volam Date: Thu Oct 26 11:51:26 2017 -0400 bnxt_en: Add ethtool reset method This is a firmware internal reset after driver is unloaded. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 37 ++++++++++++++++++++++- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.h | 2 ++ 2 files changed, 38 insertions(+), 1 deletion(-) commit 7eb9bb3a0c7c29741df2249cc3b99f06a7978d61 Author: Michael Chan Date: Thu Oct 26 11:51:25 2017 -0400 bnxt_en: Check maximum supported MTU from firmware. Some NICs have a firmware enforced maximum MTU setting by management firmware. Set up netdev->max_mtu accordingly. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 17 +++++++++++------ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) commit c1a7bdff17247332ecff7f243e42d269b3f74c65 Author: Michael Chan Date: Thu Oct 26 11:51:24 2017 -0400 bnxt_en: Optimize .ndo_set_mac_address() for VFs. No need to call bnxt_approve_mac() which will send a message to the PF if the MAC address hasn't changed. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 431aa1eb20d8ae2674723292adb832b968da868e Author: Michael Chan Date: Thu Oct 26 11:51:23 2017 -0400 bnxt_en: Get firmware package version one time. The current code retrieves the firmware package version from firmware everytime ethtool -i is run. There is no reason to do that as the firmware will not change while the driver is loaded. Get the version once at init time. Also, display the full 4-part firmware version string and remove the less useful interface spec version. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 +-- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 30 ++++++++++++----------- 2 files changed, 18 insertions(+), 16 deletions(-) commit e0ad8fc5980b362028cfd63ec037f4b491e726c6 Author: Michael Chan Date: Thu Oct 26 11:51:22 2017 -0400 bnxt_en: Check for zero length value in bnxt_get_nvram_item(). Return -EINVAL if the length is zero and not proceed to do essentially nothing. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 3 +++ 1 file changed, 3 insertions(+) commit 618784e3ee1870e43e50e1c7922cc123cc050566 Author: Rob Miller Date: Thu Oct 26 11:51:21 2017 -0400 bnxt_en: adding PCI ID for SMARTNIC VF support Signed-off-by: Rob Miller 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 8ed693b7bbd179949f6947adaae5eff2e386a534 Author: Ray Jui Date: Thu Oct 26 11:51:20 2017 -0400 bnxt_en: Add PCIe device ID for bcm58804 Add new PCIe device ID and chip number for bcm58804 Signed-off-by: Ray Jui Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 ++ 2 files changed, 5 insertions(+) commit 57922b0a2f7ef9effbcdbbf7d1f8dad95aa567f7 Author: Michael Chan Date: Thu Oct 26 11:51:19 2017 -0400 bnxt_en: Update firmware interface to 1.8.3.1 Vxlan encap/decap filters are added to this firmware spec. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 420 ++++++++++++++++++++++++-- 1 file changed, 396 insertions(+), 24 deletions(-) commit e324615b47fba404f28c709ee0db02d75829ce43 Merge: 5bca178 5749f0f Author: David S. Miller Date: Sat Oct 28 00:00:10 2017 +0900 Merge branch 'dsa-define-port-types' Vivien Didelot says: ==================== net: dsa: define port types The DSA code currently has 3 bitmaps in the dsa_switch structure: cpu_port_mask, dsa_port_mask and enabled_port_mask. They are used to store the type of each switch port. This dates back from when DSA didn't have a dsa_port structure to hold port-specific data. The dsa_switch structure is mainly used to communicate with DSA drivers and must not contain such static data parsed from DTS or pdata, which belongs the DSA core structures, such as dsa_switch_tree and dsa_port. Also the enabled_port_mask is misleading, often misinterpreted as the complement of disabled ports (thus including DSA and CPU ports), while in fact it only masks the user ports. A port can be of 3 types when it is not unused: "cpu" (interfacing with a master device), "dsa" (interconnecting with another "dsa" port from another switch chip), or "user" (user-facing port.) This patchset first fixes the usage of DSA port type helpers, then defines the DSA_PORT_TYPE_UNUSED, DSA_PORT_TYPE_CPU, DSA_PORT_TYPE_DSA, and DSA_PORT_TYPE_USER port types, and finally removes the misleading port bitmaps. ==================== Signed-off-by: David S. Miller commit 5749f0f3772b9d98f37e3a92539f49fafaa64eca Author: Vivien Didelot Date: Thu Oct 26 11:22:59 2017 -0400 net: dsa: remove port masks Now that DSA core provides port types, there is no need to keep this information at the switch level. This is a static information that is part of a DSA core dsa_port structure. Remove them. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 3 --- net/dsa/dsa2.c | 11 ----------- net/dsa/legacy.c | 3 --- 3 files changed, 17 deletions(-) commit c38c5a66506e4e8223fd03e950b1bde99190701e Author: Vivien Didelot Date: Thu Oct 26 11:22:58 2017 -0400 net: dsa: use new port type in helpers Now that DSA exposes an enumerated type for the ports, we can use them directly instead of checking bitmaps, which is more consistent. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit 057cad2c59d73b0c4a6638546f3099d6fb444094 Author: Vivien Didelot Date: Thu Oct 26 11:22:57 2017 -0400 net: dsa: define port types Introduce an enumerated type for ports, which will be way more explicit to identify a port type instead of digging into switch port masks. A port can be of type CPU, DSA, user, or unused by default. This is a static parsed information that cannot be changed at runtime. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 7 +++++++ net/dsa/dsa2.c | 3 +++ net/dsa/legacy.c | 6 ++++++ 3 files changed, 16 insertions(+) commit 02bc6e546e858b209c3ebe380a13a73b333b1b3f Author: Vivien Didelot Date: Thu Oct 26 11:22:56 2017 -0400 net: dsa: introduce dsa_user_ports helper Introduce a dsa_user_ports() helper to return the ds->enabled_port_mask mask which is more explicit. This will also minimize diffs when touching this internal mask. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mt7530.c | 2 +- drivers/net/dsa/mv88e6060.c | 5 ++--- drivers/net/dsa/qca8k.c | 3 +-- include/net/dsa.h | 5 +++++ net/dsa/dsa2.c | 2 +- net/dsa/legacy.c | 2 +- 6 files changed, 11 insertions(+), 8 deletions(-) commit 4a5b85ffe2a001b52d165931ad05d2d620daca3c Author: Vivien Didelot Date: Thu Oct 26 11:22:55 2017 -0400 net: dsa: use dsa_is_user_port everywhere Most of the DSA code still check ds->enabled_port_mask directly to inspect a given port type instead of using the provided dsa_is_user_port helper. Change this. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 9 ++++----- drivers/net/dsa/bcm_sf2_cfp.c | 2 +- drivers/net/dsa/mt7530.c | 4 ++-- drivers/net/dsa/qca8k.c | 4 ++-- net/dsa/dsa.c | 2 +- net/dsa/legacy.c | 4 ++-- 6 files changed, 12 insertions(+), 13 deletions(-) commit 2b3e9891cb607f7c7d5a4b11fb5a6e775e7f3ef4 Author: Vivien Didelot Date: Thu Oct 26 11:22:54 2017 -0400 net: dsa: rename dsa_is_normal_port helper This patch renames dsa_is_normal_port to dsa_is_user_port because "user" is the correct term in the DSA terminology, not "normal". Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 2 +- include/net/dsa.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit deb8ee0b51204273c120a3b3848efbb5695ad658 Author: Vivien Didelot Date: Thu Oct 26 11:22:53 2017 -0400 net: dsa: fix dsa_is_normal_port helper In order to know if a port is of type user, dsa_is_normal_port checks that the given port is not of type DSA nor CPU. This is not enough because a port can be unused. Without the previous fix, this caused the unused mv88e6xxx ports to be configured in normal mode. The ds->enabled_port_mask reports the user ports, so check this instead. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91dee144817e51bbfbdc06af4dc1acce6e92bdda Author: Vivien Didelot Date: Thu Oct 26 11:22:52 2017 -0400 net: dsa: mv88e6xxx: skip unused ports The unused ports are currently configured in normal mode. This does not prevent the switch from being functional, but it is unnecessary. Skip unused ports. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 3 +++ 1 file changed, 3 insertions(+) commit bff7b688d5b10a8cb8cecefdea5e255408b78f2f Author: Vivien Didelot Date: Thu Oct 26 11:22:51 2017 -0400 net: dsa: add dsa_is_unused_port helper As the comment above the chunk states, the b53 driver attempts to disable the unused ports. But using ds->enabled_port_mask is misleading, because this mask reports in fact the user ports. To avoid confusion and fix this, this patch introduces an explicit dsa_is_unused_port helper which ensures the corresponding bit is not masked in any of the switch port masks. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 2 +- include/net/dsa.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 739c64414f01748a36e7d82c8e0611dea94412bd Author: Roger Quadros Date: Fri Oct 20 15:16:21 2017 +0300 mtd: nand: omap2: Fix subpage write Since v4.12, NAND subpage writes were causing a NULL pointer dereference on OMAP platforms (omap2-nand) using OMAP_ECC_BCH4_CODE_HW, OMAP_ECC_BCH8_CODE_HW and OMAP_ECC_BCH16_CODE_HW. This is because for those ECC modes, omap_calculate_ecc_bch() generates ECC bytes for the entire (multi-sector) page and this can overflow the ECC buffer provided by nand_write_subpage_hwecc() as it expects ecc.calculate() to return ECC bytes for just one sector. However, the root cause of the problem is present since v3.9 but was not seen then as NAND buffers were being allocated as one big chunk prior to commit 3deb9979c731 ("mtd: nand: allocate aligned buffers if NAND_OWN_BUFFERS is unset"). Fix the issue by providing a OMAP optimized write_subpage() implementation. Fixes: 62116e5171e0 ("mtd: nand: omap2: Support for hardware BCH error correction.") Cc: Signed-off-by: Roger Quadros Signed-off-by: Boris Brezillon drivers/mtd/nand/omap2.c | 339 +++++++++++++++++++++++++++++++---------------- 1 file changed, 224 insertions(+), 115 deletions(-) commit 5bca178eed601cd4584c38c5290f7abbcacf3fb3 Author: Gustavo A. R. Silva Date: Thu Oct 26 07:27:45 2017 -0500 net: faraday: ftmac100: Use BUG_ON instead of if condition followed by BUG. Notice that in this particular case unlikely() is already being called inside BUG_ON macro. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftmac100.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4fa112f6b5fb055478e76f2b446673565d2ea35f Author: Gustavo A. R. Silva Date: Thu Oct 26 07:16:01 2017 -0500 net: bcmgenet: Use BUG_ON instead of if condition followed by BUG Use BUG_ON instead of if condition followed by BUG. Something to notice in this particular case is that unlikely() is already being called inside BUG_ON macro. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 42c8ae1137173964d48fd040cbb85027125e6a5c Merge: 123196b 6f92a65 Author: David S. Miller Date: Fri Oct 27 23:48:30 2017 +0900 Merge branch 'cxgb4-collect-more-hardware-dumps-via-ethtool' Rahul Lakkireddy says: ==================== cxgb4: collect more hardware dumps via ethtool This series of patches collect more firmware and hardware dumps via ethool --get-dump facility. Patch 1 collects hardware logic analyzer dumps. Patch 2 collects CIM queue configuration dump. Patch 3 collects RSS dumps. Patch 4 collects TID info dump. Patch 5 collects MPS-TCAM dump. Patch 6 collects PBT tables dump. Patch 7 collects hardware scheduler and pace table dumps. Patch 8 collects miscellaneous hardware information, including path mtu, PM stats, TP clock info, congestion control, and VPD data dumps. ==================== Signed-off-by: David S. Miller commit 6f92a6544f1a4ed2d495a937283f01ee7d590fec Author: Rahul Lakkireddy Date: Thu Oct 26 17:18:40 2017 +0530 cxgb4: collect hardware misc dumps Collect path mtu, PM stats, TP clock info, congestion control, and VPD data dumps. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h | 36 ++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 5 + drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 135 ++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 15 +++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 20 ++++ 5 files changed, 211 insertions(+) commit 08c4901bfe0b3beb12e7a5d7749e3522d7b1471e Author: Rahul Lakkireddy Date: Thu Oct 26 17:18:39 2017 +0530 cxgb4: collect hardware scheduler dumps Collect hardware TX traffic scheduler and pace tables. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h | 8 ++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 2 + drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 25 ++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 3 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 9 ++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 4 ++ drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 57 +++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/t4_hw.h | 1 + drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 10 ++++ 9 files changed, 119 insertions(+) commit db8cd7ce208a7e7d440856b5c3e4e96af6dd9917 Author: Rahul Lakkireddy Date: Thu Oct 26 17:18:38 2017 +0530 cxgb4: collect PBT tables dump Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h | 15 +++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 68 +++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 3 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 4 ++ 5 files changed, 91 insertions(+) commit b289593e1398480f5ac1a1df2dae479516a21372 Author: Rahul Lakkireddy Date: Thu Oct 26 17:18:37 2017 +0530 cxgb4: collect MPS-TCAM dump Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h | 21 +++ drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 184 ++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 3 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 5 + drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 16 ++ 6 files changed, 230 insertions(+) commit 9030e49897f57dea3126e35d97a33588c5307aa1 Author: Rahul Lakkireddy Date: Thu Oct 26 17:18:36 2017 +0530 cxgb4: collect TID info dump Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h | 39 ++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 85 ++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 3 + .../net/ethernet/chelsio/cxgb4/cudbg_lib_common.h | 6 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 4 + drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 1 + drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 5 +- 8 files changed, 143 insertions(+), 1 deletion(-) commit 28b445561fbac2e3c9886231b0a414336878e20f Author: Rahul Lakkireddy Date: Thu Oct 26 17:18:35 2017 +0530 cxgb4: collect RSS dumps Collect RSS table and RSS VF configuration dumps. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h | 5 +++ drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 2 + drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 46 +++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 6 +++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 9 +++++ 5 files changed, 68 insertions(+) commit 3044d0fb016ecd953724c966bede8c8626f32bd5 Author: Rahul Lakkireddy Date: Thu Oct 26 17:18:34 2017 +0530 cxgb4: collect CIM queue configuration dump Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h | 9 ++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 39 +++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 3 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 4 +++ 5 files changed, 56 insertions(+) commit 27887bc7cb7fc5a0a3b8f4b0f27b332c8121515b Author: Rahul Lakkireddy Date: Thu Oct 26 17:18:33 2017 +0530 cxgb4: collect hardware LA dumps Collect CIM, CIM_MA, ULP_RX, TP, CIM_PIF, and ULP_TX logic analyzer dumps. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h | 26 ++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 6 + drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 164 ++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 18 +++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 32 +++++ drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 4 + 6 files changed, 250 insertions(+) commit 1f709713cbd70efe85e76d9e9453606c6cc4bf82 Author: Hans de Goede Date: Mon Oct 16 14:34:48 2017 +0200 media: staging: media: atomisp: Fix oops by unbalanced clk enable/disable call The common-clk core expects clk consumers to always call enable/disable in a balanced manner. The atomisp driver does not call gmin_flisclk_ctrl() in a balanced manner, so add a clock_on bool and skip redundant calls. This fixes kernel oops like this one: [ 19.811613] gc0310_s_config S [ 19.811655] ------------[ cut here ]------------ [ 19.811664] WARNING: CPU: 1 PID: 720 at drivers/clk/clk.c:594 clk_core_disabl [ 19.811666] Modules linked in: tpm_crb(+) snd_soc_sst_atom_hifi2_platform tpm [ 19.811744] CPU: 1 PID: 720 Comm: systemd-udevd Tainted: G C OE 4.1 [ 19.811746] Hardware name: Insyde T701/T701, BIOS BYT70A.YNCHENG.WIN.007 08/2 [ 19.811749] task: ffff988df7ab2500 task.stack: ffffac1400474000 [ 19.811752] RIP: 0010:clk_core_disable+0xc0/0x130 ... [ 19.811775] Call Trace: [ 19.811783] clk_core_disable_lock+0x1f/0x30 [ 19.811788] clk_disable+0x1f/0x30 [ 19.811794] gmin_flisclk_ctrl+0x87/0xf0 [ 19.811801] 0xffffffffc0528512 [ 19.811805] 0xffffffffc05295e2 [ 19.811811] ? acpi_device_wakeup_disable+0x50/0x60 [ 19.811815] ? acpi_dev_pm_attach+0x8e/0xd0 [ 19.811818] ? 0xffffffffc05294d0 [ 19.811823] i2c_device_probe+0x1cd/0x280 [ 19.811828] driver_probe_device+0x2ff/0x450 Fixes: "staging: atomisp: use clock framework for camera clocks" Signed-off-by: Hans de Goede Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 123196b693cb388dfc18bc38da03e7e97cc3a011 Merge: eed05c8 535f010 Author: David S. Miller Date: Fri Oct 27 23:30:53 2017 +0900 Merge branch 'dsa-lan9303-Learn-addresses-on-CPU-port-when-bridged' Egil Hjelmeland says: ==================== net: dsa: lan9303: Learn addresses on CPU port when bridged When CPU transmit directly to port using tag, the LAN9303 does not learn MAC addresses received on the CPU port into the ALR table. ALR learning is performed only when transmitting using ALR lookup. Solution: If the two external ports are bridged and the packet is not STP BPDU, then use ALR lookup to allow ALR learning on CPU port. Otherwise transmit directly to port with STP state override. The first patch moves struct lan9303 to include/linux/dsa/lan9303.h in order to prepare for the second patch. Changes v1 -> v2: - new file: include/linux/dsa/lan9303.h instead of include/linux/lan9303.h - include linux/if_ether.h in include/linux/dsa/lan9303.h - renamed lan9303_tx_use_arl to lan9303_xmit_use_arl for consistency. - removed inline keyword to lan9303_xmit_use_arl ==================== Signed-off-by: David S. Miller commit 535f010d4ba798214bbd88ce18a95cd99cd4a8cb Author: Egil Hjelmeland Date: Thu Oct 26 11:00:49 2017 +0200 net: dsa: lan9303: Learn addresses on CPU port when bridged When CPU transmit directly to port using tag, the LAN9303 does not learn MAC addresses received on the CPU port into the ALR. ALR learning is performed only when transmitting using ALR lookup. Solution: If the two external ports are bridged and the packet is not STP BPDU, then use ALR lookup to allow ALR learning on CPU port. Otherwise transmit directly to port with STP state override. Signed-off-by: Egil Hjelmeland Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/tag_lan9303.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 356c3e9afac0cc19c3d3b0cbc67106ce8efa0743 Author: Egil Hjelmeland Date: Thu Oct 26 11:00:48 2017 +0200 net: dsa: lan9303: Move struct lan9303 to include/linux/dsa/lan9303.h The next patch require net/dsa/tag_lan9303.c to access struct lan9303. Therefore move struct lan9303 definitions from drivers/net/dsa/lan9303.h to new file include/linux/dsa/lan9303.h. Signed-off-by: Egil Hjelmeland Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller MAINTAINERS | 1 + drivers/net/dsa/lan9303.h | 34 +--------------------------------- include/linux/dsa/lan9303.h | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 33 deletions(-) commit eed05c85e26034021ef5c5da892c8f8b708eff0d Merge: 035226b 3e8c1fd Author: David S. Miller Date: Fri Oct 27 23:25:56 2017 +0900 Merge branch 'mlxsw-small-cleanup' Jiri Pirko says: ==================== mlxsw: small cleanup Couple of small cleanup patches from Nogah. ==================== Signed-off-by: David S. Miller commit 3e8c1fd31840bd84c31f08e69aa9c338b2856047 Author: Nogah Frankel Date: Thu Oct 26 10:55:33 2017 +0200 mlxsw: reg: Avoid magic number in PPCNT Replace recurring magic number in PPCNT register with a define. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 72 ++++++++++++++++++------------- 1 file changed, 42 insertions(+), 30 deletions(-) commit 9deef43ddfb1dfa5f42e4066610cfe606212b0a1 Author: Nogah Frankel Date: Thu Oct 26 10:55:32 2017 +0200 mlxsw: spectrum: Change stats cache to be local Change the HW stats cache to be local. Rename it for better clarity. It holds the results of the last result of HW stats that are being read periodically, in order to have answer for stats request immediately. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 24 +++++++----------------- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 ++-- 2 files changed, 9 insertions(+), 19 deletions(-) commit 9d39e46bdd9df945669a9039660a3194bdc8d0ac Author: Philipp Zabel Date: Tue Oct 17 13:05:11 2017 +0200 media: tc358743: validate lane count The TC358743 does not support more than 4 data lanes. Check that the lane count is valid. Signed-off-by: Philipp Zabel Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 5 +++++ 1 file changed, 5 insertions(+) commit cef6673440a29a9a2fd39a57d5ba28e6c68c7a76 Author: Jacob Chen Date: Sun Oct 1 12:22:38 2017 +0200 media: i2c: OV5647: change to use macro for the registers ref docuemnt: ov5647-datasheet-v1.00-2009 Signed-off-by: Jacob Chen Reviewed-by: Luis Oliveira Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5647.c | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) commit 7bc9f038d02c2fc14e53e4aaca651deaf6d0de3f Author: Jacob Chen Date: Sun Oct 1 12:22:37 2017 +0200 media: i2c: OV5647: ensure clock lane in LP-11 state before streaming on When I was supporting Rpi Camera Module on the ASUS Tinker board, I found this driver have some issues with rockchip's mipi-csi driver. It didn't place clock lane in LP-11 state before performing D-PHY initialisation. >From our experience, on some OV sensors, LP-11 state is not achieved while BIT(5)-0x4800 is cleared. So let's set BIT(5) and BIT(0) both while not streaming, in order to coax the clock lane into LP-11 state. 0x4800 : MIPI CTRL 00 BIT(5) : clock lane gate enable 0: continuous 1: none-continuous BIT(0) : manually set clock lane 0: Not used 1: used Signed-off-by: Jacob Chen Reviewed-by: Luis Oliveira Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5647.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 71862f63f351078560a7ce35c6c2e2ca16750374 Author: Wenyou Yang Date: Mon Oct 16 05:14:27 2017 +0200 media: ov7670: Add the ov7670_s_power function Add the ov7670_s_power function which is responsible for manipulating the power dowm mode through the PWDN pin and the reset operation through the RESET pin, and keep it powered at all times. [sakari.ailus@linux.intel.com: set pwdn_gpio direction only once] Signed-off-by: Wenyou Yang Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov7670.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) commit c0662dd4e7a407a5ac79cc6ca4d1116bf03d3731 Author: Wenyou Yang Date: Mon Oct 16 05:14:26 2017 +0200 media: ov7670: Add the get_fmt callback Add the get_fmt callback, also enable V4L2_SUBDEV_FL_HAS_DEVNODE flag to make this subdev has device node. Signed-off-by: Wenyou Yang Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov7670.c | 77 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-) commit 7ac767645ab1f2f96b2c84ee8857d72d25c4eadd Author: Kees Cook Date: Tue Oct 24 02:29:54 2017 -0700 ath: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Kalle Valo drivers/net/wireless/ath/ar5523/ar5523.c | 7 +++---- drivers/net/wireless/ath/ath10k/htt_rx.c | 6 +++--- drivers/net/wireless/ath/ath10k/pci.c | 17 ++++++++--------- drivers/net/wireless/ath/ath10k/pci.h | 2 +- drivers/net/wireless/ath/ath6kl/cfg80211.c | 6 ++---- drivers/net/wireless/ath/ath6kl/core.h | 2 +- drivers/net/wireless/ath/ath6kl/main.c | 5 ++--- drivers/net/wireless/ath/ath6kl/txrx.c | 6 +++--- drivers/net/wireless/ath/ath6kl/wmi.c | 4 ++-- drivers/net/wireless/ath/ath6kl/wmi.h | 2 +- drivers/net/wireless/ath/ath9k/ath9k.h | 4 ++-- drivers/net/wireless/ath/ath9k/channel.c | 14 ++++++-------- drivers/net/wireless/ath/ath9k/gpio.c | 14 ++++++-------- drivers/net/wireless/ath/ath9k/htc.h | 2 +- drivers/net/wireless/ath/ath9k/htc_drv_init.c | 3 +-- drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 4 ++-- drivers/net/wireless/ath/ath9k/init.c | 4 ++-- drivers/net/wireless/ath/ath9k/link.c | 6 +++--- drivers/net/wireless/ath/ath9k/main.c | 4 ++-- drivers/net/wireless/ath/wil6210/main.c | 15 +++++++-------- drivers/net/wireless/ath/wil6210/p2p.c | 4 ++-- drivers/net/wireless/ath/wil6210/wil6210.h | 2 +- 22 files changed, 61 insertions(+), 72 deletions(-) commit 9b09342f5cfa5b4b3447de17de284111bfdeab26 Merge: b9e43e3 0224d45 Author: Wolfram Sang Date: Fri Oct 27 15:53:39 2017 +0200 Merge branch 'i2c/cht-wc-fusb302-immutable' into i2c/for-4.15 commit b9e43e363d0115ca981c106d968e24140ad37f6c Author: Kees Cook Date: Mon Oct 16 16:27:29 2017 -0700 i2c/busses: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-img-scb.c | 7 +++---- drivers/i2c/busses/i2c-pnx.c | 8 +++----- 2 files changed, 6 insertions(+), 9 deletions(-) commit 698dbbf82bbf549593b78dfb6b8269522adfb62d Author: Johannes Berg Date: Fri Oct 27 11:12:41 2017 +0300 wil6210: remove SSID debugfs This driver shouldn't be using wdev->ssid to start with, as it's more or less an internal field in cfg80211 used for various purposes. Reading it is possible through nl80211, even if that's not really what we should be doing there for anything but AP type interfaces. It *really* shouldn't allow modifying it! Remove the whole debugfs entry. Signed-off-by: Johannes Berg Signed-off-by: Kalle Valo drivers/net/wireless/ath/wil6210/debugfs.c | 45 ------------------------------ 1 file changed, 45 deletions(-) commit d94a26f05b017d93513d176959c49996768f446f Author: Wenyou Yang Date: Mon Oct 16 05:14:25 2017 +0200 media: ov7670: Add entity pads initialization Add the media entity pads initialization. Signed-off-by: Wenyou Yang Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov7670.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 6bac0d2cda715893568d896d248d3bbd083b8288 Author: Johannes Berg Date: Fri Oct 27 11:12:38 2017 +0300 wil6210: remove wil6210_uapi.h from MAINTAINERS This file doesn't exist. Signed-off-by: Johannes Berg Signed-off-by: Kalle Valo MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 0224d45c9d46401b6d7018a96cfe049c5da7d91c Author: Hans de Goede Date: Wed Oct 11 11:41:20 2017 +0200 i2c-cht-wc: Add device-properties for fusb302 integration Add device-properties to make the bq24292i charger connected to the bus get its input-current-limit from the fusb302 Type-C port controller which is used on boards with the cht-wc PMIC, as well as regulator_init_data for the 5V boost converter on the bq24292i. Since this means we now hook-up the bq24292i to the fusb302 Type-C port controller add a check for the ACPI device which instantiates the fusb302. Signed-off-by: Hans de Goede Signed-off-by: Wolfram Sang drivers/i2c/busses/Kconfig | 5 ++++ drivers/i2c/busses/i2c-cht-wc.c | 51 +++++++++++++++++++++++++++++++++++------ 2 files changed, 49 insertions(+), 7 deletions(-) commit 728fe6cef27444b6575c5e7ab5de13274610488b Author: Hans de Goede Date: Wed Oct 11 11:41:19 2017 +0200 i2c: Allow overriding dev_name through board_info For devices not instantiated through ACPI the i2c-client's device-name gets set to - by default, e.g. "0-0022" this means that the device-name is dependent on the order in which the i2c-busses are enumerated. In some cases having a predictable constant device-name is desirable, for example on non device-tree platforms the link between a regulator and its consumers is specified by the platform code by setting regulator_init_data.consumers. This array identifies the regulator's consumers by dev_name and supply(-name). Which requires a constant dev_name. This commit adds a dev_name field to i2c_board_info allowing platform code to set a contstant dev_name so that the device can be identified by its dev_name in other platform code. Signed-off-by: Hans de Goede Acked-by: Mark Brown (live at ELCE17) Acked-by: Andy Shevchenko (live at ELCE17) Signed-off-by: Wolfram Sang drivers/i2c/i2c-core-base.c | 10 ++++++++-- include/linux/i2c.h | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) commit 9d414949a3061ba1a76fbc7900e00902968df4ef Author: Christos Gkekas Date: Fri Oct 27 11:12:37 2017 +0300 ath9k: debug: Remove redundant check Variable val is unsigned, so checking whether it is less than zero is redundant. Signed-off-by: Christos Gkekas Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d2d60687c9a0621e0da40338be4cbd7e3783be2 Author: Hans Verkuil Date: Sat Jul 15 10:51:00 2017 +0200 media: tegra-cec: add Tegra HDMI CEC driver This driver adds support for the Tegra CEC IP. It is based on the NVIDIA drivers/misc/tegra-cec driver in their 3.10 kernel. This has been converted to the CEC framework and cleaned up. Tested with my Jetson TK1 board. It has also been tested with the Tegra X1 in an embedded product. Note of warning for the Tegra X2: this SoC supports two HDMI outputs, but only one CEC adapter and the CEC bus is shared between the two outputs. This is a design mistake and the CEC adapter can control only one HDMI output. Never hook up both HDMI outputs to the CEC bus in a hardware design: this is illegal as per the CEC specification. The CEC bus can be shared between multiple inputs and zero or one outputs, but not between multiple outputs. Signed-off-by: Hans Verkuil Acked-by: Thierry Reding Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 8 + drivers/media/platform/Kconfig | 11 + drivers/media/platform/Makefile | 2 + drivers/media/platform/tegra-cec/Makefile | 1 + drivers/media/platform/tegra-cec/tegra_cec.c | 501 +++++++++++++++++++++++++++ drivers/media/platform/tegra-cec/tegra_cec.h | 127 +++++++ 6 files changed, 650 insertions(+) commit d83c0d3293bbf3fe40ce9e1ac273309a44bbde91 Author: Christos Gkekas Date: Fri Oct 27 11:12:35 2017 +0300 ath10k: spectral: remove redundant check in write_file_spectral_count() Variable val is unsigned, so checking whether it is less than zero is redundant. Signed-off-by: Christos Gkekas Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/spectral.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5b6853e9922f415765dd8032761e726be94d8b0 Author: Anilkumar Kolli Date: Fri Oct 27 11:12:29 2017 +0300 ath10k: fix sending wmi cmd during the tdls teardown The current firmware 10.4-3.5.1-00035 on QCA9888 supports TDLS explicit mode, it expects WMI_TDLS_ENABLE_PASSIVE for tdls setup and WMI_TDLS_DISABLE for tdls teardown. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/wmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a60809313b96c9489780944e6df45357b20d2ef5 Author: Anilkumar Kolli Date: Fri Oct 27 11:12:28 2017 +0300 ath10k: block offchannel operations if TDLS session is active Do not allow off channel operations like scans/roc when there are active TDLS sessions. The Current firmware 10.4-3.5.1-00035 on QCA9888 does not supports any offchannel operations on active TDLS sessions, either driver needs to block the offchannel operation requests or should teardown the TDLS connection. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit dd0f9cd6bc6a6d663b23f1d1a84c970d1f042b1c Author: Anilkumar Kolli Date: Fri Oct 27 11:12:27 2017 +0300 ath10k: move ath10k_mac_tdls_vif*() functions To be able to use ath10k_mac_tdls_vif_stations_count() in ath10k_hw_scan() in the following patch, move the functions earlier in the file. This commit is pure code move, no functional changes. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 106 +++++++++++++++++----------------- 1 file changed, 53 insertions(+), 53 deletions(-) commit 20665a9076d48e9abd9a2db13d307f58f7ef6647 Author: Brian Norris Date: Thu Oct 19 11:45:19 2017 -0700 ath10k: fix build errors with !CONFIG_PM Build errors have been reported with CONFIG_PM=n: drivers/net/wireless/ath/ath10k/pci.c:3416:8: error: implicit declaration of function 'ath10k_pci_suspend' [-Werror=implicit-function-declaration] drivers/net/wireless/ath/ath10k/pci.c:3428:8: error: implicit declaration of function 'ath10k_pci_resume' [-Werror=implicit-function-declaration] These are caused by the combination of the following two commits: 6af1de2e4ec4 ("ath10k: mark PM functions as __maybe_unused") 96378bd2c6cd ("ath10k: fix core PCI suspend when WoWLAN is supported but disabled") Both build fine on their own. But now that ath10k_pci_pm_{suspend,resume}() is compiled unconditionally, we should also compile ath10k_pci_{suspend,resume}() unconditionally. And drop the #ifdef around ath10k_pci_hif_{suspend,resume}() too; they are trivial (empty), so we're not saving much space by compiling them out. And the alternatives would be to sprinkle more __maybe_unused, or spread the #ifdef's further. Build tested with the following combinations: CONFIG_PM=y && CONFIG_PM_SLEEP=y CONFIG_PM=y && CONFIG_PM_SLEEP=n CONFIG_PM=n Fixes: 96378bd2c6cd ("ath10k: fix core PCI suspend when WoWLAN is supported but disabled") Fixes: 096ad2a15fd8 ("Merge branch 'ath-next'") Signed-off-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 5 ----- 1 file changed, 5 deletions(-) commit d524b8fc75f1ad8132b6661b48a8cbfba37ecc2b Author: Hans Verkuil Date: Sat Jul 15 10:51:24 2017 +0200 media: dt-bindings: document the tegra CEC bindings This documents the binding for the Tegra CEC module. Signed-off-by: Hans Verkuil Acked-by: Rob Herring Acked-by: Thierry Reding Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/tegra-cec.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit bc64ce98d6493337b61b958da454ecc9b35237a5 Author: Jérémy Lefaure Date: Sun Oct 1 21:30:54 2017 +0200 media: staging: atomisp: use ARRAY_SIZE Using the ARRAY_SIZE macro improves the readability of the code. Also, it is useless to use a variable to store this constant calculated at compile time. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../pci/atomisp2/css2400/camera/pipe/src/pipe_binarydesc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 79bd3daaa86e9734289bfd0c994633fee381973e Author: Muhammad Falak R Wani Date: Sat Sep 23 21:45:34 2017 +0200 media: staging/atomisp: make six local functions static to appease sparse The functions __bo_alloc, __bo_search_and_remove_from_free_rbtree, __bo_search_by_addr, __bo_search_by_addr_in_range, __bo_break_up and __bo_merge are local to the source and do not need to be in the global scope, so make them static. Cleans up sparse warnings: warning: symbol '__bo_alloc' was not declared. Should it be static? warning: symbol '__bo_search_and_remove_from_free_rbtree' was not declared. Should it be static? warning: symbol '__bo_search_by_addr' was not declared. Should it be static? warning: symbol '__bo_search_by_addr_in_range' was not declared. Should it be static? warning: symbol '__bo_break_up' was not declared. Should it be static? warning: symbol '__bo_merge' was not declared. Should it be static? Signed-off-by: Muhammad Falak R Wani Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit af7db4e90e47cc9e2220fb827e9c11235370c603 Author: Sakari Ailus Date: Mon Sep 25 13:17:31 2017 +0200 media: staging: atomisp: Update TODO regarding sensors There was no specific item regarding what should be done to sensor, lens and flash drivers. Add one, to replace the vague item denoting support only to particular sensor, lens and flash devices. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/TODO | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 90ebe55ab88635a19af06d923bb70ef236123399 Author: Sakari Ailus Date: Tue Sep 12 00:46:32 2017 +0200 media: staging: atomisp: Add driver prefix to Kconfig option and module names By adding the "atomisp-" prefix to module names (and "ATOMISP_" to Kconfig options), the staging drivers for e.g. sensors are labelled as being specific to atomisp, which they effectively are. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/Kconfig | 18 +- drivers/staging/media/atomisp/i2c/Makefile | 20 +- drivers/staging/media/atomisp/i2c/ap1302.c | 1255 ------------ drivers/staging/media/atomisp/i2c/atomisp-ap1302.c | 1255 ++++++++++++ drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 1490 ++++++++++++++ drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 1219 ++++++++++++ .../media/atomisp/i2c/atomisp-libmsrlisthelper.c | 209 ++ drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 1009 ++++++++++ .../staging/media/atomisp/i2c/atomisp-mt9m114.c | 1963 +++++++++++++++++++ drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 1557 +++++++++++++++ drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 1373 +++++++++++++ drivers/staging/media/atomisp/i2c/gc0310.c | 1490 -------------- drivers/staging/media/atomisp/i2c/gc2235.c | 1219 ------------ drivers/staging/media/atomisp/i2c/imx/Kconfig | 4 +- drivers/staging/media/atomisp/i2c/imx/Makefile | 8 +- .../staging/media/atomisp/i2c/libmsrlisthelper.c | 209 -- drivers/staging/media/atomisp/i2c/lm3554.c | 1009 ---------- drivers/staging/media/atomisp/i2c/mt9m114.c | 1963 ------------------- drivers/staging/media/atomisp/i2c/ov2680.c | 1557 --------------- drivers/staging/media/atomisp/i2c/ov2722.c | 1373 ------------- drivers/staging/media/atomisp/i2c/ov5693/Kconfig | 2 +- drivers/staging/media/atomisp/i2c/ov5693/Makefile | 2 +- .../media/atomisp/i2c/ov5693/atomisp-ov5693.c | 2059 ++++++++++++++++++++ drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 2059 -------------------- 24 files changed, 12161 insertions(+), 12161 deletions(-) commit 183c2e048109e2a861bc282b8b814ed37a69c738 Author: Sakari Ailus Date: Thu Sep 14 12:06:26 2017 +0200 media: staging: media: MAINTAINERS: Add entry for atomisp driver Add the maintainers entry to the atomisp staging media driver. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 0985dd306f727df6c0e71cd8a8eda93e8fa5206e Author: Leon Luo Date: Thu Oct 5 02:06:21 2017 +0200 media: imx274: V4l2 driver for Sony imx274 CMOS sensor The imx274 is a Sony CMOS image sensor that has 1/2.5 image size. It supports up to 3840x2160 (4K) 60fps, 1080p 120fps. The interface is 4-lane MIPI CSI-2 running at 1.44Gbps each. This driver has been tested on Xilinx ZCU102 platform with a Leopard LI-IMX274MIPI-FMC camera board. Support for the following features: -Resolutions: 3840x2160, 1920x1080, 1280x720 -Frame rate: 3840x2160 : 5 – 60fps 1920x1080 : 5 – 120fps 1280x720 : 5 – 120fps -Exposure time: 16 – (frame interval) micro-seconds -Gain: 1x - 180x -VFLIP: enable/disabledrivers/media/i2c/imx274.c -Test pattern: 12 test patterns Signed-off-by: Leon Luo Tested-by: Sören Brinkmann Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 8 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/imx274.c | 1811 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1820 insertions(+) commit 035226b964c820f65e201cdf123705a8f1d7c670 Author: Gianluca Borello Date: Thu Oct 26 01:47:42 2017 +0000 bpf: remove tail_call and get_stackid helper declarations from bpf.h commit afdb09c720b6 ("security: bpf: Add LSM hooks for bpf object related syscall") included linux/bpf.h in linux/security.h. As a result, bpf programs including bpf_helpers.h and some other header that ends up pulling in also security.h, such as several examples under samples/bpf, fail to compile because bpf_tail_call and bpf_get_stackid are now "redefined as different kind of symbol". >From bpf.h: u64 bpf_tail_call(u64 ctx, u64 r2, u64 index, u64 r4, u64 r5); u64 bpf_get_stackid(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5); Whereas in bpf_helpers.h they are: static void (*bpf_tail_call)(void *ctx, void *map, int index); static int (*bpf_get_stackid)(void *ctx, void *map, int flags); Fix this by removing the unused declaration of bpf_tail_call and moving the declaration of bpf_get_stackid in bpf_trace.c, which is the only place where it's needed. Signed-off-by: Gianluca Borello Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf.h | 3 --- kernel/trace/bpf_trace.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) commit 392209fa833287a1c5532ffbb098bba584a69dbc Author: Felix Manlunas Date: Wed Oct 25 18:04:56 2017 -0700 liquidio: deprecate 1-bit flag indicating watchdog kernel thread is running Deprecate the 1-bit flag (bit 2 in the SLI_SCRATCH_1 Octeon register) that indicates that the liquidio watchdog kernel thread is running for this NIC. Reason is: it is incompatible with the firmware's use for SLI_SCRATCH_1. In lieu of checking that now-deprecated flag, check the value of oct_dev->adapter_refcount to determine whether or not to create the watchdog kernel thread. Signed-off-by: Felix Manlunas Signed-off-by: Raghu Vatsavayi Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit c0c21458d7d242adf9c3a3e2f3f95392164325ae Author: Florian Fainelli Date: Wed Oct 25 18:01:05 2017 -0700 net: systemport: Check DSA notifier master against ourself Check that the master network device that is signaled through the DSA notifier is actually going to be ourself, otherwise, we could just be de-referencing garbage from other drivers. Fixes: 84ff33eeb23d ("net: systemport: Establish DSA network device queue mapping") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 33 ++++++++++++++++-------------- 1 file changed, 18 insertions(+), 15 deletions(-) commit 399ba77a94e1ee01f747b168c429a121164ac962 Author: Florian Fainelli Date: Wed Oct 25 17:32:05 2017 -0700 net: dsa: Simplify dsa_slave_phy_setup() Remove the code that tried to identify if a PHY designated by Device Tree required diversion through the DSA-created MDIO bus. This was created mainly for the bcm_sf2.c driver back when it did not have its own MDIO bus driver, which it now has since 461cd1b03e32 ("net: dsa: bcm_sf2: Register our slave MDIO bus"). Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Reviewed-by: Andrew Lunn Tested-by: Martin Hundebøll Signed-off-by: David S. Miller net/dsa/slave.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) commit b2b60bcc7d0940f02858b1721499df9674f685e5 Author: Leon Luo Date: Thu Oct 5 02:06:20 2017 +0200 media: imx274: device tree binding file The binding file for imx274 CMOS sensor V4l2 driver Signed-off-by: Leon Luo Acked-by: Sören Brinkmann Acked-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/i2c/imx274.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit f7480ad0d458b74a9a1a882b56917e4695ffed1f Author: Philipp Zabel Date: Thu Sep 21 17:32:11 2017 +0200 media: tc358743: set entity function to video interface bridge The TC358743 is an HDMI to MIPI CSI2-2 bridge. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 1 + 1 file changed, 1 insertion(+) commit f9cc48f1b1df312788312cff4b32267e4344ef61 Author: Tim Harvey Date: Tue Sep 19 01:08:16 2017 +0200 media: imx: Fix VDIC CSI1 selection When using VDIC with CSI1, make sure to select the correct CSI in IPU_CONF. Fixes: f0d9c8924e2c3376 ("[media] media: imx: Add IC subdev drivers") Suggested-by: Marek Vasut Signed-off-by: Tim Harvey Acked-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/imx/imx-ic-prp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7996e5c47fc01ca4bd94b40ba4585054f1d69b0e Author: Dan Carpenter Date: Thu Sep 28 15:03:54 2017 +0200 media: tc358743: remove an unneeded condition We can remove the check for if "state->cec_adap" is NULL. The cec_allocate_adapter() function never returns NULL and also we verified that "state->cec_adap" is an error pointer. Signed-off-by: Dan Carpenter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ac71484e89461a22d89ac84fcdc0235bf0a3e011 Author: Bhumika Goyal Date: Wed Sep 27 19:08:19 2017 +0200 media: au0828/em28xx: make vb2_ops const Make vb2_ops const as they are only stored in the const field of a vb2_queue structure. Make the declarations const too. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-vbi.c | 2 +- drivers/media/usb/au0828/au0828.h | 2 +- drivers/media/usb/em28xx/em28xx-v4l.h | 2 +- drivers/media/usb/em28xx/em28xx-vbi.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 0e2d9a9d4aa55dc2d650f9c07069a0b149f02d04 Author: Bhumika Goyal Date: Wed Sep 27 18:59:06 2017 +0200 media: cx23885/saa7134: make vb2_ops const Make vb2_ops const as they are only stored in the const field of a vb2_queue structure. Make the declarations const too. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-vbi.c | 2 +- drivers/media/pci/cx23885/cx23885.h | 2 +- drivers/media/pci/saa7134/saa7134-vbi.c | 2 +- drivers/media/pci/saa7134/saa7134.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 9676593c9060d011aa97f7ab3d2d63a1bf1c01df Author: Bhumika Goyal Date: Wed Sep 27 16:16:47 2017 +0200 media: zoran: make zoran_template const Make this const as it is only used in a copy operation in the file referencing it. Make the declaration const too. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/zoran/zoran_card.h | 2 +- drivers/media/pci/zoran/zoran_driver.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b145ef4f79757dc39488025bfc92481279461034 Author: Bhumika Goyal Date: Wed Sep 27 15:59:42 2017 +0200 media: bt8xx: make bttv_vbi_qops const Make this const as it is only passed to the const argument of the function videobuf_queue_sg_init in the file referencing it. Also, make the declaration in the header const. Structure found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/bt8xx/bttv-vbi.c | 2 +- drivers/media/pci/bt8xx/bttvp.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d688d0376c6eb452565c16c95b26cd2c95aa8a82 Author: Arnaldo Carvalho de Melo Date: Thu Oct 26 15:19:35 2017 -0300 perf trace beauty prctl: Generate 'option' string table from kernel headers This is one more case where the way that syscall parameter values are defined in kernel headers are easy to parse using a shell script that will then generate the string table that gets used by the prctl 'option' argument beautifier. This way as soon as the header syncronization mechanism in perf's build system detects a change in a copy of a kernel ABI header and that file is syncronized, we get 'perf trace' updated automagically. Further work needed for the PR_SET_ values, as well for using eBPF to copy the non-integer arguments to/from the kernel. E.g.: System wide prctl tracing: # perf trace -e prctl 1668.028 ( 0.025 ms): TaskSchedulerR/10649 prctl(option: SET_NAME, arg2: 0x2b61d5db15d0) = 0 3365.663 ( 0.018 ms): chrome/10650 prctl(option: SET_SECCOMP, arg2: 2, arg4: 8 ) = -1 EFAULT Bad address 3366.585 ( 0.010 ms): chrome/10650 prctl(option: SET_NO_NEW_PRIVS, arg2: 1 ) = 0 3367.173 ( 0.009 ms): TaskSchedulerR/10652 prctl(option: SET_NAME, arg2: 0x2b61d2aaa300) = 0 3367.222 ( 0.003 ms): TaskSchedulerR/10653 prctl(option: SET_NAME, arg2: 0x2b61d2aaa1e0) = 0 3367.244 ( 0.002 ms): TaskSchedulerR/10654 prctl(option: SET_NAME, arg2: 0x2b61d2aaa0c0) = 0 3367.265 ( 0.002 ms): TaskSchedulerR/10655 prctl(option: SET_NAME, arg2: 0x2b61d2ac7f90) = 0 3367.281 ( 0.002 ms): Chrome_ChildIO/10656 prctl(option: SET_NAME, arg2: 0x7efbe406bb11) = 0 3367.220 ( 0.004 ms): TaskSchedulerS/10651 prctl(option: SET_NAME, arg2: 0x2b61d2ac1be0) = 0 3370.906 ( 0.010 ms): GpuMemoryThrea/10657 prctl(option: SET_NAME, arg2: 0x7efbe386ab11) = 0 3370.983 ( 0.003 ms): File/10658 prctl(option: SET_NAME, arg2: 0x7efbe3069b11 ) = 0 3384.272 ( 0.020 ms): Compositor/10659 prctl(option: SET_NAME, arg2: 0x7efbe2868b11 ) = 0 3612.091 ( 0.012 ms): DOM Worker/11489 prctl(option: SET_NAME, arg2: 0x7f49ab97ebf2 ) = 0 4512.437 ( 0.004 ms): (sa1)/11490 prctl(option: SET_NAME, arg2: 0x7ffca15af844 ) = 0 4512.468 ( 0.002 ms): (sa1)/11490 prctl(option: SET_MM, arg2: ARG_START, arg3: 0x7f5cb7c81000) = 0 4512.472 ( 0.001 ms): (sa1)/11490 prctl(option: SET_MM, arg2: ARG_END, arg3: 0x7f5cb7c81006) = 0 4514.667 ( 0.002 ms): (sa1)/11490 prctl(option: GET_SECUREBITS ) = 0 Cc: Adrian Hunter Cc: Andy Lutomirski Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-q0s2uw579o5ei6xlh2zjirgz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 13 +++++- tools/perf/builtin-trace.c | 5 +- tools/perf/trace/beauty/Build | 1 + tools/perf/trace/beauty/beauty.h | 9 ++++ tools/perf/trace/beauty/prctl.c | 82 +++++++++++++++++++++++++++++++++ tools/perf/trace/beauty/prctl_option.sh | 17 +++++++ 6 files changed, 124 insertions(+), 3 deletions(-) commit 433727948904301b01f1d5ebf39893c96cd4bab7 Author: Arnaldo Carvalho de Melo Date: Thu Oct 26 14:41:01 2017 -0300 tools include uapi: Grab a copy of linux/prctl.h We will use it to generate tables for beautifying prctl's 'option' arg and some of the others eventually. Cc: Andy Lutomirski Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-cg8mpmz4hk9nfih685emnbk9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/linux/prctl.h | 200 +++++++++++++++++++++++++++++++++++++++ tools/perf/check-headers.sh | 1 + 2 files changed, 201 insertions(+) commit a14390fde64e862c4fe8b92ecb293ee4b12d5bfe Author: Arnaldo Carvalho de Melo Date: Thu Oct 26 10:30:20 2017 -0300 perf script: Allow creating per-event dump files Introduce a new option to dump trace output to files named by the monitored events and update perf-script documentation accordingly. Shown below is output of perf script command with the newly introduced option. $ perf record -e cycles -e cs -ag -- sleep 1 $ perf script --per-event-dump $ ls perf.data.cycles.dump perf.data.cs.dump Without per-event-dump support, drawing flamegraphs for different events would require post processing to separate events. You can monitor only one event at a time if you want to get flamegraphs for different events. Using this option, you can get the trace output files named by the monitored events, and could draw flamegraphs according to the event's name. Based-on-a-patch-by: yuzhoujian Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/r/1508921599-10832-3-git-send-email-yuzhoujian@didichuxing.com Link: http://lkml.kernel.org/n/tip-8ngzsjdhgiovkupl3r5yy570@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 4 +++ tools/perf/builtin-script.c | 59 +++++++++++++++++++++++++++++++- 2 files changed, 62 insertions(+), 1 deletion(-) commit e669e833da8d71a02e175dfffceaabc3eb010207 Author: Arnaldo Carvalho de Melo Date: Thu Oct 26 14:22:34 2017 -0300 perf evsel: Restore evsel->priv as a tool private area When we started using it for stats and did it not just in builtin-stat.c, but also for builtin-script.c, then it stopped being a tool private area, so introduce a new pointer for these stats and leave ->priv to its original purpose. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: yuzhoujian Fixes: cfc8874a4859 ("perf script: Process cpu/threads maps") Link: http://lkml.kernel.org/n/tip-jtpzx3rjqo78snmmsdzwb2eb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 4 ++-- tools/perf/util/evsel.h | 3 +++ tools/perf/util/stat.c | 16 ++++++++-------- 3 files changed, 13 insertions(+), 10 deletions(-) commit 894f3f1732cb4ae543d406e4fca1585e8c303a1c Author: Arnaldo Carvalho de Melo Date: Thu Oct 26 10:26:52 2017 -0300 perf script: Use event_format__fprintf() Another case where we a1a587073ccd ("perf script: Use fprintf like printing uniformly") forgot to redirect output to the FILE descriptor, fix this too. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: yuzhoujian Link: http://lkml.kernel.org/n/tip-jmwx4pgfezw98ezfoj9t957s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5ce2c5b4e484a87a8af48649775796fb349684db Author: Arnaldo Carvalho de Melo Date: Thu Oct 26 09:55:22 2017 -0300 perf script: Use pr_debug where appropriate We have facilities for reporting unexpected, unlikely errors, use them. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Michael Ellerman Cc: Namhyung Kim Cc: Wang Nan Cc: yuzhoujian Link: http://lkml.kernel.org/n/tip-c7j22xfjf1j773g7ufp607q0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 69c71252298acad7a25e9499929f723790f48e26 Author: Arnaldo Carvalho de Melo Date: Thu Oct 26 09:51:13 2017 -0300 perf script: Add a few missing conversions to fprintf style In a1a587073ccd ("perf script: Use fprintf like printing uniformly") there were a few cases that were missed, fix it. Reported-by: yuzhoujian Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-sq9hvfk5mkjdqzlpyiq7jkos@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit e641e02d78682f7749053d84d1729c5e37655ff9 Author: Arvind Yadav Date: Wed Sep 20 11:40:58 2017 +0200 media: coda: Handle return value of kasprintf kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Reviewed-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, 4 insertions(+) commit 3863d4bb554fdbe8cc521ad5653593923edc405b Author: Jacob Chen Date: Mon Sep 18 06:00:51 2017 +0200 media: i2c: tc358743: fix spelling mistake It should be "LP-11". Signed-off-by: Jacob Chen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e11d5027b1fed5bbd0d74842a0a60381a2be823 Author: Markus Elfring Date: Thu Sep 14 14:34:39 2017 +0200 media: tm6000: cleanup trival coding style issues - Delete seven error messages for a failed memory allocation - Adjust seven checks for null pointers - Use common error handling code in tm6000_usb_probe() - Adjust jump targets so that the function "kfree" will be always called with a non-null pointer. - Delete an initialisation for the local variable "dev" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/tm6000/tm6000-cards.c | 27 +++++++++++++-------------- drivers/media/usb/tm6000/tm6000-dvb.c | 11 ++++------- drivers/media/usb/tm6000/tm6000-input.c | 2 +- drivers/media/usb/tm6000/tm6000-video.c | 17 +++++------------ 4 files changed, 23 insertions(+), 34 deletions(-) commit 5bf24e08b685d862f1249987a6d3423b42989622 Author: Hans Verkuil Date: Fri Oct 13 18:01:32 2017 +0200 media: cec-pin.h: move non-kAPI parts into cec-pin-priv.h The kAPI cec-pin.h header also defined data structures that did not belong here but were private to the CEC core code. Split that part off into a cec-pin-priv.h header. Signed-off-by: Hans Verkuil Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-api.c | 1 + drivers/media/cec/cec-pin-priv.h | 133 +++++++++++++++++++++++++++++++++++++++ drivers/media/cec/cec-pin.c | 1 + include/media/cec-pin.h | 107 ------------------------------- 4 files changed, 135 insertions(+), 107 deletions(-) commit e69b987a97599456b95b5fef4aca8dcdb1505aea Author: Stanimir Varbanov Date: Fri Oct 13 16:13:17 2017 +0200 media: venus: reimplement decoder stop command This addresses the wrong behavior of decoder stop command by rewriting it. These new implementation enqueue an empty buffer on the decoder input buffer queue to signal end-of-stream. The client should stop queuing buffers on the V4L2 Output queue and continue queuing/dequeuing buffers on Capture queue. This process will continue until the client receives a buffer with V4L2_BUF_FLAG_LAST flag raised, which means that this is last decoded buffer with data. Signed-off-by: Stanimir Varbanov Tested-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Cc: # for v4.13 and up Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/core.h | 2 -- drivers/media/platform/qcom/venus/helpers.c | 7 ------ drivers/media/platform/qcom/venus/hfi.c | 1 + drivers/media/platform/qcom/venus/vdec.c | 34 +++++++++++++++++++---------- 4 files changed, 24 insertions(+), 20 deletions(-) commit 3863360c15da47e18d894268ad6182fdc7caf0c7 Author: Wei Yongjun Date: Wed Oct 11 13:16:43 2017 +0200 media: vimc: Fix return value check in vimc_add_subdevs() In case of error, the function platform_device_register_data() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vimc/vimc-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5232c37ce244db04fd50d160b92e40d2df46a2e9 Author: Stanimir Varbanov Date: Tue Oct 10 09:52:36 2017 +0200 media: venus: venc: fix bytesused v4l2_plane field This fixes wrongly filled bytesused field of v4l2_plane structure by include data_offset in the plane, Also fill data_offset and bytesused for capture type of buffers only. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Cc: # for v4.13 and up Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/venc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit f103ea11cd037943b511fa71c852ff14cc6de8ee Author: Wenyou Yang Date: Tue Oct 10 04:46:40 2017 +0200 media: atmel-isc: Rework the format list To improve the readability of code, split the format array into two, one for the format description, other for the register configuration. Meanwhile, add the flag member to indicate the format can be achieved from the sensor or be produced by the controller, and rename members related to the register configuration. Also add more formats support: GREY, ARGB444, ARGB555 and ARGB32. Signed-off-by: Wenyou Yang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc.c | 530 ++++++++++++++++++++++++------- 1 file changed, 411 insertions(+), 119 deletions(-) commit b0ea17c589a8b16b4405ab9088d6472cbe08d481 Author: Wenyou Yang Date: Tue Oct 10 04:46:39 2017 +0200 media: atmel-isc: Remove unnecessary member Remove the memeber *config from the isc_subdev_entity struct, the member is useless afterward. Signed-off-by: Wenyou Yang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 01192aa1c5c2a7363cc790ea102c7929ec577240 Author: Wenyou Yang Date: Tue Oct 10 04:46:38 2017 +0200 media: atmel-isc: Enable the clocks during probe To meet the relationship, enable the HCLOCK and ispck during the device probe, "isc_pck frequency is less than or equal to isc_ispck, and isc_ispck is greater than or equal to HCLOCK." Meanwhile, call the pm_runtime_enable() in the right place. Signed-off-by: Wenyou Yang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc.c | 34 ++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) commit 64f6306a5af21561ad6b9a3247fc68126b8be88a Author: Wenyou Yang Date: Tue Oct 10 04:46:37 2017 +0200 media: atmel-isc: Add prepare and unprepare ops A software write operation to the ISC_CLKEN or ISC_CLKDIS register requires double clock domain synchronization and is not permitted when the ISC_SR.SIP is asserted. So add the .prepare and .unprepare ops to make sure the ISC_CLKSR.SIP is unasserted before the write operation to the ISC_CLKEN or ISC_CLKDIS register. Signed-off-by: Wenyou Yang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc-regs.h | 1 + drivers/media/platform/atmel/atmel-isc.c | 40 +++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) commit cab1dea3be2e51578032c5aee6ac13ff7b4aaeb4 Author: Wenyou Yang Date: Tue Oct 10 04:46:36 2017 +0200 media: atmel-isc: Add spin lock for clock enable ops Add the spin lock for the clock enable and disable operations. Signed-off-by: Wenyou Yang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/atmel/atmel-isc.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 3ba2c76a9d3a339cd1b77e88915680ae2e9ac2da Author: Alexandre Belloni Date: Fri Oct 27 13:09:47 2017 +0200 rtc: ds1390: Add OF device ID table The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. Worse, the compatible is documented but doesn't currently match the driver. Add the proper compatible to the driver. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1390.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3a851c0312964997cd1afc760e179e7ff0e189b3 Author: Gustavo A. R. Silva Date: Tue Oct 24 21:42:06 2017 -0500 usb: atm: cxacru: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/cxacru.c | 2 ++ 1 file changed, 2 insertions(+) commit e4c6594dabe6de98754b2833c5591279b6820b2e Author: Gustavo A. R. Silva Date: Tue Oct 24 21:53:09 2017 -0500 usb: class: usbtmc: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/usb/class/usbtmc.c | 1 + 1 file changed, 1 insertion(+) commit 4dce3c4b9b581c4e54d3de083e1a97cb8ebf8c16 Merge: 6bd5bb1 4a4a8714 Author: Greg Kroah-Hartman Date: Fri Oct 27 12:36:06 2017 +0200 Merge tag 'extcon-next-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into usb-next Chanwoo writes: Update extcon for 4.15 Detailed description for this pull request: 1. Split out extcon header file for consumer and provider device : The extcon has two type of extcon devices as following. - 'extcon provider deivce' adds new extcon device and detect the state/properties of external connector. Also, it notifies the state/properties to the extcon consumer device. - 'extcon consumer device' gets the change state/properties from extcon provider device. Prior to that, include/linux/extcon.h contains all exported API for both provider and consumer device driver. To clarify the meaning of header file and to remove the wrong use-case on consumer device. - include/linux/extcon-provider.h includes API for the provider device driver. - include/linux/extcon.h includes the API for the consumer device driver. 2. Support the SmartDock accessory on extcon-max77843.c device driver - Support the SmartDock accessory which detects following connectors at the same time. : USB host throught USB hub for mouse, keyboard and so on. : MHL connector for video output. : Charger connector for battery charging. - It tested with Unitek Y-2165 MHL+OTG Hub Smart Phone Dock. 3. Fix the minor issue of extcon driver - Delete the unneeded initialization in extcon-max14577. - Make extcon_info static const in order to fix the warning. commit 6bd5bb1ede67a9681d975c46c55bd8ebaa0926da Merge: c929d84 3691411 Author: Greg Kroah-Hartman Date: Fri Oct 27 11:52:46 2017 +0200 Merge tag 'phy-for-4.15_v1' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next Kishon writes: phy: for 4.15 *) Add support in phy core to perform phy calibration *) Return NULL for optional PHY's even if CONFIG_GENERIC_PHY is not selected *) Add USB Phy driver for Broadcom STB SoCs *) Add support to force mediatek PHY with USB OTG function to enter a specific mode *) Calibrate rockchip-typec PHY according to docs *) Enable dual route feature for sun4i-usb in V3s SoC *) Use dr_mode dt property to enable otg capability in rcar-gen3-usb2 *) Add driver data to specify dedicated otg pins in rcar-gen3-usb2 driver *) Configure the RX equalizer of brcm-sata PHY *) Update pcie phy settings for ti-pipe3 phy *) Add set_mode callback in qcom-ufs-qmp-14nm phy *) Use PHY callbacks in phy-qcom-ufs instead of export APIs Signed-off-by: Kishon Vijay Abraham I commit 74a0f5739292a636d337ad6f8d7cd0061636e0eb Author: Kees Cook Date: Wed Oct 11 16:27:10 2017 -0700 scsi: smartpqi: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "Martin K. Petersen" Cc: Don Brace Cc: "James E.J. Bottomley" Cc: esc.storagedev@microsemi.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen Acked-by: Don Brace drivers/scsi/smartpqi/smartpqi_init.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 2c4b9637b69cab846d8c443bf6775356321950c4 Author: Kees Cook Date: Wed Oct 11 16:25:40 2017 -0700 scsi: libiscsi: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Lee Duncan Cc: Chris Leech Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: open-iscsi@googlegroups.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen Reviewed-by: Chris Leech drivers/scsi/libiscsi.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 1f0849dac19ba35087e7a2056dde8206aa23c5e7 Author: Kees Cook Date: Wed Oct 11 12:51:53 2017 -0700 scsi: libfc: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This removes several redundant setup calls in favor of just changing the timer function directly. Cc: Johannes Thumshirn Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: fcoe-devel@open-fcoe.org Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen Acked-by: Johannes Thumshirn drivers/scsi/libfc/fc_fcp.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit b0a2dc66152aa409860e02804169b0007244ebd7 Author: Kees Cook Date: Fri Sep 1 23:21:24 2017 -0700 scsi: isci: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Intel SCU Linux support Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Artur Paszkiewicz drivers/scsi/isci/host.c | 12 ++++++------ drivers/scsi/isci/isci.h | 6 ++---- drivers/scsi/isci/phy.c | 4 ++-- drivers/scsi/isci/port.c | 4 ++-- drivers/scsi/isci/port_config.c | 8 ++++---- 5 files changed, 16 insertions(+), 18 deletions(-) commit 7932589f47d5d5eaa9948bd479b42819b6b10509 Author: Kees Cook Date: Wed Oct 11 17:17:42 2017 -0700 scsi: gdth: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen drivers/scsi/gdth.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 13059106242bc96f8f5ab79c0f6cb15c7b756f40 Author: Kees Cook Date: Thu Sep 21 13:12:15 2017 -0700 scsi: fcoe: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: QLogic-Storage-Upstream@qlogic.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Johannes Thumshirn Cc: linux-scsi@vger.kernel.org Cc: fcoe-devel@open-fcoe.org Signed-off-by: Kees Cook Acked-by: Johannes Thumshirn drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 11 +++++------ drivers/scsi/fcoe/fcoe.c | 2 +- drivers/scsi/fcoe/fcoe_transport.c | 6 ++++-- include/scsi/libfcoe.h | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) commit af53b89becdcee2f15c60e6a9e951bd96d382e1c Author: Kees Cook Date: Wed Oct 11 21:51:09 2017 -0700 scsi: dc395x: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Oliver Neukum Cc: Ali Akcaagac Cc: Jamie Lenehan Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen drivers/scsi/dc395x.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit abef751056130c90199e3bfc32916715795cde39 Author: Kees Cook Date: Tue Aug 22 16:38:10 2017 -0700 scsi: bnx2i: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. There was a seemingly missing call to initialize the timer in one handler, so this was added to remove the open-coded initialization. Cc: QLogic-Storage-Upstream@qlogic.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen drivers/scsi/bnx2i/bnx2i.h | 2 +- drivers/scsi/bnx2i/bnx2i_hwi.c | 4 ++-- drivers/scsi/bnx2i/bnx2i_iscsi.c | 15 ++++----------- 3 files changed, 7 insertions(+), 14 deletions(-) commit b386eec6b0af30c947bf439bfabffb8fd6ab5fc0 Author: Kees Cook Date: Wed Oct 11 16:15:26 2017 -0700 scsi: be2iscsi: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Subbu Seetharaman Cc: Ketan Mukadam Cc: Jitendra Bhivare Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 30199bee2d8da237086f7e8067e31814967e3d04 Author: Kees Cook Date: Wed Oct 11 15:53:34 2017 -0700 scsi: aic94xx: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "Martin K. Petersen" Cc: "James E.J. Bottomley" Cc: Tomas Henzl Cc: Quentin Lambert Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Martin K. Petersen drivers/scsi/aic94xx/aic94xx_hwi.c | 3 +-- drivers/scsi/aic94xx/aic94xx_hwi.h | 5 ++--- drivers/scsi/aic94xx/aic94xx_scb.c | 6 +++--- drivers/scsi/aic94xx/aic94xx_tmf.c | 13 ++++++------- 4 files changed, 12 insertions(+), 15 deletions(-) commit 85078fd095470fb85772deb62466bf69a001c098 Merge: 7706abf f98677c Author: Greg Kroah-Hartman Date: Fri Oct 27 11:13:08 2017 +0200 Merge tag 'iio-for-4.15c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Third set of new device support, cleanups and features for IIO in the 4.15 cycle New device support * ti-dac082s085 dac - new driver supporting 8, 10 and 12 bit TI DACs with 2 and 4 channels: DAC082S085, DAC102S085, DAC122S085, DAC104s085 and DAC124S085. Minor features and cleanps * adc12138 - make array ch_to_mux static for small object code size reduction. * sun4i-gpadc - use of_device_get_match_data rather than opencoding it. * stm32 trigger - add tim15 tigger on STM32H7 - check clock rate to avoid potential division by zero * tsl2x7x staging cleanups. - move *_thresh_period to being created by IIO core. - remove unused tsl2x7x_parse_result structure. - sort includes - drop a repeat iio_dev forward definition - fix some code alignment of defines. - use IIO_CONST_ATTR for constant string attribute - drop some unnecessary parentheses - fix various alignment with parenthese - rename power defines for readability reasons - fix a missaligned break statement - Tidy up function definitions so they fit on a single line. commit 0d3d73aac2ff05c78387aa9dcc2c8aa3804405e7 Author: Peter Zijlstra Date: Tue Sep 5 14:16:28 2017 +0200 perf/core: Rewrite event timekeeping The current even timekeeping, which computes enabled and running times, uses 3 distinct timestamps to reflect the various event states: OFF (stopped), INACTIVE (enabled) and ACTIVE (running). Furthermore, the update rules are such that even INACTIVE events need their timestamps updated. This is undesirable because we'd like to not touch INACTIVE events if at all possible, this makes event scheduling (much) more expensive than needed. Rewrite the timekeeping to directly use event->state, this greatly simplifies the code and results in only having to update things when we change state, or an up-to-date value is requested (read). Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/perf_event.h | 19 +-- kernel/events/core.c | 385 +++++++++++++++------------------------------ 2 files changed, 130 insertions(+), 274 deletions(-) commit 0c1cbc18df9e38182a0604b15535699c84d7342a Author: Peter Zijlstra Date: Tue Sep 5 16:26:44 2017 +0200 perf/core: Fix perf_event_read() perf_event_read() has a number of issues regarding the timekeeping bits. - The IPI didn't update group times when it found INACTIVE - The direct call would not re-check ->state after taking ctx->lock which can result in ->count and timestamps getting out of sync. And we can make use of the ordering introduced for perf_event_stop() to make it more accurate for ACTIVE. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/events/core.c | 55 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 16 deletions(-) commit 7f0ec32526d2446fdd79b0c6c6d08e64ef9fb1f3 Author: Peter Zijlstra Date: Tue Sep 5 14:17:58 2017 +0200 perf/core: Remove wrong barrier The barrier and comment make no sense: - if what the barrier says is true, it should be wmb() but that should then be part of the arch driver, not the generic code. - if it is an SMP barrier, there must be a matching barrier, and there isn't one. So kill it. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/events/core.c | 5 ----- 1 file changed, 5 deletions(-) commit 8ca2bd41c7d1c135e9ac6f25970c2d491865088a Author: Peter Zijlstra Date: Tue Sep 5 14:12:35 2017 +0200 perf/core: Rename 'enum perf_event_active_state' Its a weird name, active is one of the states, it should not be part of the name, also, its too long. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar include/linux/perf_event.h | 6 +++--- kernel/events/core.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 3c5c8711dcb32115156cc7672fa095afa4339eaa Author: Peter Zijlstra Date: Tue Sep 5 13:44:51 2017 +0200 perf/core: Make sure to update ctx time before using it We should make sure to update ctx time before we use it to update event times. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/events/core.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit a9cd8194e1e6bd09619954721dfaf0f94fe2003e Author: Peter Zijlstra Date: Tue Sep 5 13:38:24 2017 +0200 perf/core: Fix __perf_read_group_add() locking Event timestamps are serialized using ctx->lock, make sure to hold it over reading all values. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/events/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ee098c97a6ebe163180e74b740c0a37bcdaa173 Author: Peter Zijlstra Date: Tue Sep 5 13:24:28 2017 +0200 perf/core: Update ctx time before detaching events We should make sure the ctx time is updated before we detach events; which will want to update event times. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar kernel/events/core.c | 1 + 1 file changed, 1 insertion(+) commit ca0dd44cf37bfe316751e1701439c3ff44beb05c Author: Peter Zijlstra Date: Tue Sep 5 13:23:44 2017 +0200 perf/core: Fix perf_event_read_value() locking perf_event_read_value() is an external accessor, just like perf_event_{en,dis}able() and should thus use perf_event_ctx_lock(). Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: f63a8daa5812 ("perf: Fix event->ctx locking") Signed-off-by: Ingo Molnar kernel/events/core.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 7d9285e82db5defca4d9674ba089429eeca0c697 Author: Yonghong Song Date: Thu Oct 5 09:19:19 2017 -0700 perf/bpf: Extend the perf_event_read_local() interface, a.k.a. "bpf: perf event change needed for subsequent bpf helpers" eBPF programs would like access to the (perf) event enabled and running times along with the event value, such that they can deal with event multiplexing (among other things). This patch extends the interface; a future eBPF patch will utilize the new functionality. [ Note, there's a same-content commit with a poor changelog and a meaningless title in the networking tree as well - but we need this change for subsequent perf work, so apply it here as well, with a proper changelog. Hopefully Git will be able to sort out this somewhat messy workflow, if there are no other, conflicting changes to these files. ] Signed-off-by: Yonghong Song [ Rewrote the changelog. ] Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Cc: Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: David S. Miller Link: http://lkml.kernel.org/r/20171005161923.332790-2-yhs@fb.com Signed-off-by: Ingo Molnar include/linux/perf_event.h | 7 +++++-- kernel/bpf/arraymap.c | 2 +- kernel/events/core.c | 15 +++++++++++++-- kernel/trace/bpf_trace.c | 2 +- 4 files changed, 20 insertions(+), 6 deletions(-) commit 6856b8e53609ee3eff7e3173e4e5d979f47d834d Merge: 57646b6 2eece39 Author: Ingo Molnar Date: Fri Oct 27 10:31:44 2017 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit af8e947079a7dab0480b5d6db6b093fd04b86fc9 Author: Masahiro Yamada Date: Fri Oct 27 13:11:10 2017 +0900 x86/build: Beautify build log of syscall headers This makes the build log look nicer. Before: SYSTBL arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h SYSHDR arch/x86/entry/syscalls/../../include/generated/asm/unistd_32_ia32.h SYSHDR arch/x86/entry/syscalls/../../include/generated/asm/unistd_64_x32.h SYSTBL arch/x86/entry/syscalls/../../include/generated/asm/syscalls_64.h SYSHDR arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_32.h SYSHDR arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_64.h SYSHDR arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_x32.h After: SYSTBL arch/x86/include/generated/asm/syscalls_32.h SYSHDR arch/x86/include/generated/asm/unistd_32_ia32.h SYSHDR arch/x86/include/generated/asm/unistd_64_x32.h SYSTBL arch/x86/include/generated/asm/syscalls_64.h SYSHDR arch/x86/include/generated/uapi/asm/unistd_32.h SYSHDR arch/x86/include/generated/uapi/asm/unistd_64.h SYSHDR arch/x86/include/generated/uapi/asm/unistd_x32.h Signed-off-by: Masahiro Yamada Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: "H. Peter Anvin" Cc: linux-kbuild@vger.kernel.org Link: http://lkml.kernel.org/r/1509077470-2735-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Ingo Molnar arch/x86/entry/syscalls/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5a63b04ed508daf5e208fde74bfcc1b3c848ee86 Merge: 1d1aa8f 0a590a3 Author: Kalle Valo Date: Fri Oct 27 11:09:14 2017 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for 4.15. Major changes: ath10k * add support for CCMP-256, GCMP and GCMP-256 ciphers on hardware there it's supported (QCA99x0 and QCA4019) commit 1d1aa8f1ea247debf59c857f0d1bee324e43c9ea Author: Ping-Ke Shih Date: Tue Oct 24 10:03:31 2017 +0800 rtlwifi: Remove seq_number from rtl_tid_data Since mac80211 maintains the sequence number for each STA/TID, driver doesn't need to maintain a copy. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 6 ++---- drivers/net/wireless/realtek/rtlwifi/pci.c | 17 ----------------- drivers/net/wireless/realtek/rtlwifi/usb.c | 17 ----------------- drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 - 4 files changed, 2 insertions(+), 39 deletions(-) commit 62689167261d4f64eecf4077db247264144df147 Author: Nik Nyby Date: Mon Oct 23 21:49:09 2017 -0400 rtlwifi: rtl8821ae: Fix typo in variable name In _rtl8821ae_dbi_write(), wrtie_addr should be write_addr. Signed-off-by: Nik Nyby Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 758f7e06063a87b67c118794a3ba8931cced67c6 Author: Joe Perches Date: Wed Oct 18 22:45:27 2017 -0700 bcma: Use bcma_debug and not pr_cont in MIPS driver Commit 66cc04424960 ("bcma: use bcma_debug and pr_cont in MIPS driver") converted a printk(KERN_DEBUG to bcma_debug. bcma_debug is guarded by a #define DEBUG via pr_debug. This means that the bcma_debug will generally not be emitted but any pr_cont following the bcma_debug will be emitted. Correct this by removing the uses of pr_cont by using a temporary. Signed-off-by: Joe Perches Signed-off-by: Kalle Valo drivers/bcma/driver_mips.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 150dfee95feb913876ced5cc559a342384e8ea97 Author: Frederic Weisbecker Date: Fri Oct 27 04:42:38 2017 +0200 sched/isolation: Add basic isolcpus flags Add flags to control NOHZ and domain isolation from "isolcpus=", in order to centralize the isolation features to a common interface. Domain isolation remains the default so not to break the existing isolcpus boot paramater behaviour. Further flags in the future may include 0hz (1hz tick offload) and timers, workqueue, RCU, kthread, watchdog, likely all merged together in a common flag ("async"?). In any case, this will have to be modifiable by cpusets. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Chris Metcalf Cc: Christoph Lameter Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rik van Riel Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1509072159-31808-12-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar kernel/sched/isolation.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit edb9382175c3ebdced8ffdb3e0f20052ad9fdbe9 Author: Frederic Weisbecker Date: Fri Oct 27 04:42:37 2017 +0200 sched/isolation: Move isolcpus= handling to the housekeeping code We want to centralize the isolation features, to be done by the housekeeping subsystem and scheduler domain isolation is a significant part of it. No intended behaviour change, we just reuse the housekeeping cpumask and core code. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Chris Metcalf Cc: Christoph Lameter Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rik van Riel Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1509072159-31808-11-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar drivers/base/cpu.c | 11 ++++++- include/linux/sched.h | 2 -- include/linux/sched/isolation.h | 1 + kernel/cgroup/cpuset.c | 15 ++++------ kernel/sched/core.c | 16 +---------- kernel/sched/isolation.c | 63 ++++++++++++++++++++++++++++++++--------- kernel/sched/topology.c | 24 ++++------------ 7 files changed, 73 insertions(+), 59 deletions(-) commit 6f1982fedd59856bcc42a9b521be4c3ffd2f60a7 Author: Frederic Weisbecker Date: Fri Oct 27 04:42:36 2017 +0200 sched/isolation: Handle the nohz_full= parameter We want to centralize the isolation management, done by the housekeeping subsystem. Therefore we need to handle the nohz_full= parameter from there. Since nohz_full= so far has involved unbound timers, watchdog, RCU and tilegx NAPI isolation, we keep that default behaviour. nohz_full= will be deprecated in the future. We want to control the isolation features from the isolcpus= parameter. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Chris Metcalf Cc: Christoph Lameter Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rik van Riel Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1509072159-31808-10-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar include/linux/sched/isolation.h | 1 + include/linux/tick.h | 2 ++ init/Kconfig | 1 - kernel/sched/isolation.c | 42 +++++++++++++++++++++++++++++------------ kernel/time/tick-sched.c | 13 +++---------- 5 files changed, 36 insertions(+), 23 deletions(-) commit de201559df872f83d0c08fb4effe3efd28e6cbc8 Author: Frederic Weisbecker Date: Fri Oct 27 04:42:35 2017 +0200 sched/isolation: Introduce housekeeping flags Before we implement isolcpus under housekeeping, we need the isolation features to be more finegrained. For example some people want NOHZ_FULL without the full scheduler isolation, others want full scheduler isolation without NOHZ_FULL. So let's cut all these isolation features piecewise, at the risk of overcutting it right now. We can still merge some flags later if they always make sense together. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Chris Metcalf Cc: Christoph Lameter Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rik van Riel Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1509072159-31808-9-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar drivers/net/ethernet/tile/tilegx.c | 4 ++-- include/linux/sched/isolation.h | 26 +++++++++++++++++--------- kernel/rcu/tree_plugin.h | 2 +- kernel/rcu/update.c | 2 +- kernel/sched/core.c | 8 ++++---- kernel/sched/fair.c | 2 +- kernel/sched/isolation.c | 26 +++++++++++++++----------- kernel/watchdog.c | 3 ++- 8 files changed, 43 insertions(+), 30 deletions(-) commit 5c4991e24c69737bd41fc2737b1e3980abbf73f9 Author: Frederic Weisbecker Date: Fri Oct 27 04:42:34 2017 +0200 sched/isolation: Split out new CONFIG_CPU_ISOLATION=y config from CONFIG_NO_HZ_FULL Split the housekeeping config from CONFIG_NO_HZ_FULL. This way we finally separate the isolation code from NOHZ. Although a dependency to CONFIG_NO_HZ_FULL remains for now, while the housekeeping code still deals with NOHZ internals. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Chris Metcalf Cc: Christoph Lameter Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rik van Riel Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1509072159-31808-8-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar include/linux/sched/isolation.h | 6 +++--- init/Kconfig | 8 ++++++++ kernel/sched/Makefile | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) commit 204c083a009378dfa751175b5fcddc75988bab6c Author: Frederic Weisbecker Date: Fri Oct 27 04:42:33 2017 +0200 sched/isolation: Rename is_housekeeping_cpu() to housekeeping_cpu() Fit it into the housekeeping_*() namespace. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Chris Metcalf Cc: Christoph Lameter Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rik van Riel Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1509072159-31808-7-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar include/linux/sched/isolation.h | 2 +- kernel/sched/core.c | 6 +++--- kernel/sched/fair.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit e179f5a04ba46ee5c5439480c2bfd68c358168b7 Author: Frederic Weisbecker Date: Fri Oct 27 04:42:32 2017 +0200 sched/isolation: Use its own static key Housekeeping code still depends on the nohz_full static key. Since we want to decouple housekeeping from NOHZ, let's create a housekeeping specific static key. It's mostly relevant for calls to is_housekeeping_cpu() from the scheduler. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Chris Metcalf Cc: Christoph Lameter Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rik van Riel Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1509072159-31808-6-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar include/linux/sched/isolation.h | 3 ++- kernel/sched/isolation.c | 13 +++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) commit 7e56a1cf4b28f5739526877b8dbad623fae2e4e7 Author: Frederic Weisbecker Date: Fri Oct 27 04:42:31 2017 +0200 sched/isolation: Make the housekeeping cpumask private Nobody needs to access this detail. housekeeping_cpumask() already takes care of it. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Chris Metcalf Cc: Christoph Lameter Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rik van Riel Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1509072159-31808-5-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar include/linux/sched/isolation.h | 31 ++++++++++--------------------- kernel/sched/isolation.c | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 22 deletions(-) commit 9f0ca2d97ef0b5e966be2cfef26c7c094ec14e41 Author: Frederic Weisbecker Date: Fri Oct 27 04:42:30 2017 +0200 sched/isolation: Provide a dynamic off-case to housekeeping_any_cpu() housekeeping_any_cpu() doesn't handle correctly the case where CONFIG_NO_HZ_FULL=y and no CPU is in nohz_full mode. So far no caller needs this but let's prepare to avoid any future surprise. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Chris Metcalf Cc: Christoph Lameter Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rik van Riel Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1509072159-31808-4-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar include/linux/sched/isolation.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 13316b31fdaaa45f06793eb7992588359ba6ab9f Author: Frederic Weisbecker Date: Fri Oct 27 04:42:29 2017 +0200 sched/isolation, watchdog: Use housekeeping_cpumask() instead of ad-hoc version While trying to disable the watchog on nohz_full CPUs, the watchdog implements an ad-hoc version of housekeeping_cpumask(). Lets replace those re-invented lines. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Cc: Chris Metcalf Cc: Christoph Lameter Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rik van Riel Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1509072159-31808-3-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar kernel/watchdog.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 7863406143d8bbbbda07a61285c5f4c217908dfd Author: Frederic Weisbecker Date: Fri Oct 27 04:42:28 2017 +0200 sched/isolation: Move housekeeping related code to its own file The housekeeping code is currently tied to the NOHZ code. As we are planning to make housekeeping independent from it, start with moving the relevant code to its own file. Signed-off-by: Frederic Weisbecker Acked-by: Thomas Gleixner Acked-by: Paul E. McKenney Cc: Chris Metcalf Cc: Christoph Lameter Cc: Linus Torvalds Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Rik van Riel Cc: Wanpeng Li Link: http://lkml.kernel.org/r/1509072159-31808-2-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar drivers/net/ethernet/tile/tilegx.c | 2 +- include/linux/sched/isolation.h | 56 ++++++++++++++++++++++++++++++++++++++ include/linux/tick.h | 37 ------------------------- init/main.c | 2 ++ kernel/rcu/tree_plugin.h | 1 + kernel/rcu/update.c | 1 + kernel/sched/Makefile | 1 + kernel/sched/core.c | 1 + kernel/sched/fair.c | 1 + kernel/sched/isolation.c | 33 ++++++++++++++++++++++ kernel/time/tick-sched.c | 18 ------------ kernel/watchdog.c | 1 + 12 files changed, 98 insertions(+), 56 deletions(-) commit ad1987d673920dd136006b56c9f3e4ab829356fe Author: Arnd Bergmann Date: Fri Sep 22 23:29:14 2017 +0200 brcmsmac: reindent split functions In the previous commit I left the indentation alone to help reviewing the patch, this one now runs the three new functions through 'indent -kr -8' with some manual fixups to avoid silliness. No changes other than whitespace are intended here. Signed-off-by: Arnd Bergmann Acked-by: Arend van Spriel Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmsmac/phy/phy_n.c | 1507 +++++++++----------- 1 file changed, 697 insertions(+), 810 deletions(-) commit 0425f079590c1e10561642c265523e4ccec2d9c7 Author: Arnd Bergmann Date: Fri Sep 22 23:29:13 2017 +0200 brcmsmac: split up wlc_phy_workarounds_nphy The stack consumption in this driver is still relatively high, with one remaining warning if the warning level is lowered to 1536 bytes: drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c:17135:1: error: the frame size of 1880 bytes is larger than 1536 bytes [-Werror=frame-larger-than=] The affected function is actually a collection of three separate implementations, and each of them is fairly large by itself. Splitting them up is done easily and improves readability at the same time. I'm leaving the original indentation to make the review easier. Acked-by: Arend van Spriel Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo .../broadcom/brcm80211/brcmsmac/phy/phy_n.c | 178 ++++++++++++--------- 1 file changed, 104 insertions(+), 74 deletions(-) commit 78ce6a9083c4f5ac1a73aa0b614c852db2d4e982 Author: Kees Cook Date: Tue Oct 24 02:29:28 2017 -0700 libertas: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Kalle Valo Cc: Arvind Yadav Cc: Ingo Molnar Cc: Johannes Berg Cc: "David S. Miller" Cc: Andrew Zaborowski Cc: libertas-dev@lists.infradead.org Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Kalle Valo drivers/net/wireless/marvell/libertas/if_usb.c | 6 +++--- drivers/net/wireless/marvell/libertas/main.c | 21 +++++++++------------ drivers/net/wireless/marvell/libertas_tf/if_usb.c | 6 +++--- drivers/net/wireless/marvell/libertas_tf/main.c | 7 +++---- 4 files changed, 18 insertions(+), 22 deletions(-) commit 08c2eb8ec800b1b5447728af0ffeebf6346bdcf2 Author: Kees Cook Date: Tue Oct 24 02:29:19 2017 -0700 mwifiex: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Kalle Valo Cc: Amitkumar Karwar Cc: Nishant Sarmukadam Cc: Ganapathi Bhat Cc: Xinming Hu Cc: Arvind Yadav Cc: Ingo Molnar Cc: Johannes Berg Cc: "David S. Miller" Cc: Andrew Zaborowski Cc: libertas-dev@lists.infradead.org Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c | 7 +++---- drivers/net/wireless/marvell/mwifiex/cmdevt.c | 5 ++--- drivers/net/wireless/marvell/mwifiex/init.c | 7 +++---- drivers/net/wireless/marvell/mwifiex/main.c | 3 +-- drivers/net/wireless/marvell/mwifiex/main.h | 4 ++-- drivers/net/wireless/marvell/mwifiex/tdls.c | 7 +++---- drivers/net/wireless/marvell/mwifiex/usb.c | 9 ++++----- 7 files changed, 18 insertions(+), 24 deletions(-) commit e28aa8aeab433b62e85a2da8d9bff2ba81c2ea4e Author: Eric Biggers Date: Thu Oct 26 20:12:07 2017 -0700 MAINTAINERS: remove David Safford as maintainer for encrypted+trusted keys Emails to David's listed email address bounce, and in the commit log there's no activity from him within the last 5 years. Cc: Mimi Zohar Cc: David Safford Signed-off-by: Eric Biggers Signed-off-by: James Morris MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) commit dfefb9f8d082b609197f7ea852333e7a5ecc9563 Author: Kees Cook Date: Tue Oct 24 02:29:09 2017 -0700 drivers/wireless: rsi: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Kalle Valo Cc: Amitkumar Karwar Cc: Prameela Rani Garnepudi Cc: Pavani Muthyala Cc: Karun Eagalapati Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_hal.c | 7 +++---- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 4 ++-- drivers/net/wireless/rsi/rsi_91x_main.c | 4 +--- drivers/net/wireless/rsi/rsi_common.h | 2 +- 4 files changed, 7 insertions(+), 10 deletions(-) commit e3dcf8bbeb0c58df475cad58e2dc267a5c02ae20 Author: Kees Cook Date: Tue Oct 24 02:29:00 2017 -0700 cw1200: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Solomon Peachy Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Kalle Valo drivers/net/wireless/st/cw1200/main.c | 3 +-- drivers/net/wireless/st/cw1200/queue.c | 6 +++--- drivers/net/wireless/st/cw1200/sta.c | 5 ++--- drivers/net/wireless/st/cw1200/sta.h | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) commit 3e79202b11526f6662d73501877cc18cf95b2ff8 Author: Kees Cook Date: Tue Oct 24 02:28:52 2017 -0700 atmel: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Simon Kelley Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Kalle Valo drivers/net/wireless/atmel/atmel.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 2b77839b37345693c565c835179c5f6f50a0ed77 Author: Kees Cook Date: Tue Oct 24 02:28:45 2017 -0700 iwlegacy: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Kalle Valo Cc: Stanislaw Gruszka Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlegacy/3945-mac.c | 2 +- drivers/net/wireless/intel/iwlegacy/3945-rs.c | 10 +++------- drivers/net/wireless/intel/iwlegacy/4965-mac.c | 9 ++++----- drivers/net/wireless/intel/iwlegacy/common.c | 4 ++-- drivers/net/wireless/intel/iwlegacy/common.h | 2 +- 5 files changed, 11 insertions(+), 16 deletions(-) commit 7e916cafb4d97227713497723a200be41fe1a4b2 Author: Kees Cook Date: Tue Oct 24 02:28:37 2017 -0700 qtnfmac: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Kalle Valo Cc: Igor Mitsyanko Cc: Avinash Patil Cc: Sergey Matyukevich Cc: Kamlesh Rath Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 7 +++---- drivers/net/wireless/quantenna/qtnfmac/core.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) commit 7c51d17c027e52ef6ccc075e31c2eb44c13e3a32 Author: Kees Cook Date: Tue Oct 24 02:28:29 2017 -0700 rtlwifi: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Kalle Valo Cc: Larry Finger Cc: Chaoming Li Cc: Ping-Ke Shih Cc: Arvind Yadav Cc: Souptick Joarder Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 20 ++++++++++---------- drivers/net/wireless/realtek/rtlwifi/base.h | 4 ++-- drivers/net/wireless/realtek/rtlwifi/core.c | 2 +- drivers/net/wireless/realtek/rtlwifi/ps.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c | 6 ++++-- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 7 +++++-- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c | 12 ++++-------- 9 files changed, 29 insertions(+), 28 deletions(-) commit 010b64f7f198c96b1c5de995646753de375843c4 Merge: 4dc12ff af9b69a Author: David S. Miller Date: Fri Oct 27 16:35:43 2017 +0900 Merge branch 'tcp-move-14-sysctls-to-namespaces' Eric Dumazet says: ==================== tcp: move 14 sysctls to namespaces Ideally all TCP sysctls should be per netns. This patch series takes care of 14 of sysctls. More to come later. ==================== Signed-off-by: David S. Miller commit af9b69a7a6ca6b817e8d6f416e7aa5b2a5bf1d91 Author: Eric Dumazet Date: Thu Oct 26 21:55:10 2017 -0700 tcp: Namespace-ify sysctl_tcp_frto Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_input.c | 3 +-- net/ipv4/tcp_ipv4.c | 1 + 5 files changed, 10 insertions(+), 10 deletions(-) commit 94f0893e0c27219f4a726932618505aab6795973 Author: Eric Dumazet Date: Thu Oct 26 21:55:09 2017 -0700 tcp: Namespace-ify sysctl_tcp_adv_win_scale Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 9 ++++----- net/ipv4/sysctl_net_ipv4.c | 18 +++++++++--------- net/ipv4/tcp_input.c | 13 +++++-------- net/ipv4/tcp_ipv4.c | 1 + 5 files changed, 20 insertions(+), 22 deletions(-) commit 0c12654ac6d9004b9538b2a969b2b59e9a5ed831 Author: Eric Dumazet Date: Thu Oct 26 21:55:08 2017 -0700 tcp: Namespace-ify sysctl_tcp_app_win Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_input.c | 8 ++++---- net/ipv4/tcp_ipv4.c | 1 + 5 files changed, 13 insertions(+), 12 deletions(-) commit 6496f6bde0c323fba5e8c5b5cbf3a7bf28dad7ed Author: Eric Dumazet Date: Thu Oct 26 21:55:07 2017 -0700 tcp: Namespace-ify sysctl_tcp_dsack Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_input.c | 5 ++--- net/ipv4/tcp_ipv4.c | 1 + 5 files changed, 11 insertions(+), 11 deletions(-) commit c6e218035913e14952b04ceecf1a543205106fdb Author: Eric Dumazet Date: Thu Oct 26 21:55:06 2017 -0700 tcp: Namespace-ify sysctl_tcp_max_reordering Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_input.c | 3 +-- net/ipv4/tcp_ipv4.c | 2 ++ 5 files changed, 11 insertions(+), 10 deletions(-) commit 773d4bb96ceca6829ae9928f6b002b93e2e62cdc Author: Eric Dumazet Date: Thu Oct 26 21:55:05 2017 -0700 tcp: remove stale sysctl_tcp_reordering This extern is no longer used. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/tcp.h | 1 - 1 file changed, 1 deletion(-) commit 0bc65a28ae2aeb14aab7f4a930e0d8cf4cad9dc4 Author: Eric Dumazet Date: Thu Oct 26 21:55:04 2017 -0700 tcp: Namespace-ify sysctl_tcp_fack Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp.c | 2 +- net/ipv4/tcp_input.c | 3 +-- net/ipv4/tcp_minisocks.c | 2 +- 6 files changed, 11 insertions(+), 12 deletions(-) commit 65c9410cf55ecf32da1b720f563365d565d6289a Author: Eric Dumazet Date: Thu Oct 26 21:55:03 2017 -0700 tcp: Namespace-ify sysctl_tcp_abort_on_overflow Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_minisocks.c | 4 +--- 4 files changed, 9 insertions(+), 11 deletions(-) commit 625357aa175c688d219da43c8cfaa2e1629e0e1a Author: Eric Dumazet Date: Thu Oct 26 21:55:02 2017 -0700 tcp: Namespace-ify sysctl_tcp_rfc1337 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_input.c | 1 - net/ipv4/tcp_minisocks.c | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) commit 3f4c7c6f6a9053493ce7dd8a0f17ed8eafc53893 Author: Eric Dumazet Date: Thu Oct 26 21:55:01 2017 -0700 tcp: Namespace-ify sysctl_tcp_stdurg Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_input.c | 3 +-- 4 files changed, 9 insertions(+), 10 deletions(-) commit e0a1e5b519236dc1662ff25e42560dd1be9e3776 Author: Eric Dumazet Date: Thu Oct 26 21:55:00 2017 -0700 tcp: Namespace-ify sysctl_tcp_retrans_collapse Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_ipv4.c | 2 +- net/ipv4/tcp_output.c | 5 +---- 5 files changed, 10 insertions(+), 13 deletions(-) commit b510f0d23a47c3d1f074fe583e7867dc4918fe02 Author: Eric Dumazet Date: Thu Oct 26 21:54:59 2017 -0700 tcp: Namespace-ify sysctl_tcp_slow_start_after_idle Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 3 +-- net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_ipv4.c | 1 + net/ipv4/tcp_output.c | 5 +---- 5 files changed, 11 insertions(+), 13 deletions(-) commit 2c04ac8ae0b61e0780a30b7069a11bb202b21f26 Author: Eric Dumazet Date: Thu Oct 26 21:54:58 2017 -0700 tcp: Namespace-ify sysctl_tcp_thin_linear_timeouts Note that sysctl_tcp_thin_dupack was not used, I deleted it. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 2 -- net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_timer.c | 4 +--- 4 files changed, 9 insertions(+), 12 deletions(-) commit e20223f1962831d1b1c416d59d259879d0639d68 Author: Eric Dumazet Date: Thu Oct 26 21:54:57 2017 -0700 tcp: Namespace-ify sysctl_tcp_recovery Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 2 +- net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp_input.c | 2 +- net/ipv4/tcp_ipv4.c | 1 + net/ipv4/tcp_recovery.c | 2 -- 6 files changed, 11 insertions(+), 11 deletions(-) commit 2ae21cf527da0e5cf9d7ee14bd5b0909bb9d1a75 Author: Eric Dumazet Date: Thu Oct 26 21:54:56 2017 -0700 tcp: Namespace-ify sysctl_tcp_early_retrans Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/sysctl_net_ipv4.c | 18 +++++++++--------- net/ipv4/tcp_input.c | 1 - net/ipv4/tcp_ipv4.c | 1 + net/ipv4/tcp_output.c | 4 +++- 6 files changed, 14 insertions(+), 12 deletions(-) commit 22d28b0ffcf42e8a98d3fef8d73d1aff26f5518b Author: Anup Patel Date: Tue Oct 3 10:51:52 2017 +0530 mailbox: Build Broadcom FlexRM driver as loadable module for iProc SOCs By default, we build Broadcom FlexRM driver as loadable module for iProc SOCs so that kernel image is little smaller and we load FlexRM driver only when required. Signed-off-by: Anup Patel Reviewed-by: Scott Branden Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf7e18991f8fad39137abfa9098bf8d6a4b1e7e5 Author: Anup Patel Date: Tue Oct 3 10:51:51 2017 +0530 mailbox: bcm-flexrm-mailbox: Use common GPL comment header This patch makes the comment header of Broadcom FlexRM driver similar to the GPL comment header used across Broadcom driver sources. Signed-off-by: Anup Patel Signed-off-by: Jassi Brar drivers/mailbox/bcm-flexrm-mailbox.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 8f82121dcf32b168412c2a5eb33a493f81f436e8 Author: Scott Branden Date: Tue Oct 3 10:51:50 2017 +0530 mailbox: bcm-flexrm-mailbox: add depends on ARCH_BCM_IPROC The Broadcom FlexRM Mailbox is only present in the Broadcom IPROC SoCs. Add depends on ARCH_BCM_IPROC to BCM_FLEXRX_MBOX. Signed-off-by: Scott Branden Reviewed-by: Ray Jui Signed-off-by: Jassi Brar drivers/mailbox/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ca194c38305d6b554d5aa85ba44b9e68bf1d9692 Author: Anup Patel Date: Tue Oct 3 10:51:49 2017 +0530 mailbox: bcm-flexrm-mailbox: Print ring number in errors and warnings This patch updates all dev_err() and dev_warn() to print ring number so that we have more info for debugging. Signed-off-by: Anup Patel Reviewed-by: Scott Branden Signed-off-by: Jassi Brar drivers/mailbox/bcm-flexrm-mailbox.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit a371c10ea4b38a5f120e86d906d404d50a0f4660 Author: Anup Patel Date: Tue Oct 3 10:51:48 2017 +0530 mailbox: bcm-flexrm-mailbox: Fix FlexRM ring flush sequence As-per suggestion from FlexRM HW folks, we have to first set FlexRM ring flush state and then clear it for FlexRM ring flush to work properly. Currently, the FlexRM driver has incomplete FlexRM ring flush sequence which causes repeated insmod+rmmod of mailbox client drivers to fail. This patch fixes FlexRM ring flush sequence in flexrm_shutdown() as described above. Fixes: dbc049eee730 ("mailbox: Add driver for Broadcom FlexRM ring manager") Signed-off-by: Anup Patel Reviewed-by: Scott Branden Cc: stable@vger.kernel.org Signed-off-by: Jassi Brar drivers/mailbox/bcm-flexrm-mailbox.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit ecad0d2cb8a7997afdc95031ee3328b997aba5c4 Author: James Smart Date: Mon Oct 23 15:11:36 2017 -0700 nvme-fc: remove NVME_FC_MAX_SEGMENTS The define is an arbitrary limit to the io size on the initiator, capping the io to 1MB-4KB. Remove the define from the transport. I/O size will solely be limited by the LLDD sg limits. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 6 ++---- include/linux/nvme-fc-driver.h | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) commit 56d5f4f108efd4e439d2320738e2b894af0920bb Author: James Smart Date: Fri Oct 20 16:17:08 2017 -0700 nvme-fc: add support for duplicate_connect option Adds support for the duplicate_connect option. When set to true, checks whether there's an existing controller via the same host port and target port for the same host (hostnqn, hostid) to the same subsystem. Fails the connection request if an existing controller. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 36e835f2432d8f16845307b5fb7e88d1e5af041d Author: James Smart Date: Fri Oct 20 16:17:09 2017 -0700 nvme-rdma: add support for duplicate_connect option Adds support for the duplicate_connect option. When set to true, checks whether there's an existing controller via the same target address (traddr), target port (trsvcid), and if specified, host address (host_traddr). Fails the connection request if there is an existing controller. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit 991231dc48ae9bcdd363ee231f10beb771d455c1 Author: James Smart Date: Fri Oct 20 16:17:07 2017 -0700 nvme: add helper to compare options to controller Adds a helper function that compares the host and subsytem specified in a connect options list vs a controller. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/fabrics.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 3b3387620780fc9699021c85bdce5cb45a763d41 Author: James Smart Date: Fri Oct 20 16:17:06 2017 -0700 nvme: add duplicate_connect option Add the "duplicate_connect" boolean option (presence means true). Default is false. When false, the transport should validate whether a new controller request is targeted for the same host transport addressing and target transport addressing as an existing controller. If so, the new controller request should be rejected. When true, the callee is explicitly requesting a duplicate controller connection to be made and the new request should be attempted. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/fabrics.c | 7 ++++++- drivers/nvme/host/fabrics.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 999ada28713d7bcf4a2c70cbab47b08cd95f2cf8 Author: Christoph Hellwig Date: Wed Oct 18 17:09:31 2017 +0200 nvme: check for a live controller in nvme_dev_open This is a much more sensible check than just the admin queue. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a6a5149b10ec8ab8b4a9479a8230265c1b573be0 Author: Christoph Hellwig Date: Wed Oct 18 16:59:25 2017 +0200 nvme: get rid of nvme_ctrl_list Use the core chrdev code to set up the link between the character device and the nvme controller. This allows us to get rid of the global list of all controllers, and also ensures that we have both a reference to the controller and the transport module before the open method of the character device is called. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke drivers/nvme/host/core.c | 76 ++++++++++-------------------------------------- drivers/nvme/host/nvme.h | 3 +- 2 files changed, 18 insertions(+), 61 deletions(-) commit d22524a4782a943bb02a9cf6885ac470210aabfc Author: Christoph Hellwig Date: Wed Oct 18 13:25:42 2017 +0200 nvme: switch controller refcounting to use struct device Instead of allocating a separate struct device for the character device handle embedd it into struct nvme_ctrl and use it for the main controller refcounting. This removes double refcounting and gets us an automatic reference for the character device operations. We keep ctrl->device as a pointer for now to avoid chaning printks all over, but in the future we could look into message printing helpers that take a controller structure similar to what other subsystems do. Note the delete_ctrl operation always already has a reference (either through sysfs due this change, or because every open file on the /dev/nvme-fabrics node has a refernece) when it is entered now, so we don't need to do the unless_zero variant there. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke drivers/nvme/host/core.c | 43 ++++++++++++++++++++++--------------------- drivers/nvme/host/fc.c | 8 ++------ drivers/nvme/host/nvme.h | 12 +++++++++++- drivers/nvme/host/pci.c | 2 +- drivers/nvme/host/rdma.c | 5 ++--- drivers/nvme/target/loop.c | 2 +- 6 files changed, 39 insertions(+), 33 deletions(-) commit c6424a90da446cff6c67be06767fc0d0be787110 Author: Christoph Hellwig Date: Wed Oct 18 13:22:00 2017 +0200 nvme: simplify nvme_open Now that we are protected against lookup vs free races for the namespace by using kref_get_unless_zero we don't need the hack of NULLing out the disk private data during removal. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn drivers/nvme/host/core.c | 40 ++++++++++------------------------------ 1 file changed, 10 insertions(+), 30 deletions(-) commit 2dd4122854f697afc777582d18548dded03ce5dd Author: Christoph Hellwig Date: Wed Oct 18 13:20:01 2017 +0200 nvme: use kref_get_unless_zero in nvme_find_get_ns For kref_get_unless_zero to protect against lookup vs free races we need to use it in all places where we aren't guaranteed to already hold a reference. There is no such guarantee in nvme_find_get_ns, so switch to kref_get_unless_zero in this function. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn drivers/nvme/host/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eee12df5a0bd5769af5efb72fa95dd1f633a266c Author: Gustavo A. R. Silva Date: Thu Oct 26 07:51:06 2017 -0500 ipv6: esp6: use BUG_ON instead of if condition followed by BUG Use BUG_ON instead of if condition followed by BUG in esp_remove_trailer. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Acked-by: Herbert Xu Signed-off-by: Steffen Klassert net/ipv6/esp6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4dc12ffeaeac939097a3f55c881d3dc3523dff0c Author: Jiri Slaby Date: Wed Oct 25 15:57:55 2017 +0200 l2tp: cleanup l2tp_tunnel_delete calls l2tp_tunnel_delete does not return anything since commit 62b982eeb458 ("l2tp: fix race condition in l2tp_tunnel_delete"). But call sites of l2tp_tunnel_delete still do casts to void to avoid unused return value warnings. Kill these now useless casts. Signed-off-by: Jiri Slaby Cc: Sabrina Dubroca Cc: Guillaume Nault Cc: David S. Miller Cc: netdev@vger.kernel.org Acked-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 2 +- net/l2tp/l2tp_netlink.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c58320de5194b57858b829b8f204ca6bc1e38e10 Author: Kees Cook Date: Wed Oct 25 03:54:06 2017 -0700 drivers/net: arcnet: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Michael Grzeschik Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/arcnet/arcnet.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 032cfd66afcc2dd2c7be89c71b020fcb15bcc37d Author: Kees Cook Date: Wed Oct 25 03:53:59 2017 -0700 drivers/net: wan/sdla: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Allen Pais Cc: "David S. Miller" Cc: Tobias Klauser Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/wan/sdla.c | 12 +++++------- include/linux/if_frad.h | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) commit 605ea2f9356f315c9c03d69a54dc910fde32fd71 Author: Kees Cook Date: Wed Oct 25 03:53:53 2017 -0700 drivers/net: wan/lmc: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Allen Pais Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/wan/lmc/lmc_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e2009be038143b4a8c7d4b51b74da63220739a74 Author: Kees Cook Date: Wed Oct 25 03:53:42 2017 -0700 drivers/net: wan/dscc4: Remove unused timer This removes an entirely unused timer, which avoids needing to convert it to timer_setup(). Cc: Francois Romieu Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/wan/dscc4.c | 20 -------------------- 1 file changed, 20 deletions(-) commit c37631c7f686518157de4aa5fb456a54f27607b6 Author: Kees Cook Date: Wed Oct 25 03:53:20 2017 -0700 drivers/net: sxgbe: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Byungho An Cc: Girish K S Cc: Vipul Pandya Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 9de36ccf0891fbdfcc347a34bda009977d8dc2a8 Author: Kees Cook Date: Wed Oct 25 03:53:12 2017 -0700 drivers/net: realtek: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Realtek linux nic maintainers Cc: "David S. Miller" Cc: David Howells Cc: Jay Vosburgh Cc: Allen Pais Cc: Eric Dumazet Cc: Tobias Klauser Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/realtek/atp.c | 12 +++++++----- drivers/net/ethernet/realtek/r8169.c | 7 +++---- 2 files changed, 10 insertions(+), 9 deletions(-) commit 97815186d4f1ea0a14b0683ddc63f288809a94e9 Author: Kees Cook Date: Wed Oct 25 03:51:58 2017 -0700 drivers/net: nuvoton: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Wan ZongShun Cc: linux-arm-kernel@lists.infradead.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/nuvoton/w90p910_ether.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 3248f77fa3eec6014653166a9cd0d429e8d30890 Author: Kees Cook Date: Wed Oct 25 03:51:38 2017 -0700 drivers/net: netronome: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jakub Kicinski Cc: "David S. Miller" Cc: Jiri Pirko Cc: Jamal Hadi Salim Cc: Simon Horman Cc: oss-drivers@netronome.com Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/main.c | 5 +++-- drivers/net/ethernet/netronome/nfp/bpf/main.h | 3 ++- drivers/net/ethernet/netronome/nfp/bpf/offload.c | 9 ++++----- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 7 +++---- 4 files changed, 12 insertions(+), 12 deletions(-) commit 0eba23bbcece8f0fe925f302facbae27f086b887 Author: Kees Cook Date: Wed Oct 25 03:51:29 2017 -0700 drivers/net: hippi: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jes Sorensen Cc: linux-hippi@sunsite.dk Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/hippi/rrunner.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f6fd8918f04191a3e24a0717e97520b65a7d6c4e Author: Kees Cook Date: Wed Oct 25 03:51:20 2017 -0700 drivers/net: hamradio/yam: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Initialization was entirely missing. Cc: Jean-Paul Roubelat Cc: linux-hams@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/hamradio/yam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 550acfb37ffeee9ff00f7f13f087ad1c33a74b29 Author: Kees Cook Date: Wed Oct 25 03:51:14 2017 -0700 drivers/net: can: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Wolfgang Grandegger Cc: Marc Kleine-Budde Cc: "David S. Miller" Cc: Allen Pais Cc: linux-can@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/can/grcan.c | 19 ++++++++----------- drivers/net/can/sja1000/peak_pcmcia.c | 6 +++--- drivers/net/can/usb/peak_usb/pcan_usb.c | 10 ++++++---- 3 files changed, 17 insertions(+), 18 deletions(-) commit 0ff624fbfefbb96db62d100bda84e4fbdabaf628 Author: Kees Cook Date: Wed Oct 25 03:51:03 2017 -0700 drivers/net: 3com/3c515: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Thomas Gleixner Cc: Stephen Hemminger Cc: Johannes Berg Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/3com/3c515.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a78ec0d4f0eada03378413d51c92d0c1253133fa Author: Mika Westerberg Date: Wed Oct 25 12:27:34 2017 +0300 thunderbolt: Drop sequence number check from tb_xdomain_match() Commit 9a03c3d398c1 ("thunderbolt: Fix a couple right shifting to zero bugs") revealed an issue that was previously hidden because we never actually compared received XDomain message sequence numbers properly. The idea with these sequence numbers is that the responding host uses the same sequence number that was in the request packet which we can then check at the requesting host. However, testing against macOS it looks like it does not follow this but instead uses some other logic. Windows driver on the other hand handles it the same way than Linux. In order to be able to talk to macOS again, fix this so that we drop the whole sequence number check. This effectively works exactly the same than it worked before the aforementioned commit. This also follows the logic the original P2P networking code used. Signed-off-by: Mika Westerberg Signed-off-by: David S. Miller drivers/thunderbolt/xdomain.c | 9 --------- 1 file changed, 9 deletions(-) commit a8ff8ccb45d37efa64476958fc5e9a8d9716b23b Author: Corentin Labbe Date: Tue Oct 24 19:57:14 2017 +0200 net: stmmac: sun8i: Restore the compatibles The original dwmac-sun8i DT bindings have some issue on how to handle integrated PHY and was reverted in last RC of 4.13. But now we have a solution so we need to get back that was reverted. This patch restore compatibles about dwmac-sun8i This reverts commit ad4540cc5aa3 ("net: stmmac: sun8i: Remove the compatibles") Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 634db83b82658f4641d8026e340c6027cf74a6bb Author: Corentin Labbe Date: Tue Oct 24 19:57:13 2017 +0200 net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs The Allwinner H3 SoC have two distinct MDIO bus, only one could be active at the same time. The selection of the active MDIO bus are done via some bits in the EMAC register of the system controller. This patch implement this MDIO switch via a custom MDIO-mux. Signed-off-by: Corentin Labbe Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/Kconfig | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 353 ++++++++++++++-------- 2 files changed, 224 insertions(+), 130 deletions(-) commit b5beecb580376cd8d959eb990abece6a748a3ce3 Author: Corentin Labbe Date: Tue Oct 24 19:57:12 2017 +0200 net: stmmac: snps, dwmac-mdio MDIOs are automatically registered stmmac bindings docs said that its mdio node must have compatible = "snps,dwmac-mdio"; Since dwmac-sun8i does not have any good reasons to not doing it, all their MDIO node must have it. Since these compatible is automatically registered, dwmac-sun8i compatible does not need to be in need_mdio_ids. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 4 ---- 1 file changed, 4 deletions(-) commit 32d18ab1d44166cbb1dcaf8b359183636734ddb1 Author: Paolo Abeni Date: Tue Oct 24 12:41:01 2017 +0200 net: updating dst lastusage is an unlikely event. Since commit 0da4af00b2ed ("ipv6: only update __use and lastusetime once per jiffy at most"), updating the dst lastuse field is an unlikely action: it happens at most once per jiffy, out of potentially millions of calls per second. Mark explicitly the code as such, and let the compiler generate better code. Note: gcc 7.2 and several older versions do actually generate different - better - code when the unlikely() hint is in place, avoid jump in the fast path and keeping better code locality. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller include/net/dst.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c92ee208b1faa0ef2cc899b85fd0607b6fac7fe Author: Darrick J. Wong Date: Wed Oct 25 16:59:43 2017 -0700 xfs: validate sb_logsunit is a multiple of the fs blocksize Make sure the log stripe unit is sane before proceeding with mounting. AFAICT this means that logsunit has to be 0, 1, or a multiple of the fs block size. Found this by setting the LSB of logsunit in xfs/350 and watching the system crash as soon as we try to write to the log. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster fs/xfs/xfs_log.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit f1b92bbc2373902063d04d28bff1ab79edc00df3 Author: Brian Foster Date: Thu Oct 26 09:31:16 2017 -0700 xfs: drain the buffer LRU on mount Log recovery of v4 filesystems does not use buffer verifiers because log recovery historically can result in transient buffer corruption when target buffers might be ahead of the log after a crash. v5 filesystems work around this problem with metadata LSN ordering. While this log recovery verifier behavior is necessary on v4 supers, it can result in leaving buffers around in the LRU without verifiers attached for a significant amount of time. This leads to use of unverified buffers while the filesystem is in active use, long after recovery has completed. To address this problem, drain all buffers from the LRU as a final step of the log mount sequence. Note that this is done unconditionally to provide a consistently clean cache footprint, regardless of superblock version or log state. As a side effect, this ensures that all cache resident, unverified buffers are reclaimed after log recovery and therefore must be recreated with verifiers on subsequent use. Reported-by: Darrick Wong Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 9f2a4505800607e537e9dd9dea4f55c4b0c30c7a Author: Brian Foster Date: Thu Oct 26 09:31:16 2017 -0700 xfs: fix log block underflow during recovery cycle verification It is possible for mkfs to format very small filesystems with too small of an internal log with respect to the various minimum size and block count requirements. If this occurs when the log happens to be smaller than the scan window used for cycle verification and the scan wraps the end of the log, the start_blk calculation in xlog_find_head() underflows and leads to an attempt to scan an invalid range of log blocks. This results in log recovery failure and a failed mount. Since there may be filesystems out in the wild with this kind of geometry, we cannot simply refuse to mount. Instead, cap the scan window for cycle verification to the size of the physical log. This ensures that the cycle verification proceeds as expected when the scan wraps the end of the log. Reported-by: Zorro Lang Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_recover.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99c265950b55f18299924e1b0e5e737795e2ebdb Author: Brian Foster Date: Thu Oct 26 09:31:15 2017 -0700 xfs: more robust recovery xlog buffer validation mkfs has a historical problem where it can format very small filesystems with too small of a physical log. Under certain conditions, log recovery of an associated filesystem can end up passing garbage parameter values to some of the cycle and log record verification functions due to bugs in log recovery not dealing with such filesystems properly. This results in attempts to read from bogus/underflowed log block addresses. Since the buffer read may ultimately succeed, log recovery can proceed with bogus data and otherwise go off the rails and crash. One example of this is a negative last_blk being passed to xlog_find_verify_log_record() causing us to skip the loop, pass a NULL head pointer to xlog_header_check_mount() and crash. Improve the xlog buffer verification to address this problem. We already verify xlog buffer length, so update this mechanism to also sanity check for a valid log relative block address and otherwise return an error. Pass a fixed, valid log block address from xlog_get_bp() since the target address will be validated when the buffer is read. This ensures that any bogus log block address/length calculations lead to graceful mount failure rather than risking a crash or worse if recovery proceeds with bogus data. Reported-by: Zorro Lang Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_log_recover.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) commit dc56015faff1bc9e7493c2b28302c423a02237c2 Author: Christoph Hellwig Date: Mon Oct 23 16:32:39 2017 -0700 xfs: add a new xfs_iext_lookup_extent_before helper This helper looks up the last extent the covers space before the passed in block number. This is useful for truncate and similar operations that operate backwards over the extent list. For xfs_bunmapi it also is a slight optimization as we can return early if there are not extents at or below the end of the to be truncated range. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 27 +++++++-------------------- fs/xfs/libxfs/xfs_inode_fork.c | 21 +++++++++++++++++++++ fs/xfs/libxfs/xfs_inode_fork.h | 4 ++++ fs/xfs/xfs_reflink.c | 19 +++++++------------ 4 files changed, 39 insertions(+), 32 deletions(-) commit 211e95bbab71359e56f3d9adce1b4d6de8e18471 Author: Christoph Hellwig Date: Mon Oct 23 16:32:39 2017 -0700 xfs: merge xfs_bmap_read_extents into xfs_iread_extents xfs_iread_extents is just a trivial wrapper, there is no good reason to keep the two separate. [darrick: minor fixups having left xfs_bmbt_validate_extent intact] Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 87 +++++++++++++++++++++++++----------------- fs/xfs/libxfs/xfs_bmap.h | 2 - fs/xfs/libxfs/xfs_inode_fork.c | 37 ------------------ 3 files changed, 51 insertions(+), 75 deletions(-) commit 9ad1a23afb6c561acfa62850934ddc6c70c35994 Author: Christoph Hellwig Date: Mon Oct 23 16:32:38 2017 -0700 xfs: add asserts for the mmap lock in xfs_{insert,collapse}_file_space Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 4 ++++ 1 file changed, 4 insertions(+) commit 29b3e94a9c65224733fe8de49b07b7227f95f821 Author: Christoph Hellwig Date: Thu Oct 19 11:08:52 2017 -0700 xfs: rewrite xfs_bmap_first_unused to make better use of xfs_iext_get_extent Look at the return value of xfs_iext_get_extent instead of figuring out the extent count first and looping up to it. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 56 ++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 30 deletions(-) commit 5936dc543cfd27de74cd34fdc928b5115cec53d1 Author: Christoph Hellwig Date: Thu Oct 19 11:08:52 2017 -0700 xfs: don't rely on extent indices in xfs_bmap_insert_extents Rewrite xfs_bmap_insert_extents so that we don't rely on extent indices except for iterating over them. Not being able to iterate to the previous extent or finding the extent that stop_fsb is in are sufficient exit conditions, and we don't need to do any extent count games given that: a) we already flushed all delalloc extents past our start offset before doing the operation b) xfs_iext_count() includes delalloc extents anyway Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 47 +++++++++-------------------------------------- 1 file changed, 9 insertions(+), 38 deletions(-) commit 40591bdbccc47661050d98200ab65e77fa2324bd Author: Christoph Hellwig Date: Thu Oct 19 11:08:51 2017 -0700 xfs: don't rely on extent indices in xfs_bmap_collapse_extents Rewrite xfs_bmap_collapse_extents so that we don't rely on extent indices except for iterating over them. Not being able to iterate to the next extent is a sufficient exit condition, and we don't need to do any extent count games given that: a) we already flushed all delalloc extents past our start offset before doing the operation b) xfs_iext_count() includes delalloc extents anyway Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 54 +++++++++++------------------------------------- 1 file changed, 12 insertions(+), 42 deletions(-) commit 11f75b3bbad57998d1af99391ec3a8e076ab4dd9 Author: Christoph Hellwig Date: Thu Oct 19 11:08:51 2017 -0700 xfs: update got in xfs_bmap_shift_update_extent This way the caller gets the proper updated extent returned in got. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit bf8062800ad2d1ca22950c28910196bcbda89108 Author: Christoph Hellwig Date: Thu Oct 19 11:07:34 2017 -0700 xfs: remove xfs_bmse_shift_one Instead do the actual left and right shift work in the callers, and just keep a helper to update the bmap and rmap btrees as well as the in-core extent list. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 181 +++++++++++++++++++---------------------------- fs/xfs/libxfs/xfs_bmap.h | 5 -- 2 files changed, 71 insertions(+), 115 deletions(-) commit ecfea3f0c8c64ce7375f4be4506996968958bd01 Author: Christoph Hellwig Date: Thu Oct 19 11:07:11 2017 -0700 xfs: split xfs_bmap_shift_extents Have a separate helper for insert vs collapse, as this prepares us for simplifying the code in the next patches. Also changed the done output argument to a bool intead of int for both new functions. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 197 ++++++++++++++++++++++++++++++++--------------- fs/xfs/libxfs/xfs_bmap.h | 10 ++- fs/xfs/xfs_bmap_util.c | 14 ++-- 3 files changed, 148 insertions(+), 73 deletions(-) commit 6b18af0dfd1695c1d53a2eeead838a90c27b7cb4 Author: Christoph Hellwig Date: Thu Oct 19 11:07:10 2017 -0700 xfs: remove XFS_BMAP_MAX_SHIFT_EXTENTS The define was always set to 1, which means looping until we reach is was dead code from the start. Also remove an initialization of next_fsb for the done case that doesn't fit the new code flow - it was never checked by the caller in the done case to start with. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 47 ++++++++++++++++++++--------------------------- fs/xfs/libxfs/xfs_bmap.h | 12 +----------- fs/xfs/xfs_bmap_util.c | 14 ++------------ 3 files changed, 23 insertions(+), 50 deletions(-) commit 4ed36c6b09a536f0ff19cf914f6445306e3f315f Author: Christoph Hellwig Date: Thu Oct 19 11:07:10 2017 -0700 xfs: inline xfs_shift_file_space into callers The code is sufficiently different for the insert vs collapse cases both in xfs_shift_file_space itself and the callers that untangling them will make life a lot easier down the road. We still keep a common helper for flushing all data and COW state to get the inode into the right shape for shifting the extents around. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 192 ++++++++++++++++++++++++++----------------------- 1 file changed, 102 insertions(+), 90 deletions(-) commit 66f364649d870c7541c30a2f02a32fd4c88684f0 Author: Christoph Hellwig Date: Thu Oct 19 11:07:09 2017 -0700 xfs: remove if_rdev We can simply use the i_rdev field in the Linux inode and just convert to and from the XFS dev_t when reading or logging/writing the inode. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_inode_fork.c | 38 +++++++++++++++++++++----------------- fs/xfs/libxfs/xfs_inode_fork.h | 1 - fs/xfs/xfs_inode.c | 9 ++++----- fs/xfs/xfs_inode.h | 4 ++-- fs/xfs/xfs_inode_item.c | 2 +- fs/xfs/xfs_iops.c | 16 +--------------- fs/xfs/xfs_itable.c | 2 +- 7 files changed, 30 insertions(+), 42 deletions(-) commit 42b67dc6ffbf2701cfc578b3e706d560a80b6674 Author: Christoph Hellwig Date: Thu Oct 19 11:07:09 2017 -0700 xfs: remove the never fully implemented UUID fork format Remove the dead code dealing with the UUID fork format that was never implemented in Linux (and neither in IRIX as far as I know). Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_attr_leaf.c | 6 +----- fs/xfs/libxfs/xfs_bmap.c | 4 ---- fs/xfs/libxfs/xfs_format.h | 2 +- fs/xfs/libxfs/xfs_inode_fork.c | 9 --------- fs/xfs/libxfs/xfs_inode_fork.h | 1 - fs/xfs/libxfs/xfs_log_format.h | 20 ++++++++++---------- fs/xfs/xfs_inode_item.c | 25 ++++++------------------- fs/xfs/xfs_itable.c | 1 - fs/xfs/xfs_log_recover.c | 10 +--------- 9 files changed, 19 insertions(+), 59 deletions(-) commit e8e0e170e2e17b601b86edb86f58dbf7c599e4b3 Author: Christoph Hellwig Date: Thu Oct 19 11:06:29 2017 -0700 xfs: remove XFS_BMAP_TRACE_EXLIST Instead of looping over all extents in some debug-only helper just insert trace points into the loops that already exist in the calling functions. Also split the xfs_extlist trace point into one each for reading and writing extents from disk. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 23 ++--------------------- fs/xfs/libxfs/xfs_bmap.h | 9 --------- fs/xfs/libxfs/xfs_inode_fork.c | 8 ++++++-- fs/xfs/xfs_trace.h | 3 ++- 4 files changed, 10 insertions(+), 33 deletions(-) commit ca5d8e5b7b9030005e38e7c43e08c0cd4eb2a78f Author: Christoph Hellwig Date: Thu Oct 19 11:04:44 2017 -0700 xfs: move pre/post-bmap tracing into xfs_iext_update_extent xfs_iext_update_extent already has basically all the information needed to centralize the bmap pre/post tracing. We just need to pass inode + bmap state instead of the inode fork pointer to get all trace annotations. In addition to covering all the existing trace points this gives us tracing coverage for the extent shifting operations for free. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 167 ++++++++++++----------------------------- fs/xfs/libxfs/xfs_inode_fork.c | 7 +- fs/xfs/libxfs/xfs_inode_fork.h | 4 +- 3 files changed, 55 insertions(+), 123 deletions(-) commit d138604fb1a6500064b50e75f220e6cbce785493 Author: Christoph Hellwig Date: Thu Oct 19 11:04:44 2017 -0700 xfs: remove post-bmap tracing in xfs_bmap_local_to_extents Now that we use xfs_iext_insert this is already covered by the tracing in that function. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 2 -- 1 file changed, 2 deletions(-) commit 35e62da55f4b2450cbb51c9734d745a799e2a793 Author: Christoph Hellwig Date: Thu Oct 19 11:04:43 2017 -0700 xfs: make better use of the 'state' variable in xfs_bmap_del_extent_real We already have all the information about the fork a=D1=95 well as additional tracing information, so pass that to xfs_iext_remove(). Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 060ea65b39409f3b9952dfa6db5fbe4355e6888a Author: Christoph Hellwig Date: Thu Oct 19 11:02:29 2017 -0700 xfs: add a xfs_bmap_fork_to_state helper This creates the right initial bmap state from the passed in inode fork enum. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 45 +++++++++------------------------------------ fs/xfs/libxfs/xfs_bmap.h | 12 ++++++++++++ 2 files changed, 21 insertions(+), 36 deletions(-) commit c2fc338c87a31f557b57f5143602444ba3cf2c3e Author: Darrick J. Wong Date: Tue Oct 17 21:37:47 2017 -0700 xfs: scrub quota information Perform some quick sanity testing of the disk quota information. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_fs.h | 5 +- fs/xfs/scrub/common.h | 9 ++ fs/xfs/scrub/quota.c | 304 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/scrub.c | 12 ++ fs/xfs/scrub/scrub.h | 9 ++ 6 files changed, 339 insertions(+), 1 deletion(-) commit 29b0767b8beb4c5e3fd94656d51413a4fe8d2d74 Author: Darrick J. Wong Date: Tue Oct 17 21:37:46 2017 -0700 xfs: scrub realtime bitmap/summary Perform simple tests of the realtime bitmap and summary. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/Makefile | 2 + fs/xfs/libxfs/xfs_format.h | 5 +++ fs/xfs/libxfs/xfs_fs.h | 4 +- fs/xfs/scrub/common.h | 9 ++++ fs/xfs/scrub/rtbitmap.c | 108 +++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/scrub.c | 10 +++++ fs/xfs/scrub/scrub.h | 15 +++++++ 7 files changed, 152 insertions(+), 1 deletion(-) commit 0f28b25731f76feda1ec71671754a2b7179ee1ef Author: Darrick J. Wong Date: Tue Oct 17 21:37:46 2017 -0700 xfs: scrub directory parent pointers Scrub parent pointers, sort of. For directories, we can ride the '..' entry up to the parent to confirm that there's at most one dentry that points back to this directory. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_fs.h | 3 +- fs/xfs/scrub/common.h | 2 + fs/xfs/scrub/parent.c | 317 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/scrub.c | 4 + fs/xfs/scrub/scrub.h | 1 + 6 files changed, 327 insertions(+), 1 deletion(-) commit 2a721dbbc8bf4d76581fb073aa0d9554df56da1a Author: Darrick J. Wong Date: Tue Oct 17 21:37:45 2017 -0700 xfs: scrub symbolic links Create the infrastructure to scrub symbolic link data. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_fs.h | 3 +- fs/xfs/scrub/common.h | 2 ++ fs/xfs/scrub/scrub.c | 4 +++ fs/xfs/scrub/scrub.h | 1 + fs/xfs/scrub/symlink.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 102 insertions(+), 1 deletion(-) commit eec0482e0829eab1da1be693e524c889dc4b168c Author: Darrick J. Wong Date: Tue Oct 17 21:37:45 2017 -0700 xfs: scrub extended attributes Scrub the hash tree, keys, and values in an extended attribute structure. Refactor the attribute code to use the transaction if the caller supplied one to avoid buffer deadocks. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_fs.h | 3 +- fs/xfs/scrub/attr.c | 260 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/common.h | 2 + fs/xfs/scrub/scrub.c | 8 ++ fs/xfs/scrub/scrub.h | 2 + fs/xfs/xfs_attr.h | 5 +- fs/xfs/xfs_attr_list.c | 7 +- 8 files changed, 285 insertions(+), 3 deletions(-) commit df481968f33b613bffbf8775a412260e69b9e8d4 Author: Darrick J. Wong Date: Tue Oct 17 21:37:44 2017 -0700 xfs: scrub directory freespace Check the free space information in a directory. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/dir.c | 495 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 495 insertions(+) commit a5c46e5e8912d232b959faf511cd9a17cc829f0a Author: Darrick J. Wong Date: Tue Oct 17 21:37:44 2017 -0700 xfs: scrub directory metadata Scrub the hash tree and all the entries in a directory. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_dir2.c | 4 +- fs/xfs/libxfs/xfs_dir2.h | 17 +++ fs/xfs/libxfs/xfs_fs.h | 3 +- fs/xfs/scrub/common.c | 28 ++++ fs/xfs/scrub/common.h | 4 + fs/xfs/scrub/dir.c | 331 ++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/scrub.c | 4 + fs/xfs/scrub/scrub.h | 1 + fs/xfs/xfs_dir2_readdir.c | 2 +- fs/xfs/xfs_file.c | 2 +- 11 files changed, 393 insertions(+), 4 deletions(-) commit 7c4a07a424c18d95f49b0c0c3d8c5afd969e0a10 Author: Darrick J. Wong Date: Tue Oct 17 21:37:43 2017 -0700 xfs: scrub directory/attribute btrees Provide a way to check the shape and scrub the hashes and records in a directory or extended attribute btree. These are helper functions for the directory & attribute scrubbers in subsequent patches. Signed-off-by: Darrick J. Wong [fengguang: remove unneeded variable to store return value] Signed-off-by: Fengguang Wu Reviewed-by: Dave Chinner fs/xfs/Makefile | 1 + fs/xfs/scrub/dabtree.c | 588 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/dabtree.h | 58 +++++ 3 files changed, 647 insertions(+) commit 99d9d8d05da26f47aa8412397407f962bcb4713a Author: Darrick J. Wong Date: Tue Oct 17 21:37:43 2017 -0700 xfs: scrub inode block mappings Scrub an individual inode's block mappings to make sure they make sense. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_fs.h | 5 +- fs/xfs/scrub/bmap.c | 366 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/common.h | 5 +- fs/xfs/scrub/scrub.c | 12 ++ fs/xfs/scrub/scrub.h | 3 + 6 files changed, 390 insertions(+), 2 deletions(-) commit 80e4e12688029e42fc6ab4cf7f229b090c61e6a7 Author: Darrick J. Wong Date: Tue Oct 17 21:37:42 2017 -0700 xfs: scrub inodes Scrub the fields within an inode. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_fs.h | 3 +- fs/xfs/scrub/common.c | 54 +++++ fs/xfs/scrub/common.h | 3 + fs/xfs/scrub/inode.c | 611 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/scrub.c | 18 +- fs/xfs/scrub/scrub.h | 2 + fs/xfs/xfs_ioctl.c | 4 + 8 files changed, 693 insertions(+), 3 deletions(-) commit edc09b528628afb50904106f36de182a00e7eb40 Author: Darrick J. Wong Date: Tue Oct 17 21:37:41 2017 -0700 xfs: scrub refcount btrees Plumb in the pieces necessary to check the refcount btree. If rmap is available, check the reference count by performing an interval query against the rmapbt. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_fs.h | 3 +- fs/xfs/scrub/common.h | 2 + fs/xfs/scrub/refcount.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/scrub.c | 5 +++ fs/xfs/scrub/scrub.h | 1 + 6 files changed, 110 insertions(+), 1 deletion(-) commit c7e693d9836c003150fef80be40a06e1f2e65d0c Author: Darrick J. Wong Date: Tue Oct 17 21:37:41 2017 -0700 xfs: scrub rmap btrees Check the reverse mapping records to make sure that the contents make sense. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_fs.h | 3 +- fs/xfs/scrub/common.h | 2 + fs/xfs/scrub/rmap.c | 138 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/scrub.c | 5 ++ fs/xfs/scrub/scrub.h | 1 + 6 files changed, 149 insertions(+), 1 deletion(-) commit 3daa664191375db6a4a0cced75183aa3ca96cbda Author: Darrick J. Wong Date: Tue Oct 17 21:37:40 2017 -0700 xfs: scrub inode btrees Check the records of the inode btrees to make sure that the values make sense given the inode records themselves. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_format.h | 2 +- fs/xfs/libxfs/xfs_fs.h | 4 +- fs/xfs/scrub/common.c | 29 ++++ fs/xfs/scrub/common.h | 3 + fs/xfs/scrub/ialloc.c | 337 +++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/scrub.c | 9 ++ fs/xfs/scrub/scrub.h | 2 + 8 files changed, 385 insertions(+), 2 deletions(-) commit efa7a99ce1f8615aca7b0ff3122a1ae14e4d1cdc Author: Darrick J. Wong Date: Tue Oct 17 21:37:40 2017 -0700 xfs: scrub free space btrees Check the extent records free space btrees to ensure that the values look sane. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_fs.h | 4 +- fs/xfs/scrub/alloc.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/common.c | 16 ++++++++ fs/xfs/scrub/common.h | 6 +++ fs/xfs/scrub/scrub.c | 8 ++++ fs/xfs/scrub/scrub.h | 2 + 7 files changed, 138 insertions(+), 1 deletion(-) commit a12890aebb895951720ff884eab1c99a30645b29 Author: Darrick J. Wong Date: Tue Oct 17 21:37:39 2017 -0700 xfs: scrub the AGI Add a forgotten check to the AGI verifier, then wire up the scrub infrastructure to check the AGI contents. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_fs.h | 3 +- fs/xfs/scrub/agheader.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/common.c | 5 +-- fs/xfs/scrub/scrub.c | 4 +++ fs/xfs/scrub/scrub.h | 1 + 5 files changed, 95 insertions(+), 3 deletions(-) commit ab9d5dc59fe6157b8035c4b605166b868f678ee4 Author: Darrick J. Wong Date: Tue Oct 17 21:37:39 2017 -0700 xfs: scrub AGF and AGFL Check the block references in the AGF and AGFL headers to make sure they make sense. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_fs.h | 4 +- fs/xfs/scrub/agheader.c | 184 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/common.c | 28 ++++++-- fs/xfs/scrub/common.h | 4 ++ fs/xfs/scrub/scrub.c | 8 +++ fs/xfs/scrub/scrub.h | 2 + 6 files changed, 223 insertions(+), 7 deletions(-) commit 21fb4cb1981ef7e02f35a42b2a5ae619517dfe1b Author: Darrick J. Wong Date: Tue Oct 17 21:37:38 2017 -0700 xfs: scrub the secondary superblocks Ensure that the geometry presented in the backup superblocks matches the primary superblock so that repair can recover the filesystem if that primary gets corrupted. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_fs.h | 3 +- fs/xfs/scrub/agheader.c | 330 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/common.h | 2 + fs/xfs/scrub/scrub.c | 4 + fs/xfs/scrub/scrub.h | 1 + 6 files changed, 340 insertions(+), 1 deletion(-) commit b6c1beb967b0a4a1b8297ee6f4bc067a0ba32b0b Author: Darrick J. Wong Date: Tue Oct 17 21:37:38 2017 -0700 xfs: create helpers to scan an allocation group Add some helpers to enable us to lock an AG's headers, create btree cursors for all btrees in that allocation group, and clean up afterwards. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/common.c | 179 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/common.h | 10 +++ fs/xfs/scrub/scrub.c | 4 ++ fs/xfs/scrub/scrub.h | 21 ++++++ 4 files changed, 214 insertions(+) commit 37f3fa7f161d41d3424231e9ce4bd58b62a56fca Author: Darrick J. Wong Date: Tue Oct 17 21:37:37 2017 -0700 xfs: scrub btree keys and records Add to the btree scrubber the ability to check that the keys and records are in the right order and actually call out to our record iterator to do actual checking of the records. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/btree.c | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++- fs/xfs/scrub/trace.h | 45 +++++++++++++++++++++ 2 files changed, 154 insertions(+), 1 deletion(-) commit cc3e0948d2686f30f49166660cf85b7e0194f365 Author: Darrick J. Wong Date: Tue Oct 17 21:37:37 2017 -0700 xfs: scrub the shape of a metadata btree Create a function that can check the shape of a btree -- each block passes basic inspection and all the pointers look ok. In the next patch we'll add the ability to check the actual keys and records stored within the btree. Add some helper functions so that we report detailed scrub errors in a uniform manner in dmesg. These are helper functions for subsequent patches. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_btree.c | 16 ++- fs/xfs/libxfs/xfs_btree.h | 7 ++ fs/xfs/scrub/btree.c | 258 +++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 274 insertions(+), 7 deletions(-) commit 537964bceb9a4c9e39a16a83042b80986d373453 Author: Darrick J. Wong Date: Tue Oct 17 21:37:37 2017 -0700 xfs: create helpers to scrub a metadata btree Create helper functions and tracepoints to deal with errors while scrubbing a metadata btree. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/Makefile | 1 + fs/xfs/scrub/btree.c | 114 +++++++++++++++++++++++++++++++++++ fs/xfs/scrub/btree.h | 57 ++++++++++++++++++ fs/xfs/scrub/trace.c | 17 ++++++ fs/xfs/scrub/trace.h | 163 +++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 352 insertions(+) commit 4700d22980d459f6c20012a6cb9767a314ab1065 Author: Darrick J. Wong Date: Tue Oct 17 21:37:36 2017 -0700 xfs: create helpers to record and deal with scrub problems Create helper functions to record crc and corruption problems, and deal with any other runtime errors that arise. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/common.c | 190 ++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/common.h | 23 ++++++ fs/xfs/scrub/trace.h | 215 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 428 insertions(+) commit dcb660f9222fd9f607e7e05f4755b39b809ca19f Author: Darrick J. Wong Date: Tue Oct 17 21:37:36 2017 -0700 xfs: probe the scrub ioctl Create a probe scrubber with id 0. This will be used by xfs_scrub to probe the kernel's abilities to scrub (and repair) the metadata. We do this by validating the ioctl inputs from userspace, preparing the filesystem for a scrub (or a repair) operation, and immediately returning to userspace. Userspace can use the returned errno and structure state to decide (in broad terms) if scrub/repair are supported by the running kernel. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/Makefile | 1 + fs/xfs/libxfs/xfs_fs.h | 3 ++- fs/xfs/scrub/common.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/common.h | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/scrub.c | 29 +++++++++++++++++++++++++ fs/xfs/scrub/scrub.h | 1 + fs/xfs/scrub/trace.c | 1 + 7 files changed, 150 insertions(+), 1 deletion(-) commit a56371865e7870d953d3837aaa1d12230bba021d Author: Darrick J. Wong Date: Tue Oct 17 21:37:35 2017 -0700 xfs: dispatch metadata scrub subcommands Create structures needed to hold scrubbing context and dispatch incoming commands to the individual scrubbers. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/scrub/scrub.c | 196 ++++++++++++++++++++++++++++++++++++++++++++++++++- fs/xfs/scrub/scrub.h | 24 +++++++ fs/xfs/scrub/trace.h | 43 +++++++++++ 3 files changed, 262 insertions(+), 1 deletion(-) commit 36fd6e863cb7329ab2e5687fdae4e4626b840adc Author: Darrick J. Wong Date: Tue Oct 17 21:37:34 2017 -0700 xfs: create an ioctl to scrub AG metadata Create an ioctl that can be used to scrub internal filesystem metadata. The new ioctl takes the metadata type, an (optional) AG number, an (optional) inode number and generation, and a flags argument. This will be used by the upcoming XFS online scrub tool. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/Kconfig | 17 +++++++++++++++ fs/xfs/Makefile | 11 ++++++++++ fs/xfs/libxfs/xfs_fs.h | 53 +++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/scrub.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/scrub.h | 25 ++++++++++++++++++++++ fs/xfs/scrub/trace.c | 41 ++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/trace.h | 33 +++++++++++++++++++++++++++++ fs/xfs/scrub/xfs_scrub.h | 29 ++++++++++++++++++++++++++ fs/xfs/xfs_ioctl.c | 28 +++++++++++++++++++++++++ fs/xfs/xfs_ioctl32.c | 1 + 10 files changed, 292 insertions(+) commit 91fb9afc0847926ef6ea7695b8125c8fbe7974d6 Author: Darrick J. Wong Date: Tue Oct 17 21:37:34 2017 -0700 xfs: create inode pointer verifiers Create some helper functions to check that inode pointers point to somewhere within the filesystem and not at the static AG metadata. Move xfs_internal_inum and create a directory inode check function. We will use these functions in scrub and elsewhere. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_dir2.c | 19 ++-------- fs/xfs/libxfs/xfs_ialloc.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_ialloc.h | 7 ++++ fs/xfs/xfs_itable.c | 10 ------ fs/xfs/xfs_itable.h | 2 -- 5 files changed, 100 insertions(+), 28 deletions(-) commit 52c732eee78b47ac2eb828b1c7fa611cd37b0090 Author: Darrick J. Wong Date: Tue Oct 17 21:37:33 2017 -0700 xfs: refactor btree block header checking functions Refactor the btree block header checks to have an internal function that returns the address of the failing check without logging errors. The scrubber will call the internal function, while the external version will maintain the current logging behavior. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_btree.c | 168 +++++++++++++++++++++++++++------------------- fs/xfs/libxfs/xfs_btree.h | 8 +++ fs/xfs/libxfs/xfs_types.h | 6 ++ fs/xfs/xfs_linux.h | 7 ++ 4 files changed, 121 insertions(+), 68 deletions(-) commit f135761a73b18877bdfb44018fe993172c7be203 Author: Darrick J. Wong Date: Tue Oct 17 21:37:33 2017 -0700 xfs: refactor btree pointer checks Refactor the btree pointer checks so that we can call them from the scrub code without logging errors to dmesg. Preserve the existing error reporting for regular operations. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_bmap.c | 4 +-- fs/xfs/libxfs/xfs_btree.c | 70 ++++++++++++++++++++++------------------------- fs/xfs/libxfs/xfs_btree.h | 13 +++++++-- 3 files changed, 45 insertions(+), 42 deletions(-) commit 21ec54168b368f1a98097dee00625ec8ec2d47f3 Author: Darrick J. Wong Date: Tue Oct 17 21:37:32 2017 -0700 xfs: create block pointer check functions Create some helper functions to check that a block pointer points within the filesystem (or AG) and doesn't point at static metadata. We will use this for scrub. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner fs/xfs/libxfs/xfs_alloc.c | 49 ++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/libxfs/xfs_alloc.h | 4 ++++ fs/xfs/libxfs/xfs_rtbitmap.c | 12 +++++++++++ fs/xfs/xfs_rtalloc.h | 2 ++ 4 files changed, 67 insertions(+) commit ed438b476b611c67089760037139f93ea8ed41d5 Author: Darrick J. Wong Date: Tue Oct 17 21:37:32 2017 -0700 xfs: return a distinct error code value for IGET_INCORE cache misses For an XFS_IGET_INCORE iget operation, if the inode isn't in the cache, return ENODATA so that we don't confuse it with the pre-existing ENOENT cases (inode is in cache, but freed). Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Dave Chinner fs/xfs/xfs_icache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7561d27e90fa0df0aac2a1d6b49c2a28eaae7026 Author: Brian Foster Date: Tue Oct 17 14:16:29 2017 -0700 xfs: buffer lru reference count error injection tag XFS uses a fixed reference count for certain types of buffers in the internal LRU cache. These reference counts dictate how aggressively certain buffers are reclaimed vs. others. While the reference counts implements priority across different buffer types, all buffers (other than uncached buffers) are typically cached for at least one reclaim cycle. We've had at least one bug recently that has been hidden by a released buffer sitting around in the LRU. Users hitting the problem were able to reproduce under enough memory pressure to cause aggressive reclaim in a particular window of time. To support future xfstests cases, add an error injection tag to hardcode the buffer reference count to zero. When enabled, this bypasses caching of associated buffers and facilitates test cases that depend on this behavior. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_buf.c | 16 ++++++++++++++++ fs/xfs/xfs_buf.h | 5 +---- fs/xfs/xfs_error.c | 3 +++ fs/xfs/xfs_error.h | 4 +++- 4 files changed, 23 insertions(+), 5 deletions(-) commit a53efbd5c6802e07b64aa767bb932da6913470c8 Author: Brian Foster Date: Tue Oct 17 14:16:28 2017 -0700 xfs: fail if xattr inactivation hits a hole The child buffer read in xfs_attr3_node_inactive() should never reach a hole in the attr fork. If this occurs, it is likely due to a bug. Prior to commit cd87d867 ("xfs: don't crash on unexpected holes in dir/attr btrees"), this would result in a crash. Now that the crash has been fixed, this is a silent failure. Pass -1 to xfs_da3_node_read() from xfs_da3_node_inactive() to indicate that reading from a hole is an error. This logs an error to syslog and fails the inode inactivation, leaving the inode on the AG unlinked list until removed by xfs_repair (or log recovery). Also update the subsequent code to reflect that the read now returns a non-NULL buffer or an error. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_attr_inactive.c | 69 ++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 36 deletions(-) commit 0bd89676c4fed53b003025bc4a5200861ac5d8ef Author: Hou Tao Date: Tue Oct 17 14:16:28 2017 -0700 xfs: check kthread_should_stop() after the setting of task state A umount hang is possible when a race occurs between the umount process and the xfsaild kthread. The following sequences outline the race: xfsaild: kthread_should_stop() => return false, so xfsaild continue umount: set_bit(KTHREAD_SHOULD_STOP, &kthread->flags) => by kthread_stop() umount: wake_up_process() => because xfsaild is still running, so 0 is returned xfsaild: __set_current_state(TASK_INTERRUPTIBLE) xfsaild: schedule() => now, xfsaild will wait indefinitely umount: wait_for_completion() => and umount will hang To fix that, we need to check kthread_should_stop() after we set the task state, so the xfsaild will either see the stop bit and exit or the task state is reset to runnable by wake_up_process() such that it isn't scheduled out indefinitely and detects the stop bit at the next iteration. Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster Signed-off-by: Hou Tao Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_trans_ail.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit f0387501652ed39f3bebc72e8a6b5abb405eb2b7 Author: Christoph Hellwig Date: Tue Oct 17 14:16:28 2017 -0700 xfs: remove xfs_bmbt_get_state Unused after the big bmap refactor. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap_btree.c | 29 +---------------------------- fs/xfs/libxfs/xfs_bmap_btree.h | 1 - 2 files changed, 1 insertion(+), 29 deletions(-) commit 9b150709b3190719e5edf5f0ea35245cb8ae0a1a Author: Christoph Hellwig Date: Tue Oct 17 14:16:27 2017 -0700 xfs: remove all xfs_bmbt_set_* helpers except for xfs_bmbt_set_all Unused after the big bmap refactor. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap_btree.c | 102 ++++++----------------------------------- fs/xfs/libxfs/xfs_bmap_btree.h | 6 --- 2 files changed, 14 insertions(+), 94 deletions(-) commit b5cfbc2282bcd0dba460d4d4ec07fcfac9981de6 Author: Christoph Hellwig Date: Tue Oct 17 14:16:27 2017 -0700 xfs: replace xfs_bmbt_lookup_ge with xfs_bmbt_lookup_first We only use xfs_bmbt_lookup_ge to look up the first bmap record in an inode, so replace xfs_bmbt_lookup_ge with a special purpose helper that is a bit more descriptive. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit e16cf9b03cee4d2797695d4ca691e854c7a24864 Author: Christoph Hellwig Date: Tue Oct 17 14:16:26 2017 -0700 xfs: pass a struct xfs_bmbt_irec to xfs_bmbt_lookup_eq Now that we've massaged the callers into the right form we can always pass the actual extent record instead of the individual fields. As an additional benefit the btree cursor will now be prepoulated with the correct extent state instead of having to fix it up later. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 145 +++++++++++++---------------------------------- 1 file changed, 39 insertions(+), 106 deletions(-) commit a67d00a55507dc324037f182563e10339945721a Author: Christoph Hellwig Date: Tue Oct 17 14:16:26 2017 -0700 xfs: pass a struct xfs_bmbt_irec to xfs_bmbt_update Now that we've massaged the callers into the right form we can always pass the actual extent record instead of the individual fields. With that xfs_bmbt_disk_set_allf can go away, and xfs_bmbt_disk_set_all can be merged into the former implementation of xfs_bmbt_disk_set_allf. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 114 +++++++++++------------------------------ fs/xfs/libxfs/xfs_bmap_btree.c | 42 +++++---------- fs/xfs/libxfs/xfs_bmap_btree.h | 4 +- 3 files changed, 44 insertions(+), 116 deletions(-) commit 79fa6143a939a6b50d1d9dc736336e57d06b849d Author: Christoph Hellwig Date: Tue Oct 17 14:16:25 2017 -0700 xfs: refactor xfs_bmap_add_extent_unwritten_real Use xfs_iext_get_extent to find, and xfs_iext_update_extent to update entries in the in-core extent list. This isolates the function from the detailed layout of the extent list, and generally makes the code a lot more readable. Also get rid of the oldext and newext variables as using the extent records is a lot more descriptive. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 208 +++++++++++++++++++++++------------------------ 1 file changed, 104 insertions(+), 104 deletions(-) commit ca1862b0838604aa048120d87ebbf53cf7c8c8bd Author: Christoph Hellwig Date: Tue Oct 17 14:16:25 2017 -0700 xfs: refactor delalloc accounting in xfs_bmap_add_extent_delay_real Account for all changes to the delalloc reservation in da_new, and use a single call xfs_mod_fdblocks to reserve/free blocks, including always checking for an error. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) commit 4dcb8869871cc102b9431ae78b40bfc39087b90c Author: Christoph Hellwig Date: Tue Oct 17 14:16:24 2017 -0700 xfs: refactor xfs_bmap_add_extent_delay_real Use xfs_iext_get_extent to find, and xfs_iext_update_extent to update entries in the in-core extent list. This isolates the function from the detailed layout of the extent list, and generally makes the code a lot more readable. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 181 +++++++++++++++++++++++++---------------------- 1 file changed, 95 insertions(+), 86 deletions(-) commit 1abb9e55326c19bb41a9a2fd1179ed635e8af38c Author: Christoph Hellwig Date: Tue Oct 17 14:16:24 2017 -0700 xfs: refactor xfs_bmap_add_extent_hole_real Use xfs_iext_update_extent to update entries in the in-core extent list. This isolates the function from the detailed layout of the extent list, and generally makes the code a lot more readable. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 48 +++++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 27 deletions(-) commit 3ffc18ecd30ed21dc503fcbfb343c471a9112fb6 Author: Christoph Hellwig Date: Tue Oct 17 14:16:23 2017 -0700 xfs: refactor xfs_bmap_add_extent_hole_delay Use xfs_iext_get_extent to find, and xfs_iext_update_extent to update entries in the in-core extent list. This isolates the function from the detailed layout of the extent list, and generally makes the code a lot more readable. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 48fd52b16d74b937f44f87f942ddaff5e3e3db64 Author: Christoph Hellwig Date: Tue Oct 17 14:16:23 2017 -0700 xfs: refactor xfs_del_extent_real Use xfs_iext_update_extent to update entries in the in-core extent list. This isolates the function from the detailed layout of the extent list, and generally makes the code a lot more readable. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 60 ++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) commit 491f6f8abfa7a91d23b969be67ed476817bcefd7 Author: Christoph Hellwig Date: Tue Oct 17 14:16:23 2017 -0700 xfs: use the state defines in xfs_bmap_del_extent_real Use the same defines as the other extent add and delete helpers, which both improves code readability and trace point output. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 0173c689ff4c0855e24ceb898274af1339b5db48 Author: Christoph Hellwig Date: Tue Oct 17 14:16:22 2017 -0700 xfs: use correct state defines in xfs_bmap_del_extent_{cow,delay} Use the _FILLING values to match the usage in the xfs_bmap_add_extent_* helpers. No change in behavior, just better naming in the code and tracepoint output. Signed-off-by: Christoph Hellwig Reported-by: Brian Foster Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 1b24b633aafe4729c468f4144246709cdbda0f35 Author: Christoph Hellwig Date: Tue Oct 17 14:16:22 2017 -0700 xfs: move some more code into xfs_bmap_del_extent_real Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) commit e1d7553faf3979df83a168ea4732f6f5255972a2 Author: Christoph Hellwig Date: Tue Oct 17 14:16:21 2017 -0700 xfs: use xfs_bmap_del_extent_delay for the data fork as well And remove the delalloc code from xfs_bmap_del_extent, which gets renamed to xfs_bmap_del_extent_real to fit the naming scheme used by the other xfs_bmap_{add,del}_extent_* routines. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 331 ++++++++++++++++------------------------------- 1 file changed, 114 insertions(+), 217 deletions(-) commit 8280f6ed4645549154103da9f037ceb4f7c733b4 Author: Christoph Hellwig Date: Tue Oct 17 14:16:21 2017 -0700 xfs: rename bno to end in __xfs_bunmapi Rename the bno variable that's used as the end of the range in __xfs_bunmapi to end, which better describes it. Additionally change the start variable which takes the initial value of bno to be the function parameter itself. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 49 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 25 deletions(-) commit b213d69293cf003e6f0c63adfee6fcc70e3afee6 Author: Christoph Hellwig Date: Tue Oct 17 14:16:20 2017 -0700 xfs: don't set XFS_BTCUR_BPRV_WASDEL in xfs_bunmapi The XFS_BTCUR_BPRV_WASDEL flag is supposed to indicate that we are converting a delayed allocation to a real one, which isn't the case in xfs_bunmapi. Setting it could theoretically lead to misaccounting here, but it's unlikely that we ever hit it in practice. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit e3f0f7563e8a2589e3acc26a41f7a7867a33536d Author: Christoph Hellwig Date: Tue Oct 17 14:16:20 2017 -0700 xfs: use xfs_iext_get_extent instead of open coding it This avoids exposure to details of the extent list implementation. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 36 ++++++++++++++++-------------------- fs/xfs/xfs_trace.h | 2 +- 2 files changed, 17 insertions(+), 21 deletions(-) commit 5e422f5e4fd71d18bc6b851eeb3864477b3d842e Author: Christoph Hellwig Date: Tue Oct 17 14:16:19 2017 -0700 xfs: fix incorrect extent state in xfs_bmap_add_extent_unwritten_real There was one spot in xfs_bmap_add_extent_unwritten_real that didn't use the passed in new extent state but always converted to normal, leading to wrong behavior when converting from normal to unwritten. Only found by code inspection, it seems like this code path to move partial extent from written to unwritten while merging it with the next extent is rarely exercised. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/libxfs/xfs_bmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 232b51948b99dfcc95e81d8a289bc0409b3ff5b3 Author: Christoph Hellwig Date: Tue Oct 17 14:16:19 2017 -0700 xfs: simplify the xfs_getbmap interface Instead of passing in a formatter callback allocate the bmap buffer in the caller and process the entries there. Additionally replace the in-kernel buffer with a new much smaller structure, and unify the implementation of the different ioctls in a single function. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 38 ++++----------- fs/xfs/xfs_bmap_util.h | 10 ++-- fs/xfs/xfs_ioctl.c | 122 ++++++++++++++++++++++++------------------------- 3 files changed, 75 insertions(+), 95 deletions(-) commit abbf9e8a45074844efc91990a75dfe47fab70fa6 Author: Christoph Hellwig Date: Tue Oct 17 14:16:18 2017 -0700 xfs: rewrite getbmap using the xfs_iext_* helpers Currently getbmap uses xfs_bmapi_read to query the extent map, and then fixes up various bits that are eventually reported to userspace. This patch instead rewrites it to use xfs_iext_lookup_extent and xfs_iext_get_extent to iteratively process the extent map. This not only avoids the need to allocate a map for the returned xfs_bmbt_irec structures but also greatly simplified the code. There are two intentional behavior changes compared to the old code: - the current code reports unwritten extents that don't directly border a written one as unwritten even when not passing the BMV_IF_PREALLOC option, contrary to the documentation. The new code requires the BMV_IF_PREALLOC flag to report the unwrittent extent bit. - The new code does never merges consecutive extents, unlike the old code that sometimes does it based on the boundaries of the xfs_bmapi_read calls. Note that the extent merging behavior was entirely undocumented. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong fs/xfs/xfs_bmap_util.c | 525 ++++++++++++++++++++----------------------------- 1 file changed, 208 insertions(+), 317 deletions(-) commit 47dd47292828a552d62d0e68b7cd6bdc99d9e0aa Author: Bastian Stender Date: Tue Oct 17 14:46:07 2017 +0200 rtc: ds1307: add OF and ACPI entries for Epson RX8130 Make Epson RX8130 device tree and ACPI aware. Fixes: ee0981be7704 ("rtc: ds1307: Add support for Epson RX8130CE") Signed-off-by: Bastian Stender Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3990bedea6e96cb1f182dbeadd62215dbb9e1c85 Merge: 631de7a 3997fb7 Author: Wolfram Sang Date: Thu Oct 26 22:24:15 2017 +0200 Merge branch 'i2c-mux/for-next' of https://github.com/peda-r/i2c-mux into i2c/for-4.15 This cycle has been real quiet for me. There's only the one trivial patch that somewhat simplifies DT parsing in the i2c-mux-reg driver. commit 631de7a4603439eaa1d7a2a1a7b5b49edcd87f67 Author: Wolfram Sang Date: Wed Oct 18 00:17:09 2017 +0200 i2c: davinci: use correct format identifier for size_t Fixes this warning (found by build testing with 64bit): format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=] Signed-off-by: Wolfram Sang Acked-by: Sekhar Nori drivers/i2c/busses/i2c-davinci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d41bf8c9deaed1a90b18d3ffc5639d4c19f0259a Author: Tejun Heo Date: Mon Oct 23 16:18:27 2017 -0700 cgroup, sched: Move basic cpu stats from cgroup.stat to cpu.stat The basic cpu stat is currently shown with "cpu." prefix in cgroup.stat, and the same information is duplicated in cpu.stat when cpu controller is enabled. This is ugly and not very scalable as we want to expand the coverage of stat information which is always available. This patch makes cgroup core always create "cpu.stat" file and show the basic cpu stat there and calls the cpu controller to show the extra stats when enabled. This ensures that the same information isn't presented in multiple places and makes future expansion of basic stats easier. Signed-off-by: Tejun Heo Acked-by: Peter Zijlstra (Intel) Documentation/cgroup-v2.txt | 15 ++++------- include/linux/cgroup-defs.h | 2 ++ include/linux/cgroup.h | 2 -- kernel/cgroup/cgroup-internal.h | 1 + kernel/cgroup/cgroup.c | 60 +++++++++++++++++++++++++++++++++++++++-- kernel/cgroup/stat.c | 10 +++---- kernel/sched/core.c | 13 +++------ 7 files changed, 75 insertions(+), 28 deletions(-) commit 8fdc3fbbd5b646650efa66d577b88807a948a1d1 Author: Cao jin Date: Mon Oct 9 11:49:11 2017 +0800 kbuild: comments cleanup in Makefile.lib It has: 1. Move comments close to what it want to comment. 2. Comments cleanup & improvement. Signed-off-by: Cao jin Signed-off-by: Masahiro Yamada scripts/Makefile.lib | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit df16aaac26e92e97ab7234d3f93c953466adc4b5 Author: Nick Desaulniers Date: Sat Oct 7 13:23:23 2017 -0700 kbuild: clang: remove crufty HOSTCFLAGS When compiling with `make CC=clang HOSTCC=clang`, I was seeing warnings that clang did not recognize -fno-delete-null-pointer-checks for HOSTCC targets. These were added in commit 61163efae020 ("kbuild: LLVMLinux: Add Kbuild support for building kernel with Clang"). Clang does not support -fno-delete-null-pointer-checks, so adding it to HOSTCFLAGS if HOSTCC is clang does not make sense. It's not clear why the other warnings were disabled, and just for HOSTCFLAGS, but I can remove them, add -Werror to HOSTCFLAGS and compile with clang just fine. Suggested-by: Masahiro Yamada Signed-off-by: Nick Desaulniers Signed-off-by: Masahiro Yamada Makefile | 5 ----- 1 file changed, 5 deletions(-) commit b82a5e4ea8f6de3cae47fc6223b1372fcf8f1081 Author: Martin Schwidefsky Date: Thu Oct 26 15:36:29 2017 +0200 s390/decompressor: remove informational messages The decompressor for bzImage prints two informational messages which are not really helpful. The decompression step is fast and if something bad happens an error message will be printed. Remove the noise. Signed-off-by: Martin Schwidefsky arch/s390/boot/compressed/misc.c | 2 -- 1 file changed, 2 deletions(-) commit 2fe30129b0a6a8ddf71c46c8fb4524cb89739bc0 Author: Carlo Caione Date: Fri Oct 20 12:18:57 2017 +0100 ASoC: intel: byt: Enable IN2 map quirk for a KIANO laptop This cherry-trails laptop has the internal mic connected to the IN2 input pins. Enable the quirk to correctly map the routes. Signed-off-by: Carlo Caione Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit d9f8f9b2f3e2b95875cd59ae5c3276e4662e7513 Author: Carlo Caione Date: Fri Oct 20 12:18:56 2017 +0100 ASoC: intel: byt: Add headset jack Introduce an headset jack in the machine driver and register it to the codec driver. Signed-off-by: Carlo Caione Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit f85353fdd49fe0087438ef7d7475a832d16276c4 Author: Carlo Caione Date: Fri Oct 20 12:18:59 2017 +0100 ASoC: rt5651: Enable JD1_1 quirk for KIANO laptopt The KIANO SlimNote 14.2 laptop uses the JD1_1 input pin for jack detection. Set the correct quirk in the codec driver. Signed-off-by: Carlo Caione Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit b4435130bc19cd54631588355b16326aeb760e34 Author: Carlo Caione Date: Fri Oct 20 12:18:58 2017 +0100 ASoC: rt5651: Rework quirk logic Rework a bit the quirk logic in the codec driver to simplify the DMI-based quirk assignment for non-DT platforms. Signed-off-by: Carlo Caione Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) commit 80bbe4a30bc6b119df86c280c91cde2034309bf1 Author: Carlo Caione Date: Fri Oct 20 12:18:55 2017 +0100 ASoC: rt5651: Enable jack detection on JD* pins Enable jack detection for the RT5651 codec on the JD* pins. Signed-off-by: Carlo Caione Signed-off-by: Mark Brown include/sound/rt5651.h | 8 +++ sound/soc/codecs/rt5651.c | 168 +++++++++++++++++++++++++++++++++++++++++++++- sound/soc/codecs/rt5651.h | 4 ++ 3 files changed, 178 insertions(+), 2 deletions(-) commit 89a9a1c1c89cea5f70975c338c011b9f7024dee5 Author: Petr Mladek Date: Fri Oct 20 16:56:51 2017 +0200 livepatch: __klp_disable_patch() should never be called for disabled patches __klp_disable_patch() should never be called when the patch is not enabled. Let's add the same warning that we have in __klp_enable_patch(). This allows to remove the check when calling klp_pre_unpatch_callback(). It was strange anyway because it repeatedly checked per-patch flag for each patched object. Signed-off-by: Petr Mladek Acked-by: Joe Lawrence Signed-off-by: Jiri Kosina kernel/livepatch/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 5aaf1ab55389aeb6ce5527580a1a4d4dbc0f41ff Author: Petr Mladek Date: Fri Oct 20 16:56:50 2017 +0200 livepatch: Correctly call klp_post_unpatch_callback() in error paths The post_unpatch_enabled flag in struct klp_callbacks is set when a pre-patch callback successfully executes, indicating that we need to call a corresponding post-unpatch callback when the patch is reverted. This is true for ordinary patch disable as well as the error paths of klp_patch_object() callers. As currently coded, we inadvertently execute the post-patch callback twice in klp_module_coming() when klp_patch_object() fails: - We explicitly call klp_post_unpatch_callback() for the failed object - We call it again for the same object (and all the others) via klp_cleanup_module_patches_limited() We should clear the flag in klp_post_unpatch_callback() to make sure that the callback is not called twice. It makes the API more safe. (We could have removed the callback from the former error path as it would be covered by the latter call, but I think that is is cleaner to clear the post_unpatch_enabled after its invoked. For example, someone might later decide to call the callback only when obj->patched flag is set.) There is another mistake in the error path of klp_coming_module() in which it skips the post-unpatch callback for the klp_transition_patch. However, the pre-patch callback was called even for this patch, so be sure to make the corresponding callbacks for all patches. Finally, I used this opportunity to make klp_pre_patch_callback() more readable. [jkosina@suse.cz: incorporate changelog wording changes proposed by Joe Lawrence] Signed-off-by: Petr Mladek Acked-by: Joe Lawrence Signed-off-by: Jiri Kosina kernel/livepatch/core.c | 4 +--- kernel/livepatch/core.h | 8 +++++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 0202f5cd9aab127355f6b1de74058a670424d48a Author: Peisen Date: Thu Oct 26 10:35:36 2017 +0800 ALSA: hda/realtek - Add support for ALC1220 Add Clevo-P51 mode support for ALC1220. ALC1220 Clevo-p51 Speaker uses I2S output. We therefore want to make sure 0x14 (Headphones) and 0x1b (Speakers) use to stereo DAC 0x02. Signed-off-by: Peisen Hou Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 7211ec6392c8650ebc804023178c245464417ed2 Author: Kees Cook Date: Wed Oct 25 08:09:27 2017 -0700 ALSA: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. These are all the "mechanical" changes remaining in the sound subsystem. Signed-off-by: Kees Cook Acked-by: Mark Brown Signed-off-by: Takashi Iwai sound/i2c/other/ak4117.c | 8 ++++---- sound/pci/ctxfi/cttimer.c | 7 +++---- sound/pci/echoaudio/midi.c | 10 +++++----- sound/pci/korg1212/korg1212.c | 7 +++---- sound/pci/rme9652/hdsp.c | 8 ++++---- sound/pci/rme9652/hdspm.c | 8 ++++---- sound/soc/codecs/rt5645.c | 7 +++---- sound/soc/omap/ams-delta.c | 4 ++-- 8 files changed, 28 insertions(+), 31 deletions(-) commit 2fc5f83b92ba93f8f7119461d998bcdb1ac519ac Author: Gustavo A. R. Silva Date: Thu Oct 26 06:31:35 2017 -0500 net: xfrm_user: use BUG_ON instead of if condition followed by BUG Use BUG_ON instead of if condition followed by BUG. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) commit a4484705b1b16174757f68f19d3427427f96b643 Merge: 3fc27b7 c5c1cc9 Author: David S. Miller Date: Thu Oct 26 18:00:30 2017 +0900 Merge branch 'tcp-smc-rendezvous' Ursula Braun says: ==================== TCP experimental option for SMC rendezvous SMC-capability is to be negotiated with a TCP experimental option. As requested during code review of our previous approach using netfilter hooks, here's a new version. It touches tcp-code in the first patch and exploits the new tcp flag in the smc-code. Changelog: V3: * move include for linux/unaligned/access_ok.h to tcp_input.c V2: * switch to current jump labels API * remove static key checking in smc_set_capability() (comment from Eric Dumazet) * use inet_request_sock parameter for smc_set_option_cond() * smc_listen_work(): replace local variable lgr_lock_taken by new labels and separate this change into a prerequisite first patch ==================== Signed-off-by: David S. Miller commit c5c1cc9c522fc337601213afeb39c3df2eb92d04 Author: Ursula Braun Date: Wed Oct 25 11:01:46 2017 +0200 smc: add SMC rendezvous protocol The SMC protocol [1] uses a rendezvous protocol to negotiate SMC capability between peers. The current Linux implementation does not yet use this rendezvous protocol and, thus, is not compliant to RFC7609 and incompatible with other SMC implementations like in zOS. This patch adds support for the SMC rendezvous protocol. It uses a new TCP experimental option. With this option, SMC capabilities are exchanged between the peers during the TCP three way handshake. [1] SMC-R Informational RFC: http://www.rfc-editor.org/info/rfc7609 Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 60e2a7780793bae0debc275a9ccd57f7da0cf195 Author: Ursula Braun Date: Wed Oct 25 11:01:45 2017 +0200 tcp: TCP experimental option for SMC The SMC protocol [1] relies on the use of a new TCP experimental option [2, 3]. With this option, SMC capabilities are exchanged between peers during the TCP three way handshake. This patch adds support for this experimental option to TCP. References: [1] SMC-R Informational RFC: http://www.rfc-editor.org/info/rfc7609 [2] Shared Use of TCP Experimental Options RFC 6994: https://tools.ietf.org/rfc/rfc6994.txt [3] IANA ExID SMCR: http://www.iana.org/assignments/tcp-parameters/tcp-parameters.xhtml#tcp-exids Signed-off-by: Ursula Braun Signed-off-by: David S. Miller include/linux/tcp.h | 9 +++++-- include/net/inet_sock.h | 3 ++- include/net/tcp.h | 7 ++++++ net/ipv4/tcp.c | 6 +++++ net/ipv4/tcp_input.c | 35 +++++++++++++++++++++++++++ net/ipv4/tcp_minisocks.c | 19 +++++++++++++++ net/ipv4/tcp_output.c | 63 +++++++++++++++++++++++++++++++++++++++++++++--- 7 files changed, 136 insertions(+), 6 deletions(-) commit 145686baab68e9c7594fe9269f47da479c25ad79 Author: Ursula Braun Date: Wed Oct 25 11:01:44 2017 +0200 smc: fix mutex unlocks during link group creation Link group creation is synchronized with the smc_create_lgr_pending lock. In smc_listen_work() this mutex is sometimes unlocked, even though it has not been locked before. This issue will surface in presence of the SMC rendezvous code. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/af_smc.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 3fc27b71b894f5e2ad611297d5817b6092c96626 Author: Quentin Monnet Date: Tue Oct 24 20:11:28 2017 -0700 tools: bpftool: try to mount bpffs if required for pinning objects One possible cause of failure for `bpftool {prog|map} pin * file FILE` is the FILE not being in an eBPF virtual file system (bpffs). In this case, make bpftool attempt to mount bpffs on the parent directory of the FILE. Then, if this operation is successful, try again to pin the object. The code for mnt_bpffs() is a copy of function bpf_mnt_fs() from iproute2 package (under lib/bpf.c, taken at commit 4b73d52f8a81), with modifications regarding handling of error messages. Signed-off-by: Quentin Monnet Signed-off-by: Jakub Kicinski Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/bpf/bpftool/common.c | 71 ++++++++++++++++++++++++++++++++++++++++------ tools/bpf/bpftool/main.h | 2 ++ 2 files changed, 65 insertions(+), 8 deletions(-) commit e233df01576bba9f5bafacccd571353b72152bd5 Author: Cong Wang Date: Tue Oct 24 15:44:49 2017 -0700 tipc: fix a dangling pointer tsk->group is set to grp earlier, but we forget to unset it after grp is freed. Fixes: 75da2163dbb6 ("tipc: introduce communication groups") Reported-by: syzkaller bot Cc: Jon Maloy Cc: Ying Xue Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/tipc/socket.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c1eef220c1760762753b602c382127bfccee226d Author: Cong Wang Date: Tue Oct 24 15:30:37 2017 -0700 vsock: always call vsock_init_tables() Although CONFIG_VSOCKETS_DIAG depends on CONFIG_VSOCKETS, vsock_init_tables() is not always called, it is called only if other modules call its caller. Therefore if we only enable CONFIG_VSOCKETS_DIAG, it would crash kernel on uninitialized vsock_bind_table. This patch fixes it by moving vsock_init_tables() to its own module_init(). Fixes: 413a4317aca7 ("VSOCK: add sock_diag interface") Reported-by: syzkaller bot Cc: Stefan Hajnoczi Cc: Jorgen Hansen Signed-off-by: Cong Wang Reviewed-by: Stefan Hajnoczi Signed-off-by: David S. Miller net/vmw_vsock/af_vsock.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit dca6951f5adc5262ae2689cf2656628b309eabd7 Author: Colin Ian King Date: Thu Oct 19 12:58:21 2017 +0200 f2fs: remove several redundant assignments There are several assignments to variables that are redundant as the values are never read when the variables are updated later and so the redundant statements can be safely removed. Cleans up clang warnings: fs/f2fs/segment.c:923:19: warning: Value stored to 'p' during its initialization is never read fs/f2fs/segment.c:2060:2: warning: Value stored to 'hint' is never read fs/f2fs/segment.c:2353:2: warning: Value stored to 'start_block' is never read fs/f2fs/segment.c:2354:2: warning: Value stored to 'end_block' is never read Signed-off-by: Colin Ian King Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 6bccfa19bb3ba31ebe9abc3ec95b27cc4667194e Author: Arnd Bergmann Date: Thu Oct 19 11:52:47 2017 +0200 f2fs: avoid using timespec All uses of timespec are deprecated, and this one is not particularly useful, as the documented method for converting seconds to jiffies is to multiply by 'HZ'. Signed-off-by: Arnd Bergmann Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7e515b31d44dcd20a98c938dfdc21877a30042a0 Author: Chao Yu Date: Wed Oct 18 10:34:14 2017 +0800 f2fs: fix to correct no_fggc_candidate There may be extreme case as below: For one section contains one segment, and there are total 100 segments with 10% over-privision ratio in f2fs partition, fggc_threshold will be rounded down to 460 instead of 460.8 as below caclulation: sbi->fggc_threshold = div_u64((u64)(main_count - ovp_count) * BLKS_PER_SEC(sbi), (main_count - resv_count)); If section usage is as: 60 segments which contain 460 valid blocks 40 segments which contain 462 valid blocks As valid block number in all sections is large than fggc_threshold, so none of them will be chosen as candidate due to incorrect fggc_threshold. Let's just soften the term of choosing foreground GC candidates. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e5b5d41c93ef79e9f297f9a3b40730bf0b41f31 Author: Jaegeuk Kim Date: Thu Oct 19 12:07:11 2017 -0700 Revert "f2fs: return wrong error number on f2fs_quota_write" This reverts commit 4f31d26b0c17f2aae6a6afeb823a87e20671ab4b. It turns out that we need to report error number if nothing was written. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c77f754f8a29f11b3f525100f092d9af874daa8 Author: Jaegeuk Kim Date: Thu Oct 19 11:48:57 2017 -0700 f2fs: remove obsolete pointer for truncate_xattr_node This patch removes obosolete parameter for truncate_xattr_node. Suggested-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 +- fs/f2fs/node.c | 10 ++++------ fs/f2fs/xattr.c | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) commit 4e46a023c515de61df61770e03673c3f72cc6b20 Author: Jaegeuk Kim Date: Thu Oct 19 09:43:56 2017 -0700 f2fs: retry ENOMEM for quota_read|write This gives another chance to read or write quota data. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 57864ae5ce3ab5c6e3137dd03edefdb2e5531ba1 Author: Jaegeuk Kim Date: Wed Oct 18 19:05:57 2017 -0700 f2fs: limit # of inmemory pages If some abnormal users try lots of atomic write operations, f2fs is able to produce pinned pages in the main memory which affects system performance. This patch limits that as 20% over total memory size, and if f2fs reaches to the limit, it will drop all the inmemory pages. Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 8 ++++++++ fs/f2fs/f2fs.h | 3 +++ fs/f2fs/node.c | 4 ++++ fs/f2fs/node.h | 1 + fs/f2fs/segment.c | 38 ++++++++++++++++++++++++++++++++++++++ fs/f2fs/super.c | 1 + 6 files changed, 55 insertions(+) commit ab383be510ab2039042a89ae4fc3128eb8383cc4 Author: Chao Yu Date: Fri Oct 13 18:01:36 2017 +0800 f2fs: update ctx->pos correctly when hitting hole in directory This patch fixes to update ctx->pos correctly when hitting hole in directory. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cb7a84486577a95c0300a12eb2e9cef4bd126628 Author: Chao Yu Date: Fri Oct 13 18:01:35 2017 +0800 f2fs: relocate readahead codes in readdir() Previously, for large directory, we just do readahead only once in readdir(), readdir()'s performance may drop when traversing latter blocks. In order to avoid this, relocate readahead codes to covering all traverse flow. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4414dea8d32bb2a351e1e84eebcdc7bff22864b0 Author: Chao Yu Date: Fri Oct 13 18:01:34 2017 +0800 f2fs: allow readdir() to be interrupted This patch follows ext4 to allow readdir() in large empty directory to be interrupted. Referenced commit of ext4: 1f60fbe72749 ("ext4: allow readdir()'s of large empty directories to be interrupted"). Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit e97a3c4c6f0af13fa48e251348f98881d82b5135 Author: Chao Yu Date: Fri Oct 13 18:01:33 2017 +0800 f2fs: trace f2fs_readdir This patch adds trace for f2fs_readdir. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/dir.c | 14 +++++++++----- include/trace/events/f2fs.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 5 deletions(-) commit 0c5e36db17f5fe3dda8c5584f5f530152409a3f3 Author: Chao Yu Date: Tue Oct 17 17:33:41 2017 +0800 f2fs: trace f2fs_lookup This patch adds trace for f2fs_lookup. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/namei.c | 49 +++++++++++++++++++++++++-------------- include/trace/events/f2fs.h | 56 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 17 deletions(-) commit 48ab25f486a3f730db825758b9728fffdf237574 Author: Weichao Guo Date: Sat Oct 14 08:13:32 2017 +0800 f2fs: skip searching non-exist range in truncate_hole Let's skip entire non-exist area to speed up truncate_hole by using get_next_page_offset. Signed-off-by: Weichao Guo Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b4267d195dd887c4412e34b5a7365baa741b679 Author: Jaegeuk Kim Date: Fri Oct 13 10:27:45 2017 -0700 f2fs: expose some sectors to user in inline data or dentry case If there's some data written through inline data or dentry, we need to shouw st_blocks. This fixes reporting zero blocks even though there is small written data. Cc: stable@vger.kernel.org Reviewed-by: Chao Yu [Jaegeuk Kim: avoid link file for quotacheck] Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 943973cd528bc8814c85bc3af1c0f8ab87a1d69b Author: Jaegeuk Kim Date: Thu Oct 12 19:12:53 2017 -0700 f2fs: avoid stale fi->gdirty_list pointer When doing fault injection test, f2fs_evict_inode() didn't remove gdirty_list which incurs a kernel panic due to wrong pointer access. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/inode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 204b4ae06739ddfe59643c44a205e739938c51e5 Author: Jaegeuk Kim Date: Sat Oct 7 00:08:05 2017 -0700 f2fs/crypto: drop crypto key at evict_inode only This patch avoids dropping crypto key in f2fs_drop_inode, so we can guarantee it happens only at evict_inode. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/super.c | 1 - 1 file changed, 1 deletion(-) commit a0d00fad353d4a315f54fb345aa1c65b3771389b Author: Chao Yu Date: Mon Oct 9 17:55:19 2017 +0800 f2fs: fix to avoid race when accessing last_disk_size last_disk_size could be wrong due to concurrently updating, so using i_sem semaphore to make last_disk_size updating exclusive to fix this issue. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 3 +++ fs/f2fs/f2fs.h | 10 ++++++++-- fs/f2fs/file.c | 4 ++++ 3 files changed, 15 insertions(+), 2 deletions(-) commit ebf7c522fdc2ec2fa0fc2351ef613841f79586e5 Author: Thomas Meyer Date: Sat Oct 7 16:02:21 2017 +0200 f2fs: Fix bool initialization/comparison Bool initializations should use true and false. Bool tests don't need comparisons. Signed-off-by: Thomas Meyer Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cf5c759f927dc92452fa214691be0c8a3e7c115d Author: Chao Yu Date: Wed Oct 4 09:08:37 2017 +0800 f2fs: give up CP_TRIMMED_FLAG if it drops discards In ->umount, once we drop remained discard entries, we should not set CP_TRIMMED_FLAG with another checkpoint. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 2 +- fs/f2fs/segment.c | 13 ++++++++++--- fs/f2fs/super.c | 5 +++-- 3 files changed, 14 insertions(+), 6 deletions(-) commit 2ec6f2ef799b94e6e99868ef586cafceaa7c0475 Author: Chao Yu Date: Wed Oct 4 09:08:36 2017 +0800 f2fs: trace f2fs_remove_discard This patch adds tracepoint to trace f2fs_remove_discard. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 2 ++ include/trace/events/f2fs.h | 7 +++++++ 2 files changed, 9 insertions(+) commit 33da62cf7a9aafdde1ccdb59b4df24ab66c1a827 Author: Chao Yu Date: Wed Oct 4 09:08:35 2017 +0800 f2fs: reduce cmd_lock coverage in __issue_discard_cmd __submit_discard_cmd may lead long latency due to exhaustion of I/O request resource in block layer, so issuing all discard under cmd_lock may lead to hangtask, in order to avoid that, let's reduce it's coverage. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/segment.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 78997b569f5625f2762b3c4e743c33becdd5d99d Author: Chao Yu Date: Wed Oct 4 09:08:34 2017 +0800 f2fs: split discard policy There are many different scenarios such as fstrim, umount, urgent or background where we will issue discards, actually, they need use different policy in aspect of io aware, discard granularity, delay interval and so on. But now they just share one common discard policy, so there will be race when changing policy in between these scenarios, the interference of changing discard policy will be very serious. This patch changes to split discard policy for different scenarios. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 17 +++++-- fs/f2fs/segment.c | 149 ++++++++++++++++++++++++++---------------------------- fs/f2fs/segment.h | 5 +- fs/f2fs/sysfs.c | 13 ----- 4 files changed, 88 insertions(+), 96 deletions(-) commit ecc9aa00dbb10416d3c1d8ef44ee38d20a36d172 Author: Chao Yu Date: Wed Oct 4 09:08:33 2017 +0800 f2fs: wrap discard policy This patch wraps scattered optional parameters into discard policy as below, later, with it we expect that we can adjust these parameters with proper strategy in different scenario. struct discard_policy { unsigned int min_interval; /* used for candidates exist */ unsigned int max_interval; /* used for candidates not exist */ unsigned int max_requests; /* # of discards issued per round */ unsigned int io_aware_gran; /* minimum granularity discard not be aware of I/O */ bool io_aware; /* issue discard in idle time */ bool sync; /* submit discard with REQ_SYNC flag */ }; This patch doesn't change any logic of codes. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 12 +++++++++++- fs/f2fs/segment.c | 38 +++++++++++++++++++++++++++++--------- 2 files changed, 40 insertions(+), 10 deletions(-) commit 8412663d177d95beff799c8bb256fccef86d09e6 Author: Chao Yu Date: Wed Oct 4 09:08:32 2017 +0800 f2fs: support issuing/waiting discard in range Fstrim intends to trim invalid blocks of filesystem only with specified range and granularity, but actually, it will issue all previous cached discard commands which may be out-of-range and be with unmatched granularity, it's unneeded. In order to fix above issues, this patch introduces new helps to support to issue and wait discard in range and adds a new fstrim_list for tracking in-flight discard from ->fstrim. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/f2fs.h | 3 +- fs/f2fs/segment.c | 127 +++++++++++++++++++++++++++++++++++++++++++++--------- fs/f2fs/super.c | 2 +- 3 files changed, 109 insertions(+), 23 deletions(-) commit 1bb5a74b31151008480ebaa831c1ec1b007e8f43 Author: Sean Wang Date: Mon Oct 23 15:16:47 2017 +0800 rtc: mediatek: update MAINTAINERS entry with MediaTek RTC driver I work for MediaTek on maintaining the MediaTek SoC based RTC driver for the existing SoCs and keep adding support for the following SoCs in the future. Cc: Eddie Huang Signed-off-by: Sean Wang Signed-off-by: Alexandre Belloni MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) commit d00a7ed288e7943fcf253c6402abb09f0f9689d0 Author: Sean Wang Date: Mon Oct 23 15:16:46 2017 +0800 rtc: mediatek: enhance the description for MediaTek PMIC based RTC Give a better description for original MediaTek RTC driver as PMIC based RTC in order to distinguish SoC based RTC. Also turning all words with Mediatek to MediaTek here. Cc: Eddie Huang Signed-off-by: Sean Wang Acked-by: Eddie Huang Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ba5d018135ef4eb59e6143bff0aaeef118ff78a1 Author: Sean Wang Date: Mon Oct 23 15:16:45 2017 +0800 rtc: mediatek: add driver for RTC on MT7622 SoC This patch introduces the driver for the RTC on MT7622 SoC. Signed-off-by: Sean Wang Reviewed-by: Yingjoe Chen Signed-off-by: Alexandre Belloni drivers/rtc/Kconfig | 10 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-mt7622.c | 422 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 433 insertions(+) commit 3c91b0c1de8d013490bbc41ce9ee8810ea5baddd Author: Egil Hjelmeland Date: Tue Oct 24 17:14:10 2017 +0200 net: dsa: lan9303: Do not disable switch fabric port 0 at .probe Make the LAN9303 work when lan9303_probe() is called twice. For some unknown reason the LAN9303 switch fail to forward data when switch fabric port 0 TX is disabled during probe. (Write of LAN9303_MAC_TX_CFG_0 in lan9303_disable_processing_port().) In that situation the switch fabric seem to receive frames, because the ALR is learning addresses. But no frames are transmitted on any of the ports. In our system lan9303_probe() is called twice, first time dsa_register_switch() return -EPROBE_DEFER. As an experiment, modified the code to skip writing LAN9303_MAC_TX_CFG_0, port 0 during the first probe. Then the switch works as expected. Resolve the problem by not calling lan9303_disable_processing_port() on port 0 during probe. Ports 1 and 2 are still disabled. Although unsatisfying that the exact failure mechanism is not known, the patch should not cause any harm. Signed-off-by: Egil Hjelmeland Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/lan9303-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit acfdf7eabea4186a386ba5e656f0c739563cb1a5 Author: Rahul Lakkireddy Date: Tue Oct 24 19:28:26 2017 +0530 cxgb4: fix overflow in collecting IBQ and OBQ dump Destination buffer already has offset added. So, don't add offset again. Fetch actual size of configured OBQ from hardware, instead of using hardcoded value. Fixes: 7c075ce221cf ("cxgb4: collect IBQ and OBQ dumps") Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 20 ++++++++++++++------ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 16 +++++++++++++++- 3 files changed, 30 insertions(+), 7 deletions(-) commit 63207425536a659462fff4c6fbf474f789a91c7d Merge: 95fa7a0 c3b6f75 Author: David S. Miller Date: Thu Oct 26 17:25:36 2017 +0900 Merge branch 'hns3-fixes' Lipeng says: ==================== net: hns3: fix some bugs for HNS3 driver This patchset fixes some bugs reported by Hisilicon test team. ==================== Signed-off-by: David S. Miller commit c3b6f755fdcd2c0d8342c01e630741928a7c62ab Author: Lipeng Date: Tue Oct 24 21:02:12 2017 +0800 net: hns3: fix the bug when reuse command description in hclge_add_mac_vlan_tbl When reusing a command description read from HW, driver should set IN_VLD bit, WR bit and NO_INTR bit. If IN_VLD bit and NO_INTR bit are not set, the command fails and driver prints error message: [ 135.261284] hns3 0000:7d:00.0: cmdq execute failed for get_mac_vlan_cmd_status,status=2. [ 135.270983] hns3 0000:7d:00.0: add mac addr failed for cmd_send, ret =-5. This patch fixes the bug. Fixes: 46a3df9 (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support) Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a17dcf3f0124698d1120da71574bf4c339e5a368 Author: Lipeng Date: Tue Oct 24 21:02:11 2017 +0800 net: hns3: fix a bug in hclge_uninit_client_instance HNS3 driver initialize hdev->roce_client and vport->roce.client in hclge_init_client_instance, and need set hdev->roce_client and vport->roce.client NULL. If do not set them NULL when uninit, it will fail in the scene: insmod hns3.ko, hns-roce.ko, hns-roce-hw-v3.ko successfully, but rmmod hns3.ko after rmmod hns-roce-hw-v2.ko and hns-roce.ko. This patch fixes the issue. Fixes: 46a3df9 (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support) Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 3a46f34d20d453f09defb76b11a567647939c0aa Author: Lipeng Date: Tue Oct 24 21:02:10 2017 +0800 net: hns3: add nic_client check when initialize roce base information Roce driver works base on HNS3 driver.If insmod Roce driver before NIC driver there is a error because do not check nic_client. This patch adds nic_client check when initialize roce base information. Fixes: 46a3df9 (net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support) Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7036d26f328f12a323069eb16d965055b4cb3795 Author: Lipeng Date: Tue Oct 24 21:02:09 2017 +0800 net: hns3: fix the bug of hns3_set_txbd_baseinfo The SC bits of TX BD mean switch control. For this area, value 0 indicates no switch control, the packet is routed according to the forwarding table. Value 1 indicates that the packet is transmitted to the network bypassing the forwarding table. As HNS3 driver need support VF later, VF conmunicate with its own PF need forwarding table. This patch sets SC bits of TX BD 0 and use forwarding table. Fixes: 76ad4f0 (net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC) Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa7c352f9841ab3fee5bf1de127a45e6310124a6 Author: Chanwoo Choi Date: Mon Oct 23 10:32:12 2017 +0900 PM / devfreq: Define the constant governor name Prior to that, the devfreq device uses the governor name when adding the itself. In order to prevent the mistake used the wrong governor name, this patch defines the governor name as a constant and then uses them instead of using the string directly. Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: linux-samsung-soc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org drivers/devfreq/exynos-bus.c | 5 +++-- drivers/devfreq/governor_passive.c | 2 +- drivers/devfreq/governor_performance.c | 2 +- drivers/devfreq/governor_powersave.c | 2 +- drivers/devfreq/governor_simpleondemand.c | 2 +- drivers/devfreq/governor_userspace.c | 2 +- drivers/devfreq/rk3399_dmc.c | 2 +- include/linux/devfreq.h | 7 +++++++ 8 files changed, 16 insertions(+), 8 deletions(-) commit ccc4c3bcbb7de3cb61723f7584c01c3bde6cfbbb Author: Chanwoo Choi Date: Mon Oct 23 10:32:11 2017 +0900 PM / devfreq: Remove unneeded conditional statement The freq_table array of each devfreq device is always not NULL. In result, it is unneeded to check whether profile->freq_table is NULL or not. Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 416b46a2627ae8de1466f90787dede6f9c5a1bfa Author: Chanwoo Choi Date: Mon Oct 23 10:32:10 2017 +0900 PM / devfreq: Show the all available frequencies The commit a76caf55e5b35 ("thermal: Add devfreq cooling") allows the devfreq device to use the cooling device. When the cooling down are required, the devfreq_cooling.c disables the OPP entry with the dev_pm_opp_disable(). In result, 'available_frequencies'[1] sysfs node never came to show the all available frequencies. [1] /sys/class/devfreq/.../available_frequencies So, this patch uses the 'freq_table' in the 'struct devfreq_dev_profile' in order to show the all available frequencies. - If 'freq_table' is NULL, devfreq core initializes them by using OPP values. - If 'freq_table' is initialized, devfreq core just uses the 'freq_table'. And this patch adds some comment about the sort way of 'freq_table'. Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 16 +++++----------- include/linux/devfreq.h | 5 +++-- 2 files changed, 8 insertions(+), 13 deletions(-) commit ea572f816032bef9ff2641a439a45651a20eab73 Author: Chanwoo Choi Date: Mon Oct 23 10:32:09 2017 +0900 PM / devfreq: Change return type of devfreq_set_freq_table() This patch changes the return type of devfreq_set_freq_table() from 'void' to 'int' in order to check whether it fails or not. And This patch just removes the 'devfreq' prefix and the description of function. Because the helper functions are only used by the devfreq. Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit f1d981eaecf8ace68ec1d15bf05f28a4887ea6fb Author: Chanwoo Choi Date: Mon Oct 23 10:32:08 2017 +0900 PM / devfreq: Use the available min/max frequency The commit a76caf55e5b35 ("thermal: Add devfreq cooling") is able to disable OPP as a cooling device. In result, both update_devfreq() and {min|max}_freq_show() have to consider the 'opp->available' status of each OPP. So, this patch adds the 'scaling_{min|max}_freq' to struct devfreq in order to indicate the available mininum and maximum frequency by adjusting OPP interface such as dev_pm_opp_{disable|enable}(). The 'scaling_{min|max}_freq' are used for on both update_devfreq() and {min|max}_freq_show(). Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 40 ++++++++++++++++++++++++++++++++-------- include/linux/devfreq.h | 4 ++++ 2 files changed, 36 insertions(+), 8 deletions(-) commit 1051e2c304b5cf17d4117505985f8128c5c64fd9 Author: Chanwoo Choi Date: Mon Oct 23 10:32:07 2017 +0900 Revert "PM / devfreq: Add show_one macro to delete the duplicate code" This reverts commit 3104fa3081126c9bda35793af5f335d0ee0d5818. The {min|max}_freq_show() show the stored value of the struct devfreq. But, if the drivers/thermal/devfreq_cooling.c disables the specific frequency value, {min|max}_freq_show() have to check this situation before showing the stored value. So, this patch revert the macro in order to add the additional codes. Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit ab8f58ad72c4d1abe59216362ddb8bfa428c9071 Author: Chanwoo Choi Date: Mon Oct 23 10:32:06 2017 +0900 PM / devfreq: Set min/max_freq when adding the devfreq device Prior to that, the min/max_freq of the devfreq device are always zero before the user changes the min/max_freq through sysfs entries. It might make the confusion for the min/max_freq. This patch initializes the available min/max_freq by using the OPP during adding the devfreq device. Signed-off-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 95fa7a05677e425e175cbca724acb03f15449a7a Merge: c3c9f44 eaac974 Author: David S. Miller Date: Thu Oct 26 17:05:04 2017 +0900 Merge branch 'dsa-dont-unmask-port-bitmaps' Vivien Didelot says: ==================== net: dsa: don't unmask port bitmaps DSA has several bitmaps to store the type of ports: cpu_port_mask, dsa_port_mask and enabled_port_mask. But the code is inconsistently unmasking them. The legacy code tries to unmask cpu_port_mask and dsa_port_mask but skips enabled_port_mask. The new bindings unmasks cpu_port_mask and enabled_port_mask but skips dsa_port_mask. In fact there is no need to unmask them because we are in the error path, and they won't be used after. Instead of fixing the unmasking, simply remove them. ==================== Signed-off-by: David S. Miller commit eaac97466ee4e0ab6ed67afbf9fc400862e64986 Author: Vivien Didelot Date: Mon Oct 23 14:17:31 2017 -0400 net: dsa: don't unmask port bitmaps The unapply functions are called on the error path. As for dsa_port_mask, enabled_port_mask and cpu_port_mask won't be used after so there's no need to unmask the corresponding port bit from them. This makes dsa_cpu_port_unapply() and dsa_dsa_port_unapply() identical, which can be factorized later. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa2.c | 4 ---- 1 file changed, 4 deletions(-) commit 8e8ef50bb4246d6fee9971994a6d846d9bc7ff4c Author: Vivien Didelot Date: Mon Oct 23 14:17:30 2017 -0400 net: dsa: legacy: don't unmask port bitmaps The legacy code does not unmask the cpu_port_mask and dsa_port_mask as stated. But this is done on the error path and those masks won't be used after that. So instead of fixing the bit operation, simply remove it. Fixes: 83c0afaec7b7 ("net: dsa: Add new binding implementation") Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/legacy.c | 4 ---- 1 file changed, 4 deletions(-) commit 0bebd2f1bfcbf954a93b65d4b2848488fd049c78 Merge: b64395f f3ee909 d24e95f Author: Mark Brown Date: Thu Oct 26 09:45:52 2017 +0200 Merge remote-tracking branches 'asoc/fix/topology' and 'asoc/fix/wm8998' into asoc-linus commit b64395f1892b25fa7cc866bc1fe91d14ef7da7ec Merge: 39b540e 3712851 ea968da a6189d3 a16cc63 064970a 3c6f6c5 Author: Mark Brown Date: Thu Oct 26 09:45:46 2017 +0200 Merge remote-tracking branches 'asoc/fix/rt5514', 'asoc/fix/rt5616', 'asoc/fix/rt5659', 'asoc/fix/rt5663', 'asoc/fix/samsung' and 'asoc/fix/stm32' into asoc-linus commit 39b540ec8df89bedb791c13f2042d4d2596fc653 Merge: 91fd3e9 1e6f4fc0 1b8b68b d10a7d3 Author: Mark Brown Date: Thu Oct 26 09:45:42 2017 +0200 Merge remote-tracking branches 'asoc/fix/adau17x1', 'asoc/fix/davinci' and 'asoc/fix/max98090' into asoc-linus commit 91fd3e918d5c6e6a78ea77620196d5f42df689dc Merge: 1ef6f34 32debfc Author: Mark Brown Date: Thu Oct 26 09:45:39 2017 +0200 Merge remote-tracking branch 'asoc/fix/rockchip' into asoc-linus commit 1ef6f346c62f386f28b0012d6379e2822a3842d3 Merge: eefb175 9e9e95d Author: Mark Brown Date: Thu Oct 26 09:45:37 2017 +0200 Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linus commit eefb175fc227492bfcfadce5409f48911923fa02 Merge: cc0b813 5d61f0b Author: Mark Brown Date: Thu Oct 26 09:45:35 2017 +0200 Merge remote-tracking branch 'asoc/fix/pcm' into asoc-linus commit cc0b8139d87b6d9efa3ae24cdb8d92e48da0143f Merge: 613733f 664611e Author: Mark Brown Date: Thu Oct 26 09:45:33 2017 +0200 Merge remote-tracking branch 'asoc/fix/msm8916' into asoc-linus commit 613733f0bd096fb74e39d1c150decb20da187167 Merge: bb176f6 d1c4cb4 Author: Mark Brown Date: Thu Oct 26 09:45:32 2017 +0200 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit 26284ca918e4e271bae4e96129fc3791b9bf0983 Author: Marco Franchi Date: Wed Oct 25 16:57:13 2017 -0200 ASoC: pfuze100: Remove leading zero from '@08' notation Improve the binding example by removing the leading 0 from '@08' notation, which fixes the following build warnings: Warning (unit_address_format): Node /pfuze100@08 unit name should not have leading 0s Warning (unit_address_format): Node /pfuze200@08 unit name should not have leading 0s Warning (unit_address_format): Node /pfuze3000@08 unit name should not have leading 0s Signed-off-by: Marco Franchi Signed-off-by: Mark Brown Documentation/devicetree/bindings/regulator/pfuze100.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3fa30ae9ff4a29e677b4800036f755517a27dd9e Author: Marco Franchi Date: Wed Oct 25 15:24:50 2017 -0200 ASoC: sgtl5000: Remove leading zero from '@0a' notation Improve the binding example by removing the leading 0 from '@0a' notation, which fixes the following build warning: Warning (unit_address_format): Node /sgtl5000@0a unit name should not have leading 0s Signed-off-by: Marco Franchi Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/sgtl5000.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60d5a1a47b9a8381c08d2263b11ac9c757c87746 Author: Carlo Caione Date: Fri Oct 20 12:18:55 2017 +0100 ASoC: rt5651: Enable jack detection on JD* pins Enable jack detection for the RT5651 codec on the JD* pins. Signed-off-by: Carlo Caione Signed-off-by: Mark Brown include/sound/rt5651.h | 8 +++ sound/soc/codecs/rt5651.c | 168 +++++++++++++++++++++++++++++++++++++++++++++- sound/soc/codecs/rt5651.h | 4 ++ 3 files changed, 178 insertions(+), 2 deletions(-) commit a9ce6f854581aa7c39fd94f965658aa4e7ff7892 Author: Andreas Färber Date: Sun Oct 1 15:48:22 2017 +0200 arm64: dts: realtek: Add MeLE V9 Add an initial Device Tree for MeLE V9 Media Player. Cc: meleservice@mele.cn Signed-off-by: Andreas Färber arch/arm64/boot/dts/realtek/Makefile | 1 + arch/arm64/boot/dts/realtek/rtd1295-mele-v9.dts | 31 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+) commit d109cbf1842fbfca57ab33323ca63be48a8efa53 Author: Andreas Färber Date: Mon Oct 16 04:45:54 2017 +0200 dt-bindings: arm: realtek: Document MeLE V9 Define a compatible string for MeLE V9 Media Player. Cc: meleservice@mele.cn Acked-by: Rob Herring Signed-off-by: Andreas Färber Documentation/devicetree/bindings/arm/realtek.txt | 1 + 1 file changed, 1 insertion(+) commit 50be28a654ff04b282dfcb06ad5d0b20556242cb Author: Andreas Färber Date: Sun Oct 1 15:45:52 2017 +0200 dt-bindings: Add vendor prefix for MeLE MeLE is a Chinese manufacturer of TV boxes and Mini PCs. Cc: meleservice@mele.cn Acked-by: Rob Herring Signed-off-by: Andreas Färber Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit f8b3436dad5c3911e2ef1a7aa037863cfc95686c Author: Andreas Färber Date: Sun Oct 15 22:27:50 2017 +0200 arm64: dts: realtek: Factor out common RTD129x parts Prepares for RTD1293 and RTD1296. Signed-off-by: Andreas Färber arch/arm64/boot/dts/realtek/rtd1295.dtsi | 65 ++-------------------------- arch/arm64/boot/dts/realtek/rtd129x.dtsi | 72 ++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 61 deletions(-) commit 0462d9921e3dfcb022600e4db2d67e6ceab57769 Author: Elena Reshetova Date: Fri Oct 20 10:47:48 2017 +0300 vmur: convert urdev.ref_count from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable urdev.ref_count is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: Martin Schwidefsky drivers/s390/char/vmur.c | 8 ++++---- drivers/s390/char/vmur.h | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) commit 54b933c6c954a8b7b0c2b40a1c4d3f7279d11e22 Author: Cheng Jian Date: Wed Oct 25 19:28:27 2017 +0800 sched/idle: Micro-optimize the idle loop Move the loop-invariant calculation of 'cpu' in do_idle() out of the loop body, because the current CPU is always constant. This improves the generated code both on x86-64 and ARM64: x86-64: Before patch (execution in loop): 864: 0f ae e8 lfence 867: 65 8b 05 c2 38 f1 7e mov %gs:0x7ef138c2(%rip),%eax 86e: 89 c0 mov %eax,%eax 870: 48 0f a3 05 68 19 08 bt %rax,0x1081968(%rip) 877: 01 After patch (execution in loop): 872: 0f ae e8 lfence 875: 4c 0f a3 25 63 19 08 bt %r12,0x1081963(%rip) 87c: 01 ARM64: Before patch (execution in loop): c58: d5033d9f dsb ld c5c: d538d080 mrs x0, tpidr_el1 c60: b8606a61 ldr w1, [x19,x0] c64: 1100fc20 add w0, w1, #0x3f c68: 7100003f cmp w1, #0x0 c6c: 1a81b000 csel w0, w0, w1, lt c70: 13067c00 asr w0, w0, #6 c74: 93407c00 sxtw x0, w0 c78: f8607a80 ldr x0, [x20,x0,lsl #3] c7c: 9ac12401 lsr x1, x0, x1 c80: 36000581 tbz w1, #0, d30 After patch (execution in loop): c84: d5033d9f dsb ld c88: f9400260 ldr x0, [x19] c8c: ea14001f tst x0, x20 c90: 54000580 b.eq d40 Signed-off-by: Cheng Jian [ Rewrote the title and the changelog. ] Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: huawei.libin@huawei.com Cc: xiexiuqi@huawei.com Link: http://lkml.kernel.org/r/1508930907-107755-1-git-send-email-cj.chengjian@huawei.com Signed-off-by: Ingo Molnar kernel/sched/idle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3593eb944c65c7a0adfd679949e67f96d97d1768 Author: Hendrik Brueckner Date: Tue Oct 10 11:52:02 2017 +0200 s390/cpum_cf: add hardware counter support for IBM z14 Add the hardware counters that are available with z14. With z14, the number of problem-state counters is reduced. The initialization is updated respectively. Signed-off-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_cpum_cf_events.c | 278 ++++++++++++++++++++++++++------- 1 file changed, 218 insertions(+), 60 deletions(-) commit e319e1fbd9d42420ab6eec0bfd75eb9ad7ca63b1 Author: Byungchul Park Date: Wed Oct 25 17:56:05 2017 +0900 block, locking/lockdep: Assign a lock_class per gendisk used for wait_for_completion() Darrick posted the following warning and Dave Chinner analyzed it: > ====================================================== > WARNING: possible circular locking dependency detected > 4.14.0-rc1-fixes #1 Tainted: G W > ------------------------------------------------------ > loop0/31693 is trying to acquire lock: > (&(&ip->i_mmaplock)->mr_lock){++++}, at: [] xfs_ilock+0x23c/0x330 [xfs] > > but now in release context of a crosslock acquired at the following: > ((complete)&ret.event){+.+.}, at: [] submit_bio_wait+0x7f/0xb0 > > which lock already depends on the new lock. > > the existing dependency chain (in reverse order) is: > > -> #2 ((complete)&ret.event){+.+.}: > lock_acquire+0xab/0x200 > wait_for_completion_io+0x4e/0x1a0 > submit_bio_wait+0x7f/0xb0 > blkdev_issue_zeroout+0x71/0xa0 > xfs_bmapi_convert_unwritten+0x11f/0x1d0 [xfs] > xfs_bmapi_write+0x374/0x11f0 [xfs] > xfs_iomap_write_direct+0x2ac/0x430 [xfs] > xfs_file_iomap_begin+0x20d/0xd50 [xfs] > iomap_apply+0x43/0xe0 > dax_iomap_rw+0x89/0xf0 > xfs_file_dax_write+0xcc/0x220 [xfs] > xfs_file_write_iter+0xf0/0x130 [xfs] > __vfs_write+0xd9/0x150 > vfs_write+0xc8/0x1c0 > SyS_write+0x45/0xa0 > entry_SYSCALL_64_fastpath+0x1f/0xbe > > -> #1 (&xfs_nondir_ilock_class){++++}: > lock_acquire+0xab/0x200 > down_write_nested+0x4a/0xb0 > xfs_ilock+0x263/0x330 [xfs] > xfs_setattr_size+0x152/0x370 [xfs] > xfs_vn_setattr+0x6b/0x90 [xfs] > notify_change+0x27d/0x3f0 > do_truncate+0x5b/0x90 > path_openat+0x237/0xa90 > do_filp_open+0x8a/0xf0 > do_sys_open+0x11c/0x1f0 > entry_SYSCALL_64_fastpath+0x1f/0xbe > > -> #0 (&(&ip->i_mmaplock)->mr_lock){++++}: > up_write+0x1c/0x40 > xfs_iunlock+0x1d0/0x310 [xfs] > xfs_file_fallocate+0x8a/0x310 [xfs] > loop_queue_work+0xb7/0x8d0 > kthread_worker_fn+0xb9/0x1f0 > > Chain exists of: > &(&ip->i_mmaplock)->mr_lock --> &xfs_nondir_ilock_class --> (complete)&ret.event > > Possible unsafe locking scenario by crosslock: > > CPU0 CPU1 > ---- ---- > lock(&xfs_nondir_ilock_class); > lock((complete)&ret.event); > lock(&(&ip->i_mmaplock)->mr_lock); > unlock((complete)&ret.event); > > *** DEADLOCK *** The warning is a false positive, caused by the fact that all wait_for_completion()s in submit_bio_wait() are waiting with the same lock class. However, some bios have nothing to do with others, for example in the case of loop devices, there's no direct connection between the bios of an upper device and the bios of a lower device(=loop device). The safest way to assign different lock classes to different devices is to do it for each gendisk. In other words, this patch assigns a lockdep_map per gendisk and uses it when initializing completion in submit_bio_wait(). Analyzed-by: Dave Chinner Reported-by: Darrick J. Wong Signed-off-by: Byungchul Park Reviewed-by: Jens Axboe Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: amir73il@gmail.com Cc: axboe@kernel.dk Cc: david@fromorbit.com Cc: hch@infradead.org Cc: idryomov@gmail.com Cc: johan@kernel.org Cc: johannes.berg@intel.com Cc: kernel-team@lge.com Cc: linux-block@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-xfs@vger.kernel.org Cc: oleg@redhat.com Cc: tj@kernel.org Link: http://lkml.kernel.org/r/1508921765-15396-10-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar block/bio.c | 2 +- block/genhd.c | 10 ++-------- include/linux/genhd.h | 22 ++++++++++++++++++++-- 3 files changed, 23 insertions(+), 11 deletions(-) commit 4d91d7b099508831e82ef209bba71c8b636886a2 Author: Anup Patel Date: Thu Oct 5 22:13:20 2017 +0530 rpmsg: Allow RPMSG_VIRTIO to be enabled via menuconfig or defconfig Currently, RPMSG_VIRTIO can only be enabled if some other kconfig option selects it. This does not allow it to be enabled for virtualized systems where Virtio RPMSG is available over Virtio MMIO or PCI transport. This patch updates RPMSG_VIRTIO kconfig option so that we can enable the VirtIO RPMSG driver via menuconfig or defconfig. The patch also removes "select RPMSG_VIRTIO" from various remoteproc kconfig options because it is now user selectable. Signed-off-by: Anup Patel Signed-off-by: Bjorn Andersson drivers/remoteproc/Kconfig | 4 ---- drivers/rpmsg/Kconfig | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) commit 43106e25ab37580f54df99c512d1d66ae0fe1c67 Merge: 62884cd 4a0144b Author: Dave Airlie Date: Thu Oct 26 14:49:44 2017 +1000 Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next Just a few fixes for 4.15. * 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux: drm/amd/amdgpu: Remove workaround for suspend/resume in uvd7 drm/amdgpu: don't flush the TLB before initializing GART drm/amdgpu: minor cleanup for amdgpu_ttm_bind drm/amdgpu/psp: prevent page fault by checking write_frame address(v4) drm/amd/powerplay: retrieve the real-time coreClock values drm/amd/powerplay: fix performance drop on Vega10 drm/amd/powerplay: add one smc message for Vega10 drm/amd/powerplay: fix amd_powerplay_reset() amdgpu: add padding to the fence to handle ioctl. drm/amdgpu:fix wb_clear drm/amdgpu:fix vf_error_put drm/amdgpu/sriov:now must reinit psp drm/amdgpu: merge bios post checking functions commit 4a0144bfc6df1f7a89a04a3e8662f1f4375eb1fe Author: Tom St Denis Date: Tue Oct 24 12:07:12 2017 -0400 drm/amd/amdgpu: Remove workaround for suspend/resume in uvd7 The workaround is not required anymor and would result in hangs during suspend/resume cycles if the uvd block were busy. Signed-off-by: Tom St Denis Acked-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit fa2cd036925ffea8ef4f2826734ccfa1b0528141 Author: Christian König Date: Mon Oct 16 17:37:06 2017 +0200 drm/amdgpu: don't flush the TLB before initializing GART No point in doing this. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit ec8c9f8be875c48c391a1355255867a2d70d1ee2 Author: Christian König Date: Mon Oct 16 13:47:15 2017 +0200 drm/amdgpu: minor cleanup for amdgpu_ttm_bind Filter the placement mask before using it. In theory it could be that we have other flags set here as well. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4694257e7d4757fedaa8dcd18bb5ff52e76a2765 Author: Evan Quan Date: Mon Oct 16 16:51:28 2017 +0800 drm/amdgpu/psp: prevent page fault by checking write_frame address(v4) - Prevent a possible buffer overflow when updating the ring buffer by bounds checking the command frame against the available space in the ring buffer. v2: update the ring_buffer_end address v3: update the commit log v4: squash in print fix (Michel) Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 14 ++++++++++++-- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) commit 0722382dcc4fd4e53c12db2c2eda9c5c9c903432 Author: Evan Quan Date: Fri Oct 20 15:42:34 2017 +0800 drm/amd/powerplay: retrieve the real-time coreClock values - Currently, the coreClock value for min/max performance level on raven is hard-coded. Use the real-time value retrieved by GetGfxMinFreqLimit and GetGfxMaxFreqLimit PPSMC messages Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 28 ++++++-------------------- 1 file changed, 6 insertions(+), 22 deletions(-) commit b87079ec7b4d38efee015367315958ce5495ba93 Author: Eric Huang Date: Thu Oct 19 14:55:18 2017 -0400 drm/amd/powerplay: fix performance drop on Vega10 Setting package power PID to 1 fixes performance drop caused by updated SMU FW, before DPM is enabled. 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, 9 insertions(+) commit 75e500865fca102e4663cff2f02d67a62625ceb9 Author: Eric Huang Date: Thu Oct 19 14:44:36 2017 -0400 drm/amd/powerplay: add one smc message for Vega10 This is used to fix performance drop caused by updated SMU FW. Signed-off-by: Eric Huang Acked-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 2a53e060a053d5d7627dcde5b06b5950902d9ce6 Author: Christoph Fritz Date: Tue Oct 24 12:15:50 2017 +0200 usb: chipidea: fix trivial typo in Kconfig This patch fixes a trivial typo to get the module name ci_hdrc.ko correct. Signed-off-by: Christoph Fritz Signed-off-by: Peter Chen drivers/usb/chipidea/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3c9f441d82f0f1a1a8841201fe5ad6f9cddd040 Merge: 88ca59d 6c97f01 Author: David S. Miller Date: Thu Oct 26 10:14:55 2017 +0900 Merge branch 'bcmgenet-start-stop-sequence-refinement' Doug Berger says: ==================== net: bcmgenet: start/stop sequence refinement This commit set is the result of an investigation into an issue that occurred when bringing the interface up and down repeatedly with an external 100BASE-T PHY. In some cases the MAC would experience mass receive packet duplication that could in rare cases lead to a stall from overflow. The fix for this is contained in the third commit. The first 3 commits represent bug fixes that should be applied to the net repository and are candidates for backporting to stable releases. The remaining commits are enhancements which is why the set is being submitted to net-next but they are implemented on top of the fixes. The first fix is provided as justification for why the set isn't split between a net submission and a net-next submission. ==================== Signed-off-by: David S. Miller commit 6c97f010cee28e3f262c547215fb0e8702bdb654 Author: Doug Berger Date: Wed Oct 25 15:04:19 2017 -0700 net: bcmgenet: use dev->phydev instead of priv->phydev Now that the software reset of the PHY has been removed it is no longer necessary to retain a private pointer to the phydev for use when the PHY is detached (which isn't generally safe anyway). The driver now uses the phydev member attached to the net_device. For ethtool commands that have a PHY component, an explicit check is made to prevent accessing an invalid phydev pointer when one is not attached (e.g. interface is down). Signed-off-by: Doug Berger Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 47 +++++++++++++------------- drivers/net/ethernet/broadcom/genet/bcmgenet.h | 1 - drivers/net/ethernet/broadcom/genet/bcmmii.c | 17 ++++------ 3 files changed, 31 insertions(+), 34 deletions(-) commit 484bfa1507bf71cecc7833ae7f7272d8af49badc Author: Doug Berger Date: Wed Oct 25 15:04:18 2017 -0700 Revert "net: bcmgenet: Software reset EPHY after power on" With commit f7d72996e222 ("net: bcmgenet: enable loopback during UniMAC sw_reset") it is no longer necessary to force the software reset of the internal EPHY before resetting the UniMAC to ensure a clean reset. Therefore this commit reverts commit 5dbebbb44a6a ("net: bcmgenet: Software reset EPHY after power on"). Signed-off-by: Doug Berger Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 1 - drivers/net/ethernet/broadcom/genet/bcmgenet.h | 1 - drivers/net/ethernet/broadcom/genet/bcmmii.c | 16 ---------------- 3 files changed, 18 deletions(-) commit b0447ecb533270cf857ebee1133cb8ff67115423 Author: Doug Berger Date: Wed Oct 25 15:04:17 2017 -0700 net: bcmgenet: relax lock constraints to reduce IRQ latency Since the ring locks are not used in a hard IRQ context it is often not necessary to disable global IRQs while waiting on a lock. Using less restrictive lock and unlock calls improves the real-time responsiveness of the system. Signed-off-by: Doug Berger Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit d215dbac48ab9e77c680fcd28863ccc227a5657e Author: Doug Berger Date: Wed Oct 25 15:04:16 2017 -0700 net: bcmgenet: rework bcmgenet_netif_start and bcmgenet_netif_stop This commit consolidates more common functionality from bcmgenet_close and bcmgenet_suspend into bcmgenet_netif_stop and modifies the start and stop sequences to better suit the design of the GENET hardware. Signed-off-by: Doug Berger Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 49 +++++++++----------------- 1 file changed, 17 insertions(+), 32 deletions(-) commit fbf557d9d1bf93892db70121061c81aaded41607 Author: Doug Berger Date: Wed Oct 25 15:04:15 2017 -0700 net: bcmgenet: cleanup ring interrupt masking and unmasking Since the NAPI interrupts are basically ignored when NAPI is disabled we don't need to mask them within the functions bcmgenet_disable_tx_napi() and bcmgenet_disable_rx_napi(). So wait until all NAPI instances are disabled and mask all of the bcmgenet driver interrupts together in bcmgenet_netif_stop(). The interrupts can still be enabled in the functions bcmgenet_enable_tx_napi() and bcmgenet_enable_rx_napi(), but use the ring context int_enable() method to keep the functionality consistent and the code cleaner. Signed-off-by: Doug Berger Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 28 +++++--------------------- 1 file changed, 5 insertions(+), 23 deletions(-) commit 7587935cfa119e122215e37e002a481d7374198b Author: Doug Berger Date: Wed Oct 25 15:04:14 2017 -0700 net: bcmgenet: move NAPI initialization to ring initialization Since each ring has its own NAPI instance it might as well be initialized along with the other ring context. Signed-off-by: Doug Berger Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 42 +++++--------------------- 1 file changed, 8 insertions(+), 34 deletions(-) commit 28c2d1a7a0bfdf3617800d2beae1c67983c03d15 Author: Doug Berger Date: Wed Oct 25 15:04:13 2017 -0700 net: bcmgenet: enable loopback during UniMAC sw_reset It is necessary for the UniMAC to be clocked at least 5 cycles while the sw_reset is asserted to ensure a clean reset. It was discovered that this condition was not being met when connected to an external RGMII PHY that disabled the Rx clock in the Power Save state. This commit modifies the reset_umac function to place the (RG)MII interface into a local loopback mode where the Rx clock comes from the GENET sourced Tx clk during the sw_reset to ensure the presence and stability of the clock. In addition, it turns out that the sw_reset of the UniMAC is not self clearing, but this was masked by a bug in the timeout code. The sw_reset is now explicitly cleared by zeroing the UMAC_CMD register before returning from reset_umac which makes it no longer necessary to do so in init_umac and makes the clearing of CMD_TX_EN and CMD_RX_EN by umac_enable_set redundant. The timeout code (and its associated bug) are removed so reset_umac no longer needs to return a result, and that means init_umac that calls reset_umac does not need to as well. 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 | 55 +++++--------------------- 1 file changed, 10 insertions(+), 45 deletions(-) commit 4fd6dc98c19369d24c4a4819b27c114948720d16 Author: Doug Berger Date: Wed Oct 25 15:04:12 2017 -0700 net: bcmgenet: prevent duplicate calls of bcmgenet_dma_teardown When bcmgenet_dma_teardown is called from bcmgenet_fini_dma it ends up getting called twice from the bcmgenet_close and bcmgenet_suspend functions (once directly and once inside the bcmgenet_fini_dma call). This commit removes the call from bcmgenet_fini_dma and ensures that bcmgenet_dma_teardown is called before bcmgenet_fini_dma in all paths of execution. Fixes: 4a0c081eff43 ("net: bcmgenet: call bcmgenet_dma_teardown in bcmgenet_fini_dma") Signed-off-by: Doug Berger Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0d314502bbfbef7560e5a3e817722128d5c5fc5d Author: Doug Berger Date: Wed Oct 25 15:04:11 2017 -0700 net: bcmgenet: correct bad merge As noted in the net-next submission for GENETv5 support [1], there were merge conflicts with an earlier net submission [2] that had not yet found its way to the net-next repository. Unfortunately, when the branches were merged the conflicts were not correctly resolved. This commit attempts to correct that. [1] https://lkml.org/lkml/2017/3/13/1145 [2] https://lkml.org/lkml/2017/3/9/890 Fixes: 101c431492d2 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net") Signed-off-by: Doug Berger Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/genet/bcmgenet.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit 88ca59d1aaf28c25b47a9f933090e480ba6dc92a Author: Girish Moodalbail Date: Wed Oct 25 12:26:43 2017 -0700 macvlan: remove unused fields in struct macvlan_dev commit 635b8c8ecdd2 ("tap: Renaming tap related APIs, data structures, macros") captured all the tap related fields into a new struct tap_dev. However, it failed to remove those fields from struct macvlan_dev. Those fields are currently unused and must be removed. While there I moved the comment for MAX_TAP_QUEUES to the right place. Fixes: 635b8c8ecdd27142 (tap: Renaming tap related APIs, data structures, macros) Signed-off-by: Girish Moodalbail Signed-off-by: David S. Miller include/linux/if_macvlan.h | 15 --------------- include/linux/if_tap.h | 4 ++++ 2 files changed, 4 insertions(+), 15 deletions(-) commit 1769af432a9451774edb4c1221c52437936a01af Author: Steven J. Hill Date: Wed Oct 25 11:44:32 2017 -0500 ethernet: cavium: octeon: Switch to using netdev_info(). Signed-off-by: Steven J. Hill Signed-off-by: David Daney Signed-off-by: David S. Miller drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit f65163fed0e7dc3c79be4f96a8fe97fc89328b93 Author: Jon Maloy Date: Wed Oct 25 16:19:52 2017 +0200 tipc: eliminate KASAN warning The following warning was reported by syzbot on Oct 24. 2017: KASAN: slab-out-of-bounds Read in tipc_nametbl_lookup_dst_nodes This is a harmless bug, but we still want to get rid of the warning, so we swap the two conditions in question. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/name_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 691da76f9c90fa618682b88f386b6a1ef304666e Author: Sylwester Nawrocki Date: Mon Oct 23 14:49:34 2017 +0200 drm: exynos: Add driver for HDMI audio interface The hdmi-codec interface added in this patch is required to properly support HDMI audio. Currently the audio part of the SoC internal HDMI transmitter is configured with fixed values, which makes HDMI audio working by chance, only on boards having an external audio codec connected in parallel with the HDMI audio transmitter's input I2S interface. Signed-off-by: Sylwester Nawrocki Reviewed-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/exynos/exynos_hdmi.c | 250 ++++++++++++++++++++++++++--------- drivers/gpu/drm/exynos/regs-hdmi.h | 8 +- 3 files changed, 194 insertions(+), 65 deletions(-) commit ae58c03e0ee13e37f8f56c0158d55f504ad889d2 Author: Daniel Drake Date: Fri Sep 29 12:05:42 2017 +0200 drm/exynos/hdmi: add 85.5MHz pixel clock for v14 HDMI PHY Configuration details from Samsung. This enables 1366x768@60Hz, which also needs the 256px timing hack to work around a mixer limitation. Signed-off-by: Daniel Drake Signed-off-by: Tobias Jakobi [a.hajda@samsung.com: rebased onto proposed patchset] Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_hdmi.c | 11 ++++++++++- drivers/gpu/drm/exynos/exynos_mixer.c | 4 +++- 2 files changed, 13 insertions(+), 2 deletions(-) commit 0900673e366190328796903a72cf17a9d082c327 Author: Andrzej Hajda Date: Fri Sep 29 12:05:41 2017 +0200 drm/exynos/mixer: enable support for 1024x768 and 1280x1024 modes Since HDMI can handle these modes despite of MIXER limitations let's enable them. Signed-off-by: Andrzej Hajda Reviewed-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 3 +++ 1 file changed, 3 insertions(+) commit 36fd887acbd1ce349eba8283d9e8a9d7932a24ca Author: Andrzej Hajda Date: Fri Sep 29 12:05:40 2017 +0200 drm/exynos/hdmi: quirk for support mode timings conversion MIXER in SoCs prior to Exynos5420 supports only 4 video modes: 720x480, 720x576, 1280x720, 1920x1080. Support for other modes can be enabled by manipulating timings of HDMI. To do it adjusted_mode should contain actual mode set on crtc. With this patch it is possible to enable 1024x768 and 1280x1024 modes in MIXER. Suggested-by: Daniel Drake Signed-off-by: Andrzej Hajda Reviewed-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_hdmi.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit acc8bf040c39499139e6d26e72c642d42ffa5016 Author: Andrzej Hajda Date: Fri Sep 29 12:05:39 2017 +0200 drm/exynos/mixer: pass actual mode on MIXER to encoder MIXER in SoCs prior to Exynos5420 supports only 4 video modes: 720x480, 720x576, 1280x720, 1920x1080. Support for other modes can be enabled by manipulating timings of HDMI. To allow it MIXER must pass actual video mode to HDMI, the proper way to do it is to modify adjusted_mode property in crtc::mode_fixup callback. Adding such callback allows also to simplify mixer_cfg_scan code - choosing mode is performed already in crtc::mode_fixup. mode_fixup is also better place to check interlace flag. Signed-off-by: Andrzej Hajda Reviewed-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 71 +++++++++++++++++++++++++---------- 1 file changed, 51 insertions(+), 20 deletions(-) commit 2466db97e39d5479bb44a09a56ca85043d3d3997 Author: Andrzej Hajda Date: Fri Sep 29 12:05:38 2017 +0200 drm/exynos: add mode_fixup callback to exynos_drm_crtc_ops crtc::mode_fixup callback is required by crtcs which internally use a different mode than requested by user - case of Exynos Mixer. Signed-off-by: Andrzej Hajda Reviewed-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_crtc.c | 15 +++++++++++++++ drivers/gpu/drm/exynos/exynos_drm_drv.h | 3 +++ 2 files changed, 18 insertions(+) commit 991ea04e2cf4a9705462ec2fe878e385feb48d73 Author: Andrzej Hajda Date: Fri Sep 29 12:05:37 2017 +0200 drm/exynos/hdmi: remove redundant mode field Display mode is preserved in CRTC state, there is no need to keep local copy of it. Moreover since HDMI should configure registers according to requested mode, use it instead of adjusted_mode, which should contain mode produced by CRTC - functionally it does not change anything, but subsequent patches will make the difference. Signed-off-by: Andrzej Hajda Reviewed-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_hdmi.c | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) commit 524c59f1b79885154c2424aac00ed66f6a6eac29 Author: Andrzej Hajda Date: Fri Sep 29 12:05:36 2017 +0200 drm/exynos/mixer: remove mixer_resources sub-structure mixer_resources adds only unnecessary redirection, removing it makes the code shorter and cleaner. Signed-off-by: Andrzej Hajda Reviewed-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 324 ++++++++++++++++------------------ 1 file changed, 148 insertions(+), 176 deletions(-) commit 6ace38a52783705038e312220eb5d31237866fec Author: Andrzej Hajda Date: Fri Sep 29 12:05:35 2017 +0200 drm/exynos/mixer: fix mode validation code Mode limitation checked in mixer driver affects only older HW. Mixer in Exynos542x has no such limitations. While at it patch changes validation callback to recently introduced mode_valid which is more suitable for the check. Additionally little cleanup is performed. Signed-off-by: Andrzej Hajda Reviewed-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 3fc40ca9695c6a10c528f80306b1731128eca8c1 Author: Andrzej Hajda Date: Fri Sep 29 12:05:34 2017 +0200 drm/exynos/mixer: move resolution configuration to single function Screen resolution configuration depends on HW version, let's put it into single function to make it consistent and simplify the code. Signed-off-by: Andrzej Hajda Reviewed-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 71469944dea0e7c5d9426171a7a5fb3609b9d15f Author: Andrzej Hajda Date: Fri Sep 29 12:05:33 2017 +0200 drm/exynos/mixer: move mode commit to enable callback Mode commit should not be called for every plane separately. It is enough to call it once in enable callback. The change also requires that the interlace check is moved to mixer_commit. It should be done in the same patch to avoid regression. Signed-off-by: Andrzej Hajda Reviewed-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 521d98a36fd0d5fe8df46fd2c3da9503e1262513 Author: Andrzej Hajda Date: Fri Sep 29 12:05:32 2017 +0200 drm/exynos/mixer: abstract out output mode setup code Mode setup code is called from video plane update and mixer plane update. Let's group it together in mixer_commit function like in case of other Exynos CRTCs. Signed-off-by: Andrzej Hajda Reviewed-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_mixer.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) commit 7265d50ea20f0dfe7e6d077a2feb50369773c090 Author: Dan Carpenter Date: Tue Oct 24 12:44:18 2017 +0300 drm/amd/powerplay: fix amd_powerplay_reset() We accidentally inverted an if statement and turned amd_powerplay_reset() into a no-op. Fixes: ae97988fc89e ("drm/amd/powerplay: tidy up ret checks in amd_powerplay.c (v3)") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 832c418a1530afba54fd96a2cca0912ec9036080 Author: Bjorn Helgaas Date: Wed Oct 25 17:09:24 2017 -0500 PCI: Document reset method return values The pci_reset_function() path may try several different reset methods: device-specific resets, PCIe Function Level Resets, PCI Advanced Features Function Level Reset, etc. Add a comment about what the return values from these methods mean. If one of the methods fails, in some cases we want to continue and try the next one in the list, but sometimes we want to stop trying. Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7e577a17f2eefeef32f1106ebf91e7cd143ba654 Author: Ahmet Inan Date: Sat Oct 14 10:10:53 2017 -0700 Input: add I2C attached EETI EXC3000 multi touch driver The 3000 series have a new protocol which allows to report up to 5 points in a single 66 byte frame. One must always read in 66 byte frames. To support up to 10 points, two consecutive frames need to be read: The first frame says how many points until sync. The second frame must say zero points or both frames must be discarded. To be able to work with the higher 400KHz I2C bus rate, one must successfully send a special package prior _each_ read or the controller will refuse to cooperate. This is a minimal implementation based on egalax_i2c.c (which can be found on the internet) and egalax_ts.c but without the vendor interface and no power management support. Signed-off-by: Ahmet Inan Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../bindings/input/touchscreen/exc3000.txt | 27 +++ drivers/input/touchscreen/Kconfig | 10 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/exc3000.c | 223 +++++++++++++++++++++ 4 files changed, 261 insertions(+) commit fa564ad9636651fd11ec2c79c48dee844066f73a Author: Christian König Date: Tue Oct 24 14:40:29 2017 -0500 x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 00-1f, 30-3f, 60-7f) Manually enable a 64GB 64-bit BAR so we have enough room for graphics devices with large framebuffers. Most BIOSes don't enable this for compatibility reasons. Signed-off-by: Christian König Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko arch/x86/pci/fixup.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) commit 8bb705e3e79d84e77edd4499e74483dd96a4626c Author: Christian König Date: Tue Oct 24 14:40:26 2017 -0500 PCI: Add pci_resize_resource() for resizing BARs Add a pci_resize_resource() interface to allow device drivers to resize BARs of their devices. This is useful for devices with large local storage, e.g., graphics devices. These devices often only expose 256MB BARs initially to be compatible with 32-bit systems. This function only tries to reprogram the windows of the bridge directly above the requesting device and only the BAR of the same type (usually mem, 64bit, prefetchable). This is done to avoid disturbing other drivers by changing the BARs of their devices. Drivers should use the following sequence to resize their BARs: 1. Disable memory decoding of the device using the PCI cfg dword. 2. Use pci_release_resource() to release all BARs which can move during the resize, including the one you want to resize. 3. Call pci_resize_resource() for each BAR you want to resize. 4. Call pci_assign_unassigned_bus_resources() to reassign new locations for all BARs which are not resized, but could move. 5. If everything worked as expected, enable memory decoding in the device again using the PCI cfg dword. Signed-off-by: Christian König Signed-off-by: Bjorn Helgaas drivers/pci/setup-bus.c | 98 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/pci/setup-res.c | 58 +++++++++++++++++++++++++++++ include/linux/pci.h | 3 ++ 3 files changed, 159 insertions(+) commit 1901142ba8d5bf9f21b86d33770be8309071c25d Author: Sean Wang Date: Mon Oct 23 15:16:44 2017 +0800 dt-bindings: rtc: mediatek: add bindings for MediaTek SoC based RTC Add device-tree binding for MediaTek SoC based RTC Cc: devicetree@vger.kernel.org Signed-off-by: Sean Wang Acked-by: Rob Herring Signed-off-by: Alexandre Belloni .../devicetree/bindings/rtc/rtc-mt7622.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit bc3bee0252725240ffa62180d387cc245179c549 Author: Russell King Date: Fri Sep 29 11:23:36 2017 +0100 rtc: pcf8523: add support for trimming the RTC oscillator Add support for reading and writing the RTC offset register, converting it to the corresponding parts-per-billion value. When setting the drift, the PCF8523 has two modes: one applies the adjustment every two hours, the other applies the adjustment every minute. We select between these two modes according to which ever gives the closest PPB value to the one requested. Signed-off-by: Russell King Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pcf8523.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit f94ffbc2c2a4128c4412bb483d0807722dfb682b Author: Russell King Date: Fri Sep 29 11:23:31 2017 +0100 rtc: armada38x: add support for trimming the RTC Add support for trimming the RTC using the offset mechanism. This RTC supports two modes: low update mode and high update mode. Low update mode has finer precision than high update mode, so we use the low mode where possible. Signed-off-by: Russell King Signed-off-by: Alexandre Belloni drivers/rtc/rtc-armada38x.c | 101 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) commit 8a25c8f66c46077bd5ae8ea5f6fd6fa08ea8231a Author: Russell King Date: Fri Sep 29 11:23:25 2017 +0100 rtc: clarify the RTC offset correction The RTC offset correction documentation is not very clear about the exact relationship between "offset" and the effect it has on the RTC. Supplement the documentation with an equation giving the relationship. Signed-off-by: Russell King Signed-off-by: Alexandre Belloni drivers/rtc/interface.c | 4 ++++ 1 file changed, 4 insertions(+) commit 49404665b935447d4f2d5509fbff569b7bf8c495 Author: Kees Cook Date: Wed Oct 25 03:30:01 2017 -0700 leds: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Richard Purdie Cc: Pavel Machek Cc: Willy Tarreau Cc: linux-leds@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Jacek Anaszewski drivers/leds/led-core.c | 7 +++---- drivers/leds/trigger/ledtrig-activity.c | 14 ++++++++------ drivers/leds/trigger/ledtrig-transient.c | 12 +++++++----- 3 files changed, 18 insertions(+), 15 deletions(-) commit 5455e73a76a397d77541bb5b0eedac137ef525b5 Author: Somnath Kotur Date: Wed Oct 25 09:12:30 2017 +0530 bnxt_re: Implement the shutdown hook of the L2-RoCE driver interface When host is shutting down, it invokes the shutdown hook of the L2 driver where it would attempt to free the MSI-X vectors, but would fail because some vectors are held by the RoCE driver. Implement the new hook in the L2 -> RoCE interface which will be invoked so that the RoCE driver can unregister the device and free up the MSI-X vectors it had claimed so that L2 can proceed with it's shutdown without failure. Signed-off-by: Somnath Kotur Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/main.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 35fb2a88ed4b77356fa679a8525c869a3594e287 Author: Leon Romanovsky Date: Wed Oct 25 07:41:11 2017 +0300 RDMA/cxgb4: Declare stag as __be32 The scqe.stag is actually __b32, fix it. drivers/infiniband/hw/cxgb4/cq.c:754:52: warning: cast to restricted __be32 Cc: Steve Wise Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/t4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3bfbea747353c2b40b48784b70e782ca5352f18c Author: Kees Cook Date: Tue Oct 24 03:28:27 2017 -0700 IB/rxe: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Moni Shoua Cc: Doug Ledford Cc: Sean Hefty Cc: Hal Rosenstock Cc: linux-rdma@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_comp.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_loc.h | 4 ++-- drivers/infiniband/sw/rxe/rxe_qp.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_req.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) commit 5a3dc32372439eb9a0d6027c54cbfff64803fce5 Author: Parav Pandit Date: Thu Oct 19 08:40:30 2017 +0300 IB/cm: Fix memory corruption in handling CM request In recent code, two path record entries are alwasy cleared while allocated could be either one or two path record entries. This leads to zero out of unallocated memory. This fix initializes alternative path record only when alternative path is set. While we are at it, path record allocation doesn't check for OPA alternative path, but rest of the code checks for OPA alternative path. Path record allocation code doesn't check for OPA alternative LID. This can further lead to memory corruption when only one path record is allocated, but there is actually alternative OPA path record present in CM request. Cc: # v4.12+ Fixes: 9fdca4da4d8c ("IB/SA: Split struct sa_path_rec based on IB and ROCE specific fields") Signed-off-by: Parav Pandit Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 4d740bc9f0319229410d11e445017f47e425dbe0 Author: Jens Axboe Date: Wed Oct 25 09:47:20 2017 -0600 mq-deadline: add 'deadline' as a name alias The scheduler framework now supports looking up the appropriate scheduler with the {name,mq} tupple. We can register mq-deadline with the alias of 'deadline', so that switching to 'deadline' will do the right thing based on the type of driver attached to it. Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/mq-deadline.c | 1 + 1 file changed, 1 insertion(+) commit 8ac0d9a81edf2ef4a2268b65b802a6b856dc77e6 Author: Jens Axboe Date: Wed Oct 25 12:35:02 2017 -0600 elevator: allow name aliases Since we now lookup elevator types with the appropriate multiqueue capability, allow schedulers to register with an alias alongside the real name. This is in preparation for allowing 'mq-deadline' to register an alias of 'deadline' as well. Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/elevator.c | 23 +++++++++++++++++------ include/linux/elevator.h | 1 + 2 files changed, 18 insertions(+), 6 deletions(-) commit 2527d99789e248576ac8081530cd4fd88730f8c7 Author: Jens Axboe Date: Wed Oct 25 12:33:42 2017 -0600 elevator: lookup mq vs non-mq elevators If an IO scheduler is selected via elevator= and it doesn't match the driver in question wrt blk-mq support, then we fail to boot. The elevator= parameter is deprecated and only supported for non-mq devices. Augment the elevator lookup API so that we pass in if we're looking for an mq capable scheduler or not, so that we only ever return a valid type for the queue in question. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=196695 Reviewed-by: Omar Sandoval Signed-off-by: Jens Axboe block/elevator.c | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) commit d5ce4c31d6df518dd8f63bbae20d7423c5018a6c Author: Ilya Dryomov Date: Mon Oct 16 15:59:10 2017 +0200 block: cope with WRITE ZEROES failing in blkdev_issue_zeroout() sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to permit trying WRITE SAME on older SCSI devices, unless ->no_write_same is set. Because REQ_OP_WRITE_ZEROES is implemented in terms of WRITE SAME, blkdev_issue_zeroout() may fail with -EREMOTEIO: $ fallocate -zn -l 1k /dev/sdg fallocate: fallocate failed: Remote I/O error $ fallocate -zn -l 1k /dev/sdg # OK $ fallocate -zn -l 1k /dev/sdg # OK The following calls succeed because sd_done() sets ->no_write_same in response to a sense that would become BLK_STS_TARGET/-EREMOTEIO, causing __blkdev_issue_zeroout() to fall back to generating ZERO_PAGE bios. This means blkdev_issue_zeroout() must cope with WRITE ZEROES failing and fall back to manually zeroing, unless BLKDEV_ZERO_NOFALLBACK is specified. For BLKDEV_ZERO_NOFALLBACK case, return -EOPNOTSUPP if sd_done() has just set ->no_write_same thus indicating lack of offload support. Fixes: c20cfc27a473 ("block: stop using blkdev_issue_write_same for zeroing") Cc: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Ilya Dryomov Signed-off-by: Jens Axboe block/blk-lib.c | 45 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) commit 425a4dba7953e35ffd096771973add6d2f40d2ed Author: Ilya Dryomov Date: Mon Oct 16 15:59:09 2017 +0200 block: factor out __blkdev_issue_zero_pages() blkdev_issue_zeroout() will use this in !BLKDEV_ZERO_NOFALLBACK case. Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Ilya Dryomov Signed-off-by: Jens Axboe block/blk-lib.c | 63 +++++++++++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 26 deletions(-) commit bb749b31c25e9b11f8f974baac8d507298ffbb70 Author: Ilya Dryomov Date: Wed Oct 18 14:38:38 2017 +0200 block: move CAP_SYS_ADMIN check in blkdev_roset() Check for CAP_SYS_ADMIN before calling into the driver, similar to blkdev_flushbuf(). This is safer and can spare a check in the driver. (Currently BLKROSET is overridden by md and rbd, rbd is missing the check. md has the check, but it covers a lot more than BLKROSET.) Acked-by: Al Viro Signed-off-by: Ilya Dryomov Signed-off-by: Jens Axboe block/ioctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 309fa3470fcaf96b295d2106ab17c00dbf7f3920 Author: Maor Gottlieb Date: Thu Oct 19 08:25:56 2017 +0300 IB/mlx5: Add support for RSS on the inner packet Some user space application would like to do RSS on the inner packet fields instead on the outer. When MLX5_RX_HASH_INNER is set with one or more of the other hash fields, then the RSS will be done using the inner packet. Signed-off-by: Maor Gottlieb Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 11 +++++++++++ include/uapi/rdma/mlx5-abi.h | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) commit f95ef6cbae61fa1dd563f5c0f6a0e5b512fda5ba Author: Maor Gottlieb Date: Thu Oct 19 08:25:55 2017 +0300 IB/mlx5: Add tunneling offloads support The device can support receive Stateless Offloads for the inner packet's fields only when the packet is processed by TIR which is enabled to support tunneling. Otherwise, the device treats the packet as an ordinary non-tunneling packet and receive offloads can be done only for the outer packet's field. In order to enable receive Stateless Offloading support for incoming tunneling traffic the TIR should be created with tunneled_offload_en. Tunneling offloads is supported only be raw ethernet QP. This patch includes: * New QP creation flag for tunneling offloads. * Reports device capabilities. Signed-off-by: Maor Gottlieb Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 14 +++++++++++++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 +++ drivers/infiniband/hw/mlx5/qp.c | 39 +++++++++++++++++++++++++++++++----- include/uapi/rdma/mlx5-abi.h | 11 +++++++++- 4 files changed, 61 insertions(+), 6 deletions(-) commit 4d350f1f89ee8ea84be1ef09717bf392fa5a3b45 Author: Maor Gottlieb Date: Thu Oct 19 08:25:54 2017 +0300 IB/mlx5: Update tunnel offloads bits This patch updates the mlx5_ifc with the following: - Fix tunnel_stateless_gre typo. - max_geneve_opt_len - Maximum geneve options length. - tunnel_stateless_geneve_rx - If set, receive Stateless Offloads for Geneve tunneled (inner) packets are supported. Signed-off-by: Maor Gottlieb Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/linux/mlx5/mlx5_ifc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7a0c8f4244e9ec7a630563d294b211342b46223d Author: Guy Levi Date: Thu Oct 19 08:25:53 2017 +0300 IB/mlx5: Support padded 128B CQE feature In some benchmarks and some CPU architectures, writing the CQE on a full cache line size improves performance by saving memory access operations (read-modify-write) relative to partial cache line change. This patch lets the user to configure the device to pad the CQE up to 128B in case its content is less than 128B. Currently the driver supports only padding for a CQE size of 128B. Signed-off-by: Guy Levi Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/cq.c | 27 +++++++++++++++++++++++---- drivers/infiniband/hw/mlx5/main.c | 4 ++++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 5 +++++ include/linux/mlx5/cq.h | 6 ++++-- include/uapi/rdma/mlx5-abi.h | 7 ++++++- 5 files changed, 42 insertions(+), 7 deletions(-) commit de57f2ad06d5bf01015b955600cbfc77059b2b6e Author: Guy Levi Date: Thu Oct 19 08:25:52 2017 +0300 IB/mlx5: Support 128B CQE compression feature In commit 1cbe6fc86ccf ("IB/mlx5: Add support for CQE compressing") the concept of CQE compression was introduced and added a support for 64B CQE size. This change update the code to support 128B CQE size as well. Signed-off-by: Guy Levi Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/cq.c | 6 ++++-- drivers/infiniband/hw/mlx5/main.c | 8 ++++++-- include/uapi/rdma/mlx5-abi.h | 7 ++++++- 3 files changed, 16 insertions(+), 5 deletions(-) commit 0ff8e79ca7c81fafa3f5c91a1b58efc85cbc2302 Author: Guy Levi Date: Thu Oct 19 08:25:51 2017 +0300 IB/mlx5: Add 128B CQE compression and padding HW bits Adding new bits in mlx5_ifc_cmd_hca_cap to get the hardware capabilities for: - compression_128: Support 128B CQE compression - cqe_128_always: Support 128B CQE padding Signed-off-by: Guy Levi Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/linux/mlx5/mlx5_ifc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ccc8708790273811db24676223b040710793cba7 Author: Noa Osherovich Date: Tue Oct 17 18:01:13 2017 +0300 IB/mlx5: Allow creation of a multi-packet RQ Allow creation of a multi-packet receive queue. In order to create a multi-packet RQ, the following fields in the mlx5_ib_rwq should be set: - log_num_strides: Log of number of strides per WQE - single_stride_log_num_of_bytes: Log of a single stride size - two_byte_shift_en: When enabled, hardware pads 2 bytes of zeros before writing the message to memory (e.g. for the IP alignment). Signed-off-by: Noa Osherovich Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mlx5_ib.h | 4 +++ drivers/infiniband/hw/mlx5/qp.c | 52 ++++++++++++++++++++++++++++++------ include/linux/mlx5/mlx5_ifc.h | 1 + include/uapi/rdma/mlx5-abi.h | 8 +++++- 4 files changed, 56 insertions(+), 9 deletions(-) commit b4f34597a5ce148b88a47da621037537c384d565 Author: Noa Osherovich Date: Tue Oct 17 18:01:12 2017 +0300 IB/mlx5: Expose multi-packet RQ capabilities This patch reports the device's striding RQ capabilities to the user-space: - min/max_single_stride_log_num_of_bytes: Log of min/max number of bytes in a single stride. - min/max_single_wqe_log_num_of_strides: Log of min/max number of strides in a single WQE. - supported_qpts: A bit mask to know which QP types support multi- packet RQ, for now only Raw Packet QPs. Signed-off-by: Noa Osherovich Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 16 ++++++++++++++++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 5 +++++ include/uapi/rdma/mlx5-abi.h | 14 ++++++++++++++ 3 files changed, 35 insertions(+) commit b156269d88e43a93da424a463e57eb5e9ee5f3cd Author: oulijun Date: Thu Oct 19 11:52:40 2017 +0800 RDMA/hns: Add modify CQ support for hip08 It is needed to call modify cq API for modifying cq context fields for controlling event generation moderations. This patch mainly adds it. Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cmd.h | 1 + drivers/infiniband/hw/hns/hns_roce_device.h | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 6 +++++ drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 42 +++++++++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_main.c | 1 + 5 files changed, 51 insertions(+) commit 3180236cceeb3d66e45f6395501f3d315beae4c1 Author: Wei Hu(Xavier) Date: Wed Oct 18 17:32:46 2017 +0800 RDMA/hns: Update the PD&CQE&MTT specification in hip08 This patch updates the PD specification to 16M for hip08. And it updates the numbers of mtt and cqe segments for the buddy. As the CQE supports hop num 1 addressing, the CQE specification is 64k. This patch updates to set the CQE specification to 64k. Signed-off-by: Shaobo Xu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 29a1fe5d70fab7dbdd777458f3c3129f292e61ac Author: Wei Hu(Xavier) Date: Wed Oct 18 17:32:45 2017 +0800 RDMA/hns: Update the IRRL table chunk size in hip08 As the increase of the IRRL specification in hip08, the IRRL table chunk size needs to be updated. This patch updates the IRRL table chunk size to 256k for hip08. Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 2 ++ drivers/infiniband/hw/hns/hns_roce_hem.c | 29 +++++++++++++---------------- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v1.h | 2 ++ drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 2 ++ 6 files changed, 21 insertions(+), 16 deletions(-) commit 9a8982dc89484e1144176bf4f5f35110f6c3414c Author: Wei Hu(Xavier) Date: Wed Oct 18 17:32:44 2017 +0800 RDMA/hns: Support WQE/CQE/PBL page size configurable feature in hip08 This patch updates to support WQE, CQE and PBL page size configurable feature, which includes base address page size and buffer page size. Signed-off-by: Shaobo Xu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_alloc.c | 29 +++++---- drivers/infiniband/hw/hns/hns_roce_cq.c | 21 ++++++- drivers/infiniband/hw/hns/hns_roce_device.h | 10 ++-- drivers/infiniband/hw/hns/hns_roce_mr.c | 93 ++++++++++++++++++++--------- drivers/infiniband/hw/hns/hns_roce_qp.c | 46 ++++++++++---- 5 files changed, 142 insertions(+), 57 deletions(-) commit b9595c5bac87af09cc3e82553244893b76632df6 Author: Erez Shitrit Date: Thu Oct 19 07:56:44 2017 +0300 IB/ipoib: Change number of TX wqe to 64 NAPI budget is 64 packets, while maximum polling size for the send CQ is 16. Let's bring them in sync, so the NAPI budget will be reused completely. Cc: Kamal Heib Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8966e28d2e40cfc9f694bd02dabc49afb78d7160 Author: Erez Shitrit Date: Thu Oct 19 07:56:43 2017 +0300 IB/ipoib: Use NAPI in UD/TX flows Instead of explicit call to poll_cq of the tx ring, use the NAPI mechanism to handle the completions of each packet that has been sent to the HW. The next major changes were taken: * The driver init completion function in the creation of the send CQ, that function triggers the napi scheduling. * The driver uses CQ for RX for both modes UD and CM, and CQ for TX for CM and UD. Cc: Kamal Heib Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib.h | 11 +-- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 40 ++++++---- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 123 ++++++++++++++++++----------- drivers/infiniband/ulp/ipoib/ipoib_main.c | 24 ++++-- drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 17 ++-- 5 files changed, 136 insertions(+), 79 deletions(-) commit 2c104ea68350b7f49c4ae207afa6e7f7f5c81546 Author: Erez Shitrit Date: Thu Oct 19 07:56:42 2017 +0300 IB/ipoib: Get rid of the tx_outstanding variable in all modes The first step toward using NAPI in the UD/TX flow is to separate between two flows, the NAPI and the xmit, meaning no use of shared variables between both flows. This patch takes out the tx_outstanding variable that was used in both flows and instead the driver uses the 2 cyclic ring variables: tx_head and tx_tail, tx_head used in the xmit flow and tx_tail in the NAPI flow. Cc: Kamal Heib Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib.h | 1 - drivers/infiniband/ulp/ipoib/ipoib_cm.c | 10 ++++++---- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 10 ++++------ 3 files changed, 10 insertions(+), 11 deletions(-) commit 5556176d8cb33652c702c3b6a629b4e1a0dd2a80 Author: Leon Romanovsky Date: Sun Oct 15 09:56:48 2017 +0300 RDMA: Remove Sean's and Hal's emails from MAINTAINER file RDMA subsystem has one active maintainer who can apply patches - Doug Ledford, but the RDMA entries in MAINTAINER file are not stating it. The following patch removes Sean's and Hal's emails from the maintainers list. It will allow clean get_maintaner.pl output which is needed for people outside of our community and various semi-automatic tools. Cc: Sean Hefty Cc: Hal Rosenstock Signed-off-by: Leon Romanovsky Acked-by: Sean Hefty Signed-off-by: Doug Ledford MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) commit 57646b6fda9b751e62929c73b1e6df06b108a3c9 Merge: 9b7c854 d8a88dd Author: Ingo Molnar Date: Wed Oct 25 19:07:46 2017 +0200 Merge tag 'perf-core-for-mingo-4.15-20171025' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core inline improvements from Arnaldo Carvalho de Melo: From Milian's cover letter: (Milian Wolff) "This series of patches completely reworks the way inline frames are handled. Instead of querying for the inline nodes on-demand in the individual tools, we now create proper callchain nodes for inlined frames. The advantages this approach brings are numerous: - Less duplicated code in the individual browser - Aggregated cost for inlined frames for the --children top-down list - Various bug fixes that arose from querying for a srcline/symbol based on the IP of a sample, which will always point to the last inlined frame instead of the corresponding non-inlined frame - Overall much better support for visualizing cost for heavily-inlined C++ code, which simply was confusing and unreliably before - srcline honors the global setting as to whether full paths or basenames should be shown - Caches for inlined frames and srcline information, which allow us to enable inline frame handling by default" Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit d9ecbef39438391dcee511e17b6f65a970b28639 Author: Markus Elfring Date: Fri Oct 20 16:37:07 2017 +0200 ARM: OMAP3: Delete an unnecessary variable initialisation in omap3xxx_hwmod_init() The local variable "bus" will eventually be set to an appropriate pointer a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f33aadd26653b5d6d5ed5400d68686a9f78b8132 Author: Markus Elfring Date: Fri Oct 20 16:30:23 2017 +0200 ARM: OMAP3: Use common error handling code in omap3xxx_hwmod_init() Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit e45fe7f788dd1395befe5639149ad8dacfbd94ab Author: Rob Herring Date: Wed Oct 25 10:59:13 2017 -0500 scripts/dtc: Update to upstream version v1.4.5-6-gc1e55a5513e9 Pickup the fix for handling unresolved phandles in overlays. This adds the following commits from upstream: c1e55a5513e9 checks: fix handling of unresolved phandles for dts plugins f8872e29ce06 tests: Avoid 64-bit arithmetic in assembler 48c91c08bcfa libfdt: add stringlist functions to linker script Signed-off-by: Rob Herring scripts/dtc/checks.c | 9 +++++++++ scripts/dtc/version_gen.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) commit fa3eb71d96f52833a5e12def2a22b2347dd349d0 Author: Dave Martin Date: Tue Oct 24 18:40:36 2017 +0100 arm64: asm-bug: Renumber macro local labels to avoid clashes Currently ASM_BUG() and its constituent macros define local assembler labels 0, 1 and 2 internally, which carries a high risk of clash with callers' labels and consequent mis-assembly. This patch gives the labels a big random offset to minimise the chance of such errors. Signed-off-by: Dave Martin Signed-off-by: Will Deacon arch/arm64/include/asm/asm-bug.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d8a88dd243a170a226aba33e7c53704db2f82aa6 Author: Milian Wolff Date: Thu Oct 19 13:38:36 2017 +0200 perf util: Enable handling of inlined frames by default Now that we have caches in place to speed up the process of finding inlined frames and srcline information repeatedly, we can enable this useful option by default. Suggested-by: Ingo Molnar Signed-off-by: Milian Wolff Reviewed-by: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20171019113836.5548-6-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-report.txt | 3 ++- tools/perf/Documentation/perf-script.txt | 3 ++- tools/perf/util/symbol.c | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) commit 1fb7d06a509e82893e59e0f0b223e7d5d6d0ef8c Author: Milian Wolff Date: Thu Oct 19 13:38:35 2017 +0200 perf report: Use srcline from callchain for hist entries This also removes the symbol name from the srcline column, more on this below. This ensures we use the correct srcline, which could originate from a potentially inlined function. The hist entries used to query for the srcline based purely on the IP, which leads to wrong results for inlined entries. Before: ~~~~~ perf report --inline -s srcline -g none --stdio ... # Children Self Source:Line # ........ ........ .................................................................................................................................. # 94.23% 0.00% __libc_start_main+18446603487898210537 94.23% 0.00% _start+41 44.58% 0.00% main+100 44.58% 0.00% std::_Norm_helper::_S_do_it+100 44.58% 0.00% std::__complex_abs+100 44.58% 0.00% std::abs+100 44.58% 0.00% std::norm+100 36.01% 0.00% hypot+18446603487892193300 25.81% 0.00% main+41 25.81% 0.00% std::__detail::_Adaptor, double>::operator()+41 25.81% 0.00% std::uniform_real_distribution::operator() >+41 25.75% 25.75% random.h:143 18.39% 0.00% main+57 18.39% 0.00% std::__detail::_Adaptor, double>::operator()+57 18.39% 0.00% std::uniform_real_distribution::operator() >+57 13.80% 13.80% random.tcc:3330 5.64% 0.00% ??:0 4.13% 4.13% __hypot_finite+163 4.13% 0.00% __hypot_finite+18446603487892193443 ... ~~~~~ After: ~~~~~ perf report --inline -s srcline -g none --stdio ... # Children Self Source:Line # ........ ........ ........................................... # 94.30% 1.19% main.cpp:39 94.23% 0.00% __libc_start_main+18446603487898210537 94.23% 0.00% _start+41 48.44% 1.70% random.h:1823 48.44% 0.00% random.h:1814 46.74% 2.53% random.h:185 44.68% 0.10% complex:589 44.68% 0.00% complex:597 44.68% 0.00% complex:654 44.68% 0.00% complex:664 40.61% 13.80% random.tcc:3330 36.01% 0.00% hypot+18446603487892193300 26.81% 0.00% random.h:151 26.81% 0.00% random.h:332 25.75% 25.75% random.h:143 5.64% 0.00% ??:0 4.13% 4.13% __hypot_finite+163 4.13% 0.00% __hypot_finite+18446603487892193443 ... ~~~~~ Note that this change removes the symbol from the source:line hist column. If this information is desired, users should explicitly query for it if needed. I.e. run this command instead: ~~~~~ perf report --inline -s sym,srcline -g none --stdio ... # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 1K of event 'cycles:uppp' # Event count (approx.): 1381229476 # # Children Self Symbol Source:Line # ........ ........ ................................................................................................................................... ........................................... # 94.30% 1.19% [.] main main.cpp:39 94.23% 0.00% [.] __libc_start_main __libc_start_main+18446603487898210537 94.23% 0.00% [.] _start _start+41 48.44% 0.00% [.] std::uniform_real_distribution::operator() > (inlined) random.h:1814 48.44% 0.00% [.] std::uniform_real_distribution::operator() > (inlined) random.h:1823 46.74% 0.00% [.] std::__detail::_Adaptor, double>::operator() (inlined) random.h:185 44.68% 0.00% [.] std::_Norm_helper::_S_do_it (inlined) complex:654 44.68% 0.00% [.] std::__complex_abs (inlined) complex:589 44.68% 0.00% [.] std::abs (inlined) complex:597 44.68% 0.00% [.] std::norm (inlined) complex:664 39.80% 13.59% [.] std::generate_canonical > random.tcc:3330 36.01% 0.00% [.] hypot hypot+18446603487892193300 26.81% 0.00% [.] std::__detail::__mod (inlined) random.h:151 26.81% 0.00% [.] std::linear_congruential_engine::operator() (inlined) random.h:332 25.75% 0.00% [.] std::__detail::_Mod::__calc (inlined) random.h:143 25.19% 25.19% [.] std::generate_canonical > random.h:143 4.13% 4.13% [.] __hypot_finite __hypot_finite+163 4.13% 0.00% [.] __hypot_finite __hypot_finite+18446603487892193443 ... ~~~~~ Compared to the old behavior, this reduces duplication in the output. Before we used to print the symbol name in the srcline column even when the sym column was explicitly requested. I.e. the output was: ~~~~~ perf report --inline -s sym,srcline -g none --stdio ... # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 1K of event 'cycles:uppp' # Event count (approx.): 1381229476 # # Children Self Symbol Source:Line # ........ ........ ................................................................................................................................... .................................................................................................................................. # 94.23% 0.00% [.] __libc_start_main __libc_start_main+18446603487898210537 94.23% 0.00% [.] _start _start+41 44.58% 0.00% [.] main main+100 44.58% 0.00% [.] std::_Norm_helper::_S_do_it (inlined) std::_Norm_helper::_S_do_it+100 44.58% 0.00% [.] std::__complex_abs (inlined) std::__complex_abs+100 44.58% 0.00% [.] std::abs (inlined) std::abs+100 44.58% 0.00% [.] std::norm (inlined) std::norm+100 36.01% 0.00% [.] hypot hypot+18446603487892193300 25.81% 0.00% [.] main main+41 25.81% 0.00% [.] std::__detail::_Adaptor, double>::operator() (inlined) std::__detail::_Adaptor, double>::operator()+41 25.81% 0.00% [.] std::uniform_real_distribution::operator() > (inlined) std::uniform_real_distribution::operator() >+41 25.69% 25.69% [.] std::generate_canonical > random.h:143 18.39% 0.00% [.] main main+57 18.39% 0.00% [.] std::__detail::_Adaptor, double>::operator() (inlined) std::__detail::_Adaptor, double>::operator()+57 18.39% 0.00% [.] std::uniform_real_distribution::operator() > (inlined) std::uniform_real_distribution::operator() >+57 13.80% 13.80% [.] std::generate_canonical > random.tcc:3330 4.13% 4.13% [.] __hypot_finite __hypot_finite+163 4.13% 0.00% [.] __hypot_finite __hypot_finite+18446603487892193443 ... ~~~~~ Signed-off-by: Milian Wolff Reviewed-by: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20171019113836.5548-5-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/callchain.c | 1 + tools/perf/util/event.c | 1 + tools/perf/util/hist.c | 2 ++ tools/perf/util/symbol.h | 1 + 4 files changed, 5 insertions(+) commit 21ac9d547fdde79c1e8692587d9044fde549214b Author: Milian Wolff Date: Thu Oct 19 13:38:34 2017 +0200 perf report: Cache srclines for callchain nodes On one hand this ensures that the memory is properly freed when the DSO gets freed. On the other hand this significantly speeds up the processing of the callchain nodes when lots of srclines are requested. For one of my data files e.g.: Before: Performance counter stats for 'perf report -s srcline -g srcline --stdio': 52496.495043 task-clock (msec) # 0.999 CPUs utilized 634 context-switches # 0.012 K/sec 2 cpu-migrations # 0.000 K/sec 191,561 page-faults # 0.004 M/sec 165,074,498,235 cycles # 3.144 GHz 334,170,832,408 instructions # 2.02 insn per cycle 90,220,029,745 branches # 1718.591 M/sec 654,525,177 branch-misses # 0.73% of all branches 52.533273822 seconds time elapsedProcessed 236605 events and lost 40 chunks! After: Performance counter stats for 'perf report -s srcline -g srcline --stdio': 22606.323706 task-clock (msec) # 1.000 CPUs utilized 31 context-switches # 0.001 K/sec 0 cpu-migrations # 0.000 K/sec 185,471 page-faults # 0.008 M/sec 71,188,113,681 cycles # 3.149 GHz 133,204,943,083 instructions # 1.87 insn per cycle 34,886,384,979 branches # 1543.214 M/sec 278,214,495 branch-misses # 0.80% of all branches 22.609857253 seconds time elapsed Note that the difference is only this large when `--inline` is not passed. In such situations, we would use the inliner cache and thus do not run this code path that often. I think that this cache should actually be used in other places, too. When looking at the valgrind leak report for perf report, we see tons of srclines being leaked, most notably from calls to hist_entry__get_srcline. The problem is that get_srcline has many different formatting options (show_sym, show_addr, potentially even unwind_inlines when calling __get_srcline directly). As such, the srcline cannot easily be cached for all calls, or we'd have to add caches for all formatting combinations (6 so far). An alternative would be to remove the formatting options and handle that on a different level - i.e. print the sym/addr on demand wherever we actually output something. And the unwind_inlines could be moved into a separate function that does not return the srcline. Signed-off-by: Milian Wolff Reviewed-by: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20171019113836.5548-4-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dso.c | 2 ++ tools/perf/util/dso.h | 1 + tools/perf/util/machine.c | 17 +++++++++--- tools/perf/util/srcline.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/srcline.h | 7 +++++ 5 files changed, 90 insertions(+), 3 deletions(-) commit b38775cf7678d7715b35dded3dcfab66e244baae Author: Milian Wolff Date: Thu Oct 19 13:38:33 2017 +0200 perf report: Cache failed lookups of inlined frames When no inlined frames could be found for a given address, we did not store this information anywhere. That means we potentially do the costly inliner lookup repeatedly for cases where we know it can never succeed. This patch makes dso__parse_addr_inlines always return a valid inline_node. It will be empty when no inliners are found. This enables us to cache the empty list in the DSO, thereby improving the performance when many addresses fail to find the inliners. For my trivial example, the performance impact is already quite significant: Before: ~~~~~ Performance counter stats for 'perf report --stdio --inline -g srcline -s srcline' (5 runs): 594.804032 task-clock (msec) # 0.998 CPUs utilized ( +- 0.07% ) 53 context-switches # 0.089 K/sec ( +- 4.09% ) 0 cpu-migrations # 0.000 K/sec ( +-100.00% ) 5,687 page-faults # 0.010 M/sec ( +- 0.02% ) 2,300,918,213 cycles # 3.868 GHz ( +- 0.09% ) 4,395,839,080 instructions # 1.91 insn per cycle ( +- 0.00% ) 939,177,205 branches # 1578.969 M/sec ( +- 0.00% ) 11,824,633 branch-misses # 1.26% of all branches ( +- 0.10% ) 0.596246531 seconds time elapsed ( +- 0.07% ) ~~~~~ After: ~~~~~ Performance counter stats for 'perf report --stdio --inline -g srcline -s srcline' (5 runs): 113.111405 task-clock (msec) # 0.990 CPUs utilized ( +- 0.89% ) 29 context-switches # 0.255 K/sec ( +- 54.25% ) 0 cpu-migrations # 0.000 K/sec 5,380 page-faults # 0.048 M/sec ( +- 0.01% ) 432,378,779 cycles # 3.823 GHz ( +- 0.75% ) 670,057,633 instructions # 1.55 insn per cycle ( +- 0.01% ) 141,001,247 branches # 1246.570 M/sec ( +- 0.01% ) 2,346,845 branch-misses # 1.66% of all branches ( +- 0.19% ) 0.114222393 seconds time elapsed ( +- 1.19% ) ~~~~~ Signed-off-by: Milian Wolff Reviewed-by: Andi Kleen Cc: David Ahern Cc: Jin Yao Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20171019113836.5548-3-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/machine.c | 15 +++++++-------- tools/perf/util/srcline.c | 16 +--------------- 2 files changed, 8 insertions(+), 23 deletions(-) commit bf36eb5c4b3ef0ebfb19b1a67a5fa5821e6c9fa7 Author: Milian Wolff Date: Fri Oct 20 12:14:47 2017 -0300 perf report: Properly handle branch count in match_chain() Some of the code paths I introduced before returned too early without running the code to handle a node's branch count. By refactoring match_chain to only have one exit point, this can be remedied. Signed-off-by: Milian Wolff Acked-by: Namhyung Kim Cc: David Ahern Cc: Jin Yao Cc: Peter Zijlstra Cc: Ravi Bangoria Link: http://lkml.kernel.org/r/1707691.qaJ269GSZW@agathebauer Link: http://lkml.kernel.org/r/20171018185350.14893-2-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/callchain.c | 140 ++++++++++++++++++++++++-------------------- 1 file changed, 78 insertions(+), 62 deletions(-) commit 16b6c8bb687cc3bec914de09061fcb8411951fda Author: Alex Williamson Date: Wed Oct 11 15:35:56 2017 -0600 PCI: Detach driver before procfs & sysfs teardown on device remove When removing a device, for example a VF being removed due to SR-IOV teardown, a "soft" hot-unplug via 'echo 1 > remove' in sysfs, or an actual hot-unplug, we first remove the procfs and sysfs attributes for the device before attempting to release the device from any driver bound to it. Unbinding the driver from the device can take time. The device might need to write out data or it might be actively in use. If it's in use by userspace through a vfio driver, the unbind might block until the user releases the device. This leads to a potentially non-trivial amount of time where the device exists, but we've torn down the interfaces that userspace uses to examine devices, for instance lspci might generate this sort of error: pcilib: Cannot open /sys/bus/pci/devices/0000:01:0a.3/config lspci: Unable to read the standard configuration space header of device 0000:01:0a.3 We don't seem to have any dependence on this teardown ordering in the kernel, so let's unbind the driver first, which is also more symmetric with the instantiation of the device in pci_bus_add_device(). Signed-off-by: Alex Williamson Signed-off-by: Bjorn Helgaas drivers/pci/remove.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 729428ca906140a59d94768ac8c8d7a8494c064b Author: Shiju Jose Date: Tue Oct 24 23:51:39 2017 +0800 scsi: hisi_sas: use array for v2 hw AXI errors The code to print AXI errors in v2 hw driver is repetitive. This patch condenses the code by looping an array of errors. Also, a formatting error in one_bit_ecc_errors[] and multi_bit_ecc_errors[] is fixed. Signed-off-by: Shiju Jose 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_v2_hw.c | 236 ++++++++++++++------------------- 2 files changed, 100 insertions(+), 137 deletions(-) commit 6ba0fbc35aa9f3bc8c12be3b4047055c9ce2ac92 Author: Xiaofei Tan Date: Tue Oct 24 23:51:38 2017 +0800 scsi: hisi_sas: fix the risk of freeing slot twice The function hisi_sas_slot_task_free() is used to free the slot and do tidy-up of LLDD resources. The LLDD generally should know the state of a slot and decide when to free it, and it should only be done once. For some scenarios, we really don't know the state, like when TMF timeout. In this case, we check task->lldd_task before calling hisi_sas_slot_task_free(). However, we may miss some scenarios when we should also check task->lldd_task, and it is not SMP safe to check task->lldd_task as we don't protect it within spin lock. This patch is to fix this risk of freeing slot twice, as follows: 1. Check task->lldd_task in the hisi_sas_slot_task_free(), and give up freeing of this time if task->lldd_task is NULL. 2. Set slot->buf to NULL after it is freed. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 378c233bcb21dfb2d9c2548b9a1fa6a8d35c78dd Author: Xiaofei Tan Date: Tue Oct 24 23:51:37 2017 +0800 scsi: hisi_sas: fix NULL check in SMP abort task path This patch adds a NULL check of task->lldd_task before freeing the slot in SMP path. This is to guard against the scenario of the slot being freed during the from the preceding internal abort. Signed-off-by: Xiaofei Tan Signed-off-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 1eb8eeac17ee808b50b422f5ef2e27f5497f82ad Author: Xiang Chen Date: Tue Oct 24 23:51:36 2017 +0800 scsi: hisi_sas: us start_phy in PHY_FUNC_LINK_RESET When a PHY_FUNC_LINK_RESET is issued, we need to fill the transport identify_frame to SAS controller before the PHYs are enabled. Without this, we may find that if a PHY which belonged to a wideport before the reset may generate a new port id. 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 | 2 +- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 3297ded1dd22882d3e164932ed710442e5bb72c5 Author: Xiang Chen Date: Tue Oct 24 23:51:35 2017 +0800 scsi: hisi_sas: fix SATA breakpoint memory size Currently the size of memory we allocate for SATA breakpoint buffer is incorrect. The breakpoint memory size should be as follows: 32 (NCQ tags) * 128 * 2048 (max #devs) = 8MB Currently we only allocate 0.5MB, but get away with it as we never have SATA device index > 128 typically. To conserve precious DMA memory (8MB may not be even available), limit the number of devices per HBA to 1024, which means 4MB of memory required for SATA breakpoint. The 1024 device limit applied to all HW versions. For v3 hw, we need to configure this value. Signed-off-by: Xiang Chen 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 | 6 +++--- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) commit 9feaf9090bac3963d1b1afeba08179a0dda9c0f2 Author: Xiang Chen Date: Tue Oct 24 23:51:34 2017 +0800 scsi: hisi_sas: grab hisi_hba.lock when processing slots When adding/removing slots from device list, we need to lock this operation with hisi_hba lock for safety. This patch adds missing instances of this. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 5 ++++- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 ++ drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) commit 302e09016bc48b14590598b375280a9bf1f92b20 Author: Xiaofei Tan Date: Tue Oct 24 23:51:33 2017 +0800 scsi: hisi_sas: use spin_lock_irqsave() for hisi_hba.lock We used spin_lock() to grab hisi_hba.lock in two places where spin_lock_irqsave() should be used, as hisi_hba.lock can be taken in interrupt context. This patch is to fix this. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 5 +++-- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit f692a677e2cb0ccab4ef91be97d8fb020cca246d Author: Xiang Chen Date: Tue Oct 24 23:51:32 2017 +0800 scsi: hisi_sas: fix internal abort slot timeout bug When an internal abort times out in hisi_sas_internal_task_abort(), goto the exit label in and not go through the other task status checks. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 1 + 1 file changed, 1 insertion(+) commit 8ae6725dca51b0cc97ce85317d8da45d77f1e8bb Author: Xiang Chen Date: Tue Oct 24 23:51:31 2017 +0800 scsi: hisi_sas: delete get_ncq_tag_v3_hw() We already relocated hisi_sas_get_ncq_tag() into common file main.c, so delete get_ncq_tag_v3_hw() and use hisi_sas_get_ncq_tag() instead. Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 19de7179974ff6cf43e8a893028d3aef06cdb0bf Author: Chintan Patel Date: Thu Oct 12 09:44:37 2017 -0700 ASoC: Intel: Skylake: Decrease loglevel for topology loading In case of failure in loading customize topology firmware, dfw_sst.bin gets loaded. However, current log provides this message as error even after successfully falling back to default topology "dfw_sst.bin". Hence to convey proper message, changing log level and message. Signed-off-by: Chintan Patel Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54e2fc28d9cf1be7dd2ebe74b20dc20cc2a3e55d Author: Baolin Wang Date: Wed Oct 25 19:25:09 2017 +0800 spi: sprd: Fix the possible negative value of BIT() When enabling the ADI hardware channels, if the channel id is 31, then we will get one negative value -1 for BIT() macro, which will write incorrect value to register. Fixes: 7e2903cb91df ("spi: Add ADI driver for Spreadtrum platform") Reported-by: Dan Carpenter Signed-off-by: Baolin Wang Signed-off-by: Mark Brown drivers/spi/spi-sprd-adi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6436beeee5721a8e906e9eabf866f12d04470437 Author: Julien Thierry Date: Wed Oct 25 10:04:33 2017 +0100 arm64: Fix single stepping in kernel traps Software Step exception is missing after stepping a trapped instruction. Ensure SPSR.SS gets set to 0 after emulating/skipping a trapped instruction before doing ERET. Cc: Catalin Marinas Cc: Mark Rutland Signed-off-by: Julien Thierry Reviewed-by: Alex Bennée [will: replaced AARCH32_INSN_SIZE with 4] Signed-off-by: Will Deacon arch/arm64/include/asm/traps.h | 6 ++++++ arch/arm64/kernel/armv8_deprecated.c | 8 ++++---- arch/arm64/kernel/cpufeature.c | 2 +- arch/arm64/kernel/traps.c | 21 ++++++++++++++++----- 4 files changed, 27 insertions(+), 10 deletions(-) commit e28cc0255997e9b770039d87276c1b9fd8bc231d Author: Julien Thierry Date: Wed Oct 25 10:04:32 2017 +0100 arm64: Use existing defines for mdscr Literal values are being used to set single stepping in mdscr from assembly code. There are already existing defines representing those values, use those instead of the literal values. Signed-off-by: Julien Thierry Reviewed-by: Alex Bennée Acked-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/include/asm/assembler.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fd1a5b04dfb899f84ddeb8acdaea6b98283df1e5 Author: Byungchul Park Date: Wed Oct 25 17:56:04 2017 +0900 workqueue: Remove now redundant lock acquisitions wrt. workqueue flushes The workqueue code added manual lock acquisition annotations to catch deadlocks. After lockdepcrossrelease was introduced, some of those became redundant, since wait_for_completion() already does the acquisition and tracking. Remove the duplicate annotations. Signed-off-by: Byungchul Park Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: amir73il@gmail.com Cc: axboe@kernel.dk Cc: darrick.wong@oracle.com Cc: david@fromorbit.com Cc: hch@infradead.org Cc: idryomov@gmail.com Cc: johan@kernel.org Cc: johannes.berg@intel.com Cc: kernel-team@lge.com Cc: linux-block@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-xfs@vger.kernel.org Cc: oleg@redhat.com Cc: tj@kernel.org Link: http://lkml.kernel.org/r/1508921765-15396-9-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar include/linux/workqueue.h | 4 ++-- kernel/workqueue.c | 19 +++---------------- 2 files changed, 5 insertions(+), 18 deletions(-) commit a7967bc31584bd282682981295861e7bcba19e65 Author: Byungchul Park Date: Wed Oct 25 17:56:03 2017 +0900 sched/completions: Add support for initializing completions with lockdep_map Sometimes we want to initialize completions with sparate lockdep maps to assign lock classes as desired. For example, the workqueue code needs to directly manage lockdep maps, since only the code is aware of how to classify lockdep maps properly. Provide additional macros initializing completions in that way. Signed-off-by: Byungchul Park Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: amir73il@gmail.com Cc: axboe@kernel.dk Cc: darrick.wong@oracle.com Cc: david@fromorbit.com Cc: hch@infradead.org Cc: idryomov@gmail.com Cc: johan@kernel.org Cc: johannes.berg@intel.com Cc: kernel-team@lge.com Cc: linux-block@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-xfs@vger.kernel.org Cc: oleg@redhat.com Cc: tj@kernel.org Link: http://lkml.kernel.org/r/1508921765-15396-8-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar include/linux/completion.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit e121d64e16484d4a5eba94cd2fa9eb3848b7c9c2 Author: Byungchul Park Date: Wed Oct 25 17:56:02 2017 +0900 locking/lockdep: Introduce CONFIG_BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK=y Add a Kconfig knob that enables the lockdep "crossrelease_fullstack" boot parameter. Suggested-by: Ingo Molnar Signed-off-by: Byungchul Park Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: amir73il@gmail.com Cc: axboe@kernel.dk Cc: darrick.wong@oracle.com Cc: david@fromorbit.com Cc: hch@infradead.org Cc: idryomov@gmail.com Cc: johan@kernel.org Cc: johannes.berg@intel.com Cc: kernel-team@lge.com Cc: linux-block@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-xfs@vger.kernel.org Cc: oleg@redhat.com Cc: tj@kernel.org Link: http://lkml.kernel.org/r/1508921765-15396-7-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar kernel/locking/lockdep.c | 4 ++++ lib/Kconfig.debug | 15 +++++++++++++++ 2 files changed, 19 insertions(+) commit 2dcd5adfb7401b762ddbe4b86dcacc2f3de6b97b Author: Byungchul Park Date: Wed Oct 25 17:56:01 2017 +0900 locking/lockdep: Remove the BROKEN flag from CONFIG_LOCKDEP_CROSSRELEASE and CONFIG_LOCKDEP_COMPLETIONS Now that the performance regression is fixed, re-enable CONFIG_LOCKDEP_CROSSRELEASE=y and CONFIG_LOCKDEP_COMPLETIONS=y. Signed-off-by: Byungchul Park Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: amir73il@gmail.com Cc: axboe@kernel.dk Cc: darrick.wong@oracle.com Cc: david@fromorbit.com Cc: hch@infradead.org Cc: idryomov@gmail.com Cc: johan@kernel.org Cc: johannes.berg@intel.com Cc: kernel-team@lge.com Cc: linux-block@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-xfs@vger.kernel.org Cc: oleg@redhat.com Cc: tj@kernel.org Link: http://lkml.kernel.org/r/1508921765-15396-6-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar lib/Kconfig.debug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d141babe4244945f1d001118578e0eb3ce12729d Author: Byungchul Park Date: Wed Oct 25 17:56:00 2017 +0900 locking/lockdep: Add a boot parameter allowing unwind in cross-release and disable it by default Johan Hovold reported a heavy performance regression caused by lockdep cross-release: > Boot time (from "Linux version" to login prompt) had in fact doubled > since 4.13 where it took 17 seconds (with my current config) compared to > the 35 seconds I now see with 4.14-rc4. > > I quick bisect pointed to lockdep and specifically the following commit: > > 28a903f63ec0 ("locking/lockdep: Handle non(or multi)-acquisition > of a crosslock") > > which I've verified is the commit which doubled the boot time (compared > to 28a903f63ec0^) (added by lockdep crossrelease series [1]). Currently cross-release performs unwind on every acquisition, but that is very expensive. This patch makes unwind optional and disables it by default and only records acquire_ip. Full stack traces are sometimes required for full analysis, in which case a boot paramter, crossrelease_fullstack, can be specified. On my qemu Ubuntu machine (x86_64, 4 cores, 512M), the regression was fixed. We measure boot times with 'perf stat --null --repeat 10 $QEMU', where $QEMU launches a kernel with init=/bin/true: 1. No lockdep enabled: Performance counter stats for 'qemu_booting_time.sh bzImage' (10 runs): 2.756558155 seconds time elapsed ( +- 0.09% ) 2. Lockdep enabled: Performance counter stats for 'qemu_booting_time.sh bzImage' (10 runs): 2.968710420 seconds time elapsed ( +- 0.12% ) 3. Lockdep enabled + cross-release enabled: Performance counter stats for 'qemu_booting_time.sh bzImage' (10 runs): 3.153839636 seconds time elapsed ( +- 0.31% ) 4. Lockdep enabled + cross-release enabled + this patch applied: Performance counter stats for 'qemu_booting_time.sh bzImage' (10 runs): 2.963669551 seconds time elapsed ( +- 0.11% ) I.e. lockdep cross-release performance is now indistinguishable from vanilla lockdep. Bisected-by: Johan Hovold Analyzed-by: Thomas Gleixner Suggested-by: Thomas Gleixner Reported-by: Johan Hovold Signed-off-by: Byungchul Park Cc: Linus Torvalds Cc: Peter Zijlstra Cc: amir73il@gmail.com Cc: axboe@kernel.dk Cc: darrick.wong@oracle.com Cc: david@fromorbit.com Cc: hch@infradead.org Cc: idryomov@gmail.com Cc: johannes.berg@intel.com Cc: kernel-team@lge.com Cc: linux-block@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-xfs@vger.kernel.org Cc: oleg@redhat.com Cc: tj@kernel.org Link: http://lkml.kernel.org/r/1508921765-15396-5-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar Documentation/admin-guide/kernel-parameters.txt | 3 +++ kernel/locking/lockdep.c | 19 +++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) commit 24208435e343679b21502fb90786084dfaf15369 Author: Byungchul Park Date: Wed Oct 25 17:55:59 2017 +0900 locking/lockdep, sched/completions: Change the prefix of lock name for completion variables CONFIG_LOCKDEP_COMPLETIONS uses "(complete)" as a prefix of lock name for completion variable. However, what we should use here is a noun - so use "(completion)" instead. Suggested-by: Ingo Molnar Signed-off-by: Byungchul Park Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: amir73il@gmail.com Cc: axboe@kernel.dk Cc: darrick.wong@oracle.com Cc: david@fromorbit.com Cc: hch@infradead.org Cc: idryomov@gmail.com Cc: johan@kernel.org Cc: johannes.berg@intel.com Cc: kernel-team@lge.com Cc: linux-block@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-xfs@vger.kernel.org Cc: oleg@redhat.com Cc: tj@kernel.org Link: http://lkml.kernel.org/r/1508921765-15396-4-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar include/linux/completion.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6f0397d7e100f3b3978d6ebb6b2dea29ee7c4a95 Author: Byungchul Park Date: Wed Oct 25 17:55:58 2017 +0900 locking/lockdep: Provide empty lockdep_map structure for !CONFIG_LOCKDEP After this patch the lockdep_map structure takes no space if lockdep is disabled, reducing the number of #ifdefs in unrelated kernel code. Signed-off-by: Byungchul Park Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: amir73il@gmail.com Cc: axboe@kernel.dk Cc: darrick.wong@oracle.com Cc: david@fromorbit.com Cc: hch@infradead.org Cc: idryomov@gmail.com Cc: johan@kernel.org Cc: johannes.berg@intel.com Cc: kernel-team@lge.com Cc: linux-block@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-xfs@vger.kernel.org Cc: oleg@redhat.com Cc: tj@kernel.org Link: http://lkml.kernel.org/r/1508921765-15396-3-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar include/linux/lockdep.h | 5 +++++ 1 file changed, 5 insertions(+) commit 65e53aab6d54385dea799356defcbdcc456fb1a7 Author: Christoph Hellwig Date: Wed Oct 25 17:55:57 2017 +0900 block: Use DECLARE_COMPLETION_ONSTACK() in submit_bio_wait() Simplify the code by getting rid of the submit_bio_ret structure. (This also helps address a lockdep false positive.) Signed-off-by: Christoph Hellwig Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: amir73il@gmail.com Cc: axboe@kernel.dk Cc: darrick.wong@oracle.com Cc: david@fromorbit.com Cc: hch@infradead.org Cc: idryomov@gmail.com Cc: johan@kernel.org Cc: johannes.berg@intel.com Cc: kernel-team@lge.com Cc: linux-block@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-xfs@vger.kernel.org Cc: oleg@redhat.com Cc: tj@kernel.org Link: http://lkml.kernel.org/r/1508921765-15396-2-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar block/bio.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) commit b2035d813fb97632ec40cf1ce90aa3a325bbd15d Author: Jeffy Chen Date: Wed Oct 25 15:39:10 2017 +0800 scsi: scsi_devinfo: Add scsi_devinfo_tbl.c Add generated scsi_devinfo_tbl.c into .gitignore. Fixes: 345e29608b4b ("scsi: scsi: Export blacklist flags to sysfs") Signed-off-by: Jeffy Chen Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/.gitignore | 1 + 1 file changed, 1 insertion(+) commit faa865f18cb7e64fe96fdbeb3662f50050bb8d26 Merge: f09a6b8 a4f21e9 Author: Stephen Boyd Date: Wed Oct 25 02:37:03 2017 -0700 Merge tag 'clk-v4.15-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk into clk-next Pull Samsung clk driver updates from Sylwester Nawrocki: Overall clk/samsung clean up and fixes. Removed remaining unused code after removal of exynos4212 SoC support; dropped internal data structure fields and related code for registering clkdev lookup entry for each possible clock object, clkdev aliases could still be defined if needed in a separate table; other minor fixes of the clock tree definitions. * tag 'clk-v4.15-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk: clk: samsung: Remove obsolete clkdev alias support clk: samsung: Add explicit MPLL, EPLL clkdev aliases in S3C2443 driver clk: samsung: Rework clkdev alias handling in S3C2443 driver clk: samsung: Rework clkdev alias handling in Exynos5440 driver clk: samsung: Drop useless alias in Exynos5420 clk driver clk: samsung: Remove clkdev alias support in Exynos5250 clk driver clk: samsung: Remove double assignment of CLK_ARM_CLK in Exynos4 driver clk: samsung: Remove clkdev alias support in Exynos4 clk driver clk: samsung: Remove support for obsolete Exynos4212 CPU clock clk: samsung: Remove support for Exynos4212 SoCs in Exynos CLKOUT driver clk: samsung: Properly propagate flags in __PLL macro clk: samsung: Fix m2m scaler clock on Exynos542x clk: samsung: Delete a memory allocation error message in clk-cpu.c commit f09a6b86fdaef9e494415561ccb5f6f9fa3095b1 Merge: 0a4e632 b4021bb Author: Stephen Boyd Date: Wed Oct 25 02:34:15 2017 -0700 Merge tag 'clk-renesas-for-v4.15-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-next Pull Renesas clk driver updates from Geert Uytterhoeven: - Add support for the new R-Car V3M SoC, - Small fixes and cleanups. * tag 'clk-renesas-for-v4.15-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: rcar-gen2: Delete error message for failed memory allocation clk: renesas: mstp: Delete error messages for failed memory allocations clk: renesas: cpg-mssr: Add R8A77970 support dt-bindings: clock: Add R8A77970 CPG core clock definitions commit 24efd94bc38290dc1d9775a1e767ed4685d8a79b Author: Linus Walleij Date: Fri Oct 20 16:31:27 2017 +0200 gpio: mmio: Make pin2mask() a private business The vtable call pin2mask() was introducing a vtable function call in every gpiochip callback for a generic MMIO GPIO chip. This was not exactly efficient. (Maybe link-time optimization could get rid of it, I don't know.) After removing all external calls into this API we can make it a boolean flag in the struct gpio_chip call and sink the function into the gpio-mmio driver yielding encapsulation and potential speedups. Cc: Anton Vorontsov Signed-off-by: Linus Walleij drivers/gpio/gpio-mmio.c | 45 +++++++++++++++++++-------------------------- include/linux/gpio/driver.h | 8 ++++---- 2 files changed, 23 insertions(+), 30 deletions(-) commit b3222f7147e028d31f965f193b6f995147c64651 Author: Linus Walleij Date: Fri Oct 20 16:08:12 2017 +0200 gpio: mpc8xxx: Do not reverse bits using bgpio The MPC8xxx driver is always instantiating its generic GPIO functions with the flag BGPIOF_BIG_ENDIAN. This means "big-endian bit order" and means the bits representing the GPIO lines in the registers are reversed around 31 bits so line 0 is at bit 31 and so forth down to line 31 in bit 0. Instead of looping into the generic MMIO gpio to do the simple calculation of a bitmask, through a vtable call with two parameters likely using stack frames etc (unless the compiler optimize it) and obscuring the view for the programmer, let's just open-code what the call does. This likely executes faster, saves space and makes the code easier to read. Cc: Liu Gang Cc: Uwe Kleine-König Signed-off-by: Linus Walleij drivers/gpio/gpio-mpc8xxx.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit d74423687f9d70417bfec68121cbd35f79bb170f Author: Linus Walleij Date: Fri Oct 20 15:45:34 2017 +0200 gpio: brcmstb: Do not use gc->pin2mask() The pin2mask() accessor only shuffles BIT ORDER in big endian systems, i.e. the bitstuffing is swizzled big endian so "bit 0" is bit 7 or bit 15 or bit 31 or so. The brcmstb only uses big endian BYTE ORDER which will be taken car of by the ->write_reg() callback. Just use BIT(offset) to assign the bit. Acked-by: Gregory Fong Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij drivers/gpio/gpio-brcmstb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5c7b0c4e7d5cd9850a93b8a1ea092baf4c8b3cd0 Author: Linus Walleij Date: Fri Oct 20 14:57:37 2017 +0200 gpio: grgpio: Do not use gc->pin2mask() The pin2mask() accessor only shuffles BIT ORDER in big endian systems, i.e. the bitstuffing is swizzled big endian so "bit 0" is bit 7 or bit 15 or bit 31 or so. The grgpio only uses big endian BYTE ORDER which will be taken car of by the ->write_reg() callback. Just use BIT(offset) to assign the bit. Acked-by: Andreas Larsson Signed-off-by: Linus Walleij drivers/gpio/gpio-grgpio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fe29416b5ca2f80b43622ac3023ed9cd0c1ce777 Author: Linus Walleij Date: Fri Oct 20 14:42:01 2017 +0200 gpio: loongson1: fix bgpio usage When no flags are given, the native endianness is used to access the MMIO registers, and the pin2mask() call can simply be converted to a BIT() call, as per the default pin2mask() implementation in gpio-mmio.c. Cc: Kelvin Cheung Signed-off-by: Linus Walleij drivers/gpio/gpio-loongson1.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit d97a1b5688b015d94d0365b032c0659957a9e9d1 Author: Linus Walleij Date: Fri Oct 20 12:26:51 2017 +0200 gpio: dwapb: fix bgpio usage The DW APB GPIO driver uses the generic GPIO library gpio-mmio, and initialize the flags as "false", which should be 0. When no flags are given, the native endianness is used to access the MMIO registers, and the pin2mask() call can simply be converted to a BIT() call, as per the default pin2mask() implementation in gpio-mmio.c. Acked-by: Alan Tull Acked-by: Hoan Tran Signed-off-by: Linus Walleij drivers/gpio/gpio-dwapb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6aa7de059173a986114ac43b8f50b297a86f09a8 Author: Mark Rutland Date: Mon Oct 23 14:07:29 2017 -0700 locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE() Please do not apply this to mainline directly, instead please re-run the coccinelle script shown below and apply its output. For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't harmful, and changing them results in churn. However, for some features, the read/write distinction is critical to correct operation. To distinguish these cases, separate read/write accessors must be used. This patch migrates (most) remaining ACCESS_ONCE() instances to {READ,WRITE}_ONCE(), using the following coccinelle script: ---- // Convert trivial ACCESS_ONCE() uses to equivalent READ_ONCE() and // WRITE_ONCE() // $ make coccicheck COCCI=/home/mark/once.cocci SPFLAGS="--include-headers" MODE=patch virtual patch @ depends on patch @ expression E1, E2; @@ - ACCESS_ONCE(E1) = E2 + WRITE_ONCE(E1, E2) @ depends on patch @ expression E; @@ - ACCESS_ONCE(E) + READ_ONCE(E) ---- Signed-off-by: Mark Rutland Signed-off-by: Paul E. McKenney Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: davem@davemloft.net Cc: linux-arch@vger.kernel.org Cc: mpe@ellerman.id.au Cc: shuah@kernel.org Cc: snitzer@redhat.com Cc: thor.thayer@linux.intel.com Cc: tj@kernel.org Cc: viro@zeniv.linux.org.uk Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1508792849-3115-19-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar arch/arc/kernel/smp.c | 2 +- arch/arm/include/asm/spinlock.h | 2 +- arch/arm/mach-tegra/cpuidle-tegra20.c | 2 +- arch/arm/vdso/vgettimeofday.c | 2 +- arch/ia64/include/asm/spinlock.h | 8 ++--- arch/mips/include/asm/vdso.h | 2 +- arch/mips/kernel/pm-cps.c | 2 +- arch/mn10300/kernel/mn10300-serial.c | 4 +-- arch/parisc/include/asm/atomic.h | 2 +- arch/powerpc/platforms/powernv/opal-msglog.c | 2 +- arch/s390/include/asm/spinlock.h | 6 ++-- arch/s390/lib/spinlock.c | 16 +++++----- arch/sparc/include/asm/atomic_32.h | 2 +- arch/tile/gxio/dma_queue.c | 4 +-- arch/tile/include/gxio/dma_queue.h | 2 +- arch/tile/kernel/ptrace.c | 2 +- arch/x86/entry/common.c | 2 +- arch/x86/entry/vdso/vclock_gettime.c | 2 +- arch/x86/events/core.c | 2 +- arch/x86/include/asm/vgtod.h | 2 +- arch/x86/kernel/espfix_64.c | 6 ++-- arch/x86/kernel/nmi.c | 2 +- arch/x86/kvm/mmu.c | 4 +-- arch/x86/kvm/page_track.c | 2 +- arch/x86/xen/p2m.c | 2 +- arch/xtensa/platforms/xtfpga/lcd.c | 14 ++++----- block/blk-wbt.c | 2 +- drivers/base/core.c | 2 +- drivers/base/power/runtime.c | 4 +-- drivers/char/random.c | 4 +-- drivers/clocksource/bcm2835_timer.c | 2 +- drivers/crypto/caam/jr.c | 4 +-- drivers/crypto/nx/nx-842-powernv.c | 2 +- drivers/firewire/ohci.c | 10 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 4 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 +-- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 2 +- drivers/gpu/drm/radeon/radeon_gem.c | 4 +-- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 +- drivers/infiniband/hw/hfi1/file_ops.c | 2 +- drivers/infiniband/hw/hfi1/pio.c | 6 ++-- drivers/infiniband/hw/hfi1/ruc.c | 2 +- drivers/infiniband/hw/hfi1/sdma.c | 8 ++--- drivers/infiniband/hw/hfi1/sdma.h | 2 +- drivers/infiniband/hw/hfi1/uc.c | 4 +-- drivers/infiniband/hw/hfi1/ud.c | 4 +-- drivers/infiniband/hw/hfi1/user_sdma.c | 8 ++--- drivers/infiniband/hw/qib/qib_ruc.c | 2 +- drivers/infiniband/hw/qib/qib_uc.c | 4 +-- drivers/infiniband/hw/qib/qib_ud.c | 4 +-- drivers/infiniband/sw/rdmavt/qp.c | 6 ++-- drivers/input/misc/regulator-haptic.c | 2 +- drivers/md/dm-bufio.c | 10 +++--- drivers/md/dm-kcopyd.c | 4 +-- drivers/md/dm-stats.c | 36 +++++++++++----------- drivers/md/dm-switch.c | 2 +- drivers/md/dm-thin.c | 2 +- drivers/md/dm-verity-target.c | 2 +- drivers/md/dm.c | 4 +-- drivers/md/md.c | 2 +- drivers/md/raid5.c | 2 +- drivers/misc/mic/scif/scif_rb.c | 8 ++--- drivers/misc/mic/scif/scif_rma_list.c | 2 +- drivers/net/bonding/bond_alb.c | 2 +- drivers/net/bonding/bond_main.c | 6 ++-- drivers/net/ethernet/chelsio/cxgb4/sge.c | 4 +-- drivers/net/ethernet/emulex/benet/be_main.c | 2 +- drivers/net/ethernet/hisilicon/hip04_eth.c | 4 +-- drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 4 +-- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 4 +-- drivers/net/ethernet/intel/i40e/i40e_ptp.c | 4 +-- drivers/net/ethernet/intel/igb/e1000_regs.h | 2 +- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_common.h | 4 +-- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 8 ++--- drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 4 +-- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- drivers/net/ethernet/intel/ixgbevf/vf.h | 2 +- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 12 ++++---- drivers/net/ethernet/neterion/vxge/vxge-main.c | 2 +- drivers/net/ethernet/sfc/ef10.c | 10 +++--- drivers/net/ethernet/sfc/efx.c | 4 +-- drivers/net/ethernet/sfc/falcon/efx.c | 4 +-- drivers/net/ethernet/sfc/falcon/falcon.c | 4 +-- drivers/net/ethernet/sfc/falcon/farch.c | 8 ++--- drivers/net/ethernet/sfc/falcon/nic.h | 6 ++-- drivers/net/ethernet/sfc/falcon/tx.c | 6 ++-- drivers/net/ethernet/sfc/farch.c | 8 ++--- drivers/net/ethernet/sfc/nic.h | 6 ++-- drivers/net/ethernet/sfc/ptp.c | 10 +++--- drivers/net/ethernet/sfc/tx.c | 6 ++-- drivers/net/ethernet/sun/niu.c | 4 +-- drivers/net/tap.c | 2 +- drivers/net/tun.c | 4 +-- drivers/net/wireless/ath/ath5k/desc.c | 8 ++--- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 4 +-- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 10 +++--- drivers/net/wireless/mac80211_hwsim.c | 4 +-- drivers/scsi/qla2xxx/qla_target.c | 2 +- drivers/target/target_core_user.c | 2 +- drivers/usb/class/cdc-wdm.c | 2 +- drivers/usb/core/devio.c | 2 +- drivers/usb/core/sysfs.c | 4 +-- drivers/usb/gadget/udc/gr_udc.c | 4 +-- drivers/usb/host/ohci-hcd.c | 2 +- drivers/usb/host/uhci-hcd.h | 4 +-- drivers/vfio/vfio.c | 2 +- drivers/vhost/scsi.c | 2 +- fs/aio.c | 2 +- fs/buffer.c | 3 +- fs/crypto/keyinfo.c | 2 +- fs/direct-io.c | 2 +- fs/exec.c | 2 +- fs/fcntl.c | 2 +- fs/fs_pin.c | 4 +-- fs/fuse/dev.c | 2 +- fs/inode.c | 2 +- fs/namei.c | 4 +-- fs/namespace.c | 2 +- fs/nfs/dir.c | 8 ++--- fs/proc/array.c | 2 +- fs/proc_namespace.c | 2 +- fs/splice.c | 2 +- fs/userfaultfd.c | 8 ++--- fs/xfs/xfs_log_priv.h | 4 +-- include/linux/bitops.h | 4 +-- include/linux/dynamic_queue_limits.h | 2 +- include/linux/huge_mm.h | 2 +- include/linux/if_team.h | 2 +- include/linux/llist.h | 2 +- include/linux/pm_runtime.h | 2 +- include/net/ip_vs.h | 6 ++-- kernel/acct.c | 4 +-- kernel/events/core.c | 6 ++-- kernel/events/ring_buffer.c | 2 +- kernel/exit.c | 2 +- kernel/trace/ring_buffer.c | 2 +- kernel/trace/trace.h | 2 +- kernel/trace/trace_stack.c | 2 +- kernel/user_namespace.c | 2 +- lib/assoc_array.c | 20 ++++++------ lib/dynamic_queue_limits.c | 2 +- lib/llist.c | 2 +- lib/vsprintf.c | 4 +-- mm/huge_memory.c | 2 +- net/core/dev.c | 2 +- net/core/pktgen.c | 2 +- net/ipv4/inet_fragment.c | 2 +- net/ipv4/route.c | 2 +- net/ipv4/tcp_output.c | 2 +- net/ipv4/udp.c | 4 +-- net/ipv6/ip6_tunnel.c | 8 ++--- net/ipv6/udp.c | 4 +-- net/llc/llc_input.c | 4 +-- net/mac80211/sta_info.c | 2 +- net/netlabel/netlabel_calipso.c | 2 +- net/wireless/nl80211.c | 2 +- sound/firewire/amdtp-am824.c | 6 ++-- sound/firewire/amdtp-stream.c | 23 +++++++------- sound/firewire/amdtp-stream.h | 2 +- sound/firewire/digi00x/amdtp-dot.c | 6 ++-- sound/firewire/fireface/amdtp-ff.c | 4 +-- sound/firewire/fireface/ff-midi.c | 10 +++--- sound/firewire/fireface/ff-transaction.c | 8 ++--- sound/firewire/isight.c | 18 +++++------ sound/firewire/motu/amdtp-motu.c | 4 +-- sound/firewire/oxfw/oxfw-scs1x.c | 12 ++++---- sound/firewire/tascam/amdtp-tascam.c | 4 +-- sound/firewire/tascam/tascam-transaction.c | 6 ++-- sound/soc/xtensa/xtfpga-i2s.c | 6 ++-- sound/usb/bcd2000/bcd2000.c | 4 +-- tools/arch/x86/include/asm/atomic.h | 2 +- tools/include/asm-generic/atomic-gcc.h | 2 +- tools/perf/util/auxtrace.h | 4 +-- tools/perf/util/session.h | 2 +- virt/kvm/kvm_main.c | 2 +- 180 files changed, 383 insertions(+), 385 deletions(-) commit b03a0fe0c5e4b46dcd400d27395b124499554a71 Author: Paul E. McKenney Date: Mon Oct 23 14:07:25 2017 -0700 locking/atomics, mm: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't currently harmful. However, for some features it is necessary to instrument reads and writes separately, which is not possible with ACCESS_ONCE(). This distinction is critical to correct operation. It's possible to transform the bulk of kernel code using the Coccinelle script below. However, this doesn't handle comments, leaving references to ACCESS_ONCE() instances which have been removed. As a preparatory step, this patch converts the mm code and comments to use {READ,WRITE}_ONCE() consistently. ---- virtual patch @ depends on patch @ expression E1, E2; @@ - ACCESS_ONCE(E1) = E2 + WRITE_ONCE(E1, E2) @ depends on patch @ expression E; @@ - ACCESS_ONCE(E) + READ_ONCE(E) ---- Signed-off-by: Paul E. McKenney Acked-by: Will Deacon Acked-by: Mark Rutland Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: davem@davemloft.net Cc: linux-arch@vger.kernel.org Cc: mpe@ellerman.id.au Cc: shuah@kernel.org Cc: snitzer@redhat.com Cc: thor.thayer@linux.intel.com Cc: tj@kernel.org Cc: viro@zeniv.linux.org.uk Link: http://lkml.kernel.org/r/1508792849-3115-15-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar mm/memory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3587679d93d0b0e4c31e5a2ad1dffdfcb77e8526 Author: Paul E. McKenney Date: Mon Oct 23 14:07:24 2017 -0700 locking/atomics, doc/filesystems: Convert ACCESS_ONCE() references For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't currently harmful. However, for some features it is necessary to instrument reads and writes separately, which is not possible with ACCESS_ONCE(). This distinction is critical to correct operation. It's possible to transform the bulk of kernel code using the Coccinelle script below. However, this doesn't handle documentation, leaving references to ACCESS_ONCE() instances which have been removed. As a preparatory step, this patch converts the filesystems documentation to use {READ,WRITE}_ONCE() consistently. ---- virtual patch @ depends on patch @ expression E1, E2; @@ - ACCESS_ONCE(E1) = E2 + WRITE_ONCE(E1, E2) @ depends on patch @ expression E; @@ - ACCESS_ONCE(E) + READ_ONCE(E) ---- Signed-off-by: Paul E. McKenney Acked-by: Will Deacon Acked-by: Mark Rutland Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: davem@davemloft.net Cc: linux-arch@vger.kernel.org Cc: mpe@ellerman.id.au Cc: shuah@kernel.org Cc: snitzer@redhat.com Cc: thor.thayer@linux.intel.com Cc: tj@kernel.org Cc: viro@zeniv.linux.org.uk Link: http://lkml.kernel.org/r/1508792849-3115-14-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar Documentation/filesystems/path-lookup.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5cd38016d0c88e3f67528c1a7380a6d5c90859e9 Author: Mark Rutland Date: Mon Oct 23 14:07:23 2017 -0700 locking/atomics, rcutorture/formal: Prepare for ACCESS_ONCE() removal For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't currently harmful. However, for some features it is necessary to instrument reads and writes separately, which is not possible with ACCESS_ONCE(). This distinction is critical to correct operation. The bulk of the kernel code can be transformed via Coccinelle to use {READ,WRITE}_ONCE(), though this only modifies users of ACCESS_ONCE(), and not the implementation itself. As such, it has the potential to break homebrew ACCESS_ONCE() macros seen in some user code in the kernel tree (e.g. the virtio code, as fixed in commit ea9156fb3b71d9f7). To avoid fragility if/when that transformation occurs, this patch reworks the definitions of {READ,WRITE}_ONCE() in the rcutorture formal tests, and removes the unused ACCESS_ONCE() helper. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Paul E. McKenney Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: davem@davemloft.net Cc: linux-arch@vger.kernel.org Cc: mpe@ellerman.id.au Cc: shuah@kernel.org Cc: snitzer@redhat.com Cc: thor.thayer@linux.intel.com Cc: tj@kernel.org Cc: viro@zeniv.linux.org.uk Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1508792849-3115-13-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/barriers.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c95491ed6d6a958743d82bea1d053819988da418 Author: Mark Rutland Date: Mon Oct 23 14:07:22 2017 -0700 locking/atomics, workqueue: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't currently harmful. However, for some features it is necessary to instrument reads and writes separately, which is not possible with ACCESS_ONCE(). This distinction is critical to correct operation. It's possible to transform the bulk of kernel code using the Coccinelle script below. However, this doesn't handle comments, leaving references to ACCESS_ONCE() instances which have been removed. As a preparatory step, this patch converts the workqueue code and comments to use {READ,WRITE}_ONCE() consistently. ---- virtual patch @ depends on patch @ expression E1, E2; @@ - ACCESS_ONCE(E1) = E2 + WRITE_ONCE(E1, E2) @ depends on patch @ expression E; @@ - ACCESS_ONCE(E) + READ_ONCE(E) ---- Signed-off-by: Mark Rutland Signed-off-by: Paul E. McKenney Acked-by: Tejun Heo Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: davem@davemloft.net Cc: linux-arch@vger.kernel.org Cc: mpe@ellerman.id.au Cc: shuah@kernel.org Cc: snitzer@redhat.com Cc: thor.thayer@linux.intel.com Cc: viro@zeniv.linux.org.uk Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1508792849-3115-12-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar kernel/workqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 564cbc87937d5de1b5b666b0ed68122d6c74fa07 Author: Mark Rutland Date: Mon Oct 23 14:07:21 2017 -0700 locking/atomics, selftests/powerpc: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't currently harmful. However, for some features it is necessary to instrument reads and writes separately, which is not possible with ACCESS_ONCE(). This distinction is critical to correct operation. The bulk of the kernel code can be transformed via Coccinelle to use {READ,WRITE}_ONCE(), though this only modifies users of ACCESS_ONCE(), and not the implementation itself. As such, it has the potential to break homebrew ACCESS_ONCE() macros seen in some user code in the kernel tree (e.g. the virtio code, as fixed in commit ea9156fb3b71d9f7). To avoid fragility if/when that transformation occurs, and to align with the preferred usage of {READ,WRITE}_ONCE(), this patch updates the DSCR selftest code to use READ_ONCE() rather than ACCESS_ONCE(). There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Paul E. McKenney Acked-by: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Linus Torvalds Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Shuah Khan Cc: Thomas Gleixner Cc: davem@davemloft.net Cc: linux-arch@vger.kernel.org Cc: snitzer@redhat.com Cc: thor.thayer@linux.intel.com Cc: tj@kernel.org Cc: viro@zeniv.linux.org.uk Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1508792849-3115-11-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar tools/testing/selftests/powerpc/dscr/dscr.h | 2 +- tools/testing/selftests/powerpc/dscr/dscr_default_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 94bbc9c1a0b0967509f8ad91323245aad30572f7 Author: Mark Rutland Date: Mon Oct 23 14:07:20 2017 -0700 locking/atomics, samples/mic/mpssd/mpssd.c: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't currently harmful. However, for some features it is necessary to instrument reads and writes separately, which is not possible with ACCESS_ONCE(). This distinction is critical to correct operation. The bulk of the kernel code can be transformed via Coccinelle to use {READ,WRITE}_ONCE(), though this only modifies users of ACCESS_ONCE(), and not the implementation itself. As such, it has the potential to break homebrew ACCESS_ONCE() macros seen in some user code in the kernel tree (e.g. the virtio code, as fixed in commit ea9156fb3b71d9f7). To avoid fragility if/when that transformation occurs, and to align with the preferred usage of {READ,WRITE}_ONCE(), this patch updates the MPSSD sample code to use READ_ONCE() rather than ACCESS_ONCE(). There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Paul E. McKenney Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shuah Khan Cc: Thomas Gleixner Cc: davem@davemloft.net Cc: linux-arch@vger.kernel.org Cc: mpe@ellerman.id.au Cc: snitzer@redhat.com Cc: thor.thayer@linux.intel.com Cc: tj@kernel.org Cc: viro@zeniv.linux.org.uk Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1508792849-3115-10-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar samples/mic/mpssd/mpssd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ef4d9af62f47e3070b00c3307a4d8eb5092bb9a2 Author: Mark Rutland Date: Mon Oct 23 14:07:19 2017 -0700 locking/atomics, net/average: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't currently harmful. However, for some features it is necessary to instrument reads and writes separately, which is not possible with ACCESS_ONCE(). This distinction is critical to correct operation. It's possible to transform the bulk of kernel code using the Coccinelle script below. However, this doesn't pick up some uses, including those in . As a preparatory step, this patch converts the file to use {READ,WRITE}_ONCE() consistently. At the same time, this patch addds missing includes necessary for {READ,WRITE}_ONCE(), *BUG_ON*(), and ilog2(). ---- virtual patch @ depends on patch @ expression E1, E2; @@ - ACCESS_ONCE(E1) = E2 + WRITE_ONCE(E1, E2) @ depends on patch @ expression E; @@ - ACCESS_ONCE(E) + READ_ONCE(E) ---- Signed-off-by: Mark Rutland Signed-off-by: Paul E. McKenney Reviewed-by: Johannes Berg Cc: David S. Miller Cc: Johannes Berg Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: mpe@ellerman.id.au Cc: shuah@kernel.org Cc: snitzer@redhat.com Cc: thor.thayer@linux.intel.com Cc: tj@kernel.org Cc: viro@zeniv.linux.org.uk Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1508792849-3115-9-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar include/linux/average.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit a9da6f29baf6b61fc94f9768638ee54e9bff173c Author: Mark Rutland Date: Mon Oct 23 14:07:18 2017 -0700 locking/atomics, net/ipv4/tcp_input.c: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't currently harmful. However, for some features it is necessary to instrument reads and writes separately, which is not possible with ACCESS_ONCE(). This distinction is critical to correct operation. It's possible to transform the bulk of kernel code using the Coccinelle script below. However, this doesn't handle comments, leaving references to ACCESS_ONCE() instances which have been removed. As a preparatory step, this patch converts the IPv4 TCP input code and comments to use {READ,WRITE}_ONCE() consistently. ---- virtual patch @ depends on patch @ expression E1, E2; @@ - ACCESS_ONCE(E1) = E2 + WRITE_ONCE(E1, E2) @ depends on patch @ expression E; @@ - ACCESS_ONCE(E) + READ_ONCE(E) ---- Signed-off-by: Mark Rutland Signed-off-by: Paul E. McKenney Cc: David S. Miller Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: mpe@ellerman.id.au Cc: shuah@kernel.org Cc: snitzer@redhat.com Cc: thor.thayer@linux.intel.com Cc: tj@kernel.org Cc: viro@zeniv.linux.org.uk Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1508792849-3115-8-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar net/ipv4/tcp_input.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 14cd5d4a0125f643350e7fa12f5384f1fc2d3e9d Author: Mark Rutland Date: Mon Oct 23 14:07:17 2017 -0700 locking/atomics, net/netlink/netfilter: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't currently harmful. However, for some features it is necessary to instrument reads and writes separately, which is not possible with ACCESS_ONCE(). This distinction is critical to correct operation. It's possible to transform the bulk of kernel code using the Coccinelle script below. However, this doesn't handle comments, leaving references to ACCESS_ONCE() instances which have been removed. As a preparatory step, this patch converts netlink and netfilter code and comments to use {READ,WRITE}_ONCE() consistently. ---- virtual patch @ depends on patch @ expression E1, E2; @@ - ACCESS_ONCE(E1) = E2 + WRITE_ONCE(E1, E2) @ depends on patch @ expression E; @@ - ACCESS_ONCE(E) + READ_ONCE(E) ---- Signed-off-by: Mark Rutland Signed-off-by: Paul E. McKenney Cc: David S. Miller Cc: Florian Westphal Cc: Jozsef Kadlecsik Cc: Linus Torvalds Cc: Pablo Neira Ayuso Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch@vger.kernel.org Cc: mpe@ellerman.id.au Cc: shuah@kernel.org Cc: snitzer@redhat.com Cc: thor.thayer@linux.intel.com Cc: tj@kernel.org Cc: viro@zeniv.linux.org.uk Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1508792849-3115-7-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar include/linux/genetlink.h | 2 +- include/linux/netfilter/nfnetlink.h | 2 +- include/linux/rtnetlink.h | 2 +- include/net/netfilter/nf_tables.h | 4 ++-- net/netfilter/ipvs/ip_vs_sync.c | 2 +- net/netfilter/nfnetlink_queue.c | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) commit 24fbd6e04e4e4793ec9dd9c2e007b0b38d2ec3ab Author: Mark Rutland Date: Mon Oct 23 14:07:16 2017 -0700 locking/atomics, media/dvb_ringbuffer: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't currently harmful. However, for some features it is necessary to instrument reads and writes separately, which is not possible with ACCESS_ONCE(). This distinction is critical to correct operation. It's possible to transform the bulk of kernel code using the Coccinelle script below. However, this doesn't handle comments, leaving references to ACCESS_ONCE() instances which have been removed. As a preparatory step, this patch converts the DVB ringbuffer code and comments to use {READ,WRITE}_ONCE() consistently. ---- virtual patch @ depends on patch @ expression E1, E2; @@ - ACCESS_ONCE(E1) = E2 + WRITE_ONCE(E1, E2) @ depends on patch @ expression E; @@ - ACCESS_ONCE(E) + READ_ONCE(E) ---- Signed-off-by: Mark Rutland Signed-off-by: Paul E. McKenney Cc: Linus Torvalds Cc: Mauro Carvalho Chehab Cc: Peter Zijlstra Cc: Sakari Ailus Cc: Thomas Gleixner Cc: davem@davemloft.net Cc: linux-arch@vger.kernel.org Cc: mpe@ellerman.id.au Cc: shuah@kernel.org Cc: snitzer@redhat.com Cc: thor.thayer@linux.intel.com Cc: tj@kernel.org Cc: viro@zeniv.linux.org.uk Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1508792849-3115-6-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar drivers/media/dvb-core/dvb_ringbuffer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fd7048adb7a5f3c44154675e0e128fe0f2e16bef Author: Mark Rutland Date: Mon Oct 23 14:07:15 2017 -0700 locking/atomics, fs/ncpfs: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() The NCPFS code has some stale comments regarding ACCESS_ONCE() uses which were removed a long time ago. Let's remove the stale comments. Signed-off-by: Mark Rutland Signed-off-by: Paul E. McKenney Cc: Alexander Viro Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Petr Vandrovec Cc: Thomas Gleixner Cc: davem@davemloft.net Cc: linux-arch@vger.kernel.org Cc: mpe@ellerman.id.au Cc: shuah@kernel.org Cc: snitzer@redhat.com Cc: thor.thayer@linux.intel.com Cc: tj@kernel.org Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1508792849-3115-5-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar fs/ncpfs/dir.c | 9 --------- 1 file changed, 9 deletions(-) commit 66702eb59064f1077e89cce8e7e3cd48ec4b486c Author: Mark Rutland Date: Mon Oct 23 14:07:14 2017 -0700 locking/atomics, fs/dcache: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't currently harmful. However, for some features it is necessary to instrument reads and writes separately, which is not possible with ACCESS_ONCE(). This distinction is critical to correct operation. It's possible to transform the bulk of kernel code using the Coccinelle script below. However, this doesn't handle comments, leaving references to ACCESS_ONCE() instances which have been removed. As a preparatory step, this patch converts the dcache code and comments to use {READ,WRITE}_ONCE() consistently. ---- virtual patch @ depends on patch @ expression E1, E2; @@ - ACCESS_ONCE(E1) = E2 + WRITE_ONCE(E1, E2) @ depends on patch @ expression E; @@ - ACCESS_ONCE(E) + READ_ONCE(E) ---- Signed-off-by: Mark Rutland Signed-off-by: Paul E. McKenney Cc: Al Viro Cc: Andrew Morton Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: davem@davemloft.net Cc: linux-arch@vger.kernel.org Cc: mpe@ellerman.id.au Cc: shuah@kernel.org Cc: snitzer@redhat.com Cc: thor.thayer@linux.intel.com Cc: tj@kernel.org Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1508792849-3115-4-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar fs/dcache.c | 18 +++++++++--------- include/linux/dcache.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) commit eeafcc5a5925d0819dad462eac1d42fda5fbe36f Author: Mark Rutland Date: Mon Oct 23 14:07:13 2017 -0700 locking/atomics, firmware/ivc: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() workqueue: kill off ACCESS_ONCE() For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't currently harmful. However, for some features it is necessary to instrument reads and writes separately, which is not possible with ACCESS_ONCE(). This distinction is critical to correct operation. It's possible to transform the bulk of kernel code using the Coccinelle script below. However, this doesn't handle comments, leaving references to ACCESS_ONCE() instances which have been removed. As a preparatory step, this patch converts the Tegra IVC code and comments to use {READ,WRITE}_ONCE() consistently. ---- virtual patch @ depends on patch @ expression E1, E2; @@ - ACCESS_ONCE(E1) = E2 + WRITE_ONCE(E1, E2) @ depends on patch @ expression E; @@ - ACCESS_ONCE(E) + READ_ONCE(E) ---- Signed-off-by: Mark Rutland Signed-off-by: Paul E. McKenney Cc: Jonathan Hunter Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thierry Reding Cc: Thomas Gleixner Cc: davem@davemloft.net Cc: linux-arch@vger.kernel.org Cc: mpe@ellerman.id.au Cc: shuah@kernel.org Cc: snitzer@redhat.com Cc: thor.thayer@linux.intel.com Cc: tj@kernel.org Cc: viro@zeniv.linux.org.uk Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1508792849-3115-3-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar drivers/firmware/tegra/ivc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 332efa6374de75c622b782569b16bb50fd722cf5 Author: Mark Rutland Date: Mon Oct 23 14:07:12 2017 -0700 locking/atomics, EDAC/altera: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't currently harmful. However, for some features it is necessary to instrument reads and writes separately, which is not possible with ACCESS_ONCE(). This distinction is critical to correct operation. It's possible to transform the bulk of kernel code using the Coccinelle script below. However, this doesn't handle comments, leaving references to ACCESS_ONCE() instances which have been removed. As a preparatory step, this patch converts the Altera EDAC code and comments to use {READ,WRITE}_ONCE() consistently. ---- virtual patch @ depends on patch @ expression E1, E2; @@ - ACCESS_ONCE(E1) = E2 + WRITE_ONCE(E1, E2) @ depends on patch @ expression E; @@ - ACCESS_ONCE(E) + READ_ONCE(E) ---- Signed-off-by: Mark Rutland Signed-off-by: Paul E. McKenney Acked-by: Thor Thayer Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: davem@davemloft.net Cc: linux-arch@vger.kernel.org Cc: mpe@ellerman.id.au Cc: shuah@kernel.org Cc: snitzer@redhat.com Cc: tj@kernel.org Cc: viro@zeniv.linux.org.uk Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1508792849-3115-2-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar drivers/edac/altera_edac.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit d3e632f07b6e637d3643081873867ecb6433b2ce Author: Mark Rutland Date: Mon Oct 23 14:07:11 2017 -0700 locking/atomics, dm-integrity: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() For several reasons, it is desirable to use {READ,WRITE}_ONCE() in preference to ACCESS_ONCE(), and new code is expected to use one of the former. So far, there's been no reason to change most existing uses of ACCESS_ONCE(), as these aren't currently harmful. However, for some features it is necessary to instrument reads and writes separately, which is not possible with ACCESS_ONCE(). This distinction is critical to correct operation. It's possible to transform the bulk of kernel code using the Coccinelle script below. However, this doesn't pick up some uses, including those in dm-integrity.c. As a preparatory step, this patch converts the driver to use {READ,WRITE}_ONCE() consistently. At the same time, this patch adds the missing include of necessary for the {READ,WRITE}_ONCE() definitions. ---- virtual patch @ depends on patch @ expression E1, E2; @@ - ACCESS_ONCE(E1) = E2 + WRITE_ONCE(E1, E2) @ depends on patch @ expression E; @@ - ACCESS_ONCE(E) + READ_ONCE(E) ---- Signed-off-by: Mark Rutland Signed-off-by: Paul E. McKenney Cc: Linus Torvalds Cc: Mike Snitzer Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: davem@davemloft.net Cc: linux-arch@vger.kernel.org Cc: mpe@ellerman.id.au Cc: shuah@kernel.org Cc: thor.thayer@linux.intel.com Cc: tj@kernel.org Cc: viro@zeniv.linux.org.uk Cc: will.deacon@arm.com Link: http://lkml.kernel.org/r/1508792849-3115-1-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar drivers/md/dm-integrity.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit d133166146333e1f13fc81c0e6c43c8d99290a8a Author: Will Deacon Date: Thu Oct 12 13:20:51 2017 +0100 locking/qrwlock: Prevent slowpath writers getting held up by fastpath When a prospective writer takes the qrwlock locking slowpath due to the lock being held, it attempts to cmpxchg the wmode field from 0 to _QW_WAITING so that concurrent lockers also take the slowpath and queue on the spinlock accordingly, allowing the lockers to drain. Unfortunately, this isn't fair, because a fastpath writer that comes in after the lock is made available but before the _QW_WAITING flag is set can effectively jump the queue. If there is a steady stream of prospective writers, then the waiter will be held off indefinitely. This patch restores fairness by separating _QW_WAITING and _QW_LOCKED into two distinct fields: _QW_LOCKED continues to occupy the bottom byte of the lockword so that it can be cleared unconditionally when unlocking, but _QW_WAITING now occupies what used to be the bottom bit of the reader count. This then forces the slow-path for concurrent lockers. Tested-by: Waiman Long Tested-by: Jeremy Linton Tested-by: Adam Wallis Tested-by: Jan Glauber Signed-off-by: Will Deacon Acked-by: Peter Zijlstra Cc: Boqun Feng Cc: Jeremy.Linton@arm.com Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1507810851-306-6-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar include/asm-generic/qrwlock.h | 23 +++++------------------ include/asm-generic/qrwlock_types.h | 8 ++++---- kernel/locking/qrwlock.c | 20 +++++--------------- 3 files changed, 14 insertions(+), 37 deletions(-) commit 087133ac90763cd339b6b67f2998f87dcc136c52 Author: Will Deacon Date: Thu Oct 12 13:20:50 2017 +0100 locking/qrwlock, arm64: Move rwlock implementation over to qrwlocks Now that the qrwlock can make use of WFE, remove our homebrewed rwlock code in favour of the generic queued implementation. Tested-by: Waiman Long Tested-by: Jeremy Linton Tested-by: Adam Wallis Tested-by: Jan Glauber Signed-off-by: Will Deacon Acked-by: Peter Zijlstra Cc: Jeremy.Linton@arm.com Cc: Linus Torvalds Cc: Thomas Gleixner Cc: boqun.feng@gmail.com Cc: linux-arm-kernel@lists.infradead.org Cc: paulmck@linux.vnet.ibm.com Link: http://lkml.kernel.org/r/1507810851-306-5-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar arch/arm64/Kconfig | 17 ++++ arch/arm64/include/asm/Kbuild | 1 + arch/arm64/include/asm/spinlock.h | 164 +------------------------------- arch/arm64/include/asm/spinlock_types.h | 6 +- 4 files changed, 20 insertions(+), 168 deletions(-) commit b519b56e378ee82caf9b079b04f5db87dedc3251 Author: Will Deacon Date: Thu Oct 12 13:20:49 2017 +0100 locking/qrwlock: Use atomic_cond_read_acquire() when spinning in qrwlock The qrwlock slowpaths involve spinning when either a prospective reader is waiting for a concurrent writer to drain, or a prospective writer is waiting for concurrent readers to drain. In both of these situations, atomic_cond_read_acquire() can be used to avoid busy-waiting and make use of any backoff functionality provided by the architecture. This patch replaces the open-code loops and rspin_until_writer_unlock() implementation with atomic_cond_read_acquire(). The write mode transition zero to _QW_WAITING is left alone, since (a) this doesn't need acquire semantics and (b) should be fast. Tested-by: Waiman Long Tested-by: Jeremy Linton Tested-by: Adam Wallis Tested-by: Jan Glauber Signed-off-by: Will Deacon Acked-by: Peter Zijlstra Cc: Boqun Feng Cc: Jeremy.Linton@arm.com Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1507810851-306-4-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar include/asm-generic/qrwlock.h | 4 ++-- kernel/locking/qrwlock.c | 50 +++++++++++-------------------------------- 2 files changed, 14 insertions(+), 40 deletions(-) commit 4df714be4dcf40bfb0d4af0f851a6e1977afa02e Author: Will Deacon Date: Thu Oct 12 13:20:48 2017 +0100 locking/atomic: Add atomic_cond_read_acquire() smp_cond_load_acquire() provides a way to spin on a variable with acquire semantics until some conditional expression involving the variable is satisfied. Architectures such as arm64 can potentially enter a low-power state, waking up only when the value of the variable changes, which reduces the system impact of tight polling loops. This patch makes the same interface available to users of atomic_t, atomic64_t and atomic_long_t, rather than require messy accesses to the structure internals. Signed-off-by: Will Deacon Acked-by: Peter Zijlstra Cc: Boqun Feng Cc: Jeremy.Linton@arm.com Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Thomas Gleixner Cc: Waiman Long Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1507810851-306-3-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar include/asm-generic/atomic-long.h | 3 +++ include/linux/atomic.h | 4 ++++ 2 files changed, 7 insertions(+) commit e0d02285f16e8d5810f3d5d5e8a5886ca0015d3b Author: Will Deacon Date: Thu Oct 12 13:20:47 2017 +0100 locking/qrwlock: Use 'struct qrwlock' instead of 'struct __qrwlock' There's no good reason to keep the internal structure of struct qrwlock hidden from qrwlock.h, particularly as it's actually needed for unlock and ends up being abstracted independently behind the __qrwlock_write_byte() function. Stop pretending we can hide this stuff, and move the __qrwlock definition into qrwlock, removing the __qrwlock_write_byte() nastiness and using the same struct definition everywhere instead. Signed-off-by: Will Deacon Acked-by: Peter Zijlstra Cc: Boqun Feng Cc: Jeremy.Linton@arm.com Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Thomas Gleixner Cc: Waiman Long Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1507810851-306-2-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar include/asm-generic/qrwlock.h | 12 +----------- include/asm-generic/qrwlock_types.h | 15 +++++++++++++-- kernel/locking/qrwlock.c | 26 ++------------------------ 3 files changed, 16 insertions(+), 37 deletions(-) commit 193ad909eed321b8f1aba4a402e5b6ea0f0e1975 Author: Shivasharan S Date: Thu Oct 19 02:49:06 2017 -0700 scsi: megaraid_sas: driver version upgrade Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 107a60dd71b5f536a68437514f7c15a5dd3a4a9d Author: Shivasharan S Date: Thu Oct 19 02:49:05 2017 -0700 scsi: megaraid_sas: Add support for 64bit consistent DMA The latest MegaRAID Firmware (for Invader series) has support for 64bit DMA for both streaming and consistent DMA buffers. All Ventura series controller FW always support 64 bit consistent DMA. Also, on a few architectures 32bit DMA is not supported. Current driver always prefers 32bit for consistent DMA and 64bit for streaming DMA. This behavior was unintentional and carried forwarded from legacy controller FW. Need to enhance the driver to support 64bit consistent DMA buffers based on the firmware capability. Below is the DMA setting strategy in driver with this patch. For Ventura series, always try to set 64bit DMA mask. If it fails fall back to 32bit DMA mask. For Invader series and earlier generation controllers, first try to set to 32bit consistent DMA mask irrespective of FW capability. This is needed to ensure firmware downgrades do not break. If 32bit DMA setting fails, check FW capability and try seting to 64bit DMA mask. There are certain restrictions in the hardware for having all sense buffers and all reply descriptors to be in the same 4GB memory region. This limitation is h/w dependent and can not be changed in firmware. This limitation needs to be taken care in driver while allocating the buffers. There was a discussion regarding this - find details at below link. https://www.spinics.net/lists/linux-scsi/msg108251.html Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 12 +- drivers/scsi/megaraid/megaraid_sas_base.c | 245 ++++++++++++------ drivers/scsi/megaraid/megaraid_sas_fusion.c | 384 ++++++++++++++++++++++------ drivers/scsi/megaraid/megaraid_sas_fusion.h | 13 + 4 files changed, 503 insertions(+), 151 deletions(-) commit 2dba66bf8ecb2dd07b721465c25f537acff6eaf1 Author: Shivasharan S Date: Thu Oct 19 02:49:04 2017 -0700 scsi: megaraid_sas: Do not limit queue_depth to 1k in non-RDPQ mode Driver load fails if memory allocation for request frame pool fails due to the higher queue_depth requirement. The driver now allows dynamically reducing queue_depth if memory allocations fail rather than failing load. With this, there is no need to limit queue_depth to 1K. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 ---- 1 file changed, 4 deletions(-) commit e97e673ca63bc8f8c1518f66567240fa4e79d2ad Author: Shivasharan S Date: Thu Oct 19 02:49:03 2017 -0700 scsi: megaraid_sas: Retry with reduced queue depth when alloc fails for higher QD In certain cases, the host memory is limited and with FW supporting higher queue depths there are increasing chances of IO request frame allocation failures that we are seeing. In case of request frame allocation failures, retry allocation with reduced queue depth (in steps of 64) to continue to configure the controller with a reduced performance rather than failing load. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 106 ++++++++++++++++++---------- drivers/scsi/megaraid/megaraid_sas_fusion.h | 1 + 2 files changed, 68 insertions(+), 39 deletions(-) commit 82add4e1b354f93ca4b986989a94c957cb8b06c5 Author: Shivasharan S Date: Thu Oct 19 02:49:02 2017 -0700 scsi: megaraid_sas: Incorrect processing of IOCTL frames for SMP/STP commands cmd->frame->dcmd.opcode will be valid only for MFI_CMD_DCMD IOCTL frames. Currently driver check for cmd->frame->dcmd.opcode without checking cmd type. Ensure we check dcmd opcode only for MFI_CMD_DCMD commands. Separate handling of MFI_CMD_SMP/STP commands from MFI_CMD_DCMD in completion path. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 23 +++++++++++++---------- drivers/scsi/megaraid/megaraid_sas_base.c | 22 ++++++++++++++++++---- 2 files changed, 31 insertions(+), 14 deletions(-) commit b9637d14dc00d91cef0068cde1f9a8959b051028 Author: Shivasharan S Date: Thu Oct 19 02:49:01 2017 -0700 scsi: megaraid_sas: Resize MFA frame used for IOC INIT to 4k Older firmware version unconditionally pulls 4k frame for IOC INIT MFA frame. But driver allocates 1k or 4k max_chain_frame_sz based on FW capability. During boot time, this results in DMA read errors. Workaround fix in driver by allocating separate ioc_init frame of 4k size to support older firmware. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Cc: stable@vger.kernel.org Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 65 +++++++++++++++++++++++++---- drivers/scsi/megaraid/megaraid_sas_fusion.h | 2 + 2 files changed, 58 insertions(+), 9 deletions(-) commit b99fc20281968b24ef8e3ab56cc5ba78c14b2a24 Author: Shivasharan S Date: Thu Oct 19 02:49:00 2017 -0700 scsi: megaraid_sas: Update current host time to FW during IOC Init Driver needs to send current host time to firmware during init. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e5d65b4b81af41e3d6b8e25f7aabc5256f647d87 Author: Shivasharan S Date: Thu Oct 19 02:48:59 2017 -0700 scsi: megaraid_sas: Move controller memory allocations and DMA mask settings from probe to megasas_init_fw Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 43 ++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 15 deletions(-) commit 7535f27d1f1408c25176af86feda846fa3d3d307 Author: Shivasharan S Date: Thu Oct 19 02:48:58 2017 -0700 scsi: megaraid_sas: Move initialization of instance parameters inside newly created function megasas_init_ctrl_params Code refactoring, no functional change. Create new function to initialize all the controller parameters during load time. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 119 +++++++++++++++--------------- 1 file changed, 61 insertions(+), 58 deletions(-) commit 9ad18a9c0c972b618ef68ca8c4a3ff7e7d0b49eb Author: Shivasharan S Date: Thu Oct 19 02:48:57 2017 -0700 scsi: megaraid_sas: remove instance->ctrl_info Re-use the pre-allocated ctrl_info DMA buffer. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 1 - drivers/scsi/megaraid/megaraid_sas_base.c | 43 ++++++++++--------------------- 2 files changed, 14 insertions(+), 30 deletions(-) commit 9b3d028f34686f16a2eb58ea4ad345d4c080b9a6 Author: Shivasharan S Date: Thu Oct 19 02:48:56 2017 -0700 scsi: megaraid_sas: Pre-allocate frequently used DMA buffers Pre-allocate few of the frequently used DMA buffers during load time. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 13 +++ drivers/scsi/megaraid/megaraid_sas_base.c | 147 ++++++++++++++++++---------- drivers/scsi/megaraid/megaraid_sas_fusion.c | 19 +--- drivers/scsi/megaraid/megaraid_sas_fusion.h | 3 + 4 files changed, 116 insertions(+), 66 deletions(-) commit 1b4bed20615959277e369b2de39bc3d7b1809c40 Author: Shivasharan S Date: Thu Oct 19 02:48:55 2017 -0700 scsi: megaraid_sas: Create separate functions for allocating and freeing controller DMA buffers Code refactoring - create separate functions to allocate and free controller DMA buffers Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 186 +++++++++++++++++------------- 1 file changed, 103 insertions(+), 83 deletions(-) commit 49a7a4adb0167b656b8dfb6ccb83220d553a1860 Author: Shivasharan S Date: Thu Oct 19 02:48:54 2017 -0700 scsi: megaraid_sas: Create separate functions to allocate ctrl memory No functional change. Code refactoring to improve readability. Move the code to allocate and free controller memory into separate functions. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 122 +++++++++++++++++++----------- 1 file changed, 76 insertions(+), 46 deletions(-) commit 2dd689c808b932379b01228de5b370fc68eb0186 Author: Shivasharan S Date: Thu Oct 19 02:48:53 2017 -0700 scsi: megaraid_sas: reduce size of fusion_context and use kmalloc for allocation fusion_context structure is very large around 180kB and most of the size is contributed by log_to_span array. Move log_to_span out of fusion context and have separate allocation for log_to_span. And use kmalloc to allocate fusion_context. Currently kmemleak reports 1000s of false positives for fusion->cmd_list[]. kmemleak does not track page allocation for fusion_context. This change will also fix the false positives reported by kmemleak. Ref: https://marc.info/?l=linux-scsi&m=150545293900917 Reported-by: Shu Wang Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 1 - drivers/scsi/megaraid/megaraid_sas_fusion.c | 43 +++++++++++++++++++---------- drivers/scsi/megaraid/megaraid_sas_fusion.h | 3 +- 3 files changed, 31 insertions(+), 16 deletions(-) commit f369a31578c461a360f58c7695e5aef931bada13 Author: Shivasharan S Date: Thu Oct 19 02:48:52 2017 -0700 scsi: megaraid_sas: replace is_ventura with adapter_type checks No functional change. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 1 - drivers/scsi/megaraid/megaraid_sas_base.c | 9 ++++----- drivers/scsi/megaraid/megaraid_sas_fp.c | 10 +++++----- drivers/scsi/megaraid/megaraid_sas_fusion.c | 26 +++++++++++++------------- 4 files changed, 22 insertions(+), 24 deletions(-) commit 55fecaec27d95d57028e584ce69462fdfffa1593 Author: Shivasharan S Date: Thu Oct 19 02:48:51 2017 -0700 scsi: megaraid_sas: Remove redundant checks for ctrl_context Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_fusion.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e7d36b88435077847e1ea992919c600f3fa9321c Author: Shivasharan S Date: Thu Oct 19 02:48:50 2017 -0700 scsi: megaraid_sas: replace instance->ctrl_context checks with instance->adapter_type Increase code readability. No functional change. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas_base.c | 64 ++++++++++++++++++------------- 1 file changed, 37 insertions(+), 27 deletions(-) commit 754f1bae0f1e306118f1e2628f781eba056874ed Author: Shivasharan S Date: Thu Oct 19 02:48:49 2017 -0700 scsi: megaraid_sas: Add support for Crusader controllers Add support for PCI VID/DID 0x1000/0x0015 based MegaRAID controllers. Since the DID 0x0015 conflicts with DELL PERC5 controllers, add vendor ID based check specific for DELL PERC5. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 1 + drivers/scsi/megaraid/megaraid_sas_base.c | 51 ++++++++++++++++++------------- 2 files changed, 30 insertions(+), 22 deletions(-) commit c365178f3147f38d26c15bdf43a363bacb5406ec Author: Shivasharan S Date: Thu Oct 19 02:48:48 2017 -0700 scsi: megaraid_sas: use adapter_type for all gen controllers No functional change. Refactor adapter_type to set for all generation controllers, not just for fusion controllers. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Signed-off-by: Martin K. Petersen drivers/scsi/megaraid/megaraid_sas.h | 8 +++ drivers/scsi/megaraid/megaraid_sas_base.c | 88 ++++++++++++++++++----------- drivers/scsi/megaraid/megaraid_sas_fp.c | 10 ++-- drivers/scsi/megaraid/megaraid_sas_fusion.c | 18 +++--- drivers/scsi/megaraid/megaraid_sas_fusion.h | 7 --- 5 files changed, 76 insertions(+), 55 deletions(-) commit c9edcb2e17bb5532ac09cc627e133c3d94b69e53 Author: Don Brace Date: Fri Oct 20 16:52:17 2017 -0500 scsi: hpsa: bump driver version Reviewed-by: Gerry Morong Reviewed-by: Scott Benesh Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a7c3bb8951278aae25b3b53eb5f97cca4147cf3 Author: Don Brace Date: Fri Oct 20 16:52:10 2017 -0500 scsi: hpsa: add enclosure logical identifier Add support for enclosure logical identifier 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 | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 2 deletions(-) commit 0ff365f51a4290a63f1044c599df98196223d4bc Author: Don Brace Date: Fri Oct 20 16:52:04 2017 -0500 scsi: hpsa: correct logical volume removal Suggested-by: Martin Wilck 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 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 9211a07fc1b25d9d437c5ccd39cb1596eb9adb06 Author: Don Brace Date: Fri Oct 20 16:51:57 2017 -0500 scsi: hpsa: reduce warning messages on device removal 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2c5fc3639eb4dd21f91770b16d9df8466f42f0b2 Author: Don Brace Date: Fri Oct 20 16:51:51 2017 -0500 scsi: hpsa: update queue depth for externals Preserve external device queue depth during a scan operation. 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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b2582a65755b342dcc26b1c9398b6a1e6bdfc9a2 Author: Don Brace Date: Fri Oct 20 16:51:45 2017 -0500 scsi: hpsa: correct smart path enabled Correct re-enabling ioaccel after: 1) RAID transformations and 2) multi-path fail-overs. 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 | 189 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 151 insertions(+), 38 deletions(-) commit 3026ff9b0339a64d6bdef8858636174d453dce54 Author: Don Brace Date: Fri Oct 20 16:51:38 2017 -0500 scsi: hpsa: change timeout for internal cmds There are times when the DEFAULT_TIMEOUT (30 seconds) is not enough. 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 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 4e1881840933587f42e3ad3788f2c392d19827a6 Author: Bader Ali Saleh Date: Fri Oct 20 16:51:32 2017 -0500 scsi: hpsa: update discovery polling Correct a corner case where newly created volumes are not detected automatically on an external RAID controller that has no configured volumes during initial device discovery. The fix is to set the discovery_polling flag when an external RAID controller is detected. This causes a device rescan every 20-30 seconds, so that newly created volumes will be detected automatically. 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 | 39 ++++++++++++++++++++++++++------------- drivers/scsi/hpsa_cmd.h | 2 ++ 2 files changed, 28 insertions(+), 13 deletions(-) commit b9b08cade0a6a523c185c5e371f05df63c623c34 Author: Don Brace Date: Fri Oct 20 16:51:26 2017 -0500 scsi: hpsa: add controller checkpoint Tell hpsa controller to generate a checkpoint for rare lockup conditions. 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 | 4 ++++ drivers/scsi/hpsa_cmd.h | 1 + 2 files changed, 5 insertions(+) commit 421bf80cc2e421ea8efd7bc47f595169d67ae92f Author: Scott Teel Date: Fri Oct 20 16:51:20 2017 -0500 scsi: hpsa: clear tmpdevice in scan thread clean up stale information. 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, 2 insertions(+) commit 55ca38b4255bb336c2d35990bdb2b368e19b435a Author: Martin Wilck Date: Fri Oct 20 16:51:14 2017 -0500 scsi: hpsa: cleanup sas_phy structures in sysfs when unloading I am resubmitting this patch on behalf of Martin Wilck with his permission. The original patch can be found here: https://www.spinics.net/lists/linux-scsi/msg102083.html This patch did not help until Hannes's commit 9441284fbc39 ("scsi-fixup-kernel-warning-during-rmmod") was applied to the kernel. -------------------------------------- Original patch description from Martin: -------------------------------------- When the hpsa module is unloaded using rmmod, dangling symlinks remain under /sys/class/sas_phy. Fix this by calling sas_phy_delete() rather than sas_phy_free (which, according to comments, should not be called for PHYs that have been set up successfully, anyway). Tested-by: Don Brace Reviewed-by: Don Brace Signed-off-by: Martin Wilck Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfb2e6f46b3074eb85203d8f0888b71ec1c2e37a Author: Martin Wilck Date: Fri Oct 20 16:51:08 2017 -0500 scsi: hpsa: destroy sas transport properties before scsi_host This patch cleans up a lot of warnings when unloading the driver. A current example of the stack trace starts with: [ 142.570715] sysfs group 'power' not found for kobject 'port-5:0' There can be hundreds of these messages during a driver unload. I am resubmitting this patch on behalf of Martin Wilck with his permission. His original patch can be found here: https://www.spinics.net/lists/linux-scsi/msg102085.html This patch did not help until Hannes's commit 9441284fbc39 ("scsi-fixup-kernel-warning-during-rmmod") was applied to the kernel. --------------------------- Original patch description: --------------------------- Unloading the hpsa driver causes warnings [ 1063.793652] WARNING: CPU: 1 PID: 4850 at ../fs/sysfs/group.c:237 device_del+0x54/0x240() [ 1063.793659] sysfs group ffffffff81cf21a0 not found for kobject 'port-2:0' with two different stacks: 1) [ 1063.793774] [] device_del+0x54/0x240 [ 1063.793780] [] transport_remove_classdev+0x4a/0x60 [ 1063.793784] [] attribute_container_device_trigger+0xa6/0xb0 [ 1063.793802] [] sas_port_delete+0x126/0x160 [scsi_transport_sas] [ 1063.793819] [] hpsa_free_sas_port+0x3c/0x70 [hpsa] 2) [ 1063.797103] [] device_del+0x54/0x240 [ 1063.797118] [] sas_port_delete+0x12e/0x160 [scsi_transport_sas] [ 1063.797134] [] hpsa_free_sas_port+0x3c/0x70 [hpsa] This is caused by the fact that host device hostX is deleted before the SAS transport devices hostX/port-a:b. This patch fixes this by reverting the order of device deletions. Tested-by: Don Brace Reviewed-by: Don Brace Signed-off-by: Martin Wilck Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/hpsa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 20e5f8bfb153bdd43b5be194658f8ad814470a5d Author: Takashi Iwai Date: Wed Oct 25 10:00:43 2017 +0200 ALSA: sb: Minor optimization / fix of timer usage in sb8_midi.c Currently the SB8 MIDI code sets up the timer object at each time before scheduling it at trigger callback, but basically this is superfluous once after set up. Also, the code misses the del_timer_sync() call that may leave a race condition for use-after-free. This patch addresses these issues, moving timer_setup() to snd_sb8dsp_midi(), and adding the del_timer_sync() call at snd_sb8dsp_midi_output_trigger() to make sure. Signed-off-by: Takashi Iwai sound/isa/sb/sb8_midi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4f928246f0e8f9bda88f41131ec447a1b8193dbc Author: Kees Cook Date: Tue Oct 24 08:34:58 2017 -0700 ALSA: sb: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. [Re-use the existing chip->midi_substream_output instead of assigning a new field to struct snd_sb -- tiwai] Signed-off-by: Kees Cook Signed-off-by: Takashi Iwai sound/isa/sb/emu8000_pcm.c | 6 +++--- sound/isa/sb/sb8_midi.c | 11 +++++------ 2 files changed, 8 insertions(+), 9 deletions(-) commit c929d84735bff4349bde809a5a8eb1996bf371f6 Author: kbuild test robot Date: Wed Oct 25 00:33:18 2017 +0800 usb: xhci-mtk: fix ptr_ret.cocci warnings drivers/usb/host/xhci-mtk.c:256:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: b6bb72cf0df1 ("usb: xhci-mtk: add optional mcu and dma bus clocks") Signed-off-by: Fengguang Wu Acked-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 62884cd386b876638720ef88374b31a84ca7ee5f Author: Keith Packard Date: Thu Mar 16 17:56:28 2017 -0700 drm: Add four ioctls for managing drm mode object leases [v7] drm_mode_create_lease Creates a lease for a list of drm mode objects, returning an fd for the new drm_master and a 64-bit identifier for the lessee drm_mode_list_lesees List the identifiers of the lessees for a master file drm_mode_get_lease List the leased objects for a master file drm_mode_revoke_lease Erase the set of objects managed by a lease. This should suffice to at least create and query leases. Changes for v2 as suggested by Daniel Vetter : * query ioctls only query the master associated with the provided file. * 'mask_lease' value has been removed * change ioctl has been removed. Changes for v3 suggested in part by Dave Airlie * Add revoke ioctl. Changes for v4 suggested by Dave Airlie * Expand on the comment about the magic use of &drm_lease_idr_object * Pad lease ioctl structures to align on 64-bit boundaries Changes for v5 suggested by Dave Airlie * Check for non-negative object_id in create_lease to avoid debug output from the kernel. Changes for v6 provided by Dave Airlie * For non-universal planes add primary/cursor planes to lease If we aren't exposing universal planes to this userspace client, and it requests a lease on a crtc, we should implicitly export the primary and cursor planes for the crtc. If the lessee doesn't request universal planes, it will just see the crtc, but if it does request them it will then see the plane objects as well. This also moves the object look ups earlier as a side effect, so we'd exit the ioctl quicker for non-existant objects. * Restrict leases to crtc/connector/planes. This only allows leasing for objects we wish to allow. Changes for v7 provided by Dave Airlie * Check pad args are 0 * Check create flags and object count are valid. * Check return from fd allocation * Refactor lease idr setup and add some simple validation * Use idr_mutex uniformly (Keith) Signed-off-by: Keith Packard Signed-off-by: Dave Airlie drivers/gpu/drm/drm_ioctl.c | 4 + drivers/gpu/drm/drm_lease.c | 412 ++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_mode_object.c | 5 +- include/drm/drm_lease.h | 12 ++ include/drm/drm_mode_object.h | 2 + include/uapi/drm/drm.h | 5 + include/uapi/drm/drm_mode.h | 66 ++++++ 7 files changed, 504 insertions(+), 2 deletions(-) commit 7de440db20d4531e4b740bf17b56afc426c54377 Author: Keith Packard Date: Sun Apr 9 22:35:34 2017 -0600 drm: Check mode object lease status in all master ioctl paths [v4] Attempts to modify un-leased objects are rejected with an error. Information returned about unleased objects is modified to make them appear unusable and/or disconnected. Changes for v2 as suggested by Daniel Vetter : * With the change in the __drm_mode_object_find API to pass the file_priv along, we can now centralize most of the lease-based access checks in that function. * A few places skip that API and require in-line checks. Changes for v3 provided by Dave Airlie * remove support for leasing encoders. * add support for leasing planes. Changes for v4 * Only call drm_lease_held if DRIVER_MODESET. Signed-off-by: Keith Packard Signed-off-by: Dave Airlie drivers/gpu/drm/drm_auth.c | 2 +- drivers/gpu/drm/drm_encoder.c | 5 +++-- drivers/gpu/drm/drm_mode_config.c | 22 +++++++++++++--------- drivers/gpu/drm/drm_mode_object.c | 22 ++++++++++++++++++++++ drivers/gpu/drm/drm_plane.c | 18 +++++++++++------- drivers/gpu/drm/drm_vblank.c | 22 ++++++++++++++++++++-- include/drm/drm_lease.h | 2 -- 7 files changed, 70 insertions(+), 23 deletions(-) commit 2ed077e467eedb033032bc4b6e349365517662d6 Author: Keith Packard Date: Tue Mar 14 22:26:41 2017 -0700 drm: Add drm_object lease infrastructure [v5] This provides new data structures to hold "lease" information about drm mode setting objects, and provides for creating new drm_masters which have access to a subset of the available drm resources. An 'owner' is a drm_master which is not leasing the objects from another drm_master, and hence 'owns' them. A 'lessee' is a drm_master which is leasing objects from some other drm_master. Each lessee holds the set of objects which it is leasing from the lessor. A 'lessor' is a drm_master which is leasing objects to another drm_master. This is the same as the owner in the current code. The set of objects any drm_master 'controls' is limited to the set of objects it leases (for lessees) or all objects (for owners). Objects not controlled by a drm_master cannot be modified through the various state manipulating ioctls, and any state reported back to user space will be edited to make them appear idle and/or unusable. For instance, connectors always report 'disconnected', while encoders report no possible crtcs or clones. The full list of lessees leasing objects from an owner (either directly, or indirectly through another lessee), can be searched from an idr in the drm_master of the owner. Changes for v2 as suggested by Daniel Vetter : * Sub-leasing has been disabled. * BUG_ON for lock checking replaced with lockdep_assert_held * 'change' ioctl has been removed. * Leased objects can always be controlled by the lessor; the 'mask_lease' flag has been removed * Checking for leased status has been simplified, replacing the drm_lease_check function with drm_lease_held. Changes in v3, some suggested by Dave Airlie * Add revocation. This allows leases to be effectively revoked by removing all of the objects they have access to. The lease itself hangs around as it's hanging off a file. * Free the leases IDR when the master is destroyed * _drm_lease_held should look at lessees, not lessor * Allow non-master files to check for lease status Changes in v4, suggested by Dave Airlie * Formatting and whitespace changes Changes in v5 (airlied) * check DRIVER_MODESET before lease destroy call * check DRIVER_MODESET for lease revoke (Chris) * Use idr_mutex uniformly for all lease elements of struct drm_master. (Keith) Signed-off-by: Keith Packard drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_auth.c | 30 +++- drivers/gpu/drm/drm_lease.c | 355 ++++++++++++++++++++++++++++++++++++++++++ include/drm/drm_auth.h | 21 +++ include/drm/drm_lease.h | 36 +++++ include/drm/drm_mode_object.h | 1 + 6 files changed, 443 insertions(+), 2 deletions(-) commit e7646f84ad4f654e1ee503b03a12e520d947884f Author: Keith Packard Date: Fri Mar 17 15:33:22 2017 -0700 drm: Add new LEASE debug level Separate out lease debugging from the core. Signed-off-by: Keith Packard Signed-off-by: Dave Airlie drivers/gpu/drm/drm_drv.c | 3 ++- include/drm/drmP.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 56546e3b9f2284a750c9ca24617544ff5cf56af4 Author: Kees Cook Date: Tue Oct 24 01:47:00 2017 -0700 drivers/net: wan/sbni: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: David Howells Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/wan/sbni.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit fd71e13bc7c6ac2d34f08380707662cf07f8234c Author: Kees Cook Date: Tue Oct 24 01:46:52 2017 -0700 drivers/net: sis: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Francois Romieu Cc: Daniele Venzano Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Daniele Venzano Signed-off-by: David S. Miller drivers/net/ethernet/sis/sis190.c | 10 ++++------ drivers/net/ethernet/sis/sis900.c | 10 +++++----- 2 files changed, 9 insertions(+), 11 deletions(-) commit 5c658e19a7b53b6d712c3fb08bb88649d362db9f Author: Kees Cook Date: Tue Oct 24 01:46:45 2017 -0700 net: atm/mpc: Stop using open-coded timer .data field In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using an explicit static variable to hold additional expiration details. Cc: "David S. Miller" Cc: Bhumika Goyal Cc: Andrew Morton Cc: Alexey Dobriyan Cc: "Reshetova, Elena" Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/atm/mpc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 17bfd8c89fb62219fa27a10b9475daea74d20a15 Author: Kees Cook Date: Tue Oct 24 01:46:26 2017 -0700 net: af_packet: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Eric Dumazet Cc: Willem de Bruijn Cc: Mike Maloney Cc: Jarno Rajahalme Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/packet/af_packet.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) commit dda436b7accffd5313e8fd8338f724376c6fcda2 Author: Kees Cook Date: Tue Oct 24 01:46:16 2017 -0700 net: hsr: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Arvid Brodin Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/hsr/hsr_device.c | 9 ++++----- net/hsr/hsr_framereg.c | 6 ++---- net/hsr/hsr_framereg.h | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) commit 839a6094140ade97ccc548fcd63179506c5d7fe4 Author: Kees Cook Date: Tue Oct 24 01:46:09 2017 -0700 net: dccp: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Adds a pointer back to the sock. Cc: Gerrit Renker Cc: "David S. Miller" Cc: Soheil Hassas Yeganeh Cc: Hannes Frederic Sowa Cc: Eric Dumazet Cc: dccp@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/dccp/ccids/ccid2.c | 10 +++++----- net/dccp/ccids/ccid2.h | 1 + net/dccp/ccids/ccid3.c | 11 ++++++----- net/dccp/ccids/ccid3.h | 1 + net/dccp/timer.c | 12 +++++++----- 5 files changed, 20 insertions(+), 15 deletions(-) commit 7aa1402e2eb4988b09bf1671e9f968e6e5689b1d Author: Kees Cook Date: Tue Oct 24 01:45:59 2017 -0700 net: ethernet/sfc: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Solarflare linux maintainers Cc: Edward Cree Cc: Bert Kenward Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jiri Pirko Cc: Jamal Hadi Salim Cc: Ingo Molnar Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/efx.c | 6 ++---- drivers/net/ethernet/sfc/efx.h | 2 +- drivers/net/ethernet/sfc/falcon/efx.c | 6 ++---- drivers/net/ethernet/sfc/falcon/efx.h | 2 +- drivers/net/ethernet/sfc/falcon/falcon.c | 11 ++++++----- drivers/net/ethernet/sfc/falcon/nic.h | 2 ++ drivers/net/ethernet/sfc/falcon/rx.c | 4 ++-- drivers/net/ethernet/sfc/mcdi.c | 9 ++++----- drivers/net/ethernet/sfc/rx.c | 4 ++-- 9 files changed, 22 insertions(+), 24 deletions(-) commit fc8bcaa05160528d56432e4612f522e3ceafc513 Author: Kees Cook Date: Tue Oct 24 01:45:48 2017 -0700 net: LLC: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Eric Dumazet Cc: Hans Liljestrand Cc: "Paul E. McKenney" Cc: "Reshetova, Elena" Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller include/net/llc_c_ac.h | 8 ++++---- net/llc/llc_c_ac.c | 27 +++++++++++++++++---------- net/llc/llc_conn.c | 12 ++++-------- 3 files changed, 25 insertions(+), 22 deletions(-) commit 8dbd05ff5c4e50a3e5b1ed4089c2d0b4210379c6 Author: Kees Cook Date: Tue Oct 24 01:45:39 2017 -0700 net: ax25: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Joerg Reuter Cc: Ralf Baechle Cc: "David S. Miller" Cc: linux-hams@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/ax25/af_ax25.c | 7 +++---- net/ax25/ax25_ds_timer.c | 9 ++++----- net/ax25/ax25_timer.c | 41 ++++++++++++++++++++--------------------- 3 files changed, 27 insertions(+), 30 deletions(-) commit 9c3b57518363577d4e2ea1964ef4fa03e100beaa Author: Kees Cook Date: Tue Oct 24 01:45:31 2017 -0700 net: sctp: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Vlad Yasevich Cc: Neil Horman Cc: "David S. Miller" Cc: linux-sctp@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller include/net/sctp/sm.h | 10 +++--- net/sctp/associola.c | 3 +- net/sctp/protocol.c | 7 ++-- net/sctp/sm_sideeffect.c | 85 +++++++++++++++++++++++++++++------------------- net/sctp/transport.c | 13 +++----- 5 files changed, 66 insertions(+), 52 deletions(-) commit a4cdd9ff1fa4e3a558e2a3b7e6fac3f3105d47c3 Merge: d458821 ef5201c Author: David S. Miller Date: Wed Oct 25 10:54:40 2017 +0900 Merge branch 'net-remove-rtmsg_ifinfo-used-in-bridge-and-bonding' Xin Long says: ==================== net: remove rtmsg_ifinfo used in bridge and bonding It's better to send notifications to userspace by the events in rtnetlink_event, instead of calling rtmsg_ifinfo directly. This patcheset is to remove rtmsg_ifinfo called in bonding and bridge, the notifications can be handled by NETDEV_CHANGEUPPER and NETDEV_CHANGELOWERSTATE events in rtnetlink_event. It could also fix some redundant notifications from bonding and bridge. v1->v2: - post to net-next.git instead of net.git, for it's more like an improvement for bonding v2->v3: - add patch 1/4 to remove rtmsg_ifinfo called in add_del_if ==================== Signed-off-by: David S. Miller commit ef5201c83d1400570a3b6f004ad7a23d71934411 Author: Xin Long Date: Tue Oct 24 13:54:20 2017 +0800 bonding: remove rtmsg_ifinfo called after bond_lower_state_changed After the patch 'rtnetlink: bring NETDEV_CHANGELOWERSTATE event process back to rtnetlink_event', bond_lower_state_changed would generate NETDEV_CHANGEUPPER event which would send a notification to userspace in rtnetlink_event. There's no need to call rtmsg_ifinfo to send the notification any more. So this patch is to remove it from these places after bond_lower_state_changed. Besides, after this, rtmsg_ifinfo is not needed to be exported. Signed-off-by: Xin Long Signed-off-by: David S. Miller include/net/bonding.h | 4 ---- net/core/rtnetlink.c | 1 - 2 files changed, 5 deletions(-) commit eeda3fb9e132bd5f9592c4c664ba944cf1ac5b9f Author: Xin Long Date: Tue Oct 24 13:54:19 2017 +0800 rtnetlink: bring NETDEV_CHANGELOWERSTATE event process back to rtnetlink_event This patch is to bring NETDEV_CHANGELOWERSTATE event process back to rtnetlink_event so that bonding could use it instead of calling rtmsg_ifinfo to send a notification to userspace after netdev lower state is changed in the later patch. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/core/rtnetlink.c | 1 + 1 file changed, 1 insertion(+) commit 4597efe312567591e253248246ef58d77df471c6 Author: Xin Long Date: Tue Oct 24 13:54:18 2017 +0800 bonding: remove rtmsg_ifinfo called in bond_master_upper_dev_link Since commit 42e52bf9e3ae ("net: add netnotifier event for upper device change"), netdev_master_upper_dev_link has generated NETDEV_CHANGEUPPER event which would send a notification to userspace in rtnetlink_event. There's no need to call rtmsg_ifinfo to send the notification any more. So this patch is to remove it from bond_master_upper_dev_link as well as bond_upper_dev_unlink to avoid the redundant notifications. Signed-off-by: Xin Long Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit fbb85b3c0112e6aec82863358bdb1b25c7edaec1 Author: Xin Long Date: Tue Oct 24 13:54:17 2017 +0800 bridge: remove rtmsg_ifinfo called in add_del_if Since commit dc709f375743 ("rtnetlink: bring NETDEV_CHANGEUPPER event process back in rtnetlink_event"), rtnetlink_event would process the NETDEV_CHANGEUPPER event and send a notification to userspace. In add_del_if, it would generate NETDEV_CHANGEUPPER event by whether netdev_master_upper_dev_link or netdev_upper_dev_unlink. There's no need to call rtmsg_ifinfo to send the notification any more. So this patch is to remove it from add_del_if also to avoid redundant notifications. Signed-off-by: Xin Long Signed-off-by: David S. Miller net/bridge/br_ioctl.c | 3 --- 1 file changed, 3 deletions(-) commit d4588211c66256633d6105eea8161e8632e4f2e5 Merge: 908d140 a678be5 Author: David S. Miller Date: Wed Oct 25 10:47:47 2017 +0900 Merge branch 'bpf-permit-multiple-bpf-attachments-for-a-single-perf-tracepoint-event' Yonghong Song says: ==================== bpf: permit multiple bpf attachments for a single perf tracepoint event This patch set adds support to permit multiple bpf prog attachments for a single perf tracepoint event. Patch 1 does some cleanup such that perf_event_{set|free}_bpf_handler is called under the same condition. Patch 2 has the core implementation, and Patch 3 adds a test case. Changelogs: v2 -> v3: . fix compilation error. v1 -> v2: . fix a potential deadlock issue discovered by Daniel. . fix some coding style issues. ==================== Signed-off-by: David S. Miller commit a678be5cc747bafc8c66f2fe00a103422587a5eb Author: Yonghong Song Date: Mon Oct 23 23:53:09 2017 -0700 bpf: add a test case to test single tp multiple bpf attachment The bpf sample program syscall_tp is modified to show attachment of more than bpf programs for a particular kernel tracepoint. Signed-off-by: Yonghong Song Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller samples/bpf/syscall_tp_user.c | 66 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 13 deletions(-) commit e87c6bc3852b981e71c757be20771546ce9f76f3 Author: Yonghong Song Date: Mon Oct 23 23:53:08 2017 -0700 bpf: permit multiple bpf attachments for a single perf event This patch enables multiple bpf attachments for a kprobe/uprobe/tracepoint single trace event. Each trace_event keeps a list of attached perf events. When an event happens, all attached bpf programs will be executed based on the order of attachment. A global bpf_event_mutex lock is introduced to protect prog_array attaching and detaching. An alternative will be introduce a mutex lock in every trace_event_call structure, but it takes a lot of extra memory. So a global bpf_event_mutex lock is a good compromise. The bpf prog detachment involves allocation of memory. If the allocation fails, a dummy do-nothing program will replace to-be-detached program in-place. Signed-off-by: Yonghong Song Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/linux/bpf.h | 30 +++++++++++++--- include/linux/trace_events.h | 43 ++++++++++++++++++++--- include/trace/perf.h | 6 ++-- kernel/bpf/core.c | 81 ++++++++++++++++++++++++++++++++++++++++++ kernel/events/core.c | 26 +++++--------- kernel/trace/bpf_trace.c | 82 ++++++++++++++++++++++++++++++++++++++++--- kernel/trace/trace_kprobe.c | 6 ++-- kernel/trace/trace_syscalls.c | 34 ++++++++++-------- kernel/trace/trace_uprobe.c | 3 +- 9 files changed, 255 insertions(+), 56 deletions(-) commit 0b4c6841fee03e096b735074a0c4aab3a8e92986 Author: Yonghong Song Date: Mon Oct 23 23:53:07 2017 -0700 bpf: use the same condition in perf event set/free bpf handler This is a cleanup such that doing the same check in perf_event_free_bpf_prog as we already do in perf_event_set_bpf_prog step. Signed-off-by: Yonghong Song Acked-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller kernel/events/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 908d140a87a794bf89717ceae54aba5ce86c52e4 Author: Shmulik Ladkani Date: Sat Oct 21 00:25:15 2017 +0300 ip6_tunnel: Allow rcv/xmit even if remote address is a local address Currently, ip6_tnl_xmit_ctl drops tunneled packets if the remote address (outer v6 destination) is one of host's locally configured addresses. Same applies to ip6_tnl_rcv_ctl: it drops packets if the remote address (outer v6 source) is a local address. This prevents using ipxip6 (and ip6_gre) tunnels whose local/remote endpoints are on same host; OTOH v4 tunnels (ipip or gre) allow such configurations. An example where this proves useful is a system where entities are identified by their unique v6 addresses, and use tunnels to encapsulate traffic between them. The limitation prevents placing several entities on same host. Introduce IP6_TNL_F_ALLOW_LOCAL_REMOTE which allows to bypass this restriction. Signed-off-by: Shmulik Ladkani Signed-off-by: David S. Miller include/uapi/linux/ip6_tunnel.h | 2 ++ net/ipv6/ip6_tunnel.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit 351499a172c0c5fc52d65ee2c62b344f369ea02a Author: Dmitry Monakhov Date: Tue Oct 24 18:44:57 2017 -0600 block: Invalidate cache on discard v2 It is reasonable drop page cache on discard, otherwise that pages may be written by writeback second later, so thin provision devices will not be happy. This seems to be a security leak in case of secure discard case. Also add check for queue_discard flag on early stage. Signed-off-by: Dmitry Monakhov Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/ioctl.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit b8cc0012917d9a1ab1497a38c8675ecc4d9d94f2 Author: Bin Meng Date: Tue Oct 24 00:40:53 2017 -0700 spi-nor: intel-spi: Remove EXPERT dependency The idea to have the intel-spi driver dependent on EXPERT was exactly because we did not want ordinary users playing with the device and inadvertently overwrite their BIOSes (if it is not protected). This seems to be superfluous hence remove it. Suggested-by: Arnd Bergmann Signed-off-by: Bin Meng Acked-by: Mika Westerberg Acked-by: Arnd Bergmann Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2ea68b75411b137f5782afa1052a5f1d99ef66f1 Author: Guochun Mao Date: Thu Sep 21 20:45:06 2017 +0800 mtd: mtk-nor: add suspend/resume support Abstract functions of clock setting, to avoid duplicated code, these functions been used in new feature. Implement suspend/resume functions. Signed-off-by: Guochun Mao Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/mtk-quadspi.c | 70 ++++++++++++++++++++++++++++++++------- 1 file changed, 58 insertions(+), 12 deletions(-) commit 3c535c94a0ba94e9852de3aae7b6c62413eb2af7 Author: Guochun Mao Date: Thu Sep 21 20:45:05 2017 +0800 dt-bindings: mtd: add new compatible strings and improve description Add "mediatak,mt2712-nor" and "mediatek,mt7622-nor" for nor flash node's compatible strings. Explicate the fallback compatible. Acked-by: Rob Herring Signed-off-by: Guochun Mao Signed-off-by: Cyrille Pitchen Documentation/devicetree/bindings/mtd/mtk-quadspi.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit bbd11bddb398c4278c06892bd6498da34c47a00a Author: Jianguo Sun Date: Mon Oct 23 19:17:50 2017 +0800 PCI: hisi: Add HiSilicon STB SoC PCIe controller driver Add a HiSilicon STB SoC PCIe controller driver. This controller is based on the DesignWare PCIe core. Signed-off-by: Jianguo Sun Signed-off-by: Shawn Guo Signed-off-by: Bjorn Helgaas .../bindings/pci/hisilicon-histb-pcie.txt | 68 +++ MAINTAINERS | 8 + drivers/pci/dwc/Kconfig | 10 + drivers/pci/dwc/Makefile | 1 + drivers/pci/dwc/pcie-histb.c | 470 +++++++++++++++++++++ 5 files changed, 557 insertions(+) commit 276b738deb5bf856b9f6049fcd92a967f52643d7 Author: Christian König Date: Tue Oct 24 14:40:20 2017 -0500 PCI: Add resizable BAR infrastructure Add resizable BAR infrastructure, including defines and helper functions to read the possible sizes of a BAR and update its size. See PCIe r3.1, sec 7.22. Link: https://pcisig.com/sites/default/files/specification_documents/ECN_Resizable-BAR_24Apr2008.pdf Signed-off-by: Christian König [bhelgaas: rename to functions with "rebar" (to match #defines), drop shift #defines, drop "_MASK" suffixes, fix typos, fix kerneldoc] Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko drivers/pci/pci.c | 101 ++++++++++++++++++++++++++++++++++++++++++ drivers/pci/pci.h | 8 ++++ include/uapi/linux/pci_regs.h | 8 +++- 3 files changed, 115 insertions(+), 2 deletions(-) commit cb21bc9469c4c8a4d38f52d779ccc11e4329f016 Author: Christian König Date: Wed Oct 18 15:58:17 2017 +0200 PCI: Add PCI resource type mask #define Add a #define for the PCI resource type mask. We use this mask multiple times in the bus setup. Signed-off-by: Christian König [bhelgaas: move to setup-bus.c] Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko drivers/pci/setup-bus.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 57e69e2f06e8fe4949c54e438c9faae0731e92f8 Author: Kees Cook Date: Tue Oct 24 08:35:09 2017 -0700 ALSA: wavefront: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Takashi Iwai include/sound/snd_wavefront.h | 1 + sound/isa/wavefront/wavefront_midi.c | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) commit 6bdd079610d3a5de0f4eb78d8015bd530c291cd7 Author: Elena Reshetova Date: Fri Oct 20 10:37:37 2017 +0300 dm cache: convert dm_cache_metadata.ref_count from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable dm_cache_metadata.ref_count is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: Mike Snitzer drivers/md/dm-cache-metadata.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit b0b4d7c6752a45c545bcdce647ccfa8fb27f0a06 Author: Elena Reshetova Date: Fri Oct 20 10:37:39 2017 +0300 dm: convert table_device.count from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable table_device.count is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: Mike Snitzer drivers/md/dm.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 2a0b4682e09d76466f7b8f5e347ae2ff02f033af Author: Elena Reshetova Date: Fri Oct 20 10:37:38 2017 +0300 dm: convert dm_dev_internal.count from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable dm_dev_internal.count is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: Mike Snitzer drivers/md/dm-table.c | 6 +++--- drivers/md/dm.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) commit 08352b200b203f8f9fa8a1c914acb58c7b10f907 Author: Kees Cook Date: Tue Oct 24 08:34:40 2017 -0700 ALSA: emux: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Takashi Iwai sound/synth/emux/emux.c | 2 +- sound/synth/emux/emux_synth.c | 4 ++-- sound/synth/emux/emux_voice.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit bc47ba90b01afe468cdd586b0dbe59b64862e2b7 Author: Kees Cook Date: Tue Oct 24 08:34:29 2017 -0700 ALSA: drivers: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Takashi Iwai sound/drivers/aloop.c | 7 +++---- sound/drivers/dummy.c | 7 +++---- sound/drivers/mpu401/mpu401_uart.c | 7 +++---- sound/drivers/mtpav.c | 7 +++---- sound/drivers/opl3/opl3_midi.c | 4 ++-- sound/drivers/opl3/opl3_seq.c | 2 +- sound/drivers/opl3/opl3_voice.h | 2 +- sound/drivers/serial-u16550.c | 7 +++---- 8 files changed, 19 insertions(+), 24 deletions(-) commit 25309004c0e761986c9dc23526a03928a85188c0 Author: Marcin Niestroj Date: Tue Oct 24 11:06:41 2017 -0700 Input: goodix - support gt1151 touchpanel Support was added based on Goodix GitHub repo [1]. There are two major differences between gt1151 and currently supported devices (gt9x): * CONFIG_DATA register has 0x8050 address instead of 0x8047, * config data checksum has 16-bit width instead of 8-bit. Also update goodix_i2c_test() function, so it reads ID register (which has the same address for all devices) instead of CONFIG_DATA (because its address is known only after reading ID of the device). [1] https://github.com/goodix/gt1x_driver_generic Signed-off-by: Marcin Niestroj Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../bindings/input/touchscreen/goodix.txt | 3 +- drivers/input/touchscreen/goodix.c | 125 ++++++++++++++++----- 2 files changed, 100 insertions(+), 28 deletions(-) commit 6a3eafe490947cb7cd4e6dce1112375f9d9cadfe Author: Dmitry Torokhov Date: Mon Oct 23 16:40:42 2017 -0700 Input: ps2-gpio - actually abort probe when connected to sleeping GPIOs We've been missing a goto to the unwind path... Acked-by: Danilo Krummrich Signed-off-by: Dmitry Torokhov drivers/input/serio/ps2-gpio.c | 1 + 1 file changed, 1 insertion(+) commit ded489d43f1b210bf3a75f65bfa742fbce0e8bcc Author: Kees Cook Date: Tue Oct 24 09:44:15 2017 -0700 Input: hil_mlc - convert to using timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Dmitry Torokhov drivers/input/serio/hil_mlc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a4f60b5047b155029edbef0ef0006bb8c8c83ba3 Author: Kees Cook Date: Tue Oct 24 09:43:31 2017 -0700 Input: hp_sdc - convert to using timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Dmitry Torokhov drivers/input/serio/hp_sdc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ee03e3f00566201ea91d90430dc43bd08c7e9eef Author: Kees Cook Date: Tue Oct 24 09:44:48 2017 -0700 Input: touchsceen - convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ad7879.c | 6 +++--- drivers/input/touchscreen/atmel-wm97xx.c | 10 ++++++---- drivers/input/touchscreen/cyttsp4_core.c | 7 +++---- drivers/input/touchscreen/tsc200x-core.c | 6 +++--- drivers/input/touchscreen/w90p910_ts.c | 7 +++---- 5 files changed, 18 insertions(+), 18 deletions(-) commit 4ea40278eb463aaa95889b00be78f8a56bb61131 Author: Kees Cook Date: Tue Oct 24 09:40:57 2017 -0700 Input: keyboard - convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Dmitry Torokhov drivers/input/keyboard/bf54x-keys.c | 7 +++---- drivers/input/keyboard/imx_keypad.c | 8 ++++---- drivers/input/keyboard/locomokbd.c | 7 +++---- drivers/input/keyboard/omap-keypad.c | 6 +++--- drivers/input/keyboard/snvs_pwrkey.c | 7 +++---- drivers/input/keyboard/tegra-kbc.c | 6 +++--- 6 files changed, 19 insertions(+), 22 deletions(-) commit e8daf27c2fea38e16a791780952aa5dff1c409fe Author: Eric Sesterhenn Date: Mon Oct 9 07:01:14 2017 +0200 netfilter: nf_ct_h323: Out Of Bound Read in Netfilter Conntrack Add missing counter decrement to prevent out of bounds memory read. Signed-off-by: Eric Sesterhenn Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_h323_asn1.c | 1 + 1 file changed, 1 insertion(+) commit ce49480dba8666cba0106e8e31a942c9ce4c438a Author: Florian Westphal Date: Sun Oct 15 11:00:34 2017 +0200 netfilter: xt_connlimit: don't store address in the conn nodes Only stored, never read. This is a leftover from commit 7d08487777c8 ("netfilter: connlimit: use rbtree for per-host conntrack obj storage"), which added the rbtree node struct that stores the address instead. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/xt_connlimit.c | 3 --- 1 file changed, 3 deletions(-) commit 67704c2a05860edf8529c8271550148348737a8f Author: Harsha Sharma Date: Fri Oct 13 04:23:57 2017 +0530 netfilter: nf_conntrack_h323: Remove typedef struct Remove typedef from struct as linux-kernel coding style tends to avoid using typedefs. Done using following coccinelle semantic patch @r1@ type T; @@ typedef struct { ... } T; @script:python c1@ T2; T << r1.T; @@ if T[-2:] =="_t" or T[-2:] == "_T": coccinelle.T2 = T[:-2]; else: coccinelle.T2 = T; print T, coccinelle.T2 @r2@ type r1.T; identifier c1.T2; @@ -typedef struct + T2 { ... } -T ; @r3@ type r1.T; identifier c1.T2; @@ -T +struct T2 Signed-off-by: Harsha Sharma Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_h323_asn1.c | 80 +++++++++++++++++----------------- 1 file changed, 40 insertions(+), 40 deletions(-) commit 28efb0046512e8a13ed9f9bdf0d68d10bbfbe9cf Author: Florian Westphal Date: Thu Oct 12 09:38:30 2017 +0200 netfilter: conntrack: make l3proto trackers const previous patches removed all writes to them. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/ipv4/nf_conntrack_ipv4.h | 2 +- include/net/netfilter/ipv6/nf_conntrack_ipv6.h | 2 +- net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 2 +- net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit d13e7b2e65f6dfbe97b845d75741a970181b9fec Author: Florian Westphal Date: Thu Oct 12 01:13:51 2017 +0200 netfilter: x_tables: don't use seqlock when fetching old counters after previous commit xt_replace_table will wait until all cpus had even seqcount (i.e., no cpu is accessing old ruleset). Add a 'old' counter retrival version that doesn't synchronize counters. Its not needed, the old counters are not in use anymore at this point. This speeds up table replacement on busy systems with large tables (and many cores). Cc: Dan Williams Cc: Eric Dumazet Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/ipv4/netfilter/arp_tables.c | 22 ++++++++++++++++++++-- net/ipv4/netfilter/ip_tables.c | 23 +++++++++++++++++++++-- net/ipv6/netfilter/ip6_tables.c | 22 ++++++++++++++++++++-- 3 files changed, 61 insertions(+), 6 deletions(-) commit 80055dab5de0c8677bc148c4717ddfc753a9148e Author: Florian Westphal Date: Thu Oct 12 01:13:50 2017 +0200 netfilter: x_tables: make xt_replace_table wait until old rules are not used anymore xt_replace_table relies on table replacement counter retrieval (which uses xt_recseq to synchronize pcpu counters). This is fine, however with large rule set get_counters() can take a very long time -- it needs to synchronize all counters because it has to assume concurrent modifications can occur. Make xt_replace_table synchronize by itself by waiting until all cpus had an even seqcount. This allows a followup patch to copy the counters of the old ruleset without any synchonization after xt_replace_table has completed. Cc: Dan Williams Reviewed-by: Eric Dumazet Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/x_tables.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit eb6fad5a4a328b85d3faa8b301b522e3f316b49d Author: Florian Westphal Date: Wed Oct 11 10:47:42 2017 +0200 netfilter: conntrack: remove pf argument from l4 packet functions not needed/used anymore. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_l4proto.h | 1 - net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 1 - net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 1 - net/netfilter/nf_conntrack_core.c | 2 +- net/netfilter/nf_conntrack_proto_dccp.c | 1 - net/netfilter/nf_conntrack_proto_generic.c | 1 - net/netfilter/nf_conntrack_proto_gre.c | 1 - net/netfilter/nf_conntrack_proto_sctp.c | 1 - net/netfilter/nf_conntrack_proto_tcp.c | 6 ++---- net/netfilter/nf_conntrack_proto_udp.c | 1 - 10 files changed, 3 insertions(+), 13 deletions(-) commit 3d0b527bc9dc0e8c4428eb1a98d4cd27bd1114c7 Author: Florian Westphal Date: Wed Oct 11 10:47:41 2017 +0200 netfilter: conntrack: add and use nf_ct_l4proto_log_invalid We currently pass down the l4 protocol to the conntrack ->packet() function, but the only user of this is the debug info decision. Same information can be derived from struct nf_conn. Add a wrapper for the previous patch that extracs the information from nf_conn and passes it to nf_l4proto_log_invalid(). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_l4proto.h | 14 ++++++++------ net/netfilter/nf_conntrack_proto.c | 23 +++++++++++++++++++++++ net/netfilter/nf_conntrack_proto_dccp.c | 17 +++++------------ net/netfilter/nf_conntrack_proto_tcp.c | 25 +++++++++---------------- 4 files changed, 45 insertions(+), 34 deletions(-) commit c4f3db15958277c03d1c324894255ea3ecbf86e1 Author: Florian Westphal Date: Wed Oct 11 10:47:40 2017 +0200 netfilter: conntrack: add and use nf_l4proto_log_invalid We currently pass down the l4 protocol to the conntrack ->packet() function, but the only user of this is the debug info decision. Same information can be derived from struct nf_conn. As a first step, add and use a new log function for this, similar to nf_ct_helper_log(). Add __cold annotation -- invalid packets should be infrequent so gcc can consider all call paths that lead to such a function as unlikely. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack_l4proto.h | 10 +++++++ net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 18 ++++++------ net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 14 +++++---- net/netfilter/nf_conntrack_proto.c | 24 ++++++++++++++++ net/netfilter/nf_conntrack_proto_dccp.c | 3 +- net/netfilter/nf_conntrack_proto_sctp.c | 3 +- net/netfilter/nf_conntrack_proto_tcp.c | 22 +++++++------- net/netfilter/nf_conntrack_proto_udp.c | 40 ++++++++++++-------------- 8 files changed, 82 insertions(+), 52 deletions(-) commit 2420770b3fe56ca97ecf34e230762cd9f3296dae Author: Florian Westphal Date: Thu Oct 5 16:46:45 2017 +0200 netfilter: nat: use test_and_clear_bit when deleting ct from bysource list We can use a single statement for this. While at it, fixup the comment -- we don't have pernet table/ops anymore, the function is only called from module exit path. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_nat_core.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 9ca255bf041ddc7698b6906dbd846c0ba64b1fe1 Author: Mark Salyzyn Date: Tue Oct 24 07:47:14 2017 -0700 arm64: Avoid aligning normal memory pointers in __memcpy_{to,from}io __memcpy_{to,from}io fall back to byte-at-a-time copying if both the source and destination pointers are not 8-byte aligned. Since one of the pointers always points at normal memory, this is unnecessary and detrimental to performance, so only do byte copying until we hit an 8-byte boundary for the device pointer. This change was motivated by performance issues in the pstore driver. On a test platform, measuring probe time for pstore, console buffer size of 1/4MB and pmsg of 1/2MB, was in the 90-107ms region. Change managed to reduce it to 10-25ms, an improvement in boot time. Cc: Kees Cook Cc: Anton Vorontsov Cc: Tony Luck Cc: Catalin Marinas Cc: Will Deacon Cc: Anton Vorontsov Cc: Robin Murphy Signed-off-by: Mark Salyzyn Signed-off-by: Will Deacon arch/arm64/kernel/io.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit cd1a77e3c9cc6dbb57f02aa50e1740fc144d2dad Author: Stanimir Varbanov Date: Mon Oct 9 14:24:57 2017 +0200 media: venus: fix wrong size on dma_free This change will fix an issue with dma_free size found with DMA API debug enabled. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Cc: # for v4.13 and up Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/qcom/venus/hfi_venus.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 6771fce5060e10f6c878b5d644e9d66dd7f68950 Author: Sakari Ailus Date: Fri Sep 29 12:23:56 2017 +0200 media: smiapp: Rely on runtime PM Instead of relying on a mix of runtime PM and the s_power() callback, drop the s_power() callback altogether and use runtime PM solely. As device access is required during device power-on and power-off sequences, runtime PM alone cannot tell whether the device is available. Thus the "active" field is introduced in struct smiapp_sensor to tell whether it is safe to write to the device. Consequently there is no need to power on the device whenever a file handle is open. This functionality is removed as well. The user may still control the device power management through sysfs. Autosuspend remains enabled, with 1 s delay. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-core.c | 101 ++++++++++++--------------------- drivers/media/i2c/smiapp/smiapp-regs.c | 3 + drivers/media/i2c/smiapp/smiapp.h | 1 + 3 files changed, 40 insertions(+), 65 deletions(-) commit 72eaf99f0471d7e03e46f0d87770626430995df2 Author: Sakari Ailus Date: Fri Sep 29 11:54:10 2017 +0200 media: smiapp: Use __v4l2_ctrl_handler_setup() Use unlocked __v4l2_ctrl_handler_setup() in order to make the control setup atomic. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-core.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 1e0c661f05ba0a3db52ed9debbe2b2e1d74aa0a4 Merge: 611479c 0714134 Author: Will Deacon Date: Tue Oct 24 16:05:15 2017 +0100 Merge branch 'for-next/perf' into aarch64/for-next/core Merge in ARM PMU and perf updates for 4.15: - Support for the Statistical Profiling Extension - Support for Hisilicon's SoC PMU Signed-off-by: Will Deacon commit 611479c79a94e6713bc044b0410aa8b867375d17 Author: Julien Thierry Date: Fri Oct 13 12:26:45 2017 +0100 arm/arm64: pmu: Distinguish percpu irq and percpu_devid irq arm_pmu interrupts are maked as PERCPU even when these are not local physical interrupts to a single CPU. When using non-local interrupts, interrupts marked as PERCPU will not get freed not disabled properly by the PMU driver. Check if interrupts are local to a single CPU with PERCPU_DEVID since this is what the PMU driver really needs to know. Acked-by: Mark Rutland Signed-off-by: Julien Thierry Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 10 +++++----- drivers/perf/arm_pmu_platform.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) commit 08395c7f4d9f5808b5754a0dbed969f378bde0c3 Author: Julien Thierry Date: Fri Oct 13 12:26:44 2017 +0100 irqdesc: Add function to identify percpu_devid irqs irq_is_percpu indicates whether an irq should only target a single cpu. PERCPU_DEVID flag indicates that an irq can be configured differently on each cpu it can target. Provide a function to check whether an irq is PERCPU_DEVID. Reviewed-by: Thomas Gleixner Reviewed-by: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Julien Thierry include/linux/irqdesc.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit bcdc4bd356c76a5bab2f480a73f089dc8e0e4e89 Author: Kees Cook Date: Tue Oct 24 03:02:23 2017 -0700 dmaengine: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Vinod Koul drivers/dma/imx-dma.c | 8 +++----- drivers/dma/ioat/dma.c | 6 +++--- drivers/dma/ioat/dma.h | 3 +-- drivers/dma/ioat/init.c | 2 +- 4 files changed, 8 insertions(+), 11 deletions(-) commit 9b3b8171f7f4ecbbc28f3c1ae60462826a5d9072 Author: Baolin Wang Date: Tue Oct 24 13:47:50 2017 +0800 dmaengine: sprd: Add Spreadtrum DMA driver This patch adds the DMA controller driver for Spreadtrum SC9860 platform. Signed-off-by: Baolin Wang Signed-off-by: Vinod Koul drivers/dma/Kconfig | 8 + drivers/dma/Makefile | 1 + drivers/dma/sprd-dma.c | 988 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 997 insertions(+) commit ea09ec8c444c61446fb71952c6c50c8f7e8a8731 Author: Baolin Wang Date: Tue Oct 24 13:47:49 2017 +0800 dt-bindings: dmaengine: Add Spreadtrum SC9860 DMA controller This patch adds the binding documentation for Spreadtrum SC9860 DMA controller device. Signed-off-by: Baolin Wang Acked-by: Rob Herring Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/sprd-dma.txt | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 75bc5f06617fe1bc9a79ba9e3baccdcae3743404 Author: Javier González Date: Tue Oct 24 15:56:13 2017 +0200 lightnvm: pblk: remove leftover testing function A previous patch inadvertently left an unused test function in the header, kill it. Fixes: 8bd400204bd5 ("lightnvm: pblk: cleanup unused and static functions") Signed-off-by: Javier González Signed-off-by: Jens Axboe drivers/lightnvm/pblk.h | 5 ----- 1 file changed, 5 deletions(-) commit 6f8c539313d884f4715b328e1ce4a3987649b97e Author: Romain Perier Date: Mon Sep 4 10:51:19 2017 +0200 arm64: dts: rockchip: add efuse for RK3368 SoCs This adds the definition for eFuse that is found on RK3368 SoCs with the corresponding data cells. Signed-off-by: Romain Perier Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3368.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c1cf6e1a20b79dc29f05ece99f4c1d219af1eb6c Merge: ec5ccfd 4e07533 Author: Heiko Stuebner Date: Tue Oct 24 15:21:19 2017 +0200 Merge branch 'v4.15-shared/clkids' into v4.15-armsoc/dts64 commit aa441895f7b4ff5394d4964a8e6749f3866e44d0 Author: Milian Wolff Date: Mon Oct 9 22:33:04 2017 +0200 perf report: Compare symbol name for inlined frames when sorting Similar to the callstack frame matching, we also have to compare the symbol name when sorting hist entries. The reason is twofold: On one hand, multiple inlined functions will use the same symbol start/end values of the parent, non-inlined symbol. As such, all of these symbols often end up missing from top-level report, as they get merged with the non-inlined frame. On the other hand, multiple different functions may end up inlining the same function, and we need to aggregate these values properly. Before: ~~~~~ perf report --stdio --inline -g none # Children Self Command Shared Object Symbol # ........ ........ ............ ............. ................................... # 100.00% 39.69% cpp-inlining cpp-inlining [.] main 100.00% 0.00% cpp-inlining cpp-inlining [.] _start 100.00% 0.00% cpp-inlining libc-2.25.so [.] __libc_start_main 97.03% 0.00% cpp-inlining cpp-inlining [.] std::norm (inlined) 59.53% 4.26% cpp-inlining libm-2.25.so [.] hypot 55.21% 55.08% cpp-inlining libm-2.25.so [.] __hypot_finite 0.52% 0.52% cpp-inlining libm-2.25.so [.] cabs ~~~~~ After: ~~~~~ perf report --stdio --inline -g none # Children Self Command Shared Object Symbol # ........ ........ ............ ............. ................................................................................................................................... # 100.00% 39.69% cpp-inlining cpp-inlining [.] main 100.00% 0.00% cpp-inlining cpp-inlining [.] _start 100.00% 0.00% cpp-inlining libc-2.25.so [.] __libc_start_main 62.57% 0.00% cpp-inlining cpp-inlining [.] std::_Norm_helper::_S_do_it (inlined) 62.57% 0.00% cpp-inlining cpp-inlining [.] std::__complex_abs (inlined) 62.57% 0.00% cpp-inlining cpp-inlining [.] std::abs (inlined) 62.57% 0.00% cpp-inlining cpp-inlining [.] std::norm (inlined) 59.53% 4.26% cpp-inlining libm-2.25.so [.] hypot 55.21% 55.08% cpp-inlining libm-2.25.so [.] __hypot_finite 34.46% 0.00% cpp-inlining cpp-inlining [.] std::uniform_real_distribution::operator() > (inlined) 32.39% 0.00% cpp-inlining cpp-inlining [.] std::__detail::_Adaptor, double>::operator() (inlined) 32.39% 0.00% cpp-inlining cpp-inlining [.] std::generate_canonical > (inlined) 12.29% 0.00% cpp-inlining cpp-inlining [.] std::__detail::_Mod::__calc (inlined) 12.29% 0.00% cpp-inlining cpp-inlining [.] std::__detail::__mod (inlined) 12.29% 0.00% cpp-inlining cpp-inlining [.] std::linear_congruential_engine::operator() (inlined) 0.52% 0.52% cpp-inlining libm-2.25.so [.] cabs ~~~~~ Signed-off-by: Milian Wolff Reviewed-by: Jiri Olsa Reviewed-by: Namhyung Kim Cc: David Ahern Cc: Peter Zijlstra Cc: Yao Jin Link: http://lkml.kernel.org/r/20171009203310.17362-11-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/sort.c | 3 +++ 1 file changed, 3 insertions(+) commit 9856240ad3269f2fdab0b2fa4400ef8aab792061 Author: Milian Wolff Date: Mon Oct 9 22:33:03 2017 +0200 perf callchain: Compare symbol name for inlined frames when matching The fake symbols we create for inlined frames will represent different functions but can use the symbol start address. This leads to issues when different inline branches all lead to the same function. Before: ~~~~~ $ perf report -s sym -i perf.inlining.data --inline --stdio -g function ... --38.86%--_start __libc_start_main main | --37.57%--std::norm (inlined) std::_Norm_helper::_S_do_it (inlined) | --36.36%--std::abs (inlined) std::__complex_abs (inlined) | --12.24%--std::linear_congruential_engine::operator() (inlined) std::__detail::__mod (inlined) std::__detail::_Mod::__calc (inlined) ~~~~~ Note that this backtrace representation is completely bogus. Complex abs does not call the linear congruential engine! It is just a side-effect of a longer inlined stack being appended to a shorter, different inlined stack, both of which originate in the same function (main). This patch fixes the issue: ~~~~~ $ perf report -s sym -i perf.inlining.data --inline --stdio -g function ... --38.86%--_start __libc_start_main main | |--35.59%--std::uniform_real_distribution::operator() > (inlined) | std::uniform_real_distribution::operator() > (inlined) | | | --34.37%--std::__detail::_Adaptor, double>::operator() (inlined) | std::generate_canonical > (inlined) | | | --12.24%--std::linear_congruential_engine::operator() (inlined) | std::__detail::__mod (inlined) | std::__detail::_Mod::__calc (inlined) | --1.99%--std::norm (inlined) std::_Norm_helper::_S_do_it (inlined) std::abs (inlined) std::__complex_abs (inlined) ~~~~~ Signed-off-by: Milian Wolff Reviewed-by: Jiri Olsa Reviewed-by: Namhyung Kim Cc: David Ahern Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Yao Jin Link: http://lkml.kernel.org/r/20171009203310.17362-10-milian.wolff@kdab.com Cc: Arnaldo Carvalho de Melo [ Fix up conflict with c1fbc0cf81f1 ("perf callchain: Compare dsos (as well) for CCKEY_FUNCTION"), remove unneeded hunk ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/callchain.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 9628b56dc1240ce0faa3bd9b7a3390fa4451c59f Author: Milian Wolff Date: Mon Oct 9 22:33:02 2017 +0200 perf script: Mark inlined frames and do not print DSO for them Instead of showing the (repeated) DSO name of the non-inlined frame, we now show the "(inlined)" suffix instead. Before: 214f7 __hypot_finite (/usr/lib/libm-2.25.so) ace3 hypot (/usr/lib/libm-2.25.so) a4a std::__complex_abs (/home/milian/projects/src/perf-tests/inlining) a4a std::abs (/home/milian/projects/src/perf-tests/inlining) a4a std::_Norm_helper::_S_do_it (/home/milian/projects/src/perf-tests/inlining) a4a std::norm (/home/milian/projects/src/perf-tests/inlining) a4a main (/home/milian/projects/src/perf-tests/inlining) 20510 __libc_start_main (/usr/lib/libc-2.25.so) bd9 _start (/home/milian/projects/src/perf-tests/inlining) After: 214f7 __hypot_finite (/usr/lib/libm-2.25.so) ace3 hypot (/usr/lib/libm-2.25.so) a4a std::__complex_abs (inlined) a4a std::abs (inlined) a4a std::_Norm_helper::_S_do_it (inlined) a4a std::norm (inlined) a4a main (/home/milian/projects/src/perf-tests/inlining) 20510 __libc_start_main (/usr/lib/libc-2.25.so) bd9 _start (/home/milian/projects/src/perf-tests/inlining) Signed-off-by: Milian Wolff Reviewed-by: Jiri Olsa Reviewed-by: Namhyung Kim Cc: David Ahern Cc: Peter Zijlstra Cc: Yao Jin Link: http://lkml.kernel.org/r/20171009203310.17362-9-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/evsel_fprintf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8932f8071cae8a12dfd5f492247777ee176b0da4 Author: Milian Wolff Date: Mon Oct 9 22:33:01 2017 +0200 perf callchain: Mark inlined frames in output by " (inlined)" suffix The original patch that introduced inline frame output in the various browsers used this suffix already. The new centralized approach that uses fake symbols for inlined frames was missing this approach so far. Instead of changing the symbol name itself, we only print the suffix where needed. This allows us to efficiently lookup the symbol for a given name without first having to append the suffix before the lookup. Signed-off-by: Milian Wolff Reviewed-by: Jiri Olsa Reviewed-by: Namhyung Kim Cc: David Ahern Cc: Peter Zijlstra Cc: Yao Jin Link: http://lkml.kernel.org/r/20171009203310.17362-8-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/callchain.c | 10 +++++++--- tools/perf/util/sort.c | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) commit cbe50f61727f538f05e63186c2e0022182a3a28f Author: Milian Wolff Date: Mon Oct 9 22:33:00 2017 +0200 perf report: Fall-back to function name comparison for -g srcline When a callchain entry has no srcline available, we ended up comparing the instruction pointer. I consider this to be not too useful. Rather, I think we should group the entries by function name, which this patch adds. For people who want to split the data on the IP boundary, using `-g address` is the correct choice. Before: ~~~~~ 100.00% 38.86% [.] main | |--61.14%--main inlining.cpp:14 | std::norm complex:664 | std::_Norm_helper::_S_do_it complex:654 | std::abs complex:597 | std::__complex_abs complex:589 | | | |--56.03%--hypot | | | | | |--8.45%--__hypot_finite | | | | | |--7.62%--__hypot_finite | | | | | |--2.29%--__hypot_finite | | | | | |--2.24%--__hypot_finite | | | | | |--2.06%--__hypot_finite | | | | | |--1.81%--__hypot_finite ... ~~~~~ After: ~~~~~ 100.00% 38.86% [.] main | |--61.14%--main inlining.cpp:14 | std::norm complex:664 | std::_Norm_helper::_S_do_it complex:654 | std::abs complex:597 | std::__complex_abs complex:589 | | | |--60.29%--hypot | | | | | --56.03%--__hypot_finite | | | --0.85%--cabs ~~~~~ Signed-off-by: Milian Wolff Reviewed-by: Jiri Olsa Reviewed-by: Namhyung Kim Cc: David Ahern Cc: Peter Zijlstra Cc: Yao Jin Link: http://lkml.kernel.org/r/20171009203310.17362-7-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/callchain.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 11ea2515f32e783b9a7984c148e742c377383915 Author: Milian Wolff Date: Mon Oct 9 22:32:59 2017 +0200 perf callchain: Create real callchain entries for inlined frames The inline_node structs are maintained by the new dso->inlines tree. This in turn keeps ownership of the fake symbols and srcline string representing an inline frame. This tree is sorted by address to allow quick lookups. All other entries of the symbol beside the function name are unused for inline frames. The advantage of this approach is that all existing users of the callchain API can now transparently display inlined frames without having to patch their code. Signed-off-by: Milian Wolff Reviewed-by: Jiri Olsa Reviewed-by: Namhyung Kim Cc: David Ahern Cc: Peter Zijlstra Cc: Yao Jin Link: http://lkml.kernel.org/r/20171009203310.17362-6-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/dso.c | 5 +++++ tools/perf/util/dso.h | 1 + tools/perf/util/machine.c | 37 ++++++++++++++++++++++++++++++++++ tools/perf/util/srcline.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/srcline.h | 9 +++++++++ 5 files changed, 103 insertions(+) commit 2be8832f3c51cf9e36a3e80ff57f4137505c2ba4 Author: Milian Wolff Date: Mon Oct 9 22:32:58 2017 +0200 perf callchain: Refactor inline_list to store srcline string directly This is a preparation for the creation of real callchain entries for inlined frames. The rest of the perf code uses the srcline string. As such, using that also for the srcline API allows us to simplify some of the upcoming code. Most notably, it will allow us to cache the srcline for a given inline node and reuse it for different callchain entries. Signed-off-by: Milian Wolff Reviewed-by: Jiri Olsa Reviewed-by: Namhyung Kim Cc: David Ahern Cc: Peter Zijlstra Cc: Yao Jin Link: http://lkml.kernel.org/r/20171009203310.17362-5-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/srcline.c | 54 +++++++++++++++++++++++++++++++++++------------ tools/perf/util/srcline.h | 3 +-- 2 files changed, 41 insertions(+), 16 deletions(-) commit fea0cf842c7aa08950063264ab1cfbce4ba38c1b Author: Milian Wolff Date: Mon Oct 9 22:32:57 2017 +0200 perf callchain: Refactor inline_list to operate on symbols This is a requirement to create real callchain entries for inlined frames. Since the list of inlines usually contains the target symbol too, i.e. the location where the frames get inlined to, we alias that symbol and reuse it as-is is. This ensures that other dependent functionality keeps working, most notably annotation of the target frames. For all other entries in the inline_list, a fake symbol is created. These are marked by new 'inlined' member which is set to true. Only those symbols are managed by the inline_list and get freed when the inline_list is deleted from within inline_node__delete. Signed-off-by: Milian Wolff Reviewed-by: Jiri Olsa Reviewed-by: Namhyung Kim Cc: David Ahern Cc: Peter Zijlstra Cc: Yao Jin Link: http://lkml.kernel.org/r/20171009203310.17362-4-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/srcline.c | 93 ++++++++++++++++++++++++++++++++--------------- tools/perf/util/srcline.h | 7 +++- tools/perf/util/symbol.h | 1 + 3 files changed, 69 insertions(+), 32 deletions(-) commit 40a342cda2cd9bc8f7bf81c5ce1a141584760757 Author: Milian Wolff Date: Mon Oct 9 22:32:56 2017 +0200 perf callchain: Store srcline in callchain_cursor_node This is mostly a preparation to enable the creation of full callchain nodes for inline frames. Such frames will reference the IP of the non-inlined frame, but hold the symbol and srcline for an inlined location. As such, we won't be able to query the srcline on-demand based on the IP alone. Instead, we will leverage the functionality provided by this patch here, and store the srcline for the inlined nodes in the new srcline member of callchain_cursor_node. Note that this patch on its own leaks the srcline, as there is no free_callchain_cursor_node or similar. A future patch will add caching of the srcline and handle deletion properly. Signed-off-by: Milian Wolff Reviewed-by: Jiri Olsa Reviewed-by: Namhyung Kim Cc: David Ahern Cc: Peter Zijlstra Cc: Yao Jin Link: http://lkml.kernel.org/r/20171009203310.17362-3-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/callchain.c | 31 +++++++++---------------------- tools/perf/util/callchain.h | 6 ++++-- tools/perf/util/machine.c | 18 ++++++++++++++++-- 3 files changed, 29 insertions(+), 26 deletions(-) commit 2a704fc8db7b0080a67d9f4f4cb2a7bcaf79949d Author: Milian Wolff Date: Mon Oct 9 22:32:55 2017 +0200 perf report: Remove code to handle inline frames from browsers The follow-up commits will make inline frames first-class citizens in the callchain, thereby obsoleting all of this special code. Signed-off-by: Milian Wolff Reviewed-by: Jiri Olsa Reviewed-by: Namhyung Kim Cc: David Ahern Cc: Peter Zijlstra Cc: Yao Jin Link: http://lkml.kernel.org/r/20171009203310.17362-2-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/browsers/hists.c | 180 +++------------------------------------- tools/perf/ui/stdio/hist.c | 77 +---------------- tools/perf/util/evsel_fprintf.c | 32 ------- tools/perf/util/hist.c | 5 -- tools/perf/util/sort.h | 1 - 5 files changed, 13 insertions(+), 282 deletions(-) commit 2d5afd51fe6b469e09d8d63fff041cbf4a987278 Merge: 0520d37 ce2b21a Author: Greg Kroah-Hartman Date: Tue Oct 24 14:03:12 2017 +0200 Merge tag 'usb-for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: changes for v4.15 merge window Not much going on this time around. With only 51 non-merge commits, this was one of the smallest pull requests from the Gadget tree. Most of the changes are in the mtu3 driver which added support for 36-bit DMA, support for USB 3.1 and support for dual-role (along with some non-critical fixes). The dwc2 driver got a few improvements to how we handle gadget state tracking and also added support for STM32F7xx devices. Other than that, we just some minor non-critical fixes and improvements all over the place. commit a192aa923b66a435aae56983c4912ee150bc9b32 Author: Rafael J. Wysocki Date: Mon Oct 16 03:29:55 2017 +0200 ACPI / LPSS: Consolidate runtime PM and system sleep handling Move the LPSS-specific code from acpi_lpss_runtime_suspend() and acpi_lpss_runtime_resume() into separate functions, acpi_lpss_suspend() and acpi_lpss_resume(), respectively, and make acpi_lpss_suspend_late() and acpi_lpss_resume_early() use them too in order to unify the runtime PM and system sleep handling in the LPSS driver. Signed-off-by: Rafael J. Wysocki Acked-by: Greg Kroah-Hartman Reviewed-by: Ulf Hansson drivers/acpi/acpi_lpss.c | 76 ++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 42 deletions(-) commit 5a8897cc7631fa544d079c443800f4420d1b173f Author: Will Deacon Date: Tue Oct 24 11:22:50 2017 +0100 locking/atomics/alpha: Add smp_read_barrier_depends() to _release()/_relaxed() atomics As part of the fight against smp_read_barrier_depends(), we require dependency ordering to be preserved when a dependency is headed by a load performed using an atomic operation. This patch adds smp_read_barrier_depends() to the _release() and _relaxed() atomics on alpha, which otherwise lack anything to enforce dependency ordering. Signed-off-by: Will Deacon Signed-off-by: Paul E. McKenney Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1508840570-22169-6-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar arch/alpha/include/asm/atomic.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 59ecbbe7b31cd2d86ff9a9f461a00f7e7533aedc Author: Will Deacon Date: Tue Oct 24 11:22:49 2017 +0100 locking/barriers: Kill lockless_dereference() lockless_dereference() is a nice idea, but it gained little traction in kernel code since its introduction three years ago. This is partly because it's a pain to type, but also because using READ_ONCE() instead has worked correctly on all architectures apart from Alpha, which is a fully supported but somewhat niche architecture these days. Now that READ_ONCE() has been upgraded to contain an implicit smp_read_barrier_depends() and the few callers of lockless_dereference() have been converted, we can remove lockless_dereference() altogether. Signed-off-by: Will Deacon Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1508840570-22169-5-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar Documentation/memory-barriers.txt | 12 ------------ Documentation/translations/ko_KR/memory-barriers.txt | 12 ------------ include/linux/compiler.h | 20 -------------------- 3 files changed, 44 deletions(-) commit 506458efaf153c1ea480591c5602a5a3ba5a3b76 Author: Will Deacon Date: Tue Oct 24 11:22:48 2017 +0100 locking/barriers: Convert users of lockless_dereference() to READ_ONCE() READ_ONCE() now has an implicit smp_read_barrier_depends() call, so it can be used instead of lockless_dereference() without any change in semantics. Signed-off-by: Will Deacon Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1508840570-22169-4-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar arch/x86/events/core.c | 2 +- arch/x86/include/asm/mmu_context.h | 4 ++-- arch/x86/kernel/ldt.c | 2 +- drivers/md/dm-mpath.c | 20 ++++++++++---------- fs/dcache.c | 4 ++-- fs/overlayfs/ovl_entry.h | 2 +- fs/overlayfs/readdir.c | 2 +- include/linux/rculist.h | 4 ++-- include/linux/rcupdate.h | 4 ++-- kernel/events/core.c | 4 ++-- kernel/seccomp.c | 2 +- kernel/task_work.c | 2 +- mm/slab.h | 2 +- 13 files changed, 27 insertions(+), 27 deletions(-) commit 76ebbe78f7390aee075a7f3768af197ded1bdfbb Author: Will Deacon Date: Tue Oct 24 11:22:47 2017 +0100 locking/barriers: Add implicit smp_read_barrier_depends() to READ_ONCE() In preparation for the removal of lockless_dereference(), which is the same as READ_ONCE() on all architectures other than Alpha, add an implicit smp_read_barrier_depends() to READ_ONCE() so that it can be used to head dependency chains on all architectures. Signed-off-by: Will Deacon Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1508840570-22169-3-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar include/linux/compiler.h | 1 + 1 file changed, 1 insertion(+) commit d15155824c5014803d91b829736d249c500bdda6 Author: Will Deacon Date: Tue Oct 24 11:22:46 2017 +0100 linux/compiler.h: Split into compiler.h and compiler_types.h linux/compiler.h is included indirectly by linux/types.h via uapi/linux/types.h -> uapi/linux/posix_types.h -> linux/stddef.h -> uapi/linux/stddef.h and is needed to provide a proper definition of offsetof. Unfortunately, compiler.h requires a definition of smp_read_barrier_depends() for defining lockless_dereference() and soon for defining READ_ONCE(), which means that all users of READ_ONCE() will need to include asm/barrier.h to avoid splats such as: In file included from include/uapi/linux/stddef.h:1:0, from include/linux/stddef.h:4, from arch/h8300/kernel/asm-offsets.c:11: include/linux/list.h: In function 'list_empty': >> include/linux/compiler.h:343:2: error: implicit declaration of function 'smp_read_barrier_depends' [-Werror=implicit-function-declaration] smp_read_barrier_depends(); /* Enforce dependency ordering from x */ \ ^ A better alternative is to include asm/barrier.h in linux/compiler.h, but this requires a type definition for "bool" on some architectures (e.g. x86), which is defined later by linux/types.h. Type "bool" is also used directly in linux/compiler.h, so the whole thing is pretty fragile. This patch splits compiler.h in two: compiler_types.h contains type annotations, definitions and the compiler-specific parts, whereas compiler.h #includes compiler-types.h and additionally defines macros such as {READ,WRITE.ACCESS}_ONCE(). uapi/linux/stddef.h and linux/linkage.h are then moved over to include linux/compiler_types.h, which fixes the build for h8 and blackfin. Signed-off-by: Will Deacon Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1508840570-22169-2-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar arch/arm/include/asm/ptrace.h | 3 +- arch/sparc/include/asm/ptrace.h | 1 + arch/um/include/shared/init.h | 2 +- include/linux/compiler-clang.h | 2 +- include/linux/compiler-gcc.h | 2 +- include/linux/compiler-intel.h | 2 +- include/linux/compiler.h | 265 +------------------------------------- include/linux/compiler_types.h | 274 ++++++++++++++++++++++++++++++++++++++++ include/linux/linkage.h | 2 +- include/uapi/linux/stddef.h | 2 +- scripts/headers_install.sh | 2 +- 11 files changed, 286 insertions(+), 271 deletions(-) commit 9babb091e0ec84f7503fde0a2d9a2a16a0f48e3c Merge: 5cdda51 bb176f6 Author: Ingo Molnar Date: Tue Oct 24 13:17:20 2017 +0200 Merge tag 'v4.14-rc6' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit 6a331e1513afb9019722fdd8d4c08533d79fbb81 Merge: 69715dd ea00aa3 Author: David S. Miller Date: Tue Oct 24 19:07:13 2017 +0900 Merge branch 'mlxsw-Various-fixes' Jiri Pirko says: ==================== mlxsw: Various fixes Yotam says: Cleanup some issues reported by sparse. ==================== Signed-off-by: David S. Miller commit ea00aa3a27c3a52c5d2a1444a90e690d55b6c221 Author: Yotam Gigi Date: Tue Oct 24 11:17:17 2017 +0200 mlxsw: spectrum: mr_tcam: Include the mr_tcam header file Make the spectrum_mr_tcam.c include the spectrum_mr_tcam.h header file. Cleans up sparse warning: symbol 'mlxsw_sp_mr_tcam_ops' was not declared. Should it be static? Fixes: 0e14c7777acb6 ("mlxsw: spectrum: Add the multicast routing hardware logic") Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.c | 1 + 1 file changed, 1 insertion(+) commit 6a30dc29a450566e9c8e07dd16c05b11cb41be20 Author: Yotam Gigi Date: Tue Oct 24 11:17:16 2017 +0200 mlxsw: spectrum: mr: Make the function mlxsw_sp_mr_dev_vif_lookup static The function is only used internally in spectrum_mr.c and is not declared in the header file, thus make it static. Cleans up sparse warning: symbol 'mlxsw_sp_mr_dev_vif_lookup' was not declared. Should it be static? Fixes: c011ec1bbfd6 ("mlxsw: spectrum: Add the multicast routing offloading logic") Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de3872cd1863dcd077e966dd467f8e50876302aa Author: Yotam Gigi Date: Tue Oct 24 11:17:15 2017 +0200 mlxsw: spectrum: mr: Fix various endianness issues Fix various endianness issues in comparisons and assignments. The fix is entirely cosmetic as all the values fixed are endianness-agnostic. Cleans up sparse warnings: spectrum_mr.c:156:49: warning: restricted __be32 degrades to integer spectrum_mr.c:206:26: warning: restricted __be32 degrades to integer spectrum_mr.c:212:31: warning: incorrect type in assignment (different base types) spectrum_mr.c:212:31: expected restricted __be32 [usertype] addr4 spectrum_mr.c:212:31: got unsigned int spectrum_mr.c:214:32: warning: incorrect type in assignment (different base types) spectrum_mr.c:214:32: expected restricted __be32 [usertype] addr4 spectrum_mr.c:214:32: got unsigned int spectrum_mr.c:461:16: warning: restricted __be32 degrades to integer spectrum_mr.c:461:49: warning: restricted __be32 degrades to integer Fixes: c011ec1bbfd6 ("mlxsw: spectrum: Add the multicast routing offloading logic") Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 69715dd50d28deb52f84932794a2fce0b18c8b56 Author: Arkadi Sharshevsky Date: Tue Oct 24 10:11:42 2017 +0200 mlxsw: spectrum_dpipe: Fix entries dump of the adjacency table During the dump the per netlink packet entry counter should be zeroed out when new packet is created. Fixes: 190d38a52a73 ("mlxsw: spectrum_dpipe: Add support for adjacency table dump") Signed-off-by: Arkadi Sharshevsky Reported-by: David Ahern Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 1 + 1 file changed, 1 insertion(+) commit 9d452cebd7d69e9eb22b4c0482fdbb6fc762167f Author: Or Gerlitz Date: Tue Oct 24 08:58:02 2017 +0300 net/sched: Fix actions list corruption when adding offloaded tc flows Prior to commit b3f55bdda8df, the networking core doesn't wire an in-place actions list the when the low level driver is called to offload the flow, but all low level drivers do that (call tcf_exts_to_list()) in their offloading "add" logic. Now, the in-place list is set in the core which goes over the list in a loop, but also by the hw driver when their offloading code is invoked indirectly: cls_xxx add flow -> tc_setup_cb_call -> tc_exts_setup_cb_egdev_call -> hw driver which messes up the core list instance upon driver return. Fix that by avoiding in-place list on the net core code that deals with adding flows. Fixes: b3f55bdda8df ('net: sched: introduce per-egress action device callbacks') Signed-off-by: Or Gerlitz Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_api.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 907aaa6babe1a606f3da4eb76e76e3ce6286f97f Author: Veerasenareddy Burru Date: Mon Oct 23 20:33:25 2017 -0700 liquidio: pass date and time info to NIC firmware Pass date and time information to NIC at the time of loading firmware and periodically update the host time to NIC firmware. This is to make NIC firmware use the same time reference as Host, so that it is easy to correlate logs from firmware and host for debugging. Signed-off-by: Veerasenareddy Burru Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 126 +++++++++++++++++++++ .../net/ethernet/cavium/liquidio/liquidio_common.h | 8 ++ .../net/ethernet/cavium/liquidio/octeon_console.c | 32 +++++- .../net/ethernet/cavium/liquidio/octeon_network.h | 3 + 4 files changed, 166 insertions(+), 3 deletions(-) commit 87b1af8dcc084d3d509d55067185ca74aed70ce2 Author: Wei Wang Date: Mon Oct 23 14:59:35 2017 -0700 ipv6: add ip6_null_entry check in rt6_select() In rt6_select(), fn->leaf could be pointing to net->ipv6.ip6_null_entry. In this case, we should directly return instead of trying to carry on with the rest of the process. If not, we could crash at: spin_lock_bh(&leaf->rt6i_table->rt6_lock); because net->ipv6.ip6_null_entry does not have rt6i_table set. Syzkaller recently reported following issue on net-next: Use struct sctp_sack_info instead 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: sctp: [Deprecated]: syz-executor4 (pid 26496) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead CPU: 1 PID: 26523 Comm: syz-executor6 Not tainted 4.14.0-rc4+ #85 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801d147e3c0 task.stack: ffff8801a4328000 RIP: 0010:debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] RIP: 0010:do_raw_spin_lock+0x23/0x1e0 kernel/locking/spinlock_debug.c:112 RSP: 0018:ffff8801a432ed70 EFLAGS: 00010207 RAX: dffffc0000000000 RBX: 0000000000000018 RCX: 0000000000000000 RDX: 0000000000000003 RSI: 0000000000000000 RDI: 000000000000001c RBP: ffff8801a432ed90 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: ffffffff8482b279 R12: ffff8801ce2ff3a0 sctp: [Deprecated]: syz-executor1 (pid 26546) Use of int in maxseg socket option. Use struct sctp_assoc_value instead R13: dffffc0000000000 R14: ffff8801d971e000 R15: ffff8801ce2ff0d8 FS: 00007f56e82f5700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001ddbc22000 CR3: 00000001a4a04000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __raw_spin_lock_bh include/linux/spinlock_api_smp.h:136 [inline] _raw_spin_lock_bh+0x39/0x40 kernel/locking/spinlock.c:175 spin_lock_bh include/linux/spinlock.h:321 [inline] rt6_select net/ipv6/route.c:786 [inline] ip6_pol_route+0x1be3/0x3bd0 net/ipv6/route.c:1650 sctp: [Deprecated]: syz-executor1 (pid 26576) Use of int in maxseg socket option. Use struct sctp_assoc_value instead TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. ip6_pol_route_output+0x4c/0x60 net/ipv6/route.c:1843 fib6_rule_lookup+0x9e/0x2a0 net/ipv6/ip6_fib.c:309 ip6_route_output_flags+0x1f1/0x2b0 net/ipv6/route.c:1871 ip6_route_output include/net/ip6_route.h:80 [inline] ip6_dst_lookup_tail+0x4ea/0x970 net/ipv6/ip6_output.c:953 ip6_dst_lookup_flow+0xc8/0x270 net/ipv6/ip6_output.c:1076 sctp_v6_get_dst+0x675/0x1c30 net/sctp/ipv6.c:274 sctp_transport_route+0xa8/0x430 net/sctp/transport.c:287 sctp_assoc_add_peer+0x4fe/0x1100 net/sctp/associola.c:656 __sctp_connect+0x251/0xc80 net/sctp/socket.c:1187 sctp_connect+0xb4/0xf0 net/sctp/socket.c:4209 inet_dgram_connect+0x16b/0x1f0 net/ipv4/af_inet.c:541 SYSC_connect+0x20a/0x480 net/socket.c:1642 SyS_connect+0x24/0x30 net/socket.c:1623 entry_SYSCALL_64_fastpath+0x1f/0xbe Fixes: 66f5d6ce53e6 ("ipv6: replace rwlock with rcu and spinlock in fib6_table") Signed-off-by: Wei Wang Acked-by: Eric Dumazet Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv6/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce2b21a4e5ce042c0a42c9db8fa9e0f849427d5e Author: John Stultz Date: Mon Oct 23 14:32:50 2017 -0700 usb: dwc2: Fix UDC state tracking It has been noticed that the dwc2 udc state reporting doesn't seem to work (at least on HiKey boards). Where after the initial setup, the sysfs /sys/class/udc/f72c0000.usb/state file would report "configured" no matter the state of the OTG port. This patch adds a call so that we report to the UDC layer when the gadget device is disconnected. This patch does depend on the previous patch ("usb: dwc2: Improve gadget state disconnection handling") in this patch set in order to properly work. Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: YongQin Liu Cc: John Youn Cc: Minas Harutyunyan Cc: Douglas Anderson Cc: Chen Yu Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Acked-by: Minas Harutyunyan Tested-by: Minas Harutyunyan Reported-by: Amit Pundir Signed-off-by: John Stultz Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 2 ++ 1 file changed, 2 insertions(+) commit 9b481092c2a31a6b630aff9c28f0145bf6683787 Author: John Stultz Date: Mon Oct 23 14:32:49 2017 -0700 usb: dwc2: Error out of dwc2_hsotg_ep_disable() if we're in host mode We've found that while in host mode, using Android, if one runs the command: stop adbd The existing usb devices being utilized in host mode are disconnected. This is most visible with usb networking devices. This seems to be due to adbd closing the file: /dev/usb-ffs/adb/ep0 Which calls ffs_ep0_release() and the following backtrace: [] dwc2_hsotg_ep_disable+0x148/0x150 [] dwc2_hsotg_udc_stop+0x60/0x110 [] usb_gadget_remove_driver+0x58/0x78 [] usb_gadget_unregister_driver+0x74/0xe8 [] unregister_gadget+0x28/0x58 [] unregister_gadget_item+0x2c/0x40 [] ffs_data_clear+0xe8/0xf8 [] ffs_data_reset+0x20/0x58 [] ffs_data_closed+0x98/0xe8 [] ffs_ep0_release+0x20/0x30 Then when dwc2_hsotg_ep_disable() is called, we call kill_all_requests() which causes a bunch of the following messages: dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode init: Service 'adbd' (pid 1915) killed by signal 9 init: Sending signal 9 to service 'adbd' (pid 1915) process group... init: Successfully killed process cgroup uid 0 pid 1915 in 0ms init: processing action (init.svc.adbd=stopped) from (/init.usb.configfs.rc:15) dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 8 - ChHltd set, but reason is unknown dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029 dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 12 - ChHltd set, but reason is unknown dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029 dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 15 - ChHltd set, but reason is unknown dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029 dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 3 - ChHltd set, but reason is unknown dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029 dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 4 - ChHltd set, but reason is unknown dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029 dwc2 f72c0000.usb: dwc2_update_urb_state_abn(): trimming xfer length And the usb devices connected are basically hung at this point. It seems like if we're in host mode, we probably shouldn't run the dwc2_hostg_ep_disable logic, so this patch returns an error in that case. With this patch (along with the previous patch in this set), we avoid the mismatched interrupts and connected usb devices continue to function. I'm not sure if some other solution would be better here, but this seems to work, so I wanted to send it out for input on what the right approach should be. Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: YongQin Liu Cc: John Youn Cc: Minas Harutyunyan Cc: Douglas Anderson Cc: Chen Yu Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Acked-by: Minas Harutyunyan Tested-by: Minas Harutyunyan Reported-by: YongQin Liu Signed-off-by: John Stultz Signed-off-by: Felipe Balbi drivers/usb/dwc2/gadget.c | 5 +++++ 1 file changed, 5 insertions(+) commit d2471d4a24dfbff5e463d382e2c6fec7d7e25a09 Author: John Stultz Date: Mon Oct 23 14:32:48 2017 -0700 usb: dwc2: Improve gadget state disconnection handling In the earlier commit dad3f793f20f ("usb: dwc2: Make sure we disconnect the gadget state"), I was trying to fix up the fact that we somehow weren't disconnecting the gadget state, so that when the OTG port was plugged in the second time we would get warnings about the state tracking being wrong. (This seems to be due to a quirk of the HiKey board where we do not ever get any otg interrupts, particularly the session end detected signal. Instead we only see status change interrupt.) The fix there was somewhat simple, as it just made sure to call dwc2_hsotg_disconnect() before we connected things up in OTG mode, ensuring the state handling didn't throw errors. But in looking at a different issue I was seeing with UDC state handling, I realized that it would be much better to call dwc2_hsotg_disconnect when we get the state change signal moving to host mode. Thus, this patch removes the earlier disconnect call I added and moves it (and the needed locking) to the host mode transition. Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: YongQin Liu Cc: John Youn Cc: Minas Harutyunyan Cc: Douglas Anderson Cc: Chen Yu Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Acked-by: Minas Harutyunyan Tested-by: Minas Harutyunyan Signed-off-by: John Stultz Signed-off-by: Felipe Balbi drivers/usb/dwc2/hcd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 644cbbc3ab4d29a7513f227893d8df3246eada97 Author: Manu Gautam Date: Wed Sep 27 16:49:22 2017 +0530 usb: dwc3: core: Notify current USB mode to USB3 PHY as well Driver currently notifies only USB2 PHY on USB mode change. Extend this to USB3 PHY so that PHY drivers based on the mode can release system resources - clocks, regulators etc. Additionally Qualcomm QMP and QUSB2 PHY drivers need to override VBUS signal in PHY wrapper in device mode as USB VBUS line is not connected to PHYs. Also, remove NULL checks for PHY when calling phy_set_mode as PHY ops already check this. Signed-off-by: Manu Gautam Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 8eed00b237a2844dbe6bc2bac5c0b2657f9f194b Author: Manu Gautam Date: Wed Sep 27 16:49:21 2017 +0530 usb: dwc3: pci: Runtime resume child device from wq Driver currently resumes and increments pm usage_count of its child device (dwc3 main) from its runtime_resume handler. This requires dwc3 runtime_resume to perform pm_runtime_put to decrement the pm usage_count. However runtime_put from dwc3 happens for non pci drivers (e.g. dwc3-if-simple.c) as well which results in dwc3 pm usage_count becoming negative after couple of runtime suspend resume iterations. Fix this by performing runtime_get/put from dwc3-pci driver only using workqueue. Signed-off-by: Manu Gautam Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 1 - drivers/usb/dwc3/dwc3-pci.c | 29 +++++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) commit 689bf72c6e0dc97493ba14d82f6762456f8f244a Author: Manu Gautam Date: Wed Sep 27 16:49:20 2017 +0530 usb: dwc3: Don't reinitialize core during host bus-suspend/resume Driver powers-off PHYs and reinitializes DWC3 core and gadget on resume. While this works fine for gadget mode but in host mode there is not re-initialization of host stack. Also, resetting bus as part of bus_suspend/resume is not correct which could affect (or disconnect) connected devices. Fix this by not reinitializing core on suspend/resume in host mode for HOST only and OTG/drd configurations. Signed-off-by: Manu Gautam Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.c | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) commit ce035409bfa892a2fabb89720b542e1b335c3426 Author: Alexey Khoroshilov Date: Sat Oct 21 01:02:07 2017 +0300 usb: phy: tahvo: fix error handling in tahvo_usb_probe() If devm_extcon_dev_allocate() fails, we should disable clk before return. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Fixes: 860d2686fda7 ("usb: phy: tahvo: Use devm_extcon_dev_[allocate|register]() and replace deprecated API") Signed-off-by: Felipe Balbi drivers/usb/phy/phy-tahvo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 71c02379c762cb616c00fd5c4ed253fbf6bbe11b Author: Christoph Paasch Date: Mon Oct 23 13:22:23 2017 -0700 tcp: Configure TFO without cookie per socket and/or per route We already allow to enable TFO without a cookie by using the fastopen-sysctl and setting it to TFO_SERVER_COOKIE_NOT_REQD (or TFO_CLIENT_NO_COOKIE). This is safe to do in certain environments where we know that there isn't a malicous host (aka., data-centers) or when the application-protocol already provides an authentication mechanism in the first flight of data. A server however might be providing multiple services or talking to both sides (public Internet and data-center). So, this server would want to enable cookie-less TFO for certain services and/or for connections that go to the data-center. This patch exposes a socket-option and a per-route attribute to enable such fine-grained configurations. Signed-off-by: Christoph Paasch Reviewed-by: Yuchung Cheng Signed-off-by: David S. Miller include/linux/tcp.h | 3 ++- include/net/tcp.h | 3 ++- include/uapi/linux/rtnetlink.h | 2 ++ include/uapi/linux/tcp.h | 1 + net/ipv4/tcp.c | 12 ++++++++++++ net/ipv4/tcp_fastopen.c | 20 +++++++++++++++++--- net/ipv4/tcp_input.c | 2 +- 7 files changed, 37 insertions(+), 6 deletions(-) commit e22cdc3fc5991956146b9856d36b4971fe54dcd6 Author: Rakib Mullick Date: Mon Oct 23 19:01:54 2017 +0600 sched/isolcpus: Fix "isolcpus=" boot parameter handling when !CONFIG_CPUMASK_OFFSTACK cpulist_parse() uses nr_cpumask_bits as a limit to parse the passed buffer from kernel commandline. What nr_cpumask_bits represents varies depending upon the CONFIG_CPUMASK_OFFSTACK option: - If CONFIG_CPUMASK_OFFSTACK=n, then nr_cpumask_bits is the same as NR_CPUS, which might not represent the # of CPUs that really exist (default 64). So, there's a chance of a gap between nr_cpu_ids and NR_CPUS, which ultimately lead towards invalid cpulist_parse() operation. For example, if isolcpus=9 is passed on an 8 cpu system (CONFIG_CPUMASK_OFFSTACK=n) it doesn't show the error that it's supposed to. This patch fixes this bug by finding the last CPU of the passed isolcpus= list and checking it against nr_cpu_ids. It also fixes the error message where the nr_cpu_ids should be nr_cpu_ids-1, since CPU numbering starts from 0. Signed-off-by: Rakib Mullick Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: adobriyan@gmail.com Cc: akpm@linux-foundation.org Cc: longman@redhat.com Cc: mka@chromium.org Cc: tj@kernel.org Link: http://lkml.kernel.org/r/20171023130154.9050-1-rakib.mullick@gmail.com [ Enhanced the changelog and the kernel message. ] Signed-off-by: Ingo Molnar include/linux/cpumask.h | 16 ++++++++++++++++ kernel/sched/topology.c | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) include/linux/cpumask.h | 16 ++++++++++++++++ kernel/sched/topology.c | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) commit b6f4f8484d88b69f700907200a9a9ec73806355f Author: Tim Hansen Date: Mon Oct 23 15:35:58 2017 -0400 net/sock: Update sk rcu iterator macro. Mark hlist node in sk rcu iterator as protected by the rcu. hlist_next_rcu accomplishes this and silences the warnings sparse throws. Found with make C=1 net/ipv4/udp.o on linux-next tag next-20171009. Signed-off-by: Tim Hansen Signed-off-by: David S. Miller include/net/sock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 49ca1943a7adb429b11b8e05d81bc821694b76c7 Author: Gustavo A. R. Silva Date: Mon Oct 23 13:10:56 2017 -0500 ipv4: tcp_minisocks: use BUG_ON instead of if condition followed by BUG Use BUG_ON instead of if condition followed by BUG in tcp_time_wait. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/ipv4/tcp_minisocks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 152854025528b30c5ca5113a443ead98c3f1e7a5 Author: Gustavo A. R. Silva Date: Mon Oct 23 13:08:14 2017 -0500 ipv4: icmp: use BUG_ON instead of if condition followed by BUG Use BUG_ON instead of if condition followed by BUG in icmp_timestamp. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/ipv4/icmp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 31749468c3f9d77927ed3144259dc208e6625ede Author: Jesper Dangaard Brouer Date: Mon Oct 23 19:39:28 2017 +0200 bpf: cpumap fix potential lost wake-up problem As pointed out by Michael, commit 1c601d829ab0 ("bpf: cpumap xdp_buff to skb conversion and allocation") contains a classical example of the potential lost wake-up problem. We need to recheck the condition __ptr_ring_empty() after changing current->state to TASK_INTERRUPTIBLE, this avoids a race between wake_up_process() and schedule(). After this, a race with wake_up_process() will simply change the state to TASK_RUNNING, and the schedule() call not really put us to sleep. Fixes: 1c601d829ab0 ("bpf: cpumap xdp_buff to skb conversion and allocation") Reported-by: "Michael S. Tsirkin" Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller kernel/bpf/cpumap.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit fdb5e4fa1aedb91d900cd7719a0bfb92b4122c53 Author: Gustavo A. R. Silva Date: Mon Oct 23 22:15:46 2017 -0500 usb: gadget: serial: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1350962 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Felipe Balbi drivers/usb/gadget/function/u_serial.c | 1 + 1 file changed, 1 insertion(+) commit 58a636ec0362d99f4edaaad4f3c682bf124e799e Author: Gustavo A. R. Silva Date: Mon Oct 23 22:21:09 2017 -0500 usb: phy: phy-msm-usb: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1222118 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Felipe Balbi drivers/usb/phy/phy-msm-usb.c | 1 + 1 file changed, 1 insertion(+) commit d4acce95ffd337eab84746762196d0599992792a Author: Gustavo A. R. Silva Date: Mon Oct 23 22:32:44 2017 -0500 usb: gadget: f_tcm: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 703128 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Felipe Balbi drivers/usb/gadget/function/f_tcm.c | 1 + 1 file changed, 1 insertion(+) commit 457b16d4b6bb7705269306e43e25d88ffa52f8cb Author: Gustavo A. R. Silva Date: Mon Oct 23 22:45:36 2017 -0500 usb: gadget: goku_udc: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 145713 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/goku_udc.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 7f6b437e9b82a6d702a7f8f75c83ffdec6e03c54 Author: Gustavo A. R. Silva Date: Sat Oct 21 20:35:30 2017 -0500 net: smc_close: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I placed the "fall through" comment on its own line, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/smc/smc_close.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e3cf39706b89001fd7f3eba0aa70aa40379eef30 Author: Gustavo A. R. Silva Date: Thu Oct 19 16:54:48 2017 -0500 net: rxrpc: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/rxrpc/af_rxrpc.c | 2 ++ net/rxrpc/input.c | 1 + net/rxrpc/sendmsg.c | 1 + 3 files changed, 4 insertions(+) commit 6a413f5cf626defd48ed9deefe098d6d6d8659d8 Merge: fa6e23e 4e5f47a Author: David S. Miller Date: Tue Oct 24 17:54:20 2017 +0900 Merge branch 'ipv6-addrconf-hash-improvements-and-cleanups' Eric Dumazet says: ==================== ipv6: addrconf: hash improvements and cleanups Remove unecessary BH blocking, and bring IPv6 addrconf to modern world, with per netns hash perturbation and decent hash size. ==================== Signed-off-by: David S. Miller commit 4e5f47ab97ce68d9f766dfedc5762940a90e4c11 Author: Eric Dumazet Date: Mon Oct 23 16:17:51 2017 -0700 ipv6: addrconf: do not block BH in ipv6_chk_home_addr() rcu_read_lock() is enough here, no need to block BH. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrconf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a5c1d98f8ccf4359575772b36ed51f5857dd7165 Author: Eric Dumazet Date: Mon Oct 23 16:17:50 2017 -0700 ipv6: addrconf: do not block BH in /proc/net/if_inet6 handling Table is really RCU protected, no need to block BH Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrconf.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 24f226da96278bf3956dac6fa293ef95bc22a90c Author: Eric Dumazet Date: Mon Oct 23 16:17:49 2017 -0700 ipv6: addrconf: do not block BH in ipv6_get_ifaddr() rcu_read_lock() is enough here, no need to block BH. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrconf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 480318a0a4d8b0d03ddedba1bd82e78050ede661 Author: Eric Dumazet Date: Mon Oct 23 16:17:48 2017 -0700 ipv6: addrconf: do not block BH in ipv6_chk_addr_and_flags() rcu_read_lock() is enough here, as inet6_ifa_finish_destroy() uses kfree_rcu() Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrconf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3f27fb23219e75343b094366f2358bff34300493 Author: Eric Dumazet Date: Mon Oct 23 16:17:47 2017 -0700 ipv6: addrconf: add per netns perturbation in inet6_addr_hash() Bring IPv6 in par with IPv4 : - Use net_hash_mix() to spread addresses a bit more. - Use 256 slots hash table instead of 16 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/addrconf.h | 2 +- net/ipv6/addrconf.c | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) commit 752a92927e97e88096394dac3f10d12a58555254 Author: Eric Dumazet Date: Mon Oct 23 16:17:46 2017 -0700 ipv6: addrconf: factorize inet6_addr_hash() call ipv6_add_addr_hash() can compute the hash value outside of locked section and pass it to ipv6_chk_same_addr(). Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrconf.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 56fc709b7a9fe191173dc772a881e180458db517 Author: Eric Dumazet Date: Mon Oct 23 16:17:45 2017 -0700 ipv6: addrconf: move ipv6_chk_same_addr() to avoid forward declaration ipv6_chk_same_addr() is only used by ipv6_add_addr_hash(), so moving it avoids a forward declaration. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrconf.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) commit 9b7c85473cc2fa6fc4a7f87636ff2b69742b82b7 Merge: 8776fe7 65db92e Author: Ingo Molnar Date: Tue Oct 24 10:53:04 2017 +0200 Merge tag 'perf-core-for-mingo-4.15-20171023' 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: - Update vendor events JSON metrics for Intel's Broadwell, Broadwell Server, Haswell, Haswell Server, IvyBridge, IvyTown, JakeTown, Sandy Bridge, Skylake and SkyLake Server (Andi Kleen) - Add vendor event file for Intel's Goldmont Plus V1 (Kan Liang) - Move perf_mmap methods from 'perf record' and evlist.c to a separate mmap.[ch] pair, to better separate things and pave the way for further work on multithreading tools (Arnaldo Carvalho de Melo) - Do not check ABI headers in a detached tarball build, as it the kernel headers from where we copied tools/include/ are by definition not available (Arnaldo Carvalho de Melo) - Make 'perf script' use fprintf() like printing, i.e. receiving a FILE pointer so that it gets consistent with other tools/ code and allows for printing to per-event files (Arnaldo Carvalho de Melo) - Error handling fixes (resource release on exit) for 'perf script' and 'perf kmem' (Christophe JAILLET) - Make some 'perf event attr' tests optional on virtual machines, where tested counters are not available (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 72bc286b81d21404cdfecddf76b64c7163aac764 Merge: bb176f6 ad4e25a Author: Ingo Molnar Date: Tue Oct 24 10:49:44 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: - Documentation updates - Miscellaneous fixes - RCU CPU stall-warning updates - Torture-test updates Signed-off-by: Ingo Molnar commit c6cd924efe941ef62eb805c59e4a09e219ac5c6d Author: Yanjiang Jin Date: Tue Oct 24 14:23:41 2017 +0800 cpu/hotplug: Remove obsolete notifier macros commit 530e9b76ae8f ("cpu/hotplug: Remove obsolete cpu hotplug register/unregister functions")' removed the below macros: - #define CPU_UP_CANCELED 0x0004 /* CPU (unsigned)v NOT coming up */ - #define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v going down */ - #define CPU_DOWN_FAILED 0x0006 /* CPU (unsigned)v NOT going down */ But "CPU_UP_CANCELED_FROZEN, CPU_DOWN_PREPARE_FROZEN and CPU_DOWN_FAILED_FROZEN" still refer to them, and nobody uses these "FROZEN" macros now, so remove them too. Signed-off-by: Yanjiang Jin Signed-off-by: Thomas Gleixner Cc: peterz@infradead.org Cc: bigeasy@linutronix.de Cc: jinyanjiang@gmail.com Link: https://lkml.kernel.org/r/20171024062341.179678-1-yanjiang.jin@windriver.com include/linux/cpu.h | 3 --- 1 file changed, 3 deletions(-) commit fa6e23e2b2a09995bd57db559b04f3dd3fda9f7a Merge: a5dd498 9f16c8a Author: David S. Miller Date: Tue Oct 24 17:38:38 2017 +0900 Merge branch 'nfp-bpf-stack-support-in-offload' Jakub Kicinski says: ==================== nfp: bpf: stack support in offload This series brings stack support for offload. We use the LMEM (Local memory) register file as memory to store the stack. Since this is a register file we need to do appropriate shifts on unaligned accesses. Verifier's state tracking helps us with that. LMEM can't be accessed directly, so we add support for setting pointer registers through which one can read/write LMEM. This set does not support accessing the stack when the alignment is not known. This can be added later (most likely using the byte_align instructions). There is also a number of optimizations which have been left out: - in more complex non aligned accesses, double shift and rotation can save us a cycle. This, however, leads to code explosion since all access sizes have to be coded separately; - since setting LM pointers costs around 5 cycles, we should be tracking their values to make sure we don't move them when they're already set correctly for earlier access; - in case of 8 byte access aligned to 4 bytes and crossing 32 byte boundary but not crossing a 64 byte boundary we don't have to increment the pointer, but this seems like a pretty rare case to justify the added complexity. ==================== Signed-off-by: David S. Miller commit 9f16c8abcd79fc31a74d3af64f085a009c9d4b5a Author: Jakub Kicinski Date: Mon Oct 23 11:58:14 2017 -0700 nfp: bpf: optimize mov64 a little Loading 64bit constants require up to 4 load immediates, since we can only load 16 bits at a time. If the 32bit halves of the 64bit constant are the same, however, we can save a cycle by doing a register move instead of two loads of 16 bits. Note that we don't optimize the normal ALU64 load because even though it's a 64 bit load the upper half of the register is a coming from sign extension so we can load it in one cycle anyway. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit b14157eeed4eff2b293e0ca7738f6a3dbfff51cc Author: Jakub Kicinski Date: Mon Oct 23 11:58:13 2017 -0700 nfp: bpf: support stack accesses via non-constant pointers If stack pointer has a different value on different paths but the alignment to words (4B) remains the same, we can set a new LMEM access pointer to the calculated value and access whichever word it's pointing to. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 41 +++++++++++++++++++---- drivers/net/ethernet/netronome/nfp/bpf/main.h | 2 ++ drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 12 +++++-- 3 files changed, 45 insertions(+), 10 deletions(-) commit 2df03a50f14ab6d888c212aa332536933ded040a Author: Jakub Kicinski Date: Mon Oct 23 11:58:12 2017 -0700 nfp: bpf: support accessing the stack beyond 64 bytes To access beyond 64th byte of the stack we need to set a new stack pointer register (LMEM is accessed indirectly through those pointers). Add a function for encoding local CSR access instruction. Use stack pointer number 3. Note that stack pointer registers allow us to index into 32 bytes of LMEM (with shift operations i.e. when operands are restricted). This means if access is crossing 32 byte boundary we must not use offsetting, we have to set the pointer to the exact address and move it with post-increments. We depend on the datapath placing the stack base address in GPR A22 for our use. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 114 +++++++++++++++++++++-- drivers/net/ethernet/netronome/nfp/bpf/offload.c | 6 -- drivers/net/ethernet/netronome/nfp/nfp_asm.h | 5 + 3 files changed, 111 insertions(+), 14 deletions(-) commit d3488480635f453410fd27cea3fc370cedc7e28a Author: Jakub Kicinski Date: Mon Oct 23 11:58:11 2017 -0700 nfp: bpf: allow stack accesses via modified stack registers As long as the verifier tells us the stack offset exactly we can render the LMEM reads quite easily. Simply make sure that the offset is constant for a given instruction and add it to the instruction's offset. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 23 ++++++++++++---------- drivers/net/ethernet/netronome/nfp/bpf/main.h | 3 +++ drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 24 ++++++++++++++++------- 3 files changed, 33 insertions(+), 17 deletions(-) commit 9a90c83c09874a2fd03905ef0f73512c9de18799 Author: Jakub Kicinski Date: Mon Oct 23 11:58:10 2017 -0700 nfp: bpf: optimize the RMW for stack accesses When we are performing unaligned stack accesses in the 32-64B window we have to do a read-modify-write cycle. E.g. for reading 8 bytes from address 17: 0: tmp = stack[16] 1: gprLo = tmp >> 8 2: tmp = stack[20] 3: gprLo |= tmp << 24 4: tmp = stack[20] 5: gprHi = tmp >> 8 6: tmp = stack[24] 7: gprHi |= tmp << 24 The load on line 4 is unnecessary, because tmp already contains data from stack[20]. For write we can optimize both loads and writebacks away. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 33 +++++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-) commit a82b23fb38eaaaad89332b90029fc4cd7c3f2545 Author: Jakub Kicinski Date: Mon Oct 23 11:58:09 2017 -0700 nfp: bpf: add stack read support Add simple stack read support, similar to write in every aspect, but data flowing the other way. Note that unlike write which can be done in smaller than word quantities, if registers are loaded with less-than-word of stack contents - the values have to be zero extended. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 81 ++++++++++++++++++++++++++-- 1 file changed, 76 insertions(+), 5 deletions(-) commit ee9133a845fe8ad15f989e29bf8e2c8abe7986b8 Author: Jakub Kicinski Date: Mon Oct 23 11:58:08 2017 -0700 nfp: bpf: add stack write support Stack is implemented by the LMEM register file. Unaligned accesses to LMEM are not allowed. Accesses also have to be 4B wide. To support stack we need to make sure offsets of pointers are known at translation time (for now) and perform correct load/mask/shift operations. Since we can access first 64B of LMEM without much effort support only stacks not bigger than 64B. Following commits will extend the possible sizes beyond that. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 105 ++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/bpf/main.h | 3 + drivers/net/ethernet/netronome/nfp/bpf/offload.c | 14 +++ drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 30 +++++-- 4 files changed, 147 insertions(+), 5 deletions(-) commit 70c78fc138b6d0ef76d9920034e25082dd3a36ac Author: Jakub Kicinski Date: Mon Oct 23 11:58:07 2017 -0700 nfp: bpf: refactor nfp_bpf_check_ptr() nfp_bpf_check_ptr() mostly looks at the pointer register. Add a temporary variable to shorten the code. While at it make sure we print error messages if translation fails to help users identify the problem (to be carried in ext_ack in due course). Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit ff42bb9fe3091d996c763848afa3e57c2a780217 Author: Jakub Kicinski Date: Mon Oct 23 11:58:06 2017 -0700 nfp: bpf: add helper for emitting nops The need to emitting a few nops will become more common soon as we add stack and map support. Add a helper. This allows for code to be shorter but also may be handy for marking the nops with a "reason" to ease applying optimizations. Signed-off-by: Jakub Kicinski Reviewed-by: Quentin Monnet Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 96428e98aebe5db8a164711f102808651c7f518d Author: Kees Cook Date: Mon Oct 16 16:20:55 2017 -0700 PM / core: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Removes test of .data field, since that will be going away. Signed-off-by: Kees Cook Signed-off-by: Rafael J. Wysocki drivers/base/power/runtime.c | 7 +++---- drivers/base/power/wakeup.c | 11 +++++------ 2 files changed, 8 insertions(+), 10 deletions(-) commit 18f77393796848e68909e65d692c1d1436f06e06 Author: Martin Kaiser Date: Tue Oct 17 22:53:08 2017 +0200 mfd: fsl-imx25: Clean up irq settings during removal When fsl-imx25-tsadc is compiled as a module, loading, unloading and reloading the module will lead to a crash. Unable to handle kernel paging request at virtual address bf005430 [] (irq_find_matching_fwspec) from [] (of_irq_get+0x58/0x74) [] (of_irq_get) from [] (platform_get_irq+0x48/0xc8) [] (platform_get_irq) from [] (mx25_tsadc_probe+0x220/0x2f4 [fsl_imx25_tsadc]) irq_find_matching_fwspec() loops over all registered irq domains. The irq domain is still registered from last time the module was loaded but the pointer to its operations is invalid after the module was unloaded. Add a removal function which clears the irq handler and removes the irq domain. With this cleanup in place, it's possible to unload and reload the module. Signed-off-by: Martin Kaiser Reviewed-by: Lucas Stach Signed-off-by: Lee Jones drivers/mfd/fsl-imx25-tsadc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 362741a21a5c4b9ee31e75ce28d63c6d238a745c Author: Alexey Khoroshilov Date: Sat Oct 14 01:06:56 2017 +0300 mfd: mxs-lradc: Fix error handling in mxs_lradc_probe() There is the only path, where mxs_lradc_probe() leaves clk undisabled, since it does return instead of goto err_clk. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Lee Jones drivers/mfd/mxs-lradc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 07d70913dce59f3c8e5d0ca76250861158a9ca6c Author: Joakim Tjernlund Date: Wed Oct 11 12:40:55 2017 +0200 mfd: lpc_ich: Avoton/Rangeley uses SPI_BYT method Avoton/Rangeley are based on Silvermount micro-architecture, like Bay Trail, and uses the INTEL_SPI_BYT method to drive SPI. Cc: stable@vger.kernel.org Signed-off-by: Joakim Tjernlund Acked-by: Mika Westerberg Signed-off-by: Lee Jones drivers/mfd/lpc_ich.c | 1 + 1 file changed, 1 insertion(+) commit b3270a5210229ee543339d34b74ba527f978c55b Author: mike.travis@hpe.com Date: Mon Oct 23 14:18:42 2017 -0500 x86/platform/UV: Mark tsc_check_sync as an init function Fix build problem: >> WARNING: vmlinux.o(.text+0x4223a): Section mismatch in reference from the function uv_tsc_check_sync() to the function .init.text:uv_early_read_mmr() The function uv_tsc_check_sync() references the function __init uv_early_read_mmr(). This is often because uv_tsc_check_sync lacks a __init Signed-off-by: Mike Travis Signed-off-by: Thomas Gleixner Cc: Prarit Bhargava Cc: Dimitri Sivanich Cc: Russ Anderson Cc: Andrew Banman Cc: Peter Zijlstra Cc: Bin Gao Link: https://lkml.kernel.org/r/20171023191841.985614692@stormcage.americas.sgi.com arch/x86/kernel/apic/x2apic_uv_x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb9775aab2a79d09906f841ab8316379c20e5322 Merge: fef1aa4 330b52b Author: Dave Airlie Date: Tue Oct 24 16:58:39 2017 +1000 Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next Disable perfmon ioctls for now in etnaviv * 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux: drm/etnaviv: short-circuit perfmon ioctls Revert "drm/etnaviv: submit supports performance monitor requests" commit fef1aa48f488fedbbecd28995f1fd9a2ea2a7ef2 Merge: 3b677e4 af0c8c1 Author: Dave Airlie Date: Tue Oct 24 16:51:05 2017 +1000 Merge tag 'drm-misc-next-2017-10-20' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Final drm-misc feature pull for 4.15: UAPI Changes: - new madvise ioctl for vc4 (Boris) Core Changes: - plane commit tracking fixes (Maarten) - vgaarb improvements for fancy new platforms (aka ppc64 and arm64) by Bjorn Helgaas Driver Changes: - pile of new panel drivers: Toshiba LT089AC19000, Innolux AT043TN24 - more sun4i work to support A10/A20 Tcon and hdmi outputs - vc4: fix sleep in irq handler by making it threaded (Eric) - udl probe/edid read fixes (Robert Tarasov) And a bunch of misc small cleanups/refactors and doc fixes all over. * tag 'drm-misc-next-2017-10-20' of git://anongit.freedesktop.org/drm/drm-misc: (32 commits) drm/vc4: Fix sleeps during the IRQ handler for DSI transactions. drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl drm/panel: simple: add Toshiba LT089AC19000 dma-fence: remove duplicate word in comment drm/panel: simple: add delays for Innolux AT043TN24 drm/panel: simple: add bus flags for Innolux AT043TN24 drm/panel: simple: fix vertical timings for Innolux AT043TN24 drm/atomic-helper: check that drivers call drm_crtc_vblank_off drm: some KMS todo ideas vgaarb: Factor out EFI and fallback default device selection vgaarb: Select a default VGA device even if there's no legacy VGA drm/bridge: adv7511: Fix a use after free drm/sun4i: Add support for A20 display pipeline components drm/sun4i: Add support for A10 display pipeline components drm/sun4i: hdmi: Support HDMI controller on A10 drm/sun4i: tcon: Add support for A10 TCON drm/sun4i: backend: Support output muxing drm/sun4i: tcon: Move out the tcon0 common setup drm/sun4i: tcon: Don't rely on encoders to set the TCON mode drm/sun4i: tcon: Don't rely on encoders to enable the TCON ... commit 3b677e43c1191de4717357ffeb85a30b967045e4 Merge: 3064abf fb83be8 Author: Dave Airlie Date: Tue Oct 24 16:50:45 2017 +1000 Merge tag 'drm/tegra/for-4.15-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Changes for v4.15-rc1 This contains a bit of cleanup and some minor fixes for the host1x and Tegra DRM drivers. There's also some more preparatory work for Tegra186 support which I'm not quite ready to send upstream because the GPIO driver needed for HDMI support has been stuck for months, and we can't do much without it. Hopefully that driver will land in v4.15, which would mean we could go ahead with Tegra186 display support in v4.16. * tag 'drm/tegra/for-4.15-rc1' of git://anongit.freedesktop.org/tegra/linux: (21 commits) drm/tegra: hdmi: Add cec-notifier support drm/tegra: dc: Perform a complete reset sequence drm/tegra: dc: Make sure to set the module clock rate drm/tegra: dc: Simplify atomic plane helper functions drm/tegra: dc: Move some declarations to dc.h drm/tegra: vic: Use of_device_get_match_data() drm/tegra: sor: Use of_device_get_match_data() drm/tegra: hdmi: Use of_device_get_match_data() drm/tegra: dc: Use of_device_get_match_data() drm/tegra: Use u64_to_user_ptr helper gpu: host1x: Fix incorrect comment for channel_request gpu: host1x: Disassemble more instructions gpu: host1x: Improve debug disassembly formatting gpu: host1x: Enable gather filter gpu: host1x: Enable Tegra186 syncpoint protection gpu: host1x: Call of_dma_configure() after setting bus drm/tegra: Add Tegra186 support for VIC gpu: host1x: Add Tegra186 support dt-bindings: host1x: Add Tegra186 information gpu: host1x: syncpt: Request syncpoints per client ... commit 27e1acb759e0409ee140f3bdaf5c70c5582ddf91 Author: Lothar Waßmann Date: Mon Oct 23 16:56:40 2017 +0200 ARM: dts: imx53-tx53: fix interrupt flags Some interrupts properties are given '0' as the flags argument or no flags argument at all. Change them to use the appropriate interrupt flags. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-tx53-x03x.dts | 2 +- arch/arm/boot/dts/imx53-tx53.dtsi | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 06db3768effcd1fc17c445f46ce3d0ca7fc7c453 Author: Lothar Waßmann Date: Mon Oct 23 14:36:26 2017 +0200 ARM: dts: imx28-tx28: fix interrupt flags Some interrupts properties are given '0' as the flags argument. Change them to use the appropriate interrupt flags. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx28-tx28.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1a0190157521704c11f8650756388b62f3887eb3 Merge: b676da7 6ca73de Author: Takashi Iwai Date: Tue Oct 24 08:15:10 2017 +0200 Merge branch 'topic/card-disconnect' into for-next Pull snd_card_disconnect_sync() extension for ASoC hot-unplug support. Signed-off-by: Takashi Iwai commit b676da70c495acb2515de76300596e9147806ead Author: Rakesh Ughreja Date: Tue Oct 24 18:26:47 2017 +0530 ALSA: hda: Abort capability probe on invalid capability On reading wrong capability pointer values driver may crash, so whenever driver discovers unknown HDA capability, log it as error and stop traversing the link list further. Signed-off-by: Rakesh Ughreja Acked-by: Vinod Koul Signed-off-by: Takashi Iwai sound/hda/hdac_controller.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9523feac272ccad2ad8186ba4fcc89103754de52 Author: Tuomas Tynkkynen Date: Wed Sep 6 17:59:08 2017 +0300 net/9p: Switch to wait_event_killable() Because userspace gets Very Unhappy when calls like stat() and execve() return -EINTR on 9p filesystem mounts. For instance, when bash is looking in PATH for things to execute and some SIGCHLD interrupts stat(), bash can throw a spurious 'command not found' since it doesn't retry the stat(). In practice, hitting the problem is rare and needs a really slow/bogged down 9p server. Cc: stable@vger.kernel.org Signed-off-by: Tuomas Tynkkynen Signed-off-by: Al Viro net/9p/client.c | 3 +-- net/9p/trans_virtio.c | 13 ++++++------- net/9p/trans_xen.c | 4 ++-- 3 files changed, 9 insertions(+), 11 deletions(-) commit 8ee031631546cf2f7859cc69593bd60bbdd70b46 Author: Tuomas Tynkkynen Date: Wed Sep 6 17:59:07 2017 +0300 fs/9p: Compare qid.path in v9fs_test_inode Commit fd2421f54423 ("fs/9p: When doing inode lookup compare qid details and inode mode bits.") transformed v9fs_qid_iget() to use iget5_locked() instead of iget_locked(). However, the test() callback is not checking fid.path at all, which means that a lookup in the inode cache can now accidentally locate a completely wrong inode from the same inode hash bucket if the other fields (qid.type and qid.version) match. Fixes: fd2421f54423 ("fs/9p: When doing inode lookup compare qid details and inode mode bits.") Cc: stable@vger.kernel.org Reviewed-by: Latchesar Ionkov Signed-off-by: Tuomas Tynkkynen Signed-off-by: Al Viro fs/9p/vfs_inode.c | 3 +++ fs/9p/vfs_inode_dotl.c | 3 +++ 2 files changed, 6 insertions(+) commit 4a4a87146a07c866ad2ef49cc32296e6583b1cee Author: Marek Szyprowski Date: Wed Oct 18 11:56:22 2017 +0200 extcon: max77843: Add support for SmartDock accessory SmartDock uses ADC_RESERVED_ACC_3 (0x10) ADC ID type and provides following features: 1. USB host with embedded USB hub (2-4 ports) for mice, keyboard, etc, 2. MHL for video output, 3. charging. Tested with Unitek Y-2165 MHL+OTG Hub Smart Phone Dock. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Acked-by: Lee Jones Signed-off-by: Chanwoo Choi drivers/extcon/extcon-max77843.c | 77 +++++++++++++++++++++++++++++------- include/linux/mfd/max77843-private.h | 2 + 2 files changed, 65 insertions(+), 14 deletions(-) commit 7b9651103b64c8a55eb6cec4c2240584e968354c Author: Marek Szyprowski Date: Wed Oct 18 11:56:21 2017 +0200 extcon: max77843: Add OTG power control to the MUIC driver Enabling power on VBUS micro-usb pin is required only when passive OTG cable is connected. Initially OTG VBUS power control was planned to be done in charger driver. However such information is not really available from the extcon notifications, so VBUS power control has to be done directly in MUIC driver, which has all information about the attached accessory. For example SmartDock is externally powered accessory, provides OTG (USB HOST) functionality and use VBUS pin for charging a device battery, so the VBUS charging pump should be disabled in such case. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Acked-by: Lee Jones Signed-off-by: Chanwoo Choi drivers/extcon/extcon-max77843.c | 16 ++++++++++++++++ include/linux/mfd/max77843-private.h | 3 +++ 2 files changed, 19 insertions(+) commit a5dd4982879b29c7cb8fa1ba2bca9e1eb8c14dc2 Merge: 4c4fde2 0641c3c Author: David S. Miller Date: Tue Oct 24 01:25:10 2017 +0100 Merge branch 'bpftool-JSON' Jakub Kicinski says: ==================== tools: bpftool: Add JSON output to bpftool Quentin says: This series introduces support for JSON output to all bpftool commands. It adds option parsing, and several options are created: * -j, --json Switch to JSON output. * -p, --pretty Switch to JSON and print it in a human-friendly fashion. * -h, --help Print generic help message. * -V, --version Print version number. This code uses a "json_writer", which is a copy of the one written by Stephen Hemminger in iproute2. --- I don't know if there is an easy way to share the code for json_write without copying the file, so I am very open to suggestions on this matter. ==================== Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller commit 0641c3c890d480abeb237b92a5ee4b99a22319c6 Author: Quentin Monnet Date: Mon Oct 23 09:24:16 2017 -0700 tools: bpftool: update documentation for --json and --pretty usage Update the documentation to provide help about JSON output generation, and add an example in bpftool-prog manual page. Also reintroduce an example that was left aside when the tool was moved from GitHub to the kernel sources, in order to show how to mount the bpffs file system (to pin programs) inside the bpftool-prog manual page. Signed-off-by: Quentin Monnet Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/Documentation/bpftool-map.rst | 11 ++++- tools/bpf/bpftool/Documentation/bpftool-prog.rst | 61 +++++++++++++++++++++++- tools/bpf/bpftool/Documentation/bpftool.rst | 12 ++++- tools/bpf/bpftool/main.c | 6 ++- tools/bpf/bpftool/main.h | 2 + tools/bpf/bpftool/map.c | 1 + tools/bpf/bpftool/prog.c | 1 + 7 files changed, 88 insertions(+), 6 deletions(-) commit 47ff7ac6d706c6f08153294c87287aeec183b211 Author: Quentin Monnet Date: Mon Oct 23 09:24:15 2017 -0700 tools: bpftool: add cosmetic changes for the manual pages Make the look-and-feel of the manual pages somewhat closer to other manual pages, such as the ones from the utilities from iproute2, by highlighting more keywords. Signed-off-by: Quentin Monnet Acked-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/Documentation/bpftool-map.rst | 25 ++++++++++++------------ tools/bpf/bpftool/Documentation/bpftool-prog.rst | 12 ++++++------ tools/bpf/bpftool/Documentation/bpftool.rst | 12 +++++++----- 3 files changed, 26 insertions(+), 23 deletions(-) commit 004b45c0e51a8b6f20320181a946ba2d1bd3548b Author: Quentin Monnet Date: Mon Oct 23 09:24:14 2017 -0700 tools: bpftool: provide JSON output for all possible commands As all commands can now return JSON output (possibly just a "null" value), output of `bpftool --json batch file FILE` should also be fully JSON compliant. Signed-off-by: Quentin Monnet Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/main.c | 25 +++++++++++++++++++++---- tools/bpf/bpftool/map.c | 16 +++++++++++++++- tools/bpf/bpftool/prog.c | 12 +++++++++++- 3 files changed, 47 insertions(+), 6 deletions(-) commit 9a5ab8bf1d6d16ef47fdf55dba1683ec00d751ad Author: Quentin Monnet Date: Mon Oct 23 09:24:13 2017 -0700 tools: bpftool: turn err() and info() macros into functions Turn err() and info() macros into functions. In order to avoid naming conflicts with variables in the code, rename them as p_err() and p_info() respectively. The behavior of these functions is similar to the one of the macros for plain output. However, when JSON output is requested, these macros return a JSON-formatted "error" object instead of printing a message to stderr. To handle error messages correctly with JSON, a modification was brought to their behavior nonetheless: the functions now append a end-of-line character at the end of the message. This way, we can remove end-of-line characters at the end of the argument strings, and not have them in the JSON output. All error messages are formatted to hold in a single call to p_err(), in order to produce a single JSON field. Signed-off-by: Quentin Monnet Acked-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/common.c | 26 +++++++------- tools/bpf/bpftool/main.c | 16 ++++----- tools/bpf/bpftool/main.h | 37 +++++++++++++++++--- tools/bpf/bpftool/map.c | 87 +++++++++++++++++++++++++--------------------- tools/bpf/bpftool/prog.c | 51 +++++++++++++-------------- 5 files changed, 126 insertions(+), 91 deletions(-) commit 3aaca6bf7a09150e4c87f2932dc8ebe82a586252 Author: Quentin Monnet Date: Mon Oct 23 09:24:12 2017 -0700 tools: bpftool: add JSON output for `bpftool batch file FILE` command `bpftool batch file FILE` takes FILE as an argument and executes all the bpftool commands it finds inside (or stops if an error occurs). To obtain a consistent JSON output, create a root JSON array, then for each command create a new object containing two fields: one with the command arguments, the other with the output (which is the JSON object that the command would have produced, if called on its own). Signed-off-by: Quentin Monnet Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/main.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 831a0aafe5c39405150d47994fe0a5bcd78fbadc Author: Quentin Monnet Date: Mon Oct 23 09:24:11 2017 -0700 tools: bpftool: add JSON output for `bpftool map *` commands Reuse the json_writer API introduced in an earlier commit to make bpftool able to generate JSON output on `bpftool map { show | dump | lookup | getnext }` commands. Remaining commands produce no output. Some functions have been spit into plain-output and JSON versions in order to remain readable. Outputs for sample maps have been successfully tested against a JSON validator. Signed-off-by: Quentin Monnet Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/map.c | 149 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 129 insertions(+), 20 deletions(-) commit f05e2c32f715985f54265b1e237b5cce1b576c71 Author: Quentin Monnet Date: Mon Oct 23 09:24:10 2017 -0700 tools: bpftool: add JSON output for `bpftool prog dump xlated *` command Add a new printing function to dump translated eBPF instructions as JSON. As for plain output, opcodes are printed only on request (when `opcodes` is provided on the command line). The disassembled output is generated by the same code that is used by the kernel verifier. Example output: $ bpftool --json --pretty prog dump xlated id 1 [{ "disasm": "(bf) r6 = r1" },{ "disasm": "(61) r7 = *(u32 *)(r6 +16)" },{ "disasm": "(95) exit" } ] $ bpftool --json --pretty prog dump xlated id 1 opcodes [{ "disasm": "(bf) r6 = r1", "opcodes": { "code": "0xbf", "src_reg": "0x1", "dst_reg": "0x6", "off": ["0x00","0x00" ], "imm": ["0x00","0x00","0x00","0x00" ] } },{ "disasm": "(61) r7 = *(u32 *)(r6 +16)", "opcodes": { "code": "0x61", "src_reg": "0x6", "dst_reg": "0x7", "off": ["0x10","0x00" ], "imm": ["0x00","0x00","0x00","0x00" ] } },{ "disasm": "(95) exit", "opcodes": { "code": "0x95", "src_reg": "0x0", "dst_reg": "0x0", "off": ["0x00","0x00" ], "imm": ["0x00","0x00","0x00","0x00" ] } } ] Signed-off-by: Quentin Monnet Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/common.c | 10 ++++++ tools/bpf/bpftool/json_writer.c | 8 +++++ tools/bpf/bpftool/json_writer.h | 2 ++ tools/bpf/bpftool/main.h | 1 + tools/bpf/bpftool/prog.c | 70 +++++++++++++++++++++++++++++++++++++++-- 5 files changed, 89 insertions(+), 2 deletions(-) commit 107f041212c1dfd3bf72b01c0d2013e98b6f32c2 Author: Quentin Monnet Date: Mon Oct 23 09:24:09 2017 -0700 tools: bpftool: add JSON output for `bpftool prog dump jited *` command Reuse the json_writer API introduced in an earlier commit to make bpftool able to generate JSON output on `bpftool prog show *` commands. A new printing function is created to be passed as an argument to the disassembler. Similarly to plain output, opcodes are printed on request. Outputs from sample programs have been successfully tested against a JSON validator. Signed-off-by: Quentin Monnet Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/jit_disasm.c | 86 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 80 insertions(+), 6 deletions(-) commit 743cc665d5f62d2c75eceb59c461e653ad6ea58c Author: Quentin Monnet Date: Mon Oct 23 09:24:08 2017 -0700 tools: bpftool: add JSON output for `bpftool prog show *` command Reuse the json_writer API introduced in an earlier commit to make bpftool able to generate JSON output on `bpftool prog show *` commands. For readability, the code from show_prog() has been split into two functions, one for plain output, one for JSON. Outputs from sample programs have been successfully tested against a JSON validator. Signed-off-by: Quentin Monnet Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/prog.c | 139 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 107 insertions(+), 32 deletions(-) commit d35efba99d9221d9fe1715a23247ad9b703544ec Author: Quentin Monnet Date: Mon Oct 23 09:24:07 2017 -0700 tools: bpftool: introduce --json and --pretty options These two options can be used to ask for a JSON output (--j or -json), and to make this JSON human-readable (-p or --pretty). A json_writer object is created when JSON is required, and will be used in follow-up commits to produce JSON output. Note that --pretty implies --json. Update for the manual pages and interactive help messages comes in a later patch of the series. Signed-off-by: Quentin Monnet Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/main.c | 33 ++++++++++++++++++++++++++++++--- tools/bpf/bpftool/main.h | 5 +++++ 2 files changed, 35 insertions(+), 3 deletions(-) commit a2bc2e5c2c0604bf5366b5e56ef46335adaf7491 Author: Quentin Monnet Date: Mon Oct 23 09:24:06 2017 -0700 tools: bpftool: add option parsing to bpftool, --help and --version Add an option parsing facility to bpftool, in prevision of future options for demanding JSON output. Currently, two options are added: --help and --version, that act the same as the respective commands `help` and `version`. Signed-off-by: Quentin Monnet Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/Documentation/bpftool-map.rst | 8 +++++++ tools/bpf/bpftool/Documentation/bpftool-prog.rst | 8 +++++++ tools/bpf/bpftool/Documentation/bpftool.rst | 8 +++++++ tools/bpf/bpftool/main.c | 27 +++++++++++++++++++++++- 4 files changed, 50 insertions(+), 1 deletion(-) commit b66e907cfee240a09a4b5aabf950a0d4c8da8d32 Author: Quentin Monnet Date: Mon Oct 23 09:24:05 2017 -0700 tools: bpftool: copy JSON writer from iproute2 repository In prevision of following commits, supposed to add JSON output to the tool, two files are copied from the iproute2 repository (taken at commit 268a9eee985f): lib/json_writer.c and include/json_writer.h. Signed-off-by: Quentin Monnet Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/json_writer.c | 348 ++++++++++++++++++++++++++++++++++++++++ tools/bpf/bpftool/json_writer.h | 70 ++++++++ 2 files changed, 418 insertions(+) commit 4c4fde210ce665d400e5d859a62e792dcb1bbf37 Merge: bded442 e8fce23 Author: David S. Miller Date: Tue Oct 24 01:21:26 2017 +0100 Merge branch 'tcp-tracepoints' Song Liu says: ==================== net: add a set of tracepoints to tcp stack Changes from v1: Fix build error (with ipv6 as ko) by adding EXPORT_TRACEPOINT_SYMBOL_GPL for trace_tcp_send_reset. These patches add the following tracepoints to tcp stack. tcp_send_reset tcp_receive_reset tcp_destroy_sock tcp_set_state These tracepoints can be used to track TCP state changes. Such state changes include but are not limited to: connection establish, connection termination, tx and rx of RST, various retransmits. Currently, we use the following kprobes to trace these events: int kprobe__tcp_validate_incoming int kprobe__tcp_send_active_reset int kprobe__tcp_v4_send_reset int kprobe__tcp_v6_send_reset int kprobe__tcp_v4_destroy_sock int kprobe__tcp_set_state int kprobe__tcp_retransmit_skb These tracepoints will help us simplify this work. ==================== Signed-off-by: David S. Miller commit e8fce23946b7e7eadf25ad78d8207c22903dfe27 Author: Song Liu Date: Mon Oct 23 09:20:27 2017 -0700 tcp: add tracepoint trace_tcp_set_state() This patch adds tracepoint trace_tcp_set_state. Besides usual fields (s/d ports, IP addresses), old and new state of the socket is also printed with TP_printk, with __print_symbolic(). Signed-off-by: Song Liu Signed-off-by: David S. Miller include/trace/events/tcp.h | 76 ++++++++++++++++++++++++++++++++++++++++++++++ net/ipv4/tcp.c | 4 +++ 2 files changed, 80 insertions(+) commit e1a4aa50f47303ebb3ca0cfd01687884551ce03d Author: Song Liu Date: Mon Oct 23 09:20:26 2017 -0700 tcp: add tracepoint trace_tcp_destroy_sock This patch adds trace event trace_tcp_destroy_sock. Signed-off-by: Song Liu Signed-off-by: David S. Miller include/trace/events/tcp.h | 7 +++++++ net/ipv4/tcp_ipv4.c | 2 ++ 2 files changed, 9 insertions(+) commit 5941521c05d69cf3f2b1293eefd21207e083b70f Author: Song Liu Date: Mon Oct 23 09:20:25 2017 -0700 tcp: add tracepoint trace_tcp_receive_reset New tracepoint trace_tcp_receive_reset is added and called from tcp_reset(). This tracepoint is define with a new class tcp_event_sk. Signed-off-by: Song Liu Signed-off-by: David S. Miller include/trace/events/tcp.h | 66 ++++++++++++++++++++++++++++++++++++++++++++++ net/ipv4/tcp_input.c | 3 +++ 2 files changed, 69 insertions(+) commit c24b14c46bb88d844275de5c4024c8745ae89d42 Author: Song Liu Date: Mon Oct 23 09:20:24 2017 -0700 tcp: add tracepoint trace_tcp_send_reset New tracepoint trace_tcp_send_reset is added and called from tcp_v4_send_reset(), tcp_v6_send_reset() and tcp_send_active_reset(). Signed-off-by: Song Liu Signed-off-by: David S. Miller include/trace/events/tcp.h | 11 +++++++++++ net/core/net-traces.c | 2 ++ net/ipv4/tcp_ipv4.c | 6 +++++- net/ipv4/tcp_output.c | 5 +++++ net/ipv6/tcp_ipv6.c | 10 ++++++++-- 5 files changed, 31 insertions(+), 3 deletions(-) commit 7344e29f285a94b965075599731811c352f3ab40 Author: Song Liu Date: Mon Oct 23 09:20:23 2017 -0700 tcp: mark trace event arguments sk and skb as const Some functions that we plan to add trace points require const sk and/or skb. So we mark these fields as const in the tracepoint. Signed-off-by: Song Liu Signed-off-by: David S. Miller include/trace/events/tcp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f6e37b25413cf636369668652e9752ee77c7d9f7 Author: Song Liu Date: Mon Oct 23 09:20:22 2017 -0700 tcp: add trace event class tcp_event_sk_skb Introduce event class tcp_event_sk_skb for tcp tracepoints that have arguments sk and skb. Existing tracepoint trace_tcp_retransmit_skb() falls into this class. This patch rewrites the definition of trace_tcp_retransmit_skb() with tcp_event_sk_skb. Signed-off-by: Song Liu Signed-off-by: David S. Miller include/trace/events/tcp.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit bded4422f79a26587e015824a1a22811a8e3b749 Merge: 5908064 24e750c Author: David S. Miller Date: Tue Oct 24 01:16:42 2017 +0100 Merge branch 'hns3-next' Lipeng says: ==================== net: hns3: bug fixes & code improvements This patchset introduces various HNS3 bug fixes, optimizations and code improvements. ==================== Signed-off-by: David S. Miller commit 24e750c410ae046d1236af50014cbc697bb375d7 Author: Lipeng Date: Mon Oct 23 19:51:07 2017 +0800 net: hns3: fix a bug about hns3_clean_tx_ring The return value of hns3_clean_tx_ring means tx ring clean result. Return true means clean complete and there is no more pakcet need clean. Retrun false means there is packets need clean and napi need poll again. The last return of hns3_clean_tx_ring is "return !!budget" as budget will decrease when clean a buffer. If there is no valid BD in TX ring, return 0 for hns3_clean_tx_ring will cause napi poll again and never complete the napi poll. This patch fixes the bug. Fixes: 76ad4f0 (net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC) Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 6 +++--- drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 51145dae2748233315a7a411cd97f4bedf8cc22f Author: Lipeng Date: Mon Oct 23 19:51:06 2017 +0800 net: hns3: remove redundant memset when alloc buffer HW will use packet length to write packets to buffer or read packets from buffer. There is a redundant memset when alloc buffer, the memset have no sense and will increase time-consuming. This patch removes it. Fixes: 76ad4f0 (net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC) Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 2 -- 1 file changed, 2 deletions(-) commit 66b447301ac710ee237dba8b653244018fbb6168 Author: Lipeng Date: Mon Oct 23 19:51:05 2017 +0800 net: hns3: fix the TX/RX ring.queue_index in hns3_ring_get_cfg The interface hns3_ring_get_cfg only update TX ring queue_index, but do not update RX ring queue_index. This patch fixes it. Fixes: 76ad4f0 (net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC) Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 709eb41ad8cd56ee68f9ca5140cfd46839d35837 Author: Lipeng Date: Mon Oct 23 19:51:04 2017 +0800 net: hns3: get vf count by pci_sriov_get_totalvfs This patch gets vf count by standard function pci_sriov_get_totalvfs, instead of info from NIC HW. Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7410343eab04088225267949477d1c7b5f9598fc Author: Lipeng Date: Mon Oct 23 19:51:03 2017 +0800 net: hns3: fix the ops check in hns3_get_rxnfc 1# patch: 07d2995 net: hns3: add support for ETHTOOL_GRXFH. 2# patch: 5668abd net: hns3: add support for set_ringparam. 1# patch adds ae_algo->ops->get_rss_tuple to hns3_get_rxnfc and 2# patch delete ae_algo->ops->get_tc_size from hns3_get_rxnfc.This patch fix the ops check in hns3_get_rxnfc. Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 564883bb4dc1a4f3cba6344e77743175694b0761 Author: Lipeng Date: Mon Oct 23 19:51:02 2017 +0800 net: hns3: fix the bug when map buffer fail If one buffer had been recieved to stack, driver will alloc a new buffer, map the buffer to device and replace the old buffer. When map fail, should only free the new alloced buffer, but not free all buffers in the ring. Fixes: 76ad4f0 (net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC) Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9077428ec5569aacb2952d8a2ffb51c8988d3c2 Author: Lipeng Date: Mon Oct 23 19:51:01 2017 +0800 net: hns3: fix a bug when alloc new buffer When alloce new buffer to HW, should unmap the old buffer first. This old code map the old buffer but not unmap the old buffer, this patch fixes it. Fixes: 76ad4f0 (net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC) Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5908064a0beb074b637df1e865c1f0738157ce8e Merge: 058c8d5 40b16b9 Author: David S. Miller Date: Tue Oct 24 01:15:03 2017 +0100 Merge tag 'batadv-next-for-davem-20171023' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This documentation/cleanup patchset includes the following patches: - Fix parameter kerneldoc which caused kerneldoc warnings, by Sven Eckelmann - Remove spurious warnings in B.A.T.M.A.N. V neighbor comparison, by Sven Eckelmann - Use inline kernel-doc style for UAPI constants, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit a11bc476b987925654369411dd8281a60cb5a175 Author: Dmitry Torokhov Date: Mon Sep 4 12:19:07 2017 -0700 Input: uinput - fold header into the driver proper There is nothing in the uinput kernel header that is of use to anyone in the kernel besides the uinput driver itself, so let's fold it into the driver code (leaving uapi part intact). Signed-off-by: Dmitry Torokhov drivers/input/misc/uinput.c | 40 +++++++++++++++++++++- include/linux/uinput.h | 81 --------------------------------------------- 2 files changed, 39 insertions(+), 82 deletions(-) commit 04ce40a61a9164f82065eade491099b185c17a65 Author: Dmitry Torokhov Date: Wed Sep 6 16:42:26 2017 -0700 Input: uinput - remove uinput_allocate_device() There is no need for this wrapper; let's use input_allocate_device() directly, and complete initialization in uinput_create_device(). Signed-off-by: Dmitry Torokhov drivers/input/misc/uinput.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) commit c06616528f283c05ebcd24a12cf80007efbe8f21 Author: Dmitry Torokhov Date: Wed Sep 6 16:34:31 2017 -0700 Input: uinput - fix coding style in uinput_ioctl_handler() "case"s in switch statement were indented extra level, let's fix that. Signed-off-by: Dmitry Torokhov drivers/input/misc/uinput.c | 231 ++++++++++++++++++++++---------------------- 1 file changed, 115 insertions(+), 116 deletions(-) commit 8e009118a45af30451ff4bbae2b6efd9575d6694 Author: Dmitry Torokhov Date: Wed Sep 6 16:31:29 2017 -0700 Input: uinput - allow FF requests to time out Previously uinput force feedback requests waited for the userspace indefinitely, which caused users to block when uinput server process become unresponsive. Let's establish a 30 seconds deadline for servicing upload and erase force feedback effect actions, so that users have a chance to abort stuck requests. Signed-off-by: Dmitry Torokhov drivers/input/misc/uinput.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8446b32b0675b432451bdb35bd193597477f1bfa Author: stephen lu Date: Mon Oct 23 14:51:37 2017 -0700 Input: ad7877 - convert to using timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Stephen Lu Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ad7877.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 82565a120544b2bdfaf602d9f5e7b9ab9a342ae8 Author: stephen lu Date: Mon Oct 23 14:43:53 2017 -0700 Input: gpio-keys - convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Stephen Lu Signed-off-by: Dmitry Torokhov drivers/input/keyboard/gpio_keys.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 34445d4b3814b22a225819566f85516f3b04808f Author: Kees Cook Date: Thu Oct 19 17:22:46 2017 -0700 Input: ff_memless - convert to using timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Reviewed-by: Pali Rohár Signed-off-by: Dmitry Torokhov drivers/input/ff-memless.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 17a58edc79a0c8cbfe1a74669089f5a1a0157365 Author: Kees Cook Date: Mon Oct 23 11:54:25 2017 -0700 Input: alps - convert to using timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Reviewed-by: Pali Rohár Signed-off-by: Dmitry Torokhov drivers/input/mouse/alps.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ce23cbc857e0b1bccdc11ffa2fb8286021c70eec Author: Kees Cook Date: Thu Oct 19 17:22:46 2017 -0700 Input: byd - convert to using timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Reviewed-by: Pali Rohár Signed-off-by: Dmitry Torokhov drivers/input/mouse/byd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 65db92e0965ab56e8031d5c804f26d5be0e47047 Author: Kan Liang Date: Wed Oct 18 06:05:07 2017 -0700 perf vendor events: Add Goldmont Plus V1 event file Add a Intel event file for perf. Signed-off-by: Kan Liang Acked-by: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Sukadev Bhattiprolu Link: http://lkml.kernel.org/r/1508331907-395162-1-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/goldmontplus/cache.json | 1453 ++++++++++++++++++++ .../pmu-events/arch/x86/goldmontplus/frontend.json | 62 + .../pmu-events/arch/x86/goldmontplus/memory.json | 38 + .../pmu-events/arch/x86/goldmontplus/other.json | 98 ++ .../pmu-events/arch/x86/goldmontplus/pipeline.json | 544 ++++++++ .../arch/x86/goldmontplus/virtual-memory.json | 218 +++ tools/perf/pmu-events/arch/x86/mapfile.csv | 1 + 7 files changed, 2414 insertions(+) commit b1f03ca4ee784390457dfb2009601cd7dcac025e Author: Arnaldo Carvalho de Melo Date: Thu Oct 19 15:11:17 2017 -0300 perf namespaces: Add more appropriate set of headers We don't need perf.h, that is a kitchen sink, all we need is perf_events.h for perf_ns_link_info, sys/types.h for pid_t and linux/types.h for u64, list_head. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Li Zhijian Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-f2uxyaj4s2hmntkrezpa6dqz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/namespaces.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 79f56ebe2ae33aa54c69bbc9854a9a31f622913e Author: Christophe JAILLET Date: Sat Sep 16 08:09:36 2017 +0200 perf kmem: Perform some cleanup if '--time' is given an invalid value If the string passed in '--time' is invalid, we must do some cleanup before leaving. As in the other error handling paths of this function. Signed-off-by: Christophe JAILLET Cc: Alexander Shishkin Cc: Peter Zijlstra Cc: kernel-janitors@vger.kernel.org Fixes: 2a865bd8dddd ("perf kmem: Add option to specify time window of interest") Link: http://lkml.kernel.org/r/20170916060936.28199-1-christophe.jaillet@wanadoo.fr Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit db49bc155ad9f04ea3c4e1c9ae87850610feb1ce Author: Christophe JAILLET Date: Sat Sep 16 08:25:37 2017 +0200 perf script: Fix error handling path If the string passed in '--time' is invalid, or if failed to set libtraceevent function resolver, we must do some cleanup before leaving. As in the other error handling paths of this function. Signed-off-by: Christophe JAILLET Cc: Alexander Shishkin Cc: Peter Zijlstra Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/20170916062537.28921-1-christophe.jaillet@wanadoo.fr Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a1a587073ccdc6ffae414259f65d0a94cadd0a72 Author: Arnaldo Carvalho de Melo Date: Tue Oct 17 10:54:24 2017 -0300 perf script: Use fprintf like printing uniformly We've been mixing print() with fprintf() style printing for a while, but now we need to use fprintf() like syntax uniformly as a preparatory patch for supporting printing to different files, one per event. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: yuzhoujian Link: http://lkml.kernel.org/n/tip-kv5z3v8ptfghbarv3a9usvin@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 491 +++++++++++++++++++++++--------------------- 1 file changed, 259 insertions(+), 232 deletions(-) commit 923d0c9ae570c3f33a0b5a9517c23ccc816d9b75 Author: Arnaldo Carvalho de Melo Date: Tue Oct 17 10:35:00 2017 -0300 perf tools: Introduce binary__fprintf() Out of print_binary() but receiving a fp pointer and expecting that the printer be a fprintf like function, i.e. receive a FILE pointer and return the number of characters printed. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Cc: yuzhoujian Link: http://lkml.kernel.org/n/tip-6oqnxr6lmgqe6q6p3iugnscx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-script.c | 32 +++++++++++++++++--------------- tools/perf/builtin-trace.c | 14 +++++++------- tools/perf/util/debug.c | 31 +++++++++++++++++-------------- tools/perf/util/print_binary.c | 30 ++++++++++++++++-------------- tools/perf/util/print_binary.h | 18 +++++++++++++----- 5 files changed, 70 insertions(+), 55 deletions(-) commit 7958e541495d7f99cefef2300b2c388865626c2e Author: Andi Kleen Date: Fri Oct 13 16:31:56 2017 -0700 perf vendor events: Fix incorrect cmask syntax for some Intel metrics Some of the metrics use an incorrect syntax for specifying the cmask for an event. Convert to perf syntax so that they can be resolved. Fixes metrics on Broadwell, SandyBridge. Signed-off-by: Andi Kleen Link: http://lkml.kernel.org/n/tip-3k3fkfj8obek9dkmryyrqzhu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/broadwell/bdw-metrics.json | 4 ++-- tools/perf/pmu-events/arch/x86/broadwellx/bdx-metrics.json | 2 +- tools/perf/pmu-events/arch/x86/jaketown/jkt-metrics.json | 2 +- tools/perf/pmu-events/arch/x86/sandybridge/snb-metrics.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit d7e05ceaa93417f6f0077444eb111f64df823d25 Author: Arnaldo Carvalho de Melo Date: Mon Oct 16 15:53:08 2017 -0300 perf tools: Do not check ABI headers in a detached tarball build When we use one of: [acme@jouet linux]$ make help | grep perf perf-tar-src-pkg - Build perf-4.14.0-rc3.tar source tarball perf-targz-src-pkg - Build perf-4.14.0-rc3.tar.gz source tarball perf-tarbz2-src-pkg - Build perf-4.14.0-rc3.tar.bz2 source tarball perf-tarxz-src-pkg - Build perf-4.14.0-rc3.tar.xz source tarball [acme@jouet linux]$ I.e. when we create a detached tarball to build perf outside outside the enveloping kernel sources (from a kernel tarball or a checked out linux.git directory) we by definition can't check for differences among the tools/{include,arch}, etc files we originally copied from the kernel, so bail out in that case, to avoid warnings when doing the detached builds. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-vbrga0mhplv7niwxr3ghjyxv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/check-headers.sh | 5 +++++ 1 file changed, 5 insertions(+) commit 91de76e661a266731fc2889a398ad1694df9d523 Merge: aed5d0e bb176f6 Author: Dmitry Torokhov Date: Mon Oct 23 11:43:40 2017 -0700 Merge tag 'v4.14-rc6' into next Merge with mainline to bring in the timer API changes. commit 3f3d60d6254cfe0b1a2ab675ec1f72f232314eff Author: Jacek Anaszewski Date: Mon Oct 9 20:59:11 2017 +0200 Documentation: leds: Update 00-INDEX file Add missing entries for the following documentation files: - leds-class-flash.txt - leds-lm3556.txt - leds-mlxcpld.txt - ledtrig-usbport.txt - uleds.txt Signed-off-by: Jacek Anaszewski Acked-by: Pavel Machek Documentation/leds/00-INDEX | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e3075fd6f80c9a6ce678fa2f5bbdb2824c506c6c Author: Kuppuswamy Sathyanarayanan Date: Sat Oct 7 15:19:51 2017 -0700 platform/x86: intel_pmc_ipc: Use spin_lock to protect GCR updates Currently, update_no_reboot_bit() function implemented in this driver uses mutex_lock() to protect its register updates. But this function is called with in atomic context in iTCO_wdt_start() and iTCO_wdt_stop() functions in iTCO_wdt.c driver, which in turn causes "sleeping into atomic context" issue. This patch fixes this issue by replacing the mutex_lock() with spin_lock() to protect the GCR read/write/update APIs. Fixes: 9d855d4 ("platform/x86: intel_pmc_ipc: Fix iTCO_wdt GCS memory mapping failure") Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_pmc_ipc.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 76c48e1ecaf34eccaf1bddc462159e82be3d609a Author: Masahiro Yamada Date: Tue Oct 24 01:42:29 2017 +0900 arm64: dts: uniphier: add resets properties Add resets properties to all nodes that have reset lines. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 12 ++++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 12 ++++++++++++ arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi | 11 +++++++++++ 3 files changed, 35 insertions(+) commit a1763a82a3e5896fa39b9e4e7b9f42c8f39390ae Author: Masahiro Yamada Date: Tue Oct 24 01:42:28 2017 +0900 ARM: dts: uniphier: add resets properties Add resets properties to all nodes that have reset lines. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-ld4.dtsi | 9 +++++++++ arch/arm/boot/dts/uniphier-pro4.dtsi | 11 +++++++++++ arch/arm/boot/dts/uniphier-pro5.dtsi | 11 +++++++++++ arch/arm/boot/dts/uniphier-pxs2.dtsi | 12 ++++++++++++ arch/arm/boot/dts/uniphier-sld8.dtsi | 9 +++++++++ 5 files changed, 52 insertions(+) commit b6e5ec203be3cfc0a3aeb128520ab72438495470 Author: Masahiro Yamada Date: Tue Oct 24 00:21:37 2017 +0900 arm64: dts: uniphier: add eMMC hardware reset provider node Add mmc-pwrseq-emmc node to perform standard eMMC hardware reset procedure. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 8 ++++++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 7 +++++++ arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi | 8 ++++++++ 3 files changed, 23 insertions(+) commit 15e85695e5009f6ba7aef05306d69f1ffc021df2 Author: Masahiro Yamada Date: Wed Oct 18 13:24:37 2017 +0900 arm64: dts: uniphier: add GPIO hog definition Interrupt lines from on-board devices are connected to the GPIO controller. Add GPIO hogging so that the corresponding GPIO line is automatically requested. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dts | 8 ++++++++ arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts | 8 ++++++++ 2 files changed, 16 insertions(+) commit 429f203eb7126461180b4d64acd4f650ec3db387 Author: Masahiro Yamada Date: Wed Oct 18 13:24:35 2017 +0900 arm64: dts: uniphier: route on-board device IRQ to GPIO controller Interrupt lines from on-board devices are connected to the GPIO controller. Handle this correctly. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11-ref.dts | 3 ++- arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 277b51e7050f3a0fb79c49e6177ccad901bb2a2d Author: Masahiro Yamada Date: Wed Oct 18 13:24:33 2017 +0900 arm64: dts: uniphier: add GPIO controller nodes The GPIO controller also acts as an interrupt controller and the interrupt lines are connected to the AIDET block. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 25 ++++++++++++++++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 19 ++++++++++++++++++ arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi | 19 ++++++++++++++++++ 3 files changed, 63 insertions(+) commit 346d64d380672f106c6ab8a4911d447816131b62 Author: Masahiro Yamada Date: Wed Oct 18 13:24:36 2017 +0900 ARM: dts: uniphier: add GPIO hog definition Interrupt lines from on-board devices are connected to the GPIO controller. Add GPIO hogging so that the corresponding GPIO line is automatically requested. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-ld4-ref.dts | 8 ++++++++ arch/arm/boot/dts/uniphier-ld6b-ref.dts | 8 ++++++++ arch/arm/boot/dts/uniphier-pro4-ref.dts | 8 ++++++++ arch/arm/boot/dts/uniphier-sld8-ref.dts | 8 ++++++++ 4 files changed, 32 insertions(+) commit 2bef7ca3798f2c3001ba4bbc7b998ec784ee997a Author: Masahiro Yamada Date: Wed Oct 18 13:24:34 2017 +0900 ARM: dts: uniphier: route on-board device IRQ to GPIO controller Interrupt lines from on-board devices are connected to the GPIO controller. Handle this correctly. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-ld4-ref.dts | 2 +- arch/arm/boot/dts/uniphier-ld6b-ref.dts | 2 +- arch/arm/boot/dts/uniphier-pro4-ref.dts | 2 +- arch/arm/boot/dts/uniphier-sld8-ref.dts | 2 +- arch/arm/boot/dts/uniphier-support-card.dtsi | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) commit 5d4bc4bd41261e5630cdd76639e9c8329ab4f4e5 Author: Masahiro Yamada Date: Wed Oct 18 13:24:32 2017 +0900 ARM: dts: uniphier: add GPIO controller nodes The GPIO controller also acts as an interrupt controller and the interrupt lines are connected to the AIDET block. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-ld4.dtsi | 14 ++++++++++++++ arch/arm/boot/dts/uniphier-pro4.dtsi | 14 ++++++++++++++ arch/arm/boot/dts/uniphier-pro5.dtsi | 14 ++++++++++++++ arch/arm/boot/dts/uniphier-pxs2.dtsi | 17 +++++++++++++++++ arch/arm/boot/dts/uniphier-sld8.dtsi | 18 ++++++++++++++++++ 5 files changed, 77 insertions(+) commit a5e50220edbdd1ec8912c191a0f5272d629743bf Author: Rajneesh Bhardwaj Date: Tue Oct 10 15:35:19 2017 +0530 platform/x86: intel_telemetry: cleanup redundant headers Removes unnecessary header files included in the driver and sorts the remaining ones in the alphabetical order. Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_telemetry_core.c | 3 +-- drivers/platform/x86/intel_telemetry_debugfs.c | 8 +++----- drivers/platform/x86/intel_telemetry_pltdrv.c | 8 -------- 3 files changed, 4 insertions(+), 15 deletions(-) commit 999c8397df590aad2ed8e67250ccf4816484153b Author: Rajneesh Bhardwaj Date: Tue Oct 10 15:35:18 2017 +0530 platform/x86: intel_telemetry: Fix typos Telemetry word is misspelled several times in this file as Telemtry. This fixes the spelling mistake and folds in another minor typo. Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_telemetry_pltdrv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 2cb81ac0787774e63fa48ca1a10c667f0d091a8f Author: Rajneesh Bhardwaj Date: Tue Oct 10 15:35:17 2017 +0530 platform/x86: intel_telemetry: Fix load failure info Intel Telemetry driver depends on IPC1 interface. If IPC1 interface is disabled on a given platform by the system firmware, the driver does not load but prints misleading information in the dmesg logs. Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_telemetry_pltdrv.c | 1 - 1 file changed, 1 deletion(-) commit f0d962392abc5b41d66ac4f7b723c82ba4f80582 Author: Colin Ian King Date: Wed Oct 11 10:30:10 2017 +0100 platform/x86: intel_cht_int33fe: make a couple of local functions static The functions cht_int33fe_check_for_max17047 and cht_int33fe_find_max17047 are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'cht_int33fe_check_for_max17047' was not declared. Should it be static? symbol 'cht_int33fe_find_max17047' was not declared. Should it be static? Signed-off-by: Colin Ian King Reviewed-by: Hans de Goede Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_cht_int33fe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9cd7d03f2085c7f2e11d2f97812d1955bc0dc4df Author: Masahiro Yamada Date: Sun Oct 15 17:22:22 2017 +0900 arm64: dts: uniphier: fix W=2 build warnings Fix warnings like follows: Warning (node_name_chars_strict): Character '_' not recommended in ... Commit 8654cb8d0371 ("dtc: update warning settings for new bus and node/property name checks") says these checks are a bit subjective, but Rob also says to not add new W=2 warnings. The exising warnings should be fixed in order to catch new ones easily. Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 2 +- arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 4 ++-- arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 070ea018fa092f2ef41bef57896665a25f05d2d8 Author: Lixin Wang Date: Mon Oct 23 11:19:53 2017 +0800 of: dynamic: fix memory leak related to properties of __of_node_dup If a node with no properties is dynamically added, then a property is dynamically added to the node, then the property is dynamically removed, the result will be node->properties == NULL and node->deadprops != NULL. Add a separate function to release the properties in both lists. Signed-off-by: Lixin Wang Reviewed-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/dynamic.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 216218308cfb0939aeecb246b34faf6e179c8d57 Author: Vladimir Murzin Date: Mon Oct 16 13:00:45 2017 +0100 ARM: 8713/1: NOMMU: Support MPU in XIP configuration Currently, there is assumption in early MPU setup code that kernel image is located in RAM, which is obviously not true for XIP. To run code from ROM we need to make sure that it is covered by MPU. However, due to we allocate regions (semi-)dynamically we can run into issue of trimming region we are running from in case ROM spawns several MPU regions. To help deal with that we enforce minimum alignments for start end end of XIP address space as 1MB and 128Kb correspondingly. Tested-by: Alexandre TORGUE Tested-by: Benjamin Gaignard Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/Kconfig-nommu | 2 +- arch/arm/include/asm/mpu.h | 3 ++- arch/arm/kernel/head-nommu.S | 20 ++++++++++++++++ arch/arm/kernel/vmlinux-xip.lds.S | 23 ++++++++++++++++++ arch/arm/mm/pmsa-v7.c | 49 +++++++++++++++++++++++++++++++++++---- 5 files changed, 90 insertions(+), 7 deletions(-) commit 5c9d9a1b3a540779ba3f2d5e81150b2d92dcb74a Author: Vladimir Murzin Date: Mon Oct 16 12:59:15 2017 +0100 ARM: 8712/1: NOMMU: Use more MPU regions to cover memory PMSAv7 defines curious alignment requirements to the regions: - size must be power of 2, and - region start must be aligned to the region size Because of that we currently adjust lowmem bounds plus we assign only one MPU region to cover memory all these lead to significant amount of memory could be wasted. As an example, consider 64Mb of memory at 0x70000000 - it fits alignment requirements nicely; now, imagine that 2Mb of memory is reserved for coherent DMA allocation, so now Linux is expected to see 62Mb of memory... and here annoying thing happens - memory gets truncated to 32Mb (we've lost 30Mb!), i.e. MPU layout looks like: 0: base 0x70000000, size 0x2000000 This patch tries to allocate as much as possible MPU slots to minimise amount of truncated memory. Moreover, with this patch MPU subregions starting to get used. MPU subregions allow us reduce the number of MPU slots used. For example given above, MPU layout looks like: 0: base 0x70000000, size 0x2000000 1: base 0x72000000, size 0x1000000 2: base 0x73000000, size 0x1000000, disable subreg 7 (0x73e00000 - 0x73ffffff) Where without subregions we'd get: 0: base 0x70000000, size 0x2000000 1: base 0x72000000, size 0x1000000 2: base 0x73000000, size 0x800000 3: base 0x73800000, size 0x400000 4: base 0x73c00000, size 0x200000 To achieve better layout we fist try to cover specified memory as is (maybe with help of subregions) and if we failed, we truncate memory to fit alignment requirements (so it occupies one MPU slot) and perform one more attempt with the reminder, and so on till we either cover all memory or run out of MPU slots. Tested-by: Szemző András Tested-by: Alexandre TORGUE Tested-by: Benjamin Gaignard Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/include/asm/mpu.h | 5 ++ arch/arm/mm/pmsa-v7.c | 190 ++++++++++++++++++++++++++++++++++----------- 2 files changed, 149 insertions(+), 46 deletions(-) commit 9fcb01a9f54c28062a73a545c29137a4cc104c72 Author: Vladimir Murzin Date: Mon Oct 16 12:57:48 2017 +0100 ARM: 8711/1: V7M: Add support for MPU to M-class This patch makes it possible to use MPU with v7M cores. Tested-by: Szemző András Tested-by: Alexandre TORGUE Tested-by: Benjamin Gaignard Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/Kconfig-nommu | 4 +-- arch/arm/include/asm/cputype.h | 10 ++++++++ arch/arm/include/asm/v7m.h | 10 ++++++++ arch/arm/kernel/head-nommu.S | 56 ++++++++++++++++++++++++++++++------------ arch/arm/mm/pmsa-v7.c | 53 +++++++++++++++++++++++++++++++++++++-- 5 files changed, 113 insertions(+), 20 deletions(-) commit 89a6dafe136952b3409d5e4ed04cb891e806e924 Author: Vladimir Murzin Date: Mon Oct 16 12:56:18 2017 +0100 ARM: 8710/1: Kconfig: Kill CONFIG_VECTORS_BASE The last user of CONFIG_VECTORS_BASE has gone, so kill it. Tested-by: Benjamin Gaignard Reported-by: Afzal Mohammed Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/Kconfig | 9 --------- 1 file changed, 9 deletions(-) commit df8089e7f343e3a6744df9d05f3e4c225deddadb Author: Vladimir Murzin Date: Mon Oct 16 12:55:06 2017 +0100 ARM: 8709/1: NOMMU: Disallow MPU for XIP It seems that MPU never worked with XIP, so we just disallow such combination. Tested-by: Szemző András Tested-by: Alexandre TORGUE Tested-by: Benjamin Gaignard Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/Kconfig-nommu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0995c0805b63c930b99970f2c9d5e4f167ca65b Author: Vladimir Murzin Date: Mon Oct 16 12:54:05 2017 +0100 ARM: 8708/1: NOMMU: Rework MPU to be mostly done in C Currently, there are several issues with how MPU is setup: 1. We won't boot if MPU is missing 2. We won't boot if use XIP 3. Further extension of MPU setup requires asm skills The 1st point can be relaxed, so we can continue with boot CPU even if MPU is missed and fail boot for secondaries only. To address the 2nd point we could create region covering CONFIG_XIP_PHYS_ADDR - _end and that might work for the first stage of MPU enable, but due to MPU's alignment requirement we could cover too much, IOW we need more flexibility in how we're partitioning memory regions... and it'd be hardly possible to archive because of the 3rd point. This patch is trying to address 1st and 3rd issues and paves the path for 2nd and further improvements. The most visible change introduced with this patch is that we start using mpu_rgn_info array (as it was supposed?), so change in MPU setup done by boot CPU is recorded there and feed to secondaries. It allows us to keep minimal region setup for boot CPU and do the rest in C. Since we start programming MPU regions in C evaluation of MPU constrains (number of regions supported and minimal region order) can be done once, which in turn open possibility to free-up "probe" region early. Tested-by: Szemző András Tested-by: Alexandre TORGUE Tested-by: Benjamin Gaignard Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/include/asm/mpu.h | 2 +- arch/arm/include/asm/smp.h | 2 +- arch/arm/kernel/asm-offsets.c | 11 ++++++ arch/arm/kernel/head-nommu.S | 80 +++++++++++++++++++++++++++++++++---------- arch/arm/kernel/smp.c | 2 +- arch/arm/mm/pmsa-v7.c | 70 +++++++++++++++++++++++++++---------- 6 files changed, 127 insertions(+), 40 deletions(-) commit e8b47e12d6c72f26a8ce85974f98a4050ac7ca24 Author: Vladimir Murzin Date: Mon Oct 16 12:53:18 2017 +0100 ARM: 8707/1: NOMMU: Update MPU accessors to use cp15 helpers Currently, inline assembly for accessing to MPU's cp15 lacks volatile keyword which opens possibility to compiler to optimise such accesses as soon as we start using them more intensively. Rather than fixing inline asm, lets move MPU accessors to use cp15 helpers which do the right thing. Tested-by: Szemző András Tested-by: Alexandre TORGUE Tested-by: Benjamin Gaignard Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/mm/pmsa-v7.c | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) commit 877ec119dbbf9576953efc457ede5243621ad6eb Author: Vladimir Murzin Date: Mon Oct 16 12:52:35 2017 +0100 ARM: 8706/1: NOMMU: Move out MPU setup in separate module Having MPU handling code in dedicated module makes it easier to enhance/maintain it. Tested-by: Szemző András Tested-by: Alexandre TORGUE Tested-by: Benjamin Gaignard Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/include/asm/mpu.h | 16 ++- arch/arm/mm/Makefile | 1 + arch/arm/mm/nommu.c | 254 +------------------------------------------ arch/arm/mm/pmsa-v7.c | 262 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 276 insertions(+), 257 deletions(-) commit 6fbf248a20d362a92de60beee9474faca0b54eee Merge: de4ce2d bb176f6 Author: Greg Kroah-Hartman Date: Mon Oct 23 17:21:44 2017 +0200 Merge 4.14-rc6 into char-misc-next We want the driver fixes in here and this resolves a merge issue with the binder driver. Signed-off-by: Greg Kroah-Hartman commit e62a538da2e7401bad5293d210ce00583ac12f39 Author: Nitzan Carmi Date: Sun Oct 22 09:37:04 2017 +0000 nvme-rdma: Add debug message when reaches timeout Signed-off-by: Nitzan Carmi Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 4 ++++ 1 file changed, 4 insertions(+) commit f87c89ad93c95857c4d4b19ca580e27994254b7f Author: Max Gurtovoy Date: Mon Oct 23 12:59:27 2017 +0300 nvme-rdma: align nvme_rdma_device structure Signed-off-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 696e2457e9fd285034cd30cd8c93ece5e6cfe35a Author: Jiri Olsa Date: Wed Oct 11 17:01:24 2017 +0200 perf annotate: Remove arch::cpuid_parse callback There's no need for extra cpuid_parse arch callback, it can be handled directly in init callback. Adding the init function to x86 to cover the cpuid initialization. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20171011150158.11895-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/arm/annotate/instructions.c | 3 ++- tools/perf/arch/arm64/annotate/instructions.c | 3 ++- tools/perf/arch/powerpc/annotate/instructions.c | 4 +++- tools/perf/arch/s390/annotate/instructions.c | 4 +++- tools/perf/arch/x86/annotate/instructions.c | 14 ++++++++++++++ tools/perf/util/annotate.c | 10 +++------- 6 files changed, 27 insertions(+), 11 deletions(-) commit 98ad761bd3989a71be2b100002be923466617394 Author: Andi Kleen Date: Tue Oct 10 15:43:22 2017 -0700 perf list: Fix group description in the man page Fix an incorrect description in the 'perf list' manpage. When a group does not fit into the hardware it is partially scheduled, but does not error out. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20171010224322.15861-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-list.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 692f5a22cd284bb8233a38e3ed86881d2d9c89d4 Author: Jiri Olsa Date: Mon Oct 9 15:07:12 2017 +0200 perf tests attr: Make hw events optional Otherwise we fail on virtual machines with no support for specific HW events. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20171009130712.14747-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/attr/test-stat-C0 | 1 + tools/perf/tests/attr/test-stat-basic | 1 + tools/perf/tests/attr/test-stat-default | 4 ++++ tools/perf/tests/attr/test-stat-detailed-1 | 8 ++++++++ tools/perf/tests/attr/test-stat-detailed-2 | 13 +++++++++++++ tools/perf/tests/attr/test-stat-detailed-3 | 13 +++++++++++++ tools/perf/tests/attr/test-stat-no-inherit | 1 + 7 files changed, 41 insertions(+) commit 73c17d815000e425aea108226bcb57491a04f534 Author: Arnaldo Carvalho de Melo Date: Fri Oct 6 10:46:01 2017 -0300 perf mmap: Adopt push method from builtin-record.c The previous prep patch was just to show exactly what changed in that function, now its time to move that method and things only it uses to the right place, mmap.[ch] Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-aaxywfgw3d44x6xlu8zm1avu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 100 -------------------------------------------- tools/perf/util/mmap.c | 100 ++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/mmap.h | 3 ++ 3 files changed, 103 insertions(+), 100 deletions(-) commit d37f1586d0023443e2e64937769bbb1bc078866a Author: Arnaldo Carvalho de Melo Date: Thu Oct 5 16:39:55 2017 -0300 perf record: Make record__mmap_read generic It becomes a perf_mmap method, "push", that build reads from a mmap and "pushes" it to a consumer, that in the initial case, for 'perf record', just writes it to the perf.data file descriptor, but may be used by 'top', etc. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-u4l1qjbi6l76r2k0nv99220n@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-record.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 1695849735752d2ace22d8c424ba579e33df691c Author: Arnaldo Carvalho de Melo Date: Fri Oct 6 10:31:47 2017 -0300 perf mmap: Move perf_mmap and methods to separate mmap.[ch] files To better organize the sources, and we may end up even using it directly, without evlists and evsels. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-oiqrm7grflurnnzo2ovfnslg@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/Build | 1 + tools/perf/util/evlist.c | 248 ------------------------------------ tools/perf/util/evlist.h | 76 +---------- tools/perf/util/mmap.c | 252 +++++++++++++++++++++++++++++++++++++ tools/perf/util/mmap.h | 94 ++++++++++++++ tools/perf/util/python-ext-sources | 1 + 6 files changed, 349 insertions(+), 323 deletions(-) commit ead81ee4f887c2e6205dacb83ab2e24367a003c1 Author: Andi Kleen Date: Thu Sep 14 13:02:28 2017 -0700 perf vendor events: Update JSON metrics for Skylake Server Signed-off-by: Andi Kleen Link: http://lkml.kernel.org/r/20170914200748.GA13837@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/skylakex/skx-metrics.json | 42 +++++++--------------- 1 file changed, 12 insertions(+), 30 deletions(-) commit e3f2dadf76591a085e61db45736c3a4a9369b314 Author: Andi Kleen Date: Thu Sep 14 13:01:08 2017 -0700 perf vendor events: Update JSON metrics for Skylake Signed-off-by: Andi Kleen Link: http://lkml.kernel.org/r/20170914200748.GA13837@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/skylake/skl-metrics.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 41a13b74a0406955c488000aeca4021c0efdd243 Author: Andi Kleen Date: Thu Sep 14 13:01:01 2017 -0700 perf vendor events: Update JSON metrics for Sandy Bridge Signed-off-by: Andi Kleen Link: http://lkml.kernel.org/r/20170914200748.GA13837@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/sandybridge/snb-metrics.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 984d91f4c62f64026cbfef51f609971025934cec Author: Andi Kleen Date: Thu Sep 14 13:00:51 2017 -0700 perf vendor events: Update JSON metrics for JakeTown Signed-off-by: Andi Kleen Link: http://lkml.kernel.org/r/20170914200748.GA13837@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/jaketown/jkt-metrics.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7347bba5552f479d4292ffd008d18d41a965f021 Author: Andi Kleen Date: Thu Sep 14 13:00:44 2017 -0700 perf vendor events: Update JSON metrics for IvyTown Signed-off-by: Andi Kleen Link: http://lkml.kernel.org/r/20170914200748.GA13837@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../perf/pmu-events/arch/x86/ivytown/ivt-metrics.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 1de315249415863dca167623909fb7951569cf8d Author: Andi Kleen Date: Thu Sep 14 13:00:37 2017 -0700 perf vendor events: Update JSON metrics for IvyBridge Signed-off-by: Andi Kleen Link: http://lkml.kernel.org/r/20170914200748.GA13837@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/ivybridge/ivb-metrics.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 9cd6d864662dfe7a0c5c64fe37dc243c0aea7483 Author: Andi Kleen Date: Thu Sep 14 13:00:29 2017 -0700 perf vendor events: Update JSON metrics for Haswell Server Signed-off-by: Andi Kleen Link: http://lkml.kernel.org/r/20170914200748.GA13837@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/haswellx/hsx-metrics.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 0fba08e2492027ce2c016172ba326c40c32a6ec6 Author: Andi Kleen Date: Thu Sep 14 13:00:16 2017 -0700 perf vendor events: Update JSON metrics for Haswell Signed-off-by: Andi Kleen Link: http://lkml.kernel.org/r/20170914200748.GA13837@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/arch/x86/haswell/hsw-metrics.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 663ad445640feeeffb3d405bd60a4b1e44019c56 Author: Andi Kleen Date: Thu Sep 14 13:00:07 2017 -0700 perf vendor events: Update JSON metrics for Broadwell Server Signed-off-by: Andi Kleen Link: http://lkml.kernel.org/r/20170914200748.GA13837@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/broadwellx/bdx-metrics.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 008de6c69ccb9b62110188fb76b9e425cca686e4 Author: Andi Kleen Date: Thu Sep 14 12:59:55 2017 -0700 perf vendor events: Update JSON metrics for Broadwell Signed-off-by: Andi Kleen Link: http://lkml.kernel.org/r/20170914200748.GA13837@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/broadwell/bdw-metrics.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit f0a559aae57cb824c8178d1042c60e5975ceb2a6 Author: Anurag Kumar Vulisha Date: Mon Aug 21 13:17:24 2017 +0200 ata: ceva: Add SMMU support for SATA IP AXI master interface in CEVA AHCI controller requires two unique Write/Read ID tags per port. This is because, ahci controller uses different AXI ID[3:0] bits for identifying non-data transfers(like reading descriptors, updating PRD tables, etc) and data transfers (like sending/receiving FIS).To make SMMU work with SATA we need to add correct SMMU stream id for SATA. SMMU stream id for SATA is determined based on the AXI ID[1:0] as shown below SATA SMMU ID = , 0011, 00, 00, AXI ID[1:0] Note: SATA in ZynqMp uses TBU1 so TBU number = 0x1, so SMMU ID = 001, 0011, 00, 00, AXI ID[1:0] Since we have four different AXI ID[3:0] (2 for port0 & 2 for port1 as said above) we get four different SMMU stream id's combinations for SATA. These AXI ID can be configured using PAXIC register. In this patch we assumed the below AXI ID values Read ID/ Write ID for Non-Data Port0 transfers = 0 Read ID/ Write ID for Data Port0 transfers = 1 Read ID/ Write ID for Non-Data Port1 transfers = 2 Read ID/ Write ID for Data Port1 transfers = 3 Based on the above values,SMMU stream ID's for SATA will be 0x4c0 & 0x4c1 for PORT0, 0x4c2 & 0x4c3 for PORT1. These values needed to be added to iommus dts property. This patch does the same. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Michal Simek Signed-off-by: Tejun Heo drivers/ata/ahci_ceva.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 26bf3b6658a2137cd6a88b2f14f36d3c31c7b2ee Author: Anurag Kumar Vulisha Date: Mon Aug 21 13:17:23 2017 +0200 ata: ceva: Correct the suspend and resume logic for SATA The present suspend code disables the port interrupts and stops the HBA. On resume it enables the interrupts and HBA. This works fine until the FPD power domain is not off. If FPD is off then the ceva vendor specific configurations like OOB, AXI settings are lost, they need to be re-programmed and also since SERDES is also in FPD , SATA lane phy init needs to be called again (which is not happening in the present sequence) Because of this incorrect sequence SATA fails to work on resume. This patch corrects the code to make Suspend & Resume work in normal and FPD off cases. Signed-off-by: Anurag Kumar Vulisha Reviewed-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Tejun Heo drivers/ata/ahci_ceva.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) commit 6e037fb7708653035adbcd739ac295b9744e06cf Author: Anurag Kumar Vulisha Date: Mon Aug 21 13:17:22 2017 +0200 ata: ceva: Correct the AXI bus configuration for SATA ports Previously PAXIC register was programmed before configuring PCFG register. PCFG should be programmed with the address of the port for which PAXIC should be configured for. This was not happening before, so only one port PAXIC was written correctly and the other port was having wrong value. This patch moves the PXAIC register write after configuring PCFG, doing so will correct the axi bus settings for sata port0 & port1. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Michal Simek Signed-off-by: Tejun Heo drivers/ata/ahci_ceva.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 3bc867de85b5bfb2c1ba04b509783b92360af07d Author: Anurag Kumar Vulisha Date: Mon Aug 21 13:17:21 2017 +0200 ata: ceva: Add CCI support for SATA if CCI is enabled This patch adds support for CCI in SATA controller if CCI is enabled in design. This patch will add CCI settings for SATA if "dma-coherent" dts property is added. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Michal Simek Signed-off-by: Tejun Heo drivers/ata/ahci_ceva.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 05e890d8438651777cf05a19aa3c29519cd762ea Author: Anurag Kumar Vulisha Date: Mon Aug 21 13:17:20 2017 +0200 ata: ceva: Make RxWaterMark value as module parameter This patch updates the driver to make Rx Fifo water mark value as a module parameter. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Michal Simek Signed-off-by: Tejun Heo drivers/ata/ahci_ceva.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ff0d63778ca0c2cec9ce33d69b69fe5f8567169b Author: Anurag Kumar Vulisha Date: Mon Aug 21 13:17:19 2017 +0200 ata: ceva: Disable Device Sleep capability Since CEVA controller does not support Device Sleep capability, we need to clear that feature by clearing the DEVSLP bit in word78 of IDENTIFY DEVICE data. This patch does the same. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Michal Simek Signed-off-by: Tejun Heo drivers/ata/ahci_ceva.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit e8fc8b858cd85de20350bfc72df18306129305b8 Author: Anurag Kumar Vulisha Date: Mon Aug 21 13:17:18 2017 +0200 ata: ceva: Add gen 3 mode support in driver This patch sets gen 3 mode as default mode in ahci_ceva driver. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Michal Simek Signed-off-by: Tejun Heo drivers/ata/ahci_ceva.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fe8365bbf8ac58f98a9a85105a6df468e1a4d489 Author: Anurag Kumar Vulisha Date: Mon Aug 21 13:17:17 2017 +0200 ata: ceva: Move sata port phy oob settings to device-tree In SATA Speed negotiation happens with OOB(Out of Band) signals. These OOB signal timing values are configured through vendor specific registers in the SATA controller. These OOB timings depends on the generator and detector clock frequency, which varies from board to board (ex: ep108 and zc1751 has different clock frequencies). To avoid maintaing these OOB settings in the driver, it is better to move these settings to the device-tree node and read from the device-tree. This patch does the same. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Michal Simek Signed-off-by: Tejun Heo drivers/ata/ahci_ceva.c | 84 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 23 deletions(-) commit 9053f4b9855c91f8905114c2108d5397be83bcf3 Author: Anurag Kumar Vulisha Date: Mon Aug 21 13:17:16 2017 +0200 devicetree: bindings: Add sata port phy config parameters in ahci-ceva This patch adds device tree bindings for sata port phy parameters in the ahci-ceva.txt file. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Michal Simek Acked-by: Rob Herring Signed-off-by: Tejun Heo .../devicetree/bindings/ata/ahci-ceva.txt | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 05b83605992b3d6cd53f8d339842a3b4530ab6e8 Author: Gustavo A. R. Silva Date: Thu Oct 12 14:19:16 2017 -0500 ata: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. In cases where a "drop through" comment was already in place, I replaced it with a proper "fall through" comment, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Tejun Heo drivers/ata/libahci_platform.c | 1 + drivers/ata/libata-core.c | 3 +++ drivers/ata/libata-eh.c | 2 ++ drivers/ata/pata_atp867x.c | 2 ++ drivers/ata/sata_mv.c | 4 ++-- 5 files changed, 10 insertions(+), 2 deletions(-) commit 14d7045c7f3b0a9d3b00274c23d7d516fc6d44d9 Author: Colin Ian King Date: Mon Oct 16 12:00:11 2017 +0100 ata: sata_mv: remove a redundant assignment to pointer ehi The pointer ehi is being assigned to a value that is never read and is redundant. Clean up the code and move the ehi declaration and initialization to the code block where it is used. Cleans up clang warning: Value stored to 'ehi' is never read Signed-off-by: Colin Ian King Signed-off-by: Tejun Heo drivers/ata/sata_mv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 45653c845b0c670b7a194acc6a90bc70aa049252 Author: sayli karnik Date: Sat Sep 9 22:26:18 2017 +0530 scripts: Add a script to find unused documentation Add a script that finds files with kernel-doc comments for imported functions that are not included anywhere in documentation. Signed-off-by: sayli karnik Signed-off-by: Jonathan Corbet scripts/find-unused-docs.sh | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 7706abf5a0eb4c082897fd2a17a0ac0898e39666 Merge: ca3c585 bb176f6 Author: Greg Kroah-Hartman Date: Mon Oct 23 14:29:43 2017 +0200 Merge 4.14-rc6 into staging-next We want the IIO and staging driver fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 0520d37bb3d49f8e62e30c80b001e0003b3f3ca9 Merge: 8dd8d2c bb176f6 Author: Greg Kroah-Hartman Date: Mon Oct 23 14:24:37 2017 +0200 Merge 4.14-rc6 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 40b16b9be5773a314948656c96adf7bf7cfdbd0b Author: Sven Eckelmann Date: Sat Oct 21 11:45:46 2017 +0200 batman-adv: use inline kernel-doc for uapi constants The enums of constants for netlink tends to become rather large over time. Documenting them is easier when the kernel-doc is actually next to constant and not in a different block above the enum. Also inline kernel-doc allows multi-paragraph description. This could be required to better document the netlink command types and the expected return values. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich include/uapi/linux/batman_adv.h | 369 +++++++++++++++++++++++++++++++--------- 1 file changed, 290 insertions(+), 79 deletions(-) commit 8776fe75dc0e263ed2056ea9896c2267599dc447 Author: Kees Cook Date: Fri Oct 20 06:31:27 2017 -0700 lkdtm, kprobes: Convert from jprobes to kprobes The jprobes subsystem is being removed, so convert to using kprobes instead. Signed-off-by: Kees Cook Acked-by: Masami Hiramatsu Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171020133127.GA18360@beast Signed-off-by: Ingo Molnar drivers/misc/lkdtm_core.c | 154 ++++++++++++++-------------------------------- 1 file changed, 45 insertions(+), 109 deletions(-) commit 82c62fa0c49aa305104013cee4468772799bb391 Author: Josh Poimboeuf Date: Fri Oct 20 11:21:35 2017 -0500 x86/asm: Don't use the confusing '.ifeq' directive I find the '.ifeq ' directive to be confusing. Reading it quickly seems to suggest its opposite meaning, or that it's missing an argument. Improve readability by replacing all of its x86 uses with '.if == 0'. Signed-off-by: Josh Poimboeuf Cc: Andrei Vagin Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/757da028e802c7e98d23fbab8d234b1063e161cf.1508516398.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/entry/entry_64.S | 2 +- arch/x86/kernel/head_32.S | 2 +- arch/x86/kernel/head_64.S | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit bae9525531c1f73bfd9b34d2e065d95a352ba9da Merge: f95b23a 6a93bb7 Author: Ingo Molnar Date: Mon Oct 23 13:31:17 2017 +0200 Merge branch 'core/objtool' into x86/asm, to pick up dependent changes Signed-off-by: Ingo Molnar commit f95b23a112f1a31ea042483540cd907b58d23a5f Merge: da20ab3 58c3862 Author: Ingo Molnar Date: Mon Oct 23 13:30:47 2017 +0200 Merge branch 'x86/urgent' into x86/asm, to pick up dependent fixes Signed-off-by: Ingo Molnar commit c49870e89f4d2c21c76ebe90568246bb0f3572b7 Author: Dongjiu Geng Date: Tue Oct 17 16:02:20 2017 +0800 ACPI / APEI: remove the unused dead-code for SEA/NMI notification type For the SEA notification, the two functions ghes_sea_add() and ghes_sea_remove() are only called when CONFIG_ACPI_APEI_SEA is defined. If not, it will return errors in the ghes_probe() and not continue. If the probe is failed, the ghes_sea_remove() also has no chance to be called. Hence, remove the unnecessary handling when CONFIG_ACPI_APEI_SEA is not defined. For the NMI notification, it has the same issue as SEA notification, so also remove the unused dead-code for it. Signed-off-by: Dongjiu Geng Tested-by: Tyler Baicar Reviewed-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/ghes.c | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) commit 69941bab7c7aeaa7bf7e84397e294c17f0b7c6df Author: Kuninori Morimoto Date: Wed Oct 11 01:38:51 2017 +0000 ASoC: snd_soc_component_driver has non_legacy_dai_naming Codec will be replaced into Component, then Codec side doesn't use legacy_dai_naming on snd_soc_register_dais(). This patch adds new non_legacy_dai_naming flag on Component driver and use converted its value for snd_soc_register_dais(). When Codec is replaced into Component, Codec driver needs to have non_legacy_dai_naming = 1 flags. Existing CPU side of course doesn't have this flag, thus CPU calls it as true. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 1 + sound/soc/soc-core.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 273d778ef38a8861f880e9df5799029dc82bd55d Author: Kuninori Morimoto Date: Wed Oct 11 01:38:29 2017 +0000 ASoC: snd_soc_component_driver has endianness Codec will be replaced into Component, then Codec side only needs to call fixup_codec_formats() at this point. This patch adds new endianness flag on Component driver and call convert_endianness_formats() (= was fixup_codec_format()) if endianness was true. When Codec is replaced into Component, Codec driver needs to have endianness = 1 flags. Existing CPU side of course doesn't have this flag, thus CPU doesn't call it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 1 + sound/soc/soc-core.c | 80 +++++++++++++++++++++++++++++----------------------- 2 files changed, 46 insertions(+), 35 deletions(-) commit de4ce2d1ad1bb3304d4107160c9551b7fd8d8ec5 Author: Guilherme G. Piccoli Date: Fri Oct 20 17:27:49 2017 -0200 genwqe: Take R/W permissions into account when dealing with memory pages Currently we assume userspace pages are always writable when doing memory pinning. This is not true, specially since userspace applications may allocate their memory the way they want, we have no control over it. If a read-only page is set for pinning, currently the driver fails due to get_user_pages_fast() refusing to map read-only pages as writable. This patch changes this behavior, by taking the permission flags of the pages into account in both pinning/unpinning process, as well as in the DMA data copy-back to userpace (which we shouldn't try to do blindly, since it will fail in case of read-only-pages). Signed-off-by: Frank Haverkamp Signed-off-by: Guilherme G. Piccoli Signed-off-by: Greg Kroah-Hartman drivers/misc/genwqe/card_base.h | 7 ++++++- drivers/misc/genwqe/card_dev.c | 6 +++++- drivers/misc/genwqe/card_utils.c | 43 +++++++++++++++++++++++++--------------- 3 files changed, 38 insertions(+), 18 deletions(-) commit 8dd8d2c95d0252bc64aa8e061a5fb4fbcd05f826 Author: Daniel Drake Date: Wed Oct 18 15:15:01 2017 +0800 USB: Force disconnect Huawei 4G modem during suspend When going into S3 suspend, the Acer TravelMate P648-M and P648-G3 laptops immediately wake up 3-4 seconds later for no obvious reason. Unbinding the integrated Huawei 4G LTE modem before suspend avoids the issue, even though we are not using the modem at all (checked from rescue.target/runlevel1). The problem also occurs when the option and cdc-ether modem drivers aren't loaded; it reproduces just with the base usb driver. Under Windows the system can suspend fine. Seeking a better fix, we've tried a lot of things, including: - Check that the device's power/wakeup is disabled - Check that remote wakeup is off at the USB level - All the quirks in drivers/usb/core/quirks.c e.g. USB_QUIRK_RESET_RESUME, USB_QUIRK_RESET, USB_QUIRK_IGNORE_REMOTE_WAKEUP, USB_QUIRK_NO_LPM. but none of that makes any difference. There are no errors in the logs showing any suspend/resume-related issues. When the system wakes up due to the modem, log-wise it appears to be a normal resume. Introduce a quirk to disable the port during suspend when the modem is detected. The modem from the P648-G3 model is: T: Bus=01 Lev=01 Prnt=01 Port=08 Cnt=04 Dev#= 5 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=ff MxPS=64 #Cfgs= 3 P: Vendor=12d1 ProdID=15c3 Rev= 1.02 S: Manufacturer=Huawei Technologies Co., Ltd. S: Product=HUAWEI Mobile S: SerialNumber=0123456789ABCDEF C: #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr= 2mA I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=06 Prot=10 Driver= E: Ad=82(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=13 Driver= E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=12 Driver= E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=06 Prot=16 Driver= E: Ad=86(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 3 Alt= 1 #EPs= 3 Cls=ff(vend.) Sub=06 Prot=16 Driver= E: Ad=86(I) Atr=03(Int.) MxPS= 16 Ivl=2ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=1b Driver= E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms C:* #Ifs= 6 Cfg#= 2 Atr=a0 MxPwr= 2mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether E: Ad=82(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=06 Prot=00 Driver=cdc_ether E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=06 Prot=10 Driver=option E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=13 Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=12 Driver=option E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=1b Driver=option E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms C: #Ifs= 2 Cfg#= 3 Atr=a0 MxPwr= 2mA A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00 I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver= E: Ad=82(I) Atr=03(Int.) MxPS= 16 Ivl=2ms I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver= I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver= E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Based on an earlier patch by Chris Chiu. Signed-off-by: Daniel Drake Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/core/driver.c | 10 +++++++++- drivers/usb/core/hub.c | 13 +++++++++++++ drivers/usb/core/quirks.c | 6 ++++++ drivers/usb/core/usb.h | 1 + include/linux/usb/quirks.h | 6 ++++++ 5 files changed, 35 insertions(+), 1 deletion(-) commit 9f8e32dfca2aab9dea8a9db335e3a783b0035507 Author: Jaejoong Kim Date: Fri Oct 20 16:29:15 2017 +0900 usb: misc: usbtest: remove duplicate & operation usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] by & operation with 0x7ff. So, we can remove the duplicate & operation with 0x7ff. Signed-off-by: Jaejoong Kim Signed-off-by: Greg Kroah-Hartman drivers/usb/misc/usbtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7eef2ced8e7b2b4a06fd66e7d03df1f90fa67c9 Author: Chunfeng Yun Date: Fri Oct 13 16:26:41 2017 +0800 dt-bindings: usb: mtk-xhci: remove dummy clocks and add optional ones Remove dummy clocks for usb wakeup and add optional ones for MCU_BUS_CK and DMA_BUS_CK. Signed-off-by: Chunfeng Yun Acked-by: Rob Herring Reviewed-by: Matthias Brugger Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/usb/mediatek,mtk-xhci.txt | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 2fbf8050dde85ed14a944035e1d7ca7eb8240eec Author: Chunfeng Yun Date: Fri Oct 13 16:26:40 2017 +0800 dt-bindings: usb: mtk-xhci: add a optional property to disable u3ports Add a new optional property to disable u3ports Signed-off-by: Chunfeng Yun Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt | 2 ++ 1 file changed, 2 insertions(+) commit 7b81a586517cae20b7402ca57a4c98fbd69728eb Author: Chunfeng Yun Date: Fri Oct 13 16:26:39 2017 +0800 usb: host: modify description for MTK xHCI config Due to all MediaTek SoCs with xHCI host controller use this driver, remove limitation for specific SoCs Signed-off-by: Chunfeng Yun Acked-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b6bb72cf0df128397312b6239d6c5f5702dfc6fc Author: Chunfeng Yun Date: Fri Oct 13 16:26:38 2017 +0800 usb: xhci-mtk: add optional mcu and dma bus clocks There are mcu_bus and dma_bus clocks needed to be controlled by driver on some SoCs, so add them as optional ones Signed-off-by: Chunfeng Yun Acked-by: Mathias Nyman Reviewed-by: Matthias Brugger Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 79 ++++++++++++++++++++++++++++++++++----------- drivers/usb/host/xhci-mtk.h | 2 ++ 2 files changed, 62 insertions(+), 19 deletions(-) commit 603fbd15357d808ec24d0a7e5e0aaad9cc7fcd48 Author: Chunfeng Yun Date: Fri Oct 13 16:26:37 2017 +0800 usb: xhci-mtk: remove dummy wakeup debounce clocks The wakeup debounce clocks for each ports in fact are not needed, so remove them. Signed-off-by: Chunfeng Yun Acked-by: Mathias Nyman Reviewed-by: Matthias Brugger Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 33 --------------------------------- drivers/usb/host/xhci-mtk.h | 2 -- 2 files changed, 35 deletions(-) commit 55ba6e9e25a6e64c3e05f2d7bc1359719530fb6b Author: Chunfeng Yun Date: Fri Oct 13 16:26:36 2017 +0800 usb: xhci-mtk: support option to disable usb3 ports Add support to disable specific usb3 ports, it's useful when usb3 phy is shared with PCIe or SATA, because we should disable the corresponding usb3 port if the phy is used by PCIe or SATA. Sometimes it's helpful to analyse and solve problems. Signed-off-by: Chunfeng Yun Acked-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 18 +++++++++++++++--- drivers/usb/host/xhci-mtk.h | 1 + 2 files changed, 16 insertions(+), 3 deletions(-) commit ce370bfdb9b30830e9ddb88ba8bde2efdd0c9dc0 Author: Chunfeng Yun Date: Fri Oct 13 16:26:35 2017 +0800 usb: xhci-mtk: check clock stability of U3_MAC This is useful to find out the root cause when the Super Speed doesn't work. Such as when the T-PHY is switched to PCIe or SATA, and affects Super Speed function, the check will fail. Signed-off-by: Chunfeng Yun Acked-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8465d3e4e7cf8ae9dfd8e206e8077c24d6c0cf4c Author: Chunfeng Yun Date: Fri Oct 13 16:26:34 2017 +0800 usb: xhci-mtk: use ports count from xhci in xhci_mtk_sch_init() Make use of ports count from xhci but not from ippc in xhci_mtk_sch_init() Signed-off-by: Chunfeng Yun Acked-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk-sch.c | 3 ++- drivers/usb/host/xhci-mtk.c | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) commit da087419c05c0e2124dcdd6eda29e4ee64b78c9d Author: Chunfeng Yun Date: Fri Oct 13 16:26:33 2017 +0800 usb: xhci-mtk: use dma_set_mask_and_coherent() in probe function This patch uses the simpler dma_set_mask_and_coherent() instead of doing these as separate steps Signed-off-by: Chunfeng Yun Acked-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mtk.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit fbb16563c6c2b7fc4944adc49f93c1dc6fe25770 Author: Kuninori Morimoto Date: Wed Oct 11 01:38:08 2017 +0000 ASoC: snd_soc_component_driver has pmdown_time Current snd_soc_runtime_ignore_pmdown_time() tallys all Codec and CPU's "ignore_pmdown_time". Now, CPU (= via compoent) ignore_pmdown_time is fixed as "true". Codec's one is copied from Codec driver. This means Codec side default is "false". Current all Codec driver will be replaced into Component, thus, we can use for_each_rtdcom() for this totalization. This patch adds new "pmdown_time" on Component driver. Its inverted value will be used for this "ignore" totalizaton. Of course all existing Component driver doesn't have its settings now, thus, all existing "pmdown_time" is "false". This means all Components will ignore pmdown time. This is current CPU behavior. To keep compatibility, snd_soc_runtime_ignore_pmdown_time() totalize Component's inverted "pmdown_time" (= total will be true) and Codec's "ignore_pmdown_time" (= depends on Codec driver settings). Because It is using AND operation, its result is based on Codec driver settings only. This means this operation can keep compatibility and doesn't have nonconformity. When we replace Codec to Component, the driver which has ".ignore_pmdown_time = true" will be just removed, and the driver which doesn't have it will have new ".pmdown_time = true". Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 1 + sound/soc/soc-pcm.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) commit 9e7e3738ab0e908c72dae4ff45481a0568924e62 Author: Kuninori Morimoto Date: Wed Oct 11 01:37:45 2017 +0000 ASoC: snd_soc_component_driver has snd_compr_ops Platform will be replaced into Component in the future. snd_soc_platform_driver has snd_compr_ops, but snd_soc_component_driver doesn't have. To prepare for replacing, this patch adds snd_compr_ops on component driver. platform will be replaced into component, and its code will be removed. But during replacing, both platform and component process code exists. To keep compatibility, to avoid platform NULL access and to avoid platform/component duplicate operation during replacing process, this patch has such code. Some of this code will be removed when platform was removed. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 1 + sound/soc/soc-compress.c | 461 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 428 insertions(+), 34 deletions(-) commit b8135864d4d33d0c35516ec758b9b73226935c5d Author: Kuninori Morimoto Date: Wed Oct 11 01:37:23 2017 +0000 ASoC: snd_soc_component_driver has snd_pcm_ops Platform will be replaced into Component in the future. snd_soc_platform_driver has snd_pcm_ops, but snd_soc_component_driver doesn't have it. To prepare for replacing, this patch adds snd_pcm_ops on component driver. platform will be replaced into component, and its code will be removed. But during replacing, both platform and component process code exists. To keep compatibility, to avoid platform NULL access and to avoid platform/component duplicate operation during replacing process, this patch has such code. Some of this code will be removed when platform was removed. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 2 + sound/soc/soc-pcm.c | 367 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 355 insertions(+), 14 deletions(-) commit 978d6fac5d0617c9722ae1db1accee46776f4400 Author: Johan Hovold Date: Thu Oct 12 15:28:18 2017 +0200 serdev: fix controller-allocation error handling Reorder controller initialisation so that in the unlikely event that id allocation fails, we don't end up releasing id 0 in the destructor. Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/core.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 08fcee289f341786eb3b44e5f2d1dc850943238e Author: Johan Hovold Date: Tue Oct 10 18:09:49 2017 +0200 serdev: fix registration of second slave Serdev currently only supports a single slave device, but the required sanity checks to prevent further registration attempts were missing. If a serial-port node has two child nodes with compatible properties, the OF code would try to register two slave devices using the same id and name. Driver core will not allow this (and there will be loud complaints), but the controller's slave pointer would already have been set to address of the soon to be deallocated second struct serdev_device. As the first slave device remains registered, this can lead to later use-after-free issues when the slave callbacks are accessed. Note that while the serdev registration helpers are exported, they are typically only called by serdev core. Any other (out-of-tree) callers must serialise registration and deregistration themselves. Fixes: cd6484e1830b ("serdev: Introduce new bus for serial attached devices") Cc: stable # 4.11 Cc: Rob Herring Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/core.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 7c63838ea5afb15a60c58a2f0fe8ac093fc9f1a5 Author: Johan Hovold Date: Mon Oct 16 15:06:20 2017 +0200 serdev: ttyport: add missing open() error handling Add missing error handling for tty-driver open() which may fail (e.g. if resource allocation fails or if a port is being disconnected). Note that close() must be called also in case of failed open() and that the operation sanity check is amended to catch buggy drivers. Signed-off-by: Johan Hovold Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/serdev-ttyport.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit dee7d0f3b200c67c6ee96bd37c6e8fa52690ab56 Author: Johan Hovold Date: Mon Oct 16 15:06:19 2017 +0200 serdev: ttyport: enforce tty-driver open() requirement The tty-driver open routine is mandatory, but the serdev tty-port-controller implementation did not treat it as such and would instead fall back to calling tty_port_open() directly. Signed-off-by: Johan Hovold Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/serdev-ttyport.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 2a71de2f7366fb1aec632116d0549ec56d6a3940 Author: Lukas Wunner Date: Sat Oct 21 10:50:18 2017 +0200 serial: omap: Fix EFR write on RTS deassertion Commit 348f9bb31c56 ("serial: omap: Fix RTS handling") sought to enable auto RTS upon manual RTS assertion and disable it on deassertion. However it seems the latter was done incorrectly, it clears all bits in the Extended Features Register *except* auto RTS. Fixes: 348f9bb31c56 ("serial: omap: Fix RTS handling") Cc: Peter Hurley Cc: stable Signed-off-by: Lukas Wunner Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/omap-serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e60f9fd03b8b5323a8569abc23c62396e0dfa9ad Author: Martin Townsend Date: Fri Oct 20 22:17:52 2017 +0100 omap_serial: Removing superfluous check on no interrupt pending. The do .. while loop checks for interrupt pending at the start of the loop and exits if there is none, it then checks again for this condition at the end of the loop. Signed-off-by: Martin Townsend Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/omap-serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3cc547d9ccbe223b06e87256fdd571eb63762b7 Author: Colin Ian King Date: Thu Oct 19 15:09:47 2017 +0200 esp6: remove redundant initialization of esph The pointer esph is being initialized with a value that is never read and then being updated. Remove the redundant initialization and move the declaration and initializtion of esph to the local code block. Cleans up clang warning: net/ipv6/esp6.c:562:21: warning: Value stored to 'esph' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Steffen Klassert net/ipv6/esp6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cdc1cdca2d91c477ce33d5c02dc6be0d2b939247 Author: Jani Nikula Date: Mon Oct 23 11:55:13 2017 +0300 drm/i915: Update DRIVER_DATE to 20171023 Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit be96fc54d2ed8eae6683b71d2dc5d1a939a10a1e Author: Carlo Caione Date: Wed Oct 18 18:06:31 2017 +0100 ASoC: rt5651: Convert rt5651 micbias1 to a supply widget MICBIAS widget type has been deprecated. Convert it to a SUPPLY widget. Signed-off-by: Carlo Caione Signed-off-by: Mark Brown sound/soc/codecs/rt5651.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 468663a36a3e67bed1c32f46b2d1d0a69811da99 Author: Pierre-Louis Bossart Date: Mon Oct 23 09:57:27 2017 +0530 ASoC: Intel: Add depends on X86 Make all Intel audio drivers dependent on X86 to avoid compilation errors for s390 and xtensa architectures. Signed-off-by: Pierre-Louis Bossart Reported-by: kbuild test robot Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 1 + 1 file changed, 1 insertion(+) commit dbe776c2ca54c3070358640fdf2fb28aeaa17d31 Author: Masahiro Yamada Date: Thu Oct 12 20:36:16 2017 +0900 gpio: uniphier: add UniPhier GPIO controller driver This GPIO controller is used on UniPhier SoC family. It also serves as an interrupt controller, but interrupt signals are just delivered to the parent irqchip without any latching or OR'ing. This type of hardware can be well described with hierarchy IRQ domain. One unfortunate thing for this device is that the interrupt mapping to the interrupt parent is not contiguous. I asked how DT can describe interrupt mapping between two irqchips [1], but I could not find a good solution (at least in the framework level). In fact, irqchip drivers using hierarchy domain generally hard-code the DT binding of their parent. After tackling on several approaches such as hard-code of hwirqs, irq_domain_push_irq(), I ended up with a vendor specific property. If we come up with a good idea to support this in the framework, we can migrate over to it, but we can live with a driver-level solution for now. [1] https://lkml.org/lkml/2017/7/6/758 Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij MAINTAINERS | 1 + drivers/gpio/Kconfig | 8 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-uniphier.c | 507 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 517 insertions(+) commit 1c59d045058750904926d5883ce8acdedbc52df3 Author: Masahiro Yamada Date: Thu Oct 12 20:36:15 2017 +0900 dt-bindings: gpio: uniphier: add UniPhier GPIO binding This GPIO controller is used on UniPhier SoC family. The vendor specific property "socionext,interrupt-ranges" is for specifying interrupt mapping to the parent interrupt controller because the mapping is not contiguous. It works like "ranges", but transforms "interrupts" instead of "reg". Signed-off-by: Masahiro Yamada Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/gpio-uniphier.txt | 52 ++++++++++++++++++++++ MAINTAINERS | 1 + include/dt-bindings/gpio/uniphier-gpio.h | 18 ++++++++ 3 files changed, 71 insertions(+) commit fcc27785400a9993f258417f2ce7240890359565 Author: Don Brace Date: Fri Oct 20 14:11:51 2017 -0500 scsi: smartpqi: correct spelling error in documentation Correct spelling error. Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen Documentation/scsi/smartpqi.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ace3cbdd23dc49729696b5f9a901f653a278e4f8 Author: Neil Armstrong Date: Mon Aug 28 15:11:33 2017 +0200 mtd: spi-nor: Add support for Winbond w25q16dw Add JEDEC entry for the Winbond w25q16fw/w25q16dw with similar flags and format than the Winbond w25q32dw entry. Tested on a Khadas VIM2 SBC board with an Amlogic S912 SoC. Signed-off-by: Neil Armstrong Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 5 +++++ 1 file changed, 5 insertions(+) commit ca3c5858834f75543a4e2e115b1578c01558b2ce Author: Mihaela Muraru Date: Sat Oct 21 09:19:25 2017 +0300 staging: vc04_services: Remove unnecessary braces Remove unnecessary braces for single statements also declare a local variable "platform_state" of type "struct vchiq_2835_state", to avoid the multiple cast. Signed-off-by: Mihaela Muraru Signed-off-by: Greg Kroah-Hartman .../interface/vchiq_arm/vchiq_2835_arm.c | 26 +++++++++++++--------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 864326523fd58c5f33dc9fd8cb0585ff887ca837 Author: Martin K. Petersen Date: Thu Oct 19 10:20:03 2017 -0400 scsi: Clarify SCSI core module parameter documentation Ever since it became possible to compile the SCSI core code as a module, the documentation describing the module parameters has been incorrect. Update the documentation to add a "scsi_mod." prefix to the relevant options. Reported-by: Laurence Oberman Signed-off-by: Martin K. Petersen Documentation/scsi/scsi-parameters.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 9a5641080bf433e195730e47a13de58dcd70f47f Author: Harald Freudenberger Date: Mon Oct 16 12:28:35 2017 +0200 s390/zcrypt: Introduce QACT support for AP bus devices. This patch introduces a new ap_qact() function which exploits the PQAP(QACT) subfunction. QACT is a new interface to Query the Ap Compatilibity Type based on a given AP qid, type, mode and version. Based on this new function the AP bus scan code is slightly reworked to use this new interface for querying the compatible type for each new AP queue device detected. So new and unknown devices can get automatically mapped to a compatible type and handled without the need for toleration patches for every new hardware. The currently highest known hardware is CEX6S. With this patch a possible successor can get queried for a combatible type known by the device driver without the need for an toleration patch. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/ap_asm.h | 43 ++++++++++++++++++++++++ drivers/s390/crypto/ap_bus.c | 74 +++++++++++++++++++++++++++++++++++++----- drivers/s390/crypto/ap_bus.h | 4 +-- drivers/s390/crypto/ap_card.c | 9 ++--- drivers/s390/crypto/ap_queue.c | 1 + 5 files changed, 116 insertions(+), 15 deletions(-) commit 0acb1665aa9929e5334bc7359ee3cecb6ece3604 Author: Harald Freudenberger Date: Fri Oct 6 11:31:43 2017 +0200 s390/zcrypt: Enable special header file flag for AU CPRP With the CEX6 there is a new CPRB (subfunction AU) used to generate protected keys from secure keys. This new CPRB needs to have the special flag set in the queue message header struct which is introduced with this fix. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/zcrypt_msgtype6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 21214b042d51b056b4eaa332b4cf426250d0e9e2 Author: Harald Freudenberger Date: Tue Oct 10 11:25:06 2017 +0200 s390/zcrypt: CEX6S exploitation This patch adds the full CEX6S card support to the zcrypt device driver. A CEX6A/C/P is detected and displayed as such, the card and queue device driver code is updated to recognize it and the relative weight values for CEX4, CEX5 and CEX6 have been updated. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/ap_card.c | 3 --- drivers/s390/crypto/ap_queue.c | 3 --- drivers/s390/crypto/zcrypt_api.h | 1 + drivers/s390/crypto/zcrypt_cex4.c | 48 +++++++++++++++++++++++++++++++-------- 4 files changed, 40 insertions(+), 15 deletions(-) commit 62676d10b483a2ff6e8b08c5e7c7d63a831343f5 Author: Gerd Hoffmann Date: Thu Oct 19 08:21:50 2017 +0200 qxl: alloc & use shadow for dumb buffers This patch changes the way the primary surface is used for dumb framebuffers. Instead of configuring the bo itself as primary surface a shadow bo is created and used instead. Framebuffers can share the shadow bo in case they have the same format and resolution. On atomic plane updates we don't have to update the primary surface in case we pageflip from one framebuffer to another framebuffer which shares the same shadow. This in turn avoids the flicker caused by the primary-destroy + primary-create cycle, which is very annonying when running wayland on qxl. The qxl driver never actually writes to the shadow bo. It sends qxl blit commands which update it though, and the spice server might actually execute them (and thereby write to the shadow) in case the local rendering is kicked for some reason. This happens for example in case qemu is asked to write out a dump of the guest display (screendump monitor command). Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Link: http://patchwork.freedesktop.org/patch/msgid/20171019062150.28090-3-kraxel@redhat.com drivers/gpu/drm/qxl/qxl_cmd.c | 6 ++++- drivers/gpu/drm/qxl/qxl_display.c | 49 ++++++++++++++++++++++++++++++++++++--- drivers/gpu/drm/qxl/qxl_drv.h | 2 ++ drivers/gpu/drm/qxl/qxl_dumb.c | 1 + 4 files changed, 54 insertions(+), 4 deletions(-) commit 56cbcb6c41932b19ef0d838f1ff25a662a2e403d Author: Gerd Hoffmann Date: Thu Oct 19 08:21:49 2017 +0200 drm/qxl: replace QXL_INFO with DRM_DEBUG_DRIVER Signed-off-by: Gerd Hoffmann Reviewed-by: Dave Airlie Link: http://patchwork.freedesktop.org/patch/msgid/20171019062150.28090-2-kraxel@redhat.com drivers/gpu/drm/qxl/qxl_cmd.c | 16 +++++++--------- drivers/gpu/drm/qxl/qxl_drv.h | 26 +------------------------- drivers/gpu/drm/qxl/qxl_fb.c | 13 +++++-------- drivers/gpu/drm/qxl/qxl_release.c | 5 ++--- drivers/gpu/drm/qxl/qxl_ttm.c | 4 ++-- 5 files changed, 17 insertions(+), 47 deletions(-) commit 464aa6f54b093df1ccaff6558207f8bf68a69c37 Author: Stefan Brüns Date: Tue Oct 17 01:06:34 2017 +0200 dmaengine: sun6i: Retrieve channel count/max request from devicetree To avoid introduction of a new compatible for each small SoC/DMA controller variation, move the definition of the channel count to the devicetree. The number of vchans is no longer explicit, but limited by the highest port/DMA request number. The result is a slight overallocation for SoCs with a sparse port mapping. Signed-off-by: Stefan Brüns Acked-by: Maxime Ripard Signed-off-by: Vinod Koul drivers/dma/sun6i-dma.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 7076a1e4a4ea926ba9ae3b5f4a5eb6dced0a902d Author: Anup Patel Date: Tue Oct 3 10:53:00 2017 +0530 dmaengine: Build bcm-sba-raid driver as loadable module for iProc SoCs By default, we build Broadcom SBA RAID driver as loadable module for iProc SOCs so that kernel image is little smaller and we load SBA RAID driver only when required. Signed-off-by: Anup Patel Reviewed-by: Scott Branden Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5c334870eb18649476233f5a0ce4eb907c23265 Author: Anup Patel Date: Tue Oct 3 10:52:59 2017 +0530 dmaengine: bcm-sba-raid: Use common GPL comment header This patch makes the comment header of Broadcom SBA RAID driver similar to the GPL comment header used across Broadcom driver sources. Signed-off-by: Anup Patel Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 4e9f8187aecb00d90ec385f5061c91549103a3cf Author: Anup Patel Date: Tue Oct 3 10:52:58 2017 +0530 dmaengine: bcm-sba-raid: Use only single mailbox channel Each mailbox channel used by Broadcom SBA RAID driver is a separate HW ring. Currently, Broadcom SBA RAID driver creates one DMA channel using one or more mailbox channels. When we are using more than one mailbox channels for a DMA channel, the sba_request are distributed evenly among multiple mailbox channels which results in sba_request being completed out-of-order. The above described out-of-order completion of sba_request breaks the dma_async_is_complete() API because it assumes DMA cookies are completed in orderly fashion. To ensure correct behaviour of dma_async_is_complete() API, this patch updates Broadcom SBA RAID driver to use only single mailbox channel. If additional mailbox channels are specified in DT then those will be ignored. Signed-off-by: Anup Patel Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 104 ++++++++++++--------------------------------- 1 file changed, 27 insertions(+), 77 deletions(-) commit 5d74aa7f641a8bf778b87941ae6a955121f64f7d Author: Anup Patel Date: Tue Oct 3 10:52:57 2017 +0530 dmaengine: bcm-sba-raid: serialize dma_cookie_complete() using reqs_lock As-per documentation in driver/dma/dmaengine.h, the dma_cookie_complete() API should be called with lock held. This patch ensures that Broadcom SBA RAID driver calls the dma_cookie_complete() API with reqs_lock held. Signed-off-by: Anup Patel Reviewed-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Vinod Koul drivers/dma/bcm-sba-raid.c | 2 ++ 1 file changed, 2 insertions(+) commit 36914111e6829be36b23d1109214250b5ee1ee9c Author: Andrzej Pietrasiewicz Date: Mon Oct 9 14:00:50 2017 +0200 drivers: phy: add calibrate method Some quirky UDCs (like dwc3 on Exynos) need to have their phys calibrated e.g. for using super speed. This patch adds a new phy_calibrate() method. When the calibration should be used is dependent on actual chip. In case of dwc3 on Exynos the calibration must happen after usb_add_hcd() (while in host mode), because certain phy parameters like Tx LOS levels and boost levels need to be calibrated further post initialization of xHCI controller, to get SuperSpeed operations working. But an hcd must be prepared first in order to pass it to usb_add_hcd(), so, in particular, dwc3 registers must be available first, and in order for the latter to happen the phys must be initialized. This poses a chicken and egg problem if the calibration were to be performed in phy_init(). To break the circular dependency a separate method is added which can be called at a desired moment after phy intialization. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-core.c | 15 +++++++++++++++ include/linux/phy/phy.h | 10 ++++++++++ 2 files changed, 25 insertions(+) commit 052553af6a31b459adfdc6fd1eebced75de332fc Author: Vivek Gautam Date: Thu Oct 12 11:49:36 2017 +0530 ufs/phy: qcom: Refactor to use phy_init call Refactor ufs_qcom_power_up_sequence() to get rid of ugly exported phy APIs and use the phy_init() and phy_power_on() to do the phy initialization. Signed-off-by: Vivek Gautam Reviewed-by: Subhash Jadavani Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-ufs-i.h | 3 +- drivers/phy/qualcomm/phy-qcom-ufs-qmp-14nm.c | 15 ++++++++-- drivers/phy/qualcomm/phy-qcom-ufs-qmp-20nm.c | 15 ++++++++-- drivers/phy/qualcomm/phy-qcom-ufs.c | 42 ++++++++++------------------ drivers/scsi/ufs/ufs-qcom.c | 36 ++++++++++-------------- include/linux/phy/phy-qcom-ufs.h | 3 -- 6 files changed, 55 insertions(+), 59 deletions(-) commit e9dc42c70c003746f2b541114f1fa19dc0ab232d Author: Vivek Gautam Date: Thu Oct 12 11:49:35 2017 +0530 scsi/ufs: qcom: Set phy mode based on the controllers HS MODE Set the phy mode based on the UFS HS PA mode. This lets the controller let phy know the mode in which the PHY Adapter is running and set the phy rates accordingly. Signed-off-by: Vivek Gautam Reviewed-by: Subhash Jadavani Signed-off-by: Kishon Vijay Abraham I drivers/scsi/ufs/ufs-qcom.c | 3 +++ 1 file changed, 3 insertions(+) commit 3d741ff44edc05cd313ddc1b3c1c1ab0f41722f4 Author: Vivek Gautam Date: Thu Oct 12 11:49:34 2017 +0530 phy: qcom-ufs: Add support to set phy mode Adding support to set desired UFS phy mode that can be set from the host controller. Signed-off-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I drivers/phy/qualcomm/phy-qcom-ufs-i.h | 2 ++ drivers/phy/qualcomm/phy-qcom-ufs-qmp-14nm.c | 14 ++++++++++++++ drivers/phy/qualcomm/phy-qcom-ufs-qmp-20nm.c | 14 ++++++++++++++ 3 files changed, 30 insertions(+) commit fd3e4c98e6e7a12dc47ef98ee12c0c3c024b5ee9 Author: Vivek Gautam Date: Thu Oct 12 11:49:33 2017 +0530 phy: Add UFS PHY modes UFS phy has two modes for each High speed generation. These modes are identified by two rates of operations - Rate A, and Rate B. Add these UFS phy modes to phy framework. Signed-off-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I include/linux/phy/phy.h | 2 ++ 1 file changed, 2 insertions(+) commit 55b20e8de9b25da3c2017131afef7e7e3e0e0202 Author: Vivek Gautam Date: Thu Oct 12 11:49:32 2017 +0530 dt-bindings: phy: Add PHY_TYPE_UFS definition Add definition for UFS phy type. Signed-off-by: Vivek Gautam Signed-off-by: Kishon Vijay Abraham I include/dt-bindings/phy/phy.h | 1 + 1 file changed, 1 insertion(+) commit 2796ceb0c18a5a0ee96f36d4c3b3773df74c560e Author: Kishon Vijay Abraham I Date: Mon Oct 9 14:33:38 2017 +0530 phy: ti-pipe3: Update pcie phy settings Update the PCIe phy settings based on new settings available in AM572x Technical Reference Manual[1] Revision I, revised April 2017 in Table 26-62 "Preferred PCIe_PHY_RX SCP Register Settings". [1] http://www.ti.com/lit/ug/spruhz6i/spruhz6i.pdf Cc: Vignesh R Signed-off-by: Kishon Vijay Abraham I [nsekhar@ti.com: commit message updates] Signed-off-by: Sekhar Nori Signed-off-by: Kishon Vijay Abraham I drivers/phy/ti/phy-ti-pipe3.c | 101 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 100 insertions(+), 1 deletion(-) commit 7a4db656a6350f8dd46f711bdef3b0e9c6e3f4cb Author: Kishon Vijay Abraham I Date: Mon Oct 9 14:33:37 2017 +0530 PCI: dra7xx: Create functional dependency between PCIe and PHY PCI core access configuration space registers in resume_noirq callbacks. In the case of dra7xx, PIPE3 PHY connected to PCIe controller has to be enabled before accessing configuration space registers. Since PIPE3 PHY is enabled by only configuring control module registers, no aborts has been observed so far (though during noirq stage, interface clock of PIPE3 PHY is not enabled). With new TRM updates, PIPE3 PHY has to be initialized (PIPE3 PHY registers has to be accessed) as well which requires the interface clock of PIPE3 PHY to be enabled. The interface clock of PIPE3 PHY is derived from OCP2SCP and hence PCIe PHY is modeled as a child of OCP2SCP. Since pm_runtime is not enabled during noirq stage, pm_runtime_get_sync done in phy_init doesn't enable OCP2SCP clocks resulting in abort when PIPE3 PHY registers are accessed. Create a function dependency between PCIe and PHY here to make sure PCIe is suspended before PCIe PHY/OCP2SCP and resumed after PCIe PHY/OCP2SCP. Suggested-by: Grygorii Strashko Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Sekhar Nori Acked-by: Bjorn Helgaas drivers/pci/dwc/pci-dra7xx.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit af174c49564a6fcdb2d10516307e6b28d213b807 Author: Florian Fainelli Date: Wed Oct 11 17:53:12 2017 -0700 phy: brcm-sata: Allow RX equalizer tuning Parse the DT properties brcm,rxaeq-mode and brcm,rxaeq-value to correctly configure the RX equalizer of the PHY. This may be required to resolve specific signal integrity issues. Signed-off-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I drivers/phy/broadcom/phy-brcm-sata.c | 69 +++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) commit 6ec248fed585d88873c79088cba45918f7724eff Author: Florian Fainelli Date: Wed Oct 11 17:53:11 2017 -0700 phy: brcm-sata: Prepare for doing more tuning Split the functional code in brcm_stb_sata_init() to a separate function that actually does configure spread spectrum: brcm_stb_sata_ssc_init() and make that function return void, since that function cannot fail. Signed-off-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I drivers/phy/broadcom/phy-brcm-sata.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a7ac6570f67061576c51c5204a51f034af54adec Author: Florian Fainelli Date: Wed Oct 11 17:53:10 2017 -0700 dt-bindings: phy: Add RX equalizer properties for Broadcom SATA PHY Define two new properties: brcm,rx-aeq-mode which allows configuring the SATA PHY RX equalizers and when "manual" is used, brcm,rx-aeq can be used to set the exact value. Signed-off-by: Florian Fainelli Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/brcm-sata-phy.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 6100ef093ba7b99efbb8b6c62b6af3c72fc82ddb Author: Yoshihiro Shimoda Date: Thu Oct 12 15:34:48 2017 +0900 phy: rcar-gen3-usb2: add binding for r8a77995 This patch adds binding for r8a77995 (R-Car D3). Since r8a77995 doesn't have dedicated pins (ID, VBUS), this will match against the generic fallback on R-Car D3. For now, this driver doesn't support usb role swap for r8a77995. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 2 ++ 1 file changed, 2 insertions(+) commit 9adaaa9e4517afb8c5cb8931cc4ea0f81f54d396 Author: Yoshihiro Shimoda Date: Thu Oct 12 15:34:47 2017 +0900 phy: rcar-gen3-usb2: add SoC-specific parameter for dedicated pins This patch adds SoC-specific parameter to avoid reading/writing specific registers wrongly if this driver runs on a SoC which doesn't have dedicated pins (e.g. R-Car D3). This patch also changes the value "has_otg" to "has_otg_pins" for slightly easier reading of the code. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Kishon Vijay Abraham I drivers/phy/renesas/phy-rcar-gen3-usb2.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) commit b56acc82f9719d6aa1c1003ac7e34391da85a824 Author: Yoshihiro Shimoda Date: Thu Oct 12 15:34:46 2017 +0900 phy: rcar-gen3-usb2: use enum phy_mode in the role_store() This patch modifies the role_store() to use "enum phy_mode" instead of the local "bool" for host/device mode selection. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Kishon Vijay Abraham I drivers/phy/renesas/phy-rcar-gen3-usb2.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit 7e0540f41332cb07055c5fe6629dc83c71974c82 Author: Yoshihiro Shimoda Date: Thu Oct 12 15:34:45 2017 +0900 phy: rcar-gen3-usb2: check dr_mode for otg mode The previous code assumed a channel has otg capability if a channel has interrupt property. But, it is not good because: - Battery charging feature also needs interrupt property. - Some R-Car Gen3 SoCs (e.g. R-Car D3) don't have OTG capability. So, this patch checks whether usb 2.0 host node has dr_mode property or not. If it has 'dr_mode = "otg";', this driver enables otg capability. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Kishon Vijay Abraham I drivers/phy/renesas/phy-rcar-gen3-usb2.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit f7da4e6d29539bad2c29dd8ccb4ac628fe19f82b Author: Biju Das Date: Mon Oct 9 11:22:23 2017 +0100 phy: rcar-gen2: Add r8a7743/5 support Add USB PHY support for r8a7743/5 SoC. Renesas RZ/G1[ME] (R8A7743/5) USB PHY is identical to the R-Car Gen2 family. Signed-off-by: Biju Das Acked-by: Simon Horman Acked-by: Rob Herring Reviewed-by: Geert Uytterhoeven Signed-off-by: Kishon Vijay Abraham I Documentation/devicetree/bindings/phy/rcar-gen2-phy.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a06173badf697b1aad51d9fc280b520b38715c95 Author: Icenowy Zheng Date: Thu Sep 28 17:33:49 2017 +0800 phy: sun4i-usb: enable PHY0 dual route for V3s SoC Allwinner V3s SoC also features the dual route of the first USB PHY. Enable it. Signed-off-by: Icenowy Zheng Signed-off-by: Kishon Vijay Abraham I drivers/phy/allwinner/phy-sun4i-usb.c | 1 + 1 file changed, 1 insertion(+) commit e023b1fb5286e23c224f2ae312831a4fce258c02 Author: Douglas Anderson Date: Fri Sep 22 09:44:06 2017 -0700 phy: rockchip-typec: Do the calibration more correctly Calculate the calibration code as per the docs. The docs talk about reading and averaging the pullup and pulldown calibration codes. They also talk about adding in some adjustment codes. Let's do what the docs say. In practice this doesn't seem to matter a whole lot. On a device I tested the pullup and pulldown codes were nearly the same (0x23 and 0x24) and the adjustment codes were 0. Reviewed-by: Chris Zhong Signed-off-by: Douglas Anderson Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-typec.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit f85fd4c909565892a49337ef482090e446c4e5bd Author: Douglas Anderson Date: Fri Sep 22 09:44:05 2017 -0700 phy: rockchip-typec: Avoid magic numbers + add delays in aux calib NOTE: nothing is known to be fixed by this change, but it does enforce some delays that are documented to be necessary. Possibly this could fix some corner cases. The function tcphy_dp_aux_calibration(), like most of the functions in the type C PHY, is mostly undocumented and filled with mysterious, hardcoded numbers. Let's attempt to try to document some of these numbers and clean the function up a little bit. Here's the actual cleanup that happened here: 1. All magic numbers were replaced with bit definitions. 2. For registers that we modify multiple times I now keep track of the value of the register rather than randomly doing a read/modify/write or just hardcoding a new number based on knowing what the old number was. 3. Delay 10 ms (vs 1 ms) after writing the calibration code. No idea if this is important but it matches the example in the docs. 4. Whenever setting a "delayed" version of a signal always put an explicit delay in the code. No known problems were seen without this delay but it seems wise to have it. Whenever a delay of "at least 100 ns" was specified I used a delay of 1 us. 5. Added comments to some of the bits of code. 6. Removed duplicate setting of TX_ANA_CTRL_REG_5 (to 0) 7. Moved setting of TX_ANA_CTRL_REG_3 to the same place it was in the sample code. Note that TX_ANA_CTRL_REG_3 ought to be initted to 0 (and elsewhere we assume that we just got a reset), but it seems fine to be explicit. 8. Treats the calibration code as a 7-bit two's complement number. This isn't strictly required, but seems slightly cleaner. The docs say "treat this as a two's complement number, but it should never be negative". If we ever read the "adjustment" codes as documented then perhaps the two's complement bit will matter more. There are still a few weird / mysterious things around aux init and this doesn't attempt to fix all of them. Mostly it's aimed at doing changes that should be _very_ safe and add a lot of clarity. Things specifically not done: A) Resolve the fact that some registers are read/modify/write and others are explicitly initted to a value. We always call tcphy_dp_aux_calibration() right after resetting the PHY so it's probably not critical, but it's a little weird that the code is inconsistent. B) Fully resolve the documented init sequence with the current one. We still have a few mystery steps and we also leave out turning on TXDA_DRV_LDO_BG_FB_EN and TXDA_DRV_LDO_BG_REF_EN, which is in the sample code. C) Clean things up to read all the bits of the calibration code. This will hopefully come in a followup change. This also doesn't attempt to document any of the other parts of the PHY--just the aux init which is all I got docs for. Reviewed-by: Chris Zhong Signed-off-by: Douglas Anderson Signed-off-by: Kishon Vijay Abraham I drivers/phy/rockchip/phy-rockchip-typec.c | 202 ++++++++++++++++++++++++------ 1 file changed, 163 insertions(+), 39 deletions(-) commit 11a6e41c0ee503ffcb971d260bd07dc99b77f13a Author: Maxime Ripard Date: Mon Sep 4 14:53:13 2017 +0200 phy: Return NULL if the phy is optional If we're trying to get a handle to an optional phy, then the phy framework being disabled shouldn't return an hard error. Instead, return NULL just like phy_optional_get does when there's no phy provided in the DT. Signed-off-by: Maxime Ripard Signed-off-by: Kishon Vijay Abraham I include/linux/phy/phy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5954a10e8e12ddffd54bfb6b3365aec2c31aa615 Author: Chunfeng Yun Date: Thu Sep 21 18:31:49 2017 +0800 phy: phy-mtk-tphy: add set_mode callback This is used to force PHY with USB OTG function to enter a specific mode, and override OTG IDPIN(or IDDIG) signal. Signed-off-by: Chunfeng Yun Signed-off-by: Kishon Vijay Abraham I drivers/phy/mediatek/phy-mtk-tphy.c | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 30dbc0415f7c6e6d4fa9cdc8098c27fd8cf74f82 Author: Antoine Tenart Date: Mon Sep 18 10:04:21 2017 +0200 phy: mvebu-cp110-comphy: remove unused member in private struct The 'modes' member of the mvebu_comphy_priv structure is not used. Remove it. Signed-off-by: Antoine Tenart Signed-off-by: Kishon Vijay Abraham I drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 1 - 1 file changed, 1 deletion(-) commit b743483bd4b1d9e0ac093fe184aefdd9f59264d4 Author: Markus Elfring Date: Sun Oct 22 19:39:12 2017 +0200 extcon: max14577: Delete an unnecessary variable initialisation in max14577_muic_set_path() The variable "ret" is immediately reassigned by a following statement. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring Reviewed-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi drivers/extcon/extcon-max14577.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5183240cde56e6ab5b78120b041e009cd0c5b345 Author: Colin Ian King Date: Sat Sep 9 17:51:00 2017 +0100 extcon: make extcon_info static const, fixes warning The array extcon_info is read only, local to the source and does not need to be in global scope, so make it static const. Cleans up sparse warning: symbol 'extcon_info' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Chanwoo Choi drivers/extcon/extcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 176aa36012135d172394a928a03fb03dfecd83f9 Author: Chanwoo Choi Date: Thu Sep 21 12:11:24 2017 +0900 extcon: Split out extcon header file for consumer and provider device The extcon has two type of extcon devices as following. - 'extcon provider deivce' adds new extcon device and detect the state/properties of external connector. Also, it notifies the state/properties to the extcon consumer device. - 'extcon consumer device' gets the change state/properties from extcon provider device. Prior to that, include/linux/extcon.h contains all exported API for both provider and consumer device driver. To clarify the meaning of header file and to remove the wrong use-case on consumer device, this patch separates into extcon.h and extcon-provider.h. [Description for include/linux/{extcon.h|extcon-provider.h}] - extcon.h includes the extcon API and data structure for extcon consumer device driver. This header file contains the following APIs: : Register/unregister the notifier to catch the change of extcon device : Get the extcon device instance : Get the extcon device name : Get the state of each external connector : Get the property value of each external connector : Get the property capability of each external connector - extcon-provider.h includes the extcon API and data structure for extcon provider device driver. This header file contains the following APIs: : Include 'include/linux/extcon.h' : Allocate the memory for extcon device instance : Register/unregister extcon device : Set the state of each external connector : Set the property value of each external connector : Set the property capability of each external connector Signed-off-by: Chanwoo Choi Acked-by: Sebastian Reichel Acked-by: Chen-Yu Tsai Acked-by: Charles Keepax Acked-by: Lee Jones Acked-by: Felipe Balbi Acked-by: Yoshihiro Shimoda Acked-by: Kishon Vijay Abraham I drivers/extcon/extcon-adc-jack.c | 2 +- drivers/extcon/extcon-arizona.c | 2 +- drivers/extcon/extcon-axp288.c | 2 +- drivers/extcon/extcon-gpio.c | 2 +- drivers/extcon/extcon-intel-cht-wc.c | 2 +- drivers/extcon/extcon-intel-int3496.c | 2 +- drivers/extcon/extcon-max14577.c | 2 +- drivers/extcon/extcon-max3355.c | 2 +- drivers/extcon/extcon-max77693.c | 2 +- drivers/extcon/extcon-max77843.c | 2 +- drivers/extcon/extcon-max8997.c | 2 +- drivers/extcon/extcon-qcom-spmi-misc.c | 2 +- drivers/extcon/extcon-rt8973a.c | 2 +- drivers/extcon/extcon-sm5502.c | 2 +- drivers/extcon/extcon-usb-gpio.c | 2 +- drivers/extcon/extcon-usbc-cros-ec.c | 2 +- drivers/extcon/extcon.h | 2 +- drivers/phy/allwinner/phy-sun4i-usb.c | 2 +- drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c | 2 +- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 2 +- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 2 +- drivers/power/supply/qcom_smbb.c | 2 +- drivers/usb/gadget/udc/renesas_usb3.c | 2 +- drivers/usb/phy/phy-tahvo.c | 2 +- include/linux/extcon-provider.h | 142 ++++++++++++++++++++++++++ include/linux/extcon.h | 109 +------------------- include/linux/mfd/palmas.h | 2 +- 27 files changed, 172 insertions(+), 129 deletions(-) commit 058c8d59124193f46db4efa5abcd9d6d0f04c88e Author: Gustavo A. R. Silva Date: Fri Oct 20 19:43:11 2017 -0500 net: core: rtnetlink: use BUG_ON instead of if condition followed by BUG Use BUG_ON instead of if condition followed by BUG in do_setlink. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/core/rtnetlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e83b171568e6a69cff5eb592907b71e480b535ac Author: Florian Fainelli Date: Fri Oct 20 15:59:30 2017 -0700 net: systemport: Guard against unmapped TX ring Because SYSTEMPORT is a (semi) normal network device, the stack may attempt to queue packets on it oustide of the DSA slave transmit path. When that happens, the DSA layer has not had a chance to tag packets with the appropriate per-port and per-queue information, and if that happens and we don't have a port 0 queue 0 available (e.g: on boards where this does not exist), we will hit a NULL pointer de-reference in bcm_sysport_select_queue(). Guard against such cases by testing for the TX ring validity. Fixes: 84ff33eeb23d ("net: systemport: Establish DSA network device queue mapping") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 3 +++ 1 file changed, 3 insertions(+) commit fbd15f48e052b3f6bdb21857e8bcaac63bfbb3fd Merge: bc9db41 330e2cc Author: David S. Miller Date: Mon Oct 23 05:23:07 2017 +0100 Merge branch 'mlxsw-Add-support-for-non-equal-cost-multi-path' Jiri Pirko says: ==================== mlxsw: Add support for non-equal-cost multi-path Ido says: In the device, nexthops are stored as adjacency entries in an array called the KVD linear (KVDL). When a multi-path route is hit the packet's headers are hashed and then converted to an index into KVDL based on the adjacency group's size and base index. Up until now the driver ignored the `weight` parameter for multi-path routes and allocated only one adjacency entry for each nexthop with a limit of 32 nexthops in a group. This set makes the driver take the `weight` parameter into account when allocating adjacency entries. First patch teaches dpipe to show the size of the adjacency group, so that users will be able to determine the actual weight of each nexthop. The second patch refactors the KVDL allocator, making it more receptive towards the addition of another partition later in the set. Patches 3-5 introduce small changes towards the actual change in the sixth patch that populates the adjacency entries according to their relative weight. Last two patches finally add another partition to the KVDL, which allows us to allocate more than 32 entries per-group and thus support more nexthops and also provide higher accuracy with regards to the requested weights. ==================== Signed-off-by: David S. Miller commit 330e2cc65d5f2c0545230e00f8f50b35a3e5995b Author: Ido Schimmel Date: Sun Oct 22 23:11:50 2017 +0200 mlxsw: spectrum: Add another partition to KVD linear The KVD linear is currently partitioned into two partitions. One for single entries and another for groups of 32 entries. Add another partition consisting of groups of 512 entries which will allow us to more accurately represent the nexthop weights in non-equal cost multi-path routing. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit f11fbaf8b5a83608523b88cf62682914cf521546 Author: Ido Schimmel Date: Sun Oct 22 23:11:49 2017 +0200 mlxsw: spectrum: Increase number of linear entries The memory region where adjacency entries (nexthops) are stored is called the KVD linear and is configured during initialization with a size of 64K. Extend this area with 32K more entries, that will be partitioned into 64 groups of 0.5K entries, thereby allowing us to support weighted nexthops with high accuracy. Change the ratio between both types of hash entries, so as to prevent reduction in the number of double hash entries, which are used for IPv6 neighbours and routes with a prefix length greater than 64. Note that the user will be able to control all these sizes once the devlink resource manager is introduced. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit eb789980d0aa6cd2ebee3eb07792800bbe134bc0 Author: Ido Schimmel Date: Sun Oct 22 23:11:48 2017 +0200 mlxsw: spectrum_router: Populate adjacency entries according to weights Up until now the driver assumed all the nexthops have an equal weight and wrote each to a single adjacency entry. This patch takes the `weight` parameter into account and populates the adjacency group according to the relative weight of each nexthop. Specifically, the weights of all the nexthops that should be offloaded are first normalized and then used to calculate the upper adjacency index of each nexthop. This is done according to the hash-threshold algorithm used by the kernel for IPv4 multi-path routing. Adjacency groups are currently limited to 32 entries which limits the weights that can be used, but follow-up patches will introduce groups of 512 entries. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 111 ++++++++++++++++++--- 1 file changed, 99 insertions(+), 12 deletions(-) commit 425a08c67317acee103b3ad58f57c762e8834faf Author: Ido Schimmel Date: Sun Oct 22 23:11:47 2017 +0200 mlxsw: spectrum_router: Prepare for large adjacency groups The device has certain restrictions regarding the size of an adjacency group. Have the router determine the size of the adjacency group according to available KVDL allocation sizes and these restrictions. This was not needed until now since only allocations of up 32 entries were supported and these are all valid sizes for an adjacency group. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 408bd946bfee69ec99937bd0f9ed9dcd2d19705b Author: Ido Schimmel Date: Sun Oct 22 23:11:46 2017 +0200 mlxsw: spectrum_router: Store weight in nexthop struct As the first step towards non-equal-cost multi-path support, store each nexthop's weight. For IPv6 nexthops always set the weight to 1, as it only supports ECMP. 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 d672aec45fd4a1e060109fbce6739ef91c3bd135 Author: Ido Schimmel Date: Sun Oct 22 23:11:45 2017 +0200 mlxsw: spectrum: Add ability to query KVDL allocation size The current KVDL allocation API allows the user to specify the requested number of entries, but the user has no way of knowing how many entries were actually allocated. This works because existing users (e.g., router) request the exact number they end up using. With the introduction of large adjacency groups, this will change, as the router will have the ability to choose from several allocation sizes, where larger allocations provide higher accuracy with respect to requested weights and better resilience against nexthop failures. One option is to have the router try several allocations of descending size until one succeeds, but a better way is to simply allow it to query the actual allocation size and then size its request accordingly. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 +++ drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 15 +++++++++++++++ 2 files changed, 18 insertions(+) commit a875a2ee2db8970dd93b8d287e35b8eba72f0a89 Author: Ido Schimmel Date: Sun Oct 22 23:11:44 2017 +0200 mlxsw: spectrum: Better represent KVDL partitions The KVD linear (KVDL) allocator currently consists of a very large bitmap that reflects the KVDL's usage. The boundaries of each partition as well as their allocation size are represented using defines. This representation requires us to patch all the functions that act on a partition whenever the partitioning scheme is changed. In addition, it does not enable the dynamic configuration of the KVDL using the up-coming resource manager. Add objects to represent these partitions as well as the accompanying code that acts on them to perform allocations and de-allocations. In the following patches, this will allow us to easily add another partition as well as new operations to act on these partitions. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 11 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 7 +- .../net/ethernet/mellanox/mlxsw/spectrum_kvdl.c | 257 ++++++++++++++++++--- 3 files changed, 238 insertions(+), 37 deletions(-) commit e69cd9d75ee797a46e1d2703226f0478d05bca10 Author: Ido Schimmel Date: Sun Oct 22 23:11:43 2017 +0200 mlxsw: spectrum_dpipe: Add adjacency group size The adjacency group size is part of the match on the adjacency group and should therefore be exposed using dpipe. When non-equal-cost multi-path support will be introduced, the group's size will help users understand the exact number of adjacency entries each nexthop occupies, as a nexthop will no longer correspond to a single entry. The output for a multi-path route with two nexthops, one with weight 255 and the second 1 will be: Example: $ devlink dpipe table dump pci/0000:01:00.0 name mlxsw_adj pci/0000:01:00.0: index 0 match_value: type field_exact header mlxsw_meta field adj_index value 65536 type field_exact header mlxsw_meta field adj_size value 512 type field_exact header mlxsw_meta field adj_hash_index value 0 action_value: type field_modify header ethernet field destination mac value e4:1d:2d:a5:f3:64 type field_modify header mlxsw_meta field erif_port mapping ifindex mapping_value 3 value 1 index 1 match_value: type field_exact header mlxsw_meta field adj_index value 65536 type field_exact header mlxsw_meta field adj_size value 512 type field_exact header mlxsw_meta field adj_hash_index value 510 action_value: type field_modify header ethernet field destination mac value e4:1d:2d:a5:f3:65 type field_modify header mlxsw_meta field erif_port mapping ifindex mapping_value 4 value 2 Thus, the first nexthop occupies 510 adjacency entries and the second 2, which leads to a ratio of 255 to 1. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 46 +++++++++++++++++++--- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 3 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 2 +- 3 files changed, 44 insertions(+), 7 deletions(-) commit bc9db4171d326632d31a411ee8f3fd6f30526005 Merge: 33ad61d dd8eff6 Author: David S. Miller Date: Mon Oct 23 03:06:48 2017 +0100 Merge branch 'bcm_sf2-Add-support-for-IPv6-CFP-rules' Florian Fainelli says: ==================== net: dsa: bcm_sf2: Add support for IPv6 CFP rules This patch series adds support for matching IPv6 addresses to the existing CFP support code. Because IPv6 addresses are four times bigger than IPv4, we can fit them anymore in a single slice, so we need to chain two in order to have a complete match. This makes us require a second bitmap tracking unique rules so we don't over populate the TCAM. Finally, because the code had to be re-organized, it became a lot easier to support arbitrary prefix/mask lengths, so the last two patches do just that. ==================== Signed-off-by: David S. Miller commit dd8eff68343d5ab6535fb05bc837a2f85434d506 Author: Florian Fainelli Date: Fri Oct 20 14:39:49 2017 -0700 net: dsa: bcm_sf2: Allow matching arbitrary IPv6 masks/lengths There is no reason why we should limit ourselves to matching only full IPv4 addresses (/32), the same logic applies between the DATA and MASK ports, so just make it more configurable to accept both. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2_cfp.c | 113 ++++++++++++++++++++++++++++++------------ 1 file changed, 80 insertions(+), 33 deletions(-) commit bc3fc44c12d6a4722b253f19423db1244175c18c Author: Florian Fainelli Date: Fri Oct 20 14:39:48 2017 -0700 net: dsa: bcm_sf2: Allow matching arbitrary IPv4 mask lengths There is no reason why we should limit ourselves to matching only full IPv4 addresses (/32), the same logic applies between the DATA and MASK ports, so just make it more configurable to accept both. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2_cfp.c | 235 ++++++++++++++++++++++++++--------------- drivers/net/dsa/bcm_sf2_regs.h | 2 +- 2 files changed, 149 insertions(+), 88 deletions(-) commit ba0696c22e7c5b7394283a0dbef1462252d1606f Author: Florian Fainelli Date: Fri Oct 20 14:39:47 2017 -0700 net: dsa: bcm_sf2: Add support for IPv6 CFP rules Inserting IPv6 CFP rules complicates the code a little bit in that we need to insert two rules side by side and chain them to match a full IPv6 tuple (src, dst IPv6 + port + protocol). Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 1 + drivers/net/dsa/bcm_sf2.h | 1 + drivers/net/dsa/bcm_sf2_cfp.c | 565 ++++++++++++++++++++++++++++++++++++++--- drivers/net/dsa/bcm_sf2_regs.h | 7 + 4 files changed, 534 insertions(+), 40 deletions(-) commit 4daa70cfb69186a4fe70fa2fefc271a41ece5085 Author: Florian Fainelli Date: Fri Oct 20 14:39:46 2017 -0700 net: dsa: bcm_sf2: Simplify bcm_sf2_cfp_rule_get_all() There is no need to do a HW search of the TCAMs which is something slow and expensive. Since we already maintain a bitmask of active CFP rules, just iterate over those, starting from bit 1 (after the reserved entry) to get a count and index position to store the rule later on. As a result we can remove the code in bcm_sf2_cfp_rule_get() which acted on the "search" argument, and remove that argument. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2_cfp.c | 68 +++++++++---------------------------------- 1 file changed, 14 insertions(+), 54 deletions(-) commit 5d80bcbb631ce035f37bce1924fe73ed0d77b546 Author: Florian Fainelli Date: Fri Oct 20 14:39:45 2017 -0700 net: dsa: bcm_sf2: Make UDF slices more configurable In preparation for introducing IPv6 rules support, make the cfp_udf_layout more flexible and match more accurately how the HW is designed: we have 3 + 1 slices per protocol, but we may not be using all of them and we are relative to a particular base offset (slice A for IPv4 for instance). Also populate the slice number that should be used (slice 1 for IPv4) based on the lookup function. Finally, we introduce two helper functions: udf_upper_bits() and udf_lower_bits() to help setting the UDF_n_* valid bits based on the number of UDFs valid within a slice. Update the IPv4 rule setting to make use of it to be more robust wrt. change in number of User Defined Fields being programmed. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2_cfp.c | 105 +++++++++++++++++++++++++++++------------ drivers/net/dsa/bcm_sf2_regs.h | 3 +- 2 files changed, 76 insertions(+), 32 deletions(-) commit 3306145866b62ff9087b4fde489df4b3ee8755c1 Author: Florian Fainelli Date: Fri Oct 20 14:39:44 2017 -0700 net: dsa: bcm_sf2: Move IPv4 CFP processing to specific functions Move the processing of IPv4 rules into specific functions, allowing us to clearly identify which parts are generic and which ones are not. Also create a specific function to insert a rule into the action and policer RAMs as those tend to be fairly generic. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2_cfp.c | 279 ++++++++++++++++++++++++------------------ 1 file changed, 163 insertions(+), 116 deletions(-) commit 39cdd34989cf9fb62935041727bf885136f720a4 Author: Florian Fainelli Date: Fri Oct 20 14:39:43 2017 -0700 net: dsa: bcm_sf2: Use existing shift/masks Instead of open coding the shift for the IP protocol, IP fragment bit etc. define and/or use existing constants to that end. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2_cfp.c | 7 ++++--- drivers/net/dsa/bcm_sf2_regs.h | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) commit af9111336071ee9378e1db70ac8f4c2b7fcd17a1 Merge: bd21a37 9b38bd1 Author: Dave Airlie Date: Mon Oct 23 11:17:54 2017 +1000 Merge branch 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux into drm-next Last batch of new stuff for DC. Highlights: - Fix some memory leaks - S3 fixes - Hotplug fixes - Fix some CX multi-display issues - MST fixes - DML updates from the hw team - Various code cleanups - Misc bug fixes * 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux: (155 commits) drm/amd/display:: Fix NULL pointer in Raven hotplug drm/amd/display: Fix memoryleak during S3 resume. drm/amd/display: add hardware_planes_only to list of affected planes drm/amd/display: Fix brace style drm/amd/display: Remove needless cast in amdgpu_dm_connector_init() drm/amd/display: Fix brace style in amdgpu_dm_connector_ddc_get_modes() drm/amd/display: Tidy up dm_drm_plane_reset() drm/amd/display: Fix indentation in create_eml_sink() drm/amd/display: Replace block with strncpy() in fill_audio_info() drm/amd/display: Fix brace style in amdgpu_dm_initialize_drm_device() drm/amd/display: Simplify handle_hpd_rx_irq() drm/amd/display: Fix brace style in dm_handle_hpd_rx_irq() drm/amd/display: Fix brace style in amdgpu_dm_update_connector_after_detect() drm/amd/display: Fix indentation in dm_resume() drm/amd/display: Fix indentation in dm_suspend() drm/amd/display: Simplify dm_late_init() amdgpu/dc: inline dml_round_to_multiple amdgpu/dc: drop dml_util_is_420 drm/amd/display: Add bunch of missing license headers in DML amdgpu/dc: inline a bunch of the dml wrappers. ... commit 3064abfa932bd09faf8da01741d171d476cf7193 Author: Keith Packard Date: Thu Jun 29 22:49:31 2017 -0700 drm: Add CRTC_GET_SEQUENCE and CRTC_QUEUE_SEQUENCE ioctls [v3] These provide crtc-id based functions instead of pipe-number, while also offering higher resolution time (ns) and wider frame count (64) as required by the Vulkan API. v2: * Check for DRIVER_MODESET in new crtc-based vblank ioctls Failing to check this will oops the driver. * Ensure vblank interupt is running in crtc_get_sequence ioctl The sequence and timing values are not correct while the interrupt is off, so make sure it's running before asking for them. * Short-circuit get_sequence if the counter is enabled and accurate Steal the idea from the code in wait_vblank to avoid the expense of drm_vblank_get/put * Return active state of crtc in crtc_get_sequence ioctl Might be useful for applications that aren't in charge of modesetting? * Use drm_crtc_vblank_get/put in new crtc-based vblank sequence ioctls Daniel Vetter prefers these over the old drm_vblank_put/get APIs. * Return s64 ns instead of u64 in new sequence event Suggested-by: Daniel Vetter Suggested-by: Ville Syrjälä v3: * Removed FIRST_PIXEL_OUT_FLAG * Document that the timestamp in the query and event are that of the first pixel leaving the display engine for the display (using the same wording as the Vulkan spec). Suggested-by: Michel Dänzer Acked-by: Dave Airlie [airlied: left->leaves (Michel)] Signed-off-by: Keith Packard Reviewed-by: Sean Paul Signed-off-by: Dave Airlie drivers/gpu/drm/drm_internal.h | 6 ++ drivers/gpu/drm/drm_ioctl.c | 2 + drivers/gpu/drm/drm_vblank.c | 168 +++++++++++++++++++++++++++++++++++++++++ include/drm/drm_vblank.h | 1 + include/uapi/drm/drm.h | 36 +++++++++ 5 files changed, 213 insertions(+) commit ae4cce878885f5e04a9119576882b122a86dad39 Author: Masahiro Yamada Date: Sat Oct 14 02:06:26 2017 +0900 arm64: dts: uniphier: enable NAND for PXs3 reference board Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-pxs3-ref.dts | 4 ++++ 1 file changed, 4 insertions(+) commit f05851e1d066e2fc39dff38b1827f89a26ed6bd1 Author: Keiji Hayashibara Date: Fri Oct 6 14:03:00 2017 +0900 arm64: dts: uniphier: add efuse node for LD11, LD20, and PXs3 Add efuse node for UniPhier LD11, LD20, and PXs3. This efuse node is included in soc-glue. Signed-off-by: Keiji Hayashibara Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 18 ++++++++++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 18 ++++++++++++++++++ arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi | 18 ++++++++++++++++++ 3 files changed, 54 insertions(+) commit a103e41225a00410c0262b58c134260c44888ccc Author: Lukasz Majewski Date: Sun Oct 22 00:05:55 2017 +0200 ARM: dts: display5: Device tree description of LWN's DISPLAY5 board This commit adds device tree description of Liebherr's Display5 board. Signed-off-by: Lukasz Majewski Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + .../dts/imx6q-display5-tianma-tm070-1280x768.dts | 51 ++ arch/arm/boot/dts/imx6q-display5.dtsi | 596 +++++++++++++++++++++ 3 files changed, 648 insertions(+) commit 33ad61d0f799656e8987e9c80e6e15151bb857f3 Author: Kees Cook Date: Fri Oct 20 13:47:08 2017 -0700 isdn/gigaset: Provide cardstate context for bas timer callbacks While the work callback uses the urb to find cardstate from bas_cardstate, this may not be valid for timer callbacks. Instead, introduce a direct pointer back to the cardstate from bas_cardstate for use in timer callbacks. Reported-by: Paul Bolle Fixes: 4cfea08e6251 ("isdn/gigaset: Convert timers to use timer_setup()") Cc: Paul Bolle Cc: Karsten Keil Cc: "David S. Miller" Cc: Johan Hovold Cc: gigaset307x-common@lists.sourceforge.net Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/isdn/gigaset/bas-gigaset.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit dd3421904fbbe6fd3825d873155b2586ee429b05 Author: Marco Franchi Date: Fri Oct 20 13:48:26 2017 -0200 ARM: dts: imx53-qsb-common: Fix 'led_gpio7_7@0' node with unit name and no reg property The following build warning is seen with W=1: Warning (unit_address_vs_reg): Node /soc/aips@50000000/iomuxc@53fa8000/imx53-qsb/led_gpio7_7@0 has a unit name, but no reg property Fix this warning by removing '@0' from such node. Signed-off-by: Marco Franchi Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-qsb-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eff88d98ddfd24d1d5b004259bbcf3511297b06f Author: Marco Franchi Date: Fri Oct 20 13:48:25 2017 -0200 ARM: dts: imx53-m53evk: Fix 'led_gpio@0' node with unit name and no reg property The following build warning is seen with W=1: Warning (unit_address_vs_reg): Node /soc/aips@50000000/iomuxc@53fa8000/imx53-m53evk/led_gpio@0 has a unit name, but no reg property Fix this warning by removing '@0' from such node. Signed-off-by: Marco Franchi Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-m53evk.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9598babc80d5bfa474f9c17124f8bd178dd6ceec Author: Marco Franchi Date: Fri Oct 20 13:48:24 2017 -0200 ARM: dts: imx53: Fix 'usbphy@x' node with unit name and no reg property The following build warnings are seen with W=1: Warning (unit_address_vs_reg): Node /soc/aips@50000000/usbphy@0 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /soc/aips@50000000/usbphy@1 has a unit name, but no reg property Fix these warnings by changing '@' to '-'. Signed-off-by: Marco Franchi Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6ab9123e94049eb7c90e2c3111a1c5dae46eb088 Author: Marco Franchi Date: Fri Oct 20 13:48:23 2017 -0200 ARM: dts: imx51-ts4800: Fix 'port@0' node with unit name and no reg property The following build warning is seen with W=1: Warning (unit_address_vs_reg): Node /display-di0/port@0 has a unit name, but no reg property Fix this warning by removing '@' from such node. Signed-off-by: Marco Franchi Signed-off-by: Shawn Guo arch/arm/boot/dts/imx51-ts4800.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 901765a2c370477941f04c55d441c04feeccfc40 Author: Marco Franchi Date: Fri Oct 20 13:48:22 2017 -0200 ARM: dts: imx51-apf51dev: Fix 'backlight@bl1' node with unit name and no reg property The following build warning is seen with W=1: Warning (unit_address_vs_reg): Node /backlight@bl1 has a unit name, but no reg property Fix this warning by removing '@bl1'from such node and change 'bl1grp' to 'backlightgrp', once there is only one backlight in this dts. Signed-off-by: Marco Franchi Signed-off-by: Shawn Guo arch/arm/boot/dts/imx51-apf51dev.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ceef0396f367f642627026c522817107654131bb Author: Lucas Stach Date: Wed Oct 18 19:26:18 2017 +0200 ARM: dts: imx: add ZII RDU1 board This adds support for the Zodiac Inflight Innovations RDU1 board, which is based on the i.MX51. It is the predecessor of the already supported ZII RDU2 board and relies on the bootloader in the same way to enable correct display and touchscreen nodes. Signed-off-by: Lucas Stach Tested-by: Nikita Yushchenko Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/imx51-zii-rdu1.dts | 834 +++++++++++++++++++++++++++++++++++ 2 files changed, 836 insertions(+), 1 deletion(-) commit c59eb828068812c835c8d8b621ab6b68b01d2ce6 Author: Lothar Waßmann Date: Tue Oct 17 11:18:03 2017 +0200 ARM: dts: imx: add support for TX6 modules on MB7 baseboard Create .dts files for various Ka-Ro electronics TX modules on the MB7 baseboard. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 8 ++++ arch/arm/boot/dts/imx6dl-tx6s-8034-mb7.dts | 48 ++++++++++++++++++++++++ arch/arm/boot/dts/imx6dl-tx6s-8035-mb7.dts | 48 ++++++++++++++++++++++++ arch/arm/boot/dts/imx6dl-tx6u-8033-mb7.dts | 48 ++++++++++++++++++++++++ arch/arm/boot/dts/imx6dl-tx6u-80xx-mb7.dts | 48 ++++++++++++++++++++++++ arch/arm/boot/dts/imx6dl-tx6u-81xx-mb7.dts | 17 +-------- arch/arm/boot/dts/imx6q-tx6q-1036-mb7.dts | 48 ++++++++++++++++++++++++ arch/arm/boot/dts/imx6q-tx6q-10x0-mb7.dts | 48 ++++++++++++++++++++++++ arch/arm/boot/dts/imx6qp-tx6qp-8037-mb7.dts | 48 ++++++++++++++++++++++++ arch/arm/boot/dts/imx6qp-tx6qp-8137-mb7.dts | 57 +++++++++++++++++++++++++++++ 10 files changed, 403 insertions(+), 15 deletions(-) commit 978f8f60467a6b52e9af541801b75759553d9262 Author: Lothar Waßmann Date: Tue Oct 17 11:18:02 2017 +0200 ARM: dts: imx: add support for TX6QP The TX6QP-8037 is a Computer On Module manufactured by Ka-Ro electronics GmbH with the following characteristics: Processor Freescale i.MX 6QuadPlus MCIMX6QP7, 1 GHz RAM 1GiB 64-bit DDR3 SDRAM ROM 4GB HiRel eMMC Power supply Single 3.3 to 5V Size 26mm SO-DIMM Temp. Range -40°C to 105°C Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/imx6qp-tx6qp-8037.dts | 86 +++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx6qp-tx6qp-8137.dts | 90 +++++++++++++++++++++++++++++++++ 3 files changed, 178 insertions(+) commit 4649d838ee6fef20d95d99cb749b17366d8b226b Author: Lothar Waßmann Date: Tue Oct 17 11:18:01 2017 +0200 ARM: dts: imx6-tx6: add a .dtsi file for the MB7 baseboard Move the MB7 specific settings to a separate .dtsi file to facilitate supporting more module variants with this baseboard. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl-tx6u-81xx-mb7.dts | 9 +-- arch/arm/boot/dts/imx6q-tx6q-11x0-mb7.dts | 42 +------------ arch/arm/boot/dts/imx6qdl-tx6-mb7.dtsi | 99 ++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 48 deletions(-) commit 1a9aae6f1a06ca9cfc0da24b0600087d9fca6595 Author: Lothar Waßmann Date: Tue Oct 17 11:18:00 2017 +0200 ARM: dts: imx6-tx6: move display configuration to .dtsi file Currently the display (LCD or LVDS) configuration is duplicated with slight variations in each TX6 module specific file. Move it to an include file for simplification and consistency. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl-tx6dl-comtft.dts | 74 +------ arch/arm/boot/dts/imx6dl-tx6s-8034.dts | 171 +--------------- arch/arm/boot/dts/imx6dl-tx6s-8035.dts | 171 +--------------- arch/arm/boot/dts/imx6dl-tx6u-801x.dts | 161 +-------------- arch/arm/boot/dts/imx6dl-tx6u-8033.dts | 170 +--------------- arch/arm/boot/dts/imx6dl-tx6u-811x.dts | 109 +--------- arch/arm/boot/dts/imx6dl-tx6u-81xx-mb7.dts | 185 +---------------- arch/arm/boot/dts/imx6q-tx6q-1010-comtft.dts | 74 +------ arch/arm/boot/dts/imx6q-tx6q-1010.dts | 159 +-------------- arch/arm/boot/dts/imx6q-tx6q-1020-comtft.dts | 74 +------ arch/arm/boot/dts/imx6q-tx6q-1020.dts | 162 +-------------- arch/arm/boot/dts/imx6q-tx6q-1036.dts | 170 +--------------- arch/arm/boot/dts/imx6q-tx6q-1110.dts | 109 +--------- arch/arm/boot/dts/imx6q-tx6q-11x0-mb7.dts | 187 ++---------------- arch/arm/boot/dts/imx6qdl-tx6-lcd.dtsi | 252 +++++++++++++++++++++++ arch/arm/boot/dts/imx6qdl-tx6-lvds.dtsi | 286 +++++++++++++++++++++++++++ arch/arm/boot/dts/imx6qdl-tx6.dtsi | 4 +- 17 files changed, 616 insertions(+), 1902 deletions(-) commit 038ab100c3d02b4055d4d92c6d316ea851f2e474 Author: Lothar Waßmann Date: Tue Oct 17 11:17:59 2017 +0200 ARM: dts: imx6-tx6: add support for I2C bus recovery Define the required properties to enable I2C bus recovery supported by the I2C subsystem. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-tx6.dtsi | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 1a0f710ebfd7f971c6fb0644cd5db8c46b7c698f Author: Lothar Waßmann Date: Tue Oct 17 11:17:58 2017 +0200 ARM: dts: imx6-tx6: convert to using simple-audio-card Convert the DTS sound setup to use the simple-audio-card driver. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-tx6.dtsi | 50 ++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 8 deletions(-) commit 9b2d84058445ae826548e2ba4f08b551b251d06f Author: Lothar Waßmann Date: Tue Oct 17 11:17:57 2017 +0200 ARM: dts: imx6-tx6: specify ethernet phy reset post-delay Under certain circumstances the ethernet PHY cannot be detected on Ka-Ro electronics TX6 modules. Using a phy-reset-post-delay of at least 2ms alleviates this problem. Define it to 10ms to be on the safe side. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-tx6.dtsi | 1 + 1 file changed, 1 insertion(+) commit 3fd415af1805b4906deaedb8150017e457ff0df7 Author: Lothar Waßmann Date: Tue Oct 17 11:17:56 2017 +0200 ARM: dts: imx6-tx6: improve ethernet related pinctrl setup Remove the PHY INT and RESET pins from hog section and put them into their own pinctrl nodes referenced by the appropriate driver nodes. Also, the MDIO pins are required for probing the Ethernet PHY, so they must be configured by the FEC driver, not by the PHY driver. Move the corresponding pinctrl settings from the PHY subnode to the FEC node. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-tx6.dtsi | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) commit 01b175c56040a1763c505dc912a325cea232d522 Author: Lothar Waßmann Date: Tue Oct 17 11:17:55 2017 +0200 ARM: dts: imx6-tx6: add trickle-charge config for DS1339 As the DS1339 driver now supports enabling the trickle charge feature via DTB, add the appropriate properties to utilize this feature. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-tx6.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit a7f37f26e99c9b8e2a4c53a1c33b5a066d43e69b Author: Lothar Waßmann Date: Tue Oct 17 11:17:54 2017 +0200 ARM: dts: imx6-tx6: remove obsolete ipu1 alias The 'ipu1' alias is already defined in imx6q.dtsi. There is no need to redefine it here. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-tx6q-11x0-mb7.dts | 1 - 1 file changed, 1 deletion(-) commit 65a2f7822d157312f23e577af77e8923a8930a88 Author: Lothar Waßmann Date: Tue Oct 17 11:17:53 2017 +0200 ARM: dts: imx6-tx6: remove obsolete eeti,egalax_ts The display, that incorporates this touchpanel is obsolete and won't be supported any more. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl-tx6u-811x.dts | 23 +---------------------- arch/arm/boot/dts/imx6dl-tx6u-81xx-mb7.dts | 22 +--------------------- arch/arm/boot/dts/imx6q-tx6q-1110.dts | 21 --------------------- arch/arm/boot/dts/imx6q-tx6q-11x0-mb7.dts | 22 +--------------------- 4 files changed, 3 insertions(+), 85 deletions(-) commit f3dd26c09155c8ff4c76d922339c758e870b4eb9 Author: Lothar Waßmann Date: Tue Oct 17 11:17:52 2017 +0200 ARM: dts: imx6-tx6: update model property to match current module HW revision The current TX6Q module HW revision is 3 reflected in the module name suffix '-1030' (-1130 for LVDS). Change the model string to prevent confusion about what DTS file to use for these modules. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-tx6q-1010.dts | 4 ++-- arch/arm/boot/dts/imx6q-tx6q-1110.dts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 0d8840e2661a4c7336525e15267a753c6cd71a3e Author: Fabio Estevam Date: Mon Oct 16 20:40:43 2017 -0200 ARM: dts: imx25-eukrea-mbimxsd25-baseboard: Fix the 'cd-gpios' property The GPIO polarity is missing in the cd-gpios property. Fix it, so that the following build warnings are gone: DTC arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dtb arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dtb: Warning (gpios_property): cd-gpios property size (8) too small for cell size 2 in /soc/aips@53f00000/esdhc@53fb4000 DTC arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dtb arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dtb: Warning (gpios_property): cd-gpios property size (8) too small for cell size 2 in /soc/aips@53f00000/esdhc@53fb4000 DTC arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dtb arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dtb: Warning (gpios_property): cd-gpios property size (8) too small for cell size 2 in /soc/aips@53f00000/esdhc@53fb4000 DTC arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dtb arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dtb: Warning (gpios_property): cd-gpios property size (8) too small for cell size 2 in /soc/aips@53f00000/esdhc@53fb4000 Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit afe42e6a989ba6ec32145ed130a1deed86301c6c Author: Fabio Estevam Date: Mon Oct 16 20:34:04 2017 -0200 ARM: dts: imx50: Pass the 'dma-cells' property Pass the '#dma-cells' property in the sdma node, so that the following build warning is gone: DTC arch/arm/boot/dts/imx50-evk.dtb arch/arm/boot/dts/imx50-evk.dtb: Warning (dmas_property): Missing property '#dma-cells' in node /soc/aips@60000000/sdma@63fb0000 or bad phandle (referred from /soc/aips@50000000/spba@50000000/ssi@50014000:dmas[0]) Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx50.dtsi | 1 + 1 file changed, 1 insertion(+) commit 2dee62e0d82431d938815afb1a74cb855d6701d7 Author: Fabio Estevam Date: Mon Oct 16 20:34:03 2017 -0200 ARM: dts: imx35-eukrea-mbimxsd35-baseboard: Fix the 'cd-gpios' property The GPIO polarity is missing in the cd-gpios property. Fix it, so that the following build warning is gone: DTC arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dtb arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dtb: Warning (gpios_property): cd-gpios property size (8) too small for cell size 2 in /soc/aips@53f00000/esdhc@53fb400 Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa5b0c92e60f4dae1b8251c8fd48e6863a5aab16 Author: Fabio Estevam Date: Mon Oct 16 20:34:02 2017 -0200 ARM: dts: imx6sx-softing-vining-2000: Fix the 'interrupt-parent' property The correct property name is 'interrupt-parent', so fix it accordingly. This fixes the following build warning: arch/arm/boot/dts/imx6sx-softing-vining-2000.dtb: Warning (interrupts_property): interrupts size is (8), expected multiple of 12 in /soc/aips-bus@02100000/ethernet@02188000/mdio/ethernet0-phy@0 arch/arm/boot/dts/imx6sx-softing-vining-2000.dtb: Warning (interrupts_property): interrupts size is (8), expected multiple of 12 in /soc/aips-bus@02100000/ethernet@021b4000/mdio/ethernet1-phy@0 Cc: Christoph Fritz Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx-softing-vining-2000.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 028602e3badbd8a67df605ca8a6128e95f3ff456 Author: Fabio Estevam Date: Mon Oct 16 20:34:01 2017 -0200 ARM: dts: imx6ul-pico-hobbit: Fix the 'interrupts' property The 'interrupts' property has an extra cell by mistake. Fix this, so that the following build warning is gone: DTC arch/arm/boot/dts/imx6ul-pico-hobbit.dtb arch/arm/boot/dts/imx6ul-pico-hobbit.dtb: Warning (interrupts_property): interrupts size is (12), expected multiple of 8 in /soc/aips-bus@2000000/ethernet@20b4000/mdio/ethernet-phy@1 Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-pico-hobbit.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7721dce68a30893f8eb9575704369302d5b26442 Author: Fabio Estevam Date: Mon Oct 16 20:01:45 2017 -0200 ARM: dts: imx6qp-wandboard-revd1: Add sata support The imx6qp variant also has sata, so add support for it. Reported-by: Luís Mendes Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qp-wandboard-revd1.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 0283991540cc26b04ef46c8364dc52c61f269976 Author: Fabio Estevam Date: Sun Oct 15 18:53:58 2017 -0200 ARM: dts: imx6q-cm-fx6: Use the 'vpcie-supply' property According to Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt, the property for specifying the PCIe regulator is 'vpcie-supply', so use the correct one. Also fix the polarity of GPIO2_24 so that the regulator can operate correctly. Signed-off-by: Fabio Estevam Tested-by: Christopher Spinrath Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-cm-fx6.dts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b038b881dd5121f7f5a9b3a430c5e5ef5c2d2e18 Author: Fabio Estevam Date: Sun Oct 15 18:53:57 2017 -0200 ARM: dts: imx6q-novena: Use the 'vpcie-supply' property Since commit c26ebe98a103 ("PCI: imx6: Add regulator support"), it is possible to pass the 'vpcie-supply' property to describe the PCIE supply. This way we can remove the 'regulator-always-on' property from the regulator and have a better device tree description. Signed-off-by: Fabio Estevam Reviewed-by: Marek Vasut Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-novena.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2067b757e97213ca50cf221a46ae1c71510e35ac Author: Leonard Crestez Date: Fri Jul 14 17:11:10 2017 +0300 ARM: dts: imx6ul: Add imx6ul-tempmon This works identically to imx6sx-tempmon on both imx6ul and imx6ull. It just needs to be defined in dts. Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit a6c856e9a8cd808f014f9629506c044607ffe203 Author: Leonard Crestez Date: Fri Jul 14 17:11:09 2017 +0300 ARM: dts: imx6sx: Use nvmem-cells for tempmon On imx6sx accessing OCOTP directly is wrong because the ocotp clock needs to be enabled first. Use the nvmem-cells binding instead. This requirement does not apply to older imx6qdl chips because there the ocotp access clock (clk_ipg_s) is always enabled. This is visible by comparing the "System Clocks, Gating, and Override" tables (OCOTP rows) in the 6DQ and 6SX manuals: http://www.nxp.com/assets/documents/data/en/reference-manuals/IMX6SXRM.pdf http://www.nxp.com/assets/documents/data/en/reference-manuals/IMX6DQRM.pdf This happens to work right now because the ocotp clock might be enabled for some other reason. In particular the it might be enabled from the bootloader and it only gets disabled late during boot in clk_disable_unused, after imx-thermal has completed probing. If imx-thermal is compiled as a module then the system can hang on probe. Reported-by: Lothar Waßmann Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6sx.dtsi | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit d31c46c00f5443fe7e3714de8de27ff3621a1788 Author: Tim Harvey Date: Mon Sep 18 13:11:01 2017 -0700 ARM: dts: imx: ventana: remove container node from iomuxc nodes The container node in the iomuxc node is no longer necessary and causes pinctl errors on the Ventana boards with analog video capture since aa12693e4156adafdef80a8bd134123a6419621b: pinctrl core: initialized pinctrl subsystem imx6q-pinctrl 20e0000.iomuxc: no groups defined in /soc/aips-bus@02000000/iomuxc@020e0000/adv7180grp imx6q-pinctrl 20e0000.iomuxc: no groups defined in /soc/aips-bus@02000000/iomuxc@020e0000/ipu2_csi1grp imx6q-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver imx6q-pinctrl 20e0000.iomuxc: function 'iomuxc' not supported imx6q-pinctrl 20e0000.iomuxc: invalid function iomuxc in map table imx6q-pinctrl 20e0000.iomuxc: function 'iomuxc' not supported imx6q-pinctrl 20e0000.iomuxc: invalid function iomuxc in map table Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-gw5400-a.dts | 215 ++++++++++--------- arch/arm/boot/dts/imx6qdl-gw51xx.dtsi | 300 +++++++++++++------------- arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 370 ++++++++++++++++---------------- arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 356 ++++++++++++++++--------------- arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 384 +++++++++++++++++----------------- arch/arm/boot/dts/imx6qdl-gw551x.dtsi | 182 ++++++++-------- arch/arm/boot/dts/imx6qdl-gw552x.dtsi | 174 ++++++++------- 7 files changed, 983 insertions(+), 998 deletions(-) commit d016b46ac95910ab21c565189e5aa8537541856d Author: Fabio Estevam Date: Sat Oct 14 09:43:22 2017 -0300 ARM: dts: imx6qdl-wandboard: Add support for the revd1 variants Latest wandboard hardware revision is revd1, which brings the following new features: - PFUZE100 PMIC - AR8035 Ethernet PHY - Upgrade Wifi/BT chip to BCM4339/BCM43430. Add support for the mx6, mx6dl and mx6qp revd1 variants. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 3 + arch/arm/boot/dts/imx6dl-wandboard-revd1.dts | 22 +++ arch/arm/boot/dts/imx6q-wandboard-revd1.dts | 26 ++++ arch/arm/boot/dts/imx6qdl-wandboard-revd1.dtsi | 196 +++++++++++++++++++++++++ arch/arm/boot/dts/imx6qp-wandboard-revd1.dts | 22 +++ 5 files changed, 269 insertions(+) commit 7318d0f395545089bcf0bbfda61d96fe9c940cd7 Author: Philipp Zabel Date: Thu Oct 12 15:30:19 2017 +0200 ARM: dts: imx6ul-14x14-evk: switch lcdif pixel clock to video pll By default, the lcdif_pre_sel mux is switched to the pll3_pfd1_540m PFD source. If this mux is allowed to propagate rate changes to its parent, setting the LCDIF pixel clock rate to 9 MHz, as required by the LCD panel, will cause the pll3_pfd1_540m PFD to be switched away from its nominal rate to 288 MHz. This has no negative side effects, as there are no other children to this PFD. Still, to avoid surprises, it might be preferrable to switch to the designated video PLL (pll5_video_div) as clock source for the LCDIF pixel clock. Signed-off-by: Philipp Zabel Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul-14x14-evk.dts | 2 ++ 1 file changed, 2 insertions(+) commit ef4eec2bc3119863e9f7a8832499d1fcd9c420e0 Author: Lothar Waßmann Date: Wed Oct 11 13:07:40 2017 +0200 ARM: dts: imx53-tx53: add support for I2C bus recovery The imx-i2c driver supports automatic bus recovery via the GPIO function of the I2C pins. Enable this functionality for the Ka-Ro electronics TX53 modules. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-tx53-x13x.dts | 5 ++++- arch/arm/boot/dts/imx53-tx53.dtsi | 19 ++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) commit d51916072c7fa9c0b4d40b0a3c5b02909d4155de Author: Lothar Waßmann Date: Wed Oct 11 13:07:39 2017 +0200 ARM: dts: imx53-tx53: use explicit pad_ctl settings for I2C pins Don't rely on the padctl settings established by the boot loader, but explicitly specify the padctl values in DTB. This is also necessary to be able to use the DTB files from the Linux kernel for future U-Boot versions that support HW configuration via DTB. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-tx53.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a2802e65320a0cb1e0d154c9430b1f692e1fa23b Author: Lothar Waßmann Date: Wed Oct 11 13:07:38 2017 +0200 ARM: dts: imx53-tx53: add trickle-charge config for DS1339 As the DS1339 driver now supports enabling the trickle charge feature via DTB, add the appropriate properties to utilize this feature. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-tx53.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 78256ffbce4a7606372e3b535568b4e29f426b7e Author: Lothar Waßmann Date: Wed Oct 11 13:07:37 2017 +0200 ARM: dts: imx53-tx53: remove obsolete eeti,egalax_ts The display, that incorporates this touchpanel is obsolete and won't be supported any more. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-tx53-x13x.dts | 35 ----------------------------------- 1 file changed, 35 deletions(-) commit 08f8275dca0be4cfc8759dd4237a1973d6cd1a0a Author: Lothar Waßmann Date: Wed Oct 11 13:07:36 2017 +0200 ARM: dts: imx53-tx53: remove the regulators bus 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: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-tx53-x03x.dts | 38 +++++++-------- arch/arm/boot/dts/imx53-tx53-x13x.dts | 38 +++++++-------- arch/arm/boot/dts/imx53-tx53.dtsi | 91 +++++++++++++++-------------------- 3 files changed, 74 insertions(+), 93 deletions(-) commit 8771c7493aef9bb6d9d8d1fd2c681a24acd3a420 Author: Lothar Waßmann Date: Wed Oct 11 13:07:35 2017 +0200 ARM: dts: imx53-tx53: Relicense the TX53 dts files under GPLv2/X11 The current GPL only licensing on the dts files makes it very impractical for other software components licensed under another license. In order to make it easier for them to reuse our device trees, relicense our dts files first under a GPL/X11 dual-license. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx53-tx53-x03x.dts | 42 ++++++++++++++++++++++++++++++----- arch/arm/boot/dts/imx53-tx53-x13x.dts | 38 ++++++++++++++++++++++++++++++- arch/arm/boot/dts/imx53-tx53.dtsi | 42 ++++++++++++++++++++++++++++++----- 3 files changed, 109 insertions(+), 13 deletions(-) commit 10c8b7738d05cc28cb6a7b8601de176d8770b62b Author: Lothar Waßmann Date: Wed Oct 11 13:05:39 2017 +0200 ARM: dts: imx28-tx28: add trickle-charge config for DS1339 As the DS1339 driver now supports enabling the trickle charge feature via DTB, add the appropriate properties to utilize this feature. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx28-tx28.dts | 2 ++ 1 file changed, 2 insertions(+) commit e27afb84b4680570b64c958dfcba9e0b3da92fc9 Author: Alexei Starovoitov Date: Sun Oct 22 10:29:06 2017 -0700 selftests/bpf: fix broken build of test_maps fix multiple build errors and warnings 1. test_maps.c: In function ‘test_map_rdonly’: test_maps.c:1051:30: error: ‘BPF_F_RDONLY’ undeclared (first use in this function) MAP_SIZE, map_flags | BPF_F_RDONLY); 2. test_maps.c:1048:6: warning: unused variable ‘i’ [-Wunused-variable] int i, fd, key = 0, value = 0; 3. test_maps.c:1087:2: error: called object is not a function or function pointer assert(bpf_map_lookup_elem(fd, &key, &value) == -1 && errno == EPERM); 4. ./bpf_helpers.h:72:11: error: use of undeclared identifier 'BPF_FUNC_getsockopt' (void *) BPF_FUNC_getsockopt; Fixes: e043325b3087 ("bpf: Add tests for eBPF file mode") Fixes: 6e71b04a8224 ("bpf: Add file mode configuration into bpf maps") Fixes: cd86d1fd2102 ("bpf: Adding helper function bpf_getsockops") Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/include/uapi/linux/bpf.h | 62 ++++++++++++++++++++++++++++----- tools/testing/selftests/bpf/test_maps.c | 6 ++-- 2 files changed, 57 insertions(+), 11 deletions(-) commit 330b52bd9bba1d66028772dfe08c053a34c5069a Author: Lucas Stach Date: Fri Oct 20 17:46:55 2017 +0200 drm/etnaviv: short-circuit perfmon ioctls The feature implementation isn't stable yet. Reject any attempt to use the IOCTLs for now. This keeps most of the code in place, so we can stabilize it in-tree, but keeps userspace from using the feature for now. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_drv.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 988c3b385974be4c587ca228e577793eb19a95ff Author: Lucas Stach Date: Fri Oct 20 17:40:34 2017 +0200 Revert "drm/etnaviv: submit supports performance monitor requests" The performance monitoring feature isn't stable enough yet, so don't advertise it to userspace yet. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f8ddadc4db6c7b7029b6d0e0d9af24f74ad27ca2 Merge: bdd091b b5ac3be Author: David S. Miller Date: Sun Oct 22 13:36:53 2017 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net There were quite a few overlapping sets of changes here. Daniel's bug fix for off-by-ones in the new BPF branch instructions, along with the added allowances for "data_end > ptr + x" forms collided with the metadata additions. Along with those three changes came veritifer test cases, which in their final form I tried to group together properly. If I had just trimmed GIT's conflict tags as-is, this would have split up the meta tests unnecessarily. In the socketmap code, a set of preemption disabling changes overlapped with the rename of bpf_compute_data_end() to bpf_compute_data_pointers(). Changes were made to the mv88e6060.c driver set addr method which got removed in net-next. The hyperv transport socket layer had a locking change in 'net' which overlapped with a change of socket state macro usage in 'net-next'. Signed-off-by: David S. Miller commit 4dd9eab39c71628d113168a01473ee17b5f61eac Author: Markus Elfring Date: Wed Oct 18 20:48:52 2017 +0200 powerpc/pseries: Cleanup error handling in iommu_pseries_alloc_group() Although kfree(NULL) is legal, it's a bit lazy to rely on that to implement the error handling. So do it the normal Linux way using labels for each failure path. Signed-off-by: Markus Elfring [mpe: Squash a few patches and rewrite change log] Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/iommu.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit c28237f1d4ed2c9022f9eed656ecf36999e34f47 Author: Markus Elfring Date: Tue Oct 17 13:31:42 2017 +0200 powerpc-opal: Fix a typo in a comment line of two file headers Fix a word in these descriptions. Signed-off-by: Markus Elfring Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-hmi.c | 2 +- arch/powerpc/platforms/powernv/opal-memory-errors.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a7cd4586210c69c19aef26f4f83d3e492040de1c Author: Markus Elfring Date: Tue Sep 5 18:47:02 2017 +0200 powerpc/axonram: Drop unnecessary variable initialisation The local variable "rc" will eventually be set only to an error code. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring Signed-off-by: Michael Ellerman arch/powerpc/sysdev/axonram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d2d4339cc326c427638daa67e264dd455ee1899 Author: Geert Uytterhoeven Date: Fri Jun 2 14:38:47 2017 +0200 powerpc: dts: acadia: DT fix s/#interrupts-parent/#interrupt-parent/ Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Michael Ellerman arch/powerpc/boot/dts/acadia.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05c14c03138532a3cb2aa29c2960445c8753343b Author: Michael Ellerman Date: Mon Oct 9 21:52:44 2017 +1100 powerpc/perf/hv-24x7: Fix incorrect comparison in memord In the hv-24x7 code there is a function memord() which tries to implement a sort function return -1, 0, 1. However one of the conditions is incorrect, such that it can never be true, because we will have already returned. I don't believe there is a bug in practice though, because the comparisons are an optimisation prior to calling memcmp(). Fix it by swapping the second comparision, so it can be true. Reported-by: David Binderman Signed-off-by: Michael Ellerman arch/powerpc/perf/hv-24x7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 727f13616c45caa72e4325c5027c1a8f41e745a9 Author: Michael Ellerman Date: Mon Oct 9 21:54:05 2017 +1100 powerpc: Disable the fast-endian switch syscall by default Back in 2008 we added support for "fast little-endian switch" in the syscall path. This added a special case syscall number 0x1ebe, which is caught very early in the system call exception and switches endian with as little overhead as possible. See commit 745a14cc264b ("[POWERPC] Add fast little-endian switch system call") for full details. Although it is fast, it's also completely non standard. The "syscall number" is out of the range of normal syscalls, it can't be traced or audited, and it's a bit of a wart. To the best of our knowledge it was only used by one program, now long since discontinued. So in an effort to shake out any current users, put it behind a config option, and make it default n. If anyone *is* using it they can quickly reinstate it with a rebuild, and we can flip it to default y. Signed-off-by: Michael Ellerman arch/powerpc/Kconfig.debug | 6 ++++++ arch/powerpc/kernel/exceptions-64s.S | 5 +++++ 2 files changed, 11 insertions(+) commit 5c2511bff47ba7fb09268ee8ebbf5237da5c0b84 Author: Michael Ellerman Date: Mon Oct 9 21:54:04 2017 +1100 powerpc/64s: Move the two FAST_ENDIAN macros next to each other So we can #ifdef them in the next patch. Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 90d6473747b289739b435d5fa6ae8e38ae2921d1 Author: Michael Ellerman Date: Mon Oct 9 21:59:32 2017 +1100 powerpc/xmon: Add kstack base to paca dump When dumping the paca in xmon we currently show kstack. Although it's not hard it's a bit fiddly to work out what the bounds of the kernel stack should be based on the kstack value. To make life easier and "kstack_base" which is the base (lowest address) of the kernel stack, eg: kstack = 0xc0000000f1a7be30 (0x258) kstack_base = 0xc0000000f1a78000 Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 1 + 1 file changed, 1 insertion(+) commit deed2ec5a786f037b00136792e08404c84ec557a Author: Andrew Donnellan Date: Thu Oct 12 13:16:59 2017 +1100 powerpc/configs: Enable I2C_CHARDEV for pseries and powernv i2c-dev provides an interface for userspace programs to interact with I2C devices, and is very helpful for I2C-related debugging. Enable it in pseries_defconfig and powernv_defconfig. It's already enabled in many other powerpc defconfigs. Signed-off-by: Andrew Donnellan Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 1 + arch/powerpc/configs/pseries_defconfig | 1 + 2 files changed, 2 insertions(+) commit 6773027205ea4ccf17055d7f0a0cd813f22fe127 Author: Michael Ellerman Date: Mon Oct 16 12:41:00 2017 +0530 powerpc/mm/radix: Drop unneeded NULL check We call these functions with non-NULL mm or vma. Hence we can skip the NULL check in these functions. We also remove now unused function __local_flush_hugetlb_page(). Signed-off-by: Aneesh Kumar K.V [mpe: Drop the checks with is_vm_hugetlb_page() as noticed by Nick] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/hugetlb.h | 6 ------ arch/powerpc/mm/tlb-radix.c | 22 ++++++++++------------ 2 files changed, 10 insertions(+), 18 deletions(-) commit 402e172a2ce76210f2fe921cf419d12103851344 Author: Breno Leitao Date: Tue Oct 17 16:20:18 2017 -0200 powerpc/xmon: Check before calling xive functions Currently xmon could call XIVE functions from OPAL even if the XIVE is disabled or does not exist in the system, as in POWER8 machines. This causes the following exception: 1:mon> dx cpu 0x1: Vector: 700 (Program Check) at [c000000423c93450] pc: c00000000009cfa4: opal_xive_dump+0x50/0x68 lr: c0000000000997b8: opal_return+0x0/0x50 This patch simply checks if XIVE is enabled before calling XIVE functions. Fixes: 243e25112d06 ("powerpc/xive: Native exploitation of the XIVE interrupt controller") Suggested-by: Guilherme G. Piccoli Signed-off-by: Breno Leitao Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 5 +++++ 1 file changed, 5 insertions(+) commit 1cafc629408d1883a00c9f656e3de5a677460a88 Author: Vaibhav Jain Date: Wed Sep 20 11:53:22 2017 +0530 cxl: Provide debugfs access to PSL_DEBUG/XSL_DEBUG registers Access to PSL/XSL_DEBUG registers on the adapter provides easy access to the debug facilities provided by PSL/XSL. So this patch adds two new files (debug, xsl-debug) to the cxl-adapter specific debugfs folder located at /sys/kernel/debugfs/cxl/card, which will provide direct r/w access to corrosponding debug registers in the adapter config-space. Signed-off-by: Vaibhav Jain Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 1 + drivers/misc/cxl/debugfs.c | 4 ++++ 2 files changed, 5 insertions(+) commit d1de6d6c639b7827c42c4750b8101ed1049e1c72 Author: Bjorn Andersson Date: Mon Oct 16 13:17:08 2017 -0500 soc: qcom: Remote filesystem memory driver The Qualcomm remote file system protocol is used by certain remoteprocs, in particular the modem, to read and write persistent storage in platforms where only the application CPU has physical storage access. The protocol is based on a set of QMI-encoded control-messages and a shared memory buffer for exchaning the data. This driver implements the latter, providing the user space service access to the carved out chunk of memory. Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/of/platform.c | 1 + drivers/soc/qcom/Kconfig | 11 ++ drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/rmtfs_mem.c | 271 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 284 insertions(+) commit 2501ec14048d24d98651d2204cdf9cb33a127199 Author: Bjorn Andersson Date: Tue Oct 10 22:08:55 2017 -0700 dt-binding: soc: qcom: Add binding for rmtfs memory This adds the binding for describing shared memory used to exchange file system blocks between the RMTFS client and service. A client for this is generally found in the modem firmware and is used for accessing persistent storage for things such as radio calibration. Acked-by: Rob Herring Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross .../bindings/reserved-memory/qcom,rmtfs-mem.txt | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit eb297bc716ec2cb3147e6e99002e37058c65cba3 Author: Bjorn Andersson Date: Tue Oct 10 22:08:54 2017 -0700 of: reserved_mem: Accessor for acquiring reserved_mem In some cases drivers referencing a reserved-memory region might want to remap the entire region, but when defining the reserved-memory by "size" the client driver has no means to know the associated base address of the reserved memory region. This patch adds an accessor for such drivers to acquire a handle to their associated reserved-memory for this purpose. A complicating factor for the implementation is that the reserved_mem objects are created from the flattened DeviceTree, as such we can't use the device_node address for comparison. Fortunately the name of the node will be used as "name" of the reserved_mem and will be used when building the full_name, so we can compare the "name" with the basename of the full_name to find the match. Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/of/of_reserved_mem.c | 26 ++++++++++++++++++++++++++ include/linux/of_reserved_mem.h | 5 +++++ 2 files changed, 31 insertions(+) commit a50ff19d0658d8a09026158448894f06a4521f33 Author: Bjorn Andersson Date: Tue Oct 10 22:08:53 2017 -0700 of/platform: Generalize /reserved-memory handling By iterating over all /reserved-memory child nodes and match each one to a list of compatibles that we want to treat specially, we can easily extend the list of compatibles to handle - without having to resort to of_platform_populate() that would create unnecessary platform_devices. Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/of/platform.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit bdd091bab8c631bd2801af838e344fad34566410 Merge: 02db34d ee74d99 Author: David S. Miller Date: Sun Oct 22 03:13:20 2017 +0100 Merge branch 'tun-timer-cleanups' Eric Dumazet says: ==================== tun: timer cleanups While working on a syzkaller issue that might have been fixed already by Cong Wang in commit 0ad646c81b21 ("tun: call dev_get_valid_name() before register_netdevice()") I made three small changes related to flow_gc_timer. ==================== Signed-off-by: David S. Miller commit ee74d9967b829232723939cb7c9b100b29f6ec98 Author: Eric Dumazet Date: Fri Oct 20 11:29:57 2017 -0700 tun: do not arm flow_gc_timer in tun_flow_init() Timer is properly armed on demand from tun_flow_update(), so there is no need to arm it at tun init. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/tun.c | 2 -- 1 file changed, 2 deletions(-) commit 81d98fa4df3d1683b3ef21e8a7a0ccac7874f0de Author: Eric Dumazet Date: Fri Oct 20 11:29:56 2017 -0700 tun: avoid extra timer schedule in tun_flow_cleanup() If tun_flow_cleanup() deleted all flows, no need to arm the timer again. It will be armed next time tun_flow_update() is called. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/tun.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 7dbfb4ef77db5666f0f3a425e7db93ca30ff4285 Author: Eric Dumazet Date: Fri Oct 20 11:29:55 2017 -0700 tun: do not block BH again in tun_flow_cleanup() tun_flow_cleanup() being a timer callback, it is already running in BH context. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/tun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 02db34d04ecb5e4bb590eb7baf1c12c82ad68ac9 Merge: 62d3f60 bfdf756 Author: David S. Miller Date: Sun Oct 22 03:12:06 2017 +0100 Merge branch 'bpf-BASE_RTT' Lawrence Brakmo says: ==================== bpf: add support for BASE_RTT This patch set adds the following functionality to socket_ops BPF programs. 1) Add bpf helper function bpf_getsocketops. Currently only supports TCP_CONGESTION 2) Add BPF_SOCKET_OPS_BASE_RTT op to get the base RTT of the connection. In general, the base RTT indicates the threshold such that RTTs above it indicate congestion. More details in the relevant patches. Consists of the following patches: [PATCH net-next 1/5] bpf: add support for BPF_SOCK_OPS_BASE_RTT [PATCH net-next 2/5] bpf: Adding helper function bpf_getsockops [PATCH net-next 3/5] bpf: Add BPF_SOCKET_OPS_BASE_RTT support to [PATCH net-next 4/5] bpf: sample BPF_SOCKET_OPS_BASE_RTT program [PATCH net-next 5/5] bpf: create samples/bpf/tcp_bpf.readme ==================== Signed-off-by: David S. Miller commit bfdf75693875fd53d6f08d5fec9506a864f07372 Author: Lawrence Brakmo Date: Fri Oct 20 11:05:43 2017 -0700 bpf: create samples/bpf/tcp_bpf.readme Readme file explaining how to create a cgroupv2 and attach one of the tcp_*_kern.o socket_ops BPF program. Signed-off-by: Lawrence Brakmo Acked-by: Daniel Borkmann Acked_by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/tcp_bbf.readme | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit c890063e440456e75c2e70f6bcec3797f1771eb6 Author: Lawrence Brakmo Date: Fri Oct 20 11:05:42 2017 -0700 bpf: sample BPF_SOCKET_OPS_BASE_RTT program Sample socket_ops BPF program to test the BPF helper function bpf_getsocketops and the new socket_ops op BPF_SOCKET_OPS_BASE_RTT. The program provides a base RTT of 80us when the calling flow is within a DC (as determined by the IPV6 prefix) and the congestion algorithm is "nv". Signed-off-by: Lawrence Brakmo Acked-by: Daniel Borkmann Acked_by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/Makefile | 1 + samples/bpf/tcp_basertt_kern.c | 78 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) commit 85cce215781685bbc94b6af2bd1aa40b71965a70 Author: Lawrence Brakmo Date: Fri Oct 20 11:05:41 2017 -0700 bpf: Add BPF_SOCKET_OPS_BASE_RTT support to tcp_nv TCP_NV will try to get the base RTT from a socket_ops BPF program if one is loaded. NV will then use the base RTT to bound its min RTT (its notion of the base RTT). It uses the base RTT as an upper bound and 80% of the base RTT as its lower bound. In other words, NV will consider filtered RTTs larger than base RTT as a sign of congestion. As a result, there is no minRTT inflation when there is a lot of congestion. For example, in a DC where the RTTs are less than 40us when there is no congestion, a base RTT value of 80us improves the performance of NV. The difference between the uncongested RTT and the base RTT provided represents how much queueing we are willing to have (in practice it can be higher). NV has been tunned to reduce congestion when there are many flows at the cost of one flow not achieving full bandwith utilization. When a reasonable base RTT is provided, one NV flow can now fully utilize the full bandwidth. In addition, the performance is also improved when there are many flows. In the following examples the NV results are using a kernel with this patch set (i.e. both NV results are using the new nv_loss_dec_factor). With one host sending to another host and only one flow the goodputs are: Cubic: 9.3 Gbps, NV: 5.5 Gbps, NV (baseRTT=80us): 9.2 Gbps With 2 hosts sending to one host (1 flow per host, the goodput per flow is: Cubic: 4.6 Gbps, NV: 4.5 Gbps, NV (baseRTT=80us)L 4.6 Gbps But the RTTs seen by a ping process in the sender is: Cubic: 3.3ms NV: 97us, NV (baseRTT=80us): 146us With a lot of flows things look even better for NV with baseRTT. Here we have 3 hosts sending to one host. Each sending host has 6 flows: 1 stream, 4x1MB RPC, 1x10KB RPC. Cubic, NV and NV with baseRTT all fully utilize the full available bandwidth. However, the distribution of bandwidth among the flows is very different. For the 10KB RPC flow: Cubic: 27Mbps, NV: 111Mbps, NV (baseRTT=80us): 222Mbps The 99% latencies for the 10KB flows are: Cubic: 26ms, NV: 1ms, NV (baseRTT=80us): 500us The RTT seen by a ping process at the senders: Cubic: 3.2ms NV: 720us, NV (baseRTT=80us): 330us Signed-off-by: Lawrence Brakmo Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/ipv4/tcp_nv.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) commit cd86d1fd21025fdd6daf23d1288da405e7ad0ec6 Author: Lawrence Brakmo Date: Fri Oct 20 11:05:40 2017 -0700 bpf: Adding helper function bpf_getsockops Adding support for helper function bpf_getsockops to socket_ops BPF programs. This patch only supports TCP_CONGESTION. Signed-off-by: Vlad Vysotsky Acked-by: Lawrence Brakmo Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 19 ++++++++++--- net/core/filter.c | 46 ++++++++++++++++++++++++++++++- tools/testing/selftests/bpf/bpf_helpers.h | 3 ++ 3 files changed, 63 insertions(+), 5 deletions(-) commit e6546ef6d86d0fc38e0e84ccae80e641f3fc0087 Author: Lawrence Brakmo Date: Fri Oct 20 11:05:39 2017 -0700 bpf: add support for BPF_SOCK_OPS_BASE_RTT A congestion control algorithm can make a call to the BPF socket_ops program to request the base RTT. The base RTT can be congestion control dependent and is meant to represent a congestion threshold such that RTTs above it indicate congestion. This is especially useful for flows within a DC where the base RTT is easy to obtain. Being provided a base RTT solves a basic problem in RTT based congestion avoidance algorithms (such as Vegas, NV and BBR). Although it is easy to get the base RTT when the network is not congested, it is very diffcult to do when it is very congested. Newer connections get an inflated value of the base RTT leading to unfariness (newer flows with a larger base RTT get more bandwidth). As a result, RTT based congestion avoidance algorithms tend to update their base RTTs to improve fairness. In very congested networks this can lead to base RTT inflation, reducing the ability of these RTT based congestion control algorithms to prevent congestion. Note that in my experiments with TCP-NV, the base RTT provided can be much larger than the actual hardware RTT. For example, experimenting with hosts within a rack where the hardware RTT is 16-20us, I've used base RTTs up to 150us. The effect of using a larger base RTT is that the congestion avoidance algorithm will allow more queueing. When there are only a few flows the main effect is larger measured RTTs and RPC latencies due to the increased queueing. When there are a lot of flows, a larger base RTT can lead to more congestion and more packet drops. For this case, where the hardware RTT is 20us, a base RTT of 80us produces good results. This patch only introduces BPF_SOCK_OPS_BASE_RTT, a later patch in this set adds support for using it in TCP-NV. Further study and testing is needed before support can be added to other delay based congestion avoidance algorithms. Signed-off-by: Lawrence Brakmo Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 62d3f60b4d065c09a3ccb9e862e71ae870c2d27b Author: Pieter Jansen van Vuuren Date: Fri Oct 20 19:49:52 2017 +0200 nfp: use struct fields for 8 bit-wide access Use direct access struct fields rather than PREP_FIELD() macros to manipulate the jump ID and length, both of which are exactly 8-bits wide. This simplifies the code somewhat. Signed-off-by: Simon Horman Signed-off-by: Pieter Jansen van Vuuren Acked-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/action.c | 87 +++++++--------------- drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 26 ++++--- 2 files changed, 39 insertions(+), 74 deletions(-) commit 0cea8e28df721f929ee3e1fa32489c012100f5a1 Author: Gustavo A. R. Silva Date: Fri Oct 20 12:37:52 2017 -0500 net: x25: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/x25/x25_facilities.c | 2 +- net/x25/x25_in.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 110af3acb8cfd79dcb5676a01e07cb2b6afa4c04 Author: Gustavo A. R. Silva Date: Fri Oct 20 12:05:30 2017 -0500 net: af_unix: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/unix/af_unix.c | 1 + 1 file changed, 1 insertion(+) commit 3fa5f11de1ab98a6c54693b78880167a2693cee1 Author: Stefano Brivio Date: Fri Oct 20 13:31:36 2017 +0200 geneve: Get rid of is_all_zero(), streamline is_tnl_info_zero() No need to re-invent memchr_inv() with !is_all_zero(). While at it, replace conditional and return clauses with a single return clause in is_tnl_info_zero(). Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller drivers/net/geneve.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit c44768e058827064704452f88b543f802f955cae Merge: 0d5fcebf 0620427 Author: David S. Miller Date: Sun Oct 22 02:41:30 2017 +0100 Merge branch 'dsa-lan9303-Add-fdb-mdb-methods' Egil Hjelmeland says: ==================== net: dsa: lan9303: Add fdb/mdb methods This series add support for accessing and managing the lan9303 ALR (Address Logic Resolution). The first patch add low level functions for accessing the ALR, along with port_fast_age and port_fdb_dump methods. The second patch add functions for managing ALR entires, along with remaining fdb/mdb methods. Note that to complete STP support, a special ALR entry with the STP eth address must be added too. This must be addressed later. Comments welcome! Changes v2 -> v3: - Whitespace polishing. Removed some "section" comments. - Prefixed ALR constants with LAN9303_ for consistency. - Patch 2: lan9303_port_fast_age() wrap the "port" into a struct for passing as context to alr_loop_cb_del_port_learned. Safer in event of type change. - Patch 2: Reviewed-by: Vivien Didelot Changes v1 -> v2: - Patch 2: Removed question comment ==================== Signed-off-by: David S. Miller commit 0620427ea0d6497615fb9313a9e51e8322fcc029 Author: Egil Hjelmeland Date: Fri Oct 20 12:19:10 2017 +0200 net: dsa: lan9303: Add fdb/mdb manipulation Add functions for managing the lan9303 ALR (Address Logic Resolution). Implement DSA methods: port_fdb_add, port_fdb_del, port_mdb_prepare, port_mdb_add and port_mdb_del. Since the lan9303 do not offer reading specific ALR entry, the driver caches all static entries - in a flat table. Signed-off-by: Egil Hjelmeland Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/lan9303-core.c | 173 +++++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/lan9303.h | 9 +++ 2 files changed, 182 insertions(+) commit ab335349b85229f58c6d65f058a8c98d2612b920 Author: Egil Hjelmeland Date: Fri Oct 20 12:19:09 2017 +0200 net: dsa: lan9303: Add port_fast_age and port_fdb_dump methods Add DSA method port_fast_age as a step to STP support. Add low level functions for accessing the lan9303 ALR (Address Logic Resolution). Added DSA method port_fdb_dump Signed-off-by: Egil Hjelmeland Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/lan9303-core.c | 160 +++++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/lan9303.h | 2 + 2 files changed, 162 insertions(+) commit 0d5fcebf3c370eb27f9a0e8db454625e73cd1cb4 Author: Jon Maloy Date: Fri Oct 20 11:21:32 2017 +0200 tipc: refactor tipc_sk_timeout() function The function tipc_sk_timeout() is more complex than necessary, and even seems to contain an undetected bug. At one of the occurences where we renew the timer we just order it with (HZ / 20), instead of (jiffies + HZ / 20); In this commit we clean up the function. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 49 +++++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 26 deletions(-) commit 36341de257a127f3e73fdfb758e017e3a8548fb0 Merge: 86f540c e65f7ee Author: David S. Miller Date: Sun Oct 22 02:22:40 2017 +0100 Merge branch 'net-driver-refcont_t' Elena Reshetova says: ==================== networking drivers refcount_t conversions Note: these are the last patches related to networking that perform conversion of refcounters from atomic_t to refcount_t. In contrast to the core network refcounter conversions that were merged earlier, these are much more straightforward ones. This series, for various networking drivers, 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. Patches are based on top of net-next. If there are no objections to the patches, please merge them via respective trees ==================== Signed-off-by: David S. Miller commit e65f7ee39b4d7604a78b03ed35d723e1001fc241 Author: Elena Reshetova Date: Fri Oct 20 10:23:49 2017 +0300 drivers, connector: convert cn_callback_entry.refcnt from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable cn_callback_entry.refcnt is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: David S. Miller drivers/connector/cn_queue.c | 4 ++-- drivers/connector/connector.c | 2 +- include/linux/connector.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit 709c89b45b874b2f81a074b8802a736009873f48 Author: Elena Reshetova Date: Fri Oct 20 10:23:48 2017 +0300 drivers, net, ppp: convert syncppp.refcnt from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable syncppp.refcnt is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: David S. Miller drivers/net/ppp/ppp_synctty.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit d780cd44e3cea119a3346e6d7c04d35b9c50d54b Author: Elena Reshetova Date: Fri Oct 20 10:23:47 2017 +0300 drivers, net, ppp: convert ppp_file.refcnt from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable ppp_file.refcnt is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 313a912155c78ed87ad6fca175dc56b75fd00a58 Author: Elena Reshetova Date: Fri Oct 20 10:23:46 2017 +0300 drivers, net, ppp: convert asyncppp.refcnt from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable asyncppp.refcnt is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: David S. Miller drivers/net/ppp/ppp_async.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 28206cdb3bc079a97d24c33b4427395f9e406fad Author: Elena Reshetova Date: Fri Oct 20 10:23:45 2017 +0300 drivers, net: convert masces_tx_sa.refcnt from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable masces_tx_sa.refcnt is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: David S. Miller drivers/net/macsec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8676d76f087f9b2499f056aa0c5d857cffde6806 Author: Elena Reshetova Date: Fri Oct 20 10:23:44 2017 +0300 drivers, net: convert masces_rx_sc.refcnt from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable masces_rx_sc.refcnt is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: David S. Miller drivers/net/macsec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e187246f0f7522e306d1d156a2d5edcaf82ba840 Author: Elena Reshetova Date: Fri Oct 20 10:23:43 2017 +0300 drivers, net: convert masces_rx_sa.refcnt from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable masces_rx_sa.refcnt is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: David S. Miller drivers/net/macsec.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 956cc1e70c55ba4d5f87b9605ee727bbd225d56d Author: Elena Reshetova Date: Fri Oct 20 10:23:42 2017 +0300 drivers, net, hamradio: convert sixpack.refcnt from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable sixpack.refcnt is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: David S. Miller drivers/net/hamradio/6pack.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit dd8e19456d60a519de1852ae4b1be7d62690d2e0 Author: Elena Reshetova Date: Fri Oct 20 10:23:41 2017 +0300 drivers, net, mlx5: convert fs_node.refcount from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable fs_node.refcount is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 28 +++++++++++------------ drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 3 ++- 2 files changed, 16 insertions(+), 15 deletions(-) commit a4b51a9f83c6d359ff8fc0c66009283b6fdeeaf8 Author: Elena Reshetova Date: Fri Oct 20 10:23:40 2017 +0300 drivers, net, mlx5: convert mlx5_cq.refcount from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable mlx5_cq.refcount is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/cq.c | 16 ++++++++-------- include/linux/mlx5/cq.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) commit 17ac99b2b8d08ed40f4525491d6eff330329a6d2 Author: Elena Reshetova Date: Fri Oct 20 10:23:39 2017 +0300 drivers, net, mlx4: convert mlx4_srq.refcount from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable mlx4_srq.refcount is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/srq.c | 8 ++++---- include/linux/mlx4/device.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 0068895ff845c38e9e2b65c002c53c623379e436 Author: Elena Reshetova Date: Fri Oct 20 10:23:38 2017 +0300 drivers, net, mlx4: convert mlx4_qp.refcount from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable mlx4_qp.refcount is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/qp.c | 8 ++++---- include/linux/mlx4/device.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit ff61b5e3f041c2f1aa8d7c700af3007889973889 Author: Elena Reshetova Date: Fri Oct 20 10:23:37 2017 +0300 drivers, net, mlx4: convert mlx4_cq.refcount from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable mlx4_cq.refcount is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/cq.c | 8 ++++---- include/linux/mlx4/device.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit c6d4e63e065e796d2f2734c1e4e13f85f1c1c5e4 Author: Elena Reshetova Date: Fri Oct 20 10:23:36 2017 +0300 drivers, net, ethernet: convert mtk_eth.dma_refcnt from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable mtk_eth.dma_refcnt is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 8 +++++--- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) commit eaf6ab76430881c30695a9195ce37d6b11b04997 Author: Elena Reshetova Date: Fri Oct 20 10:23:35 2017 +0300 drivers, net, ethernet: convert clip_entry.refcnt from atomic_t to refcount_t atomic_t variables are currently used to implement reference counters with the following properties: - counter is initialized to 1 using atomic_set() - a resource is freed upon counter reaching zero - once counter reaches zero, its further increments aren't allowed - counter schema uses basic atomic operations (set, inc, inc_not_zero, dec_and_test, etc.) Such atomic variables should be converted to a newly provided refcount_t type and API that prevents accidental counter overflows and underflows. This is important since overflows and underflows can lead to use-after-free situation and be exploitable. The variable clip_entry.refcnt is used as pure reference counter. Convert it to refcount_t and fix up the operations. Suggested-by: Kees Cook Reviewed-by: David Windsor Reviewed-by: Hans Liljestrand Signed-off-by: Elena Reshetova Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c | 13 ++++++------- drivers/net/ethernet/chelsio/cxgb4/clip_tbl.h | 4 +++- 2 files changed, 9 insertions(+), 8 deletions(-) commit 86f540c10c3ff9e88a062eddd331f9e83597f789 Merge: a8e8c0e c39c4d9 Author: David S. Miller Date: Sun Oct 22 02:16:26 2017 +0100 Merge branch 'hns3-loopback-selftest' Yunsheng Lin says: ==================== Add mac loopback selftest support in hns3 driver This patchset refactors the skb receiving and transmitting function before adding mac loopback selftest support in hns3 driver. ==================== Signed-off-by: David S. Miller commit c39c4d98dc658f5d44b96982333f3611d9cc2be7 Author: Yunsheng Lin Date: Fri Oct 20 10:19:22 2017 +0800 net: hns3: Add mac loopback selftest support in hns3 driver This patch adds mac loopback selftest support for ethtool cmd by checking if a transmitted packet can be received correctly when mac loopback is enabled. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 54 ++++ .../ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 273 +++++++++++++++++++++ 2 files changed, 327 insertions(+) commit d43e5aca8780e4084cad0969c71669cf99dc6030 Author: Yunsheng Lin Date: Fri Oct 20 10:19:21 2017 +0800 net: hns3: Refactor the skb receiving and transmitting function This patch refactors the skb receiving and transmitting functions and export them in order to support the ethtool's mac loopback selftest. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 17 ++++++++++++----- drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.h | 4 ++++ 2 files changed, 16 insertions(+), 5 deletions(-) commit a8e8c0ecb4bbeb28cab752e1b3c2ee96a595af26 Merge: f3ae608 821cfbb Author: David S. Miller Date: Sun Oct 22 02:11:33 2017 +0100 Merge branch 'bpftool-add-a-version-command-and-fix-several-items' Jakub Kicinski says: ==================== tools: bpftool: add a "version" command, and fix several items Quentin says: The first seven patches of this series bring several minor fixes to bpftool. Please see individual commit logs for details. Last patch adds a "version" commands to bpftool, which is in fact the version of the kernel from which it was compiled. ==================== Signed-off-by: David S. Miller commit 821cfbb0dcfbb24506dc6958361ca2b80b928049 Author: Quentin Monnet Date: Thu Oct 19 15:46:26 2017 -0700 tools: bpftool: add a command to display bpftool version This command can be used to print the version of the tool, which is in fact the version from Linux taken from usr/include/linux/version.h. Example usage: $ bpftool version bpftool v4.14.0 Signed-off-by: Quentin Monnet Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/Documentation/bpftool.rst | 2 ++ tools/bpf/bpftool/main.c | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) commit 8dfbc6d1d213df340e5dcfdcdc76ad9407a29273 Author: Quentin Monnet Date: Thu Oct 19 15:46:25 2017 -0700 tools: bpftool: show that `opcodes` or `file FILE` should be exclusive For the `bpftool prog dump { jited | xlated } ...` command, adding `opcodes` keyword (to request opcodes to be printed) will have no effect if `file FILE` (to write binary output to FILE) is provided. The manual page and the help message to be displayed in the terminal should reflect that, and indicate that these options should be mutually exclusive. Signed-off-by: Quentin Monnet Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/Documentation/bpftool-prog.rst | 8 ++++---- tools/bpf/bpftool/prog.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 9e2308c133a92ff98d1397149c8483858bcf8fc0 Author: Quentin Monnet Date: Thu Oct 19 15:46:24 2017 -0700 tools: bpftool: print all relevant byte opcodes for "load double word" The eBPF instruction permitting to load double words (8 bytes) into a register need 8-byte long "immediate" field, and thus occupy twice the space of other instructions. bpftool was aware of this and would increment the instruction counter only once on meeting such instruction, but it would only print the first four bytes of the immediate value to load. Make it able to dump the whole 16 byte-long double instruction instead (as would `llvm-objdump -d `). Signed-off-by: Quentin Monnet Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/prog.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit d9c0b48db9f4b870535b6d7255638347e770633f Author: Quentin Monnet Date: Thu Oct 19 15:46:23 2017 -0700 tools: bpftool: print only one error message on byte parsing failure Make error messages more consistent. Specifically, when bpftool fails at parsing map key bytes, make it print a single error message to stderr and return from the function, instead of (always) printing a second error message afterwards. Signed-off-by: Quentin Monnet Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f606179c84930ada1e347b6d84bb913c8492fec Author: Quentin Monnet Date: Thu Oct 19 15:46:22 2017 -0700 tools: bpftool: add `bpftool prog help` as real command i.r.t exit code Make error messages and return codes more consistent. Specifically, make `bpftool prog help` a real command, instead of printing usage by default for a non-recognized "help" command. Output is the same, but this makes bpftool return with a success value instead of an error. Signed-off-by: Quentin Monnet Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/prog.c | 1 + 1 file changed, 1 insertion(+) commit 1d84487e2a2b98892c3dec7934604e9b76577aa6 Author: Quentin Monnet Date: Thu Oct 19 15:46:21 2017 -0700 tools: bpftool: use err() instead of info() if there are too many insns Make error messages and return codes more consistent. Specifically, replace the use of info() macro with err() when too many eBPF instructions are received to be dumped, given that bpftool returns with a non-null exit value in that case. Signed-off-by: Quentin Monnet Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/prog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1739c26da72c4170c86c368c75133adbb740efef Author: Quentin Monnet Date: Thu Oct 19 15:46:20 2017 -0700 tools: bpftool: fix return value when all eBPF programs have been shown Change the program to have a more consistent return code. Specifically, do not make bpftool return an error code simply because it reaches the end of the list of the eBPF programs to show. Signed-off-by: Quentin Monnet Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/prog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9cbe1f581d17baff7e93936feb041c90b29eb6a8 Author: Quentin Monnet Date: Thu Oct 19 15:46:19 2017 -0700 tools: bpftool: add pointer to file argument to print_hex() Make print_hex() able to print to any file instead of standard output only, and rename it to fprint_hex(). The function can now be called with the info() macro, for example, without splitting the output between standard and error outputs. Signed-off-by: Quentin Monnet Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/main.c | 8 ++++---- tools/bpf/bpftool/main.h | 2 +- tools/bpf/bpftool/map.c | 20 ++++++++++---------- tools/bpf/bpftool/prog.c | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) commit f3ae608edb3be2e9a3f668d47aced3553eaf6c14 Author: Gustavo A. R. Silva Date: Thu Oct 19 16:28:24 2017 -0500 net: sched: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/sched/sch_cbq.c | 1 + net/sched/sch_drr.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 + 10 files changed, 10 insertions(+) commit a05b8c43ac3cc156600a60bf6dcd30109bd42a73 Author: Gustavo A. R. Silva Date: Thu Oct 19 13:03:51 2017 -0500 net: rose: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/rose/rose_in.c | 1 + net/rose/rose_route.c | 2 ++ 2 files changed, 3 insertions(+) commit 279badc2a85be83e0187b8c566e3b476b76a87a2 Author: Gustavo A. R. Silva Date: Thu Oct 19 12:55:03 2017 -0500 openvswitch: conntrack: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I placed a "fall through" comment on its own line, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 1 + 1 file changed, 1 insertion(+) commit e28101a37c3e6b74aeebe4a340636b1782deb830 Author: Gustavo A. R. Silva Date: Thu Oct 19 12:43:08 2017 -0500 net: netrom: nr_in: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/netrom/nr_in.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b38bd1b8f5c874c3d1f330e0dcf4e7d84137477 Author: Jerry (Fangzhi) Zuo Date: Fri Oct 20 16:45:53 2017 -0400 drm/amd/display:: Fix NULL pointer in Raven hotplug Programming sequence to frontend and backend has been switched. In such case, program_scaler() is getting called when programming frontend, and should be removed from backend programming routine. Reviewed-by: Harry Wentland Signed-off-by: Jerry (Fangzhi) Zuo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 7 ------- 1 file changed, 7 deletions(-) commit af09e48aa52377eb807709e2a1cdc33e9fd1ac94 Author: Leo (Sunpeng) Li Date: Fri Oct 20 13:59:53 2017 -0400 drm/amd/display: Fix memoryleak during S3 resume. Do not create dc_state within display_resume, since it's being constructed within atomic check. Reviewed-by: Harry Wentland Signed-off-by: Leo (Sunpeng) Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ---- 1 file changed, 4 deletions(-) commit fc9e9920b1d3a7a6af7eb993d531c36beb985570 Author: Shirish S Date: Wed Sep 27 15:15:38 2017 +0530 drm/amd/display: add hardware_planes_only to list of affected planes For SoC's having software designed cursor plane, should be treated differently than hardware cursor planes. The DRM core initializes cursor plane by default with legacy_cursor_update set. Hence legacy_cursor_update can be use effectively to handle software cursor planes' update and atomicity functionalities. This patch uses this variable to decide in the atomic_check to whether add a requested plane to the list of affected planes or not, hence fixing the issue of co-existence of MPO, i.e, setting of available hardware planes like underlay and updation of cursor planes as well. Without this patch when underlay is set from user space, only blank screen with backlight is visible. Signed-off-by: Shirish S Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 30 ++++++++++++++++++----- 1 file changed, 24 insertions(+), 6 deletions(-) commit 634086b464ac92d215aeaa3653759b0fbcde1a02 Author: Tom St Denis Date: Tue Oct 17 12:13:39 2017 -0400 drm/amd/display: Fix brace style Signed-off-by: Tom St Denis Acked-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 9a227d263d44572583be5dd9e9f215cceb4297a1 Author: Tom St Denis Date: Tue Oct 17 10:40:08 2017 -0400 drm/amd/display: Remove needless cast in amdgpu_dm_connector_init() The cast of dc_link is redundant. Signed-off-by: Tom St Denis Acked-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a8d8d3dc9ad8dc4ba6155bdd88f01e23bfc7dfbc Author: Tom St Denis Date: Tue Oct 17 10:38:27 2017 -0400 drm/amd/display: Fix brace style in amdgpu_dm_connector_ddc_get_modes() Signed-off-by: Tom St Denis Acked-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f922237daa7f2de4a8eae0ecdc99e944333fffc2 Author: Tom St Denis Date: Tue Oct 17 10:16:39 2017 -0400 drm/amd/display: Tidy up dm_drm_plane_reset() Move WARN_ON higher up and in doing so fix brace style. Signed-off-by: Tom St Denis Acked-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a68d90e7aed55e274cb117bbca34913d5fb8afd2 Author: Tom St Denis Date: Tue Oct 17 10:15:12 2017 -0400 drm/amd/display: Fix indentation in create_eml_sink() Signed-off-by: Tom St Denis Acked-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d2b2562c23e5e2a122a73627b0c658c5cfedb01a Author: Tom St Denis Date: Tue Oct 17 09:46:54 2017 -0400 drm/amd/display: Replace block with strncpy() in fill_audio_info() Replace inlined strncpy with library call. Signed-off-by: Tom St Denis Acked-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 8440c30463f3c6d312a5a65be634e6c6c1b6a5b3 Author: Tom St Denis Date: Tue Oct 17 09:09:42 2017 -0400 drm/amd/display: Fix brace style in amdgpu_dm_initialize_drm_device() Signed-off-by: Tom St Denis Acked-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 53cbf65c145450e35fbca50a33c56f5a066e3fe8 Author: Tom St Denis Date: Tue Oct 17 09:04:25 2017 -0400 drm/amd/display: Simplify handle_hpd_rx_irq() There is a local reference to the dc_link that wasn't being used so we shorten references throughout the function. Signed-off-by: Tom St Denis Acked-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d4a6e8a90ffa281918d9ba75a08f1f917c7eb183 Author: Tom St Denis Date: Tue Oct 17 09:00:33 2017 -0400 drm/amd/display: Fix brace style in dm_handle_hpd_rx_irq() Signed-off-by: Tom St Denis Acked-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 900b3cb1833883de9be62e48ff748663c7b6ef96 Author: Tom St Denis Date: Tue Oct 17 08:59:18 2017 -0400 drm/amd/display: Fix brace style in amdgpu_dm_update_connector_after_detect() Signed-off-by: Tom St Denis Acked-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1fb0c9ccb311cdf16f6ec617fb30c249888c5f97 Author: Tom St Denis Date: Tue Oct 17 08:49:13 2017 -0400 drm/amd/display: Fix indentation in dm_resume() Signed-off-by: Tom St Denis Acked-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 32f5062d1c7dc2a4d974bb10cf67a98043d9c901 Author: Tom St Denis Date: Tue Oct 17 08:48:44 2017 -0400 drm/amd/display: Fix indentation in dm_suspend() Signed-off-by: Tom St Denis Acked-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 33be2785477e470087ea1c5b203881d644cdb0f3 Author: Tom St Denis Date: Tue Oct 17 08:47:25 2017 -0400 drm/amd/display: Simplify dm_late_init() Signed-off-by: Tom St Denis Acked-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 299f27fd370f34cb6e22e2ffb84b61e91dd6a4c1 Author: Dave Airlie Date: Fri Sep 29 17:13:31 2017 +1000 amdgpu/dc: inline dml_round_to_multiple turns out to be a win to inline this. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.c | 19 ------------------- drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.h | 2 -- drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h | 19 +++++++++++++++++++ 3 files changed, 19 insertions(+), 21 deletions(-) commit b2484b6237ef3ed60af0400027c053ec973b60cc Author: Dave Airlie Date: Thu Sep 28 10:55:25 2017 +1000 amdgpu/dc: drop dml_util_is_420 This is unused code. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dml/dml_common_defs.c | 33 ---------------------- .../gpu/drm/amd/display/dc/dml/dml_common_defs.h | 1 - 2 files changed, 34 deletions(-) commit c6ca4496177d89e3f6eef7d7b6200798b19250ee Author: Harry Wentland Date: Mon Oct 16 22:58:18 2017 -0400 drm/amd/display: Add bunch of missing license headers in DML All files should have MIT headers. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dml/display_mode_vba.c | 25 ++++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 24 ++++++++++++++++++--- 2 files changed, 46 insertions(+), 3 deletions(-) commit 16b2f2ed5f2ece5bf44d94883412048856ca2966 Author: Harry Wentland Date: Thu Sep 28 10:45:26 2017 +1000 amdgpu/dc: inline a bunch of the dml wrappers. This reduces the code size. This is basically a redo of Dave's change with the same name on top of the latest DML. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dml/display_mode_vba.c | 2 + .../drm/amd/display/dc/dml/display_rq_dlg_calc.c | 2 + .../amd/display/dc/dml/dml1_display_rq_dlg_calc.c | 2 + .../gpu/drm/amd/display/dc/dml/dml_common_defs.c | 67 +------------- .../gpu/drm/amd/display/dc/dml/dml_common_defs.h | 14 --- .../gpu/drm/amd/display/dc/dml/dml_inline_defs.h | 102 +++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/soc_bounding_box.c | 1 + 7 files changed, 110 insertions(+), 80 deletions(-) commit 565f26a39d8e49745fda00d2303138aea831fd29 Author: Harry Wentland Date: Mon Oct 16 20:10:00 2017 -0400 drm/amd/display: Small comment on dc_commit_planes_to_stream Having one struct on the stack was somewhat confusing. Also mention that the whole function should eventually go. Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3eea71e36fcd04d0a3e735ee3cf4dbbe9934e3c8 Author: Dmytro Laktyushkin Date: Thu Oct 12 22:45:25 2017 -0400 drm/amd/display: Minor update to DML Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 ++- drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c | 6 ------ drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h | 1 - drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h | 7 ++----- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 9 +-------- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h | 1 - 6 files changed, 5 insertions(+), 22 deletions(-) commit f63d89066fb29a47ad3e9530214de7ea87e82e57 Author: Dmytro Laktyushkin Date: Fri Oct 13 12:53:38 2017 -0400 drm/amd/display: change dml numdpp var to uint Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 14 +++++++------- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) commit e92b44fdee3ec0b679bacdb9c7e95e55699167f0 Author: Tony Cheng Date: Thu Oct 5 14:38:46 2017 -0400 drm/amd/display: default force_single_disp_pipe_split = 1 on RV 1080p idle, stutter efficiency goes up from 95.8% to 97.8% result in 5mW saving from APU and 8mW saving from DDR4 Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1 + 1 file changed, 1 insertion(+) commit be11749177d74b2e2c8a4cf2526e88355c40ad00 Author: Harry Wentland Date: Fri Oct 13 15:12:04 2017 -0400 drm/amd/display: Remove redundant condition in dml vba Found by 0-day https://lists.freedesktop.org/archives/dri-devel/2017-October/154698.html Signed-off-by: Harry Wentland Reviewed-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e7da3268aedd21d559f0f27406874cf92ff582a Author: Tony Cheng Date: Thu Oct 12 22:18:12 2017 -0400 drm/amd/display: dal 3.1.07 - regression fixes in dal 3.1.06 - more linux upstream backport Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bb16bee4b394bafd6168c7719b7b07e19d1f0ce1 Author: Harry Wentland Date: Thu Oct 12 14:15:26 2017 -0400 drm/amd/display: Reduce stack size of commit_planes_to_stream This function likes to blow 1024 stack size when something is added to the addr struct. For now just dynamically allocate. Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 1bed4d09a4cc5a7d4449da86832d9bd816ae44ff Author: Harry Wentland Date: Tue Sep 12 17:10:25 2017 +0100 drm/amd/display: Fix one more place for dc_stream_state leak One more thing that happened due to uneven applying of patches. This mirrors what Darren Salt fixed. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75e68891200e3404fb3283e47ed74184932a748a Author: Harry Wentland Date: Thu Oct 12 12:27:48 2017 -0400 drm/amd/display: Move OS types to os_types.h Some of this stuff is not really dm_services Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dm_services.h | 45 ---------------------------- drivers/gpu/drm/amd/display/dc/os_types.h | 40 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 45 deletions(-) commit b9b171fffc9358be9e98cbc2bc7ef3fbe029f170 Author: Hersen Wu Date: Tue Oct 10 16:28:02 2017 -0400 drm/amd/display: LGD panel willl flash line under window Signed-off-by: Hersen Wu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6b29f4424e39d279fa1c7b465bc1b508ea6fc98e Author: Tony Cheng Date: Thu Oct 12 10:59:42 2017 -0400 drm/amd/display: DAL 3.1.06 Raven bug fixes - RS3 MPO stability improvement - SLS fixes - AM4 fixes DAL 3.1 - merge in upstream patches from DRM maintainer Dave Arilie - hubp, dpp HW objects Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dd93752b6483094ec879efbbdb854967355b91ac Author: Yue Hin Lau Date: Tue Oct 10 17:58:41 2017 -0400 drm/amd/display: rename dscl functions Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 10 +-- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 4 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 98 +++++++++++----------- 3 files changed, 56 insertions(+), 56 deletions(-) commit 62c933f9c6bf287b5b911a1eb838bc942eaa7202 Author: Yongqiang Sun Date: Tue Oct 10 14:01:33 2017 -0400 drm/amd/display: WA for 3 display play video hot plug. Three monitor connected and playing a video will occupy all 4 pipes, if hot plug forth display, commit streams will be failed due to no free pipe can be found. Work around: When forth monitor connected, mark video plane as a fake plane, remove it in dc, keep it in dm and report address to OS, until OS turn off MPO. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 +++++----- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++-- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 14 ++++++++------ drivers/gpu/drm/amd/display/dc/dc.h | 6 +++--- drivers/gpu/drm/amd/display/dc/inc/core_status.h | 15 ++++++++------- 5 files changed, 26 insertions(+), 23 deletions(-) commit 4e527c01aa7a31b7aad98fa5493944891b69238d Author: Andrew Jiang Date: Wed Oct 11 15:12:58 2017 -0400 drm/amd/display: Add DIGD case when getting retimer settings One of the HDMI ports map to DIGD, which we did not map to DP3 ext HDMI settings. Add the DIGD case so that we can get proper retimer settings from SBIOS for that port. Signed-off-by: Andrew Jiang Reviewed-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 3e5e22154acfd89810d37aa4b3fac14014eb7ca8 Author: Andrew Jiang Date: Wed Oct 11 14:59:51 2017 -0400 drm/amd/display: Add chip mask to HDMI retimer/redriver check There were cases where the chip caps held additional bits that led to the retimer/redriver check failing; use the proper mask to ensure that we have only the bits that we care about for the check in question. Signed-off-by: Andrew Jiang Reviewed-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 58bb0e63dd99c4bdb84e79a95311bb6899789681 Author: Andrew Jiang Date: Tue Oct 10 14:36:39 2017 -0400 drm/amd/display: Correct timings in build scaling params A previous patch set the addressable timing as active + border, when in fact, the VESA standard specifies active as equal to addressable + border. This patch makes the fix more correct and in line with the standard. Signed-off-by: Andrew Jiang Reviewed-by: Andrew Jiang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit 9a5bcd47ea0eb40c8a9e00f6797453c90fbd74d1 Author: Eric Bernstein Date: Wed Oct 11 15:14:46 2017 -0400 drm/amd/display: check SR_WATERMARK regs prior to write Signed-off-by: Eric Bernstein Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 144 +++++++++++---------- 1 file changed, 74 insertions(+), 70 deletions(-) commit 2126732fdaaa4101b186a76b4df52f575b5df4e5 Author: Dave Airlie Date: Thu Sep 28 10:10:22 2017 +1000 drm/amd/display: drop display_pipe_clocks.c. This code isn't used at all in the kernel tree, perhaps it can wait to be imported when it is. It also does a lot of floating point calcs, so probably good to drop it until it's needed and we can ensure proper fpu accessors. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/Makefile | 2 +- .../gpu/drm/amd/display/dc/dml/display_mode_lib.h | 1 - .../drm/amd/display/dc/dml/display_pipe_clocks.c | 106 --------------------- .../drm/amd/display/dc/dml/display_pipe_clocks.h | 37 ------- 4 files changed, 1 insertion(+), 145 deletions(-) commit c12a7ba543d16c1770fb44670e5eb42ae524c502 Author: Harry Wentland Date: Tue Sep 12 20:04:48 2017 -0400 drm/amd/display: Fix up some whitespace in handle_cursor_update Use combo of tabs and spaces Signed-off-by: Harry Wentland Acked-by: Alex Deucher Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4beb50ff5e96014787d8588a78d07e49df0d114a Author: Harry Wentland Date: Wed Oct 4 13:54:35 2017 -0400 drm/amd/display: Fix warning about uninitialized variable Signed-off-by: Harry Wentland Reviewed-by: Bhawanpreet Lakha Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b0f8d4e963de8cd77c237a8ea37799f6f5ce995a Author: Andrew Jiang Date: Fri Oct 6 18:02:23 2017 -0400 drm/amd/display: Don't set cursor address is 0 logging as errors This actually happens quite a bit, and having it as an error causes false positive messages when running tests. Signed-off-by: Andrew Jiang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2979d7e973464c00154fa4fe029de128de3e51db Author: kbuild test robot Date: Fri Oct 13 07:17:48 2017 +0800 drm/amd/display: fix ifnullfree.cocci warnings drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/gpio_service.c:134:3-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/gpio_service.c:175:4-9: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci by Julia Lawall. Generated by: scripts/coccinelle/free/ifnullfree.cocci Fixes: f09cd1f46388 ("drm/amd/display: Use kernel alloc/free") Signed-off-by: Fengguang Wu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1a7e4f7407e8869759be7e715bce18698aadbe98 Author: kbuild test robot Date: Fri Oct 13 07:35:54 2017 +0800 drm/amd/dc: fix semicolon.cocci warnings drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/gpio_service.c:134:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 80be23c57868 ("drm/amd/dc: Add dc display driver (v2)") CC: Harry Wentland Signed-off-by: Fengguang Wu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 085b017bf81ad5c76118b3e1a9165c743927556b Author: Harry Wentland Date: Tue Oct 10 11:23:50 2017 -0400 drm/amd/display: Fix warning about overflow v2: convert value to bool using !! Signed-off-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 94c6d735e9ca13018da40f633fd602af6e272cc6 Author: Harry Wentland Date: Fri Oct 13 12:42:01 2017 -0400 drm/amd/display: Fix non-DCN build Acquire_first_split_pipe only makes sense for DCN. Signed-off-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 ++ 1 file changed, 2 insertions(+) commit 5771ec8fe8cb99c0db3115e81b4f69b1543c6982 Author: Leo (Sunpeng) Li Date: Fri Oct 6 15:11:41 2017 -0400 drm/amd/display: ASSERT on dc_create_state failing. dc_create_state() returns NULL on allocation failure. Raise warning when that happens. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + 1 file changed, 1 insertion(+) commit 9a5d9c48d883db4f7f3e5409062bef7d25165a95 Author: Leo (Sunpeng) Li Date: Fri Oct 6 11:57:40 2017 -0400 drm/amd/display: Report stream as different on scaling change When scaling is enabled, our preference is to scale up to the prefered (native) mode. This means that hardware timings will be the same across a modeset. Therefore, also report mode as changed if source or destination rectangle is different. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++-- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 22 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ 3 files changed, 27 insertions(+), 2 deletions(-) commit 199e458aafc241a2792b3f8a99d5a11aa7726a7d Author: Dmytro Laktyushkin Date: Thu Oct 5 19:15:25 2017 -0400 drm/amd/display: Set addressable region as active + border This ensures that we do not draw the blank region onscreen, and that we do underscan instead. Signed-off-by: Andrew Jiang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 215a6f05bcc18ffcd953a8527639ea1f571f4d81 Author: Dmytro Laktyushkin Date: Fri Oct 6 15:40:07 2017 -0400 drm/amd/display: add performance trace macro to dc Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 6 ++ drivers/gpu/drm/amd/display/dc/basics/logger.c | 78 ++++++---------------- drivers/gpu/drm/amd/display/dc/basics/logger.h | 37 ---------- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 5 +- drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 5 -- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 40 +++++------ .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dm_services.h | 2 + .../gpu/drm/amd/display/include/logger_interface.h | 28 ++++++++ drivers/gpu/drm/amd/display/include/logger_types.h | 36 +++++++++- 11 files changed, 118 insertions(+), 121 deletions(-) commit 9bbc30310f240c9400e31c7ab7b7edd2b76b3589 Author: Jerry Zuo Date: Fri Oct 6 15:08:07 2017 -0400 drm/amd/display: Remove a false-positive error message To avoid confusion, need to suppress the error message when get -ERESTARTSYS error code. It is normal when getting interrupted by signals in the process of a wait for the buffer to become unreserved. Only propagate to user-mode for further action, no need to pop up error message. Signed-off-by: Jerry Zuo Reviewed-by: Sun peng Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3df8fcafb7edab79d76c4c76c93446b91eb4916f Author: Leo (Sunpeng) Li Date: Wed Oct 4 12:47:13 2017 -0400 drm/amd/display: Do not set bandwidth on page flips. Which removes a lockdep warning for a possible deadlock situation: While holding the drm event mutex (hard irq safe), dc_post_update_surfaces_to_stream eventually acquires the atom context lock, which is hard irq unsafe. We should only be calling it on full updates anyways. Also remove a redundant call to dc_post_update_surfaces_to_stream, dc_commit_updates_for_stream already calls it. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d94585a06b8197a723787c6c5502872abcff0e8e Author: Yue Hin Lau Date: Thu Oct 5 16:47:49 2017 -0400 drm/amd/display: rename transform to dpp for dcn Signed-off-by: Yue Hin Lau Reviewed-by: Eric Bernstein Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 1 + drivers/gpu/drm/amd/display/dc/core/dc.c | 1 + drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 16 +- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 16 +- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 144 ++++++------ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 94 ++++---- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 261 +++++++++++---------- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 104 ++++---- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 59 ++--- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 22 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 3 + drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 134 +++++++++++ 13 files changed, 509 insertions(+), 347 deletions(-) commit 39a4e6608f28586dee77daf8dc3af53e7829d2a8 Author: Yue Hin Lau Date: Thu Oct 5 17:57:35 2017 -0400 drm/amd/display: add null check for cursor functions Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit e6f4f9cfde0f586c276190f541ecfc80d9b688bc Author: Eric Yang Date: Thu Oct 5 16:00:29 2017 -0400 drm/amd/display: fix null dereference in reset hw ctx Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 886daac91d4c794fa76a0e5cf1101bdb329f3fe3 Author: Jerry Zuo Date: Thu Oct 5 15:37:46 2017 -0400 drm/amd/display: Fix a logic defect in cursor move Regression caused by: Ib98354194d7 Need to check crtc->stream before updating cursor attributes and position. Signed-off-by: Jerry Zuo Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 3411eac1a144ac5ad5a7ab994645724130bb2996 Author: Vitaly Prosyak Date: Thu Oct 5 10:45:50 2017 -0500 drm/amd/display: [RV] bug in cm programming When surface bigger then 10 bpc the output pixel does not match to the required value.Update CRC's. Signed-off-by: Vitaly Prosyak Reviewed-by: Jordan Lazare Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 6 +++++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) commit be5a55dc3de9bc5764b3eb4ba6f743783584aa58 Author: Bhawanpreet Lakha Date: Thu Oct 5 13:32:29 2017 -0400 drm/amd/display: change when to set tap_hardcode_coeff Set hardcode_coeff only when BOTH chroma and luma taps are more than 1 without this underscan with h or v set to 0 darkens the screen (either h or v set to 0, not both) Signed-off-by: Bhawanpreet Lakha Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8534575fed085a78a847f88fbc929d9c4a8c3255 Author: Eric Bernstein Date: Thu Oct 5 14:27:27 2017 -0400 drm/amd/display: Expose some MPC functions for reuse Signed-off-by: Eric Bernstein Reviewed-by: Eric Bernstein Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 11 +++--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.h | 45 ++++++++++++++++------ .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 6 ++- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 7 ++-- 4 files changed, 48 insertions(+), 21 deletions(-) commit 80e80ec817f161560b4159608fb41bd289abede3 Author: Bhawanpreet Lakha Date: Tue Oct 3 13:53:51 2017 -0400 drm/amd/display: Fix underscan not using proper scaling fix underscan not being set correctly Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 2938bbb646107d4e39bf850a5bc09385abd012e8 Author: SivapiriyanKumarasamy Date: Wed Oct 4 14:24:53 2017 -0400 drm/amd/display: Pull transfer func defines into DC Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 86be9a0495c6b4ca8ec37b652152df947c155848 Author: Yue Hin Lau Date: Thu Oct 5 12:30:14 2017 -0400 drm/amd/display: renaming filename for hubp Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 960 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h | 683 +++++++++++++++ .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 960 --------------------- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 683 --------------- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 +- 7 files changed, 1646 insertions(+), 1646 deletions(-) commit 179584ef6d9d763f9f17d2fe627c2d801e9a0973 Author: Tony Cheng Date: Thu Oct 5 14:15:44 2017 -0400 drm/amd/display: dal 3.1.05 Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abb4986eea1670922a0b89ef62688b4b649bd3c6 Author: Andrew Jiang Date: Wed Oct 4 15:55:45 2017 -0400 drm/amd/display: Fix up plane_states add/remove logic Our plane_states array trimming logic was faulty, we should be starting to shuffle from the plane that was just released, not from the very beginning of the array. Also get rid of a leftover line that was setting the plane state at the stream index to null, leading to issues. Also move the dc_plane_state_retain call to where we reference plane_state, in case we do hit the error case where we can't get a free pipe. Signed-off-by: Andrew Jiang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit e66a575508b5a11df7a670265c91981e4d735749 Author: Andrew Jiang Date: Wed Oct 4 14:10:16 2017 -0400 drm/amd/display: Add missing newlines in pstate wait debug messages These were spamming the debugger logs. Signed-off-by: Andrew Jiang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 81739b7f49bfded3bbd0b29c5213e9bcbea3c58d Author: Eric Bernstein Date: Mon Oct 2 15:03:50 2017 -0400 drm/amd/display: Add DPP capabilities Signed-off-by: Eric Bernstein Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 5 +++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 23 +++-------- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 42 +++++++------------- drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 46 ++++++++++++++++++++++ 4 files changed, 72 insertions(+), 44 deletions(-) commit 8feabd03d34e4555c119e69269dae28f52e0d86c Author: Yue Hin Lau Date: Mon Oct 2 14:39:42 2017 -0400 drm/amd/display: rename struct mem_input to hubp for dcn Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 1 + drivers/gpu/drm/amd/display/dc/core/dc.c | 1 + drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 +- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 22 +-- drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 3 - .../amd/display/dc/dce110/dce110_hw_sequencer.c | 19 +-- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 88 ++++++------ .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 157 ++++++++++----------- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 49 +++---- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 26 ++-- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 4 +- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 105 ++++++++++++++ drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 3 - 13 files changed, 286 insertions(+), 195 deletions(-) commit 0c63c115f254c1024d0679de859283ae48d2cf1b Author: Eric Bernstein Date: Wed Oct 4 16:56:27 2017 -0400 drm/amd/display: group DCN watermark registers Signed-off-by: Eric Bernstein Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 4e9ba34f7bd54bcf4bf97ecfdd18fa60c152978c Author: Tony Cheng Date: Tue Oct 3 18:19:01 2017 -0400 drm/amd/display: dal 3.1.04 Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 410d0b39e2247778db5ead9d40330837fecb7a43 Author: Harry Wentland Date: Mon Oct 2 15:27:26 2017 -0400 drm/amd/display: Ignore wrong tautological warning Some of our HW calcs functions compares a var against itself to check for NaN. Gcc isn't fond of it and wrongfully warns about a tautological comparison. Disable this check for dcn_calcs_math.c. Signed-off-by: Harry Wentland Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8459f633b65a81979b9b233ed0a91a9fdc98b7bd Author: Eric Yang Date: Tue Oct 3 18:15:51 2017 -0400 drm/amd/display: Handle case when stream not found in set_dpms When validate with context fail to add stream to the context, we have a case where set_dpms won't be able to find the stream that need to be disabled. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c196cbe065da1c9b5f7683af9cdd0889760151c1 Author: Hersen Wu Date: Tue Oct 3 16:47:02 2017 -0400 drm/amd/display: add dpms state to DC follow up Signed-off-by: Hersen Wu Reviewed-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 067c878a220cbe6198b3cfdc7f372adab4762ad8 Author: Yongqiang Sun Date: Tue Oct 3 15:03:49 2017 -0400 drm/amd/display: Fixed switching mode half screen gamma incorrect. Half screen gamma setting and cursor are incorrect when switching mode through win+p due to wrong programming gamma sequence (In case of bottom pipe, gamma and cursor are programmed before front end programmed, pipe is power gated). change: 1. Cache curor attributes to stream 2. Move set gamma and cursor inside front end programming. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 15 --------------- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 9 ++++++++- drivers/gpu/drm/amd/display/dc/dc.h | 4 +++- .../gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 10 ++++++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 17 +++++++++++++++++ 5 files changed, 38 insertions(+), 17 deletions(-) commit d050f8ed14494ea23c6e10b5893010946ef0f78b Author: Hersen Wu Date: Fri Sep 29 16:36:34 2017 -0400 drm/amd/display: add dpms state to DC - avoid eDP screen flash 4 times when resume from s3 - improve s3 and boot time Signed-off-by: Hersen Wu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 39 +++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 +++ drivers/gpu/drm/amd/display/dc/dc.h | 5 +++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 13 ++++---- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 11 +++--- 5 files changed, 58 insertions(+), 14 deletions(-) commit 8e7095b909dd5451c92dc04420891a578e2f3152 Author: Dmytro Laktyushkin Date: Tue Oct 3 12:54:18 2017 -0400 drm/amd/display: add max_video_width cap to dc Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 6 ++---- drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.h | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 6 ++++-- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) commit bac4c5592774fef2503c3204e8f947ce595bfcdf Author: Dmytro Laktyushkin Date: Tue Oct 3 11:11:28 2017 -0400 drm/amd/display: block video planes >4k on dcn10 Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit ff79cbdccea94935ff9d2111458e439e28c86e74 Author: Bhawanpreet Lakha Date: Mon Oct 2 13:40:02 2017 -0400 drm/amd/display: increase pstate wait timeout For linux it takes longer than 40us so increasing it to 200us. Also added debug prints regarding the change Signed-off-by: Bhawanpreet Lakha Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit 73fb63e74fb26c12bc847fd28596cc4e088e870b Author: Charlene Liu Date: Mon Oct 2 18:01:36 2017 -0400 drm/amd/display: reject 3D mode based on static debug flag. Signed-off-by: Charlene Liu Reviewed-by: Krunoslav Kovac Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) commit 458e9d03875ec6cb2ee37b64cf201bc80401bf92 Author: Bhawanpreet Lakha Date: Mon Oct 2 12:00:24 2017 -0400 drm/amd/display: fix re-enabling stutter for raven We were overwriting the whole register which was re-enabling stutter for raven. Now we are reading the register then setting the values only for pstate. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 4 ++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) commit f6cb588a42a7812e65eff368d3d1134ee1a88489 Author: Charlene Liu Date: Mon Oct 2 16:25:58 2017 -0400 drm/amd/display: Add debug flag for VSR support Signed-off-by: Charlene Liu Reviewed-by: Krunoslav Kovac Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 1 + 3 files changed, 3 insertions(+) commit 309c42efdab945071c693a51334fbaeb0a700b0d Author: Yongqiang Sun Date: Mon Oct 2 17:08:24 2017 -0400 drm/amd/display: wa to program split pipedegamma regs after mode set. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 13ab1b44151195823fa0e2ceace1cf4687266dba Author: Yongqiang Sun Date: Thu Sep 28 17:18:27 2017 -0400 drm/amd/display: Fixed extend to second screen mode hang 1. Fixed acquire free split pipe bug. 2. Change return value for dc_add_stream_to_ctx from bool to enum. 4. Remove redundant apply_ctx_for_surface calling 5. Unlock pipe after back end programming. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 48 ++++++++++++----------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 9 ++--- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 4 files changed, 32 insertions(+), 31 deletions(-) commit 3af89b96b2f22119556b8e89edde72951f6bd410 Author: Charlene Liu Date: Sat Sep 30 21:03:40 2017 -0400 drm/amd/display: Add stereo_support debug flag Signed-off-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + 1 file changed, 1 insertion(+) commit 734a092b1fe407319c8a4f38f9b4a647ddb54c2c Author: Eric Bernstein Date: Fri Sep 29 15:30:17 2017 -0400 drm/amd/display: clean up dcn10 dpp after HW review Signed-off-by: Eric Bernstein Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 20 +++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 85 +++++++++++----------- 3 files changed, 65 insertions(+), 42 deletions(-) commit 365c7c975dcd1a2158ed33dab76c1d308f9f9906 Author: Jerry Zuo Date: Thu Sep 28 16:58:32 2017 -0400 drm/amd/display: Remove drm_modeset_lock in MST code Locks are no longer needed since the drm framework takes care of correct locking. Signed-off-by: Harry Wentland Signed-off-by: Jerry Zuo Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 4bd29c34988be0c24759d5d58df424f861a8bf24 Author: Jerry Zuo Date: Thu Sep 28 16:20:30 2017 -0400 drm/amd/display: Do not access fbdev helper members Original code is no longer needed and tested without loop. Signed-off-by: Harry Wentland Signed-off-by: Jerry Zuo Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit c018b04b7c17e0814bc75b09d782204d73c64b1b Author: Roman Li Date: Thu Sep 28 12:57:21 2017 -0400 drm/amd/display: Fix irq enable/disable on resume. Fixing loop boundaries in irq enable/disable on resume. Signed-off-by: Roman Li Reviewed-by: Mikita Lipski Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4b3b5ccd9835bafab67851a7cc759c9250a8a9d Author: Yue Hin Lau Date: Thu Sep 28 16:09:56 2017 -0400 drm/amd/display: Making hubp1_program_surface_config public Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 3 ++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) commit 66bfd4fd17737d0a644fa74e0cb309c0daf8fb22 Author: Charlene Liu Date: Thu Sep 28 15:38:01 2017 -0400 drm/amd/display: arbitration find the matching dig-az first. [Description] this change is in branch already. without this change, after resume, az_inst might swapped. Signed-off-by: Charlene Liu Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit b7901be0ed5d43525ac2c3fc2a3f9a0cdc5d069c Author: Yue Hin Lau Date: Thu Sep 28 14:54:58 2017 -0400 drm/amd/display: renaming mem input to hubp Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 76 +++++++++++----------- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 24 +++---- 2 files changed, 50 insertions(+), 50 deletions(-) commit 4176664b1fc8aa052f886037590cac4fb0dd8afb Author: Charlene Liu Date: Wed Sep 27 23:23:16 2017 -0400 drm/amd/display: audio dynamic resource acquired related Signed-off-by: Charlene Liu Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++-- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 24 ++++++++++++++++------ drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../amd/display/dc/dce110/dce110_hw_sequencer.c | 12 +++++++++-- .../amd/display/dc/dce110/dce110_hw_sequencer.h | 2 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 7 ++++++- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 3 ++- drivers/gpu/drm/amd/display/dc/inc/resource.h | 5 +++++ 10 files changed, 47 insertions(+), 15 deletions(-) commit 50d4cfdc118122f58ffdb09607a57c621e24d777 Author: Yongqiang Sun Date: Thu Sep 28 10:40:10 2017 -0400 drm/amd/display: Program front end first when set mode. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 27 ++++++++++++++-------- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 5 ++-- 2 files changed, 20 insertions(+), 12 deletions(-) commit 3eab79163fcb0f7777440dfe360d2eedbbcc47b9 Author: Shirish S Date: Tue Sep 26 15:35:42 2017 +0530 drm/amd/display: make FBC configurable option Currently FBC is guarded with ENABLE_FBC macro, which needs to be manually enabled in Makefile. This patch moves it to Kconfig so that there wont be any need to additional patch to be carried for enabling or disabling on every SoC. Signed-off-by: Shirish S Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/Kconfig | 10 ++++++++++ drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 4 ++-- drivers/gpu/drm/amd/display/dc/dc_types.h | 2 +- .../gpu/drm/amd/display/dc/dce110/dce110_compressor.c | 2 +- .../gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 16 ++++++++-------- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 4 ++-- 7 files changed, 25 insertions(+), 15 deletions(-) commit 96687275555a166951d77d845a924ee07b854822 Author: Roman Li Date: Wed Sep 27 17:57:37 2017 -0400 drm/amd/display: Fix hotplug after s3 resume. On S3 resume the HPD6 irq source was not reenabled due to loop boundary bug. Signed-off-by: Roman Li Reviewed-by: Mikita Lipski Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6a2b691f0985d16c16b70dbc4b5727afabde6ba9 Author: Tony Cheng Date: Tue Sep 26 22:16:11 2017 -0400 drm/amd/display: wrong VM setting cause invalid DF request from DCN fix typo in register field. we are lucky the shift/mask is the same, no behavior change add globals to experiment with using different VM settings Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 11 +++++++---- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 2 ++ 2 files changed, 9 insertions(+), 4 deletions(-) commit 0fc899b0f1d522efc171c09cb36ce1d27cd75de2 Author: Yongqiang Sun Date: Wed Sep 27 17:28:11 2017 -0400 drm/amd/display: Enable double buffer as per vertical interrupt enabled. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 11 +++++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.h | 4 ++++ 2 files changed, 15 insertions(+) commit 09f2317be4e86a60b481ce14da84c0752f848235 Author: Dmytro Laktyushkin Date: Wed Sep 20 18:32:51 2017 -0400 drm/amd/display: change dml vba cursor count define to correct one Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 2 +- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit c81a351ab9c054e28544f31f715ad50cfe54089d Author: Dmytro Laktyushkin Date: Wed Sep 20 17:50:02 2017 -0400 drm/amd/display: extract global sync params from vba Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dml/display_mode_vba.c | 32 +++++++++++++++------- .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 3 ++ 2 files changed, 25 insertions(+), 10 deletions(-) commit cb94f78e3665ef23aabfe547962748d49471cf45 Author: Dmytro Laktyushkin Date: Fri Sep 15 16:03:09 2017 -0400 drm/amd/display: add mode support check to dml vba code Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dml/display_mode_enums.h | 10 +- .../drm/amd/display/dc/dml/display_mode_structs.h | 5 + .../gpu/drm/amd/display/dc/dml/display_mode_vba.c | 5701 +++++++++++++++----- .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 456 +- .../gpu/drm/amd/display/dc/dml/dml_common_defs.c | 12 + .../gpu/drm/amd/display/dc/dml/dml_common_defs.h | 3 + 6 files changed, 4604 insertions(+), 1583 deletions(-) commit 6d04ee9dc10149db842d41de66eca201c9d91b60 Author: Dmytro Laktyushkin Date: Wed Aug 23 16:43:17 2017 -0400 drm/amd/display: Restructuring and cleaning up DML Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/calcs/dcn_calc_math.c | 16 + drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 103 +- drivers/gpu/drm/amd/display/dc/dc.h | 1 - .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 5 +- drivers/gpu/drm/amd/display/dc/dml/Makefile | 8 +- drivers/gpu/drm/amd/display/dc/dml/dc_features.h | 2 + .../drm/amd/display/dc/dml/display_mode_enums.h | 52 +- .../gpu/drm/amd/display/dc/dml/display_mode_lib.c | 7 +- .../gpu/drm/amd/display/dc/dml/display_mode_lib.h | 8 +- .../drm/amd/display/dc/dml/display_mode_structs.h | 898 +++--- .../drm/amd/display/dc/dml/display_mode_support.c | 2326 -------------- .../drm/amd/display/dc/dml/display_mode_support.h | 199 -- .../gpu/drm/amd/display/dc/dml/display_mode_vba.c | 3263 ++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 410 +++ .../drm/amd/display/dc/dml/display_pipe_clocks.c | 377 +-- .../drm/amd/display/dc/dml/display_pipe_clocks.h | 8 +- .../drm/amd/display/dc/dml/display_rq_dlg_calc.c | 2457 ++++++--------- .../drm/amd/display/dc/dml/display_rq_dlg_calc.h | 151 +- .../amd/display/dc/dml/display_rq_dlg_helpers.c | 482 +-- .../amd/display/dc/dml/display_rq_dlg_helpers.h | 41 +- .../gpu/drm/amd/display/dc/dml/display_watermark.c | 1281 -------- .../gpu/drm/amd/display/dc/dml/display_watermark.h | 98 - .../amd/display/dc/dml/dml1_display_rq_dlg_calc.c | 1903 ++++++++++++ .../amd/display/dc/dml/dml1_display_rq_dlg_calc.h | 67 + .../gpu/drm/amd/display/dc/dml/dml_common_defs.c | 12 +- .../gpu/drm/amd/display/dc/dml/dml_common_defs.h | 8 +- .../gpu/drm/amd/display/dc/dml/soc_bounding_box.c | 48 +- .../gpu/drm/amd/display/dc/dml/soc_bounding_box.h | 9 +- 28 files changed, 7658 insertions(+), 6582 deletions(-) commit 19b7fe4a48efbe0f7e8c496b040c4eb16ff02313 Author: Harry Wentland Date: Mon Oct 16 22:15:57 2017 -0400 Revert "amdgpu/dc: inline a bunch of float operations." This reverts commit d1209512e028a917e6e70b13297ff185234ba24d. Unfortunately these clash with our DML update from the HW guys. Rerolling this after the fact won't save us anything anymore, unfortunately so we're back to non-inline for this. Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/calcs/dcn_calc_math.c | 29 +++++++++++++++++ .../gpu/drm/amd/display/dc/calcs/dcn_calc_math.h | 36 ++++------------------ 2 files changed, 35 insertions(+), 30 deletions(-) commit 378c4a2d609dfc048c4416a387ddec06994cc307 Author: Harry Wentland Date: Mon Oct 16 22:11:18 2017 -0400 Revert "amdgpu/dc: drop display_pipe_clocks.c." This reverts commit b3fbdcec5e6c16c93867289ae0960a64c423eb34. Unfortunately these clash with our DML update from the HW guys as it's starting to get used now. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/Makefile | 2 +- .../gpu/drm/amd/display/dc/dml/display_mode_lib.h | 1 + .../drm/amd/display/dc/dml/display_pipe_clocks.c | 367 +++++++++++++++++++++ .../drm/amd/display/dc/dml/display_pipe_clocks.h | 41 +++ 4 files changed, 410 insertions(+), 1 deletion(-) commit 711b55f3fca418de8c6484a1aa38bcc241acc536 Author: Harry Wentland Date: Mon Oct 16 22:11:04 2017 -0400 Revert "amdgpu/dc: inline a bunch of the dml wrappers." This reverts commit 3e8c3108dab197858e74dbb740c5312ae636ea9b. Unfortunately these clash with our DML update from the HW guys. Will attempt to reroll them after. Signed-off-by: Alex Deucher .../drm/amd/display/dc/dml/display_mode_support.c | 1 - .../drm/amd/display/dc/dml/display_rq_dlg_calc.c | 2 - .../gpu/drm/amd/display/dc/dml/display_watermark.c | 1 - .../gpu/drm/amd/display/dc/dml/dml_common_defs.c | 56 +++++++++++++++++++- .../gpu/drm/amd/display/dc/dml/dml_common_defs.h | 11 ++++ .../gpu/drm/amd/display/dc/dml/dml_inline_defs.h | 61 ---------------------- .../gpu/drm/amd/display/dc/dml/soc_bounding_box.c | 1 - 7 files changed, 66 insertions(+), 67 deletions(-) commit e168df36a807dff8e5cc78c1daeb9dec89e4118c Author: Harry Wentland Date: Mon Oct 16 22:10:54 2017 -0400 Revert "amdgpu/dc: drop dml_util_is_420" This reverts commit e5bcf3d83e40cc7acc9d111519b7bacaf4a01070. Unfortunately these clash with our DML update from the HW guys. Will attempt to reroll them after. Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dml/dml_common_defs.c | 33 ++++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/dml_common_defs.h | 1 + 2 files changed, 34 insertions(+) commit 78109d230b797077d58600694ca427b9830eb600 Author: Harry Wentland Date: Mon Oct 16 22:10:31 2017 -0400 Revert "amdgpu/dc: drop dml display_mode_support.c (v2)" This reverts commit 5e0adbff084f33202db36be798c583a115990392. Unfortunately these clash with our DML update from the HW guys. Will attempt to reroll them after. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/Makefile | 4 +- .../drm/amd/display/dc/dml/display_mode_support.c | 2327 ++++++++++++++++++++ .../drm/amd/display/dc/dml/display_mode_support.h | 5 + 3 files changed, 2335 insertions(+), 1 deletion(-) commit 07e9266593e64f6897996c37dcfb28cb21a612c6 Author: Harry Wentland Date: Mon Oct 16 22:10:19 2017 -0400 Revert "amdgpu/dc: inline dml_round_to_multiple" This reverts commit d8c893b44b2199f5935fe8667708253c38353782. Unfortunately these clash with our DML update from the HW guys. Will attempt to reroll them after. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.c | 19 +++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.h | 2 ++ drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h | 19 ------------------- 3 files changed, 21 insertions(+), 19 deletions(-) commit c73b046f86d0ceac52bfa0a035796c8c017a2de5 Author: Yue Hin Lau Date: Wed Sep 27 15:34:35 2017 -0400 drm/amd/display: Expose some mem_input functions for reuse Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 1 - .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 26 +++++----- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 60 ++++++++++++++++++++++ 3 files changed, 73 insertions(+), 14 deletions(-) commit ed23cba20d011e1867dea69a45bda88a088585b6 Author: Charlene Liu Date: Wed Sep 27 16:08:47 2017 -0400 drm/amd/display: soc_bound_box -update DML based on HW. Signed-off-by: Charlene Liu Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/soc_bounding_box.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 441ad741739e9092f6af231a539781118e23d6df Author: Eric Yang Date: Wed Sep 27 11:44:43 2017 -0400 drm/amd/display: Add override for reporting wm ranges For verification of watermark select with SMU team, proper implementation will follow Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 47 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 6 +++ .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 ++ .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1 + 4 files changed, 57 insertions(+) commit dcf298c3137ace22b92c584781e6092e4eb273fb Author: Wenjing Liu Date: Mon Sep 25 14:53:14 2017 -0400 drm/amd/display: disconnect on HPD low even if edid is the same [Description] There are many occasions we need to retrieve sink capability and notify connectivity change to os even if edid is not changed on a HPD toggle. (HDMI2.0 display needs re-enable link on every hpd, display changes other capability outside from edid need to be queried again and possibly reset the mode, etc.) In these cases we cannot keep the same sink without letting DM know. Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 42 ++++++--------------------- 1 file changed, 9 insertions(+), 33 deletions(-) commit 6512387a54357c5d3fbea8995d8879ea817a5ec6 Author: Tony Cheng Date: Wed Sep 27 09:20:51 2017 -0400 drm/amd/display: align DCLK to voltage level in past program SMU will use all voltage headroom. RV does not if DAL need higher voltage for DCFCLK or DISPCLK, also increase FCLK to improve stutter as voltage is already Signed-off-by: Tony Cheng Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 4 ++++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1 + 3 files changed, 6 insertions(+) commit 8740196935625dfb171ab115120315060e4a8a41 Author: Andrew Jiang Date: Mon Sep 25 18:03:14 2017 -0400 drm/amd/display: Move power control from link encoder to hwsequencer A recent commit moved the backlight control code along with the register defines, but did not move the power control code. This along with remnant fields in the dce110_link_enc_registers struct made it so that the code still compiled, but any attempts to access the LVTMA_PWRSEQ_STATE register led to reading from an address of 0. This patch corrects that. Also, rename blacklight_control to edp_backlight_control (Typo fix). Signed-off-by: Andrew Jiang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 17 +- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 8 +- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 18 ++- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 171 +-------------------- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 8 - .../amd/display/dc/dce110/dce110_hw_sequencer.c | 155 +++++++++++++++++-- .../amd/display/dc/dce110/dce110_hw_sequencer.h | 6 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 +- .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 2 - drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 7 +- drivers/gpu/drm/amd/display/dc/inc/link_hwss.h | 4 + .../amd/display/dc/virtual/virtual_link_encoder.c | 5 - 12 files changed, 190 insertions(+), 214 deletions(-) commit b87d78d6aa104b207ff588d2cfd13633c2385994 Author: Yue Hin Lau Date: Tue Sep 19 17:29:28 2017 -0400 drm/amd/display: moving cursor functions from ipp to mem_input Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 32 +++- drivers/gpu/drm/amd/display/dc/dce/dce_ipp.c | 2 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 51 ++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 15 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 189 --------------------- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 163 ++++++++++++++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 57 ++++++- drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 10 ++ drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 11 ++ 9 files changed, 329 insertions(+), 201 deletions(-) commit 60d671db1c0c02f31bcff3ea5dee244d26b8ed77 Author: Jerry Zuo Date: Mon Sep 25 16:39:45 2017 -0400 drm/amd/display: Fix ref_count messed up issue In the full update type, need to add ref_count to the newly created dc_state->stream. It made mistake to add ref_count to dc->current_state->stream which keeps adding up without release. Signed-off-by: Jerry Zuo Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) commit 2e1cc334631849b035b24897d6be59d2a57b6f1c Author: Tony Cheng Date: Tue Sep 26 17:06:26 2017 -0400 drm/amd/display: dal 3.1.03 Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f945eab797b042930553388d37c12fed38f3396 Author: Tony Cheng Date: Tue Sep 26 10:16:34 2017 -0400 drm/amd/display: fix bug in force_single_disp_pipe_split should only lower dpp clock. Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 966869d07aae2d1becfcb16b55cafd4aae3c6627 Author: Tony Cheng Date: Tue Sep 26 01:56:00 2017 -0400 drm/amd/display: option to maximize lb usage experimental change for testing if max line buffer result in better stutter efficiency for 1080p, LB can hold up to 9 line at 10bpcc, potentially add 10 line time of latency hiding. Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 8 ++++++-- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) commit a32a7708ae8b01c191768d503c1af33b85b369d0 Author: Tony Cheng Date: Mon Sep 25 18:06:11 2017 -0400 drm/amd/display: add option to disable DCC for DCC 128b request 1. reverts commit e67f51012740 ("dc: temp disable DCC on high res.") - default still DCC enabled 2. add debug options to decide how DCC is disabled - disable DCC - disable DCC if DCC requires 128b (aka. half) request -- observed compressed data corruption result in screen corruption in full (256b) request while half (128b) would cause DCN to hang, result in DF hang Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 11 ++++++++--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 18 ++++++++---------- 2 files changed, 16 insertions(+), 13 deletions(-) commit db64fbe73288f0b5f2a36ecdd48c9bae978406e0 Author: Tony Cheng Date: Mon Sep 25 10:52:07 2017 -0400 drm/amd/display: enable optional pipe split for single display also refactor debug option. now pipe_split_policy are dynamic = no hack around dcn_calcs. will split based on HW recommendation avoid = avoid split if we can support the config with higher voltage avoid_multi_display = allow split with single display output. force_single_disp_pipe_split force single display to pipe split to improve stutter efficiency by using DET buffers using 2 HUBP. Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 44 ++++++++++++++++++++-- drivers/gpu/drm/amd/display/dc/dc.h | 9 ++++- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 8 +--- 3 files changed, 51 insertions(+), 10 deletions(-) commit e778915c916229475ba76267534b70834ba8de8d Author: Charlene Liu Date: Mon Sep 25 15:52:49 2017 -0400 drm/amd/display: temp disable DCC on high res. Signed-off-by: Charlene Liu Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 544276514760f293eadb68461f1b45b6ccec073e Author: Jerry Zuo Date: Wed Sep 20 15:04:52 2017 -0400 drm/amd/display: Fix MST daisy chain SST not light up In SST daisy chain scenario, edid is getting read in mst hotplug routine. It is getting conflict with drm send_enum_path_resources kernel thread in terms of i2c bus which is getting locked up in such case. Have edid being read in get_mode hook, instead of in hotplug routine. Signed-off-by: Jerry Zuo Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 110 +++++++++------------ 1 file changed, 49 insertions(+), 61 deletions(-) commit 56e6ed4561f2962d1220c16bbd2709ced7a84be8 Author: Yongqiang Sun Date: Fri Sep 22 16:06:04 2017 -0400 drm/amd/display: Only reset top pipe back end. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 +++ 1 file changed, 3 insertions(+) commit 671a6246e0d3652c024f99d5641c7cf427b0b5a5 Author: Yongqiang Sun Date: Fri Sep 22 13:41:13 2017 -0400 drm/amd/display: Early return when turn off a plane. In case of two monitor connected and turn off one of the monitors, OTG0 is locked after graphic plane off due to redundant programming front end regs. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 69b516c91cbf459e5fd4b8b6e97cfdfa7ea25126 Author: SivapiriyanKumarasamy Date: Fri Sep 22 12:48:54 2017 -0400 drm/amd/display: Program stream's csc matrix instead of using default Signed-off-by: SivapiriyanKumarasamy Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit e4ba6335cd91367f31978db1fc62d6bac0489672 Author: Wenjing Liu Date: Thu Sep 21 18:53:40 2017 -0400 drm/amd/display: update link type to mst before topology discovery [Description] link type is not updated before mst topology discovery. This causes issue when branch device response to link address after before the start topology discovery event finishes. [Solution] update link type to mst before topology discovery Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fcbbe3da0ab65dc114937857fce81902e3fa2a97 Author: Eric Yang Date: Thu Sep 21 18:16:01 2017 -0400 drm/amd/display: Use active + border for bw validation When doing SLS, KMD gives us clipped v_addressable with border. This results in bw validation failure. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit d596e5d08da0a25be789432ed821e63db9ef72ac Author: Yongqiang Sun Date: Thu Sep 21 10:46:33 2017 -0400 drm/amd/display: Fixed incorrect return value for validaton Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4f4ee68686c74bf1dfde6fa9fb7124104ff6f283 Author: Hersen Wu Date: Wed Sep 20 16:30:44 2017 -0400 drm/amd/display: screen flickers when connected to ext monitor in clone Signed-off-by: Hersen Wu Signed-off-by: Tony Cheng Reviewed-by: Hersen Wu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 8 ++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 3 +++ 3 files changed, 12 insertions(+) commit 4d1a562659e1414ccb010bea56286ba4302e84e5 Author: Tony Cheng Date: Tue Sep 5 21:13:55 2017 -0400 drm/amd/display: version 3.1.02 Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e750d56d2c62875c81f52344afab44220300388d Author: Yongqiang Sun Date: Wed Sep 20 17:06:18 2017 -0400 drm/amd/display: Fixed validation return wrong result. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 6d732e7917064195b65303cab9591f311b621034 Author: Charlene Liu Date: Wed Sep 20 16:15:18 2017 -0400 drm/amd/display: add hubp/dpp pg debug key Signed-off-by: Charlene Liu Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ 1 file changed, 2 insertions(+) commit 19af33aca4384f840838a781f105726bb24c604f Author: Charlene Liu Date: Wed Sep 20 14:06:24 2017 -0400 drm/amd/display: make sure BL off to mainlink off has enough time Signed-off-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 7 ------- 1 file changed, 7 deletions(-) commit 5df921d4c0e3e2065b961ac8d4269be68f80801d Author: Ken Chalmers Date: Wed Sep 20 11:48:47 2017 -0400 drm/amd/display: fix ASSERT() caused by missing registers. Signed-off-by: Ken Chalmers Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 42 ++++++++++++---------- 1 file changed, 23 insertions(+), 19 deletions(-) commit dbaed8037c6c606456c182f5fc327f9d405a7ffe Author: Yue Hin Lau Date: Tue Sep 19 11:35:23 2017 -0400 drm/amd/display: edp backlight regression fix Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h | 5 +++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 + 2 files changed, 6 insertions(+) commit 5eefbc40173644b5f74d7e074ba6cd8de5563e05 Author: Yue Hin Lau Date: Fri Sep 15 17:42:20 2017 -0400 drm/amd/display: moving backlight registers to hwsequencer Signed-off-by: Yue Hin Lau Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 11 ++- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 47 +++++++--- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 79 +--------------- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 27 ++---- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 103 ++++++++++++++++++++- .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 4 +- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 4 + .../amd/display/dc/virtual/virtual_link_encoder.c | 8 +- 9 files changed, 158 insertions(+), 127 deletions(-) commit 62bf6e9b292212b9a821bd3c24adff57ff4b4bd7 Author: Eric Bernstein Date: Thu Sep 14 18:01:40 2017 -0400 drm/amd/display: update blending mode and set output denorm Signed-off-by: Eric Bernstein Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 27 +++++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 4 ++++ 2 files changed, 30 insertions(+), 1 deletion(-) commit 904aa42e77aa7fb5f95408b4d1ffb4b2c3a805d7 Author: Eric Yang Date: Thu Sep 14 19:03:04 2017 -0400 drm/amd/display: add back removed hack for mpcc add A previous changed removed the hack to match mpcc_idd with mi instance. This causes pstate hang on resume from hibernate for yet unknown reason. Add the hack back for now to work around the issue. More debugging required in init_hw to root cause the hang. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 25bab0da8f61e7d8f717e4f9be34e97a1aaa0ccc Author: Wenjing Liu Date: Thu Sep 14 18:50:32 2017 -0400 drm/amd/display: set cp25201 to use TPS4 [Description] hbr2 compliance eye output is unstable (toggling on and off) with debugger break. This caueses intermittent PHY automation failure. Need to look into the root cause later Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit d53d7866a795410f7b6a16b1ef0b37825edc794e Author: Yue Hin Lau Date: Thu Sep 14 11:27:34 2017 -0400 drm/amd/display: removing remaining register definitions work around Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 16 ++++++++-------- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 21 ++++++++++++++------- .../amd/display/dc/dcn10/dcn10_timing_generator.h | 11 +---------- 3 files changed, 23 insertions(+), 25 deletions(-) commit 68d77dd8214e5186d535ec7af29722aaad621824 Author: Andrew Jiang Date: Wed Sep 13 11:36:34 2017 -0400 drm/amd/display: power_down_Hw need signal type to turnoff backlight Signed-off-by: Charlene Liu Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4b7e7e2b1bb2c7308ee3ccbef3f67cb9ce52e954 Author: ShihChen Chen Date: Tue Sep 12 11:10:12 2017 +0800 drm/amd/display: make tile changing run at ISR Signed-off-by: ShihChen Chen Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit bc6828e0e6b6c5bcafbb093f9fe475f63dbe47e5 Author: Bhawanpreet Lakha Date: Tue Sep 12 13:56:57 2017 -0400 drm/amd/display: Refactor dc_update_planes_and_stream. Split update_planes_and_stream_state (split Software and Hardware programming) as the state is already build, so we only need to program the hardware Signed-off-by: Andrey Grodzovsky Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 21 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 256 +++++----------------- drivers/gpu/drm/amd/display/dc/dc.h | 36 +-- 3 files changed, 87 insertions(+), 226 deletions(-) commit fc17235fe65b0179969e0793a086cba93afcc078 Author: Jerry Zuo Date: Fri Sep 8 16:40:34 2017 -0400 drm/amd/display: Fix NULL pointer on MST chained mode Prevent NULL pointer on new_stream being added to ctx when added MST connectors cannot be found in existing crtc_state in the chained mode Signed-off-by: Jerry Zuo Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f4ac176e62fdc74e52ee58461fb7c8912322fc1c Author: Jerry Zuo Date: Fri Sep 8 11:52:45 2017 -0400 drm/amd/display: Exclude MST from fake sink Needs effort to take care of the fake sink scenario in downstream daisy chain device. Exclude MST from fake sink feature for now. Signed-off-by: Jerry Zuo Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit eade83503a5381ab0292f9653786bec6a638c523 Author: Yue Hin Lau Date: Tue Sep 12 12:08:14 2017 -0400 drm/amd/display: fixing register includes Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 89 +++++++++++----------- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 2 + 2 files changed, 46 insertions(+), 45 deletions(-) commit 4f346e655d24140fb40b46f814506ba17ac34ea1 Author: Leo (Sunpeng) Li Date: Thu Sep 7 17:05:38 2017 -0400 drm/amd/display: Match actual state during S3 resume. During system suspend, we: 1. Cache a duplicate of the current DRM atomic state, which calls hooks to duplicate our internal states. 2. Call hooks to disable all functionalities. 3. System suspended. During resume, we attempt to restore the cached state. However, our interal states are now stale, since step 1 was done before step 2. i.e. our cached state does not reflect the disabled nature of things. This change resolves that by destroying all relevant states to reflect the actual state during resume. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 7f4a7253b112c9ed21022e25c7a740d824c56619 Author: Eric Bernstein Date: Mon Sep 11 16:56:51 2017 -0400 drm/amd/display: update mpc add/remove functions Signed-off-by: Eric Bernstein Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 17 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 173 ++++++++++++++------- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 10 +- 3 files changed, 130 insertions(+), 70 deletions(-) commit 98b49c2f9c66cf42b6d762498e2d9f327e439416 Author: Roman Li Date: Mon Sep 11 16:28:21 2017 -0400 drm/amd/display: fix multi-display on CZ - fixed wrong index in dce110_validate_surface_sets() - formatted for better readability Signed-off-by: Roman Li Reviewed-by: Harry Wentland igned-off-by: Alex Deucher .../drm/amd/display/dc/dce110/dce110_resource.c | 29 ++++++++++++++++------ 1 file changed, 21 insertions(+), 8 deletions(-) commit 024f0607cfed19a9f6082e4b94267544de4fc584 Author: Yue Hin Lau Date: Mon Sep 11 14:30:02 2017 -0400 drm/amd/display: Refactor dcn10_dpp_cm_helper to dcn10_cm_common Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c | 123 +++++++++++++++++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.h | 99 +++++++++++++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 2 +- .../drm/amd/display/dc/dcn10/dcn10_dpp_cm_helper.c | 123 --------------------- .../drm/amd/display/dc/dcn10/dcn10_dpp_cm_helper.h | 99 ----------------- 6 files changed, 224 insertions(+), 224 deletions(-) commit 8580d60baed5c8c9f08a5c3b239e563c8966a9dc Author: Harry Wentland Date: Thu Aug 17 14:58:07 2017 -0400 drm/amd/display: Don't report fake sink as connected This was missed in the previous fake sink change. The fake sink allows us to enable a pipe with a disconnected display. We shouldn't report it as connected. Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7d58e72149fa73504fa13e7044d68e79a39996fb Author: Martin Tsai Date: Fri Sep 8 19:25:35 2017 +0800 drm/amd/display: To prevent detecting new sink from spurious HPD Signed-off-by: Martin Tsai Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 33 ++++++++++++++++----------- drivers/gpu/drm/amd/display/dc/dc_types.h | 1 + 2 files changed, 21 insertions(+), 13 deletions(-) commit e008b0bcc63793d3e42fd88f412a90f329a05865 Author: Roman Li Date: Thu Sep 7 17:02:47 2017 -0400 drm/amd/display: Add FBC on/off to front-end programming - Fixing text mode for cases when VT-switch doesn't result in timing change Signed-off-by: Roman Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1049e39fa62f443aae64a2fb6057b96abf20e8de Author: Eric Yang Date: Thu Sep 7 14:53:23 2017 -0400 drm/amd/display: fix usb-c dongle regression A previous change moved link_disconnect_sink after dpcd read, this causes the sink count to be overwritten which in turn causes another detection to be triggered in the short pulse handler, which brings down the display. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 -- 1 file changed, 2 deletions(-) commit 5088cc98f59b922a609078c048a25e30f94b9216 Author: Andrew Jiang Date: Wed Sep 6 18:56:46 2017 -0400 drm/amd/display: Force always scale chroma, set always_scaled to false This allows us to not always have scaling on, which causes issues with validation and causes the text to blur slightly. Signed-off-by: Andrew Jiang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 9 +++++---- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 4 ---- 2 files changed, 5 insertions(+), 8 deletions(-) commit 6bf520280f3621d458e2ef3bd3c48acb89a39af7 Author: Hersen Wu Date: Tue Sep 5 12:20:39 2017 -0400 drm/amd/display: Driver message to SMU to indicate display off Signed-off-by: Hersen Wu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 3 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 38 ++++++++++++++-------- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 2 +- 4 files changed, 28 insertions(+), 17 deletions(-) commit be84dfa70dde6bb072c9cc9bba0a741841f0baa2 Author: Hans Verkuil Date: Fri Oct 20 12:07:32 2017 +0200 ARM: dts: rockchip: enable the hdmi output on the rk3288-firefly-reload The vdd10_lcd and vcc18_lcd regulators need to be enabled for HDMI output to work, so add 'regulator-always-on', just as is done in rk3288-firefly.dtsi. Also enable i2c5, the hdmi block and configure the correc cec pin. Signed-off-by: Hans Verkuil Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-firefly-reload-core.dtsi | 2 ++ arch/arm/boot/dts/rk3288-firefly-reload.dts | 11 +++++++++++ 2 files changed, 13 insertions(+) commit f98677cf315e61403aefef72b056c643dd152c54 Author: Lukas Wunner Date: Tue Oct 17 12:42:00 2017 +0200 iio: dac: ti-dac082s085: Read chip spec from device table The two properties unique to each supported chip, resolution and number of channels, are currently gleaned from the chip's name. E.g. dac102s085 is a dual channel 10-bit DAC. ^^^ This was deemed unmaintainable by the subsystem maintainer once the driver is extended to support further chips, hence it was requested to add an explicit table for chip-specific information and use an enum to reference into it. This adds 17 LoC without any immediate gain, so make the change in a separate commit which can be reverted if we determine in 10 years that it was unnecessary. Signed-off-by: Lukas Wunner Signed-off-by: Jonathan Cameron drivers/iio/dac/ti-dac082s085.c | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) commit 61011264c1afd8c075fb9028ccc78e7f2e63ce48 Author: Lukas Wunner Date: Tue Oct 17 12:42:00 2017 +0200 iio: dac: Add Texas Instruments 8/10/12-bit 2/4-channel DAC driver The DACrrcS085 (rr = 08/10/12, c = 2/4) family of SPI DACs was inherited by TI when they acquired National Semiconductor in 2011. This driver was developed for and tested with the DAC082S085 built into the Revolution Pi by KUNBUS, but should work with any of the other chips as they share the same programming interface. There is also a family of I2C DACs with just a single channel called DACrr1C08x (rr = 08/10/12, x = 1/5). Their programming interface is very similar and it should be possible to extend the driver for these chips with moderate effort. Alternatively they could be integrated into ad5446.c. (The AD5301/AD5311/AD5321 use different power-down modes but otherwise appear to be comparable.) Furthermore there is a family of 8-channel DACs called DACrr8S085 (rr = 08/10/12) as well as two 16-bit DACs called DAC161Sxxx (xxx = 055/997). These are more complicated devices with support for daisy-chaining and the ability to power down each channel separately. They could either be handled by a separate driver or integrated into the present driver with a larger effort. Cc: Mathias Duckeck Signed-off-by: Lukas Wunner Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio | 1 + drivers/iio/dac/Kconfig | 10 + drivers/iio/dac/Makefile | 1 + drivers/iio/dac/ti-dac082s085.c | 351 ++++++++++++++++++++++++++++++++ 4 files changed, 363 insertions(+) commit 838980dd04e994bf81cf104fa01ae60802146b39 Author: Hans Verkuil Date: Fri Oct 20 12:07:33 2017 +0200 ARM: dts: rockchip: define the two possible rk3288 CEC pins The CEC line can be routed to two possible pins. Define those pins. Signed-off-by: Hans Verkuil Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 930cc2d27847a4235bb3dc1e3817504dcf230dcb Author: Lukas Wunner Date: Tue Oct 17 12:42:00 2017 +0200 dt-bindings: iio: dac: ti-dac082s085: Document new driver Add device tree bindings for Texas Instruments 8/10/12-bit 2/4-channel DAC driver. Cc: Mathias Duckeck Acked-by: Rob Herring Signed-off-by: Lukas Wunner Signed-off-by: Jonathan Cameron .../devicetree/bindings/iio/dac/ti-dac082s085.txt | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit afddf6316380148bb483b5d49f5b8ec5551b38c6 Author: Hans Verkuil Date: Fri Oct 20 12:07:31 2017 +0200 ARM: dts: rockchip: add the cec clk for dw-hdmi on rk3288 The dw-hdmi block needs the cec clk for the rk3288. Add it. Signed-off-by: Hans Verkuil Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d87a4aa376983a205b3920dc7a9b15d74110be9 Author: Corentin Labbe Date: Fri Oct 20 07:37:29 2017 +0200 iio: adc: sun4i-gpadc: use of_device_get_match_data The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Signed-off-by: Corentin Labbe Signed-off-by: Jonathan Cameron drivers/iio/adc/sun4i-gpadc-iio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 724330a9d61aa61ee20f4895302124490a452629 Author: Brian Masney Date: Thu Oct 19 16:06:31 2017 -0400 staging: iio: tsl2x7x: put function definitions on a single line The functions tsl2x7x_invoke_change() and tsl2x7x_prox_calculate() are short enough that the return value and static declaration can be moved onto the same line with the function name. This patch makes that change to increase code readability. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 3d8e44002906de59836ac39244ea172b1be6165e Author: Brian Masney Date: Thu Oct 19 16:06:30 2017 -0400 staging: iio: tsl2x7x: fix alignment of break statements Correct the alignment of the break statements to match the alignment of the rest of the code within the case statements. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 271bd2c67677314db3985fcc8bc1fd83356e1d81 Author: Brian Masney Date: Thu Oct 19 16:06:29 2017 -0400 staging: iio: tsl2x7x: rename power defines to improve code readability The LED power defines are named like TSL2X7X_mAXXX. Rename these values to TSL2X7X_XXX_mA to improve code readability. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 18ce2d5097b699b2f2a79b7fdcd01cc5ed2b0843 Author: Brian Masney Date: Thu Oct 19 16:06:28 2017 -0400 staging: iio: tsl2x7x: correct alignment of parenthesis Correct error from checkpatch.pl to improve code readibility: Alignment should match open parenthesis. An unnecessary cast to 'struct tsl2x7x_lux *' was removed and the return value of static definition of in_illuminance0_calibscale_available_show() was put on its own line due to the length of that sysfs attribute. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 3e0c8f68a89e2356fa014336830fe4aaf580303b Author: Brian Masney Date: Thu Oct 19 16:06:27 2017 -0400 staging: iio: tsl2x7x: correct alignment of parenthesis Correct error from checkpatch.pl to improve code readibility: Alignment should match open parenthesis. This involved shortening the name of tsl2x7x_als_gainadj and tsl2x7x_prx_gainadj to tsl2x7x_als_gain and tsl2x7x_prx_gain respectively. This also required removing the ch0lux and ch1lux local variables in order to get the line short enough. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit e6859c532286b0c2ce1bd048a4b07e2a8f2ea38c Author: Brian Masney Date: Thu Oct 19 16:06:26 2017 -0400 staging: iio: tsl2x7x: remove unnecessary parentheses This patch fixes the error 'Unnecessary parentheses around 'XXX' from checkpatch.pl. It also fixes several other places with unnecessary parentheses that checkpatch.pl did not detect. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 972845c3cb063ad8183b651cd97e32c4ecb7e831 Author: Brian Masney Date: Thu Oct 19 16:06:25 2017 -0400 staging: iio: tsl2x7x: convert in_proximity0_calibscale_available to use IIO_CONST_ATTR The sysfs attribute in_proximity0_calibscale_available is currently created by using DEVICE_ATTR_RO(). Convert this over to use IIO_CONST_ATTR(). Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 8c1c135f74282c35b6bebd2db6710c7a8e17aab5 Author: Brian Masney Date: Thu Oct 19 16:06:24 2017 -0400 staging: iio: tsl2x7x: changed #defines to be aligned on the same column Some of the existing #defines have tabs between the name, and the value, while others have spaces. The alignment of the values mostly has a consistent layout, but there are some that don't. Change all of the defines so that the name and value is separated by tabs and all of the values start on the same column to increase code readability. This patch also removes the unnecessary parentheses around the value of TSL2X7X_MAX_TIMER_CNT. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 132 ++++++++++++++++++------------------ 1 file changed, 66 insertions(+), 66 deletions(-) commit 49e22c8ad39156aac0348d68c856e5d07d1fb6c9 Author: Brian Masney Date: Thu Oct 19 16:06:23 2017 -0400 staging: iio: tsl2x7x: remove unnecessary struct iio_dev definition tsl2x7x.h has a blank definition for 'struct iio_dev' that is not needed. This patch removes that definition. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.h | 2 -- 1 file changed, 2 deletions(-) commit f4b1c5bf05f90cc86bdc1219106126cb40f5c74f Author: Brian Masney Date: Thu Oct 19 16:06:22 2017 -0400 staging: iio: tsl2x7x: sort #includes Sort the #include statements for increased code readability. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4924c7d3871bdf2cfdaa4bf448fa778d525bc222 Author: Brian Masney Date: Thu Oct 19 16:06:21 2017 -0400 staging: iio: tsl2x7x: remove unused tsl2x7x_parse_result structure The structure tsl2x7x_parse_result is not used so this patch removes its definition. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 5 ----- 1 file changed, 5 deletions(-) commit deaecbef366497c3435b573fed7991d89af9f59c Author: Brian Masney Date: Thu Oct 19 16:06:20 2017 -0400 staging: iio: tsl2x7x: migrate *_thresh_period sysfs attributes to iio_event_spec The sysfs attributes in_intensity0_thresh_period and in_proximity0_thresh_period are currently directly created by the driver. This patch migrates the creation of these sysfs attributes from the driver to using the IIO core via iio_event_spec. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 196 ++++++++++-------------------------- 1 file changed, 52 insertions(+), 144 deletions(-) commit 59dba8facb4ba20ffa6b6a1c76c41f3c662e075a Author: Colin Ian King Date: Thu Oct 19 15:46:22 2017 +0200 iio: adc: adc12138: make array ch_to_mux static, makes object code smaller Don't populate const array ch_to_mux on the stack, instead make it static. Makes the object code smaller by over 200 bytes: Before: text data bss dec hex filename 12663 1648 128 14439 3867 drivers/iio/adc/ti-adc12138.o After text data bss dec hex filename 12353 1744 128 14225 3791 drivers/iio/adc/ti-adc12138.o (gcc version 7.2.0 x86_64) Signed-off-by: Colin Ian King Signed-off-by: Jonathan Cameron drivers/iio/adc/ti-adc12138.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f66f18e99a253f5cf8c1cf7f2910b7ddcee92970 Author: Fabrice Gasnier Date: Wed Oct 18 13:40:12 2017 +0200 iio: adc: stm32: add check on clock rate Add check on STM32 ADC clock rate to report an explicit error. This may avoid division by 0 later in stm32-adc driver. Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc-core.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 3a069904282d621fc65ec37713f41f69ba63645f Author: Fabrice Gasnier Date: Wed Oct 18 13:39:27 2017 +0200 iio: adc: stm32: add tim15 trigger Add TIM15_TRGO trigger that is now supported on STM32H7. Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron drivers/iio/adc/stm32-adc.c | 1 + 1 file changed, 1 insertion(+) commit b5149873a0c299195b5346fe4dc2c5b04ae2f995 Author: Tal Shorer Date: Sat Oct 21 19:29:24 2017 +0300 workqueue: respect isolated cpus when queueing an unbound work Initialize wq_unbound_cpumask to exclude cpus that were isolated by the cmdline's isolcpus parameter. Signed-off-by: Tal Shorer Signed-off-by: Tejun Heo kernel/workqueue.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a579ba49a9e27bfc1d5cb69b0ea3781d8df46b5b Author: Bjorn Helgaas Date: Fri Oct 20 08:57:16 2017 -0500 PCI/portdrv: Compute MSI/MSI-X IRQ vectors after final allocation When setting up portdrv MSI/MSI-X interrupts, we previously allocated the maximum possible number of vectors, read the Interrupt Message Numbers for each service, saved the IRQ for each, freed the vectors, and finally used the largest Message Number to reallocate only as many vectors as we need. The problem is that freeing the vectors invalidates their IRQs, so the saved IRQ numbers may now be invalid, which can result in errors like this: pcie_pme: probe of 0000:00:00.0:pcie001 failed with error -22 pciehp 0000:00:00.0:pcie004: Cannot get irq 20 for the hotplug controller aer: probe of 0000:00:00.0:pcie002 failed with error -22 dpc 0000:00:00.0:pcie010: request IRQ22 failed: -22 Change the setup so we save the Interrupt Message Numbers (not the IRQs) before we free the original setup, then use the Message Numbers to compute the IRQs (via pci_irq_vector()) *after* we reallocate the vectors. This should always be safe for MSI-X because the Message Numbers are fixed. For MSI, the hardware is allowed to change Message Numbers when we update the MSI Multiple Message Enable field when reallocating the vectors, but since we allocate enough vectors to accommodate the largest Message Number we found, that's unlikely. See PCIe r3.1, sec 7.8.2, 7.10.10, 7.31.2. Fixes: 3674cc49da9a ("PCI/portdrv: Use pci_irq_alloc_vectors()") Based-on-patch-by: Dongdong Liu Tested-by: Dongdong Liu # HiSilicon hip08 Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig drivers/pci/pcie/portdrv_core.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 87943db7dfb0c5ee5aa74a9ac06346fadd9695c8 Author: Reinette Chatre Date: Fri Oct 20 02:16:59 2017 -0700 x86/intel_rdt: Fix potential deadlock during resctrl mount Sai reported a warning during some MBA tests: [ 236.755559] ====================================================== [ 236.762443] WARNING: possible circular locking dependency detected [ 236.769328] 4.14.0-rc4-yocto-standard #8 Not tainted [ 236.774857] ------------------------------------------------------ [ 236.781738] mount/10091 is trying to acquire lock: [ 236.787071] (cpu_hotplug_lock.rw_sem){++++}, at: [] static_key_enable+0x12/0x30 [ 236.797058] but task is already holding lock: [ 236.803552] (&type->s_umount_key#37/1){+.+.}, at: [] sget_userns+0x32f/0x520 [ 236.813247] which lock already depends on the new lock. [ 236.822353] the existing dependency chain (in reverse order) is: [ 236.830686] -> #4 (&type->s_umount_key#37/1){+.+.}: [ 236.837756] __lock_acquire+0x1100/0x11a0 [ 236.842799] lock_acquire+0xdf/0x1d0 [ 236.847363] down_write_nested+0x46/0x80 [ 236.852310] sget_userns+0x32f/0x520 [ 236.856873] kernfs_mount_ns+0x7e/0x1f0 [ 236.861728] rdt_mount+0x30c/0x440 [ 236.866096] mount_fs+0x38/0x150 [ 236.870262] vfs_kern_mount+0x67/0x150 [ 236.875015] do_mount+0x1df/0xd50 [ 236.879286] SyS_mount+0x95/0xe0 [ 236.883464] entry_SYSCALL_64_fastpath+0x18/0xad [ 236.889183] -> #3 (rdtgroup_mutex){+.+.}: [ 236.895292] __lock_acquire+0x1100/0x11a0 [ 236.900337] lock_acquire+0xdf/0x1d0 [ 236.904899] __mutex_lock+0x80/0x8f0 [ 236.909459] mutex_lock_nested+0x1b/0x20 [ 236.914407] intel_rdt_online_cpu+0x3b/0x4a0 [ 236.919745] cpuhp_invoke_callback+0xce/0xb80 [ 236.925177] cpuhp_thread_fun+0x1c5/0x230 [ 236.930222] smpboot_thread_fn+0x11a/0x1e0 [ 236.935362] kthread+0x152/0x190 [ 236.939536] ret_from_fork+0x27/0x40 [ 236.944097] -> #2 (cpuhp_state-up){+.+.}: [ 236.950199] __lock_acquire+0x1100/0x11a0 [ 236.955241] lock_acquire+0xdf/0x1d0 [ 236.959800] cpuhp_issue_call+0x12e/0x1c0 [ 236.964845] __cpuhp_setup_state_cpuslocked+0x13b/0x2f0 [ 236.971242] __cpuhp_setup_state+0xa7/0x120 [ 236.976483] page_writeback_init+0x43/0x67 [ 236.981623] pagecache_init+0x38/0x3b [ 236.986281] start_kernel+0x3c6/0x41a [ 236.990931] x86_64_start_reservations+0x2a/0x2c [ 236.996650] x86_64_start_kernel+0x72/0x75 [ 237.001793] verify_cpu+0x0/0xfb [ 237.005966] -> #1 (cpuhp_state_mutex){+.+.}: [ 237.012364] __lock_acquire+0x1100/0x11a0 [ 237.017408] lock_acquire+0xdf/0x1d0 [ 237.021969] __mutex_lock+0x80/0x8f0 [ 237.026527] mutex_lock_nested+0x1b/0x20 [ 237.031475] __cpuhp_setup_state_cpuslocked+0x54/0x2f0 [ 237.037777] __cpuhp_setup_state+0xa7/0x120 [ 237.043013] page_alloc_init+0x28/0x30 [ 237.047769] start_kernel+0x148/0x41a [ 237.052425] x86_64_start_reservations+0x2a/0x2c [ 237.058145] x86_64_start_kernel+0x72/0x75 [ 237.063284] verify_cpu+0x0/0xfb [ 237.067456] -> #0 (cpu_hotplug_lock.rw_sem){++++}: [ 237.074436] check_prev_add+0x401/0x800 [ 237.079286] __lock_acquire+0x1100/0x11a0 [ 237.084330] lock_acquire+0xdf/0x1d0 [ 237.088890] cpus_read_lock+0x42/0x90 [ 237.093548] static_key_enable+0x12/0x30 [ 237.098496] rdt_mount+0x406/0x440 [ 237.102862] mount_fs+0x38/0x150 [ 237.107035] vfs_kern_mount+0x67/0x150 [ 237.111787] do_mount+0x1df/0xd50 [ 237.116058] SyS_mount+0x95/0xe0 [ 237.120233] entry_SYSCALL_64_fastpath+0x18/0xad [ 237.125952] other info that might help us debug this: [ 237.134867] Chain exists of: cpu_hotplug_lock.rw_sem --> rdtgroup_mutex --> &type->s_umount_key#37/1 [ 237.148425] Possible unsafe locking scenario: [ 237.155015] CPU0 CPU1 [ 237.160057] ---- ---- [ 237.165100] lock(&type->s_umount_key#37/1); [ 237.169952] lock(rdtgroup_mutex); [ 237.176641] lock(&type->s_umount_key#37/1); [ 237.184287] lock(cpu_hotplug_lock.rw_sem); [ 237.189041] *** DEADLOCK *** When the resctrl filesystem is mounted the locks must be acquired in the same order as was done when the cpus came online: cpu_hotplug_lock before rdtgroup_mutex. This also requires to switch the static_branch_enable() calls to the _cpulocked variant because now cpu hotplug lock is held already. [ tglx: Switched to cpus_read_[un]lock ] Reported-by: Sai Praneeth Prakhya Signed-off-by: Reinette Chatre Tested-by: Sai Praneeth Prakhya Acked-by: Vikas Shivappa Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Link: https://lkml.kernel.org/r/9c41b91bc2f47d9e95b62b213ecdb45623c47a9f.1508490116.git.reinette.chatre@intel.com Signed-off-by: Thomas Gleixner arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 36b6f9fcb8928c06b6638a4cf91bc9d69bb49aa2 Author: Reinette Chatre Date: Fri Oct 20 02:16:58 2017 -0700 x86/intel_rdt: Fix potential deadlock during resctrl unmount Lockdep warns about a potential deadlock: [ 66.782842] ====================================================== [ 66.782888] WARNING: possible circular locking dependency detected [ 66.782937] 4.14.0-rc2-test-test+ #48 Not tainted [ 66.782983] ------------------------------------------------------ [ 66.783052] umount/336 is trying to acquire lock: [ 66.783117] (cpu_hotplug_lock.rw_sem){++++}, at: [] rdt_kill_sb+0x215/0x390 [ 66.783193] but task is already holding lock: [ 66.783244] (rdtgroup_mutex){+.+.}, at: [] rdt_kill_sb+0x36/0x390 [ 66.783305] which lock already depends on the new lock. [ 66.783364] the existing dependency chain (in reverse order) is: [ 66.783419] -> #3 (rdtgroup_mutex){+.+.}: [ 66.783467] __lock_acquire+0x1293/0x13f0 [ 66.783509] lock_acquire+0xaf/0x220 [ 66.783543] __mutex_lock+0x71/0x9b0 [ 66.783575] mutex_lock_nested+0x1b/0x20 [ 66.783610] intel_rdt_online_cpu+0x3b/0x430 [ 66.783649] cpuhp_invoke_callback+0xab/0x8e0 [ 66.783687] cpuhp_thread_fun+0x7a/0x150 [ 66.783722] smpboot_thread_fn+0x1cc/0x270 [ 66.783764] kthread+0x16e/0x190 [ 66.783794] ret_from_fork+0x27/0x40 [ 66.783825] -> #2 (cpuhp_state){+.+.}: [ 66.783870] __lock_acquire+0x1293/0x13f0 [ 66.783906] lock_acquire+0xaf/0x220 [ 66.783938] cpuhp_issue_call+0x102/0x170 [ 66.783974] __cpuhp_setup_state_cpuslocked+0x154/0x2a0 [ 66.784023] __cpuhp_setup_state+0xc7/0x170 [ 66.784061] page_writeback_init+0x43/0x67 [ 66.784097] pagecache_init+0x43/0x4a [ 66.784131] start_kernel+0x3ad/0x3f7 [ 66.784165] x86_64_start_reservations+0x2a/0x2c [ 66.784204] x86_64_start_kernel+0x72/0x75 [ 66.784241] verify_cpu+0x0/0xfb [ 66.784270] -> #1 (cpuhp_state_mutex){+.+.}: [ 66.784319] __lock_acquire+0x1293/0x13f0 [ 66.784355] lock_acquire+0xaf/0x220 [ 66.784387] __mutex_lock+0x71/0x9b0 [ 66.784419] mutex_lock_nested+0x1b/0x20 [ 66.784454] __cpuhp_setup_state_cpuslocked+0x52/0x2a0 [ 66.784497] __cpuhp_setup_state+0xc7/0x170 [ 66.784535] page_alloc_init+0x28/0x30 [ 66.784569] start_kernel+0x148/0x3f7 [ 66.784602] x86_64_start_reservations+0x2a/0x2c [ 66.784642] x86_64_start_kernel+0x72/0x75 [ 66.784678] verify_cpu+0x0/0xfb [ 66.784707] -> #0 (cpu_hotplug_lock.rw_sem){++++}: [ 66.784759] check_prev_add+0x32f/0x6e0 [ 66.784794] __lock_acquire+0x1293/0x13f0 [ 66.784830] lock_acquire+0xaf/0x220 [ 66.784863] cpus_read_lock+0x3d/0xb0 [ 66.784896] rdt_kill_sb+0x215/0x390 [ 66.784930] deactivate_locked_super+0x3e/0x70 [ 66.784968] deactivate_super+0x40/0x60 [ 66.785003] cleanup_mnt+0x3f/0x80 [ 66.785034] __cleanup_mnt+0x12/0x20 [ 66.785070] task_work_run+0x8b/0xc0 [ 66.785103] exit_to_usermode_loop+0x94/0xa0 [ 66.786804] syscall_return_slowpath+0xe8/0x150 [ 66.788502] entry_SYSCALL_64_fastpath+0xab/0xad [ 66.790194] other info that might help us debug this: [ 66.795139] Chain exists of: cpu_hotplug_lock.rw_sem --> cpuhp_state --> rdtgroup_mutex [ 66.800035] Possible unsafe locking scenario: [ 66.803267] CPU0 CPU1 [ 66.804867] ---- ---- [ 66.806443] lock(rdtgroup_mutex); [ 66.808002] lock(cpuhp_state); [ 66.809565] lock(rdtgroup_mutex); [ 66.811110] lock(cpu_hotplug_lock.rw_sem); [ 66.812608] *** DEADLOCK *** [ 66.816983] 2 locks held by umount/336: [ 66.818418] #0: (&type->s_umount_key#35){+.+.}, at: [] deactivate_super+0x38/0x60 [ 66.819922] #1: (rdtgroup_mutex){+.+.}, at: [] rdt_kill_sb+0x36/0x390 When the resctrl filesystem is unmounted the locks should be obtain in the locks in the same order as was done when the cpus came online: cpu_hotplug_lock before rdtgroup_mutex. This also requires to switch the static_branch_disable() calls to the _cpulocked variant because now cpu hotplug lock is held already. [ tglx: Switched to cpus_read_[un]lock ] Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Tested-by: Sai Praneeth Prakhya Acked-by: Vikas Shivappa Acked-by: Fenghua Yu Acked-by: Tony Luck Link: https://lkml.kernel.org/r/cc292e76be073f7260604651711c47b09fd0dc81.1508490116.git.reinette.chatre@intel.com arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 95953034fb24c16ad0047a98b16427e5935830c4 Author: Reinette Chatre Date: Fri Oct 20 02:16:57 2017 -0700 x86/intel_rdt: Initialize bitmask of shareable resource if CDP enabled The platform informs via CPUID.(EAX=0x10, ECX=res#):EBX[31:0] (valid res# are only 1 for L3 and 2 for L2) which unit of the allocation may be used by other entities in the platform. This information is valid whether CDP (Code and Data Prioritization) is enabled or not. Ensure that the bitmask of shareable resource is initialized when CDP is enabled. Fixes: 0dd2d7494cd8 ("x86/intel_rdt: Show bitmask of shareable resource with other executing units" Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Acked-by: Fenghua Yu Acked-by: Vikas Shivappa Acked-by: Tony Luck Link: https://lkml.kernel.org/r/815747bddc820ca221a8924edaf4d1a7324547e4.1508490116.git.reinette.chatre@intel.com arch/x86/kernel/cpu/intel_rdt.c | 1 + 1 file changed, 1 insertion(+) commit 3c467bf399106030d5a97d844ee119caec04e817 Author: Steve Lin Date: Thu Oct 19 10:45:56 2017 -0400 bnxt: Move generic devlink code to new file Moving generic devlink code (registration) out of VF-R code into new bnxt_devlink file, in preparation for future work to add additional devlink functionality to bnxt. Signed-off-by: Steve Lin Acked-by: Andy Gospodarek Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/Makefile | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 65 +++++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h | 39 ++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 53 ++---------------- drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h | 37 ++----------- 6 files changed, 112 insertions(+), 85 deletions(-) commit cb4dc41eaad0cb336bb5ddd379ae0d2cc89cb62b Author: Jon Maloy Date: Thu Oct 19 16:42:04 2017 +0200 tipc: fix broken tipc_poll() function In commit ae236fb208a6 ("tipc: receive group membership events via member socket") we broke the tipc_poll() function by checking the state of the receive queue before the call to poll_sock_wait(), while relying that state afterwards, when it might have changed. We restore this in this commit. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1c3b44c0f40d22b43fa58fe7081ca36e38449114 Author: Hans de Goede Date: Thu Oct 19 13:23:21 2017 +0200 ACPI / x86: Extend KIOX000A quirk to cover all affected BIOS versions Recently produced GPD win devices have a new BIOS, research into the changes in this BIOS has found a ChangeLog which shows that the disabling of the KIOX000A node has been done starting with the 20170221 version. Unfortunately the GPD pocket uses the exact same DMI strings as the win and its BIOS was copy-pasted from the GPD win, so it has a disabled KIOX000A node which we should not enable, so we need to check for the exact BIOS date. This commit adds 2 extra entries to the always_present_ids quirk table with bios_date matches for the older also affected and the latest BIOS. Reported-by: ReddestDream Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki drivers/acpi/x86/utils.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit d9278077385fd9207c00104fe6797283a099b061 Author: Robert Jarzmik Date: Sat Oct 14 23:51:02 2017 +0200 cpufreq: pxa: convert to clock API As the clock settings have been introduced into the clock pxa drivers, which are now available to change the CPU clock by themselves, remove the clock handling from this driver, and rely on pxa clock drivers. Signed-off-by: Robert Jarzmik Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/pxa2xx-cpufreq.c | 191 ++++++++------------------------------- 1 file changed, 39 insertions(+), 152 deletions(-) commit b082ddd8a6a3aa0399763bfb58fc7bdd84c95713 Author: Rafael J. Wysocki Date: Fri Oct 13 15:25:39 2017 +0200 PM / core: Fix kerneldoc comments of four functions Fix the kerneldoc comments of __device_suspend_noirq(), __device_suspend_late() and __device_suspend() where the function names in kerneldoc don't match the actual names of the functions. Also fix the device_resume_noirq() kerneldoc comment which mentions "early resume" instead of "noirq resume" incorrectly. Signed-off-by: Rafael J. Wysocki Reviewed-by: Ulf Hansson drivers/base/power/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a2ab5fc41533c952706ebdfaa378bb746e535cc1 Merge: a380f2e 0e708fc Author: Rafael J. Wysocki Date: Sat Oct 21 13:09:18 2017 +0200 Merge branch 'pm-sleep' into pm-core commit 7e95d9134e3851de57075254737bc434462bb293 Author: Rafael J. Wysocki Date: Thu Oct 19 01:18:57 2017 +0200 PM: docs: Fix formatting typo in devices.rst There is one word too many under formatting markup in one place in device.rst, so fix it. Signed-off-by: Rafael J. Wysocki Documentation/driver-api/pm/devices.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86d5b2c20d8ec255ef7646533b81dabc935e0eff Author: Kuninori Morimoto Date: Tue Oct 17 06:57:49 2017 +0000 ASoC: audio-graph-scu-card: remove unnecessary route patch from Example 1 Example 1 is for "Sampling Rate Conversion", sample has only 1 CPU, 1 Codec. Thus, "codec Playback", "DAI1 Playback" route is unnecessary. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt | 1 - 1 file changed, 1 deletion(-) commit 05c006145054a86430ed4fdd4f8c1b4139a44bee Author: Kuninori Morimoto Date: Tue Oct 17 06:57:19 2017 +0000 ASoC: audio-graph-scu-card: add missing Capture routing on Example Both cases have 1 Capture path. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/audio-graph-scu-card.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f6a118a800e35af2c63f90cbcc23093f4b53b3a2 Author: Pierre-Louis Bossart Date: Thu Oct 12 18:49:45 2017 -0500 ASoC: Intel: clarify Kconfig dependencies Introduce more logical dependencies, with the SOC selected first and the relevant machine drivers are exposed. The same mechanism will be used for SOF support. Also select SND_SOC_ACPI_INTEL_MATCH for all machine drivers Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 25 +++++++++----- sound/soc/intel/boards/Kconfig | 77 ++++++++++++++++++++++++++---------------- 2 files changed, 63 insertions(+), 39 deletions(-) commit d4d86b86e1ffa6be16b287ee34b0090ef79a0fbb Author: Pierre-Louis Bossart Date: Thu Oct 12 18:49:44 2017 -0500 ASoC: Intel: reorder boards Kconfig by chronological order This file is a mess, order by generation with more recent last Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/intel/boards/Kconfig | 166 ++++++++++++++++++++--------------------- 1 file changed, 83 insertions(+), 83 deletions(-) commit ea2851bd82f8a319741a90a847b615c66fd6693b Author: Pierre-Louis Bossart Date: Thu Oct 12 18:49:43 2017 -0500 ASoC: Intel: move machine drivers to dedicated KConfig split Kconfig to prepare for reuse of machine drivers for SOF support no functional change or edits Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/intel/Kconfig | 271 +---------------------------------------- sound/soc/intel/boards/Kconfig | 269 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 271 insertions(+), 269 deletions(-) commit c1a8ed6930e4df1de24546e41b55530985170718 Author: Pierre-Louis Bossart Date: Thu Oct 12 18:49:42 2017 -0500 ASoC: Intel: add SOF firmare/topology file information Prepare for SOF integration, no functional change Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/intel/common/soc-acpi-intel-byt-match.c | 30 ++++++++++++++++ sound/soc/intel/common/soc-acpi-intel-cht-match.c | 40 +++++++++++++++++++++- .../intel/common/soc-acpi-intel-hsw-bdw-match.c | 12 +++++++ 3 files changed, 81 insertions(+), 1 deletion(-) commit 6004640638a2cb81c00c17ddf21ad572af964bbe Author: Pierre-Louis Bossart Date: Thu Oct 12 18:49:41 2017 -0500 ASoC: Intel: move all ACPI match tables to common module First step of cleaning, move all tables to soc-acpi-intel-match module. The tables remain in separate files per platform to keep them manageable. Skylake+ platforms are still handled elsewhere since there is no conflict with SOF for now, but this will have to be handled at a later point. Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Signed-off-by: Mark Brown include/sound/soc-acpi-intel-match.h | 32 +++ sound/soc/intel/Kconfig | 24 +- sound/soc/intel/Makefile | 2 +- sound/soc/intel/atom/sst/sst_acpi.c | 311 ++------------------- sound/soc/intel/common/Makefile | 2 + sound/soc/intel/common/soc-acpi-intel-byt-match.c | 166 +++++++++++ sound/soc/intel/common/soc-acpi-intel-cht-match.c | 156 +++++++++++ .../intel/common/soc-acpi-intel-hsw-bdw-match.c | 52 ++++ sound/soc/intel/common/sst-acpi.c | 44 +-- 9 files changed, 446 insertions(+), 343 deletions(-) commit 976b5a0ee9c49c3c0112596d2e26bd6aa77c5cd5 Author: Pierre-Louis Bossart Date: Thu Oct 12 18:49:40 2017 -0500 ASoC: ACPI: add new fields for SOF support To prepare for SOF integration, we need new fields in the machine table. It is intended that the same table is used for both closed-source and open-source firmware to avoid repeating ACPI-related information multiple times No functional change Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Signed-off-by: Mark Brown include/sound/soc-acpi.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 928c8a8f1188dd59065e22bcedae57cb6156d836 Author: Pierre-Louis Bossart Date: Thu Oct 12 18:49:39 2017 -0500 ASoC: Intel: common: use c99 syntax for ACPI/machine tables Before we add new fields for SOF support, move to C99 syntax as done for atom/sst and legacy hsw/bdw code No functional change Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Signed-off-by: Mark Brown sound/soc/intel/common/sst-acpi.c | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) commit 7feb2f786a46d34cac760d5e246dfbdafafa0e96 Author: Pierre-Louis Bossart Date: Thu Oct 12 18:49:38 2017 -0500 ASoC: move ACPI common code out of Intel/sst tree ACPI support is not specific to the Intel/SST driver. Move the enumeration and matching code which is not hardware-dependent to sound/soc and rename relevant sst_acpi_ structures and functions with snd_soc_acpi_ prefix soc-acpi.h is protected by a #ifndef __LINUX_SND_SOC_ACPI_H for consistency with all other SoC .h files: grep -L __LINUX include/sound/soc* | wc -l 0 grep __LINUX include/sound/soc* | wc -l 14 Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Signed-off-by: Mark Brown include/sound/soc-acpi.h | 100 ++++++++++++++++++ sound/soc/Kconfig | 3 + sound/soc/Makefile | 6 ++ sound/soc/intel/Kconfig | 1 + sound/soc/intel/atom/sst/sst_acpi.c | 24 ++--- sound/soc/intel/boards/bytcht_da7213.c | 6 +- sound/soc/intel/boards/bytcht_es8316.c | 2 +- sound/soc/intel/boards/bytcr_rt5640.c | 11 +- sound/soc/intel/boards/bytcr_rt5651.c | 6 +- sound/soc/intel/boards/cht_bsw_rt5645.c | 11 +- sound/soc/intel/boards/cht_bsw_rt5672.c | 7 +- sound/soc/intel/common/Makefile | 2 - sound/soc/intel/common/sst-acpi.c | 18 ++-- sound/soc/intel/common/sst-acpi.h | 82 --------------- sound/soc/intel/common/sst-match-acpi.c | 173 ------------------------------- sound/soc/intel/skylake/skl.c | 40 ++++---- sound/soc/soc-acpi.c | 175 ++++++++++++++++++++++++++++++++ 17 files changed, 349 insertions(+), 318 deletions(-) commit 5914d285f6b782892a91d6621723fdc41a775b15 Author: Olivier Moysan Date: Thu Oct 19 15:03:23 2017 +0200 ASoC: stm32: sai: Add synchronization support Add Synchronization support for STM32 SAI. Signed-off-by: olivier moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_sai.c | 160 ++++++++++++++++++++++++++++++++++++++++-- sound/soc/stm/stm32_sai.h | 22 +++++- sound/soc/stm/stm32_sai_sub.c | 95 +++++++++++++++++++++++++ 3 files changed, 269 insertions(+), 8 deletions(-) commit 47a8907d7c73fad81030655f09832fbb4446a2f5 Author: Olivier Moysan Date: Thu Oct 19 15:03:21 2017 +0200 ASoC: stm32: sai: Remove spurious IRQs on stop Clear IRQ mask on stream stop to avoid spurious IRQs. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_sai_sub.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 61fb4ff70377cd2c49a3487bdb0156eba6930072 Author: Olivier Moysan Date: Thu Oct 19 15:03:18 2017 +0200 ASoC: stm32: sai: Move static settings to DAI init Audio interface direction and protocol settings does not change at runtime. So, these settings are moved from hw_params function to dai_probe and set_fmt. Signed-off-by: olivier moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_sai_sub.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 14f0e5f8d97e632695d92f41f2e91d10d8005d47 Author: Olivier Moysan Date: Thu Oct 19 15:03:17 2017 +0200 ASoC: stm32: Add synchronization to SAI bindings Add synchronization configuration to STM32 SAI bindings. This patch also adds peripheral clock which is required to access synchronization register. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/st,stm32-sai.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 3c6f6c53ab4df585639bbe647b45aa81ca54bdd2 Author: Olivier Moysan Date: Thu Oct 19 15:03:22 2017 +0200 ASoC: stm32: sai: Fix get reset controller Use devm version of reset_control_get function to manage driver removing properly. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_sai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4529d2b885747bb9393d507cd28649052d733f3 Author: Olivier Moysan Date: Thu Oct 19 15:03:19 2017 +0200 ASoC: stm32: sai: Fix DMA burst size Set best burst size tradeoff for 8, 16, 32 bits transfers. Signed-off-by: olivier moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_sai_sub.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit d807cdfb48c4d925b269f5b0f818864766e17389 Author: Olivier Moysan Date: Thu Oct 19 15:03:20 2017 +0200 ASoC: stm32: sai: fix stop management in isr Add check on substream validity. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown sound/soc/stm/stm32_sai_sub.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 39712db878a499542651eb6c2f5ceec4eacc72d1 Author: Carlo Caione Date: Wed Oct 18 17:49:57 2017 +0100 SoC: intel: byt: Introduce new custom IN2 map Introduce a new custom dapm routes map to quirk platforms with the internal mic connected to IN2P. Signed-off-by: Carlo Caione Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 271ef65b5882425d500e969e875c98e47a6b0c86 Author: Colin Ian King Date: Thu Oct 19 14:33:52 2017 +0200 ASoC: Intel: sst: remove redundant variable dma_dev_name The pointer dma_dev_name is assigned but never read, it is redundant and can therefore be removed. Cleans up clang warning: sound/soc/intel/common/sst-firmware.c:288:3: warning: Value stored to 'dma_dev_name' is never read Signed-off-by: Colin Ian King Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/intel/common/sst-firmware.c | 2 -- 1 file changed, 2 deletions(-) commit f32fbbadaf4470e8bac27f6d87bd27441df7167f Author: Matthias Brugger Date: Sat Oct 21 10:18:20 2017 +0200 soc: mediatek: pwrap: fix fatal compiler error When adding the MT6380 compatible, the sentinel for of_device_id was deleted, which leades to the following compiler error: FATAL: drivers/soc/mediatek/mtk-pmic-wrap: struct of_device_id is not terminated with a NULL entry! Fix this by adding the sentinel again. Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 1 + 1 file changed, 1 insertion(+) commit fb2c1934f30577756e55e24e8870b45c78da3bc2 Author: Matthias Brugger Date: Sat Oct 21 10:17:47 2017 +0200 soc: mediatek: pwrap: fix compiler errors When compiling using sparse, we got the following error: drivers/soc/mediatek/mtk-pmic-wrap.c:686:25: error: dubious one-bit signed bitfield Changing the data type to unsigned fixes this. Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 927340926ed61477e34f960eec64b7532e35d2f0 Author: Arnd Bergmann Date: Thu Oct 19 14:29:04 2017 +0200 tomoyo: fix timestamping for y2038 Tomoyo uses an open-coded version of time_to_tm() to create a timestamp from the current time as read by get_seconds(). This will overflow and give wrong results on 32-bit systems in 2038. To correct this, this changes the code to use ktime_get_real_seconds() and the generic time64_to_tm() function that are both y2038-safe. Using the library function avoids adding an expensive 64-bit division in this code and can benefit from any optimizations we do in common code. Acked-by: Tetsuo Handa Signed-off-by: Arnd Bergmann Signed-off-by: James Morris security/tomoyo/audit.c | 2 +- security/tomoyo/common.c | 4 ++-- security/tomoyo/common.h | 2 +- security/tomoyo/util.c | 39 +++++++++------------------------------ 4 files changed, 13 insertions(+), 34 deletions(-) commit 471abeabb416ad1f7c9f97227a5068ab5f6ffcde Merge: b65f164 fa71212 Author: David S. Miller Date: Sat Oct 21 03:04:09 2017 +0100 Merge branch 'net-sched-convert-cls-ndo_setup_tc-offload-calls-to-per-block-callbacks' Jiri Pirko says: ==================== net: sched: convert cls ndo_setup_tc offload calls to per-block callbacks This patchset is a bit bigger, but most of the patches are doing the same changes in multiple classifiers and drivers. I could do some squashes, but I think it is better split. This is another dependency on the way to shared block implementation. The goal is to remove use of tp->q in classifiers code. Also, this provides drivers possibility to track binding of blocks to qdiscs. Legacy drivers which do not support shared block offloading. register one callback per binding. That maintains the current functionality we have with ndo_setup_tc. Drivers which support block sharing offload register one callback per block which safes overhead. Patches 1-4 introduce the binding notifications and per-block callbacks Patches 5-8 add block callbacks calls to classifiers Patches 9-17 do convert from ndo_setup_tc calls to block callbacks for classifier offloads in drivers Patches 18-20 do cleanup v1->v2: - patch1: - move new enum value to the end ==================== Signed-off-by: David S. Miller commit fa71212e91811ac67014ad19d4fc3b3c3446ccf7 Author: Jiri Pirko Date: Thu Oct 19 15:50:48 2017 +0200 net: sched: remove unused is_classid_clsact_ingress/egress helpers These helpers are no longer in use by drivers, so remove them. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/pkt_sched.h | 13 ------------- 1 file changed, 13 deletions(-) commit d58d31a118690b578897749feda48416ac10ca43 Author: Jiri Pirko Date: Thu Oct 19 15:50:47 2017 +0200 net: sched: remove unused classid field from tc_cls_common_offload It is no longer used by the drivers, so remove it. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/pkt_cls.h | 2 -- 1 file changed, 2 deletions(-) commit 8d26d5636dff9fca30816579910aaa9a55b4d96d Author: Jiri Pirko Date: Thu Oct 19 15:50:46 2017 +0200 net: sched: avoid ndo_setup_tc calls for TC_SETUP_CLS* All drivers are converted to use block callbacks for TC_SETUP_CLS*. So it is now safe to remove the calls to ndo_setup_tc from cls_* Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 -- drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 2 -- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 -- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 -- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 -- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 3 --- drivers/net/ethernet/netronome/nfp/bpf/main.c | 2 -- .../net/ethernet/netronome/nfp/flower/offload.c | 2 -- net/dsa/slave.c | 2 -- net/sched/cls_bpf.c | 14 ---------- net/sched/cls_flower.c | 20 -------------- net/sched/cls_matchall.c | 16 ----------- net/sched/cls_u32.c | 31 ---------------------- 14 files changed, 103 deletions(-) commit 6b3eb752b4b9481868b3393f06a236a1aedfa43f Author: Jiri Pirko Date: Thu Oct 19 15:50:45 2017 +0200 dsa: Convert ndo_setup_tc offloads to block callbacks Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for matchall offloads to block callbacks. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/dsa/slave.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 53 insertions(+), 11 deletions(-) commit 90d97315b3e774450f06c035903fed246781fe35 Author: Jiri Pirko Date: Thu Oct 19 15:50:44 2017 +0200 nfp: bpf: Convert ndo_setup_tc offloads to block callbacks Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for bpf offloads to block callbacks. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/main.c | 54 ++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 9 deletions(-) commit 363fc53b8b5803ce43debc1e66cebaaf509fd20a Author: Jiri Pirko Date: Thu Oct 19 15:50:43 2017 +0200 nfp: flower: Convert ndo_setup_tc offloads to block callbacks Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for flower offloads to block callbacks. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/flower/offload.c | 56 ++++++++++++++++++---- 1 file changed, 48 insertions(+), 8 deletions(-) commit 855afa0932086851e6c7df39ac3d2cd2247cc8ee Author: Jiri Pirko Date: Thu Oct 19 15:50:42 2017 +0200 mlx5e_rep: Convert ndo_setup_tc offloads to block callbacks Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for flower offloads to block callbacks. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 44 ++++++++++++++++++++---- 1 file changed, 38 insertions(+), 6 deletions(-) commit 6ea30f8a972c063c1072d7e7accc6a550a36770a Author: Jiri Pirko Date: Thu Oct 19 15:50:41 2017 +0200 ixgbe: Convert ndo_setup_tc offloads to block callbacks Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for u32 offloads to block callbacks. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 45 +++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 6 deletions(-) commit cd019e91a837d83f599e0216794bdf1ad6fec053 Author: Jiri Pirko Date: Thu Oct 19 15:50:40 2017 +0200 cxgb4: Convert ndo_setup_tc offloads to block callbacks Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for flower and u32 offloads to block callbacks. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 45 +++++++++++++++++++++---- 1 file changed, 39 insertions(+), 6 deletions(-) commit 9e0fd15dd6c981931a9e9f11dc0c940d17d6e051 Author: Jiri Pirko Date: Thu Oct 19 15:50:39 2017 +0200 bnxt: Convert ndo_setup_tc offloads to block callbacks Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for flower offloads to block callbacks. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 37 +++++++++++++++++++---- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 3 +- drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 43 +++++++++++++++++++++++++-- 3 files changed, 73 insertions(+), 10 deletions(-) commit d6c862baaf9fb27a385a101c7e86b6112bfd8f07 Author: Jiri Pirko Date: Thu Oct 19 15:50:38 2017 +0200 mlx5e: Convert ndo_setup_tc offloads to block callbacks Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for flower offloads to block callbacks. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 45 ++++++++++++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 24 +++++------- 3 files changed, 51 insertions(+), 22 deletions(-) commit eb49cfaa6bfc164e53db72cde0058ef4768e05a8 Author: Jiri Pirko Date: Thu Oct 19 15:50:37 2017 +0200 mlxsw: spectrum: Convert ndo_setup_tc offloads to block callbacks Benefit from the newly introduced block callback infrastructure and convert ndo_setup_tc calls for matchall and flower offloads to block callbacks. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 82 +++++++++++++++++++------- 1 file changed, 60 insertions(+), 22 deletions(-) commit 3f7889c4c79b0afc012026431d4db4bad4e84473 Author: Jiri Pirko Date: Thu Oct 19 15:50:36 2017 +0200 net: sched: cls_bpf: call block callbacks for offload Use the newly introduced callbacks infrastructure and call block callbacks alongside with the existing per-netdev ndo_setup_tc. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_bpf.c | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) commit 245dc5121a9bf6a0a12ac1e72f47822fc3fa8cae Author: Jiri Pirko Date: Thu Oct 19 15:50:35 2017 +0200 net: sched: cls_u32: call block callbacks for offload Use the newly introduced callbacks infrastructure and call block callbacks alongside with the existing per-netdev ndo_setup_tc. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_u32.c | 72 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 20 deletions(-) commit 77460411929d8904823419fca73bdad666a659d3 Author: Jiri Pirko Date: Thu Oct 19 15:50:34 2017 +0200 net: sched: cls_u32: swap u32_remove_hw_knode and u32_remove_hw_hnode Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_u32.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 2447a96f88ee3c082603c2dd38ae51f66977c11d Author: Jiri Pirko Date: Thu Oct 19 15:50:33 2017 +0200 net: sched: cls_matchall: call block callbacks for offload Use the newly introduced callbacks infrastructure and call block callbacks alongside with the existing per-netdev ndo_setup_tc. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_matchall.c | 72 ++++++++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 27 deletions(-) commit 208c0f4b5237f1d6611b2c679a8022d6901577d6 Author: Jiri Pirko Date: Thu Oct 19 15:50:32 2017 +0200 net: sched: use tc_setup_cb_call to call per-block callbacks Extend the tc_setup_cb_call entrypoint function originally used only for action egress devices callbacks to call per-block callbacks as well. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/pkt_cls.h | 4 ++-- net/sched/cls_api.c | 21 ++++++++++++++++++--- net/sched/cls_flower.c | 9 ++++++--- 3 files changed, 26 insertions(+), 8 deletions(-) commit acb674428c3d57bccbe3f4a1a7a009f6d73e9f41 Author: Jiri Pirko Date: Thu Oct 19 15:50:31 2017 +0200 net: sched: introduce per-block callbacks Introduce infrastructure that allows drivers to register callbacks that are called whenever tc would offload inserted rule for a specific block. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/pkt_cls.h | 81 +++++++++++++++++++++++++++++++++++ include/net/sch_generic.h | 1 + net/sched/cls_api.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 187 insertions(+) commit 6e40cf2d4dee9dc22ff398041ce876bef8172dea Author: Jiri Pirko Date: Thu Oct 19 15:50:30 2017 +0200 net: sched: use extended variants of block_get/put in ingress and clsact qdiscs Use previously introduced extended variants of block get and put functions. This allows to specify a binder types specific to clsact ingress/egress which is useful for drivers to distinguish who actually got the block. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/pkt_cls.h | 2 ++ net/sched/sch_ingress.c | 36 +++++++++++++++++++++++++++++------- 2 files changed, 31 insertions(+), 7 deletions(-) commit 8c4083b30e56fc71b0e94c26374b32d95d5ea461 Author: Jiri Pirko Date: Thu Oct 19 15:50:29 2017 +0200 net: sched: add block bind/unbind notif. and extended block_get/put Introduce new type of ndo_setup_tc message to propage binding/unbinding of a block to driver. Call this ndo whenever qdisc gets/puts a block. Alongside with this, there's need to propagate binder type from qdisc code down to the notifier. So introduce extended variants of block_get/put in order to pass this info. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/linux/netdevice.h | 1 + include/net/pkt_cls.h | 40 +++++++++++++++++++++++++++++++++ net/sched/cls_api.c | 56 ++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 94 insertions(+), 3 deletions(-) commit b65f164d37cf6d4aac59b0e13c2e5c4cfe293fd2 Author: Paolo Abeni Date: Thu Oct 19 09:31:43 2017 +0200 ipv6: let trace_fib6_table_lookup() dereference the fib table The perf traces for ipv6 routing code show a relevant cost around trace_fib6_table_lookup(), even if no trace is enabled. This is due to the fib6_table de-referencing currently performed by the caller. Let's the tracing code pay this overhead, passing to the trace helper the table pointer. This gives small but measurable performance improvement under UDP flood. Signed-off-by: Paolo Abeni Acked-by: Steven Rostedt (VMware) Acked-by: David Ahern Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller include/trace/events/fib6.h | 6 +++--- net/ipv6/route.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) commit f730cc9fee2b47c22964b4843a41d723f436b62a Merge: 164a5e7 fac72b2 Author: David S. Miller Date: Sat Oct 21 02:22:19 2017 +0100 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-10-19 Here's the first bluetooth-next pull request targeting the 4.15 kernel release. - Multiple fixes & improvements to the hci_bcm driver - DT improvements, e.g. new local-bd-address property - Fixes & improvements to ECDH usage. Private key is now generated by the crypto subsystem. - gcc-4.9 warning fixes Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 164a5e7ad531e181334a3d3f03d0d5ad20d6faea Author: Eric Dumazet Date: Wed Oct 18 17:02:03 2017 -0700 ipv4: ipv4_default_advmss() should use route mtu ipv4_default_advmss() incorrectly uses the device MTU instead of the route provided one. IPv6 has the proper behavior, lets harmonize the two protocols. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 520d0d75dd9f63219084adfd8d31913c71bd8311 Merge: 3c75f9b 396665e Author: David S. Miller Date: Sat Oct 21 01:45:56 2017 +0100 Merge branch 'ieee802154-for-davem-2017-10-18' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next Stefan Schmidt says: ==================== pull-request: ieee802154 2017-10-18 Please find below a pull request from the ieee802154 subsystem for net-next. ==================== Signed-off-by: David S. Miller commit 3c75f9b1b4de0a14f11b7e71a6bdc30b65648f20 Author: David Ahern Date: Wed Oct 18 15:01:38 2017 -0700 spectrum: Convert fib event handlers to use container_of on info arg Use container_of to convert the generic fib_notifier_info into the event specific data structure. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 29 +++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) commit ba233b34741a1dc88d1e94db7deeb7b079ef4b9a Author: Eric Dumazet Date: Wed Oct 18 14:20:30 2017 -0700 tcp: fix tcp_send_syn_data() syn_data was allocated by sk_stream_alloc_skb(), meaning its destructor and _skb_refdst fields are mangled. We need to call tcp_skb_tsorted_anchor_cleanup() before calling kfree_skb() or kernel crashes. Bug was reported by syzkaller bot. Fixes: e2080072ed2d ("tcp: new list for sent but unacked skbs for RACK recovery") Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Acked-by: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 1 + 1 file changed, 1 insertion(+) commit 27188af5ab2f11dd6a4b548940db6464c8fcfe28 Merge: 7f9ad2a 1859bac Author: David S. Miller Date: Sat Oct 21 01:39:11 2017 +0100 Merge branch 'ipv6-fixes-for-RTF_CACHE-entries' Paolo Abeni says: ==================== ipv6: fixes for RTF_CACHE entries This series addresses 2 different but related issues with RTF_CACHE introduced by the recent refactory. patch 1 restore the gc timer for such routes patch 2 removes the aged out dst from the fib tree, properly coping with pMTU routes v1 -> v2: - dropped the for ip route show cache - avoid touching dst.obsolete when the dst is aged out v2 -> v3: - take care of pMTU exceptions ==================== Signed-off-by: David S. Miller commit 1859bac04fb696b858dbbff59503c945ec871bd9 Author: Paolo Abeni Date: Thu Oct 19 16:07:11 2017 +0200 ipv6: remove from fib tree aged out RTF_CACHE dst The commit 2b760fcf5cfb ("ipv6: hook up exception table to store dst cache") partially reverted the commit 1e2ea8ad37be ("ipv6: set dst.obsolete when a cached route has expired"). As a result, RTF_CACHE dst referenced outside the fib tree will not be removed until the next sernum change; dst_check() does not fail on aged-out dst, and dst->__refcnt can't decrease: the aged out dst will stay valid for a potentially unlimited time after the timeout expiration. This change explicitly removes RTF_CACHE dst from the fib tree when aged out. The rt6_remove_exception() logic will then obsolete the dst and other entities will drop the related reference on next dst_check(). pMTU exceptions are not aged-out, and are removed from the exception table only when the - usually considerably longer - ip6_rt_mtu_expires timeout expires. v1 -> v2: - do not touch dst.obsolete in rt6_remove_exception(), not needed v2 -> v3: - take care of pMTU exceptions, too Fixes: 2b760fcf5cfb ("ipv6: hook up exception table to store dst cache") Signed-off-by: Paolo Abeni Acked-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv6/route.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit b886d5f2f2906a866e33212734d204dfe35d50d9 Author: Paolo Abeni Date: Thu Oct 19 16:07:10 2017 +0200 ipv6: start fib6 gc on RTF_CACHE dst creation After the commit 2b760fcf5cfb ("ipv6: hook up exception table to store dst cache"), the fib6 gc is not started after the creation of a RTF_CACHE via a redirect or pmtu update, since fib6_add() isn't invoked anymore for such dsts. We need the fib6 gc to run periodically to clean the RTF_CACHE, or the dst will stay there forever. Fix it by explicitly calling fib6_force_start_gc() on successful exception creation. gc_args->more accounting will ensure that the gc timer will run for whatever time needed to properly clean the table. v2 -> v3: - clarified the commit message Fixes: 2b760fcf5cfb ("ipv6: hook up exception table to store dst cache") Signed-off-by: Paolo Abeni Acked-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv6/route.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9c3b2689d01ff03e2b8e8d47538881dbff756d78 Author: Rodrigo Vivi Date: Fri Oct 20 10:26:41 2017 -0700 drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin. Starting on CNL we now need to map VBT DDC Pin to BSPec DDC Pin values. Not a direct translation anymore. According to VBT Block 2 (General Bytes Definition) DDC Bus +----------+-----------+--------------------+ | DDI Type | VBT Value | Bspec Mapped Value | +----------+-----------+--------------------+ | DDI-B | 0x1 | 0x1 | | DDI-C | 0x2 | 0x2 | | DDI-D | 0x3 | 0x4 | | DDI-F | 0x4 | 0x3 | +----------+-----------+--------------------+ v2: Move defines to a better place. This is actually CNL_PCH not CNL only. v3: Accepting Ville's suggestions: enums and array to to make this future proof. v4: Protect the array access as Ville suggested. Also accepting all Jani's suggestions: - use already defined gmbus pin definitions. - use map_ddc_pin for disambiguation. - Add /* sic */ comment on inverted values so people can easily see it it nos a mistake we have the map 3 -> 4 and 4 -> 3 :/ Cc: Jani Nikula Cc: Paulo Zanoni Cc: Anusha Srivatsa Cc: Clinton Taylor Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171020172641.16029-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_bios.c | 27 +++++++++++++++++---------- drivers/gpu/drm/i915/intel_vbt_defs.h | 8 ++++++++ 2 files changed, 25 insertions(+), 10 deletions(-) commit 2952cd6fb4cc9834baa3774fc4051718f94dc3fe Author: Rodrigo Vivi Date: Wed Oct 18 12:54:06 2017 -0700 drm/i915: Let's use more enum intel_dpll_id pll_id. No functional change expected. Just let's use this enum when possible and also same standard pll_id name so we can rework gen9+ port clock later. Cc: Mika Kahola Cc: Paulo Zanoni Signed-off-by: Rodrigo Vivi Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20171018195407.8618-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_ddi.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) commit b3c433efb8a3d347ddc39b95606a6e7732e97649 Author: Wei Yongjun Date: Tue Oct 17 12:11:03 2017 +0000 PCI: faraday: 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: 2eeb02b28579 ("PCI: faraday: Add clock handling") Signed-off-by: Wei Yongjun Signed-off-by: Bjorn Helgaas Reviewed-by: Linus Walleij drivers/pci/host/pci-ftpci100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92fb8690bd04cb421d987d246deac60eef85d272 Author: Michael Neuling Date: Thu Oct 12 21:17:19 2017 +1100 powerpc/tm: P9 disable transactionally suspended sigcontexts Unfortunately userspace can construct a sigcontext which enables suspend. Thus userspace can force Linux into a path where trechkpt is executed. This patch blocks this from happening on POWER9 by sanity checking sigcontexts passed in. ptrace doesn't have this problem as only MSR SE and BE can be changed via ptrace. This patch also adds a number of WARN_ON()s in case we ever enter suspend when we shouldn't. This should not happen, but if it does the symptoms are soft lockup warnings which are not obviously TM related, so the WARN_ON()s should make it obvious what's happening. Signed-off-by: Michael Neuling Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 2 ++ arch/powerpc/kernel/signal_32.c | 4 ++++ arch/powerpc/kernel/signal_64.c | 5 +++++ 3 files changed, 11 insertions(+) commit 54820530c5faa9fd78e1c08cb6449100b1a19157 Author: Michael Ellerman Date: Thu Oct 12 21:17:18 2017 +1100 powerpc/powernv: Enable TM without suspend if possible Some Power9 revisions can run in a mode where TM operates without suspended state. If we find ourself on a CPU that might be in this mode, we query OPAL to check, and if so we reenable TM in CPU features, and enable a new user feature to signal to userspace that we are in this mode. We do not enable the "normal" user feature, PPC_FEATURE2_HTM, but we do enable PPC_FEATURE2_HTM_NOSC because that indicates to userspace that the kernel will abort transactions on syscall entry, which is true regardless of the suspend mode. Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal-api.h | 2 ++ arch/powerpc/include/asm/powernv.h | 4 ++++ arch/powerpc/include/asm/tm.h | 2 ++ arch/powerpc/kernel/process.c | 7 +++++++ arch/powerpc/kernel/prom.c | 4 ++++ arch/powerpc/platforms/powernv/setup.c | 23 +++++++++++++++++++++++ 6 files changed, 42 insertions(+) commit bd386e51805632abed4a0873a84af35f0c6461e3 Author: Keith Packard Date: Wed Jul 5 14:34:23 2017 -0700 drm: Reorganize drm_pending_event to support future event types [v2] Place drm_event_vblank in a new union that includes that and a bare drm_event structure. This will allow new members of that union to be added in the future without changing code related to the existing vbl event type. Assignments to the crtc_id field are now done when the event is allocated, rather than when delievered. This way, delivery doesn't need to have the crtc ID available. v2: * Remove 'dev' argument from create_vblank_event It wasn't being used anyways, and if we need it in the future, we can always get it from crtc->dev. * Check for MODESETTING before looking for crtc in queue_vblank_event UMS drivers will oops if we try to get a crtc, so make sure we're modesetting before we try to find a crtc_id to fill into the event. Signed-off-by: Keith Packard Reviewed-by: Sean Paul Signed-off-by: Dave Airlie (cherry picked from commit dc695b85fde88eca3ef3b03fcd82f15b6bc6e462) drivers/gpu/drm/drm_atomic.c | 7 +++--- drivers/gpu/drm/drm_plane.c | 2 +- drivers/gpu/drm/drm_vblank.c | 41 +++++++++++++++++++++--------------- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 4 ++-- include/drm/drm_vblank.h | 8 ++++++- 6 files changed, 40 insertions(+), 26 deletions(-) commit 570e86963a511c1b404e81c72d2c42169faf9324 Author: Keith Packard Date: Thu Oct 12 11:57:49 2017 -0700 drm: Widen vblank count to 64-bits [v3] This modifies the datatypes used by the vblank code to provide 64 bits of vblank count. The driver interfaces have been left using 32 bits of vblank count; all of the code necessary to widen that value for the user API was already included to handle devices returning fewer than 32-bits. This will provide the necessary datatypes for the Vulkan API. v2: * Re-write wait_vblank ioctl to ABSOLUTE sequence When an application uses the WAIT_VBLANK ioctl with RELATIVE or NEXTONMISS bits set, the target vblank interval is updated within the kernel. We need to write that target back to the ioctl buffer and update the flags bits so that if the wait is interrupted by a signal, when it is re-started, it will target precisely the same vblank count as before. * Leave driver API with 32-bit vblank count v3: * Rebase on top of Arnd Bergmann's patch which had the switch to ktime_t parts. [airlied: fix conflict with Ville vblank change]. Suggested-by: Michel Dänzer Suggested-by: Daniel Vetter Signed-off-by: Keith Packard Signed-off-by: Dave Airlie (cherry picked from commit 2affbc16983e4fc90960bc7f70e7615f4228199b) drivers/gpu/drm/drm_vblank.c | 104 +++++++++++++++++++++++++++++-------------- include/drm/drm_vblank.h | 10 +++-- 2 files changed, 78 insertions(+), 36 deletions(-) commit 1c6788e8746d5250ad9bd16e1e48140a396f4733 Merge: 8193d9a e868adf Author: Arnd Bergmann Date: Fri Oct 20 22:40:48 2017 +0200 Merge tag 'soc-fsl-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into next/drivers Pull "FSL/NXP ARM SoC drivers updates for 4.14" from Li Yang: This adds the DPAA QBMan support for ARM SoCs and a few minor fixes/updates. This pull request includes updates to the QMAN/BMAN drivers to make them work on the arm/arm64 architectures in addition to the power architecture and a few minor update/bug-fix to the soc/fsl drivers. We got the Reviewed-by from Catalin on the ARM architecture side. DPAA (Data Path Acceleration Architecture) is a set of hardware components used on some FSL/NXP QorIQ Networking SoCs, it provides the infrastructure to support simplified sharing of networking interfaces and accelerators by multiple CPU cores, and the accelerators themselves. The QMan(Queue Manager) and BMan(Buffer Manager) are infrastructural components within the DPAA framework. They are used to manage queues and buffers for various I/O interfaces, hardware accelerators. * tag 'soc-fsl-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux: soc/fsl/qbman: Enable FSL_LAYERSCAPE config on ARM soc/fsl/qbman: Add missing headers on ARM soc/fsl/qbman: different register offsets on ARM soc/fsl/qbman: add QMAN_REV32 soc/fsl/qbman: Rework portal mapping calls for ARM/PPC soc/fsl/qbman: Fix ARM32 typo soc/fsl/qbman: Drop L1_CACHE_BYTES compile time check soc/fsl/qbman: Drop set/clear_bits usage dt-bindings: soc/fsl: Update reserved memory binding for QBMan soc/fsl/qbman: Use shared-dma-pool for QMan private memory allocations soc/fsl/qbman: Use shared-dma-pool for BMan private memory allocations soc/fsl/qbman: Add common routine for QBMan private allocations soc/fsl/guts: Add compatible string for LS1088 soc/fsl/qman: Sleep instead of stuck hacking jiffies commit 8193d9ae379484cb9d36fb5f01053f5ca79fc9dd Merge: d5bd850 542befb Author: Arnd Bergmann Date: Fri Oct 20 22:37:32 2017 +0200 Merge tag 'reset-for-4.15' of git://git.pengutronix.de/git/pza/linux into next/drivers Pull "Reset controller changes for v4.15" from Philipp Zabel: - add ARC AX10x support, merged from a separate branch that is also included in the ARC tree - add Stratix10 support via socfpga - unify socfpga, stm32, sunxi, and zx2967 into simple-reset driver - add Meson GX reset level control and remove an unneeded check - add Uniphier PXs3 and ethernet reset controls - add MT7622 reset control dt-bindings header * tag 'reset-for-4.15' of git://git.pengutronix.de/git/pza/linux: reset: zx2967: use the reset-simple driver reset: stm32: use the reset-simple driver reset: socfpga: use the reset-simple driver reset: sunxi: use reset-simple driver reset: add reset-simple to unify socfpga, stm32, sunxi, and zx2967 reset: meson: remove unneeded check in meson_reset_reset reset: meson: add level reset support for GX SoC family reset: uniphier: add PXs3 reset data reset: mediatek: add reset controller dt-bindings required header for MT7622 SoC reset: socfpga: build the reset-socfpga for Stratix10 SOC reset: uniphier: add ethernet reset control support reset: socfpga: fix for 64-bit compilation ARC: reset: introduce AXS10x reset driver commit d5bd8507cf3f7fcb890b2c02bbfab26efac75795 Merge: 8a36c27 0d96a4f Author: Arnd Bergmann Date: Fri Oct 20 22:36:23 2017 +0200 Merge tag 'gpmc-omap-for-v4.15' of https://github.com/rogerq/linux into next/drivers Pull "OMAP-GPMC: driver updates for v4.15" from Roger Quadros: * get rid of unused field in platform data structure. * tag 'gpmc-omap-for-v4.15' of https://github.com/rogerq/linux: memory: omap-gpmc: Drop gpmc_status commit 8a36c27d19bdd750832300c4327731b0792e2830 Merge: ea9e3fb 8c1b7dc Author: Arnd Bergmann Date: Fri Oct 20 22:34:41 2017 +0200 Merge tag 'qcom-drivers-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/drivers Pull "Qualcomm ARM Based Driver Updates for v4.15" from Andy Gross: * Add SCM firmware APIs for download mode and secure IO service * Add SMEM support for cached entries * Add SMEM support for global partition, dynamic item limit, and more hosts * tag 'qcom-drivers-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: firmware: qcom: scm: Expose download-mode control firmware: qcom: scm: Expose secure IO service soc: qcom: smem: Increase the number of hosts soc: qcom: smem: Support dynamic item limit soc: qcom: smem: Support global partition soc: qcom: smem: Read version from the smem header soc: qcom: smem: Use le32_to_cpu for comparison soc: qcom: smem: Support getting cached entries soc: qcom: smem: Rename "uncached" accessors commit ea9e3fbc1748ac4805350778768e3ad801ade5f7 Merge: 6710acf c406101 Author: Arnd Bergmann Date: Fri Oct 20 22:33:54 2017 +0200 Merge tag 'samsung-drivers-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/drivers Pull "Samsung soc drivers changes for v4.15" from Krzysztof Kozłowski: Remove of Exynos4212 related dead code (no more support for this SoC). * tag 'samsung-drivers-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: soc: samsung: Remove Exynos4212 related dead code commit 6710acf2596a29f7351e8165d981645f403e0025 Merge: 4b367f2 430594c Author: Arnd Bergmann Date: Fri Oct 20 22:29:09 2017 +0200 Merge tag 'scpi-updates-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/drivers Pull "ARM SCPI updates/cleanups for v4.15" from Sudeep Holla: 1. Fixes to get rid of sparse warnings 2. Use of FIELD_GET and GENMASK for better subfields handling 3. Make mbox_free_channels device-managed helping in removing unnecessary code 4. Various other cleanups to simplify and improve code readability * tag 'scpi-updates-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scpi: silence sparse warnings firmware: arm_scpi: remove all single element structures firmware: arm_scpi: drop unnecessary type cast to scpi_shared_mem firmware: arm_scpi: improve struct sensor_value firmware: arm_scpi: improve handling of protocol and firmware version subfields firmware: arm_scpi: improve struct dvfs_info to make code better readable firmware: arm_scpi: remove scpi_remove firmware: arm_scpi: make freeing mbox channels device-managed firmware: arm_scpi: pre-populate dvfs info in scpi_probe firmware: arm_scpi: remove two unneeded devm_kfree's in scpi_remove firmware: arm_scpi: remove usage of drvdata and don't reset scpi_info to null commit 4b367f2e8854da34d14bd154ff4432fb49f69b36 Merge: 3fbef2f bab9b2a Author: Arnd Bergmann Date: Fri Oct 20 22:27:58 2017 +0200 Merge tag 'renesas-drivers-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers Pull "Renesas ARM Based SoC Drivers Updates for v4.15" from Simon Horman: Add basic support for R-Car V3M (R8A77970) SoC. Sergei Shtylyov says: * Add support for R-Car V3M (R8A77970) SoC power areas to the R-Car SYSC driver * Add support for identifying the R-Car V3M (R8A77970) SoC * Add support for R-Car V3M (R8A77970) to the R-Car RST driver -- this driver is needed for the clock driver to work * tag 'renesas-drivers-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: soc: renesas: rcar-sysc: add R8A77970 support soc: renesas: identify R-Car V3M soc: renesas: rcar-rst: add R8A77970 support commit 3fbef2f9f76e3abaf9a5011ead3828b860d1935e Merge: 8a5776a 0e9b114 Author: Arnd Bergmann Date: Fri Oct 20 22:26:30 2017 +0200 Merge tag 'arm-soc/for-4.15/drivers' of http://github.com/Broadcom/stblinux into next/drivers Pull "Broadcom drivers changes for 4.15" from Florian Fainelli: This pull requests contains Broadcom SoCs drivers updates for 4.15, please pull the following: - Markus adds support for the Broadcom STB DDR PHY frontend which supports dynamic firmware loading and offers the ability to respond with DRAM refresh rates. He also adds a proper documentation binding document for that peripheral - Brian adds support for S2/S3/S5 system suspend/resume modes on ARM-based SoCs which is not new but had been lingering for a long time. - Justin adds S2/S3 system suspend/resume modes on MIPS-based SoCs which is a bit new newer and builds on top of the ARM-based support. - Florian adds Device Tree binding documents for both ARM and MIPS based systems describing the necessary nodes for S2/S3/S5 on these SoCs. (This pull request somehow missed the 4.14 merge window and is now being sent again for 4.15 along with build fixes from Arnd). * tag 'arm-soc/for-4.15/drivers' of http://github.com/Broadcom/stblinux: soc bcm: brcmstb: Add support for S2/S3/S5 suspend states (MIPS) dt-bindings: Document MIPS Broadcom STB power management nodes soc: bcm: brcmstb: Add support for S2/S3/S5 suspend states (ARM) dt-bindings: ARM: brcmstb: Update Broadcom STB Power Management binding memory: brcmstb: Add driver for DPFE dt-bindings: Add bindings for Broadcom STB DRAM Sensors commit 84d897d69938a33f4ce3877c82d573e7a2b4e5a9 Author: Minghuan Lian Date: Thu Oct 12 17:44:48 2017 +0800 PCI: layerscape: Change default error response behavior By default, when the PCIe controller experiences an erroneous completion from an external completer for its outbound non-posted request, it sends an OKAY response to the device's internal AXI slave system interface. However, this default system error response behavior cannot be used for other types of outbound non-posted requests. For example, the outbound memory read transaction requires an actual ERROR response, like UR completion or completion timeout. Fix this by forwarding the error response of the non-posted request. Signed-off-by: Minghuan Lian Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas drivers/pci/dwc/pci-layerscape.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 06dc4ee54e306eff61cbdac3593b42b09f618103 Author: Hou Zhiqiang Date: Thu Oct 12 17:44:47 2017 +0800 PCI: Disable MSI for Freescale Layerscape PCIe RC mode The Freescale PCIe controller advertises the MSI/MSI-X capability in both RC and Endpoint mode, but in RC mode it doesn't support MSI/MSI-X by itself; it can only transfer MSI/MSI-X from downstream devices. Add a quirk to prevent use of MSI/MSI-X in RC mode. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Minghuan Lian drivers/pci/quirks.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit ad4e25a3a1a5a95b334242d908e26f1249db83e0 Merge: e4d0b67 56628a7 f22ce09 b038c58 Author: Paul E. McKenney Date: Fri Oct 20 11:11:15 2017 -0700 Merge branches 'doc.2017.10.20a', 'fixes.2017.10.19a', 'stall.2017.10.09a' and 'torture.2017.10.09a' into HEAD doc.2017.10.20a: Documentation updates. fixes.2017.10.19a: Miscellaneous fixes. stall.2017.10.09a: RCU CPU stall-warning updates. torture.2017.10.09a: Torture-test updates. commit e4d0b679a8467b6d0c169642f0b5f57d8d6eacc2 Author: Paul E. McKenney Date: Sun Sep 17 14:30:06 2017 -0700 srcu: Add parameters to SRCU docbook comments Signed-off-by: Paul E. McKenney include/linux/srcu.h | 1 + kernel/rcu/srcutree.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 5692fcc671ac8a10bfd0e75d52f0259fe767b56c Author: Guilherme G. Piccoli Date: Thu Sep 21 16:29:01 2017 -0300 doc: Rewrite confusing statement about memory barriers The "Write (or store) memory barriers" bullet of the "Variety of memory barriers" section, calls out a sequential order of stores, which is confusing since sequential ordering is not guaranteed. This commit therefore rewords to avoid mentioning a sequence of stores to clarify the intent. Cc: Paul E. McKenney Signed-off-by: Guilherme G. Piccoli Signed-off-by: Paul E. McKenney Documentation/memory-barriers.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d92f842bb30f52beedad63a4a850b39ca0dbc45f Author: Scott Tsai Date: Wed Sep 20 02:16:00 2017 +0800 memory-barriers.txt: Fix typo in pairing example In the "general barrier pairing with implicit control depdendency" example, the last write by CPU 1 was meant to change variable x and not y. The example would be pretty uninteresting if no CPU ever changes x and the variable was initialized to zero. Signed-off-by: Scott Tsai Signed-off-by: Paul E. McKenney Documentation/memory-barriers.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e25883411e80f314f0f76c8eeacd1b47d7e4805b Author: Anup Patel Date: Fri Oct 20 11:43:24 2017 -0600 vfio: platform: reset: Add Broadcom FlexRM reset module This patch adds Broadcom FlexRM low-level reset for VFIO platform. It will do the following: 1. Disable/Deactivate each FlexRM ring 2. Flush each FlexRM ring The cleanup sequence for FlexRM rings is adapted from Broadcom FlexRM mailbox driver. Signed-off-by: Anup Patel Reviewed-by: Oza Oza Reviewed-by: Scott Branden Reviewed-by: Eric Auger Signed-off-by: Alex Williamson drivers/vfio/platform/reset/Kconfig | 9 ++ drivers/vfio/platform/reset/Makefile | 1 + .../vfio/platform/reset/vfio_platform_bcmflexrm.c | 113 +++++++++++++++++++++ 3 files changed, 123 insertions(+) commit 71a7d3d78e3ca51ea688ae88c389867d948377cd Author: Dan Carpenter Date: Fri Oct 20 11:41:56 2017 -0600 vfio/type1: silence integer overflow warning I get a static checker warning about the potential integer overflow if we add "unmap->iova + unmap->size". The integer overflow isn't really harmful, but we may as well fix it. Also unmap->size gets truncated to size_t when we pass it to vfio_find_dma() so we could check for too high values of that as well. Signed-off-by: Dan Carpenter Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_type1.c | 3 +++ 1 file changed, 3 insertions(+) commit 56e0349f384cbadf3b939cbcebe6e1560513246e Author: Dave Airlie Date: Fri Oct 20 10:52:18 2017 +1000 amdgpu: add padding to the fence to handle ioctl. I don't think this ioctl is in a Linus release yet. Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher Reviewed-by: Alex Deucher include/uapi/drm/amdgpu_drm.h | 1 + 1 file changed, 1 insertion(+) commit 63ae07ca4fb4adcacc19272b05b5c3d398e94a56 Author: Monk Liu Date: Tue Oct 17 19:18:56 2017 +0800 drm/amdgpu:fix wb_clear Properly shift the index when clearing so we clear the right bit Signed-off-by: Monk Liu 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 6867e1b5fbd1a9deaf95a1bd23ea930063c8d216 Author: Monk Liu Date: Mon Oct 16 19:50:44 2017 +0800 drm/amdgpu:fix vf_error_put 1,it should not work on non-SR-IOV case 2,the NO_VBIOS error is incorrect, should handle it under detect_sriov_bios. 3,wrap the whole detect_sriov_bios with sriov check Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 21 +++++++++++---------- drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c | 7 ++++++- 2 files changed, 17 insertions(+), 11 deletions(-) commit ef4c166dc2335bf20c7a854a0de52d17ed9f2f38 Author: Monk Liu Date: Fri Sep 22 16:23:34 2017 +0800 drm/amdgpu/sriov:now must reinit psp otherwise after VF FLR the KIQ cannot work Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file changed, 1 insertion(+) commit 91fe77eb9585b45928b93cfe402248c77c28dab2 Author: pding Date: Thu Oct 19 09:38:39 2017 +0800 drm/amdgpu: merge bios post checking functions Merge the post checking functions to avoid confusion and take virtualization into account in all cases. Signed-off-by: pding Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 41 +++++++++++++----------------- 1 file changed, 18 insertions(+), 23 deletions(-) commit f6755643d62e14c55c2f864a7995fd8001ae3f51 Author: Geert Uytterhoeven Date: Wed Oct 11 15:50:13 2017 +0200 dt-bindings: PCI: rcar: Correct example to match reality Correct the USB subnodes in the example, as in f7d569c1e6a6 ("ARM: dts: r8a779x: Fix PCI bus dtc warnings"). 1. Drop the bogus 'device_type = "pci"' properties, 2. Correct the unit addresses. Update other bits in the example to match real use: 1. Rename the USB subnodes from "pci" to "usb", 2. Update the "phys" property. Signed-off-by: Geert Uytterhoeven Signed-off-by: Bjorn Helgaas Acked-by: Sergei Shtylyov Acked-by: Rob Herring Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 9ffd986c6e4e59c11857cbc78e4217e9569f3725 Author: Wanpeng Li Date: Thu Oct 19 06:47:56 2017 -0700 KVM: X86: #GP when guest attempts to write MCi_STATUS register w/o 0 Both Intel SDM and AMD APM mentioned that MCi_STATUS, when the register is implemented, this register can be cleared by explicitly writing 0s to this register. Writing 1s to this register will cause a general-protection exception. The mce is emulated in qemu, so just the guest attempts to write 1 to this register should cause a #GP, this patch does it. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Jim Mattson Signed-off-by: Wanpeng Li Reviewed-by: Jim Mattson Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 3321eafd2a79f15126ebaa82f1b5d7fce89c02cb Author: Bjorn Helgaas Date: Fri Oct 20 08:48:06 2017 -0500 PCI/portdrv: Factor out Interrupt Message Number lookup Factor out Interrupt Message Number lookup from the MSI/MSI-X interrupt setup. One side effect is that we only have to check once to see if we have enough vectors for all the services. No functional change intended. Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig drivers/pci/pcie/portdrv_core.c | 110 ++++++++++++++++++++++------------------ 1 file changed, 62 insertions(+), 48 deletions(-) commit 61f1dd9099aba56b7e6e3c3c4b9ad13199bba06e Author: Wanpeng Li Date: Wed Oct 18 16:02:19 2017 -0700 KVM: VMX: Fix VPID capability detection In my setup, EPT is not exposed to L1, the VPID capability is exposed and can be observed by vmxcap tool in L1: INVVPID supported yes Individual-address INVVPID yes Single-context INVVPID yes All-context INVVPID yes Single-context-retaining-globals INVVPID yes However, the module parameter of VPID observed in L1 is always N, the cpu_has_vmx_invvpid() check in L1 KVM fails since vmx_capability.vpid is 0 and it is not read from MSR due to EPT is not exposed. The VPID can be used to tag linear mappings when EPT is not enabled. However, current logic just detects VPID capability if EPT is enabled, this patch fixes it. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Jim Mattson Signed-off-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 575b3a2cb439b03fd603ea77c73c76f3ed237596 Author: Wanpeng Li Date: Thu Oct 19 07:00:34 2017 +0800 KVM: nVMX: Fix EPT switching advertising I can use vmxcap tool to observe "EPTP Switching yes" even if EPT is not exposed to L1. EPT switching is advertised unconditionally since it is emulated, however, it can be treated as an extended feature for EPT and it should not be advertised if EPT itself is not exposed. This patch fixes it. Reviewed-by: David Hildenbrand Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Jim Mattson Signed-off-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8ff0f72371709889349a706e19bb38d9f71b1669 Author: Robin Murphy Date: Wed Oct 18 15:04:28 2017 +0100 iommu/arm-smmu-v3: Use burst-polling for sync completion While CMD_SYNC is unlikely to complete immediately such that we never go round the polling loop, with a lightly-loaded queue it may still do so long before the delay period is up. If we have no better completion notifier, use similar logic as we have for SMMUv2 to spin a number of times before each backoff, so that we have more chance of catching syncs which complete relatively quickly and avoid delaying unnecessarily. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a529ea19aadb7a3bbcce3335ed4671adbe275b22 Author: Will Deacon Date: Thu Oct 19 16:49:30 2017 +0100 iommu/arm-smmu-v3: Consolidate identical timeouts We have separate (identical) timeout values for polling for a queue to drain and waiting for an MSI to signal CMD_SYNC completion. In reality, we only wait for the command queue to drain if we're waiting on a sync, so just merged these two timeouts into a single constant. Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 49806599c31d77b1050022aeb3da3051cd9f85f6 Author: Will Deacon Date: Thu Oct 19 16:41:53 2017 +0100 iommu/arm-smmu-v3: Split arm_smmu_cmdq_issue_sync in half arm_smmu_cmdq_issue_sync is a little unwieldy now that it supports both MSI and event-based polling, so split it into two functions to make things easier to follow. Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 47 +++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 12 deletions(-) commit 37de98f8f1cf330918b242cd3ce13751857243a6 Author: Robin Murphy Date: Wed Oct 18 15:04:26 2017 +0100 iommu/arm-smmu-v3: Use CMD_SYNC completion MSI As an IRQ, the CMD_SYNC interrupt is not particularly useful, not least because we often need to wait for sync completion within someone else's IRQ handler anyway. However, when the SMMU is both coherent and supports MSIs, we can have a lot more fun by not using it as an interrupt at all. Following the example suggested in the architecture and using a write targeting normal memory, we can let callers wait on a status variable outside the lock instead of having to stall the entire queue or even touch MMIO registers. Since multiple sync commands are guaranteed to complete in order, a simple incrementing sequence count is all we need to unambiguously support any realistic number of overlapping waiters. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 51 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) commit dce032a15ced2ee9fa58ed7b52c492795d096a40 Author: Robin Murphy Date: Thu Aug 31 14:44:26 2017 +0100 iommu/arm-smmu-v3: Forget about cmdq-sync interrupt The cmdq-sync interrupt is never going to be particularly useful, since for stage 1 DMA at least we'll often need to wait for sync completion within someone else's IRQ handler, thus have to implement polling anyway. Beyond that, the overhead of taking an interrupt, then still having to grovel around in the queue to figure out *which* sync command completed, doesn't seem much more attractive than simple polling either. Furthermore, if an implementation both has wired interrupts and supports MSIs, then we don't want to be taking the IRQ unnecessarily if we're using the MSI write to update memory. Let's just make life simpler by not even bothering to claim it in the first place. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) commit 2f657add07a8f758e41076820157eeca1df22b79 Author: Robin Murphy Date: Thu Aug 31 14:44:25 2017 +0100 iommu/arm-smmu-v3: Specialise CMD_SYNC handling CMD_SYNC already has a bit of special treatment here and there, but as we're about to extend it with more functionality for completing outside the CMDQ lock, things are going to get rather messy if we keep trying to cram everything into a single generic command interface. Instead, let's break out the issuing of CMD_SYNC into its own specific helper where upcoming changes will have room to breathe. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 52 +++++++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 18 deletions(-) commit 2a22baa2d17f37f9bd86febcb69f10dbe6792b58 Author: Robin Murphy Date: Mon Sep 25 14:55:40 2017 +0100 iommu/arm-smmu-v3: Correct COHACC override message Slightly confusingly, when reporting a mismatch of the ID register value, we still refer to the IORT COHACC override flag as the "dma-coherent property" if we booted with ACPI. Update the message to be firmware-agnostic in line with SMMUv2. Acked-by: Lorenzo Pieralisi Reported-by: Will Deacon Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cff86fd2b960f9bedc67771c24a73d7dc32048d Author: Yisheng Xie Date: Thu Sep 21 20:36:07 2017 +0800 iommu/arm-smmu-v3: Avoid ILLEGAL setting of STE.S1STALLD and CD.S According to Spec, it is ILLEGAL to set STE.S1STALLD if STALL_MODEL is not 0b00, which means we should not disable stall mode if stall or terminate mode is not configuable. Meanwhile, it is also ILLEGAL when STALL_MODEL==0b10 && CD.S==0 which means if stall mode is force we should always set CD.S. As Jean-Philippe's suggestion, this patch introduce a feature bit ARM_SMMU_FEAT_STALL_FORCE, which means smmu only supports stall force. Therefore, we can avoid the ILLEGAL setting of STE.S1STALLD.by checking ARM_SMMU_FEAT_STALL_FORCE. This patch keeps the ARM_SMMU_FEAT_STALLS as the meaning of stall supported (force or configuable) to easy to expand the future function, i.e. we can only use ARM_SMMU_FEAT_STALLS to check whether we should register fault handle or enable master can_stall, etc to supporte platform SVM. The feature bit, STE.S1STALLD and CD.S setting will be like: STALL_MODEL FEATURE S1STALLD CD.S 0b00 ARM_SMMU_FEAT_STALLS 0b1 0b0 0b01 !ARM_SMMU_FEAT_STALLS && !ARM_SMMU_FEAT_STALL_FORCE 0b0 0b0 0b10 ARM_SMMU_FEAT_STALLS && ARM_SMMU_FEAT_STALL_FORCE 0b0 0b1 after apply this patch. Signed-off-by: Yisheng Xie Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 74f55d34414c866dbf3a69e28a2f963abe61ca58 Author: Feng Kan Date: Wed Oct 11 15:08:39 2017 -0700 iommu/arm-smmu: Enable bypass transaction caching for ARM SMMU 500 The ARM SMMU identity mapping performance was poor compared with the DMA mode. It was found that enable caching would restore the performance back to normal. The S2CRB_TLBEN bit in the ACR register would allow for caching of the stream to context register bypass transaction information. Reviewed-by: Robin Murphy Signed-off-by: Feng Kan Signed-off-by: Will Deacon drivers/iommu/arm-smmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 704c038255d44e821a05835c9bf8c8d0393a4777 Author: Will Deacon Date: Thu Oct 5 16:49:37 2017 +0100 iommu/arm-smmu-v3: Ensure we sync STE when only changing config field The SMMUv3 architecture permits caching of data structures deemed to be "reachable" by the SMU, which includes STEs marked as invalid. When transitioning an STE to a bypass/fault configuration at init or detach time, we mistakenly elide the CMDQ_OP_CFGI_STE operation in some cases, therefore potentially leaving the old STE state cached in the SMMU. This patch fixes the problem by ensuring that we perform the CMDQ_OP_CFGI_STE operation irrespective of the validity of the previous STE. Reviewed-by: Robin Murphy Reported-by: Eric Auger Reviewed-by: Eric Auger Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6948d4a7e11b37c83df9b508bbf725512d82a77b Author: Robin Murphy Date: Fri Sep 22 15:04:00 2017 +0100 iommu/arm-smmu: Remove ACPICA workarounds Now that the kernel headers have synced with the relevant upstream ACPICA updates, it's time to clean up the temporary local definitions. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon drivers/iommu/arm-smmu-v3.c | 11 +---------- drivers/iommu/arm-smmu.c | 8 -------- 2 files changed, 1 insertion(+), 18 deletions(-) commit 2ec16150179888b81717d1d3ce84e634f4736af2 Author: Jeffy Chen Date: Fri Oct 20 20:01:01 2017 +0800 driver core: Move device_links_purge() after bus_remove_device() The current ordering of code in device_del() triggers a WARN_ON() in device_links_purge(), because of an unexpected link status. The device_links_unbind_consumers() call in device_release_driver() has to take place before device_links_purge() for the status of all links to be correct, so move the device_links_purge() call in device_del() after the invocation of bus_remove_device() which calls device_release_driver(). Fixes: 9ed9895370ae (driver core: Functional dependencies tracking support) Signed-off-by: Jeffy Chen Reviewed-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman drivers/base/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3997fb74846f35d0364c5e88e54bc9b166d5a1bc Author: Sergei Shtylyov Date: Sun Aug 20 21:06:00 2017 +0200 i2c: mux: reg: use of_property_read_bool() Use more compact of_property_read_bool() calls for the boolean properties instead of of_find_property() calls in i2c_mux_reg_probe_dt(). Signed-off-by: Sergei Shtylyov Signed-off-by: Peter Rosin drivers/i2c/muxes/i2c-mux-reg.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 82d8ba717ccb54dd803624db044f351b2a54d000 Author: Prasad Sodagudi Date: Tue Oct 10 00:34:56 2017 -0700 arch_topology: Fix section miss match warning due to free_raw_capacity() Remove the __init annotation from free_raw_capacity() to avoid the following warning. The function init_cpu_capacity_callback() references the function __init free_raw_capacity(). WARNING: vmlinux.o(.text+0x425cc0): Section mismatch in reference from the function init_cpu_capacity_callback() to the function .init.text:free_raw_capacity(). Signed-off-by: Prasad Sodagudi Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman drivers/base/arch_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75f98b7ab748a6f604d667d84ec46acc452fdfc1 Author: Kees Cook Date: Fri Oct 20 06:31:49 2017 -0700 lkdtm: Constify the crashtypes table Since nothing in the crashtypes table ever changes, mark it const. Adds some missing "static" markings as well. Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/misc/lkdtm_core.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 31c5c870a1120960ec4157e6a5ea34686c77f6b8 Author: Kees Cook Date: Fri Oct 20 06:31:27 2017 -0700 lkdtm: Convert from jprobe to kprobe The jprobe subsystem is being removed, so convert to using kprobe instead. Cc: Masami Hiramatsu Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/misc/lkdtm_core.c | 154 ++++++++++++++-------------------------------- 1 file changed, 45 insertions(+), 109 deletions(-) commit f4f89f23e69d7da8b037a3128dd24ab1771516ba Author: Arvind Yadav Date: Mon Sep 25 12:55:28 2017 +0530 driver-core: pr_err() strings should end with newlines pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/base/test/test_async_driver_probe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8caef1fa9176c4789b74c806434517b3adf7544a Author: Martin Blumenstingl Date: Mon Oct 9 15:26:41 2017 +0200 nvmem: add a driver for the Amlogic Meson6/Meson8/Meson8b SoCs This adds a driver to access the efuse on Amlogic Meson6, Meson8 and Meson8b SoCs. These SoCs are accessing the efuse IP block directly through the registers in the "secbus" region. This makes it different from the Meson GX efuse driver which uses the "secure monitor" firmware to access the efuse. The efuse on Meson6 can only read one byte at a time, while the efuse on Meson8 and Meson8b always reads 4 bytes at a time. The new driver supports both, but due to lack of hardware Meson6 support was not tested. The hardware also supports writing. However, this is currently not supported by the driver. Signed-off-by: Martin Blumenstingl Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/Kconfig | 10 ++ drivers/nvmem/Makefile | 2 + drivers/nvmem/meson-mx-efuse.c | 265 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 277 insertions(+) commit 9593ad32b8be82f3abd6002336a93c405361b9fd Author: Martin Blumenstingl Date: Mon Oct 9 15:26:40 2017 +0200 nvmem: meson-efuse: indicate that this driver is only for Meson GX SoCs The current Amlogic Meson eFuse driver only supports the 64-bit SoCs (GXBB and newer). Older SoCs cannot be supported by the same driver because they do not use the meson secure monitor firmware to access the hardware. Signed-off-by: Martin Blumenstingl Signed-off-by: Srinivas Kandagatla Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt | 2 +- drivers/nvmem/Kconfig | 4 ++-- drivers/nvmem/meson-efuse.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit 41e043498978ad3c8d5a70613f41195faf09663f Author: Martin Blumenstingl Date: Mon Oct 9 15:26:39 2017 +0200 dt-bindings: nvmem: Describe the Amlogic Meson6/Meson8/Meson8b efuse Amlogic Meson6, Meson8 and Meson8b SoCs have an efuse which contains calibration data from the factory (for the internal temperature sensor and some CVBS connector settings). Some manufacturers also store the MAC address or serial number in the efuse. This documents the devicetree bindings for the efuse on these SoCs. Signed-off-by: Martin Blumenstingl Signed-off-by: Srinivas Kandagatla Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman .../bindings/nvmem/amlogic-meson-mx-efuse.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 7a15cf2af480440bacf2fc0010f1fa1a1f3980d6 Author: Romain Perier Date: Mon Oct 9 15:26:38 2017 +0200 nvmem: rockchip: add support for RK3368 This adds the necessary function for handling support on RK3368 SoCs Signed-off-by: Romain Perier 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 33d426a957dfc9bea13c4e05d0319b1d0a854586 Author: Stephen Hemminger Date: Thu Oct 5 17:35:05 2017 -0700 vmbus: initialize reserved fields in messages Make sure and initialize reserved fields in messages to host, rather than passing stack junk. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman drivers/hv/channel.c | 2 ++ 1 file changed, 2 insertions(+) commit ad146e37d2a2f1cbf16bf4c7bbb9362f009a1480 Merge: f7f84fd a75dc63 Author: Greg Kroah-Hartman Date: Fri Oct 20 15:24:34 2017 +0200 Merge tag 'vme-next-4.14-rc4' of https://gitlab.collabora.com/martyn/linux into char-misc-next Martyn writes: VME Subsystem changes for master v4.14-rc4: - Corrections across the VME subsystem to better align with the preferred kernel coding style. commit 051e1674a5bfe971b31305851a511eb5fbf4f9aa Merge: ff0f2ce 8843797 Author: Linus Walleij Date: Fri Oct 20 15:20:18 2017 +0200 Merge tag 'sh-pfc-for-v4.15-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.15 (take two) - Add Audio, HSCIF, I2C, and INTC-EX pin groups on R-Car H3 ES2.0, - Add Audio and PWM pin groups on R-Car D3, - Add support for RZ/A1M and RZ/A1L, - Add INTC-EX pin groups on R-Car M3-W, - Add SDHI voltage switching on RZ/G1E, - Make bias control and IOCTRL support more generic, - Add suspend/resume support for R-Car Gen3, - Small fixes and cleanups. commit f7f84fded6c461d58ca73c85f0cb23a036717110 Author: Arvind Yadav Date: Mon Sep 25 12:52:11 2017 +0530 binder: pr_err() strings should end with newlines pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de7bbe3d1baea2b28991a514e596f47e885f92d6 Author: Sherry Yang Date: Fri Oct 6 16:12:05 2017 -0400 android: binder: Change binder_shrinker to static binder_shrinker struct is not used anywhere outside of binder_alloc.c and should be static. Acked-by: Arve Hjønnevåg Signed-off-by: Sherry Yang Signed-off-by: Greg Kroah-Hartman drivers/android/binder_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ae33b9c05dd049b96218930c104e0ce809363b6 Author: Sherry Yang Date: Sat Sep 16 01:11:56 2017 -0400 android: binder: Remove unused vma argument The vma argument in update_page_range is no longer used after 74310e06 ("android: binder: Move buffer out of area shared with user space"), since mmap_handler no longer calls update_page_range with a vma. Acked-by: Arve Hjønnevåg Signed-off-by: Sherry Yang Signed-off-by: Greg Kroah-Hartman drivers/android/binder_alloc.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit c932806c65f3b6712133f6433f9b7c31a6ca0d0b Author: Bhumika Goyal Date: Sun Oct 15 22:04:23 2017 +0100 parport: make parport_ip32_ops const and __initconst Make this const as it is only used during a copy operation. This usage is inside init function and the structure is not referenced after initialisation, so make it __initconst too. Signed-off-by: Bhumika Goyal Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/parport/parport_ip32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 421eb12ead322d66b469b8bf658eca2213f409f5 Author: Steven Rostedt (VMware) Date: Fri Oct 13 09:58:11 2017 -0400 tracing, mei: Remove unused trace event mei_pci_cfg_write Commit a96c548291 ("mei: trace pci configuration space io") added the trace event mei_pci_cfg_write but never used it. As trace events that are defined take up space for data structures and functions created for them, it is a waste of memory to have one defined but not used. Remove this trace event. Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/mei-trace.c | 1 - drivers/misc/mei/mei-trace.h | 19 ------------------- 2 files changed, 20 deletions(-) commit 35c3f85f5ab9cf6e5f0fd268485829a1122f7546 Author: Kees Cook Date: Mon Oct 16 16:27:53 2017 -0700 pcmcia: m32r: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Andrew Morton Cc: Sudip Mukherjee Cc: linux-pcmcia@lists.infradead.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/pcmcia/m32r_cfc.c | 7 ++----- drivers/pcmcia/m32r_pcc.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) commit 9577924bb33bc76c7a54c6ebde345f8e4de31a4e Author: Kees Cook Date: Mon Oct 16 16:28:26 2017 -0700 char: pcmcia: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Harald Welte Cc: "David S. Miller" Cc: Jarod Wilson Cc: Stephen Hemminger Cc: Johannes Berg Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/char/pcmcia/cm4000_cs.c | 6 +++--- drivers/char/pcmcia/cm4040_cs.c | 7 +++---- drivers/char/pcmcia/synclink_cs.c | 8 ++++---- 3 files changed, 10 insertions(+), 11 deletions(-) commit b8acfd7c0f88c49dc0089cd40e02040187160f6a Author: Bjorn Helgaas Date: Thu Oct 19 16:09:26 2017 -0500 PCI/portdrv: Consolidate comments Consolidate some repetitive comments so we can see the code better. No functional change. Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig drivers/pci/pcie/portdrv_core.c | 63 ++++++----------------------------------- 1 file changed, 9 insertions(+), 54 deletions(-) commit 24f0d316fd14c8e61592f580e0075dd3433fde40 Author: Leo Yan Date: Tue Oct 10 14:32:13 2017 -0600 doc: coresight: correct usage for disabling idle states In the coresight CPU debug document it suggests to use 'echo' command to set latency request to /dev/cpu_dma_latency so can disable all CPU idle states, but in fact this doesn't work. This is because when the command 'echo' exits, it releases the device node's file descriptor and the kernel release function removes the QoS constraint; finally when the command 'echo' finished there have no constraint imposed on cpu_dma_latency. This patch changes to use 'exec' to access '/dev/cpu_dma_latency', the command 'exec' can avoid the file descriptor to be closed so we can keep the constraint on cpu_dma_latency. This patch also adds the info for reference docs for PM QoS and cpuidle sysfs. Cc: Jonathan Corbet Cc: Sudeep Holla Reported-by: Kim Phillips Suggested-by: Mathieu Poirier Signed-off-by: Leo Yan Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman Documentation/trace/coresight-cpu-debug.txt | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 0bbb194c0c33c251ac3d33f46c8fd045d82350e5 Author: Suzuki K Poulose Date: Tue Oct 10 14:32:12 2017 -0600 coresight: Extend the PIDR mask to cover relevant bits in PIDR2 As per coresight standards, PIDR2 register has the following format : [2-0] - JEP106_bits6to4 [3] - JEDEC, designer ID is specified by JEDEC. However some of the drivers only use mask of 0x3 for the PIDR2 leaving bits [3-2] unchecked, which could potentially match the component for a different device altogether. This patch fixes the mask and the corresponding id bits for the existing devices. Cc: Mathieu Poirier Cc: Linus Walleij Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman .../coresight/coresight-dynamic-replicator.c | 4 ++-- drivers/hwtracing/coresight/coresight-etb10.c | 4 ++-- drivers/hwtracing/coresight/coresight-etm3x.c | 24 +++++++++++----------- drivers/hwtracing/coresight/coresight-funnel.c | 4 ++-- drivers/hwtracing/coresight/coresight-stm.c | 8 ++++---- drivers/hwtracing/coresight/coresight-tmc.c | 4 ++-- drivers/hwtracing/coresight/coresight-tpiu.c | 4 ++-- 7 files changed, 26 insertions(+), 26 deletions(-) commit 5e5c79b2e1283881e6015031c28e4a3fad1f7a87 Merge: aec72f3 3c798a4 Author: Kalle Valo Date: Fri Oct 20 15:50:20 2017 +0300 Merge tag 'iwlwifi-next-for-kalle-2017-10-18' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Second batch of iwlwifi patches for 4.15 * Allocate reorder buffer dynamically to save memory; * Fix a FW dump problem in the A000 family; * Fix for a statistics gathering issue (v2); * Sort the list of 9000 devices to make it easier to find entries; * A couple of cleanups in the FW dump code; * Remove some unnecessary variables and fields and calculations; commit 7f6c756a04f9b3a780e613cbb4159ef00fa870ec Author: Aastha Gupta Date: Thu Oct 19 00:19:46 2017 +0530 staging: lustre: lllite: fix multi line comments style This patch fixes checkpatch.pl warnings: WARNING: Block comments should align the * on each line WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/file.c | 4 ++-- drivers/staging/lustre/lustre/llite/llite_internal.h | 5 +++-- drivers/staging/lustre/lustre/llite/rw.c | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) commit 65a20cc1410931571e6ec92b40f6ab6faa753bc5 Author: Aastha Gupta Date: Thu Oct 19 00:19:45 2017 +0530 staging: lustre: llite: fix coding style for error messages The "DFID" part should be added to the same line as the rest of the message, to match current coding style. Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dir.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 9f11748c525fb39910838fba1e66f9d92c651209 Author: Aastha Gupta Date: Thu Oct 19 00:19:44 2017 +0530 staging: lustre: llite: fix lines over 80 characters in llite files This fixes checkpatch.pl warning: WARNING: line over 80 characters Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/dcache.c | 9 ++++--- drivers/staging/lustre/lustre/llite/dir.c | 9 ++++--- drivers/staging/lustre/lustre/llite/file.c | 9 ++++--- .../staging/lustre/lustre/llite/llite_internal.h | 13 ++++++---- drivers/staging/lustre/lustre/llite/llite_lib.c | 29 ++++++++++++++-------- drivers/staging/lustre/lustre/llite/llite_mmap.c | 3 ++- drivers/staging/lustre/lustre/llite/llite_nfs.c | 3 ++- drivers/staging/lustre/lustre/llite/namei.c | 15 +++++++---- drivers/staging/lustre/lustre/llite/rw.c | 14 +++++++---- drivers/staging/lustre/lustre/llite/statahead.c | 3 ++- drivers/staging/lustre/lustre/llite/super25.c | 3 ++- drivers/staging/lustre/lustre/llite/xattr_cache.c | 3 ++- 12 files changed, 74 insertions(+), 39 deletions(-) commit f9e8f9bf3b4a9d6c92b7dada82714367816da716 Author: Aastha Gupta Date: Thu Oct 19 00:19:43 2017 +0530 staging: lustre: ldlm: fix lines over 80 characters in ldlm files This patch fixes checkpatch.pl warning: WARNING: line over 80 characters Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 3 +- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 6 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 33 +++++++++++------ drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 6 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 6 ++-- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 42 +++++++++++++--------- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 3 +- 8 files changed, 65 insertions(+), 36 deletions(-) commit 7b33d0a1fa1640996e90416340d41b7ec402fa2d Author: Aastha Gupta Date: Thu Oct 19 00:19:42 2017 +0530 staging: lustre: fld: fix line over 80 characters This patch fixes checkpatch.pl warning: WARNING: line over 80 characters Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fld/fld_request.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 97cdeb67c8bae96d2cc160aabcdc65eb5f610ea4 Author: Aastha Gupta Date: Thu Oct 19 00:19:41 2017 +0530 staging: lustre: fid: fix line over 80 characters This patch fixes checkpatch.pl warning: WARNING: line over 80 characters Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/fid/fid_request.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b380de05a8573a55c590bfd2dabe15da74c03d04 Author: Aastha Gupta Date: Thu Oct 19 00:19:40 2017 +0530 staging: lustre: drop macro that has no uses This patch removes DLUBUF and PLUBUF macro, both of which have no users. Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lu_object.h | 2 -- 1 file changed, 2 deletions(-) commit 3dfbe9ea54d1dc283301adac8cef06a393d2bcae Author: Aastha Gupta Date: Thu Oct 19 00:12:58 2017 +0530 staging: rtl8188eu: use pr_cont() Using 'printk("\n")' is not preferred anymore as printks without KERN_CONT are emitted on a new line and KERN_CONT is required to continue lines so use pr_cont. Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtw_debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d0d239148ea6508f94a4078d990ab56f914f90af Author: Aastha Gupta Date: Thu Oct 19 00:12:57 2017 +0530 staging: rtl8188eu: add spaces around '|' Fixes 'use spaces around '|' ' as reported by checkpatch.pl Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/ieee80211.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fa7eb709cb559e8721c065ee822e610947b43430 Author: Aastha Gupta Date: Thu Oct 19 00:12:56 2017 +0530 staging: rtl8188eu: prefer using BIT macro Fixes checkpatch.pl: Use BIT(x) instead of using (1< Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/ieee80211.h | 78 +++++++++++++-------------- 1 file changed, 39 insertions(+), 39 deletions(-) commit b2b41718b6b498754ccc6b2dd993d76f6c33ac93 Author: Andrii Vladyka Date: Wed Oct 18 16:23:45 2017 +0300 staging: gdm724x: fix return codes in gdm_lte fix return codes in gdm_lte in gdm724x driver Signed-off-by: Andrii Vladyka Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_lte.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit d67dc3a40278569c2c6f0e6acddf0bfe06af9e6a Author: Andrii Vladyka Date: Wed Oct 18 16:23:44 2017 +0300 staging: gdm724x: check for skb->len in gdm_lte_emulate_arp check for skb->len in gdm_lte_emulate_arp in gdm724x driver Signed-off-by: Andrii Vladyka Signed-off-by: Greg Kroah-Hartman drivers/staging/gdm724x/gdm_lte.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3de1abef24a221880614e387e150c1fc7004bc23 Author: Kees Cook Date: Wed Oct 18 13:23:07 2017 -0700 staging/irda-usb: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This requires adding a pointer to hold the timer's target URB, as there won't be a way to pass this in the future. Cc: Samuel Ortiz Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/staging/irda/drivers/irda-usb.c | 20 ++++++-------------- drivers/staging/irda/drivers/irda-usb.h | 1 + 2 files changed, 7 insertions(+), 14 deletions(-) commit 5eb54a9997596ce1192e3416ccacc9acd17c34ef Author: Kees Cook Date: Wed Oct 18 13:23:31 2017 -0700 staging: wlan-ng: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Greg Kroah-Hartman Cc: Sergio Paracuellos Cc: Adrien Descamps Cc: Thibaut SAUTEREAU Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/hfa384x_usb.c | 29 +++++++++++++---------------- drivers/staging/wlan-ng/prism2mgmt.h | 2 +- drivers/staging/wlan-ng/prism2sta.c | 4 ++-- 3 files changed, 16 insertions(+), 19 deletions(-) commit 380da49da235e8f2bda3bea16ef83eeffc1c9a48 Author: Kees Cook Date: Wed Oct 18 13:23:43 2017 -0700 staging/irda/bfin_sir: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Samuel Ortiz Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/staging/irda/drivers/bfin_sir.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit a83f4340dc900a875c9ed0cb58bfa2d930a8eb66 Author: Kees Cook Date: Wed Oct 18 13:24:13 2017 -0700 staging/irda/net: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Samuel Ortiz Cc: Stephen Hemminger Cc: Johannes Berg Cc: Ingo Molnar Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman .../staging/irda/include/net/irda/irlmp_event.h | 6 +-- drivers/staging/irda/include/net/irda/timer.h | 11 ++--- drivers/staging/irda/net/af_irda.c | 7 ++- drivers/staging/irda/net/ircomm/ircomm_tty.c | 2 +- .../staging/irda/net/ircomm/ircomm_tty_attach.c | 8 ++-- drivers/staging/irda/net/irda_device.c | 10 ++-- drivers/staging/irda/net/iriap.c | 10 ++-- drivers/staging/irda/net/irlan/irlan_client.c | 6 +-- drivers/staging/irda/net/irlan/irlan_common.c | 4 +- drivers/staging/irda/net/irlap.c | 16 +++---- drivers/staging/irda/net/irlap_event.c | 6 +-- drivers/staging/irda/net/irlmp.c | 8 ++-- drivers/staging/irda/net/irlmp_event.c | 10 ++-- drivers/staging/irda/net/irttp.c | 11 ++--- drivers/staging/irda/net/timer.c | 54 +++++++++++----------- 15 files changed, 79 insertions(+), 90 deletions(-) commit 7f9ad2ace17a3521a80831208d431170ef71591f Merge: aec72f3 f66e448 Author: David S. Miller Date: Fri Oct 20 13:33:00 2017 +0100 Merge branch 'bpf-lsm-hooks' Chenbo Feng says: ==================== bpf: security: New file mode and LSM hooks for eBPF object permission control Much like files and sockets, eBPF objects are accessed, controlled, and shared via a file descriptor (FD). Unlike files and sockets, the existing mechanism for eBPF object access control is very limited. Currently there are two options for granting accessing to eBPF operations: grant access to all processes, or only CAP_SYS_ADMIN processes. The CAP_SYS_ADMIN-only mode is not ideal because most users do not have this capability and granting a user CAP_SYS_ADMIN grants too many other security-sensitive permissions. It also unnecessarily allows all CAP_SYS_ADMIN processes access to eBPF functionality. Allowing all processes to access to eBPF objects is also undesirable since it has potential to allow unprivileged processes to consume kernel memory, and opens up attack surface to the kernel. Adding LSM hooks maintains the status quo for systems which do not use an LSM, preserving compatibility with userspace, while allowing security modules to choose how best to handle permissions on eBPF objects. Here is a possible use case for the lsm hooks with selinux module: The network-control daemon (netd) creates and loads an eBPF object for network packet filtering and analysis. It passes the object FD to an unprivileged network monitor app (netmonitor), which is not allowed to create, modify or load eBPF objects, but is allowed to read the traffic stats from the map. Selinux could use these hooks to grant the following permissions: allow netd self:bpf_map { create read write}; allow netmonitor netd:fd use; allow netmonitor netd:bpf_map read; In this patch series, A file mode is added to bpf map to store the accessing mode. With this file mode flags, the map can be obtained read only, write only or read and write. With the help of this file mode, several security hooks can be added to the eBPF syscall implementations to do permissions checks. These LSM hooks are mainly focused on checking the process privileges before it obtains the fd for a specific bpf object. No matter from a file location or from a eBPF id. Besides that, a general check hook is also implemented at the start of bpf syscalls so that each security module can have their own implementation on the reset of bpf object related functionalities. In order to store the ownership and security information about eBPF maps, a security field pointer is added to the struct bpf_map. And the last two patch set are implementation of selinux check on these hooks introduced, plus an additional check when eBPF object is passed between processes using unix socket as well as binder IPC. Change since V1: - Whitelist the new bpf flags in the map allocate check. - Added bpf selftest for the new flags. - Added two new security hooks for copying the security information from the bpf object security struct to file security struct - Simplified the checking action when bpf fd is passed between processes. Change since V2: - Fixed the line break problem for map flags check - Fixed the typo in selinux check of file mode. - Merge bpf_map and bpf_prog into one selinux class - Added bpf_type and bpf_sid into file security struct to store the security information when generate fd. - Add the hook to bpf_map_new_fd and bpf_prog_new_fd. Change since V3: - Return the actual error from security check instead of -EPERM - Move the hooks into anon_inode_getfd() to avoid get file again after bpf object file is installed with fd. - Removed the bpf_sid field inside file_scerity_struct to reduce the cache size. Change since V4: - Rename bpf av prog_use to prog_run to distinguish from fd_use. - Remove the bpf_type field inside file_scerity_struct and use bpf fops to indentify bpf object instead. Change since v5: - Fixed the incorrect selinux class name for SECCLASS_BPF Change since v7: - Fixed the build error caused by xt_bpf module. - Add flags check for bpf_obj_get() and bpf_map_get_fd_by_id() to make it uapi-wise. - Add the flags field to the bpf_obj_get_user function when BPF_SYSCALL is not configured. ==================== Signed-off-by: David S. Miller commit f66e448cfda021b0bcd884f26709796fe19c7cc1 Author: Chenbo Feng Date: Wed Oct 18 13:00:26 2017 -0700 selinux: bpf: Add addtional check for bpf object file receive Introduce a bpf object related check when sending and receiving files through unix domain socket as well as binder. It checks if the receiving process have privilege to read/write the bpf map or use the bpf program. This check is necessary because the bpf maps and programs are using a anonymous inode as their shared inode so the normal way of checking the files and sockets when passing between processes cannot work properly on eBPF object. This check only works when the BPF_SYSCALL is configured. Signed-off-by: Chenbo Feng Acked-by: Stephen Smalley Reviewed-by: James Morris Signed-off-by: David S. Miller include/linux/bpf.h | 3 +++ kernel/bpf/syscall.c | 4 ++-- security/selinux/hooks.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 2 deletions(-) commit ec27c3568a34c7fe5fcf4ac0a354eda77687f7eb Author: Chenbo Feng Date: Wed Oct 18 13:00:25 2017 -0700 selinux: bpf: Add selinux check for eBPF syscall operations Implement the actual checks introduced to eBPF related syscalls. This implementation use the security field inside bpf object to store a sid that identify the bpf object. And when processes try to access the object, selinux will check if processes have the right privileges. The creation of eBPF object are also checked at the general bpf check hook and new cmd introduced to eBPF domain can also be checked there. Signed-off-by: Chenbo Feng Acked-by: Alexei Starovoitov Reviewed-by: James Morris Signed-off-by: David S. Miller security/selinux/hooks.c | 111 ++++++++++++++++++++++++++++++++++++ security/selinux/include/classmap.h | 2 + security/selinux/include/objsec.h | 4 ++ 3 files changed, 117 insertions(+) commit afdb09c720b62b8090584c11151d856df330e57d Author: Chenbo Feng Date: Wed Oct 18 13:00:24 2017 -0700 security: bpf: Add LSM hooks for bpf object related syscall Introduce several LSM hooks for the syscalls that will allow the userspace to access to eBPF object such as eBPF programs and eBPF maps. The security check is aimed to enforce a per object security protection for eBPF object so only processes with the right priviliges can read/write to a specific map or use a specific eBPF program. Besides that, a general security hook is added before the multiplexer of bpf syscall to check the cmd and the attribute used for the command. The actual security module can decide which command need to be checked and how the cmd should be checked. Signed-off-by: Chenbo Feng Acked-by: James Morris Signed-off-by: David S. Miller include/linux/bpf.h | 6 ++++++ include/linux/lsm_hooks.h | 54 +++++++++++++++++++++++++++++++++++++++++++++++ include/linux/security.h | 45 +++++++++++++++++++++++++++++++++++++++ kernel/bpf/syscall.c | 34 +++++++++++++++++++++++++++-- security/security.c | 32 ++++++++++++++++++++++++++++ 5 files changed, 169 insertions(+), 2 deletions(-) commit e043325b308745d6968673e7b53080bd7cc39f08 Author: Chenbo Feng Date: Wed Oct 18 13:00:23 2017 -0700 bpf: Add tests for eBPF file mode Two related tests are added into bpf selftest to test read only map and write only map. The tests verified the read only and write only flags are working on hash maps. Signed-off-by: Chenbo Feng Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_maps.c | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 6e71b04a82248ccf13a94b85cbc674a9fefe53f5 Author: Chenbo Feng Date: Wed Oct 18 13:00:22 2017 -0700 bpf: Add file mode configuration into bpf maps Introduce the map read/write flags to the eBPF syscalls that returns the map fd. The flags is used to set up the file mode when construct a new file descriptor for bpf maps. To not break the backward capability, the f_flags is set to O_RDWR if the flag passed by syscall is 0. Otherwise it should be O_RDONLY or O_WRONLY. When the userspace want to modify or read the map content, it will check the file mode to see if it is allowed to make the change. Signed-off-by: Chenbo Feng Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf.h | 8 +++-- include/uapi/linux/bpf.h | 6 ++++ kernel/bpf/arraymap.c | 6 +++- kernel/bpf/devmap.c | 5 ++- kernel/bpf/hashtab.c | 5 +-- kernel/bpf/inode.c | 15 ++++++--- kernel/bpf/lpm_trie.c | 3 +- kernel/bpf/sockmap.c | 5 ++- kernel/bpf/stackmap.c | 5 ++- kernel/bpf/syscall.c | 88 ++++++++++++++++++++++++++++++++++++++++++------ net/netfilter/xt_bpf.c | 2 +- 11 files changed, 122 insertions(+), 26 deletions(-) commit aec72f3392b1d598a979e89c4fdb131965ae0ab3 Author: Eric Dumazet Date: Wed Oct 18 12:12:09 2017 -0700 net-tun: fix panics at dismantle time syzkaller got crashes at dismantle time [1] It is not correct to test (tun->flags & IFF_NAPI) in tun_napi_disable() and tun_napi_del() : Each tun_file can have different mode, depending on how they were created. Similarly I have changed tun_get_user() and tun_poll_controller() to use the new tfile->napi_enabled boolean. [ 154.331360] BUG: unable to handle kernel NULL pointer dereference at (null) [ 154.339220] IP: [] hrtimer_active+0x26/0x60 [ 154.344983] PGD 0 [ 154.347009] Oops: 0000 [#1] SMP [ 154.350680] gsmi: Log Shutdown Reason 0x03 [ 154.379572] task: ffff994719150dc0 ti: ffff99475c0ae000 task.ti: ffff99475c0ae000 [ 154.387043] RIP: 0010:[] [] hrtimer_active+0x26/0x60 [ 154.395232] RSP: 0018:ffff99475c0afce8 EFLAGS: 00010246 [ 154.400542] RAX: ffff994754850ac0 RBX: ffff994753e65408 RCX: ffff994753e65388 [ 154.407666] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff994753e65408 [ 154.414790] RBP: ffff99475c0afce8 R08: 0000000000000000 R09: 0000000000000000 [ 154.421921] R10: ffff99475f6f5910 R11: 0000000000000001 R12: 0000000000000000 [ 154.429044] R13: ffff99417deab668 R14: ffff99417deaa780 R15: ffff99475f45dde0 [ 154.436174] FS: 0000000000000000(0000) GS:ffff994767a00000(0000) knlGS:0000000000000000 [ 154.444249] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 154.449986] CR2: 0000000000000000 CR3: 00000005a8a0e000 CR4: 0000000000022670 [ 154.457110] Stack: [ 154.459120] ffff99475c0afd28 ffffffff9634d614 1000000000000000 0000000000000000 [ 154.466598] ffffe54240000000 ffff994753e65408 ffff994753e653a8 ffff99417deab668 [ 154.474067] ffff99475c0afd48 ffffffff9634d6fd ffff99474c2be678 ffff994753e65398 [ 154.481537] Call Trace: [ 154.483985] [] hrtimer_try_to_cancel+0x24/0xf0 [ 154.490074] [] hrtimer_cancel+0x1d/0x30 [ 154.495563] [] napi_disable+0x3c/0x70 [ 154.500875] [] __tun_detach+0xd2/0x360 [ 154.506272] [] tun_chr_close+0x27/0x40 [ 154.511669] [] __fput+0xd6/0x1e0 [ 154.516548] [] ____fput+0xe/0x10 [ 154.521429] [] task_work_run+0x72/0x90 [ 154.526827] [] do_exit+0x317/0xb60 [ 154.531879] [] do_group_exit+0x3f/0xa0 [ 154.537275] [] SyS_exit_group+0x17/0x20 [ 154.542769] [] entry_SYSCALL_64_fastpath+0x12/0x17 Fixes: 943170998b20 ("net-tun: enable NAPI for TUN/TAP driver") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/tun.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 6eba87c781aaa02f6bf1b64df2f8b12833eee521 Author: David Ahern Date: Wed Oct 18 11:39:13 2017 -0700 net: ipv4: Change fib notifiers to take a fib_alias All of the notifier data (fib_info, tos, type and table id) are contained in the fib_alias. Pass it to the notifier instead of each data separately shortening the argument list by 3. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller net/ipv4/fib_trie.c | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) commit e361d1f85855ded967bd4803e8293445a6ce301a Author: Frédéric Danis Date: Wed Oct 11 10:32:14 2017 +0200 ACPI / scan: Fix enumeration for special UART devices UART devices is expected to be enumerated by SerDev subsystem. During ACPI scan, serial devices behind SPI, I2C or UART buses are not enumerated, allowing them to be enumerated by their respective parents. Rename *spi_i2c_slave* to *serial_bus_slave* as this will be used for serial devices on serial buses (SPI, I2C or UART). On Macs an empty ResourceTemplate is returned for uart slaves. Instead the device properties "baud", "parity", "dataBits", "stopBits" are provided. Add a check for "baud" in acpi_is_serial_bus_slave(). Signed-off-by: Frédéric Danis Reviewed-by: Sebastian Reichel Tested-by: Ronald Tschalär Tested-by: Peter Y. Chuang Acked-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman drivers/acpi/scan.c | 37 +++++++++++++++++-------------------- include/acpi/acpi_bus.h | 2 +- 2 files changed, 18 insertions(+), 21 deletions(-) commit 53c7626356c7584e82510d86394a6dcd80525614 Author: Frédéric Danis Date: Wed Oct 11 10:32:13 2017 +0200 serdev: Add ACPI support This patch allows SerDev module to manage serial devices declared as attached to an UART in ACPI table. acpi_serdev_add_device() callback will only take into account entries without enumerated flag set. This flags is set for all entries during ACPI scan, except for SPI and I2C serial devices, and for UART with 2nd patch in the series. Check if a serdev device as been allocated during acpi_walk_namespace() to prevent serdev controller registration instead of the tty-class device. Signed-off-by: Frédéric Danis Reviewed-by: Rob Herring Reviewed-by: Sebastian Reichel Reviewed-by: Johan Hovold Acked-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/core.c | 100 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 95 insertions(+), 5 deletions(-) commit 1fba70e5b6bed53496ba1f1f16127f5be01b5fb6 Author: Yuchung Cheng Date: Wed Oct 18 11:22:51 2017 -0700 tcp: socket option to set TCP fast open key New socket option TCP_FASTOPEN_KEY to allow different keys per listener. The listener by default uses the global key until the socket option is set. The key is a 16 bytes long binary data. This option has no effect on regular non-listener TCP sockets. Signed-off-by: Yuchung Cheng Reviewed-by: Eric Dumazet Reviewed-by: Christoph Paasch Signed-off-by: David S. Miller include/net/request_sock.h | 2 ++ include/net/tcp.h | 5 +++-- include/uapi/linux/tcp.h | 1 + net/ipv4/sysctl_net_ipv4.c | 3 ++- net/ipv4/tcp.c | 33 +++++++++++++++++++++++++++ net/ipv4/tcp_fastopen.c | 56 +++++++++++++++++++++++++++++++++------------- net/ipv4/tcp_ipv4.c | 1 + 7 files changed, 82 insertions(+), 19 deletions(-) commit 53501e0236295149fb984c4dafda2dfc8448ed26 Author: Miquel Raynal Date: Fri Oct 13 11:01:56 2017 +0200 serial: mvebu-uart: support extended port registers layout Define the missing register offsets and bit fields for the extended UART port. Add a second driver data structure filled with its port data, selected with the right compatible (marvell,armada-3700-uart-ext). Signed-off-by: Miquel Raynal Reviewed-by: Gregory CLEMENT Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mvebu-uart.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 3a75e91b8eecf4de4eee13ddb3ccd82e7abe115d Author: Miquel Raynal Date: Fri Oct 13 11:01:55 2017 +0200 serial: mvebu-uart: augment the maximum number of ports A3700 boards may have up to two UART ports. Set the new limit to two maximum UART ports. Signed-off-by: Miquel Raynal Reviewed-by: Gregory CLEMENT Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mvebu-uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95f787685a224e86385545848efddb9df4393065 Author: Miquel Raynal Date: Fri Oct 13 11:01:54 2017 +0200 serial: mvebu-uart: dissociate RX and TX interrupts While the standard UART port can use a single IRQ that 'sums' both RX and TX interrupts, the extended port cannot and has to use two different ISR, one for each direction. The standard port also has the hability to use two separate interrupts (one for each direction). The logic is then: either there is only one unnamed interrupt on the standard port and this interrupt must be used for both directions (this is legacy bindings); or all the interrupts must be described and named 'uart-sum' (if available), 'uart-rx', 'uart-tx' and two separate handlers for each direction will be used. Suggested-by: Allen Yan Signed-off-by: Miquel Raynal Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mvebu-uart.c | 131 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 119 insertions(+), 12 deletions(-) commit 30434b0713a5f4ecf00e9ffd3d47053882b1909a Author: Allen Yan Date: Fri Oct 13 11:01:53 2017 +0200 serial: mvebu-uart: add TX interrupt trigger for pulse interrupts Pulse interrupts (extended UART only) needs a change of state to trigger the TX interrupt. In addition to enabling the TX_READY_INT_EN flag, produce a FIFO state change from 'empty' to 'not full'. For this, write only one data byte in TX start, making the TX FIFO not empty, and wait for the TX interrupt to continue the transfer. Signed-off-by: Allen Yan Signed-off-by: Miquel Raynal Reviewed-by: Gregory CLEMENT Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mvebu-uart.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 2ff23c48028a77114757438f9a480c453f68d4b0 Author: Allen Yan Date: Fri Oct 13 11:01:52 2017 +0200 serial: mvebu-uart: clear state register before IRQ request When receiving data on RX pin before ->uart_startup() is called, some error bits in the state register could be set up (like BRK_DET). This is harmless when using only the standard UART (error bits are read-only), but may procude an endless loop once in the extended UART RX interrupt handler (error bits must be cleared). Clear the status register in ->uart_startup() to avoid this situation. Signed-off-by: Allen Yan Signed-off-by: Miquel Raynal Reviewed-by: Gregory CLEMENT Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mvebu-uart.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 68a0db1d7da20fc99b64debddf71e7c6d1b9e334 Author: Allen Yan Date: Fri Oct 13 11:01:51 2017 +0200 serial: mvebu-uart: add function to change baudrate Until now, the first UART port baudrate was set by the bootloader. Add a function allowing to change the baudrate. Changes may be done from userspace but also at probe time by the kernel. Use the simplest method: baudrate divisor. Works for all UART ports until 230400 baud. To achieve higher baudrates, software should implement the fractional divisor feature that allows more accuracy for higher rates. Signed-off-by: Allen Yan [: changed termios handling] Signed-off-by: Miquel Raynal Reviewed-by: Gregory CLEMENT Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mvebu-uart.c | 69 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 65 insertions(+), 4 deletions(-) commit 9c3d3ee1239bab92d509f334530796d0ced4ca98 Author: Allen Yan Date: Fri Oct 13 11:01:50 2017 +0200 serial: mvebu-uart: add soft reset at probe The existing UART driver relies on the bootloader to initialize the port(s). However, the secondary uart port may not be initialized properly in early boot stage. This patch adds the UART soft reset when probing, for all ports. Signed-off-by: Allen Yan Signed-off-by: Miquel Raynal Reviewed-by: Gregory CLEMENT Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mvebu-uart.c | 5 +++++ 1 file changed, 5 insertions(+) commit 5218d76958644aa06de5d9bc5bf62d5c503e6e35 Author: Miquel Raynal Date: Fri Oct 13 11:01:49 2017 +0200 serial: mvebu-uart: use a generic way to access the registers There are two UART ports on Armada3700. The second UART is based on the first one, plus additional features, but it has a different register layout (some bit fields are also moved inside the registers). Clearly separate register offsets and bit fields that differ between the standard and the extended IP. Access them in a generic way. Rename the defines with the "STD" prefix for future distinction with "EXT" defines. Point to these defines in the main driver data structure. The early console only uses the standard port (not extended). Suggested-by: Wilson Ding Signed-off-by: Miquel Raynal Reviewed-by: Gregory CLEMENT Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mvebu-uart.c | 213 ++++++++++++++++++++++++++-------------- 1 file changed, 140 insertions(+), 73 deletions(-) commit 94228f9561bb6c7eb951e415f5497db52cca40f7 Author: Allen Yan Date: Fri Oct 13 11:01:48 2017 +0200 serial: mvebu-uart: support probe of multiple ports Until now, the mvebu-uart driver only supported probing a single UART port. However, some platforms have multiple instances of this UART controller, and therefore the driver should support multiple ports. In order to achieve this, we make sure to assign port->line properly, instead of hardcoding it to zero. Signed-off-by: Allen Yan Signed-off-by: Miquel Raynal Acked-by: Gregory CLEMENT Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mvebu-uart.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit 02c3333037be2d6d44bcef5462535a7411ef07c3 Author: Yehuda Yitschak Date: Fri Oct 13 11:01:47 2017 +0200 serial: mvebu-uart: use driver name when requesting an interrupt Use the driver name when requesting an interrupt for consistency. Avoids possible confusion with DW8250 driver interrupt names in /proc/interrupts. Signed-off-by: Yehuda Yitschak Signed-off-by: Miquel Raynal Reviewed-by: Gregory CLEMENT Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mvebu-uart.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit bdff14808679ef913dc10611f1bfcc3276665967 Author: Arvind Yadav Date: Fri Oct 6 17:04:18 2017 +0530 serial-uartlite: pr_err() strings should end with newlines pr_err() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/uartlite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22b276a4072087e7b7f1723ccd8a1aa18fab8bbf Author: Johan Hovold Date: Mon Oct 9 11:41:33 2017 +0200 serdev: enable TTY port controller support by default Amend the Serial device bus Kconfig entries to clarify that you most likely also want to enable TTY port controller support, and make SERIAL_DEV_CTRL_TTYPORT default to Y (when bus support is enabled). Note that the TTY port controller is currently the only in-kernel serdev controller implementation. Signed-off-by: Johan Hovold Reviewed-by: Sebastian Reichel Signed-off-by: Greg Kroah-Hartman drivers/tty/serdev/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+) commit fb83be8873909ba7c089d1c5cb72873cc2cce7d1 Author: Hans Verkuil Date: Mon Sep 11 14:29:52 2017 +0200 drm/tegra: hdmi: Add cec-notifier support In order to support CEC the HDMI driver has to inform the CEC driver whenever the physical address changes. So when the EDID is read the CEC driver has to be informed and whenever the hotplug detect goes away. This is done through the cec-notifier framework. The link between the HDMI driver and the CEC driver is done through the hdmi-phandle property in the tegra-cec node in the device tree. Signed-off-by: Hans Verkuil Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/Kconfig | 1 + drivers/gpu/drm/tegra/drm.h | 3 +++ drivers/gpu/drm/tegra/hdmi.c | 9 +++++++++ drivers/gpu/drm/tegra/output.c | 6 ++++++ 4 files changed, 19 insertions(+) commit a2f2f7403e1ea192ce79584d7050c46e455409dd Author: Thierry Reding Date: Wed Aug 30 17:41:00 2017 +0200 drm/tegra: dc: Perform a complete reset sequence In order for the reset to be applied properly, the module clock must be enabled during the assertion. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/dc.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 39e08affecf0998be1b01f4752016e33fa98eb9a Author: Thierry Reding Date: Wed Aug 30 17:38:39 2017 +0200 drm/tegra: dc: Make sure to set the module clock rate When applying the PLL changes from the computed state object, make sure to set the rate of the display controller module clock. Failing to do so can yield to a situation where the parent will be set to the proper pixel clock, but the module clock will be divided down to the rate that is happened to be set to before the parent rate change. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/dc.c | 5 +++++ 1 file changed, 5 insertions(+) commit a4bfa0961c4bccbfd5f23d1283fa3d40e6af1b59 Author: Thierry Reding Date: Wed Aug 30 17:34:10 2017 +0200 drm/tegra: dc: Simplify atomic plane helper functions Remove the tegra_dc_disable_window() function whose only purpose was to allow tegra_plane_atomic_update() to also call it. Fix that by shuffling tegra_plano_atomic_disable() to before tegra_plane_atomic_update(). While at it, also remove the overlay plane helper functions because they are exactly the same as the primary plane helper functions. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/dc.c | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) commit 2d1c18fb0d1c566491dfaba09ed24881b1d82152 Author: Thierry Reding Date: Wed Aug 30 17:25:34 2017 +0200 drm/tegra: dc: Move some declarations to dc.h Move the DC related declarations in drm.h to dc.h where they belong. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/dc.c | 10 ---- drivers/gpu/drm/tegra/dc.h | 120 ++++++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/tegra/drm.h | 105 -------------------------------------- 3 files changed, 120 insertions(+), 115 deletions(-) commit 829ce7a68f20054b9cda762fbbf662b33ca26756 Author: Thierry Reding Date: Mon Aug 21 18:03:27 2017 +0200 drm/tegra: vic: Use of_device_get_match_data() Avoid some boilerplate by calling of_device_get_match_data() instead of open-coding the equivalent in the driver. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/vic.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 5faea3d0f80f4fe481bcf994750b96c7429bebe1 Author: Thierry Reding Date: Mon Aug 21 17:33:14 2017 +0200 drm/tegra: sor: Use of_device_get_match_data() Avoid some boilerplate by calling of_device_get_match_data() instead of open-coding the equivalent in the driver. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/sor.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 5e4acd30f308be9ec6eba0b9b296210bbcf0ed3d Author: Thierry Reding Date: Mon Aug 21 18:05:10 2017 +0200 drm/tegra: hdmi: Use of_device_get_match_data() Avoid some boilerplate by calling of_device_get_match_data() instead of open-coding the equivalent in the driver. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/hdmi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit b9ff7aeaefbb39d9882547fa4b02e6e34a7b9463 Author: Thierry Reding Date: Mon Aug 21 16:35:17 2017 +0200 drm/tegra: dc: Use of_device_get_match_data() Avoid some boilerplate by calling of_device_get_match_data() instead of open-coding the equivalent in the driver. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/dc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit a176c67d71508761ec9d66a2d9a4eabb8d6873fd Author: Mikko Perttunen Date: Thu Sep 28 15:50:44 2017 +0300 drm/tegra: Use u64_to_user_ptr helper Use the u64_to_user_ptr helper macro to cast IOCTL argument u64 values to user pointers instead of writing out the cast manually. Also do some other cleanup with user pointers to make them stand out more and look cleaner. Signed-off-by: Mikko Perttunen Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/drm.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 45bd862c2846414371bc9b5d31be7c5df252c289 Author: Mikko Perttunen Date: Thu Sep 28 15:50:43 2017 +0300 gpu: host1x: Fix incorrect comment for channel_request This function actually doesn't sleep in the version that was merged. Signed-off-by: Mikko Perttunen Reviewed-by: Dmitry Osipenko Signed-off-by: Thierry Reding drivers/gpu/host1x/channel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2a79c034b579beb90b34c6942ff7d54ece5d3ea0 Author: Mikko Perttunen Date: Thu Sep 28 15:50:42 2017 +0300 gpu: host1x: Disassemble more instructions The disassembler for debug dumps was missing some newer host1x opcodes. Add disassembly support for these. Signed-off-by: Mikko Perttunen Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Signed-off-by: Thierry Reding drivers/gpu/host1x/hw/debug_hw.c | 59 ++++++++++++++++++++++++++++++++--- drivers/gpu/host1x/hw/debug_hw_1x01.c | 2 +- drivers/gpu/host1x/hw/debug_hw_1x06.c | 3 +- 3 files changed, 58 insertions(+), 6 deletions(-) commit eb2ee1a28db17155bcee4630e36ea1759b7e10dc Author: Mikko Perttunen Date: Thu Sep 28 15:50:41 2017 +0300 gpu: host1x: Improve debug disassembly formatting The host1x driver prints out "disassembly" dumps of the command FIFO and gather contents on submission timeouts. However, the output has been quite difficult to read with unnecessary newlines and occasional missing parentheses. Fix these problems by using pr_cont to remove unnecessary newlines and by fixing other small issues. Signed-off-by: Mikko Perttunen Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Signed-off-by: Thierry Reding drivers/gpu/host1x/debug.c | 14 ++++++++++- drivers/gpu/host1x/debug.h | 14 ++++++++--- drivers/gpu/host1x/hw/debug_hw.c | 46 ++++++++++++++++++++++------------- drivers/gpu/host1x/hw/debug_hw_1x01.c | 8 +++--- drivers/gpu/host1x/hw/debug_hw_1x06.c | 9 ++++--- 5 files changed, 61 insertions(+), 30 deletions(-) commit 2316f29fb57932e34a56998073246b8ec4c567f9 Author: Mikko Perttunen Date: Thu Sep 28 15:50:40 2017 +0300 gpu: host1x: Enable gather filter The gather filter is a feature present on Tegra124 and newer where the hardware prevents GATHERed command buffers from executing commands normally reserved for the CDMA pushbuffer which is maintained by the kernel driver. This commit enables the gather filter on all supporting hardware. Signed-off-by: Mikko Perttunen Reviewed-by: Dmitry Osipenko Signed-off-by: Thierry Reding drivers/gpu/host1x/hw/channel_hw.c | 22 ++++++++++++++++++++++ drivers/gpu/host1x/hw/hw_host1x04_channel.h | 12 ++++++++++++ drivers/gpu/host1x/hw/hw_host1x05_channel.h | 12 ++++++++++++ 3 files changed, 46 insertions(+) commit c3f52220f276504dea5615cc78750ddc9f468389 Author: Mikko Perttunen Date: Thu Sep 28 15:50:39 2017 +0300 gpu: host1x: Enable Tegra186 syncpoint protection Since Tegra186 the Host1x hardware allows syncpoints to be assigned to specific channels, preventing any other channels from incrementing them. Enable this feature where available and assign syncpoints to channels when submitting a job. Syncpoints are currently never unassigned from channels since that would require extra work and is unnecessary with the current channel allocation model. Signed-off-by: Mikko Perttunen Reviewed-by: Dmitry Osipenko Signed-off-by: Thierry Reding drivers/gpu/host1x/dev.h | 15 +++++++++++++ drivers/gpu/host1x/hw/channel_hw.c | 2 ++ drivers/gpu/host1x/hw/syncpt_hw.c | 46 ++++++++++++++++++++++++++++++++++++++ drivers/gpu/host1x/syncpt.c | 8 +++++++ 4 files changed, 71 insertions(+) commit 2fb0dceb69ce957f01bdb6fddf7baf4c4b9cbc0d Author: Mikko Perttunen Date: Sun Sep 24 12:04:53 2017 +0300 gpu: host1x: Call of_dma_configure() after setting bus of_dma_configure() now checks the device's bus before configuring it, so we need to set the device's bus before calling. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/host1x/bus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6e44b9ad22f82d4d10b707bcad6b7c701ed11641 Author: Mikko Perttunen Date: Tue Sep 5 11:43:06 2017 +0300 drm/tegra: Add Tegra186 support for VIC Add Tegra186 support for VIC - no changes are required except for new firmware and compatibility string. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/drm.c | 1 + drivers/gpu/drm/tegra/vic.c | 10 ++++++++++ 2 files changed, 11 insertions(+) commit f1b53c4e2c08cbd805a2fdede0026edb30b59602 Author: Mikko Perttunen Date: Tue Sep 5 11:43:05 2017 +0300 gpu: host1x: Add Tegra186 support Add support for the implementation of Host1x present on the Tegra186. The register space has been shuffled around a little bit, requiring addition of some chip-specific code sections. Tegra186 also adds several new features, most importantly the hypervisor, but those are not yet supported with this commit. Signed-off-by: Mikko Perttunen Reviewed-by: Dmitry Osipenko Tested-by: Dmitry Osipenko Signed-off-by: Thierry Reding drivers/gpu/host1x/Makefile | 3 +- drivers/gpu/host1x/dev.c | 55 +++++++- drivers/gpu/host1x/dev.h | 4 + drivers/gpu/host1x/hw/cdma_hw.c | 49 ++++--- drivers/gpu/host1x/hw/debug_hw.c | 137 +------------------ drivers/gpu/host1x/hw/debug_hw_1x01.c | 154 +++++++++++++++++++++ drivers/gpu/host1x/hw/debug_hw_1x06.c | 133 ++++++++++++++++++ drivers/gpu/host1x/hw/host1x01.c | 2 + drivers/gpu/host1x/hw/host1x02.c | 2 + drivers/gpu/host1x/hw/host1x04.c | 2 + drivers/gpu/host1x/hw/host1x05.c | 2 + drivers/gpu/host1x/hw/host1x06.c | 44 ++++++ drivers/gpu/host1x/hw/host1x06.h | 26 ++++ drivers/gpu/host1x/hw/host1x06_hardware.h | 142 +++++++++++++++++++ drivers/gpu/host1x/hw/hw_host1x06_hypervisor.h | 32 +++++ drivers/gpu/host1x/hw/hw_host1x06_uclass.h | 181 +++++++++++++++++++++++++ drivers/gpu/host1x/hw/hw_host1x06_vm.h | 47 +++++++ drivers/gpu/host1x/hw/intr_hw.c | 29 ++-- 18 files changed, 876 insertions(+), 168 deletions(-) commit d3b3efa1705833aa1b7f55ea9b2ed09e48e957a7 Author: Mikko Perttunen Date: Tue Sep 5 11:43:04 2017 +0300 dt-bindings: host1x: Add Tegra186 information Add the Tegra186-specific hypervisor-related register range properties. Signed-off-by: Mikko Perttunen Acked-by: Rob Herring Signed-off-by: Thierry Reding .../devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 617dd7cc490b72345277e2666c8ed34d4f47f0da Author: Thierry Reding Date: Wed Aug 30 12:48:31 2017 +0200 gpu: host1x: syncpt: Request syncpoints per client Rather than request syncpoints for a struct device *, request them for a struct host1x_client *. This is important because subsequent patches are going to break the assumption that host1x will always be the parent for devices requesting a syncpoint. It's also a more natural choice because host1x clients are really the only ones that will know how to deal with syncpoints. Note that host1x clients are always guaranteed to be children of host1x, regardless of their location in the device tree. Signed-off-by: Thierry Reding drivers/gpu/drm/tegra/dc.c | 2 +- drivers/gpu/drm/tegra/gr2d.c | 2 +- drivers/gpu/drm/tegra/gr3d.c | 2 +- drivers/gpu/drm/tegra/vic.c | 2 +- drivers/gpu/host1x/syncpt.c | 16 ++++++++-------- drivers/gpu/host1x/syncpt.h | 2 +- include/linux/host1x.h | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) commit 6a341fdff16e13ed1d60dbedca027df3a6a15f9b Author: Thierry Reding Date: Mon Aug 21 18:08:42 2017 +0200 gpu: host1x: Use of_device_get_match_data() Avoid some boilerplate by calling of_device_get_match_data() instead of open-coding the equivalent in the driver. While at it, shuffle around some code to avoid unnecessary local variables. Signed-off-by: Thierry Reding drivers/gpu/host1x/dev.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit ce12f7ddff2df63b8f9abf33d6fe020e35de4059 Merge: 6b1f8ed f8fa9b4 Author: David S. Miller Date: Fri Oct 20 13:15:08 2017 +0100 Merge branch 'mlxsw-extack' David Ahern says: ==================== mlxsw: spectrum_router: Add extack messages for RIF and VRF overflow Currently, exceeding the number of VRF instances or the number of router interfaces either fails with a non-intuitive EBUSY: $ ip li set swp1s1.6 vrf vrf-1s1-6 up RTNETLINK answers: Device or resource busy or fails silently (IPv6) since the checks are done in a work queue. This set adds support for the address validator notifier to spectrum which allows ext-ack based messages to be returned on failure. To make that happen the IPv6 version needs to be converted from atomic to blocking (patch 2), and then support for extack needs to be added to the notifier (patch 3). Patch 1 reworks the locking in ipv6_add_addr to work better in the atomic and non-atomic code paths. Patches 4 and 5 add the validator notifier to spectrum and then plumb the extack argument through spectrum_router. With this set, VRF overflows fail with: $ ip li set swp1s1.6 vrf vrf-1s1-6 up Error: spectrum: Exceeded number of supported VRF. and RIF overflows fail with: $ ip addr add dev swp1s2.191 10.12.191.1/24 Error: spectrum: Exceeded number of supported router interfaces. v2 -> v3 - fix surround context of patch 4 which was altered by c30f5d012edf v1 -> v2 - fix error path in ipv6_add_addr: reset rt to NULL (Ido comment) and add in6_dev_put on ifa once the hold has been done RFC -> v1 - addressed various comments from Ido - refactored ipv6_add_addr to allow ifa's to be allocated with GFP_KERNEL as requested by DaveM ==================== Signed-off-by: David S. Miller commit f8fa9b4e6da77311791c7150a6ecc9368396df3b Author: David Ahern Date: Wed Oct 18 09:56:56 2017 -0700 mlxsw: spectrum_router: Add extack message for RIF and VRF overflow Add extack argument down to mlxsw_sp_rif_create and mlxsw_sp_vr_create to set an error message on RIF or VR overflow. Now on overflow of either resource the user gets an informative message as opposed to failing with EBUSY. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 114 +++++++++++++-------- 1 file changed, 69 insertions(+), 45 deletions(-) commit 89d5dd2efdb26c78ab83be59390386cc21f8dd71 Author: David Ahern Date: Wed Oct 18 09:56:55 2017 -0700 mlxsw: spectrum: router: Add support for address validator notifier Add support for inetaddr_validator and inet6addr_validator. The notifiers provide a means for validating ipv4 and ipv6 addresses before the addresses are installed and on failure the error is propagated back to the user. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 15 ++++++- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 ++ .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 52 ++++++++++++++++++++++ 3 files changed, 70 insertions(+), 1 deletion(-) commit de95e04791a03de5cb681980a3880db6919e3b4a Author: David Ahern Date: Wed Oct 18 09:56:54 2017 -0700 net: Add extack to validator_info structs used for address notifier Add extack to in_validator_info and in6_validator_info. Update the one user of each, ipvlan, to return an error message for failures. Only manual configuration of an address is plumbed in the IPv6 code path. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_main.c | 10 ++++++++-- include/linux/inetdevice.h | 1 + include/net/addrconf.h | 1 + net/ipv4/devinet.c | 8 +++++--- net/ipv6/addrconf.c | 22 ++++++++++++---------- 5 files changed, 27 insertions(+), 15 deletions(-) commit ff7883ea60e7b021bcd6539b8211879554c8db9a Author: David Ahern Date: Wed Oct 18 09:56:53 2017 -0700 net: ipv6: Make inet6addr_validator a blocking notifier inet6addr_validator chain was added by commit 3ad7d2468f79f ("Ipvlan should return an error when an address is already in use") to allow address validation before changes are committed and to be able to fail the address change with an error back to the user. The address validation is not done for addresses received from router advertisements. Handling RAs in softirq context is the only reason for the notifier chain to be atomic versus blocking. Since the only current user, ipvlan, of the validator chain ignores softirq context, the notifier can be made blocking and simply not invoked for softirq path. The blocking option is needed by spectrum for example to validate resources for an adding an address to an interface. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_main.c | 4 ---- net/ipv6/addrconf.c | 21 ++++++++++++++------- net/ipv6/addrconf_core.c | 9 +++++---- 3 files changed, 19 insertions(+), 15 deletions(-) commit f3d9832e56c48e4ca50bab0457e21bcaade4536d Author: David Ahern Date: Wed Oct 18 09:56:52 2017 -0700 ipv6: addrconf: cleanup locking in ipv6_add_addr ipv6_add_addr is called in process context with rtnl lock held (e.g., manual config of an address) or during softirq processing (e.g., autoconf and address from a router advertisement). Currently, ipv6_add_addr calls rcu_read_lock_bh shortly after entry and does not call unlock until exit, minus the call around the address validator notifier. Similarly, addrconf_hash_lock is taken after the validator notifier and held until exit. This forces the allocation of inet6_ifaddr to always be atomic. Refactor ipv6_add_addr as follows: 1. add an input boolean to discriminate the call path (process context or softirq). This new flag controls whether the alloc can be done with GFP_KERNEL or GFP_ATOMIC. 2. Move the rcu_read_lock_bh and unlock calls only around functions that do rcu updates. 3. Remove the in6_dev_hold and put added by 3ad7d2468f79f ("Ipvlan should return an error when an address is already in use."). This was done presumably because rcu_read_unlock_bh needs to be called before calling the validator. Since rcu_read_lock is not needed before the validator runs revert the hold and put added by 3ad7d2468f79f and only do the hold when setting ifp->idev. 4. move duplicate address check and insertion of new address in the global address hash into a helper. The helper is called after an ifa is allocated and filled in. This allows the ifa for manually configured addresses to be done with GFP_KERNEL and reduces the overall amount of time with rcu_read_lock held and hash table spinlock held. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv6/addrconf.c | 104 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 60 insertions(+), 44 deletions(-) commit 6b1f8edabad562dc0b2a6d59fa49061eddd91290 Merge: 0843c09 52c44d2 Author: David S. Miller Date: Fri Oct 20 13:11:05 2017 +0100 Merge branch 's390-next' Julian Wiedmann says: ==================== s390/net: updates 2017-10-18 please apply some additional robustness fixes and cleanups for 4.15. ==================== Signed-off-by: David S. Miller commit 52c44d2975433fab645d29f1b5e6c0c7e77dd342 Author: Julian Wiedmann Date: Wed Oct 18 17:40:25 2017 +0200 s390/qeth: don't dump control cmd twice A few lines down, qeth_prepare_control_data() makes further changes to the control cmd buffer, and then also writes a trace entry for it. So the first entry just pollutes the trace file with intermediate data, drop it. Signed-off-by: Julian Wiedmann Reviewed-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 1 - 1 file changed, 1 deletion(-) commit 978759e8266d6f778fd7f8ae0d4a5e2ddb0558f7 Author: Julian Wiedmann Date: Wed Oct 18 17:40:24 2017 +0200 s390/qeth: support GRO flush timer Switch to napi_complete_done(), and thus enable delayed GRO flushing. The timeout is configured via /sys/class/net//gro_flush_timeout. Default timeout is 0, so no change in behaviour. Signed-off-by: Julian Wiedmann Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 864c17c3d83be6a1f6a2888566e93e114986abca Author: Julian Wiedmann Date: Wed Oct 18 17:40:23 2017 +0200 s390/qeth: try harder to get packets from RX buffer Current code bails out when two subsequent buffer elements hold insufficient data to contain a qeth_hdr packet descriptor. This seems reasonable, but it would be legal for quirky hardware to leave a few elements empty and then present packets in a subsequent element. These packets would currently be dropped. So make sure to check all buffer elements, until we hit the LAST_ENTRY indication. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8d68af6af6b4f76eac4f9abf584b4ea356f638c0 Author: Julian Wiedmann Date: Wed Oct 18 17:40:22 2017 +0200 s390/qeth: consolidate skb allocation Move the allocation of SG skbs into the main path. This allows for a little code sharing, and handling ENOMEM from within one place. As side effect, L2 SG skbs now get the proper amount of additional headroom (read: zero) instead of the hard-coded ETH_HLEN. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 71 +++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 40 deletions(-) commit b6f72f9698ab8bd79cd0b72a8d9f25dacd786563 Author: Julian Wiedmann Date: Wed Oct 18 17:40:21 2017 +0200 s390/qeth: clean up page frag creation Replace the open-coded skb_add_rx_frag(), and use a fall-through to remove some duplicated code. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) commit 9400c53f06b462959ee07594cb96429292031dc6 Author: Julian Wiedmann Date: Wed Oct 18 17:40:20 2017 +0200 s390/qeth: no VLAN support on OSM Instead of silently discarding VLAN registration requests on OSM, just indicate that this card type doesn't support VLAN. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 857d8ee2608831197d9838c8331b87848d05da33 Author: Julian Wiedmann Date: Wed Oct 18 17:40:19 2017 +0200 s390/qeth: don't verify device when setting MAC address There's no reason why l2_set_mac_address() should ever be called for a netdevice that's not owned by qeth. It's certainly not required for VLAN devices, which have their own netdev_ops. Also: 1) we don't do such validation for any of the other netdev_ops routines. 2) the code in question clearly has never been actually exercised; it's broken. After determining that the device is not owned by qeth, it would still use dev->ml_priv to write a qeth trace entry. Remove the check, and its helper that walked the global card list. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit 6e6f472d92bd4ccd88a9a12e55b484ab417c168c Author: Julian Wiedmann Date: Wed Oct 18 17:40:18 2017 +0200 s390/qeth: clean up initial MTU determination 1. Drop the support for Token Ring, 2. use the ETH_DATA_LEN macro for the default L2 MTU, 3. handle OSM via the default case (as OSM is L2-only), and 4. document why the L3 MTU is reduced. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 83cf79a2fec3cf499eb6cb9eb608656fc2a82776 Author: Julian Wiedmann Date: Wed Oct 18 17:40:17 2017 +0200 s390/qeth: fix early exit from error path When the allocation of the addr buffer fails, we need to free our refcount on the inetdevice before returning. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l3_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 025d0dfcc1dd90e2489ab9c500c8f5efbe3ce82f Author: Andy Shevchenko Date: Wed Oct 18 17:40:16 2017 +0200 s390/qeth: use kstrtobool() in qeth_bridgeport_hostnotification_store() The sysfs enabled value is a boolean, so kstrtobool() is a better fit for parsing the input string since it does the range checking for us. Signed-off-by: Andy Shevchenko Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_sys.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit ed2e93efc3b8d34ba36b0f7b581f3828916a1da7 Author: Julian Wiedmann Date: Wed Oct 18 17:40:15 2017 +0200 s390/qeth: remove duplicated device matching With commit "s390/ccwgroup: tie a ccwgroup driver to its ccw driver", the ccwgroup core now ensures that a qeth group device only consists of ccw devices which are supported by qeth. Therefore remove qeth's internal device matching, and use .driver_info to determine the card type. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 14 -------------- drivers/s390/net/qeth_core_main.c | 40 ++++++++------------------------------- drivers/s390/net/qeth_core_mpc.h | 1 - drivers/s390/net/qeth_core_sys.c | 4 +--- 4 files changed, 9 insertions(+), 50 deletions(-) commit dbb27af91d2afd820c7cb5fab9b7608225e22fea Author: Allen Pais Date: Wed Oct 18 17:40:14 2017 +0200 s390/drivers: use setup_timer Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/fsm.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit ce34435641456a680309d84c85b48e004ef45f41 Author: Julian Wiedmann Date: Wed Oct 18 17:40:13 2017 +0200 s390/qeth: rely on kernel for feature recovery When recovering a device, qeth needs to re-run the IPA commands that enable all previously active HW features. Instead of duplicating qeth_set_features(), let netdev_update_features() recover the missing HW features from dev->wanted_features. 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 | 40 ++++++++++++++++++--------------------- 2 files changed, 19 insertions(+), 23 deletions(-) commit 0843c092ee75bb375fbbb6b97a7c55e0069ae099 Author: Or Gerlitz Date: Wed Oct 18 18:38:08 2017 +0300 net/sched: Set the net-device for egress device instance Currently the netdevice field is not set and the egdev instance is not functional, fix that. Fixes: 3f55bdda8df ('net: sched: introduce per-egress action device callbacks') Signed-off-by: Or Gerlitz Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/act_api.c | 1 + 1 file changed, 1 insertion(+) commit 322d95f04a8f375ced4f704eb612287d0730a163 Merge: 8900567 557ccbf Author: David S. Miller Date: Fri Oct 20 13:06:53 2017 +0100 Merge branch 'cxgb4-more-flower-offloads' Rahul Lakkireddy says: ==================== cxgb4: enable more tc flower offload matches and actions This patch series enable more matches and actions for TC Flower Offload support on Chelsio adapters. Patch 1 enables matching on IP TOS. Patch 2 enables matching on VLAN TCI. Patch 3 adds support for action PASS. Patch 4 adds support for ETH-DMAC rewrite via TC-PEDIT action. Also, adds a check to assert that vlan/eth-dmac rewrite actions are valid only in combination with action egress redirect. Patch 5 introduces SMT ops for adding/removing entries from SMAC Table in HW in preparation for patch 6. Patch 6 adds support for ETH-SMAC rewrite via TC-PEDIT action. Patch 7 introduces fw_filter2_wr to support L3/L4 header rewrites in preparation for patch 8. Patch 8 adds support for rewrite on L3/L4 header fields via TC-PEDIT action. Supported fields for rewrite are: IPv4 src/dst address, IPv6 src/dst address, TCP/UDP sport/dport. ==================== Signed-off-by: David S. Miller commit 557ccbf9dfa8de133b9247af42f0c5760bb103f0 Author: Kumar Sanghvi Date: Wed Oct 18 20:49:14 2017 +0530 cxgb4: add tc flower support for L3/L4 rewrite Adds support to rewrite L3/L4 fields via TC-PEDIT action. Supported fields for rewrite are: IPv4 src/dst address, IPv6 src/dst address, TCP/UDP sport/dport. Also, process match fields first and then process the action items. Refactor pedit action validation to separate function to avoid excessive code indentation. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 4 + .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 245 +++++++++++++++++---- .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h | 32 +++ 3 files changed, 244 insertions(+), 37 deletions(-) commit 0ff909946155ed1af2ec8feed3c1bac485201683 Author: Kumar Sanghvi Date: Wed Oct 18 20:49:13 2017 +0530 cxgb4: introduce fw_filter2_wr to prepare for L3/L4 rewrite support Update driver to use new fw_filter2_wr in order to support rewrite of L3/L4 header fields via filters. Query FW_PARAMS_PARAM_DEV_FILTER2_WR to check whether FW supports this new wr. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 10 +++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 19 +++++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 10 +++ drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 75 ++++++++++++++++++++++- 4 files changed, 111 insertions(+), 3 deletions(-) commit 202187c34c7e3efd9662a25977cddef6e7dec572 Author: Kumar Sanghvi Date: Wed Oct 18 20:49:12 2017 +0530 cxgb4: add tc flower support for ETH-SMAC rewrite Adds support for ETH-SMAC rewrite via TC-PEDIT action. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 10 ++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h | 3 +++ 2 files changed, 13 insertions(+) commit 3bdb376e6944134d0f4d6d65497054a54ef273c9 Author: Kumar Sanghvi Date: Wed Oct 18 20:49:11 2017 +0530 cxgb4: introduce SMT ops to prepare for SMAC rewrite support Introduce SMT operations for allocating/removing entries from SMAC table. Make TCAM filters use the SMT ops whenever SMAC rewrite is required. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy 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 | 3 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 107 ++++++++-- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 12 ++ drivers/net/ethernet/chelsio/cxgb4/smt.c | 247 ++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/smt.h | 76 +++++++ drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 44 +++- drivers/net/ethernet/chelsio/cxgb4/t4_tcb.h | 47 ++++ 8 files changed, 519 insertions(+), 19 deletions(-) commit 27ece1f357b71c63e6e35c645b9c344835d4a129 Author: Kumar Sanghvi Date: Wed Oct 18 20:49:10 2017 +0530 cxgb4: add tc flower support for ETH-DMAC rewrite Add support for ETH-DMAC Rewrite via TC-PEDIT action. Also, add check to assert that vlan/eth-dmac rewrite actions are valid only in combination with action egress redirect. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 108 ++++++++++++++++++++- .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h | 19 ++++ 2 files changed, 126 insertions(+), 1 deletion(-) commit c39bff47d735e39fdbf59ad56df5581b0cf88c7c Author: Kumar Sanghvi Date: Wed Oct 18 20:49:09 2017 +0530 cxgb4: add tc flower support for action PASS Add support for tc flower action PASS. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ad9af3e09cb6b201db56190d92eb3ffe469a0bc4 Author: Kumar Sanghvi Date: Wed Oct 18 20:49:08 2017 +0530 cxgb4: add tc flower match support for vlan Add support for matching on vlan tci. Construct vlan tci match param based on vlan-id and vlan-pcp values supplied by tc. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit bda1e229153fbdd0efd22a14c1c76a28c05d1b27 Author: Kumar Sanghvi Date: Wed Oct 18 20:49:07 2017 +0530 cxgb4: add tc flower match support for TOS Add support for matching on IP TOS. Also check on ethtype value to be either IPv4 or IPv6. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 51 +++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) commit f7f730968264c142cf4de298f3d2ca89ede07aa9 Author: Kees Cook Date: Mon Oct 16 16:28:45 2017 -0700 tty: amba-pl011: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Russell King Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/amba-pl011.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 75d1760f4cd1b2dc9f41b4218bc78b5678a0f184 Author: Kees Cook Date: Mon Oct 16 16:29:33 2017 -0700 tty: mips_ejtag_fdc: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jiri Slaby Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/tty/mips_ejtag_fdc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8c318fa93dfcd153e2f3c26cd4611238707b91cb Author: Kees Cook Date: Mon Oct 16 16:28:51 2017 -0700 tty/sysrq: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jiri Slaby Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/tty/sysrq.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit f0f62c67dd53ce0ed26ad2940be1dfff5c3d7bd9 Author: Kees Cook Date: Mon Oct 16 16:27:37 2017 -0700 serial: m32r_sio: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/m32r_sio.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 54ff200e66f837da9b0b24570a02d95d67d1d42f Author: Kees Cook Date: Mon Oct 16 16:28:36 2017 -0700 tty: metag_da: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: James Hogan Cc: Jiri Slaby Cc: linux-metag@vger.kernel.org Signed-off-by: Kees Cook Acked-by: James Hogan Signed-off-by: Greg Kroah-Hartman drivers/tty/metag_da.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit fd97e66c5529046e989a0879c3bb58fddb592c71 Author: Ji-Ze Hong (Peter Hong) Date: Tue Oct 17 14:23:08 2017 +0800 serial: 8250_fintek: Fix finding base_port with activated SuperIO The SuperIO will be configured at boot time by BIOS, but some BIOS will not deactivate the SuperIO when the end of configuration. It'll lead to mismatch for pdata->base_port in probe_setup_port(). So we'll deactivate all SuperIO before activate special base_port in fintek_8250_enter_key(). Tested on iBASE MI802. Cc: stable@vger.kernel.org Tested-by: Ji-Ze Hong (Peter Hong) Signed-off-by: Ji-Ze Hong (Peter Hong) Reviewd-by: Alan Cox Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_fintek.c | 3 +++ 1 file changed, 3 insertions(+) commit c79dde629d2027ca80329c62854a7635e623d527 Author: nixiaoming Date: Fri Sep 15 17:45:56 2017 +0800 tty fix oops when rmmod 8250 After rmmod 8250.ko tty_kref_put starts kwork (release_one_tty) to release proc interface oops when accessing driver->driver_name in proc_tty_unregister_driver Use jprobe, found driver->driver_name point to 8250.ko static static struct uart_driver serial8250_reg .driver_name= serial, Use name in proc_dir_entry instead of driver->driver_name to fix oops test on linux 4.1.12: BUG: unable to handle kernel paging request at ffffffffa01979de IP: [] strchr+0x0/0x30 PGD 1a0d067 PUD 1a0e063 PMD 851c1f067 PTE 0 Oops: 0000 [#1] PREEMPT SMP Modules linked in: ... ... [last unloaded: 8250] CPU: 7 PID: 116 Comm: kworker/7:1 Tainted: G O 4.1.12 #1 Hardware name: Insyde RiverForest/Type2 - Board Product Name1, BIOS NE5KV904 12/21/2015 Workqueue: events release_one_tty task: ffff88085b684960 ti: ffff880852884000 task.ti: ffff880852884000 RIP: 0010:[] [] strchr+0x0/0x30 RSP: 0018:ffff880852887c90 EFLAGS: 00010282 RAX: ffffffff81a5eca0 RBX: ffffffffa01979de RCX: 0000000000000004 RDX: ffff880852887d10 RSI: 000000000000002f RDI: ffffffffa01979de RBP: ffff880852887cd8 R08: 0000000000000000 R09: ffff88085f5d94d0 R10: 0000000000000195 R11: 0000000000000000 R12: ffffffffa01979de R13: ffff880852887d00 R14: ffffffffa01979de R15: ffff88085f02e840 FS: 0000000000000000(0000) GS:ffff88085f5c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffa01979de CR3: 0000000001a0c000 CR4: 00000000001406e0 Stack: ffffffff812349b1 ffff880852887cb8 ffff880852887d10 ffff88085f5cd6c2 ffff880852800a80 ffffffffa01979de ffff880852800a84 0000000000000010 ffff88085bb28bd8 ffff880852887d38 ffffffff812354f0 ffff880852887d08 Call Trace: [] ? __xlate_proc_name+0x71/0xd0 [] remove_proc_entry+0x40/0x180 [] ? _raw_spin_lock_irqsave+0x41/0x60 [] ? destruct_tty_driver+0x60/0xe0 [] proc_tty_unregister_driver+0x28/0x40 [] destruct_tty_driver+0x88/0xe0 [] tty_driver_kref_put+0x1d/0x20 [] release_one_tty+0x5a/0xd0 [] process_one_work+0x139/0x420 [] worker_thread+0x121/0x450 [] ? process_scheduled_works+0x40/0x40 [] kthread+0xec/0x110 [] ? tg_rt_schedulable+0x210/0x220 [] ? kthread_freezable_should_stop+0x80/0x80 [] ret_from_fork+0x42/0x70 [] ? kthread_freezable_should_stop+0x80/0x80 Signed-off-by: nixiaoming Signed-off-by: Greg Kroah-Hartman fs/proc/proc_tty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0ab84da2e076948c49d36197ee7d254125c53eab Author: Aaron Sierra Date: Wed Oct 4 10:01:28 2017 -0500 serial: 8250: Preserve DLD[7:4] for PORT_XR17V35X The upper four bits of the XR17V35x fractional divisor register (DLD) control general chip function (RS-485 direction pin polarity, multidrop mode, XON/XOFF parity check, and fast IR mode). Don't allow these bits to be clobbered when setting the baudrate. Signed-off-by: Aaron Sierra Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_port.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 8ffb82094be8ade4f5e60996edcc8afbbcb4f1f4 Author: Meng Xu Date: Wed Oct 4 10:38:37 2017 -0400 tty: vt: remove multi-fetch, derive font.height from font.data In con_font_set(), when we need to guess font height (for compat reasons?), the current approach uses multiple userspace fetches, i.e., get_user(tmp, &charmap[32*i+h-1]), to derive the height. This has two drawbacks: 1. performance: accessing userspace memory is less efficient than directly de-reference the byte 2. security: a more critical problem is that the height derived might not match with the actual font.data. This is because a user thread might race condition to change the memory of op->data after the op->height guessing but before the second fetch: font.data = memdup_user(op->data, size). Leaving font.height = 32 while the actual height is 1 or vice-versa. This patch tries to resolve both issues by re-locating the height guessing part after the font.data is fetched in. In this way, the userspace data is fetched in one shot and we directly dereference the font.data in kernel space to probe for the height. Signed-off-by: Meng Xu Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 48 ++++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) commit 890056783c60ad9d0789774af2bc10fe4f27dd9d Author: David Ahern Date: Wed Oct 18 08:17:29 2017 -0700 tcp: Remove use of inet6_sk and add IPv6 checks to tracepoint 386fd5da401d ("tcp: Check daddr_cache before use in tracepoint") was the second version of the tracepoint fixup patch. This patch is the delta between v2 and v3. Specifically, remove the use of inet6_sk and check sk_family as requested by Eric and add IS_ENABLED(CONFIG_IPV6) around the use of sk_v6_rcv_saddr and sk_v6_daddr as done in sock_common (noted by Cong). Signed-off-by: David Ahern Reviewed-by: Eric Dumazet Tested-by: Song Liu Signed-off-by: David S. Miller include/trace/events/tcp.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 17c918840fb07e5819f8df03345d7f4a5e5b791c Author: Donald Sharp Date: Wed Oct 18 10:24:28 2017 -0400 doc: Update VRF documentation metric Two things: 1) Update examples to show usage of metric 2) Discuss reasoning for using such a high metric. Signed-off-by: Donald Sharp Acked-by: David Ahern Signed-off-by: David S. Miller Documentation/networking/vrf.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit dd076cffb8cd675a8973fc9b6cea0c04be6f0111 Author: Matthias Kaehlcke Date: Mon Oct 9 18:26:22 2017 -0700 serial: sh-sci: Fix init data attribute for struct 'port_cfg' The __init attribute is meant to mark functions, use __initdata instead for the data structure. This fixes the following error when building with clang: drivers/tty/serial/sh-sci.c:3247:15: error: '__section__' attribute only applies to functions, methods, properties, and global variables static struct __init plat_sci_port port_cfg; Signed-off-by: Matthias Kaehlcke Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e605a01501b20ba8ace196536899195c8d296f5 Author: Geert Uytterhoeven Date: Wed Oct 4 14:21:56 2017 +0200 serial: sh-sci: Use of_device_get_match_data() helper Use the of_device_get_match_data() helper instead of open coding. Note that when used with DT, there's always a valid match. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 263763c1c5235b01b654b954d4a278c8cf5a0def Author: Martyn Welch Date: Wed Oct 4 17:13:27 2017 +0100 serial: imx: Correct comment imx_flush_buffer() The comment in imx_flush_buffer() states that the state of 4 registers are to be saved/restored, then only saves and restores 3 registers. The missing register (UBRC) is read only and thus can't be restored. Update the comment to reflect reality. Signed-off-by: Martyn Welch Acked-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 598f9b2ec479715decb8f6aea59a45459159c515 Author: Sean Wang Date: Thu Oct 19 17:52:54 2017 +0800 arm64: mediatek: cleanup message for platform selection The latest kernel tree already can support more MediaTek platforms such as MT2712 and MT7622, so additional descriptions for those platforms are added and certain cleanups are also being made here. Signed-off-by: Sean Wang Signed-off-by: Matthias Brugger arch/arm64/Kconfig.platforms | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 773dd2fca581b0a80e5a33332cc8ee67e5a79cba Author: Kirill A. Shutemov Date: Fri Sep 29 17:08:20 2017 +0300 x86/xen: Drop 5-level paging support code from the XEN_PV code It was decided 5-level paging is not going to be supported in XEN_PV. Let's drop the dead code from the XEN_PV code. Tested-by: Juergen Gross Signed-off-by: Kirill A. Shutemov Reviewed-by: Juergen Gross Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Cyrill Gorcunov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170929140821.37654-6-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/xen/mmu_pv.c | 159 +++++++++++++++++++------------------------------- 1 file changed, 60 insertions(+), 99 deletions(-) commit 4375c29985f155d7eb2346615d84e62d1b673682 Author: Kirill A. Shutemov Date: Fri Sep 29 17:08:19 2017 +0300 x86/xen: Provide pre-built page tables only for CONFIG_XEN_PV=y and CONFIG_XEN_PVH=y Looks like we only need pre-built page tables in the CONFIG_XEN_PV=y and CONFIG_XEN_PVH=y cases. Let's not provide them for other configurations. Signed-off-by: Kirill A. Shutemov Reviewed-by: Juergen Gross Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Cyrill Gorcunov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170929140821.37654-5-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/head_64.S | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 12a8cc7fcf54a8575f094be1e99032ec38aa045c Author: Andrey Ryabinin Date: Fri Sep 29 17:08:18 2017 +0300 x86/kasan: Use the same shadow offset for 4- and 5-level paging We are going to support boot-time switching between 4- and 5-level paging. For KASAN it means we cannot have different KASAN_SHADOW_OFFSET for different paging modes: the constant is passed to gcc to generate code and cannot be changed at runtime. This patch changes KASAN code to use 0xdffffc0000000000 as shadow offset for both 4- and 5-level paging. For 5-level paging it means that shadow memory region is not aligned to PGD boundary anymore and we have to handle unaligned parts of the region properly. In addition, we have to exclude paravirt code from KASAN instrumentation as we now use set_pgd() before KASAN is fully ready. [kirill.shutemov@linux.intel.com: clenaup, changelog message] Signed-off-by: Andrey Ryabinin Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Cyrill Gorcunov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170929140821.37654-4-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar Documentation/x86/x86_64/mm.txt | 2 +- arch/x86/Kconfig | 1 - arch/x86/kernel/Makefile | 3 +- arch/x86/mm/kasan_init_64.c | 101 +++++++++++++++++++++++++++++++--------- 4 files changed, 83 insertions(+), 24 deletions(-) commit 83e3c48729d9ebb7af5a31a504f3fd6aff0348c4 Author: Kirill A. Shutemov Date: Fri Sep 29 17:08:16 2017 +0300 mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y Size of the mem_section[] array depends on the size of the physical address space. In preparation for boot-time switching between paging modes on x86-64 we need to make the allocation of mem_section[] dynamic, because otherwise we waste a lot of RAM: with CONFIG_NODE_SHIFT=10, mem_section[] size is 32kB for 4-level paging and 2MB for 5-level paging mode. The patch allocates the array on the first call to sparse_memory_present_with_active_regions(). Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Cyrill Gorcunov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20170929140821.37654-2-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar include/linux/mmzone.h | 6 +++++- mm/page_alloc.c | 10 ++++++++++ mm/sparse.c | 17 +++++++++++------ 3 files changed, 26 insertions(+), 7 deletions(-) commit 967535223f9a8d95c187a8728480b569164cd4f4 Merge: 5b65c46 ce56a86 Author: Ingo Molnar Date: Fri Oct 20 13:06:52 2017 +0200 Merge branch 'x86/urgent' into x86/mm, to pick up fixes Signed-off-by: Ingo Molnar commit 134aedc9c157d49069e9a98636b0a917678586ee Author: James Smart Date: Thu Oct 19 16:11:39 2017 -0700 nvme-fc: correct io timeout behavior The transport io timeout behavior wasn't quite correct. It ignored that the io error handler is supposed to be synchronous so it possibly allowed the blk request to be restarted while the io associated was still aborting. Timeouts on reserved commands, those used for association create, were never timing out thus they hung out forever. To correct: If an io is times out while a remoteport is not connected, just restart the io timer. The lack of connectivity will simultaneously be resetting the controller, so the reset path will abort and terminate the io. If an io is times out while it was marked for transport abort, just reset the io timer. The abort process is underway and will complete the io. Otherwise, if an io times out, abort the io. If the abort was unsuccessful (unlikely) give up and return not handled. If the abort was successful, as the abort process is underway it will terminate the io, so rather than synchronously waiting, just restart the io timer. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 0a02e39fd1eb2ceb3dd0dc765cb2de4d09697a14 Author: James Smart Date: Thu Oct 19 16:11:38 2017 -0700 nvme-fc: correct io termination handling The io completion handling for i/o's that are failing due to to a transport error or association termination had issues, causing io failures (DNR set so retries didn't kick in) or long stalls. Change the io completion handler for the following items: When an io has been completed due to a transport abort (based on an exchange error) or when marked as aborted as part of an association termination (FCOP_FLAGS_TERMIO), set the NVME completion status to NVME_SC_ABORTED. By default, do not set DNR on the status so that a retry can be attempted after association recreate. In cases where an io is failed (non-successful nvme status including aborted), if the controller is being deleted (blk_queue_dying) or the io was part of the ios used for association creation (ctrl state is NEW or RECONNECTING), then additionally set the DNR bit so the io will not be retried. If the failed io was part of association creation, the failure will tear down the partially completioned association and typically restart a new reconnect attempt (another create association later). Rearranged code flow to remove a largely unneeded local variable. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit a7a7cbe353a52665b8463e1822ce6ba46b0609d6 Author: Chaitanya Kulkarni Date: Mon Oct 16 18:24:20 2017 -0700 nvme-pci: add SGL support This adds SGL support for NVMe PCIe driver, based on an earlier patch from Rajiv Shanmugam Madeswaran . This patch refactors the original code and adds new module parameter sgl_threshold to determine whether to use SGL or PRP for IOs. The usage of SGLs is controlled by the sgl_threshold module parameter, which allows to conditionally use SGLs if average request segment size (avg_seg_size) is greater than sgl_threshold. In the original patch, the decision of using SGLs was dependent only on the IO size, with the new approach we consider not only IO size but also the number of physical segments present in the IO. We calculate avg_seg_size based on request payload bytes and number of physical segments present in the request. For e.g.:- 1. blk_rq_nr_phys_segments = 2 blk_rq_payload_bytes = 8k avg_seg_size = 4K use sgl if avg_seg_size >= sgl_threshold. 2. blk_rq_nr_phys_segments = 2 blk_rq_payload_bytes = 64k avg_seg_size = 32K use sgl if avg_seg_size >= sgl_threshold. 3. blk_rq_nr_phys_segments = 16 blk_rq_payload_bytes = 64k avg_seg_size = 4K use sgl if avg_seg_size >= sgl_threshold. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 214 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 187 insertions(+), 27 deletions(-) commit 9843f685ae365d0c628e6a0d929772bca7274311 Author: Christoph Hellwig Date: Wed Oct 18 13:10:01 2017 +0200 nvme: use ida_simple_{get,remove} for the controller instance Switch to the ida_simple_* helpers instead of opencoding them. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn drivers/nvme/host/core.c | 40 +++++++--------------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) commit ab86ba2f8c3ab075833357c8ddc1b1ecd6b599a6 Author: Jean Delvare Date: Thu Oct 5 11:17:43 2017 +0200 soc: Allow test-building of MediaTek drivers The COMPILE_TEST alternative dependency allows test-building the drivers but only as long as the build system itself will look into the directory where the drivers reside. Signed-off-by: Jean Delvare Cc: Sean Wang Cc: Matthias Brugger Acked-by: Sean Wang Signed-off-by: Matthias Brugger drivers/soc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31d7b359a94b8c96e54c6e3b438e6c7b65b9acb1 Author: Sean Wang Date: Thu Oct 5 11:17:49 2017 +0800 soc: mediatek: place Kconfig for all SoC drivers under menu Add cleanup for placing all Kconfig for all MediaTek SoC drivers under the independent menu as other SoCs vendor usually did. Since the menu would be shown depending on "ARCH_MEDIATEK || COMPILE_TEST" selected and MTK_PMIC_WRAP is still safe compiling with the case of "COMPILE_TEST" only, the superfluous dependency for those items under the menu also is also being removed for the sake of simplicity. Signed-off-by: Sean Wang Reviewed-by: Jean Delvare Signed-off-by: Matthias Brugger drivers/soc/mediatek/Kconfig | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ba2dec35e431e62e11116b8036dc372493169b39 Author: Roy Shterman Date: Wed Oct 18 13:46:07 2017 +0300 nvmet: Change max_nsid in subsystem due to ns_disable if needed In case we disable namespaces which has the nsid like subsystem max_nsid we need to search for the next largest nsid in this subsystem. If the subsystem don't has more namespaces we set it to 0, else we take nsid from the last namespace in namespaces list because the list is sorted while inserting. Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Roy Shterman Reviewed-by: Johannes Thumshirn [hch: slight refactor] Signed-off-by: Christoph Hellwig drivers/nvme/target/core.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit e9ce35386b215d3f5d0fbab3cc24b69b8d57d7e6 Author: Yoshihiro Shimoda Date: Thu Oct 12 18:23:30 2017 +0900 arm64: dts: renesas: salvator-common: add dr_mode property for USB2.0 channel 0 Since Salvator-X[S] have a USB2.0 dual-role channel (CN9), this patch adds dr_mode property for USB2.0 channel 0 (EHCI/OHCI and HS-USB) as "otg". Signed-off-by: Yoshihiro Shimoda Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/salvator-common.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 69d0c060ac0cf61f25b35fb2c222c78168d04658 Author: Chenglin Xu Date: Wed Oct 18 16:28:48 2017 +0800 soc: mediatek: pwrap: add support for MT7622 SoC Add the registers, callbacks and data structures required to make the PMIC wrapper work on MT7622. Signed-off-by: Chenglin Xu Signed-off-by: Chen Zhong Signed-off-by: Sean Wang Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 170 +++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) commit 68189ed59d34bf430790c026465b5489c7edad66 Author: Sean Wang Date: Wed Oct 18 16:28:47 2017 +0800 soc: mediatek: pwrap: add common way for setup CS timing extenstion Multiple platforms would always use their own way handling CS timing extension on the bus which leads to a little bit code duplication. Therefore, the patch groups the similar logic to handle CS timing extension into the common function which allows the following SoCs have more reusability for configing CS timing. Signed-off-by: Chenglin Xu Signed-off-by: Sean Wang Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 59 ++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 22 deletions(-) commit 7f80f1007881f1d5c7c37010ecd435946b65061d Author: Sean Wang Date: Wed Oct 18 16:28:46 2017 +0800 soc: mediatek: pwrap: add MediaTek MT6380 as one slave of pwrap Add MediaTek MT6380 regulator becoming one of PMIC wrapper slave and also add extra new regmap_config of 32-bit mode for MT6380 since old regmap_config of 16-bit mode can't be fit into the need. Signed-off-by: Chenglin Xu Signed-off-by: Chen Zhong Signed-off-by: Sean Wang Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit d56b31e2eabfce7e41c3beb67be91f00a03d42ed Author: Sean Wang Date: Wed Oct 18 16:28:45 2017 +0800 soc: mediatek: pwrap: refactor pwrap_init for the various PMIC types pwrap initialization is highly associated with the base SoC and the target PMICs, so slight refactorization is made here for allowing pwrap_init to run on those PMICs with different capability from the previous MediaTek PMICs and the determination for the enablement of the pwrap capability depending on PMIC type. Apart from this, the patch makes the driver more extensible especially when more PMICs join into the pwrap driver. Signed-off-by: Chenglin Xu Signed-off-by: Sean Wang Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 130 ++++++++++++++++++++++++----------- 1 file changed, 90 insertions(+), 40 deletions(-) commit a10616f05307caf31bb45f413c1a3c48c4b130ea Author: Sean Wang Date: Wed Oct 18 16:28:44 2017 +0800 soc: mediatek: pwrap: add pwrap_write32 for writing in 32-bit mode Some regulators such as MediaTek MT6380 also has to be written in 32-bit mode. So the patch adds pwrap_write32, rename old pwrap_write into pwrap_write16 and one additional function pointer is introduced for increasing flexibility allowing the determination which mode is used by the pwrap slave detection through device tree. Signed-off-by: Chenglin Xu Signed-off-by: Chen Zhong Signed-off-by: Sean Wang Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 70 +++++++++++++++++++++++++++--------- 1 file changed, 54 insertions(+), 16 deletions(-) commit ec83368635ac153d58517bd286afc1fe773a1272 Author: Sean Wang Date: Wed Oct 18 16:28:43 2017 +0800 soc: mediatek: pwrap: add pwrap_read32 for reading in 32-bit mode Some regulators such as MediaTek MT6380 has to be read in 32-bit mode. So the patch adds pwrap_read32, rename old pwrap_read into pwrap_read16 and one function pointer is introduced for increasing flexibility allowing the determination which mode is used by the pwrap slave detection through device tree. Signed-off-by: Chenglin Xu Signed-off-by: Chen Zhong Signed-off-by: Sean Wang Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 55 +++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) commit c77d3b8d0ce856836c682617eeaac2ac00164c53 Author: Sean Wang Date: Wed Oct 18 16:28:42 2017 +0800 dt-bindings: arm: mediatek: add MT7622 string to the PMIC wrapper doc Signed-off-by: Chenglin Xu Signed-off-by: Sean Wang Acked-by: Rob Herring Signed-off-by: Matthias Brugger Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8843797df383ac7ed7cf4f87cc18a4ec6d929b60 Author: Geert Uytterhoeven Date: Fri Sep 29 14:17:18 2017 +0200 pinctrl: sh-pfc: Save/restore registers for PSCI system suspend During PSCI system suspend, R-Car Gen3 SoCs are powered down, and their pinctrl register state is lost. Note that as the boot loader skips most initialization after system resume, pinctrl register state differs from the state encountered during normal system boot, too. To fix this, save all GPIO and peripheral function select, module select, drive strength control, bias, and other I/O control registers during system suspend, and restore them during system resume. Note that to avoid overhead on platforms not needing it, the suspend/resume code has a build time dependency on sleep and PSCI support, and a runtime dependency on PSCI. Inspired by a patch in the BSP by Hien Dang. Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/core.c | 97 +++++++++++++++++++++++++++++++++++++++++ drivers/pinctrl/sh-pfc/sh_pfc.h | 1 + 2 files changed, 98 insertions(+) commit 3870a6f6ac255340767de64e71fbbfc54eb39403 Author: Geert Uytterhoeven Date: Fri Sep 29 14:15:17 2017 +0200 pinctrl: sh-pfc: r8a7796: Use generic IOCTRL register description Move R-Car M3-W I/O voltage support over to the generic way to describe IOCTRL registers, which will be needed for suspend/resume support. Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit e2aad8464c0bf183be64c2120a37e87790dba367 Author: Geert Uytterhoeven Date: Fri Sep 29 14:15:06 2017 +0200 pinctrl: sh-pfc: r8a7795: Use generic IOCTRL register description Move R-Car H3 ES2.0 I/O voltage support over to the generic way to describe IOCTRL registers, which will be needed for suspend/resume support. Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 5d9d1d1ae512600bd1d050cc0a55235435fc3050 Author: Geert Uytterhoeven Date: Fri Sep 29 14:14:56 2017 +0200 pinctrl: sh-pfc: r8a7795-es1: Use generic IOCTRL register description Move R-Car H3 ES1.x I/O voltage support over to the generic way to describe IOCTRL registers, which will be needed for suspend/resume support. Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 9e9bd06a353786ac3c01e76606e64aa660243aab Author: Geert Uytterhoeven Date: Fri Sep 29 14:16:31 2017 +0200 pinctrl: sh-pfc: Add generic IOCTRL register description Add a generic way to describe IOCTRL registers (for e.g. SD I/O voltage and time delay control), like is already done for config, drive, and bias registers. This makes the sh-pfc core code aware of these registers, which will ease introducing suspend/resume support later. Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/sh_pfc.h | 5 +++++ 1 file changed, 5 insertions(+) commit 1860bb134fc29dee0aeb912ae20799119b920df9 Author: Geert Uytterhoeven Date: Fri Sep 29 17:12:39 2017 +0200 pinctrl: sh-pfc: Remove obsolete sh_pfc_pin_to_bias_info() All users of sh_pfc_pin_to_bias_info() and the related data structures have been converted to sh_pfc_pin_to_bias_reg(), so those can be removed. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart drivers/pinctrl/sh-pfc/core.c | 15 --------------- drivers/pinctrl/sh-pfc/core.h | 3 --- drivers/pinctrl/sh-pfc/sh_pfc.h | 6 ------ 3 files changed, 24 deletions(-) commit 3f8833ad66519cf2e4373bf3153f9937ef691717 Author: Geert Uytterhoeven Date: Fri Sep 29 16:57:20 2017 +0200 pinctrl: sh-pfc: r8a7778: Use generic bias register description Move R-Car M1A bias support over to the generic way to describe bias registers. As the new description is more compact, this decreases kernel size by ca. 148 bytes. Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7778.c | 403 +++++++++++++++++++---------------- 1 file changed, 222 insertions(+), 181 deletions(-) commit 58668a67afa19a445f6446d7abc1636ad5237c68 Author: Geert Uytterhoeven Date: Fri Sep 29 14:14:29 2017 +0200 pinctrl: sh-pfc: r8a7796: Use generic bias register description Move R-Car M3-W bias support over to the generic way to describe bias registers, which will be needed for suspend/resume support. As the new description is more compact, this decreases kernel size by ca. 304 bytes. Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 499 ++++++++++++++++++----------------- 1 file changed, 258 insertions(+), 241 deletions(-) commit 6f4b74f37576a6d1356b435c42df07d2b8dc9e13 Author: Geert Uytterhoeven Date: Fri Sep 29 14:13:35 2017 +0200 pinctrl: sh-pfc: r8a7795: Use generic bias register description Move R-Car H3 ES2.0 bias support over to the generic way to describe bias registers, which will be needed for suspend/resume support. As the new description is more compact, this decreases kernel size by ca. 308 bytes. Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 499 ++++++++++++++++++----------------- 1 file changed, 258 insertions(+), 241 deletions(-) commit e1a16b5b426c5c10dbe2653af93d12d939855b65 Author: Geert Uytterhoeven Date: Fri Sep 29 14:12:32 2017 +0200 pinctrl: sh-pfc: r8a7795-es1: Use generic bias register description Move R-Car H3 ES1.x bias support over to the generic way to describe bias registers, which will be needed for suspend/resume support. As the new description is more compact, this decreases kernel size by ca. 304 bytes. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 499 ++++++++++++++++--------------- 1 file changed, 258 insertions(+), 241 deletions(-) commit acdb12453910d86dce3baa95c12178893c0aa32d Author: Geert Uytterhoeven Date: Fri Sep 29 15:44:38 2017 +0200 pinctrl: sh-pfc: Add sh_pfc_pin_to_bias_reg() helper Add a helper to look up bias registers and bit number for a specific pin, using the generic bias register description. Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/core.c | 20 ++++++++++++++++++++ drivers/pinctrl/sh-pfc/core.h | 3 +++ 2 files changed, 23 insertions(+) commit beaa34d9080f20c9f0994071703c5d5c012afb56 Author: Geert Uytterhoeven Date: Fri Sep 29 14:16:14 2017 +0200 pinctrl: sh-pfc: Add generic bias register description Add a generic way to describe bias registers (for pull-up/down control), like is already done for config and drive registers. This makes the sh-pfc core code aware of these registers, which will ease introducing suspend/resume support later. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart drivers/pinctrl/sh-pfc/sh_pfc.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit e16a2c7aced8422cda2b7f13ea3f3daccb150db6 Author: Geert Uytterhoeven Date: Fri Sep 29 11:03:11 2017 +0200 pinctrl: sh-pfc: Drop width parameter of sh_pfc_{read,write}_reg() On modern Renesas SoCs, all PFC registers are 32-bit, and all callers of sh_pfc_{read,write}_reg() already operate on 32-bit registers only. Hence make the 32-bit width implicit, and rename the functions to sh_pfc_{read,write}() to shorten lines. All accesses to 8-bit or 16-bit registers are still done using sh_pfc_{read,write}_raw_reg(). Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart drivers/pinctrl/sh-pfc/core.c | 8 ++++---- drivers/pinctrl/sh-pfc/core.h | 5 ++--- drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 12 ++++++------ drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 12 ++++++------ drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 12 ++++++------ drivers/pinctrl/sh-pfc/pinctrl.c | 12 ++++++------ 6 files changed, 30 insertions(+), 31 deletions(-) commit 35406b1fd68dec6d8b1badd69fcfb65646745dfd Author: Geert Uytterhoeven Date: Fri Sep 29 10:08:56 2017 +0200 pinctrl: sh-pfc: Remove matching on plain sh-pfc platform device As of commit 8682b3c522c639f3 ("sh-pfc: Remove platform device registration"), plain "sh-pfc" platform devices are no longer created. Hence remove their match entry, and the now obsolete checks for missing device IDs and driver data. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart drivers/pinctrl/sh-pfc/core.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit d9ee91c1b1fe56b905b767f4a0063d3624e1a1cf Author: Thomas Gleixner Date: Fri Oct 20 11:15:36 2017 +0200 irqchip/meson: Disable COMPILE_TEST The driver fails to compile with CONFIG_COMPILE_TEST=y on x86: irq-meson-gpio.c: In function ‘meson_gpio_irq_parse_dt’: irq-meson-gpio.c:343:8: error: implicit declaration of function ‘of_property_read_variable_u32_array’ ret = of_property_read_variable_u32_array(node, Adding COMPILE_TEST to a driver requires at least compile testing it for x86.... Reported-by: Ingo Molnar Signed-off-by: Thomas Gleixner Cc: Heiner Kallweit Cc: Jerome Brunet Cc: Marc Zyngier drivers/irqchip/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f7a4d084159c52513d1ff77f3b3b880bcf517d9 Author: Geert Uytterhoeven Date: Wed Jun 28 21:15:49 2017 +0200 clk: renesas: rcar-gen3: Restore R clock during resume On R-Car Gen3 systems, PSCI system suspend powers down the SoC, losing clock configuration. Register a notifier to save/restore the RCKCR register during system suspend/resume. Signed-off-by: Geert Uytterhoeven Tested-by: Niklas Söderlund drivers/clk/renesas/rcar-gen3-cpg.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 9f55b17ff6387ab9c4caa9280e2e194bb03ad532 Author: Geert Uytterhoeven Date: Wed Jun 21 22:51:21 2017 +0200 clk: renesas: rcar-gen3: Restore SDHI clocks during resume On R-Car Gen3 systems, PSCI system suspend powers down the SoC, losing clock configuration. Register a notifier to save/restore SDHI clock registers during system suspend/resume. This is implemented using the cpg_simple_notifier abstraction, which can be reused for others clocks that just need to save/restore a single register. Signed-off-by: Geert Uytterhoeven Tested-by: Niklas Söderlund drivers/clk/renesas/rcar-gen3-cpg.c | 63 +++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 13 deletions(-) commit 9f8c71e5134982cdf8ee35acb204715a2a47ba2e Author: Geert Uytterhoeven Date: Wed Jun 21 22:34:33 2017 +0200 clk: renesas: div6: Restore clock state during resume On R-Car Gen3 systems, PSCI system suspend powers down the SoC, losing clock configuration. Register an (optional) notifier to restore the DIV6 clock state during system resume. As DIV6 clocks can be picky w.r.t. modifying multiple register fields at once, restore is not implemented by blindly restoring the register value, but by using the existing cpg_div6_clock_{en,dis}able() helpers. Note that this does not yet support DIV6 clocks with multiple parents, which do not exist on R-Car Gen3 SoCs. Signed-off-by: Geert Uytterhoeven Tested-by: Niklas Söderlund drivers/clk/renesas/clk-div6.c | 38 ++++++++++++++++++++++++++++++++-- drivers/clk/renesas/clk-div6.h | 3 ++- drivers/clk/renesas/renesas-cpg-mssr.c | 3 ++- 3 files changed, 40 insertions(+), 4 deletions(-) commit 1f4023cdd1bdbe6cb01d0b2cbd1f46207189e3cf Author: Geert Uytterhoeven Date: Wed Jun 21 22:24:15 2017 +0200 clk: renesas: cpg-mssr: Add support to restore core clocks during resume On R-Car Gen3 systems, PSCI system suspend powers down the SoC, possibly losing clock configuration. Hence add a notifier chain that can be used by core clocks to save/restore clock state during system suspend/resume. The implementation of the actual clock state save/restore operations is clock-specific, and to be registered with the notifier chain in the SoC or family-specific cpg_mssr_info.cpg_clk_register() callback. Signed-off-by: Geert Uytterhoeven Tested-by: Niklas Söderlund drivers/clk/renesas/rcar-gen2-cpg.c | 7 +++---- drivers/clk/renesas/rcar-gen2-cpg.h | 6 +++--- drivers/clk/renesas/rcar-gen3-cpg.c | 3 ++- drivers/clk/renesas/rcar-gen3-cpg.h | 3 ++- drivers/clk/renesas/renesas-cpg-mssr.c | 12 +++++++++++- drivers/clk/renesas/renesas-cpg-mssr.h | 3 ++- 6 files changed, 23 insertions(+), 11 deletions(-) commit 560869100b99a3daea329efce738a3b7ae357be8 Author: Geert Uytterhoeven Date: Wed Jun 7 13:20:06 2017 +0200 clk: renesas: cpg-mssr: Restore module clocks during resume During PSCI system suspend, R-Car Gen3 SoCs are powered down, and their clock register state is lost. Note that as the boot loader skips most initialization after system resume, clock register state differs from the state encountered during normal system boot, too. Hence after s2ram, some operations may fail because module clocks are disabled, while drivers expect them to be still enabled. E.g. EtherAVB fails when Wake-on-LAN has been enabled using "ethtool -s eth0 wol g": ravb e6800000.ethernet eth0: failed to switch device to config mode ravb e6800000.ethernet eth0: device will be stopped after h/w processes are done. ravb e6800000.ethernet eth0: failed to switch device to config PM: Device e6800000.ethernet failed to resume: error -110 In addition, some module clocks that were disabled by clk_disable_unused() may have been re-enabled, wasting power. To fix this, restore all bits of the SMSTPCR registers that represent clocks under control of Linux. Notes: - While this fixes EtherAVB operation after resume from s2ram, EtherAVB cannot be used as an actual wake-up source from s2ram, only from s2idle, due to PSCI limitations, - To avoid overhead on platforms not needing it, the suspend/resume code has a build time dependency on sleep and PSCI support, and a runtime dependency on PSCI. Signed-off-by: Geert Uytterhoeven Tested-by: Niklas Söderlund drivers/clk/renesas/renesas-cpg-mssr.c | 84 ++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) commit 52f737c2da40259ac9962170ce608b6fb1b55ee4 Author: Kees Cook Date: Thu Oct 19 13:28:38 2017 -0700 timer: Provide wrappers safe for use with LOCKDEP Under LOCKDEP, the timer lock_class_key (set up in __setup_timer) needs to be tied to the caller's context, so an inline for timer_setup() won't work. We do, however, want to keep the inline version around for argument type checking, though, so this provides macro wrappers in the LOCKDEP case. This fixes the case of different timers sharing the same LOCKDEP instance, and producing a false positive warning: [ 580.840858] ====================================================== [ 580.842299] WARNING: possible circular locking dependency detected [ 580.843684] 4.14.0-rc4+ #17 Not tainted [ 580.844554] ------------------------------------------------------ [ 580.845945] swapper/9/0 is trying to acquire lock: [ 580.847024] (slock-AF_INET){+.-.}, at: [] tcp_write_timer+0x24/0xd0 [ 580.848834] but task is already holding lock: [ 580.850107] ((timer)#2){+.-.}, at: [] call_timer_fn+0x0/0x300 [ 580.851663] which lock already depends on the new lock. [ 580.853439] the existing dependency chain (in reverse order) is: [ 580.855311] -> #1 ((timer)#2){+.-.}: [ 580.856538] __lock_acquire+0x114d/0x11a0 [ 580.857506] lock_acquire+0xb0/0x1d0 [ 580.858373] del_timer_sync+0x3c/0xb0 [ 580.859260] inet_csk_reqsk_queue_drop+0x7f/0x1b0 ... -> #0 (slock-AF_INET){+.-.}: [ 580.884980] check_prev_add+0x666/0x700 [ 580.885790] __lock_acquire+0x114d/0x11a0 [ 580.886575] lock_acquire+0xb0/0x1d0 [ 580.887289] _raw_spin_lock+0x2c/0x40 [ 580.888021] tcp_write_timer+0x24/0xd0 ... [ 580.900055] Possible unsafe locking scenario: [ 580.901043] CPU0 CPU1 [ 580.901797] ---- ---- [ 580.902540] lock((timer)#2); [ 580.903046] lock(slock-AF_INET); [ 580.904006] lock((timer)#2); [ 580.904915] lock(slock-AF_INET); [ 580.905502] In this report, del_timer_sync() is from: inet_csk_reqsk_queue_drop() reqsk_queue_unlink() del_timer_sync(&req->rsk_timer) but tcp_write_timer()'s timer is attached to icsk_retransmit_timer. Both had the same lock_class_key, since they were using timer_setup(). Switching to a macro allows for a separate context, avoiding the false positive. Fixes: 686fef928bba ("timer: Prepare to change timer callback argument type") Reported-by: Craig Gallek Suggested-by: Eric Dumazet Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: netdev@vger.kernel.org Cc: "David S. Miller" Link: https://lkml.kernel.org/r/20171019202838.GA43223@beast include/linux/timer.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 9b17374e11c7ce2cf0b2b990fa4aa0360921aa2b Author: Masami Hiramatsu Date: Fri Oct 6 08:16:37 2017 +0900 kprobes/docs: Remove jprobes related documents Remove jprobes related documentation from kprobes.txt. Also add some migration advice for the people who are still using jprobes. Signed-off-by: Masami Hiramatsu Cc: Alexei Starovoitov Cc: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Cc: David S . Miller Cc: Ian McDonald Cc: Kees Cook Cc: Linus Torvalds Cc: Paul E . McKenney Cc: Peter Zijlstra Cc: Stephen Hemminger Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Vlad Yasevich Link: http://lkml.kernel.org/r/150724539698.5014.7300022363980503141.stgit@devbox [ Fixes to the new documentation. ] Signed-off-by: Ingo Molnar Documentation/kprobes.txt | 159 +++++++++++++++++----------------------------- 1 file changed, 57 insertions(+), 102 deletions(-) commit 9be95bdc53c12ada23e39027237fd05e1393d893 Author: Masami Hiramatsu Date: Fri Oct 6 08:15:57 2017 +0900 kprobes: Remove the jprobes sample code Remove the jprobes sample module because jprobes are deprecated. Signed-off-by: Masami Hiramatsu Cc: Alexei Starovoitov Cc: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Cc: David S . Miller Cc: Ian McDonald Cc: Kees Cook Cc: Linus Torvalds Cc: Paul E . McKenney Cc: Peter Zijlstra Cc: Stephen Hemminger Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Vlad Yasevich Link: http://lkml.kernel.org/r/150724535709.5014.7261513316230565780.stgit@devbox Signed-off-by: Ingo Molnar samples/kprobes/Makefile | 2 +- samples/kprobes/jprobe_example.c | 67 ---------------------------------------- 2 files changed, 1 insertion(+), 68 deletions(-) commit 2c7d662e2647aa55fa56dc449b3878ac24e17adf Author: Masami Hiramatsu Date: Fri Oct 6 08:15:17 2017 +0900 kprobes: Disable the jprobes test code Disable jprobes test code because jprobes are deprecated. This code will be completely removed when the jprobe code is removed. Signed-off-by: Masami Hiramatsu Cc: Alexei Starovoitov Cc: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Cc: David S . Miller Cc: Ian McDonald Cc: Kees Cook Cc: Linus Torvalds Cc: Paul E . McKenney Cc: Peter Zijlstra Cc: Stephen Hemminger Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Vlad Yasevich Link: http://lkml.kernel.org/r/150724531730.5014.6377596890962355763.stgit@devbox Signed-off-by: Ingo Molnar kernel/test_kprobes.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 590c845930457d25d27dc1fdd964a1ce18ef2d7d Author: Masami Hiramatsu Date: Fri Oct 6 08:14:37 2017 +0900 kprobes: Disable the jprobes APIs Disable the jprobes APIs and comment out the jprobes API function code. This is in preparation of removing all jprobes related code (including kprobe's break_handler). Nowadays ftrace and other tracing features are mature enough to replace jprobes use-cases. Users can safely use ftrace and perf probe etc. for their use cases. Signed-off-by: Masami Hiramatsu Cc: Alexei Starovoitov Cc: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Cc: David S . Miller Cc: Ian McDonald Cc: Kees Cook Cc: Linus Torvalds Cc: Paul E . McKenney Cc: Peter Zijlstra Cc: Stephen Hemminger Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Vlad Yasevich Link: http://lkml.kernel.org/r/150724527741.5014.15465541485637899227.stgit@devbox Signed-off-by: Ingo Molnar include/linux/kprobes.h | 40 ++++++++++++++++++---------------------- kernel/kprobes.c | 2 ++ 2 files changed, 20 insertions(+), 22 deletions(-) commit ca4b9c3b743da39a6e0756a5c68edb35f6fc5e53 Merge: a30b85d 275d34b Author: Ingo Molnar Date: Fri Oct 20 11:02:05 2017 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit d9341f2b00c0f2a50e1fada55f6a2a2c51818ae6 Author: Geert Uytterhoeven Date: Wed Sep 13 09:44:54 2017 +0200 MAINTAINERS: Add git repository to Renesas clock driver section Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Acked-by: Stephen Boyd MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 9dc0ddee8d6dcc201b7f9ebc1c0834b0fa306096 Author: Fabrizio Castro Date: Fri Oct 13 16:22:21 2017 +0100 clk: renesas: cpg-mssr: Add du1 clock to R8A7745 Signed-off-by: Fabrizio Castro Reviewed-by: Biju Das Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7745-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+) commit d454cecc637b90996ab15b2e61a6cc51b7e1463c Author: Geert Uytterhoeven Date: Thu Oct 12 10:54:22 2017 +0200 clk: renesas: rz: clk-rz is meant for RZ/A1 The RZ family of Renesas SoCs has several different subfamilies (RZ/A, RZ/G, RZ/N, and RZ/T). Clarify that the renesas,rz-cpg-clocks DT bindings and clk-rz driver apply to RZ/A1 only. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Acked-by: Rob Herring Documentation/devicetree/bindings/clock/renesas,rz-cpg-clocks.txt | 4 ++-- drivers/clk/renesas/clk-rz.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit da20ab35180780e4a6eadc804544f1fa967f3567 Author: Dave Hansen Date: Wed Oct 18 10:21:07 2017 -0700 x86/entry: Use SYSCALL_DEFINE() macros for sys_modify_ldt() We do not have tracepoints for sys_modify_ldt() because we define it directly instead of using the normal SYSCALL_DEFINEx() macros. However, there is a reason sys_modify_ldt() does not use the macros: it has an 'int' return type instead of 'unsigned long'. This is a bug, but it's a bug cemented in the ABI. What does this mean? If we return -EINVAL from a function that returns 'int', we have 0x00000000ffffffea in %rax. But, if we return -EINVAL from a function returning 'unsigned long', we end up with 0xffffffffffffffea in %rax, which is wrong. To work around this and maintain the 'int' behavior while using the SYSCALL_DEFINEx() macros, so we add a cast to 'unsigned int' in both implementations of sys_modify_ldt(). Signed-off-by: Dave Hansen Reviewed-by: Andy Lutomirski Reviewed-by: Brian Gerst Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171018172107.1A79C532@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/syscalls.h | 2 +- arch/x86/kernel/ldt.c | 16 +++++++++++++--- arch/x86/um/ldt.c | 7 +++++-- 3 files changed, 19 insertions(+), 6 deletions(-) commit 762a1f2098b2fd4f84ccdb62d5747fff1ad7f816 Author: Neil Armstrong Date: Mon Oct 16 17:34:45 2017 +0200 clk: meson: gxbb: Add VPU and VAPB clocks data The Amlogic Meson GX SoCs needs these two clocks to power up the VPU power domain. These two clocks are similar to the MALI clocks by having a glitch-free mux and two similar clocks with gate, divider and muxes. Acked-by: Jerome Brunet [narmstrong: removed the CLK_IGNORE_UNUSED on muxes and dividers] Signed-off-by: Neil Armstrong drivers/clk/meson/gxbb.c | 292 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 292 insertions(+) commit 6a2f0641d3c268ee8703b9d14fa49c3f900ca30c Author: Madhav Chauhan Date: Fri Oct 13 18:15:00 2017 +0530 drm/i915: Use existing DSI backlight ports info This patch re-use already parsed DSI backlight/cabc ports info for saving it inside struct intel_dsi rather than parsing it at the time of DSI initialization. V2: Remove backlight and cabc variable initialization (Jani N). Reviewed-by: Jani Nikula Signed-off-by: Madhav Chauhan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1507898700-20016-2-git-send-email-madhav.chauhan@intel.com drivers/gpu/drm/i915/intel_bios.c | 2 -- drivers/gpu/drm/i915/intel_dsi.c | 37 ++++--------------------------------- 2 files changed, 4 insertions(+), 35 deletions(-) commit 46e5832014480ba70daf41a80489c0d11d431e08 Author: Madhav Chauhan Date: Fri Oct 13 18:14:59 2017 +0530 drm/i915: Parse DSI backlight/cabc ports. This patch parse DSI backlight/cabc ports info from VBT and save them inside local structure. This saved info can be directly used while initializing DSI for different platforms instead of parsing for each platform. V2: Changes: - Typo fix in commit message. - Move up newly added port variables (Jani N) - Remove redundant initialization (Jani N) - Don't parse CABC ports if not supported (Jani N) V3: Patch restructure (Suggested by Jani N) Credits-to: Jani Nikula Signed-off-by: Madhav Chauhan Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1507898700-20016-1-git-send-email-madhav.chauhan@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_bios.c | 57 ++++++++++++++++++++++++++++++++------- 2 files changed, 49 insertions(+), 10 deletions(-) commit 4cf8f811c64ab570d40cb2f4bfc723750aec122f Author: Neil Armstrong Date: Mon Oct 16 17:34:44 2017 +0200 clk: meson: gxbb: Add VPU and VAPB clockids Add the clkids for the clocks feeding the Video Processing Unit. Acked-by: Jerome Brunet Signed-off-by: Neil Armstrong drivers/clk/meson/gxbb.h | 6 +++++- include/dt-bindings/clock/gxbb-clkc.h | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) commit 1c236d411d8b163adca49009857e7c2745185038 Author: Jaejoong Kim Date: Fri Oct 20 16:29:15 2017 +0900 usb: misc: usbtest: remove duplicate & operation usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] by & operation with 0x7ff. So, we can remove the duplicate & operation with 0x7ff. Signed-off-by: Jaejoong Kim Signed-off-by: Felipe Balbi drivers/usb/misc/usbtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7521d47960d6a7f3b5f9f26d4baf5f97e050d7ac Author: Jaejoong Kim Date: Fri Oct 20 16:29:14 2017 +0900 usb: gadget: udc: gr: remove duplicate & operation usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] by & operation with 0x7ff. So, we can remove the duplicate & operation with 0x7ff. Signed-off-by: Jaejoong Kim Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/gr_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99bcb23851ffa19d8ad13cd35100990559aac82c Author: Jaejoong Kim Date: Fri Oct 20 16:29:13 2017 +0900 usb: gadget: udc: remove duplicate & operation usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] by & operation with 0x7ff. So, we can remove the duplicate & operation with 0x7ff. Signed-off-by: Jaejoong Kim Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1357bdb21f2af1e62b8858488a7bccd0fea63e69 Author: Icenowy Zheng Date: Wed Oct 18 21:06:27 2017 +0800 ARM: sun8i: r40: enable USB host for Banana Pi M2 Ultra Banana Pi M2 Ultra board features two USB host ports, connected to the two USB host ports on the SoC. Add support for them. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit a3c09346cf4c830fbccf6ba6e22eed6a48724ed1 Author: Icenowy Zheng Date: Wed Oct 18 21:06:26 2017 +0800 ARM: sun8i: v40: add 5V regulator for Banana Pi M2 Berry On the Banana Pi M2 Berry board, the 5V power output (used by HDMI, SATA and USB) is controlled via a GPIO. Add regulator node for it. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit 0ca12c1ee43ca2decd438e0c0d0550c84fa122c5 Author: Icenowy Zheng Date: Wed Oct 18 21:06:25 2017 +0800 ARM: sun8i: r40: add 5V regulator for Banana Pi M2 Ultra On newer revisions of the Banana Pi M2 Ultra boards, the 5V power output (used by HDMI, SATA and USB) is controller via a GPIO. Add the regulator node for it. Older revisions just have the 5V power output always on, and the GPIO is reserved on these boards. So it won't affect the older revisions. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit 0e526b4d553a3961fe1e49fec3238778273dd549 Author: Icenowy Zheng Date: Wed Oct 18 21:06:24 2017 +0800 ARM: sun8i: r40: add USB host port nodes for R40 Allwinner R40 SoC features a USB OTG port and two USB HOST ports. Add support for the host ports in the DTSI file. The OTG controller still cannot work with existing compatibles, and needs more investigation. So it's not added yet. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-r40.dtsi | 72 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit a30b85df7d599f626973e9cd3056fe755bd778e0 Author: Masami Hiramatsu Date: Fri Oct 20 08:43:39 2017 +0900 kprobes: Use synchronize_rcu_tasks() for optprobe with CONFIG_PREEMPT=y We want to wait for all potentially preempted kprobes trampoline execution to have completed. This guarantees that any freed trampoline memory is not in use by any task in the system anymore. synchronize_rcu_tasks() gives such a guarantee, so use it. Also, this guarantees to wait for all potentially preempted tasks on the instructions which will be replaced with a jump. Since this becomes a problem only when CONFIG_PREEMPT=y, enable CONFIG_TASKS_RCU=y for synchronize_rcu_tasks() in that case. Signed-off-by: Masami Hiramatsu Acked-by: Paul E. McKenney Cc: Ananth N Mavinakayanahalli Cc: Linus Torvalds Cc: Naveen N . Rao Cc: Paul E . McKenney Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/150845661962.5443.17724352636247312231.stgit@devbox Signed-off-by: Ingo Molnar arch/Kconfig | 2 +- kernel/kprobes.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) commit 9854d758f7215ceea7da625cb421e0674846b53c Merge: 3732053 bc5e3a5 Author: David S. Miller Date: Fri Oct 20 08:42:09 2017 +0100 Merge tag 'rxrpc-next-20171018' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Add bits for kernel services Here are some patches that add a few things for kernel services to use: (1) Allow service upgrade to be requested and allow the resultant actual service ID to be obtained. (2) Allow the RTT time of a call to be obtained. (3) Allow a kernel service to find out if a call is still alive on a server between transmitting a request and getting the reply. (4) Allow data transmission to ignore signals if transmission progress is being made in reasonable time. This is also usable by userspace by passing MSG_WAITALL to sendmsg()[*]. [*] I'm not sure this is the right interface for this or whether a sockopt should be used instead. ==================== Signed-off-by: David S. Miller commit 2cbfca66ba5e00606bb0f24aba1e9cd8efe58849 Author: Andrew Jeffery Date: Fri Oct 20 13:27:58 2017 +1030 gpio: Fix loose spelling Literally. I expect "lose" was meant here, rather than "loose", though you could feasibly use a somewhat uncommon definition of "loose" to mean what would be meant by "lose": "Loose the hounds" for instance, as in "Release the hounds". Substituting in "value" for "hounds" gives "release the value", and makes some sense, but futher substituting back to loose gives "loose the value" which overall just seems a bit anachronistic. Instead, use modern, pragmatic English and save a character. Cc: Russell Currey Signed-off-by: Andrew Jeffery Signed-off-by: Linus Walleij drivers/gpio/gpiolib-of.c | 4 ++-- drivers/gpio/gpiolib.c | 6 +++--- drivers/gpio/gpiolib.h | 2 +- include/dt-bindings/gpio/gpio.h | 2 +- include/linux/gpio/machine.h | 2 +- include/linux/of_gpio.h | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) commit 37320537318934878cc02d8e6103e1be5696fe9f Merge: d18b4b3 66cc044 Author: David S. Miller Date: Fri Oct 20 08:37:28 2017 +0100 Merge tag 'wireless-drivers-next-for-davem-2017-10-18' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.15 The first pull request for 4.15, unusually late this time but still relatively small. Also includes merge from wireless-drivers to fix conflicts in iwlwifi. Major changes: rsi * add P2P mode support * sdio suspend and resume support iwlwifi * A fix and an addition for PCI devices for the A000 family * Dump PCI registers when an error occurs, to make it easier to debug rtlwifi * add support for 64 bit DMA, enabled with a module parameter * add module parameter to enable ASPM ==================== Signed-off-by: David S. Miller commit d18b4b35e310c5e30a3726309a93db8893cd3251 Author: Arnd Bergmann Date: Wed Oct 18 10:33:37 2017 +0200 net: sched: cls_u32: use hash_ptr() for tc_u_hash After the change to the tp hash, we now get a build warning on 32-bit architectures: net/sched/cls_u32.c: In function 'tc_u_hash': net/sched/cls_u32.c:338:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] return hash_64((u64) tp->chain->block, U32_HASH_SHIFT); Using hash_ptr() instead of hash_64() lets us drop the cast and fixes the warning while still resulting in the same hash value. Fixes: 7fa9d974f3c2 ("net: sched: cls_u32: use block instead of q in tc_u_common") Signed-off-by: Arnd Bergmann Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_u32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c75e427d9349ec3e0059752cc784e1c301474c2d Author: Dan Carpenter Date: Wed Oct 18 10:48:25 2017 +0300 tipc: checking for NULL instead of IS_ERR() The tipc_alloc_conn() function never returns NULL, it returns error pointers, so I have fixed the check. Fixes: 14c04493cb77 ("tipc: add ability to order and receive topology events in driver") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller net/tipc/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6575f35415c406b58e9f6235df4b8272f8696131 Merge: 7a0947e b4804e0 Author: David S. Miller Date: Fri Oct 20 08:32:49 2017 +0100 Merge branch 'sh_eth-fallback-compat-strings' Simon Horman says: ==================== net: sh_eth: add R-Car Gen[12] fallback compatibility strings Add fallback compatibility strings for R-Car Gen 1 and 2. In the case of Renesas R-Car hardware we know that there are generations of SoCs, f.e. 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 is being adopted for drivers for Renesas SoCs. Changes since v1: * Correct typos in changelogs * Consistently use tabs for indentation in bindings document * Enhance readability of description of bindings usage ==================== Signed-off-by: David S. Miller commit b4804e0c71c144b673b6c53ca4acfcac6eb98704 Author: Simon Horman Date: Wed Oct 18 09:21:28 2017 +0200 net: sh_eth: implement R-Car Gen[12] fallback compatibility strings Implement fallback compatibility strings for R-Car Gen 1 and 2. In the case of Renesas R-Car hardware we know that there are generations of SoCs, f.e. 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 is being adopted for drivers for Renesas SoCs. Note that R-Car Gen2 and RZ/G1 have many compatible IP blocks. The approach that has been consistently taken for other IP blocks is to name common code, compatibility strings and so on after R-Car Gen2. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 2 ++ 1 file changed, 2 insertions(+) commit 6c4b2f7e675cf11587182f51adcf0e129005e2f9 Author: Simon Horman Date: Wed Oct 18 09:21:27 2017 +0200 net: sh_eth: rename name structures as rcar_gen[12]_* Rename structures describing R-Car SoCs as rcar_gen[12]_* rather than r8a77[79]x_*. This seems a little easier on the eyes. And will make things slightly cleaner in a follow-up patch that adds fallback-compatibility strings for these SoCs. Note that R-Car Gen2 and RZ/G1 have many compatible IP blocks. The approach that has been consistently taken for other IP blocks is to name common code, compatibility strings and so on after R-Car Gen2. Also rename sh_eth_set_rate_r8a777x as sh_eth_set_rate_rcar as it it is used by the R-Car generations supported by the driver. This patch should have no run-time effect and is compile-tested only. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/sh_eth.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 87d9fa647020fb65985ec08826f6c77b9b4084af Author: Simon Horman Date: Wed Oct 18 09:21:26 2017 +0200 dt-bindings: net: sh_eth: add R-Car Gen[12] fallback compatibility strings Add fallback compatibility strings for R-Car Gen 1 and 2. In the case of Renesas R-Car hardware we know that there are generations of SoCs, f.e. 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 is being adopted for drivers for Renesas SoCs. Note that R-Car Gen2 and RZ/G1 have many compatible IP blocks. The approach that has been consistently taken for other IP blocks is to name common code, compatibility strings and so on after R-Car Gen2. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/sh_eth.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit e588710311ee5bece284871d613418831d56f2bd Author: Alexander Kochetkov Date: Wed Oct 4 14:37:23 2017 +0300 dmaengine: pl330: fix descriptor allocation fail If two concurrent threads call pl330_get_desc() when DMAC descriptor pool is empty it is possible that allocation for one of threads will fail with message: kernel: dma-pl330 20078000.dma-controller: pl330_get_desc:2469 ALERT! Here how that can happen. Thread A calls pl330_get_desc() to get descriptor. If DMAC descriptor pool is empty pl330_get_desc() allocates new descriptor on shared pool using add_desc() and then get newly allocated descriptor using pluck_desc(). At the same time thread B calls pluck_desc() and take newly allocated descriptor. In that case descriptor allocation for thread A will fail. Using on-stack pool for new descriptor allow avoid the issue described. The patch modify pl330_get_desc() to use on-stack pool for allocation new descriptors. Signed-off-by: Alexander Kochetkov Tested-by: Marek Szyprowski Signed-off-by: Vinod Koul drivers/dma/pl330.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) commit 847449f23dcbff68234525f90dd53c7c7db18cad Author: Hiroyuki Yokoyama Date: Thu Oct 19 01:15:13 2017 +0000 dmaengine: rcar-dmac: use TCRB instead of TCR for residue SYS/RT/Audio DMAC includes independent data buffers for reading and writing. Therefore, the read transfer counter and write transfer counter have different values. TCR indicates read counter, and TCRB indicates write counter. The relationship is like below. TCR TCRB [SOURCE] -> [DMAC] -> [SINK] In the MEM_TO_DEV direction, what really matters is how much data has been written to the device. If the DMA is interrupted between read and write, then, the data doesn't end up in the destination, so shouldn't be counted. TCRB is thus the register we should use in this cases. In the DEV_TO_MEM direction, the situation is more complex. Both the read and write side are important. What matters from a data consumer point of view is how much data has been written to memory. On the other hand, if the transfer is interrupted between read and write, we'll end up losing data. It can also be important to report. In the MEM_TO_MEM direction, what matters is of course how much data has been written to memory from data consumer point of view. Here, because read and write have independent data buffers, it will take a while for TCR and TCRB to become equal. Thus we should check TCRB in this case, too. Thus, all cases we should check TCRB instead of TCR. Without this patch, Sound Capture has noise after PluseAudio support (= 07b7acb51d2 ("ASoC: rsnd: update pointer more accurate")), because the recorder will use wrong residue counter which indicates transferred from sound device, but in reality the data was not yet put to memory and recorder will record it. Signed-off-by: Hiroyuki Yokoyama [Kuninori: added detail information in log] Signed-off-by: Kuninori Morimoto Reviewed-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: Vinod Koul drivers/dma/sh/rcar-dmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19f470b2e47ddde4ad51744c2e140b86524b1f5a Merge: 282dc83 e139cd2 Author: Dave Airlie Date: Fri Oct 20 15:54:44 2017 +1000 Merge tag 'drm-amdkfd-next-2017-10-18' of git://people.freedesktop.org/~gabbayo/linux into drm-next This is the amdkfd pull request for 4.15 merge window. The patches here are relevant only for Kaveri and Carrizo. Still no dGPU patches. The main goal is to continue alignment with the internal AMD development tree. The following is a summary of the changes: - Improvements and fixes to suspend/resume code - Improvements and fixes to process termination code - Cleanups in the queue unmapping functionality - Reuse code from amdgpu * tag 'drm-amdkfd-next-2017-10-18' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: Improve multiple SDMA queues support per process drm/amdkfd: Limit queue number per process and device to 127 drm/amdkfd: Clean up process queue management drm/amdkfd: Compress unnecessary function parameters drm/amdkfd: Improve process termination handling drm/amdkfd: Avoid submitting an unnecessary packet to HWS drm/amdkfd: Fix MQD updates drm/amdkfd: Pass filter params to unmap_queues_cpsch drm/amdkfd: move locking outside of unmap_queues_cpsch drm/amdkfd: Avoid name confusion involved in queue unmapping drm/amdkfd: Drop _nocpsch suffix from shared functions drm/amdkfd: Reuse CHIP_* from amdgpu v2 drm/amdkfd: Use VMID bitmap from KGD v2 drm/amdkfd: Adjust dequeue latencies and timeouts drm/amdkfd: Rectify the jiffies calculation error with milliseconds v2 drm/amdkfd: Fix suspend/resume issue on Carrizo v2 drm/amdkfd: Reorganize kfd resume code commit dbbbe1105ea6aa0c49d78a4ea0d924e0c02307eb Author: Richard Guy Briggs Date: Wed Oct 11 20:57:14 2017 -0400 capabilities: audit log other surprising conditions The existing condition tested for process effective capabilities set by file attributes but intended to ignore the change if the result was unsurprisingly an effective full set in the case root is special with a setuid root executable file and we are root. Stated again: - When you execute a setuid root application, it is no surprise and expected that it got all capabilities, so we do not want capabilities recorded. if (pE_grew && !(pE_fullset && (eff_root || real_root) && root_priveleged) ) Now make sure we cover other cases: - If something prevented a setuid root app getting all capabilities and it wound up with one capability only, then it is a surprise and should be logged. When it is a setuid root file, we only want capabilities when the process does not get full capabilities.. root_priveleged && setuid_root && !pE_fullset - Similarly if a non-setuid program does pick up capabilities due to file system based capabilities, then we want to know what capabilities were picked up. When it has file system based capabilities we want the capabilities. !is_setuid && (has_fcap && pP_gained) - If it is a non-setuid file and it gets ambient capabilities, we want the capabilities. !is_setuid && pA_gained - These last two are combined into one due to the common first parameter. Related: https://github.com/linux-audit/audit-kernel/issues/16 Signed-off-by: Richard Guy Briggs Reviewed-by: Serge Hallyn Acked-by: James Morris Acked-by: Kees Cook Acked-by: Paul Moore Signed-off-by: James Morris security/commoncap.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) commit 588fb2c7e294753d3090a1dc2e7c34e7e3ce5aff Author: Richard Guy Briggs Date: Wed Oct 11 20:57:13 2017 -0400 capabilities: fix logic for effective root or real root Now that the logic is inverted, it is much easier to see that both real root and effective root conditions had to be met to avoid printing the BPRM_FCAPS record with audit syscalls. This meant that any setuid root applications would print a full BPRM_FCAPS record when it wasn't necessary, cluttering the event output, since the SYSCALL and PATH records indicated the presence of the setuid bit and effective root user id. Require only one of effective root or real root to avoid printing the unnecessary record. Ref: commit 3fc689e96c0c ("Add audit_log_bprm_fcaps/AUDIT_BPRM_FCAPS") See: https://github.com/linux-audit/audit-kernel/issues/16 Signed-off-by: Richard Guy Briggs Reviewed-by: Serge Hallyn Acked-by: James Morris Acked-by: Kees Cook Acked-by: Paul Moore Signed-off-by: James Morris security/commoncap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c0d1adefe0a3775cc16374dc9ebdfd8504afa14b Author: Richard Guy Briggs Date: Wed Oct 11 20:57:12 2017 -0400 capabilities: invert logic for clarity The way the logic was presented, it was awkward to read and verify. Invert the logic using DeMorgan's Law to be more easily able to read and understand. Signed-off-by: Richard Guy Briggs Reviewed-by: Serge Hallyn Acked-by: James Morris Acked-by: Kees Cook Okay-ished-by: Paul Moore Signed-off-by: James Morris security/commoncap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 02ebbaf48cf211498a9bd2c6b65e7d1b0a901807 Author: Richard Guy Briggs Date: Wed Oct 11 20:57:11 2017 -0400 capabilities: remove a layer of conditional logic Remove a layer of conditional logic to make the use of conditions easier to read and analyse. Signed-off-by: Richard Guy Briggs Reviewed-by: Serge Hallyn Acked-by: James Morris Acked-by: Kees Cook Okay-ished-by: Paul Moore Signed-off-by: James Morris security/commoncap.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 9fbc2c79644a88a1cc40a2628ccff1bbbbc9ecc5 Author: Richard Guy Briggs Date: Wed Oct 11 20:57:10 2017 -0400 capabilities: move audit log decision to function Move the audit log decision logic to its own function to isolate the complexity in one place. Suggested-by: Serge Hallyn Signed-off-by: Richard Guy Briggs Reviewed-by: Serge Hallyn Acked-by: James Morris Acked-by: Kees Cook Okay-ished-by: Paul Moore Signed-off-by: James Morris security/commoncap.c | 50 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) commit 81a6a012996b3fd47608d87b16e79412dd73578e Author: Richard Guy Briggs Date: Wed Oct 11 20:57:09 2017 -0400 capabilities: use intuitive names for id changes Introduce a number of inlines to make the use of the negation of uid_eq() easier to read and analyse. Signed-off-by: Richard Guy Briggs Reviewed-by: Serge Hallyn Acked-by: James Morris Acked-by: Kees Cook Okay-ished-by: Paul Moore Signed-off-by: James Morris security/commoncap.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit 9304b46c912d65a103a68f093b456ba3c02dca3b Author: Richard Guy Briggs Date: Wed Oct 11 20:57:08 2017 -0400 capabilities: use root_priveleged inline to clarify logic Introduce inline root_privileged() to make use of SECURE_NONROOT easier to read. Suggested-by: Serge Hallyn Signed-off-by: Richard Guy Briggs Reviewed-by: Serge Hallyn Acked-by: James Morris Acked-by: Kees Cook Okay-ished-by: Paul Moore Signed-off-by: James Morris security/commoncap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit fc7eadf768a3e2c062e52eea89b52a0076d53b0c Author: Richard Guy Briggs Date: Wed Oct 11 20:57:07 2017 -0400 capabilities: rename has_cap to has_fcap Rename has_cap to has_fcap to clarify it applies to file capabilities since the entire source file is about capabilities. Signed-off-by: Richard Guy Briggs Reviewed-by: Serge Hallyn Acked-by: James Morris Acked-by: Kees Cook Okay-ished-by: Paul Moore Signed-off-by: James Morris security/commoncap.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 4c7e715fc87b6f8b652363b3515b48b3822c5b5f Author: Richard Guy Briggs Date: Wed Oct 11 20:57:06 2017 -0400 capabilities: intuitive names for cap gain status Introduce macros cap_gained, cap_grew, cap_full to make the use of the negation of is_subset() easier to read and analyse. Signed-off-by: Richard Guy Briggs Reviewed-by: Serge Hallyn Acked-by: James Morris Acked-by: Kees Cook Okay-ished-by: Paul Moore Signed-off-by: James Morris security/commoncap.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit db1a8922cf3f0b936595ba41774fe4b66adf091a Author: Richard Guy Briggs Date: Wed Oct 11 20:57:05 2017 -0400 capabilities: factor out cap_bprm_set_creds privileged root Factor out the case of privileged root from the function cap_bprm_set_creds() to make the latter easier to read and analyse. Suggested-by: Serge Hallyn Signed-off-by: Richard Guy Briggs Reviewed-by: Serge Hallyn Acked-by: James Morris Acked-by: Kees Cook Okay-ished-by: Paul Moore Signed-off-by: James Morris security/commoncap.c | 76 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 28 deletions(-) commit 282dc8322a95b5c6a246fc781d89e5930821d486 Merge: 6585d42 fa9caf0 Author: Dave Airlie Date: Fri Oct 20 10:56:10 2017 +1000 Merge tag 'drm-intel-next-2017-10-12' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Last batch of drm/i915 features for v4.15: - transparent huge pages support (Matthew) - uapi: I915_PARAM_HAS_SCHEDULER into a capability bitmask (Chris) - execlists: preemption (Chris) - scheduler: user defined priorities (Chris) - execlists optimization (Michał) - plenty of display fixes (Imre) - has_ipc fix (Rodrigo) - platform features definition refactoring (Rodrigo) - legacy cursor update fix (Maarten) - fix vblank waits for cursor updates (Maarten) - reprogram dmc firmware on resume, dmc state fix (Imre) - remove use_mmio_flip module parameter (Maarten) - wa fixes (Oscar) - huc/guc firmware refacoring (Sagar, Michal) - push encoder specific code to encoder hooks (Jani) - DP MST fixes (Dhinakaran) - eDP power sequencing fixes (Manasi) - selftest updates (Chris, Matthew) - mmu notifier cpu hotplug deadlock fix (Daniel) - more VBT parser refactoring (Jani) - max pipe refactoring (Mika Kahola) - rc6/rps refactoring and separation (Sagar) - userptr lockdep fix (Chris) - tracepoint fixes and defunct tracepoint removal (Chris) - use rcu instead of abusing stop_machine (Daniel) - plenty of other fixes all around (Everyone) * tag 'drm-intel-next-2017-10-12' of git://anongit.freedesktop.org/drm/drm-intel: (145 commits) drm/i915: Update DRIVER_DATE to 20171012 drm/i915: Simplify intel_sanitize_enable_ppgtt drm/i915/userptr: Drop struct_mutex before cleanup drm/i915/dp: limit sink rates based on rate drm/i915/dp: centralize max source rate conditions more drm/i915: Allow PCH platforms fall back to BIOS LVDS mode drm/i915: Reuse normal state readout for LVDS/DVO fixed mode drm/i915: Use rcu instead of stop_machine in set_wedged drm/i915: Introduce separate status variable for RC6 and LLC ring frequency setup drm/i915: Create generic functions to control RC6, RPS drm/i915: Create generic function to setup LLC ring frequency table drm/i915: Rename intel_enable_rc6 to intel_rc6_enabled drm/i915: Name structure in dev_priv that contains RPS/RC6 state as "gt_pm" drm/i915: Move rps.hw_lock to dev_priv and s/hw_lock/pcu_lock drm/i915: Name i915_runtime_pm structure in dev_priv as "runtime_pm" drm/i915: Separate RPS and RC6 handling for CHV drm/i915: Separate RPS and RC6 handling for VLV drm/i915: Separate RPS and RC6 handling for BDW drm/i915: Remove superfluous IS_BDW checks and non-BDW changes from gen8_enable_rps drm/i915: Separate RPS and RC6 handling for gen6+ ... commit 6585d4274b0baf1d09318539c4a726a96b51af34 Merge: 40d8670 96687ec Author: Dave Airlie Date: Fri Oct 20 10:47:19 2017 +1000 Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next Last set of features for 4.15. Highlights: - Add a bo flag to allow buffers to opt out of implicit sync - Add ctx priority setting interface - Lots more powerplay cleanups - Start to plumb through vram lost infrastructure for gpu reset - ttm support for huge pages - misc cleanups and bug fixes * 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux: (73 commits) drm/amd/powerplay: Place the constant on the right side of the test drm/amd/powerplay: Remove useless variable drm/amd/powerplay: Don't cast kzalloc() return value drm/amdgpu: allow GTT overcommit during bind drm/amdgpu: linear validate first then bind to GART drm/amd/pp: Fix overflow when setup decf/pix/disp dpm table. drm/amd/pp: thermal control not enabled on vega10. drm/amdgpu: busywait KIQ register accessing (v4) drm/amdgpu: report more amdgpu_fence_info drm/amdgpu:don't check soft_reset for sriov drm/amdgpu:fix duplicated setting job's vram_lost drm/amdgpu:reduce wb to 512 slot drm/amdgpu: fix regresstion on SR-IOV gpu reset failed drm/amd/powerplay: Tidy up cz_dpm_powerup_vce() drm/amd/powerplay: Tidy up cz_dpm_powerdown_vce() drm/amd/powerplay: Tidy up cz_dpm_update_vce_dpm() drm/amd/powerplay: Tidy up cz_dpm_update_uvd_dpm() drm/amd/powerplay: Tidy up cz_dpm_powerup_uvd() drm/amd/powerplay: Tidy up cz_dpm_powerdown_uvd() drm/amd/powerplay: Tidy up cz_start_dpm() ... commit aed5d0ee77c007dcdcaf48ea75be008f05a241be Author: Simon Budig Date: Mon Oct 9 21:00:16 2017 -0700 Input: edt-ft5x06 - implement support for the EDT-M12 series This adds support for the EDT M12 series of touchscreens. Signed-off-by: Simon Budig Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/edt-ft5x06.c | 50 ++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 11 deletions(-) commit 169110c3645621497ca0b1d0d7bc80dcea8ff9d4 Author: Simon Budig Date: Mon Oct 9 20:58:11 2017 -0700 Input: edt-ft5x06 - make distinction between m06/m09/generic more clear Since the driver also is useful for some non-EDT touchscreens based on the focaltec chips introduce the concept of a "generic" focaltec based touch. Use a better heuristics for model detection and be more specific in the source. Signed-off-by: Simon Budig Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/edt-ft5x06.c | 122 +++++++++++++++++++++++++-------- 1 file changed, 93 insertions(+), 29 deletions(-) commit cba6ac4869e45cc93ac5497024d1d49576e82666 Author: Michael Ellerman Date: Thu Oct 12 21:17:17 2017 +1100 powerpc: Add PPC_FEATURE2_HTM_NO_SUSPEND Some CPUs can operate in a mode where TM (Transactional Memory) is enabled but the suspended state of TM is disabled. In this mode tsuspend does not enter suspended state, instead the transaction is aborted. Similarly any other event that would lead to suspended state instead aborts the transaction. There is also an ABI change, in that in this mode processes are not allowed to sigreturn with an MSR that would lead to suspended state, Linux will instead return an error to the sigreturn syscall. Signed-off-by: Michael Ellerman arch/powerpc/include/uapi/asm/cputable.h | 1 + 1 file changed, 1 insertion(+) commit 07fd1761e1cd2b5ecdb470fc228d52ccdf75e05b Author: Cyril Bur Date: Thu Oct 12 21:17:16 2017 +1100 powerpc/tm: Add commandline option to disable hardware transactional memory Currently the kernel relies on firmware to inform it whether or not the CPU supports HTM and as long as the kernel was built with CONFIG_PPC_TRANSACTIONAL_MEM=y then it will allow userspace to make use of the facility. There may be situations where it would be advantageous for the kernel to not allow userspace to use HTM, currently the only way to achieve this is to recompile the kernel with CONFIG_PPC_TRANSACTIONAL_MEM=n. This patch adds a simple commandline option so that HTM can be disabled at boot time. Signed-off-by: Cyril Bur [mpe: Simplify to a bool, move to prom.c, put doco in the right place. Always disable, regardless of initial state, to avoid user confusion.] Signed-off-by: Michael Ellerman Documentation/admin-guide/kernel-parameters.txt | 4 ++++ arch/powerpc/kernel/prom.c | 31 +++++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit ddd46ed2e61cea6d5d92f4f2fbb2eeda4a6d962f Merge: 8bc9314 2a3d655 Author: Michael Ellerman Date: Fri Oct 20 11:10:30 2017 +1100 Merge branch 'topic/ppc-kvm' into next Bring in some KVM commits we need (the TM one in particular). commit 2a3d6553cbd791da4fb624c2500b4580b3f9d72f Author: Michael Ellerman Date: Thu Oct 12 22:58:54 2017 +1100 KVM: PPC: Tie KVM_CAP_PPC_HTM to the user-visible TM feature Currently we use CPU_FTR_TM to decide if the CPU/kernel can support TM (Transactional Memory), and if it's true we advertise that to Qemu (or similar) via KVM_CAP_PPC_HTM. PPC_FEATURE2_HTM is the user-visible feature bit, which indicates that the CPU and kernel can support TM. Currently CPU_FTR_TM and PPC_FEATURE2_HTM always have the same value, either true or false, so using the former for KVM_CAP_PPC_HTM is correct. However some Power9 CPUs can operate in a mode where TM is enabled but TM suspended state is disabled. In this mode CPU_FTR_TM is true, but PPC_FEATURE2_HTM is false. Instead a different PPC_FEATURE2 bit is set, to indicate that this different mode of TM is available. It is not safe to let guests use TM as-is, when the CPU is in this mode. So to prevent that from happening, use PPC_FEATURE2_HTM to determine the value of KVM_CAP_PPC_HTM. Signed-off-by: Michael Ellerman arch/powerpc/kvm/powerpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit adb77b3e5118d2760621d8cc740524b816f9006b Author: Linus Walleij Date: Thu Oct 19 16:28:46 2017 -0700 Input: gpio_mouse - add device tree probing This makes the GPIO mouse probe nicely from the device tree if found in a tree. As the driver uses device properties it can easily be amended to also probe from ACPI devices. Acked-by: Hans-Christian Noren Egtvedt Signed-off-by: Linus Walleij Signed-off-by: Dmitry Torokhov drivers/input/mouse/gpio_mouse.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 836bd419833ce581a2450fc237f89551c841a156 Author: Linus Walleij Date: Thu Oct 19 16:24:24 2017 -0700 Input: gpio_mouse - convert to use GPIO descriptors This converts the GPIO mouse to use descriptors and fwnode properties. The polarity settings go out the window since GPIO descriptor already know about polarity so this should be configured in device tree or ACPI or similar. Set scanning interval by default to 50ms if not found as a property on the device. Acked-by: Hans-Christian Noren Egtvedt Signed-off-by: Linus Walleij Signed-off-by: Dmitry Torokhov drivers/input/mouse/gpio_mouse.c | 191 ++++++++++++++------------------------- 1 file changed, 67 insertions(+), 124 deletions(-) commit 055f624e1eb9cae28211a7e1e140111d29228e13 Author: Linus Walleij Date: Thu Oct 19 16:21:05 2017 -0700 Input: gpio_mouse - add DT bindings This adds DT bindings for simple mice attached to GPIO lines. As the properties are very general and pertains to all mice I can think of, we use very generic names for the 4-7 GPIO lines, "up", "down" etc. Acked-by: Hans-Christian Noren Egtvedt Signed-off-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Dmitry Torokhov .../devicetree/bindings/input/gpio-mouse.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 34cf5a1cad90a0ba31629260fdc127453a2b28e6 Author: Linus Walleij Date: Thu Oct 19 16:19:41 2017 -0700 Input: gpio_mouse - rename platform data variables Use more appropriate names for the "platform data" which is now just a simple state container for the GPIO mouse. Acked-by: Hans-Christian Noren Egtvedt Signed-off-by: Linus Walleij Signed-off-by: Dmitry Torokhov drivers/input/mouse/gpio_mouse.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit c5053e695d621f8a8a3992c5e93dd3be088fa267 Author: Linus Walleij Date: Thu Oct 19 16:19:03 2017 -0700 Input: gpio_mouse - kill off platform data This is not used much: git grep gpio_mouse_platform_data shows that absolutely nothing in the kernel defines this platform data. It could be argued that the driver should be deleted. But that is a bit harsh I think since it seems generally useful. So this patch starts a series which repurposes it to be used with hardware nodes from device tree or ACPI. This first patch simply localize the platform data header and allocates a dummy platform data. Yes: this patch leaves the driver in a pretty useless state, but since nothing is instantiating this driver, it doesn't make it more useless than it already is. Later patches makes use of the driver. Acked-by: Hans-Christian Noren Egtvedt Signed-off-by: Linus Walleij Signed-off-by: Dmitry Torokhov drivers/input/mouse/gpio_mouse.c | 59 +++++++++++++++++++++++++++++++++----- include/linux/gpio_mouse.h | 61 ---------------------------------------- 2 files changed, 52 insertions(+), 68 deletions(-) commit 0a3ff78699d1817e711441715d22665475466036 Author: Ross Zwisler Date: Wed Oct 18 12:21:55 2017 -0600 dev/dax: fix uninitialized variable build warning Fix this build warning: warning: 'phys' may be used uninitialized in this function [-Wuninitialized] As reported here: https://lkml.org/lkml/2017/10/16/152 http://kisskb.ellerman.id.au/kisskb/buildresult/13181373/log/ Signed-off-by: Ross Zwisler Signed-off-by: Dan Williams drivers/dax/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7fc9be3c136c140b02021c7973b91b20fb1981e5 Author: Ross Zwisler Date: Wed Oct 18 09:40:06 2017 -0600 MAINTAINERS: Add entry for device DAX And update the entry for filesystem DAX to differentiate them. Signed-off-by: Ross Zwisler Signed-off-by: Dan Williams MAINTAINERS | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 7c950b9e53732f574e3a46d37c62f1f33d0b218c Author: Dongdong Liu Date: Wed Oct 11 18:52:58 2017 +0800 PCI/portdrv: Add #defines for AER and DPC Interrupt Message Number masks In the AER case, the mask isn't strictly necessary because there are no higher-order bits above the Interrupt Message Number, but using a #define will make it possible to grep for it. Suggested-by: Bjorn Helgaas Signed-off-by: Dongdong Liu Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig drivers/pci/pcie/portdrv_core.c | 4 ++-- include/uapi/linux/pci_regs.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit 092283190aa2fe7e7bcfa94225660af65d14c3eb Merge: 6f4bd48 aefe3ba Author: Arnd Bergmann Date: Fri Oct 20 00:45:19 2017 +0200 Merge tag 'omap-for-v4.15/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt Pull "device tree changes for omaps for v4.15 merge window" from Tony Lindgren: Device tree changes for omaps for v4.15 merge window to improve support for omap35xx-evm, am34xx-epos-evm and dra7: - A series of changes to fix support for omap35xx-evm - A series of changes to add earlycon support for n8x0, pandaboard and omap5 boards - A series of changes for am43xx-epos-evm pinctrl modes for default and sleep states - A series of changes to correct pbias regulator voltage for dra7 from 3V to 3.3V - Use microchip compatible instead of deprecated mcp compatible for mcp23017 * tag 'omap-for-v4.15/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (22 commits) ARM: dts: omap3: Replace deprecated mcp prefix ARM: dts: dra7-evm: Move pcie RC node to common file ARM: dts: omap5: Increase max-voltage of pbias regulator ARM: dts: dra7: Increase max-voltage of pbias regulator ARM: dts: am43xx-epos-evm: Add default pinmux for unused pins ARM: dts: am43xx-epos-evm: Add default and sleep pinmux for usb2_phy1 and usb2_phy2 ARM: dts: am43xx-epos-evm: Add default and sleep pinmux for uart0 ARM: dts: am43xx-epos-evm: Add default and sleep pinmux for matrix_keypad0 ARM: dts: am43xx-epos-evm: Add sleep pinmux for mmc1 ARM: dts: am43xx-epos-evm: Add sleep pinmux for pixcir_ts ARM: dts: am43xx-epos-evm: Add sleep pinmux for gpmc ARM: dts: am43xx-epos-evm: Add sleep pinmux for ecap0 ARM: dts: am43xx-epos-evm: Add sleep pinmux for qspi1 ARM: dts: am43xx-epos-evm: Add sleep pinmux for spi0 and spi1 ARM: dts: am43xx: Introduce additional pinmux definitions for DS0 ARM: dts: Configure earlycon for omap5-common ARM: dts: Configure earlycon for pandaboard ARM: dts: Configure earlycon for n8x0 ARM: dts: omap3-evm: Add DSS {vdds_dsi,vdda_video}-supply references ARM: dts: omap3: Add Sharp LS037V7DW01 'envdd' supply ... commit ab63d1efc5674c09e1c24a8bc9301daa172f5050 Merge: e4191c5 684be5a Author: Arnd Bergmann Date: Fri Oct 20 00:43:31 2017 +0200 Merge tag 'omap-for-v4.15/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc Pull "more soc changes for omaps for v4.15 merge window" from Tony Lindgren: Drop omap legacy platform data for IRQ, DMA and IO resources. With the dts files fixed up to contain the necessary data for basic resources, we can drop the related platform data. Note that this branch depends on the "omap-for-v4.15/fixes-dt-signed" branch and the patches with dependencies are based on a merge with that branch. These patches first ensure things keep working for the legacy "ti,hwmods" property when we start making it optional, then adds a minimal TI sysc interconnect target device driver to handle the new generic "ti,sysc" compatible property. And then we can finally drop the legacy platform data for IRQ, DMA and IO resources as seen in the diffstats. * tag 'omap-for-v4.15/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (25 commits) bus: ti-sysc: Fix unbalanced pm_runtime_enable by adding remove bus: ti-sysc: mark PM functions as __maybe_unused ARM: OMAP2+: omap_device: fix error return code in omap_device_copy_resources() ARM: OMAP2+: Drop legacy struct omap_hwmod_addr_space ARM: OMAP2+: Drop omap_hwmod_dma_info ARM: OMAP2+: Drop omap_hwmod_irq_info ARM: OMAP4: Remove legacy IRQ for PRM ARM: OMAP3: Remove legacy IRQ for PRM bus: ti-sysc: Add minimal TI sysc interconnect target driver ARM: OMAP2+: Populate legacy resources for dma and smartreflex ARM: OMAP2+: Parse module IO range from dts for legacy "ti,hwmods" support ARM: dts: Configure SmartReflex only to idle the interconnect target module ARM: dts: Add nodes for missing omap4 interconnect target modules dt-bindings: bus: Minimal TI sysc interconnect target module binding ARM: dts: Add missing hwmod related properties for dra7 ARM: dts: Add missing hwmod related nodes for am33xx ARM: dts: Add missing dma hwmod property for omap5 ARM: dts: Add missing wdt3 node for omap4 ARM: dts: Add missing hsi node for omap4 ARM: dts: Add missing onewire node for omap4 ... commit 6f4bd48ff99f94e12a5e55d7b824e8bae92e4ca9 Merge: d73e979 1ff516a Author: Arnd Bergmann Date: Fri Oct 20 00:34:54 2017 +0200 Merge tag 'omap-for-v4.15/fixes-dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc Pull "non-urgent device tree fixes for omaps for v4.15 merge window" from Tony Lindgren Non-urgent device tree fixes for omaps that can all wait for v4.15 merge window. Turns out that we have many devices working just because we have the legacy platform data still around. This is mostly an issue for omap4, other SoCs just have minimal fixes needed. As many of the missing device tree nodes and properties are for devices that have no drivers in the mainline kernel, such as slimbus, iss, mcasp, aess, fdif and gpu, we might as well start using the new "ti,sysc" interconnect target module binding for them so we can get the devices with no child device drivers idled. This also makes it possible to drop unnecessary platform data in later patches. * tag 'omap-for-v4.15/fixes-dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: Fix typo for omap4 mcasp rx path ARM: dts: Configure SmartReflex only to idle the interconnect target module ARM: dts: Add nodes for missing omap4 interconnect target modules dt-bindings: bus: Minimal TI sysc interconnect target module binding ARM: dts: Add missing hwmod related properties for dra7 ARM: dts: Add missing hwmod related nodes for am33xx ARM: dts: Add missing dma hwmod property for omap5 ARM: dts: Add missing wdt3 node for omap4 ARM: dts: Add missing hsi node for omap4 ARM: dts: Add missing onewire node for omap4 ARM: dts: Add missing smartreflex node and binding for omap4 ARM: dts: Add missing hwmods property for omap4 dma ARM: dts: Add missing properties for omap4 control modules ARM: dts: Configure pmu without interrupt for omap4430 ARM: dts: Add missing dma hwmods property for omap3 commit d73e979f2ce8587b19666a67e85923ce7611dcb4 Merge: 19748e2 d854389 Author: Arnd Bergmann Date: Fri Oct 20 00:33:55 2017 +0200 Merge tag 'v4.15-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/soc Pull "Rockchip dts64 updates for 4.15 part1" from Heiko Stübner: The biggest step forward is probably the enablement of display support on the rk3399-firefly, which got its default serial set as well and got cec support as well. Gru boards got their touchpad support refined to actually mark the button correctly and also git their rt5514 dsp added. And finally the rk3328 eval board got its cpu regulator and mmc nodes. * tag 'v4.15-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: enable cec pin for rk3399 firefly arm64: dts: rockchip: add the cec clk for dw-mipi-hdmi on rk3399 arm64: dts: rockchip: default serial for Firefly-RK3399 arm64: dts: rockchip: enable touchpad button for rk3399-gru-kevin arm64: dts: rockchip: enable display subsystem on rk3399-firefly arm64: dts: rockchip: Add rt5514 dsp for rk3399 gru arm64: dts: rockchip: add cpu regulator for rk3328 evaluation board arm64: dts: rockchip: add mmc nodes for rk3328 evaluation board commit 19748e26f743a8ba75c680f865c584994f090919 Merge: 7d738db 345b40f Author: Arnd Bergmann Date: Fri Oct 20 00:32:53 2017 +0200 Merge tag 'v4.15-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/soc Pull "Rockchip dts32 updates for 4.15 part1" from Heiko Stübner: One new board the Vyasa from Amarula Solutions using a rk3288 and core lvds node for the newly added driver+binding. Also bindings + nodes for the Mali-Utgard GPUs found on some Rockchip socs like rk3036 and rk3188. With the recently revived Lima project they can even render a red triangle to a png file. * tag 'v4.15-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: Enable thermal on rk3288-vyasa board ARM: dts: rockchip: fix mali400 ppmmu interrupt names ARM: dts: rockchip: Enable mali GPU node on rk3288-vyasa ARM: dts: rockchip: enable gpu on rk3188-radxarock ARM: dts: rockchip: add gpu nodes on rk3066/rk3188 ARM: dts: rockchip: add rk322x gpu node ARM: dts: rockchip: enable the gpu on rk3036-kylin boards ARM: dts: rockchip: add rk3036 gpu node dt-bindings: gpu: mali-utgard: add optional power-domain reference dt-bindings: gpu: mali-utgard: add optional supply regulator dt-bindings: gpu: mali-utgard: Add Rockchip Utgard Malis ARM: dts: rockchip: enable vops and hdmi output on rk3288-vyasa ARM: dts: rockchip: Add rk3288 vyasa board dt-bindings: Add vendor prefix for Amarula Solutions ARM: dts: rockchip: add LVDS node for rk3288 commit 7d738dbbe2ab871a6374aff6529e941df470c1a0 Merge: 282e1cd 4bd93eb Author: Arnd Bergmann Date: Fri Oct 20 00:29:17 2017 +0200 Merge tag 'stm32-dt-for-v4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into next/soc Pull "STM32 DT updates for v4.15, round 1" from Alexandre Torgue: Highlights: ---------- -Add I2C1 support on STM32F746 SoC -Enable I2C1 on STM32F746 eval board -Add Timers support on STM32F746 SoC -Add USB HS and FS supports on STM32F746 Soc -Enable USB HS on STM32F746 disco and eval boards -Enable USB FS en STM32F746 disco board -Add Vrefbuf to STM32H743 SoC -Add LPTIMERS support on STM32H743 SoC -Add DMAMUX support on STM32H743 SoC -Enable STM32H743 clock driver -Add MDMA support on STM32H743 SoC -Change pinctrl pinmux entries for all SoC. * tag 'stm32-dt-for-v4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: dts: stm32: Add MDMA support for STM32H743 SoC ARM: dts: stm32: Enable USB FS on stm32f746-disco ARM: dts: stm32: Add USB FS support for STM32F746 MCU ARM: dts: stm32: Enable USB HS on stm32f746-disco ARM: dts: stm32: Enable USB HS on stm32746g-eval ARM: dts: stm32: Add USB HS support for STM32F746 MCU ARM: dts: stm32: change pinctrl bindings definition ARM: dts: stm32: Enable STM32H743 clock driver ARM: dts: stm32: fix hse clock frequency on STM32H743 Eval board ARM: dts: stm32: add Timers driver for stm32f746 MCU ARM: dts: stm32: Add DMAMUX support for STM32H743 SoC ARM: dts: stm32: Add lptimer definitions to stm32h743 ARM: dts: stm32: add vrefbuf to stm32h743 ARM: dts: stm32: Add I2C1 support for STM32F746 eval board ARM: dts: stm32: Add I2C1 support for STM32F746 SoC commit 282e1cd16373d9b01dc64ff9f99c74d69df1812c Merge: 2507514 e8c4c6e Author: Arnd Bergmann Date: Fri Oct 20 00:28:13 2017 +0200 Merge tag 'qcom-dts-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/soc Pull "Qualcomm Device Tree Changes for v4.15" from Andy Gross: * Add Support for MSM8974 based Fairphone 2 phone * Add support for MSM8974 based Sony Xperia Z2 Tablet * Add MSM8660 GSBI6/7 nodes * Disable GSBI6 at APQ8064 platform level * Fix phy cells on APQ8064 * tag 'qcom-dts-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: ARM: dts: msm8974-FP2: Add USB node ARM: dts: msm8974-FP2: Add sdhci1 node ARM: dts: msm8974-FP2: Add regulator nodes for FP2 ARM: dts: msm8974-FP2: Introduce gpio-keys nodes ARM: dts: qcom: Add initial DTS file for Fairphone 2 phone ARM: dts: qcom: add MSM8660 GSBI6 and GSBI7 ARM: dts: qcom: msm8974: Add Sony Xperia Z2 Tablet ARM: dts: qcom-apq8064: disable gsbi6 i2c by default at soc dtsi ARM: dts: qcom-apq8064: Fix dsi and hdmi phy cells commit 2507514680f63f790b1567cf36704228b83dc3e6 Merge: c94c813 8cd00d5 Author: Arnd Bergmann Date: Fri Oct 20 00:26:46 2017 +0200 Merge tag 'qcom-arm64-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/soc Pull "Qualcomm ARM64 Updates for v4.15" from Andy Gross: * Add PCIE support to relevant MSM8996 based boards * Add RPM clock controller node on MSM8996 * Add dload address on MSM8916 and MSM8996 * Add MBHC button support on APQ8016 SBC * Add RTMFS specific compatible for rmtfs memory node * Fixups for MSM8916 GPIO line names and MDP address length * tag 'qcom-arm64-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: dts: msm8916: Mark rmtfs node as qcom, rmtfs-mem compatible arm64: dts: msm8996: Add the rpm clock controller node arm64: dts: qcom: sbc: Name GPIO lines arm64: dts: qcom: msm8916: Shrink mdp address length for msm8916 arm64: dts: apq8016-sbc: add mbhc buttons support arm64: dts: qcom: Specify dload address for msm8916 and msm8996 arm64: dts: apq8096-db820c: never disable regulator on LS expansion arm64: dts: apq8096-db820c: Enable on board 3 pcie root complex arm64: dts: qcom: msm8996: add support to pcie commit c94c81390fe2cdff12a8d6313c92a6a0ff85135d Merge: 061ae53 3a42d36 Author: Arnd Bergmann Date: Fri Oct 20 00:26:04 2017 +0200 Merge tag 'zynq-dt-for-4.15' of https://github.com/Xilinx/linux-xlnx into next/soc Pull "arm: Xilinx ZynqMP DT changes for v4.15" from Michal Simek: - Change 24c08 compatible string * tag 'zynq-dt-for-4.15' of https://github.com/Xilinx/linux-xlnx: ARM: dts: zynq: Add generic compatible string for I2C EEPROM commit 061ae53266135c90e9a593dde6e6c34cb8b8e396 Merge: b073a89 3991e05 Author: Arnd Bergmann Date: Fri Oct 20 00:24:24 2017 +0200 Merge tag 'samsung-dt-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/soc Pull "Samsung DTS ARM changes for 4.15" from Krzysztof Kozłowski: 1. Add new board: Hardkernel Odroid HC1. 2. Fix incomplete Odroid-XU3/4 thermal-zones definition leading to possible overheat if first pair of A7+A15 cores is idle but rest of CPUs are busy. 3. Add capacity-dmips-mhz properties for CPUs of octa-core SoCs. 4. Add power button to Odroid XU3/4. 5. Improvements in Gscaler, HDMI and Mixer blocks on Exynos5. 6. Add suspend quirk to DWC3 USB controller to fix enumeration of SuperSpeed devices on Odroid XU4. 7. Add HDMI and MHL to Trats2. 8. Cleanups (redundant properties and nodes). * tag 'samsung-dt-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: dt-bindings: samsung: Document binding for new Odroid HC1 board ARM: dts: exynos: Add HDMI and Sil9234 to Trats2 board ARM: dts: exynos: Add support for Hardkernel's Odroid HC1 board ARM: dts: exynos: Move audio clocks configuration to odroidxu3-audio.dtsi ARM: dts: exynos: Add dwc3 SUSPHY quirk ARM: dts: exynos: Add status property to Exynos 542x Mixer nodes ARM: dts: exynos: Add status property to Exynos 5250 HDMI and Mixer nodes ARM: dts: exynos: Cleanup HDMI DCC definitions on Exynos5250 and Exynos542x boards ARM: dts: exynos: Move HDMI PHY node from boards to exynos5250.dtsi ARM: dts: exynos: Use specific compatibles for proper Gscaler limits on Exynos5250 and Exynos5420 ARM: dts: exynos: Remove redundant interrupt properties in gpio-keys on Odroid boards ARM: dts: exynos: Add power button for Odroid XU3/4 ARM: dts: exynos: Remove the display-timing and delay from Rinato ARM: dts: exynos: add exynos5422 cpu capacity-dmips-mhz information ARM: dts: exynos: add exynos5420 cpu capacity-dmips-mhz information ARM: dts: exynos: fix incomplete Odroid-XU3/4 thermal-zones definition commit b073a8991f52e516092a48c90baf9d478f84066c Merge: 4167ca1 933311f Author: Arnd Bergmann Date: Fri Oct 20 00:17:50 2017 +0200 Merge tag 'davinci-for-v4.15/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/soc Pull "DaVinci DT updates for v4.15" from Sekhar Nori: Add support for accessing DSP on DA850 SoC when using device-tree. * tag 'davinci-for-v4.15/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: da8xx-dt: Add OF_DEV_AUXDATA entry for DSP clock matching ARM: dts: da850-lcdk: Add and enable CMA reserved pool for DSP ARM: dts: da850: Add DSP node commit 4167ca1e85e3f01f5583e9f8d60ab67935db4534 Merge: d2b8524 a7ab4cb Author: Arnd Bergmann Date: Thu Oct 19 23:52:53 2017 +0200 Merge tag 'hisi-arm64-dt-for-4.15' of git://github.com/hisilicon/linux-hisi into next/soc ARM64: DT: Hisilicon SoC DT updates for 4.15 - Add CoreSight related nodes for hi6220 - Add GPIO line names for hikey960 - Rectify the GPIO line names of the Poplar board to keep consistency - Add thermal sensor binding doc and dt nodes for hi3660 * tag 'hisi-arm64-dt-for-4.15' of git://github.com/hisilicon/linux-hisi: arm64: dts: Register Hi3660's thermal sensor dt-bindings: Document the hi3660 thermal sensor binding arm64: dts: hisilicon: Standardize Poplar GPIO line names arm64: dts: hikey960: Update HiKey960 with GPIO line names arm64: dts: hi6220: add coresight dt nodes commit d2b85241a9f51c93aa8a29fc859dedee1fbb347f Author: Linus Walleij Date: Wed Oct 11 19:45:19 2017 +0200 ARM: dts: Add TVE200 to the Gemini SoC DTSI The Faraday TVE200 is present in the Gemini SoC, sometimes under the name "TVC". Add it to the SoC DTSI file along with its resources. Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/boot/dts/gemini.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 6260304f1a1299e595648ddbab7b60c733413a7c Merge: b966bb4 bc3d344 Author: Arnd Bergmann Date: Thu Oct 19 23:50:15 2017 +0200 Merge tag 'juno-updates-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/soc Pull "ARMv8 Vexpress/Juno DT update for v4.15" from Sudeep Holla: Just single update to enable PSCI support on Foundation models * tag 'juno-updates-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: foundation-v8: Enable PSCI mode commit b966bb45983212fa254b31c340856a8b06ddb1ff Merge: 9d2e819 27b5e33 Author: Arnd Bergmann Date: Thu Oct 19 23:45:49 2017 +0200 Merge tag 'aspeed-4.15-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into next/soc Pull "ASPEED devicetree updates for 4.15" from Joel Stanley: - Cleanups of the ASPEED device trees - Enable the i2c bus on all platforms - Turn VUART on for BMC platforms - Bind watchdog two for compatilbiy with shipping u-boot * tag 'aspeed-4.15-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: dts: aspeed-romulus: Enable VUART ARM: dts: aspeed-palmetto: Enable VUART ARM: dts: aspeed: Enable watchdog two ARM: dts: aspeed: Remove undocumented wdt properties ARM: dts: aspeed: Clean up UART nodes ARM: dts: aspeed: Correctly order UART nodes ARM: dts: aspeed: Add aliases for UARTs ARM: dts: aspeed-ast2500: Add I2C devices ARM: dts: aspeed-palmetto: Add I2C devices ARM: dts: aspeed-romulus: Add I2C devices ARM: dts: aspeed: Add I2C buses ARM: dts: aspeed: Reorder ADC node ARM: dts: aspeed: Move pinctrl subnodes to improve readability commit 9d2e8198d37bd8a4cff470a179acbe0bcfd31825 Merge: 063f7c8 788251f Author: Arnd Bergmann Date: Thu Oct 19 23:44:06 2017 +0200 Merge tag 'socfpga_dts_for_v4.15_part1' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/soc Pull "SoCFPGA DTS updates for v4.15" from Dinh Nguyen: - Stratix10 platform updates - Fix up gic register entry - Enable ethernet/SDMMC - Update reset manager properties * tag 'socfpga_dts_for_v4.15_part1' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: dts: stratix10: add reset property for various peripherals arm64: dts: stratix10: add the 'altr,modrst-off' property arm64: dts: stratix10: include the reset manager bindings arm64: dts: stratix10: add ethernet/sdmmc support to the S10 devkit arm64: dts: stratix10: fix up the gic register for the Stratix10 platform commit 063f7c82484d37caea12979661db7448755bfdab Merge: c305cf3 7031a21 Author: Arnd Bergmann Date: Thu Oct 19 23:41:57 2017 +0200 Merge tag 'renesas-dt-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Pull "Renesas ARM Based SoC DT Updates for v4.15" from Simon Horman: * r7s72100 (RZ/A1) Peach board - Add pin groups for SCIF2 serial debug interface and Ethernet This avoids relying on bootloader settings - Support control of LED1 using gpio-leds * r8a7743 (RZ/G1M) and r8a7745 (RZ/G1E) SoCs - Add MSIOF[012] support and define aliases for spi[0123] * r8a7743 (RZ/G1M) SoC - Add I2C and IIC core nodes * r8a7743 (RZ/G1M) iW-RainboW-G20D-Qseven development platform - Enable SDHI1 SD controller supporting high-speed and SDR50 transfers - Add chosen node to allow correct selection of serial console and the kernel command line - Enable RTC support - Enable USB2.0 host support This includes enabling USB PHY and internal PCI * r8a7743 (RZ/G1M) iW-RainboW-G20M-Qseven and r8a7745 (RZ/G1E) iW-RainboW-G22M-SM SoMs - Enable Add SPI NOR support This devices is used to boot up the system to the SoM DT * r8a7743 (RZ/G1M) iW-RainboW-G20M-Qseven SoM - Enable SDHI0 SD controller supporting high-speed transfers * r8a7745 (RZ/G1E) iW-RainboW-G22D development platform - Add pnctl support for scif4 This avoids reling on boot loader settings - Add EtherAVB support * r8a7745 (RZ/G1E) iW-RainboW-G22M-SM SoM - Add basic SoM support - Enable MMCIF eMMC support - Enable RTC support - Enable SDHI1 SD controller supporting high-speed transfers * r8a779[0-4] R-Car Gen2 SoCs - Add reset control properties Geert Uytterhoeven says: This patch series describes the reset topology on all R-Car Gen2 Socs, like was done before for R-Car Gen3 and RZ/G1. Resets usually match the corresponding module clocks. Exceptions are: - The audio module has resets for the Serial Sound Interfaces only, - The display module has only a single reset for all DU channels, but adding reset properties for the display is postponed upon request from Laurent. - Convert to new CPG/MSSR bindings Geert Uytterhoven says: Currently Renesas R-Car Gen2 SoCs use the common clk-rcar-gen2, clk-mstp, and clk-div6 drivers, which depend on most clocks being described in DT. Especially the module (MSTP) clocks are cumbersome and error prone, due to 3 arrays (clocks, clock-indices, and clock-output-names) to be kept in sync. In addition, the clk-mstp driver cannot be extended easily to also support module resets, which are provided by the same hardware module. Hence when developing support for R-Car Gen3 SoCs, another approach was chosen, which led to the CPG/MSSR driver core, and SoC-specific subdrivers (initially for R-Car Gen3, but later also for RZ/G1). This series converts the various R-Car Gen2 DTSes to migrate to the new CPG/MSSR drivers that were added in v4.13-rc1. * r8a779[0,1,3,4] R-Car Gen2 SoCs - Stop grouping clocks under a "clocks" subnode Geert Uytterhoeven says: The current practice is to not group clocks under a "clocks" subnode, but just put them together with the other on-SoC devices. Hence this patch series implements this for the various R-Car Gen2 DTSes that still need this (r8a7792.dtsi is OK). * r8a7794 (E2) Alt board - Correct inverted sense of SD wip pins * tag 'renesas-dt-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (48 commits) ARM: dts: r8a7743: Add MSIOF[012] support ARM: dts: r8a7745: Add MSIOF[012] support ARM: dts: iwg22d: Enable SDHI0 controller ARM: dts: iwg22m: Add SPI NOR support ARM: dts: r8a7745: Add QSPI support ARM: dts: iwg20m: Add SPI NOR support ARM: dts: r8a7743: Add QSPI support ARM: dts: iwg22m: Enable SDHI1 controller ARM: dts: r8a7745: Add SDHI controllers ARM: dts: r8a7794: Add reset control properties ARM: dts: r8a7793: Add reset control properties ARM: dts: r8a7792: Add reset control properties ARM: dts: r8a7791: Add reset control properties ARM: dts: r8a7790: Add reset control properties ARM: dts: r8a7743: Add IIC cores to dtsi ARM: dts: alt: use correct logic for SD WP pins ARM: dts: iwg20d-q7: Enable USB PHY ARM: dts: iwg20d-q7: Enable internal PCI ARM: dts: r8a7743: Link PCI USB devices to USB PHY ARM: dts: r8a7743: Add USB PHY DT support ... commit c305cf3388003643b5f63fbbba2d43f3c234fb9f Merge: 025792c 2e931b0 Author: Arnd Bergmann Date: Thu Oct 19 23:40:23 2017 +0200 Merge tag 'renesas-dt-bindings-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Pull "Renesas ARM Based SoC DT Bindings Updates for v4.15" from Simon Horman: * Consistently do not use ';' in documentation of compat strings for boards. A misture of using and not using a trailing ';' had krept in over time with not using being dominant. * Document bindings for - Eagle board and r8a77970 (V3M) SoC bindings. Eagle is a board for the V3M SoC - Document Kingfisher board bindings. Kingfisher is an extension board for the H3ULCB and M3ULCB boards. * Add r8a77970 (V3M) SYSC power domain definitions Add macros usable by the device tree sources to reference r8a77970 SYSC power domains by index. * Add Renesas SoC DT bindings doc to Renesas ARM section of MAINTAINERS file * Drop bogus node name suffix from example of /renesas,dw-hdmi binding * Document APMU and SMP enable method for r8a7745 (RZ/G1E) SoC * tag 'renesas-dt-bindings-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: remove inconsistent ; from documentation arm64: renesas: document Eagle board bindings arm: shmobile: Document Kingfisher board DT bindings dt-bindings: power: add R8A77970 SYSC power domain definitions MAINTAINERS: Add Renesas SoC DT bindings doc to Renesas ARM sections ARM: shmobile: Document R-Car V3M SoC DT bindings dt-bindings: display: renesas: dw-hdmi: Drop bogus node name suffix dt-bindings: apmu: Document r8a7745 support commit 025792ca72f64470ee01c5702395352f3b7f6411 Merge: 400f170 2affee6 Author: Arnd Bergmann Date: Thu Oct 19 23:36:36 2017 +0200 Merge tag 'renesas-arm64-dt-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Pull "Renesas ARM64 Based SoC DT Updates for v4.15" from Simon Horman: * r8a7795 (H3) - Use r8a7795-cpg-mssr and r8a7795-sysc bindings Hardcoded indicies are replaced with symbols now that they are available - Drop bogus HDMI node name suffixes Laurent Pinchart says: Node names should not use numerical suffixes if the nodes can be distinguished by unit-address - Update PFC node name to pin-controller Shimoda-san says the PFC node name is changed "from e6060000.pfc and pfc@e6060000 to e6060000.pin-controller and pin-controller@e6060000 like other Renesas SoCs." * r8a7795 (H3) ES1.0 - Drop extra zero from XHCI unit address This corrects a typo were ee0400000 rather than ee040000 was used as the unit address. * r8a7796 (M3-W) - Add FDP1 instance Laurent Pinchart says: The r8a7796 has a single FDP1 instance. * r8a7795 (H3) and r8a7796 (M3-W) SoCs - Add USB3.0 peripheral device nodes Shimoda-san says that this is not enabled on the Salvator-X/XS boards for now as: + we need a special cable (USB type-A to A cross cable). + we can swap the role by renesas_usb3 driver even if we use a normal cable and after usb3.0 host is running, but I think it's a special use case. * r8a7795 (H3) and r8a7796 (M3-W) ULCB boards - Enable display output Laurent Pinchart says: The DU is already wired up to the HDMI encoder, all we need to do is enable it. * r8a77995 (D3) Draak board - Enable EthernetAVB and , USB2.0 Host and PHY - Add serial console pins. This is safe to do now that r8a77995 PFC driver support is present * r8a77970 (V3M) - Add basic support for SoC and EtherAVB, [H]SCIF and SYS-DMAC nodes This is a step towards enabling EtherAVB and [H]SCIF with SYS-DMAC in the Eagle board support for which is under review * tag 'renesas-arm64-dt-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (22 commits) arm64: dts: renesas: r8a7796: add USB3.0 peripheral device node arm64: dts: renesas: r8a7795: add USB3.0 peripheral device node arm64: dts: renesas: r8a77995: draak: enable EthernetAVB arm64: dts: renesas: r8a77995: draak: enable USB2.0 Host (EHCI/OHCI) arm64: dts: renesas: r8a77995: draak: enable USB2.0 PHY arm64: dts: renesas: r8a77995: add USB2.0 Host (EHCI/OHCI) device node arm64: dts: renesas: r8a77995: Add USB2.0 PHY device node arm64: dts: draak: Add serial console pins arm64: dts: renesas: r8a77970: add EtherAVB support arm64: dts: renesas: r8a77970: add [H]SCIF support arm64: dts: renesas: r8a77970: add SYS-DMAC support arm64: dts: renesas: initial R8A77970 SoC device tree arm64: dts: renesas: r8a77995: Add EthernetAVB device node arm64: dts: renesas: r8a77995: add GPIO device nodes arm64: dts: renesas: r8a77995: Use r8a7795-cpg-mssr binding definitions arm64: dts: renesas: r8a77995: Use r8a7795-sysc binding definitions arm64: renesas: Add Renesas R8A77970 Kconfig support arm64: dts: renesas: r8a7795: Drop bogus HDMI node names suffixes arm64: dts: renesas: ulcb: Enable display output arm64: dts: renesas: r8a77995: update PFC node name to pin-controller ... commit 400f170dd3dedc49a825090412b660eb3df2bf68 Merge: d8bcaab afd5d2f Author: Arnd Bergmann Date: Thu Oct 19 23:30:36 2017 +0200 Merge tag 'integrator-pciv3-dts' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/soc Pull "DTS updates for the Integrator PCIv3 driver" from Linus Walleij: These are the DTS file changes required to fix bugs and satisfy requirements for the new PCIv3 driver in the PCI subsystem. The binding changes have been merged to the PCI tree. [arnd] Note: this is an incompatible DT binding change, so things will break during bisection or when using an old dtb file. Since integrator has no real users, we can make an exception for that. * tag 'integrator-pciv3-dts' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: dts: Update Integrator/AP PCI v3 compatible ARM: dts: integratorap: Fix PCI windows ARM: dts: add the PCI clock to the device tree commit d8bcaabee40521b33af8ab9b44b5df56eb4cd929 Author: Rob Herring Date: Fri Oct 13 12:54:52 2017 -0500 arm64: dts: fix unit-address leading 0s Fix dtc warnings for 'simple_bus_reg' due to leading 0s. Converted using the following command: perl -p -i -e 's/\@0+([0-9a-f])/\@$1/g' `find arch/arm64/boot/dts -type -f -name '*.dts*' Signed-off-by: Rob Herring Signed-off-by: Arnd Bergmann arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 16 +++--- arch/arm64/boot/dts/apm/apm-shadowcat.dtsi | 6 +- arch/arm64/boot/dts/apm/apm-storm.dtsi | 4 +- arch/arm64/boot/dts/arm/foundation-v8.dtsi | 14 ++--- arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts | 2 +- arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi | 24 ++++---- .../boot/dts/arm/vexpress-v2f-1xv7-ca53x2.dts | 2 +- .../arm64/boot/dts/broadcom/northstar2/ns2-xmc.dts | 2 +- arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi | 4 +- .../boot/dts/broadcom/stingray/stingray-clock.dtsi | 12 ++-- .../boot/dts/broadcom/stingray/stingray-fs4.dtsi | 4 +- .../dts/broadcom/stingray/stingray-pinctrl.dtsi | 4 +- .../boot/dts/broadcom/stingray/stingray-sata.dtsi | 32 +++++------ .../arm64/boot/dts/broadcom/stingray/stingray.dtsi | 66 +++++++++++----------- arch/arm64/boot/dts/cavium/thunder-88xx.dts | 2 +- arch/arm64/boot/dts/cavium/thunder-88xx.dtsi | 32 +++++------ arch/arm64/boot/dts/hisilicon/hip05-d02.dts | 2 +- arch/arm64/boot/dts/hisilicon/hip06-d03.dts | 2 +- arch/arm64/boot/dts/marvell/armada-7040-db.dts | 2 +- arch/arm64/boot/dts/marvell/armada-8040-db.dts | 2 +- arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 2 +- arch/arm64/boot/dts/marvell/armada-8080-db.dts | 2 +- arch/arm64/boot/dts/marvell/armada-ap806-dual.dtsi | 4 +- arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi | 4 +- .../dts/marvell/armada-ap810-ap0-octa-core.dtsi | 4 +- arch/arm64/boot/dts/marvell/berlin4ct.dtsi | 6 +- arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 6 +- arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 10 ++-- arch/arm64/boot/dts/qcom/msm8916.dtsi | 6 +- arch/arm64/boot/dts/qcom/msm8996.dtsi | 12 ++-- 30 files changed, 145 insertions(+), 145 deletions(-) commit 8dccafaa281aa1d240a58bbcdff338aec114a021 Author: Rob Herring Date: Fri Oct 13 12:54:51 2017 -0500 arm: dts: fix unit-address leading 0s Fix dtc warnings for 'simple_bus_reg' due to leading 0s. Converted using the following command: perl -p -i -e 's/\@0+([0-9a-f])/\@$1/g' `find arch/arm/boot/dts -type -f -name '*.dts*' Dropped changes to ARM, Ltd. boards LED nodes and manually fixed up some occurrences of uppercase hex. Signed-off-by: Rob Herring Signed-off-by: Arnd Bergmann arch/arm/boot/dts/armada-370-synology-ds213j.dts | 12 +- arch/arm/boot/dts/armada-385-synology-ds116.dts | 12 +- arch/arm/boot/dts/armada-xp-synology-ds414.dts | 12 +- arch/arm/boot/dts/aspeed-g4.dtsi | 2 +- arch/arm/boot/dts/aspeed-g5.dtsi | 2 +- arch/arm/boot/dts/at91-ariag25.dts | 4 +- arch/arm/boot/dts/at91-ariettag25.dts | 4 +- arch/arm/boot/dts/at91-cosino_mega2560.dts | 4 +- arch/arm/boot/dts/at91-kizbox2.dts | 4 +- arch/arm/boot/dts/at91-kizboxmini.dts | 4 +- arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 6 +- arch/arm/boot/dts/at91-sama5d2_xplained.dts | 6 +- arch/arm/boot/dts/at91-sama5d3_xplained.dts | 6 +- arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts | 6 +- arch/arm/boot/dts/at91-sama5d4_xplained.dts | 6 +- arch/arm/boot/dts/at91-sama5d4ek.dts | 6 +- arch/arm/boot/dts/at91-vinco.dts | 6 +- arch/arm/boot/dts/at91rm9200.dtsi | 4 +- arch/arm/boot/dts/at91rm9200ek.dts | 2 +- arch/arm/boot/dts/at91sam9260.dtsi | 2 +- arch/arm/boot/dts/at91sam9261.dtsi | 4 +- arch/arm/boot/dts/at91sam9261ek.dts | 2 +- arch/arm/boot/dts/at91sam9263.dtsi | 6 +- arch/arm/boot/dts/at91sam9263ek.dts | 2 +- arch/arm/boot/dts/at91sam9g20.dtsi | 4 +- arch/arm/boot/dts/at91sam9g45.dtsi | 6 +- arch/arm/boot/dts/at91sam9m10g45ek.dts | 4 +- arch/arm/boot/dts/at91sam9n12.dtsi | 4 +- arch/arm/boot/dts/at91sam9n12ek.dts | 2 +- arch/arm/boot/dts/at91sam9rl.dtsi | 4 +- arch/arm/boot/dts/at91sam9rlek.dts | 2 +- arch/arm/boot/dts/at91sam9x5.dtsi | 6 +- arch/arm/boot/dts/at91sam9x5ek.dtsi | 4 +- arch/arm/boot/dts/at91sam9xe.dtsi | 4 +- arch/arm/boot/dts/bcm-cygnus.dtsi | 10 +- arch/arm/boot/dts/bcm-nsp.dtsi | 8 +- arch/arm/boot/dts/bcm5301x.dtsi | 6 +- arch/arm/boot/dts/bcm53573.dtsi | 2 +- arch/arm/boot/dts/berlin2.dtsi | 6 +- arch/arm/boot/dts/berlin2cd.dtsi | 6 +- arch/arm/boot/dts/berlin2q.dtsi | 6 +- arch/arm/boot/dts/dove.dtsi | 14 +- arch/arm/boot/dts/ep7211-edb7211.dts | 2 +- arch/arm/boot/dts/exynos3250-artik5.dtsi | 2 +- arch/arm/boot/dts/exynos3250-monk.dts | 2 +- arch/arm/boot/dts/exynos3250-rinato.dts | 2 +- arch/arm/boot/dts/exynos3250.dtsi | 2 +- arch/arm/boot/dts/exynos4.dtsi | 4 +- arch/arm/boot/dts/exynos4210-pinctrl.dtsi | 2 +- arch/arm/boot/dts/exynos4210-universal_c210.dts | 2 +- arch/arm/boot/dts/exynos4210.dtsi | 4 +- arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi | 2 +- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 6 +- arch/arm/boot/dts/exynos4412-origen.dts | 2 +- arch/arm/boot/dts/exynos4412-pinctrl.dtsi | 2 +- arch/arm/boot/dts/exynos4412-trats2.dts | 6 +- arch/arm/boot/dts/exynos4412.dtsi | 2 +- arch/arm/boot/dts/exynos5250-smdk5250.dts | 2 +- arch/arm/boot/dts/exynos5250-snow-common.dtsi | 2 +- arch/arm/boot/dts/exynos5250.dtsi | 6 +- arch/arm/boot/dts/exynos5410-odroidxu.dts | 6 +- arch/arm/boot/dts/exynos5410-smdk5410.dts | 2 +- arch/arm/boot/dts/exynos5410.dtsi | 4 +- arch/arm/boot/dts/exynos5420-arndale-octa.dts | 2 +- arch/arm/boot/dts/exynos5420.dtsi | 6 +- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 2 +- arch/arm/boot/dts/exynos5440-ssdk5440.dts | 2 +- arch/arm/boot/dts/exynos5440.dtsi | 2 +- arch/arm/boot/dts/exynos54xx.dtsi | 2 +- arch/arm/boot/dts/ge863-pro3.dtsi | 2 +- arch/arm/boot/dts/hip01.dtsi | 4 +- arch/arm/boot/dts/hip04-d01.dts | 2 +- arch/arm/boot/dts/hisi-x5hd2.dtsi | 30 +-- arch/arm/boot/dts/imx1.dtsi | 44 ++-- arch/arm/boot/dts/imx25-pdk.dts | 2 +- arch/arm/boot/dts/imx28-apx4devkit.dts | 2 +- arch/arm/boot/dts/imx28-eukrea-mbmx28lc.dtsi | 2 +- arch/arm/boot/dts/imx28-evk.dts | 2 +- arch/arm/boot/dts/imx28-m28evk.dts | 2 +- arch/arm/boot/dts/imx28-tx28.dts | 2 +- arch/arm/boot/dts/imx50.dtsi | 2 +- arch/arm/boot/dts/imx51-babbage.dts | 2 +- arch/arm/boot/dts/imx53-m53evk.dts | 2 +- arch/arm/boot/dts/imx53-qsb-common.dtsi | 2 +- arch/arm/boot/dts/imx53-smd.dts | 4 +- arch/arm/boot/dts/imx53-tx53-x03x.dts | 2 +- arch/arm/boot/dts/imx53-tx53-x13x.dts | 6 +- arch/arm/boot/dts/imx53-voipac-bsb.dts | 2 +- arch/arm/boot/dts/imx53.dtsi | 2 +- arch/arm/boot/dts/imx6dl-riotboard.dts | 4 +- arch/arm/boot/dts/imx6dl-tx6u-811x.dts | 2 +- arch/arm/boot/dts/imx6dl-tx6u-81xx-mb7.dts | 2 +- arch/arm/boot/dts/imx6dl.dtsi | 16 +- arch/arm/boot/dts/imx6q-bx50v3.dtsi | 2 +- arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts | 2 +- arch/arm/boot/dts/imx6q-gw5400-a.dts | 6 +- arch/arm/boot/dts/imx6q-h100.dts | 4 +- arch/arm/boot/dts/imx6q-icore-rqs.dts | 2 +- arch/arm/boot/dts/imx6q-mccmon6.dts | 2 +- arch/arm/boot/dts/imx6q-novena.dts | 4 +- arch/arm/boot/dts/imx6q-tbs2910.dts | 2 +- arch/arm/boot/dts/imx6q-tx6q-1110.dts | 2 +- arch/arm/boot/dts/imx6q-tx6q-11x0-mb7.dts | 2 +- arch/arm/boot/dts/imx6q.dtsi | 16 +- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 4 +- arch/arm/boot/dts/imx6qdl-apf6dev.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-colibri.dtsi | 4 +- arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 4 +- arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 4 +- arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 6 +- arch/arm/boot/dts/imx6qdl-hummingboard.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-nit6xlite.dtsi | 4 +- arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 4 +- arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi | 4 +- arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 4 +- arch/arm/boot/dts/imx6qdl-rex.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 4 +- arch/arm/boot/dts/imx6qdl-tx6.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 2 +- arch/arm/boot/dts/imx6qdl.dtsi | 174 ++++++++-------- arch/arm/boot/dts/imx6qp.dtsi | 6 +- arch/arm/boot/dts/imx6sl-evk.dts | 2 +- arch/arm/boot/dts/imx6sl.dtsi | 134 ++++++------ arch/arm/boot/dts/imx6sx-nitrogen6sx.dts | 2 +- arch/arm/boot/dts/imx6sx-sdb-reva.dts | 2 +- arch/arm/boot/dts/imx6sx-sdb.dts | 2 +- arch/arm/boot/dts/imx6sx-udoo-neo.dtsi | 2 +- arch/arm/boot/dts/imx6sx.dtsi | 186 ++++++++--------- arch/arm/boot/dts/imx6ul-pico-hobbit.dts | 4 +- arch/arm/boot/dts/imx6ul-tx6ul-mainboard.dts | 2 +- arch/arm/boot/dts/imx6ul-tx6ul.dtsi | 2 +- arch/arm/boot/dts/imx6ul.dtsi | 142 ++++++------- arch/arm/boot/dts/imx7-colibri.dtsi | 2 +- arch/arm/boot/dts/imx7d-nitrogen7.dts | 2 +- arch/arm/boot/dts/imx7d-pico.dts | 4 +- arch/arm/boot/dts/imx7d-sdb.dts | 2 +- arch/arm/boot/dts/imx7s-warp.dts | 4 +- arch/arm/boot/dts/integrator.dtsi | 10 +- arch/arm/boot/dts/keystone-k2e.dtsi | 6 +- arch/arm/boot/dts/keystone-k2g.dtsi | 34 +-- arch/arm/boot/dts/keystone-k2hk.dtsi | 8 +- arch/arm/boot/dts/keystone-k2l.dtsi | 12 +- arch/arm/boot/dts/keystone.dtsi | 12 +- arch/arm/boot/dts/kirkwood-synology.dtsi | 12 +- arch/arm/boot/dts/kirkwood-ts219.dtsi | 12 +- arch/arm/boot/dts/kirkwood.dtsi | 4 +- arch/arm/boot/dts/lpc3250-ea3250.dts | 8 +- arch/arm/boot/dts/lpc3250-phy3250.dts | 10 +- arch/arm/boot/dts/lpc32xx.dtsi | 2 +- arch/arm/boot/dts/mpa1600.dts | 2 +- arch/arm/boot/dts/mt6589.dtsi | 2 +- arch/arm/boot/dts/nspire.dtsi | 2 +- arch/arm/boot/dts/omap3-n900.dts | 2 +- arch/arm/boot/dts/ox810se.dtsi | 4 +- arch/arm/boot/dts/ox820.dtsi | 2 +- arch/arm/boot/dts/picoxcell-pc3x2.dtsi | 2 +- arch/arm/boot/dts/picoxcell-pc3x3.dtsi | 2 +- arch/arm/boot/dts/pm9g45.dts | 4 +- arch/arm/boot/dts/qcom-apq8060-dragonboard.dts | 12 +- arch/arm/boot/dts/qcom-msm8660.dtsi | 22 +- arch/arm/boot/dts/qcom-msm8974.dtsi | 16 +- arch/arm/boot/dts/rk3066a-rayeager.dts | 2 +- arch/arm/boot/dts/rk3288-popmetal.dts | 2 +- arch/arm/boot/dts/sama5d2.dtsi | 12 +- arch/arm/boot/dts/sama5d3.dtsi | 8 +- arch/arm/boot/dts/sama5d3xmb.dtsi | 6 +- arch/arm/boot/dts/sama5d3xmb_cmp.dtsi | 2 +- arch/arm/boot/dts/sama5d4.dtsi | 10 +- arch/arm/boot/dts/ste-href-stuib.dtsi | 2 +- arch/arm/boot/dts/ste-href-tvk1281618.dtsi | 2 +- arch/arm/boot/dts/stih407-clock.dtsi | 6 +- arch/arm/boot/dts/stih407-family.dtsi | 18 +- arch/arm/boot/dts/stih407-pinctrl.dtsi | 52 ++--- arch/arm/boot/dts/stih410-b2120.dts | 2 +- arch/arm/boot/dts/stih410-b2260.dts | 4 +- arch/arm/boot/dts/stih410-clock.dtsi | 6 +- arch/arm/boot/dts/stih410.dtsi | 2 +- arch/arm/boot/dts/stih418-b2199.dts | 4 +- arch/arm/boot/dts/stih418-clock.dtsi | 6 +- arch/arm/boot/dts/stih418.dtsi | 2 +- arch/arm/boot/dts/stihxxx-b2120.dtsi | 6 +- arch/arm/boot/dts/sun4i-a10.dtsi | 194 +++++++++--------- arch/arm/boot/dts/sun5i-a10s.dtsi | 6 +- arch/arm/boot/dts/sun5i-a13.dtsi | 4 +- arch/arm/boot/dts/sun5i-gr8.dtsi | 8 +- arch/arm/boot/dts/sun5i.dtsi | 86 ++++---- arch/arm/boot/dts/sun6i-a31.dtsi | 108 +++++----- arch/arm/boot/dts/sun7i-a20.dtsi | 228 ++++++++++----------- arch/arm/boot/dts/sun8i-a23-a33.dtsi | 62 +++--- arch/arm/boot/dts/sun8i-a23.dtsi | 4 +- arch/arm/boot/dts/sun8i-a33.dtsi | 18 +- arch/arm/boot/dts/sun8i-a83t.dtsi | 4 +- arch/arm/boot/dts/sun8i-v3s.dtsi | 32 +-- arch/arm/boot/dts/sun9i-a80.dtsi | 86 ++++---- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 70 +++---- arch/arm/boot/dts/tango4-common.dtsi | 2 +- arch/arm/boot/dts/usb_a9263.dts | 2 +- arch/arm/boot/dts/vf610-twr.dts | 2 +- arch/arm/boot/dts/vf610-zii-dev-rev-c.dts | 2 +- arch/arm/boot/dts/zx296702.dtsi | 4 +- 203 files changed, 1249 insertions(+), 1249 deletions(-) commit 59b630878df1a02b6930077c6ce91bcfb19df761 Author: Surender Polsani Date: Tue Jun 27 17:45:35 2017 +0530 arm: boot: dts: artpec6: Remove unnecessary interrupt-parent property from sub-nodes "interrupt-parent" property is declared in root node, so it is global to all nodes. This property is re-declared in few sub-nodes. To avoid duplication this property is removed from following sub-nodes: pmu, amba@0, amba@0/ethernet. Signed-off-by: Surender Polsani Acked-by: Niklas Cassel Signed-off-by: Arnd Bergmann arch/arm/boot/dts/artpec6.dtsi | 3 --- 1 file changed, 3 deletions(-) commit 4ee7c0d9649d472d31969b9cbb8151161db6a807 Author: Frank Rowand Date: Thu Oct 19 14:38:11 2017 -0700 of: overlay: make pr_err() string unique The same error string occurs in drivers/of/resolver.c. Change the error here to more precisely describe this case, and avoid the possible confusion of looking in the wrong source location to understand the cause of an error. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/overlay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1d19bd4cf1febf0d5ff60243826a248bd20f1a5 Author: Frank Rowand Date: Thu Oct 19 14:18:27 2017 -0700 of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove A device tree overlay notifier can return NOTIFY_OK, NOTIFY_STOP, or an embedded errno. overlay_notify() incorrectly reports an error for NOTIFY_OK. Reported-by: atull@kernel.org Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/overlay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f16ff2bdb135e2eb35488264006b575c476ea597 Author: Matt Redfearn Date: Thu Oct 19 12:55:35 2017 +0100 clocksource/drivers/mips-gic-timer: Add fastpath for local timer updates Always accessing the compare register via the CM redirect region is (relatively) slow. If the timer being updated is the current CPUs then this can be shortcutted by writing to the CM VP local region. Signed-off-by: Matt Redfearn Signed-off-by: Daniel Lezcano drivers/clocksource/mips-gic-timer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 7957b07b559175500b2a03e8a39738c1b4a832fe Author: Matt Redfearn Date: Thu Oct 19 12:55:34 2017 +0100 clocksource/drivers/mips-gic-timer: Remove pointless irq_save,restore The function gic_next_event is always called with interrupts disabled, so the local_irq_save / local_irq_restore are pointless - remove them. [Daniel Lezcano: Fixed warning by removing unused variable 'flags'] Signed-off-by: Matt Redfearn Suggested-by: Daniel Lezcano Reported-by: Thomas Gleixner Signed-off-by: Daniel Lezcano drivers/clocksource/mips-gic-timer.c | 3 --- 1 file changed, 3 deletions(-) commit a7fb4577bbe307dd3dd971c7ea8f35a68fc031ca Author: Mark Rutland Date: Mon Oct 16 16:28:39 2017 +0100 clocksource/drivers/arm_arch_timer: Fix DEFINE_PER_CPU expansion Our ctags mangling script can't handle newlines inside of a DEFINE_PER_CPU(), leading to an annoying message whenever tags are built: ctags: Warning: drivers/clocksource/arm_arch_timer.c:302: null expansion of name pattern "\1" This was dealt with elsewhere in commit: 25528213fe9f75f4 ("tags: Fix DEFINE_PER_CPU expansions") ... by ensuring each DEFINE_PER_CPU() was contained on a single line, even where this would violate the usual code style (checkpatch warnings and all). Let's do the same for the arch timer driver, and get rid of the distraction. Signed-off-by: Mark Rutland Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano drivers/clocksource/arm_arch_timer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 21492e1333a0d07af6968667f128e19088cf5ead Author: Ard Biesheuvel Date: Mon Oct 16 16:28:38 2017 +0100 clocksource/drivers/arm_arch_timer: Validate CNTFRQ after enabling frame The ACPI GTDT code validates the CNTFRQ field of each MMIO timer frame against the CNTFRQ system register of the current CPU, to ensure that they are equal, which is mandated by the architecture. However, reading the CNTFRQ field of a frame is not possible until the RFRQ bit in the frame's CNTACRn register is set, and doing so before that willl produce the following error: arch_timer: [Firmware Bug]: CNTFRQ mismatch: frame @ 0x00000000e0be0000: (0x00000000), CPU: (0x0ee6b280) arch_timer: Disabling MMIO timers due to CNTFRQ mismatch arch_timer: Failed to initialize memory-mapped timer. The reason is that the CNTFRQ field is RES0 if access is not enabled. So move the validation of CNTFRQ into the loop that iterates over the timers to find the best frame, but defer it until after we have selected the best frame, which should also have enabled the RFRQ bit. Signed-off-by: Ard Biesheuvel Signed-off-by: Mark Rutland Signed-off-by: Daniel Lezcano drivers/clocksource/arm_arch_timer.c | 38 ++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 17 deletions(-) commit 2d764649e4b18409a65befb2bdf1483dd56b992b Author: Daniel Lezcano Date: Tue Sep 19 07:54:40 2017 +0200 MAINTAINERS: Fix path and add bindings to timers As spotted by Andreas Färber, the clocksource directory path does not follow the rule where a maintained directory must end with a '/' character. Also, the timers devicetree bindings documentation is not mentioned in the entry, so every submission touching the devicetree documentation misses to Cc the maintainers of the timers. Reported-by: Andreas Färber Reviewed-by: Andreas Färber Signed-off-by: Daniel Lezcano MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2f8a26c166eba01382765bc2fa575387e41079ac Author: Arnd Bergmann Date: Tue Sep 5 17:04:56 2017 +0200 clocksource: Improve GENERIC_CLOCKEVENTS dependency We regularly run into build errors when a clocksource driver selects CONFIG_TIMER_OF while CONFIG_GENERIC_CLOCKEVENTS is disabled: In file included from drivers/clocksource/timer-of.c:25:0: drivers/clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type At the moment, three drivers can show this behavior: ARMV7M_SYSTICK, CLKSRC_ST_LPC and CLKSRC_NPS. We could add further dependencies as we did many times, but I have looked a little bit more at what architectures are left that don't use GENERIC_CLOCKEVENTS, and this shows that there is a better solution. On arch/frv and arch/ia64, we never select CONFIG_GENERIC_CLOCKEVENTS and we also don't use ARCH_USES_GETTIMEOFFSET, which would block the clocksource Kconfig menu. On m68k, some platforms use CONFIG_GENERIC_CLOCKEVENTS, some use ARCH_USES_GETTIMEOFFSET, and some use neither of them. The good news is that there is no configuration that does not set CONFIG_GENERIC_CLOCKEVENTS but that wants to enable any of the Kconfig symbols in the menu, so we can simply replace the dependency with the stricter one. While in theory one could have a clocksource driver without the clockevent infrastructure, this seems unlikely to be relevant in the future any more. We can probably drop some of the other dependencies as well now, e.g. there should generally be no reason to depend on CONFIG_ARM unless the driver uses architecture specific assembly. Reported-by: Randy Dunlap Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Signed-off-by: Daniel Lezcano drivers/clocksource/Kconfig | 50 ++++++++------------------------------------- 1 file changed, 9 insertions(+), 41 deletions(-) commit 2554828b17ad16892cdd1becb43230782f0c0cfd Author: Arvind Yadav Date: Mon Sep 25 13:46:41 2017 +0530 clocksource/drivers/rockchip: pr_err() strings should end with newlines pr_err() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav Signed-off-by: Daniel Lezcano drivers/clocksource/rockchip_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c044a15ff2e4ba97eb14d772510eba974c6db58 Author: Arvind Yadav Date: Mon Sep 25 13:46:40 2017 +0530 clocksource/drivers/owl: pr_err() strings should end with newlines pr_err() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav Reviewed-by: Andreas Färber Signed-off-by: Daniel Lezcano drivers/clocksource/owl-timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1893428bd8d14e88facdf745479be0130753f6e9 Author: Arvind Yadav Date: Mon Sep 25 13:46:39 2017 +0530 clocksource/drivers/fttmr010: pr_err() strings should end with newlines pr_err() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav Signed-off-by: Daniel Lezcano drivers/clocksource/timer-fttmr010.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d1d5172bf843fb44fcc7d3ff61501e9a6601e74 Author: Geert Uytterhoeven Date: Mon Sep 18 15:46:47 2017 +0200 clocksource/drivers/sh_cmt: Use of_device_get_match_data() helper Use the existing of_device_get_match_data() helper instead of open-coding its functionality. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Lezcano drivers/clocksource/sh_cmt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d1d285972e24b63eeee8118359dcd4c451b295c5 Author: Geert Uytterhoeven Date: Mon Sep 18 15:46:46 2017 +0200 clocksource/drivers/sh_cmt: Remove unused "renesas, channels-mask" handling The in-driver channel configuration in sh_cmt_info.channels_mask is now always set for all CMT devices instantiated from DT. Hence the "renesas,channels-mask" property is no longer checked, and its handling can be removed, cfr. commit 4e18111ff38f0664 ("devicetree: bindings: Remove deprecated properties"). Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Lezcano drivers/clocksource/sh_cmt.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit 8d50e9476bb4aea53fca12637e71d950deafdf37 Author: Geert Uytterhoeven Date: Mon Sep 18 15:46:45 2017 +0200 clocksource/drivers/sh_cmt: Mark "renesas,cmt-48-gen2" deprecated Document in the driver that "renesas,cmt-48-gen2" is deprecated, but still supported for backward compatibility with old DTBs, cfr. commit 4e18111ff38f0664 ("devicetree: bindings: Remove deprecated properties"). Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Lezcano drivers/clocksource/sh_cmt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f11fb6df3c1924e3623d1afd1db23ea16c68fbb5 Author: Geert Uytterhoeven Date: Mon Sep 18 15:46:44 2017 +0200 clocksource/drivers/sh_cmt: Remove support for "renesas,cmt-32*" Remove driver matching support for the unused "renesas,cmt-32" and "renesas,cmt-32-fast" compatible values, cfr. commit 203bb3479958c48a ("devicetree: bindings: Remove unused 32-bit CMT bindings"). As this removes the last user of SH_CMT_32BIT_FAST, all support for this variant is removed from the driver. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Lezcano drivers/clocksource/sh_cmt.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 83c79a6d8d7f4821ba0712da57f2f51326f0c447 Author: Magnus Damm Date: Mon Sep 18 15:46:43 2017 +0200 clocksource/drivers/sh_cmt: Support separate R-Car Gen2 CMT0/1 Add support for the new R-Car Gen2 CMT0 and CMT1 bindings. Support for the old DT binding is still kept around, however devices using such binding will be treated as a low-feature CMT0 device. If users want to make use of CMT1-specific features then they need to update their DTBs. No special CMT1-specific features are however implemented by his patch, only DT bindings are redone as groundwork for future feature patches. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart Reviewed-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano drivers/clocksource/sh_cmt.c | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) commit 464eed841f54b56df35132434497235f06b154f6 Author: Magnus Damm Date: Mon Sep 18 15:46:42 2017 +0200 clocksource/drivers/sh_cmt: Use 0x3f mask for SH_CMT_48BIT case Always use 0x3f as channel mask for the SH_CMT_48BIT type of devices. Once this patch is applied the "renesas,channels-mask" property will be ignored by the driver for older devices matching SH_CMT_48BIT. In the future when all CMT types store channel mask in the driver then we will be able to deprecate and remove "renesas,channels-mask" from DTS. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart Reviewed-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano drivers/clocksource/sh_cmt.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit e20824e944c3bf4352fcd8d9f446c41b53901e7b Author: Geert Uytterhoeven Date: Mon Sep 18 15:46:41 2017 +0200 dt-bindings: timer: renesas, cmt: Fix SoC-specific compatible values While the new family-specific compatible values introduced by commit 6f54cc1adcc8957f ("devicetree: bindings: R-Car Gen2 CMT0 and CMT1 bindings") use the recommended order ",-", the new SoC-specific compatible values still use the old and deprecated order ",-". Switch the SoC-specific compatible values to the recommended order while there are no upstream users of these compatible values yet. Fixes: 7f03a0ecfdc786c1 ("devicetree: bindings: r8a73a4 and R-Car Gen2 CMT bindings") Fixes: 63d9e8ca0dd4bfa4 ("devicetree: bindings: Deprecate property, update example") Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Lezcano .../devicetree/bindings/timer/renesas,cmt.txt | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) commit 1843594c56bd79598a7ca4e6f7b6173e7d71b941 Author: Kees Cook Date: Mon Oct 16 14:56:58 2017 -0700 ahci: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Adds a pointer back to link structure. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Acked-by: Tejun Heo Cc: linux-ide@vger.kernel.org Link: https://lkml.kernel.org/r/20171016215658.GA101965@beast drivers/ata/ahci.h | 1 + drivers/ata/libahci.c | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) commit e4191c53ae4627fe5bf32fd77abaa527f49b628b Merge: f14100b 4a95602 Author: Arnd Bergmann Date: Thu Oct 19 22:55:28 2017 +0200 Merge tag 'stm32-defconfig-for-v4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into next/soc Pull "STM32 defconfig updates for v4.15, round 1" from Alexandre Torgue: Highlights: ---------- -Regenerate default configuration -Add DMAMUX support -Add I2C F7 support -Add MDMA support * tag 'stm32-defconfig-for-v4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: configs: stm32: Add MDMA support in STM32 defconfig ARM: configs: stm32: Add I2C F7 support in STM32 defconfig ARM: configs: stm32: Add DMAMUX support in STM32 defconfig ARM: configs: stm32: Update default configuration for v4.14-rc1 commit f14100b2a4bb6ca4276c793cfdccd5cfdb089b2c Author: Linus Walleij Date: Tue Oct 17 11:32:08 2017 +0200 ARM: defconfig: select the right SX150X driver The SX150X GPIO expander has been moved to pin control and its Kconfig symbol has been renamed. We used to have a paper-over thing in Kconfig but it was causing circular dependencies so I have had to kill it off. Select the right driver instead. Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann arch/arm/configs/lpc32xx_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e130634e8a20f32b0744b8eccd47398fbdb9145 Merge: f4b5c3b 1dfd499 Author: Arnd Bergmann Date: Thu Oct 19 22:53:28 2017 +0200 Merge tag 'qcom-defconfig-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/soc Pull "Qualcomm ARM Based defconfig Updates for v4.15" from Andy Gross: * Enable Sony Z2 tablet options * Enable USB on APQ8064/MSM8974 * Fixup/catchup config to support newer options * tag 'qcom-defconfig-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: ARM: qcom_defconfig: Enable Z2 Tablet related options ARM: qcom_defconfig: Disable DEBUG_GPIO ARM: qcom_defconfig: Enable configs for USB on apq8064/msm8974 ARM: qcom_defconfig: Resync with new Kconfig options commit f4b5c3bdc387fb16f0f3320cb436e7c2bf0143e1 Merge: 29ce2f3 b8eb03a Author: Arnd Bergmann Date: Thu Oct 19 22:52:24 2017 +0200 Merge tag 'qcom-arm64-defconfig-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into next/soc Pull "Qualcomm ARM64 Based defconfig Updates for v4.15" from Andy Gross: * Enable QCOM IOMMU * Enable Qualcomm USB options * tag 'qcom-arm64-defconfig-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux: arm64: defconfig: re-enable Qualcomm DB410c USB arm64: defconfig: Enable QCOM_IOMMU commit 29ce2f3424f54ea02a487af4200aabb4c82d0b50 Merge: 818f62a 57fc552 Author: Arnd Bergmann Date: Thu Oct 19 22:49:55 2017 +0200 Merge tag 'zynq-soc-for-4.15' of https://github.com/Xilinx/linux-xlnx into next/soc Pull "arm: Xilinx Zynq patches for v4.15" from Michal Simek: - Remove Soren from reviewer list * tag 'zynq-soc-for-4.15' of https://github.com/Xilinx/linux-xlnx: MAINTAINERS: Remove myself as reviewer commit 818f62ab28494c495d62d136fba7a4c1024c8a03 Merge: 977478f 9e43eca Author: Arnd Bergmann Date: Thu Oct 19 22:47:20 2017 +0200 Merge tag 'samsung-soc-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/soc Pull "Samsung mach/soc changes for v4.15" from Krzysztof Kozłowski: 1. Cleanups for s3c24xx and s3c64xx (memory allocation printks, code style). 2. Remove of Exynos4212 related dead code (no more support for this SoC). * tag 'samsung-soc-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: EXYNOS: Remove Exynos4212 related dead code ARM: SAMSUNG: Simplify size used for kzalloc ARM: SAMSUNG: Remove printk for failed memory allocation ARM: s3c64xx: Delete an unnecessary return statement in samsung_bl_set ARM: s3c64xx: Remove printk for failed memory allocation in samsung_bl_set ARM: s3c2410: Fix typos in a comments ARM: s3c24xx: Simplify size used for kzalloc in iotiming get ARM: s3c24xx: Remove printk for failed memory allocation in iotiming get commit 977478f9e0843a4abd8d59484ab4ca0c2a70ce1d Merge: a1bc4e7 a7620b2d Author: Arnd Bergmann Date: Thu Oct 19 22:46:29 2017 +0200 Merge tag 'samsung-defconfig-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/soc Pull "Samsung defconfig changes for v4.15" from Krzysztof Kozłowski: 1. Enable USB3503 on multi_v7 for Odroid U3. 2. Enable USB Attached SCSI for Odroid HC1. * tag 'samsung-defconfig-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: multi_v7_defconfig: Enable UAS support for Odroid HC1 board ARM: exynos_defconfig: Enable UAS support for Odroid HC1 board ARM: multi_v7_defconfig: Enable USB3503 driver commit a1bc4e7cee3f69955d20c1e10bb62b1803e5db6e Merge: 82e3c83 28fd7e9 Author: Arnd Bergmann Date: Thu Oct 19 22:44:20 2017 +0200 Merge tag 'omap-for-v4.15/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc Pull "OMAP soc changes for omaps for v4.15 merge window" from Tony Lindgren: SoC changes for omaps for v4.15 merge window that are mostly non-urgent fixes and clean-up in preparation for dropping more platform data later on: - Fix am33xx/am437x MMC address space offsets - Fix overwriting clkctrl and modulemode values when dts data is used - Drop unused platform init code for omap_init_hdq - Drop unused struct omap_hwmod_mux_info - Remove duplicate define for dra722 es1.0 silicon revision - Add support for dra71x es2.1 - Make omap_dma_dev_info __initdata - A series of fixes for Coccinelle found issues * tag 'omap-for-v4.15/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP: Fix typos in two comment lines in _omap_dm_timer_request() ARM: OMAP: Use kcalloc() in omap_system_dma_probe() ARM: OMAP: Improve a size determination in two functions ARM: OMAP: Delete an error message for a failed memory allocation in two functions ARM: OMAP2+: make omap_dma_dev_info __initdata ARM: DRA722: Add support for DRA71x Silicon Rev 2.1 ARM: DRA722: remove redundant definition of 1.0 device ARM: OMAP2+: Drop unused omap_hwmod_mux_info ARM: OMAP2+: Drop unused omap_init_hdq ARM: OMAP2+: Fix overwriting of clkctrl and modulemode values ARM: OMAP2+: Fix MMC address space mismatch for am33xx and am43xx commit 82e3c83e23ff0d08de575e359b5eb5e50c7f894f Merge: 06743cb 5627453 Author: Arnd Bergmann Date: Thu Oct 19 22:43:31 2017 +0200 Merge tag 'davinci-for-v4.15/defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/soc Pull "DaVinci defconfig updates for v4.15" from Sekhar Nori: Enable CMA and MTD command line partitioning support. * tag 'davinci-for-v4.15/defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci_all_defconfig: enable CMA options ARM: davinci_all_defconfig: enable MTD_CMDLINE_PARTS commit 06743cbfc5e11d6af3293e4f7e5468ab83f3e369 Merge: 52ba30e f9a3da5 Author: Arnd Bergmann Date: Thu Oct 19 22:41:48 2017 +0200 Merge tag 'hisi-defconfig-for-4.15' of git://github.com/hisilicon/linux-hisi into next/soc Pull "ARM64: hisilicon: defconfig updates for 4.15" from Wei Xu: - Enable DRM_HISI_HIBMC for the D03/D05 board * tag 'hisi-defconfig-for-4.15' of git://github.com/hisilicon/linux-hisi: arm64: defconfig: Enable hisilicon hibmc drm driver commit 52ba30ebe250750567694a808c488a12e5dcc97a Author: Nicolas Dechesne Date: Wed Oct 11 17:19:25 2017 +0200 arm64: defconfig: Enable QCOM_IOMMU Enable QCOM IOMMU driver for 'B' family devices, such as APQ8016 found on the Dragonboard 410c. With this change, graphics console and GPU are working fine (using mesa/freedreno for GPU driver). Signed-off-by: Nicolas Dechesne Acked-by: Bjorn Andersson Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit b2f68edfd5bb1c7613628a66ba71a0db0266ee22 Author: Lukas Wunner Date: Thu Oct 12 12:40:10 2017 +0200 gpio: Add driver for Maxim MAX3191x industrial serializer The driver was developed for and tested with the MAX31913 built into the Revolution Pi by KUNBUS, but should work with all members of the MAX3191x family: MAX31910: low power MAX31911: LED drivers MAX31912: LED drivers + 2nd voltage monitor + low power MAX31913: LED drivers + 2nd voltage monitor MAX31953: LED drivers + 2nd voltage monitor + isolation MAX31963: LED drivers + 2nd voltage monitor + isolation + buck regulator Cc: Mathias Duckeck Signed-off-by: Lukas Wunner Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 10 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-max3191x.c | 492 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 503 insertions(+) commit 0454c9212d25bcf963810db9e4cb6311d666c0d5 Author: Robin Murphy Date: Wed Oct 11 16:15:41 2017 +0100 arm64: Add ThunderX drivers to defconfig ThunderX needs its PCI host drivers to do anything useful, and it's probably helpful to have networking by default too. Signed-off-by: Robin Murphy Signed-off-by: Arnd Bergmann arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit e514130c11601a1fe6ef3a6f1715220dcbc124f0 Merge: 877cd7a 703ef76 Author: Arnd Bergmann Date: Thu Oct 19 22:37:51 2017 +0200 Merge tag 'renesas-soc2-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Pull "Second Round of Renesas ARM Based SoC Updates for v4.15" from Simon Horman: Fix to allow UP build of shmobile. Arnd Bergmann says: A bugfix for the SMP case broke the build for the UP case: arch/arm/mach-shmobile/headsmp-apmu.o: In function `shmobile_boot_apmu': (.text+0x34): undefined reference to `secondary_startup' The assembler file mixes code that is used for SMP with code that we also need on a single-CPU build, so I'm leaving it always enabled in the Makefile, but enclose the SMP code in an #ifdef. * tag 'renesas-soc2-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: rcar-gen2: fix non-SMP build commit 877cd7ae0d4cc5549ca3f9137ef7a3ee40b7a244 Merge: 6dc3265 e8b44f3 Author: Arnd Bergmann Date: Thu Oct 19 22:36:41 2017 +0200 Merge tag 'vexpress-updates-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into next/soc Pull "ARMv7 Vexpress update/cleanup for v4.15" from Sudeep Holla: Cosmetic cleanup dropping extra debug messages for memory allocation failures * tag 'vexpress-updates-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: ARM: vexpress/spc: Delete an error message for a failed memory allocation commit c019c18da10dae244308f584707804d0c148fe0b Author: Lukas Wunner Date: Thu Oct 12 12:40:10 2017 +0200 dt-bindings: gpio: max3191x: Document new driver Add device tree bindings for Maxim MAX3191x industrial serializer. Cc: Mathias Duckeck Signed-off-by: Lukas Wunner Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/gpio-max3191x.txt | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 1f63fab955dbcb8f6db56d67a4c63fc0746e4fe1 Author: Lukas Wunner Date: Thu Oct 12 12:40:10 2017 +0200 dt-bindings: Document common property for daisy-chained devices Many serially-attached GPIO and IIO devices are daisy-chainable. Examples for GPIO devices are Maxim MAX3191x and TI SN65HVS88x: https://datasheets.maximintegrated.com/en/ds/MAX31913.pdf http://www.ti.com/lit/ds/symlink/sn65hvs880.pdf Examples for IIO devices are TI DAC128S085 and TI DAC161S055: http://www.ti.com/lit/ds/symlink/dac128s085.pdf http://www.ti.com/lit/ds/symlink/dac161s055.pdf We already have drivers for daisy-chainable devices in the tree but their devicetree bindings are somewhat inconsistent and ill-named: The gpio-74x164.c driver uses "registers-number" to convey the number of devices in the daisy-chain. (Sans vendor prefix, multiple vendors sell compatible versions of this chip.) The gpio-pisosr.c driver takes a different approach and calculates the number of devices in the daisy-chain by dividing the common "ngpios" property (Documentation/devicetree/bindings/gpio/gpio.txt) by 8 (which assumes that each chip has 8 inputs). Let's standardize on a common "#daisy-chained-devices" property. That name was chosen because it's the term most frequently used in datasheets. (A less frequently used synonym is "cascaded devices".) Signed-off-by: Lukas Wunner Acked-by: Jonathan Cameron Acked-by: Rob Herring Signed-off-by: Linus Walleij .../devicetree/bindings/common-properties.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 5048f0aefb96fe3fd468002c879d7a5918336b1f Author: Martin Kaiser Date: Wed Oct 18 18:32:47 2017 +0200 gpiolib: clear irq handler and data in one go Replace the two separate calls for clearing the irqchip's chained handler and its data with a single irq_set_chained_handler_and_data() call. Signed-off-by: Martin Kaiser Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3ee9e605caea401b060a1f9f81343b8bd0952fbd Author: Thierry Reding Date: Mon Oct 16 14:40:23 2017 +0200 pinctrl: armada-37xx: Stop using struct gpio_chip.irq_base The Armada 37xx driver always initializes the IRQ base to 0, hence the subtraction is a no-op. Remove the subtraction and thereby the last user of struct gpio_chip's .irq_base field. Note that this was also actually a bug and only worked because of the above assumption. If the IRQ base had been dynamically allocated, the subtraction would've caused the wrong mask to be generated since the struct irq_data.hwirq field is an index local to the IRQ domain. As a result, it should now be safe to also allocate this chip's IRQ base dynamically, unless there are consumers left that refer to the IRQs by their global number. Signed-off-by: Thierry Reding Acked-by: Gregory CLEMENT Signed-off-by: Linus Walleij drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0747c3ecfbed25cb6e31b09a834091757a3ef866 Author: Tom Saeger Date: Thu Oct 12 15:24:16 2017 -0500 Documentation: fix ref to gpio.txt Signed-off-by: Tom Saeger Signed-off-by: Linus Walleij Documentation/ABI/obsolete/sysfs-gpio | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e80df7b823bc3e59eaf93ec05bb701bbc7b6c586 Author: Gustavo A. R. Silva Date: Fri Oct 13 15:43:53 2017 -0500 gpio: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Linus Walleij drivers/gpio/gpio-aspeed.c | 3 +++ drivers/gpio/gpio-ath79.c | 1 + drivers/gpio/gpio-stmpe.c | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) commit 609aaf6a60299256d2a6f2be499327a409dada17 Author: Bartosz Golaszewski Date: Mon Oct 16 11:32:30 2017 +0200 gpiolib: don't allow OPEN_DRAIN & OPEN_SOURCE flags for input OPEN_DRAIN and OPEN_SOURCE flags only affect the way we drive a GPIO line, so they only make sense for output mode. Just as we only allow input mode for event handle requests, don't allow passing open-drain and open-source flags for any other mode than explicit output. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 418ee8e91fe7fc90ffb6bce391304e084f77bce4 Author: Bartosz Golaszewski Date: Mon Oct 16 11:32:29 2017 +0200 gpiolib: only check line handle flags once There's no need to check the validity of handle request flags more than once, right after copying the data from user. Move the check out of the for loop and simplify the error path by bailing out before allocating any resources. Signed-off-by: Bartosz Golaszewski Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit eec1d566cdf94b57e8f5ba9fe60eea214929bcfc Author: Lukas Wunner Date: Thu Oct 12 12:40:10 2017 +0200 gpio: Introduce ->get_multiple callback SPI-attached GPIO controllers typically read out all inputs in one go. If callers desire the values of multipe inputs, ideally a single readout should take place to return the desired values. However the current driver API only offers a ->get callback but no ->get_multiple (unlike ->set_multiple, which is present). Thus, to read multiple inputs, a full readout needs to be performed for every single value (barring driver-internal caching), which is inefficient. In fact, the lack of a ->get_multiple callback has been bemoaned repeatedly by the gpio subsystem maintainer: http://www.spinics.net/lists/linux-gpio/msg10571.html http://www.spinics.net/lists/devicetree/msg121734.html Introduce the missing callback. Add corresponding consumer functions such as gpiod_get_array_value(). Amend linehandle_ioctl() to take advantage of the newly added infrastructure. Update the documentation. Cc: Rojhalat Ibrahim Signed-off-by: Lukas Wunner Signed-off-by: Linus Walleij Documentation/gpio/consumer.txt | 41 ++++++--- drivers/gpio/gpiolib.c | 179 +++++++++++++++++++++++++++++++++++++--- drivers/gpio/gpiolib.h | 4 + include/linux/gpio/consumer.h | 43 ++++++++++ include/linux/gpio/driver.h | 5 ++ 5 files changed, 250 insertions(+), 22 deletions(-) commit 5307e2ad69ab3b0e0622fdf8b254c1d4565eb924 Author: Lukas Wunner Date: Thu Oct 12 12:40:10 2017 +0200 bitops: Introduce assign_bit() A common idiom is to assign a value to a bit with: if (value) set_bit(nr, addr); else clear_bit(nr, addr); Likewise common is the one-line expression variant: value ? set_bit(nr, addr) : clear_bit(nr, addr); Commit 9a8ac3ae682e ("dm mpath: cleanup QUEUE_IF_NO_PATH bit manipulation by introducing assign_bit()") introduced assign_bit() to the md subsystem for brevity. Make it available to others, specifically gpiolib and the upcoming driver for Maxim MAX3191x industrial serializer chips. As requested by Peter Zijlstra, change the argument order to reflect traditional "dst = src" in C, hence "assign_bit(nr, addr, value)". Cc: Bart Van Assche Cc: Alasdair Kergon Cc: Mike Snitzer Cc: Linus Walleij Cc: Neil Brown Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Theodore Ts'o Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Denys Vlasenko Acked-by: Andrew Morton Signed-off-by: Lukas Wunner Signed-off-by: Linus Walleij drivers/md/dm-mpath.c | 22 +++++++--------------- include/linux/bitops.h | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 15 deletions(-) commit 07901a94f9f9b11cc3a4537e33229cb7e7df5d2a Author: Alan Tull Date: Wed Oct 11 11:34:44 2017 -0500 gpio: gpio-dwapb: add optional reset Some platforms require reset to be released to allow register access. Signed-off-by: Alan Tull Reviewed-by: Philipp Zabel [Added DT bindings oneliner for standard reset binding] Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/snps-dwapb-gpio.txt | 1 + drivers/gpio/gpio-dwapb.c | 9 +++++++++ 2 files changed, 10 insertions(+) commit f76a2d9d7f9524c54dfd9c7b49ed26e488c4cf6c Author: Sergei Shtylyov Date: Wed Oct 11 22:51:59 2017 +0300 gpio-rcar: document R8A77970 bindings Renesas R-Car V3M (R8A77970) SoC also has the R-Car gen3 compatible GPIO controllers, so document the SoC specific bindings. Signed-off-by: Sergei Shtylyov Signed-off-by: Linus Walleij Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt | 1 + 1 file changed, 1 insertion(+) commit f628ba9e22e0fa32ac6270a0d696fe1509889540 Author: Grygorii Strashko Date: Mon Oct 9 17:16:05 2017 -0500 gpiolib: drop irq_base field from gpio_chip struct Hence, the last user of irq_base field was removed by commit b4c495f03ae3 ("gpio: mockup: use irq_sim") it can be removed safely. Signed-off-by: Grygorii Strashko Signed-off-by: Linus Walleij include/linux/gpio/driver.h | 2 -- 1 file changed, 2 deletions(-) commit af0c8c10564aac5b6d67308129ec09c4ad5db476 Author: Eric Anholt Date: Fri Oct 13 17:12:55 2017 -0700 drm/vc4: Fix sleeps during the IRQ handler for DSI transactions. VC4's DSI1 has a bug where the AXI connection is broken for 32-bit writes from the CPU, so we use the DMA engine to DMA 32-bit values into registers instead. That sleeps, so we can't do it from the top half. As a solution, use an interrupt thread so that all our writes happen when sleeping is is allowed. v2: Use IRQF_ONESHOT (suggested by Boris) v3: Style nitpicks. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20171014001255.32005-1-eric@anholt.net Reviewed-by: Boris Brezillon (v2) drivers/gpu/drm/vc4/vc4_dsi.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) commit 96687ec0bb478088cb6941a7dca3bb6808a19313 Author: Georgiana Chelu Date: Tue Oct 17 23:22:09 2017 +0300 drm/amd/powerplay: Place the constant on the right side of the test Move the constant on the right side of the comparison in order to make the code easier to read. Issue found by checkpatch script: * WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Georgiana Chelu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c1537c342086ff7cf064d274db0c03f6698f77d8 Author: Georgiana Chelu Date: Tue Oct 17 23:22:08 2017 +0300 drm/amd/powerplay: Remove useless variable The result variable is initialized at the beginning of the function, but its value does not change during the function execution. Thus, remove the variable and return the SUCCESS value, which is 0. Issue found by coccinelle script: * Unneeded variable: "result". Return "0" Path to the cocci script: scripts/coccinelle/misc/returnvar.cocci Signed-off-by: Georgiana Chelu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bada22d021135374332bc7de59c93761778d7989 Author: Georgiana Chelu Date: Tue Oct 17 23:22:07 2017 +0300 drm/amd/powerplay: Don't cast kzalloc() return value The kzalloc function returns a void pointer and the assignment operator converts it to the type of pointer it is assigned to. Therefore, there is no need to cast. Issue found by alloc_cast.cocci: * WARNING: casting value returned by memory allocation function to is useless. Path to the cocci script: scripts/coccinelle/api/alloc/alloc_cast.cocci Signed-off-by: Georgiana Chelu Signed-off-by: Alex Deucher .../amd/powerplay/hwmgr/vega10_processpptables.c | 24 ++++++++-------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit d2d7cc330dc1f8ea7cf29dfb7d3ad8bccdcde597 Author: Christian König Date: Mon Oct 16 11:18:54 2017 +0200 drm/amdgpu: allow GTT overcommit during bind While binding BOs to GART we need to allow a bit overcommit in the GTT domain. Otherwise we can never use the full GART space when GART size=GTT size. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 4b6b691ee38abae8842aed61d442dfb315c45789 Author: Christian König Date: Mon Oct 16 10:32:04 2017 +0200 drm/amdgpu: linear validate first then bind to GART For VM emulation for old UVD/VCE we need to validate the BO with linear VRAM flag set first and then eventually bind it to GART. Validating with linear VRAM flag set can move the BO to GART making UVD/VCE read/write from an unbound GART BO. Signed-off-by: Christian König Reviewed-by: Alex Deucher CC: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 658b93913e7a8a8d418b6d1208e88ddacc4d245d Author: Rex Zhu Date: Wed Oct 18 17:43:43 2017 +0800 drm/amd/pp: Fix overflow when setup decf/pix/disp dpm table. Clear the count in the single table setup function to avoid missing any tables. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1ed05ff4797a2935f04fbb4f465cd70a8a017709 Author: Rex Zhu Date: Wed Oct 18 14:31:40 2017 +0800 drm/amd/pp: thermal control not enabled on vega10. regression issue. caused by "f12f9f5e5d455edebc01" forget to set start_thermal_controller function point. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 1 + drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 43ca8efa46d9b1c4defa1b27c4dd1ef3866aaad9 Author: pding Date: Fri Oct 13 15:38:35 2017 +0800 drm/amdgpu: busywait KIQ register accessing (v4) Register accessing is performed when IRQ is disabled. Never sleep in this function. Known issue: dead sleep in many use cases of index/data registers. v2: - wrap polling fence functions. - don't trigger IRQ for polling in case of wrongly fence signal. v3: - handle wrap round gracefully. - add comments for polling function v4: - don't return negative timeout confused with error code Signed-off-by: pding 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 | 8 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 50 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 4 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 30 ++++++++---------- 6 files changed, 71 insertions(+), 25 deletions(-) commit e71de0766191d32648cf12dfb2f53f05e52b2dcc Author: pding Date: Thu Oct 12 13:53:20 2017 +0800 drm/amdgpu: report more amdgpu_fence_info Only for GFX ring. This can help checking MCBP feature. The fence at the end of the frame will indicate the completion status. If the frame completed normally, the fence is written to the address given in the EVENT_WRITE_EOP packet. If preemption occurred in the previous IB the address is adjusted by 2 DWs. If work submitted in the frame was reset before completion, the fence address is adjusted by four DWs. In the case that preemption occurred, and before preemption completed a reset was initiated, the address will be adjusted with six DWs Signed-off-by: pding Reviewed-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit f993d628a2d3cb5e0a82a5284b24cef745f42b41 Author: Monk Liu Date: Mon Oct 16 19:46:01 2017 +0800 drm/amdgpu:don't check soft_reset for sriov Signed-off-by: Monk Liu Ack-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+) commit c70b78a71e9a283240f72dfdfff8fd2388db51da Author: Monk Liu Date: Mon Oct 16 20:02:08 2017 +0800 drm/amdgpu:fix duplicated setting job's vram_lost Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 896a664c969307a4954cd8c7754fd5d4e5358396 Author: Monk Liu Date: Tue Oct 17 19:23:42 2017 +0800 drm/amdgpu:reduce wb to 512 slot with current WB usage we only use 57 slots, so 512 is extreamly sufficient, and reduce to 512 can make WB fit into one page. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e13bdf6b2d71ab2366a9f87c99d11963aed3bad Author: Rex Zhu Date: Wed Oct 18 17:19:42 2017 +0800 drm/amdgpu: fix regresstion on SR-IOV gpu reset failed fw ucode is corrupted after vf flr by PSP so ucode_init() is a must in psp_hw_init othewise KIQ/KCQ enabling will fail Revert "drm/amdgpu: refine code delete duplicated error handling" This reverts commit e57b87ff828f95efe992468e6d18c2c059b27aa9. Revert "drm/amdgpu: move amdgpu_ucode_init_bo to amdgpu_device.c" This reverts commit 815b8f8595148d06a64d2ce4282e8e80dfcb02f1. Reviewed-by: Monk Liu Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 -------- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++++++ 3 files changed, 14 insertions(+), 8 deletions(-) commit 09da3c0e5b407eab205f6783bb17b5793da8be79 Author: Tom St Denis Date: Mon Oct 16 13:33:25 2017 -0400 drm/amd/powerplay: Tidy up cz_dpm_powerup_vce() Use PP_CAP macro. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9e599766758d3e20a5a1b91100a725abaef63be6 Author: Tom St Denis Date: Mon Oct 16 13:32:38 2017 -0400 drm/amd/powerplay: Tidy up cz_dpm_powerdown_vce() Use PP_CAP macro. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e03ff809f099d111bfab164334cb1259240ef0cd Author: Tom St Denis Date: Mon Oct 16 13:31:49 2017 -0400 drm/amd/powerplay: Tidy up cz_dpm_update_vce_dpm() Use PP_CAP and tidy up indentation. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 1f9506f50482e2784d8164f94b5266cffef61119 Author: Tom St Denis Date: Mon Oct 16 13:30:28 2017 -0400 drm/amd/powerplay: Tidy up cz_dpm_update_uvd_dpm() Use PP_CAP and tidy up indentation. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 5936470456c51a2d32d8e8ee756dc9a8c2eb1be9 Author: Tom St Denis Date: Mon Oct 16 13:28:24 2017 -0400 drm/amd/powerplay: Tidy up cz_dpm_powerup_uvd() Use PP_CAP and simplify enable/disable logic. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 610dd60bf71c441907d74cd109d6405d5a336c08 Author: Tom St Denis Date: Mon Oct 16 13:25:42 2017 -0400 drm/amd/powerplay: Tidy up cz_dpm_powerdown_uvd() Use PP_CAP and tidy up indentation. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 995e27fbee054cd9eb153ba090ff514379bf5303 Author: Tom St Denis Date: Mon Oct 16 13:23:55 2017 -0400 drm/amd/powerplay: Tidy up cz_start_dpm() Remove unused variables. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit c1b24a1405ed8720f5837fc77fbc52fd008cbb42 Author: Jérémy Lefaure Date: Sun Oct 15 22:29:23 2017 -0400 drm/amdgpu: use ARRAY_SIZE Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Reviewed-by: Christian König Reviewed-by: Thierry Reding Signed-off-by: Jérémy Lefaure Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 9 +++++---- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) commit 2642cf110d08a403f585a051e4cbf45a90b3adea Author: Christian König Date: Fri Oct 13 17:24:31 2017 +0200 drm/amdgpu: reserve root PD while releasing it Otherwise somebody could try to evict it at the same time and try to use half torn down structures. Signed-off-by: Christian König Reviewed-and-Tested-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 5c42c64f7d54ba560b0b001e4e73e4a1aeed1355 Author: Christian König Date: Thu Oct 12 19:28:42 2017 +0200 drm/ttm: fix the fix for huge compound pages We don't use compound pages at the moment. Take this into account when freeing them. Signed-off-by: Christian König Reviewed-and-Tested-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit c057c11403e461185a24d7f5dc2fbd059bbd1502 Author: Alex Deucher Date: Thu Oct 12 16:26:34 2017 -0400 drm/amdgpu: bump version for vram lost counter query (v2) v2: vram -> VRAM in comment Reviewed-by: Michel Dänzer 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 c5795c555bbaca51192ffc6164bb85845ecdf717 Author: Christian König Date: Thu Oct 12 12:16:33 2017 +0200 drm/amdgpu: minor CS optimization We only need to loop over all IBs for old UVD/VCE command stream patching. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 37 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 18 deletions(-) commit 7fd5e36caec1598c49ef97d3e53cdd89c1da2770 Author: Christian König Date: Fri Oct 13 10:58:15 2017 +0200 drm/amd/sched: fix job tear down order v2 Move the trace before we signal the scheduler fence and drop the scheduler fence reference directly before we free the job. v2: keep extra s_fence reference Signed-off-by: Christian König Reviewed-by: Liu, Monk Signed-off-by: Alex Deucher drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e1d515052f9075eb1b791b21467d79db3529db83 Author: Harish Kasiviswanathan Date: Fri Oct 6 17:36:35 2017 -0400 drm/amdgpu: Add amdgpu_find_mm_node() Replace some commonly repeated code with a function. v2: Use amdgpu_find_mm_node() in amdgpu_ttm_io_mem_pfn() Signed-off-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 49 ++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 22 deletions(-) commit 1eca5a530dc3ac0a2fadd21da1c9e6c729a4a2a1 Author: Harish Kasiviswanathan Date: Tue Oct 3 15:41:56 2017 -0400 drm/amdgpu: Refactor amdgpu_move_blit Add more generic function amdgpu_copy_ttm_mem_to_mem() that supports arbitrary copy size, offsets and two BOs (source & dest.). This is useful for KFD Cross Memory Attach feature where data needs to be copied from BOs from different processes v2: Add struct amdgpu_copy_mem and changed amdgpu_copy_ttm_mem_to_mem() function parameters to use the struct v3: Minor function name change Signed-off-by: Harish Kasiviswanathan Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 169 +++++++++++++++++++++++--------- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 12 +++ 2 files changed, 132 insertions(+), 49 deletions(-) commit 26eedf6daec4e7937c8f0f1dde5e9b8e3dcebfd3 Author: Andrey Grodzovsky Date: Wed Oct 11 17:02:02 2017 -0400 drm/amdgpu: Fix extra call to amdgpu_ctx_put. In amdgpu_cs_parser_init() in case of error handling amdgpu_ctx_put() is called without setting p->ctx to NULL after that, later amdgpu_cs_parser_fini() also calls amdgpu_ctx_put() again and mess up the reference count. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 7d0a42823ba5bdc11b4933749b147b8a6a6caae5 Author: Tom St Denis Date: Thu Oct 12 07:25:08 2017 -0400 drm/ttm: Fix unused variables with huge page support Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 1f7251b73e08395dbf03602a57ca67cf7da7f9db Author: Christian König Date: Mon Oct 9 17:53:06 2017 +0200 drm/amdgpu: add VRAM lost query Allows userspace to figure out if VRAM was lost. Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++ include/uapi/drm/amdgpu_drm.h | 1 + 2 files changed, 4 insertions(+) commit 7a0a48ddf63bc9944b9690c6fa043ea4305f7f79 Author: Christian König Date: Mon Oct 9 15:51:10 2017 +0200 drm/amdgpu: set -ECANCELED when dropping jobs And return from the wait functions the fence error code. Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 7 ++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) commit e55f2b646df3318e24f12b8388ab6e5cccb3e92d Author: Christian König Date: Mon Oct 9 15:18:43 2017 +0200 drm/amdgpu: move the VRAM lost counter per context Instead of per device track the VRAM lost per context and return ECANCELED instead of ENODEV. Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 ++---- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 9 +++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 16 ---------------- 4 files changed, 8 insertions(+), 24 deletions(-) commit 14e47f93c5cc4a1237dbacc137e174706093b69c Author: Christian König Date: Mon Oct 9 15:04:41 2017 +0200 drm/amdgpu: keep copy of VRAM lost counter in job Instead of reading the current counter from fpriv. Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 13 +++++++------ 3 files changed, 10 insertions(+), 6 deletions(-) commit 396bcb41e035df7b98fb150ca950bf213e70ae7b Author: Christian König Date: Mon Oct 9 14:45:09 2017 +0200 drm/amdgpu: partial revert VRAM lost handling v2 Keep blocking the CS, but revert everything else. Mapping BOs and info IOCTL are harmless and can still happen even when VRAM content ist lost. Signed-off-by: Christian König Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 11 ----------- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 ----- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 14 ++++++++++---- 3 files changed, 10 insertions(+), 20 deletions(-) commit 6ed4e2e673d348df6623012a628a8ab8624e3222 Author: Christian König Date: Thu Oct 5 14:27:34 2017 +0200 drm/ttm: add transparent huge page support for wc or uc allocations v2 Add a new huge page pool and try to allocate from it when it makes sense. v2: avoid compound pages for now Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 136 ++++++++++++++++++++++++++++------- 1 file changed, 109 insertions(+), 27 deletions(-) commit 8593e9b85e0aa67db62ec395774021a139efc2cd Author: Christian König Date: Thu Sep 21 11:28:25 2017 +0200 drm/ttm: move more logic into ttm_page_pool_get_pages Make it easier to add huge page pool. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 98 +++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 46 deletions(-) commit 0284f1ead87463bc17cf5e81a24fc65c052486f3 Author: Christian König Date: Wed Sep 20 15:06:12 2017 +0200 drm/ttm: add transparent huge page support for cached allocations v2 Try to allocate huge pages when it makes sense. v2: avoid compound pages for now Signed-off-by: Christian König Acked-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 50 ++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 8 deletions(-) commit f4c809914a7c3e4a59cf543da6c2a15d0f75ee38 Author: Christian König Date: Mon Oct 9 14:34:13 2017 +0200 drm/ttm: don't use compound pages for now We need to figure out first how to correctly map them into the CPU page tables. bug: https://bugs.freedesktop.org/show_bug.cgi?id=103138 Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 1 + 1 file changed, 1 insertion(+) commit 76d6172b6fab16455af4b67bb18a3f66011592f8 Author: Ken Wang Date: Fri Sep 29 15:41:43 2017 +0800 drm/amdgpu: correct reference clock value on vega10 Old value from bringup was wrong. Cc: stable@vger.kernel.org Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 2dc8f81e4f822cfe8f6475da968ab2dd5881b8d8 Author: Horace Chen Date: Mon Oct 9 16:17:16 2017 +0800 drm/amdgpu: SR-IOV data exchange between PF&VF SR-IOV need to exchange some data between PF&VF through shared VRAM PF will copy some necessary firmware and information to the shared VRAM. It also requires some information from VF. PF will send a key through mailbox2 to help guest calculate checksum so that it can verify whether the data is correct. So check the data on the specified offset of the shared VRAM, if the checksum is right, read values from it and write some VF information next to the data from PF. Signed-off-by: Horace Chen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 75 ++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 178 +++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 6 + 4 files changed, 262 insertions(+) commit 0ae94444c08a0adf2fab4aab26be0646ee445a19 Author: Andrey Grodzovsky Date: Tue Oct 10 16:50:17 2017 -0400 drm/amdgpu: Move old fence waiting before reservation lock is aquired v2 Helps avoiding deadlock during GPU reset. Added mutex to amdgpu_ctx to preserve order of fences on a ring. v2: Put waiting logic in a function in a seperate function in amdgpu_ctx.c Signed-off-by: Andrey Grodzovsky 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 | 10 ++++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 30 ++++++++++++++++++++++++------ 3 files changed, 34 insertions(+), 10 deletions(-) commit ad864d243826cedc53404a1c0db7d1e38ddceb84 Author: Andrey Grodzovsky Date: Tue Oct 10 16:50:16 2017 -0400 drm/amdgpu: Refactor amdgpu_cs_ib_vm_chunk and amdgpu_cs_ib_fill. This enables old fence waiting before reservation lock is aquired which in turn is part of a bigger solution to deadlock happening when gpu reset with VRAM recovery accures during intensive rendering. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 112 ++++++++++++++++++--------------- 1 file changed, 61 insertions(+), 51 deletions(-) commit f15507a1ac0dcdbda0c6c4fe4dc168bfe0034535 Author: Colin Ian King Date: Wed Oct 11 10:21:11 2017 +0100 drm/amdgpu: make function uvd_v6_0_enc_get_destroy_msg static The function uvd_v6_0_enc_get_destroy_msg is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'uvd_v6_0_enc_get_destroy_msg' was not declared. Should it be static? Reviewed-by: Christian König Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 37a49343b467a8a475fc86d9e9e267f6fc679ac0 Author: Rex Zhu Date: Mon Oct 9 16:33:06 2017 +0800 drm/amd/pp: remove polaris10_smc/smumgr split. move functions in polaris_smc.c to polaris10_smumgr.c and make all functions in polaris10_smumgr.c static. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- .../gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 2354 -------------------- .../gpu/drm/amd/powerplay/smumgr/polaris10_smc.h | 44 - .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 2226 +++++++++++++++++- 4 files changed, 2226 insertions(+), 2400 deletions(-) commit 4dddc212a354cc3924d60ca240cd338b0a3f6c49 Author: Rex Zhu Date: Mon Oct 9 16:20:49 2017 +0800 drm/amd/pp: remove tonga_smc/smumgr split. move functions in tonga_smc.c to tonga_smumgr.c and make all functions in tonga_smumgr.c static. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c | 3271 -------------------- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.h | 62 - .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 3117 ++++++++++++++++++- .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.h | 20 +- 5 files changed, 3128 insertions(+), 3344 deletions(-) commit 907bfec7cce0a8fa9a4cd552f97d171f23c79dac Author: Rex Zhu Date: Mon Oct 9 16:04:39 2017 +0800 drm/amd/pp: remove iceland_smc/smumgr split. move functions in iceland_smc.c to iceland_smumgr.c and make all functions in iceland_smumgr.c static. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c | 2578 -------------------- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.h | 40 - .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2489 ++++++++++++++++++- 4 files changed, 2480 insertions(+), 2629 deletions(-) commit 2e112b4ae3ba2f40ea3758eb29d9658908b0e2fe Author: Rex Zhu Date: Mon Oct 9 15:37:32 2017 +0800 drm/amd/pp: remove fiji_smc/smumgr split. make all functions in fiji_smumgr.c static and exported by pp_smumgr_func table. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c | 2496 -------------------- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.h | 53 - drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 2379 ++++++++++++++++++- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.h | 9 + 5 files changed, 2381 insertions(+), 2558 deletions(-) commit 9c4cd84f48c179272b93b12007189e6aea509555 Author: Rex Zhu Date: Mon Oct 9 15:05:21 2017 +0800 drm/amd/pp: rename ci_smc.c to ci_smumgr.c for consistency. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 2818 ---------------------- drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 2818 ++++++++++++++++++++++ 3 files changed, 2819 insertions(+), 2819 deletions(-) commit 202f5d6e1a5962e3acb21c50cd9b4e3ab5990dab Author: Rex Zhu Date: Mon Oct 9 13:50:31 2017 +0800 drm/amdgpu: refine code delete duplicated error handling in function amdgpu_ucode_init_bo, when failed, it will set load_type to AMDGPU_FW_LOAD_DIRECT. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 66f1376269705ab66b343a811594785dfd282cf4 Author: Rex Zhu Date: Mon Oct 9 13:17:26 2017 +0800 drm/amd/pp: move common function to smu7_smumgr.c fiji and polaris can share same setup_pwr_virus function. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/fiji_pwrvirus.h | 2007 -------------------- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 43 +- .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 43 +- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 46 +- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.h | 4 +- 5 files changed, 49 insertions(+), 2094 deletions(-) commit 26f527810bd41459341d694af6c97d81be767157 Author: Rex Zhu Date: Fri Sep 15 19:39:52 2017 +0800 drm/amd/pp: implement function notify_cac_buffer_info on VI Used for smu power logging. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 28 +++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 42 ++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 5 +++ drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 10 ++++++ drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c | 10 ++++++ drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c | 10 ++++++ .../gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 10 ++++++ drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c | 10 ++++++ 8 files changed, 125 insertions(+) commit 52afb85e661641f654795376ab25eb51514a2f40 Author: Rex Zhu Date: Fri Sep 15 19:39:09 2017 +0800 drm/amd/pp: implement function notify_cac_buffer_info on Vega Used for smu power logging. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit e83dcf1051ea81e93f9486a1d50c193f3f1d344c Author: Rex Zhu Date: Mon Oct 9 12:21:30 2017 +0800 drm/amd/pp: add new function point in hwmgr. used for notify SMU the allocated buffer address. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 6ba7cf0d5caeac0dec956d70ce7c14bc0316672a Author: Rex Zhu Date: Fri Sep 15 17:14:09 2017 +0800 drm/amd/pp: export new smu messages for vega10 New messages for smu power logging. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/vega10_ppsmc.h | 2 ++ 1 file changed, 2 insertions(+) commit f7c5798c6d3de6086293d0bfc6434312d06f714e Author: Satyajit Sahu Date: Fri Oct 6 06:28:16 2017 +0000 drm/amd/powerplay: get the temperature on CZ Setting the function pointer to the get the temperature on CZ. Reviewed-by: Alex Deucher Signed-off-by: Satyajit Sahu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 1 + 1 file changed, 1 insertion(+) commit b285f1db6b3d7bf1c088c3700ffc54b8e676bcea Author: Alex Deucher Date: Mon Oct 9 16:28:16 2017 -0400 drm/amdgpu: bump version for new AMDGPU_SCHED ioctl Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8bc4c256f4995d315eb9cce6e47b4885c79ff661 Author: Andres Rodriguez Date: Fri Oct 13 14:58:14 2017 -0400 drm/amdgpu: rename context priority levels Don't leak implementation details about how each priority behaves to usermode. This allows greater flexibility in the future. Squash into c2636dc53abd8269a0930bccd564f2f195dba729 Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 8 ++++---- include/uapi/drm/amdgpu_drm.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit 56628a7fc84a6e3c4c84886d70ec26da3d7f2ce4 Author: Sebastian Andrzej Siewior Date: Fri Sep 22 17:28:06 2017 +0200 rcu/segcblist: Include rcupdate.h The RT build on ARM complains about non-existing ULONG_CMP_LT. This commit therefore includes rcupdate.h into rcu_segcblist.c. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney kernel/rcu/rcu_segcblist.c | 1 + 1 file changed, 1 insertion(+) commit c0da313e090d6e7130d0c3005245176296c24e4a Author: Paul E. McKenney Date: Fri Sep 22 09:58:47 2017 -0700 rcu: Add extended-quiescent-state testing advice If you add or remove calls to rcu_idle_enter(), rcu_user_enter(), rcu_irq_exit(), rcu_irq_exit_irqson(), rcu_idle_exit(), rcu_user_exit(), rcu_irq_enter(), rcu_irq_enter_irqson(), rcu_nmi_enter(), or rcu_nmi_exit(), you should run a full set of tests on a kernel built with CONFIG_RCU_EQS_DEBUG=y. Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 02a7c234e54052101164368ff981bd72f7acdd65 Author: Paul E. McKenney Date: Tue Sep 19 15:36:42 2017 -0700 rcu: Suppress lockdep false-positive ->boost_mtx complaints RCU priority boosting uses rt_mutex_init_proxy_locked() to initialize an rt_mutex structure in locked state held by some other task. When that other task releases it, lockdep complains (quite accurately, but a bit uselessly) that the other task never acquired it. This complaint can suppress other, more helpful, lockdep complaints, and in any case it is a false positive. This commit therefore switches from rt_mutex_unlock() to rt_mutex_futex_unlock(), thereby avoiding the lockdep annotations. Of course, if lockdep ever learns about rt_mutex_init_proxy_locked(), addtional adjustments will be required. Suggested-by: Peter Zijlstra Signed-off-by: Paul E. McKenney kernel/rcu/tree_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b88697810d7c1d102a529990f9071b0f14cfe6df Author: Sebastian Andrzej Siewior Date: Wed Oct 18 08:33:44 2017 -0700 rcu: Do not include rtmutex_common.h unconditionally This commit adjusts include files and provides definitions in preparation for suppressing lockdep false-positive ->boost_mtx complaints. Without this preparation, architectures not supporting rt_mutex will get build failures. Reported-by: kbuild test robot Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney kernel/rcu/tree_plugin.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0d6942348c71cc3246d166245e811841b7388587 Author: Kees Cook Date: Mon Oct 16 16:02:25 2017 -0700 samples: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Jonathan Corbet samples/connector/cn_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7d7363e403ce959941f80684cc5f33e747afff17 Author: Randy Dunlap Date: Mon Oct 16 16:32:51 2017 -0700 documentation: kernel-api: add more info on bitmap functions There are some good comments about bitmap operations in lib/bitmap.c and include/linux/bitmap.h, so format them for document generation and pull them into core-api/kernel-api.rst. I converted the "tables" of functions from using tabs to using spaces so that they are more readable in the source file and in the generated output. Signed-off-by: Randy Dunlap Signed-off-by: Jonathan Corbet Documentation/core-api/kernel-api.rst | 12 ++++ include/linux/bitmap.h | 105 ++++++++++++++++++---------------- lib/bitmap.c | 4 +- 3 files changed, 72 insertions(+), 49 deletions(-) commit 718d50ec782caad13e0cc78fa6a76ff2226f3dd3 Author: Tom Saeger Date: Thu Oct 12 15:24:10 2017 -0500 Documentation: fix selftests related file refs Make refs to selftests files valid including: - watchdog-test.c - dnotify_test.c Signed-off-by: Tom Saeger Signed-off-by: Jonathan Corbet Documentation/filesystems/dnotify.txt | 2 +- Documentation/watchdog/hpwdt.txt | 2 +- Documentation/watchdog/pcwd-watchdog.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 4493c1f01b139192e2490457577dccff227987b7 Author: Tom Saeger Date: Thu Oct 12 15:24:05 2017 -0500 Documentation: fix ref to power basic-pm-debugging Signed-off-by: Tom Saeger Acked-by: Rafael J. Wysocki Signed-off-by: Jonathan Corbet Documentation/power/interface.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb93e01b13821852a41f01b124cc71e94f5d3811 Author: Tom Saeger Date: Thu Oct 12 15:23:59 2017 -0500 Documentation: fix ref to trace stm content Signed-off-by: Tom Saeger Signed-off-by: Jonathan Corbet Documentation/trace/intel_th.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c0c5c208bb8233d2d76327e3379375c01785c4d Author: Tom Saeger Date: Thu Oct 12 15:23:53 2017 -0500 Documentation: fix ref to coccinelle content Signed-off-by: Tom Saeger Signed-off-by: Jonathan Corbet Documentation/process/4.Coding.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d354a6f150d873440975263530a2e42121d50a51 Author: Tom Saeger Date: Thu Oct 12 15:23:48 2017 -0500 Documentation: fix ref to workqueue content Signed-off-by: Tom Saeger Signed-off-by: Jonathan Corbet .../RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f66d9066c09fd65ed6fb418a422b17dcf9bdcd94 Author: Tom Saeger Date: Thu Oct 12 15:23:42 2017 -0500 Documentation: fix ref to sphinx/kerneldoc.py Signed-off-by: Tom Saeger Signed-off-by: Jonathan Corbet Documentation/doc-guide/kernel-doc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 796cacdda786cb5466277ae51465a798f3c665b4 Author: Tom Saeger Date: Thu Oct 12 15:23:36 2017 -0500 Documentation: fix locking rt-mutex doc refs Signed-off-by: Tom Saeger Signed-off-by: Jonathan Corbet Documentation/locking/rt-mutex-design.txt | 2 +- Documentation/pi-futex.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4845688d6a86d411a7622148e4f39d29b51e92cd Author: Julia Lawall Date: Sun Oct 15 11:24:08 2017 +0200 docs: dev-tools: correct Coccinelle version number There is no Coccinelle version 1.2. 1.0.2 must be what was intended. Signed-off-by: Julia Lawall Signed-off-by: Jonathan Corbet Documentation/dev-tools/coccinelle.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 566a1847fb37f1b12d997f85623cbf8658c87394 Author: Akshu Agrawal Date: Wed Oct 18 12:14:00 2017 -0400 ASoC: AMD: Add machine driver for cz rt5650 The driver is used for AMD board using rt5650 codec. Reviewed-by: Alex Deucher Signed-off-by: Akshu Agrawal Signed-off-by: Alex Deucher Signed-off-by: Dylan Reid Signed-off-by: Mark Brown sound/soc/amd/Kconfig | 7 ++ sound/soc/amd/Makefile | 2 + sound/soc/amd/acp-rt5645.c | 199 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 208 insertions(+) commit 9c7d6fabf22b2782d4ab2c03f9e8df2beee6d063 Author: Vijendar Mukunda Date: Wed Oct 18 12:13:59 2017 -0400 ASoC: AMD: Audio buffer related changes for Stoney Stoney uses 16kb SRAM memory for playback and 16Kb for capture.Modified Max buffer size to have the correct mapping between System Memory and SRAM. Added snd_pcm_hardware structures for playback and capture for Stoney. Reviewed-by: Alex Deucher Signed-off-by: Vijendar Mukunda Signed-off-by: Alex Deucher Signed-off-by: Mark Brown sound/soc/amd/acp-pcm-dma.c | 83 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 78 insertions(+), 5 deletions(-) commit aac89748ee2746656848d30dd1855ab9804acd72 Author: Vijendar Mukunda Date: Wed Oct 18 12:13:58 2017 -0400 ASoC: AMD: DMA driver changes for Stoney Platform Added DMA driver changes for Stoney platform. Below are the key differences between Stoney and CZ In Stoney, Memory Gating is disabled.SRAM Banks won't be turned off.No Of SRAM Banks reduced to 6. DAGB Garlic Interface used and 16 bit resolution is supported. SRAM bank 1 & SRAM bank 2 will be used for playback scenario. SRAM Bank 3 & SRAM Bank 4 will be used for Capture scenario. Acked-by: Mark Brown Reviewed-by: Alex Deucher Signed-off-by: Vijendar Mukunda Signed-off-by: Alex Deucher Signed-off-by: Mark Brown sound/soc/amd/acp-pcm-dma.c | 87 +++++++++++++++++++++++++++++++++------------ sound/soc/amd/acp.h | 2 ++ 2 files changed, 67 insertions(+), 22 deletions(-) commit 607b39ef7f5be3036e4f66a932bedb334832722f Author: Vijendar Mukunda Date: Wed Oct 18 12:13:57 2017 -0400 ASoC: AMD: disabling memory gating in stoney platform For Stoney platform, Memory gating is disabled.i.e SRAM Banks won't be turned off. By Default, SRAM Bank state set to ON. Added condition checks to skip SRAM Bank state set logic for Stoney platform. Acked-by: Mark Brown Reviewed-by: Alex Deucher Signed-off-by: Vijendar Mukunda Signed-off-by: Alex Deucher Signed-off-by: Mark Brown sound/soc/amd/acp-pcm-dma.c | 79 +++++++++++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 24 deletions(-) commit c23fed1d9173bf85b0fca069c2f24771e2d4e546 Merge: 2bd6bf0 f674bd2 Author: Mark Brown Date: Thu Oct 19 19:45:49 2017 +0100 Merge branch 'linus-4.14-rc4-acp-prereq' of git://people.freedesktop.org/~agd5f/linux into asoc-amd commit f2ddaf8dfd4a5071ad09074d2f95ab85d35c8a1e Author: Vadim Lomovtsev Date: Tue Oct 17 05:47:39 2017 -0700 PCI: Apply Cavium ThunderX ACS quirk to more Root Ports Extend the Cavium ThunderX ACS quirk to cover more device IDs and restrict it to only Root Ports. Signed-off-by: Vadim Lomovtsev [bhelgaas: changelog, stable tag] Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v4.12+ drivers/pci/quirks.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit b9f19259b84dc648f207a46f3581d15eeaedf4b6 Author: Boris Brezillon Date: Thu Oct 19 14:57:48 2017 +0200 drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl This ioctl will allow us to purge inactive userspace buffers when the system is running out of contiguous memory. For now, the purge logic is rather dumb in that it does not try to release only the amount of BO needed to meet the last CMA alloc request but instead purges all objects placed in the purgeable pool as soon as we experience a CMA allocation failure. Note that the in-kernel BO cache is always purged before the purgeable cache because those objects are known to be unused while objects marked as purgeable by a userspace application/library might have to be restored when they are marked back as unpurgeable, which can be expensive. Signed-off-by: Boris Brezillon Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20171019125748.3152-1-boris.brezillon@free-electrons.com drivers/gpu/drm/vc4/vc4_bo.c | 287 ++++++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/vc4/vc4_drv.c | 10 +- drivers/gpu/drm/vc4/vc4_drv.h | 30 +++++ drivers/gpu/drm/vc4/vc4_gem.c | 156 +++++++++++++++++++++- drivers/gpu/drm/vc4/vc4_plane.c | 20 +++ include/uapi/drm/vc4_drm.h | 19 +++ 6 files changed, 507 insertions(+), 15 deletions(-) commit 5bdecb7971572a1aef828df507558e7a4dfe25ec Author: Suzuki K Poulose Date: Thu Oct 19 16:39:02 2017 +0100 arm64: Fix the feature type for ID register fields Now that the ARM ARM clearly specifies the rules for inferring the values of the ID register fields, fix the types of the feature bits we have in the kernel. As per ARM ARM DDI0487B.b, section D10.1.4 "Principles of the ID scheme for fields in ID registers" lists the registers to which the scheme applies along with the exceptions. This patch changes the relevant feature bits from FTR_EXACT to FTR_LOWER_SAFE to select the safer value. This will enable an older kernel running on a new CPU detect the safer option rather than completely disabling the feature. Cc: Catalin Marinas Cc: Dave Martin Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/kernel/cpufeature.c | 102 ++++++++++++++++++++--------------------- 1 file changed, 51 insertions(+), 51 deletions(-) commit cba5e0ca05cea3b8dd03c427117c2eccfb4bb370 Author: Ryder Lee Date: Tue Sep 26 10:02:55 2017 +0800 arm: dts: mediatek: update audio node for mt2701 and mt7623 This patch adds interrupt-names property in audio node so that binding can be agnostic of the IRQ order. Signed-off-by: Ryder Lee Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt2701.dtsi | 4 +++- arch/arm/boot/dts/mt7623.dtsi | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 4a8b03466cdadf8af4322f5d86ad64ee2fc1f7d1 Author: Weiqing Kong Date: Tue Sep 26 10:02:53 2017 +0800 arm: dts: mt2701: enable display pwm backlight This patch adds board related config for MT2701 pwm backlight. Signed-off-by: Weiqing Kong Signed-off-by: Erin Lo Signed-off-by: Ryder Lee Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt2701-evb.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 84f587ab59daab99330c4a4b3cc6e7ebd05ee095 Author: Weiqing Kong Date: Tue Sep 26 10:02:52 2017 +0800 arm: dts: mt2701: add pwm backlight device node This patch adds the device node for MT2701 pwm backlight. Signed-off-by: Weiqing Kong Signed-off-by: Erin Lo Signed-off-by: Ryder Lee Signed-off-by: Matthias Brugger arch/arm/boot/dts/mt2701.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6dc3265cfae915dfd6d2b75b879293a50640a2f5 Merge: c20f5c5 bb58b29 Author: Arnd Bergmann Date: Thu Oct 19 18:10:00 2017 +0200 Merge tag 'renesas-arm64-defconfig-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Pull "Renesas ARM64 Based SoC Defconfig Updates for v4.15" from Simon Horman: * Enable the following to allow further test coverage - r8a77970 (V3M) and r8a77995 (D3) R-Car Gen3 SoCs - R-Car Gen3 thermal driver. This is used on a range of R-Car Gen3 SoCs * tag 'renesas-arm64-defconfig-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: arm64: defconfig: enable R8A77970 SoC arm64: defconfig: enable thermal driver for Renesas R-Car Gen3 arm64: defconfig: Enable Renesas R8A77995 SoC commit c20f5c59aac63ea9ea2cfbb3b79d6cada4d9c8ef Merge: e7ffa44 70f8e9c Author: Arnd Bergmann Date: Thu Oct 19 18:09:06 2017 +0200 Merge tag 'integrator-pciv3-delete' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/soc Pull "Delete old PCIv3 driver" from Linus Walleij: This deletes the old PCIv3 driver in the Integrator machine. It has been superceded by a modernized driver in the PCI subsystem host/ directory. * tag 'integrator-pciv3-delete' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: integrator: Delete the V3 PCI driver commit e7ffa44d37cdb8b43bcb6f49eb227bb340dda22d Merge: 84dbf97 c149635 Author: Arnd Bergmann Date: Thu Oct 19 18:07:09 2017 +0200 Merge tag 'arm-soc/for-4.15/soc' of http://github.com/Broadcom/stblinux into next/soc Pull "Broadcom soc changes for 4.15 (part 1)" from Florian Fainelli: This pull request contains Broadcom ARM-based SoC/Kconfig changes for 4.15 please pull the following: - Danilo removes the clock provider driver stubs which are no longer needed now that we have a proper CPRMAN clock provider driver - Stefan moves the SMP startup code for BCM2836 from the interrupt controller driver down to where it belongs in the architecture code, this was requested by Marc Zyngier before comitting any fixes to that code - Phil provides a fix for a future Raspberry Pi firmware which will make the secondary cores wait for an event and therefore requires the CPU onlining other cores to send such event (along with the appropriate barrier) - Florian fixes the BRCMSTB UART debug stub to work correctly when using an ARM BE8 kernel since there were some missing register read swapping needed * tag 'arm-soc/for-4.15/soc' of http://github.com/Broadcom/stblinux: ARM: brcmstb: Add appropriate ARM_BE8() macros for swapping ARM: bcm2836: Send event when onlining other cores irqchip: bcm2836: Move SMP startup code to arch/arm (v2) clk: bcm2835: remove remains from stub clk driver commit 07141342149a62db780c02f6352a0610a535eee1 Author: Shaokun Zhang Date: Thu Oct 19 19:05:21 2017 +0800 arm64: MAINTAINERS: hisi: Add HiSilicon SoC PMU support Add support HiSilicon SoC uncore PMU driver. Acked-by: Mark Rutland Signed-off-by: Shaokun Zhang Signed-off-by: Will Deacon MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 904dcf03f086a2e3b9d1e02cb57c43ea2e588c8c Author: Shaokun Zhang Date: Thu Oct 19 19:05:20 2017 +0800 perf: hisi: Add support for HiSilicon SoC DDRC PMU driver This patch adds support for DDRC PMU driver in HiSilicon SoC chip, Each DDRC has own control, counter and interrupt registers and is an separate PMU. For each DDRC PMU, it has 8-fixed-purpose counters which have been mapped to 8-events by hardware, it assumes that counter index is equal to event code (0 - 7) in DDRC PMU driver. Interrupt is supported to handle counter (32-bits) overflow. Acked-by: Mark Rutland Reviewed-by: Jonathan Cameron Signed-off-by: Shaokun Zhang Signed-off-by: Anurup M Signed-off-by: Will Deacon drivers/perf/hisilicon/Makefile | 2 +- drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 463 ++++++++++++++++++++++++++ include/linux/cpuhotplug.h | 1 + 3 files changed, 465 insertions(+), 1 deletion(-) commit 2bab3cf9104c5ab80a1b9c706d81d997548401e4 Author: Shaokun Zhang Date: Thu Oct 19 19:05:19 2017 +0800 perf: hisi: Add support for HiSilicon SoC HHA PMU driver L3 cache coherence is maintained by Hydra Home Agent (HHA) in HiSilicon SoC. This patch adds support for HHA PMU driver, Each HHA has own control, counter and interrupt registers and is an separate PMU. For each HHA PMU, it has 16-programable counters and each counter is free-running. Interrupt is supported to handle counter (48-bits) overflow. Acked-by: Mark Rutland Reviewed-by: Jonathan Cameron Signed-off-by: Shaokun Zhang Signed-off-by: Anurup M Signed-off-by: Will Deacon drivers/perf/hisilicon/Makefile | 2 +- drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 473 +++++++++++++++++++++++++++ include/linux/cpuhotplug.h | 1 + 3 files changed, 475 insertions(+), 1 deletion(-) commit 2940bc4333707a05e69b3ffd737bda0dc0c3004f Author: Shaokun Zhang Date: Thu Oct 19 19:05:18 2017 +0800 perf: hisi: Add support for HiSilicon SoC L3C PMU driver This patch adds support for L3C PMU driver in HiSilicon SoC chip, Each L3C has own control, counter and interrupt registers and is an separate PMU. For each L3C PMU, it has 8-programable counters and each counter is free-running. Interrupt is supported to handle counter (48-bits) overflow. Acked-by: Mark Rutland Reviewed-by: Jonathan Cameron Signed-off-by: Shaokun Zhang Signed-off-by: Anurup M Signed-off-by: Will Deacon drivers/perf/hisilicon/Makefile | 2 +- drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 463 +++++++++++++++++++++++++++ include/linux/cpuhotplug.h | 1 + 3 files changed, 465 insertions(+), 1 deletion(-) commit 6ce4ef94195da926245b58311119ed9d52428fdc Author: Shaokun Zhang Date: Thu Oct 19 19:05:17 2017 +0800 perf: hisi: Add support for HiSilicon SoC uncore PMU driver This patch adds support HiSilicon SoC uncore PMU driver framework and interfaces. Acked-by: Mark Rutland Reviewed-by: Jonathan Cameron Signed-off-by: Shaokun Zhang Signed-off-by: Anurup M [will: Fix leader accounting in uncore group validation] Signed-off-by: Will Deacon drivers/perf/Kconfig | 7 + drivers/perf/Makefile | 1 + drivers/perf/hisilicon/Makefile | 1 + drivers/perf/hisilicon/hisi_uncore_pmu.c | 447 +++++++++++++++++++++++++++++++ drivers/perf/hisilicon/hisi_uncore_pmu.h | 102 +++++++ 5 files changed, 558 insertions(+) commit 3125b5b2a3b4400a2925b27ce1cede23f26b98dc Author: Shaokun Zhang Date: Thu Oct 19 19:05:16 2017 +0800 Documentation: perf: hisi: Documentation for HiSilicon SoC PMU driver This patch adds documentation for the uncore PMUs on HiSilicon SoC. Acked-by: Mark Rutland Reviewed-by: Jonathan Cameron Signed-off-by: Shaokun Zhang Signed-off-by: Anurup M Signed-off-by: Will Deacon Documentation/perf/hisi-pmu.txt | 53 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit 84dbf97808955ea12286c9f442902360e0e1cc96 Merge: e7b14cc 3fd45a1 Author: Arnd Bergmann Date: Thu Oct 19 17:59:50 2017 +0200 Merge tag 'renesas-soc-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Pull "Renesas ARM Based SoC Updates for v4.15" from Simon Horman: * Prepare to enable SMP on R-Car E2 (r8a7794). Geert Uytterhoeven says: "The main hurdle here is that R-Car Gen2 boot loaders do not initialize the arch_timer CNTVOFF register, which thus needs workarounds on Linux. - The first patch adds a definition for MON_MODE, as suggested by Marc Zyngier, - The second patch makes sure CNTVOFF is initialized for boot and secondary Cortex-A15 and Cortex-A7 CPU cores, like is already done for the boot Cortex-A7 CPU core. Without this, the ARM arch timer does not work on secondary CPU cores." A follow-up patch to enable SMP in DT on R-Car E2 (r8a7794) is currently deferred unto v4.16 as it depends on the above. * Enable low-level debugging support for RZ/G1E (r8a7745). Fabrizio Castro says, "RZ/G1E uses SCIF4 for the debug console." * tag 'renesas-soc-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: rcar-gen2: Make sure CNTVOFF is initialized on CA7/15 ARM: Add definition for monitor mode ARM: debug-ll: Add support for r8a7745 commit e7b14ccd55fad40855f1a1ccea8cde82ee4a0786 Merge: e6fb383 545dc83 Author: Arnd Bergmann Date: Thu Oct 19 17:57:11 2017 +0200 Merge tag 'renesas-defconfig-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Pull "Renesas ARM Based SoC Defconfig Updates for v4.15" from Simon Horman: Enable BQ32000 RTC driver in multi_v7_defconfig. Biju Das says, "The iWave RZ/G1M Q7 SOM supports RTC (TI BQ32000). To increase hardware support enable the driver in the multi_v7_defconfig multiplatform configuration." * tag 'renesas-defconfig-for-v4.15' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: multi_v7_defconfig: Enable BQ32000 RTC driver commit e6fb383f5ad70f6b7a20c02e0e0a9054db11feaa Merge: 8a5776a 7aef828 Author: Arnd Bergmann Date: Thu Oct 19 17:53:13 2017 +0200 Merge tag 'ep93xx-for-arm-soc-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/soc Pull "EP93xx improvements for v4.15" EP93xx patches that have been floating for a while, converting the platform to sparsemem, using SPI-MMC and a bit more. * tag 'ep93xx-for-arm-soc-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: ep93xx: Add lm70 HWMON sensor to TS-72xx boards ARM: ep93xx: tidy up TS-72xx Watchdog resources ARM: ep93xx: simone: let the mmc_spi driver handle the card detect ARM: ep93xx: switch to SPARSEMEM commit 3037a52f9846b9d6e233274453f2d4117a14f31b Author: Martin Schwidefsky Date: Thu Oct 12 13:24:48 2017 +0200 s390/nmi: do register validation as early as possible The validation of the CPU registers in the machine check handler is currently split into two parts. The first part is done at the start of the low level mcck_int_handler function, this includes the CPU timer register and the general purpose registers. The second part is done a bit later in s390_do_machine_check for all the other registers, including the control registers, floating pointer control, vector or floating pointer registers, the access registers, the guarded storage registers, the TOD programmable registers and the clock comparator. This is working fine to far but in theory a future extensions could cause the C code to use registers that are not validated yet. A better approach is to validate all CPU registers in "safe" assembler code before any C function is called. Reviewed-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ctl_reg.h | 2 + arch/s390/include/asm/nmi.h | 3 ++ arch/s390/kernel/asm-offsets.c | 5 ++ arch/s390/kernel/entry.S | 60 +++++++++++++++++++--- arch/s390/kernel/nmi.c | 110 ++++++++-------------------------------- 5 files changed, 85 insertions(+), 95 deletions(-) commit 6c81511ca1f52a0bbe921b2b98e34319a4ca59ed Author: Martin Schwidefsky Date: Thu Oct 12 13:24:47 2017 +0200 s390/nmi: allocation of the extended save area The machine check extended save area is needed to store the vector registers and the guarded storage control block when a CPU is interrupted by a machine check. Move the slab cache allocation of the full save area to nmi.c, for early boot use a static __initdata block. Reviewed-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/nmi.h | 10 ++++-- arch/s390/kernel/nmi.c | 82 +++++++++++++++++++++++++++++++++++++++++++++ arch/s390/kernel/setup.c | 11 ++---- arch/s390/kernel/smp.c | 43 ++++-------------------- 4 files changed, 99 insertions(+), 47 deletions(-) commit cc65450c8337848f97e893c5c3de973ece73aabf Author: Martin Schwidefsky Date: Thu Oct 12 13:24:46 2017 +0200 s390/ctl_reg: move control register definitions to ctl_reg.h The nmi.h header has some constant defines for control register bits. These definitions should really be located in ctl_reg.h. Move and rename the defines. Reviewed-by: Heiko Carstens Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ctl_reg.h | 11 +++++++++++ arch/s390/include/asm/nmi.h | 6 ------ arch/s390/kvm/interrupt.c | 6 +++--- 3 files changed, 14 insertions(+), 9 deletions(-) commit ad3bc0ac1d2ed311ef3a9d6f2849948433a9f338 Author: Martin Schwidefsky Date: Thu Oct 12 13:24:45 2017 +0200 s390/ctl_reg: use decoding unions in update_cr_regs Add a decoding union for the bits in control registers 2 and use 'union ctlreg0' and 'union ctlreg2' in update_cr_regs to improve readability. Reviewed-by: Heiko Carstens Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ctl_reg.h | 19 ++++++++++++++++++- arch/s390/kernel/machine_kexec.c | 11 ++++++----- arch/s390/kernel/nmi.c | 4 +++- arch/s390/kernel/ptrace.c | 30 +++++++++++++++--------------- 4 files changed, 42 insertions(+), 22 deletions(-) commit 00a8f886dbdaeea1d93543d5311ddf3a2680bf2b Author: Martin Schwidefsky Date: Fri Sep 15 16:24:31 2017 +0200 s390/nmi: use smp_emergency_stop instead of smp_send_stop The smp_send_stop() function can be called from s390_handle_damage while DAT is off. This happens if a machine check indicates that kernel gprs or control registers can not be restored. The function smp_send_stop reenables DAT via __load_psw_mask. That should work for the case of lost kernel gprs and the system will do the expected stop of all CPUs. But if control registers are lost, in particular CR13 with the home space ASCE, interesting secondary crashes may occur. Make smp_emergency_stop callable from nmi.c and remove the cpumask argument. Replace the smp_send_stop call with smp_emergency_stop in the s390_handle_damage function. In addition add notrace and NOKPROBE_SYMBOL annotations for all functions required for the emergency shutdown. Reviewed-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/smp.h | 5 +++++ arch/s390/kernel/nmi.c | 9 +++++++-- arch/s390/kernel/smp.c | 30 +++++++++++++++++------------- 3 files changed, 29 insertions(+), 15 deletions(-) commit d83b26e0f2b013d29cc1431e35eb10c85e76784a Author: Bhumika Goyal Date: Tue Oct 3 01:42:08 2017 +0530 clk: tegra: Make tegra_clk_pll_params __ro_after_init These structures are only passed to the functions tegra_clk_register_pll, tegra_clk_register_pll{e/u} or tegra_periph_clk_init during the init phase. These functions modify the structures only during the init phase and after that the structures are never modified. Therefore, make them __ro_after_init. Signed-off-by: Bhumika Goyal Acked-By: Peter De Schrijver Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra30.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit bc2e4d2986e9d2b8a99c16eb8222da2a360a581f Author: Thierry Reding Date: Wed Aug 30 12:21:04 2017 +0200 clk: tegra: Fix sor1_out clock implementation This clock was previously called sor1_src and was modelled as an input to the sor1 module clock. However, it's really an output clock that can be fed either from the safe, the sor1_pad_clkout or the sor1 module clocks. sor1 itself can take input from either of the display PLLs. The same implementation for the sor1_out clock is used on Tegra186, so this nicely lines up both SoC generations to deal with this clock in a uniform way. Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra-periph.c | 16 ------------ drivers/clk/tegra/clk-tegra210.c | 47 ++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 16 deletions(-) commit 1d7e2c8e5431454f65f0b785f3aa8bdba2ff436d Author: Thierry Reding Date: Wed Aug 30 12:19:08 2017 +0200 clk: tegra: Use tegra_clk_register_periph_data() Instead of open-coding the same pattern repeatedly, reuse the newly introduced tegra_clk_register_periph_data() helper that will unpack the initialization structure. Signed-off-by: Thierry Reding drivers/clk/tegra/clk-tegra-periph.c | 5 +---- drivers/clk/tegra/clk-tegra114.c | 4 +--- drivers/clk/tegra/clk-tegra20.c | 4 +--- drivers/clk/tegra/clk-tegra30.c | 4 +--- 4 files changed, 4 insertions(+), 13 deletions(-) commit 8be95190dac73a8b6bfc51a7c3ad6ec3d0a4d5f7 Author: Thierry Reding Date: Wed Aug 30 12:11:53 2017 +0200 clk: tegra: Add peripheral clock registration helper There is a common pattern that registers individual peripheral clocks from an initialization table. Add a common implementation to remove the duplication from various call sites. Signed-off-by: Thierry Reding drivers/clk/tegra/clk-periph.c | 8 ++++++++ drivers/clk/tegra/clk.h | 3 +++ 2 files changed, 11 insertions(+) commit 231ca2e583be324012212d10ad913f30c2f66adb Author: Timo Alho Date: Thu Sep 7 12:31:02 2017 +0300 clk: tegra: Check BPMP response return code Check return code in BPMP response message(s). The typical error case is when a clock operation is attempted with an invalid clock identifier. Also remove error print from call to clk_get_info() as the implementation loops through the range of all possible identifiers, yet the operation is expected to error out when the clock ID is unused. Signed-off-by: Timo Alho Acked-by: Jon Hunter Signed-off-by: Thierry Reding drivers/clk/tegra/clk-bpmp.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 8f43ff6b2ebc27cbd6c2cd00178195b1bf39a5fc Merge: 84c4580 370d010 Author: Thierry Reding Date: Thu Oct 19 16:38:21 2017 +0200 Merge branch 'for-4.15/firmware' into for-4.15/clk commit c9eb6172c328dde7e14812f94f8da87b691e41b5 Author: Christoph Hellwig Date: Sun Aug 27 10:37:15 2017 +0200 dma-mapping: turn dma_cache_sync into a dma_map_ops method After we removed all the dead wood it turns out only two architectures actually implement dma_cache_sync as a real op: mips and parisc. Add a cache_sync method to struct dma_map_ops and implement it for the mips defualt DMA ops, and the parisc pa11 ops. Note that arm, arc and openrisc support DMA_ATTR_NON_CONSISTENT, but never provided a functional dma_cache_sync implementations, which seems somewhat odd. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy arch/alpha/include/asm/dma-mapping.h | 2 -- arch/cris/include/asm/dma-mapping.h | 6 ------ arch/frv/include/asm/dma-mapping.h | 6 ------ arch/hexagon/include/asm/dma-mapping.h | 3 --- arch/ia64/include/asm/dma-mapping.h | 6 ------ arch/m32r/include/asm/dma-mapping.h | 5 ----- arch/m68k/include/asm/dma-mapping.h | 6 ------ arch/metag/include/asm/dma-mapping.h | 10 ---------- arch/microblaze/include/asm/dma-mapping.h | 5 ----- arch/mips/include/asm/dma-mapping.h | 3 --- arch/mips/mm/dma-default.c | 7 +++---- arch/mn10300/include/asm/dma-mapping.h | 6 ------ arch/nios2/include/asm/dma-mapping.h | 9 --------- arch/parisc/include/asm/dma-mapping.h | 8 -------- arch/parisc/kernel/pci-dma.c | 8 ++++++++ arch/powerpc/include/asm/dma-mapping.h | 5 ----- arch/s390/include/asm/dma-mapping.h | 5 ----- arch/sh/include/asm/dma-mapping.h | 6 ------ arch/sparc/include/asm/dma-mapping.h | 8 -------- arch/tile/include/asm/dma-mapping.h | 9 --------- arch/unicore32/include/asm/dma-mapping.h | 5 ----- arch/x86/include/asm/dma-mapping.h | 6 ------ arch/xtensa/include/asm/dma-mapping.h | 5 ----- include/linux/dma-mapping.h | 13 +++++++++++++ 24 files changed, 24 insertions(+), 128 deletions(-) commit e0c6584df9c414b50de17e1abc1099f7501bbb60 Author: Christoph Hellwig Date: Sun Aug 27 10:35:40 2017 +0200 sh: make dma_cache_sync a no-op sh does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. On the other hand sh uses dma_cache_sync internally in the dma_ops implementation and for the maple bus that does not use the DMA API, so a the old functionality for dma_cache_sync is still provided under the name sh_sync_dma_for_device, and without the redundant dev argument. While at it two of the syncing dma_ops also go the proper _for_device postfix. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy arch/sh/include/asm/dma-mapping.h | 9 +++++++-- arch/sh/kernel/dma-nommu.c | 17 +++++++++-------- arch/sh/mm/consistent.c | 6 +++--- drivers/sh/maple/maple.c | 5 ++--- 4 files changed, 21 insertions(+), 16 deletions(-) commit d708e71ed78f56330325e8de304e2fb1e38ccf1c Author: Christoph Hellwig Date: Sun Aug 27 10:27:49 2017 +0200 xtensa: make dma_cache_sync a no-op xtensa does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy arch/xtensa/include/asm/dma-mapping.h | 6 ++++-- arch/xtensa/kernel/pci-dma.c | 23 ----------------------- 2 files changed, 4 insertions(+), 25 deletions(-) commit 84c45808d9fe73a886208131150bdaa3eb77fd2b Merge: 2bd6bf0 4d1dc40 Author: Thierry Reding Date: Thu Oct 19 16:37:38 2017 +0200 Merge branch 'for-4.15/dt-bindings' into for-4.15/clk commit a535bb801036268c3d057d7584e9c8f35f69aad4 Author: Christoph Hellwig Date: Sun Aug 27 10:22:48 2017 +0200 unicore32: make dma_cache_sync a no-op unicore32 does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy arch/unicore32/include/asm/cacheflush.h | 9 --------- arch/unicore32/include/asm/dma-mapping.h | 17 ----------------- arch/unicore32/mm/proc-syms.c | 3 --- 3 files changed, 29 deletions(-) commit 87f626348a7a4f9d21c321b6326492de9aef245f Author: Christoph Hellwig Date: Sun Aug 27 10:17:48 2017 +0200 powerpc: make dma_cache_sync a no-op powerpc does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy arch/powerpc/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) commit 622bd022078263fdebb566c32804551812576432 Author: Christoph Hellwig Date: Sun Aug 27 10:16:02 2017 +0200 mn10300: make dma_cache_sync a no-op mn10300 does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy arch/mn10300/include/asm/dma-mapping.h | 4 ---- 1 file changed, 4 deletions(-) commit 64dc8700c01d94c46fd26b38b7e7d2891934a33b Author: Christoph Hellwig Date: Sun Aug 27 10:12:57 2017 +0200 microblaze: make dma_cache_sync a no-op microblaze does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. This also allows moving __dma_sync out of the microblaze asm/dma-mapping.h and thus greatly reduce the amount of includes there. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy arch/microblaze/include/asm/dma-mapping.h | 34 ------------------------------- arch/microblaze/kernel/dma.c | 17 ++++++++++++++++ 2 files changed, 17 insertions(+), 34 deletions(-) commit 562437a81aa48e54231896ad36d46439278df4b3 Author: Christoph Hellwig Date: Sun Aug 27 10:07:04 2017 +0200 ia64: make dma_cache_sync a no-op ia64 does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy arch/ia64/include/asm/dma-mapping.h | 5 ----- 1 file changed, 5 deletions(-) commit 9d254b8e409e90db21384974f4725bff369c333f Author: Christoph Hellwig Date: Sun Aug 27 09:59:32 2017 +0200 frv: make dma_cache_sync a no-op frv does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy arch/frv/include/asm/dma-mapping.h | 1 - 1 file changed, 1 deletion(-) commit 95e499fc7fe9c58efedc079634582164de6bbd90 Author: Christoph Hellwig Date: Sun Aug 27 10:06:22 2017 +0200 x86: make dma_cache_sync a no-op x86 does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner Reviewed-by: Robin Murphy arch/x86/include/asm/dma-mapping.h | 1 - 1 file changed, 1 deletion(-) commit acfef4f126a716018127dcf147be0cc16c304e72 Author: Christoph Hellwig Date: Thu Jul 13 16:12:05 2017 +0200 floppy: consolidate the dummy fd_cacheflush definition Only mips defines this helper, so remove all the other arch definitions. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy arch/alpha/include/asm/floppy.h | 2 -- arch/powerpc/include/asm/floppy.h | 2 -- arch/sparc/include/asm/floppy_32.h | 1 - arch/sparc/include/asm/floppy_64.h | 1 - drivers/block/floppy.c | 4 ++++ 5 files changed, 4 insertions(+), 6 deletions(-) commit 15274c232131569b9010634a3f4f129c80c027a3 Author: Mikko Perttunen Date: Mon Jul 24 19:29:14 2017 +0300 arm64: tegra: Add BPMP thermal sensor to Tegra186 This adds the thermal sensor device provided by the BPMP, and the relevant thermal sensors to the Tegra186 device tree. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 103 +++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) commit 89b469cc1d668e1e4c86796bc0ae8cd92366736f Author: Manikanta Maddireddy Date: Wed Sep 27 17:28:37 2017 +0530 arm64: tegra: Enable PCIe on Jetson TX2 Enable x4 PCIe slot on Jetson TX2. Signed-off-by: Manikanta Maddireddy Reviewed-by: Mikko Perttunen Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit f8973cf43cf02ddb6daca5dd353e0a264bec3b56 Author: Manikanta Maddireddy Date: Wed Sep 27 17:28:36 2017 +0530 arm64: tegra: Add PCIe node for Tegra186 Tegra186 has three PCIe controllers, which can be operated in 401, 211 or 111 lane combinations. Add DT support for PCIe controllers. Signed-off-by: Manikanta Maddireddy Reviewed-by: Mikko Perttunen Tested-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 80 ++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit effc4b44e007470b9b7a3027d823d6254dfc8ddf Author: Mikko Perttunen Date: Tue Sep 5 11:43:03 2017 +0300 arm64: tegra: Add VIC on Tegra186 Add a node for the Video Image Compositor on the Tegra186. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5524c61fba3d55545528abf9c52cf67cc2b45565 Author: Mikko Perttunen Date: Tue Sep 5 11:43:02 2017 +0300 arm64: tegra: Add host1x on Tegra186 Add the node for Host1x on the Tegra186, without any subdevices for now. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit dcbc5e448bb40f5ddb050b3eeb965c886eed6cd8 Author: Mikko Perttunen Date: Tue Sep 5 11:43:01 2017 +0300 arm64: tegra: Add #power-domain-cells for BPMP Add #power-domain-cells for the BPMP node on Tegra186 so that the power domain provider may be used. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding arch/arm64/boot/dts/nvidia/tegra186.dtsi | 1 + 1 file changed, 1 insertion(+) commit 388c422ed581ed4a460cd9d0e29d084ee2d80d08 Merge: 2bd6bf0 3e09b15 Author: Thierry Reding Date: Thu Oct 19 16:35:35 2017 +0200 Merge branch 'for-4.15/dt-bindings' into for-4.15/arm64/dt commit d89e2378a97fafdc74cbf997e7c88af75b81610a Author: Robin Murphy Date: Thu Oct 12 16:56:14 2017 +0100 drivers: flag buses which demand DMA configuration We do not want the common dma_configure() pathway to apply indiscriminately to all devices, since there are plenty of buses which do not have DMA capability, and if their child devices were used for DMA API calls it would only be indicative of a driver bug. However, there are a number of buses for which DMA is implicitly expected even when not described by firmware - those we whitelist with an automatic opt-in to dma_configure(), assuming that the DMA address space and the physical address space are equivalent if not otherwise specified. Commit 723288836628 ("of: restrict DMA configuration") introduced a short-term fix by comparing explicit bus types, but this approach is far from pretty, doesn't scale well, and fails to cope at all with bus drivers which may be built as modules, like host1x. Let's refine things by making that opt-in a property of the bus type, which neatly addresses those problems and lets the decision of whether firmware description of DMA capability should be optional or mandatory stay internal to the bus drivers themselves. Signed-off-by: Robin Murphy Acked-by: Rob Herring Acked-by: Greg Kroah-Hartman Acked-by: Thierry Reding Signed-off-by: Christoph Hellwig drivers/amba/bus.c | 1 + drivers/base/platform.c | 1 + drivers/gpu/host1x/bus.c | 1 + drivers/of/device.c | 8 +------- drivers/pci/pci-driver.c | 1 + include/linux/device.h | 4 ++++ 6 files changed, 9 insertions(+), 7 deletions(-) commit 775dba87f891e99c2f46df17edd5f5359d0883ad Author: Timo Alho Date: Thu Sep 7 12:31:04 2017 +0300 soc/tegra: bpmp: Check BPMP response return code Add checks for the return code in BPMP response messages. Signed-off-by: Timo Alho Acked-by: Jon Hunter Signed-off-by: Thierry Reding drivers/soc/tegra/powergate-bpmp.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit d5d91f30860f9c1139c41a652461e9d54614670d Merge: 2bd6bf0 370d010 Author: Thierry Reding Date: Thu Oct 19 16:33:27 2017 +0200 Merge branch 'for-4.15/firmware' into for-4.15/soc commit 7afebede62bed77ebae34fc64406984949d2a127 Author: Mikko Perttunen Date: Mon Jul 24 19:29:18 2017 +0300 thermal: Add Tegra BPMP thermal sensor driver On Tegra186, the BPMP (Boot and Power Management Processor) exposes an interface to thermal sensors on the system-on-chip. This driver implements access to the interface. It supports reading the temperature, setting trip points and receiving notification of a tripped trip point. Signed-off-by: Mikko Perttunen Acked-by: Zhang Rui Signed-off-by: Thierry Reding drivers/thermal/Makefile | 2 +- drivers/thermal/tegra/Kconfig | 7 + drivers/thermal/tegra/Makefile | 3 +- drivers/thermal/tegra/tegra-bpmp-thermal.c | 263 +++++++++++++++++++++++++++++ 4 files changed, 273 insertions(+), 2 deletions(-) commit ac8a1eb05f62d89ed4aa30628f12e8e69b2865cc Merge: 5f5f4e1 80d47a9 Author: Thierry Reding Date: Thu Oct 19 16:31:13 2017 +0200 Merge branch 'for-4.15/firmware' into for-4.15/thermal commit 5f5f4e1bf94101dc66e4c598b939877956e2181e Merge: 2bd6bf0 3e09b15 Author: Thierry Reding Date: Thu Oct 19 16:30:59 2017 +0200 Merge branch 'for-4.15/dt-bindings' into for-4.15/thermal commit 3a29ddb1c5986a6d3f941bfb1f434105203ce7f6 Author: James Hogan Date: Thu Oct 19 15:17:23 2017 +0100 clockevents: Retry programming min delta up to 10 times When CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=n, the call path hrtimer_reprogram -> clockevents_program_event -> clockevents_program_min_delta will not retry if the clock event driver returns -ETIME. If the driver could not satisfy the program_min_delta for any reason, the lack of a retry means the CPU may not receive a tick interrupt, potentially until the counter does a full period. This leads to rcu_sched timeout messages as the stalled CPU is detected by other CPUs, and other issues if the CPU is holding locks or other resources at the point at which it stalls. There have been a couple of observed mechanisms through which a clock event driver could not satisfy the requested min_delta and return -ETIME. With the MIPS GIC driver, the shared execution resource within MT cores means inconventient latency due to execution of instructions from other hardware threads in the core, within gic_next_event, can result in an event being set in the past. Additionally under virtualisation it is possible to get unexpected latency during a clockevent device's set_next_event() callback which can make it return -ETIME even for a delta based on min_delta_ns. It isn't appropriate to use MIN_ADJUST in the virtualisation case as occasional hypervisor induced high latency will cause min_delta_ns to quickly increase to the maximum. Instead, borrow the retry pattern from the MIN_ADJUST case, but without making adjustments. Retry up to 10 times, each time increasing the attempted delta by min_delta, before giving up. [ Matt: Reworked the loop and made retry increase the delta. ] Signed-off-by: James Hogan Signed-off-by: Matt Redfearn Signed-off-by: Thomas Gleixner Cc: linux-mips@linux-mips.org Cc: Daniel Lezcano Cc: "Martin Schwidefsky" Cc: James Hogan Link: https://lkml.kernel.org/r/1508422643-6075-1-git-send-email-matt.redfearn@mips.com kernel/time/clockevents.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit f2381f652266fabfb7a8f5c4b2a05de36cad3a73 Author: Timo Alho Date: Tue Oct 3 09:12:13 2017 +0300 firmware: tegra: Add BPMP debugfs support Tegra power management firmware running on the co-processor (BPMP) implements a simple pseudo file system akin to debugfs. The file system can be used for debugging purposes to examine and change the status of selected resources controlled by the firmware (such as clocks, resets, voltages, powergates, ...). Add support to "mirror" the firmware's file system to debugfs. At boot, query firmware for a list of all possible files and create corresponding debugfs entries. Read/write of individual files is implemented by sending a Message ReQuest (MRQ) that passes the full file path name and data to firmware via DRAM. Signed-off-by: Timo Alho Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding drivers/firmware/tegra/Makefile | 4 +- drivers/firmware/tegra/bpmp-debugfs.c | 444 ++++++++++++++++++++++++++++++++++ drivers/firmware/tegra/bpmp.c | 4 + include/soc/tegra/bpmp.h | 14 ++ 4 files changed, 465 insertions(+), 1 deletion(-) commit 80d47a91e5db96e5db391aaad414fb6ceb40e7c0 Author: Mikko Perttunen Date: Mon Jul 24 19:29:17 2017 +0300 firmware: tegra: Add stubs when BPMP not enabled Add static inline stubs to bpmp.h when CONFIG_BPMP is not enabled. This allows building BPMP-related drivers with COMPILE_TEST. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding include/soc/tegra/bpmp.h | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) commit 2e1e09ed423781d209c1fea773b1c3e614550ea5 Author: Mikko Perttunen Date: Mon Jul 24 19:29:16 2017 +0300 firmware: tegra: Expose tegra_bpmp_mrq_return() Expose and export the tegra_bpmp_mrq_return() function for use by drivers outside the core BPMP driver. This function is used to reply to messages originating from the BPMP, which is required in the thermal driver. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding drivers/firmware/tegra/bpmp.c | 5 +++-- include/soc/tegra/bpmp.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) commit 3e09b155d58e44e33a699650128f8c6c833cb320 Author: Mikko Perttunen Date: Mon Jul 24 19:29:15 2017 +0300 dt-bindings: Add bindings for nvidia,tegra186-bpmp-thermal In Tegra186, the BPMP (Boot and Power Management Processor) implements an interface that is used to read system temperatures, including CPU cluster and GPU temperatures. This binding describes the thermal sensor that is exposed by BPMP. Signed-off-by: Mikko Perttunen Acked-by: Rob Herring Signed-off-by: Thierry Reding .../thermal/nvidia,tegra186-bpmp-thermal.txt | 32 ++++++++++++++++++++++ .../dt-bindings/thermal/tegra186-bpmp-thermal.h | 14 ++++++++++ 2 files changed, 46 insertions(+) commit 642e641cbea57e559720b9df09889ffcf525cf04 Author: Bhumika Goyal Date: Tue Sep 19 16:40:43 2017 +0530 x86/events/amd/iommu: Make iommu_pmu const and __initconst iommu_pmu is only used as source for a copy operation in the init code path. Mark it const and __initconst. Signed-off-by: Bhumika Goyal Signed-off-by: Thomas Gleixner Cc: julia.lawall@lip6.fr Link: https://lkml.kernel.org/r/1505819443-670-1-git-send-email-bhumirks@gmail.com arch/x86/events/amd/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0cfe5b5fc0277463fa795dea312a3a2fd5e8bac2 Author: Jérémy Lefaure Date: Sun Oct 1 15:30:50 2017 -0400 x86: Use ARRAY_SIZE Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure Signed-off-by: Thomas Gleixner Cc: linux-video@atrey.karlin.mff.cuni.cz Cc: Martin Mares Cc: Andy Lutomirski Link: https://lkml.kernel.org/r/20171001193101.8898-13-jeremy.lefaure@lse.epita.fr arch/x86/boot/video-vga.c | 6 +++--- arch/x86/entry/vdso/vdso2c.c | 3 ++- arch/x86/platform/intel-mid/device_libs/platform_gpio_keys.c | 5 ++--- 3 files changed, 7 insertions(+), 7 deletions(-) commit 6ace4f6bbcfde70278a33c11443ecda3ed0ec1b6 Author: Bhumika Goyal Date: Mon Oct 16 17:18:51 2017 +0200 RDMA/cma: make config_item_type const Make these structures const as they are either passed to the functions having the argument as const or stored as a reference in the "ci_type" const field of a config_item structure. Signed-off-by: Bhumika Goyal Acked-by: Doug Ledford Reviewed-by: Leon Romanovsky Signed-off-by: Christoph Hellwig drivers/infiniband/core/cma_configfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 085006e834cb293e28a988ea9f6edfa796b177fb Author: Bhumika Goyal Date: Mon Oct 16 17:18:50 2017 +0200 stm class: make config_item_type const Make config_item_type structures const as they are either passed to a function having the argument as const or used inside a if statement or stored in the const "ci_type" field of a config_item structure. Done using Coccinelle. Signed-off-by: Bhumika Goyal Acked-by: Greg Kroah-Hartman Signed-off-by: Christoph Hellwig drivers/hwtracing/stm/policy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c1e950842f8a212a1811d4148a100d84b18037e4 Author: Bhumika Goyal Date: Mon Oct 16 17:18:48 2017 +0200 ACPI: configfs: make config_item_type const Make these structures const as they are either passed to the functions having the argument as const or stored as a reference in the "ci_type" const field of a config_item structure. Done using Coccienlle. Signed-off-by: Bhumika Goyal Acked-by: Rafael J. Wysocki Signed-off-by: Christoph Hellwig drivers/acpi/acpi_configfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 66603a31f8969353654e092f6b286a653ac71e71 Author: Bhumika Goyal Date: Mon Oct 16 17:18:47 2017 +0200 nvmet: make config_item_type const Make config_item_type structures const as they are either passed to a function having the argument as const or used inside an if statement or stored in the const "ci_type" field of a config_item structure. Done using Coccinelle Signed-off-by: Bhumika Goyal Acked-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/target/configfs.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 4ad0141226f00eee3cfe4392c27e14bf15520640 Author: Bhumika Goyal Date: Mon Oct 16 17:18:46 2017 +0200 usb: gadget: configfs: make config_item_type const Make config_item_type structures const as they are either passed to a function having the argument as const or stored in the const "ci_type" field of a config_item structure. Done using Coccinelle. Signed-off-by: Bhumika Goyal Acked-by: Felipe Balbi Signed-off-by: Christoph Hellwig drivers/usb/gadget/configfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 5c4e2476ed54de92e0289cb7d4b08d939f5ae730 Author: Bhumika Goyal Date: Mon Oct 16 17:18:45 2017 +0200 PCI: endpoint: make config_item_type const Make config_item_type structures const as they are either passed to a function having the argument as const or stored in the const "ci_type" field of a config_item structure. Done using Coccinelle. Signed-off-by: Bhumika Goyal Acked-by: Bjorn Helgaas Signed-off-by: Christoph Hellwig drivers/pci/endpoint/pci-ep-cfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 612a462acbb9f3bfc7c8433b44118b0a156560da Author: Bhumika Goyal Date: Mon Oct 16 17:18:43 2017 +0200 iio: make function argument and some structures const Make the argument of the functions iio_sw{d/t}_group_init_type_name const as they are only passed to the function config_group_init_type_name having the argument as const. Make the config_item_type structures const as they are either passed to the functions having the argument as const or they are stored in the const "ci_type" field of a config_item structure. Signed-off-by: Bhumika Goyal Acked-by: Jonathan Cameron Signed-off-by: Christoph Hellwig drivers/iio/dummy/iio_simple_dummy.c | 2 +- drivers/iio/industrialio-configfs.c | 2 +- drivers/iio/industrialio-sw-device.c | 6 +++--- drivers/iio/industrialio-sw-trigger.c | 6 +++--- drivers/iio/trigger/iio-trig-hrtimer.c | 2 +- drivers/iio/trigger/iio-trig-loop.c | 2 +- include/linux/iio/sw_device.h | 2 +- include/linux/iio/sw_trigger.h | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) commit 973639023444320d4fb5c17af58996463b3392d9 Author: Bhumika Goyal Date: Mon Oct 16 17:18:41 2017 +0200 usb: gadget: make config_item_type structures const Make these structures const as they are only passed to the const argument of the functions config_{group/item}_init_type_name. Signed-off-by: Bhumika Goyal Acked-by: Felipe Balbi Signed-off-by: Christoph Hellwig drivers/usb/gadget/function/f_acm.c | 2 +- drivers/usb/gadget/function/f_ecm.c | 2 +- drivers/usb/gadget/function/f_eem.c | 2 +- drivers/usb/gadget/function/f_fs.c | 2 +- drivers/usb/gadget/function/f_hid.c | 2 +- drivers/usb/gadget/function/f_loopback.c | 2 +- drivers/usb/gadget/function/f_mass_storage.c | 4 +-- drivers/usb/gadget/function/f_midi.c | 2 +- drivers/usb/gadget/function/f_ncm.c | 2 +- drivers/usb/gadget/function/f_obex.c | 2 +- drivers/usb/gadget/function/f_phonet.c | 2 +- drivers/usb/gadget/function/f_printer.c | 2 +- drivers/usb/gadget/function/f_rndis.c | 2 +- drivers/usb/gadget/function/f_serial.c | 2 +- drivers/usb/gadget/function/f_sourcesink.c | 2 +- drivers/usb/gadget/function/f_subset.c | 2 +- drivers/usb/gadget/function/f_tcm.c | 2 +- drivers/usb/gadget/function/f_uac1.c | 2 +- drivers/usb/gadget/function/f_uac1_legacy.c | 2 +- drivers/usb/gadget/function/f_uac2.c | 2 +- drivers/usb/gadget/function/uvc_configfs.c | 50 ++++++++++++++-------------- 21 files changed, 46 insertions(+), 46 deletions(-) commit 761594b741768a425d56dd3eb3f5a04276c7bb73 Author: Bhumika Goyal Date: Mon Oct 16 17:18:53 2017 +0200 dlm: make config_item_type const Make config_item_type structures const as they are either passed to a function having the argument as const or stored in the const "ci_type" field of a config_item structure. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Christoph Hellwig fs/dlm/config.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 0d4a4406c4aabb4d2c9ac6a48f3c77afe36e36ed Author: Bhumika Goyal Date: Mon Oct 16 17:18:52 2017 +0200 netconsole: make config_item_type const Make these structures const as they are either passed to the functions having the argument as const or stored as a reference in the "ci_type" const field of a config_item structure. Done using Coccienlle. Signed-off-by: Bhumika Goyal Signed-off-by: Christoph Hellwig drivers/net/netconsole.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e1919dff152a6c3164396145407f5a309eb74135 Author: Bhumika Goyal Date: Mon Oct 16 17:18:49 2017 +0200 nullb: make config_item_type const Make these structures const as they are either passed to the functions having the argument as const or stored as a reference in the "ci_type" const field of a config_item structure. Done using Coccienlle. Signed-off-by: Bhumika Goyal Signed-off-by: Christoph Hellwig drivers/block/null_blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4843afe4e6a5c1ddb3824b14678aa112e24f1e43 Author: Bhumika Goyal Date: Mon Oct 16 17:18:44 2017 +0200 ocfs2/cluster: make config_item_type const Make these structures const as they are either passed to the functions having the argument as const or stored as a reference in the "ci_type" const field of a config_item structure. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Christoph Hellwig fs/ocfs2/cluster/heartbeat.c | 4 ++-- fs/ocfs2/cluster/nodemanager.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit ece550b5758645809876e6e7862bf485c3a8d15c Author: Bhumika Goyal Date: Mon Oct 16 17:18:42 2017 +0200 target: make config_item_type const Make these structures const as they are either passed to the functions having the argument as const or stored as a reference in the "ci_type" const field of a config_item structure. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Christoph Hellwig drivers/target/iscsi/iscsi_target_stat.c | 12 ++++++------ drivers/target/target_core_configfs.c | 14 +++++++------- drivers/target/target_core_stat.c | 16 ++++++++-------- include/target/iscsi/iscsi_target_stat.h | 12 ++++++------ 4 files changed, 27 insertions(+), 27 deletions(-) commit aa293583f0fe8b1634aeadbea06b4d0d04c30a95 Author: Bhumika Goyal Date: Mon Oct 16 17:18:40 2017 +0200 configfs: make ci_type field, some pointers and function arguments const The ci_type field of the config_item structure do not modify the fields of the config_item_type structure it points to. And the other pointers initialized with ci_type do not modify the fields as well. So, make the ci_type field and the pointers initialized with ci_type as const. Make the struct config_item_type *type function argument of functions config_{item/group}_init_type_name const as the argument in both the functions is only stored in the ci_type field of a config_item structure which is now made const. Make the argument of configfs_register_default_group const as it is only passed to the argument of the function config_group_init_type_name which is now const. Signed-off-by: Bhumika Goyal Acked-by: Greg Kroah-Hartman Signed-off-by: Christoph Hellwig fs/configfs/dir.c | 10 +++++----- fs/configfs/item.c | 6 +++--- fs/configfs/symlink.c | 4 ++-- include/linux/configfs.h | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) commit 84c43674f4c0625971cbb03fbe339ec2723ef10e Author: Bhumika Goyal Date: Mon Oct 16 17:18:54 2017 +0200 configfs: make config_item_type const Make config_item_type structures const as they are either passed to a function having the argument as const or stored in the const "ci_type" field of a config_item structure. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Christoph Hellwig samples/configfs/configfs_sample.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3f6928c347707a65cee10a9f54b85ad5fb078b3f Author: Thomas Meyer Date: Sat Oct 7 16:02:21 2017 +0200 configfs: Fix bool initialization/comparison Bool initializations should use true and false. Bool tests don't need comparisons. Signed-off-by: Thomas Meyer Signed-off-by: Christoph Hellwig fs/configfs/file.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 93b138dd9d6e01cd360f347512b6c5bf6f0c4ce2 Author: Masahiro Yamada Date: Mon Sep 18 00:01:44 2017 +0900 printk: simplify no_printk() Commit 069f0cd00df0 ("printk: Make the printk*once() variants return a value") surrounded the macro implementation with ({ ... }). Now, the inner do { ... } while (0); is redundant. Link: http://lkml.kernel.org/r/1505660504-11059-1-git-send-email-yamada.masahiro@socionext.com Cc: Andrew Morton Cc: Ingo Molnar Cc: Masahiro Yamada Cc: Steven Rostedt Cc: linux-kernel@vger.kernel.org Signed-off-by: Masahiro Yamada Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek include/linux/printk.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8bd8181590501bc0bae2b6bd9f38d1371e9413a3 Author: Chris Wilson Date: Thu Oct 19 07:37:33 2017 +0100 drm/i915: Skip waking the device to service pwrite If the device is in runtime suspend, resuming takes time and reduces our powersaving. If this was for a small write into an object, that resume will take longer than any savings in using the indirect GGTT access to avoid the cpu cache. Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171019063733.31620-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit 2f26cdc0e2e64b1af10e0885a251fbd38e4b2336 Author: Jani Nikula Date: Tue Oct 17 17:03:13 2017 +0300 drm/i915/crt: split compute_config hook by platforms Only the DDI hook has some actual content. Cc: Daniel Vetter Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20171017140313.20937-1-jani.nikula@intel.com drivers/gpu/drm/i915/intel_crt.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 0ae188653b73f5bd18384caa3a4be28a8175d295 Author: Jani Nikula Date: Tue Oct 17 17:02:34 2017 +0300 drm/i915: remove g4x lowfreq_avail and has_pipe_cxsr They're unused and unsupported. Leave the reduced_clock pointers in place still, should they prove useful later on. v2: go from nuking DDI lowfreq_avail to nuking it entirely (Ville) Cc: Daniel Vetter Cc: Ville Syrjälä Suggested-by: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20171017140234.20677-1-jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_pci.c | 2 -- drivers/gpu/drm/i915/intel_display.c | 15 --------------- drivers/gpu/drm/i915/intel_drv.h | 1 - 4 files changed, 20 deletions(-) commit d02ace874937a4dda217d4cb772c7777056febb3 Author: Ville Syrjälä Date: Wed Oct 18 21:19:58 2017 +0300 drm/i915: Drop the redundant hdmi prefix/suffix from a lot of variables A bunch of functions are now exclusively used for HDMI, so naming the variables with hdmi prefix/suffix is redundant. Also use int rather than u32 for the translation level consistently. v2: Rebase due to hdmi_level=-1 avoidance Cc: James Ausmus Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171018181958.4423-1-ville.syrjala@linux.intel.com Reviewed-by: James Ausmus drivers/gpu/drm/i915/intel_ddi.c | 63 +++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 33 deletions(-) commit 21b39d2a3adb798dc8dcbdb4abe23250ecfaf7e4 Author: Ville Syrjälä Date: Wed Oct 18 21:19:34 2017 +0300 drm/i915: Unify error handling for missing DDI buf trans tables Handle missing buf trans tables, or out of bounds buf trans levels the same way everywhere. These should never be hit under normal conditions, but let's play it safe for now. v2: Avoid the hdmi_level=-1 case (James) Cc: James Ausmus Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171018181934.4229-1-ville.syrjala@linux.intel.com Reviewed-by: James Ausmus drivers/gpu/drm/i915/intel_ddi.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit edba48fdfc4770ee41d71e2c2c0360b15cca6567 Author: Ville Syrjälä Date: Mon Oct 16 17:57:03 2017 +0300 drm/i915: Centralize the SKL DDI A/E vs. B/C/D buf trans handling SKL DDI B/C/D only have 9 usable buf trans registers for DP/eDP. That matches the normal DP buf trans tables, but the low vswing eDP tables have 10 entries. Thus the eDP tables can only be used safely with DDI A and E. We try to catch cases where DDI B/C/D gets used with the wrong number of entires in some parts of the code, but not everywhere. Let's move the code to deal with that deeper into intel_ddi_get_buf_trans_edp(). And for sake of symmetry do the same in intel_ddi_get_buf_trans_dp(). That would also avoid explosions in the rather unlikely case that the DP tables would get revised to 10 entries as well. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171016145705.11780-9-ville.syrjala@linux.intel.com Reviewed-by: James Ausmus drivers/gpu/drm/i915/intel_ddi.c | 60 +++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 26 deletions(-) commit 043eaf3685c8edccf5400a0260027b864b931797 Author: Ville Syrjälä Date: Mon Oct 16 17:57:02 2017 +0300 drm/i915: Kill off the BXT buf_trans default_index default_index contained in the BXT buf_trans tables is actually useless. For DP we should always have a valid level selected (otherwise the link training logic would be buggy), and for HDMI we can just do what the other platforms do and pick the correct entry in intel_ddi_hdmi_level(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171016145705.11780-8-ville.syrjala@linux.intel.com Reviewed-by: James Ausmus drivers/gpu/drm/i915/intel_ddi.c | 80 +++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 46 deletions(-) commit f3cf4ba45e13bef6287b03b72ba43db1dab60e29 Author: Ville Syrjälä Date: Mon Oct 16 17:57:01 2017 +0300 drm/i915: Pass encoder type to cnl_ddi_vswing_sequence() explicitly encoder->type is unreliable for DP/HDMI, so pass it in explicity into cnl_ddi_vswing_sequence(). This matches what we do for BXT. v2: Pass intel_encoder down to cnl_ddi_vswing_program(), and clean up the argument types while at it Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171016145705.11780-7-ville.syrjala@linux.intel.com Reviewed-by: James Ausmus drivers/gpu/drm/i915/intel_ddi.c | 53 +++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 28 deletions(-) commit 7d4f37b5db57bb383872ed40793ffb74f201c6ac Author: Ville Syrjälä Date: Mon Oct 16 17:57:00 2017 +0300 drm/i915: Integrate BXT into intel_ddi_dp_voltage_max() Make BXT less special by following the CNL approach and handling it in intel_ddi_dp_voltage_max() alognside every other DDI platform. v2: Clean up the argument types to bxt_ddi_vswing_sequence() while at it Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171016145705.11780-6-ville.syrjala@linux.intel.com Reviewed-by: James Ausmus drivers/gpu/drm/i915/intel_ddi.c | 69 ++++++++++++++++++++++++++-------------- drivers/gpu/drm/i915/intel_dp.c | 4 +-- 2 files changed, 46 insertions(+), 27 deletions(-) commit 7ea79333a728740bc83e6102fd4fb992664ee915 Author: Ville Syrjälä Date: Mon Oct 16 17:56:59 2017 +0300 drm/i915: Pass the level to intel_prepare_hdmi_ddi_buffers() The caller of intel_prepare_hdmi_ddi_buffers() alreday figured out the level, so let's just pass it in instead if figuring it out again. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171016145705.11780-5-ville.syrjala@linux.intel.com Reviewed-by: James Ausmus drivers/gpu/drm/i915/intel_ddi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 081dfcfafcbb524b2916b0243c976228accaa4df Author: Ville Syrjälä Date: Mon Oct 16 17:56:58 2017 +0300 drm/i915: Pass the encoder type explicitly to skl_set_iboost() encoder->type isn't reliable for DP/HDMI encoders, so pass the type explicity to skl_set_iboost(). Also take the opportunity to streamline the code. v2: Clean up the argument types to skl_ddi_set_iboost() while at it Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171016145705.11780-4-ville.syrjala@linux.intel.com Reviewed-by: James Ausmus drivers/gpu/drm/i915/intel_ddi.c | 57 ++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 35 deletions(-) commit 975786ee0e25253c4bcd3e6b133a2cd5f0a2c115 Author: Ville Syrjälä Date: Mon Oct 16 17:56:57 2017 +0300 drm/i915: Extract intel_ddi_get_buf_trans_hdmi() Introduce intel_ddi_get_buf_trans_hdmi() and start using it where we can. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171016145705.11780-3-ville.syrjala@linux.intel.com Reviewed-by: James Ausmus Reviewed-by: Manasi Navare drivers/gpu/drm/i915/intel_ddi.c | 50 ++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 22 deletions(-) commit 7a0947e755084b918e33242fd558e55cb443408e Author: Stephen Hemminger Date: Tue Oct 17 17:16:52 2017 -0700 dql: make dql_init return void dql_init always returned 0, and the only place that uses it in network core code didn't care about the return value anyway. Signed-off-by: Stephen Hemminger Acked-by: Hiroaki SHIMODA Signed-off-by: David S. Miller include/linux/dynamic_queue_limits.h | 2 +- lib/dynamic_queue_limits.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit be070c77ca805a4f06f135599415195078f0ed68 Author: Gustavo A. R. Silva Date: Tue Oct 17 17:42:53 2017 -0500 net: l2tp: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I replaced the "NOBREAK" comment with a "fall through" comment, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Acked-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8fe2c7f3365f5b0e517f210957cc813b9102c96 Author: Ville Syrjälä Date: Mon Oct 16 17:56:56 2017 +0300 drm/i915: Relocate intel_ddi_get_buf_trans_*() functions We'll want to use the intel_ddi_get_buf_trans_*() functions a bit earlier in the file, so move them up. While at it start using them in the iboost setup to get rid of the platform checks there. v2: Rebase due to BDW FDI buf trans fix Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171016145705.11780-2-ville.syrjala@linux.intel.com Reviewed-by: James Ausmus drivers/gpu/drm/i915/intel_ddi.c | 115 +++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 60 deletions(-) commit e4844dede52f26132657e8dbd66d1b615653b0d6 Merge: c94fb63 7bdeb7f Author: Thomas Gleixner Date: Thu Oct 19 14:29:46 2017 +0200 Merge tag 'irqchip-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates for 4.15 from Marc Zyngier - GICv4 updates (improved performance, errata workarounds) - Workaround for Socionext's pre-ITS erratum - Meson GPIO interrupt controller - BCM7271 L2 interrupt controller - GICv3 range selector support - various cleanups commit 48acc9e847ef335f7d3b62926825397c6bf4eab2 Author: Gustavo A. R. Silva Date: Tue Oct 17 14:01:45 2017 -0500 liquidio: mark expected switch fall-through in octeon_destroy_resources In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Acked-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b14bec89042ee6f9a43b437f8133cfcbea140f20 Author: Gustavo A. R. Silva Date: Tue Oct 17 13:59:20 2017 -0500 liquidio: remove unnecessary NULL check before kfree in delete_glists NULL check before freeing functions like kfree is not needed. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Acked-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 06c47e6286d5afdd7b2e7e3c207f6906b3be3d4d Author: Vivek Gautam Date: Thu Oct 19 13:47:43 2017 +0200 usb: dwc3: of-simple: Add support to get resets for the device Add support to get a list of resets available for the device. These resets must be kept de-asserted until the device is in use. Signed-off-by: Vivek Gautam [p.zabel@pengutronix.de: switch to hidden reset control array] Signed-off-by: Philipp Zabel Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-of-simple.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) commit ac79a512b6fd5831a12859fd1d3c5e38103bcaeb Merge: 010f245 aa0bf85 Author: David S. Miller Date: Thu Oct 19 13:20:32 2017 +0100 Merge branch 'ibmvnic-next' Thomas Falcon says: ==================== ibmvnic: Enable SG and TSO feature support This patch set is fairly straightforward. The first patch enables scatter-gather support in the ibmvnic driver. The following patch then enables the TCP Segmentation offload feature. The final patch allows users to enable or disable net device features using ethtool. Enabling SG and TSO grants a large increase in throughput with TX speed increasing from 1Gb/s to 9Gb/s in our initial test runs. ==================== Signed-off-by: David S. Miller commit aa0bf8510dac901badc6889b208fc0e7d9225924 Author: Thomas Falcon Date: Tue Oct 17 12:36:56 2017 -0500 ibmvnic: Let users change net device features Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 ++ 1 file changed, 2 insertions(+) commit fdb061056f57e849a05cac072a4998c7f33d797e Author: Thomas Falcon Date: Tue Oct 17 12:36:55 2017 -0500 ibmvnic: Enable TSO support This patch enables TSO support. It includes additional buffers reserved exclusively for large packets. Throughput is greatly increased with TSO enabled, from about 1 Gb/s to 9 Gb/s on our test systems. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 56 ++++++++++++++++++++++++++++++++------ drivers/net/ethernet/ibm/ibmvnic.h | 5 ++++ 2 files changed, 53 insertions(+), 8 deletions(-) commit 154820563dd4621c78e03e98e70216e832422f8e Author: Thomas Falcon Date: Tue Oct 17 12:36:54 2017 -0500 ibmvnic: Enable scatter-gather support This patch enables scatter gather support. Since there is no HW/FW scatter-gather support at this time, the driver needs to loop through each fragment and copy it to a contiguous, pre-mapped buffer entry. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit 010f245b9dd734adda6386c494a4ace953ea8dc4 Author: Eric Dumazet Date: Tue Oct 17 10:07:44 2017 -0700 tun: relax check on eth_get_headlen() return value syzkaller hit the WARN() in tun_get_user(), providing skb with payload in fragments only, and nothing in skb->head GRO layer is fine with this, so relax the check. Fixes: 90e33d459407 ("tun: enable napi_gro_frags() for TUN/TAP driver") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/tun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22ce97fe49b5522e0f97b7c2282ed71a1abd7410 Author: Colin Ian King Date: Tue Oct 17 16:01:30 2017 +0100 mqprio: fix potential null pointer dereference on opt The pointer opt has a null check however before for this check opt is dereferenced when len is initialized, hence we potentially have a null pointer deference on opt. Avoid this by checking for a null opt before dereferencing it. Detected by CoverityScan, CID#1458234 ("Dereference before null check") Fixes: 4e8b86c06269 ("mqprio: Introduce new hardware offload mode and shaper in mqprio") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller net/sched/sch_mqprio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fa31f0c98d64212b2b2b4a1e6d887208b6acb2d9 Author: Dan Carpenter Date: Tue Oct 17 15:33:01 2017 +0300 thunderbolt: Right shifting to zero bug in tbnet_handle_packet() There is a problem when we do: sequence = pkg->hdr.length_sn & TBIP_HDR_SN_MASK; sequence >>= TBIP_HDR_SN_SHIFT; TBIP_HDR_SN_SHIFT is 27, and right shifting a u8 27 bits is always going to result in zero. The fix is to declare these variables as u32. Fixes: e69b6c02b4c3 ("net: Add support for networking over Thunderbolt cable") Signed-off-by: Dan Carpenter Acked-by: Yehezkel Bernat Signed-off-by: David S. Miller drivers/net/thunderbolt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a03c3d398c17eadfc5bc470c1084beb71c088f1 Author: Dan Carpenter Date: Tue Oct 17 15:32:17 2017 +0300 thunderbolt: Fix a couple right shifting to zero bugs The problematic code looks like this: res_seq = res_hdr->xd_hdr.length_sn & TB_XDOMAIN_SN_MASK; res_seq >>= TB_XDOMAIN_SN_SHIFT; TB_XDOMAIN_SN_SHIFT is 27, and right shifting a u8 27 bits is always going to result in zero. The fix is to declare these variables as u32. Fixes: d1ff70241a27 ("thunderbolt: Add support for XDomain discovery protocol") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/thunderbolt/xdomain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9780ded39bef5d22a84bdc39112df93f70a58bdd Author: Takashi Iwai Date: Wed Oct 18 15:51:59 2017 +0200 ALSA: hda: Avoid racy recreation of widget kobjects The refresh of HD-audio widget sysfs kobjects via snd_hdac_refresh_widget_sysfs() is slightly racy. The driver recreates the whole tree from scratch after deleting the whole. When CONFIG_DEBUG_KOBJECT_RELEASE option is used, kobject release doesn't happen immediately but delayed, while the re-creation of the same named kobject happens soon after invoking kobject_put(). This may end up with the conflicts of duplicated kobjects, as found in the bug report below. In this patch, we take another approach to refresh the tree: instead of recreating the whole tree, just add the new nodes and delete the non-existing nodes. Since the refresh happens only once at initialization, no longer race would happen. Along with the code change, merge snd_hdac_refresh_widget_sysfs() with the existing snd_hdac_refresh_widgets() with an additional bool flag for simplifying the code. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197307 Signed-off-by: Takashi Iwai include/sound/hdaudio.h | 3 +-- sound/hda/hdac_device.c | 43 ++++++++++--------------------------------- sound/hda/hdac_sysfs.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ sound/hda/local.h | 2 ++ sound/pci/hda/hda_codec.c | 2 +- 5 files changed, 61 insertions(+), 36 deletions(-) commit 6cb6d98abdb06de867e34fde92912fdb89477897 Author: Colin Ian King Date: Tue Oct 17 15:31:51 2017 +0100 HID: hid-logitech: remove redundant assignment to pointer value The pointer value is being assigned a value and this is never read, and later on it is being assigned a new value. This the first assignment is redundant and can be removed and hence also the variables report and report_list. Cleans up the clang warning: Value stored to 'value' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Jiri Kosina drivers/hid/hid-lg4ff.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a90cca7c75907380b3be7110c2e3007b743553b4 Merge: c057c68 046b307 Author: David S. Miller Date: Thu Oct 19 12:51:38 2017 +0100 Merge branch 'ena-next' Netanel Belgazal says: ==================== update ENA driver to releawse 1.3.0 ==================== Signed-off-by: David S. Miller commit 046b30718928d616f7decc79c272fdd4f42cc61d Author: Netanel Belgazal Date: Tue Oct 17 07:34:01 2017 +0000 net: ena: increase ena driver version to 1.3.0 Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_netdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 58894d5219c5d3fdd72d4166f007df5004817e84 Author: Netanel Belgazal Date: Tue Oct 17 07:34:00 2017 +0000 net: ena: add new admin define for future support of IPv6 RSS Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 11095fdb712b1aaa7ffd6ccd86d0c45d29732eec Author: Netanel Belgazal Date: Tue Oct 17 07:33:59 2017 +0000 net: ena: add statistics for missed tx packets Add a new statistic to ethtool stats that show the number of packets without transmit acknowledgement from ENA device. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_ethtool.c | 1 + drivers/net/ethernet/amazon/ena/ena_netdev.c | 30 +++++++++++++++------------ drivers/net/ethernet/amazon/ena/ena_netdev.h | 1 + 3 files changed, 19 insertions(+), 13 deletions(-) commit 8c5c7abdeb2dfe4b4b28a48702c2cfa83fac15c9 Author: Netanel Belgazal Date: Tue Oct 17 07:33:58 2017 +0000 net: ena: add power management ops to the ENA driver Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_ethtool.c | 2 + drivers/net/ethernet/amazon/ena/ena_netdev.c | 117 ++++++++++++++++++++------ drivers/net/ethernet/amazon/ena/ena_netdev.h | 3 + 3 files changed, 95 insertions(+), 27 deletions(-) commit dbeaf1e3c24f0e87c8047fc8dcbd8163ab82c8e7 Author: Netanel Belgazal Date: Tue Oct 17 07:33:57 2017 +0000 net: ena: remove legacy suspend suspend/resume support Remove ena_device_io_suspend/resume() methods Those methods were intend to be used by the device to trigger suspend/resume but eventually it was dropped. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_ethtool.c | 2 -- drivers/net/ethernet/amazon/ena/ena_netdev.c | 50 --------------------------- drivers/net/ethernet/amazon/ena/ena_netdev.h | 4 --- 3 files changed, 56 deletions(-) commit 88aef2f51c9e3640268aca04a256b8f26cf6bdff Author: Netanel Belgazal Date: Tue Oct 17 07:33:56 2017 +0000 net: ena: improve ENA driver boot time. The ena admin commands timeout is in resolutions of 100ms. Therefore, When the driver works in polling mode, it sleeps for 100ms each time. The overall boot time of the ENA driver is ~1.5 sec. To reduce the boot time, This change modifies the granularity of the sleeps to 5ms. This change improves the boot time to 220ms. Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit c057c68303b13387d9849a33557057ef428c2d3c Author: Netanel Belgazal Date: Tue Oct 17 07:30:34 2017 +0000 MAINTAINERS: change ENA driver maintainers email domain ENA driver was developed by developers from Annapurna Labs. Annapurna Labs was acquired by Amazon and the company's domain (@annapurnalabs.com) will become deprecated soon. Update the email addresses of the maintainers to the alternative amazon emails (@amazon.com) Signed-off-by: Netanel Belgazal Signed-off-by: David S. Miller MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f436baf326ae62aecffbee8572f8bc75394dbaa3 Author: Michal Kalderon Date: Tue Oct 17 10:23:25 2017 +0300 qed: Fix iWARP out of order flow Out of order flow is not working for iWARP. This patch got cut out from initial series that added out of order support for iWARP. Make out of order code common for iWARP and iSCSI. Add new configuration option CONFIG_QED_OOO. Set by qedr and qedi Kconfigs. Fixes: d1abfd0b4ee2 ("qed: Add iWARP out of order support") Signed-off-by: Michal Kalderon Signed-off-by: Manish Rangankar Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/infiniband/hw/qedr/Kconfig | 1 + drivers/net/ethernet/qlogic/Kconfig | 3 +++ drivers/net/ethernet/qlogic/qed/Makefile | 3 ++- drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 7 ++++++- drivers/net/ethernet/qlogic/qed/qed_ooo.c | 16 +++++++++++++--- drivers/net/ethernet/qlogic/qed/qed_ooo.h | 2 +- drivers/scsi/qedi/Kconfig | 1 + 7 files changed, 27 insertions(+), 6 deletions(-) commit 30d240dfa2e88f7941f72fac9a256358f7d55ad8 Author: Yunsheng Lin Date: Tue Oct 17 14:51:30 2017 +0800 net: hns3: Add mqprio hardware offload support in hns3 driver When using tc qdisc, dcb_ops->setup_tc is used to tell hclge_dcb module to do the tm related setup. Only TC_MQPRIO_MODE_CHANNEL offload mode is supported. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 47 +++++++++++++++++- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 1 + .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 56 +++++++++++++++------- 4 files changed, 86 insertions(+), 19 deletions(-) commit 56fd2b2ca467f22f940282bf2c1ca4e1cb8f4c67 Author: Alexander Duyck Date: Mon Oct 16 22:44:44 2017 -0400 macvlan/macvtap: Add support for L2 forwarding offloads with macvtap This patch reverts earlier commit b13ba1b83f52 ("macvlan: forbid L2 fowarding offload for macvtap"). The reason for reverting this is because the original patch no longer fixes what it previously did as the underlying structure has changed for macvtap. Specifically macvtap originally pulled packets directly off of the lowerdev. However in commit 6acf54f1cf0a ("macvtap: Add support of packet capture on macvtap device.") that code was changed and instead macvtap would listen directly on the macvtap device itself instead of the lower device. As such, the L2 forwarding offload should now be able to provide a performance advantage of skipping the checks on the lower dev while not introducing any sort of regression. Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller drivers/net/macvlan.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 9ad0457423af877ad1b76c105a57130da028ccad Author: Markus Elfring Date: Fri Oct 6 16:27:26 2017 +0200 kernel/module: Delete an error message for a failed memory allocation in add_module_usage() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Jessica Yu kernel/module.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8f2e9ca837ecee50aa85e853299bf7e66431e071 Merge: b9f1f1c 6c32e0d Author: David S. Miller Date: Thu Oct 19 11:44:36 2017 +0100 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-10-17 This series contains updates to i40e and ethtool. Alan provides most of the changes in this series which are mainly fixes and cleanups. Renamed the ethtool "cmd" variable to "ks", since the new ethtool API passes us ksettings structs instead of command structs. Cleaned up an ifdef that was not accomplishing anything. Added function header comments to provide better documentation. Fixed two issues in i40e_get_link_ksettings(), by calling ethtool_link_ksettings_zero_link_mode() to ensure the advertising and link masks are cleared before we start setting bits. Cleaned up and fixed code comments which were incorrect. Separated the setting of autoneg in i40e_phy_types_to_ethtool() into its own conditional to clarify what PHYs support and advertise autoneg, and makes it easier to add new PHY types in the future. Added ethtool functionality to intersect two link masks together to find the common ground between them. Overhauled i40e to ensure that the new ethtool API macros are being used, instead of the old ones. Fixed the usage of unsigned 64-bit division which is not supported on all architectures. Sudheer adds support for 25G Active Optical Cables (AOC) and Active Copper Cables (ACC) PHY types. ==================== Signed-off-by: David S. Miller commit 7bdeb7f52b1b193bb50fc6d01c6110ba50bafb5b Author: Wei Yongjun Date: Wed Oct 11 10:50:23 2017 +0000 irqchip/aspeed-i2c-ic: Fix return value check in aspeed_i2c_ic_of_init() In case of error, the function of_iomap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test.. Reviewed-by: Brendan Higgins Signed-off-by: Wei Yongjun Signed-off-by: Marc Zyngier drivers/irqchip/irq-aspeed-i2c-ic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 215f4cc0fb208665dd15a524ec57edf4d7e215e6 Author: Jerome Brunet Date: Mon Sep 18 15:46:10 2017 +0200 irqchip/meson: Add support for gpio interrupt controller Add support for the interrupt gpio controller found on Amlogic's meson SoC family. This controller is a separate controller from the gpio controller. It is able to spy on the SoC pad. It is essentially a 256 to 8 router with a filtering block to select level or edge and polarity. The number of actual mappable inputs depends on the SoC. Cc: Heiner Kallweit Signed-off-by: Jerome Brunet Signed-off-by: Marc Zyngier drivers/irqchip/Kconfig | 8 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-meson-gpio.c | 414 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 423 insertions(+) commit df48d3b5ef276998e399846db12c241e6f9d318c Author: Jerome Brunet Date: Mon Sep 18 15:46:09 2017 +0200 dt-bindings: interrupt-controller: Add DT binding for meson GPIO interrupt controller This commit adds the device tree bindings description for Amlogic's GPIO interrupt controller available on the meson8b, gxbb and gxl SoC families Cc: Heiner Kallweit Acked-by: Rob Herring Signed-off-by: Jerome Brunet Signed-off-by: Marc Zyngier .../amlogic,meson-gpio-intc.txt | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 44c4c25e3103d26bee4cc041cbf526e41975055b Author: Marc Zyngier Date: Thu Oct 19 10:11:34 2017 +0100 irqchip/gic-v3-its: Update effective affinity on VPE mapping When setting the affinity of a VPE (either because we map or move it), make sure the effective affinity is correctly reported back to the core kernel. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 3c1cceeb3d2879d98eda7afd62838fde7b0f920d Author: Marc Zyngier Date: Mon Oct 9 13:17:43 2017 +0100 irqchip/gic-v3-its: Only send VINVALL to a single ITS Sending VINVALL to all ITSs is completely pointless, as all we're trying to achieve is to tell the redistributor that the property table for this VPE should be invalidated. Let's issue the command on the first valid ITS and be done with it. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2247e1bf70639642b1c1375aa9176ccd95736400 Author: Marc Zyngier Date: Sun Oct 8 18:50:36 2017 +0100 irqchip/gic-v3-its: Limit scope of VPE mapping to be per ITS So far, we map all VPEs on all ITSs. While this is not wrong, this is quite a big hammer, as moving a VPE around requires all ITSs to be synchronized. Needles to say, this is an expensive proposition. Instead, let's switch to a mode where we issue VMAPP commands only on ITSs that are actually involved in reporting interrupts to the given VM. For that purpose, we refcount the number of interrupts are are mapped for this VM on each ITS, performing the map/unmap operations as required. It then allows us to use this refcount to only issue VMOVP to the ITSs that need to know about this VM. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 75 ++++++++++++++++++++++++++++++++++++++ include/linux/irqchip/arm-gic-v4.h | 1 + 2 files changed, 76 insertions(+) commit 75fd951be846a494b0f01f80e859dcb74970f0d5 Author: Marc Zyngier Date: Sun Oct 8 18:46:39 2017 +0100 irqchip/gic-v3-its: Make its_send_vmapp operate on a single ITS Currently, its_send_vmapp operates on all ITSs. As we're about to try and limit the amount of commands we send to ITSs that are not involved in dealing with a given VM, let's redefine that primitive so that it takes a target ITS as a parameter. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 40619a2ef69d5e183717d28e8c98a59319c78a4f Author: Marc Zyngier Date: Sun Oct 8 15:16:09 2017 +0100 irqchip/gic-v3-its: Make its_send_vinvall operate on a single ITS Currently, its_send_vinvall operates on all ITSs. As we're about to try and limit the amount of commands we send to ITSs that are not involved in dealing with a given VM, let's redefine that primitive so that it takes a target ITS as a parameter. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit ab60491ee5d346557f152c7e8d3e7238c9b96c5c Author: Marc Zyngier Date: Sun Oct 8 18:48:06 2017 +0100 irqchip/gic-v3-its: Make GICv4_ITS_LIST_MAX globally available As we're about to make use of the maximum number of ITSs in a GICv4 system, let's make this value global (and rename it to GICv4_ITS_LIST_MAX). Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 10 ++-------- include/linux/irqchip/arm-gic-v4.h | 6 ++++++ 2 files changed, 8 insertions(+), 8 deletions(-) commit debf6d02bb58a099202375ca2ba88e9775b153c6 Author: Marc Zyngier Date: Sun Oct 8 18:44:42 2017 +0100 irqchip/gic-v3-its: Track per-ITS list number At boot time, we enumerate all the GICv4-capable ITSs, and build a mask of the available ITSs. Take this opportunity to store the ITS number in the its_node structure so that we can use it at a later time. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 3 +++ 1 file changed, 3 insertions(+) commit 5c9a882e940dde2f3e80eb3c7635a3307be511b6 Author: Marc Zyngier Date: Fri Jul 28 21:20:37 2017 +0100 irqchip/gic-v3-its: Workaround HiSilicon Hip07 redistributor addressing The ITSes on the Hip07 (as present in the Huawei D05) are broken when it comes to addressing the redistributors, and need to be explicitely told to address the VLPI page instead of the redistributor base address. So let's add yet another quirk, fixing up the target address in the command stream. Signed-off-by: Marc Zyngier Documentation/arm64/silicon-errata.txt | 1 + arch/arm64/Kconfig | 11 +++++++++++ drivers/irqchip/irq-gic-v3-its.c | 30 ++++++++++++++++++++++++++++-- 3 files changed, 40 insertions(+), 2 deletions(-) commit 67047f90d7dd886d3f505185a6d75517bdbd907c Author: Marc Zyngier Date: Fri Jul 28 21:16:58 2017 +0100 irqchip/gic-v3-its: Pass its_node pointer to each command builder In order to be able to issue command variants depending on how broken an ITS is, let's pass the its pointer to all command building primitives. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 58 ++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 20 deletions(-) commit a19b462f044b1bc5327f0bc871b46a03efb84363 Author: Marc Zyngier Date: Fri Aug 4 17:45:50 2017 +0100 irqchip/gic-v3-its: Add post-mortem info on command timeout If the ITS stops processing commands, we're pretty much toasted as we cannot update the configuration anymore (and we're not even sure that the ITS still translates interrups). If that happens, let's dump some basic information about the state of affairs before moving on. Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 558b01654d92332d3b7b17bf773cdce8ce16ef46 Author: Ard Biesheuvel Date: Tue Oct 17 17:55:56 2017 +0100 irqchip/gic-v3: Add workaround for Synquacer pre-ITS The Socionext Synquacer SoC's implementation of GICv3 has a so-called 'pre-ITS', which maps 32-bit writes targeted at a separate window of size '4 << device_id_bits' onto writes to GITS_TRANSLATER with device ID taken from bits [device_id_bits + 1:2] of the window offset. Writes that target GITS_TRANSLATER directly are reported as originating from device ID #0. So add a workaround for this. Given that this breaks isolation, clear the IRQ_DOMAIN_FLAG_MSI_REMAP flag as well. Acked-by: Rob Herring Signed-off-by: Ard Biesheuvel Signed-off-by: Marc Zyngier .../bindings/interrupt-controller/arm,gic-v3.txt | 4 ++ arch/arm64/Kconfig | 8 +++ drivers/irqchip/irq-gic-v3-its.c | 72 +++++++++++++++++++++- 3 files changed, 82 insertions(+), 2 deletions(-) commit 9d111d49106b61f5a652d5418e85d8741b1a0427 Author: Ard Biesheuvel Date: Tue Oct 17 17:55:55 2017 +0100 irqchip/gic: Make quirks matching conditional on init return value As it turns out, the IIDR is not sufficient to distinguish between GICv3 implementations when it comes to enabling quirks. So update the prototype of the init() hook to return a bool, and interpret a 'false' return value as no match, in which case the 'enabling workaround' log message should not be printed. Signed-off-by: Ard Biesheuvel Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-common.c | 5 +++-- drivers/irqchip/irq-gic-common.h | 2 +- drivers/irqchip/irq-gic-v3-its.c | 12 +++++++++--- 3 files changed, 13 insertions(+), 6 deletions(-) commit fa1500191958660952a3a8466aad54003701a7b6 Author: Ard Biesheuvel Date: Tue Oct 17 17:55:54 2017 +0100 irqchip/gic-v3: Probe device ID space before quirks handling Before adding another SoC whose device ID space deviates from the value presented in the GIC ID registers, let's slightly refactor the code so that the ID registers are probed before that quirks handling executes. This allows us to move the device ID override into the quirk handler itself. Signed-off-by: Ard Biesheuvel Signed-off-by: Marc Zyngier drivers/irqchip/irq-gic-v3-its.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit eda0d04acc5e317da675ee93a3f09e7c2e2fa592 Author: Shanker Donthineni Date: Fri Oct 6 10:24:00 2017 -0500 irqchip/gic-v3: Add support for Range Selector (RS) feature A new feature Range Selector (RS) has been added to GIC specification in order to support more than 16 CPUs at affinity level 0. New fields are introduced in SGI system registers (ICC_SGI0R_EL1, ICC_SGI1R_EL1 and ICC_ASGI1R_EL1) to relax an artificial limit of 16 at level 0. - A new RSS field in ICC_CTLR_EL3, ICC_CTLR_EL1 and ICV_CTLR_EL1: [18] - Range Selector Support (RSS) 0b0 = Targeted SGIs with affinity level 0 values of 0-15 are supported. 0b1 = Targeted SGIs with affinity level 0 values of 0-255 are supported. - A new RS field in ICC_SGI0R_EL1, ICC_SGI1R_EL1 and ICC_ASGI1R_EL1: [47:44] - RangeSelector (RS) which group of 16 TargetList[n] field TargetList[n] represents aff0 value ((RS*16)+n) When ICC_CTLR_EL3.RSS==0 or ICC_CTLR_EL1.RSS==0, RS is RES0. - A new RSS field in GICD_TYPER: [26] - Range Selector Support (RSS) 0b0 = Targeted SGIs with affinity level 0 values of 0-15 are supported. 0b1 = Targeted SGIs with affinity level 0 values of 0-255 are supported. Signed-off-by: Shanker Donthineni Signed-off-by: Marc Zyngier arch/arm/include/asm/arch_gicv3.h | 5 ++++ arch/arm64/include/asm/arch_gicv3.h | 5 ++++ drivers/irqchip/irq-gic-v3.c | 50 ++++++++++++++++++++++++++++++------- include/linux/irqchip/arm-gic-v3.h | 4 +++ 4 files changed, 55 insertions(+), 9 deletions(-) commit 9d59b708500fcb62d28e15b8c6333be620984d8b Author: Yixun Lan Date: Sat Oct 14 07:13:13 2017 +0800 arm64: dts: meson-axg: add initial A113D SoC DT support Try to add basic DT support for the Amlogic's Meson-AXG A113D SoC, which describe components as follows: Reserve Memory, CPU, GIC, IRQ, Timer, UART. It's capable of booting up into the serial console. Signed-off-by: Yixun Lan Reviewed-by: Andreas Färber Reviewed-by: Neil Armstrong Reviewed-by: Kevin Hilman Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/Makefile | 1 + arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 22 +++ arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 204 +++++++++++++++++++++++++ 3 files changed, 227 insertions(+) commit 1000cec2f02263e081e7ad559da5e03329aab58a Author: Yixun Lan Date: Sat Oct 14 07:13:12 2017 +0800 dt-bindings: arm: amlogic: Add Meson AXG binding Introduce new bindings for the Meson AXG SoC which now have different memory layout. Signed-off-by: Yixun Lan Reviewed-by: Andreas Färber Reviewed-by: Neil Armstrong Reviewed-by: Kevin Hilman Acked-by: Rob Herring Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/arm/amlogic.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 7f342678634f16795892677204366e835e450dda Author: Vadim Lomovtsev Date: Tue Oct 17 05:47:38 2017 -0700 PCI: Set Cavium ACS capability quirk flags to assert RR/CR/SV/UF The Cavium ThunderX (CN8XXX) family of PCIe Root Ports does not advertise an ACS capability. However, the RTL internally implements similar protection as if ACS had Request Redirection, Completion Redirection, Source Validation, and Upstream Forwarding features enabled. Change Cavium ACS capabilities quirk flags accordingly. Fixes: b404bcfbf035 ("PCI: Add ACS quirk for all Cavium devices") Signed-off-by: Vadim Lomovtsev [bhelgaas: tidy changelog, comment, stable tag] Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v4.6+: b77d537d00d0: PCI: Apply Cavium ACS quirk only to CN81xx/CN83xx/CN88xx devices drivers/pci/quirks.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 3f7c86b2382ea721c4fe9a7532bf5dc1b414ec1a Author: Julien Thierry Date: Tue Oct 17 14:11:30 2017 +0100 arm64: Update fault_info table with new exception types Based on: ARM Architecture Reference Manual, ARMv8 (DDI 0487B.b). ARMv8.1 introduces the optional feature ARMv8.1-TTHM which can trigger a new type of memory abort. This exception is triggered when hardware update of page table flags is not atomic in regards to other memory accesses. Replace the corresponding unknown entry with a more accurate one. Cf: Section D10.2.28 ESR_ELx, Exception Syndrome Register (p D10-2381), section D4.4.11 Restriction on memory types for hardware updates on page tables (p D4-2116 - D4-2117). ARMv8.2 does not add new exception types, however it is worth mentioning that when obligatory feature RAS (optional for ARMv8.{0,1}) is implemented, exceptions related to "Synchronous parity or ECC error on memory access, not on translation table walk" become reserved and should not occur. Signed-off-by: Julien Thierry Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c0ca7262088ebab67452a39f27979d3faa4762f0 Author: Doug Berger Date: Mon Sep 18 18:00:00 2017 -0700 irqchip/brcmstb-l2: Add support for the BCM7271 L2 controller Add the initialization of the generic irq chip for the BCM7271 L2 interrupt controller. This controller only supports level interrupts and uses the "brcm,bcm7271-l2-intc" compatibility string. Acked-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: Doug Berger Signed-off-by: Marc Zyngier .../bindings/interrupt-controller/brcm,l2-intc.txt | 3 +- drivers/irqchip/irq-brcmstb-l2.c | 86 ++++++++++++++++------ 2 files changed, 66 insertions(+), 23 deletions(-) commit 8480ca477e916e748c908a19e88d0c52a8f4d8fa Author: Doug Berger Date: Mon Sep 18 17:59:59 2017 -0700 irqchip/brcmstb-l2: Abstract register accesses Added register block offsets to the brcmstb_l2_intc_data structure for the status and mask registers to support reading the active interupts in an abstracted way. It seems like an irq_chip method should have been provided for this, but it's not there yet. Abstracted the implementation of the handler, suspend, and resume functions to not use any hard coded register offsets. Reviewed-by: Florian Fainelli Signed-off-by: Doug Berger Signed-off-by: Marc Zyngier drivers/irqchip/irq-brcmstb-l2.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) commit 49aa6ef0b43912ead9cc5525dca182534d1d6676 Author: Doug Berger Date: Mon Sep 18 17:59:58 2017 -0700 irqchip/brcmstb-l2: Remove some processing from the handler Saving the generic chip pointer in the brcmstb_l2_intc_data prevents the need to call irq_get_domain_generic_chip(). Also don't need to save parent_irq and base there since local variables in the brcmstb_l2_intc_of_init() function are just as good. The handle_edge_irq flow or chained_irq_enter takes care of the acknowledgment of the interrupt so it is redundant to clear it in brcmstb_l2_intc_irq_handle(). irq_linear_revmap() is a fast path equivalent of irq_find_mapping() that is appropriate to use for domain controllers of this type. Defining irq_mask_ack is slightly more efficient than just implementing irq_mask and irq_ack separately. Reviewed-by: Florian Fainelli Signed-off-by: Doug Berger Signed-off-by: Marc Zyngier drivers/irqchip/irq-brcmstb-l2.c | 72 ++++++++++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 24 deletions(-) commit 42a5968c0ae8f19906e16fa34ea9bdb6f5095166 Author: Geert Uytterhoeven Date: Wed Oct 4 14:17:58 2017 +0200 irqchip/renesas-intc-irqpin: Use of_device_get_match_data() helper Use the of_device_get_match_data() helper instead of open coding. Acked-by: Simon Horman Acked-by: Rob Herring Signed-off-by: Geert Uytterhoeven Signed-off-by: Marc Zyngier drivers/irqchip/irq-renesas-intc-irqpin.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit bea173e5acd73d536dd234b34328cd52c1cadaab Author: Geert Uytterhoeven Date: Fri Oct 6 13:51:32 2017 +0200 dt-bindings: irqchip: renesas-irqc: Document R-Car M3-W, V3M, D3 support Document support for the Interrupt Controller for Externel Devices (INTC-EX) in the Renesas M3-W (r8a7796), V3M (r8a77970), and D3 (r8a77995) SoCs. No driver update is needed. Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven Signed-off-by: Marc Zyngier .../devicetree/bindings/interrupt-controller/renesas,irqc.txt | 3 +++ 1 file changed, 3 insertions(+) commit 06e733e41f87d75a60347b0c93a18fc0104d709d Author: Lucas Stach Date: Wed Oct 18 19:22:40 2017 +0200 drm/panel: simple: add Toshiba LT089AC19000 Only exposes a single mode and not a complete display timing, as the datasheet is rather vague about the minimum/maximum values. Signed-off-by: Lucas Stach Acked-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20171018172240.8772-1-l.stach@pengutronix.de .../display/panel/toshiba,lt089ac29000.txt | 8 +++++++ drivers/gpu/drm/panel/panel-simple.c | 27 ++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit 33dfb1e18d534c4b7509de2a68ef1baf83d9710f Author: Hans Verkuil Date: Mon Sep 11 14:29:50 2017 +0200 ARM: tegra: Enable CEC support on Jetson TK1 Enable the CEC controller on Jetson TK1 so that it can be used to communicate with CEC devices via the HDMI connector. Signed-off-by: Hans Verkuil Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124-jetson-tk1.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 7f2b7ceeb40972030a426b7cb22115b4c82281cd Author: Hans Verkuil Date: Mon Sep 11 14:29:50 2017 +0200 ARM: tegra: Add CEC support for Tegra124 Add support for the Tegra CEC IP to the Tegra124 DTSI and link it to the HDMI controller via phandle. Signed-off-by: Hans Verkuil Signed-off-by: Thierry Reding arch/arm/boot/dts/tegra124.dtsi | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit d6d9c2a3eac279d0bf406573706b7e7cf9d7fdda Author: Vivek Gautam Date: Wed Jul 19 17:59:06 2017 +0200 usb: dwc3: of-simple: Re-order resource handling in remove Move clock handling after of_platform_depopulate to achieve a sequence that is reverse of the probe sequence. Cc: Felipe Balbi Signed-off-by: Vivek Gautam Signed-off-by: Felipe Balbi drivers/usb/dwc3/dwc3-of-simple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d03cc2d8aed3bfbdfc1f52e79054e0013b5721ca Author: Masahiro Yamada Date: Fri Sep 22 21:20:41 2017 +0900 irqdomain: Add __rcu annotations to radix tree slot Fix different address spaces warning of sparse. kernel/irq/irqdomain.c:1463:14: warning: incorrect type in assignment (different address spaces) kernel/irq/irqdomain.c:1463:14: expected void **slot kernel/irq/irqdomain.c:1463:14: got void [noderef] ** kernel/irq/irqdomain.c:1465:66: warning: incorrect type in argument 2 (different address spaces) kernel/irq/irqdomain.c:1465:66: expected void [noderef] **slot kernel/irq/irqdomain.c:1465:66: got void **slot Signed-off-by: Masahiro Yamada Signed-off-by: Marc Zyngier kernel/irq/irqdomain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f1d783585486c7c612f277c2a6f0c9bb5a67e463 Author: Masahiro Yamada Date: Thu Oct 5 10:44:54 2017 +0900 irqdomain: Move revmap_trees_mutex to struct irq_domain The revmap_trees_mutex protects domain->revmap_tree. There is no need to make it global because it is allowed to modify revmap_tree of two different domains concurrently. Having said that, this would not be a actual bottleneck because the interrupt map/unmap does not occur quite often. Rather, the motivation is to tidy up the code from a data structure point of view. Signed-off-by: Masahiro Yamada Signed-off-by: Marc Zyngier include/linux/irqdomain.h | 2 ++ kernel/irq/irqdomain.c | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) commit 86f36b9c6c6cda28c86ead09323f55018e5e64df Author: Israel Rukshin Date: Wed Oct 18 12:38:26 2017 +0000 nvme-loop: Add BLK_MQ_F_NO_SCHED flag to admin tag set This flag is useful for admin queues that aren't used for normal IO. Signed-off-by: Israel Rukshin Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/target/loop.c | 1 + 1 file changed, 1 insertion(+) commit 5a22e2bf44fb311e5a6bfec6ed5680199d6e162a Author: Israel Rukshin Date: Wed Oct 18 12:38:25 2017 +0000 nvme-fc: Add BLK_MQ_F_NO_SCHED flag to admin tag set Since commit b86dd81 "block: get rid of blk-mq default scheduler choice Kconfig entries", when setting nr_hw_queues to 1 the admin tag set uses mq-deadline scheduler. This flag is useful for admin queues that aren't used for normal IO. Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Reviewed-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 1 + 1 file changed, 1 insertion(+) commit 94f29d4f7808e3a495fda8c5d337fc4ac4037ce7 Author: Israel Rukshin Date: Wed Oct 18 12:38:24 2017 +0000 nvme-rdma: Add BLK_MQ_F_NO_SCHED flag to admin tag set Since commit b86dd81 "block: get rid of blk-mq default scheduler choice Kconfig entries", when setting nr_hw_queues to 1 the admin tag set uses mq-deadline scheduler. This flag is useful for admin queues that aren't used for normal IO. Signed-off-by: Israel Rukshin Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 1 + 1 file changed, 1 insertion(+) commit 16772ae6d9221b065607335a9b279375d8d3e2fd Author: Minwoo Im Date: Wed Oct 18 22:56:09 2017 +0900 nvme-pci: fix typos in comments fixed comment typos in adapter_alloc_cq() and adapter_alloc_sq(). 'the the' duplications are replaced with 'that the'. Signed-off-by: Minwoo Im Signed-off-by: Christoph Hellwig drivers/nvme/host/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a8e9b186f153a44690ad0363a56716e7077ad28c Author: Gustavo A. R. Silva Date: Mon Oct 16 12:40:29 2017 -0500 EDAC, sb_edac: Fix missing break in switch Add missing break statement in order to prevent the code from falling through. Signed-off-by: Gustavo A. R. Silva Cc: Qiuxu Zhuo Cc: linux-edac Link: http://lkml.kernel.org/r/20171016174029.GA19757@embeddedor.com Signed-off-by: Borislav Petkov drivers/edac/sb_edac.c | 1 + 1 file changed, 1 insertion(+) commit 7339605aa1b5fc551eb23a9563b8b84ba33632f0 Author: Jan Glauber Date: Thu Oct 19 08:41:29 2017 +0200 MAINTAINERS: Split Cavium EDAC entry and add myself Split the Cavium EDAC entry into MIPS and ARM drivers because they have different maintainers and mailing lists. Add myself as additional maintainer to the ThunderX driver. Signed-off-by: Jan Glauber Cc: David Daney Cc: Ralf Baechle Cc: Sergey Temerkhanov Cc: linux-edac Link: http://lkml.kernel.org/r/20171019064129.5064-1-jglauber@cavium.com Signed-off-by: Borislav Petkov MAINTAINERS | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit a9e6753c1c92ae7d2c0c99b420c5c7dd5ebfc37d Author: Tuomas Tynkkynen Date: Wed Oct 18 17:46:20 2017 +0300 arm64: defconfig: Enable Tegra PCI controller The driver has supported the 64-bit Tegra210 for a while now, so enable it in the defconfig. Signed-off-by: Tuomas Tynkkynen Signed-off-by: Thierry Reding arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit ff0f2ce71c200927dcc1d5626079533fafd85b2b Author: Phil Reid Date: Fri Oct 6 13:08:07 2017 +0800 gpio: mcp23s08: add support for mcp23018 This adds the required definitions for the mcp23018 which is the i2c variant of the mcp23s18. Signed-off-by: Phil Reid Reviewed-by: Sebastian Reichel Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-mcp23s08.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 885e89f601a52cc6fb025b009df58ba83d142734 Author: Jason Gerecke Date: Wed Oct 18 08:27:13 2017 -0700 HID: wacom: generic: Recognize WACOM_HID_WD_PEN as a type of pen collection The WACOM_PEN_FIELD macro is used to determine if a given HID field should be associated with pen input. This field includes several known collection types that Wacom pen data is contained in, but the WACOM_HID_WD_PEN application collection type is notably missing. This can result in fields within this kind of collection being completely ignored by the `wacom_usage_mapping` function, preventing the later '*_event' functions from being notified about changes to their value. Fixes: c9c095874a ("HID: wacom: generic: Support and use 'Custom HID' mode and usages") Fixes: ac2423c975 ("HID: wacom: generic: add vendor defined touch") Cc: stable@vger.kernel.org Reviewed-by: Ping Cheng Reviewed-by: Benjamin Tissoires Signed-off-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.h | 1 + 1 file changed, 1 insertion(+) commit 350bdb84fda89270703907fb4c4fb482e1edbc31 Author: Linus Walleij Date: Tue Oct 17 11:46:09 2017 +0200 blackfin: Fix local includes When making the pin control submenu globally visible, all kinds of oddities appear, in blackfin a few files were #including and relying on that to pull in . This was not working when pin control but not GPIOLIB was selected resulting in a breakage in allmodconfig. The code these files were using was still there and defined in just not pulle in from just including Simply add the required includes explicitly in the blackfin kernel core and everything compiles fine. Delete the use of the incorrect where possible. Add stubs to for the functions called from PM: these should probably also depend on !PINCTRL but since the global CONFIG_PM symbol is used to compile PM support, we need some more intrusive thing here, to be tested by Blackfin maintainers. Cc: Steven Miao Cc: Huanhuan Feng Signed-off-by: Linus Walleij arch/blackfin/include/asm/gpio.h | 20 ++++++++++++++++++++ arch/blackfin/kernel/bfin_gpio.c | 3 +++ arch/blackfin/kernel/debug-mmrs.c | 2 +- arch/blackfin/mach-common/ints-priority.c | 2 +- arch/blackfin/mach-common/pm.c | 2 +- 5 files changed, 26 insertions(+), 3 deletions(-) commit 1c363531dd814dc4fe10865722bf6b0f72ce4673 Author: Linus Walleij Date: Wed Oct 11 11:57:15 2017 +0200 pinctrl: adi2: Fix Kconfig build problem The build robot is complaining on Blackfin: drivers/pinctrl/pinctrl-adi2.c: In function 'port_setup': >> drivers/pinctrl/pinctrl-adi2.c:221:21: error: dereferencing pointer to incomplete type 'struct gpio_port_t' writew(readw(®s->port_fer) & ~BIT(offset), ^~ drivers/pinctrl/pinctrl-adi2.c: In function 'adi_gpio_ack_irq': >> drivers/pinctrl/pinctrl-adi2.c:266:18: error: dereferencing pointer to incomplete type 'struct bfin_pint_regs' if (readl(®s->invert_set) & pintbit) ^~ It seems the driver need to include and to compile. The Blackfin architecture was re-defining the Kconfig PINCTRL symbol which is not OK, so replaced this with PINCTRL_BLACKFIN_ADI2 which selects PINCTRL and PINCTRL_ADI2 just like most arches do. Further, the old GPIO driver symbol GPIO_ADI was possible to select at the same time as selecting PINCTRL. This was not working because the arch-local header contains an explicit #ifndef PINCTRL clause making compilation break if you combine them. The same is true for DEBUG_MMRS. Make sure the ADI2 pinctrl driver is not selected at the same time as the old GPIO implementation. (This should be converted to use gpiolib or pincontrol and move to drivers/...) Also make sure the old GPIO_ADI driver or DEBUG_MMRS is not selected at the same time as the new PINCTRL implementation, and only make PINCTRL_ADI2 selectable for the Blackfin families that actually have it. This way it is still possible to add e.g. I2C-based pin control expanders on the Blackfin. Cc: Steven Miao Cc: Huanhuan Feng Signed-off-by: Linus Walleij arch/blackfin/Kconfig | 7 +++++-- arch/blackfin/Kconfig.debug | 1 + drivers/pinctrl/Kconfig | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) commit af026796054fb70439e919a925615e61b500ef6b Author: Joe Lawrence Date: Fri Oct 13 15:08:43 2017 -0400 livepatch: add transition notices Log a few kernel debug messages at the beginning of the following livepatch transition functions: klp_complete_transition() klp_cancel_transition() klp_init_transition() klp_reverse_transition() Also update the log notice message in klp_start_transition() for similar verbiage as the above messages. Suggested-by: Josh Poimboeuf Signed-off-by: Joe Lawrence Acked-by: Miroslav Benes Acked-by: Josh Poimboeuf Signed-off-by: Jiri Kosina kernel/livepatch/transition.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 6116c3033a761611b1da980ea664c6ddff3eaed6 Author: Joe Lawrence Date: Fri Oct 13 15:08:42 2017 -0400 livepatch: move transition "complete" notice into klp_complete_transition() klp_complete_transition() performs a bit of housework before a transition to KLP_PATCHED or KLP_UNPATCHED is actually completed (including post-(un)patch callbacks). To be consistent, move the transition "complete" kernel log notice out of klp_try_complete_transition() and into klp_complete_transition(). Suggested-by: Josh Poimboeuf Acked-by: Josh Poimboeuf Signed-off-by: Joe Lawrence Acked-by: Miroslav Benes Reviewed-by: Petr Mladek Signed-off-by: Jiri Kosina kernel/livepatch/transition.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 93862e385ded7c60351e09fcd2a541d273650905 Author: Joe Lawrence Date: Fri Oct 13 15:08:41 2017 -0400 livepatch: add (un)patch callbacks Provide livepatch modules a klp_object (un)patching notification mechanism. Pre and post-(un)patch callbacks allow livepatch modules to setup or synchronize changes that would be difficult to support in only patched-or-unpatched code contexts. Callbacks can be registered for target module or vmlinux klp_objects, but each implementation is klp_object specific. - Pre-(un)patch callbacks run before any (un)patching transition starts. - Post-(un)patch callbacks run once an object has been (un)patched and the klp_patch fully transitioned to its target state. Example use cases include modification of global data and registration of newly available services/handlers. See Documentation/livepatch/callbacks.txt for details and samples/livepatch/ for examples. Signed-off-by: Joe Lawrence Acked-by: Josh Poimboeuf Acked-by: Miroslav Benes Signed-off-by: Jiri Kosina Documentation/livepatch/callbacks.txt | 605 ++++++++++++++++++++++++ include/linux/livepatch.h | 26 + kernel/livepatch/core.c | 51 +- kernel/livepatch/core.h | 38 ++ kernel/livepatch/patch.c | 1 + kernel/livepatch/transition.c | 21 +- samples/livepatch/Makefile | 3 + samples/livepatch/livepatch-callbacks-busymod.c | 72 +++ samples/livepatch/livepatch-callbacks-demo.c | 234 +++++++++ samples/livepatch/livepatch-callbacks-mod.c | 53 +++ 10 files changed, 1091 insertions(+), 13 deletions(-) commit ef14a4bf0910d06c7e202552914028d4956809cb Author: Andrew Duggan Date: Tue Oct 17 18:37:36 2017 -0700 HID: rmi: Check that a device is a RMI device before calling RMI functions The hid-rmi driver may handle non rmi devices on composite USB devices. Callbacks need to make sure that the current device is a RMI device before calling RMI specific functions. Most callbacks already have this check, but this patch adds checks to the remaining callbacks. Reported-by: Hendrik Langer Tested-by: Hendrik Langer Reviewed-by: Benjamin Tissoires Signed-off-by: Andrew Duggan Signed-off-by: Jiri Kosina drivers/hid/hid-rmi.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit e0d63c4083852e07655dfcda1320504c304218be Author: Biju Das Date: Fri Oct 6 17:49:34 2017 +0100 usb: renesas_usbhs: Add compatible string for r8a7743/5 This patch adds support for r8a7743/5 SoCs. The Renesas RZ/G1[ME] (R8A7743/5) usbhs is identical to the R-Car Gen2 family. No driver change is needed due to the fallback compatible value "renesas,rcar-gen2-usbhs". Adding the SoC-specific compatible values here has two purposes: 1. Document which SoCs have this hardware module, 2. Allow checkpatch to validate compatible values. Acked-by: Rob Herring Acked-by: Simon Horman Signed-off-by: Biju Das Signed-off-by: Chris Paterson Reviewed-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b11633c42a766cb3c824e3583163b9adf67501fe Author: Dinh Nguyen Date: Mon Oct 16 08:57:18 2017 -0500 usb: dwc2: disable erroneous overcurrent condition For the case where an external VBUS is used, we should enable the external VBUS comparator in the driver. This would prevent an unnecessary overcurrent error which would then disable the host port. This patch uses the standard 'disable-over-current' binding to allow of the option of disabling the over-current condition. Reviewed-by: Marek Vasut Signed-off-by: Dinh Nguyen Signed-off-by: Felipe Balbi drivers/usb/dwc2/core.h | 4 ++++ drivers/usb/dwc2/hcd.c | 5 +++++ drivers/usb/dwc2/params.c | 3 +++ 3 files changed, 12 insertions(+) commit 32428aa22d08a1be660b571a0f71880e5a9dd926 Author: Chunfeng Yun Date: Fri Oct 13 17:10:49 2017 +0800 dt-bindings: usb: mtu3: remove optional pinctrls Remove optional pinctrls due to using FORCE/RG_IDDIG to implement manual switch function. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit fc3a41aa696ca588cde95ae348bce999bf08f234 Author: Chunfeng Yun Date: Fri Oct 13 17:10:48 2017 +0800 dt-bindings: usb: mtu3: remove dummy clocks and add optional ones Remove dummy clocks for usb wakeup and add optional ones for mcu_bus and dma_bus bus. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 85a299d52766a60d3a1ce0dc168646656060fc89 Author: Chunfeng Yun Date: Fri Oct 13 17:10:47 2017 +0800 dt-bindings: usb: mtu3: add a optional property to disable u3ports Add a new optional property to disable u3ports Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 2 ++ 1 file changed, 2 insertions(+) commit 4da72e6d2afb24c9cd5707eef7947c2f22dd03fc Author: Chunfeng Yun Date: Fri Oct 13 17:10:46 2017 +0800 usb: mtu3: set otg_sel for u2port only if works as dual-role mode When set otg_sel(SSUSB_U2_PORT_OTG_SEL) for u2port which supports dual-role mode, the controller will automatically switch mode between host and device according to IDDIG signal. But if the u2port only supports device mode, and no IDDIG pin is provided, setting otg_sel may cause failure of detection by host. So set it only for dual-role mode. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi drivers/usb/mtu3/mtu3_core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit dd9d2f3aa3f8908fc3133041ccba45792549f25c Author: Chunfeng Yun Date: Fri Oct 13 17:10:45 2017 +0800 usb: mtu3: set invalid dr_mode as dual-role mode Treat dr_mode of USB_DR_MODE_UNKNOWN as USB_DR_MODE_OTG to enhance functional robustness. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi drivers/usb/mtu3/mtu3_plat.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 6638ec515f2cce73ba996a725fe351fd643e27c8 Author: Chunfeng Yun Date: Fri Oct 13 17:10:44 2017 +0800 usb: mtu3: get optional vbus for host only mode When dr_mode is set as USB_DR_MODE_HOST, it's better to try to get optional vbus, this can increase flexibility, although we can set vbus as always on for regulator or put it in host driver to turn it on. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi drivers/usb/mtu3/mtu3_plat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4d79e042ed8b45e01bcec90de6b0c79c6c29d2b5 Author: Chunfeng Yun Date: Fri Oct 13 17:10:43 2017 +0800 usb: mtu3: add support for usb3.1 IP Support SuperSpeedPlus for usb3.1 device IP Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi drivers/usb/mtu3/mtu3.h | 1 + drivers/usb/mtu3/mtu3_core.c | 14 +++++++++++--- drivers/usb/mtu3/mtu3_gadget.c | 3 ++- drivers/usb/mtu3/mtu3_gadget_ep0.c | 16 ++++++++-------- drivers/usb/mtu3/mtu3_hw_regs.h | 1 + 5 files changed, 23 insertions(+), 12 deletions(-) commit c776f2c3e81308977e95a228b0665e3d5c63dff3 Author: Chunfeng Yun Date: Fri Oct 13 17:10:42 2017 +0800 usb: mtu3: use FORCE/RG_IDDIG to implement manual DRD switch In order to keep manual DRD switch independent on IDDIG interrupt, make use of FORCE/RG_IDDIG instead of IDDIG EINT interrupt to implement manual DRD switch function. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi drivers/usb/mtu3/mtu3.h | 18 ++++++++---- drivers/usb/mtu3/mtu3_dr.c | 61 ++++++++++++++++++++++++++++++----------- drivers/usb/mtu3/mtu3_dr.h | 6 ++++ drivers/usb/mtu3/mtu3_host.c | 5 ++++ drivers/usb/mtu3/mtu3_hw_regs.h | 2 ++ drivers/usb/mtu3/mtu3_plat.c | 38 ++----------------------- 6 files changed, 74 insertions(+), 56 deletions(-) commit 1a46dfea0841d5ebc08fafe7b3f60d33581f8e27 Author: Chunfeng Yun Date: Fri Oct 13 17:10:41 2017 +0800 usb: mtu3: support 36-bit DMA address add support for 36-bit DMA address [ Felipe Balbi: fix printk format for dma_addr_t ] Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi drivers/usb/mtu3/mtu3.h | 17 ++++++- drivers/usb/mtu3/mtu3_core.c | 34 +++++++++++++- drivers/usb/mtu3/mtu3_hw_regs.h | 10 ++++ drivers/usb/mtu3/mtu3_qmu.c | 102 +++++++++++++++++++++++++++++++++------- 4 files changed, 142 insertions(+), 21 deletions(-) commit a316da82f8d2b9823a2292a7bf84e029fdb3de08 Author: Chunfeng Yun Date: Fri Oct 13 17:10:40 2017 +0800 usb: mtu3: add optional mcu and dma bus clocks There are mcu_bus and dma_bus clocks needed to be turned on/off by driver on some SoCs, so add them as optional ones Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi drivers/usb/mtu3/mtu3.h | 5 ++ drivers/usb/mtu3/mtu3_plat.c | 121 +++++++++++++++++++++++++++++-------------- 2 files changed, 86 insertions(+), 40 deletions(-) commit d90223ac2aa7a71dcbdcbf075ac2c3bd59245f0a Author: Chunfeng Yun Date: Fri Oct 13 17:10:39 2017 +0800 usb: mtu3: remove dummy wakeup debounce clocks The wakeup debounce clocks for each ports in fact are not needed, so remove them. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi drivers/usb/mtu3/mtu3.h | 4 ---- drivers/usb/mtu3/mtu3_host.c | 57 ++++---------------------------------------- 2 files changed, 4 insertions(+), 57 deletions(-) commit 076f1a8903d5dadf224f17be63a25bd75d860659 Author: Chunfeng Yun Date: Fri Oct 13 17:10:38 2017 +0800 usb: mtu3: support option to disable usb3 ports Add support to disable specific usb3 ports, it's useful when usb3 phy is shared with PCIe or SATA, because we should disable the corresponding usb3 port if the phy is used by PCIe or SATA. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi drivers/usb/mtu3/mtu3.h | 3 +++ drivers/usb/mtu3/mtu3_host.c | 16 +++++++++++++--- drivers/usb/mtu3/mtu3_plat.c | 8 ++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) commit c162ff0aaaac456ef29aebd1e9d4d3e305cd3279 Author: Chunfeng Yun Date: Fri Oct 13 17:10:37 2017 +0800 usb: mtu3: fix error return code in ssusb_gadget_init() When failing to get IRQ number, platform_get_irq() may return -EPROBE_DEFER, but we ignore it and always return -ENODEV, so fix it. Signed-off-by: Chunfeng Yun Signed-off-by: Felipe Balbi drivers/usb/mtu3/mtu3_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 86763723eee87bfe561cdabae2dd1c2e97933bd8 Author: Christos Gkekas Date: Sat Oct 14 12:44:11 2017 +0100 usb: dwc3: ep0: Clean up unused variables Many variables in ep0 are set but never used, so should be removed. Signed-off-by: Christos Gkekas Signed-off-by: Felipe Balbi drivers/usb/dwc3/ep0.c | 20 -------------------- 1 file changed, 20 deletions(-) commit d8fae8b936824b3ffe55a0408b84022244603a32 Author: Amelie Delaunay Date: Thu Aug 17 11:33:01 2017 +0200 usb: dwc2: add support for STM32F7xx USB OTG HS This patch adds the dwc2_set_params function for STM32F7xx USB OTG HS. Signed-off-by: Amelie Delaunay Signed-off-by: Felipe Balbi drivers/usb/dwc2/params.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 000777dadc7e22d3656bc9f30dde2ba40d069a2f Author: Amelie Delaunay Date: Thu Aug 17 11:33:00 2017 +0200 dt-bindings: usb: Document the STM32F7xx DWC2 USB OTG HS core binding This patch adds binding documentation for DWC2 controller in HS mode found on STMicroelectronics STM32F7xx SoC. Signed-off-by: Amelie Delaunay Signed-off-by: Felipe Balbi Documentation/devicetree/bindings/usb/dwc2.txt | 2 ++ 1 file changed, 2 insertions(+) commit 87e981d51a85005b2793d8745e8671765a5a2b6b Author: Bhumika Goyal Date: Wed Sep 27 22:57:07 2017 +0530 usb: gadget: f_uvc: make uvc_v4l2_fops const Make this const as it is only stored in the const field of a structure video_device in the file referencing it. Make the declaration const too. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Felipe Balbi drivers/usb/gadget/function/uvc_v4l2.c | 2 +- drivers/usb/gadget/function/uvc_v4l2.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ca02a5af650cf3addb004196c2ab713b020445ef Author: Geert Uytterhoeven Date: Wed Oct 4 14:23:31 2017 +0200 usb: gadget: udc: renesas_usb3: Use of_device_get_match_data() helper Use the of_device_get_match_data() helper instead of open coding, postponing the matching until when it's really needed. Note that the renesas_usb3 driver is used with DT only, so there's always a valid match. Reviewed-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Signed-off-by: Geert Uytterhoeven Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/renesas_usb3.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit b61e47b44882f6e578ef7c14197ea90a2703b5a0 Author: Geert Uytterhoeven Date: Wed Oct 4 14:26:48 2017 +0200 usb: renesas_usbhs: Use of_device_get_match_data() helper Use the of_device_get_match_data() helper instead of open coding. Reviewed-by: Simon Horman Reviewed-by: Yoshihiro Shimoda Signed-off-by: Geert Uytterhoeven Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 279d4bc6406022461713cd6a3e5411336d2ff26b Author: Yoshihiro Shimoda Date: Fri Sep 29 20:45:01 2017 +0900 usb: gadget: udc: renesas_usb3: add support for generic phy This patch adds support for generic phy as an optional. If you want to use a generic phy (e.g. phy-rcar-gen3-usb3 driver) on this driver, you have to do "insmod phy-rcar-gen3-usb3.ko" first for now. Acked-by: Rob Herring Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi .../devicetree/bindings/usb/renesas_usb3.txt | 4 ++++ drivers/usb/gadget/udc/renesas_usb3.c | 26 ++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) commit 90d588642a7ff598533f68c2f56ee64657a40186 Author: Yoshihiro Shimoda Date: Fri Sep 29 20:45:00 2017 +0900 usb: gadget: udc: renesas_usb3: Add suspend/resume functions This patch adds support suspend/resume functions Signed-off-by: Kazuya Mizuguchi [shimoda: add the commit log] Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/renesas_usb3.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit cf06df3fae286b795c1abf59c4b493ebf30a7a9f Author: Kazuya Mizuguchi Date: Fri Sep 29 20:44:59 2017 +0900 usb: gadget: udc: renesas_usb3: move pm_runtime_{en,dis}able() This patch moves pm_runtime_{en,dis}able() call timing to renesas_usb3_{probe,remove}() for supporting PM_SLEEP feature in the future. Signed-off-by: Kazuya Mizuguchi [shimoda: Revise the commit log] Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/renesas_usb3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0f38672c629b79fa2b929d2c391bc063a08279eb Author: Yoshihiro Shimoda Date: Tue Oct 3 20:09:14 2017 +0900 usb: renesas_usbhs: add support for R-Car D3 This patch adds support for R-Car D3. This SoC needs to release the PLL reset by the UGCTRL register. So, since this is not the same as other R-Car Gen3 SoCs, this patch adds a new type as "USBHS_TYPE_RCAR_GEN3_WITH_PLL". Acked-by: Rob Herring Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi .../devicetree/bindings/usb/renesas_usbhs.txt | 1 + drivers/usb/renesas_usbhs/common.c | 10 ++++- drivers/usb/renesas_usbhs/rcar3.c | 48 ++++++++++++++++++++++ drivers/usb/renesas_usbhs/rcar3.h | 1 + include/linux/usb/renesas_usbhs.h | 5 ++- 5 files changed, 62 insertions(+), 3 deletions(-) commit a877b8e553fd2808e8693c75e0d945f413ccf5b6 Author: Yoshihiro Shimoda Date: Tue Oct 3 20:09:13 2017 +0900 usb: renesas_usbhs: unify Gen2/3 pipe_config setting This patch unifies the Gen2 and Gen3 pipe_config setting on usbhs_parse_dt(). Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi drivers/usb/renesas_usbhs/common.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit e93650994a955f8cd966916c4e980e822123d07a Author: Li Jun Date: Mon Sep 4 23:14:02 2017 +0800 usb: phy: mxs: add usb charger type detection mxs phy has data pin contact and usb charger detector blocks which can be controlled by software to detect charger type for SDP, CDP and DCP. Reviewed-by: Baolin Wang Signed-off-by: Li Jun Signed-off-by: Felipe Balbi drivers/usb/phy/phy-mxs-usb.c | 154 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) commit 7fdca766499b1d361689ca9402543c027c6a1e87 Author: Felipe Balbi Date: Tue Sep 5 14:41:34 2017 +0300 usb: dwc3: gadget: simplify __dwc3_gadget_kick_transfer() prototype Now that all the information we need sits in struct dwc3_ep, we can start taking only a pointer to struct dwc3_ep as an argument. This allows us to clean the code up a bit. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) commit 502a37b98a7bd45a198139e52671833469720c38 Author: Felipe Balbi Date: Tue Sep 5 14:36:13 2017 +0300 usb: dwc3: gadget: cache frame number in struct dwc3_ep This is in preparation to simplifying prototype of __dwc3_gadget_kick_transfer(). Signed-off-by: Felipe Balbi drivers/usb/dwc3/core.h | 2 ++ drivers/usb/dwc3/gadget.c | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) commit 64e01080299784692ff291099cd8a5ee72e66d98 Author: Felipe Balbi Date: Tue Sep 5 14:32:55 2017 +0300 usb: dwc3: gadget: simplify __dwc3_gadget_ep_queue() There is more possibility for sharing code if we just realise that now __dwc3_gadget_kic_transfer() knows to break out early if there are no TRBs left. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) commit ccb94ebf9e65ca722c98df3885c2e3dfe832260c Author: Felipe Balbi Date: Tue Sep 5 14:28:46 2017 +0300 usb: dwc3: gadget: check for lack of TRBs a bit earlier This will let us call __dwc3_gadget_kick_transfer() unconditionally. No functional changes, cleanup only. Signed-off-by: Felipe Balbi drivers/usb/dwc3/gadget.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f9c5d1dbda8ee8757a987a55d6cf21b4eb443548 Author: Lucas Stach Date: Fri Aug 18 18:32:02 2017 +0200 usb: phy: phy-generic: propagate clk_get error if clock is required If the clock handle is given in the DT, it means the clock is required for proper operation of the PHY. In that case a failure to obtain the clock must be propagated to stop the driver from probing. This fixes working with clocks, which request probe deferral. Signed-off-by: Lucas Stach Signed-off-by: Felipe Balbi drivers/usb/phy/phy-generic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit bbb1cc050890dad2ad8747a23b9f22a53e726c9a Author: Jonathan Corbet Date: Thu Aug 24 16:13:18 2017 -0600 usb: gadget: Add kerneldoc for some neglected structure fields A couple of structures in have incomplete kerneldoc comments, leading to these warnings in the docs build: ./include/linux/usb/gadget.h:230: warning: No description found for parameter 'claimed' ./include/linux/usb/gadget.h:230: warning: No description found for parameter 'enabled' ./include/linux/usb/gadget.h:412: warning: No description found for parameter 'quirk_altset_not_supp' ./include/linux/usb/gadget.h:412: warning: No description found for parameter 'quirk_stall_not_supp' ./include/linux/usb/gadget.h:412: warning: No description found for parameter 'quirk_zlp_not_supp' Document those fields to make the warnings go away. Signed-off-by: Jonathan Corbet Signed-off-by: Felipe Balbi include/linux/usb/gadget.h | 5 +++++ 1 file changed, 5 insertions(+) commit 5cdda5117e125e0dbb020425cc55a4c143c6febc Author: Borislav Petkov Date: Wed Oct 18 17:24:28 2017 +0200 locking/static_keys: Improve uninitialized key warning Right now it says: static_key_disable_cpuslocked used before call to jump_label_init ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at kernel/jump_label.c:161 static_key_disable_cpuslocked+0x68/0x70 Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 4.14.0-rc5+ #1 Hardware name: SGI.COM C2112-4GP3/X10DRT-P-Series, BIOS 2.0a 05/09/2016 task: ffffffff81c0e480 task.stack: ffffffff81c00000 RIP: 0010:static_key_disable_cpuslocked+0x68/0x70 RSP: 0000:ffffffff81c03ef0 EFLAGS: 00010096 ORIG_RAX: 0000000000000000 RAX: 0000000000000041 RBX: ffffffff81c32680 RCX: ffffffff81c5cbf8 RDX: 0000000000000001 RSI: 0000000000000092 RDI: 0000000000000002 RBP: ffff88807fffd240 R08: 726f666562206465 R09: 0000000000000136 R10: 0000000000000000 R11: 696e695f6c656261 R12: ffffffff82158900 R13: ffffffff8215f760 R14: 0000000000000001 R15: 0000000000000008 FS: 0000000000000000(0000) GS:ffff883f7f400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff88807ffff000 CR3: 0000000001c09000 CR4: 00000000000606b0 Call Trace: static_key_disable+0x16/0x20 start_kernel+0x15a/0x45d ? load_ucode_intel_bsp+0x11/0x2d secondary_startup_64+0xa5/0xb0 Code: 48 c7 c7 a0 15 cf 81 e9 47 53 4b 00 48 89 df e8 5f fc ff ff eb e8 48 c7 c6 \ c0 97 83 81 48 c7 c7 d0 ff a2 81 31 c0 e8 c5 9d f5 ff <0f> ff eb a7 0f ff eb \ b0 e8 eb a2 4b 00 53 48 89 fb e8 42 0e f0 but it doesn't tell me which key it is. So dump the key's name too: static_key_disable_cpuslocked(): static key 'virt_spin_lock_key' used before call to jump_label_init() And that makes pinpointing which key is causing that a lot easier. include/linux/jump_label.h | 14 +++++++------- include/linux/jump_label_ratelimit.h | 6 +++--- kernel/jump_label.c | 14 +++++++------- 3 files changed, 17 insertions(+), 17 deletions(-) Signed-off-by: Borislav Petkov Reviewed-by: Steven Rostedt (VMware) Cc: Boris Ostrovsky Cc: Hannes Frederic Sowa Cc: Jason Baron Cc: Juergen Gross Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171018152428.ffjgak4o25f7ept6@pd.tnic Signed-off-by: Ingo Molnar include/linux/jump_label.h | 14 +++++++------- include/linux/jump_label_ratelimit.h | 6 +++--- kernel/jump_label.c | 14 +++++++------- 3 files changed, 17 insertions(+), 17 deletions(-) commit 31a4d4480c616bf0fa475f1869e5df852d3544bd Author: Paul Mackerras Date: Thu Oct 19 15:14:20 2017 +1100 Revert "KVM: PPC: Book3S HV: POWER9 does not require secondary thread management" This reverts commit 94a04bc25a2c6296bd0c5e82c10e8231c2b11f77. In order to run HPT guests on a radix POWER9 host, we will have to run the host in single-threaded mode, because POWER9 processors do not currently support running some threads of a core in HPT mode while others are in radix mode ("mixed mode"). That means that we will need the same mechanisms that are used on POWER8 to make the secondary threads available to KVM, which were disabled on POWER9 by commit 94a04bc25a2c. Signed-off-by: Paul Mackerras Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kvm_book3s_asm.h | 4 ---- arch/powerpc/kernel/idle_book3s.S | 35 ++++++++++--------------------- arch/powerpc/kvm/book3s_hv.c | 13 +----------- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 8 ------- 4 files changed, 12 insertions(+), 48 deletions(-) commit 235b6003fb28f0dd8e7ed8fbdb088bb548291766 Author: NeilBrown Date: Tue Oct 17 16:18:36 2017 +1100 raid5: Set R5_Expanded on parity devices as well as data. When reshaping a fully degraded raid5/raid6 to a larger nubmer of devices, the new device(s) are not in-sync and so that can make the newly grown stripe appear to be "failed". To avoid this, we set the R5_Expanded flag to say "Even though this device is not fully in-sync, this block is safe so don't treat the device as failed for this stripe". This flag is set for data devices, not not for parity devices. Consequently, if you have a RAID6 with two devices that are partly recovered and a spare, and start a reshape to include the spare, then when the reshape gets past the point where the recovery was up to, it will think the stripes are failed and will get into an infinite loop, failing to make progress. So when contructing parity on an EXPAND_READY stripe, set R5_Expanded. Reported-by: Curt Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/raid5.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 790a385607b2d3ce4da5980c5cf988c37beb49e4 Author: Viswas G Date: Wed Oct 18 11:39:15 2017 +0530 scsi: pm80xx: corrected linkrate value. Corrected the value defined for LINKRATE_60 (6 Gig). Signed-off-by: Raj Dinesh Signed-off-by: Viswas G Acked-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm80xx_hwi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b6df110b3d0c12562011fcd032cfb6ff16b6d56 Author: Viswas G Date: Wed Oct 18 11:39:14 2017 +0530 scsi: pm80xx: panic on ncq error cleaning up the read log. when there's an error in 'ncq mode' the host has to read the ncq error log (10h) to clear the error state. however, the ccb that is setup for doing this doesn't setup the ccb so that the previous state is cleared. if the ccb was previously used for an IO n_elems is set and pm8001_ccb_task_free() treats this as the signal to go free a scatter-gather list (that's already been freed). Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Acked-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm80xx_hwi.c | 1 + 1 file changed, 1 insertion(+) commit 869ddbdcae3b4fb83b99889abae31544c149b210 Author: Viswas G Date: Wed Oct 18 11:39:13 2017 +0530 scsi: pm80xx: corrected SATA abort handling sequence. Modified SATA abort handling with following steps: 1) Set device state as recovery. 2) Send phy reset. 3) Wait for reset completion. 4) After successful reset, abort all IO's to the device. 5) After aborting all IO's to device, set device state as operational. Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Acked-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_hwi.c | 8 ++++- drivers/scsi/pm8001/pm8001_sas.c | 77 ++++++++++++++++++++++++++++++++++++++-- drivers/scsi/pm8001/pm8001_sas.h | 8 +++++ drivers/scsi/pm8001/pm80xx_hwi.c | 36 +++++++++++++++---- 4 files changed, 119 insertions(+), 10 deletions(-) commit 61daffdeaa9a091e33b21c615f3d6e4e3a2575d7 Author: Viswas G Date: Wed Oct 18 11:39:12 2017 +0530 scsi: pm80xx: modified port reset timer value for PM8006 card Added port reset timer value as 2000ms for PM8006 sata controller. Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Acked-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm80xx_hwi.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 1db49906d8fa87e0b04ac02417d1e864ce669cf9 Author: Viswas G Date: Wed Oct 18 11:39:11 2017 +0530 scsi: pm80xx: cleanup in pm8001_abort_task function. Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Acked-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_sas.c | 51 ++++++++++------------------------------ 1 file changed, 13 insertions(+), 38 deletions(-) commit 25c6edbde2946a5be57111a701a0f4fd06adf1ae Author: Viswas G Date: Wed Oct 18 11:39:10 2017 +0530 scsi: pm80xx: tag allocation for phy control request. tag is taken from the tag pool instead of using the hardcoded tag value(1). Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Acked-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_hwi.c | 3 +++ drivers/scsi/pm8001/pm80xx_hwi.c | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) commit 6c85e4bcfd7c07ca20c0d8ad1bdde652ef99131f Author: Viswas G Date: Wed Oct 18 11:39:09 2017 +0530 scsi: pm80xx: Different SAS addresses for phys. Different SAS addresses are assigned for each set of phys. Signed-off-by: Viswas G Acked-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_init.c | 13 +++++++++---- drivers/scsi/pm8001/pm80xx_hwi.c | 3 +-- 2 files changed, 10 insertions(+), 6 deletions(-) commit 24fff017e141ff62fc84676ff557705f7635a578 Author: Viswas G Date: Wed Oct 18 11:39:08 2017 +0530 scsi: pm80xx: ILA and inactive firmware version through sysfs Added support to read ILA version and inactive firmware version from MPI configuration table and export through sysfs. Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Acked-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm8001_ctl.c | 54 ++++++++++++++++++++++++++++++++++++++++ drivers/scsi/pm8001/pm8001_sas.h | 2 ++ drivers/scsi/pm8001/pm80xx_hwi.c | 5 ++++ drivers/scsi/pm8001/pm80xx_hwi.h | 2 ++ 4 files changed, 63 insertions(+) commit 5990fd57ebea19f9fbd4f04faf894bac83c62495 Author: Viswas G Date: Wed Oct 18 11:39:07 2017 +0530 scsi: pm80xx: redefine sas_identify_frame structure sas_identify structure defined by pm80xx doesn't have CRC field. So added a new sas_identify structure without CRC. Signed-off-by: Raj Dinesh Signed-off-by: Viswas G Acked-by: Jack Wang Signed-off-by: Martin K. Petersen drivers/scsi/pm8001/pm80xx_hwi.h | 98 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) commit cf3431bba1df3b4f25b04900cb804d7e6e5eb6a9 Author: Hannes Reinecke Date: Tue Oct 17 09:11:24 2017 +0200 scsi: scsi_error: Handle power-on reset unit attention As per SAM there is a status precedence, with any sense code 29/XX taking second place just after an ACA ACTIVE status. Additionally, each target might prefer to not queue any unit attention conditions, but just report one. Due to the above, this will be that one with the highest precedence. This results in the sense code 29/XX effectively overwriting any other unit attention. Hence we should report the power-on reset to userland so that it can take appropriate action. Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_error.c | 6 ++++++ drivers/scsi/scsi_lib.c | 4 ++++ include/scsi/scsi_device.h | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) commit a8bbb2ab4e4fac8ebd2a402d5d81500cbeaaebaf Author: Hannes Reinecke Date: Tue Oct 17 09:10:56 2017 +0200 scsi: scsi_error: Do not retry illegal function error Hitachi USP-V returns 'ILLEGAL FUNCTION' when the internal staging mechanism encountered an error. These errors should not be retried on another path. [mkp: s/invalid/illegal/] Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_error.c | 1 + 1 file changed, 1 insertion(+) commit 909cf3e16a5274fe2127cf3cea5c8dba77b2c412 Author: Kurt Garloff Date: Tue Oct 17 09:10:45 2017 +0200 scsi: scsi_devinfo: Add REPORTLUN2 to EMC SYMMETRIX blacklist entry All EMC SYMMETRIX support REPORT_LUNS, even if configured to report SCSI-2 for whatever reason. Signed-off-by: Kurt Garloff Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_devinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ce2b8ddd84d507c2be8eb687c38fee64fa02fdc Author: Eric Biggers Date: Wed Oct 18 20:21:58 2017 -0400 ext4: switch to fscrypt_prepare_setattr() Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 8990427501a744c1d523a9da6123f60889efaa03 Author: Eric Biggers Date: Wed Oct 18 20:21:58 2017 -0400 ext4: switch to fscrypt_prepare_lookup() Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/namei.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit 07543d164ba79e34c61f0f8aeb4af9cd86c88d2c Author: Eric Biggers Date: Wed Oct 18 20:21:57 2017 -0400 ext4: switch to fscrypt_prepare_rename() Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/namei.c | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) commit 697251816d64572098a2d26791a1c49c3723f5b1 Author: Eric Biggers Date: Wed Oct 18 20:21:57 2017 -0400 ext4: switch to fscrypt_prepare_link() Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/namei.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 09a5c31c919da0a83d3fa9fffaa09cf78cc2d466 Author: Eric Biggers Date: Wed Oct 18 20:21:57 2017 -0400 ext4: switch to fscrypt_file_open() Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/file.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) commit 815dac33b27da9efce0f6008272e69f2a1ba1a33 Author: Eric Biggers Date: Mon Oct 9 12:15:44 2017 -0700 fscrypt: new helper function - fscrypt_prepare_setattr() Introduce a helper function for filesystems to call when processing ->setattr() on a possibly-encrypted inode. It handles enforcing that an encrypted file can only be truncated if its encryption key is available. Acked-by: Dave Chinner Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o include/linux/fscrypt.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 32c3cf028e747d1e9cf0679b16dcbe3794fe4853 Author: Eric Biggers Date: Mon Oct 9 12:15:43 2017 -0700 fscrypt: new helper function - fscrypt_prepare_lookup() Introduce a helper function which prepares to look up the given dentry in the given directory. If the directory is encrypted, it handles loading the directory's encryption key, setting the dentry's ->d_op to fscrypt_d_ops, and setting DCACHE_ENCRYPTED_WITH_KEY if the directory's encryption key is available. Note: once all filesystems switch over to this, we'll be able to move fscrypt_d_ops and fscrypt_set_encrypted_dentry() to fscrypt_private.h. Acked-by: Dave Chinner Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/hooks.c | 18 ++++++++++++++++++ include/linux/fscrypt.h | 28 ++++++++++++++++++++++++++++ include/linux/fscrypt_notsupp.h | 6 ++++++ include/linux/fscrypt_supp.h | 1 + 4 files changed, 53 insertions(+) commit 94b26f3672a0e41025104c7e46943917544e1c87 Author: Eric Biggers Date: Mon Oct 9 12:15:42 2017 -0700 fscrypt: new helper function - fscrypt_prepare_rename() Introduce a helper function which prepares to rename a file into a possibly encrypted directory. It handles loading the encryption keys for the source and target directories if needed, and it handles enforcing that if the target directory (and the source directory for a cross-rename) is encrypted, then the file being moved into the directory has the same encryption policy as its containing directory. Acked-by: Dave Chinner Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/hooks.c | 30 ++++++++++++++++++++++++++++++ include/linux/fscrypt.h | 33 +++++++++++++++++++++++++++++++++ include/linux/fscrypt_notsupp.h | 9 +++++++++ include/linux/fscrypt_supp.h | 5 +++++ 4 files changed, 77 insertions(+) commit 0ea87a9644ebb5c9a3b100585d10533366de3269 Author: Eric Biggers Date: Mon Oct 9 12:15:41 2017 -0700 fscrypt: new helper function - fscrypt_prepare_link() Introduce a helper function which prepares to link an inode into a possibly-encrypted directory. It handles setting up the target directory's encryption key, then verifying that the link won't violate the constraint that all files in an encrypted directory tree use the same encryption policy. Acked-by: Dave Chinner Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/hooks.c | 15 +++++++++++++++ include/linux/fscrypt.h | 27 +++++++++++++++++++++++++++ include/linux/fscrypt_notsupp.h | 6 ++++++ include/linux/fscrypt_supp.h | 1 + 4 files changed, 49 insertions(+) commit efcc7ae2c9172d9a7ae94afdaf066a7abf0b9a90 Author: Eric Biggers Date: Mon Oct 9 12:15:40 2017 -0700 fscrypt: new helper function - fscrypt_file_open() Add a helper function which prepares to open a regular file which may be encrypted. It handles setting up the file's encryption key, then checking that the file's encryption policy matches that of its parent directory (if the parent directory is encrypted). It may be set as the ->open() method or it can be called from another ->open() method. Acked-by: Dave Chinner Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/Makefile | 2 +- fs/crypto/hooks.c | 49 +++++++++++++++++++++++++++++++++++++++++ include/linux/fscrypt_notsupp.h | 9 ++++++++ include/linux/fscrypt_supp.h | 3 +++ 4 files changed, 62 insertions(+), 1 deletion(-) commit d293c3e4e07334d761c88df9d68b3aa800a83dd9 Author: Eric Biggers Date: Mon Oct 9 12:15:39 2017 -0700 fscrypt: new helper function - fscrypt_require_key() Add a helper function which checks if an inode is encrypted, and if so, tries to set up its encryption key. This is a pattern which is duplicated in multiple places in each of ext4, f2fs, and ubifs --- for example, when a regular file is asked to be opened or truncated. Acked-by: Dave Chinner Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o include/linux/fscrypt.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit ffcc41829ae043d0830bcd4536812fec7e098d93 Author: Eric Biggers Date: Mon Oct 9 12:15:38 2017 -0700 fscrypt: remove unneeded empty fscrypt_operations structs In the case where a filesystem has been configured without encryption support, there is no longer any need to initialize ->s_cop at all, since none of the methods are ever called. Reviewed-by: Chao Yu Acked-by: Dave Chinner Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/super.c | 5 ++--- fs/f2fs/super.c | 5 ++--- fs/ubifs/super.c | 7 ++----- 3 files changed, 6 insertions(+), 11 deletions(-) commit f7293e48bb1d0c482cd706deb1256a6be718f4f5 Author: Eric Biggers Date: Mon Oct 9 12:15:37 2017 -0700 fscrypt: remove ->is_encrypted() Now that all callers of fscrypt_operations.is_encrypted() have been switched to IS_ENCRYPTED(), remove ->is_encrypted(). Reviewed-by: Chao Yu Acked-by: Dave Chinner Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/super.c | 2 -- fs/f2fs/super.c | 2 -- fs/ubifs/crypto.c | 1 - fs/ubifs/super.c | 1 - fs/ubifs/ubifs.h | 9 ++------- include/linux/fscrypt.h | 1 - 6 files changed, 2 insertions(+), 14 deletions(-) commit e0428a266d5a29a3c2eec287fcd49be9e8e2468e Author: Eric Biggers Date: Mon Oct 9 12:15:36 2017 -0700 fscrypt: switch from ->is_encrypted() to IS_ENCRYPTED() IS_ENCRYPTED() now gives the same information as i_sb->s_cop->is_encrypted() but is more efficient, since IS_ENCRYPTED() is just a simple flag check. Prepare to remove ->is_encrypted() by switching all callers to IS_ENCRYPTED(). Acked-by: Dave Chinner Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/crypto.c | 2 +- fs/crypto/fname.c | 3 +-- fs/crypto/keyinfo.c | 2 +- fs/crypto/policy.c | 6 +++--- include/linux/fscrypt_notsupp.h | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) commit 2ee6a576be56427209d370d8a511d49340c84139 Author: Eric Biggers Date: Mon Oct 9 12:15:35 2017 -0700 fs, fscrypt: add an S_ENCRYPTED inode flag Introduce a flag S_ENCRYPTED which can be set in ->i_flags to indicate that the inode is encrypted using the fscrypt (fs/crypto/) mechanism. Checking this flag will give the same information that inode->i_sb->s_cop->is_encrypted(inode) currently does, but will be more efficient. This will be useful for adding higher-level helper functions for filesystems to use. For example we'll be able to replace this: if (ext4_encrypted_inode(inode)) { ret = fscrypt_get_encryption_info(inode); if (ret) return ret; if (!fscrypt_has_encryption_key(inode)) return -ENOKEY; } with this: ret = fscrypt_require_key(inode); if (ret) return ret; ... since we'll be able to retain the fast path for unencrypted files as a single flag check, using an inline function. This wasn't possible before because we'd have had to frequently call through the ->i_sb->s_cop->is_encrypted function pointer, even when the encryption support was disabled or not being used. Note: we don't define S_ENCRYPTED to 0 if CONFIG_FS_ENCRYPTION is disabled because we want to continue to return an error if an encrypted file is accessed without encryption support, rather than pretending that it is unencrypted. Reviewed-by: Chao Yu Acked-by: Dave Chinner Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/ext4/inode.c | 7 +++++-- fs/ext4/super.c | 8 ++++++-- fs/f2fs/f2fs.h | 1 + fs/f2fs/inode.c | 5 ++++- fs/ubifs/ioctl.c | 5 ++++- fs/ubifs/xattr.c | 1 + include/linux/fs.h | 2 ++ 7 files changed, 23 insertions(+), 6 deletions(-) commit 734f0d241d2b4e47383bd0d16e21e06f6cb8d2c3 Author: Dave Chinner Date: Mon Oct 9 12:15:34 2017 -0700 fscrypt: clean up include file mess Filesystems have to include different header files based on whether they are compiled with encryption support or not. That's nasty and messy. Instead, rationalise the headers so we have a single include fscrypt.h and let it decide what internal implementation to include based on the __FS_HAS_ENCRYPTION define. Filesystems set __FS_HAS_ENCRYPTION to 1 before including linux/fscrypt.h if they are built with encryption support. Otherwise, they must set __FS_HAS_ENCRYPTION to 0. Add guards to prevent fscrypt_supp.h and fscrypt_notsupp.h from being directly included by filesystems. Signed-off-by: Dave Chinner [EB: use 1 and 0 rather than defined/undefined] Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o fs/crypto/fscrypt_private.h | 3 +- fs/ext4/ext4.h | 8 +-- fs/f2fs/f2fs.h | 8 +-- fs/ubifs/ubifs.h | 9 ++- include/linux/fscrypt.h | 156 ++++++++++++++++++++++++++++++++++++++++ include/linux/fscrypt_common.h | 141 ------------------------------------ include/linux/fscrypt_notsupp.h | 7 +- include/linux/fscrypt_supp.h | 7 +- 8 files changed, 177 insertions(+), 162 deletions(-) commit cc3d967f7e32ceeb9b78dc962126ebcf1a2b24b2 Author: Ladi Prosek Date: Tue Oct 17 16:02:39 2017 +0200 KVM: SVM: detect opening of SMI window using STGI intercept Commit 05cade71cf3b ("KVM: nSVM: fix SMI injection in guest mode") made KVM mask SMI if GIF=0 but it didn't do anything to unmask it when GIF is enabled. The issue manifests for me as a significantly longer boot time of Windows guests when running with SMM-enabled OVMF. This commit fixes it by intercepting STGI instead of requesting immediate exit if the reason why SMM was masked is GIF. Fixes: 05cade71cf3b ("KVM: nSVM: fix SMI injection in guest mode") Signed-off-by: Ladi Prosek Signed-off-by: Radim Krčmář arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/svm.c | 16 +++++++++++++++- arch/x86/kvm/vmx.c | 6 ++++++ arch/x86/kvm/x86.c | 22 ++++++++++++++-------- 4 files changed, 36 insertions(+), 9 deletions(-) commit 57b8b1a1856adaa849d02d547411a553a531022b Author: Thomas Gleixner Date: Wed Oct 18 19:39:35 2017 +0200 x86/cpuid: Prevent out of bound access in do_clear_cpu_cap() do_clear_cpu_cap() allocates a bitmap to keep track of disabled feature dependencies. That bitmap is sized NCAPINTS * BITS_PER_INIT. The possible 'features' which can be handed in are larger than this, because after the capabilities the bug 'feature' bits occupy another 32bit. Not really obvious... So clearing any of the misfeature bits, as 32bit does for the F00F bug, accesses that bitmap out of bounds thereby corrupting the stack. Size the bitmap proper and add a sanity check to catch accidental out of bound access. Fixes: 0b00de857a64 ("x86/cpuid: Add generic table for CPUID dependencies") Reported-by: kernel test robot Signed-off-by: Thomas Gleixner Cc: Andi Kleen Cc: Borislav Petkov Link: https://lkml.kernel.org/r/20171018022023.GA12058@yexl-desktop arch/x86/kernel/cpu/cpuid-deps.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 0ad0bfa29822904b9186a1c04dbfb3014bc5dc8a Author: Sagi Grimberg Date: Wed Oct 11 12:49:51 2017 +0300 nvme-rdma: stop controller reset if the controller is deleting If the controller is deleting (in case the user decided to delete it), we have no point to continue reset sequence. Signed-off-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5013e98b5e8db50144e8f1ca5a96aed95d4d48a0 Author: Sagi Grimberg Date: Wed Oct 11 15:29:12 2017 +0300 nvme-rdma: change queue flag semantics DELETING -> ALLOCATED Instead of marking we are deleting, mark we are allocated and check that instead. This makes the logic symmetrical to connected mark check. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d2782739c1498e4425dcdeb79f90f9291e58f6f6 Author: Bob Sharp Date: Mon Oct 16 15:46:05 2017 -0500 i40iw: Move cqp_cmd_head init to CQP initialization Control QP (CQP) command backlog list is initialized at device initialization time. It is not reinitialized in the reset flow. Move the initialization to CQP creation time so the list can be initialized correctly for reset as well. Fixes: 86dbcd0f12e9 ("i40iw: add file to handle cqp calls") Signed-off-by: Bob Sharp Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f535b56c39c81ba75c714b9163be540d39d3badd Author: Ivan Barrera Date: Mon Oct 16 15:46:04 2017 -0500 i40iw: Remove UDA QP from QoS list if creation fails If User-space Direct Access (UDA) QP creation fails, the QP entry is not removed from QoS list. Fix this by removing QP from QoS list if create QP fails. Fixes: 0fc2dc58896f ("i40iw: Add Quality of Service support") Signed-off-by: Ivan Barrera Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_p.h | 2 +- drivers/infiniband/hw/i40iw/i40iw_puda.c | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) commit 56b2f52310f9fdfc1ea7b99702f827f84ad16801 Author: Christopher Bednarz Date: Mon Oct 16 15:46:03 2017 -0500 i40iw: Clear CQP Head/Tail during initialization Clear Control Queue Pair (CQP) Head/Tail on CQP initialization as during an adapter reset, these values are not reinitialized. Tail is cleared by writing 0 to CQP's tail register. Head is cleared by writing 0 to CQP's doorbell register. Fixes: 86dbcd0f12e9 ("i40iw: add file to handle cqp calls") Signed-off-by: Christopher Bednarz Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 3 +++ 1 file changed, 3 insertions(+) commit 1196923838cf1d2b7abcb9a1007eede09ad93acd Author: Shiraz Saleem Date: Mon Oct 16 15:46:02 2017 -0500 i40iw: Refactor queue depth calculation Queue depth calculations use a mix of work requests and actual number of bytes. Consolidate all calculations using minimum WQE size to avoid confusion. Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_d.h | 9 ++++- drivers/infiniband/hw/i40iw/i40iw_uk.c | 63 ++++++++++++++++++++++++------- drivers/infiniband/hw/i40iw/i40iw_user.h | 4 +- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 34 ++++------------- 4 files changed, 67 insertions(+), 43 deletions(-) commit 5b4a1a8b87fda31c1a1d44aba7e6926167610a20 Author: Shiraz Saleem Date: Mon Oct 16 15:46:01 2017 -0500 i40iw: Reinitialize IEQ on MTU change On a netdev MTU change event, the iWARP Exception Queue (IEQ) buffers may not be sized properly to handle the new MTU. Reinitialize the IEQ with new MTU size on MTU change event. Also, add define for the max ethernet frame size field in IEQ QP context instead of the snd_mss define which is for iWARP QPs' MSS field. Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 5 ++++- drivers/infiniband/hw/i40iw/i40iw_d.h | 3 +++ drivers/infiniband/hw/i40iw/i40iw_main.c | 19 +++++++++++++++++-- drivers/infiniband/hw/i40iw/i40iw_p.h | 1 + drivers/infiniband/hw/i40iw/i40iw_puda.c | 2 +- 5 files changed, 26 insertions(+), 4 deletions(-) commit 9381699eedd1b5dd5b490e993b870dff7571ddcf Author: Shiraz Saleem Date: Mon Oct 16 15:46:00 2017 -0500 i40iw: Move ceq_valid to i40iw_sc_dev structure Completion Event Queues are created and destroyed on a per device basis as opposed to per User-space Direct Access resource. Move ceq_valid to the correct place in i40iw_sc_dev from i40iw_puda_rsrc. Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_main.c | 19 ++++++++++--------- drivers/infiniband/hw/i40iw/i40iw_puda.c | 9 ++++----- drivers/infiniband/hw/i40iw/i40iw_puda.h | 2 -- drivers/infiniband/hw/i40iw/i40iw_type.h | 1 + 4 files changed, 15 insertions(+), 16 deletions(-) commit 343d86bd45d2d5770acc8cab2e4c4b4f6595d1f6 Author: Shiraz Saleem Date: Mon Oct 16 15:45:59 2017 -0500 i40iw: Account for IPv6 header when setting MSS The IPv6 header size is not subtracted from MTU when MSS is set for QPs. Save MTU opposed to MSS in the vsi struct during initialization and calculate the MSS based on IPv4 vs IPv6 connection. Fixes: f27b4746f378 ("i40iw: add connection management code") Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw.h | 3 --- drivers/infiniband/hw/i40iw/i40iw_cm.c | 3 ++- drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 5 ++--- drivers/infiniband/hw/i40iw/i40iw_d.h | 4 ++++ drivers/infiniband/hw/i40iw/i40iw_main.c | 6 +++--- drivers/infiniband/hw/i40iw/i40iw_puda.c | 3 ++- drivers/infiniband/hw/i40iw/i40iw_type.h | 4 ++-- 7 files changed, 15 insertions(+), 13 deletions(-) commit b0d4f703693aabf727924d1568cc36e1b7484c66 Author: Mustafa Ismail Date: Mon Oct 16 15:45:58 2017 -0500 i40iw: Remove unused structures Some structures for post SQ operation are not used. Remove the following: i40iw_post_send_w_inv i40iw_post_inline_send_w_inv send_w_sol send_w_inv send_w_sol_inv inline_send_w_sol inline_send_w_inv inline_send_w_sol_inv Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_user.h | 18 ------------------ 1 file changed, 18 deletions(-) commit 66f49f88aef8388da03753ce9c60758bacd730bf Author: Mustafa Ismail Date: Mon Oct 16 15:45:57 2017 -0500 i40iw: Move exception_lan_queue to VSI structure Consolidate exception_lan_queue under VSI structure where it belongs. Remove it from device and QP structures. Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 6 +++--- drivers/infiniband/hw/i40iw/i40iw_main.c | 4 ++-- drivers/infiniband/hw/i40iw/i40iw_type.h | 5 ++--- 3 files changed, 7 insertions(+), 8 deletions(-) commit de9f063468d00fe961723f72ac7d60f51f528d98 Author: Mustafa Ismail Date: Mon Oct 16 15:45:56 2017 -0500 i40iw: Remove unused static_rsrc from i40iw_create_qp_info The field static_rsrc in i40iw_create_qp_info is unused and not needed. Remove it. Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 2 -- drivers/infiniband/hw/i40iw/i40iw_d.h | 3 --- drivers/infiniband/hw/i40iw/i40iw_type.h | 2 -- 3 files changed, 7 deletions(-) commit 4236f4b99ee0dcefea909ab2a179dc6a0abcb8d6 Author: Mustafa Ismail Date: Mon Oct 16 15:45:55 2017 -0500 i40iw: Ignore AE source field in AEQE for some AEs The AE source field in Asynchronous Event Queue Entry (AEQE) is not set by the hardware for some AEs, but the code assumes it does. This results in incorrect processing of some AEs. Fix this by setting ae_src to I40IW_AE_SOURCE_RSVD for those AEs. Fixes: 86dbcd0f12e9 ("i40iw: add file to handle cqp calls") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 49 ++++++++++++++++++++++++++++++++ drivers/infiniband/hw/i40iw/i40iw_d.h | 1 + 2 files changed, 50 insertions(+) commit 2d7099fc3daa2e898424c2cb1bad4484d6c7e116 Author: Mustafa Ismail Date: Mon Oct 16 15:45:54 2017 -0500 i40iw: Cleanup AE processing Remove unimplemented Asynchronous Events (AE) and correct names. Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 5 ----- drivers/infiniband/hw/i40iw/i40iw_d.h | 10 ++-------- drivers/infiniband/hw/i40iw/i40iw_hw.c | 2 +- 3 files changed, 3 insertions(+), 14 deletions(-) commit 60a518863368c7e124cd8411c2481d0938f53e08 Author: Sagi Grimberg Date: Wed Oct 11 15:29:10 2017 +0300 nvme-rdma: Don't local invalidate if the queue is not live No chance for the local invalidate to succeed if the queue-pair is in error state. Most likely the target will do a remote invalidation of our mr so not a big loss on the test_bit. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e1fe61d4170b1f498e20de92c7ce4cd5e40c3c5 Author: Sagi Grimberg Date: Wed Oct 11 15:29:11 2017 +0300 nvme-rdma: teardown admin/io queues once on error recovery Relying on the queue state while tearing down on every reconnect attempt is not a good design. We should do it once in err_work and simply try to establish the queues for each reconnect attempt. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit 0fc176dfdafc78e66bd74f54e487ca1fc59d01bf Author: Sagi Grimberg Date: Wed Oct 11 15:29:09 2017 +0300 nvme-rdma: Check that reinit_request got a proper mr Warn if req->mr is NULL as it should never happen. Reviewed-by: Johannes Thumshirn Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 3 +++ 1 file changed, 3 insertions(+) commit 0c5b43b9c1fafc5af37915dde6670aaf1224e8cc Author: Sagi Grimberg Date: Wed Oct 11 15:29:08 2017 +0300 nvme-rdma: move assignment to declaration No need for the extra line for trivial assignments. Signed-off-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d8bfceebc41762f7dde960996a24180f9a67cd51 Author: Sagi Grimberg Date: Wed Oct 11 15:29:07 2017 +0300 nvme-rdma: fix wrong logging message Not necessarily address resolution failed. Signed-off-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60070c78ef7b624680ffdde30bca55e515504585 Author: Sagi Grimberg Date: Wed Oct 11 15:29:06 2017 +0300 nvme-rdma: pass tagset to directly nvme_rdma_free_tagset Instead of flagging admin/io. Signed-off-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/rdma.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit dab7487bdf63c6f2d70aac604494d023b189a9fd Author: Sagi Grimberg Date: Wed Oct 11 12:53:08 2017 +0300 block: remove blk_mq_reinit_tagset No callers left. Reviewed-by: Jens Axboe Reviewed-by: Bart Van Assche Reviewed-by: Max Gurtovoy Reviewed-by: Johannes Thumshirn Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig block/blk-mq-tag.c | 7 ------- include/linux/blk-mq.h | 2 -- 2 files changed, 9 deletions(-) commit 31b8446079757575e576b0516f0e4c0fcdfbd3dd Author: Sagi Grimberg Date: Wed Oct 11 12:53:07 2017 +0300 nvme: introduce nvme_reinit_tagset Move blk_mq_reinit_tagset from blk-mq to nvme core as the only user of it. Current transports that use it (rdma, fc) simply implement .reinit_request op. This patch does not change any functionality. Reviewed-by: Jens Axboe Reviewed-by: Max Gurtovoy Reviewed-by: Johannes Thumshirn Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 10 ++++++++++ drivers/nvme/host/fc.c | 3 ++- drivers/nvme/host/nvme.h | 2 ++ drivers/nvme/host/rdma.c | 7 +++---- 4 files changed, 17 insertions(+), 5 deletions(-) commit 149e10f8ff71439014dff97987e90e87e2684a16 Author: Sagi Grimberg Date: Wed Oct 11 12:53:06 2017 +0300 block: introduce blk_mq_tagset_iter Iterator helper to apply a function on all the tags in a given tagset. export it as it will be used outside the block layer later on. Reviewed-by: Bart Van Assche Reviewed-by: Jens Axboe Reviewed-by: Max Gurtovoy Reviewed-by: Johannes Thumshirn Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig block/blk-mq-tag.c | 16 +++++++++++----- include/linux/blk-mq.h | 2 ++ 2 files changed, 13 insertions(+), 5 deletions(-) commit 894b82c427d069a773e1d1417fe30bd31aa18801 Merge: 754137a a9346ab Author: Doug Ledford Date: Wed Oct 18 13:12:09 2017 -0400 Merge branch 'timer_setup' into for-next Conflicts: drivers/infiniband/hw/cxgb4/cm.c drivers/infiniband/hw/qib/qib_driver.c drivers/infiniband/hw/qib/qib_mad.c There were minor fixups needed in these files. Just minor context diffs due to patches from independent sources touching the same basic area. Signed-off-by: Doug Ledford commit 754137a769ac8f13cd6c0e1bc4fc2fa768d3da63 Merge: e980b44 4c532d6 Author: Doug Ledford Date: Wed Oct 18 13:07:13 2017 -0400 Merge branch 'for-next-early' into for-next The early for-next branch was based on v4.14-rc2, while the shared pull request I got from Mellanox used a v4.14-rc4 base. I'm making the branch that was the shared Mellanox pull request the new for-next branch and merging the early for-next branch into it. Signed-off-by: Doug Ledford commit d98bf8cd11985256b96d610453baf1ff8814ff87 Author: Simon Ruderich Date: Wed Oct 18 13:06:37 2017 -0400 ext4: mention noload when recovering on read-only device Help the user to find the appropriate mount option to continue mounting the file system on a read-only device if the journal requires recovery. Signed-off-by: Simon Ruderich Signed-off-by: Theodore Ts'o fs/ext4/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ff894c9c09c6840b7f983ada391da077cd90a3e5 Author: Pavel Machek Date: Wed Oct 18 12:50:35 2017 -0400 Documentation: fix little inconsistencies Fix little inconsistencies in Documentation: make case and spacing match surrounding text. Signed-off-by: Pavel Machek Signed-off-by: Theodore Ts'o Reviewed-by: Darrick J. Wong Documentation/filesystems/ext4.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 235699a8f457edec29ab0667029f3b43afaf5e81 Author: Kees Cook Date: Wed Oct 18 12:45:17 2017 -0400 ext4: convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Theodore Ts'o Reviewed-by: Reviewed-by: Jan Kara Cc: Andreas Dilger Cc: linux-ext4@vger.kernel.org fs/ext4/super.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit e3c957885e4286af2e3f03277bb0cb8b049e72c9 Author: Kees Cook Date: Wed Oct 18 12:40:28 2017 -0400 jbd2: convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Cc: linux-ext4@vger.kernel.org Cc: Thomas Gleixner fs/jbd2/journal.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 9cea513d8cbc75ee26327d3d8971fe7b58288d8f Author: Manikanta Maddireddy Date: Wed Sep 27 17:28:35 2017 +0530 PCI: tegra: Add Tegra186 PCIe support Add Tegra186 PCIe support. UPHY programming is performed by BPMP; PHY enable calls are not required for Tegra186 PCIe. Power partition ungate is done by BPMP powergate driver. The Tegra186 DT description must include a "power-domains" property, which results in dev->pm_domain being set. Tested-by: Mikko Perttunen Tested-by: Thierry Reding Signed-off-by: Manikanta Maddireddy [bhelgaas: add "power-domains" reference] Signed-off-by: Bjorn Helgaas Reviewed-by: Mikko Perttunen Acked-by: Thierry Reding drivers/pci/host/pci-tegra.c | 134 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 109 insertions(+), 25 deletions(-) commit 904fb8e452b4a95490357841291fa523ad1d6442 Author: Manikanta Maddireddy Date: Wed Sep 27 17:28:34 2017 +0530 dt-bindings: pci: tegra: Document Tegra186 PCIe DT Tegra186 PCIe controller DT properties has couple of differences wrt Tegra210 PCIe, rest of the DT properties are same. Tested-by: Mikko Perttunen Signed-off-by: Manikanta Maddireddy Signed-off-by: Bjorn Helgaas Reviewed-by: Mikko Perttunen Acked-by: Thierry Reding .../bindings/pci/nvidia,tegra20-pcie.txt | 134 ++++++++++++++++++++- 1 file changed, 130 insertions(+), 4 deletions(-) commit 448956d619a35538e71e8a2d8f1e4bc274037767 Author: Frank Binns Date: Wed Oct 18 14:30:23 2017 +0100 dma-fence: remove duplicate word in comment Signed-off-by: Frank Binns Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1508333423-5394-1-git-send-email-frank.binns@imgtec.com include/linux/dma-fence.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e980b44134c89afb65176e70aaf293d608002e83 Author: Jérémy Lefaure Date: Mon Oct 16 08:45:17 2017 +0300 IB/mlx5: Use ARRAY_SIZE Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/odp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 99260132fde7bddc6e0132ce53da94d1c9ccabcb Author: Parav Pandit Date: Mon Oct 16 08:45:16 2017 +0300 IB/core: Fix calculation of maximum RoCE MTU The original code only took into consideration the largest header possible after the IB_BTH_BYTES. This was incorrect, as the largest possible header size is the largest possible combination of headers we might run into. The new code accounts for all possible headers in the largest possible combination and subtracts that from the MTU to make sure that all packets will fit on the wire. Link: https://www.spinics.net/lists/linux-rdma/msg54558.html Fixes: 3c86aa70bf67 ("RDMA/cm: Add RDMA CM support for IBoE devices") Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Reported-by: Roland Dreier Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford include/rdma/ib_addr.h | 7 ++++--- include/rdma/ib_pack.h | 19 +++++++++++-------- 2 files changed, 15 insertions(+), 11 deletions(-) commit 39baf10310e6669564a485b55267fae70a4e44ae Author: Parav Pandit Date: Mon Oct 16 08:45:15 2017 +0300 IB/core: Fix use workqueue without WQ_MEM_RECLAIM The IB/core provides address resolution service and invokes callback handler when address resolve request completes of requester in worker thread context. Such caller might allocate or free memory in callback handler depending on the completion status to make further progress or to terminate a connection. Most ULPs resolve route which involves allocating route entry and path record elements in callback event handler. It has been noticed that WQ_MEM_RECLAIM flag should not be used for workers that tend to allocate memory in this [1] thread discussion. In order to mitigate this situation, WQ_MEM_RECLAIM flag was dropped for other such WQs in this [2] patch. Similar problem might arise with address resolution path, though its not yet noticed. The ib_addr workqueue is not memory reclaim path due to its nature of invoking callback that might allocate memory or don't free any memory under memory pressure. [1] https://www.spinics.net/lists/linux-rdma/msg53239.html [2] https://www.spinics.net/lists/linux-rdma/msg53416.html Fixes: f54816261c2b ("IB/addr: Remove deprecated create_singlethread_workqueue") Fixes: 5fff41e1f89d ("IB/core: Fix race condition in resolving IP to MAC") Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79c4d80b43b8e43684894574a508a871f0c196bf Author: Parav Pandit Date: Mon Oct 16 08:45:14 2017 +0300 IB/core: Fix unable to change lifespan entry for hw_counters This patch fixes the case where 'lifespan' entry of the hw_counters is not writable. Currently write callback is not exposed for for the hw_counters sysfs operation. Due to this, modifying lifespan value results into permission denied error in below example. echo 10 > /sys/class/infiniband/mlx5_0/ports/1/hw_counters/lifespan -bash: /sys/class/infiniband/mlx5_0/ports/1/hw_counters/lifespan: Permission denied This patch adds the hook to modify any attribute which implements store() operation. Fixes: b40f4757daa1 ("IB/core: Make device counter infrastructure dynamic") Signed-off-by: Parav Pandit Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/sysfs.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit c0348eb069687a2f27c0cd23dafb35918edf9e75 Author: Parav Pandit Date: Mon Oct 16 08:45:13 2017 +0300 IB: Let ib_core resolve destination mac address Since IB/core resolves the destination mac address for user and kernel consumers, avoid resolving in multiple provider drivers. Only ib_core resolves DMAC now, therefore resolve_eth_dmac is removed as exported symbol. Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 8 +++++--- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 8 -------- drivers/infiniband/hw/hns/hns_roce_ah.c | 14 +------------- drivers/infiniband/hw/mlx4/ah.c | 8 +++----- drivers/infiniband/hw/mlx5/ah.c | 4 ---- drivers/infiniband/hw/ocrdma/ocrdma_ah.c | 15 --------------- include/rdma/ib_verbs.h | 2 -- 7 files changed, 9 insertions(+), 50 deletions(-) commit 5cda6587feec790a089703dde2e6e1f82de50bbd Author: Parav Pandit Date: Mon Oct 16 08:45:12 2017 +0300 IB/core: Introduce and use rdma_create_user_ah Introduce rdma_create_user_ah API which allows passing udata to provider driver and additionally which resolves DMAC for RoCE. ib_resolve_eth_dmac() resolves destination mac address for unicast, multicast, link local ipv4 mapped ipv6 and ipv6 destination gid entry. This allows all RoCE provider drivers to avoid duplicating such code. Such change brings consistency where IB core always resolves dmac and pass it to RoCE provider drivers for user and kernel consumers, with this ah_attr->roce.dmac is always an input field for provider drivers. This uniformity avoids exporting ib_resolve_eth_dmac symbol to providers or other modules. Therefore its removed as exported symbol at later in the patch series. Now uverbs and umad both makes use of rdma_create_user_ah API which fixes the issue where umad has invalid DMAC for address. Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/user_mad.c | 2 +- drivers/infiniband/core/uverbs_cmd.c | 10 +-------- drivers/infiniband/core/verbs.c | 40 ++++++++++++++++++++++++++++++++++-- include/rdma/ib_verbs.h | 15 ++++++++++++++ 4 files changed, 55 insertions(+), 12 deletions(-) commit a9346abed52f08e3e0ceb66d51f527ea11698d3c Author: Kees Cook Date: Mon Oct 16 15:52:31 2017 -0700 RDMA/cxgb4: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Also removes an unused timer and drops a redundant initialization. Cc: Steve Wise Cc: Doug Ledford Cc: Sean Hefty Cc: Hal Rosenstock Cc: linux-rdma@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 13 +++++-------- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 1 - drivers/infiniband/hw/cxgb4/qp.c | 1 - 3 files changed, 5 insertions(+), 10 deletions(-) commit 2ec46d68464c26fc524ebf75afe42964266ea73e Author: Kees Cook Date: Tue Oct 17 11:37:54 2017 -0700 RDMA/i40iw: Convert timers to use timer_setup() (part 2) In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This includes the remaining timers missed in the earlier i40iw patch. Cc: Faisal Latif Cc: Shiraz Saleem Cc: Doug Ledford Cc: Sean Hefty Cc: Hal Rosenstock Cc: linux-rdma@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_cm.c | 7 +++---- drivers/infiniband/hw/i40iw/i40iw_utils.c | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) commit 051947b3b2a2c8487affafaf86587770e1048b78 Author: Kees Cook Date: Mon Oct 16 15:54:11 2017 -0700 RDMA/cxgb3: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Also removes an unused timer. Cc: Steve Wise Cc: Doug Ledford Cc: Sean Hefty Cc: Hal Rosenstock Cc: linux-rdma@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb3/iwch_cm.c | 12 +++++------- drivers/infiniband/hw/cxgb3/iwch_provider.c | 1 - drivers/infiniband/hw/cxgb3/iwch_provider.h | 1 - 3 files changed, 5 insertions(+), 9 deletions(-) commit 8064135e8a758f0db9a24dac0157c47f9bdb1c13 Author: Kees Cook Date: Mon Oct 16 15:51:54 2017 -0700 IB/hfi1: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Switches test of .data field to .function, since .data will be going away. Cc: Mike Marciniszyn Cc: Dennis Dalessandro Cc: Doug Ledford Cc: Sean Hefty Cc: Hal Rosenstock Cc: linux-rdma@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/aspm.h | 7 +++---- drivers/infiniband/hw/hfi1/chip.c | 19 ++++++++----------- drivers/infiniband/hw/hfi1/driver.c | 7 +++---- drivers/infiniband/hw/hfi1/init.c | 2 +- drivers/infiniband/hw/hfi1/mad.c | 4 ++-- drivers/infiniband/hw/hfi1/mad.h | 2 +- drivers/infiniband/hw/hfi1/sdma.c | 8 ++++---- drivers/infiniband/hw/hfi1/verbs.c | 9 ++++----- 8 files changed, 26 insertions(+), 32 deletions(-) commit a2930e5c44951902b63f61aa3d65f4312744de39 Author: Kees Cook Date: Mon Oct 16 15:51:13 2017 -0700 IB/rdmavt: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. setup_timer() was already being called before the open-coded init_timer() and .data assignment. These are removed as well. Cc: Dennis Dalessandro Cc: Doug Ledford Cc: Sean Hefty Cc: Hal Rosenstock Cc: linux-rdma@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 396665e8320987ff43b20a62a6a1cdae57aa1cc1 Merge: d01174f b9f1f1c Author: Stefan Schmidt Date: Wed Oct 18 17:40:18 2017 +0200 Merge remote-tracking branch 'net-next/master' commit 33957a104c86985f087b08a363590a948c9ff08c Author: Jérémy Lefaure Date: Sun Oct 1 15:30:51 2017 -0400 tpm, tpm_tis: use ARRAY_SIZE() to define TPM_HID_USR_IDX Signed-off-by: Jérémy Lefaure Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2d56c71835acc9d69b402f7027091920306daf83 Author: Ruben Roy Date: Tue Sep 26 13:58:57 2017 +0000 tpm: fix duplicate inline declaration specifier This commit fixes the duplicate inline declaration specifier in tpm2_rc_value which caused a warning Signed-off-by: Ruben Roy Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a7a9b26c69d92582de53061b3a18740043bef29 Author: Jarkko Sakkinen Date: Wed Sep 13 10:17:25 2017 -0700 tpm: fix type of a local variables in tpm_tis_spi.c Use __le32 type for data in that format. Fixes: 0edbfea537d1 ("tpm/tpm_tis_spi: Add support for spi phy") Signed-off-by: Jarkko Sakkinen Reviewed-by: Jason Gunthorpe drivers/char/tpm/tpm_tis_spi.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 4557d4bedc9c4c51201a8e802a6671ed8dfc0f41 Author: Jarkko Sakkinen Date: Wed Sep 13 10:04:35 2017 -0700 tpm: fix type of a local variable in tpm2_map_command() The local variable 'handle' should have the type __be32 instead of u32. Fixes: 745b361e989a ("tpm: infrastructure for TPM spaces") Signed-off-by: Jarkko Sakkinen Reviewed-by: Jason Gunthorpe drivers/char/tpm/tpm2-space.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 171360d7800c19622dbdaf202ed6f48ff24a5ae2 Author: Jarkko Sakkinen Date: Wed Sep 13 09:58:49 2017 -0700 tpm: fix type of a local variable in tpm2_get_cc_attrs_tbl() The local variable 'attrs' should have the type __be32 instead of u32. Fixes: 58472f5cd4f6 ("tpm: validate TPM 2.0 commands") Signed-off-by: Jarkko Sakkinen Reviewed-by: Jason Gunthorpe drivers/char/tpm/tpm2-cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ee70bc1e7b63ac8023c9ff9475d8741e397316e7 Author: Alexander Steffen Date: Fri Sep 8 17:21:32 2017 +0200 tpm-dev-common: Reject too short writes tpm_transmit() does not offer an explicit interface to indicate the number of valid bytes in the communication buffer. Instead, it relies on the commandSize field in the TPM header that is encoded within the buffer. Therefore, ensure that a) enough data has been written to the buffer, so that the commandSize field is present and b) the commandSize field does not announce more data than has been written to the buffer. This should have been fixed with CVE-2011-1161 long ago, but apparently a correct version of that patch never made it into the kernel. Cc: stable@vger.kernel.org Signed-off-by: Alexander Steffen Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-dev-common.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 125a2210541079e8e7c69e629ad06cabed788f8c Author: Alexander Steffen Date: Thu Aug 31 19:18:58 2017 +0200 tpm: React correctly to RC_TESTING from TPM 2.0 self tests The TPM can choose one of two ways to react to the TPM2_SelfTest command. It can either run all self tests synchronously and then return RC_SUCCESS once all tests were successful. Or it can choose to run the tests asynchronously and return RC_TESTING immediately while the self tests still execute in the background. The previous implementation apparently was not aware of those possibilities and attributed RC_TESTING to some prototype chips instead. With this change the return code of TPM2_SelfTest is interpreted correctly, i.e. the self test result is polled if and only if RC_TESTING is received. Unfortunately, the polling cannot be done in the most straightforward way. If RC_TESTING is received, ideally the code should now poll the selfTestDone bit in the STS register, as this avoids sending more commands, that might interrupt self tests executing in the background and thus prevent them from ever completing. But it cannot be guaranteed that this bit is correctly implemented for all devices, so the next best thing would be to use TPM2_GetTestResult to query the test result. But the response to that command can be very long, and the code currently lacks the capabilities for efficient unmarshalling, so it is difficult to execute this command. Therefore, we simply run the TPM2_SelfTest command in a loop, which should complete eventually, since we only request the execution of self tests that have not yet been done. Signed-off-by: Alexander Steffen Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm2-cmd.c | 52 ++++++++++----------------------------------- 1 file changed, 11 insertions(+), 41 deletions(-) commit 87434f58be31a96d72b5ddbb98d53307300e0024 Author: Alexander Steffen Date: Thu Aug 31 19:18:57 2017 +0200 tpm: Use dynamic delay to wait for TPM 2.0 self test result In order to avoid delaying the code longer than necessary while still giving the TPM enough time to execute the self tests asynchronously, start with a small delay between two polls and increase it each round. Signed-off-by: Alexander Steffen Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm2-cmd.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 2482b1bba5122b1d5516c909832bdd282015b8e9 Author: Alexander Steffen Date: Thu Aug 31 19:18:56 2017 +0200 tpm: Trigger only missing TPM 2.0 self tests tpm2_do_selftest is only used during initialization of the TPM to ensure that the device functions correctly. Therefore, it is sufficient to request only missing self tests (parameter full_test=0), not a reexecution of all self tests, as was done before. This allows for a faster execution of this command. Signed-off-by: Alexander Steffen Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm2-cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6b3a13173f23e798e1ba213dd4a2c065a3b8d751 Author: Alexander Steffen Date: Mon Sep 11 12:26:52 2017 +0200 tpm_tis_spi: Use DMA-safe memory for SPI transfers The buffers used as tx_buf/rx_buf in a SPI transfer need to be DMA-safe. This cannot be guaranteed for the buffers passed to tpm_tis_spi_read_bytes and tpm_tis_spi_write_bytes. Therefore, we need to use our own DMA-safe buffer and copy the data to/from it. The buffer needs to be allocated separately, to ensure that it is cacheline-aligned and not shared with other data, so that DMA can work correctly. Fixes: 0edbfea537d1 ("tpm/tpm_tis_spi: Add support for spi phy") Cc: stable@vger.kernel.org Reviewed-by: Jarkko Sakkinen Signed-off-by: Alexander Steffen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis_spi.c | 45 +++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 18 deletions(-) commit f5357413dbaadd82361903f3c389cb1d5763a85e Author: Jiandi An Date: Fri Aug 25 18:28:55 2017 -0500 tpm/tpm_crb: Use start method value from ACPI table directly This patch gets rid of dealing with intermediate flag for start method and use start method value from ACPI table directly. For ARM64, the locality is handled by Trust Zone in FW. The layout does not have crb_regs_head. It is hitting the following line. dev_warn(dev, FW_BUG "Bad ACPI memory layout"); Current code excludes CRB_FL_ACPI_START for this check. Now since ARM64 support for TPM CRB is added, CRB_FL_CRB_SMC_START should also be excluded from this check. For goIdle and cmdReady where code was excluding CRB_FL_ACPI_START only (do nothing for ACPI start method), CRB_FL_CRB_SMC_START was also excluded as ARM64 SMC start method does not have TPM_CRB_CTRL_REQ. However with special PPT workaround requiring CRB_FL_CRB_START to be set in addition to CRB_FL_ACPI_START and the addition flag of SMC start method CRB_FL_CRB_SMC_START, the code has become difficult to maintain and undrestand. It is better to make code deal with start method value from ACPI table directly. Signed-off-by: Jiandi An Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_crb.c | 59 +++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 30 deletions(-) commit c37fbc09bd4977736f6bc4050c6f099c587052a7 Author: Arnd Bergmann Date: Thu Sep 7 15:30:45 2017 +0200 tpm: constify transmit data pointers Making cmd_getticks 'const' introduced a couple of harmless warnings: drivers/char/tpm/tpm_tis_core.c: In function 'probe_itpm': drivers/char/tpm/tpm_tis_core.c:469:31: error: passing argument 2 of 'tpm_tis_send_data' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] rc = tpm_tis_send_data(chip, cmd_getticks, len); drivers/char/tpm/tpm_tis_core.c:477:31: error: passing argument 2 of 'tpm_tis_send_data' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] rc = tpm_tis_send_data(chip, cmd_getticks, len); drivers/char/tpm/tpm_tis_core.c:255:12: note: expected 'u8 * {aka unsigned char *}' but argument is of type 'const u8 * {aka const unsigned char *}' static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len) This changes the related functions to all take 'const' pointers so that gcc can see this as being correct. I had to slightly modify the logic around tpm_tis_spi_transfer() for this to work without introducing ugly casts. Cc: stable@vger.kernel.org Fixes: 5e35bd8e06b9 ("tpm_tis: make array cmd_getticks static const to shink object code size") Signed-off-by: Arnd Bergmann Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis.c | 2 +- drivers/char/tpm/tpm_tis_core.c | 4 ++-- drivers/char/tpm/tpm_tis_core.h | 4 ++-- drivers/char/tpm/tpm_tis_spi.c | 25 +++++++++++-------------- 4 files changed, 16 insertions(+), 19 deletions(-) commit 0bbc931a074a741cf8e6279e8045cf7118586780 Author: Colin Ian King Date: Fri Aug 25 17:45:05 2017 +0100 tpm_tis: make array cmd_getticks static const to shrink object code size Don't populate array cmd_getticks on the stack, instead make it static const. Makes the object code smaller by over 160 bytes: Before: text data bss dec hex filename 18813 3152 128 22093 564d drivers/char/tpm/tpm_tis_core.o After: text data bss dec hex filename 18554 3248 128 21930 55aa drivers/char/tpm/tpm_tis_core.o Cc: stable@vger.kernel.org Signed-off-by: Colin Ian King Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm_tis_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba16490eac146ebb178017e5de3d61c645552fab Author: Thomas Gleixner Date: Wed Oct 18 16:10:19 2017 +0200 timer: Convert stub timer to timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Thomas Gleixner Cc: Kees Cook kernel/time/timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 32a6c7233c41216f5dd41fc7bf100eedb1063dfc Author: Kees Cook Date: Mon Oct 16 15:58:25 2017 -0700 workqueue: Convert timers to use timer_setup() (part 2) In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. (The prior workqueue patch missed a few timers.) Signed-off-by: Kees Cook Acked-by: Tejun Heo Cc: Lai Jiangshan Link: https://lkml.kernel.org/r/20171016225825.GA99101@beast Signed-off-by: Thomas Gleixner kernel/workqueue.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 2652c79252ef8b5ab50079c78eac0b56a991badc Merge: 8a5776a b5ae577 Author: Doug Ledford Date: Wed Oct 18 11:03:35 2017 -0400 Merge tag 'mlx5-updates-2017-10-11' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux into mlnx-shared mlx5-updates-2017-10-11: IPoIB Muli Pkey support This series provides the support for IPoIB Multi Pkey. InfiniBand Pkeys are the equivalent of Ethernet vlans. Currently IPoIB device driver supports only default Pkey and IPoIB Pkey child interfaces are not supported with IPoIB offloads mode, this series will add the support for that by allowing creating mlx5 multiple IPoIB netdevices with a non-default Pkey. mlx5 IPoIB Pkey child interface is smaller version of mlx5i IPoIB interfaces and shares most of its resources with the parent IPoIB interface, namely RX steering and ring queue resources. The only mlx5 resources a child Pkey interface will be creating are the TX rings, since they should be assigned to a specific Pkey. mlx5i Pkey netdev is implemented via new mlx5e netdev profile implemented in mlx5/core/ipoib/ipoib_vlan.c. The series starts with a refactoring of mlx5e PTP and mlx5 clock implementation to move the code to be part of mlx5 core rather than mlx5e netdevice, in order to make mlx5 clock and PTP registration part of the core to be shared with mlx5e master Ethernet netdev/IPoIB parent netdev and mlx5_ib in the near future. Add the support for attaching multiple underlay QPs for the different Pkeys in mlx5 core RX steering. Add Pkey index to rdma_netdev to add the ability to set PKEY index to lower IPoIB offload netdev. Use hash-table to map between DQPN (Destination QP number) to child netdev for the IPoIB parent netdev to forward RX packets to the corresponding child Pkey netdev, since the RX rings are shared. The reset of the series adds the ipoib child Pkey: mlx5e netdev profile, netdev nods implementation and minimal set of ethtool callbacks. Thanks, Saeed. Signed-off-by: Doug Ledford commit f674bd281460451e8784f3bc917a650e8937a8ed Author: Akshu Agrawal Date: Wed Jun 28 14:08:09 2017 +0530 drm/amdgpu Moving amdgpu asic types to a separate file Amdgpu asic types will be required for other drivers too. Hence, its better to keep it in a separate include file. Reviewed-by: Alex Deucher Signed-off-by: Akshu Agrawal Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/amd_shared.h | 29 ++---------------- include/drm/amd_asic_type.h | 52 ++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 27 deletions(-) commit a1b16aaa55b6425418d6d7a87d3dbbe40bac8c37 Author: Vijendar Mukunda Date: Mon Oct 9 16:36:08 2017 -0400 ASoC: AMD: Added asic_type as ACP DMA driver platform data asic_type information is passed to ACP DMA Driver as platform data. Reviewed-by: Alex Deucher Signed-off-by: Vijendar Mukunda Signed-off-by: Alex Deucher sound/soc/amd/acp-pcm-dma.c | 8 ++------ sound/soc/amd/acp.h | 7 +++++++ 2 files changed, 9 insertions(+), 6 deletions(-) commit 1fd16f36be687ce32e875f59363c16d7cf050988 Author: Vijendar Mukunda Date: Mon Oct 9 16:35:12 2017 -0400 drm/amd/amdgpu: Added asic_type as ACP DMA driver platform data asic_type information is passed to ACP DMA Driver as platform data. Reviewed-by: Alex Deucher Signed-off-by: Vijendar Mukunda Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 2 ++ 1 file changed, 2 insertions(+) commit 4c532d6ce14bb3fb4e1cb2d29fafdd7d6bded51c Author: Bart Van Assche Date: Wed Oct 11 10:27:29 2017 -0700 IB/srp: Make CM timeout dependent on subnet timeout For small networks it is safe to reduce the subnet timeout from its default value (18 for opensm) to 16. Make the SRP CM timeout dependent on the subnet timeout such that decreasing the subnet timeout also causes SRP failover and failback to occur faster. Signed-off-by: Bart Van Assche Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit cee687b68dbc718b5e10f2181102dc0bc3e4f006 Author: Bart Van Assche Date: Wed Oct 11 10:27:28 2017 -0700 IB/srp: Cache global rkey This is a micro-optimization for the hot path. Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 27 ++++++++++++++------------- drivers/infiniband/ulp/srp/ib_srp.h | 3 ++- 2 files changed, 16 insertions(+), 14 deletions(-) commit 9566b054926b718994c65eab55985408046668c3 Author: Bart Van Assche Date: Wed Oct 11 10:27:27 2017 -0700 IB/srp: Remove second argument of srp_destroy_qp() This patch does not change any functionality. Signed-off-by: Bart Van Assche Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8a0d18c62121d3c554a83eb96e2752861d84d937 Author: Bart Van Assche Date: Wed Oct 11 10:27:26 2017 -0700 IB/srp: Avoid that a cable pull can trigger a kernel crash This patch fixes the following kernel crash: general protection fault: 0000 [#1] PREEMPT SMP Workqueue: ib_mad2 timeout_sends [ib_core] Call Trace: ib_sa_path_rec_callback+0x1c4/0x1d0 [ib_core] send_handler+0xb2/0xd0 [ib_core] timeout_sends+0x14d/0x220 [ib_core] process_one_work+0x200/0x630 worker_thread+0x4e/0x3b0 kthread+0x113/0x150 Fixes: commit aef9ec39c47f ("IB: Add SCSI RDMA Protocol (SRP) initiator") Signed-off-by: Bart Van Assche Reviewed-by: Sagi Grimberg Cc: Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit dea262094cdf629a3380061722b205de04057799 Author: Bart Van Assche Date: Wed Oct 11 10:27:25 2017 -0700 IB/srpt: Change default behavior from using SRQ to using RC Although in the RC mode more resources are needed that mode has three advantages over SRQ: - It works with all RDMA adapters, even those that do not support SRQ. - Posting WRs and polling WCs does not trigger lock contention because only one thread at a time accesses a WR or WC queue in non-SRQ mode. - The end-to-end flow control mechanism is used. >From the IB spec: C9-150.2.1: For QPs that are not associated with an SRQ, each HCA receive queue shall generate end-to-end flow control credits. If a QP is associated with an SRQ, the HCA receive queue shall not generate end-to-end flow control credits. Add new configfs attributes that allow to configure which mode to use (/sys/kernel/config/target/srpt/$GUID/$GUID/attrib/use_srq). Note: only the attribute for port 1 is relevant on multi-port adapters. Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.c | 152 ++++++++++++++++++++++++++-------- drivers/infiniband/ulp/srpt/ib_srpt.h | 6 ++ 2 files changed, 123 insertions(+), 35 deletions(-) commit 74333f122388437cf1e2296ee9a3ae19d8858bc4 Author: Bart Van Assche Date: Wed Oct 11 10:27:24 2017 -0700 IB/srpt: Cache global L_Key This patch is a micro-optimization for the hot path. Signed-off-by: Bart Van Assche Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.c | 6 ++++-- drivers/infiniband/ulp/srpt/ib_srpt.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) commit 7a01d05cd5bed9594fbc4dff5e944652ff23876c Author: Bart Van Assche Date: Wed Oct 11 10:27:23 2017 -0700 IB/srpt: Limit the send and receive queue sizes to what the HCA supports Additionally, correct the comment about ch->rq_size. Signed-off-by: Bart Van Assche Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c70ca38960399a63d5c048b7b700612ea321d17e Author: Bart Van Assche Date: Wed Oct 11 10:27:22 2017 -0700 IB/srpt: Do not accept invalid initiator port names Make srpt_parse_i_port_id() return a negative value if hex2bin() fails. Fixes: commit a42d985bd5b2 ("ib_srpt: Initial SRP Target merge for v3.3-rc1") Signed-off-by: Bart Van Assche Cc: Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit b4a0b32d7a6024d9349fd464b3ae7a45048acd36 Author: Chris Wilson Date: Wed Oct 18 13:16:21 2017 +0100 drm/i915: Flush the idle-worker for debugfs/i915_drop_caches After being requested to idle the GPU, flush the idle worker to drop the residual active state, and any internal object caches. v2: By popular demand, introduce DROP_IDLE for fine-grained control from userspace, though it should be used as part of a DROP_ACTIVE | DROP_RETIRE | DROP_IDLE | DROP_FREED sequence. v3: Convert to BIT() to sell it to Joonas. References: https://bugs.freedesktop.org/show_bug.cgi?id=102655 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171018121621.10824-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_debugfs.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 4bdd439fe2a7ce14f2b86bf138b24e2fa3615507 Author: Ioana Radulescu Date: Wed Oct 11 08:29:51 2017 -0500 staging: fsl-dpaa2/eth: Add firmware version Include firmware version in the driver information exported through ethtool. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c | 14 +++++++++- drivers/staging/fsl-dpaa2/ethernet/dpni-cmd.h | 5 ++++ drivers/staging/fsl-dpaa2/ethernet/dpni.c | 32 ++++++++++++++++++++++ drivers/staging/fsl-dpaa2/ethernet/dpni.h | 5 ++++ 4 files changed, 55 insertions(+), 1 deletion(-) commit 0f4c295f542bb349d9735279bb6bafb6fa45399b Author: Ioana Radulescu Date: Wed Oct 11 08:29:50 2017 -0500 staging: fsl-dpaa2/eth: Don't use netdev_err too early Early during probe the netdevice name is not initialized yet, so use dev_err instead of netdev_err when printing error messages. 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 112197de6d240a754ef3d9609ace53ccbc013dc9 Author: Ioana Radulescu Date: Wed Oct 11 08:29:49 2017 -0500 staging: fsl-dpaa2/eth: Use implicit clear of link interrupt dpni_get_irq_status() also looks at the input value of its status parameter, and if not null it automatically clears from pending state the bits that are set there. Use this feature to avoid a separate MC command for clearing the interrupt event bits after reading the status. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 729d79b8909ff6cf17c3edfd3c9dea47fdaf9f56 Author: Ioana Radulescu Date: Wed Oct 11 08:29:48 2017 -0500 staging: fsl-dpaa2/eth: Fix double DMA unmap In case we fail to allocate a skb for a fragmented ingress frame, the cleanup function will attempt to unmap again the first frame fragment, which had already been unmapped during early Rx processing. Avoid this by freeing the first buffer immediately in case we hit an error, leaving the cleanup function to free only the subsequent buffers. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit e30bd4f8342ff251d110ab62eadf3ea9bf37c20f Author: Ioana Radulescu Date: Wed Oct 11 08:29:47 2017 -0500 staging: fsl-dpaa2/eth: Refactor interrupt arming in NAPI poll Take into consideration the return value of napi_complete_done(), since there might be an indication that it's not suitable to enable driver interrupts yet. Signed-off-by: Bogdan Purcareata Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8658094a22987086a307cfb1fdf9c66d137b8fe3 Author: Ioana Radulescu Date: Wed Oct 11 08:29:46 2017 -0500 staging: fsl-dpaa2/eth: Check if notification rearm is successful In case dpaa2_io_service_rearm() fails with an error other then EBUSY, it will do so silently; add a check for this and a warning message, as a failure here means we're unable to receive any more traffic on the current cpu. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 2 ++ 1 file changed, 2 insertions(+) commit b63baf7137688ff7989829137dab8fd548fa9399 Author: Ioana Radulescu Date: Wed Oct 11 08:29:45 2017 -0500 staging: fsl-dpaa2/eth: Check SGT final bit is present For scatter-gather ingress frames, we expect to receive a list of fragments from the hardware, last of which is marked with a "final" bit. Add a check to make sure the Rx frame has this bit set correctly; there's not much we can do in case of a malformed frame, but at least issue a warning. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 2 ++ 1 file changed, 2 insertions(+) commit cbb3ea40fc495bf04070200b35c1c4cd05d11bd3 Author: Ioana Radulescu Date: Wed Oct 11 08:29:44 2017 -0500 staging: fsl-dpaa2/eth: Account for Rx FD buffers on error path On Rx path, if we fail to build an skb from the incoming FD, we still need to update the channel buffer count accordingly, otherwise we risk depleting the pool while the software counter still sees available buffers. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 87eb55e418b7fc80feb21a87aac56c6efe0678e4 Author: Ioana Radulescu Date: Wed Oct 11 08:29:43 2017 -0500 staging: fsl-dpaa2/eth: Fix potential endless loop We incorrectly assumed that dpaa2_io_release() can only return -EBUSY as an error code, when in fact it can also fail in case some of its arguments don't have valid values. Make sure we only retry the operation while the portal is busy and abort for all other error cases, otherwise we risk entering an endless loop. Signed-off-by: Ioana Radulescu Signed-off-by: Bogdan Purcareata Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 58 ++++++++++++++++---------- 1 file changed, 35 insertions(+), 23 deletions(-) commit ce10d7b4e8e3574b9616e54a09d64521b9aeb8b6 Author: Hans de Goede Date: Thu Oct 12 20:10:25 2017 +0200 staging: vboxvideo: Fix reporting invalid suggested-offset-properties The x and y hints receives from the host are unsigned 32 bit integers and they get set to -1 (0xffffffff) when invalid. Before this commit the vboxvideo driver was storing them in an u16 causing the -1 to be truncated to 65535 which, once reported to userspace, was breaking gnome 3.26+ in Wayland mode. This commit stores the host values in 32 bit variables, removing the truncation and checks for -1, replacing it with 0 as -1 is not a valid suggested-offset-property value. Likewise the properties are now initialized to 0 instead of -1, since -1 is not a valid value. This fixes gnome 3.26+ in Wayland mode not working with the vboxvideo driver. Reported-by: Gianfranco Costamagna Cc: stable@vger.kernel.org Cc: Michael Thayer Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/staging/vboxvideo/vbox_drv.h | 8 ++++---- drivers/staging/vboxvideo/vbox_irq.c | 4 ++-- drivers/staging/vboxvideo/vbox_mode.c | 26 ++++++++++++++++++-------- 3 files changed, 24 insertions(+), 14 deletions(-) commit 69ccc6240d635abedf0f099abf613d7f939c9fae Author: Gustavo A. R. Silva Date: Tue Oct 10 14:40:31 2017 -0500 staging: vt6655: mark expected switch fall-throughs in vnt_set_keymode In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/key.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 116d8eea59b7c061a054af5d25b2ce79185f2773 Author: Gustavo A. R. Silva Date: Tue Oct 10 14:13:58 2017 -0500 staging: typec: tcpci: mark expected switch fall-through in tcpci_to_typec_cc In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpci.c | 1 + 1 file changed, 1 insertion(+) commit bc7d21ca2c150ecb0153a901fa99733f960ea461 Author: Colin Ian King Date: Tue Oct 10 15:05:48 2017 +0100 staging: wilc1000: replace redundant computations with 0 Shifting and masking strHostIfSetMulti->enabled is redundant since enabled is a bool and so all the shifted and masked values will be zero. Replace them with zero to simplify the code. Detected by CoverityScan, CID#1339458 ("Bad shift operation") and CID#1339506 ("Operands don't affect result"). Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2d10b8570416fd079c23f9d62fb7b88131938013 Author: Sebastian Andrzej Siewior Date: Thu Oct 5 14:56:54 2017 +0200 greybus: audio: don't inclide rwlock.h directly. rwlock.h should not be included directly. Instead linux/splinlock.h should be included. One thing it does is to break the RT build. Cc: Vaibhav Agarwal Cc: Johan Hovold Cc: Alex Elder Cc: Greg Kroah-Hartman Cc: greybus-dev@lists.linaro.org Cc: devel@driverdev.osuosl.org Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/audio_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42c8eb3f6e15367981b274cb79ee4657e2c6949d Author: Jia-Ju Bai Date: Mon Oct 9 16:45:55 2017 +0800 vt6655: Fix a possible sleep-in-atomic bug in vt6655_suspend The driver may sleep under a spinlock, and the function call path is: vt6655_suspend (acquire the spinlock) pci_set_power_state __pci_start_power_transition (drivers/pci/pci.c) msleep --> may sleep To fix it, pci_set_power_state is called without having a spinlock. This bug is found by my static analysis tool and my code review. Signed-off-by: Jia-Ju Bai Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6655/device_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6e047ac922d8dd1293bdb9778bf2f2c0d699e9c6 Author: Branislav Radocaj Date: Tue Oct 10 15:29:19 2017 +0200 Staging: bcm2048 fix bare use of 'unsigned' in radio-bcm2048.c This is a patch to the radio-bcm2048.c file that fixes up a warning found by the checkpatch.pl tool. Signed-off-by: Branislav Radocaj Signed-off-by: Greg Kroah-Hartman drivers/staging/media/bcm2048/radio-bcm2048.c | 60 +++++++++++++-------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit 69abc735f45538fd3b3740a5293cd16cc09799cf Author: Bart Van Assche Date: Mon Oct 16 08:47:45 2017 -0700 RDMA/uverbs: Make the code in ib_uverbs_cmd_verbs() less confusing This patch reduces the number of #ifdefs and also avoids that smatch reports the following: drivers/infiniband/core/uverbs_ioctl.c:276: ib_uverbs_cmd_verbs() warn: if statement not indented drivers/infiniband/core/uverbs_ioctl.c:280: ib_uverbs_cmd_verbs() warn: possible memory leak of 'ctx' drivers/infiniband/core/uverbs_ioctl.c:315: ib_uverbs_cmd_verbs() warn: if statement not indented References: commit fac9658cabb9 ("IB/core: Add new ioctl interface") Signed-off-by: Bart Van Assche Acked-by: Matan Barak Cc: Yishai Hadas Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_ioctl.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit e575a9bba0c0b820dc9f7c094340813db7f5c80f Author: Somnath Kotur Date: Tue Oct 17 14:01:35 2017 +0530 bnxt_re: Make room for mapping beyond 32 entries Latest chip requires indexes 32 to 47 be used for the internal HW block that manages queue mapping. Signed-off-by: Devesh Sharma Signed-off-by: Somnath Kotur Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/qplib_res.h | 2 +- drivers/infiniband/hw/bnxt_re/roce_hsi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a0ddc2ec8f2912a738165b0ce47b9d945a9e3709 Author: Somnath Kotur Date: Fri Oct 13 11:38:00 2017 +0530 bnxt_re: Fix incorrect usage of test_bit() test_bit() takes a bit number while the 'flags' field in struct bnxt_qplib_rcfw was using actual BIT position converted values. Fix this by assigning bit numbers and use consistent APIs all the flag values. Also logging a message in case of failure. Thanks to Dan Carpenter for pointing this out. Suggested-by: Dan Carpenter Signed-off-by: Somnath Kotur Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/main.c | 5 +++-- drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 8 ++++---- drivers/infiniband/hw/bnxt_re/qplib_rcfw.h | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) commit 6a28d5a92cdda1e290f333c95fc020d1b93a729c Author: Thomas Bogendoerfer Date: Wed Oct 11 14:41:34 2017 +0200 IB/hfi1: Add MODULE_FIRMWARE statements Provide information about used firmware files via modinfo. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Dennis Dalessandro Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/firmware.c | 5 +++++ 1 file changed, 5 insertions(+) commit 978cb69672d050a1266efb44d8861751cd361512 Author: Colin Ian King Date: Tue Oct 10 16:14:51 2017 +0100 RDMA/hns: fix spelling mistake: "Reseved" -> "Reserved" Trivial fix to spelling mistake in dev_err error message Signed-off-by: Colin Ian King Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a784e3ebddd3e7b8a6e651270a926638e362b101 Author: Gustavo A. R. Silva Date: Tue Oct 10 15:10:41 2017 -0500 staging: greybus: mark expected switch fall-through in check_urb_status In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/es2.c | 1 + 1 file changed, 1 insertion(+) commit ddb35ab8d9481f24e41e19439fe33b4daaf8012d Author: Gustavo A. R. Silva Date: Thu Oct 12 11:16:52 2017 -0500 staging: vt6656: card: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/vt6656/card.c | 2 ++ 1 file changed, 2 insertions(+) commit a14731129a1f5cb5f28494d5080a751d2ebd9511 Author: Gustavo A. R. Silva Date: Thu Oct 12 11:17:01 2017 -0500 staging: r8822be: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c | 2 ++ 1 file changed, 2 insertions(+) commit 583d6a93a5d5fd81a61d8f077c166825f857d48f Author: Gustavo A. R. Silva Date: Thu Oct 12 11:15:17 2017 -0500 staging: ks7010: ks_wlan_net: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1364489 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/ks7010/ks_wlan_net.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1f233190f15dc3aa2bf5a8ab84faf6b143e449fb Author: Kees Cook Date: Mon Oct 16 16:24:32 2017 -0700 staging/wilc1000: Convert timers to use timer_setup() As part of removing the timer_list.data field, this converts the wilc1000 driver to using from_timer and an explicit per-timer data field, since there doesn't appear to be a way to sanely resolve vif from hif_drv. Cc: Aditya Shankar Cc: Ganesh Krishna Cc: Greg Kroah-Hartman Cc: linux-wireless@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/host_interface.c | 39 +++++++++++++---------- drivers/staging/wilc1000/host_interface.h | 5 +++ drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 +-- 3 files changed, 28 insertions(+), 20 deletions(-) commit 36aeebd4854c25870fa527c1f14624ac42f3658e Author: Kees Cook Date: Mon Oct 16 16:24:36 2017 -0700 staging: rtl8712: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Larry Finger Cc: Florian Schilhabel Cc: Greg Kroah-Hartman Cc: Tejaswini Poluri Cc: Scott Matheina Cc: Varsha Rao Cc: Julia Lawall Cc: Aleksey Kurbatov Cc: Vijai Kumar K Cc: Wei Yongjun Cc: "Raphaël Beamonte" Cc: Jannik Becher Cc: Joseph Wright Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/mlme_linux.c | 48 +++++++++++++++--------------- drivers/staging/rtl8712/os_intfs.c | 4 +-- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 8 ++--- drivers/staging/rtl8712/rtl871x_security.c | 5 ++-- drivers/staging/rtl8712/rtl871x_security.h | 2 +- 5 files changed, 34 insertions(+), 33 deletions(-) commit e8c5027d85a5d7afe7063baf5ad23f0e7cd945d2 Author: Kees Cook Date: Mon Oct 16 16:25:00 2017 -0700 staging: dgnc: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Lidza Louina Cc: Mark Hounschell Cc: Greg Kroah-Hartman Cc: driverdev-devel@linuxdriverproject.org Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit b28bbb7362ad44806b30470408c76f17f146b99b Author: Kees Cook Date: Mon Oct 16 16:25:08 2017 -0700 staging/fwserial: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Also removes redundant initialization of fw transaction timer, which already gets initialized per-transaction. Cc: Greg Kroah-Hartman Cc: Bhumika Goyal Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/staging/fwserial/fwserial.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit b728b54fd534068f7c685d5c89df48489014dd4e Author: Frank A. Cancio Bello Date: Mon Oct 16 18:42:12 2017 -0400 staging: net: netlogic: Fix alignment issue Fix alignment to match open parenthesis and comply in that way with the preferred coding style for the linux kernel. Credits to 'checkpatch'. The 'checkpatch' message was: 'CHECK: Alignment should match open parenthesis' Signed-off-by: Frank A. Cancio Bello Signed-off-by: Greg Kroah-Hartman drivers/staging/netlogic/xlr_net.c | 82 ++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 44 deletions(-) commit 96591eaef2c92c85c318192f7f1f7dbc673f0864 Author: Mihaela Muraru Date: Sun Oct 15 00:08:32 2017 +0300 staging: vc04_services: Use __func__ instead of function name Use identifier __func__ instead of the name of the function. Issue found by checkpatch.pl. Signed-off-by: Mihaela Muraru Signed-off-by: Greg Kroah-Hartman .../staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 2ffd3860a85414fa1a517a8f8f3c83eb409a1cf0 Author: Mihaela Muraru Date: Sat Oct 14 12:13:31 2017 +0300 staging: vc04_services: Fix comment block coding style Remove the unnecessary '*' character and align the comment block to fit the coding style used by linux kernel organization. Signed-off-by: Mihaela Muraru Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 95f539b653f2be4e97c11f6acda1f99f819ce19f Author: Gustavo A. R. Silva Date: Thu Oct 12 11:16:48 2017 -0500 staging: vc04_services: vchiq_core: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e527ff92b69f0fc184b22038fd600aec7bf0ce61 Merge: bd8c202 f9586ab Author: Doug Ledford Date: Wed Oct 18 10:15:14 2017 -0400 Merge branch 'hfi1' into k.o/for-next Signed-off-by: Doug Ledford commit f9586abfa333143d67e3362dfb2a19ae45d82441 Author: Alex Estrin Date: Mon Oct 9 12:38:33 2017 -0700 IB/rdmavt: Don't wait for resources in QP reset Per the IBTA spec, QP destroy shall fail if the QP is attached to multicast groups, although the spec is silent on modify_qp to reset state. It implies that ULP must deregister QP from all mcast groups for destroy to succeed. The faulty patch "IB/ipoib: Update broadcast object if PKey value was changed in index 0" exposed two issues in rdmavt: 1. Rvt QP reset waits for qp references to go to zero. This will hang if QP is attached to multicast groups. 2. The mcast group detach will fail for a QP in reset state therefore preventing ULP from correcting the issue. This patch moves the reference count wait to the the destroy QP path and allows a QP mcast detach to work in the reset state. Reviewed-by: Mike Marciniszyn Signed-off-by: Alex Estrin Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/mcast.c | 2 +- drivers/infiniband/sw/rdmavt/qp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a8979cc55c0034fbe129904936cfc4b5bf41e59b Author: Kaike Wan Date: Mon Oct 9 12:38:26 2017 -0700 IB/hfi1: Set hdr_type when tx req is allocated Setting the protocol type should be part of initializing the tx request. For UC and RC, the current protocol type is part of the qp priv structure. For ud requests, it needs to be adjusted dynamically, based on the AV posted with the WQE. This patch will simplify the initialization of the tx request. Fixes: 5b6cabb0db77 ("IB/hfi1: Add 16B RC/UC support") Reviewed-by: Don Hiatt Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/rc.c | 1 - drivers/infiniband/hw/hfi1/uc.c | 1 - drivers/infiniband/hw/hfi1/verbs_txreq.h | 2 ++ 3 files changed, 2 insertions(+), 2 deletions(-) commit f8195f3b14a046ae33d9c369ffb59b4192f29e08 Author: Don Hiatt Date: Mon Oct 9 12:38:19 2017 -0700 IB/hfi1: Eliminate allocation while atomic The PIO trailing buffer was being dynamically allocated but the kcalloc return value was not being checked. Further, the GFP_KERNEL was being used even though the send engine might be called with interrupts disabled. Since the maximum size of the trailing buffer is only 12 bytes (CRC = 4, LT = 1, Pad = 0 to 7 bytes) just statically allocate the buffer, remove the alloc entirely and share it with the SDMA engine by making it global. Reported-by: Leon Romanovsky Fixes: 566d53a82644 ("IB/hfi1: Enhance PIO/SDMA send for 16B") Reviewed-by: Mike Marciniszyn Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/common.h | 1 + drivers/infiniband/hw/hfi1/verbs.c | 22 ++++++++-------------- 2 files changed, 9 insertions(+), 14 deletions(-) commit d0a2f454713a42447ee4007582c0e43c47bcf230 Author: Don Hiatt Date: Mon Oct 9 12:38:12 2017 -0700 IB/hfi1: Mask out A bit from psn trace The trace logic prior to the fixes below used to mask the A bit from the psn. It now mistakenly displays the A bit, which is already displayed separately. Fix by adding the appropriate mask to the psn tracing. Fixes: 228d2af1b723 ("IB/hfi1: Separate input/output header tracing") Fixes: 863cf89d472f ("IB/hfi1: Add 16B trace support") Reviewed-by: Mike Marciniszyn Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b65c2045cc5089bd3cfacc9fad63798fded64226 Author: Grzegorz Morys Date: Mon Oct 9 12:38:04 2017 -0700 IB/hfi1: Correct unnecessary acquisition of HW mutex Avoid acquiring already acquired hardware mutex and releasing the unacquired one as these are redundant operations. Add printouts for such situations to help detect potential errors within the driver. Reviewed-by: Mike Marciniszyn Signed-off-by: Grzegorz Morys Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/firmware.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 621515da67f150eea0e7b6b05614bd0b65d9d16c Author: Jakub Byczkowski Date: Mon Oct 9 12:37:56 2017 -0700 IB/hfi1: Allow meta version 4 for platform configuration Parsing of platform configuration format 4 will fail on meta version check. Allow meta version 4 during parsing. Reviewed-by: Jan Sokolowski Reviewed-by: Ira Weiny Signed-off-by: Jakub Byczkowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 242b494bf22be4056df1493664b00b5d0b238e53 Author: Jan Sokolowski Date: Mon Oct 9 13:08:28 2017 -0700 IB/hfi1: Fix serdes loopback set-up Change serdes mode setting to use MISC_CONFIG_BITS in VERIFY_CAP_LOCAL_LINK_WIDTH register. This method of setting up serdes loopback is universally compatible across all firmware versions. Reviewed-by: Jakub Byczkowski Signed-off-by: Jan Sokolowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 42 +++++++++++++-------------------------- drivers/infiniband/hw/hfi1/chip.h | 3 +++ 2 files changed, 17 insertions(+), 28 deletions(-) commit 1813b3c3fb05f746a7f5502bf4cf95feb9f0241d Author: Shreeya Patel Date: Sat Oct 14 02:05:35 2017 +0530 Staging: irda: Remove trailing whitespace errors Remove trailing whitespace checkpatch errors. Signed-off-by: Shreeya Patel Signed-off-by: Greg Kroah-Hartman drivers/staging/irda/drivers/esi-sir.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 7aebff11afe4f0352af12c762d4db38319da005c Author: Icenowy Zheng Date: Fri Oct 13 19:50:25 2017 +0800 staging: rtl8723bs: hide "nolinked power save" info when not debugging Currently the rtl8723bs driver will print "nolinked power save enter" and "nolinked power save leave" per minute if it's not connected to any network. These messages are meaningless and annoying to regular users. Hide them when it's not debugging. Signed-off-by: Icenowy Zheng Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 76ec4e8ed4040ce2d471211ac463bd73a3b92aa2 Author: Gustavo A. R. Silva Date: Thu Oct 12 11:16:26 2017 -0500 staging: rtl8723bs: rtw_mlme_ext: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d67051abd2e720e00a0b08c60e9e1091bab6e293 Author: Masanari Iida Date: Tue Oct 10 22:47:23 2017 +0900 staging: rtl8723bs: Fix typos in printk This patch fixes typos found in rtl8723bs_xmit.c and odm_DIG.c. Signed-off-by: Masanari Iida Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/odm_DIG.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 42b3b621d981529ee11a8362930b43895730c28c Author: Aishwarya Pant Date: Mon Oct 9 22:21:17 2017 +0530 staging: rtl8723bs: remove implicit int->bool conversions Implicit type conversions are bad; they hinder readability of code and have potential to cause bugs. Here the variable wait_ack is always supplied a bool value while in function declarations it is defined as an int type. Fix it by defining wait_ack a bool type in all usages. Signed-off-by: Aishwarya Pant Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit b739ea41363b81e47bcb6c49d9df32b45259388a Author: Aastha Gupta Date: Sun Oct 8 10:24:56 2017 +0530 staging: rtl8723bs: remove useless variable rtw_AcceptAddbaReq rtw_AcceptAddbaReq is a static variable, it is set once and never modified. It is referenced only once, to assign its value to a member of struct registry_priv. Remove the variable, and move the meaningful part of the comment near the declaration of the relevant field of struct registry_priv. Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/include/drv_types.h | 1 + drivers/staging/rtl8723bs/os_dep/os_intfs.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) commit 2646633f9edb6378f691b867e07478da392aa580 Author: Aastha Gupta Date: Sun Oct 8 10:24:55 2017 +0530 staging: rtl8723bs: rename camelcase bAcceptAddbaReq bAcceptAddbaReq uses camelcase which is not according to Linux kernel coding style. There is a 'bAcceptAddbaReq' field both in struct mlme_ext_info and in struct registry_priv.Rename both of them. Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_btcoex.c | 4 ++-- drivers/staging/rtl8723bs/core/rtw_debug.c | 8 +++++--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 4 ++-- drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +- drivers/staging/rtl8723bs/include/drv_types.h | 2 +- drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 2 +- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 +- 7 files changed, 13 insertions(+), 11 deletions(-) commit 4c249545ab8797568b1bc11db1a01be7037166b2 Author: Aastha Gupta Date: Sun Oct 8 10:24:54 2017 +0530 staging: rtl8723bs: convert type to bool Here the variable bips_processing is always supplied a bool value while inside struct definition it is defined as an uint type. Fix it by defining bips_processing a bool type. Also a restore_iqk_rst = (pwrpriv->bips_processing == true) is same as restore_iqk_rst = pwrpriv->bips_processing Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/hal/sdio_halinit.c | 2 +- drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit dec77f8afedd5365fb9f6af21a5551bf778df68e Author: Aastha Gupta Date: Sun Oct 8 10:24:53 2017 +0530 staging: rtl8723bs: Change type to bool res and Match have only either 'true' or 'false' values. So making them of type bool for better readability of code. Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 77537ebae2c3e1e951a68d20c4ae64f83210df1d Author: Aastha Gupta Date: Sun Oct 8 10:24:52 2017 +0530 staging: rtl8723bs: remove unused variables It seems these two operations are just dead code. The values of these variables are not used subsequently. Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 4 ---- 1 file changed, 4 deletions(-) commit 95b3b4238581e72756505d601948f955e8baccf7 Author: Aastha Gupta Date: Sun Oct 8 10:24:51 2017 +0530 staging: rtl8723bs: remove ternary operators in assignmet statments Remove unnecessary ternary operators in assignments statments. This patch is with the help of following Coccinelle script: @@ expression a, b, c; binary operator op = {==, !=, <=, >=, <, >, &&, ||}; @@ c = - (a op b) ? true : false + a op b Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 5 +++-- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 7 ++----- drivers/staging/rtl8723bs/hal/hal_com.c | 6 +++--- drivers/staging/rtl8723bs/hal/odm_CfoTracking.c | 2 +- drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 2 +- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 2 +- 6 files changed, 11 insertions(+), 13 deletions(-) commit 33536569fa2b4cd4cc812eb2900249d77c904160 Author: Harsha Sharma Date: Sun Oct 8 19:03:06 2017 +0530 staging: rtl8723bs: Add space after ',' Space is required after ',' according to linux-kernel coding style. Signed-off-by: Harsha Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/os_intfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 512bbd7bbf22be778ee4b78a75a40e0e4c1a6d71 Author: Srishti Sharma Date: Sun Oct 8 02:03:24 2017 +0530 Staging: rtl8723bs: core: rtw_cmd: Remove cast to pointer types in kfree The cast to pointer types in kfree is not needed and can be dropped. This was done using the following semantic patch by coccinelle, except kfree((unsigned char*) pcmd->parmbuf) which was transformed by hand because coccinelle didn't have enough type information. @r@ type T,P; T* x; @@ kfree( -(P *) x ) Signed-off-by: Srishti Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_cmd.c | 60 ++++++++++++++++---------------- 1 file changed, 30 insertions(+), 30 deletions(-) commit 31d1d3c8862e88c8db1b0c9a560f2a76b1a4972b Author: Juha-Pekka Heikkila Date: Tue Oct 17 23:08:11 2017 +0300 drm/i915: adjust get_crtc_fence_y_offset() to use base.y instead of crtc.y This is to use clipped y coordinate here. I left get_crtc_fence_y_offset() function itself in place as oneliner to maintain comment above it why this is done. Signed-off-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1508270891-22186-6-git-send-email-juhapekka.heikkila@gmail.com drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_fbc.c | 10 ++++------ 2 files changed, 6 insertions(+), 6 deletions(-) commit 779d4d8f083e46364cc9b2c784cf8ad6ab3d3aa5 Author: Juha-Pekka Heikkila Date: Tue Oct 17 23:08:10 2017 +0300 drm/i915: Unify skylake plane disable Don't handle skylake primary plane separately as it is similar plane as the others. Signed-off-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1508270891-22186-5-git-send-email-juhapekka.heikkila@gmail.com drivers/gpu/drm/i915/intel_display.c | 21 ++------------------- drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_sprite.c | 2 +- 3 files changed, 4 insertions(+), 20 deletions(-) commit 542befbb18056c4fda7b458aa6146a52b2fd389c Merge: f0e0ada 3763492 Author: Philipp Zabel Date: Wed Oct 18 15:55:44 2017 +0200 Merge branch 'reset/arc' into reset/next Merge the AXS10x driver, which is also merged into git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc.git for-next commit 9a8cc576002aa4ad18edac6a6d4c46ea6eab416b Author: Juha-Pekka Heikkila Date: Tue Oct 17 23:08:09 2017 +0300 drm/i915: Unify skylake plane update Don't handle skylake primary plane separately as it is similar plane as the others. Signed-off-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1508270891-22186-4-git-send-email-juhapekka.heikkila@gmail.com drivers/gpu/drm/i915/intel_display.c | 75 +----------------------------------- drivers/gpu/drm/i915/intel_drv.h | 3 ++ drivers/gpu/drm/i915/intel_sprite.c | 2 +- 3 files changed, 6 insertions(+), 74 deletions(-) commit e288881b08dc2627dda6f93ce1d406ba4dc0f143 Author: Juha-Pekka Heikkila Date: Tue Oct 17 23:08:08 2017 +0300 drm/i915: dspaddr_offset doesn't need to be more than local variable Move u32 dspaddr_offset from struct intel_crtc member into local variable in i9xx_update_primary_plane() Signed-off-by: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1508270891-22186-3-git-send-email-juhapekka.heikkila@gmail.com drivers/gpu/drm/i915/intel_display.c | 15 ++++++--------- drivers/gpu/drm/i915/intel_drv.h | 5 ----- 2 files changed, 6 insertions(+), 14 deletions(-) commit 8d8825b420ffb370b0a57ba764828efd08738ba0 Author: Alfonso Lima Astor Date: Tue Oct 17 18:46:29 2017 +0100 staging: fbtft: differentiate between buffer and data types to fix sparse warning sparse was complaning about an incorrect type cast: drivers/staging/fbtft/fbtft-bus.c:60:1: warning: incorrect type in assignment (different base types) drivers/staging/fbtft/fbtft-bus.c:60:1: expected unsigned short [unsigned] [short] [usertype] drivers/staging/fbtft/fbtft-bus.c:60:1: got restricted __be16 [usertype] drivers/staging/fbtft/fbtft-bus.c:60:1: warning: incorrect type in assignment (different base types) drivers/staging/fbtft/fbtft-bus.c:60:1: expected unsigned short [unsigned] [short] [usertype] drivers/staging/fbtft/fbtft-bus.c:60:1: got restricted __be16 [usertype] The solution is to add an extra parameter to the macro to differentiate between buffer type and data type. Cc: Thomas Petazzoni Signed-off-by: Alfonso Lima Astor Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fbtft-bus.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 4aca3ca4b793e941eea162dc1bfb6df8c12c29a2 Author: Aastha Gupta Date: Sat Oct 7 20:17:18 2017 +0530 staging: fbtft: remove unnecessary parantheses around assignment Parentheses are not needed around the right hand side of an assignment. This patch is done using Coccinelle: @@ expression a, b; @@ b = -( a -) Signed-off-by: Aastha Gupta Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_uc1611.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db8c7f2b6443f2f255f6e8cd2c594ea9beec8fb5 Author: Marcin Ciupak Date: Wed Oct 11 21:24:40 2017 +0200 staging: pi433: rf69.c style fix - space before asterisk This patch fixes the following checkpatch.pl error: ERROR: "(foo*)" should be "(foo *)" in rf69.c file as requested by TODO file. Additionally some style warnings remain valid here and could be fixed by another patch. Signed-off-by: Marcin Ciupak Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/rf69.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3fbc42249ebccb132808133f0fb72df029eb6a6 Author: Marcin Ciupak Date: Wed Oct 11 21:24:17 2017 +0200 staging: pi433: rf69.c style fix - code indent should use tabs This patch fixes the following checkpatch.pl error: ERROR: code indent should use tabs where possible in rf69.c file as requested by TODO file. Additionally some style warnings remain valid here and could be fixed by another patch. Signed-off-by: Marcin Ciupak Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/rf69.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 329822a02fd25948ac22562cf3cc6acd7f7ba542 Author: Marcin Ciupak Date: Wed Oct 11 21:24:01 2017 +0200 staging: pi433: rf69.c style fix - spaces before/after his patch fixes the following checkpatch.pl errors: ERROR: space prohibited after that open parenthesis '(' ERROR: space prohibited before that ',' (ctx:WxV) ERROR: space prohibited before that close parenthesis ')' ERROR: space required after that ',' (ctx:VxV) ERROR: space required before the open parenthesis '(' in rf69.c file as requested by TODO file. Additionally some style warnings remain valid here and could be fixed by another patch. Signed-off-by: Marcin Ciupak Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/rf69.c | 154 +++++++++++++++++++++---------------------- 1 file changed, 77 insertions(+), 77 deletions(-) commit 308d32efc4c7609efc34a289d0a7f0a632f67f3b Author: Marcin Ciupak Date: Wed Oct 11 21:23:39 2017 +0200 staging: pi433: rf69.c style fix - spaces required around This patch fixes the following checkpatch.pl errors: ERROR: spaces required around that '+=' (ctx:WxV) ERROR: spaces required around that '=' (ctx:VxV) ERROR: spaces required around that '<' (ctx:VxV) in rf69.c file as requested by TODO file. Additionally some style warnings remain valid here and could be fixed by another patch. Signed-off-by: Marcin Ciupak Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/rf69.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 4a74749a50a8f143df53a9ff139236790f1f6fd3 Author: Marcin Ciupak Date: Wed Oct 11 21:23:26 2017 +0200 staging: pi433: rf69.c style fix - trailing statements This patch fixes the following checkpatch.pl error: ERROR: trailing statements should be on next line in rf69.c file as requested by TODO file. Note: ERROR: spaces required around that '=' (ctx:VxV) remains valid here and is going to be fixed by the next patch in set. Additionally some style warnings remain valid here and could be fixed by another patch. Signed-off-by: Marcin Ciupak Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/rf69.c | 58 +++++++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 17 deletions(-) commit 69af5d92da20f9e0487f33623627e5b9068dfd5c Author: Srishti Sharma Date: Sun Oct 8 01:27:05 2017 +0530 Staging: pi433: Fix the position of brace after if Fix the position of the brace after if when it is on the next line. Done using the following semantic patch by coccinelle. @r1@ position p1, p2; @@ if(...)@p1 {@p2 ... } @script: python r2@ p1 << r1.p1; p2 << r1.p2; @@ l1 = int (p1[0].line) l2 = int (p2[0].line) c1 = int (p1[0].column_end) c2 = int (p2[0].column) if l1 == l2 and c1+1 == c2: cocci.include_match(False) @r3@ position r1.p1, r1.p2; @@ if(... - )@p1 -{@p2 +) { ... } Signed-off-by: Srishti Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/pi433_if.c | 54 ++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 36 deletions(-) commit 38b2b2e8226e5f340935bb84d50c071bc513d296 Author: Frank A. Cancio Bello Date: Tue Oct 17 18:07:18 2017 -0400 staging: rtlwifi: phydm: Remove useless parentheses Remove unnecessary parentheses to comply with preferred coding style for the linux kernel and avoid the following checkpatch's message: 'CHECK: Unnecessary parentheses around'. Credits to checkpatch. Signed-off-by: Frank A. Cancio Bello Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/phydm/halphyrf_ce.c | 2 +- drivers/staging/rtlwifi/phydm/phydm.c | 8 ++++---- drivers/staging/rtlwifi/phydm/phydm_adaptivity.c | 4 ++-- drivers/staging/rtlwifi/phydm/phydm_debug.c | 8 ++++---- drivers/staging/rtlwifi/phydm/phydm_dig.c | 22 +++++++++++----------- 5 files changed, 22 insertions(+), 22 deletions(-) commit a221cb0911b8276da2f0b65ddcce6d0df699886f Author: Frank A. Cancio Bello Date: Tue Oct 17 17:12:03 2017 -0400 staging: rtlwifi: Remove unnecessary parentheses Remove unnecessary parentheses to comply with preferred coding style for the linux kernel and avoid the following checkpatch's message: 'CHECK: Unnecessary parentheses around'. Credits to checkpatch. Signed-off-by: Frank A. Cancio Bello Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/base.c | 30 +++++++++++++++--------------- drivers/staging/rtlwifi/core.c | 24 ++++++++++++------------ drivers/staging/rtlwifi/debug.c | 4 ++-- drivers/staging/rtlwifi/rc.c | 12 ++++++------ 4 files changed, 35 insertions(+), 35 deletions(-) commit df0f0e71fcaa2c2af77e189ef1b85330d8d33edc Author: Larry Finger Date: Sat Oct 14 20:58:21 2017 -0500 rtlwifi: Fix typo in if ... else if ... else construct The kbuild test robot reports two conditions with no effect (if == else). These are the result of copy and paste typographical errors. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Cc: kbuild-all@01.org Cc: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7d2e2a881c2c96e82229faa69d3df2c622f01420 Author: Gustavo A. R. Silva Date: Thu Oct 12 11:17:15 2017 -0500 staging: rtlwifi: halmac: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/halmac/rtl_halmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 640019bba41942b7ee99385abe068e0f7c3e736d Author: Gustavo A. R. Silva Date: Tue Oct 10 14:01:16 2017 -0500 staging: rtlwifi: mark expected switch fall-through in rtl_make_smps_action In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/base.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f8af6a323368dd28fcea9742d582593c9adb2261 Author: Kees Cook Date: Mon Oct 16 16:25:12 2017 -0700 staging: rtlwifi: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Also drops unused odm timer code. Cc: Greg Kroah-Hartman Cc: Larry Finger Cc: Kalle Valo Cc: Ping-Ke Shih Cc: shaofu Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/base.c | 21 +++++++++++---------- drivers/staging/rtlwifi/base.h | 4 ++-- drivers/staging/rtlwifi/core.c | 2 +- drivers/staging/rtlwifi/phydm/phydm_interface.c | 23 ----------------------- drivers/staging/rtlwifi/phydm/phydm_interface.h | 11 ----------- drivers/staging/rtlwifi/ps.c | 2 +- 6 files changed, 15 insertions(+), 48 deletions(-) commit f0e0ada67dfd8342fd411da6e3bff10ff9bcc97b Author: Philipp Zabel Date: Fri Aug 11 13:03:05 2017 +0200 reset: zx2967: use the reset-simple driver The reset-simple driver can be used without changes. Signed-off-by: Philipp Zabel Reviewed-by: Alexandru Gagniuc MAINTAINERS | 1 - drivers/reset/Kconfig | 10 +---- drivers/reset/Makefile | 1 - drivers/reset/reset-simple.c | 2 + drivers/reset/reset-zx2967.c | 99 -------------------------------------------- 5 files changed, 4 insertions(+), 109 deletions(-) commit 0af8a137361330af644ae9a3475b328a1dfb7945 Author: Philipp Zabel Date: Fri Aug 11 13:02:47 2017 +0200 reset: stm32: use the reset-simple driver The reset-simple driver can be used without changes. Signed-off-by: Philipp Zabel Acked-by: Gabriel Fernandez drivers/reset/Kconfig | 11 ++--- drivers/reset/Makefile | 1 - drivers/reset/reset-simple.c | 1 + drivers/reset/reset-stm32.c | 108 ------------------------------------------- 4 files changed, 4 insertions(+), 117 deletions(-) commit adf20d7ce7c3591e049910c7760edd9c7da4a246 Author: Philipp Zabel Date: Fri Aug 11 13:02:19 2017 +0200 reset: socfpga: use the reset-simple driver Add reset line status readback, inverted status support, and socfpga device tree quirks to the simple reset driver, and use it to replace the socfpga driver. Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 10 +-- drivers/reset/Makefile | 1 - drivers/reset/reset-simple.c | 51 +++++++++++++- drivers/reset/reset-simple.h | 4 ++ drivers/reset/reset-socfpga.c | 157 ------------------------------------------ 5 files changed, 56 insertions(+), 167 deletions(-) commit bf0a5d4b223dfe523eb5191d0cb428f63cf04e2e Author: Juha-Pekka Heikkila Date: Tue Oct 17 23:08:07 2017 +0300 drm/i915: move adjusted_x/y from crtc to cache. Move adjusted_x/y from crtc to fbc cache. Signed-off-by: Juha-Pekka Heikkila Link: https://patchwork.freedesktop.org/patch/msgid/1508270891-22186-2-git-send-email-juhapekka.heikkila@gmail.com [vsyrjala: Add rudimentary commit message] Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/i915_drv.h | 8 ++++++++ drivers/gpu/drm/i915/intel_display.c | 6 ------ drivers/gpu/drm/i915/intel_drv.h | 2 -- drivers/gpu/drm/i915/intel_fbc.c | 11 ++++++++--- 4 files changed, 16 insertions(+), 11 deletions(-) commit 682455befdc549bee146502d541a9a0c63f298de Author: Anton Dozenko Date: Thu Oct 5 11:39:08 2017 +0100 staging: comedi: adv_pci_dio: update for PCI-1761 Advantech PCI-1761 device support to the driver adv_pci_dio has been added. Patch has been successfully tested on a real card (8 digital outs, 8 digital inputs). Signed-off-by: Anton Dozenko Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/Kconfig | 4 ++-- drivers/staging/comedi/drivers/adv_pci_dio.c | 26 ++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) commit 526739265e5eb984f6f7114b17e63c5654ca1b93 Author: Arvind Yadav Date: Fri Oct 6 23:55:56 2017 +0530 staging: comedi: dt282x: fix IRQ assignment for dev->irq. Here, dev->irq is not assigned with irq. comedi_legacy_detach() is using dev->irq for release irq and dt282x_attach() is using dev->irq for initialize comedi_subdevice. Signed-off-by: Arvind Yadav Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/dt282x.c | 2 ++ 1 file changed, 2 insertions(+) commit 0cb7e343dec26a896d954419022c5ff1510d5aea Author: Gustavo A. R. Silva Date: Thu Oct 12 11:16:37 2017 -0500 staging: comedi: s526: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/s526.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e44d4907f8b0f54d3aa0d057302f95df804aa171 Author: Kees Cook Date: Mon Oct 16 16:25:03 2017 -0700 staging/comedi: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Adds pointer back to comedi device from private struct. Cc: H Hartley Sweeten Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/comedi_test.c | 18 ++++++++++-------- drivers/staging/comedi/drivers/das16.c | 11 ++++++----- drivers/staging/comedi/drivers/jr3_pci.c | 10 ++++++---- 3 files changed, 22 insertions(+), 17 deletions(-) commit f67ffd615805166927e84b2b3438bde42bd57b62 Author: Gustavo A. R. Silva Date: Thu Oct 12 11:16:17 2017 -0500 staging: rtl8192e: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_wx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c476b2ec7011fc392c3a35a736181c9a6154acb8 Author: Mihaela Muraru Date: Sat Oct 14 23:23:28 2017 +0300 staging: rtl8192e: Use __func__ instead of function name Use identifier __func__ instead of the name of the function. Issue found by checkpatch.pl. Signed-off-by: Mihaela Muraru Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/dot11d.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 96bc1f2ae0171d1a24a5cedf6a0b0de8d1e8c406 Author: Kees Cook Date: Mon Oct 16 16:24:50 2017 -0700 staging: rtl8192e: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Greg Kroah-Hartman Cc: Derek Robson Cc: Suniel Mahesh Cc: Malcolm Priestley Cc: Gargi Sharma Cc: Julia Lawall Cc: "David S. Miller" Cc: Johannes Berg Cc: Yamanappagouda Patil Cc: Georgiana Rodica Chelu Cc: Colin Ian King Cc: Baoyou Xie Cc: devel@driverdev.osuosl.org Cc: Greg Kroah-Hartman Cc: Derek Robson Cc: Suniel Mahesh Cc: Malcolm Priestley Cc: Gargi Sharma Cc: Julia Lawall Cc: Yamanappagouda Patil Cc: "David S. Miller" Cc: Johannes Berg Cc: Georgiana Rodica Chelu Cc: Colin Ian King Cc: Baoyou Xie Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 25 ++++++------- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 11 +++--- drivers/staging/rtl8192e/rtl8192e/rtl_pm.c | 2 +- drivers/staging/rtl8192e/rtl819x_BAProc.c | 15 +++++--- drivers/staging/rtl8192e/rtl819x_TSProc.c | 56 ++++++++++++---------------- drivers/staging/rtl8192e/rtllib.h | 6 +-- drivers/staging/rtl8192e/rtllib_softmac.c | 18 ++++----- 8 files changed, 61 insertions(+), 74 deletions(-) commit d2e5af14fc8e70e76a0dfbb91d910ef74bb0eead Author: Kees Cook Date: Mon Oct 16 16:24:46 2017 -0700 staging: rtl8192u: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Greg Kroah-Hartman Cc: Derek Robson Cc: simran singhal Cc: Riccardo Marotti Cc: Fabrizio Perria Cc: Arnd Bergmann Cc: Baoyou Xie Cc: Tuomo Rinne Cc: Colin Ian King Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 6 +-- .../staging/rtl8192u/ieee80211/ieee80211_crypt.c | 4 +- .../staging/rtl8192u/ieee80211/ieee80211_crypt.h | 2 +- .../staging/rtl8192u/ieee80211/ieee80211_module.c | 4 +- .../staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 12 +++--- .../staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 46 +++++++++++----------- drivers/staging/rtl8192u/r8192U_core.c | 11 +++--- drivers/staging/rtl8192u/r8192U_dm.c | 9 ++--- drivers/staging/rtl8192u/r8192U_dm.h | 2 +- 9 files changed, 46 insertions(+), 50 deletions(-) commit fd5b9b83d8226a2e50ba7c01818ca4ee3dd7aa6b Author: Gustavo A. R. Silva Date: Thu Oct 12 11:16:56 2017 -0500 staging: rtl8188eu: usb_ops_linux: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1077613 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 1 + 1 file changed, 1 insertion(+) commit 40f0745bb38ef7964fca6591f744419a66f51966 Author: Gustavo A. R. Silva Date: Thu Oct 12 11:16:42 2017 -0500 staging: rtl8188eu: usb_halinit: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1373894 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/usb_halinit.c | 1 + 1 file changed, 1 insertion(+) commit f3691e0042071812556f5444a944a175ca9746c6 Author: Jia-Ju Bai Date: Sun Oct 8 19:54:53 2017 +0800 rtl8188eu: Fix a possible sleep-in-atomic bug in _rtw_pwr_wakeup The driver may sleep under a spinlock, and the function call path is: rtw_set_802_11_disassociate(acquire the spinlock) _rtw_pwr_wakeup usleep_range --> may sleep To fix it, usleep_range is replaced with udelay. This bug is found by my static analysis tool and my code review. Signed-off-by: Jia-Ju Bai Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2bf9806d4228f7a6195f8e03eda0479d2a93b411 Author: Jia-Ju Bai Date: Sun Oct 8 19:54:45 2017 +0800 rtl8188eu: Fix a possible sleep-in-atomic bug in rtw_createbss_cmd The driver may sleep under a spinlock, and the function call path is: rtw_surveydone_event_callback(acquire the spinlock) rtw_createbss_cmd kzalloc(GFP_KERNEL) --> may sleep To fix it, GFP_KERNEL is replaced with GFP_ATOMIC. This bug is found by my static analysis tool and my code review. Signed-off-by: Jia-Ju Bai Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08880f8e08cbd814e870e9d3ab9530abc1bce226 Author: Jia-Ju Bai Date: Sun Oct 8 19:54:07 2017 +0800 rtl8188eu: Fix a possible sleep-in-atomic bug in rtw_disassoc_cmd The driver may sleep under a spinlock, and the function call path is: rtw_set_802_11_bssid(acquire the spinlock) rtw_disassoc_cmd kzalloc(GFP_KERNEL) --> may sleep To fix it, GFP_KERNEL is replaced with GFP_ATOMIC. This bug is found by my static analysis tool and my code review. Signed-off-by: Jia-Ju Bai Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf2bfebcc39f8d80273abdbafcd581b6bb148dc2 Author: Aastha Gupta Date: Thu Oct 5 18:36:25 2017 +0530 staging: rtl8188eu: add spaces around algebric and boolean operators This patch fixes checkpatch.pl warnings about preferring spaces around algebric and boolean operators. Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/rtl8188e_spec.h | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 0443936b9bc2d705aeae175186d1bb5f1739e8b9 Author: Aastha Gupta Date: Thu Oct 5 18:36:24 2017 +0530 staging: rtl8188eu: fix spaces before tabs This patch fixes checkpatch.pl warning: WARNING: please, no space before tabs Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/odm.h | 4 ++-- drivers/staging/rtl8188eu/include/rtl8188e_hal.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 1f8b98943ba4c37e4d44438b347efdd037eccd57 Author: Aastha Gupta Date: Thu Oct 5 18:36:22 2017 +0530 staging: rtl8188eu: fix space between function name and '(' This patch fixes checkpatch.pl warning: WARNING: space prohibited between function name and open parenthesis '(' Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/osdep_intf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c201c91799d687c0a6d8c3272950f51aad5ffebe Author: Thomas Gleixner Date: Tue Oct 17 09:54:59 2017 +0200 x86/vector/msi: Select CONFIG_GENERIC_IRQ_RESERVATION_MODE Select CONFIG_GENERIC_IRQ_RESERVATION_MODE so PCI/MSI domains get the MSI_FLAG_MUST_REACTIVATE flag set in pci_msi_create_irq_domain(). Remove the explicit setters of this flag in the apic/msi code as they are not longer required. Fixes: 4900be83602b ("x86/vector/msi: Switch to global reservation mode") Reported-and-tested-by: Dexuan Cui Signed-off-by: Thomas Gleixner Cc: Josh Poulson Cc: Mihai Costache Cc: Stephen Hemminger Cc: Marc Zyngier Cc: linux-pci@vger.kernel.org Cc: Haiyang Zhang Cc: Simon Xiao Cc: Saeed Mahameed Cc: Jork Loeser Cc: Bjorn Helgaas Cc: devel@linuxdriverproject.org Cc: KY Srinivasan Link: https://lkml.kernel.org/r/20171017075600.527569354@linutronix.de arch/x86/Kconfig | 1 + arch/x86/kernel/apic/msi.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) commit 25e960efc63852b84d1c3739aef586285b177395 Author: Thomas Gleixner Date: Tue Oct 17 09:54:58 2017 +0200 PCI/MSI: Set MSI_FLAG_MUST_REACTIVATE in core code If interrupt reservation mode is enabled then the PCI/MSI interrupts must be reactivated after early activation. Make sure that all callers of pci_msi_create_irq_domain() have the MSI_FLAG_MUST_REACTIVATE set when reservation mode is enabled. Signed-off-by: Thomas Gleixner Cc: Josh Poulson Cc: Mihai Costache Cc: Stephen Hemminger Cc: Marc Zyngier Cc: linux-pci@vger.kernel.org Cc: Haiyang Zhang Cc: Dexuan Cui Cc: Simon Xiao Cc: Saeed Mahameed Cc: Jork Loeser Cc: Bjorn Helgaas Cc: devel@linuxdriverproject.org Cc: KY Srinivasan Link: https://lkml.kernel.org/r/20171017075600.448649905@linutronix.de drivers/pci/msi.c | 2 ++ 1 file changed, 2 insertions(+) commit 2b5175c4fa974b6aa05bbd2ee8d443a8036a1714 Author: Thomas Gleixner Date: Tue Oct 17 09:54:57 2017 +0200 genirq: Add config option for reservation mode The interrupt reservation mode requires reactivation of PCI/MSI interrupts. Create a config option, so the PCI code can set the corresponding flag when required. Signed-off-by: Thomas Gleixner Cc: Josh Poulson Cc: Mihai Costache Cc: Stephen Hemminger Cc: Marc Zyngier Cc: linux-pci@vger.kernel.org Cc: Haiyang Zhang Cc: Dexuan Cui Cc: Simon Xiao Cc: Saeed Mahameed Cc: Jork Loeser Cc: Bjorn Helgaas Cc: devel@linuxdriverproject.org Cc: KY Srinivasan Link: https://lkml.kernel.org/r/20171017075600.369375409@linutronix.de kernel/irq/Kconfig | 3 +++ 1 file changed, 3 insertions(+) commit f6cadc1bb9cc520fc3d3f20da25538e164af8eec Author: Aastha Gupta Date: Thu Oct 5 18:36:21 2017 +0530 staging: rtl8188eu: fix block comment styling in rtl8188eu files This patch fixes checkpatch.pl warnings for block comment styling. 1. Block comment use a trailing */ on a separate line. 2. Block comment use * on subsequent lines. 3. Block comment should align * on each line. Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h | 33 ++- drivers/staging/rtl8188eu/include/Hal8188EPhyReg.h | 3 +- .../rtl8188eu/include/Hal8188ERateAdaptive.h | 28 +-- drivers/staging/rtl8188eu/include/basic_types.h | 14 +- drivers/staging/rtl8188eu/include/drv_types.h | 3 +- drivers/staging/rtl8188eu/include/hal_intf.h | 6 +- drivers/staging/rtl8188eu/include/ieee80211.h | 30 +-- drivers/staging/rtl8188eu/include/odm.h | 40 ++-- drivers/staging/rtl8188eu/include/pwrseq.h | 44 ++-- drivers/staging/rtl8188eu/include/rtl8188e_hal.h | 21 +- drivers/staging/rtl8188eu/include/rtl8188e_spec.h | 117 ++++++----- drivers/staging/rtl8188eu/include/rtw_cmd.h | 222 +++++++++++---------- drivers/staging/rtl8188eu/include/rtw_eeprom.h | 9 +- drivers/staging/rtl8188eu/include/rtw_event.h | 40 ++-- drivers/staging/rtl8188eu/include/rtw_led.h | 6 +- drivers/staging/rtl8188eu/include/rtw_mlme.h | 38 ++-- drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 27 ++- .../staging/rtl8188eu/include/rtw_mp_phy_regdef.h | 19 +- drivers/staging/rtl8188eu/include/rtw_pwrctrl.h | 22 +- drivers/staging/rtl8188eu/include/rtw_qos.h | 3 +- drivers/staging/rtl8188eu/include/rtw_recv.h | 80 ++++---- drivers/staging/rtl8188eu/include/rtw_rf.h | 6 +- drivers/staging/rtl8188eu/include/rtw_security.h | 27 ++- drivers/staging/rtl8188eu/include/rtw_xmit.h | 12 +- drivers/staging/rtl8188eu/include/sta_info.h | 12 +- drivers/staging/rtl8188eu/include/wifi.h | 25 ++- drivers/staging/rtl8188eu/include/wlan_bssdef.h | 22 +- 27 files changed, 514 insertions(+), 395 deletions(-) commit 0bb73711b7dd65f101413338ae8f2e566c5946d4 Author: Aastha Gupta Date: Wed Oct 18 17:44:22 2017 +0530 staging: lustre: fix comparisons should place the constant on the right side This patch fixes checkpatch.pl warning: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/include/lu_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b66d8eb321c6e8194e02db5b467aaa9dc0b00c0 Author: Aastha Gupta Date: Wed Oct 18 17:44:21 2017 +0530 staging: lustre: fix incorrect multi-line comment style This patch fixes the checkpatch.pl warning: WARNING: block comments use a trailing */ on a separate line Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman .../lustre/lustre/include/lustre_dlm_flags.h | 6 ++- .../staging/lustre/lustre/include/lustre_errno.h | 51 ++++++++-------------- 2 files changed, 21 insertions(+), 36 deletions(-) commit bb1960bbcf75f48e6aead8e542c2c99190e823a1 Author: Frank A. Cancio Bello Date: Tue Oct 17 23:37:21 2017 -0400 staging: rtlwifi: rtl8822be: Align the * in block comment Align the * on each line of a block comment to comply with kernel coding style and address the following checkpatch message: 'WARNING: Block comments should align the * on each line'. Credits to checkpatch. Signed-off-by: Frank A. Cancio Bello Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/rtl8822be/phy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d8f36e803a9c40e5461ec651b114a3d42d5c777d Author: Frank A. Cancio Bello Date: Tue Oct 17 23:35:51 2017 -0400 staging: rtlwifi: rtl8822be: Remove useless parentheses Remove unnecessary parentheses to comply with preferred coding style for the linux kernel and avoid the following checkpatch's message: 'CHECK: Unnecessary parentheses around'. Credits to checkpatch. Signed-off-by: Frank A. Cancio Bello Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/rtl8822be/fw.c | 4 ++-- drivers/staging/rtlwifi/rtl8822be/led.c | 2 +- drivers/staging/rtlwifi/rtl8822be/phy.c | 10 +++++----- drivers/staging/rtlwifi/rtl8822be/trx.c | 18 +++++++++--------- 4 files changed, 17 insertions(+), 17 deletions(-) commit 778fbddd31af61fff31774300bd4203b23893932 Author: Frank A. Cancio Bello Date: Tue Oct 17 23:33:06 2017 -0400 staging: rtlwifi: rtl8822be: Use __func__ instead of hardcoded name Switch hardcoded function name with a reference to __func__ making the code more maintenable and addressing the checkpatch warning: WARNING: Prefer using '"%s...", __func__' to using 'rtl8822be_sc_mapping', this function's name, in a string + "rtl8822be_sc_mapping: Not Correct Primary40MHz Setting\n"); Credits to checkpatch. Signed-off-by: Frank A. Cancio Bello Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/rtl8822be/trx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 85d007756f7e284da9e2e043b15d9a5cca5fb429 Author: Frank A. Cancio Bello Date: Tue Oct 17 23:30:20 2017 -0400 staging: rtlwifi: rtl8822be: Balance braces in else statement Add braces to else statements to comply with section 3) of 'Linux kernel coding style' and avoid the following checkpatch message: 'CHECK: Unbalanced braces around else statement' Credits to checkpatch. Signed-off-by: Frank A. Cancio Bello Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/rtl8822be/fw.c | 3 ++- drivers/staging/rtlwifi/rtl8822be/phy.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 43d15c2013130a9fa230c2f5203aca818ae0bb86 Author: Larry Finger Date: Sat Sep 23 19:36:04 2017 -0500 staging: rtl8822be: Keep array subscript no lower than zero The kbuild test robot reports the following: drivers/staging//rtlwifi/phydm/phydm_dig.c: In function 'odm_pause_dig': drivers/staging//rtlwifi/phydm/phydm_dig.c:494:45: warning: array subscript is below array bounds [-Warray-bounds] odm_write_dig(dm, dig_tab->pause_dig_value[max_level]); This condition is caused when a loop falls through. The fix is to pin max_level to be >= 0. Signed-off-by: Larry Finger c: kbuild test robot Fixes: 9ce99b04b5b82fdf11e4c76b60a5f82c1e541297 staging: r8822be: Add phydm mini driver Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/phydm/phydm_dig.c | 2 ++ 1 file changed, 2 insertions(+) commit 78cd0ddc67775df4e6a2c9b4da8cb26b19d61f8d Author: Suniel Mahesh Date: Wed Oct 18 12:11:55 2017 +0530 staging: ccree: fix boolreturn.cocci warning This fixes the following coccinelle warning: WARNING: return of 0/1 in function 'ssi_is_hw_key' with return type bool. return "false" instead of 0. Signed-off-by: Suniel Mahesh Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_cipher.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8fc9772543e860461d06a79cc4a3d8dcf62a40fd Author: Suniel Mahesh Date: Wed Oct 18 07:40:14 2017 +0530 staging: ccree: Fix bool comparison Comparision operator "equal to" not required on a variable "foo" of type "bool". Bool has only two values, can be used directly or with logical not. This fixes the following coccinelle warning: WARNING: Comparison of bool to 0/1 Signed-off-by: Suniel Mahesh Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_request_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37ba0e399c4cc8590d092e5f11b499dc372f75a4 Author: Rishabh Hardas Date: Thu Oct 12 18:06:53 2017 +0530 staging/ccree: Declare compiled out functions static inline Sparse was giving out a warning for symbols 'cc_set_ree_fips_status' and 'fips_handler' that they were not declared and need to be made static. This patch makes both the symbols static inline, to remove the warnings. Signed-off-by: Rishabh Hardas Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_fips.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b7749656e946884271fca142b2a492249fc63feb Author: Kees Cook Date: Mon Oct 16 16:24:41 2017 -0700 staging: rtl8188eu: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Greg Kroah-Hartman Cc: Juliana Rodrigues Cc: Ivan Safonov Cc: Gargi Sharma Cc: sayli karnik Cc: Yamanappagouda Patil Cc: Luca Ceresoli Cc: Victor Carvajal Cc: Sebastian Haas Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_led.c | 7 +++---- drivers/staging/rtl8188eu/core/rtw_mlme.c | 15 +++++++++------ drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 14 ++++++++------ drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 11 ++++++----- drivers/staging/rtl8188eu/core/rtw_recv.c | 17 +++++++++-------- drivers/staging/rtl8188eu/include/rtw_led.h | 1 - drivers/staging/rtl8188eu/include/rtw_mlme.h | 6 +++--- drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 6 +++--- drivers/staging/rtl8188eu/include/rtw_recv.h | 2 +- drivers/staging/rtl8188eu/os_dep/mlme_linux.c | 19 +++++++------------ drivers/staging/rtl8188eu/os_dep/recv_linux.c | 5 ++--- 11 files changed, 51 insertions(+), 52 deletions(-) commit c8454682c71ad66f7307fad547d5f7c57d6d3bf0 Author: Gustavo A. R. Silva Date: Thu Oct 12 11:17:43 2017 -0500 staging: lustre: rpc: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1077604 Addresses-Coverity-ID: 1077605 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/rpc.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit d227bd400c8649a5bcc47568abbd039bd7b141b2 Author: Gustavo A. R. Silva Date: Thu Oct 12 11:17:39 2017 -0500 staging: lustre: ptlrpc: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e2c32387691cc2a28d5a483c9cdd3cdb41c6928d Author: Gustavo A. R. Silva Date: Thu Oct 12 11:17:36 2017 -0500 staging: lustre: osc: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1077598 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/osc/osc_cache.c | 1 + 1 file changed, 1 insertion(+) commit be7a34f4eda0fd542db5a242a0a197e0db8f5779 Author: Gustavo A. R. Silva Date: Thu Oct 12 11:17:32 2017 -0500 staging: lustre: ldlm: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 1 + 1 file changed, 1 insertion(+) commit 6efc6b8a608a1936dd57e9f54e59d684aae1c282 Author: Gustavo A. R. Silva Date: Thu Oct 12 11:17:29 2017 -0500 staging: lustre: lprocfs: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1271166 Addresses-Coverity-ID: 1271167 Addresses-Coverity-ID: 1271168 Addresses-Coverity-ID: 1271169 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 4 ++++ 1 file changed, 4 insertions(+) commit 207f6b61bf2db1f77c8d4c9b08c36347c5c069a3 Author: Gustavo A. R. Silva Date: Thu Oct 12 11:17:23 2017 -0500 staging: lustre: llite: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/llite/namei.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f85dff843ceee459ff9d0b99887a45555020ce3a Author: Gustavo A. R. Silva Date: Thu Oct 12 11:17:19 2017 -0500 staging: lustre: lnet: selftest: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/module.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7a6d76a9b4a50a7927f7ce61cee3cfbdfbfc3d47 Author: Gustavo A. R. Silva Date: Thu Oct 12 11:17:12 2017 -0500 staging: lustre: lnet: selftest: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/selftest/conctl.c | 1 + 1 file changed, 1 insertion(+) commit 503764ec2643212f60a0029fb90e3373e1bd0c1e Author: Gustavo A. R. Silva Date: Thu Oct 12 11:16:32 2017 -0500 staging: lustre: lnet: net_fault: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/net_fault.c | 1 + 1 file changed, 1 insertion(+) commit 96aff92b31e37a02d0679e5f1043a145bc148597 Author: Gustavo A. R. Silva Date: Thu Oct 12 11:16:08 2017 -0500 staging: lustre: lnet: socklnd: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c310ce4dcb9df9b2f1be82caff7dae609fe53f72 Author: Zhenzhong Duan Date: Sun Oct 8 20:55:59 2017 -0700 timers: Avoid an unnecessary iteration in __run_timers() If the base clock is behind jiffies in the soft irq expiry code then the next timer is retrieved by get_next_timer_interrupt() to avoid incrementing base clock one by one. If the next timer interrupt is past current jiffies then the base clock is set to jiffies - 1. At the call site this is incremented and another iteration through the expiry loop is executed which checks empty hash buckets. That's a pointless excercise because it's already known that the next timer is past jiffies. Set the base clock in that case to jiffies directly so it gets incremented to jiffies + 1 at the call site resulting in immediate termination of the expiry loop. [ tglx: Massaged changelog and added comment to the code ] Signed-off-by: Zhenzhong Duan Signed-off-by: Thomas Gleixner Acked-by: Anna-Maria Gleixner Cc: Joe Jin Cc: sboyd@codeaurora.org Cc: Srinivas Reddy Eeda Cc: john.stultz@linaro.org Link: https://lkml.kernel.org/r/7086a857-f90c-4616-bbe8-f7696f21626c@default kernel/time/timer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 6a93bb7e4a7d6670677d5b0eb980936eb9cc5d2e Author: Kamalesh Babulal Date: Sat Oct 14 20:17:54 2017 +0530 objtool: Print top level commands on incorrect usage Print top-level objtool commands, along with the error on incorrect command line usage. Objtool command line parser exit's with code 129, for incorrect usage. Convert the cmd_usage() exit code also, to maintain consistency across objtool. After the patch: $ ./objtool -j Unknown option: -j usage: objtool COMMAND [ARGS] Commands: check Perform stack metadata validation on an object file orc Generate in-place ORC unwind tables for an object file $ echo $? 129 Signed-off-by: Kamalesh Babulal Acked-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1507992474-16142-1-git-send-email-kamalesh@linux.vnet.ibm.com Signed-off-by: Ingo Molnar tools/objtool/objtool.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4f3a871443669c6b4d458a60ac8d8ca5eedc3f97 Author: Naveen N. Rao Date: Tue Oct 17 13:48:34 2017 +0530 Revert "kprobes: Warn if optprobe handler tries to change execution path" This reverts commit: e863d539614641 ("kprobes: Warn if optprobe handler tries to change execution path") On PowerPC, we place a probe at kretprobe_trampoline to catch function returns and with CONFIG_OPTPROBES=y, this probe gets optimized. This works for us due to the way we handle the optprobe as described in commit: 762df10bad6954 ("powerpc/kprobes: Optimize kprobe in kretprobe_trampoline()") With the above commit, we end up with a warning. As such, revert this change. Reported-by: Michael Ellerman 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/20171017081834.3629-1-naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Ingo Molnar kernel/kprobes.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit b9f1f1ce866c28e3d9b86202441b220244754a69 Author: Eric Dumazet Date: Mon Oct 16 19:38:35 2017 -0700 tcp: fix tcp_xmit_retransmit_queue() after rbtree introduction I tried to hard avoiding a call to rb_first() (via tcp_rtx_queue_head) in tcp_xmit_retransmit_queue(). But this was probably too bold. Quoting Yuchung : We might miss re-arming the RTO if tp->retransmit_skb_hint is not NULL. This can happen when RACK marks the first packet lost again and resets tp->retransmit_skb_hint for example (tcp_rack_mark_skb_lost()) Fixes: 75c119afe14f ("tcp: implement rb-tree based retransmit queue") Signed-off-by: Eric Dumazet Reported-by: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit b082af73bf527aa5180c8979d4620e450494c07b Merge: 386fd5d 29d1b33 Author: David S. Miller Date: Wed Oct 18 14:17:11 2017 +0100 Merge branch 'bpf-ctx-info-out-of-verifier' Jakub Kicinski says: ==================== bpf: move context info out of the verifier Daniel pointed out during the review of my previous patchset that the knowledge about context doesn't really belong directly in the verifier. This patch set takes a bit of a drastic approach to move the info out of there. I want to be able to use different set of verifier_ops for program analysis. To do that, I have to first move the test_run callback to a separate structure. Then verifier ops can be declared in the verifier directly and different sets can be picked for verification vs analysis. ==================== Signed-off-by: David S. Miller commit 29d1b33a2e0a3288374102b004a15cb278a2303e Author: Jakub Kicinski Date: Mon Oct 16 16:40:56 2017 -0700 bpf: allow access to skb->len from offloads Since we are now doing strict checking of what offloads may access, make sure skb->len is on that list. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller net/core/filter.c | 2 ++ 1 file changed, 2 insertions(+) commit 4f9218aaf8a463f76cac40aa08d859d065f8cc9e Author: Jakub Kicinski Date: Mon Oct 16 16:40:55 2017 -0700 bpf: move knowledge about post-translation offsets out of verifier Use the fact that verifier ops are now separate from program ops to define a separate set of callbacks for verification of already translated programs. Since we expect the analyzer ops to be defined only for a small subset of all program types initialize their array by hand (don't use linux/bpf_types.h). Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf.h | 3 +++ kernel/bpf/verifier.c | 55 +++++++++++++++------------------------------------ net/core/filter.c | 40 +++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 39 deletions(-) commit 00176a34d9e27ab1e77db75fe13abc005cffe0ca Author: Jakub Kicinski Date: Mon Oct 16 16:40:54 2017 -0700 bpf: remove the verifier ops from program structure Since the verifier ops don't have to be associated with the program for its entire lifetime we can move it to verifier's struct bpf_verifier_env. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf.h | 1 - include/linux/bpf_verifier.h | 1 + kernel/bpf/syscall.c | 10 ---------- kernel/bpf/verifier.c | 23 +++++++++++++++++------ 4 files changed, 18 insertions(+), 17 deletions(-) commit 7de16e3a35578f4f5accc6f5f23970310483d0a2 Author: Jakub Kicinski Date: Mon Oct 16 16:40:53 2017 -0700 bpf: split verifier and program ops struct bpf_verifier_ops contains both verifier ops and operations used later during program's lifetime (test_run). Split the runtime ops into a different structure. BPF_PROG_TYPE() will now append ## _prog_ops or ## _verifier_ops to the names. Signed-off-by: Jakub Kicinski Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf.h | 15 ++++++++++----- include/linux/bpf_types.h | 28 ++++++++++++++-------------- kernel/bpf/syscall.c | 16 +++++++++++++--- kernel/bpf/verifier.c | 12 ++++++------ kernel/trace/bpf_trace.c | 15 ++++++++++++--- net/core/filter.c | 45 ++++++++++++++++++++++++++++++++++++--------- 6 files changed, 91 insertions(+), 40 deletions(-) commit 386fd5da401dc6c4b0ab6a54d333609876b699fe Author: David Ahern Date: Mon Oct 16 15:32:07 2017 -0700 tcp: Check daddr_cache before use in tracepoint Running perf in one window to capture tcp_retransmit_skb tracepoint: $ perf record -e tcp:tcp_retransmit_skb -a And causing a retransmission on an active TCP session (e.g., dropping packets in the receiver, changing MTU on the interface to 500 and back to 1500) triggers a panic: [ 58.543144] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 [ 58.545300] IP: perf_trace_tcp_retransmit_skb+0xd0/0x145 [ 58.546770] PGD 0 P4D 0 [ 58.547472] Oops: 0000 [#1] SMP [ 58.548328] Modules linked in: vrf [ 58.549262] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.0-rc4+ #26 [ 58.551004] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [ 58.554560] task: ffffffff81a0e540 task.stack: ffffffff81a00000 [ 58.555817] RIP: 0010:perf_trace_tcp_retransmit_skb+0xd0/0x145 [ 58.557137] RSP: 0018:ffff88003fc03d68 EFLAGS: 00010282 [ 58.558292] RAX: 0000000000000000 RBX: ffffe8ffffc0ec80 RCX: ffff880038543098 [ 58.559850] RDX: 0400000000000000 RSI: ffff88003fc03d70 RDI: ffff88003fc14b68 [ 58.561099] RBP: ffff88003fc03da8 R08: 0000000000000000 R09: ffffea0000d3224a [ 58.562005] R10: ffff88003fc03db8 R11: 0000000000000010 R12: ffff8800385428c0 [ 58.562930] R13: ffffe8ffffc0e478 R14: ffffffff81a93a40 R15: ffff88003d4f0c00 [ 58.563845] FS: 0000000000000000(0000) GS:ffff88003fc00000(0000) knlGS:0000000000000000 [ 58.564873] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 58.565613] CR2: 0000000000000008 CR3: 000000003d68f004 CR4: 00000000000606f0 [ 58.566538] Call Trace: [ 58.566865] [ 58.567140] __tcp_retransmit_skb+0x4ab/0x4c6 [ 58.567704] ? tcp_set_ca_state+0x22/0x3f [ 58.568231] tcp_retransmit_skb+0x14/0xa3 [ 58.568754] tcp_retransmit_timer+0x472/0x5e3 [ 58.569324] ? tcp_write_timer_handler+0x1e9/0x1e9 [ 58.569946] tcp_write_timer_handler+0x95/0x1e9 [ 58.570548] tcp_write_timer+0x2a/0x58 Check that daddr_cache is non-NULL before de-referencing. Fixes: e086101b150a ("tcp: add a tracepoint for tcp retransmission") Signed-off-by: David Ahern Acked-by: Cong Wang Signed-off-by: David S. Miller include/trace/events/tcp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 58788a9b6060890e481c8111fac43d065560ebcb Author: Will Deacon Date: Wed Oct 18 12:51:09 2017 +0100 locking/arch, powerpc/rtas: Use arch_spin_lock() instead of arch_spin_lock_flags() arch_spin_lock_flags() is an internal part of the spinlock implementation and is no longer available when SMP=n and DEBUG_SPINLOCK=y, so the PPC RTAS code fails to compile in this configuration: arch/powerpc/kernel/rtas.c: In function 'lock_rtas': >> arch/powerpc/kernel/rtas.c:81:2: error: implicit declaration of function 'arch_spin_lock_flags' [-Werror=implicit-function-declaration] arch_spin_lock_flags(&rtas.lock, flags); ^~~~~~~~~~~~~~~~~~~~ Since there's no good reason to use arch_spin_lock_flags() here (the code in question already calls local_irq_save(flags)), switch it over to arch_spin_lock and get things building again. Reported-by: kbuild test robot Signed-off-by: Will Deacon Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1508327469-20231-1-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar arch/powerpc/kernel/rtas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4f4da3e13ae7a405fa1da11ff4070588e700445 Author: Gustavo A. R. Silva Date: Mon Oct 16 16:53:16 2017 -0500 net: ipx: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/ipx/af_ipx.c | 1 + 1 file changed, 1 insertion(+) commit 275757e6bae15a8621130907a78096afd1e15d2c Author: Gustavo A. R. Silva Date: Mon Oct 16 16:36:52 2017 -0500 ipv6: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in some cases I placed the "fall through" comment on its own line, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/ipv6/ah6.c | 1 + net/ipv6/exthdrs.c | 1 + net/ipv6/icmp.c | 6 ++---- net/ipv6/ip6_fib.c | 4 ++++ net/ipv6/ip6_tunnel.c | 1 + net/ipv6/ip6mr.c | 1 + net/ipv6/netfilter/nf_nat_l3proto_ipv6.c | 3 ++- net/ipv6/raw.c | 4 ++++ net/ipv6/tcp_ipv6.c | 3 ++- net/ipv6/xfrm6_policy.c | 1 + 10 files changed, 19 insertions(+), 6 deletions(-) commit fb6ff75e18937a20dbec1eb47b5f893f38eabae4 Author: David Ahern Date: Mon Oct 16 14:24:02 2017 -0700 tcp: Use pI6c in tcp tracepoint The compact form for IPv6 addresses is more user friendly than the full version. For example: compact: 2001:db8:1::1 full: 2001:0db8:0001:0000:0000:0000:0000:0004i Update the tcp tracepoint to show the compact form. Signed-off-by: David Ahern Acked-by: Cong Wang Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/trace/events/tcp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcfd6dfab97006d44c7db5d6c908eac383af6649 Author: Gustavo A. R. Silva Date: Mon Oct 16 15:48:55 2017 -0500 ipv4: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in some cases I placed the "fall through" comment on its own line, which is what GCC is expecting to find. Addresses-Coverity-ID: 115108 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/ipv4/af_inet.c | 3 ++- net/ipv4/arp.c | 1 + net/ipv4/devinet.c | 1 + net/ipv4/ipmr.c | 1 + net/ipv4/netfilter/nf_nat_l3proto_ipv4.c | 3 ++- net/ipv4/tcp_input.c | 2 ++ net/ipv4/tcp_ipv4.c | 3 ++- 7 files changed, 11 insertions(+), 3 deletions(-) commit 86e58cce939cefd806105922e4a0840e9a04a88f Author: Gustavo A. R. Silva Date: Mon Oct 16 15:11:22 2017 -0500 decnet: af_decnet: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/decnet/af_decnet.c | 3 +++ 1 file changed, 3 insertions(+) commit 54e6d7bee50f1395fc8fd772259c2f765fd7266d Merge: 2dc7c1f f1851a6 Author: David S. Miller Date: Wed Oct 18 13:44:47 2017 +0100 Merge branch 'DSA-DPAA' Madalin Bucur says: ==================== adapt DPAA drivers for DSA Junote Cai reported that he was not able to get a DSA setup involving the DPAA/FMAN driver to work and narrowed it down to of_find_net_device_by_node() call in DSA setup. The initial attempt to fix this by adding of_node to the platform device results in a second, failed, probing of the FMan MAC driver against the new platform device created for the DPAA Ethernet driver. Solve these issues by removing the of_node pointer from the platform device and changing the net_dev dev to the of_device dev to ensure the DSA init will be able to find the DPAA net_dev using of_find_net_device_by_node(). Several changes were required to enable this solution: refactoring the adjust_link (also resulted in lesser, cleaner code) and renaming the fman kernel modules to keep the legacy udev rules happy. Changes in v2: - fix issue on error path in "dpaa_eth: change device used" patch - cleanup the dpaa_eth_probe() error paths Changes in v3: - remove obsolete comment in moved code - add explanation for module rename ==================== Signed-off-by: David S. Miller commit f1851a69b1f4008a7d29c6e446b3da13ed13b7da Author: Madalin Bucur Date: Mon Oct 16 21:36:10 2017 +0300 dpaa_eth: remove obsolete comment Comment is no longer valid for a long time now. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 4 ---- 1 file changed, 4 deletions(-) commit c69fde72bf03d7aa2c8d8ab158cc55835a2c0026 Author: Madalin Bucur Date: Mon Oct 16 21:36:09 2017 +0300 fsl/fman: add dpaa in module names This change just renames the FMan driver modules, using a common prefix for the DPAA FMan and DPAA Ethernet drivers. Besides making the names more aligned, this allows writing udev rules that match on either driver name, if needed, using the fsl_dpaa_* prefix. The change of netdev dev required for the DSA probing makes the previous rules written using this prefix fail, this change makes them work again, ensuring backwards compatibility for their users. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8b9b5a2c27e1a7292f1e97e0eb19b0ae603dfa68 Author: Madalin Bucur Date: Mon Oct 16 21:36:08 2017 +0300 dpaa_eth: cleanup dpaa_eth_probe() error paths Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 53 ++++++++++---------------- 1 file changed, 20 insertions(+), 33 deletions(-) commit c6e26ea8c893687a83c9feda7ab4f89205e19726 Author: Madalin Bucur Date: Mon Oct 16 21:36:07 2017 +0300 dpaa_eth: change device used Change device used for DMA mapping to the MAC device that is an of_device, with proper DMA ops. Using this device for the netdevice should also address the issue with DSA scenarios that need the netdevice to be backed by an of_device. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 42 ++++++++------------------ drivers/net/ethernet/freescale/fman/mac.c | 37 +++++++++-------------- drivers/net/ethernet/freescale/fman/mac.h | 1 - 3 files changed, 27 insertions(+), 53 deletions(-) commit 3c38ec67867c0a3fe9eeda68a3d2a945d5d09a24 Author: Madalin Bucur Date: Mon Oct 16 21:36:06 2017 +0300 dpaa_eth: move of_phy_connect() to the eth driver Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 48 +++++++++++-- drivers/net/ethernet/freescale/fman/mac.c | 97 ++++++-------------------- drivers/net/ethernet/freescale/fman/mac.h | 5 +- 3 files changed, 66 insertions(+), 84 deletions(-) commit 48167c9ce0b91c068430345bf039c7be23fa2f3f Author: Madalin Bucur Date: Mon Oct 16 21:36:05 2017 +0300 fsl/fman: remove of_node The FMan MAC driver allocates a platform device for the Ethernet driver to probe on. Setting pdev->dev.of_node with the MAC node triggers the MAC driver probing of the new platform device. While this fails quickly and does not affect the functionality of the drivers, it is incorrect and must be removed. This was added to address a report that DSA code using of_find_net_device_by_node() is unable to use the DPAA interfaces. Error message seen before this fix: fsl_mac dpaa-ethernet.0: __devm_request_mem_region(mac) failed fsl_mac: probe of dpaa-ethernet.0 failed with error -16 Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/mac.c | 1 - 1 file changed, 1 deletion(-) commit 2dc7c1fef9565c73c5054fd3c134afada09476c1 Author: Jakub Kicinski Date: Mon Oct 16 10:12:54 2017 -0700 tools: bpftool: use more common tag format Program tag is usually displayed as string of bytes without any separators (e.g. as "aa5520b1090cfeb6" vs MAC addr-like format bpftool uses currently: "aa:55:20:b1:09:0c:fe:b6"). Make bptfool use the more common format both for displaying the tag and selecting the program by tag. This was pointed out in review but I misunderstood the comment. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/bpf/bpftool/Documentation/bpftool-prog.rst | 2 +- tools/bpf/bpftool/main.h | 3 +-- tools/bpf/bpftool/prog.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) commit 608796ffe13855bb066bebbd58d8b86a49cb5c27 Author: Martin Schwidefsky Date: Fri Oct 13 12:59:22 2017 +0200 s390/vdso: move boot_vdso_data to vdso.c The boot_vdso_data variable is related to the vdso code, the magic of the initial vdso area for the early boot and the replacement of it in vdso_init should all be put into vdso.c. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/vdso.h | 1 + arch/s390/kernel/setup.c | 2 +- arch/s390/kernel/vdso.c | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) commit f554be42fd0fd8dd14680c67f2db26b3e7de9670 Author: Vasily Gorbik Date: Thu Oct 12 13:01:47 2017 +0200 s390/spinlock: use cpu alternatives to enable niai instruction Enable niai instruction in the spinlock code at run-time for machines on which facility 49 is available (zEC12 and newer). Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky arch/s390/include/asm/spinlock.h | 5 ++--- arch/s390/lib/spinlock.c | 9 +++------ 2 files changed, 5 insertions(+), 9 deletions(-) commit 686140a1a9c41d85a4212a1c26d671139b76404b Author: Vasily Gorbik Date: Thu Oct 12 13:01:47 2017 +0200 s390: introduce CPU alternatives Implement CPU alternatives, which allows to optionally patch newer instructions at runtime, based on CPU facilities availability. A new kernel boot parameter "noaltinstr" disables patching. Current implementation is derived from x86 alternatives. Although ideal instructions padding (when altinstr is longer then oldinstr) is added at compile time, and no oldinstr nops optimization has to be done at runtime. Also couple of compile time sanity checks are done: 1. oldinstr and altinstr must be <= 254 bytes long, 2. oldinstr and altinstr must not have an odd length. alternative(oldinstr, altinstr, facility); alternative_2(oldinstr, altinstr1, facility1, altinstr2, facility2); Both compile time and runtime padding consists of either 6/4/2 bytes nop or a jump (brcl) + 2 bytes nop filler if padding is longer then 6 bytes. .altinstructions and .altinstr_replacement sections are part of __init_begin : __init_end region and are freed after initialization. Signed-off-by: Vasily Gorbik Signed-off-by: Martin Schwidefsky Documentation/admin-guide/kernel-parameters.txt | 3 + arch/s390/Kconfig | 17 +++ arch/s390/include/asm/alternative.h | 163 ++++++++++++++++++++++++ arch/s390/kernel/Makefile | 1 + arch/s390/kernel/alternative.c | 110 ++++++++++++++++ arch/s390/kernel/module.c | 17 +++ arch/s390/kernel/setup.c | 3 + arch/s390/kernel/vmlinux.lds.S | 23 ++++ 8 files changed, 337 insertions(+) commit 76b3b62ade4baa13b270bafb96be730ebff913f0 Author: Sebastian Ott Date: Thu Oct 12 13:42:54 2017 +0200 s390/dasd: remove unused debug macros Get rid of unused wrapper macros around debug_sprintf_exception. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky drivers/s390/block/dasd_int.h | 16 ---------------- 1 file changed, 16 deletions(-) commit 0dcd91a9e6cc0a401416bbdd34b0a255cde0aee1 Author: Sebastian Ott Date: Thu Oct 12 13:57:26 2017 +0200 s390/debug: only write data once debug_event_common memsets the active debug entry with zeros to prevent stale data leakage. This is overwritten with the actual debug data in the next step. Only write zeros to that part of the debug entry that's not used by new debug data. Micro benchmarks show a 2-10% reduction of cpu cycles with this approach. Signed-off-by: Sebastian Ott Acked-by: Michael Holzheu Signed-off-by: Martin Schwidefsky arch/s390/kernel/debug.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 94158e544fd60c6a94af348790dae76578ed8dae Author: Sebastian Ott Date: Mon Oct 9 17:49:38 2017 +0200 s390/debug: improve debug_event debug_event currently truncates the data if used with a size larger than the buf_size of the debug feature. For lots of callers of this function, wrappers have been implemented that loop until all data is handled. Move that functionality into debug_event_common and get rid of the wrappers. Signed-off-by: Sebastian Ott Acked-by: Michael Holzheu Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pci_debug.h | 6 +----- arch/s390/kernel/debug.c | 28 ++++++++++++++++++---------- drivers/s390/block/scm_blk.h | 8 +------- drivers/s390/cio/chsc_sch.c | 6 +----- drivers/s390/cio/cio_debug.h | 8 +------- drivers/s390/cio/eadm_sch.c | 8 +------- drivers/s390/cio/qdio_debug.h | 18 +++--------------- 7 files changed, 26 insertions(+), 56 deletions(-) commit 7c3eaaa3917d8b5491f58ea263bf6e719fd3155f Author: Philipp Rudo Date: Tue Oct 17 12:28:08 2017 +0200 s390/kexec: Fix checksum validation return code for kdump Before kexec boots to a crash kernel it checks whether the image in memory changed after load. This is done by the function kdump_csum_valid, which returns true, i.e. an int != 0, on success and 0 otherwise. In other words when kdump_csum_valid returns an error code it means that the validation succeeded. This is not only counterintuitive but also produces the wrong result if the kernel was build without CONFIG_CRASH_DUMP. Fix this by making kdump_csum_valid return a bool. Signed-off-by: Philipp Rudo Acked-by: Michael Holzheu Signed-off-by: Martin Schwidefsky arch/s390/kernel/machine_kexec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 28d1d6d2f314ff395ff67565d1145742614b21c8 Author: Takashi Iwai Date: Wed Oct 18 14:01:58 2017 +0200 ALSA: hda - Add model string for Intel reference board quirk For allowing user to apply the existing quirk on a machine with a different SSID, add a new model string entry, alc700-ref. The quirk itself was introduced in the commit b84e843644f2: "ALSA: hda/realtek - Enable jack detection function for Intel ALC700") Signed-off-by: Takashi Iwai Documentation/sound/hd-audio/models.rst | 2 ++ sound/pci/hda/patch_realtek.c | 1 + 2 files changed, 3 insertions(+) commit 39cbf2aa41b6d6e8d94b5506bf0e0e896ccf635a Author: Kees Cook Date: Tue Oct 17 09:53:04 2017 +0300 drm/i915: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Daniel Vetter Cc: Jani Nikula Cc: David Airlie Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Oscar Mateo Cc: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Kees Cook Reviewed-by: Joonas Lahtinen Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20171017065304.3358-1-joonas.lahtinen@linux.intel.com drivers/gpu/drm/i915/i915_sw_fence.c | 8 +++----- drivers/gpu/drm/i915/intel_breadcrumbs.c | 18 ++++++++---------- drivers/gpu/drm/i915/selftests/mock_engine.c | 8 +++----- 3 files changed, 14 insertions(+), 20 deletions(-) commit d5d9696b03808bc6be723cc85288c912c3a05606 Author: Will Deacon Date: Thu Sep 22 11:36:32 2016 +0100 drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension The ARMv8.2 architecture introduces the optional Statistical Profiling Extension (SPE). SPE can be used to profile a population of operations in the CPU pipeline after instruction decode. These are either architected instructions (i.e. a dynamic instruction trace) or CPU-specific uops and the choice is fixed statically in the hardware and advertised to userspace via caps/. Sampling is controlled using a sampling interval, similar to a regular PMU counter, but also with an optional random perturbation to avoid falling into patterns where you continuously profile the same instruction in a hot loop. After each operation is decoded, the interval counter is decremented. When it hits zero, an operation is chosen for profiling and tracked within the pipeline until it retires. Along the way, information such as TLB lookups, cache misses, time spent to issue etc is captured in the form of a sample. The sample is then filtered according to certain criteria (e.g. load latency) that can be specified in the event config (described under format/) and, if the sample satisfies the filter, it is written out to memory as a record, otherwise it is discarded. Only one operation can be sampled at a time. The in-memory buffer is linear and virtually addressed, raising an interrupt when it fills up. The PMU driver handles these interrupts to give the appearance of a ring buffer, as expected by the AUX code. The in-memory trace-like format is self-describing (though not parseable in reverse) and written as a series of records, with each record corresponding to a sample and consisting of a sequence of packets. These packets are defined by the architecture, although some have CPU-specific fields for recording information specific to the microarchitecture. As a simple example, a record generated for a branch instruction may consist of the following packets: 0 (Address) : Virtual PC of the branch instruction 1 (Type) : Conditional direct branch 2 (Counter) : Number of cycles taken from Dispatch to Issue 3 (Address) : Virtual branch target + condition flags 4 (Counter) : Number of cycles taken from Dispatch to Complete 5 (Events) : Mispredicted as not-taken 6 (END) : End of record It is also possible to toggle properties such as timestamp packets in each record. This patch adds support for SPE in the form of a new perf driver. Cc: Alexander Shishkin Reviewed-by: Mark Rutland Signed-off-by: Will Deacon drivers/perf/Kconfig | 8 + drivers/perf/Makefile | 1 + drivers/perf/arm_spe_pmu.c | 1248 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1257 insertions(+) commit 4b8b77a4ec807a5f14e02e84b1bb7a2fd43768c0 Author: Will Deacon Date: Thu Sep 22 11:48:19 2016 +0100 dt-bindings: Document devicetree binding for ARM SPE This patch documents the devicetree binding in use for ARM SPE. Cc: Rob Herring Acked-by: Mark Rutland Signed-off-by: Will Deacon Documentation/devicetree/bindings/arm/spe-pmu.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit b0c57e1071b51746ef0c960166f4527a3b3f0b6d Author: Will Deacon Date: Fri Jul 7 13:47:02 2017 +0100 arm64: head: Init PMSCR_EL2.{PA,PCT} when entered at EL2 without VHE When booting at EL2, ensure that we permit the EL1 host to sample physical addresses and physical counter values using SPE. Acked-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/kernel/head.S | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit a173c390d9c130d1dd254a9246fc7ffe4a2869f7 Author: Will Deacon Date: Wed Sep 20 16:48:33 2017 +0100 arm64: sysreg: Move SPE registers and PSB into common header files SPE is part of the v8.2 architecture, so move its system register and field definitions into sysreg.h and the new PSB barrier into barrier.h Finally, move KVM over to using the generic definitions so that it doesn't have to open-code its own versions. Acked-by: Marc Zyngier Acked-by: Mark Rutland Signed-off-by: Will Deacon arch/arm64/include/asm/barrier.h | 2 + arch/arm64/include/asm/sysreg.h | 93 ++++++++++++++++++++++++++++++++++++++++ arch/arm64/kvm/hyp/debug-sr.c | 24 +++-------- 3 files changed, 102 insertions(+), 17 deletions(-) commit 085b30625e39df67d7320f22269796276c6b0c11 Author: Will Deacon Date: Fri Sep 23 14:05:12 2016 +0100 perf/core: Add PERF_AUX_FLAG_COLLISION to report colliding samples The ARM SPE architecture permits an implementation to ignore a sample if the sample is due to be taken whilst another sample is already being produced. In this case, it is desirable to report the collision to userspace, as they may want to lower the sample period. This patch adds a PERF_AUX_FLAG_COLLISION flag, so that such events can be relayed to userspace. Acked-by: Peter Zijlstra Signed-off-by: Will Deacon include/uapi/linux/perf_event.h | 1 + 1 file changed, 1 insertion(+) commit bc1d202023eb66f088f736ba423bee1cf135c720 Author: Will Deacon Date: Tue Aug 16 16:53:15 2016 +0100 perf/core: Export AUX buffer helpers to modules Perf PMU drivers using AUX buffers cannot be built as modules unless the AUX helpers are exported. This patch exports perf_aux_output_{begin,end,skip} and perf_get_aux to modules. Cc: Peter Zijlstra Signed-off-by: Will Deacon kernel/events/ring_buffer.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5ffeb0501c6b36d080de78372fdb70b404b91e9d Author: Will Deacon Date: Mon Jul 25 16:07:10 2016 +0100 genirq: export irq_get_percpu_devid_partition to modules Any modular driver using cluster-affine PPIs needs to be able to call irq_get_percpu_devid_partition so that it can enable the IRQ on the correct subset of CPUs. This patch exports the symbol so that it can be called from within a module. Acked-by: Marc Zyngier Acked-by: Thomas Gleixner Signed-off-by: Will Deacon kernel/irq/irqdesc.c | 1 + 1 file changed, 1 insertion(+) commit 6c684e3b677eee1272f7952a16ffb9aac2c228f9 Author: Philipp Zabel Date: Wed Oct 11 14:59:58 2017 +0200 drm/panel: simple: add delays for Innolux AT043TN24 The delays between video data and backlight enable and between backlight disable and end of video data are given as >= 160 ms in the datasheet. Signed-off-by: Philipp Zabel Tested-by: Marco Franchi Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20171011125958.23064-3-p.zabel@pengutronix.de drivers/gpu/drm/panel/panel-simple.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6560279c8fd08838ccaeea89f33ec10d26dc7857 Author: Philipp Zabel Date: Wed Oct 11 14:59:57 2017 +0200 drm/panel: simple: add bus flags for Innolux AT043TN24 For LCD interface controllers that support configuring polarity of pixel clock and data enable signal, specify bus flags in the panel descriptor. Signed-off-by: Philipp Zabel Tested-by: Marco Franchi Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20171011125958.23064-2-p.zabel@pengutronix.de drivers/gpu/drm/panel/panel-simple.c | 1 + 1 file changed, 1 insertion(+) commit a483159d2b5238b69ef6a3310a4aa61b0dd496c3 Author: Philipp Zabel Date: Wed Oct 11 14:59:56 2017 +0200 drm/panel: simple: fix vertical timings for Innolux AT043TN24 The vsync length should be 10 lines, as specified in the data sheet. This gets the actual refresh rate closer to nominal 60 Hz given the 9 MHz pixel clock. Signed-off-by: Philipp Zabel Tested-by: Marco Franchi Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20171011125958.23064-1-p.zabel@pengutronix.de drivers/gpu/drm/panel/panel-simple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2af55f460738c78e63596e320f6dbde0cd4cfb84 Merge: 1bbc728 ff861c4 Author: David S. Miller Date: Wed Oct 18 12:40:40 2017 +0100 Merge branch 'networking-Convert-timers-to-use-timer_setup' Kees Cook says: ==================== networking: Convert timers to use timer_setup() This is the current set of outstanding networking patches to perform conversions to the new timer interface (rebased to -next). This is not all expected conversions, but it contains everything needed in networking to eliminate init_timer(), and all the non-standard setup_*_timer() uses. ==================== Signed-off-by: David S. Miller commit ff861c4d64f2df1c7eaabaf2ba8f2f8ebc4b28e3 Author: Kees Cook Date: Mon Oct 16 17:29:42 2017 -0700 sunrpc: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Trond Myklebust Cc: Anna Schumaker Cc: "J. Bruce Fields" Cc: Jeff Layton Cc: "David S. Miller" Cc: linux-nfs@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/sunrpc/sched.c | 8 ++++---- net/sunrpc/svc.c | 2 +- net/sunrpc/svc_xprt.c | 9 ++++----- net/sunrpc/xprt.c | 9 ++++----- 4 files changed, 13 insertions(+), 15 deletions(-) commit 1ab791dc27faef5aee80fe76d73980d2de0bebc8 Author: Kees Cook Date: Mon Oct 16 17:29:41 2017 -0700 ipv4: timewait: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Alexey Kuznetsov Cc: Hideaki YOSHIFUJI Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/ipv4/inet_timewait_sock.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 02ab4fcaf0b50434529cb263082ff95b5158c8ca Author: Kees Cook Date: Mon Oct 16 17:29:40 2017 -0700 um: net: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. (Note that this timer is actually disabled.) Cc: Jeff Dike Cc: Richard Weinberger Cc: "David S. Miller" Cc: Jarod Wilson Cc: user-mode-linux-devel@lists.sourceforge.net Cc: user-mode-linux-user@lists.sourceforge.net Signed-off-by: Kees Cook Signed-off-by: David S. Miller arch/um/drivers/net_kern.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 7d85b2c8d1ca09040e16a3cd7f019d6a9ddd22d7 Author: Kees Cook Date: Mon Oct 16 17:29:39 2017 -0700 net: fs_enet: Remove unused timer Removes unused timer and its old initialization call. Cc: Pantelis Antoniou Cc: Vitaly Bordug Cc: linuxppc-dev@lists.ozlabs.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 2 -- drivers/net/ethernet/freescale/fs_enet/fs_enet.h | 1 - 2 files changed, 3 deletions(-) commit cac6a8f9017b532b39ecb9a9b040eadf26895035 Author: Kees Cook Date: Mon Oct 16 17:29:38 2017 -0700 net/xen-netback: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Wei Liu Cc: Paul Durrant Cc: xen-devel@lists.xenproject.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/xen-netback/common.h | 2 +- drivers/net/xen-netback/interface.c | 2 +- drivers/net/xen-netback/netback.c | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) commit ba421793505f91026cccbf9398ff866dd308036d Author: Kees Cook Date: Mon Oct 16 17:29:37 2017 -0700 net: atm: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Also drops a redundant initialization that is already set up by DEFINE_TIMER. Cc: "David S. Miller" Cc: Hans Liljestrand Cc: "Reshetova, Elena" Cc: Bhumika Goyal Cc: Johannes Berg Cc: Roopa Prabhu Cc: Augusto Mecking Caringi Cc: Jarod Wilson Cc: Kalle Valo Cc: Thomas Gleixner Cc: Alexey Dobriyan Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/atm/clip.c | 4 ++-- net/atm/lec.c | 19 +++++++++---------- net/atm/mpc.c | 1 - 3 files changed, 11 insertions(+), 13 deletions(-) commit 99767f278ccf74a1857069bb3eec991e572f94cd Author: Kees Cook Date: Mon Oct 16 17:29:36 2017 -0700 net/core: Convert sk_timer users to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly for all users of sk_timer. Cc: "David S. Miller" Cc: Ralf Baechle Cc: Andrew Hendry Cc: Eric Dumazet Cc: Paolo Abeni Cc: David Howells Cc: Julia Lawall Cc: linzhang Cc: Ingo Molnar Cc: netdev@vger.kernel.org Cc: linux-hams@vger.kernel.org Cc: linux-x25@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/core/sock.c | 2 +- net/netrom/af_netrom.c | 6 +++--- net/netrom/nr_timer.c | 47 ++++++++++++++++++++++++----------------------- net/rose/rose_timer.c | 8 ++++---- net/x25/af_x25.c | 8 +++++--- net/x25/x25_timer.c | 17 +++++++++-------- 6 files changed, 46 insertions(+), 42 deletions(-) commit 26566eae80512d8a6b52e9d6f880f960893c96b4 Author: Kees Cook Date: Mon Oct 16 17:29:35 2017 -0700 ethernet/intel: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Switches test of .data field to .function, since .data will be going away. Cc: Jeff Kirsher Cc: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/intel/e100.c | 6 +++--- drivers/net/ethernet/intel/e1000e/netdev.c | 14 ++++++-------- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 8 ++++---- drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++++---- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 8 ++++---- drivers/net/ethernet/intel/igb/igb_main.c | 18 ++++++++---------- drivers/net/ethernet/intel/igbvf/netdev.c | 7 +++---- drivers/net/ethernet/intel/ixgb/ixgb_main.c | 9 ++++----- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 +++---- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 8 ++++---- 10 files changed, 43 insertions(+), 50 deletions(-) commit d039ef68e94eae81c13b0b39a18f0c3455491e4c Author: Kees Cook Date: Mon Oct 16 17:29:34 2017 -0700 net: hns: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Switches test of .data field to .function, since .data will be going away. Cc: Yisen Zhuang Cc: Salil Mehta Cc: "David S. Miller" Cc: lipeng Cc: Lin Yun Sheng Cc: Kejian Yan Cc: Arnd Bergmann Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns/hns_enet.c | 7 +++---- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 13 ++++++------- 2 files changed, 9 insertions(+), 11 deletions(-) commit e84a2ac9ffa9b1ba211c8982f07cd92f60239c3e Author: Kees Cook Date: Mon Oct 16 17:29:33 2017 -0700 net: neterion: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jon Mason Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/neterion/s2io.c | 13 ++++--------- drivers/net/ethernet/neterion/s2io.h | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) commit d28bb967aa928d5cfd50a9a182f3b4218088c79d Author: Kees Cook Date: Mon Oct 16 17:29:32 2017 -0700 net: usb: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Woojung Huh Cc: Microchip Linux Driver Support Cc: "David S. Miller" Cc: Ben Hutchings Cc: Philippe Reynes Cc: Jarod Wilson Cc: Arvind Yadav Cc: "Bjørn Mork" Cc: "Stefan Brüns" Cc: Alexey Dobriyan Cc: Greg Ungerer Cc: linux-usb@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/usb/catc.c | 6 +++--- drivers/net/usb/lan78xx.c | 10 +++------- drivers/net/usb/sierra_net.c | 12 ++++-------- 3 files changed, 10 insertions(+), 18 deletions(-) commit dfc57004945b34cf83f600c697a54afca1fd15c5 Author: Kees Cook Date: Mon Oct 16 17:29:31 2017 -0700 net/ethernet/sgi: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/sgi/ioc3-eth.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 41e9475c325a3643572639283318b0a07bbb8e0b Author: Kees Cook Date: Mon Oct 16 17:29:30 2017 -0700 hamradio/scc: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Joerg Reuter Cc: linux-hams@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/hamradio/scc.c | 69 +++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 34 deletions(-) commit 6fd9c53f71862a4797b7ed8a5de80e2c64829f56 Author: Kees Cook Date: Mon Oct 16 17:29:29 2017 -0700 net: seeq: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/seeq/ether3.c | 11 ++++++----- drivers/net/ethernet/seeq/ether3.h | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) commit 0822c5d94e10d9790e82bdfea20a10f0884bca54 Author: Kees Cook Date: Mon Oct 16 17:29:28 2017 -0700 net: ethernet: sun: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Philippe Reynes Cc: Jarod Wilson Cc: Shannon Nelson Cc: Rob Herring Cc: chris hyser Cc: Tushar Dave Cc: Tobias Klauser Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Shannon Nelson Signed-off-by: David S. Miller drivers/net/ethernet/sun/cassini.c | 7 ++++--- drivers/net/ethernet/sun/ldmvsw.c | 3 +-- drivers/net/ethernet/sun/niu.c | 10 ++++------ drivers/net/ethernet/sun/sunbmac.c | 10 ++++------ drivers/net/ethernet/sun/sungem.c | 6 +++--- drivers/net/ethernet/sun/sunhme.c | 10 ++++------ drivers/net/ethernet/sun/sunvnet.c | 3 +-- drivers/net/ethernet/sun/sunvnet_common.c | 4 ++-- drivers/net/ethernet/sun/sunvnet_common.h | 2 +- 9 files changed, 24 insertions(+), 31 deletions(-) commit de892f8f2cc8176368a490e0778fd2de15e9bfda Author: Kees Cook Date: Mon Oct 16 17:29:27 2017 -0700 net: ethernet: apple: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Johannes Berg Cc: Jarod Wilson Cc: Rob Herring Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/apple/bmac.c | 12 +++++------- drivers/net/ethernet/apple/mace.c | 12 +++++------- 2 files changed, 10 insertions(+), 14 deletions(-) commit 11286125326bb9d5e295c7c85fb1dc91ca2af46b Author: Kees Cook Date: Mon Oct 16 17:29:26 2017 -0700 isdnloop: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Added missing initialization for rb_timer. Cc: Karsten Keil Cc: "David S. Miller" Cc: Al Viro Cc: Stephen Hemminger Cc: Arnd Bergmann Cc: Johannes Berg Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/isdn/isdnloop/isdnloop.c | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) commit 5f2585d4e570f2dffd148f6e57308fb431079175 Author: Kees Cook Date: Mon Oct 16 17:29:24 2017 -0700 drivers/net/appletalk: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Adds a static variable to hold the polled net_device. Cc: David Howells Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/appletalk/ltpc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9ba650a4ebdde5f5f59a62ed51563d7c4586e492 Author: Kees Cook Date: Mon Oct 16 17:29:23 2017 -0700 appletalk: Remove unneeded synchronization The use of del_timer_sync() will make sure a timer is not rescheduled. As such, there is no need to add external signals to kill timers. In preparation for switching the timer callback argument to the timer pointer, this drops the .data argument since it doesn't serve a meaningful purpose here. Cc: David Howells Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/appletalk/ltpc.c | 6 ------ 1 file changed, 6 deletions(-) commit d26c089e78298843b8c5202ffb43146d17c15bde Author: Kees Cook Date: Mon Oct 16 17:29:22 2017 -0700 hdlc: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This adds a pointer back to the net_device, and drops needless open-coded resetting of the .function and .data fields. Cc: David S. Miller Cc: Krzysztof Halasa Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/wan/hdlc_cisco.c | 13 ++++++------- drivers/net/wan/hdlc_fr.c | 12 ++++++------ 2 files changed, 12 insertions(+), 13 deletions(-) commit 9f12a77e467b8ec0296cf1c3481447e1b1811f59 Author: Kees Cook Date: Mon Oct 16 17:29:21 2017 -0700 net/core: Collapse redundant sk_timer callback data assignments The core sk_timer initializer can provide the common .data assignment instead of it being set separately in users. Cc: "David S. Miller" Cc: Ralf Baechle Cc: Andrew Hendry Cc: Eric Dumazet Cc: Paolo Abeni Cc: David Howells Cc: Colin Ian King Cc: Ingo Molnar Cc: linzhang Cc: netdev@vger.kernel.org Cc: linux-hams@vger.kernel.org Cc: linux-x25@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/core/sock.c | 2 +- net/netrom/nr_timer.c | 1 - net/rose/rose_timer.c | 1 - net/x25/af_x25.c | 1 - net/x25/x25_timer.c | 1 - 5 files changed, 1 insertion(+), 5 deletions(-) commit 78802011fbe34331bdef6f2dfb1634011f0e4c32 Author: Kees Cook Date: Mon Oct 16 17:29:20 2017 -0700 inet: frags: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Alexander Aring Cc: Stefan Schmidt Cc: "David S. Miller" Cc: Alexey Kuznetsov Cc: Hideaki YOSHIFUJI Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Cc: linux-wpan@vger.kernel.org Cc: netdev@vger.kernel.org Cc: netfilter-devel@vger.kernel.org Cc: coreteam@netfilter.org Signed-off-by: Kees Cook Acked-by: Stefan Schmidt # for ieee802154 Signed-off-by: David S. Miller include/net/inet_frag.h | 2 +- net/ieee802154/6lowpan/reassembly.c | 5 +++-- net/ipv4/inet_fragment.c | 4 ++-- net/ipv4/ip_fragment.c | 5 +++-- net/ipv6/netfilter/nf_conntrack_reasm.c | 5 +++-- net/ipv6/reassembly.c | 5 +++-- 6 files changed, 15 insertions(+), 11 deletions(-) commit 59f379f9046a9e0532ffd19b44e3c32fe79ec51b Author: Kees Cook Date: Mon Oct 16 17:29:19 2017 -0700 inet/connection_sock: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Gerrit Renker Cc: Alexey Kuznetsov Cc: Hideaki YOSHIFUJI Cc: netdev@vger.kernel.org Cc: dccp@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller include/net/inet_connection_sock.h | 6 +++--- net/dccp/timer.c | 18 ++++++++++-------- net/ipv4/inet_connection_sock.c | 21 +++++++++------------ net/ipv4/tcp_timer.c | 18 +++++++++++------- 4 files changed, 33 insertions(+), 30 deletions(-) commit a92c5751b97cca55d8140ec0bf26a53c7e00bfa5 Author: Kees Cook Date: Mon Oct 16 17:29:18 2017 -0700 netfilter: ipset: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This introduces a pointer back to the struct ip_set, which is used instead of the struct timer_list .data field. Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Cc: "David S. Miller" Cc: Stephen Hemminger Cc: simran singhal Cc: Muhammad Falak R Wani Cc: netfilter-devel@vger.kernel.org Cc: coreteam@netfilter.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/netfilter/ipset/ip_set_bitmap_gen.h | 10 +++++----- net/netfilter/ipset/ip_set_bitmap_ip.c | 2 ++ net/netfilter/ipset/ip_set_bitmap_ipmac.c | 2 ++ net/netfilter/ipset/ip_set_bitmap_port.c | 2 ++ net/netfilter/ipset/ip_set_hash_gen.h | 12 +++++++----- net/netfilter/ipset/ip_set_list_set.c | 12 +++++++----- 6 files changed, 25 insertions(+), 15 deletions(-) commit cdeabbb881343c1d554b83687a71f45280c592e0 Author: Kees Cook Date: Mon Oct 16 17:29:17 2017 -0700 net: sched: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Add pointer back to Qdisc. Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Jiri Pirko Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/sched/cls_flow.c | 7 +++---- net/sched/sch_generic.c | 6 +++--- net/sched/sch_pie.c | 10 ++++++---- net/sched/sch_red.c | 10 ++++++---- net/sched/sch_sfq.c | 10 +++++----- 5 files changed, 23 insertions(+), 20 deletions(-) commit 4cfea08e6251d1468b3a694e9543131a12be3ac9 Author: Kees Cook Date: Mon Oct 16 17:29:16 2017 -0700 isdn/gigaset: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Paul Bolle Cc: Karsten Keil Cc: "David S. Miller" Cc: Johan Hovold Cc: gigaset307x-common@lists.sourceforge.net Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/isdn/gigaset/bas-gigaset.c | 36 ++++++++++++++++++++---------------- drivers/isdn/gigaset/common.c | 7 +++---- 2 files changed, 23 insertions(+), 20 deletions(-) commit c788dd2c64322f97e4fdc04ea3948c4209fbc8a7 Author: Kees Cook Date: Mon Oct 16 17:29:15 2017 -0700 isdn/gigaset: Use kzalloc instead of open-coded field zeroing This replaces a kmalloc followed by a bunch of per-field zeroing with a single kzalloc call, reducing the lines of code. Cc: Paul Bolle Cc: Karsten Keil Cc: "David S. Miller" Cc: Johan Hovold Cc: gigaset307x-common@lists.sourceforge.net Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/isdn/gigaset/bas-gigaset.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit e313ac12eb13a9738116192848695da54c38b1ae Author: Kees Cook Date: Mon Oct 16 17:29:14 2017 -0700 mISDN: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Karsten Keil Cc: Geliang Tang Cc: "David S. Miller" Cc: Masahiro Yamada Cc: Andrew Morton Cc: Anton Vasilyev Cc: Ingo Molnar Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/isdn/hardware/mISDN/mISDNipac.c | 7 +++---- drivers/isdn/hardware/mISDN/w6692.c | 7 +++---- drivers/isdn/mISDN/dsp.h | 2 +- drivers/isdn/mISDN/dsp_core.c | 6 ++---- drivers/isdn/mISDN/dsp_tones.c | 6 ++---- drivers/isdn/mISDN/fsm.c | 7 +++---- drivers/isdn/mISDN/l1oip_core.c | 15 +++++++-------- drivers/isdn/mISDN/timerdev.c | 6 +++--- 8 files changed, 24 insertions(+), 32 deletions(-) commit d99356797a8f3abaa57e13c5d1f50e4392eca037 Author: Kees Cook Date: Mon Oct 16 17:29:13 2017 -0700 forcedeth: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Zhu Yanjun Cc: Philippe Reynes Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/nvidia/forcedeth.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 11dd894e4afa7995d8e4bd6008cbd79840c3a8bd Author: Kees Cook Date: Mon Oct 16 17:29:12 2017 -0700 net: ksz884x: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Johannes Berg Cc: Jarod Wilson Cc: Masahiro Yamada Cc: Philippe Reynes Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/micrel/ksz884x.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 6fa35bd0e9e4e0d1ba3b6a6c7968b8c926317507 Author: Kees Cook Date: Mon Oct 16 17:29:11 2017 -0700 net: dl2k: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Jarod Wilson Cc: Tobias Klauser Cc: Philippe Reynes Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/dlink/dl2k.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit b09064b78f396ed0840895b11e8bd90e8380afd5 Author: Kees Cook Date: Mon Oct 16 17:29:10 2017 -0700 bna: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Rasesh Mody Cc: Sudarsana Kalluru Cc: Dept-GELinuxNICDev@cavium.com Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/brocade/bna/bnad.c | 43 +++++++++++++++------------------ 1 file changed, 19 insertions(+), 24 deletions(-) commit 495ad9864f17bb2f4e085f9398328d14bfdb4d88 Author: Kees Cook Date: Mon Oct 16 17:29:09 2017 -0700 net: amd8111e: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jarod Wilson Cc: Philippe Reynes Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/amd/amd8111e.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit cacd2b3fb9815ec29b778342a8aaa80edc0f98d3 Author: Kees Cook Date: Mon Oct 16 17:29:08 2017 -0700 chelsio: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Johannes Berg Cc: Eric Dumazet Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb/sge.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit 7974c0f3622b21825160a37d28b7b1f35ee4cbac Author: Kees Cook Date: Mon Oct 16 17:29:07 2017 -0700 drivers/net/3com: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Steffen Klassert Cc: "David S. Miller" Cc: Jarod Wilson Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/3com/3c574_cs.c | 12 +++++------- drivers/net/ethernet/3com/3c589_cs.c | 10 +++++----- drivers/net/ethernet/3com/3c59x.c | 20 ++++++++++---------- 3 files changed, 20 insertions(+), 22 deletions(-) commit 1fccb565e8b09e54467d41111f6faf08fcc9c3c1 Author: Kees Cook Date: Mon Oct 16 17:29:06 2017 -0700 net: can: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Oliver Hartkopp Cc: Marc Kleine-Budde Cc: "David S. Miller" Cc: linux-can@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/can/af_can.c | 4 ++-- net/can/af_can.h | 2 +- net/can/proc.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) commit a8c22a2bbc67d001479696c5696ae11c84116701 Author: Kees Cook Date: Mon Oct 16 17:29:05 2017 -0700 net: tulip: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: David Howells Cc: Jarod Wilson Cc: Stephen Hemminger Cc: Johannes Berg Cc: Eric Dumazet Cc: Philippe Reynes Cc: "yuval.shaia@oracle.com" Cc: netdev@vger.kernel.org Cc: linux-parisc@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/dec/tulip/de4x5.c | 12 ++++++------ drivers/net/ethernet/dec/tulip/dmfe.c | 10 +++++----- drivers/net/ethernet/dec/tulip/interrupt.c | 6 +++--- drivers/net/ethernet/dec/tulip/pnic.c | 6 +++--- drivers/net/ethernet/dec/tulip/pnic2.c | 6 +++--- drivers/net/ethernet/dec/tulip/timer.c | 12 ++++++------ drivers/net/ethernet/dec/tulip/tulip.h | 12 ++++++------ drivers/net/ethernet/dec/tulip/tulip_core.c | 14 ++++++-------- drivers/net/ethernet/dec/tulip/uli526x.c | 10 +++++----- drivers/net/ethernet/dec/tulip/winbond-840.c | 10 +++++----- 10 files changed, 48 insertions(+), 50 deletions(-) commit 3d2ceaa63b81f41cd95e8954555130cc801c4452 Author: Kees Cook Date: Mon Oct 16 17:29:04 2017 -0700 atm: idt77252: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This required adding a pointer back to vc_map, and adjusting the locking around removal a bit. Cc: Chas Williams <3chas3@gmail.com> Cc: linux-atm-general@lists.sourceforge.net Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/atm/idt77252.c | 21 ++++++++++++--------- drivers/atm/idt77252.h | 3 +++ 2 files changed, 15 insertions(+), 9 deletions(-) commit 847f03ee16cd4dbe1f15fe09989f52300e43ca10 Author: Kees Cook Date: Mon Oct 16 17:29:03 2017 -0700 drivers/atm/suni: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Passes NULL timer when doing non- timer call. Cc: Chas Williams <3chas3@gmail.com> Cc: linux-atm-general@lists.sourceforge.net Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/atm/suni.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 5a3a8962035277210098a6b498680769a8eb36b6 Author: Kees Cook Date: Mon Oct 16 17:29:02 2017 -0700 net: vxge: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Jon Mason Cc: "David S. Miller" Cc: Miroslav Lichvar Cc: Jarod Wilson Cc: Eric Dumazet Cc: stephen hemminger Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/neterion/vxge/vxge-main.c | 12 ++++++------ drivers/net/ethernet/neterion/vxge/vxge-main.h | 8 +++----- 2 files changed, 9 insertions(+), 11 deletions(-) commit d3e99b2d19b06030593761c658b648fd6427eaa1 Author: Kees Cook Date: Mon Oct 16 17:29:01 2017 -0700 net/cw1200: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Solomon Peachy Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/wireless/st/cw1200/pm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit abec4be3ee68c8572adb39da68fbfd86e63daa84 Author: Kees Cook Date: Mon Oct 16 17:29:00 2017 -0700 net: ethernet: stmmac: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/altr_tse_pcs.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 80c5a20b537996f848c61ddb8a6734c66b65abfd Author: Kees Cook Date: Mon Oct 16 17:28:59 2017 -0700 pcmcia/electra_cf: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Michael Ellerman Cc: linux-pcmcia@lists.infradead.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/pcmcia/electra_cf.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 41fce7034bf39721a30d7e6f2cb479808d7aea78 Author: Kees Cook Date: Mon Oct 16 17:28:58 2017 -0700 net: tulip: de2104x: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: "yuval.shaia@oracle.com" Cc: Tobias Klauser Cc: Jarod Wilson Cc: Philippe Reynes Cc: netdev@vger.kernel.org Cc: linux-parisc@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/dec/tulip/de2104x.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit eb8c6b5b4402581a805a5d8a736a7058c4c5abb7 Author: Kees Cook Date: Mon Oct 16 17:28:57 2017 -0700 ethernet/broadcom: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() helper to pass the timer pointer explicitly. Cc: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Cc: "David S. Miller" Cc: Arnd Bergmann Cc: Jarod Wilson Cc: netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcm63xx_enet.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit c3aed70953c39274bb55fe98e9b8344af1a7af75 Author: Kees Cook Date: Mon Oct 16 17:28:56 2017 -0700 xfrm: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() helper to pass the timer pointer explicitly. Cc: Steffen Klassert Cc: Herbert Xu Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/xfrm/xfrm_policy.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 8e763de0b91d9cdc68a80c4e5efd545f5fb644de Author: Kees Cook Date: Mon Oct 16 17:28:55 2017 -0700 net/hamradio/6pack: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Andreas Koensgen Cc: linux-hams@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/hamradio/6pack.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 5e8b824d91b43baa3125ab941e42137ef458e72f Author: Kees Cook Date: Mon Oct 16 17:28:54 2017 -0700 isdn/hisax: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Karsten Keil Cc: Geliang Tang Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/isdn/hisax/amd7930_fn.c | 6 +++--- drivers/isdn/hisax/arcofi.c | 6 +++--- drivers/isdn/hisax/diva.c | 9 ++++----- drivers/isdn/hisax/elsa.c | 10 +++++----- drivers/isdn/hisax/fsm.c | 7 +++---- drivers/isdn/hisax/hfc4s8s_l1.c | 6 +++--- drivers/isdn/hisax/hfc_2bds0.c | 4 ++-- drivers/isdn/hisax/hfc_pci.c | 9 +++++---- drivers/isdn/hisax/hfc_sx.c | 9 +++++---- drivers/isdn/hisax/hfc_usb.c | 10 ++++++---- drivers/isdn/hisax/hfcscard.c | 5 +++-- drivers/isdn/hisax/icc.c | 6 +++--- drivers/isdn/hisax/ipacx.c | 8 ++++---- drivers/isdn/hisax/isac.c | 6 +++--- drivers/isdn/hisax/isar.c | 9 ++++----- drivers/isdn/hisax/isdnl3.c | 6 +++--- drivers/isdn/hisax/saphir.c | 7 +++---- drivers/isdn/hisax/teleint.c | 5 +++-- drivers/isdn/hisax/w6692.c | 7 +++---- 19 files changed, 68 insertions(+), 67 deletions(-) commit d8eb7e262d0d438b23e69d836175b9cec3e4bb90 Author: Kees Cook Date: Mon Oct 16 17:28:52 2017 -0700 net/wireless/ray_cs: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/wireless/ray_cs.c | 53 ++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 29 deletions(-) commit 2183c1a61ccc952a836a533c88288289affa2a59 Author: Kees Cook Date: Mon Oct 16 17:28:51 2017 -0700 net/usb/usbnet: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Since the callback is called from both a timer and a tasklet, adjust the tasklet to pass the timer address too. When tasklets have their .data field removed, this can be refactored to call a central function after resolving the correct container_of() for a separate callback function for timer and tasklet. Cc: Oliver Neukum Cc: netdev@vger.kernel.org Cc: linux-usb@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Oliver Neukum Signed-off-by: David S. Miller drivers/net/usb/usbnet.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 0010e3f8b3537b8e7c8a8e7249f9d184e92df1a5 Author: Kees Cook Date: Mon Oct 16 17:28:50 2017 -0700 net/ti/tlan: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Samuel Chessman Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/net/ethernet/ti/tlan.c | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) commit 4966babd904d7f8e9e20735f3637a98fd7ca538c Author: Kees Cook Date: Mon Oct 16 17:28:47 2017 -0700 net/rose: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Ralf Baechle Cc: "David S. Miller" Cc: linux-hams@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/rose/af_rose.c | 17 +++++++++-------- net/rose/rose_link.c | 16 +++++++--------- net/rose/rose_loopback.c | 9 +++------ net/rose/rose_route.c | 8 ++++---- net/rose/rose_timer.c | 30 +++++++++++++----------------- 5 files changed, 36 insertions(+), 44 deletions(-) commit 83a37b3292f4aca799b355179ad6fbdd78a08e10 Author: Kees Cook Date: Mon Oct 16 17:28:46 2017 -0700 net/lapb: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Hans Liljestrand Cc: "Reshetova, Elena" Cc: linux-x25@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller net/lapb/lapb_iface.c | 4 ++-- net/lapb/lapb_timer.c | 18 ++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) commit eb4ddaf474285a4c6986f4a1c3205bdb0bed2da9 Author: Kees Cook Date: Mon Oct 16 17:28:45 2017 -0700 net/decnet: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "David S. Miller" Cc: Johannes Berg Cc: David Ahern Cc: linux-decnet-user@lists.sourceforge.net Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller include/net/dn.h | 7 ------- include/net/dn_nsp.h | 1 - net/decnet/af_decnet.c | 4 ---- net/decnet/dn_dev.c | 12 +++++------- net/decnet/dn_nsp_out.c | 11 ----------- 5 files changed, 5 insertions(+), 30 deletions(-) commit 2193eb9631d272e5a8a7e7534830f555305aa556 Author: Pierre-Louis Bossart Date: Thu Oct 12 18:38:05 2017 -0500 ASoC: Intel: boards: remove hard-coded compressed dailinks The hard-coded compressed dailinks are not supported using publicly-available firmwares, which creates unnecessary user confusion [1]. Even if the firmware was available, the mainline code does not have the required .dynamic=1 and .dpcm_playback=1 fields so probably never worked as is, and last and they conflict with topology-defined streams. Remove them and move on. This can be re-enabled with SOF later in a more flexible manner. [1] http://mailman.alsa-project.org/pipermail/alsa-devel/2017-August/124868.html Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Reviewed-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/intel/boards/bytcht_da7213.c | 9 --------- sound/soc/intel/boards/bytcht_es8316.c | 9 --------- sound/soc/intel/boards/bytcht_nocodec.c | 8 -------- sound/soc/intel/boards/bytcr_rt5640.c | 11 +---------- sound/soc/intel/boards/bytcr_rt5651.c | 11 +---------- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 8 -------- sound/soc/intel/boards/cht_bsw_rt5645.c | 8 -------- sound/soc/intel/boards/cht_bsw_rt5672.c | 8 -------- 8 files changed, 2 insertions(+), 70 deletions(-) commit 149f77575906d7dca1c62ee5a5539b6b7e851f46 Author: Pierre-Louis Bossart Date: Thu Oct 12 18:38:04 2017 -0500 ASoC: Intel: boards: fix off-by-one dailink id For some reason the Atom/HiFi2 machine drivers use an id=1 instead of zero as done on all other platforms. This gets in the way of topology-based matching, realign for consistency. This should not have any functional impact on existing solutions with don't rely on topology. Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Reviewed-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/intel/boards/bytcht_da7213.c | 2 +- sound/soc/intel/boards/bytcht_es8316.c | 2 +- sound/soc/intel/boards/bytcht_nocodec.c | 2 +- sound/soc/intel/boards/bytcr_rt5640.c | 2 +- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5645.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5672.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit dfb6ec7ae57d33d2854a1af2dfe1278da8a7dedc Author: Pierre-Louis Bossart Date: Thu Oct 12 18:38:03 2017 -0500 ASoC: Intel: boards: use helper to get codec_dai Remove duplicate code with a common helper in all Intel machine drivers. Suggested-by: Andy Shevchenko Suggested-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Reviewed-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/intel/boards/bxt_da7219_max98357a.c | 16 +--------------- sound/soc/intel/boards/bytcr_rt5640.c | 21 ++++----------------- sound/soc/intel/boards/bytcr_rt5651.c | 14 +------------- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 14 +------------- sound/soc/intel/boards/cht_bsw_rt5645.c | 20 ++++---------------- sound/soc/intel/boards/cht_bsw_rt5672.c | 14 +------------- sound/soc/intel/boards/skl_nau88l25_max98357a.c | 16 +--------------- sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 16 +--------------- 8 files changed, 14 insertions(+), 117 deletions(-) commit 8a2eca50c618ef2affc140b38dc7fdc63d423e89 Author: Pierre-Louis Bossart Date: Thu Oct 12 18:38:01 2017 -0500 ASoC: Intel: bytcht_es8316: remove useless code get_codec_dai() is not used, remove it Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Reviewed-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/intel/boards/bytcht_es8316.c | 14 -------------- 1 file changed, 14 deletions(-) commit 22a317a0505d11db3ab08f4e4b25d3064228af02 Author: Pierre-Louis Bossart Date: Thu Oct 12 18:38:00 2017 -0500 ASoC: Intel: bytcht_da7213: cosmetic fixes Reorder variable names, change tests No functional change Suggested-by: Andy Shevchenko Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Reviewed-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/intel/boards/bytcht_da7213.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6cdf01a5addfd3a2b2918fccc76535f20eb2cda9 Author: Pierre-Louis Bossart Date: Thu Oct 12 18:37:59 2017 -0500 ASoC: Intel: cht_bsw_rt5645: cosmetic fixes Reorder variable names, change MCLK test, change quirks No functional change Suggested-by: Andy Shevchenko Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Reviewed-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_rt5645.c | 73 ++++++++++++++++----------------- 1 file changed, 35 insertions(+), 38 deletions(-) commit 17b5273d847984fe8a7c3177554640fb7eac23da Author: Pierre-Louis Bossart Date: Thu Oct 12 18:37:58 2017 -0500 ASoC: Intel: bytcr_rt5640: cosmetic fixes Reorder variable names, change MCLK test, change quirks No functional change Suggested-by: Andy Shevchenko Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Reviewed-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 73 +++++++++++++++++------------------ 1 file changed, 36 insertions(+), 37 deletions(-) commit 02c0a3b3047f8fe49fdc040414ee243f2b2c64ce Author: Pierre-Louis Bossart Date: Thu Oct 12 18:37:57 2017 -0500 ASoC: Intel: bytcr_rt5651: add MCLK, quirks and cleanups Same as for other codecs, enable MCLK by default. When it is not present, e.g. on MinnowBoard B3 since it's not routed on the LSE connector, we fall back to blck-based clocking. The DMIC quirks are also fixed, there is a single DMIC input of the codec. reorder variables in reverse x-mas tree as suggested by Andy Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Reviewed-by: Andy Shevchenko Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 239 +++++++++++++++++++++++++++++++--- 1 file changed, 222 insertions(+), 17 deletions(-) commit fc3c546a22154398324d01d89aa1ec4757033e40 Merge: 364497a 7c761b5 Author: Mark Brown Date: Wed Oct 18 12:28:37 2017 +0100 Merge branch 'topic/helpers' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel commit 7c761b593e2c1dc6bc6c0c15ec338af1f00cabd7 Author: Pierre-Louis Bossart Date: Thu Oct 12 18:38:02 2017 -0500 ASoC: Add helper to find codec_dai from dai_name Create a helper function to remove duplicate code used in machine drivers Suggested-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart Acked-by: Liam Girdwood Reviewed-by: Andy Shevchenko Signed-off-by: Mark Brown include/sound/soc.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 1bbc728988f09e40c83585cf3322b1f6c1aa17b5 Merge: a2084f5 c8652c8 Author: David S. Miller Date: Wed Oct 18 12:24:34 2017 +0100 Merge branch 'dsa-master-and-slave-helpers' Vivien Didelot says: ==================== net: dsa: master and slave helpers This patch series adds a few helpers to DSA core for clarity and readability but brings no functional changes. A dsa_slave_notify helper calls the DSA notifiers when (un)registering a slave device. Most of the DSA slave code only needs to access the dsa_port structure, not the dsa_slave_priv (which only contains a few PHY-specific members). Thus a dsa_slave_to_port helper returns a dsa_port structure of a slave device. A dsa_slave_to_master returns the master device of a slave device. After that the netdev member of the dsa_port structure is split into two explicit master and slave members to avoid confusion, and a dsa_to_port helper is added for switch drivers to get a const reference to a port. Changes in v2: - prefer dsa_slave_to_master instead of dsa_slave_get_master - rename dsa_master_get_slave to dsa_master_find_slave - pack master and slave net devices into an anonymous union - add dsa_to_port public helper for switch drivers - add Reviewed-by tags from Florian ==================== Signed-off-by: David S. Miller commit c8652c83bc84ac8db44060ced0036de7628aa5e5 Author: Vivien Didelot Date: Mon Oct 16 11:12:19 2017 -0400 net: dsa: add dsa_to_port helper The dsa_port structure is part of DSA core data and must only be updated by the later. It is OK and sometimes necessary for the DSA drivers to access this data, but this has to be read only. For that purpose, add a dsa_to_port() helper which returns a const pointer to a dsa_port structure which must be used by DSA drivers from now on instead of digging into ds->ports[] themselves. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 4 ++-- drivers/net/dsa/lan9303-core.c | 2 +- drivers/net/dsa/mt7530.c | 4 ++-- drivers/net/dsa/mv88e6060.c | 2 +- drivers/net/dsa/mv88e6xxx/chip.c | 8 ++++---- drivers/net/dsa/qca8k.c | 4 ++-- include/net/dsa.h | 5 +++++ 7 files changed, 17 insertions(+), 12 deletions(-) commit f8b8b1cd5aadd221742b45eb0ee3c8a80abf036a Author: Vivien Didelot Date: Mon Oct 16 11:12:18 2017 -0400 net: dsa: split dsa_port's netdev member The dsa_port structure has a "netdev" member, which can be used for either the master device, or the slave device, depending on its type. It is true that today, CPU port are not exposed to userspace, thus the port's netdev member can be used to point to its master interface. But it is still slightly confusing, so split it into more explicit "master" and "slave" members inside an anonymous union. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 6 +++--- drivers/net/dsa/mt7530.c | 2 +- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- include/net/dsa.h | 9 ++++++++- net/dsa/dsa.c | 6 +++--- net/dsa/dsa2.c | 20 ++++++++++---------- net/dsa/dsa_priv.h | 4 ++-- net/dsa/legacy.c | 14 +++++++------- net/dsa/slave.c | 6 +++--- 9 files changed, 38 insertions(+), 31 deletions(-) commit 2231c43b560403675217f52204b18c1c59c0ee76 Author: Vivien Didelot Date: Mon Oct 16 11:12:17 2017 -0400 net: dsa: rename dsa_master_get_slave The dsa_master_get_slave is slightly confusing since the idiomatic "get" term often suggests reference counting, in symmetry to "put". Rename it to dsa_master_find_slave to make the look up operation clear. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 4 ++-- net/dsa/tag_brcm.c | 2 +- net/dsa/tag_dsa.c | 2 +- net/dsa/tag_edsa.c | 2 +- net/dsa/tag_ksz.c | 2 +- net/dsa/tag_lan9303.c | 2 +- net/dsa/tag_mtk.c | 2 +- net/dsa/tag_qca.c | 2 +- net/dsa/tag_trailer.c | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) commit d0006b002208936d36af8e4dce1f6dfeebb2dfba Author: Vivien Didelot Date: Mon Oct 16 11:12:16 2017 -0400 net: dsa: add slave to master helper Many part of the DSA slave code require to get the master device assigned to a slave device. Remove dsa_master_netdev() in favor of a dsa_slave_to_master() helper which does that. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 13 ++++++++----- net/dsa/slave.c | 26 +++++++++----------------- 2 files changed, 17 insertions(+), 22 deletions(-) commit d945097bb19501bd95790d8220d4eeb418b6ebb2 Author: Vivien Didelot Date: Mon Oct 16 11:12:15 2017 -0400 net: dsa: add slave to port helper Many portions of DSA core code require to get the dsa_port structure corresponding to a slave net_device. For this purpose, introduce a dsa_slave_to_port() helper. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 7 +++ net/dsa/legacy.c | 6 +- net/dsa/slave.c | 167 +++++++++++++++++++++++++------------------------- net/dsa/tag_brcm.c | 9 ++- net/dsa/tag_dsa.c | 10 +-- net/dsa/tag_edsa.c | 10 +-- net/dsa/tag_ksz.c | 4 +- net/dsa/tag_lan9303.c | 4 +- net/dsa/tag_mtk.c | 4 +- net/dsa/tag_qca.c | 5 +- net/dsa/tag_trailer.c | 4 +- 11 files changed, 115 insertions(+), 115 deletions(-) commit 6158eaa7a717b469b1b0c0ae6d79910737686279 Author: Vivien Didelot Date: Mon Oct 16 11:12:14 2017 -0400 net: dsa: add slave notify helper Both DSA slave create and destroy functions call call_dsa_notifiers with respectively DSA_PORT_REGISTER and DSA_PORT_UNREGISTER and the same dsa_notifier_register_info structure. Wrap this in a dsa_slave_notify helper so prevent cluttering these functions. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit a5b930e0598dc46184af0282c23c75b2167d9384 Author: Vivien Didelot Date: Mon Oct 16 11:12:13 2017 -0400 net: dsa: use port's cpu_dp when creating a slave When dsa_slave_create is called, the related port already has a CPU port assigned to it, available in its cpu_dp member. Use it instead of the unique tree cpu_dp. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit a2084f5650624edd0805dc78260d097df4f38eb6 Author: Johannes Berg Date: Mon Oct 16 16:57:49 2017 +0200 netlink: use NETLINK_CB(in_skb).sk instead of looking it up When netlink_ack() reports an allocation error to the sending socket, there's no need to look up the sending socket since it's available in the SKB's CB. Use that instead of going to the trouble of looking it up. Note that the pointer is only available since Eric Biederman's commit 3fbc290540a1 ("netlink: Make the sending netlink socket availabe in NETLINK_CB") which is far newer than the original lookup code (Oct 2003) (though the field was called 'ssk' in that commit and only got renamed to 'sk' later, I'd actually argue 'ssk' was better - or perhaps it should've been 'source_sk' - since there are so many different 'sk's involved.) Signed-off-by: Johannes Berg Signed-off-by: David S. Miller net/netlink/af_netlink.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 452606d6c9cd7cd6d1037d06763c687f617e795f Merge: 4b70c62 fad3917 Author: David S. Miller Date: Wed Oct 18 12:12:19 2017 +0100 Merge branch 'bpf-cpumap-type-for-XDP_REDIRECT' Jesper Dangaard Brouer says: ==================== net: New bpf cpumap type for XDP_REDIRECT Introducing a new way to redirect XDP frames. Notice how no driver changes are necessary given the design of XDP_REDIRECT. This redirect map type is called 'cpumap', as it allows redirection XDP frames to remote CPUs. The remote CPU will do the SKB allocation and start the network stack invocation on that CPU. This is a scalability and isolation mechanism, that allow separating the early driver network XDP layer, from the rest of the netstack, and assigning dedicated CPUs for this stage. The sysadm control/configure the RX-CPU to NIC-RX queue (as usual) via procfs smp_affinity and how many queues are configured via ethtool --set-channels. Benchmarks show that a single CPU can handle approx 11Mpps. Thus, only assigning two NIC RX-queues (and two CPUs) is sufficient for handling 10Gbit/s wirespeed smallest packet 14.88Mpps. Reducing the number of queues have the advantage that more packets being "bulk" available per hard interrupt[1]. [1] https://www.netdevconf.org/2.1/papers/BusyPollingNextGen.pdf Use-cases: 1. End-host based pre-filtering for DDoS mitigation. This is fast enough to allow software to see and filter all packets wirespeed. Thus, no packets getting silently dropped by hardware. 2. Given NIC HW unevenly distributes packets across RX queue, this mechanism can be used for redistribution load across CPUs. This usually happens when HW is unaware of a new protocol. This resembles RPS (Receive Packet Steering), just faster, but with more responsibility placed on the BPF program for correct steering. 3. Auto-scaling or power saving via only activating the appropriate number of remote CPUs for handling the current load. The cpumap tracepoints can function as a feedback loop for this purpose. In V7, a --stress-mode was implemented for the samples program, which between each stats update, adds + removes CPUs from the map concurrently with traffic. I did find and fix some concurrency issues in the tear-down path, details in patch desc. The stress test have now been running for 15 hours without any issues, while being bombarded with 11.6 Mpps via pktgen_sample04_many_flows.sh. See individual patches for patchset-version changes. ==================== Signed-off-by: David S. Miller commit fad3917e361b115f776563366415ffb2fc706bf1 Author: Jesper Dangaard Brouer Date: Mon Oct 16 12:19:49 2017 +0200 samples/bpf: add cpumap sample program xdp_redirect_cpu This sample program show how to use cpumap and the associated tracepoints. It provides command line stats, which shows how the XDP-RX process, cpumap-enqueue and cpumap kthread dequeue is cooperating on a per CPU basis. It also utilize the xdp_exception and xdp_redirect_err transpoints to allow users quickly to identify setup issues. One issue with ixgbe driver is that the driver reset the link when loading XDP. This reset the procfs smp_affinity settings. Thus, after loading the program, these must be reconfigured. The easiest workaround it to reduce the RX-queue to e.g. two via: # ethtool --set-channels ixgbe1 combined 2 And then add CPUs above 0 and 1, like: # xdp_redirect_cpu --dev ixgbe1 --prog 2 --cpu 2 --cpu 3 --cpu 4 Another issue with ixgbe is that the page recycle mechanism is tied to the RX-ring size. And the default setting of 512 elements is too small. This is the same issue with regular devmap XDP_REDIRECT. To overcome this I've been using 1024 rx-ring size: # ethtool -G ixgbe1 rx 1024 tx 1024 V3: - whitespace cleanups - bpf tracepoint cannot access top part of struct V4: - report on kthread sched events, according to tracepoint change - report average bulk enqueue size V5: - bpf_map_lookup_elem on cpumap not allowed from bpf_prog use separate map to mark CPUs not available V6: - correct kthread sched summary output V7: - Added a --stress-mode for concurrently changing underlying cpumap Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller samples/bpf/Makefile | 4 + samples/bpf/xdp_redirect_cpu_kern.c | 609 +++++++++++++++++++++++++++++++ samples/bpf/xdp_redirect_cpu_user.c | 697 ++++++++++++++++++++++++++++++++++++ 3 files changed, 1310 insertions(+) commit f9419f7bd7a5318b636a941a0214c5cdfa6f6530 Author: Jesper Dangaard Brouer Date: Mon Oct 16 12:19:44 2017 +0200 bpf: cpumap add tracepoints This adds two tracepoint to the cpumap. One for the enqueue side trace_xdp_cpumap_enqueue() and one for the kthread dequeue side trace_xdp_cpumap_kthread(). To mitigate the tracepoint overhead, these are invoked during the enqueue/dequeue bulking phases, thus amortizing the cost. The obvious use-cases are for debugging and monitoring. The non-intuitive use-case is using these as a feedback loop to know the system load. One can imagine auto-scaling by reducing, adding or activating more worker CPUs on demand. V4: tracepoint remove time_limit info, instead add sched info V8: intro struct bpf_cpu_map_entry members cpu+map_id in this patch Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller include/trace/events/xdp.h | 70 ++++++++++++++++++++++++++++++++++++++++++++++ kernel/bpf/cpumap.c | 24 ++++++++++++---- 2 files changed, 89 insertions(+), 5 deletions(-) commit 1c601d829ab0d7ac3ac44853f83db2206afe67fc Author: Jesper Dangaard Brouer Date: Mon Oct 16 12:19:39 2017 +0200 bpf: cpumap xdp_buff to skb conversion and allocation This patch makes cpumap functional, by adding SKB allocation and invoking the network stack on the dequeuing CPU. For constructing the SKB on the remote CPU, the xdp_buff in converted into a struct xdp_pkt, and it mapped into the top headroom of the packet, to avoid allocating separate mem. For now, struct xdp_pkt is just a cpumap internal data structure, with info carried between enqueue to dequeue. If a driver doesn't have enough headroom it is simply dropped, with return code -EOVERFLOW. This will be picked up the xdp tracepoint infrastructure, to allow users to catch this. V2: take into account xdp->data_meta V4: - Drop busypoll tricks, keeping it more simple. - Skip RPS and Generic-XDP-recursive-reinjection, suggested by Alexei V5: correct RCU read protection around __netif_receive_skb_core. V6: Setting TASK_RUNNING vs TASK_INTERRUPTIBLE based on talk with Rik van Riel Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller include/linux/netdevice.h | 1 + kernel/bpf/cpumap.c | 152 +++++++++++++++++++++++++++++++++++++++------- net/core/dev.c | 27 ++++++++ 3 files changed, 158 insertions(+), 22 deletions(-) commit 9c270af37bb62e708e3e4415d653ce73e713df02 Author: Jesper Dangaard Brouer Date: Mon Oct 16 12:19:34 2017 +0200 bpf: XDP_REDIRECT enable use of cpumap This patch connects cpumap to the xdp_do_redirect_map infrastructure. Still no SKB allocation are done yet. The XDP frames are transferred to the other CPU, but they are simply refcnt decremented on the remote CPU. This served as a good benchmark for measuring the overhead of remote refcnt decrement. If driver page recycle cache is not efficient then this, exposes a bottleneck in the page allocator. A shout-out to MST's ptr_ring, which is the secret behind is being so efficient to transfer memory pointers between CPUs, without constantly bouncing cache-lines between CPUs. V3: Handle !CONFIG_BPF_SYSCALL pointed out by kbuild test robot. V4: Make Generic-XDP aware of cpumap type, but don't allow redirect yet, as implementation require a separate upstream discussion. V5: - Fix a maybe-uninitialized pointed out by kbuild test robot. - Restrict bpf-prog side access to cpumap, open when use-cases appear - Implement cpu_map_enqueue() as a more simple void pointer enqueue V6: - Allow cpumap type for usage in helper bpf_redirect_map, general bpf-prog side restriction moved to earlier patch. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller include/linux/bpf.h | 31 +++++++++- include/trace/events/xdp.h | 10 +++- kernel/bpf/cpumap.c | 22 ++++++- kernel/bpf/verifier.c | 3 +- net/core/filter.c | 140 +++++++++++++++++++++++++++++++++++---------- 5 files changed, 172 insertions(+), 34 deletions(-) commit 6710e1126934d8b4372b4d2f9ae1646cd3f151bf Author: Jesper Dangaard Brouer Date: Mon Oct 16 12:19:28 2017 +0200 bpf: introduce new bpf cpu map type BPF_MAP_TYPE_CPUMAP The 'cpumap' is primarily used as a backend map for XDP BPF helper call bpf_redirect_map() and XDP_REDIRECT action, like 'devmap'. This patch implement the main part of the map. It is not connected to the XDP redirect system yet, and no SKB allocation are done yet. The main concern in this patch is to ensure the datapath can run without any locking. This adds complexity to the setup and tear-down procedure, which assumptions are extra carefully documented in the code comments. V2: - make sure array isn't larger than NR_CPUS - make sure CPUs added is a valid possible CPU V3: fix nitpicks from Jakub Kicinski V5: - Restrict map allocation to root / CAP_SYS_ADMIN - WARN_ON_ONCE if queue is not empty on tear-down - Return -EPERM on memlock limit instead of -ENOMEM - Error code in __cpu_map_entry_alloc() also handle ptr_ring_cleanup() - Moved cpu_map_enqueue() to next patch V6: all notice by Daniel Borkmann - Fix err return code in cpu_map_alloc() introduced in V5 - Move cpu_possible() check after max_entries boundary check - Forbid usage initially in check_map_func_compatibility() V7: - Fix alloc error path spotted by Daniel Borkmann - Did stress test adding+removing CPUs from the map concurrently - Fixed refcnt issue on cpu_map_entry, kthread started too soon - Make sure packets are flushed during tear-down, involved use of rcu_barrier() and kthread_run only exit after queue is empty - Fix alloc error path in __cpu_map_entry_alloc() for ptr_ring V8: - Nitpicking comments and gramma by Edward Cree - Fix missing semi-colon introduced in V7 due to rebasing - Move struct bpf_cpu_map_entry members cpu+map_id to tracepoint patch Signed-off-by: Jesper Dangaard Brouer Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf_types.h | 1 + include/uapi/linux/bpf.h | 1 + kernel/bpf/Makefile | 1 + kernel/bpf/cpumap.c | 560 +++++++++++++++++++++++++++++++++++++++++ kernel/bpf/syscall.c | 8 +- kernel/bpf/verifier.c | 5 + tools/include/uapi/linux/bpf.h | 1 + 7 files changed, 576 insertions(+), 1 deletion(-) commit 4b70c62b9eafcee0505b440732d2e00c50f3085d Author: Joel Stanley Date: Fri Oct 13 12:16:38 2017 +0800 net: ftgmac100: Request clock and set speed According to the ASPEED datasheet, gigabit speeds require a clock of 100MHz or higher. Other speeds require 25MHz or higher. This patch configures a 100MHz clock if the system has a direct-attached PHY, or 25MHz if the system is running NC-SI which is limited to 100MHz. There appear to be no other upstream users of the FTGMAC100 driver it is hard to know the clocking requirements of other platforms. Therefore a conservative approach was taken with enabling clocks. If the platform is not ASPEED, both requesting the clock and configuring the speed is skipped. Signed-off-by: Joel Stanley Tested-by: Andrew Jeffery Signed-off-by: David S. Miller drivers/net/ethernet/faraday/ftgmac100.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit d6648174523af2ccbf7f49b1f0c023bdeb183a3c Merge: 415060b 2fb8500 Author: Kishon Vijay Abraham I Date: Wed Oct 18 16:31:59 2017 +0530 Merge branch 'fixes' into next commit f6ffcaa6f6cc118259b2ecc53a419fd76e6899c7 Author: Jagan Teki Date: Mon Oct 16 17:46:26 2017 +0530 ARM: dts: rockchip: Add io domains for rk3288-vyasa Add io domains supported by rk3288-vyasa board. Signed-off-by: Jagan Teki Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-vyasa.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit bc5e3a546d553e5223851fc199e69040eb70f68b Author: David Howells Date: Wed Oct 18 11:07:31 2017 +0100 rxrpc: Use MSG_WAITALL to tell sendmsg() to temporarily ignore signals Make AF_RXRPC accept MSG_WAITALL as a flag to sendmsg() to tell it to ignore signals whilst loading up the message queue, provided progress is being made in emptying the queue at the other side. Progress is defined as the base of the transmit window having being advanced within 2 RTT periods. If the period is exceeded with no progress, sendmsg() will return anyway, indicating how much data has been copied, if any. Once the supplied buffer is entirely decanted, the sendmsg() will return. Signed-off-by: David Howells Documentation/networking/rxrpc.txt | 12 +++++ fs/afs/rxrpc.c | 31 +++++++++-- net/rxrpc/sendmsg.c | 107 ++++++++++++++++++++++++++++--------- 3 files changed, 119 insertions(+), 31 deletions(-) commit f4d15fb6f99af9b99f688bd87579137be44f85ee Author: David Howells Date: Wed Oct 18 11:07:31 2017 +0100 rxrpc: Provide functions for allowing cleaner handling of signals Provide a couple of functions to allow cleaner handling of signals in a kernel service. They are: (1) rxrpc_kernel_get_rtt() This allows the kernel service to find out the RTT time for a call, so as to better judge how large a timeout to employ. Note, though, that whilst this returns a value in nanoseconds, the timeouts can only actually be in jiffies. (2) rxrpc_kernel_check_life() This returns a number that is updated when ACKs are received from the peer (notably including PING RESPONSE ACKs which we can elicit by sending PING ACKs to see if the call still exists on the server). The caller should compare the numbers of two calls to see if the call is still alive. These can be used to provide an extending timeout rather than returning immediately in the case that a signal occurs that would otherwise abort an RPC operation. The timeout would be extended if the server is still responsive and the call is still apparently alive on the server. For most operations this isn't that necessary - but for FS.StoreData it is: OpenAFS writes the data to storage as it comes in without making a backup, so if we immediately abort it when partially complete on a CTRL+C, say, we have no idea of the state of the file after the abort. Signed-off-by: David Howells Documentation/networking/rxrpc.txt | 24 ++++++++++++++++++++++++ include/net/af_rxrpc.h | 2 ++ net/rxrpc/af_rxrpc.c | 19 +++++++++++++++++++ net/rxrpc/peer_object.c | 13 +++++++++++++ 4 files changed, 58 insertions(+) commit c8a04b5de4bbdd0c7553aaa315c72722b10f0207 Author: Bard Liao Date: Mon Oct 16 19:15:16 2017 +0800 ASoC: rt5659: move set_pll to codec level Move set_pll function 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/rt5659.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit fe01e5e8fae91b235ecf928f6bf0a90c17d74e36 Author: Bard Liao Date: Mon Oct 16 19:15:15 2017 +0800 ASoC: rt5659: 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/rt5659.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a68f4a27f55f1d54e35c270aff89383da4b1b656 Author: David Howells Date: Wed Oct 18 11:36:39 2017 +0100 rxrpc: Support service upgrade from a kernel service Provide support for a kernel service to make use of the service upgrade facility. This involves: (1) Pass an upgrade request flag to rxrpc_kernel_begin_call(). (2) Make rxrpc_kernel_recv_data() return the call's current service ID so that the caller can detect service upgrade and see what the service was upgraded to. Signed-off-by: David Howells Documentation/networking/rxrpc.txt | 17 +++++++++++++++-- fs/afs/internal.h | 1 + fs/afs/rxrpc.c | 11 +++++++---- include/net/af_rxrpc.h | 5 +++-- net/rxrpc/af_rxrpc.c | 5 ++++- net/rxrpc/recvmsg.c | 5 ++++- 6 files changed, 34 insertions(+), 10 deletions(-) commit 064970a0aae978073a859aaf0793bfe14762d4f3 Author: Marek Szyprowski Date: Wed Oct 18 09:25:34 2017 +0200 ASoC: samsung: i2s: disable secondary DAI until it gets fixed Secondary DAI in Exynos I2S driver is not used by any of the currently supported boards and it causes problems due to some limitations in the ASoC code. Disable it until it gets proper support both by board-specific and ASoC core code. Also disable IDMA support, which relies on secondary DAI presence. This patch fixes following kernel warning: samsung-i2s 3830000.i2s: ASoC: Failed to create component debugfs directory samsung-i2s 3830000.i2s: ASoC: Failed to create component debugfs directory ------------[ cut here ]------------ WARNING: CPU: 3 PID: 82 at fs/proc/generic.c:330 proc_register+0xec/0x10c proc_dir_entry 'sub0/prealloc' already registered Modules linked in: CPU: 3 PID: 82 Comm: kworker/3:1 Not tainted 4.14.0-rc5-next-20171017 #3089 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) Workqueue: events deferred_probe_work_func [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x90/0xc8) [] (dump_stack) from [] (__warn+0xd4/0x100) [] (__warn) from [] (warn_slowpath_fmt+0x38/0x48) [] (warn_slowpath_fmt) from [] (proc_register+0xec/0x10c) [] (proc_register) from [] (proc_create_data+0x84/0xc8) [] (proc_create_data) from [] (snd_info_register+0x64/0xcc) [] (snd_info_register) from [] (snd_pcm_lib_preallocate_pages1+0x78/0x1a0) [] (snd_pcm_lib_preallocate_pages1) from [] (dmaengine_pcm_new+0xa0/0x1ec) [] (dmaengine_pcm_new) from [] (snd_soc_platform_drv_pcm_new+0x1c/0x28) [] (snd_soc_platform_drv_pcm_new) from [] (soc_new_pcm+0x2f4/0x4f4) [] (soc_new_pcm) from [] (snd_soc_register_card+0xc4c/0xdc4) [] (snd_soc_register_card) from [] (devm_snd_soc_register_card+0x34/0x70) [] (devm_snd_soc_register_card) from [] (asoc_simple_card_probe+0x230/0x47c) [] (asoc_simple_card_probe) from [] (platform_drv_probe+0x50/0xb0) [] (platform_drv_probe) from [] (driver_probe_device+0x2a0/0x46c) [] (driver_probe_device) from [] (bus_for_each_drv+0x44/0x8c) [] (bus_for_each_drv) from [] (__device_attach+0xa0/0x134) [] (__device_attach) from [] (bus_probe_device+0x88/0x90) [] (bus_probe_device) from [] (deferred_probe_work_func+0x3c/0x168) [] (deferred_probe_work_func) from [] (process_one_work+0x188/0x41c) [] (process_one_work) from [] (process_scheduled_works+0x28/0x38) [] (process_scheduled_works) from [] (worker_thread+0x210/0x4dc) [] (worker_thread) from [] (kthread+0x128/0x164) [] (kthread) from [] (ret_from_fork+0x14/0x2c) ---[ end trace bad8db6ee771d094 ]-- Signed-off-by: Marek Szyprowski Signed-off-by: Mark Brown sound/soc/samsung/i2s.c | 1 + 1 file changed, 1 insertion(+) commit ad92ceaf35822ebc2643d65ebba92d6dff18ae33 Author: Axel Lin Date: Sun Oct 15 17:03:12 2017 +0800 regulator: axp20x: Simplify axp20x_is_polyphase_slave implementation The code to handle AXP803_ID and AXP813_ID cases are exactly the same. Make the switch-case fall through to avoid duplicate code. Signed-off-by: Axel Lin Signed-off-by: Mark Brown drivers/regulator/axp20x-regulator.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 6bd25aae3a9bc7ed3d24f2b3d4cd711fadc5d32e Author: Robert Jarzmik Date: Sat Oct 14 22:14:02 2017 +0200 ASoC: wm97xx: fix compilation corner case When the old AC97 is not used, CONFIG_SND_SOC_AC97_BUS is not defined. As a consequence, in the error path, snd_soc_free_ac97_codec() is not defined and triggers a compilation error. Fix it for wm9705 and wm9712, as wm9713 is correctly written. Signed-off-by: Robert Jarzmik Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm9705.c | 8 ++------ sound/soc/codecs/wm9712.c | 7 ++----- 2 files changed, 4 insertions(+), 11 deletions(-) commit 8e9f8ab47588241ae5f85f24e82f75832de866bd Author: Harsha Sharma Date: Sun Oct 15 00:06:44 2017 +0530 drm/i915: Replace *_reference/unreference() or *_ref/unref with _get/put() Replace instances of drm_framebuffer_reference/unreference() with *_get/put() suffixes and drm_dev_unref with *_put() suffix because get/put is shorter and consistent with the kernel use of *_get/put suffixes. Done with following coccinelle semantic patch @@ expression ex; @@ ( -drm_framebuffer_unreference(ex); +drm_framebuffer_put(ex); | -drm_dev_unref(ex); +drm_dev_put(ex); | -drm_framebuffer_reference(ex); +drm_framebuffer_get(ex); ) Signed-off-by: Harsha Sharma Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171014183644.21990-1-harshasharmaiitr@gmail.com drivers/gpu/drm/i915/i915_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c798a45318e098e9937b0fee1e0cf986174fbbe Author: Johannes Berg Date: Fri Oct 13 11:54:03 2017 +0200 iwlwifi: pcie: remove set but not used variable tcph This variable is never used, so remove the code to set it. After this, the variable 'iph' also has the same fate. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 1105a337375258515ed09b92a83fd7bfd6775958 Author: Luca Coelho Date: Thu Oct 12 11:20:50 2017 +0300 iwlwifi: pcie: sort IDs for the 9000 series for easier comparisons It's hard to find values that are missing in the list, so sorting the values and comparing them makes it much easier. To simplify this task, sort the devices in the list. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 84 +++++++++++++-------------- 1 file changed, 42 insertions(+), 42 deletions(-) commit 41fd2fec56db2564f02532ed7244e1f69193b4ad Author: Liad Kaufman Date: Mon Oct 9 11:01:33 2017 +0300 iwlwifi: mvm: add missing lq_color In the compressed BA notif, the driver didn't parse out the LQ color, so statistics for the rates tried were always thrown out. Add it so it gets correctly used. While at it, fix the name of the relevant field in the struct. Fixes: c46e7724bfe9 ("iwlwifi: mvm: support new BA notification response") Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/api/tx.h | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) commit 3485e76e73495382f953d3a6dd45c00c7c404e4a Author: Luca Coelho Date: Mon Oct 2 16:12:23 2017 +0300 iwlwifi: define minimum valid address for umac_error_event_table in cfg We now have two different minimum valid values for umac_error_event_table. To avoid hardcoding the minimum value in the driver, add a value to cfg where it can be read from. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/cfg/8000.c | 3 ++- drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 3 ++- drivers/net/wireless/intel/iwlwifi/cfg/a000.c | 3 ++- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 17 +++++++++++------ 5 files changed, 18 insertions(+), 9 deletions(-) commit fb5b28469d2a5be83aae0c754a9a69bb37fec6ff Author: Luca Coelho Date: Mon Oct 2 15:44:20 2017 +0300 iwlwifi: mvm: move umac_error_event_table validity check to where it's set There's no point in checking the validity of the umac_error_event_table pointer every time we generate a dump. It's cleaner to do so when we read the value, namely when we receive the alive data. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 13 +++++++++++-- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 18 ++++-------------- 2 files changed, 15 insertions(+), 16 deletions(-) commit 0e1be40a45d767a07c1fb50ebfba273368f57484 Author: Beni Lev Date: Thu Sep 28 12:10:55 2017 +0300 iwlwifi: mvm: allow reading UMAC error data from SMEM in A000 devices Currently, UMAC error data reading is restricted to DCCM. A000 NICs use SMEM for this data. Signed-off-by: Beni Lev Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 76f4a85e1ddd1876d52c226d60dad15f29f6d9d7 Author: Johannes Berg Date: Mon Oct 2 13:43:27 2017 +0200 iwlwifi: mvm: pass baid_data to iwl_mvm_release_frames() All callers of iwl_mvm_release_frames() already have the baid_data pointer, so we don't need to (re)calculate it inside the function. Just pass it instead. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 3f1c4c58068757da94b07e0914321b443501e20f Author: Sara Sharon Date: Mon Oct 2 12:07:59 2017 +0300 iwlwifi: mvm: remove duplicated fields in mvm reorder buffer The reason station id and tid fields are both in baid data and in the reorder buffer per queue is that we couldn't access the baid_data in the reorder timer functions. Now that we do some pointer math and access it anyway, those fields can be removed. This save some space and some code. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 4 ---- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 7 ++++--- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 6 +----- 3 files changed, 5 insertions(+), 12 deletions(-) commit dfdddd92a5781bb4bbd176a5c85b7244580a8efe Author: Johannes Berg Date: Tue Sep 26 12:24:51 2017 +0200 iwlwifi: mvm: allocate reorder buffer according to need Now that we may have up to 256 entries per reorder buffer, and possibly up to 16 queues, we can use a LOT of memory for this (64k for each station). Allocate it according to what we need, which is of course much less for HT stations (only 16k at a max of 16 queues). However, this comes at the expense of complicating the code a bit to calculate the right entry structure to use for each frame. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 39 +++++++++++++++++++++++---- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 30 ++++++++++++++------- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 38 +++++++++++++++++++++++--- 3 files changed, 90 insertions(+), 17 deletions(-) commit 526b96c4f8dceb0104e267c61e5a3b22c538570c Merge: cb8d50d 40d8670 Author: Jani Nikula Date: Wed Oct 18 12:37:31 2017 +0300 Merge drm-upstream/drm-next into drm-intel-next-queued Needed for timer_setup() and drm_dev_{get,put}() conversions in i915. Signed-off-by: Jani Nikula commit cb8d50dfb341e9615c8d203a3e6513dae9ff901d Author: Tvrtko Ursulin Date: Tue Oct 17 16:09:08 2017 +0100 drm/i915: Fixup userptr mmu notifier registration error handling Avoid dereferencing the error pointer and also avoid returning NULL from i915_mmu_notifier_find since the callers do not expect that. Signed-off-by: Tvrtko Ursulin Reported-by: Dan Carpenter Fixes: 7741b547b6e0 ("drm/i915: Preallocate our mmu notifier workequeu to unbreak cpu hotplug deadlock") Cc: Dan Carpenter Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171017150908.12840-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_gem_userptr.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 84014b0a39eef6df4a26f8afabf2b50bd376d515 Author: Daniel Vetter Date: Tue Oct 17 17:27:14 2017 +0200 drm/atomic-helper: check that drivers call drm_crtc_vblank_off At least when they have vblank support they need to call this, or the vblank core will happily call into their crtc->enable_vblank callback even when the crtc is off. Which leads to a boom when the clocks are off on most hardware (besides the inevitable confusion in the book-keeping). The consistency checks in drm_vblank.c will then make sure that vblank_off/on calls are balanced, and if drivers forget to re-enable it all the commits will stall, so I think we're covered. It'd be nice to be able to place this check outside of commit helpers, but tha's not really possible (due to nonblocking commits and all that). Placing it into atomic helpers should at least cover most drivers. Also note that vblank support is still optional (for virtual drivers, which tend to not have this), check for that. v2: Fixup the handling for vblank_put (Rob). Cc: Rob Clark Tested-by: Rob Clark Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171017152714.6849-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic_helper.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 81a7bd4a3f4497af81694c017b5b91253009f8cb Author: Daniel Vetter Date: Tue Oct 17 18:29:18 2017 +0200 drm: some KMS todo ideas Inspired by discussions with Keith and Ville. Cc: Ville Syrjälä Cc: Keith Packard Acked-by: Sean Paul Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171017162918.8380-1-daniel.vetter@ffwll.ch Documentation/gpu/todo.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 505a1b571711a977b7d069dec3c14381521e9683 Author: Bjorn Helgaas Date: Thu Oct 12 22:47:29 2017 -0500 vgaarb: Factor out EFI and fallback default device selection The default VGA device is normally set in vga_arbiter_add_pci_device() when we call it for the first enabled device that can be accessed with the legacy VGA resources ([mem 0xa0000-0xbffff], etc.) That default device can be overridden by an EFI device that owns the boot framebuffer. As a fallback, we can also select a VGA device that can't be accessed via legacy VGA resources, or a VGA device that isn't even enabled. Factor out this EFI and fallback selection from vga_arb_device_init() into a separate vga_arb_select_default_device() function. This doesn't change any behavior, but it untangles the "bridge control possible" checking and messages from the default device selection. Tested-by: Zhou Wang # D05 Hisi Hip07, Hip08 Signed-off-by: Bjorn Helgaas Acked-by: Ard Biesheuvel Reviewed-by: Daniel Axtens Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171013034729.14630.30419.stgit@bhelgaas-glaptop.roam.corp.google.com drivers/gpu/vga/vgaarb.c | 57 +++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 22 deletions(-) commit a37c0f48950b56f6ef2ee637ba597855504e3056 Author: Bjorn Helgaas Date: Thu Oct 12 22:47:22 2017 -0500 vgaarb: Select a default VGA device even if there's no legacy VGA Daniel Axtens reported that on the HiSilicon D05 board, the VGA device is behind a bridge that doesn't support PCI_BRIDGE_CTL_VGA, so the VGA arbiter never selects it as the default, which means Xorg auto-detection doesn't work. VGA is a legacy PCI feature: a VGA device can respond to addresses, e.g., [mem 0xa0000-0xbffff], [io 0x3b0-0x3bb], [io 0x3c0-0x3df], etc., that are not configurable by BARs. Consequently, multiple VGA devices can conflict with each other. The VGA arbiter avoids conflicts by ensuring that those legacy resources are only routed to one VGA device at a time. The arbiter identifies the "default VGA" device, i.e., a legacy VGA device that was used by boot firmware. It selects the first device that: - is of PCI_CLASS_DISPLAY_VGA, - has both PCI_COMMAND_IO and PCI_COMMAND_MEMORY enabled, and - has PCI_BRIDGE_CTL_VGA set in all upstream bridges. Some systems don't have such a device. For example, if a host bridge doesn't support I/O space, PCI_COMMAND_IO probably won't be enabled for any devices below it. Or, as on the HiSilicon D05, the VGA device may be behind a bridge that doesn't support PCI_BRIDGE_CTL_VGA, so accesses to the legacy VGA resources will never reach the device. This patch extends the arbiter so that if it doesn't find a device that meets all the above criteria, it selects the first device that: - is of PCI_CLASS_DISPLAY_VGA and - has PCI_COMMAND_IO or PCI_COMMAND_MEMORY enabled If it doesn't find even that, it selects the first device that: - is of class PCI_CLASS_DISPLAY_VGA. Such a device may not be able to use the legacy VGA resources, but most drivers can operate the device without those. Setting it as the default device means its "boot_vga" sysfs file will contain "1", which Xorg (via libpciaccess) uses to help select its default output device. This fixes Xorg auto-detection on some arm64 systems (HiSilicon D05 in particular; see the link below). It also replaces the powerpc fixup_vga() quirk, albeit with slightly different semantics: the quirk selected the first VGA device we found, and overrode that selection with any enabled VGA device we found. If there were several enabled VGA devices, the *last* one we found would become the default. The code here instead selects the *first* enabled VGA device we find, and if none are enabled, the first VGA device we find. Link: http://lkml.kernel.org/r/20170901072744.2409-1-dja@axtens.net Tested-by: Daniel Axtens # arm64, ppc64-qemu-tcg Tested-by: Zhou Wang # D05 Hisi Hip07, Hip08 Signed-off-by: Bjorn Helgaas Acked-by: Ard Biesheuvel Reviewed-by: Daniel Axtens Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171013034721.14630.65913.stgit@bhelgaas-glaptop.roam.corp.google.com arch/powerpc/kernel/pci-common.c | 12 ------------ drivers/gpu/vga/vgaarb.c | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 12 deletions(-) commit 6ca73de7ebc5dac358551633e0c69ab6b5007baa Author: Takashi Iwai Date: Wed Oct 11 11:42:00 2017 +0200 ALSA: pcm: Forcibly stop at disconnect callback So far we assumed that each driver implements the hotplug PCM handling properly, e.g. dealing with the pending PCM stream at disconnect callback. But most codes don't care, and it eventually leaves the PCM stream inconsistent state when an abrupt disconnection like sysfs unbind happens. This patch is simple but a big-hammer solution: invoke snd_pcm_stop() at the common PCM disconnect callback always when the stream is running. Tested-by: Kuninori Morimoto Signed-off-by: Takashi Iwai sound/core/pcm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8b645e4a40dd490b9426670fffe9bb9e2878c3fd Author: Takashi Iwai Date: Tue Oct 17 11:40:55 2017 +0200 ALSA: pcm: Don't call register and disconnect callbacks for internal PCM The internal PCM (aka DPCM backend PCM) doesn't need any registration procedure, thus currently we bail out immediately at dev_register callback. Similarly, its counterpart, dev_disconnect callback, is superfluous for the internal PCM. For simplifying and avoiding the conflicting disconnect call for internal PCM objects, this patch drops dev_register and dev_disconnect callbacks for the internal ops. The only uncertain thing by this action is whether skipping the PCM state change to SNDRV_PCM_STATE_DISCONNECT for the internal PCM is mandatory. Looking through the current implementations, this doesn't look so, hence dropping the whole dev_disconnect would make more sense. Tested-by: Kuninori Morimoto Signed-off-by: Takashi Iwai sound/core/pcm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit b6d3b649441936621c87b79bff8dd436e2397e3c Author: Fabrizio Castro Date: Mon Oct 16 11:12:49 2017 +0100 ARM: dts: r8a7743: Add xhci support to SoC dtsi Add node for xhci. Boards DT files will enable it if needed. Signed-off-by: Fabrizio Castro Reviewed-by: Yoshihiro Shimoda Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 8b32948690946e89c198e44f8a1252295473f348 Author: Dan Carpenter Date: Tue Oct 17 23:43:43 2017 +0300 drm/bridge: adv7511: Fix a use after free We free "edid", then use it again on the next line. Fixes: 3b1b975003e4 ("drm: adv7511/33: add HDMI CEC support") Signed-off-by: Dan Carpenter Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20171017204343.zctliubjkq7imudi@mwanda drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 56f3d383f37becdbf0325f8c132903347ba04354 Author: Hannes Reinecke Date: Tue Oct 17 09:10:33 2017 +0200 scsi: scsi_devinfo: Add TRY_VPD_PAGES to HITACHI OPEN-V blacklist entry HITACHI is always supporting VPD pages, even though it's claiming to support SCSI Revision 3 only. Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_devinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c1a7b647805894d918126c146f43ebab0fa3f14a Author: Hannes Reinecke Date: Tue Oct 17 09:10:26 2017 +0200 scsi: scsi_devinfo: Add 'AIX VDASD' to blacklist The AIX VDASD devices do support VPD pages, but implement only SPC. So set BLIST_TRY_VPD_PAGES to correctly display the VPD information in sysfs. [mkp: typo] Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen drivers/scsi/scsi_devinfo.c | 1 + 1 file changed, 1 insertion(+) commit 531fcdeb71f0be1d4c77838b1a4694c317b1eb98 Author: Arnd Bergmann Date: Mon Sep 18 22:48:16 2017 +0200 thermal: imx: add NVMEM dependency The driver now fails to link into vmlinux when CONFIG_NVMEM is a loadable module: drivers/thermal/imx_thermal.o: In function `imx_thermal_probe': imx_thermal.c:(.text+0x360): undefined reference to `nvmem_cell_read_u32' imx_thermal.c:(.text+0x360): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `nvmem_cell_read_u32' imx_thermal.c:(.text+0x388): undefined reference to `nvmem_cell_read_u32' imx_thermal.c:(.text+0x388): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `nvmem_cell_read_u32' This adds a Kconfig dependency to force it to be a module as well when its dependency is loadable. Fixes: 7fe5ba04fcdc ("thermal: imx: Add support for reading OCOTP through nvmem") Signed-off-by: Arnd Bergmann Reviewed-by: Leonard Crestez Signed-off-by: Zhang Rui drivers/thermal/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 8e2b04b019c824186548eadd70243dbb97a1675b Author: Fabio Estevam Date: Sat Sep 30 12:16:46 2017 -0300 cpufreq: imx6q: Move speed grading check to cpufreq driver On some i.MX6 SoCs (like i.MX6SL, i.MX6SX and i.MX6UL) that do not have speed grading check, opp table will not be created in platform code, so cpufreq driver prints the following error message: cpu cpu0: dev_pm_opp_get_opp_count: OPP table not found (-19) However, this is not really an error in this case because the imx6q-cpufreq driver first calls dev_pm_opp_get_opp_count() and if it fails, it means that platform code does not provide OPP and then dev_pm_opp_of_add_table() will be called. In order to avoid such confusing error message, move the speed grading check from platform code to the imx6q-cpufreq driver. This way the imx6q-cpufreq no longer has to check whether OPP table is supplied by platform code. Tested on a i.MX6Q and i.MX6UL based boards. Signed-off-by: Fabio Estevam Acked-by: Viresh Kumar Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-imx6q.c | 88 +---------------------------------------- drivers/cpufreq/imx6q-cpufreq.c | 85 +++++++++++++++++++++++++++++---------- 2 files changed, 67 insertions(+), 106 deletions(-) commit 501a5c71d1f754e44142af6cae59042a8c3b2a11 Author: Markus Mayer Date: Wed Sep 27 16:02:37 2017 -0700 tools/thermal: tmon: use $(PKG_CONFIG) instead of hard-coding pkg-config To ease cross-compiling, make use of the $(PKG_CONFIG) variable rather than hard-coding calls to pkg-config. Signed-off-by: Markus Mayer Signed-off-by: Zhang Rui tools/thermal/tmon/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c21568ffabed918882c61eada79146706bd94684 Author: Markus Mayer Date: Wed Sep 27 16:02:36 2017 -0700 tools/thermal: tmon: allow $(CC) to be defined externally It can be helpful, especially when using a build system, to set the C compiler externally. Signed-off-by: Markus Mayer Signed-off-by: Zhang Rui tools/thermal/tmon/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec04aa3ae87b895dbc674a7e0b78b670f73a2c22 Author: Markus Mayer Date: Wed Sep 27 16:02:35 2017 -0700 tools/thermal: tmon: use "-fstack-protector" only if supported Most, but not all, toolchains support the "-fstack-protector" flag. We check if the compiler supports the flag before using it. This allows tmon to be compiled for more environments. Signed-off-by: Markus Mayer Signed-off-by: Zhang Rui tools/thermal/tmon/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 34ca5d76f250d4ba98c4cdc069ab79b395f9ecac Author: Frank Rowand Date: Tue Oct 17 16:36:32 2017 -0700 of: overlay: remove unneeded check for NULL kbasename() kbasename() will not return NULL if passed a valid string. If the parameter passed to kbasename() in this case is already NULL then the devicetree has been corrupted. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/overlay.c | 2 -- 1 file changed, 2 deletions(-) commit e0a58f3e08d4b7fa8e2a4075c522f1a98c9e4cab Author: Frank Rowand Date: Tue Oct 17 16:36:31 2017 -0700 of: overlay: remove a dependency on device node full_name The "%pOF" printf format was recently added to print the full name of a device tree node, with the intent of changing the node full_name field to contain only the node name instead of the full path of the node. dup_and_fixup_symbol_prop() duplicates a property from the "/__symbols__" node of an overlay device tree. The value of each duplicated property must be fixed up to include the full path of a node in the live device tree. The current code uses the node's full_name for that purpose. Update the code to use the "%pOF" printf format to determine the node's full path. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/base.c | 2 +- drivers/of/of_private.h | 2 ++ drivers/of/overlay.c | 90 ++++++++++++++++++++++++++++++------------------- 3 files changed, 59 insertions(+), 35 deletions(-) commit 3912b7917ab78d75b32bec8d297ac3c46b1b2a44 Author: Frank Rowand Date: Tue Oct 17 16:36:30 2017 -0700 of: overlay: simplify applying symbols from an overlay The code to apply symbols from an overlay to the live device tree was implemented with the intent to be minimally intrusive on the existing code. After recent restructuring of the overlay apply code, it is easier to disintangle the code that applies the symbols, and to make the overlay changeset creation code more straight forward and understandable. Remove the extra complexity, and make the code more obvious. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/overlay.c | 91 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 65 insertions(+), 26 deletions(-) commit f948d6d8b792bb90041edc12eac35faf83030994 Author: Frank Rowand Date: Tue Oct 17 16:36:29 2017 -0700 of: overlay: avoid race condition between applying multiple overlays The process of applying an overlay consists of: - unflatten an overlay FDT (flattened device tree) into an EDT (expanded device tree) - fixup the phandle values in the overlay EDT to fit in a range above the phandle values in the live device tree - create the overlay changeset to reflect the contents of the overlay EDT - apply the overlay changeset, to modify the live device tree, potentially changing the maximum phandle value in the live device tree There is currently no protection against two overlay applies concurrently determining what range of phandle values are in use in the live device tree, and subsequently changing that range. Add a mutex to prevent multiple overlay applies from occurring simultaneously. Move of_resolve_phandles() into of_overlay_apply() so that it does not have to be duplicated by each caller of of_overlay_apply(). The test in of_resolve_phandles() that the overlay tree is detached is temporarily disabled so that old style overlay unittests do not fail. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c | 6 ------ drivers/of/of_private.h | 12 +++++++++++ drivers/of/overlay.c | 32 ++++++++++++++++++++++++++++ drivers/of/resolver.c | 7 ++++++ drivers/of/unittest.c | 22 +++++++++++++------ include/linux/of.h | 3 --- 6 files changed, 67 insertions(+), 15 deletions(-) commit 6d0f5470dbdeb7f9b1e20fc9409bf07fab1b5ac5 Author: Frank Rowand Date: Tue Oct 17 16:36:28 2017 -0700 of: overlay: loosen overly strict phandle clash check When an overlay contains a node that already exists in the live device tree, the overlay node is not allowed to change the phandle of the existing node. The existing check refused to allow an overlay node to set the node phandle even when the existing node did not have a phandle. Relax the check to allow an overlay node to set the phandle value if the existing node does not have a phandle. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/overlay.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 87f242c119c403e8b948c8b95eca4ab6212fd1a9 Author: Frank Rowand Date: Tue Oct 17 16:36:27 2017 -0700 of: overlay: expand check of whether overlay changeset can be removed The test of whether it is safe to remove an overlay changeset looked at whether any node in the overlay changeset was in a subtree rooted at any more recently applied overlay changeset node. The test failed to determine whether any node in the overlay changeset was the root of a subtree that contained a more recently applied overlay changeset node. Add this additional check to the test. The test is still lacking any check for any phandle dependencies. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/overlay.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 24789c5ce5a373dd55640f9cd79117fcc3ccc46d Author: Frank Rowand Date: Tue Oct 17 16:36:26 2017 -0700 of: overlay: detect cases where device tree may become corrupt When an attempt to apply an overlay changeset fails, an effort is made to revert any partial application of the changeset. When an attempt to remove an overlay changeset fails, an effort is made to re-apply any partial reversion of the changeset. The existing code does not check for failure to recover a failed overlay changeset application or overlay changeset revert. Add the missing checks and flag the devicetree as corrupt if the state of the devicetree can not be determined. Improve and expand the returned errors to more fully reflect the result of the effort to undo the partial effects of a failed attempt to apply or remove an overlay changeset. If the device tree might be corrupt, do not allow further attempts to apply or remove an overlay changeset. When creating an overlay changeset from an overlay device tree, add some additional warnings if the state of the overlay device tree is not as expected. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c | 5 +- drivers/of/dynamic.c | 135 +++++++++++--- drivers/of/of_private.h | 8 +- drivers/of/overlay.c | 253 ++++++++++++++++++++++----- drivers/of/unittest.c | 57 +++--- include/linux/of.h | 10 +- 6 files changed, 372 insertions(+), 96 deletions(-) commit 61b4de4e0b384f4a22c55c3bada604da49cec4e1 Author: Frank Rowand Date: Tue Oct 17 16:36:25 2017 -0700 of: overlay: minor restructuring Continue improving the readability of overlay.c. The previous patches renamed identifiers. This patch is split out from the previous patches to make the previous patches easier to review. Changes are: - minor code restructuring - some initialization of an overlay changeset occurred outside of init_overlay_changeset(), move that into init_overlay_changeset() - consolidate freeing an overlay changeset into free_overlay_changeset() This patch is intended to not introduce any functional change. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/overlay.c | 205 +++++++++++++++++++++++---------------------------- 1 file changed, 92 insertions(+), 113 deletions(-) commit 42b2e94fe83c354b4373992c8ea28ef0ace2e633 Author: Frank Rowand Date: Tue Oct 17 16:36:24 2017 -0700 of: overlay: rename identifiers in dup_and_fixup_symbol_prop() More renaming of identifiers to better reflect what they do. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/overlay.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 0290c4ca2536a35e55c53cfb9058465b1f987b17 Author: Frank Rowand Date: Tue Oct 17 16:36:23 2017 -0700 of: overlay: rename identifiers to more reflect what they do This patch is aimed primarily at drivers/of/overlay.c, but those changes also have a small impact in a few other files. overlay.c is difficult to read and maintain. Improve readability: - Rename functions, types and variables to better reflect what they do and to be consistent with names in other places, such as the device tree overlay FDT (flattened device tree), and make the algorithms more clear - Use the same names consistently throughout the file - Update comments for name changes - Fix incorrect comments This patch is intended to not introduce any functional change. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring Documentation/devicetree/overlay-notes.txt | 12 +- drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c | 5 +- drivers/of/dynamic.c | 2 +- drivers/of/overlay.c | 530 ++++++++++++++------------- drivers/of/unittest.c | 20 +- include/linux/of.h | 12 +- 6 files changed, 310 insertions(+), 271 deletions(-) commit bbed8794d53b7043d7989e22bc2e1e399da305eb Author: Frank Rowand Date: Tue Oct 17 16:36:22 2017 -0700 of: overlay.c: Convert comparisons to zero or NULL to logical expressions Use normal shorthand for comparing a variable to zero. For variable "XXX": convert (XXX == 0) to (!XXX) convert (XXX != 0) to (XXX) Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/overlay.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 646afc4ad7f01d582d00e43a4f35b1ebdb70cb4e Author: Frank Rowand Date: Tue Oct 17 16:36:21 2017 -0700 of: overlay.c: Remove comments that state the obvious, to reduce clutter Follows recommendations in Documentation/process/coding-style.rst, section 8, Commenting. Some in function comments are promoted to function header comments. Signed-off-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/overlay.c | 47 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 29 deletions(-) commit 234d260c1f5c36750dc713c31faad851fed3586c Author: Chen-Yu Tsai Date: Fri Oct 13 11:26:48 2017 +0800 ARM: dts: sun4i: Enable HDMI support on some A10 devices Various A10-based development boards have standard HDMI connectors wired to the dedicated HDMI pins on the SoC. Enable the display pipeline and HDMI output on boards I have or have access to schematics: - Cubieboard - Olimex A10-OLinuXino-LIME Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 25 +++++++++++++++++++++++++ arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 25 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+) commit 59268ffe87eb0ed574d6e25de6b12f3bc9776030 Author: Chen-Yu Tsai Date: Tue Oct 17 20:18:07 2017 +0800 ARM: dts: sun7i: Enable HDMI support on some A20 devices All the A20 devices I own have standard HDMI connectors wired to the dedicated HDMI pins on the SoC: - Bananapi M1+ - Cubieboard 2 - Cubietruck - Lamobo R1 (or Bananapi R1) Development boards from Olimex also have standard HDMI connectors. Schematics for them are publicly available. Enable HDMI on them as well. - Olimex A20-OLinuXino-LIME - Olimex A20-OLinuXino-LIME2 - Olimex A20-OLinuXino-MICRO Enable the display pipeline and HDMI output for them. Signed-off-by: Chen-Yu Tsai Tested-by: Priit Laes # Cubietruck, A20-OLinuXino-MICRO Tested-by: Olliver Schinagl # A20-OLinuXino-LIME2 Tested-by: Jonathan Liu # A20-OLinuXino-LIME Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 25 ++++++++++++++++++++++++ arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 25 ++++++++++++++++++++++++ arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 25 ++++++++++++++++++++++++ arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 25 ++++++++++++++++++++++++ arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts | 25 ++++++++++++++++++++++++ arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 25 ++++++++++++++++++++++++ arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 25 ++++++++++++++++++++++++ 7 files changed, 175 insertions(+) commit 5b92b29bed45d91997c41226f7eaf4d6ad36aaff Author: Jonathan Liu Date: Tue Oct 17 20:18:06 2017 +0800 ARM: dts: sun7i: Add device nodes for display pipelines The A20 has two interconnected display pipelines, mirroring the A10. Add all the device nodes for them, including the downstream HDMI controller that we already support. Signed-off-by: Jonathan Liu [wens@csie.org: Squashed in HDMI and provided commit message] Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20.dtsi | 307 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 307 insertions(+) commit 0df4cf33a594f78d4434e76a0bd5904c41a855aa Author: Chen-Yu Tsai Date: Tue Oct 17 20:18:04 2017 +0800 ARM: dts: sun4i: Add device nodes for display pipelines The A10 has two interconnected display pipelines, much like the A31, but without the DRCs between the backend and TCONs. Add all the device nodes for them, including the downstream HDMI controller that we already support. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 306 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 306 insertions(+) commit cfe8be2340bfb84bdb6932601fc61c5f9d854808 Author: Icenowy Zheng Date: Fri Oct 13 19:26:21 2017 +0800 ARM: dts: sun8i: r40: add watchdog device node The R40 SoC has a watchdog like the one on A20, in the timer memory zone (which is also the same on A20). Add the device tree node for it. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-r40.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 61065fc3e32002ba48aa6bc3816c1f6f9f8daf55 Merge: 7571358 3728e6a Author: Mauro Carvalho Chehab Date: Tue Oct 17 17:22:20 2017 -0700 Merge commit '3728e6a255b5' into patchwork * commit '3728e6a255b5': (904 commits) Linux 4.14-rc5 x86/microcode: Do the family check first locking/lockdep: Disable cross-release features for now x86/mm: Flush more aggressively in lazy TLB mode mm, swap: use page-cluster as max window of VMA based swap readahead mm: page_vma_mapped: ensure pmd is loaded with READ_ONCE outside of lock kmemleak: clear stale pointers from task stacks fs/binfmt_misc.c: node could be NULL when evicting inode fs/mpage.c: fix mpage_writepage() for pages with buffers linux/kernel.h: add/correct kernel-doc notation tty: fall back to N_NULL if switching to N_TTY fails during hangup Revert "vmalloc: back off when the current task is killed" mm/cma.c: take __GFP_NOWARN into account in cma_alloc() scripts/kallsyms.c: ignore symbol type 'n' userfaultfd: selftest: exercise -EEXIST only in background transfer mm: only display online cpus of the numa node mm: remove unnecessary WARN_ONCE in page_vma_mapped_walk(). mm/mempolicy: fix NUMA_INTERLEAVE_HIT counter include/linux/of.h: provide of_n_{addr,size}_cells wrappers for !CONFIG_OF mm/madvise.c: add description for MADV_WIPEONFORK and MADV_KEEPONFORK ... commit a96a5037ed0f52e2d86739f4a1ef985bd036e575 Author: Steven Rostedt (VMware) Date: Fri Oct 13 10:23:09 2017 -0400 tracing, thermal: Hide cpu cooling trace events when not in use As trace events when defined create data structures and functions to process them, defining trace events when not using them is a waste of memory. The trace events thermal_power_cpu_get_power and thermal_power_cpu_limit are only used when CONFIG_CPU_THERMAL is set. Make those events only defined when that is set as well. Link: http://lkml.kernel.org/r/20171013102309.2c4ef81a@gandalf.local.home Cc: Eduardo Valentin Acked-by: Javi Merino Signed-off-by: Steven Rostedt (VMware) include/trace/events/thermal.h | 2 ++ 1 file changed, 2 insertions(+) commit b5ca66f9c0cf8c1cfeca12f001b86486c670279d Author: Steven Rostedt (VMware) Date: Fri Oct 13 10:21:50 2017 -0400 tracing, thermal: Hide devfreq trace events when not in use As trace events when defined create data structures and functions to process them, defining trace events when not using them is a waste of memory. The trace events thermal_power_devfreq_get_power and thermal_power_devfreq_limit are only used when CONFIG_DEVFREQ_THERMAL is set. Make those events only defined when that is set as well. Link: http://lkml.kernel.org/r/20171013102150.0050cb74@gandalf.local.home Acked-by: Javi Merino Signed-off-by: Steven Rostedt (VMware) include/trace/events/thermal.h | 2 ++ 1 file changed, 2 insertions(+) commit 930a784d02339be437fec07b3bb7213bde0ed53b Author: Oscar Mateo Date: Tue Oct 17 13:25:45 2017 -0700 drm/i915: Use a mask when applying WaProgramL3SqcReg1Default Otherwise we are blasting other bits in GEN8_L3SQCREG1 that might be important (although we probably aren't at the moment because 0 seems to be the default for all the other bits). v2: Extra parentheses (Michel) Fixes: 050fc46 ("drm/i915:bxt: implement WaProgramL3SqcReg1DefaultForPerf") Fixes: 450174f ("drm/i915/chv: Tune L3 SQC credits based on actual latencies") Signed-off-by: Oscar Mateo Cc: Chris Wilson Cc: Mika Kuoppala Cc: Ville Syrjälä Cc: Imre Deak Reviewed-by: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/1508271945-14961-1-git-send-email-oscar.mateo@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_engine_cs.c | 9 ++++++--- drivers/gpu/drm/i915/intel_pm.c | 9 ++++++--- 3 files changed, 13 insertions(+), 6 deletions(-) commit d6242aeb48d741eb7c1559cdb95d368de04466bd Author: Oscar Mateo Date: Tue Oct 17 13:27:51 2017 -0700 drm/i915: No need for RING_MAX_NONPRIV_SLOTS space Now that we write RING_FORCE_TO_NONPRIV registers directly to hardware, [commit 32ced39 ("drm/i915: Transform whitelisting WAs into a simple reg write")] there is no need to save space for them in the list of context workarounds. v2: Refer to previous commit in commit message (Michel) Signed-off-by: Oscar Mateo Cc: Chris Wilson Reviewed-by: Michel Thierry Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/1508272071-15125-1-git-send-email-oscar.mateo@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 8cf466602028196b939255f1eb4e9817efd1db6d Author: Omar Sandoval Date: Wed Oct 11 10:39:15 2017 -0700 kyber: fix hang on domain token wait queue When we're getting a domain token, if we fail to get a token on our first attempt, we put the current hardware queue on a wait queue and then try again just in case a token was freed after our initial attempt but before we got on the wait queue. If this second attempt succeeds, we currently leave the hardware queue on the wait queue. Usually this is okay; we'll just run the hardware queue one extra time when another token is freed. However, if the hardware queue doesn't have any other requests waiting, then when it it gets the extra wakeup, it won't have anything to free and therefore won't wake up any other hardware queues. If tokens are limited, then we won't make forward progress and the device will hang. Reported-by: Bin Zha Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/kyber-iosched.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit db6b78073ac135bb68cae77bb873371d0fe0efa6 Author: Sergei Shtylyov Date: Fri Oct 13 15:23:55 2017 +0300 i2c: rcar: document R8A77970 bindings R-Car V3M (R8A77970) SoC also has the R-Car gen3 compatible I2C controller, so document the SoC specific bindings. Signed-off-by: Sergei Shtylyov Reviewed-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 1 + 1 file changed, 1 insertion(+) commit ad59c5ea7fa88284b68721c08faf15f0e77abc0d Author: Geert Uytterhoeven Date: Wed Oct 4 14:17:05 2017 +0200 i2c: sh_mobile: Use of_device_get_match_data() helper Use the of_device_get_match_data() helper instead of open coding. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-sh_mobile.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 5515ae112172e20667f02b16f45fbf992923dcb0 Author: Kamlakant Patel Date: Tue Oct 10 11:57:56 2017 +0530 i2c: xlp9xx: Handle I2C_M_RECV_LEN in msg->flags The driver needs to handle the flag I2C_M_RECV_LEN during receive to support SMBus emulation. Update receive logic to handle the case where the length is received as the first byte of a transaction. Also update the code to handle I2C_CLIENT_PEC, which is set when the client sends a packet error checking code byte. Signed-off-by: Jayachandran C Signed-off-by: Kamlakant Patel Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xlp9xx.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) commit c347b8fc22b21899154cc153a4951aaf226b4e1a Author: Jayachandran C Date: Tue Oct 10 11:57:55 2017 +0530 i2c: xlp9xx: Get clock frequency with clk API Get the input clock frequency to the controller from the linux clk API, if it is available. This allows us to pass in the block input frequency either from ACPI (using APD) or from device tree. The old hardcoded frequency is used as default for backwards compatibility. Signed-off-by: Jayachandran C Signed-off-by: Kamlakant Patel Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-xlp9xx.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 1977dbefe92c0baefefb62927df6e3908af8c453 Author: Jayachandran C Date: Tue Oct 10 11:57:54 2017 +0530 ACPI / APD: Add clock frequency for ThunderX2 I2C controller Add the input frequency of 125MHz for the ThunderX2 I2C controller block. The ACPI ID used is "CAV9007". Signed-off-by: Jayachandran C Signed-off-by: Kamlakant Patel Acked-by: Mika Westerberg Acked-by: Rafael J. Wysocki Signed-off-by: Wolfram Sang drivers/acpi/acpi_apd.c | 5 +++++ 1 file changed, 5 insertions(+) commit 4ce8e88f6c25469b83a7d56914995fe892d1f9a8 Author: Colin Ian King Date: Thu Sep 21 23:30:07 2017 +0100 i2c: designware: make const array supported_speeds static to shink object code size Don't populate const array supported_speeds on the stack, instead make it static. Makes the object code smaller by 150 bytes: Before: text data bss dec hex filename 8474 1440 0 9914 26ba i2c-designware-platdrv.o After: text data bss dec hex filename 8324 1440 0 9764 2624 i2c-designware-platdrv.o (gcc version 7.2.0 x86_64) Signed-off-by: Colin Ian King Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-platdrv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 15e9833e22cc6e2f882639662b90eef02ef7583e Author: Franklin S Cooper Jr Date: Mon Sep 11 15:11:45 2017 -0500 dt-bindings: i2c: i2c-davinci: Update binding for 66AK2Gx pwr dm property Add pm-domains property which is required for 66AK2Gx. Also document 66AK2G unique clocks property usage. Signed-off-by: Franklin S Cooper Jr Acked-by: Rob Herring Acked-by: Sekhar Nori Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-davinci.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 17f88151ff190b9357f473d7704eee7ae3097d11 Author: Franklin S Cooper Jr Date: Mon Sep 11 15:11:44 2017 -0500 i2c: davinci: Add PM Runtime Support 66AK2G has I2C instances that are not apart of the ALWAYS_ON power domain unlike other Keystone 2 SoCs and OMAPL138. Therefore, pm_runtime is required to insure the power domain used by the specific I2C instance is properly turned on along with its functional clock. Signed-off-by: Franklin S Cooper Jr Acked-by: Sekhar Nori Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-davinci.c | 67 +++++++++++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 12 deletions(-) commit 98e8201039afad5d2af87df9ac682f62f69c0c2f Author: Divagar Mohandass Date: Tue Oct 10 11:30:37 2017 +0530 eeprom: at24: enable runtime pm support Currently the device is kept in D0, there is an opportunity to save power by enabling runtime pm. Device can be daisy chained from PMIC and we can't rely on I2C core for auto resume/suspend. Driver will decide when to resume/suspend. Reviewed-by: Sakari Ailus Signed-off-by: Divagar Mohandass Signed-off-by: Wolfram Sang drivers/misc/eeprom/at24.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit dbc1ab9c12502912be1490ab5d54f39782183f5f Author: Divagar Mohandass Date: Tue Oct 10 11:30:36 2017 +0530 eeprom: at24: add support to fetch eeprom device property "size" Obtain the size of the EEPROM chip from DT if the "size" property is specified for the device. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Reviewed-by: Sakari Ailus Signed-off-by: Divagar Mohandass Signed-off-by: Wolfram Sang drivers/misc/eeprom/at24.c | 4 ++++ 1 file changed, 4 insertions(+) commit f2f5afd3845c88e96e863ae31f6a7587906af0e6 Author: Divagar Mohandass Date: Tue Oct 10 11:30:35 2017 +0530 dt-bindings: add eeprom "size" property This adds eeprom "size" as optional property for i2c eeproms. The "size" property allows explicitly specifying the size of the EEPROM chip in bytes. Acked-by: Rob Herring Reviewed-by: Sakari Ailus Signed-off-by: Divagar Mohandass Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/eeprom/eeprom.txt | 2 ++ 1 file changed, 2 insertions(+) commit d7e17fe4f7a7d961cc4375c7d868bd353a039bc7 Author: Markus Elfring Date: Sun Oct 15 22:30:11 2017 +0200 ipmi_si: Delete an error message for a failed memory allocation in try_smi_init() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 1 - 1 file changed, 1 deletion(-) commit c0a32fe13cd323ca9420500b16fd69589c9ba91e Author: Colin Ian King Date: Tue Oct 17 16:54:52 2017 +0100 ipmi_si: fix memory leak on new_smi The error exit path omits kfree'ing the allocated new_smi, causing a memory leak. Fix this by kfree'ing new_smi. Detected by CoverityScan, CID#14582571 ("Resource Leak") Fixes: 7e030d6dff71 ("ipmi: Prefer ACPI system interfaces over SMBIOS ones") Signed-off-by: Colin Ian King Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 1 + 1 file changed, 1 insertion(+) commit 2ceec8be7d5c7c6b8f4e907c9d46ee3764c19016 Author: Tom McLeod Date: Wed Oct 11 11:57:50 2017 -0700 dt-bindings: Add vendor prefix for Opal Kelly Inc Opal Kelly is a manufacturer of FPGA Integration Modules. Signed-off-by: Tom McLeod Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 4ed1bc3915fdccdbb5a3fa667f5e7e200e113550 Author: Jagan Teki Date: Mon Oct 16 17:46:25 2017 +0530 ARM: dts: rockchip: Add usb otg for rk3288-vyasa Add usb otg support for rk3288-vyasa, board support usb1 otg power through otg_vbus_drv and naming conversion followed as per schematic. Signed-off-by: Jagan Teki Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-vyasa.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit ba736024a4dbcd3f86044311b9d2571a205e29ac Author: Jagan Teki Date: Mon Oct 16 17:46:24 2017 +0530 ARM: dts: rockchip: Add usb host for rk3288-vyasa Add usb host support for rk3288-vyasa, board support hub power through phy_pwr_en and usb2 host power through usb2_pwr_en and naming conversion followed as per schematic. Signed-off-by: Jagan Teki Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-vyasa.dts | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit c09cd2537097985e9030a25dfe52d98f2fb9a1ad Author: Jagan Teki Date: Mon Oct 16 22:43:07 2017 +0530 ARM: dts: rockchip: Add gmac support for rk3288-vyasa board Add the external clock-reference, enable the gmac node and define the phy-related pin settings. Signed-off-by: Jagan Teki Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-vyasa.dts | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit 8f6fc8245cfcd2b71567c564f87a7b0e5144736b Author: Jagan Teki Date: Mon Oct 16 17:46:22 2017 +0530 ARM: dts: rockchip: Add regulators for rk3288-vyasa Add supporting regulators for rk3288-vyasa board, dc12_vbat is parent regulatorand followed regulators as are child regulators. regulator naming conversion followed as per schematic for better readability and easy for identification. Signed-off-by: Jagan Teki Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-vyasa.dts | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 32739f1536a1b9ff0773d1357df1698c2ab52f1e Author: Jagan Teki Date: Mon Oct 16 17:46:21 2017 +0530 ARM: dts: rockchip: Use vmmc-supply from PMIC on rk3288-vyasa rk808, SWITCH_REG1 has configured for sdmmc regulator as vcc_sd, so use the same by renaming vcc33_sd to vcc_sd(as per schematic) and drop explicit regulator definition from root. Signed-off-by: Jagan Teki Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-vyasa.dts | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) commit 598ed15fd7ef12f38364a026b30e3b1d067a445e Author: Jagan Teki Date: Mon Oct 16 17:46:19 2017 +0530 ARM: dts: rockchip: Remove vdd_log from rk808, DCDC_REG1 on rk3288-vyasa vdd_log, never used on DCDC_REG1 of rk808 from latest schematic so remove the same and update the regulator-name as 'vdd_arm' to sync with existing rk3288 board dts files. Signed-off-by: Jagan Teki Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-vyasa.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fc54bae288182056e9d2431fb1018bf5229ea52d Author: Sandor Bodo-Merle Date: Sat Oct 7 14:08:44 2017 +0200 PCI: iproc: Allow allocation of multiple MSIs Add support for allocating multiple MSIs at the same time, so that the MSI_FLAG_MULTI_PCI_MSI flag can be added to the msi_domain_info structure. Avoid storing the hwirq in the low 5 bits of the message data, as it is used by the device. Also fix an endianness problem by using readl(). Signed-off-by: Sandor Bodo-Merle Signed-off-by: Bjorn Helgaas Reviewed-by: Ray Jui drivers/pci/host/pcie-iproc-msi.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 115cca31c1e6f7745dbf1627e2a27b812a5272f4 Author: Rocky Hao Date: Thu Aug 24 18:32:14 2017 +0800 ARM: dts: rockchip: enable tsadc module on RV1108 evaluation board Enable tsadc module on RV1108 evaluation board Signed-off-by: Rocky Hao Acked-by: Eduardo Valentin Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rv1108-evb.dts | 4 ++++ 1 file changed, 4 insertions(+) commit f6d3f1e8eb8b15ba10b91c6279c0341a7a0d49b7 Author: Rocky Hao Date: Thu Aug 24 18:27:54 2017 +0800 ARM: dts: rockchip: add thermal nodes for RV1108 SoC Add thermal zone and dynamic CPU power coefficients for RV1108 Signed-off-by: Rocky Hao Acked-by: Eduardo Valentin Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rv1108.dtsi | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 343dc693f7b79885197f9d37dd8b711b0e3ffc8f Author: Dan Carpenter Date: Sat Sep 30 11:15:52 2017 +0300 misc: pci_endpoint_test: Prevent some integer overflows "size + max" can have an arithmetic overflow when we're allocating: orig_src_addr = dma_alloc_coherent(dev, size + alignment, ... Add a few checks to prevent that. Fixes: 13107c60681f ("misc: pci_endpoint_test: Add support to provide aligned buffer addresses") Signed-off-by: Dan Carpenter Signed-off-by: Bjorn Helgaas Acked-by: Kishon Vijay Abraham I drivers/misc/pci_endpoint_test.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit fb03abbc2755a7f0efb245b926c0f5ba39683da6 Author: Rocky Hao Date: Thu Aug 24 18:27:53 2017 +0800 ARM: dts: rockchip: add tsadc node for RV1108 SoC Add tsadc needed main information for RV1108 SoC. 750000Hz is the max clock rate supported by tsadc module. Signed-off-by: Rocky Hao Acked-by: Eduardo Valentin Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rv1108.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 4892b374c9b79729da33bf94612588a6556709be Author: Vignesh R Date: Tue Oct 3 10:49:25 2017 +0530 mtd: spi-nor: cadence-quadspi: Add runtime PM support Add pm_runtime* calls to cadence-quadspi driver. This is required to switch on QSPI power domain on TI 66AK2G SoC during probe. Signed-off-by: Vignesh R Acked-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/cadence-quadspi.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 329864d35a7f49bed78bc3302fc56317c325f31f Author: Vignesh R Date: Tue Oct 3 10:49:24 2017 +0530 mtd: spi-nor: cadence-quadspi: Fix error path in probe Fix the reversed goto labels, so that we disable cqspi controller only if its enabled previously. This is a minor cleanup. Signed-off-by: Vignesh R Acked-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/cadence-quadspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e2580a4add6b061f1cc9d7bf9bac5a643112d744 Author: Vignesh R Date: Tue Oct 3 10:49:23 2017 +0530 mtd: spi-nor: cadence-quadspi: Add support to enable loop-back clock circuit Cadence QSPI IP has a adapted loop-back circuit which can be enabled by setting BYPASS field to 0 in READCAPTURE register. It enables use of QSPI return clock to latch the data rather than the internal QSPI reference clock. For high speed operations, adapted loop-back circuit using QSPI return clock helps to increase data valid window. Based on DT parameter cdns,rclk-en enable adapted loop-back circuit for boards which do have QSPI return clock provided. This patch also modifies cqspi_readdata_capture() function's bypass parameter to bool to match how its used in the function. Signed-off-by: Vignesh R Acked-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/cadence-quadspi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 00df263560673cefe3341275990324730d4791d5 Author: Vignesh R Date: Tue Oct 3 10:49:22 2017 +0530 mtd: spi-nor: cadence-quadspi: Add new binding to enable loop-back circuit Cadence QSPI IP has a adapted loop-back circuit which can be enabled by setting BYPASS field to 0 in READCAPTURE register. It enables use of QSPI return clock to latch the data rather than the internal QSPI reference clock. For high speed operations, adapted loop-back circuit using QSPI return clock helps to increase data valid window. Add DT parameter cdns,rclk-en to help enable adapted loop-back circuit for boards which do have QSPI return clock provided. Update binding documentation for the same. Signed-off-by: Vignesh R Acked-by: Rob Herring Acked-by: Marek Vasut Signed-off-by: Cyrille Pitchen Documentation/devicetree/bindings/mtd/cadence-quadspi.txt | 3 +++ 1 file changed, 3 insertions(+) commit 61dc8493bae9ba82a1c72edbc6c6065f6a94456a Author: Vignesh R Date: Tue Oct 3 10:49:21 2017 +0530 mtd: spi-nor: cadence-quadspi: add a delay in write sequence As per 66AK2G02 TRM[1] SPRUHY8F section 11.15.5.3 Indirect Access Controller programming sequence, a delay equal to couple of QSPI master clock(~5ns) is required after setting CQSPI_REG_INDIRECTWR_START bit and writing data to the flash. Introduce a quirk flag CQSPI_NEEDS_WR_DELAY to handle this and set this flag for TI 66AK2G SoC. [1]http://www.ti.com/lit/ug/spruhy8f/spruhy8f.pdf Signed-off-by: Vignesh R Acked-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/cadence-quadspi.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit 18a3dde9db78076755275423b754846a2da000ad Author: Vignesh R Date: Tue Oct 3 10:49:20 2017 +0530 mtd: spi-nor: cadence-quadspi: Add TI 66AK2G SoC specific compatible Update binding documentation to add a new compatible for TI 66AK2G SoC, to handle TI SoC specific quirks in the driver. Signed-off-by: Vignesh R Acked-by: Rob Herring Acked-by: Marek Vasut Signed-off-by: Cyrille Pitchen Documentation/devicetree/bindings/mtd/cadence-quadspi.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ec5ccfd7011e341aa5fc3601f71d1a1cd4aef0db Author: Jacob Chen Date: Wed Oct 11 15:29:38 2017 +0800 arm64: dts: rockchip: add RGA device node for RK3399 This patch add the RGA dt config of RK3399 SoC. Signed-off-by: Jacob Chen Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit faf15c0b750f3df74509345e1c37a29d1705f8af Author: Jacob Chen Date: Wed Oct 11 15:29:37 2017 +0800 ARM: dts: rockchip: add RGA device node for RK3288 This patch add the RGA dt config of rk3288 SoC. Signed-off-by: Jacob Chen Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit aaddb6d22a49923c5223a4703af7710c249503da Author: Jonathan Liu Date: Tue Oct 17 20:18:02 2017 +0800 drm/sun4i: Add support for A20 display pipeline components The A20 display pipeline has 2 frontends, 2 backends, and 2 TCONs. This patch adds support (or a compatible string in the frontend's case) for these components. The TCONs support directly outputting to CPU/RGB/LVDS LCD panels, or it can output to HDMI via an on-chip HDMI controller, or CVBS/YPbPr/VGA signals via on-chip TV encoders. These additional encoders are not covered in this patch. Signed-off-by: Jonathan Liu [wens@csie.org: Expand commit message] Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171017121807.2994-6-wens@csie.org Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 4 ++++ drivers/gpu/drm/sun4i/sun4i_backend.c | 8 ++++++++ drivers/gpu/drm/sun4i/sun4i_drv.c | 3 +++ drivers/gpu/drm/sun4i/sun4i_tcon.c | 7 +++++++ 4 files changed, 22 insertions(+) commit 9a8187c00373bce839388574910f72711c9c4c33 Author: Chen-Yu Tsai Date: Tue Oct 17 20:18:01 2017 +0800 drm/sun4i: Add support for A10 display pipeline components The A10 display pipeline has 2 frontends, 2 backends, and 2 TCONs. This patch adds support (or a compatible string in the frontend's case) for these components. The TCONs support directly outputting to CPU/RGB/LVDS LCD panels, or it can output to HDMI via an on-chip HDMI controller, or CVBS/YPbPr/VGA signals via on-chip TV encoders. These additional encoders are not covered in this patch. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171017121807.2994-5-wens@csie.org Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 3 +++ drivers/gpu/drm/sun4i/sun4i_backend.c | 8 ++++++++ drivers/gpu/drm/sun4i/sun4i_drv.c | 4 +++- 3 files changed, 14 insertions(+), 1 deletion(-) commit 7ea4291f9f1117d7f78b336629e8ff9d0c964919 Author: Chen-Yu Tsai Date: Tue Oct 17 20:18:00 2017 +0800 drm/sun4i: hdmi: Support HDMI controller on A10 The HDMI controller in the A10 SoC is the same as the one currently supported in the A10s. It has slightly different setup parameters. Since these parameters are not thoroughly understood, we add support for this variant by copying these parameters verbatim. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171017121807.2994-4-wens@csie.org .../bindings/display/sunxi/sun4i-drm.txt | 1 + drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 53 ++++++++++++++++++++++ 2 files changed, 54 insertions(+) commit 4bb206bf4d8cbccaa2c2ee76168381f6c29a9e33 Author: Jonathan Liu Date: Tue Oct 17 20:17:59 2017 +0800 drm/sun4i: tcon: Add support for A10 TCON The A10 has two TCONs that are similar to the ones found on other SoCs. Like the A31, TCON0 has a register used to mux the TCON outputs to the downstream encoders. The bit fields are slightly different. Signed-off-by: Jonathan Liu [wens@csie.org: Reworked for A10 and fixed up commit message] Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171017121807.2994-3-wens@csie.org .../bindings/display/sunxi/sun4i-drm.txt | 1 + drivers/gpu/drm/sun4i/sun4i_drv.c | 3 ++- drivers/gpu/drm/sun4i/sun4i_tcon.c | 30 ++++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) commit f55c83d37b85de411db74c6700808d08684522aa Author: Chen-Yu Tsai Date: Tue Oct 17 20:17:58 2017 +0800 drm/sun4i: backend: Support output muxing The backend has a mux to select the destination of the data to output to. It can select the TCON or the frontends. On the A20, it includes an option to output to the second TCON. This is not documented in the user manual, but the vendor kernel uses it nevertheless, so the second backend outputs to the second TCON. Although the muxing can be changed on the fly, DRM needs to be able to group a bunch of layers such that they get switched to another crtc together. This is because the display backend does the layer compositing, while the TCON generates the display timings. This constraint is not supported by DRM. Here we simply pair up backends and TCONs with the same ID. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171017121807.2994-2-wens@csie.org drivers/gpu/drm/sun4i/sun4i_backend.c | 52 +++++++++++++++++++++++++++++++++-- drivers/gpu/drm/sun4i/sun4i_backend.h | 3 +- 2 files changed, 51 insertions(+), 4 deletions(-) commit ba19c53704d8bc503dd20011819d1d3251899c56 Author: Maxime Ripard Date: Tue Oct 17 11:06:14 2017 +0200 drm/sun4i: tcon: Move out the tcon0 common setup Some channel0 setup has to be done, no matter what the output interface is (RGB, CPU, LVDS). Move that code into a common function in order to avoid duplication. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/183100/ drivers/gpu/drm/sun4i/sun4i_tcon.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 5b8f09100d6c85c4a8049a830b57f199b5b08278 Author: Maxime Ripard Date: Tue Oct 17 11:06:13 2017 +0200 drm/sun4i: tcon: Don't rely on encoders to set the TCON mode Just like we did for the TCON enable and disable, for historical reasons we used to rely on the encoders calling the TCON mode_set function, while the CRTC has a callback for that. Let's implement it in order to reduce the boilerplate code. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/faa3a4d511039af1d116270dfef3a8b60ca3591e.1508231063.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_crtc.c | 10 ++++++++++ drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c | 1 - drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 7 ------- drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 1 - drivers/gpu/drm/sun4i/sun4i_rgb.c | 15 -------------- drivers/gpu/drm/sun4i/sun4i_tcon.c | 31 ++++++++++++++++++++++------- drivers/gpu/drm/sun4i/sun4i_tcon.h | 11 +++------- drivers/gpu/drm/sun4i/sun4i_tv.c | 6 ------ 8 files changed, 37 insertions(+), 45 deletions(-) commit 45e88f994add84d8cd3864d36064ea1ed1b08cdf Author: Maxime Ripard Date: Tue Oct 17 11:06:12 2017 +0200 drm/sun4i: tcon: Don't rely on encoders to enable the TCON So far, we've required all the TCON-connected encoders to call the TCON enable and disable functions. This was made this way because in the RGB/LVDS case, the TCON is the CRTC and the encoder. However, in all the other cases (HDMI, TV, DSI, etc.), we have another encoder down the road that needs to be programmed. We also needed to know which channel the encoder is connected to, which is encoder-specific. The CRTC's enable and disable callbacks can work just fine for our use case, and we can get the channel to use just by looking at the type of encoder, since that is fixed. Implement those callbacks, which will remove some of the encoder boilerplate. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/90b4396e19b3eca61b2ebfdae0672074b88ad74d.1508231063.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_crtc.c | 22 ++++++++- drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 8 ---- drivers/gpu/drm/sun4i/sun4i_rgb.c | 14 ++---- drivers/gpu/drm/sun4i/sun4i_tcon.c | 87 ++++++++++++++++------------------ drivers/gpu/drm/sun4i/sun4i_tcon.h | 10 +--- drivers/gpu/drm/sun4i/sun4i_tv.c | 6 --- 6 files changed, 67 insertions(+), 80 deletions(-) commit 961c645cf00c8be82b05ad10068179a86fdbc181 Author: Maxime Ripard Date: Tue Oct 17 11:06:11 2017 +0200 drm/sun4i: tcon: Make tcon_get_clk_delay mode argument const The drm_display_mode pointer can be mark const, so let's do it. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/e6f92f126640aa6de639386f9b4677db3d8bb37b.1508231063.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abcb8766b32d277859163e4da585f76f10d998f1 Author: Maxime Ripard Date: Tue Oct 17 11:06:10 2017 +0200 drm/sun4i: tcon: Make tcon_set_mux mode argument const The drm_display_mode pointer can be mark const, so let's do it. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/b0cce5a43fc3b56953d21a54fc3c14672f755f42.1508231063.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_tcon.c | 6 +++--- drivers/gpu/drm/sun4i/sun4i_tcon.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 79c6109243fdfe4377c7e5518c0bae7269cfc716 Author: Maxime Ripard Date: Tue Oct 17 11:06:09 2017 +0200 drm/sun4i: Realign Makefile padding and reorder it Some options were not padded as they should, and the order in the Makefile was chaotic. Fix that. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/9410b284ec97453fa692537dffaaa4fb4833347c.1508231063.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/Makefile | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 6c32e0d9fdd56a7af54512aff700e20d85563499 Author: Alan Brady Date: Mon Oct 9 15:48:45 2017 -0700 i40e: fix u64 division usage Commit 52eb1ff93e98 ("i40e: Add support setting TC max bandwidth rates") and commit 1ea6f21ae530 ("i40e: Refactor VF BW rate limiting") add some needed functionality for TC bandwidth rate limiting. Unfortunately they introduce several usages of unsigned 64-bit division which needs to be handled special by the kernel to support all architectures. Fixes: 52eb1ff93e98 ("i40e: Add support setting TC max bandwidth rates") Fixes: 1ea6f21ae530 ("i40e: Refactor VF BW rate limiting") Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 3 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 58 ++++++++++++++++++++--------- 2 files changed, 42 insertions(+), 19 deletions(-) commit cee919959b6193325f34223370650402dee34e30 Author: Alan Brady Date: Thu Oct 5 14:53:44 2017 -0700 i40e: convert i40e_set_link_ksettings to new API This finishes off the conversion to the new ethtool API by removing the old macros being used in i40e_set_link_ksettings and replacing them with shiny new ones. This conversion also allows us to provide link speed support for new 25G and 10G macros which is included here as well. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 93 ++++++++++++++++---------- 1 file changed, 57 insertions(+), 36 deletions(-) commit 636b62d778302149216fad6aaa5e8d84c934a794 Author: Alan Brady Date: Thu Oct 5 14:53:43 2017 -0700 i40e: rename 'change' variable to 'autoneg_changed' This variable isn't actually very descriptive and makes the code a bit confusing as to what it is being used for. This patch enhances the variable with the longer name, 'autoneg_changed', which makes it clear we are concerned with autoneg changing in this context. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 79f04a3aba91531a3b979f6ebd846367a664638f Author: Alan Brady Date: Thu Oct 5 14:53:42 2017 -0700 i40e: convert i40e_get_settings_link_up to new API This removes references to old ethtool API macros and functions in i40e_get_settings_link_up as part of the process of converting to the new API. The new API also allows us to provide more explicit support for new 25G and 10G PHY types so some of the PHY types have been adjusted where necessary as well. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 187 +++++++++++++++++-------- 1 file changed, 125 insertions(+), 62 deletions(-) commit 1eaae5198e0db1f523fa3432ded69247aa33bf20 Author: Alan Brady Date: Thu Oct 5 14:53:41 2017 -0700 i40e: convert i40e_phy_type_to_ethtool to new API We are still largely using the old ethtool API macros. This is problematic because eventually they will be removed and they only support 32 bits of PHY types. This overhauls i40e_phy_type_to_ethtool to use only the new API. Doing this also allows us to provide much better support for newer 25G and 10G PHY types which is included here as well. The remaining usages of the old ethtool API will be addressed in other patches in the series. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 204 +++++++++++++++++-------- 1 file changed, 140 insertions(+), 64 deletions(-) commit 5a6cd6de76ae78b651e7c36eba8b1da465d65f06 Author: Alan Brady Date: Thu Oct 5 14:53:40 2017 -0700 ethtool: add ethtool_intersect_link_masks This function provides a way to intersect two link masks together to find the common ground between them. For example in i40e, the driver first generates link masks for what is supported by the PHY type. The driver then gets the link masks for what the NVM supports. The resulting intersection between them yields what can truly be supported. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher include/linux/ethtool.h | 10 ++++++++++ net/core/ethtool.c | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) commit 211b4c140a9de0a672a8f5c3cbaa3639ef507205 Author: Sudheer Mogilappagari Date: Thu Oct 5 14:53:39 2017 -0700 i40e: Add new PHY types for 25G AOC and ACC support This patch adds support for 25G Active Optical Cables (AOC) and Active Copper Cables (ACC) PHY types. Signed-off-by: Sudheer Mogilappagari Signed-off-by: Krzysztof Malek Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 4 ++++ drivers/net/ethernet/intel/i40e/i40e_common.c | 2 ++ drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 ++ drivers/net/ethernet/intel/i40e/i40e_type.h | 4 ++++ drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 4 ++++ 5 files changed, 16 insertions(+) commit 6987bd25e2be49ec0c25c6c15ba2bcb6327f9ed4 Author: Alan Brady Date: Thu Oct 5 14:53:38 2017 -0700 i40e: group autoneg PHY types together This separates the setting of autoneg in i40e_phy_types_to_ethtool into its own conditional. Doing this adds clarity as what PHYs support/advertise autoneg and makes it easier to add new PHY types in the future. This also fixes an issue on devices with CRT_RETIMER where advertising autoneg was being set, but supported autoneg was not. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 85 +++++++++++++------------- 1 file changed, 41 insertions(+), 44 deletions(-) commit a03af69f5c2813e3c76630d043716a3b685c9d30 Author: Alan Brady Date: Thu Oct 5 14:53:37 2017 -0700 i40e: fix whitespace issues in i40e_ethtool.c There's a number of minor incidental whitespace issues in this file. This addresses most of the ones I could find. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 44 +++++++++++--------------- 1 file changed, 18 insertions(+), 26 deletions(-) commit 91a5c44722c077e30c5ee2b22c5a460d9694ea1d Author: Alan Brady Date: Thu Oct 5 14:53:36 2017 -0700 i40e: fix comment typo Someone forgot a word in this comment and it's confusing without it. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52e2d02e42e9a9ac299b61a1b1acbac06fe7949d Author: Alan Brady Date: Thu Oct 5 14:53:35 2017 -0700 i40e: fix i40e_phy_type_to_ethtool function header The function header erroneously listed 'phy_types' as a parameter. The correct parameter is 'pf'. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f434994ba94f7f02c1f47a9dd13204d1fbc9686 Author: Alan Brady Date: Thu Oct 5 14:53:34 2017 -0700 i40e: fix clearing link masks in i40e_get_link_ksettings This fixes two issues in i40e_get_link_ksettings. It adds calls to ethtool_link_ksettings_zero_link_mode to make sure advertising and supported link masks are cleared before we start setting bits in them. This also replaces some funky bit manipulations with a much nicer call to ethtool_link_ksettings_del_link_mode when removing link modes. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 21675bdc214b34d2ce4e30396e9ff36f0e61ae93 Author: Alan Brady Date: Thu Oct 5 14:53:33 2017 -0700 i40e: add function header for i40e_get_rxfh Someone left this poor little function naked with no header. This dresses it up in a proper function header it deserves. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit c6faca730dc01391e08011945fab5e67b09cdd05 Author: Alan Brady Date: Thu Oct 5 14:53:32 2017 -0700 i40e: remove ifdef SPEED_25000 This 'ifdef' doesn't accomplish anything so remove it. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 5 ----- 1 file changed, 5 deletions(-) commit 1c142e1c639bcbcb5b5db210d8fa4d2ecef6037e Author: Alan Brady Date: Thu Oct 5 14:53:31 2017 -0700 i40e: rename 'cmd' variables in ethtool interface After the switch to the new ethtool API, ethtool passes us ethtool_ksettings structs instead of ethtool_command structs, however we were still referring to them as 'cmd' variables. This renames them to 'ks' variables which makes the code easier to understand. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 145 +++++++++++++------------ 1 file changed, 74 insertions(+), 71 deletions(-) commit 4328a2186e5120cfd34c4f04c6e4b7e74fb8b7b4 Author: Jonathan Liu Date: Tue Oct 17 20:18:03 2017 +0800 clk: sunxi-ng: sun4i: 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: Jonathan Liu Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun4i-a10.h | 4 ++-- include/dt-bindings/clock/sun4i-a10-ccu.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit d368478b2995a1eda156b4fa8b0a9d0850f325ed Author: Colin Ian King Date: Tue Oct 17 13:18:36 2017 +0100 ALSA: emu10k1: remove redundant assignment to tmp The assignment to variable tmp is redundant as the value is never read and a new value is assigned to tmp in the following for-loop, so remove the assignment. Cleans up clang warning: Value stored to 'tmp' is never read Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/pci/emu10k1/emuproc.c | 1 - 1 file changed, 1 deletion(-) commit 8a5f2166a6288ee4b5a393f1ebc8cfb26b0510f0 Author: Henrik Austad Date: Tue Oct 17 12:10:10 2017 +0200 net: export netdev_txq_to_tc to allow sch_mqprio to compile as module In commit 32302902ff09 ("mqprio: Reserve last 32 classid values for HW traffic classes and misc IDs") sch_mqprio started using netdev_txq_to_tc to find the correct tc instead of dev->tc_to_txq[] However, when mqprio is compiled as a module, it cannot resolve the symbol, leading to this error: ERROR: "netdev_txq_to_tc" [net/sched/sch_mqprio.ko] undefined! This adds an EXPORT_SYMBOL() since the other user in the kernel (netif_set_xps_queue) is also EXPORT_SYMBOL() (and not _GPL) or in a sysfs-callback. Cc: Alexander Duyck Cc: Jesus Sanchez-Palencia Cc: David S. Miller Signed-off-by: Henrik Austad Reviewed-by: Eric Dumazet Acked-by: Alexander Duyck Signed-off-by: David S. Miller net/core/dev.c | 1 + 1 file changed, 1 insertion(+) commit 56ffc7427c2b0b27d732a15e062f0c7cdf62c173 Author: Michal Wajdeczko Date: Tue Oct 17 09:44:49 2017 +0000 drm/i915/uc: Add pretty printer for uc firmware Debugfs for GuC and HuC load info have similar common part. Move and update dump of uc_fw to separate helper for reuse. Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171017094449.22584-1-michal.wajdeczko@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_debugfs.c | 41 ++++++------------------------------- drivers/gpu/drm/i915/intel_uc_fw.c | 26 +++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uc_fw.h | 2 ++ 3 files changed, 34 insertions(+), 35 deletions(-) commit 376f3bcebdc999cc737d9052109cc33b573b3a8b Author: Kees Cook Date: Mon Oct 16 16:22:31 2017 -0700 x86/platform/UV: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: Dimitri Sivanich Cc: Russ Anderson Cc: Mike Travis Link: https://lkml.kernel.org/r/20171016232231.GA100493@beast arch/x86/kernel/apic/x2apic_uv_x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit b93ab338f7f0e39321b282d694a52736fdab172b Author: Kees Cook Date: Mon Oct 16 14:56:42 2017 -0700 libata: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Acked-by: Tejun Heo Cc: linux-ide@vger.kernel.org Link: https://lkml.kernel.org/r/20171005004842.GA23011@beast drivers/ata/libata-core.c | 5 ++--- drivers/ata/libata-eh.c | 4 ++-- drivers/ata/libata.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) commit 3c557df67257c114401f18ee412f0b74091c3c6f Author: Kees Cook Date: Mon Oct 9 17:10:32 2017 -0700 timer: Remove meaningless .data/.function assignments Several timer users needlessly reset their .function/.data fields during their timer callback, but nothing else changes them. Some users do not use their .data field at all. Each instance is removed here. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Acked-by: Greg Kroah-Hartman # for staging Acked-by: Krzysztof Halasa # for wan/hdlc* Acked-by: Jens Axboe # for amiflop Cc: devel@driverdev.osuosl.org Cc: netdev@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: Jens Axboe Cc: Ganesh Krishna Cc: Aditya Shankar Link: https://lkml.kernel.org/r/20171010001032.GA119829@beast drivers/block/amiflop.c | 3 +-- drivers/net/wan/hdlc_cisco.c | 2 -- drivers/net/wan/hdlc_fr.c | 2 -- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 +--- 4 files changed, 2 insertions(+), 9 deletions(-) commit 091a4f91942a4396c67e5747f5cb38c6396d1fc5 Author: James Ausmus Date: Fri Oct 13 11:01:44 2017 -0700 drm/i915: Handle drm-layer errors in intel_dp_add_mst_connector Make intel_dp_add_mst_connector handle error returns from the drm_ calls. Add intel_connector_free to support cleanup on the error path. v2: Rename new function to avoid confusion, and simplify error paths (Ville) v3: Indentation fixup, style fixes (Ville) v4: Clarify usage of intel_connector_free, and fix usage of intel_connector_free v5: Rebase Cc: Ville Syrjälä Signed-off-by: James Ausmus Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171013180144.15865-1-james.ausmus@intel.com drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++++ drivers/gpu/drm/i915/intel_dp_mst.c | 27 +++++++++++++++++++++++---- drivers/gpu/drm/i915/intel_drv.h | 1 + 3 files changed, 37 insertions(+), 4 deletions(-) commit 4eb1bca1793385b8caff4b2e1f19b31a013dd1ec Author: Arnd Bergmann Date: Fri Oct 13 20:34:35 2017 +0200 time: Use do_settimeofday64() internally do_settimeofday() is a wrapper around do_settimeofday64(), so that function can be called directly. The wrapper can be removed once the last user is gone. Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Cc: y2038@lists.linaro.org Cc: Frederic Weisbecker Cc: Stephen Boyd Cc: John Stultz Cc: Al Viro Cc: Deepa Dinamani Link: https://lkml.kernel.org/r/20171013183452.3635956-1-arnd@arndb.de kernel/time/time.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit fe460423438b62eb7440d994ab19a9f444e6280d Author: Arnd Bergmann Date: Fri Oct 13 20:29:38 2017 +0200 posix-stubs: Use get_timespec64() and put_timespec64() This is a follow-up to commit 5c4994102fb5 ("posix-timers: Use get_timespec64() and put_timespec64()"), which left two system call using copy_from_user()/copy_to_user(). Change them as well for consistency. Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Acked-by: Nicolas Pitre Cc: y2038@lists.linaro.org Cc: John Stultz Cc: Al Viro Cc: Deepa Dinamani Link: https://lkml.kernel.org/r/20171013183009.3442318-1-arnd@arndb.de kernel/time/posix-stubs.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 73e3a7d2a7c3be29a5a22b85026f6cfa5664267f Author: Andi Kleen Date: Fri Oct 13 14:56:45 2017 -0700 x86/fpu: Remove the explicit clearing of XSAVE dependent features Clearing a CPU feature with setup_clear_cpu_cap() clears all features which depend on it. Expressing feature dependencies in one place is easier to maintain than keeping functions like fpu__xstate_clear_all_cpu_caps() up to date. The features which depend on XSAVE have their dependency expressed in the dependency table, so its sufficient to clear X86_FEATURE_XSAVE. Remove the explicit clearing of XSAVE dependent features. Signed-off-by: Andi Kleen Reviewed-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20171013215645.23166-6-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/xstate.c | 20 -------------------- 1 file changed, 20 deletions(-) commit ccb18db2ab9d923df07e7495123fe5fb02329713 Author: Andi Kleen Date: Fri Oct 13 14:56:44 2017 -0700 x86/fpu: Make XSAVE check the base CPUID features before enabling Before enabling XSAVE, not only check the XSAVE specific CPUID bits, but also the base CPUID features of the respective XSAVE feature. This allows to disable individual XSAVE states using the existing clearcpuid= option, which can be useful for performance testing and debugging, and also in general avoids inconsistencies. Signed-off-by: Andi Kleen Reviewed-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20171013215645.23166-5-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/kernel/fpu/xstate.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 0c2a3913d6f50503f7c59d83a6219e39508cc898 Author: Andi Kleen Date: Fri Oct 13 14:56:43 2017 -0700 x86/fpu: Parse clearcpuid= as early XSAVE argument With a followon patch we want to make clearcpuid affect the XSAVE configuration. But xsave is currently initialized before arguments are parsed. Move the clearcpuid= parsing into the special early xsave argument parsing code. Since clearcpuid= contains a = we need to keep the old __setup around as a dummy, otherwise it would end up as a environment variable in init's environment. Signed-off-by: Andi Kleen Reviewed-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20171013215645.23166-4-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/common.c | 16 +++++++--------- arch/x86/kernel/fpu/init.c | 11 +++++++++++ 2 files changed, 18 insertions(+), 9 deletions(-) commit 0b00de857a648dafe7020878c7a27cf776f5edf4 Author: Andi Kleen Date: Fri Oct 13 14:56:42 2017 -0700 x86/cpuid: Add generic table for CPUID dependencies Some CPUID features depend on other features. Currently it's possible to to clear dependent features, but not clear the base features, which can cause various interesting problems. This patch implements a generic table to describe dependencies between CPUID features, to be used by all code that clears CPUID. Some subsystems (like XSAVE) had an own implementation of this, but it's better to do it all in a single place for everyone. Then clear_cpu_cap and setup_clear_cpu_cap always look up this table and clear all dependencies too. This is intended to be a practical table: only for features that make sense to clear. If someone for example clears FPU, or other features that are essentially part of the required base feature set, not much is going to work. Handling that is right now out of scope. We're only handling features which can be usefully cleared. Signed-off-by: Andi Kleen Reviewed-by: Thomas Gleixner Cc: Jonathan McDowell Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20171013215645.23166-3-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeature.h | 9 ++- arch/x86/include/asm/cpufeatures.h | 5 ++ arch/x86/kernel/cpu/Makefile | 1 + arch/x86/kernel/cpu/cpuid-deps.c | 113 +++++++++++++++++++++++++++++++++++++ 4 files changed, 123 insertions(+), 5 deletions(-) commit cbe96375025e14fc76f9ed42ee5225120d7210f8 Author: Andi Kleen Date: Fri Oct 13 14:56:41 2017 -0700 bitops: Add clear/set_bit32() to linux/bitops.h Add two simple wrappers around set_bit/clear_bit() that accept the common case of an u32 array. This avoids writing casts in all callers. Signed-off-by: Andi Kleen Reviewed-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20171013215645.23166-2-andi@firstfloor.org Signed-off-by: Ingo Molnar include/linux/bitops.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 553c7d5ba2fe64cdbfcdf49560ef71ef79810f93 Author: Maxime Ripard Date: Tue Oct 17 11:06:17 2017 +0200 clk: sunxi-ng: Add A83T display clocks Unfortunately, the A83t display clocks are not children of the de clock, since that clocks doesn't exist at all on the A83t. For now, they are orphans, so let's move them to their true, existing, parent. Fixes: 763c5bd045b1 ("clk: sunxi-ng: add support for DE2 CCU") Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-de2.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 0696d059f23c05f2dbc3b19ef50e5bdd175b782b Author: Thomas Gleixner Date: Mon Oct 16 16:16:19 2017 +0200 x86/vector: Use correct per cpu variable in free_moved_vector() free_moved_vector() accesses the per cpu vector array with this_cpu_write() to clear the vector. The function has two call sites: 1) The vector cleanup IPI 2) The force_complete_move() code path For #1 this_cpu_write() is correct as it runs on the CPU on which the vector needs to be freed. For #2 this_cpu_write() is wrong because the function is called from an outgoing CPU which is not necessarily the CPU on which the previous vector needs to be freed. As a result it sets the vector on the outgoing CPU to NULL, which is pointless as that CPU does not handle interrupts anymore. What's worse is that it leaves the vector on the previous target CPU in place which later on triggers the BUG_ON(vector) in the vector allocation code when the vector gets reused. That's possible because the bitmap allocator entry of that CPU is freed correctly. Always use the CPU to which the vector was associated and clear the vector entry on that CPU. Fixup the tracepoint as well so it tracks on which CPU the vector gets removed. Fixes: 69cde0004a4b ("x86/vector: Use matrix allocator for vector assignment") Reported-by: Petri Latvala Signed-off-by: Thomas Gleixner Cc: Juergen Gross Cc: Tony Luck Cc: Len Brown Cc: Marc Zyngier Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Rui Zhang Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Boris Ostrovsky Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Alok Kataria Cc: Dan Williams Cc: Yu Chen Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1710161614430.1973@nanos arch/x86/include/asm/trace/irq_vectors.h | 12 ++++++++---- arch/x86/kernel/apic/vector.c | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) commit 8b11aaface2b182ee2b36509843d746c453f8750 Author: Maxime Ripard Date: Tue Oct 17 11:06:08 2017 +0200 drm/sun4i: Implement endpoint parsing using kfifo The commit da82b8785eeb ("drm/sun4i: add components in breadth first traversal order") implemented a breadth first traversal of our device tree nodes graph. However, it was relying on the kernel linked lists, and those are not really safe for addition. Indeed, in a single pipeline stage, your first stage (ie, the mixer or fronted) will be queued, and it will be the final iteration of that list as far as list_for_each_entry_safe is concerned. Then, during that final iteration, we'll queue another element (the TCON or the backend) that list_for_each_entry_safe will not account for, and we will leave the loop without having iterated over all the elements. And since we won't have built our components list properly, the DRM driver will be left non-functional. We can instead use a kfifo to queue and enqueue components in-order, as was the original intention. This also has the benefit of removing any dynamic allocation, making the error handling path simpler too. The only thing we're losing is the ability to tell whether an element has already been queued, but that was only needed to remove spurious logs, and therefore purely cosmetic. This means that this commit effectively reverses e8afb7b67fba ("drm/sun4i: don't add components that are already in the queue"). Fixes: da82b8785eeb ("drm/sun4i: add components in breadth first traversal order") Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/4ecb323e787918208f6a5d9f0ebba12c62583c98.1508231063.git-series.maxime.ripard@free-electrons.com drivers/gpu/drm/sun4i/sun4i_drv.c | 71 +++++++-------------------------------- 1 file changed, 13 insertions(+), 58 deletions(-) commit 4690803b09c6f1da33058336844091f8b7f3118f Author: Chen-Yu Tsai Date: Tue Oct 17 12:23:47 2017 +0800 drm/sun4i: backend: Offset layer buffer address by DRAM starting address The display backend, as well as other peripherals that have a DRAM clock gate and access DRAM directly, bypassing the system bus, address the DRAM starting from 0x0, while physical addresses the system uses starts from 0x40000000 (or 0x20000000 in A80's case). This issue was witnessed on the Cubietruck, which has 2GB of RAM. Devices with less RAM function normally due to the DRAM address wrapping around. CMA seems to always allocate its buffer at a very high address, close to the end of DRAM. On a 1GB RAM device, the physical address would be something like 0x78000000. The DRAM address 0x78000000 would access the same DRAM region as 0x38000000 on a system, as the DRAM address would only span 0x0 ~ 0x3fffffff. The bit 0x40000000 is non-functional in this case. However on the Cubietruck, the DRAM is 2GB. The physical address is 0x40000000 ~ 0xbfffffff. The buffer would be something like 0xb8000000. But the DRAM address span 0x0 ~ 0x7fffffff, meaning the buffer address wraps around to 0x38000000, which is wrong. The correct DRAM address for it should be 0x78000000. Correct the address configured into the backend layer registers by PHYS_OFFSET to account for this. Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171017042349.31743-6-wens@csie.org drivers/gpu/drm/sun4i/sun4i_backend.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 30c516d750396c5f3ec9cb04c9e025c25e91495e Author: Wei Yongjun Date: Tue Oct 17 12:11:46 2017 +0000 nullb: fix error return code in null_init() Fix to return error code -ENOMEM from the null_alloc_dev() error handling case instead of 0, as done elsewhere in this function. Fixes: 2984c8684f96 ("nullb: factor disk parameters") Signed-off-by: Wei Yongjun Signed-off-by: Jens Axboe drivers/block/null_blk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 66cc044249603e12e1dbba347f03bdbc9f171fdf Author: Rafał Miłecki Date: Mon Oct 16 14:54:32 2017 +0200 bcma: use bcma_debug and pr_cont in MIPS driver Using bcma_debug gives a device-specific prefix for messages and pr_cont is a common helper for continuing a line. Signed-off-by: Rafał Miłecki Acked-By: Hauke Mehrtens Signed-off-by: Kalle Valo drivers/bcma/driver_mips.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a7986ce1cb01816d461bdfc0d349c0b73026c6a8 Author: Larry Finger Date: Sat Oct 14 20:54:02 2017 -0500 rtlwifi: Fix typo in if ... else if ... else construct The kbuild test robot reports two conditions with no effect (if == else). These are the result of copy and paste typographical errors. Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Cc: kbuild-all@01.org Cc: Julia Lawall Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cb6bc3ff59e3ff7a6fba8ca6ee649d532b4e17f2 Author: Russell King Date: Tue Oct 17 16:01:13 2017 +0200 video: sa1100fb: move pseudo palette into sa1100fb_info structure Move the pseudo palette inside the driver private data structure so we don't have to play tricks to cater for it. Signed-off-by: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sa1100fb.c | 9 +++------ drivers/video/fbdev/sa1100fb.h | 2 ++ 2 files changed, 5 insertions(+), 6 deletions(-) commit 0ab76581a9fee0413c54907076fcd79fcc271843 Author: Russell King Date: Tue Oct 17 16:01:13 2017 +0200 video: sa1100fb: fix video memory allocation leak Don't leak the video memory allocation if register_framebuffer() fails. Signed-off-by: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sa1100fb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c244f8e48c9f1875101201eaa0ecd2bfb17a5405 Author: Russell King Date: Tue Oct 17 16:01:12 2017 +0200 video: sa1100fb: clean up failure path We merely return from the failed path, so remove all the gotos and use return statements instead. Signed-off-by: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sa1100fb.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 5634cbab489e8428f352f257b631c128b8dc869d Author: Russell King Date: Tue Oct 17 16:01:12 2017 +0200 video: sa1100fb: use devm_gpio_request_one() Switch to using devm_gpio_request_one() to request the shannon gpio and move the request before the video memory allocation, so we request all device managed resources before this large allocation attempt. Signed-off-by: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sa1100fb.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit f6fc8c9dbdc976e4933c5edc13764eafe9897313 Author: Russell King Date: Tue Oct 17 16:01:12 2017 +0200 video: sa1100fb: use devm_request_irq() Use devm_request_irq() to request the interrupt (a little earlier too) so we can avoid having to manually clean this up. Signed-off-by: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sa1100fb.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit df6b228768db032608edbc58f87bc77d23f94952 Author: Russell King Date: Tue Oct 17 16:01:12 2017 +0200 video: sa1100fb: use devm_ioremap_resource() Use devm_ioremap_resource() to map the LCD controller memory region, and remove the unnecessary cleanup for this. Signed-off-by: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sa1100fb.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit e43064ccd4b47fcb25c7f6806da1e7368312edfe Author: Russell King Date: Tue Oct 17 16:01:12 2017 +0200 video: sa1100fb: use devm_clk_get() Use devm_clk_get() to get the clock for the LCD. Signed-off-by: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sa1100fb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit ba1d36ba09becdc7f65e0140f13b31762ac31941 Author: Russell King Date: Tue Oct 17 16:01:12 2017 +0200 video: sa1100fb: use devm_kzalloc() Use devm_kzalloc() when allocating the private data for the framebuffer device. Signed-off-by: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sa1100fb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 5eabff1cb9dad4e81ee387ac79f7521d078bfa8f Author: Himanshu Jha Date: Tue Oct 17 16:01:12 2017 +0200 video: fbdev: pxa3xx_gcu: Use setup_timer and mod_timer Use setup_timer and mod_timer API instead of structure assignments. This is done using Coccinelle and semantic patch used for this as follows: @@ expression x,y,z,a,b; @@ -init_timer (&x); +setup_timer (&x, y, z); +mod_timer (&a, b); -x.function = y; -x.data = z; -x.expires = b; -add_timer(&a); Signed-off-by: Himanshu Jha Cc: "Gustavo A. R. Silva" Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/pxa3xx-gcu.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit ac0f3e30d87e593dc1460d5f0407662073281d93 Author: Lixin Wang Date: Mon Oct 16 17:54:32 2017 +0800 of: overlay: fix memory leak related to duplicated property Function of_changeset_add_property or of_changeset_update_property may fails. In this case the property just allocated is never deallocated. Signed-off-by: Lixin Wang Signed-off-by: Rob Herring drivers/of/overlay.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit e13c205ac358d4c956c36572b6b660b9e45b3bda Author: Philipp Zabel Date: Fri Aug 11 12:58:43 2017 +0200 reset: sunxi: use reset-simple driver Use the newly created copies in the reset-simple driver to replace the sunxi platform driver code and reset operations. The separate sunxi driver still remains to register the early reset controllers, but it reuses the reset operations in reset-simple. Signed-off-by: Philipp Zabel Reviewed-by: Alexandru Gagniuc Reviewed-by: Chen-Yu Tsai drivers/reset/Kconfig | 1 + drivers/reset/reset-sunxi.c | 104 +++----------------------------------------- 2 files changed, 7 insertions(+), 98 deletions(-) commit 81c22ad0cc7db056408d6089c9303b2f6e486518 Author: Philipp Zabel Date: Fri Aug 11 12:58:43 2017 +0200 reset: add reset-simple to unify socfpga, stm32, sunxi, and zx2967 Copy reusable parts from the sunxi driver, to add a driver for simple reset controllers with reset lines that can be controlled by toggling bits in exclusive, contiguous register ranges using read-modify-write cycles under a spinlock. The following patches will replace compatible reset drivers with reset-simple, extending it where necessary. Signed-off-by: Philipp Zabel Reviewed-by: Alexandru Gagniuc Reviewed-by: Chen-Yu Tsai drivers/reset/Kconfig | 10 ++++ drivers/reset/Makefile | 1 + drivers/reset/reset-simple.c | 134 +++++++++++++++++++++++++++++++++++++++++++ drivers/reset/reset-simple.h | 41 +++++++++++++ 4 files changed, 186 insertions(+) commit 1fc26792b6e3bb270313063a33b6e5ffd315440b Author: Florian Mueller Date: Mon Oct 16 09:29:11 2017 +0200 HID: add multi-input quirk for GamepadBlock The GamepadBlock game controller adapter needs HID_QUIRK_MULTI_INPUT to split it up into two input devices. Without this quirk the adapter is falsely recognized as only one device and mixes up the inputs of the two connected controllers. Signed-off-by: Florian Mueller Signed-off-by: Jiri Kosina drivers/hid/hid-ids.h | 3 +++ drivers/hid/usbhid/hid-quirks.c | 1 + 2 files changed, 4 insertions(+) commit 134649ff3545f3b7b862c589e9accb400ace2474 Author: Chris Wilson Date: Tue Oct 17 11:37:23 2017 +0100 drm/i915/selftests: Silence the compiler for impossible errors It should be impossible for these tests not to run due to an empty ppgtt, but if it should happen, let's report ENODEV (our typical internal error for impossible events). In file included from drivers/gpu/drm/i915/i915_gem.c:5415: drivers/gpu/drm/i915/selftests/huge_pages.c: In function 'igt_mock_ppgtt_huge_fill': >> drivers/gpu/drm/i915/selftests/huge_pages.c:612: error: 'err' may be used uninitialized in this function drivers/gpu/drm/i915/selftests/huge_pages.c: In function 'igt_ppgtt_exhaust_huge': drivers/gpu/drm/i915/selftests/huge_pages.c:1159: error: 'err' may be used uninitialized in this function Reported-by: kbuild-all@01.org Signed-off-by: Chris Wilson Cc: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20171017103723.6933-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/selftests/huge_pages.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a6d65e451cc4e7127698384868a4447ee7be7d16 Author: Chris Wilson Date: Mon Oct 16 21:27:32 2017 +0100 drm/i915: Report -EFAULT before pwrite fast path into shmemfs When pwriting into shmemfs, the fast path pagecache_write does not notice when it is writing to beyond the end of the truncated shmemfs inode. Report -EFAULT directly when we try to use pwrite into the !I915_MADV_WILLNEED object. Fixes: 7c55e2c5772d ("drm/i915: Use pagecache write to prepopulate shmemfs from pwrite-ioctl") Testcase: igt/gem_madvise/dontneed-before-pwrite Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Cc: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171016202732.25459-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 3 +++ 1 file changed, 3 insertions(+) commit 080de2e5be2d4b396b6792cde4cb2048fcdb4ce9 Author: Maarten Lankhorst Date: Mon Oct 16 15:29:28 2017 +0200 drm/atomic: Check for busy planes/connectors before setting the commit We still want to fail with -EBUSY if a plane or connector is part of a commit, even if it will be assigned to a new commit. This closes a small hole left open where we should return -EBUSY. It's not severe, because wait_for_dependencies and swap_state helpers still block. But it should return -EBUSY and not stall. Signed-off-by: Maarten Lankhorst Fixes: 21a01abbe32a ("drm/atomic: Fix freeing connector/plane state too early by tracking commits, v3.") Link: https://patchwork.freedesktop.org/patch/msgid/20171016132928.6498-2-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä drivers/gpu/drm/drm_atomic_helper.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 4edd60847287c34222116af58f76be985ebddef7 Author: Maarten Lankhorst Date: Tue Oct 17 07:20:47 2017 +0200 drm/atomic: Make atomic helper track newly assigned planes correctly, v2. Commit 669c9215afea ("drm/atomic: Make async plane update checks work as intended, v2.") forced planes to always be tracked, but forgot to explicitly get the crtc commit from the new crtc when available. This broke plane commit tracking, and caused kms_atomic_transitions to randomly fail with -EBUSY. Changes since v1: - Prefer new_crtc_state->crtc above old_crtc_state->crtc. Signed-off-by: Maarten Lankhorst Fixes: 669c9215afea ("drm/atomic: Make async plane update checks work as intended, v2.") Cc: Gustavo Padovan Cc: Daniel Vetter Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102671 Testcase: kms_atomic_transitions Link: https://patchwork.freedesktop.org/patch/msgid/20171017052047.8983-1-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_atomic_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 067483577bce79e11afc41a29f38d43840e623de Author: Colin Ian King Date: Tue Oct 17 12:53:21 2017 +0100 ALSA: au88x0: remove redundant assignment of variable i The assignment to variable i is redundant as it is never read because it is updated a little later on. Remove this assignment. Cleans up clang warning: Value stored to 'i' is never read Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/pci/au88x0/au88x0_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d96a4f6a03797b73bee465cada39133b7972e8d Author: Ladislav Michl Date: Fri Oct 6 13:45:53 2017 +0200 memory: omap-gpmc: Drop gpmc_status This field is no longer used, drop it. Signed-off-by: Ladislav Michl Signed-off-by: Roger Quadros drivers/memory/omap-gpmc.c | 1 - include/linux/platform_data/mtd-nand-omap2.h | 2 -- 2 files changed, 3 deletions(-) commit 0515ce0ff82d39a7576bd98c1f59ca1d2b98386d Merge: 7b77452e 6563790 Author: Will Deacon Date: Tue Oct 17 12:33:13 2017 +0100 Merge tag 'acpi/iort-for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux into aarch64/for-next/core Pull arm64 ACPI IORT updates from Lorenzo Pieralisi: - Code clean-ups (A.Yadav, L.Pieralisi) - Platform devices inizialization rework in preparation for IORT PMCG handling (L.Pieralisi) - Mapping API rework to enable MSIs for IORT components as defined in IORT specification issue C (H.Guo, L.Pieralisi) Signed-off-by: Will Deacon commit 4d1dc40185735e285576d7ed865b065c5cabe40c Author: Thierry Reding Date: Wed Aug 30 12:05:26 2017 +0200 dt-bindings: clock: tegra: Add sor1_out clock The sor1_src clock implemented on Tegra210 is modelled the wrong way around, which causes some issues with HDMI and DP support. This clock implementation is provided by BPMP on Tegra186, which models this in a more correct way. Since this introduces incompatibilities between the two SoC generations which we want to avoid, the Tegra210 will be fixed in subsequent patches. This change adds sor1_out as an alias for sor1_src. Signed-off-by: Thierry Reding include/dt-bindings/clock/tegra210-car.h | 1 + 1 file changed, 1 insertion(+) commit 7e8838fe59515860823233353227e89b82b8794e Author: Neil Armstrong Date: Tue Oct 17 12:19:34 2017 +0200 reset: meson: remove unneeded check in meson_reset_reset The if (bank >= REG_COUNT) is not need since already checked by the default rcdev->of_xlate implementation which guarantees that id < rcdev->nr_resets. Suggested-by: Philipp Zabel Signed-off-by: Neil Armstrong Signed-off-by: Philipp Zabel drivers/reset/reset-meson.c | 3 --- 1 file changed, 3 deletions(-) commit a5a10afe04efad46e8eec20f70b7b91a411fcd8e Author: Neil Armstrong Date: Tue Oct 17 12:19:18 2017 +0200 reset: meson: add level reset support for GX SoC family The Amlogic GX SoC family embeds alternate registers to drive the reset levels next to the pulse registers. This patch adds support for level reset handling on the GX family only. The Meson8 family has an alternate way to handle level reset. Signed-off-by: Neil Armstrong Signed-off-by: Philipp Zabel drivers/reset/reset-meson.c | 62 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 58 insertions(+), 4 deletions(-) commit 287b8e11972f934052f4ed0751df465a5e84b69c Author: Masaki Ota Date: Fri Oct 6 11:53:18 2017 +0900 HID: alps: add new U1 device ID Add new U1 device Product ID This device is used on HP Elite book x360 series. [jkosina@suse.cz: update changelog] Signed-off-by: Masaki Ota Signed-off-by: Jiri Kosina drivers/hid/hid-alps.c | 3 +++ drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 1 + 3 files changed, 5 insertions(+) commit 73196ebe134d11a68a2e27814c489d685cfc8b03 Author: Masaki Ota Date: Fri Oct 6 11:53:17 2017 +0900 HID: alps: add support for Alps T4 Touchpad device - Define T4 device specification value for support T4 device. - Creeate "t4_contact_data" and "t4_input_report" structure for decoding and storing T4-specific data - Create "t4_calc_check_sum()" function for calculating checksum value to send to the device. T4 needs to send this value when reading or writing device address value. - Create "t4_read_write_register()" function for reading and writing device address value. - Create "t4_raw_event()" function for decodin XYZ, palm and button data. - Replace "MAX_TOUCHES" fixed variable to "max_fingers" variable. - Add T4 devuce product ID. (0x120C) T4 device is used on HP EliteBook 1000 series and Zbook Stduio [jkosina@suse.cz: rewrite changelog] Signed-off-by: Masaki Ota Signed-off-by: Jiri Kosina drivers/hid/hid-alps.c | 339 ++++++++++++++++++++++++++++++++++++++++++++++--- drivers/hid/hid-core.c | 2 + drivers/hid/hid-ids.h | 2 + 3 files changed, 323 insertions(+), 20 deletions(-) commit f2d13b02cd9647518b4397fc23fed971955ec945 Author: Lu Baolu Date: Fri Oct 13 15:09:50 2017 +0800 usb: Apply hardware LPM attributes to 3.1 device The devices running at SuperSpeedPlus speed are also LPM capable. Apply usb3 hardware LPM attributes to those devices as well. Signed-off-by: Lu Baolu Signed-off-by: Greg Kroah-Hartman drivers/usb/core/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 370d010f0ef09db7ab157a6b5d6d9a737b148f2a Author: Timo Alho Date: Thu Sep 7 12:31:01 2017 +0300 firmware: tegra: Propagate error code to caller Response messages from Tegra BPMP firmware contain an error return code as the first word of payload. The error code is used to indicate incorrectly formatted request message or use of non-existing resource (clk, reset, powergate) identifier. Current implementation of tegra_bpmp_transfer() ignores this code and does not pass it to caller. Fix this by adding an extra struct member to tegra_bpmp_message and populate that with return code. Signed-off-by: Timo Alho Acked-by: Jon Hunter Signed-off-by: Thierry Reding drivers/firmware/tegra/bpmp.c | 22 ++++++++++++++++------ include/soc/tegra/bpmp.h | 1 + 2 files changed, 17 insertions(+), 6 deletions(-) commit 9718756ffd327f4a52874f4b98e77d5951011b88 Author: Kees Cook Date: Mon Oct 16 16:46:06 2017 -0700 usb: phy: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/phy-mv-usb.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 29bce57723351f63d593959be8fb9c97d7bc3a45 Author: Kees Cook Date: Mon Oct 16 16:39:33 2017 -0700 usb/gadget/snps_udc_core: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. If the probe fails, udc_remove() will not be called, so there is no reason to make del_timer_sync() calls conditional. As a result, use of the .data field can be dropped, in support of making removing this field entirely from struct timer_list. Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: Raviteja Garimella Cc: Michal Nazarewicz Cc: "Gustavo A. R. Silva" Cc: linux-usb@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/snps_udc_core.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit 66a4550308b8391fecd46c7e733cbccb3e01ee96 Author: Kees Cook Date: Mon Oct 16 16:16:58 2017 -0700 xhci: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Mathias Nyman Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-mem.c | 4 ++-- drivers/usb/host/xhci-ring.c | 9 +++------ drivers/usb/host/xhci.h | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) commit 89a4d970ef2a74e921dcd717965a55baefd26eed Author: Steve Magnani Date: Thu Oct 12 08:48:42 2017 -0500 udf: Fix some sign-conversion warnings Fix some warnings that appear when compiling with -Wconversion. A sub-optimal choice of variable type leads to warnings about conversion in both directions between unsigned and signed. Signed-off-by: Steven J. Magnani Signed-off-by: Jan Kara fs/udf/directory.c | 4 ++-- fs/udf/inode.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit fcbf7637e6647e00de04d4b2e05ece2484bb3062 Author: Steve Magnani Date: Thu Oct 12 08:48:41 2017 -0500 udf: Fix signed/unsigned format specifiers Fix problems noted in compilion with -Wformat=2 -Wformat-signedness. In particular, a mismatch between the signedness of a value and the signedness of its format specifier can result in unsigned values being printed as negative numbers, e.g.: Partition (0 type 1511) starts at physical 460, block length -1779968542 ...which occurs when mounting a large (> 1 TiB) UDF partition. Changes since V1: * Fixed additional issues noted in udf_bitmap_free_blocks(), udf_get_fileident(), udf_show_options() Signed-off-by: Steven J. Magnani Signed-off-by: Jan Kara fs/udf/balloc.c | 12 ++++++------ fs/udf/directory.c | 2 +- fs/udf/inode.c | 16 ++++++++-------- fs/udf/misc.c | 4 ++-- fs/udf/namei.c | 4 ++-- fs/udf/partition.c | 6 +++--- fs/udf/super.c | 52 ++++++++++++++++++++++++++-------------------------- fs/udf/unicode.c | 2 +- 8 files changed, 49 insertions(+), 49 deletions(-) commit b490bdd630cc43a5725e76c7c23f8a7e55551145 Author: Steve Magnani Date: Thu Oct 12 08:48:40 2017 -0500 udf: Fix 64-bit sign extension issues affecting blocks > 0x7FFFFFFF Large (> 1 TiB) UDF filesystems appear subject to several problems when mounted on 64-bit systems: * readdir() can fail on a directory containing File Identifiers residing above 0x7FFFFFFF. This manifests as a 'ls' command failing with EIO. * FIBMAP on a file block located above 0x7FFFFFFF can return a negative value. The low 32 bits are correct, but applications that don't mask the high 32 bits of the result can perform incorrectly. Per suggestion by Jan Kara, introduce a udf_pblk_t type for representation of UDF block addresses. Ultimately, all driver functions that manipulate UDF block addresses should use this type; for now, deployment is limited to functions with actual or potential sign extension issues. Changes to udf_readdir() and udf_block_map() address the issues noted above; other changes address potential similar issues uncovered during audit of the driver code. Signed-off-by: Steven J. Magnani Signed-off-by: Jan Kara fs/udf/balloc.c | 17 ++++++++++------- fs/udf/dir.c | 2 +- fs/udf/directory.c | 3 ++- fs/udf/ialloc.c | 2 +- fs/udf/inode.c | 30 +++++++++++++++--------------- fs/udf/misc.c | 4 ++-- fs/udf/namei.c | 9 +++++---- fs/udf/super.c | 2 +- fs/udf/truncate.c | 2 +- fs/udf/udfdecl.h | 21 +++++++++++++-------- 10 files changed, 51 insertions(+), 41 deletions(-) commit 707a123d7affbf1e98f08d1962d81a0d64f83191 Author: Colin Ian King Date: Wed Oct 11 10:09:57 2017 +0100 usb: typec: wcove: fix uninitialized usbc_irq1 and usbc_irq2 Calls to regmap_read may fail with an -EINVAL return without setting usbc_irq1 and usbc_irq2. The error handling clean up expects these to have been set (or zero on a failure) and currently may try to clear the wrong IRQs if the uninitalized garbage values in usbc_irq1 or usbc_irq2 are non-zero. The simplest fix is to ensure these variables are initialized to zero. Detected by CoverityScan, CID#1457737 ("Uninitialized scalar variable") Fixes: 3c4fb9f16921 ("usb: typec: wcove: start using tcpm for USB PD support") Signed-off-by: Colin Ian King Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/typec_wcove.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a6d5d230e0c2dbc710d473105d5652d3980da673 Author: Heikki Krogerus Date: Tue Oct 10 16:40:33 2017 +0300 usb: typec: tcpm: reset the port on removal If a port is unregistered, all the devices attached to it must be unregistered as well. This will also make sure VBUS and VCONN are disabled. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm.c | 1 + 1 file changed, 1 insertion(+) commit 4c13fec1ba555950112555b599dea8e0f0129d99 Author: Kees Cook Date: Mon Oct 16 16:29:23 2017 -0700 usb: isp1301-omap: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: linux-usb@vger.kernel.org Cc: linux-omap@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Tony Lindgren Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/phy-isp1301-omap.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 1d7765380f66648d979e33da92bbb49c64c12e61 Author: Ville Syrjälä Date: Fri Oct 13 22:40:51 2017 +0300 drm/i915: Remove mostly duplicated video DIP handling from PSR code Now that the infoframe hooks are part of the intel_dig_port, we can use the normal .write_infoframe() hook to update the VSC SDP. We do need to deal with the size difference between the VSC DIP and the others though. Another minor snag is that the compiler will complain to use if we keep using enum hdmi_infoframe_type type and passing in the DP define instead, so et's just change to unsigned int all over for the inforframe type. v2: Rebase due to other PSR changes Reviewed-by: Rodrigo Vivi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171013194051.19286-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_hdmi.c | 26 ++++++++++++++++---------- drivers/gpu/drm/i915/intel_psr.c | 34 ++-------------------------------- 3 files changed, 19 insertions(+), 43 deletions(-) commit 5992262d59ccbfaa86ea8b10122653429685b3f9 Author: Masaki Ota Date: Fri Oct 6 11:53:16 2017 +0900 HID: alps: remove variables local to u1_init() from the device struct Move dev_ctrl, dev_type, sen_line_num_x, sen_line_num_y, pitch_x, pitch_y, resolution, btn_info from u1_dev structure to "u1_init()", because these variables are only used in there. [jkosina@suse.cz: rewrite changelog] Signed-off-by: Masaki Ota Signed-off-by: Jiri Kosina drivers/hid/hid-alps.c | 67 ++++++++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 40 deletions(-) commit c7083d3f53482e8a2a6ee1238fbedfa7dbea7b3c Author: Masaki Ota Date: Fri Oct 6 11:53:15 2017 +0900 HID: alps: properly handle max_fingers and minimum on X and Y axis Create x_min, y_min and max_fingers variables for set correct XY minimum value and the number of max finger on each devices. [jkosina@suse.cz: update shortlog] Signed-off-by: Masaki Ota Signed-off-by: Jiri Kosina drivers/hid/hid-alps.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) commit 5d8c720d3b74413cc62d5015f23f57a51dc06112 Author: Masaki Ota Date: Fri Oct 6 11:53:14 2017 +0900 HID: alps: Separate U1 device code Create 'static int u1_init()' and factor out U1 device initialization code from main initialization and introduce per-device 'has_sp' flag. [jkosina@suse.cz: rewrite changelog] Signed-off-by: Masaki Ota Signed-off-by: Jiri Kosina drivers/hid/hid-alps.c | 120 +++++++++++++++++++++++++++---------------------- 1 file changed, 67 insertions(+), 53 deletions(-) commit ce6abcf83bf451159f421fe4f928147a882ec9da Author: Masaki Ota Date: Fri Oct 6 11:53:13 2017 +0900 HID: alps: delete unnecessary struct u1_dev devInfo Delete "struct u1_dev devInfo" structure, because u1_dev structure is already declared as "struct u1_dev *data". [jkosina@suse.cz: rewrite changelog] Signed-off-by: Masaki Ota Signed-off-by: Jiri Kosina drivers/hid/hid-alps.c | 69 +++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 35 deletions(-) commit 4006e952cc32114de1f22bc8ae986f6def877176 Author: Linus Walleij Date: Tue Oct 17 11:25:44 2017 +0200 gpio: Cut old SX150X Kconfig option The SX150X driver was moved over to pin control a while back. The GPIO Kconfig symbol creates a circular dependency since it requires GPIOLIB and the pin control driver selects GPIOLIB so get rid of the old annoying Kconfig option. Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 9 --------- 1 file changed, 9 deletions(-) commit a6162afa7135548973ba633c7795db9648fbd4a2 Author: Kees Cook Date: Mon Oct 16 16:07:31 2017 -0700 ALSA: usb-audio: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Takashi Iwai sound/usb/line6/driver.c | 4 ++-- sound/usb/line6/driver.h | 3 +-- sound/usb/line6/pod.c | 11 +++++------ sound/usb/line6/podhd.c | 10 +++++----- sound/usb/line6/toneport.c | 7 +++---- sound/usb/line6/variax.c | 32 ++++++++++++++++---------------- sound/usb/midi.c | 7 +++---- 7 files changed, 35 insertions(+), 39 deletions(-) commit 0011a33f097dd97d09a1ebd32c5d8df0be7ac04a Merge: 4981540 99fee50 Author: Takashi Iwai Date: Tue Oct 17 10:50:59 2017 +0200 Merge branch 'for-linus' into for-next Back-merge for applying the timer API conversion patch for line6 driver that conflicts with the recent fix in upstream. Signed-off-by: Takashi Iwai commit d344f3138a473b99f09041a1e6ece9f3b8953858 Author: Arvind Yadav Date: Mon Oct 9 17:21:07 2017 +0530 thermal/intel_powerclamp: pr_err()/pr_info() strings should end with newlines pr_err()/pr_info() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav Signed-off-by: Zhang Rui drivers/thermal/intel_powerclamp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 023b7b07ccb57317bee4d971be546cc4469f4e7e Author: Arvind Yadav Date: Thu Aug 31 11:30:45 2017 +0530 thermal : Remove const to make same prototype Here, prototype of thermal_zone_device_register is not matching with static inline thermal_zone_device_register. One is using const thermal_zone_params. Other is using non-const. Signed-off-by: Arvind Yadav Signed-off-by: Zhang Rui include/linux/thermal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0fc9b1350a317da22b310d68117b0d01cb9065e Author: Thomas Gleixner Date: Tue Oct 17 08:49:37 2017 +0200 x86/tsc: Make CONFIG_X86_TSC=n build work again tsc_async_resets is only available when CONFIG_X86_TSC=y. So a build with CONFIG_X86_TSC=n breaks: arch/x86/kernel/tsc.o: In function `tsc_init': (.init.text+0x87b): undefined reference to `tsc_async_resets' Add a stub define for the TSC=n case. Side note: This config switch should simply be removed. Reported-by: kbuild test robot Fixes: 341102c3ef29 ("x86/tsc: Add option that TSC on Socket 0 being non-zero is valid") Signed-off-by: Thomas Gleixner Cc: Mike Travis arch/x86/include/asm/tsc.h | 4 ++++ 1 file changed, 4 insertions(+) commit 6a4bc44b012cbc29c9d824be2c7ab9eac8ee6b6f Author: Sven Eckelmann Date: Mon Oct 16 09:31:47 2017 +0200 batman-adv: Avoid spurious warnings from bat_v neigh_cmp implementation The neighbor compare API implementation for B.A.T.M.A.N. V checks whether the neigh_ifinfo for this neighbor on a specific interface exists. A warning is printed when it isn't found. But it is not called inside a lock which would prevent that this information is lost right before batadv_neigh_ifinfo_get. It must therefore be expected that batadv_v_neigh_(cmp|is_sob) might not be able to get the requested neigh_ifinfo. A WARN_ON for such a situation seems not to be appropriate because this will only flood the kernel logs. The warnings must therefore be removed. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bat_v.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 623401ee33e42cee64d333877892be8db02951eb Author: weiping zhang Date: Thu Oct 12 14:57:06 2017 +0800 scsi: sd: change manage_start_stop to bool in sysfs interface /sys/class/scsi_disk/0:2:0:0/manage_start_stop can be changed to 0 unexpectly by writing an invalid string. Signed-off-by: weiping zhang Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 658e9a6dc1126f21fa417cd213e1cdbff8be0ba2 Author: weiping zhang Date: Thu Oct 12 14:56:44 2017 +0800 scsi: sd: change allow_restart to bool in sysfs interface /sys/class/scsi_disk/0:2:0:0/allow_restart can be changed to 0 unexpectedly by writing an invalid string such as the following: echo asdf > /sys/class/scsi_disk/0:2:0:0/allow_restart Signed-off-by: weiping zhang Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a0dbef33863349de5313dff62982d309ded98190 Author: Al Viro Date: Fri Sep 29 13:58:09 2017 -0400 cxlflash: get rid of pointless access_ok() Signed-off-by: Al Viro drivers/scsi/cxlflash/main.c | 6 ------ 1 file changed, 6 deletions(-) commit 0db188f96b69957dec623c10b474d12b8b6038c2 Author: Al Viro Date: Fri Sep 29 13:55:19 2017 -0400 mtdchar: get rid of pointless access_ok() Signed-off-by: Al Viro drivers/mtd/mtdchar.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) commit b8018b973c7cefa5eb386540130fa47315b8e337 Author: Hannes Reinecke Date: Mon Oct 2 16:26:37 2017 +0200 scsi: scsi_devinfo: fixup string compare When checking the model and vendor string we need to use the minimum value of either string, otherwise we'll miss out on wildcard matches. And we should take care when matching with zero size strings; results might be unpredictable. With this patch the rules for matching devinfo strings are as follows: - Vendor strings must match exactly - Empty Model strings will only match if the devinfo model is also empty - Model strings shorter than the devinfo model string will not match Fixes: 5e7ff2c ("SCSI: fix new bug in scsi_dev_info_list string matching") Signed-off-by: Hannes Reinecke Reviewed-by: Alan Stern Reviewed-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_devinfo.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 588c902b338d1d80323711c2bcf35f9a8499c831 Author: Hannes Reinecke Date: Mon Oct 2 16:26:36 2017 +0200 scsi: scsi_devinfo: Whitespace fixes Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_devinfo.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit f26aeada04938b99d6abbae9cd2de4ffa393e5d5 Author: Hannes Reinecke Date: Mon Oct 2 16:26:35 2017 +0200 scsi: scsi_devinfo: Reformat blacklist flags Reformat blacklist flags to make the values easier to read and to enhance error checking. Signed-off-by: Hannes Reinecke Reviewed-by: Bart van Assche Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen include/scsi/scsi_devinfo.h | 76 +++++++++++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 26 deletions(-) commit 345e29608b4bb4b68c6c30667dda02d51484769e Author: Hannes Reinecke Date: Mon Oct 2 16:26:34 2017 +0200 scsi: scsi: Export blacklist flags to sysfs Each scsi device is scanned according to the found blacklist flags, but this information is never presented to sysfs. This makes it quite hard to figure out if blacklisting worked as expected. With this patch we're exporting an additional attribute 'blacklist' containing the blacklist flags for this device. Signed-off-by: Hannes Reinecke Reviewed-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/Makefile | 8 ++++++++ drivers/scsi/scsi_scan.c | 1 + drivers/scsi/scsi_sysfs.c | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) commit e5203cf05282a41642edc55ac504efb8add2b17a Author: Hannes Reinecke Date: Mon Oct 2 16:26:33 2017 +0200 scsi: scsi_debug: allow to specify inquiry vendor and model For testing purposes we need to be able to pass in the inquiry vendor and model. Signed-off-by: Hannes Reinecke Reviewed-by: Bart Van Assche Acked-by: Doug Gilbert Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_debug.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 4a109032e3941413d8a029f619543fc5aec1d26d Author: Damien Le Moal Date: Wed Oct 11 05:54:25 2017 +0900 scsi: sd_zbc: Fix sd_zbc_read_zoned_characteristics() The three values starting at byte 8 of the Zoned Block Device Characteristics VPD page B6h are 32 bits values, not 64bits. So use get_unaligned_be32() to retrieve the values and not get_unaligned_be64() Fixes: 89d947561077 ("sd: Implement support for ZBC devices") Cc: Signed-off-by: Damien Le Moal Reviewed-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sd_zbc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e8c77ec483b0bb3c9e6ee9144b9bcdde340647ca Author: Damien Le Moal Date: Wed Oct 11 05:54:24 2017 +0900 scsi: sd_zbc: Use well defined macros Instead of open coding, use the min() macro to calculate a report zones reply buffer length in sd_zbc_check_zone_size() and the round_up() macro for calculating the number of zones in sd_zbc_setup(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sd_zbc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 5eed92d173e0bf695c690d6b903441bde36879fb Author: Damien Le Moal Date: Wed Oct 11 05:54:23 2017 +0900 scsi: sd_zbc: Rearrange code Rearrange sd_zbc_setup() to include use_16_for_rw and use_10_for_rw assignments and move the calculation of sdkp->zone_shift together with the assignment of the verified zone_blocks value in sd_zbc_check_zone_size(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/sd_zbc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e98f42bcad202a7e89be37be556383b5de0a65d5 Author: Damien Le Moal Date: Wed Oct 11 05:54:22 2017 +0900 scsi: sd_zbc: Fix comments and indentation Fix comments style (use kernel-doc style) and content to clarify some functions. Also fix some functions signature indentation and remove a useless blank line in sd_zbc_read_zones(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/scsi_lib.c | 5 ++- drivers/scsi/sd_zbc.c | 117 +++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 104 insertions(+), 18 deletions(-) commit aa8a84566282ac47bd861c3cc2538e1014228345 Author: Damien Le Moal Date: Wed Oct 11 05:54:21 2017 +0900 scsi: sd_zbc: Move ZBC declarations to scsi_proto.h Move standard macro definitions for the zone types and zone conditions to scsi_proto.h together with the definitions related to the REPORT ZONES command. While at it, define all values in the enums to be clear. Also remove unnecessary includes in sd_zbc.c. No functional change is introduced by this patch. Signed-off-by: Damien Le Moal Reviewed-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/sd_zbc.c | 24 ------------------------ include/scsi/scsi_proto.h | 45 ++++++++++++++++++++++++++++++++++----------- 2 files changed, 34 insertions(+), 35 deletions(-) commit 05231a3bb7981b01f6933c0a847fcaac25622bfd Author: Christoph Hellwig Date: Tue Oct 3 12:48:40 2017 +0200 scsi: qla2xxx: don't break the bsg-lib abstractions Always use bsg_job->reply instead of scsi_req(bsg_job->req)->sense), as they always point to the same memory. Never set scsi_req(bsg_job->req)->result and we'll set that value through bsg_job_done. [mkp: applied by hand, fixed whitespace] Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Himanshu Madhani Tested-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_bsg.c | 10 ++++------ drivers/scsi/qla2xxx/qla_isr.c | 12 +++--------- drivers/scsi/qla2xxx/qla_mr.c | 3 +-- 3 files changed, 8 insertions(+), 17 deletions(-) commit 07f5d563c6e52068cbfcd97ed79f5bb1b1d33067 Author: Christoph Hellwig Date: Tue Oct 3 12:48:41 2017 +0200 scsi: scsi_transport_sas: check reply payload length instead of bidi request As a user of bsg-lib the SAS transport should not poke into request internals but use the bsg_job fields instead. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_transport_sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67ec299bb543b0c15c9d13a1ed85a2b4b9a36d92 Author: Christoph Hellwig Date: Tue Oct 3 12:48:39 2017 +0200 scsi: libfc: don't assign resid_len in fc_lport_bsg_request bsg_job_done takes care of updating the scsi_request structure fields. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/libfc/fc_lport.c | 3 --- 1 file changed, 3 deletions(-) commit b8d897ab663f499774bb250db9880139a3b0a229 Author: Christoph Hellwig Date: Tue Oct 3 12:48:38 2017 +0200 scsi: bfa: don't reset max_segments for every bsg request We already support 256 or more segments as long as the architecture supports SG chaining (all the ones that matter do), so removed the weird playing with limits from the job handler. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/bfa/bfad_bsg.c | 7 ------- 1 file changed, 7 deletions(-) commit 8712f467d4a560e03ede0d5a0316407db8882729 Author: Christos Gkekas Date: Sat Oct 14 13:17:58 2017 +0100 scsi: qedi: Delete redundant variables Remove redundant variables in quedi_fw.c that are set but not used. Signed-off-by: Christos Gkekas Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/qedi/qedi_fw.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit 2d57b5efda511886daa984d5bb3da29759bb157c Author: Giridhar Malavali Date: Fri Oct 13 15:43:23 2017 -0700 scsi: qla2xxx: Query FC4 type during RSCN processing Based on the FC4 type, login will proceed to either FCP or FC-NVMe remote ports. Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c38d1baff87ffaa0c5966b57c5cfa906b58ce9e6 Author: Himanshu Madhani Date: Fri Oct 13 15:43:22 2017 -0700 scsi: qla2xxx: Use ql2xnvmeenable to enable Q-Pair for FC-NVMe In some environments, user can choose to not enable SCSI-MQ but wants to use FC-NVMe feature of the driver. Since driver relies on Q-Pairs to allocate FC-NVMe resources, use existing module parameter to create Q-Pairs when FC-NVMe is enabled. Signed-off-by: Himanshu Madhani Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_isr.c | 2 +- drivers/scsi/qla2xxx/qla_mid.c | 2 +- drivers/scsi/qla2xxx/qla_os.c | 27 ++++++++++++++++++--------- 4 files changed, 21 insertions(+), 12 deletions(-) commit 4ca8204781bc2326c091a1b4dec6d4e4c63a5e30 Author: Himanshu Madhani Date: Fri Oct 13 09:34:07 2017 -0700 scsi: qla2xxx: Update driver version to 10.00.00.02-k Signed-off-by: Himanshu Madhani Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edd05de1975927b51b4e8e1135ef4d6130dfd17c Author: Duane Grigsby Date: Fri Oct 13 09:34:06 2017 -0700 scsi: qla2xxx: Changes to support N2N logins If we discovered a topology that is N2N then we will issue a login to the target. If our WWPN is bigger than the target's WWPN then we will initiate login, otherwise we will just wait for the target to initiate login. [mkp: many whitespace errors] Signed-off-by: Duane Grigsby Signed-off-by: Michael Hernandez Signed-off-by: Himanshu Madhani Reviewed-by: Johannes Thumshirn Tested-by: Ewan D. Milne Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 24 +++++ drivers/scsi/qla2xxx/qla_fw.h | 4 +- drivers/scsi/qla2xxx/qla_gbl.h | 4 + drivers/scsi/qla2xxx/qla_init.c | 135 +++++++++++++++++++++++++++- drivers/scsi/qla2xxx/qla_iocb.c | 195 +++++++++++++++++++++++++++++++++++++--- drivers/scsi/qla2xxx/qla_isr.c | 42 ++++++++- drivers/scsi/qla2xxx/qla_mbx.c | 76 ++++++++++++++++ 7 files changed, 459 insertions(+), 21 deletions(-) commit c0c462c8a061658ce5ae53c423b2a14bb280c2ab Author: Duane Grigsby Date: Fri Oct 13 09:34:05 2017 -0700 scsi: qla2xxx: Allow MBC_GET_PORT_DATABASE to query and save the port states The MBC_GET_PORT_DATABASE command normally checks the port state information. This patch allows it to save that info in the fcport structure and ignore the check if the query flag is set. [mkp: typo] Signed-off-by: Duane Grigsby Signed-off-by: Himanshu Madhani Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 4 ++++ drivers/scsi/qla2xxx/qla_mbx.c | 29 ++++++++++++++++++++++------- 2 files changed, 26 insertions(+), 7 deletions(-) commit c955886962a280eb90b6bde87448ee99c467c0b3 Author: Himanshu Madhani Date: Fri Oct 13 09:34:04 2017 -0700 scsi: qla2xxx: Add ATIO-Q processing for INTx mode Signed-off-by: Himanshu Madhani Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_def.h | 1 + drivers/scsi/qla2xxx/qla_isr.c | 8 ++++++-- drivers/scsi/qla2xxx/qla_target.c | 12 +++++++++--- 3 files changed, 16 insertions(+), 5 deletions(-) commit e7240af5108fc8b068b1b21988e48f0c5005cae6 Author: Himanshu Madhani Date: Fri Oct 13 09:34:03 2017 -0700 scsi: qla2xxx: Reinstate module parameter ql2xenablemsix [mkp: fixed whitespace] Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_gbl.h | 1 + drivers/scsi/qla2xxx/qla_isr.c | 9 ++++++--- drivers/scsi/qla2xxx/qla_os.c | 9 +++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) commit 41319e4f62f28aeb36ad6b51a58cec5e76884ebb Author: Dan Carpenter Date: Thu Oct 12 23:30:57 2017 +0300 scsi: lpfc: Fix a precedence bug in lpfc_nvme_io_cmd_wqe_cmpl() The ! has higher precedence than the & operation. I've added parenthesis so this works as intended. Fixes: 952c303b329c ("scsi: lpfc: Ensure io aborts interlocked with the target.") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4efea4f60cdbae9d3ff612454c2cd9f4790c2344 Author: Colin Ian King Date: Thu Oct 5 13:01:53 2017 +0100 scsi: aic7xxx: make a couple of functions static Functions ahc_devlimited_syncrate and ahc_linux_initialize_scsi_bus are declared static in their prototypes but are missing in their definitions, so add the missing static. Cleans up sparse warnings: symbol 'ahc_devlimited_syncrate' was not declared. Should it be static? symbol 'ahc_linux_initialize_scsi_bus' was not declared. Should it be static? Signed-off-by: Colin Ian King Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/aic7xxx/aic7xxx_core.c | 2 +- drivers/scsi/aic7xxx/aic7xxx_osm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 287f79653aebfd92a3d30393ef3ca556ec92b84b Author: Arnd Bergmann Date: Tue Sep 5 09:51:29 2017 +0200 scsi: nsp32: fix logic bug in error handling gcc-8 points out a logic error that has existed since the start of the git history: drivers/scsi/nsp32.c: In function 'nsp32_selection_autoscsi': drivers/scsi/nsp32.c:607:27: error: bitwise comparison always evaluates to false [-Werror=tautological-compare] if(((phase & BUSMON_BSY) == 1) || (phase & BUSMON_SEL) == 1) { ^~ Presumably the author intended to check if one of two bits was set, so that's what I'm changing the code to. This will obviously change the behavior of the code, hopefully to do the right thing, but I have not tested this or checked if the new "(phase & BUSMON_BSY) || (phase & BUSMON_SEL)" condition should indeed be treated as a fatal error. Signed-off-by: Arnd Bergmann Acked-by: GOTO Masanori Signed-off-by: Martin K. Petersen drivers/scsi/nsp32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3e351275655d3c84dc28abf170def9786db5176d Author: Dan Carpenter Date: Wed Oct 4 10:50:37 2017 +0300 scsi: bfa: integer overflow in debugfs We could allocate less memory than intended because we do: bfad->regdata = kzalloc(len << 2, GFP_KERNEL); The shift can overflow leading to a crash. This is debugfs code so the impact is very small. I fixed the network version of this in March with commit 13e2d5187f6b ("bna: integer overflow bug in debugfs"). Fixes: ab2a9ba189e8 ("[SCSI] bfa: add debugfs support") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen drivers/scsi/bfa/bfad_debugfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a0e764c54382be8da96f83bcecc9cf26de3846dc Author: Colin Ian King Date: Wed Oct 11 11:46:54 2017 +0100 md: raid10: remove a couple of redundant variables and initializations Variables dev and bio_last_sector are assigned values that are never read and hence these are redundant variables and can be removed. Also remove the duplicated initialization of sectors, the latter assignment is identical to the first and can be removed. Cleans up 3 clang build warnings: Value stored to 'dev' is never read Value stored to 'bio_last_sector' is never read Value stored to 'sectors' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Shaohua Li drivers/md/raid10.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 935fe0983e09f4f7331ebf5ea4ae2124f6e9f9e8 Author: Mike Snitzer Date: Tue Oct 10 17:02:41 2017 -0400 md: rename some drivers/md/ files to have an "md-" prefix Motivated by the desire to illiminate the imprecise nature of DM-specific patches being unnecessarily sent to both the MD maintainer and mailing-list. Which is born out of the fact that DM files also reside in drivers/md/ Now all MD-specific files in drivers/md/ start with either "raid" or "md-" and the MAINTAINERS file has been updated accordingly. Shaohua: don't change module name Signed-off-by: Mike Snitzer Signed-off-by: Shaohua Li MAINTAINERS | 7 +- drivers/md/Makefile | 5 +- drivers/md/bitmap.c | 2591 --------------------------------------------- drivers/md/bitmap.h | 277 ----- drivers/md/dm-raid.c | 2 +- drivers/md/faulty.c | 372 ------- drivers/md/linear.c | 348 ------ drivers/md/linear.h | 16 - drivers/md/md-bitmap.c | 2591 +++++++++++++++++++++++++++++++++++++++++++++ drivers/md/md-bitmap.h | 277 +++++ drivers/md/md-cluster.c | 2 +- drivers/md/md-faulty.c | 372 +++++++ drivers/md/md-linear.c | 348 ++++++ drivers/md/md-linear.h | 16 + drivers/md/md-multipath.c | 509 +++++++++ drivers/md/md-multipath.h | 31 + drivers/md/md.c | 2 +- drivers/md/multipath.c | 509 --------- drivers/md/multipath.h | 31 - drivers/md/raid1.c | 2 +- drivers/md/raid10.c | 2 +- drivers/md/raid5-cache.c | 2 +- drivers/md/raid5.c | 2 +- 23 files changed, 4161 insertions(+), 4153 deletions(-) commit 584ed9fa9532f8b9d5955628ff87ee3b2ab9f5a9 Author: Matthias Kaehlcke Date: Thu Oct 5 11:28:47 2017 -0700 md: raid10: remove VLAIS The raid10 driver can't be built with clang since it uses a variable length array in a structure (VLAIS): drivers/md/raid10.c:4583:17: error: fields must have a constant size: 'variable length array in structure' extension will never be supported Allocate the r10bio struct with kmalloc instead of using the VLAIS construct. Shaohua: set the MD_RECOVERY_INTR bit Neil Brown: use GFP_NOIO Signed-off-by: Matthias Kaehlcke Reviewed-by: Guenter Roeck Signed-off-by: Shaohua Li drivers/md/raid10.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 7a57157aeb157cd02ccdcff237bbf63440035b07 Author: Colin Ian King Date: Tue Oct 3 10:51:17 2017 +0100 md-cluster: make function cluster_check_sync_size static The function cluster_check_sync_size is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'cluster_check_sync_size' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Shaohua Li drivers/md/md-cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07719ff767dcd8cc42050f185d332052f3816546 Author: Artur Paszkiewicz Date: Fri Sep 29 22:54:19 2017 +0200 raid5-ppl: check recovery_offset when performing ppl recovery If starting an array that is undergoing rebuild, make ppl recovery honor the recovery_offset of a member disk and don't read data that is not yet in-sync. Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li drivers/md/raid5-ppl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 611426e2737235cf05e1b8f27d2502b96a5e05d9 Author: Artur Paszkiewicz Date: Fri Sep 29 22:54:18 2017 +0200 raid5-ppl: don't resync after rebuild The check for degraded array is unnecessary and causes a resync to be performed after ppl recovery and rebuild when restarting an array during rebuilding after unclean shutdown. Signed-off-by: Artur Paszkiewicz Signed-off-by: Shaohua Li drivers/md/raid5-ppl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 385f4d7f946b08f36f68b0a28e95a319925b6b62 Author: Guoqing Jiang Date: Fri Sep 29 09:16:43 2017 +0800 md-cluster: fix wrong condition check in raid1_write_request The check used here is to avoid conflict between write and resync, however we used the wrong logic, it should be the inverse of the checking inside "if". Fixes: 589a1c4 ("Suspend writes in RAID1 if within range") Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/raid1.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 938b533d479e7428b7fa1b8179283646d2e2c53d Author: Shaohua Li Date: Mon Oct 16 19:03:44 2017 -0700 md/bitmap: revert a patch This reverts commit 8031c3ddc70a. That patches doesn't work well if PAGE_SIZE > 4k. We will fix the original problem with a different approach. Fix: 8031c3ddc70a(md/bitmap: copy correct data for bitmap super) Reported-by: Joshua Kinard Cc: stable@vger.kernel.org (4.10+) Suggested-by: Neil Brown Signed-off-by: Shaohua Li drivers/md/bitmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2a0b4d858f7bb3d36d0ca610d9ef02062589edeb Author: Martin Tsai Date: Thu Sep 7 13:02:05 2017 +0800 drm/amd/display: To prevent detecting new sink from spurious HPD Signed-off-by: Martin Tsai Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 48 +++++++++++++++++++-------- 1 file changed, 34 insertions(+), 14 deletions(-) commit 40d86701a625eed9e644281b9af228d6a52d8ed9 Author: Dave Airlie Date: Fri Oct 13 00:52:01 2017 +0100 drm/plane: drop num_overlay_planes (v3) In order to implement plane leasing we need to count things, just make the code consistent with the counting code currently used for counting crtcs/encoders/connectors and drop the need for num_overlay_planes. v2: don't forget to assign plane_ptr. (keithp) v3: use correct bounds check, found by igt. Reviewed-by: Daniel Vetter Reviewed-by: Sean Paul Signed-off-by: Dave Airlie drivers/gpu/drm/drm_mode_config.c | 1 - drivers/gpu/drm/drm_plane.c | 46 ++++++++++++++------------------------- include/drm/drm_mode_config.h | 13 ----------- 3 files changed, 16 insertions(+), 44 deletions(-) commit bd21a37d41c3b3088aeae59f54fd82de0ddb6fdd Merge: d7205d5 6c94804 Author: Dave Airlie Date: Tue Oct 17 10:45:05 2017 +1000 Merge remote-tracking branch 'pfdo/drm-next' into drm-next Pull in drm-next for the object find API changes. Fix the one place the API crashes. Signed-off-by: Dave Airlie commit d7205d5c0f2b09d900231de9026b97105c37d343 Author: Alex Deucher Date: Wed Oct 11 12:44:13 2017 -0400 drm/amd/display: drop unused dm_delay_in_microseconds No longer used. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 7 ------- 1 file changed, 7 deletions(-) commit 4770b18493b3d9fe1f8913e69ec5134b103d5788 Author: Alex Deucher Date: Wed Oct 11 12:42:30 2017 -0400 drm/amd/display/dc: drop dm_delay_in_microseconds Use udelay directly. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dm_services.h | 3 --- 3 files changed, 4 insertions(+), 7 deletions(-) commit 8db02ca3410b0668d520c0c5d7ba0e7e3eaa811a Author: Alex Deucher Date: Wed Oct 11 10:03:10 2017 -0400 drm/amd/display: make amdgpu_dm_irq_handler static It's not used outside the file. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 6 +++--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.h | 9 --------- 2 files changed, 3 insertions(+), 12 deletions(-) commit f1548455ce89cbb7708428f6a7989a3fe180ed55 Author: Alex Deucher Date: Wed Oct 11 09:59:50 2017 -0400 drm/amd/display: remove unused functions in amdgpu_dm_irq.c Not used. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 62 ---------------------- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.h | 5 -- 2 files changed, 67 deletions(-) commit e637525659ed04be89a7f79ccf6e94e1e5e40225 Author: Alex Deucher Date: Wed Oct 11 09:53:16 2017 -0400 drm/amd/display: whitespace cleanup in amdgpu_dm_irq.c/h To match kernel standards. No intended functional change. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 111 +++++++++------------ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.h | 38 +++---- 2 files changed, 64 insertions(+), 85 deletions(-) commit 6563617fbbbe273be4ce99f15000a63eca789d6a Author: Alex Deucher Date: Wed Oct 11 09:47:04 2017 -0400 drm/amd/display: make log_dpcd static It's only used in this file. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit aaa6346d75e2eaee715f36dd3b88a2a865663235 Author: Alex Deucher Date: Wed Oct 11 09:44:50 2017 -0400 drm/amd/display: whitespace cleanup in amdgpu_dm_mst_types.c/h To match kernel standards. No intended functional change. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 39 +++++++++++----------- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.h | 5 ++- 2 files changed, 22 insertions(+), 22 deletions(-) commit 8ceb1cab8ec4d0beeac42714e27eb681f0afdd1d Author: Alex Deucher Date: Tue Oct 10 18:33:14 2017 -0400 drm/amd/display: drop unused functions in amdgpu_dm_services.c not used. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 53 ---------------------- 1 file changed, 53 deletions(-) commit b4133c09e47afe4c2a5485eb33c7cf456ce0241f Author: Alex Deucher Date: Tue Oct 10 17:53:24 2017 -0400 drm/amd/display: drop unused functions in amdgpu_dm.c Not used anywhere. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 82 ----------------------- 1 file changed, 82 deletions(-) commit 7578ecda14d521f39e74166103270c62b15af96d Author: Alex Deucher Date: Tue Oct 10 17:51:02 2017 -0400 drm/amd/display: make a bunch of stuff in amdgpu_dm.c static Not used outside of that file. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 136 +++++++++++++++------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 59 ---------- 2 files changed, 91 insertions(+), 104 deletions(-) commit 3ee6b26b78e47825032726f807beb70be86ea20a Author: Alex Deucher Date: Tue Oct 10 17:44:52 2017 -0400 drm/amd/display: whitespace cleanup in amdgpu_dm.c/h To match kernel standards. No intended functional change. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 330 ++++++++++------------ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 91 +++--- 2 files changed, 192 insertions(+), 229 deletions(-) commit 1daf8c63480b35b967a63a40457c1b0ad866ee81 Author: Alex Deucher Date: Fri Oct 13 14:04:26 2017 -0400 drm/amd/display: fix typo in function name s/amdgpu_dm_find_first_crct_matching_connector/ amdgpu_dm_find_first_crtc_matching_connector/ And while here, make it static. Reviewed-by: Harry Wentland Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 +++++----- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 5 ----- 2 files changed, 5 insertions(+), 10 deletions(-) commit 5cc6dcbd45a60be4800cd5cc9a30bcc2e158e6a1 Author: Leo (Sunpeng) Li Date: Thu Oct 12 17:15:11 2017 -0400 drm/amd/display: Remove useless pcrtc pointer in amdgpu_dm_atomic_commit_tail. Just use crtc instead. Reviewed-by: Maarten Lankhorst Reviewed-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Leo (Sunpeng) Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ebdd27e1a5440cb3f30952d105eb08cadafc431d Author: Leo (Sunpeng) Li Date: Thu Oct 12 17:15:10 2017 -0400 drm/amd/display: Fix typo undersacn -> underscan Reviewed-by: Maarten Lankhorst Reviewed-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Leo (Sunpeng) Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 54d76575246798f5f42ca56fe5d54d1f195198b2 Author: Leo (Sunpeng) Li Date: Thu Oct 12 17:15:09 2017 -0400 drm/amd/display: Unify amdgpu_dm state variable namings. Use dm_new_*_state and dm_old_*_state for their respective amdgpu_dm new and old object states. Helps with readability, and enforces use of new DRM api (choose either new, or old). Reviewed-by: Maarten Lankhorst Reviewed-by: Harry Wentland Signed-off-by: Leo (Sunpeng) Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 137 +++++++++++----------- 1 file changed, 68 insertions(+), 69 deletions(-) commit c2cea7063b85fc2bcec92997a808f1d3a16f8052 Author: Leo (Sunpeng) Li Date: Thu Oct 12 17:15:08 2017 -0400 drm/amd/display: Unify DRM state variable namings. Use new_*_state and old_*_state for their respective new/old DRM object states. Reviewed-by: Maarten Lankhorst Reviewed-by: Harry Wentland Signed-off-by: Leo (Sunpeng) Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 80 +++++++++++------------ 1 file changed, 40 insertions(+), 40 deletions(-) commit 0bc9706db3a35b6d674d0642f425d768560736b2 Author: Leo (Sunpeng) Li Date: Thu Oct 12 17:15:07 2017 -0400 drm/amd/display: Use new DRM API where possible To conform to DRM's new API, we should not be accessing a DRM object's internal state directly. Rather, the DRM for_each_old/new_* iterators, and drm_atomic_get_old/new_* interface should be used. This is an ongoing process. For now, update the DRM-facing atomic functions, where the atomic state object is given. Reviewed-by: Harry Wentland Reviewed-by: Maarten Lankhorst Signed-off-by: Leo (Sunpeng) Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 131 +++++++++++----------- 1 file changed, 66 insertions(+), 65 deletions(-) commit 9ba29fcb76a559078491adffc74f66bf92b9dbea Author: Dave Airlie Date: Mon Oct 9 10:33:04 2017 +1000 drm/amd/display: Use DRM new-style object iterators. Use the correct for_each_new/old_* iterators instead of for_each_* The following functions were considered: amdgpu_dm_find_first_crtc_matching_connector: use for_each_new - Old from_state_var flag was always choosing the new state amdgpu_dm_display_resume: use for_each_new - drm_atomic_helper_duplicate_state is called during suspend to cache the state - It sets 'state' within the state triplet to 'new_state' amdgpu_dm_commit_planes: use for_each_old - Called after the state was swapped (via atomic commit tail) amdgpu_dm_atomic_commit: use for_each_new - Called before the state is swapped amdgpu_dm_atomic_commit_tail: use for_each_old - Called after the state was swapped dm_update_crtcs_state: use for_each_new - Called before the state is swapped (via atomic check) amdgpu_dm_atomic_check: use for_each_new - Called before the state is swapped v2: Split out typo fixes to a new patch. v3: Say "functions considered" instead of "affected functions". The latter implies that changes are made to each. [airlied: squashed with my hacks] Reviewed-by: Harry Wentland Reviewed-by: Maarten Lankhorst Signed-off-by: Leo (Sunpeng) Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 42 +++++++++-------------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 3 +- 2 files changed, 17 insertions(+), 28 deletions(-) commit f8d4710458a7e22fa4df2e8b1358c17b985ef86c Merge: 6c94804 44cd393 Author: Dave Airlie Date: Tue Oct 17 10:13:47 2017 +1000 Merge tag 'tilcdc-4.15' of https://github.com/jsarha/linux into drm-next tilcdc changes for v4.15 * tag 'tilcdc-4.15' of https://github.com/jsarha/linux: drm/tilcdc: Remove redundant OF_DETACHED flag setting drm/tilcdc: Precalculate total frametime in tilcdc_crtc_set_mode() drm/tilcdc: Use tilcdc_crtc_shutdown() in tilcdc_crtc_destroy() drm/tilcdc: Remove WARN_ON(!drm_modeset_is_locked(&crtc->mutex)) checks drm/tilcdc: Turn raster off in crtc reset, if it was on in the HW drm/tilcdc: switch to drm_*{get,put} helpers drm/tilcdc: tilcdc_tfp410: make of_device_ids const. drm/tilcdc: tilcdc_panel: make of_device_ids const. commit 6c94804fde4415f3938778155d8e665e6870a46d Merge: 787e1b7 2e20c9d Author: Dave Airlie Date: Tue Oct 17 10:10:17 2017 +1000 Merge tag 'drm-misc-next-2017-10-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Quick 4.15 misc pull for the build fix: Cross-subsystem Changes: - piles an piles of misc/trivial patches all over, some more from outreachy applicants Core Changes: - build fix for the bridge/of cleanup (Maarten) - fix vblank count in arm_vblank_event (Ville) - some kerneldoc typo fixes from Thierry Driver Changes: - vc4: Fix T-format tiling scanout, cleanup clock divider w/a (Anholt) - sun4i: small cleanups and improved code comments all over (Chen-Yu Tsai) * tag 'drm-misc-next-2017-10-16' of git://anongit.freedesktop.org/drm/drm-misc: (21 commits) drm/via: use ARRAY_SIZE drm/gma500: use ARRAY_SIZE drm/sun4i: hdmi: Move PAD_CTRL1 setting to mode_set function drm/sun4i: hdmi: Document PAD_CTRL1 output invert bits drm/sun4i: backend: Add comment explaining why registers are cleared drm/sun4i: backend: Use drm_fb_cma_get_gem_addr() to get display memory drm/sun4i: backend: Create regmap after access is possible drm/sun4i: don't add components that are already in the queue drm/vc4: Fix pitch setup for T-format scanout. drm/vc4: Move the DSI clock divider workaround closer to the clock call. drm: Replace kzalloc with kcalloc drm/tinydrm: Remove explicit .best_encoder assignment drm/tinydrm: Replace dev_error with DRM_DEV_ERROR drm/drm_of: Move drm_of_panel_bridge_remove_function into header. drm/atomic-helper: Fix reference to drm_crtc_send_vblank_event() drm/atomic-helper: Fix typo drm: Add missing __user annotation to drm_syncobj_array_find() drm/rockchip: add PINCTRL dependency for LVDS drm/kirin: Checking for IS_ERR() instead of NULL driver:gpu: return -ENOMEM on allocation failure. ... commit 7571358dd22dc91dea560f0dde62ce23c033b6b6 Author: Sakari Ailus Date: Mon Sep 18 01:20:59 2017 -0700 media: dt: bindings: media: Document data lane numbering without lane reordering Most devices do not support lane reordering and in many cases the documentation of the data-lanes property is incomplete for such devices. Document that in case the lane reordering isn't supported, monotonically incremented values from 0 or 1 shall be used. Signed-off-by: Sakari Ailus Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/video-interfaces.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a197c7fccc0d8958ff73e323dcb1985c19d8166f Author: Sakari Ailus Date: Mon Sep 18 01:15:53 2017 -0700 media: dt: bindings: media: Document practices for DT bindings, ports, endpoints Port and endpoint numbering has been omitted in DT binding documentation for a large number of devices. Also common properties the device uses have been missed in binding documentation. Make it explicit that these things need to be documented. Signed-off-by: Sakari Ailus Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/video-interfaces.txt | 9 +++++++++ 1 file changed, 9 insertions(+) commit 4449dd0a397536d12c52b599353341135d44b6d0 Author: Markus Elfring Date: Fri Sep 8 13:37:00 2017 -0700 media: s5p-mfc: Adjust a null pointer check in four functions The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written... Thus fix the affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d7f15bde0f25ee8a5ea3aad96522ba851a47a0b0 Author: Markus Elfring Date: Fri Sep 8 13:30:09 2017 -0700 media: s5p-mfc: Improve a size determination in s5p_mfc_alloc_memdev() 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. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 614ee07acfbb55f2debfc3223ffae97fee17ed14 Author: Rodrigo Vivi Date: Tue Oct 3 15:08:59 2017 -0700 drm/i915/cnl: Fix PLL initialization for HDMI. HDMI Mode selection on CNL is on CFGCR0 for that PLL, not on in a global CTRL1 as it was on SKL. The original patch addressed this difference, but leaving behind this single entry here. So we were checking the wrong bits during the PLL initialization and consequently avoiding the CFGCR1 setup during HDMI initialization. Luckly when only HDMI was in use BIOS had already setup this for us. But the dual display with hot plug were messed up. Fixes: a927c927de34 ("drm/i915/cnl: Initialize PLLs") Cc: Paulo Zanoni Cc: Manasi Navare Cc: Kahola, Mika Signed-off-by: Rodrigo Vivi Reviewed-by: James Ausmus Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20171003220859.21352-3-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_dpll_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87145d95c3d8297fb74762bd92e022d7f5cc250c Author: Rodrigo Vivi Date: Tue Oct 3 15:08:58 2017 -0700 drm/i915/cnl: Fix PLL mapping. On PLL Enable sequence we need to "Configure DPCLKA_CFGCR0 to turn on the clock for the DDI and map the DPLL to the DDI" So we first do the map and then we unset DDI_CLK_OFF to turn the clock on. We do this in 2 separated steps. However, on this second step where we should only unset the off bit we are also unmapping the ddi from the pll. So we end up using the pll 0 for almost everything. Consequently breaking cases with more than one display. Fixes: 555e38d27317 ("drm/i915/cnl: DDI - PLL mapping") Cc: Paulo Zanoni Cc: Manasi Navare Cc: Kahola, Mika Signed-off-by: Rodrigo Vivi Reviewed-by: James Ausmus Link: https://patchwork.freedesktop.org/patch/msgid/20171003220859.21352-2-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_ddi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f6cd32328965232ab1af4fd768999e6a0e351b81 Author: Markus Elfring Date: Fri Sep 8 13:25:17 2017 -0700 media: s5p-mfc: Delete an error message for a failed memory allocation Omit an extra message for a memory allocation failure in s5p_mfc_probe() function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/s5p-mfc/s5p_mfc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a2640560a0e006d037918522f5f33d0aa800680c Author: Hoegeun Kwon Date: Wed Sep 13 04:41:55 2017 -0700 media: exynos-gsc: Add hardware rotation limits The hardware rotation limits of gsc depends on SOC (Exynos 5250/5420/5433). Distinguish them and add them to the driver data. [s.nawrocki@samsung.com: corrected num_entities in 5420 variant data] Signed-off-by: Hoegeun Kwon Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/exynos-gsc/gsc-core.c | 127 +++++++++++++++++++++++++-- 1 file changed, 122 insertions(+), 5 deletions(-) commit defc3a47c53d54e933ecb923c064c36be4cf70e6 Author: Hoegeun Kwon Date: Wed Sep 13 04:41:52 2017 -0700 media: exynos-gsc: Add compatible for Exynos 5250 and 5420 SoC version Exynos 5250 and 5420 have different hardware rotation limits. Since we have to distinguish between these two, we add different compatible: samsung,exynos5250-gsc and samsung,exynos5420-gsc. Signed-off-by: Hoegeun Kwon Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab Documentation/devicetree/bindings/media/exynos5-gsc.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 1c860c789f23274c2f4c2fa4577765795fb85139 Author: Jacob Chen Date: Wed Oct 11 20:33:09 2017 -0700 [media] MAINTAINERS: add entry for Rockchip RGA driver Add MAINTAINERS entry for the rockchip RGA driver. Signed-off-by: Jacob Chen [hans.verkuil@cisco.com: added commit message] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit ec8df85f312e299e6d92f7cc3446e67e510ccafb Author: Mauro Carvalho Chehab Date: Mon Oct 16 16:26:04 2017 -0700 media: rga: make some functions static drivers/media/platform/rockchip/rga/rga-hw.c:383:6: warning: no previous prototype for 'rga_cmd_set' [-Wmissing-prototypes] void rga_cmd_set(struct rga_ctx *ctx) ^~~~~~~~~~~ drivers/media/platform/rockchip/rga/rga.c:359:17: warning: no previous prototype for 'rga_fmt_find' [-Wmissing-prototypes] struct rga_fmt *rga_fmt_find(struct v4l2_format *f) ^~~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rockchip/rga/rga-hw.c | 2 +- drivers/media/platform/rockchip/rga/rga.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit f7e7b48e6d796da85d99b318def20d9313ef61df Author: Jacob Chen Date: Wed Oct 11 00:29:35 2017 -0700 [media] rockchip/rga: v4l2 m2m support Rockchip RGA is a separate 2D raster graphic acceleration unit. It accelerates 2D graphics operations, such as point/line drawing, image scaling, rotation, BitBLT, alpha blending and image blur/sharpness The driver supports various operations from the rendering pipeline. - copy - fast solid color fill - rotation - flip - alpha blending The code in rga-hw.c is used to configure regs according to operations The code in rga-buf.c is used to create private mmu table for RGA. Signed-off-by: Jacob Chen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 15 + drivers/media/platform/Makefile | 2 + drivers/media/platform/rockchip/rga/Makefile | 3 + drivers/media/platform/rockchip/rga/rga-buf.c | 154 ++++ drivers/media/platform/rockchip/rga/rga-hw.c | 421 ++++++++++ drivers/media/platform/rockchip/rga/rga-hw.h | 437 +++++++++++ drivers/media/platform/rockchip/rga/rga.c | 1012 +++++++++++++++++++++++++ drivers/media/platform/rockchip/rga/rga.h | 125 +++ 8 files changed, 2169 insertions(+) commit 7ef3b44ceafb5456b7e43e2bd96e22bb696806c9 Author: Jacob Chen Date: Wed Oct 11 00:29:34 2017 -0700 [media] dt-bindings: Document the Rockchip RGA bindings Add DT bindings documentation for Rockchip RGA Signed-off-by: Jacob Chen Signed-off-by: Yakir Yang Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/rockchip-rga.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 5794ed762ac2125299644494766704da94168ec0 Author: Colin Ian King Date: Sat Oct 14 16:38:56 2017 +0100 selinux: remove extraneous initialization of slots_used and max_chain_len Variables slots_used and max_chain_len are being initialized to zero twice. Remove the second set of initializations in the for loop. Cleans up the clang warnings: Value stored to 'slots_used' is never read Value stored to 'max_chain_len' is never read Signed-off-by: Colin Ian King Signed-off-by: Paul Moore security/selinux/ss/hashtab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73e4977873bfbd8698d5b116ba32d48f2a889276 Author: Colin Ian King Date: Sat Oct 14 16:00:49 2017 +0100 selinux: remove redundant assignment to len The variable len is being set to zero and this value is never being read since len is being set to a different value just a few lines later. Remove this redundant assignment. Cleans up clang warning: Value stored to 'len' is never read Signed-off-by: Colin Ian King Signed-off-by: Paul Moore security/selinux/ss/conditional.c | 1 - 1 file changed, 1 deletion(-) commit add24372141855b057bf53982824c5fe50898957 Author: Colin Ian King Date: Sat Oct 14 13:46:55 2017 +0100 selinux: remove redundant assignment to str str is being assigned to an empty string but str is never being read after that, so the assignment is redundant and can be removed. Moving the declaration of str to a more localised block, cleans up clang warning: "Value stored to 'str' is never read" Signed-off-by: Colin Ian King Signed-off-by: Paul Moore security/selinux/hooks.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cbe25ce37d6c2623b5ac09128987e98848a54c6c Author: Rafael J. Wysocki Date: Sat Oct 14 17:43:15 2017 +0200 ACPI / PM: Combine device suspend routines On top of a previous change getting rid of the PM QoS flag PM_QOS_FLAG_REMOTE_WAKEUP, combine two ACPI device suspend routines, acpi_dev_runtime_suspend() and acpi_dev_suspend_late(), into one, acpi_dev_suspend(), to eliminate some code duplication. It also avoids enabling wakeup for devices handled by the ACPI LPSS middle layer on driver removal. Signed-off-by: Rafael J. Wysocki Reviewed-by: Ulf Hansson drivers/acpi/acpi_lpss.c | 6 ++--- drivers/acpi/device_pm.c | 61 +++++++++++------------------------------------- include/linux/acpi.h | 3 +-- 3 files changed, 18 insertions(+), 52 deletions(-) commit 048f35ff26a6c1b7297b43ec4376d9fa1872b4a9 Merge: eeb2d80 20f97ca Author: Rafael J. Wysocki Date: Tue Oct 17 00:29:58 2017 +0200 Merge branch 'pm-qos' into acpi-pm commit b3a88803ac5b4bda26017b485c8722a8487fefb7 Author: Peter Zijlstra Date: Wed Oct 11 09:45:32 2017 +0200 ftrace: Kill FTRACE_OPS_FL_PER_CPU The one and only user of FTRACE_OPS_FL_PER_CPU is gone, remove the lot. Link: http://lkml.kernel.org/r/20171011080224.372422809@infradead.org Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 83 +++++++++----------------------------------------- kernel/trace/ftrace.c | 55 ++++----------------------------- 2 files changed, 20 insertions(+), 118 deletions(-) commit 1dd311e6dcda4020c603bcf9f390a577d439d509 Author: Peter Zijlstra Date: Wed Oct 11 09:45:31 2017 +0200 perf/ftrace: Small cleanup ops->flags _should_ be 0 at this point, so setting the flag using bitwise or is a bit daft. Link: http://lkml.kernel.org/r/20171011080224.315585202@infradead.org Requested-by: Steven Rostedt Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_event_perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 466c81c45b650deca213fda3d0ec4761667379a9 Author: Peter Zijlstra Date: Tue Oct 10 17:15:47 2017 +0200 perf/ftrace: Fix function trace events The function-trace <-> perf interface is a tad messed up. Where all the other trace <-> perf interfaces use a single trace hook registration and use per-cpu RCU based hlist to iterate the events, function-trace actually needs multiple hook registrations in order to minimize function entry patching when filters are present. The end result is that we iterate events both on the trace hook and on the hlist, which results in reporting events multiple times. Since function-trace cannot use the regular scheme, fix it the other way around, use singleton hlists. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Steven Rostedt (VMware) include/linux/trace_events.h | 5 +++ kernel/trace/trace_event_perf.c | 80 +++++++++++++++++++++++++---------------- 2 files changed, 54 insertions(+), 31 deletions(-) commit 8fd0fbbe8888f295eb34172a7e47bf7d3a0a4687 Author: Peter Zijlstra Date: Wed Oct 11 09:45:29 2017 +0200 perf/ftrace: Revert ("perf/ftrace: Fix double traces of perf on ftrace:function") Revert commit: 75e8387685f6 ("perf/ftrace: Fix double traces of perf on ftrace:function") The reason I instantly stumbled on that patch is that it only addresses the ftrace situation and doesn't mention the other _5_ places that use this interface. It doesn't explain why those don't have the problem and if not, why their solution doesn't work for ftrace. It doesn't, but this is just putting more duct tape on. Link: http://lkml.kernel.org/r/20171011080224.200565770@infradead.org Cc: Zhou Chengming Cc: Jiri Olsa Cc: Ingo Molnar Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Steven Rostedt (VMware) 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, 13 insertions(+), 20 deletions(-) commit e0f4145685ec7b477f6166ee819125107388a249 Author: Stephen Boyd Date: Fri Oct 13 00:44:51 2017 -0700 of: unittest: Remove redundant OF_DETACHED flag setting of_fdt_unflatten_tree() already sets the flag on the node to OF_DETACHED, because of_fdt_unflatten_tree() calls __unflatten_device_tree() with the detached bool set to true. Signed-off-by: Stephen Boyd Reviewed-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/unittest.c | 2 -- 1 file changed, 2 deletions(-) commit f5d2da67714a48e9d06f27714967630c3d3b28a2 Author: Stephen Boyd Date: Fri Oct 13 00:41:29 2017 -0700 of/fdt: Document detached argument to __unflatten_device_tree() This wasn't documented. Signed-off-by: Stephen Boyd Reviewed-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/fdt.c | 1 + 1 file changed, 1 insertion(+) commit eeb09506c58a326e1c571b7f9ee30b7fdbc6239d Author: Stephen Boyd Date: Fri Oct 13 00:35:58 2017 -0700 of/resolver: Replace kmalloc + memcpy with kmemdup() Save one line. Signed-off-by: Stephen Boyd Reviewed-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/resolver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d35d623f52f9bf58b2dc2fa08156de936e1d6770 Author: Stephen Boyd Date: Fri Oct 13 00:35:57 2017 -0700 of/resolver: Simplify to be32_add_cpu() This is the same as be32_add_cpu(), so simplify the code and remove the now unused local variable. Signed-off-by: Stephen Boyd Reviewed-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/resolver.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 136412474b77c14a26e018a7f2c1e5fcee700d3d Author: Steven Rostedt (VMware) Date: Fri Oct 13 10:06:25 2017 -0400 tracing, dma-buf: Remove unused trace event dma_fence_annotate_wait_on Commit e941759c74 ("fence: dma-buf cross-device synchronization") added trace event fence_annotate_wait_on, but never used it. It was renamed to dma_fence_annotate_wait_on by commit f54d186700 ("dma-buf: Rename struct fence to dma_fence") but still not used. As defined trace events have data structures and functions created for them, it is a waste of memory if they are not used. Remove the unused trace event. Link: http://lkml.kernel.org/r/20171013100625.6c820059@gandalf.local.home Reviewed-by: Christian König Acked-by: Sumit Semwal Signed-off-by: Steven Rostedt (VMware) drivers/dma-buf/dma-fence.c | 1 - include/trace/events/dma_fence.h | 40 ---------------------------------------- 2 files changed, 41 deletions(-) commit ce385aa24a0dcccdc81dfcbc90cf7aa290d8b758 Author: Jerome Brunet Date: Thu Oct 12 14:40:26 2017 +0200 pinctrl: meson: rework pinmux ops This change prepare the introduction of new meson SoC. This new SoC will share the same gpio/pinconf registers but the pinmux part will be different. While the format of the data associated with each pinmux group will change, the way to handle pinmuxing will be similar. To deal with this new situation, the meson_pmx_struture is kept but the data associated to it is now generic. This allows to reuse the basic functions which would otherwise be copy/pasted in each pinmux driver (such as getting the name a count of groups and functions) Only the functions actually using this specific data is taken out of the common code and is handling the SoC pinmuxing Reviewed-by: Neil Armstrong Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/Kconfig | 7 ++ drivers/pinctrl/meson/Makefile | 1 + drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 3 + drivers/pinctrl/meson/pinctrl-meson-gxl.c | 3 + drivers/pinctrl/meson/pinctrl-meson.c | 96 ++----------------------- drivers/pinctrl/meson/pinctrl-meson.h | 31 +++------ drivers/pinctrl/meson/pinctrl-meson8-pmx.c | 108 +++++++++++++++++++++++++++++ drivers/pinctrl/meson/pinctrl-meson8-pmx.h | 48 +++++++++++++ drivers/pinctrl/meson/pinctrl-meson8.c | 3 + drivers/pinctrl/meson/pinctrl-meson8b.c | 3 + 10 files changed, 194 insertions(+), 109 deletions(-) commit 277d14eb815fdfb95a72ea126bc09f75a2bd58fd Author: Jerome Brunet Date: Thu Oct 12 14:40:25 2017 +0200 pinctrl: meson: separate soc drivers When meson pinctrl is enabled, all meson platforms pinctrl drivers are built in the kernel, with a significant amount of data. This leads to situation where pinctrl drivers targeting an architecture are also compiled and shipped on another one (ex: meson8 - ARM - compiled and shipped on ARM64 builds). This is a waste of memory we can easily avoid. This change makes 4 pinctrl drivers (1 per SoC) out the original single driver, allowing to compile and ship only the ones required. Reviewed-by: Neil Armstrong Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 11 +----- drivers/pinctrl/meson/Kconfig | 34 +++++++++++++++++++ drivers/pinctrl/meson/Makefile | 8 +++-- drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 25 ++++++++++++-- drivers/pinctrl/meson/pinctrl-meson-gxl.c | 25 ++++++++++++-- drivers/pinctrl/meson/pinctrl-meson.c | 54 +++--------------------------- drivers/pinctrl/meson/pinctrl-meson.h | 11 ++---- drivers/pinctrl/meson/pinctrl-meson8.c | 25 ++++++++++++-- drivers/pinctrl/meson/pinctrl-meson8b.c | 25 ++++++++++++-- 9 files changed, 139 insertions(+), 79 deletions(-) commit fbe8749897710deffae4c77c1cdc34b31e2fc773 Author: Miquel Raynal Date: Fri Oct 13 11:01:46 2017 +0200 pinctrl: dt-bindings: Fix A37xx uart2 group name Fix a typo in A37xx pin controllers documentation about uart2 pin group. Signed-off-by: Miquel Raynal Reviewed-by: Gregory CLEMENT Signed-off-by: Linus Walleij .../devicetree/bindings/pinctrl/marvell,armada-37xx-pinctrl.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 97d21003df3e7504c899b1701546f18ff475966f Author: mike.travis@hpe.com Date: Thu Oct 12 11:32:06 2017 -0500 x86/platform/UV: Add check of TSC state set by UV BIOS Insert a check early in UV system startup that checks whether BIOS was able to obtain satisfactory TSC Sync stability. If not, it usually is caused by an error in the external TSC clock generation source. In this case the best fallback is to use the builtin hardware RTC as the kernel will not be able to set an accurate TSC sync either. Signed-off-by: Mike Travis Signed-off-by: Thomas Gleixner Reviewed-by: Dimitri Sivanich Reviewed-by: Russ Anderson Reviewed-by: Andrew Banman Cc: Prarit Bhargava Cc: Andrew Banman Cc: Peter Zijlstra Cc: Bin Gao Link: https://lkml.kernel.org/r/20171012163202.406294490@stormcage.americas.sgi.com arch/x86/include/asm/uv/uv_hub.h | 23 +++++++++++++++----- arch/x86/kernel/apic/x2apic_uv_x.c | 43 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 5 deletions(-) commit 6c66350d0a482892793b888b07c1177fc6d4b344 Author: mike.travis@hpe.com Date: Thu Oct 12 11:32:05 2017 -0500 x86/tsc: Provide a means to disable TSC ART On systems where multiple chassis are reset asynchronously, and thus the TSC counters are started asynchronously, the offset needed to convert to TSC to ART would be different. Disable ART in that case and rely on the TSC counters to supply the accurate time. Signed-off-by: Mike Travis Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Cc: Prarit Bhargava Cc: Dimitri Sivanich Cc: Russ Anderson Cc: Andrew Banman Cc: Peter Zijlstra Cc: Bin Gao Link: https://lkml.kernel.org/r/20171012163202.289397994@stormcage.americas.sgi.com arch/x86/kernel/tsc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 41e7864ab5ce4ec36e89a9f55d8d9dfe19b0392c Author: mike.travis@hpe.com Date: Thu Oct 12 11:32:04 2017 -0500 x86/tsc: Drastically reduce the number of firmware bug warnings Prior to the TSC ADJUST MSR being available, the method to set TSC's in sync with each other naturally caused a small skew between cpu threads. This was NOT a firmware bug at the time so introducing a whole avalanche of alarming warning messages might cause unnecessary concern and customer complaints. (Example: >3000 msgs in a 32 socket Skylake system.) Simply report the warning condition, if possible do the necessary fixes, and move on. Signed-off-by: Mike Travis Signed-off-by: Thomas Gleixner Reviewed-by: Dimitri Sivanich Reviewed-by: Russ Anderson Reviewed-by: Peter Zijlstra Cc: Prarit Bhargava Cc: Andrew Banman Cc: Bin Gao Link: https://lkml.kernel.org/r/20171012163202.175062400@stormcage.americas.sgi.com arch/x86/kernel/tsc_sync.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 9514ececa52e9f1436e7682e98c852d1338b699f Author: mike.travis@hpe.com Date: Thu Oct 12 11:32:03 2017 -0500 x86/tsc: Skip TSC test and error messages if already unstable If the TSC has already been determined to be unstable, then checking TSC ADJUST values is a waste of time and generates unnecessary error messages. Signed-off-by: Mike Travis Signed-off-by: Thomas Gleixner Reviewed-by: Dimitri Sivanich Reviewed-by: Russ Anderson Reviewed-by: Peter Zijlstra Cc: Prarit Bhargava Cc: Andrew Banman Cc: Bin Gao Link: https://lkml.kernel.org/r/20171012163202.060777495@stormcage.americas.sgi.com arch/x86/kernel/tsc_sync.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 341102c3ef29c33611586072363cf9982a8bdb77 Author: mike.travis@hpe.com Date: Thu Oct 12 11:32:02 2017 -0500 x86/tsc: Add option that TSC on Socket 0 being non-zero is valid Add a flag to indicate and process that TSC counters are on chassis that reset at different times during system startup. Therefore which TSC ADJUST values should be zero is not predictable. Signed-off-by: Mike Travis Signed-off-by: Thomas Gleixner Reviewed-by: Dimitri Sivanich Reviewed-by: Russ Anderson Reviewed-by: Andrew Banman Reviewed-by: Peter Zijlstra Cc: Prarit Bhargava Cc: Andrew Banman Cc: Bin Gao Link: https://lkml.kernel.org/r/20171012163201.944370012@stormcage.americas.sgi.com arch/x86/include/asm/tsc.h | 2 ++ arch/x86/kernel/tsc_sync.c | 39 +++++++++++++++++++++++++++++++++++---- 2 files changed, 37 insertions(+), 4 deletions(-) commit 36c282b31f648b31373be0dc8c2475c22fcab02a Author: Colin Ian King Date: Thu Oct 5 11:42:11 2017 +0100 platform/x86: mlx-platform: make a couple of structures static The structures mlxplat_dev and mlxplat_hotplug are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'mlxplat_dev' was not declared. Should it be static? symbol 'mlxplat_hotplug' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Darren Hart (VMware) drivers/platform/x86/mlx-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4467f2e2442e15cf047c2e7b91cb44a643cb149 Merge: 36c0a9d 4cccb73 Author: David S. Miller Date: Mon Oct 16 21:30:33 2017 +0100 Merge branch 'mlxsw-GRE-Offload-decap-without-encap' Jiri Pirko says: ==================== mlxsw: GRE: Offload decap without encap Petr says: The current code doesn't offload GRE decapsulation unless there's a corresponding encapsulation route as well. While not strictly incorrect (when encap route is absent, the decap route traps traffic to CPU and the kernel handles it), it's a missed optimization opportunity. With this patchset, IPIP entries are created as soon as offloadable tunneling netdevice is created. This then leads to offloading of decap route, if one exists, or is added afterwards, even when no encap route is present. In Linux, when there is a decap route, matching IP-in-IP packets are always decapsulated. However, with IPv4 overlays in particular, whether the inner packet is then forwarded depends on setting of net.ipv4.conf.*.rp_filter. When RP filtering is turned on, inner packets aren't forwarded unless there's a matching encap route. The mlxsw driver doesn't reflect this behavior in other router interfaces, and thus it's not implemented for tunnel types either. A better support for this will be subject of follow-up work. ==================== Signed-off-by: David S. Miller commit 4cccb737d2fd0d78b939a97b5ac1831b9a27d4c0 Author: Petr Machata Date: Mon Oct 16 16:26:39 2017 +0200 mlxsw: spectrum: Drop refcounting of IPIP entries Formerly, IPIP entries were created lazily by next hops that referenced an offloadable IP-in-IP netdevice. However now that they are created eagerly as a reaction to events on such netdevices, the reference counting is useless. Hence drop it. The routes whose next hops reference an offloaded IP-in-IP netdevice actually linger around a bit after their device is unregistered. However, mlxsw_sp_ipip_entry_destroy() also destroys the backing loopback, and mlxsw_sp_rif_destroy() transitively (via mlxsw_sp_nexthop_rif_gone_sync()) calls mlxsw_sp_nexthop_ipip_fini(), which unlinks the IPIP entry from a next hop. Thus no dangling pointers are left behind for the brief window after netdevice is gone, but routes not yet. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_ipip.h | 1 - .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 49 +++++++++------------- 2 files changed, 20 insertions(+), 30 deletions(-) commit f63ce4e54a424d9f99bad2ba099c972a07eab517 Author: Petr Machata Date: Mon Oct 16 16:26:38 2017 +0200 mlxsw: spectrum: Support IPIP overlay VRF migration IPIP entries are created as soon as an offloadable device is created. That means that when such a device is later moved to a different VRF, the loopback device that backs the tunnel is wrong. Thus when an offloadable encapsulating netdevice moves from one VRF to another, make sure that the loopback is updated as necessary. Signed-off-by: Petr Machata 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 | 3 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 47 +++++++++++++++++++++- 3 files changed, 49 insertions(+), 3 deletions(-) commit 0063587d358733008423c80302cb7b077be8e237 Author: Petr Machata Date: Mon Oct 16 16:26:37 2017 +0200 mlxsw: spectrum: Support decap-only IP-in-IP tunnels Current code for offloading IP-in-IP tunneling assumes that there is no decap without encap. But that's never true for IPv6 overlays, and is not true for IPv4 ones either, if net.ipv4.conf.*.rp_filter is unset. To support decap-only tunnels, an IPIP entry is now created as soon as an offloadable tunneling device is created. When that netdevice is up'd, a decap route is looked up and possibly offloaded. Thus decap is not handled implicitly as part of mlxsw_sp_ipip_entry_get() call anymore, but needs to be done explicitly after the get, if desired. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 8 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 6 ++ .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 105 +++++++++++++++++++-- 3 files changed, 109 insertions(+), 10 deletions(-) commit 6698c168bf48cb85505d7f6e77f0091a83aa497e Author: Petr Machata Date: Mon Oct 16 16:26:36 2017 +0200 mlxsw: spectrum_router: Move mlxsw_sp_netdev_ipip_type() Signed-off-by: Petr Machata Reviewed-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, 19 insertions(+), 19 deletions(-) commit c30f5d012edf755959c44d71757fbf4648ad75a8 Author: Petr Machata Date: Mon Oct 16 16:26:35 2017 +0200 mlxsw: spectrum: Move netdevice NB to struct mlxsw_sp So far, all netdevice notifications that the driver cared about were related to its own ports, and mlxsw_sp could be retrieved from the netdevice's private data. For IP-in-IP offloading however, the driver cares about events on foreign netdevices, and getting at mlxsw_sp or router data structures from the handler is inconvenient. Therefore move the netdevice notifier blocks from global scope to struct mlxsw_sp to allow retrieval from the notifier block pointer itself. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 23 ++++++++++++++++------- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + 2 files changed, 17 insertions(+), 7 deletions(-) commit 36c0a9dfc6613242ba1de012e2d15145cdaae805 Author: Jon Maloy Date: Mon Oct 16 16:04:51 2017 +0200 tipc: fix rebasing error In commit 2f487712b893 ("tipc: guarantee that group broadcast doesn't bypass group unicast") there was introduced a last-minute rebasing error that broke non-group communication. We fix this here. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/link.c | 1 + 1 file changed, 1 insertion(+) commit 45880485a3c58a4fc40734e23ddfbe786dfac072 Merge: d85969f 5fa85a0 Author: David S. Miller Date: Mon Oct 16 21:26:40 2017 +0100 Merge branch 'net-core-rcuify-rtnl-af_ops' Florian Westphal says: ==================== net: core: rcuify rtnl af_ops None of the rtnl af_ops callbacks sleep, so they can be called while holding rcu read lock. Switch handling of af_ops to rcu. This would allow to later call af_ops functions without holding the rtnl mutex anymore. ==================== Signed-off-by: David S. Miller commit 5fa85a09390c4a525cb4d06a0c4644b01a47976b Author: Florian Westphal Date: Mon Oct 16 15:44:36 2017 +0200 net: core: rcu-ify rtnl af_ops rtnl af_ops currently rely on rtnl mutex: unregister (called from module exit functions) takes the rtnl mutex and all users that do af_ops lookup also take the rtnl mutex. IOW, parallel rmmod will block until doit() callback is done. As none of the af_ops implementation sleep we can use rcu instead. doit functions that need the af_ops can now use rcu instead of the rtnl mutex provided the mutex isn't needed for other reasons. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/core/rtnetlink.c | 62 ++++++++++++++++++++++++++++++++++++++-------------- net/ipv4/devinet.c | 4 ++-- 2 files changed, 48 insertions(+), 18 deletions(-) commit 070cbf5be7774dcf0ceca081c7321c6f2ae833a4 Author: Florian Westphal Date: Mon Oct 16 15:44:35 2017 +0200 rtnetlink: place link af dump into own helper next patch will rcu-ify rtnl af_ops, i.e. allow af_ops lookup and function calls with rcu read lock held instead of rtnl mutex. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/core/rtnetlink.c | 72 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 30 deletions(-) commit d85969f1a981b9cd57f5037ebcb9c6d385c0bc70 Author: Colin Ian King Date: Mon Oct 16 14:33:21 2017 +0100 tcp: cdg: make struct tcp_cdg static The structure tcp_cdg is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'tcp_cdg' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: David S. Miller net/ipv4/tcp_cdg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00fb3a7c7c14dd28feb0372a8458267e058add66 Author: Arnd Bergmann Date: Mon Oct 16 13:32:36 2017 +0200 net: systemport: add NET_DSA dependency The notifier cause a link error when NET_DSA is a loadable module: drivers/net/ethernet/broadcom/bcmsysport.o: In function `bcm_sysport_remove': bcmsysport.c:(.text+0x1582): undefined reference to `unregister_dsa_notifier' drivers/net/ethernet/broadcom/bcmsysport.o: In function `bcm_sysport_probe': bcmsysport.c:(.text+0x278d): undefined reference to `register_dsa_notifier' This adds a dependency that forces the systemport driver to be a loadable module as well when that happens, but otherwise allows it to be built normally when DSA is either built-in or completely disabled. Fixes: d156576362c0 ("net: systemport: Establish lower/upper queue mapping") Signed-off-by: Arnd Bergmann Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 92c43fcafe9db18dc51cd2a44cdafd80a4bcb2b5 Author: Sudip Mukherjee Date: Sun Oct 15 22:00:52 2017 +0100 hamradio: baycom_par: use new parport device model Modify baycom driver to use the new parallel port device model. Signed-off-by: Sudip Mukherjee Signed-off-by: David S. Miller drivers/net/hamradio/baycom_par.c | 48 +++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) commit bc28df6e8543d41abfb48d4a4c6d445638d6768c Author: Gustavo A. R. Silva Date: Sun Oct 15 13:22:10 2017 -0500 net: dccp: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that for options.c file, I placed the "fall through" comment on its own line, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller net/dccp/input.c | 1 + net/dccp/options.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit a27d5a44ec87a019d818a82d0475b5d38856691e Author: Chris Wilson Date: Sun Oct 15 21:43:10 2017 +0100 drm/i915: Add in-flight request details to intel_engine_dump() In the intel_engine_cs dumper, we were showing the request details for the request queue but not of those requests already passed to the hw (just a summary of the seqno). If we show those details, we can then eliminate the entirely redundant and forgotten debugfs/i915_gem_request Signed-off-by: Chris Wilson Cc: Jeff McGee Cc: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20171015204310.17045-1-chris@chris-wilson.co.uk Reviewed-by: Jeff McGee drivers/gpu/drm/i915/i915_debugfs.c | 49 ---------------------------------- drivers/gpu/drm/i915/intel_engine_cs.c | 35 +++++++++++++----------- 2 files changed, 19 insertions(+), 65 deletions(-) commit 2a600d97cbb2a9311e6b42547d37e0eca9b9d6d6 Author: Andy Shevchenko Date: Sat Oct 14 17:04:40 2017 +0300 pch_gbe: Switch to new PCI IRQ allocation API This removes custom flag handling. Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h | 3 +- .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 42 +++++++++------------- 2 files changed, 17 insertions(+), 28 deletions(-) commit 485f2a5811f9d87d5b634d068b5c7574fd1bb09e Author: Hans de Goede Date: Wed Oct 4 15:30:12 2017 +0200 platform/x86: silead_dmi: Add entry for the Chuwi Hi8 Pro tablet Add touchscreen platform data for the Chuwi Hi8 Pro tablet. Signed-off-by: Hans de Goede Signed-off-by: Darren Hart (VMware) drivers/platform/x86/silead_dmi.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit d01174fcd2c1ffefdd0554f847c4045a5c731591 Author: Xue Liu Date: Tue Oct 10 17:17:45 2017 +0200 ieee802154: netlink: fix typo of the name of struct genl_ops Signed-off-by: Xue Liu Signed-off-by: Stefan Schmidt net/ieee802154/netlink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9185a610f8f7f1b4e4d28c9de27d1969cf58e0f1 Author: Steven Rostedt (VMware) Date: Thu Oct 12 18:40:02 2017 -0400 tracing: bpf: Hide bpf trace events when they are not used All the trace events defined in include/trace/events/bpf.h are only used when CONFIG_BPF_SYSCALL is defined. But this file gets included by include/linux/bpf_trace.h which is included by the networking code with CREATE_TRACE_POINTS defined. If a trace event is created but not used it still has data structures and functions created for its use, even though nothing is using them. To not waste space, do not define the BPF trace events in bpf.h unless CONFIG_BPF_SYSCALL is defined. Signed-off-by: Steven Rostedt (VMware) Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/trace/events/bpf.h | 5 ++++- kernel/bpf/core.c | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 0da4af00b2ed3dbe46788623a696c4169447eadc Author: Wei Wang Date: Fri Oct 13 15:08:07 2017 -0700 ipv6: only update __use and lastusetime once per jiffy at most In order to not dirty the cacheline too often, we try to only update dst->__use and dst->lastusetime at most once per jiffy. As dst->lastusetime is only used by ipv6 garbage collector, it should be good enough time resolution. And __use is only used in ipv6_route_seq_show() to show how many times a dst has been used. And as __use is not atomic_t right now, it does not show the precise number of usage times anyway. So we think it should be OK to only update it at most once per jiffy. According to my latest syn flood test on a machine with intel Xeon 6th gen processor and 2 10G mlx nics bonded together, each with 8 rx queues on 2 NUMA nodes: With this patch, the packet process rate increases from ~3.49Mpps to ~3.75Mpps with a 7% increase rate. Note: dst_use() is being renamed to dst_hold_and_use() to better specify the purpose of the function. Signed-off-by: Wei Wang Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/dst.h | 15 ++++++++------- net/decnet/dn_route.c | 8 ++++---- 2 files changed, 12 insertions(+), 11 deletions(-) commit 0e80193bd8c1d97654f1a2f45934e7372e9a512e Author: Wei Wang Date: Fri Oct 13 15:01:08 2017 -0700 ipv6: check fn before doing FIB6_SUBTREE(fn) In fib6_locate(), we need to first make sure fn is not NULL before doing FIB6_SUBTREE(fn) to avoid crash. This fixes the following static checker warning: net/ipv6/ip6_fib.c:1462 fib6_locate() warn: variable dereferenced before check 'fn' (see line 1459) net/ipv6/ip6_fib.c 1458 if (src_len) { 1459 struct fib6_node *subtree = FIB6_SUBTREE(fn); ^^^^^^^^^^^^^^^^ We shifted this dereference 1460 1461 WARN_ON(saddr == NULL); 1462 if (fn && subtree) ^^ before the check for NULL. 1463 fn = fib6_locate_1(subtree, saddr, src_len, 1464 offsetof(struct rt6_info, rt6i_src) Fixes: 66f5d6ce53e6 ("ipv6: replace rwlock with rcu and spinlock in fib6_table") Reported-by: Dan Carpenter Signed-off-by: Wei Wang Acked-by: Eric Dumazet Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 9db9583839b760fc492a7b288edfe2213184a579 Author: Abhijit Ayarekar Date: Fri Oct 13 12:24:06 2017 -0700 bpf: Add -target to clang switch while cross compiling. Update to llvm excludes assembly instructions. llvm git revision is below commit 65fad7c26569 ("bpf: add inline-asm support") This change will be part of llvm release 6.0 __ASM_SYSREG_H define is not required for native compile. -target switch includes appropriate target specific files while cross compiling Tested on x86 and arm64. Signed-off-by: Abhijit Ayarekar Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 745482e0c03793522fa19f06e6249b521d6adca1 Merge: 3230290 a10fa20 Author: David S. Miller Date: Mon Oct 16 21:00:41 2017 +0100 Merge branch 'sched-tp_q-remove' Jiri Pirko ==================== net: sched: remove some tp->q usage In order to prepare for block sharing, tcf_proto instances need to be independent on particular qdisc instances. This patchset takes care of removal of couple occurrences of tp->q usage. ==================== Signed-off-by: David S. Miller commit a10fa20101ae48fed2102f8e84d98f5aac2e5c40 Author: Jiri Pirko Date: Fri Oct 13 14:01:05 2017 +0200 net: sched: propagate q and parent from caller down to tcf_fill_node The callers have this info, they will pass it down to tcf_fill_node. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_api.c | 55 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 20 deletions(-) commit 74e3be6021d22df2ffcb691eae1affeb2bd0128e Author: Jiri Pirko Date: Fri Oct 13 14:01:04 2017 +0200 net: sched: use tcf_block_q helper to get q pointer for sch_tree_lock Use tcf_block_q helper to get q pointer to be used for direct call of sch_tree_lock/unlock instead of tcf_tree_lock/unlock. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/sch_generic.h | 3 --- net/sched/sch_api.c | 6 ++++-- 2 files changed, 4 insertions(+), 5 deletions(-) commit 1abf272022cf1d18469405f47b4ec49c6a3125db Author: Jiri Pirko Date: Fri Oct 13 14:01:03 2017 +0200 net: sched: tcindex, fw, flow: use tcf_block_q helper to get struct Qdisc Use helper to get q pointer per block. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_flow.c | 7 +++++-- net/sched/cls_fw.c | 5 ++++- net/sched/cls_tcindex.c | 5 ++++- 3 files changed, 13 insertions(+), 4 deletions(-) commit 7fa9d974f3c2a016b9accb18f4ee2ed2a738585c Author: Jiri Pirko Date: Fri Oct 13 14:01:02 2017 +0200 net: sched: cls_u32: use block instead of q in tc_u_common tc_u_common is now per-q. With blocks, it has to be converted to be per-block. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/cls_u32.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit c1954561cd262b8adf7908c5552fe9ad99f82f81 Author: Jiri Pirko Date: Fri Oct 13 14:01:01 2017 +0200 net: sched: ematch: obtain net pointer from blocks Instead of using tp->q, use block to get the net pointer. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller net/sched/ematch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34e3759cf86a3e75463e34c1bb9691777406a175 Author: Jiri Pirko Date: Fri Oct 13 14:01:00 2017 +0200 net: sched: teach tcf_bind/unbind_filter to use block->q Whenever the block->q is set, it can be used instead of tp->q as it contains the same value. When it is not set, which can't happen now but it might happen with the follow-up shared blocks introduction, the class is not set in the result. That would lead to a class lookup instead of direct class pointer use for classful qdiscs. However, it is not planned to support classful qdisqs sharing filter blocks, so that may never happen. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/pkt_cls.h | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 44186460c85a0121562db7cfef132d63c869118f Author: Jiri Pirko Date: Fri Oct 13 14:00:59 2017 +0200 net: sched: introduce tcf_block_q and tcf_block_dev helpers These helpers allows to get a q and netdev pointers for given block easily. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/pkt_cls.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 855319becbcffec6988a4e781a861b69a71c5b58 Author: Jiri Pirko Date: Fri Oct 13 14:00:58 2017 +0200 net: sched: store net pointer in block and introduce qdisc_net helper Store net pointer in the block structure. Along the way, introduce qdisc_net helper which allows to easily obtain net pointer for qdisc instance. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/pkt_sched.h | 7 +++++++ include/net/sch_generic.h | 1 + net/sched/cls_api.c | 1 + 3 files changed, 9 insertions(+) commit 69d78ef25c7b0058674145500efb12255738ba8a Author: Jiri Pirko Date: Fri Oct 13 14:00:57 2017 +0200 net: sched: store Qdisc pointer in struct block Prepare for removal of tp->q and store Qdisc pointer in the block structure. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/pkt_cls.h | 4 ++-- include/net/sch_generic.h | 1 + net/sched/cls_api.c | 3 ++- net/sched/sch_atm.c | 4 ++-- net/sched/sch_cbq.c | 2 +- net/sched/sch_drr.c | 2 +- net/sched/sch_dsmark.c | 2 +- net/sched/sch_fq_codel.c | 2 +- net/sched/sch_hfsc.c | 4 ++-- net/sched/sch_htb.c | 4 ++-- net/sched/sch_ingress.c | 6 +++--- net/sched/sch_multiq.c | 2 +- net/sched/sch_prio.c | 2 +- net/sched/sch_qfq.c | 2 +- net/sched/sch_sfb.c | 2 +- net/sched/sch_sfq.c | 2 +- 16 files changed, 23 insertions(+), 21 deletions(-) commit 32302902ff093891d8e64439cbb8ceae83e21ef8 Author: Alexander Duyck Date: Thu Oct 12 11:38:45 2017 -0700 mqprio: Reserve last 32 classid values for HW traffic classes and misc IDs This patch makes a slight tweak to mqprio in order to bring the classid values used back in line with what is used for mq. The general idea is to reserve values :ffe0 - :ffef to identify hardware traffic classes normally reported via dev->num_tc. By doing this we can maintain a consistent behavior with mq for classid where :1 - :ffdf will represent a physical qdisc mapped onto a Tx queue represented by classid - 1, and the traffic classes will be mapped onto a known subset of classid values reserved for our virtual qdiscs. Note I reserved the range from :fff0 - :ffff since this way we might be able to reuse these classid values with clsact and ingress which would mean that for mq, mqprio, ingress, and clsact we should be able to maintain a similar classid layout. Signed-off-by: Alexander Duyck Tested-by: Jesus Sanchez-Palencia Signed-off-by: David S. Miller include/uapi/linux/pkt_sched.h | 1 + net/sched/sch_mqprio.c | 79 ++++++++++++++++++++++++------------------ 2 files changed, 47 insertions(+), 33 deletions(-) commit 6f74b36b92cf9ee6450258fa341cff7c455a138f Author: Chris Wilson Date: Sun Oct 15 15:37:25 2017 +0100 drm/i915: Skip HW reinitialisation on resume if still wedged If we fail to recover the HW state upon resume (i.e. our attempt to clear the wedged bit and reset during i915_gem_sanitize() fails), then skip the HW restart inside i915_gem_init_hw(). We will ultimately do the HW restart when successfully unwedging and resetting the HW later, but attempting to restore a wedged device upon resume is risky as the HW is in an unknown state. v2: Suppress the error message when detecting the already wedged HW. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103240 Testcase: igt/gem_eio/in-flight-suspend Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20171015143725.27764-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit cc731f5a3b1f592d8aef04c9de720c6bc09b209a Author: Chris Wilson Date: Fri Oct 13 21:26:21 2017 +0100 drm/i915: Trim struct_mutex hold duration for i915_gem_free_objects We free objects in bulk after they wait for their RCU grace period. Currently, we take struct_mutex and unbind all the objects. This can lead to a long lock duration during which time those objects have their pages unfreeable (i.e. the shrinker is prevented from reaping those pages). If we only process a single object under the struct_mutex and then free the pages, the number of objects locked away from the shrinker is minimal and we allow regular clients better access to struct_mutex if they need it. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171013202621.7276-9-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 87701b4b559377dd6ebc95003bd8e422a1011303 Author: Chris Wilson Date: Fri Oct 13 21:26:20 2017 +0100 drm/i915: Only free the oldest stale object before a fresh allocation Inspired by Tvrtko's critique of the reaping of the stale contexts before allocating a new one, also limit the freed object reaping to the oldest stale object before allocating a fresh object. Unlike contexts, objects may have radically different sizes of backing storage, but similar to contexts, while we want to prevent starvation due to excessive freed lists, we also do not want to delay fresh allocations for too long. Only freeing the oldest on the freed object list before each allocation is a reasonable compromise. v2: Only a single consumer of llist_del_first() is allowed (although multiple llist_add are still allowed in parallel). Unlike i915_gem_context, i915_gem_flush_free_objects() is itself not serialized and so we need to add our own spinlock. Otherwise KASAN eventually spots a use-after-free for the race on *first->next. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin #v1 Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171013202621.7276-8-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit c5418a8b38a4ff9284e8e59c06a24f443197131c Author: Chris Wilson Date: Fri Oct 13 21:26:19 2017 +0100 drm/i915: Set our shrinker->batch to 4096 (~16MiB) Prefer to defer activating our GEM shrinker until we have a few megabytes to free; or we have accumulated sufficient mempressure by deferring the reclaim to force a shrink. The intent is that because our objects may typically be large, we are too effective at shrinking and are not rewarded for freeing more pages than the batch. It will also defer the initial shrinking to hopefully put it at a lower priority than say the buffer cache (although it will balance out over a number of reclaims, with GEM being more bursty). v2: Give it a feedback system to try and tune the batch size towards an effective size for the available objects. v3: Start keeping track of shrinker stats in debugfs v4: Protect against finding no shrinkable objects (div-by-zero) Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171013202621.7276-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 11 +++++++++++ drivers/gpu/drm/i915/i915_gem_shrinker.c | 34 +++++++++++++++++++++++++------- 2 files changed, 38 insertions(+), 7 deletions(-) commit 4e773c3a8a693e5abc248c5be26973b868466dde Author: Chris Wilson Date: Fri Oct 13 21:26:18 2017 +0100 drm/i915: Wire up shrinkctl->nr_scanned shrink_slab() allows us to report back the number of objects we successfully scanned (out of the target shrinkctl->nr_to_scan). As report the number of pages owned by each GEM object as a separate item to the shrinker, we cannot precisely control the number of shrinker objects we scan on each pass; and indeed may free more than requested. If we fail to tell the shrinker about the number of objects we process, it will continue to hold a grudge against us as any objects left unscanned are added to the next reclaim -- and so we will keep on "unfairly" shrinking our own slab in comparison to other slabs. v2: fixup the misplaced addition, we want to count everything we scan (to match the number we reported earlier) not just the objects we successfully validated and freed. References: 912d572d63b8 ("drm/i915: wire up shrinkctl->nr_scanned") Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171013202621.7276-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f2123818ffad0332e03c266ca73fe116e8ea5354 Author: Chris Wilson Date: Mon Oct 16 12:40:37 2017 +0100 drm/i915: Move dev_priv->mm.[un]bound_list to its own lock Remove the struct_mutex requirement around dev_priv->mm.bound_list and dev_priv->mm.unbound_list by giving it its own spinlock. This reduces one more requirement for struct_mutex and in the process gives us slightly more accurate unbound_list tracking, which should improve the shrinker - but the drawback is that we drop the retirement before counting so i915_gem_object_is_active() may be stale and lead us to underestimate the number of objects that may be shrunk (see commit bed50aea61df ("drm/i915/shrinker: Flush active on objects before counting")). v2: Crosslink the spinlock to the lists it protects, and btw this changes s/obj->global_link/obj->mm.link/ v3: Fix decoupling of old links in i915_gem_object_attach_phys() v3.1: Fix the fix, only unlink if it was linked v3.2: Use a local for to_i915(obj->base.dev)->mm.obj_lock Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171016114037.5556-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 39 +++++++++++--- drivers/gpu/drm/i915/i915_drv.h | 3 ++ drivers/gpu/drm/i915/i915_gem.c | 53 +++++++++++++++---- drivers/gpu/drm/i915/i915_gem_gtt.c | 3 +- drivers/gpu/drm/i915/i915_gem_object.h | 7 ++- drivers/gpu/drm/i915/i915_gem_shrinker.c | 64 +++++++++-------------- drivers/gpu/drm/i915/i915_gem_stolen.c | 5 +- drivers/gpu/drm/i915/i915_vma.c | 16 ++++-- drivers/gpu/drm/i915/selftests/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 8 ++- 10 files changed, 132 insertions(+), 68 deletions(-) commit 3d574a6bbb12a6c3bbeea807a1724b44a0f6ebbb Author: Chris Wilson Date: Fri Oct 13 21:26:16 2017 +0100 drm/i915: Remove walk over obj->vma_list for the shrinker In the next patch, we want to reduce the lock coverage within the shrinker, and one of the dangerous walks we have is over obj->vma_list. We are only walking the obj->vma_list in order to check whether it has been permanently pinned by HW access, typically via use on the scanout. But we have a couple of other long term pins, the context objects for which we currently have to check the individual vma pin_count. If we instead mark these using obj->pin_display, we can forgo the dangerous and sometimes slow list iteration. v2: Rearrange code to try and avoid confusion from false associations due to arrangement of whitespace along with rebasing on obj->pin_global. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171013202621.7276-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_shrinker.c | 27 +++++++-------------------- drivers/gpu/drm/i915/intel_lrc.c | 2 ++ drivers/gpu/drm/i915/intel_ringbuffer.c | 8 +++++++- 3 files changed, 16 insertions(+), 21 deletions(-) commit f46250e4773149ab0fd8262cdc28764bb58a2d62 Author: Chris Wilson Date: Fri Oct 13 21:26:15 2017 +0100 drm/i915: Drop debugfs/i915_gem_pin_display It has now lost its meaning (it shows more than just pin_display), I do not believe that we are using in preference to the complete listing from i915_gem_gtt, or the listing from i915_gem_framebuffer, or the listing of active display objects in i915_display_info. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171013202621.7276-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 5 ----- 1 file changed, 5 deletions(-) commit bd3d2252f94da51dda96a6e2ad6fdef5f2959811 Author: Chris Wilson Date: Fri Oct 13 21:26:14 2017 +0100 drm/i915: Rename obj->pin_display to obj->pin_global In the next patch, we want to extend use of the global pin counter for semi-permanent pinning of context/ring objects. Given that we plan to extend the usage to encompass a disparate set of objects, we want a name that reflects both and should entail less confusion. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171013202621.7276-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 12 ++++++------ drivers/gpu/drm/i915/i915_gem.c | 20 ++++++++++---------- drivers/gpu/drm/i915/i915_gem_object.h | 3 ++- drivers/gpu/drm/i915/i915_gem_userptr.c | 4 ++-- 4 files changed, 20 insertions(+), 19 deletions(-) commit f1fa4f442c82eb875babb88399a6b69efce7b453 Author: Chris Wilson Date: Fri Oct 13 21:26:13 2017 +0100 drm/i915: Refactor testing obj->mm.pages Since we occasionally stuff an error pointer into obj->mm.pages for a semi-permanent or even permanent failure, we have to be more careful and not just test against NULL when deciding if the object has a complete set of its concurrent pages. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171013202621.7276-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 10 ++++++++-- drivers/gpu/drm/i915/i915_gem.c | 19 ++++++++++--------- drivers/gpu/drm/i915/i915_gem_clflush.c | 1 + drivers/gpu/drm/i915/i915_gem_render_state.c | 2 +- drivers/gpu/drm/i915/i915_gem_shrinker.c | 10 +++++----- drivers/gpu/drm/i915/i915_gem_tiling.c | 2 +- drivers/gpu/drm/i915/i915_gem_userptr.c | 2 +- 7 files changed, 27 insertions(+), 19 deletions(-) commit 75c65ee20adebca6ac29d6f9d301ced073dd8030 Author: Robert Tarasov Date: Thu Oct 12 17:13:50 2017 -0700 drm/udl: Reading all edid blocks in DRM/UDL driver Now DRM/UDL driver retreives all edid data blocks instead of only base one. Previous approch could lead to improper initialization of video mode with certain monitors. Signed-off-by: Robert Tarasov Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20171013001350.172155-2-tutankhamen@chromium.org drivers/gpu/drm/udl/udl_connector.c | 106 +++++++++++++++++++++++------------- 1 file changed, 68 insertions(+), 38 deletions(-) commit afdfc4c6f55f953e073f0eef9e2afa3c8cf78d7c Author: Robert Tarasov Date: Thu Oct 12 17:13:49 2017 -0700 drm/udl: Fixed problem with UDL adpater reconnection Fixed problem with DisplayLink and DisplayLink certified adapers in drm/udl driver when adapter doesn't want to work if it was initialized with disconnected DVI cable by enabling drm connectot polling and updating current connector's state. Signed-off-by: Robert Tarasov Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20171013001350.172155-1-tutankhamen@chromium.org drivers/gpu/drm/udl/udl_connector.c | 76 ++++++++++++++++++++++++------------- drivers/gpu/drm/udl/udl_connector.h | 13 +++++++ drivers/gpu/drm/udl/udl_drv.c | 4 ++ drivers/gpu/drm/udl/udl_main.c | 5 +++ 4 files changed, 72 insertions(+), 26 deletions(-) commit c94fb639d5462027004ed8f5f71288955688a4ae Author: Randy Dunlap Date: Mon Oct 16 11:04:33 2017 -0700 irqchip: Add Kconfig menu Add a menu for IRQ chip drivers. This makes the Device drivers menu be more consistent (listing "subsystems" instead of specific options) and makes the IRQCHIP options be listed in expected places for 'make menu|xconfig'. Signed-off-by: Randy Dunlap Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Cc: Andrew Morton Cc: Jason Cooper Link: https://lkml.kernel.org/r/3db7385a-c6a1-5c93-0797-6f4b6b2b2cde@infradead.org drivers/irqchip/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 77c858fa343bb09cc3fe1456fda5710c974845b9 Author: Ladislav Michl Date: Mon Oct 16 18:13:03 2017 +0200 irqchip/irq-omap-intc: Do not statically initialize variables omap_nr_pending and omap_nr_irqs variables are initialized right at the beginning of intc_of_init function, so there's no need to statically initialize them. Signed-off-by: Ladislav Michl Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Cc: Jason Cooper Link: https://lkml.kernel.org/r/20171016161303.veumgcd3xom5c54r@lenoch drivers/irqchip/irq-omap-intc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 62518c02f75ff9b19c07b53b8e13ed878211b795 Author: Ladislav Michl Date: Mon Oct 16 18:04:22 2017 +0200 irqchip/irq-omap-intc: Remove omap3_init_irq() All mach-omap2 variants are device tree only now, so this function is dead code. Remove it. Signed-off-by: Ladislav Michl Signed-off-by: Thomas Gleixner Acked-by: Tony Lindgren Cc: Marc Zyngier Cc: linux-omap@vger.kernel.org Cc: Jason Cooper Link: https://lkml.kernel.org/r/20171016160422.uu2i7vvrgy7cc4aw@lenoch drivers/irqchip/irq-omap-intc.c | 12 ------------ include/linux/irqchip/irq-omap-intc.h | 2 -- 2 files changed, 14 deletions(-) commit a52ff2a509a77aacdcc464f26181e77d49880da9 Author: Haneen Mohammed Date: Wed Sep 20 12:57:16 2017 -0600 drm/armada: Replace drm_framebuffer_reference/unreference() with _get/put() This patch replace instances of drm_framebuffer_reference/unreference with *_get/put() suffixes, because get/put is shorter and consistent with the kernel use of *_get/put suffixes. This was done with the following Coccinelle script: @r1@ expression e; @@ ( -drm_framebuffer_reference(e); +drm_framebuffer_get(e); | -drm_framebuffer_unreference(e); +drm_framebuffer_put(e); ) Signed-off-by: Haneen Mohammed Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/e1df1b3375faa819029559b11c32e10501c5c5d6.1505932812.git.hamohammed.sa@gmail.com drivers/gpu/drm/armada/armada_crtc.c | 14 +++++++------- drivers/gpu/drm/armada/armada_drv.c | 2 +- drivers/gpu/drm/armada/armada_overlay.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) commit 4c3cf375bc4042eb8682cc6f4314efe66990421a Author: Haneen Mohammed Date: Wed Sep 20 12:54:48 2017 -0600 drm/armada: Replace drm_gem_object_reference/unreference() with _get/put() This patch replace instances of drm_gem_object_reference/unreference with *_get/put() suffixes, because get/put is shorter and consistent with the kernel use of *_get/put() suffixes. This was done with the following Coccinelle script: @r1@ expression e; @@ ( -drm_gem_object_reference(e); +drm_gem_object_get(e); | -drm_gem_object_unreference(e); +drm_gem_object_put(e); | -drm_gem_object_unreference_unlocked(e); +drm_gem_object_put_unlocked(e); ) Signed-off-by: Haneen Mohammed [resolved small conflict with removed armada_gem_dumb_map_offset] Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/a59ef1ed109ade897bcffcb01b33214262db8942.1505932812.git.hamohammed.sa@gmail.com drivers/gpu/drm/armada/armada_crtc.c | 8 ++++---- drivers/gpu/drm/armada/armada_fb.c | 8 ++++---- drivers/gpu/drm/armada/armada_fbdev.c | 6 +++--- drivers/gpu/drm/armada/armada_gem.c | 12 ++++++------ 4 files changed, 17 insertions(+), 17 deletions(-) commit 519c8e9ffd86143fedd84cf833a09f36b47d0f5c Author: Randy Dunlap Date: Mon Oct 16 11:01:00 2017 -0700 block: fix Sphinx kernel-doc warning Sphinx treats symbols that end with '_' as a kind of special documentation indicator, so fix that by adding an ending '*' to it. ../block/bio.c:404: ERROR: Unknown target name: "gfp". Signed-off-by: Randy Dunlap Signed-off-by: Jens Axboe block/bio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ce762e85bc95fd7aa1fb5f8cfc38ce5a228fc95 Author: Michael Lyle Date: Mon Oct 16 10:34:47 2017 -0700 bcache: writeback rate clamping: make 32 bit safe Sorry this got through to linux-block, was detected by the kbuilds test robot. NSEC_PER_SEC is a long constant; 2.5 * 10^9 doesn't fit in a signed long constant. Fixes: e41166c5c44e ("bcache: writeback rate shouldn't artifically clamp") Reviewed-by: Coly Li Signed-off-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b8eb03a7cf1b767c339771201f9cb974cea1145a Author: Alex Elder Date: Mon Oct 16 09:22:57 2017 -0500 arm64: defconfig: re-enable Qualcomm DB410c USB Stephen Boyd reworked some Qualcomm USB code earlier this year. The result requires a few different config options to be enabled in order for the USB on the DragonBoard 410c to continue working, but these were never added to arm64 "defconfig". As a result, USB on that board stopped working during the v4.13-rc1 merge window. Re-enable this functionality by setting the needed config options in the arm64 "defconfig" file. Signed-off-by: Alex Elder Signed-off-by: Andy Gross arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) commit 77ea8a68c54ede3fd60dadb6a49b597f6eb5aee7 Author: Rob Herring Date: Tue Oct 3 11:07:55 2017 -0500 of/fdt: skip unflattening of disabled nodes For static DT usecases, we don't need the disabled nodes and can skip unflattening. This saves a significant amount of RAM in memory constrained cases. In one example on STM32F469, the RAM usage goes from 118K to 26K. There are a few cases in the kernel that modify the status property dynamically. These all are changes from enabled to disabled, depend on OF_DYNAMIC or are not FDT based (PDT based). Tested-by: Nicolas Pitre Reviewed-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/fdt.c | 4 ++++ 1 file changed, 4 insertions(+) commit ecc8a96e251dc43d13841bac44fbfa34ec20fc52 Author: Rob Herring Date: Thu Sep 28 19:20:32 2017 -0500 of/fdt: add of_fdt_device_is_available function Add an equivalent function to of_device_is_available for flattened DT, and convert the one existing open coded occurrence. Tested-by: Nicolas Pitre Reviewed-by: Frank Rowand Signed-off-by: Rob Herring drivers/of/fdt.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit b56b5528f5b3c3d47e7c0ca67318c45e980d93f0 Author: Rob Herring Date: Wed Oct 4 14:09:40 2017 -0500 of: make kobject and bin_attribute support configurable Having device_nodes be kobjects is only needed if sysfs or OF_DYNAMIC is enabled. Otherwise, having a kobject in struct device_node is unnecessary bloat in minimal kernel configurations. Likewise, bin_attribute is only needed in struct property when sysfs is enabled, so we can make it configurable too. Tested-by: Nicolas Pitre Reviewed-by: Frank Rowand Acked-by: Grant Likely Signed-off-by: Rob Herring drivers/of/Kconfig | 4 ++ drivers/of/Makefile | 1 + drivers/of/base.c | 130 -------------------------------------- drivers/of/dynamic.c | 22 ------- drivers/of/kobj.c | 164 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/of/of_private.h | 23 +++++++ include/linux/of.h | 22 +++---- 7 files changed, 202 insertions(+), 164 deletions(-) commit 0c3c234b95fa7f1dfa19e1456a47ebafc300dd6b Author: Rob Herring Date: Wed Oct 4 14:04:01 2017 -0500 of: wrap accesses to device_node kobject In preparation to make kobject element in struct device_node optional, provide and use a macro to return the kobject pointer. The only user outside the DT core is the driver core. Acked-by: Greg Kroah-Hartman Tested-by: Nicolas Pitre Reviewed-by: Frank Rowand Acked-by: Grant Likely Signed-off-by: Rob Herring drivers/base/core.c | 2 +- include/linux/of.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit 4c2bb57400394e4ec631a42dcf637e925db6202e Author: Rob Herring Date: Wed Oct 4 19:30:53 2017 -0500 of: move kobj_to_device_node() into dynamic.c The only user of kobj_to_device_node() is in dynamic.c, so move it there. This avoids having to make it conditional once kobject is configurable. Tested-by: Nicolas Pitre Reviewed-by: Frank Rowand Acked-by: Grant Likely Signed-off-by: Rob Herring drivers/of/dynamic.c | 5 +++++ drivers/of/of_private.h | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) commit 16bba30eab137aaa37538349c0a7496720e90c66 Author: Rob Herring Date: Wed Oct 4 14:30:02 2017 -0500 of: make struct property _flags field configurable Only Sparc and CONFIG_OF_DYNAMIC use the struct property._flags field, so make it conditional shrinking struct property a bit. Tested-by: Nicolas Pitre Reviewed-by: Frank Rowand Acked-by: Grant Likely Signed-off-by: Rob Herring include/linux/of.h | 4 ++++ 1 file changed, 4 insertions(+) commit 36689ecd2c065a8879035e5bf1b4a0f4d5b65160 Author: Rob Herring Date: Fri Sep 29 20:08:28 2017 -0500 of: remove struct property.unique_id for FDT Only Sparc uses unique_id, so remove it for FDT builds and shrink struct property a bit making the unflattened DT less of a memory hog. Tested-by: Nicolas Pitre Reviewed-by: Frank Rowand Acked-by: Grant Likely Signed-off-by: Rob Herring include/linux/of.h | 2 ++ 1 file changed, 2 insertions(+) commit bd82bbf38cbe27f2c65660da801900d71bcc5cc8 Author: Rob Herring Date: Thu Oct 5 12:01:46 2017 -0500 of: fix missing kobject init for !SYSFS && OF_DYNAMIC config The ref counting is broken for OF_DYNAMIC when sysfs is disabled because the kobject initialization is skipped. Only the properties add/remove/update should be skipped for !SYSFS config. Tested-by: Nicolas Pitre Reviewed-by: Frank Rowand Acked-by: Grant Likely Signed-off-by: Rob Herring drivers/of/base.c | 3 --- 1 file changed, 3 deletions(-) commit e4ffc83d3fa7e51390a94303e06356d2d1d5b5ee Author: Rodrigo Vivi Date: Tue Aug 22 16:58:28 2017 -0700 drm/i915/cnl: WaRsUseTimeoutMode Apparently RC6 residency is lower than expected with EI mode for most of the cases on CNL A0, B0 and C0. This Wa doesn't solve our lower residency, but I believe it is better to have it since EI is not expected to work by HW engineers anyways. Cc: David Weinehall Cc: Mika Kuoppala Signed-off-by: Rodrigo Vivi Reviewed-by: David Weinehall Link: https://patchwork.freedesktop.org/patch/msgid/20170822235828.18322-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit 2b4f8923ecaafc0c25ee56bc17ea9256d12b747c Author: Chuck Lever Date: Mon Oct 9 12:03:42 2017 -0400 xprtrdma: Remove ro_unmap_safe Clean up: There are no remaining callers of this method. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/fmr_ops.c | 19 ------------------- net/sunrpc/xprtrdma/frwr_ops.c | 19 ------------------- net/sunrpc/xprtrdma/xprt_rdma.h | 2 -- 3 files changed, 40 deletions(-) commit 4ce6c04c2acef91a10d65a3bcb622654bb01d930 Author: Chuck Lever Date: Mon Oct 9 12:03:34 2017 -0400 xprtrdma: Use ro_unmap_sync in xprt_rdma_send_request The "safe" version of ro_unmap is used here to avoid waiting unnecessarily. However: - It is safe to wait. After all, we have to wait anyway when using FMR to register memory. - This case is rare: it occurs only after a reconnect. By switching this call site to ro_unmap_sync, the final use of ro_unmap_safe is removed. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/transport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8f66b1a529047a972cb9602a919c53a95f3d7a2b Author: Chuck Lever Date: Mon Oct 9 12:03:26 2017 -0400 xprtrdma: Don't defer fencing an async RPC's chunks In current kernels, waiting in xprt_release appears to be safe to do. I had erroneously believed that for ASYNC RPCs, waiting of any kind in xprt_release->xprt_rdma_free would result in deadlock. I've done injection testing and consulted with Trond to confirm that waiting in the RPC release path is safe. For the very few times where RPC resources haven't yet been released earlier by the reply handler, it is safe to wait synchronously in xprt_rdma_free for invalidation rather than defering it to MR recovery. Note: When the QP is error state, posting a LocalInvalidate should flush and mark the MR as bad. There is no way the remote HCA can access that MR via a QP in error state, so it is effectively already inaccessible and thus safe for the Upper Layer to access. The next time the MR is used it should be recognized and cleaned up properly by frwr_op_map. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker net/sunrpc/xprtrdma/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fea73ac92f628538032ce746f7dd5d6f8dfcc32 Author: NeilBrown Date: Fri Aug 25 17:34:41 2017 +1000 NFS: remove special-case revalidate in nfs_opendir() Commit f5a73672d181 ("NFS: allow close-to-open cache semantics to apply to root of NFS filesystem") added a call to __nfs_revalidate_inode() to nfs_opendir to as the lookup process wouldn't reliable do this. Subsequent commit a3fbbde70a0c ("VFS: we need to set LOOKUP_JUMPED on mountpoint crossing") make this unnecessary. So remove the unnecessary code. Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker fs/nfs/dir.c | 7 ------- 1 file changed, 7 deletions(-) commit b688741cb06695312f18b730653d6611e1bad28d Author: NeilBrown Date: Fri Aug 25 17:34:41 2017 +1000 NFS: revalidate "." etc correctly on "open". For correct close-to-open semantics, NFS must validate the change attribute of a directory (or file) on open. Since commit ecf3d1f1aa74 ("vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op"), open() of "." or a path ending ".." is not revalidated reliably (except when that direct is a mount point). Prior to that commit, "." was revalidated using nfs_lookup_revalidate() which checks the LOOKUP_OPEN flag and forces revalidation if the flag is set. Since that commit, nfs_weak_revalidate() is used for NFSv3 (which ignores the flags) and nothing is used for NFSv4. This is fixed by using nfs_lookup_verify_inode() in nfs_weak_revalidate(). This does the revalidation exactly when needed. Also, add a definition of .d_weak_revalidate for NFSv4. The incorrect behavior is easily demonstrated by running "echo *" in some non-mountpoint NFS directory while watching network traffic. Without this patch, "echo *" sometimes doesn't produce any traffic. With the patch it always does. Fixes: ecf3d1f1aa74 ("vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op") cc: stable@vger.kernel.org (3.9+) Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker fs/nfs/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1750d929b08764dd293d5bdddaa9bc4d3f94d228 Author: Anna Schumaker Date: Wed Jul 26 12:00:21 2017 -0400 NFS: Don't compare apples to elephants to determine access bits The NFS_ACCESS_* flags aren't a 1:1 mapping to the MAY_* flags, so checking for MAY_WHATEVER might have surprising results in nfs*_proc_access(). Let's simplify this check when determining which bits to ask for, and do it in a generic place instead of copying code for each NFS version. Signed-off-by: Anna Schumaker fs/nfs/dir.c | 11 ++++++++--- fs/nfs/nfs3proc.c | 17 +---------------- fs/nfs/nfs4proc.c | 19 +------------------ 3 files changed, 10 insertions(+), 37 deletions(-) commit 3c1818275cc65c6d53e0adfde0c989bfe89ab8d7 Author: Anna Schumaker Date: Wed Jul 26 10:14:55 2017 -0400 NFS: Create NFS_ACCESS_* flags Passing the NFS v4 flags into the v3 code seems weird to me, even if they are defined to the same values. This patch adds in generic flags to help me feel better Signed-off-by: Anna Schumaker fs/nfs/dir.c | 16 ++++++++-------- include/linux/nfs_fs.h | 10 ++++++++++ 2 files changed, 18 insertions(+), 8 deletions(-) commit 4a95602b3edf656ff4540bd62057901d4bb33812 Author: Pierre-Yves MORDRET Date: Thu Sep 28 17:36:00 2017 +0200 ARM: configs: stm32: Add MDMA support in STM32 defconfig This patch adds MDMA support in STM32 defconfig file Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Alexandre Torgue arch/arm/configs/stm32_defconfig | 1 + 1 file changed, 1 insertion(+) commit 4bd93eb39d98e38a260abe955e20636f97b96aba Author: Pierre-Yves MORDRET Date: Mon Oct 16 18:21:39 2017 +0200 ARM: dts: stm32: Add MDMA support for STM32H743 SoC This patch adds MDMA support for STM32H743 SoC. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32h743.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit cae2ada3a790c2bf2d995a8b4a1e1bd42ff75f91 Author: Amelie Delaunay Date: Mon Oct 16 14:22:56 2017 +0200 ARM: dts: stm32: Enable USB FS on stm32f746-disco This patch enables USB FS on stm32f746-disco (Host mode) with 5V VBUS enable. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f746-disco.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 07b6b2eebe14360baba2c486cc0423024221dda7 Author: Amelie Delaunay Date: Mon Oct 16 18:14:00 2017 +0200 ARM: dts: stm32: Add USB FS support for STM32F746 MCU This patch adds the USB pins and nodes for USB FS core on STM32F746 SoC. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f746.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 1f3df4dc088d927683b292118cd8b4eaaf1af573 Author: Sascha Hauer Date: Mon Oct 16 11:51:55 2017 +0200 mtd: nand: mxc: use dev_dbg to print debug messages When a struct device * is around use dev_dbg instead of pr_debug to give the messages more context. Signed-off-by: Sascha Hauer Signed-off-by: Boris Brezillon drivers/mtd/nand/mxc_nand.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 414864d765e1431d3ba79051404a1f6e423fc145 Author: Sascha Hauer Date: Mon Oct 16 11:51:54 2017 +0200 mtd: nand: mxc: lower ECC failed message priority to debug level Having bad ECC is a normal case for NAND, do not spam log with the message. Users like UBI will print a message anyway which is more useful since it contains the PEB number that has bad ECC. Signed-off-by: Sascha Hauer Reviewed-by: Fabio Estevam Signed-off-by: Boris Brezillon drivers/mtd/nand/mxc_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 543d5e0ea181a3f92cbe19832bcf2e0ea26bfc22 Author: Michal Wajdeczko Date: Mon Oct 16 14:47:23 2017 +0000 drm/i915/huc: Move fw select function No functional change. Just place the function closer to related definitions. Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Sagar Arun Kamble Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-15-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_huc.c | 72 ++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 36 deletions(-) commit 9f65208f250422c943ca49e0f45e9f15b8cdcdac Author: Michal Wajdeczko Date: Mon Oct 16 14:47:22 2017 +0000 drm/i915/guc: Update Guc messages on load failure In case of GuC firmware loading failure we were reporting DRM_ERROR also for case when GuC loading was not strictly required. Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Sagar Arun Kamble Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-14-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 4502e9ec820d763750e54c11683d37b992358d6e Author: Michal Wajdeczko Date: Mon Oct 16 14:47:21 2017 +0000 drm/i915/uc: Unify firmware loading Firmware loading for GuC and HuC are similar. Move common code into generic function for maximum reuse. v2: change message levels (Chris) Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Sagar Arun Kamble Cc: Anusha Srivatsa Cc: Sujaritha Sundaresan Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-13-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc_fw.c | 52 +++--------------------- drivers/gpu/drm/i915/intel_huc.c | 53 +++---------------------- drivers/gpu/drm/i915/intel_uc_fw.c | 79 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uc_fw.h | 4 ++ 4 files changed, 93 insertions(+), 95 deletions(-) commit f1e86cecf1d1ae9b933d3f69cc24632556d5eb8c Author: Michal Wajdeczko Date: Mon Oct 16 14:47:20 2017 +0000 drm/i915: Update DMC firmware load error messages Some of the error messages from DMC load were too generic and may be confusing for the user. Lets explicitly add DMC words there. Also as homepage of DMC firmware is same as for the GuC and Huc, lets reuse URL definition. Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Imre Deak Cc: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-12-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_csr.c | 31 ++++++++++++++++--------------- drivers/gpu/drm/i915/intel_uc_fw.h | 1 + 2 files changed, 17 insertions(+), 15 deletions(-) commit 1e913d27cef4760e247951253bf207333d418268 Author: Michal Wajdeczko Date: Mon Oct 16 14:47:19 2017 +0000 drm/i915/uc: Add message with firmware url In case of firmware fetch failure we should help user find latest firmware. URL macro duplication from csr.c will be fixed in upcoming patch. Suggested-by: Chris Wilson Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-11-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc_fw.c | 2 ++ drivers/gpu/drm/i915/intel_uc_fw.h | 2 ++ 2 files changed, 4 insertions(+) commit 5f99afdbf186733bf1a0fa55534e7e8e25e961db Author: Michal Wajdeczko Date: Mon Oct 16 14:47:18 2017 +0000 drm/i915/uc: Improve debug messages in firmware fetch Time to remove less important info and make messages clear and consistent. v2: change some message levels (Chris) v3: restore DRM_WARN (Chris) Signed-off-by: Michal Wajdeczko Cc: Sagar Arun Kamble Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson #2 Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-10-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc_fw.c | 75 +++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 29 deletions(-) commit 86ffc31211cbad56bc4e06441801a37b380b3779 Author: Michal Wajdeczko Date: Mon Oct 16 14:47:17 2017 +0000 drm/i915/guc: Pick better place for Guc final status message GuC status message printed right after firmware upload may be too optimistic, as we may fail on subsequent steps. Move that message to the end of intel_uc_init_hw where we know the status for sure. v2: use dev_info (Chris) Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Sagar Arun Kamble Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-9-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc_fw.c | 6 ------ drivers/gpu/drm/i915/intel_uc.c | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) commit afb3484f925d5e88ac0d4685ffc06b8dc5838bbf Author: Michal Wajdeczko Date: Mon Oct 16 14:47:16 2017 +0000 drm/i915/uc: Check all firmwares against WOPCM size Both GuC and HuC firmwares will be moved into WOPCM so we can check ucode size early for both cases. Suggested-by: Joonas Lahtinen Signed-off-by: Michal Wajdeczko Cc: Sagar Arun Kamble Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-8-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc_fw.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit cd5a917e35bc51ebc5fe10cf226ba124b94f2147 Author: Michal Wajdeczko Date: Mon Oct 16 14:47:15 2017 +0000 drm/i915/guc: Reorder functions in intel_guc_fw.c Functions should be defined in their use order. Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-7-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc_fw.c | 81 +++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 40 deletions(-) commit e8668bbcb0f91c7baa84be02514dff76b1eba6c8 Author: Michal Wajdeczko Date: Mon Oct 16 14:47:14 2017 +0000 drm/i915/guc: Rename intel_guc_loader.c to intel_guc_fw.c Remaining functions in intel_guc_loader.c were focused around GuC firmware. Rename them to match object-verb pattern and rename file itself. Suggested-by: Joonas Lahtinen Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Sagar Arun Kamble Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-6-michal.wajdeczko@intel.com drivers/gpu/drm/i915/Makefile | 2 +- drivers/gpu/drm/i915/intel_guc.h | 4 +- drivers/gpu/drm/i915/intel_guc_fw.c | 298 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_guc_fw.h | 33 ++++ drivers/gpu/drm/i915/intel_guc_loader.c | 298 -------------------------------- drivers/gpu/drm/i915/intel_uc.c | 4 +- 6 files changed, 335 insertions(+), 304 deletions(-) commit d9e2e0143cee8a3c08ce7db4e3adc6aebc84d1ed Author: Michal Wajdeczko Date: Mon Oct 16 14:47:13 2017 +0000 drm/i915/guc: Move doc near related definitions After GuC code reorg some documentation was left in wrong place. Move it closer to corresponding definitions. v2: use consistent name for the GuC (Sagar) Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Sagar Arun Kamble Reviewed-by: Sagar Arun Kamble Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-5-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc.h | 11 +++++++++++ drivers/gpu/drm/i915/intel_guc_loader.c | 23 ----------------------- drivers/gpu/drm/i915/intel_uc_fw.h | 5 +++++ 3 files changed, 16 insertions(+), 23 deletions(-) commit fdc6d7319e2b2da9ac108691c2039ee836779222 Author: Michal Wajdeczko Date: Mon Oct 16 14:47:12 2017 +0000 drm/i915/guc: Small fixups post code move Existing code needs some style fixes. To avoid polluting pure move patch, do it now as separate step. Suggested-by: Chris Wilson Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-4-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc.c | 11 ++++++----- drivers/gpu/drm/i915/intel_guc_fwif.h | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) commit 5d53be45a86f2103a30872e2a06cbf6d38233326 Author: Michal Wajdeczko Date: Mon Oct 16 14:47:11 2017 +0000 drm/i915/guc: Move GuC boot param initialization out of xfer We want to keep ucode xfer functions separate from other initialization. Once separated, add explicit forcewake. v2: use BLITTER domain only and add comment (Daniele) Suggested-by: Joonas Lahtinen Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Sagar Arun Kamble Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson #1 Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-3-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc.c | 92 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_guc.h | 1 + drivers/gpu/drm/i915/intel_guc_loader.c | 85 ------------------------------ drivers/gpu/drm/i915/intel_uc.c | 1 + 4 files changed, 94 insertions(+), 85 deletions(-) commit 46f1e8b3de827057cdbeb9a78e6994b1f0386474 Author: Michal Wajdeczko Date: Mon Oct 16 14:47:10 2017 +0000 drm/i915: Move intel_guc_wopcm_size to intel_guc.c Function intel_guc_wopcm_size didn't fit well in the old place. With this move upcoming cleanup will be simpler. Suggested-by: Joonas Lahtinen Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Sagar Arun Kamble Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-2-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc.c | 11 +++++++++++ drivers/gpu/drm/i915/intel_guc_loader.c | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) commit 52b69ff54aa0d163253dbd7ff80aaecf179dfbe3 Author: Michael Lyle Date: Fri Oct 13 16:35:42 2017 -0700 bcache: MAINTAINERS: set bcache to MAINTAINED Also add URL for IRC channel. Signed-off-by: Michael Lyle Signed-off-by: Jens Axboe MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 77c77a98f8a4dd4d33810e25a8780f65d6fa00e9 Author: Kent Overstreet Date: Fri Oct 13 16:35:41 2017 -0700 bcache: Add Michael Lyle to MAINTAINERS Signed-off-by: Kent Overstreet Signed-off-by: Jens Axboe MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 6446c684f9418d0175c9c3e5134e7744fe79181a Author: Liang Chen Date: Fri Oct 13 16:35:40 2017 -0700 bcache: safeguard a dangerous addressing in closure_queue The use of the union reduces the size of closure struct by taking advantage of the current size of its members. The offset of func in work_struct equals the size of the first three members, so that work.work_func will just reference the forth member - fn. This is smart but dangerous. It can be broken if work_struct or the other structs get changed, and can be a bit difficult to debug. Signed-off-by: Liang Chen Reviewed-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/closure.h | 6 ++++++ 1 file changed, 6 insertions(+) commit a8500fc816b19795756d27c762daa5e19f5e1b6f Author: Michael Lyle Date: Fri Oct 13 16:35:39 2017 -0700 bcache: rearrange writeback main thread ratelimit The time spent searching for things to write back "counts" for the actual rate achieved, so don't flush the accumulated rate with each chunk. This will maintain better fidelity to user-commanded rates, but it may slightly increase the burstiness of writeback. The writeback lock needs improvement to help mitigate this. Signed-off-by: Michael Lyle Reviewed-by: Kent Overstreet Signed-off-by: Jens Axboe drivers/md/bcache/writeback.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e41166c5c44e30dbd620f7c77a27efe5d5cc551a Author: Michael Lyle Date: Fri Oct 13 16:35:38 2017 -0700 bcache: writeback rate shouldn't artifically clamp The previous code artificially limited writeback rate to 1000000 blocks/second (NSEC_PER_MSEC), which is a rate that can be met on fast hardware. The rate limiting code works fine (though with decreased precision) up to 3 orders of magnitude faster, so use NSEC_PER_SEC. Additionally, ensure that uint32_t is used as a type for rate throughout the rate management so that type checking/clamp_t can work properly. bch_next_delay should be rewritten for increased precision and better handling of high rates and long sleep periods, but this is adequate for now. Signed-off-by: Michael Lyle Reported-by: Coly Li Reviewed-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/bcache.h | 2 +- drivers/md/bcache/util.h | 4 ++-- drivers/md/bcache/writeback.c | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) commit ae82ddbfeb359fcffa97be5fb5bcd59165f2864f Author: Michael Lyle Date: Fri Oct 13 16:35:37 2017 -0700 bcache: smooth writeback rate control This works in conjunction with the new PI controller. Currently, in real-world workloads, the rate controller attempts to write back 1 sector per second. In practice, these minimum-rate writebacks are between 4k and 60k in test scenarios, since bcache aggregates and attempts to do contiguous writes and because filesystems on top of bcachefs typically write 4k or more. Previously, bcache used to guarantee to write at least once per second. This means that the actual writeback rate would exceed the configured amount by a factor of 8-120 or more. This patch adjusts to be willing to sleep up to 2.5 seconds, and to target writing 4k/second. On the smallest writes, it will sleep 1 second like before, but many times it will sleep longer and load the backing device less. This keeps the loading on the cache and backing device related to writeback more consistent when writing back at low rates. Signed-off-by: Michael Lyle Reviewed-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/util.c | 10 ++++++++-- drivers/md/bcache/writeback.c | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) commit 1d316e658374f700fdfff9299c70ce65d8d145e6 Author: Michael Lyle Date: Fri Oct 13 16:35:36 2017 -0700 bcache: implement PI controller for writeback rate bcache uses a control system to attempt to keep the amount of dirty data in cache at a user-configured level, while not responding excessively to transients and variations in write rate. Previously, the system was a PD controller; but the output from it was integrated, turning the Proportional term into an Integral term, and turning the Derivative term into a crude Proportional term. Performance of the controller has been uneven in production, and it has tended to respond slowly, oscillate, and overshoot. This patch set replaces the current control system with an explicit PI controller and tuning that should be correct for most hardware. By default, it attempts to write at a rate that would retire 1/40th of the current excess blocks per second. An integral term in turn works to remove steady state errors. IMO, this yields benefits in simplicity (removing weighted average filtering, etc) and system performance. Another small change is a tunable parameter is introduced to allow the user to specify a minimum rate at which dirty blocks are retired. There is a slight difference from earlier versions of the patch in integral handling to prevent excessive negative integral windup. Signed-off-by: Michael Lyle Reviewed-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/bcache.h | 9 ++--- drivers/md/bcache/sysfs.c | 18 +++++---- drivers/md/bcache/writeback.c | 91 ++++++++++++++++++++++++------------------- 3 files changed, 66 insertions(+), 52 deletions(-) commit 5fa89fb9a86bcc0f0b3f21ab6087a8a4170dcd2c Author: Michael Lyle Date: Fri Oct 13 16:35:35 2017 -0700 bcache: don't write back data if reading it failed If an IO operation fails, and we didn't successfully read data from the cache, don't writeback invalid/partial data to the backing disk. Signed-off-by: Michael Lyle Reviewed-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/writeback.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 238501027abf0386fa5f5dcaf589f406eb187bc3 Author: Yijing Wang Date: Fri Oct 13 16:35:34 2017 -0700 bcache: remove unused parameter Parameter bio is no longer used, clean it. Signed-off-by: Yijing Wang Reviewed-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/request.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b41c9b0266e8370033a7799f6806bfc70b7fd75f Author: Eric Wheeler Date: Fri Oct 13 16:35:33 2017 -0700 bcache: update bio->bi_opf bypass/writeback REQ_ flag hints Flag for bypass if the IO is for read-ahead or background, unless the read-ahead request is for metadata (eg, from gfs2). Bypass if: bio->bi_opf & (REQ_RAHEAD|REQ_BACKGROUND) && !(bio->bi_opf & REQ_META)) Writeback if: op_is_sync(bio->bi_opf) || bio->bi_opf & (REQ_META|REQ_PRIO) Signed-off-by: Eric Wheeler Reviewed-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/request.c | 8 ++++++++ drivers/md/bcache/writeback.h | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) commit e89d67596e202119ea846cc997f4cf75cb284490 Author: Yijing Wang Date: Fri Oct 13 16:35:32 2017 -0700 bcache: Remove redundant set_capacity set_capacity() has been called in bcache_device_init(), remove the redundant one. Signed-off-by: Yijing Wang Reviewed-by: Eric Wheeler Acked-by: Coly Li Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 3 --- 1 file changed, 3 deletions(-) commit 1dbe32ad0a82f39c6dfb7667c5da5c23b9333664 Author: Coly Li Date: Fri Oct 13 16:35:31 2017 -0700 bcache: rewrite multiple partitions support Current partition support of bcache is confusing and buggy. It tries to trace non-continuous device minor numbers by an ida bit string, and mistakenly mixed bcache device index with minor numbers. This design generates several negative results, - Index of bcache device name is not consecutive under /dev/. If there are 3 bcache devices, they name will be, /dev/bcache0, /dev/bcache16, /dev/bcache32 Only bcache code indexes bcache device name is such an interesting way. - First minor number of each bcache device is traced by ida bit string. One bcache device will occupy 16 bits, this is not a good idea. Indeed only one bit is enough. - Because minor number and bcache device index are mixed, a device index is allocated by ida_simple_get(), but an first minor number is sent into ida_simple_remove() to release the device. It confused original author too. Root cause of the above errors is, bcache code should not handle device minor numbers at all! A standard process to support multiple partitions in Linux kernel is, - Device driver provides major device number, and indexes multiple device instances. - Device driver does not allocat nor trace device minor number, only provides a first minor number of a given device instance, and sets how many minor numbers (paritions) the device instance may have. All rested stuffs are handled by block layer code, most of the details can be found from block/{genhd, partition-generic}.c files. This patch re-writes multiple partitions support for bcache. It makes whole things to be more clear, and uses ida bit string in a more efficeint way. - Ida bit string only traces bcache device index, not minor number. For a bcache device with 128 partitions, only one bit in ida bit string is enough. - Device minor number and device index are separated in concept. Device index is used for /dev node naming, and ida bit string trace. Minor number is calculated from device index and only used to initialize first_minor of a bcache device. - It does not follow any standard for 16 partitions on a bcache device. This patch sets 128 partitions on single bcache device at max, this is the limitation from GPT (GUID Partition Table) and supported by fdisk. Considering a typical device minor number is 20 bits width, each bcache device may have 128 partitions (7 bits), there can be 8192 bcache devices existing on system. For most common deployment for a single server in now days, it should be enough. [minor spelling fixes in commit message by Michael Lyle] Signed-off-by: Coly Li Cc: Eric Wheeler Cc: Junhui Tang Reviewed-by: Michael Lyle Signed-off-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/super.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) commit b1e8139e48b58e3bc1234e619c750ffd1394be2f Author: Coly Li Date: Fri Oct 13 16:35:30 2017 -0700 bcache: fix a comments typo in bch_alloc_sectors() Code comments in alloc.c:bch_alloc_sectors() mentions a function name find_data_bucket(), the correct function name should be pick_data_bucket() indeed. bch_alloc_sectors() is a quite important function in bcache allocation code, fixing the typo may help other people to have less confusion. Signed-off-by: Coly Li Reviewed-by: Tang Junhui Signed-off-by: Jens Axboe drivers/md/bcache/alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91af8300d9c1d7c6b6a2fd754109e08d4798b8d8 Author: Coly Li Date: Fri Oct 13 16:35:29 2017 -0700 bcache: check ca->alloc_thread initialized before wake up it In bcache code, sysfs entries are created before all resources get allocated, e.g. allocation thread of a cache set. There is posibility for NULL pointer deference if a resource is accessed but which is not initialized yet. Indeed Jorg Bornschein catches one on cache set allocation thread and gets a kernel oops. The reason for this bug is, when bch_bucket_alloc() is called during cache set registration and attaching, ca->alloc_thread is not properly allocated and initialized yet, call wake_up_process() on ca->alloc_thread triggers NULL pointer deference failure. A simple and fast fix is, before waking up ca->alloc_thread, checking whether it is allocated, and only wake up ca->alloc_thread when it is not NULL. Signed-off-by: Coly Li Reported-by: Jorg Bornschein Cc: Kent Overstreet Cc: stable@vger.kernel.org Reviewed-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 58f913dce2814a9ea7260e93ed3a949e0d5565e3 Author: Peter Foley Date: Fri Oct 13 16:35:28 2017 -0700 bcache: Avoid nested function definition Fixes below error with clang: ../drivers/md/bcache/sysfs.c:759:3: error: function definition is not allowed here { return *((uint16_t *) r) - *((uint16_t *) l); } ^ ../drivers/md/bcache/sysfs.c:789:32: error: use of undeclared identifier 'cmp' sort(p, n, sizeof(uint16_t), cmp, NULL); ^ 2 errors generated. v2: rename function to __bch_cache_cmp Signed-off-by: Peter Foley Reviewed-by: Coly Li Reviewed-by: Michael Lyle Signed-off-by: Jens Axboe drivers/md/bcache/sysfs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit df73da6317322e731edc53a95f28af7aab7bee00 Author: Biju Das Date: Fri Oct 13 15:49:15 2017 +0100 pinctrl: sh-pfc: r8a7745: Implement voltage switching for SDHI Voltage switching is the same as on the r8a7794. Signed-off-by: Biju Das Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7794.c | 1 + 1 file changed, 1 insertion(+) commit d8ee17f4f2230446309240ed772ece1f8f4ac6fd Author: Geert Uytterhoeven Date: Tue Oct 10 13:09:37 2017 +0200 pinctrl: sh-pfc: r8a77995: Remove USB0_IDIN and USB0_IDPU pins R-Car Gen3 Hardware Manual Errata for Rev 0.55 of September 8, 2017 removed the USB0_IDIN and USB0_IDPU pins on R-Car D3. This change has no functional impact, as these definitions were unused. Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1972d6c0c86dd8620ff9f2811ce875135ffb5405 Author: Yann E. MORIN Date: Mon Apr 10 22:10:34 2017 +0200 MAINTAINERS: relinquish kconfig Since about the time I was actually added in that file, I've been almost entirely absent, which totally sucks, and there is no excuse for my behaviour and for not having relinquished this earlier. My deepest apologies. Signed-off-by: "Yann E. MORIN" Cc: Michal Marek Cc: Masahiro Yamada Cc: Vincent Legoll Cc: Linus Torvalds Signed-off-by: Jiri Kosina MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0fac9e2dff00a2344ffc81d82749181ffae408a2 Merge: a39644b a6127b4 Author: Kalle Valo Date: Mon Oct 16 17:06:54 2017 +0300 Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git Mark Brown reported that there are conflicts in iwlwifi between the two trees so fix those now. commit 65637901a3409f8a7952750e975536bde70fa1f8 Author: Lorenzo Pieralisi Date: Fri Oct 13 15:09:50 2017 +0800 ACPI/IORT: Enable SMMUv3/PMCG IORT MSI domain set-up ITS specific mappings for SMMUv3/PMCG components can be retrieved through special index mapping entries introduced in IORT revision C. Introduce a new API iort_set_device_domain() to set the MSI domain for SMMUv3/PMCG nodes (extendable to any future IORT node requiring special index ITS mapping entries) that represent MSI through special index mappings in order to enable MSI support for the devices their nodes represent. Signed-off-by: Lorenzo Pieralisi Signed-off-by: Hanjun Guo drivers/acpi/arm64/iort.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 86456a3f19c505049341eeb51cf9bb874d3b4752 Author: Hanjun Guo Date: Fri Oct 13 15:09:49 2017 +0800 ACPI/IORT: Add SMMUv3 specific special index mapping handling IORT revision C introduced a mapping entry binding to describe ITS device ID mapping for SMMUv3 MSI interrupts. Enable the single mapping flag (ie that is used by SMMUv3 component for its special index mappings) for the SMMUv3 node in the IORT mapping API and add IORT code to handle special index mapping entry for the SMMUv3 IORT nodes to enable their MSI interrupts. In case the ACPICA for SMMUv3 device ID mapping is not ready, use the ACPICA version as a guard for function iort_get_id_mapping_index(). Signed-off-by: Hanjun Guo [lorenzo.pieralisi@arm.com: patch split, typos fixing, rewrote the log] Signed-off-by: Lorenzo Pieralisi drivers/acpi/arm64/iort.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit 8c8df8dcd69ea65cedb4d0b19c34a38c9fb68466 Author: Hanjun Guo Date: Fri Oct 13 15:09:48 2017 +0800 ACPI/IORT: Enable special index ITS group mappings for IORT nodes IORT revision C introduced SMMUv3 and PMCG MSI support by adding specific mapping entries in the SMMUv3/PMCG subtables to retrieve the device ID and the ITS group it maps to for a given SMMUv3/PMCG IORT node. Introduce a mapping function (ie iort_get_id_mapping_index()), that for a given IORT node looks up if an ITS specific ID mapping entry exists and if so retrieve the corresponding mapping index in the IORT node mapping array. Since an ITS specific index mapping can be present for an IORT node that is not a leaf node (eg SMMUv3 - to describe its own ITS device ID) special handling is required for two steps mapping cases such as PCI/NamedComponent--->SMMUv3--->ITS because the SMMUv3 ITS specific index mapping entry should be skipped to prevent the IORT API from considering the mapping entry as a regular mapping one. If we take the following IORT topology example: |----------------------| | Root Complex Node | |----------------------| | map entry[x] | |----------------------| | id value | | output_reference | |---|------------------| | | |----------------------| |-->| SMMUv3 | |----------------------| | SMMUv3 dev ID | | mapping index 0 | |----------------------| | map entry[0] | |----------------------| | id value | | output_reference-----------> ITS 1 (SMMU MSI domain) |----------------------| | map entry[1] | |----------------------| | id value | | output_reference-----------> ITS 2 (PCI MSI domain) |----------------------| where the SMMUv3 ITS specific mapping entry is index 0 and it represents the SMMUv3 ITS specific index mapping entry (describing its own ITS device ID), we need to skip that mapping entry while carrying out the Root Complex Node regular mappings to prevent erroneous translations. Reuse the iort_get_id_mapping_index() function to detect the ITS specific mapping index for a specific IORT node and skip it in the IORT mapping API (ie iort_node_map_id()) loop to prevent considering it a normal PCI/Named Component ID mapping entry. Signed-off-by: Hanjun Guo [lorenzo.pieralisi@arm.com: split patch/rewrote commit log] Signed-off-by: Lorenzo Pieralisi drivers/acpi/arm64/iort.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) commit 0a71d8b95f8adc343d986bf3093fc1baf59df4b1 Author: Hanjun Guo Date: Fri Oct 13 15:09:47 2017 +0800 ACPI/IORT: Look up IORT node through struct fwnode_handle pointer Current IORT code provides a function (ie iort_get_fwnode()) which looks up a struct fwnode_handle pointer through a struct acpi_iort_node pointer for SMMU components but it lacks a function that implements the reverse look-up, namely struct fwnode_handle* -> struct acpi_iort_node*. Devices that are not IORT named components cannot be retrieved through their associated IORT named component scan interface because they just are not represented in the ACPI namespace; the reverse look-up is therefore required for all platform devices that represent IORT nodes (eg SMMUs) so that the struct acpi_iort_node* can be retrieved from the struct device->fwnode pointer. Signed-off-by: Hanjun Guo [lorenzo.pieralisi@arm.com: re-indented/rewrote the commit log] Signed-off-by: Lorenzo Pieralisi drivers/acpi/arm64/iort.c | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) commit 896dd2c3248422e1e7711cc582615844e2f9de86 Author: Lorenzo Pieralisi Date: Wed Sep 20 17:03:58 2017 +0100 ACPI/IORT: Make platform devices initialization code SMMU agnostic The way current IORT code initializes platform devices for SMMU nodes is somewhat tied (mostly for naming convention) to the SMMU nodes themselves but it need not be in that it is completely generic and can easily be made so by structures renaming and code reshuffling. Rework IORT platform devices initialization code to make the functions and data structures SMMU agnostic. No functional changes intended. Signed-off-by: Lorenzo Pieralisi Acked-by: Hanjun Guo Cc: Hanjun Guo Cc: Sudeep Holla drivers/acpi/arm64/iort.c | 63 ++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 33 deletions(-) commit e3d4939267925ab66f39123744ffb4bc74a13149 Author: Lorenzo Pieralisi Date: Thu Sep 28 14:03:33 2017 +0100 ACPI/IORT: Improve functions return type/storage class specifier indentation Some functions definition indentations are using a style that is frowned upon with return value type/storage class specifier in a separate line. Reindent the function definitions to fix them. Signed-off-by: Lorenzo Pieralisi Acked-by: Hanjun Guo Cc: Hanjun Guo Cc: Sudeep Holla drivers/acpi/arm64/iort.c | 36 +++++++++++++++++------------------- include/linux/acpi_iort.h | 4 ++-- 2 files changed, 19 insertions(+), 21 deletions(-) commit 758081312e316703ed6928c8bcdb9f0a84e2ee92 Author: Lorenzo Pieralisi Date: Thu Sep 28 13:57:10 2017 +0100 ACPI/IORT: Remove leftover ACPI_IORT_SMMU_V3_PXM_VALID guard The conditional ACPI_IORT_SMMU_V3_PXM_VALID guard around arm_smmu_v3_set_proximity() was added to manage a cross tree ACPICA merge dependency; with ACPICA changes merged in: commit c944230064eb ("ACPICA: iasl: Update to IORT SMMUv3 disassembling") the guard has become useless. Remove it. Signed-off-by: Lorenzo Pieralisi Acked-by: Hanjun Guo Cc: Hanjun Guo Cc: Sudeep Holla Cc: Ganapatrao Kulkarni drivers/acpi/arm64/iort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee10b9c92758e9d7951b28cb6cd4221d51c1654f Author: Arvind Yadav Date: Mon Sep 25 12:54:43 2017 +0530 acpi/arm64: pr_err() strings should end with newlines pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav Signed-off-by: Lorenzo Pieralisi Acked-by: Hanjun Guo drivers/acpi/arm64/gtdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0ad7c0f37478853f12a723f46f87cd672ca9d67 Author: Boris BREZILLON Date: Thu Oct 5 13:29:17 2017 +0200 drm/gem-cma-helper: Change the level of the allocation failure message drm_gem_cma_create() prints an error message when dma_alloc_wc() fails to allocate the amount of memory we requested. This can lead to annoying error messages when CMA is only one possible source of memory for the BO allocation. Turn this error message into a debug one. Signed-off-by: Boris Brezillon Reviewed-by: Daniel Vetter Reviewed-by: Eric Engestrom Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20171005112917.15949-1-boris.brezillon@free-electrons.com drivers/gpu/drm/drm_gem_cma_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c9a66ec0e362fe9aff545b755430e56f58f2b96 Merge: c2c4be2 9ca250a Author: Andreas Gruenbacher Date: Mon Oct 16 15:06:23 2017 +0200 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 commit 761f2e1ed8822cf12378c857de337290d0c82a81 Author: Christoph Hellwig Date: Thu Oct 5 18:46:46 2017 +0200 nvme: simplify compat_ioctl handling We can just use our normal ioctl handler for the compat case and remove the boilerplate code for it. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy drivers/nvme/host/core.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 49815404bd3870232de8800430a83d7d498ae1e2 Author: Colin Ian King Date: Mon Oct 16 13:35:58 2017 +0100 ALSA: 6fire: remove unused variable card The pointer card is being assigned a value but it is never used. Remove this redundant variable. Cleans up clang warning: Value stored to 'card' is never read Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/usb/6fire/chip.c | 2 -- 1 file changed, 2 deletions(-) commit 6512ab68e2bf6a63b0607abfdaa7f2bb7caca26f Author: Colin Ian King Date: Mon Oct 16 13:19:21 2017 +0100 ALSA: asihpi: clean up a couple of build warnings Variable dpcm is never used and hence can be removed. Variable runtime is being assigned but is never read, so the assignment is redundant and can be removed. Cleans up two clang warnings: Value stored to 'dpcm' is never read Value stored to 'runtime' is never read Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/pci/asihpi/asihpi.c | 3 --- 1 file changed, 3 deletions(-) commit f08da327d40b4975721f6e459e51f4a1cf4d4dcc Author: Amelie Delaunay Date: Mon Aug 28 16:20:00 2017 +0200 ARM: dts: stm32: Enable USB HS on stm32f746-disco This patch enables USB HS on stm32f746-disco (Host mode). Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f746-disco.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit d3e745dcfb5157f30124189fd58d518aec5b3206 Author: Amelie Delaunay Date: Mon Aug 28 16:20:00 2017 +0200 ARM: dts: stm32: Enable USB HS on stm32746g-eval This patch enables USB HS on stm32746g-eval (Host mode). Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32746g-eval.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit ec1e5a97ea2900879e2dffa03acaf3b5cabd43a1 Author: Amelie Delaunay Date: Mon Oct 16 14:14:00 2017 +0200 ARM: dts: stm32: Add USB HS support for STM32F746 MCU This patch adds the USB pins and nodes for USB HS core on STM32F746 SoC. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f746.dtsi | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 8bc931495d4bfcde6bb242a478ddd1186ae29301 Author: Michael Bringmann Date: Fri Sep 8 15:47:56 2017 -0500 powerpc/vphn: Fix numa update end-loop bug powerpc/vphn: On Power systems with shared configurations of CPUs and memory, there are some issues with the association of additional CPUs and memory to nodes when hot-adding resources. This patch fixes an end-of-updates processing problem observed occasionally in numa_update_cpu_topology(). Signed-off-by: Michael Bringmann Signed-off-by: Michael Ellerman arch/powerpc/mm/numa.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit cee5405da4020b0b0233bc8fb7c8da7322d2c52e Author: Michael Bringmann Date: Fri Sep 8 15:47:47 2017 -0500 powerpc/hotplug: Improve responsiveness of hotplug change powerpc/hotplug: On Power systems with shared configurations of CPUs and memory, there are some issues with the association of additional CPUs and memory to nodes when hot-adding resources. During hotplug CPU operations, this patch resets the timer on topology update work function to a small value to better ensure that the CPU topology is detected and configured sooner. Signed-off-by: Michael Bringmann Signed-off-by: Michael Ellerman arch/powerpc/include/asm/topology.h | 8 ++++++++ arch/powerpc/mm/numa.c | 23 ++++++++++++++++++++++- arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 ++ 3 files changed, 32 insertions(+), 1 deletion(-) commit a3496e9137f6f58439da29a761725e083229c4a8 Author: Michael Bringmann Date: Fri Sep 8 15:47:36 2017 -0500 powerpc/vphn: Improve recognition of PRRN/VPHN powerpc/vphn: On Power systems with shared configurations of CPUs and memory, there are some issues with the association of additional CPUs and memory to nodes when hot-adding resources. This patch updates the initialization checks to independently recognize PRRN or VPHN support. Signed-off-by: Michael Bringmann Signed-off-by: Michael Ellerman arch/powerpc/mm/numa.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 17f444c0549f2ce037646871e748cf2dc375bce9 Author: Michael Bringmann Date: Fri Sep 8 15:47:27 2017 -0500 powerpc/vphn: Update CPU topology when VPHN enabled powerpc/vphn: On Power systems with shared configurations of CPUs and memory, there are some issues with the association of additional CPUs and memory to nodes when hot-adding resources. This patch corrects the currently broken capability to set the topology for shared CPUs in LPARs. At boot time for shared CPU lpars, the topology for each CPU was being set to node zero. Now when numa_update_cpu_topology() is called appropriately, the Virtual Processor Home Node (VPHN) capabilities information provided by the pHyp allows the appropriate node in the shared configuration to be selected for the CPU. Signed-off-by: Michael Bringmann Signed-off-by: Michael Ellerman arch/powerpc/mm/numa.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 733e4a4c4467033918f4e64f797b03efe209d82c Author: Balbir Singh Date: Fri Sep 29 14:26:55 2017 +1000 powerpc/mce: hookup memory_failure for UE errors If we are in user space and hit a UE error, we now have the basic infrastructure to walk the page tables and find out the effective address that was accessed, since the DAR is not valid. We use a work_queue content to hookup the bad pfn, any other context causes problems, since memory_failure itself can call into schedule() via lru_drain_ bits. We could probably poison the struct page to avoid a race between detection and taking corrective action. Signed-off-by: Balbir Singh Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/mce.c | 70 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 3 deletions(-) commit 01eaac2b0591f7114d9de5cc65c88352de0daca6 Author: Balbir Singh Date: Fri Sep 29 14:26:54 2017 +1000 powerpc/mce: Hookup ierror (instruction) UE errors Hookup instruction errors (UE) for memory offling via memory_failure() in a manner similar to load/store errors (derror). Since we have access to the NIP, the conversion is a one step process in this case. Signed-off-by: Balbir Singh Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/mce_power.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit ba41e1e1ccb9771ce41a3b8e2121f95486e76ac9 Author: Balbir Singh Date: Fri Sep 29 14:26:53 2017 +1000 powerpc/mce: Hookup derror (load/store) UE errors Extract physical_address for UE errors by walking the page tables for the mm and address at the NIP, to extract the instruction. Then use the instruction to find the effective address via analyse_instr(). We might have page table walking races, but we expect them to be rare, the physical address extraction is best effort. The idea is to then hook up this infrastructure to memory failure eventually. Signed-off-by: Balbir Singh Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/exception-64s.h | 5 ++ arch/powerpc/include/asm/mce.h | 2 +- arch/powerpc/kernel/exceptions-64s.S | 2 +- arch/powerpc/kernel/mce.c | 6 ++- arch/powerpc/kernel/mce_power.c | 87 ++++++++++++++++++++++++++++++-- 5 files changed, 94 insertions(+), 8 deletions(-) commit 81b61fa7a065e639d097b09c303e3212e4264fac Author: Balbir Singh Date: Fri Sep 29 14:26:52 2017 +1000 powerpc/mce: Align the print of physical address better Use the same alignment as Effective address. Signed-off-by: Balbir Singh Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/mce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73e341eb6bea01fde706d10d7edba97f154d9c5f Author: Balbir Singh Date: Fri Sep 29 14:26:51 2017 +1000 powerpc/mce: Remove unused function get_mce_fault_addr() There are no users of get_mce_fault_addr() since commit 1363875bdb63 ("powerpc/64s: fix handling of non-synchronous machine checks") removed the last usage. Signed-off-by: Balbir Singh Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mce.h | 2 -- arch/powerpc/kernel/mce.c | 39 --------------------------------------- 2 files changed, 41 deletions(-) commit 162d58c26d65e1486d18436eb151148a7f9886e5 Author: Alexandre Torgue Date: Mon Oct 16 13:45:58 2017 +0200 ARM: dts: stm32: change pinctrl bindings definition Initially each pin was declared in "include/dt-bindings/stm32-pinfunc.h" and each definition contained SOC names (ex: STM32F429_PA9_FUNC_USART1_TX). Since this approach was approved, the number of supported MCU has increased (STM32F429/STM32F469/STM32f746/STM32H743). To avoid to add a new file in "include/dt-bindings" each time a new STM32 SOC arrives I propose a new approach which consist to use a macro to define pin muxing in device tree. All STM32 will use the common macro to define pinmux. Furthermore, it will make STM32 maintenance and integration of new SOC easier . Signed-off-by: Alexandre TORGUE Reviewed-by: Vikas MANOCHA Reviewed-by: Benjamin Gaignard Acked-by: Linus Walleij Acked-by: Rob Herring .../bindings/pinctrl/st,stm32-pinctrl.txt | 22 +- arch/arm/boot/dts/stm32f4-pinctrl.dtsi | 176 +-- arch/arm/boot/dts/stm32f746.dtsi | 16 +- arch/arm/boot/dts/stm32h743-pinctrl.dtsi | 10 +- include/dt-bindings/pinctrl/stm32-pinfunc.h | 30 + include/dt-bindings/pinctrl/stm32f429-pinfunc.h | 1239 --------------- include/dt-bindings/pinctrl/stm32f746-pinfunc.h | 1324 ---------------- include/dt-bindings/pinctrl/stm32h7-pinfunc.h | 1612 -------------------- 8 files changed, 151 insertions(+), 4278 deletions(-) commit 6d3b3745c5f3b4db3ab34b94a81ca47c4a9833a8 Author: Gabriel Fernandez Date: Fri Oct 6 11:12:39 2017 +0200 ARM: dts: stm32: Enable STM32H743 clock driver This patch enables clock driver for STM32H743 soc. Signed-off-by: Gabriel Fernandez Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32h743-pinctrl.dtsi | 22 ++++++------ arch/arm/boot/dts/stm32h743.dtsi | 57 ++++++++++++++++++++++---------- 2 files changed, 50 insertions(+), 29 deletions(-) commit d69455cda1091c83e123e3bb2ca11f7f25e500c6 Author: Gabriel Fernandez Date: Thu Sep 28 14:12:00 2017 +0200 ARM: dts: stm32: fix hse clock frequency on STM32H743 Eval board Fix HSE frequency to 25Mhz for STM32H743 Eval Board Signed-off-by: Gabriel Fernandez Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32h743i-eval.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bd7b77af8e48709f34d38f50846e0a2c2882f4c Author: Benjamin Gaignard Date: Fri Oct 6 09:14:00 2017 +0200 ARM: dts: stm32: add Timers driver for stm32f746 MCU Add Timers and it sub-nodes into DT for stm32f746 family. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f746.dtsi | 260 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 260 insertions(+) commit e40992cb223faf46bc6ead2b109f9727f57dae63 Author: Pierre-Yves MORDRET Date: Thu Oct 5 17:50:34 2017 +0200 ARM: dts: stm32: Add DMAMUX support for STM32H743 SoC This patch adds DMAMUX support for STM32H743 SoC. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32h743.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 74f4c3228a254f4ac84d2ea2ba2cd216318b20e0 Author: Fabrice Gasnier Date: Thu Oct 5 15:15:20 2017 +0200 ARM: dts: stm32: Add lptimer definitions to stm32h743 Add lptimer definitions, depending on features they provide: - lptimer1 & 2 can act as PWM, trigger and encoder/counter - lptimer3 can act as PWM and trigger - lptimer4 & 5 can act as PWM Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32h743.dtsi | 103 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) commit 846f2f1c3da7590ef02007d2a84f3791a85033ee Author: Fabrice Gasnier Date: Thu Oct 5 14:39:01 2017 +0200 ARM: dts: stm32: add vrefbuf to stm32h743 Add STM32H743 VREFBUF (Voltage Reference Buffer) definition. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32h743.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit d0b9a8c517d2d2b48967bb503cb4e345a6eb1251 Author: Pierre-Yves MORDRET Date: Mon Oct 16 13:58:57 2017 +0200 ARM: dts: stm32: Add I2C1 support for STM32F746 eval board This patch adds I2C1 support for STM32F746 eval board Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32746g-eval.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 41e4b7dc6e1b6d717edb8679759c2bde138f78a9 Author: Colin Ian King Date: Mon Oct 16 12:18:39 2017 +0100 ALSA: emux: remove unused redundant variable p2 The variable p2 is being assigned but never used, it is redundant and can be safely removed. Cleans up clang warning: Value stored to 'p2' is never read. Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/synth/emux/emux_oss.c | 2 -- 1 file changed, 2 deletions(-) commit 40ddfe659a19baa2ccc73899a150ca03373c44aa Author: Colin Ian King Date: Sun Oct 15 22:16:45 2017 +0100 ALSA: ens137x: remove redundant variable result Variable result is being assigned a value from a calculation however the variable is never read, so this redundant variable can be removed. Cleans up clang warning: Value stored to 'result' is never read Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/pci/ens1370.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit de168981384097f810d3ecfb4bcfa5019cc7c160 Author: Colin Ian King Date: Sun Oct 15 22:06:44 2017 +0100 ALSA: pcm: remove redundant variable runtime An earlier commit removed the access to variable runtime and we are now left with unused variable that is redundant, so remove it. Cleans up the clang warning: Value stored to 'runtime' is never read Fixes: e11f0f90a626 ("ALSA: pcm: remove SNDRV_PCM_IOCTL1_INFO internal command") Signed-off-by: Colin Ian King Signed-off-by: Takashi Iwai sound/core/pcm_native.c | 2 -- 1 file changed, 2 deletions(-) commit 1fd51d9d97059cb7dd0bf7a3b6f7cb609d485718 Author: Weinan Li Date: Sun Oct 15 11:55:25 2017 +0800 drm/i915: enable to read CSB and CSB write pointer from HWSP in GVT-g VM Let GVT-g VM read the CSB and CSB write pointer from virtual HWSP, not all the host support this feature, need to check the BIT(3) of caps in PVINFO. v3 : Remove unnecessary comments. v4 : Separate VM enable patch with GVT-g implementation patch due to code dependency. v5 : Use inline for GVT virtual HWSP caps check function. v6 : Comments refine. Signed-off-by: Weinan Li Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/1508039725-1066-1-git-send-email-weinan.z.li@intel.com drivers/gpu/drm/i915/i915_pvinfo.h | 1 + drivers/gpu/drm/i915/i915_vgpu.h | 6 ++++++ drivers/gpu/drm/i915/intel_engine_cs.c | 9 +++++---- drivers/gpu/drm/i915/intel_lrc.c | 1 - 4 files changed, 12 insertions(+), 5 deletions(-) commit 7f581d03bd8fb169075f77121d1d6c9dc29d5aad Merge: fe3af62 4cebc5d Author: Martin Schwidefsky Date: Mon Oct 16 12:43:12 2017 +0200 Merge tag 'vfio-ccw-20171016' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into features Pull vfio-ccw update from Cornelia Huck: "Some improvements in data handling for vfio-ccw." commit 503c3117d05c184b431e403cd05c463ac41370f0 Author: Jan Kara Date: Mon Oct 16 11:55:52 2017 +0200 udf: Remove some outdate references from documentation Remove outdated references to maintainer and mailing list from the documentation - reference MAINTAINERS instead. Also update reference to current repository of udf-tools. Signed-off-by: Jan Kara Documentation/filesystems/udf.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f20d89ac0fefad2465e6ce6d64e9ff82e33889dd Author: Geert Uytterhoeven Date: Thu Oct 12 11:35:05 2017 +0200 ARM: dts: r7s72100: Add clock for CA9 CPU core Improve hardware description by adding a clock property to the device node corresponding to the CA9 CPU core. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100.dtsi | 1 + 1 file changed, 1 insertion(+) commit 44842cc8a89aa7742bc47737aa75da5910aa5f33 Author: Geert Uytterhoeven Date: Thu Oct 12 11:35:04 2017 +0200 dt-bindings: clk: r7s72100: Add missing I and G clocks Add the missing definitions for the I (CPU) and G (Image Processing) clocks, so these clocks can be referred to from device nodes in DT. Note that these clocks are already fully supported otherwise (DT bindings, Linux driver, r7s72100.dtsi), they were just omitted from the header file. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman include/dt-bindings/clock/r7s72100-clock.h | 2 ++ 1 file changed, 2 insertions(+) commit e5042d0b97be6a831f9f204f3574d73b3f947fa5 Author: Geert Uytterhoeven Date: Thu Oct 12 11:35:16 2017 +0200 ARM: dts: sh73a0: Add clocks for CA9 CPU cores Improve hardware description by adding clocks properties to the device nodes corresponding to the CA9 CPU cores. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/sh73a0.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 5614e69269232da1f378e5be92714b96cdb090ef Author: Geert Uytterhoeven Date: Thu Oct 12 11:35:15 2017 +0200 ARM: dts: r8a7794: Add missing clock for secondary CA7 CPU core Currently only the primary CPU in the CA7 cluster has a clocks property, while the secondary CPU core is driven by the same clock. Add the missing clocks property to fix this. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794.dtsi | 1 + 1 file changed, 1 insertion(+) commit f359fd3bba71176a122939fe3db9c7f20000d3f0 Author: Geert Uytterhoeven Date: Thu Oct 12 11:35:14 2017 +0200 ARM: dts: r8a7793: Add missing clock for secondary CA15 CPU core Currently only the primary CPU in the CA15 cluster has a clocks property, while the secondary CPU core is driven by the same clock. Add the missing clocks property to fix this. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7793.dtsi | 1 + 1 file changed, 1 insertion(+) commit 8684a24caa3d59d9ba03f1e6f9653b49ac78ec04 Author: Geert Uytterhoeven Date: Thu Oct 12 11:35:13 2017 +0200 ARM: dts: r8a7792: Add missing clock for secondary CA15 CPU core Currently only the primary CPU in the CA15 cluster has a clocks property, while the secondary CPU core is driven by the same clock. Add the missing clocks property to fix this. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 1 + 1 file changed, 1 insertion(+) commit 60b672fe7e28358c1cffdab4724b203f6cf2901b Author: Geert Uytterhoeven Date: Thu Oct 12 11:35:12 2017 +0200 ARM: dts: r8a7791: Add missing clock for secondary CA15 CPU core Currently only the primary CPU in the CA15 cluster has a clocks property, while the secondary CPU core is driven by the same clock. Add the missing clocks property to fix this. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791.dtsi | 1 + 1 file changed, 1 insertion(+) commit aea0089ae8058a9bf4c9766f3208809fc28c99f0 Author: Geert Uytterhoeven Date: Thu Oct 12 11:35:11 2017 +0200 ARM: dts: r8a7790: Add clocks for CA7 CPU cores Currently only the CPU cores in the CA15 cluster have clocks properties. Add the missing clocks properties for the CPU cores in the CA7 cluster to fix this. Signed-off-by: Geert Uytterhoeven Tested-by: Simon Horman Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit aa4c2fdf495f000fa9ae57c073c0c4575c21983e Author: Geert Uytterhoeven Date: Thu Oct 12 11:35:10 2017 +0200 ARM: dts: r8a7790: Add missing clocks for secondary CA15 CPU cores Currently only the primary CPU in the CA15 cluster has a clocks property, while the secondary CPU cores are driven by the same clock. Add the missing clocks properties to fix this. Signed-off-by: Geert Uytterhoeven Tested-by: Simon Horman Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit fa9f95a3d1bf827e7b83310e5e5c83f36382e25f Author: Geert Uytterhoeven Date: Thu Oct 12 11:35:09 2017 +0200 ARM: dts: r8a7779: Add clocks for CA9 CPU cores Improve hardware description by adding clocks properties to the device nodes corresponding to the CA9 CPU cores. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7779.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit abdc0eb06964fe1d2fea6dd1391b734d0590365d Author: Jan Kara Date: Mon Oct 16 11:38:11 2017 +0200 udf: Avoid overflow when session starts at large offset When session starts beyond offset 2^31 the arithmetics in udf_check_vsd() would overflow. Make sure the computation is done in large enough type. Reported-by: Cezary Sliwa Signed-off-by: Jan Kara fs/udf/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3e865a35a4f8cee0d0b86d7cd6d05908f01a874 Author: Geert Uytterhoeven Date: Thu Oct 12 11:35:08 2017 +0200 ARM: dts: r8a7778: Add clock for CA9 CPU core Improve hardware description by adding a clock property to the device node corresponding to the CA9 CPU core. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7778.dtsi | 1 + 1 file changed, 1 insertion(+) commit a60ddf507dda0ede43b72d348283d8725a5a83c7 Author: Geert Uytterhoeven Date: Thu Oct 12 11:35:07 2017 +0200 ARM: dts: r8a7743: Add missing clock for secondary CA15 CPU core Currently only the primary CPU in the CA15 cluster has a clocks property, while the secondary CPU core is driven by the same clock. Add the missing clocks property to fix this. Signed-off-by: Geert Uytterhoeven Reviewed-by: Chris Paterson Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 1 + 1 file changed, 1 insertion(+) commit a7869a5bc82682ac31452e178b4b3e9f8b48e7df Author: Geert Uytterhoeven Date: Thu Oct 12 11:35:06 2017 +0200 ARM: dts: r8a73a4: Add clock for CA15 CPU0 core Improve hardware description by adding a clocks property to the device node corresponding to the primary CA15 CPU core, which is for now the only one described. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a73a4.dtsi | 1 + 1 file changed, 1 insertion(+) commit 2e20c9ddae0b3770abca4b9b1a5243d6841bdd84 Author: Jérémy Lefaure Date: Sun Oct 15 22:33:56 2017 -0400 drm/via: use ARRAY_SIZE Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Reviewed-by: Thierry Reding Signed-off-by: Jérémy Lefaure Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171016023357.20174-1-jeremy.lefaure@lse.epita.fr drivers/gpu/drm/via/via_verifier.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit c7d234dc671d17c4c9b89fd30102a2fc619ecf7e Author: Jérémy Lefaure Date: Sun Oct 15 22:30:46 2017 -0400 drm/gma500: use ARRAY_SIZE Using the ARRAY_SIZE macro improves the readability of the code. Also, it is useless to re-invent it. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Reviewed-by: Thierry Reding Signed-off-by: Jérémy Lefaure Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171016023047.19145-1-jeremy.lefaure@lse.epita.fr drivers/gpu/drm/gma500/psb_intel_sdvo.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 7679eb20353dc74e47fbc97b2d77fd4f88a77c0f Author: Marek Szyprowski Date: Wed Oct 11 11:25:13 2017 +0200 clk: samsung: Add a separate driver for Exynos4412 ISP clocks Some registers for the Exynos 4412 ISP (Camera subsystem) clocks are located in the ISP power domain. Because those registers are also located in a different memory region than the main clock controller, support for them can be provided by a separate clock controller. This in turn allows to almost seamlessly make it aware of the power domain using recently introduced runtime PM support for clocks. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/Makefile | 1 + drivers/clk/samsung/clk-exynos4412-isp.c | 179 +++++++++++++++++++++++++++++++ 2 files changed, 180 insertions(+) commit 8ca8ac1024841781f544427b7ca5684e4c5637a9 Author: Marek Szyprowski Date: Wed Oct 11 11:25:12 2017 +0200 clk: samsung: Add dt bindings for Exynos4412 ISP clock controller Some registers for the Exynos 4412 ISP (Camera subsystem) clocks are located in the ISP power domain. Because those registers are also located in a different memory region than the main clock controller, support for them can be provided by a separate clock controller. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Sylwester Nawrocki .../devicetree/bindings/clock/exynos4-clock.txt | 43 ++++++++++++++++++++++ include/dt-bindings/clock/exynos4.h | 35 ++++++++++++++++++ 2 files changed, 78 insertions(+) commit 75920aac275a930b4259b46e555d5b90f713e084 Author: Marek Szyprowski Date: Wed Oct 11 11:25:11 2017 +0200 clk: samsung: Instantiate Exynos4412 ISP clocks only when available Some registers for the Exynos 4412 ISP (Camera subsystem) clocks are located in the ISP power domain. Instantiate those clocks only when provided clock registers resource covers those registers. This is a preparation for adding a separate clock driver for ISP clocks, which will be integrated with power domain using runtime PM feature. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos4.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 4cebc5d6a6ff41c0266d235aa4854b062d34ad09 Author: Dong Jia Shi Date: Wed Oct 11 04:38:22 2017 +0200 vfio: ccw: validate the count field of a ccw before pinning If the count field of a ccw is zero, there is no need to try to pin page(s) for it. Let's check the count value before starting pinning operations. Reviewed-by: Pierre Morel Signed-off-by: Dong Jia Shi Message-Id: <20171011023822.42948-3-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 688c29533ffc969773bc860d07d3a5f1995f5878 Author: Dong Jia Shi Date: Wed Oct 11 04:38:21 2017 +0200 vfio: ccw: bypass bad idaw address when fetching IDAL ccws We currently return the same error code (-EFAULT) to indicate two different error cases: 1. a bug in vfio-ccw implementation has been found. 2. a buggy channel program has been detected. This brings difficulty for userland program (specifically Qemu) to handle. Let's use -EFAULT to only indicate the first case. For the second case, we simply hand over the ccws to lower level for further handling. Notice: Once a bad idaw address is detected, the current behavior is to suppress the ssch. With this fix, the channel program will be accepted, and part of the channel program (the part ahead of the bad idaw) could possibly be executed by the device before I/O conclusion. Suggested-by: Halil Pasic Reviewed-by: Pierre Morel Signed-off-by: Dong Jia Shi Message-Id: <20171011023822.42948-2-bjsdjshi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck drivers/s390/cio/vfio_ccw_cp.c | 4 ---- 1 file changed, 4 deletions(-) commit e4ed2b5370a2df2b1feeb970904d2f7761c241c9 Merge: 4fcae77 33d930e Author: Greg Kroah-Hartman Date: Mon Oct 16 10:33:54 2017 +0200 Merge 4.14-rc5 into usb-next We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit bfddd1469740ea27439afa866bff41ef1cd22bb1 Author: Chen-Yu Tsai Date: Sat Oct 14 12:02:52 2017 +0800 drm/sun4i: hdmi: Move PAD_CTRL1 setting to mode_set function Initially we configured the PAD_CTRL1 register at probe/bind time. However it seems the HDMI controller will modify some of the bits in this register by itself. On the A10 it is particularly annoying as it toggles the output invert bits, which inverts the colors on the display output. The U-boot driver this driver is based on sets this register twice, though it seems it's only needed for actual display output. Hence we move it to the mode_set function. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171014040252.9621-8-wens@csie.org drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit 31f5232effd30808f96772f123300d9d13f0cfd1 Author: Chen-Yu Tsai Date: Sat Oct 14 12:02:51 2017 +0800 drm/sun4i: hdmi: Document PAD_CTRL1 output invert bits While debugging inverted color from the HDMI output on the A10, I found that the lowest 3 bits were set. These were cleared on A20 boards that had normal display output. By manually toggling these bits the mapping of the color components to these bits was found. While these are not used anywhere, it would be nice to document them somewhere. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171014040252.9621-7-wens@csie.org drivers/gpu/drm/sun4i/sun4i_hdmi.h | 5 +++++ 1 file changed, 5 insertions(+) commit 936598d16e9111e3802d45a60c028ad36a3a7013 Author: Chen-Yu Tsai Date: Sat Oct 14 12:02:49 2017 +0800 drm/sun4i: backend: Add comment explaining why registers are cleared Many of the backend's layer configuration registers have undefined default values. This poses a risk as we use regmap_update_bits in some places, and don't overwrite the whole register. At probe/bind time we explicitly clear all the control registers by writing 0 to them. This patch adds a more detailed explanation on why we're doing this. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171014040252.9621-5-wens@csie.org drivers/gpu/drm/sun4i/sun4i_backend.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit cff2192f807d442e498d43a20e54c6851cd4cb56 Author: Chen-Yu Tsai Date: Sat Oct 14 12:02:48 2017 +0800 drm/sun4i: backend: Use drm_fb_cma_get_gem_addr() to get display memory Commit 4636ce93d5b2 ("drm/fb-cma-helper: Add drm_fb_cma_get_gem_addr()") adds a new helper, which covers fetching a drm_framebuffer's GEM object and calculating the buffer address for a given plane. This patch uses this helper to replace our own open coded version of the same function. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171014040252.9621-4-wens@csie.org drivers/gpu/drm/sun4i/sun4i_backend.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) commit 8270249fbeaf0a37250b0c533fd3613886ca3493 Author: Chen-Yu Tsai Date: Sat Oct 14 12:02:47 2017 +0800 drm/sun4i: backend: Create regmap after access is possible The backend has various clocks and reset controls that need to be enabled and deasserted before register access is possible. Move the creation of the regmap to after the clocks and reset controls have been configured where it makes more sense. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171014040252.9621-3-wens@csie.org drivers/gpu/drm/sun4i/sun4i_backend.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e8afb7b67fbadfbb2b4fd74bf34566e64cbcbe6f Author: Chen-Yu Tsai Date: Sat Oct 14 12:02:46 2017 +0800 drm/sun4i: don't add components that are already in the queue Even though the components framework can handle duplicate entries, the extra entries cause a lot more debug messages to be generated, which would be confusing to developers not familiar with our driver and the framework in general. Instead, we can scan the relatively small queue and check if the component to be added is already queued up. Since the display pipelines are symmetrical (not considering the third display pipeline on the A80), and we add components level by level, when we get to the second instance at the same level, any shared downstream components would already be in the queue. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171014040252.9621-2-wens@csie.org drivers/gpu/drm/sun4i/sun4i_drv.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c8ee880415894e75b5289618dc2b8108bdd96a23 Author: Simon Horman Date: Fri Oct 13 14:33:11 2017 +0200 arm64: dts: r8a7796: Use R-Car GPIO Gen3 fallback compat string Use newly added R-Car GPIO Gen3 fallback compat string in place of now deprecated non-generation specific R-Car GPIO fallback compat string in the DT of the r8a7796 SoC. This should have no run-time effect as the driver matches against the per-SoC compat string before considering the fallback compat string. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a7796.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit d6d7037cb2f8d33cae5384eeaea9b5248fb383ae Author: Simon Horman Date: Fri Oct 13 14:33:10 2017 +0200 arm64: dts: r8a7795: Use R-Car GPIO Gen3 fallback compat string Use newly added R-Car GPIO Gen3 fallback compat string in place of now deprecated non-generation specific R-Car GPIO fallback compat string in the DT of the r8a7795 SoC. This should have no run-time effect as the driver matches against the per-SoC compat string before considering the fallback compat string. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm64/boot/dts/renesas/r8a7795.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 822cecb1bef2bf41663d6c4e7786d9e159f72674 Author: Kuninori Morimoto Date: Fri Oct 13 05:57:18 2017 +0000 arm64: renesas: ulcb: fixup audio_clkout "audio_clkout" is dummy clock of <&rcar_sound 0> to avoid clock loop which invites probe conflict. Thus <&rcar_sound 0> and "audio_clkout" should be same value. On commit 2752660a37ae ("arm64: dts: renesas: ulcb: sound clock-frequency needs descending order") exchanged <&rcar_sound 0>, but it didn't modify "audio_clkout". This patch fixup it. Fixes: 2752660a37ae ("arm64: dts: renesas: ulcb: sound clock-frequency needs descending order") 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 64097f4c158199f520c483af0380cb58b23dff0a Author: Kuninori Morimoto Date: Fri Oct 13 05:56:58 2017 +0000 arm64: renesas: salvator-common: fixup audio_clkout "audio_clkout" is dummy clock of <&rcar_sound 0> to avoid clock loop which invites probe conflict. Thus <&rcar_sound 0> and "audio_clkout" should be same value. On commit 5e2feac33095 ("arm64: renesas: salvator-common: sound clock-frequency needs descending order") exchanged <&rcar_sound 0>, but it didn't modify "audio_clkout". This patch fixup it. Fixes: 5e2feac33095 ("arm64: renesas: salvator-common: sound clock-frequency needs descending order") 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 0022e4a2ef8f20257b21b8fa27c0cb683485270b Author: Geert Uytterhoeven Date: Tue Oct 10 13:08:11 2017 +0200 clk: renesas: r8a77995: Correct parent clock of INTC-AP According to the R-Car Gen3 Hardware Manual Errata for Rev 0.55 of September 8, 2017, the parent clock of the INTC-AP module clock on R-Car D3 is S1D2. This change has no functional impact. Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a77995-cpg-mssr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e7ddf89d67c2b0cdd7a392bece9411789dda49b Author: Geert Uytterhoeven Date: Tue Oct 10 13:07:45 2017 +0200 clk: renesas: r8a7796: Correct parent clock of INTC-AP According to the R-Car Gen3 Hardware Manual Errata for Rev 0.55 of September 8, 2017, the parent clock of the INTC-AP module clock on R-Car M3-W is S0D3. This change has no functional impact. Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7796-cpg-mssr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21bffe57f85c24fbb8d54aea4e46d2eac77242f6 Author: Geert Uytterhoeven Date: Tue Oct 10 13:04:28 2017 +0200 clk: renesas: r8a7795: Correct parent clock of INTC-AP According to the R-Car Gen3 Hardware Manual Errata for Rev 0.55 of September 8, 2017, the parent clock of the INTC-AP module clock on R-Car H3 ES2.0 is S0D3. This change has no functional impact. Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/r8a7795-cpg-mssr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7ee06c8a0b3a1fad3d9660da00e895aaf784fdee Author: Simon Horman Date: Fri Oct 13 14:33:09 2017 +0200 ARM: dts: r8a7794: Use R-Car GPIO Gen2 fallback compat string Use newly added R-Car GPIO Gen2 fallback compat string in place of now deprecated non-generation specific R-Car GPIO fallback compat string in the DT of the r8a7794 SoC. This should have no run-time effect as the driver matches against the per-SoC compat string before considering the fallback compat string. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7794.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 58f2c391cc0560231d7636c39d31b1b26c9396b7 Merge: c2e5df6 33d930e Author: Greg Kroah-Hartman Date: Mon Oct 16 09:22:22 2017 +0200 Merge 4.14-rc5 into char-misc-next We need the fixes in here to resolve merge issues and for testing. Signed-off-by: Greg Kroah-Hartman commit c37417dca041d76a66a78012f93e9a3c879706c4 Author: Simon Horman Date: Fri Oct 13 14:33:08 2017 +0200 ARM: dts: r8a7793: Use R-Car GPIO Gen2 fallback compat string Use newly added R-Car GPIO Gen2 fallback compat string in place of now deprecated non-generation specific R-Car GPIO fallback compat string in the DT of the r8a7793 SoC. This should have no run-time effect as the driver matches against the per-SoC compat string before considering the fallback compat string. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7793.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 7f4a16c4143a99ca4520c565abb07a4fffbae0ff Author: Simon Horman Date: Fri Oct 13 14:33:07 2017 +0200 ARM: dts: r8a7792: Use R-Car GPIO Gen2 fallback compat string Use newly added R-Car GPIO Gen2 fallback compat string in place of now deprecated non-generation specific R-Car GPIO fallback compat string in the DT of the r8a7792 SoC. This should have no run-time effect as the driver matches against the per-SoC compat string before considering the fallback compat string. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7792.dtsi | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 7140383d59fc590b9f52e4133e8454603c76bb78 Author: Simon Horman Date: Fri Oct 13 14:33:06 2017 +0200 ARM: dts: r8a7791: Use R-Car GPIO Gen2 fallback compat string Use newly added R-Car GPIO Gen2 fallback compat string in place of now deprecated non-generation specific R-Car GPIO fallback compat string in the DT of the r8a7791 SoC. This should have no run-time effect as the driver matches against the per-SoC compat string before considering the fallback compat string. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7791.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 26742a192c82cc28723c80dbecc5976db0508461 Author: Simon Horman Date: Fri Oct 13 14:33:05 2017 +0200 ARM: dts: r8a7790: Use R-Car GPIO Gen2 fallback compat string Use newly added R-Car GPIO Gen2 fallback compat string in place of now deprecated non-generation specific R-Car GPIO fallback compat string in the DT of the r8a7790 SoC. This should have no run-time effect as the driver matches against the per-SoC compat string before considering the fallback compat string. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7790.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 936e7d7472547294fa305f60546afad232896fdc Author: Simon Horman Date: Fri Oct 13 14:33:04 2017 +0200 ARM: dts: r8a7743: Use R-Car GPIO Gen2 fallback compat string Use newly added R-Car GPIO Gen2 fallback compat string in place of now deprecated non-generation specific R-Car GPIO fallback compat string in the DT of the r8a7743 SoC. This should have no run-time effect as the driver matches against the per-SoC compat string before considering the fallback compat string. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7743.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 88cb141b84ca665110ef36db76294453b83486df Author: Simon Horman Date: Fri Oct 13 14:33:03 2017 +0200 ARM: dts: r8a7779: Use R-Car GPIO Gen1 fallback compat string Use newly added R-Car GPIO Gen1 fallback compat string in place of now deprecated non-generation specific R-Car GPIO fallback compat string in DT of r8a7779 SoC. As the driver does not match on "renesas,gpio-r8a7779" there are some run-time considerations for this patch: * When a resulting DTB is used with kernels newer than v4.14 this should not have any run-time effect as renesas,rcar-gen1-gpio is matched by the driver since commit dbd1dad2ab8f ("gpio: rcar: add gen[123] fallback compatibility strings") * However, when used with older kernels GPIO will be disabled as no compat string match will be made by the driver. The regression documented above for the new DTB with old kernel case is acceptable in my opinion. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7779.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 9b43ba66f145127025cf82a35f47f228ea936935 Author: Simon Horman Date: Fri Oct 13 14:33:02 2017 +0200 ARM: dts: r8a7778: Use R-Car GPIO Gen1 fallback compat string Use newly added R-Car GPIO Gen1 fallback compat string in place of now deprecated non-generation specific R-Car GPIO fallback compat string in DT of r8a7778 SoC. As the driver does not match on "renesas,gpio-r8a7778" there are some run-time considerations for this patch: * When a resulting DTB is used with kernels newer than v4.14 this should not have any run-time effect as renesas,rcar-gen1-gpio is matched by the driver since commit dbd1dad2ab8f ("gpio: rcar: add gen[123] fallback compatibility strings") * However, when used with older kernels GPIO will be disabled as no compat string match will be made by the driver. The regression documented above for the new DTB with old kernel case is acceptable in my opinion. Signed-off-by: Simon Horman Reviewed-by: Geert Uytterhoeven arch/arm/boot/dts/r8a7778.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 12e0177055ee4b5ab656414b32054e64568160d8 Author: Stefan Brüns Date: Thu Sep 28 03:49:25 2017 +0200 dmaengine: sun6i: Add support for Allwinner A64 and compatibles The A64 SoC has the same dma engine as the H3 (sun8i), with a reduced amount of physical channels. To allow future reuse of the compatible, leave the channel count etc. in the config data blank and retrieve it from the devicetree. Signed-off-by: Stefan Brüns Acked-by: Maxime Ripard Signed-off-by: Vinod Koul drivers/dma/sun6i-dma.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit d93cc0e7888a7c650a9155ad70e2236d15785c1e Author: Stefan Brüns Date: Thu Sep 28 03:49:23 2017 +0200 arm64: allwinner: a64: Add devicetree binding for DMA controller The A64 is register compatible with the H3, but has a different number of dma channels and request ports. Attach additional properties to the node to allow future reuse of the compatible for controllers with different number of channels/requests. If dma-requests is not specified, the register layout defined maximum of 32 is used. Signed-off-by: Stefan Brüns Acked-by: Rob Herring Signed-off-by: Vinod Koul .../devicetree/bindings/dma/sun6i-dma.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 500fa9e76bbc40c7dbb65c7daccdc8bc49684429 Author: Stefan Brüns Date: Thu Sep 28 03:49:22 2017 +0200 dmaengine: sun6i: Move number of pchans/vchans/request to device struct Preparatory patch: If the same compatible is used for different SoCs which have a common register layout, but different number of channels, the channel count can no longer be stored in the config. Store it in the device structure instead. Signed-off-by: Stefan Brüns Acked-by: Maxime Ripard Signed-off-by: Vinod Koul drivers/dma/sun6i-dma.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit d5f6d8cf31a89045fe5d8fe283ae428763e243a7 Author: Stefan Brüns Date: Thu Sep 28 03:49:21 2017 +0200 dmaengine: sun6i: Enable additional burst lengths/widths on H3 The H3 supports bursts lengths of 1, 4, 8 and 16 transfers, each with a width of 1, 2, 4 or 8 bytes. The register value for the the width is log2-encoded, change the conversion function to provide the correct value for width == 8. Signed-off-by: Stefan Brüns Acked-by: Maxime Ripard Signed-off-by: Vinod Koul drivers/dma/sun6i-dma.c | 54 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 9 deletions(-) commit 88d8622c0071def657a7eb6c7fd97471808ea9bc Author: Stefan Brüns Date: Thu Sep 28 03:49:20 2017 +0200 dmaengine: sun6i: Restructure code to allow extension for new SoCs The current code mixes three distinct operations when transforming the slave config to register settings: 1. special handling of DMA_SLAVE_BUSWIDTH_UNDEFINED, maxburst == 0 2. range checking 3. conversion of raw to register values As the range checks depend on the specific SoC, move these out of the conversion to distinct operations. Signed-off-by: Stefan Brüns Acked-by: Maxime Ripard Signed-off-by: Vinod Koul drivers/dma/sun6i-dma.c | 66 ++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 28 deletions(-) commit 5a6a6202fa9ab63bce1726663ff5573741bfeab3 Author: Stefan Brüns Date: Thu Sep 28 03:49:19 2017 +0200 dmaengine: sun6i: Correct burst length field offsets for H3 For the H3, the burst lengths field offsets in the channel configuration register differs from earlier SoC generations. Using the A31 register macros actually configured the H3 controller do to bursts of length 1 always, which although working leads to higher bus utilisation. Signed-off-by: Stefan Brüns Acked-by: Maxime Ripard Signed-off-by: Vinod Koul drivers/dma/sun6i-dma.c | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) commit 50b12497547b5bff49bf90d54c2ca6a77c0bbe02 Author: Stefan Brüns Date: Thu Sep 28 03:49:18 2017 +0200 dmaengine: sun6i: Correct setting of clock autogating register for A83T/H3 The H83T uses a compatible string different from the A23, but requires the same clock autogating register setting. The H3 also requires setting the clock autogating register, but has the register at a different offset. Add three suitable callbacks for the existing controller generations and set it in the controller config structure. Signed-off-by: Stefan Brüns Acked-by: Maxime Ripard Signed-off-by: Vinod Koul drivers/dma/sun6i-dma.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) commit 56d355e6f586539e5f87280376eed09fb8801f42 Author: Ed Blake Date: Mon Oct 9 15:40:27 2017 +0100 dmaengine: img-mdc: Add runtime PM Add runtime PM support to disable the clock when the h/w is not in use. The existing clock_prepare_enable is removed from probe() as the clock is no longer permanently enabled. Signed-off-by: Ed Blake Signed-off-by: Vinod Koul drivers/dma/img-mdc-dma.c | 77 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 53 insertions(+), 24 deletions(-) commit fd9f22ae15b97997c76cdadf2bed23053881509a Author: Ed Blake Date: Mon Oct 9 15:40:26 2017 +0100 dmaengine: img-mdc: Add suspend / resume handling Add suspend / resume handling using suspend_late and resume_early, and check that all channels are idle before suspending. DMA drivers should use suspend_late / resume_early to ensure that all DMA client devices are suspended before the DMA device itself, and that client devices are resumed after the DMA device. This avoids suspending the DMA device while transactions are still active. It is the responsibility of client drivers to terminate all DMA transactions in their suspend handlers, so there should be no active transactions by the time suspend_late is called. There's no need to save and restore registers for MDC during suspend / resume, as all transactions will be terminated as a result of the suspend, and all required registers are programmed anyway at the start of any new transactions following resume. Signed-off-by: Ed Blake Signed-off-by: Vinod Koul drivers/dma/img-mdc-dma.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit fe3af62553896d2a6b13c931137406681d76c3e4 Author: Martin Schwidefsky Date: Tue Jul 4 07:40:04 2017 +0200 s390: update defconfig Signed-off-by: Martin Schwidefsky arch/s390/configs/default_defconfig | 11 ++++------- arch/s390/configs/gcov_defconfig | 9 +++------ arch/s390/configs/performance_defconfig | 9 +++------ arch/s390/defconfig | 3 --- 4 files changed, 10 insertions(+), 22 deletions(-) commit 496da0d706a952f12b4cbbec4b9f60d3ffdf5356 Author: Heiko Carstens Date: Fri Oct 13 09:06:29 2017 +0200 s390/debug: adjust coding style The debug feature code hasn't been touched in ages and the code also looks like this. Therefore clean up the code so it looks a bit more like current coding style. There is no functional change - actually I made also sure that the generated code with performance_defconfig is identical. A diff of old vs new with "objdump -d" is empty. The code is still not checkpatch clean, but that was not the goal. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/debug.h | 190 ++++----- arch/s390/kernel/debug.c | 886 +++++++++++++++++++----------------------- 2 files changed, 494 insertions(+), 582 deletions(-) commit 0bb6bba5fb426165aa2720e359107ef7c1d90f70 Author: Vasyl Gomonovych Date: Wed Oct 11 21:52:46 2017 +0200 s390/pkey: fix kzalloc-simple.cocci warnings drivers/s390/crypto/pkey_api.c:128:11-18: WARNING: kzalloc should be used for cprbmem, instead of kmalloc/memset Use kzalloc rather than kmalloc followed by memset with 0 Signed-off-by: Vasyl Gomonovych Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/pkey_api.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit af28f6f26a67ef850a26c42c49a1d9ca4927e10c Merge: e4655e4 b5ae577 Author: David S. Miller Date: Mon Oct 16 05:42:41 2017 +0100 Merge tag 'mlx5-updates-2017-10-11' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: ==================== mlx5-updates-2017-10-11: IPoIB Multi Pkey support This series provides the support for IPoIB Multi Pkey. InfiniBand Pkeys are the equivalent of Ethernet vlans. Currently IPoIB device driver supports only default Pkey and IPoIB Pkey child interfaces are not supported with IPoIB offloads mode, this series will add the support for that by allowing creating mlx5 multiple IPoIB netdevices with a non-default Pkey. mlx5 IPoIB Pkey child interface is smaller version of mlx5i IPoIB interfaces and shares most of its resources with the parent IPoIB interface, namely RX steering and ring queue resources. The only mlx5 resources a child Pkey interface will be creating are the TX rings, since they should be assigned to a specific Pkey. mlx5i Pkey netdev is implemented via new mlx5e netdev profile implemented in mlx5/core/ipoib/ipoib_vlan.c. The series starts with a refactoring of mlx5e PTP and mlx5 clock implementation to move the code to be part of mlx5 core rather than mlx5e netdevice, in order to make mlx5 clock and PTP registration part of the core to be shared with mlx5e master Ethernet netdev/IPoIB parent netdev and mlx5_ib in the near future. Add the support for attaching multiple underlay QPs for the different Pkeys in mlx5 core RX steering. Add Pkey index to rdma_netdev to add the ability to set PKEY index to lower IPoIB offload netdev. Use hash-table to map between DQPN (Destination QP number) to child netdev for the IPoIB parent netdev to forward RX packets to the corresponding child Pkey netdev, since the RX rings are shared. The reset of the series adds the ipoib child Pkey: mlx5e netdev profile, netdev nods implementation and minimal set of ethtool callbacks. ==================== Signed-off-by: David S. Miller commit 891f1ebf659edd24bba93182a8de0ba082dcff72 Author: Paul Mackerras Date: Wed Sep 13 16:29:22 2017 +1000 KVM: PPC: Book3S HV: Explicitly disable HPT operations on radix guests This adds code to make sure that we don't try to access the non-existent HPT for a radix guest using the htab file for the VM in debugfs, a file descriptor obtained using the KVM_PPC_GET_HTAB_FD ioctl, or via the KVM_PPC_RESIZE_HPT_{PREPARE,COMMIT} ioctls. At present nothing bad happens if userspace does access these interfaces on a radix guest, mostly because kvmppc_hpt_npte() gives 0 for a radix guest, which in turn is because 1 << -4 comes out as 0 on POWER processors. However, that relies on undefined behaviour, so it is better to be explicit about not accessing the HPT for a radix guest. Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_hv.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit d938a964a966502955e3b4ee467b50d3d89e0cb7 Author: Andreas Färber Date: Fri Aug 11 23:56:06 2017 +0200 arm64: dts: realtek: Add ProBox2 Ava Add a Device Tree for the PROBOX2 AVA TV Box. Move common memory reservations into rtd1295.dtsi. Cc: support@probox2.com Signed-off-by: Andreas Färber arch/arm64/boot/dts/realtek/Makefile | 1 + .../arm64/boot/dts/realtek/rtd1295-probox2-ava.dts | 31 ++++++++++++++++++++++ arch/arm64/boot/dts/realtek/rtd1295-zidoo-x9s.dts | 6 ----- arch/arm64/boot/dts/realtek/rtd1295.dtsi | 6 +++++ 4 files changed, 38 insertions(+), 6 deletions(-) commit f80ec175ba721fd6d56f407af64a6712d5bdfa1b Author: Andreas Färber Date: Sat Aug 12 00:22:30 2017 +0200 dt-bindings: arm: realtek: Add ProBox2 AVA Document a compatible string for the PROBOX2 AVA TV Box. Cc: support@probox2.com Acked-by: Rob Herring Signed-off-by: Andreas Färber Documentation/devicetree/bindings/arm/realtek.txt | 1 + 1 file changed, 1 insertion(+) commit 70dfb1205224ed62acd46b31ebfa299685b0098a Author: Andreas Färber Date: Sat Aug 12 00:04:51 2017 +0200 dt-bindings: Add vendor prefix for ProBox2 PROBOX2 is a TV box brand by Hong Kong based online reseller W2COMP Company Limited. Cc: support@probox2.com Acked-by: Rob Herring Signed-off-by: Andreas Färber Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit c9a934b06932c6b065b4bdb196e4459592be98f1 Merge: 1236d6b 11b86c7 Author: Greg Kroah-Hartman Date: Sun Oct 15 15:46:32 2017 +0200 Merge tag 'iio-for-4.15b' 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 cleanup for 4.15 New device support * cros_ec_accel_legacy - New driver for this older chromebook accelerometer. * ds4422 dac driver - New driver and bindings for the Maxim ds4422 and ds4424 I2C DACs. * kxcjk1013 - Support the KXTF9 accelerometers. * mcp320x - support mcp3550, mcp3551, mcp3553 21 bit ADCs. * rfd77402 - new driver for this laser range finder. * st-sensors-accel - add support for the LIS2DW12 accelerometer with bindings - add support for the LIS3DHH accelerometer with bindings New features * core - Drop a duplicate forward declaration in iio.h * Docs - add a clarification of the meaning of IIO_DISTANCE to reflect existing use in various range finding devices. * st-sensors - add a register mask for the status register to correctly support 2 channel devices. - decouple the irq1 and irq2 configuration parameters. - do not always write the enable_axis register as some newer devices are always on and don't support such configuration. - split open-drain control for irq1 and irq2 - make sampling frequency control optional as non all hardware supports it. * st-sensors-gyro - support 3 wire SPI mode * st-sensors-magn - support 3 wire SPI mode * st-sensors-pressure - support 3 wire SPI mode. Cleanups and fixes * ad7192 - expand the buffer lock to cover device state protection rather than using core mlock to provide the state protection. * ade7753 - expand the buffer lock to cover device state protection as well rather than having an additional lock. * dummy-evgen - Use the new irq_sim infrastructure rather than having our own local version of the same thing. * hid-sensor-trigger - avoid touching sensors ever if user hasn't requested it. This is a work around for one reported issue where turning a sensor off wasn't sufficient to make it actually switch off. As we have only one report from what looks like buggy hardware we are sending this upstream the slow way. * ina2xx - Adhere to the published ABI docs and use Ohms instead of microohms. We don't think that anyone will notice this ABI fix but are sending it the slow route to reduce fallout if someone does! * kxcjk1013 - refactors to support the KXTF9 being added. - Refactor ODR support. - Fix INT_CTRL/INT_SRC1 bit names to match the register name. - Extract code for reporting motion events as this isn't present on some parts to be supported. - Make the sysfs sampling_frequency_available stuff not a fixed string so as to allow for it to be chip type dependent. - Make the sampling frequency_available per type to match the sampling_frequency attributes. * lsm6dsx - rework prior to new device support. - express the max fifo depth in 'scans' rather than bytes. - split control of the fifo mode fifo output data rate. - move decimator registers into the sensor_settings structure as this will make it easier to support devices that don't have this function. - add a fifo ops datastructure to allow for inter-part variations. * max30100 - fix i2c chip address in dt example * max30102 - use correct binding name for max30102 in example * mma8452 - Rename read/write event value callbacks to be more generic reflecting what they actually do now. * rcar-gyroadc - pointer case to fix warnings when moving to 64 bit as this IP is present on new 64 bit SOCs - enable compile-testing to improve build coverage on this driver. - use the of_device_get_match_data helper instead of open coding * sun4i-gpadc-iio - Register in the thermal framework after pm. Otherwise the IP is not enabled. - Don't fail probing if no thermal DT node is present. * tsl2x7x - renaming tsl2x7x_settings to settings to avoid excessive line lengths. - Use IIO core to generate the integration_time sysfs attributes rather than hand rolling. * vf6180 - Move the range check on integration time to the setter function. - Refactor the code around integration time to be clearer including caching current integration time avoiding unnecessary chip reads. - cleanup the als_gain lookup avoiding reading registers on chip. - use rounded matching rather than precise values for als_gain lookup. - Correct the ALS scale when non-default gain or integration time is used. commit d85438991874205467f9739d5f3ee771245b4754 Author: Pierre-Hugues Husson Date: Sat Oct 14 00:53:37 2017 +0200 arm64: dts: rockchip: enable cec pin for rk3399 firefly Add a pinctrl setting to configure the cec pin to the correct function. Signed-off-by: Pierre-Hugues Husson Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 2 ++ 1 file changed, 2 insertions(+) commit db2fd26dbe0e9e64ca87029e7ffe501486c66495 Author: Pierre-Hugues Husson Date: Sat Oct 14 00:53:36 2017 +0200 arm64: dts: rockchip: add the cec clk for dw-mipi-hdmi on rk3399 Add the HDMI CEC controller main clock coming from the CRU. Signed-off-by: Pierre-Hugues Husson Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399.dtsi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 1658b84de41b8c4bef7b2e85532249294a313cb4 Author: Masahiro Yamada Date: Sun Oct 15 17:22:46 2017 +0900 ARM: dts: uniphier: fix W=2 build warnings Fix warnings like follows: Warning (node_name_chars_strict): Character '_' not recommended in ... Commit 8654cb8d0371 ("dtc: update warning settings for new bus and node/property name checks") says these checks are a bit subjective, but Rob also says to not add new W=2 warnings. The exising warnings should be fixed in order to catch new ones easily. Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-ld4.dtsi | 2 +- arch/arm/boot/dts/uniphier-pinctrl.dtsi | 46 ++++++++++++++-------------- arch/arm/boot/dts/uniphier-pro4.dtsi | 2 +- arch/arm/boot/dts/uniphier-pro5.dtsi | 4 +-- arch/arm/boot/dts/uniphier-pxs2.dtsi | 4 +-- arch/arm/boot/dts/uniphier-sld8.dtsi | 2 +- arch/arm/boot/dts/uniphier-support-card.dtsi | 2 +- 7 files changed, 31 insertions(+), 31 deletions(-) commit dba74980023656717edaec2d48baa5d35f8ff886 Author: Kunihiko Hayashi Date: Mon Sep 4 15:58:37 2017 +0900 arm64: dts: uniphier: add nodes of thermal monitor and thermal zone for LD20 Add nodes of thermal monitor and thermal zone for UniPhier LD20 SoC. The thermal monitor node is included in sysctrl. Since the efuse might not have a calibrated value of thermal monitor, this patch gives the default value for LD20. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 45 ++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit fbd8d5832eb97b879bdcacdfdd5d891497f2a372 Author: Kunihiko Hayashi Date: Mon Sep 4 15:58:36 2017 +0900 ARM: dts: uniphier: add nodes of thermal monitor and thermal zone for PXs2 Add nodes of thermal monitor and thermal zone for UniPhier PXs2 SoC. The thermal monitor node is included in sysctrl. Since the efuse might not have a calibrated value of thermal monitor, this patch gives the default value for PXs2. Furthermore, add cpuN labels for reference in cooling-device property. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada arch/arm/boot/dts/uniphier-pxs2.dtsi | 47 +++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 4 deletions(-) commit 3991e054832e52119b238b397e5e510d7fee5bb4 Author: Krzysztof Kozlowski Date: Sun Oct 8 14:26:28 2017 +0200 dt-bindings: samsung: Document binding for new Odroid HC1 board Document the binding for new Hardkernel Odroid HC1 board. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt | 1 + 1 file changed, 1 insertion(+) commit 8d59598c35dc1071e6c36f86c9a95f26dd08b4e5 Author: Nicolas Pitre Date: Thu Oct 12 02:16:13 2017 -0400 cramfs: rehabilitate it Update documentation, pointer to latest tools, appoint myself as maintainer. Given it's been unloved for so long, I don't expect anyone will protest. Signed-off-by: Nicolas Pitre Tested-by: Chris Brandt Signed-off-by: Al Viro Documentation/filesystems/cramfs.txt | 42 ++++++++++++++++++++++++++++++++++++ MAINTAINERS | 4 ++-- fs/cramfs/Kconfig | 9 +++++--- 3 files changed, 50 insertions(+), 5 deletions(-) commit eddcd97659e31f59fc99c6c3ca3dcce403585f7e Author: Nicolas Pitre Date: Thu Oct 12 02:16:12 2017 -0400 cramfs: add mmap support When cramfs in physical memory is used then we have the opportunity to map files directly from ROM, directly into user space, saving on RAM usage. This gives us Execute-In-Place (XIP) support. For a file to be mmap()-able, the map area has to correspond to a range of uncompressed and contiguous blocks, and in the MMU case it also has to be page aligned. A version of mkcramfs with appropriate support is necessary to create such a filesystem image. In the MMU case it may happen for a vma structure to extend beyond the actual file size. This is notably the case in binfmt_elf.c:elf_map(). Or the file's last block is shared with other files and cannot be mapped as is. Rather than refusing to mmap it, we do a "mixed" map and let the regular fault handler populate the unmapped area with RAM-backed pages. In practice the unmapped area is seldom accessed so page faults might never occur before this area is discarded. In the non-MMU case it is the get_unmapped_area method that is responsible for providing the address where the actual data can be found. No mapping is necessary of course. Signed-off-by: Nicolas Pitre Tested-by: Chris Brandt Signed-off-by: Al Viro fs/cramfs/inode.c | 209 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 209 insertions(+) commit fd4f6f2a78aeaebb7094c1bb9b30623d18a86e4c Author: Nicolas Pitre Date: Thu Oct 12 02:16:11 2017 -0400 cramfs: implement uncompressed and arbitrary data block positioning Two new capabilities are introduced here: - The ability to store some blocks uncompressed. - The ability to locate blocks anywhere. Those capabilities can be used independently, but the combination opens the possibility for execute-in-place (XIP) of program text segments that must remain uncompressed, and in the MMU case, must have a specific alignment. It is even possible to still have the writable data segments from the same file compressed as they have to be copied into RAM anyway. This is achieved by giving special meanings to some unused block pointer bits while remaining compatible with legacy cramfs images. Signed-off-by: Nicolas Pitre Tested-by: Chris Brandt Signed-off-by: Al Viro fs/cramfs/README | 31 ++++++++++++++- fs/cramfs/inode.c | 90 +++++++++++++++++++++++++++++++++--------- include/uapi/linux/cramfs_fs.h | 26 +++++++++++- 3 files changed, 126 insertions(+), 21 deletions(-) commit 99c18ce580c6cc6763e694b4ce320d7b226ab59b Author: Nicolas Pitre Date: Fri Oct 13 16:09:23 2017 -0400 cramfs: direct memory access support Small embedded systems typically execute the kernel code in place (XIP) directly from flash to save on precious RAM usage. This patch adds to cramfs the ability to consume filesystem data directly from flash as well. Cramfs is particularly well suited to this feature as it is very simple with low RAM usage, and with this feature it is possible to use it with no block device support and consequently even lower RAM usage. This patch was inspired by a similar patch from Shane Nay dated 17 years ago that used to be very popular in embedded circles but never made it into mainline. This is a cleaned-up implementation that uses far fewer ifdef's and gets the actual memory location for the filesystem image via MTD at run time. In the context of small IoT deployments, this functionality has become relevant and useful again. Signed-off-by: Nicolas Pitre Tested-by: Chris Brandt Reviewed-by: Christoph Hellwig Signed-off-by: Al Viro fs/cramfs/Kconfig | 30 +++++++- fs/cramfs/inode.c | 212 +++++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 199 insertions(+), 43 deletions(-) commit f175f307dd0bd1ca3825d244f9b870ff12981d3c Author: Al Viro Date: Sun Oct 15 00:38:00 2017 -0400 stubs for mount_bdev() and kill_block_super() in !CONFIG_BLOCK case Signed-off-by: Al Viro include/linux/fs.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 53fd88ab61948f711147204c1c5017c7301979e9 Author: Al Viro Date: Sat Oct 14 23:00:54 2017 -0400 make vfs_ustat() static Signed-off-by: Al Viro fs/statfs.c | 2 +- include/linux/fs.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit e4655e4a79133503ceec1dcd2f92734293b25610 Merge: ae0783b 17a9422 Author: David S. Miller Date: Sat Oct 14 18:49:42 2017 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-10-13 This series contains updates to mqprio and i40e. Amritha introduces a new hardware offload mode in tc/mqprio where the TCs, the queue configurations and bandwidth rate limits are offloaded to the hardware. The existing mqprio framework is extended to configure the queue counts and layout and also added support for rate limiting. This is achieved through new netlink attributes for the 'mode' option which takes values such as 'dcb' (default) and 'channel' and a 'shaper' option for QoS attributes such as bandwidth rate limits in hw mode 1. Legacy devices can fall back to the existing setup supporting hw mode 1 without these additional options where only the TCs are offloaded and then the 'mode' and 'shaper' options defaults to DCB support. The i40e driver enables the new mqprio hardware offload mechanism factoring the TCs, queue configuration and bandwidth rates by creating HW channel VSIs. In this new mode, the priority to traffic class mapping and the user specified queue ranges are used to configure the traffic class when the 'mode' option is set to 'channel'. This is achieved by creating HW channels(VSI). A new channel is created for each of the traffic class configuration offloaded via mqprio framework except for the first TC (TC0) which is for the main VSI. TC0 for the main VSI is also reconfigured as per user provided queue parameters. Finally, bandwidth rate limits are set on these traffic classes through the shaper attribute by sending these rates in addition to the number of TCs and the queue configurations. Colin Ian King makes an array of constant values "constant". Alan fixes and issue where on some firmware versions, we were failing to actually fill out the phy_types which caused ethtool to not report any link types. Also hardened against a potentially malicious VF by not letting the VF to reset itself after requesting to change the number of queues (via ethtool), let the PF reset the VF to institute the requested changes. ==================== Signed-off-by: David S. Miller commit ae0783b1bf18b9f3913738ad81be92de70fa4bc8 Merge: 6eda447 7f6661a Author: David S. Miller Date: Sat Oct 14 18:47:53 2017 -0700 Merge branch 'tc-testing-updates' Lucas Bates says: ==================== tc-testing: Test suite updates This patch series is a roundup of changes to the tc-testing suite: - Add test cases for police and mirred modules and some coverage in already-submitted test categories - Break the test case files down into more user-friendly sizes - Bug fix to the tdc.py script's handling of the -l argument v2: fix the lack of final newlines in two new files (thanks David) ==================== Signed-off-by: David S. Miller commit 7f6661a78a50c3bae8c9f71f67487abbea64dbb3 Author: Lucas Bates Date: Fri Oct 13 17:51:25 2017 -0400 tc-testing: fix the -l argument bug in tdc.py This patch fixes a bug in the tdc script, where executing tdc with the -l argument would cause the tests to start running as opposed to listing all the known test cases. Signed-off-by: Lucas Bates Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller tools/testing/selftests/tc-testing/tdc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cf797ac49b94df7247cf86e801ab3882d08b786d Author: Lucas Bates Date: Fri Oct 13 17:51:24 2017 -0400 tc-testing: Add test cases for police and skbmod Add basic unit tests for police and skbmod actions in tc. Signed-off-by: Lucas Bates Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller .../tc-testing/tc-tests/actions/police.json | 527 +++++++++++++++++++++ .../tc-testing/tc-tests/actions/skbmod.json | 372 +++++++++++++++ 2 files changed, 899 insertions(+) commit 0923edf456fbd6c75031ad48ad14897a6b912954 Author: Lucas Bates Date: Fri Oct 13 17:51:23 2017 -0400 tc-testing: Split test case files into smaller chunks The original submission had the test cases stored in one monolithic file. This can be unwieldy to edit, especially as more test cases are added. This patch removes the original tests.json file in favour of individual ones broken down by category. Signed-off-by: Lucas Bates Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller .../tc-testing/tc-tests/actions/gact.json | 469 ++++++++ .../selftests/tc-testing/tc-tests/actions/ife.json | 52 + .../tc-testing/tc-tests/actions/mirred.json | 223 ++++ .../tc-testing/tc-tests/actions/simple.json | 130 +++ .../tc-testing/tc-tests/actions/skbedit.json | 320 ++++++ .../tc-testing/tc-tests/actions/tests.json | 1212 -------------------- 6 files changed, 1194 insertions(+), 1212 deletions(-) commit ae3c33c157565301544570ff3476280279d43d7f Author: Lucas Bates Date: Fri Oct 13 17:51:22 2017 -0400 tc-testing: Add test cases for flushing actions Tests for flushing gact and mirred were missing. This patch adds test cases to explicitly test the flush of any installed gact/mirred actions. Signed-off-by: Lucas Bates Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller .../tc-testing/tc-tests/actions/tests.json | 49 +++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) commit 6eda447e01bdc992c8b1e081ebadc255e7549e13 Merge: e086101 c8c41ea Author: David S. Miller Date: Sat Oct 14 18:46:36 2017 -0700 Merge branch 'macvlan-cleanups' Alexander Duyck says: ==================== net: Minor macvlan source mode cleanups So this patch series is just a few minor cleanups for macvlan source mode. The first patch addresses double receives when a packet is being routed to the macvlan destination address, and the other addresses the pkt_type being updated in cases where it most likely should not be. ==================== Signed-off-by: David S. Miller commit c8c41ea1bd707eb032e248c55d640f32c950ed19 Author: Alexander Duyck Date: Fri Oct 13 13:40:31 2017 -0700 macvlan: Only update pkt_type if destination MAC address matches This patch updates the pkt_type to PACKET_HOST only if the destination MAC address matches on the on the source based macvlan. It didn't make sense to be updating broadcast, multicast, and non-local destined frames with PACKET_HOST. Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller drivers/net/macvlan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dd6b9c2c332b40f142740d1b11fb77c653ff98ea Author: Alexander Duyck Date: Fri Oct 13 13:40:24 2017 -0700 macvlan: Only deliver one copy of the frame to the macvlan interface This patch intoduces a slight adjustment for macvlan to address the fact that in source mode I was seeing two copies of any packet addressed to the macvlan interface being delivered where there should have been only one. The issue appears to be that one copy was delivered based on the source MAC address and then the second copy was being delivered based on the destination MAC address. To fix it I am just treating a unicast address match as though it is not a match since source based macvlan isn't supposed to be matching based on the destination MAC anyway. Fixes: 79cf79abce71 ("macvlan: add source mode") Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller drivers/net/macvlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e086101b150ae8e99e54ab26101ef3835fa9f48d Author: Cong Wang Date: Fri Oct 13 13:03:16 2017 -0700 tcp: add a tracepoint for tcp retransmission We need a real-time notification for tcp retransmission for monitoring. Of course we could use ftrace to dynamically instrument this kernel function too, however we can't retrieve the connection information at the same time, for example perf-tools [1] reads /proc/net/tcp for socket details, which is slow when we have a lots of connections. Therefore, this patch adds a tracepoint for __tcp_retransmit_skb() and exposes src/dst IP addresses and ports of the connection. This also makes it easier to integrate into perf. Note, I expose both IPv4 and IPv6 addresses at the same time: for a IPv4 socket, v4 mapped address is used as IPv6 addresses, for a IPv6 socket, LOOPBACK4_IPV6 is already filled by kernel. Also, add sk and skb pointers as they are useful for BPF. 1. https://github.com/brendangregg/perf-tools/blob/master/net/tcpretrans Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Hannes Frederic Sowa Cc: Brendan Gregg Cc: Neal Cardwell Signed-off-by: Cong Wang Acked-by: Alexei Starovoitov Acked-by: Brendan Gregg Signed-off-by: David S. Miller include/trace/events/tcp.h | 68 ++++++++++++++++++++++++++++++++++++++++++++++ net/core/net-traces.c | 1 + net/ipv4/tcp_output.c | 3 ++ 3 files changed, 72 insertions(+) commit 657875944726af8f881df7d431afbbe8f50ad4d7 Author: Cong Wang Date: Fri Oct 13 12:58:13 2017 -0700 net_sched: fix a compile warning in act_ife Apparently ife_meta_id2name() is only called when CONFIG_MODULES is defined. This fixes: net/sched/act_ife.c:251:20: warning: ‘ife_meta_id2name’ defined but not used [-Wunused-function] static const char *ife_meta_id2name(u32 metaid) ^~~~~~~~~~~~~~~~ Fixes: d3f24ba895f0 ("net sched actions: fix module auto-loading") Cc: Roman Mashak Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_ife.c | 2 ++ 1 file changed, 2 insertions(+) commit c116004d5b415ad553e7e86f22d79965f8f2e05a Merge: 5dc8742 6b0cbe3 Author: David S. Miller Date: Sat Oct 14 18:42:56 2017 -0700 Merge branch 'hv_netvsc-Add-init-of-send-table-and-var-renames' Haiyang Zhang says: ==================== hv_netvsc: Add init of send table and var renames Add initialization of send indirection table. Otherwise it may contain old info of previous device with different number of channels. Also, did some variable renaming for easier reading. ==================== Signed-off-by: David S. Miller commit 6b0cbe315868d613123cf387052ccda5f09d49ea Author: Haiyang Zhang Date: Fri Oct 13 12:28:05 2017 -0700 hv_netvsc: Add initialization of tx_table in netvsc_device_add() tx_table is part of the private data of kernel net_device. It is only zero-ed out when allocating net_device. We may recreate netvsc_device w/o recreating net_device, so the private netdev data, including tx_table, are not zeroed. It may contain channel numbers for the older netvsc_device. This patch adds initialization of tx_table each time we recreate netvsc_device. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 3 +++ 1 file changed, 3 insertions(+) commit 39e91cfbf6f5fb26ba64cc2e8874372baf1671e7 Author: Haiyang Zhang Date: Fri Oct 13 12:28:04 2017 -0700 hv_netvsc: Rename tx_send_table to tx_table Simplify the variable name: tx_send_table Signed-off-by: Haiyang Zhang 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 | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 47371300dfc269dd8d150e5b872bdbbda98ba809 Author: Haiyang Zhang Date: Fri Oct 13 12:28:03 2017 -0700 hv_netvsc: Rename ind_table to rx_table Rename this variable because it is the Receive indirection table. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 2 +- drivers/net/hyperv/netvsc_drv.c | 4 ++-- drivers/net/hyperv/rndis_filter.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) commit 5dc874252faa818426480a7c00fa05738fe05402 Author: Colin Ian King Date: Fri Oct 13 17:29:00 2017 +0100 cxgb4: fix missing break in switch and indent return statements The break statement for the Macronix case is missing and will fall through to the Winbond case and re-assign the size setting. Fix this by adding the missing break statement. Also correctly indent the return statements. Detected by CoverityScan, CID#1458020 ("Missing break in switch") Fixes: 96ac18f14a5a ("cxgb4: Add support for new flash parts") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ae96d3331e0549e075299f17193d22423e462b80 Merge: f013820 b1b1ae2 Author: David S. Miller Date: Sat Oct 14 18:36:46 2017 -0700 Merge tag 'mac80211-next-for-davem-2017-10-13' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Three fixes for the recently added new code: * make "make -s" silent for the certs file (Arnd) * fix missing CONFIG_ in extra certs symbol (Arnd) * use crypto_aead_authsize() to use the proper API and two other changes: * remove a set-but-unused variable * don't track HT *capability* changes, capabilities are supposed to be constant (HT operation changes) ==================== Signed-off-by: David S. Miller commit f013820f0798b8b10161d7f56d80d8086a009de6 Merge: 4c7787b 7c075ce Author: David S. Miller Date: Sat Oct 14 18:35:15 2017 -0700 Merge branch 'cxgb4-hw-debug-logs' Rahul Lakkireddy says: ==================== cxgb4: add support to get hardware debug logs via ethtool This series of patches add support to collect hardware debug logs via ethtool --get-dump facility. Currently supports: Memory dumps - Collects on-chip EDC0 and EDC1 dumps. Hardware dumps - Collects firmware and hardware dumps. Patch 1 adds ethtool set/get dump data. It also adds template header that precedes dump data. This template header gives additional information needed for extracting and decoding the collected dump data. Patch 2 adds base to collect dumps. Also collects regdump. Patch 3 collects on-chip EDC0 and EDC1 memory dumps. Patch 4 collects firmware mbox log and device log. Patch 5 updates base API for accessing TP indirect registers. Patch 6 collects hardware TP module dump. Patch 7 collects hardware SGE, PCIE, PM, UP CIM, MA, and HMA module dumps. Patch 8 collects hardware IBQ and OBQ dump. Thanks, Rahul --- v2: - Prefix symbols that pollute global namespace in files starting with cxgb4_* with "cxgb4_" - Prefix symbols that pollute global namespace in files starting with cudbg_* with "cudbg_" - Make cudbg_collect_mem_info() static. ==================== Signed-off-by: David S. Miller commit 7c075ce221cf10a7aaef96b002d1d4c5dc715822 Author: Rahul Lakkireddy Date: Fri Oct 13 18:48:20 2017 +0530 cxgb4: collect IBQ and OBQ dumps Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 14 ++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 165 +++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 42 ++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 32 +++++ 4 files changed, 253 insertions(+) commit 270d39bf324ecdb9ab3f9c521e6b7fd9cc6c27b8 Author: Rahul Lakkireddy Date: Fri Oct 13 18:48:19 2017 +0530 cxgb4: collect hardware module dumps Collect SGE, PCIE, PM, UP CIM, MA and HMA dumps. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h | 74 ++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 6 + drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 289 ++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 18 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 35 +++ 5 files changed, 422 insertions(+) commit 4359cf33680c3f276c6bba11730836c41d3540a2 Author: Rahul Lakkireddy Date: Fri Oct 13 18:48:18 2017 +0530 cxgb4: collect TP dump Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h | 72 ++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 114 ++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 3 + drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 2 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 21 +++- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 20 ++++ drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 2 + 8 files changed, 234 insertions(+), 1 deletion(-) commit 5ccf9d049615994349e9b0a1f0d4b9a398b9b0c2 Author: Rahul Lakkireddy Date: Fri Oct 13 18:48:17 2017 +0530 cxgb4: update API for TP indirect register access Try to access TP indirect registers via firmware first. If this fails, fallback and access them directly. This ensures that driver and firmware do not conflict each other while accessing the TP indirect registers. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 36 ++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 13 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 14 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 +- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 312 +++++++++++++-------- 5 files changed, 239 insertions(+), 140 deletions(-) commit 844d1b6f0ef8051a1ac0403327ab881dd4d101a3 Author: Rahul Lakkireddy Date: Fri Oct 13 18:48:16 2017 +0530 cxgb4: collect firmware mbox and device log dump Collect firmware mbox and device logs before collecting the rest of the hardware dumps to snap the firmware state before the mailbox logs are updated by other hardware dumps. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h | 6 ++ drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 2 + drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 84 +++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 6 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 9 +++ 5 files changed, 107 insertions(+) commit b33af022e57996dc818ec960cbdf0f07cb5130d8 Author: Rahul Lakkireddy Date: Fri Oct 13 18:48:15 2017 +0530 cxgb4: collect on-chip memory dump Collect EDC0 and EDC1 memory dump. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cudbg_entity.h | 29 +++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 8 ++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 136 +++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 6 + .../net/ethernet/chelsio/cxgb4/cudbg_lib_common.h | 3 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 38 +++++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.h | 1 + 7 files changed, 220 insertions(+), 1 deletion(-) commit a7975a2f9a7984de9b9b318da9d1826033db32c7 Author: Rahul Lakkireddy Date: Fri Oct 13 18:48:14 2017 +0530 cxgb4: collect register dump Add base to collect dump entities. Collect register dump and update template header accordingly. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/Makefile | 3 +- drivers/net/ethernet/chelsio/cxgb4/cudbg_common.c | 54 +++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 5 ++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 79 ++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.h | 28 +++++++ .../net/ethernet/chelsio/cxgb4/cudbg_lib_common.h | 13 +++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 94 +++++++++++++++++++++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.h | 11 +++ 8 files changed, 285 insertions(+), 2 deletions(-) commit ad75b7d32f2517a6cc92a5d70569c33455157453 Author: Rahul Lakkireddy Date: Fri Oct 13 18:48:13 2017 +0530 cxgb4: implement ethtool dump data operations Implement operations to set/get dump data via ethtool. Also add template header that precedes dump data, which helps in decoding and extracting the dump data. Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/Makefile | 2 +- drivers/net/ethernet/chelsio/cxgb4/cudbg_if.h | 33 ++++++++++ .../net/ethernet/chelsio/cxgb4/cudbg_lib_common.h | 65 +++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 3 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c | 73 ++++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.h | 32 ++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 56 ++++++++++++++++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 3 + 8 files changed, 265 insertions(+), 2 deletions(-) commit 4c7787ba3a1f583dba6ff3420817229f0056df84 Author: Mark Brown Date: Fri Oct 13 03:50:35 2017 +0100 nfp: Explicitly include linux/bug.h Today's -next build encountered an error due to a missing definition of WARN_ON(), caused by some header reorganization removing an implicit inclusion of linux/bug.h. Fix this with an explicit inclusion. Signed-off-by: Mark Brown Acked-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_app.c | 1 + drivers/net/ethernet/netronome/nfp/nfp_asm.h | 1 + 2 files changed, 2 insertions(+) commit 7f4e568dd13e094bb951753bbad23704198ecac3 Merge: ec0d098 841f4f2 Author: David S. Miller Date: Sat Oct 14 18:30:07 2017 -0700 Merge branch 'dsa-remove-set_addr' Vivien Didelot says: ==================== net: dsa: remove .set_addr An Ethernet switch may support having a MAC address, which can be used as the switch's source address in transmitted full-duplex Pause frames. If a DSA switch supports the related .set_addr operation, the DSA core sets the master's MAC address on the switch. This won't make sense anymore in a multi-CPU ports system, because there won't be a unique master device assigned to a switch tree. Moreover this operation is confusing because it makes the user think that it could be used to program the switch with the MAC address of the CPU/management port such that MAC address learning can be disabled on said port, but in fact, that's not how it is currently used. To fix this, assign a random MAC address at setup time in the mv88e6060 and mv88e6xxx drivers before removing .set_addr completely from DSA. Changes in v3: - include fix for mv88e6060 switch MAC address setter. Changes in v2: - remove .set_addr implementation from drivers and use a random MAC. ==================== Signed-off-by: David S. Miller commit 841f4f24053acad69240c6ab7427a1d24bc29491 Author: Vivien Didelot Date: Fri Oct 13 14:18:09 2017 -0400 net: dsa: remove .set_addr Now that there is no user for the .set_addr function, remove it from DSA. If a switch supports this feature (like mv88e6xxx), the implementation can be done in the driver setup. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 1 - net/dsa/dsa2.c | 6 ------ net/dsa/legacy.c | 6 ------ 3 files changed, 13 deletions(-) commit 93004a934bc19ea52b687d74482fd1bdd25e7b87 Author: Vivien Didelot Date: Fri Oct 13 14:18:08 2017 -0400 net: dsa: dsa_loop: remove .set_addr The .set_addr function does nothing, remove the dsa_loop implementation before getting rid of it completely in DSA. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/dsa_loop.c | 8 -------- 1 file changed, 8 deletions(-) commit 56c3ff9bf23e1f9e5f13e2343b0603365f8d9c7d Author: Vivien Didelot Date: Fri Oct 13 14:18:07 2017 -0400 net: dsa: mv88e6060: setup random mac address As for mv88e6xxx, setup the switch from within the mv88e6060 driver with a random MAC address, and remove the .set_addr implementation. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6060.c | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) commit 1723ab4f5e9af710acb36ba754e9cbf02ee08215 Author: Vivien Didelot Date: Fri Oct 13 14:18:06 2017 -0400 net: dsa: mv88e6060: fix switch MAC address The 88E6060 Ethernet switch always transmits the multicast bit of the switch MAC address as a zero. It re-uses the corresponding bit 8 of the register "Switch MAC Address Register Bytes 0 & 1" for "DiffAddr". If the "DiffAddr" bit is 0, then all ports transmit the same source address. If it is set to 1, then bit 2:0 are used for the port number. The mv88e6060 driver is currently wrongly shifting the MAC address byte 0 by 9. To fix this, shift it by 8 as usual and clear its bit 0. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6060.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 04a69a17597c1366d764926577745dca4aa6b100 Author: Vivien Didelot Date: Fri Oct 13 14:18:05 2017 -0400 net: dsa: mv88e6xxx: setup random mac address An Ethernet switch may support having a MAC address, which can be used as the switch's source address in transmitted full-duplex Pause frames. If a DSA switch supports the related .set_addr operation, the DSA core sets the master's MAC address on the switch. This won't make sense anymore in a multi-CPU ports system, because there won't be a unique master device assigned to a switch tree. Instead, setup the switch from within the Marvell driver with a random MAC address, and remove the .set_addr implementation. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller drivers/net/dsa/mv88e6xxx/chip.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit ec0d0987f084cdaf7b7ff8bd8f9f946e29fb8d94 Author: Gustavo A. R. Silva Date: Thu Oct 12 16:11:32 2017 -0500 atm: fore200e: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller drivers/atm/fore200e.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit bd8c2021ab1e2891e393e7cf2fb6f3842449c742 Author: Bart Van Assche Date: Wed Oct 11 10:49:27 2017 -0700 RDMA/usnic: Instantiate data structures once Data structures should not be defined in a header file. Hence move the min_transport_spec[] definition from a header file to a .c file. Signed-off-by: Bart Van Assche Cc: Christian Benvenuti Cc: Dave Goodell Signed-off-by: Doug Ledford drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h | 25 +------------------------ drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 24 deletions(-) commit 4c23e5085fd53478a14bb743dc7386abb2f68ec6 Author: Bart Van Assche Date: Wed Oct 11 10:49:26 2017 -0700 RDMA/usnic: Remove a set-but-not-used variable Signed-off-by: Bart Van Assche Cc: Christian Benvenuti Cc: Dave Goodell Signed-off-by: Doug Ledford drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c | 2 -- 1 file changed, 2 deletions(-) commit 19188436ea62336954625309d6630f7ad9ce592b Author: Bart Van Assche Date: Wed Oct 11 10:49:25 2017 -0700 RDMA/usnic: Make the compiler check declaration consistency during compilation This patch avoids that sparse complains about missing declarations. Signed-off-by: Bart Van Assche Cc: Christian Benvenuti Cc: Dave Goodell Signed-off-by: Doug Ledford drivers/infiniband/hw/usnic/usnic_ib_sysfs.c | 1 + drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 1 + 2 files changed, 2 insertions(+) commit ea6ee93b4033089b6b22b693da3354359555dc69 Author: Bart Van Assche Date: Wed Oct 11 10:49:24 2017 -0700 RDMA/rxe: Suppress gcc 7 fall-through complaints Avoid that gcc 7 reports the following warning when building with W=1: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Cc: Moni Shoua Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_comp.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_task.c | 2 +- drivers/infiniband/sw/rxe/rxe_verbs.c | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) commit 2caaa2335b3d3b3a750308baa8677454e5cf3ada Author: Bart Van Assche Date: Wed Oct 11 10:49:23 2017 -0700 RDMA/rdmavt: Suppress gcc 7 fall-through complaints Avoid that gcc 7 reports the following warning when building with W=1: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Bart Van Assche Reviewed-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 1 + 1 file changed, 1 insertion(+) commit 2055d1f067509e2dac75faf275a8ee59dcd2b97a Author: Bart Van Assche Date: Wed Oct 11 10:49:22 2017 -0700 IB/qib: Remove set-but-not-used variables Signed-off-by: Bart Van Assche Tested-by: Mike Marciniszyn Acked-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_diag.c | 6 ------ drivers/infiniband/hw/qib/qib_file_ops.c | 9 --------- drivers/infiniband/hw/qib/qib_iba6120.c | 2 -- drivers/infiniband/hw/qib/qib_iba7220.c | 3 --- drivers/infiniband/hw/qib/qib_iba7322.c | 15 ++++----------- drivers/infiniband/hw/qib/qib_mad.c | 3 +-- drivers/infiniband/hw/qib/qib_pcie.c | 3 +-- drivers/infiniband/hw/qib/qib_sd7220.c | 2 -- drivers/infiniband/hw/qib/qib_tx.c | 4 ---- drivers/infiniband/hw/qib/qib_verbs.c | 3 +-- 10 files changed, 7 insertions(+), 43 deletions(-) commit 658115b0909c48ab0228f4a0894ce3c0d98ca397 Author: Bart Van Assche Date: Wed Oct 11 10:49:21 2017 -0700 IB/qib: Suppress gcc 7 fall-through complaints Avoid that gcc 7 reports the following warning when building with W=1: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Bart Van Assche Acked-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_mad.c | 1 + drivers/infiniband/hw/qib/qib_rc.c | 2 +- drivers/infiniband/hw/qib/qib_sdma.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) commit 66392615dcf92558d5f5b17d01aa5ffa212d8959 Author: Bart Van Assche Date: Wed Oct 11 10:49:20 2017 -0700 IB/qib: Remove remaining code related to writing the EEPROM Due to removal of the EEPROM writing code, the qib_inc_eeprom_err() macro became a no-op. Remove the code that calls it. Since that change removes all code that reads the eep_st_masks array, also remove the code that updates that array and the array itself. References: commit 18c0b82a3e45 ("IB/qib: Do not write EEPROM") Signed-off-by: Bart Van Assche Cc: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib.h | 18 ------------------ drivers/infiniband/hw/qib/qib_iba6120.c | 25 ------------------------- drivers/infiniband/hw/qib/qib_iba7220.c | 20 -------------------- drivers/infiniband/hw/qib/qib_iba7322.c | 6 +----- 4 files changed, 1 insertion(+), 68 deletions(-) commit 1b8a708bbaf3046037363c599f55ead669b5f056 Author: Bart Van Assche Date: Wed Oct 11 10:49:19 2017 -0700 RDMA/qedr: Remove set-but-not-used variables Signed-off-by: Bart Van Assche Cc: Ram Amrani Cc: Michal Kalderon Cc: Ariel Elior Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/verbs.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 99847b5c1b2de673052d8a0a089248b0dc5a37b2 Author: Bart Van Assche Date: Wed Oct 11 10:49:18 2017 -0700 RDMA/qedr: Annotate iomem pointers correctly Signed-off-by: Bart Van Assche Cc: Ram Amrani Cc: Michal Kalderon Cc: Ariel Elior Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0089985e2505773f090e12fd59644b6adff4ed4f Author: Bart Van Assche Date: Wed Oct 11 10:49:17 2017 -0700 RDMA/qedr: Declare local functions static Signed-off-by: Bart Van Assche Cc: Michal Kalderon Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/main.c | 22 +++++++++++----------- drivers/infiniband/hw/qedr/qedr_iw_cm.c | 14 +++++++------- drivers/infiniband/hw/qedr/qedr_roce_cm.c | 27 +++++++++++++-------------- drivers/infiniband/hw/qedr/verbs.c | 2 +- 4 files changed, 32 insertions(+), 33 deletions(-) commit f3895c2dade19b142d9af121b8cb2529a5416b25 Author: Bart Van Assche Date: Wed Oct 11 10:49:16 2017 -0700 RDMA/qedr: Use NULL instead of 0 to represent a pointer Signed-off-by: Bart Van Assche Cc: Ram Amrani Cc: Michal Kalderon Cc: Ariel Elior Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/qedr_roce_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05a8a1cbf481be88c0183795317ffb509fe8a8cd Author: Bart Van Assche Date: Wed Oct 11 10:49:15 2017 -0700 RDMA/ocrdma: Remove set-but-not-used variables Signed-off-by: Bart Van Assche Cc: Selvin Xavier Cc: Devesh Sharma Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 4 ++-- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) commit 705dec3c9f33d1d0e46b75446a80a3d91faf5a96 Author: Bart Van Assche Date: Wed Oct 11 10:49:14 2017 -0700 RDMA/ocrdma: Suppress gcc 7 fall-through complaints Avoid that gcc 7 reports the following warning when building with W=1: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Bart Van Assche Cc: Selvin Xavier Cc: Devesh Sharma Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 ++ 1 file changed, 2 insertions(+) commit 69a840357df94f4bc2b658b49273fe452231e3c4 Author: Bart Van Assche Date: Wed Oct 11 10:49:13 2017 -0700 RDMA/ocrdma: Use NULL instead of 0 to represent a pointer Signed-off-by: Bart Van Assche Cc: Selvin Xavier Cc: Devesh Sharma Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 52adbb691484c175ca067917c858e16727b03cc9 Author: Bart Van Assche Date: Wed Oct 11 10:49:12 2017 -0700 IB/nes: Fix a race condition in nes_inetaddr_event() This patch has been compile-tested only. Signed-off-by: Bart Van Assche Cc: Faisal Latif Acked-by: Faisal Latif Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit fd9e04d6d2949607174166844b790f18be519c75 Author: Bart Van Assche Date: Wed Oct 11 10:49:11 2017 -0700 IB/nes: Remove set-but-not-used variables This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Faisal Latif Acked-by: Faisal Latif Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes_cm.c | 8 -------- drivers/infiniband/hw/nes/nes_utils.c | 5 ++--- 2 files changed, 2 insertions(+), 11 deletions(-) commit ea45c45be00e1ab6de11914a43a86d7aa5c91051 Author: Bart Van Assche Date: Wed Oct 11 10:49:10 2017 -0700 IB/nes: Suppress gcc 7 fall-through complaints Avoid that gcc 7 reports the following warning when building with W=1: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Bart Van Assche Cc: Faisal Latif Acked-by: Faisal Latif Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes_cm.c | 1 + drivers/infiniband/hw/nes/nes_hw.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit af758a228537d668aba1c352197760c15d5e9067 Author: Bart Van Assche Date: Wed Oct 11 10:49:09 2017 -0700 IB/nes: Fix indentation Signed-off-by: Bart Van Assche Cc: Faisal Latif Acked-by: Faisal Latif Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes.c | 22 +++++++++++----------- drivers/infiniband/hw/nes/nes_hw.c | 5 +++-- drivers/infiniband/hw/nes/nes_nic.c | 9 ++++----- drivers/infiniband/hw/nes/nes_utils.c | 8 ++++---- drivers/infiniband/hw/nes/nes_verbs.c | 12 ++++++------ 5 files changed, 28 insertions(+), 28 deletions(-) commit 3d1f236dccd847fb6d083684a7105e0bd9d174fa Author: Bart Van Assche Date: Wed Oct 11 10:49:08 2017 -0700 IB/mlx5: Remove a set-but-not-used variable References: commit 5fe9dec0d045 ("IB/mlx5: Use blue flame register allocator in mlx5_ib") Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 2 -- 1 file changed, 2 deletions(-) commit f6b1ee349db4ff1fcc12e2a078b24c4f83beed7e Author: Bart Van Assche Date: Wed Oct 11 10:49:07 2017 -0700 IB/mlx5: Suppress gcc 7 fall-through complaints Avoid that gcc 7 reports the following warning when building with W=1: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/cq.c | 2 ++ drivers/infiniband/hw/mlx5/qp.c | 1 + 2 files changed, 3 insertions(+) commit 8aff1fb310ec7472adecea52def6d40962ed9e48 Author: Bart Van Assche Date: Wed Oct 11 10:49:06 2017 -0700 IB/mlx4: Suppress gcc 7 fall-through complaints Avoid that gcc 7 reports the following warning when building with W=1: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/cq.c | 2 ++ drivers/infiniband/hw/mlx4/mcg.c | 1 + 2 files changed, 3 insertions(+) commit 8a53f41b1624c979920b3f1b5558ee4da350f4f0 Author: Bart Van Assche Date: Wed Oct 11 10:49:05 2017 -0700 IB/mthca: Fix indentation Signed-off-by: Bart Van Assche Cc: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mthca/mthca_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4956f031e13a2546da1f7049188e0ca766a25607 Author: Bart Van Assche Date: Wed Oct 11 10:49:04 2017 -0700 RDMA/i40iw: Remove a set-but-not-used variable Signed-off-by: Bart Van Assche Reviewed-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_cm.c | 2 -- 1 file changed, 2 deletions(-) commit ad4d63401008ea9ac6c5b1613d86c756c6ab9a2a Author: Bart Van Assche Date: Wed Oct 11 10:49:03 2017 -0700 RDMA/i40iw: Suppress gcc 7 fall-through complaints Avoid that gcc 7 reports the following warning when building with W=1: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Bart Van Assche Reviewed-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_cm.c | 1 + drivers/infiniband/hw/i40iw/i40iw_hw.c | 1 + drivers/infiniband/hw/i40iw/i40iw_puda.c | 1 + 3 files changed, 3 insertions(+) commit b965b51c55c5a21d65ca36592c6048ea60c3ace9 Author: Bart Van Assche Date: Wed Oct 11 10:49:02 2017 -0700 RDMA/i40iw: Fix a race condition Use the proper primitives to dereference the RCU pointer upper_dev->ip_ptr. Compile-tested only. Signed-off-by: Bart Van Assche Reviewed-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_utils.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit d61d6de0744ffc294cb50a3c1952ef383676d440 Author: Bart Van Assche Date: Wed Oct 11 10:49:01 2017 -0700 IB/hns: Declare local functions 'static' Signed-off-by: Bart Van Assche Cc: Lijun Ou Cc: Wei Hu (Xavier) Cc: Shaobo Xu Acked-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 64 ++++++++++++++++-------------- 1 file changed, 35 insertions(+), 29 deletions(-) commit cc4ed08bc56ee42a7ade7602c242007c73a7c94b Author: Bart Van Assche Date: Wed Oct 11 10:49:00 2017 -0700 IB/hns: Annotate iomem pointers correctly This patch avoids that sparse complains that there is an address space mismatch. Signed-off-by: Bart Van Assche Cc: Lijun Ou Cc: Wei Hu (Xavier) Cc: Shaobo Xu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_eq.c | 6 +++--- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 9 +++++---- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 ++- 3 files changed, 10 insertions(+), 8 deletions(-) commit e2fdbc23689258d9dd43450048707c953bab5f89 Author: Bart Van Assche Date: Wed Oct 11 10:48:59 2017 -0700 IB/hfi1: Define hfi1_handle_cnp_tbl[] once Move the hfi1_handle_cnp_tbl[] from a header file to a .c file such that only one copy ends up in the hfi1 kernel module. This patch does not change any functionality. Signed-off-by: Bart Van Assche Reviewed-by: Dennis Dalessandro Cc: Ira Weiny Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/driver.c | 6 ++++++ drivers/infiniband/hw/hfi1/hfi.h | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) commit 6d945a84c69d68a2c494b716642cab2c15d55b4c Author: Bart Van Assche Date: Wed Oct 11 10:48:58 2017 -0700 IB/hfi1: Remove set-but-not-used variables Signed-off-by: Bart Van Assche Reviewed-by: Dennis Dalessandro Cc: Ira Weiny Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 4 +--- drivers/infiniband/hw/hfi1/mad.c | 2 -- drivers/infiniband/hw/hfi1/ruc.c | 9 --------- drivers/infiniband/hw/hfi1/sdma.c | 2 -- drivers/infiniband/hw/hfi1/ud.c | 2 -- drivers/infiniband/hw/hfi1/verbs.c | 10 ---------- 6 files changed, 1 insertion(+), 28 deletions(-) commit 6ffeb21f8e38c71146072fa0a099d976b0762a15 Author: Bart Van Assche Date: Wed Oct 11 10:48:57 2017 -0700 IB/hfi1: Suppress gcc 7 fall-through complaints Avoid that gcc 7 reports the following warning when building with W=1: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Bart Van Assche Reviewed-by: Dennis Dalessandro Cc: Ira Weiny Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/mad.c | 1 + drivers/infiniband/hw/hfi1/rc.c | 2 +- drivers/infiniband/hw/hfi1/sdma.c | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) commit 81e74ec286135927df6b360b3cea61764da4fdb9 Author: Bart Van Assche Date: Wed Oct 11 10:48:56 2017 -0700 RDMA/cxgb4: Remove a set-but-not-used variable Signed-off-by: Bart Van Assche Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 3 --- 1 file changed, 3 deletions(-) commit 9ae970e27729e976598584a9427e8f8705efa585 Author: Bart Van Assche Date: Wed Oct 11 10:48:55 2017 -0700 RDMA/cxgb4: Suppress gcc 7 fall-through complaints Avoid that gcc 7 reports the following warning when building with W=1: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Bart Van Assche Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 1 + 1 file changed, 1 insertion(+) commit 76ca0d1b16233b0d7c03aadaafc56931d095b79c Author: Bart Van Assche Date: Wed Oct 11 10:48:54 2017 -0700 RDMA/cxgb4: Remove the obsolete kernel module option 'c4iw_debug' This patch avoids that building the cxgb4 module with W=1 triggers a complaint about a local variable that has not been declared static. Signed-off-by: Bart Van Assche Cc: Steve Wise Acked-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 4 ---- 1 file changed, 4 deletions(-) commit 70d7256819639e2b0c0425a50bbbb9e9fd9e9286 Author: Bart Van Assche Date: Wed Oct 11 10:48:53 2017 -0700 RDMA/cxgb4: Fix indentation This patch avoids that smatch reports the following: drivers/infiniband/hw/cxgb4/device.c:1105: copy_gl_to_skb_pkt() warn: inconsistent indenting drivers/infiniband/hw/cxgb4/cm.c:835: send_connect() warn: inconsistent indenting drivers/infiniband/hw/cxgb4/cm.c:841: send_connect() warn: inconsistent indenting drivers/infiniband/hw/cxgb4/cm.c:888: send_connect() warn: inconsistent indenting drivers/infiniband/hw/cxgb4/cm.c:894: send_connect() warn: inconsistent indenting Signed-off-by: Bart Van Assche Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 8 ++++---- drivers/infiniband/hw/cxgb4/device.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 17e4e543aaf02efb957692c80b0a358568b03a2e Author: Bart Van Assche Date: Wed Oct 11 10:48:52 2017 -0700 RDMA/cxgb3: Remove a set-but-not-used variable Signed-off-by: Bart Van Assche Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb3/iwch_cm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 90a6b76b2d6445ef83fe65519349377b68d7ae81 Author: Bart Van Assche Date: Wed Oct 11 10:48:51 2017 -0700 RDMA/cxgb3: Annotate an RCU pointer Annotate t3cdev.l2opt with __rcu since it is used as an RCU pointer. Signed-off-by: Bart Van Assche Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/net/ethernet/chelsio/cxgb3/t3cdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f5461b2021ae100d0171e6e0d99c009f84f3ac6 Author: Bart Van Assche Date: Wed Oct 11 10:48:50 2017 -0700 RDMA/cxgb3: Annotate locking assumptions Tell sparse what the locking assumptions are for __flush_qp() such that it does not complain about the locking operations inside that function. Signed-off-by: Bart Van Assche Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb3/iwch_qp.c | 3 +++ 1 file changed, 3 insertions(+) commit 6dfa8ae6b405ed5ce76a9f76eaa30d2dceca91f0 Author: Bart Van Assche Date: Wed Oct 11 10:48:49 2017 -0700 RDMA/bnxt_re: Remove set-but-not-used variables Signed-off-by: Bart Van Assche Cc: Somnath Kotur Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/ib_verbs.c | 12 +++++------- drivers/infiniband/hw/bnxt_re/qplib_fp.c | 5 ----- drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 4 ---- drivers/infiniband/hw/bnxt_re/qplib_sp.c | 5 ++--- 4 files changed, 7 insertions(+), 19 deletions(-) commit 38c8a7105955c18278a7c8af62838b9fa24c3e53 Author: Bart Van Assche Date: Wed Oct 11 10:48:48 2017 -0700 RDMA/bnxt_re: Suppress gcc 7 fall-through complaints Avoid that gcc 7 reports the following warning when building with W=1: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Bart Van Assche Cc: Somnath Kotur Signed-off-by: Doug Ledford drivers/infiniband/hw/bnxt_re/qplib_fp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2271bd0834b8b2497ce39ca84820dd033b2deae Author: Bart Van Assche Date: Wed Oct 11 10:48:47 2017 -0700 RDMA/isert: Suppress gcc 7 fall-through complaints Avoid that gcc 7 reports the following warning when building with W=1: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Bart Van Assche Acked-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/ulp/isert/ib_isert.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit d39dcd6a2d69ed32e56ae0224900ea2aa23a953d Author: Bart Van Assche Date: Wed Oct 11 10:48:46 2017 -0700 RDMA/iwcm: Remove a set-but-not-used variable Signed-off-by: Bart Van Assche Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/core/iwcm.c | 3 --- 1 file changed, 3 deletions(-) commit c0b64f58e8d49570aa9ee55d880f92c20ff0166b Author: Bart Van Assche Date: Wed Oct 11 10:48:45 2017 -0700 RDMA/cma: Avoid triggering undefined behavior According to the C standard the behavior of computations with integer operands is as follows: * A computation involving unsigned operands can never overflow, because a result that cannot be represented by the resulting unsigned integer type is reduced modulo the number that is one greater than the largest value that can be represented by the resulting type. * The behavior for signed integer underflow and overflow is undefined. Hence only use unsigned integers when checking for integer overflow. This patch is what I came up with after having analyzed the following smatch warnings: drivers/infiniband/core/cma.c:3448: cma_resolve_ib_udp() warn: signed overflow undefined. 'offset + conn_param->private_data_len < conn_param->private_data_len' drivers/infiniband/core/cma.c:3505: cma_connect_ib() warn: signed overflow undefined. 'offset + conn_param->private_data_len < conn_param->private_data_len' Signed-off-by: Bart Van Assche Acked-by: Sean Hefty Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 401c6ae363bdc66e724b4589881a0c0ffc9d7775 Author: Bart Van Assche Date: Wed Oct 11 10:48:44 2017 -0700 IB/cm: Suppress gcc 7 fall-through complaints Avoid that gcc 7 reports the following warning when building with W=1: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Bart Van Assche Acked-by: Sean Hefty Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 1 + 1 file changed, 1 insertion(+) commit 1c3aea2bc8f0b2e5b57375ead40457ff75a3a2ec Author: Bart Van Assche Date: Wed Oct 11 10:48:43 2017 -0700 IB/core: Fix endianness annotation in rdma_is_multicast_addr() Since ipv4_addr is a big endian 32-bit number, annotate it as such. Fixes: commit be1d325a3358 ("IB/core: Set RoCEv2 MGID according to spec") Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford include/rdma/ib_addr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 11b86c7004ef14f9f8c1e2caf66bfaad6f3167a2 Author: Gwendal Grignou Date: Thu Oct 12 19:33:23 2017 +0200 platform/chrome: Add cros_ec_accel_legacy driver Add driver to support older EC firmware that only support deprecated ec command. Rely on ACPI memory map register to access sensor information. Present same interface as the regular cros_ec sensor stack: - one iio device per accelerometer - use HTML5 axis definition - use iio abi units - accept calibration calls, but do nothing Chrome can use the same code than regular cros_ec sensor stack to calculate orientation and lid angle. Signed-off-by: Gwendal Grignou Signed-off-by: Thierry Escande Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio-cros-ec | 10 + drivers/iio/accel/Kconfig | 11 + drivers/iio/accel/Makefile | 2 + drivers/iio/accel/cros_ec_accel_legacy.c | 423 ++++++++++++++++++++++++ 4 files changed, 446 insertions(+) commit 47e3ec0e4dae1714cc76596e38d16913f0e574e2 Author: Heiko Stuebner Date: Fri Sep 15 10:33:50 2017 +0200 clk: rockchip: use new cif/vdpu clock ids on rk3188 Use the new clock-ids for cif, vdpu, vepu on rk3188 Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3188.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 216ac5297a8083ac4a27a6cbc3d20d13dd17984d Author: Romain Perier Date: Mon Sep 4 10:51:17 2017 +0200 clk: rockchip: export clock pclk_efuse_256 for RK3368 SoCs This exports the clock for the pclk gate of the eFuse that is part of the RK3368 SoCs. So we can use it from the dt-bindings. Signed-off-by: Romain Perier Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-rk3368.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51cec8709b2022a420511ca19041d7a393259f96 Merge: 9edb39d 4e07533 Author: Heiko Stuebner Date: Sat Oct 14 21:31:05 2017 +0200 Merge branch 'v4.15-shared/clkids' into v4.15-clk/next commit 4e07533f30e8e2d4447fc4e159d34b4068d96efc Author: Heiko Stuebner Date: Fri Sep 15 10:33:49 2017 +0200 clk: rockchip: add more rk3188 graphics clock ids Add ids for cif, v{d/e}pu clocks on rk3188. ACLK_CIF does get a needed 1 at it's end but that should be safe because no driver for the camera interface has surfaced so far and the old vendor kernels for these socs are based on linux-3.0 and still used board files then, so there really are no previous users anywhere to be found. Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rk3188-cru-common.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 8c04f7a3e347cb2a00074d197f5cd5b25c6fe383 Author: Romain Perier Date: Mon Sep 4 10:51:16 2017 +0200 clk: rockchip: add clock id for PCLK_EFUSE256 of RK3368 SoCs Signed-off-by: Romain Perier Signed-off-by: Heiko Stuebner include/dt-bindings/clock/rk3368-cru.h | 1 + 1 file changed, 1 insertion(+) commit 689f2d8582eb4ce3b9eed7f15b716f929606e17a Author: Heinrich Schuchardt Date: Sat Sep 30 06:06:40 2017 +0200 arm64: dts: rockchip: default serial for Firefly-RK3399 The Firefly-RK3399 uses serial2 with 1,500,000 baud by default for communication in U-Boot and in the vendor provided distros. So let us set the same default in the Linux kernel. Signed-off-by: Heinrich Schuchardt Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 4 ++++ 1 file changed, 4 insertions(+) commit aef56580e3c5fb389390b47d731d16f9ca32d80c Author: Emil Renner Berthing Date: Mon Oct 9 20:40:28 2017 +0200 arm64: dts: rockchip: enable touchpad button for rk3399-gru-kevin Adding the linux,gpio-keymap entry also has the side-effect of making the driver register the touchpad as a touchpad rather than another touchscreen. The index for BTN_LEFT was found by trial and error. Signed-off-by: Emil Renner Berthing Acked-by: Dmitry Torokhov Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 345b40f1e50759d09144c4aa044d07823d77c283 Author: Michael Trimarchi Date: Fri Oct 13 23:03:32 2017 +0530 ARM: dts: rockchip: Enable thermal on rk3288-vyasa board Enable thermal on rk3288-vyasa board, TSHUT is high active. Signed-off-by: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-vyasa.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 89aab2d6a734fb488a490394a6701aec3d79b318 Author: Linus Walleij Date: Sat Oct 14 17:13:03 2017 +0200 pinctrl: gemini: Add missing functions Some two functions were missing from the Gemini pin control driver. Noticed when trying to use ethernet. Fix it up by adding them. Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-gemini.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ad7532cefd11d11a0814a75fb814c205ee3d9d4c Author: Srinivas Pandruvada Date: Wed Oct 11 09:35:01 2017 -0700 iio: hid-sensor-trigger: Don't touch sensors unless user space requests One of the user complained that on his system Thinkpad Yoga S1, with commit f1664eaacec3 ("iio: hid-sensor-trigger: Fix the race with user space powering up sensors") causes the system to resume immediately on suspend (S3 operation). On this system the sensor hub is on USB and is a wake up device from S3. So if any sensor sends data on motion, the system will wake up. This can be a legitimate use case to wake up device motion, but that needs proper user space support to set right thresholds. In fact the above commit didn't cause this regression, but any operation which cause sensors to wake up would have caused the same issue. So if user reads the raw sensor data, same issue occurs, with or without this commit. Only difference is that the above commit by default will trigger a power up and power down of sensors as part of runtime pm enable (runtime enable will cause a runtime resume callback followed by runtime_suspend callback). Previously user has to do some action on sensors. On investigation it was observed that the current driver correctly changing the state of all sensors to power off but then also some sensor will still send some data. Only option is to never power up any sensor. Only good option is to: - Using sysfs interface disable USB as a wakeup device (This will not need any driver change) Since some user don't care about sensors. So for those users this change brings back old functionality. As long as they don't cause any operation to power up sensors (like raw read or start iio-sensor-proxy service), the sensors will not be to touched. This is done by delaying run time enable till user space does some operation with sensors. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196853 Signed-off-by: Srinivas Pandruvada Signed-off-by: Jonathan Cameron drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 12 +++++++++--- include/linux/hid-sensor-hub.h | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) commit 446b3217a96c456ab8796605fbb3ce379b03a504 Author: Peter Meerwald-Stadler Date: Wed Oct 11 11:09:08 2017 +0200 dt-bindings: iio: health: Use binding name for max30102 in example Signed-off-by: Peter Meerwald-Stadler Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/health/max30102.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d39a6cc38899d3f77b5f8bb03afcdc407e11933 Author: Peter Meerwald-Stadler Date: Wed Oct 11 11:09:07 2017 +0200 dt-bindings: iio: health: Fix max30100 I2C chip address in example Should be in hex, not decimal or even octal Signed-off-by: Peter Meerwald-Stadler Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/health/max30100.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b5ae577741bec22b584fa704076ccd8221cad19d Author: Alex Vesker Date: Thu Sep 14 18:22:50 2017 +0300 net/mlx5e: IPoIB, Modify rdma netdev allocate and free to support PKEY Resources such as FT, QPN HT and mdev resources should be allocated only by parent netdev. Shared resources are allocated and freed by the parent interface since the parent is always present and created before the IPoIB PKEY sub-interface. Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit .../net/ethernet/mellanox/mlx5/core/en_common.c | 1 + .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 52 ++++++++++++++-------- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h | 1 + 3 files changed, 36 insertions(+), 18 deletions(-) commit 6a910233c1eb19673dd0f37f1d72d7cdc419e176 Author: Alex Vesker Date: Thu Sep 14 18:02:31 2017 +0300 net/mlx5e: IPoIB, Add PKEY child interface ethtool ops Similar to VLAN interfaces child interfaces have limited ethtool support. In current code the main limitation that does not allow child interface ethtool configuration is due to shared resources which are managed by the parent. Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c | 5 +++++ drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) commit af98cebcb3e66d349173c33c0aaef352d108a081 Author: Alex Vesker Date: Thu Sep 14 16:33:35 2017 +0300 net/mlx5e: IPoIB, Add PKEY child interface ndos Child interface ndos will be called to support child interface specific behaviour. ndo_init flow: -Acquire shared QPN to net-device HT from parent -Continue with the same flow as parent interface ndo_open flow: -Initialize child underlay QP and connect to shared FT -Create child send TIS -Open child send channels Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 10 +- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h | 8 ++ .../ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c | 133 ++++++++++++++++++++- 3 files changed, 144 insertions(+), 7 deletions(-) commit 4c6c615e3f308aee26277abebc7d4ffcd9a6abe2 Author: Alex Vesker Date: Thu Sep 14 14:08:39 2017 +0300 net/mlx5e: IPoIB, Add PKEY child interface nic profile Child interface profile will be called to support child interface specific behaviour. The child code is sparse compared to the parent since the RX channels are shared between the interfaces. Creating a septate profile for child and parent will make a smother code with a better ability for future expansion. The profile stuct is exposed to the parent using a getter function. Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 12 ++-- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h | 13 ++++ .../ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c | 83 ++++++++++++++++++++++ 3 files changed, 102 insertions(+), 6 deletions(-) commit 7e7f4780c3402bd181eea82ca6395013623e4fbf Author: Alex Vesker Date: Thu Sep 14 10:27:25 2017 +0300 net/mlx5e: IPoIB, Use hash-table to map between QPN to child netdev This change is needed for PKEY support, since the RQs are shared between the child interface and the parent. The parent is responsible for NAPI and the precessing of RX completions. Using the dqpn in the completion descriptor we set the corresponding child IPoIB netdevice on the SKB. The mapping between the dqpn and the netdevice is done using a HT, each mlx5 IPoIB interface registers its mapping on creation. Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 20 ++- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 16 +++ .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h | 12 ++ .../ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c | 136 +++++++++++++++++++++ 5 files changed, 184 insertions(+), 2 deletions(-) commit da34f1a85b78c2220dac1ce4f4c4595dd0cab5a9 Author: Alex Vesker Date: Wed Sep 13 12:17:50 2017 +0300 net/mlx5e: IPoIB, Support for setting PKEY index to underlay QP Added a function to set PKEY index to IPoIB device driver using the already present set_id function. PKEY index is attached to the QP during state modification. Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 9 +++++++++ drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h | 1 + 2 files changed, 10 insertions(+) commit 980f91c3a62852ebfd0e60387d4a9d13934d9760 Author: Alex Vesker Date: Wed Jun 14 22:18:48 2017 +0300 IB/ipoib: Add ability to set PKEY index to lower device driver To support passing child interfaces to the lower device a new rdma_netdev function was used, set_id. This will allow us to attach the PKEY index lower device resources such as TIS/QP. For devices that do not support offloads in IPoIB same logic will be used, setting the PKEY index to priv struct. Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit drivers/infiniband/ulp/ipoib/ipoib_ib.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b4b678b06f6eef18bff44a338c01870234db0bc9 Author: Alex Vesker Date: Tue Oct 10 10:36:41 2017 +0300 IB/ipoib: Grab rtnl lock on heavy flush when calling ndo_open/stop When ndo_open and ndo_stop are called RTNL lock should be held. In this specific case ipoib_ib_dev_open calls the offloaded ndo_open which re-sets the number of TX queue assuming RTNL lock is held. Since RTNL lock is not held, RTNL assert will fail. Signed-off-by: Alex Vesker drivers/infiniband/ulp/ipoib/ipoib_ib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit dae37456c8ac3afe8d5f306717f2b75ed5ca38d9 Author: Alex Vesker Date: Wed Sep 13 11:37:02 2017 +0300 net/mlx5: Support for attaching multiple underlay QPs to root flow table Previous support allowed connecting only a single QPN to the FT. Now using a linked list multiple QPNs can be attached to the same FT. Supporting attaching multiple underlay QPs is required for PKEY support in which child and parent share the same FT. The actual attaching/detaching FW commands will be called inside the function symmetrically. This change requires a change in IPoIB open and close functions, the attaching/detaching to/from the FT is done each time we open/close. Signed-off-by: Alex Vesker Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed Signed-off-by: Leon Romanovsky drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 13 ++- drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h | 4 +- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 123 ++++++++++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 7 +- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 78 +++++++------ 5 files changed, 171 insertions(+), 54 deletions(-) commit c8249eda7fac00b55eca17ab05207be291d91a3f Author: Alex Vesker Date: Tue Sep 12 14:11:29 2017 +0300 net/mlx5e: IPoIB, Move underlay QP init/uninit to separate functions During the creation of the underlay QP the PKEY index is unknown, the PKEY index is known only when calling ndo_open. PKEY index attached to the QP during state modification. Splitting the functions will also make the code symmetric and more readable. This split is also required for later PKEY support to be called with the PKEY index during ndo_open. Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit Signed-off-by: Leon Romanovsky .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 108 +++++++++++++-------- 1 file changed, 70 insertions(+), 38 deletions(-) commit 7c39afb394c79e72c3795b4a42d55155b34ee073 Author: Feras Daoud Date: Tue Aug 15 13:46:04 2017 +0300 net/mlx5: PTP code migration to driver core section PTP code is moved to core section of mlx5 driver in order to share it between ethernet and infiniband. This movement involves the following changes: - Change mlx5e_ prefix to be mlx5_ - Add clock structs to Core - Add clock object to mlx5_core_dev - Call Init/Uninit clock from core init/cleanup - Rename mlx5e_tstamp to be mlx5_clock Signed-off-by: Feras Daoud Signed-off-by: Eitan Rabin Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/en.h | 39 +- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 95 +++- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 17 +- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 6 +- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 3 +- .../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 3 +- .../net/ethernet/mellanox/mlx5/core/lib/clock.c | 548 +++++++++------------ .../net/ethernet/mellanox/mlx5/core/lib/clock.h | 51 ++ drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 + .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 1 + include/linux/mlx5/driver.h | 24 + 12 files changed, 416 insertions(+), 382 deletions(-) commit ae904beaea48d369205c81dbffecc23afcec46de Author: Feras Daoud Date: Mon Aug 14 11:23:27 2017 +0300 net/mlx5: File renaming towards ptp core implementation en_clock.c renamed clock.c and moved to lib/ as first step towards relocating code to core part of the driver to allow sharing between Ethernet and Infiniband. Signed-off-by: Feras Daoud Signed-off-by: Eitan Rabin Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 2 +- drivers/net/ethernet/mellanox/mlx5/core/Makefile | 4 +- drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 619 --------------------- .../net/ethernet/mellanox/mlx5/core/lib/clock.c | 619 +++++++++++++++++++++ 4 files changed, 622 insertions(+), 622 deletions(-) commit 8bc46548771cec134aa4c86f7cdf4e019f9f2a85 Merge: 40d0af5 bfddbc8 Author: David S. Miller Date: Sat Oct 14 11:13:29 2017 -0700 Merge branch 'nfp-bpf-support-direct-packet-access' Jakub Kicinski says: ==================== nfp: bpf: support direct packet access The core of this series is direct packet access support. With a small change to the verifier, the offloaded code can now make use of DPA. We need to be careful to use kernel (after initial translation) offsets in our JIT. Direct packet access also brings us to the problem of eBPF endianness. After considering the changes necessary we decided to not support translation on both BE and LE hosts, for now. This series contains two fixes - one for compare instructions and one for ineffective jne optimization. I chose to include fixes in this set because the code in -net works only with unreleased PoC FW (ABI version 1) and therefore nobody outside of Netronome can exercise it anyway. ==================== Signed-off-by: David S. Miller commit bfddbc8adcd471806f2369d347a958d11e80f53b Author: Jakub Kicinski Date: Thu Oct 12 10:34:18 2017 -0700 nfp: bpf: support direct packet access in TC Add support for direct packet access in TC, note that because writing the packet will cause the verifier to generate a csum fixup prologue we won't be able to offload packet writes from TC, just yet, only the reads will work. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit e663fe3863ad20c5e6a84a1a1d47aff8e71f583f Author: Jakub Kicinski Date: Thu Oct 12 10:34:17 2017 -0700 nfp: bpf: direct packet access - write This patch adds ability to write packet contents using pre-validated packet pointers (direct packet access). Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 114 +++++++++++++++++++++++++-- drivers/net/ethernet/netronome/nfp/nfp_asm.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_asm.h | 2 +- 3 files changed, 109 insertions(+), 9 deletions(-) commit 2ca71441f524b0a0cc01d8e51c875b00fbe31275 Author: Jakub Kicinski Date: Thu Oct 12 10:34:16 2017 -0700 nfp: bpf: add support for direct packet access - read In direct packet access bound checks are already done, we can simply dereference the packet pointer. Verifier/parser logic needs to record pointer type. Note that although verifier does protect us from CTX vs other pointer changes we will also want to differentiate between PACKET vs MAP_VALUE or STACK, so we can add the check already. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 85 +++++++++++++++++++++-- drivers/net/ethernet/netronome/nfp/bpf/main.h | 3 + drivers/net/ethernet/netronome/nfp/bpf/verifier.c | 21 ++++-- drivers/net/ethernet/netronome/nfp/nfp_asm.c | 3 + drivers/net/ethernet/netronome/nfp/nfp_asm.h | 4 ++ 5 files changed, 105 insertions(+), 11 deletions(-) commit 0a7939775f8546268206c1e8efe78218f3c18aae Author: Jakub Kicinski Date: Thu Oct 12 10:34:15 2017 -0700 nfp: bpf: separate I/O from checks for legacy data load Move data load into a separate function and separate it from packet length checks of legacy I/O. This makes the code more readable and easier to reuse. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 77 +++++++++++++++------------- 1 file changed, 40 insertions(+), 37 deletions(-) commit 943c57b97cde2ce0806e59b553c650c9889d8b69 Author: Jakub Kicinski Date: Thu Oct 12 10:34:14 2017 -0700 nfp: bpf: fix context accesses Sizes of fields in struct xdp_md/xdp_buff and some in sk_buff depend on target architecture. Take that into account and use struct xdp_buff, not struct xdp_md. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 49 ++++++++++++++++------------ 1 file changed, 29 insertions(+), 20 deletions(-) commit 0f6cf4ddf63fa4d645c36d96ed1092fe7a0a8d0f Author: Jakub Kicinski Date: Thu Oct 12 10:34:13 2017 -0700 nfp: bpf: support BPF offload only on little endian eBPF is host-endian specific. Translating both BE and LE eBPF to the NFP is feasible, but would require quite a bit of indirection. The fact that I don't have access to any BE hosts that would fit a 25G/40G/100G NIC is also limiting my ability to test big endian. For now restrict the offload to little endian hosts only. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/main.c | 2 ++ 1 file changed, 2 insertions(+) commit 3119d1fd46464c61c80731c3a9f40eee4434fc1d Author: Jakub Kicinski Date: Thu Oct 12 10:34:12 2017 -0700 nfp: bpf: implement byte swap instruction Implement byte swaps with rotations, shifts and byte loads. Remember to clear upper parts of the 64 bit registers. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit c000dfb5e29a2abaf303cf90502cb68227f29fae Author: Jakub Kicinski Date: Thu Oct 12 10:34:11 2017 -0700 nfp: bpf: add mov helper Register move operation is encoded as alu no op. This means that one has to specify number of unused/none parameters to the emit_alu(). Add a helper. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 31 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 26fa818dc07c649fcb37674580ebd5a3c7cae66c Author: Jakub Kicinski Date: Thu Oct 12 10:34:10 2017 -0700 nfp: bpf: fix compare instructions Now that we have BPF assemebler support in LLVM 6 we can easily test all compare instructions (LLVM 4 didn't generate most of them from C). Fix the compare to immediates and refactor the order of compare to regs to make sure they both follow the same pattern. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 8283737065b2dab480cd10e00e6f8abbcb62b5b0 Author: Jakub Kicinski Date: Thu Oct 12 10:34:09 2017 -0700 nfp: bpf: add missing return in jne_imm optimization We optimize comparisons to immediate 0 as if (reg.lo | reg.hi). The early return statement was missing, however, which means we would generate two comparisons - optimized one followed by a normal 2x 32 bit compare. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 1 + 1 file changed, 1 insertion(+) commit bc8c80a8c978d24b2746dc7d9a8cef65ae82be3c Author: Jakub Kicinski Date: Thu Oct 12 10:34:08 2017 -0700 nfp: bpf: reorder arguments to emit_ld_field_any() ld_field instruction has the following format in NFP assembler: ld_field[dst, 1000, src, <<24] reoder parameters to emit_ld_field_any() to make it closer to the familiar assembler order. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1bdec44955edc22fb840f5965987d2972307dcc9 Author: Jakub Kicinski Date: Thu Oct 12 10:34:07 2017 -0700 bpf: verifier: set reg_type on context accesses in second pass Use a simplified is_valid_access() callback when verifier is used for program analysis by non-host JITs. This allows us to teach the verifier about packet start and packet end offsets for direct packet access. We can extend the callback as needed but for most packet processing needs there isn't much more the offloads may require. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller kernel/bpf/verifier.c | 43 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) commit 40d0af56350e7534bc11c9370670010cfa74cfa7 Merge: 258bbb1 a0daae1 Author: David S. Miller Date: Sat Oct 14 11:12:08 2017 -0700 Merge branch 'stmmac-Improvements-for-multi-queuing-and-for-AVB' Jose Abreu says: ==================== net: stmmac: Improvements for multi-queuing and for AVB Two improvements for stmmac: First one corrects the available fifo size per queue, second one corrects enabling of AVB queues. More info in commit log. Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Changes from v1: - Fix typo in second patch ==================== Signed-off-by: David S. Miller Acked-by: Giuseppe Cavallaro commit a0daae13776994cf90e9a7bc81cd8e4ad3959093 Author: Jose Abreu Date: Fri Oct 13 10:58:37 2017 +0100 net: stmmac: Disable flow ctrl for RX AVB queues and really enable TX AVB queues Flow control must be disabled for AVB enabled queues and TX AVB queues must be enabled by setting BIT(2) of TXQEN. Correct this by passing the queue mode to DMA callbacks and by checking in these functions wether we are in AVB performing the necessary adjustments. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 4 ++-- drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 2 ++ drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 16 +++++++++++----- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 21 +++++++++++++++------ 4 files changed, 30 insertions(+), 13 deletions(-) commit 52a76235d0c4dd259cd0df503afed4757c04ba1d Author: Jose Abreu Date: Fri Oct 13 10:58:36 2017 +0100 net: stmmac: Use correct values in TQS/RQS fields Currently we are using all the available fifo size in RQS and TQS fields. This will not work correctly in multi-queues IP's because total fifo size must be splitted to the enabled queues. Correct this by computing the available fifo size per queue and setting the right value in TQS and RQS fields. Signed-off-by: Jose Abreu Cc: David S. Miller Cc: Joao Pinto Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/common.h | 3 ++- drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 15 +++++++++------ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 22 ++++++++++++++++++++-- 3 files changed, 31 insertions(+), 9 deletions(-) commit 258bbb1b0e594ad5f5652cb526b3c63e6a7fad3d Author: Matteo Croce Date: Thu Oct 12 16:12:37 2017 +0200 icmp: don't fail on fragment reassembly time exceeded The ICMP implementation currently replies to an ICMP time exceeded message (type 11) with an ICMP host unreachable message (type 3, code 1). However, time exceeded messages can either represent "time to live exceeded in transit" (code 0) or "fragment reassembly time exceeded" (code 1). Unconditionally replying to "fragment reassembly time exceeded" with host unreachable messages might cause unjustified connection resets which are now easily triggered as UFO has been removed, because, in turn, sending large buffers triggers IP fragmentation. The issue can be easily reproduced by running a lot of UDP streams which is likely to trigger IP fragmentation: # start netserver in the test namespace ip netns add test ip netns exec test netserver # create a VETH pair ip link add name veth0 type veth peer name veth0 netns test ip link set veth0 up ip -n test link set veth0 up for i in $(seq 20 29); do # assign addresses to both ends ip addr add dev veth0 192.168.$i.1/24 ip -n test addr add dev veth0 192.168.$i.2/24 # start the traffic netperf -L 192.168.$i.1 -H 192.168.$i.2 -t UDP_STREAM -l 0 & done # wait send_data: data send error: No route to host (errno 113) netperf: send_omni: send_data failed: No route to host We need to differentiate instead: if fragment reassembly time exceeded is reported, we need to silently drop the packet, if time to live exceeded is reported, maintain the current behaviour. In both cases increment the related error count "icmpInTimeExcds". While at it, fix a typo in a comment, and convert the if statement into a switch to mate it more readable. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller net/ipv4/icmp.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit e0005bd93ab5f7a80b08a7bdff9b2ade436f9482 Author: Lukas Wunner Date: Tue Oct 10 18:15:34 2017 +0200 iio: Drop duplicate forward declaration Commit 5f420b42079c ("staging:iio: Add extended IIO channel info") added a forward declaration for struct iio_dev to but forgot to remove an existing forward declaration further down originating from commit 7ae8cf627558 ("staging: iio: chrdev.h rationalization"). Cc: Lars-Peter Clausen Signed-off-by: Lukas Wunner Signed-off-by: Jonathan Cameron include/linux/iio/iio.h | 1 - 1 file changed, 1 deletion(-) commit 79e641886676115e0ee2467e85b7bfe98ebae5fa Author: Peter Meerwald-Stadler Date: Tue Oct 10 15:48:47 2017 +0200 iio: proximity: Add rfd77402 driver Driver for RF Digital RFD77402 VCSEL (vertical-cavity surface-emitting laser) Time-of-Flight (ToF) sensor to measure distance up to 2 m with millimeter precision Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron drivers/iio/proximity/Kconfig | 10 ++ drivers/iio/proximity/Makefile | 1 + drivers/iio/proximity/rfd77402.c | 352 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 363 insertions(+) commit d35d43d783bf770638098a8dd939e8fd270cafc9 Author: Peter Meerwald-Stadler Date: Tue Oct 10 15:48:46 2017 +0200 Documentation: iio: Clarify meaning of IIO_DISTANCE channel type IIO_DISTANCE is used for two purposes: for pedometers to record the distance covered by a walker, and to measure the distance to an object IIO_DISTANCE is in meters while IIO_PROXIMITY is a unitless measure indirectly proportional to distance (higher value relates to a closer object) Signed-off-by: Peter Meerwald-Stadler Signed-off-by: Jonathan Cameron Documentation/ABI/testing/sysfs-bus-iio | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 73ecf5cf141a0c61775c10fdf3a6fc106f326f8c Author: Al Viro Date: Sat Oct 14 13:18:33 2017 -0400 do_handle_open() should be static Signed-off-by: Al Viro fs/fhandle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 515c24c13c7ff1262cdb40fe631c6391e99c0996 Author: Yafang Shao Date: Sat Oct 14 16:38:27 2017 +0800 mm/page-writeback.c: make changes of dirty_writeback_centisecs take effect immediately This patch is the followup of the prvious patch: [writeback: schedule periodic writeback with sysctl]. There's another issue to fix. For example, - When the tunable was set to one hour and is reset to one second, the new setting will not take effect for up to one hour. Kicking the flusher threads immediately fixes it. Cc: Jens Axboe Cc: Jan Kara Cc: Andrew Morton Signed-off-by: Yafang Shao Signed-off-by: Jens Axboe mm/page-writeback.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 0d7b6f280bfd462ab24fc65fab80dad29142dab5 Author: Lothar Waßmann Date: Wed Oct 11 13:05:37 2017 +0200 ARM: dts: imx28-tx28: remove the regulators bus 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: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx28-tx28.dts | 127 ++++++++++++++++++--------------------- 1 file changed, 57 insertions(+), 70 deletions(-) commit a408079fd916b95adc456de5b52e8c428aa07da6 Author: Lothar Waßmann Date: Wed Oct 11 13:05:36 2017 +0200 ARM: dts: imx28-tx28: Relicense the TX28 dts file under GPLv2/X11 The current GPL only licensing on the dts file makes it very impractical for other software components licensed under another license. In order to make it easier for them to reuse our device trees, relicense our dts files first under a GPL/X11 dual-license. Signed-off-by: Lothar Waßmann Signed-off-by: Shawn Guo arch/arm/boot/dts/imx28-tx28.dts | 42 ++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) commit 6879452a883bc985ef9a8f70eb55e870cfb0bb79 Author: Leonard Crestez Date: Wed Oct 11 15:08:23 2017 +0300 ARM: imx: Enable cpuidle for i.MX6DL starting at 1.1 Enable cpuidle support on i.MX6DL starting from IMX_CHIP_REVISION_1_1. This also makes the code cleaner because 6q and 6dl actually have different revision histories. Signed-off-by: Bai Ping Signed-off-by: Leonard Crestez Reviewed-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-imx6q.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 59b6359dd92d18f5dc04b14a4c926fa08ab66f7c Author: Geert Uytterhoeven Date: Tue Oct 3 19:14:38 2017 +0100 ARM: 8702/1: head-common.S: Clear lr before jumping to start_kernel() If CONFIG_DEBUG_LOCK_ALLOC=y, the kernel log is spammed with a few hundred identical messages: unwind: Unknown symbol address c0800300 unwind: Index not found c0800300 c0800300 is the return address from the last subroutine call (to __memzero()) in __mmap_switched(). Apparently having this address in the link register confuses the unwinder. To fix this, reset the link register to zero before jumping to start_kernel(). Fixes: 9520b1a1b5f7a348 ("ARM: head-common.S: speed up startup code") Suggested-by: Ard Biesheuvel Signed-off-by: Geert Uytterhoeven Acked-by: Nicolas Pitre Signed-off-by: Russell King arch/arm/kernel/head-common.S | 1 + 1 file changed, 1 insertion(+) commit f67ae488fd64029460551e34d403aa64562faea0 Author: Ladislav Michl Date: Tue Oct 10 15:32:45 2017 +0200 mtd: nand: omap2: Do not assign omap_nand_info to platform drvdata commit 67ce04bf2746 ("mtd: nand: add OMAP2/OMAP3 NAND driver") assigned pointer to omap_nand_info to the platform drvdata in probe function just to be reasigned later to the pointer to mtd_info, which is what remove function expects it to be. Remove useless assignment. Signed-off-by: Ladislav Michl Acked-by: Roger Quadros Signed-off-by: Boris Brezillon drivers/mtd/nand/omap2.c | 1 - 1 file changed, 1 deletion(-) commit 086c321ec57bfda5b15f3553e7def33302955852 Author: Ladislav Michl Date: Tue Oct 10 14:38:07 2017 +0200 mtd: nand: omap2: Remove omap_nand_platform_data As driver is now configured using DT, omap_nand_platform_data structure is no longer needed. Signed-off-by: Ladislav Michl Acked-by: Roger Quadros Signed-off-by: Boris Brezillon drivers/mtd/nand/omap2.c | 37 ++++++---------------------- include/linux/platform_data/mtd-nand-omap2.h | 17 ------------- 2 files changed, 8 insertions(+), 46 deletions(-) commit 1533bfa6f6b6bcca1ea1f172ef4a1c5ce5e7b335 Author: Boris Brezillon Date: Thu Oct 5 18:57:24 2017 +0200 mtd: nand: atmel: Actually use the PM ops commit 6e532afaca8e ("mtd: nand: atmel: Add PM ops") was defining PM ops but nothing was using/referencing those PM ops. Fixes: 6e532afaca8e ("mtd: nand: atmel: Add PM ops") Cc: Cc: Romain Izard Signed-off-by: Boris Brezillon Acked-by: Wenyou Yang Tested-by: Romain Izard drivers/mtd/nand/atmel/nand-controller.c | 1 + 1 file changed, 1 insertion(+) commit b9bb98424c51437973b854691aa1e9b2bfd348f5 Author: Boris Brezillon Date: Thu Oct 5 18:53:19 2017 +0200 mtd: nand: Export nand_reset() symbol Commit 6e532afaca8e ("mtd: nand: atmel: Add PM ops") started to use the nand_reset() function which was not yet exported by the NAND framework (because it was only used internally before that). Export this symbol to avoid build errors when the driver is enabled as a module. Fixes: 6e532afaca8e ("mtd: nand: atmel: Add PM ops") Cc: Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 1 + 1 file changed, 1 insertion(+) commit fc72ae40e30327aa24eb88a24b9c7058f938bd36 Author: Josh Poimboeuf Date: Fri Oct 13 15:02:01 2017 -0500 x86/unwind: Make CONFIG_UNWINDER_ORC=y the default in kconfig for 64-bit The ORC unwinder has been stable in testing so far. Give it much wider testing by making it the default in kconfig for x86_64. It's not yet supported for 32-bit, so leave frame pointers as the default there. Suggested-by: Ingo Molnar Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/9b1237bbe7244ed9cdf8db2dcb1253e37e1c341e.1507924831.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/Kconfig.debug | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 11af847446ed0d131cf24d16a7ef3d5ea7a49554 Author: Josh Poimboeuf Date: Fri Oct 13 15:02:00 2017 -0500 x86/unwind: Rename unwinder config options to 'CONFIG_UNWINDER_*' Rename the unwinder config options from: CONFIG_ORC_UNWINDER CONFIG_FRAME_POINTER_UNWINDER CONFIG_GUESS_UNWINDER to: CONFIG_UNWINDER_ORC CONFIG_UNWINDER_FRAME_POINTER CONFIG_UNWINDER_GUESS ... in order to give them a more logical config namespace. Suggested-by: Ingo Molnar Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/73972fc7e2762e91912c6b9584582703d6f1b8cc.1507924831.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar Documentation/x86/orc-unwinder.txt | 2 +- Makefile | 4 ++-- arch/x86/Kconfig | 2 +- arch/x86/Kconfig.debug | 10 +++++----- arch/x86/configs/tiny.config | 4 ++-- arch/x86/configs/x86_64_defconfig | 2 +- arch/x86/include/asm/module.h | 2 +- arch/x86/include/asm/unwind.h | 8 ++++---- arch/x86/kernel/Makefile | 6 +++--- include/asm-generic/vmlinux.lds.h | 2 +- lib/Kconfig.debug | 2 +- scripts/Makefile.build | 2 +- 12 files changed, 23 insertions(+), 23 deletions(-) commit 6edcf57233108df2e50ab5d3fa695ea958b4c779 Merge: 1e4078f 3dd40cb Author: Ingo Molnar Date: Sat Oct 14 10:11:45 2017 +0200 Merge branch 'core/urgent' into x86/asm, to pick up dependency Signed-off-by: Ingo Molnar commit fac72b243cc789bb209e6eca824919b42d98cfe2 Author: Gustavo A. R. Silva Date: Thu Oct 12 17:24:02 2017 -0500 Bluetooth: mark expected switch fall-throughs In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. In this particular case, notice that I replaced the "deliberate fall-through..." comment with a "fall through" comment, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Marcel Holtmann drivers/bluetooth/bcm203x.c | 2 +- drivers/bluetooth/hci_ll.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2d13e347498f69b4f4e95830eda88937c72d7ba6 Author: Hans de Goede Date: Fri Oct 13 17:54:03 2017 +0200 Revert "Bluetooth: btusb: Add workaround for Broadcom devices without product id" Commit 9834e586fa66 ("Bluetooth: btusb: Add workaround for Broadcom devices without product id") was added to deal with the BT part of the BCM4356A2 on GPD pocket laptops having an usb vid:pid of 0000:0000. After another commit to add support for the BCM UART connected BT ACPI-id BCM2E7E used on the GPD win, it turns out that the BT on the GPD pocket is connected via both USB and UART. Adding support for the BCM2E7E ACPI-id causes it to switch to UART mode. The Windows shipped with the device is using it in UART mode and the presence of the BCM2E7E ACPI-id combined with the all 0 USB vid:pid indicates that the BT part was never meant to be used in USB mode. With the recent patches to use serdev device enumeration / instantiation for UART attached ACPI enumerated BT devices, everything work OOTB in UART mode and the workaround for the all 0 USB vid:pid is no longer needed. This reverts commit 9834e586fa ("Bluetooth: btusb: Add workaround for Broadcom devices without product id"). Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/btusb.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 61d220a6c2c001473011d44f34d6f36f09eb2224 Author: Hans de Goede Date: Fri Oct 13 17:54:02 2017 +0200 Bluetooth: hci_bcm: Add support for BCM2E7E Tested on a GPD win with a BCM4356 PCI-E wifi/bt combo card. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 1 + 1 file changed, 1 insertion(+) commit b133e0c4bc953a3c156ce7d89ae49cc27957869c Author: Hans de Goede Date: Fri Oct 13 17:54:01 2017 +0200 Bluetooth: btbcm: Add entry for BCM4356A2 UART bluetooth This patch adds the device ID for the bluetooth chip used in the Broadcom BCM4356 PCI-E WiFi / UART BT chip. Successfully tested using Firmware version 0273 The upper nibble of the rev field is 2 on this device, so this commit also adds handling of 2 to the switch-case done on the upper nibble. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/btbcm.c | 2 ++ 1 file changed, 2 insertions(+) commit 3f2bb76433bb4348cd9076e4d305a040ff2012a9 Author: Alexey Kardashevskiy Date: Wed Oct 11 16:01:08 2017 +1100 KVM: PPC: Book3S PR: Enable in-kernel TCE handlers for PR KVM The handlers support PR KVM from the day one; however the PR KVM's enable/disable hcalls handler missed these ones. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_pr_papr.c | 2 ++ 1 file changed, 2 insertions(+) commit 9c7e53dc00a543478b46c6a90694a41be69a089d Author: Markus Elfring Date: Thu Oct 5 13:16:51 2017 +0200 KVM: PPC: Book3S HV: Delete an error message for a failed memory allocation in kvmppc_allocate_hpt() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_64_mmu_hv.c | 1 - 1 file changed, 1 deletion(-) commit 4bdcb7016f95dd7668cd2f55f494ba449443e8d7 Author: Thomas Meyer Date: Thu Sep 21 00:29:36 2017 +0200 KVM: PPC: BookE: Use vma_pages function Use vma_pages function on vma object instead of explicit computation. Found by coccinelle spatch "api/vma_pages.cocci" Signed-off-by: Thomas Meyer Signed-off-by: Paul Mackerras arch/powerpc/kvm/e500_mmu_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bb817ed833c070e5b5ee0482f74e2a5e1a12c4c Author: Thomas Meyer Date: Sun Sep 3 14:19:31 2017 +0200 KVM: PPC: Book3S HV: Use ARRAY_SIZE macro Use ARRAY_SIZE macro, rather than explicitly coding some variant of it yourself. Found with: find -type f -name "*.c" -o -name "*.h" | xargs perl -p -i -e 's/\bsizeof\s*\(\s*(\w+)\s*\)\s*\ /\s*sizeof\s*\(\s*\1\s*\[\s*0\s*\]\s*\) /ARRAY_SIZE(\1)/g' and manual check/verification. Signed-off-by: Thomas Meyer Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 857b99e1405e219e741c494753fc78871d740d2b Author: Paul Mackerras Date: Fri Sep 1 16:17:27 2017 +1000 KVM: PPC: Book3S HV: Handle unexpected interrupts better At present, if an interrupt (i.e. an exception or trap) occurs in the code where KVM is switching the MMU to or from guest context, we jump to kvmppc_bad_host_intr, where we simply spin with interrupts disabled. In this situation, it is hard to debug what happened because we get no indication as to which interrupt occurred or where. Typically we get a cascade of stall and soft lockup warnings from other CPUs. In order to get more information for debugging, this adds code to create a stack frame on the emergency stack and save register values to it. We start half-way down the emergency stack in order to give ourselves some chance of being able to do a stack trace on secondary threads that are already on the emergency stack. On POWER7 or POWER8, we then just spin, as before, because we don't know what state the MMU context is in or what other threads are doing, and we can't switch back to host context without coordinating with other threads. On POWER9 we can do better; there we load up the host MMU context and jump to C code, which prints an oops message to the console and panics. Signed-off-by: Paul Mackerras arch/powerpc/kvm/book3s_hv_builtin.c | 6 ++ arch/powerpc/kvm/book3s_hv_rmhandlers.S | 132 +++++++++++++++++++++++++++++++- 2 files changed, 137 insertions(+), 1 deletion(-) commit 652badb9458b41a24b156146a73a5bfbc4356f29 Author: Eric Anholt Date: Wed Sep 27 12:32:09 2017 -0700 drm/vc4: Fix pitch setup for T-format scanout. The documentation said to use src_w here, and I didn't consider that we actually needed to be using pitch somewhere in our setup. Fixes scanout on my DSI panel when X11 does initial setup with 1920x1080 HDMI and 800x480 DSI both at 0,0 of the same framebuffer. v2: Add some comments requested by Boris Signed-off-by: Eric Anholt Fixes: 98830d91da08 ("drm/vc4: Add T-format scanout support.") Link: https://patchwork.freedesktop.org/patch/msgid/20170927193209.11870-1-eric@anholt.net Reviewed-by: Boris Brezillon drivers/gpu/drm/vc4/vc4_plane.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 787e1b74b77d4aa910f40dd5f08edb5da27200bd Merge: 972805c 8272170 Author: Dave Airlie Date: Sat Oct 14 09:39:56 2017 +1000 Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next Most notable addition this time is the support for the GPU performance counters by Christian. This has been in the making for some time and it has matured a lot. Since this is adding UAPI, the corresponding WIP userspace can be found at [1] mesa/libdrm repos. I expect that Christian sends out the final userspace patches for this once you have pulled the kernel bits. Philipp optimized the probe path, so etnaviv gets out of the way for systems that want to boot real quick. I've done mostly cleanups, disentangling etnaviv from the IOMMU API, with some MMUv1 optimizations on the way. * 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux: (36 commits) drm/etnaviv: remove unnecessary clock stabilization delay drm/etnaviv: reduce reset delay drm/etnaviv: remove unused function etnaviv_gem_new drm/etnaviv: remove stale comment drm/etnaviv: submit supports performance monitor requests drm/etnaviv: enable debug registers on demand drm/etnaviv: need to disable clock gating when doing profiling drm/etnaviv: add MC perf domain drm/etnaviv: add TX perf domain drm/etnaviv: add RA perf domain drm/etnaviv: add SE perf domain drm/etnaviv: add PA perf domain drm/etnaviv: add SH perf domain drm/etnaviv: add PE perf domain drm/etnaviv: add HI perf domain drm/etnaviv: use 'sync points' for performance monitor requests drm/etnaviv: clear alloced event drm/etnaviv: add 'sync point' support drm/etnaviv: add performance monitor request processing drm/etnaviv: copy pmrs from userspace ... commit d409eeafa9ba1c0f2eb75a2619fc787808a545e4 Author: Eric Anholt Date: Tue Aug 15 16:47:18 2017 -0700 drm/vc4: Move the DSI clock divider workaround closer to the clock call. We want the adjusted_mode->clock to be the actual clock we're expecting to program, so that consumers see the right values for clock and vrefresh. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20170815234722.20700-1-eric@anholt.net Reviewed-by: Boris Brezillon drivers/gpu/drm/vc4/vc4_dsi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 20f97caf1120bd02e8ff4adbad3b44b63626feb5 Author: Rafael J. Wysocki Date: Fri Oct 13 15:27:24 2017 +0200 PM / QoS: Drop PM_QOS_FLAG_REMOTE_WAKEUP The PM QoS flag PM_QOS_FLAG_REMOTE_WAKEUP is not used consistently and the vast majority of code simply assumes that remote wakeup should be enabled for devices in runtime suspend if they can generate wakeup signals, so drop it. Signed-off-by: Rafael J. Wysocki Acked-by: Ulf Hansson Reviewed-by: Mika Westerberg Documentation/ABI/testing/sysfs-devices-power | 16 --------------- Documentation/power/pm_qos_interface.txt | 13 ++++++------- drivers/acpi/device_pm.c | 6 ++---- drivers/base/power/domain.c | 4 +--- drivers/base/power/sysfs.c | 28 --------------------------- include/linux/pm_qos.h | 1 - 6 files changed, 9 insertions(+), 59 deletions(-) commit 7943bfaeb6bbbf595df4bd4087f5b890761c4898 Author: Leo Yan Date: Tue Oct 10 13:47:56 2017 +0800 ARM: cpuidle: Refactor rollback operations if init fails If init fails, we need execute two levels rollback operations: the first level is for the failed CPU rollback operations, the second level is to iterate all succeeded CPUs to cancel their registration; currently the code uses one function to finish these two levels rollback operations. This commit is to refactor rollback operations, so it adds a new function arm_idle_init_cpu() to encapsulate one specified CPU driver registration and rollback the first level operations; and use function arm_idle_init() to iterate all CPUs and finish the second level's rollback operations. Suggested-by: Daniel Lezcano Signed-off-by: Leo Yan Acked-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle-arm.c | 145 ++++++++++++++++++++++++------------------ 1 file changed, 82 insertions(+), 63 deletions(-) commit 0f87855d969a87f02048ff5ced7503465d5ab2f1 Author: Leo Yan Date: Tue Oct 10 13:47:55 2017 +0800 ARM: cpuidle: Correct driver unregistration if init fails If cpuidle init fails, the code misses to unregister the driver for current CPU. Furthermore, we also need to rollback to cancel all previous CPUs registration; but the code retrieves driver handler by using function cpuidle_get_driver(), this function returns back current CPU driver handler but not previous CPU's handler, which leads to the failure handling code cannot unregister previous CPUs driver. This commit fixes two mentioned issues, it adds error handling path 'goto out_unregister_drv' for current CPU driver unregistration; and it is to replace cpuidle_get_driver() with cpuidle_get_cpu_driver(), the later function can retrieve driver handler for previous CPUs according to the CPU device handler so can unregister the driver properly. This patch also adds extra error handling paths 'goto out_kfree_dev' and 'goto out_kfree_drv' and adjusts the freeing sentences for previous CPUs; so make the code more readable for freeing 'dev' and 'drv' structures. Suggested-by: Daniel Lezcano Signed-off-by: Leo Yan Fixes: d50a7d8acd78 (ARM: cpuidle: Support asymmetric idle definition) Acked-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle-arm.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 9bc70e6919f8cab80d5b240493007e4cce85559c Author: Gustavo A. R. Silva Date: Thu Oct 12 17:41:03 2017 -0500 cpufreq: speedstep-lib: mark expected switch fall-through In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/speedstep-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 248aefdcc3a7e0cfbd014946b4dead63e750e71b Author: Zumeng Chen Date: Tue Oct 10 21:27:20 2017 +0800 cpufreq: ti-cpufreq: add missing of_node_put() call of_node_put to release the refcount of np. Signed-off-by: Zumeng Chen Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/ti-cpufreq.c | 1 + 1 file changed, 1 insertion(+) commit b6aa98364f842f943495408895627702ad7ad44b Author: Viresh Kumar Date: Wed Oct 11 12:54:15 2017 +0530 PM / OPP: Add dev_pm_opp_{un}register_get_pstate_helper() This adds the dev_pm_opp_{un}register_get_pstate_helper() helper routines which will be used to set the get_pstate() callback for a device. This callback will be later called internally by the OPP core to get performance state corresponding to an OPP. This is required temporarily until the time we have proper DT bindings to include the performance state information. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/opp/core.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/opp/opp.h | 2 ++ include/linux/pm_opp.h | 10 +++++++ 3 files changed, 90 insertions(+) commit 009acd196fc860045bf7b2c3f5812f0f5efb2782 Author: Viresh Kumar Date: Wed Oct 11 12:54:14 2017 +0530 PM / OPP: Support updating performance state of device's power domain The genpd framework now provides an API to request device's power domain to update its performance state. Use that interface from the OPP core for devices whose power domains support performance states. Note that this commit doesn't add any mechanism by which performance states are made available to the OPP core. That would be done by a later commit. Note that the current implementation is restricted to the case where the device doesn't have separate regulators for itself. We shouldn't over engineer the code before we have real use case for them. We can always come back and add more code to support such cases later on. Tested-by: Rajendra Nayak Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/opp/core.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++- drivers/opp/debugfs.c | 3 +++ drivers/opp/opp.h | 4 ++++ 3 files changed, 63 insertions(+), 1 deletion(-) commit 69f658e399f3d9cb9c9680afb714ba23860d7ccb Merge: 9867999 42f6284 Author: Rafael J. Wysocki Date: Sat Oct 14 00:50:31 2017 +0200 Merge branch 'pm-domains' into pm-opp commit 9867999f3a85b52f96ef05fca00cc8128eed01ce Author: Sudeep Holla Date: Thu Oct 12 11:32:23 2017 +0100 PM / OPP: add missing of_node_put() for of_get_cpu_node() Commit 762792913f8c (PM / OPP: Fix get sharing CPUs when hotplug is used) moved away from using cpu_dev->of_node because of some limitations. However, commit 7467c9d95989 (of: return of_get_cpu_node from of_cpu_device_node_get if CPUs are not registered) added support to fall back to of_get_cpu_node() if called if CPUs are not registered yet. Add the missing of_node_put() for the CPU device nodes. Also go back to using of_cpu_device_node_get() in dev_pm_opp_of_get_sharing_cpus() to avoid scanning the device tree again. Acked-by: Viresh Kumar Fixes: 762792913f8c (PM / OPP: Fix get sharing CPUs when hotplug is used) Signed-off-by: Sudeep Holla Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/opp/of.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 42f6284ae602469762ee721ec31ddfc6170e00bc Author: Viresh Kumar Date: Thu Oct 12 15:07:23 2017 +0530 PM / Domains: Add support to select performance-state of domains Some platforms have the capability to configure the performance state of PM domains. This patch enhances the genpd core to support such platforms. The performance levels (within the genpd core) are identified by positive integer values, a lower value represents lower performance state. This patch adds a new genpd API, which is called by user drivers (like OPP framework): - int dev_pm_genpd_set_performance_state(struct device *dev, unsigned int state); This updates the performance state constraint of the device on its PM domain. On success, the genpd will have its performance state set to a value which is >= "state" passed to this routine. The genpd core calls the genpd->set_performance_state() callback, if implemented, else -ENODEV is returned to the caller. The PM domain drivers need to implement the following callback if they want to support performance states. - int (*set_performance_state)(struct generic_pm_domain *genpd, unsigned int state); This is called internally by the genpd core on several occasions. The genpd core passes the genpd pointer and the aggregate of the performance states of the devices supported by that genpd to this callback. This callback must update the performance state of the genpd (in a platform dependent way). The power domains can avoid supplying above callback, if they don't support setting performance-states. Currently we aren't propagating performance state changes of a subdomain to its masters as we don't have hardware that needs it right now. Over that, the performance states of subdomain and its masters may not have one-to-one mapping and would require additional information. We can get back to this once we have hardware that needs it. Tested-by: Rajendra Nayak Signed-off-by: Viresh Kumar Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 98 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/pm_domain.h | 12 ++++++ 2 files changed, 110 insertions(+) commit 17a9422de78c3a59b490b400f555635c477f1476 Author: Alan Brady Date: Wed Oct 11 14:49:43 2017 -0700 i40e/i40evf: don't trust VF to reset itself When using 'ethtool -L' on a VF to change number of requested queues from PF, we shouldn't trust the VF to reset itself after making the request. Doing it that way opens the door for a potentially malicious VF to do nasty things to the PF which should never be the case. This makes it such that after VF makes a successful request, PF will then reset the VF to institute required changes. Only if the request fails will PF send a message back to VF letting it know the request was unsuccessful. Testing-hints: There should be no real functional changes. This is simply hardening against a potentially malicious VF. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 9 +++++++-- drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 7 +++---- include/linux/avf/virtchnl.h | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) commit 8fdb69dd383f1f937f7e2f1f24efe97c5268a84c Author: Alan Brady Date: Wed Oct 11 14:49:42 2017 -0700 i40e: fix link reporting When querying the NVM for supported phy_types, on some firmware versions, we were failing to actually fill out the phy_types which means ethtool wouldn't report any link types. Testing-hints: Check 'ethtool ' if you have the right (wrong?) firmware. Without this patch, no link modes will be reported. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_common.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit b06da8f939ff8dcf28eb9b86aae933850658742e Author: Colin Ian King Date: Fri Sep 22 15:11:38 2017 +0100 i40e: make const array patterns static, reduces object code size Don't populate const array patterns on the stack, instead make it static. Makes the object code smaller by over 60 bytes: Before: text data bss dec hex filename 1953 496 0 2449 991 i40e_diag.o After: text data bss dec hex filename 1798 584 0 2382 94e i40e_diag.o (gcc 6.3.0, x86-64) Signed-off-by: Colin Ian King Acked-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_diag.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2027d4deacb129579f022746830ea05b72fe114a Author: Amritha Nambiar Date: Thu Sep 7 04:00:32 2017 -0700 i40e: Add support setting TC max bandwidth rates This patch enables setting up maximum Tx rates for the traffic classes in i40e. The maximum rate is offloaded to the hardware through the mqprio framework by specifying the mode option as 'channel' and shaper option as 'bw_rlimit' and is configured for the VSI. Configuring minimum Tx rate limit is not supported in the device. The minimum usable value for Tx rate is 50Mbps. Example: # tc qdisc add dev eth0 root mqprio num_tc 2 map 0 0 0 0 1 1 1 1\ queues 4@0 4@4 hw 1 mode channel shaper bw_rlimit\ max_rate 4Gbit 5Gbit To dump the bandwidth rates: # tc qdisc show dev eth0 qdisc mqprio 804a: root tc 2 map 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 queues:(0:3) (4:7) mode:channel shaper:bw_rlimit max_rate:4Gbit 5Gbit Signed-off-by: Amritha Nambiar Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 2 + drivers/net/ethernet/intel/i40e/i40e_main.c | 100 +++++++++++++++++++++++++--- 2 files changed, 93 insertions(+), 9 deletions(-) commit 8955b26d227263a0938daae77f981da927e19513 Author: Wu Fengguang Date: Sat Oct 14 05:10:40 2017 +0800 spi: sprd-adi: fix platform_no_drv_owner.cocci warnings drivers/spi/spi-sprd-adi.c:409:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Fixes: 7e2903cb91df ("spi: Add ADI driver for Spreadtrum platform") Signed-off-by: Fengguang Wu Signed-off-by: Mark Brown drivers/spi/spi-sprd-adi.c | 1 - 1 file changed, 1 deletion(-) commit 5ecae4120a6b50fb8a31d2f335eab390bcf5ad66 Author: Amritha Nambiar Date: Thu Sep 7 04:00:27 2017 -0700 i40e: Refactor VF BW rate limiting This patch refactors the BW rate limiting for Tx traffic on the VF to be reused in the next patch for rate limiting Tx traffic for the VSIs on the PF as well. Signed-off-by: Amritha Nambiar Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 5 ++ drivers/net/ethernet/intel/i40e/i40e_main.c | 64 ++++++++++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 45 +-------------- 3 files changed, 71 insertions(+), 43 deletions(-) commit a9ce82f744dc401ec27c787e2eacf3bbb33565ec Author: Amritha Nambiar Date: Thu Sep 7 04:00:22 2017 -0700 i40e: Enable 'channel' mode in mqprio for TC configs The i40e driver is modified to enable the new mqprio hardware offload mode and factor the TCs and queue configuration by creating channel VSIs. In this mode, the priority to traffic class mapping and the user specified queue ranges are used to configure the traffic classes by setting the mode option to 'channel'. Example: map 0 0 0 0 1 2 2 3 queues 2@0 2@2 1@4 1@5\ hw 1 mode channel qdisc mqprio 8038: root tc 4 map 0 0 0 0 1 2 2 3 0 0 0 0 0 0 0 0 queues:(0:1) (2:3) (4:4) (5:5) mode:channel shaper:dcb The HW channels created are removed and all the queue configuration is set to default when the qdisc is detached from the root of the device. This patch also disables setting up channels via ethtool (ethtool -L) when the TCs are configured using mqprio scheduler. The patch also limits setting ethtool Rx flow hash indirection (ethtool -X eth0 equal N) to max queues configured via mqprio. The Rx flow hash indirection input through ethtool should be validated so that it is within in the queue range configured via tc/mqprio. The bound checking is achieved by reporting the current rss size to the kernel when queues are configured via mqprio. Example: map 0 0 0 1 0 2 3 0 queues 2@0 4@2 8@6 11@14\ hw 1 mode channel Cannot set RX flow hash configuration: Invalid argument Signed-off-by: Amritha Nambiar Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 3 + drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 8 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 457 +++++++++++++++++++------ 3 files changed, 362 insertions(+), 106 deletions(-) commit 8f88b3034db3be2eb600b9f57012bc63f1ea197f Author: Amritha Nambiar Date: Thu Sep 7 04:00:17 2017 -0700 i40e: Add infrastructure for queue channel support This patch sets up the infrastructure for offloading TCs and queue configurations to the hardware by creating HW channels(VSI). A new channel is created for each of the traffic class configuration offloaded via mqprio framework except for the first TC (TC0). TC0 for the main VSI is also reconfigured as per user provided queue parameters. Queue counts that are not power-of-2 are handled by reconfiguring RSS by reprogramming LUTs using the queue count value. This patch also handles configuring the TX rings for the channels, setting up the RX queue map for channel. Also, the channels so created are removed and all the queue configuration is set to default when the qdisc is detached from the root of the device. Signed-off-by: Amritha Nambiar Signed-off-by: Kiran Patil Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 32 ++ drivers/net/ethernet/intel/i40e/i40e_main.c | 718 +++++++++++++++++++++++++++- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 2 + 3 files changed, 743 insertions(+), 9 deletions(-) commit a75dc630086a6b83d780a7b27d03c4c0abdf0807 Author: Markus Elfring Date: Fri Aug 25 12:00:17 2017 +0200 vme: tsi148: Adjust 14 checks for null pointers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Martyn Welch drivers/vme/bridges/vme_tsi148.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 6d011dd876cb825b2e1213daaabda07e1151fc6a Author: Markus Elfring Date: Fri Aug 25 11:55:03 2017 +0200 vme: tsi148: Improve 17 size determinations Replace the specification of data structures by variable references 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 [martyn@welchs.me.uk: Correct long line] Signed-off-by: Martyn Welch drivers/vme/bridges/vme_tsi148.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) commit 97660957fb5318d76a680a1b6cfb7b998bfa3723 Author: Markus Elfring Date: Fri Aug 25 11:10:07 2017 +0200 vme: tsi148: Delete nine error messages for a failed memory allocation Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Martyn Welch drivers/vme/bridges/vme_tsi148.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 8d97931740cff8f4eea62f5690e470444905db60 Author: Markus Elfring Date: Fri Aug 25 11:01:29 2017 +0200 vme: ca91cx42: Adjust 14 checks for null pointers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Martyn Welch drivers/vme/bridges/vme_ca91cx42.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 3d9b1e53343651e514644f2a6d4ce00b362f4033 Author: Markus Elfring Date: Fri Aug 25 10:56:41 2017 +0200 vme: ca91cx42: Improve 12 size determinations Replace the specification of data structures by variable references 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: Martyn Welch drivers/vme/bridges/vme_ca91cx42.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) commit 85fd4939e53873839df8e78da917c79c5074b183 Author: Markus Elfring Date: Fri Aug 25 10:20:03 2017 +0200 vme: ca91cx42: Delete eight error messages for a failed memory allocation Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Martyn Welch drivers/vme/bridges/vme_ca91cx42.c | 16 ---------------- 1 file changed, 16 deletions(-) commit 2444d37fb01c05adb04cb3297097e02f81024616 Author: Markus Elfring Date: Fri Aug 25 10:01:16 2017 +0200 vme: fake: Adjust 11 checks for null pointers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Martyn Welch drivers/vme/bridges/vme_fake.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 246740656a37495c7a0b87c7dcfbb9b5d9bae9fd Author: Markus Elfring Date: Fri Aug 25 09:46:13 2017 +0200 vme: fake: Improve five size determinations in fake_init() Replace the specification of 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. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Martyn Welch drivers/vme/bridges/vme_fake.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit ef544fbc53badd3ae1c85980211bd39419c4082a Author: Markus Elfring Date: Fri Aug 25 09:31:46 2017 +0200 vme: fake: Delete an error message for a failed memory allocation in fake_init() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Martyn Welch drivers/vme/bridges/vme_fake.c | 1 - 1 file changed, 1 deletion(-) commit 8af70cd9d6dec3fb968613a8d5318039ac5497b1 Author: Markus Elfring Date: Thu Aug 24 22:32:14 2017 +0200 vme: Return directly in two functions Return directly without using an intermediate local variable in these functions. Signed-off-by: Markus Elfring Signed-off-by: Martyn Welch drivers/vme/vme.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 61282c04984e405d3c79300e6008c3f5d60c280a Author: Markus Elfring Date: Thu Aug 24 22:24:38 2017 +0200 vme: Adjust 48 checks for null pointers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Martyn Welch drivers/vme/vme.c | 101 ++++++++++++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 53 deletions(-) commit a384b2cc13f6596a05069077bc3bc2c0cdd90156 Author: Markus Elfring Date: Thu Aug 24 22:04:45 2017 +0200 vme: Move an assignment in vme_new_dma_list() Assign a pointer to a data structure member without using an intermediate local variable. Signed-off-by: Markus Elfring Signed-off-by: Martyn Welch drivers/vme/vme.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 1ff0a19ce12c8292b732b564d25a9d3c5f819b1b Author: Markus Elfring Date: Thu Aug 24 21:52:00 2017 +0200 vme: Improve 11 size determinations Replace the specification of 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. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Martyn Welch drivers/vme/vme.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 94eefcc1cb648a6a14fe0d7a79da48d0a33ca781 Author: Markus Elfring Date: Thu Aug 24 21:38:20 2017 +0200 vme: Delete 11 error messages for a failed memory allocation Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Martyn Welch drivers/vme/vme.c | 51 ++++++++++++++++----------------------------------- 1 file changed, 16 insertions(+), 35 deletions(-) commit ff4241881232265dbc237591901116fe272967d6 Author: Amritha Nambiar Date: Thu Sep 7 04:00:11 2017 -0700 i40e: Add macro for PF reset bit Introduce a macro for the bit setting the PF reset flag and update its usages. This makes it easier to use this flag in functions to be introduced in future without encountering checkpatch issues related to alignment and line over 80 characters. Signed-off-by: Amritha Nambiar Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 2 ++ drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 3 +-- drivers/net/ethernet/intel/i40e/i40e_main.c | 9 ++++----- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 5 ++--- 4 files changed, 9 insertions(+), 10 deletions(-) commit 4e8b86c062695454df0b76f3fee4fab8dc4bb716 Author: Amritha Nambiar Date: Thu Sep 7 04:00:06 2017 -0700 mqprio: Introduce new hardware offload mode and shaper in mqprio The offload types currently supported in mqprio are 0 (no offload) and 1 (offload only TCs) by setting these values for the 'hw' option. If offloads are supported by setting the 'hw' option to 1, the default offload mode is 'dcb' where only the TC values are offloaded to the device. This patch introduces a new hardware offload mode called 'channel' with 'hw' set to 1 in mqprio which makes full use of the mqprio options, the TCs, the queue configurations and the QoS parameters for the TCs. This is achieved through a new netlink attribute for the 'mode' option which takes values such as 'dcb' (default) and 'channel'. The 'channel' mode also supports QoS attributes for traffic class such as minimum and maximum values for bandwidth rate limits. This patch enables configuring additional HW shaper attributes associated with a traffic class. Currently the shaper for bandwidth rate limiting is supported which takes options such as minimum and maximum bandwidth rates and are offloaded to the hardware in the 'channel' mode. The min and max limits for bandwidth rates are provided by the user along with the TCs and the queue configurations when creating the mqprio qdisc. The interface can be extended to support new HW shapers in future through the 'shaper' attribute. Introduces a new data structure 'tc_mqprio_qopt_offload' for offloading mqprio queue options and use this to be shared between the kernel and device driver. This contains a copy of the existing data structure for mqprio queue options. This new data structure can be extended when adding new attributes for traffic class such as mode, shaper, shaper parameters (bandwidth rate limits). The existing data structure for mqprio queue options will be shared between the kernel and userspace. Example: queues 4@0 4@4 hw 1 mode channel shaper bw_rlimit\ min_rate 1Gbit 2Gbit max_rate 4Gbit 5Gbit To dump the bandwidth rates: qdisc mqprio 804a: root tc 2 map 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 queues:(0:3) (4:7) mode:channel shaper:bw_rlimit min_rate:1Gbit 2Gbit max_rate:4Gbit 5Gbit Signed-off-by: Amritha Nambiar Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher include/net/pkt_cls.h | 9 ++ include/uapi/linux/pkt_sched.h | 32 +++++++ net/sched/sch_mqprio.c | 183 +++++++++++++++++++++++++++++++++++++++-- 3 files changed, 215 insertions(+), 9 deletions(-) commit de18e4bea0784e8df67c908c6157acc05ecba0cf Author: Marek Vasut Date: Mon Oct 9 20:18:33 2017 +0200 devicetree: Add vendor-prefix for DH electronics GmbH Add vendor prefix for DH electronics GmbH, https://www.dh-electronics.com . The company is a SoM and evaluation board manufacturer. Signed-off-by: Marek Vasut Cc: Rob Herring Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 1210d3889077653b90b0bfd2cc54e19f4766e4e6 Author: Chris Wilson Date: Fri Oct 13 16:47:35 2017 +0100 drm/i915: Use bdw_ddi_translations_fdi for Broadwell The compiler warns: drivers/gpu/drm/i915/intel_ddi.c:118:35: warning: ‘bdw_ddi_translations_fdi’ defined but not used Lo and behold, if we look at intel_ddi_get_buf_trans_fdi(), it uses hsw_ddi_translations_fdi[] for both Haswell and *Broadwell* Fixes: 7d1c42e679f9 ("drm/i915: Refactor code to select the DDI buf translation table") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: David Weinehall Cc: Jani Nikula Cc: # v4.12+ Link: https://patchwork.freedesktop.org/patch/msgid/20171013154735.27163-1-chris@chris-wilson.co.uk Reviewed-by: Jani Nikula Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/intel_ddi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5896a5c8c9c01b09af05b02cdb2ae275ef143959 Author: Chris Wilson Date: Fri Oct 13 14:12:18 2017 +0100 drm/i915: Always stop the rings before a missing GPU reset Always try to stop the rings, even if the GPU reset itself has been disabled (via modparam i915.reset). This should at least stop the hw from spinning in the background consuming resources (e.g. power and memory bandwidth) letting the system rest-in-peace. References: https://bugs.freedesktop.org/show_bug.cgi?id=103260 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20171013131218.18013-2-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_uncore.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 7836cd02f27c03af2fca04b450177c51fc7caf1e Author: Chris Wilson Date: Fri Oct 13 14:12:17 2017 +0100 drm/i915: Keep the rings stopped until they have been re-initialized Before modifying the ring register (RING_START, HEAD, TAIL, CTL) we first make sure it is stopped (or else the hw may not resample the registers). However, we do not need to let the hw restart until after we have reprogrammed all the rings. This should help prevent situations where pending operations on the ring may resume (because we are trying to re-initialize following an unsuccessful GPU hang, i.e. from i915_gem_unset_wedged). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103260 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20171013131218.18013-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_ringbuffer.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 5d031f4e1618b64344713b8e4f864a6ccc1f31cf Author: Chris Wilson Date: Thu Oct 12 21:40:19 2017 +0100 drm/i915: Stop asserting on set-wedged vs nop_submit_request ordering Since the removal of the stop_machine(), it is allowed and expected for the nop_submit_request() and nop_complete_submit_request() to run in parallel to the i915_gem_set_wedged() processing. As such we can no longer assert that i915_gem_set_wedged() has completed inside the stop_machine prior to the individual nop_submit_request execution. Fixes: af7a8ffad9c5 ("drm/i915: Use rcu instead of stop_machine in set_wedged") Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20171012204019.3557-1-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 2 -- 1 file changed, 2 deletions(-) commit 4b947b1c5a26666effcf657428600be2123ca206 Author: Harsha Sharma Date: Fri Oct 13 13:07:47 2017 +0530 drm: Replace kzalloc with kcalloc Prefer kcalloc over kzalloc to allocate an array. This patch fixes checkcpatch issue. Signed-off-by: Harsha Sharma Reviewed-by: Jani Nikula Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20171013073747.29877-1-harshasharmaiitr@gmail.com Link: https://patchwork.freedesktop.org/patch/msgid/20171013073747.29877-1-harshasharmaiitr@gmail.com drivers/gpu/drm/drm_crtc_helper.c | 4 ++-- drivers/gpu/drm/drm_fb_helper.c | 2 +- drivers/gpu/drm/drm_plane_helper.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 364497aca1f5fdf220bd314e0550881b97d2f0fc Author: Guneshwor Singh Date: Mon Oct 9 11:20:32 2017 +0530 ASoC: Intel: Skylake: Fix missing sentinel in sst_acpi_mach To make it consistent, add sentinel for sst_cnl_devdata also. Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl.c | 1 + 1 file changed, 1 insertion(+) commit 606e21fd6f43b9be8c7d9df8bc415f1637fbeb04 Author: Guneshwor Singh Date: Mon Oct 9 11:20:31 2017 +0530 ASoC: Intel: Skylake: Add dai load ops for dais from topology Since FE dais can come from topology, add dai_load ops for the dais from topology. Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 8 ++++++++ sound/soc/intel/skylake/skl-topology.c | 1 + sound/soc/intel/skylake/skl-topology.h | 3 +++ 3 files changed, 12 insertions(+) commit c3ae22e39db79bee1909d398c0debe2f7cb87d3a Author: Guneshwor Singh Date: Mon Oct 9 11:20:30 2017 +0530 ASoC: Intel: Skylake: Add flag to check to register FE dais from topology Since FE dais can come from topology, split the FE dais from existing dai array so that FE dais need not be registered if they come from topology. Add use_tplg_pcm flag to check whether FE dais will be registered from topology during dai driver component registration. Signed-off-by: Guneshwor Singh Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-pcm.c | 38 ++++++++++++++++++++++++++++++++++---- sound/soc/intel/skylake/skl.c | 9 ++++++++- sound/soc/intel/skylake/skl.h | 4 +++- 3 files changed, 45 insertions(+), 6 deletions(-) commit 15d05f0e77fb32131ad07b377274eedfaf42479d Author: Ville Syrjälä Date: Tue Oct 10 15:12:07 2017 +0300 drm/i915: Split intel_enable_ddi() into DP and HDMI variants Untangle intel_enable_ddi() by splitting it into DP and HDMI specific variants. v2: Keep using intel_ddi_get_encoder_port() for now Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171010121207.570-10-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/intel_ddi.c | 80 +++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 34 deletions(-) commit 7b77452ec524fa845efdec28ae16e2202cf797dc Author: Julien Thierry Date: Fri Oct 13 14:32:56 2017 +0100 arm64: use WFE for long delays The current delay implementation uses the yield instruction, which is a hint that it is beneficial to schedule another thread. As this is a hint, it may be implemented as a NOP, causing all delays to be busy loops. This is the case for many existing CPUs. Taking advantage of the generic timer sending periodic events to all cores, we can use WFE during delays to reduce power consumption. This is beneficial only for delays longer than the period of the timer event stream. If timer event stream is not enabled, delays will behave as yield/busy loops. Signed-off-by: Julien Thierry Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Will Deacon arch/arm64/lib/delay.c | 23 +++++++++++++++++++---- include/clocksource/arm_arch_timer.h | 4 +++- 2 files changed, 22 insertions(+), 5 deletions(-) commit 45e0327e28e57e84f83d3214a35a318eebb19aa5 Author: Ville Syrjälä Date: Tue Oct 10 15:12:06 2017 +0300 drm/i915: Plumb crtc_state etc. directly to intel_ddi_pre_enable_{dp,hdmi}() Rather that plumb the link parameters separately to intel_ddi_pre_enable_dp() let's just pass the entire crtc state. intel_ddi_pre_enable_hdmi() already took the crtc state, but for some reason intel_ddi_pre_enable() still wanted to extract has_infoframe from therein and pass it in separately. Let's not do that since it's pointless. v2: Rebase due to more code getting pulled into the DDI hooks Cc: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171010121207.570-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/intel_ddi.c | 54 +++++++++++++++------------------------- 1 file changed, 20 insertions(+), 34 deletions(-) commit ec5c8e429d07737ee94ee1fd2ae5029547484194 Author: Julien Thierry Date: Fri Oct 13 14:32:55 2017 +0100 arm_arch_timer: Expose event stream status The arch timer configuration for a CPU might get reset after suspending said CPU. In order to reliably use the event stream in the kernel (e.g. for delays), we keep track of the state where we can safely consider the event stream as properly configured. After writing to cntkctl, we issue an ISB to ensure that subsequent delay loops can rely on the event stream being enabled. Signed-off-by: Julien Thierry Acked-by: Mark Rutland Cc: Marc Zyngier Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm/include/asm/arch_timer.h | 1 + arch/arm64/include/asm/arch_timer.h | 1 + drivers/clocksource/arm_arch_timer.c | 25 ++++++++++++++++++++++--- include/clocksource/arm_arch_timer.h | 6 ++++++ 4 files changed, 30 insertions(+), 3 deletions(-) commit 33f083f002cb24ab73e76f895a99729f1721611a Author: Ville Syrjälä Date: Tue Oct 10 15:12:05 2017 +0300 drm/i915: Split intel_disable_ddi() into DP vs. HDMI variants Untangle intel_disable_ddi() by splitting it into DP and HDMI specific variants. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171010121207.570-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/intel_ddi.c | 45 +++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 17 deletions(-) commit 680b71c201fc47859135cf27223b9bceea34beec Author: Ville Syrjälä Date: Tue Oct 10 15:12:04 2017 +0300 drm/i915: Remove useless eDP check from intel_ddi_pre_enable_dp() intel_edp_panel_on() will itself do the is_edp() check, so the caller doesn't have to bother. Pre-DDI code doesn't bother, so let's follow the same approach for DDI. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171010121207.570-7-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_ddi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f45f3da7c4f6220746944cb5d5851ec5817c1f4f Author: Ville Syrjälä Date: Tue Oct 10 15:12:03 2017 +0300 drm/i915: Split intel_ddi_post_disable() into DP vs. HDMI variants To clean up the mess in intel_ddi_post_disable() split it into two clean variants for HDMI and DP. v2: Rebase due to MST DPMS changes Reviewed-by: Jani Nikula #v1 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171010121207.570-6-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_ddi.c | 95 +++++++++++++++++++++++----------------- 1 file changed, 56 insertions(+), 39 deletions(-) commit fb0bd3bd10bd83319c2ac935f1cd47db85131d1b Author: Ville Syrjälä Date: Tue Oct 10 15:12:02 2017 +0300 drm/i915: Inline the required bits of intel_ddi_post_disable() into intel_ddi_fdi_post_disable() To untangle the mess that is intel_ddi_post_disable() move the the bits needed by FDI into intel_ddi_fdi_post_disable(). This way we can stop worrying about FDI in intel_ddi_post_disable(). Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171010121207.570-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_ddi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e725f6456f6fd251e8e02685dfe22543a8c73f5a Author: Ville Syrjälä Date: Tue Oct 10 15:12:01 2017 +0300 drm/i915: Extract intel_disable_ddi_buf() Extract the code to disable the DDI_BUF_CTL into small helper. This will allows us to detangle the encoder type mess in intel_ddi_post_disable(). v2: Keep using intel_ddi_get_encoder_port() for now Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171010121207.570-4-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_ddi.c | 41 +++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) commit 6b8506d575e3d7a064a526202007929429c28f9e Author: Ville Syrjälä Date: Tue Oct 10 15:12:00 2017 +0300 drm/i915: Extract intel_ddi_clk_disable() Pull the code to disable the port clock into a function. We already have the intel_ddi_clk_select() counterpart. v2: Keep using intel_ddi_get_encoder_port() for now (Chris) Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171010121207.570-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/intel_ddi.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 40b2be419f8abecbdfaef79c6f03124854b589b7 Author: Ville Syrjälä Date: Tue Oct 10 15:11:59 2017 +0300 drm/i915: Dump 'output_types' in crtc state dump To make it easier to debug things let's dump the output types bitmask in the crtc state dump. And to make life that much better, let's pretty print it as a a human reaadable string as well. v2: Have the caller pass in the buffer (Chris) #undef OUTPUT_TYPE (Jani) Cc: Chris Wilson Cc: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171010121207.570-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 684be5a48f4950cb8823b4c4b935515a75615498 Author: Tony Lindgren Date: Fri Oct 13 10:48:40 2017 -0700 bus: ti-sysc: Fix unbalanced pm_runtime_enable by adding remove Looks like we're missing remove() that's needed if a driver instance rebound. Otherwise we will get "Unbalanced pm_runtime_enable!". Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit a4a5d493ebbc680121b584afcaa2c955b6281d0c Author: Arnd Bergmann Date: Fri Oct 13 11:25:32 2017 +0200 bus: ti-sysc: mark PM functions as __maybe_unused The new bus driver causes a harmless compile-time warning when CONFIG_PM is disabled: drivers/bus/ti-sysc.c:440:12: error: 'sysc_runtime_resume' defined but not used [-Werror=unused-function] static int sysc_runtime_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~ drivers/bus/ti-sysc.c:421:12: error: 'sysc_runtime_suspend' defined but not used [-Werror=unused-function] static int sysc_runtime_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~~ This marks the two unused functions as __maybe_unused to shut up that warning. Fixes: 0eecc636e5a2 ("bus: ti-sysc: Add minimal TI sysc interconnect target driver") Signed-off-by: Arnd Bergmann Signed-off-by: Tony Lindgren drivers/bus/ti-sysc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1b0c22e45508ffbd645430e049c52c46bdaad3b4 Author: Arnd Bergmann Date: Fri Oct 13 14:12:45 2017 +0200 regmap: avoid -Wint-in-bool-context warning When we pass the result of a multiplication as the timeout or the delay, we can get a warning from gcc-7: drivers/mmc/host/bcm2835.c:596:149: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] drivers/mfd/arizona-core.c:247:195: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c:49:27: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] The warning is a bit questionable inside of a macro, but this is intentional on the side of the gcc developers. It is also an indication of another problem: we evaluate the timeout and sleep arguments multiple times, which can have undesired side-effects when those are complex expressions. This changes the two regmap variants to use local variables for storing copies of the timeouts. This adds some more type safety, and avoids both the double-evaluation and the gcc warning. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81484 Link: http://lkml.kernel.org/r/20170726133756.2161367-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown include/linux/regmap.h | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 89d5788315f10aece086376b3f5e592afd3dbd29 Merge: 07d1346 667063a Author: Mark Brown Date: Fri Oct 13 18:22:06 2017 +0100 Merge branch 'topic/field' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into regmap-core commit 07d1346419941740cd59c8b688f02996c5aecc5b Merge: 2bd6bf0 780b135 Author: Mark Brown Date: Fri Oct 13 18:21:06 2017 +0100 Merge branch 'topic/namespace' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into regmap-core commit 552ee3021cd79feb4203df1d594533fa9c8e1595 Author: Wei Yongjun Date: Fri Oct 13 09:29:25 2017 +0000 ARM: OMAP2+: omap_device: fix error return code in omap_device_copy_resources() Fix to return error code -EINVAL from the irq_of_parse_and_map() error handling case instead of 0, as done elsewhere in this function. Fixes: d85a2d61432a ("ARM: OMAP2+: Populate legacy resources for dma and smartreflex") Signed-off-by: Wei Yongjun Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fc186311f2233bb3f69f22b96babdf16a57c88a9 Author: weiping zhang Date: Sat Oct 14 00:26:54 2017 +0800 null_blk: add usage hints for no_sched This parameter provide an option to disable io scheduler when nullb* in multi-queue mode. Signed-off-by: weiping zhang Signed-off-by: Jens Axboe Documentation/block/null_blk.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 23c4490d2b7f78a855f9c5675e26735fb61afe84 Author: weiping zhang Date: Sat Oct 14 00:26:28 2017 +0800 null_blk: update usage hints for submit_queues update the range of submits_queues, and correct usage hints. Signed-off-by: weiping zhang Signed-off-by: Jens Axboe Documentation/block/null_blk.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1ff516a4bacf146a261b66d89892046078dba86c Author: Tony Lindgren Date: Fri Oct 13 09:43:22 2017 -0700 ARM: dts: Fix typo for omap4 mcasp rx path As reported by Peter Ujfalusi , the rx path on macsp is disabled and only tx is usable if the davinci-mcasp driver is updated for it. Reported-by: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a00344bd1bbea2ba40719ae0eb3b6da7fae08cf2 Merge: 2d0d21c 04d7b57 Author: David S. Miller Date: Fri Oct 13 08:46:01 2017 -0700 Merge branch 'tipc-comm-groups' Jon Maloy says: ==================== tipc: Introduce Communcation Group feature With this commit series we introduce a 'Group Communication' feature in order to resolve the datagram and multicast flow control problem. This new feature makes it possible for a user to instantiate multiple private virtual brokerless message buses by just creating and joining member sockets. The main features are as follows: --------------------------------- - Sockets can join a group via a new setsockopt() call TIPC_GROUP_JOIN. If it is the first socket of the group this implies creation of the group. This call takes four parameters: 'type' serves as group identifier, 'instance' serves as member identifier, and 'scope' indicates the visibility of the group (node/cluster/zone). Finally, 'flags' indicates different options for the socket joining the group. For the time being, there are only two such flags: 1) 'LOOPBACK' indicates if the creator of the socket wants to receive a copy of broadcast or multicast messages it sends to the group, 2) EVENTS indicates if it wants to receive membership (JOINED/LEFT) events for the other members of the group. - Groups are closed, i.e., sockets which have not joined a group will not be able to send messages to or receive messages from members of the group, and vice versa. A socket can only be member of one group at a time. - There are four transmission modes. 1: Unicast. The sender transmits a message using the port identity (node:port tuple) of the receiving socket. 2: Anycast. The sender transmits a message using a port name (type: instance:scope) of one of the receiving sockets. If more than one member socket matches the given address a destination is selected according to a round-robin algorithm, but also considering the destination load (advertised window size) as an additional criteria. 3: Multicast. The sender transmits a message using a port name (type:instance:scope) of one or more of the receiving sockets. All sockets in the group matching the given address will receive a copy of the message. 4: Broadcast. The sender transmits a message using the primtive send(). All members of the group, irrespective of their member identity (instance) number receive a copy of the message. - TIPC broadcast is used for carrying messages in mode 3 or 4 when this is deemed more efficient, i.e., depending on number of actual destinations. - All transmission modes are flow controlled, so that messages never are dropped or rejected, just like we are used to from connection oriented communication. A special algorithm guarantees that this is true even for multipoint-to-point communication, i.e., at occasions where many source sockets may decide to send simultaneously towards the same destination socket. - Sequence order is always guaranteed, even between the different transmission modes. - Member join/leave events are received in all other member sockets in guaranteed order. I.e., a 'JOINED' (an empty message with the OOB bit set) will always be received before the first data message from a new member, and a 'LEAVE' (like 'JOINED', but with EOR bit set) will always arrive after the last data message from a leaving member. ----- v2: Reordered variable declarations in descending length order, as per feedback from David Miller. This was done as far as permitted by the the initialization order. ==================== Signed-off-by: David S. Miller commit 04d7b574b245c66001a33cb9da2c0311063af73f Author: Jon Maloy Date: Fri Oct 13 11:04:34 2017 +0200 tipc: add multipoint-to-point flow control We already have point-to-multipoint flow control within a group. But we even need the opposite; -a scheme which can handle that potentially hundreds of sources may try to send messages to the same destination simultaneously without causing buffer overflow at the recipient. This commit adds such a mechanism. The algorithm works as follows: - When a member detects a new, joining member, it initially set its state to JOINED and advertises a minimum window to the new member. This window is chosen so that the new member can send exactly one maximum sized message, or several smaller ones, to the recipient before it must stop and wait for an additional advertisement. This minimum window ADV_IDLE is set to 65 1kB blocks. - When a member receives the first data message from a JOINED member, it changes the state of the latter to ACTIVE, and advertises a larger window ADV_ACTIVE = 12 x ADV_IDLE blocks to the sender, so it can continue sending with minimal disturbances to the data flow. - The active members are kept in a dedicated linked list. Each time a message is received from an active member, it will be moved to the tail of that list. This way, we keep a record of which members have been most (tail) and least (head) recently active. - There is a maximum number (16) of permitted simultaneous active senders per receiver. When this limit is reached, the receiver will not advertise anything immediately to a new sender, but instead put it in a PENDING state, and add it to a corresponding queue. At the same time, it will pick the least recently active member, send it an advertisement RECLAIM message, and set this member to state RECLAIMING. - The reclaimee member has to respond with a REMIT message, meaning that it goes back to a send window of ADV_IDLE, and returns its unused advertised blocks beyond that value to the reclaiming member. - When the reclaiming member receives the REMIT message, it unlinks the reclaimee from its active list, resets its state to JOINED, and notes that it is now back at ADV_IDLE advertised blocks to that member. If there are still unread data messages sent out by reclaimee before the REMIT, the member goes into an intermediate state REMITTED, where it stays until the said messages have been consumed. - The returned advertised blocks can now be re-advertised to the pending member, which is now set to state ACTIVE and added to the active member list. - To be proactive, i.e., to minimize the risk that any member will end up in the pending queue, we start reclaiming resources already when the number of active members exceeds 3/4 of the permitted maximum. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/group.c | 129 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- net/tipc/msg.h | 12 ++++++ 2 files changed, 136 insertions(+), 5 deletions(-) commit a3bada70660fb020430135ec8a774ae1ea6bc9a9 Author: Jon Maloy Date: Fri Oct 13 11:04:33 2017 +0200 tipc: guarantee delivery of last broadcast before DOWN event The following scenario is possible: - A user sends a broadcast message, and thereafter immediately leaves the group. - The LEAVE message, following a different path than the broadcast, arrives ahead of the broadcast, and the sending member is removed from the receiver's list. - The broadcast message arrives, but is dropped because the sender now is unknown to the receipient. We fix this by sequence numbering membership events, just like ordinary unicast messages. Currently, when a JOIN is sent to a peer, it contains a synchronization point, - the sequence number of the next sent broadcast, in order to give the receiver a start synchronization point. We now let even LEAVE messages contain such an "end synchronization" point, so that the recipient can delay the removal of the sending member until it knows that all messages have been received. The received synchronization points are added as sequence numbers to the generated membership events, making it possible to handle them almost the same way as regular unicasts in the receiving filter function. In particular, a DOWN event with a too high sequence number will be kept in the reordering queue until the missing broadcast(s) arrive and have been delivered. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/group.c | 45 ++++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) commit 399574d41963285e72ba28dd46783c96316a81d1 Author: Jon Maloy Date: Fri Oct 13 11:04:32 2017 +0200 tipc: guarantee delivery of UP event before first broadcast The following scenario is possible: - A user joins a group, and immediately sends out a broadcast message to its members. - The broadcast message, following a different data path than the initial JOIN message sent out during the joining procedure, arrives to a receiver before the latter.. - The receiver drops the message, since it is not ready to accept any messages until the JOIN has arrived. We avoid this by treating group protocol JOIN messages like unicast messages. - We let them pass through the recipient's multicast input queue, just like ordinary unicasts. - We force the first following broadacst to be sent as replicated unicast and being acknowledged by the recipient before accepting any more broadcast transmissions. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/link.c | 7 +++++-- net/tipc/socket.c | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) commit 2f487712b89376fce267223bbb0db93d393d4b09 Author: Jon Maloy Date: Fri Oct 13 11:04:31 2017 +0200 tipc: guarantee that group broadcast doesn't bypass group unicast We need a mechanism guaranteeing that group unicasts sent out from a socket are not bypassed by later sent broadcasts from the same socket. We do this as follows: - Each time a unicast is sent, we set a the broadcast method for the socket to "replicast" and "mandatory". This forces the first subsequent broadcast message to follow the same network and data path as the preceding unicast to a destination, hence preventing it from overtaking the latter. - In order to make the 'same data path' statement above true, we let group unicasts pass through the multicast link input queue, instead of as previously through the unicast link input queue. - In the first broadcast following a unicast, we set a new header flag, requiring all recipients to immediately acknowledge its reception. - During the period before all the expected acknowledges are received, the socket refuses to accept any more broadcast attempts, i.e., by blocking or returning EAGAIN. This period should typically not be longer than a few microseconds. - When all acknowledges have been received, the sending socket will open up for subsequent broadcasts, this time giving the link layer freedom to itself select the best transmission method. - The forced and/or abrupt transmission method changes described above may lead to broadcasts arriving out of order to the recipients. We remedy this by introducing code that checks and if necessary re-orders such messages at the receiving end. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/group.c | 47 +++++++++++++++++++++++++++++++++++++++++------ net/tipc/group.h | 4 +--- net/tipc/link.c | 5 ++--- net/tipc/msg.h | 21 +++++++++++++++++++++ net/tipc/socket.c | 34 +++++++++++++++++++++++++++++----- 5 files changed, 94 insertions(+), 17 deletions(-) commit b87a5ea31c935a7f7e11ca85df2ec7917921e96d Author: Jon Maloy Date: Fri Oct 13 11:04:30 2017 +0200 tipc: guarantee group unicast doesn't bypass group broadcast Group unicast messages don't follow the same path as broadcast messages, and there is a high risk that unicasts sent from a socket might bypass previously sent broadcasts from the same socket. We fix this by letting all unicast messages carry the sequence number of the next sent broadcast from the same node, but without updating this number at the receiver. This way, a receiver can check and if necessary re-order such messages before they are added to the socket receive buffer. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/group.c | 87 +++++++++++++++++++++++++++++++++++++++++++++---------- net/tipc/socket.c | 2 ++ 2 files changed, 74 insertions(+), 15 deletions(-) commit 5b8dddb63769587badc50725ec9857caaeba4de0 Author: Jon Maloy Date: Fri Oct 13 11:04:29 2017 +0200 tipc: introduce group multicast messaging The previously introduced message transport to all group members is based on the tipc multicast service, but is logically a broadcast service within the group, and that is what we call it. We now add functionality for sending messages to all group members having a certain identity. Correspondingly, we call this feature 'group multicast'. The service is using unicast when only one destination is found, otherwise it will use the bearer broadcast service to transfer the messages. In the latter case, the receiving members filter arriving messages by looking at the intended destination instance. If there is no match, the message will be dropped, while still being considered received and read as seen by the flow control mechanism. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/group.c | 14 +++++++++++++- net/tipc/msg.h | 11 +++++++++-- net/tipc/socket.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 74 insertions(+), 7 deletions(-) commit ee106d7f942dabce1352e01c6fe9ca4a720c2331 Author: Jon Maloy Date: Fri Oct 13 11:04:28 2017 +0200 tipc: introduce group anycast messaging In this commit, we make it possible to send connectionless unicast messages to any member corresponding to the given member identity, when there is more than one such member. The sender must use a TIPC_ADDR_NAME address to achieve this effect. We also perform load balancing between the destinations, i.e., we primarily select one which has advertised sufficient send window to not cause a block/EAGAIN delay, if any. This mechanism is overlayed on the always present round-robin selection. Anycast messages are subject to the same start synchronization and flow control mechanism as group broadcast messages. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/group.c | 7 +++++ net/tipc/group.h | 3 ++ net/tipc/name_table.c | 41 +++++++++++++++++++++++++ net/tipc/name_table.h | 3 ++ net/tipc/socket.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 138 insertions(+) commit 27bd9ec027f396457d1a147043c92ff22fc4c71e Author: Jon Maloy Date: Fri Oct 13 11:04:27 2017 +0200 tipc: introduce group unicast messaging We now make it possible to send connectionless unicast messages within a communication group. To send a message, the sender can use either a direct port address, aka port identity, or an indirect port name to be looked up. This type of messages are subject to the same start synchronization and flow control mechanism as group broadcast messages. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/group.c | 45 +++++++++++++++++++++- net/tipc/group.h | 3 ++ net/tipc/msg.h | 3 +- net/tipc/socket.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++++----- 4 files changed, 150 insertions(+), 13 deletions(-) commit b7d42635517fde2b095deddd0fba37be2302a285 Author: Jon Maloy Date: Fri Oct 13 11:04:26 2017 +0200 tipc: introduce flow control for group broadcast messages We introduce an end-to-end flow control mechanism for group broadcast messages. This ensures that no messages are ever lost because of destination receive buffer overflow, with minimal impact on performance. For now, the algorithm is based on the assumption that there is only one active transmitter at any moment in time. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/group.c | 148 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- net/tipc/group.h | 11 ++-- net/tipc/msg.h | 5 +- net/tipc/socket.c | 48 +++++++++++++----- 4 files changed, 190 insertions(+), 22 deletions(-) commit ae236fb208a6fbbd2e7a6913385e8fb78ac807f8 Author: Jon Maloy Date: Fri Oct 13 11:04:25 2017 +0200 tipc: receive group membership events via member socket Like with any other service, group members' availability can be subscribed for by connecting to be topology server. However, because the events arrive via a different socket than the member socket, there is a real risk that membership events my arrive out of synch with the actual JOIN/LEAVE action. I.e., it is possible to receive the first messages from a new member before the corresponding JOIN event arrives, just as it is possible to receive the last messages from a leaving member after the LEAVE event has already been received. Since each member socket is internally also subscribing for membership events, we now fix this problem by passing those events on to the user via the member socket. We leverage the already present member synch- ronization protocol to guarantee correct message/event order. An event is delivered to the user as an empty message where the two source addresses identify the new/lost member. Furthermore, we set the MSG_OOB bit in the message flags to mark it as an event. If the event is an indication about a member loss we also set the MSG_EOR bit, so it can be distinguished from a member addition event. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller include/uapi/linux/tipc.h | 1 + net/tipc/group.c | 60 +++++++++++++++++++++++++++++++++++++---------- net/tipc/group.h | 2 ++ net/tipc/msg.h | 22 +++++++++++++++-- net/tipc/socket.c | 49 ++++++++++++++++++++++++-------------- 5 files changed, 101 insertions(+), 33 deletions(-) commit 31c82a2d9d51fccbb85cbd2be983eb115225301c Author: Jon Maloy Date: Fri Oct 13 11:04:24 2017 +0200 tipc: add second source address to recvmsg()/recvfrom() With group communication, it becomes important for a message receiver to identify not only from which socket (identfied by a node:port tuple) the message was sent, but also the logical identity (type:instance) of the sending member. We fix this by adding a second instance of struct sockaddr_tipc to the source address area when a message is read. The extra address struct is filled in with data found in the received message header (type,) and in the local member representation struct (instance.) Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/group.c | 3 +++ net/tipc/msg.h | 1 + net/tipc/socket.c | 53 +++++++++++++++++++++++++++++++++++------------------ 3 files changed, 39 insertions(+), 18 deletions(-) commit 75da2163dbb6af9f2dce1d80056d11d290dd19a5 Author: Jon Maloy Date: Fri Oct 13 11:04:23 2017 +0200 tipc: introduce communication groups As a preparation for introducing flow control for multicast and datagram messaging we need a more strictly defined framework than we have now. A socket must be able keep track of exactly how many and which other sockets it is allowed to communicate with at any moment, and keep the necessary state for those. We therefore introduce a new concept we have named Communication Group. Sockets can join a group via a new setsockopt() call TIPC_GROUP_JOIN. The call takes four parameters: 'type' serves as group identifier, 'instance' serves as an logical member identifier, and 'scope' indicates the visibility of the group (node/cluster/zone). Finally, 'flags' makes it possible to set certain properties for the member. For now, there is only one flag, indicating if the creator of the socket wants to receive a copy of broadcast or multicast messages it is sending via the socket, and if wants to be eligible as destination for its own anycasts. A group is closed, i.e., sockets which have not joined a group will not be able to send messages to or receive messages from members of the group, and vice versa. Any member of a group can send multicast ('group broadcast') messages to all group members, optionally including itself, using the primitive send(). The messages are received via the recvmsg() primitive. A socket can only be member of one group at a time. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller include/uapi/linux/tipc.h | 14 ++ net/tipc/Makefile | 2 +- net/tipc/group.c | 404 ++++++++++++++++++++++++++++++++++++++++++++++ net/tipc/group.h | 64 ++++++++ net/tipc/link.c | 3 +- net/tipc/msg.h | 50 +++++- net/tipc/name_table.c | 44 +++-- net/tipc/name_table.h | 3 + net/tipc/node.h | 3 +- net/tipc/socket.c | 209 ++++++++++++++++++++---- 10 files changed, 748 insertions(+), 48 deletions(-) commit a80ae5306a7346d4e52f59462878beb8362f4bbd Author: Jon Maloy Date: Fri Oct 13 11:04:22 2017 +0200 tipc: improve destination linked list We often see a need for a linked list of destination identities, sometimes containing a port number, sometimes a node identity, and sometimes both. The currently defined struct u32_list is not generic enough to cover all cases, so we extend it to contain two u32 integers and rename it to struct tipc_dest_list. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/bcast.c | 18 +++++------ net/tipc/name_table.c | 89 ++++++++++++++++++++++++++------------------------- net/tipc/name_table.h | 22 ++++++++----- net/tipc/socket.c | 12 +++---- 4 files changed, 74 insertions(+), 67 deletions(-) commit f70d37b796241f617107d5585ee96a7e1b660b63 Author: Jon Maloy Date: Fri Oct 13 11:04:21 2017 +0200 tipc: add new function for sending multiple small messages We see an increasing need to send multiple single-buffer messages of TIPC_SYSTEM_IMPORTANCE to different individual destination nodes. Instead of looping over the send queue and sending each buffer individually, as we do now, we add a new help function tipc_node_distr_xmit() to do this. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/node.c | 16 ++++++++++++++++ net/tipc/node.h | 1 + net/tipc/socket.c | 14 ++------------ 3 files changed, 19 insertions(+), 12 deletions(-) commit 64ac5f5977df5b276374fb2f051082129f5cdb22 Author: Jon Maloy Date: Fri Oct 13 11:04:20 2017 +0200 tipc: refactor function filter_rcv() In the following commits we will need to handle multiple incoming and rejected/returned buffers in the function socket.c::filter_rcv(). As a preparation for this, we generalize the function by handling buffer queues instead of individual buffers. We also introduce a help function tipc_skb_reject(), and rename filter_rcv() to tipc_sk_filter_rcv() in line with other functions in socket.c. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/msg.c | 7 +++ net/tipc/msg.h | 2 + net/tipc/socket.c | 161 +++++++++++++++++++++++++++--------------------------- 3 files changed, 89 insertions(+), 81 deletions(-) commit 38077b8ef831daba55913f7e24732b062d0bdebb Author: Jon Maloy Date: Fri Oct 13 11:04:19 2017 +0200 tipc: add ability to obtain node availability status from other files In the coming commits, functions at the socket level will need the ability to read the availability status of a given node. We therefore introduce a new function for this purpose, while renaming the existing static function currently having the wanted name. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/node.c | 26 +++++++++++++++++++++----- net/tipc/node.h | 1 + 2 files changed, 22 insertions(+), 5 deletions(-) commit 23998835be98a6842e5698fa1824f404c7de850d Author: Jon Maloy Date: Fri Oct 13 11:04:18 2017 +0200 tipc: improve address sanity check in tipc_connect() The address given to tipc_connect() is not completely sanity checked, under the assumption that this will be done later in the function __tipc_sendmsg() when the address is used there. However, the latter functon will in the next commits serve as caller to several other send functions, so we want to move the corresponding sanity check there to the beginning of that function, before we possibly need to grab the address stored by tipc_connect(). We must therefore be able to trust that this address already has been thoroughly checked. We do this in this commit. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/socket.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 14c04493cb77bc38404dbcb39d5ccbb667831ad7 Author: Jon Maloy Date: Fri Oct 13 11:04:17 2017 +0200 tipc: add ability to order and receive topology events in driver As preparation for introducing communication groups, we add the ability to issue topology subscriptions and receive topology events from kernel space. This will make it possible for group member sockets to keep track of other group members. Signed-off-by: Jon Maloy Acked-by: Ying Xue Signed-off-by: David S. Miller net/tipc/core.h | 5 +++ net/tipc/msg.h | 1 + net/tipc/server.c | 121 ++++++++++++++++++++++++++++++++++++++++++------------ net/tipc/server.h | 5 ++- net/tipc/socket.c | 32 +++++++++------ 5 files changed, 124 insertions(+), 40 deletions(-) commit cdd094fd0ad750c94ccaa5b2ee84fd8264f6f433 Author: Jens Axboe Date: Fri Oct 13 09:36:06 2017 -0600 Revert "lightnvm: prevent bd removal if busy" Christoph correctly points out that this issue is no different for other block devices, and poking at cross layer internals is not the right way to solve it. This reverts commit bb6aa6f08268bbce4e0185b18cab9e04505d6695. Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 14 -------------- 1 file changed, 14 deletions(-) commit 9205281cb369a5b2d348e011dd908de81b40e0bf Author: Haneen Mohammed Date: Tue Oct 10 14:58:58 2017 -0600 drm/tinydrm: Remove explicit .best_encoder assignment Since the driver is relying on the atomic helpers, remove the explicit .best_encoder assignment and let the core call drm_atomic_helper_best_encoder(). Signed-off-by: Haneen Mohammed Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20171010205858.GA4806@Haneen drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | 1 - 1 file changed, 1 deletion(-) commit e43e81810cdeb3e8514ac6f60e963bde58e0245c Author: Harsha Sharma Date: Sat Oct 7 03:47:38 2017 +0530 drm/tinydrm: Replace dev_error with DRM_DEV_ERROR Convert instances of dev_error to DRM_DEV_ERROR as we have DRM_DEV_ERROR variants of drm print macros. Signed-off-by: Harsha Sharma Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20171006221738.30200-1-harshasharmaiitr@gmail.com drivers/gpu/drm/tinydrm/mi0283qt.c | 8 ++++---- drivers/gpu/drm/tinydrm/repaper.c | 28 +++++++++++++--------------- drivers/gpu/drm/tinydrm/st7586.c | 6 +++--- 3 files changed, 20 insertions(+), 22 deletions(-) commit a593472591a5cf2d91244bc3f319c9dd91119343 Merge: ce76353 9d5018d 7a974b2 53b9ec3 b117e03 538d5b3 Author: Joerg Roedel Date: Fri Oct 13 17:32:24 2017 +0200 Merge branches 'iommu/fixes', 'arm/omap', 'arm/exynos', 'x86/amd', 'x86/vt-d' and 'core' into next commit f40a37cb4916f17806b8a89d8eb76f6943c69189 Author: Steven Rostedt (VMware) Date: Thu Oct 12 18:46:32 2017 -0400 tracing, memcg, vmscan: Hide trace events when not in use When trace events are defined but not used they still create data structures and functions for their use, even though nothing may be using them. The trace events mm_vmscan_memcg_reclaim_begin, mm_vmscan_memcg_softlimit_reclaim_begin, mm_vmscan_memcg_reclaim_end, and mm_vmscan_memcg_softlimit_reclaim_end are not used if CONFIG_MEMCG is not defined. Do not create these trace events unless CONFIG_MEMCG is defined. Link: http://lkml.kernel.org/r/20171012184632.2bd247cd@gandalf.local.home Acked-by: Michal Hocko Signed-off-by: Steven Rostedt (VMware) include/trace/events/vmscan.h | 4 ++++ 1 file changed, 4 insertions(+) commit e83543b495598233c3741b23bed7c82161c93e24 Author: Steven Rostedt (VMware) Date: Tue Oct 10 19:12:56 2017 -0400 tracing/xen: Hide events that are not used when X86_PAE is not defined TRACE_EVENTS() take up memory. If they are defined but not used, then they simply waste space. If their use case is behind a define, then the trace events should be as well. The trace events xen_mmu_set_pte_atomic, xen_mmu_pte_clear, and xen_mmu_pmd_clear are not used when CONFIG_X86_PAE is not defined. Link: http://lkml.kernel.org/r/20171010191256.3d6d72cb@gandalf.local.home Reviewed-by: Boris Ostrovsky Reviewed-by: Jeremy Linton Signed-off-by: Steven Rostedt (VMware) include/trace/events/xen.h | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit c3b5b6ed1eb4f429addfd9e8e8eb39d1a38c85d0 Author: Arnd Bergmann Date: Fri Oct 13 16:22:20 2017 +0200 tracing: mark trace_test_buffer as __maybe_unused After trace_selftest_startup_sched_switch is removed, trace_test_buffer() is only used sometimes, leading to this warning: kernel/trace/trace_selftest.c:62:12: error: 'trace_test_buffer' defined but not used [-Werror=unused-function] There is no simple #ifdef condition that captures well whether the function is in fact used or not, so marking it as __maybe_unused is probably the best way to shut up the warning. The function will then be silently dropped when there is no user. Link: http://lkml.kernel.org/r/20171013142227.1273469-1-arnd@arndb.de Fixes: d8c4deee6dc6 ("tracing: Remove obsolete sched_switch tracer selftest") Signed-off-by: Arnd Bergmann Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_selftest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit af41acf8347dd6d11a2a29a11e2866ca4892d600 Author: Steven Rostedt (VMware) Date: Wed Oct 11 12:46:47 2017 -0400 printk: Remove superfluous memory barriers from printk_safe The variable printk_safe_irq_ready is set and never cleared at system boot up, when there's only one CPU active. It is set before other CPUs come on line. Also, it is extremely unlikely that an NMI would trigger this early in boot up (which I wonder why we even have this variable at all). Also mark the printk_safe_irq_ready as read mostly, as it is set at system boot up, and never touched again. Link: http://lkml.kernel.org/r/20171011124647.7781f98f@gandalf.local.home Reviewed-by: Petr Mladek Signed-off-by: Steven Rostedt (VMware) kernel/printk/printk_safe.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 512721a14a2a94b48ca0863d48f9829922a816b8 Author: Maarten Lankhorst Date: Fri Oct 13 16:08:53 2017 +0200 drm/drm_of: Move drm_of_panel_bridge_remove_function into header. Core drm shouldn't depend on anything in drm-kms-helper, or the drm module will fail to load. insmod drm fails with [ 6087.674390] drm: Unknown symbol drm_panel_bridge_remove (err 0) which is defined in drm_kms_helper.ko This call was added by commit c70087e8f16f ("drm/drm_of: add drm_of_panel_bridge_remove function"), and the fix is defining it in the drm_of.h header, to break the circular dependency. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/8f95e623-9480-97dc-2414-77086d8aa49d@linux.intel.com Reviewed-by: Daniel Vetter #irc Fixes: c70087e8f16f ("drm/drm_of: add drm_of_panel_bridge_remove function") Acked-by: Benjamin Gaignard drivers/gpu/drm/drm_of.c | 33 --------------------------------- include/drm/drm_of.h | 29 ++++++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 36 deletions(-) commit 8b1cfd7474daa32e966f75365773dd3992308ddf Author: Thomas Meyer Date: Thu Sep 21 08:24:27 2017 +0200 ARM: mediatek: Cocci spatch "of_table" Make sure (of/i2c/platform)_device_id tables are NULL terminated. Found by coccinelle spatch "misc/of_table.cocci" Signed-off-by: Thomas Meyer Signed-off-by: Matthias Brugger arch/arm/mach-mediatek/platsmp.c | 2 ++ 1 file changed, 2 insertions(+) commit c3ed110386db97e8213151ddc665adedf6cd11df Author: Harsha Sharma Date: Mon Oct 9 17:36:43 2017 +0530 drm/i915: Replace *_reference/unreference() or *_ref/unref with _get/put() Replace instances of drm_framebuffer_reference/unreference() with *_get/put() suffixes and drm_dev_unref with *_put() suffix because get/put is shorter and consistent with the kernel use of *_get/put suffixes. Done with following coccinelle semantic patch @@ expression ex; @@ ( -drm_framebuffer_unreference(ex); +drm_framebuffer_put(ex); | -drm_dev_unref(ex); +drm_dev_put(ex); | -drm_framebuffer_reference(ex); +drm_framebuffer_get(ex); ) Signed-off-by: Harsha Sharma [danvet: Drop the drm_dev_put change for now, to make the patch apply with out a backmerge.] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171009120643.11953-1-harshasharmaiitr@gmail.com drivers/gpu/drm/i915/intel_display.c | 10 +++++----- drivers/gpu/drm/i915/intel_fbdev.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) commit 1a94b2d484677dc559c96251dd0e7c7b8811c378 Author: Javier González Date: Fri Oct 13 14:46:47 2017 +0200 lightnvm: implement generic path for sync I/O Implement a generic path for sending sync I/O on LightNVM. This allows to reuse the standard synchronous path trough blk_execute_rq(), instead of implementing a wait_for_completion on the target side (e.g., pblk). Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 25 +++++++++----- drivers/lightnvm/pblk-core.c | 74 ++++++++++++---------------------------- drivers/lightnvm/pblk-read.c | 21 ++---------- drivers/lightnvm/pblk-recovery.c | 31 ++--------------- drivers/lightnvm/pblk.h | 42 +++++++++++++++++++++-- drivers/nvme/host/lightnvm.c | 70 +++++++++++++++++++++++++++++-------- include/linux/lightnvm.h | 3 ++ 7 files changed, 143 insertions(+), 123 deletions(-) commit 1b839187db62aae22a9254fd9e3ce376149b0918 Author: Javier González Date: Fri Oct 13 14:46:46 2017 +0200 lightnvm: fail fast on passthrough commands Make LightNVM passhtrough commands fail fast. User space will then take care of re-submitting. Fixes: 84d4add793c6 ('lightnvm: add ioctls for vector I/Os') 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, 2 deletions(-) commit 8da10cce7c7f7f9f5edc77271cf6e0c45b762004 Author: Javier González Date: Fri Oct 13 14:46:45 2017 +0200 lightnvm: pblk: avoid being reported as hung on rated GC The amount of GC I/O on the write buffer is managed by the rate-limiter, which is calculated as a function of the number of available free blocks. When reaching the stable point, we risk having scheduled more I/Os for GC than are allowed on the write buffer. This would result on the GC semaphore balancing the outstanding read GC I/Os to be reported as "hung", though the behavior is normal. Solve this by allowing to schedule when we detect that the read GC path is not moving forward. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-gc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 8bd400204bd500bb2aea7b551f7c33bad2455340 Author: Javier González Date: Fri Oct 13 14:46:44 2017 +0200 lightnvm: pblk: cleanup unused and static functions Cleanup up unused and static functions across the whole codebase. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 133 ++++++++++++++++++++----------------------- drivers/lightnvm/pblk-gc.c | 40 ++++++------- drivers/lightnvm/pblk-rl.c | 10 ---- drivers/lightnvm/pblk.h | 14 ++--- 4 files changed, 86 insertions(+), 111 deletions(-) commit 28bd109411eaa4c541f2e240d1285c154de4dfb7 Author: Hans Holmberg Date: Fri Oct 13 14:46:43 2017 +0200 lightnvm: pblk: remove spinlock when freeing line metadata Lockdep complains about being in atomic context while freeing line metadata - and rightly so as we take a spinlock and end up calling vfree that might sleep(in pblk_mfree). There is no need for holding the line manager free_lock while freeing line metadata as the pipeline as stopped, so remove the lock. Fixes: 588726d3ec68 ("lightnvm: pblk: fail gracefully on irrec. error") Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 2 -- 1 file changed, 2 deletions(-) commit 03e868eb8adb28e34f6e695667d230786bfdb653 Author: Hans Holmberg Date: Fri Oct 13 14:46:42 2017 +0200 lightnvm: pblk: correct valid lba count calculation During garbage collect, lbas being written can end up being invalidated. Make sure that this is reflected in the valid lba count. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-map.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d6b992f7ab6279884238d4e2babf100c0879b3d6 Author: Hans Holmberg Date: Fri Oct 13 14:46:41 2017 +0200 lightnvm: pblk: gc all lines in the pipeline before exit Finish garbage collect of the lines that are in the gc pipeline before exiting. Ensure that all lines already in in the pipeline goes through, from read to write. Do this by keeping track of how many lines are in the pipeline and waiting for that number to reach zero before exiting the gc reader task. Since we're adding a new gc line counter, change the name of inflight_gc to read_inflight_gc to make the distinction clear. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 3 +++ drivers/lightnvm/pblk-gc.c | 31 ++++++++++++++++++++++++------- drivers/lightnvm/pblk-sysfs.c | 2 +- drivers/lightnvm/pblk.h | 5 ++++- 4 files changed, 32 insertions(+), 9 deletions(-) commit c55861926a78bf129e06bd3372b34225f4968757 Author: Hans Holmberg Date: Fri Oct 13 14:46:40 2017 +0200 lightnvm: pblk: add l2p crc debug printouts Print the CRC of the logical-to-physical mapping during exit and after recovering the L2P table to facilitate detection of meta data corruption/recovery issues. The CRC printed after recovery should match the CRC printed during the previous exit - if it doesn't this indicates that either the meta data written to the disk is corrupt or recovery failed. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) commit 1edebacf8b736774d2f160512aec721f47e1f5ac Author: Hans Holmberg Date: Fri Oct 13 14:46:39 2017 +0200 lightnvm: pblk: shut down gc gracefully during exit Shut down the GC workqueues and tasks in the right order. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-gc.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 75610cd974aba4fadc9a8500d5470e8f28a3626f Author: Hans Holmberg Date: Fri Oct 13 14:46:38 2017 +0200 lightnvm: pblk: consider bad sectors in emeta during recovery When recovering lines we need to consider that bad blocks in a line affect the emeta area size. Previously it was assumed that the emeta area would grow by the number of sectors per page * number of bad blocks in the line. This assumption is not correct - the number of "extra" pages that are consumed could be both smaller (depending on emeta size) and bigger (depending on the placement of the bad blocks). Fix this by calculating the emeta start by iterating backwards through the line, skipping ppas that map to bad blocks. Also fix the data types used for ppa indices/counts in pblk_recov_l2p_from_emeta - we should use u64. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-recovery.c | 44 +++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 14 deletions(-) commit 03661b5f756c92b9924869334a2afa19753c4fe7 Author: Hans Holmberg Date: Fri Oct 13 14:46:37 2017 +0200 lightnvm: pblk: start gc if needed during init Start GC if needed, directly after init, as we might need to garbage collect in order to make room for user writes. Create a helper function that allows to kick GC without exposing the internals of the GC/rate-limiter interaction. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-gc.c | 5 +++++ drivers/lightnvm/pblk-init.c | 4 ++++ drivers/lightnvm/pblk-rl.c | 2 +- drivers/lightnvm/pblk.h | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) commit 37ce33d5756f4ba8bdd45371a1918ceeeba5b158 Author: Hans Holmberg Date: Fri Oct 13 14:46:36 2017 +0200 lightnvm: pblk: free full lines during recovery When rebuilding the L2P table, any full lines (lines without any valid sectors) will be identified. If these lines are not freed, we risk not being able to allocate the first data line. This patch refactors the part of GC that frees empty lines into a separate function and adds a call to this after the L2P table has been rebuilt. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-gc.c | 32 ++++++++++++++++++++------------ drivers/lightnvm/pblk-init.c | 3 +++ drivers/lightnvm/pblk.h | 1 + 3 files changed, 24 insertions(+), 12 deletions(-) commit 92957091e93931c91fccb7cce456312edeeea36c Author: Hans Holmberg Date: Fri Oct 13 14:46:35 2017 +0200 lightnvm: pblk: recover partially written lines correctly When recovering partially written lines, the valid sector count must be decreased by the number of padded sectors in the line. Update line recovery to take all ADDR_EMPTY(padded) sectors into account. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-recovery.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3e3a5b8ebd5d3b1d68facc58b0674a2564653222 Author: Hans Holmberg Date: Fri Oct 13 14:46:34 2017 +0200 lightnvm: pblk: prevent gc kicks when gc is not operational GC can be kicked after it has been shut down when closing the last line during exit, resulting in accesses to freed structures. Make sure that GC is not triggered while it is not operational. Also make sure that GC won't be re-activated during exit when running on another processor by using timer_del_sync. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-gc.c | 9 +++++---- drivers/lightnvm/pblk-init.c | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) commit 22a4e061ea11cc754785a12b3ba5f3e135bc0c63 Author: Rakesh Pandit Date: Fri Oct 13 14:46:33 2017 +0200 lightnvm: pblk: fix releases of kmem cache in error path If pblk_core_init fails lets destroy all global caches. Signed-off-by: Rakesh Pandit Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 05ed3447698203219319ec9d1c46303aff5932a2 Author: Rakesh Pandit Date: Fri Oct 13 14:46:32 2017 +0200 lightnvm: pblk: reduce arguments in __pblk_rb_update_l2p We already pass the structure pointer so no need to pass the member. Signed-off-by: Rakesh Pandit Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-rb.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit eb6f168f97438bf1cac8b9b1301c662eace9e39f Author: Rakesh Pandit Date: Fri Oct 13 14:46:31 2017 +0200 lightnvm: remove stale extern and unused exported symbols Not all exported symbols are being used outside core and there were some stale entries in lightnvm.h Signed-off-by: Rakesh Pandit Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 129 +++++++++++++++++++++++------------------------ include/linux/lightnvm.h | 7 --- 2 files changed, 64 insertions(+), 72 deletions(-) commit ef56b9ce562753cacf518f081a4ff3227efdab25 Author: Rakesh Pandit Date: Fri Oct 13 14:46:30 2017 +0200 lightnvm: remove unused argument from nvm_set_tgt_bb_tbl vblk isn't being used anyway and if we ever have a usecase we can introduce this again. This makes the logic easier and removes unnecessary checks. Signed-off-by: Rakesh Pandit Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 29 ++++++++++++----------------- include/linux/lightnvm.h | 2 +- 2 files changed, 13 insertions(+), 18 deletions(-) commit e480689bd1cc35f6ed3fa628bc8d913177b0726a Author: Rakesh Pandit Date: Fri Oct 13 14:46:29 2017 +0200 lightnvm: pblk: remove useless line Signed-off-by: Rakesh Pandit Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 1 - 1 file changed, 1 deletion(-) commit 27b978725d895e704aab44b99242a0514485d798 Author: Rakesh Pandit Date: Fri Oct 13 14:46:28 2017 +0200 lightnvm: pblk: fix changing GC group list for a line pblk_line_gc_list seems to had a bug since the introduction of pblk in getting GC list for a line. In b20ba1bc7 while redesigning the GC algorithm, the naming for the GC thresholds was altered, but the values for high_thrs and mid_thrs were not. The result is that when moving to the GC lists, the mid threshold is never evaluated. Fixes: a4bd217b4("lightnvm: physical block device (pblk) target") Signed-off-by: Rakesh Pandit Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e6b754c252bacebdfbe3c57e790431ab8f445d1f Author: Javier González Date: Fri Oct 13 14:46:27 2017 +0200 lightnvm: pblk: ensure right bad block calculation Make sure that the variable controlling block threshold for allocating extra metadata sectors in case of a line with bad blocks does not get a negative value. Otherwise, the line will be marked as corrupted and wasted. 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, 1 insertion(+), 1 deletion(-) commit 21d2287119e843929c29fb1adbd271bde1fac7ae Author: Javier González Date: Fri Oct 13 14:46:26 2017 +0200 lightnvm: pblk: enable 1 LUN configuration Metadata I/Os are scheduled to minimize their impact on user data I/Os. When there are enough LUNs instantiated (i.e., enough bandwidth), it is easy to interleave metadata and data one after the other so that metadata I/Os are the ones being blocked and not vice-versa. We do this by calculating the distance between the I/Os in terms of the LUNs that are not in used, and selecting a free LUN that satisfies a the simple heuristic that metadata is scheduled behind. The per-LUN semaphores guarantee consistency. This works fine on >1 LUN configuration. However, when a single LUN is instantiated, this design leads to a deadlock, where metadata waits to be scheduled on a free LUN. This patch implements the 1 LUN case by simply scheduling the metadada I/O after the data I/O. In the process, we refactor the way a line is replaced to ensure that metadata writes are submitted after data writes in order to guarantee block sequentiality. Note that, since there is only one LUN, both I/Os will block each other by design. However, such configuration only pursues tight read latencies, not write bandwidth. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 17 ++++++++++------- drivers/lightnvm/pblk-init.c | 8 ++++++-- drivers/lightnvm/pblk-map.c | 21 ++++++++++++--------- drivers/lightnvm/pblk.h | 2 +- 4 files changed, 29 insertions(+), 19 deletions(-) commit 1e82123da6a4c6019ef03bcd47e4b3dc18dd136e Author: Javier González Date: Fri Oct 13 14:46:25 2017 +0200 lightnvm: pblk: remove I/O dependency on write path pblk schedules user I/O, metadata I/O and erases on the write path in order to minimize collisions at the media level. Until now, there has been a dependency between user and metadata I/Os that could lead to a deadlock as both take the per-LUN semaphore to schedule submission. This path removes this dependency and guarantees forward progress at a per I/O granurality. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-write.c | 145 +++++++++++++++++++----------------------- 1 file changed, 65 insertions(+), 80 deletions(-) commit 0f9248cf1e22333b2a0458540aafb1ad3b2b3337 Author: Javier González Date: Fri Oct 13 14:46:24 2017 +0200 lightnvm: pblk: remove redundant check on read path A partial read I/O in pblk is an I/O where some sectors reside in the write buffer in main memory and some are persisted on the device. Such an I/O must at least contain 2 lbas, therefore checking for the case where a single lba is mapped is not necessary. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-read.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7bd4d370db6090004a06deb526f0f01fa99a3f9f Author: Javier González Date: Fri Oct 13 14:46:23 2017 +0200 lightnvm: pblk: guarantee line integrity on reads When a line is recycled during garbage collection, reads can still be issued to the line. If the line is freed in the middle of this process, data corruption might occur. This patch guarantees that lines are not freed in the middle of reads that target them (lines). Specifically, we use the existing line reference to decide when a line is eligible for being freed after the recycle process. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 56 ++++++++++++++++++++++++++++++---- drivers/lightnvm/pblk-init.c | 14 +++++++-- drivers/lightnvm/pblk-read.c | 71 +++++++++++++++++++++++++++++++++----------- drivers/lightnvm/pblk.h | 2 ++ 4 files changed, 118 insertions(+), 25 deletions(-) commit a4809fee4e774fdf3296cc69c22ce6e6acef36b2 Author: Javier González Date: Fri Oct 13 14:46:22 2017 +0200 lightnvm: pblk: check lba sanity on read path As part of pblk's recovery scheme, we store the lba mapped to each physical sector on the device's out-of-bound (OOB) area. On the read path, we can use this information to validate that the data being delivered to the upper layers corresponds to the lba being requested. The cost of this check is an extra copy on the DMA region on the device and an extra comparison in the host, given that (i) the OOB area is being read together with the data in the media, and (ii) the DMA region allocated for the ppa list can be reused for the metadata stored on the OOB area. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-read.c | 51 +++++++++++++++++++++++++++++++++++++++++--- drivers/lightnvm/pblk.h | 4 +++- 2 files changed, 51 insertions(+), 4 deletions(-) commit 26532ee52b77185b095d29b54c83386f737a74ba Author: Javier González Date: Fri Oct 13 14:46:21 2017 +0200 lightnvm: pblk: use rqd->end_io for completion For consistency with the rest of pblk, use rqd->end_io to point to the function taking care of ending the request on the completion path. 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-read.c | 5 ++--- 2 files changed, 2 insertions(+), 10 deletions(-) commit 67bf26a3220e3bd403a62a9289aa1d065d3db82c Author: Javier González Date: Fri Oct 13 14:46:20 2017 +0200 lightnvm: pblk: refactor rqd alloc/free Refactor the rqd allocation and free functions so that all I/O types can use these helper functions. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 40 ++++++++++++++++++++++++++++++---------- drivers/lightnvm/pblk-read.c | 2 -- drivers/lightnvm/pblk-recovery.c | 2 -- drivers/lightnvm/pblk-write.c | 7 ------- drivers/lightnvm/pblk.h | 4 ++-- 5 files changed, 32 insertions(+), 23 deletions(-) commit e2cddf2082e700218b898b1c899f6a1c2130074a Author: Javier González Date: Fri Oct 13 14:46:19 2017 +0200 lightnvm: pblk: improve naming for internal req. Each request type sent to the LightNVM subsystem requires different metadata. Until now, we have tailored this metadata based on write, read and erase commands. However, pblk uses different metadata for internal writes that do not hit the write buffer. Instead of abusing the metadata for reads, create a new request type - internal write to improve code readability. In the process, create internal values for each I/O type instead of abusing the READ/WRITE macros, as suggested by Christoph. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 32 ++++++++++++++++---------------- drivers/lightnvm/pblk-read.c | 6 +++--- drivers/lightnvm/pblk-recovery.c | 12 ++++++------ drivers/lightnvm/pblk-write.c | 16 ++++++++-------- drivers/lightnvm/pblk.h | 11 ++++++++--- 5 files changed, 41 insertions(+), 36 deletions(-) commit 875d94f3a4838f2243334e5ce55ac8153f9bbf5b Author: Javier González Date: Fri Oct 13 14:46:18 2017 +0200 lightnvm: pblk: allocate bio size more accurately Wait until we know the exact number of ppas to be sent to the device, before allocating the bio. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-rb.c | 5 +++-- drivers/lightnvm/pblk-write.c | 20 ++++++++++---------- drivers/lightnvm/pblk.h | 4 ++-- 3 files changed, 15 insertions(+), 14 deletions(-) commit 6ca2f71f3e3d94d188000b420ce0529b07f3ce95 Author: Javier González Date: Fri Oct 13 14:46:17 2017 +0200 lightnvm: pblk: simplify path on REQ_PREFLUSH On REQ_PREFLUSH, directly tag the I/O context flags to signal a flush in the write to cache path, instead of finding the correct entry context and imposing a memory barrier. This simplifies the code and might potentially prevent race conditions when adding functionality to the write path. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-cache.c | 4 +++- drivers/lightnvm/pblk-rb.c | 8 +------- 2 files changed, 4 insertions(+), 8 deletions(-) commit 55e836d401601e7903b36db015ce899dc11085ab Author: Javier González Date: Fri Oct 13 14:46:16 2017 +0200 lightnvm: pblk: put bio on bio completion Simplify put bio by doing it on bio end_io instead of manually putting it on the completion path. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 10 +++++++--- drivers/lightnvm/pblk-read.c | 1 - drivers/lightnvm/pblk-recovery.c | 1 - drivers/lightnvm/pblk-write.c | 8 +------- 4 files changed, 8 insertions(+), 12 deletions(-) commit 2a19b10d423c6dc47449e905ed3a8eabb49c48a0 Author: Javier González Date: Fri Oct 13 14:46:15 2017 +0200 lightnvm: pblk: refactor read path on GC Simplify the part of the garbage collector where data is read from the line being recycled and moved into an internal queue before being copied to the memory buffer. This allows to get rid of a dedicated function, which introduces an unnecessary dependency on the code. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-gc.c | 94 +++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 55 deletions(-) commit d340121eb770de3b02bfc73c5f2b00f5345090c2 Author: Javier González Date: Fri Oct 13 14:46:14 2017 +0200 lightnvm: pblk: simplify data validity check on GC When a line is selected for recycling by the garbage collector (GC), the line state changes and the invalid bitmap is frozen, preventing invalidations from happening. Throughout the GC, the L2P map is checked to verify that not data being recycled has been updated. The last check is done before the new map is being stored on the L2P table. Though this algorithm works, it requires a number of corner cases to be checked each time the L2P table is being updated. This complicates readability and is error prone in case that the recycling algorithm is modified. Instead, this patch makes the invalid bitmap accessible even when the line is being recycled. When recycled data is being remapped, it is enough to check the invalid bitmap for the line before updating the L2P table. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-cache.c | 20 +++++------ drivers/lightnvm/pblk-core.c | 29 +++++++--------- drivers/lightnvm/pblk-gc.c | 58 +++++++++++++++++-------------- drivers/lightnvm/pblk-rb.c | 6 ++-- drivers/lightnvm/pblk-read.c | 79 +++++++++++++++++++++++-------------------- drivers/lightnvm/pblk.h | 23 ++++--------- 6 files changed, 109 insertions(+), 106 deletions(-) commit 84454e6de56bb5c8629c41ed09aaf5750ff56f5f Author: Javier González Date: Fri Oct 13 14:46:13 2017 +0200 lightnvm: pblk: refactor read lba sanity check Refactor lba sanity check on read path to avoid code duplication. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-read.c | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) commit 9f6cb13bb40bd9067498e908a3272aba998c0309 Author: Javier González Date: Fri Oct 13 14:46:12 2017 +0200 lightnvm: pblk: normalize ppa namings Normalize the way we name ppa variables to improve code readability. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 48 +++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 23 deletions(-) commit 3627896a4b12ea6bb9e0ff77724a24f53726db2d Author: Javier González Date: Fri Oct 13 14:46:11 2017 +0200 lightnvm: pblk: use constant for GC max inflight Use a constant to set the maximum number of inflight GC requests allowed. Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-gc.c | 4 ++-- drivers/lightnvm/pblk.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 2942f50fa389a62865572452dce6214a8aed69dc Author: Javier González Date: Fri Oct 13 14:46:10 2017 +0200 lightnvm: pblk: remove checks on mempool alloc. As part of the mempool audit on pblk, remove unnecessary mempool allocation checks on mempools. Reported-by: Jens Axboe 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-read.c | 8 -------- drivers/lightnvm/pblk-recovery.c | 35 +++++++---------------------------- drivers/lightnvm/pblk-write.c | 24 +++++------------------- 4 files changed, 12 insertions(+), 59 deletions(-) commit e72ec1d31bcb6dffe325418c6d96f2fcab7c2654 Author: Javier González Date: Fri Oct 13 14:46:09 2017 +0200 lightnvm: pblk: do not use a mempool for line bitmaps pblk holds two sector bitmaps: one to keep track of the mapped sectors while the line is active and another one to keep track of the invalid sectors. The latter is kept during the whole live of the line, until it is recycled. Since we cannot guarantee forward progress for the mempool in this case, get rid of the mempool and simply allocate memory through kmalloc. Reported-by: Jens Axboe Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 26 ++++++++++---------------- drivers/lightnvm/pblk-init.c | 29 ++--------------------------- drivers/lightnvm/pblk-recovery.c | 2 +- drivers/lightnvm/pblk-write.c | 4 +--- drivers/lightnvm/pblk.h | 3 --- 5 files changed, 14 insertions(+), 50 deletions(-) commit 0d880398cb6254ab3e110e2a8a659da65a56ffee Author: Javier González Date: Fri Oct 13 14:46:08 2017 +0200 lightnvm: pblk: decouple read/erase mempools Since read and erase paths offer different guarantees for inflight I/Os, separate the mempools to set the right min_nr for each on creation. Reported-by: Jens Axboe Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 8 ++++---- drivers/lightnvm/pblk-init.c | 22 +++++++++++++++------- drivers/lightnvm/pblk.h | 5 +++-- 3 files changed, 22 insertions(+), 13 deletions(-) commit b84ae4a8b883b96b95fff0e3979ff2c65bbf96b0 Author: Javier González Date: Fri Oct 13 14:46:07 2017 +0200 lightnvm: pblk: simplify work_queue mempool In pblk, we have a mempool to allocate a generic structure that we pass along workqueues. This is heavily used in the GC path in order to have enough inflight reads and fully utilize the GC bandwidth. However, the current GC path copies data to the host memory and puts it back into the write buffer. This requires a vmalloc allocation for the data and a memory copy. Thus, guaranteeing the allocation by using a mempool for the structure in itself does not give us much. Until we implement support for vector copy to avoid moving data through the host, just allocate the workqueue structure using kmalloc. This allows us to have a much smaller mempool. Reported-by: Jens Axboe Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 13 +++++++------ drivers/lightnvm/pblk-gc.c | 32 ++++++++++++++++---------------- drivers/lightnvm/pblk-init.c | 32 ++++++++++++++++---------------- drivers/lightnvm/pblk-write.c | 4 ++-- drivers/lightnvm/pblk.h | 11 ++++++----- 5 files changed, 47 insertions(+), 45 deletions(-) commit bd432417681a224d9fa4a9d43be7d4edc82135b2 Author: Javier González Date: Fri Oct 13 14:46:06 2017 +0200 lightnvm: pblk: fix min size for page mempool pblk uses an internal page mempool for allocating pages on internal bios. The main two users of this memory pool are partial reads (reads with some sectors in cache and some on media) and padded writes, which need to add dummy pages to an existing bio already containing valid data (and with a large enough bioset allocated). In both cases, the maximum number of pages per bio is defined by the maximum number of physical sectors supported by the underlying device. This patch fixes a bad mempool allocation, where the min_nr of elements on the pool was fixed (to 16), which is lower than the maximum number of sectors supported by NVMe (as of the time for this patch). Instead, use the maximum number of allowed sectors reported by the device. Reported-by: Jens Axboe Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 6 +++--- drivers/lightnvm/pblk-init.c | 15 ++++++++------- drivers/lightnvm/pblk-read.c | 2 +- drivers/lightnvm/pblk.h | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) commit da67e68fb9d37fb9072b20cc75d4337a73bc01b4 Author: Javier González Date: Fri Oct 13 14:46:05 2017 +0200 lightnvm: pblk: avoid deadlock on low LUN config On low LUN configurations, make sure not to send bios that are bigger than the buffer size. Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target") Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 2 +- drivers/lightnvm/pblk-rl.c | 6 ++++++ drivers/lightnvm/pblk.h | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) commit e0e12a707f02fcde1b77a2417d9fb0ae1ce3b003 Author: Javier González Date: Fri Oct 13 14:46:04 2017 +0200 lightnvm: pblk: fix write I/O sync stat Fix stat counter to collect the right number of I/Os being synced on the completion path. Fixes: 0880a9aa2d91f ("lightnvm: pblk: delete redundant buffer pointer") Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd8ddbf7a5e206fe6995ab0aee245d597dd6a7f2 Author: Javier González Date: Fri Oct 13 14:46:03 2017 +0200 lightnvm: pblk: free padded entries in write buffer When a REQ_FLUSH reaches pblk, the bio cannot be directly completed. Instead, data on the write buffer is flushed and the bio is completed on the completion pah. This might require some sectors to be padded in order to guarantee a successful write. This patch fixes a memory leak on the padded pages. A consequence of this bad free was that internal bios not containing data (only a flush) were not being completed. Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target") 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 | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 7d327a9ed6c4dca341ebf99012e0a6b80a3050e6 Author: Javier González Date: Fri Oct 13 14:46:02 2017 +0200 lightnvm: pblk: use right flag for GC allocation The data buffer for the GC path allocates virtual memory through vmalloc. When this change was introduced, a flag signaling kmalloc'ed memory was wrongly introduced. Use the right flag when creating a bio from this buffer. Fixes: de54e703a422 ("lightnvm: pblk: use vmalloc for GC data buffer") Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-read.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a1121176ff757e3c073490a69608ea0b18a00ec1 Author: Javier González Date: Fri Oct 13 14:46:01 2017 +0200 lightnvm: pblk: initialize debug stat counter Initialize the stat counter for garbage collected reads. Fixes: a4bd217b43268 ("lightnvm: physical block device (pblk) target") Signed-off-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 1 + 1 file changed, 1 insertion(+) commit 32825ebb06fafeff463ed23e9d0dea459ebd30fe Author: Rakesh Pandit Date: Fri Oct 13 14:46:00 2017 +0200 lightnvm: pblk: reuse pblk_gc_should_kick This is a trivial change which reuses pblk_gc_should_kick instead of repeating it again in pblk_rl_free_lines_inc. Signed-off-by: Rakesh Pandit Made it apply to the common case. Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 2 -- drivers/lightnvm/pblk-rl.c | 33 +++++++++------------------------ drivers/lightnvm/pblk.h | 1 - 3 files changed, 9 insertions(+), 27 deletions(-) commit c79819bc0877e4cbed8013b1abc9697e8805b21b Author: Rakesh Pandit Date: Fri Oct 13 14:45:59 2017 +0200 lightnvm: pblk: print incompatible line version correctly Correct it by converting little endian to cpu endian and also define a macro for line version so that maintenance is easy. Signed-off-by: Rakesh Pandit Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 2 +- drivers/lightnvm/pblk-recovery.c | 4 ++-- drivers/lightnvm/pblk.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) commit c5493845b7b303315118fb4ab96654bf7cb897f0 Author: Rakesh Pandit Date: Fri Oct 13 14:45:58 2017 +0200 lightnvm: pblk: improve error message if down_timeout fails The two pr_err messages are useless as they don't differentiate error code. Signed-off-by: Rakesh Pandit Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 4e76af53e132bff9e2b94f018457fadabf5ab419 Author: Rakesh Pandit Date: Fri Oct 13 14:45:57 2017 +0200 lightnvm: pblk: fix message if L2P MAP is in device This usually happens if we are developing with qemu and ll2pmode has default value. Improve description. Signed-off-by: Rakesh Pandit Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e57903fd972a398b7140d0bc055714e13a0e58c5 Author: Rakesh Pandit Date: Fri Oct 13 14:45:56 2017 +0200 lightnvm: pblk: protect line bitmap while submitting meta io It seems pblk_dealloc_page would race against pblk_alloc_pages for line bitmap for sector allocation.The chances are very low but might as well protect the bitmap properly. Signed-off-by: Rakesh Pandit Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-core.c | 2 ++ 1 file changed, 2 insertions(+) commit 32c662c58a9b9d0c99e713a14ca323a9a91c73a0 Author: Rakesh Pandit Date: Fri Oct 13 14:45:55 2017 +0200 lightnvm: include NVM Express driver if OCSSD is selected for build Because NVM needs BLK_DEV_NVME, select it automatically if we mark NVM in config file before building kernel. Also append PCI to depends as select doesn't automatically add dependencies. Signed-off-by: Rakesh Pandit Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c9d84b350f9b253872fc24f4dcfea166c884ee15 Author: Rakesh Pandit Date: Fri Oct 13 14:45:54 2017 +0200 lightnvm: pblk: fix error path in pblk_lines_alloc_metadata Use appropriate memory free calls based on allocation type used and also fix number of times free is called if kmalloc fails. Signed-off-by: Rakesh Pandit Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/pblk-init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a96d50fa0c8d3e399c49a0a90ddbbaabf8a46bb3 Author: Rakesh Pandit Date: Fri Oct 13 14:45:53 2017 +0200 lightnvm: remove already calculated nr_chnls Remove repeated calculation for number of channels while creating a target device. Signed-off-by: Rakesh Pandit Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 1 - 1 file changed, 1 deletion(-) commit 88d31ea2676696ad0802a361c8b824f0762fa34c Author: Rakesh Pandit Date: Fri Oct 13 14:45:52 2017 +0200 lightnvm: protect target type list with correct locks nvm_tgt_types list was protected by wrong lock for NVM_INFO ioctl call and can race with addition or removal of target types. Also unregistering target type was not protected correctly. Fixes: 5cd907853 ("lightnvm: remove nested lock conflict with mm") Signed-off-by: Rakesh Pandit Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bb6aa6f08268bbce4e0185b18cab9e04505d6695 Author: Rakesh Pandit Date: Fri Oct 13 14:45:51 2017 +0200 lightnvm: prevent bd removal if busy When a virtual block device is formatted and mounted after creating with "nvme lnvm create... -t pblk", a removal from "nvm lnvm remove" would result in this: 446416.309757] bdi-block not registered [446416.309773] ------------[ cut here ]------------ [446416.309780] WARNING: CPU: 3 PID: 4319 at fs/fs-writeback.c:2159 __mark_inode_dirty+0x268/0x340 Ideally removal should return -EBUSY as block device is mounted after formatting. This patch tries to address this checking if whole device or any partition of it already mounted or not before removal. Whole device is checked using "bd_super" member of block device. This member is always set once block device has been mounted using a filesystem. Another member "bd_part_count" takes care of checking any if any partitions are under use. "bd_part_count" is only updated under locks when partitions are opened or closed (first open and last release). This at least does take care sending -EBUSY if removal is being attempted while whole block device or any partition is mounted. Signed-off-by: Rakesh Pandit Reviewed-by: Javier González Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 900148296b78c61aa8c443dc594c0da968c3be53 Author: Rakesh Pandit Date: Fri Oct 13 14:45:50 2017 +0200 lightnvm: prevent target type module removal when in use If target type module e.g. pblk here is unloaded (rmmod) while module is in use (after creating target) system crashes. We fix this by using module API refcnt. Signed-off-by: Rakesh Pandit Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe drivers/lightnvm/core.c | 4 ++++ drivers/lightnvm/pblk-init.c | 1 + include/linux/lightnvm.h | 1 + 3 files changed, 6 insertions(+) commit 4d58443dddf95e7f1de73f60b8490426eb300b10 Author: Mika Kahola Date: Fri Oct 13 13:24:46 2017 +0300 drm/i915: Get rid of hardcoded pipes Favor for_each_pipe() macro when looping through pipes. Signed-off-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/1507890286-16214-1-git-send-email-mika.kahola@intel.com Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_dp_mst.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 277b09cfa377c31a8efebca465f096d4eea91ae4 Author: Thierry Reding Date: Thu Oct 12 16:08:57 2017 +0200 drm/atomic-helper: Fix reference to drm_crtc_send_vblank_event() Fix up this reference so that the proper link is generated in the documentation and so that people don't go chasing after the wrong function for an embarrassingly long time. Acked-by: Noralf Trønnes Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20171012140857.9559-1-thierry.reding@gmail.com drivers/gpu/drm/drm_atomic_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ac078159e2cf563c10d63a2a3dd773d2a480b49 Author: Thierry Reding Date: Thu Oct 12 16:06:16 2017 +0200 drm/atomic-helper: Fix typo Fix "esay-to-use" to "easy-to-use" typo. Acked-by: Noralf Trønnes Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20171012140616.9002-1-thierry.reding@gmail.com drivers/gpu/drm/drm_atomic_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d67ac3ae3a3ce464b4fec854c4c85407a99e8e2c Author: Geert Uytterhoeven Date: Wed Oct 4 14:33:08 2017 +0200 dt-bindings: iommu: ipmmu-vmsa: Use generic node name Use the preferred generic node name in the example. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Rob Herring Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0de7d8356241712406973a63572e61fea3233dc2 Author: Dan Carpenter Date: Fri Oct 13 13:57:10 2017 +0300 ALSA: hda - silence uninitialized variable warning in activate_amp_in() If snd_hda_get_conn_list() fails then "conn" isn't initialized. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai sound/pci/hda/hda_generic.c | 2 ++ 1 file changed, 2 insertions(+) commit a9291f461d2e727ac0812d7021653379fea4b782 Author: Jérémy Lefaure Date: Thu Oct 12 22:36:31 2017 -0400 ALSA: hda/ca0132 - use ARRAY_SIZE Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure Signed-off-by: Takashi Iwai sound/pci/hda/patch_ca0132.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 9e5544627339eccb18e53dd5800f30b6320d5cc3 Author: Ville Syrjälä Date: Fri Sep 1 19:53:26 2017 +0300 drm: Add missing __user annotation to drm_syncobj_array_find() 'user_handles' needs a __user annotation for fix the following sparse warning: drm_syncobj.c:813:37: warning: incorrect type in argument 2 (different address spaces) drm_syncobj.c:813:37: expected void const [noderef] *from drm_syncobj.c:813:37: got void *user_handles drm_syncobj.c:875:38: warning: incorrect type in argument 2 (different address spaces) drm_syncobj.c:875:38: expected void *user_handles drm_syncobj.c:875:38: got void [noderef] * drm_syncobj.c:908:38: warning: incorrect type in argument 2 (different address spaces) drm_syncobj.c:908:38: expected void *user_handles drm_syncobj.c:908:38: got void [noderef] * drm_syncobj.c:941:38: warning: incorrect type in argument 2 (different address spaces) drm_syncobj.c:941:38: expected void *user_handles drm_syncobj.c:941:38: got void [noderef] * Cc: Jason Ekstrand Fixes: 3e6fb72d6cef ("drm/syncobj: Add a syncobj_array_find helper") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170901165328.24459-2-ville.syrjala@linux.intel.com Reviewed-by: Thierry Reding drivers/gpu/drm/drm_syncobj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b1b1ae2c1c150f8db5d3523c74e81eaf8cae5cbb Author: Johannes Berg Date: Fri Oct 13 15:26:01 2017 +0300 mac80211: don't track HT capability changes The code here (more or less accidentally) tracks the HT capability of the AP when connected, and we found at least one AP that erroneously toggles its 20/40 capability bit when changing between 20/40 MHz. The connection to the AP is then broken because we set the 40 MHz disable flag based on this, as soon as it switches to 20 MHz, but because the flag then changed, we disconnect. I'd be inclined to just ignore this issue, since we then reconnect while the AP is in 20 MHz mode and never use 40 MHz with it again, but this code is a bit strange anyway - we don't use the capabilities for anything else. Change the code to simply not track the HT capabilities at all, which assumes that the AP at least sets 20/40 capability when operating in 40 MHz (or higher). If not, rate scaling might end up using only the narrower bandwidth. The new behaviour also mirrors what VHT does, where we only check the VHT operation. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 44cd3939c111b78a9fc6e3136fb0f9b6f475f68a Author: Stephen Boyd Date: Fri Oct 13 00:47:55 2017 -0700 drm/tilcdc: Remove redundant OF_DETACHED flag setting of_fdt_unflatten_tree() already sets the flag on this node to OF_DETACHED, because of_fdt_unflatten_tree() calls __unflatten_device_tree() with the detached bool set to true. Cc: Rob Herring Cc: Frank Rowand Signed-off-by: Stephen Boyd Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c | 1 - 1 file changed, 1 deletion(-) commit ce99f7206c9105851d97202ed08c058af6f11ac4 Author: Jyri Sarha Date: Thu Oct 12 12:19:46 2017 +0300 drm/tilcdc: Precalculate total frametime in tilcdc_crtc_set_mode() We need the total frame refresh time to check if we are too close to vertical sync when updating the two framebuffer DMA registers and risk a collision. This new method is more accurate that the previous that based on mode's vrefresh value, which itself is inaccurate or may not even be initialized. Reported-by: Kevin Hao Fixes: 11abbc9f39e0 ("drm/tilcdc: Set framebuffer DMA address to HW only if CRTC is enabled") Cc: # v4.11+ Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 88230ef1f31bf2d8fcf42c20e5743ff4b3618a29 Author: Arnd Bergmann Date: Fri Oct 13 14:04:31 2017 +0200 cfg80211: fix CFG80211_EXTRA_REGDB_KEYDIR typo The missing CONFIG_ prefix means this macro is never defined, leading to a possible Kbuild warning: net/wireless/reg.c:666:20: error: 'load_keys_from_buffer' defined but not used [-Werror=unused-function] static void __init load_keys_from_buffer(const u8 *p, unsigned int buflen) When we use the correct symbol, the warning also goes away. Fixes: 90a53e4432b1 ("cfg80211: implement regdb signature checking") Signed-off-by: Arnd Bergmann Signed-off-by: Johannes Berg net/wireless/reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1188e2a9ef223f5c670301d54a6f65d223a87582 Author: Arnd Bergmann Date: Fri Oct 13 14:04:30 2017 +0200 cfg80211: don't print log output for building shipped-certs Building an allmodconfig kernel with 'make -s' now prints a single line: GEN net/wireless/shipped-certs.c Using '$(kecho)' here will skip the output with 'make -s' but otherwise keeps printing it, which is consistent with how we handle all the other output. Fixes: 90a53e4432b1 ("cfg80211: implement regdb signature checking") Signed-off-by: Arnd Bergmann Signed-off-by: Johannes Berg net/wireless/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a590a38778dd77571a5309cc0d80a17b7d3427c Author: Ben Greear Date: Fri Oct 13 14:55:48 2017 +0300 ath10k: store coverage-class in case firmware is not booted This way, we can apply the values when the NIC does come up. Signed-off-by: Ben Greear Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/hw.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit ee0a47186e2fa9aa1c56cadcea470ca0ba8c8692 Author: Miaoqing Pan Date: Wed Sep 27 09:13:34 2017 +0800 ath9k: fix tx99 potential info leak When the user sets count to zero the string buffer would remain completely uninitialized which causes the kernel to parse its own stack data, potentially leading to an info leak. In addition to that, the string might be not terminated properly when the user data does not contain a 0-terminator. Signed-off-by: Miaoqing Pan Reviewed-by: Christoph Böhmwalder Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/tx99.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2ea9f12cefe4b6bf291e1717512b0ccb04bf71e9 Author: Rajkumar Manoharan Date: Mon Sep 25 15:29:41 2017 -0700 ath10k: add new cipher suite support QCA99x0 and QCA4019 family chips support CCMP-256, GCMP-128, and GCMP-256 ciphers in hardware, so advertise support for these. As firmware does not support group management frame ciphers (BIP), handle them in software (mac80211). Reviewed-by: Sebastian Gottschall Cc: Jouni Malinen Signed-off-by: Rajkumar Manoharan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 12 ++++++++++ drivers/net/wireless/ath/ath10k/hw.h | 3 +++ drivers/net/wireless/ath/ath10k/mac.c | 43 ++++++++++++++++++++++++++++++++-- drivers/net/wireless/ath/ath10k/wmi.h | 1 + 4 files changed, 57 insertions(+), 2 deletions(-) commit 36d9cdb6fb4a8b97af51bdd74683dd3e46b97b20 Author: Venkateswara Naralasetty Date: Wed Oct 4 12:22:57 2017 +0300 ath10k: check power save support in STA mode through FW IE Currently ath10k host enables power save support in station mode by default for all firmwares but Power save for station mode still not supported in some of the firmware versions. Which results in firmware crash while issueing multiple scan commands. Fix this problem by introducing new FW feature flag to check power save support in firmware and then the firmware image can tell to ath10k that power save mode is not supported in station mode. Signed-off-by: Venkateswara Naralasetty Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 1 + drivers/net/wireless/ath/ath10k/core.h | 3 +++ drivers/net/wireless/ath/ath10k/mac.c | 9 +++++++-- 3 files changed, 11 insertions(+), 2 deletions(-) commit 96378bd2c6cda5f04d0f6da2cd35d4670a982c38 Author: Brian Norris Date: Wed Oct 4 12:22:55 2017 +0300 ath10k: fix core PCI suspend when WoWLAN is supported but disabled For devices where the FW supports WoWLAN but user-space has not configured it, we don't do any PCI-specific suspend/resume operations, because mac80211 doesn't call drv_suspend() when !wowlan. This has particularly bad effects for some platforms, because we don't stop the power-save timer, and if this timer goes off after the PCI controller has suspended the link, Bad Things will happen. Commit 32faa3f0ee50 ("ath10k: add the PCI PM core suspend/resume ops") got some of this right, in that it understood there was a problem on non-WoWLAN firmware. But it forgot the $subject case. Fix this by moving all the PCI driver suspend/resume logic exclusively into the driver PM hooks. This shouldn't affect WoWLAN support much (this just gets executed later on). I would just as well kill the entirety of ath10k_hif_suspend(), as it's not even implemented on the USB or SDIO drivers. I expect that we don't need the callback, except to return "supported" (i.e., 0) or "not supported" (i.e., -EOPNOTSUPP). Fixes: 32faa3f0ee50 ("ath10k: add the PCI PM core suspend/resume ops") Fixes: 77258d409ce4 ("ath10k: enable pci soc powersaving") Signed-off-by: Brian Norris Cc: Ryan Hsu Cc: Kalle Valo Cc: Michal Kazior Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/pci.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 6cba3fa98cdd045e020f096bb8888225d3906895 Author: Kuninori Morimoto Date: Fri Oct 13 06:03:06 2017 +0000 ASoC: rsnd: more clear ADG clock debug info ADG inputs clock from CLK{A,B,C,I} and outputs clock from CLKOUT{0,1,2,3} which is selected by BRG{A,B}. Now, ADG is assuming BRGA is for 44100Hz related clocks, BRGB is for 48000Hz related clocks. Clock related debug is very difficult/confusable. This patch cleanups clock related debug info. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/adg.c | 59 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 18 deletions(-) commit a39644b235c1a45f84d6e16603cacb93740ed2d4 Author: Arnd Bergmann Date: Thu Oct 5 14:05:24 2017 +0200 rsi: fix integer overflow warning gcc produces a harmless warning about a recently introduced signed integer overflow: drivers/net/wireless/rsi/rsi_91x_hal.c: In function 'rsi_prepare_mgmt_desc': include/uapi/linux/swab.h:13:15: error: integer overflow in expression [-Werror=overflow] (((__u16)(x) & (__u16)0x00ffU) << 8) | \ ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ include/uapi/linux/swab.h:104:2: note: in expansion of macro '___constant_swab16' ___constant_swab16(x) : \ ^~~~~~~~~~~~~~~~~~ include/uapi/linux/byteorder/big_endian.h:34:43: note: in expansion of macro '__swab16' #define __cpu_to_le16(x) ((__force __le16)__swab16((x))) ^~~~~~~~ include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__cpu_to_le16' #define cpu_to_le16 __cpu_to_le16 ^~~~~~~~~~~~~ drivers/net/wireless/rsi/rsi_91x_hal.c:136:3: note: in expansion of macro 'cpu_to_le16' cpu_to_le16((tx_params->vap_id << RSI_DESC_VAP_ID_OFST) & ^~~~~~~~~~~ The problem is that the 'mask' value is a signed integer that gets turned into a negative number when truncated to 16 bits. Making it an unsigned constant avoids this. Fixes: eac4eed3224b ("rsi: tx and rx path enhancements for p2p mode") Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_mgmt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef81e8e9dbbb7f8348f3a62a6ab05e7aea33ea35 Author: Igor Mitsyanko Date: Wed Oct 4 18:38:13 2017 -0700 qtnfmac: do not cache current channel info in driver's state Linux Wireless device structure already has current channel information that can be used when needed. Start using it. Since driver's channel info is not used anymore, remove it. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 7 ++----- drivers/net/wireless/quantenna/qtnfmac/core.h | 1 - drivers/net/wireless/quantenna/qtnfmac/event.c | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) commit d23d1361316219621d146ba4b396a2ec4ddebfbf Author: Igor Mitsyanko Date: Wed Oct 4 18:38:12 2017 -0700 qtnfmac: make encryption info a part of CONNECT command. Encryption info is a constant part of STA settings, no point to pass it as an optional TLV. Remove QTN_TLV_ID_CRYPTO type as it's not used anymore. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/commands.c | 42 ++++++++++------------- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 5 +-- 2 files changed, 22 insertions(+), 25 deletions(-) commit 9766d1dd52ec92d78ad800fefa1d7806d73e6fdb Author: Igor Mitsyanko Date: Wed Oct 4 18:38:11 2017 -0700 qtnfmac: do not cache BSS state in per-VIF structure This cached state is used only once immediately after it is initilized, except for BSSID value that is used for events processing. There is no reason in keeping unused data in driver's state. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 40 ++++-------------- drivers/net/wireless/quantenna/qtnfmac/commands.c | 49 +++++++++++++++-------- drivers/net/wireless/quantenna/qtnfmac/core.h | 19 ++------- 3 files changed, 42 insertions(+), 66 deletions(-) commit d7b80052fa915ff4bbcace75c92335e793af2fb9 Author: Igor Mitsyanko Date: Wed Oct 4 18:38:10 2017 -0700 qtnfmac: get rid of QTNF_STATE_AP_START flag QTNF_STATE_AP_START usage is redundant and imposes additional state synchronization maintenance. We may as well leave state checking to network card and upper layers (cfg80211, nl80211 and userspace). Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 29 +---------------------- drivers/net/wireless/quantenna/qtnfmac/commands.c | 3 --- drivers/net/wireless/quantenna/qtnfmac/core.h | 3 +-- drivers/net/wireless/quantenna/qtnfmac/event.c | 12 ---------- 4 files changed, 2 insertions(+), 45 deletions(-) commit 524522c445e114210c198e544133a7ee3a4e141e Author: Igor Mitsyanko Date: Wed Oct 4 18:38:09 2017 -0700 qtnfmac: get rid of QTNF_STATE_AP_CONFIG QTNF_STATE_AP_CONFIG is redundant and its usage can be safely removed. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 8 -------- drivers/net/wireless/quantenna/qtnfmac/commands.c | 3 --- drivers/net/wireless/quantenna/qtnfmac/core.h | 1 - 3 files changed, 12 deletions(-) commit f99201cb084df11cf807ef151d14715467c9ccc2 Author: Igor Mitsyanko Date: Wed Oct 4 18:38:08 2017 -0700 qtnfmac: pass channel definition to WiFi card on START_AP command Introduce "channel definition" TLV containing full channel description (center frequence for both segments + BW) and pass it to wireless card in a payload to START_AP command. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 9 ------ drivers/net/wireless/quantenna/qtnfmac/commands.c | 28 ++++++++++--------- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 13 +++++++++ .../net/wireless/quantenna/qtnfmac/qlink_util.c | 32 ++++++++++++++++++++++ .../net/wireless/quantenna/qtnfmac/qlink_util.h | 2 ++ 5 files changed, 62 insertions(+), 22 deletions(-) commit 8b5f4aa7340a4ebfd8dc11159f5259f51a4d9229 Author: Igor Mitsyanko Date: Wed Oct 4 18:38:07 2017 -0700 qtnfmac: pass all AP settings to wireless card for processing Modify QLINK START_AP command payload to pass all AP settings contained within struct cfg80211_ap_settings. Make most of settings a constant part of "config AP" command instead of passing it as an optional TLVs. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/commands.c | 52 ++++++++------- drivers/net/wireless/quantenna/qtnfmac/qlink.h | 78 ++++++++++++++++------ .../net/wireless/quantenna/qtnfmac/qlink_util.c | 13 ++++ .../net/wireless/quantenna/qtnfmac/qlink_util.h | 1 + 4 files changed, 101 insertions(+), 43 deletions(-) commit 9b692df1e66ff6e6340eaaab20f8f0333daaeb62 Author: Igor Mitsyanko Date: Wed Oct 4 18:38:06 2017 -0700 qtnfmac: do not cache AP settings in driver structures Cached AP setings are passed to WiFi card right after they are initialized and are never used for anything else. There is no point in keeping them in driver state. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 17 +-------- drivers/net/wireless/quantenna/qtnfmac/commands.c | 46 +++++++++++------------ drivers/net/wireless/quantenna/qtnfmac/commands.h | 3 +- 3 files changed, 25 insertions(+), 41 deletions(-) commit 76d7b12cbbe256bc390689273d1ffae2626f2f92 Author: Christos Gkekas Date: Wed Oct 11 22:15:15 2017 +0100 rtlwifi: Remove unused cur_rfstate variables Clean up unused cur_rfstate variables in rtl8188ee, rtl8723ae, rtl8723be and rtl8821ae. Signed-off-by: Christos Gkekas Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 4 +--- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 4 +--- drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 4 +--- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) commit 84efbad4f867507b1067d3277c238885f182068d Author: Ping-Ke Shih Date: Fri Sep 29 14:48:00 2017 -0500 rtlwifi: Add module parameter ASPM On some platforms, enable ASPM will cause AER error to be logged, thus we use a parameter to selectively turn on ASPM. 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/rtl8188ee/sw.c | 6 +++++- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | 6 +++++- drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c | 6 +++++- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 6 +++++- drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 6 +++++- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c | 6 +++++- drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 6 +++++- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 6 +++++- drivers/net/wireless/realtek/rtlwifi/wifi.h | 3 +++ 9 files changed, 43 insertions(+), 8 deletions(-) commit 1d22b17744a317d7cbb2b3cddce0e0ed170b6ff5 Author: Ping-Ke Shih Date: Fri Sep 29 14:47:59 2017 -0500 rtlwifi: Add bw_update parameter for RA mask update. - Add new parameter "is_bw_update" to control if current bandwidth setting is updated to FW RA. - After this commit, we keep the same setting as before. - Later, bandwidth update in watchdog is changed to false for 8822BE. Signed-off-by: Tsang-Shian Lin 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 | 2 +- drivers/net/wireless/realtek/rtlwifi/core.c | 5 +++-- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 6 +++--- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.h | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c | 6 +++--- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.h | 5 ++--- drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c | 6 +++--- drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c | 6 +++--- drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.h | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 9 +++++---- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.h | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8192se/dm.c | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 6 +++--- drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 7 ++++--- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.h | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c | 3 ++- drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 8 ++++---- drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.h | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c | 2 +- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 8 ++++---- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.h | 2 +- drivers/net/wireless/realtek/rtlwifi/wifi.h | 3 ++- 26 files changed, 61 insertions(+), 50 deletions(-) commit aa59a1e7c6e82b7ab8f40583829b6670d7d0a21e Author: Ping-Ke Shih Date: Fri Sep 29 14:47:58 2017 -0500 rtlwifi: Remove BAND_NUM and related fields These fields are unused, and we will define them in phydm 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/wifi.h | 16 ---------------- 1 file changed, 16 deletions(-) commit 08ab7465f36c07d461faa13e7625aea81b70b2f4 Author: Ping-Ke Shih Date: Fri Sep 29 14:47:57 2017 -0500 rtlwifi: Add RSSI and RF type to wifi.h for phydm These definition will be used by phydm 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/wifi.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 74451b935c4285774d46fba864a7a403587c0b97 Author: Ping-Ke Shih Date: Fri Sep 29 14:47:56 2017 -0500 rtlwifi: Add TX/RX throughput statistics in period The statistic variables use u64 to get higher precision. 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 | 16 ++++++++++++++++ drivers/net/wireless/realtek/rtlwifi/wifi.h | 15 +++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) commit c1816f1709e82e773c501c416a47dd84a8f5baf7 Author: Ping-Ke Shih Date: Fri Sep 29 14:47:55 2017 -0500 rtlwifi: Add rtl_get_hal_edca_param() to generate register's format of EDCA. Convert from the value of ieee80211_tx_queue_params to Realtek's register 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 | 36 +++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtlwifi/base.h | 4 ++++ 2 files changed, 40 insertions(+) commit cdc9c7a032aae4dcdac47cf47d095207ce27bb87 Author: Ping-Ke Shih Date: Fri Sep 29 14:47:54 2017 -0500 rtlwifi: Implement rtl_get_tx_hw_rate to yield correct hw_rate Originally, we get legacy rate only, so we extend to get HT and VHT rate. 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 | 42 ++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 4 deletions(-) commit 0c07bd7457607b2bf846824424e78703c27ffd92 Author: Ping-Ke Shih Date: Fri Sep 29 14:47:53 2017 -0500 rtlwifi: rtl8192ee: Make driver support 64bits DMA. 1. Both 32-bit and 64-bit use the same TX/RX buffer desc layout 2. Extend set_desc() and get_desc() to set and get 64-bit address 3. Remove directive DMA_IS_64BIT 4. Add module parameter to turn on 64-bit dma 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/pci.c | 49 ++++++-- drivers/net/wireless/realtek/rtlwifi/pci.h | 10 +- .../net/wireless/realtek/rtlwifi/rtl8188ee/hw.c | 1 + .../net/wireless/realtek/rtlwifi/rtl8188ee/trx.c | 5 +- .../net/wireless/realtek/rtlwifi/rtl8188ee/trx.h | 3 +- .../net/wireless/realtek/rtlwifi/rtl8192ce/trx.c | 5 +- .../net/wireless/realtek/rtlwifi/rtl8192ce/trx.h | 3 +- .../net/wireless/realtek/rtlwifi/rtl8192de/fw.c | 2 +- .../net/wireless/realtek/rtlwifi/rtl8192de/trx.c | 3 +- .../net/wireless/realtek/rtlwifi/rtl8192de/trx.h | 3 +- .../net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 31 ++++- .../net/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 3 + .../net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 49 ++++---- .../net/wireless/realtek/rtlwifi/rtl8192ee/trx.h | 140 ++++----------------- .../net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 2 +- .../net/wireless/realtek/rtlwifi/rtl8192se/trx.c | 3 +- .../net/wireless/realtek/rtlwifi/rtl8192se/trx.h | 3 +- .../net/wireless/realtek/rtlwifi/rtl8723ae/trx.c | 5 +- .../net/wireless/realtek/rtlwifi/rtl8723ae/trx.h | 3 +- .../net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 1 + .../net/wireless/realtek/rtlwifi/rtl8723be/trx.c | 5 +- .../net/wireless/realtek/rtlwifi/rtl8723be/trx.h | 3 +- .../realtek/rtlwifi/rtl8723com/fw_common.c | 3 +- .../net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 1 + .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.c | 5 +- .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.h | 3 +- drivers/net/wireless/realtek/rtlwifi/wifi.h | 11 +- 27 files changed, 166 insertions(+), 189 deletions(-) commit ecf4000e0d925c6ba074d11801df4a4cdd8d5324 Author: Ping-Ke Shih Date: Fri Sep 29 14:47:52 2017 -0500 rtlwifi: Remove redundant semicolon in wifi.h. The semicolon can cause compiler error, if it exists in if...else statement. 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/wifi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f06eb3f9c03eda3bf7e40b49f5a4b032752bb176 Author: Ping-Ke Shih Date: Fri Sep 29 14:47:51 2017 -0500 rtlwifi: Fix MAX MPDU of VHT capability We must choose only one of VHT_CAP among IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895, IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 and IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454. 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 | 4 ---- 1 file changed, 4 deletions(-) commit b2b3adc93e9e46554bedf26f2ee081126c2b8a22 Author: Keerthy Date: Wed Sep 13 17:47:10 2017 +0530 mfd: tps65218: Introduce dependency on CONFIG_OF Currently the driver boots only via device tree hence add a dependency on CONFIG_OF. This leaves with a bunch of unused code so clean that up. Signed-off-by: Keerthy Signed-off-by: Lee Jones drivers/mfd/Kconfig | 2 +- drivers/mfd/tps65218.c | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) commit 8f76af65a53cfee25c1a7eccbf8a180d7471657d Author: Keerthy Date: Wed Sep 13 17:47:09 2017 +0530 mfd: tps65218: Correct the config description When the initial support was added for this PMIC was added only regulator support was present. Now we have GPIO and Powerbutton support as well. Hence correct the description of MFD_TPS65218 config option. Signed-off-by: Keerthy Signed-off-by: Lee Jones drivers/mfd/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 69075af67245c9a18d95028dd947135e85e08877 Author: Steve Twiss Date: Tue Sep 12 10:14:28 2017 +0100 MAINTAINERS: Fix Dialog search term for watchdog binding file Commit 340267640d769d3b3af9 ("MAINTAINERS: da9062/61 updates to the Dialog Semiconductor search terms") contained a typo for the watchdog binding: da92??-wdt.txt should have read da90??-wdt.txt. This new commit will fix the error and allows Dialog Semiconductor to follow files for PMIC bindings correctly. Signed-off-by: Steve Twiss Signed-off-by: Lee Jones MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f132bc3f301efad6762d62a2aa2ad7b0caa8cbf0 Author: Martin Kaiser Date: Tue Sep 12 10:34:15 2017 +0200 mfd: fsl-imx25: Set irq handler and data in one go Replace the two separate calls for setting the irq handler and data with a single irq_set_chained_handler_and_data() call. Signed-off-by: Martin Kaiser Signed-off-by: Lee Jones drivers/mfd/fsl-imx25-tsadc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8275b77a15131673f955f738f0704e1d40a8edae Author: Rui Feng Date: Thu Sep 7 16:26:39 2017 +0800 mfd: rts5249: Add support for RTS5250S power saving Enable power saving for RTS5250S as following steps: 1.Set 0xFE58 to enable clock power management. 2.Check cfg space whether support L1SS or not. 3.If support L1SS, set 0xFF03 to free clkreq. 4.When entering idle status, enable aspm and set parameters for L1SS and LTR. 5.Wnen entering run status, disable aspm and set parameters for L1SS and LTR. If entering L1SS mode successfully, electric current will be below 2mA. Signed-off-by: Rui Feng Signed-off-by: Lee Jones drivers/mfd/rts5249.c | 155 ++++++++++++++++++++++++++++++++++++++++++- drivers/mfd/rtsx_pcr.c | 142 +++++++++++++++++++++++++++++++++++++-- drivers/mfd/rtsx_pcr.h | 14 ++++ include/linux/mfd/rtsx_pci.h | 84 +++++++++++++++++++++++ 4 files changed, 389 insertions(+), 6 deletions(-) commit 31374972321d1639d1a8bb1213b66688132d103f Author: Takashi Iwai Date: Mon Sep 4 16:43:40 2017 +0200 ACPI / PMIC: Add opregion driver for Intel Dollar Cove TI PMIC This patch adds the opregion driver for Dollar Cove TI PMIC on Intel Cherry Trail devices. The patch is based on the original work by Intel, found at: https://github.com/01org/ProductionKernelQuilts with many cleanups and rewrites. The driver is currently provided only as built-in to follow other PMIC opregion drivers convention. The re-enumeration of devices at probe is required for fixing the issues on HP x2 210 G2. See bug#195689. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=193891 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195689 Signed-off-by: Takashi Iwai Reviewed-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones drivers/acpi/Kconfig | 6 ++ drivers/acpi/Makefile | 1 + drivers/acpi/pmic/intel_pmic_chtdc_ti.c | 137 ++++++++++++++++++++++++++++++++ 3 files changed, 144 insertions(+) commit 6bac0606fdba97a2666bc8f0460a05fb7352b7e2 Author: Takashi Iwai Date: Mon Sep 4 16:43:38 2017 +0200 mfd: Add support for Cherry Trail Dollar Cove TI PMIC This patch adds the MFD driver for Dollar Cove (TI version) PMIC with ACPI INT33F5 that is found on some Intel Cherry Trail devices. The driver is based on the original work by Intel, found at: https://github.com/01org/ProductionKernelQuilts This is a minimal version for adding the basic resources. Currently, only ACPI PMIC opregion and the external power-button are used. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=193891 Signed-off-by: Takashi Iwai Reviewed-by: Mika Westerberg Reviewed-by: Andy Shevchenko Acked-by: Rafael J. Wysocki Signed-off-by: Lee Jones drivers/mfd/Kconfig | 13 +++ drivers/mfd/Makefile | 1 + drivers/mfd/intel_soc_pmic_chtdc_ti.c | 184 ++++++++++++++++++++++++++++++++++ 3 files changed, 198 insertions(+) commit 88decb026d90c386b2a15adbe6fb094f6a86d144 Author: Ray Jui Date: Wed Sep 6 17:27:42 2017 -0700 syscon: dt-bindings: Add binding document for iProc MHB block Add binding document for Broadcom iProc's Multi-Host Bridge (MHB) block Signed-off-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Lee Jones .../devicetree/bindings/mfd/brcm,iproc-mhb.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 58ab243ef5ad1aee7600eb4bd8d9ce5a63401c5e Author: Ray Jui Date: Wed Sep 6 17:27:41 2017 -0700 syscon: dt-bindings: Add binding doc for Broadcom iProc CDRU Add binding document for Broadcom iProc's Chip Device Resource Unit (CDRU). Multiple iProc based chips have this CDRU block that contains miscellaneous registers for chip or device configurations. Start with Stingray specific compatible string for the initial binding Signed-off-by: Ray Jui Reviewed-by: Scott Branden Signed-off-by: Lee Jones .../devicetree/bindings/mfd/brcm,iproc-cdru.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 4589515af30005a404bd34e4b7933f98e68849f4 Author: Maciej Purski Date: Tue Sep 5 15:50:27 2017 +0200 mfd: max77693: Add muic of_compatible in mfd_cell This patch adds muic of_compatible in order to use the muic device driver in device tree. Signed-off-by: Maciej Purski Reviewed-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/max77693.txt | 6 ++++++ drivers/mfd/max77693.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit 223fd9f61f84ee4dd08fb859f2de3f70cc3879f1 Author: Colin Ian King Date: Tue Sep 5 12:27:12 2017 +0100 mfd: stw481x: Make three arrays static const, reduces object code size Don't populate the arrays vcore_val, vpll_val and vaux_val on the stack, instead make them static const. Makes the object code smaller by over 370 bytes: Before: text data bss dec hex filename 6971 3248 64 10283 282b drivers/mfd/stw481x.o After: text data bss dec hex filename 6338 3504 64 9906 26b2 drivers/mfd/stw481x.o Signed-off-by: Colin Ian King Signed-off-by: Lee Jones drivers/mfd/stw481x.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 511cb17448d95e4277451cdee882e72b6a9a3099 Author: Keerthy Date: Wed Aug 30 14:59:10 2017 +0530 mfd: tps65217: Introduce dependency on CONFIG_OF Currently the driver boots only via device tree hence add a dependency on CONFIG_OF. This leaves with a bunch of unused code so clean that up. This patch also makes use of probe_new function in place of the probe function so as to avoid passing i2c_device_id. Signed-off-by: Keerthy Reviewed-by: Javier Martinez Canillas Signed-off-by: Lee Jones drivers/mfd/Kconfig | 2 +- drivers/mfd/tps65217.c | 28 +++++----------------------- drivers/regulator/tps65217-regulator.c | 5 ----- drivers/video/backlight/tps65217_bl.c | 14 +++----------- include/linux/mfd/tps65217.h | 6 ------ 5 files changed, 9 insertions(+), 46 deletions(-) commit cfc95173ba8e18e41d9a69d2747d0f2738a2a551 Author: Joel Stanley Date: Wed Aug 23 15:39:56 2017 +0930 dt-bindings: aspeed-scu: Add clock and reset properties Signed-off-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: Lee Jones Documentation/devicetree/bindings/mfd/aspeed-scu.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit 5158cc2d4eca66c1c5ef1939d8fa02942f532515 Author: Christos Gkekas Date: Sun Oct 8 22:56:48 2017 +0100 backlight: tps65217_bl: Remove unnecessary default brightness check Variable val holds the default brightness and is unsigned, therefore checking whether it is less than zero is redundant. Signed-off-by: Christos Gkekas Acked-by: Daniel Thompson Acked-by: Jingoo Han Signed-off-by: Lee Jones drivers/video/backlight/tps65217_bl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5d0c49acebc9488e37db95f1d4a55644e545ffe7 Author: Derek Basehore Date: Tue Aug 29 13:34:34 2017 -0700 backlight: pwm_bl: Fix overflow condition This fixes an overflow condition that can happen with high max brightness and period values in compute_duty_cycle. This fixes it by using a 64 bit variable for computing the duty cycle. Signed-off-by: Derek Basehore Acked-by: Thierry Reding Reviewed-by: Brian Norris Signed-off-by: Lee Jones drivers/video/backlight/pwm_bl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 317049204cd3dfd831ffd15691eece3fe9064444 Author: Himanshu Jha Date: Fri Oct 6 20:34:39 2017 +0530 mwifiex: Use put_unaligned_le32 Use put_unaligned_le32 rather than using byte ordering function and memcpy which makes code clear. Also, add the header file where it is declared. Done using Coccinelle and semantic patch used is : @ rule1 @ identifier tmp; expression ptr,x; type T; @@ - tmp = cpu_to_le32(x); <+... when != tmp - memcpy(ptr, (T)&tmp, ...); + put_unaligned_le32(x,ptr); ...+> @ depends on rule1 @ type j; identifier tmp; @@ - j tmp; ...when != tmp Signed-off-by: Himanshu Jha Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cmdevt.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 2d5cc60949e0d2de3cb05d5772b58a5aa7f4abc3 Author: Rohit Fule Date: Wed Oct 4 17:36:06 2017 +0530 mwifiex: double the size of chan_stats array in adapter When a user requests scan, driver sends multiple scan requests to firmware, which might be active or passive. Firmware will send channel statistics for each channel in the request. This will be stored in chan_stats array. Few channels might report hidden SSIDs in passive scan results. So, once the original scan request is finished, driver issues an active scan request for all channels which reported hidden SSIDs. This will cause duplicates in the chan_stats array. At worst, every channel will have a hidden SSID, in which case the driver can issue active scan requests for each channel. So the complete scan statistics size will be twice of existing limit. At present maximum number of channels returned in scan statistics is 31(BG) + 14(A) = 45. Clearly there will be an overflow of the chan_stats array in the above mentioned scenario. To fix this double the size of chan_stats array. Signed-off-by: Rohit Fule Signed-off-by: Mangesh Malusare Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f0f7c2275fb925ea287e2da0585d17bde3d1fd2e Author: Douglas Anderson Date: Tue Oct 3 20:49:44 2017 +0530 mwifiex: minor cleanups w/ sta_list_spinlock in cfg80211.c The sta_list_spinlock looks to be used to control locking of the list. Specifically when someone has the lock they may be allowed to modify or delete elements of the list. That implies that we shouldn't access the fields of the elements returned by mwifiex_get_sta_entry() after we've released the spinlock. Let's make some small changes so this is true. It's unlikely that this matters since it looks to be just error handling, but it's nice to be clean. Signed-off-by: Douglas Anderson Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 14 +++++++++----- drivers/net/wireless/marvell/mwifiex/sta_event.c | 6 ++---- 2 files changed, 11 insertions(+), 9 deletions(-) commit 40351051d022762d95142a5a9e37220dbbce39f5 Author: Douglas Anderson Date: Tue Oct 3 20:49:43 2017 +0530 mwifiex: kill useless list_empty checks There's absolutely no reason to check to see if a list is empty before iterating through it. It's just like writing code like this: if (count != 0) { for (i = 0; i < count; i++) { ... } } The loop will already be avoided if "count == 0" so there was no reason to check. Signed-off-by: Douglas Anderson Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/11n.c | 9 --------- drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c | 6 ------ drivers/net/wireless/marvell/mwifiex/init.c | 4 ---- drivers/net/wireless/marvell/mwifiex/tdls.c | 7 ------- 4 files changed, 26 deletions(-) commit 0f0a0af826260a267d11a66e4b13543784bc9c56 Author: Randy Dunlap Date: Wed Sep 27 13:01:49 2017 -0700 bcma: keep *config menu together Use "if BCMA"/"endif" around all Kconfig symbols so that they are kept together in *config menus instead of showing up in unexpected places. Also remove "depends on BCMA" since this is handled by the "if BCMA" addition. Tested with ARCH={x86_64,MIPS} using make {n,menu,g,x}config. Signed-off-by: Randy Dunlap Cc: Rafał Miłecki Signed-off-by: Kalle Valo drivers/bcma/Kconfig | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit a2fc4bd61e7ec3bb1f7c8b3d47272be813f88aea Author: Shashank Sharma Date: Tue Oct 10 15:37:44 2017 +0530 drm/i915: Add retries for LSPCON detection We read the dp dual mode Adapter identifier to detect the LSPCON device. It's been observed from the CI testing that in few cases, this read can get delayed or fail. For such scenarios, LSPCON vendors suggest to retry the read operation. This patch adds retry in the probe function, while reading LSPCON identifier. V3: added this patch in the series Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102294 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102295 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102359 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103186 Cc: Ville Syrjala Cc: Imre Deak Signed-off-by: Shashank Sharma Reviewed-by: Imre Deak Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1507630064-17908-4-git-send-email-shashank.sharma@intel.com drivers/gpu/drm/i915/intel_lspcon.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit d18aef0f75436abb95894a230b504432df26c167 Author: Shashank Sharma Date: Tue Oct 10 15:37:43 2017 +0530 drm/i915: Don't give up waiting on INVALID_MODE Our current logic to read LSPCON's current mode, stops retries and breaks wait-loop, if it gets LSPCON_MODE_INVALID as return from the core function. This doesn't allow us to try reading the mode again. This patch removes this condition and allows retries reading the currnt mode until timeout. This also fixes/prevents some of the noise in form of debug messages while running IGT CI test cases. V2: rebase, added r-b V2: changed some debug message levels from debug->error and error->debug in lspcon_get_current_mode function. V3: Rebase Cc: Imre Deak Cc: Daniel Vetter Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102294 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102295 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102359 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103186 Reviewed-by: Imre Deak Signed-off-by: Shashank Sharma Signed-off-by: Mahesh Kumar Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1507630064-17908-3-git-send-email-shashank.sharma@intel.com drivers/gpu/drm/i915/intel_lspcon.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit f687e25a7a245952349f1f9f9cc238ac5a3be258 Author: Shashank Sharma Date: Thu Oct 12 22:10:08 2017 +0530 drm: Add retries for lspcon mode detection From the CI builds, its been observed that during a driver reload/insert, dp dual mode read function sometimes fails to read from LSPCON device over i2c-over-aux channel. This patch: - adds some delay and few retries, allowing a scope for these devices to settle down and respond. - changes one error log's level from ERROR->DEBUG as we want to call it an error only after all the retries are exhausted. V2: Addressed review comments from Jani (for loop for retry) V3: Addressed review comments from Imre (break on partial read too) V3: Addressed review comments from Ville/Imre (Add the retries exclusively for LSPCON, not for all dp_dual_mode devices) V4: Added r-b from Imre, sending it to dri-devel (Jani) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102294 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102295 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102359 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103186 Cc: Ville Syrjala Cc: Imre Deak Cc: Jani Nikula Reviewed-by: Imre Deak Acked-by: Dave Airlie Signed-off-by: Shashank Sharma Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1507826408-19322-1-git-send-email-shashank.sharma@intel.com drivers/gpu/drm/drm_dp_dual_mode_helper.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 1c0437af9fca8de6e4ba179d18cf13154da25695 Author: Kamalesh Babulal Date: Tue Oct 10 20:17:32 2017 +0530 powerpc/modules: Use WARN_ON() in stub_for_addr() Use WARN_ON(), while running out of stubs in stub_for_addr() and abort loading of the module instead of BUG_ON(). Signed-off-by: Kamalesh Babulal Signed-off-by: Michael Ellerman arch/powerpc/kernel/module_64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 990f19ae6feefb4a6e718355719cde5f6ba18ff6 Author: Vaibhav Jain Date: Wed Oct 11 11:44:41 2017 +0530 cxl: Dump PSL_FIR register on PSL9 error irq For PSL9 currently we aren't dumping the PSL FIR register when a PSL error interrupt is triggered. Contents of this register are useful in debugging AFU issues. This patch fixes issue by adding a new service_layer_ops callback cxl_native_err_irq_dump_regs_psl9() to dump the PSL_FIR registers on a PSL error interrupt thereby bringing the behavior in line with PSL on POWER-8. Also the existing service_layer_ops callback for PSL8 has been renamed to cxl_native_err_irq_dump_regs_psl8(). Signed-off-by: Vaibhav Jain Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 3 ++- drivers/misc/cxl/native.c | 15 ++++++++++++--- drivers/misc/cxl/pci.c | 3 ++- 3 files changed, 16 insertions(+), 5 deletions(-) commit 89aca4753eb451a48f65a12b02640365dba3d4ea Author: Cyril Bur Date: Tue Jul 4 11:21:15 2017 +1000 selftests/powerpc: context_switch: Fix pthread errors Turns out pthreads returns an errno and doesn't set errno. This doesn't play well with perror(). Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman .../selftests/powerpc/benchmarks/context_switch.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit f7059428ec1b16785bdc2a70e056ef20f3a8df41 Author: Marco Franchi Date: Thu Oct 5 11:31:41 2017 -0300 ARM: dts: imx51: Fix inconsistent display port names Contrary to later i.MX SoCs, the parallel display interface pad groups on i.MX51 are called DISP1 and DISP2 in the Reference Manual, not DISP0 and DISP1. Fix this inconsistence by changing the DISP names in the i.mx51 dts. Signed-off-by: Marco Franchi Acked-by: Philipp Zabel Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx51-apf51dev.dts | 4 ++-- arch/arm/boot/dts/imx51-babbage.dts | 12 ++++++------ arch/arm/boot/dts/imx51-ts4800.dts | 6 +++--- arch/arm/boot/dts/imx51.dtsi | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) commit 792d4edda00851d6def5d230675cc56302b2c928 Author: Marco Franchi Date: Thu Oct 5 11:31:40 2017 -0300 ARM: dts: imx: Fix incorrect display nodes notation The following build warnings are seen with W=1: Warning (unit_address_vs_reg): Node /display@di0 has a unit name, but no reg property Warning (unit_address_vs_reg): Node /display@di1 has a unit name, but no reg property Fix all these warnings by changing 'display@diX' to 'dispX'. Signed-off-by: Marco Franchi Acked-by: Philipp Zabel Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx51-apf51dev.dts | 2 +- arch/arm/boot/dts/imx51-babbage.dts | 4 ++-- arch/arm/boot/dts/imx51-ts4800.dts | 2 +- arch/arm/boot/dts/imx53-m53evk.dts | 2 +- arch/arm/boot/dts/imx53-mba53.dts | 2 +- arch/arm/boot/dts/imx53-qsb-common.dtsi | 2 +- arch/arm/boot/dts/imx53-tx53-x03x.dts | 2 +- arch/arm/boot/dts/imx6dl-aristainetos2_4.dts | 2 +- arch/arm/boot/dts/imx6dl-aristainetos_4.dts | 2 +- arch/arm/boot/dts/imx6dl-aristainetos_7.dts | 2 +- arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts | 2 +- arch/arm/boot/dts/imx6dl-tx6dl-comtft.dts | 2 +- arch/arm/boot/dts/imx6dl-tx6s-8034.dts | 2 +- arch/arm/boot/dts/imx6dl-tx6s-8035.dts | 2 +- arch/arm/boot/dts/imx6dl-tx6u-801x.dts | 2 +- arch/arm/boot/dts/imx6dl-tx6u-8033.dts | 2 +- arch/arm/boot/dts/imx6q-apalis-eval.dts | 2 +- arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts | 2 +- arch/arm/boot/dts/imx6q-apalis-ixora.dts | 2 +- arch/arm/boot/dts/imx6q-tx6q-1010-comtft.dts | 2 +- arch/arm/boot/dts/imx6q-tx6q-1010.dts | 2 +- arch/arm/boot/dts/imx6q-tx6q-1020-comtft.dts | 2 +- arch/arm/boot/dts/imx6q-tx6q-1020.dts | 2 +- arch/arm/boot/dts/imx6q-tx6q-1036.dts | 2 +- arch/arm/boot/dts/imx6qdl-apf6dev.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-nitrogen6_max.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 2 +- arch/arm/boot/dts/imx6ul-tx6ul.dtsi | 2 +- 30 files changed, 31 insertions(+), 31 deletions(-) commit 8f5f63d558b979402ae48f3df2f7bc3589531e28 Author: James Ausmus Date: Thu Oct 12 14:30:37 2017 -0700 drm/i915/bdw: Fix DP_AUX_CH_CTL_TIME_OUT setting Per BSpec, 400us is "BDW+ Do not use this setting." - not just PORT_A. Set BDW to 600us unconditionally. v2: -Split in to two patches (Rodrigo) Cc: Jani Nikula Cc: Ville Syrjälä Signed-off-by: James Ausmus Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20171012213037.4245-2-james.ausmus@intel.com drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fa228ba96f8c35de2f1ec9eabaa45d3865b1d0c Author: James Ausmus Date: Thu Oct 12 14:30:36 2017 -0700 drm/i915: Fix DP_AUX_CH_CTL_TIME_OUT naming Rename DP_AUX_CH_CTL_TIME_OUT_1600us to DP_AUX_CH_CTL_TIME_OUT_MAX, as the meaning of the (3 << 26) value varies per platform, but it's always the maximum timeout for that platform. Pre-CNL it means 1600us, and for CNL it means 3200us. v2: -Split in to two patches (Rodrigo) Cc: Rodrigo Vivi Signed-off-by: James Ausmus Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20171012213037.4245-1-james.ausmus@intel.com drivers/gpu/drm/i915/i915_reg.h | 2 +- drivers/gpu/drm/i915/intel_dp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2944fd27d1c0e3f8d89287c2d41e7aa640b68d65 Author: Johan Hovold Date: Thu Oct 12 17:22:28 2017 +0200 USB: serial: drop unused core USB driver Drop the usb-serial-core USB driver that was registered at module init but then never used. This was a remnant dating back to 2004 (!) when this struct usb_driver was used for the generic driver; see commit bbc53b7d7322 ("USB: fix bug where removing usb-serial modules or usb serial devices could oops") in the tglx bitkeeper-history archive. Note that every usb-serial driver (including the generic one) registers its own USB (interface) driver along with its usb-serial bus drivers. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/usb-serial.c | 22 ---------------------- 1 file changed, 22 deletions(-) commit ee13a25fc355650b3acf43857b7a496eb6b07f0b Author: Johan Hovold Date: Thu Oct 12 10:54:23 2017 +0200 USB: serial: metro-usb: add missing interrupt-out endpoint check One class of "unidirectional" devices managed by this driver uses an interrupt-out endpoint to send control messages at open and close. Due to a missing endpoint sanity check, this could result in an interrupt URB being submitted to endpoint 0 instead. This would be caught by USB core (without a WARN dump), but let's verify that the expected endpoints are present at probe rather than when a port is later opened. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/metro-usb.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 6f792f471fad3ed16aca9ccedacdcd48fbedf7a9 Author: Johan Hovold Date: Thu Oct 12 10:54:22 2017 +0200 USB: serial: metro-usb: simplify endpoint check Let usb-serial core verify that the interrupt-in endpoint is present when binding the interface instead of the driver verifying this at every open. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/metro-usb.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 2339536d229df25c71c0900fc619289229bfecf6 Author: Johan Hovold Date: Thu Oct 12 10:54:21 2017 +0200 USB: serial: metro-usb: stop I/O after failed open Make sure to kill the interrupt-in URB after a failed open request. Apart from saving power (and avoiding stale input after a later successful open), this also prevents a NULL-deref in the completion handler if the port is manually unbound. Reviewed-by: Greg Kroah-Hartman Fixes: 704577861d5e ("USB: serial: metro-usb: get data from device in Uni-Directional mode.") Cc: stable # 3.5 Signed-off-by: Johan Hovold drivers/usb/serial/metro-usb.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 972805c137ea1888a8e754b61f7ecdafaad765ed Merge: d0f6d40 019114e Author: Dave Airlie Date: Fri Oct 13 17:33:07 2017 +1000 Merge tag 'omapdrm-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next omapdrm changes for 4.15 * OMAP4 HDMI CEC support * tag 'omapdrm-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: omapdrm: omapdss_hdmi_ops: add lost_hotplug op omapdrm: hdmi4: hook up the HDMI CEC support omapdrm: hdmi4_cec: add OMAP4 HDMI CEC support omapdrm: hdmi4: refcount hdmi_power_on/off_core omapdrm: hdmi4: move hdmi4_core_powerdown_disable to hdmi_power_on_core() omapdrm: hdmi4: prepare irq handling for HDMI CEC support omapdrm: hdmi4: make low-level functions available omapdrm: hdmi.h: extend hdmi_core_data with CEC fields omapdrm: encoder-tpd12s015: keep ls_oe_gpio high commit 24ea78a09f8948484e466474c038411a926f670f Author: Chen-Yu Tsai Date: Thu Oct 12 16:37:05 2017 +0800 clk: sunxi-ng: sun8i: a23: Use sigma-delta modulation for audio PLL The audio blocks require specific clock rates. Until now we were using the closest clock rate possible with integer N-M factors. This resulted in audio playback being slightly slower than it should be. The vendor kernel gets around this (for newer SoCs) by using sigma-delta modulation to generate a fractional-N factor. As the PLL hardware is identical in most chips, we can back port the settings from the newer SoC, in this case the H3, onto the A23. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-a23.c | 38 ++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 13 deletions(-) commit ee6501d69217a887cb496c42ff97ba43adff4ab1 Author: Chen-Yu Tsai Date: Thu Oct 12 16:37:04 2017 +0800 clk: sunxi-ng: sun6i: Use sigma-delta modulation for audio PLL The audio blocks require specific clock rates. Until now we were using the closest clock rate possible with integer N-M factors. This resulted in audio playback being slightly slower than it should be. The vendor kernel gets around this (for newer SoCs) by using sigma-delta modulation to generate a fractional-N factor. As the PLL hardware is identical in most chips, we can back port the settings from the newer SoC, in this case the H3, onto the A31. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 38 ++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 13 deletions(-) commit 042f7f8f9715096abce42b944d4a23b0e3c31521 Author: Chen-Yu Tsai Date: Thu Oct 12 16:37:03 2017 +0800 clk: sunxi-ng: sun5i: Use sigma-delta modulation for audio PLL The audio blocks require specific clock rates. Until now we were using the closest clock rate possible with integer N-M factors. This resulted in audio playback being slightly slower than it should be. The vendor kernel gets around this (for newer SoCs) by using sigma-delta modulation to generate a fractional-N factor. As the PLL hardware is identical in most chips, we can back port the settings from the newer SoC, in this case the H3, onto the sun5i family. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun5i.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit de344851919493033cdaa5736b2bfbcb05b50038 Author: Chen-Yu Tsai Date: Thu Oct 12 16:37:02 2017 +0800 clk: sunxi-ng: sun4i: Use sigma-delta modulation for audio PLL The audio blocks require specific clock rates. Until now we were using the closest clock rate possible with integer N-M factors. This resulted in audio playback being slightly slower than it should be. The vendor kernel gets around this (for newer SoCs) by using sigma-delta modulation to generate a fractional-N factor. As the PLL hardware is identical in most chips, we can back port the settings from the newer SoC, in this case the H3, onto the A10 and A20. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun4i-a10.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit a5e3e2b2ef85efe213c19b4911042bc2937a1aa6 Author: Chen-Yu Tsai Date: Thu Oct 12 16:37:01 2017 +0800 clk: sunxi-ng: sun8i: h3: Use sigma-delta modulation for audio PLL The audio blocks require specific clock rates. Until now we were using the closest clock rate possible with integer N-M factors. This resulted in audio playback being slightly slower than it should be. The vendor kernel gets around this (for newer SoCs) by using sigma-delta modulation to generate a fractional-N factor. This patch copies the parameters for the H3. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 38 ++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) commit 392ba5fafcdf1969d1abd9a637cc40c45f4781bc Author: Chen-Yu Tsai Date: Thu Oct 12 16:37:00 2017 +0800 clk: sunxi-ng: nm: Add support for sigma-delta modulation Some of the N-M-style clocks, namely the PLLs, support sigma-delta modulation to do fractional-N frequency synthesis. This is used in the audio PLL to generate the exact frequency the audio blocks need. These frequencies can not be generated with integer N-M factors. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_nm.c | 22 +++++++++++++++++++++- drivers/clk/sunxi-ng/ccu_nm.h | 25 +++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) commit 05d2eaac96d4284b0967cc522ad22f6f23fdf82a Author: Chen-Yu Tsai Date: Thu Oct 12 16:36:59 2017 +0800 clk: sunxi-ng: Add sigma-delta modulation support Sigma-delta modulation is supported for some PLLs. This allows fractional-N multipliers to be used. In reality we don't know how to configure the individual settings for it. However we can copy existing settings from the vendor kernel to support clock rates that cannot be generated from integer factors, but are really desired. The vendor kernel only uses this for the audio PLL clock, and only on the latest chips. This patch adds a new class of clocks, along with helper functions. It is intended to be merged into N-M-factor style clocks as a feature, much like fractional clocks. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu_common.h | 1 + drivers/clk/sunxi-ng/ccu_sdm.c | 158 ++++++++++++++++++++++++++++++++++++++ drivers/clk/sunxi-ng/ccu_sdm.h | 80 +++++++++++++++++++ 4 files changed, 240 insertions(+) commit 4cdbc40d64d4b8303a97e29a52862e4d99502beb Author: Chen-Yu Tsai Date: Thu Oct 12 16:36:58 2017 +0800 clk: sunxi-ng: nm: Check if requested rate is supported by fractional clock The round_rate callback for N-M-factor style clocks does not check if the requested clock rate is supported by the fractional clock mode. While this doesn't affect usage in practice, since the clock rates are also supported through N-M factors, it does not match the set_rate code. Add a check to the round_rate callback so it matches the set_rate callback. Fixes: 6174a1e24b0d ("clk: sunxi-ng: Add N-M-factor clock support") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_nm.c | 3 +++ 1 file changed, 3 insertions(+) commit d51fe3ba9773c8b6fc79f82bbe75d64baf604292 Author: Chen-Yu Tsai Date: Thu Oct 12 16:36:57 2017 +0800 clk: sunxi-ng: sun5i: Fix bit offset of audio PLL post-divider The post-divider for the audio PLL is in bits [29:26], as specified in the user manual, not [19:16] as currently programmed in the code. The post-divider has a default register value of 2, i.e. a divider of 3. This means the clock rate fed to the audio codec would be off. This was discovered when porting sigma-delta modulation for the PLL to sun5i, which needs the post-divider to be 1. Fix the bit offset, so we do actually force the post-divider to a certain value. Fixes: 5e73761786d6 ("clk: sunxi-ng: Add sun5i CCU driver") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun5i.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c6ec770c82da96db4d0016dce393b106000dfb3d Author: Chen-Yu Tsai Date: Thu Oct 12 16:05:42 2017 +0800 ARM: dts: sun5i: reference-design-tablet: Enable AXP209 AC and battery The reference design tablet has the DC jack wired to AXP209's ACIN. As a tablet, it also has an internal LiPo battery, wired to the PMIC's battery charger. Enable both. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 333bf2e65a9ce3725ee0a35b408bc64de44ea2cb Author: Maxime Ripard Date: Thu Oct 5 09:17:28 2017 +0200 ARM: dts: sun9i: Change node names to remove underscores Some boards have had node names with underscores. Remove them in favour of hyphens in order to reduce the DTC warnings. Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 2 +- arch/arm/boot/dts/sun9i-a80-optimus.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 00a7088f9a035f8cbe6a0e6a6b7d24ef133db63d Author: Maxime Ripard Date: Thu Oct 5 09:17:40 2017 +0200 ARM: dts: sun9i: Change node names to remove underscores Some node names in the A80 DTSI still have underscores in them. Remove them in favour of hyphens to remove DTC warnings. Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 012d5f389c5b93c607305ee4894e9e48f3bcda31 Author: Maxime Ripard Date: Wed Oct 4 20:07:23 2017 +0200 ARM: dts: sun4i: Remove underscores from nodes names Some GPIO pinctrl nodes cannot be easily removed, because they would also change the pin configuration, for example to add a pull resistor or change the current delivered by the pin. Those nodes still have underscores and unit-addresses in their node names in our DTs, so adjust their name to remove the warnings. Use that occasion to also fix some poorly chosen node-names. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts | 4 ++-- arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 4 ++-- arch/arm/boot/dts/sun4i-a10-dserve-dsrv9703c.dts | 6 +++--- arch/arm/boot/dts/sun4i-a10-hyundai-a7hd.dts | 4 ++-- arch/arm/boot/dts/sun4i-a10-inet1.dts | 4 ++-- arch/arm/boot/dts/sun4i-a10-inet97fv2.dts | 4 ++-- arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts | 8 ++++---- arch/arm/boot/dts/sun4i-a10-marsboard.dts | 2 +- arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 6 +++--- arch/arm/boot/dts/sun4i-a10-pcduino.dts | 4 ++-- arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts | 6 +++--- 11 files changed, 26 insertions(+), 26 deletions(-) commit bca0d7d9ff38ac9d752a981ea187c77f7498107b Author: Maxime Ripard Date: Thu Oct 5 10:43:28 2017 +0200 ARM: dts: sun4i: Provide default muxing for relevant controllers The I2C's, MMC0 and EMAC controllers have only one muxing option in the SoC. In such a case, we can just move the muxing into the DTSI, and remove it from the DTS. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10-a1000.dts | 6 ------ arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts | 6 ------ arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts | 8 -------- arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 8 -------- arch/arm/boot/dts/sun4i-a10-dserve-dsrv9703c.dts | 8 -------- arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 6 ------ arch/arm/boot/dts/sun4i-a10-hackberry.dts | 4 ---- arch/arm/boot/dts/sun4i-a10-hyundai-a7hd.dts | 4 ---- arch/arm/boot/dts/sun4i-a10-inet1.dts | 8 -------- arch/arm/boot/dts/sun4i-a10-inet97fv2.dts | 8 -------- arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts | 8 -------- arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts | 6 ------ arch/arm/boot/dts/sun4i-a10-marsboard.dts | 10 ---------- arch/arm/boot/dts/sun4i-a10-mini-xplus.dts | 4 ---- arch/arm/boot/dts/sun4i-a10-mk802.dts | 2 -- arch/arm/boot/dts/sun4i-a10-mk802ii.dts | 4 ---- arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 8 -------- arch/arm/boot/dts/sun4i-a10-pcduino.dts | 6 ------ arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts | 8 -------- arch/arm/boot/dts/sun4i-a10.dtsi | 12 ++++++++++++ arch/arm/boot/dts/sunxi-itead-core-common.dtsi | 4 ---- 21 files changed, 12 insertions(+), 126 deletions(-) commit e53bd7618dcacf1eca3ebd1522d0e1164aa8bc4a Author: Maxime Ripard Date: Wed Oct 4 18:02:14 2017 +0200 ARM: dts: sun4i: Change pinctrl nodes to avoid warning All our pinctrl nodes were using a node name convention with a unit-address to differentiate the different muxing options. However, since those nodes didn't have a reg property, they were generating warnings in DTC. In order to accomodate for this, convert the old nodes to the syntax we've been using for the new SoCs, including removing the letter suffix of the node labels to the bank of those pins to make things more readable. Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10-a1000.dts | 12 ++--- arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts | 10 ++-- arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts | 10 ++-- arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 16 +++--- arch/arm/boot/dts/sun4i-a10-dserve-dsrv9703c.dts | 12 ++--- arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 8 +-- arch/arm/boot/dts/sun4i-a10-hackberry.dts | 8 +-- arch/arm/boot/dts/sun4i-a10-hyundai-a7hd.dts | 6 +-- arch/arm/boot/dts/sun4i-a10-inet1.dts | 12 ++--- arch/arm/boot/dts/sun4i-a10-inet97fv2.dts | 10 ++-- arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts | 10 ++-- .../boot/dts/sun4i-a10-itead-iteaduino-plus.dts | 21 +++++--- arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts | 10 ++-- arch/arm/boot/dts/sun4i-a10-marsboard.dts | 16 +++--- arch/arm/boot/dts/sun4i-a10-mini-xplus.dts | 10 ++-- arch/arm/boot/dts/sun4i-a10-mk802.dts | 4 +- arch/arm/boot/dts/sun4i-a10-mk802ii.dts | 6 +-- arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 10 ++-- arch/arm/boot/dts/sun4i-a10-pcduino.dts | 8 +-- arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts | 12 ++--- arch/arm/boot/dts/sun4i-a10.dtsi | 60 +++++++++++----------- 21 files changed, 139 insertions(+), 132 deletions(-) commit e54b911fd859acfc2b00e03223aed7afdbd1a539 Author: Madalin Bucur Date: Tue Oct 3 16:04:15 2017 +0300 arm64: dts: update the DPAA QBMan nodes Use constants in the interrupt description. Signed-off-by: Madalin Bucur Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 4 ++-- arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 4a5b479b1faf26e051fb343de7e39757f27c7a68 Author: Fabio Estevam Date: Thu Sep 28 11:25:57 2017 -0300 ARM: dts: imx25-pdk: Add touchscreen support Add support for the built-in touchscreen controller present on MX25. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx25-pdk.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2e845e5f736fb724edcb258edd0d6d6684a77de8 Author: Marco Franchi Date: Mon Sep 25 15:55:59 2017 -0300 ARM: imx: mach-mx31lite: Make mx31lite_map_io static The following build warning is seen with W=1: warning: no previous prototype for ‘mx31lite_map_io’ [-Wmissing-prototypes] void __init mx31lite_map_io(void) This function is only used in this file so make it "static". Signed-off-by: Marco Franchi Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-mx31lite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ea2e8ad00eeba25cf7bd656293567226bec9b67 Author: Marco Franchi Date: Mon Sep 25 15:55:58 2017 -0300 ARM: imx: cpuidle-imx5: Include "cpuidle.h" header file The following build warning is seen with W=1: warning: no previous prototype for ‘imx5_cpuidle_init’ [-Wmissing-prototypes] int __init imx5_cpuidle_init(void) Fix this warning by including "cpuidle.h". Signed-off-by: Marco Franchi Signed-off-by: Shawn Guo arch/arm/mach-imx/cpuidle-imx5.c | 1 + 1 file changed, 1 insertion(+) commit 07294a7e6eda86997e323cfb3a215d2bcbdbf453 Author: Marco Franchi Date: Mon Sep 25 15:55:57 2017 -0300 ARM: imx: 3ds-debugboard: Include "3ds_debugboard.h" header file The following build warning is seen with W=1: warning: no previous prototype for ‘mxc_expio_init’ [-Wmissing-prototypes] int __init mxc_expio_init(u32 base, u32 intr_gpio) Fix this warning by including "3ds_debugboard.h". Signed-off-by: Marco Franchi Signed-off-by: Shawn Guo arch/arm/mach-imx/3ds_debugboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa5f66c9387033e9d600df91040b35f0691dc058 Author: Marco Franchi Date: Mon Sep 25 15:55:56 2017 -0300 ARM: imx: imx31moboard: Include "board-mx31moboard.h" header file The following build warnings are seen with W=1: warning: no previous prototype for ‘mx31moboard_devboard_init’ [-Wmissing-prototypes] void __init mx31moboard_devboard_init(void) warning: no previous prototype for ‘mx31moboard_marxbot_init’ [-Wmissing-prototypes] void __init mx31moboard_marxbot_init(void) Fix these warnings by including "board-mx31moboard.h". Signed-off-by: Marco Franchi Signed-off-by: Shawn Guo arch/arm/mach-imx/mx31moboard-devboard.c | 1 + arch/arm/mach-imx/mx31moboard-marxbot.c | 1 + 2 files changed, 2 insertions(+) commit d0f6d40130ef548afb8e6ade71e12a415d29fabd Merge: 25e1a79 cccf4e3 Author: Dave Airlie Date: Fri Oct 13 16:24:59 2017 +1000 Merge tag 'drm-misc-next-2017-10-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-next More 4.15 drm-misc stuff: Cross-subsystem Changes: - bridge cleanup refactor (Benjamin Gaignard) Core Changes: - less surprising atomic iterators (Maarten), fixes an oops introduced in drm-next - better gem/fb helper docs (Noralf) - fix dma-buf rcu races (Christian König) Driver Changes: - adv7511: CEC support (Hans Verkuil) - sun4i update from Chen-Yu to improve hdmi and A31 support - sii8620: add remote control support (Maceiej Purski) New drivers: - SiI9234 bridge driver (Maciej Purski) - 7" rpi touch panel (Eric Anholt) Note that this contains a topic pull from regmap, needed by the sun4i changes. Mark Brown sent that out for pulling into drm-misc. * tag 'drm-misc-next-2017-10-12' of git://anongit.freedesktop.org/drm/drm-misc: (29 commits) drm/dp: WARN about invalid/unknown link rates and bw codes drm/msm/mdp5: remove less than 0 comparison for unsigned value drm/bridge/sii8620: add remote control support drm/sun4i: hdmi: Add support for A31's HDMI controller drm/sun4i: hdmi: Add A31 specific DDC register definitions drm/sun4i: hdmi: Add support for controller hardware variants dt-bindings: display: sun4i: Add binding for A31 HDMI controller drm/sun4i: hdmi: Allow using second PLL as TMDS clk parent drm/sun4i: hdmi: create a regmap for later use drm/sun4i: hdmi: Disable clks in bind function error path and unbind function drm/sun4i: tcon: Add support for demuxing TCON output on A31 drm/sun4i: tcon: Add variant callback for TCON output muxing drm/bridge/synopsys: dsi :remove is_panel_bridge drm/vc4: remove bridge from driver internal structure drm/stm: ltdc: remove bridge from driver internal structure drm/drm_of: add drm_of_panel_bridge_remove function drm/bridge: make drm_panel_bridge_remove more robust dma-fence: fix dma_fence_get_rcu_safe v2 dma-buf: make reservation_object_copy_fences rcu save drm/atomic: Unref duplicated drm_atomic_state in drm_atomic_helper_resume() ... commit 2d0d21c12dfa3851620f1fa9fe2d444538f1fad4 Author: Florian Westphal Date: Thu Oct 12 11:11:22 2017 +0200 selftests: rtnetlink: add a small macsec test case Signed-off-by: Florian Westphal Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller tools/testing/selftests/net/rtnetlink.sh | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit ab104615e01c2c4cbe9ea4073a430d51f6547dd2 Author: Geert Uytterhoeven Date: Thu Oct 12 10:24:53 2017 +0200 ravb: Consolidate clock handling The module clock is used for two purposes: - Wake-on-LAN (WoL), which is optional, - gPTP Timer Increment (GTI) configuration, which is mandatory. As the clock is needed for GTI configuration anyway, WoL is always available. Hence remove duplication and repeated obtaining of the clock by making GTI use the stored clock for WoL use. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 35 +++++++++----------------------- 1 file changed, 10 insertions(+), 25 deletions(-) commit c669b5cf42d0b066ced7ab70e7cf15e2155acb2c Merge: 32c10bb 12acd13 Author: David S. Miller Date: Thu Oct 12 22:59:38 2017 -0700 Merge branch 'net-support-bgmac-with-B50212E-B1-PHY' Rafał Miłecki says: ==================== net: support bgmac with B50212E B1 PHY I got a report that a board with BCM47189 SoC and B50212E B1 PHY doesn't work well some devices as there is massive ping loss. After analyzing PHY state it has appeared that is runs in slave mode and doesn't auto switch to master properly when needed. This patchset fixes this by: 1) Adding new flag support to the PHY driver for setting master mode 2) Modifying bgmac to request master mode for reported hardware ==================== Signed-off-by: David S. Miller commit 12acd136913ccdf394eeb2bc8686ff5505368119 Author: Rafał Miłecki Date: Thu Oct 12 10:21:26 2017 +0200 net: bgmac: enable master mode for BCM54210E and B50212E PHYs There are 4 very similar PHYs: 0x600d84a1: BCM54210E (rev B0) 0x600d84a2: BCM54210E (rev B1) 0x600d84a5: B50212E (rev B0) 0x600d84a6: B50212E (rev B1) that need setting master mode manually. It's because they run in slave mode by default with Automatic Slave/Master configuration disabled which can lead to unreliable connection with massive ping loss. So far it was reported for a board with BCM47189 SoC and B50212E B1 PHY connected to the bgmac supported ethernet device. Telling PHY driver to setup PHY properly solves this issue. Signed-off-by: Rafał Miłecki Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac-bcma.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 2355a6546a053b1c16ebefd6ce1f0cccc00e1da5 Author: Rafał Miłecki Date: Thu Oct 12 10:21:25 2017 +0200 net: phy: broadcom: support new device flag for setting master mode Some of Broadcom's PHYs run by default in slave mode with Automatic Slave/Master configuration disabled. It stops them from working properly with some devices. So far it has been verified for BCM54210E and BCM50212E which don't work well with Intel's I217-LM and I218-LM: http://ark.intel.com/products/60019/Intel-Ethernet-Connection-I217-LM http://ark.intel.com/products/71307/Intel-Ethernet-Connection-I218-LM I was told there is massive ping loss. This commit adds support for a new flag which can be set by an ethernet driver to fixup PHY setup. Signed-off-by: Rafał Miłecki Signed-off-by: David S. Miller drivers/net/phy/broadcom.c | 6 ++++++ include/linux/brcmphy.h | 1 + 2 files changed, 7 insertions(+) commit 32c10bbfe914c76d8802be33c97b59be9582df1b Author: Mahesh Bandewar Date: Wed Oct 11 17:16:26 2017 -0700 ipvlan: always use the current L2 addr of the master If the underlying master ever changes its L2 (e.g. bonding device), then make sure that the IPvlan slaves always emit packets with the current L2 of the master instead of the stale mac addr which was copied during the device creation. The problem can be seen with following script - #!/bin/bash # Create a vEth pair ip link add dev veth0 type veth peer name veth1 ip link set veth0 up ip link set veth1 up ip link show veth0 ip link show veth1 # Create an IPvlan device on one end of this vEth pair. ip link add link veth0 dev ipvl0 type ipvlan mode l2 ip link show ipvl0 # Change the mac-address of the vEth master. ip link set veth0 address 02:11:22:33:44:55 Fixes: 2ad7bf363841 ("ipvlan: Initial check-in of the IPVLAN driver.") Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/ipvlan/ipvlan_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 127a1bea40f7f2a36bc7207ea4d51bb6b4e936fa Author: Steven Rostedt (VMware) Date: Thu Oct 12 18:06:19 2017 -0400 x86/fpu/debug: Remove unused 'x86_fpu_state' and 'x86_fpu_deactivate_state' tracepoints Commit: d1898b733619 ("x86/fpu: Add tracepoints to dump FPU state at key points") ... added the 'x86_fpu_state' and 'x86_fpu_deactivate_state' trace points, but never used them. Today they are still not used. As they take up and waste memory, remove them. Signed-off-by: Steven Rostedt (VMware) Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171012180619.670b68b6@gandalf.local.home Signed-off-by: Ingo Molnar arch/x86/include/asm/trace/fpu.h | 10 ---------- 1 file changed, 10 deletions(-) commit 743b8bb6a247c1aed3f86c144786e778adb65e3a Merge: ed7f262 aa9fd9a Author: David S. Miller Date: Thu Oct 12 22:23:03 2017 -0700 Merge branch 'act-ife-misc' Alexander Aring says: ==================== sched: act: ife: UAPI checks and performance tweaks this patch series contains at first a patch which adds a check for IFE_ENCODE and IFE_DECODE when a ife act gets created or updated and adding handling of these cases only inside the act callback only. The second patch use per-cpu counters and move the spinlock around so that the spinlock is less being held in act callback. The last patch use rcu for update parameters and also move the spinlock for the same purpose as in patch 2. Notes: - There is still a spinlock around for protecting the metalist and a rw-lock for another list. Should be migrated to a rcu list, ife possible. - I use still dereference in dump callback, so I think what I didn't got was what happened when rcu_assign_pointer will do when rcu read lock is held. I suppose the pointer will be updated, then we don't have any issue here. ==================== Signed-off-by: David S. Miller commit aa9fd9a325d51fa0b11153b03b8fefff569fa955 Author: Alexander Aring Date: Wed Oct 11 17:16:08 2017 -0400 sched: act: ife: update parameters via rcu handling This patch changes the parameter updating via RCU and not protected by a spinlock anymore. This reduce the time that the spinlock is being held. Signed-off-by: Alexander Aring Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/net/tc_act/tc_ife.h | 10 ++++-- net/sched/act_ife.c | 87 ++++++++++++++++++++++++++++++--------------- 2 files changed, 67 insertions(+), 30 deletions(-) commit ced273eacfe1876e2c3c4ea1244a2e386e20eadb Author: Alexander Aring Date: Wed Oct 11 17:16:07 2017 -0400 sched: act: ife: migrate to use per-cpu counters This patch migrates the current counter handling which is protected by a spinlock to a per-cpu counter handling. This reduce the time where the spinlock is being held. Signed-off-by: Alexander Aring Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_ife.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) commit 734534e9a8e537d33d3598fa03b98eb089819961 Author: Alexander Aring Date: Wed Oct 11 17:16:06 2017 -0400 sched: act: ife: move encode/decode check to init This patch adds the check of the two possible ife handlings encode and decode to the init callback. The decode value is for usability aspect and used in userspace code only. The current code offers encode else decode only. This patch avoids any other option than this. Signed-off-by: Alexander Aring Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_ife.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit ed7f26223bb65d421cf3932de0d94c1cec4e1543 Merge: 47f2546 d3f24ba Author: David S. Miller Date: Thu Oct 12 22:13:20 2017 -0700 Merge branch 'net-sched-fix-IFE-meta-modules-loading' Roman Mashak says: ==================== net: sched: Fix IFE meta modules loading Adjust module alias names of IFE meta modules and fix the bug that prevented auto-loading IFE modules in run-time. ==================== Signed-off-by: David S. Miller commit d3f24ba895f0bbbc8ab0ecb03de7daa6eccc7ceb Author: Roman Mashak Date: Wed Oct 11 10:50:30 2017 -0400 net sched actions: fix module auto-loading Macro __stringify_1() can stringify a macro argument, however IFE_META_* are enums, so they never expand, however request_module expects an integer in IFE module name, so as a result it always fails to auto-load. Fixes: ef6980b6becb ("introduce IFE action") Signed-off-by: Roman Mashak Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_ife.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 8f04748016f3b583e675e0f649d42cfc10812a8b Author: Roman Mashak Date: Wed Oct 11 10:50:29 2017 -0400 net sched actions: change IFE modules alias names Make style of module alias name consistent with other subsystems in kernel, for example net devices. Fixes: 084e2f6566d2 ("Support to encoding decoding skb mark on IFE action") Fixes: 200e10f46936 ("Support to encoding decoding skb prio on IFE action") Fixes: 408fbc22ef1e ("net sched ife action: Introduce skb tcindex metadata encap decap") Signed-off-by: Roman Mashak Signed-off-by: David S. Miller include/net/tc_act/tc_ife.h | 2 +- net/sched/act_ife.c | 2 +- net/sched/act_meta_mark.c | 2 +- net/sched/act_meta_skbprio.c | 2 +- net/sched/act_meta_skbtcindex.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit df5cc9d0b42d15fa33b30440cca7a11ca7ba35a4 Author: Marco Franchi Date: Thu Sep 21 15:10:10 2017 -0300 ARM: dts: imx6qdl: Remove leading zeroes from unit addresses The following build warnings are seen with W=1: Warning (simple_bus_reg): Node /soc/sram@00900000 simple-bus unit address format error, expected "900000" Warning (simple_bus_reg): Node /soc/aips-bus@02000000 simple-bus unit address format error, expected "2000000" Warning (simple_bus_reg): Node /soc/aips-bus@02000000/pxp@020f0000 simple-bus unit address format error, expected "20f0000" (...) Remove the leading zeroes from unit addresses to fix the warnings. Signed-off-by: Marco Franchi Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl.dtsi | 16 ++-- arch/arm/boot/dts/imx6q.dtsi | 16 ++-- arch/arm/boot/dts/imx6qdl.dtsi | 178 ++++++++++++++++++++--------------------- arch/arm/boot/dts/imx6qp.dtsi | 2 +- 4 files changed, 106 insertions(+), 106 deletions(-) commit efb9adb274754e82f5143ee06d6337f247295176 Author: Marco Franchi Date: Thu Sep 21 14:01:25 2017 -0300 ARM: dts: imx6ul: Remove leading zeroes from unit addresses The following build warnings are seen with W=1: Warning (unit_address_format): Node /interrupt-controller@00a01000 unit name should not have leading 0s Warning (simple_bus_reg): Node /soc/sram@00900000 simple-bus unit address format error, expected "900000" Warning (simple_bus_reg): Node /soc/dma-apbh@01804000 simple-bus unit address format error, expected "1804000" (...) Remove the leading zeroes from unit addresses to fix the warnings. Signed-off-by: Marco Franchi Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6ul.dtsi | 142 +++++++++++++++++++++--------------------- 1 file changed, 71 insertions(+), 71 deletions(-) commit 3d208992d92148941b66fe7756140383d40c66f9 Author: Christopher Spinrath Date: Wed Sep 20 18:48:34 2017 +0200 ARM: dts: imx6q-utilite-pro: add HDMI CEC pinctrl On the Utilite Pro the CEC line is wired up to the HDMI connector. Add the required pinctrl setting. Signed-off-by: Christopher Spinrath Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-utilite-pro.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit a8ca183dc8c4e98980007ed8b8ccc7992cbad4ea Author: Fabio Estevam Date: Wed Sep 20 10:56:10 2017 -0300 ARM: imx_v6_v7_defconfig: Select the CEC driver Select CONFIG_DRM_DW_HDMI_CEC option, so that the CEC driver can be loaded 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 12ce81e9486518c3be84cac150bdb938ed37c217 Author: Fabio Estevam Date: Wed Sep 20 10:56:09 2017 -0300 ARM: dts: imx6qdl-sabresd: Add CEC support HDMI_TX_CEC_LINE pin is used for CEC, so pass it in the device tree. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 46c7ec9fc704c96e42a4a661d0f247d9bedca070 Author: Fabio Estevam Date: Wed Sep 20 10:56:08 2017 -0300 ARM: dts: imx6qdl-sabresd: Use the 'vpcie-supply' property Since commit c26ebe98a103 ("PCI: imx6: Add regulator support"), it is possible to pass the 'vpcie-supply' property to describe the PCIE supply. This way we can remove the 'regulator-always-on' property from the regulator and have a better device tree description. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ec7a7d3370cec2fcd5edc1f247c76e344eccc40 Author: Jagan Teki Date: Mon Sep 18 16:58:33 2017 +0530 ARM: dts: imx6qdl-icore-rqs: Add CAN nodes Add support for can1 and can2 nodes on Engicam i.CoreM6 RQS QDL module boards. Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit c983a9137eca90be7639bc1d667132f6759513d4 Author: Jagan Teki Date: Mon Sep 18 16:58:32 2017 +0530 ARM: dts: imx6dl-icore: Add touchscreen node max11801 touchscreen on Engicam iCoreM6 DualLite/Solo module is connected via i2c1, so add max11801: touchscreen@48 on i2c1. Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6dl-icore.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit b5307edb16df828a304856883921cdac4b1302fe Author: Jagan Teki Date: Mon Sep 18 16:58:31 2017 +0530 ARM: dts: imx6qdl-icore-rqs: Switch to use simple-audio-card This patch replace fsl,imx-audio-sgtl5000 and use simple-audio-card for Engicam i.CoreM6 RQS QDL platform boards. This patch also fix, pinctrl_adumux. Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi | 60 +++++++++++++++++++++++++------- arch/arm/boot/dts/imx6qdl-icore.dtsi | 4 +-- 2 files changed, 50 insertions(+), 14 deletions(-) commit 4f0c2c754e4cdf5f40a1978c18abcc602e196618 Author: Jagan Teki Date: Mon Sep 18 16:58:30 2017 +0530 ARM: dts: imx6qdl-icore-rqs: Move Sound nodes to dtsi imx6q, imx6dl icore-rqs modules share common sound nodes, so move the sound nodes from imx6q-icore-rqs into dtsi so-that both can share the common node details. And also replace codec: sgtl5000@0a => sgtl5000: codec@a on imx6q-icore-rqs.dts to [label:] node-name[@unit-address] according to devicetree specification from ePAPER v1.1 Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6q-icore-rqs.dts | 24 ------------------------ arch/arm/boot/dts/imx6qdl-icore-rqs.dtsi | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 24 deletions(-) commit bf04a32b4366949558b0bcab735fa577e434aeae Author: Jagan Teki Date: Mon Sep 18 16:58:29 2017 +0530 ARM: dts: imx6qdl-icore: Add Sound card support Linux Sound card now uses generic simple-audio-card, so add the same along with related audmux and codec(via u2c3) for i.CoreM6 QDL module boards. Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-icore.dtsi | 97 ++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit 479b9db27453aea42bfad92e9466135ae063f326 Author: Arnd Bergmann Date: Thu Oct 5 14:09:39 2017 +0200 drm/rockchip: add PINCTRL dependency for LVDS The new driver fails to build when CONFIG_PINCTRL is disabled: drivers/gpu/drm/rockchip/rockchip_lvds.c: In function 'rockchip_lvds_grf_config': drivers/gpu/drm/rockchip/rockchip_lvds.c:229:39: error: dereferencing pointer to incomplete type 'struct dev_pin_info' if (lvds->pins && !IS_ERR(lvds->pins->default_state)) This adds the respective Kconfig dependency. Fixes: 34cc0aa25456 ("drm/rockchip: Add support for Rockchip Soc LVDS") Signed-off-by: Arnd Bergmann Acked-by: Mark Yao Signed-off-by: Mark Yao Link: https://patchwork.freedesktop.org/patch/msgid/20171005120957.485433-1-arnd@arndb.de drivers/gpu/drm/rockchip/Kconfig | 1 + 1 file changed, 1 insertion(+) commit d6e18b8295593d8f59e92f6634577cbacae14629 Author: Axel Lin Date: Fri Oct 13 09:21:01 2017 +0800 ASoC: max98925: Return proper error if revision mismatch Return proper error instead of 0 if the revision does not match. Signed-off-by: Axel Lin Signed-off-by: Mark Brown sound/soc/codecs/max98925.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 25e1a79874eb3821d93310c908cc0a81b47af060 Author: Arnd Bergmann Date: Wed Oct 11 17:20:13 2017 +0200 drm: vblank: remove drm_timestamp_monotonic parameter There is a risk of overflowing vblank timestamps in 2038 or 2106 if someone sets the drm_timestamp_monotonic module parameter to zero. I found no indication of anyone ever setting the parameter, or complaining about the default being wrong, after it was introduced as a way to handle backwards-compatibility with linux prior to c61eef726a78 ("drm: add support for monotonic vblank timestamps"), so it's probably safer to just remove the parameter completely and only allowing the default behavior. Signed-off-by: Arnd Bergmann Acked-by: Daniel Stone Signed-off-by: Dave Airlie drivers/gpu/drm/drm_internal.h | 1 - drivers/gpu/drm/drm_ioctl.c | 2 +- drivers/gpu/drm/drm_vblank.c | 29 ++++++----------------------- 3 files changed, 7 insertions(+), 25 deletions(-) commit 67680d3c046450b3901aa4e5a9cf2f8fbd7ed9a2 Author: Arnd Bergmann Date: Wed Oct 11 17:20:12 2017 +0200 drm: vblank: use ktime_t instead of timeval The drm vblank handling uses 'timeval' to store timestamps in either monotonic or wall-clock time base. In either case, it reads the current time as a ktime_t in get_drm_timestamp() and converts it from there. This is a bit suspicious, as users of 'timeval' often suffer from the time_t overflow in y2038. I have gone through this code and found that it is unlikely to cause problems here: - The user space ABI does not use time_t or timeval, but uses 'u32' and 'long' as the types. This means at least that rebuilding user programs against a new libc with 64-bit time_t does not change the ABI. - As of commit c61eef726a78 ("drm: add support for monotonic vblank timestamps") in linux-3.8, the monotonic timestamp is the default and can only get reverted to wall-clock through a module-parameter. - With the default monotonic timestamps, there is no problem at all. - The drm_wait_vblank_ioctl() interface is alway safe on 64-bit architectures, on 32-bit it might overflow the 'long' timestamps in 2038 with wall-clock timestamps. - The event handling uses 'u32' seconds, which overflow in 2106 on both 32-bit and 64-bit machines, when wall-clock timestamps are used. - The effect of overflowing either of the two is only temporary (during the overflow, and is likely to keep working again afterwards. It is likely the same problem as observing a 'settimeofday()' call, which was the reason for moving to the monotonic timestamps in the first place. Overall, this seems good enough, so my patch removes the use of 'timeval' from the vblank handling altogether and uses ktime_t consistently, except for the part where we copy the data to user space structures in the existing format. Signed-off-by: Arnd Bergmann Reviewed-by: Sean Paul Reviewed-by: Keith Packard Signed-off-by: Dave Airlie drivers/gpu/drm/drm_vblank.c | 123 +++++++++++++++++++++++-------------------- include/drm/drm_drv.h | 2 +- include/drm/drm_vblank.h | 6 +-- 3 files changed, 71 insertions(+), 60 deletions(-) commit 47bc227deedbcf3ac214a2d922c28dfa5e403f09 Author: Christos Gkekas Date: Thu Oct 12 23:15:54 2017 +0100 mtip32xx: Clean up unused variables Remove variables that are set but never used. Signed-off-by: Christos Gkekas Signed-off-by: Jens Axboe drivers/block/mtip32xx/mtip32xx.c | 7 ------- 1 file changed, 7 deletions(-) commit 9d7ed21ff4af20628bad39689ff946d4649472d6 Author: Alexandre Belloni Date: Fri Oct 13 00:05:29 2017 +0200 rtc: ds1511: 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-ds1511.c | 58 ++++++++++++++++++------------------------------ 1 file changed, 22 insertions(+), 36 deletions(-) commit a283d27625ffe3dadf5daece25674eab89722b6a Author: Alexandre Belloni Date: Fri Oct 13 00:05:28 2017 +0200 rtc: ds1511: allow waking platform Disabling interrupts when removing the driver is bad practice as this will prevent some platform from waking up when using that RTC. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1511.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 3032269b21fdbfc021b14d14a50bec39f9891b08 Author: Alexandre Belloni Date: Fri Oct 13 00:05:27 2017 +0200 rtc: ds1511: switch to rtc_register_device This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1511.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 9da32ba64d59d577297bf766a3f12753ebef5712 Author: Alexandre Belloni Date: Fri Oct 13 00:04:47 2017 +0200 rtc: abx80x: solve race condition There is a race condition that can happen if abx80x_probe() fails after the rtc registration succeeded. Solve that by moving the registration at the end of the probe function. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-abx80x.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 9360a6a81862d3acfeb44745d9db4f9861ba4159 Author: Alexandre Belloni Date: Fri Oct 13 00:04:46 2017 +0200 rtc: abx80x: switch to rtc_register_device This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-abx80x.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit f8033aabb23bd8b2b51e2c32ee759f860ecdd1ee Author: Alexandre Belloni Date: Fri Oct 13 00:04:21 2017 +0200 rtc: m48t86: 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-m48t86.c | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) commit 5508c72528d22805e301ecdfd3abcd85af24b0ec Author: Alexandre Belloni Date: Fri Oct 13 00:04:20 2017 +0200 rtc: m48t86: switch to rtc_register_device This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-m48t86.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 41e607f21b16ce648d629daa0349bfe4bf4cadaa Author: Alexandre Belloni Date: Fri Oct 13 00:03:23 2017 +0200 rtc: ds1305: 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-ds1305.c | 59 +++++++++++++++++------------------------------- 1 file changed, 21 insertions(+), 38 deletions(-) commit 6a4e89161e4ae4aa57eb8d4a419e7fb2cc340a13 Author: Alexandre Belloni Date: Fri Oct 13 00:03:22 2017 +0200 rtc: ds1305: switch to rtc_register_device This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1305.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 9c1477e83e629632758518cde4a039d62a1000e7 Author: Chris Wilson Date: Thu Oct 12 13:57:26 2017 +0100 drm/i915/selftests: Exercise adding requests to a full GGTT A bug recently encountered involved the issue where are we were submitting requests to different ppGTT, each would pin a segment of the GGTT for its logical context and ring. However, this is invisible to eviction as we do not tie the context/ring VMA to a request and so do not automatically wait upon it them (instead they are marked as pinned, preventing eviction entirely). Instead the eviction code must flush those contexts by switching to the kernel context. This selftest tries to fill the GGTT with contexts to exercise a path where the switch-to-kernel-context failed to make forward progress and we fail with ENOSPC. v2: Make the hole in the filled GGTT explicit. v3: Swap out the arbitrary timeout for a private notification from i915_gem_evict_something() Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20171012125726.14736-3-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_evict.c | 7 + drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 154 +++++++++++++++++++++ .../gpu/drm/i915/selftests/i915_live_selftests.h | 1 + drivers/gpu/drm/i915/selftests/mock_context.c | 6 +- 4 files changed, 163 insertions(+), 5 deletions(-) commit 214707fc2ce08d09982bc4fe4b7a1c1f010e82be Author: Chris Wilson Date: Thu Oct 12 13:57:25 2017 +0100 drm/i915/selftests: Wrap a timer into a i915_sw_fence For some selftests, we want to issue requests but delay them going to hardware. Furthermore, we don't want those requests to block indefinitely (or else we may hang the driver and block testing) so we want to employ a timeout. So naturally we want a fence that is automatically signaled by a timer. v2: Add kselftests. v3: Limit the API available to selftests; there isn't an overwhelming reason to export it universally. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20171012125726.14736-2-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_sw_fence.c | 10 ++++ drivers/gpu/drm/i915/selftests/i915_sw_fence.c | 42 ++++++++++++++ drivers/gpu/drm/i915/selftests/lib_sw_fence.c | 78 ++++++++++++++++++++++++++ drivers/gpu/drm/i915/selftests/lib_sw_fence.h | 42 ++++++++++++++ 4 files changed, 172 insertions(+) commit 55b4f1ce2f23692c57205b9974fba61baa4b9321 Author: Chris Wilson Date: Thu Oct 12 13:57:24 2017 +0100 drm/i915: Fix eviction when the GGTT is idle but full In the full-ppgtt world, we can fill the GGTT full of context objects. These context objects are currently implicitly tracked by the requests that pin them i.e. they are only unpinned when the request is completed and retired, but we do not have the link from the vma to the request (anymore). In order to unpin those contexts, we have to issue another request and wait upon the switch to the kernel context. The bug during eviction was that we assumed that a full GGTT meant we would have requests on the GGTT timeline, and so we missed situations where those requests where merely in flight (and when even they have not yet been submitted to hw yet). The fix employed here is to change the already-is-idle test to no look at the execution timeline, but count the outstanding requests and then check that we have switched to the kernel context. Erring on the side of overkill here just means that we stall a little longer than may be strictly required, but we only expect to hit this path in extreme corner cases where returning an erroneous error is worse than the delay. v2: Logical inversion when swapping over branches. Fixes: 80b204bce8f2 ("drm/i915: Enable multiple timelines") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20171012125726.14736-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_evict.c | 63 ++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 24 deletions(-) commit 47f25464122bd7aebba35bfb0a26ee24d8026885 Author: Christos Gkekas Date: Wed Oct 11 20:26:58 2017 +0100 vxge: Clean up unused variables in vxge-traffic Delete unused channel variables in vxge-traffic. Signed-off-by: Christos Gkekas Signed-off-by: David S. Miller drivers/net/ethernet/neterion/vxge/vxge-traffic.c | 19 ------------------- 1 file changed, 19 deletions(-) commit ad2d116c5242875bba27522682ec5ba7f0df75f0 Author: Florian Fainelli Date: Wed Oct 11 11:14:49 2017 -0700 sched: tc_mirred: Remove whitespaces This file contains unnecessary whitespaces as newlines, remove them, found by looking at what struct tc_mirred looks like. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller include/uapi/linux/tc_act/tc_mirred.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0eb16f82ecd40d4ce344ec882d6fb5c330f8ef39 Author: Arnd Bergmann Date: Wed Oct 11 15:55:31 2017 +0200 ip_tunnel: fix building with NET_IP_TUNNEL=m When af_mpls is built-in but the tunnel support is a module, we get a link failure: net/mpls/af_mpls.o: In function `mpls_init': af_mpls.c:(.init.text+0xdc): undefined reference to `ip_tunnel_encap_add_ops' This adds a Kconfig statement to prevent the broken configuration and force mpls to be a module as well in this case. Fixes: bdc476413dcd ("ip_tunnel: add mpls over gre support") Signed-off-by: Arnd Bergmann Acked-by: Amine Kherbouche Signed-off-by: David S. Miller net/mpls/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 08b49b9405b3c347475b334818c6d0a911a4f563 Merge: d71a756 43e2ada Author: David S. Miller Date: Thu Oct 12 12:20:27 2017 -0700 Merge branch 'smc-ib_query_gid' Ursula Braun says: ==================== net/smc: ib_query_gid() patches triggered by Parav Pandit here are 2 cleanup patches for usage of ib_query_gid() in the smc-code. Thanks, Ursula v2 changes advised by Parav Pandit: extra check is_vlan_dev() in patch 2/2 "RoCE" spelling added "Reported-by" added "Reviewed-by" added "Fixes" ==================== Signed-off-by: David S. Miller commit 43e2ada3e06aefe3596be75bd05b34ef14fd1f7c Author: Ursula Braun Date: Wed Oct 11 13:47:23 2017 +0200 net/smc: dev_put for netdev after usage of ib_query_gid() For RoCEs ib_query_gid() takes a reference count on the net_device. This reference count must be decreased by the caller. Signed-off-by: Ursula Braun Reported-by: Parav Pandit Reviewed-by: Parav Pandit Fixes: 0cfdd8f92cac ("smc: connection and link group creation") Signed-off-by: David S. Miller net/smc/smc_core.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit d921c420d2efa5731011b922e5a2f2ad33203c0b Author: Ursula Braun Date: Wed Oct 11 13:47:22 2017 +0200 net/smc: replace function pointer get_netdev() SMC should not open code the function pointer get_netdev of the IB device. Replacing ib_query_gid(..., NULL) with ib_query_gid(..., gid_attr) allows access to the netdev. Signed-off-by: Ursula Braun Suggested-by: Parav Pandit Reviewed-by: Parav Pandit Signed-off-by: David S. Miller net/smc/smc_ib.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) commit d71a756ad542c013e3ed5348db89f43ad105392e Merge: 3f7832c 723934f Author: David S. Miller Date: Thu Oct 12 12:10:02 2017 -0700 Merge branch 'dsa-ACB-for-bcm_sf2-and-bcmsysport' Florian Fainelli says: ==================== Enable ACB for bcm_sf2 and bcmsysport This patch series enables Broadcom's Advanced Congestion Buffering mechanism which requires cooperation between the CPU/Management Ethernet MAC controller and the switch. I took the notifier approach because ultimately the information we need to carry to the master network device is DSA specific and I saw little room for generalizing beyond what DSA requires. Chances are that this is highly specific to the Broadcom HW as I don't know of any HW out there that supports something nearly similar for similar or identical needs. ==================== Signed-off-by: David S. Miller commit 723934fb792f2dbc76ee3ac334fcde95136bf409 Author: Florian Fainelli Date: Wed Oct 11 10:57:52 2017 -0700 net: systemport: Turn on ACB at the SYSTEMPORT level Now that we have established the queue mapping between the switch port egress queues and the SYSTEMPORT egress queues, we can turn on Advanced Congestion Buffering (ACB) at the SYSTEMPORT level. This enables the Ethernet MAC controller to get out of band flow control information directly from the switch port and queue that it monitors such that its internal TDMA can be appropriately backpressured. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 32e47ff0cd236d5fcab8ffcce85d1dcded663f61 Author: Florian Fainelli Date: Wed Oct 11 10:57:51 2017 -0700 net: dsa: bcm_sf2: Turn on ACB at the switch level Turn on the out of band Advanced Congestion Buffering (ACB) mechanism at the switch level now that we have properly established the queue mapping between the switch egress queues and the SYSTEMPORT egress queues. This allows the switch to correctly backpressure the host system when one of its queue drops below the configured thresholds. This is also helping achieve so called "lossless" behavior by adapting the TX interrupt pacing to the actual speed and capacity of the switch port. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 30 ++++++++++++++++++++++++++++++ drivers/net/dsa/bcm_sf2_regs.h | 23 +++++++++++++++++++++++ 2 files changed, 53 insertions(+) commit d156576362c07e954dc36e07b0d7b0733a010f7d Author: Florian Fainelli Date: Wed Oct 11 10:57:50 2017 -0700 net: systemport: Establish lower/upper queue mapping Establish a queue mapping between the DSA slave network device queues created that correspond to switch port queues, and the transmit queue that SYSTEMPORT manages. We need to configure the SYSTEMPORT transmit queue with the switch port number and switch port queue number in order for the switch and SYSTEMPORT hardware to utilize the out of band congestion notification. This hardware mechanism works by looking at the switch port egress queue and determines whether there is enough buffers for this queue, with that class of service for a successful transmission and if not, backpressures the SYSTEMPORT queue that is being used. For this to work, we implement a notifier which looks at the DSA_PORT_REGISTER event. When DSA network devices are registered, the framework calls the DSA notifiers when that happens, extracts the number of queues for these devices and their associated port number, remembers that in the driver private structure and linearly maps those queues to TX rings/queues that we manage. This scheme works because DSA slave network deviecs always transmit through SYSTEMPORT so when DSA slave network devices are destroyed/brought down, the corresponding SYSTEMPORT queues are no longer used. Also, by design of the DSA framework, the master network device (SYSTEMPORT) is registered first. For faster lookups we use an array of up to DSA_MAX_PORTS * number of queues per port, and then map pointers to bcm_sysport_tx_ring such that our ndo_select_queue() implementation can just index into that array to locate the corresponding ring index. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 115 ++++++++++++++++++++++++++++- drivers/net/ethernet/broadcom/bcmsysport.h | 11 ++- 2 files changed, 121 insertions(+), 5 deletions(-) commit 0a5f14ce67a6e093e651d3cd75e6ac281123d93a Author: Florian Fainelli Date: Wed Oct 11 10:57:49 2017 -0700 net: dsa: tag_brcm: Indicate to master netdevice port + queue We need to tell the DSA master network device doing the actual transmission what the desired switch port and queue number is for it to resolve that to the internal transmit queue it is mapped to. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 5 +++++ net/dsa/tag_brcm.c | 6 ++++++ 2 files changed, 11 insertions(+) commit 60724d4bae14cd295b27b1610cad9a2720eb0860 Author: Florian Fainelli Date: Wed Oct 11 10:57:48 2017 -0700 net: dsa: Add support for DSA specific notifiers In preparation for communicating a given DSA network device's port number and switch index, create a specialized DSA notifier and two events: DSA_PORT_REGISTER and DSA_PORT_UNREGISTER that communicate: the slave network device (slave_dev), port number and switch number in the tree. This will be later used for network device drivers like bcmsysport which needs to cooperate with its DSA network devices to set-up queue mapping and scheduling. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ net/dsa/dsa.c | 23 +++++++++++++++++++++++ net/dsa/slave.c | 13 +++++++++++++ 3 files changed, 81 insertions(+) commit 675a157c61f756affbbc2569c55dc5719342081b Author: Florian Fainelli Date: Thu Sep 28 16:15:02 2017 -0700 ARM: multi_v7_defconfig: Enable CONFIG_ARCH_BCM_HR2 Turn on Broadcom Hurrican 2 SoC support by default to get access to its drivers. Acked-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit fa1e581d02d293d4d52c6950dc083484babe09f2 Author: Florian Fainelli Date: Thu Sep 28 16:14:59 2017 -0700 ARM: debug: Add Hurricane 2 UART2 debug addresses Broadcom Hurricane 2 SoCs typically use their secondary UART for debug/console, provide a known good location for that. Acked-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/Kconfig.debug | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 04c3767f10809797331cda78808d9163939081e1 Author: Florian Fainelli Date: Thu Sep 28 16:14:57 2017 -0700 clk: bcm: Add Broadcom Hurricane 2 clock support Add support for the Broadcom Hurricane 2 SoC clock controller. We can re-use the existing iProc clock library since the SoC's architecture is largely the same as its predecessors. For now, we just initialize the iProc ARM PLL. Acked-by: Jon Mason Signed-off-by: Florian Fainelli Acked-by: Stephen Boyd Signed-off-by: Florian Fainelli drivers/clk/bcm/Kconfig | 9 +++++++++ drivers/clk/bcm/Makefile | 1 + drivers/clk/bcm/clk-hr2.c | 27 +++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) commit bc79cce741fab70968141c67974f8e99e31aec47 Author: Florian Fainelli Date: Thu Sep 28 16:15:01 2017 -0700 ARM: dts: Hurricane 2: Add basic support for Ubiquiti UniFi Switch 8 Add basic board support for the Ubiquiti UniFi Switch 8 port model. This is a small home and office use managed switch based on the BCM53342 switching control SoC. Acked-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/bcm53340-ubnt-unifi-switch8.dts | 85 +++++++++++++++++++++++ 2 files changed, 87 insertions(+) commit e6ac8fc0823f9227a6ce65481adcbdbf529acfb9 Author: Florian Fainelli Date: Thu Sep 28 16:15:00 2017 -0700 dt-bindings: Add Ubiquiti Networks vendor prefix Use the stock ticker: UBNT as the vendor prefix for Ubiquiti Networks. Acked-by: Jon Mason Signed-off-by: Florian Fainelli Acked-by: Rob Herring Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit b9099ec754b5aaa6bbc2abcfc27da8b48b3dcfd3 Author: Florian Fainelli Date: Thu Sep 28 16:14:58 2017 -0700 ARM: dts: Add Broadcom Hurricane 2 DTS include file Describe the Broadcom Hurricane 2 SoC comprised of a Cortex-A9 CPU complex along with standard iProc peripherals: * timers * SPI controller * NAND controller * a single AMAC (Ethernet MAC controller) * dual PCIe controllers The design is largely similar to existing iProc-based SoCs such as Northstar Plus. Acked-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-hr2.dtsi | 368 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 368 insertions(+) commit c6d2efd12744fc4c9c620eab9a92b0c4e9f5e4bd Author: Florian Fainelli Date: Thu Sep 28 16:14:56 2017 -0700 dt-bindings: Document Broadcom Hurricane 2 clocks Add a Device Tree binding document for the Broadcom Hurricane 2 SoC which is an iProc based system. Acked-by: Jon Mason Signed-off-by: Florian Fainelli Acked-by: Rob Herring Signed-off-by: Florian Fainelli .../devicetree/bindings/clock/brcm,iproc-clocks.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 7f66721a7d5bf6251f9c49aada9200c61ddcecc5 Author: Rakesh Pandit Date: Thu Oct 12 19:58:10 2017 +0300 fs/block_dev: remove vfs_msg() interface Replaced by pr_err usage in commit ef51042472f5 ("block, dax: move "select DAX" from BLOCK to FS_DAX") Signed-off-by: Rakesh Pandit Acked-by: Ross Zwisler Signed-off-by: Jens Axboe fs/block_dev.c | 12 ------------ include/linux/blkdev.h | 11 ----------- 2 files changed, 23 deletions(-) commit 2e2bba69951794b9dbbcf9b601ac62a71195c677 Author: Florian Fainelli Date: Thu Sep 28 16:14:55 2017 -0700 ARM: bcm: Add support for Broadcom Hurricane 2 SoC Add a Kconfig entry point and basic machine board code for the Broadcom Hurricane 2 SoCs used in switching products. Acked-by: Jon Mason Signed-off-by: Florian Fainelli arch/arm/mach-bcm/Kconfig | 9 +++++++++ arch/arm/mach-bcm/Makefile | 3 +++ arch/arm/mach-bcm/bcm_hr2.c | 25 +++++++++++++++++++++++++ 3 files changed, 37 insertions(+) commit bc811c697b13dcb5abac9a410527859aca095a9c Author: Florian Fainelli Date: Thu Sep 28 16:14:54 2017 -0700 dt-bindings: Add documentation for Broadcom Hurricane 2 SoCs Add binding documentation for the Broadcom Hurricane 2 SoCs used in switching control planes. Acked-by: Jon Mason Signed-off-by: Florian Fainelli Acked-by: Rob Herring Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,hr2.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 97b79f90f199cce820a6d4aeff3ba0125114bbf7 Author: Florian Fainelli Date: Thu Sep 28 16:14:53 2017 -0700 MAINTAINERS: Update Broadcom iProc regexp with Hurricane 2 Update the Broadcom iProc regepx with recently added Hurricane 2 SoC support. Acked-by: Jon Mason Signed-off-by: Florian Fainelli MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 4d90f2d507ab4634e9e1923de3a6769ac0aa71fa Author: Ville Syrjälä Date: Thu Oct 12 16:02:01 2017 +0300 drm/i915: Start tracking PSR state in crtc state Add the minimal amount of PSR tracking into the crtc state. This allows precomputing the possibility of using PSR correctly, and it means we can safely call the psr enable/disable functions for any DP endcoder. As a nice bonus we get rid of some more crtc->config usage, which we want to kill off eventually. v2: Fix 'goto unlock' fail in intel_psr_enable() (Jani) Check intel_dp_is_edp() in is_edp_psr() (Jani) Cc: Rodrigo Vivi Cc: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171012130201.21318-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula Acked-by: Rodrigo Vivi drivers/gpu/drm/i915/intel_dp.c | 2 + drivers/gpu/drm/i915/intel_drv.h | 5 +++ drivers/gpu/drm/i915/intel_psr.c | 85 +++++++++++++++++++++------------------- 3 files changed, 52 insertions(+), 40 deletions(-) commit 7af35b0addbc6b8573e11106dfd3e21adf38f405 Author: Dan Carpenter Date: Thu Oct 5 15:57:51 2017 +0300 drm/kirin: Checking for IS_ERR() instead of NULL The of_graph_get_remote_node() function doesn't return error pointers, it returns NULL on error so I've updated the check. Fixes: 86418f90a4c1 ("drm: convert drivers to use of_graph_get_remote_node") Signed-off-by: Dan Carpenter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20171005125751.jvtjms62vbtxuvak@mwanda drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fa9caf0b6e69703ff8a4d4da17897008ec2f2dd3 Author: Jani Nikula Date: Thu Oct 12 21:05:11 2017 +0300 drm/i915: Update DRIVER_DATE to 20171012 Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d9d7a3ef4747ec79854b32b0bd98d2da910c2563 Author: Allen Pais Date: Wed Sep 13 13:02:12 2017 +0530 driver:gpu: return -ENOMEM on allocation failure. Signed-off-by: Allen Pais Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1505287939-14106-3-git-send-email-allen.lkml@gmail.com drivers/gpu/drm/gma500/mid_bios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f7832c26cc0cad2245981f777f3ee684399ce93 Author: Timur Tabi Date: Thu Oct 12 12:42:04 2017 -0500 Revert "net: qcom/emac: enforce DMA address restrictions" This reverts commit df1ec1b9d0df57e96011f175418dc95b1af46821. It turns out that memory allocated via dma_alloc_coherent is always aligned to the size of the buffer, so there's no way the RRD and RFD can ever be in separate 32-bit regions. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-mac.c | 39 +++++++++++---------------- 1 file changed, 15 insertions(+), 24 deletions(-) commit 1ad6e3b2652b310e4ab1a544894c79d4f7cb39d3 Author: Finn Thain Date: Thu Oct 12 15:00:06 2017 +1100 documentation: Update ide-cd documentation to reflect CONFIG_BLK_DEV_HD_IDE removal CONFIG_BLK_DEV_HD_IDE was removed in commit 80aa31cb460d ("ide: remove CONFIG_BLK_DEV_HD_IDE config option (take 2)") but the ide-cd documentation was not updated and still asks users to disable it, which is misleading and involves a fruitless search. Signed-off-by: Finn Thain Signed-off-by: Jonathan Corbet Documentation/cdrom/ide-cd | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 3211ba4157b547c182058711d1ad4a418df5d6e9 Merge: e893922 f2b4187 Author: Jonathan Corbet Date: Thu Oct 12 11:23:12 2017 -0600 Merge branch 'refs' into docs-next Tom Saeger says: Recently, while reading up on binfmt I attempted to open a document ref only to find it was invalid. I did a quick grep, found all the binfmt_misc related broken refs and sent a patch. Fine. Easy. Then I wondered, "how many broken doc refs are there?". Turns out with all the recent doc moves, quite a few. I went about fixing just those found in Documentation/, except those in Documentation/translations/ and Documentation/devicetree/ for now. Most of these changes were s/txt/rst/ or fixing up a path to an obvious new location. Some required going back to v4.10 v4.4 or some other version to sleuth-out what content was actually being referenced and then fixing the reference to point to the new file with that content. commit f2b41874240411a7d06aac2dc864a389c93183cc Author: Tom Saeger Date: Tue Oct 10 12:37:01 2017 -0500 Documentation: fix networking related doc refs. Signed-off-by: Tom Saeger Signed-off-by: Jonathan Corbet Documentation/networking/checksum-offloads.txt | 2 +- Documentation/networking/packet_mmap.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4269a691108aaaa6b107bba5fbde7d59f991b73e Author: Tom Saeger Date: Tue Oct 10 12:36:52 2017 -0500 Documentation: fix usb related doc refs Update ref to usb proc_usb_info.txt. Signed-off-by: Tom Saeger Signed-off-by: Jonathan Corbet Documentation/driver-api/usb/usb.rst | 4 +--- Documentation/networking/cdc_mbim.txt | 4 ++-- Documentation/usb/gadget-testing.txt | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) commit f495ae3c01dfa80e368a9330831023121b61006e Author: Tom Saeger Date: Tue Oct 10 12:36:45 2017 -0500 Documentation: fix sound related doc refs Make sound doc refs valid. Signed-off-by: Tom Saeger Reviewed-by: Takashi Iwai Signed-off-by: Jonathan Corbet Documentation/sound/hd-audio/notes.rst | 2 +- Documentation/sound/kernel-api/writing-an-alsa-driver.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a405ed85ca170f5a6cc512a3ff492f77b5e63f15 Author: Tom Saeger Date: Tue Oct 10 12:36:37 2017 -0500 Documentation: fix media related doc refs Make media doc refs valid. Signed-off-by: Tom Saeger Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.txt | 4 ++-- Documentation/media/dvb-drivers/bt8xx.rst | 8 ++++---- Documentation/media/uapi/v4l/dev-sliced-vbi.rst | 2 +- Documentation/media/uapi/v4l/extended-controls.rst | 2 +- Documentation/media/uapi/v4l/pixfmt-reserved.rst | 2 +- Documentation/media/v4l-drivers/max2175.rst | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) commit c7f66400f504fd54bda6ec644853c07333e8cb87 Author: Tom Saeger Date: Tue Oct 10 12:36:30 2017 -0500 Documentation: fix security related doc refs Make security document refs valid. Signed-off-by: Tom Saeger Signed-off-by: Jonathan Corbet Documentation/ABI/testing/evm | 4 ++-- Documentation/security/LSM.rst | 2 +- Documentation/security/credentials.rst | 2 +- Documentation/security/keys/request-key.rst | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 1752118d48e7627756acf7fb8c13541305078fed Author: Tom Saeger Date: Tue Oct 10 12:36:23 2017 -0500 Documentation: fix input related doc refs Make `input` document refs valid including: - joystick - joystick-parport Signed-off-by: Tom Saeger Reviewed-by: Takashi Iwai Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.txt | 10 +++++----- Documentation/hid/hiddev.txt | 2 +- Documentation/input/devices/xpad.rst | 3 ++- Documentation/sound/cards/joystick.rst | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) commit 3ba9b1b814fe37ba3267b58917a73dc69eebde40 Author: Tom Saeger Date: Tue Oct 10 12:36:16 2017 -0500 Documentation: fix admin-guide doc refs Make admin-guide document refs valid. Signed-off-by: Tom Saeger Acked-by: Rafael J. Wysocki Signed-off-by: Jonathan Corbet Documentation/ABI/stable/sysfs-devices | 2 +- Documentation/ABI/testing/sysfs-devices-system-cpu | 6 ++++-- Documentation/ABI/testing/sysfs-power | 6 ++++-- Documentation/admin-guide/README.rst | 2 +- Documentation/admin-guide/kernel-parameters.txt | 2 +- Documentation/admin-guide/reporting-bugs.rst | 4 ++-- Documentation/laptops/laptop-mode.txt | 6 +++--- Documentation/media/v4l-drivers/bttv.rst | 2 +- Documentation/power/interface.txt | 3 ++- 9 files changed, 19 insertions(+), 14 deletions(-) commit 66ccc64f2c3b934f065811160be288cb9a2815ef Author: Tom Saeger Date: Tue Oct 10 12:36:09 2017 -0500 Documentation: fix driver-api doc refs Make driver-api document refs valid. Signed-off-by: Tom Saeger Acked-by: Rafael J. Wysocki Signed-off-by: Jonathan Corbet Documentation/power/pci.txt | 10 +++++----- Documentation/power/runtime_pm.txt | 2 +- Documentation/process/submitting-drivers.rst | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit e8939222dced668fc5cae02b0b601af069801107 Author: Jani Nikula Date: Mon Oct 9 18:26:15 2017 +0300 Documentation: add script and build target to check for broken file references Add a simple script and build target to do a treewide grep for references to files under Documentation, and report the non-existing file in stderr. It tries to take into account punctuation not part of the filename, and wildcards, but there are bound to be false positives too. Mostly seems accurate though. We've moved files around enough to make having this worthwhile. Signed-off-by: Jani Nikula Signed-off-by: Jonathan Corbet Documentation/Makefile | 4 ++++ Makefile | 3 ++- scripts/documentation-file-ref-check | 15 +++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) commit 8d73c512e648bee83b912733876b9b4071353265 Author: Shuah Khan Date: Mon Oct 2 17:44:19 2017 -0600 Makefile: enable dochelp run from main make level Change to enable dochelp run from main make level to make it easier to use it. Signed-off-by: Shuah Khan Signed-off-by: Jonathan Corbet Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9effc8f70b87cf0c02a2ce264257c34a5fe885d5 Author: Shuah Khan Date: Mon Oct 2 17:44:18 2017 -0600 doc: enhance dochelp include default output location for doc build Enhance documentation help message to specify the default location for the generated documents. Signed-off-by: Shuah Khan Signed-off-by: Jonathan Corbet Documentation/Makefile | 2 ++ 1 file changed, 2 insertions(+) commit d5cdbb875f5c450bf9ee950008a2865343c1775c Author: Shuah Khan Date: Mon Oct 2 17:44:17 2017 -0600 doc: dev-tools: kselftest.rst: update to include make O=dir support Update to include details on make O=dir support and other changes improve test results output. Signed-off-by: Shuah Khan [jc: Tweaked RST formatting slightly ] Signed-off-by: Jonathan Corbet Documentation/dev-tools/kselftest.rst | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) commit f47a4133ea6529ecb7ea11047a1a2fcb214e2f97 Author: Geert Uytterhoeven Date: Wed Oct 4 14:15:23 2017 +0200 dmaengine: nbpfaxi: Use of_device_get_match_data() helper Use the of_device_get_match_data() helper instead of open coding. Note that when used with DT, there's always a valid match. Signed-off-by: Geert Uytterhoeven Signed-off-by: Vinod Koul drivers/dma/nbpfaxi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 437d2762ba07f0fc639d5a09acb323fe4106a61f Author: Eric Dumazet Date: Wed Oct 11 20:45:40 2017 -0700 tcp: remove obsolete helpers Remove three inline helpers that are no longer needed. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/tcp.h | 17 ----------------- 1 file changed, 17 deletions(-) commit 05ec62a106a3b358cdc6ac41025b320dc2dbcb3f Author: Peter Ujfalusi Date: Tue Oct 3 11:35:38 2017 +0300 dmaengine: omap-dma: Implement protection for invalid max_burst the device's max_burst to 16777215 (EN is 24bit unsigned value) so clients can take this into consideration when setting up the transfer. During slave transfer preparation check if the requested maxburst is valid. Signed-off-by: Peter Ujfalusi Cc: Russell King Signed-off-by: Vinod Koul drivers/dma/omap-dma.c | 5 +++++ 1 file changed, 5 insertions(+) commit ea09ea51ddb9c5026e3f2090598049302c194427 Author: Peter Ujfalusi Date: Tue Oct 3 11:35:37 2017 +0300 dmaengine: edma: Implement protection for invalid max_burst the device's max_burst to 32767 (CIDX is 16bit signed value) so clients can take this into consideration when setting up the transfer. During slave transfer preparation check if the requested maxburst is valid. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul drivers/dma/edma.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0c09dd051b0cb9cb949cf8582ff7c9b10bfdfb0f Author: Colin Ian King Date: Thu Oct 12 18:28:26 2017 +0200 video: fbdev: radeon: make const array post_divs static, reduces object code size Don't populate the read-only const array post_divs on the stack, instead make it static. Makes the object code smaller by 90 bytes: Before: text data bss dec hex filename 40231 8584 896 49711 c22f radeon_base.o After: text data bss dec hex filename 39914 8744 960 49618 c1d2 radeon_base.o (gcc version 7.2.0, x86_64) Signed-off-by: Colin Ian King Cc: Benjamin Herrenschmidt Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/aty/radeon_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c6b93d2b3cf6eb46c3c916a44caef112db36628 Author: Hou Zhiqiang Date: Tue Sep 19 17:26:58 2017 +0800 arm64: dts: ls1046a: Add PCIe controller DT nodes LS1046a implements 3 PCIe 3.0 controllers. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Minghuan Lian Acked-by: Thomas Gleixner arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 75 ++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) commit fc5c0b4d0783000794812eb510e5c8506f961d0a Author: Hou Zhiqiang Date: Tue Sep 19 17:26:57 2017 +0800 arm64: dts: ls1012a: Add PCIe controller DT node Add PCIe controller node for ls1012a platform. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Minghuan Lian Acked-by: Thomas Gleixner arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit a335b122ba277c879d224b41e52fcfdf334266b0 Author: Hou Zhiqiang Date: Tue Sep 19 17:26:56 2017 +0800 PCI: layerscape: Add support for ls1012a Add support for ls1012a. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring Acked-by: Minghuan Lian Acked-by: Thomas Gleixner Documentation/devicetree/bindings/pci/layerscape-pci.txt | 1 + drivers/pci/dwc/pci-layerscape.c | 1 + 2 files changed, 2 insertions(+) commit c482bff852d7fda61ae580a0f224a348620e8350 Author: Hou Zhiqiang Date: Tue Sep 19 17:26:55 2017 +0800 arm64: dts: ls1012a: Add MSI controller DT node Add MSI controller node for ls1012a platform. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Minghuan Lian Acked-by: Thomas Gleixner arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 3961e9ac3a4546a1022988cc93aec0dc29b513de Author: Bhumika Goyal Date: Thu Oct 12 18:18:23 2017 +0200 video: fbdev: dnfb: make fb_var_screeninfo static and const Make this structure static as it is not referenced in any other file. Make it const as it is used only during a copy operation. Signed-off-by: Bhumika Goyal Cc: Julia Lawall [b.zolnierkie: split from combined patch] Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/dnfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b90b3eca16b7ba6f42df35c029b674f1a00b0c69 Author: Colin Ian King Date: Thu Oct 12 18:18:23 2017 +0200 video: fbdev: sis: make const array specialtv static, reduces object code size Don't populate the const array specialtv on the stack, instead make it static. Makes the object code smaller by over 1100 bytes: Before: text data bss dec hex filename 179899 7504 0 187403 2dc0b drivers/video/fbdev/sis/init301.o After: text data bss dec hex filename 178720 7568 0 186288 2d7b0 drivers/video/fbdev/sis/init301.o (gcc version 7.2.0, x86_64) Signed-off-by: Colin Ian King Cc: Thomas Winischhofer Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/sis/init301.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 160d9a6b27b71499557d368fb514f8a9fcbde12e Author: Colin Ian King Date: Thu Oct 12 18:18:23 2017 +0200 video: fbdev: aty: make const arrays static, reduces object code size Don't populate the const arrays ragepro_tbl and ragexl_tbl on the stack, instead make them static. Makes the object code smaller by over 380 bytes: Before: text data bss dec hex filename 41089 10592 768 52449 cce1 atyfb_base.o After: text data bss dec hex filename 40544 10752 768 52064 cb60 atyfb_base.o (gcc version 7.2.0, x86_64) Signed-off-by: Colin Ian King Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/aty/atyfb_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0619d9e8f101320ee0ee95e8071031c9217d50a3 Author: Allen Pais Date: Thu Oct 12 18:18:23 2017 +0200 video: fbdev: matroxfb: return -ENOMEM on allocation failure Signed-off-by: Allen Pais Signed-off-by: Bartlomiej Zolnierkiewicz drivers/video/fbdev/matrox/matroxfb_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8058cac6a1d5dc8a2e309fafbfa341fd43d54528 Author: Ross Zwisler Date: Thu Oct 12 12:09:48 2017 -0400 ext4: remove duplicate extended attributes defs The following commit: commit 9b7365fc1c82 ("ext4: add FS_IOC_FSSETXATTR/FS_IOC_FSGETXATTR interface support") added several defines related to extended attributes to ext4.h. They were added within an #ifndef FS_IOC_FSGETXATTR block with the comment: /* Until the uapi changes get merged for project quota... */ Those uapi changes were merged by this commit: commit 334e580a6f97 ("fs: XFS_IOC_FS[SG]SETXATTR to FS_IOC_FS[SG]ETXATTR promotion") so all the definitions needed by ext4 are available in include/uapi/linux/fs.h. Remove the duplicates from ext4.h. Signed-off-by: Ross Zwisler Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/ext4.h | 37 ------------------------------------- 1 file changed, 37 deletions(-) commit 6642586b3e5f9e0b559d20352d8d42ad84224d1f Author: Ross Zwisler Date: Thu Oct 12 12:00:59 2017 -0400 ext4: add ext4_should_use_dax() This helper, in the spirit of ext4_should_dioread_nolock() et al., replaces the complex conditional in ext4_set_inode_flags(). Signed-off-by: Ross Zwisler Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/inode.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 7d3e06a8dae893a0df2777543980dc62eff61b59 Author: Ross Zwisler Date: Thu Oct 12 11:58:05 2017 -0400 ext4: add sanity check for encryption + DAX We prevent DAX from being used on inodes which are using ext4's built in encryption via a check in ext4_set_inode_flags(). We do have what appears to be an unsafe transition of S_DAX in ext4_set_context(), though, where S_DAX can get disabled without us doing a proper writeback + invalidate. There are also issues with mm-level races when changing the value of S_DAX, as well as issues with the VM_MIXEDMAP flag: https://www.spinics.net/lists/linux-xfs/msg09859.html I actually think we are safe in this case because of the following: 1) You can't encrypt an existing file. Encryption can only be set on an empty directory, with new inodes in that directory being created with encryption turned on, so I don't think it's possible to turn encryption on for a file that has open DAX mmaps or outstanding I/Os. 2) There is no way to turn encryption off on a given file. Once an inode is encrypted, it stays encrypted for the life of that inode, so we don't have to worry about the case where we turn encryption off and S_DAX suddenly turns on. 3) The only way we end up in ext4_set_context() to turn on encryption is when we are creating a new file in the encrypted directory. This happens as part of ext4_create() before the inode has been allowed to do any I/O. Here's the call tree: ext4_create() __ext4_new_inode() ext4_set_inode_flags() // sets S_DAX fscrypt_inherit_context() fscrypt_get_encryption_info(); ext4_set_context() // sets EXT4_INODE_ENCRYPT, clears S_DAX So, I actually think it's safe to transition S_DAX in ext4_set_context() without any locking, writebacks or invalidations. I've added a WARN_ON_ONCE() sanity check to make sure that we are notified if we ever encounter a case where we are encrypting an inode that already has data, in which case we need to add code to safely transition S_DAX. Signed-off-by: Ross Zwisler Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/super.c | 3 +++ 1 file changed, 3 insertions(+) commit e9072d859df3e0f2c3ba450f0d1739595c2d5d13 Author: Ross Zwisler Date: Thu Oct 12 11:54:08 2017 -0400 ext4: prevent data corruption with journaling + DAX The current code has the potential for data corruption when changing an inode's journaling mode, as that can result in a subsequent unsafe change in S_DAX. I've captured an instance of this data corruption in the following fstest: https://patchwork.kernel.org/patch/9948377/ Prevent this data corruption from happening by disallowing changes to the journaling mode if the '-o dax' mount option was used. This means that for a given filesystem we could have a mix of inodes using either DAX or data journaling, but whatever state the inodes are in will be held for the duration of the mount. Signed-off-by: Ross Zwisler Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Cc: stable@vger.kernel.org fs/ext4/inode.c | 5 ----- fs/ext4/ioctl.c | 16 +++++++++++++--- 2 files changed, 13 insertions(+), 8 deletions(-) commit 559db4c6d784ceedc2a5418ced4d357cb843e221 Author: Ross Zwisler Date: Thu Oct 12 11:52:34 2017 -0400 ext4: prevent data corruption with inline data + DAX If an inode has inline data it is currently prevented from using DAX by a check in ext4_set_inode_flags(). When the inode grows inline data via ext4_create_inline_data() or removes its inline data via ext4_destroy_inline_data_nolock(), the value of S_DAX can change. Currently these changes are unsafe because we don't hold off page faults and I/O, write back dirty radix tree entries and invalidate all mappings. There are also issues with mm-level races when changing the value of S_DAX, as well as issues with the VM_MIXEDMAP flag: https://www.spinics.net/lists/linux-xfs/msg09859.html The unsafe transition of S_DAX can reliably cause data corruption, as shown by the following fstest: https://patchwork.kernel.org/patch/9948381/ Fix this issue by preventing the DAX mount option from being used on filesystems that were created to support inline data. Inline data is an option given to mkfs.ext4. Signed-off-by: Ross Zwisler Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara CC: stable@vger.kernel.org fs/ext4/inline.c | 10 ---------- fs/ext4/super.c | 5 +++++ 2 files changed, 5 insertions(+), 10 deletions(-) commit 11e3e8d6d9274bf630859b4c47bc4e4d76f289db Author: Arnd Bergmann Date: Thu Oct 12 17:31:46 2017 +0200 elf_fdpic: fix unused variable warning The elf_fdpic code shows a harmless warning when built with MMU disabled, I ran into this now that fdpic is available on ARM randconfig builds since commit 50b2b2e691cd ("ARM: add ELF_FDPIC support"). fs/binfmt_elf_fdpic.c: In function 'elf_fdpic_dump_segments': fs/binfmt_elf_fdpic.c:1501:17: error: unused variable 'addr' [-Werror=unused-variable] This adds another #ifdef around the variable declaration to shut up the warning. Fixes: e6c1baa9b562 ("convert the rest of binfmt_elf_fdpic to dump_emit()") Acked-by: Nicolas Pitre Signed-off-by: Arnd Bergmann Signed-off-by: Al Viro fs/binfmt_elf_fdpic.c | 2 ++ 1 file changed, 2 insertions(+) commit 3c0dd1903b17eb8e21d51195831880bd2ede3416 Author: LEROY Christophe Date: Fri Oct 6 15:05:08 2017 +0200 crypto: talitos - avoid useless copy This patch avoids copy of buffered data to hash from bufnext to buf Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) commit 37b5e8897eb588a60dada00c33d2dca8a7fec5fc Author: LEROY Christophe Date: Fri Oct 6 15:05:06 2017 +0200 crypto: talitos - chain in buffered data for ahash on SEC1 SEC1 doesn't support S/G in descriptors so for hash operations, the CPU has to build a buffer containing the buffered block and the incoming data. This generates a lot of memory copies which represents more than 50% of CPU time of a md5sum operation as shown below with a 'perf record'. |--86.24%-- kcapi_md_digest | | | |--86.18%-- _kcapi_common_vmsplice_chunk_fd | | | | | |--83.68%-- splice | | | | | | | |--83.59%-- ret_from_syscall | | | | | | | | | |--83.52%-- sys_splice | | | | | | | | | | | |--83.49%-- splice_from_pipe | | | | | | | | | | | | | |--83.04%-- __splice_from_pipe | | | | | | | | | | | | | | | |--80.67%-- pipe_to_sendpage | | | | | | | | | | | | | | | | | |--78.25%-- hash_sendpage | | | | | | | | | | | | | | | | | | | |--60.08%-- ahash_process_req | | | | | | | | | | | | | | | | | | | | | |--56.36%-- sg_copy_buffer | | | | | | | | | | | | | | | | | | | | | | | |--55.29%-- memcpy | | | | | | | | | | | | However, unlike SEC2+, SEC1 offers the possibility to chain descriptors. It is therefore possible to build a first descriptor pointing to the buffered data and a second descriptor pointing to the incoming data, hence avoiding the memory copy to a single buffer. With this patch, the time necessary for a md5sum on a 90Mbytes file is approximately 3 seconds. Without the patch it takes 6 seconds. Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 139 ++++++++++++++++++++++++++++++++++++++++++----- drivers/crypto/talitos.h | 1 + 2 files changed, 127 insertions(+), 13 deletions(-) commit 49f9783b0cea9a4e38fdbfe70ca296e6f20914c4 Author: LEROY Christophe Date: Fri Oct 6 15:05:04 2017 +0200 crypto: talitos - do hw_context DMA mapping outside the requests At every request, we map and unmap the same hash hw_context. This patch moves the dma mapping/unmapping in functions ahash_init() and ahash_import(). Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 80 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 23 deletions(-) commit 2e13ce0812c624f1ee08ab933ebb89dddffed32c Author: LEROY Christophe Date: Fri Oct 6 15:05:02 2017 +0200 crypto: talitos - DMA map key in setkey() dma_map_single() is an heavy operation which doesn't need to be done at each request as the key doesn't change. Instead of DMA mapping the key at every request, this patch maps it once in setkey() Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 56 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 17 deletions(-) commit 9a655608a468535cd15eafff5ef93e2656e6e2fc Author: LEROY Christophe Date: Fri Oct 6 15:04:59 2017 +0200 crypto: talitos - simplify tests in ipsec_esp() Do (desc->hdr & DESC_HDR_TYPE_IPSEC_ESP) only once. Limit number of if/else paths Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) commit da9de146ebd99e162c4724ebce46a2bf2bc06085 Author: LEROY Christophe Date: Fri Oct 6 15:04:57 2017 +0200 crypto: talitos - remove to_talitos_ptr_len() to_talitos_ptr() and to_talitos_ptr_len() are always called together in order to fully set a ptr, so lets merge them into a single helper. Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 56 ++++++++++++++++++------------------------------ 1 file changed, 21 insertions(+), 35 deletions(-) commit 9c02e2852fcabf0e1542929e887867d01414dec6 Author: LEROY Christophe Date: Fri Oct 6 15:04:55 2017 +0200 crypto: talitos - don't check the number of channels at each interrupt The number of channels is known from the beginning, no need to test it everytime. This patch defines two additional done functions handling only channel 0. Then the probe registers the correct one based on the number of channels. Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 27 +++++++++++++++------------ drivers/crypto/talitos.h | 4 ++++ 2 files changed, 19 insertions(+), 12 deletions(-) commit fd5ea7f011932d121e89e470992aaff8547c761f Author: LEROY Christophe Date: Fri Oct 6 15:04:53 2017 +0200 crypto: talitos - use devm_ioremap() Use devm_ioremap() Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit fa14c6cfcecb0011d53d77c5deb94b70d3738c44 Author: LEROY Christophe Date: Fri Oct 6 15:04:51 2017 +0200 crypto: talitos - use of_property_read_u32() Use of_property_read_u32() to simplify DT read Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit 24b92ff276e8f6b5c20f6c14ae483299685b887d Author: LEROY Christophe Date: Fri Oct 6 15:04:49 2017 +0200 crypto: talitos - use devm_kmalloc() Replace kmalloc() by devm_kmalloc() Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) commit 5b2cf268f193f5bc0c5212107185eb966e547641 Author: LEROY Christophe Date: Fri Oct 6 15:04:47 2017 +0200 crypto: talitos - declare local functions static talitos_handle_buggy_hash() and talitos_sg_map() are only used locally, make them static Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4a647c49c581e877001676e658a8dab82a15967 Author: LEROY Christophe Date: Fri Oct 6 15:04:45 2017 +0200 crypto: talitos - zeroize the descriptor with memset() This patch zeroize the descriptor at allocation using memset(). This has two advantages: - It reduces the number of places where data has to be set to 0 - It avoids reading memory and loading the cache with data that will be entirely replaced. Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 19 +------------------ drivers/crypto/talitos.h | 2 -- 2 files changed, 1 insertion(+), 20 deletions(-) commit 70d355ccea899dad47dc22d3a4406998f55143fd Author: LEROY Christophe Date: Fri Oct 6 15:04:43 2017 +0200 crypto: talitos - fix ctr-aes-talitos ctr-aes-talitos test fails as follows on SEC2 [ 0.837427] alg: skcipher: Test 1 failed (invalid result) on encryption for ctr-aes-talitos [ 0.845763] 00000000: 16 36 d5 ee 34 f8 06 25 d7 7f 8e 56 ca 88 43 45 [ 0.852345] 00000010: f9 3f f7 17 2a b2 12 23 30 43 09 15 82 dd e1 97 [ 0.858940] 00000020: a7 f7 32 b5 eb 25 06 13 9a ec f5 29 25 f8 4d 66 [ 0.865366] 00000030: b0 03 5b 8e aa 9a 42 b6 19 33 8a e2 9d 65 96 95 This patch fixes the descriptor type which is special for CTR AES Fixes: 5e75ae1b3cef6 ("crypto: talitos - add new crypto modes") Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbb22137c4d9bab536958b152d096fb3f98020ea Author: LEROY Christophe Date: Fri Oct 6 15:04:41 2017 +0200 crypto: talitos - fix use of sg_link_tbl_len sg_link_tbl_len shall be used instead of cryptlen, otherwise SECs which perform HW CICV verification will fail. Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6cda075aff67a1b9b5ba1b2818091dc939643b6c Author: LEROY Christophe Date: Fri Oct 6 15:04:39 2017 +0200 crypto: talitos - fix AEAD for sha224 on non sha224 capable chips sha224 AEAD test fails with: [ 2.803125] talitos ff020000.crypto: DEUISR 0x00000000_00000000 [ 2.808743] talitos ff020000.crypto: MDEUISR 0x80100000_00000000 [ 2.814678] talitos ff020000.crypto: DESCBUF 0x20731f21_00000018 [ 2.820616] talitos ff020000.crypto: DESCBUF 0x0628d64c_00000010 [ 2.826554] talitos ff020000.crypto: DESCBUF 0x0631005c_00000018 [ 2.832492] talitos ff020000.crypto: DESCBUF 0x0628d664_00000008 [ 2.838430] talitos ff020000.crypto: DESCBUF 0x061b13a0_00000080 [ 2.844369] talitos ff020000.crypto: DESCBUF 0x0631006c_00000080 [ 2.850307] talitos ff020000.crypto: DESCBUF 0x0631006c_00000018 [ 2.856245] talitos ff020000.crypto: DESCBUF 0x063100ec_00000000 [ 2.884972] talitos ff020000.crypto: failed to reset channel 0 [ 2.890503] talitos ff020000.crypto: done overflow, internal time out, or rngu error: ISR 0x20000000_00020000 [ 2.900652] alg: aead: encryption failed on test 1 for authenc-hmac-sha224-cbc-3des-talitos: ret=22 This is due to SHA224 not being supported by the HW. Allthough for hash we are able to init the hash context by SW, it is not possible for AEAD. Therefore SHA224 AEAD has to be deactivated. Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 5 +++++ 1 file changed, 5 insertions(+) commit f384cdc4faf350fdb6ad93c5f26952b9ba7c7566 Author: LEROY Christophe Date: Fri Oct 6 15:04:37 2017 +0200 crypto: talitos - fix setkey to check key weakness Crypto manager test report the following failures: [ 3.061081] alg: skcipher: setkey failed on test 5 for ecb-des-talitos: flags=100 [ 3.069342] alg: skcipher-ddst: setkey failed on test 5 for ecb-des-talitos: flags=100 [ 3.077754] alg: skcipher-ddst: setkey failed on test 5 for ecb-des-talitos: flags=100 This is due to setkey being expected to detect weak keys. Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit e04a61bebc5da1535b6f194b464295b8d558e2fc Author: LEROY Christophe Date: Fri Oct 6 15:04:35 2017 +0200 crypto: talitos - fix memory corruption on SEC2 On SEC2, when using the old descriptors type (hmac snoop no afeu) for doing IPsec, the CICV out pointeur points out of the allocated memory. [ 2.502554] ============================================================================= [ 2.510740] BUG dma-kmalloc-256 (Not tainted): Redzone overwritten [ 2.516907] ----------------------------------------------------------------------------- [ 2.516907] [ 2.526535] Disabling lock debugging due to kernel taint [ 2.531845] INFO: 0xde858108-0xde85810b. First byte 0xf8 instead of 0xcc [ 2.538549] INFO: Allocated in 0x806181a9 age=0 cpu=0 pid=58 [ 2.544229] __kmalloc+0x374/0x564 [ 2.547649] talitos_edesc_alloc+0x17c/0x48c [ 2.551929] aead_edesc_alloc+0x80/0x154 [ 2.555863] aead_encrypt+0x30/0xe0 [ 2.559368] __test_aead+0x5a0/0x1f3c [ 2.563042] test_aead+0x2c/0x110 [ 2.566371] alg_test_aead+0x5c/0xf4 [ 2.569958] alg_test+0x1dc/0x5a0 [ 2.573305] cryptomgr_test+0x50/0x70 [ 2.576984] kthread+0xd8/0x134 [ 2.580155] ret_from_kernel_thread+0x5c/0x64 [ 2.584534] INFO: Freed in ipsec_esp_encrypt_done+0x130/0x240 age=6 cpu=0 pid=0 [ 2.591839] ipsec_esp_encrypt_done+0x130/0x240 [ 2.596395] flush_channel+0x1dc/0x488 [ 2.600161] talitos2_done_4ch+0x30/0x200 [ 2.604185] tasklet_action+0xa0/0x13c [ 2.607948] __do_softirq+0x148/0x6cc [ 2.611623] irq_exit+0xc0/0x124 [ 2.614869] call_do_irq+0x24/0x3c [ 2.618292] do_IRQ+0x78/0x108 [ 2.621369] ret_from_except+0x0/0x14 [ 2.625055] finish_task_switch+0x58/0x350 [ 2.629165] schedule+0x80/0x134 [ 2.632409] schedule_preempt_disabled+0x38/0xc8 [ 2.637042] cpu_startup_entry+0xe4/0x190 [ 2.641074] start_kernel+0x3f4/0x408 [ 2.644741] 0x3438 [ 2.646857] INFO: Slab 0xdffbdb00 objects=9 used=1 fp=0xde8581c0 flags=0x0080 [ 2.653978] INFO: Object 0xde858008 @offset=8 fp=0xca4395df [ 2.653978] [ 2.661032] Redzone de858000: cc cc cc cc cc cc cc cc ........ [ 2.669029] Object de858008: 00 00 00 02 00 00 00 02 00 6b 6b 6b 1e 83 ea 28 .........kkk...( [ 2.677628] Object de858018: 00 00 00 70 1e 85 80 64 ff 73 1d 21 6b 6b 6b 6b ...p...d.s.!kkkk [ 2.686228] Object de858028: 00 20 00 00 1e 84 17 24 00 10 00 00 1e 85 70 00 . .....$......p. [ 2.694829] Object de858038: 00 18 00 00 1e 84 17 44 00 08 00 00 1e 83 ea 28 .......D.......( [ 2.703430] Object de858048: 00 80 00 00 1e 84 f0 00 00 80 00 00 1e 85 70 10 ..............p. [ 2.712030] Object de858058: 00 20 6b 00 1e 85 80 f4 6b 6b 6b 6b 00 80 02 00 . k.....kkkk.... [ 2.720629] Object de858068: 1e 84 f0 00 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b ....kkkkkkkkkkkk [ 2.729230] Object de858078: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [ 2.737830] Object de858088: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [ 2.746429] Object de858098: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [ 2.755029] Object de8580a8: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [ 2.763628] Object de8580b8: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [ 2.772229] Object de8580c8: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [ 2.780829] Object de8580d8: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [ 2.789430] Object de8580e8: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 73 b0 ea 9f kkkkkkkkkkkks... [ 2.798030] Object de8580f8: e8 18 80 d6 56 38 44 c0 db e3 4f 71 f7 ce d1 d3 ....V8D...Oq.... [ 2.806629] Redzone de858108: f8 bd 3e 4f ..>O [ 2.814279] Padding de8581b0: 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZ [ 2.822283] CPU: 0 PID: 0 Comm: swapper Tainted: G B 4.9.50-g995be12679 #179 [ 2.831819] Call Trace: [ 2.834301] [dffefd20] [c01aa9a8] check_bytes_and_report+0x100/0x194 (unreliable) [ 2.841801] [dffefd50] [c01aac3c] check_object+0x200/0x530 [ 2.847306] [dffefd80] [c01ae584] free_debug_processing+0x290/0x690 [ 2.853585] [dffefde0] [c01aec8c] __slab_free+0x308/0x628 [ 2.859000] [dffefe80] [c05057f4] ipsec_esp_encrypt_done+0x130/0x240 [ 2.865378] [dffefeb0] [c05002c4] flush_channel+0x1dc/0x488 [ 2.870968] [dffeff10] [c05007a8] talitos2_done_4ch+0x30/0x200 [ 2.876814] [dffeff30] [c002fe38] tasklet_action+0xa0/0x13c [ 2.882399] [dffeff60] [c002f118] __do_softirq+0x148/0x6cc [ 2.887896] [dffeffd0] [c002f954] irq_exit+0xc0/0x124 [ 2.892968] [dffefff0] [c0013adc] call_do_irq+0x24/0x3c [ 2.898213] [c0d4be00] [c000757c] do_IRQ+0x78/0x108 [ 2.903113] [c0d4be30] [c0015c08] ret_from_except+0x0/0x14 [ 2.908634] --- interrupt: 501 at finish_task_switch+0x70/0x350 [ 2.908634] LR = finish_task_switch+0x58/0x350 [ 2.919327] [c0d4bf20] [c085e1d4] schedule+0x80/0x134 [ 2.924398] [c0d4bf50] [c085e2c0] schedule_preempt_disabled+0x38/0xc8 [ 2.930853] [c0d4bf60] [c007f064] cpu_startup_entry+0xe4/0x190 [ 2.936707] [c0d4bfb0] [c096c434] start_kernel+0x3f4/0x408 [ 2.942198] [c0d4bff0] [00003438] 0x3438 [ 2.946137] FIX dma-kmalloc-256: Restoring 0xde858108-0xde85810b=0xcc [ 2.946137] [ 2.954158] FIX dma-kmalloc-256: Object at 0xde858008 not freed This patch reworks the handling of the CICV out in order to properly handle all cases. Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) commit ec8c7d14acc0a477429d3a6fade5dab72c996c82 Author: LEROY Christophe Date: Fri Oct 6 15:04:33 2017 +0200 crypto: talitos - fix AEAD test failures AEAD tests fail when destination SG list has more than 1 element. [ 2.058752] alg: aead: Test 1 failed on encryption for authenc-hmac-sha1-cbc-aes-talitos [ 2.066965] 00000000: 53 69 6e 67 6c 65 20 62 6c 6f 63 6b 20 6d 73 67 00000010: c0 43 ff 74 c0 43 ff e0 de 83 d1 20 de 84 8e 54 00000020: de 83 d7 c4 [ 2.082138] alg: aead: Test 1 failed on encryption for authenc-hmac-sha1-cbc-aes-talitos [ 2.090435] 00000000: 53 69 6e 67 6c 65 20 62 6c 6f 63 6b 20 6d 73 67 00000010: de 84 ea 58 c0 93 1a 24 de 84 e8 59 de 84 f1 20 00000020: 00 00 00 00 [ 2.105721] alg: aead: Test 1 failed on encryption for authenc-hmac-sha1-cbc-3des-talitos [ 2.114259] 00000000: 6f 54 20 6f 61 4d 79 6e 53 20 63 65 65 72 73 74 00000010: 54 20 6f 6f 4d 20 6e 61 20 79 65 53 72 63 74 65 00000020: 20 73 6f 54 20 6f 61 4d 79 6e 53 20 63 65 65 72 00000030: 73 74 54 20 6f 6f 4d 20 6e 61 20 79 65 53 72 63 00000040: 74 65 20 73 6f 54 20 6f 61 4d 79 6e 53 20 63 65 00000050: 65 72 73 74 54 20 6f 6f 4d 20 6e 61 20 79 65 53 00000060: 72 63 74 65 20 73 6f 54 20 6f 61 4d 79 6e 53 20 00000070: 63 65 65 72 73 74 54 20 6f 6f 4d 20 6e 61 0a 79 00000080: c0 50 f1 ac c0 50 f3 38 c0 50 f3 94 c0 50 f5 30 00000090: c0 99 74 3c [ 2.166410] alg: aead: Test 1 failed on encryption for authenc-hmac-sha1-cbc-3des-talitos [ 2.174794] 00000000: 6f 54 20 6f 61 4d 79 6e 53 20 63 65 65 72 73 74 00000010: 54 20 6f 6f 4d 20 6e 61 20 79 65 53 72 63 74 65 00000020: 20 73 6f 54 20 6f 61 4d 79 6e 53 20 63 65 65 72 00000030: 73 74 54 20 6f 6f 4d 20 6e 61 20 79 65 53 72 63 00000040: 74 65 20 73 6f 54 20 6f 61 4d 79 6e 53 20 63 65 00000050: 65 72 73 74 54 20 6f 6f 4d 20 6e 61 20 79 65 53 00000060: 72 63 74 65 20 73 6f 54 20 6f 61 4d 79 6e 53 20 00000070: 63 65 65 72 73 74 54 20 6f 6f 4d 20 6e 61 0a 79 00000080: c0 50 f1 ac c0 50 f3 38 c0 50 f3 94 c0 50 f5 30 00000090: c0 99 74 3c [ 2.226486] alg: No test for authenc(hmac(sha224),cbc(aes)) (authenc-hmac-sha224-cbc-aes-talitos) [ 2.236459] alg: No test for authenc(hmac(sha224),cbc(aes)) (authenc-hmac-sha224-cbc-aes-talitos) [ 2.247196] alg: aead: Test 1 failed on encryption for authenc-hmac-sha224-cbc-3des-talitos [ 2.255555] 00000000: 6f 54 20 6f 61 4d 79 6e 53 20 63 65 65 72 73 74 00000010: 54 20 6f 6f 4d 20 6e 61 20 79 65 53 72 63 74 65 00000020: 20 73 6f 54 20 6f 61 4d 79 6e 53 20 63 65 65 72 00000030: 73 74 54 20 6f 6f 4d 20 6e 61 20 79 65 53 72 63 00000040: 74 65 20 73 6f 54 20 6f 61 4d 79 6e 53 20 63 65 00000050: 65 72 73 74 54 20 6f 6f 4d 20 6e 61 20 79 65 53 00000060: 72 63 74 65 20 73 6f 54 20 6f 61 4d 79 6e 53 20 00000070: 63 65 65 72 73 74 54 20 6f 6f 4d 20 6e 61 0a 79 00000080: c0 50 f1 ac c0 50 f3 38 c0 50 f3 94 c0 50 f5 30 00000090: c0 99 74 3c c0 96 e5 b8 [ 2.309004] alg: aead: Test 1 failed on encryption for authenc-hmac-sha224-cbc-3des-talitos [ 2.317562] 00000000: 6f 54 20 6f 61 4d 79 6e 53 20 63 65 65 72 73 74 00000010: 54 20 6f 6f 4d 20 6e 61 20 79 65 53 72 63 74 65 00000020: 20 73 6f 54 20 6f 61 4d 79 6e 53 20 63 65 65 72 00000030: 73 74 54 20 6f 6f 4d 20 6e 61 20 79 65 53 72 63 00000040: 74 65 20 73 6f 54 20 6f 61 4d 79 6e 53 20 63 65 00000050: 65 72 73 74 54 20 6f 6f 4d 20 6e 61 20 79 65 53 00000060: 72 63 74 65 20 73 6f 54 20 6f 61 4d 79 6e 53 20 00000070: 63 65 65 72 73 74 54 20 6f 6f 4d 20 6e 61 0a 79 00000080: c0 50 f1 ac c0 50 f3 38 c0 50 f3 94 c0 50 f5 30 00000090: c0 99 74 3c c0 96 e5 b8 [ 2.370710] alg: aead: Test 1 failed on encryption for authenc-hmac-sha256-cbc-aes-talitos [ 2.379177] 00000000: 53 69 6e 67 6c 65 20 62 6c 6f 63 6b 20 6d 73 67 00000010: 54 20 6f 6f 4d 20 6e 61 20 79 65 53 72 63 74 65 00000020: 20 73 6f 54 20 6f 61 4d 79 6e 53 20 63 65 65 72 [ 2.397863] alg: aead: Test 1 failed on encryption for authenc-hmac-sha256-cbc-aes-talitos [ 2.406134] 00000000: 53 69 6e 67 6c 65 20 62 6c 6f 63 6b 20 6d 73 67 00000010: 54 20 6f 6f 4d 20 6e 61 20 79 65 53 72 63 74 65 00000020: 20 73 6f 54 20 6f 61 4d 79 6e 53 20 63 65 65 72 [ 2.424789] alg: aead: Test 1 failed on encryption for authenc-hmac-sha256-cbc-3des-talitos [ 2.433491] 00000000: 6f 54 20 6f 61 4d 79 6e 53 20 63 65 65 72 73 74 00000010: 54 20 6f 6f 4d 20 6e 61 20 79 65 53 72 63 74 65 00000020: 20 73 6f 54 20 6f 61 4d 79 6e 53 20 63 65 65 72 00000030: 73 74 54 20 6f 6f 4d 20 6e 61 20 79 65 53 72 63 00000040: 74 65 20 73 6f 54 20 6f 61 4d 79 6e 53 20 63 65 00000050: 65 72 73 74 54 20 6f 6f 4d 20 6e 61 20 79 65 53 00000060: 72 63 74 65 20 73 6f 54 20 6f 61 4d 79 6e 53 20 00000070: 63 65 65 72 73 74 54 20 6f 6f 4d 20 6e 61 0a 79 00000080: c0 50 f1 ac c0 50 f3 38 c0 50 f3 94 c0 50 f5 30 00000090: c0 99 74 3c c0 96 e5 b8 c0 96 e9 20 c0 00 3d dc [ 2.488832] alg: aead: Test 1 failed on encryption for authenc-hmac-sha256-cbc-3des-talitos [ 2.497387] 00000000: 6f 54 20 6f 61 4d 79 6e 53 20 63 65 65 72 73 74 00000010: 54 20 6f 6f 4d 20 6e 61 20 79 65 53 72 63 74 65 00000020: 20 73 6f 54 20 6f 61 4d 79 6e 53 20 63 65 65 72 00000030: 73 74 54 20 6f 6f 4d 20 6e 61 20 79 65 53 72 63 00000040: 74 65 20 73 6f 54 20 6f 61 4d 79 6e 53 20 63 65 00000050: 65 72 73 74 54 20 6f 6f 4d 20 6e 61 20 79 65 53 00000060: 72 63 74 65 20 73 6f 54 20 6f 61 4d 79 6e 53 20 00000070: 63 65 65 72 73 74 54 20 6f 6f 4d 20 6e 61 0a 79 00000080: c0 50 f1 ac c0 50 f3 38 c0 50 f3 94 c0 50 f5 30 00000090: c0 99 74 3c c0 96 e5 b8 c0 96 e9 20 c0 00 3d dc This patch fixes that. Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu drivers/crypto/talitos.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 59231368d3a959fc30c5142c406a045f49130daa Author: Christian Lamparter Date: Wed Oct 4 01:00:17 2017 +0200 crypto: crypto4xx - add aes-gcm support This patch adds aes-gcm support to crypto4xx. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_alg.c | 139 +++++++++++++++++++++++++++++++++++ drivers/crypto/amcc/crypto4xx_core.c | 22 ++++++ drivers/crypto/amcc/crypto4xx_core.h | 4 + 3 files changed, 165 insertions(+) commit 65ea8b678fcf385ac18864743bae66c0643e6842 Author: Christian Lamparter Date: Wed Oct 4 01:00:16 2017 +0200 crypto: crypto4xx - add aes-ccm support This patch adds aes-ccm support. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_alg.c | 185 +++++++++++++++++++++++++++++++++++ drivers/crypto/amcc/crypto4xx_core.c | 23 +++++ drivers/crypto/amcc/crypto4xx_core.h | 8 ++ 3 files changed, 216 insertions(+) commit a0aae821ba3d35a49d4d0143dfb0c07eee22130e Author: Christian Lamparter Date: Wed Oct 4 01:00:15 2017 +0200 crypto: crypto4xx - prepare for AEAD support This patch enhances existing interfaces and functions to support AEAD ciphers in the next patches. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/Kconfig | 4 + drivers/crypto/amcc/crypto4xx_alg.c | 19 +-- drivers/crypto/amcc/crypto4xx_core.c | 217 +++++++++++++++++++++++++++-------- drivers/crypto/amcc/crypto4xx_core.h | 22 ++-- drivers/crypto/amcc/crypto4xx_sa.h | 41 +++++++ 5 files changed, 230 insertions(+), 73 deletions(-) commit 2f77690dcb96e525bc6b57bce4a0eaecaa2878d1 Author: Christian Lamparter Date: Wed Oct 4 01:00:14 2017 +0200 crypto: crypto4xx - simplify sa and state context acquisition Thanks to the big overhaul of crypto4xx_build_pd(), the request-local sa_in, sa_out and state_record allocation can be simplified. There's no need to setup any dma coherent memory anymore and much of the support code can be removed. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_alg.c | 27 +++++-------------- drivers/crypto/amcc/crypto4xx_core.c | 50 ++++++------------------------------ drivers/crypto/amcc/crypto4xx_core.h | 6 +---- 3 files changed, 15 insertions(+), 68 deletions(-) commit 4b5b79998af61db8b0506fba6c0f33b57ea457bd Author: Christian Lamparter Date: Wed Oct 4 01:00:13 2017 +0200 crypto: crypto4xx - fix stalls under heavy load If the crypto4xx device is continuously loaded by dm-crypt and ipsec work, it will start to work intermittent after a few (between 20-30) seconds, hurting throughput and latency. This patch contains various stability improvements in order to fix this issue. So far, the hardware has survived more than a day without suffering any stalls under the continuous load. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.c | 33 ++++++++++++++++++--------------- drivers/crypto/amcc/crypto4xx_reg_def.h | 3 +++ 2 files changed, 21 insertions(+), 15 deletions(-) commit 64e1062b2371cb8d6126d4e970832365a1a84562 Author: Christian Lamparter Date: Wed Oct 4 01:00:12 2017 +0200 crypto: crypto4xx - fix various warnings crypto4xx_core.c:179:6: warning: symbol 'crypto4xx_free_state_record' was not declared. Should it be static? crypto4xx_core.c:331:5: warning: symbol 'crypto4xx_get_n_gd' was not declared. Should it be static? crypto4xx_core.c:652:6: warning: symbol 'crypto4xx_return_pd' was not declared. Should it be static? crypto4xx_return_pd() is not used by anything. Therefore it is removed. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit cd4dcd6da7a2610e0562a6e130bb68cc544a8fb1 Author: Christian Lamparter Date: Wed Oct 4 01:00:11 2017 +0200 crypto: crypto4xx - overhaul crypto4xx_build_pd() This patch overhauls and fixes code related to crypto4xx_build_pd() * crypto4xx_build_pd() did not handle chained source scatterlist. This is fixed by replacing the buggy indexed-access of &src[idx] with sg_next() in the gather array setup loop. * The redundant is_hash, direction, save_iv and pd_ctl members in the crypto4xx_ctx struct have been removed. - is_hash can be derived from the crypto_async_request parameter. - direction is already part of the security association's bf.dir bitfield. - save_iv is unused. - pd_ctl always had the host_ready bit enabled anyway. (the hash_final case is rather pointless, since the ahash code has been deactivated). * make crypto4xx_build_pd()'s caller responsible for converting the IV to the LE32 format. * change crypto4xx_ahash_update() and crypto4xx_ahash_digest() to initialize a temporary destination scatterlist. This allows the removal of an ugly cast of req->result (which is a pointer to an u8-array) to a scatterlist pointer. * change crypto4xx_build_pd() return type to int. After all it returns -EINPROGRESS/-EBUSY. * fix crypto4xx_build_pd() thread-unsafe sa handling. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_alg.c | 87 +++++++++++------------- drivers/crypto/amcc/crypto4xx_core.c | 128 ++++++++++++++++------------------- drivers/crypto/amcc/crypto4xx_core.h | 12 ++-- 3 files changed, 103 insertions(+), 124 deletions(-) commit 4865b122d4aff5151c88d2f7442d5a87f7e795ae Author: Christian Lamparter Date: Wed Oct 4 01:00:10 2017 +0200 crypto: crypto4xx - use the correct LE32 format for IV and key defs The hardware expects that the keys, IVs (and inner/outer hashes) are in the le32 format. This patch changes all hardware interface declarations to use the correct LE32 data format for each field. In order to pass __CHECK_ENDIAN__ checks, crypto4xx_memcpy_le has to be honest about the endianness of its parameters. The function was split and moved to the common crypto4xx_core.h header. This allows the compiler to generate better code if the sizes/len is a constant (various *_IV_LEN). Please note that the hardware isn't consistent with the endiannes of the save_digest field in the state record struct though. The hashes produced by GHASH and CBC (for CCM) will be in LE32. Whereas md5 and sha{1/,256,...} do not need any conversion. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_alg.c | 4 +-- drivers/crypto/amcc/crypto4xx_core.c | 40 ++---------------------------- drivers/crypto/amcc/crypto4xx_core.h | 47 +++++++++++++++++++++++++++++++++--- drivers/crypto/amcc/crypto4xx_sa.h | 29 ++++++++++++---------- 4 files changed, 64 insertions(+), 56 deletions(-) commit 8ef8d195430ca3542d0434cf25e5115484b9fa32 Author: Christian Lamparter Date: Wed Oct 4 01:00:09 2017 +0200 crypto: crypto4xx - add backlog queue support Previously, If the crypto4xx driver used all available security contexts, it would simply refuse new requests with -EAGAIN. CRYPTO_TFM_REQ_MAY_BACKLOG was ignored. in case of dm-crypt.c's crypt_convert() function this was causing the following errors to manifest, if the system was pushed hard enough: | EXT4-fs warning (dm-1): ext4_end_bio:314: I/O error -5 writing to ino .. | EXT4-fs warning (dm-1): ext4_end_bio:314: I/O error -5 writing to ino .. | EXT4-fs warning (dm-1): ext4_end_bio:314: I/O error -5 writing to ino .. | JBD2: Detected IO errors while flushing file data on dm-1-8 | Aborting journal on device dm-1-8. | EXT4-fs error : ext4_journal_check_start:56: Detected aborted journal | EXT4-fs (dm-1): Remounting filesystem read-only | EXT4-fs : ext4_writepages: jbd2_start: 2048 pages, inode 498...; err -30 (This did cause corruptions due to failed writes) To fix this mess, the crypto4xx driver needs to notifiy the user to slow down. This can be achieved by returning -EBUSY on requests, once the crypto hardware was falling behind. Note: -EBUSY has two different meanings. Setting the flag CRYPTO_TFM_REQ_MAY_BACKLOG implies that the request was successfully queued, by the crypto driver. To achieve this requirement, the implementation introduces a threshold check and adds logic to the completion routines in much the same way as AMD's Cryptographic Coprocessor (CCP) driver do. Note2: Tests showed that dm-crypt starved ipsec traffic. Under load, ipsec links dropped to 0 Kbits/s. This is because dm-crypt's callback would instantly queue the next request. In order to not starve ipsec, the driver reserves a small portion of the available crypto contexts for this purpose. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.c | 47 ++++++++++++++++++++++++++++++------ drivers/crypto/amcc/crypto4xx_core.h | 3 ++- 2 files changed, 41 insertions(+), 9 deletions(-) commit 778f81d6cdb7d25360f082ac0384d5103f04eca5 Author: Christian Lamparter Date: Wed Oct 4 01:00:08 2017 +0200 crypto: crypto4xx - increase context and scatter ring buffer elements If crypto4xx is used in conjunction with dm-crypt, the available ring buffer elements are not enough to handle the load properly. On an aes-cbc-essiv:sha256 encrypted swap partition the read performance is abyssal: (tested with hdparm -t) /dev/mapper/swap_crypt: Timing buffered disk reads: 14 MB in 3.68 seconds = 3.81 MB/sec The patch increases both PPC4XX_NUM_SD and PPC4XX_NUM_PD to 256. This improves the performance considerably: /dev/mapper/swap_crypt: Timing buffered disk reads: 104 MB in 3.03 seconds = 34.31 MB/sec Furthermore, PPC4XX_LAST_SD, PPC4XX_LAST_GD and PPC4XX_LAST_PD can be easily calculated from their respective PPC4XX_NUM_* constant. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 333eb3edda3842f3e5dbd723cb18bbe47eb0508b Author: Christian Lamparter Date: Wed Oct 4 01:00:07 2017 +0200 crypto: crypto4xx - fix type mismatch compiler error This patch fixes a type mismatch error that I accidentally introduced when I moved and refactored the dynamic_contents helpers. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_sa.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e9b8e4e1129d0886094cfe013cdbaafc4ce0de76 Author: Christian Lamparter Date: Wed Oct 4 01:00:06 2017 +0200 crypto: crypto4xx - fix off-by-one AES-OFB I used aes-cbc as a template for ofb. But sadly I forgot to update set_key method to crypto4xx_setkey_aes_ofb(). this was caught by the testmgr: alg: skcipher: Test 1 failed (invalid result) on encr. for ofb-aes-ppc4xx 00000000: 76 49 ab ac 81 19 b2 46 ce e9 8e 9b 12 e9 19 7d 00000010: 50 86 cb 9b 50 72 19 ee 95 db 11 3a 91 76 78 b2 00000020: 73 be d6 b8 e3 c1 74 3b 71 16 e6 9e 22 22 95 16 00000030: 3f f1 ca a1 68 1f ac 09 12 0e ca 30 75 86 e1 a7 With the correct set_key method, the aes-ofb cipher passes the test. name : ofb(aes) driver : ofb-aes-ppc4xx module : crypto4xx priority : 300 refcnt : 1 selftest : passed internal : no type : ablkcipher async : yes blocksize : 16 min keysize : 16 max keysize : 32 ivsize : 16 geniv : Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a4326d3a03f03c2518a2c255be33a7114af3230 Author: Christian Lamparter Date: Wed Oct 4 01:00:05 2017 +0200 crypto: crypto4xx - wire up hmac_mc to hmac_muting The hmac_mc parameter of set_dynamic_sa_command_1() was defined but not used. On closer inspection it turns out, it was never wired up. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_alg.c | 1 + 1 file changed, 1 insertion(+) commit 9e49451d7a15365d172a75a7ab8f1c305458253a Author: Stephan Mueller Date: Tue Oct 3 04:19:59 2017 +0200 crypto: keywrap - simplify code The code is simplified by using two __be64 values for the operation instead of using two arrays of u8. This allows to get rid of the memory alignment code. In addition, the crypto_xor can be replaced with a native XOR operation. Finally, the definition of the variables is re-arranged such that the data structures come before simple variables to potentially reduce memory space. Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu crypto/keywrap.c | 84 ++++++++++++++++++-------------------------------------- 1 file changed, 26 insertions(+), 58 deletions(-) commit 5b3f3a8bede7d3af2dc9ea20b0ad971d4e5e83cc Author: Tudor-Dan Ambarus Date: Fri Sep 29 12:21:05 2017 +0300 crypto: dh - return unsigned value for crypto_dh_key_len() DH_KPP_SECRET_MIN_SIZE and dh_data_size() are both returning unsigned values. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/dh_helper.c | 2 +- include/crypto/dh.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit cb195b362537ca97ceccefbbba6b4071ed77434f Author: Tudor-Dan Ambarus Date: Fri Sep 29 12:21:04 2017 +0300 crypto: dh - return unsigned int for dh_data_size() p->key_size, p->p_size, p->g_size are all of unsigned int type. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/dh_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e97e08d4311d2413df0e891a10301bf4258fe3e Author: Tudor-Dan Ambarus Date: Fri Sep 29 12:13:08 2017 +0300 crypto: ecdh - return unsigned value for crypto_ecdh_key_len() ECDH_KPP_SECRET_MIN_SIZE and params->key_size are both returning unsigned values. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu crypto/ecdh_helper.c | 2 +- include/crypto/ecdh.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 924c9e3629441ce17adc66694dda239970e9f625 Author: Arvind Yadav Date: Mon Sep 25 16:06:16 2017 +0530 crypto: bcm - pr_err() strings should end with newlines pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav Signed-off-by: Herbert Xu drivers/crypto/bcm/util.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit ed713a257a5861a86f52563582c5cadc1233d097 Author: Arvind Yadav Date: Mon Sep 25 16:06:15 2017 +0530 crypto: qat - pr_err() strings should end with newlines pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/qat_uclo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit dce094ea6986a83d0056a26fd24c13b1b6ce00d1 Author: Arvind Yadav Date: Mon Sep 25 16:06:14 2017 +0530 crypto: chelsio - pr_err() strings should end with newlines pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e02b8b43f55a17826b5c0cdd23c82c3fcde08e4b Author: Arvind Yadav Date: Mon Sep 25 16:06:13 2017 +0530 crypto: virtio - pr_err() strings should end with newlines pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav Signed-off-by: Herbert Xu drivers/crypto/virtio/virtio_crypto_algs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bfbd6254b8e716568327dc52d16a72c52b7471b6 Author: Arvind Yadav Date: Mon Sep 25 16:06:12 2017 +0530 crypto: omap-aes - pr_err() strings should end with newlines pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav Signed-off-by: Herbert Xu drivers/crypto/omap-aes-gcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d0ec22943301f827ac2800b7eb3531fb6d7447b Author: Arvind Yadav Date: Mon Sep 25 13:15:00 2017 +0530 hwrng: core - pr_err() strings should end with newlines pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav Signed-off-by: Herbert Xu drivers/char/hw_random/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d38efad2bf1c27fcb375dee9ac8c5c99e02ab38c Author: Christophe Jaillet Date: Sun Oct 8 11:39:50 2017 +0200 crypto: lrw - Check for incorrect cipher name If the cipher name does not start with 'ecb(' we should bail out, as done in the 'create()' function in 'crypto/xts.c'. Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher") Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu crypto/lrw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 616129cc6e75fb4da6681c16c981fa82dfe5e4c7 Author: Christophe Jaillet Date: Sun Oct 8 11:39:49 2017 +0200 crypto: lrw - Fix an error handling path in 'create()' All error handling paths 'goto err_drop_spawn' except this one. In order to avoid some resources leak, we should do it as well here. Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher") Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu crypto/lrw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 36452b8ba02a62445847a29779dc581eb4cfeddd Merge: 23e9f4e 8a5776a Author: Bartlomiej Zolnierkiewicz Date: Thu Oct 12 16:35:36 2017 +0200 Merge tag 'v4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fbdev-for-next Linux 4.14-rc4 commit 632c6e4edef17c40bba3be67c980d959790d142f Author: Ville Syrjälä Date: Tue Oct 10 16:33:22 2017 +0300 drm/vblank: Fix flip event vblank count On machines where the vblank interrupt fires some time after the start of vblank (or we just manage to race with the vblank interrupt handler) we will currently stuff a stale vblank counter value into the flip event, and thus we'll prematurely complete the flip. Switch over to drm_crtc_accurate_vblank_count() to make sure we have an up to date counter value, crucially also remember to add the +1 so that the delayed vblank interrupt won't complete the flip prematurely. Cc: stable@vger.kernel.org Cc: Daniel Vetter Suggested-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171010133322.24029-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter #irc drivers/gpu/drm/drm_vblank.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b64a2965dfdfca8039e93303c64e2b15c19ff0c Author: Russell King Date: Fri Sep 29 11:22:15 2017 +0100 rtc: pl031: make interrupt optional On some platforms, the interrupt for the PL031 is optional. Avoid trying to claim the interrupt if it's not specified. Reviewed-by: Linus Walleij Signed-off-by: Russell King Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pl031.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit b86f581f8cdbec3655d400ad952c2203a74edde1 Author: Russell King Date: Fri Sep 29 11:22:10 2017 +0100 rtc: pl031: avoid exposing alarm if no interrupt If the RTC has no interrupt, there is little point in exposing the RTC alarm capabilities, as it can't be used as a wakeup source nor can it deliver an event to userspace. Signed-off-by: Russell King Reviewed-by: Linus Walleij Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pl031.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 273c868e85a56481ccb34822be2033dbe63248fb Author: Russell King Date: Fri Sep 29 11:22:05 2017 +0100 rtc: pl031: use devm_* for allocating memory and mapping resource Use the devm_* APIs for allocating memory and mapping the memory in the probe function to relieve the driver from having to deal with this in the cleanup paths. Signed-off-by: Russell King Reviewed-by: Linus Walleij Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pl031.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit eb508b36d549d96a7ddcf1fe0656cdd86b038fe5 Author: Russell King Date: Fri Sep 29 11:22:00 2017 +0100 rtc: pl031: constify amba_ids The AMBA device IDs should be marked const. Make that so. Reviewed-by: Linus Walleij Signed-off-by: Russell King Signed-off-by: Alexandre Belloni drivers/rtc/rtc-pl031.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97f5b0379c382d9c2b944baa02852338dee7d8aa Author: Dan Carpenter Date: Thu Sep 21 00:45:30 2017 +0300 rtc: rv3029: Clean up error handling in rv3029_eeprom_write() We don't need both "ret" and "err" when they do the same thing. All the functions called here return zero on success or negative error codes. It's more clear to return a literal zero at the end instead of "return ret;" Signed-off-by: Dan Carpenter Signed-off-by: Alexandre Belloni drivers/rtc/rtc-rv3029c2.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit f2fd4d9f323d8979fe77e673bb555199b531fa1a Author: Colin Ian King Date: Wed Oct 11 11:28:22 2017 +0100 dmaengine: stm32: remove redundant initialization of hwdesc hwdesc is being initialized to desc->hwdesc but this is never read as hwdesc is overwritten in a for-loop. Remove the redundant initialization and move the declaration of hwdesc into the for-loop. Cleans up clang warning: Value stored to 'hwdesc' during its initialization is never read Signed-off-by: Colin Ian King Acked-by: Pierre-Yves MORDRET Signed-off-by: Vinod Koul drivers/dma/stm32-mdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea62e2ccbb18e8adc51a6591682e7efa7818478a Author: Arnd Bergmann Date: Wed Oct 11 16:00:04 2017 +0200 dmaengine: stm32_mdma: add CONFIG_OF dependency Without CONFIG_OF we get a build warning: warning: (STM32_MDMA) selects DMA_OF which has unmet direct dependencies (DMADEVICES && OF) This adds a dependency on CONFIG_OF. Since this means we no longer need to select 'DMA_OF', I'm dropping that line as well. Fixes: a4ffb13c8946 ("dmaengine: Add STM32 MDMA driver") Signed-off-by: Arnd Bergmann Signed-off-by: Vinod Koul drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4e3bf290c3089502ee33e25795075b86fe9a449 Author: Gregory CLEMENT Date: Thu Oct 5 18:05:49 2017 +0200 arm64: dts: marvell: 7040-db: Add the carrier detect pin for SD card on CP The SD card slot connected to the SD controller of the CP part has a carrier detect pin connected the gpio expander. This patch enables it allowing supporting the hotplug event for the SD card. Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-7040-db.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5f5c5bbef3f5b2fb2f095c4ae5fa6a679512878 Author: Gregory CLEMENT Date: Thu Oct 5 18:05:11 2017 +0200 arm64: dts: marvell: 7040-db: Document the gpio expander Document all the GPIO of the expander based on the schematics Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-7040-db.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f5bdfbe66ae7c64ef3bd64c742e34111eb0e3164 Author: Gregory CLEMENT Date: Mon Oct 2 17:44:16 2017 +0200 arm64: defconfig: enable RTC on Armada 7K/8K SoCs The Armada 38x RTC driver supports also the RTC controller found on the Armada 7K/8K SoCs, so enable it. Signed-off-by: Gregory CLEMENT arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 32c210d724156a4c20f8465f83c445f6c47e2eb2 Author: Michal Marek Date: Thu Oct 5 22:39:04 2017 +0200 MAINTAINERS: Update my email address I changed jobs recently, but the MAINTAINERS file was not mentioned in the HR checklist, hence a belated update. Signed-off-by: Michal Marek Signed-off-by: Jiri Kosina MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 83fc61a563cb4de3386ddc997cf8fc0ba55ec4ca Author: Masanari Iida Date: Tue Sep 26 12:47:59 2017 +0900 treewide: Fix typos in Kconfig This patch fixes some spelling typos found in Kconfig files. Signed-off-by: Masanari Iida Acked-by: Randy Dunlap Signed-off-by: Jiri Kosina arch/alpha/Kconfig | 2 +- arch/arc/Kconfig | 6 +++--- arch/arm/mach-bcm/Kconfig | 6 +++--- arch/arm/plat-samsung/Kconfig | 2 +- arch/arm64/Kconfig | 2 +- arch/powerpc/platforms/Kconfig | 2 +- arch/unicore32/Kconfig | 2 +- arch/xtensa/Kconfig | 2 +- drivers/net/ethernet/aquantia/Kconfig | 2 +- drivers/nfc/st-nci/Kconfig | 4 ++-- drivers/nvdimm/Kconfig | 2 +- drivers/platform/x86/Kconfig | 2 +- drivers/power/supply/Kconfig | 2 +- drivers/scsi/Kconfig | 2 +- fs/notify/fanotify/Kconfig | 2 +- 15 files changed, 20 insertions(+), 20 deletions(-) commit 24d654fadd70884a719c45ffabb0fe6033996f92 Author: Christophe JAILLET Date: Sat Sep 23 12:08:16 2017 +0200 kfifo: Fix comments Fix some typo. Signed-off-by: Christophe JAILLET Signed-off-by: Jiri Kosina include/linux/kfifo.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cbdc8217020b87f039e43ff752c613fa7d5bddd8 Author: Nathan Chancellor Date: Sun Sep 10 02:48:29 2017 -0700 init/Kconfig: Fix module signing document location This was moved in commit 94e980cc45f2 ("Documentation/module-signing.txt: convert to ReST markup") and was missed by commit 8c27ceff3604 ("docs: fix locations of several documents that got moved"). Signed-off-by: Nathan Chancellor Signed-off-by: Jiri Kosina init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f403f85f5334fb169d5c00deac106f140b62d3c9 Author: Anton Vasilyev Date: Tue Aug 1 16:25:59 2017 +0300 misc: ibmasm: Return error on error path If ibmasm_event_buffer_init() or ibmasm_heartbeat_init() fails, then ibmasm_init_one() release all resources and return 0 on error path. The patch adds corresponding error for fails. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Reviewed-by: Andy Shevchenko Signed-off-by: Jiri Kosina drivers/misc/ibmasm/event.c | 2 +- drivers/misc/ibmasm/module.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit df47b246ed176b504b1d50ad63aa5a3bf7551f82 Author: Colin Ian King Date: Fri Jul 14 14:37:12 2017 +0100 HID: logitech-hidpp: fix mistake in printk, "feeback" -> "feedback" Trivial fix to spelling mistake in hid_info message and add line break to split an overly long line to clean up a checkpatch warning. Signed-off-by: Colin Ian King Acked-By: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-logitech-hidpp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9093de6052587d7d1398b4e8996e955b4aaec331 Author: Bastien Nocera Date: Tue Jun 20 18:17:29 2017 +0200 MAINTAINERS: Correct path to uDraw PS3 driver Signed-off-by: Bastien Nocera Signed-off-by: Jiri Kosina MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27019975617864ce03d3b0c2a0c1fccc6b572509 Author: Jeremy Linton Date: Fri Jun 16 12:07:35 2017 -0500 tracing: Fix doc mistakes in trace sample The trace sample file has a couple mispellings, lets fix them. Signed-off-by: Jeremy Linton Signed-off-by: Jiri Kosina samples/trace_events/trace-events-sample.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c5c1ea75a352c3864c4891f36155287a2ed73928 Author: Jesper Dangaard Brouer Date: Tue Jun 13 13:06:59 2017 +0200 tracing: Kconfig text fixes for CONFIG_HWLAT_TRACER Trivial spelling fixes for Kconfig help text of config HWLAT_TRACER. Fixes: e7c15cd8a113 ("tracing: Added hardware latency tracer") Signed-off-by: Jesper Dangaard Brouer Acked-by: Steven Rostedt Signed-off-by: Jiri Kosina kernel/trace/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b35a682c9063b40bed993b9a7141521221f127d Author: Nikitas Angelinas Date: Mon May 29 17:34:35 2017 -0700 MIPS: Alchemy: Remove reverted CONFIG_NETLINK_MMAP from db1xxx_defconfig Netlink mmap support and the relevant CONFIG_NETLINK_MMAP option have been reverted by commit d1b4c689d4130bcfd3532680b64db562300716b6 ("netlink: remove mmapped netlink support"). Remove the occurrence of CONFIG_NETLINK_MMAP from db1xxx_defconfig. Signed-off-by: Nikitas Angelinas Cc: Patrick McHardy Cc: Florian Westphal Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: Jiri Kosina Signed-off-by: Jiri Kosina arch/mips/configs/db1xxx_defconfig | 1 - 1 file changed, 1 deletion(-) commit b14d595aa299236729380e4279c42cb526025026 Author: Michael DeGuzis Date: Wed May 17 15:19:21 2017 -0400 mm/huge_memory.c: fixup grammar in comment This patch fixes up some grammar and spelling in the information block for huge_memory.c. Signed-off-by: Michael DeGuzis Signed-off-by: Jiri Kosina mm/huge_memory.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5a244f48ecbbd03a11eb84819c5c599db81823ee Author: Lasse Collin Date: Wed May 3 19:00:39 2017 +0300 lib/xz: Add fall-through comments to a switch statement It's good style. I was also told that GCC 7 is more strict and might give a warning when such comments are missing. Signed-off-by: Lasse Collin Suggested-by: Andrei Borzenkov Signed-off-by: Jiri Kosina lib/xz/xz_dec_stream.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 695e38d8818dd858d7516c77bab96be266f56694 Author: Mathieu Malaterre Date: Mon Sep 18 21:10:13 2017 +0200 rtc: jz4740: fix loading of rtc driver The current timeout for waiting for WRDY is not always sufficient. Always increase it to 10000 even on JZ4740. This is technically only required on JZ4780, where the current symptoms seen after a hard reboot are: jz4740-rtc 10003000.rtc: rtc core: registered 10003000.rtc as rtc0 jz4740-rtc 10003000.rtc: Could not write to RTC registers jz4740-rtc: probe of 10003000.rtc failed with error -5 Suggested-by: Alex Smith Cc: Zubair Lutfullah Kakakhel Signed-off-by: Mathieu Malaterre Signed-off-by: Alexandre Belloni drivers/rtc/rtc-jz4740.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 538d5b333216c3daa7a5821307164f10af73ec8c Author: Tomasz Nowicki Date: Wed Sep 20 10:52:02 2017 +0200 iommu/iova: Make rcache flush optional on IOVA allocation failure Since IOVA allocation failure is not unusual case we need to flush CPUs' rcache in hope we will succeed in next round. However, it is useful to decide whether we need rcache flush step because of two reasons: - Not scalability. On large system with ~100 CPUs iterating and flushing rcache for each CPU becomes serious bottleneck so we may want to defer it. - free_cpu_cached_iovas() does not care about max PFN we are interested in. Thus we may flush our rcaches and still get no new IOVA like in the commonly used scenario: if (dma_limit > DMA_BIT_MASK(32) && dev_is_pci(dev)) iova = alloc_iova_fast(iovad, iova_len, DMA_BIT_MASK(32) >> shift); if (!iova) iova = alloc_iova_fast(iovad, iova_len, dma_limit >> shift); 1. First alloc_iova_fast() call is limited to DMA_BIT_MASK(32) to get PCI devices a SAC address 2. alloc_iova() fails due to full 32-bit space 3. rcaches contain PFNs out of 32-bit space so free_cpu_cached_iovas() throws entries away for nothing and alloc_iova() fails again 4. Next alloc_iova_fast() call cannot take advantage of rcache since we have just defeated caches. In this case we pick the slowest option to proceed. This patch reworks flushed_rcache local flag to be additional function argument instead and control rcache flush step. Also, it updates all users to do the flush as the last chance. Signed-off-by: Tomasz Nowicki Reviewed-by: Robin Murphy Tested-by: Nate Watterson Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 5 +++-- drivers/iommu/dma-iommu.c | 6 ++++-- drivers/iommu/intel-iommu.c | 5 +++-- drivers/iommu/iova.c | 11 ++++++----- include/linux/iova.h | 5 +++-- 5 files changed, 19 insertions(+), 13 deletions(-) commit 49de9828810cb4ccf85ac213d4fd15f1a30fb4f6 Author: Mathieu Malaterre Date: Sun Sep 10 21:39:57 2017 +0200 rtc: jz4740: remove duplicate 'write' in message Trivial fix in error message with duplicate 'write' Signed-off-by: Mathieu Malaterre Signed-off-by: Alexandre Belloni drivers/rtc/rtc-jz4740.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 584ce30c72954e5ec67aaf317d7cbffe6c2c97fa Author: Heiner Kallweit Date: Tue Aug 29 21:52:56 2017 +0200 rtc: ds1307: improve weekday handling The current code for checking and fixing the weekday in ds1307_probe faces some issues: - This check is applied to all chips even if its applicable (AFAIK) to mcp794xx only - The check uses MCP794XX constants for registers and bits even though it's executed also on other chips (ok, this could be fixed easily) - It relies on tm_wday being properly populated when core calls set_time and set_alarm. This is not guaranteed at all. First two issue we could solve by moving the check to the mcp794xx-specific initialization (where also VBATEN flag is set). The proposed alternative is in the set_alarm path for mcp794xx only and calculates the alarm weekday based on the current weekday in the RTC timekeeping regs and the difference between alarm date and current date. So we are fine with any weekday even if it doesn't match the date. Still there are cases where this could fail, e.g.: - rtc date/time + weekday have power-on-reset default values - alarm is set to actual date/time + x - set_time is called (may change diff between rtc weekday and actual weekday) But similar issues we have with the current code too: - rtc date/time + weekday have power-on-reset default values - alarm is set to rtc date/time + x - set_time is called before the alarm triggers Using random rtc date/time with relative alarms simply can interfere with set_time. I'm not totally convinced of either option yet. Signed-off-by: Heiner Kallweit Signed-off-by: Alexandre Belloni drivers/rtc/rtc-ds1307.c | 52 ++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 26 deletions(-) commit 9b8ebbdb74b5ad76b9dfd8b101af17839174b126 Author: Paolo Bonzini Date: Thu Aug 17 15:03:32 2017 +0200 KVM: x86: extend usage of RET_MMIO_PF_* constants The x86 MMU if full of code that returns 0 and 1 for retry/emulate. Use the existing RET_MMIO_PF_RETRY/RET_MMIO_PF_EMULATE enum, renaming it to drop the MMIO part. Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 95 ++++++++++++++++++++++------------------------ arch/x86/kvm/paging_tmpl.h | 18 ++++----- 2 files changed, 55 insertions(+), 58 deletions(-) commit 05cade71cf3b925042569c3e8dc1fa68a2b26995 Author: Ladi Prosek Date: Wed Oct 11 16:54:45 2017 +0200 KVM: nSVM: fix SMI injection in guest mode Entering SMM while running in guest mode wasn't working very well because several pieces of the vcpu state were left set up for nested operation. Some of the issues observed: * L1 was getting unexpected VM exits (using L1 interception controls but running in SMM execution environment) * MMU was confused (walk_mmu was still set to nested_mmu) * INTERCEPT_SMI was not emulated for L1 (KVM never injected SVM_EXIT_SMI) Intel SDM actually prescribes the logical processor to "leave VMX operation" upon entering SMM in 34.14.1 Default Treatment of SMI Delivery. AMD doesn't seem to document this but they provide fields in the SMM state-save area to stash the current state of SVM. What we need to do is basically get out of guest mode for the duration of SMM. All this completely transparent to L1, i.e. L1 is not given control and no L1 observable state changes. To avoid code duplication this commit takes advantage of the existing nested vmexit and run functionality, perhaps at the cost of efficiency. To get out of guest mode, nested_svm_vmexit is called, unchanged. Re-entering is performed using enter_svm_guest_mode. This commit fixes running Windows Server 2016 with Hyper-V enabled in a VM with OVMF firmware (OVMF_CODE-need-smm.fd). Signed-off-by: Ladi Prosek Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 3 +++ arch/x86/kvm/svm.c | 58 ++++++++++++++++++++++++++++++++++++++--- arch/x86/kvm/x86.c | 3 --- 3 files changed, 58 insertions(+), 6 deletions(-) commit c26340651b75d649bea585eba45e32b871188e6e Author: Ladi Prosek Date: Wed Oct 11 16:54:44 2017 +0200 KVM: nSVM: refactor nested_svm_vmrun Analogous to 858e25c06fb0 ("kvm: nVMX: Refactor nested_vmx_run()"), this commit splits nested_svm_vmrun into two parts. The newly introduced enter_svm_guest_mode modifies the vcpu state to transition from L1 to L2, while the code left in nested_svm_vmrun handles the VMRUN instruction. Signed-off-by: Ladi Prosek Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 132 ++++++++++++++++++++++++++++------------------------- 1 file changed, 69 insertions(+), 63 deletions(-) commit 72e9cbdb43384ceacc49e2fb6b8c8fb7c5988778 Author: Ladi Prosek Date: Wed Oct 11 16:54:43 2017 +0200 KVM: nVMX: fix SMI injection in guest mode Entering SMM while running in guest mode wasn't working very well because several pieces of the vcpu state were left set up for nested operation. Some of the issues observed: * L1 was getting unexpected VM exits (using L1 interception controls but running in SMM execution environment) * SMM handler couldn't write to vmx_set_cr4 because of incorrect validity checks predicated on nested.vmxon * MMU was confused (walk_mmu was still set to nested_mmu) Intel SDM actually prescribes the logical processor to "leave VMX operation" upon entering SMM in 34.14.1 Default Treatment of SMI Delivery. What we need to do is basically get out of guest mode and set nested.vmxon to false for the duration of SMM. All this completely transparent to L1, i.e. L1 is not given control and no L1 observable state changes. To avoid code duplication this commit takes advantage of the existing nested vmexit and run functionality, perhaps at the cost of efficiency. To get out of guest mode, nested_vmx_vmexit with exit_reason == -1 is called, a trick already used in vmx_leave_nested. Re-entering is cleaner, using enter_vmx_non_root_mode. This commit fixes running Windows Server 2016 with Hyper-V enabled in a VM with OVMF firmware (OVMF_CODE-need-smm.fd). Signed-off-by: Ladi Prosek Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 60 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 11 deletions(-) commit 21f2d551183847bc7fbe8d866151d00cdad18752 Author: Ladi Prosek Date: Wed Oct 11 16:54:42 2017 +0200 KVM: nVMX: set IDTR and GDTR limits when loading L1 host state Intel SDM 27.5.2 Loading Host Segment and Descriptor-Table Registers: "The GDTR and IDTR limits are each set to FFFFH." Signed-off-by: Ladi Prosek Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 2 ++ 1 file changed, 2 insertions(+) commit 72d7b374b14d67e973bce476e4a75552478cc42d Author: Ladi Prosek Date: Wed Oct 11 16:54:41 2017 +0200 KVM: x86: introduce ISA specific smi_allowed callback Similar to NMI, there may be ISA specific reasons why an SMI cannot be injected into the guest. This commit adds a new smi_allowed callback to be implemented in following commits. Signed-off-by: Ladi Prosek Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/svm.c | 6 ++++++ arch/x86/kvm/vmx.c | 6 ++++++ arch/x86/kvm/x86.c | 2 +- 4 files changed, 14 insertions(+), 1 deletion(-) commit 0234bf885236a41ef05376039f2a8ebe7028a388 Author: Ladi Prosek Date: Wed Oct 11 16:54:40 2017 +0200 KVM: x86: introduce ISA specific SMM entry/exit callbacks Entering and exiting SMM may require ISA specific handling under certain circumstances. This commit adds two new callbacks with empty implementations. Actual functionality will be added in following commits. * pre_enter_smm() is to be called when injecting an SMM, before any SMM related vcpu state has been changed * pre_leave_smm() is to be called when emulating the RSM instruction, when the vcpu is in real mode and before any SMM related vcpu state has been restored Signed-off-by: Ladi Prosek Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_emulate.h | 2 ++ arch/x86/include/asm/kvm_host.h | 3 +++ arch/x86/kvm/emulate.c | 9 +++++++++ arch/x86/kvm/svm.c | 15 +++++++++++++++ arch/x86/kvm/vmx.c | 15 +++++++++++++++ arch/x86/kvm/x86.c | 15 ++++++++++++++- 6 files changed, 58 insertions(+), 1 deletion(-) commit d0006530576f1c7a49b2010eac7afdcb5a3613ae Author: Paolo Bonzini Date: Fri Aug 11 18:36:43 2017 +0200 KVM: SVM: limit kvm_handle_page_fault to #PF handling It has always annoyed me a bit how SVM_EXIT_NPF is handled by pf_interception. This is also the only reason behind the under-documented need_unprotect argument to kvm_handle_page_fault. Let NPF go straight to kvm_mmu_page_fault, just like VMX does in handle_ept_violation and handle_ept_misconfig. Reviewed-by: Brijesh Singh Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 5 ++--- arch/x86/kvm/mmu.h | 3 +-- arch/x86/kvm/svm.c | 15 +++++++++++++-- arch/x86/kvm/vmx.c | 3 +-- 4 files changed, 17 insertions(+), 9 deletions(-) commit 1cf53587c03025885af359da3bd0be091aa34b53 Author: Paolo Bonzini Date: Tue Oct 10 12:51:56 2017 +0200 KVM: SVM: unconditionally wake up VCPU on IOMMU interrupt Checking the mode is unnecessary, and is done without a memory barrier separating the LAPIC write from the vcpu->mode read; in addition, kvm_vcpu_wake_up is already doing a check for waiters on the wait queue that has the same effect. In practice it's safe because spin_lock has full-barrier semantics on x86, but don't be too clever. Reviewed-by: Radim Krčmář Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit c1bd743e54cd653bd5e7082255dc236cfd40dbf0 Author: Tim Hansen Date: Sat Oct 7 23:15:23 2017 -0400 arch/x86: remove redundant null checks before kmem_cache_destroy Remove redundant null checks before calling kmem_cache_destroy. Found with make coccicheck M=arch/x86/kvm on linux-next tag next-20170929. Signed-off-by: Tim Hansen Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8ad8182e935030f5af5122ce0c137529cb53b013 Author: Wanpeng Li Date: Mon Oct 9 15:51:53 2017 -0700 KVM: VMX: Don't expose unrestricted_guest is enabled if ept is disabled SDM mentioned: "If either the “unrestricted guest†VM-execution control or the “mode-based execute control for EPT†VM- execution control is 1, the “enable EPT†VM-execution control must also be 1." However, we can still observe unrestricted_guest is Y after inserting the kvm-intel.ko w/ ept=N. It depends on later starts a guest in order that the function vmx_compute_secondary_exec_control() can be executed, then both the module parameter and exec control fields will be amended. This patch fixes it by amending module parameter immediately during vmcs data setup. Reviewed-by: Jim Mattson Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Jim Mattson Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit a554d207dc46b205dcd707888ba31b13c7cfc009 Author: Wanpeng Li Date: Wed Oct 11 05:10:19 2017 -0700 KVM: X86: Processor States following Reset or INIT - XCR0 is reset to 1 by RESET but not INIT - XSS is zeroed by both RESET and INIT - BNDCFGU, BND0-BND3, BNDCFGS, BNDSTATUS are zeroed by both RESET and INIT This patch does this according to SDM. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Jim Mattson Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 2 ++ arch/x86/kvm/x86.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) commit 44275932589a84a24849290b0d5c22157016a5e6 Author: Radim Krčmář Date: Fri Oct 6 19:25:55 2017 +0200 KVM: x86: thoroughly disarm LAPIC timer around TSC deadline switch Our routines look at tscdeadline and period when deciding state of a timer. The timer is disarmed when switching between TSC deadline and other modes, so we should set everything to disarmed state. Signed-off-by: Radim Krčmář Reviewed-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5d74a6999368ad1991491b1913bb80faf1925e67 Author: Radim Krčmář Date: Fri Oct 6 19:25:54 2017 +0200 KVM: x86: really disarm lapic timer when clearing TMICT preemption timer only looks at tscdeadline and could inject already disarmed timer. Signed-off-by: Radim Krčmář Reviewed-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 86bbc1e6d7ce016f1b2e8c29864cd7b75b00ff96 Author: Radim Krčmář Date: Fri Oct 6 19:25:53 2017 +0200 KVM: x86: handle 0 write to TSC_DEADLINE MSR 0 should disable the timer, but start_hv_timer will recognize it as an expired timer instead. Signed-off-by: Radim Krčmář Reviewed-by: Wanpeng Li Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 3 +++ 1 file changed, 3 insertions(+) commit 46bea48ac241fe0b413805952dda74dd0c09ba8b Author: Shakeel Butt Date: Thu Oct 5 18:07:24 2017 -0700 kvm, mm: account kvm related kmem slabs to kmemcg The kvm slabs can consume a significant amount of system memory and indeed in our production environment we have observed that a lot of machines are spending significant amount of memory that can not be left as system memory overhead. Also the allocations from these slabs can be triggered directly by user space applications which has access to kvm and thus a buggy application can leak such memory. So, these caches should be accounted to kmemcg. Signed-off-by: Shakeel Butt Signed-off-by: Paolo Bonzini arch/x86/kvm/mmu.c | 4 ++-- virt/kvm/kvm_main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 736fdf72518b400321f8b20c770bfb500f829928 Author: David Hildenbrand Date: Thu Aug 24 20:51:37 2017 +0200 KVM: VMX: rename RDSEED and RDRAND vmx ctrls to reflect exiting Let's just name these according to the SDM. This should make it clearer that the are used to enable exiting and not the feature itself. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/include/asm/vmx.h | 4 ++-- arch/x86/kvm/vmx.c | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) commit 1af1ac910bb3394ac1c0062f5781983dde40a8c0 Author: David Hildenbrand Date: Thu Aug 24 20:51:36 2017 +0200 KVM: x86: allow setting identity map addr with no vcpus only Changing it afterwards doesn't make too much sense and will only result in inconsistencies. Reviewed-by: Radim Krčmář Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář Documentation/virtual/kvm/api.txt | 1 + arch/x86/kvm/x86.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) commit 726b99c4f73c2e386c4ec5aa90d5124489573bd2 Author: David Hildenbrand Date: Thu Aug 24 20:51:35 2017 +0200 KVM: x86: document special identity map address value Setting it to 0 leads to setting it to the default value, let's document this. Reviewed-by: Radim Krčmář Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář Documentation/virtual/kvm/api.txt | 3 +++ 1 file changed, 3 insertions(+) commit d8a6e365b208a36f9e789ee50c55096b71367431 Author: David Hildenbrand Date: Thu Aug 24 20:51:34 2017 +0200 KVM: VMX: cleanup init_rmode_identity_map() No need for another enable_ept check. kvm->arch.ept_identity_map_addr only has to be inititalized once. Having alloc_identity_pagetable() is overkill and dropping BUG_ONs is always nice. Reviewed-by: Radim Krčmář Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) commit 1c13bffd946ebb75d7b18e57b2984d581b6b0859 Author: David Hildenbrand Date: Thu Aug 24 20:51:33 2017 +0200 KVM: nVMX: no need to set ept/vpid caps to 0 They are inititally 0, so no need to reset them to 0. Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0ee096d0064ca7eddf13ac5f52fd008b6133f501 Author: David Hildenbrand Date: Thu Aug 24 20:51:32 2017 +0200 KVM: nVMX: no need to set vcpu->cpu when switching vmcs vcpu->cpu is not cleared when doing a vmx_vcpu_put/load, so this can be dropped. Reviewed-by: Radim Krčmář Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 1 - 1 file changed, 1 deletion(-) commit 9522ea9ef95e03bef2a1886ef3db1bde9d384915 Author: David Hildenbrand Date: Thu Aug 24 20:51:31 2017 +0200 KVM: VMX: drop unnecessary function declarations Reviewed-by: Radim Krčmář Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 2 -- 1 file changed, 2 deletions(-) commit f5f51586dba5bb29b21ed5d4c649f4edf72af327 Author: David Hildenbrand Date: Thu Aug 24 20:51:30 2017 +0200 KVM: VMX: require INVEPT GLOBAL for EPT Without this, we won't be able to do any flushes, so let's just require it. Should be absent in very strange configurations. Suggested-by: Paolo Bonzini Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fdf288bf726a491ff1e300c245194be48a6882fd Author: David Hildenbrand Date: Thu Aug 24 20:51:29 2017 +0200 KVM: VMX: call ept_sync_global() with enable_ept only ept_* function should only be called with enable_ept being set. Reviewed-by: Radim Krčmář Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0e1252dc46b9c9a805d704cf3a123132ebb0f8cf Author: David Hildenbrand Date: Thu Aug 24 20:51:28 2017 +0200 KVM: VMX: drop enable_ept check from ept_sync_context() This function is only called with enable_ept. Reviewed-by: Radim Krčmář Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit f2d1da696f515a4ad2df3f03ad922306867c391a Author: David Hildenbrand Date: Thu Aug 24 20:51:27 2017 +0200 KVM: x86: no need to inititalize vcpu members to 0 vmx and svm use zalloc, so this is not necessary. Reviewed-by: Radim Krčmář Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 5 ----- 1 file changed, 5 deletions(-) commit 12d79917a4d67efd4a80dcd57748da10f890508a Author: David Hildenbrand Date: Thu Aug 24 20:51:26 2017 +0200 KVM: VMX: vmx_vcpu_setup() cannot fail Make it a void and drop error handling code. Reviewed-by: Radim Krčmář Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 26de7988499b96f3bca09e5bdf16c0f46541fcc6 Author: David Hildenbrand Date: Thu Aug 24 20:51:25 2017 +0200 KVM: x86: drop BUG_ON(vcpu->kvm) And also get rid of that superfluous local variable "kvm". Reviewed-by: Radim Krčmář Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/x86.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 87ca74ad920ccc8b9fd1c00bd7177070f17ebc95 Author: David Hildenbrand Date: Thu Aug 24 20:51:24 2017 +0200 KVM: x86: mmu: free_page can handle NULL Reviewed-by: Radim Krčmář Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/mmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bb606a9b802584f753f48b6e3369a3026bf5a824 Author: David Hildenbrand Date: Thu Aug 24 20:51:23 2017 +0200 KVM: x86: mmu: returning void in a void function is strange Let's just drop the return. Reviewed-by: Radim Krčmář Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář arch/x86/kvm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c301b909e4b94e6395251787e28b335c51309fff Author: Wanpeng Li Date: Fri Oct 6 07:38:32 2017 -0700 KVM: LAPIC: Apply change to TDCR right away to the timer The description in the Intel SDM of how the divide configuration register is used: "The APIC timer frequency will be the processor's bus clock or core crystal clock frequency divided by the value specified in the divide configuration register." Observation of baremetal shown that when the TDCR is change, the TMCCT does not change or make a big jump in value, but the rate at which it count down change. The patch update the emulation to APIC timer to so that a change to the divide configuration would be reflected in the value of the counter and when the next interrupt is triggered. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li [Fixed some whitespace and added a check for negative delta and running timer. - Radim] Signed-off-by: Radim Krčmář arch/x86/kvm/lapic.c | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) commit dedf9c5e216902c6d34b5a0d0c40f4acbb3706d8 Author: Wanpeng Li Date: Thu Oct 5 18:54:25 2017 -0700 KVM: LAPIC: Keep timer running when switching between one-shot and periodic mode If we take TSC-deadline mode timer out of the picture, the Intel SDM does not say that the timer is disable when the timer mode is change, either from one-shot to periodic or vice versa. After this patch, the timer is no longer disarmed on change of mode, so the counter (TMCCT) keeps counting down. So what does a write to LVTT changes ? On baremetal, the change of mode is probably taken into account only when the counter reach 0. When this happen, LVTT is use to figure out if the counter should restard counting down from TMICT (so periodic mode) or stop counting (if one-shot mode). This patch is based on observation of the behavior of the APIC timer on baremetal as well as check that they does not go against the description written in the Intel SDM. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li [Fixed rate limiting of periodic timer.] Signed-off-by: Radim Krčmář arch/x86/kvm/lapic.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ccbfa1d39b9e6d6e578176d091362287c53c7d4d Author: Wanpeng Li Date: Thu Oct 5 18:54:24 2017 -0700 KVM: LAPIC: Introduce limit_periodic_timer_frequency Extract the logic of limit lapic periodic timer frequency to a new function, this function will be used by later patches. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Radim Krčmář arch/x86/kvm/lapic.c | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) commit c69518c86be5000bf4d8eb0e0d279d40779d2a18 Author: Wanpeng Li Date: Thu Oct 5 03:53:51 2017 -0700 KVM: LAPIC: Fix lapic timer mode transition SDM 10.5.4.1 TSC-Deadline Mode mentioned that "Transitioning between TSC-Deadline mode and other timer modes also disarms the timer". So the APIC Timer Initial Count Register for one-shot/periodic mode should be reset. This patch do it. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li [Removed unnecessary definition of APIC_LVT_TIMER_MASK.] Signed-off-by: Radim Krčmář arch/x86/kvm/lapic.c | 3 +++ 1 file changed, 3 insertions(+) commit 9cc5fbbb8ca2178d94f2eeeb2ce675293a3f8ae2 Author: Jeremy Cline Date: Wed Oct 4 03:08:11 2017 +0000 tools/kvm_stat: Add Python 3 support to kvm_stat Make kvm_stat support Python 3 by changing the use of "print" to a function rather than a statement, switching from "iteritems" and "iterkeys" (removed in Python 3) to "items" and "keys" respectively, and decoding bytes to strings when dealing with text. With this change, kvm_stat is usable with Python 2.6 and greater. Signed-off-by: Jeremy Cline Signed-off-by: Radim Krčmář tools/kvm/kvm_stat/kvm_stat | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) commit 0f107682cb0398265d80237c353a6fa93161d219 Author: Wanpeng Li Date: Thu Sep 28 18:06:24 2017 -0700 KVM: VMX: Don't expose PLE enable if there is no hardware support KVM doesn't expose the PLE capability to the L1 hypervisor, however, ple_window still shows the default value on L1 hypervisor. This patch fixes it by clearing all the PLE related module parameter if there is no PLE capability. Reviewed-by: Konrad Rzeszutek Wilk Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini Signed-off-by: Radim Krčmář arch/x86/kvm/vmx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 1126e108a3ad8ae92a0532259e3da4b14072355f Author: Jacopo Mondi Date: Mon Oct 9 10:48:35 2017 +0200 ARM: dts: gr-peach: Enable ostm0 and ostm1 timers Enable ostm0 and ostm1 timers to be used as clock source and clockevent source. The timers provides greater accuracy than the already enabled mtu2 one. With these enabled: clocksource: ostm: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 57352151442 ns sched_clock: 32 bits at 33MHz, resolution 30ns, wraps every 64440619504ns ostm: used for clocksource ostm: used for clock events Signed-off-by: Jacopo Mondi Suggested-by: Chris Brandt Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100-gr-peach.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 349adfbf27269bad4fa6915e77c97a06487266a5 Author: Jacopo Mondi Date: Mon Oct 9 10:48:34 2017 +0200 ARM: dts: gr-peach: Add ETHER pin group Add pin configuration subnode for ETHER pin group. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100-gr-peach.dts | 39 +++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit e0a10e7b070624965f20205c59fb2a0c0b465782 Author: Biju Das Date: Mon Oct 9 14:21:21 2017 +0100 ARM: dts: r8a7743: Enable DMA for HSUSB This patch adds DMA properties to the HSUSB node. Signed-off-by: Biju Das Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 310861003a0d59cb410538bcdf73a218157a111d Author: Biju Das Date: Mon Oct 9 14:21:20 2017 +0100 ARM: dts: r8a7743: Add USB-DMAC device nodes Signed-off-by: Biju Das Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 405b580227ff1ae8fde82a666a2a5c0391a7e64a Author: Biju Das Date: Wed Oct 11 10:04:33 2017 +0100 ARM: dts: iwg20d-q7: Enable HS-USB Enable HS-USB device for the iWave G20D-Q7 carrier board based on RZ/G1M. Also disable the host mode support on usb otg port by default to avoid pin conflicts. Signed-off-by: Biju Das Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/iwg20d-q7-common.dtsi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4b4a3b1c33b7a389d90624683d8f1a8d1dc2affa Author: Biju Das Date: Mon Oct 9 14:21:18 2017 +0100 ARM: dts: r8a7743: Add HS-USB device node Define the R8A7743 generic part of the HS-USB device node. It is up to the board file to enable the device. Signed-off-by: Biju Das Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit da379f3c1db0c9a1fd27b11d24c9894b5edc7c75 Author: Jarkko Sakkinen Date: Tue Jun 20 11:38:03 2017 +0200 tpm: migrate pubek_show to struct tpm_buf Migrated pubek_show to struct tpm_buf and cleaned up its implementation. Previously the output parameter structure was declared but left completely unused. Now it is used to refer different fields of the output. We can move it to tpm-sysfs.c as it does not have any use outside of that file. Signed-off-by: Jarkko Sakkinen drivers/char/tpm/tpm-sysfs.c | 87 ++++++++++++++++++++++++-------------------- drivers/char/tpm/tpm.h | 13 ------- 2 files changed, 48 insertions(+), 52 deletions(-) commit 02edee152d6ea325c88898f3a702f5db2d78de7a Author: Thomas Gleixner Date: Thu Oct 12 11:05:28 2017 +0200 x86/apic/vector: Ignore set_affinity call for inactive interrupts The core interrupt code can call the affinity setter for inactive interrupts under certain circumstances. For inactive intererupts which use managed or reservation mode this is a pointless exercise as the activation will assign a vector which fits the destination mask. Check for this and return w/o going through the vector assignment. Signed-off-by: Thomas Gleixner arch/x86/kernel/apic/vector.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit de880632fc02a889c0c3d2247fa08dc9e1afa228 Author: Nicolas Pitre Date: Fri Oct 6 19:49:19 2017 +0100 ARM: 8705/1: early_printk: use printascii() rather than printch() With printch() the console messages are sent out one character at a time which is agonizingly slow especially with semihosting as the whole trap intercept, remote byte access, and system resume danse is performed for every single character across a relatively slow remote debug connection. Let's use printascii() to send a whole string at once. This is also going to be more efficient, albeit to a quite lesser extent, with serial ports as well. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King arch/arm/kernel/early_printk.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit e11d1314d83ec7f562fa01df29878d0b1138cf00 Author: Nicolas Pitre Date: Fri Oct 6 19:36:58 2017 +0100 ARM: 8703/1: debug.S: move hexbuf to a writable section This was located in .text which is meant to be read-only. And in the XIP case this shortcut simply doesn't work and may trigger a Flash controller mode switch and crash the kernel. Move it to the .bss area. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King arch/arm/kernel/debug.S | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit aea3c9d9726148331d874c2b91aeb663430099d7 Author: Biju Das Date: Mon Oct 9 14:59:01 2017 +0100 ARM: dts: iwg22d-sodimm: Enable USB PHY Signed-off-by: Biju Das Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts | 4 ++++ 1 file changed, 4 insertions(+) commit bc058f6f03e47610c994a97ecf3bf8a3ea44efee Author: Biju Das Date: Mon Oct 9 14:59:00 2017 +0100 ARM: dts: iwg22d-sodimm: Enable internal PCI Enable internal AHB-PCI bridges for the USB EHCI/OHCI controllers attached to them. Signed-off-by: Biju Das Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c3e35873e37b77581be942b7284e705e997014fc Author: Biju Das Date: Mon Oct 9 14:58:59 2017 +0100 ARM: dts: r8a7745: Link PCI USB devices to USB PHY Describe the PCI USB devices that are behind the PCI bridges, adding necessary links to the USB PHY device. Signed-off-by: Biju Das Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 237173a4bbf4c0710dbb7c35a4e2763671d293df Author: Biju Das Date: Mon Oct 9 14:58:58 2017 +0100 ARM: dts: r8a7745: Add USB PHY DT support Define the r8a7745 generic part of the USB PHY device node. Signed-off-by: Biju Das Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit ab290a32925e6f7db9e71546098077b3e72cc617 Author: Biju Das Date: Mon Oct 9 14:58:57 2017 +0100 ARM: dts: r8a7745: Add internal PCI bridge nodes Add device nodes for the r8a7745 internal PCI bridge devices. Signed-off-by: Biju Das Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 5bdc81259bb0efd5bd71820ef15757b70beae751 Author: Dietmar Eggemann Date: Wed Aug 30 15:41:20 2017 +0100 ARM: dts: r8a7790: add cpu capacity-dmips-mhz information The following 'capacity-dmips-mhz' dt property values are used: Cortex-A15: 1024, Cortex-A7: 539 They have been derived form the cpu_efficiency values: Cortex-A15: 3891, Cortex-A7: 2048 by scaling them so that the Cortex-A15s (big cores) use 1024. The cpu_efficiency values were originally derived from the "Big.LITTLE Processing with ARM Cortex™-A15 & Cortex-A7" white paper (http://www.cl.cam.ac.uk/~rdm34/big.LITTLE.pdf). Table 1 lists 1.9x (3891/2048) as the Cortex-A15 vs Cortex-A7 performance ratio for the Dhrystone benchmark. The following platform is affected once cpu-invariant accounting support is re-connected to the task scheduler: r8a7790-lager Signed-off-by: Dietmar Eggemann Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit bad5680b5052f9d3008a8cfcc0b34ba0da08401d Author: Sven Eckelmann Date: Sat Oct 7 14:21:22 2017 +0200 batman-adv: Add missing kerneldoc for extack The parameter extack was added to batadv_softif_slave_add without adding the kernel-doc for it. This caused kernel-doc warnings. Signed-off-by: Sven Eckelmann Acked-by: David Ahern Signed-off-by: Simon Wunderlich net/batman-adv/soft-interface.c | 1 + 1 file changed, 1 insertion(+) commit a67a4893f37d5389c812d85ccf1e258b87ef4ead Author: Johannes Berg Date: Thu Oct 12 11:23:04 2017 +0200 cfg80211: remove set but never used variable cf_offset Perhaps it had been intended to be used, but it clearly isn't. Signed-off-by: Johannes Berg net/wireless/chan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 331b57d14829c49d75076779cdc54d7e4537bbf0 Merge: 79761ce e43b3b5 Author: Thomas Gleixner Date: Thu Oct 12 11:02:50 2017 +0200 Merge branch 'irq/urgent' into x86/apic Pick up core changes which affect the vector rework. commit 612dde7ec306696d376d88d659f6287391d369a4 Author: Joonas Lahtinen Date: Tue Oct 10 17:33:55 2017 +0300 drm/i915: Simplify intel_sanitize_enable_ppgtt Remove dead code around has_aliasing_ppgtt condition. Suggested-by: Colin Ian King Signed-off-by: Joonas Lahtinen Cc: Colin Ian King Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171010143355.16577-1-joonas.lahtinen@linux.intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 7c781423379d8215f2cc4940700bde0b9f93fed0 Author: Chris Wilson Date: Wed Oct 11 15:18:57 2017 +0100 drm/i915/userptr: Drop struct_mutex before cleanup Purely to silence lockdep, as we know that no bo can exist at this time and so the inversion is impossible. Nevertheless, lockdep currently warns on unload: [ 137.522565] WARNING: possible circular locking dependency detected [ 137.522568] 4.14.0-rc4-CI-CI_DRM_3209+ #1 Tainted: G U [ 137.522570] ------------------------------------------------------ [ 137.522572] drv_module_relo/1532 is trying to acquire lock: [ 137.522574] ("i915-userptr-acquire"){+.+.}, at: [] flush_workqueue+0x91/0x540 [ 137.522581] but task is already holding lock: [ 137.522583] (&dev->struct_mutex){+.+.}, at: [] i915_gem_fini+0x3f/0xc0 [i915] [ 137.522605] which lock already depends on the new lock. [ 137.522608] the existing dependency chain (in reverse order) is: [ 137.522611] -> #3 (&dev->struct_mutex){+.+.}: [ 137.522615] __lock_acquire+0x1420/0x15e0 [ 137.522618] lock_acquire+0xb0/0x200 [ 137.522621] __mutex_lock+0x86/0x9b0 [ 137.522623] mutex_lock_interruptible_nested+0x1b/0x20 [ 137.522640] i915_mutex_lock_interruptible+0x51/0x130 [i915] [ 137.522657] i915_gem_fault+0x20b/0x720 [i915] [ 137.522660] __do_fault+0x1e/0x80 [ 137.522662] __handle_mm_fault+0xa08/0xed0 [ 137.522664] handle_mm_fault+0x156/0x300 [ 137.522666] __do_page_fault+0x2c5/0x570 [ 137.522668] do_page_fault+0x28/0x250 [ 137.522671] page_fault+0x22/0x30 [ 137.522672] -> #2 (&mm->mmap_sem){++++}: [ 137.522677] __lock_acquire+0x1420/0x15e0 [ 137.522679] lock_acquire+0xb0/0x200 [ 137.522682] down_read+0x3e/0x70 [ 137.522699] __i915_gem_userptr_get_pages_worker+0x141/0x240 [i915] [ 137.522701] process_one_work+0x233/0x660 [ 137.522704] worker_thread+0x4e/0x3b0 [ 137.522706] kthread+0x152/0x190 [ 137.522708] ret_from_fork+0x27/0x40 [ 137.522710] -> #1 ((&work->work)){+.+.}: [ 137.522714] __lock_acquire+0x1420/0x15e0 [ 137.522717] lock_acquire+0xb0/0x200 [ 137.522719] process_one_work+0x206/0x660 [ 137.522721] worker_thread+0x4e/0x3b0 [ 137.522723] kthread+0x152/0x190 [ 137.522725] ret_from_fork+0x27/0x40 [ 137.522727] -> #0 ("i915-userptr-acquire"){+.+.}: [ 137.522731] check_prev_add+0x430/0x840 [ 137.522733] __lock_acquire+0x1420/0x15e0 [ 137.522735] lock_acquire+0xb0/0x200 [ 137.522738] flush_workqueue+0xb4/0x540 [ 137.522740] drain_workqueue+0xd4/0x1b0 [ 137.522742] destroy_workqueue+0x1c/0x200 [ 137.522758] i915_gem_cleanup_userptr+0x15/0x20 [i915] [ 137.522770] i915_gem_fini+0x5f/0xc0 [i915] [ 137.522782] i915_driver_unload+0x122/0x180 [i915] [ 137.522794] i915_pci_remove+0x19/0x30 [i915] [ 137.522797] pci_device_remove+0x39/0xb0 [ 137.522800] device_release_driver_internal+0x15d/0x220 [ 137.522803] driver_detach+0x40/0x80 [ 137.522805] bus_remove_driver+0x58/0xd0 [ 137.522807] driver_unregister+0x2c/0x40 [ 137.522809] pci_unregister_driver+0x36/0xb0 [ 137.522828] i915_exit+0x1a/0x8b [i915] [ 137.522831] SyS_delete_module+0x18c/0x1e0 [ 137.522834] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 137.522835] other info that might help us debug this: [ 137.522838] Chain exists of: "i915-userptr-acquire" --> &mm->mmap_sem --> &dev->struct_mutex [ 137.522844] Possible unsafe locking scenario: [ 137.522846] CPU0 CPU1 [ 137.522848] ---- ---- [ 137.522850] lock(&dev->struct_mutex); [ 137.522852] lock(&mm->mmap_sem); [ 137.522854] lock(&dev->struct_mutex); [ 137.522857] lock("i915-userptr-acquire"); [ 137.522859] *** DEADLOCK *** [ 137.522862] 3 locks held by drv_module_relo/1532: [ 137.522864] #0: (&dev->mutex){....}, at: [] device_release_driver_internal+0x2b/0x220 [ 137.522869] #1: (&dev->mutex){....}, at: [] device_release_driver_internal+0x39/0x220 [ 137.522873] #2: (&dev->struct_mutex){+.+.}, at: [] i915_gem_fini+0x3f/0xc0 [i915] [ 137.522888] stack backtrace: [ 137.522891] CPU: 0 PID: 1532 Comm: drv_module_relo Tainted: G U 4.14.0-rc4-CI-CI_DRM_3209+ #1 [ 137.522894] Hardware name: /NUC7i5BNB, BIOS BNKBL357.86A.0048.2017.0704.1415 07/04/2017 [ 137.522897] Call Trace: [ 137.522900] dump_stack+0x68/0x9f [ 137.522902] print_circular_bug+0x235/0x3c0 [ 137.522905] ? lockdep_init_map_crosslock+0x20/0x20 [ 137.522908] check_prev_add+0x430/0x840 [ 137.522919] ? i915_gem_fini+0x5f/0xc0 [i915] [ 137.522922] ? __kernel_text_address+0x12/0x40 [ 137.522925] ? __save_stack_trace+0x66/0xd0 [ 137.522928] __lock_acquire+0x1420/0x15e0 [ 137.522930] ? __lock_acquire+0x1420/0x15e0 [ 137.522933] ? lockdep_init_map_crosslock+0x20/0x20 [ 137.522936] ? __this_cpu_preempt_check+0x13/0x20 [ 137.522938] lock_acquire+0xb0/0x200 [ 137.522940] ? flush_workqueue+0x91/0x540 [ 137.522943] flush_workqueue+0xb4/0x540 [ 137.522945] ? flush_workqueue+0x91/0x540 [ 137.522948] ? __mutex_unlock_slowpath+0x43/0x2c0 [ 137.522951] ? trace_hardirqs_on_caller+0xe3/0x1b0 [ 137.522954] drain_workqueue+0xd4/0x1b0 [ 137.522956] ? drain_workqueue+0xd4/0x1b0 [ 137.522958] destroy_workqueue+0x1c/0x200 [ 137.522975] i915_gem_cleanup_userptr+0x15/0x20 [i915] [ 137.522987] i915_gem_fini+0x5f/0xc0 [i915] [ 137.523000] i915_driver_unload+0x122/0x180 [i915] [ 137.523015] i915_pci_remove+0x19/0x30 [i915] [ 137.523018] pci_device_remove+0x39/0xb0 [ 137.523021] device_release_driver_internal+0x15d/0x220 [ 137.523023] driver_detach+0x40/0x80 [ 137.523026] bus_remove_driver+0x58/0xd0 [ 137.523028] driver_unregister+0x2c/0x40 [ 137.523030] pci_unregister_driver+0x36/0xb0 [ 137.523049] i915_exit+0x1a/0x8b [i915] [ 137.523052] SyS_delete_module+0x18c/0x1e0 [ 137.523055] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 137.523057] RIP: 0033:0x7f7bd0609287 [ 137.523059] RSP: 002b:00007ffef694bc18 EFLAGS: 00000246 ORIG_RAX: 00000000000000b0 [ 137.523062] RAX: ffffffffffffffda RBX: ffffffff81493f33 RCX: 00007f7bd0609287 [ 137.523065] RDX: 0000000000000001 RSI: 0000000000000800 RDI: 0000564f999f9fc8 [ 137.523067] RBP: ffffc90005c4ff88 R08: 0000000000000000 R09: 0000000000000080 [ 137.523069] R10: 00007f7bd20ef8c0 R11: 0000000000000246 R12: 0000000000000000 [ 137.523072] R13: 00007ffef694be00 R14: 0000000000000000 R15: 0000000000000000 [ 137.523075] ? __this_cpu_preempt_check+0x13/0x20 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171011141857.14161-1-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 019114efd9bb21594c36a5fbdab34a004dfb0a79 Author: Hans Verkuil Date: Thu Aug 17 15:19:57 2017 +0200 omapdrm: omapdss_hdmi_ops: add lost_hotplug op The CEC framework needs to know when the hotplug detect signal disappears, since that means the CEC physical address has to be invalidated (i.e. set to f.f.f.f). Add a lost_hotplug op that is called when the HPD signal goes away. Signed-off-by: Hans Verkuil Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/connector-hdmi.c | 8 ++++++-- drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c | 6 +++++- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 8 ++++++-- drivers/gpu/drm/omapdrm/dss/omapdss.h | 1 + 4 files changed, 18 insertions(+), 5 deletions(-) commit 1897e1a394c3a54a86dd46656e96d58e135033db Author: Hans Verkuil Date: Wed Aug 2 10:54:07 2017 +0200 omapdrm: hdmi4: hook up the HDMI CEC support Hook up the HDMI CEC support in the hdmi4 driver. It add the CEC irq handler, the CEC (un)init calls and tells the CEC implementation when the physical address changes. Signed-off-by: Hans Verkuil Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/Kconfig | 8 ++++++++ drivers/gpu/drm/omapdrm/dss/Makefile | 1 + drivers/gpu/drm/omapdrm/dss/hdmi4.c | 23 ++++++++++++++++++++++- 3 files changed, 31 insertions(+), 1 deletion(-) commit 8d7f934df8d87237abd5c5caa318dfbf581854aa Author: Hans Verkuil Date: Wed Aug 2 10:54:06 2017 +0200 omapdrm: hdmi4_cec: add OMAP4 HDMI CEC support Add the source and header for the OMAP4 HDMI CEC support. This code is not yet hooked up, that will happen in the next patch. Signed-off-by: Hans Verkuil Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c | 381 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/omapdrm/dss/hdmi4_cec.h | 55 +++++ 2 files changed, 436 insertions(+) commit a141a29612d7c0ba95a4e36a236d51c2b86e0e2b Author: Hans Verkuil Date: Wed Aug 2 10:54:05 2017 +0200 omapdrm: hdmi4: refcount hdmi_power_on/off_core The hdmi_power_on/off_core functions can be called multiple times: when the HPD changes and when the HDMI CEC support needs to power the HDMI core. So use a counter to know when to really power on or off the HDMI core. Signed-off-by: Hans Verkuil Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/hdmi4.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 1d54ecf230029dccc97e26a520ed95b9b95ae0eb Author: Hans Verkuil Date: Wed Aug 2 10:54:04 2017 +0200 omapdrm: hdmi4: move hdmi4_core_powerdown_disable to hdmi_power_on_core() Call hdmi4_core_powerdown_disable() in hdmi_power_on_core() to power up the HDMI core (needed for CEC). The same call can now be dropped in hdmi4_configure(). Signed-off-by: Hans Verkuil Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/hdmi4.c | 2 ++ drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) commit f3096a4adacd6b3d8197b18b5ad6fffda00983b2 Author: Hans Verkuil Date: Wed Aug 2 10:54:03 2017 +0200 omapdrm: hdmi4: prepare irq handling for HDMI CEC support Pass struct omap_hdmi to the irq handler since it will need access to hdmi.core. Do not clear the IRQ_HDMI_CORE bit: that will be controlled by the HDMI CEC code. Signed-off-by: Hans Verkuil Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/hdmi4.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 5bebbbfecc3d61d3e98913e0a6acbba9a43efd76 Author: Hans Verkuil Date: Wed Aug 2 10:54:02 2017 +0200 omapdrm: hdmi4: make low-level functions available Three low-level functions in hdmi4.c and hdmi4_core.c are made available for use by the OMAP4 CEC support. Renamed the prefix to hdmi4 since these are OMAP4 specific. These function deal with the HDMI core and are needed to power it up for use with CEC, even when the HPD is low. Background: even if the HPD is low it should still be possible to use CEC. Some displays will set the HPD low when they go into standby or when they switch to another input, but CEC is still available and able to wake up/change input for such a display. This is explicitly allowed by the CEC standard. Signed-off-by: Hans Verkuil Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/hdmi4.c | 12 ++++++------ drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 6 +++--- drivers/gpu/drm/omapdrm/dss/hdmi4_core.h | 4 ++++ 3 files changed, 13 insertions(+), 9 deletions(-) commit eb2f17b4965cdfc7337f1a212378430202e37217 Author: Hans Verkuil Date: Wed Aug 2 10:54:01 2017 +0200 omapdrm: hdmi.h: extend hdmi_core_data with CEC fields Extend the hdmi_core_data struct with the additional fields needed for CEC. Also fix a simple typo in a comment. Signed-off-by: Hans Verkuil Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/dss/hdmi.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3b86b9ec21031aeaa8a9c2634299c1aa5c686bfd Author: Hans Verkuil Date: Wed Aug 2 10:54:00 2017 +0200 omapdrm: encoder-tpd12s015: keep ls_oe_gpio high For OMAP4 CEC support the CEC pin should always be on. So keep ls_oe_gpio high all the time in order to support CEC. Background: even if the HPD is low it should still be possible to use CEC. Some displays will set the HPD low when they go into standby or when they switch to another input, but CEC is still available and able to wake up/change input for such a display. This is explicitly allowed by the CEC standard. Signed-off-by: Hans Verkuil Signed-off-by: Tomi Valkeinen drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 1e4078f0bba46ad61b69548abe6a6faf63b89380 Author: Ingo Molnar Date: Thu Oct 12 09:24:30 2017 +0200 x86/unwinder: Make CONFIG_UNWINDER_ORC=y the default in the 64-bit defconfig Increase testing coverage by turning on the primary x86 unwinder for the 64-bit defconfig. Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar arch/x86/configs/x86_64_defconfig | 1 + 1 file changed, 1 insertion(+) commit e2a021d4491c4ce0f8b082121951d8c59260ed5d Author: Linus Walleij Date: Wed Oct 11 12:04:35 2017 +0200 pinctrl: Do not depend in GPIOLIB, select it Instead of depends on GPIOLIB and having to run around in Kconfig menus looking for why your device is not available, simply select it from the pin control drivers that need it. The Kconfig for GPIOLIB is improved, selectable and this should "just work". Cc: Phil Reid Cc: Sebastian Reichel Cc: Peter Rosin Cc: Andrey Smirnov Acked-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 6 ++++-- drivers/pinctrl/intel/Kconfig | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) commit df8bbd0c98bef5bcf691709437c4102e9840b0f5 Author: Heiko Carstens Date: Fri Oct 6 13:17:10 2017 +0200 s390/kprobes: remove KPROBE_SWAP_INST state For an unknown reason the s390 kprobes instruction replacement function modifies the kprobe_status of the current CPU to KPROBE_SWAP_INST. This was supposed to catch traps that happened during instruction patching. Such a fault is not supposed to happen, and silently discarding such a fault is certainly also not what we want. In fact s390 is the only architecture which has this odd piece of code. Just remove this and behave like all other architectures. This was pointed out by Jens Remus. Reported-by: Jens Remus Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/kprobes.h | 2 -- arch/s390/kernel/kprobes.c | 7 ------- 2 files changed, 9 deletions(-) commit 8cd00d5a43982417d0671f94af933ad3be2f3be9 Author: Bjorn Andersson Date: Tue Oct 10 22:08:57 2017 -0700 arm64: dts: msm8916: Mark rmtfs node as qcom, rmtfs-mem compatible Now that we have a binding defined for the shared file system memory use this to describe the rmtfs memory region. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 00f8497f57ae533d7f64bc0cb713f2e491ed0018 Author: Rajendra Nayak Date: Tue Oct 10 14:27:14 2017 +0530 arm64: dts: msm8996: Add the rpm clock controller node Add the rpm clock controller node for msm8996 devices Cc: Andy Gross Signed-off-by: Rajendra Nayak Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8996.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit f6b1674d570aa103eff5627272baef38619c4155 Author: Linus Walleij Date: Mon Oct 9 11:28:44 2017 +0200 arm64: dts: qcom: sbc: Name GPIO lines This names the GPIO lines on the APQ8016 "SBC" also known as the DragonBoard 410c, according to the schematic. This is necessary for a conforming userspace looking across all GPIO chips for the GPIO lines named "GPIO-A" thru "GPIO-L". Signed-off-by: Linus Walleij Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 169 ++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) commit 2f8d2931be8a2e9ede73ce99fa87dc0c18e81cb2 Author: Craig Tatlor Date: Fri Oct 6 16:57:51 2017 +0100 arm64: dts: qcom: msm8916: Shrink mdp address length for msm8916 This shrinks the address size down to 89000 from its previous 90000 which was mistakenly pulled from downstream. Signed-off-by: Craig Tatlor Acked-by: Rob Clark Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64c4d0a7af86cf86a38e154ef0b6eefabb00bc34 Author: Srinivas Kandagatla Date: Mon Sep 18 13:14:59 2017 +0200 arm64: dts: apq8016-sbc: add mbhc buttons support This patch adds voltage thresholds configuration required for getting audio headsets button support. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 1f34d6440dde65722b037f91d0c1d9053cd356f9 Author: Bjorn Andersson Date: Mon Aug 14 15:46:19 2017 -0700 arm64: dts: qcom: Specify dload address for msm8916 and msm8996 On msm8916 and msm8996 boards a secure io-write is used to write the magic for selecting "download mode", specify this address in the DeviceTree. Note that qcom_scm.download_mode=1 must be specified on the kernel command line for the kernel to attempt selecting download mode. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 ++ arch/arm64/boot/dts/qcom/msm8996.dtsi | 7 +++++++ 2 files changed, 9 insertions(+) commit 82fa28788d2f144bc7ae08b95a306c84787a125b Author: Srinivas Kandagatla Date: Mon Aug 14 13:37:57 2017 +0200 arm64: dts: apq8096-db820c: never disable regulator on LS expansion 1.8v regulator on LS expansion should not be disabled anytime to comply with 96boards spec. So make this explicit with always-on flag. Signed-off-by: Srinivas Kandagatla Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 8c1b7dc9ba2294c6dbd1870a3d2e534bfda3047a Author: Bjorn Andersson Date: Mon Aug 14 15:46:18 2017 -0700 firmware: qcom: scm: Expose download-mode control In order to aid post-mortem debugging the Qualcomm platforms provide a "memory download mode", where the boot loader will provide an interface for custom tools to "download" the content of RAM to a host machine. The mode is triggered by writing a magic value somewhere in RAM, that is read in the boot code path after a warm-restart. Two mechanism for setting this magic value are supported in modern platforms; a direct SCM call to enable the mode or through a secure io write of a magic value. In order for a normal reboot not to trigger "download mode" the magic must be cleared during a clean reboot. Download mode has to be enabled by including qcom_scm.download_mode=1 on the command line. Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross .../devicetree/bindings/firmware/qcom,scm.txt | 2 + drivers/firmware/Kconfig | 11 ++++ drivers/firmware/qcom_scm-32.c | 6 ++ drivers/firmware/qcom_scm-64.c | 13 ++++ drivers/firmware/qcom_scm.c | 75 ++++++++++++++++++++++ drivers/firmware/qcom_scm.h | 2 + 6 files changed, 109 insertions(+) commit 4e659dbe2d02a56ca0df25c77e099760252a329c Author: Bjorn Andersson Date: Mon Aug 14 15:46:17 2017 -0700 firmware: qcom: scm: Expose secure IO service The secure IO service provides operations for reading and writing secure memory from non-secure mode, expose this API through SCM. Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/firmware/qcom_scm-32.c | 18 ++++++++++++++++++ drivers/firmware/qcom_scm-64.c | 31 +++++++++++++++++++++++++++++++ drivers/firmware/qcom_scm.c | 12 ++++++++++++ drivers/firmware/qcom_scm.h | 6 ++++++ include/linux/qcom_scm.h | 4 ++++ 5 files changed, 71 insertions(+) commit e691b48dcc7553b423bcbc7ddcd9f51698d093b1 Author: Chris Lew Date: Wed Oct 11 14:29:10 2017 -0700 soc: qcom: smem: Increase the number of hosts Increase the maximum number of hosts in a system to 10. Signed-off-by: Chris Lew Acked-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/smem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b3940676107dd65165b5eaea58fa60442d29a1f Author: Chris Lew Date: Wed Oct 11 14:29:09 2017 -0700 soc: qcom: smem: Support dynamic item limit In V12 SMEM, SBL writes SMEM parameter information after the TOC. Use the SBL provided item count as the max item number. Signed-off-by: Chris Lew Acked-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/smem.c | 51 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 6 deletions(-) commit d52e404874369f10d20519f4095478d9cb4d6aad Author: Chris Lew Date: Wed Oct 11 14:29:08 2017 -0700 soc: qcom: smem: Support global partition SMEM V12 creates a global partition to allocate global smem items from instead of a global heap. The global partition has the same structure as a private partition. Signed-off-by: Chris Lew Acked-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/smem.c | 172 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 142 insertions(+), 30 deletions(-) commit dcc0967dd776cefe04856726a39195c1c5edbd2c Author: Chris Lew Date: Wed Oct 11 14:29:07 2017 -0700 soc: qcom: smem: Read version from the smem header The SMEM header structure includes the version information. Read the version directly from the header instead of getting an item from the global heap. Signed-off-by: Chris Lew Acked-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/smem.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) commit a216000f0140f415cec96129f777b5234c9d142f Author: Chris Lew Date: Wed Oct 11 14:29:06 2017 -0700 soc: qcom: smem: Use le32_to_cpu for comparison Endianness can vary in the system, add le32_to_cpu when comparing partition sizes from smem. Signed-off-by: Chris Lew Acked-by: Bjorn Andersson Signed-off-by: Andy Gross drivers/soc/qcom/smem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 952925dec0f276b407b2abce4aee82cba7c700c3 Author: Colin Ian King Date: Wed Oct 11 11:56:23 2017 +0100 bpf: remove redundant variable old_flags Variable old_flags is being assigned but is never read; it is redundant and can be removed. Cleans up clang warning: Value stored to 'old_flags' is never read Signed-off-by: Colin Ian King Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/cgroup.c | 2 -- 1 file changed, 2 deletions(-) commit df24cd4fdac6b268ccd877d376ab4f35cd8efb30 Merge: 14c68c4 f025fd6 Author: David S. Miller Date: Wed Oct 11 20:21:23 2017 -0700 Merge branch 'mlx4-XDP-TX-improvements' Tariq Toukan says: ==================== mlx4_en XDP TX improvements This patchset contains performance improvements to the XDP_TX use case in the mlx4 Eth driver. Patch 1 is a simple change in a function parameter type. Patch 2 replaces a call to a generic function with the relevant parts inlined. Patch 3 moves the write of descriptors' constant values from data path to control path. Series generated against net-next commit: 833e0e2f24fd net: dst: move cpu inside ifdef to avoid compilation warning ==================== Signed-off-by: David S. Miller commit f025fd6061e120713d6c11c92983804c6805d6cb Author: Tariq Toukan Date: Wed Oct 11 13:17:27 2017 +0300 net/mlx4_en: XDP_TX, assign constant values of TX descs on ring creaion In XDP_TX, some fields in tx_info and tx_desc are constants across all entries of the different XDP_TX rings. Assign values to these fields on ring creation time, rather than in data-path. Patchset 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 | 13.7 Mpps | 14.0 Mpps | %2.2 | ------------------------------ Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 1 + drivers/net/ethernet/mellanox/mlx4/en_tx.c | 38 ++++++++++++++++---------- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 ++ 3 files changed, 27 insertions(+), 14 deletions(-) commit f6f0aa97413a420606aabe8142f8a5c0f15b9246 Author: Tariq Toukan Date: Wed Oct 11 13:17:26 2017 +0300 net/mlx4_en: Obsolete call to generic write_desc in XDP xmit flow Function mlx4_en_tx_write_desc() is not optimized to use of XDP xmit. Use the relevant parts inline instead. Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_tx.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 5dad61b83840d7eceaba5bf316419be11bbb993a Author: Tariq Toukan Date: Wed Oct 11 13:17:25 2017 +0300 net/mlx4_en: Replace netdev parameter with priv in XDP xmit function The struct net_device parameter was passed only to extract struct mlx4_en_priv out of it. Here we pass the priv parameter directly. Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 3 +-- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) commit 14c68c43b7695cbcfe148bf3c513b598c2886e7d Author: Colin Ian King Date: Wed Oct 11 10:53:28 2017 +0100 net: mpls: make function ipgre_mpls_encap_hlen static The function ipgre_mpls_encap_hlen is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'ipgre_mpls_encap_hlen' was not declared. Should it be static? Fixes: bdc476413dcdb ("ip_tunnel: add mpls over gre support") Signed-off-by: Colin Ian King Acked-by: David Ahern Signed-off-by: David S. Miller net/mpls/af_mpls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a37b770cf78dca77c386f8a95e05403233e4d52 Author: Colin Ian King Date: Wed Oct 11 11:17:57 2017 +0100 sctp: make array sctp_sched_ops static The array sctp_sched_ops is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'sctp_sched_ops' was not declared. Should it be static? Signed-off-by: Colin Ian King Acked-by: Neil Horman Signed-off-by: David S. Miller net/sctp/stream_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c24675f871d3bca569532b3744962dd49938ddff Author: Florian Westphal Date: Wed Oct 11 10:28:01 2017 +0200 ipv6: addrconf: don't use rtnl mutex in RTM_GETADDR Similar to the previous patch, use the device lookup functions that bump device refcount and flag this as DOIT_UNLOCKED to avoid rtnl mutex. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/ipv6/addrconf.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4ea2607f7871ca433ab0c5300289215974213f26 Author: Florian Westphal Date: Wed Oct 11 10:28:00 2017 +0200 ipv6: addrconf: don't use rtnl mutex in RTM_GETNETCONF Instead of relying on rtnl mutex bump device reference count. After this change, values reported can change in parallel, but thats not much different from current state, as anyone can change the settings right after rtnl_unlock (and before userspace processed reply). While at it, switch to GFP_KERNEL allocation. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/ipv6/addrconf.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit b274f6db148a87055052aa8fd4fdd4a0b65b8bd5 Merge: 7c6a86b 7578d7b Author: David S. Miller Date: Wed Oct 11 20:15:43 2017 -0700 Merge branch 'net-sched-get-rid-of-cls_flower-egress_dev' Jiri Pirko says: ==================== net: sched: get rid of cls_flower->egress_dev Introduction of cls_flower->egress_dev was a workaround. Turned out to be a bit ugly hack. So replace it with more generic and reusable infrastructure. This is a dependency of shared block introduction that will be send as a follow-up patchsets group. ==================== Signed-off-by: David S. Miller commit 7578d7b45ed870b13a8ace57e32feaed623c2a94 Author: Jiri Pirko Date: Wed Oct 11 09:41:10 2017 +0200 net: sched: remove unused tcf_exts_get_dev helper and cls_flower->egress_dev The helper and the struct field ares no longer used by any code, so remove them. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/pkt_cls.h | 3 --- net/sched/cls_api.c | 22 ---------------------- 2 files changed, 25 deletions(-) commit 717503b9cf57c0bb7ea4d3a9f5699c9a04adf988 Author: Jiri Pirko Date: Wed Oct 11 09:41:09 2017 +0200 net: sched: convert cls_flower->egress_dev users to tc_setup_cb_egdev infra The only user of cls_flower->egress_dev is mlx5. So do the conversion there alongside with the code originating the call in cls_flower function fl_hw_replace_filter to the newly introduced egress device callback infrastucture. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 ++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 31 +++++++---- include/net/pkt_cls.h | 5 +- net/sched/cls_api.c | 13 +++-- net/sched/cls_flower.c | 63 ++++++++++++----------- 6 files changed, 73 insertions(+), 46 deletions(-) commit b3f55bdda8df55a563005e00b1b71212d8546541 Author: Jiri Pirko Date: Wed Oct 11 09:41:08 2017 +0200 net: sched: introduce per-egress action device callbacks Introduce infrastructure that allows drivers to register callbacks that are called whenever tc would offload inserted rule and specified device acts as tc action egress device. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/act_api.h | 34 ++++++++ include/net/pkt_cls.h | 2 + net/sched/act_api.c | 220 ++++++++++++++++++++++++++++++++++++++++++++++++++ net/sched/cls_api.c | 30 +++++++ 4 files changed, 286 insertions(+) commit 843e79d05addd8eb06992cd6dfafc7b9d53f2bc8 Author: Jiri Pirko Date: Wed Oct 11 09:41:07 2017 +0200 net: sched: make tc_action_ops->get_dev return dev and avoid passing net Return dev directly, NULL if not possible. That is enough. Makes no sense to pass struct net * to get_dev op, as there is only one net possible, the one the action was created in. So just store it in mirred priv and use directly. Rename the mirred op callback function. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/act_api.h | 3 +-- include/net/tc_act/tc_mirred.h | 1 + net/sched/act_mirred.c | 13 +++++-------- net/sched/cls_api.c | 6 ++---- 4 files changed, 9 insertions(+), 14 deletions(-) commit 7c6a86b4cd1b0134a4768505ce10e4ef3b9b0213 Merge: 5ef9d78 60d58f9 Author: David S. Miller Date: Wed Oct 11 20:05:30 2017 -0700 Merge branch 'rmnet-Rewrite-some-existing-functionality' Subash Abhinov Kasiviswanathan says: ==================== net: qualcomm: rmnet: Rewrite some existing functionality This series fixes some of the broken rmnet functionality. Bridge mode is re-written and made useable and the muxed_ep is converted to hlist. Patches 1-5 are cleanups in preparation for these changes. Patch 6 does the hlist conversion. Patch 7 has the implementation of the rmnet bridge mode. v1->v2: Fix the warning and code style issue in rmnet_rx_handler as mentioned by David. ==================== Signed-off-by: David S. Miller commit 60d58f971c1077a0f2467b2d5bc38058df43a819 Author: Subash Abhinov Kasiviswanathan Date: Wed Oct 11 18:43:58 2017 -0600 net: qualcomm: rmnet: Implement bridge mode Add support to bridge two devices which can send multiplexing and aggregation (MAP) data. This is done only when the data itself is not going to be consumed in the stack but is being passed on to a different endpoint. This is mainly used for testing. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 93 +++++++++++++++++++++- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 7 +- .../net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 26 +++++- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 2 + 4 files changed, 122 insertions(+), 6 deletions(-) commit 3352e6c45760fd6675468a35ef699ab94617cab4 Author: Subash Abhinov Kasiviswanathan Date: Wed Oct 11 18:43:57 2017 -0600 net: qualcomm: rmnet: Convert the muxed endpoint to hlist Rather than using a static array, use a hlist to store the muxed endpoints and use the mux id to query the rmnet_device. This is useful as usually very few mux ids are used. Signed-off-by: Subash Abhinov Kasiviswanathan Cc: Dan Williams Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 75 ++++++++++++---------- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 4 +- .../net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 17 +++-- .../ethernet/qualcomm/rmnet/rmnet_map_command.c | 4 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 15 +++-- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.h | 6 +- 6 files changed, 68 insertions(+), 53 deletions(-) commit 5451237ff7a77ded1d81538e3daa76dc3ee60538 Author: Subash Abhinov Kasiviswanathan Date: Wed Oct 11 18:43:56 2017 -0600 net: qualcomm: rmnet: Remove duplicate setting of rmnet_devices The rmnet_devices information is already stored in muxed_ep, so storing this in rmnet_devices[] again is redundant. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 1 - drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) commit 56470c927f1ba1e101b5e5a93e02d23a14fd99b7 Author: Subash Abhinov Kasiviswanathan Date: Wed Oct 11 18:43:55 2017 -0600 net: qualcomm: rmnet: Remove duplicate setting of rmnet private info The end point is set twice in the local_ep as well as the mux_id and the real_dev in the rmnet private structure. Remove the local_ep. While these elements are equivalent, rmnet_endpoint will be used only as part of the rmnet_port for muxed scenarios in VND mode. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 10 ++-------- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 4 ---- drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 18 ++++++++++-------- drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.h | 3 +-- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 19 ++----------------- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.h | 1 - 6 files changed, 15 insertions(+), 40 deletions(-) commit 9148963201a4627a632d2c769805c9278f6d22d7 Author: Subash Abhinov Kasiviswanathan Date: Wed Oct 11 18:43:54 2017 -0600 net: qualcomm: rmnet: Move rmnet_mode to rmnet_port Mode information on the real device makes it easier to route packets to rmnet device or bridged device based on the configuration. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 12 +++++------- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 2 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 3 +-- 3 files changed, 7 insertions(+), 10 deletions(-) commit 1281726ec341702b16c3e67ea37ba485cf72ee66 Author: Subash Abhinov Kasiviswanathan Date: Wed Oct 11 18:43:53 2017 -0600 net: qualcomm: rmnet: Remove some unused defines Most of these constants were used in the initial patchset where custom netlink configuration was used and hence are no longer relevant. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_private.h | 8 -------- 1 file changed, 8 deletions(-) commit d8bbb07adbfab5a8e03c361c7dd67fe0003d3757 Author: Subash Abhinov Kasiviswanathan Date: Wed Oct 11 18:43:52 2017 -0600 net: qualcomm: rmnet: Remove existing logic for bridge mode This will be rewritten in the following patches. Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 1 - .../net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 77 +++------------------- 2 files changed, 9 insertions(+), 69 deletions(-) commit cfe057f7db1ff026c8db75469a3f9ba9736e1975 Author: Al Viro Date: Mon Sep 11 21:17:09 2017 +0100 iomap_dio_actor(): fix iov_iter bugs 1) Ignoring return value from iov_iter_zero() is wrong for iovec-backed case as well as for pipes - it can fail. 2) Failure to fault destination pages in 25Mb into a 50Mb iovec should not act as if nothing in the area had been read, nevermind that the first 25Mb might have *already* been read by that point. Signed-off-by: Al Viro fs/iomap.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit 8ececffa12f5555171075ce52e1226f570836b26 Author: Al Viro Date: Mon Sep 25 13:58:39 2017 -0400 switch ksocknal_lib_recv_...() to use of iov_iter_for_each_range() ... and fold kvec and bio_vec variants in one Signed-off-by: Al Viro .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 3 +- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 44 +---------- .../lustre/lnet/klnds/socklnd/socklnd_lib.c | 87 +++++----------------- 3 files changed, 25 insertions(+), 109 deletions(-) commit 33ec9c5cae2526ee2ef4f8224ddd2d7779b64e89 Author: Al Viro Date: Sun Sep 24 22:54:53 2017 -0400 lustre: switch struct ksock_conn to iov_iter Merge ksnc_rx_{no_wanted,iov,kiov,niov,nkiov} into a single iov_iter (ksnc_rx_to). Signed-off-by: Al Viro .../staging/lustre/lnet/klnds/socklnd/socklnd.c | 4 +- .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 6 +- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 123 ++++++--------------- .../lustre/lnet/klnds/socklnd/socklnd_lib.c | 40 +++---- 4 files changed, 52 insertions(+), 121 deletions(-) commit 2f240c4ae8869907d4c8161ee015bedb366512e2 Author: Al Viro Date: Sun Sep 24 22:07:59 2017 -0400 vhost/scsi: switch to iov_iter_get_pages() Signed-off-by: Al Viro drivers/vhost/scsi.c | 68 ++++++++++++++++------------------------------------ 1 file changed, 20 insertions(+), 48 deletions(-) commit 11d49e9d089ccec81be87c2386dfdd010d7f7f6e Author: Al Viro Date: Sun Sep 24 18:36:44 2017 -0400 fix a page leak in vhost_scsi_iov_to_sgl() error recovery we are advancing sg as we go, so the pages we need to drop in case of error are *before* the current sg. Cc: stable@vger.kernel.org Signed-off-by: Al Viro drivers/vhost/scsi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 09cf698a594276139b7dfafb232af3fe4fbc4438 Author: Al Viro Date: Sat Feb 18 01:44:03 2017 -0500 new primitive: iov_iter_for_each_range() For kvec and bvec: feeds segments to given callback as long as it returns 0. For iovec and pipe: fails. Signed-off-by: Al Viro include/linux/uio.h | 4 ++++ lib/iov_iter.c | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) commit 6d1ff4d6f37dc3c14d9fc08dbbbb920a12c21f84 Author: Al Viro Date: Sat Feb 18 00:37:49 2017 -0500 lnet_return_rx_credits_locked: don't abuse list_entry Signed-off-by: Al Viro drivers/staging/lustre/lnet/lnet/lib-move.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83683dc6e017dabfd8c2c0e9301b94b8a2d01233 Author: Al Viro Date: Sun Sep 24 17:46:21 2017 -0400 xen: don't open-code iov_iter_kvec() Signed-off-by: Al Viro drivers/xen/pvcalls-back.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit a87f854ddcf7ff7e044d72db0aa6da82f26d69a6 Author: Neil Armstrong Date: Wed Oct 11 17:39:40 2017 +0200 ARM64: dts: meson-gx: remove unnecessary uart compatible Since the switch to documented uart bindings, the old undocumented compatible binding was left for simplicity. This patch removes these unneeded compatible strings. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ab29891e953fd7c3410f3edeb50457812f7694d8 Author: Neil Armstrong Date: Wed Oct 11 17:39:39 2017 +0200 ARM64: dts: meson-gx: remove unnecessary clocks properties Since the switch to documented uart bindings, the clocks are redefined in the SoC family dtsi file. This patch removes these unneeded properties. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 3 --- 1 file changed, 3 deletions(-) commit 4ee8e51b9edfe7845a094690a365c844e5a35b4b Author: Neil Armstrong Date: Wed Oct 11 17:23:12 2017 +0200 ARM64: dts: meson-gxl: Add alternate ARM Trusted Firmware reserved memory zone This year, Amlogic updated the ARM Trusted Firmware reserved memory mapping for Meson GXL SoCs and products sold since May 2017 uses this alternate reserved memory mapping. But products had been sold using the previous mapping. This issue has been explained in [1] and a dynamic solution is yet to be found to avoid loosing another 3Mbytes of reservable memory. In the meantime, this patch adds this alternate memory zone only for the GXL and GXM SoCs since GXBB based new products stopped earlier. [1] http://lists.infradead.org/pipermail/linux-amlogic/2017-October/004860.html Fixes: bba8e3f42736 ("ARM64: dts: meson-gx: Add firmware reserved memory zones") Reported-by: Jerome Brunet Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit a1d759cf528064e73c06d318cd03213c4eafbc35 Author: Jerome Brunet Date: Tue Oct 10 16:18:22 2017 +0200 ARM64: dts: meson-gxm: enable HS400 on the vim2 Enable HS400 high speed eMMC mode on the khadas vim2 Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 1 + 1 file changed, 1 insertion(+) commit c5c7bc71a0e6bc382744497e45c6c70503f9d7e6 Merge: 418da17 e18063e Author: Dave Airlie Date: Thu Oct 12 10:20:03 2017 +1000 Merge tag 'drm-intel-next-2017-09-29' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2nd batch of v4.15 features: - lib/scatterlist updates, use for userptr allocations (Tvrtko) - Fixed point wrapper cleanup (Mahesh) - Gen9+ transition watermarks, watermark optimization and fixes (Mahesh) - Display IPC (Isochronous Priority Control) support (Mahesh) - GEM workaround fixes (Oscar) - GVT: PCI config sanitize series (Changbin) - GVT: Workload submission error handling series (Fred) - PSR fixes and refactoring (Rodrigo) - HWSP based optimizations (Chris) - Private PAT management (Zhi) - IRQ handling fixes and refactoring (Ville) - Module parameter refactoring and variable name clash fix (Michal) - Execlist refactoring, incomplete request unwinding on reset (Chris) - GuC scheduling improvements (Michal) - OA updates (Lionel) - Coffeelake out of alpha support (Rodrigo) - seqno fixes (Chris) - Execlist refactoring (Mika) - DP and DP MST cleanups (Dhinakaran) - Cannonlake slice/sublice config (Ben) - Numerous fixes all around (Everyone) * tag 'drm-intel-next-2017-09-29' of git://anongit.freedesktop.org/drm/drm-intel: (168 commits) drm/i915: Update DRIVER_DATE to 20170929 drm/i915: Use memset64() to prefill the GTT page drm/i915: Also discard second CRC on gen8+ platforms. drm/i915/psr: Set frames before SU entry for psr2 drm/dp: Add defines for latency in sink drm/i915: Allow optimized platform checks drm/i915: Avoid using dev_priv->info.gen directly. i915: Use %pS printk format for direct addresses drm/i915/execlists: Notify context-out for lost requests drm/i915/cnl: Add support slice/subslice/eu configs drm/i915: Compact device info access by a small re-ordering drm/i915: Add IS_PLATFORM macro drm/i915/selftests: Try to recover from a wedged GPU during reset tests drm/i915/huc: Reorganize HuC authentication drm/i915: Fix default values of some modparams drm/i915: Extend I915_PARAMS_FOR_EACH with default member value drm/i915: Make I915_PARAMS_FOR_EACH macro more flexible drm/i915: Enable scanline read based on frame timestamps drm/i915/execlists: Microoptimise execlists_cancel_port_request() drm/i915: Don't rmw PIPESTAT enable bits ... commit fce107aea2cbea0d3bc6d170ba6ce14111661a1b Author: Martin Blumenstingl Date: Sat Oct 7 18:29:40 2017 +0200 ARM: multi_v7_defconfig: enable the Meson MX SDIO/MMC controller This enables the new Amlogic Meson MX SDIO/MMC controller driver, which typically connects to the SD card and SDIO wifi module. The driver is enabled as built-in to allow booting from the SD card. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 88b1b18ffeae1d65e22ec24040545a84c3ace352 Author: Martin Blumenstingl Date: Sat Oct 7 18:29:39 2017 +0200 ARM: dts: meson: add the SDIO MMC controller Meson6, Meson8 and Meson8b are using the same MMC controller IP. This adds the MMC controller node to meson.dtsi so it can be used by all SoCs. The controller itself is a bit special, because it has multiple slots. Each slot is accessed through a sub-node of the controller. However, currently the driver for this hardware only supports one slot. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson.dtsi | 9 +++++++++ arch/arm/boot/dts/meson8.dtsi | 6 ++++++ arch/arm/boot/dts/meson8b.dtsi | 6 ++++++ 3 files changed, 21 insertions(+) commit e2f4d749e73a468902f2d2453b1575602427c069 Author: Peter Korsgaard Date: Thu Oct 5 15:21:18 2017 +0200 ARM64: dts: meson-gxbb-nexbox-a95x: Enable USB Nodes Enable both gxbb USB controllers and add a 5V regulator for the OTG port VBUS, similar to p20x. Signed-off-by: Peter Korsgaard Acked-by: Neil Armstrong Signed-off-by: Kevin Hilman .../boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit abe8bbd308c5f2864c1bc066a0e60ec59a0ae450 Author: Neil Armstrong Date: Tue Oct 3 17:29:45 2017 +0200 dt-bindings: arm: amlogic: Add Tronsmart Vega S96 binding Cc: support@tronsmart.com Acked-by: Jerome Brunet Signed-off-by: Oleg Ivanov Signed-off-by: Neil Armstrong Acked-by: Rob Herring Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/arm/amlogic.txt | 1 + 1 file changed, 1 insertion(+) commit 593d311d9f176dd5ee48ac95f146fc141bdd41fa Author: Neil Armstrong Date: Tue Oct 3 17:29:44 2017 +0200 ARM64: dts: meson-gxm: Add Vega S96 board The Tronsmart Vega S96 is a TV box derived from Amlogic q200 reference design. Cc: support@tronsmart.com Acked-by: Jerome Brunet Signed-off-by: Oleg Ivanov Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/Makefile | 1 + arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts | 38 ++++++++++++++++++++++ 2 files changed, 39 insertions(+) commit b8b74dda3908660f49a5d5cec28725e3950e00d5 Author: Neil Armstrong Date: Tue Oct 3 17:24:43 2017 +0200 ARM64: dts: meson-gxm: Add support for Khadas VIM2 The Khadas VIM2 is a Single Board Computer, respin of the origin Khadas VIM board, using an Amlogic S912 SoC and more server oriented. It provides the same external connectors and header pinout, plus a SPI NOR Flash, a reprogrammable STM8S003 MCU, FPC Connector, Cooling FAN header and Pogo Pads Arrays. Cc: Gouwa Acked-by: Martin Blumenstingl Acked-by: Rob Herring Signed-off-by: Neil Armstrong Tested-by: Jerome Brunet Signed-off-by: Kevin Hilman Documentation/devicetree/bindings/arm/amlogic.txt | 1 + arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 399 +++++++++++++++++++++ 3 files changed, 401 insertions(+) commit ab36be660bad40133e1c6a028ba79e46c5d6f3c7 Author: Neil Armstrong Date: Tue Oct 3 17:24:42 2017 +0200 ARM64: dts: meson-gxl: Take eMMC data strobe out of eMMC pins Since the Data Strobe pin is optional, take it out of the default eMMC pins and add a separate entry. Signed-off-by: Neil Armstrong Tested-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 10 ++++++++-- arch/arm64/boot/dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 10 ++++++++-- arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 2 +- 14 files changed, 28 insertions(+), 16 deletions(-) commit 1d70eaada70a355acd95a9022a84e476858ceba1 Author: Jerome Brunet Date: Thu Sep 21 19:16:04 2017 +0200 ARM64: dts: meson-gxl: adjust libretech-cc gpio-line-names TEST_N gpio has been moved so the gpio-line-names of the cc must be adjusted accordingly Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c6496b47aeaef38fcd5a4fa5a90c82caebde538f Author: Jerome Brunet Date: Thu Sep 21 19:14:49 2017 +0200 ARM64: dts: meson-gxl: adjust kvim gpio-line-names TEST_N gpio has been moved so the gpio-line-names of the kvim must be adjusted accordingly Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e43f20e844290655eecdd8a5038bc80964837889 Author: Jerome Brunet Date: Thu Sep 21 19:14:48 2017 +0200 ARM64: dts: meson-gxbb: adjust odroid-c2 gpio-line-names GPIOX22 is now declared properly and TEST_N has been moved so the gpio-line-names of the odroid-c2 must be adjusted accordingly Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1ce2c00878dbd4f8adfd2f0d64f01855072340a5 Author: Jerome Brunet Date: Thu Sep 21 19:14:47 2017 +0200 ARM64: dts: meson-gxbb: adjust nanopi-k2 gpio-line-names GPIOX22 is now declared properly and TEST_N has been moved so the gpio-line-names of the nanopi-k2 must be adjusted accordingly Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7dbe78e5fad6dc447b558ec7a075bf90e8b07a3e Author: Jerome Brunet Date: Thu Sep 21 19:14:46 2017 +0200 ARM64: dts: meson-gx: adjust gpio-ranges for TEST_N TEST_N has moved from the EE controller to the AO controller so the gpio-ranges need to adjusted for it Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 352f72b42a7be573fc8bfe41d1d895740843fc56 Author: Jerome Brunet Date: Thu Sep 21 19:14:45 2017 +0200 ARM64: dts: meson-gx: remove gpio offset Remove pin offset on the EE controller. Meson pinctrl no longer has this quirk Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 677c432c945b5489f21d4fca5285a4bf551b64bd Author: Jerome Brunet Date: Thu Sep 21 19:14:44 2017 +0200 ARM: dts: meson8: remove gpio offset Remove pin offset on the AO controller. meson pinctrl no longer has this quirk Tested-by: Martin Blumenstingl Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8.dtsi | 2 +- arch/arm/boot/dts/meson8b.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit dac161871fb592816826ef11b742554fb3dc2fe3 Author: Jerome Brunet Date: Wed Sep 6 14:25:47 2017 +0200 ARM64: dts: meson-gxl-libretech-cc: enable internal phy leds Enable the internal phy ACT and LINK leds pinmux Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 5 +++++ 1 file changed, 5 insertions(+) commit dd47e4a36afd6c606f20e6d58e58f8e7e472c8fe Author: Jerome Brunet Date: Tue Sep 5 19:09:55 2017 +0200 ARM64: dts: meson-gxl-libretech-cc: enable saradc Enable saradc and add the reference 1.8v regulator required. The libretech-cc has saradc channel 0 and 2 available on the 2 first pins of 2J3 header Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 418da17214aca5ef5f0b6f7588905ee7df92f98f Author: Keith Packard Date: Tue Mar 14 23:25:07 2017 -0700 drm: Pass struct drm_file * to __drm_mode_object_find [v2] This will allow __drm_mode_object_file to be extended to perform access control checks based on the file in use. v2: Also fix up vboxvideo driver in staging [airlied: merging early as this is an API change] Suggested-by: Daniel Vetter Signed-off-by: Keith Packard Signed-off-by: Dave Airlie drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 16 ++++++++-------- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 4 ++-- drivers/gpu/drm/ast/ast_mode.c | 2 +- drivers/gpu/drm/bochs/bochs_kms.c | 2 +- drivers/gpu/drm/cirrus/cirrus_mode.c | 2 +- drivers/gpu/drm/drm_atomic.c | 8 ++++---- drivers/gpu/drm/drm_atomic_helper.c | 2 +- drivers/gpu/drm/drm_color_mgmt.c | 4 ++-- drivers/gpu/drm/drm_connector.c | 2 +- drivers/gpu/drm/drm_crtc.c | 8 ++++---- drivers/gpu/drm/drm_crtc_internal.h | 1 + drivers/gpu/drm/drm_encoder.c | 2 +- drivers/gpu/drm/drm_framebuffer.c | 9 +++++---- drivers/gpu/drm/drm_mode_object.c | 10 ++++++---- drivers/gpu/drm/drm_plane.c | 14 +++++++------- drivers/gpu/drm/drm_probe_helper.c | 2 +- drivers/gpu/drm/drm_property.c | 6 +++--- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_overlay.c | 2 +- drivers/gpu/drm/i915/intel_sprite.c | 2 +- drivers/gpu/drm/mgag200/mgag200_mode.c | 2 +- drivers/gpu/drm/nouveau/nouveau_connector.c | 4 ++-- drivers/gpu/drm/radeon/r100.c | 2 +- drivers/gpu/drm/radeon/r600_cs.c | 2 +- drivers/gpu/drm/radeon/radeon_connectors.c | 16 ++++++++-------- drivers/gpu/drm/udl/udl_connector.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 +- drivers/staging/vboxvideo/vbox_mode.c | 2 +- include/drm/drm_connector.h | 3 ++- include/drm/drm_crtc.h | 5 +++-- include/drm/drm_encoder.h | 3 ++- include/drm/drm_framebuffer.h | 1 + include/drm/drm_mode_object.h | 2 ++ include/drm/drm_plane.h | 3 ++- include/drm/drm_property.h | 3 ++- 37 files changed, 85 insertions(+), 73 deletions(-) commit 5ef9d78e559553a4acc4bcbc3720fde069af5fba Merge: c7c64bc 740d6f1 Author: David S. Miller Date: Wed Oct 11 16:01:57 2017 -0700 Merge branch 'qcom-emac-various-minor-fixes' Timur Tabi says: ==================== net: qcom/emac: various minor fixes A set of patches for 4.15 that clean up some code, apply minors fixes, and so on. Some of the code also prepares the driver for a future version of the EMAC controller. ==================== Signed-off-by: David S. Miller commit 740d6f188fb71ae13e3e9f7208b6b3094517509d Author: Timur Tabi Date: Wed Oct 11 14:52:26 2017 -0500 net: qcom/emac: clean up some TX/RX error messages Some of the error messages that are printed by the interrupt handlers are poorly written. For example, many don't include a device prefix, so there's no indication that they are EMAC errors. Also use rate limiting for all messages that could be printed from interrupt context. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 15 ++++++--------- drivers/net/ethernet/qualcomm/emac/emac.c | 8 ++++---- 2 files changed, 10 insertions(+), 13 deletions(-) commit df1ec1b9d0df57e96011f175418dc95b1af46821 Author: Timur Tabi Date: Wed Oct 11 14:52:25 2017 -0500 net: qcom/emac: enforce DMA address restrictions The EMAC has a restriction that the upper 32 bits of the base addresses for the RFD and RRD rings must be the same. The ensure that restriction, we allocate twice the space for the RRD and locate it at an appropriate address. We also re-arrange the allocations so that invalid addresses are even less likely. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-mac.c | 39 ++++++++++++++++----------- 1 file changed, 24 insertions(+), 15 deletions(-) commit 3958ffcd85060967a9c70bb92b21741073578d66 Author: Timur Tabi Date: Wed Oct 11 14:52:24 2017 -0500 net: qcom/emac: remove unused address arrays The EMAC is capable of multiple TX and RX rings, but the driver only supports one ring for each. One function had some left-over unused code that supports multiple rings, but all it did was make the code harder to read. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac-mac.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) commit d7e6b347560d1824d7bccfa307ad34bd3f133706 Author: Timur Tabi Date: Wed Oct 11 14:52:23 2017 -0500 net: qcom/emac: specify the correct DMA mask The 64/32-bit DMA mask hackery in the EMAC driver is not actually necessary, and is technically not accurate. The EMAC hardware is limted to a 45-bit DMA address. Although no EMAC-enabled system can have that much DDR, an IOMMU could possible provide a larger address. Rather than play games with the DMA mappings, the driver should provide a correct value and trust the DMA/IOMMU layers to do the right thing. Signed-off-by: Timur Tabi Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit c7c64bca62f35351cf033a1dcea05cba522200a2 Merge: 7822b08 194ccc8 Author: David S. Miller Date: Wed Oct 11 15:28:39 2017 -0700 Merge branch 'qrtr-Fixes-and-support-receiving-version-2-packets' Bjorn Andersson says: ==================== net: qrtr: Fixes and support receiving version 2 packets On the latest Qualcomm platforms remote processors are sending packets with version 2 of the message header. This series starts off with some fixes and then refactors the qrtr code to support receiving messages of both version 1 and version 2. As all remotes are backwards compatible transmitted packets continues to be send as version 1, but some groundwork has been done to make this a per-link property. ==================== Signed-off-by: David S. Miller commit 194ccc88297ae78d0803adad83c6dcc369787c9e Author: Bjorn Andersson Date: Tue Oct 10 23:45:23 2017 -0700 net: qrtr: Support decoding incoming v2 packets Add the necessary logic for decoding incoming messages of version 2 as well. Also make sure there's room for the bigger of version 1 and 2 headers in the code allocating skbs for outgoing messages. Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller net/qrtr/qrtr.c | 132 ++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 94 insertions(+), 38 deletions(-) commit f507a9b6e63b9f41b61d199c36ae046d17b5fe4b Author: Bjorn Andersson Date: Tue Oct 10 23:45:22 2017 -0700 net: qrtr: Use sk_buff->cb in receive path Rather than parsing the header of incoming messages throughout the implementation do it once when we retrieve the message and store the relevant information in the "cb" member of the sk_buff. This allows us to, in a later commit, decode version 2 messages into this same structure. Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller net/qrtr/qrtr.c | 70 ++++++++++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 30 deletions(-) commit 1a7959c76641674991ba3a49f25432f1e105391e Author: Bjorn Andersson Date: Tue Oct 10 23:45:21 2017 -0700 net: qrtr: Clean up control packet handling As the message header generation is deferred the internal functions for generating control packets can be simplified. This patch modifies qrtr_alloc_ctrl_packet() to, in addition to the sk_buff, return a reference to a struct qrtr_ctrl_pkt, which clarifies and simplifies the helpers to the point that these functions can be folded back into the callers. Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller net/qrtr/qrtr.c | 93 ++++++++++++++++++--------------------------------------- 1 file changed, 29 insertions(+), 64 deletions(-) commit e7044482c8ac5081f4775063995647787d5082a4 Author: Bjorn Andersson Date: Tue Oct 10 23:45:20 2017 -0700 net: qrtr: Pass source and destination to enqueue functions Defer writing the message header to the skb until its time to enqueue the packet. As the receive path is reworked to decode the message header as it's received from the transport and only pass around the payload in the skb this change means that we do not have to fill out the full message header just to decode it immediately in qrtr_local_enqueue(). In the future this change also makes it possible to prepend message headers based on the version of each link. Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller net/qrtr/qrtr.c | 120 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 69 insertions(+), 51 deletions(-) commit da7653f0faabbe45eb2d3fd6e4b400fe003e81ae Author: Bjorn Andersson Date: Tue Oct 10 23:45:19 2017 -0700 net: qrtr: Add control packet definition to uapi The QMUX protocol specification defines structure of the special control packet messages being sent between handlers of the control port. Add these to the uapi header, as this structure and the associated types are shared between the kernel and all userspace handlers of control messages. Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller include/uapi/linux/qrtr.h | 32 ++++++++++++++++++++++++++++++++ net/qrtr/qrtr.c | 12 ------------ 2 files changed, 32 insertions(+), 12 deletions(-) commit 28978713c51b0a70acf748f76f9d6d2d20dcf980 Author: Bjorn Andersson Date: Tue Oct 10 23:45:18 2017 -0700 net: qrtr: Move constants to header file The constants are used by both the name server and clients, so clarify their value and move them to the uapi header. Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller include/uapi/linux/qrtr.h | 3 +++ net/qrtr/qrtr.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) commit ae85bfa87821b9fa60bf846c09a6a0056d87cdb2 Author: Bjorn Andersson Date: Tue Oct 10 23:45:17 2017 -0700 net: qrtr: Invoke sk_error_report() after setting sk_err Rather than manually waking up any context sleeping on the sock to signal an error we should call sk_error_report(). This has the added benefit that in-kernel consumers can override this notification with its own callback. Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller net/qrtr/qrtr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7822b0836d2121d7de3d0f9ec636338d7496e5dc Author: Wei Yongjun Date: Wed Oct 11 02:35:23 2017 +0000 net: hns3: make local functions static Fixes the following sparse warnings: drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c:464:5: warning: symbol 'hns3_change_all_ring_bd_num' was not declared. Should it be static? drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c:477:5: warning: symbol 'hns3_set_ringparam' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c7c1dc35871378ede5f117dc9c2a7ce1cecd4449 Author: Bjorn Andersson Date: Wed Oct 4 20:11:28 2017 -0700 soc: qcom: smem: Support getting cached entries On msm8996 cached SMEM items are used for storing the GLINK FIFOs, so for items not found in the uncached list we need to also search the cased list for these items. Signed-off-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Andy Gross drivers/soc/qcom/smem.c | 69 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 61 insertions(+), 8 deletions(-) commit 01f141544413aa5de45d3979b8aafa9aaf6f9b9f Author: Bjorn Andersson Date: Wed Oct 4 20:11:27 2017 -0700 soc: qcom: smem: Rename "uncached" accessors In preparation for adding accessors for "cached" entries rename the "uncached" accessors. Also rename "first" cached entry to "last", as the cached list grows backwards. Signed-off-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Andy Gross drivers/soc/qcom/smem.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit de11c4de1fbbe1f48ac2ec9b38f1a4618d53d35f Author: Nicolas Dechesne Date: Wed Oct 11 17:19:25 2017 +0200 arm64: defconfig: Enable QCOM_IOMMU Enable QCOM IOMMU driver for 'B' family devices, such as APQ8016 found on the Dragonboard 410c. With this change, graphics console and GPU are working fine (using mesa/freedreno for GPU driver). Signed-off-by: Nicolas Dechesne Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 2ea93babf6da52989fd1328da7167d31147d7a65 Author: Srinivas Kandagatla Date: Mon Aug 14 13:37:56 2017 +0200 arm64: dts: apq8096-db820c: Enable on board 3 pcie root complex This patch adds enables 3 instances of root complexes which are exposed on DB820c board. 3 Instances are terminted as below PCIE0 => QCA6174 PCIE1 => MINI PCIE CARD PCIE2 => GBE ETHERNET Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit ed965ef89227b6f565d4761eed2a07ab8ceb2961 Author: Srinivas Kandagatla Date: Mon Aug 14 13:37:55 2017 +0200 arm64: dts: qcom: msm8996: add support to pcie This patch adds support to 3 pcie root complexes found on MSM8996. Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm64/boot/dts/qcom/msm8996-pins.dtsi | 195 +++++++++++++++++++++++++++++ arch/arm64/boot/dts/qcom/msm8996.dtsi | 166 ++++++++++++++++++++++++ 2 files changed, 361 insertions(+) commit 1dfd49957321ce11813af64f10ae70c44c345ea2 Author: Bjorn Andersson Date: Wed Oct 4 11:58:57 2017 -0700 ARM: qcom_defconfig: Enable Z2 Tablet related options Select the options necessary to get USB, coincell, WiFI, touchscreen and backlight on the Z2 Tablet (and other family B devices) working. The device specific peripherals are selected as modules. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/configs/qcom_defconfig | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 6570f0dd6004b5b925b19666e9c60da432d197fd Author: Al Viro Date: Sun Sep 24 17:43:00 2017 -0400 orangefs: remove detritus from struct orangefs_kiocb_s Signed-off-by: Al Viro fs/orangefs/orangefs-kernel.h | 6 ------ 1 file changed, 6 deletions(-) commit faea13297ea739f94913d56d7b865134b4fc8726 Author: Al Viro Date: Sun Sep 24 14:03:29 2017 -0400 kill iov_shorten() Signed-off-by: Al Viro fs/read_write.c | 21 --------------------- include/linux/uio.h | 2 -- 2 files changed, 23 deletions(-) commit 0e5b935d43f385ab23d2e38e7134b1abb0e7907e Author: Al Viro Date: Sun Sep 24 13:14:35 2017 -0400 bio_alloc_map_data(): do bmd->iter setup right there just need to copy it iter instead of iter->nr_segs Signed-off-by: Al Viro block/bio.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit d16d44ebb016792285ec1b9566dbd9d022ce70f9 Author: Al Viro Date: Sun Sep 24 13:09:18 2017 -0400 bio_copy_user_iov(): saner bio size calculation it's a bounce buffer; we don't *care* how badly is the real source/destination fragmented, all that matters is the total size. Signed-off-by: Al Viro block/bio.c | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) commit 0a0f151364f5bf836ad1d4de6113adb103a6628c Author: Al Viro Date: Sun Sep 24 12:30:17 2017 -0400 bio_map_user_iov(): get rid of copying iov_iter we do want *iter advanced Signed-off-by: Al Viro block/bio.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 98a09d6106660ec6e69ff2a6fa14039bd504412b Author: Al Viro Date: Sun Sep 24 12:14:36 2017 -0400 bio_copy_from_iter(): get rid of copying iov_iter we want the one passed to it advanced, anyway Signed-off-by: Al Viro block/bio.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 2884d0be878eb5cbbc6d983c6054feef3b9aa86d Author: Al Viro Date: Sun Sep 24 12:09:21 2017 -0400 move more stuff down into bio_copy_user_iov() Signed-off-by: Al Viro block/bio.c | 5 +++++ block/blk-map.c | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) commit e81cef5d3001501350b4e596b4bd6dfd26187afa Author: Al Viro Date: Sun Sep 24 09:25:39 2017 -0400 blk_rq_map_user_iov(): move iov_iter_advance() down ... into bio_{map,copy}_user_iov() Signed-off-by: Al Viro block/bio.c | 6 ++++-- block/blk-map.c | 1 - include/linux/bio.h | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) commit b282cc766958af161249b7b04d50e3eae12a2a1c Author: Al Viro Date: Sat Sep 23 16:24:59 2017 -0400 bio_map_user_iov(): get rid of the iov_for_each() Use iov_iter_npages() Signed-off-by: Al Viro block/bio.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit 98f0bc99055da5797fae0c35d3d18261d59df9ac Author: Al Viro Date: Sat Sep 23 16:23:18 2017 -0400 bio_map_user_iov(): move alignment check into the main loop Signed-off-by: Al Viro block/bio.c | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) commit e2e115d18b76467274d8f818f8828ba168f9c80b Author: Al Viro Date: Sat Sep 23 16:16:06 2017 -0400 don't rely upon subsequent bio_add_pc_page() calls failing ... they might actually succeed in some cases (when we are at the queue-imposed segments limit, the next page is not mergable with the last one we'd got in, but the first page covered by the next iovec *is* mergable). Make sure that once it's failed, we are done with that bio. Signed-off-by: Al Viro block/bio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 629e42bcc3d0bc04b4e0e40ef3f831507a4693bd Author: Al Viro Date: Sat Sep 23 16:13:10 2017 -0400 ... and with iov_iter_get_pages_alloc() it becomes even simpler Signed-off-by: Al Viro block/bio.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit 076098e51bd502402a7c166b5c2bb59a196e84e1 Author: Al Viro Date: Sat Sep 23 16:08:57 2017 -0400 bio_map_user_iov(): switch to iov_iter_get_pages()/iov_iter_advance() ... and to hell with iov_for_each() nonsense Signed-off-by: Al Viro block/bio.c | 57 ++++++++++++++++++++++++--------------------------------- 1 file changed, 24 insertions(+), 33 deletions(-) commit b784ecba51da465bc15fdd1d6715479f3adc560e Author: Kees Cook Date: Tue Oct 10 12:25:48 2017 -0700 atm: idt77105: Drop needless setup_timer() Calling setup_timer() is redundant when DEFINE_TIMER() has been used. Cc: Chas Williams <3chas3@gmail.com> Cc: linux-atm-general@lists.sourceforge.net Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: David S. Miller drivers/atm/idt77105.c | 2 -- 1 file changed, 2 deletions(-) commit fc7556877d1748ac00958822a0a3bba1d4bd9e0d Author: Dan Murphy Date: Tue Oct 10 12:42:56 2017 -0500 net: phy: at803x: Change error to EINVAL for invalid MAC Change the return error code to EINVAL if the MAC address is not valid in the set_wol function. Signed-off-by: Dan Murphy Signed-off-by: David S. Miller drivers/net/phy/at803x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87461f7a58ab694e638ac52afa543b427751a9d0 Author: Dan Murphy Date: Tue Oct 10 12:42:55 2017 -0500 net: phy: DP83822 initial driver submission Add support for the TI DP83822 10/100Mbit ethernet phy. The DP83822 provides flexibility to connect to a MAC through a standard MII, RMII or RGMII interface. In addition the DP83822 needs to be removed from the DP83848 driver as the WoL support is added here for this device. Datasheet: http://www.ti.com/product/DP83822I/datasheet Signed-off-by: Dan Murphy Acked-by: Andrew F. Davis Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 5 + drivers/net/phy/Makefile | 1 + drivers/net/phy/dp83822.c | 344 ++++++++++++++++++++++++++++++++++++++++++++++ drivers/net/phy/dp83848.c | 3 - 4 files changed, 350 insertions(+), 3 deletions(-) commit e9d4bf219c83d09579bc62512fea2ca10f025d93 Author: Trond Myklebust Date: Tue Oct 10 17:31:42 2017 -0400 SUNRPC: Fix tracepoint storage issues with svc_recv and svc_rqst_status There is no guarantee that either the request or the svc_xprt exist by the time we get round to printing the trace message. Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields include/trace/events/sunrpc.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 5a752ce5ba7adf9fe3589498804647ab91b14fa9 Author: Bjorn Andersson Date: Wed Oct 4 11:58:56 2017 -0700 ARM: qcom_defconfig: Disable DEBUG_GPIO GPIO debug spams the kernel log quite a bit, so remove this from the default Qualcomm defconfig. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/configs/qcom_defconfig | 1 - 1 file changed, 1 deletion(-) commit e11bd3876afc092d2f24b588baae73259a86e049 Author: Stephen Boyd Date: Wed Jun 28 15:33:03 2017 -0700 ARM: qcom_defconfig: Enable configs for USB on apq8064/msm8974 Enable the regulator driver, usb phy drivers, and hsic hub driver to support USB devices on apq8064 and msm8974. Signed-off-by: Stephen Boyd Signed-off-by: Andy Gross arch/arm/configs/qcom_defconfig | 7 +++++++ 1 file changed, 7 insertions(+) commit c04dad1b62addaf24c84fa4dbba81132cef8889e Author: Bjorn Andersson Date: Wed Oct 4 11:58:55 2017 -0700 ARM: qcom_defconfig: Resync with new Kconfig options CONFIG_HWSPINLOCK must be selected explicitly for SMEM and its dependencies to be enabled. The update is generated by "make savedefconfig" and as such reflects changes to the implicit state of other options, as of v4.14-rc1. Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/configs/qcom_defconfig | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) commit 06d3e1963084d4b57f058fe80a7db3e168b5530d Merge: 4a26981 d99a86a Author: David S. Miller Date: Wed Oct 11 13:53:21 2017 -0700 Merge branch 'lan9303-Add-basic-offloading-of-unicast-traffic' Egil Hjelmeland says: ==================== lan9303: Add basic offloading of unicast traffic This series add basic offloading of unicast traffic to the lan9303 DSA driver. Review welcome! Changes v1 -> v2: - Patch 1: Codestyle linting. - Patch 2: Remember SWE_PORT_STATE while not bridged. Added constant LAN9303_SWE_PORT_MIRROR_DISABLED. ==================== Signed-off-by: David S. Miller commit d99a86ae83d28ad08bcd46570d81033b48db2ca0 Author: Egil Hjelmeland Date: Tue Oct 10 14:49:53 2017 +0200 net: dsa: lan9303: Add basic offloading of unicast traffic When both user ports are joined to the same bridge, the normal HW MAC learning is enabled. This means that unicast traffic is forwarded in HW. If one of the user ports leave the bridge, the ports goes back to the initial separated operation. Port separation relies on disabled HW MAC learning. Hence the condition that both ports must join same bridge. Add brigde methods port_bridge_join, port_bridge_leave and port_stp_state_set. Signed-off-by: Egil Hjelmeland Signed-off-by: David S. Miller drivers/net/dsa/lan9303-core.c | 82 ++++++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/lan9303.h | 2 ++ 2 files changed, 84 insertions(+) commit f7e3bfa14daa35ea393ad6389c9e01e61196e93f Author: Egil Hjelmeland Date: Tue Oct 10 14:49:52 2017 +0200 net: dsa: lan9303: Move tag setup to new lan9303_setup_tagging Prepare for next patch: Move tag setup from lan9303_separate_ports() to new function lan9303_setup_tagging() Signed-off-by: Egil Hjelmeland Signed-off-by: David S. Miller drivers/net/dsa/lan9303-core.c | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) commit e8c4c6eeaacd0fbc18fe8954b262cfd97836a76f Author: Luca Weiss Date: Wed Oct 11 13:02:29 2017 +0200 ARM: dts: msm8974-FP2: Add USB node This introduces the usb node which can be used e.g. for USB_ETH Signed-off-by: Luca Weiss Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 329d8f220762f817f6b5946043f5c938786c6c32 Author: Luca Weiss Date: Wed Oct 11 13:02:28 2017 +0200 ARM: dts: msm8974-FP2: Add sdhci1 node This introduces the eMMC sdhci node and its pinctrl state Signed-off-by: Luca Weiss Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 44237986660ce41c41e92a703493a050cf64b8be Author: Luca Weiss Date: Wed Oct 11 13:02:27 2017 +0200 ARM: dts: msm8974-FP2: Add regulator nodes for FP2 The voltages are pulled from the vendor source tree. Signed-off-by: Luca Weiss Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | 195 +++++++++++++++++++++++ 1 file changed, 195 insertions(+) commit a7adc50f0d1c9589234902fec5f27c4420dde200 Author: Luca Weiss Date: Wed Oct 11 13:02:26 2017 +0200 ARM: dts: msm8974-FP2: Introduce gpio-keys nodes This introduces the gpio-keys nodes for keys of the FP2 and the associated pinctrl state. Signed-off-by: Luca Weiss Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | 50 ++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit 1548a21458bf7c5fc541c0785aa886602b27d5f5 Author: Luca Weiss Date: Wed Oct 11 13:02:25 2017 +0200 ARM: dts: qcom: Add initial DTS file for Fairphone 2 phone This DTS has support for the Fairphone 2 (codenamed FP2). This first version of the DTS supports just the serial console via the MSM UART pins. Signed-off-by: Luca Weiss Acked-by: Bjorn Andersson Signed-off-by: Andy Gross .../devicetree/bindings/vendor-prefixes.txt | 1 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+) commit 0adb92437c1ac711fbac8ffb20ea759ac5862f5e Author: Linus Walleij Date: Tue Oct 10 10:39:24 2017 +0200 ARM: dts: qcom: add MSM8660 GSBI6 and GSBI7 This adds the GSBI6 and GSBI7 IO blocks to the MSM8660 DTSI file. On the APQ8060 DragonBoard, GSBI6 DM is used for Bluetooth UART, and GSBI7 I2C is used for FM radio I2C. Signed-off-by: Linus Walleij Acked-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-msm8660.dtsi | 67 +++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit ab80661883deae72525226dc4dcc881a78bb46d9 Author: Bjorn Andersson Date: Wed Oct 4 11:58:54 2017 -0700 ARM: dts: qcom: msm8974: Add Sony Xperia Z2 Tablet This adds a basic DTS file for the Sony Xperia Z2 Tablet, containing definitions for regulators, eMMC/SD-card, USB, WiFi, Touchscreen, charger, backlight, coincell and buttons. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Signed-off-by: Andy Gross arch/arm/boot/dts/Makefile | 1 + .../boot/dts/qcom-msm8974-sony-xperia-castor.dts | 641 +++++++++++++++++++++ arch/arm/boot/dts/qcom-msm8974.dtsi | 14 + arch/arm/boot/dts/qcom-msm8974pro.dtsi | 18 + 4 files changed, 674 insertions(+) commit fb83f201433d8e15ade29dbe6d8d43c810fa0b27 Author: Srinivas Kandagatla Date: Mon Sep 18 12:04:37 2017 +0200 ARM: dts: qcom-apq8064: disable gsbi6 i2c by default at soc dtsi This patch marks gsbi i2c node at soc level dtsi, so that kernel would not assume that its enabled and result in pin conflicts on some boards like IFC6410 which do use these pins for uart. Without this patch we see below pin conflict: apq8064-pinctrl 800000.pinctrl: pin GPIO_16 already requested by 16540000.serial; cannot claim for 16580000.i2c apq8064-pinctrl 800000.pinctrl: pin-16 (16580000.i2c) status -22 apq8064-pinctrl 800000.pinctrl: could not request pin 16 (GPIO_16) from group gpio16 on device 800000.pinctrl i2c_qup 16580000.i2c: Error applying setting, reverse things back i2c_qup: probe of 16580000.i2c failed with error -22 Signed-off-by: Srinivas Kandagatla Signed-off-by: Andy Gross arch/arm/boot/dts/qcom-apq8064.dtsi | 1 + 1 file changed, 1 insertion(+) commit 3191b5b332f8982581d6bd5ae409590342d770ad Author: Andy Gross Date: Tue Aug 15 23:28:26 2017 -0500 ARM: dts: qcom-apq8064: Fix dsi and hdmi phy cells This patch adds the necessary #phy-cells property to the DSI and HDMI phys. Signed-off-by: Andy Gross Reviewed-by: Archit Taneja arch/arm/boot/dts/qcom-apq8064.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4a269818a7eb8577d32d8b2879099c689ddbd856 Author: Eric Dumazet Date: Wed Oct 11 13:27:29 2017 -0700 tcp: fix tcp_unlink_write_queue() Yury reported crash with this signature : [ 554.034021] [] 0xffff80003ccd5a58 [ 554.034156] [] skb_release_all+0x14/0x30 [ 554.034288] [] __kfree_skb+0x14/0x28 [ 554.034409] [] tcp_sendmsg_locked+0x4dc/0xcc8 [ 554.034541] [] tcp_sendmsg+0x34/0x58 [ 554.034659] [] inet_sendmsg+0x2c/0xf8 [ 554.034783] [] sock_sendmsg+0x18/0x30 [ 554.034928] [] SyS_sendto+0x84/0xf8 Problem is that skb->destructor contains garbage, and this is because I accidentally removed tcp_skb_tsorted_anchor_cleanup() from tcp_unlink_write_queue() This would trigger with a write(fd, , len) attempt, and we will add to packetdrill this capability to avoid future regressions. Fixes: 75c119afe14f ("tcp: implement rb-tree based retransmit queue") Reported-by: Yury Norov Tested-by: Yury Norov Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/tcp.h | 1 + 1 file changed, 1 insertion(+) commit b6cfe8bd4118cb2896902c76bb2ea3d79c97eeae Author: Thierry Reding Date: Fri Sep 22 23:18:41 2017 -0700 PCI: tegra: Use generic accessors where possible The Tegra PCI host controller can generate configuration space accesses with byte, word and dword granularity for devices. Only root ports can't have their configuration space accessed in this way. Signed-off-by: Thierry Reding Signed-off-by: Bjorn Helgaas drivers/pci/host/pci-tegra.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 8382e556b1a2f30c4bf866f021b33577a64f9ebf Author: Mauro Carvalho Chehab Date: Wed Oct 11 15:29:46 2017 -0400 Simplify major/minor non-dynamic logic changeset 6bbf7a855d20 ("media: dvbdev: convert DVB device types into an enum") added a new warning on gcc 6: >> drivers/media/dvb-core/dvbdev.c:86:1: warning: control reaches end of non-void function [-Wreturn-type] That's because gcc is not smart enough to see that all types are present at the switch. Also, the current code is not too optimized. So, replace it to a more optimized one, based on a static table. Reported-by: kbuild test robot Fixes: 6bbf7a855d20 ("media: dvbdev: convert DVB device types into an enum") Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 9c049bea083fea21373b8baf51fe49acbe24e105 Author: Keerthy Date: Wed Sep 20 10:54:15 2017 +0530 PCI: dra7xx: Add shutdown handler to cleanly turn off clocks Add shutdown handler to cleanly turn off clocks. This will help in cases of kexec where in a new kernel can boot abruptly. Signed-off-by: Keerthy Signed-off-by: Bjorn Helgaas Acked-by: Kishon Vijay Abraham I drivers/pci/dwc/pci-dra7xx.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit a8a08886ef8c6a5a740e50e3897466cfd11724ff Author: Jani Nikula Date: Mon Oct 9 12:29:59 2017 +0300 drm/i915/dp: limit sink rates based on rate Get rid of redundant intel_dp_num_rates(). We can simply look at the rate and limit based on that. Cc: Manasi Navare Reviewed-by: Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20171009092959.29021-3-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dp.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) commit fc603ca7f81d729bbec7ced294f25a93113c49f7 Author: Jani Nikula Date: Mon Oct 9 12:29:58 2017 +0300 drm/i915/dp: centralize max source rate conditions more Turn intel_dp_source_supports_hbr2() into a simple helper to query the pre-filled source rates array, and move the conditions about which platforms support which rates to the single point of truth in intel_dp_set_source_rates(). This also reduces the code paths you have to think about in the source rates initialization in intel_dp_set_source_rates(), making it easier to grasp. Cc: Manasi Navare Reviewed-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20171009092959.29021-2-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dp.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit 68ace22edb932836d59a5834df85f519c5ce4e4d Author: Hou Zhiqiang Date: Tue Sep 19 17:26:54 2017 +0800 irqchip/ls-scfg-msi: Add LS1012a MSI support The ls1012a implements only 1 MSI controller, and it is the same as ls1043a. Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring Acked-by: Minghuan Lian Acked-by: Thomas Gleixner .../devicetree/bindings/interrupt-controller/fsl,ls-scfg-msi.txt | 1 + drivers/irqchip/irq-ls-scfg-msi.c | 1 + 2 files changed, 2 insertions(+) commit 3c7b6b3c4f2a4882d9d82365cc122cc8d29f4811 Author: Ville Syrjälä Date: Mon Oct 9 19:19:51 2017 +0300 drm/i915: Allow PCH platforms fall back to BIOS LVDS mode With intel_encoder_current_mode() using the normal state readout code it actually works on PCH platforms as well. So let's nuke the PCH check from intel_lvds_init(). I suppose there aren't any machines that actually need this, but at least we get to eliminate a few lines of code, and one FIXME. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171009161951.22420-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_lvds.c | 5 ----- 1 file changed, 5 deletions(-) commit 33ba90aa4d4432b884fc0ed57ba9dc12eb8fa288 Author: Jan Glauber Date: Fri Sep 8 10:10:33 2017 +0200 PCI: Avoid slot reset if bridge itself is broken When checking to see if a PCI slot can safely be reset, we previously checked to see if any of the children had their PCI_DEV_FLAGS_NO_BUS_RESET flag set. Some PCIe root port bridges do not behave well after a slot reset, and may cause the device in the slot to become unusable. Add a check for PCI_DEV_FLAGS_NO_BUS_RESET being set in the bridge device to prevent the slot from being reset. Signed-off-by: Jan Glauber Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Williamson drivers/pci/pci.c | 4 ++++ 1 file changed, 4 insertions(+) commit 2269848386c4b8395bc67eaaf7d08011da7c07ef Author: Varun Prakash Date: Wed Oct 11 19:33:21 2017 +0530 scsi: libcxgbi: simplify task->hdr allocation for mgmt cmds In case of mgmt cmds, task->hdr is dereferenced after transmitting the pdu in iscsi_tcp_task_xmit(). To handle this case current code increments the Tx skb reference count and frees the skb in cxgbi_cleanup_task(). In some error cases this results in skb leak. To fix this in case of mgmt cmds, allocate a separate buffer for iSCSI hdr and free this buffer in cxgbi_cleanup_task(). Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/cxgbi/libcxgbi.c | 43 ++++++++++++++++++++++++++++--------------- drivers/scsi/cxgbi/libcxgbi.h | 1 - 2 files changed, 28 insertions(+), 16 deletions(-) commit 357027786f3523d26f42391aa4c075b8495e5d28 Author: David Daney Date: Fri Sep 8 10:10:31 2017 +0200 PCI: Avoid bus reset if bridge itself is broken When checking to see if a PCI bus can safely be reset, we previously checked to see if any of the children had their PCI_DEV_FLAGS_NO_BUS_RESET flag set. Children marked with that flag are known not to behave well after a bus reset. Some PCIe root port bridges also do not behave well after a bus reset, sometimes causing the devices behind the bridge to become unusable. Add a check for PCI_DEV_FLAGS_NO_BUS_RESET being set in the bridge device to allow these bridges to be flagged, and prevent their secondary buses from being reset. Signed-off-by: David Daney [jglauber@cavium.com: fixed typo] Signed-off-by: Jan Glauber Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Williamson drivers/pci/pci.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9b3a081fb62158b50bcc90522ca2423017544367 Author: Varun Prakash Date: Wed Oct 11 19:33:07 2017 +0530 scsi: cxgb4i: fix Tx skb leak In case of connection reset Tx skb queue can have some skbs which are not transmitted so purge Tx skb queue in release_offload_resources() to avoid skb leak. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 1 + 1 file changed, 1 insertion(+) commit 4c2a02157fdd5dc71de7cf42eff07576746eb450 Author: Varun Prakash Date: Tue Oct 10 19:25:30 2017 +0530 scsi: libcxgbi: in case of vlan pass 0 as ifindex to find route In case of vlan pass 0 as ifindex to find route instead of passing real_dev ifindex, if we pass real_dev ifindex then ip_route_output_ports() and ip6_route_output() will check for route through real_dev not through vlan interface. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/cxgbi/libcxgbi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 822155100e589f2a4891b3b2db2f901824d47e69 Author: David Daney Date: Fri Sep 8 10:10:32 2017 +0200 PCI: Mark Cavium CN8xxx to avoid bus reset Root ports of cn8xxx do not function after bus reset when used with some e1000e and LSI HBA devices. Add a quirk to prevent bus reset on these root ports. Signed-off-by: David Daney [jglauber@cavium.com: fixed typo and whitespaces] Signed-off-by: Jan Glauber Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Williamson drivers/pci/quirks.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 607162140d8ab62c8fabb0992bd798edf9f97466 Author: Randy Dunlap Date: Wed Oct 11 10:09:23 2017 -0700 scsi: update description of logging_level bits Update the description of 'scsi_logging_level' from 8 4-bit nibbles to the (pre-git) reality of 10 3-bit bitfields. Signed-off-by: Randy Dunlap Reviewed-by: Kyle Fortin Reviewed-by: Steffen Maier Signed-off-by: Martin K. Petersen drivers/scsi/scsi_logging.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9cb072482e1de25db0888899fccd88dc63cea0ab Author: Randy Dunlap Date: Tue Oct 10 17:16:26 2017 -0700 scsi: fix doc. typo for I2O Fix typo: I20 should be I2O. Signed-off-by: Randy Dunlap Signed-off-by: Martin K. Petersen Documentation/driver-api/scsi.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27aa292e3e621d72e49a3392dfa54a4152325407 Author: Jitendra Bhivare Date: Tue Oct 10 16:18:20 2017 +0530 scsi: be2iscsi: Update driver version Version 11.4.0.1 Signed-off-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0172dc65623e037c90d7dd50d0168e75984427a9 Author: Jitendra Bhivare Date: Tue Oct 10 16:18:19 2017 +0530 scsi: be2iscsi: Remove A-circumflex character in copyright marking Signed-off-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be.h | 2 +- drivers/scsi/be2iscsi/be_cmds.c | 2 +- drivers/scsi/be2iscsi/be_cmds.h | 2 +- drivers/scsi/be2iscsi/be_iscsi.c | 2 +- drivers/scsi/be2iscsi/be_iscsi.h | 2 +- drivers/scsi/be2iscsi/be_main.c | 2 +- drivers/scsi/be2iscsi/be_main.h | 2 +- drivers/scsi/be2iscsi/be_mgmt.c | 2 +- drivers/scsi/be2iscsi/be_mgmt.h | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) commit 45efc940678ec813f2e6bc4fc45f9f19e686a3b8 Author: Jitendra Bhivare Date: Tue Oct 10 16:18:18 2017 +0530 scsi: be2iscsi: Fix misc static analysis errors The patch fixes errors reported by tools like smatch: - removes unused structure fields - removes dead code - fixes code identation Signed-off-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be.h | 17 ++++++++-------- drivers/scsi/be2iscsi/be_cmds.c | 1 - drivers/scsi/be2iscsi/be_cmds.h | 14 ++----------- drivers/scsi/be2iscsi/be_main.c | 40 ++++++++++++++++-------------------- drivers/scsi/be2iscsi/be_main.h | 45 ++--------------------------------------- drivers/scsi/be2iscsi/be_mgmt.h | 6 ------ 6 files changed, 29 insertions(+), 94 deletions(-) commit 1cb3c3fd60361f0e900af8e7ecdcd65bed70ab08 Author: Jitendra Bhivare Date: Tue Oct 10 16:18:17 2017 +0530 scsi: be2iscsi: Add cmd to set host data Provide driver version in host data to FW. Signed-off-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_cmds.c | 46 +++++++++++++++++++++++++++++++++++++++++ drivers/scsi/be2iscsi/be_cmds.h | 26 +++++++++++++++++++++++ drivers/scsi/be2iscsi/be_main.c | 2 ++ 3 files changed, 74 insertions(+) commit 4788e732c39120e55762a7e296cf7dbdf366f44c Author: Jitendra Bhivare Date: Tue Oct 10 16:18:16 2017 +0530 scsi: be2iscsi: Modify IOCTL to fetch user configured IQN Add version 1 of GET_HBA_NAME to fetch port specific IQN first. If it fails use version 0 to get the IQN. To use this old IQN names of interfaces needs to be cleared from the iscsiadm database. Signed-off-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_iscsi.c | 12 ++++++++---- drivers/scsi/be2iscsi/be_mgmt.c | 7 ++++++- drivers/scsi/be2iscsi/be_mgmt.h | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) commit c5905bf82287a9aada3e4b0b1d3425c6e1a91828 Author: Jitendra Bhivare Date: Tue Oct 10 16:18:15 2017 +0530 scsi: be2iscsi: Fix _get_initname buffer overflow be_cmd_get_initname pulls GET_HBA_NAME response of 276 bytes in embedded WRB buffer of 236 bytes. Use non-embedded functions to issue the IOCTL. Signed-off-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_cmds.h | 2 -- drivers/scsi/be2iscsi/be_iscsi.c | 44 +++---------------------------- drivers/scsi/be2iscsi/be_mgmt.c | 57 ++++++++++++++++++++-------------------- drivers/scsi/be2iscsi/be_mgmt.h | 2 ++ 4 files changed, 35 insertions(+), 70 deletions(-) commit a39e9f71e5ed718256681f73740e866c8e572ec6 Author: Jitendra Bhivare Date: Tue Oct 10 16:18:14 2017 +0530 scsi: be2iscsi: Fix _modify_eq_delay buffer overflow beiscsi_modify_eq_delay is using embedded command to send request of 788 bytes in 236 bytes buffer. Non-embedded command needs to be used in such cases. Use mgmt_alloc_cmd_data fn modified to allow passing of subsystem. Use mgmt_exec_nonemb_cmd fn modified to allow setting of callback. Signed-off-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_cmds.c | 6 +- drivers/scsi/be2iscsi/be_cmds.h | 4 +- drivers/scsi/be2iscsi/be_mgmt.c | 212 ++++++++++++++++++++++------------------ 3 files changed, 124 insertions(+), 98 deletions(-) commit 45371aa398c6473a722e4a3800d9fea5a53e080f Author: Jitendra Bhivare Date: Tue Oct 10 16:18:13 2017 +0530 scsi: be2iscsi: Free msi_name and disable HW intr In beiscsi_dev_probe, allocated msi_name does not get freed and enabled HW interrupts are not disabled in iscsi_host_add error case. Add beiscsi_free_irqs fn to handle the cleanup in probe and disable port. Signed-off-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 47 ++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 17 deletions(-) commit 8dd998e6e94ed6b94f001f4ed37ca9c9120ee257 Author: Jitendra Bhivare Date: Tue Oct 10 16:18:12 2017 +0530 scsi: be2iscsi: Fix return value in mgmt_open_connection mgmt_open_connection is expected to return tag not errno. In error case, just return invalid tag 0. Signed-off-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d9ecd49426c95ccb986d8111bbbf19920a231fe Author: Jitendra Bhivare Date: Tue Oct 10 16:18:11 2017 +0530 scsi: be2iscsi: Fix boot flags in sysfs The boot flags exported through sysfs was wrongly reverted to 2. Use boot flag 3 required per spec. Bit 0 Block valid flag Bit 1 Firmware booting selected Signed-off-by: Jitendra Bhivare Signed-off-by: Martin K. Petersen drivers/scsi/be2iscsi/be_main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 28fd7e99257c7d8ff41544a6ee23c96cc10799e0 Author: Markus Elfring Date: Tue Oct 3 21:24:00 2017 +0200 ARM: OMAP: Fix typos in two comment lines in _omap_dm_timer_request() Adjust three words in this description. Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren arch/arm/plat-omap/dmtimer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 738c985d85afdc592c0dda205b2d71043bdc5bfb Author: Markus Elfring Date: Tue Oct 3 21:07:33 2017 +0200 ARM: OMAP: Use kcalloc() in omap_system_dma_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 "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: Tony Lindgren arch/arm/plat-omap/dma.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 16e7ea5380258c75e8c79c1737cc72ce2573d3b8 Author: Markus Elfring Date: Tue Oct 3 20:46:48 2017 +0200 ARM: OMAP: Improve a size determination in two functions Replace the specification of 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. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren arch/arm/plat-omap/dma.c | 2 +- arch/arm/plat-omap/dmtimer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d679950cb9233903f0de011d81e42e2e56c3573d Author: Markus Elfring Date: Tue Oct 3 13:10:26 2017 +0200 ARM: OMAP: Delete an error message for a failed memory allocation in two functions Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Tony Lindgren arch/arm/plat-omap/dma.c | 5 +---- arch/arm/plat-omap/dmtimer.c | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) commit 05e89fb576f580ac95e7a5d00bdb34830b09671a Author: Arnd Bergmann Date: Wed Oct 11 15:47:54 2017 +0200 Bluetooth: BT_HCIUART now depends on SERIAL_DEV_BUS It is no longer possible to build BT_HCIUART into the kernel when SERIAL_DEV_BUS is a loadable module, even if none of the SERIAL_DEV_BUS based implementations are selected: drivers/bluetooth/hci_ldisc.o: In function `hci_uart_set_flow_control': hci_ldisc.c:(.text+0xb40): undefined reference to `serdev_device_set_flow_control' hci_ldisc.c:(.text+0xb5c): undefined reference to `serdev_device_set_tiocm' This adds a dependency to avoid the broken configuration. Fixes: 7841d554809b ("Bluetooth: hci_uart_set_flow_control: Fix NULL deref when using serdev") Signed-off-by: Arnd Bergmann Signed-off-by: Marcel Holtmann drivers/bluetooth/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81a1905382a380beeba201ce41276afd9035dc64 Author: Arnd Bergmann Date: Wed Oct 11 15:46:21 2017 +0200 Bluetooth: hci_bcm: fix build error without CONFIG_PM This was introduced by the rework adding PM support: drivers/bluetooth/hci_bcm.c: In function 'bcm_device_exists': drivers/bluetooth/hci_bcm.c:156:22: error: 'struct bcm_device' has no member named 'hu' if (device && device->hu && device->hu->serdev) ^~ The pointer is not available otherwise, so I'm enclosing all references in an #ifdef here. Fixes: 8a92056837fd ("Bluetooth: hci_bcm: Add (runtime)pm support to the serdev driver") Signed-off-by: Arnd Bergmann Reviewed-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 09a50f43a53b8ea2a48feea891196e6cc7355074 Author: Sreekanth Reddy Date: Tue Oct 10 18:41:23 2017 +0530 scsi: mpt3sas: Bump mpt3sas driver version to v16.100.00.00 Bump mpt3sas driver version to v16.100.00.00 Signed-off-by: Sreekanth Reddy Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 15fd7c74dadc8de5dd6b4a2a146127f035093aa3 Author: Sreekanth Reddy Date: Tue Oct 10 18:41:22 2017 +0530 scsi: mpt3sas: Adding support for SAS3616 HBA device Adding PNP ID of Mercator i.e. SAS3616 HBA device. Its device ID is 0xD1 and vendor ID is 0x1000. Signed-off-by: Sreekanth Reddy Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 5 +++++ 1 file changed, 5 insertions(+) commit aba5a85c2fcf05a6922e28c7179526adad58f4b5 Author: Sreekanth Reddy Date: Tue Oct 10 18:41:21 2017 +0530 scsi: mpt3sas: Fix possibility of using invalid Enclosure Handle for SAS device after host reset Enclosure handles are not updated after host reset. As a result, driver device structure is holding previously assigned enclosure handle which is different from the enclosure handle populated in the corresponding device page. Modified the driver to update devices enclosure handles after host reset to current value by referring the enclosure handles from corresponding device pages Signed-off-by: Sreekanth Reddy Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 117 ++++++++++++++++++++++++----------- 1 file changed, 81 insertions(+), 36 deletions(-) commit 7588895646b5a943d3310271885c5935123a455c Author: Sreekanth Reddy Date: Tue Oct 10 18:41:20 2017 +0530 scsi: mpt3sas: Display chassis slot information of the drive Display chassis slot information along with other drive location parameters such as slot number and connector name in the logs if chassis slot validity bit is set in 'SAS Enclosure Page 0'. Signed-off-by: Sreekanth Reddy Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.h | 4 + drivers/scsi/mpt3sas/mpt3sas_scsih.c | 266 ++++++++++++++++++----------------- 2 files changed, 143 insertions(+), 127 deletions(-) commit 90e7a70199184ed5f3081981c7cffed771b84bb3 Author: Sreekanth Reddy Date: Tue Oct 10 18:41:19 2017 +0530 scsi: mpt3sas: Updated MPI headers to v2.00.48 Updated MPI headers to v2.00.48 Signed-off-by: Sreekanth Reddy Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpi/mpi2.h | 43 ++- drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 564 +++++++++++++++++++++++++++++++++-- drivers/scsi/mpt3sas/mpi/mpi2_init.h | 11 +- drivers/scsi/mpt3sas/mpi/mpi2_ioc.h | 282 +++++++++++++++++- drivers/scsi/mpt3sas/mpi/mpi2_pci.h | 111 +++++++ drivers/scsi/mpt3sas/mpi/mpi2_tool.h | 14 +- 6 files changed, 991 insertions(+), 34 deletions(-) commit 2ce9a3645299ba1752873d333d73f67620f4550b Author: Sreekanth Reddy Date: Tue Oct 10 18:41:18 2017 +0530 scsi: mpt3sas: Fix IO error occurs on pulling out a drive from RAID1 volume created on two SATA drive Whenever an I/O for a RAID volume fails with IOCStatus MPI2_IOCSTATUS_SCSI_IOC_TERMINATED and SCSIStatus equal to (MPI2_SCSI_STATE_TERMINATED | MPI2_SCSI_STATE_NO_SCSI_STATUS) then return the I/O to SCSI midlayer with "DID_RESET" (i.e. retry the IO infinite times) set in the host byte. Previously, the driver was completing the I/O with "DID_SOFT_ERROR" which causes the I/O to be quickly retried. However, firmware needed more time and hence I/Os were failing. Signed-off-by: Sreekanth Reddy Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 5 +++++ 1 file changed, 5 insertions(+) commit 758f8139e9a779de76fed2b48dc492bfb6612684 Author: Sreekanth Reddy Date: Tue Oct 10 18:41:17 2017 +0530 scsi: mpt3sas: Fix removal and addition of vSES device during host reset For Dev Handles whose value is less than HBA's phys count number, driver would return HBA's SAS address value. As a result, for a Virtual SES device the driver was returning the HBA's SAS address. Updated the driver to return Virtual SES' SAS address. [mkp: clarified commit message] Signed-off-by: Sreekanth Reddy Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 06f5f976a6ee0f8bbb0dd648415eeac0536fef97 Author: Sreekanth Reddy Date: Tue Oct 10 18:41:16 2017 +0530 scsi: mpt3sas: Reduce memory footprint in kdump kernel To reduce the memory footprint of the driver in the kdump kernel, we apply the following settings when reset_devices is set: 1. Use single MSI-x vector. 2. Disable RDPQ mode. 3. Set sg_table_size to 32 by default. 4) Set SCSI IO Queue depth to 200. [mkp: fixed commit message] Signed-off-by: Sreekanth Reddy Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 14 +++++++++++--- drivers/scsi/mpt3sas/mpt3sas_base.h | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) commit bbe3def3a11dc1040d45469f5dd26032e9fd8c79 Author: Sreekanth Reddy Date: Tue Oct 10 18:41:15 2017 +0530 scsi: mpt3sas: Fixed memory leaks in driver While removing Expander devices, we are removing expander device entry from the list before freeing its child devices. While freeing child device we are finding its parent device node as NULL and therefore we are not freeing the child device's allocated data structures. Updated the driver to remove the expander device from the list only after freeing all its child devices. [mkp: clarified commit message] Signed-off-by: Sreekanth Reddy Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_scsih.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit b99b199378afac7675876adc170d82d7a4442330 Author: Sreekanth Reddy Date: Tue Oct 10 18:41:14 2017 +0530 scsi: mpt3sas: Processing of Cable Exception events Earlier Active Cable Exception event with reason code "Cable Degraded (0x02))" was added only for Active Cable. Now this event is extended to Passive cable too. Re-arranged display message accordingly. Also added Cable Exception Event event for SAS3008 & SAS3108 HBAs (i.e. MPI 2.5 spec supporting HBAs). Previously, this event was enabled only for MPI 2.6 spec supporting HBA devices. [mkp: typos] Signed-off-by: Sreekanth Reddy Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_base.c | 5 ++--- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 20 +++++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) commit c645b9309839be3f1543255db2abfe120f9d4f26 Author: Al Viro Date: Wed Oct 11 13:48:55 2017 -0400 fold destroy_super() into __put_super() There's only one caller of destroy_super() left now. Fold it there, and replace those list_lru_destroy() calls with checks that they had already been done (as they should have, when we were dropping the last active reference). Signed-off-by: Al Viro fs/super.c | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) commit 0200894d11551a8abcff7872c2260d0801951f67 Author: Al Viro Date: Wed Oct 11 13:48:55 2017 -0400 new helper: destroy_unused_super() Used for disposal of super_block instances that had never been reachable via any shared data structures. No need for RCU delay in there, everything can be called directly. Signed-off-by: Al Viro fs/super.c | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) commit 01153bf04db18d5fcd30df64ffe428db7ff7bada Author: Mauro Carvalho Chehab Date: Wed Oct 11 13:48:57 2017 -0400 media: dvb: do some coding style cleanup Fix a bunch of coding style issues found by checkpatch on the part of the code that the previous patches touched. WARNING: please, no space before tabs + * ^I^Icallback.$ ERROR: space required before the open parenthesis '(' + switch(cmd) { WARNING: line over 80 characters + err = dtv_property_process_get(fe, &getp, tvp + i, file); WARNING: line over 80 characters + err = fe->ops.diseqc_recv_slave_reply(fe, (struct dvb_diseqc_slave_reply*) parg); ERROR: "(foo*)" should be "(foo *)" + err = fe->ops.diseqc_recv_slave_reply(fe, (struct dvb_diseqc_slave_reply*) parg); WARNING: line over 80 characters + err = fe->ops.read_signal_strength(fe, (__u16 *) parg); Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_demux.h | 2 +- drivers/media/dvb-core/dvb_frontend.c | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) commit 395c81ad23f25ee68e234c6676f13d9cbce4a76e Author: Alim Akhtar Date: Tue Oct 3 20:51:25 2017 +0530 scsi: ufs: Remove unused UFS_BIT() macro Since we have converted all the user of UFS_BIT() macro with the actual bit position, let remove unused UFS_BIT()macro. Signed-off-by: Alim Akhtar Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshci.h | 2 -- 1 file changed, 2 deletions(-) commit 5b35c70d8651450091a84d3980c26639390e1fc2 Author: Alim Akhtar Date: Tue Oct 3 20:51:24 2017 +0530 scsi: ufs: Remove unused #defines HOST_ERROR_INDICATOR and DEVICE_ERROR_INDICATOR are not used anywhere. Also as per JESD223C specification, bit[7:4] are reserved. Lets remove these #defines. Signed-off-by: Alim Akhtar Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshci.h | 2 -- 1 file changed, 2 deletions(-) commit 7e014efdc0b11ceff44d13e9be2d9a6063250c6c Author: Alim Akhtar Date: Tue Oct 3 20:51:23 2017 +0530 scsi: ufs-qcom: Remove uses of UFS_BIT() macro Use actual bit position instead of UFS_BIT() macro. This patch also changes bit-17 to meaningful #define. This change is as per discussion here [1] [1] -> https://lkml.org/lkml/2017/8/28/786 Signed-off-by: Alim Akhtar Cc: Subhash Jadavani Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufs-qcom.c | 4 ++-- drivers/scsi/ufs/ufs-qcom.h | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) commit cc81641a45252084878034620bcf80e15c9f9580 Author: Alim Akhtar Date: Tue Oct 3 20:51:22 2017 +0530 scsi: ufs: Change HCI macro to actual bit position Currently UFS HCI uses UFS_BIT() macro to get various bit position for the hardware registers status bits. Which makes code longer instead of shorter. This macro does not improve code readability as well. Lets re-write these macro definition with the actual bit position. Suggested-by: Bart Van Assche Signed-off-by: Alim Akhtar Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.h | 14 +++++----- drivers/scsi/ufs/ufshci.h | 66 +++++++++++++++++++++++++---------------------- 2 files changed, 42 insertions(+), 38 deletions(-) commit 6aa211e8ce6916d8a0df88b4fbc790e9c78f5d9d Author: Linus Torvalds Date: Mon Sep 25 18:37:28 2017 -0700 fix address space warnings in ipc/ Signed-off-by: Linus Torvalds Signed-off-by: Al Viro ipc/msg.c | 4 ++-- ipc/sem.c | 4 ++-- ipc/shm.c | 4 ++-- ipc/syscall.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) commit b33494e950c6d492c65799252cb8bc2692468221 Author: Mauro Carvalho Chehab Date: Wed Sep 20 14:42:42 2017 -0400 media: dvb uAPI docs: get rid of examples section That section is too outdated and got superseded by DVBv5 and by libdvbv5. Maybe some day we'll end adding updated examples there, but while nobody has time or interest of doing that, just mention that there and get rid of the current examples for good. Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/examples.rst | 378 +----------------------------- 1 file changed, 6 insertions(+), 372 deletions(-) commit b5b03a200934cad3c77e85026a3549847234f74e Author: Mauro Carvalho Chehab Date: Wed Sep 20 13:51:06 2017 -0400 media: dvb-net.rst: document DVB network kAPI interface That's the last DVB kAPI that misses documentation. Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/dtv-core.rst | 1 + Documentation/media/kapi/dtv-net.rst | 4 ++++ Documentation/media/uapi/dvb/net-types.rst | 2 +- drivers/media/dvb-core/dvb_net.h | 34 ++++++++++++++++++++++++++++-- 4 files changed, 38 insertions(+), 3 deletions(-) commit 8c6b18631ff6a4823249becb51b428da5f0f9a40 Author: Mauro Carvalho Chehab Date: Tue Sep 19 19:03:14 2017 -0400 media: dtv-demux.rst: parse other demux headers with kernel-doc Now that we have kernel-doc markups at dvb_demux.h and dmxdev.h, parse them. Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/dtv-demux.rst | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit e7446385fe9131a2c93fb106dbb118d3de7b0138 Author: Mauro Carvalho Chehab Date: Wed Sep 20 12:10:48 2017 -0400 media: dmxdev.h: add kernel-doc markups for data types and functions Despite being used by DVB drivers, this header was not documented. Document it. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dmxdev.h | 90 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 2 deletions(-) commit 6128a68dbc0f5032fe9e55fbe5a712e713315ffd Author: Mauro Carvalho Chehab Date: Wed Sep 20 09:08:20 2017 -0400 media: dvb_demux.h: document functions The functions used on dvb_demux.h are largely used on DVB drivers. Yet, none of them are documented. No functional changes. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_demux.h | 106 +++++++++++++++++++++++++++++++++++-- 1 file changed, 103 insertions(+), 3 deletions(-) commit 198688cdc1544061ea1b7df3ff7dbae4f3338bb9 Author: Mauro Carvalho Chehab Date: Tue Sep 19 19:11:22 2017 -0400 media: dvb_demux.h: document structs defined on it There are three structs defined inside dvb_demux.h. None of them are currently documented. Add documentation for them. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_demux.c | 1 + drivers/media/dvb-core/dvb_demux.h | 59 +++++++++++++++++++++++++++++++------- 2 files changed, 50 insertions(+), 10 deletions(-) commit 06133bdcbde952772c14174b1041ac0221f636e9 Author: Mauro Carvalho Chehab Date: Wed Sep 20 07:09:15 2017 -0400 media: dvb_frontend: get rid of dtv_get_property_dump() Simplify the get property handling and move it to the existing code at dtv_property_process_get() directly. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 43 ++++++++++------------------------- 1 file changed, 12 insertions(+), 31 deletions(-) commit df2fd38a08272fcc2c658f2c4d7d6318e8da593e Merge: b822696 90a53e4 Author: David S. Miller Date: Wed Oct 11 10:15:01 2017 -0700 Merge tag 'mac80211-next-for-davem-2017-10-11' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Work continues in various areas: * port authorized event for 4-way-HS offload (Avi) * enable MFP optional for such devices (Emmanuel) * Kees's timer setup patch for mac80211 mesh (the part that isn't trivially scripted) * improve VLAN vs. TXQ handling (myself) * load regulatory database as firmware file (myself) * with various other small improvements and cleanups I merged net-next once in the meantime to allow Kees's timer setup patch to go in. ==================== Signed-off-by: David S. Miller commit c4303473b3a931b2b4ce325d3acae3c6b00ec71f Author: Satendra Singh Thakur Date: Wed Sep 20 01:15:08 2017 -0400 media: dvb_frontend: dtv_property_process_set() cleanups Since all properties in the func dtv_property_process_set() use at most 4 bytes arguments, change the code to pass u32 cmd and u32 data as function arguments, instead of passing a pointer to the entire struct dtv_property *tvp. Instead of having a generic dtv_property_dump(), added its own properties debug logic in the dtv_property_process_set(). Signed-off-by: Satendra Singh Thakur Reviewed-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 125 ++++++++++++++++++++-------------- 1 file changed, 72 insertions(+), 53 deletions(-) commit e5c4be821a18005ed1883c1a82c3498ee8fcedfe Author: Mauro Carvalho Chehab Date: Tue Sep 19 19:04:08 2017 -0400 media: dvb_demux: document dvb_demux_filter and dvb_demux_feed Document those two structs using kernel-doc markups. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_demux.h | 50 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) commit 4bc8525a34786f14965a2e8e7d932fcc6867afed Author: Mauro Carvalho Chehab Date: Tue Sep 19 19:01:09 2017 -0400 media: dvb_demux: fix type of dvb_demux_feed.ts_type Just like pes_type, this field represents an enum. Properly identify it as such. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_demux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd3c6019497c028b23b8b543f73af76ddc1b57c9 Author: Mauro Carvalho Chehab Date: Tue Sep 19 18:59:45 2017 -0400 media: dvb_demux.h: get rid of DMX_FEED_ENTRY() macro This isn't used anywere. Get rid of it. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_demux.h | 2 -- 1 file changed, 2 deletions(-) commit 2c53275c1edafdb1c404071940de0a7de47c0bbb Author: Mauro Carvalho Chehab Date: Tue Sep 19 18:57:54 2017 -0400 media: dvb_demux: dvb_demux_feed.pusi_seen is boolean Instead of using an integer to represent it, use boolean, as this better describes what this field really means. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_demux.c | 12 ++++++------ drivers/media/dvb-core/dvb_demux.h | 2 +- drivers/media/pci/ttpci/av7110.c | 2 +- drivers/media/pci/ttpci/budget-core.c | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) commit 392cc7afbb4d8a649636f7fdd99ed2278f08457e Author: Mauro Carvalho Chehab Date: Tue Sep 19 18:10:13 2017 -0400 media: dvb_demux: mark a boolean field as such The struct dvb_demux_filter.doneq is a boolean. Mark it as such, as it helps to understand what it does. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_demux.c | 4 ++-- drivers/media/dvb-core/dvb_demux.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 68d84ae02ff8f2b9c36799058c3ce2a7db7fca67 Author: Mauro Carvalho Chehab Date: Tue Sep 19 18:08:45 2017 -0400 media: dvb_demux.h: get rid of unused timer at struct dvb_demux_filter This field is not used. So, get rid of it. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_demux.h | 1 - 1 file changed, 1 deletion(-) commit 999f3d25b87feaaadf39627856d235683ad5268d Author: Mauro Carvalho Chehab Date: Tue Sep 19 17:44:07 2017 -0400 media: dvb_demux.h: add an enum for DMX_STATE_* and document kernel-doc allows documenting enums. Also, it makes clearer about the meaning of each field on structures. So, convert DMX_STATE_* to an enum. While here, get rid of the unused DMX_STATE_SET. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_demux.h | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit 0463625ee9e7b7c786460b6c20073e8c8e283466 Author: Mauro Carvalho Chehab Date: Tue Sep 19 17:43:49 2017 -0400 media: dvb_demux.h: add an enum for DMX_TYPE_* and document kernel-doc allows documenting enums. Also, it makes clearer about the meaning of each field on structures. So, convert DMX_TYPE_* to an enum. While here, get rid of the unused DMX_TYPE_PES. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_demux.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 1607b8b574c9318ea58f3f08cf85514ceddf467a Author: Mauro Carvalho Chehab Date: Tue Sep 19 17:05:14 2017 -0400 media: dtv-demux.rst: minor markup improvements Add a cross-reference to a mentioned structure and split the kernel-doc stuff on a separate chapter. Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/dtv-demux.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit b2fc98fc91647e4b7ec1ac90001729345ec3e790 Author: Mauro Carvalho Chehab Date: Wed Oct 11 13:06:30 2017 -0400 media: dtv-frontend.rst fix a typo: algoritms -> algorithms WARNING: 'algoritms' may be misspelled - perhaps 'algorithms'? +responsible for tuning the device. It supports multiple algoritms to Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/dtv-frontend.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b3b8c81b47aa3ca473d310b1aa3ab93f0ec9c6b Author: Mauro Carvalho Chehab Date: Tue Sep 19 16:54:15 2017 -0400 media: dtv-core.rst: split into multiple files Instead of document all kAPI into a single file, split it on multiple ones. That makes easier to maintain each part. As a side effect, it will produce multiple html pages, with is a good idea. No changes at the text. Just some chapter levels changed. Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/dtv-ca.rst | 4 + Documentation/media/kapi/dtv-common.rst | 55 +++ Documentation/media/kapi/dtv-core.rst | 585 +----------------------------- Documentation/media/kapi/dtv-demux.rst | 71 ++++ Documentation/media/kapi/dtv-frontend.rst | 443 ++++++++++++++++++++++ 5 files changed, 579 insertions(+), 579 deletions(-) commit 7af90c04cc8343fb8063d0b3d7ba135daf3aabde Author: Mauro Carvalho Chehab Date: Tue Sep 19 16:46:10 2017 -0400 media: dtv-core.rst: add chapters and introductory tests for common parts Better document the DVB common parts by adding two sections and an introductory text for each. Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/dtv-core.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 6009367e0d52959aec52a6646f3f0c12856c003f Author: Mauro Carvalho Chehab Date: Tue Sep 19 16:40:33 2017 -0400 media: dvb_frontend.h: improve kernel-doc markups Several minor adjustments at the kernel-doc markups: - some syntax fixes; - some cross-references; - add cross-references for the mentioned ioctls; - some constants marked as such. No functional changes. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.h | 94 +++++++++++++++++------------------ 1 file changed, 47 insertions(+), 47 deletions(-) commit 400efa8e4e7b01a8f9898669199a42c126ca608d Author: Mauro Carvalho Chehab Date: Tue Sep 19 16:11:55 2017 -0400 media: dvbdev: fully document its functions There are several functions at the dvbdev that are common to all digital TV device nodes with aren't documented. Add documentation for them. No functional changes. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.h | 86 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 78 insertions(+), 8 deletions(-) commit 6bbf7a855d200ddd83494a9ceb95f9465f953f59 Author: Mauro Carvalho Chehab Date: Tue Sep 19 14:22:19 2017 -0400 media: dvbdev: convert DVB device types into an enum Enums can be documented via kernel-doc. So, convert the DVB_DEVICE_* macros to an enum. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvbdev.c | 34 +++++++++++++++++++++++---- drivers/media/dvb-core/dvbdev.h | 51 ++++++++++++++++++++++++++++------------- 2 files changed, 64 insertions(+), 21 deletions(-) commit 259a41d9ae8f3689742267f340ad2b159d00b302 Author: Mauro Carvalho Chehab Date: Mon Sep 18 08:21:37 2017 -0400 media: dvb_frontend: fix return values for FE_SET_PROPERTY There are several problems with regards to the return of FE_SET_PROPERTY. The original idea were to return per-property return codes via tvp->result field, and to return an updated set of values. However, that never worked. What's actually implemented is: - the FE_SET_PROPERTY implementation doesn't call .get_frontend callback in order to get the actual parameters after return; - the tvp->result field is only filled if there's no error. So, it is always filled with zero; - FE_SET_PROPERTY doesn't call memdup_user() nor any other copy_to_user() function. So, any changes to the properties will be lost; - FE_SET_PROPERTY is declared as a write-only ioctl (IOW). While we could fix the above, it could cause regressions. So, let's just assume what the code really does, updating the documentation accordingly and removing the logic that would update the discarded tvp->result. Reviewed-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/dvb/fe-get-property.rst | 7 +++++-- drivers/media/dvb-core/dvb_frontend.c | 2 -- include/uapi/linux/dvb/frontend.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) commit da5516b5e81d45a96291823620f6c820178dc055 Author: Mauro Carvalho Chehab Date: Mon Sep 18 08:05:42 2017 -0400 media: dvb_frontend: better document the -EPERM condition Two readonly ioctls can't be allowed if the frontend device is opened in read only mode. Explain why. Reviewed by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit ceb22c8eeecaf51f88a49202d00ea599b9e15477 Author: Mauro Carvalho Chehab Date: Mon Sep 18 07:32:44 2017 -0400 media: dvb_frontend.h: fix alignment at the cache properties There are too much tabs on several properties, for no good reason. That sounds confusing while reading the struct, so adjust them. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ef2cc27cf860b79874e9fde1419dd67c3372e41c Author: Mauro Carvalho Chehab Date: Mon Sep 18 07:29:19 2017 -0400 media: dvb_frontend: get rid of property cache's state In the past, I guess the idea was to use state in order to allow an autofush logic. However, in the current code, it is used only for debug messages, on a poor man's solution, as there's already a debug message to indicate when the properties got flushed. So, just get rid of it for good. Reviewed-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 20 ++++++-------------- drivers/media/dvb-core/dvb_frontend.h | 5 ----- 2 files changed, 6 insertions(+), 19 deletions(-) commit d73dcf0cdb95a47f7e4e991ab63dd30f6eb67b4e Author: Mauro Carvalho Chehab Date: Mon Sep 18 07:15:13 2017 -0400 media: dvb_frontend: cleanup ioctl handling logic Currently, there are two handlers for ioctls: - dvb_frontend_ioctl_properties() - dvb_frontend_ioctl_legacy() Despite their names, both handles non-legacy DVB ioctls. Besides that, there's no reason why to not handle all ioctls on a single handler function. So, merge them into a single function (dvb_frontend_handle_ioctl) and reorganize the ioctl's to indicate what's the current DVB API and what's deprecated. Despite the big diff, the handling logic for each ioctl is the same as before. Reviewed-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 328 ++++++++++++++++------------------ 1 file changed, 158 insertions(+), 170 deletions(-) commit 2b5df42b8dec69fb926a242007fd462343db4408 Author: Mauro Carvalho Chehab Date: Mon Sep 18 06:54:11 2017 -0400 media: dvb_frontend: cleanup dvb_frontend_ioctl_properties() Use a switch() on this function, just like on other ioctl handlers and handle parameters inside each part of the switch. That makes it easier to integrate with the already existing ioctl handler function. Reviewed-by: Shuah Khan Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 83 +++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 32 deletions(-) commit 6680e73b5226114992acfc11f9cf5730f706fb01 Author: Mauro Carvalho Chehab Date: Thu Sep 14 07:44:22 2017 -0400 media: dvb_frontend: get rid of set_property() callback Now that all clients of set_property() were removed, get rid of this callback. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 7 ------- drivers/media/dvb-core/dvb_frontend.h | 5 ----- 2 files changed, 12 deletions(-) commit 8f8a19fcc1a89b83d0ab6d7cf2bcdd272dbd4334 Author: Mauro Carvalho Chehab Date: Thu Sep 14 07:44:20 2017 -0400 media: dvb_frontend: get rid of get_property() callback Only lg2160 implement gets_property, but there's no need for that, as no other driver calls this callback, as get_frontend() does the same, and set_frontend() also calls lg2160 get_frontend(). So, get rid of it. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Michael Ira Krufky Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-core/dvb_frontend.c | 9 +-------- drivers/media/dvb-core/dvb_frontend.h | 3 --- drivers/media/dvb-frontends/lg2160.c | 14 -------------- 3 files changed, 1 insertion(+), 25 deletions(-) commit b2c41ca9632e686e79f6c9db9c5f75666d37926e Author: Mauro Carvalho Chehab Date: Thu Sep 14 07:44:21 2017 -0400 media: friio-fe: get rid of set_property() This callback is not actually doing anything but making it to return an error depending on the DTV frontend command. Well, that could break userspace for no good reason, and, if needed, should be implemented, instead, at set_frontend() callback. So, get rid of it. Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/friio-fe.c | 24 ------------------------ 1 file changed, 24 deletions(-) commit 282996925b4d78f9795d176f7fb409281c98d56d Author: Mauro Carvalho Chehab Date: Thu Sep 14 07:44:19 2017 -0400 media: stv6110: get rid of a srate dead code The stv6110 has a weird code that checks if get_property and set_property ioctls are defined. If they're, it initializes a "srate" var from properties cache. Otherwise, it sets to 15MBaud, with won't make any sense. Thankfully, it seems that someone else discovered the issue in the past, as "srate" is currently not used anywhere! So, get rid of that really weird dead code logic. Reported-by: Honza Petrous Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv6110.c | 9 --------- 1 file changed, 9 deletions(-) commit 473e4b4c1cf3046fc6b3437be9a9f3c89c2e61ef Author: Mauro Carvalho Chehab Date: Thu Sep 14 07:44:18 2017 -0400 media: stv0288: get rid of set_property boilerplate This driver doesn't implement support for set_property(). Yet, it implements a boilerplate for it. Get rid of it. Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/stv0288.c | 7 ------- 1 file changed, 7 deletions(-) commit de330815677d80a7eae7c82e134de1507867291b Author: Ville Syrjälä Date: Mon Oct 9 19:19:50 2017 +0300 drm/i915: Reuse normal state readout for LVDS/DVO fixed mode Reuse the normal state readout code to get the fixed mode for LVDS/DVO encoders. This removes some partially duplicated state readout code from LVDS/DVO encoders. The duplicated code wasn't actually even populating the negative h/vsync flags, leading to possible state checker complaints. The normal readout code populates that stuff fully. Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171009161951.22420-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson Tested-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 50 +++++++++++++++++------------------- drivers/gpu/drm/i915/intel_drv.h | 5 ++-- drivers/gpu/drm/i915/intel_dvo.c | 33 ++++++------------------ drivers/gpu/drm/i915/intel_lvds.c | 18 ++++--------- 4 files changed, 39 insertions(+), 67 deletions(-) commit 950db1a80e6349a25f9af594a45ab45eed5a0020 Author: Sean Young Date: Mon Oct 9 04:30:06 2017 -0400 media: rc: ir-spi needs OF Without device tree, there is no way to use this driver. Signed-off-by: Sean Young Acked-by: Andi Shyti Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3e45067f94bbd61dec0619b1c32744eb0de480c8 Author: Sean Young Date: Sun Oct 8 14:18:52 2017 -0400 media: rc: check for integer overflow The ioctl LIRC_SET_REC_TIMEOUT would set a timeout of 704ns if called with a timeout of 4294968us. Cc: Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-lirc-codec.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 5ce8c7a0e6945fdd48ed99cfcfcc25568c1e5960 Author: Marc Gonzalez Date: Fri Oct 6 08:23:37 2017 -0400 media: dt: bindings: Add binding for tango HW IR decoder Add DT binding for the HW IR decoder embedded in SMP86xx/SMP87xx. Signed-off-by: Marc Gonzalez Acked-by: Rob Herring Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/tango-ir.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit d345527331f0ceef1070d4d2f5c41edb4174c6af Author: Mans Rullgard Date: Fri Oct 6 08:37:50 2017 -0400 media: rc: Add driver for tango HW IR decoder The tango HW IR decoder supports NEC, RC-5, RC-6 protocols. Signed-off-by: Mans Rullgard Signed-off-by: Marc Gonzalez Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/Kconfig | 10 ++ drivers/media/rc/Makefile | 1 + drivers/media/rc/tango-ir.c | 281 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 292 insertions(+) commit 5248e34b3fa39cdd80ab41f73c545d0bf5428b47 Author: Marc Gonzalez Date: Fri Oct 6 08:33:41 2017 -0400 media: rc: Add tango keymap Add a keymap for the Sigma Designs Vantage (dev board) remote control. Signed-off-by: Marc Gonzalez Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/keymaps/Makefile | 1 + drivers/media/rc/keymaps/rc-tango.c | 92 +++++++++++++++++++++++++++++++++++++ include/media/rc-map.h | 1 + 3 files changed, 94 insertions(+) commit a840f3c7fb426382b4b2204bc01bf8b474875fcc Author: Sean Young Date: Thu Oct 5 17:30:59 2017 -0400 media: rc: hix5hd2 drivers needs OF Without device tree, there is no way to use this driver. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 2d726aaab2831866846dadbc675f484305041ee9 Author: Sean Young Date: Thu Oct 5 17:30:58 2017 -0400 media: rc: pwm-ir-tx needs OF Without device tree, there is no way to use this driver. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 5288879390388af654da3bb9cdc2c409abf6b4f3 Author: Sean Young Date: Thu Oct 5 17:30:57 2017 -0400 media: rc: gpio-ir-tx does not work without devicetree or gpiolib If the kernel is built without device tree, this driver cannot be used and without gpiolib it cannot control any gpio pin. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 829bbf268894d0866bb9dd2b1e430cfa5c5f0779 Author: Sean Young Date: Sun Oct 1 16:38:29 2017 -0400 media: rc: nec decoder should not send both repeat and keycode When receiving an nec repeat, rc_repeat() is called and then rc_keydown() with the last decoded scancode. That last call is redundant. Fixes: 265a2988d202 ("media: rc-core: consistent use of rc_repeat()") Cc: # v4.14 Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-nec-decoder.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit 2265425fd9c512cc9977516b5fe78d03ad9311a7 Author: David Härdeman Date: Sun Jun 25 08:31:30 2017 -0400 media: lirc_dev: remove min_timeout and max_timeout There are no users of this functionality (ir-lirc-codec.c has its own implementation and lirc_zilog.c doesn't use it) so remove it. This only affects users of the lirc kapi, not rc-core drivers. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 18 ------------------ include/media/lirc_dev.h | 6 ------ 2 files changed, 24 deletions(-) commit af7a8ffad9c58deac791333a65c62d7fc72f9e9c Author: Daniel Vetter Date: Wed Oct 11 11:10:19 2017 +0200 drm/i915: Use rcu instead of stop_machine in set_wedged stop_machine is not really a locking primitive we should use, except when the hw folks tell us the hw is broken and that's the only way to work around it. This patch tries to address the locking abuse of stop_machine() from commit 20e4933c478a1ca694b38fa4ac44d99e659941f5 Author: Chris Wilson Date: Tue Nov 22 14:41:21 2016 +0000 drm/i915: Stop the machine as we install the wedged submit_request handler Chris said parts of the reasons for going with stop_machine() was that it's no overhead for the fast-path. But these callbacks use irqsave spinlocks and do a bunch of MMIO, and rcu_read_lock is _real_ fast. To stay as close as possible to the stop_machine semantics we first update all the submit function pointers to the nop handler, then call synchronize_rcu() to make sure no new requests can be submitted. This should give us exactly the huge barrier we want. I pondered whether we should annotate engine->submit_request as __rcu and use rcu_assign_pointer and rcu_dereference on it. But the reason behind those is to make sure the compiler/cpu barriers are there for when you have an actual data structure you point at, to make sure all the writes are seen correctly on the read side. But we just have a function pointer, and .text isn't changed, so no need for these barriers and hence no need for annotations. Unfortunately there's a complication with the call to intel_engine_init_global_seqno: - Without stop_machine we must hold the corresponding spinlock. - Without stop_machine we must ensure that all requests are marked as having failed with dma_fence_set_error() before we call it. That means we need to split the nop request submission into two phases, both synchronized with rcu: 1. Only stop submitting the requests to hw and mark them as failed. 2. After all pending requests in the scheduler/ring are suitably marked up as failed and we can force complete them all, also force complete by calling intel_engine_init_global_seqno(). This should fix the followwing lockdep splat: ====================================================== WARNING: possible circular locking dependency detected 4.14.0-rc3-CI-CI_DRM_3179+ #1 Tainted: G U ------------------------------------------------------ kworker/3:4/562 is trying to acquire lock: (cpu_hotplug_lock.rw_sem){++++}, at: [] stop_machine+0x1c/0x40 but task is already holding lock: (&dev->struct_mutex){+.+.}, at: [] i915_reset_device+0x1e8/0x260 [i915] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #6 (&dev->struct_mutex){+.+.}: __lock_acquire+0x1420/0x15e0 lock_acquire+0xb0/0x200 __mutex_lock+0x86/0x9b0 mutex_lock_interruptible_nested+0x1b/0x20 i915_mutex_lock_interruptible+0x51/0x130 [i915] i915_gem_fault+0x209/0x650 [i915] __do_fault+0x1e/0x80 __handle_mm_fault+0xa08/0xed0 handle_mm_fault+0x156/0x300 __do_page_fault+0x2c5/0x570 do_page_fault+0x28/0x250 page_fault+0x22/0x30 -> #5 (&mm->mmap_sem){++++}: __lock_acquire+0x1420/0x15e0 lock_acquire+0xb0/0x200 __might_fault+0x68/0x90 _copy_to_user+0x23/0x70 filldir+0xa5/0x120 dcache_readdir+0xf9/0x170 iterate_dir+0x69/0x1a0 SyS_getdents+0xa5/0x140 entry_SYSCALL_64_fastpath+0x1c/0xb1 -> #4 (&sb->s_type->i_mutex_key#5){++++}: down_write+0x3b/0x70 handle_create+0xcb/0x1e0 devtmpfsd+0x139/0x180 kthread+0x152/0x190 ret_from_fork+0x27/0x40 -> #3 ((complete)&req.done){+.+.}: __lock_acquire+0x1420/0x15e0 lock_acquire+0xb0/0x200 wait_for_common+0x58/0x210 wait_for_completion+0x1d/0x20 devtmpfs_create_node+0x13d/0x160 device_add+0x5eb/0x620 device_create_groups_vargs+0xe0/0xf0 device_create+0x3a/0x40 msr_device_create+0x2b/0x40 cpuhp_invoke_callback+0xc9/0xbf0 cpuhp_thread_fun+0x17b/0x240 smpboot_thread_fn+0x18a/0x280 kthread+0x152/0x190 ret_from_fork+0x27/0x40 -> #2 (cpuhp_state-up){+.+.}: __lock_acquire+0x1420/0x15e0 lock_acquire+0xb0/0x200 cpuhp_issue_call+0x133/0x1c0 __cpuhp_setup_state_cpuslocked+0x139/0x2a0 __cpuhp_setup_state+0x46/0x60 page_writeback_init+0x43/0x67 pagecache_init+0x3d/0x42 start_kernel+0x3a8/0x3fc x86_64_start_reservations+0x2a/0x2c x86_64_start_kernel+0x6d/0x70 verify_cpu+0x0/0xfb -> #1 (cpuhp_state_mutex){+.+.}: __lock_acquire+0x1420/0x15e0 lock_acquire+0xb0/0x200 __mutex_lock+0x86/0x9b0 mutex_lock_nested+0x1b/0x20 __cpuhp_setup_state_cpuslocked+0x53/0x2a0 __cpuhp_setup_state+0x46/0x60 page_alloc_init+0x28/0x30 start_kernel+0x145/0x3fc x86_64_start_reservations+0x2a/0x2c x86_64_start_kernel+0x6d/0x70 verify_cpu+0x0/0xfb -> #0 (cpu_hotplug_lock.rw_sem){++++}: check_prev_add+0x430/0x840 __lock_acquire+0x1420/0x15e0 lock_acquire+0xb0/0x200 cpus_read_lock+0x3d/0xb0 stop_machine+0x1c/0x40 i915_gem_set_wedged+0x1a/0x20 [i915] i915_reset+0xb9/0x230 [i915] i915_reset_device+0x1f6/0x260 [i915] i915_handle_error+0x2d8/0x430 [i915] hangcheck_declare_hang+0xd3/0xf0 [i915] i915_hangcheck_elapsed+0x262/0x2d0 [i915] process_one_work+0x233/0x660 worker_thread+0x4e/0x3b0 kthread+0x152/0x190 ret_from_fork+0x27/0x40 other info that might help us debug this: Chain exists of: cpu_hotplug_lock.rw_sem --> &mm->mmap_sem --> &dev->struct_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&dev->struct_mutex); lock(&mm->mmap_sem); lock(&dev->struct_mutex); lock(cpu_hotplug_lock.rw_sem); *** DEADLOCK *** 3 locks held by kworker/3:4/562: #0: ("events_long"){+.+.}, at: [] process_one_work+0x1aa/0x660 #1: ((&(&i915->gpu_error.hangcheck_work)->work)){+.+.}, at: [] process_one_work+0x1aa/0x660 #2: (&dev->struct_mutex){+.+.}, at: [] i915_reset_device+0x1e8/0x260 [i915] stack backtrace: CPU: 3 PID: 562 Comm: kworker/3:4 Tainted: G U 4.14.0-rc3-CI-CI_DRM_3179+ #1 Hardware name: /NUC7i5BNB, BIOS BNKBL357.86A.0048.2017.0704.1415 07/04/2017 Workqueue: events_long i915_hangcheck_elapsed [i915] Call Trace: dump_stack+0x68/0x9f print_circular_bug+0x235/0x3c0 ? lockdep_init_map_crosslock+0x20/0x20 check_prev_add+0x430/0x840 ? irq_work_queue+0x86/0xe0 ? wake_up_klogd+0x53/0x70 __lock_acquire+0x1420/0x15e0 ? __lock_acquire+0x1420/0x15e0 ? lockdep_init_map_crosslock+0x20/0x20 lock_acquire+0xb0/0x200 ? stop_machine+0x1c/0x40 ? i915_gem_object_truncate+0x50/0x50 [i915] cpus_read_lock+0x3d/0xb0 ? stop_machine+0x1c/0x40 stop_machine+0x1c/0x40 i915_gem_set_wedged+0x1a/0x20 [i915] i915_reset+0xb9/0x230 [i915] i915_reset_device+0x1f6/0x260 [i915] ? gen8_gt_irq_ack+0x170/0x170 [i915] ? work_on_cpu_safe+0x60/0x60 i915_handle_error+0x2d8/0x430 [i915] ? vsnprintf+0xd1/0x4b0 ? scnprintf+0x3a/0x70 hangcheck_declare_hang+0xd3/0xf0 [i915] ? intel_runtime_pm_put+0x56/0xa0 [i915] i915_hangcheck_elapsed+0x262/0x2d0 [i915] process_one_work+0x233/0x660 worker_thread+0x4e/0x3b0 kthread+0x152/0x190 ? process_one_work+0x660/0x660 ? kthread_create_on_node+0x40/0x40 ret_from_fork+0x27/0x40 Setting dangerous option reset - tainting kernel i915 0000:00:02.0: Resetting chip after gpu hang Setting dangerous option reset - tainting kernel i915 0000:00:02.0: Resetting chip after gpu hang v2: Have 1 global synchronize_rcu() barrier across all engines, and improve commit message. v3: We need to protect the seqno update with the timeline spinlock (in set_wedged) to avoid racing with other updates of the seqno, like we already do in nop_submit_request (Chris). v4: Use two-phase sequence to plug the race Chris spotted where we can complete requests before they're marked up with -EIO. v5: Review from Chris: - simplify nop_submit_request. - Add comment to rcu_read_lock section. - Align comments with the new style. v6: Remove unused variable to appease CI. Reviewed-by: Chris Wilson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102886 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103096 Cc: Chris Wilson Cc: Mika Kuoppala Cc: Thomas Gleixner Cc: Marta Lofstedt Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171011091019.1425-1-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/i915_gem.c | 80 +++++++++++++++-------- drivers/gpu/drm/i915/i915_gem_request.c | 9 +++ drivers/gpu/drm/i915/selftests/i915_gem_request.c | 2 + 3 files changed, 62 insertions(+), 29 deletions(-) commit aefe3babab100ce389b4506672e7ee54078c905b Author: Lars Poeschel Date: Thu Oct 5 09:33:57 2017 +0200 ARM: dts: omap3: Replace deprecated mcp prefix The devicetree prefix mcp is deprecated in favour of microchip. Thus this replaces mcp with microchip for the mcp23017 gpio expander chip. Signed-off-by: Lars Poeschel Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-lilly-a83x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03f11912419c5a26ae86603786793ba0a9413144 Author: Ravikumar Kattekola Date: Wed Oct 11 13:34:30 2017 +0530 ARM: dts: dra7-evm: Move pcie RC node to common file Move the pcie_rc node to common file so that it can be used by dra76-evm as well. Signed-off-by: Ravikumar Kattekola Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Sekhar Nori Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7-evm-common.dtsi | 4 ++++ arch/arm/boot/dts/dra7-evm.dts | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) commit d4b8a2e0ae23336e9c2bfbd5c2e80149fe453f7a Author: Ravikumar Kattekola Date: Mon Oct 9 11:23:12 2017 +0530 ARM: dts: omap5: Increase max-voltage of pbias regulator As per recent TRM, PBIAS cell on omap5 devices supports 3.3v and not 3.0v as documented earlier. Update PBIAS regulator max voltage to match this. Document reference: SWPU249AF - OMAP543x Technical reference manual August 2016 Signed-off-by: Ravikumar Kattekola Signed-off-by: Sekhar Nori Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa40d42053869c22d46418b8bb96c54817952f29 Author: Ravikumar Kattekola Date: Mon Oct 9 11:23:11 2017 +0530 ARM: dts: dra7: Increase max-voltage of pbias regulator As per recent TRM, PBIAS cell on dra7 devices supports 3.3v and not 3.0v as documented earlier. Update PBIAS regulator max voltage to match this. Document reference: SPRUI30C – DRA75x, DRA74x Technical reference manual- November 2016 Tested on: DRA75x PG 2.0 REV H EVM Signed-off-by: Ravikumar Kattekola Signed-off-by: Sekhar Nori Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cccf4e3fe3e286b55634c2c5d0c4399f4288e440 Author: Jani Nikula Date: Mon Oct 9 12:29:57 2017 +0300 drm/dp: WARN about invalid/unknown link rates and bw codes Falling back to the lowest value is likely the only thing we can do, but doing it silently seems like a bad thing to do. Catch it early and make loud noises. Cc: Alex Deucher Cc: Thierry Reding Cc: Rob Clark Cc: Sean Paul Cc: Manasi Navare Cc: dri-devel@lists.freedesktop.org Reviewed-by: Thierry Reding Reviewed-by: Alex Deucher Reviewed-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20171009092959.29021-1-jani.nikula@intel.com drivers/gpu/drm/drm_dp_helper.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8ed5d192c0beb34c9a679b390c2e4077ae977dc2 Merge: 19b592d 4f95646 Author: Takashi Iwai Date: Wed Oct 11 16:59:40 2017 +0200 Merge branch 'topic/usb-ep-check-v2' into for-next Pulling the EP validity checks in USB audio drivers. It also adds a new helper in USB core, which was acked by Greg. Signed-off-by: Takashi Iwai commit 4f95646c803f6a534e58b1d33afbfdaf3e122328 Author: Takashi Iwai Date: Tue Oct 10 12:35:46 2017 +0200 ALSA: line6: Add yet more sanity checks for invalid EPs There are a few other places calling usb_submit_urb() with the URB composed from the fixed endpoint without validation. For avoiding the spurious kernel warnings, add the sanity checks to appropriate places. Signed-off-by: Takashi Iwai sound/usb/line6/driver.c | 23 +++++++++++++++-------- sound/usb/line6/midi.c | 17 +++++++++++------ 2 files changed, 26 insertions(+), 14 deletions(-) commit 96cd79626fc3fe5d77c243785368679e9b313642 Author: Takashi Iwai Date: Tue Oct 10 12:30:41 2017 +0200 ALSA: caiaq: Add yet more sanity checks for invalid EPs A few other places in caiaq driver have the URB handling with the fixed endpoints without checking the validity, too. Add the sanity check with the new helper function at each appropriate place for avoiding the spurious kernel warnings due to invalid EPs. Signed-off-by: Takashi Iwai sound/usb/caiaq/input.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 5935b9526a5e92e294397be8a1253c2a17d97204 Author: Takashi Iwai Date: Tue Oct 10 12:32:56 2017 +0200 ALSA: hiface: Add sanity checks for invalid EPs hiface usb-audio driver sets up URBs containing the fixed endpoints without validation. This may end up with an oops-like kernel warning when submitted. For avoiding it, this patch adds the calls of the new sanity-check helper for URBs. Signed-off-by: Takashi Iwai sound/usb/hiface/pcm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 1f10034938e7e1aa787a683cb56cdee3595f29b4 Author: Takashi Iwai Date: Wed Oct 4 17:58:41 2017 +0200 ALSA: usx2y: Add sanity checks for invalid EPs usx2y driver sets up URBs containing the fixed endpoints without validation. This may end up with an oops-like kernel warning when submitted. For avoiding it, this patch adds the calls of the new sanity-check helper for URBs. Signed-off-by: Takashi Iwai sound/usb/usx2y/usbusx2y.c | 5 +++++ sound/usb/usx2y/usbusx2yaudio.c | 3 +++ 2 files changed, 8 insertions(+) commit dc0fdf7d2bf9e7efdc690b8a594e39de5b3a993b Author: Masahiro Yamada Date: Thu Sep 21 00:27:12 2017 +0900 x86/boot: Remove unnecessary #include The defines UTS_RELEASE, but I do not see any reference to it in arch/x86/boot/header.S. Signed-off-by: Masahiro Yamada Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1505921232-8960-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Ingo Molnar arch/x86/boot/header.S | 1 - 1 file changed, 1 deletion(-) commit 611a7bc74ed2dcbab6693c20bb534cfcf15f9d1d Author: Mark Rutland Date: Wed Oct 11 14:01:03 2017 +0100 arm64: docs: describe ELF hwcaps We don't document our ELF hwcaps, leaving developers to interpret them according to hearsay, guesswork, or (in exceptional cases) inspection of the current kernel code. This is less than optimal, and it would be far better if we had some definitive description of each of the ELF hwcaps that developers could refer to. This patch adds a document describing the (native) arm64 ELF hwcaps. Cc: Catalin Marinas Cc: Dave Martin Cc: Will Deacon Signed-off-by: Mark Rutland [ Updated new hwcap entries in the document ] Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon Documentation/arm64/elf_hwcaps.txt | 156 +++++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) commit f5e035f8694c3bdddc66ea46ecda965ee6853718 Author: Suzuki K Poulose Date: Wed Oct 11 14:01:02 2017 +0100 arm64: Expose support for optional ARMv8-A features ARMv8-A adds a few optional features for ARMv8.2 and ARMv8.3. Expose them to the userspace via HWCAPs and mrs emulation. SHA2-512 - Instruction support for SHA512 Hash algorithm (e.g SHA512H, SHA512H2, SHA512U0, SHA512SU1) SHA3 - SHA3 crypto instructions (EOR3, RAX1, XAR, BCAX). SM3 - Instruction support for Chinese cryptography algorithm SM3 SM4 - Instruction support for Chinese cryptography algorithm SM4 DP - Dot Product instructions (UDOT, SDOT). Cc: Will Deacon Cc: Mark Rutland Cc: Dave Martin Cc: Marc Zyngier Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon Documentation/arm64/cpu-feature-registers.txt | 12 +++++++++++- arch/arm64/include/asm/sysreg.h | 4 ++++ arch/arm64/include/uapi/asm/hwcap.h | 5 +++++ arch/arm64/kernel/cpufeature.c | 9 +++++++++ arch/arm64/kernel/cpuinfo.c | 5 +++++ 5 files changed, 34 insertions(+), 1 deletion(-) commit b1314e3f85b36ce1311d7242085f6dd93709c694 Author: Radha Mohan Chintakuntla Date: Tue Oct 10 22:37:51 2017 -0700 ahci: Add support for Cavium's fifth generation SATA controller This patch adds support for Cavium's fifth generation SATA controller. It is an on-chip controller and complies with AHCI 1.3.1. As the controller uses 64-bit addresses it cannot use the standard AHCI BAR5 and so uses BAR4. Signed-off-by: Radha Mohan Chintakuntla Signed-off-by: Tejun Heo drivers/ata/ahci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 24281a2f4ca569d44e44e4cbc500cf08e7bb4c36 Author: Luis Felipe Sandoval Castro Date: Thu Sep 28 08:54:42 2017 -0500 EDAC, sb_edac: Fix missing DIMM sysfs entries with KNL SNC2/SNC4 mode When figuring out the size of the DIMMs and the cluster mode is SNC2 or SNC4 the current algorithm ignores the contribution of some of the channels resulting in EDAC never knowing of the existence of some DIMMs attached to such channels (thus sysfs is not populated). Instead of selectively iterating from 0 to interlv_ways when looking for all the participants in the interleave, do an exhaustive search and iterate from 0 to KNL_MAX_CHANNELS. The algorithm is already smart enough to consider participants only one time. This works fine in all KNL cluster modes and even when there are missing DIMMs as the contribution of those channels is 0. Signed-off-by: Luis Felipe Sandoval Castro Acked-by: Tony Luck Cc: Mauro Carvalho Chehab Cc: arozansk@redhat.com Cc: linux-edac Cc: qiuxu.zhuo@intel.com Link: http://lkml.kernel.org/r/1506606882-90521-1-git-send-email-luis.felipe.sandoval.castro@intel.com Signed-off-by: Borislav Petkov drivers/edac/sb_edac.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit 9e97964d5e500d8d0df94e1a79ad715ad4f9c995 Author: Johannes Berg Date: Wed Oct 11 15:46:45 2017 +0200 mac80211: use crypto_aead_authsize() Evidently this API is intended to be used to isolate against API changes, so use it instead of accessing ->authsize. Signed-off-by: Johannes Berg net/mac80211/aead_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0e708fc602531b8355b5de6ea7c98f09129b223f Author: Ulf Hansson Date: Tue Oct 3 09:11:07 2017 +0200 PM / sleep: Remove pm_complete_with_resume_check() According to recent changes for ACPI, the are longer any users of pm_complete_with_resume_check(), thus let's drop it. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/base/power/generic_ops.c | 23 ----------------------- include/linux/pm.h | 1 - 2 files changed, 24 deletions(-) commit 8af4b3d7044d83c5426da6e45a9c7948bc7fa231 Merge: a5950f2 c2ebf78 Author: Rafael J. Wysocki Date: Wed Oct 11 15:39:38 2017 +0200 Merge branch 'acpi-pm' into pm-sleep commit eeb2d80d502af28e5660ff4bbe00f90ceb82c2db Author: Srinivas Pandruvada Date: Thu Oct 5 16:24:03 2017 -0700 ACPI / LPIT: Add Low Power Idle Table (LPIT) support Add functionality to read LPIT table, which provides: - Sysfs interface to read residency counters via /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us Here the count "low_power_idle_cpu_residency_us" shows the time spent by CPU package in low power state. This is read via MSR interface, which points to MSR for PKG C10. Here the count "low_power_idle_system_residency_us" show the count the system was in low power state. This is read via MMIO interface. This is mapped to SLP_S0 residency on modern Intel systems. This residency is achieved only when CPU is in PKG C10 and all functional blocks are in low power state. It is possible that none of the above counters present or anyone of the counter present or all counters present. For example: On my Kabylake system both of the above counters present. After suspend to idle these counts updated and prints: 6916179 6998564 This counter can be read by tools like turbostat to display. Or it can be used to debug, if modern systems are reaching desired low power state. - Provides an interface to read residency counter memory address This address can be used to get the base address of PMC memory mapped IO. This is utilized by intel_pmc_core driver to print more debug information. In addition, to avoid code duplication to read iomem, removed the read of iomem from acpi_os_read_memory() in osl.c and made a common function acpi_os_read_iomem(). This new function is used for reading iomem in in both osl.c and acpi_lpit.c. Link: http://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki Documentation/acpi/lpit.txt | 25 +++++++ drivers/acpi/Kconfig | 5 ++ drivers/acpi/Makefile | 1 + drivers/acpi/acpi_lpit.c | 162 ++++++++++++++++++++++++++++++++++++++++++++ drivers/acpi/internal.h | 6 ++ drivers/acpi/osl.c | 42 +++++++----- drivers/acpi/scan.c | 1 + include/acpi/acpiosxf.h | 2 + include/linux/acpi.h | 9 +++ 9 files changed, 237 insertions(+), 16 deletions(-) commit c2ebf788f927dcca72beead19fab5f5aba79a098 Author: Ulf Hansson Date: Tue Oct 3 09:11:08 2017 +0200 ACPI / PM: Split code validating need for runtime resume in ->prepare() Move the code dealing with validation of whether runtime resuming the device is needed during system suspend. In this way it becomes more clear for what circumstances ACPI is prevented from trying the direct_complete path. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/acpi/device_pm.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) commit e4da817d2acbd05217adc0dc821bc8361e86ee30 Author: Ulf Hansson Date: Tue Oct 3 09:11:06 2017 +0200 ACPI / PM: Restore acpi_subsys_complete() Commit 58a1fbbb2ee8 (PM / PCI / ACPI: Kick devices that might have been reset by firmware), made PCI's and ACPI's ->complete() callbacks to be assigned to a new API called pm_complete_with_resume_check(), which was introduced in the same change. Later it turned out that using pm_complete_with_resume_check() wasn't good enough for PCI, as it needed additional PCI specific checks, before deciding whether runtime resuming the device is needed when running the ->complete() callback. This leaves ACPI as the only user of pm_complete_with_resume_check(). Therefore let's restore ACPI's acpi_subsys_complete(), which was dropped in commit 58a1fbbb2ee8 (PM / PCI / ACPI: Kick devices that might have been reset by firmware). This enables us to remove the pm_complete_with_resume_check() API in a following change, but it also enables ACPI to add more ACPI specific checks in acpi_subsys_complete() if that turns out to be necessary. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_lpss.c | 2 +- drivers/acpi/device_pm.c | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) commit 63705c406a8adbd6f26691148b09d466dd4d8d2f Author: Rafael J. Wysocki Date: Tue Oct 10 18:49:22 2017 +0200 ACPI / PM: Combine two identical device resume routines Notice that acpi_dev_runtime_resume() and acpi_dev_resume_early() are actually literally identical after some more-or-less recent changes, so rename acpi_dev_runtime_resume() to acpi_dev_resume(), use it everywhere instead of acpi_dev_resume_early() and drop the latter. Signed-off-by: Rafael J. Wysocki Reviewed-by: Ulf Hansson drivers/acpi/acpi_lpss.c | 6 +++--- drivers/acpi/device_pm.c | 35 ++++++----------------------------- include/linux/acpi.h | 3 +-- 3 files changed, 10 insertions(+), 34 deletions(-) commit 9eabd28e8baf3bd7cfa729e74c664eed060958bc Author: Johan Hovold Date: Wed Oct 11 14:03:01 2017 +0200 USB: serial: garmin_gps: simplify init-session logic Clean up the somewhat convoluted init-session logic to improve readability. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/garmin_gps.c | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) commit c1a357b68614620c976a94260749a979f9c46d29 Author: Johan Hovold Date: Wed Oct 11 14:03:00 2017 +0200 USB: serial: garmin_gps: clean up init-session messages Use the port device for any init-session error and debug messages, remove one redundant debug message and simplify one error message. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/garmin_gps.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit b943cee8a5294d4d0e30528ed5f776aefd2b6fc3 Author: Johan Hovold Date: Wed Oct 11 14:02:59 2017 +0200 USB: serial: garmin_gps: drop unused timer initialisation Drop out-commented timer expiry initialisation which would not even compile anymore. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/garmin_gps.c | 1 - 1 file changed, 1 deletion(-) commit 74d471b598444b7f2d964930f7234779c80960a0 Author: Johan Hovold Date: Wed Oct 11 14:02:58 2017 +0200 USB: serial: garmin_gps: fix memory leak on probe errors Make sure to free the port private data before returning after a failed probe attempt. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/garmin_gps.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 19a565d9af6e0d828bd0d521d3bafd5017f4ce52 Author: Johan Hovold Date: Wed Oct 11 14:02:57 2017 +0200 USB: serial: garmin_gps: fix I/O after failed probe and remove Make sure to stop any submitted interrupt and bulk-out URBs before returning after failed probe and when the port is being unbound to avoid later NULL-pointer dereferences in the completion callbacks. Also fix up the related and broken I/O cancellation on failed open and on close. (Note that port->write_urb was never submitted.) Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable # 51a2f077 ("USB: introduce usb_anchor") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold drivers/usb/serial/garmin_gps.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 0ee32774aed648854a06bc3fae636f20f5f75a68 Author: Kees Cook Date: Wed Oct 4 17:53:24 2017 -0700 HID: usbhid: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() (introduced by 686fef928bba ("timer: Prepare to change timer callback argument type")) to pass the timer pointer explicitly. Adds pointer back to hid_device for multitouch. [jkosina@suse.cz: extend changelog a little bit as asked for by Benjamin] Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 10 ++++++---- drivers/hid/usbhid/hid-core.c | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) commit 2f84723de7cdd031f293b900fecd68ddbec3feaa Author: Jason Gerecke Date: Thu Oct 5 11:14:02 2017 -0700 Revert "HID: wacom: generic: Send BTN_TOOL_PEN in prox once the pen enters range" This reverts commit 3e70969e44ee52d72053145dab2cbad74109c685. This commit causes a few problems for userspace. The most noteworthy are problems related to the distinguishing of different pens and pointer jumps when entering proximity. Userspace is written with the expectation that a pen will provide its tool ID and serial number (if available) in the very first in-prox report. By sending BTN_TOOL_PEN when the tablet starts communicating rather than waiting until a tool ID/serial number is available, userspace ends up treating all pens as being the same and lacking a serial number. Similarly, userspace assumes that the first report will contain X/Y data, but by marking the pen as being in-prox without an X/Y coordinate, userspace ends up warping the pen to the last- known X/Y location. As of commit 5b40104edfb0 ("HID: wacom: generic: Reset events back to zero when pen leaves") this means warping to (0,0). Signed-off-by: Jason Gerecke Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 11 ----------- 1 file changed, 11 deletions(-) commit 738d9edcfd44f154924692e54109fb439fcf8bdd Author: Takashi Iwai Date: Wed Oct 4 17:22:05 2017 +0200 ALSA: usb-audio: Add sanity checks for invalid EPs USB-audio driver may set up a URB containing the fixed EP without validating its presence for some non-class-compliant devices. This may end up with an oops-like kernel warning when submitted. For avoiding it, this patch adds the call of the new sanity-check helper for URBs. The checks are needed only for MIDI I/O as the other places have already some other checks. Signed-off-by: Takashi Iwai sound/usb/midi.c | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) commit 2a4340c57717162c6bf07a0860d05711d4de994b Author: Takashi Iwai Date: Wed Oct 4 15:09:24 2017 +0200 ALSA: line6: Add a sanity check for invalid EPs As syzkaller spotted, currently line6 drivers submit a URB with the fixed EP without checking whether it's actually available, which may result in a kernel warning like: usb 1-1: BOGUS urb xfer, pipe 3 != type 1 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 24 at drivers/usb/core/urb.c:449 usb_submit_urb+0xf8a/0x11d0 Modules linked in: CPU: 0 PID: 24 Comm: kworker/0:1 Not tainted 4.14.0-rc2-42613-g1488251d1a98 #238 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: usb_hub_wq hub_event Call Trace: line6_start_listen+0x55f/0x9e0 sound/usb/line6/driver.c:82 line6_init_cap_control sound/usb/line6/driver.c:690 line6_probe+0x7c9/0x1310 sound/usb/line6/driver.c:764 podhd_probe+0x64/0x70 sound/usb/line6/podhd.c:474 usb_probe_interface+0x35d/0x8e0 drivers/usb/core/driver.c:361 .... This patch adds a sanity check of validity of EPs at the device initialization phase for avoiding the call with an invalid EP. Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Takashi Iwai sound/usb/line6/driver.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 58fc7f73a85d45a47057dad2af53502fdf6cf778 Author: Takashi Iwai Date: Wed Oct 4 15:07:21 2017 +0200 ALSA: caiaq: Add a sanity check for invalid EPs As syzkaller spotted, currently caiaq driver submits a URB with the fixed EP without checking whether it's actually available, which may result in a kernel warning like: usb 1-1: BOGUS urb xfer, pipe 3 != type 1 ------------[ cut here ]------------ WARNING: CPU: 1 PID: 1150 at drivers/usb/core/urb.c:449 usb_submit_urb+0xf8a/0x11d0 Modules linked in: CPU: 1 PID: 1150 Comm: kworker/1:1 Not tainted 4.14.0-rc2-42660-g24b7bd59eec0 #277 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: usb_hub_wq hub_event Call Trace: init_card sound/usb/caiaq/device.c:467 snd_probe+0x81c/0x1150 sound/usb/caiaq/device.c:525 usb_probe_interface+0x35d/0x8e0 drivers/usb/core/driver.c:361 .... This patch adds a sanity check of validity of EPs at the device initialization phase for avoiding the call with an invalid EP. Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Takashi Iwai sound/usb/caiaq/device.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 6815a0b444572527256f0d0efd8efe3ddede6018 Author: Takashi Iwai Date: Wed Oct 4 15:03:40 2017 +0200 ALSA: bcd2000: Add a sanity check for invalid EPs As syzkaller spotted, currently bcd2000 driver submits a URB with the fixed EP without checking whether it's actually available, which may result in a kernel warning like: usb 1-1: BOGUS urb xfer, pipe 1 != type 3 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1846 at drivers/usb/core/urb.c:449 usb_submit_urb+0xf8a/0x11d0 Modules linked in: CPU: 0 PID: 1846 Comm: kworker/0:2 Not tainted 4.14.0-rc2-42613-g1488251d1a98 #238 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: usb_hub_wq hub_event Call Trace: bcd2000_init_device sound/usb/bcd2000/bcd2000.c:289 bcd2000_init_midi sound/usb/bcd2000/bcd2000.c:345 bcd2000_probe+0xe64/0x19e0 sound/usb/bcd2000/bcd2000.c:406 usb_probe_interface+0x35d/0x8e0 drivers/usb/core/driver.c:361 .... This patch adds a sanity check of validity of EPs at the device initialization phase for avoiding the call with an invalid EP. Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Takashi Iwai sound/usb/bcd2000/bcd2000.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e901b9873876ca30a09253731bd3a6b00c44b5b0 Author: Takashi Iwai Date: Wed Oct 4 16:15:59 2017 +0200 usb: core: Add a helper function to check the validity of EP type in URB This patch adds a new helper function to perform a sanity check of the given URB to see whether it contains a valid endpoint. It's a light- weight version of what usb_submit_urb() does, but without the kernel warning followed by the stack trace, just returns an error code. Especially for a driver that doesn't parse the descriptor but fills the URB with the fixed endpoint (e.g. some quirks for non-compliant devices), this kind of check is preferable at the probe phase before actually submitting the urb. Tested-by: Andrey Konovalov Acked-by: Greg Kroah-Hartman Signed-off-by: Takashi Iwai drivers/usb/core/urb.c | 30 ++++++++++++++++++++++++++---- include/linux/usb.h | 2 ++ 2 files changed, 28 insertions(+), 4 deletions(-) commit c44027c89e19adafccd404bbe6f9686722ff4217 Author: Takashi Iwai Date: Wed Oct 11 06:36:13 2017 +0000 ALSA: add snd_card_disconnect_sync() In case of user unbind ALSA driver during playing back / capturing, each driver needs to stop and remove it correctly. One note here is that we can't cancel from remove function in such case, because unbind operation doesn't check return value from remove function. So, we *must* stop and remove in this case. For this purpose, we need to sync (= wait) until the all top-level operations are canceled at remove function. For example, snd_card_free() processes the disconnection procedure at first, then waits for the completion. That's how the hot-unplug works safely. It's implemented, at least, in the top-level driver removal. Now for the lower level driver, we need a similar strategy. Notify to the toplevel for hot-unplug (disconnect in ALSA), and sync with the stop operation, then continue the rest of its own remove procedure. This patch adds snd_card_disconnect_sync(), and driver can use it from remove function. Note: the "lower level" driver here refers to a middle layer driver (e.g. ASoC components) that can be unbound freely during operation. Most of legacy ALSA helper drivers don't have such a problem because they can't be unbound. Note#2: snd_card_disconnect_sync() merely calls snd_card_disconnect() and syncs with closing all pending files. It takes only the files opened by user-space into account, and doesn't care about object refcounts. (The latter is handled by snd_card_free() completion call, BTW.) Also, the function doesn't free resources by itself. Tested-by: Kuninori Morimoto Signed-off-by: Takashi Iwai include/sound/core.h | 2 ++ sound/core/init.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) commit 90a53e4432b12288316efaa5f308adafb8d304b0 Author: Johannes Berg Date: Wed Sep 13 22:21:08 2017 +0200 cfg80211: implement regdb signature checking Currently CRDA implements the signature checking, and the previous commits added the ability to load the whole regulatory database into the kernel. However, we really can't lose the signature checking, so implement it in the kernel by loading a detached signature (regulatory.db.p7s) and check it against built-in keys. Signed-off-by: Johannes Berg net/wireless/.gitignore | 2 + net/wireless/Kconfig | 30 ++++++++++ net/wireless/Makefile | 22 +++++++ net/wireless/certs/sforshee.x509 | Bin 0 -> 680 bytes net/wireless/reg.c | 121 ++++++++++++++++++++++++++++++++++++++- net/wireless/reg.h | 8 +++ 6 files changed, 182 insertions(+), 1 deletion(-) commit 8b1447aed5f49ce1745f0bbede05eef5f96079b3 Author: Chen-Yu Tsai Date: Tue Oct 10 11:20:08 2017 +0800 ARM: dts: sun6i: Enable HDMI support on some A31/A31s devices All the A31/A31s devices I own have some kind of HDMI connector wired to the dedicated HDMI pins on the SoC: - A31 Hummingbird (standard HDMI connector, display already enabled) - Sinlinx SinA31s (standard HDMI connector) - MSI Primo81 tablet (micro HDMI connector) Enable the display pipeline (if needed) and HDMI output for them. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 21 +++++++++++++++++++++ arch/arm/boot/dts/sun6i-a31s-primo81.dts | 25 +++++++++++++++++++++++++ arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 25 +++++++++++++++++++++++++ 3 files changed, 71 insertions(+) commit 026b89cec3eccd53684cba301b10aaad43364b0b Author: Chen-Yu Tsai Date: Tue Oct 10 11:20:07 2017 +0800 ARM: dts: sun6i: Add device node for HDMI controller Now that we support the HDMI controller on the A31 SoC, we can add it to the device tree. This adds a device node for the HDMI controller, and the of_graph nodes connecting it to the 2 TCONs. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31.dtsi | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 7c0f24a4c49c336ba82a429ef2fed0008efa9422 Merge: 0c17151 667063a Author: Daniel Vetter Date: Wed Oct 11 13:22:50 2017 +0200 Merge tag 'regmap-poll-field' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into drm-misc-next regmap: Add field polling macro Requested by Maxime Ripard to make sun4i compile again (next time the other way round is better). Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171004104732.jkps4ufekfizcrkz@sirena.co.uk commit c8c240e284b3d821011b4f680b3eaa99569b3756 Author: Johannes Berg Date: Thu Oct 15 14:35:41 2015 +0200 cfg80211: reg: remove support for built-in regdb Parsing and building C structures from a regdb is no longer needed since the "firmware" file (regulatory.db) can be linked into the kernel image to achieve the same effect. Signed-off-by: Johannes Berg Documentation/networking/regulatory.txt | 22 +---- net/wireless/.gitignore | 1 - net/wireless/Kconfig | 24 +---- net/wireless/Makefile | 6 -- net/wireless/db.txt | 17 ---- net/wireless/genregdb.awk | 158 -------------------------------- net/wireless/reg.c | 39 -------- net/wireless/regdb.h | 23 ----- 8 files changed, 3 insertions(+), 287 deletions(-) commit 0c17151aaae4f051ebdccde412e912631e450345 Author: Aishwarya Pant Date: Wed Oct 11 00:12:07 2017 +0530 drm/msm/mdp5: remove less than 0 comparison for unsigned value pipe is an unsigned int and less than zero comparison for unsigned values is always false. Detected using the following cocci script: @@ unsigned int i; @@ * i < 0 Signed-off-by: Aishwarya Pant Reviewed-by: Rob Clark Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171010184207.iv3dinrtwvbv7fei@aishwarya drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e25f1f7c94e16d4493398300efa03e5b6c77fcbf Author: Maciej Purski Date: Thu Aug 24 10:58:07 2017 +0200 drm/bridge/sii8620: add remote control support MHL specification defines Remote Control Protocol(RCP) to send input events between MHL devices. The driver now recognizes RCP messages and reacts to them by reporting key events to input subsystem, allowing a user to control a device using TV remote control. Signed-off-by: Maciej Purski Acked-by: Sean Young Acked-by: Mauro Carvalho Chehab Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1503565087-19730-1-git-send-email-m.purski@samsung.com drivers/gpu/drm/bridge/Kconfig | 2 +- drivers/gpu/drm/bridge/sil-sii8620.c | 96 ++++++++++++++++++++++++++++++++++-- include/drm/bridge/mhl.h | 4 ++ 3 files changed, 96 insertions(+), 6 deletions(-) commit 1ea4ff3e9f0b8d53e680a2bb9e8e644bf03aeb4d Author: Johannes Berg Date: Wed Sep 13 16:07:22 2017 +0200 cfg80211: support reloading regulatory database If the regulatory database is loaded, and then updated, it may be necessary to reload it. Add an nl80211 command to do this. Note that this just reloads the database, it doesn't re-apply the rules from it immediately. Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 4 +++ net/wireless/nl80211.c | 11 ++++++ net/wireless/reg.c | 80 +++++++++++++++++++++++++++++++++----------- net/wireless/reg.h | 6 ++++ 4 files changed, 81 insertions(+), 20 deletions(-) commit 007f6c5e6eb45c81ee89368a5f226572ae638831 Author: Johannes Berg Date: Thu Oct 15 11:22:58 2015 +0200 cfg80211: support loading regulatory database as firmware file As the current regulatory database is only about 4k big, and already difficult to extend, we decided that overall it would be better to get rid of the complications with CRDA and load the database into the kernel directly, but in a new format that is extensible. The new file format can be extended since it carries a length field on all the structs that need to be extensible. In order to be able to request firmware when the module initializes, move cfg80211 from subsys_initcall() to the later fs_initcall(); the firmware loader is at the same level but linked earlier, so it can be called from there. Otherwise, when both the firmware loader and cfg80211 are built-in, the request will crash the kernel. We also need to be before device_initcall() so that cfg80211 is available for devices when they initialize. Signed-off-by: Johannes Berg Documentation/networking/regulatory.txt | 8 + net/wireless/Kconfig | 4 +- net/wireless/core.c | 2 +- net/wireless/reg.c | 294 +++++++++++++++++++++++++++++--- 4 files changed, 284 insertions(+), 24 deletions(-) commit c9f20aafc939cc4091757c4d033feb010445f15d Author: Alan Stern Date: Tue Sep 26 15:15:58 2017 -0400 USB: dummy-hcd: remove unsupported isochronous endpoints The dummy-hcd driver doesn't support emulation of isochronous transfers. Therefore it doesn't need to export isochronous endpoint descriptors; they can be commented out. Also, the comments in the source code don't express clearly enough the fact that isochronous isn't supported. They need to be more explicit. Finally, change the error status value we use (in theory) for isochronous URBs. checkpatch complains about ENOSYS; EINVAL is more appropriate (it is documented to mean "ISO madness"). Signed-off-by: Alan Stern Reported-by: Felipe Balbi Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/dummy_hcd.c | 53 +++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 18 deletions(-) commit ffc4ea79bc06f42283da10ea06bb17b9a3e2b2b4 Author: Alan Stern Date: Tue Sep 26 15:16:05 2017 -0400 USB: dummy-hcd: bandwidth limits for non-bulk transfers Part of the emulation performed by dummy-hcd is accounting for bandwidth utilization. The total amount of data transferred in a single frame is supposed to be no larger than an actual USB connection could accommodate. Currently the driver performs bandwidth limiting only for bulk transfers; control and periodic transfers are effectively unlimited. (Presumably drivers were not expected to request extremely large control or interrupt transfers.) This patch improves the situation somewhat by restricting them as well. The emulation still isn't perfect. On a real system, even 0-length transfers use some bandwidth because of transaction overhead (IN, OUT, ACK, NACK packets) and packet overhead (SYNC, PID, bit stuffing, CRC, EOP). Adding in those factors is left as an exercise for a later patch. Signed-off-by: Alan Stern Signed-off-by: Felipe Balbi drivers/usb/gadget/udc/dummy_hcd.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 8af634ff9e5c0fd5daff37c9759cd6594345b372 Author: Jan Kara Date: Mon Oct 9 16:46:40 2017 +0200 ext2: Fix possible sleep in atomic during mount option parsing match_int() used in mount option parsing can allocate memory using GFP_KERNEL and thus sleep. Avoid parsing mount options with sbi->s_lock held. Signed-off-by: Jan Kara fs/ext2/super.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 088519572ca8bd6ab354d74bf7c88f413ed0e0be Author: Jan Kara Date: Mon Oct 9 16:34:58 2017 +0200 ext2: Parse mount options into a dedicated structure Instead of parsing mount options directly into the superblock (and restoring options in case of error), parse the options into a dedicated structure and only copy everything when we know we can safely switch options. This will allow us to simplify locking and do option parsing without holding sb->s_lock. Signed-off-by: Jan Kara fs/ext2/super.c | 157 +++++++++++++++++++++++++++----------------------------- 1 file changed, 76 insertions(+), 81 deletions(-) commit 7b9e64a6571ee9132f3515434b7047738cd28075 Author: Kuninori Morimoto Date: Tue Oct 10 07:57:40 2017 +0000 pinctrl: sh-pfc: r8a77995: Add Audio SSI pin support Signed-off-by: Kuninori Morimoto Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 6e7b1ee885793ecfa8e1194f92e23856b6c07c41 Author: Kuninori Morimoto Date: Tue Oct 10 07:57:17 2017 +0000 pinctrl: sh-pfc: r8a77995: Add Audio clock pin support Signed-off-by: Kuninori Morimoto Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 94888a4dc39a15ae3a09e1ec4cca0f18cf03a218 Author: Wolfram Sang Date: Mon Oct 9 10:37:25 2017 +0200 pinctrl: sh-pfc: r8a7796: Fix trivial typo in comment Signed-off-by: Wolfram Sang Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf3278feae63d3b8aaeaafa6c9e7c8b2fb236aae Author: Wolfram Sang Date: Mon Oct 9 10:37:24 2017 +0200 pinctrl: sh-pfc: r8a7795-es1: Fix trivial typo in comment Signed-off-by: Wolfram Sang Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecd54509a2fb89c533eb8984be4f6d24fb0c2e76 Author: Wolfram Sang Date: Mon Oct 9 10:37:24 2017 +0200 pinctrl: sh-pfc: r8a7795: Fix trivial typo in comment Signed-off-by: Wolfram Sang Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a362e3488cbfa921fbca1fa62e1670283c84d19 Author: Wolfram Sang Date: Mon Oct 9 10:20:53 2017 +0200 pinctrl: sh-pfc: r8a7795: Add HSCIF pins, groups, and functions Signed-off-by: Wolfram Sang Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 283 +++++++++++++++++++++++++++++++++++ 1 file changed, 283 insertions(+) commit b014912f6c462223229bb9865ceb1a363984c521 Author: Takeshi Kihara Date: Mon Oct 24 20:40:09 2016 +0900 pinctrl: sh-pfc: r8a7796: Add support for INTC-EX IRQ pins Most pins on the r8a7796 SoC can be configured in GPIO mode for interrupt and GPIO functionality, while a couple of them can also be routed to the INTC-EX hardware block (formerly known as IRQC). On r8a7795 the INTC-EX hardware handles pins IRQ0 -> IRQ5 and this patch adds support for them to the PFC driver as "intc_ex_irqN". [takeshi.kihara.df: Ported from commit bb46f6f3f3bf ("pinctrl: sh-pfc: r8a7795: Add support for INTC-EX IRQ pins") to drivers/pinctrl/sh-pfc/pfc-r8a7796.c] Signed-off-by: Takeshi Kihara Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 8480e6ca800046d14bfc610a24f2317341250b04 Author: Geert Uytterhoeven Date: Mon Mar 13 11:59:42 2017 +0100 pinctrl: sh-pfc: r8a7795: Add INTC-EX pins, groups and function Add pins, groups, and a function for the INTC-EX interrupt controller 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 | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 4e8975cbb516c5e4d1a5d026ffab1638409447d5 Author: Arnd Bergmann Date: Tue Oct 10 11:15:12 2017 +0200 clk: samsung: exynos5433: mark PM functions as __maybe_unused The suspend/resume functions are referenced conditionally, causing a harmless warning when CONFIG_PM is disabled: drivers/clk/samsung/clk-exynos5433.c:5476:12: error: 'exynos5433_cmu_resume' defined but not used [-Werror=unused-function] drivers/clk/samsung/clk-exynos5433.c:5453:12: error: 'exynos5433_cmu_suspend' defined but not used [-Werror=unused-function] This marks both as __maybe_unused to shut up the warning. Fixes: 523d3de41f02 ("clk: samsung: exynos5433: Add support for runtime PM") Signed-off-by: Arnd Bergmann Acked-by: Marek Szyprowski Acked-by: Chanwoo Choi Acked-by: Ulf Hansson Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5433.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a7ab4cb46902cd481d7def6869cf38a1e157f829 Author: Kevin Wangtao Date: Tue Oct 10 20:02:50 2017 +0200 arm64: dts: Register Hi3660's thermal sensor Add binding for tsensor on H3660, this tsensor is used for SoC thermal control, it supports alarm interrupt. Signed-off-by: Kevin Wangtao Signed-off-by: Daniel Lezcano Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 9044070dc6949d853976b01edc80eaca9d09cea1 Author: Kevin Wangtao Date: Tue Oct 10 20:02:48 2017 +0200 dt-bindings: Document the hi3660 thermal sensor binding This adds documentation of device tree bindings for the thermal sensor controller of hi3660 SoC. Signed-off-by: Kevin Wangtao Signed-off-by: Daniel Lezcano Acked-by: Rob Herring Signed-off-by: Wei Xu Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3a9fa27be507b19107a8b3fe03a67e8145aea88c Author: Kuninori Morimoto Date: Wed Oct 11 04:42:34 2017 +0000 ASoC: rsnd: add rsnd_kctrl_xxx() macro Current CTU/MIX/DVC are directly using rsnd_kctrl_cfg_m/s to control val etc, but it is difficult to read/understand. And there was no uniformity in access method. This patch adds new rsnd_kctrl_xxx() and implements uniformed access method. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/ctu.c | 80 ++++++++++++++++++++++++------------------------ sound/soc/sh/rcar/dvc.c | 19 ++++++------ sound/soc/sh/rcar/mix.c | 10 +++--- sound/soc/sh/rcar/rsnd.h | 4 +++ 4 files changed, 59 insertions(+), 54 deletions(-) commit 20d879e7f0fe632827bcff3016e067b4d80bf791 Merge: 073a435 f2abcfa Author: Kalle Valo Date: Wed Oct 11 11:36:47 2017 +0300 Merge tag 'iwlwifi-next-for-kalle-2017-10-06-2' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next First batch of iwlwifi patches for 4.15 (v2) * Cleanups: - remove an unused value that we read from the NVM; - remove link quality measurement code that was never used; * One FW command API update; * A fix and an addition for PCI devices for the A000 family; * Tiny refactor of ref/unref code used by runtime-PM; * Some debugging improvements; * Implementation of a more flexible way to define command queue sizes; * ACPI code refactoring; * Some coding-style fixes; * Avoid redundant command to the firmware; * Add a struct with the format of one FW command; * Change an error log to a warning when the FW API is not aligned with the driver (important during development); * Change a WARN_ON to WARN_ONCE to make it more descriptive and less noisy (i.e. no repeated warnings on a firmware triggered error); * Dump PCI registers when an error occurs, to make it easier to debug; commit a067fb4290131b5b356dfcc464b5bff19a251791 Author: Dinh Nguyen Date: Wed Oct 11 03:24:36 2017 -0500 arm64: dts: stratix10: fix interrupt number for gpio1 The gpio1 node's interrupt number should be 111. Signed-off-by: Dinh Nguyen arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cb74f444364c2f05ef21e84b22c82ebcd116131 Author: Fenglin Wu Date: Tue Sep 12 08:32:46 2017 +0800 pinctrl: qcom: spmi-gpio: Update GPIO EN_CTL when setting pin config GPIO is expected to be disabled iff PIN_CONFIG_BIAS_HIGH_IMPEDANCE is configured. Update is_enabled flag in config_set() so that it can reflect GPIO status correctly. Also modify EN_CTL register based on is_enabled flag in config_set() to configure the GPIO properly. Signed-off-by: Fenglin Wu Acked-by: Bjorn Andersson Signed-off-by: Linus Walleij drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2a7893c8b5318063b126a97b5524db3a247a719a Author: Phil Reid Date: Fri Oct 6 13:08:11 2017 +0800 pinctrl: mcp23s08: remove unused variables from pinconf_set Variable mask and val are not used in the mcp_pinconf_set(). Signed-off-by: Phil Reid Reviewed-by: Sebastian Reichel Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-mcp23s08.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f850b5401cdfa6f5d03a62357211507d6ed72050 Author: Alan Tull Date: Tue Oct 10 16:25:38 2017 -0500 arm64: dts: stratix10: enable gpio and leds Enable gpio and leds for socdk OOBE daughtercard. pushbutton PB_SW0 = gpio1.io4 pushbutton PB_SW1 = gpio1.io5 LED HPS_LED0 = gpio1.io20 LED HPS_LED1 = gpio1.io19 LED HPS_LED2 = gpio1.io21 Signed-off-by: Alan Tull Signed-off-by: Dinh Nguyen .../boot/dts/altera/socfpga_stratix10_socdk.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 5a0e622e499bfe34d3c12a8c7db997e770d1a7fd Author: Alan Tull Date: Tue Oct 10 16:25:37 2017 -0500 arm64: dts: stratix10: add gpio header Add the gpio header to the base stratix10 dtsi. Signed-off-by: Alan Tull Signed-off-by: Dinh Nguyen arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 1 + 1 file changed, 1 insertion(+) commit b889372c843b2a2c4aa776c85bca31636fd38d90 Author: Phil Reid Date: Fri Oct 6 13:08:06 2017 +0800 dt-bindings: pinctrl: add mcp23018 to mcp23s08 documentation This adds the compatible string for the mcp23018, which is the i2c variant of the mcp23s18. Signed-off-by: Phil Reid Reviewed-by: Sebastian Reichel Signed-off-by: Linus Walleij Documentation/devicetree/bindings/pinctrl/pinctrl-mcp23s08.txt | 1 + 1 file changed, 1 insertion(+) commit e8527b6eb6ffdccc45b58646312cfe42365b74b0 Author: Lars Poeschel Date: Mon Oct 9 14:03:00 2017 +0200 dt-bindings: pinctrl: mcp23s08 update binding doc The mcp23s08 driver moved to pinctrl recently. It accepts the bias-pull-up pinctrl property since then. This updates the binding doc to reflect that. Thanks to Sebastian Reichel for the working example. Signed-off-by: Lars Poeschel Signed-off-by: Linus Walleij .../bindings/pinctrl/pinctrl-mcp23s08.txt | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit a157789b78f4e95f5d66f8b564356e396716f67e Author: Lars Poeschel Date: Thu Oct 5 09:50:02 2017 +0200 dt-bindings: pinctrl: Move mcp23s08 from gpio The mcp23s08 driver was moved from gpio to pinctrl. This moves it's devicetree binding doc as well. So driver and binding doc are in sync again. Signed-off-by: Lars Poeschel Reviewed-by: Sebastian Reichel Signed-off-by: Linus Walleij .../devicetree/bindings/gpio/gpio-mcp23s08.txt | 83 ---------------------- .../bindings/pinctrl/pinctrl-mcp23s08.txt | 83 ++++++++++++++++++++++ 2 files changed, 83 insertions(+), 83 deletions(-) commit d219b924611a5cceb17cc6b9a8dd103ab9668c94 Author: Phil Reid Date: Fri Oct 6 13:08:05 2017 +0800 pinctrl: change Kconfig PINCTRL variable to a menuconfig This allows PINCTRL to be selected manually to allow enabling of the mcp23s08 i2c/spi gpio driver. Which is not platform specific. Signed-off-by: Phil Reid Reviewed-by: Sebastian Reichel Signed-off-by: Linus Walleij drivers/pinctrl/Kconfig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 3163d125b7b1f9c6844fc3448f8080ad268a8f63 Author: Bin Meng Date: Mon Sep 11 02:42:00 2017 -0700 spi-nor: intel-spi: Fall back to use SW sequencer to erase According to the datasheet, the HW sequencer has a predefined list of opcodes, with only the erase opcode being programmable in LVSCC and UVSCC registers. If these registers don't contain a valid erase opcode (eg: BIOS does not program it), erase cannot be done using the HW sequencer, even though the erase operation does not report any error, the flash remains not erased. If such register setting is detected, let's fall back to use the SW sequencer to erase instead. Signed-off-by: Bin Meng Acked-by: Mika Westerberg Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/intel-spi.c | 50 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) commit 37d933fc1728e998d929d0ff5113dcb14ce31293 Author: Sagar Arun Kamble Date: Tue Oct 10 22:30:10 2017 +0100 drm/i915: Introduce separate status variable for RC6 and LLC ring frequency setup Defined new struct intel_rc6 to hold RC6 specific state and intel_ring_pstate to hold ring specific state. v2: s/intel_ring_pstate/intel_llc_pstate. Removed checks from autoenable_* functions. (Chris) Signed-off-by: Sagar Arun Kamble Cc: Imre Deak Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Radoslaw Szwichtenberg Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1507360055-19948-13-git-send-email-sagar.a.kamble@intel.com Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171010213010.7415-12-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 10 ++++++++ drivers/gpu/drm/i915/intel_pm.c | 54 ++++++++++++++++++++++++----------------- 3 files changed, 43 insertions(+), 23 deletions(-) commit fc77426a8d69d6a706378a53b18c882578af44e5 Author: Sagar Arun Kamble Date: Tue Oct 10 22:30:09 2017 +0100 drm/i915: Create generic functions to control RC6, RPS Prepared generic functions intel_enable_rc6, intel_disable_rc6, intel_enable_rps and intel_disable_rps functions to setup RC6/RPS based on platforms. v2: Make intel_enable/disable_rc6/rps static. (Chris) v3: Added lockdep_assert_held(dev_priv->pcu_lock) in new generic functions. (Chris) Removed WARN_ON(&dev_priv->pcu_lock) from lower level functions as generic function now has lockdep_assert. Rebase. Signed-off-by: Sagar Arun Kamble Cc: Imre Deak Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Radoslaw Szwichtenberg Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1507360055-19948-12-git-send-email-sagar.a.kamble@intel.com Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171010213010.7415-11-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_pm.c | 116 ++++++++++++++++++++++++---------------- 1 file changed, 70 insertions(+), 46 deletions(-) commit 0870a2a4a3d0aab568ce5729bd99f43f96825f85 Author: Sagar Arun Kamble Date: Tue Oct 10 22:30:08 2017 +0100 drm/i915: Create generic function to setup LLC ring frequency table Prepared intel_update_ring_freq function to setup ring frequency for applicable platforms determined by macro HAS_LLC. v2: Replaced NEEDS_RING_FREQ_UPDATE with HAS_LLC macro. (Chris) Added check while calling from intel_enable_gt_powersave. v3: s/intel_update_ring_freq/intel_enable_llc_pstate and created new placeholder function intel_disable_llc_pstate. (Chris) Signed-off-by: Sagar Arun Kamble Cc: Imre Deak Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Radoslaw Szwichtenberg Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1507360055-19948-11-git-send-email-sagar.a.kamble@intel.com Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171010213010.7415-10-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_pm.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) commit 771decb0b4d75b5cc1d7ddfbdf512bd8768d2793 Author: Sagar Arun Kamble Date: Tue Oct 10 22:30:07 2017 +0100 drm/i915: Rename intel_enable_rc6 to intel_rc6_enabled This function gives the status of RC6, whether disabled or if enabled then which state. intel_enable_rc6 will be used for enabling RC6 in the next patch. v2: Rebase. v3: Rebase. Signed-off-by: Sagar Arun Kamble Cc: Chris Wilson Cc: Imre Deak Cc: Joonas Lahtinen Reviewed-by: Radoslaw Szwichtenberg #1 Reviewed-by: Ewelina Musial #1 Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1507360055-19948-10-git-send-email-sagar.a.kamble@intel.com Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171010213010.7415-9-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/i915_sysfs.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_guc.c | 3 ++- drivers/gpu/drm/i915/intel_pm.c | 12 ++++++------ 5 files changed, 11 insertions(+), 10 deletions(-) commit 562d9bae08a10335368bf54ea5cc7e4f6185bccc Author: Sagar Arun Kamble Date: Tue Oct 10 22:30:06 2017 +0100 drm/i915: Name structure in dev_priv that contains RPS/RC6 state as "gt_pm" Prepared substructure rps for RPS related state. autoenable_work is used for RC6 too hence it is defined outside rps structure. As we do this lot many functions are refactored to use intel_rps *rps to access rps related members. Hence renamed intel_rps_client pointer variables to rps_client in various functions. v2: Rebase. v3: s/pm/gt_pm (Chris) Refactored access to rps structure by declaring struct intel_rps * in many functions. Signed-off-by: Sagar Arun Kamble Cc: Chris Wilson Cc: Imre Deak Cc: Joonas Lahtinen Reviewed-by: Radoslaw Szwichtenberg #1 Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1507360055-19948-9-git-send-email-sagar.a.kamble@intel.com Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171010213010.7415-8-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 99 ++++----- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 14 +- drivers/gpu/drm/i915/i915_gem.c | 21 +- drivers/gpu/drm/i915/i915_gem_request.c | 2 +- drivers/gpu/drm/i915/i915_guc_submission.c | 10 +- drivers/gpu/drm/i915/i915_irq.c | 87 ++++---- drivers/gpu/drm/i915/i915_sysfs.c | 54 ++--- drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_pm.c | 315 ++++++++++++++++------------- 10 files changed, 330 insertions(+), 276 deletions(-) commit 9f817501bd7facfe2bffacd637f4332e5991e57a Author: Sagar Arun Kamble Date: Tue Oct 10 22:30:05 2017 +0100 drm/i915: Move rps.hw_lock to dev_priv and s/hw_lock/pcu_lock In order to separate GT PM related functionality into new structure we are updating rps structure. hw_lock in it is used for display related PCU communication too hence move it to dev_priv. Signed-off-by: Sagar Arun Kamble Cc: Imre Deak Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Radoslaw Szwichtenberg Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1507360055-19948-8-git-send-email-sagar.a.kamble@intel.com Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171010213010.7415-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 24 +++++------ drivers/gpu/drm/i915/i915_drv.h | 16 ++++---- drivers/gpu/drm/i915/i915_irq.c | 4 +- drivers/gpu/drm/i915/i915_sysfs.c | 20 ++++----- drivers/gpu/drm/i915/intel_cdclk.c | 40 +++++++++--------- drivers/gpu/drm/i915/intel_display.c | 12 +++--- drivers/gpu/drm/i915/intel_pm.c | 72 ++++++++++++++++----------------- drivers/gpu/drm/i915/intel_runtime_pm.c | 16 ++++---- drivers/gpu/drm/i915/intel_sideband.c | 6 +-- 9 files changed, 105 insertions(+), 105 deletions(-) commit ad1443f0f3dd1b2434af897af8b8f942e47cf8c3 Author: Sagar Arun Kamble Date: Tue Oct 10 22:30:04 2017 +0100 drm/i915: Name i915_runtime_pm structure in dev_priv as "runtime_pm" We were using dev_priv->pm for runtime power management related state. This patch renames it to "runtime_pm" which looks more apt. v2: s/rpm/runtime_pm (Chris) Signed-off-by: Sagar Arun Kamble Cc: Imre Deak Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Radoslaw Szwichtenberg #1 Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1507360055-19948-7-git-send-email-sagar.a.kamble@intel.com Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171010213010.7415-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 8 ++++---- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 4 ++-- drivers/gpu/drm/i915/i915_irq.c | 8 ++++---- drivers/gpu/drm/i915/intel_drv.h | 10 +++++----- drivers/gpu/drm/i915/intel_pm.c | 4 ++-- drivers/gpu/drm/i915/intel_runtime_pm.c | 10 +++++----- 7 files changed, 23 insertions(+), 23 deletions(-) commit d46b00dc38c8aea80357a0dd04f57c097dbfa5b9 Author: Sagar Arun Kamble Date: Tue Oct 10 22:30:03 2017 +0100 drm/i915: Separate RPS and RC6 handling for CHV This patch separates enable/disable of RC6 and RPS for CHV. v2: Fixed comment. Signed-off-by: Sagar Arun Kamble Cc: Imre Deak Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Radoslaw Szwichtenberg Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1507360055-19948-6-git-send-email-sagar.a.kamble@intel.com Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171010213010.7415-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_pm.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit 0d6fc92a73e0c4dd8635268ef0ffb852986bba89 Author: Sagar Arun Kamble Date: Tue Oct 10 22:30:02 2017 +0100 drm/i915: Separate RPS and RC6 handling for VLV This patch separates enable/disable of RC6 and RPS for VLV. v2: Removed unnecessary comments about forcewakes while enabling RC6/RPS. Added changes to output turbo control status for VLV in i915_frequency_info. Signed-off-by: Sagar Arun Kamble Cc: Imre Deak Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Radoslaw Szwichtenberg Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1507360055-19948-5-git-send-email-sagar.a.kamble@intel.com Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171010213010.7415-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 24 +++++++-------- drivers/gpu/drm/i915/intel_pm.c | 61 ++++++++++++++++++++++++------------- 2 files changed, 51 insertions(+), 34 deletions(-) commit 3a85392c0ea0689d8d3ba1f9c9df5d3e32bfa517 Author: Sagar Arun Kamble Date: Tue Oct 10 22:30:01 2017 +0100 drm/i915: Separate RPS and RC6 handling for BDW This patch separates RC6 and RPS enabling for BDW. RC6/RPS Disabling are handled through gen6 functions. PM Programming guide recommends a sequence within forcewakes to configure RC6, RPS and ring frequencies in sequence. With this patch the order is still maintained. v2: Update sequence numbers in RC6 programming and comment about intent of reset_rps during gen8_enable_rps. (Radoslaw) v3: Rebase. Signed-off-by: Sagar Arun Kamble Cc: Imre Deak Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Radoslaw Szwichtenberg Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1507360055-19948-4-git-send-email-sagar.a.kamble@intel.com Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171010213010.7415-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_pm.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit 415544d5a89fb2be3b12dc7c4682806323aabdbf Author: Sagar Arun Kamble Date: Tue Oct 10 22:30:00 2017 +0100 drm/i915: Remove superfluous IS_BDW checks and non-BDW changes from gen8_enable_rps This patch removes all IS_BROADWELL checks and non-BDW changes from gen8_enable_rps as it is called only for BROADWELL. Suggested-by: Chris Wilson Signed-off-by: Sagar Arun Kamble Cc: Imre Deak Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Radoslaw Szwichtenberg Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1507360055-19948-3-git-send-email-sagar.a.kamble@intel.com Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171010213010.7415-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_pm.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 960e54652ceed1c0f49969c5d951688eab1d49cb Author: Sagar Arun Kamble Date: Tue Oct 10 22:29:59 2017 +0100 drm/i915: Separate RPS and RC6 handling for gen6+ This patch separates enable/disable of RC6 and RPS for gen6+ platforms prior to VLV. v2: Fixed checkpatch issue. (Sagar) Signed-off-by: Sagar Arun Kamble Cc: Imre Deak Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Radoslaw Szwichtenberg #1 Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1507360055-19948-2-git-send-email-sagar.a.kamble@intel.com Acked-by: Imre Deak Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171010213010.7415-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 17 +++++++-------- drivers/gpu/drm/i915/intel_pm.c | 43 +++++++++++++++++++++++++------------ 2 files changed, 37 insertions(+), 23 deletions(-) commit 2421f1ccbd4e7c8fc10c5f6a6e9cc403ace4e449 Author: Bin Meng Date: Mon Sep 11 02:41:59 2017 -0700 spi-nor: intel-spi: Rename swseq to swseq_reg in 'struct intel_spi' The ispi->swseq is used for register access. Let's rename it to swseq_reg to better describe its usage. Signed-off-by: Bin Meng Acked-by: Mika Westerberg Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/intel-spi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 6affd6981ca5d2b1d3d9d5191b18bd4a692587fe Author: Jerome Brunet Date: Fri Oct 6 10:54:07 2017 +0200 pinctrl: meson: remove unused pin_base While removing the need to have pin_base defined in meson pinctrl drivers, I forgot to remove the corresponding field from the pinctrl_data structure. Fixing this now. Fixes: 70e5ecb1b994 ("pinctrl: meson: get rid of pin_base") Signed-off-by: Jerome Brunet Reviewed-by: Kevin Hilman Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson.h | 1 - 1 file changed, 1 deletion(-) commit da184deeb8aeac6cadf45f01ce9bc4197940a059 Author: Chen-Yu Tsai Date: Tue Oct 10 11:20:06 2017 +0800 drm/sun4i: hdmi: Add support for A31's HDMI controller The HDMI controller found in the A31 SoCs is slightly different from the one already supported, which is found in the A10s: - Need different initial values for the PLL related registers - Different behavior of the DDC and TMDS clocks - Different register layout for the DDC portion - Separate DDC parent clock This patch adds support for it. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171010032008.682-10-wens@csie.org drivers/gpu/drm/sun4i/sun4i_hdmi.h | 3 ++ drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 58 ++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) commit c4a9aec3dfe5203363c6c2f9fc62353f4898225e Author: Chen-Yu Tsai Date: Tue Oct 10 11:20:05 2017 +0800 drm/sun4i: hdmi: Add A31 specific DDC register definitions The DDC block for the HDMI controller is different on the A31. This patch adds the register definitions. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171010032008.682-9-wens@csie.org drivers/gpu/drm/sun4i/sun4i_hdmi.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 939d749ad6649c4123daf63a8bc053ea97ad2218 Author: Chen-Yu Tsai Date: Tue Oct 10 11:20:04 2017 +0800 drm/sun4i: hdmi: Add support for controller hardware variants The HDMI controller found in earlier Allwinner SoCs have slight differences between the A10, A10s, and the A31: - Need different initial values for the PLL related registers - Different behavior of the DDC and TMDS clocks - Different register layout for the DDC portion - Separate DDC parent clock on the A31 - Explicit reset control For the A31, the HDMI TMDS clock has a different value offset for the divider. The HDMI DDC block is different from the one in the other SoCs. As far as the DDC clock goes, it has no pre-divider, as it is clocked from a slower parent clock, not the TMDS clock. The divider offset from the register value is different. And the clock control register is at a different offset. A new variant data structure is created to store pointers to the above functions, structures, and the different initial values. Another flag notates whether there is a separate DDC parent clock. If not, the TMDS clock is passed to the DDC clock create function, as before. Regmap fields are used to deal with the different register layout of the DDC block. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171010032008.682-8-wens@csie.org drivers/gpu/drm/sun4i/sun4i_hdmi.h | 72 +++++++++ drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c | 38 +++-- drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 112 +++++++++++--- drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c | 227 ++++++++++++++++++++-------- drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 17 ++- 5 files changed, 369 insertions(+), 97 deletions(-) commit 68a48afa6540f0bd193167f91283915ca8a4225e Author: Chen-Yu Tsai Date: Tue Oct 10 11:20:03 2017 +0800 dt-bindings: display: sun4i: Add binding for A31 HDMI controller The HDMI controller in the A31 SoC is slightly different from the earlier version. In addition to the TMDS clock and DDC controls, this version now takes a second DDC clock input. Add a compatible string for it, and add the DDC clock input to the list of clocks required. Signed-off-by: Chen-Yu Tsai Acked-by: Rob Herring Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171010032008.682-7-wens@csie.org Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 3 +++ 1 file changed, 3 insertions(+) commit cc67ae90be461ff78ed0b92681213e988138312a Author: Chen-Yu Tsai Date: Tue Oct 10 11:20:02 2017 +0800 drm/sun4i: hdmi: Allow using second PLL as TMDS clk parent On SoCs with two display pipelines, it is possible that the two pipelines are active at the same time, with potentially incompatible dot clocks. Let the HDMI encoder's TMDS clock go through all of its parents when calculating possible clock rates. This allows usage of the second video PLL as its parent. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171010032008.682-6-wens@csie.org drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 53 ++++++++++++++++------------- 1 file changed, 29 insertions(+), 24 deletions(-) commit 4b1c924b1fc15e68251ad0186b5004858d0f147b Author: Chen-Yu Tsai Date: Tue Oct 10 11:20:01 2017 +0800 drm/sun4i: hdmi: create a regmap for later use The HDMI driver is written with readl/writel I/O to the registers. However, to support the A31 variant, which has a different layout for the DDC registers, it was recommended to use regfields to have a cleaner implementation. To use regfields, we need to create an underlying regmap. This patch only adds the regmap. It does not convert the existing driver accesses to use regmap. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171010032008.682-5-wens@csie.org drivers/gpu/drm/sun4i/sun4i_hdmi.h | 1 + drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) commit d51b989b2b5fecd241c4e77952d664c34beaabf9 Author: Jerome Brunet Date: Fri Oct 6 10:31:42 2017 +0200 pinctrl: meson-gx: add TEST_N i2s pinmux Add TEST_N pinmux for channel 6 and 7 of the i2s output Signed-off-by: Jerome Brunet Reviewed-by: Kevin Hilman Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 5 +++++ drivers/pinctrl/meson/pinctrl-meson-gxl.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit 544c5048bcdc5d5c395d99d61ab7a52964a1420b Author: Chen-Yu Tsai Date: Tue Oct 10 11:20:00 2017 +0800 drm/sun4i: hdmi: Disable clks in bind function error path and unbind function The HDMI driver enables the bus and mod clocks in the bind function, but does not disable them if it then bails our due to any errors. Neither does it disable the clocks in the unbind function. Fix this by adding a proper error path to the bind function, and clk_disable_unprepare calls to the unbind function. Also rename the err_cleanup_connector label to err_cleanup_encoder, since it is the encoder that gets cleaned up. Fixes: 9c5681011a0c ("drm/sun4i: Add HDMI support") Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171010032008.682-4-wens@csie.org drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 67e326450d7af554e80fbbac73b2b65b6468afca Author: Chen-Yu Tsai Date: Tue Oct 10 11:19:59 2017 +0800 drm/sun4i: tcon: Add support for demuxing TCON output on A31 On systems with 2 TCONs such as the A31, it is possible to demux the output of the TCONs to one encoder. Add support for this for the A31. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171010032008.682-3-wens@csie.org drivers/gpu/drm/sun4i/sun4i_tcon.c | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit ad537fb2abb0a10e60f702cd1ff14666f54457e3 Author: Chen-Yu Tsai Date: Tue Oct 10 11:19:58 2017 +0800 drm/sun4i: tcon: Add variant callback for TCON output muxing Different SoCs have different muxing options and values for the TCON outputs. Instead of stuffing every possibility in sun4i_tcon_set_mux(), add a callback pointer to sun4i_tcon_quirks that each TCON variant can use to provide muxing support. The current muxing options in sun4i_tcon_set_mux() for sun5i-a13 are moved to a new sun5i-specific callback function. Since the new callback replaces what the .has_unknown_mux field in tcon quirks did in the past, the field is removed. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20171010032008.682-2-wens@csie.org drivers/gpu/drm/sun4i/sun4i_tcon.c | 44 +++++++++++++++++++++++--------------- drivers/gpu/drm/sun4i/sun4i_tcon.h | 6 +++++- 2 files changed, 32 insertions(+), 18 deletions(-) commit 6e995b84ce449758017d1eab5a91865158e3ceee Author: Bin Meng Date: Mon Sep 11 02:41:58 2017 -0700 spi-nor: intel-spi: Remove the unnecessary HSFSTS register RW There is no code that alters the HSFSTS register content in between in intel_spi_write(). Remove the unnecessary RW to save some cycles. Signed-off-by: Bin Meng Acked-by: Mika Westerberg Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/intel-spi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2a9e25796b289f71c0802eca46005c750c57af95 Author: Johannes Berg Date: Fri Oct 6 11:53:33 2017 +0200 mac80211: only remove AP VLAN frames from TXQ When removing an AP VLAN interface, mac80211 currently purges the entire TXQ for the AP interface. Fix this by using the FQ API introduced in the previous patch to filter frames. Signed-off-by: Johannes Berg Acked-by: Toke Høiland-Jørgensen Signed-off-by: Johannes Berg net/mac80211/ieee80211_i.h | 2 ++ net/mac80211/iface.c | 25 +++---------------------- net/mac80211/tx.c | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 22 deletions(-) commit 8c418b5b15747eda05d086e80fa0a767982fbf37 Author: Johannes Berg Date: Fri Oct 6 11:53:32 2017 +0200 fq: support filtering a given tin Add to the FQ API a way to filter a given tin, in order to remove frames that fulfil certain criteria according to a filter function. This will be used by mac80211 to remove frames belonging to an AP VLAN interface that's being removed. Signed-off-by: Johannes Berg Acked-by: Toke Høiland-Jørgensen Signed-off-by: Johannes Berg include/net/fq.h | 7 +++++ include/net/fq_impl.h | 72 ++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 69 insertions(+), 10 deletions(-) commit 8c473dd61bb55f4d1576b50947b54d101553517b Author: Bin Meng Date: Mon Sep 11 02:41:57 2017 -0700 spi-nor: intel-spi: Don't assume OPMENU0/1 to be programmed by BIOS At present the driver relies on valid OPMENU0/OPMENU1 register values that are programmed by BIOS to function correctly. However in a real world it's absolutely legitimate for a bootloader to leave these two registers untouched. Intel FSP for Baytrail exactly does like this. When we are booting from any Intel FSP based bootloaders like U-Boot, the driver refuses to work. We can of course program various flash opcodes in the OPMENU0/OPMENU1 registers, and such workaround can be added in either the bootloader codes, or the kernel driver itself. But a graceful solution would be to update the kernel driver to remove such limitation of OPMENU0/1 register dependency. The SPI controller settings are not locked under such configuration. So we can first check the controller locking status, and if it is not locked that means the driver job can be fulfilled by using a chosen OPMENU index to set up the flash opcode every time. While we are here, the missing 'Atomic Cycle Sequence' handling in the SW sequencer codes is also added. Signed-off-by: Bin Meng Acked-by: Mika Westerberg Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/intel-spi.c | 91 +++++++++++++++++++++++++++++------------ 1 file changed, 65 insertions(+), 26 deletions(-) commit aecf59e90a494f5d439415ce8d50064f6c644615 Author: Bin Meng Date: Mon Sep 11 02:41:56 2017 -0700 spi-nor: intel-spi: Remove 'Atomic Cycle Sequence' in intel_spi_write() So far intel_spi_write() uses the HW sequencer to do the write. But the HW sequencer register HSFSTS_CTL does not have such a field for 'Atomic Cycle Sequence', remove it. Signed-off-by: Bin Meng Acked-by: Mika Westerberg Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/intel-spi.c | 5 ----- 1 file changed, 5 deletions(-) commit fc2b34726101016b2736d5025dde5a112e313577 Author: Bin Meng Date: Mon Sep 11 02:41:55 2017 -0700 spi-nor: intel-spi: Use SW sequencer for BYT/LPT Baytrail/Lynx Point SPI controller's HW sequencer only supports basic operations. This is determined by the chipset design, however current codes try to use register values in OPMENU0/OPMENU1 to see whether SW sequencer should be used, which is wrong. In fact OPMENU0/OPMENU1 can remain unprogrammed by some bootloaders. Signed-off-by: Bin Meng Acked-by: Mika Westerberg Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/intel-spi.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit db2ce7f3c7b01a6a3611fb8e0bfa453dec168a47 Author: Bin Meng Date: Mon Sep 11 02:41:54 2017 -0700 spi-nor: intel-spi: Check transfer length in the HW/SW cycle Intel SPI controller only has a 64 bytes FIFO. This adds a sanity check before triggering any HW/SW sequencer work. Additionally for the SW sequencer, if given data length is zero, we should not mark the 'Data Cycle' bit. Signed-off-by: Bin Meng Acked-by: Mika Westerberg Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/intel-spi.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 9d63f17661e25fd28714dac94bdebc4ff5b75f09 Author: Bin Meng Date: Mon Sep 11 02:41:53 2017 -0700 spi-nor: intel-spi: Fix broken software sequencing codes There are two bugs in current intel_spi_sw_cycle(): - The 'data byte count' field should be the number of bytes transferred minus 1 - SSFSTS_CTL is the offset from ispi->sregs, not ispi->base Signed-off-by: Bin Meng Cc: # v4.11+ Acked-by: Mika Westerberg Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/intel-spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e58348b0e41b56660a349d63448826df11bb6163 Author: Bin Meng Date: Mon Sep 11 02:41:52 2017 -0700 spi-nor: intel-spi: Remove useless 'buf' parameter in the HW/SW cycle intel_spi_hw_cycle() and intel_spi_sw_cycle() don't use the parameter 'buf' at all. Remove it. Signed-off-by: Bin Meng Acked-by: Mika Westerberg Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/intel-spi.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 703ef76b8fd5169d5cff30de5b958d6728b9a147 Author: Arnd Bergmann Date: Thu Oct 5 14:09:04 2017 +0200 ARM: shmobile: rcar-gen2: fix non-SMP build A bugfix for the SMP case broke the build for the UP case: arch/arm/mach-shmobile/headsmp-apmu.o: In function `shmobile_boot_apmu': (.text+0x34): undefined reference to `secondary_startup' The assembler file mixes code that is used for SMP with code that we also need on a single-CPU build, so I'm leaving it always enabled in the Makefile, but enclose the SMP code in an #ifdef. Fixes: fd45a136ff6 ("ARM: shmobile: rcar-gen2: Make sure CNTVOFF is initialized on CA7/15") Signed-off-by: Arnd Bergmann Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/mach-shmobile/headsmp-apmu.S | 2 ++ 1 file changed, 2 insertions(+) commit 9cbb035cc111f5c6655f1026d4e7918282f6e137 Author: Bin Meng Date: Mon Sep 11 02:41:51 2017 -0700 spi-nor: intel-spi: Fix number of protected range registers for BYT/LPT The number of protected range registers is not the same on BYT/LPT/ BXT. GPR0 only exists on Apollo Lake and its offset is reserved on other platforms. Signed-off-by: Bin Meng Acked-by: Mika Westerberg Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/intel-spi.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 4133da73067af0417c623eb4ad5e85081ccbf4b4 Author: Xiang Gao Date: Tue Oct 10 22:31:49 2017 -0400 mac80211: aead api to reduce redundancy Currently, the aes_ccm.c and aes_gcm.c are almost line by line copy of each other. This patch reduce code redundancy by moving the code in these two files to crypto/aead_api.c to make it a higher level aead api. The file aes_ccm.c and aes_gcm.c are removed and all the functions there are now implemented in their headers using the newly added aead api. Signed-off-by: Xiang Gao Signed-off-by: Johannes Berg net/mac80211/Makefile | 3 +- net/mac80211/aead_api.c | 115 ++++++++++++++++++++++++++++++++++++++++++++++++ net/mac80211/aead_api.h | 27 ++++++++++++ net/mac80211/aes_ccm.c | 115 ------------------------------------------------ net/mac80211/aes_ccm.h | 42 +++++++++++++----- net/mac80211/aes_gcm.c | 109 --------------------------------------------- net/mac80211/aes_gcm.h | 38 ++++++++++++---- net/mac80211/wpa.c | 4 +- 8 files changed, 206 insertions(+), 247 deletions(-) commit 8c03145a2e2d98d44dba4bf16ab34636eb60b834 Author: Johannes Berg Date: Tue Oct 10 09:57:59 2017 +0200 MAINTAINERS: update Johannes Berg's entries Update my MAINTAINERS file entries to list all the right files. Since I'm also the de-facto wireless extensions maintainer, there's little point in excluding those. Signed-off-by: Johannes Berg MAINTAINERS | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 29d15361385f0792bd9e8abb10604ebc4b96cf5b Author: Kees Cook Date: Tue Oct 10 11:25:22 2017 -0700 USB: serial: garmin_gps: convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Johan Hovold Cc: Allen Pais Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Johan Hovold drivers/usb/serial/garmin_gps.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit ff26449e415a5601c8bb5b67ac4ae801f7165696 Author: Tony Nguyen Date: Wed Oct 4 08:52:58 2017 -0700 PCI: Restore ARI Capable Hierarchy before setting numVFs In the restore path, we previously read PCI_SRIOV_VF_OFFSET and PCI_SRIOV_VF_STRIDE before restoring PCI_SRIOV_CTRL_ARI: pci_restore_state pci_restore_iov_state sriov_restore_state pci_iov_set_numvfs pci_read_config_word(... PCI_SRIOV_VF_OFFSET, &iov->offset) pci_read_config_word(... PCI_SRIOV_VF_STRIDE, &iov->stride) pci_write_config_word(... PCI_SRIOV_CTRL, iov->ctrl) But per SR-IOV r1.1, sec 3.3.3.5, the device can use PCI_SRIOV_CTRL_ARI to determine PCI_SRIOV_VF_OFFSET and PCI_SRIOV_VF_STRIDE. Therefore, this path, which is used for suspend/resume and AER recovery, can corrupt iov->offset and iov->stride. Since the iov state is associated with the device, not the driver, if we reload the driver, it will use the the corrupted data, which may cause crashes like this: kernel BUG at drivers/pci/iov.c:157! RIP: 0010:pci_iov_add_virtfn+0x2eb/0x350 Call Trace: pci_enable_sriov+0x353/0x440 ixgbe_pci_sriov_configure+0xd5/0x1f0 [ixgbe] sriov_numvfs_store+0xf7/0x170 dev_attr_store+0x18/0x30 sysfs_kf_write+0x37/0x40 kernfs_fop_write+0x120/0x1b0 vfs_write+0xb5/0x1a0 SyS_write+0x55/0xc0 Restore PCI_SRIOV_CTRL_ARI before calling pci_iov_set_numvfs(), then restore the rest of PCI_SRIOV_CTRL (which may set PCI_SRIOV_CTRL_VFE) afterwards. Signed-off-by: Tony Nguyen [bhelgaas: changelog, add comment, also clear ARI if necessary] Signed-off-by: Bjorn Helgaas Acked-by: Alexander Duyck CC: Emil Tantilov drivers/pci/iov.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 27d6162944b9b34c32cd5841acd21786637ee743 Author: Stuart Hayes Date: Wed Oct 4 10:57:52 2017 -0500 PCI: Create SR-IOV virtfn/physfn links before attaching driver When creating virtual functions, create the "virtfn%u" and "physfn" links in sysfs *before* attaching the driver instead of after. When we attach the driver to the new virtual network interface first, there is a race when the driver attaches to the new sends out an "add" udev event, and the network interface naming software (biosdevname or systemd, for example) tries to look at these links. Signed-off-by: Stuart Hayes Signed-off-by: Bjorn Helgaas drivers/pci/iov.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7dfca15276fc3f18411a2b2182704fa1222bcb60 Author: Filippo Sironi Date: Mon Oct 9 01:09:11 2017 +0200 PCI: Expose SR-IOV offset, stride, and VF device ID via sysfs Expose the SR-IOV device offset, stride, and VF device ID via sysfs to make it easier for userspace applications to consume them. Signed-off-by: Filippo Sironi Signed-off-by: Bjorn Helgaas drivers/pci/pci-sysfs.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit e200052f826295ea606039d15fa518c401d64b56 Author: Helge Deller Date: Wed Sep 6 22:27:54 2017 +0200 PM / AVS: Use %pS printk format for direct addresses Use the %pS instead of the %pF printk format specifier for printing symbols from direct addresses. This is needed for the ia64, ppc64 and parisc64 architectures. Signed-off-by: Helge Deller Acked-by: Nishanth Menon Signed-off-by: Rafael J. Wysocki drivers/power/avs/smartreflex.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0563bb7ba67eec7a87a9ccc04b80bb59de26c319 Author: Jason Baron Date: Fri Oct 6 13:19:45 2017 -0400 intel_idle: replace conditionals with static_cpu_has(X86_FEATURE_ARAT) If the 'arat' cpu flag is set, then the conditionals in intel_idle() that guard calling tick_broadcast_enter()/exit() will never be true. Use static_cpu_has(X86_FEATURE_ARAT) to create a fast path to replace the conditional. Signed-off-by: Jason Baron Acked-by: Jacob Pan Signed-off-by: Rafael J. Wysocki drivers/idle/intel_idle.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 9e9704ea5baf09e4c61be5901439da34c39995d0 Author: Ulf Hansson Date: Fri Oct 6 09:02:06 2017 +0200 PM / Domains: Rename genpd internals from pm_genpd_* to genpd_* Most of the functions names has already moved the genpd naming rules, however let's make this complete to avoid any further confusions. Signed-off-by: Ulf Hansson Reviewed-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/base/power/domain.c | 104 +++++++++++++++++++++----------------------- 1 file changed, 50 insertions(+), 54 deletions(-) commit 11f2c0d77ca856ce146a3e05e7bdfc0c5e6e0f61 Author: Marek Szyprowski Date: Wed Oct 4 08:38:28 2017 +0200 cpufreq: dt: Remove support for Exynos4212 SoCs Support for Exynos4212 SoCs has been removed by commit bca9085e0ae9 "ARM: dts: exynos: remove Exynos4212 support (dead code)", so there is no need to keep remaining dead code related to this SoC version. Signed-off-by: Marek Szyprowski Acked-by: Viresh Kumar Acked-by: Krzysztof Kozlowski Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt-platdev.c | 1 - 1 file changed, 1 deletion(-) commit 2b3d58a3adca9b7dec9bd289c5c0fda82eeebfa8 Author: Fabio Estevam Date: Sat Sep 30 12:16:46 2017 -0300 cpufreq: imx6q: Move speed grading check to cpufreq driver On some i.MX6 SoCs (like i.MX6SL, i.MX6SX and i.MX6UL) that do not have speed grading check, opp table will not be created in platform code, so cpufreq driver prints the following error message: cpu cpu0: dev_pm_opp_get_opp_count: OPP table not found (-19) However, this is not really an error in this case because the imx6q-cpufreq driver first calls dev_pm_opp_get_opp_count() and if it fails, it means that platform code does not provide OPP and then dev_pm_opp_of_add_table() will be called. In order to avoid such confusing error message, move the speed grading check from platform code to the imx6q-cpufreq driver. This way the imx6q-cpufreq no longer has to check whether OPP table is supplied by platform code. Tested on a i.MX6Q and i.MX6UL based boards. Signed-off-by: Fabio Estevam Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki arch/arm/mach-imx/mach-imx6q.c | 88 +---------------------------------------- drivers/cpufreq/imx6q-cpufreq.c | 85 +++++++++++++++++++++++++++++---------- 2 files changed, 67 insertions(+), 106 deletions(-) commit 604a7aeb4325b8ecb23df163c89fc12248302a4e Author: Viresh Kumar Date: Thu Oct 5 17:26:21 2017 +0530 PM / OPP: Rename dev_pm_opp_register_put_opp_helper() The routine is named incorrectly since the first attempt as there is nothing like a put_opp() helper. We wanted to unregister the set_opp() helper here and so it should rather be named as dev_pm_opp_unregister_set_opp_helper(). Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/opp/core.c | 6 +++--- include/linux/pm_opp.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 7978db344719dab1e56d05e6fc04aaaddcde0a5e Author: Tobias Jordan Date: Wed Oct 4 11:35:03 2017 +0530 PM / OPP: Add missing of_node_put(np) The for_each_available_child_of_node() loop in _of_add_opp_table_v2() doesn't drop the reference to "np" on errors. Fix that. Fixes: 274659029c9d (PM / OPP: Add support to parse "operating-points-v2" bindings) Cc: 4.3+ # 4.3+ Signed-off-by: Tobias Jordan [ VK: Improved commit log. ] Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/opp/of.c | 1 + 1 file changed, 1 insertion(+) commit 035ed07208dc501d023873447113f3f178592156 Author: Fabio Estevam Date: Fri Sep 29 14:39:49 2017 -0300 PM / OPP: Move error message to debug level On some i.MX6 platforms which do not have speed grading check, opp table will not be created in platform code, so cpufreq driver prints the following error message: cpu cpu0: dev_pm_opp_get_opp_count: OPP table not found (-19) However, this is not really an error in this case because the imx6q-cpufreq driver first calls dev_pm_opp_get_opp_count() and if it fails, it means that platform code does not provide OPP and then dev_pm_opp_of_add_table() will be called. In order to avoid such confusing error message, move it to debug level. It is up to the caller of dev_pm_opp_get_opp_count() to check its return value and decide if it will print an error or not. Signed-off-by: Fabio Estevam Signed-off-by: Rafael J. Wysocki drivers/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d741029a2390406d4d94279ae5b346831a9e61e6 Author: Arvind Yadav Date: Thu Sep 21 11:15:36 2017 +0530 PM / OPP: Use snprintf() to avoid kasprintf() and kfree() Use snprintf() to avoid unnecessary initializations, avoid calling kfree(). Signed-off-by: Arvind Yadav Acked-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki drivers/opp/debugfs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 095f613c6b386a1704b73a549e9ba66c1d5381ae Author: Jan Beulich Date: Mon Sep 25 02:06:19 2017 -0600 ACPI / APEI: adjust a local variable type in ghes_ioremap_pfn_irq() Match up with what 7edda0886b ("acpi: apei: handle SEA notification type for ARMv8") did for ghes_ioremap_pfn_nmi(). Signed-off-by: Jan Beulich Reviewed-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki drivers/acpi/apei/ghes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b8226962b1c49c784aeddb9d2fafbf53dfdc2190 Author: Eric Garver Date: Tue Oct 10 16:54:44 2017 -0400 openvswitch: add ct_clear action This adds a ct_clear action for clearing conntrack state. ct_clear is currently implemented in OVS userspace, but is not backed by an action in the kernel datapath. This is useful for flows that may modify a packet tuple after a ct lookup has already occurred. Signed-off-by: Eric Garver Acked-by: Pravin B Shelar Signed-off-by: David S. Miller include/uapi/linux/openvswitch.h | 2 ++ net/openvswitch/actions.c | 4 ++++ net/openvswitch/conntrack.c | 11 +++++++++++ net/openvswitch/conntrack.h | 7 +++++++ net/openvswitch/flow_netlink.c | 5 +++++ 5 files changed, 29 insertions(+) commit 8715b108cd75523c9b2e833cdcd7aeb363767f95 Author: Joel Fernandes Date: Mon Oct 9 12:29:31 2017 -0700 ftrace: Clear hashes of stale ips of init memory Filters should be cleared of init functions during freeing of init memory when the ftrace dyn records are released. However in current code, the filters are left as is. This patch clears the hashes of the saved init functions when the init memory is freed. This fixes the following issue reproducible with the following sequence of commands for a test module: ================================================ void bar(void) { printk(KERN_INFO "bar!\n"); } void foo(void) { printk(KERN_INFO "foo!\n"); bar(); } static int __init hello_init(void) { printk(KERN_INFO "Hello world!\n"); foo(); return 0; } static void __exit hello_cleanup(void) { printk(KERN_INFO "Cleaning up module.\n"); } module_init(hello_init); module_exit(hello_cleanup); ================================================ Commands: echo '*:mod:test' > /d/tracing/set_ftrace_filter echo function > /d/tracing/current_tracer modprobe test rmmod test sleep 1 modprobe test cat /d/tracing/set_ftrace_filter Behavior without patch: Init function is still in the filter Expected behavior: Shouldn't have any of the filters set Link: http://lkml.kernel.org/r/20171009192931.56401-1-joelaf@google.com Signed-off-by: Joel Fernandes Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit d59158162e032917a428704160a2063a02405ec6 Author: Joel Fernandes Date: Tue Oct 10 15:51:37 2017 -0700 tracing: Add support for preempt and irq enable/disable events Preempt and irq trace events can be used for tracing the start and end of an atomic section which can be used by a trace viewer like systrace to graphically view the start and end of an atomic section and correlate them with latencies and scheduling issues. This also serves as a prelude to using synthetic events or probes to rewrite the preempt and irqsoff tracers, along with numerous benefits of using trace events features for these events. Link: http://lkml.kernel.org/r/20171006005432.14244-3-joelaf@google.com Link: http://lkml.kernel.org/r/20171010225137.17370-1-joelaf@google.com Cc: Peter Zilstra Cc: kernel-team@android.com Signed-off-by: Joel Fernandes Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 3 +- include/trace/events/preemptirq.h | 70 +++++++++++++++++++++++++++++++++++++++ kernel/trace/Kconfig | 11 ++++++ kernel/trace/Makefile | 1 + kernel/trace/trace_irqsoff.c | 35 +++++++++++++++++++- 5 files changed, 118 insertions(+), 2 deletions(-) commit 833e0e2f24fd0525090878f71e129a8a4cb8bf78 Author: Jakub Kicinski Date: Tue Oct 10 15:05:39 2017 -0700 net: dst: move cpu inside ifdef to avoid compilation warning If CONFIG_DST_CACHE is not selected cpu variable will be unused and we will see a compilation warning. Move it under the ifdef. Reported-by: kbuild test robot Fixes: d66f2b91f95b ("bpf: don't rely on the verifier lock for metadata_dst allocation") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/core/dst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cffb1a0504ddc7b291cf882002ee4a794eb3fec Author: Tony Lindgren Date: Tue Oct 10 14:27:33 2017 -0700 ARM: OMAP2+: Drop legacy struct omap_hwmod_addr_space With all of mach-omap2 booting now in device tree only mode, we can get the module IO range from device tree and just drop the legacy hwmod struct omap_hwmod_addr_space. Cc: Lokesh Vutla Cc: Paul Walmsley Cc: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/Makefile | 3 - arch/arm/mach-omap2/omap_hwmod.c | 253 +------------ arch/arm/mach-omap2/omap_hwmod.h | 28 -- arch/arm/mach-omap2/omap_hwmod_2420_data.c | 1 - arch/arm/mach-omap2/omap_hwmod_2430_data.c | 1 - .../omap_hwmod_2xxx_3xxx_interconnect_data.c | 27 -- .../omap_hwmod_33xx_43xx_interconnect_data.c | 100 ----- arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 39 -- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 33 +- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 402 --------------------- arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 10 - arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 51 --- arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 44 --- arch/arm/mach-omap2/omap_hwmod_common_data.h | 6 - 14 files changed, 14 insertions(+), 984 deletions(-) commit c2b84a9bb3414cabaa039b8860a694464a0bad06 Author: Tony Lindgren Date: Tue Oct 10 14:27:26 2017 -0700 ARM: OMAP2+: Drop omap_hwmod_dma_info We have all of mach-omap2 booting in device tree only mode now, and this data is populated from device tree. Note that once we have removed support for the omap legacy DMA, we can also drop struct omap_dma_dev_attr. Cc: Lokesh Vutla Cc: Paul Walmsley Cc: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_device.c | 155 +-------------------- arch/arm/mach-omap2/omap_hwmod.c | 119 +--------------- arch/arm/mach-omap2/omap_hwmod.h | 17 --- arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 6 - arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 8 -- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 108 -------------- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 6 - arch/arm/mach-omap2/omap_hwmod_common_data.h | 14 -- 8 files changed, 4 insertions(+), 429 deletions(-) commit fe97874a41bf911350bae6bda7fc044d12c76a4a Author: Tony Lindgren Date: Tue Oct 10 14:27:19 2017 -0700 ARM: OMAP2+: Drop omap_hwmod_irq_info With the previous patches removing the need for legacy IRQs now that all of mach-omap2 is booting in device tree only mode, we can drop struct omap_hwmod_irq_info. Note that we can now also finally drop omap4_xlate_irq. Cc: Lokesh Vutla Cc: Marc Zyngier Cc: Paul Walmsley Cc: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/common.h | 1 - arch/arm/mach-omap2/omap4-common.c | 24 ----- arch/arm/mach-omap2/omap_hwmod.c | 100 +-------------------- arch/arm/mach-omap2/omap_hwmod.h | 17 ---- arch/arm/mach-omap2/omap_hwmod_2420_data.c | 1 - arch/arm/mach-omap2/omap_hwmod_2430_data.c | 1 - .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | 15 ---- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 2 - arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 38 -------- arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 10 --- arch/arm/mach-omap2/omap_hwmod_common_data.h | 21 ----- 11 files changed, 4 insertions(+), 226 deletions(-) commit 3da521672568702c58767de69b5b0b58c8095fae Author: Tony Lindgren Date: Tue Oct 10 14:27:13 2017 -0700 ARM: OMAP4: Remove legacy IRQ for PRM We have the PRM IRQ mapped in device tree and this legacy code is no longer needed. Cc: Lokesh Vutla Cc: Paul Walmsley Cc: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/prcm-common.h | 1 - arch/arm/mach-omap2/prm.h | 2 -- arch/arm/mach-omap2/prm44xx.c | 21 +++------------------ arch/arm/mach-omap2/prm_common.c | 12 +++--------- 4 files changed, 6 insertions(+), 30 deletions(-) commit 82e5051ba4e7c6d3820e3ab87c1f20a6531d64a8 Author: Tony Lindgren Date: Tue Oct 10 14:27:06 2017 -0700 ARM: OMAP3: Remove legacy IRQ for PRM We have this coming from device tree and legacy booting is no longer needed. Cc: Lokesh Vutla Cc: Paul Walmsley Cc: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/prm3xxx.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 0eecc636e5a2f667e69df318867b63edc8b44218 Author: Tony Lindgren Date: Tue Oct 10 14:23:43 2017 -0700 bus: ti-sysc: Add minimal TI sysc interconnect target driver We can handle the sysc interconnect target module in a generic way for many TI SoCs. Initially let's just enable runtime PM with autosuspend, and probe the children. This can already be used for idling interconnect target modules that don't have any device driver available for the child devices. For now, the "ti,hwmods" custom binding is still required. That will be eventually deprecated in later patches. And more features will be added, such as parsing for sysc capabilities so we can continue removing the legacy platform data. Cc: Benoît Cousson Cc: Greg Kroah-Hartman Cc: Laurent Pinchart Cc: Nishanth Menon Cc: Matthijs van Duin Cc: Paul Walmsley Cc: Peter Ujfalusi Cc: Sakari Ailus Cc: Tero Kristo Cc: Tomi Valkeinen Cc: linux-kernel@vger.kernel.org Signed-off-by: Tony Lindgren arch/arm/mach-omap2/Kconfig | 1 + drivers/bus/Kconfig | 7 + drivers/bus/Makefile | 1 + drivers/bus/ti-sysc.c | 558 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 567 insertions(+) commit d85a2d61432aed6a4c2e5f90109a37562f9a8092 Author: Tony Lindgren Date: Tue Oct 10 14:23:35 2017 -0700 ARM: OMAP2+: Populate legacy resources for dma and smartreflex We can populate the legacy resources needed by dma and smartreflex from device tree in omap_device_build(). There should be no need to do this for other devices, and eventually these two remaining users will be gone too. The legacy dma will be dropped when the remaining users have been converted to use the dmaengine driver, and smartreflex can now become just a regular device driver with a few pdata callbacks. This is needed in order to remove remaining device dma, irq and io resources from the interconnect code. And while at it, let's simplify things by removing otherwise unused omap_device_build_ss() as we will never call it for more than one hwmod. Cc: "Benoît Cousson" Cc: Lokesh Vutla Cc: Nishanth Menon Cc: Paul Walmsley Cc: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_device.c | 137 +++++++++++++++++++++++++++++--------- arch/arm/mach-omap2/omap_device.h | 4 -- 2 files changed, 106 insertions(+), 35 deletions(-) commit 6c72b35506728b2669835cfa8c245ac3f1c15659 Author: Tony Lindgren Date: Tue Oct 10 14:23:27 2017 -0700 ARM: OMAP2+: Parse module IO range from dts for legacy "ti,hwmods" support When removing legacy platform data for IO ranges for the hwmod interconnect code, we still need to support the "ti,hwmods" property. And as we're going to use a generic sysc device driver to handle the interconnect target instances, we can parse the information needed for legacy "ti,hwmods" IO range from the dts. It's always the first range the interconnect target module provides. Note that we want to parse the range instead of the first child device IO regs as the child device may not always be defined. The child IP device node may not exist in cases where there is no driver binding for the device, or when the child IP block may not even be functional for some SoC revisions. But the IO range of the interconnect target module is always known. Cc: "Benoît Cousson" Cc: Lokesh Vutla Cc: Paul Walmsley Cc: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod.c | 80 +++++++++++++++++++++++++++++++++++++++- arch/arm/mach-omap2/omap_hwmod.h | 5 +++ 2 files changed, 84 insertions(+), 1 deletion(-) commit f09de60e0ae3440a139b516d579d866890ff3101 Merge: 10e998f 160ec89 Author: Tony Lindgren Date: Tue Oct 10 14:19:47 2017 -0700 Merge branch 'omap-for-v4.15/fixes-dt' into omap-for-v4.15/ti-sysc commit 160ec89ac3460c0c529582adb7fc4eb3d4f4fafa Author: Tony Lindgren Date: Tue Oct 10 14:15:04 2017 -0700 ARM: dts: Configure SmartReflex only to idle the interconnect target module The TRM has marked dra7 SmartReflex as reserved and we should not touch those registers as pointed out by Nishanth Menon . We do still want to idle the related interconnect target modules on init though. Let's do this by only configuring the generic interconnect target modules and not add the child SmartReflex devices. Cc: Lokesh Vutla Cc: Nishanth Menon Cc: Paul Walmsley Cc: Rob Herring Cc: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit d23a163ebe5aab85fb66fd6b1256bed34a18a269 Author: Tony Lindgren Date: Tue Oct 10 14:14:50 2017 -0700 ARM: dts: Add nodes for missing omap4 interconnect target modules On omap4 we are missing dts nodes for several interconnect target modules that we are idling on init. This currently works with the legacy platform data still around. To fix this, let's add the interconnect target modules so we can idle the unused interconnect target module on init. Also note that adding the interconnect target module node does not necessarily mean that there is a driver available for the child IP block, or that the child IP block is even functional. In the SGX case, the PowerVR driver is closed source. And McASP on omap4 has at least the TX path disabled and is not supported by the davinci-mcasp driver. For AESS there is old Android 3.4 kernel driver available. For smarflex, we are still probing with platform data and the driver needs more work before we can add the device ip child nodes. And finally, we're not yet using the interconnet ranges. I will be posting separate patches for those later on. Cc: Benoît Cousson Cc: Laurent Pinchart Cc: Liam Girdwood Cc: Mark Brown Cc: Mark Rutland Cc: Mauro Carvalho Chehab Cc: Nishanth Menon Cc: Matthijs van Duin Cc: Paul Walmsley Cc: Peter Ujfalusi Cc: Rob Herring Cc: Sakari Ailus Cc: Tero Kristo Cc: Tomi Valkeinen Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4.dtsi | 159 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 147 insertions(+), 12 deletions(-) commit b6891523fe9915dfa868773db638832454316788 Author: Tony Lindgren Date: Tue Oct 10 14:14:40 2017 -0700 dt-bindings: bus: Minimal TI sysc interconnect target module binding With the recently introduced omap clkctrl module binding, we can start moving omap hwmod data to device tree and drivers from arch/arm/mach-omap2. To start doing this, let's introduce a device tree binding for TI sysc interconnect target module hardware. The sysc manages module clocks, idlemodes and interconnect level resets. Each interconnect target module can have one or more child devices connected to it. TI sysc interconnect target module hardware is independent of the interconnect. It is used at least with TI L3 interconnect (Arteris NoC) and TI L4 interconnect (Sonics s3220). The sysc is mostly used for interaction between module and PRCM. It participates in the OCP Disconnect Protocol but other than that is mostly indepenent of the interconnect. As all the features may not be supported for a given sysc module, we need to use device tree configuration for the revision of the interconnect target module. Note that the interconnect target module control registers are always sprinked at varying locations in the unused address space of the first child device IP block. To avoid device tree reg conflicts, the sysc device provides ranges for it's children. For a non-intrusive transition from static hwmod data to using device tree defined TI interconnect target module binding, we can keep things working with static hwmod data if device tree property "ti,hwmods" is specified for the the interconnect target module. Note that additional properties for sysc capabilities will be added later on. For now, we can already use this binding for interconnect target modules that do not have any child device drivers available. This allows us to idle the unused interconnect target modules during init without the need for legacy hwmod platform data for doing it. Cc: Benoît Cousson Cc: Dave Gerlach Cc: Laurent Pinchart Cc: Liam Girdwood Cc: Mark Brown Cc: Mark Rutland Cc: Mauro Carvalho Chehab Cc: Nishanth Menon Cc: Matthijs van Duin Cc: Paul Walmsley Cc: Peter Ujfalusi Cc: Sakari Ailus Cc: Suman Anna Cc: Tero Kristo Cc: Tomi Valkeinen Reviewed-by: Rob Herring Signed-off-by: Tony Lindgren Documentation/devicetree/bindings/bus/ti-sysc.txt | 93 +++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit 617dc7610d9f5f64ec79cfdbdd4fb42cfcd93ee9 Author: Matthew Auld Date: Tue Oct 10 14:30:30 2017 +0100 drm/i915/selftests: ditch the kernel context There's really no good reason to be using the kernel context for the huge-page livetests. Also with the introduction of commit bef27bdb6cfb ("drm/i915: Assert we do not try to expand VMA for hugepage inside GGTT") we start hitting the bug on in the selftests, since the kernel context will always return true for i915_vma_is_ggtt(), so now seems like the opportune time to instead create our own context. Fixes: 4049866f0913 ("drm/i915/selftests: huge page tests") Fixes: bef27bdb6cfb ("drm/i915: Assert we do not try to expand VMA for hugepage inside GGTT") Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171010133030.12112-1-matthew.auld@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/selftests/huge_pages.c | 57 +++++++++++++++++++---------- 1 file changed, 38 insertions(+), 19 deletions(-) commit f44dea3421b47d355a835e9cfcc59ca7318575a9 Merge: b88d12e 18eb863 Author: David S. Miller Date: Tue Oct 10 13:20:16 2017 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2017-10-10 This series contains updates to e1000e and igb. Benjamin Poirier provides several fixes for e1000e, starting with a correction to the return status which was always returning success even if it was not successful. Fixed code comments to reflect the actual code behavior. Fixed the conditional test for the correct return value. Fixed a potential race condition reported by Lennart Sorensen, where the single flag get_link_status is used to signal two different states. Sasha fixes a buffer overrun for i219 devices, where the chipset had reduced the round-trip latency for the LAN controller DMA accesses which in some high performance cases caused a buffer overrun while processing the DMA transactions. Willem de Bruijn changes the default behavior of e1000e to use the burst mode settings by default unless the user specifies the receive interrupt delay (RxIntDelay). Florian Fainelli updates the driver to differentiate between when e1000e_put_txbuf() is called from normal reclamation or when a DMA mapping failure to make the driver more "drop monitor friendly". Christophe JAILLET fixes a potential NULL pointer dereference by properly returning -ENOMEM on memory allocation failures. ==================== Signed-off-by: David S. Miller commit b88d12e4a4ff5b99dcaf9b35a30ad2597cb2fd8a Author: Florian Westphal Date: Tue Oct 10 17:10:04 2017 +0200 rtnetlink: bridge: use ext_ack instead of printk We can now piggyback error strings to userspace via extended acks rather than using printk. Before: bridge fdb add 01:02:03:04:05:06 dev br0 vlan 4095 RTNETLINK answers: Invalid argument After: bridge fdb add 01:02:03:04:05:06 dev br0 vlan 4095 Error: invalid vlan id. v3: drop 'RTM_' prefixes, suggested by David Ahern, they are not useful, the add/del in bridge command line is enough. Also reword error in response to malformed/bad vlan id attribute size. Cc: David Ahern Signed-off-by: Florian Westphal Reviewed-by: David Ahern Signed-off-by: David S. Miller net/core/rtnetlink.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 8f88f74a1641f57607a2417669e0e02b768796b4 Author: Florian Westphal Date: Tue Oct 10 16:18:05 2017 +0200 selftests: rtnetlink: test RTM_GETNETCONF exercise RTM_GETNETCONF call path for unspec, inet and inet6 families, they are DOIT_UNLOCKED candidates. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller tools/testing/selftests/net/rtnetlink.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit 31ce6ceec0aaec72c50f5d3adc59edd9899ab858 Merge: 59d4387 80a8dc7 Author: David S. Miller Date: Tue Oct 10 13:11:23 2017 -0700 Merge branch 'mlx4_en-num-of-rings' Tariq Toukan says: ==================== mlx4_en num of rings This patchset from Inbar contains changes to rings control to the mlx4 Eth driver. Patches 1 and 2 limit the number of rings to the number of CPUs. Patch 3 removes a limitation in logic of default number of RX rings. Series generated against net-next commit: 812b5ca7d376 Add a driver for Renesas uPD60620 and uPD60620A PHYs ==================== Signed-off-by: David S. Miller commit 80a8dc75ee674a111fea2ae1d02ff96535a309c2 Author: Inbar Karmy Date: Tue Oct 10 12:28:35 2017 +0300 net/mlx4_en: Increase number of default RX rings Remove limitation of netif_get_num_default_rss_queues() from logic of RX rings default number. Signed-off-by: Inbar Karmy Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b8d394367a631c2d749b3114e04dfb4d09624ddf Author: Inbar Karmy Date: Tue Oct 10 12:28:34 2017 +0300 net/mlx4_en: Limit the number of RX rings Limit the number of RX rings by the number of cores in the system. Signed-off-by: Inbar Karmy Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 7e1dc5e926d57a5bc4ac97d6e061e2fe29c266c0 Author: Inbar Karmy Date: Tue Oct 10 12:28:33 2017 +0300 net/mlx4_en: Limit the number of TX rings Limit the number of TX rings per UP by the number of cores in the system. Signed-off-by: Inbar Karmy Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 4 ++-- drivers/net/ethernet/mellanox/mlx4/en_main.c | 6 +++--- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 2 +- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) commit 59d43876719ac46902b2a0f98217b430156d0d37 Merge: 652faa9 abf11d0 Author: David S. Miller Date: Tue Oct 10 13:09:14 2017 -0700 Merge branch 'hnx3-rxnfc' Lipeng says: ==================== Support set_ringparam and {set|get}_rxnfc ethtool commands 1, Patch [1/5,2/5] add support for ethtool ops set_ringparam (ethtool -G) and fix related bug. 2, Patch [3/5,4/5, 5/5] add support for ethtool ops set_rxnfc/get_rxnfc (-n/-N) and fix related bug. ==================== Signed-off-by: David S. Miller commit abf11d04fd9dbec778219d76a9d38c36f65fbc24 Author: Lipeng Date: Tue Oct 10 16:42:07 2017 +0800 net: hns3: fix the ring count for ETHTOOL_GRXRINGS This patch fix the ring count for ETHTOOL_GRXRINGS. Ring count not TC size should be return for command "ethtool -n ethx". Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07d2995425eb8eb4874b94bf62fb1490a2014d76 Author: Lipeng Date: Tue Oct 10 16:42:06 2017 +0800 net: hns3: add support for ETHTOOL_GRXFH This patch add support for ethtool's ETHTOOL_GRXFH in hns3_get_rxnfc(). Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 2 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 64 ++++++++++++++++++++++ .../ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 2 + 3 files changed, 68 insertions(+) commit f7db940afc0a70f72ffcb6bb9c0ad15e6c5349c1 Author: Lipeng Date: Tue Oct 10 16:42:05 2017 +0800 net: hns3: add support for set_rxnfc This patch supports the ethtool's set_rxnfc(). Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hnae3.h | 2 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 9 ++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 1 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 95 +++++++++++++++++++++- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 8 ++ .../ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 16 ++++ 6 files changed, 129 insertions(+), 2 deletions(-) commit 5668abda0931c61f823b21b1612e1c77b617a734 Author: Lipeng Date: Tue Oct 10 16:42:04 2017 +0800 net: hns3: add support for set_ringparam This patch supports the ethtool's set_ringparam(). Signed-off-by: Lipeng Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 4 +- .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.h | 4 ++ .../ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 75 ++++++++++++++++++++++ 3 files changed, 81 insertions(+), 2 deletions(-) commit ee83f77645332ce86863e5cef8dd3372b8ee4b87 Author: Lipeng Date: Tue Oct 10 16:42:03 2017 +0800 net: hns3: fixes the ring index in hns3_fini_ring This patch fixes the ring index in hns3_fini_ring. Signed-off-by: Lipeng Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 652faa98ec383c25296fb8493f17060a2c7e3438 Author: Ganesh Goudar Date: Tue Oct 10 12:45:02 2017 +0530 cxgb4: add new T5 pci device id's Add 0x50aa and 0x50ab 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 96ac18f14a5a721dc4233f1c6ebd07e103ae5a63 Author: Ganesh Goudar Date: Tue Oct 10 12:44:13 2017 +0530 cxgb4: Add support for new flash parts Add support for new flash parts identification, and also cleanup the flash Part identifying and decoding code. Based on the original work of Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 136 ++++++++++++++++++++++++----- 1 file changed, 116 insertions(+), 20 deletions(-) commit 1228b482c4ee26f3334dd83eb13bcf7e462f9c93 Author: Chao Yu Date: Fri Sep 29 13:59:39 2017 +0800 f2fs: fix to flush multiple device in checkpoint If f2fs manages multiple devices, in checkpoint, we need to issue flush in those devices which contain dirty data/node in their cache before we write checkpoint region, otherwise, filesystem metadata could be corrupted if hitting SPO after checkpoint. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 6 ++++++ fs/f2fs/f2fs.h | 3 +++ fs/f2fs/segment.c | 29 +++++++++++++++++++++++++++++ fs/f2fs/super.c | 3 +++ 4 files changed, 41 insertions(+) commit 39d787bec4f792e69e24b11aa3d61ae1c0e4830b Author: Chao Yu Date: Fri Sep 29 13:59:38 2017 +0800 f2fs: enhance multiple device flush When multiple device feature is enabled, during ->fsync we will issue flush in all devices to make sure node/data of the file being persisted into storage. But some flushes of device could be unneeded as file's data may be not writebacked into those devices. So this patch adds and manage bitmap per inode in global cache to indicate which device is dirty and it needs to issue flush during ->fsync, hence, we could improve performance of fsync in scenario of multiple device. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/checkpoint.c | 36 +++++++++++++++++++++++++++++++----- fs/f2fs/data.c | 1 + fs/f2fs/f2fs.h | 14 +++++++++++--- fs/f2fs/file.c | 3 ++- fs/f2fs/gc.c | 2 ++ fs/f2fs/inline.c | 1 + fs/f2fs/inode.c | 1 + fs/f2fs/node.c | 3 ++- fs/f2fs/segment.c | 46 +++++++++++++++++++++++++++++++++++----------- 9 files changed, 86 insertions(+), 21 deletions(-) commit b77061bfcbfb72bda6f583d93589e3783f9dab59 Author: Chao Yu Date: Fri Sep 29 13:59:37 2017 +0800 f2fs: fix to show ino management cache size correctly It needs to stat size of ino management cache with all type instead of orphan ino type. Fixes: 652be55162dc ("f2fs: show # of orphan inodes") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f06252f7aa5862591ee37fab63c4e95803880b6 Author: Chao Yu Date: Fri Sep 29 13:59:36 2017 +0800 f2fs: drop FI_UPDATE_WRITE tag after f2fs_issue_flush If we failed to issue flush in ->fsync, we need to keep FI_UPDATE_WRITE flag to make sure triggering flush in next ->fsync. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9a4ffdf55811ff3382cdf44459ec17521bd47e5e Author: Chao Yu Date: Fri Sep 29 13:59:35 2017 +0800 f2fs: obsolete ALLOC_NID_LIST list As Fan Li reported, there is no user traversing nid_list[ALLOC_NID_LIST] which is used for tracking preallocated nids. Let's drop it, and only track preallocated nids in free_nid_root radix-tree. Reported-by: Fan Li Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 8 ++--- fs/f2fs/f2fs.h | 15 +++++---- fs/f2fs/node.c | 97 ++++++++++++++++++++++++++---------------------------- fs/f2fs/node.h | 15 ++------- fs/f2fs/shrinker.c | 2 +- 5 files changed, 64 insertions(+), 73 deletions(-) commit 71ad682c1c295f1ba4eec7478384138b6ad4dab2 Author: Weichao Guo Date: Fri Sep 29 22:43:23 2017 +0800 f2fs: convert inline data for direct I/O & FI_NO_PREALLOC In FI_NO_PREALLOC cases, direct I/O path may allocate blocks for an inode but keep its inline data flag. This inconsistency may trigger vfs clear_inode nrpages bug_on when evicting the inode. We should convert inline data first in this case. Signed-off-by: Weichao Guo Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 71cb4afff80cee2b0f0dfda32f55e4e8d4f1153d Author: Hsiang Kao Date: Sun Sep 24 02:45:42 2017 +0800 f2fs: allow readpages with NULL file pointer Keep in line with the other Linux file system implementations since page_cache_sync_readahead supports NULL file pointer, and thus we can readahead data by f2fs itself without file opening (something like the btrfs behavior). Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14d8d5f7de5a4503156f21691a01aee815734498 Author: Chao Yu Date: Thu Sep 14 10:18:01 2017 +0800 f2fs: show flush list status in sysfs This patch adds to show flush list status in sysfs. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/debug.c | 5 ++++- fs/f2fs/f2fs.h | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 63840695f68c20735df8861062343cf1faa3768d Author: Chao Yu Date: Mon Sep 4 18:58:03 2017 +0800 f2fs: introduce read_xattr_block Commit ba38c27eb93e ("f2fs: enhance lookup xattr") introduces lookup_all_xattrs duplicating from read_all_xattrs, which leaves lots of similar codes in between them, so introduce new help read_xattr_block to clean up redundant codes. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/xattr.c | 50 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) commit a5f433f7410530ae6bb907ebc049547d9dce665b Author: Chao Yu Date: Mon Sep 4 18:58:02 2017 +0800 f2fs: introduce read_inline_xattr Commit ba38c27eb93e ("f2fs: enhance lookup xattr") introduces lookup_all_xattrs duplicating from read_all_xattrs, which leaves lots of similar codes in between them, so introduce new help read_inline_xattr to clean up redundant codes. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/xattr.c | 59 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 30 deletions(-) commit c1fe3e9814401f864817828aa57d5e862cb7460d Author: Chao Yu Date: Mon Sep 25 14:17:51 2017 +0800 Revert "f2fs: reuse nids more aggressively" Commit 268344664603 ("f2fs: reuse nids more aggressively") tries to reuse nids as many as possilbe, in order to mitigate producing obsolete node pages in page cache. But acutally, before we reuse the nids and related node page cache, we will always invalidate that node page, so there will be not any obsolete node pages in cache. Let's just revert previous commit, so that nm_i::next_scan_nid can be increased ascendingly, making __build_free_nids traverses all NAT pages more easily, finally, free nid bitmap cache can be enabled as soon as possible. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim fs/f2fs/node.c | 4 ---- 1 file changed, 4 deletions(-) commit 91f4382b50ee9954f5dad459803200ca2a8bd6fb Author: Yunlong Song Date: Sat Sep 23 17:02:18 2017 +0800 Revert "f2fs: node segment is prior to data segment selected victim" This reverts commit b9cd20619e359d199b755543474c3d853c8e3415. That patch causes much fewer node segments (which can be used for SSR) than before, and in the corner case (e.g. create and delete *.txt files in one same directory, there will be very few node segments but many data segments), if the reserved free segments are all used up during gc, then the write_checkpoint can still flush dentry pages to data ssr segments, but will probably fail to flush node pages to node ssr segments, since there are not enough node ssr segments left (the left ones are all full). So revert this patch to give a fair chance to let node segments remain for SSR, which provides more robustness for corner cases. Conflicts: fs/f2fs/gc.c Signed-off-by: Jaegeuk Kim fs/f2fs/gc.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 85acb3ba2f925a0ec6928c1967c3adefa00682f4 Author: Shaohua Li Date: Fri Oct 6 17:56:00 2017 -0700 block: set request_list for request Legacy queue sets request's request_list, mq doesn't. This makes mq does the same thing, so we can find cgroup of a request. Note, we really only use blkg field of request_list, it's pointless to allocate mempool for request_list in mq case. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-core.c | 2 +- block/blk-mq.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit eca8b53a6769e60d6d8240d71202d73b0af81901 Author: Shaohua Li Date: Fri Oct 6 17:55:59 2017 -0700 blk-stat: delete useless code Fix two issues: - the per-cpu stat flush is unnecessary, nobody uses per-cpu stat except sum it to global stat. We can do the calculation there. The flush just wastes cpu time. - some fields are signed int/s64. I don't see the point. Reviewed-by: Omar Sandoval Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/blk-stat.c | 45 +++++++-------------------------------------- include/linux/blk_types.h | 5 ++--- 2 files changed, 9 insertions(+), 41 deletions(-) commit 3888ffd0c76110e8f45523e3ede842699a2c6614 Author: Lorenzo Bianconi Date: Sun Sep 17 18:17:12 2017 +0200 dt-bindings: iio: accel: add LIS3DHH device bindings Signed-off-by: Lorenzo Bianconi Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/st-sensors.txt | 1 + 1 file changed, 1 insertion(+) commit fea4d486617b2a305cce65f7b6e4636d393e22be Author: Lorenzo Bianconi Date: Sun Sep 17 18:17:11 2017 +0200 iio: accel: add support to LIS3DHH add support to STMicroelectronics LIS3DHH accel sensor http://www.st.com/resource/en/datasheet/lis3dhh.pdf Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/accel/st_accel.h | 2 ++ drivers/iio/accel/st_accel_core.c | 52 +++++++++++++++++++++++++++++++++++++++ drivers/iio/accel/st_accel_spi.c | 5 ++++ 3 files changed, 59 insertions(+) commit 7d245172675a66bf3dc7f8fa51e81f80559a40a3 Author: Lorenzo Bianconi Date: Sun Sep 17 18:17:10 2017 +0200 iio: common: st_sensors: check odr address value in st_sensors_set_odr() Do not try to configure sample frequency if the sensor do not export odr register address in register map. That change will be used to properly support LIS3DHH accel sensor. Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/common/st_sensors/st_sensors_core.c | 3 +++ 1 file changed, 3 insertions(+) commit a542f9a04d30570d367770e34f2c5d0c1d313337 Author: Lorenzo Bianconi Date: Sun Sep 17 18:17:09 2017 +0200 iio: st_sensors: split open-drain parameters for irq1 and irq2 Define st_sensor_int_drdy structure in st_sensor_data_ready_irq in order to contain irq line parameters of the device. Moreover separate data-ready open-drain configuration parameters for INT1 and INT2 pins in st_sensor_data_ready_irq data structure. That change will be used to properly support LIS3DHH accel sensor. Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/accel/st_accel_core.c | 18 ++++++++++------ drivers/iio/common/st_sensors/st_sensors_core.c | 21 ++++++++++++++----- drivers/iio/pressure/st_pressure_core.c | 14 +++++++------ include/linux/iio/common/st_sensors.h | 28 ++++++++++++++----------- 4 files changed, 52 insertions(+), 29 deletions(-) commit 6f667004612a11460551f464bf979005f520a6ee Author: Lorenzo Bianconi Date: Sun Sep 17 17:20:47 2017 +0200 iio: pressure: st_pressure: add SPI-3wire support to st_pressure framework Add SPI Serial Interface Mode (SIM) register information to STM pressure framework Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/pressure/st_pressure_core.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 9915c19056cb2923d36c2f048467aa26491eed82 Author: Lorenzo Bianconi Date: Sun Sep 17 17:20:46 2017 +0200 iio: magnetometer: st_magn: add SPI-3wire support to LIS3MDL Add SPI Serial Interface Mode (SIM) register information to LIS3MDL magn sensor Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/magnetometer/st_magn_core.c | 4 ++++ 1 file changed, 4 insertions(+) commit 281dbadb5fa7ff8f2ee3993d492d959a8e4442ad Author: Lorenzo Bianconi Date: Sun Sep 17 17:20:45 2017 +0200 iio: gyro: st_gyro: add SPI-3wire support to st_gyro framework Add SPI Serial Interface Mode (SIM) register information to STM gyroscope framework Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/gyro/st_gyro_core.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 9f77fad3c2e3b923984fc617ea45b60264115fc3 Author: Tim Hansen Date: Mon Oct 9 11:37:59 2017 -0400 net/core: Fix BUG to BUG_ON conditionals. Fix BUG() calls to use BUG_ON(conditional) macros. This was found using make coccicheck M=net/core on linux next tag next-2017092 Signed-off-by: Tim Hansen Signed-off-by: David S. Miller net/core/skbuff.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 67174bb2336061d373bc83ea1c56a4337a40e20f Merge: 442d713 a2a7d57 Author: David S. Miller Date: Tue Oct 10 12:30:17 2017 -0700 Merge branch 'bpf-get-rid-of-global-verifier-state-and-reuse-instruction-printer' Jakub Kicinski says: ==================== bpf: get rid of global verifier state and reuse instruction printer This set started off as simple extraction of eBPF verifier's instruction printer into a separate file but evolved into removal of global state. The purpose of moving instruction printing code is to be able to reuse it from the bpftool. As far as the global verifier lock goes, this set removes the global variables relating to the log buffer, makes the one-time init done by bpf_get_skb_set_tunnel_proto() not depend on any external locking, and performs verifier log writeback as data is produced removing the need for allocating a potentially large temporary buffer. The final step of actually removing the verifier lock is left to someone more competent and self-confident :) Note that struct bpf_verifier_env is just 40B under two pages now, we should probably switch to vzalloc() when it's expanded again... v2: - add a selftest; - use env buffer and flush on every print (Alexei); - handle kernel log allocation failures (Daniel); - put the env log members into a struct (Daniel). ==================== Signed-off-by: David S. Miller commit a2a7d5701052542cd2260e7659b12443e0a74733 Author: Jakub Kicinski Date: Mon Oct 9 10:30:15 2017 -0700 bpf: write back the verifier log buffer as it gets filled Verifier log buffer can be quite large (up to 16MB currently). As Eric Dumazet points out if we allow multiple verification requests to proceed simultaneously, malicious user may use the verifier as a way of allocating large amounts of unswappable memory to OOM the host. Switch to a strategy of allocating a smaller buffer (1024B) and writing it out into the user buffer after every print. While at it remove the old BUG_ON(). This is in preparation of the global verifier lock removal. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf_verifier.h | 4 +++- kernel/bpf/verifier.c | 41 +++++++++++++++++++---------------------- 2 files changed, 22 insertions(+), 23 deletions(-) commit d66f2b91f95b56e31772b9faa0d036cd2e53cb02 Author: Jakub Kicinski Date: Mon Oct 9 10:30:14 2017 -0700 bpf: don't rely on the verifier lock for metadata_dst allocation bpf_skb_set_tunnel_*() functions require allocation of per-cpu metadata_dst. The allocation happens upon verification of the first program using those helpers. In preparation for removing the verifier lock, use cmpxchg() to make sure we only allocate the metadata_dsts once. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/net/dst_metadata.h | 1 + net/core/dst.c | 16 ++++++++++++++++ net/core/filter.c | 16 +++++++++------- 3 files changed, 26 insertions(+), 7 deletions(-) commit c9c35995bcf812ee8136f634c25bc6ccc3021d4c Author: Jakub Kicinski Date: Mon Oct 9 10:30:13 2017 -0700 tools: bpftool: use the kernel's instruction printer Compile the instruction printer from kernel/bpf and use it for disassembling "translated" eBPF code. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/Documentation/bpftool-prog.rst | 11 +++--- tools/bpf/bpftool/Makefile | 7 ++-- tools/bpf/bpftool/main.h | 10 ++---- tools/bpf/bpftool/prog.c | 44 +++++++++++++++++++----- 4 files changed, 51 insertions(+), 21 deletions(-) commit f4ac7e0b5cc8d16004ac57ff679266d573f30f77 Author: Jakub Kicinski Date: Mon Oct 9 10:30:12 2017 -0700 bpf: move instruction printing into a separate file Separate the instruction printing into a standalone source file. This way sneaky code from tools/ can compile it in directly. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/Makefile | 1 + kernel/bpf/disasm.c | 214 ++++++++++++++++++++++++++++++++++++++++++++++++++ kernel/bpf/disasm.h | 32 ++++++++ kernel/bpf/verifier.c | 202 +---------------------------------------------- 4 files changed, 251 insertions(+), 198 deletions(-) commit 61bd5218eef349fcacc4976a251bc83a4748b4af Author: Jakub Kicinski Date: Mon Oct 9 10:30:11 2017 -0700 bpf: move global verifier log into verifier environment The biggest piece of global state protected by the verifier lock is the verifier_log. Move that log to struct bpf_verifier_env. struct bpf_verifier_env has to be passed now to all invocations of verbose(). Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf_verifier.h | 2 + kernel/bpf/verifier.c | 491 +++++++++++++++++++++++-------------------- 2 files changed, 261 insertions(+), 232 deletions(-) commit e7bf8249e8f1bac64885eeccb55bcf6111901a81 Author: Jakub Kicinski Date: Mon Oct 9 10:30:10 2017 -0700 bpf: encapsulate verifier log state into a structure Put the loose log_* variables into a structure. This will make it simpler to remove the global verifier state in following patches. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf_verifier.h | 13 ++++++++++ kernel/bpf/verifier.c | 57 +++++++++++++++++++++++--------------------- 2 files changed, 43 insertions(+), 27 deletions(-) commit a99ca6dbf429fe6c035cfb880d91bf6a223fcd3c Author: Jakub Kicinski Date: Mon Oct 9 10:30:09 2017 -0700 selftests/bpf: add a test for verifier logs Add a test for verifier log handling. Check bad attr combinations but focus on cases when log is truncated. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/testing/selftests/bpf/Makefile | 2 +- tools/testing/selftests/bpf/test_verifier_log.c | 171 ++++++++++++++++++++++++ 2 files changed, 172 insertions(+), 1 deletion(-) commit 442d713baa33db0f78adadee6125c215f10f5a75 Author: Colin Ian King Date: Tue Oct 10 19:10:30 2017 +0100 ipv6: fix incorrect bitwise operator used on rt6i_flags The use of the | operator always leads to true which looks rather suspect to me. Fix this by using & instead to just check the RTF_CACHE entry bit. Detected by CoverityScan, CID#1457734, #1457747 ("Wrong operator used") Fixes: 35732d01fe31 ("ipv6: introduce a hash table to store dst cache") Signed-off-by: Colin Ian King Acked-by: Wei Wang Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv6/route.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 53cfdc10a95d03fbc82970d682a32696d19ef886 Author: Jiufei Xue Date: Tue Oct 10 11:13:32 2017 +0800 blk-throttle: fix null pointer dereference while throttling writeback IOs A null pointer dereference can occur when blkcg is removed manually with writeback IOs inflight. This is caused by the following case: Writeback kworker submit the bio and set bio->bi_cg_private to tg in blk_throtl_assoc_bio. Then we remove the block cgroup manually, the blkg and tg would be freed if there is no request inflight. When the submitted bio come back, blk_throtl_bio_endio() fetch the tg which was already freed. Fix this by increasing the refcount of blkg in funcion blk_throtl_assoc_bio() so that the blkg will not be freed until the bio_endio called. Reviewed-by: Shaohua Li Signed-off-by: Jiufei Xue Signed-off-by: Jens Axboe block/blk-throttle.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit b2427e671766c51379bc882fdf809d905c6f9619 Author: Colin Ian King Date: Tue Oct 10 18:01:16 2017 +0100 ipv6: fix dereference of rt6_ex before null check error Currently rt6_ex is being dereferenced before it is null checked hence there is a possible null dereference bug. Fix this by only dereferencing rt6_ex after it has been null checked. Detected by CoverityScan, CID#1457749 ("Dereference before null check") Fixes: 81eb8447daae ("ipv6: take care of rt6_stats") Signed-off-by: Colin Ian King Reviewed-by: Eric Dumazet Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv6/route.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f5a3d7837aa5fe619042694a3b0911243b8acc7f Author: James Liao Date: Fri Oct 6 16:09:53 2017 +0800 arm64: dts: mediatek: Add cpuidle support for MT2712 Add CPU idle state nodes to enable C1/C2 idle states. Signed-off-by: James Liao Signed-off-by: Matthias Brugger arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 824af37ef2d054d1f89bd2b9125755a4acc37332 Author: Mika Westerberg Date: Thu Sep 21 16:19:46 2017 +0300 mtd: spi-nor: intel-spi: Add support for Intel Cedar Fork SPI serial flash Intel Cedar Fork has the same SPI serial flash controller than Intel Denverton. Add the Intel Cedar Fork PCI ID to the driver list of supported devices. Signed-off-by: Mika Westerberg Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/intel-spi-pci.c | 1 + 1 file changed, 1 insertion(+) commit d92b0f18a2039ff736b4296ad3cf3d505512051e Author: Mika Westerberg Date: Thu Sep 21 16:19:45 2017 +0300 mtd: spi-nor: intel-spi: Add support for Intel Lewisburg SPI serial flash Intel Lewisburg chipset exposes the SPI serial flash controller as a PCI device in the same way than Intel Denverton. Add Intel Lewisburg SPI serial flash PCI ID to the driver list of supported devices. Signed-off-by: Mika Westerberg Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/intel-spi-pci.c | 1 + 1 file changed, 1 insertion(+) commit 5a0682835ca270c6a4f8a1bdaa59e710f6968f62 Author: Klaus Goger Date: Wed Sep 13 10:25:35 2017 +0200 mtd: spi-nor: add support for Gigadevice GD25LQ32 Tested against GD25LQ32D but the GD25LQ32C datasheet seems to be identically feature-wise. Therefore dropping the suffix as it's probably only indicating the die revision. Signed-off-by: Klaus Goger Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 5 +++++ 1 file changed, 5 insertions(+) commit 1efed4072c5992ede080987e6d83dfead6af126a Author: Murali Karicheri Date: Mon Oct 9 09:42:01 2017 -0700 ARM: dts: keystone-k2g-evm: add bindings for SPI NOR flash K2G EVM has n25q128a13 SPI NOR flash on SPI1. Enable SPI1 in the DT node as well as add a subnode for the SPI NOR. Signed-off-by: Murali Karicheri Signed-off-by: Franklin S Cooper Jr Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g-evm.dts | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 06ea8c537ab8d14454d41599a64d46364fe1a75a Author: Chris Wilson Date: Tue Oct 10 12:10:05 2017 +0100 drm/i915: Silently fallback to 4k scratch If we fail to allocate a 64k hugepage for scratch, we try again with a normal 4k page (with some loss of efficiency at runtime). As we handle this gracefully, we do not need a noisy allocation failure warning. Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171010111005.13625-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 729ce96967f6f4983e103feddd6b87b33738aa0b Author: Vitaly Andrianov Date: Mon Oct 9 09:41:55 2017 -0700 ARM: dts: keystone-k2g: Add SPI nodes Add nodes for the various SPI instances. Signed-off-by: Vitaly Andrianov Signed-off-by: Franklin S Cooper Jr Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g.dtsi | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit e1471fe61acf486276d36ac7b4323c034a31a068 Author: Vignesh R Date: Mon Oct 9 09:33:50 2017 -0700 ARM: dts: keystone-k2g-evm: Enable PWM ECAP0 Enable PWM ECAP0 which will be used for display backlight. Signed-off-by: Vignesh R Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g-evm.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit a9ccafd0a33aaaff0c311593a926dff56248fd5a Author: Vignesh R Date: Mon Oct 9 09:33:50 2017 -0700 ARM: dts: keystone-k2g: Add ECAP PWM DT nodes Add DT nodes for PWM ECAP IP present on 66AK2G SoC. Signed-off-by: Vignesh R Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit cfc8e42c41833bd1dbb743d75598e13810940e4e Author: Roger Quadros Date: Mon Oct 9 09:23:31 2017 -0700 ARM: dts: k2g-evm: Enable USB 0 and 1 Enable USB 0 which will be used as a host port and USB 1 which will be used in peripheral mode. Signed-off-by: Roger Quadros Signed-off-by: Murali Karicheri Signed-off-by: Franklin S Cooper Jr Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g-evm.dts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 252402aa37ce03d55639fa4f1f1b8eeef6d60eaf Author: Vitaly Andrianov Date: Mon Oct 9 09:22:10 2017 -0700 ARM: dts: k2g: Add USB instances Add nodes for both USB instances supported by 66AK2G. Signed-off-by: Franklin S Cooper Jr Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g.dtsi | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit 07bdfc24cb21334249bd66ca6e59b7393def8ac7 Author: Murali Karicheri Date: Mon Oct 9 09:15:26 2017 -0700 ARM: dts: keystone-k2g-evm: Add I2C EEPROM DT entry K2G EVM has an onboard I2C EEPROM connected to I2C0. This patch adds the necessary DT entry for the AT24CM01 EEPROM. Signed-off-by: Murali Karicheri Signed-off-by: Franklin S Cooper Jr Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g-evm.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit d0dfe5defdc1eda5cacbf39e63013684a4271e17 Author: Vitaly Andrianov Date: Mon Oct 9 09:15:25 2017 -0700 ARM: dts: keystone-k2g: Add I2C nodes Add nodes for the various I2C instances. Signed-off-by: Vitaly Andrianov Signed-off-by: Franklin S Cooper Jr Reviewed-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g.dtsi | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 55fe38f0c08f2b79b16bde9cc68eb8f3fe541150 Author: Peter Ujfalusi Date: Mon Oct 9 09:11:20 2017 -0700 ARM: dts: keystone-k2g: Add McASP nodes Add three McASP nodes present on 66AK2G device. Signed-off-by: Peter Ujfalusi Signed-off-by: Santosh Shilimkar arch/arm/boot/dts/keystone-k2g.dtsi | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 65153846b18c486ce3c90477c467d53915114e3f Author: Andy Yan Date: Mon Aug 28 10:00:46 2017 +0800 mtd: spi-nor: add support for GD25Q256 Add support for GD25Q256, a 32MiB SPI Nor flash from GigaDevice. Signed-off-by: Andy Yan Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit e27072851bf7d706c592fc528549b52023b17a09 Author: Andy Yan Date: Mon Aug 28 09:58:29 2017 +0800 mtd: spi-nor: add a quad_enable callback in struct flash_info Some manufacturers may use different bit to set QE on different memories. The GD25Q256 from GigaDevice is an example, which uses S6(bit 6 of the Status Register-1) to set QE, which is different with other supported memories from GigaDevice that use S9(bit 1 of the Status Register-2). This makes it is impossible to select the quad enable method by distinguishing the MFR. This patch introduce a quad_enable function which can be set per memory in the flash_info list table. Signed-off-by: Andy Yan Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 70597eec673bad7c43b56ea23b666a951522aad1 Author: Thor Thayer Date: Fri Sep 29 11:07:49 2017 -0500 mtd: spi-nor: Allow Cadence QSPI support for ARM64 Allow ARM64 support for the Cadence QSPI interface by adding ARM64 as a dependency. Signed-off-by: Thor Thayer Reviewed-by: Marek Vasut Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6084fc83c8249779a6b7a1d48830f1f3fc120fe Author: Kamal Dasu Date: Tue Aug 22 16:45:22 2017 -0400 mtd: spi-nor: Add spi-nor mtd resume handler Implemented and populated spi-nor mtd PM handlers for resume ops. spi-nor resume op re-initializes spi-nor flash to its probed state by calling the newly implemented spi_nor_init() function. Signed-off-by: Kamal Dasu Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 46dde01f6bab35d99af111fcc02ca3ee1146050f Author: Kamal Dasu Date: Tue Aug 22 16:45:21 2017 -0400 mtd: spi-nor: add spi_nor_init() function This patch extracts some chunks from spi_nor_init_params and spi_nor_scan() and moves them into a new spi_nor_init() function. Indeed, spi_nor_init() regroups all the required SPI flash commands to be sent to the SPI flash memory before performing any runtime operations (Fast Read, Page Program, Sector Erase, ...). Hence spi_nor_init(): 1) removes the flash protection if applicable for certain vendors. 2) sets the Quad Enable bit, if needed, before using Quad SPI protocols. 3) makes the memory enter its (stateful) 4-byte address mode, if needed, for SPI flash memory > 128Mbits not supporting the 4-byte address instruction set. spi_nor_scan() now ends by calling spi_nor_init() once the probe phase has completed. Further patches could also use spi_nor_init() to implement the mtd->_resume() handler for the spi-nor framework. Signed-off-by: Kamal Dasu Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 56 +++++++++++++++++++++++++++++-------------- include/linux/mtd/spi-nor.h | 10 ++++++++ 2 files changed, 48 insertions(+), 18 deletions(-) commit 18eb86362a52f0af933cc0fd5e37027317eb2d1c Author: Christophe JAILLET Date: Sun Aug 27 08:39:51 2017 +0200 igb: check memory allocation failure Check memory allocation failures and return -ENOMEM in such cases, as already done for other memory allocations in this function. This avoids NULL pointers dereference. Signed-off-by: Christophe JAILLET Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/igb/igb_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 377b62736c01f14309141c69caa6d84363c12e12 Author: Florian Fainelli Date: Fri Aug 25 18:14:24 2017 -0700 e1000e: Be drop monitor friendly e1000e_put_txbuf() can be called from normal reclamation path as well as when a DMA mapping failure, so we need to differentiate these two cases when freeing SKBs to be drop monitor friendly. e1000e_tx_hwtstamp_work() and e1000_remove() are processing TX timestamped SKBs and those should not be accounted as drops either. Signed-off-by: Florian Fainelli Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/netdev.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 48072ae1ec7a1c778771cad8c1b8dd803c4992ab Author: Willem de Bruijn Date: Fri Aug 25 11:06:26 2017 -0400 e1000e: apply burst mode settings only on default Devices that support FLAG2_DMA_BURST have different default values for RDTR and RADV. Apply burst mode default settings only when no explicit value was passed at module load. The RDTR default is zero. If the module is loaded for low latency operation with RxIntDelay=0, do not override this value with a burst default of 32. Move the decision to apply burst values earlier, where explicitly initialized module variables can be distinguished from defaults. Signed-off-by: Willem de Bruijn Acked-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/e1000.h | 4 ---- drivers/net/ethernet/intel/e1000e/netdev.c | 8 -------- drivers/net/ethernet/intel/e1000e/param.c | 16 +++++++++++++++- 3 files changed, 15 insertions(+), 13 deletions(-) commit b10effb92e272051dd1ec0d7be56bf9ca85ab927 Author: Sasha Neftin Date: Sun Aug 6 16:49:18 2017 +0300 e1000e: fix buffer overrun while the I219 is processing DMA transactions Intel® 100/200 Series Chipset platforms reduced the round-trip latency for the LAN Controller DMA accesses, causing in some high performance cases a buffer overrun while the I219 LAN Connected Device is processing the DMA transactions. I219LM and I219V devices can fall into unrecovered Tx hang under very stressfully UDP traffic and multiple reconnection of Ethernet cable. This Tx hang of the LAN Controller is only recovered if the system is rebooted. Slightly slow down DMA access by reducing the number of outstanding requests. This workaround could have an impact on TCP traffic performance on the platform. Disabling TSO eliminates performance loss for TCP traffic without a noticeable impact on CPU performance. Please, refer to I218/I219 specification update: https://www.intel.com/content/www/us/en/embedded/products/networking/ ethernet-connection-i218-family-documentation.html Signed-off-by: Sasha Neftin Reviewed-by: Dima Ruinskiy Reviewed-by: Raanan Avargil Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/netdev.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 4aea7a5c5e940c1723add439f4088844cd26196d Author: Benjamin Poirier Date: Fri Jul 21 11:36:27 2017 -0700 e1000e: Avoid receiver overrun interrupt bursts When e1000e_poll() is not fast enough to keep up with incoming traffic, the adapter (when operating in msix mode) raises the Other interrupt to signal Receiver Overrun. This is a double problem because 1) at the moment e1000_msix_other() assumes that it is only called in case of Link Status Change and 2) if the condition persists, the interrupt is repeatedly raised again in quick succession. Ideally we would configure the Other interrupt to not be raised in case of receiver overrun but this doesn't seem possible on this adapter. Instead, we handle the first part of the problem by reverting to the practice of reading ICR in the other interrupt handler, like before commit 16ecba59bc33 ("e1000e: Do not read ICR in Other interrupt"). Thanks to commit 0a8047ac68e5 ("e1000e: Fix msi-x interrupt automask") which cleared IAME from CTRL_EXT, reading ICR doesn't interfere with RxQ0, TxQ0 interrupts anymore. We handle the second part of the problem by not re-enabling the Other interrupt right away when there is overrun. Instead, we wait until traffic subsides, napi polling mode is exited and interrupts are re-enabled. Reported-by: Lennart Sorensen Fixes: 16ecba59bc33 ("e1000e: Do not read ICR in Other interrupt") Signed-off-by: Benjamin Poirier Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/defines.h | 1 + drivers/net/ethernet/intel/e1000e/netdev.c | 33 ++++++++++++++++++++++------- 2 files changed, 26 insertions(+), 8 deletions(-) commit 19110cfbb34d4af0cdfe14cd243f3b09dc95b013 Author: Benjamin Poirier Date: Fri Jul 21 11:36:26 2017 -0700 e1000e: Separate signaling for link check/link up Lennart reported the following race condition: \ e1000_watchdog_task \ e1000e_has_link \ hw->mac.ops.check_for_link() === e1000e_check_for_copper_link /* link is up */ mac->get_link_status = false; /* interrupt */ \ e1000_msix_other hw->mac.get_link_status = true; link_active = !hw->mac.get_link_status /* link_active is false, wrongly */ This problem arises because the single flag get_link_status is used to signal two different states: link status needs checking and link status is down. Avoid the problem by using the return value of .check_for_link to signal the link status to e1000e_has_link(). Reported-by: Lennart Sorensen Signed-off-by: Benjamin Poirier Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/mac.c | 11 ++++++++--- drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) commit d3509f8bc7b0560044c15f0e3ecfde1d9af757a6 Author: Benjamin Poirier Date: Fri Jul 21 11:36:25 2017 -0700 e1000e: Fix return value test All the helpers return -E1000_ERR_PHY. Signed-off-by: Benjamin Poirier Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45c1cd8754064076f6090128958cbde9db45d41b Author: Mika Kahola Date: Tue Oct 10 13:17:06 2017 +0300 drm/i915: Cleanup South Error Interrupts Cleanup and parametrize the handling of South Error Interrupts (SERR_INT). Reviewed-by: Ville Syrjälä Signed-off-by: Mika Kahola Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1507630626-23806-6-git-send-email-mika.kahola@intel.com drivers/gpu/drm/i915/i915_irq.c | 12 ++++-------- drivers/gpu/drm/i915/i915_reg.h | 3 --- 2 files changed, 4 insertions(+), 11 deletions(-) commit 78619e32e57f9f9acd8653b569e48f2d52fa3304 Author: Mika Kahola Date: Tue Oct 10 13:17:05 2017 +0300 drm/i915: Favor for_each_pipe() macro Favor for_each_pipe() macro when looping through pipes. v2: use 'enum pipe pipe' instead of 'i' Reviewed-by: Ville Syrjälä Signed-off-by: Mika Kahola Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1507630626-23806-5-git-send-email-mika.kahola@intel.com drivers/gpu/drm/i915/intel_pipe_crc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0a195c02942236c977703023c024b75f5bb6b254 Author: Mika Kahola Date: Tue Oct 10 13:17:04 2017 +0300 drm/i915: Fold IRQ pipe masks Fold IRQ pipe masks into one loop instead of hardcoding per pipe. Reviewed-by: Ville Syrjälä Signed-off-by: Mika Kahola Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1507630626-23806-4-git-send-email-mika.kahola@intel.com drivers/gpu/drm/i915/i915_irq.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 65a29da1f5fd20fdebef3b959bef9b3660807b20 Author: Benjamin Poirier Date: Fri Jul 21 11:36:24 2017 -0700 e1000e: Fix wrong comment related to link detection Reading e1000e_check_for_copper_link() shows that get_link_status is set to false after link has been detected. Therefore, it stays TRUE until then. Signed-off-by: Benjamin Poirier Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c4c40e51f9c32c6dd8adf606624c930a1c4d9bbb Author: Benjamin Poirier Date: Fri Jul 21 11:36:23 2017 -0700 e1000e: Fix error path in link detection In case of error from e1e_rphy(), the loop will exit early and "success" will be set to true erroneously. Signed-off-by: Benjamin Poirier Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/phy.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2b68504be6b47fabd4d14c89bbea37a6fd0fd28c Author: Mika Kahola Date: Tue Oct 10 13:17:03 2017 +0300 drm/i915: Remove I915_MAX_PIPES dependency for DDB allocation Remove dependency for I915_MAX_PIPES by replacing it with for_each_pipe() macro. v2: use 'enum pipe pipe' instead of 'i' Reviewed-by: Ville Syrjälä Signed-off-by: Ramalingam C Signed-off-by: Mika Kahola Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1507630626-23806-3-git-send-email-mika.kahola@intel.com drivers/gpu/drm/i915/intel_display.c | 5 ++++- drivers/gpu/drm/i915/intel_drv.h | 3 ++- drivers/gpu/drm/i915/intel_pm.c | 12 +++++++----- 3 files changed, 13 insertions(+), 7 deletions(-) commit 0d5f662575e542ed22b5054c2b0887f42271be5e Author: Mika Kahola Date: Tue Oct 10 13:17:02 2017 +0300 drm/i915: Don't relay on I915_MAX_PIPES Let's remove the dependency on I915_MAX_PIPES. Instead, get the number of pipes from platform information. Reviewed-by: Ville Syrjälä Signed-off-by: Ramalingam C Signed-off-by: Mika Kahola Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1507630626-23806-2-git-send-email-mika.kahola@intel.com drivers/gpu/drm/i915/intel_audio.c | 2 +- drivers/gpu/drm/i915/intel_pipe_crc.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit 58a9edce0aa912640abe47d3fc039e6230ef848b Author: weiping zhang Date: Tue Oct 10 22:53:46 2017 +0800 blkcg: check pol->cpd_free_fn before free cpd check pol->cpd_free_fn() instead of pol->cpd_alloc_fn() when free cpd. Reviewed-by: Johannes Thumshirn Signed-off-by: weiping zhang Signed-off-by: Jens Axboe block/blk-cgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 90d4fa4540f16df552b4bac480a032552e594fc3 Author: Richard Weinberger Date: Sun Sep 17 16:13:52 2017 +0200 mtd: spi-nor: Kill check with no effect header.minor is of type u8 and cannot be negative. Detected by CoverityScan CID#1417858 ("Integer handling issues") Fixes: f384b352cbf0 ("mtd: spi-nor: parse Serial Flash Discoverable Parameters (SFDP) tables") Signed-off-by: Richard Weinberger Signed-off-by: Cyrille Pitchen drivers/mtd/spi-nor/spi-nor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 166245dd92dd86f1e830508c0a4a9eeeed9b3ad6 Merge: 318a8ab a369d4a Author: Doug Ledford Date: Tue Oct 10 10:49:50 2017 -0400 Merge tag 'mlx5-updates-2017-10-06' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux into k.o/for-next Merge Mellanox shared pull request Signed-off-by: Doug Ledford commit 318a8ab7e87887946084a7c0398ecc978c6aa71d Author: Colin Ian King Date: Mon Oct 9 17:12:00 2017 +0100 IB/core: remove redundant check on prot_sg_cnt prot_sg_cnt cannot be zero as a previous check on ret (from which prot_sg_cnt is assigned) returns -ENOMEM if is it zero. Since it cannot be zero we can simplify the code by removing the non -zero check on prot_sg_cnt and redundant else statement. Detected by CoverityScan, COD#1357188 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: Doug Ledford drivers/infiniband/core/rw.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 9d18717790c43c904fabe9da7a4c6b2ebed2c4d8 Author: Bart Van Assche Date: Fri Oct 6 13:06:17 2017 -0700 IB/core: Simplify sa_path_set_[sd]lid() calls Instead of making every caller convert the second argument of sa_path_set_slid() and sa_path_set_dlid() to big endian format, make these two functions accept LIDs in CPU endian format. This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Sean Hefty Cc: Dasaratharaman Chandramouli Cc: Don Hiatt Cc: Ira Weiny Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 26 ++++++++++++-------------- drivers/infiniband/core/uverbs_marshall.c | 10 +++++----- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- include/rdma/ib_sa.h | 12 ++++++------ 4 files changed, 24 insertions(+), 26 deletions(-) commit 9cc12ad6db55d7d902260fead28a91710dd5dbe5 Author: Arnd Bergmann Date: Fri Oct 6 09:13:46 2017 +0200 infiniband: add MMU dependency for user_mem The infiniband subsystem causes a link failure when the umem driver is built on MMU-less systems: mm/mmu_notifier.o: In function `do_mmu_notifier_register': mmu_notifier.c:(.text+0x32): undefined reference to `mm_take_all_locks' drivers/infiniband/core/umem.o: In function `ib_umem_get': umem.c:(.text+0x132): undefined reference to `can_do_mlock' drivers/infiniband/core/umem_odp.o: In function `ib_umem_odp_map_dma_pages': umem_odp.c:(.text+0x766): undefined reference to `get_user_pages_remote' This bug has existed for a while but only become apparent in ARM randconfig builds when the dependency on PCI was lifted, as none of the ARM-NOMMU targets support PCI at the moment. We could probably get the umem driver to build by providing an alternative implementation 'can_do_mlock()' that returns false on NOMMU-systems, but then we'd still have a problem with the mmu-notifiers required by CONFIG_INFINIBAND_ON_DEMAND_PAGING, so simply forbidding umem with NOMMU seems like the simplest workaround. Fixes: 931bc0d91639 ("IB: Move PCI dependency from root KConfig to HW's KConfigs") Signed-off-by: Arnd Bergmann Signed-off-by: Doug Ledford drivers/infiniband/Kconfig | 1 + 1 file changed, 1 insertion(+) commit db37d8f39c1ea5a7efb410fda94e3bb9d5844b1d Author: Ville Syrjälä Date: Wed Sep 13 17:08:57 2017 +0300 drm/i915: Nuke the bogus kernel doc for i9xx_disable_pll() Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170913140900.6972-6-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 9 --------- 1 file changed, 9 deletions(-) commit 939994da2f63cb130ddeb131736254ad203662cd Author: Ville Syrjälä Date: Wed Sep 13 17:08:56 2017 +0300 drm/i915: Pass crtc state to i9xx_enable_pll() Pass the crtc state to i9xx_enable_pll() and use it rather than crtc->config. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170913140900.6972-5-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_display.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit dfa311f0d8e2bbd4ba97344ac4a2eb6e810fc0e6 Author: Ville Syrjälä Date: Wed Sep 13 17:08:54 2017 +0300 drm/i915: Parametrize CBR_DPLLBMD_PIPE defines Apply a bit of polish by parametrizing the CBR_DPLLBMD_PIPE defines. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170913140900.6972-3-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_reg.h | 3 +-- drivers/gpu/drm/i915/intel_display.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit f9a3da591d4bf5ad28eb9ffabc823dee9e4254f4 Author: Kefeng Wang Date: Tue Aug 22 21:20:56 2017 +0800 arm64: defconfig: Enable hisilicon hibmc drm driver Enable DRM_HISI_HIBMC as module for Hisilicon D03/D05 board. Signed-off-by: Kefeng Wang Signed-off-by: Wei Xu arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit a1fb73d7da4355afff91552f0efe743c4ecb7ac5 Author: Linus Walleij Date: Mon Oct 2 16:21:29 2017 +0200 arm64: dts: hisilicon: Standardize Poplar GPIO line names The hi6220-HiKey board started to name GPIO lines for 96boards, using just the plain names "GPIO-A" etc from the 96boards specification. Poplar started to use an arbitrary "LS-GPIO-A" (etc) prefix that is not part of the 96boards specification. As the former notation arrived first, and we need consistency among 96board, rectify the Poplar board to use this too. This is important for userspace that wants to look up GPIO names from these strings. Cc: Jiancheng Xue Cc: Alex Elder Cc: Peter Griffin Signed-off-by: Linus Walleij Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3798cv200-poplar.dts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 8264c3214f28b52b399d9e03bfa7feec275a0d71 Author: Rakesh Pandit Date: Mon Oct 9 13:34:41 2017 +0300 writeback: merge try_to_writeback_inodes_sb_nr() into caller Since commit 925a6efb8ff0c ("Btrfs: stop using try_to_writeback_inodes_sb_nr to flush delalloc") this function hasn't been used outside so stop exporting it. In addition we merge it into try_to_writeback_inodes_sb() which is the only caller. Also change return type of try_to_writeback_inodes_sb to void as the only user ext4 doesn't care. Reviewed-by: Jan Kara Signed-off-by: Rakesh Pandit Signed-off-by: Jens Axboe fs/fs-writeback.c | 30 ++++++------------------------ include/linux/writeback.h | 4 +--- 2 files changed, 7 insertions(+), 27 deletions(-) commit ecf837d98e375d18f4fd8df6f744ca9ca9b5957d Author: Ville Syrjälä Date: Tue Oct 10 15:55:56 2017 +0300 drm/i915: Use enum pipe for PCH transcoders One more place where we've failed to switch to enum pipe when talking about PCH transcoders. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171010125556.25086-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 63fc36cdcb0fdd0671968826849cef198f0e2f1c Author: Linus Walleij Date: Tue Oct 3 10:59:04 2017 +0200 arm64: dts: hikey960: Update HiKey960 with GPIO line names This adds line names for all the GPIOs I could identify on the HiKey960 schematic. "GPIO-A" through "GPIO-L" are the most important since they give users a handle to look up the standard 96boards GPIOs from the GPIO character device. The rest of the names are more informational, nice debug information for "lsgpio" so you can see that the right line is taken for the right function in the kernel for example. Cc: Wei Xu Cc: Zhangfei Gao Cc: Guodong Xu Signed-off-by: Linus Walleij Signed-off-by: Wei Xu arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 319 ++++++++++++++++++++++ 1 file changed, 319 insertions(+) commit 53b9ec3fbb7da97d13951debbd42e3a0c4a7c9f7 Author: Joerg Roedel Date: Fri Oct 6 12:22:06 2017 +0200 iommu/amd: Enforce alignment for MSI IRQs Make use of the new alignment capability of alloc_irq_index() to enforce IRQ index alignment for MSI. Reported-by: Thomas Gleixner Fixes: 2b324506341cb ('iommu/amd: Add routines to manage irq remapping tables') Reviewed-by: Thomas Gleixner Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 37946d95fc1a41ed79efb613b0818c2cdecbb2fa Author: Joerg Roedel Date: Fri Oct 6 12:16:39 2017 +0200 iommu/amd: Add align parameter to alloc_irq_index() For multi-MSI IRQ ranges the IRQ index needs to be aligned to the power-of-two of the requested IRQ count. Extend the alloc_irq_index() function to allow such an allocation. Reported-by: Thomas Gleixner Fixes: 2b324506341cb ('iommu/amd: Add routines to manage irq remapping tables') Reviewed-by: Thomas Gleixner Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 69208c9e1e938cd115fdafdc502b5a7aa99d8d0b Author: Daniel Vetter Date: Tue Oct 10 11:18:16 2017 +0200 drm/i915: Increase atomic update vblank evasion time with lockdep All our mmio writes take forever with lockdep due to the constant lock acquire&dropping we do. Ville has some patches to only acquire the mmio spinlocks once instead for every single mmio, but those aren't ready yet. As an interim solution just extend our budget slightly when lockdep is enabled, to avoid the rare and sporadic noise in CI. v2: I forgot to add the FIXME comment ... Cc: Ville Syrjala Acked-by: Ville Syrjälä References: https://bugs.freedesktop.org/show_bug.cgi?id=103169 References: https://bugs.freedesktop.org/show_bug.cgi?id=103124 References: https://bugs.freedesktop.org/show_bug.cgi?id=102403 References: https://bugs.freedesktop.org/show_bug.cgi?id=103020 References: https://bugs.freedesktop.org/show_bug.cgi?id=103019 References: https://bugs.freedesktop.org/show_bug.cgi?id=102723 References: https://bugs.freedesktop.org/show_bug.cgi?id=102544 References: https://bugs.freedesktop.org/show_bug.cgi?id=103180 Signed-off-by: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171010091816.26898-1-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/intel_sprite.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0b79842775fadbeb4a984d6e83ffcea770799fb6 Author: Li Pengcheng Date: Fri Sep 1 08:47:15 2017 +0800 arm64: dts: hi6220: add coresight dt nodes For detailed coresight topology, Hi6220 has 8xCA53 CPUs and each CPU has one Embedded Trace Macrocell (ETM); the CPU trace data is output to the cluster funnel. Due system has another CPU and one MCU, all of them transfer the trace data through trace bus (ATB) to SoC funnel; the SoC funnel is connected to Embedded Trace FIFO (ETF) with 8KB buffer; an non-configurable replicator is used to output trace data for two sinks, one is Embedded Trace Route (ETR) so trace data can be saved into DRAM, another is Trace Port Interface Unit (TPIU) for capturing trace data by external debugger. According to the Hi6220 coresight topology, this patch is to add coresight dt nodes. Cc: Mathieu Poirier Cc: Mike Leach Cc: Guodong Xu Cc: Zhangfei Gao Cc: Haojian Zhuang Signed-off-by: Li Pengcheng Signed-off-by: Li Zhong Signed-off-by: Leo Yan Signed-off-by: Wei Xu .../arm64/boot/dts/hisilicon/hi6220-coresight.dtsi | 381 +++++++++++++++++++++ arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 2 + 2 files changed, 383 insertions(+) commit 854106bc625a73b251ef7de2d5b49847d53041c2 Author: Nicolas Ferre Date: Tue Oct 10 13:09:49 2017 +0300 ARM: dts: at91: at91sam9x5ek: use DMA for USART0 Use DMA for USART0 (which is used as ttyS1) as we have enough channels and to show how to specify DMA use with serial nodes. Signed-off-by: Nicolas Ferre Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9x5ek.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 66156ea9e9941ef38dced44f1cc18cd8763112bb Author: Nicolas Ferre Date: Tue Oct 10 13:09:48 2017 +0300 ARM: dts: at91: at91sam9x25ek: add pwm0 Add the PWM0 interface and one output of channel 0 (on PC10) on this headless board. The output conflicts with LCD and ISI, so only enable it for this particular board of the series (ISI is enabled on at91sam9g25ek, as an example but we can do the other way around). Signed-off-by: Nicolas Ferre Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9x25ek.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit e5f0472f7a10a0a35f8ee07771ba615de4c60aac Author: Nicolas Ferre Date: Tue Oct 10 13:09:47 2017 +0300 ARM: dts: at91: at91sam9x25ek: add CAN1 interface As the CAN1 interface is not multiplexed with other peripherals on this board, enable it so that it can be tested more easily. Signed-off-by: Nicolas Ferre Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91sam9x25ek.dts | 4 ++++ 1 file changed, 4 insertions(+) commit a317e514aec085618905d2ac246ef9ca3263b964 Author: Nicolas Ferre Date: Tue Oct 10 13:09:46 2017 +0300 ARM: dts: at91: sama5d2_xplained: remove pull-up on SD/MMC lines As the board have the proper pull-ups soldered on the data and CMD lines we don't need them specified in the PADs. So remove the "bias-pull-up" property and set "bias-disable". This will also save some power. Signed-off-by: Nicolas Ferre [claudiu.beznea@microchip.com: change subject to match the desired prefix] Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d2_xplained.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0036d85b5bdd67f1f2be8b59bca5044166555b4f Author: Claudiu Beznea Date: Tue Oct 10 13:09:45 2017 +0300 ARM: dts: at91: sama5d2_xplained: add pinmuxing for pwm0 Add pin muxing for pwm0 and set it as disabled since it is in conflict with pins for leds. Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d2_xplained.dts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit be6d90b132b7c89f4978ff6335dc5c930db58594 Author: Ludovic Desroches Date: Tue Oct 10 13:09:44 2017 +0300 ARM: dts: at91: sama5d2_xplained: set PB_USER as wakeup source Set the PB_USER button as a wakeup source to resume from ulp0 mode. Signed-off-by: Ludovic Desroches [claudiu.beznea@microchip.com: change subject to match the desired prefix] Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d2_xplained.dts | 1 + 1 file changed, 1 insertion(+) commit 06530725e1883b3d22d5f7abaa8a07fcd6c168ac Author: Nicolas Ferre Date: Tue Oct 10 13:09:43 2017 +0300 ARM: dts: at91: sama5d27_som1_ek: remove pull-up on SD/MMC lines As the board have the proper pull-ups soldered on the data and CMD lines we don't need them specified in the PADs. So remove the "bias-pull-up" property and set "bias-disable". Signed-off-by: Nicolas Ferre [claudiu.beznea@microchip.com: change subject to match the desired prefix] Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ffbc890ee54fe062ae2f24d69e522e4ad83cb0f9 Author: Nicolas Ferre Date: Tue Oct 10 13:09:42 2017 +0300 ARM: dts: at91: sama5d27_som1_ek: remove not connected CAN0 CAN0 is not connected on the sama5d27_som1_ek board, so remove it from DT. Signed-off-by: Nicolas Ferre [claudiu.beznea@microchip.com: change subject to match the desired prefix] Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 12 ------------ 1 file changed, 12 deletions(-) commit 17b035dcc8c018b158457e5fd5a32682bce57324 Author: Claudiu Beznea Date: Tue Oct 10 13:09:41 2017 +0300 ARM: dts: at91: sama5d27_som1_ek: add pinmuxing for pwm0 Add pin muxing for pwm0 and set it as disabled since it is in conflict with the pins for leds. Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 55f4286b484a96e061d06a97a4146190a43e6b12 Author: Ludovic Desroches Date: Tue Oct 10 13:09:40 2017 +0300 ARM: dts: at91: sama5d27_som1_ek: add aliases for i2c Add aliases for i2c devices to not rely on probe order for i2c device numbering. Signed-off-by: Ludovic Desroches [claudiu.beznea@microchip.com: remove i2c0, change subject] Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 2 ++ 1 file changed, 2 insertions(+) commit 6011143681b75f49821c6f3f0f4e86a72b275b11 Author: Ludovic Desroches Date: Tue Oct 10 13:09:39 2017 +0300 ARM: dts: at91: sama5d27_som1_ek: set USER button as a wakeup source Set the USER button as a wakeup source to allow wakeup from ULP0. Signed-off-by: Ludovic Desroches [claudiu.beznea@microchip.com: change subject to match the desired prefix] Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 1 + 1 file changed, 1 insertion(+) commit 550b209f6d267e4b5f283e998345a6bfdb3b3dad Author: Ludovic Desroches Date: Tue Oct 10 13:09:38 2017 +0300 ARM: dts: at91: sama5d27_som1_ek: update serial aliases Overwrite sama5d2.dtsi aliases node to match the at91-sama5d27_som1_ek board configuration. ttyS0 stands for DBGU, ttyS1 for the mikro BUS 1 serial lines and ttyS2 for the mikro BUS 2 serial lines. Signed-off-by: Ludovic Desroches [claudiu.beznea@microchip.com: change subject to match the desired prefix] Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 64f769150945dcc37f576f9b32a9febf07844602 Author: Claudiu Beznea Date: Tue Oct 10 13:09:37 2017 +0300 ARM: dts: at91: sama5d27_som1_ek: enable i2c2 Enable i2c. Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8bf456076c1a30a4a9121dbcb388edd0ae42b9c9 Author: Claudiu Beznea Date: Tue Oct 10 13:09:36 2017 +0300 ARM: dts: at91: sama5d27_som1_ek: add disabled status Add disabled statuses for all devices and for those those which pins are in conflict with other devices add a comment in the DT file to specify this. Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit dc2279e169f0676b969014c02689c4bbb069ad01 Author: Mika Kuoppala Date: Tue Oct 10 14:48:57 2017 +0300 drm/i915: Use execlists_num_ports instead of size of array There is function to tell how many ports we have, so use it. We still have direct relationship with array size and port count, so no harm was done. Fixes: 76e70087d360 ("drm/i915: Make execlist port count variable") Cc: Mika Kuoppala Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171010114857.13108-1-mika.kuoppala@intel.com drivers/gpu/drm/i915/i915_guc_submission.c | 2 +- drivers/gpu/drm/i915/intel_lrc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b117e0380513c186065f247a9af09dc0cd3e703d Author: Christos Gkekas Date: Sun Oct 8 23:33:31 2017 +0100 iommu/vt-d: Delete unnecessary check in domain_context_mapping_one() Variable did_old is unsigned so checking whether it is greater or equal to zero is not necessary. Signed-off-by: Christos Gkekas Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19b592dae895aad10b84246b0e12caad04e9eb0d Author: Takashi Iwai Date: Mon Oct 9 17:05:35 2017 +0200 ALSA: seq: Add sanity check for user-space pointer delivery The sequencer event may contain a user-space pointer with its SNDRV_SEQ_EXT_USRPTR bit, and we assure that its delivery is limited with non-atomic mode. Otherwise the copy_from_user() may hit the fault and cause a problem. Although the core code doesn't set such a flag (only set at snd_seq_write()), any wild driver may set it mistakenly and lead to an unexpected crash. This patch adds a sanity check of such events at the delivery core code to filter out the invalid invocation in the atomic mode. Signed-off-by: Takashi Iwai sound/core/seq/seq_clientmgr.c | 4 ++++ 1 file changed, 4 insertions(+) commit de8cd83e91bc3ee212b3e6ec6e4283af9e4ab269 Author: Steve Grubb Date: Mon Oct 2 20:21:39 2017 -0400 audit: Record fanotify access control decisions The fanotify interface allows user space daemons to make access control decisions. Under common criteria requirements, we need to optionally record decisions based on policy. This patch adds a bit mask, FAN_AUDIT, that a user space daemon can 'or' into the response decision which will tell the kernel that it made a decision and record it. It would be used something like this in user space code: response.response = FAN_DENY | FAN_AUDIT; write(fd, &response, sizeof(struct fanotify_response)); When the syscall ends, the audit system will record the decision as a AUDIT_FANOTIFY auxiliary record to denote that the reason this event occurred is the result of an access control decision from fanotify rather than DAC or MAC policy. A sample event looks like this: type=PATH msg=audit(1504310584.332:290): item=0 name="./evil-ls" inode=1319561 dev=fc:03 mode=0100755 ouid=1000 ogid=1000 rdev=00:00 obj=unconfined_u:object_r:user_home_t:s0 nametype=NORMAL type=CWD msg=audit(1504310584.332:290): cwd="/home/sgrubb" type=SYSCALL msg=audit(1504310584.332:290): arch=c000003e syscall=2 success=no exit=-1 a0=32cb3fca90 a1=0 a2=43 a3=8 items=1 ppid=901 pid=959 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=pts1 ses=3 comm="bash" exe="/usr/bin/bash" subj=unconfined_u:unconfined_r:unconfined_t: s0-s0:c0.c1023 key=(null) type=FANOTIFY msg=audit(1504310584.332:290): resp=2 Prior to using the audit flag, the developer needs to call fanotify_init or'ing in FAN_ENABLE_AUDIT to ensure that the kernel supports auditing. The calling process must also have the CAP_AUDIT_WRITE capability. Signed-off-by: sgrubb Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara fs/notify/fanotify/fanotify.c | 8 +++++++- fs/notify/fanotify/fanotify_user.c | 16 +++++++++++++++- fs/notify/fdinfo.c | 3 +++ include/linux/audit.h | 10 ++++++++++ include/linux/fsnotify_backend.h | 1 + include/uapi/linux/audit.h | 1 + include/uapi/linux/fanotify.h | 3 +++ kernel/auditsc.c | 6 ++++++ 8 files changed, 46 insertions(+), 2 deletions(-) commit 7741b547b6e000b08e20667bb3bef22e1a362661 Author: Daniel Vetter Date: Mon Oct 9 18:44:00 2017 +0200 drm/i915: Preallocate our mmu notifier workequeu to unbreak cpu hotplug deadlock 4.14-rc1 gained the fancy new cross-release support in lockdep, which seems to have uncovered a few more rules about what is allowed and isn't. This one here seems to indicate that allocating a work-queue while holding mmap_sem is a no-go, so let's try to preallocate it. Of course another way to break this chain would be somewhere in the cpu hotplug code, since this isn't the only trace we're finding now which goes through msr_create_device. Full lockdep splat: ====================================================== WARNING: possible circular locking dependency detected 4.14.0-rc1-CI-CI_DRM_3118+ #1 Tainted: G U ------------------------------------------------------ prime_mmap/1551 is trying to acquire lock: (cpu_hotplug_lock.rw_sem){++++}, at: [] apply_workqueue_attrs+0x17/0x50 but task is already holding lock: (&dev_priv->mm_lock){+.+.}, at: [] i915_gem_userptr_init__mmu_notifier+0x14a/0x270 [i915] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #6 (&dev_priv->mm_lock){+.+.}: __lock_acquire+0x1420/0x15e0 lock_acquire+0xb0/0x200 __mutex_lock+0x86/0x9b0 mutex_lock_nested+0x1b/0x20 i915_gem_userptr_init__mmu_notifier+0x14a/0x270 [i915] i915_gem_userptr_ioctl+0x222/0x2c0 [i915] drm_ioctl_kernel+0x69/0xb0 drm_ioctl+0x2f9/0x3d0 do_vfs_ioctl+0x94/0x670 SyS_ioctl+0x41/0x70 entry_SYSCALL_64_fastpath+0x1c/0xb1 -> #5 (&mm->mmap_sem){++++}: __lock_acquire+0x1420/0x15e0 lock_acquire+0xb0/0x200 __might_fault+0x68/0x90 _copy_to_user+0x23/0x70 filldir+0xa5/0x120 dcache_readdir+0xf9/0x170 iterate_dir+0x69/0x1a0 SyS_getdents+0xa5/0x140 entry_SYSCALL_64_fastpath+0x1c/0xb1 -> #4 (&sb->s_type->i_mutex_key#5){++++}: down_write+0x3b/0x70 handle_create+0xcb/0x1e0 devtmpfsd+0x139/0x180 kthread+0x152/0x190 ret_from_fork+0x27/0x40 -> #3 ((complete)&req.done){+.+.}: __lock_acquire+0x1420/0x15e0 lock_acquire+0xb0/0x200 wait_for_common+0x58/0x210 wait_for_completion+0x1d/0x20 devtmpfs_create_node+0x13d/0x160 device_add+0x5eb/0x620 device_create_groups_vargs+0xe0/0xf0 device_create+0x3a/0x40 msr_device_create+0x2b/0x40 cpuhp_invoke_callback+0xa3/0x840 cpuhp_thread_fun+0x7a/0x150 smpboot_thread_fn+0x18a/0x280 kthread+0x152/0x190 ret_from_fork+0x27/0x40 -> #2 (cpuhp_state){+.+.}: __lock_acquire+0x1420/0x15e0 lock_acquire+0xb0/0x200 cpuhp_issue_call+0x10b/0x170 __cpuhp_setup_state_cpuslocked+0x134/0x2a0 __cpuhp_setup_state+0x46/0x60 page_writeback_init+0x43/0x67 pagecache_init+0x3d/0x42 start_kernel+0x3a8/0x3fc x86_64_start_reservations+0x2a/0x2c x86_64_start_kernel+0x6d/0x70 verify_cpu+0x0/0xfb -> #1 (cpuhp_state_mutex){+.+.}: __lock_acquire+0x1420/0x15e0 lock_acquire+0xb0/0x200 __mutex_lock+0x86/0x9b0 mutex_lock_nested+0x1b/0x20 __cpuhp_setup_state_cpuslocked+0x52/0x2a0 __cpuhp_setup_state+0x46/0x60 page_alloc_init+0x28/0x30 start_kernel+0x145/0x3fc x86_64_start_reservations+0x2a/0x2c x86_64_start_kernel+0x6d/0x70 verify_cpu+0x0/0xfb -> #0 (cpu_hotplug_lock.rw_sem){++++}: check_prev_add+0x430/0x840 __lock_acquire+0x1420/0x15e0 lock_acquire+0xb0/0x200 cpus_read_lock+0x3d/0xb0 apply_workqueue_attrs+0x17/0x50 __alloc_workqueue_key+0x1d8/0x4d9 i915_gem_userptr_init__mmu_notifier+0x1fb/0x270 [i915] i915_gem_userptr_ioctl+0x222/0x2c0 [i915] drm_ioctl_kernel+0x69/0xb0 drm_ioctl+0x2f9/0x3d0 do_vfs_ioctl+0x94/0x670 SyS_ioctl+0x41/0x70 entry_SYSCALL_64_fastpath+0x1c/0xb1 other info that might help us debug this: Chain exists of: cpu_hotplug_lock.rw_sem --> &mm->mmap_sem --> &dev_priv->mm_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&dev_priv->mm_lock); lock(&mm->mmap_sem); lock(&dev_priv->mm_lock); lock(cpu_hotplug_lock.rw_sem); *** DEADLOCK *** 2 locks held by prime_mmap/1551: #0: (&mm->mmap_sem){++++}, at: [] i915_gem_userptr_init__mmu_notifier+0x138/0x270 [i915] #1: (&dev_priv->mm_lock){+.+.}, at: [] i915_gem_userptr_init__mmu_notifier+0x14a/0x270 [i915] stack backtrace: CPU: 4 PID: 1551 Comm: prime_mmap Tainted: G U 4.14.0-rc1-CI-CI_DRM_3118+ #1 Hardware name: Dell Inc. XPS 8300 /0Y2MRG, BIOS A06 10/17/2011 Call Trace: dump_stack+0x68/0x9f print_circular_bug+0x235/0x3c0 ? lockdep_init_map_crosslock+0x20/0x20 check_prev_add+0x430/0x840 __lock_acquire+0x1420/0x15e0 ? __lock_acquire+0x1420/0x15e0 ? lockdep_init_map_crosslock+0x20/0x20 lock_acquire+0xb0/0x200 ? apply_workqueue_attrs+0x17/0x50 cpus_read_lock+0x3d/0xb0 ? apply_workqueue_attrs+0x17/0x50 apply_workqueue_attrs+0x17/0x50 __alloc_workqueue_key+0x1d8/0x4d9 ? __lockdep_init_map+0x57/0x1c0 i915_gem_userptr_init__mmu_notifier+0x1fb/0x270 [i915] i915_gem_userptr_ioctl+0x222/0x2c0 [i915] ? i915_gem_userptr_release+0x140/0x140 [i915] drm_ioctl_kernel+0x69/0xb0 drm_ioctl+0x2f9/0x3d0 ? i915_gem_userptr_release+0x140/0x140 [i915] ? __do_page_fault+0x2a4/0x570 do_vfs_ioctl+0x94/0x670 ? entry_SYSCALL_64_fastpath+0x5/0xb1 ? __this_cpu_preempt_check+0x13/0x20 ? trace_hardirqs_on_caller+0xe3/0x1b0 SyS_ioctl+0x41/0x70 entry_SYSCALL_64_fastpath+0x1c/0xb1 RIP: 0033:0x7fbb83c39587 RSP: 002b:00007fff188dc228 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: ffffffff81492963 RCX: 00007fbb83c39587 RDX: 00007fff188dc260 RSI: 00000000c0186473 RDI: 0000000000000003 RBP: ffffc90001487f88 R08: 0000000000000000 R09: 00007fff188dc2ac R10: 00007fbb83efcb58 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000003 R14: 00000000c0186473 R15: 00007fff188dc2ac ? __this_cpu_preempt_check+0x13/0x20 Note that this also has the minor benefit of slightly reducing the critical section where we hold mmap_sem. v2: Set ret correctly when we raced with another thread. v3: Use Chris' diff. Attach the right lockdep splat. v4: Repaint in Tvrtko's colors (aka don't report ENOMEM if we race and some other thread managed to not also get an ENOMEM and successfully install the mmu notifier. Note that the kernel guarantees that small allocations succeed, so this never actually happens). Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Sasha Levin Cc: Marta Lofstedt Cc: Tejun Heo References: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3180/shard-hsw3/igt@prime_mmap@test_userptr.html Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102939 Reviewed-by: Tvrtko Ursulin Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171009164401.16035-1-daniel.vetter@ffwll.ch drivers/gpu/drm/i915/i915_gem_userptr.c | 38 ++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 15 deletions(-) commit 8272170f7da34e2554bed10ab76582094ea6816d Author: Philipp Zabel Date: Mon Oct 9 12:03:31 2017 +0200 drm/etnaviv: remove unnecessary clock stabilization delay There is no reason to wait for clock stabilization here, as the clock framework guarantees that PLL clock sources are stable before clk_enable returns. Signed-off-by: Philipp Zabel Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 3 --- 1 file changed, 3 deletions(-) commit 4046217954d4e79d57d34c56ce42dec4f87e2ce9 Author: Philipp Zabel Date: Mon Oct 9 12:03:30 2017 +0200 drm/etnaviv: reduce reset delay After reset assertion, we only have to wait for the reset signals to propagate through the GPU before deasserting the reset again. A few hundred clock cycles should be more than enough. Replace the msleep(1), which can actually take about 30 ms on i.MX6Q in some configurations, with an usleep_range of a few microseconds. If the delay was too short, the FE would not be idle afterwards, and the reset would be retried. Signed-off-by: Philipp Zabel Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbd71f0aaa60a2108f6d88152e5a7274865dbfa9 Author: Sean Wang Date: Thu Sep 21 16:26:57 2017 +0800 soc: mediatek: pwrap: fixup warnings from coding style fixup those warnings such as lines over 80 words and parenthesis alignment which would be complained by checkpatch.pl. Signed-off-by: Sean Wang Signed-off-by: Matthias Brugger drivers/soc/mediatek/mtk-pmic-wrap.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit a4c1887d4c1462b0ec5a8989f8ba3cdd9057a299 Author: Will Deacon Date: Tue Oct 3 19:25:29 2017 +0100 locking/arch: Remove dummy arch_{read,spin,write}_lock_flags() implementations The arch_{read,spin,write}_lock_flags() macros are simply mapped to the non-flags versions by the majority of architectures, so do this in core code and remove the dummy implementations. Also remove the implementation in spinlock_up.h, since all callers of do_raw_spin_lock_flags() call local_irq_save(flags) anyway. Signed-off-by: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: paulmck@linux.vnet.ibm.com Link: http://lkml.kernel.org/r/1507055129-12300-4-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar arch/alpha/include/asm/spinlock.h | 4 ---- arch/arc/include/asm/spinlock.h | 4 ---- arch/arm/include/asm/spinlock.h | 5 ----- arch/arm64/include/asm/spinlock.h | 5 ----- arch/blackfin/include/asm/spinlock.h | 6 ------ arch/hexagon/include/asm/spinlock.h | 5 ----- arch/ia64/include/asm/spinlock.h | 5 +++-- arch/m32r/include/asm/spinlock.h | 4 ---- arch/metag/include/asm/spinlock.h | 5 ----- arch/metag/include/asm/spinlock_lnkget.h | 3 --- arch/mips/include/asm/spinlock.h | 3 --- arch/mn10300/include/asm/spinlock.h | 4 +--- arch/parisc/include/asm/spinlock.h | 4 +--- arch/powerpc/include/asm/spinlock.h | 4 +--- arch/s390/include/asm/spinlock.h | 4 +--- arch/sh/include/asm/spinlock-cas.h | 4 ---- arch/sh/include/asm/spinlock-llsc.h | 4 ---- arch/sparc/include/asm/spinlock_32.h | 4 ---- arch/sparc/include/asm/spinlock_64.h | 3 --- arch/tile/include/asm/spinlock_32.h | 6 ------ arch/tile/include/asm/spinlock_64.h | 6 ------ arch/x86/include/asm/spinlock.h | 3 --- arch/xtensa/include/asm/spinlock.h | 5 ----- include/asm-generic/qspinlock.h | 1 - include/linux/rwlock.h | 9 +++++++++ include/linux/spinlock.h | 4 ++++ include/linux/spinlock_up.h | 8 -------- 27 files changed, 20 insertions(+), 102 deletions(-) commit 0160fb177d484367e041ac251fca591a3e49660c Author: Will Deacon Date: Tue Oct 3 19:25:28 2017 +0100 locking/arch: Remove dummy arch_{read,spin,write}_relax() implementations arch_{read,spin,write}_relax() are defined as cpu_relax() by the core code, so architectures that can't do better (i.e. most of them) don't need to bother with the dummy definitions. Signed-off-by: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: paulmck@linux.vnet.ibm.com Link: http://lkml.kernel.org/r/1507055129-12300-3-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar arch/arc/include/asm/spinlock.h | 4 ---- arch/arm/include/asm/spinlock.h | 4 ---- arch/arm64/include/asm/spinlock.h | 4 ---- arch/blackfin/include/asm/spinlock.h | 4 ---- arch/ia64/include/asm/spinlock.h | 4 ---- arch/m32r/include/asm/spinlock.h | 4 ---- arch/metag/include/asm/spinlock.h | 4 ---- arch/metag/include/asm/spinlock_lnkget.h | 4 ---- arch/mips/include/asm/spinlock.h | 4 ---- arch/s390/include/asm/spinlock.h | 3 +++ arch/sh/include/asm/spinlock-cas.h | 4 ---- arch/sh/include/asm/spinlock-llsc.h | 4 ---- arch/sparc/include/asm/spinlock_32.h | 4 ---- arch/sparc/include/asm/spinlock_64.h | 4 ---- arch/x86/include/asm/spinlock.h | 4 ---- 15 files changed, 3 insertions(+), 56 deletions(-) commit a8a217c22116eff6c120d753c9934089fb229af0 Author: Will Deacon Date: Tue Oct 3 19:25:27 2017 +0100 locking/core: Remove {read,spin,write}_can_lock() Outside of the locking code itself, {read,spin,write}_can_lock() have no users in tree. Apparmor (the last remaining user of write_can_lock()) got moved over to lockdep by the previous patch. This patch removes the use of {read,spin,write}_can_lock() from the BUILD_LOCK_OPS macro, deferring to the trylock operation for testing the lock status, and subsequently removes the unused macros altogether. They aren't guaranteed to work in a concurrent environment and can give incorrect results in the case of qrwlock. Signed-off-by: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: paulmck@linux.vnet.ibm.com Link: http://lkml.kernel.org/r/1507055129-12300-2-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar arch/alpha/include/asm/spinlock.h | 10 ---------- arch/arc/include/asm/spinlock.h | 3 --- arch/arm/include/asm/spinlock.h | 6 ------ arch/blackfin/include/asm/spinlock.h | 10 ---------- arch/hexagon/include/asm/spinlock.h | 10 ---------- arch/ia64/include/asm/spinlock.h | 3 --- arch/m32r/include/asm/spinlock.h | 12 ------------ arch/metag/include/asm/spinlock_lnkget.h | 30 ------------------------------ arch/metag/include/asm/spinlock_lock1.h | 20 -------------------- arch/mn10300/include/asm/spinlock.h | 12 ------------ arch/parisc/include/asm/spinlock.h | 18 ------------------ arch/powerpc/include/asm/spinlock.h | 3 --- arch/s390/include/asm/spinlock.h | 12 ------------ arch/sh/include/asm/spinlock-cas.h | 12 ------------ arch/sh/include/asm/spinlock-llsc.h | 12 ------------ arch/sparc/include/asm/spinlock_32.h | 3 --- arch/tile/include/asm/spinlock_32.h | 16 ---------------- arch/tile/include/asm/spinlock_64.h | 18 ------------------ arch/xtensa/include/asm/spinlock.h | 2 -- include/asm-generic/qrwlock.h | 20 -------------------- include/linux/rwlock.h | 3 --- include/linux/spinlock.h | 11 ----------- include/linux/spinlock_up.h | 3 --- kernel/locking/spinlock.c | 6 ++---- 24 files changed, 2 insertions(+), 253 deletions(-) commit 26c4eb192c6224e5297496cead36404b62fb071b Author: Will Deacon Date: Tue Oct 3 19:25:26 2017 +0100 locking/rwsem, security/apparmor: Replace homebrew use of write_can_lock() with lockdep The lockdep subsystem provides a robust way to assert that a lock is held, so use that instead of write_can_lock, which can give incorrect results for qrwlocks. Signed-off-by: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Acked-by: John Johansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: paulmck@linux.vnet.ibm.com Link: http://lkml.kernel.org/r/1507055129-12300-1-git-send-email-will.deacon@arm.com Signed-off-by: Ingo Molnar security/apparmor/include/lib.h | 11 ----------- security/apparmor/label.c | 8 ++++---- 2 files changed, 4 insertions(+), 15 deletions(-) commit 0dc208b5d5feedc795cbf124539decd182c8e99e Author: Kirill Tkhai Date: Fri Sep 29 19:06:48 2017 +0300 locking/rwsem, fs: Use killable down_read() in iterate_dir() There was mutex_lock_interruptible() initially, and it was changed to rwsem, but there were not killable rwsem primitives that time. >From commit 9902af79c01a: "The main issue is the lack of down_write_killable(), so the places like readdir.c switched to plain inode_lock(); once killable variants of rwsem primitives appear, that'll be dealt with" Use down_read_killable() same as down_write_killable() in !shared case, as concurrent inode_lock() may take much time, that may be wanted to be interrupted by user. Signed-off-by: Kirill Tkhai Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: arnd@arndb.de Cc: avagin@virtuozzo.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: gorcunov@virtuozzo.com Cc: heiko.carstens@de.ibm.com Cc: hpa@zytor.com Cc: ink@jurassic.park.msu.ru Cc: mattst88@gmail.com Cc: rientjes@google.com Cc: rth@twiddle.net Cc: schwidefsky@de.ibm.com Cc: tony.luck@intel.com Cc: viro@zeniv.linux.org.uk Link: http://lkml.kernel.org/r/150670120820.23930.5455667921545937220.stgit@localhost.localdomain Signed-off-by: Ingo Molnar fs/readdir.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 76f8507f7a6442215df19de74f07eabca2462f1e Author: Kirill Tkhai Date: Fri Sep 29 19:06:38 2017 +0300 locking/rwsem: Add down_read_killable() Similar to down_read() and down_write_killable(), add killable version of down_read(), based on __down_read_killable() function, added in previous patches. Signed-off-by: Kirill Tkhai Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: arnd@arndb.de Cc: avagin@virtuozzo.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: gorcunov@virtuozzo.com Cc: heiko.carstens@de.ibm.com Cc: hpa@zytor.com Cc: ink@jurassic.park.msu.ru Cc: mattst88@gmail.com Cc: rientjes@google.com Cc: rth@twiddle.net Cc: schwidefsky@de.ibm.com Cc: tony.luck@intel.com Cc: viro@zeniv.linux.org.uk Link: http://lkml.kernel.org/r/150670119884.23930.2585570605960763239.stgit@localhost.localdomain Signed-off-by: Ingo Molnar include/asm-generic/rwsem.h | 10 ++++++++++ include/linux/rwsem.h | 1 + kernel/locking/rwsem.c | 16 ++++++++++++++++ 3 files changed, 27 insertions(+) commit 19c60923010b3f56f10ca1fb6d537c9cc852b3f1 Author: Kirill Tkhai Date: Fri Sep 29 19:06:28 2017 +0300 locking/arch, x86: Add __down_read_killable() Similar to __down_write_killable(), add read killable primitive: extract current __down_read() code to macros and teach it to get different functions as slow_path argument: store ax register to ret, and add sp register and preserve its value. Add call_rwsem_down_read_failed_killable() assembly entry similar to call_rwsem_down_read_failed(): push dx register to stack in additional to common registers, as it's not declarated as modifiable in ____down_read(). Signed-off-by: Kirill Tkhai Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: arnd@arndb.de Cc: avagin@virtuozzo.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: gorcunov@virtuozzo.com Cc: heiko.carstens@de.ibm.com Cc: hpa@zytor.com Cc: ink@jurassic.park.msu.ru Cc: mattst88@gmail.com Cc: rientjes@google.com Cc: rth@twiddle.net Cc: schwidefsky@de.ibm.com Cc: tony.luck@intel.com Cc: viro@zeniv.linux.org.uk Link: http://lkml.kernel.org/r/150670118802.23930.1316107715255410256.stgit@localhost.localdomain Signed-off-by: Ingo Molnar arch/x86/include/asm/rwsem.h | 35 +++++++++++++++++++++++++---------- arch/x86/lib/rwsem.S | 12 ++++++++++++ 2 files changed, 37 insertions(+), 10 deletions(-) commit a61ba2c8a48f150f5e6b6d14328fc7f1aa32969d Author: Kirill Tkhai Date: Fri Sep 29 19:06:18 2017 +0300 locking/arch, s390: Add __down_read_killable() Similar to __down_write_killable(), and read killable primitive. Signed-off-by: Kirill Tkhai Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: arnd@arndb.de Cc: avagin@virtuozzo.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: gorcunov@virtuozzo.com Cc: heiko.carstens@de.ibm.com Cc: hpa@zytor.com Cc: ink@jurassic.park.msu.ru Cc: mattst88@gmail.com Cc: rientjes@google.com Cc: rth@twiddle.net Cc: schwidefsky@de.ibm.com Cc: tony.luck@intel.com Cc: viro@zeniv.linux.org.uk Link: http://lkml.kernel.org/r/150670117817.23930.13068785028558453848.stgit@localhost.localdomain Signed-off-by: Ingo Molnar arch/s390/include/asm/rwsem.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit c0905115a55c8a3011d7b7e6ee5d63653c1e99f1 Author: Kirill Tkhai Date: Fri Sep 29 19:06:07 2017 +0300 locking/arch, ia64: Add __down_read_killable() Similar to __down_write_killable(), and read killable primitive. Signed-off-by: Kirill Tkhai Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: arnd@arndb.de Cc: avagin@virtuozzo.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: gorcunov@virtuozzo.com Cc: heiko.carstens@de.ibm.com Cc: hpa@zytor.com Cc: ink@jurassic.park.msu.ru Cc: mattst88@gmail.com Cc: rientjes@google.com Cc: rth@twiddle.net Cc: schwidefsky@de.ibm.com Cc: tony.luck@intel.com Cc: viro@zeniv.linux.org.uk Link: http://lkml.kernel.org/r/150670116749.23930.14976888440968191759.stgit@localhost.localdomain Signed-off-by: Ingo Molnar arch/ia64/include/asm/rwsem.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit 8c74392a8db9f19f7b2d07f3bb7c5accb4cb4702 Author: Kirill Tkhai Date: Fri Sep 29 19:05:56 2017 +0300 locking/arch, alpha: Add __down_read_killable() Similar to __down_write_killable(), and read killable primitive. Signed-off-by: Kirill Tkhai Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: arnd@arndb.de Cc: avagin@virtuozzo.com Cc: davem@davemloft.net Cc: fenghua.yu@intel.com Cc: gorcunov@virtuozzo.com Cc: heiko.carstens@de.ibm.com Cc: hpa@zytor.com Cc: ink@jurassic.park.msu.ru Cc: mattst88@gmail.com Cc: rientjes@google.com Cc: rth@twiddle.net Cc: schwidefsky@de.ibm.com Cc: tony.luck@intel.com Cc: viro@zeniv.linux.org.uk Link: http://lkml.kernel.org/r/150670115677.23930.5711263025537758463.stgit@localhost.localdomain Signed-off-by: Ingo Molnar arch/alpha/include/asm/rwsem.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit e6fd28eb3522b31f79a938e24674f77268a120fd Author: Juergen Gross Date: Wed Sep 6 19:36:25 2017 +0200 locking/spinlocks, paravirt, xen: Correct the xen_nopvspin case With the boot parameter "xen_nopvspin" specified a Xen guest should not make use of paravirt spinlocks, but behave as if running on bare metal. This is not true, however, as the qspinlock code will fall back to a test-and-set scheme when it is detecting a hypervisor. In order to avoid this disable the virt_spin_lock_key. Signed-off-by: Juergen Gross Signed-off-by: Peter Zijlstra (Intel) Acked-by: Waiman Long Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akataria@vmware.com Cc: boris.ostrovsky@oracle.com Cc: chrisw@sous-sol.org Cc: hpa@zytor.com Cc: jeremy@goop.org Cc: rusty@rustcorp.com.au Cc: virtualization@lists.linux-foundation.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20170906173625.18158-3-jgross@suse.com Signed-off-by: Ingo Molnar arch/x86/xen/spinlock.c | 2 ++ 1 file changed, 2 insertions(+) commit 9043442b43b1fddf202591b84702863286700c1a Author: Juergen Gross Date: Wed Sep 6 19:36:24 2017 +0200 locking/paravirt: Use new static key for controlling call of virt_spin_lock() There are cases where a guest tries to switch spinlocks to bare metal behavior (e.g. by setting "xen_nopvspin" boot parameter). Today this has the downside of falling back to unfair test and set scheme for qspinlocks due to virt_spin_lock() detecting the virtualized environment. Add a static key controlling whether virt_spin_lock() should be called or not. When running on bare metal set the new key to false. Signed-off-by: Juergen Gross Signed-off-by: Peter Zijlstra (Intel) Acked-by: Waiman Long Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: akataria@vmware.com Cc: boris.ostrovsky@oracle.com Cc: chrisw@sous-sol.org Cc: hpa@zytor.com Cc: jeremy@goop.org Cc: rusty@rustcorp.com.au Cc: virtualization@lists.linux-foundation.org Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/20170906173625.18158-2-jgross@suse.com Signed-off-by: Ingo Molnar arch/x86/include/asm/qspinlock.h | 11 ++++++++++- arch/x86/kernel/paravirt.c | 14 ++++++++++++-- arch/x86/kernel/smpboot.c | 2 ++ 3 files changed, 24 insertions(+), 3 deletions(-) commit 13cde9f4c62accdb35f769501ae951ecd75cccc9 Author: Lucas Stach Date: Wed Sep 20 12:24:11 2017 +0200 drm/etnaviv: remove unused function etnaviv_gem_new We only ever do GEM object creation by handle, as there is no kernel internal use of GEM objects. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_drv.h | 4 ---- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 19 ------------------- 2 files changed, 23 deletions(-) commit af1a34f21150af199f066dfcccbae9830c9429aa Merge: 39208aa c7e2f69 Author: Ingo Molnar Date: Tue Oct 10 11:46:55 2017 +0200 Merge branch 'locking/urgent' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit 7f9d398c16040f32ba7bc6521a89c06c9cb09442 Author: Lucas Stach Date: Thu Sep 28 15:45:14 2017 +0200 drm/etnaviv: remove stale comment This comment is outdated as the driver is taking care about clock gating and the pulse eater for quite some time already. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 7 ------- 1 file changed, 7 deletions(-) commit 4fd32aa413c5ad498455a7d07ee0ec4b071a78ea Author: Christian Gmeiner Date: Sun Sep 24 15:15:43 2017 +0200 drm/etnaviv: submit supports performance monitor requests We increment the minor driver version so userspace can detect perfmon support. Signed-off-by: Christian Gmeiner Reviewed-by: Lucas Stach Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04a7d18d7975f720bc0122957eafb32fe42e2dff Author: Christian Gmeiner Date: Sun Sep 24 15:15:42 2017 +0200 drm/etnaviv: enable debug registers on demand Some performance register are debug register and they need to be enabled in order to be functional. Signed-off-by: Christian Gmeiner Reviewed-by: Lucas Stach Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2c8b0c5a99054ba909036d7f9c7bb7391b48b6f5 Author: Christian Gmeiner Date: Sun Sep 24 15:15:39 2017 +0200 drm/etnaviv: need to disable clock gating when doing profiling As done by Vivante kernel driver. Signed-off-by: Christian Gmeiner Reviewed-by: Lucas Stach Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 49168ee91dd4c47749d52ec270861026da3ccc45 Author: Christian Gmeiner Date: Sun Sep 24 15:15:38 2017 +0200 drm/etnaviv: add MC perf domain Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 9646025ee6c340b5e5ff2e34d4ae05edc45f1dd4 Author: Christian Gmeiner Date: Sun Sep 24 15:15:37 2017 +0200 drm/etnaviv: add TX perf domain Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 53 +++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit 91a9a17b59c10237c6fd72161682353be94cf01d Author: Christian Gmeiner Date: Sun Sep 24 15:15:36 2017 +0200 drm/etnaviv: add RA perf domain Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit a515264c958427eef1813c45da13086ca1784929 Author: Christian Gmeiner Date: Sun Sep 24 15:15:35 2017 +0200 drm/etnaviv: add SE perf domain Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit c3787ff6545ef2e60710e9926e3b00d596e5d7e8 Author: Christian Gmeiner Date: Sun Sep 24 15:15:34 2017 +0200 drm/etnaviv: add PA perf domain Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 98b2482ec48d23ca76217f349e26a739c640529a Author: Christian Gmeiner Date: Sun Sep 24 15:15:33 2017 +0200 drm/etnaviv: add SH perf domain Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 53 +++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit a3d0c390ffe0930e3aad99e220356a82b79c359b Author: Christian Gmeiner Date: Sun Sep 24 15:15:32 2017 +0200 drm/etnaviv: add PE perf domain We need to iterate over all pixel pipelines to get overall value. Changes from v4 -> v5: - switch back to pixel pipe 0 to prevent GPU hang - PIXELS_RENDERED_2D is exposed for 2D pipe Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) commit 33deff0af3a9cb055202a2dec9640b2874802bb5 Author: Christian Gmeiner Date: Sun Sep 24 15:15:31 2017 +0200 drm/etnaviv: add HI perf domain Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 55 +++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 68dc0b295dcbadbaf2747627dc535629e17eb664 Author: Christian Gmeiner Date: Sun Sep 24 15:15:30 2017 +0200 drm/etnaviv: use 'sync points' for performance monitor requests With 'sync points' we can sample the reqeustes perform signals before and/or after the submited command buffer. Changes v2 -> v3: - fixed indentation and init nr_events to 1 Changes v4 -> v5: - simplify logic around fence handling. Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 75 ++++++++++++++++++++++++++++++++--- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 1 + 2 files changed, 70 insertions(+), 6 deletions(-) commit 547d340d3f9bcd83a356c00044f260ae9d80d0e0 Author: Christian Gmeiner Date: Sun Sep 24 15:15:29 2017 +0200 drm/etnaviv: clear alloced event Results in less code as the users do not set every struct member to 0/NULL. Signed-off-by: Christian Gmeiner Reviewed-by: Lucas Stach Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 357713ce9bc86c1ae7ba804731d8db542944463c Author: Christian Gmeiner Date: Sun Sep 24 15:15:28 2017 +0200 drm/etnaviv: add 'sync point' support In order to support performance counters in a sane way we need to provide a method to sync the GPU with the CPU. The GPU can process multpile command buffers/events per irq. With the help of a 'sync point' we can trigger an event and stop the GPU/FE immediately. When the CPU is done with is processing it simply needs to restart the FE and the GPU will process the command stream. Changes from v1 -> v2: - process sync point with a work item to keep irq as fast as possible Changes from v4 -> v5: - renamed pmrs_* to sync_point_* - call event_free(..) in sync_point_worker(..) Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 36 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/etnaviv/etnaviv_drv.h | 1 + drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 26 +++++++++++++++++++++++ drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 6 ++++++ 4 files changed, 69 insertions(+) commit 249300c740e5bf2b48425e6f0cccc63964a35892 Author: Christian Gmeiner Date: Sun Sep 24 15:15:27 2017 +0200 drm/etnaviv: add performance monitor request processing Changes v4 -> v5 - make use of doms_meta array Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 17 +++++++++++++++++ drivers/gpu/drm/etnaviv/etnaviv_perfmon.h | 3 +++ 2 files changed, 20 insertions(+) commit c8e4a7fdea98ffdb6029bc591dd4b0ba31e17774 Author: Christian Gmeiner Date: Sun Sep 24 15:15:26 2017 +0200 drm/etnaviv: copy pmrs from userspace Changes from v1 -> v2: - renamed submit_perfmon_request() to submit_perfmon_validate() - extended flags validation - added comment about offset 0 - moved assigment of cmdbuf->nr_pmrs below the copy_from_user of the pmrs. Changes from v2 -> v3: - fixed flags validation Changes v4 -> v5 - pass cmdbuf->exec_state to etnaviv_pm_req_validate(..) Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 69 +++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 2 deletions(-) commit 46df52cd4395b62d05b9ac99a7f320f577b5cff5 Author: Christian Gmeiner Date: Sun Sep 24 15:15:25 2017 +0200 drm/etnaviv: add performance monitor request validation Check if the selected domain and signal combination exists. Changes from v4 to v5 - add exec_state parameter Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 17 +++++++++++++++++ drivers/gpu/drm/etnaviv/etnaviv_perfmon.h | 3 +++ 2 files changed, 20 insertions(+) commit 4fc3e66adb291cc3ec4a360c75221e9fbf416938 Author: Christian Gmeiner Date: Sun Sep 24 15:15:24 2017 +0200 drm/etnaviv: extend etnaviv_gpu_cmdbuf_new(..) with nr_pmrs This commits extends etnaviv_gpu_cmdbuf_new(..) to define the number of struct etnaviv_perfmon elements gets used. Changes from v1 -> v2: - make use of goto as requested by Lucas Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 15 ++++++++++++++- drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.h | 2 +- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) commit 6be53520ad8f87dc748f381e4e8e6a846a4b466b Author: Dou Liyang Date: Mon Oct 9 17:03:33 2017 +0800 x86/tsc: Append the 'tsc=' description for the 'tsc=unstable' boot parameter Commit: 8309f86cd41e ("x86/tsc: Provide 'tsc=unstable' boot parameter") added a new 'tsc=unstable' parameter, but didn't document it. Document it. Signed-off-by: Dou Liyang Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Cc: Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1507539813-11420-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Ingo Molnar Documentation/admin-guide/kernel-parameters.txt | 3 +++ 1 file changed, 3 insertions(+) commit 8d3d56cef4412a37cea3ce32e730976620aaeb58 Author: Christian Gmeiner Date: Sun Sep 24 15:15:23 2017 +0200 drm/etnaviv: add internal representation of perfmon_request Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.h | 4 ++++ drivers/gpu/drm/etnaviv/etnaviv_perfmon.h | 12 ++++++++++++ 2 files changed, 16 insertions(+) commit 05916bed11b6d4c61b473a76220151a7d0547164 Author: Christian Gmeiner Date: Sun Sep 24 15:15:22 2017 +0200 drm/etnaviv: add uapi for perfmon feature Sadly we can not read any registers via command stream so we need to extend the drm_etnaviv_gem_submit struct with performance monitor requests. Those requests gets process before or after the actual submitted command stream. The Vivante kernel driver has a special ioctl to read all perfmon registers at once and return it. Changes from v1 -> v2: - use a 16 bit value for signals - fix padding issues Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach include/uapi/drm/etnaviv_drm.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 9e2c2e27301266dee805dda2e6d171931d752087 Author: Christian Gmeiner Date: Sun Sep 24 15:15:21 2017 +0200 drm/etnaviv: add infrastructure to query perf counter Make it possible that userspace can query all performance domains and its signals. This information is needed to sample those signals via submit ioctl. At the moment no performance domain is available. Changes from v1 -> v2: - use a 16 bit value for signals - fix padding issues - add id member to domain and signal struct Changes v4 -> v5 - provide for each pipe an own set of pm domains Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/Makefile | 3 +- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 37 ++++++++++ drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 113 ++++++++++++++++++++++++++++++ drivers/gpu/drm/etnaviv/etnaviv_perfmon.h | 31 ++++++++ include/uapi/drm/etnaviv_drm.h | 27 ++++++- 5 files changed, 209 insertions(+), 2 deletions(-) commit 4bdced5c9a2922521e325896a7bbbf0132c94e56 Author: Steven Rostedt (Red Hat) Date: Fri Oct 6 14:05:04 2017 -0400 sched/rt: Simplify the IPI based RT balancing logic When a CPU lowers its priority (schedules out a high priority task for a lower priority one), a check is made to see if any other CPU has overloaded RT tasks (more than one). It checks the rto_mask to determine this and if so it will request to pull one of those tasks to itself if the non running RT task is of higher priority than the new priority of the next task to run on the current CPU. When we deal with large number of CPUs, the original pull logic suffered from large lock contention on a single CPU run queue, which caused a huge latency across all CPUs. This was caused by only having one CPU having overloaded RT tasks and a bunch of other CPUs lowering their priority. To solve this issue, commit: b6366f048e0c ("sched/rt: Use IPI to trigger RT task push migration instead of pulling") changed the way to request a pull. Instead of grabbing the lock of the overloaded CPU's runqueue, it simply sent an IPI to that CPU to do the work. Although the IPI logic worked very well in removing the large latency build up, it still could suffer from a large number of IPIs being sent to a single CPU. On a 80 CPU box, I measured over 200us of processing IPIs. Worse yet, when I tested this on a 120 CPU box, with a stress test that had lots of RT tasks scheduling on all CPUs, it actually triggered the hard lockup detector! One CPU had so many IPIs sent to it, and due to the restart mechanism that is triggered when the source run queue has a priority status change, the CPU spent minutes! processing the IPIs. Thinking about this further, I realized there's no reason for each run queue to send its own IPI. As all CPUs with overloaded tasks must be scanned regardless if there's one or many CPUs lowering their priority, because there's no current way to find the CPU with the highest priority task that can schedule to one of these CPUs, there really only needs to be one IPI being sent around at a time. This greatly simplifies the code! The new approach is to have each root domain have its own irq work, as the rto_mask is per root domain. The root domain has the following fields attached to it: rto_push_work - the irq work to process each CPU set in rto_mask rto_lock - the lock to protect some of the other rto fields rto_loop_start - an atomic that keeps contention down on rto_lock the first CPU scheduling in a lower priority task is the one to kick off the process. rto_loop_next - an atomic that gets incremented for each CPU that schedules in a lower priority task. rto_loop - a variable protected by rto_lock that is used to compare against rto_loop_next rto_cpu - The cpu to send the next IPI to, also protected by the rto_lock. When a CPU schedules in a lower priority task and wants to make sure overloaded CPUs know about it. It increments the rto_loop_next. Then it atomically sets rto_loop_start with a cmpxchg. If the old value is not "0", then it is done, as another CPU is kicking off the IPI loop. If the old value is "0", then it will take the rto_lock to synchronize with a possible IPI being sent around to the overloaded CPUs. If rto_cpu is greater than or equal to nr_cpu_ids, then there's either no IPI being sent around, or one is about to finish. Then rto_cpu is set to the first CPU in rto_mask and an IPI is sent to that CPU. If there's no CPUs set in rto_mask, then there's nothing to be done. When the CPU receives the IPI, it will first try to push any RT tasks that is queued on the CPU but can't run because a higher priority RT task is currently running on that CPU. Then it takes the rto_lock and looks for the next CPU in the rto_mask. If it finds one, it simply sends an IPI to that CPU and the process continues. If there's no more CPUs in the rto_mask, then rto_loop is compared with rto_loop_next. If they match, everything is done and the process is over. If they do not match, then a CPU scheduled in a lower priority task as the IPI was being passed around, and the process needs to start again. The first CPU in rto_mask is sent the IPI. This change removes this duplication of work in the IPI logic, and greatly lowers the latency caused by the IPIs. This removed the lockup happening on the 120 CPU machine. It also simplifies the code tremendously. What else could anyone ask for? Thanks to Peter Zijlstra for simplifying the rto_loop_start atomic logic and supplying me with the rto_start_trylock() and rto_start_unlock() helper functions. Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Cc: Clark Williams Cc: Daniel Bristot de Oliveira Cc: John Kacur Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Scott Wood Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170424114732.1aac6dc4@gandalf.local.home Signed-off-by: Ingo Molnar kernel/sched/rt.c | 316 ++++++++++++++++++------------------------------ kernel/sched/sched.h | 24 ++-- kernel/sched/topology.c | 6 + 3 files changed, 138 insertions(+), 208 deletions(-) commit 95a428c17212ddef40909981e118acd6f518dc93 Author: Christian Gmeiner Date: Sun Sep 24 15:15:20 2017 +0200 drm/etnaviv: make it possible to allocate multiple events This makes it possible to allocate multiple events under the event spinlock. This change is needed to support 'sync'-points. Changes v2 -> v3: - wait for the completion of all events - use 10sec timeout regardless of the number of events - removed validation if there are enough free events - fixed return value evaluation of event_alloc(..) in etnaviv_gpu_submit(..) Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 47 +++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 16 deletions(-) commit 36436440cd19f59f5be12a1b181d299af2725140 Author: Sebastian Andrzej Siewior Date: Wed Oct 4 17:49:01 2017 +0200 block/ioprio: Use a helper to check for RT prio A side-effect to the old code is that now SCHED_DEADLINE is also recognized. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Cc: Jens Axboe Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171004154901.26904-2-bigeasy@linutronix.de Signed-off-by: Ingo Molnar include/linux/ioprio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 355502e03ad26e3c872a0f5c408a4accca57ba7e Author: Christian Gmeiner Date: Sun Sep 24 15:15:19 2017 +0200 drm/etnaviv: use bitmap to keep track of events This is prep work to be able to allocate multiple events in one go. Signed-off-by: Christian Gmeiner Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 31 +++++++++++++------------------ drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 6 ++++-- 2 files changed, 17 insertions(+), 20 deletions(-) commit ff0d4a9dc16b1f4c954f6407c233ab848bdfe8b0 Author: Sebastian Andrzej Siewior Date: Wed Oct 4 17:49:00 2017 +0200 sched/rt: Add a helper to test for a RT task This helper returns true if a task has elevated priority which is true for RT tasks (SCHED_RR and SCHED_FIFO) and also for SCHED_DEADLINE. A task which runs at RT priority due to PI-boosting is not considered as one with elevated priority. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Cc: Jens Axboe Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171004154901.26904-1-bigeasy@linutronix.de Signed-off-by: Ingo Molnar include/linux/sched/rt.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 93f50f90247e3e926bbe9830df089c64a5cec236 Author: Brendan Jackman Date: Thu Oct 5 12:45:16 2017 +0100 sched/fair: Fix usage of find_idlest_group() when the local group is idlest find_idlest_group() returns NULL when the local group is idlest. The caller then continues the find_idlest_group() search at a lower level of the current CPU's sched_domain hierarchy. find_idlest_group_cpu() is not consulted and, crucially, @new_cpu is not updated. This means the search is pointless and we return @prev_cpu from select_task_rq_fair(). This is fixed by initialising @new_cpu to @cpu instead of @prev_cpu. Signed-off-by: Brendan Jackman Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Josef Bacik Reviewed-by: Vincent Guittot Cc: Dietmar Eggemann Cc: Josef Bacik Cc: Linus Torvalds Cc: Mike Galbraith Cc: Morten Rasmussen Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171005114516.18617-6-brendan.jackman@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fee85ccbc76e8aeba43dc120c5fa3c5409a4e2c Author: Brendan Jackman Date: Thu Oct 5 12:45:15 2017 +0100 sched/fair: Fix usage of find_idlest_group() when no groups are allowed When 'p' is not allowed on any of the CPUs in the sched_domain, we currently return NULL from find_idlest_group(), and pointlessly continue the search on lower sched_domain levels (where 'p' is also not allowed) before returning prev_cpu regardless (as we have not updated new_cpu). Add an explicit check for this case, and add a comment to find_idlest_group(). Now when find_idlest_group() returns NULL, it always means that the local group is allowed and idlest. Signed-off-by: Brendan Jackman Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Reviewed-by: Josef Bacik Cc: Dietmar Eggemann Cc: Josef Bacik Cc: Linus Torvalds Cc: Mike Galbraith Cc: Morten Rasmussen Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171005114516.18617-5-brendan.jackman@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 5 +++++ 1 file changed, 5 insertions(+) commit 0d10ab952e99f3e9f374898e93f45452b81e5711 Author: Brendan Jackman Date: Thu Oct 5 12:45:14 2017 +0100 sched/fair: Fix find_idlest_group() when local group is not allowed When the local group is not allowed we do not modify this_*_load from their initial value of 0. That means that the load checks at the end of find_idlest_group cause us to incorrectly return NULL. Fixing the initial values to ULONG_MAX means we will instead return the idlest remote group in that case. Signed-off-by: Brendan Jackman Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Reviewed-by: Josef Bacik Cc: Dietmar Eggemann Cc: Josef Bacik Cc: Linus Torvalds Cc: Mike Galbraith Cc: Morten Rasmussen Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171005114516.18617-4-brendan.jackman@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e90381eaecf6d59c60fe396838e0e99789531419 Author: Brendan Jackman Date: Thu Oct 5 12:45:13 2017 +0100 sched/fair: Remove unnecessary comparison with -1 Since commit: 83a0a96a5f26 ("sched/fair: Leverage the idle state info when choosing the "idlest" cpu") find_idlest_group_cpu() (formerly find_idlest_cpu) no longer returns -1, so we can simplify the checking of the return value in find_idlest_cpu(). Signed-off-by: Brendan Jackman Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Josef Bacik Reviewed-by: Vincent Guittot Cc: Dietmar Eggemann Cc: Josef Bacik Cc: Linus Torvalds Cc: Mike Galbraith Cc: Morten Rasmussen Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171005114516.18617-3-brendan.jackman@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18bd1b4bd53aba81d76d55e91a68310a227dc187 Author: Brendan Jackman Date: Thu Oct 5 12:45:12 2017 +0100 sched/fair: Move select_task_rq_fair() slow-path into its own function In preparation for changes that would otherwise require adding a new level of indentation to the while(sd) loop, create a new function find_idlest_cpu() which contains this loop, and rename the existing find_idlest_cpu() to find_idlest_group_cpu(). Code inside the while(sd) loop is unchanged. @new_cpu is added as a variable in the new function, with the same initial value as the @new_cpu in select_task_rq_fair(). Suggested-by: Peter Zijlstra Signed-off-by: Brendan Jackman Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Josef Bacik Reviewed-by: Vincent Guittot Cc: Dietmar Eggemann Cc: Josef Bacik Cc: Linus Torvalds Cc: Mike Galbraith Cc: Morten Rasmussen Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171005114516.18617-2-brendan.jackman@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 83 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 35 deletions(-) commit 583ffd99d7657755736d831bbc182612d1d2697d Author: Brendan Jackman Date: Thu Oct 5 11:58:54 2017 +0100 sched/fair: Force balancing on NOHZ balance if local group has capacity The "goto force_balance" here is intended to mitigate the fact that avg_load calculations can result in bad placement decisions when priority is asymmetrical. The original commit that adds it: fab476228ba3 ("sched: Force balancing on newidle balance if local group has capacity") explains: Under certain situations, such as a niced down task (i.e. nice = -15) in the presence of nr_cpus NICE0 tasks, the niced task lands on a sched group and kicks away other tasks because of its large weight. This leads to sub-optimal utilization of the machine. Even though the sched group has capacity, it does not pull tasks because sds.this_load >> sds.max_load, and f_b_g() returns NULL. A similar but inverted issue also affects ARM big.LITTLE (asymmetrical CPU capacity) systems - consider 8 always-running, same-priority tasks on a system with 4 "big" and 4 "little" CPUs. Suppose that 5 of them end up on the "big" CPUs (which will be represented by one sched_group in the DIE sched_domain) and 3 on the "little" (the other sched_group in DIE), leaving one CPU unused. Because the "big" group has a higher group_capacity its avg_load may not present an imbalance that would cause migrating a task to the idle "little". The force_balance case here solves the problem but currently only for CPU_NEWLY_IDLE balances, which in theory might never happen on the unused CPU. Including CPU_IDLE in the force_balance case means there's an upper bound on the time before we can attempt to solve the underutilization: after DIE's sd->balance_interval has passed the next nohz balance kick will help us out. Signed-off-by: Brendan Jackman Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Morten Rasmussen Cc: Paul Turner Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170807163900.25180-1-brendan.jackman@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ea16f0ea6c3dc9e1aa083bd3d1792ba02860526e Author: Brendan Jackman Date: Thu Oct 5 11:55:51 2017 +0100 sched/fair: Sync task util before slow-path wakeup We use task_util() in find_idlest_group() via capacity_spare_wake(). This task_util() updated in wake_cap(). However wake_cap() is not the only reason for ending up in find_idlest_group() - we could have been sent there by wake_wide(). So explicitly sync the task util with prev_cpu when we are about to head to find_idlest_group(). We could simply do this at the beginning of select_task_rq_fair() (i.e. irrespective of whether we're heading to select_idle_sibling() or find_idlest_group() & co), but I didn't want to slow down the select_idle_sibling() path more than necessary. Don't do this during fork balancing, we won't need the task_util and we'd just clobber the last_update_time, which is supposed to be 0. Signed-off-by: Brendan Jackman Signed-off-by: Peter Zijlstra (Intel) Cc: Andres Oportus Cc: Dietmar Eggemann Cc: Joel Fernandes Cc: Josef Bacik Cc: Linus Torvalds Cc: Mike Galbraith Cc: Morten Rasmussen Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vincent Guittot Link: http://lkml.kernel.org/r/20170808095519.10077-1-brendan.jackman@arm.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 93824900a2e242766f5fe6ae7697e3d7171aa234 Author: Uladzislau Rezki Date: Wed Sep 13 12:24:30 2017 +0200 sched/fair: Search a task from the tail of the queue As a first step this patch makes cfs_tasks list as MRU one. It means, that when a next task is picked to run on physical CPU it is moved to the front of the list. Therefore, the cfs_tasks list is more or less sorted (except woken tasks) starting from recently given CPU time tasks toward tasks with max wait time in a run-queue, i.e. MRU list. Second, as part of the load balance operation, this approach starts detach_tasks()/detach_one_task() from the tail of the queue instead of the head, giving some advantages: - tends to pick a task with highest wait time; - tasks located in the tail are less likely cache-hot, therefore the can_migrate_task() decision is higher. hackbench illustrates slightly better performance. For example doing 1000 samples and 40 groups on i5-3320M CPU, it shows below figures: default: 0.657 avg patched: 0.646 avg Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Peter Zijlstra (Intel) Cc: Kirill Tkhai Cc: Linus Torvalds Cc: Mike Galbraith Cc: Mike Galbraith Cc: Nicolas Pitre Cc: Oleg Nesterov Cc: Oleksiy Avramchenko Cc: Paul Turner Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Tim Chen Link: http://lkml.kernel.org/r/20170913102430.8985-2-urezki@gmail.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 051f3ca02e46432c0965e8948f00c07d8a2f09c0 Author: Suravee Suthikulpanit Date: Thu Sep 7 02:20:05 2017 -0500 sched/topology: Introduce NUMA identity node sched domain On AMD Family17h-based (EPYC) system, a logical NUMA node can contain upto 8 cores (16 threads) with the following topology. ---------------------------- C0 | T0 T1 | || | T0 T1 | C4 --------| || |-------- C1 | T0 T1 | L3 || L3 | T0 T1 | C5 --------| || |-------- C2 | T0 T1 | #0 || #1 | T0 T1 | C6 --------| || |-------- C3 | T0 T1 | || | T0 T1 | C7 ---------------------------- Here, there are 2 last-level (L3) caches per logical NUMA node. A socket can contain upto 4 NUMA nodes, and a system can support upto 2 sockets. With full system configuration, current scheduler creates 4 sched domains: domain0 SMT (span a core) domain1 MC (span a last-level-cache) domain2 NUMA (span a socket: 4 nodes) domain3 NUMA (span a system: 8 nodes) Note that there is no domain to represent cpus spaning a logical NUMA node. With this hierarchy of sched domains, the scheduler does not balance properly in the following cases: Case1: When running 8 tasks, a properly balanced system should schedule a task per logical NUMA node. This is not the case for the current scheduler. Case2: In some cases, threads are scheduled on the same cpu, while other cpus are idle. This results in run-to-run inconsistency. For example: taskset -c 0-7 sysbench --num-threads=8 --test=cpu \ --cpu-max-prime=100000 run Total execution time ranges from 25.1s to 33.5s depending on threads placement, where 25.1s is when all 8 threads are balanced properly on 8 cpus. Introducing NUMA identity node sched domain, which is based on how SRAT/SLIT table define a logical NUMA node. This results in the following hierarchy of sched domains on the same system described above. domain0 SMT (span a core) domain1 MC (span a last-level-cache) domain2 NODE (span a logical NUMA node) domain3 NUMA (span a socket: 4 nodes) domain4 NUMA (span a system: 8 nodes) This fixes the improper load balancing cases mentioned above. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bp@suse.de Link: http://lkml.kernel.org/r/1504768805-46716-1-git-send-email-suravee.suthikulpanit@amd.com Signed-off-by: Ingo Molnar kernel/sched/topology.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit ed4ad1ca08a53cf1a805478678d1e7ff0d2cf251 Author: Peter Zijlstra Date: Mon Oct 2 14:50:33 2017 +0200 sched/topology: Restore SD_PREFER_SIBLING on MC domains The normal x86_topology on NHM+ machines degenerates because the MC and CPU domains are of the same size, therefore MC inherits SD_PREFER_SIBLING from CPU (which then gets taken out). The result is that we'll spread tasks across the first NUMA level in order to maximize cache utilization. However, for the x86_numa_in_package_topology we loose the CPU domain, and we'll not have SD_PREFER_SIBLING set anywhere, giving a distinct difference in behaviour. Commit: 8e7fbcbc22c1 ("sched: Remove stale power aware scheduling remnants and dysfunctional knobs") made a fail by not preserving the SD_PREFER_SIBLING for the !power_saving case on both CPU and MC. Then commit: 6956dc568f34 ("sched/numa: Add SD_PERFER_SIBLING to CPU domain") adds it back to the CPU but not MC. Restore that now, such that we get consistent spreading behaviour wrt L3 and NUMA. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar kernel/sched/topology.c | 1 + 1 file changed, 1 insertion(+) commit 799ba82de01e7543f6b2042e1a739f3a20255f23 Author: luca abeni Date: Thu Sep 7 12:09:31 2017 +0200 sched/deadline: Use C bitfields for the state flags Ask the compiler to use a single bit for storing true / false values, instead of wasting the size of a whole int value. Tested with gcc 5.4.0 on x86_64, and the compiler produces the expected Assembly (similar to the Assembly code generated when explicitly accessing the bits with bitmasks, "&" and "|"). Signed-off-by: luca abeni Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Daniel Bristot de Oliveira Cc: Juri Lelli Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1504778971-13573-5-git-send-email-luca.abeni@santannapisa.it Signed-off-by: Ingo Molnar include/linux/sched.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8c0944cee7af55291df0b28e6e2eeac0930e93c9 Author: Peter Zijlstra Date: Thu Sep 7 12:09:30 2017 +0200 sched/deadline: Rename __dl_clear() to __dl_sub() __dl_sub() is more meaningful as a name, and is more consistent with the naming of the dual function (__dl_add()). Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Luca Abeni Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Daniel Bristot de Oliveira Cc: Juri Lelli Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1504778971-13573-4-git-send-email-luca.abeni@santannapisa.it Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 10 +++++----- kernel/sched/sched.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit 6eb3ecc33a6aaedda5ceb0824cafe34c47af2f55 Author: Lucas Stach Date: Thu Sep 28 15:41:21 2017 +0200 drm/etnaviv: rework clock initialization The reset path wants to initialize the clock control register regardless of the DYNAMIC_FREQUENCY_SCALING feature, so don't call clock update, but explicitly load the register. Also disabling of the debug registers is moved into the reset function, so we always get to the same state after a GPU reset. This means the clock update function should not touch the bits already set in the clock control register, but instead only update the scaling bits. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 295d6d5e373607729bcc8182c25afe964655714f Author: Luca Abeni Date: Thu Sep 7 12:09:29 2017 +0200 sched/deadline: Fix switching to -deadline Fix a bug introduced in: 72f9f3fdc928 ("sched/deadline: Remove dl_new from struct sched_dl_entity") After that commit, when switching to -deadline if the scheduling deadline of a task is in the past then switched_to_dl() calls setup_new_entity() to properly initialize the scheduling deadline and runtime. The problem is that the task is enqueued _before_ having its parameters initialized by setup_new_entity(), and this can cause problems. For example, a task with its out-of-date deadline in the past will potentially be enqueued as the highest priority one; however, its adjusted deadline may not be the earliest one. This patch fixes the problem by initializing the task's parameters before enqueuing it. Signed-off-by: luca abeni Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Daniel Bristot de Oliveira Cc: Juri Lelli Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1504778971-13573-3-git-send-email-luca.abeni@santannapisa.it Signed-off-by: Ingo Molnar kernel/sched/deadline.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit e964d3501b64d6930aaa4dd18955a8cd086ccb92 Author: luca abeni Date: Thu Sep 7 12:09:28 2017 +0200 sched/headers: Remove duplicate prototype of __dl_clear_params() Signed-off-by: luca abeni Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Daniel Bristot de Oliveira Cc: Juri Lelli Cc: Linus Torvalds Cc: Mathieu Poirier Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1504778971-13573-2-git-send-email-luca.abeni@santannapisa.it Signed-off-by: Ingo Molnar kernel/sched/sched.h | 1 - 1 file changed, 1 deletion(-) commit 1d48b080bcce0a5e7d7aa2dbcdb35deefc188c3f Author: Peter Zijlstra Date: Fri Sep 29 13:50:16 2017 +0200 sched/debug: Rename task-state printing helpers Steve requested better names for the new task-state helper functions. So introduce the concept of task-state index for the printing and rename __get_task_state() to task_state_index() and __task_state_to_char() to task_index_to_char(). Requested-by: Steven Rostedt Signed-off-by: Peter Zijlstra (Intel) Acked-by: Steven Rostedt Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170929115016.pzlqc7ss3ccystyg@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar fs/proc/array.c | 2 +- include/linux/sched.h | 6 +++--- include/trace/events/sched.h | 2 +- kernel/trace/trace_output.c | 12 ++++++------ kernel/trace/trace_sched_wakeup.c | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) commit 62cb1188ed86a9cf082fd2f757d4dd9b54741f24 Author: Peter Zijlstra Date: Tue Aug 29 15:07:54 2017 +0200 sched/idle: Move quiet_vmstate() into the NOHZ code quiet_vmstat() is an expensive function that only makes sense when we go into NOHZ. Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: aubrey.li@linux.intel.com Cc: cl@linux.com Cc: fweisbec@gmail.com Signed-off-by: Ingo Molnar kernel/sched/idle.c | 1 - kernel/time/tick-sched.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) commit b670908384bda92c42076cf36614ee4f97763253 Author: Lucas Stach Date: Thu Sep 7 17:06:28 2017 +0200 drm/etnaviv: remove IOMMU dependency Using the IOMMU API to manage the internal GPU MMU has been an historical accident and it keeps getting in the way, as well as entangling the driver with the inner workings of the IOMMU subsystem. Clean this up by removing the usage of iommu_domain, which is the last piece linking etnaviv to the IOMMU subsystem. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/Kconfig | 2 - drivers/gpu/drm/etnaviv/etnaviv_drv.h | 1 - drivers/gpu/drm/etnaviv/etnaviv_iommu.c | 138 ++++++++++++++--------------- drivers/gpu/drm/etnaviv/etnaviv_iommu.h | 7 +- drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c | 106 +++++++++++----------- drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 33 +++---- drivers/gpu/drm/etnaviv/etnaviv_mmu.h | 28 ++++-- 7 files changed, 158 insertions(+), 157 deletions(-) commit 27d38062a20326a7b86d1f3ebba42c2a37d8415d Author: Lucas Stach Date: Thu Sep 7 17:06:28 2017 +0200 drm/etnaviv: mmu: mark local functions static And clean up the header file a bit. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Reviewed-By: Wladimir J. van der Laan drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 8 ++++---- drivers/gpu/drm/etnaviv/etnaviv_mmu.h | 8 +------- 2 files changed, 5 insertions(+), 11 deletions(-) commit 50073cf98d16354b2426f6c712c7b2cb0df2871b Author: Lucas Stach Date: Thu Sep 7 16:52:13 2017 +0200 drm/etnaviv: mmu: stop using iommu map/unmap functions This is a preparation to remove the etnaviv dependency on the IOMMU subsystem by importing the relevant parts of the iommu map/unamp functions into the driver. Signed-off-by: Lucas Stach Reviewed-By: Wladimir J. van der Laan drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 74 +++++++++++++++++++++++++++++------ drivers/gpu/drm/etnaviv/etnaviv_mmu.h | 2 +- 2 files changed, 62 insertions(+), 14 deletions(-) commit 86666c54c801da7860f9d273b5e6fc30e210e219 Author: Lucas Stach Date: Thu Sep 7 15:41:38 2017 +0200 drm/etnaviv: iommuv1: remove map_lock It wasn't protecting anything, as the single word writes used to set up or tear down a translation are already inherently atomic, so the spinlock is pure overhead. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Reviewed-By: Wladimir J. van der Laan drivers/gpu/drm/etnaviv/etnaviv_iommu.c | 7 ------- 1 file changed, 7 deletions(-) commit bd2442bc1b4ef3f27dda28edeeb85a8603115a21 Author: Lucas Stach Date: Thu Sep 7 15:56:01 2017 +0200 drm/etnaviv: iommuv1: fold pgtable_write into callers A function doing a single assignment is not really helping the code flow. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Reviewed-By: Wladimir J. van der Laan drivers/gpu/drm/etnaviv/etnaviv_iommu.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 1a540490e919bd64a9be35fca5147bbb7b2ac166 Author: Lucas Stach Date: Thu Sep 7 15:36:57 2017 +0200 drm/etnaviv: iommuv1: fold pagetable alloc and free into caller Those functions are simple enough to fold them into the calling function. This also fixes a correctness issue, as the alloc/free functions didn't specifiy the device the memory was allocated for. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Reviewed-By: Wladimir J. van der Laan drivers/gpu/drm/etnaviv/etnaviv_iommu.c | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) commit 87ceb3756030d284c1e8424877a34b5452906549 Author: Lucas Stach Date: Thu Sep 7 15:27:00 2017 +0200 drm/etnaviv: remove iova_to_phys iommu ops They are not used in any way, so can go away. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Reviewed-By: Wladimir J. van der Laan drivers/gpu/drm/etnaviv/etnaviv_iommu.c | 21 --------------------- drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c | 14 -------------- 2 files changed, 35 deletions(-) commit 3bc3e0ecef69bf8061f89b6f2971ca9d88c669ea Author: Lucas Stach Date: Thu Sep 7 15:22:22 2017 +0200 drm/etnaviv: remove iommu fault handler The handler has never been used, so it's really just dead code. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Reviewed-By: Wladimir J. van der Laan drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 9 --------- 1 file changed, 9 deletions(-) commit d5532f65e0465af2361c8beefe6ed396025316a3 Author: benjamin.gaignard@linaro.org Date: Mon Oct 2 11:34:48 2017 +0200 drm/bridge/synopsys: dsi :remove is_panel_bridge When using drm_of_panel_bridge_remove() we can simplify the code and remove is_panel_bridge from dw_mipi_dsi structure. Signed-off-by: Benjamin Gaignard Reviewed-by: Philippe Cornu Tested-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/1506936888-23844-6-git-send-email-benjamin.gaignard@linaro.org drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 8f6b06c11ca4ff0160df54b53299bf94bfd05645 Author: benjamin.gaignard@linaro.org Date: Mon Oct 2 11:34:47 2017 +0200 drm/vc4: remove bridge from driver internal structure With a call to drm_of_panel_bridge_remove() we could remove the bridge without store it in vc4_dpi internal driver structure. Signed-off-by: Benjamin Gaignard Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1506936888-23844-5-git-send-email-benjamin.gaignard@linaro.org drivers/gpu/drm/vc4/vc4_dpi.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 08de7afa3a6a8b36015648e3a015ceb60e499f26 Author: benjamin.gaignard@linaro.org Date: Mon Oct 2 11:34:46 2017 +0200 drm/stm: ltdc: remove bridge from driver internal structure With a call to drm_of_panel_bridge_remove() we could remove the bridge without store it in ldtc internal driver structure. Signed-off-by: Benjamin Gaignard Reviewed-by: Philippe Cornu Tested-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/1506936888-23844-4-git-send-email-benjamin.gaignard@linaro.org drivers/gpu/drm/stm/ltdc.c | 16 +++++----------- drivers/gpu/drm/stm/ltdc.h | 2 -- 2 files changed, 5 insertions(+), 13 deletions(-) commit c70087e8f16f1dfe703d223aadd95ede1cde8e30 Author: benjamin.gaignard@linaro.org Date: Mon Oct 2 11:34:45 2017 +0200 drm/drm_of: add drm_of_panel_bridge_remove function This function is the pendant of drm_of_find_panel_or_bridge() to remove a previously allocated panel_bridge. Given a specific port and endpoint it remove the panel bridge. Since drm_panel_bridge_remove() will check that bridge parameter is not NULL and is a real drm_panel_bridge and no a simple bridge it is safe to call it directly. Signed-off-by: Benjamin Gaignard Reviewed-by: Philippe Cornu Tested-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/1506936888-23844-3-git-send-email-benjamin.gaignard@linaro.org drivers/gpu/drm/drm_of.c | 33 +++++++++++++++++++++++++++++++++ include/drm/drm_of.h | 8 ++++++++ 2 files changed, 41 insertions(+) commit 6b0e284cfa3898109f9f4c9fa6541caa027a3635 Author: benjamin.gaignard@linaro.org Date: Mon Oct 2 11:32:31 2017 +0200 drm/bridge: make drm_panel_bridge_remove more robust Make sure that bridge parameter is not NULL and can be safely cast into a panel_bridge structure. Signed-off-by: Benjamin Gaignard Reviewed-by: Philippe Cornu Tested-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/1506936755-23625-2-git-send-email-benjamin.gaignard@linaro.org drivers/gpu/drm/bridge/panel.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 151aeab77738469ddbf0f9532e2fddd0d231aa2b Merge: 17de4ee 024c9d2 Author: Ingo Molnar Date: Tue Oct 10 11:30:59 2017 +0200 Merge branch 'sched/urgent' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit c42c5ac4269bf8c0aa7ef2f4bdf328a12b03f65f Author: Arnd Bergmann Date: Tue Oct 10 11:20:11 2017 +0200 ASoC: dapm: mark 'snd_soc_dapm_free_kcontrol' as static The newly introduced function is declared as globally visible, but is not declared in a header, causing a warning 'make W=1' or 'make C=1': sound/soc/soc-dapm.c:3782:1: warning: symbol 'snd_soc_dapm_free_kcontrol' was not declared. Should it be static? The suggestion to make it static seems appropriate here, so let's do that. Fixes: 19ad683abc85 ("ASoC: dapm: Avoid creating kcontrol for params") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 667ebc97c99a2ea9279bf3fdd791d97adfafbbc2 Author: Arnd Bergmann Date: Tue Oct 10 11:20:10 2017 +0200 ASoC: dapm: add initialization for w_param_text pointer We now allocate the array conditionally, but we always pass the pointer to the new snd_soc_dapm_free_kcontrol() function, which introduces a warning for the case that it is not initialized: sound/soc/soc-dapm.c: In function 'snd_soc_dapm_new_pcm': sound/soc/soc-dapm.c:3940:2: error: 'w_param_text' may be used uninitialized in this function [-Werror=maybe-uninitialized] As snd_soc_dapm_free_kcontrol() is global, it doesn't get inlined and gcc fails to notice that we don't actually access the array in that case, so the code is actually safe. Adding an initialization for the array pointer shuts up the warning. Fixes: 19ad683abc85 ("ASoC: dapm: Avoid creating kcontrol for params") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 2 ++ 1 file changed, 2 insertions(+) commit 08e61d03b08c99f611227c6e94c70cf0029fdeb6 Author: Kuninori Morimoto Date: Mon Oct 2 05:10:33 2017 +0000 ASoC: soc-core: remove unnecessary message from snd_soc_register_component() No need to print an error message if kzalloc fails. The core will print it. Reported-by: Daniel Baluta Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d7346278ccb0fd839240d916e45851227e7ef9f4 Merge: 7dd5d0d e0dac41 Author: Mark Brown Date: Tue Oct 10 10:23:08 2017 +0100 Merge branch 'topic/component' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-core commit e0dac41b8c21d41534b04d520c1927c2b0ac9b5e Author: Kuninori Morimoto Date: Mon Oct 2 05:10:17 2017 +0000 ASoC: soc-core: add snd_soc_add_component() ALSA SoC platform/codec will be replaced to component soon. But, some function exist in "platform" doesn't exist in "component". Current soc-core has snd_soc_register_component(), but doesn't have snd_soc_add_component() like snd_soc_add_platform(). This patch adds it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 5 +++++ sound/soc/soc-core.c | 34 +++++++++++++++++++++++----------- 2 files changed, 28 insertions(+), 11 deletions(-) commit 8f6a90421c7637984fb352da079fb13172176bfd Author: Vaibhav Jain Date: Mon Oct 9 23:26:27 2017 +0530 cxl: Rename register PSL9_FIR2 to PSL9_FIR_MASK PSL9 doesn't have a FIR2 register as was the case with PSL8. However currently the register definitions in 'cxl.h' have a definition for PSL9_FIR2 that actually points to PSL9_FIR_MASK register in the P1 area at offset 0x308. So this patch renames the def PSL9_FIR2 to PSL9_FIR_MASK and updates the references in the code to point to the new identifier. It also removes the code to dump contents of FIR2 (FIR_MASK actually) in cxl_native_irq_dump_regs_psl9(). Fixes: f24be42aab37 ("cxl: Add psl9 specific code") Reported-by: Frederic Barrat Signed-off-by: Vaibhav Jain Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 2 +- drivers/misc/cxl/debugfs.c | 3 ++- drivers/misc/cxl/native.c | 4 +--- 3 files changed, 4 insertions(+), 5 deletions(-) commit dd7aa8d4b53b3484ba31ba56f3ff1be7deb38530 Author: Maxime Chevallier Date: Tue Oct 10 10:43:18 2017 +0200 spi: a3700: Change SPI mode before asserting chip-select The spi device mode should be configured in the controller before the chip-select is asserted, so that a clock polarity configuration change is not interpreted as a clock tick by the device. This patch moves the mode setting to the 'prepare_message' function instead of the 'transfer_one' function. By doing so, this patch also removes redundant code in a3700_spi_clock_set. This was tested on EspressoBin board, with spidev. Signed-off-by: Maxime Chevallier Signed-off-by: Mark Brown drivers/spi/spi-armada-3700.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 0133c4928c689cc7069595925b294a70a3223ced Author: Heiko Stuebner Date: Tue Oct 10 11:04:33 2017 +0200 ARM: dts: rockchip: fix mali400 ppmmu interrupt names The interrupts were wrongly named as ppXmmu while the binding specifies them as ppmmuX. Fix that for the recently added Utgard mali nodes on Rockchip socs. Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3036.dtsi | 2 +- arch/arm/boot/dts/rk3066a.dtsi | 8 ++++---- arch/arm/boot/dts/rk3188.dtsi | 8 ++++---- arch/arm/boot/dts/rk322x.dtsi | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) commit 073a435d55a62813d0a871abcb1ae904b5726098 Author: Karthik Ananthapadmanabha Date: Fri Sep 29 16:23:10 2017 +0530 mwifiex: Random MAC address during scanning Driver will advertise RANDOM_MAC support only if the device supports this feature. Signed-off-by: Karthik Ananthapadmanabha Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 10 ++++++---- drivers/net/wireless/marvell/mwifiex/fw.h | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) commit 64e79426c2041b931c053a11743277a4f7f279c4 Author: Dan Carpenter Date: Fri Sep 29 10:52:34 2017 +0300 rtlwifi: silence underflow warning My static checker complains that we have an upper bound but no lower bound. I suspect neither are really required but it doesn't hurt to add a check for negatives. Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 18a39b9ab27026b5ba55f135648635ed3a870e44 Author: Ian W MORRISON Date: Fri Oct 6 18:34:18 2017 +1100 Bluetooth: btbcm: Add support for MINIX Z83-4 based devices The MINIX NEO Z83-4 and MINIX NEO Z83-4 Pro devices use an AP6255 chip for wifi and bluetooth. Bluetooth requires an ACPI device id of BCM2EA4 with BCM4345 rev C0 firmware. This patch defines the firmware subversion. Signed-off-by: Ian W MORRISON Signed-off-by: Marcel Holtmann drivers/bluetooth/btbcm.c | 1 + 1 file changed, 1 insertion(+) commit 1bdb68b2e841a94b4331046ad6a55e94f214dbbf Author: Ian W MORRISON Date: Sat Oct 7 17:15:25 2017 +1100 Bluetooth: hci_bcm: Add support for MINIX Z83-4 based devices The MINIX NEO Z83-4 and MINIX NEO Z83-4 Pro devices use an AP6255 chip for wifi and bluetooth. Bluetooth requires an ACPI device id of BCM2EA4 with BCM4345 rev C0 firmware. This patch adds the device id and to use trigger type IRQF_TRIGGER_FALLING as defined by 'GpioInt' in the ACPI DSDT table: Device (BLT0) { Name (_HID, "BCM2EA4") // _HID: Hardware ID Method (_STA, 0, NotSerialized) // _STA: Status { Return (0x0F) } Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings { Name (UBUF, ResourceTemplate () { UartSerialBusV2 (0x0001C200, DataBitsEight, StopBitsOne, 0xFC, LittleEndian, ParityTypeNone, FlowControlHardware, 0x0020, 0x0020, "\\_SB.PCI0.URT1", 0x00, ResourceConsumer, , Exclusive, ) GpioInt (Level, ActiveLow, Exclusive, PullNone, 0x0000, "\\_SB.GPO1", 0x00, ResourceConsumer, , ) { // Pin list 0x0005 } GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly, "\\_SB.GPO1", 0x00, ResourceConsumer, , ) { // Pin list 0x0007 } GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly, "\\_SB.GPO1", 0x00, ResourceConsumer, , ) { // Pin list 0x0004 } }) Return (UBUF) /* \_SB_.PCI0.URT1.BLT0._CRS.UBUF */ } } Signed-off-by: Ian W MORRISON Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit fc09785de0a364427a5df63d703bae9a306ed116 Author: Andrey Konovalov Date: Tue Sep 26 17:11:33 2017 +0200 p54: don't unregister leds when they are not initialized ieee80211_register_hw() in p54_register_common() may fail and leds won't get initialized. Currently p54_unregister_common() doesn't check that and always calls p54_unregister_leds(). The fix is to check priv->registered flag before calling p54_unregister_leds(). Found by syzkaller. INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 1 PID: 1404 Comm: kworker/1:1 Not tainted 4.14.0-rc1-42251-gebb2c2437d80-dirty #205 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:16 dump_stack+0x292/0x395 lib/dump_stack.c:52 register_lock_class+0x6c4/0x1a00 kernel/locking/lockdep.c:769 __lock_acquire+0x27e/0x4550 kernel/locking/lockdep.c:3385 lock_acquire+0x259/0x620 kernel/locking/lockdep.c:4002 flush_work+0xf0/0x8c0 kernel/workqueue.c:2886 __cancel_work_timer+0x51d/0x870 kernel/workqueue.c:2961 cancel_delayed_work_sync+0x1f/0x30 kernel/workqueue.c:3081 p54_unregister_leds+0x6c/0xc0 drivers/net/wireless/intersil/p54/led.c:160 p54_unregister_common+0x3d/0xb0 drivers/net/wireless/intersil/p54/main.c:856 p54u_disconnect+0x86/0x120 drivers/net/wireless/intersil/p54/p54usb.c:1073 usb_unbind_interface+0x21c/0xa90 drivers/usb/core/driver.c:423 __device_release_driver drivers/base/dd.c:861 device_release_driver_internal+0x4f4/0x5c0 drivers/base/dd.c:893 device_release_driver+0x1e/0x30 drivers/base/dd.c:918 bus_remove_device+0x2f4/0x4b0 drivers/base/bus.c:565 device_del+0x5c4/0xab0 drivers/base/core.c:1985 usb_disable_device+0x1e9/0x680 drivers/usb/core/message.c:1170 usb_disconnect+0x260/0x7a0 drivers/usb/core/hub.c:2124 hub_port_connect drivers/usb/core/hub.c:4754 hub_port_connect_change drivers/usb/core/hub.c:5009 port_event drivers/usb/core/hub.c:5115 hub_event+0x1318/0x3740 drivers/usb/core/hub.c:5195 process_one_work+0xc7f/0x1db0 kernel/workqueue.c:2119 process_scheduled_works kernel/workqueue.c:2179 worker_thread+0xb2b/0x1850 kernel/workqueue.c:2255 kthread+0x3a1/0x470 kernel/kthread.c:231 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431 Cc: stable@vger.kernel.org Signed-off-by: Andrey Konovalov Acked-by: Christian Lamparter Signed-off-by: Kalle Valo drivers/net/wireless/intersil/p54/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4294625e029028854596865be401b9c5c1f906ef Author: Johan Hovold Date: Tue Oct 10 10:01:52 2017 +0200 Bluetooth: avoid silent hci_bcm ACPI PM regression The hci_bcm platform-device hack which was used to implement power management for ACPI devices is being replaced by a serial-device-bus implementation. Unfortunately, when the corresponding change to the ACPI code lands (a change that will stop enumerating and registering the serial-device-node child as a platform device) PM will break silently unless serdev TTY-port controller support has been enabled. Specifically, hciattach (btattach) would still succeed, but power management would no longer work. Although this is strictly a runtime dependency, let's make the driver depend on SERIAL_DEV_CTRL_TTYPORT, which is the particular serdev controller implementation used by the ACPI devices currently managed by this driver, to avoid breaking PM without anyone noticing. Note that the driver already has a (build-time) dependency on the serdev bus code. Signed-off-by: Johan Hovold Signed-off-by: Marcel Holtmann drivers/bluetooth/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 38525608952ae5793a58c1ef4e447f45593d2ee1 Author: Sergei Shtylyov Date: Fri Sep 15 22:43:26 2017 +0300 arm64: dts: renesas: eagle: add EtherAVB support Define the Eagle board dependent part of the EtherAVB device node. Enable DHCP and NFS root for the kernel booting. Based on the original (and large) patch by Vladimir Barinov. Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970-eagle.dts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit eb5a5078358771ae24b82acd772dfd5ae52fcd34 Author: Geert Uytterhoeven Date: Fri Oct 6 14:05:53 2017 +0200 arm64: dts: r8a77995: Add INTC-EX device node Add a device node for the Interrupt Controller for External Devices (INTC-EX) on R-Car D3, which serves external IRQ pins IRQ[0-5]. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c6a7fd98966015df742fe15d5a01827262f4fc41 Author: Geert Uytterhoeven Date: Fri Oct 6 14:05:52 2017 +0200 arm64: dts: r8a77970: Add INTC-EX device node Add a device node for the Interrupt Controller for External Devices (INTC-EX) on R-Car V3M, which serves external IRQ pins IRQ[0-5]. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit fdceea3c2ade76d929725fdd6211feb52bdf705a Author: Geert Uytterhoeven Date: Fri Oct 6 14:05:51 2017 +0200 arm64: dts: r8a7796: Add INTC-EX device node Add a device node for the Interrupt Controller for External Devices (INTC-EX) on R-Car M3-W, which serves external IRQ pins IRQ[0-5]. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 4339306acef642af151ae9c7ec4c39d0cae28497 Author: Vladimir Barinov Date: Thu Sep 7 01:37:24 2017 +0300 arm64: dts: ulcb-kf: hog USB3 hub control gpios This adds gpio hogs for USB3 hub on ULCB Kingfisher board to power up and remove from reset the hub Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 6d5fcdd39f413d0dae466c9f18e6ecd2b6b68362 Author: Vladimir Barinov Date: Thu Sep 14 17:19:48 2017 +0300 arm64: dts: ulcb-kf: enable PCA9548 on I2C4 This supports PCA9548 I2C switch on I2C4 bus on ULCB Kingfisher board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit c6f9cbe364322ac168d8299f49cb54c6143f8e07 Author: Vladimir Barinov Date: Thu Sep 14 17:19:34 2017 +0300 arm64: dts: ulcb-kf: enable PCA9548 on I2C2 This supports PCA9548 I2C switch on I2C2 bus on ULCB Kingfisher board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0f9c47b2446beb4ea90ba90870cbe72b6419d03b Author: Vladimir Barinov Date: Fri Oct 6 05:44:11 2017 +0300 arm64: dts: ulcb-kf: enable TCA9539 on I2C4 This supports TCA9539 gpio expanders on I2C4 bus on ULCB Kingfisher board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 1189d1d4e3f97775e4e51571aa1dfbc33e0638bb Author: Vladimir Barinov Date: Fri Oct 6 05:44:05 2017 +0300 arm64: dts: ulcb-kf: enable TCA9539 on I2C2 This supports TCA9539 gpio expanders on I2C2 bus on ULCB Kingfisher board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit af75811605f6358dd6c6f34043d3826a31a57e60 Author: Vladimir Barinov Date: Thu Sep 7 01:36:48 2017 +0300 arm64: dts: ulcb-kf: enable USB3.0 Host This supports USB3.0 Host on ULCB Kingfisher board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit e0304a365bf07b4a0bb2d56ece5b52f3347d5a01 Author: Vladimir Barinov Date: Fri Oct 6 05:43:59 2017 +0300 arm64: dts: ulcb-kf: enable PCIE0/1 This supports PCIE0/1 on ULCB Kingfisher board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 36bd8e3e34f2cd0b9a074df22327719d8d34b3a5 Author: Vladimir Barinov Date: Thu Sep 7 01:36:32 2017 +0300 arm64: dts: ulcb-kf: enable USB2.0 Host channel 0 This supports USB2.0 Host channel 0 on ULCB Kingfisher board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit da9c3629085000730fdbc02fd533efb26fcf6382 Author: Vladimir Barinov Date: Thu Sep 7 01:36:25 2017 +0300 arm64: dts: ulcb-kf: enable HSUSB This supports HSUSB on ULCB Kingfisher board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit ba915c12fa1f8a8b9c4b875199b489936ddeccac Author: Vladimir Barinov Date: Thu Sep 14 17:19:13 2017 +0300 arm64: dts: ulcb-kf: enable CAN0/1 This supports CAN0/1 on ULCB Kingfisher board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit c6c816e22bc89ea4ebfcf04772b4623b573dadc7 Author: Vladimir Barinov Date: Fri Oct 6 05:43:51 2017 +0300 arm64: dts: ulcb-kf: enable SCIF1 This supports SCIF1 on ULCB Kingfisher board Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 20913f7e923ca87921f9ef9ee3dea65de0bc6a18 Author: Vladimir Barinov Date: Thu Sep 14 17:19:06 2017 +0300 arm64: dts: h3ulcb-kf: ES2.0+ SoC initial device tree Add the initial device tree for the H3ULCB ES2.0+ SoC with Kingfisher extension infotainment board. Signed-off-by: Vladimir Barinov Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/Makefile | 1 + arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-kf.dts | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) commit d90e97dfe16610542bb83590a81081a47018ba89 Author: Vladimir Barinov Date: Thu Sep 14 17:18:58 2017 +0300 arm64: dts: h3ulcb-kf: ES1.x SoC initial device tree Add the initial device tree for the H3ULCB ES1.x SoC with Kingfisher extension infotainment board. Signed-off-by: Vladimir Barinov Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/Makefile | 1 + arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-kf.dts | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) commit eded6a4d16c40879540e1073581e0679e9684bdb Author: Vladimir Barinov Date: Thu Sep 14 17:18:52 2017 +0300 arm64: dts: m3ulcb-kf: initial device tree Add the initial device tree for the M3ULCB with Kingfisher extension infotainment board. Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/Makefile | 1 + arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) commit 52cb66073d4358644f6adb83221e4432decb28bf Author: Vladimir Barinov Date: Fri Oct 6 20:55:56 2017 +0300 arm64: dts: ulcb-kf: initial device tree Add the initial common dtsi file for Kingfisher infotainment board (R-Car Starter Kit extension) This commit supports the following peripherals: - HSCIF0 Signed-off-by: Vladimir Barinov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit b35334447513c14a4dd55a67c269a743d4a4824b Author: Yoshihiro Shimoda Date: Wed Oct 4 19:27:31 2017 +0900 arm64: dts: renesas: r8a77995: draak: enable PWM channel 0 and 1 This patch enables PWM channel 0 and 1 on the draak. Each channel connects to LTC2644 for brightness control. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit d40a434746bf2d6dbcc01bb1a14575c11e933cc3 Author: Yoshihiro Shimoda Date: Wed Oct 4 19:27:30 2017 +0900 arm64: dts: renesas: r8a77995: add PWM device nodes This patch adds PWM device nodes for r8a77995. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995.dtsi | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 73de4b8847892fa7d6fffd14139c5083a3fd1580 Author: Yoshihiro Shimoda Date: Tue Oct 3 17:01:12 2017 +0900 arm64: dts: renesas: salvator-common: add pfc node for USB3.0 channel 0 Since a R-Car Gen3 bootloader enables the PFC of USB3.0 channel 0, the USB3.0 host controller works without this setting on the kernel. But, this setting should have salvator-common.dtsi. So, this patch adds the pfc node for USB3.0 channel 0. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/salvator-common.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0ead5f81d4200b63cf92be867bfbd6708056e4a8 Author: Jani Nikula Date: Thu Sep 28 11:22:04 2017 +0300 drm/i915/bios: don't pass bdb to parsers that don't parse VBT directly Hint that you're not supposed to look at VBT in these functions. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/b82c326be8c796a70bdc2bd1c479bbb6159f5cb0.1506586821.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 0ebdabe6126498f06cd1885dfbf658c46317041f Author: Jani Nikula Date: Thu Sep 28 11:22:03 2017 +0300 drm/i915/bios: parse SDVO device mapping from pre-parsed child devices We parse and store the child devices in parse_general_definitions(). There is no need to parse the VBT block again for SDVO device mapping. Do the same as we do in parse_ddi_ports(). We no longer have access to child device size at this stage, but we also don't need to worry about reading past the child device anymore. Instead of a child device size check, do a mild optimization by limiting the parsing to gens 3 through 7. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/c918d4173dd38a165295f1270cb16c2c01bd8cd1.1506586821.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 39 ++++++++++++--------------------------- 1 file changed, 12 insertions(+), 27 deletions(-) commit b3ca1f43b285dd74daa8ef87cce41bc50434a865 Author: Jani Nikula Date: Thu Sep 28 11:22:02 2017 +0300 drm/i915/bios: merge parse_device_mapping() into parse_general_definitions() They're both parsing the same block, and there's no need for them to be split. The former also benefits from the range checks in the latter. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/64a292606ecbb0b8602e6c5523c5746573ec3944.1506586821.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 48 +++++++++++++-------------------------- 1 file changed, 16 insertions(+), 32 deletions(-) commit 53f6b2436e7ba3d5f9b3b6b2d2b42089d64690e8 Author: Jani Nikula Date: Thu Sep 28 11:22:01 2017 +0300 drm/i915/bios: cleanup comments and useless return Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/4a95fb9d23d980830e3158d3c57258e6539965ce.1506586821.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 127704f5475a1913c284efa08376ec89ec513789 Author: Jani Nikula Date: Thu Sep 28 11:22:00 2017 +0300 drm/i915/bios: remove an unnecessary temp variable Prepare for merging parse_device_mapping() into parse_general_definitions(). No functional changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/f1c3621e2622f4debdfb4a2f5c1959845754ac04.1506586821.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 2d936f1cf78fe84c05642545abe052488e7adad4 Author: Jani Nikula Date: Thu Sep 28 11:21:59 2017 +0300 drm/i915/bios: don't initialize fields based on vbt version In theory, these might clobber information for older VBT versions. We might have to store the BDB version for later parsing, but currently all code accessing these fields will only use them on newer platforms with new enough BDB versions. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/0232d9cb258e8f83c4180cdb8aad1459a312ec2a.1506586821.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 13 ------------- 1 file changed, 13 deletions(-) commit a87145ca56d14fc4b0bce68c18a5fecb01a09540 Author: Jani Nikula Date: Thu Sep 28 11:21:58 2017 +0300 drm/i915/bios: refactor parse general definitions Early return on failures. Rename the variable for later merging with parse_device_mappings(). Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/785abb904a572752fec68d90d34efeb67774dc1f.1506586821.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) commit 348e4058ebf53904e817eec7a1b25327143c2ed2 Author: Jani Nikula Date: Thu Sep 28 11:21:57 2017 +0300 drm/i915/bios: parse DDI ports also for CHV for HDMI DDC pin and DP AUX channel While technically CHV isn't DDI, we do look at the VBT based DDI port info for HDMI DDC pin and DP AUX channel. (We call these "alternate", but they're really just something that aren't platform defaults.) In commit e4ab73a13291 ("drm/i915: Respect alternate_ddc_pin for all DDI ports") Ville writes, "IIRC there may be CHV system that might actually need this." I'm not sure why there couldn't be even more platforms that need this, but start conservative, and parse the info for CHV in addition to DDI. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100553 Reported-by: Marek Wilczewski Cc: stable@vger.kernel.org Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/d0815082cb98487618429b62414854137049b888.1506586821.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60942e674e9d3400722d09b11ba0119ca707a1f0 Author: Colin Ian King Date: Wed Oct 4 15:40:43 2017 -0700 Input: synaptics-rmi4 - make array rmi_f54_report_type_names static The array rmi_f54_report_type_names is local to the source and does not need to be in global scope, so make it static. Also make the array const char * const. Cleans up sparse warning: symbol 'rmi_f54_report_type_names' was not declared. Should it be static? Signed-off-by: Colin Ian King Reviewed-by: Guenter Roeck Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f54.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 812b5ca7d376e7e008ac0c897d1ef94eb05ddc3b Author: Bernd Edlinger Date: Sun Oct 8 13:40:08 2017 +0000 Add a driver for Renesas uPD60620 and uPD60620A PHYs Signed-off-by: Bernd Edlinger Signed-off-by: David S. Miller drivers/net/phy/Kconfig | 5 +++ drivers/net/phy/Makefile | 1 + drivers/net/phy/uPD60620.c | 109 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+) commit 1e6f74536de08b5e50cf0e37e735911c2cef7c62 Author: Willem de Bruijn Date: Fri Oct 6 13:22:31 2017 -0400 vhost_net: do not stall on zerocopy depletion Vhost-net has a hard limit on the number of zerocopy skbs in flight. When reached, transmission stalls. Stalls cause latency, as well as head-of-line blocking of other flows that do not use zerocopy. Instead of stalling, revert to copy-based transmission. Tested by sending two udp flows from guest to host, one with payload of VHOST_GOODCOPY_LEN, the other too small for zerocopy (1B). The large flow is redirected to a netem instance with 1MBps rate limit and deep 1000 entry queue. modprobe ifb ip link set dev ifb0 up tc qdisc add dev ifb0 root netem limit 1000 rate 1MBit tc qdisc add dev tap0 ingress tc filter add dev tap0 parent ffff: protocol ip \ u32 match ip dport 8000 0xffff \ action mirred egress redirect dev ifb0 Before the delay, both flows process around 80K pps. With the delay, before this patch, both process around 400. After this patch, the large flow is still rate limited, while the small reverts to its original rate. See also discussion in the first link, below. Without rate limiting, {1, 10, 100}x TCP_STREAM tests continued to send at 100% zerocopy. The limit in vhost_exceeds_maxpend must be carefully chosen. With vq->num >> 1, the flows remain correlated. This value happens to correspond to VHOST_MAX_PENDING for vq->num == 256. Allow smaller fractions and ensure correctness also for much smaller values of vq->num, by testing the min() of both explicitly. See also the discussion in the second link below. Changes v1 -> v2 - replaced min with typed min_t - avoid unnecessary whitespace change Link:http://lkml.kernel.org/r/CAF=yD-+Wk9sc9dXMUq1+x_hh=3ThTXa6BnZkygP3tgVpjbp93g@mail.gmail.com Link:http://lkml.kernel.org/r/20170819064129.27272-1-den@klaipeden.com Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller drivers/vhost/net.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit ceaa001a170e43608854d5290a48064f57b565ed Author: William Tu Date: Wed Oct 4 17:03:12 2017 -0700 openvswitch: Add erspan tunnel support. Add erspan netlink interface for OVS. Signed-off-by: William Tu Cc: Pravin B Shelar Signed-off-by: David S. Miller include/uapi/linux/openvswitch.h | 1 + net/openvswitch/flow_netlink.c | 51 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) commit cf4c950b87ee2f547ad3abd3aca6ae3f3eb3443f Author: Eric Biggers Date: Mon Oct 9 14:30:52 2017 -0700 once: switch to new jump label API Switch the DO_ONCE() macro from the deprecated jump label API to the new one. The new one is more readable, and for DO_ONCE() it also makes the generated code more icache-friendly: now the one-time initialization code is placed out-of-line at the jump target, rather than at the inline fallthrough case. Acked-by: Hannes Frederic Sowa Signed-off-by: Eric Biggers Signed-off-by: David S. Miller include/linux/once.h | 6 +++--- lib/once.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) commit d93fa2ba64384a0bbee4ae7409d85fccb2cfcf14 Merge: d0e6020 529a86e Author: David S. Miller Date: Mon Oct 9 20:11:09 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit d0e60206bea2dec46c0a28fd6b116646aa67c5ae Author: Wei Wang Date: Mon Oct 9 17:17:26 2017 -0700 ipv6: use rcu_dereference_bh() in ipv6_route_seq_next() This patch replaces rcu_deference() with rcu_dereference_bh() in ipv6_route_seq_next() to avoid the following warning: [ 19.431685] WARNING: suspicious RCU usage [ 19.433451] 4.14.0-rc3-00914-g66f5d6c #118 Not tainted [ 19.435509] ----------------------------- [ 19.437267] net/ipv6/ip6_fib.c:2259 suspicious rcu_dereference_check() usage! [ 19.440790] [ 19.440790] other info that might help us debug this: [ 19.440790] [ 19.444734] [ 19.444734] rcu_scheduler_active = 2, debug_locks = 1 [ 19.447757] 2 locks held by odhcpd/3720: [ 19.449480] #0: (&p->lock){+.+.}, at: [] seq_read+0x3c/0x333 [ 19.452720] #1: (rcu_read_lock_bh){....}, at: [] ipv6_route_seq_start+0x5/0xfd [ 19.456323] [ 19.456323] stack backtrace: [ 19.458812] CPU: 0 PID: 3720 Comm: odhcpd Not tainted 4.14.0-rc3-00914-g66f5d6c #118 [ 19.462042] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 [ 19.465414] Call Trace: [ 19.466788] dump_stack+0x86/0xc0 [ 19.468358] lockdep_rcu_suspicious+0xea/0xf3 [ 19.470183] ipv6_route_seq_next+0x71/0x164 [ 19.471963] seq_read+0x244/0x333 [ 19.473522] proc_reg_read+0x48/0x67 [ 19.475152] ? proc_reg_write+0x67/0x67 [ 19.476862] __vfs_read+0x26/0x10b [ 19.478463] ? __might_fault+0x37/0x84 [ 19.480148] vfs_read+0xba/0x146 [ 19.481690] SyS_read+0x51/0x8e [ 19.483197] do_int80_syscall_32+0x66/0x15a [ 19.484969] entry_INT80_compat+0x32/0x50 [ 19.486707] RIP: 0023:0xf7f0be8e [ 19.488244] RSP: 002b:00000000ffa75d04 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 [ 19.491431] RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 0000000008056068 [ 19.493886] RDX: 0000000000001000 RSI: 0000000008056008 RDI: 0000000000001000 [ 19.496331] RBP: 00000000000001ff R08: 0000000000000000 R09: 0000000000000000 [ 19.498768] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 19.501217] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Fixes: 66f5d6ce53e6 ("ipv6: replace rwlock with rcu and spinlock in fib6_table") Reported-by: Xiaolong Ye Signed-off-by: Wei Wang Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8055af0a4fddb45a8cd925fb9bc71f4b52628c9a Author: Ulf Hansson Date: Fri Oct 6 09:08:34 2017 +0200 ACPI / PM: Remove stale function header acpi_dev_pm_get_node() isn't used or implemented, so remove it. Signed-off-by: Ulf Hansson Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki include/linux/acpi.h | 5 ----- 1 file changed, 5 deletions(-) commit 9f7be893ab570e9d9b1287f99b35b30e6272efbf Merge: 0349a86 2c4d36b Author: David S. Miller Date: Mon Oct 9 18:12:03 2017 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-10-09 This series contains updates to i40e and i40evf only. Jake fixes missed flag conversion from u64 to u32. Fixes a deafult ITR value issue where the driver defaults to an ITR value of half the expected value (in terms of minimum microseconds between interrupts). So fix this by changing the default values to be calculated using the ITR_REG_TO_USEC() macro which indicates that we are converting from the register units into microseconds. Updates the drivers to bump the tail in increments of 8 and double the number of descriptors we will bundle into one tail bump when receiving. With the recent kernel support for enabling XPS and QoS at the same time, we no longer need to worry about the number of traffic classes when enabling XPS. Lihong converts the use of hash_for_each() to hash_for_each_safe() to safely remove a hash entry. Adds a check for the return value for find_first_bit() in the case that it returns the size passed to search. Alan fixes a bug in which filters are erroneously removed if they are removed and then added again. So make sure that when adding a filter, if we find it already existed in our list, make sure it is not marked to be removed. Jayaprakash adds the retrying of PHY reads when the I2C is busy for a maximum period of 500ms. Rami fixes code comment typo. Stefano Brivio simplifies the code by removing the use of a local return code variable and simply return the results of the read function. ==================== Signed-off-by: David S. Miller commit 2c1f4f125159f10521944cea23e33a00fcf85ede Author: Masahiro Yamada Date: Wed Oct 4 12:56:06 2017 +0900 kbuild: re-order the code to not parse unnecessary variables The top Makefile is divided into some sections such as mixed targets, config targets, build targets, etc. When we build mixed targets, Kbuild just invokes submake to process them one by one. In this case, compiler-related variables like CC, KBUILD_CFLAGS, etc. are unneeded. Check what kind of targets we are building first, and parse variables for building only when necessary. Signed-off-by: Masahiro Yamada Makefile | 233 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 118 insertions(+), 115 deletions(-) commit ba634eceb535d95e87ef09caae7814b3687c6036 Author: Masahiro Yamada Date: Wed Oct 4 12:56:05 2017 +0900 kbuild: move "_all" target out of $(KBUILD_SRC) conditional The first "_all" occurrence around line 120 is only visible when KBUILD_SRC is unset. If O=... is specified, the working directory is relocated, then the only second occurrence around line 193 is visible, that is not set to PHONY. Move the first one to an always visible place. This clarifies "_all" is our default target and it is always set to PHONY. Signed-off-by: Masahiro Yamada Reviewed-by: Douglas Anderson Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9d022c540606a5a8ae5d1cc02fc12de362ba4585 Author: Masahiro Yamada Date: Wed Oct 4 12:56:04 2017 +0900 kbuild: replace $(hdr-arch) with $(SRCARCH) Since commit 5e53879008b9 ("sparc,sparc64: unify Makefile"), hdr-arch and SRCARCH always match. Signed-off-by: Masahiro Yamada Reviewed-by: Douglas Anderson Makefile | 21 +++++++++------------ scripts/Makefile.headersinst | 2 +- 2 files changed, 10 insertions(+), 13 deletions(-) commit 19f3f22aade704f9ce82a55c853381e672629a1d Author: Ard Biesheuvel Date: Fri Oct 6 17:39:19 2017 +0100 dt-bindings: PCI: designware: Add binding for Designware PCIe in ECAM mode Describe the binding for firmware-configured instances of the Synopsys DesignWare PCIe controller in RC mode, that are almost but not quite ECAM compliant. Signed-off-by: Ard Biesheuvel Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring .../bindings/pci/designware-pcie-ecam.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 0349a86c858203eb2daadaf8af8351247bbf4fe8 Merge: 2e997d8 b64666a Author: David S. Miller Date: Mon Oct 9 16:38:52 2017 -0700 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2017-10-09 This series contains updates to ixgbe only. Emil fixes an issue where the semaphore bits could be stuck after a reset or a crash, by adding the clearing of software resource bits in the software/firmware synchronization register. Added error checks when we attempt to identify and initialize the PHY to prevent a crash. Fixed a few issues in the logic of ixgbe_clean_test_rings() which was exposed by a previous commit that was causing a crash in ethtool diagnostics. Bhumika Goyal fixes a couple of instances which were overlooked when we made ixgbe_mac_operations constant. Shannon Nelson fixes an issue to restore normal operations after the last MACVLAN offload is removed, otherwise we get stuck in a single queue operations. The infamous Jesper Dangaard Brouer adds a counter which counts the number of times the recycle fails and the real page allocator is invoked. Alex updates the adaptive ITR algorithm to better support the needs of the network. This attempt to make it so that our ITR algorithm will try to prevent either starving a socket buffer for memory in the case of transmit, or overrunning an receive socket buffer on receive. We should function better with new features like XDP which can handle small packets at high rates without needing to lock us into NAPI polling mode. ==================== Signed-off-by: David S. Miller commit 2c4d36b7087538704fc9e3464d185dcc4d04e863 Author: Stefano Brivio Date: Wed Sep 6 10:11:39 2017 +0200 i40e: Avoid some useless variables and initializers in NVM functions Fixes: 09f79fd49d94 ("i40e: avoid NVM acquire deadlock during NVM update") Signed-off-by: Stefano Brivio Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_nvm.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 3d7d7a86ec6ea5abaea30194eeb175e2a3d0bdc7 Author: Rami Rosen Date: Sat Sep 16 05:49:48 2017 +0300 i40e: fix a typo This patch fixes a typo in i40e_vsi_alloc_arrays() documentation. The first parameter name should be "vsi" instead of "type". Signed-off-by: Rami Rosen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bcc07f0651b3078f1c3164c710f72a558665345 Author: Lihong Yang Date: Thu Sep 7 08:05:56 2017 -0400 i40e: use a local variable instead of calculating multiple times The computed result of I40E_MAX_VSI_QP * I40E_VIRTCHNL_SUPPORTED_QTYPES is used more than three times in function i40e_config_irq_link_list. Simply declare a local variable to store it to improve readability. Signed-off-by: Lihong Yang Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit 4988410f8d3a6fa04381072e2406a1d3979ffb95 Author: Jayaprakash Shanmugam Date: Thu Sep 7 08:05:55 2017 -0400 i40e: Retry AQC GetPhyAbilities to overcome I2CRead hangs - When the I2C is busy, the PHY reads are delayed. The firmware will return EGAIN in these cases with an expectation that the SW will trigger the reads again - This patch retries the operation for a maximum period of 500ms Signed-off-by: Jayaprakash Shanmugam Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_common.c | 42 ++++++++++++++++++--------- drivers/net/ethernet/intel/i40e/i40e_type.h | 3 ++ drivers/net/ethernet/intel/i40evf/i40e_type.h | 3 ++ 3 files changed, 35 insertions(+), 13 deletions(-) commit b861fb762a26144593387b84cd078ef86d99cf6f Author: Lihong Yang Date: Thu Sep 7 08:05:54 2017 -0400 i40e: add check for return from find_first_bit call The find_first_bit function will return the size passed to search if the first set bit is not found. This patch adds the check in case that happens as the return value would be used as the index in an array and that would have caused the out-of-bounds access. Detected by CoverityScan, CID 1295969 Out-of-bounds access Signed-off-by: Lihong Yang Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6f853d4f8e93eeace504b021e05dfdbeb4d3b40f Author: Jacob Keller Date: Thu Sep 7 08:05:53 2017 -0400 i40e: allow XPS with QoS enabled Recently, the kernel gained support for enabling XPS and QoS at the same time. Thus, we no longer need to worry about the number of traffic classes when enabling XPS. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 95bc2fb4c6c7d23db6dc54a3d49bdbadb13c392b Author: Jacob Keller Date: Thu Sep 7 08:05:52 2017 -0400 i40e/i40evf: bundle more descriptors when allocating buffers Double the number of descriptors we'll bundle into one tail bump when receiving. Empirical testing has shown that we reduce CPU utilization and don't appear to reduce throughput or packet rate. 32 seems to be the sweet spot, as it's half the default polling budget, so we'd essentially reduce from 4 tail writes when polling down to 2. Increasing this up to 64 appears to have negative impacts as it may become possible that we don't bump the tail each time we get polled, which could cause a long delay between returning descriptors to the hardware. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.h | 2 +- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 11f29003d6376fb123b7c3779dba49bb56fb0815 Author: Jacob Keller Date: Thu Sep 7 08:05:51 2017 -0400 i40e/i40evf: bump tail only in multiples of 8 Hardware only fetches descriptors on cachelines of 8, essentially ignoring the lower 3 bits of the tail register. Thus, it is pointless to bump tail by an unaligned access as the hardware will ignore some of the new descriptors we allocated. Thus, it's ideal if we can ensure tail writes are always aligned to 8. At first, it seems like we'd already do this, since we allocate descriptors in batches which are a multiple of 8. Since we'd always increment by a multiple of 8, it seems like the value should always be aligned. However, this ignores allocation failures. If we fail to allocate a buffer, our tail register will become unaligned. Once it has become unaligned it will essentially be stuck unaligned until a buffer allocation happens to fail at the exact amount necessary to re-align it. We can do better, by simply rounding down the number of buffers we're about to allocate (cleaned_count) such that "next_to_clean + cleaned_count" is rounded to the nearest multiple of 8. We do this by calculating how far off that value is and subtracting it from the cleaned_count. This essentially defers allocation of buffers if they're going to be ignored by hardware anyways, and re-aligns our next_to_use and tail values after a failure to allocate a descriptor. This calculation ensures that we always align the tail writes in a way the hardware expects and don't unnecessarily allocate buffers which won't be fetched immediately. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 9 +++++++++ drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 9 +++++++++ 2 files changed, 18 insertions(+) commit b038c58bd258522d9cde6619d730ebdb1f7be198 Author: Paul E. McKenney Date: Wed Aug 30 15:33:49 2017 -0700 torture: Provide TMPDIR environment variable to specify tmpdir Both rcutorture and locktorture currently place temporary files in /tmp, in keeping with decades-long tradition. However, sometimes it is useful to specify an alternative temporary directory, for example, for space or performance reasons. This commit therefore causes the torture-test scripting to use the path specified in the TMPDIR environment variable, or to fall back to traditional /tmp if this variable is not set. Signed-off-by: Paul E. McKenney tools/testing/selftests/rcutorture/bin/config_override.sh | 2 +- tools/testing/selftests/rcutorture/bin/configcheck.sh | 2 +- tools/testing/selftests/rcutorture/bin/configinit.sh | 2 +- tools/testing/selftests/rcutorture/bin/kvm-build.sh | 2 +- tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 2 +- tools/testing/selftests/rcutorture/bin/kvm.sh | 4 ++-- tools/testing/selftests/rcutorture/bin/parse-build.sh | 2 +- tools/testing/selftests/rcutorture/bin/parse-torture.sh | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) commit 0032f4e889764d22ccccb6a15742071d6f0d1f5a Author: Paul E. McKenney Date: Wed Aug 30 10:40:17 2017 -0700 rcutorture: Dump writer stack if stalled Right now, rcutorture warns if an rcu_torture_writer() kthread stalls, but this warning is not always all that helpful. This commit therefore makes the first such warning include a stack dump. This in turn requires that sched_show_task() be exported to GPL modules, so this commit makes that change as well. Signed-off-by: Paul E. McKenney kernel/rcu/rcutorture.c | 6 ++++++ kernel/sched/core.c | 1 + 2 files changed, 7 insertions(+) commit 2b1516e55f8416acfb48d5f43d41222d180fb5a3 Author: Paul E. McKenney Date: Fri Aug 18 16:11:37 2017 -0700 rcutorture: Add interrupt-disable capability to stall-warning tests When rcutorture sees the rcutorture.stall_cpu kernel boot parameter, it loops with preemption disabled, which does in fact normally generate an RCU CPU stall warning message. However, there are test scenarios that need the stalling CPU to have interrupts disabled. This commit therefore adds an rcutorture.stall_cpu_irqsoff kernel boot parameter that causes the stalling CPU to disable interrupts. Signed-off-by: Paul E. McKenney Documentation/admin-guide/kernel-parameters.txt | 3 +++ kernel/rcu/rcutorture.c | 18 +++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) commit f22ce09157239aab08eae99c678ef664f71a9097 Author: Paul E. McKenney Date: Fri Sep 1 14:40:54 2017 -0700 rcu: Suppress RCU CPU stall warnings while dumping trace Currently, RCU emits Suppress RCU CPU stall warnings during its automatically initiated ftrace_dump() calls after detecting an error condition, which can result in excessively excessive console output and lost trace events. This commit therefore suppresses RCU CPU stall warnings across any of these ftrace_dump() calls. Signed-off-by: Paul E. McKenney kernel/rcu/rcu.h | 17 +++++++++++++++++ kernel/rcu/update.c | 1 + 2 files changed, 18 insertions(+) commit 83b6ca1fede773eebcdfb44f5a94eb410d48b886 Author: Paul E. McKenney Date: Thu Aug 31 16:47:08 2017 -0700 rcu: Turn off tracing before dumping trace Currently, RCU allows tracing to continue when it automatically does ftrace_dump() after detecting an error condition, which can result in excessively large traces and lost trace events. This commit therefore does a tracing_off() before any of these ftrace_dump() calls. Signed-off-by: Paul E. McKenney kernel/rcu/rcu.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9b9500da81502738efa1b485a8835f174ff7be6d Author: Paul E. McKenney Date: Thu Aug 17 17:05:59 2017 -0700 rcu: Make RCU CPU stall warnings check for irq-disabled CPUs One common question upon seeing an RCU CPU stall warning is "did the stalled CPUs have interrupts disabled?" However, the current stall warnings are silent on this point. This commit therefore uses irq_work to check whether stalled CPUs still respond to IPIs, and flags this state in the RCU CPU stall warning console messages. Reported-by: Steven Rostedt Signed-off-by: Paul E. McKenney kernel/rcu/tree.c | 104 +++++++++++++++++++++++++++++++++++++++++------ kernel/rcu/tree.h | 5 +++ kernel/rcu/tree_plugin.h | 7 +++- 3 files changed, 103 insertions(+), 13 deletions(-) commit f79c3ad6189624c3de0ad5521610c9e22a1c33cf Author: Paul E. McKenney Date: Wed Nov 30 06:24:30 2016 -0800 sched,rcu: Make cond_resched() provide RCU quiescent state There is some confusion as to which of cond_resched() or cond_resched_rcu_qs() should be added to long in-kernel loops. This commit therefore eliminates the decision by adding RCU quiescent states to cond_resched(). This commit also simplifies the code that used to interact with cond_resched_rcu_qs(), and that now interacts with cond_resched(), to reduce its overhead. This reduction is necessary to allow the heavier-weight cond_resched_rcu_qs() mechanism to be invoked everywhere that cond_resched() is invoked. Part of that reduction in overhead converts the jiffies_till_sched_qs kernel parameter to read-only at runtime, thus eliminating the need for bounds checking. Reported-by: Michal Hocko Signed-off-by: Paul E. McKenney Cc: Peter Zijlstra [ paulmck: Keep PREEMPT=n cond_resched a no-op, per Peter Zijlstra. ] kernel/rcu/tree.c | 25 +++++-------------------- kernel/sched/core.c | 1 + 2 files changed, 6 insertions(+), 20 deletions(-) commit 7362be9eeed01980bfa03cf49737703a0e43fe50 Author: Jacob Keller Date: Thu Sep 7 08:05:50 2017 -0400 i40e: reduce lrxqthresh from 2 to 1 The lrxq thresh value tells hardware to immediately interrupt when there are fewer than N*64 packets left in the ring. Counter intuitively, empirical testing has shown that decreasing this value from 2 to 1, and thus changing from an immediate interrupt at fewer than 128 descriptors down to 64 descriptors causes a small increase in the maximum total packets per second we can receive. This increase occurs even when we're polling with interrupts masked, as the hardware must still handle interrupts internally even if we've disabled them in software. Also reduce the value for any VFs we allocate. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7c2102e56a3f7d85b5d8f33efbd7aecc1f36fdd8 Author: Paul E. McKenney Date: Mon Sep 18 08:54:40 2017 -0700 sched: Make resched_cpu() unconditional The current implementation of synchronize_sched_expedited() incorrectly assumes that resched_cpu() is unconditional, which it is not. This means that synchronize_sched_expedited() can hang when resched_cpu()'s trylock fails as follows (analysis by Neeraj Upadhyay): o CPU1 is waiting for expedited wait to complete: sync_rcu_exp_select_cpus rdp->exp_dynticks_snap & 0x1 // returns 1 for CPU5 IPI sent to CPU5 synchronize_sched_expedited_wait ret = swait_event_timeout(rsp->expedited_wq, sync_rcu_preempt_exp_done(rnp_root), jiffies_stall); expmask = 0x20, CPU 5 in idle path (in cpuidle_enter()) o CPU5 handles IPI and fails to acquire rq lock. Handles IPI sync_sched_exp_handler resched_cpu returns while failing to try lock acquire rq->lock need_resched is not set o CPU5 calls rcu_idle_enter() and as need_resched is not set, goes to idle (schedule() is not called). o CPU 1 reports RCU stall. Given that resched_cpu() is now used only by RCU, this commit fixes the assumption by making resched_cpu() unconditional. Reported-by: Neeraj Upadhyay Suggested-by: Neeraj Upadhyay Signed-off-by: Paul E. McKenney Acked-by: Steven Rostedt (VMware) Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org kernel/sched/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6733bab7bc09b67668028dab562caea1b4ff3c69 Author: Paul E. McKenney Date: Fri Aug 18 10:59:16 2017 -0700 irq_work: Map irq_work_on_queue() to irq_work_on() in !SMP Commit 478850160636 ("irq_work: Implement remote queueing") provides irq_work_on_queue() only for SMP builds. However, providing it simplifies code that submits irq_work to lists of CPUs, eliminating the !SMP special cases. This commit therefore maps irq_work_on_queue() to irq_work_on() in !SMP builds, but validating the specified CPU. Signed-off-by: Paul E. McKenney include/linux/irq_work.h | 3 --- kernel/irq_work.c | 9 ++++++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit c63eb17ff06dbcf73e771b9b425c531cc0a9c17b Author: Paul E. McKenney Date: Fri Aug 11 12:37:07 2017 -0700 rcu: Create call_rcu_tasks() kthread at boot time Currently the call_rcu_tasks() kthread is created upon first invocation of call_rcu_tasks(). This has the advantage of avoiding creation if there are never any invocations of call_rcu_tasks() and of synchronize_rcu_tasks(), but it requires an unreliable heuristic to determine when it is safe to create the kthread. For example, it is not safe to create the kthread when call_rcu_tasks() is invoked with a spinlock held, but there is no good way to detect this in !PREEMPT kernels. This commit therefore creates this kthread unconditionally at core_initcall() time. If you don't want this kthread created, then build with CONFIG_TASKS_RCU=n. Signed-off-by: Paul E. McKenney kernel/rcu/update.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) commit 135bd1a230bb69a68c9808a7d25467318900b80a Author: Neeraj Upadhyay Date: Mon Aug 7 11:20:10 2017 +0530 rcu: Fix up pending cbs check in rcu_prepare_for_idle The pending-callbacks check in rcu_prepare_for_idle() is backwards. It should accelerate if there are pending callbacks, but the check rather uselessly accelerates only if there are no callbacks. This commit therefore inverts this check. Fixes: 15fecf89e46a ("srcu: Abstract multi-tail callback list handling") Signed-off-by: Neeraj Upadhyay Signed-off-by: Paul E. McKenney Cc: # 4.12.x kernel/rcu/tree_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0902b1f44a72558aece92f074154044861681f84 Author: Alan Stern Date: Fri Sep 1 07:53:34 2017 -0700 memory-barriers: Rework multicopy-atomicity section Signed-off-by: Alan Stern Signed-off-by: Paul E. McKenney Documentation/memory-barriers.txt | 58 ++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 28 deletions(-) commit f1ab25a30ce81f4e9be3cb33cd9bb9fb2db64b28 Author: Paul E. McKenney Date: Tue Aug 29 15:49:21 2017 -0700 memory-barriers: Replace uses of "transitive" The current version of memory-barriers.txt misuses the term "transitive", so this commit replaces it with multi-copy atomic, also adding a definition of this term. Reported-by: Alan Stern Signed-off-by: Paul E. McKenney Documentation/memory-barriers.txt | 185 +++++++++++++++++++------------------- 1 file changed, 91 insertions(+), 94 deletions(-) commit d3cf5176d0b17610b7c7f1562e496ec401fe01f8 Author: Paul E. McKenney Date: Thu Aug 17 12:29:22 2017 -0700 documentation: Update RCU CPU stall warning messages The RCU CPU stall warnings have morphed significantly since the last update, so this commit brings the documentation up to date. Signed-off-by: Paul E. McKenney Documentation/RCU/stallwarn.txt | 182 +++++++++++++++++++++++----------------- 1 file changed, 105 insertions(+), 77 deletions(-) commit 3d916a443e97169a3d88765c4e0b07ac813f439f Author: Paul E. McKenney Date: Thu Aug 10 14:33:17 2017 -0700 documentation: Slow systems can stall RCU grace periods If a fast system has a worst-case grace-period duration of (say) ten seconds, then running the same workload on a system ten times as slow will get you an RCU CPU stall warning given default stall-warning timeout settings. This commit therefore adds this possibility to stallwarn.txt. Reported-by: Daniel Lezcano Signed-off-by: Paul E. McKenney Documentation/RCU/stallwarn.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit dfa0ee48ef86f79430d2be9d1e2e1b509abb3cce Author: Paul E. McKenney Date: Wed Aug 9 10:16:29 2017 -0700 documentation: Long-running irq handlers can stall RCU grace periods If a periodic interrupt's handler takes longer to execute than the period between successive interrupts, RCU's kthreads and softirq handlers can be prevented from executing, resulting in otherwise inexplicable RCU CPU stall warnings. This commit therefore calls out this possibility in Documentation/RCU/stallwarn.txt. Reported-by: Daniel Lezcano Signed-off-by: Paul E. McKenney Documentation/RCU/stallwarn.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit bb7e5ce7dde6f42e7793bd6cf4b1eb71a20145aa Author: Paul E. McKenney Date: Mon Aug 7 17:23:20 2017 -0700 documentation: RCU grace-period memory ordering guarantees This commit provides text and diagrams showing how Tree RCU implements its grace-period memory ordering guarantees. Signed-off-by: Paul E. McKenney Cc: Jonathan Corbet Cc: Linus Torvalds .../Design/Memory-Ordering/Tree-RCU-Diagram.html | 9 + .../Memory-Ordering/Tree-RCU-Memory-Ordering.html | 707 +++ .../TreeRCU-callback-invocation.svg | 486 ++ .../Memory-Ordering/TreeRCU-callback-registry.svg | 655 +++ .../RCU/Design/Memory-Ordering/TreeRCU-dyntick.svg | 700 +++ .../Design/Memory-Ordering/TreeRCU-gp-cleanup.svg | 1126 +++++ .../RCU/Design/Memory-Ordering/TreeRCU-gp-fqs.svg | 1309 +++++ .../Design/Memory-Ordering/TreeRCU-gp-init-1.svg | 656 +++ .../Design/Memory-Ordering/TreeRCU-gp-init-2.svg | 656 +++ .../Design/Memory-Ordering/TreeRCU-gp-init-3.svg | 632 +++ .../RCU/Design/Memory-Ordering/TreeRCU-gp.svg | 5135 ++++++++++++++++++++ .../RCU/Design/Memory-Ordering/TreeRCU-hotplug.svg | 775 +++ .../RCU/Design/Memory-Ordering/TreeRCU-qs.svg | 1095 +++++ .../RCU/Design/Memory-Ordering/rcu_node-lock.svg | 229 + 14 files changed, 14170 insertions(+) commit dbadbbe235f82f13224c85d29e65cf859afaa18c Author: Jacob Keller Date: Thu Sep 7 08:05:49 2017 -0400 i40e/i40evf: always set the CLEARPBA flag when re-enabling interrupts In the past we changed driver behavior to not clear the PBA when re-enabling interrupts. This change was motivated by the flawed belief that clearing the PBA would cause a lost interrupt if a receive interrupt occurred while interrupts were disabled. According to empirical testing this isn't the case. Additionally, the data sheet specifically says that we should set the CLEARPBA bit when re-enabling interrupts in a polling setup. This reverts commit 40d72a509862 ("i40e/i40evf: don't lose interrupts") Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 5 +---- drivers/net/ethernet/intel/i40e/i40e_main.c | 11 +++++------ drivers/net/ethernet/intel/i40e/i40e_txrx.c | 6 ++---- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 4 +--- 5 files changed, 10 insertions(+), 18 deletions(-) commit 427025592955d245997b12923111e85f07850d5f Author: Jacob Keller Date: Thu Sep 7 08:05:48 2017 -0400 i40e/i40evf: fix incorrect default ITR values on driver load The ITR register expects to be programmed in units of 2 microseconds. Because of this, all of the drivers I40E_ITR_* constants are in terms of this 2 microsecond register. Unfortunately, the rx_itr_default value is expected to be programmed in microseconds. Effectively the driver defaults to an ITR value of half the expected value (in terms of minimum microseconds between interrupts). Fix this by changing the default values to be calculated using ITR_REG_TO_USEC macro which indicates that we're converting from the register units into microseconds. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++-- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 6 ++++-- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 6 ++++-- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) commit c766b9af9abe897eb5480ef9ef3914fc07b815c5 Author: Alan Brady Date: Thu Sep 7 08:05:47 2017 -0400 i40evf: fix mac filter removal timing issue Due to the asynchronous nature in which mac filters are added and deleted, there exists a bug in which filters are erroneously removed if removed then added again quickly. The events are as such: - filter marked for removal - same filter is re-added before watchdog that cleans up filters - we skip re-adding the filter because we have it already in the list - watchdog filter cleanup kicks off and filter is removed So when we were re-adding the same filter, it didn't actually get added because it already existed in the list, but was marked for removal and had yet to actually be removed. This patch fixes the issue by making sure that when adding a filter, if we find it already existing in our list, make sure it is not marked to be removed. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 ++ 1 file changed, 2 insertions(+) commit 784548c40d6f43eff2297220ad7800dc04be03c6 Author: Lihong Yang Date: Thu Sep 7 08:05:46 2017 -0400 i40e: use the safe hash table iterator when deleting mac filters This patch replaces hash_for_each function with hash_for_each_safe when calling __i40e_del_filter. The hash_for_each_safe function is the right one to use when iterating over a hash table to safely remove a hash entry. Otherwise, incorrect values may be read from freed memory. Detected by CoverityScan, CID 1402048 Read from pointer after free Signed-off-by: Lihong Yang Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1356d86ff149c2fb4f81d906933158d948baf8e7 Author: Colin Ian King Date: Thu Oct 5 11:23:56 2017 +0100 pinctrl: sx150x: make struct sx150x_regmap_config static The structure sx150x_regmap_config is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'sx150x_regmap_config' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-sx150x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 161ef8b34dd556b1b635de8217f84f6d8ea94990 Author: Colin Ian King Date: Thu Oct 5 11:11:37 2017 +0100 pinctrl: ingenic: make function ingenic_pinctrl_probe static The function ingenic_pinctrl_probe is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warnings symbol 'ingenic_pinctrl_probe' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-ingenic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7886082dfb6ab8221b1b5509a582256040820c2e Author: Lorenzo Bianconi Date: Wed Aug 30 13:50:43 2017 +0200 dt-bindings: iio: accel: add LIS2DW12 sensor device binding Signed-off-by: Lorenzo Bianconi Acked-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/st-sensors.txt | 1 + 1 file changed, 1 insertion(+) commit f94124f9fb005ccbcaaf4a2343c83373e58af6bc Author: Lorenzo Bianconi Date: Wed Aug 30 13:50:42 2017 +0200 iio: accel: add support to LIS2DW12 add support to STMicroelectronics LIS2DW12 accelerometer in st_accel framework http://www.st.com/resource/en/datasheet/lis2dw12.pdf Signed-off-by: Lorenzo Bianconi Reviewed-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/accel/st_accel.h | 2 + drivers/iio/accel/st_accel_core.c | 79 +++++++++++++++++++++++++++++++++++++++ drivers/iio/accel/st_accel_i2c.c | 5 +++ drivers/iio/accel/st_accel_spi.c | 5 +++ 4 files changed, 91 insertions(+) commit 2e8325f489ab031a313cb4c21900b104e520bee5 Author: Lorenzo Bianconi Date: Wed Aug 30 13:50:41 2017 +0200 iio: st_sensors: do not always write enable_axis register New devices (e.g. LIS2DW12) enable all axis by default and do not export that capability in register map. Check if the enable_axis register address has been declared in st_sensor_settings map in order to verify if the driver needs to enable all sensor axis Signed-off-by: Lorenzo Bianconi Reviewed-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/common/st_sensors/st_sensors_core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 0e005888b833ba65dcf2c7aa12958dad6b2b8618 Author: Paulo Zanoni Date: Thu Oct 5 18:38:42 2017 -0300 drm/i915: avoid division by zero on cnl_calc_wrpll_link If for some unexpected reason the registers all read zero it's better to WARN and return instead of dividing by zero and completely freezing the machine. I don't expect this to happen in the wild with the current code, but I accidentally triggered the division by zero while doing some debugging in an unusual environment. Cc: Rodrigo Vivi Signed-off-by: Paulo Zanoni Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20171005213842.11423-2-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_ddi.c | 3 +++ 1 file changed, 3 insertions(+) commit 2de3813880bf16deff8223add4d7e1872c7a9e77 Author: Paulo Zanoni Date: Fri Sep 22 17:53:42 2017 -0300 drm/i915: add the BXT and CNL DPLL registers to pipe_config_compare Looks like we were missing them. Signed-off-by: Paulo Zanoni Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20170922205343.16006-2-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_display.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 52c6a62c64fac03a434cdacf6ef671c6a9e9000f Author: Andres Rodriguez Date: Mon Jun 26 16:17:13 2017 -0400 drm/amdgpu: add interface for editing a foreign process's priority v3 The AMDGPU_SCHED_OP_PROCESS_PRIORITY_OVERRIDE ioctls are used to set the priority of a different process in the current system. When a request is dropped, the process's contexts will be restored to the priority specified at context creation time. A request can be dropped by setting the override priority to AMDGPU_CTX_PRIORITY_UNSET. An fd is used to identify the remote process. This is simpler than passing a pid number, which is vulnerable to re-use, etc. This functionality is limited to DRM_MASTER since abuse of this interface can have a negative impact on the system's performance. v2: removed unused output structure v3: change refcounted interface for a regular set operation Signed-off-by: Andres Rodriguez Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 21 +----- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 109 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_sched.h | 34 ++++++++++ include/uapi/drm/amdgpu_drm.h | 17 +++++ 6 files changed, 164 insertions(+), 21 deletions(-) commit c23be4ae1d50e8d93f805de7ae3e8ea49a4ad781 Author: Andres Rodriguez Date: Tue Jun 6 20:20:38 2017 -0400 drm/amdgpu: add plumbing for ctx priority changes v2 Introduce amdgpu_ctx_priority_override(). A mechanism to override a context's priority. An override can be terminated by setting the override to AMD_SCHED_PRIORITY_UNSET. v2: change refcounted interface for a direct set Signed-off-by: Andres Rodriguez Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 +++++- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) commit f3d19bf80d6c7bfe5922c09604a402ef176da41f Author: Andres Rodriguez Date: Mon Jun 26 16:12:10 2017 -0400 drm/amdgpu: introduce AMDGPU_CTX_PRIORITY_UNSET Use _INVALID to identify bad parameters and _UNSET to represent the lack of interest in a specific value. Signed-off-by: Andres Rodriguez Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 ++ drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 3 ++- include/uapi/drm/amdgpu_drm.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) commit 9ebbaabee858dcecb251d64ecb1e639a1590fff6 Author: Andres Rodriguez Date: Fri Jun 2 15:09:00 2017 -0400 drm/amd/sched: allow clients to edit an entity's rq v2 This is useful for changing an entity's priority at runtime. v2: don't modify the order of amd_sched_entity members Reviewed-by: Christian König Signed-off-by: Andres Rodriguez Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 24 ++++++++++++++++++++++-- drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 3 +++ 2 files changed, 25 insertions(+), 2 deletions(-) commit b6d8a439345e71e9b1939c4d6997e09b5be9b5e1 Author: Andres Rodriguez Date: Wed May 24 17:00:10 2017 -0400 drm/amdgpu: make amdgpu_to_sched_priority detect invalid parameters Returning invalid priorities as _NORMAL is a backwards compatibility quirk of amdgpu_ctx_ioctl(). Move this detail one layer up where it belongs. Signed-off-by: Andres Rodriguez Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 8 +++++--- drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) commit b8866c26ec072f1924f5cf601ebea33ca9823326 Author: Andres Rodriguez Date: Fri Apr 28 20:05:51 2017 -0400 drm/amdgpu: implement ring set_priority for gfx_v8 compute v9 Programming CP_HQD_QUEUE_PRIORITY enables a queue to take priority over other queues on the same pipe. Multiple queues on a pipe are timesliced so this gives us full precedence over other queues. Programming CP_HQD_PIPE_PRIORITY changes the SPI_ARB_PRIORITY of the wave as follows: 0x2: CS_H 0x1: CS_M 0x0: CS_L The SPI block will then dispatch work according to the policy set by SPI_ARB_PRIORITY. In the current policy CS_H is higher priority than gfx. In order to prevent getting stuck in loops of resources bouncing between GFX and high priority compute and introducing further latency, we statically reserve a portion of the pipe. v2: fix srbm_select to ring->queue and use ring->funcs->type v3: use AMD_SCHED_PRIORITY_* instead of AMDGPU_CTX_PRIORITY_* v4: switch int to enum amd_sched_priority v5: corresponding changes for srbm_lock v6: change CU reservation to PIPE_PERCENT allocation v7: use kiq instead of MMIO v8: back to MMIO, and make the implementation sleep safe. v9: corresponding changes for splitting HIGH into _HW/_SW 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_device.c | 2 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 99 ++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+) commit b2ff0e8ac4ce1fb647ae40feb4cf26bc9301e0c9 Author: Andres Rodriguez Date: Mon Feb 20 17:53:19 2017 -0500 drm/amdgpu: add framework for HW specific priority settings v9 Add an initial framework for changing the HW priorities of rings. The framework allows requesting priority changes for the lifetime of an amdgpu_job. After the job completes the priority will decay to the next lowest priority for which a request is still valid. A new ring function set_priority() can now be populated to take care of the HW specific programming sequence for priority changes. v2: set priority before emitting IB, and take a ref on amdgpu_job v3: use AMD_SCHED_PRIORITY_* instead of AMDGPU_CTX_PRIORITY_* v4: plug amdgpu_ring_restore_priority_cb into amdgpu_job_free_cb v5: use atomic for tracking job priorities instead of last_job v6: rename amdgpu_ring_priority_[get/put]() and align parameters v7: replace spinlocks with mutexes for KIQ compatibility v8: raise ring priority during cs_ioctl, instead of job_run v9: priority_get() before push_job() Reviewed-by: Christian König Acked-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 4 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 76 ++++++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 15 ++++++ drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 7 +++ 5 files changed, 103 insertions(+), 1 deletion(-) commit c2636dc53abd8269a0930bccd564f2f195dba729 Author: Andres Rodriguez Date: Thu Dec 22 17:06:50 2016 -0500 drm/amdgpu: add parameter to allocate high priority contexts v11 Add a new context creation parameter to express a global context priority. The priority ranking in descending order is as follows: * AMDGPU_CTX_PRIORITY_HIGH_HW * AMDGPU_CTX_PRIORITY_HIGH_SW * AMDGPU_CTX_PRIORITY_NORMAL * AMDGPU_CTX_PRIORITY_LOW_SW * AMDGPU_CTX_PRIORITY_LOW_HW The driver will attempt to schedule work to the hardware according to the priorities. No latency or throughput guarantees are provided by this patch. This interface intends to service the EGL_IMG_context_priority extension, and vulkan equivalents. Setting a priority above NORMAL requires CAP_SYS_NICE or DRM_MASTER. v2: Instead of using flags, repurpose __pad v3: Swap enum values of _NORMAL _HIGH for backwards compatibility v4: Validate usermode priority and store it v5: Move priority validation into amdgpu_ctx_ioctl(), headline reword v6: add UAPI note regarding priorities requiring CAP_SYS_ADMIN v7: remove ctx->priority v8: added AMDGPU_CTX_PRIORITY_LOW, s/CAP_SYS_ADMIN/CAP_SYS_NICE v9: change the priority parameter to __s32 v10: split priorities into _SW and _HW v11: Allow DRM_MASTER without CAP_SYS_NICE Reviewed-by: Emil Velikov Reviewed-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 61 +++++++++++++++++++++++++-- drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 5 ++- include/uapi/drm/amdgpu_drm.h | 10 ++++- 3 files changed, 70 insertions(+), 6 deletions(-) commit 177ae09b5d699a5ebd1cafcee78889db968abf54 Author: Andres Rodriguez Date: Fri Sep 15 20:44:06 2017 -0400 drm/amdgpu: introduce AMDGPU_GEM_CREATE_EXPLICIT_SYNC v2 Introduce a flag to signal that access to a BO will be synchronized through an external mechanism. Currently all buffers shared between contexts are subject to implicit synchronization. However, this is only required for protocols that currently don't support an explicit synchronization mechanism (DRI2/3). This patch introduces the AMDGPU_GEM_CREATE_EXPLICIT_SYNC, so that users can specify when it is safe to disable implicit sync. v2: only disable explicit sync in amdgpu_cs_ioctl Reviewed-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 7 +++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ++++---- include/uapi/drm/amdgpu_drm.h | 2 ++ 8 files changed, 29 insertions(+), 11 deletions(-) commit b82485fd384a56c27fae44e649552eca6334237a Author: Andres Rodriguez Date: Fri Sep 15 21:05:19 2017 -0400 drm/amdgpu: add helper to convert a ttm bo to amdgpu_bo Reviewed-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 8 +++----- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 5 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 9 +++++---- 3 files changed, 13 insertions(+), 9 deletions(-) commit 9fc8fc709b356c85034cbcb3b84c9d8b77865f52 Author: Christian König Date: Mon Sep 18 13:58:30 2017 +0200 drm/amdgpu: add VM support for huge pages v2 Convert GTT mappings into linear ones for huge page handling. v2: use fragment size as minimum for linear conversion Signed-off-by: Christian König Reviewed-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 6056a1a565547743c5a87dc3d9c51d086acf9c27 Author: Christian König Date: Wed Sep 20 14:07:02 2017 +0200 drm/ttm: DMA map/unmap consecutive pages as a whole v2 Instead of mapping them bit by bit map/unmap all consecutive pages as in one call. v2: test for consecutive pages instead of using compound page order. Signed-off-by: Christian König Acked-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 48 +++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 9 deletions(-) commit c6e839a3e299bbff991a3b4136f96ccaca4b276f Author: Christian König Date: Tue Sep 19 15:20:42 2017 +0200 drm/ttm: allocate/free multiple pages in a single call Totally surprisingly this is more efficient than doing it page by page. Signed-off-by: Christian König Acked-by: Felix Kuehling Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit a05502e5cfa9abe17a16592be82c2f5692c91f35 Author: Horace Chen Date: Fri Sep 29 14:41:57 2017 +0800 drm/amdgpu: Reserve shared memory on VRAM for SR-IOV SR-IOV need to reserve a piece of shared VRAM at the exact place to exchange data betweem PF and VF. The start address and size of the shared mem are passed to guest through VBIOS structure VRAM_UsageByFirmware. VRAM_UsageByFirmware is a general feature in VBIOS, it indicates that VBIOS need to reserve a piece of memory on the VRAM. Because the mem address is specified. Reserve it early in amdgpu_ttm_init to make sure that it can monoplize the space. Signed-off-by: Horace Chen Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 14 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 18 ++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 76 ++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 9 ++++ 4 files changed, 116 insertions(+), 1 deletion(-) commit 6d16dac85c081825af58111023428c43d1da7e1a Author: Yong Zhao Date: Thu Aug 31 15:55:00 2017 -0400 drm/amdgpu: Set the correct value for PDEs/PTEs of ATC memory on Raven Without the additional bits set in PDEs/PTEs, the ATC memory access would have failed on Raven. Signed-off-by: Yong Zhao Acked-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 9 ++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 10 ++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) commit 75d4c6d2e15d4455dfd5995c27e6e6ad6f214e39 Author: Lorenzo Bianconi Date: Wed Aug 30 13:50:40 2017 +0200 iio: st_sensors: decouple irq1 configuration parameters from the irq2 ones Separate data-ready configuration parameters for INT1 and INT2 pins in st_sensor_data_ready_irq data structure. That change will be use to properly support LIS2DW12 accel sensor. Signed-off-by: Lorenzo Bianconi Reviewed-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/accel/st_accel_core.c | 66 ++++++++++++++++--------- drivers/iio/common/st_sensors/st_sensors_core.c | 28 ++++++----- drivers/iio/gyro/st_gyro_core.c | 18 ++++--- drivers/iio/magnetometer/st_magn_core.c | 6 ++- drivers/iio/pressure/st_pressure_core.c | 31 +++++++----- include/linux/iio/common/st_sensors.h | 16 +++--- 6 files changed, 104 insertions(+), 61 deletions(-) commit e72a060151e5bb673af24993665e270fc4f674a7 Author: Lorenzo Bianconi Date: Wed Aug 30 13:50:39 2017 +0200 iio: st_sensors: add register mask for status register Introduce register mask for data-ready status register since pressure sensors (e.g. LPS22HB) export just two channels (BIT(0) and BIT(1)) and BIT(2) is marked reserved while in st_sensors_new_samples_available() value read from status register is masked using 0x7. Moreover do not mask status register using active_scan_mask since now status value is properly masked and if the result is not zero the interrupt has to be consumed by the driver. This fix an issue on LPS25H and LPS331AP where channel definition is swapped respect to status register. Furthermore that change allows to properly support new devices (e.g LIS2DW12) that report just ZYXDA (data-ready) field in status register to figure out if the interrupt has been generated by the device. Fixes: 97865fe41322 (iio: st_sensors: verify interrupt event to status) Signed-off-by: Lorenzo Bianconi Reviewed-by: Linus Walleij Signed-off-by: Jonathan Cameron drivers/iio/accel/st_accel_core.c | 35 +++++++++++++++++----- drivers/iio/common/st_sensors/st_sensors_core.c | 2 +- drivers/iio/common/st_sensors/st_sensors_trigger.c | 16 +++------- drivers/iio/gyro/st_gyro_core.c | 15 ++++++++-- drivers/iio/magnetometer/st_magn_core.c | 10 +++++-- drivers/iio/pressure/st_pressure_core.c | 15 ++++++++-- include/linux/iio/common/st_sensors.h | 7 +++-- 7 files changed, 70 insertions(+), 30 deletions(-) commit c1375d671a352c525d76a8aba306667e0000d98a Author: Lukas Wunner Date: Sat Sep 9 20:32:41 2017 +0200 iio: adc: mcp320x: Add support for mcp3550/1/3 These ADCs are marketed as single-channel 22 bit delta-sigma ADCs, but in reality their resolution is 21 bit with an overrange or underrange of 12% beyond Vref. In other words, "full scale" means +/- 2^20. This driver does not explicitly signal back to the user when an overrange or underrange occurs, but the user can detect it by comparing the raw value to +/- 2^20 (or the scaled value to Vref). The chips feature an extended temperature range and high accuracy, low noise characteristics, but their conversion times are slow with up to 80 ms +/- 2% (on the MCP3550-50). Hence, unlike the other ADCs supported by the driver, conversion does not take place in realtime upon lowering CS. Instead, CS is asserted for 8 usec to start the conversion. After waiting for the duration of the conversion, the result can be fetched. While waiting, control of the bus is ceased so it may be used by a different device. After the result has been fetched and 10 us have passed, the chip goes into shutdown and an additional power-up delay of 144 clock periods is then required to wake the analog circuitry upon the next conversion (footnote below table 4-1, page 16 in the spec). Optionally, the chips can be used in so-called "continuous conversion mode": Conversions then take place continuously and the last result may be fetched at any time without observing a delay. The mode is enabled by permanently driving CS low, e.g. by wiring it to ground. The driver only supports "single conversion mode" for now but should be adaptable to "continuous conversion mode" with moderate effort. The chips clock out a 3 byte word, unlike the other ADCs supported by the driver which all have a lower resolution than 16 bit and thus make do with 2 bytes. Calculate the word length on probe by rounding up the resolution to full bytes. Crucially, if the clock idles low, the transfer is preceded by a useless Data Ready bit which increases its length from 24 bit to 25 bit = 4 bytes (section 5.5 in the spec). Autosense this based on the SPI slave's configuration. Cc: Mathias Duckeck Signed-off-by: Lukas Wunner Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 5 +- drivers/iio/adc/mcp320x.c | 120 ++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 118 insertions(+), 7 deletions(-) commit 2db82e320da766c6d8a3d9c9d1cc4c45580fd701 Author: Aastha Gupta Date: Wed Sep 27 12:01:59 2017 +0530 staging: iio: adc: ad7192: use driver private lock to protect hardware state changes The IIO subsystem is redefining iio_dev->mlock to be used by the IIO core only for protecting device operating mode changes. ie. Changes between INDIO_DIRECT_MODE, INDIO_BUFFER_* modes. In this driver, mlock was being used to protect hardware state changes. Replace it with a driver private lock. Also, as there are state changes in the ad7192_ write_raw function, a lock is added to prevent the concurrent state changes. Signed-off-by: Aastha Gupta Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/ad7192.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 103f3afe91858a7c3b9115e197ddaa0cb63dbdf2 Author: Stefan Brüns Date: Sun Oct 1 21:48:17 2017 +0200 iio: adc: ina2xx: Adhere to documented ABI, use Ohm instead of uOhm According to the ABI documentation, the shunt resistor value should be specificied in Ohm. As this is also used/documented for the MAX9611, use the same for the INA2xx driver. This poses an ABI break for anyone actually altering the shunt value through the sysfs interface, it does not alter the default value nor a value set from the devicetree. Minor change: Fix comment, 1mA is 10^-3A. Signed-off-by: Stefan Brüns Signed-off-by: Jonathan Cameron drivers/iio/adc/ina2xx-adc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 92617c158ae42b4bcedd7c1d7e0f7b6af8f30c38 Author: Lorenzo Bianconi Date: Mon Oct 2 18:37:40 2017 +0200 iio: imu: st_lsm6dsx: add FIFO ops data structure Introduce FIFO ops data structure to contain FIFO related parameters in order to properly support more devices in st_lsm6dsx driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 22 +++++++++++++++-- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 23 ++++++++---------- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 33 ++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 15 deletions(-) commit 7ca3ac9e9eb904ee445964217b7ff309fe76e89c Author: Lorenzo Bianconi Date: Mon Oct 2 18:37:39 2017 +0200 iio: imu: st_lsm6dsx: move decimator info in st_lsm6dsx_sensor_settings Move FIFO decimator info in st_lsm6dsx_sensor_settings list since decimator registers are exported in register map just in lsm6ds3/lsm6ds3h/lsm6dsl/lsm6dsm sensors and not in other compliant devices Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 10 ++++++-- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 17 +++++++------ drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 34 +++++++++++++++++++++++--- 3 files changed, 47 insertions(+), 14 deletions(-) commit ff81a933c153fc3159b1e27bdd058f905e0359d5 Author: Lorenzo Bianconi Date: Mon Oct 2 18:37:38 2017 +0200 iio: imu: st_lsm6dsx: split fifo mode and fifo odr configuration Separate fifo mode and max fifo sample rate configuration. That change will be necessary to reuse st_lsm6dsx_set_fifo_mode() routine and to support more devices in st_lsm6dsx driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 32 ++++++++++++++------------ 1 file changed, 17 insertions(+), 15 deletions(-) commit 8f2a88a2b25d4781a454fa044ed240137d438255 Author: Lorenzo Bianconi Date: Mon Oct 2 18:37:37 2017 +0200 iio: imu: st_lsm6dsx: convert max_fifo_size in FIFO sample size Express max fifo depth in ST_LSM6DSX_SAMPLE_SIZE instead of in bytes. That change will be necessary to properly support more devices in st_lsm6dsx driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit fb942f8ce6cdbacc087b808d89d09ff138c25bbe Author: Geert Uytterhoeven Date: Wed Oct 4 14:08:26 2017 +0200 iio: adc: rcar-gyroadc: Use of_device_get_match_data() helper Use the of_device_get_match_data() helper instead of open coding. Note that the rcar-gyroadc driver is used with DT only, so there's always a valid match. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Jonathan Cameron drivers/iio/adc/rcar-gyroadc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit af5d716a90ba55635bbdcbf145465b5fdc5a5530 Author: Geert Uytterhoeven Date: Wed Oct 4 14:08:25 2017 +0200 iio: adc: rcar-gyroadc: Enable compile-testing on non-ARM The rcar-gyroadc driver compiles fine on other platforms, hence increase compile coverage. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Jonathan Cameron drivers/iio/adc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a35734564bd2dc4f73c9e230ff55892290a130f Author: Geert Uytterhoeven Date: Wed Oct 4 14:08:24 2017 +0200 iio: adc: rcar-gyroadc: Cast pointer to uintptr_t to fix warning on 64-bit On 64-bit: drivers/iio/adc/rcar-gyroadc.c: In function 'rcar_gyroadc_parse_subdevs': drivers/iio/adc/rcar-gyroadc.c:352:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] childmode = (unsigned int)of_id->data; ^ Cast the pointer to uintptr_t instead of unsigned int to fix this. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Jonathan Cameron drivers/iio/adc/rcar-gyroadc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68c91e7a4009af758ef144a077d80db1499a7350 Author: Himanshi Jain Date: Sun Oct 1 01:35:21 2017 +0530 staging: iio: ade7753: expanding buffer lock to cover both buffer and state protection Dropping the extra lock (used for protecting the write frequency) by expanding the buffer lock to cover both buffer and state protection. Doing this by introducing a new function (__ade7753_spi_write_reg_16) making buffer changes without locking the state, to avoid nested locks while making device frequency changes. Signed-off-by: Himanshi Jain Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7753.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit ca48139856428313e2e9869c41c92e865ec5470d Author: Bartosz Golaszewski Date: Thu Sep 28 12:56:41 2017 +0200 iio: dummy: evgen: use irq_sim Switch to using the recently added interrupt simulator for dummy irqs. Signed-off-by: Bartosz Golaszewski Reviewed-by: Lars-Peter Clausen Tested-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron drivers/iio/dummy/Kconfig | 2 +- drivers/iio/dummy/iio_dummy_evgen.c | 89 ++++++++----------------------------- 2 files changed, 20 insertions(+), 71 deletions(-) commit 4546813a7f6b3dc67ac258666092b1952c4e2ea1 Author: Brian Masney Date: Fri Sep 29 21:09:20 2017 -0400 staging: iio: tsl2x7x: migrate in_illuminance0_integration_time sysfs attribute to iio_chan_spec The driver explicitly creates the in_illuminance0_integration_time sysfs attribute outside the IIO core. This attribute is available in the IIO core so this patches migrates the attribute to be created by the iio_chan_spec. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 65 ++++++++++--------------------------- 1 file changed, 17 insertions(+), 48 deletions(-) commit b476eef6e9bf169c9c38a0e32635628fb18138af Author: Brian Masney Date: Fri Sep 29 21:09:19 2017 -0400 staging: iio: tsl2x7x: rename tsl2x7x_settings variable to settings The length of the 'tsl2x7x_settings' variable within the tsl2X7X_chip structure makes some of the line lengths greater than 80 characters for upcoming patches. This patch shortens the name of the 'tsl2x7x_settings' variable in this structure to just 'settings' to improve code readability. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 183 +++++++++++++++++------------------- 1 file changed, 85 insertions(+), 98 deletions(-) commit 3525d7cfb740243f0d9fab19288b2f89f715aba5 Author: Stefan Brüns Date: Sun Sep 24 23:59:20 2017 +0200 iio: light: vl6180: Correct ALS scale for non-default gain/integration time The reported scale was only correct for the default settings of 100 ms integration time and gain 1. This aligns the reported scale with the behaviour of any other IIO driver and the documented ABI, but may require userspace changes if someone uses non-default settings. Signed-off-by: Stefan Brüns Signed-off-by: Jonathan Cameron drivers/iio/light/vl6180.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit e794bf6751a0376a459ae1659a1646652b198cad Author: Stefan Brüns Date: Sun Sep 24 23:59:19 2017 +0200 iio: light: vl6180: Cleanup als_gain lookup, avoid register readback Instead of manually iterating the array of allowed gain values, use find_closest. Storing the current gain setting avoids accessing the hardware on each query. Signed-off-by: Stefan Brüns Signed-off-by: Jonathan Cameron drivers/iio/light/vl6180.c | 85 ++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 41 deletions(-) commit df698c0402eaa2c949344c45f42a7d85e9506533 Author: Stefan Brüns Date: Sun Sep 24 23:59:18 2017 +0200 iio: light: vl6180: Avoid readback of integration time register Instead of reading the value from the register on each query, store the set value. Signed-off-by: Stefan Brüns Signed-off-by: Jonathan Cameron drivers/iio/light/vl6180.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 1e2ed3d0d27d80aa312b7b0081c0da56e04baeb9 Author: Stefan Brüns Date: Sun Sep 24 23:59:17 2017 +0200 iio: light: vl6180: Move range check to integration time setter, cleanup This improves code uniformity (range checks for als_gain are also done in the setter). Also unmangle rounding and calculation of register value. The calculated integration time it_ms is required in the next patch of the series. Signed-off-by: Stefan Brüns Signed-off-by: Jonathan Cameron drivers/iio/light/vl6180.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 1540d0106bcbc4e52013d759a0a0752ae7b4a09d Author: Michał Mirosław Date: Sun Sep 17 17:01:04 2017 +0200 iio: accel: kxcjk1013: add support for KXTF9 KXTF9 has mostly compatible register layout to KXCJK accelerometer. There is no motion direction interrupt support, but there is tap direction detection instead (not implemented in this patch). Signed-off-by: Michał Mirosław Signed-off-by: Jonathan Cameron drivers/iio/accel/Kconfig | 4 +- drivers/iio/accel/kxcjk-1013.c | 115 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 104 insertions(+), 15 deletions(-) commit d2ff1956ba279bc1400924b20f85e25c4d4ca989 Author: Michał Mirosław Date: Sun Sep 17 17:01:03 2017 +0200 iio: accel: kxcjk1013: make sampling_frequency_avail per-type Make sampling_frequency_avail per-type - like sampling_frequency is. Signed-off-by: Michał Mirosław Signed-off-by: Jonathan Cameron drivers/iio/accel/kxcjk-1013.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 81fa8cb9f868dbe30fdfbf90f695ad16f0d0a814 Author: Michał Mirosław Date: Sun Sep 17 17:01:03 2017 +0200 iio: accel: kxcjk1013: make sysfs/sampling_frequency_avail dynamic In preparation for KXTF9 support, make sampling_frequency_avail attribute dynamic. Signed-off-by: Michał Mirosław Signed-off-by: Jonathan Cameron drivers/iio/accel/kxcjk-1013.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit d8408e98f5c62d5737ce149947202a21778ecb0d Author: Michał Mirosław Date: Sun Sep 17 17:01:02 2017 +0200 iio: accel: kxcjk1013: extract report_motion_event() from interrupt handler Extract reporting of motion event direction from interrupt handler, as it is not supported by KXTF9. Signed-off-by: Michał Mirosław Signed-off-by: Jonathan Cameron drivers/iio/accel/kxcjk-1013.c | 126 ++++++++++++++++++++++------------------- 1 file changed, 67 insertions(+), 59 deletions(-) commit f74e440c81a02d2e5aae41492298e79a2ace0e24 Author: Michał Mirosław Date: Sun Sep 17 17:01:02 2017 +0200 iio: accel: kxcjk1013: fix INT_CTRL/INT_SRC1 bit names Fix INT_CTRL1 bit names to match register name and add names for INT_SRC1 bits. Signed-off-by: Michał Mirosław Signed-off-by: Jonathan Cameron drivers/iio/accel/kxcjk-1013.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 7469ac69db6476a3460b1363a7d31b42cdcc7a11 Author: Michał Mirosław Date: Sun Sep 17 17:01:01 2017 +0200 iio: accel: kxcjk1003: refactor ODR setting Refactor ODR/WUF setting code in preparation of KXTF9 support. Signed-off-by: Michał Mirosław Signed-off-by: Jonathan Cameron drivers/iio/accel/kxcjk-1013.c | 102 ++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 57 deletions(-) commit 4febd9f184961031a42a65163d7cd049c563530f Author: Harinath Nampally Date: Mon Sep 25 06:40:08 2017 -0400 iio: accel: mma8452: Rename read/write event value callbacks to generic function name. 'mma8452_read_thresh' and 'mma8452_write_thresh' functions does more than just read/write threshold values. They also handle IIO_EV_INFO_HIGH_PASS_FILTER_3DB and IIO_EV_INFO_PERIOD therefore renaming to generic names. Improves code readability, no impact on functionality. Signed-off-by: Harinath Nampally Acked-by: Martin Kepplinger Signed-off-by: Jonathan Cameron drivers/iio/accel/mma8452.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3b455cdc49e8d91e84184e60e01a390c7eb23134 Author: Quentin Schulz Date: Tue Sep 26 14:52:19 2017 +0200 iio: adc: sun4i-gpadc-iio: do not fail probing when no thermal DT node Before this patch, forgetting to put a thermal-zones DT node would result in the driver failing to probe. It should be perfectly acceptable to have the driver probe even if no thermal-zones DT is found. However, it shouldn't want to fail if the thermal registering fail for any other reason (waiting for other drivers for example) so check on ENODEV only. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Signed-off-by: Jonathan Cameron drivers/iio/adc/sun4i-gpadc-iio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit b0a242894f11d2a357a77e0eedebb16477151ddd Author: Quentin Schulz Date: Tue Sep 26 14:52:18 2017 +0200 iio: adc: sun4i-gpadc-iio: register in the thermal after registering in pm This driver has a get_temp function used by the thermal framework that uses pm functions. However, the driver isn't registered in pm before it is registered in thermal framework, resulting in the pm_resume not being called and thus the IP not enabled. When the IP is disabled, the raw temp value is always 0. With the devices currently supported, it isn't a problem since with their respective formula, they return a really cold SoC temperature which isn't a problem for the thermal framework. But for future SoC that have a different formula, it could return a critically hot temperature, forcing the thermal framework to shutdown the board. Signed-off-by: Quentin Schulz Acked-by: Maxime Ripard Signed-off-by: Jonathan Cameron drivers/iio/adc/sun4i-gpadc-iio.c | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) commit d632a2bd8ffc3541bf300100d6f553e89fd0eb11 Author: Ismail H. Kose Date: Mon Sep 25 12:14:11 2017 -0700 iio: dac: ds4422/ds4424 dac driver This patch provides an iio device driver for DS4422/DS4424 chips that support two/four channel 7-bit Sink/Source Current DAC. Signed-off-by: Ismail H. Kose Signed-off-by: Ismail H. Kose Signed-off-by: Jonathan Cameron drivers/iio/dac/Kconfig | 9 ++ drivers/iio/dac/Makefile | 1 + drivers/iio/dac/ds4424.c | 341 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 351 insertions(+) commit b091b9ed1b133455dd46346411dfa7526e889a8f Author: Ismail H. Kose Date: Fri Sep 22 13:12:09 2017 -0700 iio:dac: Add DT binding documentation for ds4424 Signed-off-by: Ismail H. Kose Signed-off-by: Ismail H. Kose Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/dac/ds4424.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 7030ea600d560026b91726f2eb79c856b813afa9 Author: Dan Haab Date: Mon Oct 9 09:47:00 2017 -0600 ARM: dts: BCM53573: Add DT for Luxul XAP-1440 This is BCM53573 WiSoC based outdoor access point with an extra BCM43217 chipset used for 2.4 GHz. Signed-off-by: Dan Haab Acked-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts | 50 +++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) commit 0aa052ce1c3340850a7e5980b6d24b3ea5779591 Author: Dan Haab Date: Mon Oct 9 09:46:59 2017 -0600 ARM: dts: BCM53573: Add DT for Luxul XAP-810 This is BCM53573 WiSoC based access point with an extra BCM43217 chipset used for 2.4 GHz. Signed-off-by: Dan Haab Acked-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm47189-luxul-xap-810.dts | 87 ++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) commit 65f78c4c41a9b9a7637e1dda2d5e41cf26ea971c Author: Dan Haab Date: Mon Oct 9 09:46:23 2017 -0600 ARM: dts: BCM5301X: Add DT for Luxul ABR-4500 This is BCM47094 (AKA BCM4709C0) based router with rear-facing ports board design. Signed-off-by: Dan Haab Acked-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts | 63 +++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) commit 1f4b0d5596d2e3ea8e953d578ab8444ce860d35d Author: Dan Haab Date: Mon Oct 9 09:46:22 2017 -0600 ARM: dts: BCM5301X: Add DT for Luxul XBR-4500 This is BCM47094 (AKA BCM4709C0) based router with ports-on-the-front board design. Signed-off-by: Dan Haab Acked-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts | 63 +++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) commit b48be9978e4b21b28b7349f57574dae21378ddd5 Author: Jacob Keller Date: Thu Sep 7 15:19:12 2017 -0700 i40e: fix flags declaration Since we don't yet have more than 32 flags, we'll use a u32 for both the hw_features and flag field. Should we gain more flags in the future, we may need to convert to a u64 or separate flags out into two fields. This was overlooked in the previous commit 2781de2134c4 ("i40e/i40evf: organize and re-number feature flags"), where the feature flag was not converted form u64 to u32. Signed-off-by: Jacob Keller Reviewed-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94bf9e0cbb15c0d8db6c869f09f901b07f01c386 Author: Christos Gkekas Date: Sun Oct 8 19:55:05 2017 +0100 leds: tca6507: Remove unnecessary reg check Variable reg is unsigned so checking whether it is less than zero is not necessary. Signed-off-by: Christos Gkekas Acked-by: Pavel Machek Signed-off-by: Jacek Anaszewski drivers/leds/leds-tca6507.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e8bfe868cf2cf364f3f52df8fa01aa6d28927aaf Author: Ian W MORRISON Date: Sat Oct 7 17:16:08 2017 +1100 Bluetooth: hci_bcm: Correct context of IRQ polarity message As the overwriting of IRQ polarity to active low occurs during the driver probe using 'bt_dev_warn' to display the warning results in '(null)' being displayed for the device. This patch uses 'dev_warn' to correctly display the device in the warning instead. Signed-off-by: Ian W MORRISON Reviewed-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fb9ae8883a39ca176ce08c08994881231dd85ae Author: Maciej Purski Date: Mon Oct 9 09:39:38 2017 +0200 ARM: dts: exynos: Add HDMI and Sil9234 to Trats2 board Add HDMI and Sil9234 MHL converter to Trats2 board. Following in SoC devices have been enabled: - HDMI (HDMI signal encoder), - Mixer (video buffer scanout device), - I2C_5 bus (used for HDMI DDC) - I2C_8 bus (used for HDMI_PHY control). Based on previous work by: Tomasz Stanislawski Signed-off-by: Maciej Purski Reviewed-by: Andrzej Hajda Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4412-trats2.dts | 111 ++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) commit 2e997d8b12d2933d7640bb3a43af8eb6857a73af Merge: 1ee87d7 2809c09 Author: David S. Miller Date: Mon Oct 9 10:47:30 2017 -0700 Merge branch 'ipv6-addrlabel-avoid-dirtying-ip6addrlbl_entry' Eric Dumazet says: ==================== ipv6: addrlabel: avoid dirtying ip6addrlbl_entry The refcount on ip6addrlbl_entry is only used to make sure ip6addrlbl_entry does not disappear while ip6addrlbl_get() is allocating an skb. We can instead allocate skb first, then use RCU, so that we no longer need to refcount these structures. ==================== Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller commit 2809c0957dbbd56d3a92e9ede27b19943fef7236 Author: Eric Dumazet Date: Mon Oct 9 09:52:25 2017 -0700 ipv6: addrlabel: remove refcounting After previous patch ("ipv6: addrlabel: rework ip6addrlbl_get()") we can remove the refcount from struct ip6addrlbl_entry, since it is no longer elevated in p6addrlbl_get() Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrlabel.c | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) commit 66c77ff3a049a1d182c9c78cc6286bb1ceee70db Author: Eric Dumazet Date: Mon Oct 9 09:52:24 2017 -0700 ipv6: addrlabel: rework ip6addrlbl_get() If we allocate skb before the lookup, we can use RCU without the need of ip6addrlbl_hold() This means that the following patch can get rid of refcounting. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrlabel.c | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) commit 1ee87d7a315aaf42b999c376dec508c8b3728b12 Merge: acb40d8 7ba5e7b Author: David S. Miller Date: Mon Oct 9 10:33:06 2017 -0700 Merge branch 'mlx4-static-checker-warnings' Tariq Toukan says: ==================== Fix mlx4 static checker warnings This patchset contains fixes for static checker warnings in the mlx4 Core and Eth drivers. Patch 1 fixes an actual bug discovered by the checker. Patches 2 and 3 fix the warnings without functional changes. Series generated against net-next commit: c49c777f9c87 qed: Delete redundant check on dcb_app priority ==================== Signed-off-by: David S. Miller commit 7ba5e7bd64a5715f624d39815f567842178afb72 Author: Tariq Toukan Date: Mon Oct 9 16:59:50 2017 +0300 net/mlx4_en: Use __force to fix a sparse warning in TX datapath In TX data-path, we intentionally do not byte-swap, as documented in code and in the cited commit log. This fixes sparse warning: en_tx.c:720:23: warning: incorrect type in argument 1 (different base types) en_tx.c:720:23: expected unsigned int [unsigned] [usertype] en_tx.c:720:23: got restricted __be32 [usertype] doorbell_qpn Fixes: 492f5add4be8 ("net/mlx4_en: Doorbell is byteswapped in Little Endian archs") Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b71322d9db924e1ae33b9fd00a2e37aee09df81f Author: Tariq Toukan Date: Mon Oct 9 16:59:49 2017 +0300 net/mlx4_core: Fix cast warning in fw.c Fix the following SPARSE warning, in MLX4_GET() macro: drivers/net/ethernet/mellanox/mlx4/fw.c:233:9: warning: cast to restricted __be64 Fixes: 17d5ceb6e43e ("net/mlx4_core: Fix unaligned accesses") Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/fw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bb428a5c4df5f50acdce89449e476faa0b295e95 Author: Tariq Toukan Date: Mon Oct 9 16:59:48 2017 +0300 net/mlx4: Fix endianness issue in qp context params Should take care of the endianness before assigning to params2 field. Fixes: 53f33ae295a5 ("net/mlx4_core: Port aggregation upper layer interface") Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_resources.c | 2 +- drivers/net/ethernet/mellanox/mlx4/qp.c | 2 +- drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit acb40d8412572b2a79216a98acdbac10e620da1b Author: Mika Westerberg Date: Mon Oct 9 16:22:34 2017 +0300 thunderbolt: Initialize Thunderbolt bus earlier The 0day kbuild robot reports following crash: BUG: unable to handle kernel NULL pointer dereference at 00000004 IP: tb_property_find+0xe/0x41 *pde = 00000000 Oops: 0000 [#1] CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.0-rc1-00741-ge69b6c0 #412 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 task: 89c80000 task.stack: 89c7c000 EIP: tb_property_find+0xe/0x41 EFLAGS: 00210246 CPU: 0 EAX: 00000000 EBX: 7a368f47 ECX: 00000044 EDX: 7a368f47 ESI: 8851d340 EDI: 7a368f47 EBP: 89c7df0c ESP: 89c7defc DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 CR0: 80050033 CR2: 00000004 CR3: 027a2000 CR4: 00000690 Call Trace: tb_register_property_dir+0x49/0xb9 ? cdc_mbim_driver_init+0x1b/0x1b tbnet_init+0x77/0x9f ? cdc_mbim_driver_init+0x1b/0x1b do_one_initcall+0x7e/0x145 ? parse_args+0x10c/0x1b3 ? kernel_init_freeable+0xbe/0x159 kernel_init_freeable+0xd1/0x159 ? rest_init+0x110/0x110 kernel_init+0xd/0xd0 ret_from_fork+0x19/0x30 The reason is that both Thunderbolt bus and thunderbolt-net are build into the kernel image, and the latter is linked first because drivers/net comes before drivers/thunderbolt. Since both use module_init() thunderbolt-net ends up calling Thunderbolt bus functions too early triggering the above crash. Fix this by moving Thunderbolt bus initialization to happen earlier to make sure all the data structures are ready when Thunderbolt service drivers are initialized. To be on the safe side also add a check for properly initialized xdomain_property_dir to tb_register_property_dir(). Reported-by: kernel test robot Signed-off-by: Mika Westerberg Signed-off-by: David S. Miller drivers/thunderbolt/nhi.c | 2 +- drivers/thunderbolt/xdomain.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit bfd8e5a407133e58a92a38ccf3d0ba6db81f22d8 Author: Eric Dumazet Date: Mon Oct 9 06:01:37 2017 -0700 ipv6: avoid zeroing per cpu data again per cpu allocations are already zeroed, no need to clear them again. Fixes: d52d3997f843f ("ipv6: Create percpu rt6_info") Signed-off-by: Eric Dumazet Cc: Martin KaFai Lau Cc: Tejun Heo Acked-by: Tejun Heo Acked-by: Martin KaFai Lau Signed-off-by: David S. Miller net/ipv6/route.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 410a619adc1a7032e264d991feecb8d42aca89e4 Merge: 9056184 1e28eaa Author: David S. Miller Date: Mon Oct 9 10:21:27 2017 -0700 Merge branch 'qed-Add-iWARP-support-for-unaligned-MPA-packets' Michal Kalderon says: ==================== qed: Add iWARP support for unaligned MPA packets This patch series adds support for handling unaligned MPA packets. (FPDUs split over more than one tcp packet). When FW detects a packet is unaligned it fowards the packet to the driver via a light l2 dedicated connection. The driver then stores this packet until the remainder of the packet is received. Once the driver reconstructs the full FPDU, it sends it down to fw via the ll2 connection. Driver also breaks down any packed PDUs into separate packets for FW. Patches 1-6 are all slight modifications to ll2 to support additional requirements for the unaligned MPA ll2 client. Patch 7 opens the additional ll2 connection for iWARP. Patches 8-12 contain the algorithm for aligning packets. ==================== Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 1e28eaad07ea1e2d6537586529e87cbc1d698ffd Author: Michal Kalderon Date: Mon Oct 9 12:37:54 2017 +0300 qed: Add iWARP support for fpdu spanned over more than two tcp packets We continue to maintain a maximum of three buffers per fpdu, to ensure that there are enough buffers for additional unaligned mpa packets. To support this, if a fpdu is split over more than two tcp packets, we use an intermediate buffer to copy the data to the previous buffer, then we can release the data. We need an intermediate buffer as the initial buffer partial packet could be located at the end of the packet, not leaving room for additional data. This is a corner case, and will usually not be the case. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 193 ++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_iwarp.h | 1 + 2 files changed, 194 insertions(+) commit c7d1d839999476aac0d7e16732722285a9c30cce Author: Michal Kalderon Date: Mon Oct 9 12:37:53 2017 +0300 qed: Add support for MPA header being split over two tcp packets There is a special case where an MPA header is split over to tcp packets, in this case we need to wait for the next packet to get the fpdu length. We use the incomplete_bytes to mark this fpdu as a "special" one which requires updating the length with the next packet Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 36 ++++++++++++++++++++++++++++- drivers/net/ethernet/qlogic/qed/qed_iwarp.h | 6 +++++ 2 files changed, 41 insertions(+), 1 deletion(-) commit d531038eeb6dd25dbf88402f932bf0ea524de82e Author: Michal Kalderon Date: Mon Oct 9 12:37:52 2017 +0300 qed: Add support for freeing two ll2 buffers for corner cases When posting a packet on the ll2 tx, we can provide a cookie that will be returned upon tx completion. This cookie is the ll2 iwarp buffer which is then reposted to the rx ring. Part of the unaligned mpa flow is determining when a buffer can be reposted. Each buffer needs to be sent only once as a cookie for on the tx ring. In packed fpdu case, only the last packet will be sent with the buffer, meaning we need to handle the case that a cookie can be NULL on tx complete. In addition, when a fpdu splits over two buffers, but there are no more fpdus on the second buffer, two buffers need to be provided as a cookie. To avoid changing the ll2 interface to provide two cookies, we introduce a piggy buf pointer, relevant for iWARP only, that holds a pointer to a second buffer that needs to be released during tx completion. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 25 +++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_iwarp.h | 1 + 2 files changed, 26 insertions(+) commit 469981b17a4f8ddac91837bd74ebc98578f2ddbf Author: Michal Kalderon Date: Mon Oct 9 12:37:51 2017 +0300 qed: Add unaligned and packed packet processing The fpdu data structure is preallocated per connection. Each connection stores the current status of the connection: either nothing pending, or there is a partial fpdu that is waiting for the rest of the fpdu (incomplete bytes != 0). The same structure is also used for splitting a packet when there are packed fpdus. The structure is initialized with all data required for sending the fpdu back to the FW. A fpdu will always be spanned across a maximum of 3 tx bds. One for the header, one for the partial fdpu received and one for the remainder (unaligned) packet. In case of packed fpdu's, two fragments are used, one for the header and one for the data. Corner cases are not handled in the patch for clarity, and will be added as a separate patch. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 257 ++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_iwarp.h | 13 ++ 2 files changed, 270 insertions(+) commit fcb39f6c10b24d2d16d4c2bdb4c256bc21b8a131 Author: Michal Kalderon Date: Mon Oct 9 12:37:50 2017 +0300 qed: Add mpa buffer descriptors for storing and processing mpa fpdus The mpa buff is a descriptor for iwarp ll2 buffers that contains additional information required for aligining fpdu's. In some cases, an additional packet will arrive which will complete the alignment of a fpdu, but we won't be able to post the fpdu due to insufficient place on the tx ring. In this case we can't loose the data and require storing it for later. Processing is therefore done in two places, during rx completion, where we initialize a mpa buffer descriptor and add it to the pending list, and during tx-completion, since we free up an entry in the tx chain we can process any pending mpa packets. The mpa buff descriptors are pre-allocated since we have to ensure that we won't reach a state where we can't store an incoming unaligned packet. All packets received on the ll2 MUST be processed by the driver at some stage. Since they are preallocated, we hold a free list. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 116 ++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_iwarp.h | 11 +++ 2 files changed, 127 insertions(+) commit ae3488ff37dc4f21985111f442d26a8805e56d45 Author: Michal Kalderon Date: Mon Oct 9 12:37:49 2017 +0300 qed: Add ll2 connection for processing unaligned MPA packets This patch adds only the establishment and termination of the ll2 connection that handles unaligned MPA packets. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 65 +++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_iwarp.h | 1 + 2 files changed, 66 insertions(+) commit 6f34a284f36399501fcc034dc4522a2d8d9fa6c9 Author: Michal Kalderon Date: Mon Oct 9 12:37:48 2017 +0300 qed: Add LL2 slowpath handling For iWARP unaligned MPA flow, a slowpath event of flushing an MPA connection that entered an unaligned state is required. The flush ramrod is received on the ll2 queue, and a pre-registered callback function is called to handle the flush event. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 40 +++++++++++++++++++++++++++++-- include/linux/qed/qed_ll2_if.h | 5 ++++ 2 files changed, 43 insertions(+), 2 deletions(-) commit 89d65113097072de7936a2aea2f819818a7c987a Author: Michal Kalderon Date: Mon Oct 9 12:37:47 2017 +0300 qed: Add the source of a packet sent on an iWARP ll2 connection When a packet is sent back to iWARP FW via the tx ll2 connection the FW needs to know the source of the packet. Whether it is OOO or unaligned MPA related. Since OOO is implemented entirely inside the ll2 code (and shared with iSCSI), packets are marked as IN_ORDER inside the ll2 code. For unaligned mpa the value will be determined in the iWARP code and sent on the pkt->vlan field. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 6df60fe703c348a507b0030b92c2947e68e1c589 Author: Michal Kalderon Date: Mon Oct 9 12:37:46 2017 +0300 qed: Fix initialization of ll2 offload feature enable_ip_cksum, enable_l4_cksum, calc_ip_len were added in commit stated below but not passed through to FW. This was OK until now as it wasn't used, but is required for the iWARP unaligned flow Fixes:7c7973b2ae27 ("qed: LL2 to use packed information for tx") Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 3 +++ 1 file changed, 3 insertions(+) commit 77caa792f5d8e4ecc88eb1cf4b9c478c07e0ec57 Author: Michal Kalderon Date: Mon Oct 9 12:37:45 2017 +0300 qed: Add ll2 option for dropping a tx packet The option of sending a packet on the ll2 and dropping it exists in hardware and was not used until now, thus not exposed. The iWARP unaligned MPA flow requires this functionality for flushing the tx queue. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 16 ++++++++++++++-- include/linux/qed/qed_ll2_if.h | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) commit ed468ebee04ffba0231a8f50616bdb250752a891 Author: Michal Kalderon Date: Mon Oct 9 12:37:44 2017 +0300 qed: Add ll2 ability of opening a secondary queue When more than one ll2 queue is opened ( that is not an OOO queue ) ll2 code does not have enough information to determine whether the queue is the main one or not, so a new field is added to the acquire input data to expose the control of determining whether the queue is the main queue or a secondary queue. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 7 ++++++- drivers/net/ethernet/qlogic/qed/qed_ll2.h | 1 + include/linux/qed/qed_ll2_if.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) commit f5823fe6897c444265ef3919d8684b647eef904f Author: Michal Kalderon Date: Mon Oct 9 12:37:43 2017 +0300 qed: Add ll2 option to limit the number of bds per packet iWARP uses 3 ll2 connections, the maximum number of bds is known during connection setup. This patch modifies the static array in the ll2_tx_packet descriptor to be a flexible array and significantlly reduces memory size. In addition, some redundant fields in the ll2_tx_packet were removed, which also contributed to decreasing the descriptor size. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_ll2.c | 29 +++++++++++++++++++++-------- drivers/net/ethernet/qlogic/qed/qed_ll2.h | 9 +++------ 2 files changed, 24 insertions(+), 14 deletions(-) commit 905618437da4d166e296fb24d66e8e7b79f541ef Merge: 31070e7 593bc28 Author: David S. Miller Date: Mon Oct 9 10:18:12 2017 -0700 Merge branch 'mlxsw-Offload-bridge-device-mrouter' Jiri Pirko says: ==================== mlxsw: Offload bridge device mrouter Yotam says: Similarly to a bridged port, the bridge device itself can be configured by the user to be an mrouter port. In this case, all multicast traffic should be forwarded to it. Make the mlxsw Spectrum driver offload these directives to the Spectrum hardware. Patches 1 and 2 add a new switchdev notification for bridge device mrouter port status and make the bridge module notify about it. Patches 3-5 change the mlxsw Spectrum driver to handle these notifications by adding the Spectrum router port to the bridge MDB entries. v1->v2: - patch1: - Don't add the MDB_RTR_TYPE_TEMP state and use the timer_pending to distinguish between learning-on and learning-off states ==================== Signed-off-by: David S. Miller commit 593bc28ae211b864e7e0720ffc65a14cc5cff101 Author: Yotam Gigi Date: Mon Oct 9 11:15:35 2017 +0200 mlxsw: spectrum_switchdev: Support bridge mrouter notifications Support the SWITCHDEV_ATTR_ID_BRIDGE_MROUTER port attribute switchdev notification. To do that, add the mrouter flag to struct mlxsw_sp_bridge_device, which indicates whether the bridge device was set to be mrouter port. This field is set when: - A new bridge is created, where the value is taken from the kernel bridge value. - A switchdev SWITCHDEV_ATTR_ID_BRIDGE_MROUTER notification is sent. In addition, change the bridge MID entries to include the router port when the bridge device is configured to be mrouter port. The MID entries are updated in the following cases: - When a new MID entry is created, update the router port according to the bridge mrouter state. - When a SWITCHDEV_ATTR_ID_BRIDGE_MROUTER notification is sent, update all the bridge's MID entries. This is aligned with the case where a bridge slave is configured to be mrouter port. Signed-off-by: Yotam Gigi Reviewed-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 65 +++++++++++++++++++++- 1 file changed, 63 insertions(+), 2 deletions(-) commit c4db953f00f09003519ac1fb078f3b5f57b32e3c Author: Yotam Gigi Date: Mon Oct 9 11:15:34 2017 +0200 mlxsw: spectrum_switchdev: Add support for router port in SMID entries In Spectrum, MDB entries point to MID entries, that indicate which ports a packet should be forwarded to. Add the support in creating MID entries that forward the packet to the Spectrum router port. This will be later used to handle the bridge mrouter port switchdev notifications. Signed-off-by: Yotam Gigi Reviewed-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit b35750f19102271485af9092b800863164dd4be0 Author: Yotam Gigi Date: Mon Oct 9 11:15:33 2017 +0200 mlxsw: spectrum: router: Export the mlxsw_sp_router_port function In Spectrum hardware, the router port is a virtual port that is the gateway to the routing mechanism. Hence, in order for a packet to be L3 forwarded, it must first be L2 forwarded to the router port inside the hardware. Further patches in this patchset are going to introduce support in bridge device used as an mrouter port. In this case, the router port index will be needed in order to update the MDB entries to include the router port. Thus, export the mlxsw_sp_router_port function, which returns the index of the Spectrum router port. Signed-off-by: Yotam Gigi Reviewed-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 0912bda436388a02c72164b4b490b578e64c012e Author: Yotam Gigi Date: Mon Oct 9 11:15:32 2017 +0200 net: bridge: Export bridge multicast router state Add an access function that, given a bridge netdevice, returns whether the bridge device is currently an mrouter or not. The function uses the already existing br_multicast_is_router function to check that. This function is needed in order to allow ports that join an already existing bridge to know the current mrouter state of the bridge device. Together with the bridge device mrouter ports switchdev notifications, it is possible to have full offloading of the semantics of the bridge device mcast router state. Due to the fact that the bridge multicast router status can change in packet RX path, take the multicast_router bridge spinlock to protect the read. Signed-off-by: Yotam Gigi Reviewed-by: Nogah Frankel Reviewed-by: Nikolay Aleksandrov Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/linux/if_bridge.h | 5 +++++ net/bridge/br_multicast.c | 12 ++++++++++++ 2 files changed, 17 insertions(+) commit 77041420751fe6d4acf2103b245dcc2b4b7b8360 Author: Yotam Gigi Date: Mon Oct 9 11:15:31 2017 +0200 net: bridge: Notify on bridge device mrouter state changes Add the SWITCHDEV_ATTR_ID_BRIDGE_MROUTER switchdev notification type, used to indicate whether the bridge is or isn't mrouter. Notify when the bridge changes its state, similarly to the already existing bridged port mrouter notifications. The notification uses the switchdev_attr.u.mrouter boolean flag to indicate the current bridge mrouter status. Thus, it only indicates whether the bridge is currently used as an mrouter or not, and does not indicate the exact mrouter state of the bridge (learning, permanent, etc.). Signed-off-by: Yotam Gigi Signed-off-by: Jiri Pirko Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/net/switchdev.h | 1 + net/bridge/br_multicast.c | 38 +++++++++++++++++++++++++++++++++++--- 2 files changed, 36 insertions(+), 3 deletions(-) commit b64666ae00327efe53613fc180df6ffbeee1d8d1 Author: Emil Tantilov Date: Fri Sep 29 10:55:42 2017 -0700 ixgbe: fix crash when injecting AER after failed reset In case where AER recovery fails the device is left in a down state. Consecutive AER error injection can lead to a double IRQ free. 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 b4ded8327fea82b53fcec39e0845011246d020f4 Author: Alexander Duyck Date: Mon Sep 25 14:55:36 2017 -0700 ixgbe: Update adaptive ITR algorithm The following change is meant to update the adaptive ITR algorithm to better support the needs of the network. Specifically with this change what I have done is make it so that our ITR algorithm will try to prevent either starving a socket buffer for memory in the case of Tx, or overrunning an Rx socket buffer on receive. In addition a side effect of the calculations used is that we should function better with new features such as XDP which can handle small packets at high rates without needing to lock us into NAPI polling mode. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 7 + drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 11 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 215 +++++++++++++++++++------- 3 files changed, 178 insertions(+), 55 deletions(-) commit c3aec05dfe2cb1bc1fdf3593da82bc987211338a Author: Emil Tantilov Date: Mon Sep 11 14:21:36 2017 -0700 ixgbe: fix the FWSM.PT check in ixgbe_mng_present() Bits other than FWSM.PT can be set in IXGBE_SWFW_MODE_MASK making the previous check invalid. Change the check for MNG present to be only based on FWSM.PT bit. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dcfd6b839c998bc9838e2a47f44f37afbdf3099c Author: Emil Tantilov Date: Mon Sep 11 14:21:31 2017 -0700 ixgbe: fix use of uninitialized padding This patch is resolving Coverity hits where padding in a structure could be used uninitialized. - Initialize fwd_cmd.pad/2 before ixgbe_calculate_checksum() - Initialize buffer.pad2/3 before ixgbe_hic_unlocked() Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 4 ++-- drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) commit 86e23494222f358138e3d2c337f57577b0893797 Author: Jesper Dangaard Brouer Date: Mon Sep 4 20:40:22 2017 +0200 ixgbe: add counter for times Rx pages gets allocated, not recycled The ixgbe driver have page recycle scheme based around the RX-ring queue, where a RX page is shared between two packets. Based on the refcnt, the driver can determine if the RX-page is currently only used by a single packet, if so it can then directly refill/recycle the RX-slot by with the opposite "side" of the page. While this is a clever trick, it is hard to determine when this recycling is successful and when it fails. Adding a counter, which is available via ethtool --statistics as 'alloc_rx_page'. Which counts the number of times the recycle fails and the real page allocator is invoked. When interpreting the stats, do remember that every alloc will serve two packets. The counter is collected per rx_ring, but is summed and ethtool exported as 'alloc_rx_page'. It would be relevant to know what rx_ring that cannot keep up, but that can be exported later if someone experience a need for this. Signed-off-by: Jesper Dangaard Brouer Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++++ 3 files changed, 7 insertions(+) commit 595f3a9de5815d38198136491fa50a8ee1700b7d Author: Helge Deller Date: Mon Oct 9 09:54:14 2017 -0700 ti_sci: Use %pS printk format for direct addresses Use the %pS printk format for printing symbols from direct addresses. This is important for the ia64, ppc64 and parisc64 architectures, while on other architectures there is no difference between %pS and %pF. Fix it for consistency across the kernel. Signed-off-by: Helge Deller Acked-by: Nishanth Menon Signed-off-by: Santosh Shilimkar drivers/firmware/ti_sci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31070e7fa0d9d2ae1d5d16a5ba980529fac7b6f9 Merge: 1c3dc89 2de1be1 Author: David S. Miller Date: Mon Oct 9 09:51:03 2017 -0700 Merge branch 'nfp-bpf-ABIv2-and-multi-port' Jakub Kicinski says: ==================== nfp: bpf ABIv2 and multi port This series migrates our eBPF offload from old PoC firmware to a redesigned, faster and more feature rich FW. Marking support is dropped for now. We have to teach the JIT about encoding local memory accesses (one of NFP memory types). There is also code to populate the ECC of instructions (PoC had ECC protection on instruction store disabled). There is also a minor ld_field fix and all 64 bit shifts can now be encoded. ==================== Signed-off-by: David S. Miller commit 2de1be1db25d3285f514920230790be20db92887 Author: Jakub Kicinski Date: Sun Oct 8 21:04:17 2017 -0700 nfp: bpf: pass dst register to ld_field instruction ld_field instruction is a bit special because the encoding uses two source registers and one of them becomes the output. We do need to pass the dst register to our encoding helpers though, otherwise the "write both banks" flag will not be observed. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2e85d3884f25a0419a941676d1a7c25779884be2 Author: Jakub Kicinski Date: Sun Oct 8 21:04:16 2017 -0700 nfp: bpf: byte swap the instructions Device expects the instructions in little endian. Make sure we byte swap on big endian hosts. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1c03e03f9b5278701d4a0e3444b2de3b9ddc244b Author: Jakub Kicinski Date: Sun Oct 8 21:04:15 2017 -0700 nfp: bpf: pad code with valid nops We need to append up to 8 nops after last instruction to make sure the CPU will not fetch garbage instructions with invalid ECC if the code store was not initialized. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 12 +++++++++++- drivers/net/ethernet/netronome/nfp/nfp_asm.h | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) commit fd068ddc888355dccd90ad610104e4addf23b7a3 Author: Jakub Kicinski Date: Sun Oct 8 21:04:14 2017 -0700 nfp: bpf: calculate code store ECC In the initial PoC firmware I simply disabled ECC on the instruction store. Do the ECC calculation for generated instructions in the driver. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 20 +++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_asm.c | 37 ++++++++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_asm.h | 3 +++ 3 files changed, 60 insertions(+) commit 18e53b6cb9ac157f4b2c7db698d4adc064df2fa0 Author: Jakub Kicinski Date: Sun Oct 8 21:04:13 2017 -0700 nfp: bpf: move to datapath ABI version 2 Datapath ABI version 2 stores the packet information in LMEM instead of NNRs. We also have strict restrictions on which GPRs we can use. Only GPRs 0-23 are reserved for BPF. Adjust the static register locations and "ABI" registers. Note that packet length is packed with other info so we have to extract it into one of the scratch registers, OTOH since LMEM can be used in restricted operands we don't have to extract packet pointer. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 19 +++++++++--------- drivers/net/ethernet/netronome/nfp/bpf/main.h | 24 ++++++++++++++--------- drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h | 2 +- 3 files changed, 26 insertions(+), 19 deletions(-) commit 995e101ffa71eff6ae5f5d5bf1ca8ec757b4ed21 Author: Jakub Kicinski Date: Sun Oct 8 21:04:12 2017 -0700 nfp: bpf: encode extended LM pointer operands Most instructions have special fields which allow switching between base and extended Local Memory pointers. Introduce those to register encoding, we will use the extra LM pointers to access high addresses of the stack. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 56 +++++++++++++++++++--------- drivers/net/ethernet/netronome/nfp/nfp_asm.c | 6 +++ drivers/net/ethernet/netronome/nfp/nfp_asm.h | 28 ++++++++++++-- 3 files changed, 70 insertions(+), 20 deletions(-) commit 9f15d0f438372986b0f9de36f805fe2dd83f9c27 Author: Jakub Kicinski Date: Sun Oct 8 21:04:11 2017 -0700 nfp: bpf: encode LMEM accesses NFP LMEM is a large, indirectly accessed register file. There are two basic indirect access registers. Each access operation may either use offset (up to 8 or 16 words) or perform post decrement/increment. Add encodings of LMEM indexes as instruction operands. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_asm.c | 44 ++++++++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_asm.h | 41 ++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) commit 8afd9c961e95b1529cbc2b2b9c063a488659b337 Author: Jakub Kicinski Date: Sun Oct 8 21:04:10 2017 -0700 nfp: add more white space to the instruction defines We need to add longer OP_* defines, move the values away. Purely whitespace commit. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_asm.h | 156 +++++++++++++-------------- 1 file changed, 78 insertions(+), 78 deletions(-) commit 509144e25049831ffe94160b1f03cf1b900aaa3c Author: Jakub Kicinski Date: Sun Oct 8 21:04:09 2017 -0700 nfp: bpf: remove packet marking support Temporarily drop support for skb->mark. We are primarily focusing on XDP offload, and implementing skb->mark on the new datapath has lower priority. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 13 ------------- drivers/net/ethernet/netronome/nfp/bpf/main.h | 3 +-- 2 files changed, 1 insertion(+), 15 deletions(-) commit 226e0e94ce3575bd9ca85f90957516ac1dff5bf3 Author: Jakub Kicinski Date: Sun Oct 8 21:04:08 2017 -0700 nfp: bpf: remove register rename Remove the register renumbering optimization. To implement calling map and other helpers we need more strict register layout. We can't freely reassign register numbers. This will have the effect of running in 4 context/thread mode, which should be OK since we are moving towards integrating the BPF closer with FW app datapath anyway, and the target datapath itself runs in 4 context mode. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 46 ++-------------------------- 1 file changed, 3 insertions(+), 43 deletions(-) commit 3cae13193381fd4cb87791174d4c9fdf5b7025ff Author: Jakub Kicinski Date: Sun Oct 8 21:04:07 2017 -0700 nfp: bpf: encode all 64bit shifts Add encodings of all 64bit shift operations. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 48 +++++++++++++++++++++------- 1 file changed, 36 insertions(+), 12 deletions(-) commit 2a15bb1aba2bfca0a69cdbb113def57afd5666ab Author: Jakub Kicinski Date: Sun Oct 8 21:04:06 2017 -0700 nfp: bpf: move software reg helpers and cmd table out of translator Move the software reg helpers and some static data to nfp_asm.c. They are related to the previous patch, but move is done in a separate commit for ease of review. 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/bpf/jit.c | 147 ----------------------- drivers/net/ethernet/netronome/nfp/nfp_asm.c | 167 +++++++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/nfp_asm.h | 24 ++++ 4 files changed, 192 insertions(+), 147 deletions(-) commit b3f868df3c8904e964d7b257b47d7d90d93375e0 Author: Jakub Kicinski Date: Sun Oct 8 21:04:05 2017 -0700 nfp: bpf: use the power of sparse to check we encode registers right Define a new __bitwise type for software representation of registers. This will allow us to catch incorrect parameter types using sparse. Accessors we define also allow us to return correct enum type and therefore ensure all switches handle all register types. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/jit.c | 99 ++++++++++++++------------- drivers/net/ethernet/netronome/nfp/bpf/main.h | 24 +------ drivers/net/ethernet/netronome/nfp/nfp_asm.h | 45 ++++++++++++ 3 files changed, 99 insertions(+), 69 deletions(-) commit a52b35c39ec6f33592df634ef2d1afae23401fdd Author: Jakub Kicinski Date: Sun Oct 8 21:04:04 2017 -0700 nfp: bpf: lift the single-port limitation Limiting the eBPF offload to a single port was a workaround required for the PoC application FW which has not been released externally. It's not necessary any more. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/bpf/main.c | 8 -------- 1 file changed, 8 deletions(-) commit 3a4b0129bf33caca5743891906393f17a2224d44 Author: Jakub Kicinski Date: Sun Oct 8 21:04:03 2017 -0700 nfp: output control messages to trace_devlink_hwmsg() Use standard devlink trace point to allow tracing of control messages. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_app.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1c3dc891c151110bcda4d27cec6d5c560a59bb92 Merge: c49c777 1db9b1b Author: David S. Miller Date: Mon Oct 9 09:46:54 2017 -0700 Merge branch 'hns3-cleanups' Yunsheng Lin says: ==================== A few cleanup for hns3 ethernet driver This patchset contains a few cleanup for hns3 ethernet driver. No functional change intended. ==================== Signed-off-by: David S. Miller commit 1db9b1bf82b98cb265ed227dec3732aafae0eb0c Author: Yunsheng Lin Date: Mon Oct 9 15:44:01 2017 +0800 net: hns3: Cleanup for non-static function in hns3 driver This patch fixes the following warning from sparse: warning: symbol 'hns3_set_multicast_list' was not declared. Should it be static. hns3_set_multicast_list turns out to be not used, so delete it. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 4 ++-- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 14 +++++++------- .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 20 ++++---------------- .../ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 4 ++-- 4 files changed, 15 insertions(+), 27 deletions(-) commit a90bb9a5ea1db7f10096e7573b7d45295ad4eada Author: Yunsheng Lin Date: Mon Oct 9 15:44:00 2017 +0800 net: hns3: Cleanup for endian issue in hns3 driver This patch fixes a lot of endian issues detected by sparse. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 8 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 10 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 206 ++++++++++++--------- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 26 ++- .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 4 +- 5 files changed, 145 insertions(+), 109 deletions(-) commit d44f9b631fbc137b1b16a22318ceb136f934db48 Author: Yunsheng Lin Date: Mon Oct 9 15:43:59 2017 +0800 net: hns3: Cleanup for struct that used to send cmd to firmware The hclge_tm module has already added _cmd to the end of struct that used to send cmd to firmware. This will help us finding the endian issues. This patch adds the _cmd to the end of struct that used to send cmd to firmware in hclge_main module. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 4 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 72 ++++----- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 163 +++++++++++---------- 3 files changed, 120 insertions(+), 119 deletions(-) commit 5392902d332b85a93e3be2755f7f6df183e5cafc Author: Yunsheng Lin Date: Mon Oct 9 15:43:58 2017 +0800 net: hns3: Consistently using GENMASK in hns3 driver This patch uses GENMASK to generate bit mask whenever possible in hns3 driver. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 48 +++++++++++----------- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 4 +- 2 files changed, 26 insertions(+), 26 deletions(-) commit 56cf68c73019ec3f04b1ae69f76f524918fb22cb Author: Yunsheng Lin Date: Mon Oct 9 15:43:57 2017 +0800 net: hns3: Cleanup indentation for Kconfig in the the hisilicon folder This patch fixes a few indentation for Kconfig file in the hisilicon folder. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9780cb97afd868fb11500f38826b7f30d554535c Author: Yunsheng Lin Date: Mon Oct 9 15:43:56 2017 +0800 net: hns3: Add hns3_get_handle macro in hns3 driver There are many places that will need to get the handle of netdev, so add a macro to get the handle of netdev. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hns3_dcbnl.c | 18 ++++------ .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 39 ++++++++-------------- .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.h | 3 ++ .../ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c | 38 ++++++++------------- 4 files changed, 35 insertions(+), 63 deletions(-) commit 5bca3b94dfbf9259d972a5be91333dda6eb9f350 Author: Yunsheng Lin Date: Mon Oct 9 15:43:55 2017 +0800 net: hns3: Cleanup for shifting true in hns3 driver This patch fixes a shifting true in hclge_main module. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fc88a0631ed0f5b1862d42fb8f2455bf3d18744b Author: Vignesh R Date: Mon Oct 9 09:43:32 2017 -0700 ARM: configs: keystone: Enable TIECAP PWM driver Enable PWM_TIECAP driver to support ECAP IP present in 66AK2G SoC. Signed-off-by: Vignesh R Signed-off-by: Santosh Shilimkar arch/arm/configs/keystone_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 761c2a48c70d871b0622dccaa20ccad024101a51 Author: Emil Tantilov Date: Tue Aug 29 12:21:48 2017 -0700 ixgbe: split Tx/Rx ring clearing for ethtool loopback test Commit: fed21bcee7a5 ("ixgbe: Don't bother clearing buffer memory for descriptor rings) exposed some issues with the logic in the current implementation of ixgbe_clean_test_rings() that are being addressed in this patch: - Split the clearing of the Tx and Rx rings in separate loops. Previously both Tx and Rx rings were cleared in a rx_desc->wb.upper.length based loop which could lead to issues if for w/e reason packets were received outside of the frames transmitted for the loopback test. - Add check for IXGBE_TXD_STAT_DD to avoid clearing the rings if the transmits have not comlpeted by the time we enter ixgbe_clean_test_rings() - Exit early on ixgbe_check_lbtest_frame() failure. This change fixes a crash during ethtool diagnostic (ethtool -t). Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 53 +++++++++++++++--------- 1 file changed, 34 insertions(+), 19 deletions(-) commit c69be946d687a99dbc891ebc66539c1c2f082c1d Author: Emil Tantilov Date: Fri Aug 18 15:48:02 2017 -0700 ixgbe: add error checks when initializing the PHY Ignoring errors when attempting to identify the PHY can lead to a crash. Specifically in the case of FW controlled PHYs where the PHY read/write operations are set to NULL. Removed redundant comment. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f5a71caa1763cc8fd1b108234689d6a7e4fe9d2f Author: Shannon Nelson Date: Tue Aug 15 08:59:54 2017 -0700 ixgbe: restore normal RSS after last macvlan offload is removed Just like when the last VF is removed, we need to restore normal operations after the last macvlan offload is removed, else we get stuck in single queue operations. To test: ethtool -l eth1 # note the number of queues in use, ~= cpus ethtool -K eth1 l2-fwd-offload on ip link add mv1 link eth1 type macvlan mode bridge ip link set dev mv1 up ip link del mv1 ethtool -l eth1 # are we back to the same # of queues, or stuck on 1? Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 2e033eace7557a4b67ba1cb2746bd87d6ca2620b Author: Bhumika Goyal Date: Mon Jul 17 20:31:18 2017 +0530 ixgbe: declare ixgbe_mac_operations structures as const Declare ixgbe_mac_operations structures as const as they are only stored in the mac_ops field of ixgbe_info structure. This field is of type const and therefore ixgbe_mac_operations structure can be made const too. Signed-off-by: Bhumika Goyal Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2e22a75c55c1e70f36e21d4fa4e165af7f356aa9 Author: Emil Tantilov Date: Wed Jul 5 15:57:30 2017 -0700 ixgbe: Clear SWFW_SYNC register during init Added clearing of SW resource bits in the SW/FW synchronization register to ixgbe_init_swfw_sync_X540(). Updated ixgbe_acquire_swfw_sync_X540 SW Manageability host interface resource bit error case to match the error handling of the other SW resource bits. Which is to release the SW resource bits if SW times out while attempting to acquire the resource. This allows the driver to load in cases where the semaphore bits could be stuck after a reset or a crash. Signed-off-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 55c0fcc3de4605d7fd837ba3decbb4b2eaa8dc81 Author: Kees Cook Date: Wed Oct 4 17:51:54 2017 -0700 net/mlx4_core: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Tariq Toukan Cc: netdev@vger.kernel.org Cc: linux-rdma@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook Signed-off-by: Doug Ledford drivers/net/ethernet/mellanox/mlx4/catas.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 6d290d69ac52b3b311d2ef0da4825dc6f1ea8997 Author: Kees Cook Date: Wed Oct 4 17:45:54 2017 -0700 IB/ipoib: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Doug Ledford Cc: Sean Hefty Cc: Hal Rosenstock Cc: Leon Romanovsky Cc: Alex Vesker Cc: Erez Shitrit Cc: Zhu Yanjun Cc: Dasaratharaman Chandramouli Cc: Paolo Abeni Cc: Ira Weiny Cc: Yuval Shaia Cc: linux-rdma@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib.h | 2 +- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 6 ++++-- drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) commit 605cbb2c443f68b1eb74e4cfdf6c15d7d965f00a Author: Kees Cook Date: Wed Oct 4 17:45:41 2017 -0700 RDMA/i40iw: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Faisal Latif Cc: Shiraz Saleem Cc: Doug Ledford Cc: Sean Hefty Cc: Hal Rosenstock Cc: linux-rdma@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook Acked-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 1 + drivers/infiniband/hw/i40iw/i40iw_type.h | 1 + drivers/infiniband/hw/i40iw/i40iw_utils.c | 10 +++++----- 3 files changed, 7 insertions(+), 5 deletions(-) commit 4037c92f0a3022825e56f60d09f05e2ab37ccd7e Author: Kees Cook Date: Wed Oct 4 17:45:35 2017 -0700 IB/qib: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() helper to pass the timer pointer explicitly. Cc: Mike Marciniszyn Cc: Doug Ledford Cc: Sean Hefty Cc: Hal Rosenstock Cc: linux-rdma@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib.h | 4 ++-- drivers/infiniband/hw/qib/qib_7220.h | 1 + drivers/infiniband/hw/qib/qib_driver.c | 9 ++++----- drivers/infiniband/hw/qib/qib_iba6120.c | 19 +++++++++---------- drivers/infiniband/hw/qib/qib_iba7220.c | 20 ++++++++++---------- drivers/infiniband/hw/qib/qib_iba7322.c | 17 ++++++++--------- drivers/infiniband/hw/qib/qib_init.c | 29 +++++++++++------------------ drivers/infiniband/hw/qib/qib_intr.c | 6 +++--- drivers/infiniband/hw/qib/qib_mad.c | 12 +++++------- drivers/infiniband/hw/qib/qib_sd7220.c | 10 ++++------ drivers/infiniband/hw/qib/qib_tx.c | 4 ++-- drivers/infiniband/hw/qib/qib_verbs.c | 6 +++--- 12 files changed, 62 insertions(+), 75 deletions(-) commit f0309de91aeb5271c920e768f56e4d2a12be30f5 Author: Kees Cook Date: Wed Oct 4 17:45:27 2017 -0700 RDMA/nes: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. A pointer from nesadapter back to nesdev was added. Cc: Faisal Latif Cc: Doug Ledford Cc: Sean Hefty Cc: Hal Rosenstock Cc: linux-rdma@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook Signed-off-by: Doug Ledford drivers/infiniband/hw/nes/nes.h | 6 +++--- drivers/infiniband/hw/nes/nes_cm.c | 5 ++--- drivers/infiniband/hw/nes/nes_hw.c | 20 ++++++++------------ drivers/infiniband/hw/nes/nes_hw.h | 1 + drivers/infiniband/hw/nes/nes_mgt.c | 9 +++++---- drivers/infiniband/hw/nes/nes_nic.c | 3 +-- drivers/infiniband/hw/nes/nes_utils.c | 11 +++++------ drivers/infiniband/hw/nes/nes_verbs.c | 10 ++++------ 8 files changed, 29 insertions(+), 36 deletions(-) commit 6b9f8970cd30929cb6b372fa44fa66da9e59c650 Author: Doug Ledford Date: Mon Oct 9 09:11:32 2017 -0400 IB/rxe: put the pool on allocation failure If the allocation of elem fails, it is not sufficient to simply check for NULL and return. We need to also put our reference on the pool or else we will leave the pool with a permanent ref count and we will never be able to free it. Fixes: 4831ca9e4a8e ("IB/rxe: check for allocation failure on elem") Suggested-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_pool.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 84e8978e62fea661787a216e7fe9abac8f1e056e Author: Matthew Auld Date: Mon Oct 9 12:00:24 2017 +0100 drm/i915: s/sg_mask/sg_page_sizes/ It's a little unclear what the sg_mask actually is, so prefer the more meaningful name of sg_page_sizes. Suggested-by: Joonas Lahtinen Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171009110024.29114-1-matthew.auld@intel.com Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 28 +++++++++++++-------------- drivers/gpu/drm/i915/i915_gem_dmabuf.c | 6 +++--- drivers/gpu/drm/i915/i915_gem_internal.c | 8 ++++---- drivers/gpu/drm/i915/i915_gem_userptr.c | 6 +++--- drivers/gpu/drm/i915/selftests/huge_pages.c | 18 ++++++++--------- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 8 ++++---- 7 files changed, 38 insertions(+), 38 deletions(-) commit 43ae70d97c5195f48d903df31ecac4c5397b2f1e Author: Chris Wilson Date: Mon Oct 9 09:44:01 2017 +0100 drm/i915: Early rejection of mappable GGTT pin attempts for large bo Currently, we reject attempting to pin a large bo into the mappable aperture, but only after trying to create the vma. Under debug kernels, repeatedly creating and freeing that vma for an oversized bo consumes one-third of the runtime for pwrite/pread tests as it is spent on kmalloc/kfree tracking. If we move the rejection to before creating that vma, we lose some accuracy of checking against the fence_size as opposed to object size, though the fence can never be smaller than the object. Note that the vma creation itself will reject an attempt to create a vma larger than the GTT so we can remove one redundant test. Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171009084401.29090-7-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 65 ++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 30 deletions(-) commit a3259ca9f85bc59720abc1b6dbbec6ce563e0877 Author: Chris Wilson Date: Mon Oct 9 09:44:00 2017 +0100 drm/i915: Avoid evicting user fault mappable vma for pread/pwrite Both pread/pwrite GTT paths provide a fast fallback in case we cannot map the whole object at a time. Currently, we use the fallback for very large objects and for active objects that would require remapping, but we can also add active fault mappable objects to the list that we want to avoid evicting. The rationale is that such fault mappable objects are in active use and to evict requires tearing down the CPU PTE and forcing a page fault on the next access; more costly, and intefers with other processes, than our per-page GTT fallback. Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171009084401.29090-6-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 3c755c5b56a79cf0a2681abf705cebfb10737db2 Author: Chris Wilson Date: Mon Oct 9 09:43:59 2017 +0100 drm/i915: Try a minimal attempt to insert the whole object for relocations As we have a lightweight fallback to insert a single page into the aperture, try to avoid any heavier evictions when attempting to insert the entire object. Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171009084401.29090-5-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f34a93bbb33d988df36bb99f791f0bf8a7017041 Author: Chris Wilson Date: Mon Oct 9 09:43:58 2017 +0100 drm/i915: Check PIN_NONFAULT overlaps in evict_for_node If the caller says that he doesn't want to evict any other faulting vma, honour that flag. The logic was used in evict_something, but not the more specific evict_for_node, now being used as a preliminary probe since commit 606fec956c0e ("drm/i915: Prefer random replacement before eviction search"). Fixes: 606fec956c0e ("drm/i915: Prefer random replacement before eviction search") Fixes: 821188778b9b ("drm/i915: Choose not to evict faultable objects from the GGTT") References: https://bugs.freedesktop.org/show_bug.cgi?id=102490 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171009084401.29090-4-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_evict.c | 5 +++++ 1 file changed, 5 insertions(+) commit a65adaf8a834504a4acdc0deca7fa790771add8a Author: Chris Wilson Date: Mon Oct 9 09:43:57 2017 +0100 drm/i915: Track user GTT faulting per-vma We don't wish to refault the entire object (other vma) when unbinding one partial vma. To do this track which vma have been faulted into the user's address space. v2: Use a local vma_offset to tidy up a multiline unmap_mapping_range(). Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171009084401.29090-3-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_gem.c | 50 +++++++++++++++++++++---------- drivers/gpu/drm/i915/i915_gem_evict.c | 2 +- drivers/gpu/drm/i915/i915_gem_fence_reg.c | 7 +++-- drivers/gpu/drm/i915/i915_gem_object.h | 1 + drivers/gpu/drm/i915/i915_vma.c | 28 ++++++++++++++++- drivers/gpu/drm/i915/i915_vma.h | 21 ++++++++++++- 7 files changed, 88 insertions(+), 23 deletions(-) commit 3bd4073524fa1586435725ad45ff971a6c2b2537 Author: Chris Wilson Date: Mon Oct 9 09:43:56 2017 +0100 drm/i915: Consolidate get_fence with pin_fence Following the pattern now used for obj->mm.pages, use just pin_fence and unpin_fence to control access to the fence registers. I.e. instead of calling get_fence(); pin_fence(), we now just need to call pin_fence(). This will make it easier to reduce the locking requirements around fence registers. Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171009084401.29090-2-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_gem.c | 3 ++- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 10 ++++----- drivers/gpu/drm/i915/i915_gem_fence_reg.c | 33 +++++++++++++++++++++++++----- drivers/gpu/drm/i915/i915_vma.c | 4 +--- drivers/gpu/drm/i915/i915_vma.h | 20 ++++++++---------- drivers/gpu/drm/i915/intel_display.c | 3 +-- 7 files changed, 45 insertions(+), 30 deletions(-) commit b4563f595ed44514467cfb3566b8b6519f328354 Author: Chris Wilson Date: Mon Oct 9 09:43:55 2017 +0100 drm/i915: Pin fence for iomap Acquire the fence register for the iomap in i915_vma_pin_iomap() on behalf of the caller. We probably want for the caller to specify whether the fence should be pinned for their usage, but at the moment all callers do want the associated fence, or none, so take it on their behalf. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171009084401.29090-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_vma.c | 35 +++++++++++++++++++++--- drivers/gpu/drm/i915/i915_vma.h | 7 +---- drivers/gpu/drm/i915/selftests/i915_gem_object.c | 8 ------ 3 files changed, 32 insertions(+), 18 deletions(-) commit 67e6456485c7c04838a5dad720886726ae5590e0 Author: Chris Wilson Date: Mon Oct 9 12:03:01 2017 +0100 drm/i915: Provide an assert for when we expect forcewake to be held Add assert_forcewakes_active() (the complementary function to assert_forcewakes_inactive) that documents the requirement of a function for its callers to be holding the forcewake ref (i.e. the function is part of a sequence over which RC6 must be prevented). One such example is during ringbuffer reset, where RC6 must be held across the whole reinitialisation sequence. v2: Include debug information in the WARN so we know which fw domain is missing. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20171009110301.21705-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_ringbuffer.c | 11 ++++++++++- drivers/gpu/drm/i915/intel_uncore.c | 18 +++++++++++++++++- drivers/gpu/drm/i915/intel_uncore.h | 2 ++ 3 files changed, 29 insertions(+), 2 deletions(-) commit ff97d3ae6951101a85e5153cb128292d7119d15c Author: Chris Wilson Date: Mon Oct 9 12:03:00 2017 +0100 drm/i915/selftests: Hold the rpm wakeref for the reset tests The lowlevel reset functions expect the caller to be holding the rpm wakeref for the device access across the reset. We were not explicitly doing this in the sefltest, so for simplicity acquire the wakeref for the duration of all subtests. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20171009110301.21705-4-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 1749d90ff6e0cd0fc97aac5b08782ca1ac9665cf Author: Chris Wilson Date: Mon Oct 9 12:02:59 2017 +0100 drm/i915: Hold forcewake for the duration of reset+restart Resetting the engine requires us to hold the forcewake wakeref to prevent RC6 trying to happen in the middle of the reset sequence. The consequence of an unwanted RC6 event in the middle is that random state is then saved to the powercontext and restored later, which may overwrite the mmio state we need to preserve (e.g. PD_DIR_BASE in the legacy ringbuffer reset_ring_common()). This was noticed in the live_hangcheck selftests when Haswell would sporadically fail to restart during igt_reset_queue(). Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20171009110301.21705-3-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 95a19ab4d7f8afbfca0564102d7d0bea2196c12c Author: Chris Wilson Date: Mon Oct 9 12:02:58 2017 +0100 drm/i915/selftests: Pretty print engine state when requests fail to start During hangcheck testing, we try to execute requests following the GPU reset, and in particular want to try and debug when those fail. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20171009110301.21705-2-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f636edb214a5ffdc533d5c7198a66957322c1b40 Author: Chris Wilson Date: Mon Oct 9 12:02:57 2017 +0100 drm/i915: Make i915_engine_info pretty printer to standalone We can use drm_printer to hide the differences between printk and seq_printf, and so make the i915_engine_info pretty printer able to be called from different contexts and not just debugfs. For instance, I want to use the pretty printer to debug kselftests. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20171009110301.21705-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_debugfs.c | 148 +---------------------------- drivers/gpu/drm/i915/intel_engine_cs.c | 160 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_ringbuffer.h | 4 + 3 files changed, 168 insertions(+), 144 deletions(-) commit bef27bdb6cfbc8c74c776f9455d4d3a4a76a4872 Author: Chris Wilson Date: Mon Oct 9 10:20:19 2017 +0100 drm/i915: Assert we do not try to expand VMA for hugepage inside GGTT We only apply the hugepage PD redirection inside the ppGTT, so during i915_vma_insert() we want to exclude the GGTT from the additional alignment constraints (thereby avoiding the extra GTT pressure from fragmentation). Add an assert to document that intention alongside the comment. v2: After discussion with Matthew, make it a blanket GGTT ban (previously we allowed the expansion for appgtt, and so indirectly ggtt). There are issues we need to fix before allowing the current appgtt to be used with hugepages, and if we do, we probably want more care over when to expand/align, as the mappable aperture inside the ggtt is precious. Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20171009092019.20747-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_vma.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 99fead8d38e5302b1be9403d4de815ce9174a3df Author: Paolo Valente Date: Mon Oct 9 13:11:23 2017 +0200 block, bfq: fix unbalanced decrements of burst size The commit "block, bfq: decrease burst size when queues in burst exit" introduced the decrement of burst_size on the removal of a bfq_queue from the burst list. Unfortunately, this decrement can happen to be performed even when burst size is already equal to 0, because of unbalanced decrements. A description follows of the cause of these unbalanced decrements, namely a wrong assumption, and of the way how this wrong assumption leads to unbalanced decrements. The wrong assumption is that a bfq_queue can exit only if the process associated with the bfq_queue has exited. This is false, because a bfq_queue, say Q, may exit also as a consequence of a merge with another bfq_queue. In this case, Q exits because the I/O of its associated process has been redirected to another bfq_queue. The decrement unbalance occurs because Q may then be re-created after a split, and added back to the current burst list, *without* incrementing burst_size. burst_size is not incremented because Q is not a new bfq_queue added to the burst list, but a bfq_queue only temporarily removed from the list, and, before the commit "bfq-sq, bfq-mq: decrease burst size when queues in burst exit", burst_size was not decremented when Q was removed. This commit addresses this issue by just checking whether the exiting bfq_queue is a merged bfq_queue, and, in that case, not decrementing burst_size. Unfortunately, this still leaves room for unbalanced decrements, in the following rarer case: on a split, the bfq_queue happens to be inserted into a different burst list than that it was removed from when merged. If this happens, the number of elements in the new burst list becomes higher than burst_size (by one). When the bfq_queue then exits, it is of course not in a merged state any longer, thus burst_size is decremented, which results in an unbalanced decrement. To handle this sporadic, unlucky case in a simple way, this commit also checks that burst_size is larger than 0 before decrementing it. Finally, this commit removes an useless, extra check: the check that the bfq_queue is sync, performed before checking whether the bfq_queue is in the burst list. This extra check is redundant, because only sync bfq_queues can be inserted into the burst list. Fixes: 7cb04004fa37 ("block, bfq: decrease burst size when queues in burst exit") Reported-by: Philip Müller Signed-off-by: Paolo Valente Signed-off-by: Angelo Ruocco Tested-by: Philip Müller Tested-by: Oleksandr Natalenko Tested-by: Lee Tibbert Signed-off-by: Jens Axboe block/bfq-iosched.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 2 deletions(-) commit f8e0731db4a02c8c5624e1dce6dc983210a51f64 Author: Christian König Date: Fri Sep 15 11:53:07 2017 +0200 dma-fence: fix dma_fence_get_rcu_safe v2 When dma_fence_get_rcu() fails to acquire a reference it doesn't necessary mean that there is no fence at all. It usually mean that the fence was replaced by a new one and in this situation we certainly want to have the new one as result and *NOT* NULL. v2: Keep extra check after dma_fence_get_rcu(). Signed-off-by: Christian König Cc: Chris Wilson Cc: Daniel Vetter Cc: Sumit Semwal Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Reviewed-by: Maarten Lankhorst Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/1505469187-3565-1-git-send-email-deathsimple@vodafone.de include/linux/dma-fence.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 39e16ba16c147e662bf9fbcee9a99d70d420382f Author: Christian König Date: Mon Sep 4 21:02:45 2017 +0200 dma-buf: make reservation_object_copy_fences rcu save Stop requiring that the src reservation object is locked for this operation. Acked-by: Chunming Zhou Signed-off-by: Christian König Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/1504551766-5093-1-git-send-email-deathsimple@vodafone.de drivers/dma-buf/reservation.c | 56 ++++++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 14 deletions(-) commit d0d37254680fb15fdefe03a0986cfc1e22bcbfc4 Author: Ville Syrjälä Date: Fri Apr 1 21:48:50 2016 +0300 drm/i915: Use intel_get_pipe_timings() and intel_mode_from_pipe_config() in intel_crtc_mode_get() Eliminate the duplicate code for pipe timing readout in intel_crtc_mode_get() by using the functions we use for the normal state readout. v2: Store dotclock in adjusted_mode instead of the final mode Cc: dri-devel@lists.freedesktop.org Cc: Rob Kramer Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Tested-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1459536530-17754-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit e30a154b5262b967b133b06ac40777e651045898 Author: Ville Syrjälä Date: Fri Apr 1 18:37:25 2016 +0300 drm/i915: Read timings from the correct transcoder in intel_crtc_mode_get() intel_crtc->config->cpu_transcoder isn't yet filled out when intel_crtc_mode_get() gets called during output probing, so we should not use it there. Instead intel_crtc_mode_get() figures out the correct transcoder on its own, and that's what we should use. If the BIOS boots LVDS on pipe B, intel_crtc_mode_get() would actually end up reading the timings from pipe A instead (since PIPE_A==0), which clearly isn't what we want. It looks to me like this may have been broken by commit eccb140bca67 ("drm/i915: hw state readout&check support for cpu_transcoder") as that one removed the early initialization of cpu_transcoder from intel_crtc_init(). Cc: stable@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: Rob Kramer Cc: Daniel Vetter Reported-by: Rob Kramer Fixes: eccb140bca67 ("drm/i915: hw state readout&check support for cpu_transcoder") References: https://lists.freedesktop.org/archives/dri-devel/2016-April/104142.html Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1459525046-19425-1-git-send-email-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit adea2917185ea15b276e85930a970efd1b9d1491 Author: Alexandre Belloni Date: Fri Sep 15 04:00:03 2017 +0200 ARM: dts: at91: usb_a9g20: fix rtc node The rv3029 compatible is missing its vendor string, add it. Also fix the node name to be a proper generic name. Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni arch/arm/boot/dts/usb_a9g20_common.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b50e1abcc0fe57c4ad43cc8d1e5ad8ac477f0be Author: Romain Izard Date: Tue Sep 5 12:18:05 2017 +0200 ARM: dts: at91: sama5d2 Xplained: Describe the SD card power supply As the SAMA5D2 SDHCI controller works with an external power supply, describe the power supply for the SD card slot. This makes it possible to use mmc power sequences, in the case of external SDIO modules. Signed-off-by: Romain Izard Acked-by: Ludovic Desroches Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d2_xplained.dts | 2 ++ 1 file changed, 2 insertions(+) commit ff7b582a940ed0f11130a64dbf8716a54c48ee26 Author: Wenyou Yang Date: Tue Aug 15 14:24:20 2017 +0800 ARM: dts: at91: sama5d2_xplained: Add charger node Add the charger device node as a sub-device of act8945a mfd, move the charger's properties in the node, and replace the "active-semi,irq_gpios" with the "interrupts" property to denote the act8945a charger's irq. Signed-off-by: Wenyou Yang Signed-off-by: Alexandre Belloni arch/arm/boot/dts/at91-sama5d2_xplained.dts | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) commit 9250e523592a8ced3ecd14abe29fbb1e036bd7eb Author: David Teigland Date: Mon Oct 9 09:29:31 2017 -0500 dlm: remove dlm_send_rcom_lookup_dump This function was only for debugging. It would be called in a condition that should not happen, and should probably have been removed from the final version of the original commit. Remove it because it does mutex lock under spin lock. Signed-off-by: David Teigland fs/dlm/lock.c | 1 - fs/dlm/rcom.c | 20 +------------------- fs/dlm/rcom.h | 1 - 3 files changed, 1 insertion(+), 21 deletions(-) commit b5dc5d4d1f4ff9032eb6c21a3c571a1317dc9289 Author: Luca Miccio Date: Mon Oct 9 16:27:21 2017 +0200 block,bfq: Disable writeback throttling Similarly to CFQ, BFQ has its write-throttling heuristics, and it is better not to combine them with further write-throttling heuristics of a different nature. So this commit disables write-back throttling for a device if BFQ is used as I/O scheduler for that device. Signed-off-by: Luca Miccio Signed-off-by: Paolo Valente Tested-by: Oleksandr Natalenko Tested-by: Lee Tibbert Signed-off-by: Jens Axboe block/bfq-iosched.c | 3 ++- block/blk-wbt.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 37131ec4f9cb60750be6f75fca20ff6bbf1b8efd Author: Masahiro Yamada Date: Fri Sep 22 14:31:14 2017 +0900 kbuild: mkcompile_h: do not create .version This script does not need to create .version; it will be created by scripts/link-vmlinux.sh later. Clean-up the code slightly. Signed-off-by: Masahiro Yamada scripts/mkcompile_h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 278ae6040397f37fa6a96a6b86ed02d4762080a7 Author: Masahiro Yamada Date: Fri Sep 22 14:31:13 2017 +0900 kbuild: link-vmlinux.sh: simplify .version increment Since commit 1f2bfbd00e46 ("kbuild: link of vmlinux moved to a script"), it is easy to increment .version without using a temporary file .old_version. I do not see anybody who creates the .tmp_version. Probably it is a left-over of commit 4e25d8bb9550fb ("[PATCH] kbuild: adjust .version updating"). Just remove it. Signed-off-by: Masahiro Yamada Makefile | 2 +- scripts/link-vmlinux.sh | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) commit f231e43333124d92a82acd19431f8104b8e48a75 Author: Masahiro Yamada Date: Thu Sep 21 00:17:50 2017 +0900 hexagon: get rid of #include is created (or updated) when Kbuild descends into the init/ directory. In parallel building from a pristine source tree, there is no guarantee exists when arch/hexagon/kernel/ptrace.c is compiled. For hexagon architecture, we know UTS_MACHINE is a fixed string "hexagon", so let's hard-code it, like many architectures do. Signed-off-by: Masahiro Yamada Acked-by: Richard Kuo arch/hexagon/kernel/ptrace.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 94af584692091347baea4d810b9fc6e0f5483d42 Author: Yafang Shao Date: Tue Oct 10 05:44:13 2017 +0800 writeback: schedule periodic writeback with sysctl After disable periodic writeback by writing 0 to dirty_writeback_centisecs, the handler wb_workfn() will not be entered again until the dirty background limit reaches or sync syscall is executed or no enough free memory available or vmscan is triggered. So the periodic writeback can't be enabled by writing a non-zero value to dirty_writeback_centisecs. As it can be disabled by sysctl, it should be able to enable by sysctl as well. Reviewed-by: Jan Kara Signed-off-by: Yafang Shao Signed-off-by: Jens Axboe mm/page-writeback.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 4831ca9e4a8e48cb27e0a792f73250390827a228 Author: Colin Ian King Date: Fri Sep 8 15:37:45 2017 +0100 IB/rxe: check for allocation failure on elem The allocation for elem may fail (especially because we're using GFP_ATOMIC) so best to check for a null return. This fixes a potential null pointer dereference when assigning elem->pool. Detected by CoverityScan CID#1357507 ("Dereference null return value") Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Colin Ian King Signed-off-by: Doug Ledford drivers/infiniband/sw/rxe/rxe_pool.c | 2 ++ 1 file changed, 2 insertions(+) commit 239e14d1952942bd902dcd09d93c80e7f2a76637 Author: Mathieu Malaterre Date: Fri Sep 15 21:18:36 2017 +0200 MIPS: jz4780: DTS: Probe the jz4740-watchdog driver from devicetree The jz4740-watchdog driver supports both jz4740 & jz4780. Signed-off-by: Mathieu Malaterre Cc: Rob Herring Cc: Mark Rutland Cc: Linus Walleij Cc: Paul Cercueil Cc: PrasannaKumar Muralidharan Cc: devicetree@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17291/ Signed-off-by: Ralf Baechle arch/mips/boot/dts/ingenic/jz4780.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit e7af4d14e234d2ca9cb84ca56a976537fac4fec2 Author: Mathieu Malaterre Date: Fri Sep 15 21:17:54 2017 +0200 MIPS: Ci20: Enable watchdog driver Update the Ci20's defconfig to enable the JZ4740's watchdog driver. Signed-off-by: Mathieu Malaterre Cc: Krzysztof Kozlowski Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17290/ Signed-off-by: Ralf Baechle arch/mips/configs/ci20_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit ac4f59f88ae84874ac444c742e87b7bf98387e8f Author: Steven J. Hill Date: Fri Sep 15 12:02:55 2017 -0500 MIPS: Remove unused variable 'lastpfn' 'lastpfn' is never used for anything. Remove it. Signed-off-by: Steven J. Hill Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17276/ Signed-off-by: Ralf Baechle arch/mips/mm/init.c | 4 ---- 1 file changed, 4 deletions(-) commit 34ae9c915f9d12f1ddaa19a23fb3e8984e6a1098 Author: Chad Reese Date: Fri Sep 15 12:31:28 2017 -0500 MIPS: Add nudges to writes for bit unlocks. Flushing the writes lets other CPUs waiting for the lock to get it sooner. Signed-off-by: Chad Reese Signed-off-by: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17289/ Signed-off-by: Ralf Baechle arch/mips/include/asm/bitops.h | 1 + 1 file changed, 1 insertion(+) commit 508c5757a72873d007e932faff5fa0014b25812d Author: Tobias Klauser Date: Mon Sep 18 13:38:40 2017 +0200 MIPS: make thread_saved_pc static The only user of thread_saved_pc() in non-arch-specific code was removed in commit 8243d5597793 ("sched/core: Remove pointless printout in sched_show_task()"), so it no longer needs to be globally defined for MIPS and can be made static. Signed-off-by: Tobias Klauser Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17303/ Signed-off-by: Ralf Baechle arch/mips/include/asm/processor.h | 2 -- arch/mips/kernel/process.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) commit 7fd60db5b39f9498e97589557ec6356b2e50a6ac Author: Harvey Hunt Date: Tue Sep 19 13:12:01 2017 +0100 MIPS: Ci20: Add support for rootfs on NFS to defconfig Now that ethernet support is in the kernel, add the option to use a rootfs over NFS to enable automated testing of upstream kernels on a Ci20. Signed-off-by: Harvey Hunt Signed-off-by: James Hogan Cc: Harvey Hunt Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17314/ Signed-off-by: Ralf Baechle arch/mips/configs/ci20_defconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7a8e4158bf6700607bf361dfbaaac7c901f1134a Author: Thomas Meyer Date: Thu Sep 21 00:29:36 2017 +0200 MIPS: Cocci spatch "vma_pages" Use vma_pages function on vma object instead of explicit computation. Found by coccinelle spatch "api/vma_pages.cocci" Signed-off-by: Thomas Meyer Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17333/ Signed-off-by: Ralf Baechle arch/mips/mm/dma-default.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5950f2617f71a3dce16520c4907bcdb31e654ba Merge: 87cbde8 eb672c0 Author: Rafael J. Wysocki Date: Mon Oct 9 14:20:07 2017 +0200 Merge back suspend/resume/hibernate material for v4.15. commit a6aa6cdcecfc0eb8a6fe634535384b4a63f38258 Author: Takashi Iwai Date: Thu Oct 5 20:19:38 2017 +0200 ALSA: usb-audio: Apply vendor ID matching for sample rate quirk So far, lots of Plantronics, MS and Phoenix Audio devices need the quirk not to read sample rate back, and the list just grows. In this patch, instead of adding each device, apply the quirk by matching with these vendors. Signed-off-by: Takashi Iwai sound/usb/quirks.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit 545633f6fecd240bfa50bb8e2db627eac76f9f8a Merge: 3a9fce3 5803b02 Author: Takashi Iwai Date: Mon Oct 9 14:11:30 2017 +0200 Merge branch 'for-linus' into for-next commit 6d281b1f79e194c02125da29ea77316810261ca8 Author: Jeffy Chen Date: Mon Oct 9 14:46:41 2017 +0800 drm/atomic: Unref duplicated drm_atomic_state in drm_atomic_helper_resume() Kmemleak reported memory leak after suspend and resume: unreferenced object 0xffffffc0e31d8880 (size 128): comm "bash", pid 181, jiffies 4294763583 (age 24.694s) hex dump (first 32 bytes): 01 00 00 00 00 00 00 00 00 20 a2 eb c0 ff ff ff ......... ...... 01 00 00 00 00 00 00 00 80 87 1d e3 c0 ff ff ff ................ backtrace: [] __save_stack_trace+0x48/0x6c [] create_object+0x138/0x254 [] kmemleak_alloc+0x58/0x8c [] kmem_cache_alloc_trace+0x188/0x254 [] drm_atomic_state_alloc+0x3c/0x88 [] drm_atomic_helper_duplicate_state+0x28/0x158 [] drm_atomic_helper_suspend+0x5c/0xf0 Problem here is that we are duplicating the drm_atomic_state in drm_atomic_helper_suspend(), but not unreference it in the resume path. Fixes: 1494276000db ("drm/atomic-helper: Implement subsystem-level suspend/resume") Signed-off-by: Jeffy Chen Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20171009064641.15174-1-jeffy.chen@rock-chips.com Fixes: 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state") Cc: # v4.10+ drivers/gpu/drm/drm_atomic_helper.c | 1 + 1 file changed, 1 insertion(+) commit 3b1b975003e4a3da4b93ab032487a3ae4afca7b5 Author: Hans Verkuil Date: Sat Oct 7 12:46:58 2017 +0200 drm: adv7511/33: add HDMI CEC support Add support for HDMI CEC to the drm adv7511/adv7533 drivers. The CEC registers that we need to use are identical for both drivers, but they appear at different offsets in the register map. Signed-off-by: Hans Verkuil Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20171007104658.14528-3-hverkuil@xs4all.nl drivers/gpu/drm/bridge/adv7511/Kconfig | 8 + drivers/gpu/drm/bridge/adv7511/Makefile | 1 + drivers/gpu/drm/bridge/adv7511/adv7511.h | 43 +++- drivers/gpu/drm/bridge/adv7511/adv7511_cec.c | 337 +++++++++++++++++++++++++++ drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 116 +++++++-- drivers/gpu/drm/bridge/adv7511/adv7533.c | 38 +-- 6 files changed, 485 insertions(+), 58 deletions(-) commit c78ae068de3c927e195f1628239bc701f8b5f402 Author: Hans Verkuil Date: Sat Oct 7 12:46:57 2017 +0200 dt-bindings: adi,adv7511.txt: document cec clock Document the cec clock binding. Signed-off-by: Hans Verkuil Acked-by: Rob Herring Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20171007104658.14528-2-hverkuil@xs4all.nl Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 650da25099606db05e3546201410d92cf2e2545a Merge: 2bd6bf0 3d8757b Author: Christian Borntraeger Date: Mon Oct 9 12:06:24 2017 +0200 Merge branch 'sthyi' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux into kvms390/next get sthyi rework with the KVM changes commit a4f21e9ceb5c81f5b297cabb98dac0b5c03bd4dc Author: Marek Szyprowski Date: Tue Oct 3 12:00:16 2017 +0200 clk: samsung: Remove obsolete clkdev alias support Remove support for obsolete clkdev alias definition in generic helper macros for MUX, DIV, GATE and PLL clocks. clkdev aliases can be still created using samsung_clk_register_alias() function if given platform still needs them. All current drivers have been converted not to use *_A-style macros and checked if there are any clients for the PLL clocks, which had aliases created unconditionally. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-pll.c | 9 ------ drivers/clk/samsung/clk.c | 33 ++------------------ drivers/clk/samsung/clk.h | 71 ++++++++----------------------------------- 3 files changed, 15 insertions(+), 98 deletions(-) commit 45d882daf88a57ec681254e8a41dd5ba268a097d Author: Marek Szyprowski Date: Tue Oct 3 12:00:15 2017 +0200 clk: samsung: Add explicit MPLL, EPLL clkdev aliases in S3C2443 driver S3C2443 platform still use non-dt based lookup in some of its drivers to get MPLL and EPLL clocks. Till now it worked only because PLL() macro implicitly created aliases for all instantiated clocks. This feature will be removed, so explicitly create aliases for MPLL and EPLL clocks. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-s3c2443.c | 10 ++++++---- include/dt-bindings/clock/s3c2443.h | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) commit cd05417f728ba914caf5d94fa4a15b2300a268b5 Author: Marek Szyprowski Date: Tue Oct 3 12:00:14 2017 +0200 clk: samsung: Rework clkdev alias handling in S3C2443 driver S3C2443 SoC still uses old, non-dt CPUfreq driver, which requires clkdev aliases to get access to proper clocks. Create those aliases using samsung_clk_register_alias() function instead of using *_A clock macros, which will be removed soon. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-s3c2443.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit efea8d3771843bca26862fabebfa83aa9b497bd2 Author: Marek Szyprowski Date: Tue Oct 3 12:00:13 2017 +0200 clk: samsung: Rework clkdev alias handling in Exynos5440 driver Exynos5440 still uses old, non-dt CPUfreq driver, which requires clkdev aliases to get access to proper clocks. Create those aliases using samsung_clk_register_alias() function instead of using *_A clock macros, which will be removed soon. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5440.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 36ba48240b19395ececd7303bde56f9af4177062 Author: Marek Szyprowski Date: Tue Oct 3 12:00:12 2017 +0200 clk: samsung: Drop useless alias in Exynos5420 clk driver Drop clkdev alias for "mout_aclk400_mscl" clock. It was not used at all and it was probably committed by accident. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5420.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 29964890f31c2cb98b0aa277d81652e6aecd8bbc Author: Marek Szyprowski Date: Tue Oct 3 12:00:11 2017 +0200 clk: samsung: Remove clkdev alias support in Exynos5250 clk driver All Exynos5250 boards have been fully converted to device-tree and use generic dt-based CPUfreq driver, so there is no need to create any clkdev aliases for the clocks. Drop all the code related to aliases handling. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5250.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 6de08891c896d313e6541e5a56e373adcf0bbebc Author: Marek Szyprowski Date: Tue Oct 3 12:00:10 2017 +0200 clk: samsung: Remove double assignment of CLK_ARM_CLK in Exynos4 driver CLK_ARM_CLK ("armclk") clock is provided by cpu-clk subdriver, which is instantiated after creating all divider clocks from exynos4_div_clks array. There is no point assigning this id to "div_core2" clock and later overwrite with proper "armcpu" clock by cpu-clk subdriver. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58f4a5ff3a6248a89c849415cab8089e41425f5e Author: Marek Szyprowski Date: Tue Oct 3 12:00:09 2017 +0200 clk: samsung: Remove clkdev alias support in Exynos4 clk driver All Exynos4 boards have been fully converted to device-tree and use generic dt-based CPUfreq driver, so there is no need to create any clkdev aliases for the clocks. Drop all the code related to aliases handling. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos4.c | 47 +++++++++------------------------------ 1 file changed, 10 insertions(+), 37 deletions(-) commit c9194fb623b0158029a268376df09fe28a2a2b05 Author: Marek Szyprowski Date: Tue Oct 3 12:00:08 2017 +0200 clk: samsung: Remove support for obsolete Exynos4212 CPU clock Support for Exynos 4212 SoC has been removed by commit bca9085e0ae9 ("ARM: dts: exynos: remove Exynos4212 support (dead code)"), so there is no need to keep dead code. Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Acked-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos4.c | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) commit d5cd103b06f9d766295d18798de484528eb120ea Author: Marek Szyprowski Date: Wed Oct 4 08:38:26 2017 +0200 clk: samsung: Remove support for Exynos4212 SoCs in Exynos CLKOUT driver Support for Exynos4212 SoCs has been removed by commit bca9085e0ae9 ("ARM: dts: exynos: remove Exynos4212 support (dead code)"), so there is no need to keep remaining dead code related to this SoC version. Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos-clkout.c | 2 -- 1 file changed, 2 deletions(-) commit 5514830dffb2332c034c20db3b264ba1f94de1d8 Author: Jaikrishna Nemallapudi Date: Mon Sep 18 10:26:44 2017 +0530 ASoC: Intel: Skylake: Modify skl_dsp_set_dma_control API arguments Set dma control ipc can be used to set the M/N divider, enable the clks. It takes different payload for different configuration. So modify the skl_dsp_set_dma_control API to take the size and node_id as argument. Signed-off-by: Jaikrishna Nemallapudi Signed-off-by: Subhransu S. Prusty Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-messages.c | 23 ++++++++++++++--------- sound/soc/intel/skylake/skl-topology.h | 4 ++-- 2 files changed, 16 insertions(+), 11 deletions(-) commit 430594c1c7f5051f0d99ed9d08d086d20587cdd1 Author: Heiner Kallweit Date: Fri Oct 6 20:59:05 2017 +0200 firmware: arm_scpi: silence sparse warnings At several positions in the code sparse complains about incorrect access to __iomem annotated memory. Fix this and make sparse happy. Signed-off-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 49913f1fd0e5ff5a484214501e84d1c73e739285 Author: Heiko Carstens Date: Wed Oct 4 19:27:09 2017 +0200 s390: cleanup string ops prototypes Just some trivial changes like removing the extern keyword from the header file, renaming arguments to match the man pages, and whitespace removal. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/string.h | 22 +++++++++++----------- arch/s390/lib/string.c | 28 ++++++++++++++-------------- 2 files changed, 25 insertions(+), 25 deletions(-) commit 993fef95b9c1858894d14b221e04f1161e4f4ed9 Author: Heiko Carstens Date: Wed Oct 4 19:27:08 2017 +0200 s390: optimize memset implementation Like for the memset16/32/64 variants avoid that subsequent mvc instructions depend on each other since that might have negative performance impacts. This patch is currently hardly relevant since at least gcc 7.1 generates only inline memset code and not a single memset call. However there is no reason to not provide an optimized version just in case gcc generates memset calls again, like it did in the past. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/lib/mem.S | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 41879ff65d8b025eace44610be0b07f678fb3224 Author: Heiko Carstens Date: Wed Oct 4 19:27:07 2017 +0200 s390/mm: use memset64 instead of clear_table Use memset64 instead of the (now) open-coded variant clear_table. Performance wise there is no difference. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/pgalloc.h | 18 ++---------------- arch/s390/kernel/vdso.c | 6 ++---- arch/s390/mm/pgalloc.c | 14 +++++++------- arch/s390/mm/vmem.c | 2 +- 4 files changed, 12 insertions(+), 28 deletions(-) commit 0b77d6701cf8d4eb343a83fa8d7eca81a863bb7c Author: Heiko Carstens Date: Wed Oct 4 19:27:05 2017 +0200 s390: implement memset16, memset32 & memset64 Provide fast versions of the new memset variants. E.g. the generic memset64 is ten times slower than the optimized version if used on a whole page. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/string.h | 22 +++++++++++++++++++++ arch/s390/lib/mem.S | 44 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) commit 48bee74a354b211c4e4cb62e6a7b7986749747cf Author: Sudeep Holla Date: Thu Oct 5 11:40:49 2017 +0100 firmware: arm_scpi: remove all single element structures Both clk_get_value and sensor_value structures contains a single element and hence needs no packing making the whole structure defination unnecessary. This patch gets rid of both those unnecessary structures. Reviewed-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) commit 1b36633ea9c80f91fab505002dd7548febc51812 Author: Sudeep Holla Date: Thu Oct 5 11:31:36 2017 +0100 firmware: arm_scpi: drop unnecessary type cast to scpi_shared_mem This patch drops the only present type cast of the SCPI payload pointer to scpi_shared_mem inorder to align with other occurrences, IOW for consistency. Reviewed-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3bdf5679c9e46088a0d677e795afc92b5f77940f Merge: 91a1fad 3d8757b Author: Martin Schwidefsky Date: Mon Oct 9 11:16:49 2017 +0200 Merge branch 'sthyi' into features Add the store-hypervisor-information code into features using a tip branch for parallel merging into the KVM tree. commit 979a9afe399f7c75e1be9f235fa8bf1a90d2e77d Author: Ralf Ramsauer Date: Thu Oct 5 13:22:36 2017 +0200 spi: tegra114: correct register name in definition According to "Tegra K1 Processor Technical Reference Manual" (p. 2448), bit 20 of SPI_COMMAND1 is called CS_SW_VAL and not CS_SS_VAL. Signed-off-by: Ralf Ramsauer Signed-off-by: Mark Brown drivers/spi/spi-tegra114.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0087f2013188d8b332cee2f74fd3c6754a49f620 Author: Pierre-Louis Bossart Date: Wed Oct 4 23:04:27 2017 -0500 ASoC: Intel: cht_bsw_max98090: remove useless code, align with ChromeOS driver Remove dead code which was missed in previous changes. This is not visible with git diff but there is a test+return on the same condition just above. Also reuse local variable instead of fetching the jack information twice. Tested on Acer R11 (cyan) Fixes: 3bbda5a38601 ('ASoC: Intel: cht_bsw_max98090_ti: Fix jack initialization') Cc: Thierry Escande Signed-off-by: Pierre-Louis Bossart Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_max98090_ti.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 3d8757b87d7fc15a87928bc970f060bc9c6dc618 Author: QingFeng Hao Date: Fri Sep 29 12:41:52 2017 +0200 s390/sthyi: add s390_sthyi system call Add a syscall of s390_sthyi to implement STHYI instruction in LPAR which reuses the implementation for KVM by Janosch Frank - commit 95ca2cb57985 ("KVM: s390: Add sthyi emulation"). STHYI(Store Hypervisor Information) is an emulated z/VM instruction that provides a guest with basic information about the layers it is running on. This includes information about the cpu configuration of both the machine and the lpar, as well as their names, machine model and machine type. This information enables an application to determine the maximum capacity of CPs and IFLs available to software. For the arguments of s390_sthyi, code shall be 0 and flags is reserved for future use, info is the output argument to store the required hypervisor info. Signed-off-by: QingFeng Hao Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/uapi/asm/sthyi.h | 6 ++++++ arch/s390/include/uapi/asm/unistd.h | 3 ++- arch/s390/kernel/compat_wrapper.c | 1 + arch/s390/kernel/entry.h | 1 + arch/s390/kernel/sthyi.c | 33 ++++++++++++++++++++++++++++++++- arch/s390/kernel/syscalls.S | 1 + 6 files changed, 43 insertions(+), 2 deletions(-) commit 9fb6c9b3fea1b1d1c6f14178373e8f7235f3b681 Author: QingFeng Hao Date: Fri Sep 29 12:41:51 2017 +0200 s390/sthyi: add cache to store hypervisor info STHYI requires extensive locking in the higher hypervisors and is very computational/memory expensive. Therefore we cache the retrieved hypervisor info whose valid period is 1s with mutex to allow concurrent access. rw semaphore can't benefit here due to cache line bounce. Signed-off-by: QingFeng Hao Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/kvm_host.h | 1 - arch/s390/kernel/sthyi.c | 84 +++++++++++++++++++++++++++++++++------- arch/s390/kvm/intercept.c | 10 ----- arch/s390/kvm/kvm-s390.c | 2 - 4 files changed, 71 insertions(+), 26 deletions(-) commit b7c92f1a4e131e459bcf53a570e7265e5ce64455 Author: QingFeng Hao Date: Fri Sep 29 12:41:50 2017 +0200 s390/sthyi: reorganize sthyi implementation As we need to support sthyi instruction on LPAR too, move the common code to kernel part and kvm related code to intercept.c for better reuse. Signed-off-by: QingFeng Hao Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/sysinfo.h | 1 + arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/sthyi.c | 428 ++++++++++++++++++++++++++++++++++++ arch/s390/kvm/Makefile | 2 +- arch/s390/kvm/intercept.c | 66 ++++++ arch/s390/kvm/kvm-s390.h | 5 +- arch/s390/kvm/sthyi.c | 469 ---------------------------------------- 7 files changed, 499 insertions(+), 474 deletions(-) commit 5289c322ba994c7b07a4780243dca1feb610954f Author: Masahiro Yamada Date: Sat Sep 30 10:10:05 2017 +0900 kbuild: rpm-pkg: clean up mkspec Clean up the mkspec without changing the behavior. - grep CONFIG_DRM=y more simply - move "EXCLUDE" out of the "%install" section because it can be computed when the spec file is generated - remove "BuildRoot:" field, which is now redundant - do not mkdir $RPM_BUILD_ROOT/lib/modules explicitly because it is automatically created by "make modules_install" - exclude "%package devel" from source package spec file because it does not make sense where "%files devel" is already excluded - exclude "%build" from source package spec file - remove unneeded "make clean" because we had already cleaned before making tar file - merge two %ifarch ia64 conditionals - replace KBUILD_IMAGE with direct use of $(make image_name) - remove trailing empty line from the spec file Signed-off-by: Masahiro Yamada scripts/package/mkspec | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) commit 81771ce2d1a9f9ce8739aac7af64bb03ff4b6a1a Author: Masahiro Yamada Date: Sat Sep 30 10:10:04 2017 +0900 kbuild: rpm-pkg: install vmlinux.bz2 unconditionally This conditional was added by commit fc370ecfdb37 ("kbuild: add vmlinux to kernel rpm"). Its git-log mentioned vmlinux.bz2 was necessary for debugging, but did not explain why ppc64 was an exception. I see no problem to copy vmlinux.bz2 all the time. Signed-off-by: Masahiro Yamada scripts/package/mkspec | 3 --- 1 file changed, 3 deletions(-) commit 6736ce27ce34d791ff2f030df6162527bd383a3c Author: Masahiro Yamada Date: Sat Sep 30 10:10:03 2017 +0900 kbuild: rpm-pkg: remove ppc64 specific image handling This conditional was added by commit 1a0f3d422bb9 ("kbuild: fix make rpm for powerpc"). Its git-log explains the default kernel image is zImage, but obviously the current arch/powerpc/Makefile does not set KBUILD_IMAGE, so the image file is actually vmlinux. Moreover, since commit 09549aa1baa9 ("deb-pkg: Remove the KBUILD_IMAGE workaround"), all architectures are supposed to set the full path to the image in KBUILD_IMAGE. I see no good reason to differentiate ppc64 from others. Rip off the conditional. Signed-off-by: Masahiro Yamada scripts/package/mkspec | 5 ----- 1 file changed, 5 deletions(-) commit 0c3039ffc07cd7c328eca3f9559d0d0102ac9bec Author: Ben Hutchings Date: Fri Oct 6 03:00:01 2017 +0100 arm64: elf.h: Correct comment about READ_IMPLIES_EXEC propagation Process personality always propagates across a fork(), but can change at an execve(). Signed-off-by: Ben Hutchings Signed-off-by: Will Deacon arch/arm64/include/asm/elf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 86f8b2d35966768a0aa666f7ca22a7acd321003d Author: Maxime Ripard Date: Thu Oct 5 12:49:43 2017 +0200 ARM: dts: sun4i: Change LRADC node names to avoid warnings One of the usage of the LRADC is to implement buttons. The bindings define that we should have one subnode per button, with their associated voltage as a property. However, there was no reg property but we still used the voltage associated to the button as the unit-address, which eventually generated warnings in DTC. Rename the node names to avoid those warnings. Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts | 6 +++--- arch/arm/boot/dts/sun4i-a10-dserve-dsrv9703c.dts | 4 ++-- arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 6 +++--- arch/arm/boot/dts/sun4i-a10-inet1.dts | 6 +++--- arch/arm/boot/dts/sun4i-a10-inet97fv2.dts | 10 +++++----- arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts | 10 +++++----- arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts | 4 ++-- 7 files changed, 23 insertions(+), 23 deletions(-) commit 6ab3cf041509d9703e176a9ceccac638f21af24d Author: Maxime Ripard Date: Thu Oct 5 12:49:42 2017 +0200 ARM: dts: sun4i: Remove skeleton and memory to avoid warnings Using skeleton.dtsi will create a memory node that will generate a warning in DTC. However, that node will be created by the bootloader, so we can just remove it entirely in order to remove that warning. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f42ff29980daa9c01915b30dbc6399b2a15c99f8 Author: Maxime Ripard Date: Thu Oct 5 12:49:48 2017 +0200 ARM: dts: sun4i: Remove gpio-keys warnings Some gpio-keys definitions in our DTs were having buttons defined with a unit-address and that would generate a DTC warning. Change the buttons node names to remove the warnings. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts | 40 ++++++++++++++-------------- arch/arm/boot/dts/sun4i-a10-pcduino.dts | 6 ++--- 2 files changed, 23 insertions(+), 23 deletions(-) commit 44860b96e68351e4c4c419df10e6534ca4c09fdd Author: Nik Nyby Date: Sat Oct 7 18:26:10 2017 -0400 ASoC: dwc: fix typos in Kconfig This fixes a few typos in the snd_designware description. Signed-off-by: Nik Nyby Signed-off-by: Mark Brown sound/soc/dwc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e8639d0c65ba4036b51d63e222080e56384b0573 Author: Ed Blake Date: Fri Oct 6 15:56:07 2017 +0100 ASoC: img-spdif-out: Add control of sys clock to runtime PM Disable sys clock as well as ref clock when runtime suspended. Signed-off-by: Ed Blake Signed-off-by: Mark Brown sound/soc/img/img-spdif-out.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit 634a09d03753844e9fe1af8298266d0126d73549 Author: Ed Blake Date: Fri Oct 6 15:56:06 2017 +0100 ASoC: img-spdif-out: Add suspend / resume handling Implement suspend and resume callbacks to save and restore register state, to support platforms where the power is disabled during suspend. In future the driver could be converted to use regmap which would simplify the suspend and resume code. Signed-off-by: Ed Blake Signed-off-by: Mark Brown sound/soc/img/img-spdif-out.c | 44 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 1fac824f0c4fe05924243830fa3b44a5ad0869c7 Author: Ed Blake Date: Fri Oct 6 15:53:55 2017 +0100 ASoC: img-spdif-in: Add runtime PM Add runtime PM to disable the clock when the device is not in use. The ASoC core takes care of the pm_runtime_get_sync / put calls so we just need to provide runtime_suspend / runtime_resume functions and enable runtime PM. Signed-off-by: Ed Blake Signed-off-by: Mark Brown sound/soc/img/img-spdif-in.c | 79 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 65 insertions(+), 14 deletions(-) commit 52eb0ed3ec62d1f22f71332aa2e2de84a0a6c756 Author: Ed Blake Date: Fri Oct 6 15:53:54 2017 +0100 ASoC: img-spdif-in: Add suspend / resume handling Implement suspend and resume callbacks to save and restore register state, to support platforms where the power is disabled during suspend. In future the driver could be converted to use regmap which would simplify the suspend and resume code. Signed-off-by: Ed Blake Signed-off-by: Mark Brown sound/soc/img/img-spdif-in.c | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) commit a38ced17328bae30dabc15dbc2563860e3921c9c Author: Ed Blake Date: Fri Oct 6 15:52:28 2017 +0100 ASoC: img-i2s-out: Add control of sys clock to runtime PM Disable sys clock as well as ref clock when runtime suspended. Signed-off-by: Ed Blake Signed-off-by: Mark Brown sound/soc/img/img-i2s-out.c | 60 +++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 29 deletions(-) commit 9b4acd33dd64e84be6db9552b6d43979c05135b1 Author: Ed Blake Date: Fri Oct 6 15:52:27 2017 +0100 ASoC: img-i2s-out: Add suspend / resume handling Implement suspend and resume callbacks to save and restore register state, to support platforms where the power is disabled during suspend. In future the driver could be converted to use regmap which would simplify the suspend and resume code. Signed-off-by: Ed Blake Signed-off-by: Mark Brown sound/soc/img/img-i2s-out.c | 60 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit f65bb92ca12e72c6ebed20dacaa75ee1f2f0735a Author: Ed Blake Date: Fri Oct 6 15:50:40 2017 +0100 ASoC: img-i2s-in: Add runtime PM Add runtime PM to disable the clock when the device is not in use. The ASoC core takes care of the pm_runtime_get_sync / put calls so we just need to provide runtime_suspend / runtime_resume functions and enable runtime PM. Signed-off-by: Ed Blake Signed-off-by: Mark Brown sound/soc/img/img-i2s-in.c | 88 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 71 insertions(+), 17 deletions(-) commit 8ab7f885da23719aef1ba03f563589e44ca6ab66 Author: Ed Blake Date: Fri Oct 6 15:50:39 2017 +0100 ASoC: img-i2s-in: Add suspend / resume handling Implement suspend and resume callbacks to save and restore register state, to support platforms where the power is disabled during suspend. In future the driver could be converted to use regmap which would simplify the suspend and resume code. Signed-off-by: Ed Blake Signed-off-by: Mark Brown sound/soc/img/img-i2s-in.c | 54 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) commit 596ec4bd958bc7c233d4129072d80272f21e2be1 Author: Ed Blake Date: Fri Oct 6 15:57:50 2017 +0100 ASoC: img-parallel-out: Check pm_runtime_get_sync return code Check the the pm_runtime_get_sync return code and return if an error. Signed-off-by: Ed Blake Signed-off-by: Mark Brown sound/soc/img/img-parallel-out.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 4c75968a1bbfb3f190e2e624c83929451e4730ac Author: Christos Gkekas Date: Sun Oct 8 19:20:30 2017 +0100 ASoC: cygnus: Remove unnecessary active_slots check Variable active_slots is unsigned so checking whether it is less than zero is not necessary. Signed-off-by: Christos Gkekas Signed-off-by: Mark Brown sound/soc/bcm/cygnus-ssp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ee18841ff649e973d62afc6096b892396a676ef Author: Fabrizio Castro Date: Fri Oct 6 18:59:53 2017 +0100 ARM: dts: iwg20d-q7-dbcm-ca: Add device trees for camera DB This patch adds a .dtsi that describes the camera daughter board and a .dts to describe the HW made of iWave's RZ/G1M SoM, iWave's RZ/G1M/G1N Qseven carrier board, and the camera daughter board. The camera daughter board .dtsi adds support for ttySC[14]. Signed-off-by: Fabrizio Castro Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi | 43 +++++++++++++++++++++++++ arch/arm/boot/dts/r8a7743-iwg20d-q7-dbcm-ca.dts | 19 +++++++++++ 3 files changed, 63 insertions(+) commit 4f0b2563c4c0c67fc5b5e2369d5f62f91abc42e7 Author: Fabrizio Castro Date: Fri Oct 6 18:59:52 2017 +0100 ARM: dts: iwg20d-q7: Rework DT architecture Since the same carrier board may host RZ/G1M and RZ/G1N based Systems on Module, the DT architecture for iwg20d-q7 needs better decoupling. This patch provides: * iwg20d-q7-common.dtsi - its purpose is to define the carrier board definitions, and its content is basically the same as the previous version of r8a7743-iwg20d-q7.dts, only it has no reference to the SoM .dtsi, and that's why the filename doesn't mention the SoC name any more. * r8a7743-iwg20d-q7.dts - its new purpose is to put together the SoM .dtsi (r8a7743-iwg20m.dtsi) and the carrier board .dtsi defined by this very patch, along with "model" and "compatible" properties. The final DT architecture to describe the board is now: r8a7743-iwg20d-q7.dts # Carrier Board + SoM ├── r8a7743-iwg20m.dtsi # SoM │   └── r8a7743.dtsi # SoC └── iwg20d-q7-common.dtsi # Carrier Board and maximizes the reuse of the definitions for the carrier board and for the SoM. Signed-off-by: Fabrizio Castro Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/iwg20d-q7-common.dtsi | 147 ++++++++++++++++++++++++++++++++ arch/arm/boot/dts/r8a7743-iwg20d-q7.dts | 139 +----------------------------- 2 files changed, 149 insertions(+), 137 deletions(-) commit 4a9cfe47b8ea3f7b8c551a365184f4aec993ee5d Author: Chris Brandt Date: Wed Oct 4 16:07:24 2017 -0500 dt-bindings: pinctrl: Add support for RZ/A1M and RZ/A1L Describe how to specify RZ/A1M and RZ/A1L devices. Signed-off-by: Chris Brandt Signed-off-by: Geert Uytterhoeven Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 039bc58e73b77723029fb5147a9d62da9d2ec22d Author: Chris Brandt Date: Wed Oct 4 16:07:23 2017 -0500 pinctrl: rza1: Add support for RZ/A1L Aspects like the number of ports and the location where peripherals are brought out differ between the RZ/A1H and RZ/A1L. Signed-off-by: Chris Brandt Reviewed-by: Jacopo Mondi Signed-off-by: Geert Uytterhoeven drivers/pinctrl/pinctrl-rza1.c | 134 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) commit 7c4f63ec94a1a45dd90dd3bf4da8de24a0a5a9c0 Author: Ondrej Jirman Date: Thu Oct 5 04:33:14 2017 +0200 clk: sunxi-ng: a83t: Fix invalid csi-mclk mux offset Datasheet specified that parent MUX settings are at bits [10:8], but current implementation specifies incorrect offset at [10:12]. Fix this. Signed-off-by: Ondrej Jirman Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-a83t.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4fcae770f3027abefd952c5d511ac6299828865a Merge: 2847d24 8a5776a Author: Greg Kroah-Hartman Date: Mon Oct 9 09:11:09 2017 +0200 Merge 4.14-rc4 into usb-next This merges in the USB fixes that we need here. Signed-off-by: Greg Kroah-Hartman commit 9424e8b1fedbaff34df187fdb87f9a9cba2d0ff2 Merge: bccf1da 8a5776a Author: Greg Kroah-Hartman Date: Mon Oct 9 09:05:05 2017 +0200 Merge 4.14-rc4 into tty-next We want the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 1236d6bb6e19fc72ffc6bbcdeb1bfefe450e54ee Merge: 750b1a6 8a5776a Author: Greg Kroah-Hartman Date: Mon Oct 9 09:02:35 2017 +0200 Merge 4.14-rc4 into staging-next We want the staging/iio fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman commit c49c777f9c87749b73bc888f097f8a4178382449 Author: Christos Gkekas Date: Sun Oct 8 23:46:47 2017 +0100 qed: Delete redundant check on dcb_app priority dcb_app priority is unsigned thus checking whether it is less than zero is redundant. Signed-off-by: Christos Gkekas Acked-By: Tomer Tayar Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c778c32118167adcfe6b40063c49bfeac6bc1cf1 Author: Christos Gkekas Date: Sun Oct 8 20:13:49 2017 +0100 net: ethernet: stmmac: Clean up dead code Many macros in dwmac-ipq806x are unused and should be removed. Moreover gmac->id is an unsigned variable and therefore checking whether it is less than zero is redundant. Signed-off-by: Christos Gkekas Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit bf6a119eea2f1427ac1c8b489bb187defa476ec6 Merge: a423177 cc429c8 Author: David S. Miller Date: Sun Oct 8 21:16:31 2017 -0700 Merge branch 'ipv6_dev_get_saddr-rcu' Eric Dumazet says: ==================== ipv6: ipv6_dev_get_saddr() rcu works Sending IPv6 udp packets on non connected sockets is quite slow, because ipv6_dev_get_saddr() is still using an rwlock and silly references games on ifa. Tested: $ ./super_netperf 16 -H 4444::555:0786 -l 2000 -t UDP_STREAM -- -m 100 & [1] 12527 Performance is boosted from 2.02 Mpps to 4.28 Mpps Kernel profile before patches : 22.62% [kernel] [k] _raw_read_lock_bh 7.04% [kernel] [k] refcount_sub_and_test 6.56% [kernel] [k] ipv6_get_saddr_eval 5.67% [kernel] [k] _raw_read_unlock_bh 5.34% [kernel] [k] __ipv6_dev_get_saddr 4.95% [kernel] [k] refcount_inc_not_zero 4.03% [kernel] [k] __ip6addrlbl_match 3.70% [kernel] [k] _raw_spin_lock 3.44% [kernel] [k] ipv6_dev_get_saddr 3.24% [kernel] [k] ip6_pol_route 3.06% [kernel] [k] refcount_add_not_zero 2.30% [kernel] [k] __local_bh_enable_ip 1.81% [kernel] [k] mlx4_en_xmit 1.20% [kernel] [k] __ip6_append_data 1.12% [kernel] [k] __ip6_make_skb 1.11% [kernel] [k] __dev_queue_xmit 1.06% [kernel] [k] l3mdev_master_ifindex_rcu Kernel profile after patches : 11.36% [kernel] [k] ip6_pol_route 7.65% [kernel] [k] _raw_spin_lock 7.16% [kernel] [k] __ipv6_dev_get_saddr 6.49% [kernel] [k] ipv6_get_saddr_eval 6.04% [kernel] [k] refcount_add_not_zero 3.34% [kernel] [k] __ip6addrlbl_match 2.62% [kernel] [k] __dev_queue_xmit 2.37% [kernel] [k] mlx4_en_xmit 2.26% [kernel] [k] dst_release 1.89% [kernel] [k] __ip6_make_skb 1.87% [kernel] [k] __ip6_append_data 1.86% [kernel] [k] udpv6_sendmsg 1.86% [kernel] [k] ip6t_do_table 1.64% [kernel] [k] ipv6_dev_get_saddr 1.64% [kernel] [k] find_match 1.51% [kernel] [k] l3mdev_master_ifindex_rcu 1.24% [kernel] [k] ipv6_addr_label ==================== Signed-off-by: David S. Miller commit cc429c8f6fa7cc1c9109bb4a1ad63a6d1f232f0e Author: Eric Dumazet Date: Sat Oct 7 19:30:28 2017 -0700 ipv6: avoid cache line dirtying in ipv6_dev_get_saddr() By extending the rcu section a bit, we can avoid these very expensive in6_ifa_put()/in6_ifa_hold() calls done in __ipv6_dev_get_saddr() and ipv6_dev_get_saddr() Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrconf.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit f59c031e9134bb16c38980196a73d7ba40979baa Author: Eric Dumazet Date: Sat Oct 7 19:30:27 2017 -0700 ipv6: __ipv6_dev_get_saddr() rcu conversion Callers hold rcu_read_lock(), so we do not need the rcu_read_lock()/rcu_read_unlock() pair. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrconf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 24ba333b2c1a609fc17214ceb215e19bd9d54951 Author: Eric Dumazet Date: Sat Oct 7 19:30:26 2017 -0700 ipv6: ipv6_chk_prefix() rcu conversion Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrconf.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 47e26941f78d6ec03c5dd547425409f1f7852ff5 Author: Eric Dumazet Date: Sat Oct 7 19:30:25 2017 -0700 ipv6: ipv6_chk_custom_prefix() rcu conversion Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrconf.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit d9bf82c2f61be534873a37a0631b58761b6d6506 Author: Eric Dumazet Date: Sat Oct 7 19:30:24 2017 -0700 ipv6: ipv6_count_addresses() rcu conversion Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrconf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8ef802aa8ec87a0fec20d28f8f51cad964265902 Author: Eric Dumazet Date: Sat Oct 7 19:30:23 2017 -0700 ipv6: prepare RCU lookups for idev->addr_list inet6_ifa_finish_destroy() already uses kfree_rcu() to free inet6_ifaddr structs. We need to use proper list additions/deletions in order to allow readers to use RCU instead of idev->lock rwlock. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrconf.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit a42317785c898c0ed46db45a33b0cc71b671bf29 Merge: 951f788 ed842fa Author: David S. Miller Date: Sun Oct 8 21:12:04 2017 -0700 Merge branch 'bridge-neigh-msg-proxy-and-flood-suppression-support' Roopa Prabhu says: ==================== bridge: neigh msg proxy and flood suppression support This series implements arp and nd suppression in the bridge driver for ethernet vpns. It implements rfc7432, section 10 https://tools.ietf.org/html/rfc7432#section-10 for ethernet VPN deployments. It is similar to the existing BR_PROXYARP* flags but has a few semantic differences to conform to EVPN standard. Unlike the existing flags, this new flag suppresses flood of all neigh discovery packets (arp and nd) to tunnel ports. Supports both vlan filtering and non-vlan filtering bridges. In case of EVPN, it is mainly used to avoid flooding of arp and nd packets to tunnel ports like vxlan. v2 : rebase to latest + address some optimization feedback from Nikolay. v3 : fix kbuild reported build errors with CONFIG_INET off v4 : simplify port flag mask as suggested by stephen v5 : address some feedback from Toshiaki v6 : some v5 cleanups in nd suppress (keep it consistent with arp suppress) ==================== Signed-off-by: David S. Miller commit ed842faeb2bd49256f00485402f3113205f91d30 Author: Roopa Prabhu Date: Fri Oct 6 22:12:39 2017 -0700 bridge: suppress nd pkts on BR_NEIGH_SUPPRESS ports This patch avoids flooding and proxies ndisc packets for BR_NEIGH_SUPPRESS ports. Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/bridge/br_arp_nd_proxy.c | 249 +++++++++++++++++++++++++++++++++++++++++++ net/bridge/br_device.c | 11 ++ net/bridge/br_input.c | 11 ++ net/bridge/br_private.h | 3 + 4 files changed, 274 insertions(+) commit 057658cb33fbf4d4309f01fe8845903b1cd07fad Author: Roopa Prabhu Date: Fri Oct 6 22:12:38 2017 -0700 bridge: suppress arp pkts on BR_NEIGH_SUPPRESS ports This patch avoids flooding and proxies arp packets for BR_NEIGH_SUPPRESS ports. Moves existing br_do_proxy_arp to br_do_proxy_suppress_arp to support both proxy arp and neigh suppress. Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller net/bridge/br_arp_nd_proxy.c | 188 +++++++++++++++++++++++++++++++++++++++++++ net/bridge/br_device.c | 9 +++ net/bridge/br_input.c | 63 ++------------- net/bridge/br_private.h | 3 + 4 files changed, 205 insertions(+), 58 deletions(-) commit 821f1b21cabb46827ce39ddf82e2789680b5042a Author: Roopa Prabhu Date: Fri Oct 6 22:12:37 2017 -0700 bridge: add new BR_NEIGH_SUPPRESS port flag to suppress arp and nd flood This patch adds a new bridge port flag BR_NEIGH_SUPPRESS to suppress arp and nd flood on bridge ports. It implements rfc7432, section 10. https://tools.ietf.org/html/rfc7432#section-10 for ethernet VPN deployments. It is similar to the existing BR_PROXYARP* flags but has a few semantic differences to conform to EVPN standard. Unlike the existing flags, this new flag suppresses flood of all neigh discovery packets (arp and nd) to tunnel ports. Supports both vlan filtering and non-vlan filtering bridges. In case of EVPN, it is mainly used to avoid flooding of arp and nd packets to tunnel ports like vxlan. This patch adds netlink and sysfs support to set this bridge port flag. Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller include/linux/if_bridge.h | 1 + include/uapi/linux/if_link.h | 1 + net/bridge/Makefile | 2 +- net/bridge/br_arp_nd_proxy.c | 32 ++++++++++++++++++++++++++++++++ net/bridge/br_forward.c | 2 +- net/bridge/br_if.c | 5 +++++ net/bridge/br_netlink.c | 10 +++++++++- net/bridge/br_private.h | 2 ++ net/bridge/br_sysfs_if.c | 2 ++ 9 files changed, 54 insertions(+), 3 deletions(-) commit 951f788a80ff8b6339c5c1ab888b0d4b4352efd8 Author: Eric Dumazet Date: Sun Oct 8 21:07:18 2017 -0700 ipv6: fix a BUG in rt6_get_pcpu_route() Ido reported following splat and provided a patch. [ 122.221814] BUG: using smp_processor_id() in preemptible [00000000] code: sshd/2672 [ 122.221845] caller is debug_smp_processor_id+0x17/0x20 [ 122.221866] CPU: 0 PID: 2672 Comm: sshd Not tainted 4.14.0-rc3-idosch-next-custom #639 [ 122.221880] Hardware name: Mellanox Technologies Ltd. MSN2100-CB2FO/SA001017, BIOS 5.6.5 06/07/2016 [ 122.221893] Call Trace: [ 122.221919] dump_stack+0xb1/0x10c [ 122.221946] ? _atomic_dec_and_lock+0x124/0x124 [ 122.221974] ? ___ratelimit+0xfe/0x240 [ 122.222020] check_preemption_disabled+0x173/0x1b0 [ 122.222060] debug_smp_processor_id+0x17/0x20 [ 122.222083] ip6_pol_route+0x1482/0x24a0 ... I believe we can simplify this code path a bit, since we no longer hold a read_lock and need to release it to avoid a dead lock. By disabling BH, we make sure we'll prevent code re-entry and rt6_get_pcpu_route()/rt6_make_pcpu_route() run on the same cpu. Fixes: 66f5d6ce53e6 ("ipv6: replace rwlock with rcu and spinlock in fib6_table") Reported-by: Ido Schimmel Signed-off-by: Eric Dumazet Tested-by: Ido Schimmel Signed-off-by: David S. Miller net/ipv6/route.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) commit 51a0c00c6bf2156099f80c6892fd409a5d217b96 Merge: 28f50eb a369d4a Author: David S. Miller Date: Sun Oct 8 21:07:11 2017 -0700 Merge tag 'mlx5-updates-2017-10-06' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: ==================== Mellanox, mlx5 updates 2017-10-06 This series includes some shared code updates for kernel 4.15 to both net-next and rdma-next trees. The series includes mlx5 low level flow steering updates and optimizations to support firmware command parallelism for flow steering requests from Maor Gottlieb and two other small fixes from Matan and Maor. One fix from Matan adds error handling for when the destination list of the flow steering rule is full. Maor introduced a patch to avoid NULL pointer dereference on steering cleanup. Then Some refactoring patches needed by the series for code sharing purposes. and split the Flow Table Entry (FTE) and Flow Group (FG) creation code to two parts: 1) Object allocation - allocate the steering node and initialize its resources. 2) The firmware command execution. This change will give us the ability to take write lock on the parent node (e.g. FG for FTE creating) only on the software data struct allocation and creation part of the procedure where the synchronization is really required, and will allow us to execute multiple firmware commands simultaneously and overcome the firmware bottleneck. Refactor the locking scheme of the mlx5 core flow steering as follows: 1) Replace the mutex lock with readers-writers semaphore and take the write lock only when necessary (e.g. allocating a new flow table entry index or adding a node to the parent's children list). When we try to find a suitable child in the parent's children list (e.g. search for flow group with the same match_criteria of the rule) then we only take the read lock. 2) Add versioning mechanism - each steering entity (FT, FG, FTE, DST) will have an incremental version. The version is increased when the entity is changed (e.g. when a new FTE was added to FG - the FG's version is increased). Versioning is used in order to determine if the last traverse of an entity's children is valid or a rescan under write lock is required. Last patch adds FGs and FTEs memory pool, It is useful because these objects are not small and could be allocated/deallocated many times. This support improves the insertion rate of steering rules from ~5k/sec to ~40k/sec. ==================== Signed-off-by: David S. Miller commit d1d90147c9680aaec4a5757932c2103c42c9c23b Author: Guoqing Jiang Date: Mon Oct 9 10:32:48 2017 +0800 md: always set THREAD_WAKEUP and wake up wqueue if thread existed Since commit 4ad23a976413 ("MD: use per-cpu counter for writes_pending"), the wait_queue is only got invoked if THREAD_WAKEUP is not set previously. With above change, I can see process_metadata_update could always hang on the wait queue, because mddev->thread could stay on 'D' status and the THREAD_WAKEUP flag is not cleared since there are lots of place to wake up mddev->thread. Then deadlock happened as follows: linux175:~ # ps aux|grep md|grep D root 20117 0.0 0.0 0 0 ? D 03:45 0:00 [md0_raid1] root 20125 0.0 0.0 0 0 ? D 03:45 0:00 [md0_cluster_rec] linux175:~ # cat /proc/20117/stack [] dlm_lock_sync+0x94/0xd0 [md_cluster] [] lock_token+0x34/0xd0 [md_cluster] [] metadata_update_start+0x64/0x110 [md_cluster] [] md_update_sb.part.58+0x9b/0x860 [md_mod] [] md_update_sb+0x15/0x30 [md_mod] [] md_check_recovery+0x266/0x490 [md_mod] [] raid1d+0x42/0x810 [raid1] [] md_thread+0x122/0x150 [md_mod] [] kthread+0x101/0x140 linux175:~ # cat /proc/20125/stack [] recv_daemon+0x3f9/0x5c0 [md_cluster] [] md_thread+0x122/0x150 [md_mod] [] kthread+0x101/0x140 So let's revert the part of code in the commit to resovle the problem since we can't get lots of benefits of previous change. Fixes: 4ad23a976413 ("MD: use per-cpu counter for writes_pending") Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li drivers/md/md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b9e56e41e0c55c2b2ab5919c5e167faa4200b083 Merge: bb7a9c8 8ee5702 Author: Dave Airlie Date: Mon Oct 9 11:21:15 2017 +1000 Merge branch 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux into drm-next Initial pull request for DC support. We've completed a substantial amount of the cleanup and restructuring in our TODO. There are a few additional cleanups that we are continuing to work on, but I don't think there are any showstoppers remaining. We've tried to maintain most of the history for bisect purposes. Harry made sure all the commits build. We've enabled DC for vega10 and Raven. Pre-vega10 parts can be enabled via module parameter (amdgpu.dc=1), but are not enabled by default at this point until we get further testing upstream. This code provides atomic modesetting support for DCE8 (CIK), DCE10 (Tonga, Fiji), DCE11 (CZ, ST, Polaris), DCE12 (vega10), and DCN1 (RV) including HDMI and DP audio, DP MST, and many other advanced display features. + Latest cleanups for DC from you and Harry. Note that there is some flickering on some older asics with this branch due to a regression in powerplay that has already been fixed and will be included in my next non-DC pull request next week. * 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux: (897 commits) amdgpu/dc: use kref for dc_state. amdgpu/dc: convert dc_sink to kref. amdgpu/dc: convert dc_stream_state to kref. amdgpu/dc: use kref for dc_plane_state. amdgpu/dc: convert dc_gamma to kref reference counting. amdgpu/dc: convert dc_transfer to use a kref. amdgpu/dc: kill a bunch of dead code. amdgpu/dc: set a bunch of functions to static. amdgpu/dc: kill some deadcode in dc core. amdgpu/dc: fix indentation on a couple of returns. amdgpu/dm: don't use after free. amdgpu/dc: kfree already checks for NULL. amdgpu/dc: fix a bunch of misc whitespace. amdgpu/dc: drop hw_sequencer_types.h amdgpu/dc: drop dce110_types.h amdgpu/dc: use kernel ilog2 for log_2. amdgpu/dc: don't memset after kzalloc. amdgpu/dc: inline dal grph object id functions. amdgpu/dc: inline dml_round_to_multiple amdgpu/dc: rename bios get_image symbol to something more searchable. ... commit bb7a9c8d712f37385a706a594d6edf6e6d2669d0 Merge: 15438ab d3f04c9 Author: Dave Airlie Date: Mon Oct 9 11:00:16 2017 +1000 Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next More new stuff for 4.15. Highlights: - Add clock query interface for raven - Add new FENCE_TO_HANDLE ioctl - UVD video encode ring support on polaris - transparent huge page DMA support - deadlock fixes - compute pipe lru tweaks - powerplay cleanups and regression fixes - fix duplicate symbol issue with radeon and amdgpu - misc bug fixes * 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux: (72 commits) drm/radeon/dp: make radeon_dp_get_dp_link_config static drm/radeon: move ci_send_msg_to_smc to where it's used drm/amd/sched: fix deadlock caused by unsignaled fences of deleted jobs drm/amd/sched: NULL out the s_fence field after run_job drm/amd/sched: move adding finish callback to amd_sched_job_begin drm/amd/sched: fix an outdated comment drm/amd/sched: rename amd_sched_entity_pop_job drm/amdgpu: minor coding style fix drm/ttm: add transparent huge page support for DMA allocations v2 drm/ttm: add support for different pool sizes drm/ttm: remove unsued options from ttm_mem_global_alloc_page drm/amdgpu: add uvd enc irq drm/amdgpu: add uvd enc ib test drm/amdgpu: add uvd enc ring test drm/amdgpu: add uvd enc vm functions (v2) drm/amdgpu: add uvd enc into run queue drm/amdgpu: add uvd enc rings drm/amdgpu: add new uvd enc ring methods drm/amdgpu: add uvd enc command in header drm/amdgpu: add uvd enc registers in header ... commit d3f04c98ead2b89887e1e3c09b26e4917bacdd9e Author: Alex Deucher Date: Fri Sep 29 11:35:52 2017 -0400 drm/radeon/dp: make radeon_dp_get_dp_link_config static It's not used outside this file any longer. Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/atombios_dp.c | 8 ++++---- drivers/gpu/drm/radeon/radeon_mode.h | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) commit c3b16f16a4dffd8516a2020ce2539ebf8b2d6e33 Author: Alex Deucher Date: Fri Sep 29 10:07:40 2017 -0400 drm/radeon: move ci_send_msg_to_smc to where it's used It's used in ci_dpm.c so move it there and make it static. Reviewed-by: Rodrigo Vivi Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/ci_dpm.c | 22 ++++++++++++++++++++++ drivers/gpu/drm/radeon/ci_dpm.h | 1 - drivers/gpu/drm/radeon/ci_smc.c | 21 --------------------- 3 files changed, 22 insertions(+), 22 deletions(-) commit 8f21b74e7cf87af187f628ceb29419a1303ef008 Author: Andy Shevchenko Date: Mon Jul 17 16:05:41 2017 -0400 platform/x86: intel_ips: Remove FSF address from GPL notice This patch removes the FSF address from the GPL notice to fix a checkpatch.pl CHECK message. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_ips.c | 4 ---- drivers/platform/x86/intel_ips.h | 4 ---- 2 files changed, 8 deletions(-) commit b8cc799ddcbde8bf970804ce5f5546af2abc81bc Author: Andy Shevchenko Date: Thu Oct 5 14:10:03 2017 +0300 platform/x86: intel_ips: Remove unneeded fields and label There are fields in the struct ips_mcp_limits which are not used anywhere and a label which we may get rid of. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_ips.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit d2fa170a2543bfd0c3d91ae0a6f808a5becda5c9 Author: Andy Shevchenko Date: Thu Oct 5 10:55:40 2017 +0300 platform/x86: intel_ips: Keep pointer to struct device ...instead of keeping pointer to struct pci_dev. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_ips.c | 51 ++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 26 deletions(-) commit 512f4665d839e1b4d5ebc8e446a4b948cbac681d Author: Andy Shevchenko Date: Thu Oct 5 10:46:40 2017 +0300 platform/x86: intel_ips: Use PCI_VDEVICE() macro Intel vendor ID is defined globally, thus we may use PCI_VDEVICE(). Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_ips.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8b8bd6d255c960e1a935837c26fbc598e91eba24 Author: Andy Shevchenko Date: Thu Oct 5 11:28:01 2017 +0300 platform/x86: intel_ips: Switch to new PCI IRQ allocation API This makes code cleaner. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_ips.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit f5b33d94c1eca23802e3ac76b0788ba59e44a481 Author: Andy Shevchenko Date: Thu Jan 26 17:16:26 2017 +0200 platform/x86: intel_ips: Simplify error handling via devres API Use devm_ and pcim_ functions to make error handling simpler and code smaller and tidier. Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_ips.c | 62 ++++++++++------------------------------ 1 file changed, 15 insertions(+), 47 deletions(-) commit 687d25a2bae98b32534d2119419ed1eea6e53bbb Author: Hans de Goede Date: Thu Oct 5 16:31:47 2017 +0200 MAINTAINERS: Add entry for the PEAQ WMI hotkeys driver Add an entry to make myself the maintainer of the PEAQ WMI hotkeys driver. Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 3b95206110a2c13076c3a7fa8ddeae36c2dbcf42 Author: Hans de Goede Date: Thu Oct 5 20:04:04 2017 +0200 platform/x86: peaq-wmi: Add DMI check before binding to the WMI interface It seems that the WMI GUID used by the PEAQ 2-in-1 WMI hotkeys is not as unique as a GUID should be and is used on some other devices too. This is causing spurious key-press reports on these other devices. This commits adds a DMI check to the PEAQ 2-in-1 WMI hotkeys driver to ensure that it is actually running on a PEAQ 2-in-1, fixing the spurious key-presses on these other devices. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1497861 BugLink: https://bugzilla.suse.com/attachment.cgi?id=743182 Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko drivers/platform/x86/peaq-wmi.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit dfea7e18276c6a702860c927298e15d4a4c2569d Author: Andy Shevchenko Date: Sun Oct 8 21:04:43 2017 +0300 platform/x86: peaq-wmi: Revert Blacklist Lenovo ideapad 700-15ISK In favour of new approach this reverts commit ff74972e966bfc586cea116f976866858d1b0fec. Signed-off-by: Andy Shevchenko drivers/platform/x86/peaq-wmi.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) commit 28f50eb20931f32a2ceeb6aba8fa2cd5ca96ad9f Merge: c1b85a1 78005d9 Author: David S. Miller Date: Sun Oct 8 10:11:01 2017 -0700 Merge branch 'hv_netvsc-TCP-hash-level' Haiyang Zhang says: ==================== hv_netvsc: support changing TCP hash level The patch set simplifies the existing hash level switching code for UDP. It also adds the support for changing TCP hash level. So users can switch between L3 an L4 hash levels for TCP and UDP. ==================== Signed-off-by: David S. Miller commit 78005d91c11ea45a93e68c7d59079784f4c46828 Author: Haiyang Zhang Date: Fri Oct 6 08:33:59 2017 -0700 hv_netvsc: Update netvsc Document for TCP hash level setting Update Documentation/networking/netvsc.txt for TCP hash level setting and related info. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller Documentation/networking/netvsc.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0518ec4f9d8804a9b3ab4306b4b10828f35f715b Author: Haiyang Zhang Date: Fri Oct 6 08:33:58 2017 -0700 hv_netvsc: Add ethtool handler to set and get TCP hash levels The patch supports the options to switch TCP hash level between L3 and L4 by ethtool command. TCP over IPv4 and v6 can be set differently. The default hash level is L4. We currently only allow switching TX hash level from within the guests. For example, for TCP over IPv4 on eth0: To include TCP port numbers in hashing: ethtool -N eth0 rx-flow-hash tcp4 sdfn To exclude TCP port numbers in hashing: ethtool -N eth0 rx-flow-hash tcp4 sd To show TCP hash level: ethtool -n eth0 rx-flow-hash tcp4 Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 486e3981057cacdafd62ba0618612193ff12d1dd Author: Haiyang Zhang Date: Fri Oct 6 08:33:57 2017 -0700 hv_netvsc: Change the hash level variable to bit flags This simplifies the logic and make it easier to add more options. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 11 +++++-- drivers/net/hyperv/netvsc_drv.c | 73 ++++++++++++++++++++++++++++------------- 2 files changed, 59 insertions(+), 25 deletions(-) commit c1b85a193ab8ba860c52caf924d7964abe9c0da3 Merge: c9f766b 9b63ef88 Author: David S. Miller Date: Sun Oct 8 10:07:21 2017 -0700 Merge branch 'mlxsw-more-extack' Jiri Pirko says: ==================== mlxsw: Add more extack error reporting Ido says: Add error messages to VLAN and bridge enslavements to help users understand why the enslavement failed. ==================== Signed-off-by: David S. Miller commit 9b63ef88d3a16d67afbe7916625289650e9f30d9 Author: Ido Schimmel Date: Sun Oct 8 11:57:56 2017 +0200 mlxsw: spectrum: Propagate extack further for bridge enslavements The code that actually takes care of bridge offload introduces a few more non-trivial constraints with regards to bridge enslavements. Propagate extack there to indicate the reason. $ ip link add link enp1s0np1 name enp1s0np1.10 type vlan id 10 $ ip link add link enp1s0np1 name enp1s0np1.20 type vlan id 20 $ ip link add name br0 type bridge $ ip link set dev enp1s0np1.10 master br0 $ ip link set dev enp1s0np1.20 master br0 Error: spectrum: Can not bridge VLAN uppers of the same port. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Acked-by: David Ahern Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 6 ++++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3 ++- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 25 +++++++++++++++------- 3 files changed, 23 insertions(+), 11 deletions(-) commit c1f2c6d025d365d961dcdf555ecf0f60066f38a3 Author: Ido Schimmel Date: Sun Oct 8 11:57:55 2017 +0200 mlxsw: spectrum: Add extack for VLAN enslavements Similar to physical ports, enslavement of VLAN devices can also fail. Use extack to indicate why the enslavement failed. $ ip link add link enp1s0np1 name enp1s0np1.10 type vlan id 10 $ ip link add name bond0 type bond mode 802.3ad $ ip link set dev enp1s0np1.10 master bond0 Error: spectrum: VLAN devices only support bridge and VRF uppers. Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Acked-by: David Ahern Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 38502f232eafa3d3a1072ead3678090e11bdbecb Author: Vinod Koul Date: Sun Oct 8 20:28:15 2017 +0530 dmaengine: stm32: use %p format specfier for pointer Pointer print was using explict cast and printing as %x which causes below warn on some arch's so print using %p format specfier. Reported-by: Fengguang Wu Signed-off-by: Vinod Koul drivers/dma/stm32-mdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e187b2099034a292182ac88214d4e19d4b9b67e Author: Noralf Trønnes Date: Fri Sep 22 17:47:44 2017 +0200 drm/gem-fb-helper: Improve documentation Make the docs read a little better. Cc: Laurent Pinchart Cc: Daniel Vetter Signed-off-by: Noralf Trønnes Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1506095264-41622-1-git-send-email-noralf@tronnes.org drivers/gpu/drm/drm_gem_framebuffer_helper.c | 82 ++++++++++++++++++---------- 1 file changed, 52 insertions(+), 30 deletions(-) commit c40610198f35e8264f9175dafe74db6288a07eda Author: Marek Szyprowski Date: Wed Oct 4 08:38:23 2017 +0200 soc: samsung: Remove Exynos4212 related dead code Support for Exynos4212 SoCs has been removed by commit bca9085e0ae9 ("ARM: dts: exynos: remove Exynos4212 support (dead code)"), so there is no need to keep remaining dead code related to this SoC version. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Documentation/devicetree/bindings/arm/samsung/pmu.txt | 1 - drivers/soc/samsung/exynos-pmu.c | 9 --------- drivers/soc/samsung/exynos-pmu.h | 2 -- drivers/soc/samsung/exynos4-pmu.c | 13 ++----------- 4 files changed, 2 insertions(+), 23 deletions(-) commit 9e43eca3c87476f75680f472ff3ebcd85f357b86 Author: Marek Szyprowski Date: Wed Oct 4 08:38:22 2017 +0200 ARM: EXYNOS: Remove Exynos4212 related dead code Support for Exynos4212 SoCs has been removed by commit bca9085e0ae9 ("ARM: dts: exynos: remove Exynos4212 support (dead code)"), so there is no need to keep remaining dead code related to this SoC version. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/mach-exynos/Kconfig | 5 ----- arch/arm/mach-exynos/common.h | 11 +---------- arch/arm/mach-exynos/exynos.c | 2 -- arch/arm/mach-exynos/firmware.c | 5 ----- arch/arm/mach-exynos/pm.c | 3 +-- arch/arm/mach-exynos/suspend.c | 4 ---- 6 files changed, 2 insertions(+), 28 deletions(-) commit 5543de66e26776c20ecfb9e498c2561d74823ec3 Author: Biju Das Date: Fri Oct 6 18:15:17 2017 +0100 dmaengine: usb-dmac: Add compatible string for r8a7743/5 This patch adds support for r8a7743/5 SoCs. The Renesas RZ/G1[ME] (R8A7743/5) usbdmac engine is identical to the R-Car Gen2 family. No driver change is needed due to the fallback compatible value "renesas,r8a7743-usb-dmac". Adding the SoC-specific compatible values here has two purposes: 1. Document which SoCs have this hardware module, 2. Allow checkpatch to validate compatible values. Signed-off-by: Biju Das Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/renesas,usb-dmac.txt | 2 ++ 1 file changed, 2 insertions(+) commit 4219ff33b26dbaa08c728ee4ad1a3a5aae300e1a Author: Dan Carpenter Date: Tue Oct 3 13:54:50 2017 +0300 dmaengine: stm32-dmamux: Fix a NULL vs IS_ERR() check in probe devm_ioremap_resource() doesn't return NULL, it returns error pointers. Fixes: df7e762db5f6 ("dmaengine: Add STM32 DMAMUX driver") Signed-off-by: Dan Carpenter Acked-by: Pierre-Yves MORDRET Signed-off-by: Vinod Koul drivers/dma/stm32-dmamux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a4ffb13c8946abc4b92621275de6718e19db860d Author: Pierre-Yves MORDRET Date: Thu Sep 28 17:36:41 2017 +0200 dmaengine: Add STM32 MDMA driver This patch adds the driver for the STM32 MDMA controller. Master Direct memory access (MDMA) is used in order to provide high-speed data transfer between memory and memory or between peripherals and memory. MDMA controller provides a master AXI interface for main memory and peripheral registers access (system access port) and a master AHB interface only for Cortex-M7 TCM memory access (TCM access port). MDMA works in conjunction with the standard DMA controllers (DMA1 or DMA2). It offers up to 64 channels, each dedicated to managing memory access requests from one of the DMA stream memory buffer or other peripherals (w/ integrated FIFO). Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Vinod Koul drivers/dma/Kconfig | 12 + drivers/dma/Makefile | 1 + drivers/dma/stm32-mdma.c | 1666 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1679 insertions(+) commit 18d59893eb2e836c920856772ead554eb461ef72 Author: Pierre-Yves MORDRET Date: Thu Sep 28 17:36:40 2017 +0200 dt-bindings: Document the STM32 MDMA bindings This patch adds documentation of device tree bindings for the STM32 MDMA controller. Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET Acked-by: Rob Herring Signed-off-by: Vinod Koul .../devicetree/bindings/dma/stm32-mdma.txt | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit f9f2a6fe1399d1fab38b6c1d0639928a52b67a79 Author: Geert Uytterhoeven Date: Wed Oct 4 14:16:16 2017 +0200 gpio: rcar: Use of_device_get_match_data() helper Use the of_device_get_match_data() helper instead of open coding. Note that the gpio-rcar driver is used with DT only, so there's always a valid match. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Linus Walleij drivers/gpio/gpio-rcar.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit db375dbf455112b0030aa75c04226cdbce0ee11b Author: Geert Uytterhoeven Date: Wed Oct 4 13:35:12 2017 +0200 MAINTAINERS: Add git repository to Renesas pinctrl driver section Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Linus Walleij MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit c9f766bc6ee0c0a0b01ac2c94610aa5dde7343ff Merge: f192970 368211f Author: David S. Miller Date: Sat Oct 7 23:29:40 2017 +0100 Merge branch 'bpf-obj-name-misc' Martin KaFai Lau says: ==================== bpf: Misc improvements and a new usage on bpf obj name The first two patches make improvements on the bpf obj name. The last patch adds the prog name to kallsyms. ==================== Signed-off-by: David S. Miller commit 368211fb920a0b789c238942c6af0414539f79d6 Author: Martin KaFai Lau Date: Thu Oct 5 21:52:13 2017 -0700 bpf: Append prog->aux->name in bpf_get_prog_name() This patch makes the bpf_prog's name available in kallsyms. The new format is bpf_prog_tag[_name]. Sample kallsyms from running selftests/bpf/test_progs: [root@arch-fb-vm1 ~]# egrep ' bpf_prog_[0-9a-fA-F]{16}' /proc/kallsyms ffffffffa0048000 t bpf_prog_dabf0207d1992486_test_obj_id ffffffffa0038000 t bpf_prog_a04f5eef06a7f555__123456789ABCDE ffffffffa0050000 t bpf_prog_a04f5eef06a7f555 Signed-off-by: Martin KaFai Lau Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/bpf/core.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 067cae47771c864604969fd902efe10916e0d79c Author: Martin KaFai Lau Date: Thu Oct 5 21:52:12 2017 -0700 bpf: Use char in prog and map name Instead of u8, use char for prog and map name. It can avoid the userspace tool getting compiler's signess warning. The bpf_prog_aux, bpf_map, bpf_attr, bpf_prog_info and bpf_map_info are changed. Signed-off-by: Martin KaFai Lau Cc: Jakub Kicinski Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller include/linux/bpf.h | 4 ++-- include/uapi/linux/bpf.h | 8 ++++---- tools/include/uapi/linux/bpf.h | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) commit 473d97343f94ff20f5196078314e4dd83156d3a2 Author: Martin KaFai Lau Date: Thu Oct 5 21:52:11 2017 -0700 bpf: Change bpf_obj_name_cpy() to better ensure map's name is init by 0 During get_info_by_fd, the prog/map name is memcpy-ed. It depends on the prog->aux->name and map->name to be zero initialized. bpf_prog_aux is easy to guarantee that aux->name is zero init. The name in bpf_map may be harder to be guaranteed in the future when new map type is added. Hence, this patch makes bpf_obj_name_cpy() to always zero init the prog/map name. Suggested-by: Daniel Borkmann Signed-off-by: Martin KaFai Lau Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/syscall.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f192970de860d3ab90aa9e2a22853201a57bde78 Author: William Tu Date: Thu Oct 5 12:07:12 2017 -0700 ip_gre: check packet length and mtu correctly in erspan tx Similarly to early patch for erspan_xmit(), the ARPHDR_ETHER device is the length of the whole ether packet. So skb->len should subtract the dev->hard_header_len. Fixes: 1a66a836da63 ("gre: add collect_md mode to ERSPAN tunnel") Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: William Tu Cc: Xin Long Cc: David Laight Reviewed-by: Xin Long Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 548ec114705bb8f0879a0da12abec17f17a7cc26 Author: Lin Zhang Date: Fri Oct 6 01:40:35 2017 +0800 net: phonet: mark phonet_protocol as const The phonet_protocol structs don't need to be written by anyone and so can be marked as const. Signed-off-by: Lin Zhang Signed-off-by: David S. Miller include/net/phonet/phonet.h | 6 ++++-- net/phonet/af_phonet.c | 15 ++++++++------- net/phonet/datagram.c | 2 +- net/phonet/pep.c | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-) commit 64237470ddf97b63155fbd272c9e743e01d5f514 Author: Lin Zhang Date: Fri Oct 6 01:37:29 2017 +0800 net: phonet: mark header_ops as const Signed-off-by: Lin Zhang Signed-off-by: David S. Miller include/linux/if_phonet.h | 2 +- net/phonet/af_phonet.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a1d753d29066e9b568884b0f12c029b0b811f0c8 Merge: bdc4764 81b9cf8 Author: David S. Miller Date: Sat Oct 7 23:05:58 2017 +0100 Merge branch 'bpf-perf-time-helpers' Yonghong Song says: ==================== bpf: add two helpers to read perf event enabled/running time Hardware pmu counters are limited resources. When there are more pmu based perf events opened than available counters, kernel will multiplex these events so each event gets certain percentage (but not 100%) of the pmu time. In case that multiplexing happens, the number of samples or counter value will not reflect the case compared to no multiplexing. This makes comparison between different runs difficult. Typically, the number of samples or counter value should be normalized before comparing to other experiments. The typical normalization is done like: normalized_num_samples = num_samples * time_enabled / time_running normalized_counter_value = counter_value * time_enabled / time_running where time_enabled is the time enabled for event and time_running is the time running for event since last normalization. This patch set implements two helper functions. The helper bpf_perf_event_read_value reads counter/time_enabled/time_running for perf event array map. The helper bpf_perf_prog_read_value read counter/time_enabled/time_running for bpf prog with type BPF_PROG_TYPE_PERF_EVENT. ==================== Signed-off-by: David S. Miller commit 81b9cf8028a17bdbdaa0da80b735b32150d4e89e Author: Yonghong Song Date: Thu Oct 5 09:19:23 2017 -0700 bpf: add a test case for helper bpf_perf_prog_read_value The bpf sample program trace_event is enhanced to use the new helper to print out enabled/running time. Signed-off-by: Yonghong Song Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/trace_event_kern.c | 10 ++++++++++ samples/bpf/trace_event_user.c | 13 ++++++++----- tools/include/uapi/linux/bpf.h | 3 ++- tools/testing/selftests/bpf/bpf_helpers.h | 3 +++ 4 files changed, 23 insertions(+), 6 deletions(-) commit 4bebdc7a85aa400c0222b5329861e4ad9252f1e5 Author: Yonghong Song Date: Thu Oct 5 09:19:22 2017 -0700 bpf: add helper bpf_perf_prog_read_value This patch adds helper bpf_perf_prog_read_cvalue for perf event based bpf programs, to read event counter and enabled/running time. The enabled/running time is accumulated since the perf event open. The typical use case for perf event based bpf program is to attach itself to a single event. In such cases, if it is desirable to get scaling factor between two bpf invocations, users can can save the time values in a map, and use the value from the map and the current value to calculate the scaling factor. Signed-off-by: Yonghong Song Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 10 +++++++++- kernel/trace/bpf_trace.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) commit 020a32d9581ac824d038b0b4e24e977e3cc8589f Author: Yonghong Song Date: Thu Oct 5 09:19:21 2017 -0700 bpf: add a test case for helper bpf_perf_event_read_value The bpf sample program tracex6 is enhanced to use the new helper to read enabled/running time as well. Signed-off-by: Yonghong Song Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/tracex6_kern.c | 26 ++++++++++++++++++++++++++ samples/bpf/tracex6_user.c | 13 ++++++++++++- tools/include/uapi/linux/bpf.h | 3 ++- tools/testing/selftests/bpf/bpf_helpers.h | 3 +++ 4 files changed, 43 insertions(+), 2 deletions(-) commit 908432ca84fc229e906ba164219e9ad0fe56f755 Author: Yonghong Song Date: Thu Oct 5 09:19:20 2017 -0700 bpf: add helper bpf_perf_event_read_value for perf event array map Hardware pmu counters are limited resources. When there are more pmu based perf events opened than available counters, kernel will multiplex these events so each event gets certain percentage (but not 100%) of the pmu time. In case that multiplexing happens, the number of samples or counter value will not reflect the case compared to no multiplexing. This makes comparison between different runs difficult. Typically, the number of samples or counter value should be normalized before comparing to other experiments. The typical normalization is done like: normalized_num_samples = num_samples * time_enabled / time_running normalized_counter_value = counter_value * time_enabled / time_running where time_enabled is the time enabled for event and time_running is the time running for event since last normalization. This patch adds helper bpf_perf_event_read_value for kprobed based perf event array map, to read perf counter and enabled/running time. The enabled/running time is accumulated since the perf event open. To achieve scaling factor between two bpf invocations, users can can use cpu_id as the key (which is typical for perf array usage model) to remember the previous value and do the calculation inside the bpf program. Signed-off-by: Yonghong Song Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/uapi/linux/bpf.h | 21 +++++++++++++++++++-- kernel/bpf/verifier.c | 4 +++- kernel/trace/bpf_trace.c | 45 +++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 63 insertions(+), 7 deletions(-) commit 97562633bcbac4a07d605ae628d7655fa71caaf5 Author: Yonghong Song Date: Thu Oct 5 09:19:19 2017 -0700 bpf: perf event change needed for subsequent bpf helpers This patch does not impact existing functionalities. It contains the changes in perf event area needed for subsequent bpf_perf_event_read_value and bpf_perf_prog_read_value helpers. Signed-off-by: Yonghong Song Acked-by: Peter Zijlstra (Intel) Signed-off-by: David S. Miller include/linux/perf_event.h | 7 +++++-- kernel/bpf/arraymap.c | 2 +- kernel/events/core.c | 15 +++++++++++++-- kernel/trace/bpf_trace.c | 2 +- 4 files changed, 20 insertions(+), 6 deletions(-) commit bdc476413dcdb5c38a7dec90fb2bca327021273a Author: Amine Kherbouche Date: Wed Oct 4 19:35:57 2017 +0200 ip_tunnel: add mpls over gre support This commit introduces the MPLSoGRE support (RFC 4023), using ip tunnel API by simply adding ipgre_tunnel_encap_(add|del)_mpls_ops() and the new tunnel type TUNNEL_ENCAP_MPLS. Signed-off-by: Amine Kherbouche Signed-off-by: David S. Miller include/uapi/linux/if_tunnel.h | 1 + net/mpls/af_mpls.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit 2af48d430aee5ded45cc6d6b4b10a5e76130885f Merge: 0d7b70e 81eb844 Author: David S. Miller Date: Sat Oct 7 21:22:59 2017 +0100 Merge branch 'fib6-rcu' Wei Wang says: ==================== ipv6: replace rwlock with rcu and spinlock in fib6 table Currently, fib6 table is protected by rwlock. During route lookup, reader lock is taken and during route insertion, deletion or modification, writer lock is taken. This is a very inefficient implementation because the fastpath always has to do the operation to grab the reader lock. According to my latest syn flood test on an iota ivybridage machine with 2 10G mlx nics bonded together, each with 8 rx queues on 2 NUMA nodes, and with the upstream net-next kernel: ipv4 stack can handle around 4.2Mpps ipv6 stack can handle around 1.3Mpps In order to close the gap of the performance number between ipv4 and ipv6 stack, this patch series tries to get rid of the usage of the rwlock and replace it with rcu and spinlock protection. This will greatly speed up the fastpath performance as it only needs to hold rcu which is much less expensive than grabbing the reader lock. It also makes ipv6 fib implementation more consistent with ipv4. In order to be able to replace the current rwlock with rcu and spinlock, some preparation work is needed: Patch 1-8 introduces a per-route hash table (protected by rcu and a different spinlock) to store all cached routes created by pmtu and ip redirect under its main route. This makes the main fib6 tree only contain static routes. Patch 9-14 prepares all the reader path to be ready to tolerate concurrent writer. Patch 15 finally does the rwlock to rcu and spinlock conversion. Patch 16 takes care of rt6_stats. After this patch series, in the same syn flood test, ipv6 stack can now handle around 3.5Mpps compared to previous 1.3Mpps in my test setup. After this patch series, there are still some improvements that should be done in ipv6 stack: 1. During route lookup, dst_use() is called everytime on the selected route to update dst->__use and dst->lastuse. This dirties the cacheline and causes extra cacheline miss and should be avoided. 2. when no route is found in the current table, net->ip6.ipv6_null_entry is used and refcnt is taken on it. As there is no pcpu cache for this specific route, frequent change on the refcnt for this route causes quite some cacheline misses. And to make things worse, if CONFIG_IPV6_MULTIPLE_TABLES is defined, output path route lookup always starts with local table first and guarantees to hit net->ipv6.ip6_null_entry before continuing to do lookup in the main table. These operations on net->ipv6.ip6_null_entry could potentially be avoided. 3. ipv6 input path route lookup grabs refcnt on dst. This is different from ipv4. We could potentially change this behavior to let ipv6 input path route lookup not to grab refcnt on dst. However, it does not give us much performance boost as we currently have pcpu route cache for input path as well in ipv6. But this work probably is still worth doing to unify ipv6 and ipv4 route lookup behavior. The above issues will be addressed separately after this patch series has been accepted. This is a joint work with Martin KaFai Lau and Eric Dumazet. And many many thanks to them for their inspiring ideas and big big code review efforts. ==================== Reviewed-by: Eric Dumazet Reviewed-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit 81eb8447daae3b62247aa66bb17b82f8fef68249 Author: Wei Wang Date: Fri Oct 6 12:06:11 2017 -0700 ipv6: take care of rt6_stats Currently, most of the rt6_stats are not hooked up correctly. As the last part of this patch series, hook up all existing rt6_stats and add one new stat fib_rt_uncache to indicate the number of routes in the uncached list. For details of the stats, please refer to the comments added in include/net/ip6_fib.h. Note: fib_rt_alloc and fib_rt_uncache are not guaranteed to be modified under a lock. So atomic_t is used for them. Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/ip6_fib.h | 15 +++++++++------ net/ipv6/ip6_fib.c | 42 ++++++++++++++++++++++++------------------ net/ipv6/route.c | 16 ++++++++++++++-- 3 files changed, 47 insertions(+), 26 deletions(-) commit 66f5d6ce53e665477d2a33e8f539d4fa4ca81c83 Author: Wei Wang Date: Fri Oct 6 12:06:10 2017 -0700 ipv6: replace rwlock with rcu and spinlock in fib6_table With all the preparation work before, we are now ready to replace rwlock with rcu and spinlock in fib6_table. That means now all fib6_node in fib6_table are protected by rcu. And when freeing fib6_node, call_rcu() is used to wait for the rcu grace period before releasing the memory. When accessing fib6_node, corresponding rcu APIs need to be used. And all previous sessions protected by the write lock will now be protected by the spin lock per table. All previous sessions protected by read lock will now be protected by rcu_read_lock(). A couple of things to note here: 1. As part of the work of replacing rwlock with rcu, the linked list of fn->leaf now has to be rcu protected as well. So both fn->leaf and rt->dst.rt6_next are now __rcu tagged and corresponding rcu APIs are used when manipulating them. 2. For fn->rr_ptr, first of all, it also needs to be rcu protected now and is tagged with __rcu and rcu APIs are used in corresponding places. Secondly, fn->rr_ptr is changed in rt6_select() which is a reader thread. This makes the issue a bit complicated. We think a valid solution for it is to let rt6_select() grab the tb6_lock if it decides to change it. As it is not in the normal operation and only happens when there is no valid neighbor cache for the route, we think the performance impact should be low. 3. fib6_walk_continue() has to be called with tb6_lock held even in the route dumping related functions, e.g. inet6_dump_fib(), fib6_tables_dump() and ipv6_route_seq_ops. It is because fib6_walk_continue() makes modifications to the walker structure, and so are fib6_repair_tree() and fib6_del_route(). In order to do proper syncing between them, we need to let fib6_walk_continue() hold the lock. We may be able to do further improvement on the way we do the tree walk to get rid of the need for holding the spin lock. But not for now. 4. When fib6_del_route() removes a route from the tree, we no longer mark rt->dst.rt6_next to NULL to make simultaneous reader be able to further traverse the list with rcu. However, rt->dst.rt6_next is only valid within this same rcu period. No one should access it later. 5. All the operation of atomic_inc(rt->rt6i_ref) is changed to be performed before we publish this route (either by linking it to fn->leaf or insert it in the list pointed by fn->leaf) just to be safe because as soon as we publish the route, some read thread will be able to access it. Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/dst.h | 2 +- include/net/ip6_fib.h | 24 ++- net/ipv6/addrconf.c | 11 +- net/ipv6/ip6_fib.c | 405 ++++++++++++++++++++++++++++++-------------------- net/ipv6/route.c | 121 ++++++++------- 5 files changed, 333 insertions(+), 230 deletions(-) commit 17ecf590b3cba19d9ecb410e340aa78128382abb Author: Wei Wang Date: Fri Oct 6 12:06:09 2017 -0700 ipv6: add key length check into rt6_select() After rwlock is replaced with rcu and spinlock, fib6_lookup() could potentially return an intermediate node if other thread is doing fib6_del() on a route which is the only route on the node so that fib6_repair_tree() will be called on this node and potentially assigns fn->leaf to the its child's fn->leaf. In order to detect this situation in rt6_select(), we have to check if fn->fn_bit is consistent with the key length stored in the route. And depending on if the fn is in the subtree or not, the key is either rt->rt6i_dst or rt->rt6i_src. If any inconsistency is found, that means the node no longer holds valid routes in it. So net->ipv6.ip6_null_entry is returned. Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/route.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 8d1040e808bb2a5aeb4f0791b32bc7356a01ab11 Author: Wei Wang Date: Fri Oct 6 12:06:08 2017 -0700 ipv6: check fn->leaf before it is used If rwlock is replaced with rcu and spinlock, it is possible that the reader thread will see fn->leaf as NULL in the following scenarios: 1. fib6_add() is in progress and we have already inserted a new node but not yet inserted the route. 2. fib6_del_route() is in progress and we have already set fn->leaf to NULL but not yet freed the node because of rcu grace period. This patch makes sure all the reader threads check fn->leaf first before using it. And together with later patch to grab rcu_read_lock() and rcu_dereference() fn->leaf, it makes sure reader threads are safe when accessing fn->leaf. Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 23 ++++++++++++++++++----- net/ipv6/route.c | 20 ++++++++++++-------- 2 files changed, 30 insertions(+), 13 deletions(-) commit bbd63f06d114a52be33f6982fc89ca2768cdeb62 Author: Wei Wang Date: Fri Oct 6 12:06:07 2017 -0700 ipv6: update fn_sernum after route is inserted to tree fib6_add() logic currently calls fib6_add_1() to figure out what node should be used for the newly added route and then call fib6_add_rt2node() to insert the route to the node. And during the call of fib6_add_1(), fn_sernum is updated for all nodes that share the same prefix as the new route. This does not have issue in the current code because reader thread will not be able to access the tree while writer thread is inserting new route to it. However, it is not the case once we transition to use RCU. Reader thread could potentially see the new fn_sernum before the new route is inserted. As a result, reader thread's route lookup will return a stale route with the new fn_sernum. In order to solve this issue, we remove all the update of fn_sernum in fib6_add_1(), and instead, introduce a new function that updates fn_sernum for all related nodes and call this functions once the route is successfully inserted to the tree. Also, smp_wmb() is used after a route is successfully inserted into the fib tree and right before the updated of fn->sernum. And smp_rmb() is used right after fn->sernum is accessed in rt6_get_cookie_safe(). This is to guarantee that when the reader thread sees the new fn->sernum, the new route is already inserted in the tree in memory. Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/ip6_fib.h | 2 ++ net/ipv6/ip6_fib.c | 39 +++++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 18 deletions(-) commit d3843fe5fd45be0e04a251a2cc68893c859a31bd Author: Wei Wang Date: Fri Oct 6 12:06:06 2017 -0700 ipv6: replace dst_hold() with dst_hold_safe() in routing code With rwlock, it is safe to call dst_hold() in the read thread because read thread is guaranteed to be separated from write thread. However, after we replace rwlock with rcu, it is no longer safe to use dst_hold(). A dst might already have been deleted but is waiting for the rcu grace period to pass before freeing the memory when a read thread is trying to do dst_hold(). This could potentially cause double free issue. So this commit replaces all dst_hold() with dst_hold_safe() in all read thread to avoid this double free issue. And in order to make the code more compact, a new function ip6_hold_safe() is introduced. It calls dst_hold_safe() first, and if that fails, it will either fall back to hold and return net->ipv6.ip6_null_entry or set rt to NULL according to the caller's need. Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/addrconf.c | 3 ++- net/ipv6/route.c | 71 +++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 54 insertions(+), 20 deletions(-) commit 51e398e86d61b69b9a4be49ff7f6afeb87530df1 Author: Wei Wang Date: Fri Oct 6 12:06:05 2017 -0700 ipv6: don't release rt->rt6i_pcpu memory during rt6_release() After rwlock is replaced with rcu and spinlock, route lookup can happen simultanously with route deletion. This patch removes the call to free_percpu(rt->rt6i_pcpu) from rt6_release() to avoid the race condition between rt6_release() and rt6_get_pcpu_route(). And as free_percpu(rt->rt6i_pcpu) is already called in ip6_dst_destroy() after the rcu grace period, it is safe to do this change. Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 3 --- 1 file changed, 3 deletions(-) commit a94b9367e044ba672c9f4105eb1516ff6ff4948a Author: Wei Wang Date: Fri Oct 6 12:06:04 2017 -0700 ipv6: grab rt->rt6i_ref before allocating pcpu rt After rwlock is replaced with rcu and spinlock, ip6_pol_route() will be called with only rcu held. That means rt6 route deletion could happen simultaneously with rt6_make_pcpu_rt(). This could potentially cause memory leak if rt6_release() is called right before rt6_make_pcpu_rt() on the same route. This patch grabs rt->rt6i_ref safely before calling rt6_make_pcpu_rt() to make sure rt6_release() will not get triggered while rt6_make_pcpu_rt() is in progress. And rt6_release() is called after rt6_make_pcpu_rt() is finished. Note: As we are incrementing rt->rt6i_ref in ip6_pol_route(), there is a very slim chance that fib6_purge_rt() will be triggered unnecessarily when deleting a route if ip6_pol_route() running on another thread picks this route as well and tries to make pcpu cache for it. Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/route.c | 58 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) commit 2b760fcf5cfb34e8610df56d83745b2b74ae1379 Author: Wei Wang Date: Fri Oct 6 12:06:03 2017 -0700 ipv6: hook up exception table to store dst cache This commit makes use of the exception hash table implementation to store dst caches created by pmtu discovery and ip redirect into the hash table under the rt_info and no longer inserts these routes into fib6 tree. This makes the fib6 tree only contain static configured routes and could now be protected by rcu instead of a rw lock. With this change, in the route lookup related functions, after finding the rt6_info with the longest prefix, we also need to search for the exception table before doing backtracking. In the route delete function, if the route being deleted is not a dst cache, deletion of this route also need to flush the whole hash table under it. If it is a dst cache, then only delete the cached dst in the hash table. Note: for fib6_walk_continue() function, w->root now is always pointing to a root node considering that fib6_prune_clones() is removed from the code. So we add a WARN_ON() msg to make sure w->root always points to a root node and also removed the update of w->root in fib6_repair_tree(). This is a prerequisite for later patch because we don't need to make w->root as rcu protected when replacing rwlock with RCU. Also, we remove all prune related variables as it is no longer used. Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/ip6_fib.h | 1 - net/ipv6/addrconf.c | 1 - net/ipv6/ip6_fib.c | 95 ++++++++------------------------------------ net/ipv6/route.c | 108 +++++++++++++++++++++++++------------------------- 4 files changed, 72 insertions(+), 133 deletions(-) commit 38fbeeeeccdb38d0635398e8e344d245f6d8dc52 Author: Wei Wang Date: Fri Oct 6 12:06:02 2017 -0700 ipv6: prepare fib6_locate() for exception table fib6_locate() is used to find the fib6_node according to the passed in prefix address key. It currently tries to find the fib6_node with the exact match of the passed in key. However, when we move cached routes into the exception table, fib6_locate() will fail to find the fib6_node for it as the cached routes will be stored in the exception table under the fib6_node with the longest prefix match of the cache's dst addr key. This commit adds a new parameter to let the caller specify if it needs exact match or longest prefix match. Right now, all callers still does exact match when calling fib6_locate(). It will be changed in later commit where exception table is hooked up to store cached routes. Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/ip6_fib.h | 3 ++- net/ipv6/addrconf.c | 2 +- net/ipv6/ip6_fib.c | 30 +++++++++++++++++++++++------- net/ipv6/route.c | 5 +++-- 4 files changed, 29 insertions(+), 11 deletions(-) commit c757faa8bfa26a0dd24b41ff783e0da042156887 Author: Wei Wang Date: Fri Oct 6 12:06:01 2017 -0700 ipv6: prepare fib6_age() for exception table If all dst cache entries are stored in the exception table under the main route, we have to go through them during fib6_age() when doing garbage collecting. Introduce a new function rt6_age_exception() which goes through all dst entries in the exception table and remove those entries that are expired. This function is called in fib6_age() so that all dst caches are also garbage collected. Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/ip6_fib.h | 13 +++++++++++ include/net/ip6_route.h | 2 ++ net/ipv6/ip6_fib.c | 26 ++++++++------------- net/ipv6/route.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 84 insertions(+), 17 deletions(-) commit b16cb459d77800dcb886b5e73e1beafd3d596897 Author: Wei Wang Date: Fri Oct 6 12:06:00 2017 -0700 ipv6: prepare rt6_clean_tohost() for exception table If we move all cached dst into the exception table under the main route, current rt6_clean_tohost() will no longer be able to access them. This commit makes fib6_clean_tohost() to also go through all cached routes in exception table and removes cached gateway routes to the passed in gateway. This is a preparation in order to move all cached routes into the exception table. Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/route.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) commit f5bbe7ee79c2842ca69f25afd0b6b65a9011b735 Author: Wei Wang Date: Fri Oct 6 12:05:59 2017 -0700 ipv6: prepare rt6_mtu_change() for exception table If we move all cached dst into the exception table under the main route, current rt6_mtu_change() will no longer be able to access them. This commit makes rt6_mtu_change_route() function to also go through all cached routes in the exception table under the main route and do proper updates on the mtu. This is a preparation in order to move all cached routes into the exception table. Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/route.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 60006a4825f9e71adf770745e17790c6e6c97a89 Author: Wei Wang Date: Fri Oct 6 12:05:58 2017 -0700 ipv6: prepare fib6_remove_prefsrc() for exception table After we move cached dst entries into the exception table under its parent route, current fib6_remove_prefsrc() no longer can access them. This commit makes fib6_remove_prefsrc() also go through all routes in the exception table to remove the pref src. This is a preparation patch in order to move all cached dst into the exception table. Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/route.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 35732d01fe311ec13c4e42936878b782b8e7ea85 Author: Wei Wang Date: Fri Oct 6 12:05:57 2017 -0700 ipv6: introduce a hash table to store dst cache Add a hash table into struct rt6_info in order to store dst caches created by pmtu discovery and ip redirect in ipv6 routing code. APIs to add dst cache, delete dst cache, find dst cache and update dst cache in the hash table are implemented and will be used in later commits. This is a preparation work to move all cache routes into the exception table instead of getting inserted into the fib6 tree. Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/ip6_fib.h | 19 +++ include/net/ip6_route.h | 3 + net/ipv6/route.c | 341 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 363 insertions(+) commit 180ca444b985c42948fa26abd278e616b5ce7eb2 Author: Wei Wang Date: Fri Oct 6 12:05:56 2017 -0700 ipv6: introduce a new function fib6_update_sernum() This function takes a route as input and tries to update the sernum in the fib6_node this route is associated with. It will be used in later commit when adding a cached route into the exception table under that route. Signed-off-by: Wei Wang Signed-off-by: Martin KaFai Lau Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/ip6_fib.h | 2 ++ net/ipv6/ip6_fib.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) commit 65853a1da3c181f85d368daa40abb91025c368fc Author: Colin Ian King Date: Thu Oct 5 10:55:57 2017 +0100 libnvdimm, namespace: make a couple of functions static The functions create_namespace_pmem and create_namespace_blk are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'create_namespace_pmem' was not declared. Should it be static? symbol 'create_namespace_blk' was not declared. Should it be static? Signed-off-by: Colin Ian King Reviewed-by: Johannes Thumshirn Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit efbf6f50ada168b68f5e3de474bc8dee4a02d046 Author: Dan Williams Date: Mon Sep 25 10:24:26 2017 -0700 libnvdimm: introduce 'flags' attribute for DIMM 'lock' and 'alias' status Given that we now how have two mechanisms for a DIMM to indicate that it is locked: * NVDIMM_FAMILY_INTEL 'get_config_size' _DSM command * ACPI 6.2 Label Storage Read / Write commands ...export the generic libnvdimm DIMM status in a new 'flags' attribute. This attribute can also reflect the 'alias' state which indicates whether the nvdimm core is enforcing labels for aliased-region-capacity that the given dimm is an interleave-set member. Signed-off-by: Dan Williams drivers/nvdimm/dimm_devs.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 4b27db7e26cdb9deb4a211e963e2993fde0110cb Author: Dan Williams Date: Sun Sep 24 09:57:34 2017 -0700 acpi, nfit: add support for the _LSI, _LSR, and _LSW label methods ACPI 6.2 adds support for named methods to access the label storage area of an NVDIMM. We prefer these new methods if available and otherwise fallback to the NVDIMM_FAMILY_INTEL _DSMs. The kernel ioctls, ND_IOCTL_{GET,SET}_CONFIG_{SIZE,DATA}, remain generic and the driver translates the 'package' payloads into the NVDIMM_FAMILY_INTEL 'buffer' format to maintain compatibility with existing userspace and keep the output buffer parsing code in the driver common. The output payloads are mostly compatible save for the 'label area locked' status that moves from the 'config_size' (_LSI) command to the 'config_read' (_LSR) command status. Cc: Jeff Moyer Cc: Johannes Thumshirn Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 213 ++++++++++++++++++++++++++++++++++++++++++++++- drivers/acpi/nfit/nfit.h | 3 + drivers/nvdimm/dimm.c | 2 + 3 files changed, 214 insertions(+), 4 deletions(-) commit 58e7cb9e935d53c64414361fba3f95ed261f9110 Author: Rafael J. Wysocki Date: Fri Oct 6 00:38:49 2017 +0200 PM: docs: Fix stale reference in kernel-parameters.txt Commit 7aa7a0360a66 (PM: docs: Delete the obsolete states.txt document) forgot to update kernel-parameters.txt with a reference to the new sleep-states.rst document and it still points to states.txt that was dropped, so fix it now. Fixes: 7aa7a0360a66 (PM: docs: Delete the obsolete states.txt document) Signed-off-by: Rafael J. Wysocki Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68e51252224d06e14457de98960a4622993350ab Author: Randy Dunlap Date: Sat Sep 30 08:43:53 2017 -0700 Documentation: add kernel-api section on Math functions Add a kernel-api section on Math Functions. Signed-off-by: Randy Dunlap Signed-off-by: Jonathan Corbet Documentation/core-api/kernel-api.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 341e9a323af95ac141b4df41e2697d626da14e3f Author: Randy Dunlap Date: Sat Sep 30 08:43:49 2017 -0700 lib/gcd: add kernel-doc notation Add kernel-doc notation for the gcd() function (so that it can be added to the kernel-api documentation). Signed-off-by: Randy Dunlap Signed-off-by: Jonathan Corbet lib/gcd.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 078843f75d234123e654b992d97e8ae8a744ba23 Author: Randy Dunlap Date: Sat Sep 30 08:43:45 2017 -0700 math64: add missing kernel-doc notation Add missing kernel-doc notation (function parameters) for several div() functions. Signed-off-by: Randy Dunlap Signed-off-by: Jonathan Corbet include/linux/math64.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 6ec72e61cb09482fe08524480f7f3f18a6d23cfa Author: Randy Dunlap Date: Sat Sep 30 08:43:42 2017 -0700 div64: add missing kernel-doc Add missing kernel-doc notation for 2 div() functions. Signed-off-by: Randy Dunlap Signed-off-by: Jonathan Corbet include/asm-generic/div64.h | 14 ++++++++++++++ lib/div64.c | 6 ++++++ 2 files changed, 20 insertions(+) commit a1c4d24e02d093efd84cbde417051d2e767fa8fa Author: Randy Dunlap Date: Sat Sep 30 08:43:38 2017 -0700 linux/log2.h: fix kernel-doc notation Fix kernel-doc: - Add kernel-doc notation to some functions. - Fix kernel-doc notation in function parameters. Signed-off-by: Randy Dunlap Signed-off-by: Jonathan Corbet include/linux/log2.h | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit 13277782dd4bcef71341a1016bee1d09f8f95ae0 Author: Greg Kroah-Hartman Date: Fri Oct 6 11:10:38 2017 +0200 Documentation: add Kernel Driver Statement to the kernel Way back in 2008 we didn't have "robust" in-kernel documentation system, so the idea of putting something like the kernel driver statement in the kernel tree wasn't even imagined. But now that has changed, so add the old document to the kernel source itself to allow for us to properly reference it in one canonical place (as the LF wiki keeps moving things around.) This also will allow people to add their names to it, as I seem to have lost the ability to do that by not knowing how to edit things on the original document. Signed-off-by: Greg Kroah-Hartman Acked-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Documentation/process/index.rst | 1 + Documentation/process/kernel-driver-statement.rst | 199 ++++++++++++++++++++++ 2 files changed, 200 insertions(+) commit 10246dc84dfcabb05f2d29d442c9de967fd61270 Author: Yasunori Goto Date: Fri Sep 22 16:48:38 2017 +0900 acpi nfit: nfit_test supports translate SPA To test ndctl list which use interface of Translate SPA, nfit_test needs to emulates it. This test module searches region which includes SPA and returns 1 dimm handle which is last one. Signed-off-by: Yasunori Goto Reviewed-by: Vishal Verma Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit.c | 104 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 103 insertions(+), 1 deletion(-) commit b37b3fd33d034470749db55d1ccd7331bd35bdca Author: Yasunori Goto Date: Fri Sep 22 16:47:40 2017 +0900 acpi nfit: Enable to show what feature is supported via ND_CMD_CALL for nfit_test Though nfit_test need to show what feature is supported via ND_CMD_CALL on device/nfit/dsm_mask, currently there is no way to tell it. This patch makes to enable it. Signed-off-by: Yasunori Goto Reviewed-by: Vishal Verma Signed-off-by: Dan Williams drivers/acpi/nfit/core.c | 1 + drivers/acpi/nfit/nfit.h | 1 + 2 files changed, 2 insertions(+) commit d4648c1566d33c0bf549d8b990879dbbdd6b1f95 Merge: a976d7b 5ec8a41 Author: Linus Walleij Date: Sat Oct 7 13:12:50 2017 +0200 Merge tag 'sh-pfc-for-v4.15-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v4.15 - Add SDHI and DRIF pin groups on R-Car H3 ES2.0, - Add USB3.0 host pin groups on R-Car H3 (ES1.x and ES2.0), - Add EthernetAVB and USB2.0 host pin groups on R-Car D3. commit a976d7b1352701936f0f35e1c1285bfb8545e2f7 Author: David Wu Date: Sat Sep 30 20:13:21 2017 +0800 pinctrl: rockchip: rk3328: Fix the correct routing config If the gmac-m1 optimization(bit10) is selected, the gpio function of gmac pins is not valid. We may use the rmii mode for gmac interface, the pins such as rx_d2, rx_d3, which the rgmii mode used, but rmii not used could be taken as gpio function. So gmac_rxd0m1 selects the bit2, and gmac_rxd0m3 select bit10 is more correct. Signed-off-by: David Wu Reviewed-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit c437f65c42d2640ababace37eb89bff2395c1dc3 Author: David Wu Date: Sat Sep 30 20:13:20 2017 +0800 pinctrl: rockchip: Fix the rk3399 gpio0 and gpio1 banks' drv_offset at pmu grf The offset of gpio0 and gpio1 bank drive strength is 0x8, not 0x4. But the mux is 0x4, we couldn't use the IOMUX_WIDTH_4BIT flag, so we give them actual offset. Signed-off-by: David Wu Reviewed-by: Heiko Stuebner Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-rockchip.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2dca9227d356f77d1f6372db213e0446c972a79d Merge: 027c87f ad5c3221 Author: Linus Walleij Date: Sat Oct 7 12:29:14 2017 +0200 Merge branch 'pinconf-rename' into devel commit fc256f5789cbb58bb5aa308a781be46a270bcd98 Author: Miquel Raynal Date: Mon Sep 25 16:53:51 2017 +0200 mtd: nand: pxa3xx: enable NAND controller if the SoC needs it Marvell recent SoCs like A7k/A8k do not boot with NAND flash controller activated by default. Enabling the controller is a matter of writing in a system controller register that may also be used for other NAND related choices. This change is needed to stay bootloader independent. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/pxa3xx_nand.c | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) commit b330213d98c357859b686b77ad0db9e98fe73763 Author: Miquel Raynal Date: Mon Sep 25 16:53:50 2017 +0200 Documentation: devicetree: add pxa3xx compatible and syscon property Document the new pxa3xx_nand driver compatible string for A7k/A8k SoCs that need to access system controller registers in order to enable the NAND controller through the use of a phandle pointed to by the 'marvell,system-controller' property. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt | 4 ++++ 1 file changed, 4 insertions(+) commit b8640c5b8bef7e24fe54d2713f4c91b563a65c55 Author: Geert Uytterhoeven Date: Wed Oct 4 14:19:03 2017 +0200 mtd: nand: sh_flctl: Use of_device_get_match_data() helper Use the of_device_get_match_data() helper instead of open coding. While at it, make config const so the cast can be dropped. Signed-off-by: Geert Uytterhoeven Signed-off-by: Boris Brezillon drivers/mtd/nand/sh_flctl.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 7963f58cbf3a722c93f946c80a12f185b86dc45c Author: Masahiro Yamada Date: Fri Sep 29 23:12:57 2017 +0900 mtd: nand: denali: fix setup_data_interface to meet tCCS delay The WE_2_RE register specifies the number of clock cycles inserted between the rising edge of #WE and the falling edge of #RE. The current setup_data_interface implementation takes care of tWHR, but tCCS is missing. Wait for max(tCSS, tWHR) to meet the spec. With setup_data_interface() properly programmed, the Denali NAND controller can observe the timing, so NAND_WAIT_TCCS flag is unneeded. Clarify this in the comment block. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 263c68afb521b2ff1ca386d312d155ff3d22b69a Author: Gregory CLEMENT Date: Fri Sep 29 15:34:24 2017 +0200 mtd: nand: pxa3xx_nand: Update Kconfig information More and more SoCs use the pxa3xx_nand driver for their controller but the list of them was not updated. This patch add the last SoCs using the driver. Signed-off-by: Gregory CLEMENT Signed-off-by: Boris Brezillon drivers/mtd/nand/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 143b0ab97d7a40df399cfbc6e925107bed1c7953 Author: Romain Izard Date: Thu Sep 28 11:46:23 2017 +0200 mtd: nand: atmel: Avoid ECC errors when leaving backup mode During backup mode, the contents of all registers will be cleared as the SoC will be completely powered down. For a product that boots on NAND Flash memory, the bootloader will obviously use the related controller to read the Flash and correct any detected error in the memory, before handling back control to the kernel's resuming entry point. But it does not clean the NAND controller registers after use and on its side the kernel driver expects the error locator to be powered down and in a clean state. Add a resume hook for the PMECC error locator, and reset its registers. Signed-off-by: Romain Izard Signed-off-by: Boris Brezillon drivers/mtd/nand/atmel/nand-controller.c | 3 +++ drivers/mtd/nand/atmel/pmecc.c | 17 +++++++++-------- drivers/mtd/nand/atmel/pmecc.h | 1 + 3 files changed, 13 insertions(+), 8 deletions(-) commit 8d6b6d7e135e9bbfc923d34a45cb0e72695e63ed Author: Abhishek Sahu Date: Mon Sep 25 13:21:26 2017 +0530 mtd: nand: qcom: support for command descriptor formation 1. Add the function for command descriptor preparation which will be used only by BAM DMA and it will form the DMA descriptors containing command elements 2. DMA_PREP_CMD flag should be used for forming command DMA descriptors Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 108 +++++++++++++++++++++++++++++++++++------- 1 file changed, 92 insertions(+), 16 deletions(-) commit 8c4cdce8b1ab044a2ee1d86d5a086f67e32b3c10 Author: Abhishek Sahu Date: Mon Sep 25 13:21:25 2017 +0530 mtd: nand: qcom: add command elements in BAM transaction All the QPIC register read/write through BAM DMA requires command descriptor which contains the array of command elements. Reviewed-by: Archit Taneja Signed-off-by: Abhishek Sahu Signed-off-by: Boris Brezillon drivers/mtd/nand/qcom_nandc.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit f3d0d8d938b4d71be1f7fb003ca2ac9250b3be4d Author: Linus Walleij Date: Sun Sep 24 19:39:12 2017 +0200 mtd: nand: gpio: Convert to use GPIO descriptors There is exactly one board in the kernel that defines platform data for the GPIO NAND driver. Use the feature to provide a lookup table for the GPIOs in the board file so we can convert the driver as a whole to just use GPIO descriptors. After this we can cut the use of and use the GPIO descriptor management from alone to grab and use the GPIOs used in the driver. I also created a local struct device *dev in the probe() function because I was getting annoyed with all the &pdev->dev dereferencing. Cc: arm@kernel.org Cc: Mike Rapoport Cc: Frans Klaver Cc: Gerhard Sittig Cc: Jamie Iles Signed-off-by: Linus Walleij Reviewed-by: Marek Vasut Acked-by: Jamie Iles Acked-by: Olof Johansson Acked-by: Robert Jarzmik Signed-off-by: Boris Brezillon arch/arm/mach-pxa/cm-x255.c | 19 ++++--- drivers/mtd/nand/gpio.c | 112 +++++++++++++++++++++--------------------- include/linux/mtd/nand-gpio.h | 5 -- 3 files changed, 70 insertions(+), 66 deletions(-) commit a883241c3922000b21b58b5740c55badfe09940f Author: Matthew Auld Date: Fri Oct 6 23:18:33 2017 +0100 drm/i915: enable platform support for 2M pages For gen8+ platforms which support the 48b PPGTT, enable platform level support for 2M pages. Also enable for mock testing. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-22-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-21-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_pci.c | 6 ++++-- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) commit f1f3f98272b9bb1ba87c2ccbc811b038574cec43 Author: Matthew Auld Date: Fri Oct 6 23:18:32 2017 +0100 drm/i915: enable platform support for 64K pages For gen9+ enable platform level support for 64K pages. Also enable for mock testing. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-21-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-20-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_pci.c | 3 ++- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit da9fe3f31a920658debd231ff10b0fbe0f2f34ed Author: Matthew Auld Date: Fri Oct 6 23:18:31 2017 +0100 drm/i915: disable platform support for vGPU huge gtt pages Currently gvt gtt handling doesn't support huge page entries, so disable for now. v2: remove useless 48b PPGTT check Suggested-by: Zhenyu Wang Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Zhenyu Wang Reviewed-by: Zhenyu Wang Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-20-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-19-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 7924d9d4dc9ffff32bf099db8c638e11e5457cd7 Author: Matthew Auld Date: Fri Oct 6 23:18:30 2017 +0100 drm/i915/selftests: mix huge pages Try to mix sg page sizes for 4K, 64K and 2M pages. v2: s/BIT(x) >> 12/BIT(x) >> PAGE_SHIFT/ Suggested-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-19-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-18-chris@chris-wilson.co.uk drivers/gpu/drm/i915/selftests/scatterlist.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 4049866f0913110bf7de597c1177de7a1cc459cb Author: Matthew Auld Date: Fri Oct 6 23:18:29 2017 +0100 drm/i915/selftests: huge page tests v2: mock test page support configurations and add MI_STORE_DWORD test v3: run all mockable huge page tests on all platforms via the mock_device v4: add pin_update regression test various improvements suggested by Chris v5: fix issues reported by kbuild test single sg spanning multiple page sizes don't explode when running the live-tests through the appgtt v6: lots of improvements from Chris v7: run on each engine for igt_write_huge add simple tmpfs fallback test v8: size_t is bad don't break the i386 build Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-18-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-17-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 1 + drivers/gpu/drm/i915/i915_gem_object.h | 2 + drivers/gpu/drm/i915/selftests/huge_pages.c | 1715 ++++++++++++++++++++ .../gpu/drm/i915/selftests/i915_live_selftests.h | 1 + .../gpu/drm/i915/selftests/i915_mock_selftests.h | 1 + 5 files changed, 1720 insertions(+) commit 7393b7ee3a9c19776fd7b42369ea93994173abd9 Author: Matthew Auld Date: Fri Oct 6 23:18:28 2017 +0100 drm/i915/debugfs: include some gtt page size metrics Good to know, mostly for debugging purposes. v2: some improvements from Chris Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-17-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-16-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 61 ++++++++++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 4 deletions(-) commit d9ec12f8e302731df6482d85a9c1f25b84a43de5 Author: Matthew Auld Date: Fri Oct 6 23:18:27 2017 +0100 drm/i915: accurate page size tracking for the ppgtt Now that we support multiple page sizes for the ppgtt, it would be useful to track the real usage for debugging purposes. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-16-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-15-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 11 +++++++++++ drivers/gpu/drm/i915/i915_gem_object.h | 10 ++++++++++ 2 files changed, 21 insertions(+) commit 17a00cf73c31cca85531ec409508a2921c077851 Author: Matthew Auld Date: Fri Oct 6 23:18:26 2017 +0100 drm/i915: support 64K pages for the 48b PPGTT Support inserting 64K pages into the 48b PPGTT. v2: check for 64K scratch v3: we should only have to re-adjust maybe_64K at every sg interval Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-15-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-14-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 31 +++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_gtt.h | 7 +++++++ 2 files changed, 38 insertions(+) commit aa095871e4a7ba9fcf87ffd762c044e1f9f634f1 Author: Matthew Auld Date: Fri Oct 6 23:18:25 2017 +0100 drm/i915: add support for 64K scratch page Before we can fully enable 64K pages, we need to first support a 64K scratch page if we intend to support the case where we have object sizes < 2M, since any scratch PTE must also point to a 64K region. Without this our 64K usage is limited to objects which completely fill the page-table, and therefore don't need any scratch. v2: add reminder about why 48b PPGTT Reported-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-14-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-13-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 64 ++++++++++++++++++++++++++++++------- drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + 2 files changed, 54 insertions(+), 11 deletions(-) commit 0a03852e049af91da9ae70326c44bb5d9b0d377a Author: Matthew Auld Date: Fri Oct 6 23:18:24 2017 +0100 drm/i915: support 2M pages for the 48b PPGTT Support inserting 2M gtt pages into the 48b PPGTT. v2: sanity check sg->length against page_size v3: don't recalculate rem on each loop whitespace breakup Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-13-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-12-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 76 +++++++++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/i915_gem_gtt.h | 2 + 2 files changed, 74 insertions(+), 4 deletions(-) commit 8cb0983678e05939457d867e09bddb6883db5268 Author: Matthew Auld Date: Fri Oct 6 23:18:23 2017 +0100 drm/i915: disable GTT cache for 2M pages When SW enables the use of 2M/1G pages, it must disable the GTT cache. v2: don't disable for Cherryview which doesn't even support 48b PPGTT! v3: explicitly check that the system does support 2M/1G pages v4: split WA and decision logic Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-12-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-11-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_pm.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 9a6330cff9b4b0691c7554fe873b09e7f6d377a9 Author: Matthew Auld Date: Fri Oct 6 23:18:22 2017 +0100 drm/i915: enable IPS bit for 64K pages Before we can enable 64K pages through the IPS bit, we must first enable it through MMIO, otherwise the page-walker will simply ignore it. v2: add comment mentioning that 64K is BDW+ v3: move to more suitable home Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-11-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-10-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 17 +++++++++++++++++ drivers/gpu/drm/i915/i915_reg.h | 3 +++ 2 files changed, 20 insertions(+) commit 855822be74a957073143268bf976739de016937f Author: Matthew Auld Date: Fri Oct 6 23:18:21 2017 +0100 drm/i915: align 64K objects to 2M We can't mix 64K and 4K pte's in the same page-table, so for now we align 64K objects to 2M to avoid any potential mixing. This is potentially wasteful but in reality shouldn't be too bad since this only applies to the virtual address space of a 48b PPGTT. v2: don't separate logically connected ops Suggested-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-10-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-9-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_vma.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 7464284b357776b19e4cfb50d0d3724bdff035df Author: Matthew Auld Date: Fri Oct 6 23:18:20 2017 +0100 drm/i915: align the vma start to the largest gtt page size For the 48b PPGTT try to align the vma start address to the required page size boundary to guarantee we use said page size in the gtt. If we are dealing with multiple page sizes, we can't guarantee anything and just align to the largest. For soft pinning and objects which need to be tightly packed into the lower 32bits we don't force any alignment. v2: various improvements suggested by Chris v3: use set_pages and better placement of page_sizes v4: prefer upper_32_bits() v5: assign vma->page_sizes = vma->obj->page_sizes directly prefer sizeof(vma->page_sizes) v6: fixup checking of end to exclude GGTT (which are assumed to be limited to 4G). Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-9-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-8-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++++++ drivers/gpu/drm/i915/i915_vma.c | 16 ++++++++++++++++ drivers/gpu/drm/i915/i915_vma.h | 1 + 3 files changed, 23 insertions(+) commit fa3f46afd38cece52f6ff70603b15c1aeb6ec225 Author: Matthew Auld Date: Fri Oct 6 23:18:19 2017 +0100 drm/i915: introduce vm set_pages/clear_pages Move the setting/clearing of the vma->pages to a vm operation. Doing so neatens things up a little, but more importantly gives us a sane place to also set/clear the vma->pages_sizes, which we introduce later in preparation for supporting huge-pages. v2: remove redundant vma->pages check v3: GEM_BUG_ON(vma->pages) following i915_vma_remove Suggested-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-8-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem_gtt.c | 70 +++++++++++++++++++------------ drivers/gpu/drm/i915/i915_gem_gtt.h | 2 + drivers/gpu/drm/i915/i915_vma.c | 27 +++++++----- drivers/gpu/drm/i915/selftests/mock_gtt.c | 11 ++--- 4 files changed, 66 insertions(+), 44 deletions(-) commit a5c08166265adc172a4cbde8ed26a1a96ce77fb7 Author: Matthew Auld Date: Fri Oct 6 23:18:18 2017 +0100 drm/i915: introduce page_size members In preparation for supporting huge gtt pages for the ppgtt, we introduce page size members for gem objects. We fill in the page sizes by scanning the sg table. v2: pass the sg_mask to set_pages v3: calculate the sg_mask inline with populating the sg_table where possible, and pass to set_pages along with the pages. v4: bunch of improvements from Joonas v5: fix num_pages blunder introduce i915_sg_page_sizes helper v6: prefer GEM_BUG_ON(sizes == 0) Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Daniel Vetter Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-7-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 22 ++++++++++++- drivers/gpu/drm/i915/i915_gem.c | 42 +++++++++++++++++++++--- drivers/gpu/drm/i915/i915_gem_dmabuf.c | 5 ++- drivers/gpu/drm/i915/i915_gem_internal.c | 5 ++- drivers/gpu/drm/i915/i915_gem_object.h | 17 ++++++++++ drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- drivers/gpu/drm/i915/i915_gem_userptr.c | 5 ++- drivers/gpu/drm/i915/selftests/huge_gem_object.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 5 ++- 9 files changed, 93 insertions(+), 12 deletions(-) commit b91b09eea7a15ab417aa9ed6502b3be12f5283f8 Author: Matthew Auld Date: Fri Oct 6 23:18:17 2017 +0100 drm/i915: push set_pages down to the callers Each backend is now responsible for calling __i915_gem_object_set_pages upon successfully gathering its backing storage. This eliminates the inconsistency between the async and sync paths, which stands out even more when we start throwing around an sg_mask in a later patch. Suggested-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Joonas Lahtinen Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-6-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 45 +++++++++++++----------- drivers/gpu/drm/i915/i915_gem_dmabuf.c | 15 +++++--- drivers/gpu/drm/i915/i915_gem_internal.c | 15 ++++---- drivers/gpu/drm/i915/i915_gem_object.h | 2 +- drivers/gpu/drm/i915/i915_gem_stolen.c | 16 ++++++--- drivers/gpu/drm/i915/i915_gem_userptr.c | 12 +++---- drivers/gpu/drm/i915/selftests/huge_gem_object.c | 14 ++++---- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 12 ++++--- 8 files changed, 77 insertions(+), 54 deletions(-) commit 2a9654b2cdd8f9ef51b91dfd4448973a47284825 Author: Matthew Auld Date: Fri Oct 6 23:18:16 2017 +0100 drm/i915: introduce page_sizes field to dev_info In preparation for huge gtt pages expose page_sizes as part of the device info, to indicate the page sizes supported by the HW. Currently only 4K is supported. v2: s/page_size_mask/page_sizes/ v3: introduce I915_GTT_MAX_PAGE_SIZE Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Mika Kuoppala Cc: Chris Wilson Reviewed-by: Joonas Lahtinen Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-5-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gem_gtt.h | 8 +++++++- drivers/gpu/drm/i915/i915_pci.c | 18 ++++++++++++++++++ drivers/gpu/drm/i915/selftests/mock_gem_device.c | 3 +++ 4 files changed, 30 insertions(+), 1 deletion(-) commit b901bb89324ae65573c5f5c0a126cb864096b77c Author: Matthew Auld Date: Fri Oct 6 23:18:15 2017 +0100 drm/i915/gemfs: enable THP Enable transparent-huge-pages through gemfs by mounting with huge=within_size. v2: sprinkle within_size comment Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-4-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gemfs.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 465c403cb50868a86164bfe5b3bf6ddd70c395e1 Author: Matthew Auld Date: Fri Oct 6 23:18:14 2017 +0100 drm/i915: introduce simple gemfs Not a fully blown gemfs, just our very own tmpfs kernel mount. Doing so moves us away from the shmemfs shm_mnt, and gives us the much needed flexibility to do things like set our own mount options, namely huge= which should allow us to enable the use of transparent-huge-pages for our shmem backed objects. v2: various improvements suggested by Joonas v3: move gemfs instance to i915.mm and simplify now that we have file_setup_with_mnt v4: fallback to tmpfs shm_mnt upon failure to setup gemfs v5: make tmpfs fallback kinder v5: better gemfs failure message flags variable Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Dave Hansen Cc: Kirill A. Shutemov Cc: Hugh Dickins Cc: linux-mm@kvack.org Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-3-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_drv.h | 5 +++ drivers/gpu/drm/i915/i915_gem.c | 33 ++++++++++++++- drivers/gpu/drm/i915/i915_gemfs.c | 52 ++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gemfs.h | 34 ++++++++++++++++ drivers/gpu/drm/i915/selftests/mock_gem_device.c | 4 ++ 6 files changed, 128 insertions(+), 1 deletion(-) commit 703321b60b605b1f381f5dcf0bca42703b912e3e Author: Matthew Auld Date: Fri Oct 6 23:18:13 2017 +0100 mm/shmem: introduce shmem_file_setup_with_mnt We are planning to use our own tmpfs mnt in i915 in place of the shm_mnt, such that we can control the mount options, in particular huge=, which we require to support huge-gtt-pages. So rather than roll our own version of __shmem_file_setup, it would be preferred if we could just give shmem our mnt, and let it do the rest. Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Dave Hansen Cc: Kirill A. Shutemov Cc: Hugh Dickins Cc: linux-mm@kvack.org Acked-by: Andrew Morton Acked-by: Kirill A. Shutemov Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171006145041.21673-2-matthew.auld@intel.com Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006221833.32439-1-chris@chris-wilson.co.uk include/linux/shmem_fs.h | 2 ++ mm/shmem.c | 30 ++++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) commit d9fa482e5913213c2686404238f7f9cdb14b6c6c Author: Corentin LABBE Date: Wed Sep 20 20:47:26 2017 +0200 crypto: bcm - use of_device_get_match_data The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/bcm/cipher.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 7d556931520e1e0df4c3e545ab8ba74046410c37 Author: Corentin LABBE Date: Wed Sep 20 20:42:48 2017 +0200 crypto: omap - use of_device_get_match_data The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/omap-aes.c | 7 ++----- drivers/crypto/omap-des.c | 7 ++----- drivers/crypto/omap-sham.c | 7 ++----- 3 files changed, 6 insertions(+), 15 deletions(-) commit de915688385ca9df749a3d46e824a8200f05d65e Author: Corentin LABBE Date: Wed Sep 20 20:31:40 2017 +0200 crypto: stm32 - use of_device_get_match_data The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/stm32/stm32-hash.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit e781c17c22fdd390e54b972c010acdc862ac66df Author: Colin Ian King Date: Thu Sep 14 19:02:19 2017 +0100 crypto: algboss - remove redundant setting of len to zero The variable len is set to zero, never read and then later updated to p - name, so clearly the zero'ing of len is redundant and can be removed. Detected by clang scan-build: " warning: Value stored to 'len' is never read" Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu crypto/algboss.c | 1 - 1 file changed, 1 deletion(-) commit 2fd23f2b9016dc5391f258a462ae0a334a3c9f86 Author: Allen Date: Wed Sep 13 13:02:11 2017 +0530 crypto: omap - return -ENOMEM on allocation failure. Signed-off-by: Allen Pais Signed-off-by: Herbert Xu drivers/crypto/omap-aes-gcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 350ef88e7e922354f82a931897ad4a4ce6c686ff Author: Mathias Krause Date: Fri Sep 8 20:57:11 2017 +0200 padata: ensure padata_do_serial() runs on the correct CPU If the algorithm we're parallelizing is asynchronous we might change CPUs between padata_do_parallel() and padata_do_serial(). However, we don't expect this to happen as we need to enqueue the padata object into the per-cpu reorder queue we took it from, i.e. the same-cpu's parallel queue. Ensure we're not switching CPUs for a given padata object by tracking the CPU within the padata object. If the serial callback gets called on the wrong CPU, defer invoking padata_reorder() via a kernel worker on the CPU we're expected to run on. Signed-off-by: Mathias Krause Signed-off-by: Herbert Xu include/linux/padata.h | 2 ++ kernel/padata.c | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) commit cf5868c8a22dc2854b96e9569064bb92365549ca Author: Mathias Krause Date: Fri Sep 8 20:57:10 2017 +0200 padata: ensure the reorder timer callback runs on the correct CPU The reorder timer function runs on the CPU where the timer interrupt was handled which is not necessarily one of the CPUs of the 'pcpu' CPU mask set. Ensure the padata_reorder() callback runs on the correct CPU, which is one in the 'pcpu' CPU mask set and, preferrably, the next expected one. Do so by comparing the current CPU with the expected target CPU. If they match, call padata_reorder() right away. If they differ, schedule a work item on the target CPU that does the padata_reorder() call for us. Signed-off-by: Mathias Krause Signed-off-by: Herbert Xu include/linux/padata.h | 2 ++ kernel/padata.c | 43 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) commit 1bd845bcb41d5b7f83745e0cb99273eb376f2ec5 Author: Mathias Krause Date: Fri Sep 8 20:57:09 2017 +0200 padata: set cpu_index of unused CPUs to -1 The parallel queue per-cpu data structure gets initialized only for CPUs in the 'pcpu' CPU mask set. This is not sufficient as the reorder timer may run on a different CPU and might wrongly decide it's the target CPU for the next reorder item as per-cpu memory gets memset(0) and we might be waiting for the first CPU in cpumask.pcpu, i.e. cpu_index 0. Make the '__this_cpu_read(pd->pqueue->cpu_index) == next_queue->cpu_index' compare in padata_get_next() fail in this case by initializing the cpu_index member of all per-cpu parallel queues. Use -1 for unused ones. Signed-off-by: Mathias Krause Signed-off-by: Herbert Xu kernel/padata.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 5e1a646204deb0efd0e0bbc1730ac11dcb39f8fb Author: Mikulas Patocka Date: Wed Sep 6 22:41:21 2017 -0400 crypto: crc32-pclmul - remove useless relative addressing In 32-bit mode, the x86 architecture can hold full 32-bit pointers. Therefore, the code that copies the current address to the %ecx register and uses %ecx-relative addressing is useless, we could just use absolute addressing. The processors have a stack of return addresses for branch prediction. If we use a call instruction and pop the return address, it desynchronizes the return stack and causes branch prediction misses. This patch also moves the data to the .rodata section. Signed-off-by: Mikulas Patocka Signed-off-by: Herbert Xu arch/x86/crypto/crc32-pclmul_asm.S | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit c07f7c29d1c6a7c62b66299d50acd6ffd171f612 Author: amd Date: Tue Sep 5 17:08:14 2017 -0500 crypto:ccp - invoke the DMA callback in a standard way Use the provided mechanism in dmaengine.h to invoke the completion callback. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dmaengine.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 01c4c097bcdbf3c3ea288d22f00f469ac139b7bc Author: amd Date: Tue Sep 5 17:01:51 2017 -0500 crypto: ccp - unmap pages and remove unmap objects in callback Clean up the mapped pages and the unmap object once we are done with it. This enables the final clean-up of the object once the transfer is complete. Signed-off-by: Gary R Hook Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-dmaengine.c | 1 + 1 file changed, 1 insertion(+) commit 51e3ae81ec58e95f10a98ef3dd6d7bce5d8e35a2 Author: Theodore Ts'o Date: Fri Oct 6 23:09:55 2017 -0400 ext4: fix interaction between i_size, fallocate, and delalloc after a crash If there are pending writes subject to delayed allocation, then i_size will show size after the writes have completed, while i_disksize contains the value of i_size on the disk (since the writes have not been persisted to disk). If fallocate(2) is called with the FALLOC_FL_KEEP_SIZE flag, either with or without the FALLOC_FL_ZERO_RANGE flag set, and the new size after the fallocate(2) is between i_size and i_disksize, then after a crash, if a journal commit has resulted in the changes made by the fallocate() call to be persisted after a crash, but the delayed allocation write has not resolved itself, i_size would not be updated, and this would cause the following e2fsck complaint: Inode 12, end of extent exceeds allowed value (logical block 33, physical block 33441, len 7) This can only take place on a sparse file, where the fallocate(2) call is allocating blocks in a range which is before a pending delayed allocation write which is extending i_size. Since this situation is quite rare, and the window in which the crash must take place is typically < 30 seconds, in practice this condition will rarely happen. Nevertheless, it can be triggered in testing, and in particular by xfstests generic/456. Signed-off-by: Theodore Ts'o Reported-by: Amir Goldstein Cc: stable@vger.kernel.org fs/ext4/extents.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0d7b70e83642f01c451a52faa3908e7b054ff7c6 Author: Jonathan Toppins Date: Fri Oct 6 15:48:30 2017 -0400 bnxt_en: don't consider building bnxt_tc.o if option not enabled Instead of zeroing out bnxt_tc.c with a #ifdef foo, instead don't compile the file when the option is not enabled. Now make and the preprocessor do not have to waste time compiling a no-op. Signed-off-by: Jonathan Toppins Acked-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/Makefile | 3 ++- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) commit ca82214144d925155977abe7c0af7c2c252b837f Merge: f5333f80 75c119a Author: David S. Miller Date: Sat Oct 7 00:28:54 2017 +0100 Merge branch 'tcp-rbtree-retransmit-queue' Eric Dumazet says: ==================== tcp: implement rb-tree based retransmit queue This patch series implement RB-tree based retransmit queue for TCP, to better match modern BDP. Tested: On receiver : netem on ingress : delay 150ms 200us loss 1 GRO disabled to force stress and SACK storms. for f in `seq 1 10` do ./netperf -H lpaa6 -l30 -- -K bbr -o THROUGHPUT|tail -1 done | awk '{print $0} {sum += $0} END {printf "%7u\n",sum}' Before patch : 323.87 351.48 339.59 338.62 306.72 204.07 304.93 291.88 202.47 176.88 -> 2840 After patch: 1700.83 2207.98 2070.17 1544.26 2114.76 2124.89 1693.14 1080.91 2216.82 1299.94 -> 18053 Average of 1805 Mbits istead of 284 Mbits. ==================== Signed-off-by: David S. Miller commit 75c119afe14f74b4dd967d75ed9f57ab6c0ef045 Author: Eric Dumazet Date: Thu Oct 5 22:21:27 2017 -0700 tcp: implement rb-tree based retransmit queue Using a linear list to store all skbs in write queue has been okay for quite a while : O(N) is not too bad when N < 500. Things get messy when N is the order of 100,000 : Modern TCP stacks want 10Gbit+ of throughput even with 200 ms RTT flows. 40 ns per cache line miss means a full scan can use 4 ms, blowing away CPU caches. SACK processing often can use various hints to avoid parsing whole retransmit queue. But with high packet losses and/or high reordering, hints no longer work. Sender has to process thousands of unfriendly SACK, accumulating a huge socket backlog, burning a cpu and massively dropping packets. Using an rb-tree for retransmit queue has been avoided for years because it added complexity and overhead, but now is the time to be more resistant and say no to quadratic behavior. 1) RTX queue is no longer part of the write queue : already sent skbs are stored in one rb-tree. 2) Since reaching the head of write queue no longer needs sk->sk_send_head, we added an union of sk_send_head and tcp_rtx_queue Tested: On receiver : netem on ingress : delay 150ms 200us loss 1 GRO disabled to force stress and SACK storms. for f in `seq 1 10` do ./netperf -H lpaa6 -l30 -- -K bbr -o THROUGHPUT|tail -1 done | awk '{print $0} {sum += $0} END {printf "%7u\n",sum}' Before patch : 323.87 351.48 339.59 338.62 306.72 204.07 304.93 291.88 202.47 176.88 2840 After patch: 1700.83 2207.98 2070.17 1544.26 2114.76 2124.89 1693.14 1080.91 2216.82 1299.94 18053 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/sock.h | 7 ++- include/net/tcp.h | 89 ++++++++++++++++---------------- net/ipv4/tcp.c | 41 +++++++++++---- net/ipv4/tcp_input.c | 133 +++++++++++++++++++++++++----------------------- net/ipv4/tcp_ipv4.c | 2 +- net/ipv4/tcp_output.c | 137 +++++++++++++++++++++++++++----------------------- net/ipv4/tcp_timer.c | 24 +++++---- 7 files changed, 245 insertions(+), 188 deletions(-) commit f33198163a0fbb03766444253edf6ea50685d725 Author: Eric Dumazet Date: Thu Oct 5 22:21:26 2017 -0700 tcp: pass previous skb to tcp_shifted_skb() No need to recompute previous skb, as it will be a bit more expensive when rtx queue is converted to RB tree. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 8ba6ddaaf86c4c6814774e4e4ef158b732bd9f9f Author: Eric Dumazet Date: Thu Oct 5 22:21:25 2017 -0700 tcp: reduce tcp_fastretrans_alert() verbosity With upcoming rb-tree implementation, the checks will trigger more often, and this is expected. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5e76ee4b8e90384936a214cde5b7816424f70232 Author: Eric Dumazet Date: Thu Oct 5 22:21:24 2017 -0700 tcp: tcp_mark_head_lost() optimization It will be a bit more expensive to get the head of rtx queue once rtx queue is converted to an rb-tree. We can avoid this extra cost in case tp->lost_skb_hint is set. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4e8cc22803080853a33bafc6748e133448fb8182 Author: Eric Dumazet Date: Thu Oct 5 22:21:23 2017 -0700 tcp: tcp_tx_timestamp() cleanup tcp_write_queue_tail() call can be factorized. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit ac3f09ba3e496bd7cc780ead05b1d1bb5f33aedb Author: Eric Dumazet Date: Thu Oct 5 22:21:22 2017 -0700 tcp: uninline tcp_write_queue_purge() Since the upcoming rtx rbtree will add some extra code, it is time to not inline this fat function anymore. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/tcp.h | 15 +-------------- net/ipv4/tcp.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 14 deletions(-) commit 18a4c0eab2623cc95be98a1e6af1ad18e7695977 Author: Eric Dumazet Date: Thu Oct 5 22:21:21 2017 -0700 net: add rb_to_skb() and other rb tree helpers Geeralize private netem_rb_to_skb() TCP rtx queue will soon be converted to rb-tree, so we will need skb_rbtree_walk() helpers. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/linux/skbuff.h | 18 ++++++++++++++++++ net/ipv4/tcp_fastopen.c | 8 +++----- net/ipv4/tcp_input.c | 33 ++++++++++++--------------------- net/sched/sch_netem.c | 14 ++++---------- 4 files changed, 37 insertions(+), 36 deletions(-) commit a56d339e8cb8e5627aaf7661018627a86cb3501a Author: Markus Mayer Date: Mon Oct 2 16:13:47 2017 -0700 memory: brcmstb: dpfe: skip downloading firmware when possible We want to skip downloading the DPFE firmware from Linux if it was already downloaded by the boot loader. The driver now checks if the DCPU is already running and, if so, whether it can process commands. If the DCPU processes commands successfully, the driver skips the firmware download step. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli drivers/memory/brcmstb_dpfe.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit d56e746f4b5b101b3c12b8e23d20b0c1ded01a5e Author: Markus Mayer Date: Mon Oct 2 16:13:46 2017 -0700 memory: brcmstb: dpfe: introduce is_dcpu_enabled() In order to check whether or not the DCPU is running, we introduce a function called is_dcpu_enabled(). Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli drivers/memory/brcmstb_dpfe.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit 2460266f21f140936e627f28f28d1a4f30887ae9 Author: Rafał Miłecki Date: Fri Oct 6 10:52:35 2017 +0200 ARM: dts: BCM5301X: Specify USB ports for USB LED of Luxul XWR-1200 This info can be used by operating system to setup LED behavior. Reported-by: Dan Haab Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b9b4bf504c9e94fe38b93aa2784991c80cebcf2e Author: Linus Lüssing Date: Mon Oct 2 17:59:03 2017 +0200 ARM: dts: meson8b: add reserved memory zone to fix silent freezes So far, the stress-ng tool for instance quickly resulted in a silent freeze of the system with no prior notice on a serial console when running its filesystem or memory stressor classes. Even with a panic-on-OOM and reboot-on-panic (vm.panic_on_oom=1, kernel.panic=10) configured, the system would neither reboot nor would the OOM killer get any chance to otherwise do its job. The Amlogic reference source code uses a 2MB PHYS_OFFSET. With these 2MB reserved via DT, stress-ng was able to run on an Odroid C1+ just fine for several hours, the OOM killer was able to kill processes again and if configured would successfully trigger a reboot of the system. Fixes: 4a69fcd3a108 ("ARM: meson: Add DTS for Odroid-C1 and Tronfy MXQ boards") Signed-off-by: Linus Lüssing Acked-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 58fb207fb10074be48f51e514422dea7ce5fa048 Author: Ard Biesheuvel Date: Fri Oct 6 17:39:18 2017 +0100 PCI: generic: Add support for Synopsys DesignWare RC in ECAM mode Some implementations of the Synopsys DesignWare PCIe controller implement a so-called ECAM shift mode, which allows a static memory window to be configured that covers the configuration space of the entire bus range. Usually, when the firmware performs all the low level configuration that is required to expose this controller in a fully ECAM compatible manner, we can simply describe it as "pci-host-ecam-generic" and be done with it. However, in some cases (e.g., the Marvell Armada 80x0 as well as the Socionext SynQuacer Soc), the IP was synthesized with an ATU window granularity that does not allow the first bus to be mapped in a way that prevents the device on the downstream port from appearing more than once, and so we still need special handling in software to drive this static almost-ECAM configuration. So extend the pci-host-generic driver so it can support these controllers as well, by adding special config space accessors that take the above quirk into account. Note that, unlike most drivers for this IP, this driver does not expose a fake bridge device at B/D/F 00:00.0. There is no point in doing so, given that this is not a true bridge, and does not require any windows to be configured in order for the downstream device to operate correctly. Omitting it also prevents the PCI resource allocation routines from handing out BAR space to it unnecessarily. Signed-off-by: Ard Biesheuvel [bhelgaas: factor out pci_dw_valid_device(), add pci_dw_ecam_map_bus() and use generic read/write functions] Signed-off-by: Bjorn Helgaas Acked-by: Will Deacon drivers/pci/host/pci-host-generic.c | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit bd835d53f505d3b4f8b19bc8f7ea28eb3cab7391 Author: Martin Blumenstingl Date: Sat Sep 23 16:14:03 2017 +0200 ARM: dts: meson: add SoC information nodes The SoC type and version information is encoded in different register blocks. The SoC type information is part of the "assist" registers. The misc version information is part of the "bootrom" registers. On Meson8, Meson8b and Meson8m2 there is additionally information about the minor version. This information is stored in the "analog top" registers. Add the nodes for these register blocks so we can decode the SoC type and version information. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson.dtsi | 10 ++++++++++ arch/arm/boot/dts/meson8.dtsi | 5 +++++ arch/arm/boot/dts/meson8b.dtsi | 5 +++++ 3 files changed, 20 insertions(+) commit aee2828ccb3444ad1551e8528a868ab49ef447de Author: Martin Blumenstingl Date: Sat Sep 23 16:14:01 2017 +0200 dt-bindings: Amlogic: add documentation for the SoC info register areas There are three register areas which contain information about the SoC version and revision: - the assist registers contain the SoC's "major version" which encodes the SoC generation and part number. this is available on Meson6, Meson8 and Meson8b SoCs. - the bootrom register contains at least the SoCs "misc version". this is avilable on Meson6, Meson8 and Meson8b - the analog top registers contain information about the SoC revision. this is only available on Meson8 and Meson8b Not much else is currently known about these registers. Signed-off-by: Martin Blumenstingl Acked-by: Rob Herring Signed-off-by: Kevin Hilman .../devicetree/bindings/arm/amlogic/analog-top.txt | 20 ++++++++++++++++++++ .../devicetree/bindings/arm/amlogic/assist.txt | 17 +++++++++++++++++ .../devicetree/bindings/arm/amlogic/bootrom.txt | 17 +++++++++++++++++ 3 files changed, 54 insertions(+) commit 5e68c0fc8df8a588b15cd469b27b8b5dbfadc6c3 Author: Martin Blumenstingl Date: Sat Sep 23 16:14:02 2017 +0200 soc: amlogic: Add Meson6/Meson8/Meson8b/Meson8m2 SoC Information driver Amlogic SoCs have an information register which contains the SoC type and revision information. This patchs adds support for decoding those registers and exposing the resulting information via the SoC bus infrastructure. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman drivers/soc/amlogic/Kconfig | 10 ++ drivers/soc/amlogic/Makefile | 1 + drivers/soc/amlogic/meson-mx-socinfo.c | 175 +++++++++++++++++++++++++++++++++ 3 files changed, 186 insertions(+) commit f5333f80c3b33183ce8b5b880adba028b728fbf6 Merge: 4bc4e64 b74f571 Author: David S. Miller Date: Fri Oct 6 23:29:38 2017 +0100 Merge branch '40GbE' of ra.kernel.org:/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-10-06 This series contains updates to i40e and i40evf only. Rami fixes a typo in the code comments. Mitch adds an ethtool private flag to control source pruning to resolve an issue where our default behavior is to enable source pruning which breaks ARP monitoring in channel bonding. Fixes a couple of register definitions, which were incorrect. Jake fixes an issue with multiple logical CPUs per core (simultaneous multithreading - SMT) and how we set an affinity hint based on the v_idx of that q_vector, which is an incremental value and might lead to multiple offline CPUs being assigned to a q_vector. Instead, we should only assign hints for CPUs which are online, so look to use cpumask_local_spread(). Also fixed a VF VLAN tag stripping issue, where the flag created to change this feature was seen as unchangeable. Lastly, organized and re-numbered the feature flags. Alan re-enables PTP L4 for XL710 devices with firmware version 6.0 or greater, now that the previous bug in the older firmware is fixed. Implements the PCI error handlers for reset_prepare() and reset_done() to allow us to handle function level resets. Alice cleans up code that was added to the incorrect function during a merge. Filip adds a change to display an error message when a module is inserted that does not meet the thermal requirements, Talking Heads "Burning Down the House" comes to mind. Also fixed a flow director filter issue where a variable was not being cleared which stores the filter number to be removed from the list when the firmware refused to add the requested filter. ==================== Signed-off-by: David S. Miller commit 291f45dd6da5fa6c9a51e5401c1d0af4d549bdee Author: Emiliano Ingrassia Date: Fri Sep 22 13:57:08 2017 +0200 ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b This patch fixes the Meson6, Meson8 and Meson8b USB controllers dts nodes which interrupts are level type instead of edge type. This avoids errors like "usb 1-1-port1: cannot reset (err = -110)" and similars on Odroid-C1+ board. Fixes: e29b1cf87473 ("ARM: dts: meson: add USB support on Meson8 and Meson8b") Signed-off-by: Emiliano Ingrassia Tested-by: Martin Blumenstingl Signed-off-by: Martin Blumenstingl Tested-by: Linus Lüssing Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 279f5a00c9a9b39f4f6e9813e6d4da8c181d34c8 Author: Chris Wilson Date: Thu Oct 5 20:10:05 2017 +0100 drm/i915/execlists: Add a comment for the extra MI_ARB_ENABLE Michel Thierry noticed that we were applying WaDisableCtxRestoreArbitration even to gen9, which does not require the w/a. The rationale is that we need to enable MI arbitration for execlists to work, and to be safe we do that before every batch (in addition to every context switch into the batch). Since this is not clear from the single line comment suggesting the MI_ARB_ENABLE is solely for the w/a, add a little more detail. Signed-off-by: Chris Wilson Cc: Michel Thierry Cc: Joonas Lahtinen Cc: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20171005191005.13462-1-chris@chris-wilson.co.uk Reviewed-by: Michel Thierry drivers/gpu/drm/i915/intel_lrc.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 2eb79a4d15ff419b777d953143ad12b6d54d69d7 Author: Emiliano Ingrassia Date: Wed Sep 20 16:40:09 2017 +0200 ARM: dts: meson: enabling the USB Host controller on Odroid-C1/C1+ board This patch enables the USB Host controller (USB1) and the relative USB2 PHY on Odroid-C1/C1+ board. Signed-off-by: Emiliano Ingrassia Acked-by: Martin Blumenstingl Tested-by: Linus Lüssing Signed-off-by: Kevin Hilman arch/arm/boot/dts/meson8b-odroidc1.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 3bda685e0eebafd60d94296df0bec51984f16e5a Merge: 2e7a84a fd3372d Author: Florian Fainelli Date: Fri Oct 6 15:17:39 2017 -0700 Merge tag 'bcm2835-dt-next-2017-10-06' into devicetree/next This pull request adds the Pi 3's built in bluetooth device so that it can be probed automatically without userspace hciattach calls. Signed-off-by: Florian Fainelli commit 2e7a84aadd88aadd3bb6723db1572036757885d6 Merge: a7794db f08f58a Author: Florian Fainelli Date: Fri Oct 6 15:17:19 2017 -0700 Merge tag 'bcm2835-dt-fixes-2017-10-06' into devicetree/next This pull request brings in a fix for default serial console setup on RPi3, so it now comes up with no config.txt/cmdline.txt settings in the firmware. Signed-off-by: Florian Fainelli commit d327a224ba2cbe234d82fd560ff8e5bb38b0bb4b Author: Jacopo Mondi Date: Thu Sep 28 15:01:44 2017 +0200 tools: gpio: Print error string on IOCTL failures Add to error messages the error description by concatenating output of strerror() function to error messages print out by gpio-utils.c on IOCTL failures. Rationalize error messages, while at there, making all of them look the same. Signed-off-by: Jacopo Mondi Signed-off-by: Linus Walleij tools/gpio/gpio-utils.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit ad5c32218879c4b23638488989503d7444822ef2 Author: Linus Walleij Date: Fri Sep 22 11:19:26 2017 +0200 gpio: pxa: Use library functions These request/free functions are just reimplementations of the standard helpers in gpiolib. Delete them and replace with the helpers. Acked-by: Robert Jarzmik Signed-off-by: Linus Walleij drivers/gpio/gpio-pxa.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 40833a84faed72f333b1626f00f59e6bebea4d98 Author: Linus Walleij Date: Fri Sep 22 11:16:40 2017 +0200 pinctrl: meson: Use library functions These request/free functions are just reimplementations of the standard helpers in gpiolib. Delete them and replace with the helpers. Cc: Neil Armstrong Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 92ddf5ff97f4d47bfe2ab18da320942befe32c26 Author: Linus Walleij Date: Fri Sep 22 11:06:00 2017 +0200 pinctrl: bcm: nsp: Use library functions These request/free functions are just reimplementations of the standard helpers in gpiolib. Delete them and replace with the helpers. Acked-by: Scott Branden Signed-off-by: Linus Walleij drivers/pinctrl/bcm/pinctrl-nsp-gpio.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) commit 79867462634836ee5c39a2cdf624719feeb189bd Author: Nicolai Hähnle Date: Thu Sep 28 11:57:32 2017 +0200 drm/amd/sched: fix deadlock caused by unsignaled fences of deleted jobs Highly concurrent Piglit runs can trigger a race condition where a pending SDMA job on a buffer object is never executed because the corresponding process is killed (perhaps due to a crash). Since the job's fences were never signaled, the buffer object was effectively leaked. Worse, the buffer was stuck wherever it happened to be at the time, possibly in VRAM. The symptom was user space processes stuck in interruptible waits with kernel stacks like: [] dma_fence_default_wait+0x112/0x250 [] dma_fence_wait_timeout+0x39/0xf0 [] reservation_object_wait_timeout_rcu+0x1c2/0x300 [] ttm_bo_cleanup_refs_and_unlock+0xff/0x1a0 [ttm] [] ttm_mem_evict_first+0xba/0x1a0 [ttm] [] ttm_bo_mem_space+0x341/0x4c0 [ttm] [] ttm_bo_validate+0xd4/0x150 [ttm] [] ttm_bo_init_reserved+0x2ed/0x420 [ttm] [] amdgpu_bo_create_restricted+0x1f3/0x470 [amdgpu] [] amdgpu_bo_create+0xda/0x220 [amdgpu] [] amdgpu_gem_object_create+0xaa/0x140 [amdgpu] [] amdgpu_gem_create_ioctl+0x97/0x120 [amdgpu] [] drm_ioctl+0x1fa/0x480 [drm] [] amdgpu_drm_ioctl+0x4f/0x90 [amdgpu] [] do_vfs_ioctl+0xa3/0x5f0 [] SyS_ioctl+0x79/0x90 [] entry_SYSCALL_64_fastpath+0x1e/0xad [] 0xffffffffffffffff Note: The correctness of this change depends on the earlier commit "drm/amd/sched: move adding finish callback to amd_sched_job_begin" v2: set an error on the finished fence Signed-off-by: Nicolai Hähnle Reviewed-by: Christian König Reviewed-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 29d253553559dba919315be847f4f2cce29edd42 Author: Nicolai Hähnle Date: Thu Sep 28 11:51:32 2017 +0200 drm/amd/sched: NULL out the s_fence field after run_job amd_sched_process_job drops the fence reference, so NULL out the s_fence field before adding it as a callback to guard against accidentally using s_fence after it may have be freed. v2: add a clarifying comment Signed-off-by: Nicolai Hähnle Reviewed-by: Christian König Reviewed-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 4 ++++ 1 file changed, 4 insertions(+) commit 214a91e6bfabaa6cbfa692df8732000aab050795 Author: Nicolai Hähnle Date: Thu Sep 28 11:37:02 2017 +0200 drm/amd/sched: move adding finish callback to amd_sched_job_begin The finish callback is responsible for removing the job from the ring mirror list, among other things. It makes sense to add it as callback in the place where the job is added to the ring mirror list. Signed-off-by: Nicolai Hähnle Reviewed-by: Christian König Reviewed-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1650c14b459ff9c85767746f1ef795a780653128 Author: Nicolai Hähnle Date: Thu Sep 28 11:35:05 2017 +0200 drm/amd/sched: fix an outdated comment Signed-off-by: Nicolai Hähnle Reviewed-by: Christian König Reviewed-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 515c6faf85970af529953ec137b4b6fcb3272e25 Author: Nicolai Hähnle Date: Thu Sep 28 11:21:15 2017 +0200 drm/amd/sched: rename amd_sched_entity_pop_job The function does not actually remove the job from the FIFO, so "peek" describes it better. Signed-off-by: Nicolai Hähnle Reviewed-by: Christian König Reviewed-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c38e0691107d14a8a39e9be7cb46c312bdfbd22d Author: Christian König Date: Mon Sep 18 14:01:45 2017 +0200 drm/amdgpu: minor coding style fix Fix two minor 80 char issues. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 648bc3574716400acc06f99915815f80d9563783 Author: Christian König Date: Thu Jul 6 09:59:43 2017 +0200 drm/ttm: add transparent huge page support for DMA allocations v2 Try to allocate huge pages when it makes sense. v2: fix comment and use ifdef Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 217 ++++++++++++++++++++++++------- 1 file changed, 169 insertions(+), 48 deletions(-) commit d188bfa5532ce5b426681d8530ff1a9683eea0ad Author: Christian König Date: Tue Jul 4 16:56:24 2017 +0200 drm/ttm: add support for different pool sizes Correctly handle different page sizes in the memory accounting. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_memory.c | 10 +++++----- drivers/gpu/drm/ttm/ttm_page_alloc.c | 5 +++-- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 7 ++++--- include/drm/ttm/ttm_memory.h | 4 ++-- 4 files changed, 14 insertions(+), 12 deletions(-) commit f9ebec52b5f115a0b06cdabe3036b858bfbb588a Author: Christian König Date: Mon Sep 18 15:45:11 2017 +0200 drm/ttm: remove unsued options from ttm_mem_global_alloc_page Nobody is actually using that, remove it. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_memory.c | 6 ++---- drivers/gpu/drm/ttm/ttm_page_alloc.c | 3 +-- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 3 +-- include/drm/ttm/ttm_memory.h | 3 +-- 4 files changed, 5 insertions(+), 10 deletions(-) commit 65da0d40e561a717fee065d69d6e4f8d5b34db32 Author: James Zhu Date: Fri Sep 29 16:47:31 2017 -0400 drm/amdgpu: add uvd enc irq Add UVD encode IRQ handle and enable the UVD encode trap Signed-off-by: James Zhu Reviewed-and-Tested-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 40 +++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) commit e0128efb08b3d628d767ec8578e77cdd7ecc8f81 Author: James Zhu Date: Fri Sep 29 16:42:27 2017 -0400 drm/amdgpu: add uvd enc ib test Generate create/destroy messages to test UVD encode indirect buffer function. And enable UVD encode IB test during device initialization. Signed-off-by: James Zhu Reviewed-and-Tested-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 172 ++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) commit 2a91f272e34c721bbb8f148c5f15a0a454dac2fd Author: James Zhu Date: Fri Sep 29 16:40:12 2017 -0400 drm/amdgpu: add uvd enc ring test Add UVD encode ring test functions. And enable UVD encode ring test during UVD encode hardware initialization. Signed-off-by: James Zhu Reviewed-and-Tested-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 55 ++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) commit c259ee6e3058f2a1b30aac1e77d2c6e8699eccd9 Author: James Zhu Date: Fri Sep 29 16:37:11 2017 -0400 drm/amdgpu: add uvd enc vm functions (v2) Add UVD encode ring vm functions to handle frame ecoding. v2: squash in warning fix (James) Signed-off-by: James Zhu Reviewed-and-Tested-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 46 +++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) commit 296191c5e88fc920f3e624ceb27dd544c76a1284 Author: James Zhu Date: Fri Sep 29 15:20:23 2017 -0400 drm/amdgpu: add uvd enc into run queue Signed-off-by: James Zhu Reviewed-and-Tested-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 06a7e9cb576c9ce31cc6da6d4d09476d81e41058 Author: James Zhu Date: Fri Sep 29 17:29:06 2017 -0400 drm/amdgpu: add uvd enc rings UVD 6.3 has two UVD encode rings. Add the ring structures and initialize the hw ring buffers. Currently only ASIC Polaris10/11/12 uses UVD6.3 encode engine on HEVC encoding. Signed-off-by: James Zhu Reviewed-and-Tested-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 54 +++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) commit c0f2f2e66cfdfe8219592d2625dbf347eaf826d5 Author: James Zhu Date: Fri Sep 29 16:14:26 2017 -0400 drm/amdgpu: add new uvd enc ring methods Add new UVD encode ring methods get/set/emit/flush/sync to support uvd6.3 HEVC encoding Signed-off-by: James Zhu Reviewed-and-Tested-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 117 ++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) commit 8ed841505892042749dbfb8544382c4fba323bc3 Author: James Zhu Date: Fri Sep 29 14:17:34 2017 -0400 drm/amdgpu: add uvd enc command in header Add UVD encode command interface definition for uvd6.3 HEVC encoding Signed-off-by: James Zhu Reviewed-and-Tested-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vid.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d0e62855fa7aea4736297abcbe4f0777f1332883 Author: James Zhu Date: Sun Oct 1 20:00:07 2017 -0400 drm/amdgpu: add uvd enc registers in header Add UVD encode write/read/size/base registers definition for uvd6.3 HEVC ecoding Signed-off-by: James Zhu Reviewed-and-Tested-by: Leo Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/asic_reg/uvd/uvd_6_0_d.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 4b6aca2f59dca3228a370ddefc94f3a44e57c772 Author: Rex Zhu Date: Fri Oct 6 12:17:16 2017 +0800 drm/amd/powerplay: fix mclk can't switch on Tonga regression issue caused by commit 47047263c52779f1f3393c32e3e53661b53a372e ("drm/amd/powerplay: delete eventmgr related files.") Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) commit 1756f1bbddad4552cb4e8773c54960a4cc4ba107 Author: Tom St Denis Date: Wed Oct 4 13:44:52 2017 -0400 drm/amd/powerplay: Partially revert changes and fix smu7_notify_smc_display() This partially reverts 0b6b4cbf77c995a34a4ec3d705a636434dadc51a and fixes the noise issues on Tonga. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit de1960369115bc997689cefc53a548b3db50a78c Author: Evan Quan Date: Sat Sep 30 09:13:47 2017 +0800 drm/amd/powerplay: fix typo on avfs disable Signed-off-by: Evan Quan Acked-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 5f628d997d1e41c34dd65bfb7ceb0459868cc925 Author: Evan Quan Date: Tue Sep 26 11:51:58 2017 +0800 drm/amd/powerplay: get raven sclk and mclk levels (v2) v2: squash in rebase fix (Tom) Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 48 +++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) commit 88ed3377d0a6175233414dcd21b751a40f86fa29 Author: Evan Quan Date: Tue Sep 26 11:49:28 2017 +0800 drm/amd/powerplay: get raven current sclk and mclk (v2) v2: squash in rebase fix (Tom) Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 28 ++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 2b95315a584f8edd6021af1ce4e6282dd6b8fd9c Author: Evan Quan Date: Tue Sep 26 11:43:35 2017 +0800 drm/amd/powerplay: get raven max/min gfx clocks (v2) v2: squash in rebase fix (Tom) Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 20 ++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.h | 2 ++ 2 files changed, 22 insertions(+) commit d0d9db8864af8dca3bb9586402d6334e5bab8f4d Author: Evan Quan Date: Tue Sep 26 11:37:34 2017 +0800 drm/amd/powerplay: added new raven ppsmc messages Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/rv_ppsmc.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 64e66cffdb3e83d438d5ed8aa0593fbbdb2975fc Author: Evan Quan Date: Tue Sep 26 11:35:30 2017 +0800 drm/amd/powerplay: fixed wrong return value on error (v2) v2: squash in typo fix (Tom) Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a50ecc54ff1a53c410eafe21454ff1d88d76c35c Author: ozeng Date: Wed Sep 27 17:53:12 2017 -0400 drm/amdgpu: Fixed a potential circular lock The dead circular lock senario captured is as followed. The idea of the fix is moving read_user_wptr outside of acquire_queue...release_queue critical section [ 63.477482] WARNING: possible circular locking dependency detected [ 63.484091] 4.12.0-kfd-ozeng #3 Not tainted [ 63.488531] ------------------------------------------------------ [ 63.495146] HelloWorldLoop/2526 is trying to acquire lock: [ 63.501011] (&mm->mmap_sem){++++++}, at: [] __might_fault+0x3e/0x90 [ 63.509472] but task is already holding lock: [ 63.515716] (&adev->srbm_mutex){+.+...}, at: [] lock_srbm+0x2b/0x50 [amdgpu] [ 63.525099] which lock already depends on the new lock. [ 63.533841] the existing dependency chain (in reverse order) is: [ 63.541839] -> #2 (&adev->srbm_mutex){+.+...}: [ 63.548178] lock_acquire+0x6d/0x90 [ 63.552461] __mutex_lock+0x70/0x8c0 [ 63.556826] mutex_lock_nested+0x16/0x20 [ 63.561603] gfx_v8_0_kiq_resume+0x1039/0x14a0 [amdgpu] [ 63.567817] gfx_v8_0_hw_init+0x204d/0x2210 [amdgpu] [ 63.573675] amdgpu_device_init+0xdea/0x1790 [amdgpu] [ 63.579640] amdgpu_driver_load_kms+0x63/0x220 [amdgpu] [ 63.585743] drm_dev_register+0x145/0x1e0 [ 63.590605] amdgpu_pci_probe+0x11e/0x160 [amdgpu] [ 63.596266] local_pci_probe+0x40/0xa0 [ 63.600803] pci_device_probe+0x134/0x150 [ 63.605650] driver_probe_device+0x2a1/0x460 [ 63.610785] __driver_attach+0xdc/0xe0 [ 63.615321] bus_for_each_dev+0x5f/0x90 [ 63.619984] driver_attach+0x19/0x20 [ 63.624337] bus_add_driver+0x40/0x270 [ 63.628908] driver_register+0x5b/0xe0 [ 63.633446] __pci_register_driver+0x5b/0x60 [ 63.638586] rtsx_pci_switch_output_voltage+0x1d/0x20 [rtsx_pci] [ 63.645564] do_one_initcall+0x4c/0x1b0 [ 63.650205] do_init_module+0x56/0x1ea [ 63.654767] load_module+0x208c/0x27d0 [ 63.659335] SYSC_finit_module+0x96/0xd0 [ 63.664058] SyS_finit_module+0x9/0x10 [ 63.668629] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 63.674088] -> #1 (reservation_ww_class_mutex){+.+.+.}: [ 63.681257] lock_acquire+0x6d/0x90 [ 63.685551] __ww_mutex_lock.constprop.11+0x8c/0xed0 [ 63.691426] ww_mutex_lock+0x67/0x70 [ 63.695802] amdgpu_verify_access+0x6d/0x100 [amdgpu] [ 63.701743] ttm_bo_mmap+0x8e/0x100 [ttm] [ 63.706615] amdgpu_bo_mmap+0xd/0x60 [amdgpu] [ 63.711814] amdgpu_mmap+0x35/0x40 [amdgpu] [ 63.716904] mmap_region+0x3b5/0x5a0 [ 63.721255] do_mmap+0x400/0x4d0 [ 63.725260] vm_mmap_pgoff+0xb0/0xf0 [ 63.729625] SyS_mmap_pgoff+0x19e/0x260 [ 63.734292] SyS_mmap+0x1d/0x20 [ 63.738199] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 63.743681] -> #0 (&mm->mmap_sem){++++++}: [ 63.749641] __lock_acquire+0x1401/0x1420 [ 63.754491] lock_acquire+0x6d/0x90 [ 63.758750] __might_fault+0x6b/0x90 [ 63.763176] kgd_hqd_load+0x24f/0x270 [amdgpu] [ 63.768432] load_mqd+0x4b/0x50 [amdkfd] [ 63.773192] create_queue_nocpsch+0x535/0x620 [amdkfd] [ 63.779237] pqm_create_queue+0x34d/0x4f0 [amdkfd] [ 63.784835] kfd_ioctl_create_queue+0x282/0x670 [amdkfd] [ 63.790973] kfd_ioctl+0x310/0x4d0 [amdkfd] [ 63.795944] do_vfs_ioctl+0x90/0x6e0 [ 63.800268] SyS_ioctl+0x74/0x80 [ 63.804207] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 63.809607] other info that might help us debug this: [ 63.818026] Chain exists of: &mm->mmap_sem --> reservation_ww_class_mutex --> &adev->srbm_mutex [ 63.830382] Possible unsafe locking scenario: [ 63.836605] CPU0 CPU1 [ 63.841364] ---- ---- [ 63.846123] lock(&adev->srbm_mutex); [ 63.850061] lock(reservation_ww_class_mutex); [ 63.857475] lock(&adev->srbm_mutex); [ 63.864084] lock(&mm->mmap_sem); [ 63.867657] *** DEADLOCK *** [ 63.873884] 3 locks held by HelloWorldLoop/2526: [ 63.878739] #0: (&process->mutex){+.+.+.}, at: [] kfd_ioctl_create_queue+0x24a/0x670 [amdkfd] [ 63.889543] #1: (&dqm->lock){+.+...}, at: [] create_queue_nocpsch+0x3b/0x620 [amdkfd] [ 63.899684] #2: (&adev->srbm_mutex){+.+...}, at: [] lock_srbm+0x2b/0x50 [amdgpu] [ 63.909500] stack backtrace: [ 63.914187] CPU: 3 PID: 2526 Comm: HelloWorldLoop Not tainted 4.12.0-kfd-ozeng #3 [ 63.922184] Hardware name: AMD Carrizo/Gardenia, BIOS WGA5819N_Weekly_15_08_1 08/19/2015 [ 63.930865] Call Trace: [ 63.933464] dump_stack+0x85/0xc9 [ 63.936999] print_circular_bug+0x1f9/0x207 [ 63.941442] __lock_acquire+0x1401/0x1420 [ 63.945745] ? lock_srbm+0x2b/0x50 [amdgpu] [ 63.950185] lock_acquire+0x6d/0x90 [ 63.953885] ? __might_fault+0x3e/0x90 [ 63.957899] __might_fault+0x6b/0x90 [ 63.961699] ? __might_fault+0x3e/0x90 [ 63.965755] kgd_hqd_load+0x24f/0x270 [amdgpu] [ 63.970577] load_mqd+0x4b/0x50 [amdkfd] [ 63.974745] create_queue_nocpsch+0x535/0x620 [amdkfd] [ 63.980242] pqm_create_queue+0x34d/0x4f0 [amdkfd] [ 63.985320] kfd_ioctl_create_queue+0x282/0x670 [amdkfd] [ 63.991021] kfd_ioctl+0x310/0x4d0 [amdkfd] [ 63.995499] ? kfd_ioctl_destroy_queue+0x70/0x70 [amdkfd] [ 64.001234] do_vfs_ioctl+0x90/0x6e0 [ 64.005065] ? up_read+0x1a/0x40 [ 64.008496] SyS_ioctl+0x74/0x80 [ 64.011955] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 64.016863] RIP: 0033:0x7f4b3bd35f07 [ 64.020696] RSP: 002b:00007ffe7689ec38 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 64.028786] RAX: ffffffffffffffda RBX: 00000000002a2000 RCX: 00007f4b3bd35f07 [ 64.036414] RDX: 00007ffe7689ecb0 RSI: 00000000c0584b02 RDI: 0000000000000005 [ 64.044045] RBP: 00007f4a3212d000 R08: 00007f4b3c919000 R09: 0000000000080000 [ 64.051674] R10: 00007f4b376b64b8 R11: 0000000000000246 R12: 00007f4a3212d000 [ 64.059324] R13: 0000000000000015 R14: 0000000000000064 R15: 00007ffe7689ef50 Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 10 +++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) commit c3fa35a4e5d1a06a5f70e5ac34a05da139aa71f4 Author: Colin Ian King Date: Thu Sep 28 14:46:17 2017 +0100 drm/radeon: make functions alloc_pasid and free_pasid static The functions alloc_pasid and free_pasid are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: warning: symbol 'alloc_pasid' was not declared. Should it be static? warning: symbol 'free_pasid' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_kfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7ca24cf2d2269bde25e21c02a77fe81995a081ae Author: Marek Olšák Date: Tue Sep 12 22:42:14 2017 +0200 drm/amdgpu: add FENCE_TO_HANDLE ioctl that returns syncobj or sync_file for being able to convert an amdgpu fence into one of the handles. Mesa will use this. Reviewed-by: Dave Airlie Signed-off-by: Marek Olšák Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 61 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 1 + include/uapi/drm/amdgpu_drm.h | 16 +++++++++ 5 files changed, 82 insertions(+), 1 deletion(-) commit 684fd0af4732f373503c6af2973b4faa352db4e2 Author: Marek Olšák Date: Tue Sep 12 22:42:13 2017 +0200 drm/syncobj: add a new helper drm_syncobj_get_fd Reviewed-by: Dave Airlie Signed-off-by: Marek Olšák Signed-off-by: Alex Deucher drivers/gpu/drm/drm_syncobj.c | 33 +++++++++++++++++++-------------- include/drm/drm_syncobj.h | 1 + 2 files changed, 20 insertions(+), 14 deletions(-) commit 1321fd2c010e7ccb474cda6b8793747c7a3a775b Author: Marek Olšák Date: Tue Sep 12 22:42:12 2017 +0200 drm/syncobj: extract two helpers from drm_syncobj_create For amdgpu. drm_syncobj_create is renamed to drm_syncobj_create_as_handle, and new helpers drm_syncobj_create and drm_syncobj_get_handle are added. Reviewed-by: Dave Airlie Signed-off-by: Marek Olšák Signed-off-by: Alex Deucher drivers/gpu/drm/drm_syncobj.c | 49 +++++++++++++++++++++++++++++++++++++++---- include/drm/drm_syncobj.h | 4 ++++ 2 files changed, 49 insertions(+), 4 deletions(-) commit e1827a307e96ec51a657a2b7e68a8ffc36ae2a43 Author: Rex Zhu Date: Thu Sep 28 16:12:51 2017 +0800 drm/amd/powerplay: delete flag PP_VALID don't need to check pp_valid, all pp export functions are moved to ip_funcs and pp_funcs. so just need to check the function point. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 3 +-- drivers/gpu/drm/amd/powerplay/inc/pp_instance.h | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) commit 3811f8f00c5fef3754091b5c5254355bed1d9022 Author: Rex Zhu Date: Tue Sep 26 13:39:38 2017 +0800 drm/amd/powerplay: move set_clockgating_by_smu to pp func table Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 4 +++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 23 +++++++----- drivers/gpu/drm/amd/amdgpu/vi.c | 22 +++++++----- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 44 +++++++++++------------ drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 1 - 5 files changed, 54 insertions(+), 40 deletions(-) commit ae97988fc89e6a26da0b4aaab23027318fe311b1 Author: Rex Zhu Date: Fri Sep 29 14:36:15 2017 +0800 drm/amd/powerplay: tidy up ret checks in amd_powerplay.c (v3) v2: squash in regression fix (Rex) v3: Squash in regression fix (Rex) Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 76 +++++++++++++-------------- 1 file changed, 38 insertions(+), 38 deletions(-) commit fd3372db18d3d44ae4579243a8eacb5247d8c03a Author: Loic Poulain Date: Wed Aug 30 22:42:01 2017 +0200 ARM: dts: bcm2837-rpi-3-b: Add bcm43438 serial slave Add BCM43438 (bluetooth) as a slave device of uart0 (pl011/ttyAMA0). This allows to automatically insert the bcm43438 to the bluetooth subsystem instead of relying on userspace helpers (hciattach). Overwrite chosen/stdout-path to use 8250 aux uart as console. Acked-by: Rob Herring Signed-off-by: Loic Poulain Signed-off-by: Eric Anholt arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 26c7d6a321da64b49c38fffd827377fd8eb2379c Author: Kees Cook Date: Wed Oct 4 17:49:34 2017 -0700 leds: ledtrig-heartbeat: Convert timers to use timer_setup() Instead of using .data directly, convert to from_timer. Since the trigger_data is allocated separately, the led_cdev must be explicitly tracked for the callback. Cc: Richard Purdie Cc: Pavel Machek Cc: Zhang Bo Cc: Linus Walleij Cc: Ingo Molnar Cc: linux-leds@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook Signed-off-by: Jacek Anaszewski drivers/leds/trigger/ledtrig-heartbeat.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 55edd1dad96b760c87f5b9e2c461ba551a625f44 Author: David Lin Date: Wed Sep 13 10:53:58 2017 -0700 leds: Replace flags bit shift with BIT() macros This is for readability as well as to avoid checkpatch warnings when adding new bit flag information in the future. Signed-off-by: David Lin Signed-off-by: Jacek Anaszewski include/linux/leds.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 52ca7d0f7bdad832b291ed979146443533ee79c0 Author: Andrew Jeffery Date: Fri Sep 1 15:08:58 2017 +0930 leds: pca955x: Don't invert requested value in pca955x_gpio_set_value() The PCA9552 lines can be used either for driving LEDs or as GPIOs. The manual states that for LEDs, the operation is open-drain: The LSn LED select registers determine the source of the LED data. 00 = output is set LOW (LED on) 01 = output is set high-impedance (LED off; default) 10 = output blinks at PWM0 rate 11 = output blinks at PWM1 rate For GPIOs it suggests a pull-up so that the open-case drives the line high: For use as output, connect external pull-up resistor to the pin and size it according to the DC recommended operating characteristics. LED output pin is HIGH when the output is programmed as high-impedance, and LOW when the output is programmed LOW through the ‘LED selector’ register. The output can be pulse-width controlled when PWM0 or PWM1 are used. Now, I have a hardware design that uses the LED controller to control LEDs. However, for $reasons, we're using the leds-gpio driver to drive the them. The reasons are here are a tangent but lead to the discovery of the inversion, which manifested as the LEDs being set to full brightness at boot when we expected them to be off. As we're driving the LEDs through leds-gpio, this means wending our way through the gpiochip abstractions. So with that in mind we need to describe an active-low GPIO configuration to drive the LEDs as though they were GPIOs. The set() gpiochip callback in leds-pca955x does the following: ... if (val) pca955x_led_set(&led->led_cdev, LED_FULL); else pca955x_led_set(&led->led_cdev, LED_OFF); ... Where LED_FULL = 255. pca955x_led_set() in turn does: ... switch (value) { case LED_FULL: ls = pca955x_ledsel(ls, ls_led, PCA955X_LS_LED_ON); break; ... Where PCA955X_LS_LED_ON is defined as: #define PCA955X_LS_LED_ON 0x0 /* Output LOW */ So here we have some type confusion: We've crossed domains from GPIO behaviour to LED behaviour without accounting for possible inversions in the process. Stepping back to leds-gpio for a moment, during probe() we call create_gpio_led(), which eventually executes: if (template->default_state == LEDS_GPIO_DEFSTATE_KEEP) { state = gpiod_get_value_cansleep(led_dat->gpiod); if (state < 0) return state; } else { state = (template->default_state == LEDS_GPIO_DEFSTATE_ON); } ... ret = gpiod_direction_output(led_dat->gpiod, state); In the devicetree the GPIO is annotated as active-low, and gpiod_get_value_cansleep() handles this for us: int gpiod_get_value_cansleep(const struct gpio_desc *desc) { int value; might_sleep_if(extra_checks); VALIDATE_DESC(desc); value = _gpiod_get_raw_value(desc); if (value < 0) return value; if (test_bit(FLAG_ACTIVE_LOW, &desc->flags)) value = !value; return value; } _gpiod_get_raw_value() in turn calls through the get() callback for the gpiochip implementation, so returning to our get() implementation in leds-pca955x we find we extract the raw value from hardware: static int pca955x_gpio_get_value(struct gpio_chip *gc, unsigned int offset) { struct pca955x *pca955x = gpiochip_get_data(gc); struct pca955x_led *led = &pca955x->leds[offset]; u8 reg = pca955x_read_input(pca955x->client, led->led_num / 8); return !!(reg & (1 << (led->led_num % 8))); } This behaviour is not symmetric with that of set(), where the val is inverted by the driver. Closing the loop on the GPIO_ACTIVE_LOW inversions, gpiod_direction_output(), like gpiod_get_value_cansleep(), handles it for us: int gpiod_direction_output(struct gpio_desc *desc, int value) { VALIDATE_DESC(desc); if (test_bit(FLAG_ACTIVE_LOW, &desc->flags)) value = !value; else value = !!value; return _gpiod_direction_output_raw(desc, value); } All-in-all, with a value of 'keep' for default-state property in a leds-gpio child node, the current state of the hardware will in-fact be inverted; precisely the opposite of what was intended. Rework leds-pca955x so that we avoid the incorrect inversion and clarify the semantics with respect to GPIO. Signed-off-by: Andrew Jeffery Reviewed-by: Cédric Le Goater Tested-by: Joel Stanley Tested-by: Matt Spinler Signed-off-by: Jacek Anaszewski drivers/leds/leds-pca955x.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 7df4f9a9f0667ee60b1d96c30734c8aa504d5f07 Author: Willy Tarreau Date: Mon Aug 28 20:44:51 2017 +0200 leds: ledtrig-activity: Add a system activity LED trigger The "activity" trigger was inspired by the heartbeat one, but aims at providing instant indication of the immediate CPU usage. Under idle condition, it flashes 10ms every second. At 100% usage, it flashes 90ms every 100ms. The blinking frequency increases from 1 to 10 Hz until either the load is high enough to saturate one CPU core or 50% load is reached on a single-core system. Then past this point only the duty cycle increases from 10 to 90%. This results in a very visible activity reporting allowing one to immediately tell whether a machine is under load or not, making it quite suitable to be used in clusters. Signed-off-by: Willy Tarreau Signed-off-by: Jacek Anaszewski drivers/leds/trigger/Kconfig | 9 ++ drivers/leds/trigger/Makefile | 1 + drivers/leds/trigger/ledtrig-activity.c | 273 ++++++++++++++++++++++++++++++++ 3 files changed, 283 insertions(+) commit aaecaa0b5f31794f1711247da4b5883a6ff98163 Author: Joel Fernandes Date: Thu Oct 5 17:54:31 2017 -0700 tracing: Prepare to add preempt and irq trace events In preparation of adding irqsoff and preemptsoff enable and disable trace events, move required functions and code to make it easier to add these events in a later patch. This patch is just code movement and no functional change. Link: http://lkml.kernel.org/r/20171006005432.14244-2-joelaf@google.com Cc: Peter Zijlstra Cc: kernel-team@android.com Signed-off-by: Joel Fernandes Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_irqsoff.c | 100 ++++++++++++++++++++++++++++++++----------- 1 file changed, 74 insertions(+), 26 deletions(-) commit 2f733d6194bd58b26b705698f96b0f0bd9225369 Author: Eric Anholt Date: Wed Sep 27 12:36:54 2017 -0700 drm/panel: Add support for the Raspberry Pi 7" Touchscreen. This driver communicates with the Atmel microcontroller for sequencing the poweron of the TC358762 DSI-DPI bridge and controlling the backlight PWM. v2: Set the same default orientation as the closed source firmware used, which is the best for viewing angle. v3: Rewrite as an i2c client driver after bridge driver rejection. v4: Finish probe without the DSI host, using the new delayed registration, and attach to the host during mipi_dsi_driver probe. v5: Rework to drop the "probe without DSI host" mode again, now that vc4 will create the host early on. v6: Drop unused brightness #define (noticed by Thierry) Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20170927193654.12609-4-eric@anholt.net Reviewed-by: Archit Taneja Acked-by: Thierry Reding drivers/gpu/drm/panel/Kconfig | 8 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-raspberrypi-touchscreen.c | 514 +++++++++++++++++++++ 3 files changed, 523 insertions(+) commit 407b0b1e0ea3be171c324dd5a717ec52391faaab Author: Eric Anholt Date: Wed Sep 27 12:36:53 2017 -0700 dt-bindings: Document the Raspberry Pi Touchscreen nodes. This doesn't yet cover input, but the driver does get the display working when the firmware is disabled from talking to our I2C lines. Signed-off-by: Eric Anholt Acked-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20170927193654.12609-3-eric@anholt.net .../panel/raspberrypi,7inch-touchscreen.txt | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 4078def82f352cf5007691635da290a109511bc5 Author: Tim Hansen Date: Fri Oct 6 14:45:13 2017 -0400 block/bio: Remove null checks before mempool_destroy in bioset_free This patch removes redundant checks for null values on bio_pool and bvec_pool. Found using make coccicheck M=block/ on linux-net tree on the next-20170929 tag. Signed-off-by: Tim Hansen Signed-off-by: Jens Axboe block/bio.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 4b14a5c5d57f4fd6929db3427ba4d7c3775b4680 Author: Tim Hansen Date: Thu Oct 5 14:09:20 2017 -0400 block: remove unnecessary NULL checks in bioset_integrity_free() mempool_destroy() already checks for a NULL value being passed in, this eliminates duplicate checks. This was caught by running make coccicheck M=block/ on linus' tree on commit 77ede3a014a32746002f7889211f0cecf4803163 (current head as of this patch). Reviewed-by: Kyle Fortin Acked-by: Martin K. Petersen Signed-off-by: Tim Hansen Signed-off-by: Jens Axboe block/bio-integrity.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit b49ef29d72bd2975b8b2cc84b1fa6b40aa2edd5f Author: Marcel Holtmann Date: Fri Oct 6 20:42:45 2017 +0200 Bluetooth: Fix compiler warning with selftest duration calculation CC net/bluetooth/selftest.o net/bluetooth/selftest.c: In function ‘bt_selftest_init’: net/bluetooth/selftest.c:246:3: warning: ‘duration’ may be used uninitialized in this function [-Wmaybe-uninitialized] snprintf(test_ecdh_buffer, sizeof(test_ecdh_buffer), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "PASS (%llu usecs)\n", duration); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ net/bluetooth/selftest.c:203:21: note: ‘duration’ was declared here unsigned long long duration; ^~~~~~~~ Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg net/bluetooth/selftest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 878e832ade6fc315e6ea59d95824bbb0430c6e8d Author: Al Viro Date: Fri Oct 6 11:19:24 2017 -0400 acct.h: get rid of detritus unused forward declarations of structs Signed-off-by: Al Viro include/linux/acct.h | 3 --- 1 file changed, 3 deletions(-) commit 0435605289298a7311f78d02eb6a015cae7dbaf7 Author: Kees Cook Date: Wed Oct 4 17:54:29 2017 -0700 Bluetooth: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. As already done in hci_qca, add struct hci_uart pointer to priv structure. Signed-off-by: Kees Cook Signed-off-by: Marcel Holtmann drivers/bluetooth/bluecard_cs.c | 7 +++---- drivers/bluetooth/hci_bcsp.c | 10 ++++++---- drivers/bluetooth/hci_h5.c | 10 ++++++---- drivers/bluetooth/hci_qca.c | 17 ++++++++--------- 4 files changed, 23 insertions(+), 21 deletions(-) commit 8a92056837fd5168fce730c5e21eaf3af7cf0b16 Author: Hans de Goede Date: Wed Oct 4 20:43:43 2017 +0200 Bluetooth: hci_bcm: Add (runtime)pm support to the serdev driver Make the serdev driver use struct bcm_device as its driver data and share all the pm / GPIO / IRQ related code paths with the platform driver. After this commit the 2 drivers are in essence the same and the serdev driver interface can be used for all ACPI enumerated HCI UARTs. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 118 +++++++++++++++++++++++++------------------- 1 file changed, 68 insertions(+), 50 deletions(-) commit 78277d73714a1381a80d96de68074c9503b2c014 Author: Hans de Goede Date: Wed Oct 4 20:43:42 2017 +0200 Bluetooth: hci_bcm: Make suspend/resume functions platform_dev independent Use dev_get_drvdata instead of platform_get_drvdata in the suspend / resume functions. This is a preparation patch for adding (runtime)pm support to the serdev path. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9d54fd6a90ff1a85b66873e67004cfe61563408a Author: Hans de Goede Date: Wed Oct 4 20:43:41 2017 +0200 Bluetooth: hci_bcm: Make acpi_probe get irq from ACPI resources The ACPI subsys is going to move over to instantiating ACPI enumerated HCIs as serdevs, rather then as platform devices. So we need to make bcm_acpi_probe() suitable for use on non platform- devices too, which means that we cannot rely on platform_get_irq() getting called. This commit modifies bcm_acpi_probe() to directly get the irq from the ACPI resources, this is a preparation patch for adding (runtime)pm support to the serdev path. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 42ef18f09f593e6dd84777948a5e8189502cba0c Author: Hans de Goede Date: Wed Oct 4 20:43:40 2017 +0200 Bluetooth: hci_bcm: Rename bcm_platform_probe to bcm_get_resources After our previous changes, there is nothing platform specific about bcm_platform_probe anymore, rename it to bcm_get_resources. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c0d3ce580b7c8f0b7c14306f7d8654a4f30a665d Author: Hans de Goede Date: Wed Oct 4 20:43:39 2017 +0200 Bluetooth: hci_bcm: Store device pointer instead of platform_device pointer The ACPI subsys is going to move over to instantiating ACPI enumerated HCIs as serdevs, rather then as platform devices. This means that the serdev driver paths of hci_bcm.c also need to start supporting (runtime)pm through GPIOs and a host-wake IRQ. The hci_bcm code is already mostly independent of how the HCI gets instantiated, but even though the code only cares about pdev->dev, it was storing pdev itself in struct bcm_device. This commit stores pdev->dev rather then pdev in struct bcm_device, this is a preparation patch for adding (runtime)pm support to the serdev path. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 73 ++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 38 deletions(-) commit 4a56f891efceee88d422af2e99d00c8321c671c1 Author: Hans de Goede Date: Wed Oct 4 20:43:38 2017 +0200 Bluetooth: hci_bcm: Move platform_get_irq call to bcm_probe The ACPI subsys is going to move over to instantiating ACPI enumerated HCIs as serdevs, rather then as platform devices. Most of the code in bcm_platform_probe is actually not platform specific and will work with any struct device passed to it, the one platform specific call in bcm_platform_probe is platform_get_irq. This commit moves platform_get_irq call to the platform-driver's bcm_probe function, this is a preparation patch for adding (runtime)pm support to the serdev path. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 201762e21f308ec23bebe8bc0c4c033afb2879d5 Author: Hans de Goede Date: Wed Oct 4 20:43:37 2017 +0200 Bluetooth: hci_bcm: Move bcm_platform_probe call out of bcm_acpi_probe Since bcm_acpi_probe calls bcm_platform_probe, bcm_probe always ends up calling bcm_platform_probe. This commit simplifies things by making bcm_probe always call bcm_platform_probe itself. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 227630cccdbb8f8a1b24ac26517b75079c9a69c9 Author: Hans de Goede Date: Wed Oct 4 20:43:36 2017 +0200 Bluetooth: hci_bcm: Fix setting of irq trigger type This commit fixes 2 issues with host-wake irq trigger type handling in hci_bcm: 1) bcm_setup_sleep sets sleep_params.host_wake_active based on bcm_device.irq_polarity, but bcm_request_irq was always requesting IRQF_TRIGGER_RISING as trigger type independent of irq_polarity. This was a problem when the irq is described as a GpioInt rather then an Interrupt in the DSDT as for GpioInt-s the value passed to request_irq is honored. This commit fixes this by requesting the correct trigger type depending on bcm_device.irq_polarity. 2) bcm_device.irq_polarity was used to directly store an ACPI polarity value (ACPI_ACTIVE_*). This is undesirable because hci_bcm is also used with device-tree and checking for something like ACPI_ACTIVE_LOW in a non ACPI specific function like bcm_request_irq feels wrong. This commit fixes this by renaming irq_polarity to irq_active_low and changing its type to a bool. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_bcm.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit 7841d554809b518a22349e7e39b6b63f8a48d0fb Author: Hans de Goede Date: Wed Oct 4 20:43:35 2017 +0200 Bluetooth: hci_uart_set_flow_control: Fix NULL deref when using serdev Fix a NULL pointer deref (hu->tty) when calling hci_uart_set_flow_control on hci_uart-s using serdev. Signed-off-by: Hans de Goede Signed-off-by: Marcel Holtmann drivers/bluetooth/hci_ldisc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c0153b0b901a16663ff91504fea25fb51d57cc29 Author: Tudor Ambarus Date: Thu Sep 28 17:14:55 2017 +0300 Bluetooth: let the crypto subsystem generate the ecc privkey That Bluetooth SMP knows about the private key is pointless, since the detection of debug key usage is actually via the public key portion. With this patch, the Bluetooth SMP will stop keeping a copy of the ecdh private key and will let the crypto subsystem to generate and handle the ecdh private key, potentially benefiting of hardware ecc private key generation and retention. The loop that tries to generate a correct private key is now removed and we trust the crypto subsystem to generate a correct private key. This backup logic should be done in crypto, if really needed. Signed-off-by: Tudor Ambarus Signed-off-by: Marcel Holtmann net/bluetooth/ecdh_helper.c | 186 ++++++++++++++++++++++++-------------------- net/bluetooth/ecdh_helper.h | 9 ++- net/bluetooth/selftest.c | 14 +++- net/bluetooth/smp.c | 66 +++++++--------- 4 files changed, 147 insertions(+), 128 deletions(-) commit 168ed65483a1777c2570f4c0a4a64e20a823cf25 Author: Tudor Ambarus Date: Thu Sep 28 17:14:54 2017 +0300 Bluetooth: ecdh_helper - fix leak of private key tmp buffer contains the swapped private key. In case the setkey call failed, the tmp buffer was freed without clearing the private key. Zeroize the temporary buffer so we don't leak the private key. Signed-off-by: Tudor Ambarus Signed-off-by: Marcel Holtmann net/bluetooth/ecdh_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3814baf3f2473226e479fc1f4f48d01de2ce0a7b Author: Tudor Ambarus Date: Thu Sep 28 17:14:53 2017 +0300 Bluetooth: selftest - check for errors when computing ZZ Signed-off-by: Tudor Ambarus Signed-off-by: Marcel Holtmann net/bluetooth/selftest.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit a297641610963bbb238ea77b32a2e958c4f7b184 Author: Tudor Ambarus Date: Thu Sep 28 17:14:52 2017 +0300 Bluetooth: ecdh_helper - reveal error codes ecdh_helper functions were hiding the error codes and chose to return the return value of an relational operator, "==". Remove the unnecessary query and reveal the error codes. While updating the return values, code in a way that compilers will warn in case of uninitialized err. Signed-off-by: Tudor Ambarus Signed-off-by: Marcel Holtmann net/bluetooth/ecdh_helper.c | 32 +++++++++++++++++++------------- net/bluetooth/ecdh_helper.h | 8 ++++---- net/bluetooth/smp.c | 17 ++++++++++------- 3 files changed, 33 insertions(+), 24 deletions(-) commit 47eb2ac809189e0a60ad78eec6db9e84004e11be Author: Tudor Ambarus Date: Thu Sep 28 17:14:51 2017 +0300 Bluetooth: move ecdh allocation outside of ecdh_helper Before this change, a new crypto tfm was allocated, each time, for both key generation and shared secret computation. Allocate a single tfm for both cases. Signed-off-by: Tudor Ambarus Signed-off-by: Marcel Holtmann net/bluetooth/ecdh_helper.c | 32 ++++----------------- net/bluetooth/ecdh_helper.h | 8 ++++-- net/bluetooth/selftest.c | 29 +++++++++++++------ net/bluetooth/smp.c | 68 ++++++++++++++++++++++++++++++++++++--------- 4 files changed, 87 insertions(+), 50 deletions(-) commit 24a3a32a99ca9dcd8b2cdbaf5c99e6d99878cdb0 Author: Arvind Yadav Date: Mon Sep 25 13:07:39 2017 +0530 Bluetooth: btmrvl: *_err() and *_info() strings should end with newlines pr_err(), dev_err() and pr_info() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav Signed-off-by: Marcel Holtmann drivers/bluetooth/btmrvl_sdio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 753f5d91d35b4d709505b73e640e64448857be37 Author: Arnd Bergmann Date: Tue Sep 12 12:16:24 2017 +0200 ieee802154: fix gcc-4.9 warnings All older compiler versions up to gcc-4.9 produce these harmless warnings: drivers/net/ieee802154/ca8210.c: In function 'ca8210_skb_tx': drivers/net/ieee802154/ca8210.c:1947:9: warning: missing braces around initializer [-Wmissing-braces] This changes the syntax to something that works on all versions without warnings. Fixes: ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver") Signed-off-by: Arnd Bergmann Acked-by: Stefan Schmidt Signed-off-by: Marcel Holtmann drivers/net/ieee802154/ca8210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 766154b7d47b092605171df8930b864efc8ef5c8 Author: Loic Poulain Date: Fri Sep 8 15:57:55 2017 +0200 Bluetooth: btqcomsmd: retrieve BD address from DT property Retrieve BD address from the local-bd-address property. This address must be unique and is usually added in the DT by the bootloader which has access to the provisioned data. Signed-off-by: Loic Poulain Signed-off-by: Marcel Holtmann drivers/bluetooth/btqcomsmd.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit e7868a2f71bd9f81494f0c90a64e4dd454248850 Author: Loic Poulain Date: Fri Sep 8 15:57:54 2017 +0200 dt-bindings: soc: qcom: Add local-bd-address property to WCNSS-BT Add optional local-bd-address property which is a 6-byte array storing the assigned BD address. Since having a unique BD address is critical, a per-device property value should be allocated. This property is usually added by the boot loader which has access to the provisioned data. Signed-off-by: Loic Poulain Signed-off-by: Marcel Holtmann Documentation/devicetree/bindings/soc/qcom/qcom,wcnss.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit 28517c02e1dd8fef7a0eab5e9f18013a0e297aba Author: Loic Poulain Date: Fri Sep 8 15:57:53 2017 +0200 dt-bindings: net: document Bluetooth bindings in one place In the same way as Ethernet, gather the Bluetooth related bindings in one file. Introduce the bluetooth-bd-address property which can be used to store the assigned BD address. Signed-off-by: Loic Poulain Signed-off-by: Marcel Holtmann Documentation/devicetree/bindings/net/bluetooth.txt | 5 +++++ 1 file changed, 5 insertions(+) commit 6e518111060c2290427d79c43d4add9600ad852b Author: Loic Poulain Date: Tue Sep 5 12:26:03 2017 +0200 Bluetooth: btqcomsmd: Add support for BD address setup This patch implements the hdev setup function since wcnss-bt does not have persistent memory to store an allocated BD address. The device is therefore marked as unconfigured if no BD address has been previously retrieved. Signed-off-by: Loic Poulain Signed-off-by: Marcel Holtmann Cc: stable@vger.kernel.org drivers/bluetooth/btqcomsmd.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit 8d550824c6f52506754f11cb6be51aa153cc580d Author: Chris Wilson Date: Fri Oct 6 12:56:17 2017 +0100 drm/i915: Order two completing nop_submit_request If two nop's (requests in-flight following a wedged device) complete at the same time, the global_seqno value written to the HWSP is undefined as the two threads are not serialized. v2: Use irqsafe spinlock. We expect the callback may be called from inside another irq spinlock, so we can't unconditionally restore irqs. Fixes: ce1135c7de64 ("drm/i915: Complete requests in nop_submit_request") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20171006115617.18432-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4bc4e64c2cfdafa6b8ecdcc5edf10cc1a147587f Merge: d2746fe 706cc9f Author: David S. Miller Date: Fri Oct 6 10:12:52 2017 -0700 Merge tag 'batadv-next-for-davem-20171006' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - Cleanup patches to make checkpatch happy, by Sven Eckelmann (3 patches) ==================== Signed-off-by: David S. Miller commit 8ee5702afdd48b5864c46418ad310d6a23c8e9ab Author: Dave Airlie Date: Tue Oct 3 12:39:02 2017 +1000 amdgpu/dc: use kref for dc_state. I'm not a huge fan of those copying around refcounts bits, might want to consider alternates, but this should work for now. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 26 +++++++++++------------ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++-- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) commit cb56aceabd36ef42bc7e081c43dc55ef57efba7a Author: Dave Airlie Date: Tue Oct 3 12:39:01 2017 +1000 amdgpu/dc: convert dc_sink to kref. Refcounts use krefs. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 20 ++++++++++---------- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) commit bfe0feb143151cce76411bb211c3eec0f6cff7ba Author: Dave Airlie Date: Tue Oct 3 12:39:00 2017 +1000 amdgpu/dc: convert dc_stream_state to kref. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 22 +++++++++++----------- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) commit 4d090f0fae08ddaccf8caaf707f386d52b7f7a08 Author: Dave Airlie Date: Tue Oct 3 12:38:59 2017 +1000 amdgpu/dc: use kref for dc_plane_state. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 20 ++++++++++---------- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) commit 5c58ab0bd61b5c8538721f4200475c0af0e33efe Author: Dave Airlie Date: Tue Oct 3 12:38:58 2017 +1000 amdgpu/dc: convert dc_gamma to kref reference counting. Rolling your own reference counting is frowned upon. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 19 +++++++++---------- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 4 +--- 2 files changed, 10 insertions(+), 13 deletions(-) commit 93052132568aedb5eda04deae51d6034738a4800 Author: Dave Airlie Date: Tue Oct 3 12:38:57 2017 +1000 amdgpu/dc: convert dc_transfer to use a kref. Rolling your own atomic ref counts is frowned upon. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 17 +++++++++-------- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/os_types.h | 2 ++ 3 files changed, 12 insertions(+), 9 deletions(-) commit 5d15ae23f8a42ce6728294808b6bd96c6b251a5f Author: Dave Airlie Date: Tue Oct 3 15:11:02 2017 +1000 amdgpu/dc: kill a bunch of dead code. None of this code is used currently. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 101 -------------------------- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 15 ---- drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 34 --------- 3 files changed, 150 deletions(-) commit 44858055bb28b1ba45dc05acecf9087bc4786701 Author: Dave Airlie Date: Tue Oct 3 15:11:01 2017 +1000 amdgpu/dc: set a bunch of functions to static. All of these are unused outside the file they are in. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 2 +- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 3 +-- drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 6 +++--- 8 files changed, 10 insertions(+), 11 deletions(-) commit c6fa531809f08af52406347e5351920cc2d55e42 Author: Dave Airlie Date: Tue Oct 3 15:11:00 2017 +1000 amdgpu/dc: kill some deadcode in dc core. Moves one function to an inline, but kills a bunch of deadcode. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 91 -------------------------------- drivers/gpu/drm/amd/display/dc/dc.h | 9 ++-- 2 files changed, 4 insertions(+), 96 deletions(-) commit c1199962f58528d6530db055b576cfaf5340b427 Author: Dave Airlie Date: Tue Oct 3 15:10:59 2017 +1000 amdgpu/dc: fix indentation on a couple of returns. These were misaligned. found by the cocci ifcol script. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d2746fe5380e9af79807994756672baaf42cb130 Author: Bjorn Helgaas Date: Fri Oct 6 06:00:30 2017 -0500 bnx2x: Use pci_ari_enabled() instead of local copy Use pci_ari_enabled() from the PCI core instead of the identical local copy bnx2x_ari_enabled(). No functional change intended. Signed-off-by: Bjorn Helgaas Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit ae3a27d19b59e431aea9f9d5917c1aec710ae4c3 Author: Dave Airlie Date: Tue Oct 3 14:27:15 2017 +1000 amdgpu/dm: don't use after free. This dereference acrtc after freeing it. Found by the kfree cocci script. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 1 file changed, 1 deletion(-) commit d029810caafa4e6b146274560154e3f0f0381fb5 Author: Dave Airlie Date: Tue Oct 3 14:27:14 2017 +1000 amdgpu/dc: kfree already checks for NULL. Don't bother checking for it. Found with the cocci ifnullfree.cocci script. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/vector.c | 3 +-- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 7 ++----- drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 7 ++----- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 +-- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 11 +++-------- 5 files changed, 9 insertions(+), 22 deletions(-) commit 5667ff5c117f2d8735f27a267bc68a0811c55075 Author: Dave Airlie Date: Tue Oct 3 14:27:13 2017 +1000 amdgpu/dc: fix a bunch of misc whitespace. This just aligns a few things with kernel style. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 8 ++-- drivers/gpu/drm/amd/display/dc/dc_types.h | 16 ++++---- .../display/dc/dce110/dce110_timing_generator.c | 4 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 16 ++++---- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 46 +++++++++++----------- .../amd/display/include/grph_object_ctrl_defs.h | 20 +++++----- 6 files changed, 55 insertions(+), 55 deletions(-) commit 399e3514e10ef1a611aebe0563d52d6ebca1cecc Merge: c6a1575 c4eb7f4 Author: David S. Miller Date: Fri Oct 6 10:04:36 2017 -0700 Merge branch 'xdp_monitor-improve' Jesper Dangaard Brouer says: ==================== Improve xdp_monitor samples/bpf Here are some improvements to the xdp_monitor tool currently located under samples/bpf/. Once the tools library libbpf become more feature complete, xdp_monitor should be converted to use it, and be moved into tools/bpf/xdp/ or tools/xdp/. ==================== Signed-off-by: David S. Miller commit c4eb7f4643ce3741e63b7d3f9b70bb7a637e738a Author: Jesper Dangaard Brouer Date: Fri Oct 6 10:41:51 2017 +0200 samples/bpf: xdp_monitor increase memory rlimit Other concurrent running programs, like perf or the XDP program what needed to be monitored, might take up part of the max locked memory limit. Thus, the xdp_monitor tool have to set the RLIMIT_MEMLOCK to RLIM_INFINITY, as it cannot determine a more sane limit. Using the man exit(3) specified EXIT_FAILURE return exit code, and correct other users too. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller samples/bpf/xdp_monitor_user.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 280b058d4801cb431477dc101a776e4b24995f2f Author: Jesper Dangaard Brouer Date: Fri Oct 6 10:41:46 2017 +0200 samples/bpf: xdp_monitor also record xdp_exception tracepoint Also monitor the tracepoint xdp_exception. This tracepoint is usually invoked by the drivers. Programs themselves can activate this by returning XDP_ABORTED, which will drop the packet but also trigger the tracepoint. This is useful for distinguishing intentional (XDP_DROP) vs. ebpf-program error cases that cased a drop (XDP_ABORTED). Drivers also use this tracepoint for reporting on XDP actions that are unknown to the specific driver. This can help the user to detect if a driver e.g. doesn't implement XDP_REDIRECT yet. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller samples/bpf/xdp_monitor_kern.c | 38 ++++++++++++++- samples/bpf/xdp_monitor_user.c | 108 ++++++++++++++++++++++++++++++++--------- 2 files changed, 121 insertions(+), 25 deletions(-) commit f4ce0a0116bc90803adac10865f14429313cb2b6 Author: Jesper Dangaard Brouer Date: Fri Oct 6 10:41:41 2017 +0200 samples/bpf: xdp_monitor first 8 bytes are not accessible by bpf The first 8 bytes of the tracepoint context struct are not accessible by the bpf code. This is a choice that dates back to the original inclusion of this code. See explaination in: commit 98b5c2c65c29 ("perf, bpf: allow bpf programs attach to tracepoints") Signed-off-by: Jesper Dangaard Brouer Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller samples/bpf/xdp_monitor_kern.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 320671f94ada80ff036cc9d5dcd730ba4f3e0f1a Author: Chris Wilson Date: Mon Oct 2 11:04:16 2017 +0100 drm/i915: Silence compiler warning for hsw_power_well_enable() Not all compilers are able to determine that pg is guarded by wait_fuses and so may think that pg is used uninitialized. Reported-by: Geert Uytterhoeven Fixes: b2891eb2531e ("drm/i915/hsw+: Add has_fuses power well attribute") Signed-off-by: Chris Wilson Cc: Imre Deak Cc: Arkadiusz Hiler Link: https://patchwork.freedesktop.org/patch/msgid/20171002100416.25865-1-chris@chris-wilson.co.uk Reviewed-by: Imre Deak drivers/gpu/drm/i915/intel_runtime_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2016b641f421ecb28c21e34063ac8bd43ca6cfdc Author: Dave Airlie Date: Tue Oct 3 13:49:44 2017 +1000 amdgpu/dc: drop hw_sequencer_types.h This isn't used or required. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../display/dc/dce110/dce110_timing_generator.h | 1 - .../display/dc/dce120/dce120_timing_generator.h | 1 - drivers/gpu/drm/amd/display/dc/inc/core_types.h | 1 - .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 1 - .../drm/amd/display/include/hw_sequencer_types.h | 33 ---------------------- 5 files changed, 37 deletions(-) commit bd42a6f45180b3bd2bfe260959f53344f2636e71 Author: Dave Airlie Date: Tue Oct 3 13:49:43 2017 +1000 amdgpu/dc: drop dce110_types.h Doesn't appear to be used. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce110/dce110_types.h | 30 ---------------------- 1 file changed, 30 deletions(-) commit 23d433fabef852e82053186b60710d138f727284 Author: Dave Airlie Date: Tue Oct 3 13:49:42 2017 +1000 amdgpu/dc: use kernel ilog2 for log_2. This should produce the same result. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/conversion.c | 10 ---------- drivers/gpu/drm/amd/display/dc/basics/conversion.h | 5 ++++- 2 files changed, 4 insertions(+), 11 deletions(-) commit 4ee67c71b89948289eb5c55f1a19281be61178e5 Author: Dave Airlie Date: Tue Oct 3 12:37:33 2017 +1000 amdgpu/dc: don't memset after kzalloc. We allocate this struct zeroed, so don't need to memset in the constructor. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 2 -- 1 file changed, 2 deletions(-) commit 48aa3ddfd535a8e80b1b46da8a13920d9de8e5c5 Author: Dave Airlie Date: Tue Oct 3 12:36:54 2017 +1000 amdgpu/dc: inline dal grph object id functions. This is worth 400 bytes. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/basics/grph_object_id.c | 61 +----------------- .../gpu/drm/amd/display/include/grph_object_id.h | 72 +++++++++++++++++----- 2 files changed, 56 insertions(+), 77 deletions(-) commit c6a157525be5b6cab48b4c86e7473712e3656c36 Merge: 4e64b1e f8b7b0a Author: David S. Miller Date: Fri Oct 6 09:56:36 2017 -0700 Merge branch 'nfp-extend-match-and-action' Simon Horman says: ==================== nfp: extend match and action for flower offload Pieter says: This series extends flower offload match and action capabilities. It specifically adds offload capabilities for matching on MPLS, TTL, TOS and flow label. Furthermore offload capabilities for action have been expanded to include set ethernet, ipv4, ipv6, tcp and udp headers. ==================== Signed-off-by: David S. Miller commit f8b7b0a6b113eea5b528e51a2086e6f93f4e4933 Author: Pieter Jansen van Vuuren Date: Fri Oct 6 10:21:26 2017 +0200 nfp: add set tcp and udp header action flower offload Previously we did not have offloading support for set TCP/UDP actions. This patch enables TC flower offload of set TCP/UDP sport and dport actions. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/action.c | 42 ++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 9 +++++ 2 files changed, 51 insertions(+) commit 354b82bb320e04547e4755d2cc2ebab87a6d8abe Author: Pieter Jansen van Vuuren Date: Fri Oct 6 10:21:25 2017 +0200 nfp: add set ipv6 source and destination address Previously we did not have offloading support for set IPv6 actions. This patch enables TC flower offload of set IPv6 src and dst address actions. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/action.c | 72 ++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 11 ++++ 2 files changed, 83 insertions(+) commit c0b1bd9a8b8ac81e4e0985aad4a8de869ab6a668 Author: Pieter Jansen van Vuuren Date: Fri Oct 6 10:21:24 2017 +0200 nfp: add set ipv4 header action flower offload Previously we did not have offloading support for set IPv4 actions. This patch enables TC flower offload of set IPv4 src and dst address actions. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/action.c | 46 ++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 10 +++++ 2 files changed, 56 insertions(+) commit da83d8fe5889822691384d2b3edf1716fb6debdb Author: Pieter Jansen van Vuuren Date: Fri Oct 6 10:21:23 2017 +0200 nfp: add set ethernet header action flower offload Previously we did not have offloading support for set ethernet actions. This patch enables TC flower offload of set ethernet actions. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/action.c | 85 ++++++++++++++++++++++ drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 8 ++ 2 files changed, 93 insertions(+) commit fc53b4a7014aab8c260c2b81ae6c24687dff3045 Author: Pieter Jansen van Vuuren Date: Fri Oct 6 10:21:22 2017 +0200 nfp: add IPv6 ttl and tos match offloading support Previously matching on IPv6 ttl and tos fields were not offloaded. This patch enables offloading IPv6 ttl and tos as match fields. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/match.c | 11 ++++++++++- drivers/net/ethernet/netronome/nfp/flower/offload.c | 10 ---------- 2 files changed, 10 insertions(+), 11 deletions(-) commit a1e9203cc6e5247f6e7af897252ca92cdf5edb70 Author: Pieter Jansen van Vuuren Date: Fri Oct 6 10:21:21 2017 +0200 nfp: add IPv4 ttl and tos match offloading support Previously matching on IPv4 ttl and tos fields were not offloaded. This patch enables offloading IPv4 ttl and tos as match fields. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/match.c | 11 ++++++++++- drivers/net/ethernet/netronome/nfp/flower/offload.c | 4 ---- 2 files changed, 10 insertions(+), 5 deletions(-) commit bb055c198d9b2ba7baf292a440c2d24fe87db494 Author: Pieter Jansen van Vuuren Date: Fri Oct 6 10:21:20 2017 +0200 nfp: add mpls match offloading support Previously MPLS match offloading was not supported. This patch enables MPLS match offloading support for label, bos and tc fields. Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Jakub Kicinski Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 5 +++++ drivers/net/ethernet/netronome/nfp/flower/match.c | 17 +++++++++++++++-- drivers/net/ethernet/netronome/nfp/flower/offload.c | 6 +----- 3 files changed, 21 insertions(+), 7 deletions(-) commit 4e64b1ed15e25b8dcc2819c6d43dab72eb0bea26 Author: Joe Perches Date: Thu Oct 5 23:46:14 2017 -0700 net/ipv6: Convert icmpv6_push_pending_frames to void commit cc71b7b07119 ("net/ipv6: remove unused err variable on icmpv6_push_pending_frames") exposed icmpv6_push_pending_frames return value not being used. Remove now unnecessary int err declarations and uses. Miscellanea: o Remove unnecessary goto and out: labels o Realign arguments Signed-off-by: Joe Perches Signed-off-by: David S. Miller include/net/ipv6.h | 4 ++-- net/ipv6/icmp.c | 43 ++++++++++++++++++------------------------- net/ipv6/ping.c | 5 ++--- 3 files changed, 22 insertions(+), 30 deletions(-) commit 7c26240e8a19240924b029215989f28995f16d8c Author: Chris Wilson Date: Fri Oct 6 11:40:38 2017 +0100 drm/i915: Try harder to finish the idle-worker If a worker requeues itself, it may switch to a different kworker pool, which flush_work() considers as complete. To be strict, we then need to keep flushing the work until it is no longer pending. References: https://bugs.freedesktop.org/show_bug.cgi?id=102456 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171006104038.22337-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 3 +-- drivers/gpu/drm/i915/i915_gem.c | 3 +-- drivers/gpu/drm/i915/i915_utils.h | 13 +++++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) commit bb8920f5bea53317c15d1c14f2704f2deaeb9ffd Author: Michal Wajdeczko Date: Fri Oct 6 13:08:44 2017 +0000 drm/i915: Fix pointer-to-int conversion Commit faf654864b25 ("drm/i915: Unify uC variable types to avoid flooding checkpatch.pl") breaks 32-bit kernel builds. Lets use cast helper to make compiler happy. v2: introduce ptr_to_u64 (Chris) Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006130844.49012-1-michal.wajdeczko@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_guc_submission.c | 4 ++-- drivers/gpu/drm/i915/i915_utils.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit b74f571f59a8a3dae998e3b95e0f88fac39bfef3 Author: Jacob Keller Date: Fri Sep 1 13:54:07 2017 -0700 i40e/i40evf: organize and re-number feature flags Now that we've reduced the number of flags, organize similar flags together and re-number them accordingly. Since we don't yet have more than 32 flags, we'll use a u32 for both the hw_features and flag field. Should we gain more flags in the future, we may need to convert to a u64 or separate flags out into two fields. One alternative approach considered, but not implemented here, was to use an enumeration for the flag variables, and create a macro I40E_FLAG() which used string concatenation to generate BIT_ULL values. This has the advantage of making the actual bit values compile-time dynamic so that we do not need to worry about matching the order to the bit value. However, this does produce a high level of code churn, and makes it more difficult to read a dumped flags value when debugging. Change-ID: I8653fff69453cd547d6fe98d29dfa9d8710387d1 Signed-off-by: Jacob Keller Reviewed-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 98 +++++++++++++------------- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 6 +- drivers/net/ethernet/intel/i40evf/i40evf.h | 32 ++++----- 3 files changed, 68 insertions(+), 68 deletions(-) commit a5340d933e3cd7829a24bacc156dd1e475a1ae2c Author: Jacob Keller Date: Tue Aug 29 05:32:42 2017 -0400 i40e: ignore skb->xmit_more when deciding to set RS bit Since commit 6a7fded776a7 ("i40e: Fix RS bit update in Tx path and disable force WB workaround") we've tried to "optimize" setting the RS bit based around skb->xmit_more. This same logic was refactored in commit 1dc8b538795f ("i40e: Reorder logic for coalescing RS bits"), but ultimately was not functionally changed. Using skb->xmit_more in this way is incorrect, because in certain circumstances we may see a large number of skbs in sequence with xmit_more set. This leads to a performance loss as the hardware does not writeback anything for those packets, which delays the time it takes for us to respond to the stack transmit requests. This significantly impacts UDP performance, especially when layered with multiple devices, such as bonding, VLANs, and vnet setups. This was not noticed until now because it is difficult to create a setup which reproduces the issue. It was discovered in a UDP_STREAM test in a VM, connected using a vnet device to a bridge, which is connected to a bonded pair of X710 ports in active-backup mode with a VLAN. These layered devices seem to compound the number of skbs transmitted at once by the qdisc. Additionally, the problem can be masked by reducing the ITR value. Since the original commit does not provide strong justification for this RS bit "optimization", revert to the previous behavior of setting the RS bit every 4th packet. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 34 ++++------------------------- 1 file changed, 4 insertions(+), 30 deletions(-) commit 0a3b4f702fb1f76b03530d58af9efc5e10392185 Author: Jacob Keller Date: Tue Aug 29 05:32:41 2017 -0400 i40evf: enable support for VF VLAN tag stripping control A recent commit 809481484e5d ("i40e/i40evf: support for VF VLAN tag stripping control") added support for VFs to negotiate the control of VLAN tag stripping. This should have allowed VFs to disable the feature. Unfortunately, the flag was set only in netdev->feature flags and not in netdev->hw_features. This ultimately causes the stack to assume that it cannot change the flag, so it was unchangeable and marked as [fixed] in the ethtool -k output. Fix this by setting the feature in hw_features first, just as we do for the PF code. This enables ethtool -K to disable the feature correctly, and fully enables user control of the VLAN tag stripping feature. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 052b93d0c2ecf693f13561b4b100d541ced41af0 Author: Mariusz Stachura Date: Tue Aug 29 05:32:40 2017 -0400 i40e: do not enter PHY debug mode while setting LEDs behaviour Previous implementation of LED set/get functions required to enter PHY debug mode, in order to prevent access to it from FW and SW at the same time. Reset of all ports was a unwanted side effect. Signed-off-by: Mariusz Stachura Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 19b7960b2da1db56ec3f8b478c70bab244feb644 Author: Alan Brady Date: Tue Aug 29 05:32:39 2017 -0400 i40e: implement split PCI error reset handler This patch implements the PCI error handler reset_prepare and reset_done. This allows us to handle function level reset. Without this patch we are unable to perform and recover from an FLR correctly and this will cause VFs to be unable to recover from an FLR on the PF. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 013df598d61161d356d5545f56422766ed3a3a38 Author: Filip Sadowski Date: Tue Aug 29 05:32:38 2017 -0400 i40e: Properly maintain flow director filters list When there is no space for more flow director filters and user requested to add a new one it is rejected by firmware and automatically removed from the filter list maintained by driver. This behaviour is correct. Afterwards existing filter can be removed making free slot for the new one. This however causes the newly added filter to be accepted by firmware but removed from driver filter list resulting in not showing after issuing 'ethtool -n '. This happened due to not clearing the variable pf->fd_inv which stores filter number to be removed from the list when firmware refused to add the requested filter. It caused the filter with this specific ID to be constantly removed once it was added to the list although it has been accepted by firmware and effectively applied to the NIC. It was fixed by clearing pf->fd_inv variable after removal of the filter from the list when it was rejected by firmware. Signed-off-by: Filip Sadowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 1 + 1 file changed, 1 insertion(+) commit 9a858178ef6dfee2b6e6ec65c42b65a129b4df02 Author: Filip Sadowski Date: Tue Aug 29 05:32:37 2017 -0400 i40e: Display error message if module does not meet thermal requirements This patch causes error message to be displayed when NIC detects insertion of module that does not meet thermal requirements. Signed-off-by: Filip Sadowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 1 + drivers/net/ethernet/intel/i40e/i40e_main.c | 24 +++++++++++++++++----- .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 1 + 4 files changed, 22 insertions(+), 5 deletions(-) commit 7f6618226360b4aa0230a49525c81bf47d1d53c8 Author: Alice Michael Date: Tue Aug 29 05:32:36 2017 -0400 i40e: fix merge error This patch removes some code that was accidentally added to the wrong function with a merge error. Fixes: c53934c6d1b1 ("i40e: fix: do not sleep in netdev_ops") Signed-off-by: Alice Michael Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 5 ----- 1 file changed, 5 deletions(-) commit bd6cd4e6dd38a35215d3f28f12db51213c9aead6 Author: Jesse Brandeburg Date: Tue Aug 29 05:32:35 2017 -0400 i40e/i40evf: use DECLARE_BITMAP for state When using set_bit and friends, we should be using actual bitmaps, and fix all the locations where we might access it. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 8 ++++---- drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++-- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 3 ++- drivers/net/ethernet/intel/i40evf/i40e_txrx.h | 3 ++- 4 files changed, 10 insertions(+), 8 deletions(-) commit 0a0d9af5bc0b2130edaed9d9c57fc08bd338e3f5 Author: Mitch Williams Date: Tue Aug 29 05:32:34 2017 -0400 i40e: fix incorrect register definition This register was defined incorrectly. Fix the increment value to 8, and replace the iterator with _i to make the definition consistent with other statistics registers. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_register.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60518a048919a2781e3192981d2946149240b837 Author: Mitch Williams Date: Tue Aug 29 05:32:33 2017 -0400 i40e: redfine I40E_PHY_TYPE_MAX Since I40E_PHY_TYPE_MAX is used as an iterator, usually combined with some sort of bit-shifting, it should only include actual PHY types and not error cases. Move it up in the enum declaration so that loops only iterate across valid PHY types. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 2 +- drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c3d26b75c22b0487c452bd610338aa015eae517b Author: Alan Brady Date: Tue Aug 29 05:32:32 2017 -0400 i40e: re-enable PTP L4 capabilities for XL710 if FW >6.0 Starting with XL710 FW 5.3 PTP L4 was disabled for XL710 due to a bug. The bug has since been resolved in XL710 FW >6.0 and PTP L4 can now be re-enabled on those devices with updated firmware. 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, 5 insertions(+) commit be664cbefc50977aaefc868ba6a1109ec9b7449d Author: Jacob Keller Date: Tue Aug 29 05:32:31 2017 -0400 i40e/i40evf: spread CPU affinity hints across online CPUs only Currently, when setting up the IRQ for a q_vector, we set an affinity hint based on the v_idx of that q_vector. Meaning a loop iterates on v_idx, which is an incremental value, and the cpumask is created based on this value. This is a problem in systems with multiple logical CPUs per core (like in simultaneous multithreading (SMT) scenarios). If we disable some logical CPUs, by turning SMT off for example, we will end up with a sparse cpu_online_mask, i.e., only the first CPU in a core is online, and incremental filling in q_vector cpumask might lead to multiple offline CPUs being assigned to q_vectors. Example: if we have a system with 8 cores each one containing 8 logical CPUs (SMT == 8 in this case), we have 64 CPUs in total. But if SMT is disabled, only the 1st CPU in each core remains online, so the cpu_online_mask in this case would have only 8 bits set, in a sparse way. In general case, when SMT is off the cpu_online_mask has only C bits set: 0, 1*N, 2*N, ..., C*(N-1) where C == # of cores; N == # of logical CPUs per core. In our example, only bits 0, 8, 16, 24, 32, 40, 48, 56 would be set. Instead, we should only assign hints for CPUs which are online. Even better, the kernel already provides a function, cpumask_local_spread() which takes an index and returns a CPU, spreading the interrupts across local NUMA nodes first, and then remote ones if necessary. Since we generally have a 1:1 mapping between vectors and CPUs, there is no real advantage to spreading vectors to local CPUs first. In order to avoid mismatch of the default XPS hints, we'll pass -1 so that it spreads across all CPUs without regard to the node locality. Note that we don't need to change the q_vector->affinity_mask as this is initialized to cpu_possible_mask, until an actual affinity is set and then notified back to us. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 16 +++++++++++----- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 9 ++++++--- 2 files changed, 17 insertions(+), 8 deletions(-) commit 64615b5418bac1d3b3a50a83fb2e42091fe299fe Author: Mitch Williams Date: Tue Aug 29 05:32:30 2017 -0400 i40e: add private flag to control source pruning By default, our devices do source pruning, that is, they drop receive packets that have the source MAC matching one of the receive filters. Unfortunately, this breaks ARP monitoring in channel bonding, as the bonding driver expects devices to receive ARPs containing their own source address. Add an ethtool private flag to control this feature. Also, remove the netif_running() check when we process our private flags. It's OK to reset when the device is closed and in most cases we need the reset the apply these changes. Signed-off-by: Mitch Williams 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 | 7 +++++-- drivers/net/ethernet/intel/i40e/i40e_main.c | 25 +++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) commit ec2f25d203aaede93cef64198d93df698913101f Author: Rami Rosen Date: Sat Aug 19 00:20:31 2017 +0300 i40e: fix a typo in i40e_pf documentation This patch fixes a typo in i40e_pf object documentation; num_req_vfs refers to the number of VFs requested for the PF. Signed-off-by: Rami Rosen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ead92edbd67c5f51dda7ac90136fbd05464203b6 Author: Michal Wajdeczko Date: Fri Oct 6 09:02:09 2017 +0000 drm/i915/huc: Fix includes in intel_huc.c Fix includes order and make sure we only include required headers. While here, make intel_huc.h header self-contained. Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006090209.67852-1-michal.wajdeczko@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_huc.c | 6 ++++-- drivers/gpu/drm/i915/intel_huc.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) commit 775d3a35dc3e13de55ec0e061c59e36faa7dd7f0 Author: Jens Axboe Date: Fri Oct 6 08:15:15 2017 -0600 backing-dev: kill unused pdflush_proc_obsolete() After commit b35bd0d9f8a8, pdflush_proc_obsolete() is no longer used. Kill the function and declaration. Reported-by: Rakesh Pandit Signed-off-by: Jens Axboe include/linux/backing-dev.h | 2 -- mm/backing-dev.c | 20 -------------------- 2 files changed, 22 deletions(-) commit ec154bf56b276a0bb36079a5d22a267b5f417801 Author: Joerg Roedel Date: Fri Oct 6 15:00:53 2017 +0200 iommu/vt-d: Don't register bus-notifier under dmar_global_lock The notifier function will take the dmar_global_lock too, so lockdep complains about inverse locking order when the notifier is registered under the dmar_global_lock. Reported-by: Jan Kiszka Fixes: 59ce0515cdaf ('iommu/vt-d: Update DRHD/RMRR/ATSR device scope caches when PCI hotplug happens') Signed-off-by: Joerg Roedel drivers/iommu/dmar.c | 7 +++++-- drivers/iommu/intel-iommu.c | 10 ++++++++++ include/linux/dmar.h | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) commit c0374eb804a213ce6f55328c8b3511101d31a485 Author: Maciej Purski Date: Thu Oct 5 16:07:10 2017 +0200 drm/bridge: add Silicon Image SiI9234 driver SiI9234 transmitter converts eTMDS/HDMI signal to MHL 1.0. It is controlled via I2C bus. Its interaction with other devices in video pipeline is performed mainly on HW level. The only interaction it does on device driver level is filtering-out unsupported video modes, it exposes drm_bridge interface to perform this operation. This patch is based on the code refactored by Tomasz Stanislawski , which was initially developed by: Adam Hampson Erik Gilling Shankar Bandal Dharam Kumar Signed-off-by: Maciej Purski Acked-by: Rob Herring [for dt bindings] Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/1507212431-5801-2-git-send-email-m.purski@samsung.com .../devicetree/bindings/display/bridge/sii9234.txt | 49 + drivers/gpu/drm/bridge/Kconfig | 8 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/sii9234.c | 994 +++++++++++++++++++++ 4 files changed, 1052 insertions(+) commit f2abcfa6c86e503b352846ace9d6ab9b02ade0ab Author: Luca Coelho Date: Thu Sep 28 15:29:27 2017 +0300 iwlwifi: remove dflt_pwr_limit from the transport The default power limit read from the SPLC method in ACPI doesn't have anything to do with the transport and is only used in the opmode, so we can remove it from the trans. Additionally, this value is only user when the opmode is starting, so we don't need to store it anywhere. Remove the dflt_pwr_limit element from the trans and move call to iwl_acpi_get_pwr_limit() call to mvm. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 2 -- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 20 ++++++++++++-------- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 3 --- 3 files changed, 12 insertions(+), 13 deletions(-) commit 42fa5e0e323b2709079d81d90e9a142aa98cd3b3 Author: Johannes Berg Date: Tue Sep 26 16:37:12 2017 +0200 iwlwifi: mvm: warn on invalid statistics size Getting the wrong statistics size is a problem, having a warning will help us catch it quicker during firmware/driver development. In released firmware/driver versions, we obviously make sure this won't happen. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 1184611ee88f309fe4a6ca3d50bde762434e386e Author: Luca Coelho Date: Thu Sep 28 15:18:33 2017 +0300 iwlwifi: acpi: move code that reads SPLC to acpi Move most of the set_dflt_pwr_limit() function to acpi.c and make it return the pwr_limit value instead of setting directly. Also rename it to iwl_acpi_get_pwr_limit(). Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 27 +++++++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 7 +++++++ drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 25 ++----------------------- 3 files changed, 36 insertions(+), 23 deletions(-) commit e59a00f4884815a2887837b9d34e0ae59c41d3d3 Author: Johannes Berg Date: Thu Sep 28 12:59:00 2017 +0200 iwlwifi: fix indentation in a000 family configuration Fix the double indentation in the configuration structs for a000 family devices. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/cfg/a000.c | 100 +++++++++++++------------- 1 file changed, 50 insertions(+), 50 deletions(-) commit 45f65569e0d968c5fd1e8c3c6d8983b402caaa27 Author: Luca Coelho Date: Tue Sep 26 16:31:10 2017 +0300 iwlwifi: acpi: move function to get mcc into acpi code The iwl_get_bios_mcc() function was in the iwl-nvm-parse.c file, but it has nothing to do with the NVM. Move it to fw/acpi.c and rename it to iwl_acpi_get_mcc(). Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 34 ++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 15 ++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 34 ---------------------- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h | 10 ------- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 1 - drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 3 +- 6 files changed, 51 insertions(+), 46 deletions(-) commit d953cdb8ee1ba94f3e64751fe4740c82d09cffa8 Author: Luca Coelho Date: Tue Sep 26 16:13:23 2017 +0300 iwlwifi: acpi: remove a couple of unnecessary ifdefs Some of the #ifdef CONFIG_ACPI are not needed anymore, so they can be removed. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 -- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 6 ------ 2 files changed, 8 deletions(-) commit ed1a962db760bfb5e30b8ab284873767790119b9 Author: Luca Coelho Date: Tue Sep 26 15:33:56 2017 +0300 iwlwifi: acpi: make iwl_get_bios_mcc() use the common acpi functions The way iwl_get_bios_mcc() gets the WiFi package and checks for its integrity is almost identical to the new iwl_acpi_get_wifi_pkg() function. Instead of having duplicate code, convert it to use the common code. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 1 + drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 66 +++++++--------------- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h | 7 --- 3 files changed, 20 insertions(+), 54 deletions(-) commit 45a5c6f68b2649ccb71721b95be22720f04b2bc3 Author: Luca Coelho Date: Thu Sep 21 14:45:27 2017 +0300 iwlwifi: acpi: use iwl_acpi_get_wifi_pkg when reading reading SPLC Instead of finding the wifi package with its own code, we can reuse the new iwl_acpi_get_wifi_pkg() function when reading the default power limit from SPLC. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 2 + drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 61 +++++---------------------- 2 files changed, 12 insertions(+), 51 deletions(-) commit 2fa388cfeb1af9fa94acc7fd1b250fb863fb5d91 Author: Luca Coelho Date: Thu Sep 21 14:30:53 2017 +0300 iwlwifi: acpi: generalize iwl_mvm_sar_find_wifi_pkg() Move this function to acpi.c, renaming it to iwl_acpi_get_wifi_pkg(), because it can also be used with other methods (i.e. SPLC and WRDD). Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 52 ++++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 10 +++++ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 60 +++------------------------- 3 files changed, 68 insertions(+), 54 deletions(-) commit e7a3b8d87910bbd653908091242263c4e48d588f Author: Luca Coelho Date: Thu Sep 21 13:22:59 2017 +0300 iwlwifi: acpi: move ACPI-related definitions to acpi.h The ACPI table size definitions were spread around the different files that used them. Move them all to a common place. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 20 +++++++++---- drivers/net/wireless/intel/iwlwifi/fw/api/power.h | 3 +- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 36 ++++++++++++----------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 13 ++++---- 4 files changed, 40 insertions(+), 32 deletions(-) commit 1c73acf58bd63a5dcc38132cd3060efbeae4a9ef Author: Luca Coelho Date: Thu Sep 21 11:02:45 2017 +0300 iwlwifi: acpi: move ACPI method definitions to acpi.h Instead of defining each method where they are used and re-defining WIFI_DOMAIN in each one of them, move all the definitions to a central place and define the domain only a single time. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 15 +++++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 8 ++------ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 11 ----------- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 5 +---- 4 files changed, 18 insertions(+), 21 deletions(-) commit 813df5cef3bb119940998f2e70cb9016e4b434f7 Author: Luca Coelho Date: Tue Sep 19 12:35:18 2017 +0300 iwlwifi: acpi: add common code to read from ACPI There are many places where the same process of invoking a method from ACPI is used, causing a lot of duplicate code. To improve this, introduce a new function to get an ACPI object by invoking an ACPI method that can be reused. Additionally, since this function needs to be called when we only have the trans, the opmode or the device, introduce a new debug macro that gets the device as a parameter so it can be used in the new function. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/Makefile | 1 + drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 97 +++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 78 +++++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-debug.h | 1 + drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 37 ++------ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 105 ++++----------------- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 33 ++----- 7 files changed, 211 insertions(+), 141 deletions(-) commit 417795a3f4d634bb50dbffaf2ab9d7f46750b7e8 Author: Sara Sharon Date: Thu Sep 28 11:11:51 2017 +0300 iwlwifi: mvm: change warning to warn_once() In case there is a FW bug where the BAID value in the metadata is not properly initialized we hit the warning for every RX packet. Change it to warn once and add elaborate message. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a6d24fad00d98e28841b1f39965fda530df637df Author: Rajat Jain Date: Thu Aug 17 12:05:12 2017 -0700 iwlwifi: pcie: dump registers when HW becomes inaccessible We conclude the HW became inaccessible when we timeout waiting for a bit to be set in a memory mapped register (CSR_GP_CNTRL). This conclusion may not be true because the bit may not get set due to: - a firmware issue - a driver issue - a PCI bus issue - a platform issue There are a lot of such reports with really no good debug information beyond this message to help us. Add some debug information and attempt to dump the different register spaces at such a failure: * Dump some configuration space of device - this will tell us if something very basic is broken in the PCIe bus (so that configuration accesses are failing). If this works, the PCIe bus seems OK. If this does not work, it is definitely an PCIe issue. * Dump some memory mapped registers - if we're reading some sane'ish values, this will tell us that the PCIe bus is OK, but may be a firmware / driver issue. If this does not work, it may be a PCI configuration issue or a driver/firmware issue. * Dump parent and device's AER registers, will give us some straws to chew on. This is the sample output: [ 13.082651] ------------[ cut here ]------------ [ 13.086791] iwlwifi 0000:01:00.0: iwlwifi transaction failed, dumping registers [ 13.086793] iwlwifi 0000:01:00.0: iwlwifi device config registers: [ 13.086893] iwlwifi 0000:01:00.0: 00000000: 095a8086 00100406 02800059 00000000 00000004 00000000 00000000 00000000 [ 13.086895] iwlwifi 0000:01:00.0: 00000020: 00000000 00000000 00000000 50108086 00000000 000000c8 00000000 00000100 [ 13.086901] iwlwifi 0000:01:00.0: iwlwifi device memory mapped registers: [ 13.086989] iwlwifi 0000:01:00.0: 00000000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff [ 13.086991] iwlwifi 0000:01:00.0: 00000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff [ 13.086999] iwlwifi 0000:01:00.0: iwlwifi device AER capability structure: [ 13.087033] iwlwifi 0000:01:00.0: 00000000: 14010001 00100000 00000000 00462031 00002000 00002000 00000014 40000001 [ 13.087034] iwlwifi 0000:01:00.0: 00000020: 0000000f d140000c 00000000 [ 13.087036] iwlwifi 0000:01:00.0: iwlwifi parent port (0000:00:1c.0) config registers: [ 13.087074] iwlwifi 0000:00:1c.0: 00000000: 9d108086 00100506 060400f1 00810010 00000000 00000000 00010100 200000f0 [ 13.087075] iwlwifi 0000:00:1c.0: 00000020: d140d140 0001fff1 00000000 00000000 00000000 00000040 00000000 0006010b [ 13.087087] ------------[ cut here ]------------ [ 13.087095] WARNING: CPU: 0 PID: 1759 at drivers/net/wireless/iwl7000/iwlwifi/pcie/trans.c:2082 iwl_trans_pcie_reclaim+0x1ee4/0x2b9a [iwlwifi]() [ 13.087096] Timeout waiting for hardware access (CSR_GP_CNTRL 0xffffffff) Signed-off-by: Rajat Jain Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 1 + drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 89 ++++++++++++++++++++++ 2 files changed, 90 insertions(+) commit 1e37f79945b0b837a2d8c56560e18c7be61ea665 Author: Christoph Böhmwalder Date: Sat Sep 23 12:31:12 2017 +0200 iwlwifi: fix minor code style issues Fixes three trivial issues as reported by checkpatch.pl, namely two switch/case indentation issues and one alignment issue in a multiline comment. Signed-off-by: Christoph Böhmwalder Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5281f5181a3ba23ff9ee0fd8e9cbd7479d58baef Author: Mordechay Goodstein Date: Tue Sep 19 15:52:13 2017 +0000 iwlwifi: mvm: add marker cmd response struct. This helps for documentation and clarifies the code by defining the exact response struct for the marker command. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/api/commands.h | 1 + drivers/net/wireless/intel/iwlwifi/fw/api/debug.h | 9 +++++++++ 2 files changed, 10 insertions(+) commit aed52a88c09d486bb405373e6ad35b5f249093fb Author: Johannes Berg Date: Tue Sep 19 12:59:03 2017 +0200 iwlwifi: fw: api: remove excess enum value documentation These enum values don't exist, so remove their documentation as well. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/api/sta.h | 4 ---- 1 file changed, 4 deletions(-) commit 7a20bcceeddd7162801bb37d992c5a2bfd5ca3ce Author: Emmanuel Grumbach Date: Thu Sep 14 15:45:44 2017 +0300 iwlwifi: mvm: don't send identical PHY_CTXT_CMD When we have an AP which supports HT and a single HT station is connected, we change the min_width from NL80211_CHAN_WIDTH_20_NOHT to NL80211_CHAN_WIDTH_20. This of course has no implication on the channel width but still sends a command to the firmware. Remember the last width that was sent and refrain from sending unnecessary commands to the firmware. Sending a PHY_CTXT_CMD to the firmware has a cost since it recalculates the presence on the medium and because of that it closes the transmit queues for a short while. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 14 ++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c | 1 + 3 files changed, 17 insertions(+) commit a2ff48af65ad661a257987fa05973351c595002e Author: Chaya Rachel Ivgi Date: Wed Sep 13 15:12:16 2017 +0300 iwlwifi: remove redundant reading from NVM file The driver reads xtal_calib from NVM file, but actually never uses it. This is only used in dvm driver. Signed-off-by: Chaya Rachel Ivgi Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 7 ------- 1 file changed, 7 deletions(-) commit dd05f9aab4426ff178b12d601e50d19d336eba30 Author: Shahar S Matityahu Date: Sun Jul 30 17:33:48 2017 +0300 iwlwifi: pcie: dynamic Tx command queue size Devices in the A000 family can use a different size for the command queue. To allow this, make the command queue size configurable and set the size for A000 devices to 32. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/cfg/a000.c | 3 ++- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 3 +++ .../net/wireless/intel/iwlwifi/pcie/ctxt-info.c | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 3 +++ drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 8 ++++++-- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 23 ++++++++++++++++++++-- 6 files changed, 36 insertions(+), 6 deletions(-) commit b88beaf95a6253aa8a5a6424db26ecf8a1e0ea0a Author: Ilan Peer Date: Mon Sep 4 14:39:22 2017 +0300 iwlwifi: Add few debug prints to the WRT dump flow This would enable to better catch timing issues with cases that WRT dump takes too much time. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 528a542aa6654a9ec03830cc75142cc94276739e Author: Emmanuel Grumbach Date: Thu Aug 31 11:52:30 2017 +0300 iwlwifi: mvm: support firmware debug trigger on frame reorder timeout The trigger that collects data when a frame is released because of the timer of the reordering buffer was not implemented for 9000 devices. Fix this. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 28 ++--------------------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 6 +++++ drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 5 ++++ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 25 ++++++++++++++++++++ 5 files changed, 39 insertions(+), 26 deletions(-) commit d7b9bb69c9b3accbd199b51b28d95d08f37049cd Author: Emmanuel Grumbach Date: Thu Aug 31 12:57:33 2017 +0300 iwlwifi: mvm: remove support for Link Quality Measurements This was never used by any product. Remove it. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/fw/api/mac-cfg.h | 67 ------------------- .../net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 76 ---------------------- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 10 --- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 12 ---- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 - drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 71 -------------------- 6 files changed, 238 deletions(-) commit 72cbb73e8ad34b2d4409156546678763e91c71b6 Author: David Spinadel Date: Wed Aug 30 16:23:14 2017 +0300 iwlwifi: mvm: Add new quota command API New quota command adds a field indicating low latency direction per quota. A TLV API bit was added to indicate the new API. Signed-off-by: David Spinadel Signed-off-by: Luca Coelho .../net/wireless/intel/iwlwifi/fw/api/binding.h | 41 +++++++++++++-- drivers/net/wireless/intel/iwlwifi/fw/file.h | 3 ++ drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 16 +++--- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 27 ++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/quota.c | 59 +++++++++++++--------- 5 files changed, 113 insertions(+), 33 deletions(-) commit d048b36b9654c4e0cf0d3576be2d1ed2a3084c6f Author: Oren Givon Date: Thu Aug 31 13:15:09 2017 +0300 iwlwifi: add a new a000 device Add a new a000 device with PCI ID (0x2720, 0x0030). Signed-off-by: Oren Givon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 1 + 1 file changed, 1 insertion(+) commit f7f5873bbd45a67d3097dfb55237ade2ad520184 Author: Oren Givon Date: Mon Aug 28 10:33:38 2017 +0300 iwlwifi: fix wrong struct for a000 device The PCI ID (0x2720, 0x0070) was set with the config struct iwla000_2ax_cfg_hr instead of iwla000_2ac_cfg_hr_cdb. Fixes: 175b87c69253 ("iwlwifi: add the new a000_2ax series") Signed-off-by: Oren Givon Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d621d3c73391fc49c5bbbf823745f0165981119d Author: Luca Coelho Date: Wed Mar 30 22:09:34 2016 +0300 iwlwifi: trans: move ref/unref code to the common part of the transport De-inline iwl_trans_ref/unref and move it to common transport code in preparation for more common code to come to these functions. Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 16 ++++++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 14 ++------------ 2 files changed, 18 insertions(+), 12 deletions(-) commit 3669cd31927b8229096622e046bb0f6020328b2b Author: Liad Kaufman Date: Wed Aug 16 14:15:08 2017 +0300 iwlwifi: mvm: add dbgfs entry for fw info Add a dbgfs entry for an easy way during runtime to check what FW file was loaded, and get some general FW-related data. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit faf654864b25f4ca4efd416145d37b794c0b805f Author: Joonas Lahtinen Date: Fri Oct 6 11:49:40 2017 +0300 drm/i915: Unify uC variable types to avoid flooding checkpatch.pl With the code motion mostly done, convert all the uC code away from uint??_t at once (only a couple dozen variables), so that reading the checkpatch.pl output should actually pinpoint if a new uint??_t was accidentally introduced. v2: - Include intel_uc_fw.h too (Sagar) Signed-off-by: Joonas Lahtinen Cc: Michal Wajdeczko Cc: Chris Wilson Cc: Michał Winiarski Cc: Sagar Arun Kamble Cc: Anusha Srivatsa Cc: Sujaritha Sundaresan Reviewed-by: Sagar Arun Kamble Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20171006084940.15910-1-joonas.lahtinen@linux.intel.com drivers/gpu/drm/i915/i915_guc_submission.c | 10 +++---- drivers/gpu/drm/i915/i915_guc_submission.h | 8 ++--- drivers/gpu/drm/i915/intel_guc.h | 3 +- drivers/gpu/drm/i915/intel_guc_fwif.h | 48 +++++++++++++++--------------- drivers/gpu/drm/i915/intel_guc_log.c | 3 +- drivers/gpu/drm/i915/intel_guc_log.h | 2 +- drivers/gpu/drm/i915/intel_uc_fw.h | 20 ++++++------- 7 files changed, 48 insertions(+), 46 deletions(-) commit 822a4b673284672af697ccd66e8795f8a712a90d Author: Joonas Lahtinen Date: Fri Oct 6 13:45:59 2017 +0300 drm/i915: Don't use BIT() in UAPI section Lets not introduce BIT() macro requirement for UAPI for now. Fixes: 3fd3a6ffe279 ("drm/i915: Simplify i915_reg_read_ioctl") Signed-off-by: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171006104559.17312-1-joonas.lahtinen@linux.intel.com include/uapi/drm/i915_drm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5632874311dbf432c698fcbe0cf7a49e01ebf324 Author: Christophe Lombard Date: Fri Sep 8 15:52:11 2017 +0200 cxl: Add support for POWER9 DD2 The PSL initialization sequence has been updated to DD2. This patch adapts to the changes, retaining compatibility with DD1. The patch includes some changes to DD1 fix-ups as well. Tests performed on some of the old/new hardware. The function is_page_fault(), for POWER9, lists the Translation Checkout Responses where the page fault will be handled by copro_handle_mm_fault(). This list is too restrictive and not necessary. This patches removes this restriction and all page faults, whatever the reason, will be handled. In this case, the interruption is always acknowledged. The following features will be added soon: - phb reset when switching to capi mode. - cxllib update to support new functions. Signed-off-by: Christophe Lombard Acked-by: Frederic Barrat Reviewed-by: Vaibhav Jain Signed-off-by: Michael Ellerman drivers/misc/cxl/cxl.h | 2 ++ drivers/misc/cxl/fault.c | 15 ++------------- drivers/misc/cxl/pci.c | 47 ++++++++++++++++++++++++----------------------- 3 files changed, 28 insertions(+), 36 deletions(-) commit 4ca360f3dbf2036d964cdf3a6c4a45a81fdf8e18 Author: Kautuk Consul Date: Tue Apr 19 15:48:21 2016 +0530 powerpc: get_wchan(): solve possible race scenario due to parallel wakeup Add a check for p->state == TASK_RUNNING so that any wake-ups on task_struct p in the interim lead to 0 being returned by get_wchan(). Signed-off-by: Kautuk Consul [mpe: Confirmed other architectures do similar] Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 06755a871314c7443a89c09650cdb3982466e1a8 Author: Seth Forshee Date: Thu Sep 28 09:34:26 2017 -0400 selftests/powerpc: Use snprintf to construct DSCR sysfs interface paths Currently sprintf is used, and while paths should never exceed the size of the buffer it is theoretically possible since dirent.d_name is 256 bytes. As a result this trips -Wformat-overflow, and since the test is built with -Wall -Werror the causes the build to fail. Switch to using snprintf and skip any paths which are too long for the filename buffer. Signed-off-by: Seth Forshee Signed-off-by: Michael Ellerman tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 186b8f1587c79c2fa04bfa392fdf084443e398c1 Author: Seth Forshee Date: Thu Sep 28 09:33:39 2017 -0400 powerpc: Always initialize input array when calling epapr_hypercall() Several callers to epapr_hypercall() pass an uninitialized stack allocated array for the input arguments, presumably because they have no input arguments. However this can produce errors like this one arch/powerpc/include/asm/epapr_hcalls.h:470:42: error: 'in' may be used uninitialized in this function [-Werror=maybe-uninitialized] unsigned long register r3 asm("r3") = in[0]; ~~^~~ Fix callers to this function to always zero-initialize the input arguments array to prevent this. Signed-off-by: Seth Forshee Signed-off-by: Michael Ellerman arch/powerpc/include/asm/epapr_hcalls.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 4c02d62fa37a05254a87575c7d430819f77bd6c9 Author: Kees Cook Date: Thu Oct 5 10:39:10 2017 -0700 net/mac80211/mesh_plink: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This requires adding a pointer back to the sta_info since container_of() can't resolve the sta_info. Cc: Johannes Berg Cc: "David S. Miller" Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook Signed-off-by: Johannes Berg net/mac80211/mesh.h | 1 + net/mac80211/mesh_plink.c | 10 ++++------ net/mac80211/sta_info.c | 4 +++- net/mac80211/sta_info.h | 2 ++ 4 files changed, 10 insertions(+), 7 deletions(-) commit e366b921c7e32c9b92b4c524696fa81ab508dd23 Author: Michael Neuling Date: Thu Sep 21 15:24:49 2017 +1000 powerpc: Add PPC_EMULATED_STATS to powernv_defconfig This is useful, especially for developers. Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman arch/powerpc/configs/powernv_defconfig | 1 + 1 file changed, 1 insertion(+) commit 753d179ad001b25425beb977d00f2531540e7d42 Merge: 503c1fb cc71b7b Author: Johannes Berg Date: Fri Oct 6 11:46:32 2017 +0200 Merge remote-tracking branch 'net-next/master' into mac80211-next Merging this brings in the timer_setup() change, which allows me to apply Kees's mac80211 changes for it. Signed-off-by: Johannes Berg commit 59d3391e8cf274097c42369866070c565891bae5 Author: Guilherme G. Piccoli Date: Mon Sep 18 11:16:58 2017 -0300 powerpc/xmon: Add option to show uptime information It might be useful to quickly get the uptime of a running system on xmon, without needing to grab data from memory and doing math on struct addresses. For example, it'd be useful to check for how long after a crash a system is on xmon shell or if some test was started after the first test crashed (and this 2nd test crashed too into xmon). This small patch adds the 'U' command, to accomplish this. Suggested-by: Murilo Fossa Vicentini Signed-off-by: Guilherme G. Piccoli [mpe: Display units (seconds), add sync()/__delay() sequence] Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 8b40ea19233cc53f9d5d33a44d6fc833a765bab2 Author: Geert Uytterhoeven Date: Wed Oct 4 14:36:49 2017 +0200 ARM: dts: r8a7794: Use generic node name for VSP1 nodes Use the preferred generic node name instead of the specific name. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2ea2e06cdac491cf254ce6221371a6993e7a46fb Author: Geert Uytterhoeven Date: Wed Oct 4 14:36:48 2017 +0200 ARM: dts: r8a7792: Use generic node name for VSP1 nodes Use the preferred generic node name instead of the specific name. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 18e5500c1510c844d5c3071f06089b638326bc52 Author: Geert Uytterhoeven Date: Wed Oct 4 14:36:47 2017 +0200 ARM: dts: r8a7791: Use generic node name for VSP1 nodes Use the preferred generic node name instead of the specific name. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9f77b4801944b6c74b871f9252e09177e273212c Author: Geert Uytterhoeven Date: Wed Oct 4 14:36:46 2017 +0200 ARM: dts: r8a7790: Use generic node name for VSP1 nodes Use the preferred generic node name instead of the specific name. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 331494eb51002d0ee99414e3918e06d5e9a3962d Author: Maarten Lankhorst Date: Wed Sep 27 10:35:32 2017 +0200 drm/atomic: Make atomic iterators less surprising Commit 669c9215afea ("drm/atomic: Make async plane update checks work as intended, v2.") assumed incorrectly that if only 1 plane is matched in the loop, the variables will be set to that plane. In reality we reset them to NULL every time a new plane was iterated. This behavior is surprising, so fix this by making the for loops only assign the variables on a match. When we have not added all the planes/crtc/connector to the state, and there's a few NULL ones after the last one we iterated, te assumption is broken that the pointers will hold the values from the last loop iteration, which holds true for all other for_each macros we're using. Except of course the iterator pointer itself, but that one really is entirely internal. Cc: Dmitry Osipenko Fixes: 669c9215afea ("drm/atomic: Make async plane update checks work as intended, v2.") Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20170927083532.5756-2-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter Tested-by: Dmitry Osipenko include/drm/drm_atomic.h | 85 ++++++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 43 deletions(-) commit f0d2e86c1b9ecd9cbe967b94e2f0d197f30cb3e7 Author: Maarten Lankhorst Date: Wed Sep 27 10:35:31 2017 +0200 drm/atomic: Remove unneeded null check for private objects It can be seen in drm_atomic_get_private_obj_state() that ptr will never be NULL, so skip the check for that case. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20170927083532.5756-1-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_atomic.c | 3 --- include/drm/drm_atomic.h | 9 +++------ 2 files changed, 3 insertions(+), 9 deletions(-) commit c6baa077b784c3b37391a8c11f433e3f881a80df Author: Michael Ellerman Date: Fri Sep 29 13:58:02 2017 +1000 powerpc/powernv: Make opal_event_shutdown() callable from IRQ context In opal_event_shutdown() we free all the IRQs hanging off the opal_event_irqchip. However it's not safe to do so if we're called from IRQ context, because free_irq() wants to synchronise versus IRQ context. This can lead to warnings and a stuck system. For example from sysrq-b: Trying to free IRQ 17 from IRQ context! ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at kernel/irq/manage.c:1461 __free_irq+0x398/0x8d0 ... NIP __free_irq+0x398/0x8d0 LR __free_irq+0x394/0x8d0 Call Trace: __free_irq+0x394/0x8d0 (unreliable) free_irq+0xa4/0x140 opal_event_shutdown+0x128/0x180 opal_shutdown+0x1c/0xb0 pnv_shutdown+0x20/0x40 machine_restart+0x38/0x90 emergency_restart+0x28/0x40 sysrq_handle_reboot+0x24/0x40 __handle_sysrq+0x198/0x590 hvc_poll+0x48c/0x8c0 hvc_handle_interrupt+0x1c/0x50 __handle_irq_event_percpu+0xe8/0x6e0 handle_irq_event_percpu+0x34/0xe0 handle_irq_event+0xc4/0x210 handle_level_irq+0x250/0x770 generic_handle_irq+0x5c/0xa0 opal_handle_events+0x11c/0x240 opal_interrupt+0x38/0x50 __handle_irq_event_percpu+0xe8/0x6e0 handle_irq_event_percpu+0x34/0xe0 handle_irq_event+0xc4/0x210 handle_fasteoi_irq+0x174/0xa10 generic_handle_irq+0x5c/0xa0 __do_irq+0xbc/0x4e0 call_do_irq+0x14/0x24 do_IRQ+0x18c/0x540 hardware_interrupt_common+0x158/0x180 We can avoid that by using disable_irq_nosync() rather than free_irq(). Although it doesn't fully free the IRQ, it should be sufficient when we're shutting down, particularly in an emergency. Add an in_interrupt() check and use free_irq() when we're shutting down normally. It's probably OK to use disable_irq_nosync() in that case too, but for now it's safer to leave that behaviour as-is. Fixes: 9f0fd0499d30 ("powerpc/powernv: Add a virtual irqchip for opal events") Reported-by: Anton Blanchard Signed-off-by: Michael Ellerman arch/powerpc/platforms/powernv/opal-irqchip.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 0c3767b28186c8129f2a2cfec06a93dcd6102391 Author: Maarten Lankhorst Date: Thu Oct 5 16:15:20 2017 +0200 drm/i915: Use crtc_state_is_legacy_gamma in intel_color_check crtc_state_is_legacy_gamma also checks for CTM, which was missing from intel_color_check. By using the same condition for commit and check we reduce the chance of mismatches. This was spotted by KASAN while trying to rework kms_color igt test. [ 72.008660] ================================================================== [ 72.009326] BUG: KASAN: slab-out-of-bounds in bdw_load_gamma_lut.isra.3+0x15c/0x360 [i915] [ 72.009519] Read of size 2 at addr ffff880220216e50 by task kms_color/1158 [ 72.009900] CPU: 2 PID: 1158 Comm: kms_color Tainted: G U W 4.14.0-rc3-patser+ #5281 [ 72.009921] Hardware name: GIGABYTE GB-BKi3A-7100/MFLP3AP-00, BIOS F1 07/27/2016 [ 72.009941] Call Trace: [ 72.009968] dump_stack+0xc5/0x151 [ 72.009996] ? _atomic_dec_and_lock+0x10f/0x10f [ 72.010024] ? show_regs_print_info+0x3c/0x3c [ 72.010072] print_address_description+0x7f/0x240 [ 72.010108] kasan_report+0x216/0x370 [ 72.010308] ? bdw_load_gamma_lut.isra.3+0x15c/0x360 [i915] [ 72.010349] __asan_load2+0x74/0x80 [ 72.010552] bdw_load_gamma_lut.isra.3+0x15c/0x360 [i915] [ 72.010772] broadwell_load_luts+0x1f0/0x300 [i915] [ 72.010997] intel_color_load_luts+0x36/0x40 [i915] [ 72.011205] intel_begin_crtc_commit+0xa1/0x310 [i915] [ 72.011283] drm_atomic_helper_commit_planes_on_crtc+0xa6/0x320 [drm_kms_helper] [ 72.011316] ? wait_for_completion_io+0x460/0x460 [ 72.011524] intel_update_crtc+0xe3/0x100 [i915] [ 72.011720] skl_update_crtcs+0x360/0x3f0 [i915] [ 72.011945] ? intel_update_crtcs+0xf0/0xf0 [i915] [ 72.012010] ? drm_atomic_helper_wait_for_dependencies+0x3d9/0x400 [drm_kms_helper] [ 72.012231] intel_atomic_commit_tail+0x8db/0x1500 [i915] [ 72.012273] ? __lock_is_held+0x9c/0xc0 [ 72.012494] ? skl_update_crtcs+0x3f0/0x3f0 [i915] [ 72.012518] ? find_next_bit+0xb/0x10 [ 72.012544] ? cpumask_next+0x1a/0x20 [ 72.012745] ? i915_sw_fence_complete+0x9d/0xe0 [i915] [ 72.012938] ? __i915_sw_fence_complete+0x5d0/0x5d0 [i915] [ 72.013176] intel_atomic_commit+0x528/0x570 [i915] [ 72.013280] ? drm_atomic_get_property+0xc00/0xc00 [drm] [ 72.013466] ? intel_atomic_commit_tail+0x1500/0x1500 [i915] [ 72.013496] ? kmem_cache_alloc_trace+0x266/0x280 [ 72.013714] ? intel_atomic_commit_tail+0x1500/0x1500 [i915] [ 72.013812] drm_atomic_commit+0x77/0x80 [drm] [ 72.013911] set_property_atomic+0x14a/0x210 [drm] [ 72.014015] ? drm_object_property_get_value+0x70/0x70 [drm] [ 72.014080] ? mutex_unlock+0xd/0x10 [ 72.014292] ? intel_atomic_commit_tail+0x1500/0x1500 [i915] [ 72.014379] drm_mode_obj_set_property_ioctl+0x1cf/0x310 [drm] [ 72.014481] ? drm_mode_obj_find_prop_id+0xa0/0xa0 [drm] [ 72.014510] ? lock_release+0x6c0/0x6c0 [ 72.014602] ? drm_is_current_master+0x46/0x60 [drm] [ 72.014706] drm_ioctl_kernel+0x148/0x1d0 [drm] [ 72.014799] ? drm_mode_obj_find_prop_id+0xa0/0xa0 [drm] [ 72.014898] ? drm_ioctl_permit+0x100/0x100 [drm] [ 72.014936] ? kasan_check_write+0x14/0x20 [ 72.015039] drm_ioctl+0x441/0x660 [drm] [ 72.015129] ? drm_mode_obj_find_prop_id+0xa0/0xa0 [drm] [ 72.015235] ? drm_getstats+0x20/0x20 [drm] [ 72.015287] ? ___might_sleep+0x159/0x340 [ 72.015311] ? find_held_lock+0xcf/0xf0 [ 72.015341] ? __schedule_bug+0x110/0x110 [ 72.015405] do_vfs_ioctl+0xa88/0xb10 [ 72.015449] ? ioctl_preallocate+0x1a0/0x1a0 [ 72.015487] ? selinux_capable+0x20/0x20 [ 72.015525] ? rcu_dynticks_momentary_idle+0x40/0x40 [ 72.015607] SyS_ioctl+0x4e/0x80 [ 72.015647] entry_SYSCALL_64_fastpath+0x18/0xad [ 72.015670] RIP: 0033:0x7ff74a3d04d7 [ 72.015691] RSP: 002b:00007ffc594bec08 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 72.015734] RAX: ffffffffffffffda RBX: ffffffff8718f54a RCX: 00007ff74a3d04d7 [ 72.015756] RDX: 00007ffc594bec40 RSI: 00000000c01864ba RDI: 0000000000000003 [ 72.015777] RBP: ffff880211c0ff98 R08: 0000000000000086 R09: 0000000000000000 [ 72.015799] R10: 00007ff74a691b58 R11: 0000000000000246 R12: 0000000000000355 [ 72.015821] R13: 00000000ff00eb00 R14: 0000000000000a00 R15: 00007ff746082000 [ 72.015857] ? trace_hardirqs_off_caller+0xfa/0x110 Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20171005141520.23990-1-maarten.lankhorst@linux.intel.com [mlankhorst: s/crtc_state_is_legacy/&_gamma/ (danvet)] Reviewed-by: Daniel Vetter Fixes: 82cf435b3134 ("drm/i915: Implement color management on bdw/skl/bxt/kbl") Cc: # v4.7+ drivers/gpu/drm/i915/intel_color.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit eb2d0fab0af98e909086d3cb6a944645a3c460a1 Author: Maxime Ripard Date: Thu Oct 5 12:49:53 2017 +0200 ARM: dts: sun9i: cubieboard4: Remove card detect pull-up The board has an external pull-up on the card-detect signal, so there's no need to add another one. This also removes a DTC warning. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit da0eb2f2e8de540648bab90129ba25014d80b55a Author: Maxime Ripard Date: Thu Oct 5 12:49:52 2017 +0200 ARM: dts: sun9i: optimus: Remove card detect pull-up The board has an external pull-up on the card-detect signal, so there's no need to add another one. This also removes a DTC warning. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80-optimus.dts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit d177864f4770c1b6ea6b40a5a937ce8f49d969d9 Author: Maxime Ripard Date: Thu Oct 5 12:49:50 2017 +0200 ARM: dts: sun9i: Rename pinctrl nodes to avoid warnings Our pinctrl node names were containing unit-adresses without a reg property, resulting in a warning. Change the names for our new convention. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 2 +- arch/arm/boot/dts/sun9i-a80-optimus.dts | 2 +- arch/arm/boot/dts/sun9i-a80.dtsi | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) commit 1848f3f44444180926950ce2758c6d7ab36d8381 Author: Maxime Ripard Date: Thu Oct 5 12:49:51 2017 +0200 ARM: dts: sun9i: Remove GPIO pinctrl nodes to avoid warnings The A80 boards still define some GPIO pinctrl nodes that are not really useful, and redundant with the muxing already happening on gpio_request. Let's remove those nodes. This will also remove DTC warnings. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 16 +------------ arch/arm/boot/dts/sun9i-a80-optimus.dts | 36 +---------------------------- 2 files changed, 2 insertions(+), 50 deletions(-) commit 98dc89db893db1d71c87eb4f4a9afae8e7542c6e Author: Maxime Ripard Date: Thu Oct 5 12:49:49 2017 +0200 ARM: dts: sun9i: Remove skeleton to avoid warnings Using skeleton.dtsi will create a memory node that will generate a warning in DTC. However, that node will be created by the bootloader, so we can just remove it entirely in order to remove that warning. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun9i-a80.dtsi | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 75539f68a40c5331a8fe130670e2d66af5cfac78 Author: Maxime Ripard Date: Thu Oct 5 12:49:46 2017 +0200 ARM: dts: sun4i: Remove all useless pinctrl nodes The gpio pinctrl nodes are redundant and as such useless most of the times. Since they will also generate warnings in DTC, we can simply remove most of them. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10-a1000.dts | 16 -------------- arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts | 6 ----- arch/arm/boot/dts/sun4i-a10-dserve-dsrv9703c.dts | 28 ------------------------ arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 9 -------- arch/arm/boot/dts/sun4i-a10-hackberry.dts | 16 -------------- arch/arm/boot/dts/sun4i-a10-inet1.dts | 14 ------------ arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts | 16 -------------- arch/arm/boot/dts/sun4i-a10-marsboard.dts | 7 ------ arch/arm/boot/dts/sun4i-a10-mk802.dts | 20 ----------------- arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 6 ----- arch/arm/boot/dts/sun4i-a10-pcduino.dts | 14 ------------ arch/arm/boot/dts/sun4i-a10-pcduino2.dts | 9 -------- arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts | 21 ------------------ 13 files changed, 182 deletions(-) commit 124d19dcc8d3d8ac6249468704ef08af2b0c30a1 Author: Maxime Ripard Date: Thu Oct 5 12:49:45 2017 +0200 ARM: dts: sun4i: Rename thermal nodes to avoid warnings The thermal-zone subnodes we defined for the A10 have underscores in them that will generate DTC warnings. Change those underscores for hyphens. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 39f8a71b6e510b2a745d07d1d8cd0ddcc33f60e5 Author: Maxime Ripard Date: Thu Oct 5 12:49:44 2017 +0200 ARM: dts: sun4i: Remove SoC node unit-name to avoid warnings Our main node for all the in-SoC controllers used to have a unit name. The unit-name, in addition to being actually false, would not match any reg property, which generates a warning. Remove it in order to remove those warnings. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5ce4ef3282bd42fd54cf581591d54f2b0a10c3b Author: Jani Nikula Date: Thu Oct 5 13:52:14 2017 +0300 drm/i915/crt: clean up encoder hook assignment Only assign the hooks once instead of overwriting for DDI. Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/796b631d018fdd5aa2a3608c6a9b9fa196a50f76.1507200657.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_crt.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 27d81c28eef1d44ddb95980e681d28807e9bce54 Author: Jani Nikula Date: Thu Oct 5 13:52:13 2017 +0300 drm/i915: push DDI FDI link training on enable to CRT encoder Reduce encoder specific checks from CRTC code. Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/6903136894ffcf47f7511900f3c8d53f760ef6b1.1507200657.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_crt.c | 2 ++ drivers/gpu/drm/i915/intel_display.c | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) commit 364a3fe1823549625f2f1ff1cb26733667052da7 Author: Jani Nikula Date: Thu Oct 5 13:52:12 2017 +0300 drm/i915: push DDI and DSI underrun reporting on enable to encoder Simplify CRTC enable. v2: Don't forget DSI (Daniel) Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1ad8f3ccaed99a5f03e3d53345221a25ad0be50f.1507200657.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_ddi.c | 8 ++++++++ drivers/gpu/drm/i915/intel_display.c | 3 --- drivers/gpu/drm/i915/intel_dsi.c | 7 ++++++- 3 files changed, 14 insertions(+), 4 deletions(-) commit 3daa3cee6ebc3e55da5ad70d61482029905f4b7d Author: Jani Nikula Date: Thu Oct 5 13:52:11 2017 +0300 drm/i915: push DDI CRT underrun reporting on disable to encoder CRT being the only PCH encoder, we can simplify the crtc disable by pushing the PCH encoder specific parts to CRT encoder. v2: add hsw_disable_crt (Daniel), rebase Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1ecbbb946f7b3782ee3d97f0ec2fe4758c349311.1507200657.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_crt.c | 18 ++++++++++++++++++ drivers/gpu/drm/i915/intel_display.c | 6 ------ 2 files changed, 18 insertions(+), 6 deletions(-) commit 51c4fa6903f958dff1221b2986329b9c6de9db57 Author: Jani Nikula Date: Thu Oct 5 13:52:10 2017 +0300 drm/i915: push DDI CRT underrun reporting on enable to encoder CRT being the only PCH encoder, we can simplify the crtc enable by pushing the PCH encoder specific parts to CRT encoder. v2: add separate hsw_enable_crt (Daniel), rebase Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/b117fb524fc571837c83292194fc2ad35e588ec9.1507200657.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_crt.c | 51 +++++++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_display.c | 14 +--------- 2 files changed, 51 insertions(+), 14 deletions(-) commit 5c58319f84d93814b7beca5a39963a7cb83e98ea Author: Maxime Ripard Date: Thu Oct 5 12:49:39 2017 +0200 ARM: dts: sun4i: Change clock node names to avoid warnings Our oscillators clock names have a unit address, but no reg property, which generates a warning in DTC. Change these names to remove those unit addresses. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 71299dd440d01ee95853ba06b37a93932b076c19 Author: Maxime Ripard Date: Thu Oct 5 12:49:38 2017 +0200 ARM: dts: sun4i: Change framebuffer node names to avoid warnings The simple-framebuffer nodes have a unit address, but no reg property which generates a warning when compiling it with DTC. Change the simple-framebuffer node names so that there is no warnings on this anymore. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5474466ce355fa034ba0f35f478401e0a48ab7a5 Author: Maxime Ripard Date: Thu Oct 5 12:49:37 2017 +0200 ARM: dts: axp209: Rename usb_power_supply node to avoid warnings The USB power supply node in the AXP209 DTSI is using underscores in its node name, which is generating a warning. Change those underscores for hyphens. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/axp209.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5841f6c055e45f42415e9263eeb419015d493fd4 Author: Maxime Ripard Date: Thu Oct 5 12:49:36 2017 +0200 ARM: dts: sunxi: Remove leading zeros from unit-addresses Most of our device trees have had leading zeros for padding as part of the nodes unit-addresses. Remove all these useless zeros that generate warnings Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 110 +++++++++++++++---------------- arch/arm/boot/dts/sun5i-a10s.dtsi | 6 +- arch/arm/boot/dts/sun5i-a13.dtsi | 4 +- arch/arm/boot/dts/sun5i-gr8.dtsi | 8 +-- arch/arm/boot/dts/sun5i.dtsi | 82 +++++++++++------------ arch/arm/boot/dts/sun6i-a31.dtsi | 112 ++++++++++++++++---------------- arch/arm/boot/dts/sun7i-a20.dtsi | 122 +++++++++++++++++------------------ arch/arm/boot/dts/sun8i-a23-a33.dtsi | 62 +++++++++--------- arch/arm/boot/dts/sun8i-a23.dtsi | 4 +- arch/arm/boot/dts/sun8i-a33.dtsi | 18 +++--- arch/arm/boot/dts/sun8i-v3s.dtsi | 32 ++++----- arch/arm/boot/dts/sun9i-a80.dtsi | 86 ++++++++++++------------ 12 files changed, 323 insertions(+), 323 deletions(-) commit 23edc168bd9834ea63996b6d0ef262676640681f Author: Icenowy Zheng Date: Fri Oct 6 14:42:33 2017 +0800 ARM: dts: sun8i: Add board dts file for Banana Pi M2 Berry The Banana Pi M2 Ultra is an SBC based on the Allwinner V40 SoC (same as the R40 SoC). The form factor is similar to the Raspberry Pi series. It features: - X-Powers AXP221s PMIC connected to i2c0 - 1GiB DDR3 DRAM - microSD slot - MicroUSB Type-B port for power and connected to usb0 - HDMI output - MIPI DSI connector - 4 USB Type-A ports (connected to the usb1 controller via a hub) - gigabit ethernet with Realtek RTL8211E transceiver - WiFi/Bluetooth with AP6212 module, with external antenna connector - SATA and power connectors for native SATA support - camera sensor connector - audio out headphone jack - red and green LEDs - debug UART pins - Raspberry Pi B+ compatible GPIO header - power and reset buttons This patch adds a dts file that enables UART, MMC and PMIC support. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 164 ++++++++++++++++++++++ 2 files changed, 166 insertions(+), 1 deletion(-) commit da7ac948fa93730421d9eb3b47253d8c40afceda Author: Chen-Yu Tsai Date: Fri Oct 6 14:42:32 2017 +0800 ARM: dts: sun8i: Add board dts file for Banana Pi M2 Ultra The Banana Pi M2 Ultra is an SBC based on the Allwinner R40 SoC. The form factor and position of various connectors, leds and buttons is similar to the Banana Pi M1+, Banana Pi M3, and is exactly the same as the latest Banana Pi M64. It features: - X-Powers AXP221s PMIC connected to i2c0 - 2 GB DDR3 DRAM - 8 GB eMMC - micro SD card slot - DC power jack - HDMI output - MIPI DSI connector - 2x USB 2.0 hosts - 1x USB 2.0 OTG - gigabit ethernet with Realtek RTL8211E transceiver - WiFi/Bluetooth with AP6212 chip, with external antenna connector - SATA and power connectors for native SATA support - camera sensor connector - consumer IR receiver - audio out headphone jack - onboard microphone - red, green, and blue LEDs - debug UART pins - Li-Po battery connector - Raspberry Pi B+ compatible GPIO header - power, reset, and boot control buttons This patch adds a dts file that enables UART, MMC and PMIC support. Signed-off-by: Chen-Yu Tsai Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 178 ++++++++++++++++++++++ 2 files changed, 179 insertions(+) commit 195a59ab5bfc6414df8ae306e8d06b0990477e45 Author: Chen-Yu Tsai Date: Fri Oct 6 14:42:31 2017 +0800 ARM: dts: sun8i: Add basic dtsi file for Allwinner R40 The Allwinner R40 SoC is marketed as the successor to the A20 SoC. The R40 is a smaller chip than the A20, but features the same set of programmable pins, with a couple extra pins and some new pin functions. The chip features 4 Cortex-A7 cores and a Mali-400 MP2 GPU. It retains most if not all features from the A20, while adding some new features, such as MIPI DSI output, or updating various hardware blocks, such as DE 2.0. Signed-off-by: Chen-Yu Tsai Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-r40.dtsi | 396 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 396 insertions(+) commit e956ccfba71d7698af0959072861e06f0bcb7221 Author: Pierre-Yves MORDRET Date: Fri Oct 6 09:53:06 2017 +0200 ARM: configs: stm32: Add I2C F7 support in STM32 defconfig This patch adds I2C F7 support for STM32 Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Alexandre Torgue arch/arm/configs/stm32_defconfig | 1 + 1 file changed, 1 insertion(+) commit 959a3b6f57996af1c20232abeb7b0efd355134cc Author: Michal Wajdeczko Date: Wed Oct 4 18:13:43 2017 +0000 drm/i915/uc: Unify initialization of the uC firmware helper Unify initialization of the uC firmware helper as we want to maximize code reuse. Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171004181343.66348-6-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc_loader.c | 5 +---- drivers/gpu/drm/i915/intel_huc.c | 5 +---- drivers/gpu/drm/i915/intel_uc_fw.h | 9 +++++++++ 3 files changed, 11 insertions(+), 8 deletions(-) commit ddf79d88f3935604f3b7e3031a2325b7682a0518 Author: Michal Wajdeczko Date: Wed Oct 4 18:13:42 2017 +0000 drm/i915/uc: Fix includes order Fix includes order and make sure we only include required headers. Suggested-by: Chris Wilson Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171004181343.66348-5-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9bf384c5f21235d039bccf5d6e497c2c27986367 Author: Michal Wajdeczko Date: Wed Oct 4 18:13:41 2017 +0000 drm/i915/guc: Move GuC core definitions into dedicated files Move GuC core definitions into dedicated files as we want to keep GuC specific code in separated files. v2: move all functions in single patch (Joonas) fix old checkpatch issues (Sagar) v3: rebased Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Sagar Arun Kamble Reviewed-by: Sagar Arun Kamble #1 Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171004181343.66348-4-michal.wajdeczko@intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_guc_submission.c | 94 ---------- drivers/gpu/drm/i915/intel_guc.c | 264 +++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_guc.h | 109 ++++++++++++ drivers/gpu/drm/i915/intel_uc.c | 146 +--------------- drivers/gpu/drm/i915/intel_uc.h | 78 +-------- 6 files changed, 377 insertions(+), 315 deletions(-) commit 9f436c46ea09347e0ee050e819f486bbab047e6c Author: Michal Wajdeczko Date: Wed Oct 4 18:13:40 2017 +0000 drm/i915/guc: Move GuC submission declarations into dedicated header Move GuC submission declarations into dedicated header as we want to keep uC specific code in separate files. v2: fix include (Chris) update commit message (Joonas) Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Sagar Arun Kamble Cc: MichaĹ Winiarski Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171004181343.66348-3-michal.wajdeczko@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 1 + drivers/gpu/drm/i915/i915_guc_submission.c | 7 +-- drivers/gpu/drm/i915/i915_guc_submission.h | 80 ++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uc.c | 1 + drivers/gpu/drm/i915/intel_uc.h | 45 ----------------- 5 files changed, 86 insertions(+), 48 deletions(-) commit d62e2bf3897023c61db6b47138f615b5ba425563 Author: Michal Wajdeczko Date: Wed Oct 4 18:13:39 2017 +0000 drm/i915/guc: Move GuC log declarations into dedicated header Move GuC log declarations into dedicated header as we want to keep component specific code in separate files. v2: fix includes (Chris) update commit message (Joonas) Suggested-by: Joonas Lahtinen Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Sagar Arun Kamble Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171004181343.66348-2-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_guc_log.c | 3 ++ drivers/gpu/drm/i915/intel_guc_log.h | 59 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uc.h | 26 +--------------- 3 files changed, 63 insertions(+), 25 deletions(-) commit cc71b7b071192ac1c288e272fdc3f3877eb96663 Author: Tim Hansen Date: Thu Oct 5 15:45:32 2017 -0400 net/ipv6: remove unused err variable on icmpv6_push_pending_frames int err is unused by icmpv6_push_pending_frames(), this patch returns removes the variable and returns the function with 0. git bisect shows this variable has been around since linux has been in git in commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2. This was found by running make coccicheck M=net/ipv6/ on linus' tree on commit 77ede3a014a32746002f7889211f0cecf4803163 (current HEAD as of this patch). Signed-off-by: Tim Hansen Signed-off-by: David S. Miller net/ipv6/icmp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 380537b4f7f2e706e499695b38eabc90a5f72fa8 Author: Lin Zhang Date: Fri Oct 6 02:07:08 2017 +0800 net: ipv6: remove unused code in ipv6_find_hdr() Storing the left length of skb into 'len' actually has no effect so we can remove it. Signed-off-by: Lin Zhang Signed-off-by: David S. Miller net/ipv6/exthdrs_core.c | 3 --- 1 file changed, 3 deletions(-) commit d433b3f3e899b411ee3a9c07f07c45f84a2f450e Merge: d009313 fe9b5f7 Author: David S. Miller Date: Thu Oct 5 21:42:29 2017 -0700 Merge branch 'libbpf-support-more-map-options' Craig Gallek says: ==================== libbpf: support more map options The functional change to this series is the ability to use flags when creating maps from object files loaded by libbpf. In order to do this, the first patch updates the library to handle map definitions that differ in size from libbpf's struct bpf_map_def. For object files with a larger map definition, libbpf will continue to load if the unknown fields are all zero, otherwise the map is rejected. If the map definition in the object file is smaller than expected, libbpf will use zero as a default value in the missing fields. ==================== Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller commit fe9b5f774b28143dcc2957eadffefdca6171a26a Author: Craig Gallek Date: Thu Oct 5 10:41:58 2017 -0400 libbpf: use map_flags when creating maps This is required to use BPF_MAP_TYPE_LPM_TRIE or any other map type which requires flags. Signed-off-by: Craig Gallek Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/lib/bpf/libbpf.c | 2 +- tools/lib/bpf/libbpf.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit b13c5c14dbfd5923d773de9661404ed9600c53ef Author: Craig Gallek Date: Thu Oct 5 10:41:57 2017 -0400 libbpf: parse maps sections of varying size This library previously assumed a fixed-size map options structure. Any new options were ignored. In order to allow the options structure to grow and to support parsing older programs, this patch updates the maps section parsing to handle varying sizes. Object files with maps sections smaller than expected will have the new fields initialized to zero. Object files which have larger than expected maps sections will be rejected unless all of the unrecognized data is zero. This change still assumes that each map definition in the maps section is the same size. Signed-off-by: Craig Gallek Acked-by: Jesper Dangaard Brouer Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/lib/bpf/libbpf.c | 70 +++++++++++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 29 deletions(-) commit d009313c99ba575b65a944fe2c683c6346ea1721 Author: Colin Ian King Date: Thu Oct 5 10:10:23 2017 +0100 net: qcom/emac: make function emac_isr static The function emac_isr is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warnings: symbol 'emac_isr' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/qualcomm/emac/emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cec451ce60e50dba6d4136b7d1e62a5900cd264f Merge: b1fb67f bef0622 Author: David S. Miller Date: Thu Oct 5 21:24:48 2017 -0700 Merge branch 'tcp-improving-RACK-cpu-performance' Yuchung Cheng says: ==================== tcp: improving RACK cpu performance This patch set improves the CPU consumption of the RACK TCP loss recovery algorithm, in particular for high-speed networks. Currently, for every ACK in recovery RACK can potentially iterate over all sent packets in the write queue. On large BDP networks with non-trivial losses the RACK write queue walk CPU usage becomes unreasonably high. This patch introduces a new queue in TCP that keeps only skbs sent and not yet (s)acked or marked lost, in time order instead of sequence order. With that, RACK can examine this time-sorted list and only check packets that were sent recently, within the reordering window, per ACK. This is the fastest way without any write queue walks. The number of skbs examined per ACK is reduced by orders of magnitude. ==================== Signed-off-by: David S. Miller commit bef06223083b81d2064824afe2bc85be416ab73a Author: Yuchung Cheng Date: Wed Oct 4 13:00:00 2017 -0700 tcp: a small refactor of RACK loss detection Refactor the RACK loop to improve readability and speed up the checks. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_recovery.c | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) commit 043b87d7599ed8e86a33f4cbc3f062d57e263711 Author: Yuchung Cheng Date: Wed Oct 4 12:59:59 2017 -0700 tcp: more efficient RACK loss detection Use the new time-ordered list to speed up RACK. The detection logic is identical. But since the list is chronologically ordered by skb_mstamp and contains only skbs not yet acked or sacked, RACK can abort the loop upon hitting skbs that were sent more recently. On YouTube servers this patch reduces the iterations on write queue by 40x. The improvement is even bigger with large BDP networks. Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_recovery.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit e2080072ed2d98a55ae69d95dea60ff7a17cddd5 Author: Eric Dumazet Date: Wed Oct 4 12:59:58 2017 -0700 tcp: new list for sent but unacked skbs for RACK recovery This patch adds a new queue (list) that tracks the sent but not yet acked or SACKed skbs for a TCP connection. The list is chronologically ordered by skb->skb_mstamp (the head is the oldest sent skb). This list will be used to optimize TCP Rack recovery, which checks an skb's timestamp to judge if it has been lost and needs to be retransmitted. Since TCP write queue is ordered by sequence instead of sent time, RACK has to scan over the write queue to catch all eligible packets to detect lost retransmission, and iterates through SACKed skbs repeatedly. Special cares for rare events: 1. TCP repair fakes skb transmission so the send queue needs adjusted 2. SACK reneging would require re-inserting SACKed skbs into the send queue. For now I believe it's not worth the complexity to make RACK work perfectly on SACK reneging, so we do nothing here. 3. Fast Open: currently for non-TFO, send-queue correctly queues the pure SYN packet. For TFO which queues a pure SYN and then a data packet, send-queue only queues the data packet but not the pure SYN due to the structure of TFO code. This is okay because the SYN receiver would never respond with a SACK on a missing SYN (i.e. SYN is never fast-retransmitted by SACK/RACK). In order to not grow sk_buff, we use an union for the new list and _skb_refdst/destructor fields. This is a bit complicated because we need to make sure _skb_refdst and destructor are properly zeroed before skb is cloned/copied at transmit, and before being freed. Signed-off-by: Eric Dumazet Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: David S. Miller include/linux/skbuff.h | 11 +++++++++-- include/linux/tcp.h | 1 + include/net/tcp.h | 24 +++++++++++++++++++++++- net/ipv4/tcp.c | 2 ++ net/ipv4/tcp_input.c | 9 +++++++-- net/ipv4/tcp_minisocks.c | 1 + net/ipv4/tcp_output.c | 42 +++++++++++++++++++++++++++++++----------- 7 files changed, 74 insertions(+), 16 deletions(-) commit b1fb67fa501c4787035317f84db6caf013385581 Author: Avinash Repaka Date: Wed Oct 4 12:11:29 2017 -0700 RDS: IB: Initialize max_items based on underlying device attributes Use max_1m_mrs/max_8k_mrs while setting max_items, as the former variables are set based on the underlying device attributes. Signed-off-by: Avinash Repaka Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib_rdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9dff9936f0ccfffba5106ee4217c71c7bcf95143 Author: Avinash Repaka Date: Wed Oct 4 12:10:43 2017 -0700 RDS: IB: Limit the scope of has_fr/has_fmr variables This patch fixes the scope of has_fr and has_fmr variables as they are needed only in rds_ib_add_one(). Signed-off-by: Avinash Repaka Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib.c | 11 ++++++----- net/rds/ib.h | 2 -- 2 files changed, 6 insertions(+), 7 deletions(-) commit 1bcdca3ffbbbed0d09b46cf4263ed2593a418375 Author: Tim Hansen Date: Wed Oct 4 15:59:49 2017 -0400 net/ipv4: Remove unused variable in route.c int rc is unmodified after initalization in net/ipv4/route.c, this patch simply cleans up that variable and returns 0. This was found with coccicheck M=net/ipv4/ on linus' tree. Signed-off-by: Tim Hansen Signed-off-by: David S. Miller net/ipv4/route.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 6d05081e55a5a55b32ae6609f1902eca8277541d Author: Wei Wang Date: Wed Oct 4 10:04:04 2017 -0700 tcp: clean up TFO server's initial tcp_rearm_rto() call This commit does a cleanup and moves tcp_rearm_rto() call in the TFO server case into a previous spot in tcp_rcv_state_process() to make it more compact. This is only a cosmetic change. Suggested-by: Yuchung Cheng Signed-off-by: Wei Wang Acked-by: Neal Cardwell Acked-by: Yuchung Cheng Acked-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 27204aaa9dc67b833b77179fdac556288ec3a4bf Author: Wei Wang Date: Wed Oct 4 10:03:44 2017 -0700 tcp: uniform the set up of sockets after successful connection Currently in the TCP code, the initialization sequence for cached metrics, congestion control, BPF, etc, after successful connection is very inconsistent. This introduces inconsistent bevhavior and is prone to bugs. The current call sequence is as follows: (1) for active case (tcp_finish_connect() case): tcp_mtup_init(sk); icsk->icsk_af_ops->rebuild_header(sk); tcp_init_metrics(sk); tcp_call_bpf(sk, BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB); tcp_init_congestion_control(sk); tcp_init_buffer_space(sk); (2) for passive case (tcp_rcv_state_process() TCP_SYN_RECV case): icsk->icsk_af_ops->rebuild_header(sk); tcp_call_bpf(sk, BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB); tcp_init_congestion_control(sk); tcp_mtup_init(sk); tcp_init_buffer_space(sk); tcp_init_metrics(sk); (3) for TFO passive case (tcp_fastopen_create_child()): inet_csk(child)->icsk_af_ops->rebuild_header(child); tcp_init_congestion_control(child); tcp_mtup_init(child); tcp_init_metrics(child); tcp_call_bpf(child, BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB); tcp_init_buffer_space(child); This commit uniforms the above functions to have the following sequence: tcp_mtup_init(sk); icsk->icsk_af_ops->rebuild_header(sk); tcp_init_metrics(sk); tcp_call_bpf(sk, BPF_SOCK_OPS_ACTIVE/PASSIVE_ESTABLISHED_CB); tcp_init_congestion_control(sk); tcp_init_buffer_space(sk); This sequence is the same as the (1) active case. We pick this sequence because this order correctly allows BPF to override the settings including congestion control module and initial cwnd, etc from the route, and then allows the CC module to see those settings. Suggested-by: Neal Cardwell Tested-by: Neal Cardwell Signed-off-by: Wei Wang Acked-by: Neal Cardwell Acked-by: Yuchung Cheng Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/tcp.h | 1 + net/ipv4/tcp.c | 12 ++++++++++++ net/ipv4/tcp_fastopen.c | 7 +------ net/ipv4/tcp_input.c | 21 +++------------------ 4 files changed, 17 insertions(+), 24 deletions(-) commit 6171a0310a06a7a0cb83713fa7068bdd4192de19 Author: Steven Rostedt (VMware) Date: Wed Sep 6 08:40:41 2017 -0400 ftrace/kallsyms: Have /proc/kallsyms show saved mod init functions If a module is loaded while tracing is enabled, then there's a possibility that the module init functions were traced. These functions have their name and address stored by ftrace such that it can translate the function address that is written into the buffer into a human readable function name. As userspace tools may be doing the same, they need a way to map function names to their address as well. This is done through reading /proc/kallsyms. Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 9 +++++++++ kernel/kallsyms.c | 38 ++++++++++++++++++++++++++++++++------ kernel/trace/ftrace.c | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+), 6 deletions(-) commit 5820299a271fd3dc9b1733e1e10cd7b983edd028 Merge: 53954cf 0b02503 Author: David S. Miller Date: Thu Oct 5 18:44:18 2017 -0700 Merge branch 'VSOCK-sock_diag' Stefan Hajnoczi says: ==================== VSOCK: add sock_diag interface v3: * Rebased onto net-next/master and resolved Hyper-V transport conflict v2: * Moved tests to tools/testing/vsock/. I was unable to put them in selftests/ because they require manual setup of a VMware/KVM guest. * Moved to __vsock_in_bound/connected_table() to af_vsock.h * Fixed local variable ordering in Patch 4 There is currently no way for userspace to query open AF_VSOCK sockets. This means ss(8), netstat(8), and other utilities cannot display AF_VSOCK sockets. This patch series adds the netlink sock_diag interface for AF_VSOCK. Userspace programs sent a DUMP request including an sk_state bitmap to filter sockets based on their state (connected, listening, etc). The vsock_diag.ko module replies with information about matching sockets. This userspace ABI is defined in . The final patch adds a test suite that exercises the basic cases. Jorgen and Dexuan: I have only tested the virtio transport but this should also work for VMCI and Hyper-V. Please give it a shot if you have time. ==================== Signed-off-by: David S. Miller commit 0b02503384301e4c2db13f1045a1ddbaca2ba0ce Author: Stefan Hajnoczi Date: Thu Oct 5 16:46:54 2017 -0400 VSOCK: add tools/testing/vsock/vsock_diag_test This patch adds tests for the vsock_diag.ko module. These tests are not self-tests because they require manual set up of a KVM or VMware guest. Please see tools/testing/vsock/README for instructions. The control.h and timeout.h infrastructure can be used for additional AF_VSOCK tests in the future. Signed-off-by: Stefan Hajnoczi Signed-off-by: David S. Miller MAINTAINERS | 1 + tools/testing/vsock/.gitignore | 2 + tools/testing/vsock/Makefile | 9 + tools/testing/vsock/README | 36 ++ tools/testing/vsock/control.c | 219 +++++++++++ tools/testing/vsock/control.h | 13 + tools/testing/vsock/timeout.c | 64 ++++ tools/testing/vsock/timeout.h | 14 + tools/testing/vsock/vsock_diag_test.c | 681 ++++++++++++++++++++++++++++++++++ 9 files changed, 1039 insertions(+) commit 413a4317aca7d6367d57a5971b0c461f03851207 Author: Stefan Hajnoczi Date: Thu Oct 5 16:46:53 2017 -0400 VSOCK: add sock_diag interface This patch adds the sock_diag interface for querying sockets from userspace. Tools like ss(8) and netstat(8) can use this interface to list open sockets. The userspace ABI is defined in and includes netlink request and response structs. The request can query sockets based on their sk_state (e.g. listening sockets only) and the response contains socket information fields including the local/remote addresses, inode number, etc. This patch does not dump VMCI pending sockets because I have only tested the virtio transport, which does not use pending sockets. Support can be added later by extending vsock_diag_dump() if needed by VMCI users. Signed-off-by: Stefan Hajnoczi Signed-off-by: David S. Miller MAINTAINERS | 2 + include/uapi/linux/vm_sockets_diag.h | 33 +++++++ net/vmw_vsock/Kconfig | 10 ++ net/vmw_vsock/Makefile | 3 + net/vmw_vsock/diag.c | 186 +++++++++++++++++++++++++++++++++++ 5 files changed, 234 insertions(+) commit 3b4477d2dcf2709d0be89e2a8dced3d0f4a017f2 Author: Stefan Hajnoczi Date: Thu Oct 5 16:46:52 2017 -0400 VSOCK: use TCP state constants for sk_state There are two state fields: socket->state and sock->sk_state. The socket->state field uses SS_UNCONNECTED, SS_CONNECTED, etc while the sock->sk_state typically uses values that match TCP state constants (TCP_CLOSE, TCP_ESTABLISHED). AF_VSOCK does not follow this convention and instead uses SS_* constants for both fields. The sk_state field will be exposed to userspace through the vsock_diag interface for ss(8), netstat(8), and other programs. This patch switches sk_state to TCP state constants so that the meaning of this field is consistent with other address families. Not just AF_INET and AF_INET6 use the TCP constants, AF_UNIX and others do too. The following mapping was used to convert the code: SS_FREE -> TCP_CLOSE SS_UNCONNECTED -> TCP_CLOSE SS_CONNECTING -> TCP_SYN_SENT SS_CONNECTED -> TCP_ESTABLISHED SS_DISCONNECTING -> TCP_CLOSING VSOCK_SS_LISTEN -> TCP_LISTEN In __vsock_create() the sk_state initialization was dropped because sock_init_data() already initializes sk_state to TCP_CLOSE. Signed-off-by: Stefan Hajnoczi Signed-off-by: David S. Miller include/net/af_vsock.h | 3 -- net/vmw_vsock/af_vsock.c | 46 ++++++++++++++++------------ net/vmw_vsock/hyperv_transport.c | 12 ++++---- net/vmw_vsock/virtio_transport.c | 2 +- net/vmw_vsock/virtio_transport_common.c | 22 ++++++------- net/vmw_vsock/vmci_transport.c | 34 ++++++++++---------- net/vmw_vsock/vmci_transport_notify.c | 2 +- net/vmw_vsock/vmci_transport_notify_qstate.c | 2 +- 8 files changed, 64 insertions(+), 59 deletions(-) commit bf359b8127719535f88494adb3c2b73c06667dcd Author: Stefan Hajnoczi Date: Thu Oct 5 16:46:51 2017 -0400 VSOCK: move __vsock_in_bound/connected_table() to af_vsock.h The vsock_diag.ko module will need to check socket table membership. Signed-off-by: Stefan Hajnoczi Signed-off-by: David S. Miller include/net/af_vsock.h | 12 ++++++++++++ net/vmw_vsock/af_vsock.c | 10 ---------- 2 files changed, 12 insertions(+), 10 deletions(-) commit 44f209807ee87a5eddf6c0432f3fb63cec27bad8 Author: Stefan Hajnoczi Date: Thu Oct 5 16:46:50 2017 -0400 VSOCK: export socket tables for sock_diag interface The socket table symbols need to be exported from vsock.ko so that the vsock_diag.ko module will be able to traverse sockets. Signed-off-by: Stefan Hajnoczi Signed-off-by: David S. Miller include/net/af_vsock.h | 5 +++++ net/vmw_vsock/af_vsock.c | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) commit 53954cf8c5d205624167a2bfd117cc0c1a5f3c6d Merge: 4b54db1 7a92616 Author: David S. Miller Date: Thu Oct 5 17:57:03 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Just simple overlapping changes. Signed-off-by: David S. Miller commit 15438ab06515b093d61e2f35bb27d21e5e7f966e Merge: ebec44a 5b9fbff Author: Dave Airlie Date: Fri Oct 6 11:10:25 2017 +1000 Merge tag 'drm-misc-next-2017-10-05' of git://anongit.freedesktop.org/git/drm-misc into drm-next More drm-misc for 4.15: Cross-subsystem Changes: - bunch more simple outreachy patches (Meghana Madhyastha, Aishwarya Pant, Haneen Mohammed) - Quite a pile of static checker/cocci/spelling fixups all over. - Final driver patches+core cleanup of Noralf's new drm_gem_fb_create helper. Core Changes: - legacy DPMS docs improved - add dri-devel m-l to fbdev to catch people who try to fix fbcon-on-kms bugs in the wrong place Driver Changes: - vc4: prep for dsi panels (Eric) * tag 'drm-misc-next-2017-10-05' of git://anongit.freedesktop.org/git/drm-misc: (34 commits) drm: fix typo in drm_gem_get_pages() comment MAINTAINERS: Add dri-devel as a mailing list for anything fbdev drm/virtio: Replace instances of reference/unreference with get/put drm/fb-cma-helper: Remove unused functions drm/tve200: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb() drm/sun4i: Use drm_gem_fb_create() drm/shmobile: Use drm_gem_fb_create() drm/rcar-du: Use drm_gem_fb_create() drm/mxsfb: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb() drm/meson: Use drm_gem_fb_create() drm/hisilicon/kirin: Use drm_gem_fb_create() drm/fsl-dcu: Use drm_gem_fb_create() drm/tinydrm: Use drm_gem_framebuffer_helper drm: of: always initialize panel in drm_of_find_panel_or_bridge() drm/tve200: Check for IS_ERR instead of NULL in probe drm/tve200: make two functions static drm/armada: Remove unused #include drm/rockchip: Rely on the default best_encoder() behavior drm/vc4: Set up the DSI host at pdev probe time, not component bind. drm/vc4: Avoid using vrefresh==0 mode in DSI htotal math. ... commit 0a4e632b6f9d1ccabe3e9507814184cd34ff3f31 Merge: e7cc333 5dcbeca Author: Stephen Boyd Date: Thu Oct 5 16:52:59 2017 -0700 Merge branch 'clk-fixes' into clk-next * clk-fixes: clk: samsung: exynos4: Enable VPLL and EPLL clocks for suspend/resume cycle commit 1620c624305f3773563996757a87eecf44cecfec Author: Alexandre Belloni Date: Wed Sep 27 16:03:45 2017 +0200 dt-bindings: rtc: merge ds1339 in ds1307 documentation Now that there is documentation for the ds1307 and compatible RTCs, merge the ds1339 documentation in it. Signed-off-by: Alexandre Belloni Signed-off-by: Rob Herring .../devicetree/bindings/rtc/dallas,ds1339.txt | 18 ------------------ Documentation/devicetree/bindings/rtc/rtc-ds1307.txt | 8 ++++++++ 2 files changed, 8 insertions(+), 18 deletions(-) commit 5015391d9d6e28c85fd98d663703497dd1ec7917 Author: Alexandre Belloni Date: Wed Sep 27 16:03:44 2017 +0200 dt-bindings: rtc: Add bindings for m41t80 and compatibles The ST M41T80 family of RTC are not trivial devices, document them. Signed-off-by: Alexandre Belloni Signed-off-by: Rob Herring .../devicetree/bindings/rtc/rtc-m41t80.txt | 31 ++++++++++++++++++++++ .../devicetree/bindings/trivial-devices.txt | 2 -- 2 files changed, 31 insertions(+), 2 deletions(-) commit 13a5595892ca3cf99625085aaee4c2cb2e6dd5a5 Author: Alexandre Belloni Date: Wed Sep 27 16:03:43 2017 +0200 dt-bindings: rtc: DS1307 and compatibles are not trivial Document optional properties for ds1307 and compatible RTCs Signed-off-by: Alexandre Belloni Signed-off-by: Rob Herring .../devicetree/bindings/rtc/rtc-ds1307.txt | 36 ++++++++++++++++++++++ .../devicetree/bindings/trivial-devices.txt | 6 ---- 2 files changed, 36 insertions(+), 6 deletions(-) commit 0fc52ca54aa1f6ad8a38efea2f4b072150280008 Author: Alexandre Belloni Date: Wed Sep 27 16:03:42 2017 +0200 dt-bindings: rtc: Add sirf,prima2-sysrtc bindings Add device tree bindings for the SiRFSoC Real Time Clock. Signed-off-by: Alexandre Belloni Signed-off-by: Rob Herring .../devicetree/bindings/rtc/sirf,prima2-sysrtc.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit b766f10f7b1b416460c05df57345bba74cd5911d Author: Alexandre Belloni Date: Wed Sep 27 16:03:41 2017 +0200 dt-bindings: rtc: add stericsson,coh901331 bindings Add device tree bindings for the ST-Ericsson COH 901 331 Real Time Clock Signed-off-by: Alexandre Belloni Reviewed-by: Linus Walleij Signed-off-by: Alexandre Belloni Signed-off-by: Rob Herring .../devicetree/bindings/rtc/stericsson,coh901331.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit a38b9267995402b89916017872a6f3ba405bcb96 Author: Alexandre Belloni Date: Wed Sep 27 16:03:40 2017 +0200 dt-bindings: trivial: Add RTCs Add remaining trivial RTC bindings. Signed-off-by: Alexandre Belloni Signed-off-by: Rob Herring Documentation/devicetree/bindings/trivial-devices.txt | 5 +++++ 1 file changed, 5 insertions(+) commit a3c1295280c8ac0823d0cac06f88a53928781a37 Author: Hoan Tran Date: Fri Sep 22 14:33:22 2017 -0700 MAINTAINERS: Add entry for Synopsys DesignWare APB GPIO driver This patch adds maintainer for Synopsys DesignWare APB GPIO driver. Signed-off-by: Hoan Tran Signed-off-by: Linus Walleij MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) commit 6aa69784b43eb5f69120339938c50a97a433049f Author: Steven Rostedt (VMware) Date: Tue Sep 5 19:20:16 2017 -0400 ftrace: Add freeing algorithm to free ftrace_mod_maps The ftrace_mod_map is a descriptor to save module init function names in case they were traced, and the trace output needs to reference the function name from the function address. But after the function is unloaded, it the maps should be freed, as the rest of the function names are as well. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ftrace.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) commit aba4b5c22cbac296f4081a0476d0c55828f135b4 Author: Steven Rostedt (VMware) Date: Fri Sep 1 08:35:38 2017 -0400 ftrace: Save module init functions kallsyms symbols for tracing If function tracing is active when the module init functions are freed, then store them to be referenced by kallsyms. As module init functions can now be traced on module load, they were useless: ># echo ':mod:snd_seq' > set_ftrace_filter ># echo function > current_tracer ># modprobe snd_seq ># cat trace # tracer: function # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / delay # TASK-PID CPU# |||| TIMESTAMP FUNCTION # | | | |||| | | modprobe-2786 [000] .... 3189.037874: 0xffffffffa0860000 <-do_one_initcall modprobe-2786 [000] .... 3189.037876: 0xffffffffa086004d <-0xffffffffa086000f modprobe-2786 [000] .... 3189.037876: 0xffffffffa086010d <-0xffffffffa0860018 modprobe-2786 [000] .... 3189.037877: 0xffffffffa086011a <-0xffffffffa0860021 modprobe-2786 [000] .... 3189.037877: 0xffffffffa0860080 <-0xffffffffa086002a modprobe-2786 [000] .... 3189.039523: 0xffffffffa0860400 <-0xffffffffa0860033 modprobe-2786 [000] .... 3189.039523: 0xffffffffa086038a <-0xffffffffa086041c modprobe-2786 [000] .... 3189.039591: 0xffffffffa086038a <-0xffffffffa0860436 modprobe-2786 [000] .... 3189.039657: 0xffffffffa086038a <-0xffffffffa0860450 modprobe-2786 [000] .... 3189.039719: 0xffffffffa0860127 <-0xffffffffa086003c modprobe-2786 [000] .... 3189.039742: snd_seq_create_kernel_client <-0xffffffffa08601f6 When the output is shown, the kallsyms for the module init functions have already been freed, and the output of the trace can not convert them to their function names. Now this looks like this: # tracer: function # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / delay # TASK-PID CPU# |||| TIMESTAMP FUNCTION # | | | |||| | | modprobe-2463 [002] .... 174.243237: alsa_seq_init <-do_one_initcall modprobe-2463 [002] .... 174.243239: client_init_data <-alsa_seq_init modprobe-2463 [002] .... 174.243240: snd_sequencer_memory_init <-alsa_seq_init modprobe-2463 [002] .... 174.243240: snd_seq_queues_init <-alsa_seq_init modprobe-2463 [002] .... 174.243240: snd_sequencer_device_init <-alsa_seq_init modprobe-2463 [002] .... 174.244860: snd_seq_info_init <-alsa_seq_init modprobe-2463 [002] .... 174.244861: create_info_entry <-snd_seq_info_init modprobe-2463 [002] .... 174.244936: create_info_entry <-snd_seq_info_init modprobe-2463 [002] .... 174.245003: create_info_entry <-snd_seq_info_init modprobe-2463 [002] .... 174.245072: snd_seq_system_client_init <-alsa_seq_init modprobe-2463 [002] .... 174.245094: snd_seq_create_kernel_client <-snd_seq_system_client_init Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 20 ++++++- kernel/kallsyms.c | 5 ++ kernel/module.c | 2 +- kernel/trace/ftrace.c | 146 ++++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 168 insertions(+), 5 deletions(-) commit 3e234289f86b12985ef8909cd34525fcb66c4efb Author: Steven Rostedt (VMware) Date: Fri Mar 3 18:00:22 2017 -0500 ftrace: Allow module init functions to be traced Allow for module init sections to be traced as well as core kernel init sections. Now that filtering modules functions can be stored, for when they are loaded, it makes sense to be able to trace them. Cc: Jessica Yu Cc: Rusty Russell Signed-off-by: Steven Rostedt (VMware) include/linux/init.h | 4 +--- kernel/module.c | 2 ++ kernel/trace/ftrace.c | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) commit 5fdee2127faa77c9c91862ad5e001dfab7013e92 Author: Christoph Hellwig Date: Thu Oct 5 21:22:52 2017 +0200 block: remove QUEUE_FLAG_STACKABLE We already have a queue_is_rq_based helper to check if a request_queue is request based, so we can remove the flag for it. Acked-by: Mike Snitzer Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-mq-debugfs.c | 1 - block/elevator.c | 2 +- drivers/md/dm-rq.c | 2 +- drivers/md/dm-table.c | 15 +-------------- drivers/md/dm.c | 11 ----------- include/linux/blkdev.h | 5 ----- 6 files changed, 3 insertions(+), 33 deletions(-) commit 027c87fe69599598c6d396b971d2cd9ef45e002e Author: Jerome Brunet Date: Wed Sep 20 15:39:27 2017 +0200 pinctrl: meson-gxbb: add missing GPIOX_22 pin GPIOX_22 is declared as a gpio but the id is no present in the pin table. This hole trigger an error while reading the pingroup debugfs entry GPIOX_22 is no routed externally. For all we know, it could an internal pin of SoC Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 1 + 1 file changed, 1 insertion(+) commit e891a5a40103bc887befb21bbee83308e3669309 Author: Jerome Brunet Date: Wed Sep 20 15:39:26 2017 +0200 pinctrl: meson-gx: TEST_N belongs to the AO controller On meson-gx platforms, TEST_N has been incorrectly declared in the EE controller while it belongs to AO controller. Move the pin to the appropriate controller Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 8 ++++---- drivers/pinctrl/meson/pinctrl-meson-gxl.c | 8 ++++---- include/dt-bindings/gpio/meson-gxbb-gpio.h | 2 +- include/dt-bindings/gpio/meson-gxl-gpio.h | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) commit 70e5ecb1b994f2704c234cb12366d45474b98f32 Author: Jerome Brunet Date: Wed Sep 20 15:39:25 2017 +0200 pinctrl: meson: get rid of pin_base pin_base was used with the manually set pin offset in meson pinctrl. This is no longer the case, pin_base is 0 on every meson pinctrl controllers and should go away. Tested-by: Martin Blumenstingl Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 2 -- drivers/pinctrl/meson/pinctrl-meson-gxl.c | 2 -- drivers/pinctrl/meson/pinctrl-meson.c | 30 +++++++++++++----------------- drivers/pinctrl/meson/pinctrl-meson8.c | 2 -- drivers/pinctrl/meson/pinctrl-meson8b.c | 2 -- 5 files changed, 13 insertions(+), 25 deletions(-) commit 634e40b0c2bde81051e309cdfe4c26bbca3164ec Author: Jerome Brunet Date: Wed Sep 20 15:39:20 2017 +0200 pinctrl: meson: remove offset from pinctrl Offset on meson pinctrl and gpios is something that was carried from the vendor driver, where there is a weird link between the 2 controllers. Since these 2 controllers are independent, this offset adds an unnecessary complexity. This patch remove this manually set offset and rely on pinctrl to figure out the gpio base offset Tested-by: Martin Blumenstingl Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 854 +++++++++++++------------ drivers/pinctrl/meson/pinctrl-meson-gxl.c | 814 ++++++++++++------------ drivers/pinctrl/meson/pinctrl-meson.c | 18 +- drivers/pinctrl/meson/pinctrl-meson.h | 8 +- drivers/pinctrl/meson/pinctrl-meson8.c | 964 ++++++++++++++--------------- drivers/pinctrl/meson/pinctrl-meson8b.c | 780 ++++++++++++----------- 6 files changed, 1697 insertions(+), 1741 deletions(-) commit f05f7355de3e66438619c97c612d63cc8a1be125 Author: Colin Ian King Date: Thu Oct 5 11:01:45 2017 +0100 switchtec: Make struct event_regs static The structure event_regs is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'event_regs' was not declared. Should it be static Signed-off-by: Colin Ian King Signed-off-by: Bjorn Helgaas Acked-by: Logan Gunthorpe drivers/pci/switch/switchtec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e83f374247c310bc558c8626fbfcc03f22f9bf02 Author: Arnd Bergmann Date: Thu Oct 5 22:39:37 2017 +0200 spi: spreadtrum adi: add hwspinlock dependency With CONFIG_HWSPINLOCK=m, the new driver fails to link as a built-in driver: drivers/spi/spi-sprd-adi.o: In function `sprd_adi_remove': spi-sprd-adi.c:(.text+0x18): undefined reference to `hwspin_lock_free' drivers/spi/spi-sprd-adi.o: In function `sprd_adi_probe': spi-sprd-adi.c:(.text+0xfc): undefined reference to `of_hwspin_lock_get_id' spi-sprd-adi.c:(.text+0x108): undefined reference to `hwspin_lock_request_specific' spi-sprd-adi.c:(.text+0x268): undefined reference to `hwspin_lock_free' This adds a hard Kconfig dependency on HWSPINLOCK for the !COMPILE_TEST case, and allows compile-testing with HWSPINLOCK completely disabled, which will then rely on the existing stub API. Fixes: 7e2903cb91df ("spi: Add ADI driver for Spreadtrum platform") Signed-off-by: Arnd Bergmann Signed-off-by: Mark Brown drivers/spi/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 3142d832af10d8cd456cdec5aa72da1c8572f557 Author: Filippo Sironi Date: Mon Aug 28 15:38:49 2017 +0200 PCI: Cache the VF device ID in the SR-IOV structure Cache the VF device ID in the SR-IOV structure and use it instead of reading it over and over from the PF config space capability. Signed-off-by: Filippo Sironi [bhelgaas: rename to "vf_device" to match pci_dev->device] Signed-off-by: Bjorn Helgaas drivers/pci/iov.c | 5 +++-- drivers/pci/pci.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) commit ad581f869e809e727e7d57a07c81f349221a4276 Author: Sascha El-Sharkawy Date: Wed Sep 20 08:44:20 2017 +0200 PCI: Add Kconfig PCI_IOV dependency for PCI_REALLOC_ENABLE_AUTO Ensure only valid Kconfig configurations for PCI_REALLOC_ENABLE_AUTO. This is done by selecting PCI_IOV, which is required by PCI_REALLOC_ENABLE_AUTO to work. Signed-off-by: Sascha El-Sharkawy Signed-off-by: Bjorn Helgaas drivers/pci/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 79e699b648b93f76d0f6e692499d5c6a2295ef05 Author: Jan H. Schönherr Date: Wed Sep 6 01:21:23 2017 +0200 PCI: Remove unused function __pci_reset_function() The last caller of __pci_reset_function() has been removed. Remove the function as well. Signed-off-by: Jan H. Schönherr Signed-off-by: Bjorn Helgaas drivers/pci/pci.c | 35 +++-------------------------------- include/linux/pci.h | 1 - 2 files changed, 3 insertions(+), 33 deletions(-) commit 753f612471819d3b3abba8c520eb3ce8f9d00fa5 Author: Jan H. Schönherr Date: Tue Sep 26 12:53:23 2017 -0500 PCI: Remove reset argument from pci_iov_{add,remove}_virtfn() The "reset" argument passed to pci_iov_add_virtfn() and pci_iov_remove_virtfn() is always zero since 46cb7b1bd86f ("PCI: Remove unused SR-IOV VF Migration support") Remove the argument together with the associated code. Signed-off-by: Jan H. Schönherr Signed-off-by: Bjorn Helgaas Acked-by: Russell Currey arch/powerpc/kernel/eeh_driver.c | 4 ++-- drivers/pci/iov.c | 18 +++++------------- include/linux/pci.h | 8 ++++---- 3 files changed, 11 insertions(+), 19 deletions(-) commit 4113b0e60bf188c8a557c22f64294aa9c6019074 Author: Bhumika Goyal Date: Mon Sep 18 21:54:55 2017 +0530 x86/pci/intel_mid_pci: Constify intel_mid_pci_ops and make it __initconst Make this const as it is only used during a copy operation. This usage is inside init function and the structure is not referenced after initialisation, so make it __initconst too. Signed-off-by: Bhumika Goyal Signed-off-by: Bjorn Helgaas arch/x86/pci/intel_mid_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69f2dc24ff32ae61291dc63525d70c06ac9d8ba3 Author: Bhumika Goyal Date: Tue Sep 12 16:43:33 2017 +0530 PCI: Constify pci_dev_type structure Make this const as it not modified in the file referencing it. It is only stored in a const field 'type' of a device structure. Also, add const to the variable declaration in the header file. Signed-off-by: Bhumika Goyal Signed-off-by: Bjorn Helgaas drivers/pci/pci-sysfs.c | 2 +- drivers/pci/pci.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 68a15eb7bd0cf180eb214c79aa4e1662c5eeb97c Author: Linus Walleij Date: Tue Sep 26 13:02:20 2017 -0500 PCI: v3-semi: Add V3 Semiconductor PCI host driver This PCI host bridge from V3 Semiconductor needs no further introduction. An ancient driver for it has been sitting in arch/arm/mach-integrator/pci_v3.* since before v2.6.12 and the initial migration to git. But we need to get the drivers out of arch/arm/* and get proper handling of the old drivers, rewrite and clean up so the PCI maintainer can control the mass of drivers without having to run all over the kernel. We also switch swiftly to all the new infrastructure found in the PCI hosts as of late. Some code is preserved so I have added an extensive list of authors in the top comment section. This driver probes with the following result: OF: PCI: host bridge /pciv3@62000000 ranges: OF: PCI: No bus range found for /pciv3@62000000, using [bus 00-ff] OF: PCI: IO 0x60000000..0x6000ffff -> 0x00000000 OF: PCI: MEM 0x40000000..0x4fffffff -> 0x40000000 OF: PCI: MEM 0x50000000..0x5fffffff -> 0x50000000 pci-v3-semi 62000000.pciv3: initialized PCI V3 Integrator/AP integration pci-v3-semi 62000000.pciv3: PCI host bridge to bus 0000:00 pci_bus 0000:00: root bus resource [bus 00-ff] pci_bus 0000:00: root bus resource [io 0x0000-0xffff] pci_bus 0000:00: root bus resource [mem 0x40000000-0x4fffffff] pci_bus 0000:00: root bus resource [mem 0x50000000-0x5fffffff pref] pci-v3-semi 62000000.pciv3: parity error interrupt pci-v3-semi 62000000.pciv3: master abort error interrupt pci-v3-semi 62000000.pciv3: PCI target LB->PCI READ abort interrupt pci-v3-semi 62000000.pciv3: master abort error interrupt (repeats a few times) pci 0000:00:09.0: [1011:0024] type 01 class 0x060400 pci-v3-semi 62000000.pciv3: master abort error interrupt pci-v3-semi 62000000.pciv3: PCI target LB->PCI READ abort interrupt pci 0000:00:0b.0: [8086:1229] type 00 class 0x020000 pci 0000:00:0b.0: reg 0x10: [mem 0x00000000-0x00000fff pref] pci 0000:00:0b.0: reg 0x14: [io 0x0000-0x001f] pci 0000:00:0b.0: reg 0x18: [mem 0x00000000-0x000fffff] pci 0000:00:0b.0: reg 0x30: [mem 0x00000000-0x000fffff pref] pci 0000:00:0b.0: supports D1 D2 pci 0000:00:0b.0: PME# supported from D0 D1 D2 D3hot pci 0000:00:0c.0: [5333:8811] type 00 class 0x030000 pci 0000:00:0c.0: reg 0x10: [mem 0x00000000-0x03ffffff] pci 0000:00:0c.0: reg 0x30: [mem 0x00000000-0x0000ffff pref] pci 0000:00:0c.0: vgaarb: VGA device added: decodes=io+mem,owns=io,locks=none PCI: bus0: Fast back to back transfers disabled PCI: bus1: Fast back to back transfers enabled pci 0000:00:0c.0: BAR 0: assigned [mem 0x40000000-0x43ffffff] pci 0000:00:0b.0: BAR 2: assigned [mem 0x44000000-0x440fffff] pci 0000:00:0b.0: BAR 6: assigned [mem 0x50000000-0x500fffff pref] pci 0000:00:0c.0: BAR 6: assigned [mem 0x50100000-0x5010ffff pref] pci 0000:00:0b.0: BAR 0: assigned [mem 0x50110000-0x50110fff pref] pci 0000:00:0b.0: BAR 1: assigned [io 0x1000-0x101f] pci 0000:00:09.0: PCI bridge to [bus 01] pci 0000:00:0b.0: Firmware left e100 interrupts enabled; disabling (...) e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI e100: Copyright(c) 1999-2006 Intel Corporation e100 0000:00:0b.0: enabling device (0146 -> 0147) e100 0000:00:0b.0 eth0: addr 0x50110000, irq 31, MAC addr 00:08:c7:99:d2:57 > lspci 00:0b.0 Class 0200: 8086:1229 00:09.0 Class 0604: 1011:0024 00:0c.0 Class 0300: 5333:8811 > cat /proc/iomem 40000000-4fffffff : V3 PCI NON-PRE-MEM 40000000-43ffffff : 0000:00:0c.0 44000000-440fffff : 0000:00:0b.0 44000000-440fffff : e100 50000000-5fffffff : V3 PCI PRE-MEM 50000000-500fffff : 0000:00:0b.0 50100000-5010ffff : 0000:00:0c.0 50110000-50110fff : 0000:00:0b.0 50110000-50110fff : e100 61000000-61ffffff : /pciv3@62000000 62000000-6200ffff : /pciv3@62000000 Signed-off-by: Linus Walleij [bhelgaas: fold in %pR fixes from Arnd Bergmann : http://lkml.kernel.org/r/20171011140224.3770968-1-arnd@arndb.de] Signed-off-by: Bjorn Helgaas CC: Marc Gonzalez MAINTAINERS | 7 + drivers/pci/host/Kconfig | 6 + drivers/pci/host/Makefile | 1 + drivers/pci/host/pci-v3-semi.c | 959 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 973 insertions(+) commit af37bed303e2b8fbdbe62e8c2c60900eb62a7fea Author: Linus Walleij Date: Fri Sep 8 14:45:02 2017 +0200 PCI: v3: Update the device tree bindings The bindings for the V3 Semiconductor PCI bridge are a tad bit outdated and predates the more formal format we have adopted for the bindings. Update them a bit so it is easier to read, and add the Integrator AP- specific compatible so we can detect that we are running on that specific platform. Add a second register bank for the configuration memory area. The device tree specs do specify a memory range for configuration space but it is not applicable to custom accessors like this. Instead follow the pattern from the Versatile PCI adapter and simply add a second register bank for this memory. Signed-off-by: Linus Walleij Signed-off-by: Bjorn Helgaas Acked-by: Rob Herring Cc: Marc Gonzalez .../devicetree/bindings/pci/v3-v360epc-pci.txt | 75 ++++++++++++++++++++-- 1 file changed, 68 insertions(+), 7 deletions(-) commit d76bdce394bf48140cbb33b07509c32df1cef8e7 Author: Marc Gonzalez Date: Tue Sep 26 12:27:39 2017 +0200 PCI: tango: Add MSI controller support Add support for the MSI controller in Tango, which supports 256 message-signaled interrupts and a single doorbell address. Signed-off-by: Marc Gonzalez Signed-off-by: Bjorn Helgaas drivers/pci/host/pcie-tango.c | 205 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 202 insertions(+), 3 deletions(-) commit 1e61a57cac560844580ab532a4e2f5061ef77039 Author: Marc Gonzalez Date: Tue Sep 26 12:26:55 2017 +0200 PCI: Use of_pci_dma_range_parser_init() to reduce duplication Use the new of_pci_dma_range_parser_init() to reduce code duplication. Signed-off-by: Marc Gonzalez Signed-off-by: Bjorn Helgaas Acked-by: Linus Walleij drivers/pci/host/pci-ftpci100.c | 20 +------------------- drivers/pci/host/pci-rcar-gen2.c | 20 +------------------- drivers/pci/host/pci-xgene.c | 20 +------------------- drivers/pci/host/pcie-iproc.c | 20 +------------------- drivers/pci/host/pcie-rcar.c | 20 +------------------- 5 files changed, 5 insertions(+), 95 deletions(-) commit a060c2104ef83e62346b7e893947a940471c0d7c Author: Marc Gonzalez Date: Tue Sep 26 12:22:54 2017 +0200 of/pci: Add of_pci_dma_range_parser_init() for dma-ranges parsing support Several host bridge drivers duplicate of_pci_range_parser_init() in order to parse their dma-ranges property. Provide of_pci_dma_range_parser_init() for that use case. Signed-off-by: Marc Gonzalez Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Reviewed-by: Linus Walleij drivers/of/address.c | 19 ++++++++++++++++--- include/linux/of_address.h | 10 +++++++++- 2 files changed, 25 insertions(+), 4 deletions(-) commit 69146d05ef96d91577b5e8d804b50d47b6b014f9 Author: Dmitry Dunaev Date: Tue Sep 26 17:49:37 2017 +0300 Add Tecon Microprocessor Technologies, LLC vendor prefix Signed-off-by: Dmitry Dunaev Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit ee8bdfb6568d86bb93f55f8d99c4c643e77304ee Author: Ard Biesheuvel Date: Mon Oct 2 15:08:40 2017 +0100 PCI/ASPM: Deal with missing root ports in link state handling Even though it is unconventional, some PCIe host implementations omit the root ports entirely, and simply consist of a host bridge (which is not modeled as a device in the PCI hierarchy) and a link. When the downstream device is an endpoint, our current code does not seem to mind this unusual configuration. However, when PCIe switches are involved, the ASPM code assumes that any downstream switch port has a parent, and blindly dereferences the bus->parent->self field of the pci_dev struct to chain the downstream link state to the link state of the root port. Given that the root port is missing, the link is not modeled at all, and nor is the link state, and attempting to access it results in a NULL pointer dereference and a crash. Avoid this by allowing the link state chain to terminate at the downstream port if no root port exists. Signed-off-by: Ard Biesheuvel Signed-off-by: Bjorn Helgaas drivers/pci/pcie/aspm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 86acc790717fb60fb51ea3095084e331d8711c74 Author: Gabriele Paoloni Date: Thu Sep 28 15:33:05 2017 +0100 PCI/AER: Report non-fatal errors only to the affected endpoint Previously, if an non-fatal error was reported by an endpoint, we called report_error_detected() for the endpoint, every sibling on the bus, and their descendents. If any of them did not implement the .error_detected() method, do_recovery() failed, leaving all these devices unrecovered. For example, the system described in the bugzilla below has two devices: 0000:74:02.0 [19e5:a230] SAS controller, driver has .error_detected() 0000:74:03.0 [19e5:a235] SATA controller, driver lacks .error_detected() When a device such as 74:02.0 reported a non-fatal error, do_recovery() failed because 74:03.0 lacked an .error_detected() method. But per PCIe r3.1, sec 6.2.2.2.2, such an error does not compromise the Link and does not affect 74:03.0: Non-fatal errors are uncorrectable errors which cause a particular transaction to be unreliable but the Link is otherwise fully functional. Isolating Non-fatal from Fatal errors provides Requester/Receiver logic in a device or system management software the opportunity to recover from the error without resetting the components on the Link and disturbing other transactions in progress. Devices not associated with the transaction in error are not impacted by the error. Report non-fatal errors only to the endpoint that reported them. We really want to check for AER_NONFATAL here, but the current code structure doesn't allow that. Looking for pci_channel_io_normal is the best we can do now. Link: https://bugzilla.kernel.org/show_bug.cgi?id=197055 Fixes: 6c2b374d7485 ("PCI-Express AER implemetation: AER core and aerdriver") Signed-off-by: Gabriele Paoloni Signed-off-by: Dongdong Liu [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas drivers/pci/pcie/aer/aerdrv_core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit a0040c0145945d3bd203df8fa97f6dfa819f3f7d Author: Vitaly Kuznetsov Date: Thu Sep 14 16:50:14 2017 +0200 ACPI / PCI: Bail early in acpi_pci_add_bus() if there is no ACPI handle Hyper-V instances support PCI pass-through which is implemented through PV pci-hyperv driver. When a device is passed through, a new root PCI bus is created in the guest. The bus sits on top of VMBus and has no associated information in ACPI. acpi_pci_add_bus() in this case proceeds all the way to acpi_evaluate_dsm(), which reports ACPI: \: failed to evaluate _DSM (0x1001) While acpi_pci_slot_enumerate() and acpiphp_enumerate_slots() are protected against ACPI_HANDLE() being NULL and do nothing, acpi_evaluate_dsm() is not and gives us the error. It seems the correct fix is to not do anything in acpi_pci_add_bus() in such cases. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Bjorn Helgaas drivers/pci/pci-acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ac35264513e43634f127a92057f04a4b3c5cdbb Author: Kees Cook Date: Thu Oct 5 10:10:35 2017 -0700 timer: Fix two mistakes in callback conversions Two errors found their way into the timer callback conversions that weren't noticed with x86 allmodconfig. Reported-by: kernel test robot Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20171005171035.GA34831@beast drivers/hsi/clients/ssi_protocol.c | 2 +- drivers/s390/net/lcs.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 19ad683abc8534cd755403381c73c0ddce7b9f6d Author: anish kumar Date: Thu Sep 28 21:52:39 2017 -0700 ASoC: dapm: Avoid creating kcontrol for params Currently in codec to codec dai link if there are multiple params defined then dapm can use created kcontrol to decide which param to apply at runtime. However, in case there is only single param configuration then there is no point in creating the kcontrol and also there is no point in allocating memory for kcontrol. In the snd_soc_dapm_new_pcm function, there is memory allocation happening for kcontrol which is later used or not used based on num_param. It is better to not allocate memory when there is only a single configuration. This change is to remedy that anomaly. Signed-off-by: anish kumar Reviewed-by: Charles Keepax Tested-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 140 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 86 insertions(+), 54 deletions(-) commit a133552a0049aa2ff92f83dbe8d5185485b538c4 Author: Jérémy Lefaure Date: Sun Oct 1 15:30:47 2017 -0400 nfsd: use ARRAY_SIZE Using the ARRAY_SIZE macro improves the readability of the code. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfsd/fault_inject.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d47c8ad261f787af22a220ffcc2d07afba809223 Author: NeilBrown Date: Thu Oct 5 16:23:16 2017 +1100 md: fix deadlock error in recent patch. A recent patch aimed to cause md_write_start() to fail (rather than block) when the mddev was suspending, so as to avoid deadlocks. Unfortunately the test in wait_event() was wrong, and it didn't change behaviour at all. We wait_event() must wait until the metadata is written OR the array is suspending. Fixes: cc27b0c78c79 ("md: fix deadlock between mddev_suspend() and md_write_start()") Cc: stable@vger.kernel.org Reported-by: Xiao Ni Signed-off-by: NeilBrown Signed-off-by: Shaohua Li drivers/md/md.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3cf1934abe88103fcbeff88bbaee8a094502e6cb Author: Oscar Mateo Date: Wed Oct 4 08:39:52 2017 -0700 drm/i915/cnl: Do not add an extra page for precaution in the Gen10 LRC size BSpec indicates exactly 16752 DWORDs (17 pages), plus one page for PPHWSP. Please notice that, when looking at the BSpec context image table, the right filter has to be applied (e.g. "CNL") as some rows are excluded for specific GENs. BSpec: 1383 v2: Update count and add BSpec tag (Joonas) v3: Warning about filters in the commit message (Joonas) Suggested-by: Joonas Lahtinen Fixes: 7fd0b1a ("drm/i915/cnl: Add Gen10 LRC size") Signed-off-by: Oscar Mateo Cc: Rodrigo Vivi Cc: Daniele Ceraolo Spurio Cc: Ben Widawsky Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/1507131592-29209-1-git-send-email-oscar.mateo@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_engine_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70168a8d8bfe77b08beba91c742ed5b1d03452d8 Author: Pierre-Yves MORDRET Date: Fri Sep 22 09:31:00 2017 +0200 ARM: configs: stm32: Add DMAMUX support in STM32 defconfig This patch adds DMAMUX support in STM32 defconfig file Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Alexandre Torgue arch/arm/configs/stm32_defconfig | 1 + 1 file changed, 1 insertion(+) commit 83482ca3b4fe7312bf3d1f25c7a4e9ff66585eab Author: Arnd Bergmann Date: Thu Oct 5 14:08:26 2017 +0200 drm/i915: avoid potential uninitialized variable use One of the recent changes introduced a warning about undefined behavior in the sanity checking: drivers/gpu/drm/i915/intel_ddi.c: In function 'intel_ddi_hdmi_level': drivers/gpu/drm/i915/intel_ddi.c:654:6: error: 'n_hdmi_entries' may be used uninitialized in this function [-Werror=maybe-uninitialized] It seems that the new cnl specific get_buf_trans functions can return uninitialized data if the voltage level is set to an unexpected value. This changes the code to always return '1' in that error case, which seems like the safest choice as we use one less than the number as an array index later on. Fixes: cc9cabfdec38 ("drm/i915/cnl: Move voltage check into ddi buf trans functions.") Signed-off-by: Arnd Bergmann [danvet: shut up gcc comment added.] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171005120835.437022-1-arnd@arndb.de drivers/gpu/drm/i915/intel_ddi.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 764d2997ec0edbb48f12e6477ccaceecd999091d Author: Arnd Bergmann Date: Thu Oct 5 14:07:22 2017 +0200 drm/i915/selftests: fix check for intel IOMMU An earlier bugfix tried to work around this build failure: drivers/gpu/drm/i915/selftests/mock_gem_device.c: In function 'mock_gem_device': drivers/gpu/drm/i915/selftests/mock_gem_device.c:151:20: error: 'struct dev_archdata' has no member named 'iommu' Checking for CONFIG_IOMMU_API is not sufficient as a compile-time test since that may be enabled in configurations that have neither INTEL_IOMMU not AMD_IOMMU enabled. This changes the check to INTEL_IOMMU instead, as this is the only case we actually care about. Fixes: f46f156ea770 ("drm/i915/selftests: Only touch archdata.iommu when it exists") Signed-off-by: Arnd Bergmann Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171005120749.400818-1-arnd@arndb.de drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 288ef0cd2e80e721113d65259cee51129f50f664 Author: Alexandre Torgue Date: Fri Sep 29 16:51:58 2017 +0200 ARM: configs: stm32: Update default configuration for v4.14-rc1 Regenerate the default configuration on top of v4.14-rc1. Signed-off-by: Alexandre Torgue arch/arm/configs/stm32_defconfig | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit c1301077213d4dca34f01fc372b64d3c4a49a437 Author: Ladislav Michl Date: Thu Oct 5 09:11:06 2017 -0300 [media] media: rc: fix gpio-ir-receiver build failure The 0-day robot reports: drivers/media/rc/gpio-ir-recv.c: In function 'gpio_ir_recv_irq': >> drivers/media/rc/gpio-ir-recv.c:38:8: error: implicit declaration of function 'gpiod_get_value' [-Werror=implicit-function-declaration] Fixes: eed008e605d1 ("[media] media: rc: gpio-ir-recv: use gpiolib API") For some reason only partial patch was applied. Also include gpio/consumer.h otherwise compile test fails. Reported-by: kbuild test robot Signed-off-by: Ladislav Michl Acked-by: Sean Young drivers/media/rc/Kconfig | 1 + drivers/media/rc/gpio-ir-recv.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 3a9fce327ff9cabf7f89d3f20616a83af28393da Merge: e195a33 394ca81 Author: Takashi Iwai Date: Thu Oct 5 15:08:57 2017 +0200 Merge branch 'topic/timer-api' into for-next commit 8c20feb60604d91a29cd7fef8ac758bd92d9fd2c Author: Kees Cook Date: Wed Oct 4 16:27:07 2017 -0700 workqueue: Convert callback to use from_timer() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch workqueue to use from_timer() and pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: linux-mips@linux-mips.org Cc: Petr Mladek Cc: Benjamin Herrenschmidt Cc: Lai Jiangshan Cc: Sebastian Reichel Cc: Kalle Valo Cc: Paul Mackerras Cc: Pavel Machek Cc: linux1394-devel@lists.sourceforge.net Cc: Chris Metcalf Cc: linux-s390@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: "James E.J. Bottomley" Cc: Wim Van Sebroeck Cc: Michael Ellerman Cc: Ursula Braun Cc: Geert Uytterhoeven Cc: Viresh Kumar Cc: Harish Patil Cc: Stephen Boyd Cc: Guenter Roeck Cc: Manish Chopra Cc: Len Brown Cc: Arnd Bergmann Cc: linux-pm@vger.kernel.org Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Julian Wiedmann Cc: John Stultz Cc: Mark Gross Cc: linux-watchdog@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: "Martin K. Petersen" Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Oleg Nesterov Cc: Ralf Baechle Cc: Stefan Richter Cc: Michael Reed Cc: netdev@vger.kernel.org Cc: Tejun Heo Cc: Andrew Morton Cc: linuxppc-dev@lists.ozlabs.org Cc: Sudip Mukherjee Link: https://lkml.kernel.org/r/1507159627-127660-14-git-send-email-keescook@chromium.org include/linux/workqueue.h | 15 ++++++++------- kernel/workqueue.c | 7 +++---- 2 files changed, 11 insertions(+), 11 deletions(-) commit fe5c3b69b540e3387223a696f327c1bb8880d1ac Author: Kees Cook Date: Wed Oct 4 16:27:06 2017 -0700 kthread: Convert callback to use from_timer() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch kthread to use from_timer() and pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: linux-mips@linux-mips.org Cc: Len Brown Cc: Benjamin Herrenschmidt Cc: Lai Jiangshan Cc: Sebastian Reichel Cc: Kalle Valo Cc: Paul Mackerras Cc: Pavel Machek Cc: linux1394-devel@lists.sourceforge.net Cc: Chris Metcalf Cc: linux-s390@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: "James E.J. Bottomley" Cc: Wim Van Sebroeck Cc: Michael Ellerman Cc: Ursula Braun Cc: Geert Uytterhoeven Cc: Viresh Kumar Cc: Harish Patil Cc: Stephen Boyd Cc: Guenter Roeck Cc: Manish Chopra Cc: Petr Mladek Cc: Arnd Bergmann Cc: linux-pm@vger.kernel.org Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Julian Wiedmann Cc: John Stultz Cc: Mark Gross Cc: linux-watchdog@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: "Martin K. Petersen" Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Oleg Nesterov Cc: Ralf Baechle Cc: Stefan Richter Cc: Michael Reed Cc: netdev@vger.kernel.org Cc: Tejun Heo Cc: Andrew Morton Cc: linuxppc-dev@lists.ozlabs.org Cc: Sudip Mukherjee Link: https://lkml.kernel.org/r/1507159627-127660-13-git-send-email-keescook@chromium.org include/linux/kthread.h | 10 +++++----- kernel/kthread.c | 10 ++++------ 2 files changed, 9 insertions(+), 11 deletions(-) commit 8ede369b2cccfa585e2969bbed18edc0e2a18c50 Author: Kees Cook Date: Wed Oct 4 16:27:05 2017 -0700 timer: Remove expires argument from __TIMER_INITIALIZER() The expires field is normally initialized during the first mod_timer() call. It was unused by all callers, so remove it from the macro. Signed-off-by: Kees Cook Cc: linux-mips@linux-mips.org Cc: Petr Mladek Cc: Benjamin Herrenschmidt Cc: Lai Jiangshan Cc: Sebastian Reichel Cc: Kalle Valo Cc: Paul Mackerras Cc: Pavel Machek Cc: linux1394-devel@lists.sourceforge.net Cc: Chris Metcalf Cc: linux-s390@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: "James E.J. Bottomley" Cc: Wim Van Sebroeck Cc: Michael Ellerman Cc: Ursula Braun Cc: Geert Uytterhoeven Cc: Viresh Kumar Cc: Harish Patil Cc: Stephen Boyd Cc: Michael Reed Cc: Manish Chopra Cc: Len Brown Cc: Arnd Bergmann Cc: linux-pm@vger.kernel.org Cc: Heiko Carstens Cc: Tejun Heo Cc: Julian Wiedmann Cc: John Stultz Cc: Mark Gross Cc: linux-watchdog@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: "Martin K. Petersen" Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Oleg Nesterov Cc: Ralf Baechle Cc: Stefan Richter Cc: Guenter Roeck Cc: netdev@vger.kernel.org Cc: Martin Schwidefsky Cc: Andrew Morton Cc: linuxppc-dev@lists.ozlabs.org Cc: Sudip Mukherjee Link: https://lkml.kernel.org/r/1507159627-127660-12-git-send-email-keescook@chromium.org Signed-off-by: Thomas Gleixner include/linux/kthread.h | 2 +- include/linux/timer.h | 5 ++--- include/linux/workqueue.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) commit 1d27e3e2252ba9d949ca82fbdb73cde102cb2067 Author: Kees Cook Date: Wed Oct 4 16:27:04 2017 -0700 timer: Remove expires and data arguments from DEFINE_TIMER Drop the arguments from the macro and adjust all callers with the following script: perl -pi -e 's/DEFINE_TIMER\((.*), 0, 0\);/DEFINE_TIMER($1);/g;' \ $(git grep DEFINE_TIMER | cut -d: -f1 | sort -u | grep -v timer.h) Signed-off-by: Kees Cook Acked-by: Geert Uytterhoeven # for m68k parts Acked-by: Guenter Roeck # for watchdog parts Acked-by: David S. Miller # for networking parts Acked-by: Greg Kroah-Hartman Acked-by: Kalle Valo # for wireless parts Acked-by: Arnd Bergmann Cc: linux-mips@linux-mips.org Cc: Petr Mladek Cc: Benjamin Herrenschmidt Cc: Lai Jiangshan Cc: Sebastian Reichel Cc: Kalle Valo Cc: Paul Mackerras Cc: Pavel Machek Cc: linux1394-devel@lists.sourceforge.net Cc: Chris Metcalf Cc: linux-s390@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: "James E.J. Bottomley" Cc: Wim Van Sebroeck Cc: Michael Ellerman Cc: Ursula Braun Cc: Viresh Kumar Cc: Harish Patil Cc: Stephen Boyd Cc: Michael Reed Cc: Manish Chopra Cc: Len Brown Cc: Arnd Bergmann Cc: linux-pm@vger.kernel.org Cc: Heiko Carstens Cc: Tejun Heo Cc: Julian Wiedmann Cc: John Stultz Cc: Mark Gross Cc: linux-watchdog@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: "Martin K. Petersen" Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Oleg Nesterov Cc: Ralf Baechle Cc: Stefan Richter Cc: Guenter Roeck Cc: netdev@vger.kernel.org Cc: Martin Schwidefsky Cc: Andrew Morton Cc: linuxppc-dev@lists.ozlabs.org Cc: Sudip Mukherjee Link: https://lkml.kernel.org/r/1507159627-127660-11-git-send-email-keescook@chromium.org Signed-off-by: Thomas Gleixner arch/arm/mach-ixp4xx/dsmg600-setup.c | 2 +- arch/arm/mach-ixp4xx/nas100d-setup.c | 2 +- arch/m68k/amiga/amisound.c | 2 +- arch/m68k/mac/macboing.c | 2 +- arch/mips/mti-malta/malta-display.c | 2 +- arch/parisc/kernel/pdc_cons.c | 2 +- arch/s390/mm/cmm.c | 2 +- drivers/atm/idt77105.c | 4 ++-- drivers/atm/iphase.c | 2 +- drivers/block/ataflop.c | 8 ++++---- drivers/char/dtlk.c | 2 +- drivers/char/hangcheck-timer.c | 2 +- drivers/char/nwbutton.c | 2 +- drivers/char/rtc.c | 2 +- drivers/input/touchscreen/s3c2410_ts.c | 2 +- drivers/net/cris/eth_v10.c | 6 +++--- drivers/net/hamradio/yam.c | 2 +- drivers/net/wireless/atmel/at76c50x-usb.c | 2 +- drivers/staging/speakup/main.c | 2 +- drivers/staging/speakup/synth.c | 2 +- drivers/tty/cyclades.c | 2 +- drivers/tty/isicom.c | 2 +- drivers/tty/moxa.c | 2 +- drivers/tty/rocket.c | 2 +- drivers/tty/vt/keyboard.c | 2 +- drivers/tty/vt/vt.c | 2 +- drivers/watchdog/alim7101_wdt.c | 2 +- drivers/watchdog/machzwd.c | 2 +- drivers/watchdog/mixcomwd.c | 2 +- drivers/watchdog/sbc60xxwdt.c | 2 +- drivers/watchdog/sc520_wdt.c | 2 +- drivers/watchdog/via_wdt.c | 2 +- drivers/watchdog/w83877f_wdt.c | 2 +- drivers/xen/grant-table.c | 2 +- fs/pstore/platform.c | 2 +- include/linux/timer.h | 4 ++-- kernel/irq/spurious.c | 2 +- lib/random32.c | 2 +- net/atm/mpc.c | 2 +- net/decnet/dn_route.c | 2 +- net/ipv6/ip6_flowlabel.c | 2 +- net/netrom/nr_loopback.c | 2 +- security/keys/gc.c | 2 +- sound/oss/midibuf.c | 2 +- sound/oss/soundcard.c | 2 +- sound/oss/sys_timer.c | 2 +- sound/oss/uart6850.c | 2 +- 47 files changed, 54 insertions(+), 54 deletions(-) commit 1ff97897454b9a59edc7cf2cf2d95586b1e7a2cf Author: Kees Cook Date: Wed Oct 4 16:27:03 2017 -0700 timer: Remove users of expire and data arguments to DEFINE_TIMER The expire and data arguments of DEFINE_TIMER are only used in two places and are ignored by the code (malta-display.c only uses mod_timer(), never add_timer(), so the preset expires value is ignored). Set both sets of arguments to zero. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Acked-by: Guenter Roeck # for watchdog parts Cc: linux-mips@linux-mips.org Cc: Petr Mladek Cc: Benjamin Herrenschmidt Cc: Lai Jiangshan Cc: Oleg Nesterov Cc: Wim Van Sebroeck Cc: Paul Mackerras Cc: Pavel Machek Cc: linux1394-devel@lists.sourceforge.net Cc: linux-s390@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org Cc: Michael Ellerman Cc: Ursula Braun Cc: Geert Uytterhoeven Cc: Viresh Kumar Cc: Harish Patil Cc: Stephen Boyd Cc: Guenter Roeck Cc: Manish Chopra Cc: Len Brown Cc: Chris Metcalf Cc: Arnd Bergmann Cc: linux-pm@vger.kernel.org Cc: Heiko Carstens Cc: Tejun Heo Cc: Julian Wiedmann Cc: John Stultz Cc: Sebastian Reichel Cc: Mark Gross Cc: linux-watchdog@vger.kernel.org Cc: "Martin K. Petersen" Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Kalle Valo Cc: Ralf Baechle Cc: Stefan Richter Cc: Michael Reed Cc: netdev@vger.kernel.org Cc: Martin Schwidefsky Cc: Andrew Morton Cc: linuxppc-dev@lists.ozlabs.org Cc: Sudip Mukherjee Link: https://lkml.kernel.org/r/1507159627-127660-10-git-send-email-keescook@chromium.org arch/mips/mti-malta/malta-display.c | 6 +++--- drivers/watchdog/alim7101_wdt.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit fca7ce5b7c6d3eda8c2e011cff98d22e0fbd5097 Author: Kees Cook Date: Wed Oct 4 16:27:02 2017 -0700 timer: Remove unused static initializer macros This removes the now unused TIMER_*INITIALIZER macros: TIMER_INITIALIZER TIMER_PINNED_INITIALIZER TIMER_DEFERRED_INITIALIZER TIMER_PINNED_DEFERRED_INITIALIZER Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: linux-mips@linux-mips.org Cc: Petr Mladek Cc: Benjamin Herrenschmidt Cc: Lai Jiangshan Cc: Sebastian Reichel Cc: Kalle Valo Cc: Paul Mackerras Cc: Pavel Machek Cc: linux1394-devel@lists.sourceforge.net Cc: Chris Metcalf Cc: linux-s390@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: "James E.J. Bottomley" Cc: Wim Van Sebroeck Cc: Michael Ellerman Cc: Ursula Braun Cc: Geert Uytterhoeven Cc: Viresh Kumar Cc: Harish Patil Cc: Stephen Boyd Cc: Michael Reed Cc: Manish Chopra Cc: Len Brown Cc: Arnd Bergmann Cc: linux-pm@vger.kernel.org Cc: Heiko Carstens Cc: Tejun Heo Cc: Julian Wiedmann Cc: John Stultz Cc: Mark Gross Cc: linux-watchdog@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: "Martin K. Petersen" Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Oleg Nesterov Cc: Ralf Baechle Cc: Stefan Richter Cc: Guenter Roeck Cc: netdev@vger.kernel.org Cc: Martin Schwidefsky Cc: Andrew Morton Cc: linuxppc-dev@lists.ozlabs.org Cc: Sudip Mukherjee Link: https://lkml.kernel.org/r/1507159627-127660-9-git-send-email-keescook@chromium.org include/linux/timer.h | 12 ------------ 1 file changed, 12 deletions(-) commit 51487d9ed1e386f9f0863bbf385e5da8a586bff8 Author: Kees Cook Date: Wed Oct 4 16:27:01 2017 -0700 timer: Remove last user of TIMER_INITIALIZER Drops the last user of TIMER_INITIALIZER and adapts timer.h to use the internal version. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: linux-mips@linux-mips.org Cc: Petr Mladek Cc: Benjamin Herrenschmidt Cc: Lai Jiangshan Cc: Sebastian Reichel Cc: Kalle Valo Cc: Paul Mackerras Cc: Pavel Machek Cc: linux1394-devel@lists.sourceforge.net Cc: Chris Metcalf Cc: linux-s390@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: Mark Gross Cc: Wim Van Sebroeck Cc: Michael Ellerman Cc: Ursula Braun Cc: Geert Uytterhoeven Cc: Viresh Kumar Cc: Harish Patil Cc: Stephen Boyd Cc: Michael Reed Cc: Manish Chopra Cc: Len Brown Cc: Arnd Bergmann Cc: linux-pm@vger.kernel.org Cc: Heiko Carstens Cc: Tejun Heo Cc: Julian Wiedmann Cc: John Stultz Cc: "James E.J. Bottomley" Cc: linux-watchdog@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: "Martin K. Petersen" Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Oleg Nesterov Cc: Ralf Baechle Cc: Stefan Richter Cc: Guenter Roeck Cc: netdev@vger.kernel.org Cc: Martin Schwidefsky Cc: Andrew Morton Cc: linuxppc-dev@lists.ozlabs.org Cc: Sudip Mukherjee Link: https://lkml.kernel.org/r/1507159627-127660-8-git-send-email-keescook@chromium.org drivers/char/tlclk.c | 12 +++++------- include/linux/timer.h | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) commit 5cd79d6abd2c142352dead0e3df04e86ee32f5d3 Author: Kees Cook Date: Wed Oct 4 16:27:00 2017 -0700 timer: Remove users of TIMER_DEFERRED_INITIALIZER This removes uses of TIMER_DEFERRED_INITIALIZER and chooses a location to call timer_setup() from before add_timer() or mod_timer() is called. Adjusts callbacks to use from_timer() as needed. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: linux-mips@linux-mips.org Cc: Petr Mladek Cc: Benjamin Herrenschmidt Cc: Lai Jiangshan Cc: Sebastian Reichel Cc: Kalle Valo Cc: Paul Mackerras Cc: Pavel Machek Cc: linux1394-devel@lists.sourceforge.net Cc: Chris Metcalf Cc: linux-s390@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: "James E.J. Bottomley" Cc: Wim Van Sebroeck Cc: Michael Ellerman Cc: Ursula Braun Cc: Geert Uytterhoeven Cc: Viresh Kumar Cc: Harish Patil Cc: Stephen Boyd Cc: Guenter Roeck Cc: Manish Chopra Cc: Len Brown Cc: Arnd Bergmann Cc: linux-pm@vger.kernel.org Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Julian Wiedmann Cc: John Stultz Cc: Mark Gross Cc: linux-watchdog@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: "Martin K. Petersen" Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Oleg Nesterov Cc: Ralf Baechle Cc: Stefan Richter Cc: Michael Reed Cc: netdev@vger.kernel.org Cc: Tejun Heo Cc: Andrew Morton Cc: linuxppc-dev@lists.ozlabs.org Cc: Sudip Mukherjee Link: https://lkml.kernel.org/r/1507159627-127660-7-git-send-email-keescook@chromium.org arch/s390/kernel/lgr.c | 6 +++--- arch/s390/kernel/topology.c | 6 +++--- kernel/workqueue.c | 8 +++----- 3 files changed, 9 insertions(+), 11 deletions(-) commit df7e828c1b699792b2ff26ebcf0a6d1025b2b790 Author: Kees Cook Date: Wed Oct 4 16:26:59 2017 -0700 timer: Remove init_timer_deferrable() in favor of timer_setup() This refactors the only users of init_timer_deferrable() to use the new timer_setup() and from_timer(). Removes definition of init_timer_deferrable(). Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Acked-by: David S. Miller # for networking parts Acked-by: Sebastian Reichel # for drivers/hsi parts Cc: linux-mips@linux-mips.org Cc: Petr Mladek Cc: Benjamin Herrenschmidt Cc: Lai Jiangshan Cc: Oleg Nesterov Cc: Kalle Valo Cc: Paul Mackerras Cc: Pavel Machek Cc: linux1394-devel@lists.sourceforge.net Cc: Chris Metcalf Cc: linux-s390@vger.kernel.org Cc: "James E.J. Bottomley" Cc: Wim Van Sebroeck Cc: Michael Ellerman Cc: Ursula Braun Cc: Geert Uytterhoeven Cc: Viresh Kumar Cc: Harish Patil Cc: Stephen Boyd Cc: Guenter Roeck Cc: Manish Chopra Cc: Len Brown Cc: Arnd Bergmann Cc: linux-pm@vger.kernel.org Cc: Heiko Carstens Cc: Tejun Heo Cc: Julian Wiedmann Cc: John Stultz Cc: Mark Gross Cc: "Rafael J. Wysocki" Cc: linux-watchdog@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: "Martin K. Petersen" Cc: Greg Kroah-Hartman Cc: linux-wireless@vger.kernel.org Cc: Sebastian Reichel Cc: Ralf Baechle Cc: Stefan Richter Cc: Michael Reed Cc: netdev@vger.kernel.org Cc: Martin Schwidefsky Cc: Andrew Morton Cc: linuxppc-dev@lists.ozlabs.org Cc: Sudip Mukherjee Link: https://lkml.kernel.org/r/1507159627-127660-6-git-send-email-keescook@chromium.org arch/powerpc/mm/numa.c | 12 +++++------ drivers/hsi/clients/ssi_protocol.c | 32 ++++++++++++++++------------ drivers/net/ethernet/qlogic/qlge/qlge_main.c | 11 ++++------ drivers/net/vxlan.c | 8 +++---- drivers/net/wireless/ath/ath6kl/recovery.c | 9 ++++---- include/linux/timer.h | 2 -- 6 files changed, 34 insertions(+), 40 deletions(-) commit 185981d54a60ae90942c6ba9006b250f3348cef2 Author: Kees Cook Date: Wed Oct 4 16:26:58 2017 -0700 timer: Remove init_timer_pinned() in favor of timer_setup() This refactors the only users of init_timer_pinned() to use the new timer_setup() and from_timer(). Drops the definition of init_timer_pinned(). Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Acked-by: David S. Miller # for networking parts Cc: linux-mips@linux-mips.org Cc: Petr Mladek Cc: Benjamin Herrenschmidt Cc: Lai Jiangshan Cc: Sebastian Reichel Cc: Kalle Valo Cc: Paul Mackerras Cc: Pavel Machek Cc: linux1394-devel@lists.sourceforge.net Cc: Chris Metcalf Cc: linux-s390@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: "James E.J. Bottomley" Cc: Wim Van Sebroeck Cc: Michael Ellerman Cc: Ursula Braun Cc: Geert Uytterhoeven Cc: Viresh Kumar Cc: Harish Patil Cc: Stephen Boyd Cc: Guenter Roeck Cc: Manish Chopra Cc: Len Brown Cc: Arnd Bergmann Cc: linux-pm@vger.kernel.org Cc: Heiko Carstens Cc: Tejun Heo Cc: Julian Wiedmann Cc: John Stultz Cc: Mark Gross Cc: linux-watchdog@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: "Martin K. Petersen" Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Oleg Nesterov Cc: Ralf Baechle Cc: Stefan Richter Cc: Michael Reed Cc: netdev@vger.kernel.org Cc: Martin Schwidefsky Cc: Andrew Morton Cc: linuxppc-dev@lists.ozlabs.org Cc: Sudip Mukherjee Link: https://lkml.kernel.org/r/1507159627-127660-5-git-send-email-keescook@chromium.org drivers/net/ethernet/tile/tilepro.c | 9 ++++----- include/linux/timer.h | 2 -- 2 files changed, 4 insertions(+), 7 deletions(-) commit 9c6c273aa4248c60569de6ef7e7e9c7bed3cd32e Author: Kees Cook Date: Wed Oct 4 16:26:57 2017 -0700 timer: Remove init_timer_on_stack() in favor of timer_setup_on_stack() Remove uses of init_timer_on_stack() with open-coded function and data assignments that could be expressed using timer_setup_on_stack(). Several were removed from the stack entirely since there was a one-to-one mapping of parent structure to timer, those are switched to using timer_setup() instead. All related callbacks were adjusted to use from_timer(). Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: linux-mips@linux-mips.org Cc: Petr Mladek Cc: Benjamin Herrenschmidt Cc: Heiko Carstens Cc: Sebastian Reichel Cc: Kalle Valo Cc: Paul Mackerras Cc: Pavel Machek Cc: Wim Van Sebroeck Cc: linux1394-devel@lists.sourceforge.net Cc: Chris Metcalf Cc: linux-s390@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org Cc: Michael Ellerman Cc: Ursula Braun Cc: Geert Uytterhoeven Cc: Viresh Kumar Cc: Harish Patil Cc: Stephen Boyd Cc: Michael Reed Cc: Manish Chopra Cc: Len Brown Cc: Arnd Bergmann Cc: linux-pm@vger.kernel.org Cc: Lai Jiangshan Cc: Tejun Heo Cc: Julian Wiedmann Cc: John Stultz Cc: Mark Gross Cc: linux-watchdog@vger.kernel.org Cc: "Martin K. Petersen" Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Oleg Nesterov Cc: Ralf Baechle Cc: Stefan Richter Cc: Guenter Roeck Cc: netdev@vger.kernel.org Cc: Martin Schwidefsky Cc: Andrew Morton Cc: linuxppc-dev@lists.ozlabs.org Cc: Sudip Mukherjee Link: https://lkml.kernel.org/r/1507159627-127660-4-git-send-email-keescook@chromium.org drivers/base/power/main.c | 8 +++----- drivers/firewire/core-transaction.c | 10 +++++----- drivers/parport/ieee1284.c | 21 +++++++-------------- drivers/s390/char/tape.h | 1 + drivers/s390/char/tape_std.c | 18 ++++++------------ drivers/s390/net/lcs.c | 16 ++++++---------- drivers/s390/net/lcs.h | 1 + drivers/scsi/qla1280.c | 14 +++++--------- drivers/scsi/qla1280.h | 1 + include/linux/parport.h | 1 + include/linux/timer.h | 2 -- 11 files changed, 36 insertions(+), 57 deletions(-) commit 1d1fe902afb380571105d05d0be3de61b81bc9a8 Author: Kees Cook Date: Wed Oct 4 16:26:56 2017 -0700 timer: Remove init_timer_pinned_deferrable() in favor of timer_setup() This refactors the only user of init_timer_pinned_deferrable() to use the new timer_setup() and from_timer(). Adds a pointer back to the policy, and drops the definition of init_timer_pinned_deferrable(). Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: linux-mips@linux-mips.org Cc: Petr Mladek Cc: Benjamin Herrenschmidt Cc: Lai Jiangshan Cc: Sebastian Reichel Cc: Kalle Valo Cc: Paul Mackerras Cc: Pavel Machek Cc: linux1394-devel@lists.sourceforge.net Cc: Chris Metcalf Cc: linux-s390@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: "James E.J. Bottomley" Cc: Wim Van Sebroeck Cc: Michael Ellerman Cc: Ursula Braun Cc: Geert Uytterhoeven Cc: Viresh Kumar Cc: Harish Patil Cc: Stephen Boyd Cc: Guenter Roeck Cc: Manish Chopra Cc: Len Brown Cc: Arnd Bergmann Cc: linux-pm@vger.kernel.org Cc: Heiko Carstens Cc: Tejun Heo Cc: Julian Wiedmann Cc: John Stultz Cc: Mark Gross Cc: linux-watchdog@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: "Martin K. Petersen" Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Oleg Nesterov Cc: Ralf Baechle Cc: Stefan Richter Cc: Michael Reed Cc: netdev@vger.kernel.org Cc: Martin Schwidefsky Cc: Andrew Morton Cc: linuxppc-dev@lists.ozlabs.org Cc: Sudip Mukherjee Link: https://lkml.kernel.org/r/1507159627-127660-3-git-send-email-keescook@chromium.org drivers/cpufreq/powernv-cpufreq.c | 13 +++++++------ include/linux/timer.h | 2 -- 2 files changed, 7 insertions(+), 8 deletions(-) commit 58e1177b4cd10b0d358faf7d7ebb3779f98bc3ea Author: Kees Cook Date: Wed Oct 4 16:26:55 2017 -0700 timer: Convert schedule_timeout() to use from_timer() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new from_timer() helper and passing the timer pointer explicitly. Since this special timer is on the stack, it needs to have a wrapper structure to carry state once .data is eliminated. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Cc: linux-mips@linux-mips.org Cc: Petr Mladek Cc: Benjamin Herrenschmidt Cc: Lai Jiangshan Cc: Sebastian Reichel Cc: Kalle Valo Cc: Paul Mackerras Cc: Pavel Machek Cc: linux1394-devel@lists.sourceforge.net Cc: Chris Metcalf Cc: linux-s390@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: "James E.J. Bottomley" Cc: Wim Van Sebroeck Cc: Michael Ellerman Cc: Ursula Braun Cc: Geert Uytterhoeven Cc: Viresh Kumar Cc: Harish Patil Cc: Guenter Roeck Cc: Manish Chopra Cc: Len Brown Cc: Arnd Bergmann Cc: linux-pm@vger.kernel.org Cc: Heiko Carstens Cc: Tejun Heo Cc: Julian Wiedmann Cc: John Stultz Cc: Mark Gross Cc: "Rafael J. Wysocki" Cc: linux-watchdog@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: "Martin K. Petersen" Cc: Greg Kroah-Hartman Cc: Stephen Boyd Cc: Oleg Nesterov Cc: Ralf Baechle Cc: Stefan Richter Cc: Michael Reed Cc: netdev@vger.kernel.org Cc: Martin Schwidefsky Cc: Andrew Morton Cc: linuxppc-dev@lists.ozlabs.org Cc: Sudip Mukherjee Link: https://lkml.kernel.org/r/1507159627-127660-2-git-send-email-keescook@chromium.org include/linux/timer.h | 8 ++++++++ kernel/time/timer.c | 26 +++++++++++++++++++------- 2 files changed, 27 insertions(+), 7 deletions(-) commit 26eafeaab917dd228d292f362be1577c9b4b2e77 Merge: 4c3711d d81fa66 Author: Thomas Gleixner Date: Thu Oct 5 14:42:39 2017 +0200 Merge branch 'linus' into timers/core Pick up upstream changes to get the prerequisites for the timer changes. commit 92bb6cb1403015b1b9520332c8f2ad983c220f67 Author: Kees Cook Date: Wed Oct 4 17:54:25 2017 -0700 x86/mce: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Adjust sanity-check WARN to make sure the triggering timer matches the current CPU timer. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Cc: Tony Luck Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/20171005005425.GA23950@beast arch/x86/kernel/cpu/mcheck/mce.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit e91ef99b95439fc634e9c9753887d363a848f452 Author: Chris Wilson Date: Thu Oct 5 11:59:27 2017 +0100 drm/i915/selftests: Remember to create the fake preempt context For the fake device we have our own set of mock contexts that need to match the real contexts we normally create. Currently this requires us to manually instantiate them for the selftests, which I forgot. Reported-by: Matthew Auld Fixes: e7af3116836f ("drm/i915: Introduce a preempt context") Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Joonas Lahtinen Cc: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20171005105927.22991-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/selftests/mock_gem_device.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 3916a4135c696fa226a1abe6d6a0ff7f5edd9a7c Author: Jithu Joseph Date: Wed Oct 4 15:48:57 2017 -0700 x86/intel_rdt: Remove redundant assignment The assignment to the 'files' variable is immediately overwritten in the following line. Remove the older assignment, which was meant specifially for creating control groups files. Fixes: c7d9aac61311 ("x86/intel_rdt/cqm: Add mkdir support for RDT monitoring") Reported-by: Reinette Chatre Signed-off-by: Jithu Joseph Signed-off-by: Thomas Gleixner Acked-by: Fenghua Yu Cc: tony.luck@intel.com Cc: vikas.shivappa@intel.com Link: https://lkml.kernel.org/r/1507157337-18118-1-git-send-email-jithu.joseph@intel.com arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 1 - 1 file changed, 1 deletion(-) commit 5fd88b60e11b7d81b2c944c1b45834c4a6aa0157 Author: Colin Ian King Date: Mon Oct 2 15:59:31 2017 +0100 x86/intel_rdt/cqm: Make integer rmid_limbo_count static rmid_limbo_count is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'rmid_limbo_count' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Thomas Gleixner Cc: Fenghua Yu Cc: kernel-janitors@vger.kernel.org Link: https://lkml.kernel.org/r/20171002145931.27479-1-colin.king@canonical.com arch/x86/kernel/cpu/intel_rdt_monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 541527728341b4bb9a5e3428b0eec450f1b3d8d5 Author: Rafael J. Wysocki Date: Mon Sep 25 01:30:51 2017 +0200 PM: i2c-designware-platdrv: Suspend/resume at the late/early stages As reported by Rajat Jain, there are problems when ACPI operation region handlers or similar, called at the ->resume_early() time, for I2C client devices try to access an I2C controller that has already been suspended at that point. To avoid that, move the suspend/resume of i2c-designware-platdrv to the late/early stages, respectively. While at it, avoid resuming the device from runtime suspend in the driver's ->suspend callback which isn't particularly nice. [A better approach would be to make the driver track the PM state of the device so that it doesn't need to resume it in ->suspend, so implement it.] First, drop dw_i2c_plat_suspend() added by commit a23318feeff6 (i2c: designware: Fix system suspend) and rename dw_i2c_plat_runtime_suspend() back to dw_i2c_plat_suspend(). Second, point the driver's ->late_suspend and ->early_resume callbacks, rather than its ->suspend and ->resume callbacks, to dw_i2c_plat_suspend() and dw_i2c_plat_resume(), respectively, so that they are not executed in parallel with each other, for example if runtime resume of the device takes place during system suspend. Finally, add "suspended" and "skip_resume" flags to struct dw_i2c_dev and make dw_i2c_plat_suspend() and dw_i2c_plat_resume() use them to avoid suspending or resuming the device twice in a row and to avoid resuming a previously runtime-suspended device during system resume. Signed-off-by: Rafael J. Wysocki Tested-by: Jarkko Nikula Tested-by: Mika Westerberg Tested-by: Johannes Stezenbach Tested-by: Rajat Jain Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-core.h | 2 ++ drivers/i2c/busses/i2c-designware-platdrv.c | 33 +++++++++++++++++------------ 2 files changed, 22 insertions(+), 13 deletions(-) commit e00952c7904a34359872813c3b072eba55065090 Author: Rafael J. Wysocki Date: Mon Sep 25 01:20:35 2017 +0200 PM / mfd: intel-lpss: Push system sleep callbacks to late/early stages Push the system suspend/resume callbacks of intel-lpss to the late suspend/early resume stages to allow child device callbacks to be pushed to the late/early stages of suspend/resume too, so as to make it possible to avoid resuming the children if they are runtime- suspended during system suspend going forward. Signed-off-by: Rafael J. Wysocki Tested-by: Jarkko Nikula Tested-by: Mika Westerberg Tested-by: Johannes Stezenbach Tested-by: Rajat Jain Acked-by: Lee Jones Signed-off-by: Wolfram Sang drivers/mfd/intel-lpss.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 126dbc6b49c8670ebe78174c159520d5993b4459 Author: Rafael J. Wysocki Date: Mon Sep 25 23:10:06 2017 +0200 PM: i2c-designware-platdrv: Clean up PM handling in probe The power management handling in dw_i2c_plat_probe() is somewhat messy and it is rather hard to figure out the code intention for the case when pm_disabled is set. In that case, the driver doesn't enable runtime PM at all, but in addition to that it calls pm_runtime_forbid() as though it wasn't sure if runtime PM might be enabled for the device later by someone else. Although that concern doesn't seem to be actually valid, the device is clearly still expected to be PM-capable even in the pm_disabled set case, so a better approach would be to enable runtime PM for it unconditionally and prevent it from being runtime-suspended by using pm_runtime_get_noresume(). Make the driver do that. Signed-off-by: Rafael J. Wysocki Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-designware-platdrv.c | 34 +++++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) commit 5c7ae6467df557f25daf42e78202531bc44c83df Author: Heiner Kallweit Date: Wed Oct 4 21:05:17 2017 +0200 firmware: arm_scpi: improve struct sensor_value lo_val and hi_val together in this order are a little endian 64 bit value. Therefore we can simplify struct sensor_value and the code by defining it as a __le64 value and by using le64_to_cpu. Signed-off-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 4864dca72d3fb2586ffee0c92bd13d02cedfee2f Author: Heiner Kallweit Date: Wed Oct 4 21:00:39 2017 +0200 firmware: arm_scpi: improve handling of protocol and firmware version subfields By using FIELD_GET and proper masks we can avoid quite some shifting and masking macro magic and make the code better readable. Signed-off-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) commit d9e324ea138b43c2cfb6b01e3ae02a84be55aef4 Author: Heiner Kallweit Date: Wed Oct 4 20:56:44 2017 +0200 firmware: arm_scpi: improve struct dvfs_info to make code better readable Making the header subfields members of struct dvfs_info allows to make the code better readable and avoids some macro magic. In addition remove a useless statement using info->latency. Signed-off-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit b4062b46daabc6c0e88fa8dde8e2128138713b48 Author: Geert Uytterhoeven Date: Thu Oct 5 12:14:00 2017 +0200 pinctrl: sh-pfc: r8a7795: Restore sort order Move the SCIF_CLK pins where they belong. Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit abc053c869b6f185d2eece2aa407d82014f22280 Author: Geert Uytterhoeven Date: Thu Oct 5 12:12:51 2017 +0200 pinctrl: sh-pfc: r8a7795-es1: Restore sort order Move the USB30 pins where they belong. Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 34 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 0e813df73f0add8ded45116d67b8372add923cb9 Author: Pierre-Yves MORDRET Date: Thu Oct 5 11:51:21 2017 +0200 ARM: dts: stm32: Add I2C1 support for STM32F746 SoC This patch adds I2C1 support for STM32F746 SoC. Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Alexandre Torgue arch/arm/boot/dts/stm32f746.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit af42377978852234974c26efcca3d70eb86bd349 Author: Arvind Yadav Date: Mon Sep 25 17:34:27 2017 +0530 HID: hyperv: pr_err() strings should end with newlines pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav Signed-off-by: Jiri Kosina drivers/hid/hid-hyperv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62cea6d2c6758d6a9513ecf3c70498623d5bf1d2 Author: Jacopo Mondi Date: Thu Oct 5 10:58:19 2017 +0200 ARM: dts: gr-peach: Enable MTU2 timer pulse unit MTU2 multi-function/multi-channel timer/counter is not enabled for GR-Peach board. The timer is used as clock event source to schedule wake-ups, and without this enabled all sleeps not performed through busy waiting hang the board. Signed-off-by: Jacopo Mondi Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100-gr-peach.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 4f049e09d833dd9b8c2b0cf7a609d9fc5f9d6348 Author: Jacopo Mondi Date: Thu Oct 5 10:58:18 2017 +0200 ARM: dts: gr-peach: Fix 'leds' node name indent Fix 'leds' node name indent as it was wrongly aligned. Signed-off-by: Jacopo Mondi Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100-gr-peach.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 654c192a72ffa7e415a9f58a4f4c5f4368b754e7 Author: Ping Cheng Date: Tue Oct 3 15:05:41 2017 -0700 HID: hid-input: Add eraser usage to hidinput_configure_usage Some tablets report eraser usage to indicate the eraser tool tip is touching the surface. But, hidinput_configure_usage didn't support the usage, which led it falls into default as ABS_MISC. Signed-off-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/hid-input.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 29cc309d8bf19a36c5196bf626662319af6e3c0b Author: Nicolas Boichat Date: Tue Aug 22 09:10:11 2017 +0800 HID: hid-multitouch: forward MSC_TIMESTAMP Computes and forwards the device timestamp according to the specification. Many devices use a 16-bit timestamp field, with a resolution of 100us, therefore rolling around very frequently (every 6.5 seconds). To make sure there is no ambiguity, the timestamp reported to the input stack reset to 0 whenever the time between 2 received events is greater than MAX_TIMESTAMP_INTERVAL (1 second). Signed-off-by: Nicolas Boichat Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 42 ++++++++++++++++++++++++++++++++++++++++++ include/linux/hid.h | 1 + 2 files changed, 43 insertions(+) commit 2847d242a1e48ca734cee742efa0f70abf545d1e Author: Geert Uytterhoeven Date: Thu Oct 5 11:21:49 2017 +0300 usb: host: xhci-plat: Use of_device_get_match_data() helper Use the of_device_get_match_data() helper instead of open coding. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-plat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e3a78ff022c64b518d3efd9ea0f26a784dc0b629 Author: Mathias Nyman Date: Thu Oct 5 11:21:48 2017 +0300 xhci: trace slot context when calling xhci_configure_endpoint() Add trace showing content of input slot context for configure endpoint and evaluate context commands Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-trace.h | 5 +++++ drivers/usb/host/xhci.c | 4 ++++ 2 files changed, 9 insertions(+) commit 49d5b05e191d4486c125ff00a01fc5e9e7ba452c Author: Adam Wallis Date: Thu Oct 5 11:21:47 2017 +0300 xhci: allow TRACE to work with EVENT ring dequeue inc_deq() currently bails earlier for EVENT rings than the common return point of the function, due to the fact that EVENT rings do not have link TRBs. The unfortunate side effect of this is that the very useful trace_xhci_inc_deq() function is not called/usable for EVENT ring debug. This patch provides a refactor by removing the multiple return exit points into a single return which additionally allows for all rings to use the trace function. Signed-off-by: Adam Wallis Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0914ea66d24c045cdc4f424342057980e86629cf Author: Anshuman Gupta Date: Thu Oct 5 11:21:46 2017 +0300 usb: xhci: reduce device initiated resume time variance. This patch will improve the variable auto-resume latency of an usb-port. The attempt to sync the start of root hub polling with resume time signaling finish was ruined by a later request to start immediate root hub polling. When xhci gets a port status change event interrupt due to PORT_PLC (port link state transition), linux Host controller driver drives the resume signalling on the bus for the amount of time defined by USB_REUME_TIMEOUT(40ms) macro. This 40ms delay for resume signalling is in acceptable limit, but it get worse when xhci goes for polling mode in order to detect other events on its ports and modify rh_timer timer with a variable time out of 1ms to (HZ/4)ms. drivers/usb/core/hcd.c line 799 mod_timer (&hcd->rh_timer, (jiffies/(HZ/4) + 1) * (HZ/4)). Due to above variable timeout usb auto-resume latency varies from 40ms to ~300ms. Log Snippet: ~128ms latency [ 53.112049] hub 1-0:1.0: state 7 ports 12 chg 0000 evt 0000 [ 53.229200] hub 1-0:1.0: state 7 ports 12 chg 0000 evt 0004 [ 53.240177] usb 1-2: usb wakeup-resume [ 53.240195] usb 1-2: finish resume [ 53.240357] usb usb1-port2: resume, status 0 ----------------------------------------------------------------- ~300ms latency [ 59.946620] hub 1-0:1.0: state 7 ports 12 chg 0000 evt 0000 [ 59.979341] hub 1-0:1.0: state 7 ports 12 chg 0000 evt 0000 [ 60.229342] hub 1-0:1.0: state 7 ports 12 chg 0000 evt 0004 [ 60.251321] usb 1-2: usb wakeup-resume [ 60.251335] usb 1-2: finish resume [ 60.251539] usb usb1-port2: resume, status 0 This variable resume latency can be optimized, as in case of PORT_PLC change event rh_timer has already been modified with USB_RESUME_TIMEOUT (40ms) delay,leaving the rest to GetPortStatus and started polling for root hub status (invoking usb_hcd_poll_rh_status). We can avoid polling as we have already modified rh_timer with delay of 40ms. This patch set the HCD_FLAG_POLL_RH to hcd->flags after modification of rh_timer, and avoids polling of root hub status. so rh_timer can fire after 40ms and usb device auto-resuem latency will be around 40ms. [topic and first two senctences of commit message changed -Mathias] Signed-off-by: Anshuman Gupta Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-ring.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 651aaf36a7d7b36a58980e70133f9437d4f6d312 Author: Lu Baolu Date: Thu Oct 5 11:21:45 2017 +0300 usb: xhci: Handle USB transaction error on address command Xhci driver handles USB transaction errors on transfer events, but transaction errors are possible on address device command completion events as well. The xHCI specification (section 4.6.5) says: A USB Transaction Error Completion Code for an Address Device Command may be due to a Stall response from a device. Software should issue a Disable Slot Command for the Device Slot then an Enable Slot Command to recover from this error. This patch handles USB transaction errors on address command completion events. The related discussion threads can be found through below links. http://marc.info/?l=linux-usb&m=149362010728921&w=2 http://marc.info/?l=linux-usb&m=149252752825755&w=2 Suggested-by: Mathias Nyman Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 089ed4904e948f93a82ebf62b068ae55aec852ab Author: Lu Baolu Date: Thu Oct 5 11:21:44 2017 +0300 usb: xhci: Remove xhci->mutex from xhci_alloc_dev() xhci->mutex was added in xhci_alloc_dev() to protect two race sources (xhci->slot_id and xhci->addr_dev) by commit a00918d0521d ("usb: host: xhci: add mutex for non-thread-safe data"). While xhci->slot_id has been discarded in commit c2d3d49bba08 ("usb: xhci: move slot_id from xhci_hcd to xhci_command structure"), and xhci->addr_dev has been removed in commit 87e44f2aac8d ("usb: xhci: remove the use of xhci->addr_dev"), it's now safe to remove the use of xhci->mutex in xhci_alloc_dev(). Link: https://marc.info/?l=linux-usb&m=150306294725821&w=2 Suggested-by: Mathias Nyman Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 4 ---- 1 file changed, 4 deletions(-) commit dcabc76fa9361186e6b88c30a68db8fa9d5b4a1c Author: Lu Baolu Date: Thu Oct 5 11:21:43 2017 +0300 usb: xhci: Return error when host is dead in xhci_disable_slot() xhci_disable_slot() is a helper for disabling a slot when a device goes away or recovers from error situations. Currently, it returns success when it sees a dead host. This is not the right way to go. It should return error and let the invoker know that disable slot command was failed due to a dead host. Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 11ec7588a10d4bc2e1e385ac565d2166d375fba1 Author: Lu Baolu Date: Thu Oct 5 11:21:42 2017 +0300 usb: xhci: Fix memory leak when xhci_disable_slot() returns error If xhci_disable_slot() returns success, a disable slot command trb was queued in the command ring. The command completion handler will free the virtual device data structure associated with the slot. On the other hand, when xhci_disable_slot() returns error, the invokers should take the responsibilities to free the slot related data structure. Otherwise, memory leakage happens. Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit cd3f1790b006d91786728c20a01da21ee277aff1 Author: Lu Baolu Date: Thu Oct 5 11:21:41 2017 +0300 usb: xhci: Fix potential memory leak in xhci_disable_slot() xhci_disable_slot() allows the invoker to pass a command pointer as paramenter. Otherwise, it will allocate one. This will cause memory leak when a command structure was allocated inside of this function while queuing command trb fails. Another problem comes up when the invoker passed a command pointer, but xhci_disable_slot() frees it when it detects a dead host. This patch fixes these two problems by removing the command parameter from xhci_disable_slot(). Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 2 +- drivers/usb/host/xhci.c | 30 +++++++++--------------------- drivers/usb/host/xhci.h | 3 +-- 3 files changed, 11 insertions(+), 24 deletions(-) commit b64149ca016c25f30b39ac5a8f37cfb9017e19bb Author: Lu Baolu Date: Thu Oct 5 11:21:40 2017 +0300 usb: xhci: Disable slot even when virt-dev is null xhci_disable_slot() is a helper for disabling a slot when a device goes away or recovers from error situations. Currently, it checks the corespoding virt-dev pointer and returns directly (w/o issuing disable slot command) if it's null. This is unnecessary and will cause problems in case where virt-dev allocation fails and xhci_disable_slot() is called to roll back the hardware state. Refer to the implementation of xhci_alloc_dev(). This patch removes lines to check virt-dev in xhci_disable_slot(). Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci-hub.c | 3 +++ drivers/usb/host/xhci.c | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) commit 02b6fdc2a153e61b957937772a562fb6357dc861 Author: Lu Baolu Date: Thu Oct 5 11:21:39 2017 +0300 usb: xhci: Add debugfs interface for xHCI driver This adds debugfs consumer for xHCI driver. The debugfs entries read all host registers, device/endpoint contexts, command ring, event ring and various endpoint rings. With these entries, users can check the registers and memory spaces used by a host during run time, or save all the information with a simple 'cp -r' for post-mortem programs. The file hierarchy looks like this. [root of debugfs] |__usb |____[e,u,o]hci <---------[root for other HCIs] |____xhci <---------------[root for xHCI] |______0000:00:14.0 <--------------[xHCI host name] |________reg-cap <--------[capability registers] |________reg-op <-------[operational registers] |________reg-runtime <-----------[runtime registers] |________reg-ext-#cap_name <----[extended capability regs] |________command-ring <-------[root for command ring] |__________cycle <------------------[ring cycle] |__________dequeue <--------[ring dequeue pointer] |__________enqueue <--------[ring enqueue pointer] |__________trbs <-------------------[ring trbs] |________event-ring <---------[root for event ring] |__________cycle <------------------[ring cycle] |__________dequeue <--------[ring dequeue pointer] |__________enqueue <--------[ring enqueue pointer] |__________trbs <-------------------[ring trbs] |________devices <------------[root for devices] |__________#slot_id <-----------[root for a device] |____________name <-----------------[device name] |____________slot-context <----------------[slot context] |____________ep-context <-----------[endpoint contexts] |____________ep#ep_index <--------[root for an endpoint] |______________cycle <------------------[ring cycle] |______________dequeue <--------[ring dequeue pointer] |______________enqueue <--------[ring enqueue pointer] |______________trbs <-------------------[ring trbs] Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/Makefile | 4 + drivers/usb/host/xhci-debugfs.c | 526 ++++++++++++++++++++++++++++++++++++++++ drivers/usb/host/xhci-debugfs.h | 137 +++++++++++ drivers/usb/host/xhci-mem.c | 5 +- drivers/usb/host/xhci.c | 23 +- drivers/usb/host/xhci.h | 9 + 6 files changed, 700 insertions(+), 4 deletions(-) commit 8f11487719401e20ecc58c114d9fc3177535c40a Author: Mathias Nyman Date: Thu Oct 5 11:21:38 2017 +0300 xhci: add port speed ID to portsc tracing Shows the port speed protocol speed ID (PSID) in use. speed ID may map to custom speeds, but in most cases it uses default 1 = Full-Speed 12 MB/s 2 = Low-Speed 1.5 Mb/s 3 = High-speed 480 Mb/s 4 = SuperSpeed 5 Gb/s 5 = SuperSpeedPlus 10 Gb/s Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman drivers/usb/host/xhci.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4750bc78efdb126ddc40f1b34dbae7ce319344cb Author: Thang Q. Nguyen Date: Thu Oct 5 11:21:37 2017 +0300 usb: host: xhci support option to disable the xHCI USB2 HW LPM XHCI specification 1.1 does not require xHCI-compliant controllers to always enable hardware USB2 LPM. However, the current xHCI driver always enable it when seeing HLC=1. This patch supports an option for users to control disabling USB2 Hardware LPM via DT/ACPI attribute. This option is needed in case user would like to disable this feature. For example, their xHCI controller has its USB2 HW LPM broken. Signed-off-by: Tung Nguyen Signed-off-by: Thang Q. Nguyen Acked-by: Rob Herring Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/usb/usb-xhci.txt | 1 + drivers/usb/host/xhci-plat.c | 3 +++ drivers/usb/host/xhci.c | 2 +- drivers/usb/host/xhci.h | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) commit 1a48290edf6f78962b1d96008aea954b7b3e5969 Author: Sergei Shtylyov Date: Tue Sep 12 23:37:26 2017 +0300 arm64: dts: renesas: initial Eagle board device tree Add the initial device tree for the R8A77970 SoC based Eagle board. The board has 1 debug serial port (SCIF0); include support for it, so that the serial console can work. Based on the original (and large) patch by Vladimir Barinov . Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/Makefile | 1 + arch/arm64/boot/dts/renesas/r8a77970-eagle.dts | 45 ++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) commit ba3fd954f0b4c2df1e0d7e243cb6735c6f4c5bdc Author: Jyri Sarha Date: Mon May 29 22:09:44 2017 +0300 drm/tilcdc: Use tilcdc_crtc_shutdown() in tilcdc_crtc_destroy() Use tilcdc_crtc_shutdown() instead of tilcdc_crtc_disable() in tilcdc_crtc_destroy() and remove the modeset locking. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 125fcc19dad5a0ac9d3f2e4ceb7827951d31ccc7 Author: Jyri Sarha Date: Mon May 29 22:06:26 2017 +0300 drm/tilcdc: Remove WARN_ON(!drm_modeset_is_locked(&crtc->mutex)) checks Remove WARN_ON(!drm_modeset_is_locked(&crtc->mutex)) checks from tilcdc_crtc_enable(), tilcdc_crtc_disable(), and tilcdc_crtc_update_fb(). Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 4 ---- 1 file changed, 4 deletions(-) commit 46a956ab3c5be9141b75c0a6d8a754bdd4426577 Author: Jyri Sarha Date: Fri May 26 13:20:17 2017 +0300 drm/tilcdc: Turn raster off in crtc reset, if it was on in the HW This forces the HW to be in sync with the empty state. This should help with the problem when LCDC is already enabled (e.g. by the bootloader) at the initialization phase and the enable fails when a new mode is applied. Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) commit 61dd13b44435166c5136bd1e5b76a265bd9cddaf Author: Cihangir Akturk Date: Thu Aug 3 14:58:38 2017 +0300 drm/tilcdc: switch to drm_*{get,put} helpers drm_*_reference() and drm_*_unreference() functions are just compatibility alias for drm_*_get() and drm_*_put() adn should not be used by new code. So convert all users of compatibility functions to use the new APIs. Signed-off-by: Cihangir Akturk Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cafdee68fbd87ff8c2730117d65f095c33b506fe Author: Arvind Yadav Date: Wed Jun 28 11:12:00 2017 +0530 drm/tilcdc: tilcdc_tfp410: 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 1496 592 0 2088 828 drivers/gpu/drm/tilcdc/tilcdc_tfp410.o File size after constify: text data bss dec hex filename 1880 176 0 2056 808 drivers/gpu/drm/tilcdc/tilcdc_tfp410.o Signed-off-by: Arvind Yadav Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 211735521f323b8d556472a8f85cea8831c7b161 Author: Arvind Yadav Date: Wed Jun 28 11:08:43 2017 +0530 drm/tilcdc: tilcdc_panel: 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 1531 592 0 2123 84b drivers/gpu/drm/tilcdc/tilcdc_panel.o File size after constify: text data bss dec hex filename 1915 176 0 2091 82b drivers/gpu/drm/tilcdc/tilcdc_panel.o Signed-off-by: Arvind Yadav Signed-off-by: Jyri Sarha drivers/gpu/drm/tilcdc/tilcdc_panel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a158f888853cb11140532be79883c8faf31c83d Author: Masahiro Yamada Date: Thu Oct 5 11:30:57 2017 +0900 reset: uniphier: add PXs3 reset data Add basic reset data for Socionext's new SoC PXs3. Signed-off-by: Masahiro Yamada Signed-off-by: Philipp Zabel .../devicetree/bindings/reset/uniphier-reset.txt | 3 +++ drivers/reset/reset-uniphier.c | 26 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit 469d0ef06debe29ec60350b9976a520c4ad5a1e8 Author: James Smart Date: Tue Sep 26 21:50:45 2017 -0700 nvme-fc: move remote port get/put/free location move nvme_fc_rport_get/put and rport free to higher in the file to avoid adding prototypes to resolve references in upcoming code additions Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 78 +++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) commit c02b8fb4073d1b9aa5af909a91b51056b819d946 Author: Manasi Navare Date: Tue Oct 3 16:37:25 2017 -0700 drm/i915/edp: Increase the T12 delay quirk to 1300ms For this specific PCI device, the eDP panel requires a higher panel power cycle delay of 1300ms where the minimum spec requirement of panel power cycle delay is 500ms. This fix in combination with correct timestamp at which we get the panel power off time fixes the dP AUX CH timeouts seen on various IGT tests. Fixes: c99a259b4b5192ba ("drm/i915/edp: Add a T12 panel delay quirk to fix DP AUX CH timeouts") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101144 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101518 Cc: Daniel Vetter Cc: Jani Nikula Cc: Ville Syrjala Signed-off-by: Manasi Navare Acked-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1507073845-13420-2-git-send-email-manasi.d.navare@intel.com drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbacf02e7796fea02e5c6e46c90ed7cbe9e6f2c0 Author: Manasi Navare Date: Wed Oct 4 09:48:26 2017 -0700 drm/i915/edp: Get the Panel Power Off timestamp after panel is off Kernel stores the time in jiffies at which the eDP panel is turned off. This should be obtained after the panel is off (after the wait_panel_off). When we next attempt to turn the panel on, we use the difference between the timestamp at which we want to turn the panel on and timestamp at which panel was turned off to ensure that this is equal to panel power cycle delay and if not we wait for the remaining time. Not waiting for the panel power cycle delay can cause the panel to not turn on giving rise to AUX timeouts for the attempted AUX transactions. v2: * Separate lines for bugzilla (Jani Nikula) * Suggested by tag (Daniel Vetter) Cc: Daniel Vetter Cc: Jani Nikula Cc: stable@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101518 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101144 Suggested-by: Daniel Vetter Signed-off-by: Manasi Navare Reviewed-by: Daniel Vetter Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1507135706-17147-1-git-send-email-manasi.d.navare@intel.com drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 394ca81cb4c1518e9463fe342fb1ae8a9f46a82d Author: Kees Cook Date: Wed Oct 4 17:53:40 2017 -0700 ALSA: asihpi: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook Signed-off-by: Takashi Iwai sound/pci/asihpi/asihpi.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 38e9a80f66beb108d30f47dc856dd17b983c3dd6 Author: Kees Cook Date: Wed Oct 4 17:53:33 2017 -0700 ALSA: timer: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This adds a pointer back to struct snd_timer. Signed-off-by: Kees Cook Signed-off-by: Takashi Iwai sound/core/timer.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit d522bb6a105ffabeb765ad890062199fd4d18245 Author: Kees Cook Date: Wed Oct 4 17:53:36 2017 -0700 ALSA: sh: aica: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This requires adding a pointer to hold the timer's target substream, as there won't be a way to pass this in the future. Signed-off-by: Kees Cook Signed-off-by: Takashi Iwai sound/sh/aica.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 27b5e338d2153978aa1d4a01189bbd4713dab406 Author: Joel Stanley Date: Thu Oct 5 16:21:03 2017 +1030 ARM: dts: aspeed-romulus: Enable VUART Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 4 ++++ 1 file changed, 4 insertions(+) commit efd56ec7a8cf5980429c1d785ee033fb602c192f Author: Joel Stanley Date: Thu Oct 5 16:02:17 2017 +1030 ARM: dts: aspeed-palmetto: Enable VUART Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 4 ++++ 1 file changed, 4 insertions(+) commit eb746e5342ff7b80d4e2be72ccd85c84c434c1ee Author: Joel Stanley Date: Wed Oct 4 19:46:35 2017 +1030 ARM: dts: aspeed: Enable watchdog two The second watchdog is left running by u-boot in the common configurations of the firmware shipped on ASPEED boards. Ensure a driver is loaded so the system can succcessfully boot. Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g4.dtsi | 1 - arch/arm/boot/dts/aspeed-g5.dtsi | 1 - 2 files changed, 2 deletions(-) commit 424bd7e6c519326f8e9acb3b234ed10195315b1d Author: Joel Stanley Date: Wed Oct 4 19:46:34 2017 +1030 ARM: dts: aspeed: Remove undocumented wdt properties The watchdog bindings do not describe an interrupt property nor clock phandle, and the upstream driver never had code to use them. Drop them from the device tree. Also rename the node from wdt the more commonly used watchdog. Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g4.dtsi | 7 ++----- arch/arm/boot/dts/aspeed-g5.dtsi | 8 +++----- 2 files changed, 5 insertions(+), 10 deletions(-) commit a19331ca517764d30eb9b6e84561b7142abc3e09 Author: Joel Stanley Date: Wed Oct 4 17:19:17 2017 +1030 ARM: dts: aspeed: Clean up UART nodes - Shorten size of reg property so it covers only the implemented registers - Add VUART compatible, and change node name to serial@ - Remove outdated current-speed property. Different bootloaders use different speeds, so this is no longer helpful Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g4.dtsi | 18 +++++++++--------- arch/arm/boot/dts/aspeed-g5.dtsi | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) commit 5ea2355a100a3c6304901d058aee06d3a6be69bc Author: Dhinakaran Pandiyan Date: Tue Oct 3 17:22:11 2017 +0300 drm/i915/mst: Use MST sideband message transactions for dpms control Use the POWER_DOWN_PHY and POWER_UP_PHY sideband message transactions to set power states for downstream sinks. Apart from giving us the ability to set power state for individual sinks, this fixes the below test for me. $ xrandr --display :0 --output DP-2-2-8 --off $ xrandr --display :0 --output DP-2-2-1 --off $ xrandr --display :0 --output DP-2-2-8 --auto #Black screen $ xrandr --display :0 --output DP-2-2-1 --auto v2: Modify and document the dpms and port disable order (Ville) Add comment explaining is_mst = !crtc_state equivalence(Ville, Maarten) v3 by Jani: rebase References: https://bugs.freedesktop.org/show_bug.cgi?id=90963 References: https://bugs.freedesktop.org/show_bug.cgi?id=88124 Cc: Ville Syrjälä Cc: Lyude Cc: Maarten Lankhorst Reviewed-by: Lyude Paul Acked-by: Maarten Lankhorst Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20171003142211.860-1-jani.nikula@intel.com drivers/gpu/drm/i915/intel_ddi.c | 18 ++++++++++++++---- drivers/gpu/drm/i915/intel_dp_mst.c | 10 ++++++++-- 2 files changed, 22 insertions(+), 6 deletions(-) commit 3368f5699a9b0e281e14f9f93244da0a922f6df0 Author: Naveen N. Rao Date: Fri Sep 22 14:40:48 2017 +0530 powerpc/jprobes: Validate break handler invocation as being due to a jprobe_return() Fix a circa 2005 FIXME by implementing a check to ensure that we actually got into the jprobe break handler() due to the trap in jprobe_return(). Acked-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 6baea433bc84cd148af1c524389a8d756f67412e Author: Naveen N. Rao Date: Fri Sep 22 14:40:47 2017 +0530 powerpc/jprobes: Disable preemption when triggered through ftrace KPROBES_SANITY_TEST throws the below splat when CONFIG_PREEMPT is enabled: Kprobe smoke test: started DEBUG_LOCKS_WARN_ON(val > preempt_count()) ------------[ cut here ]------------ WARNING: CPU: 19 PID: 1 at kernel/sched/core.c:3094 preempt_count_sub+0xcc/0x140 Modules linked in: CPU: 19 PID: 1 Comm: swapper/0 Not tainted 4.13.0-rc7-nnr+ #97 task: c0000000fea80000 task.stack: c0000000feb00000 NIP: c00000000011d3dc LR: c00000000011d3d8 CTR: c000000000a090d0 REGS: c0000000feb03400 TRAP: 0700 Not tainted (4.13.0-rc7-nnr+) MSR: 8000000000021033 CR: 28000282 XER: 00000000 CFAR: c00000000015aa18 SOFTE: 0 NIP preempt_count_sub+0xcc/0x140 LR preempt_count_sub+0xc8/0x140 Call Trace: preempt_count_sub+0xc8/0x140 (unreliable) kprobe_handler+0x228/0x4b0 program_check_exception+0x58/0x3b0 program_check_common+0x16c/0x170 --- interrupt: 0 at kprobe_target+0x8/0x20 LR = init_test_probes+0x248/0x7d0 kp+0x0/0x80 (unreliable) livepatch_handler+0x38/0x74 init_kprobes+0x1d8/0x208 do_one_initcall+0x68/0x1d0 kernel_init_freeable+0x298/0x374 kernel_init+0x24/0x160 ret_from_kernel_thread+0x5c/0x70 Instruction dump: 419effdc 3d22001b 39299240 81290000 2f890000 409effc8 3c82ffcb 3c62ffcb 3884bc68 3863bc18 4803d5fd 60000000 <0fe00000> 4bffffa8 60000000 60000000 ---[ end trace 432dd46b4ce3d29f ]--- Kprobe smoke test: passed successfully The issue is that we aren't disabling preemption in kprobe_ftrace_handler(). Disable it. Fixes: ead514d5fb30a0 ("powerpc/kprobes: Add support for KPROBES_ON_FTRACE") Acked-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao [mpe: Trim oops a little for formatting] Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes-ftrace.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 4b54db1375757aa3e870c075065a8ab9350d26c4 Merge: c331501 ff69c21 Author: David S. Miller Date: Wed Oct 4 21:46:22 2017 -0700 Merge branch 'bpftool' Jakub Kicinski says: ==================== tools: add bpftool This set adds bpftool to the tools/ directory. The first patch renames tools/net to tools/bpf, the second one adds the new code, while the third adds simple documentation. v4: - rename docs *.txt -> *.rst (Jesper). v3: - address Alexei's comments about output and docs. v2: - report names, map ids, load time, uid; - add docs/man pages; - general cleanups & fixes. ==================== Acked-by: David Ahern Signed-off-by: David S. Miller commit ff69c21a85a4ed3d8dcf79dd750a0a9eda4fca83 Author: Jakub Kicinski Date: Wed Oct 4 20:10:05 2017 -0700 tools: bpftool: add documentation Add documentation for bpftool. Separate files for each subcommand. Use rst format. Documentation is compiled into man pages using rst2man. Signed-off-by: David Beckett Signed-off-by: Jakub Kicinski Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/bpf/bpftool/Documentation/Makefile | 34 +++++++ tools/bpf/bpftool/Documentation/bpftool-map.rst | 110 +++++++++++++++++++++++ tools/bpf/bpftool/Documentation/bpftool-prog.rst | 79 ++++++++++++++++ tools/bpf/bpftool/Documentation/bpftool.rst | 34 +++++++ tools/bpf/bpftool/Makefile | 6 ++ 5 files changed, 263 insertions(+) commit 71bb428fe2c19512ac671d5ee16ef3e73e1b49a8 Author: Jakub Kicinski Date: Wed Oct 4 20:10:04 2017 -0700 tools: bpf: add bpftool Add a simple tool for querying and updating BPF objects on the system. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller tools/bpf/Makefile | 18 +- tools/bpf/bpftool/Makefile | 80 +++++ tools/bpf/bpftool/common.c | 216 ++++++++++++ tools/bpf/bpftool/jit_disasm.c | 87 +++++ tools/bpf/bpftool/main.c | 212 ++++++++++++ tools/bpf/bpftool/main.h | 99 ++++++ tools/bpf/bpftool/map.c | 744 +++++++++++++++++++++++++++++++++++++++++ tools/bpf/bpftool/prog.c | 456 +++++++++++++++++++++++++ 8 files changed, 1909 insertions(+), 3 deletions(-) commit a92bb546cff0b31d96d5919ebfeda9c678756b42 Author: Jakub Kicinski Date: Wed Oct 4 20:10:03 2017 -0700 tools: rename tools/net directory to tools/bpf We currently only have BPF tools in the tools/net directory. We are about to add more BPF tools there, not necessarily networking related, rename the directory and related Makefile targets to bpf. Suggested-by: Daniel Borkmann Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Acked-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller MAINTAINERS | 3 +- tools/Makefile | 14 +- tools/bpf/Makefile | 35 ++ tools/bpf/bpf_asm.c | 52 ++ tools/bpf/bpf_dbg.c | 1395 ++++++++++++++++++++++++++++++++++++++++++++ tools/bpf/bpf_exp.l | 198 +++++++ tools/bpf/bpf_exp.y | 656 +++++++++++++++++++++ tools/bpf/bpf_jit_disasm.c | 320 ++++++++++ tools/net/Makefile | 35 -- tools/net/bpf_asm.c | 52 -- tools/net/bpf_dbg.c | 1395 -------------------------------------------- tools/net/bpf_exp.l | 198 ------- tools/net/bpf_exp.y | 656 --------------------- tools/net/bpf_jit_disasm.c | 320 ---------- 14 files changed, 2664 insertions(+), 2665 deletions(-) commit c331501c88b64dd1bf83eddcc040441dec187f7e Merge: 6621dd2 e58376e Author: David S. Miller Date: Wed Oct 4 21:39:34 2017 -0700 Merge branch 'enslavement-extack' David Ahern says: ==================== net: Plumb extack error reporting to enslavements Another round of extending extack error reporting, this time for enslavements through ndo_add_slave and notifiers. v2 - changed how the messages are added to bonding driver per Jiri's request - fixed spectrum message for LAG overflow per Ido's comment ==================== Signed-off-by: David S. Miller commit e58376e1df2aaffbf12753959142a50f824c46ea Author: David Ahern Date: Wed Oct 4 17:48:51 2017 -0700 mlxsw: spectrum: Add extack messages for enslave failures mlxsw fails device enslavement for a number of reasons. Use the extack facility to return an error message to the user stating why the enslave is failing. Messages are prefixed with "spectrum" so users know it is a constraint imposed by the hardware driver. For example: $ ip li add br0.11 link br0 type vlan id 11 $ ip li set swp11 master br0 Error: spectrum: Enslaving a port to a device that already has an upper device is not supported. Signed-off-by: David Ahern Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 47 ++++++++++++++++++++------ 1 file changed, 37 insertions(+), 10 deletions(-) commit ca752be006013ac6f19721280f44c91ef07ad3d1 Author: David Ahern Date: Wed Oct 4 17:48:50 2017 -0700 net: bridge: Pass extack to down to netdev_master_upper_dev_link Pass extack arg to br_add_if. Add messages for a couple of failures and pass arg to netdev_master_upper_dev_link. Signed-off-by: David Ahern Acked-by: Stephen Hemminger Signed-off-by: David S. Miller net/bridge/br_device.c | 2 +- net/bridge/br_if.c | 15 +++++++++++---- net/bridge/br_ioctl.c | 2 +- net/bridge/br_private.h | 3 ++- 4 files changed, 15 insertions(+), 7 deletions(-) commit 759088bda21f4887c645579418e8b478eb570d78 Author: David Ahern Date: Wed Oct 4 17:48:49 2017 -0700 net: bonding: Add extack messages for some enslave failures A number of bond_enslave errors are logged using the netdev_err API. Return those messages to userspace via the extack facility. Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 7 +++++++ 1 file changed, 7 insertions(+) commit de3baa3ed72f09f8d2ba797645d052cd5f5de27d Author: David Ahern Date: Wed Oct 4 17:48:48 2017 -0700 net: vrf: Add extack messages for enslave errors Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 42ab19ee90292993370a30ad242599d75a3b749e Author: David Ahern Date: Wed Oct 4 17:48:47 2017 -0700 net: Add extack to upper device linking Add extack arg to netdev_upper_dev_link and netdev_master_upper_dev_link Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 7 ++++--- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 2 +- drivers/net/hyperv/netvsc_drv.c | 2 +- drivers/net/ipvlan/ipvlan_main.c | 2 +- drivers/net/macsec.c | 2 +- drivers/net/macvlan.c | 7 ++++--- drivers/net/macvtap.c | 2 +- drivers/net/team/team.c | 2 +- drivers/net/usb/qmi_wwan.c | 2 +- drivers/net/vrf.c | 7 ++++--- include/linux/if_macvlan.h | 3 ++- include/linux/netdevice.h | 6 ++++-- net/8021q/vlan.c | 6 +++--- net/8021q/vlan.h | 2 +- net/8021q/vlan_netlink.c | 2 +- net/batman-adv/hard-interface.c | 2 +- net/bridge/br_if.c | 2 +- net/core/dev.c | 15 ++++++++++----- net/openvswitch/vport-netdev.c | 3 ++- 19 files changed, 44 insertions(+), 32 deletions(-) commit 33eaf2a6eb48ebf00374aaaf4b1b43f9950dcbe4 Author: David Ahern Date: Wed Oct 4 17:48:46 2017 -0700 net: Add extack to ndo_add_slave Pass extack to do_set_master and down to ndo_add_slave Signed-off-by: David Ahern Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 5 +++-- drivers/net/bonding/bond_options.c | 2 +- drivers/net/team/team.c | 3 ++- drivers/net/vrf.c | 3 ++- include/linux/netdevice.h | 3 ++- include/net/bonding.h | 3 ++- net/batman-adv/soft-interface.c | 3 ++- net/bridge/br_device.c | 3 ++- net/core/rtnetlink.c | 10 ++++++---- 9 files changed, 22 insertions(+), 13 deletions(-) commit 51d0c04795a4b5d9a188336884887a9d394a94b0 Author: David Ahern Date: Wed Oct 4 17:48:45 2017 -0700 net: Add extack to netdev_notifier_info Add netlink_ext_ack to netdev_notifier_info to allow notifier handlers to return errors to userspace. Clean up the initialization in dev.c such that extack is easily added in subsequent patches where relevant. Specifically, remove the init call in call_netdevice_notifiers_info and have callers initalize on stack when info is declared. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/linux/netdevice.h | 10 +++++- net/core/dev.c | 79 ++++++++++++++++++++++++++++------------------- 2 files changed, 56 insertions(+), 33 deletions(-) commit db4d6d9d80fae312909ce4e21c7299b66e709054 Author: Joel Stanley Date: Wed Oct 4 17:19:16 2017 +1030 ARM: dts: aspeed: Correctly order UART nodes Order them all by address. Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g4.dtsi | 48 +++++++++++++++---------------- arch/arm/boot/dts/aspeed-g5.dtsi | 61 ++++++++++++++++++++-------------------- 2 files changed, 54 insertions(+), 55 deletions(-) commit 0bae3904144ddc99a902741467d02e2d950c8a63 Author: Joel Stanley Date: Wed Oct 4 17:19:15 2017 +1030 ARM: dts: aspeed: Add aliases for UARTs Existing userspace expects the console (UART5) to be at /dev/ttyS4. To ensure the UARTs show up where users expect them, we give them fixed aliases starting at 0. Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 4 ---- arch/arm/boot/dts/aspeed-g4.dtsi | 5 +++++ arch/arm/boot/dts/aspeed-g5.dtsi | 5 +++++ 3 files changed, 10 insertions(+), 4 deletions(-) commit e6aa3ef8da1f1de5ef6f29ba494fa27440ef3a70 Author: Joel Stanley Date: Wed Oct 4 17:19:14 2017 +1030 ARM: dts: aspeed-ast2500: Add I2C devices Enable the buses that are in use and the devices that are attached. Currently that includes temperature measurement and EEPROM. Reviewed-by: Brendan Higgins Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-ast2500-evb.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 2dfa70571e34c9d29fa891e5c3963322d130f53d Author: Joel Stanley Date: Wed Oct 4 17:19:13 2017 +1030 ARM: dts: aspeed-palmetto: Add I2C devices Enable the buses that are in use and the devices that are attached. Currently that includes the battery backed RTC, temperature measurement and EEPROM. Some of these buses are for hotplugged cards, such as PCIe cards. Others do not yet have upstream drivers, so there are no devices attached. Reviewed-by: Brendan Higgins Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 11520916c817f88dd67b4e2cbd0d7409d2d529ee Author: Joel Stanley Date: Wed Oct 4 17:19:12 2017 +1030 ARM: dts: aspeed-romulus: Add I2C devices Enable the buses that are in use and the devices that are attached. Currently that is just the battery backed RTC. Some of these buses are for hotplugged cards, such as PCIe cards. Others do not yet have upstream drivers, so there are no devices attached. Reviewed-by: Brendan Higgins Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 54 ++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit ef8563783678af1ed8eabe0719e4d8bbf2ad58d8 Author: Joel Stanley Date: Wed Oct 4 17:19:11 2017 +1030 ARM: dts: aspeed: Add I2C buses Now with an upstream i2c bus driver, we can add the 14 i2c buses that exist in ASPEED G4 and G5 generation SoCs. It also adds aliases for the 14 built-in I2C busses to ensure userspace sees the numbering staring from zero and counting up. Acked-by: Andrew Jeffery Reviewed-by: Brendan Higgins Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g4.dtsi | 256 +++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/aspeed-g5.dtsi | 256 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 512 insertions(+) commit 29b246400cc0e8c5e0e2f9d0206c53df93b79bea Author: Joel Stanley Date: Wed Oct 4 17:19:10 2017 +1030 ARM: dts: aspeed: Reorder ADC node We try to keep the nodes in address order. The ADC node was out of place. Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g4.dtsi | 16 ++++++++-------- arch/arm/boot/dts/aspeed-g5.dtsi | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) commit cd7df3f7adbc910f7220b1c2220374bda67dd4ec Author: Andrew Jeffery Date: Wed Oct 4 17:19:09 2017 +1030 ARM: dts: aspeed: Move pinctrl subnodes to improve readability Moving the subnodes out of the pinctrl node declaration to a reference allows easier access to the remaining parts of the devicetree. Signed-off-by: Andrew Jeffery Reviewed-by: Xo Wang Acked-by: Andrew Jeffery Signed-off-by: Joel Stanley arch/arm/boot/dts/aspeed-g4.dtsi | 1483 ++++++++++++++++++------------------ arch/arm/boot/dts/aspeed-g5.dtsi | 1549 +++++++++++++++++++------------------- 2 files changed, 1518 insertions(+), 1514 deletions(-) commit 6621dd29eb9b5e6774ec7a9a75161352fdea47fc Author: Nicolas Dichtel Date: Tue Oct 3 13:53:23 2017 +0200 dev: advertise the new nsid when the netns iface changes x-netns interfaces are bound to two netns: the link netns and the upper netns. Usually, this kind of interfaces is created in the link netns and then moved to the upper netns. At the end, the interface is visible only in the upper netns. The link nsid is advertised via netlink in the upper netns, thus the user always knows where is the link part. There is no such mechanism in the link netns. When the interface is moved to another netns, the user cannot "follow" it. This patch adds a new netlink attribute which helps to follow an interface which moves to another netns. When the interface is unregistered, the new nsid is advertised. If the interface is a x-netns interface (ie rtnl_link_ops->get_link_net is defined), the nsid is allocated if needed. CC: Jason A. Donenfeld Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller include/linux/rtnetlink.h | 4 +++- include/uapi/linux/if_link.h | 1 + net/core/dev.c | 11 ++++++++--- net/core/rtnetlink.c | 31 ++++++++++++++++++++++--------- 4 files changed, 34 insertions(+), 13 deletions(-) commit b295edc54bf0c669ad0800a613e5311015db5f2b Merge: c818fa9 dfc0699 Author: David S. Miller Date: Wed Oct 4 16:05:06 2017 -0700 Merge branch 'bpf-cgroup-multi-prog' Alexei Starovoitov says: ==================== bpf: muli prog support for cgroup-bpf v1->v2: - fixed accidentally swapped two lines which caused static_key not going to zero - addressed Martin's feedback and changed prog_query to be consistent with verifier output: return -enospc and fill supplied buffer instead of just returning -enospc when buffer is too small to fit all prog_ids v1: cgroup-bpf use cases are getting more advanced and running only one program per cgroup is no longer enough. Therefore introduce support for attaching multiple programs per cgroup and running a set of effective programs. These patches introduces BPF_F_ALLOW_MULTI flag for BPF_PROG_ATTACH cmd. The default is still NONE and behavior of BPF_F_ALLOW_OVERRIDE flag is unchanged. The difference between three possible flags for BPF_PROG_ATTACH command: - NONE(default): No further bpf programs allowed in the subtree. - BPF_F_ALLOW_OVERRIDE: If a sub-cgroup installs some bpf program, the program in this cgroup yields to sub-cgroup program. - BPF_F_ALLOW_MULTI: If a sub-cgroup installs some bpf program, that cgroup program gets run in addition to the program in this cgroup. Most of the logic is in patch 1. Even when cgroup doesn't have any programs attached its set of effective program can be non-empty. To quickly execute them and avoid penalizing cgroups without any effective programs introduce 'struct bpf_prog_array' which has an optimization for cgroups with zero effective programs. Patch 2 introduces BPF_PROG_QUERY command for introspection Patch 3 makes verifier more strict for cgroup-bpf program types. Patch 4+ are tests. More details in individual patches ==================== Signed-off-by: David S. Miller commit dfc069998ebb010f910dfec379dab4f44d331980 Author: Alexei Starovoitov Date: Mon Oct 2 22:50:28 2017 -0700 samples/bpf: use bpf_prog_query() interface use BPF_PROG_QUERY command to strengthen test coverage Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/test_cgrp2_attach2.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) commit 5d0cbf9b6c11964bf2f4041a5b0b6f81cb169736 Author: Alexei Starovoitov Date: Mon Oct 2 22:50:27 2017 -0700 libbpf: add support for BPF_PROG_QUERY add support for BPF_PROG_QUERY command to libbpf Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/lib/bpf/bpf.c | 20 ++++++++++++++++++++ tools/lib/bpf/bpf.h | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) commit defd9c476fa6b01b4eb5450452bfd202138decb7 Author: Alexei Starovoitov Date: Mon Oct 2 22:50:26 2017 -0700 libbpf: sync bpf.h tools/include/uapi/linux/bpf.h got out of sync with actual kernel header. Update it. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/include/uapi/linux/bpf.h | 55 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 3 deletions(-) commit 39323e788cb672adba8709ca407bd6763aae577d Author: Alexei Starovoitov Date: Mon Oct 2 22:50:25 2017 -0700 samples/bpf: add multi-prog cgroup test case create 5 cgroups, attach 6 progs and check that progs are executed as: cgrp1 (MULTI progs A, B) -> cgrp2 (OVERRIDE prog C) -> cgrp3 (MULTI prog D) -> cgrp4 (OVERRIDE prog E) -> cgrp5 (NONE prog F) the event in cgrp5 triggers execution of F,D,A,B in that order. if prog F is detached, the execution is E,D,A,B if prog F and D are detached, the execution is E,A,B if prog F, E and D are detached, the execution is C,A,B Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/cgroup_helpers.c | 4 +- samples/bpf/test_cgrp2_attach2.c | 188 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 185 insertions(+), 7 deletions(-) commit 244d20efdb68c5c1a26c667baeb232ea163e2f69 Author: Alexei Starovoitov Date: Mon Oct 2 22:50:24 2017 -0700 libbpf: introduce bpf_prog_detach2() introduce bpf_prog_detach2() that takes one more argument prog_fd vs bpf_prog_detach() that takes only attach_fd and type. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/lib/bpf/bpf.c | 12 ++++++++++++ tools/lib/bpf/bpf.h | 1 + 2 files changed, 13 insertions(+) commit 390ee7e29fc8e6e90d3065b00afb047c4ee552f9 Author: Alexei Starovoitov Date: Mon Oct 2 22:50:23 2017 -0700 bpf: enforce return code for cgroup-bpf programs with addition of tnum logic the verifier got smart enough and we can enforce return codes at program load time. For now do so for cgroup-bpf program types. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 40 ++++++++++++++++ tools/testing/selftests/bpf/test_verifier.c | 72 +++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) commit 468e2f64d220fe2dc11caa2bcb9b3a1e50fc7321 Author: Alexei Starovoitov Date: Mon Oct 2 22:50:22 2017 -0700 bpf: introduce BPF_PROG_QUERY command introduce BPF_PROG_QUERY command to retrieve a set of either attached programs to given cgroup or a set of effective programs that will execute for events within a cgroup Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Martin KaFai Lau for cgroup bits Acked-by: Tejun Heo Signed-off-by: David S. Miller include/linux/bpf-cgroup.h | 4 ++++ include/linux/bpf.h | 3 +++ include/uapi/linux/bpf.h | 13 +++++++++++++ kernel/bpf/cgroup.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ kernel/bpf/core.c | 38 ++++++++++++++++++++++++++++++++++++++ kernel/bpf/syscall.c | 34 ++++++++++++++++++++++++++++++++++ kernel/cgroup/cgroup.c | 10 ++++++++++ 7 files changed, 148 insertions(+) commit 324bda9e6c5add86ba2e1066476481c48132aca0 Author: Alexei Starovoitov Date: Mon Oct 2 22:50:21 2017 -0700 bpf: multi program support for cgroup+bpf introduce BPF_F_ALLOW_MULTI flag that can be used to attach multiple bpf programs to a cgroup. The difference between three possible flags for BPF_PROG_ATTACH command: - NONE(default): No further bpf programs allowed in the subtree. - BPF_F_ALLOW_OVERRIDE: If a sub-cgroup installs some bpf program, the program in this cgroup yields to sub-cgroup program. - BPF_F_ALLOW_MULTI: If a sub-cgroup installs some bpf program, that cgroup program gets run in addition to the program in this cgroup. NONE and BPF_F_ALLOW_OVERRIDE existed before. This patch doesn't change their behavior. It only clarifies the semantics in relation to new flag. Only one program is allowed to be attached to a cgroup with NONE or BPF_F_ALLOW_OVERRIDE flag. Multiple programs are allowed to be attached to a cgroup with BPF_F_ALLOW_MULTI flag. They are executed in FIFO order (those that were attached first, run first) The programs of sub-cgroup are executed first, then programs of this cgroup and then programs of parent cgroup. All eligible programs are executed regardless of return code from earlier programs. To allow efficient execution of multiple programs attached to a cgroup and to avoid penalizing cgroups without any programs attached introduce 'struct bpf_prog_array' which is RCU protected array of pointers to bpf programs. Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Acked-by: Martin KaFai Lau for cgroup bits Acked-by: Tejun Heo Signed-off-by: David S. Miller include/linux/bpf-cgroup.h | 46 +++-- include/linux/bpf.h | 32 ++++ include/linux/filter.h | 2 +- include/uapi/linux/bpf.h | 42 +++- kernel/bpf/cgroup.c | 467 ++++++++++++++++++++++++++++++++------------- kernel/bpf/core.c | 31 +++ kernel/bpf/syscall.c | 37 ++-- kernel/cgroup/cgroup.c | 28 ++- 8 files changed, 516 insertions(+), 169 deletions(-) commit eb672c0239da9084fc8103b63ba5fdaec6aab8be Author: Rafael J. Wysocki Date: Tue Sep 26 22:45:44 2017 +0200 PM: ARM: locomo: Drop suspend and resume bus type callbacks None of the locomo drivers in the tree implements the suspend and resume callbacks from struct locomo_driver, so drop them and drop the corresponding callbacks from locomo_bus_type. Signed-off-by: Rafael J. Wysocki Reviewed-by: Ulf Hansson arch/arm/common/locomo.c | 24 ------------------------ arch/arm/include/asm/hardware/locomo.h | 2 -- 2 files changed, 26 deletions(-) commit 4298555df5e5cb956549de5b01e4c77b1e4bc00a Author: Corentin LABBE Date: Wed Oct 4 20:32:18 2017 +0200 selinux: fix build warning This patch make selinux_task_prlimit() static since it is not used anywhere else. This fix the following build warning: security/selinux/hooks.c:3981:5: warning: no previous prototype for 'selinux_task_prlimit' [-Wmissing-prototypes] Signed-off-by: Corentin Labbe Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c0d4f464caeb075e3bb9063a64cd63c093ac03ad Author: Corentin LABBE Date: Wed Oct 4 20:32:17 2017 +0200 selinux: fix build warning by removing the unused sid variable This patch remove the unused variable sid This fix the following build warning: security/selinux/hooks.c:2921:6: warning: variable 'sid' set but not used [-Wunused-but-set-variable] Signed-off-by: Corentin Labbe Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ccec44cc910d1fa94690e0b9f07194be3421cb1a Author: Sakari Ailus Date: Tue Aug 29 09:41:25 2017 -0300 [media] smiapp: Make clock control optional The clock control is not explicitly controlled by the driver in two cases: ACPI based systems and when the clock is part of the power sequence of the camera module. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit de766e570413bd0484af0b580299b495ada625c3 Author: J. Bruce Fields Date: Tue Sep 19 19:25:41 2017 -0400 nfsd: give out fewer session slots as limit approaches Instead of granting client's full requests until we hit our DRC size limit and then failing CREATE_SESSIONs (and hence mounts) completely, start granting clients smaller slot tables as we approach the limit. The factor chosen here is pretty much arbitrary. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 5 +++++ 1 file changed, 5 insertions(+) commit 44d8660d3bb0a1c8363ebcb906af2343ea8e15f6 Author: J. Bruce Fields Date: Tue Sep 19 20:51:31 2017 -0400 nfsd: increase DRC cache limit An NFSv4.1+ client negotiates the size of its duplicate reply cache size in the initial CREATE_SESSION request. The server preallocates the memory for the duplicate reply cache to ensure that we'll never fail to record the response to a nonidempotent operation. To prevent a few CREATE_SESSIONs from consuming all of memory we set an upper limit based on nr_free_buffer_pages(). 1/2^10 has been too limiting in practice; 1/2^7 is still less than one percent. Signed-off-by: J. Bruce Fields fs/nfsd/nfssvc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9542446048e01871fd323cba9a1d468b46cfceea Author: J. Bruce Fields Date: Fri Sep 15 16:02:52 2017 -0400 nfsd: remove unnecessary nofilehandle checks These checks should have already be done centrally in nfsd4_proc_compound, the checks in each individual operation are unnecessary. Signed-off-by: J. Bruce Fields fs/nfsd/nfs4proc.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit de10c1619c489d1ecaf6b478ef9f5057d946a710 Author: Sakari Ailus Date: Tue Aug 29 09:41:24 2017 -0300 [media] smiapp: Get clock rate if it's not available through DT Obtain the clock rate from the clock framework if it's not available through DT. The assumption is that the parent device (camera module) defines the rate as clock control is a part of the power on and power off sequences --- which are camera module specific. Also use the clock rate from DT if no clock is provided. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-core.c | 52 +++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 19 deletions(-) commit f689866aec08f00efc4a098d14b3a17ec8a9193b Author: Sakari Ailus Date: Tue Aug 29 09:41:23 2017 -0300 [media] smiapp: Verify clock frequency after setting it, prevent changing it The external clock frequency was set by the driver but the obtained frequency was never verified. Do that. Being able to obtain the exact frequency is important as the value is used for PLL calculations which may result in frequencies that violate the PLL tree limits. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-core.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d339ec6a4261c030d8fdea75625c925f33549a2e Author: Sakari Ailus Date: Tue Aug 29 09:41:22 2017 -0300 [media] smiapp: Fix error handling in power on sequence The error handling code in smiapp_power_on() returned in case of a failed I2C write instead of cleaning up the mess. Fix this. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/smiapp/smiapp-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 880d45f8fcbacfa239533151f324210975698e0e Author: Sakari Ailus Date: Thu Sep 21 11:24:53 2017 -0300 [media] ov13858: Use do_div() for dividing a 64-bit number ov13858 contained a 64-bit division. Use do_div() for calculating it. Signed-off-by: Sakari Ailus Tested-by: Chiranjeevi Rapolu Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov13858.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 58020c9f14c8d884fd48434fbdbc659257cf46f3 Author: Chiranjeevi Rapolu Date: Mon Sep 18 19:47:43 2017 -0300 [media] media: ov13858: Fix 4224x3136 video flickering at some vblanks Previously, with crop (0, 0), (4255, 3167), VTS < 0xC9E was resulting in blank frames sometimes. This appeared as video flickering. But we need VTS < 0xC9E to get ~30fps. Omni Vision recommends to use crop (0,8), (4255, 3159) for 4224x3136. With this crop, VTS 0xC8E is supported and yields ~30fps. Signed-off-by: Chiranjeevi Rapolu Reviewed-by: Tomasz Figa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov13858.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6f2a0594aed2b3ac03fdd2e75b9fcb9f951e283a Author: Chiranjeevi Rapolu Date: Mon Sep 18 17:43:40 2017 -0300 [media] media: ov13858: Calculate pixel-rate at runtime, use mode Calculate pixel-rate at run time instead of compile time. Instead of using hardcoded pixels-per-line, extract it from current sensor mode. Signed-off-by: Chiranjeevi Rapolu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov13858.c | 49 +++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 20 deletions(-) commit 91c158dd26b82207c80970b85ff7aa473da42312 Author: Colin Ian King Date: Tue Sep 12 06:11:15 2017 -0300 [media] ov2640: make array reset_seq static, reduces object code size Don't populate the array reset_seq on the stack, instead make it static. Makes the object code smaller by over 50 bytes: Before: text data bss dec hex filename 11737 6000 64 17801 4589 drivers/media/i2c/ov2640.o After: text data bss dec hex filename 11582 6096 64 17742 454e drivers/media/i2c/ov2640.o Signed-off-by: Colin Ian King Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 885ca801e36d77c2d0025486b178c585a4680a80 Author: Sakari Ailus Date: Mon Oct 5 12:45:29 2015 -0300 [media] media: Check for active and has_no_links overrun The active and has_no_links arrays will overrun in media_entity_pipeline_start() if there's an entity which has more than MEDIA_ENTITY_MAX_PAD pads. Ensure in media_entity_init() that there are fewer pads than that. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/media-entity.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 19fab6fe67d815eb90095e21e3273a1fbe0c8fd9 Author: Markus Elfring Date: Sat Sep 2 11:09:35 2017 -0300 [media] i2c: Improve a size determination Replace the specification of a data structure by pointer dereferences as the parameter for the operator "sizeof" to make size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. [mchehab@s-opensource.com: merged similar patches] Signed-off-by: Markus Elfring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 2 +- drivers/media/i2c/soc_camera/ov9640.c | 2 +- drivers/media/i2c/soc_camera/ov9740.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 0fd58435890aa9f2d44baaa2f328f7f8f512f4dc Author: Markus Elfring Date: Sat Sep 2 11:07:31 2017 -0300 [media] i2c: Delete an error messages for failed memory allocation Omit extra messages for memory allocation failures. This issue was detected by using the Coccinelle software. [mchehab@s-opensource.com: merged similar patches] Signed-off-by: Markus Elfring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 5 +---- drivers/media/i2c/ov6650.c | 5 +---- drivers/media/i2c/soc_camera/ov9640.c | 5 +---- drivers/media/i2c/soc_camera/ov9740.c | 4 +--- 4 files changed, 4 insertions(+), 15 deletions(-) commit 3eefbc69bbdc7bca8c3751e525902d779ca1cdd3 Author: Chiranjeevi Rapolu Date: Fri Sep 1 19:08:31 2017 -0300 [media] media: ov5670: Fix not streaming issue after resume Previously, the sensor was not streaming after resume from suspend, i.e. on S0->S3->S0 transition. Due to this, camera app preview appeared as stuck. Now, handle streaming state correctly in case of suspend-resume. Signed-off-by: Chiranjeevi Rapolu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5670.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 1a58fbf5133c0c016decfa85f20b97a69672e315 Author: Rajmohan Mani Date: Wed Aug 30 14:48:52 2017 -0300 [media] dw9714: Set the v4l2 focus ctrl step as 1 Current v4l2 focus ctrl step value of 16, limits the minimum granularity of focus positions to 16. Setting this value as 1, enables more accurate focus positions. Signed-off-by: Rajmohan Mani Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/dw9714.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit c3d14780249814f200317cfed1e5d288aeefb528 Author: Fabio Estevam Date: Sun Aug 27 13:30:38 2017 -0300 [media] ov2640: 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: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 877f1af154ec427d9c3c936a39a10afda95dcb97 Author: Fabio Estevam Date: Sun Aug 27 13:30:37 2017 -0300 [media] ov2640: Propagate the real error on devm_clk_get() failure devm_clk_get() may return different error codes other than -EPROBE_DEFER, so it is better to return the real error code instead. Signed-off-by: Fabio Estevam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov2640.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bddb4b53356d3c97ee387c9ae7f290e4c76e8bc6 Author: Fabio Estevam Date: Sun Aug 27 13:30:36 2017 -0300 [media] mt9m111: Propagate the real error on v4l2_clk_get() failure v4l2_clk_get() may return different error codes other than -EPROBE_DEFER, so it is better to return the real error code instead. Signed-off-by: Fabio Estevam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/mt9m111.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99cd12425dfe9a400b672f112512a3678dfd1eb6 Author: Chiranjeevi Rapolu Date: Fri Aug 25 01:20:55 2017 -0300 [media] media: ov5670: Use recommended black level and output bias Previously, images were relatively darker due to non-optimal settings for black target level and bias. Now, use recommended settings for black target level and output bias as default values. The same default settings apply to all the resolutions. Given these recommeneded settings do not change dynamically, add these to existing mode register settings. Signed-off-by: Chiranjeevi Rapolu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/ov5670.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit cecfe9b8a511ec0c9df456770abf547444c87de6 Author: Hans Verkuil Date: Mon Sep 25 06:41:02 2017 -0300 [media] v4l2-ctrls.c: allow empty control handlers If you have a control handler that does not contain any controls, then currently calling VIDIOC_G/S/TRY_EXT_CTRLS with count == 0 will return -EINVAL in the class_check() function. This is not correct, there is no reason why this should return an error. The purpose of setting count to 0 is to test if the ioctl can mix controls from different control classes. And this is possible. The fact that there are not actually any controls defined is another matter that is unrelated to this test. This caused v4l2-compliance to fail, so that is fixed with this patch applied. Signed-off-by: Hans Verkuil Reported-by: Dave Stevenson Tested-by: Dave Stevenson Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ctrls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b2c8da1b040c4608c7cfdc0dd96bcaa190af268 Author: Hans Verkuil Date: Mon Sep 25 05:02:57 2017 -0300 [media] cec-gpio: don't generate spurious HPD events Only send HPD_LOW/HIGH event if the gpio actually changed value. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/cec-gpio/cec-gpio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6c3b047fa2d2286d5e438bcb470c7b1a49f415f6 Author: Johan Hovold Date: Thu Sep 21 05:40:18 2017 -0300 [media] cx231xx-cards: fix NULL-deref on missing association descriptor Make sure to check that we actually have an Interface Association Descriptor before dereferencing it during probe to avoid dereferencing a NULL-pointer. Fixes: e0d3bafd0258 ("V4L/DVB (10954): Add cx231xx USB driver") Cc: stable # 2.6.30 Reported-by: Andrey Konovalov Signed-off-by: Johan Hovold Tested-by: Andrey Konovalov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/cx231xx/cx231xx-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d17dd2db943272b6d9d1315528cde9dad74fa6ed Author: Kees Cook Date: Wed Sep 20 20:27:41 2017 -0300 [media] media/i2c/tc358743: Initialize timer This converts to use setup_timer() to set callback and data, though it doesn't look like this would have worked with timer checking enabled since no init_timer() was ever called before. Cc: Mats Randgaard Cc: Mauro Carvalho Chehab Signed-off-by: Kees Cook Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 02005cb27ca98792ac97728811e8dd30b3c1e798 Author: Hans Verkuil Date: Fri Sep 15 11:51:45 2017 -0300 [media] vivid: add support for Y10 and Y12 Add support for 10 and 12 bit luma formats. Signed-off-by: Hans Verkuil Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/vivid/vivid-vid-common.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit b89fdb5e509a7ac56b69e0139e10683efba5d467 Author: Hans Verkuil Date: Fri Sep 15 11:51:44 2017 -0300 [media] v4l2-tpg: add Y10 and Y12 support Support the 10 and 12 bit luma formats. Signed-off-by: Hans Verkuil Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5dfbf6c51c72ede22975db1e2259c00ee0bfb7ff Author: Arnd Bergmann Date: Thu Sep 14 08:07:27 2017 -0300 [media] rcar_drif: fix potential uninitialized variable use Older compilers like gcc-4.6 may run into a case that returns an uninitialized variable from rcar_drif_enable_rx() if that function was ever called with an empty cur_ch_mask: drivers/media/platform/rcar_drif.c:658:2: error: ‘ret’ may be used uninitialized in this function [-Werror=uninitialized] Newer compilers don't have that problem as they optimize the 'ret' variable away and just return zero in that case. This changes the function to return -EINVAL for this particular failure, to make it consistent across all compiler versions. In case gcc gets changed to report a warning for it in the future, it's also a good idea to shut it up now. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82203 Signed-off-by: Arnd Bergmann Acked-by: Ramesh Shanmugasundaram Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/rcar_drif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad62701720dd5d2a17c62f6c3bbd6ee629efcfaa Author: Bhumika Goyal Date: Wed Sep 13 16:37:50 2017 -0300 [media] saa7146: make saa7146_use_ops const Make these const as they are not modified in the file referencing them. They are only used when their function pointer fields invokes a function and therefore none of the structure fields are getting modified. Also, add a const to the declaration in the header. Signed-off-by: Bhumika Goyal Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/saa7146/saa7146_vbi.c | 2 +- drivers/media/common/saa7146/saa7146_video.c | 2 +- include/media/drv-intf/saa7146_vv.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 022565200a4f27ffcf9315b2194ca9454059d6b1 Author: Colin Ian King Date: Tue Sep 12 08:08:13 2017 -0300 [media] gspca: make arrays static, reduces object code size Don't populate const arrays on the stack, instead make them static. Makes the object code smaller by over 5200 bytes: Before: text data bss dec hex filename 58259 8880 128 67267 106c3 ov519.o After: text data bss dec hex filename 52155 9776 128 62059 f26b ov519.o Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/gspca/ov519.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit bc66c99a7e65d3964b4c5d10f574d462f40ae48e Author: Simon Yuan Date: Mon Sep 11 19:26:53 2017 -0300 [media] media: i2c: adv748x: Map v4l2_std_id to the internal reg value The video standard was not mapped to the corresponding value of the internal video standard in adv748x_afe_querystd, causing the wrong video standard to be selected. Fixes: 3e89586a64df ("media: i2c: adv748x: add adv748x driver") [Kieran: Obtain the std from the afe->curr_norm] Signed-off-by: Simon Yuan Signed-off-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv748x/adv748x-afe.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 15a35ca66aaff3386f174cfd3daa4713976e6edc Author: Christophe JAILLET Date: Mon Sep 11 13:53:07 2017 -0300 [media] media: v4l2-pci-skeleton: Fix error handling path in 'skeleton_probe()' If this memory allocation fails, we must release some resources, as already done in the code below and above. Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab samples/v4l/v4l2-pci-skeleton.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 4988be5813ff2afdc0d8bfa315ef34a577d3efbf Author: Don Hiatt Date: Mon Oct 2 11:04:55 2017 -0700 IB/hfi1: Do not warn on lid conversions for OPA On OPA devices opa_local_smp_check will receive 32Bit LIDs when the LID is Extended. In such cases, it is okay to lose the upper 16 bits of the LID as this information is obtained elsewhere. Do not issue a warning when calling ib_lid_cpu16() in this case by masking out the upper 16Bits. [75920.148985] ------------[ cut here ]------------ [75920.154651] WARNING: CPU: 0 PID: 1718 at ./include/rdma/ib_verbs.h:3788 hfi1_process_mad+0x1c1f/0x1c80 [hfi1] [75920.166192] Modules linked in: ib_ipoib hfi1(E) rdmavt(E) rdma_ucm(E) ib_ucm(E) rdma_cm(E) ib_cm(E) iw_cm(E) ib_umad(E) ib_uverbs(E) ib_core(E) libiscsi scsi_transport_iscsi dm_mirror dm_region_hash dm_log dm_mod dax x86_pkg_temp_thermal intel_powerclamp coretemp kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel mei_me ipmi_si iTCO_wdt iTCO_vendor_support crypto_simd ipmi_devintf pcspkr mei sg i2c_i801 glue_helper lpc_ich shpchp ioatdma mfd_core wmi ipmi_msghandler cryptd acpi_power_meter acpi_pad nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod mgag200 drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm igb ptp ahci libahci pps_core crc32c_intel libata dca i2c_algo_bit i2c_core [last unloaded: ib_core] [75920.246331] CPU: 0 PID: 1718 Comm: kworker/0:1H Tainted: G W I E 4.13.0-rc7+ #1 [75920.255907] Hardware name: Intel Corporation S2600WT2/S2600WT2, BIOS SE5C610.86B.01.01.0008.021120151325 02/11/2015 [75920.268158] Workqueue: ib-comp-wq ib_cq_poll_work [ib_core] [75920.274934] task: ffff88084a718000 task.stack: ffffc9000a424000 [75920.282123] RIP: 0010:hfi1_process_mad+0x1c1f/0x1c80 [hfi1] [75920.288881] RSP: 0018:ffffc9000a427c38 EFLAGS: 00010206 [75920.295265] RAX: 0000000000010001 RBX: ffff8808361420e8 RCX: ffff880837811d80 [75920.303784] RDX: 0000000000000002 RSI: 0000000000007fff RDI: ffff880837811d80 [75920.312302] RBP: ffffc9000a427d38 R08: 0000000000000000 R09: ffff8808361420e8 [75920.320819] R10: ffff88083841f0e8 R11: ffffc9000a427da8 R12: 0000000000000001 [75920.329335] R13: ffff880837810000 R14: 0000000000000000 R15: ffff88084f1a4800 [75920.337849] FS: 0000000000000000(0000) GS:ffff88085f400000(0000) knlGS:0000000000000000 [75920.347450] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [75920.354405] CR2: 00007f9e4b3d9000 CR3: 0000000001c09000 CR4: 00000000001406f0 [75920.362947] Call Trace: [75920.366257] ? ib_mad_recv_done+0x258/0x9b0 [ib_core] [75920.372457] ? ib_mad_recv_done+0x258/0x9b0 [ib_core] [75920.378652] ? __kmalloc+0x1df/0x210 [75920.383229] ib_mad_recv_done+0x305/0x9b0 [ib_core] [75920.389270] __ib_process_cq+0x5d/0xb0 [ib_core] [75920.395032] ib_cq_poll_work+0x20/0x60 [ib_core] [75920.400777] process_one_work+0x149/0x360 [75920.405836] worker_thread+0x4d/0x3c0 [75920.410505] kthread+0x109/0x140 [75920.414681] ? rescuer_thread+0x380/0x380 [75920.419731] ? kthread_park+0x60/0x60 [75920.424406] ret_from_fork+0x25/0x30 [75920.428972] Code: 4c 89 9d 58 ff ff ff 49 89 45 00 66 b8 00 02 49 89 45 08 e8 44 27 89 e0 4c 8b 9d 58 ff ff ff e9 d8 f6 ff ff 0f ff e9 55 e7 ff ff <0f> ff e9 3b e5 ff ff 0f ff 0f 1f 84 00 00 00 00 00 e9 4b e9 ff [75921.451269] ---[ end trace cf26df27c9597265 ]--- Fixes: 62ede7779904 ("Add OPA extended LID support") Reviewed-by: Mike Marciniszyn Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/mad.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 6588e412fe872ed81f3fb8d9b4561a66ecb763d0 Author: Don Hiatt Date: Mon Oct 2 11:04:48 2017 -0700 IB/core: Do not warn on lid conversions for OPA On OPA devices the user_mad recv_handler can receive 32Bit LIDs (e.g. OPA_PERMISSIVE_LID) and it is okay to lose the upper 16 bits of the LID as this information is obtained elsewhere. Do not issue a warning when calling ib_lid_be16() in this case by masking out the upper 16Bits. [75667.310846] ------------[ cut here ]------------ [75667.316447] WARNING: CPU: 0 PID: 1718 at ./include/rdma/ib_verbs.h:3799 recv_handler+0x15a/0x170 [ib_umad] [75667.327640] Modules linked in: ib_ipoib hfi1(E) rdmavt(E) rdma_ucm(E) ib_ucm(E) rdma_cm(E) ib_cm(E) iw_cm(E) ib_umad(E) ib_uverbs(E) ib_core(E) libiscsi scsi_transport_iscsi dm_mirror dm_region_hash dm_log dm_mod dax x86_pkg_temp_thermal intel_powerclamp coretemp kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel mei_me ipmi_si iTCO_wdt iTCO_vendor_support crypto_simd ipmi_devintf pcspkr mei sg i2c_i801 glue_helper lpc_ich shpchp ioatdma mfd_core wmi ipmi_msghandler cryptd acpi_power_meter acpi_pad nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod mgag200 drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm igb ptp ahci libahci pps_core crc32c_intel libata dca i2c_algo_bit i2c_core [last unloaded: ib_core] [75667.407704] CPU: 0 PID: 1718 Comm: kworker/0:1H Tainted: G W I E 4.13.0-rc7+ #1 [75667.417310] Hardware name: Intel Corporation S2600WT2/S2600WT2, BIOS SE5C610.86B.01.01.0008.021120151325 02/11/2015 [75667.429555] Workqueue: ib-comp-wq ib_cq_poll_work [ib_core] [75667.436360] task: ffff88084a718000 task.stack: ffffc9000a424000 [75667.443549] RIP: 0010:recv_handler+0x15a/0x170 [ib_umad] [75667.450090] RSP: 0018:ffffc9000a427ce8 EFLAGS: 00010286 [75667.456508] RAX: 00000000ffffffff RBX: ffff88085159ce80 RCX: 0000000000000000 [75667.465094] RDX: ffff88085a47b068 RSI: 0000000000000000 RDI: ffff88085159cf00 [75667.473668] RBP: ffffc9000a427d38 R08: 000000000001efc0 R09: ffff88085159ce80 [75667.482228] R10: ffff88085f007480 R11: ffff88084acf20e8 R12: ffff88085a47b020 [75667.490824] R13: ffff881056842e10 R14: ffff881056840200 R15: ffff88104c8d0800 [75667.499390] FS: 0000000000000000(0000) GS:ffff88085f400000(0000) knlGS:0000000000000000 [75667.509028] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [75667.516080] CR2: 00007f9e4b3d9000 CR3: 0000000001c09000 CR4: 00000000001406f0 [75667.524664] Call Trace: [75667.528044] ? find_mad_agent+0x7c/0x1b0 [ib_core] [75667.534031] ? ib_mark_mad_done+0x73/0xa0 [ib_core] [75667.540142] ib_mad_recv_done+0x423/0x9b0 [ib_core] [75667.546215] __ib_process_cq+0x5d/0xb0 [ib_core] [75667.552007] ib_cq_poll_work+0x20/0x60 [ib_core] [75667.557766] process_one_work+0x149/0x360 [75667.562844] worker_thread+0x4d/0x3c0 [75667.567529] kthread+0x109/0x140 [75667.571713] ? rescuer_thread+0x380/0x380 [75667.576775] ? kthread_park+0x60/0x60 [75667.581447] ret_from_fork+0x25/0x30 [75667.586014] Code: 43 4a 0f b6 45 c6 88 43 4b 48 8b 45 b0 48 89 43 4c 48 8b 45 b8 48 89 43 54 8b 45 c0 0f c8 89 43 5c e9 79 ff ff ff e8 16 4e fa e0 <0f> ff e9 42 ff ff ff 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 [75667.608323] ---[ end trace cf26df27c9597264 ]--- Fixes: 62ede7779904 ("Add OPA extended LID support") Reviewed-by: Mike Marciniszyn Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/user_mad.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 7ebfc93edcefa0c4c09f194ebdace9ddae15efa6 Author: Sebastian Sanchez Date: Mon Oct 2 11:04:41 2017 -0700 IB/rdmavt: Correct issues with read-mostly and send size cache lines The s_ahgpsn was incorrectly placed in the read-mostly section of the QP and the s_curr_size and s_hdrwords are oversized. The misplaced s_ahgpsn will cause the read-mostly cachelines to thrash. Place s_ahgpsn in the send side cache lines and correctly size and s_hdrwords and s_cur_size to keep the send side cachelines at the same size. Reviewed-by: Mike Marciniszyn Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 4 ++-- include/rdma/rdmavt_qp.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit a917374e8a20cdfbaaaaaa2b01331dc063d38848 Author: Don Hiatt Date: Mon Oct 2 11:04:33 2017 -0700 IB/core: Use __be32 for LIDs in opa_is_extended_lid The LIDs passed to opa_extended_lid are in __be32 format, change function signature accordingly. This fixes the following sparse warnings: drivers/infiniband/core/cm.c:1181:60: warning: incorrect type in argument 1 (different ba drivers/infiniband/core/cm.c:1182:60: warning: incorrect type in argument 2 (different ba drivers/infiniband/core/cm.c:1242:68: warning: incorrect type in argument 1 (different ba drivers/infiniband/core/cm.c:1243:68: warning: incorrect type in argument 2 (different ba drivers/infiniband/core/cm.c:2922:66: warning: incorrect type in argument 1 (different ba drivers/infiniband/core/cm.c:2923:66: warning: incorrect type in argument 2 (different ba include/rdma/opa_addr.h:102:14: warning: cast to restricted __be32 Fixes: e92aa00a5189 ("IB/CM: Add OPA Path record support to CM") Reviewed-by: Mike Marciniszyn Signed-off-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford include/rdma/opa_addr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9be6a5d788b0f236e3b30827187e5db33231fa74 Author: Sebastian Sanchez Date: Mon Oct 2 11:04:26 2017 -0700 IB/hfi1: Prevent LNI out of sync by resetting host interface version When the link is disabled and re-enabled, the host version bit is not set again, so the firmware behaves as though it’s interacting with an old driver. This causes LNI to get out of sync. The host version bit needs to be set at load_8051_firmware() and _dc_start(). Currently, it's only set at load_8051_firmware(). Create a common function to set the bit with the intent to make the code more maintainable in the future, set the host version bit at _dc_start() and modify the 8051 command API to prevent a deadlock as _dc_start() is already holding the dc8051 lock. Fixes: 913cc67159bc ("IB/hfi1: Always perform offline transition") Reviewed-by: Dennis Dalessandro Reviewed-by: Mike Marciniszyn Signed-off-by: Sebastian Sanchez Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 77 ++++++++++++++++++++++++----------- drivers/infiniband/hw/hfi1/chip.h | 1 + drivers/infiniband/hw/hfi1/firmware.c | 63 ++++++++++++++++++++-------- 3 files changed, 101 insertions(+), 40 deletions(-) commit d7d626179fb283aba73699071af0df6d00e32138 Author: Michael J. Ruhl Date: Mon Oct 2 11:04:19 2017 -0700 IB/hfi1: Fix incorrect available receive user context count The addition of the VNIC contexts to num_rcv_contexts changes the meaning of the sysfs value nctxts from available user contexts, to user contexts + reserved VNIC contexts. User applications that use nctxts are now broken. Update the calculation so that VNIC contexts are used only if there are hardware contexts available, and do not silently affect nctxts. Update code to use the calculated VNIC context number. Update the sysfs value nctxts to be available user contexts only. Fixes: 2280740f01ae ("IB/hfi1: Virtual Network Interface Controller (VNIC) HW support") Reviewed-by: Ira Weiny Reviewed-by: Niranjana Vishwanathapura Reviewed-by: Mike Marciniszyn Cc: #v4.12+ Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 35 ++++++++++++++++++++-------------- drivers/infiniband/hw/hfi1/hfi.h | 2 ++ drivers/infiniband/hw/hfi1/sysfs.c | 2 +- drivers/infiniband/hw/hfi1/vnic_main.c | 7 +++++-- 4 files changed, 29 insertions(+), 17 deletions(-) commit e08aa5947688d711d3a2db07604f3f8225d67180 Author: Mike Marciniszyn Date: Mon Oct 2 11:04:11 2017 -0700 IB/hfi1: Fix output trace issues from 16B change The 16B changes to the output side of the header trace introduced two issues: 1. An uninitialized field "l4" for 9B packets This field needs to be given a value of 0 for 9B packets to insure a correct 9B trace. The fix adds a new define to insure that there is a dummy default for 9B packets to insure the correct string is decoded. 2. Use of entry vs. __entry in field references Fixes: Commit 863cf89d472f ("IB/hfi1: Add 16B trace support") Reported-by: Kaike Wan Reviewed-by: Don Hiatt Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/hfi.h | 1 + drivers/infiniband/hw/hfi1/trace_ibhdrs.h | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit 9773afb97fc30d22db14a425fea519f4a658dc4e Author: Jakub Byczkowski Date: Mon Oct 2 11:04:03 2017 -0700 IB/hfi1: Add parsing for platform configuration format version 4 Platform configuration format version 4, that didn't use the file size field, is not parsed by the host driver. Only version 5 is supported. Add logic in parsing procedure to determine what format is being used and allow to read data from version 4 files. Reviewed-by: Jan Sokolowski Reviewed-by: Ira Weiny Reviewed-by: Andrzej Kacprowski Signed-off-by: Jakub Byczkowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/firmware.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 40837273d084ad1584dbaea5e8fbefe0a64f2a6b Author: Shiraz Saleem Date: Tue Oct 3 11:11:48 2017 -0500 i40iw: Do not allow posting WR after QP is flushed A Work Request (WR) posted after QP is flushed will not get a flush completion. Correct this problem by not allowing posting of WRs after a QP is flushed. Fixes: d37498417947 ("i40iw: add files for iwarp interface") Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_verbs.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit abae49e433c5b02b6ff583eee00321eee2bad18a Author: Mustafa Ismail Date: Tue Oct 3 11:11:47 2017 -0500 i40iw: Do not generate CQE for RTR on QP flush If RTR WQE is posted and QP is flushed, a CQE is incorrectly generated for the RTR WQE. Add code to look for the RTR and not generate a CQE when QP is flushed. Fixes: 280cfc4b74e6 ("i40iw: user kernel shared files") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_uk.c | 13 +++++++++++++ drivers/infiniband/hw/i40iw/i40iw_user.h | 1 + 2 files changed, 14 insertions(+) commit 1660a26adbb3aab6af0bb067e15a831f926c163a Author: Tatyana Nikolova Date: Tue Oct 3 11:11:46 2017 -0500 i40iw: Do not retransmit MPA request after it is ACKed The ACK packets for an MPA request are ignored and the MPA request is retransmitted if the MPA reply is late or missing. Fix this by checking ack_rcvd variable before retransmitting a packet. Fixes: f27b4746f378 ("i40iw: add connection management code") Signed-off-by: Tatyana Nikolova Signed-off-by: Faisal Latif Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_cm.c | 13 ++++++++++--- drivers/infiniband/hw/i40iw/i40iw_cm.h | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) commit a8c779eb056e9874c6278151ade857c3ac227db9 Author: Markus Elfring Date: Tue Aug 29 07:45:59 2017 -0300 [media] imon: Improve a size determination in two functions Replace the specification of 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. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/imon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 09e1cf829c45a2f030c7fd49533a86b0935d068a Author: Markus Elfring Date: Wed Oct 4 09:52:33 2017 +0200 ARM: SAMSUNG: Simplify size used for kzalloc Simplify the size argument of kzalloc() memory allocation by using sizeof(*ptr) syntax in adc.c and devs.c. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring [krzk: Rewrite commit message] Signed-off-by: Krzysztof Kozlowski arch/arm/plat-samsung/adc.c | 4 ++-- arch/arm/plat-samsung/devs.c | 33 +++++++++++---------------------- 2 files changed, 13 insertions(+), 24 deletions(-) commit a3d1d8a77c2e7fee3dabc328955d04ec7a9d14ec Author: Markus Elfring Date: Wed Oct 4 09:33:52 2017 +0200 ARM: SAMSUNG: Remove printk for failed memory allocation Omit an extra message for a memory allocation failure in adc.c and platformdata.c. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Krzysztof Kozlowski arch/arm/plat-samsung/adc.c | 8 ++------ arch/arm/plat-samsung/platformdata.c | 4 +--- 2 files changed, 3 insertions(+), 9 deletions(-) commit 0640357bf4f9a8b8c624c295bd0e001e5d0db5a9 Author: Markus Elfring Date: Mon Oct 2 22:30:55 2017 +0200 ARM: s3c64xx: Delete an unnecessary return statement in samsung_bl_set Fix checkpatch warning: WARNING: void function return statements are not generally useful Signed-off-by: Markus Elfring [krzk: Rewrite commit message] Signed-off-by: Krzysztof Kozlowski arch/arm/mach-s3c64xx/dev-backlight.c | 1 - 1 file changed, 1 deletion(-) commit 9c1446c27f2487ce42790cf5b7f29e763789e85d Author: Markus Elfring Date: Mon Oct 2 22:20:39 2017 +0200 ARM: s3c64xx: Remove printk for failed memory allocation in samsung_bl_set Omit an extra message for a memory allocation failure in samsung_bl_set(). This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Krzysztof Kozlowski arch/arm/mach-s3c64xx/dev-backlight.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 6c7a7db2e4c25acf8bd8086797d39a51728139e0 Author: Markus Elfring Date: Mon Oct 2 19:34:36 2017 +0200 ARM: s3c2410: Fix typos in a comments Fix "infromation" language typo. Signed-off-by: Markus Elfring [krzk: Rewrite commit message] Signed-off-by: Krzysztof Kozlowski arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 2 +- arch/arm/mach-s3c24xx/iotiming-s3c2412.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 637a75207087b4e862e0b5016547dbf8753b4346 Author: Markus Elfring Date: Mon Oct 2 19:16:58 2017 +0200 ARM: s3c24xx: Simplify size used for kzalloc in iotiming get Simplify the size argument of kzalloc() memory allocation by using sizeof(*ptr) syntax. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring [krzk: Rewrite commit message] Signed-off-by: Krzysztof Kozlowski arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 2 +- arch/arm/mach-s3c24xx/iotiming-s3c2412.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d7a6795b1d7cce8c6dcfd67d3348ba68ade9d397 Author: Marc Gonzalez Date: Mon Sep 18 11:31:41 2017 -0300 [media] media: rc: Delete duplicate debug message ir_setkeytable() and ir_create_table() print the same debug message. Delete the one in ir_setkeytable() Signed-off-by: Marc Gonzalez Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 3 --- 1 file changed, 3 deletions(-) commit 5573d124292a01afaecb7612773c21321ffcd6d2 Author: Stephen Hemminger Date: Fri Sep 8 13:39:29 2017 -0300 [media] media: default for RC_CORE should be n The Linus policy on Kconfig is that the default should be no for all new devices. I.e the user rebuild a new kernel from an old config should not by default get a larger kernel. Fixes: b4c184e506a4 ("[media] media: reorganize the main Kconfig items") Signed-off-by: Stephen Hemminger Acked-by: Geert Uytterhoeven Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 8ca01d4f9588bd58722a388400896c11e4343047 Author: Thomas Meyer Date: Fri Sep 8 13:33:36 2017 -0300 [media] media: rc: Use bsearch library function Replace self coded binary search, by existing library version. Signed-off-by: Thomas Meyer Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) commit eed008e605d13ee4fb64668350be58999e85aac7 Author: Ladislav Michl Date: Thu Sep 7 20:41:32 2017 -0300 [media] media: rc: gpio-ir-recv: use gpiolib API Gpiolib API is preferred way to access gpios. Signed-off-by: Ladislav Michl Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/gpio-ir-recv.c | 59 +++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 38 deletions(-) commit 5c95878f618cf4f3eb0a4c7ff54a09ca6d4d0426 Author: Ladislav Michl Date: Thu Sep 7 20:39:45 2017 -0300 [media] media: rc: gpio-ir-recv: remove gpio_ir_recv_platform_data gpio_ir_recv_platform_data are not used anywhere in kernel tree, so remove it. Signed-off-by: Ladislav Michl Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/gpio-ir-recv.c | 92 +++++++----------------- include/linux/platform_data/media/gpio-ir-recv.h | 23 ------ 2 files changed, 26 insertions(+), 89 deletions(-) commit 916d1c9fd457a11e1f1fed70f123f461da72a56d Author: Ladislav Michl Date: Thu Sep 7 20:39:14 2017 -0300 [media] media: rc: gpio-ir-recv: use KBUILD_MODNAME There already is standard macro providing driver name, use it. Signed-off-by: Ladislav Michl Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/gpio-ir-recv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1a2a60b1af1293e8ee7780691ef90a8aa68991c1 Author: Ladislav Michl Date: Thu Sep 7 20:38:20 2017 -0300 [media] media: rc: gpio-ir-recv: use devm_request_irq Use of devm_request_irq simplifies error unwinding and as free_irq was the last user of driver remove function, remove it too. Signed-off-by: Ladislav Michl Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/gpio-ir-recv.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) commit b3b391f8e49cf71d70a95a55ad0808e1fdf3e130 Author: Markus Elfring Date: Mon Oct 2 19:14:20 2017 +0200 ARM: s3c24xx: Remove printk for failed memory allocation in iotiming get Omit an extra message for a memory allocation failure in s3c2410_iotiming_get() and s3c2412_iotiming_get(). This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Krzysztof Kozlowski arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 4 +--- arch/arm/mach-s3c24xx/iotiming-s3c2412.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) commit 63ea641f496ffe08b7d81589a1e1e1c43a6af9bd Author: Colin Ian King Date: Fri Sep 29 21:13:08 2017 +0100 RDMA/hns: return 0 rather than return a garbage status value For the case where hr_qp->state == IB_QPS_RESET, an uninitialized value in ret is being returned by function hns_roce_v2_query_qp. Fix this by setting ret to 0 for this specific return condition. Detected by CoverityScan, CID#1457203 ("Unitialized scalar variable") Signed-off-by: Colin Ian King Acked-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1 + 1 file changed, 1 insertion(+) commit c818fa9e288be5be7e360c33cf4f5e30f9fa206e Author: Eric Dumazet Date: Wed Oct 4 10:48:35 2017 -0700 net: cache skb_shinfo() in skb_try_coalesce() Compiler does not really know that skb_shinfo(to|from) are constants in skb_try_coalesce(), lets cache their values to shrink code. We might even take care of skb_zcopy() calls later. $ size net/core/skbuff.o.before net/core/skbuff.o text data bss dec hex filename 40727 1298 0 42025 a429 net/core/skbuff.o.before 40631 1298 0 41929 a3c9 net/core/skbuff.o Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/core/skbuff.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) commit 375929f9f48356e862789c72ddc1175d89866f44 Author: Ladislav Michl Date: Thu Sep 7 20:37:36 2017 -0300 [media] media: rc: gpio-ir-recv: do not allow threaded interrupt handler Requesting any context irq is not actually great idea since threaded interrupt handler is run at too unpredictable time which turns timing information wrong. Fix it by requesting regular interrupt. Signed-off-by: Ladislav Michl Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/gpio-ir-recv.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 52ea79910720c56420f58771b9790e257764e006 Author: Ladislav Michl Date: Thu Sep 7 20:37:07 2017 -0300 [media] media: rc: gpio-ir-recv: use devm_rc_register_device Use of devm_rc_register_device simplifies error unwinding. Signed-off-by: Ladislav Michl Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/gpio-ir-recv.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit fcca09edb9f6e406de6014e3f1c2695b15b52abb Author: Ladislav Michl Date: Thu Sep 7 20:36:39 2017 -0300 [media] media: rc: gpio-ir-recv: use devm_gpio_request_one Use of devm_gpio_request_one simplifies error unwinding. Signed-off-by: Ladislav Michl Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/gpio-ir-recv.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit f4940b563feff6f2514fc8c5309b844b0540a4cb Author: Ladislav Michl Date: Thu Sep 7 20:36:11 2017 -0300 [media] media: rc: gpio-ir-recv: use devm_rc_allocate_device Use of devm_rc_allocate_device simplifies error unwinding. Signed-off-by: Ladislav Michl Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/gpio-ir-recv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 08d94274b8d0c25551b29a069334d8e627333a82 Author: Ladislav Michl Date: Thu Sep 7 20:35:22 2017 -0300 [media] media: rc: gpio-ir-recv: use devm_kzalloc Use of devm_kzalloc simplifies error unwinding. Signed-off-by: Ladislav Michl Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/gpio-ir-recv.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 94d40b2ff2fb2cb1763d7afb96360a0eb95f1493 Author: Ladislav Michl Date: Thu Sep 7 20:34:35 2017 -0300 [media] media: rc: gpio-ir-recv: use helper variable to access device info Using explicit struct device variable makes code a bit more readable. Signed-off-by: Ladislav Michl Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/gpio-ir-recv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c25895c7d6c957124ceb3b090b7eaa68b1d3bf54 Author: Colin Ian King Date: Tue Sep 5 09:07:50 2017 -0300 [media] media: imon: make two const arrays static, reduces object code size Don't populate the const arrays vfd_packet6 and fp_packet on the stack, instead make them static. Makes the object code smaller by over 600 bytes: Before: text data bss dec hex filename 43794 17920 1024 62738 f512 drivers/media/rc/imon.o After: text data bss dec hex filename 42994 18080 1024 62098 f292 drivers/media/rc/imon.o Signed-off-by: Colin Ian King Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/imon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 771f87268e8cd0e50719eb20f0b613ec4b2a19ec Author: Sean Young Date: Wed Sep 6 08:19:06 2017 -0300 [media] media: vp7045: port TwinhanDTV Alpha to rc-core Only the nec protocol is understood, but then it doesn't pass on the full scancode and it ignores the nec repeats its own remote sends, so holding buttons does not work. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/keymaps/rc-twinhan1027.c | 2 +- drivers/media/usb/dvb-usb/dvb-usb-remote.c | 1 + drivers/media/usb/dvb-usb/dvb-usb.h | 1 + drivers/media/usb/dvb-usb/vp7045.c | 88 +++++------------------------- 4 files changed, 18 insertions(+), 74 deletions(-) commit b9f407e31c50730784f70ec2deec71491395565f Author: Sean Young Date: Fri Sep 1 11:34:23 2017 -0300 [media] media: rc: include device name in rc udev event This name is also stored in the input's device name, but that is not available in TX only hardware (no input device). Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 2 ++ 1 file changed, 2 insertions(+) commit 6d75db305b8a964bfec337ca5f3c2cd5047b9bb1 Author: Sean Young Date: Fri Sep 1 11:30:50 2017 -0300 [media] media: rc: if protocols can't be changed, don't be writable If the protocols of an rc device cannot be changed, ensure the sysfs file is not writable. This makes it possible to detect this from userspace, so ir-keytable can deal with case without giving an error. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit 3c03726aaf3f99f6b08959fcb3c1c409b0c9813d Author: Sean Young Date: Fri Sep 1 10:10:01 2017 -0300 [media] media: rc: dvb: use dvb device name for rc device "IR-receiver inside an USB DVB receiver" is not descriptive and we have a proper name available. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/dvb-usb-remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 831c4c81e8ceba7d34b7fc66da1693bc4b9e7e11 Author: Sean Young Date: Fri Sep 1 09:55:59 2017 -0300 [media] media: rc: ensure that protocols are enabled for scancode drivers rc scancode drivers without change_protocol should have all protocols enabled at all time. This was only true for cec and ir-kbd-i2c. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-core.c | 1 - drivers/media/i2c/ir-kbd-i2c.c | 1 - drivers/media/rc/rc-main.c | 3 +++ 3 files changed, 3 insertions(+), 2 deletions(-) commit 6cafbe159416822f6d3dfd711bf4c39050c650ba Author: Steven Rostedt (VMware) Date: Tue Jun 20 10:44:58 2017 -0400 ftrace: Add a ftrace_free_mem() function for modules to use In order to be able to trace module init functions, the module code needs to tell ftrace what is being freed when the init sections are freed. Use the code that the main init calls to tell ftrace to free the main init sections. This requires passing in a start and end address to free. Signed-off-by: Steven Rostedt (VMware) include/linux/ftrace.h | 2 ++ kernel/trace/ftrace.c | 14 +++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) commit efdc16adb7d37a57b4d07833bbab73a0a1aed476 Author: Sean Young Date: Fri Sep 1 08:34:50 2017 -0300 [media] media: rc: avermedia keymap for a800 The keymap is missing one key, and correct another. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/keymaps/rc-avermedia-m135a.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3003812b37dcd2d47b1dbad54d46ef14bd043498 Author: Sean Young Date: Fri Sep 1 09:29:58 2017 -0300 [media] media: dvb: a800: port to rc-core This receiver only accepts nec16 messages, I've tried many other protocols and they're all dropped. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb/a800.c | 65 +++++++++------------------------------- 1 file changed, 14 insertions(+), 51 deletions(-) commit 6805454b9ceaf526f18193d89aeab0c00715dca3 Author: Markus Elfring Date: Tue Aug 29 16:04:20 2017 -0300 [media] media: img-ir: delete an error message for a failed memory allocation Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/img-ir/img-ir-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3e70b256a6b6a549bdbbd5d70895ff8147c7cf7d Author: Markus Elfring Date: Tue Aug 29 07:40:07 2017 -0300 [media] media: imon: delete an error message for a failed memory allocation Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/imon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f03f02f9d261902a5761f02ff03a0620ed4f9d0d Author: Bhumika Goyal Date: Sat Aug 19 05:22:15 2017 -0300 [media] media: rc: make device_type const Make this const as it is only stored in the type field of a device structure, which is const. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/rc-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fad16b5969b43a9722bbe3b288e40bff0003504 Author: Arvind Yadav Date: Sun Aug 13 05:54:44 2017 -0300 [media] media: rc: constify usb_device_id usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ati_remote.c | 2 +- drivers/media/rc/igorplugusb.c | 2 +- drivers/media/rc/imon.c | 2 +- drivers/media/rc/mceusb.c | 2 +- drivers/media/rc/redrat3.c | 2 +- drivers/media/rc/streamzap.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit b15e39379fe8700fe0ec849a5c5ee2b44cd16381 Author: David Härdeman Date: Sun Jun 25 09:32:36 2017 -0300 [media] media: lirc_dev: merge struct irctl into struct lirc_dev The use of two separate structs (lirc_dev aka lirc_driver and irctl) makes it much harder to follow the proper lifetime of the various structs and necessitates hacks such as keeping a copy of struct lirc_dev inside struct irctl. Merging the two structs means that lirc_dev can properly manage the lifetime of the resulting struct and simplifies the code at the same time. [mchehab@s-opensource.com: fix merge conflict] Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-lirc-codec.c | 15 +- drivers/media/rc/lirc_dev.c | 314 ++++++++++++++------------------ drivers/staging/media/lirc/lirc_zilog.c | 20 +- include/media/lirc_dev.h | 26 ++- 4 files changed, 175 insertions(+), 200 deletions(-) commit e9b871ee098dfb91780e13bfc6e91e82c7b4ad73 Author: Florian Westphal Date: Wed Oct 4 16:22:59 2017 +0200 selftests: rtnetlink: try concurrent change of ifalias to make sure this is serialized correctly. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller tools/testing/selftests/net/rtnetlink.sh | 6 ++++++ 1 file changed, 6 insertions(+) commit 5c45121dc39026ab2139910e57cf933fd57d30f2 Author: Florian Westphal Date: Wed Oct 4 15:58:49 2017 +0200 rtnetlink: remove __rtnl_af_unregister switch the only caller to rtnl_af_unregister. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller include/net/rtnetlink.h | 2 -- net/core/rtnetlink.c | 14 +------------- net/ipv6/addrconf.c | 4 ++-- 3 files changed, 3 insertions(+), 17 deletions(-) commit e774d96b7d2c3489bfb5bbdc2b65ed41cd68d3d5 Author: Florian Westphal Date: Wed Oct 4 15:55:29 2017 +0200 rtnetlink: remove slave_validate callback no users in the tree. Signed-off-by: Florian Westphal Acked-by: Jiri Pirko Signed-off-by: David S. Miller include/net/rtnetlink.h | 3 --- net/core/rtnetlink.c | 6 ------ 2 files changed, 9 deletions(-) commit ebf6b13142f947be576b40edce214788dfe1d3e3 Author: Colin Ian King Date: Wed Oct 4 14:20:37 2017 +0100 cxgb4vf: make a couple of functions static The functions t4vf_link_down_rc_str and t4vf_handle_get_port_info are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 't4vf_link_down_rc_str' was not declared. Should it be static? symbol 't4vf_handle_get_port_info' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 20e883204f0268b423799781e5efed786f8a11ba Author: Florian Westphal Date: Wed Oct 4 13:56:50 2017 +0200 net: core: fix kerneldoc comment net/core/dev.c:1306: warning: No description found for parameter 'name' net/core/dev.c:1306: warning: Excess function parameter 'alias' description in 'dev_get_alias' Fixes: 6c5570016b97 ("net: core: decouple ifalias get/set from rtnl lock") Reported-by: kbuild test robot Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d86d38186271438ef002c5ae6e04836f01bf8bf Author: Simon Horman Date: Wed Oct 4 09:54:27 2017 +0200 ravb: RX checksum offload Add support for RX checksum offload. This is enabled by default and may be disabled and re-enabled using ethtool: # ethtool -K eth0 rx off # ethtool -K eth0 rx on The RAVB provides a simple checksumming scheme which appears to be completely compatible with CHECKSUM_COMPLETE: sum of all packet data after the L2 header is appended to packet data; this may be trivially read by the driver and used to update the skb accordingly. In terms of performance throughput is close to gigabit line-rate both with and without RX checksum offload enabled. Perf output, however, appears to indicate that significantly less time is spent in do_csum(). This is as expected. Test results with RX checksum offload enabled: # /usr/bin/perf_3.16 record -o /run/perf.data -a netperf -t TCP_MAERTS -H 10.4.3.162 MIGRATED TCP MAERTS TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.4.3.162 () port 0 AF_INET : demo enable_enobufs failed: getprotobyname Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. 10^6bits/sec 87380 16384 16384 10.00 937.54 Summary of output of perf report: 18.28% ksoftirqd/0 [kernel.kallsyms] [k] _raw_spin_unlock_irqrestore 10.34% ksoftirqd/0 [kernel.kallsyms] [k] __pi_memcpy 9.83% ksoftirqd/0 [kernel.kallsyms] [k] ravb_poll 7.89% ksoftirqd/0 [kernel.kallsyms] [k] skb_put 4.01% ksoftirqd/0 [kernel.kallsyms] [k] dev_gro_receive 3.37% netperf [kernel.kallsyms] [k] __arch_copy_to_user 3.17% swapper [kernel.kallsyms] [k] arch_cpu_idle 2.55% swapper [kernel.kallsyms] [k] tick_nohz_idle_enter 2.04% ksoftirqd/0 [kernel.kallsyms] [k] __pi___inval_dcache_area 2.03% swapper [kernel.kallsyms] [k] _raw_spin_unlock_irq 1.96% ksoftirqd/0 [kernel.kallsyms] [k] __netdev_alloc_skb 1.59% ksoftirqd/0 [kernel.kallsyms] [k] __slab_alloc.isra.83 Test results without RX checksum offload enabled: # /usr/bin/perf_3.16 record -o /run/perf.data -a netperf -t TCP_MAERTS -H 10.4.3.162 MIGRATED TCP MAERTS TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.4.3.162 () port 0 AF_INET : demo enable_enobufs failed: getprotobyname Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. 10^6bits/sec 87380 16384 16384 10.00 940.20 Summary of output of perf report: 17.10% ksoftirqd/0 [kernel.kallsyms] [k] _raw_spin_unlock_irqrestore 10.99% ksoftirqd/0 [kernel.kallsyms] [k] __pi_memcpy 8.87% ksoftirqd/0 [kernel.kallsyms] [k] ravb_poll 8.16% ksoftirqd/0 [kernel.kallsyms] [k] skb_put 7.42% ksoftirqd/0 [kernel.kallsyms] [k] do_csum 3.91% ksoftirqd/0 [kernel.kallsyms] [k] dev_gro_receive 2.31% swapper [kernel.kallsyms] [k] arch_cpu_idle 2.16% ksoftirqd/0 [kernel.kallsyms] [k] __pi___inval_dcache_area 2.14% ksoftirqd/0 [kernel.kallsyms] [k] __netdev_alloc_skb 1.93% netperf [kernel.kallsyms] [k] __arch_copy_to_user 1.79% swapper [kernel.kallsyms] [k] tick_nohz_idle_enter 1.63% ksoftirqd/0 [kernel.kallsyms] [k] __slab_alloc.isra.83 Above results collected on an R-Car Gen 3 Salvator-X/r8a7796 ES1.0. Also tested on a R-Car Gen 3 Salvator-X/r8a7795 ES1.0. By inspection this also appears to be compatible with the ravb found on R-Car Gen 2 SoCs, however, this patch is currently untested on such hardware. Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/renesas/ravb_main.c | 55 +++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) commit 13f96555d6faa6dc57fb5faedf728447a3188230 Author: David Härdeman Date: Sun Jun 25 09:32:31 2017 -0300 [media] media: lirc_zilog: use a dynamically allocated lirc_dev lirc_zilog currently embeds a struct lirc_dev in its own struct IR, but subsequent patches will make the lifetime of struct lirc_dev dynamic (i.e. it will be free():d once lirc_dev is sure there are no users of the struct). Therefore, change lirc_zilog to use a pointer to a dynamically allocated struct lirc_dev. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_zilog.c | 69 +++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 29 deletions(-) commit b35bd0d9f8a8ea17aae40893e18274d191a2d2c5 Author: Jens Axboe Date: Sat Sep 30 23:39:05 2017 -0600 sysctl: remove /proc/sys/vm/nr_pdflush_threads This tunable has been obsolete since 2.6.32, and writes to the file have been failing and complaining in dmesg since then: nr_pdflush_threads exported in /proc is scheduled for removal That was 8 years ago. Remove the file ABI obsolete notice, and the sysfs file. Reviewed-by: Jan Kara Signed-off-by: Jens Axboe Documentation/ABI/obsolete/proc-sys-vm-nr_pdflush_threads | 5 ----- kernel/sysctl.c | 5 ----- 2 files changed, 10 deletions(-) commit 85009b4f5f0399669a44f07cb9a5622c0e71d419 Author: Jens Axboe Date: Sat Sep 30 02:09:06 2017 -0600 writeback: eliminate work item allocation in bd_start_writeback() Handle start-all writeback like we do periodic or kupdate style writeback - by marking the bdi_writeback as needing a full flush, and simply waking the thread. This eliminates the need to allocate and queue a specific work item just for this purpose. After this change, we truly only ever have one of them running at any point in time. We mark the need to start all flushes, and the writeback thread will clear it once it has processed the request. Reviewed-by: Jan Kara Signed-off-by: Jens Axboe fs/fs-writeback.c | 71 +++++++++++++++++++--------------------- include/linux/backing-dev-defs.h | 23 +++++++++++++ include/linux/writeback.h | 22 ------------- include/trace/events/writeback.h | 1 - 4 files changed, 57 insertions(+), 60 deletions(-) commit f08e52878e101f3794c432dcbaa2179d1a903ded Author: David Härdeman Date: Sun Jun 25 09:32:25 2017 -0300 [media] media: lirc_zilog: add a pointer to the parent device to struct IR lirc_zilog stashes a pointer to the parent device in struct lirc_dev and uses it for logging. It makes more sense to let lirc_zilog keep track of that pointer in its own struct (this is in preparation for subsequent patches which will remodel struct lirc_dev). Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/lirc/lirc_zilog.c | 98 +++++++++++++++++---------------- 1 file changed, 50 insertions(+), 48 deletions(-) commit fc13457f74dcf054b0d17efb7b94b46fdf17f412 Author: Jens Axboe Date: Wed Oct 4 11:22:24 2017 -0600 blk-mq: document the need to have STARTED and COMPLETED share a byte For memory ordering guarantees on stores, we need to ensure that these two bits share the same byte of storage in the unsigned long. Add a comment as to why, and a BUILD_BUG_ON() to ensure that we don't violate this requirement. Suggested-by: Boqun Feng Signed-off-by: Jens Axboe block/blk-mq.c | 6 ++++++ block/blk.h | 7 +++++++ 2 files changed, 13 insertions(+) commit a7620b2dff23409bb5a906e19814021e8dec00e5 Author: Marek Szyprowski Date: Tue Oct 3 12:13:32 2017 +0200 ARM: multi_v7_defconfig: Enable UAS support for Odroid HC1 board Odroid HC1 board has built-in JMicron USB to SATA bridge, which supports UAS protocol. Enable support for it to make sure that all built-in storage devices are available. Enable it as module to keep in line with multi_v7 policy to enable drivers as build-in only if they are critical for boot process. On Odroid HC1 the kernel itself has to be still read from the SD-card, so assume that modules/initrd is also accessible there. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit a7af0af32171c17d881e3e58b0925c4a44fb5a42 Author: Peter Zijlstra Date: Wed Sep 6 10:00:22 2017 +0200 blk-mq: attempt to fix atomic flag memory ordering Attempt to untangle the ordering in blk-mq. The patch introducing the single smp_mb__before_atomic() is obviously broken in that it doesn't clearly specify a pairing barrier and an obtained guarantee. The comment is further misleading in that it hints that the deadline store and the COMPLETE store also need to be ordered, but AFAICT there is no such dependency. However what does appear to be important is the clear happening _after_ the store, and that worked by pure accident. This clarifies blk_mq_start_request() -- we should not get there with STARTING set -- this simplifies the code and makes the barrier usage sane (the old code could be read to allow not having _any_ atomic after the barrier, in which case the barrier hasn't got anything to order). We then also introduce the missing pairing barrier for it. Also down-grade the barrier to smp_wmb(), this is cheaper for PowerPC/ARM and doesn't cost anything extra on x86. And it documents the STARTING vs COMPLETE ordering. Although I've not been entirely successful in reverse engineering the blk-mq state machine so there might still be more funnies around timeout vs requeue. If I got anything wrong, feel free to educate me by adding comments to clarify things ;-) Cc: Alan Stern Cc: Will Deacon Cc: Ming Lei Cc: Christoph Hellwig Cc: Andrea Parri Cc: Boqun Feng Cc: Bart Van Assche Cc: "Paul E. McKenney" Fixes: 538b75341835 ("blk-mq: request deadline must be visible before marking rq as started") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Jens Axboe block/blk-mq.c | 52 ++++++++++++++++++++++++++++++++++++++++------------ block/blk-timeout.c | 2 +- 2 files changed, 41 insertions(+), 13 deletions(-) commit 6ecccc379b7334c02f90a401dafea6fce5c91310 Author: David Härdeman Date: Sun Jun 25 09:32:15 2017 -0300 [media] media: lirc_dev: introduce lirc_allocate_device and lirc_free_device Introduce two new functions so that the API for lirc_dev matches that of the rc-core and input subsystems. This means that lirc_dev structs are managed using the usual four functions: lirc_allocate_device lirc_free_device lirc_register_device lirc_unregister_device The functions are pretty simplistic at this point, later patches will put more flesh on the bones of both. Signed-off-by: David Härdeman Signed-off-by: Sean Young drivers/media/rc/ir-lirc-codec.c | 2 +- drivers/media/rc/lirc_dev.c | 13 +++++++++++++ include/media/lirc_dev.h | 9 ++++----- 3 files changed, 18 insertions(+), 6 deletions(-) commit 5ddc9c098dc3f91243840cec12a2170e9ab9f33a Author: David Härdeman Date: Thu Sep 21 16:13:34 2017 -0300 [media] media: rename struct lirc_driver to struct lirc_dev This is in preparation for the later patches which do away with struct irctl entirely. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-lirc-codec.c | 52 ++++++++++++++++----------------- drivers/media/rc/lirc_dev.c | 12 ++++---- drivers/media/rc/rc-core-priv.h | 2 +- drivers/staging/media/lirc/lirc_zilog.c | 12 ++++---- include/media/lirc_dev.h | 48 +++++++++--------------------- 5 files changed, 52 insertions(+), 74 deletions(-) commit 5819eaddf35b24d628ddfa4fbb5f8d4026e44b96 Author: Tom Zanussi Date: Fri Sep 22 14:58:23 2017 -0500 tracing: Reimplement log2 log2 as currently implemented applies only to u64 trace_event_field derived fields, and assumes that anything it's applied to is a u64 field. To prepare for synthetic fields like latencies, log2 should be applicable to those as well, so take the opportunity now to fix the current problems as well as expand to more general uses. log2 should be thought of as a chaining function rather than a field type. To enable this as well as possible future function implementations, add a hist_field operand array into the hist_field definition for this purpose, and make use of it to implement the log2 'function'. Link: http://lkml.kernel.org/r/b47f93fc0b87b36eccf716b0c018f3a71e1f1111.1506105045.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit 85013256cf01629f72a327674c5d007b4a4b40da Author: Tom Zanussi Date: Fri Sep 22 14:58:22 2017 -0500 tracing: Add hist_field_name() accessor In preparation for hist_fields that won't be strictly based on trace_event_fields, add a new hist_field_name() accessor to allow that flexibility and update associated users. Link: http://lkml.kernel.org/r/5b5a2d36dde067cbbe2434b10f06daac27b7dbd5.1506105045.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 67 +++++++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 22 deletions(-) commit 0d7a8325bf3326c92da2d21b4496a9ddde896d4f Author: Tom Zanussi Date: Fri Sep 22 14:58:21 2017 -0500 tracing: Clean up hist_field_flags enum As we add more flags, specifying explicit integers for the flag values becomes more unwieldy and error-prone - switch them over to left-shift values. Link: http://lkml.kernel.org/r/e644e4fb7665aec015f4a2d84a2f990d3dd5b8a1.1506105045.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 7e465baa80293ed5f87fdf6405391d6f02110d4e Author: Tom Zanussi Date: Fri Sep 22 14:58:20 2017 -0500 tracing: Make traceprobe parsing code reusable traceprobe_probes_write() and traceprobe_command() actually contain nothing that ties them to kprobes - the code is generically useful for similar types of parsing elsewhere, so separate it out and move it to trace.c/trace.h. Other than moving it, the only change is in naming: traceprobe_probes_write() becomes trace_parse_run_command() and traceprobe_command() becomes trace_run_command(). Link: http://lkml.kernel.org/r/ae5c26ea40c196a8986854d921eb6e713ede7e3f.1506105045.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 86 +++++++++++++++++++++++++++++++++++++++++++++ kernel/trace/trace.h | 7 ++++ kernel/trace/trace_kprobe.c | 18 +++++----- kernel/trace/trace_probe.c | 86 --------------------------------------------- kernel/trace/trace_probe.h | 7 ---- kernel/trace/trace_uprobe.c | 2 +- 6 files changed, 103 insertions(+), 103 deletions(-) commit 4f36c2d85cedea60ad424d44534121ab0458069e Author: Tom Zanussi Date: Fri Sep 22 14:58:19 2017 -0500 tracing: Increase tracing map KEYS_MAX size The current default for the number of subkeys in a compound key is 2, which is too restrictive. Increase it to a more realistic value of 3. Link: http://lkml.kernel.org/r/b6952cca06d1f912eba33804a6fd6069b3847d44.1506105045.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/tracing_map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83c07ecc4203728e85fc4a2ce6fdf25d16ea118e Author: Tom Zanussi Date: Fri Sep 22 14:58:18 2017 -0500 tracing: Remove lookups from tracing_map hitcount Lookups inflate the hitcount, making it essentially useless. Only inserts and updates should really affect the hitcount anyway, so explicitly filter lookups out. Link: http://lkml.kernel.org/r/c8d9dc39d269a8abf88bf4102d0dfc65deb0fc7f.1506105045.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/tracing_map.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a15f7fc20389a8827d5859907568b201234d4b79 Author: Tom Zanussi Date: Fri Sep 22 14:58:17 2017 -0500 tracing: Exclude 'generic fields' from histograms There are a small number of 'generic fields' (comm/COMM/cpu/CPU) that are found by trace_find_event_field() but are only meant for filtering. Specifically, they unlike normal fields, they have a size of 0 and thus wreak havoc when used as a histogram key. Exclude these (return -EINVAL) when used as histogram keys. Link: http://lkml.kernel.org/r/956154cbc3e8a4f0633d619b886c97f0f0edf7b4.1506105045.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 46c8f4771154eb0dc21f5f2bc2640a33e8fe1d02 Author: David Härdeman Date: Sun Jun 25 09:32:05 2017 -0300 [media] media: lirc_dev: use an IDA instead of an array to keep track of registered devices Using the kernel-provided IDA simplifies the code and makes it possible to remove the lirc_dev_lock mutex. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 36 ++++++++++++------------------------ include/media/lirc_dev.h | 1 - 2 files changed, 12 insertions(+), 25 deletions(-) commit 3381b779a736f4908a64b603ce339ab067e01de7 Author: David Härdeman Date: Fri Jun 30 05:41:57 2017 -0300 [media] media: lirc_dev: sanitize locking Use the irctl mutex for all device operations and only use lirc_dev_lock to protect the irctls array. Also, make sure that the device is alive early in each fops function before doing anything else. Since this patch touches nearly every line where the irctl mutex is taken/released, it also renames the mutex at the same time (the name irctl_lock will be misleading once struct irctl goes away in later patches). [mchehab@s-opensource.com: fix a merge conflict] Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 165 +++++++++++++++++++++++++------------------- 1 file changed, 93 insertions(+), 72 deletions(-) commit 3bce5572364899970cbe908d98c51d1bc743b2f8 Author: David Härdeman Date: Sun Jun 25 09:31:55 2017 -0300 [media] media: lirc_dev: change irctl->attached to be a boolean The "attached" member of struct irctl is a boolean value, so let the code reflect that. 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 b145ef94f63e02c2615ffde61a376b53f3367bc6 Author: David Härdeman Date: Sun Jun 25 09:31:45 2017 -0300 [media] media: lirc_dev: make chunk_size and buffer_size mandatory Make setting chunk_size and buffer_size mandatory for drivers which expect lirc_dev to allocate the lirc_buffer (i.e. ir-lirc-codec) and don't set them in lirc-zilog (which creates its own buffer). Also remove an unnecessary copy of chunk_size in struct irctl (the same information is already available from struct lirc_buffer). Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 26 +++++++++++++------------- drivers/staging/media/lirc/lirc_zilog.c | 5 +---- include/media/lirc_dev.h | 9 +++++---- 3 files changed, 19 insertions(+), 21 deletions(-) commit ac14fbd460d0ec16e7750e40dcd8199b0ff83d0a Author: Chris Wilson Date: Tue Oct 3 21:34:53 2017 +0100 drm/i915/scheduler: Support user-defined priorities Use a priority stored in the context as the initial value when submitting a request. This allows us to change the default priority on a per-context basis, allowing different contexts to be favoured with GPU time at the expense of lower importance work. The user can adjust the context's priority via I915_CONTEXT_PARAM_PRIORITY, with more positive values being higher priority (they will be serviced earlier, after their dependencies have been resolved). Any prerequisite work for an execbuf will have its priority raised to match the new request as required. Normal users can specify any value in the range of -1023 to 0 [default], i.e. they can reduce the priority of their workloads (and temporarily boost it back to normal if so desired). Privileged users can specify any value in the range of -1023 to 1023, [default is 0], i.e. they can raise their priority above all overs and so potentially starve the system. Note that the existing schedulers are not fair, nor load balancing, the execution is strictly by priority on a first-come, first-served basis, and the driver may choose to boost some requests above the range available to users. This priority was originally based around nice(2), but evolved to allow clients to adjust their priority within a small range, and allow for a privileged high priority range. For example, this can be used to implement EGL_IMG_context_priority https://www.khronos.org/registry/egl/extensions/IMG/EGL_IMG_context_priority.txt EGL_CONTEXT_PRIORITY_LEVEL_IMG determines the priority level of the context to be created. This attribute is a hint, as an implementation may not support multiple contexts at some priority levels and system policy may limit access to high priority contexts to appropriate system privilege level. The default value for EGL_CONTEXT_PRIORITY_LEVEL_IMG is EGL_CONTEXT_PRIORITY_MEDIUM_IMG." so we can map PRIORITY_HIGH -> 1023 [privileged, will failback to 0] PRIORITY_MED -> 0 [default] PRIORITY_LOW -> -1023 They also map onto the priorities used by VkQueue (and a VkQueue is essentially a timeline, our i915_gem_context under full-ppgtt). v2: s/CAP_SYS_ADMIN/CAP_SYS_NICE/ v3: Report min/max user priorities as defines in the uapi, and rebase internal priorities on the exposed values. Testcase: igt/gem_exec_schedule Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171003203453.15692-9-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_gem_context.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/i915/i915_gem_request.h | 14 ++++++++++---- include/uapi/drm/i915_drm.h | 7 +++++++ 4 files changed, 41 insertions(+), 4 deletions(-) commit beecec9017901849352cfd2886981fe462f9fed0 Author: Chris Wilson Date: Tue Oct 3 21:34:52 2017 +0100 drm/i915/execlists: Preemption! When we write to ELSP, it triggers a context preemption at the earliest arbitration point (3DPRIMITIVE, some PIPECONTROLs, a few other operations and the explicit MI_ARB_CHECK). If this is to the same context, it triggers a LITE_RESTORE where the RING_TAIL is merely updated (used currently to chain requests from the same context together, avoiding bubbles). However, if it is to a different context, a full context-switch is performed and it will start to execute the new context saving the image of the old for later execution. Previously we avoided preemption by only submitting a new context when the old was idle. But now we wish embrace it, and if the new request has a higher priority than the currently executing request, we write to the ELSP regardless, thus triggering preemption, but we tell the GPU to switch to our special preemption context (not the target). In the context-switch interrupt handler, we know that the previous contexts have finished execution and so can unwind all the incomplete requests and compute the new highest priority request to execute. It would be feasible to avoid the switch-to-idle intermediate by programming the ELSP with the target context. The difficulty is in tracking which request that should be whilst maintaining the dependency change, the error comes in with coalesced requests. As we only track the most recent request and its priority, we may run into the issue of being tricked in preempting a high priority request that was followed by a low priority request from the same context (e.g. for PI); worse still that earlier request may be our own dependency and the order then broken by preemption. By injecting the switch-to-idle and then recomputing the priority queue, we avoid the issue with tracking in-flight coalesced requests. Having tried the preempt-to-busy approach, and failed to find a way around the coalesced priority issue, Michal's original proposal to inject an idle context (based on handling GuC preemption) succeeds. The current heuristic for deciding when to preempt are only if the new request is of higher priority, and has the privileged priority of greater than 0. Note that the scheduler remains unfair! v2: Disable for gen8 (bdw/bsw) as we need additional w/a for GPGPU. Since, the feature is now conditional and not always available when we have a scheduler, make it known via the HAS_SCHEDULER GETPARAM (now a capability mask). v3: Stylistic tweaks. v4: Appease Joonas with a snippet of kerneldoc, only to fuel to fire of the preempt vs preempting debate. Suggested-by: Michal Winiarski Signed-off-by: Chris Wilson Cc: Michal Winiarski Cc: Tvrtko Ursulin Cc: Arkadiusz Hiler Cc: Mika Kuoppala Cc: Ben Widawsky Cc: Zhenyu Wang Cc: Zhi Wang Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171003203453.15692-8-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 9 +- drivers/gpu/drm/i915/i915_irq.c | 6 +- drivers/gpu/drm/i915/i915_pci.c | 2 + drivers/gpu/drm/i915/intel_lrc.c | 157 +++++++++++++++++++++++++------- drivers/gpu/drm/i915/intel_ringbuffer.h | 5 + 5 files changed, 143 insertions(+), 36 deletions(-) commit bf64e0b00e1ff30449cc68e7bc7498adb6faa343 Author: Chris Wilson Date: Tue Oct 3 21:34:51 2017 +0100 drm/i915: Expand I915_PARAM_HAS_SCHEDULER into a capability bitmask In the next few patches, we wish to enable different features for the scheduler, some which may subtlety change ABI (e.g. allow requests to be reordered under different circumstances). So we need to make sure userspace is cognizant of the changes (if they care), by which we employ the usual method of a GETPARAM. We already have an I915_PARAM_HAS_SCHEDULER (which notes the existing ability to reorder requests to avoid bubbles), and now we wish to extend that to be a bitmask to describe the different capabilities implemented. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171003203453.15692-7-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.c | 5 +++-- include/uapi/drm/i915_drm.h | 9 ++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) commit 1f181225f8ec4ca59b53239aa06475d7c5b936b3 Author: Chris Wilson Date: Tue Oct 3 21:34:50 2017 +0100 drm/i915/execlists: Keep request->priority for its lifetime With preemption, we will want to "unsubmit" a request, taking it back from the hw and returning it to the priority sorted execution list. In order to know where to insert it into that list, we need to remember its adjust priority (which may change even as it was being executed). This also affects reset for execlists as we are now unsubmitting the requests following the reset (rather than directly writing the ELSP for the inflight contexts). This turns reset into an accidental preemption point, as after the reset we may choose a different pair of contexts to submit to hw. GuC is not updated as this series doesn't add preemption to the GuC submission, and so it can keep benefiting from the early pruning of the DFS inside execlists_schedule() for a little longer. We also need to find a way of reducing the cost of that DFS... v2: Include priority in error-state Signed-off-by: Chris Wilson Cc: Michał Winiarski Reviewed-by: Michał Winiarski Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171003203453.15692-6-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gpu_error.c | 10 ++++++---- drivers/gpu/drm/i915/intel_lrc.c | 14 ++++++++++---- 3 files changed, 18 insertions(+), 8 deletions(-) commit 3ad7b52d962e7c7da11128be4108f606460ae4d2 Author: Chris Wilson Date: Tue Oct 3 21:34:49 2017 +0100 drm/i915/execlists: Move bdw GPGPU w/a to emit_bb Move the re-enabling of MI arbitration from a per-bb w/a buffer to the emission of the batch buffer itself. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171003203453.15692-5-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) commit e7af3116836fb7feb985497f2c7776751fb27ef3 Author: Chris Wilson Date: Tue Oct 3 21:34:48 2017 +0100 drm/i915: Introduce a preempt context Add another perma-pinned context for using for preemption at any time. We cannot just reuse the existing kernel context, as first and foremost we need to ensure that we can preempt the kernel context itself, so require a distinct context id. Similar to the kernel context, we may want to interrupt execution and switch to the preempt context at any time, and so it needs to be permanently pinned and available. To compensate for yet another permanent allocation, we shrink the existing context and the new context by reducing their ringbuffer to the minimum. v2: Assert that we never allocate a request from the preemption context. v3: Limit perma-pin to engines that may preempt. v4: Onion cleanup for early driver death v5: Onion ordering in main driver cleanup as well. Signed-off-by: Chris Wilson Reviewed-by: Michał Winiarski Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171003203453.15692-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 6 ++- drivers/gpu/drm/i915/i915_gem_context.c | 76 ++++++++++++++++++++++++--------- drivers/gpu/drm/i915/i915_gem_request.c | 7 +++ drivers/gpu/drm/i915/intel_engine_cs.c | 22 +++++++++- 4 files changed, 87 insertions(+), 24 deletions(-) commit d6c0511300dcff19969844495ba293c4efb50b42 Author: Chris Wilson Date: Tue Oct 3 21:34:47 2017 +0100 drm/i915/execlists: Distinguish the incomplete context notifies Let the listener know that the context we just scheduled out was not complete, and will be scheduled back in at a later point. v2: Handle CONTEXT_STATUS_PREEMPTED in gvt by aliasing it to CONTEXT_STATUS_OUT for the moment, gvt can expand upon the difference later. Signed-off-by: Chris Wilson Cc: "Zhenyu Wang" Cc: "Wang, Zhi A" Cc: Michał Winiarski Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171003203453.15692-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gvt/scheduler.c | 1 + drivers/gpu/drm/i915/intel_lrc.c | 2 +- drivers/gpu/drm/i915/intel_lrc.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) commit 5152defe4a53ad15e6d96c422440152302c8abd7 Author: Michał Winiarski Date: Tue Oct 3 21:34:46 2017 +0100 drm/i915/preempt: Default to disabled mid-command preemption levels Supporting fine-granularity preemption levels may require changes in userspace batch buffer programming. Therefore, we need to fallback to safe default values, rather that use hardware defaults. Userspace is still able to enable fine-granularity, since we're whitelisting the register controlling it in WaEnablePreemptionGranularityControlByUMD. v2: Extend w/a to cover Cannonlake v3: Fix commentary to include both fake w/a names. Signed-off-by: Michał Winiarski Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171003203453.15692-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_reg.h | 6 ++++++ drivers/gpu/drm/i915/intel_engine_cs.c | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit 1e998343f95b46497c56a21de1b14a302256f973 Author: Jeff McGee Date: Tue Oct 3 21:34:45 2017 +0100 drm/i915/preempt: Fix WaEnablePreemptionGranularityControlByUMD The WA applies to all production Gen9 and requires both enabling and whitelisting of the per-context preemption control register. v2: Extend to Cannonlake. Signed-off-by: Jeff McGee Signed-off-by: Michał Winiarski Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171003203453.15692-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_engine_cs.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 615cd3fe6cccb950b46728120009a1805cce908e Author: David Härdeman Date: Sun Jun 25 09:31:40 2017 -0300 [media] media: lirc_dev: make better use of file->private_data By making better use of file->private_data in lirc_dev we can avoid digging around in the irctls[] array, thereby simplifying the code. External drivers need to use lirc_get_pdata() instead of mucking around in file->private_data. The newly introduced lirc_init_pdata() function isn't very elegant, but it's a stopgap measure which can be removed once lirc_zilog is converted to rc-core. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 70 ++++++++++----------------------- drivers/staging/media/lirc/lirc_zilog.c | 53 +++++-------------------- include/media/lirc_dev.h | 3 ++ 3 files changed, 33 insertions(+), 93 deletions(-) commit 0510d81081498eae2a8bf9d116cc03492fab5894 Author: David Härdeman Date: Sun Jun 25 09:31:35 2017 -0300 [media] media: lirc_dev: use cdev_device_add() helper function Replace calls to cdev_add() and device_add() with the cdev_device_add() helper function. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/lirc_dev.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit c3c6dd750e0b8dcee0306b9c5a45708922debbbe Author: David Härdeman Date: Sun Jun 25 09:31:24 2017 -0300 [media] media: lirc_dev: remove support for manually specifying minor number All users of lirc_register_driver() uses dynamic minor allocation, therefore we can remove the ability to explicitly request a given number. This changes the function prototype of lirc_unregister_driver() to also take a struct lirc_driver pointer as the sole argument. Signed-off-by: David Härdeman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/ir-lirc-codec.c | 9 ++--- drivers/media/rc/lirc_dev.c | 68 +++++++++------------------------ drivers/staging/media/lirc/lirc_zilog.c | 14 +++---- include/media/lirc_dev.h | 20 +++++----- 4 files changed, 34 insertions(+), 77 deletions(-) commit de226ec8a6ac10e65fcc689a28761c966986e6a6 Author: David Härdeman Date: Sun Jun 25 09:31:19 2017 -0300 [media] media: lirc_dev: clarify error handling If an error is generated, it is more logical to error out ASAP. 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, 4 insertions(+), 2 deletions(-) commit 3af7a9c6446b4489d208e501d95c5745d89f6628 Author: Michal Wajdeczko Date: Wed Oct 4 15:33:27 2017 +0000 drm/i915/guc: Move Guc early init into own function We don't want to make aggregate uc functions to be too detailed. This will also make future patch easier. Signed-off-by: Michal Wajdeczko Cc: Sagar Arun Kamble Cc: Joonas Lahtinen Reviewed-by: Sagar Arun Kamble Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171004153327.32608-7-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit d56d63d78c69d880517b5bb72e5ee2be3ead7b18 Author: Michal Wajdeczko Date: Wed Oct 4 15:33:26 2017 +0000 drm/i915/huc: Move HuC declarations into dedicated header We want to keep each uC specific code in separate files. Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Sagar Arun Kamble Reviewed-by: Sagar Arun Kamble Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171004153327.32608-6-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_huc.h | 39 +++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uc.h | 13 +------------ 2 files changed, 40 insertions(+), 12 deletions(-) commit a16b4313ae56ec4d19d0c846487810ff3811a742 Author: Michal Wajdeczko Date: Wed Oct 4 15:33:25 2017 +0000 drm/i915/uc: Move uC fw helper code into dedicated files This is a prerequisite to unblock next steps. v2: correct include order (Joonas) v3: use common function prefix (Joonas) add kerneldoc (Michal) Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Sagar Arun Kamble Reviewed-by: Sagar Arun Kamble Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171004153327.32608-5-michal.wajdeczko@intel.com drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/intel_uc.c | 159 +----------------------------- drivers/gpu/drm/i915/intel_uc.h | 67 +------------ drivers/gpu/drm/i915/intel_uc_fw.c | 193 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uc_fw.h | 98 +++++++++++++++++++ 5 files changed, 297 insertions(+), 221 deletions(-) commit 1fc556fa346948c337d1b04d809443f65e77e04f Author: Sagar Arun Kamble Date: Wed Oct 4 15:33:24 2017 +0000 drm/i915/uc: Create intel_uc_init_mmio This patch adds new function intel_uc_init_mmio which will initialize MMIO access related variables prior to uc load/init. v2: Removed unnecessary export of guc_send_init_regs. Created intel_uc_init_mmio that currently wraps guc_init_send_regs. (Michal) v3 (Michal): add kerneldoc (Joonas) Signed-off-by: Sagar Arun Kamble Cc: Michal Wajdeczko Cc: Michał Winiarski Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171004153327.32608-4-michal.wajdeczko@intel.com drivers/gpu/drm/i915/i915_drv.c | 2 ++ drivers/gpu/drm/i915/intel_uc.c | 15 +++++++++++++-- drivers/gpu/drm/i915/intel_uc.h | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) commit c23b4f460eb4a44ffbc69af1269e7e212e193a25 Author: Michal Wajdeczko Date: Wed Oct 4 15:33:23 2017 +0000 drm/i915/uc: Drop unnecessary forward declaration We don't need it here. Signed-off-by: Michal Wajdeczko Cc: Sagar Arun Kamble Cc: Joonas Lahtinen Reviewed-by: Sagar Arun Kamble Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171004153327.32608-3-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uc.h | 2 -- 1 file changed, 2 deletions(-) commit de7e095a4b6b9dbc643beb39f28b3022fec28220 Author: Michal Wajdeczko Date: Wed Oct 4 15:33:22 2017 +0000 drm/i915: Make intel_uncore.h header self-contained We're trying to resolve inter-header dependencies. Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171004153327.32608-2-michal.wajdeczko@intel.com drivers/gpu/drm/i915/intel_uncore.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 5b9fbfff7644f2d3f42a6c105587b86e29ca9c48 Author: Jordan Crouse Date: Tue Oct 3 09:38:10 2017 -0600 drm: fix typo in drm_gem_get_pages() comment I spent an embarrassingly long time looking for drm_gem_init_object() before I realized I was actually looking for drm_gem_object_init(). Fix the typo to keep other poor developers from suffering the same fate. Signed-off-by: Jordan Crouse Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1507045091-6550-1-git-send-email-jcrouse@codeaurora.org drivers/gpu/drm/drm_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f62d4c9efd809b9eff28fb755d7249716d98a7af Author: Wolfram Sang Date: Wed Oct 4 17:52:52 2017 +0200 pinctrl: sh-pfc: r8a7795: Add I2C pin support Since pinmuxing for I2C is equal on H3 ES1.0 and later versions, copy the I2C settings from ES1.0. Fixes this error in upstream for Salvator-XS: sh-pfc e6060000.pin-controller: function 'i2c2' not supported sh-pfc e6060000.pin-controller: invalid function i2c2 in map table i2c-rcar: probe of e6510000.i2c failed with error -22 Now, the bus works the same as with other Salvator boards. Signed-off-by: Wolfram Sang Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 77 ++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) commit 1a149d7d3f45d311da1f63473736c05f30ae8a75 Author: Steven Rostedt (VMware) Date: Fri Sep 22 16:59:02 2017 -0400 ring-buffer: Rewrite trace_recursive_(un)lock() to be simpler The current method to prevent the ring buffer from entering into a recursize loop is to use a bitmask and set the bit that maps to the current context (normal, softirq, irq or NMI), and if that bit was already set, it is considered a recursive loop. New code is being added that may require the ring buffer to be entered a second time in the current context. The recursive locking prevents that from happening. Instead of mapping a bitmask to the current context, just allow 4 levels of nesting in the ring buffer. This matches the 4 context levels that it can already nest. It is highly unlikely to have more than two levels, thus it should be fine when we add the second entry into the ring buffer. If that proves to be a problem, we can always up the number to 8. An added benefit is that reading preempt_count() to get the current level adds a very slight but noticeable overhead. This removes that need. Signed-off-by: Steven Rostedt (VMware) kernel/trace/ring_buffer.c | 64 ++++++++++++---------------------------------- 1 file changed, 17 insertions(+), 47 deletions(-) commit 12ecef0cb12102d8c034770173d2d1363cb97d52 Author: Steven Rostedt (VMware) Date: Thu Sep 21 16:22:49 2017 -0400 tracing: Reverse the order of trace_types_lock and event_mutex In order to make future changes where we need to call tracing_set_clock() from within an event command, the order of trace_types_lock and event_mutex must be reversed, as the event command will hold event_mutex and the trace_types_lock is taken from within tracing_set_clock(). Link: http://lkml.kernel.org/r/20170921162249.0dde3dca@gandalf.local.home Requested-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.c | 5 +++++ kernel/trace/trace_events.c | 31 +++++++++++++++---------------- 2 files changed, 20 insertions(+), 16 deletions(-) commit 6e7a2398114a2597a0995f96f44d908741ae5035 Author: Colin Ian King Date: Wed Aug 23 12:23:09 2017 +0100 tracing: Remove redundant unread variable ret Integer ret is being assigned but never used and hence it is redundant. Remove it, fixes clang warning: trace_events_hist.c:1077:3: warning: Value stored to 'ret' is never read Link: http://lkml.kernel.org/r/20170823112309.19383-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace_events_hist.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d8c4deee6dc6876ae3b7d09a5b58138a57ee45f6 Author: Joel Fernandes Date: Fri Sep 8 23:55:17 2017 -0700 tracing: Remove obsolete sched_switch tracer selftest Since commit 87d80de2800d087ea833cb79bc13f85ff34ed49f ("tracing: Remove obsolete sched_switch tracer"), the sched_switch tracer selftest is no longer used. This patch removes the same. Link: http://lkml.kernel.org/r/20170909065517.22262-1-joelaf@google.com Cc: Ingo Molnar Cc: kernel-team@android.com Signed-off-by: Joel Fernandes Signed-off-by: Steven Rostedt (VMware) kernel/trace/trace.h | 2 -- kernel/trace/trace_selftest.c | 32 -------------------------------- 2 files changed, 34 deletions(-) commit ecb1596aa27856a256b0698a93d7be06ce041e73 Author: Geert Uytterhoeven Date: Wed Oct 4 14:20:27 2017 +0200 spi: sh-msiof: Use of_device_get_match_data() helper Use the of_device_get_match_data() helper instead of open coding. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/spi-sh-msiof.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b48cc1d9c3a93b239700198f69b1a49b23d95b83 Author: Geert Uytterhoeven Date: Wed Oct 4 14:28:30 2017 +0200 ASoC: fsi: Use of_device_get_match_data() helper Use the of_device_get_match_data() helper instead of open coding. Note that when used with DT, there's always a valid match. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown sound/soc/sh/fsi.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 219a7bc577e6024cd6f84571d93d939b3517aafe Author: Geert Uytterhoeven Date: Wed Oct 4 14:19:53 2017 +0200 spi: rspi: Use of_device_get_match_data() helper Use the of_device_get_match_data() helper instead of open coding. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/spi-rspi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 6b240306ee1631587a87845127824df54a0a5abe Author: Eric W. Biederman Date: Mon Oct 2 09:38:20 2017 -0500 selinux: Perform both commoncap and selinux xattr checks When selinux is loaded the relax permission checks for writing security.capable are not honored. Which keeps file capabilities from being used in user namespaces. Stephen Smalley writes: > Originally SELinux called the cap functions directly since there was no > stacking support in the infrastructure and one had to manually stack a > secondary module internally. inode_setxattr and inode_removexattr > however were special cases because the cap functions would check > CAP_SYS_ADMIN for any non-capability attributes in the security.* > namespace, and we don't want to impose that requirement on setting > security.selinux. Thus, we inlined the capabilities logic into the > selinux hook functions and adapted it appropriately. Now that the permission checks in commoncap have evolved this inlining of their contents has become a problem. So restructure selinux_inode_removexattr, and selinux_inode_setxattr to call both the corresponding cap_inode_ function and dentry_has_perm when the attribute is not a selinux security xattr. This ensures the policies of both commoncap and selinux are enforced. This results in smack and selinux having the same basic structure for setxattr and removexattr. Performing their own special permission checks when it is their modules xattr being written to, and deferring to commoncap when that is not the case. Then finally performing their generic module policy on all xattr writes. This structure is fine when you only consider stacking with the commoncap lsm, but it becomes a problem if two lsms that don't want the commoncap security checks on their own attributes need to be stack. This means there will need to be updates in the future as lsm stacking is improved, but at least now the structure between smack and selinux is common making the code easier to refactor. This change also has the effect that selinux_linux_setotherxattr becomes unnecessary so it is removed. Fixes: 8db6c34f1dbc ("Introduce v3 namespaced file capabilities") Fixes: 7bbf0e052b76 ("[PATCH] selinux merge") Historical Tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git Signed-off-by: "Eric W. Biederman" Reviewed-by: Serge Hallyn Acked-by: Stephen Smalley Signed-off-by: Paul Moore security/selinux/hooks.c | 43 ++++++++++++++++++------------------------- 1 file changed, 18 insertions(+), 25 deletions(-) commit 65921223942435f993ca56cd0a04e686700766bf Author: Chris Wilson Date: Tue Oct 3 13:50:55 2017 +0100 drm/i915: Remove defunct trace points trace_i915_gem_evict_everything and trace_i915_gem_ring_flush stopped being used when their parent functions were removed. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20171003125055.11370-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_trace.h | 72 +++++++++------------------------------ 1 file changed, 17 insertions(+), 55 deletions(-) commit 63c2af90e502fca6cda2855541d43443666e337f Author: Aaron Conole Date: Mon Sep 11 21:52:39 2017 +0200 netfilter: ipset: deduplicate prefixlen maps The prefixlen maps used here are identical, and have been since introduction. It seems to make sense to use a single large map, that the preprocessor will fill appropriately. Signed-off-by: Aaron Conole Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso net/netfilter/ipset/pfxlen.c | 395 +++++++++++++++---------------------------- 1 file changed, 137 insertions(+), 258 deletions(-) commit 8851e799ffde0d85fab6716075975200c9b5094c Author: Jozsef Kadlecsik Date: Mon Sep 11 21:52:38 2017 +0200 netfilter: ipset: Fix sparse warnings Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso net/netfilter/ipset/ip_set_hash_ipportnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 522e89d60b62d16075a7bc96dd5eb2f3eb813635 Author: simran singhal Date: Mon Sep 11 21:52:37 2017 +0200 netfilter: ipset: Compress return logic Simplify function returns by merging assignment and return into one command line. Signed-off-by: simran singhal Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso net/netfilter/ipset/ip_set_list_set.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 6c1fa341d60285cf3f2c7ca99b4abe7a32b53ff5 Author: Chris Wilson Date: Tue Oct 3 13:50:54 2017 +0100 drm/i915: Fix some tracepoints to capture full 64b The tracepoints need some tlc, in particular we've neglected to update them for the 64b era. v2: Prefix hexadecimal output with 0x. Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171003125055.11370-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_trace.h | 44 +++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 03b623fbc5d8d24d45d4e8cd4ba245b0170891f3 Author: Geert Uytterhoeven Date: Wed Oct 4 14:13:07 2017 +0200 ata: sata_rcar: Use of_device_get_match_data() helper Use the of_device_get_match_data() helper instead of open coding. Note that the sata_rcar driver is used with DT only, so there's always a valid match. Signed-off-by: Geert Uytterhoeven Acked-by: Sergei Shtylyov Signed-off-by: Tejun Heo drivers/ata/sata_rcar.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 8d488bbec73fa36907e1b327e919bcd522b4a57f Author: Chris Wilson Date: Wed Oct 4 13:41:53 2017 +0100 drm/i915: Remove WA_(SET|CLR)_BIT These macros are of dubious merit when coupled with the per-context w/a set. Instead of tweaking the value in the context, they tweak the value based on the mmio at the time of recording; they are almost by definition not per-context! Having removed the last users, remove the macros to avoid temptation in the future. v2: Kill WA_WRITE as well (now also unused). Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Oscar Mateo Link: https://patchwork.freedesktop.org/patch/msgid/20171004124153.14142-2-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_engine_cs.c | 5 ----- 1 file changed, 5 deletions(-) commit 53221e11c7a0e85004c1a28f74e4e173f098d262 Author: Chris Wilson Date: Wed Oct 4 13:41:52 2017 +0100 drm/i915: Move MMCD_MISC_CTRL from context w/a to standard Looking at gem_workarounds shows us that MMCD_MISC_CTRL is not restored following a suspend-resume cycle. This implies that MMCD_MISC_CTRL is not stored in the context, but is an ordinary register w/a that we need to restore during init_hw. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Oscar Mateo Link: https://patchwork.freedesktop.org/patch/msgid/20171004124153.14142-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_engine_cs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 32ced39c1b122679f829cfdac5a679b3a5aefeaf Author: Oscar Mateo Date: Thu Sep 28 15:40:39 2017 -0700 drm/i915: Transform whitelisting WAs into a simple reg write RING_FORCE_TO_NONPRIV registers do not live in the logical context. They are simply global privileged MMIO registers that happen to be powercontext saved and restored (meaning only they can survive RC6). Therefore, there is absolutely no need to save them so that they can be restored everytime we create a new logical context. Suggested-by: Chris Wilson Signed-off-by: Oscar Mateo Cc: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/1506638439-6903-1-git-send-email-oscar.mateo@intel.com Acked-by: Michel Thierry Tested-by: Chris Wilson #bxt Reviewed-by: Mika Kuoppala Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47bb129679cc4cf0bdeb145694082fc0b074c947 Author: Takeshi Kihara Date: Wed Oct 4 19:22:39 2017 +0900 pinctrl: sh-pfc: r8a77995: Add PWM pins, groups and functions This patch adds support for PWM on r8a77995. Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Shimoda Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 152 ++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) commit 438a50618095061920d3a30d4c5ca1ef2e0ff860 Author: Nicolas Pitre Date: Tue Oct 3 18:29:49 2017 -0400 percpu: don't forget to free the temporary struct pcpu_alloc_info Unlike the SMP case, the !SMP case does not free the memory for struct pcpu_alloc_info allocated in setup_per_cpu_areas(). And to give it a chance of being reused by the page allocator later, align it to a page boundary just like its size. Signed-off-by: Nicolas Pitre Acked-by: Dennis Zhou Signed-off-by: Tejun Heo mm/percpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8279aaf59006fb19ca8caa3f0f0b8bfc33a0dd1a Author: Maarten Lankhorst Date: Wed Oct 4 11:44:16 2017 +0200 drm/i915: Remove use_mmio_flip modparm, v2. This has been unused since commit afa8ce5b3080 ("drm/i915: Nuke legacy flip queueing code"). Changes since v1: - Rebase on top of all the changes to modparams. Cc: Chris Wilson Signed-off-by: Maarten Lankhorst Reviewed-by: Chris Wilson \o/-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20171004094416.31306-1-maarten.lankhorst@linux.intel.com drivers/gpu/drm/i915/i915_params.c | 3 --- drivers/gpu/drm/i915/i915_params.h | 1 - drivers/gpu/drm/i915/intel_lrc.c | 3 +-- 3 files changed, 1 insertion(+), 6 deletions(-) commit 0526234d6786c749ca6014edc6dd1242dfe1ddac Author: Kuninori Morimoto Date: Tue Oct 3 02:23:11 2017 +0000 pinctrl: sh-pfc: r8a7795: Add Audio SSI pin support Signed-off-by: Kuninori Morimoto Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 231 +++++++++++++++++++++++++++++++++++ 1 file changed, 231 insertions(+) commit 55bfea9fdc05e3559164f3d58777d9a28ec42bc5 Author: Kuninori Morimoto Date: Tue Oct 3 02:22:51 2017 +0000 pinctrl: sh-pfc: r8a7795: Add Audio clock pin support Signed-off-by: Kuninori Morimoto Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 159 +++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) commit 359be67862c5e013fcf7c04e352d8824105a76ed Author: Matthieu CASTET Date: Mon Oct 2 15:01:55 2017 +0200 dma mapping : export caller to vmallocinfo For example on arm64 board, this add info to "user" entries in vmallocinfo Before : [...] 0xffffff8008997000 0xffffff80089d8000 266240 user [...] Afer : [...] 0xffffff8008997000 0xffffff80089d8000 266240 atomic_pool_init+0x0/0x1d8 user [...] This help to debug mapping issues, and is consistent with others entries (ioremap, vmalloc, ...) that already provide caller. Acked-by: Catalin Marinas Signed-off-by: Matthieu CASTET Signed-off-by: Will Deacon arch/arm64/mm/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 396a5d4a5c32598aea5bff5cb2a995026a6f05dc Author: Stephen Boyd Date: Wed Sep 27 08:51:30 2017 -0700 arm64: Unconditionally support {ARCH_}HAVE_NMI{_SAFE_CMPXCHG} From what I can see there isn't anything about ACPI_APEI_SEA that means the arm64 architecture can or cannot support NMI safe cmpxchg or NMIs, so the 'if' condition here is not important. Let's remove it. Doing that allows us to support ftrace histograms via CONFIG_HIST_TRIGGERS that depends on the arch having the ARCH_HAVE_NMI_SAFE_CMPXCHG config selected. Cc: Tyler Baicar Cc: Jonathan (Zhixiong) Zhang Cc: Dongjiu Geng Acked-by: James Morse Signed-off-by: Stephen Boyd Signed-off-by: Will Deacon arch/arm64/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d1809d0e64325def212825852b02c2c63b40f5cd Author: Shaokun Zhang Date: Wed Sep 27 14:30:24 2017 +0800 drivers/perf: arm_pmu_acpi: drop redundant acpi_disabled check acpi_disabled has been checked in armv8_pmu_driver_init and it shall be ZERO in arm_pmu_acpi_probe, clean up this unnecessary check. Signed-off-by: Shaokun Zhang Signed-off-by: Will Deacon drivers/perf/arm_pmu_acpi.c | 3 --- 1 file changed, 3 deletions(-) commit ccaac16287f9b46c58777f5538c4ba3a9d4c3aeb Author: Mark Rutland Date: Wed Sep 27 14:50:38 2017 +0100 arm64: consistently log boot/secondary CPU IDs Currently we inconsistently log identifying information for the boot CPU and secondary CPUs. For the boot CPU, we log the MIDR and MPIDR across separate messages, whereas for the secondary CPUs we only log the MIDR. In some cases, it would be useful to know the MPIDR of secondary CPUs, and it would be nice for these messages to be consistent. This patch ensures that in the primary and secondary boot paths, we log both the MPIDR and MIDR in a single message, with a consistent format. the MPIDR is consistently padded to 10 hex characters to cover Aff3 in bits 39:32, so that IDs can be compared easily. The newly redundant message in setup_arch() is removed. Signed-off-by: Mark Rutland Cc: Al Stone Cc: Catalin Marinas Cc: Will Deacon [will: added '0x' prefixes consistently] Signed-off-by: Will Deacon arch/arm64/kernel/setup.c | 5 ++--- arch/arm64/kernel/smp.c | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-) commit c179ea270100488c416890beef6424ce390ceb38 Author: Naveen N. Rao Date: Fri Sep 22 14:40:46 2017 +0530 powerpc/kprobes: Fix warnings from __this_cpu_read() on preempt kernels Kamalesh pointed out that we are getting the below call traces with livepatched functions when we enable CONFIG_PREEMPT: [ 495.470721] BUG: using __this_cpu_read() in preemptible [00000000] code: cat/8394 [ 495.471167] caller is is_current_kprobe_addr+0x30/0x90 [ 495.471171] CPU: 4 PID: 8394 Comm: cat Tainted: G K 4.13.0-rc7-nnr+ #95 [ 495.471173] Call Trace: [ 495.471178] [c00000008fd9b960] [c0000000009f039c] dump_stack+0xec/0x160 (unreliable) [ 495.471184] [c00000008fd9b9a0] [c00000000059169c] check_preemption_disabled+0x15c/0x170 [ 495.471187] [c00000008fd9ba30] [c000000000046460] is_current_kprobe_addr+0x30/0x90 [ 495.471191] [c00000008fd9ba60] [c00000000004e9a0] ftrace_call+0x1c/0xb8 [ 495.471195] [c00000008fd9bc30] [c000000000376fd8] seq_read+0x238/0x5c0 [ 495.471199] [c00000008fd9bcd0] [c0000000003cfd78] proc_reg_read+0x88/0xd0 [ 495.471203] [c00000008fd9bd00] [c00000000033e5d4] __vfs_read+0x44/0x1b0 [ 495.471206] [c00000008fd9bd90] [c0000000003402ec] vfs_read+0xbc/0x1b0 [ 495.471210] [c00000008fd9bde0] [c000000000342138] SyS_read+0x68/0x110 [ 495.471214] [c00000008fd9be30] [c00000000000bc6c] system_call+0x58/0x6c Commit c05b8c4474c030 ("powerpc/kprobes: Skip livepatch_handler() for jprobes") introduced a helper is_current_kprobe_addr() to help determine if the current function has been livepatched or if it has a jprobe installed, both of which modify the NIP. This was subsequently renamed to __is_active_jprobe(). In the case of a jprobe, kprobe_ftrace_handler() disables pre-emption before calling into setjmp_pre_handler() which returns without disabling pre-emption. This is done to ensure that the jprobe handler won't disappear beneath us if the jprobe is unregistered between the setjmp_pre_handler() and the subsequent longjmp_break_handler() called from the jprobe handler. Due to this, we can use __this_cpu_read() in __is_active_jprobe() with the pre-emption check as we know that pre-emption will be disabled. However, if this function has been livepatched, we are still doing this check and when we do so, pre-emption won't necessarily be disabled. This results in the call trace shown above. Fix this by only invoking __is_active_jprobe() when pre-emption is disabled. And since we now guard this within a pre-emption check, we can instead use raw_cpu_read() to get the current_kprobe value skipping the check done by __this_cpu_read(). Fixes: c05b8c4474c030 ("powerpc/kprobes: Skip livepatch_handler() for jprobes") Reported-by: Kamalesh Babulal Tested-by: Kamalesh Babulal Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes-ftrace.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit bf3a91251735863fcb230c96e984ebcacee820d9 Author: Naveen N. Rao Date: Fri Sep 22 14:40:45 2017 +0530 powerpc/kprobes: Clean up jprobe detection in livepatch handler In commit c05b8c4474c03 ("powerpc/kprobes: Skip livepatch_handler() for jprobes"), we added a helper is_current_kprobe_addr() to help detect if the modified regs->nip was due to a jprobe or livepatch. Masami felt that the function name was not quite clear. To that end, this patch renames is_current_kprobe_addr() to __is_active_jprobe() and adds a comment to (hopefully) better clarify the purpose of this helper. The helper has also now been moved to kprobes-ftrace.c so that it is only available for KPROBES_ON_FTRACE. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/include/asm/kprobes.h | 2 +- arch/powerpc/kernel/kprobes-ftrace.c | 11 +++++++++++ arch/powerpc/kernel/kprobes.c | 6 ------ arch/powerpc/kernel/trace/ftrace_64_mprofile.S | 4 ++-- 4 files changed, 14 insertions(+), 9 deletions(-) commit a7b440383f9b078254d38ab6a3672810f1eca74f Author: Naveen N. Rao Date: Fri Sep 22 14:40:44 2017 +0530 powerpc/kprobes: Do not suppress instruction emulation if a single run failed Currently, we disable instruction emulation if emulate_step() fails for any reason. However, such failures could be transient and specific to a particular run. Instead, only disable instruction emulation if we have never been able to emulate this. If we had emulated this instruction successfully at least once, then we single step only this probe hit and continue to try emulating the instruction in subsequent probe hits. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 22085337f5b9d7a7adf5c6cc4e007c28e5216a7f Author: Naveen N. Rao Date: Fri Sep 22 14:40:43 2017 +0530 powerpc/kprobes: Some cosmetic updates to try_to_emulate() 1. This is only used in kprobes.c, so make it static. 2. Remove the un-necessary (ret == 0) comparison in the else clause. Reviewed-by: Masami Hiramatsu Reviewed-by: Kamalesh Babulal Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/kernel/kprobes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ff74972e966bfc586cea116f976866858d1b0fec Author: Kai Heng Feng Date: Mon Oct 2 11:56:00 2017 +0800 platform/x86: peaq-wmi: Blacklist Lenovo ideapad 700-15ISK peaq-wmi on Lenovo ideapad 700-15ISK keeps sending KEY_SOUND, which makes user's repeated keys gets interrupted. The system does not have Dolby button, let's blacklist it. BugLink: https://bugs.launchpad.net/bugs/1720219 Signed-off-by: Kai-Heng Feng Signed-off-by: Andy Shevchenko drivers/platform/x86/peaq-wmi.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 7dd5d0d954611c05a38bdf843054c639f45ce08b Author: Kuninori Morimoto Date: Mon Oct 2 05:09:52 2017 +0000 ASoC: soc-core: add component lookup functions ALSA SoC platform/codec will be replaced to component soon. This means 1 device might have multiple components. But current unregister component function only checks "dev" to find it. This means, unexpected component might be unregistered by current function. But, it is no problem if driver registered only 1 component. To prepare avoid this issue, this patch adds new component lookup function. it finds component by "dev" and "driver name". Here, the reason why it uses "driver name" is that "component name" was created by fmt_single_name() and difficult to use it from driver. Driver of course knows its "driver name", thus, using it is more easy. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 2 ++ sound/soc/soc-core.c | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit c3dda4b0db9cf5044010e4de88e5e5b94edf916c Author: Joel Stanley Date: Wed Oct 4 14:53:24 2017 +1030 powerpc/configs: Add Skiroot defconfig This configuration is used by the OpenPower firmware for it's Linux-as-bootloader implementation. Also known as the Petitboot kernel, this configuration broke in 4.12 (CPU_HOTPLUG=n), so add it to the upstream tree in order to get better coverage. Signed-off-by: Joel Stanley Signed-off-by: Michael Ellerman arch/powerpc/configs/skiroot_defconfig | 232 +++++++++++++++++++++++++++++++++ 1 file changed, 232 insertions(+) commit 934e4885cb958566a34124e5a1dad2f9212a8ec6 Author: Lori Hikichi Date: Thu Sep 28 15:29:35 2017 -0700 ASoC: cygnus: Remove support for 8 bit audio and for mono These modes of operation were not working properly and it is unclear if the hardware could fully support these modes properly. There is little to be gained by enabling these modes, therefore, we will just remove support. Signed-off-by: Lori Hikichi Signed-off-by: Mark Brown sound/soc/bcm/cygnus-ssp.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) commit fcf30f3b4377d2475aa709ce28964461990c3caa Author: Lori Hikichi Date: Thu Sep 28 15:29:34 2017 -0700 ASoC: cygnus: Remove set_fmt from SPDIF dai ops The SPDIF port cannot modify its format so a set_fmt function is not needed. Previously, we used a generic set_fmt for all ports and returned an error code for the SPDIF port. It is cleaner to not populate the set_fmt field. Signed-off-by: Lori Hikichi Signed-off-by: Mark Brown sound/soc/bcm/cygnus-ssp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit d8302aa6b53acbe421fe615b9d704fd813623e96 Author: Lori Hikichi Date: Thu Sep 28 15:29:32 2017 -0700 ASoC: cygnus: Add EXPORT_SYMBOL for helper function The helper function cygnus_ssp_set_custom_fsync_width() is intended to be called from an ASoC machine driver, need to export symbol if using modules. Signed-off-by: Lori Hikichi Signed-off-by: Mark Brown sound/soc/bcm/cygnus-ssp.c | 1 + 1 file changed, 1 insertion(+) commit 3e3c9ee1e4b3d0ef1f68f2037752196e7260bad9 Author: Kuninori Morimoto Date: Sun Oct 1 23:49:18 2017 +0000 ASoC: rsnd: add MIX Volume Ramp support Both DVC/MIX have Volume Ramp Control. This patch supprts MIX Volume Ramp. One note is that main purpose of MIX Volume Ramp is to reduce noise, thus, MIX Ramp range is very few if you compare to DVC Volume Ramp (DVC = 5bit, MIX = 4bit). You can use MIX Volume Ranp like below amixer set "MIX Ramp Up Rate" "0.125 dB/1 step" amixer set "MIX Ramp Down Rate" "0.125 dB/1 step" amixer set "MIX Ramp" on aplay xxx.wav & amixer set "MIX",0 80% // DAI0 Volume Down amixer set "MIX",1 100% // DAI1 Volume Up Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 2 +- sound/soc/sh/rcar/mix.c | 158 +++++++++++++++++++++++++++++++++++++++++++++-- sound/soc/sh/rcar/rsnd.h | 1 + 3 files changed, 154 insertions(+), 7 deletions(-) commit f3c26ac61c09862f0037fe484a98da0364f02ec3 Author: Kuninori Morimoto Date: Sun Oct 1 23:49:03 2017 +0000 ASoC: rsnd: makes volume ramp rate list generic DVC is supporting Volume Ramp Rate, and MIX has Volume Ramp but not yet supported. To support MIX Volume Ramp, we want to share Rate List since DVC/MIX are using almost same list. This patch move DVC specific Volume Ramp Rate List to core.c. Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/core.c | 27 +++++++++++++++++++++++++++ sound/soc/sh/rcar/dvc.c | 33 ++++----------------------------- sound/soc/sh/rcar/rsnd.h | 7 +++++-- 3 files changed, 36 insertions(+), 31 deletions(-) commit 99dc79d0600849ff878a38d9884e76f5bebd3228 Author: Kuninori Morimoto Date: Sun Oct 1 23:48:46 2017 +0000 ASoC: rsnd: CTU kctrl sets once Same CTU might be used few times if system/platform is using MIX. For example below case. DAI0 playback = <&src0 &ctu02 &mix0 &dvc0 &ssi0>; DAI1 playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>; This case, ALSA will have CTU,0 and CTU,1 kcontrol interfaces, but these are same CTU. This is confusing. This patch adds new flags and avoid such case. Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/ctu.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit b918f1bc7f1ce463d6fbb6ebf3db36bd302bded8 Author: Kuninori Morimoto Date: Sun Oct 1 23:48:29 2017 +0000 ASoC: rsnd: DVC kctrl sets once Same DVC might be used few times if system/platform is using MIX. For example below case. DAI0 playback = <&src0 &ctu02 &mix0 &dvc0 &ssi0>; DAI1 playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>; This case, ALSA will have DVC,0 and DVC,1 kcontrol interfaces, but these are same DVC. This is confusing. This patch adds new flags and avoid such case. Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/dvc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit d0cf7fc948159a3eab9ad2e959cce7f06f2333df Author: Kuninori Morimoto Date: Sun Oct 1 23:48:12 2017 +0000 ASoC: rsnd: use generic rsnd_flags_xxx() macro on ADG Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/adg.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 429919890e22431bc350ecf47b31866bb27631b2 Author: Kuninori Morimoto Date: Sun Oct 1 23:47:50 2017 +0000 ASoC: rsnd: add generic rsnd_flags_xxx() macro SSI is using rsnd_ssi_flags_xxx() macro to control flags. But it is useful macro not only for SSI. This patch replace it to more generic rsnd_flags_xxx(). Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/rsnd.h | 4 ++++ sound/soc/sh/rcar/ssi.c | 27 ++++++++++++--------------- 2 files changed, 16 insertions(+), 15 deletions(-) commit d81851c1764b26b46670c0b3bd6701308ddaab98 Author: Chen-Yu Tsai Date: Fri Sep 29 11:25:09 2017 +0800 regulator: axp20x: Add support for AXP813 regulators The AXP813 PMIC has 7 DC-DC buck regulators, 16 LDOs (including the fixed RTC LDO and 2 GPIO LDOs), and 1 switchable. The drive-vbus feature is also supported. All the hardware details are very similar to the AXP803, with the following exceptions: - Extra DCDC7 buck regulator, with the same range as DCDC6 - SWitch now has a separate supply pin, instead of being chained internaly from DCDC1 - RTC LDO output voltage is now 1.8V - FLDO3 is an LDO with switchable supplies, but unconfigurable output voltage. The voltage is always half that of its supply. Support for FLDO3 is currently unimplemented, as it requires runtime switching of its supplies, something the regulator subsystem does not support. It is not used in either the reference designs nor actually produced boards available. Signed-off-by: Chen-Yu Tsai Tested-by: Maxime Ripard Acked-by: Maxime Ripard Signed-off-by: Mark Brown drivers/regulator/axp20x-regulator.c | 102 +++++++++++++++++++++++++++++++++-- include/linux/mfd/axp20x.h | 3 ++ 2 files changed, 101 insertions(+), 4 deletions(-) commit 667063acb81931e2f8fd0cb91df9fcccad131d9a Author: Chen-Yu Tsai Date: Fri Sep 29 16:23:01 2017 +0800 regmap: add iopoll-like polling macro for regmap_field This patch adds a macro regmap_field_read_poll_timeout that works similar to the readx_poll_timeout defined in linux/iopoll.h, except that this can also return the error value returned by a failed regmap_field_read. Signed-off-by: Chen-Yu Tsai Signed-off-by: Mark Brown include/linux/regmap.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 664611e7e02f76fbc5470ef545b2657ed25c292b Author: Jean-François Têtu Date: Fri Sep 29 16:19:44 2017 -0400 ASoC: codecs: msm8916-wcd-analog: fix micbias level The macro used to set the microphone bias level causes the snd_soc_write() call to overwrite other fields in the CDC_A_MICB_1_VAL register. The macro also does not return the proper level value to use. This fixes this by preserving all bits from the register that are not the level while setting the level. Signed-off-by: Jean-François Têtu Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown sound/soc/codecs/msm8916-wcd-analog.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2ab18dfe87596e207f17ff0567660cd7356c715a Author: Ed Blake Date: Mon Oct 2 11:01:55 2017 +0100 ASoC: img-spdif-out: Rename suspend / resume funcs Rename suspend and resume functions to runtime_suspend and runtime_resume, which is what they actually are. This will avoid confusion when adding suspend and resume functions in a subsequent patch. Signed-off-by: Ed Blake Signed-off-by: Mark Brown sound/soc/img/img-spdif-out.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit c70458890ff15d858bd347fa9f563818bcd6e457 Author: Ed Blake Date: Mon Oct 2 11:00:33 2017 +0100 ASoC: img-parallel-out: Add pm_runtime_get/put to set_fmt callback Add pm_runtime_get_sync and pm_runtime_put calls to set_fmt callback function. This fixes a bus error during boot when CONFIG_SUSPEND is defined when this function gets called while the device is runtime disabled and device registers are accessed while the clock is disabled. Signed-off-by: Ed Blake Signed-off-by: Mark Brown sound/soc/img/img-parallel-out.c | 2 ++ 1 file changed, 2 insertions(+) commit 6f9dfab7fc5fdd51ed67da370fc83f3b7dbf08da Author: Ed Blake Date: Mon Oct 2 10:59:45 2017 +0100 ASoC: img-i2s-out: Rename suspend / resume funcs Rename suspend and resume functions to runtime_suspend and runtime_resume, which is what they actually are. This will avoid confusion when adding suspend and resume functions in a subsequent patch. Signed-off-by: Ed Blake Signed-off-by: Mark Brown sound/soc/img/img-i2s-out.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 8eae6c2585b0455f0e7200495d5e513020ca2fa2 Author: Douglas Anderson Date: Fri Sep 29 15:03:24 2017 -0700 ASoC: rockchip: Allocate enough memory so we don't overflow routes In the recent commit d9f9c167edae ("ASoC: rockchip: Init dapm routes dynamically") we improperly allocated memory for the card->dapm_routes causing us to overflow the allocation on every boot. Oops. Let's allocate the correct amount of memory. We'll also add a check to make sure that we don't overrun memory even if we encounter some sort of weird device tree. Fixes: d9f9c167edae ("ASoC: rockchip: Init dapm routes dynamically") Signed-off-by: Douglas Anderson Signed-off-by: Mark Brown sound/soc/rockchip/rk3399_gru_sound.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 79f01fe6262b0fbba4c558dfe3dd61b3c511a61a Author: Damien Riegel Date: Tue Oct 3 09:27:35 2017 -0400 ASoC: codecs: msm8916-wcd-analog: configure micbias in mbhc setup The very first time a headset is plugged in, detection is unreliable because bias hasn't been configured yet, it's done once a mechanical insertion interrupt has been triggered, so following insertions (and thus detections) are not affected. To fix the very first detection, the bias must also be configured in the function that setup the MBHC. Move pm8916_wcd_setup_mbhc after pm8916_mbhc_configure_bias to avoid a forward declaration. Signed-off-by: Damien Riegel Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown sound/soc/codecs/msm8916-wcd-analog.c | 94 +++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 44 deletions(-) commit e64b9189bfd58e215ee44159767b39b8cf6fa302 Author: Fabio Estevam Date: Sat Sep 16 22:03:22 2017 -0300 gpu: ipu-v3: ipu-dc: Remove unused 'di' variable The 'di' variable is never used inside ipu_dc_enable_channel(), so just remove it. This fixes the following build warning with W=1: drivers/gpu/ipu-v3/ipu-dc.c: In function 'ipu_dc_enable_channel': drivers/gpu/ipu-v3/ipu-dc.c:252:6: warning: variable 'di' set but not used [-Wunused-but-set-variable] Signed-off-by: Fabio Estevam Signed-off-by: Philipp Zabel drivers/gpu/ipu-v3/ipu-dc.c | 3 --- 1 file changed, 3 deletions(-) commit 7f4fbf79f4d4c00466e1b4158b17c5a095c83f2c Author: Sean Wang Date: Wed Sep 20 17:40:16 2017 +0800 reset: mediatek: add reset controller dt-bindings required header for MT7622 SoC Add the reset controller dt-bindings exported from infracfg, pericfg, hifsys and ethsys which could be found on MT7622 SoC. So that we can reference them from within a device-tree file. Signed-off-by: Sean Wang Signed-off-by: Philipp Zabel include/dt-bindings/reset/mt7622-reset.h | 94 ++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) commit 95998c7a6cf76a24a553bec7f6fafdef6b4d3374 Author: Heiner Kallweit Date: Fri Sep 29 23:44:15 2017 +0200 firmware: arm_scpi: remove scpi_remove sysfs_create_groups and of_platform_populate can be replaced with the device-managed versions what allows us to remove scpi_remove. Signed-off-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit 27c54cd3142184b7798e082d06c17135cafb3f60 Author: Heiner Kallweit Date: Fri Sep 29 23:44:09 2017 +0200 firmware: arm_scpi: make freeing mbox channels device-managed Make freeing the mbox channels device-managed, thus further simplifying scpi_remove and and one further step to get rid of scpi_remove. Signed-off-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) commit 931cf0c53e6999375eac65f3650a656b88634b9d Author: Heiner Kallweit Date: Fri Sep 29 23:44:05 2017 +0200 firmware: arm_scpi: pre-populate dvfs info in scpi_probe Pre-populating the dvfs info data in scpi_probe allows to make all memory allocations device-managed. This helps to simplify scpi_remove and eventually to get rid of scpi_remove completely. Signed-off-by: Heiner Kallweit [sudeep.holla: changed to continue probe even if scpi_dvfs_populate_info fails] Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 48 ++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 22 deletions(-) commit cfe8a9c9aaf47af3d9e6fe4c4b03f4a88844746d Author: Heiner Kallweit Date: Fri Sep 29 23:44:01 2017 +0200 firmware: arm_scpi: remove two unneeded devm_kfree's in scpi_remove Both memory areas are free'd anyway when the device is destroyed, so we don't have to do it manually. Signed-off-by: Heiner Kallweit Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 2 -- 1 file changed, 2 deletions(-) commit 00126945902d2335c3b1f1c12db4ae2afeb4da0f Author: Heiner Kallweit Date: Fri Sep 29 23:43:54 2017 +0200 firmware: arm_scpi: remove usage of drvdata and don't reset scpi_info to null There's no benefit using drvdata as variable scpi_info is global. Setting scpi_info to NULL in scpi_remove isn't needed too. If arm_scpi is built-in, then this code is never used. And if arm_scpi is built as a module and some other module calls get_scpi_ops() then due to this dependency scpi_remove is called only after the other module has been removed. Last but not least, users usually store the result of get_scpi_ops(), therefore setting scpi_info to NULL wouldn't really help. Signed-off-by: Heiner Kallweit [sudeep.holla: reworded the commit log a bit] Signed-off-by: Sudeep Holla drivers/firmware/arm_scpi.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit eba0f28473b2c20d4212ff19c118723a5a547e20 Author: Colin Ian King Date: Tue Sep 19 21:40:19 2017 +0100 ath9k: make const array reg_hole_list static, reduces object code size Don't populate the read-only array reg_hole_list on the stack, instead make it static. Makes the object code smaller by over 200 bytes: Before: text data bss dec hex filename 57518 15248 0 72766 11c3e debug.o After: text data bss dec hex filename 57218 15344 0 72562 11b72 debug.o Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 750b1a6894ecc9b178c6e3d0a1170122971b2036 Author: Yurii Pavlenko Date: Sat Sep 23 22:13:37 2017 +0200 staging: irda: au1k_ir.c fix warning: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... This patch fixes the following checkpatch.pl warning: fix Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... Signed-off-by: Yurii Pavlenko Signed-off-by: Greg Kroah-Hartman drivers/staging/irda/drivers/au1k_ir.c | 40 +++++++++++++++------------------- 1 file changed, 18 insertions(+), 22 deletions(-) commit bccf1da3546cc7aeefadc63cd4356ab8dc04c1e3 Author: Joe Perches Date: Mon Oct 2 08:48:55 2017 -0700 vt: Use consistent logging style vt has a mixture of pr_ and printk. Convert to using only pr_. Miscellanea: o Coalesce formats o Realign arguments o Add missing braces around an if/else with the printk conversion Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit b00bebbc301c8e1f74f230dc82282e56b7e7a6db Author: Jibin Xu Date: Sun Sep 10 20:11:42 2017 -0700 sysrq : fix Show Regs call trace on ARM When kernel configuration SMP,PREEMPT and DEBUG_PREEMPT are enabled, echo 1 >/proc/sys/kernel/sysrq echo p >/proc/sysrq-trigger kernel will print call trace as below: sysrq: SysRq : Show Regs BUG: using __this_cpu_read() in preemptible [00000000] code: sh/435 caller is __this_cpu_preempt_check+0x18/0x20 Call trace: [] dump_backtrace+0x0/0x1d0 [] show_stack+0x24/0x30 [] dump_stack+0x90/0xb0 [] check_preemption_disabled+0x100/0x108 [] __this_cpu_preempt_check+0x18/0x20 [] sysrq_handle_showregs+0x1c/0x40 [] __handle_sysrq+0x12c/0x1a0 [] write_sysrq_trigger+0x60/0x70 [] proc_reg_write+0x90/0xd0 [] __vfs_write+0x48/0x90 [] vfs_write+0xa4/0x190 [] SyS_write+0x54/0xb0 [] el0_svc_naked+0x24/0x28 This can be seen on a common board like an r-pi3. This happens because when echo p >/proc/sysrq-trigger, get_irq_regs() is called outside of IRQ context, if preemption is enabled in this situation,kernel will print the call trace. Since many prior discussions on the mailing lists have made it clear that get_irq_regs either just returns NULL or stale data when used outside of IRQ context,we simply avoid calling it outside of IRQ context. Signed-off-by: Jibin Xu Signed-off-by: Greg Kroah-Hartman drivers/tty/sysrq.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit c2e5df616e1ae6c2a074cb241ebb65a318ebaf7c Author: Stephen Hemminger Date: Thu Sep 21 20:58:49 2017 -0700 vmbus: add per-channel sysfs info This extends existing vmbus related sysfs structure to provide per-channel state information. This is useful when diagnosing issues with multiple queues in networking and storage. The existing sysfs only displayed information about the primary channel. The one place it reported multiple channels was the channel_vp_mapping file which violated the sysfs convention of one value per file. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman Documentation/ABI/stable/sysfs-bus-vmbus | 56 ++++++++++ drivers/hv/channel_mgmt.c | 10 +- drivers/hv/hyperv_vmbus.h | 2 + drivers/hv/vmbus_drv.c | 185 +++++++++++++++++++++++++++++-- include/linux/hyperv.h | 6 + 5 files changed, 246 insertions(+), 13 deletions(-) commit 876a1b08d0f9d7df406f702a9aba0e058500efac Author: Randy Dunlap Date: Sun Sep 24 11:16:18 2017 -0700 misc: mic: move to its own menu in Misc devices Move the Intel MIC drivers into their own menu. This is due to the number of drivers (Kconfig entries) here and it simplifies (cleans up) the "Misc devices" menu. Signed-off-by: Randy Dunlap Cc: Sudeep Dutt Cc: Ashutosh Dixit Signed-off-by: Greg Kroah-Hartman drivers/misc/mic/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 06b6f1c623122bcf28f5a75b89862a68b9c884eb Author: Randy Dunlap Date: Thu Sep 21 16:26:29 2017 -0700 misc: altera-stapl: drop Kconfig comment When I2C is enabled, the comment string for "Altera FPGA firmware download module" adds no new information or value. It is only useful and interesting when I2C is not enabled. In that case, have it show that I2C is needed for that module. Signed-off-by: Randy Dunlap Cc: Igor M. Liplianin Signed-off-by: Greg Kroah-Hartman drivers/misc/altera-stapl/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c151206b30466a787fa85564eec43b5b7a4f9175 Author: Bhumika Goyal Date: Sat Sep 30 22:29:54 2017 +0530 pcmcia: make pccard_cis_attr const Make this const as it is only passed to the const arguments of the functions sysfs_remove_bin_file and sysfs_create_bin_file. Make the declaration const too. Structure found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/pcmcia/cistpl.c | 2 +- drivers/pcmcia/cs_internal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 846df244ebefbc9f7b91e9ae7a5e5a2e69fb4772 Author: Dan Carpenter Date: Sat Sep 30 11:16:51 2017 +0300 misc: pci_endpoint_test: Avoid triggering a BUG() If you call ida_simple_remove(&pci_endpoint_test_ida, id) with a negative "id" then it triggers an immediate BUG_ON(). Let's not allow that. Fixes: 2c156ac71c6b ("misc: Add host side PCI driver for PCI test function device") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/misc/pci_endpoint_test.c | 2 ++ 1 file changed, 2 insertions(+) commit 378f79cab12b669928f3a4037f023837ead2ce0c Author: Dan Carpenter Date: Sat Sep 30 11:15:52 2017 +0300 misc: pci_endpoint_test: Prevent some integer overflows "size + max" can have an arithmetic overflow when we're allocating: orig_src_addr = dma_alloc_coherent(dev, size + alignment, ... I've added a few checks to prevent that. Fixes: 13107c60681f ("misc: pci_endpoint_test: Add support to provide aligned buffer addresses") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/misc/pci_endpoint_test.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit b7208a3f3e52791571df064fb96025ad48edd1bf Author: Imre Deak Date: Tue Oct 3 12:51:59 2017 +0300 drm/i915/glk: Fix DMC/DC state idleness calculation According to BSpec GLK like BXT needs to ignore the idle state of cores before starting the DMC firmware's DC state handler. Fixes: dbb28b5c3d3c ("drm/i915/DMC/GLK: Load DMC on GLK") Cc: Anusha Srivatsa Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20171003095159.711-2-imre.deak@intel.com drivers/gpu/drm/i915/intel_csr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57522c4c87de20d8f7ad4e142a3a4334066d55ff Author: Imre Deak Date: Tue Oct 3 12:51:58 2017 +0300 drm/i915/cnl: Reprogram DMC firmware after S3/S4 resume The DMC firmware program memory is lost after S3/S4 system suspend, so we need to reprogram it during resume. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103070 Fixes: cebfcead63de ("drm/i915/DMC/CNL: Load DMC on CNL") Cc: Anusha Srivatsa Cc: Animesh Manna Cc: Rodrigo Vivi Signed-off-by: Imre Deak Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20171003095159.711-1-imre.deak@intel.com drivers/gpu/drm/i915/intel_runtime_pm.c | 3 +++ 1 file changed, 3 insertions(+) commit a120fbddd59a3d04a63800824ea032dbf1c21b83 Author: Alan Tull Date: Tue Sep 19 18:25:06 2017 -0500 MAINTAINERS: add backup FPGA maintainer Add Moritz as a maintainer of the kernel FPGA framework. Signed-off-by: Alan Tull Acked-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d8d9d936464a9b61c0e6cb1ff7c831a9cbd2f228 Author: Bhumika Goyal Date: Thu Sep 21 09:52:41 2017 -0500 fpga: make xlnx_pr_decoupler_br_ops const Make this const as it is only passed to a const argument of the function fpga_bridge_register. Signed-off-by: Bhumika Goyal Acked-by: Michal Simek Acked-by: Moritz Fischer Signed-off-by: Alan Tull Signed-off-by: Greg Kroah-Hartman drivers/fpga/xilinx-pr-decoupler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db21f9cfd5adf7544f64573c1ea4c4f3876d898e Author: Dinh Nguyen Date: Wed Sep 20 10:25:41 2017 -0500 reset: socfpga: build the reset-socfpga for Stratix10 SOC Enable the reset driver to get built for the Stratix10 platform. Signed-off-by: Dinh Nguyen Signed-off-by: Philipp Zabel drivers/reset/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c05c4a5ee64616583f836938ccf48dc01dd52cf Author: Kunihiko Hayashi Date: Mon Aug 28 18:59:38 2017 +0900 reset: uniphier: add ethernet reset control support Add reset lines for ethernet controller on Pro4, PXs2, LD11 and LD20 SoCs. Signed-off-by: Kunihiko Hayashi Acked-by: Masahiro Yamada Signed-off-by: Philipp Zabel drivers/reset/reset-uniphier.c | 4 ++++ 1 file changed, 4 insertions(+) commit ed50a0890eaa8b4468097644b11a61a5f313860c Author: Colin Ian King Date: Tue Oct 3 09:31:45 2017 +0100 drivers/fsi: make a couple of functions static The functions fsi_slave_report_and_clear_errors and fsi_slave_handle_error are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'fsi_slave_report_and_clear_errors' was not declared. Should it be static? symbol 'fsi_slave_handle_error' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/fsi/fsi-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 988437aec0e517f683b2491d43aa1cb4b231f8b8 Author: Oleksij Rempel Date: Sun Sep 17 12:33:43 2017 +0200 nvmem: add snvs_lpgpr driver This is a driver for Low Power General Purpose Register (LPGPR) available on i.MX6 SoCs in Secure Non-Volatile Storage (SNVS) of this chip. It is a 32-bit read/write register located in the low power domain. Since LPGPR is located in the battery-backed power domain, LPGPR can be used by any application for retaining data during an SoC power-down mode. Signed-off-by: Oleksij Rempel Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/Kconfig | 10 +++ drivers/nvmem/Makefile | 2 + drivers/nvmem/snvs_lpgpr.c | 156 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 168 insertions(+) commit eeb8b4934f2e9dce2e2c9adc28ce8571e53b8aec Author: Oleksij Rempel Date: Sun Sep 17 12:33:42 2017 +0200 nvmem: dt: document SNVS LPGPR binding Documentation bindings for the Low Power General Purpose Register available on i.MX6 SoCs in the Secure Non-Volatile Storage. Signed-off-by: Oleksij Rempel Acked-by: Rob Herring Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/nvmem/snvs-lpgpr.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit bd14798650cd2a2befd7d96bbc466c2317a582db Author: Dan Carpenter Date: Sat Sep 30 14:27:41 2017 +0300 vme: Fix integer overflow checking in vme_check_window() The controversial part of this patch is that I've changed it so we now prevent integer overflows for VME_USER types and before we didn't. I view it as kernel-hardening. I looked at a couple places that used VME_USER types and they seemed pretty suspicious so I'm pretty sure preventing overflows here is a good idea. The most common problem which this function is for cases like VME_A16 where we don't put an upper bound on "size" so you could have "size" set to U64_MAX and a valid vme_base would overflow the "vme_base + size" into the valid range as well. In the VME_A64 case, the integer overflow checking doesn't work because "U64_MAX + 1" has an integer overflow and it's just a complicated way of saying zero. That VME_A64 case is sort of interesting as well because there is a VME_A64_MAX define which is set to "U64_MAX + 1". The compiler will never let anyone use it since it can't be stored in a u64 variable... With my patch it's now limited to just U64_MAX. Anyway, I put one integer overflow check at the start of the function and deleted all existing checks. Signed-off-by: Dan Carpenter Acked-by: Dmitry Kalinkin Signed-off-by: Greg Kroah-Hartman drivers/vme/vme.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 91a1fad759ffd616b836984ca0420c7ad5996eef Author: Heiko Carstens Date: Sat Sep 30 10:54:31 2017 +0200 s390: use generic rwsem implementation We never optimized our rwsem inline assemblies to make use of the new atomic instructions. The generic rwsem implementation implicitly makes use of the new instructions, since it implements the required rwsem primitives with atomic operations, which we did optimize. However even when compiling for old architectures the generic variant still generates better code. So it's time to simply remove our old code and switch to the generic implementation. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/Kbuild | 1 + arch/s390/include/asm/rwsem.h | 210 ------------------------------------------ 2 files changed, 1 insertion(+), 210 deletions(-) commit ebc4768ac4971eab4b570e733e47ac9dfd0e4175 Author: Jan Kandziora Date: Wed Sep 20 23:52:46 2017 +0200 add w1_ds28e17 driver for the DS28E17 Onewire to I2C master bridge This subpatch adds a driver for the DS28E17 Onewire to I2C master bridge. Signed-off-by: Jan Kandziora Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman Documentation/ABI/testing/sysfs-driver-w1_ds28e17 | 21 + Documentation/w1/slaves/00-INDEX | 2 + Documentation/w1/slaves/w1_ds28e17 | 68 ++ drivers/w1/slaves/Kconfig | 15 + drivers/w1/slaves/Makefile | 1 + drivers/w1/slaves/w1_ds28e17.c | 771 ++++++++++++++++++++++ 6 files changed, 878 insertions(+) commit eb8470db8bc018fc28901e4e3b0f48e33f1ea7df Author: Jan Kandziora Date: Wed Sep 20 23:52:45 2017 +0200 wire: export w1_touch_bit The w1_ds28e17 driver from the next part of this patch needs to emit single-bit read timeslots to the DS28E17. The w1 subsystem already has this function but it is not exported outside drivers/w1/w1_io.c This subpatch exports the w1_touch_bit symbol with EXPORT_SYMBOL_GPL, same as the other exported symbols in drivers/w1/w1_io.c May be also useful later for writing drivers for other Onewire chips which do single-bit communication. Signed-off-by: Jan Kandziora Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman drivers/w1/w1_io.c | 3 ++- include/linux/w1.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 006e202fe6f91c9dd26f754ff0c7f38f2363aaf8 Author: Suniel Mahesh Date: Wed Oct 4 13:15:37 2017 +0530 staging: ccree: Convert to platform_{get,set}_drvdata() Platform devices are expected to use wrapper functions, platform_{get,set}_drvdata() with platform_device as argument, for getting and setting the driver data. dev_{get,set}_drvdata() are using &plat_dev->dev. For wrapper functions we can directly pass a struct platform_device. dev_set_drvdata() is redundant and therefore removed. The driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Suniel Mahesh Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_driver.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4038e3483c5331592d24f4ea354bb9c72c7f2d64 Author: Uwe Kleine-König Date: Wed Sep 20 14:29:36 2017 +0200 dt-bindings: serial: document rs485 bindings for various devices Atmel USART, Freescale UARTs and OMAP UART all support the rs485 binding described in rs485.txt, this commit just makes that explicit. Acked-by: Nicolas Ferre Acked-by: Rob Herring Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/serial/atmel-usart.txt | 1 + Documentation/devicetree/bindings/serial/fsl-imx-uart.txt | 1 + Documentation/devicetree/bindings/serial/fsl-lpuart.txt | 1 + Documentation/devicetree/bindings/serial/omap_serial.txt | 1 + 4 files changed, 4 insertions(+) commit de9e33bdfa22e607a88494ff21e9196d00bf4550 Author: Ed Blake Date: Tue Sep 26 11:40:03 2017 +0100 serial: 8250_dw: Improve clock rate setting Currently dw8250_set_termios sets the input clock to the nearest achievable rate to baudx16. If necessary, the input clock is then divided down to baudx16 using an integer divider within the UART device, with the divisor calculated in the 8250 core driver. However, the clock rate set by dw8250_set_termios and subsequently divided down could be considerably different to the target baudx16 rate, resulting in incorrect operation. This patch fixes this by iteratively searching for an input clock rate that is within +/-1.6% of an integer multiple of the target baudx16 rate. Signed-off-by: Ed Blake Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_dw.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 6263368c5b0b758d8639cad37a2a6493c9370425 Author: Ed Blake Date: Tue Sep 26 11:40:02 2017 +0100 serial: Add define for max baud rate divisor Add a define for the maximum baud rate divisor, to improve code readability. Signed-off-by: Ed Blake Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_mtk.c | 2 +- drivers/tty/serial/8250/8250_omap.c | 4 ++-- drivers/tty/serial/8250/8250_port.c | 2 +- include/uapi/linux/serial_reg.h | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) commit 7464779fa8551b90d5797d4020b0bdb7e6422eb9 Author: Andy Lowe Date: Fri Sep 22 20:29:30 2017 +0200 serial: sh-sci: suppress warning for ports without dma channels If a port has no dma channel defined in the device tree, then don't attempt to allocate a dma channel for the port. Also suppress the warning message concerning the failure to allocate a dma channel. Continue to emit the warning message if a dma channel is defined but cannot be allocated. Signed-off-by: Andy Lowe Signed-off-by: Eugeniu Rosca Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit daf3930cf616792ec62c4b2ab0926525f1b5de4d Author: Andy Shevchenko Date: Fri Sep 22 15:11:56 2017 +0300 serial: 8250_mid: Enable HSU on Intel Cedar Fork PCH Intel Cedar Fork PCH has similar HSU as has been used on Intel Denverton. Add PCI ID to get it enumerated. While here, remove DNV part form INTEL_MID_UART_DNV_FISR to show that is used not only on Intel Denverton from now on. Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_mid.c | 6 ++++-- drivers/tty/serial/8250/8250_pci.c | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) commit 2799707fbeea103866b5d11b243e3c7b2a2d9b26 Author: Jiri Slaby Date: Tue Sep 12 12:39:55 2017 +0200 mxser: remove unused parameters Remove * pdev from mxser_initbrd * old_termios from mxser_change_speed as they are unused and update the callers. Signed-off-by: Jiri Slaby Signed-off-by: Greg Kroah-Hartman drivers/tty/mxser.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 1d67243a8e77cdf63ee20bbd55c49771ff9c3090 Author: Shubhrajyoti Datta Date: Wed Sep 20 12:20:11 2017 +0530 tty: xilinx_uartps: move to arch_initcall for earlier console move to arch_initcall to get the console up really early, it is quite helpful for spotting early boot problems. Signed-off-by: Shubhrajyoti Datta Tested-by: Michal Simek Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/xilinx_uartps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c7b841224ac09901e595ed20b3b1111c6adf812 Author: Vikas Manocha Date: Thu Sep 28 15:51:25 2017 -0700 Arm: dts: stm32: remove extra compatible string from DT & driver This patch remove the extra compatibility string "st,stm32-usart" from driver & device tree. Signed-off-by: Vikas Manocha Reviewed-by: Patrice Chotard Signed-off-by: Greg Kroah-Hartman arch/arm/boot/dts/stm32f429.dtsi | 12 ++++++------ arch/arm/boot/dts/stm32f746.dtsi | 12 ++++++------ arch/arm/boot/dts/stm32h743.dtsi | 4 ++-- drivers/tty/serial/stm32-usart.c | 3 --- 4 files changed, 14 insertions(+), 17 deletions(-) commit 0dc262f49232ba306303a3ebc5c01e41b2e6d1af Author: Vikas Manocha Date: Thu Sep 28 15:51:24 2017 -0700 Arm: dts: stm32: remove extra compatible string for uart This patch removes the extra compatibility string "st,stm32-usart" to avoid confusion, save some time & space. Signed-off-by: Vikas Manocha Reviewed-by: Patrice Chotard Signed-off-by: Greg Kroah-Hartman Documentation/devicetree/bindings/dma/stm32-dma.txt | 2 +- Documentation/devicetree/bindings/serial/st,stm32-usart.txt | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) commit ea04f82a0c7f2739071cc9ac4a0ca57b3bddef7b Author: Romain Izard Date: Thu Sep 28 11:46:27 2017 +0200 tty/serial: atmel: Prevent a warning on suspend The atmel serial port driver reported the following warning on suspend: atmel_usart f8020000.serial: ttyS1: Unable to drain transmitter As the ATMEL_US_TXEMPTY status bit in ATMEL_US_CSR is always cleared when the transmitter is disabled, we need to know the transmitter's state to return the real fifo state. And as ATMEL_US_CR is write-only, it is necessary to save the state of the transmitter in a local variable, and update the variable when TXEN and TXDIS is written in ATMEL_US_CR. After those changes, atmel_tx_empty can return "empty" on suspend, the warning in uart_suspend_port disappears, and suspending is 20ms shorter for each enabled Atmel serial port. Signed-off-by: Romain Izard Tested-by: Nicolas Ferre Acked-by: Nicolas Ferre Acked-by: Richard Genoud Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit fb9bbce6e67a2c33a1902380b1c3d3d96e75af52 Author: Allen Pais Date: Fri Sep 22 14:29:43 2017 +0530 usb: gadget: udc: snps_udc_core: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/snps_udc_core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit eb72ca98e6b8cb7136e00b1774af4841e304bc9b Author: Allen Pais Date: Fri Sep 22 14:29:42 2017 +0530 usb: gadget: udc: dummy_hcd: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/dummy_hcd.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 32f44077f35da1ee8f51b313df5be2a893139e27 Author: Allen Pais Date: Fri Sep 22 14:29:41 2017 +0530 drivers: usb: speedtch: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/speedtch.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 366bdc01e4e55189d183b37674edb0277610e94b Author: Allen Pais Date: Fri Sep 22 14:29:40 2017 +0530 usb: gadget: udc: r8a66597: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/r8a66597-udc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6a29d4b944316f7e4ad643b78141b60fdf41c5ca Author: Allen Pais Date: Fri Sep 22 14:29:39 2017 +0530 drivers: usb: atm: cxacru: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/usb/atm/cxacru.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8c0e1832e0124f2f9b803abdaa12e30b0cac8b63 Author: Allen Pais Date: Fri Sep 22 14:29:38 2017 +0530 usb: gadget: udc: pxa25x_udc: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/pxa25x_udc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3f948bdc635cdec1799c4b448c1786f7cd2c0838 Author: Allen Pais Date: Fri Sep 22 14:29:37 2017 +0530 usb: gadget: udc: m66592: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/usb/gadget/udc/m66592-udc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 88189c10db8a3d3d760e5f58aed935919cecfd98 Author: Allen Pais Date: Fri Sep 22 14:29:36 2017 +0530 drivers: usb: phy: omap: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/phy-isp1301-omap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b0f597da0d52b15c17d78520b708e00b092de1ba Author: Allen Pais Date: Fri Sep 22 14:29:35 2017 +0530 drivers: usb: hcd: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e8470b524f2a0a8bb6464e4e1351dd6bb1ebe364 Author: Romain Izard Date: Thu Sep 28 11:46:24 2017 +0200 ehci-atmel: Power down during suspend is normal When an Atmel SoC is suspended with the backup mode, the USB bus will be powered down. As this is expected, do not return an error to the driver core when ehci_resume detects it. Signed-off-by: Romain Izard Acked-by: Nicolas Ferre Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-atmel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 263bf6122f886e4a3ffba089337a6b9db0fe291f Author: Russell King Date: Tue Sep 26 15:16:25 2017 +0100 usb: ohci-sa1111: remove special sa1111 mmio accessors Remove the special SA1111 MMIO accessors from the ohci-sa1111 driver as their definition will be removed shortly. The SA1111 accessors are barrierless, so use the _relaxed variants. Signed-off-by: Russell King Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-sa1111.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6c771d30a1b839402a37435a307496de5a33b212 Author: Russell King Date: Tue Sep 26 11:12:39 2017 +0100 usb: ohci-sa1111: convert shutdown method to native device_driver Convert the shutdown method to use the device_driver shutdown function pointer rather than a private bus-type shutdown. This is the only user for SA1111 bus types, so having the support code in the bus doesn't make any sense. Signed-off-by: Russell King Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-sa1111.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 78655197eb09bb877857cac3db030123ae5d0f52 Author: Russell King Date: Tue Sep 26 11:12:12 2017 +0100 usb: ohci-sa1111: use sa1111_get_irq() to obtain IRQ resources Use the provided sa1111_get_irq() to fetch the IRQ resources for the SA1111 OHCI driver. Signed-off-by: Russell King Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-sa1111.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 0a4c005bd1715d8b32a368ed5516a6ee7e603d18 Author: Heikki Krogerus Date: Mon Sep 25 10:08:53 2017 +0300 usb: typec: driver for TI TPS6598x USB Power Delivery controllers Driver for TI TPS65982, TPS65983 and other TPS6598x family stand alone USB Power Delivery controllers. The driver will at this stage only register the port and partners attached to it, so cables and alternate modes are not yet registered. Both power and data role swapping is supported. Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/Kconfig | 11 + drivers/usb/typec/Makefile | 1 + drivers/usb/typec/tps6598x.c | 475 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 487 insertions(+) commit 3c4fb9f169214290ec9a943907321e6265b36f65 Author: Heikki Krogerus Date: Wed Sep 20 12:54:42 2017 +0300 usb: typec: wcove: start using tcpm for USB PD support This patch makes the driver work with USB Type-C Port Manager (tcpm.c) to provide USB PD functionality. Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/Kconfig | 4 +- drivers/usb/typec/typec_wcove.c | 594 ++++++++++++++++++++++++++++++---------- 2 files changed, 447 insertions(+), 151 deletions(-) commit 598b98f24a8deb2d40e97c4f798a1a9fe343efab Author: Kees Cook Date: Wed Sep 20 16:27:40 2017 -0700 usb/phy-isp1301-omap: Remove .data assignment The .data assignment appears to be redundant to the WORK_STOP bit for stopping the timer. Also, it appears this timer is entirely unused as it is only ever started under #define VERBOSE, which is explicitly undefined. Signed-off-by: Kees Cook Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman drivers/usb/phy/phy-isp1301-omap.c | 1 - 1 file changed, 1 deletion(-) commit 06e5e0045afd5f3165ba4d11f23e448d8d2ecbd4 Author: Jules Maselbas Date: Fri Sep 15 18:58:46 2017 +0200 dt-bindings: max3421: Add bindings documentation Adds bindings documentation for the max3421 driver. Signed-off-by: Jules Maselbas Acked-by: Rob Herring Signed-off-by: Greg Kroah-Hartman .../devicetree/bindings/usb/maxim,max3421.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 721fdc83b31b1b22c34b2d77304890877c624c6b Author: Jules Maselbas Date: Fri Sep 15 18:58:45 2017 +0200 usb: max3421: Add devicetree support Adds support for devicetree to the max3421 driver. Signed-off-by: Jules Maselbas Signed-off-by: Greg Kroah-Hartman drivers/usb/host/max3421-hcd.c | 87 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 86 insertions(+), 1 deletion(-) commit c15562c0dcb2c7f26e891923b784cf1926b8c833 Author: Ben Hutchings Date: Sun Oct 1 02:18:37 2017 +0100 usbip: tools: Install all headers needed for libusbip development usbip_host_driver.h now depends on several additional headers, which need to be installed along with it. Fixes: 021aed845303 ("staging: usbip: userspace: migrate usbip_host_driver ...") Fixes: 3391ba0e2792 ("usbip: tools: Extract generic code to be shared with ...") Signed-off-by: Ben Hutchings Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman tools/usb/usbip/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5f5685569ae8fccb0344373d823f2e4c59bb3d8e Author: James Smart Date: Thu Sep 14 10:38:41 2017 -0700 nvme-fc: create fc class and transport device Added a new fc class and a device node for udev events under it. I expect the fc class will eventually be the location where the FC SCSI and FC NVME merge in the future. Therefore names are kept somewhat generic. Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) commit eaefd5abf6b095bfc55eb745bdf7c42cf66790eb Author: James Smart Date: Thu Sep 14 10:38:42 2017 -0700 nvme-fc: add uevent for auto-connect To support auto-connecting to FC-NVME devices upon their dynamic appearance, add a uevent that can kick off connection scripts. uevent is posted against the fc_udev device. patch set tested with the following rule to kick an nvme-cli connect-all for the FC initiator and FC target ports. This is just an example for testing and not intended for real life use. ACTION=="change", SUBSYSTEM=="fc", ENV{FC_EVENT}=="nvmediscovery", \ ENV{NVMEFC_HOST_TRADDR}=="*", ENV{NVMEFC_TRADDR}=="*", \ RUN+="/bin/sh -c '/usr/local/sbin/nvme connect-all --transport=fc --host-traddr=$env{NVMEFC_HOST_TRADDR} --traddr=$env{NVMEFC_TRADDR} >> /tmp/nvme_fc.log'" I will post proposed udev/systemd scripts for possible kernel support. Signed-off-by: James Smart Signed-off-by: Christoph Hellwig drivers/nvme/host/fc.c | 49 ++++++++++++++++++++++++++++++++++++++++++ include/linux/nvme-fc-driver.h | 2 ++ 2 files changed, 51 insertions(+) commit d1f1071f8151355ec149117238e9c5aa6404ca9f Author: Sagi Grimberg Date: Sun Sep 24 16:15:55 2017 +0300 nvme-fabrics: request transport module Help userspace to make sure transport module is loaded. Signed-off-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig drivers/nvme/host/fabrics.c | 3 +++ 1 file changed, 3 insertions(+) commit 3375e29c280894f8d5e65c6920630a42db069599 Author: James Smart Date: Mon Sep 11 16:14:50 2017 -0700 nvmet: bump NVMET_NR_QUEUES to 128 Raise the max number of IO queues to 128. There are several hosts with more than 64 cpus/threads. Signed-off-by: James Smart Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig drivers/nvme/target/nvmet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 786456325b9f05843ec722269a3ccd77c31b9c6d Author: Randy Dunlap Date: Fri Sep 22 18:04:43 2017 -0700 nvme: use menu Kconfig interface Add a menu interface for NVME host and target support so that it is presented to users more like other Kconfig symbols. This makes the Device Driver menu less cluttered (easier to read) and keeps all of these symbols grouped together. Signed-off-by: Randy Dunlap Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig drivers/nvme/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) commit 8ae4e4477d8f5cc7736816a0492f82934ca32ab7 Author: Marc Olson Date: Wed Sep 6 17:23:56 2017 -0700 nvme: update timeout module parameter type The underlying blk_mq_tag_set, and request timeout parameters support an unsigned int. Extend the size of the nvme module parameters for io and admin commands to match. Signed-off-by: Marc Olson Signed-off-by: Christoph Hellwig drivers/nvme/host/core.c | 8 ++++---- drivers/nvme/host/nvme.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 213f1bd035edc36f8d68c028d1b79675cd167d1d Author: Maarten Lankhorst Date: Tue Sep 19 14:14:19 2017 +0200 drm/i915: Skip vblank waits for cursor updates when watermarks dont need updating In legacy cursor updates we need the extra vblank waits if we update watermarks, and then we cannot skip the vblank for cursors. This is why for < gen9 we disabled the cursor fastpath, but we can skip the wait when post vblank watermarks are untouched. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170919121419.13708-2-maarten.lankhorst@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 3cf50c63a76177e0bbe0e46e1abe4eb263128ba4 Author: Maarten Lankhorst Date: Tue Sep 19 14:14:18 2017 +0200 drm/i915: Unset legacy_cursor_update early in intel_atomic_commit, v3. Commit b44d5c0c105a ("drm/i915: Always wait for flip_done, v2.") removed the call to wait_for_vblanks and replaced it with flip_done. Unfortunately legacy_cursor_update was unset too late, and the replacement call drm_atomic_helper_wait_for_flip_done() was a noop. Make sure that its unset before setup_commit() is called to fix this issue. Changes since v1: - Force vblank wait for watermarks not yet converted to atomic too. (Ville) - Use for_each_new_intel_crtc_in_state. (Ville) Changes since v2: - Move the optimization to a separate commit. (Ville) Signed-off-by: Maarten Lankhorst Fixes: b44d5c0c105a ("drm/i915: Always wait for flip_done, v2.") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102675 Testcase: kms_cursor_crc Cc: Daniel Vetter Cc: Jani Nikula Reported-by: Marta Löfstedt Cc: Marta Löfstedt Tested-by: Marta Löfstedt Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170919121419.13708-1-maarten.lankhorst@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) commit 02e479808b5d62f8f09e426968a410e399b1f8ff Author: Linus Walleij Date: Tue Sep 26 21:20:23 2017 +0200 gpio: Alter semantics of *raw* operations to actually be raw Currently calls to: gpiod_direction_output_raw() gpiod_set_raw_value() gpiod_set_raw_array_value() gpiod_set_raw_value_cansleep() gpiod_set_raw_array_value_cansleep() Respect that we do not want to invert the value written, but will still apply special open drain/open source semantics if the line has an open drain/open source flag. It also forbids us from driving an output marked as an interrupt line. This does not fit with the function name and expected semantics. In the w1 host driver (for example) we need to handle a line as open drain but sometimes force it to pull up, which means we should be able to use the gpiod_set_raw_value() for this, but it currently does not work. There are also use cases where users actually want to drive a line used by an interrupt. This is what they should be expected to use the *raw* accessors for. I have looked over the current users of this API and they do not seem to be using the *raw* accessors with open drain or open source so let's augment this behaviour before we have users expecting the inconsistent semantic. Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 90 ++++++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 43 deletions(-) commit fac9d8850a0c94c1d237fef2a3a238f7dbed39cf Author: Linus Walleij Date: Tue Sep 26 20:58:28 2017 +0200 gpio: Get rid of _prefix and __prefixes The arbitrarily marking of a function with _ or __ is taking to mean "perform some inner core of the caller" or something like that. At other times, this syntax has a totally different meaning. I don't like this since it is unambious and unhelpful to people reading the code, so replace it with _commit() suffixes. Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 52 +++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit acd669a8f67ed47f5edd385741486cc7a259a446 Author: Ganesh Goudar Date: Tue Oct 3 11:10:53 2017 +0530 cxgb4: add new T6 pci device id's Add 0x6085 T6 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 0a75aff178df005b0619703cf7886d5c8e28e486 Author: Sandipan Das Date: Fri Sep 29 11:14:10 2017 +0530 powerpc/lib/sstep: Fix fixed-point shift instructions that set CA32 This fixes the emulated behaviour of existing fixed-point shift right algebraic instructions that are supposed to set both the CA and CA32 bits of XER when running on a system that is compliant with POWER ISA v3.0 independent of whether the system is executing in 32-bit mode or 64-bit mode. The following instructions are affected: * Shift Right Algebraic Word Immediate (srawi[.]) * Shift Right Algebraic Word (sraw[.]) * Shift Right Algebraic Doubleword Immediate (sradi[.]) * Shift Right Algebraic Doubleword (srad[.]) Fixes: 0016a4cf5582 ("powerpc: Emulate most Book I instructions in emulate_step()") Signed-off-by: Sandipan Das Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 4 ++++ 1 file changed, 4 insertions(+) commit dc39c1d68f256990d4bb0033a219e8ca15ba4d7f Author: Sandipan Das Date: Fri Sep 29 11:14:09 2017 +0530 powerpc/lib/sstep: Fix fixed-point arithmetic instructions that set CA32 There are existing fixed-point arithmetic instructions that always set the CA bit of XER to reflect the carry out of bit 0 in 64-bit mode and out of bit 32 in 32-bit mode. In ISA v3.0, these instructions also always set the CA32 bit of XER to reflect the carry out of bit 32. This fixes the emulated behaviour of such instructions when running on a system that is compliant with POWER ISA v3.0. The following instructions are affected: * Add Immediate Carrying (addic) * Add Immediate Carrying and Record (addic.) * Subtract From Immediate Carrying (subfic) * Add Carrying (addc[.]) * Subtract From Carrying (subfc[.]) * Add Extended (adde[.]) * Subtract From Extended (subfe[.]) * Add to Minus One Extended (addme[.]) * Subtract From Minus One Extended (subfme[.]) * Add to Zero Extended (addze[.]) * Subtract From Zero Extended (subfze[.]) Fixes: 0016a4cf5582 ("powerpc: Emulate most Book I instructions in emulate_step()") Signed-off-by: Sandipan Das Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 924c8feb041c3ef22d46ac2e7468161aad85e979 Author: Sandipan Das Date: Fri Sep 29 11:14:08 2017 +0530 powerpc/lib/sstep: Add XER bits introduced in POWER ISA v3.0 This adds definitions for the OV32 and CA32 bits of XER that were introduced in POWER ISA v3.0. There are some existing instructions that currently set the OV and CA bits based on certain conditions. The emulation behaviour of all these instructions needs to be updated to set these new bits accordingly. Signed-off-by: Sandipan Das Acked-by: Naveen N. Rao Signed-off-by: Michael Ellerman arch/powerpc/lib/sstep.c | 2 ++ 1 file changed, 2 insertions(+) commit 01451ad47e2724eb123e87a5bae04e943046b87a Author: Allen Pais Date: Fri Sep 22 17:05:00 2017 +0530 powerpc/powermac: Use setup_timer() helper Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Michael Ellerman arch/powerpc/platforms/powermac/low_i2c.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8d6b1bf20f61cd5358fdc5fa83d7fc11c8393d8a Author: Allen Pais Date: Fri Sep 22 17:04:59 2017 +0530 powerpc/6xx: Use setup_timer() helper Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Michael Ellerman arch/powerpc/kernel/tau_6xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 83ad1e6a1dc049dd04be4564125a7fd49e022183 Author: Allen Pais Date: Fri Sep 22 17:04:58 2017 +0530 powerpc/oprofile: Use setup_timer() helper Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Michael Ellerman arch/powerpc/oprofile/op_model_cell.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 969a86a2855d484a00205a424df1c693acee15d9 Author: Nicholas Piggin Date: Wed Sep 27 15:45:58 2017 +1000 powerpc/powernv: Use early_radix_enabled in POWER9 tlb flush This code is used at boot and machine checks, so it should be using early_radix_enabled() (which is usable any time). Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/mce_power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e36d0a2ed5019184bb9b94ff1138c87c05905789 Author: Nicholas Piggin Date: Fri Sep 29 13:29:42 2017 +1000 powerpc/powernv: Implement NMI IPI with OPAL_SIGNAL_SYSTEM_RESET This allows MSR[EE]=0 lockups to be detected on an OPAL (bare metal) system similarly to the hcall NMI IPI on pseries guests, when the platform/firmware supports it. This is an example of CPU10 spinning with interrupts hard disabled: Watchdog CPU:32 detected Hard LOCKUP other CPUS:10 Watchdog CPU:10 Hard LOCKUP CPU: 10 PID: 4410 Comm: bash Not tainted 4.13.0-rc7-00074-ge89ce1f89f62-dirty #34 task: c0000003a82b4400 task.stack: c0000003af55c000 NIP: c0000000000a7b38 LR: c000000000659044 CTR: c0000000000a7b00 REGS: c00000000fd23d80 TRAP: 0100 Not tainted (4.13.0-rc7-00074-ge89ce1f89f62-dirty) MSR: 90000000000c1033 CR: 28422222 XER: 20000000 CFAR: c0000000000a7b38 SOFTE: 0 GPR00: c000000000659044 c0000003af55fbb0 c000000001072a00 0000000000000078 GPR04: c0000003c81b5c80 c0000003c81cc7e8 9000000000009033 0000000000000000 GPR08: 0000000000000000 c0000000000a7b00 0000000000000001 9000000000001003 GPR12: c0000000000a7b00 c00000000fd83200 0000000010180df8 0000000010189e60 GPR16: 0000000010189ed8 0000000010151270 000000001018bd88 000000001018de78 GPR20: 00000000370a0668 0000000000000001 00000000101645e0 0000000010163c10 GPR24: 00007fffd14d6294 00007fffd14d6290 c000000000fba6f0 0000000000000004 GPR28: c000000000f351d8 0000000000000078 c000000000f4095c 0000000000000000 NIP [c0000000000a7b38] sysrq_handle_xmon+0x38/0x40 LR [c000000000659044] __handle_sysrq+0xe4/0x270 Call Trace: [c0000003af55fbd0] [c000000000659044] __handle_sysrq+0xe4/0x270 [c0000003af55fc70] [c000000000659810] write_sysrq_trigger+0x70/0xa0 [c0000003af55fca0] [c0000000003da650] proc_reg_write+0xb0/0x110 [c0000003af55fcf0] [c0000000003423bc] __vfs_write+0x6c/0x1b0 [c0000003af55fd90] [c000000000344398] vfs_write+0xd8/0x240 [c0000003af55fde0] [c00000000034632c] SyS_write+0x6c/0x110 [c0000003af55fe30] [c00000000000b220] system_call+0x58/0x6c Signed-off-by: Nicholas Piggin [mpe: Use kernel types for opal_signal_system_reset()] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/opal-api.h | 1 + arch/powerpc/include/asm/opal.h | 2 + arch/powerpc/platforms/powernv/opal-wrappers.S | 1 + arch/powerpc/platforms/powernv/setup.c | 1 + arch/powerpc/platforms/powernv/smp.c | 52 ++++++++++++++++++++++++++ 5 files changed, 57 insertions(+) commit 78adf6c214f04fef01c714d78441653dc838a3ba Author: Nicholas Piggin Date: Fri Sep 29 13:29:41 2017 +1000 powerpc/64s: Implement system reset idle wakeup reason It is possible to wake from idle due to a system reset exception, in which case the CPU takes a system reset interrupt to wake from idle, with system reset as the wakeup reason. The regular (not idle wakeup) system reset interrupt handler must be invoked in this case, otherwise the system reset interrupt is lost. Handle the system reset interrupt immediately after CPU state has been restored. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/irq.c | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) commit 064996d62a33ffe10264b5af5dca92d54f60f806 Author: Nicholas Piggin Date: Fri Sep 29 13:29:40 2017 +1000 powerpc/xmon: Avoid tripping SMP hardlockup watchdog The SMP hardlockup watchdog cross-checks other CPUs for lockups, which causes xmon headaches because it's assuming interrupts hard disabled means no watchdog troubles. Try to improve that by calling touch_nmi_watchdog() in obvious places where secondaries are spinning. Also annotate these spin loops with spin_begin/end calls. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/xmon/xmon.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 80e4d70b06863e0104e5a0dc78aa3710297fbd4b Author: Nicholas Piggin Date: Fri Sep 29 13:29:39 2017 +1000 powerpc/watchdog: Do not trigger SMP crash from touch_nmi_watchdog In xmon, touch_nmi_watchdog() is not expected to be checking that other CPUs have not touched the watchdog, so the code will just call touch_nmi_watchdog() once before re-enabling hard interrupts. Just update our CPU's state, and ignore apparently stuck SMP threads. Arguably touch_nmi_watchdog should check for SMP lockups, and callers should be fixed, but that's not trivial for the input code of xmon. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/watchdog.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d58fdd9d7f220f34830838af4e7b21854469ae8a Author: Nicholas Piggin Date: Fri Sep 29 13:29:38 2017 +1000 powerpc/watchdog: Do not backtrace locked CPUs twice if allcpus backtrace is enabled If sysctl_hardlockup_all_cpu_backtrace is enabled, there is no need to IPI stuck CPUs for backtrace before trigger_allbutself_cpu_backtrace(), which does the same thing again. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/watchdog.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 842dc1dbabb5e874550b52d896851e5e53e28a5f Author: Nicholas Piggin Date: Fri Sep 29 13:29:37 2017 +1000 powerpc/watchdog: Do not panic from locked CPU's IPI handler The SMP watchdog will detect locked CPUs and IPI them to print a backtrace and registers. If panic on hard lockup is enabled, do not panic from this handler, because that can cause recursion into the IPI layer during the panic. The caller already panics in this case. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman arch/powerpc/kernel/watchdog.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d954f94cfa4488f4281db2b698d90e1b03facb4d Author: Bob Moore Date: Wed Sep 20 10:01:02 2017 +0800 ACPICA: Update version to 20170831 ACPICA commit faa9fdfbd035a14347e6a875be2a0cddb3e6fc00 Version 20170831. Link: https://github.com/acpica/acpica/commit/faa9fdfbd035 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 8092936dacde0fd00e201390f30d8c219b818f36 Author: Bob Moore Date: Wed Sep 20 10:00:56 2017 +0800 ACPICA: Update acpi_get_timer for 64-bit interface to acpi_hw_read ACPICA commit 1cdcf16447c15694faa564c0cd8e357b910344a0 Return value from acpi_hw_read is now 64 bits, but the ACPI PM Timer is defined by the ACPI spec to be 32 bits. Link: https://github.com/acpica/acpica/commit/1cdcf16447c1 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/hwtimer.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit c2e56e54b2b426fdce62e1a08a77ce8e6f4b915c Author: Bob Moore Date: Wed Sep 20 10:00:49 2017 +0800 ACPICA: String conversions: Update to add new behaviors ACPICA commit e3574138af82a25d76324559848689946982dbd0 1) Allow whitespace in string before the constant 2) ut_strtoul64 now always creates a 64-bit integer; iASL will truncate this to the lower 32-bits if the table being compiled is a 32-bit table (DSDT revision less than 2). Link: https://github.com/acpica/acpica/commit/e3574138af82 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/acutils.h | 2 ++ drivers/acpi/acpica/utstrsuppt.c | 25 ++++++++++++++ drivers/acpi/acpica/utstrtoul64.c | 72 +++++++++++++++++++++++++++------------ 3 files changed, 78 insertions(+), 21 deletions(-) commit 72a2935502cc0f23567df649ebc644038d24abcf Author: Bob Moore Date: Wed Sep 20 10:00:43 2017 +0800 ACPICA: String conversions: Cleanup/format comments. No functional changes ACPICA commit 33e38cd2406709b13fa0a7821e588505b3771163 Cleanup some of the language used in the large comments, especially the ones that reference the rules in the ACPI spec. Fixed some typos. Link: https://github.com/acpica/acpica/commit/33e38cd24067 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/utstrsuppt.c | 48 ++++++++---------- drivers/acpi/acpica/utstrtoul64.c | 104 +++++++++++++++++++------------------- 2 files changed, 74 insertions(+), 78 deletions(-) commit fe97d28704147ba72f7d7859909f80b4bb5a17d4 Author: Bob Moore Date: Wed Sep 20 10:00:36 2017 +0800 ACPICA: Restructure/cleanup all string-to-integer conversion functions ACPICA commit 610046d444ad781cc36673bf1f030abe50cbc61f Improve adherence to ACPI spec for implicit and explicit conversions Adds octal support for constants in ASL code Adds integer overflow errors for constants during ASL compilation Eliminates most of the existing complex flags parameters Simplify support for implicit/explicit runtime conversions Adds one new file, utilities/utstrsuppt.c Link: https://github.com/acpica/acpica/commit/610046d444ad Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/Makefile | 1 + drivers/acpi/acpica/acinterp.h | 6 +- drivers/acpi/acpica/acutils.h | 31 ++- drivers/acpi/acpica/dbconvert.c | 5 +- drivers/acpi/acpica/dswexec.c | 2 +- drivers/acpi/acpica/exconcat.c | 2 +- drivers/acpi/acpica/exconvrt.c | 30 ++- drivers/acpi/acpica/exmisc.c | 2 +- drivers/acpi/acpica/exresop.c | 2 +- drivers/acpi/acpica/nsconvert.c | 4 +- drivers/acpi/acpica/utstrsuppt.c | 417 ++++++++++++++++++++++++++++++ drivers/acpi/acpica/utstrtoul64.c | 420 +++++++++++++++---------------- include/acpi/acexcep.h | 16 +- tools/power/acpi/tools/acpidump/Makefile | 1 + tools/power/acpi/tools/acpidump/apdump.c | 3 +- tools/power/acpi/tools/acpidump/apmain.c | 4 +- 16 files changed, 690 insertions(+), 256 deletions(-) commit 81b7cb92958f50da1e0997de3289c09031c044c5 Author: Bob Moore Date: Wed Sep 20 10:00:30 2017 +0800 ACPICA: Header support for the PDTT ACPI table ACPICA commit 9951c78746b52da7d23da4531fcfba6bf8c95b6a This is an ACPI 6.2 table. Link: https://github.com/acpica/acpica/commit/9951c78746b5 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki include/acpi/actbl1.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 979fba9452b8111a83f555becea0a63c377e4e73 Author: Lv Zheng Date: Wed Sep 20 10:00:20 2017 +0800 ACPICA: acpiexec: Add testability of deferred table verification ACPICA commit 04c28c7549e694ea85f40bcc816039e5fbb4169c This patch adds testability of deferred table verification mechanism. As acpiexec uses dynamically allocated root table list from its very early stage, a change to acpi_reallocate_root_table() is required to allow deferred table verification mechanism to be triggered in such an environment. Note that acpi_gbl_enable_table_validation is still TRUE by default, thus: 1. Developers need to manually set acpi_gbl_enable_table_validation to FALSE for acpiexec to enable this test. 2. For all other OSPMs (Linux, BSDs, etc.), this commit is a no-op. Link: https://github.com/acpica/acpica/commit/04c28c7549e6 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/tbxface.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 8381c54fc0b40e727086a7f61399ae3e09ca7a95 Author: Lv Zheng Date: Wed Sep 20 10:00:11 2017 +0800 ACPICA: Hardware: Enable 64-bit support of hardware accesses ACPICA commit 6b0a604d171334f61a18bc92b44ec0437b11bf98 This patch enable 64-bit support for acpi_hw_read()/acpi_hw_write() and then convert acpi_read()/acpi_write() to invoke them. BZ 1287, fixed by Lv Zheng. Link: https://github.com/acpica/acpica/commit/6b0a604d1713 Link: https://bugs.acpica.org/show_bug.cgi?id=1287 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/achware.h | 4 +- drivers/acpi/acpica/evgpe.c | 6 +-- drivers/acpi/acpica/hwgpe.c | 4 +- drivers/acpi/acpica/hwregs.c | 72 ++++++++++++++------------ drivers/acpi/acpica/hwxface.c | 118 ++---------------------------------------- 5 files changed, 49 insertions(+), 155 deletions(-) commit 26873308b21654b6e0785b9f9e2c5414d37a4c4c Merge: af14827 ac1ed8b Author: David S. Miller Date: Tue Oct 3 16:27:29 2017 -0700 Merge branch 'sctp-stream-schedulers' Marcelo Ricardo Leitner says: ==================== Introduce SCTP Stream Schedulers This patchset introduces the SCTP Stream Schedulers are defined by https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-13 It provides 3 schedulers at the moment: FCFS, Priority and Round Robin. The other 3, Round Robin per packet, Fair Capacity and Weighted Fair Capacity will be added later. More specifically, WFQ is required by WebRTC Datachannels. The draft also defines the idata chunk, allowing a usermsg to be interrupted by another piece of idata from another stream. This patchset *doesn't* include it. It will be posted later by Xin Long. Its integration with this patchset is very simple and it basically only requires a tweak in sctp_sched_dequeue_done(), to ignore datamsg boundaries. The first 5 patches are a preparation for the next ones. The most relevant patches are the 4th and 6th ones. More details are available on each patch. v2: changelog update on patch 3 ==================== Signed-off-by: David S. Miller commit ac1ed8b82cd60ba8e7d84103ac1414b8c577c485 Author: Marcelo Ricardo Leitner Date: Tue Oct 3 19:20:17 2017 -0300 sctp: introduce round robin stream scheduler This patch introduces RFC Draft ndata section 3.2 Priority Based Scheduler (SCTP_SS_RR). Works by maintaining a list of enqueued streams and tracking the last one used to send data. When the datamsg is done, it switches to the next stream. See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-13 Tested-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 11 +++ include/uapi/linux/sctp.h | 3 +- net/sctp/Makefile | 3 +- net/sctp/stream_sched.c | 2 + net/sctp/stream_sched_rr.c | 201 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 218 insertions(+), 2 deletions(-) commit 637784ade221a3c8a7ecd0f583eddd95d6276b9a Author: Marcelo Ricardo Leitner Date: Tue Oct 3 19:20:16 2017 -0300 sctp: introduce priority based stream scheduler This patch introduces RFC Draft ndata section 3.4 Priority Based Scheduler (SCTP_SS_PRIO). It works by having a struct sctp_stream_priority for each priority configured. This struct is then enlisted on a queue ordered per priority if, and only if, there is a stream with data queued, so that dequeueing is very straightforward: either finish current datamsg or simply dequeue from the highest priority queued, which is the next stream pointed, and that's it. If there are multiple streams assigned with the same priority and with data queued, it will do round robin amongst them while respecting datamsgs boundaries (when not using idata chunks), to be reasonably fair. We intentionally don't maintain a list of priorities nor a list of all streams with the same priority to save memory. The first would mean at least 2 other pointers per priority (which, for 1000 priorities, that can mean 16kB) and the second would also mean 2 other pointers but per stream. As SCTP supports up to 65535 streams on a given asoc, that's 1MB. This impacts when giving a priority to some stream, as we have to find out if the new priority is already being used and if we can free the old one, and also when tearing down. The new fields in struct sctp_stream_out_ext and sctp_stream are added under a union because that memory is to be shared with other schedulers. See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-13 Tested-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 24 +++ include/uapi/linux/sctp.h | 3 +- net/sctp/Makefile | 2 +- net/sctp/stream_sched.c | 3 + net/sctp/stream_sched_prio.c | 347 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 377 insertions(+), 2 deletions(-) commit 0ccdf3c7fdeda511b10def19505178a9d2d3fccd Author: Marcelo Ricardo Leitner Date: Tue Oct 3 19:20:15 2017 -0300 sctp: add sockopt to get/set stream scheduler parameters As defined per RFC Draft ndata Section 4.3.3, named as SCTP_STREAM_SCHEDULER_VALUE. See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-13 Tested-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/uapi/linux/sctp.h | 7 +++++ net/sctp/socket.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) commit 13aa8770fe42d246c6f3a8eb814b85bccb428011 Author: Marcelo Ricardo Leitner Date: Tue Oct 3 19:20:14 2017 -0300 sctp: add sockopt to get/set stream scheduler As defined per RFC Draft ndata Section 4.3.2, named as SCTP_STREAM_SCHEDULER. See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-13 Tested-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/uapi/linux/sctp.h | 1 + net/sctp/socket.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) commit 5bbbbe32a43199c2b9ea5ea66fab6241c64beb51 Author: Marcelo Ricardo Leitner Date: Tue Oct 3 19:20:13 2017 -0300 sctp: introduce stream scheduler foundations This patch introduces the hooks necessary to do stream scheduling, as per RFC Draft ndata. It also introduces the first scheduler, which is what we do today but now factored out: first come first served (FCFS). With stream scheduling now we have to track which chunk was enqueued on which stream and be able to select another other than the in front of the main outqueue. So we introduce a list on sctp_stream_out_ext structure for this purpose. We reuse sctp_chunk->transmitted_list space for the list above, as the chunk cannot belong to the two lists at the same time. By using the union in there, we can have distinct names for these moments. sctp_sched_ops are the operations expected to be implemented by each scheduler. The dequeueing is a bit particular to this implementation but it is to match how we dequeue packets today. We first dequeue and then check if it fits the packet and if not, we requeue it at head. Thus why we don't have a peek operation but have dequeue_done instead, which is called once the chunk can be safely considered as transmitted. The check removed from sctp_outq_flush is now performed by sctp_stream_outq_migrate, which is only called during assoc setup. (sctp_sendmsg() also checks for it) The only operation that is foreseen but not yet added here is a way to signalize that a new packet is starting or that the packet is done, for round robin scheduler per packet, but is intentionally left to the patch that actually implements it. Support for I-DATA chunks, also described in this RFC, with user message interleaving is straightforward as it just requires the schedulers to probe for the feature and ignore datamsg boundaries when dequeueing. See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-13 Tested-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/stream_sched.h | 72 +++++++++++ include/net/sctp/structs.h | 15 ++- include/uapi/linux/sctp.h | 6 + net/sctp/Makefile | 2 +- net/sctp/outqueue.c | 59 +++++---- net/sctp/sm_sideeffect.c | 3 + net/sctp/stream.c | 88 +++++++++++-- net/sctp/stream_sched.c | 270 ++++++++++++++++++++++++++++++++++++++++ 8 files changed, 477 insertions(+), 38 deletions(-) commit 2fc019f790312e703efa1a44204c586112a430dc Author: Marcelo Ricardo Leitner Date: Tue Oct 3 19:20:12 2017 -0300 sctp: introduce sctp_chunk_stream_no Add a helper to fetch the stream number from a given chunk. Tested-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 5 +++++ 1 file changed, 5 insertions(+) commit f952be79cebd49d04154781d99408867a069d375 Author: Marcelo Ricardo Leitner Date: Tue Oct 3 19:20:11 2017 -0300 sctp: introduce struct sctp_stream_out_ext With the stream schedulers, sctp_stream_out will become too big to be allocated by kmalloc and as we need to allocate with BH disabled, we cannot use __vmalloc in sctp_stream_init(). This patch moves out the stats from sctp_stream_out to sctp_stream_out_ext, which will be allocated only when the application tries to sendmsg something on it. Just the introduction of sctp_stream_out_ext would already fix the issue described above by splitting the allocation in two. Moving the stats to it also reduces the pressure on the allocator as we will ask for less memory atomically when creating the socket and we will use GFP_KERNEL later. Then, for stream schedulers, we will just use sctp_stream_out_ext. Tested-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller include/net/sctp/structs.h | 10 ++++++++-- net/sctp/chunk.c | 6 +++--- net/sctp/outqueue.c | 4 ++-- net/sctp/socket.c | 27 +++++++++++++++++++++------ net/sctp/stream.c | 16 ++++++++++++++++ 5 files changed, 50 insertions(+), 13 deletions(-) commit 1fdb8d8fefe2e7320ea15a65051758a4c4332f05 Author: Marcelo Ricardo Leitner Date: Tue Oct 3 19:20:10 2017 -0300 sctp: factor out stream->in allocation There is 1 place allocating it and another reallocating. Move such procedures to a common function. v2: updated changelog Tested-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/stream.c | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) commit e090abd0d81c7bdbf0c0ba2224624be2b15ded0d Author: Marcelo Ricardo Leitner Date: Tue Oct 3 19:20:09 2017 -0300 sctp: factor out stream->out allocation There is 1 place allocating it and 2 other reallocating. Move such procedures to a common function. Tested-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/stream.c | 52 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 20 deletions(-) commit 1ae2eaaa229bc350b6f38fbf4ab9c873532aecfb Author: Marcelo Ricardo Leitner Date: Tue Oct 3 19:20:08 2017 -0300 sctp: silence warns on sctp_stream_init allocations As SCTP supports up to 65535 streams, that can lead to very large allocations in sctp_stream_init(). As Xin Long noticed, systems with small amounts of memory are more prone to not have enough memory and dump warnings on dmesg initiated by user actions. Thus, silence them. Also, if the reallocation of stream->out is not necessary, skip it and keep the memory we already have. Reported-by: Xin Long Tested-by: Xin Long Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/stream.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit af14827fa38cfc592e04287dd83b32059bdca328 Merge: 6c55700 3e256ac Author: David S. Miller Date: Tue Oct 3 16:25:05 2017 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2017-10-03 This series contains updates to fm10k only. Jake provides majority of the changes in this series, starting with using fm10k_prepare_for_reset() if we lose PCIe link. Before we would detach the device and close the netdev, which left a lot of items still active, such as the Tx/Rx resources. This could cause problems where register reads would return potentially invalid values and would result in unknown driver behavior, so call fm10k_prepare_for_reset() much like we do for suspend/resume cycles. This will attempt to shutdown as much as possible to prevent possible issues. Then replaced the PCI specific legacy power management hooks with the new generic power management hooks for both suspend and hibernate. Introduced a workqueue item which monitors a queue of MAC and VLAN requests since a large number of MAC address or VLAN updates at once can overload the mailbox with too many messages at once. Fixed a cppcheck warning by properly declaring the min_rate and max_rate variables in the declaration and definition for .ndo_set_vf_bw, rather than using "unused" for the minimum rates. Joe Perches fixes the backward logic when using net_ratelimit(). ==================== Signed-off-by: David S. Miller commit 6c5570016b972d9b1f0f6c2dca9cc0422b1f92bf Author: Florian Westphal Date: Mon Oct 2 23:50:05 2017 +0200 net: core: decouple ifalias get/set from rtnl lock Device alias can be set by either rtnetlink (rtnl is held) or sysfs. rtnetlink hold the rtnl mutex, sysfs acquires it for this purpose. Add an extra mutex for it and use rcu to protect concurrent accesses. This allows the sysfs path to not take rtnl and would later allow to not hold it when dumping ifalias. Based on suggestion from Eric Dumazet. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller include/linux/netdevice.h | 8 +++++++- net/core/dev.c | 52 +++++++++++++++++++++++++++++++++++------------ net/core/net-sysfs.c | 17 ++++++++-------- net/core/rtnetlink.c | 13 ++++++++++-- 4 files changed, 65 insertions(+), 25 deletions(-) commit 4d2c0cda07448ea6980f00102dc3964eb25e241c Author: Mahesh Bandewar Date: Wed Sep 27 18:03:49 2017 -0700 bonding: speed/duplex update at NETDEV_UP event Some NIC drivers don't have correct speed/duplex settings at the time they send NETDEV_UP notification and that messes up the bonding state. Especially 802.3ad mode which is very sensitive to these settings. In the current implementation we invoke bond_update_speed_duplex() when we receive NETDEV_UP, however, ignore the return value. If the values we get are invalid (UNKNOWN), then slave gets removed from the aggregator with speed and duplex set to UNKNOWN while link is still marked as UP. This patch fixes this scenario. Also 802.3ad mode is sensitive to these conditions while other modes are not, so making sure that it doesn't change the behavior for other modes. Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 852f1a21ffae19a45d4944791ce574e92a2b31ab Author: Tom Saeger Date: Tue Oct 3 16:16:37 2017 -0500 docs: Update binfmt_misc links Documentation/binfmt_misc.txt moved to Documentation/admin-guide/binfmt-misc.rst Signed-off-by: Tom Saeger Signed-off-by: Jonathan Corbet Documentation/sysctl/README | 2 +- Documentation/sysctl/fs.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3ce62385019fbf7d2aea4fd7c73fbd0ddad5c8fd Author: Borislav Petkov Date: Tue Oct 3 17:54:07 2017 +0200 Documentation: Improve softlockup_panic= description text It should say what that range is and what that integer value means. I had to look at the code... Signed-off-by: Borislav Petkov [jc: changed non-null to nonzero] Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit d19cd4bb234383166801b5d46365282808d0c0e5 Author: Adam Borowski Date: Sat Sep 30 05:57:39 2017 +0200 Documentation/features/KASAN: mark KASAN as supported only on 64-bit on x86 Relevant part is: arch/x86/Kconfig: select HAVE_ARCH_KASAN if X86_64 && SPARSEMEM_VMEMMAP Signed-off-by: Adam Borowski Signed-off-by: Jonathan Corbet Documentation/features/debug/KASAN/arch-support.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4201d057ea91c3d6efd2db65219bc91fae413bc2 Author: Rob Herring Date: Tue Oct 3 11:37:04 2017 -0500 scripts/dtc: Update to upstream version v1.4.5-3-gb1a60033c110 This adds the following commits from upstream: b1a60033c110 tests: Add a test for overlays syntactic sugar 737b2df39cc8 overlay: Add syntactic sugar version of overlays 497432fd2131 checks: Use proper format modifier for size_t 22a65c5331c2 dtc: Bump version to v1.4.5 c575d8059fff Add fdtoverlay to .gitignore b6a6f9490d19 fdtoverlay: Sanity check blob size 8c1eb1526d2d pylibfdt: Use Python2 explicitly ee3d26f6960b checks: add interrupts property check c1e7738988f5 checks: add gpio binding properties check b3bbac02d5e3 checks: add phandle with arg property checks fe50bd1ecc1d fdtget: Split out cell list display into a new function 62d812308d11 README: Add a note about test_tree1.dts 5bed86aee9e8 pylibfdt: Add support for fdt_subnode_offset() 46f31b65b3b3 pylibfdt: Add support for fdt_node_offset_by_phandle() a3ae43723687 pylibfdt: Add support for fdt_parent_offset() a198af80344c pylibfdt: Add support for fdt_get_phandle() b9eba92ea50f tests: Return a failure code when any tests fail 155faf6cc209 pylibfdt: Use local pylibfdt module 50e5cd07f325 pylibfdt: Add a test for use of uint32_t ab78860f09f5 pylibfdt: Add stdint include to fix uint32_t 36f511fb1113 tests: Add stacked overlay tests on fdtoverlay 1bb00655d3e5 fdt: Allow stacked overlays phandle references a33c2247ac8d Introduce fdt_setprop_placeholder() method 0016f8c2aa32 dtc: change default phandles to ePAPR style instead of both e3b9a9588a35 tests: fdtoverlay unit test 42409146f2db fdtoverlay: A tool that applies overlays aae22722fc8d manual: Document missing options 13ce6e1c2fc4 dtc: fix sprintf() format string error, again d990b8013889 Makefile: Fix build on MSYS2 and Cygwin 51f56dedf8ea Clean up shared library compile/link options 21a2bc896e3d Suppress expected error message in fdtdump test 2a42b14d0d03 dtc: check.c fix compile error a10cb3c818d3 Fix get_node_by_path string equality check 548aea2c436a fdtdump: Discourage use of fdtdump c2258841a785 fdtdump: Fix over-zealous version check 9067ee4be0e6 Fix a few whitespace and style nits e56f2b07be38 pylibfdt: Use setup.py to build the swig file 896f1c133265 pylibfdt: Use Makefile constructs to implement NO_PYTHON 90db6d9989ca pylibfdt: Allow setup.py to operate stand-alone e20d9658cd8f Add Coverity Scan support b04a2cf08862 pylibfdt: Fix code style in setup.py 1c5170d3a466 pylibfdt: Rename libfdt.swig to libfdt.i 580a9f6c2880 Add a libfdt function to write a property placeholder ab15256d8d02 pylibfdt: Use the call function to simplify the Makefile 9f2e3a3a1f19 pylibfdt: Use the correct libfdt version in the module e91c652af215 pylibfdt: Enable installation of Python module 8a892fd85d94 pylibfdt: Allow building to be disabled 741cdff85d3e .travis.yml: Add builds with and without Python library prerequisites 14c4171f4f9a pylibfdt: Use package_dir to set the package directory 89a5062ab231 pylibfdt: Use environment to pass C flags and files 4e0e0d049757 pylibfdt: Allow pkg-config to be supplied in the environment 6afd7d9688f5 Correct typo: s/pylibgfdt/pylibfdt/ Signed-off-by: Rob Herring scripts/dtc/checks.c | 282 +++++++++++- scripts/dtc/dtc-lexer.lex.c_shipped | 10 +- scripts/dtc/dtc-parser.tab.c_shipped | 430 ++++++++--------- scripts/dtc/dtc-parser.y | 20 +- scripts/dtc/dtc.c | 2 +- scripts/dtc/dtc.h | 3 + scripts/dtc/libfdt/fdt_addresses.c | 96 ++++ scripts/dtc/libfdt/fdt_empty_tree.c | 1 - scripts/dtc/libfdt/fdt_overlay.c | 861 +++++++++++++++++++++++++++++++++++ scripts/dtc/libfdt/fdt_ro.c | 4 +- scripts/dtc/libfdt/fdt_rw.c | 24 +- scripts/dtc/libfdt/fdt_sw.c | 16 +- scripts/dtc/libfdt/fdt_wip.c | 4 +- scripts/dtc/libfdt/libfdt.h | 47 ++ scripts/dtc/livetree.c | 31 +- scripts/dtc/version_gen.h | 2 +- 16 files changed, 1603 insertions(+), 230 deletions(-) commit 4322323058f010274564006d61945187a15b6361 Author: Rob Herring Date: Sun Sep 24 18:27:25 2017 -0500 scripts/dtc: add fdt_overlay.c and fdt_addresses.c to sync script libfdt has gained some new files. We need to include them in the kernel's copy. Reported-by: Kyle Yan Signed-off-by: Rob Herring scripts/dtc/update-dtc-source.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6448c097c7cd0263961585b6247855154983093b Merge: 0c37c56 a7e4cfb Author: Rob Herring Date: Tue Oct 3 15:03:36 2017 -0500 Merge branch 'dt-printf-v2' into HEAD commit a7e4cfb0a7ca4773e7d0dd1d9c018ab27a15360e Author: Rob Herring Date: Thu Jun 1 18:01:47 2017 -0500 of/fdt: only store the device node basename in full_name With dependencies on a statically allocated full path name converted to use %pOF format specifier, we can store just the basename of node, and the unflattening of the FDT can be simplified. This commit will affect the remaining users of full_name. After analyzing these users, the remaining cases should only change some print messages. The main users of full_name are providing a name for struct resource. The resource names shouldn't be important other than providing /proc/iomem names. We no longer distinguish between pre and post 0x10 dtb formats as either a full path or basename will work. However, less than 0x10 formats have been broken since the conversion to use libfdt (and no one has cared). The conversion of the unflattening code to be non-recursive also broke pre 0x10 formats as the populate_node function would return 0 in that case. Signed-off-by: Rob Herring drivers/of/fdt.c | 69 +++++++++----------------------------------------------- 1 file changed, 11 insertions(+), 58 deletions(-) commit 06665989d2af86fd3cae14a0fbb4d8ecd2c5b6ee Author: Rob Herring Date: Tue Jul 25 16:10:06 2017 -0500 powerpc: pseries: only store the device node basename in full_name With dependencies on full_name containing the entire device node path removed, stop storing the full_name in nodes created by dlpar_configure_connector() and pSeries_reconfig_add_node(). Signed-off-by: Rob Herring Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org arch/powerpc/platforms/pseries/dlpar.c | 24 ++++++------------------ arch/powerpc/platforms/pseries/reconfig.c | 2 +- 2 files changed, 7 insertions(+), 19 deletions(-) commit fa2abb03637a55288b22082d3d679db4fe74112a Author: Ulrich Hecht Date: Fri Sep 29 15:08:53 2017 +0200 serial: sh-sci: Support for variable HSCIF hardware RX timeout HSCIF has facilities that allow changing the timeout after which an RX interrupt is triggered even if the FIFO is not filled. This patch allows changing the default (15 bits of silence) using the existing sysfs attribute "rx_fifo_timeout". Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sh-sci.c | 52 ++++++++++++++++++++++++++++++++------------- drivers/tty/serial/sh-sci.h | 3 +++ 2 files changed, 40 insertions(+), 15 deletions(-) commit 62fadbd8f798331d56fdadd3503dc09026ae8d1f Author: Gimcuan Hui Date: Mon Oct 2 22:48:17 2017 +0800 tty: serial: jsm: Add space before the open brace This patch fixes the checkpatch.pl error complain: ERROR: space required before the open brace '{' Signed-off-by: Gimcuan Hui Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/jsm/jsm_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c3897b1b0e3fffe964deb8b008da0623dfa2057 Author: Ji-Ze Hong (Peter Hong) Date: Tue Oct 3 11:08:35 2017 +0800 serial: 8250_fintek: fix warning reported from smatch This patch is fix the warning reported by smatch as following: drivers/tty/serial/8250/8250_fintek.c:294 fintek_8250_goto_highspeed() warn: inconsistent indenting Signed-off-by: Ji-Ze Hong (Peter Hong) Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_fintek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58178914ae5bad449d8e53e38c7171ec85ad2c9a Author: Ji-Ze Hong (Peter Hong) Date: Tue Oct 3 11:08:34 2017 +0800 serial: 8250_fintek: UART dynamic clocksource on Fintek F81216H The F81216H had 4 clocksource 1.8432/18.432/14.769/24MHzand baud rates can be up to 1.5Mbits with 24MHz. The register value and mask is the same with F81866. But F81866 register address is F2h, F81216H is F0h. We'll implements the dynamic clocksource in fintek_8250_set_termios(). Signed-off-by: Ji-Ze Hong (Peter Hong) Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_fintek.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) commit 195638b6d44f22c5fcbd428ebfe4b7c012c576f2 Author: Ji-Ze Hong (Peter Hong) Date: Tue Oct 3 11:08:33 2017 +0800 serial: 8250_fintek: UART dynamic clocksource on Fintek F81866 The F81866 had 4 clocksource 1.8432/18.432/14.769/24MHz and baud rates can be up to 1.5Mbits with 24MHz. We'll implements the dynamic clocksource in fintek_8250_set_termios(). Signed-off-by: Ji-Ze Hong (Peter Hong) Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_fintek.c | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 3b837fa233254c7f8e46fbb72e4c126774fdb635 Author: Allen Pais Date: Fri Sep 22 13:56:49 2017 +0530 drivers: tty: sa1100: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sa1100.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2876bb6d2c97eda0de00d4457d8fbb3067a41415 Author: Allen Pais Date: Fri Sep 22 13:56:52 2017 +0530 drivers: tty: ifx6x60: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/ifx6x60.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 0bf1e84ff00fe068833f0281fa3cfca1e5a40152 Author: Allen Pais Date: Fri Sep 22 13:56:51 2017 +0530 drivers: tty: sn_console: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/sn_console.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 65f8824f557b5f9abdf4548f2255e4acdd1d2328 Author: Allen Pais Date: Fri Sep 22 13:56:50 2017 +0530 drivers: tty: n_gsm: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/tty/n_gsm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9b363c83c6c4d791af8b57b8c38bc11e57bd0927 Author: Allen Pais Date: Fri Sep 22 13:56:47 2017 +0530 drivers: tty: pnx8xxx: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/pnx8xxx_uart.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 305615127a277ffae7e120b0d88dcbf3c91f4d3f Author: Allen Pais Date: Fri Sep 22 13:56:48 2017 +0530 drivers: tty: 8250: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/8250/8250_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 71fa527290660c5fc6bdc63bcb7de66af4f3895f Author: Allen Pais Date: Fri Sep 22 13:56:46 2017 +0530 drivers: tty: max3100: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/max3100.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a386ab2b286476f4e87b974f917ec80cb9b87cab Author: Allen Pais Date: Fri Sep 22 13:56:45 2017 +0530 drivers: tty: vcc: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/tty/vcc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 22b94d1d99a71e201b28f135b271cb63526f8bd1 Author: Allen Pais Date: Fri Sep 22 13:56:43 2017 +0530 drivers: tty: mux: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/mux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0f7bdbd2b3518e2698048bb5346b542e7cbb542a Author: Martyn Welch Date: Thu Sep 28 11:38:51 2017 +0100 serial: imx: Switch setting dma_is_txing from "false" to "0" The variable "dma_is_txing" is an unsigned int, set as either "0" or "1" in all but one location, where it is instead set to "false". For consistency, set dma_is_txing to "0" in this location too. Signed-off-by: Martyn Welch Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f654b23c173eb7081e1f5bd33710a53c11ea4b49 Author: Martyn Welch Date: Thu Sep 28 11:07:40 2017 +0100 serial: imx: Use RX_BUF_SIZE to set size of RX buffer The imx serial driver uses PAGE_SIZE when allocating rx_buf, but then uses RX_BUF_SIZE (which is currently defined as PAGE_SIZE) to describe the length of the buffer when initialising the scatter gather list. In order to ensure that this stays consistent, use RX_BUF_SIZE in both locations. Signed-off-by: Martyn Welch Acked-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4139fd76cd92b350114b102f1b40b02381b198cf Author: Romain Perier Date: Thu Sep 28 11:03:49 2017 +0100 serial: imx: only set dma_is_rxing when DMA starts The variable dma_is_rxing is currently set to 1 in imx_disable_rx_int(). This is problematic as: - whilst imx_disable_rx_int() is currently always called before start_rx_dma() this dependency isn't obvious. - start_rx_dma() does error checking and might exit without enabling DMA. Currently this will result in dma_is_rxing suggesting that DMA is being used for recieving. To avoid these issues, move the setting of dma_is_rxing to start_rx_dma() when appropriate. Signed-off-by: Romain Perier Signed-off-by: Martyn Welch Reviewed-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 177b508f3c7694647e94509a1ef3f5a139deac50 Author: Allen Pais Date: Fri Sep 22 13:56:44 2017 +0530 drivers: tty: imx: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Acked-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a0983c742a5885f82afb282166f83f1d3d8addf4 Author: Ian Jamison Date: Thu Sep 21 10:13:12 2017 +0200 serial: imx: Update cached mctrl value when changing RTS UART core function uart_update_mctrl relies on a cached value of modem control lines. This was used but not updated by local RTS control functions within imx.c. These are used for RS485 line driver enable signalling. Having an out-of-date value in the cached mctrl can result in the transmitter being enabled when it shouldn't be. Fix this by updating the mctrl value before applying it. Signed-off-by: Ian Jamison Origin: id:8195c96e674517b82a6ff7fe914c7ba0f86e702b.1505375165.git.ian.dev@arkver.com Acked-by: Uwe Kleine-König Tested-by: Uwe Kleine-König Tested-by: Clemens Gruber Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8b25deb18ba3f9b1af1ff9395b8de2bdb9d9fdbf Author: Sascha Hauer Date: Thu Sep 21 10:13:11 2017 +0200 serial: imx: Use common rs485 device tree parsing function This adds support for the rs485 specific properties defined in Documentation/devicetree/bindings/serial/rs485.txt. Signed-off-by: Sascha Hauer Signed-off-by: Uwe Kleine-König Forwarded: id:20170913081833.2740-7-u.kleine-koenig@pengutronix.de (v5) Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4672770d247806551de4aee6619d4f097eed155a Author: Rodrigo Vivi Date: Mon Oct 2 23:36:52 2017 -0700 drm/i915: Organize GLK_COLORS. Let's organize this in a way that it gets more obvious when looking to the platform colors and in a easier way to get inherited. v2: Add comma at the end (Jani), when possible. Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171003063652.17248-3-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_pci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 42a3ae88500e394a79b27f6ae9705580033f805d Author: Rodrigo Vivi Date: Mon Oct 2 23:36:51 2017 -0700 drm/i915: Organize GEN features inheritance. As Chris noticed the current organization is confusing and inheritance is not clear. So, let's split it in GEN_FEATURES _PLATFORM where new GEN inherit features from previous gens and Platforms only use gen features plus what ever is specific for that platform and shouldn't be passed on. Cc: Chris Wilson Signed-off-by: Rodrigo Vivi Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171003063652.17248-2-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_pci.c | 48 +++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 26 deletions(-) commit 4d6ef0da415124ebce578b1326f4e511e35d95f2 Author: Rodrigo Vivi Date: Mon Oct 2 23:36:50 2017 -0700 drm/i915/skl: Fix has_ipc on skl and document WaDisableIPC. According to Spec for SKL+: "Isochronous Priority Control. If enabled, Display sends demoted requests once the transition watermark is reached. If transition watermark is not enabled, Display sends demoted requests when the display buffer is full." The commit 'e57f1c02155f ("drm/i915/gen9+: Add has_ipc flag in device info structure")' introduced that as gen9+ but missing many SKL Skus. I believe the reason for that is Spec also mentions workarounds for SKL-ALL: "IPC (Isoch Priority Control) may cause underflows WA: Do not enable IPC in register ARB_CTL2" It seems lame to add the feature and forever disable it, but it will avoid a mistake of enabling it when we are reorganizing the feature definitions on i915_pci.c later. It will also allow us to probably extend that workaround for other platforms. Cc: Mahesh Kumar Cc: Maarten Lankhorst Cc: Chris Wilson Signed-off-by: Rodrigo Vivi Reviewed-by: Mahesh Kumar Link: https://patchwork.freedesktop.org/patch/msgid/20171003063652.17248-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/intel_pm.c | 6 ++++++ 2 files changed, 7 insertions(+) commit b5c7d4e54c9ab830e5c03f92377fe15cbae64d0d Author: Dan Carpenter Date: Tue Oct 3 13:53:41 2017 +0300 mlxsw: spectrum: Add missing error code on allocation failure We accidentally return success if the kmalloc_array() call fails. Fixes: 0e14c7777acb ("mlxsw: spectrum: Add the multicast routing hardware logic") Signed-off-by: Dan Carpenter Acked-by: Yotam Gigi Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b508e0b6e47c85a095ef056f3de6ba9d396c490c Author: Dan Carpenter Date: Tue Oct 3 13:53:03 2017 +0300 mlxsw: spectrum: Fix check for IS_ERR() instead of NULL mlxsw_afa_block_create() doesn't return error pointers, it returns NULL on error. Fixes: 0e14c7777acb ("mlxsw: spectrum: Add the multicast routing hardware logic") Signed-off-by: Dan Carpenter Acked-by: Yotam Gigi Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 360cc342c9037ed487adf07212000f69c0ffa14d Author: Colin Ian King Date: Tue Oct 3 11:46:33 2017 +0100 net: dsa: mt7530: make functions mt7530_phy_write static The function mt7530_phy_write is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warnings: symbol 'mt7530_phy_write' was not declared. Should it be static? Signed-off-by: Colin Ian King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/mt7530.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 161ae6b04d5da0de518ea600d8fffe61208e243c Author: Colin Ian King Date: Tue Oct 3 11:39:18 2017 +0100 net: dsa: lan9303: make functions lan9303_mdio_phy_{read|write} static The functions lan9303_mdio_phy_write and lan9303_mdio_phy_read are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'lan9303_mdio_phy_write' was not declared. Should it be static? symbol 'lan9303_mdio_phy_read' was not declared. Should it be static? Signed-off-by: Colin Ian King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/dsa/lan9303_mdio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit da885b614ad32d65ca6a718e192e23aa0447da7e Merge: a047fba f60c254 Author: David S. Miller Date: Tue Oct 3 10:06:31 2017 -0700 Merge branch 'mlxsw-mc-route-offload' Jiri Pirko says: ==================== mlxsw: Add support for partial multicast route offload Yotam says: Previous patchset introduced support for offloading multicast MFC routes to the Spectrum hardware. As described in that patchset, no partial offloading is supported, i.e if a route has one output interface which is not a valid offloadable device (e.g. pimreg device, dummy device, management NIC), the route is trapped to the CPU and the forwarding is done in slow-path. Add support for partial offloading of multicast routes, by letting the hardware to forward the packet to all the in-hardware devices, while the kernel ipmr module will continue forwarding to all other interfaces. Similarly to the bridge, the kernel ipmr module will forward a marked packet to an interface only if the interface has a different parent ID than the packet's ingress interfaces. The first patch introduces the offload_mr_fwd_mark skb field, which can be used by offloading drivers to indicate that a packet had already gone through multicast forwarding in hardware, similarly to the offload_fwd_mark field that indicates that a packet had already gone through L2 forwarding in hardware. Patches 2 and 3 change the ipmr module to not forward packets that had already been forwarded by the hardware, i.e. packets that are marked with offload_mr_fwd_mark and the ingress VIF shares the same parent ID with the egress VIF. Patches 4, 5, 6 and 7 add the support in the mlxsw Spectrum driver for trap and forward routes, while marking the trapped packets with the offload_mr_fwd_mark. ==================== Signed-off-by: David S. Miller commit f60c254998de80feaec8e4122960ab64e8045214 Author: Yotam Gigi Date: Tue Oct 3 09:58:12 2017 +0200 mlxsw: spectrum: mr: Support trap-and-forward routes Add the support of trap-and-forward route action in the multicast routing offloading logic. A route will be set to trap-and-forward action if one (or more) of its output interfaces is not offload-able, i.e. does not have a valid Spectrum RIF. This way, a route with mixed output VIFs list, which contains both offload-able and un-offload-able devices can go through partial offloading in hardware, and the rest will be done in the kernel ipmr module. 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_mr.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 607feadef89ac806df5a0be983afef77247e1541 Author: Yotam Gigi Date: Tue Oct 3 09:58:11 2017 +0200 mlxsw: spectrum: mr_tcam: Add trap-and-forward multicast route In addition to the current multicast route actions, which include trap route action and a forward route action, add the trap-and-forward multicast route action, and implement it in the multicast routing hardware logic. To implement that, add a trap-and-forward ACL action as the last action in the route flexible action set. The used trap is the ACL2 trap, which marks the packets with offload_mr_forward_mark, to prevent the packet from being forwarded again by the kernel. Note: At that stage the offloading logic does not support trap-and-forward multicast routes. This patch adds the support only in the hardware logic. 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_mr.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.c | 8 ++++++++ 2 files changed, 9 insertions(+) commit a0040c8c935548e1efb1a28f07f15d7ec7918055 Author: Yotam Gigi Date: Tue Oct 3 09:58:10 2017 +0200 mlxsw: spectrum: Add trap for multicast trap-and-forward routes When a multicast route is configured with trap-and-forward action, the packets should be marked with skb->offload_mr_fwd_mark, in order to prevent the packets from being forwarded again by the kernel ipmr module. Due to this, it is not possible to use the already existing multicast trap (MLXSW_TRAP_ID_ACL1) as the packet should be marked differently. Add the MLXSW_TRAP_ID_ACL2 which is for trap-and-forward multicast routes, and set the offload_mr_fwd_mark skb field in its handler. 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 | 13 +++++++++++++ drivers/net/ethernet/mellanox/mlxsw/trap.h | 2 ++ 2 files changed, 15 insertions(+) commit 267872435515185e2e600a721fdddeea90f96ffa Author: Yotam Gigi Date: Tue Oct 3 09:58:09 2017 +0200 mlxsw: acl: Introduce ACL trap and forward action Use trap/discard flex action to implement trap and forward. The action will later be used for multicast routing, as the multicast routing mechanism is done using ACL flexible actions in Spectrum hardware. Using that action, it will be possible to implement a trap-and-forward route. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c | 17 +++++++++++++++++ .../net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h | 2 ++ 2 files changed, 19 insertions(+) commit a5bc9294d70fe85729bb343eef281ccbe78ff119 Author: Yotam Gigi Date: Tue Oct 3 09:58:08 2017 +0200 ipv4: ipmr: Don't forward packets already forwarded by hardware Change the ipmr module to not forward packets if: - The packet is marked with the offload_mr_fwd_mark, and - Both input interface and output interface share the same parent ID. This way, a packet can go through partial multicast forwarding in the hardware, where it will be forwarded only to the devices that share the same parent ID (AKA, reside inside the same hardware). The kernel will forward the packet to all other interfaces. To do this, add the ipmr_offload_forward helper, which per skb, ingress VIF and egress VIF, returns whether the forwarding was offloaded to hardware. The ipmr_queue_xmit frees the skb and does not forward it if the result is a true value. All the forwarding path code compiles out when the CONFIG_NET_SWITCHDEV is not set. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/ipv4/ipmr.c | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) commit 5d8b3e69fc5e5ccafc9db1251bb7c78a8622fddd Author: Yotam Gigi Date: Tue Oct 3 09:58:07 2017 +0200 ipv4: ipmr: Add the parent ID field to VIF struct In order to allow the ipmr module to do partial multicast forwarding according to the device parent ID, add the device parent ID field to the VIF struct. This way, the forwarding path can use the parent ID field without invoking switchdev calls, which requires the RTNL lock. When a new VIF is added, set the device parent ID field in it by invoking the switchdev_port_attr_get call. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/mroute.h | 1 + net/ipv4/ipmr.c | 11 +++++++++++ 2 files changed, 12 insertions(+) commit abf4bb6b63d0a54266f8e7eff3720c1974063971 Author: Yotam Gigi Date: Tue Oct 3 09:58:06 2017 +0200 skbuff: Add the offload_mr_fwd_mark field Similarly to the offload_fwd_mark field, the offload_mr_fwd_mark field is used to allow partial offloading of MFC multicast routes. Switchdev drivers can offload MFC multicast routes to the hardware by registering to the FIB notification chain. When one of the route output interfaces is not offload-able, i.e. has different parent ID, the route cannot be fully offloaded by the hardware. Examples to non-offload-able devices are a management NIC, dummy device, pimreg device, etc. Similar problem exists in the bridge module, as one bridge can hold interfaces with different parent IDs. At the bridge, the problem is solved by the offload_fwd_mark skb field. Currently, when a route cannot go through full offload, the only solution for a switchdev driver is not to offload it at all and let the packet go through slow path. Using the offload_mr_fwd_mark field, a driver can indicate that a packet was already forwarded by hardware to all the devices with the same parent ID as the input device. Further patches in this patch-set are going to enhance ipmr to skip multicast forwarding to devices with the same parent ID if a packets is marked with that field. The reason why the already existing "offload_fwd_mark" bit cannot be used is that a switchdev driver would want to make the distinction between a packet that has already gone through L2 forwarding but did not go through multicast forwarding, and a packet that has already gone through both L2 and multicast forwarding. For example: when a packet is ingressing from a switchport enslaved to a bridge, which is configured with multicast forwarding, the following scenarios are possible: - The packet can be trapped to the CPU due to exception while multicast forwarding (for example, MTU error). In that case, it had already gone through L2 forwarding in the hardware, thus A switchdev driver would want to set the skb->offload_fwd_mark and not the skb->offload_mr_fwd_mark. - The packet can also be trapped due to a pimreg/dummy device used as one of the output interfaces. In that case, it can go through both L2 and (partial) multicast forwarding inside the hardware, thus a switchdev driver would want to set both the skb->offload_fwd_mark and skb->offload_mr_fwd_mark. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/linux/skbuff.h | 1 + 1 file changed, 1 insertion(+) commit a047fbae23e1d94da28f81fb0f86fab4e473a094 Author: Arjun Vynipadath Date: Tue Oct 3 11:43:05 2017 +0530 cxgb4: Update comment for min_mtu We have lost a comment for minimum mtu value set for netdevice with 'commit d894be57ca92 ("ethernet: use net core MTU range checking in more drivers"). Updating it accordingly. Signed-off-by: Arjun Vynipadath Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e9e95df06433b4f89cfeef0003af091ee0ebc86 Author: Kuninori Morimoto Date: Mon Oct 2 07:37:32 2017 +0000 ASoC: rcar: skip disabled-SSI nodes The current device tree representation of the R-Car SSI assumes that they are numbered consecutively, starting from 0. Alas, this is not the case with the R8A77995 (D3) SoC which SSI1/SSI2 aren't present. In order to keep the existing device trees working, I'm suggesting to use a disabled node for SSI0/SSI1. Teach the SSI probe to just skip disabled nodes. Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown sound/soc/sh/rcar/ssi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit a1652bb8a01c1a830cacbe958aec17f880cc1e47 Author: Jean Delvare Date: Tue Oct 3 11:47:27 2017 +0200 x86/boot: Spell out "boot CPU" for BP It's not obvious to everybody that BP stands for boot processor. At least it was not for me. And BP is also a CPU register on x86, so it is ambiguous. Spell out "boot CPU" everywhere instead. Signed-off-by: Jean Delvare Cc: Alok Kataria Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar arch/x86/include/asm/mpspec_def.h | 2 +- arch/x86/kernel/apic/apic.c | 2 +- arch/x86/kernel/cpu/common.c | 4 ++-- arch/x86/kernel/setup.c | 2 +- arch/x86/kernel/smpboot.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) commit 3e6c508693e0a5d3db80d6149d6a51e921051c8e Author: Joaquin Garmendia Cabrera Date: Sun Oct 1 12:47:20 2017 -0500 staging: android: TODO: Removing an invalid issue The first line of TODO is invalid because no file has an error or warning when running checkpatch.pl Signed-off-by: Joaquin Garmendia Cabrera Signed-off-by: Greg Kroah-Hartman drivers/staging/android/TODO | 1 - 1 file changed, 1 deletion(-) commit 302985467f3100c7cd5bcbd3efcea5bfd50a60f2 Author: Arvind Yadav Date: Tue Oct 3 17:13:26 2017 +0530 staging: rtlwifi: pr_err() strings should end with newlines pr_err() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c | 6 +++--- drivers/staging/rtlwifi/rtl8822be/phy.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit ada6b10b5bdc4b13297178f6b3a769528585a001 Author: Arvind Yadav Date: Tue Oct 3 17:13:25 2017 +0530 staging: bcm2835-camera: pr_err() strings should end with newlines pr_err() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe5625b39658fcc7ba49ba5cbfd23b8237dce59f Author: Arvind Yadav Date: Tue Oct 3 17:13:23 2017 +0530 staging: gs_fpgaboot: pr_err() strings should end with newlines pr_err() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav Signed-off-by: Greg Kroah-Hartman drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9fd63ea2b027dc14e6f91871be7ed8de2ffa2b1 Author: Colin Ian King Date: Mon Oct 2 22:51:49 2017 +0100 staging: rtlwifi: make various structures static The structures created from macros RTL_DEBUG_IMPL_MAC_SERIES, RTL_DEBUG_IMPL_BB_SERIES, RTL_DEBUG_IMPL_RF_SERIES and RTL_DEBUG_IMPL_CAM_SERIES are all local to the source and do not need to be in global scope, so make them static. Cleans up 37 sparse warnings of the form: symbol 'rtl_debug_priv_mac_0' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/debug.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit cfc70e7c608f8fea8f5183172f11096da08b1f4a Author: Dan Carpenter Date: Fri Sep 29 10:51:17 2017 +0300 staging: rtlwifi: silence underflow warning I'm not totally certain that it's necessary to put an upper limit here. I think it happens at lower levels. But if we are going to do that then we should have a lower bound as well. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6e6c6dee6a49cedf5e758465fea33a104f1bb279 Author: Christophe JAILLET Date: Fri Sep 22 22:06:50 2017 +0200 staging: rtl8192u: Fix some error handling path If 'rtl8192_usb_initendpoints()' fails, it may have allocated some resources that need to be freed. The corresponding is propagated up to 'rtl8192_usb_prob()'. So, in this function if an error code is returned by 'rtl8192_init()' we should call 'rtl8192_usb_deleteendpoints()'. Some error handling code is also duplicated in 'rtl8192_init()' and in 'rtl8192_usb_prob()'. This looks harmless because the freed pointers are set to NULL but it looks confusing. Fix all that by just moving the 'fail' label and removing duplicated error handling code from 'rtl8192_ini()'. All this resources freeing will be handled by 'rtl8192_usb_prob()' directly. The calling graph is: rtl8192_usb_probe --> rtl8192_init --> rtl8192_usb_initendpoints Signed-off-by: Christophe JAILLET Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 5fef87cbbf422e0f6792ac9c8536fd6aa795f1f4 Author: Christophe JAILLET Date: Fri Sep 22 21:35:53 2017 +0200 staging: rtl8192u: Check some memory allocation failure If one of these memory allocations fail, a NULL pointer dereference will occur later on. Return -ENOMEM instead. There is no need to free the resources already allocated, this is done by the caller (i.e. 'rtl8192_usb_probe()') which calls 'rtl8192_usb_deleteendpoints()'. The calling graph is: rtl8192_usb_probe --> rtl8192_init --> rtl8192_usb_initendpoints Signed-off-by: Christophe JAILLET Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_core.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1ce72e8ac57a999c2864249567fc313a0def60c9 Author: Colin Ian King Date: Fri Sep 22 16:20:18 2017 +0100 staging: rtl8192e: make const array broadcast_addr static, reduces object code size Don't populate const array broadcast_addr on the stack, instead make it static. Makes the object code smaller by over 40 bytes: Before: text data bss dec hex filename 63906 8248 1216 73370 11e9a rtllib_softmac.o After: text data bss dec hex filename 63806 8304 1216 73326 11e6e rtllib_softmac.o (gcc 6.3.0, x86-64) Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192e/rtllib_softmac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4af8dd1e31ec4df5d738d2a51c9df338f1a64bda Author: Bhumika Goyal Date: Sat Sep 30 21:56:35 2017 +0530 staging: rtl8192u: make r8192_wx_handlers_def structure const Make this const as it is only stored in a const field of a pci_dev structure. Make the declaration in the header const too. Structure found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/r8192U_wx.c | 2 +- drivers/staging/rtl8192u/r8192U_wx.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 60db8d10ee3339840d88e57605276bb568af6031 Author: Jérémy Lefaure Date: Sun Oct 1 15:30:55 2017 -0400 staging: rtl8723bs: use ARRAY_SIZE Using the ARRAY_SIZE macro improves the readability of the code. Also, it is not always useful to use a variable to store this constant calculated at compile time. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 5 +- drivers/staging/rtl8723bs/core/rtw_rf.c | 7 +-- drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c | 9 ++- drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c | 4 +- drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c | 7 +-- drivers/staging/rtl8723bs/hal/hal_com.c | 4 +- drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 69 +++++++++++++++-------- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 11 ++-- 8 files changed, 68 insertions(+), 48 deletions(-) commit 2595587d7e227a9181750110f50e02a2511821dd Author: Jérémy Lefaure Date: Sun Oct 1 15:30:56 2017 -0400 staging: rtlwifi: use ARRAY_SIZE Using the ARRAY_SIZE macro improves the readability of the code. Also, it is useless to use a variable to store this constant calculated at compile time. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/phydm/phydm_debug.c | 4 ++-- drivers/staging/rtlwifi/phydm/rtl8822b/halhwimg8822b_bb.c | 10 ++++------ drivers/staging/rtlwifi/phydm/rtl8822b/halhwimg8822b_mac.c | 4 ++-- drivers/staging/rtlwifi/phydm/rtl8822b/halhwimg8822b_rf.c | 13 +++++-------- 4 files changed, 13 insertions(+), 18 deletions(-) commit 8dabf52ffb6445fa5bcc8b6d2ecb615f60d0dd12 Author: Ioana Radulescu Date: Thu Sep 28 09:10:33 2017 -0500 staging: fsl-mc/dpio: Fix incorrect comparison For some dpio functions, a cpu id parameter value of -1 is valid and means "any". But when trying to validate this param value against an upper limit, in this case num_possible_cpus(), we risk obtaining the wrong result due to an implicit cast. Avoid an incorrect check result by explicitly comparing the cpu id with the "any" value before verifying the upper bound. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 4 ++-- drivers/staging/fsl-mc/include/dpaa2-io.h | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 46d69e141d479585c105a4d5b2337cd2ce6967e5 Author: Nicolas Dechesne Date: Tue Oct 3 11:49:51 2017 +0200 ASoC: codecs: msm8916-wcd-analog: 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 snd_soc_msm8916_analog | grep alias $ After this patch: $ modinfo snd_soc_msm8916_analog | grep alias alias: of:N*T*Cqcom,pm8916-wcd-analog-codecC* alias: of:N*T*Cqcom,pm8916-wcd-analog-codec Signed-off-by: Nicolas Dechesne Signed-off-by: Mark Brown sound/soc/codecs/msm8916-wcd-analog.c | 2 ++ 1 file changed, 2 insertions(+) commit 4b50239a769e78bbe362fc92c3f8bd5415a4a5f5 Merge: a47ba4d f6a9820 Author: Ingo Molnar Date: Tue Oct 3 18:30:24 2017 +0200 Merge tag 'perf-core-for-mingo-4.15-20171003' 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: - Multithread the synthesizing of PERF_RECORD_ events for pre-existing threads in 'perf top', speeding up that phase, greatly improving the user experience in systems such as Intel's Knights Mill (Kan Liang) - 'perf test' fixes for the perf_event_attr test case (Jiri Olsa, Thomas Richter) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit abd4b78793d12691380f95bf620d47f20259b44d Author: Suniel Mahesh Date: Fri Sep 22 10:12:21 2017 +0530 staging: ccree: else is not generally useful after a break or return Fixes checkpatch warnings: WARNING: else is not generally useful after a break or return Signed-off-by: Suniel Mahesh Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_request_mgr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 553aff5f1b174749705b9a3c4715c0f8e3805644 Author: Gilad Ben-Yossef Date: Tue Oct 3 11:42:17 2017 +0100 staging: ccree: simplify OOM handling Simplify handling of memory allocation failures and remove redundant log messages Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_cipher.c | 11 ++++------ drivers/staging/ccree/ssi_driver.c | 1 - drivers/staging/ccree/ssi_hash.c | 42 +++++++++++++----------------------- drivers/staging/ccree/ssi_ivgen.c | 9 +++----- drivers/staging/ccree/ssi_sram_mgr.c | 23 ++++---------------- 5 files changed, 26 insertions(+), 60 deletions(-) commit bdd0873dc28d57651ae2ed4e42bb79526ed684ac Author: Gilad Ben-Yossef Date: Tue Oct 3 11:42:16 2017 +0100 staging: ccree: move to generic device log infra Move over from using macro wrappers around to printk to dev_err, dev_dbg and friends and clean up resulting fallout. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 226 ++++++++++-------- drivers/staging/ccree/ssi_buffer_mgr.c | 394 +++++++++++++++----------------- drivers/staging/ccree/ssi_buffer_mgr.h | 5 +- drivers/staging/ccree/ssi_cipher.c | 138 +++++------ drivers/staging/ccree/ssi_driver.c | 142 +++++------- drivers/staging/ccree/ssi_driver.h | 13 -- drivers/staging/ccree/ssi_fips.c | 12 +- drivers/staging/ccree/ssi_hash.c | 297 ++++++++++++------------ drivers/staging/ccree/ssi_ivgen.c | 13 +- drivers/staging/ccree/ssi_pm.c | 15 +- drivers/staging/ccree/ssi_request_mgr.c | 87 +++---- drivers/staging/ccree/ssi_sram_mgr.c | 16 +- drivers/staging/ccree/ssi_sysfs.c | 3 +- 13 files changed, 688 insertions(+), 673 deletions(-) commit a55ef6f52fdd5a4538dc140903416361d156c548 Author: Gilad Ben-Yossef Date: Tue Oct 3 11:42:15 2017 +0100 staging: ccree: simplify access to struct device Introduce a function to retrieve struct device from private data structure in preparation to replacing custom logging macros with proper dev_dbg and friends which require struct device. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 11 ++++--- drivers/staging/ccree/ssi_buffer_mgr.c | 14 ++++----- drivers/staging/ccree/ssi_cipher.c | 13 +++----- drivers/staging/ccree/ssi_driver.c | 22 +++++++------- drivers/staging/ccree/ssi_driver.h | 6 ++++ drivers/staging/ccree/ssi_hash.c | 53 ++++++++++++++++----------------- drivers/staging/ccree/ssi_pm.c | 15 +++++----- drivers/staging/ccree/ssi_request_mgr.c | 24 ++++++++------- 8 files changed, 78 insertions(+), 80 deletions(-) commit 613fa6f1d3d5ce95585a01e0d60e4464a1559194 Author: Gilad Ben-Yossef Date: Tue Oct 3 11:42:14 2017 +0100 staging: ccree: remove sysfs if of deleted code The ccree cycle count mechanism was removed in commit 7f821f0c6ffa ("staging: ccree: remove cycle count debug support") but the sysfs interface lingered on. Remove it now. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_sysfs.c | 266 -------------------------------------- 1 file changed, 266 deletions(-) commit ac5f9de6d95e36f7373dbd4db45a4508dc57571d Author: Srishti Sharma Date: Sat Sep 30 06:26:55 2017 +0530 Staging: rtl8188eu: core: Use list_entry instead of container_of For variables that have type struct list_head* use list_entry to access current list element instead of using container_of. Done using the following semantic patch by coccinelle. @r@ identifier e; struct list_head* l; @@ <... when != l == NULL l; ...> ( e= -container_of +list_entry ( ...) ) Signed-off-by: Srishti Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_recv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit f3139e62142999e5dd98c7201cf66b804d3989ed Author: Mihaela Muraru Date: Fri Sep 29 22:37:42 2017 +0300 staging: rtl8188eu: Place the constant on the right side in comparisons Move constant to the right side of comparison operator. Issue found by checkpatch.pl Signed-off-by: Mihaela Muraru Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 574a5998cc86345d0025de2a669130ebaf704a8f Author: Mihaela Muraru Date: Mon Oct 2 05:14:15 2017 -0700 staging: rtl8188eu: Remove braces from single statement blocks This patch fix a coding style issue, by removing braces {} from single statement blocks. Issue found by checkpatch.pl. Signed-off-by: Mihaela Muraru Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/phy.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit ffcace893d83c1bd9a52a708feb0105c38866085 Author: Keerthi Reddy Date: Mon Oct 2 21:01:17 2017 +0530 staging: lustre: use BIT macro This commit changes changes left shift operator to use BIT macro Signed-off-by: Keerthi Reddy Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman .../staging/lustre/include/linux/lnet/lib-types.h | 28 ++++++++++------------ 1 file changed, 13 insertions(+), 15 deletions(-) commit 8eb1f34c1cd82af262ef1602d2a328e2a5c6cd47 Author: Shreeya Patel Date: Sun Oct 1 13:11:20 2017 +0530 Staging: rtl8723bs: Remove unnecessary comments Remove unnecessary comments which are there to explain why call to memset is in comments. Both of the comments are not needed as they are not very useful. Signed-off-by: Shreeya Patel Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme.c | 3 --- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 3 --- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 2 -- drivers/staging/rtl8723bs/core/rtw_recv.c | 4 ---- drivers/staging/rtl8723bs/core/rtw_xmit.c | 3 --- 5 files changed, 15 deletions(-) commit f290d491b59c55bec43003648a4df1a64e6292f6 Author: Mihaela Muraru Date: Mon Oct 2 04:15:11 2017 -0700 staging: sm750fb: Remove typedef struct _dvi_ctrl_device_t This patch removes typedef from struct and renames it from "_dvi_ctrl_device_t" to "dvi_ctrl_device" as per kernel coding standards. Issue found by checpatch.pl Signed-off-by: Mihaela Muraru Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_dvi.c | 4 ++-- drivers/staging/sm750fb/ddk750_dvi.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 60d379e12916ebed0370dd16ee417a56085db1d4 Author: Keerthi Reddy Date: Mon Oct 2 15:02:03 2017 +0530 staging: sm750fb: remove typedef for enum in ddk750_sii164.{c,h} Removing this will make sure that we are actually working with enum. Also it is not a good coding style to use typedef. In this commit remove typedef and also drop '_t' which traditionally means typedef Signed-off-by: Keerthi Reddy Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_sii164.c | 3 ++- drivers/staging/sm750fb/ddk750_sii164.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 3ec58059d16ba2a9e47c697546e5cb92dbf4f10a Author: Keerthi Reddy Date: Mon Oct 2 15:01:14 2017 +0530 Staging: sm750fb: remove typedef for enum in ddk750_power.{c,h} Using typedef will hide that 'DPMS_t' is enum. Removing this will make sure that we are actually working with enum. Also it is not a good coding style to use typedef In this commit remove typedef and lowercaser the name 'DPMS_t'. And also drop '_t' which traditionally means typedef. Signed-off-by: Keerthi Reddy Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/ddk750_power.c | 2 +- drivers/staging/sm750fb/ddk750_power.h | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) commit 3e256ac5b1ec307e5dd5a4c99fbdbc651446c738 Author: Jacob Keller Date: Fri Aug 11 11:14:58 2017 -0700 fm10k: fix mis-ordered parameters in declaration for .ndo_set_vf_bw We've had support for setting both a minimum and maximum bandwidth via .ndo_set_vf_bw since commit 883a9ccbae56 ("fm10k: Add support for SR-IOV to driver", 2014-09-20). Likely because we do not support minimum rates, the declaration mis-ordered the "unused" parameter, which causes warnings when analyzed with cppcheck. Fix this warning by properly declaring the min_rate and max_rate variables in the declaration and definition (rather than using "unused"). Also rename "rate" to max_rate so as to clarify that we only support setting the maximum rate. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k.h | 4 ++-- drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) commit 87be98927eb0bfa5484dfbe5ba2f6b7f91dd9187 Author: Jacob Keller Date: Fri Aug 11 11:14:37 2017 -0700 fm10k: prefer %s and __func__ for diagnostic prints Don't hard code the function names in the diagnostic output when these reset related routines fail. Instead, use %s and __func__ so that future refactors don't need to change the print outs. Additionally, while we are here, add missing function header comments for the new reset_prepare and reset_done function handlers. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit c0ad8ef3df091ef179d78dccb810024612dcfa44 Author: Joe Perches Date: Fri Aug 11 09:17:15 2017 -0700 fm10k: Fix misuse of net_ratelimit() Correct the backward logic using !net_ratelimit() Miscellanea: o Add a blank line before the error return label Signed-off-by: Joe Perches Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ef57ab791c81b3a83c75a312b15b42f7440bb425 Author: Jacob Keller Date: Mon Jul 10 13:23:19 2017 -0700 fm10k: bump version number Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f5c27e52857c9ba8f1ee4ed5093bee1a341f330 Author: Jacob Keller Date: Mon Jul 10 13:23:18 2017 -0700 fm10k: use the MAC/VLAN queue for VF<->PF MAC/VLAN requests Now that we have a working MAC/VLAN queue for handling MAC/VLAN messages from the netdev, replace the default handler for the VF<->PF messages. This new handler is very similar to the default code, but uses the MAC/VLAN queue instead of sending the message directly. Unfortunately we can't easily re-use the default code, so we'll just replace the entire function. This ensures that a VF requesting a large number of VLANs or MAC addresses does not start a reset cycle, as explained in the commit which introduced the message queue. Signed-off-by: Jacob Keller Reviewed-by: Ngai-mint Kwan Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 132 ++++++++++++++++++++++++++- drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 2 +- drivers/net/ethernet/intel/fm10k/fm10k_pf.h | 3 +- 3 files changed, 133 insertions(+), 4 deletions(-) commit fc9173682dcf73cfe3324267424ef17e854bb444 Author: Jacob Keller Date: Mon Jul 10 13:23:17 2017 -0700 fm10k: introduce a message queue for MAC/VLAN messages Under some circumstances, when dealing with a large number of MAC address or VLAN updates at once, the fm10k driver, particularly the VFs can overload the mailbox with too many messages at once. This results in a mailbox timeout, which causes the driver to initiate a reset. During the reset, we re-send all the same messages that originally caused the timeout. This results in a cycle of resets each triggering a future reset. To fix or avoid this, we introduce a workqueue item which monitors a queue of MAC and VLAN requests. These requests are queued to the end of the list, and we process as a FIFO periodically. Initially we only handle requests for the netdev, but we do handle unicast MAC addresses, multicast MAC addresses, and update VLAN requests. A future patch will add support to use this queue for handling MAC update requests from the VF<->PF mailbox. The MAC/VLAN work item will keep checking to make sure that each request does not overflow the mailbox and cause a timeout. If it might, then the work item will reschedule itself a short time later. This avoids any reset cycle, since we never send the message if the mailbox is not ready. As an alternative, we tried increasing the mailbox message FIFO, but this just delays the problem and results in needless memory waste on the system. Our new message queue is dynamically allocated so only uses as much memory as it needs. Additionally, it need not be contiguous like the Tx and Rx FIFOs. Note that this patch chose to only create a queue for MAC and VLAN messages, since these are the only messages sent in a large enough volume to cause the reset loop. Other messages are very unlikely to overflow the mailbox Tx FIFO so easily. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k.h | 39 +++++ drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 199 ++++++++++++++++++----- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 201 ++++++++++++++++++++++++ 3 files changed, 397 insertions(+), 42 deletions(-) commit 8249c47c6ba48cd3eba7c3ca7f8e733ee815c39b Author: Jacob Keller Date: Mon Jul 10 13:23:16 2017 -0700 fm10k: use generic PM hooks instead of legacy PCIe power hooks Replace the PCI specific legacy power management hooks with the new generic power management hooks which work properly for both suspend and hibernate. The new generic system is better and properly handles the lower level PCIe power management rather than forcing the driver to handle it. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 67 +++++++++------------------- 1 file changed, 22 insertions(+), 45 deletions(-) commit b4fcd43661df0d84cc4e030ab7a26533114889b9 Author: Jacob Keller Date: Mon Jul 10 13:23:15 2017 -0700 fm10k: use spinlock to implement mailbox lock Lets not re-invent the locking wheel. Remove our bitlock and use a proper spinlock instead. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k.h | 15 +++++---------- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 3 +++ 2 files changed, 8 insertions(+), 10 deletions(-) commit 0b40f457488d966878eec413a91f27d9b21e6ce5 Author: Jacob Keller Date: Mon Jul 10 13:23:14 2017 -0700 fm10k: prepare_for_reset() when we lose PCIe Link If we lose PCIe link, such as when an unannounced PFLR event occurs, or when a device is surprise removed, we currently detach the device and close the netdev. This unfortunately leaves a lot of things still active, such as the msix_mbx_pf IRQ, and Tx/Rx resources. This can cause problems because the register reads will return potentially invalid values which may result in unknown driver behavior. Begin the process of resetting using fm10k_prepare_for_reset(), much in the same way as the suspend and resume cycle does. This will attempt to shutdown as much as possible, in order to prevent possible issues. A naive implementation for this has issues, because there are now multiple flows calling the reset logic and setting a reset bit. This would cause problems, because the "re-attach" routine might call fm10k_handle_reset() prior to the reset actually finishing. Instead, we'll add state bits to indicate which flow actually initiated the reset. For the general reset flow, we'll assume that if someone else is resetting that we do not need to handle it at all, so it does not need its own state bit. For the suspend case, we will simply issue a warning indicating that we are attempting to recover from this case when resuming. For the detached subtask, we'll simply refuse to re-attach until we've actually initiated a reset as part of that flow. Finally, we'll stop attempting to manage the mailbox subtask when we're detached, since there's nothing we can do if we don't have a PCIe address. Overall this produces a much cleaner shutdown and recovery cycle for a PCIe surprise remove event. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k.h | 2 + drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 103 ++++++++++++++++++++------- 2 files changed, 79 insertions(+), 26 deletions(-) commit 9c9883744dda1cc38339a448dd8435140537027e Author: Christoph Hellwig Date: Tue Oct 3 10:47:00 2017 +0200 block: move __elv_next_request to blk-core.c No need to have this helper inline in a header. Also drop the __ prefix. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-core.c | 42 ++++++++++++++++++++++++++++++++++++++++-- block/blk.h | 39 --------------------------------------- 2 files changed, 40 insertions(+), 41 deletions(-) commit 7cb04004fa371a626c1a5ebe6d977f70285759ed Author: Paolo Valente Date: Thu Sep 21 11:04:03 2017 +0200 block, bfq: decrease burst size when queues in burst exit If many queues belonging to the same group happen to be created shortly after each other, then the concurrent processes associated with these queues have typically a common goal, and they get it done as soon as possible if not hampered by device idling. Examples are processes spawned by git grep, or by systemd during boot. As for device idling, this mechanism is currently necessary for weight raising to succeed in its goal: privileging I/O. In view of these facts, BFQ does not provide the above queues with either weight raising or device idling. On the other hand, a burst of queue creations may be caused also by the start-up of a complex application. In this case, these queues need usually to be served one after the other, and as quickly as possible, to maximise responsiveness. Therefore, in this case the best strategy is to weight-raise all the queues created during the burst, i.e., the exact opposite of the strategy for the above case. To distinguish between the two cases, BFQ uses an empirical burst-size threshold, found through extensive tests and monitoring of daily usage. Only large bursts, i.e., burst with a size above this threshold, are considered as generated by a high number of parallel processes. In this respect, upstart-based boot proved to be rather hard to detect as generating a large burst of queue creations, because with upstart most of the queues created in a burst exit *before* the next queues in the same burst are created. To address this issue, I changed the burst-detection mechanism so as to not decrease the size of the current burst even if one of the queues in the burst is eliminated. Unfortunately, this missing decrease causes false positives on very fast systems: on the start-up of a complex application, such as libreoffice writer, so many queues are created, served and exited shortly after each other, that a large burst of queue creations is wrongly detected as occurring. These false positives just disappear if the size of a burst is decreased when one of the queues in the burst exits. This commit restores the missing burst-size decrease, relying of the fact that upstart is apparently unlikely to be used on systems running this and future versions of the kernel. Signed-off-by: Paolo Valente Signed-off-by: Mauro Andreolini Signed-off-by: Angelo Ruocco Tested-by: Mirko Montanari Tested-by: Oleksandr Natalenko Tested-by: Lee Tibbert Signed-off-by: Jens Axboe block/bfq-iosched.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 894df937e06a56ed6f054a75a416aff84147c5a2 Author: Paolo Valente Date: Thu Sep 21 11:04:02 2017 +0200 block, bfq: let early-merged queues be weight-raised on split too A just-created bfq_queue, say Q, may happen to be merged with another bfq_queue on the very first invocation of the function __bfq_insert_request. In such a case, even if Q would clearly deserve interactive weight raising (as it has just been created), the function bfq_add_request does not make it to be invoked for Q, and thus to activate weight raising for Q. As a consequence, when the state of Q is saved for a possible future restore, after a split of Q from the other bfq_queue(s), such a state happens to be (unjustly) non-weight-raised. Then the bfq_queue will not enjoy any weight raising on the split, even if should still be in an interactive weight-raising period when the split occurs. This commit solves this problem as follows, for a just-created bfq_queue that is being early-merged: it stores directly, in the saved state of the bfq_queue, the weight-raising state that would have been assigned to the bfq_queue if not early-merged. Signed-off-by: Paolo Valente Tested-by: Angelo Ruocco Tested-by: Mirko Montanari Tested-by: Oleksandr Natalenko Tested-by: Lee Tibbert Signed-off-by: Jens Axboe block/bfq-iosched.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) commit 3e2bdd6dff239afd8386e8758eee69ad61e5a3d6 Author: Paolo Valente Date: Thu Sep 21 11:04:01 2017 +0200 block, bfq: check and switch back to interactive wr also on queue split As already explained in the message of commit "block, bfq: fix wrong init of saved start time for weight raising", if a soft real-time weight-raising period happens to be nested in a larger interactive weight-raising period, then BFQ restores the interactive weight raising at the end of the soft real-time weight raising. In particular, BFQ checks whether the latter has ended only on request dispatches. Unfortunately, the above scheme fails to restore interactive weight raising in the following corner case: if a bfq_queue, say Q, 1) Is merged with another bfq_queue while it is in a nested soft real-time weight-raising period. The weight-raising state of Q is then saved, and not considered any longer until a split occurs. 2) Is split from the other bfq_queue(s) at a time instant when its soft real-time weight raising is already finished. On the split, while resuming the previous, soft real-time weight-raised state of the bfq_queue Q, BFQ checks whether the current soft real-time weight-raising period is actually over. If so, BFQ switches weight raising off for Q, *without* checking whether the soft real-time period was actually nested in a non-yet-finished interactive weight-raising period. This commit addresses this issue by adding the above missing check in bfq_queue splits, and restoring interactive weight raising if needed. Signed-off-by: Paolo Valente Tested-by: Angelo Ruocco Tested-by: Mirko Montanari Tested-by: Oleksandr Natalenko Tested-by: Lee Tibbert Signed-off-by: Jens Axboe block/bfq-iosched.c | 87 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 38 deletions(-) commit 4baa8bb13f41307f3eb62fe91f93a1a798ebef53 Author: Paolo Valente Date: Thu Sep 21 11:04:00 2017 +0200 block, bfq: fix wrong init of saved start time for weight raising This commit fixes a bug that causes bfq to fail to guarantee a high responsiveness on some drives, if there is heavy random read+write I/O in the background. More precisely, such a failure allowed this bug to be found [1], but the bug may well cause other yet unreported anomalies. BFQ raises the weight of the bfq_queues associated with soft real-time applications, to privilege the I/O, and thus reduce latency, for these applications. This mechanism is named soft-real-time weight raising in BFQ. A soft real-time period may happen to be nested into an interactive weight raising period, i.e., it may happen that, when a bfq_queue switches to a soft real-time weight-raised state, the bfq_queue is already being weight-raised because deemed interactive too. In this case, BFQ saves in a special variable wr_start_at_switch_to_srt, the time instant when the interactive weight-raising period started for the bfq_queue, i.e., the time instant when BFQ started to deem the bfq_queue interactive. This value is then used to check whether the interactive weight-raising period would still be in progress when the soft real-time weight-raising period ends. If so, interactive weight raising is restored for the bfq_queue. This restore is useful, in particular, because it prevents bfq_queues from losing their interactive weight raising prematurely, as a consequence of spurious, short-lived soft real-time weight-raising periods caused by wrong detections as soft real-time. If, instead, a bfq_queue switches to soft-real-time weight raising while it *is not* already in an interactive weight-raising period, then the variable wr_start_at_switch_to_srt has no meaning during the following soft real-time weight-raising period. Unfortunately the handling of this case is wrong in BFQ: not only the variable is not flagged somehow as meaningless, but it is also set to the time when the switch to soft real-time weight-raising occurs. This may cause an interactive weight-raising period to be considered mistakenly as still in progress, and thus a spurious interactive weight-raising period to start for the bfq_queue, at the end of the soft-real-time weight-raising period. In particular the spurious interactive weight-raising period will be considered as still in progress, if the soft-real-time weight-raising period does not last very long. The bfq_queue will then be wrongly privileged and, if I/O bound, will unjustly steal bandwidth to truly interactive or soft real-time bfq_queues, harming responsiveness and low latency. This commit fixes this issue by just setting wr_start_at_switch_to_srt to minus infinity (farthest past time instant according to jiffies macros): when the soft-real-time weight-raising period ends, certainly no interactive weight-raising period will be considered as still in progress. [1] Background I/O Type: Random - Background I/O mix: Reads and writes - Application to start: LibreOffice Writer in http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.13-IO-Laptop Signed-off-by: Paolo Valente Signed-off-by: Angelo Ruocco Tested-by: Oleksandr Natalenko Tested-by: Lee Tibbert Tested-by: Mirko Montanari Signed-off-by: Jens Axboe block/bfq-iosched.c | 50 +++++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 19 deletions(-) commit aac8d41cd438f25bf3110fc6b98f1d16d7dbc169 Author: Jens Axboe Date: Thu Sep 28 11:31:55 2017 -0600 writeback: only allow one inflight and pending full flush When someone calls wakeup_flusher_threads() or wakeup_flusher_threads_bdi(), they schedule writeback of all dirty pages in the system (or on that bdi). If we are tight on memory, we can get tons of these queued from kswapd/vmscan. This causes (at least) two problems: 1) We consume a ton of memory just allocating writeback work items. We've seen as much as 600 million of these writeback work items pending. That's a lot of memory to pointlessly hold hostage, while the box is under memory pressure. 2) We spend so much time processing these work items, that we introduce a softlockup in writeback processing. This is because each of the writeback work items don't end up doing any work (it's hard when you have millions of identical ones coming in to the flush machinery), so we just sit in a tight loop pulling work items and deleting/freeing them. Fix this by adding a 'start_all' bit to the writeback structure, and set that when someone attempts to flush all dirty pages. The bit is cleared when we start writeback on that work item. If the bit is already set when we attempt to queue !nr_pages writeback, then we simply ignore it. This provides us one full flush in flight, with one pending as well, and makes for more efficient handling of this type of writeback. Acked-by: Johannes Weiner Tested-by: Chris Mason Reviewed-by: Jan Kara Signed-off-by: Jens Axboe fs/fs-writeback.c | 25 +++++++++++++++++++++++++ include/linux/backing-dev-defs.h | 1 + 2 files changed, 26 insertions(+) commit e8e8a0c6c9bfc0b320671166dd795f413f636773 Author: Jens Axboe Date: Thu Sep 28 11:31:22 2017 -0600 writeback: move nr_pages == 0 logic to one location Now that we have no external callers of wb_start_writeback(), we can shuffle the passing in of 'nr_pages'. Everybody passes in 0 at this point, so just kill the argument and move the dirty count retrieval to that function. Acked-by: Johannes Weiner Tested-by: Chris Mason Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe fs/fs-writeback.c | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) commit 9dfb176fae57a1dea68531fd25e867037e4d9bac Author: Jens Axboe Date: Thu Sep 28 11:28:55 2017 -0600 writeback: make wb_start_writeback() static We don't have any callers outside of fs-writeback.c anymore, make it private. Acked-by: Johannes Weiner Tested-by: Chris Mason Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe fs/fs-writeback.c | 4 ++-- include/linux/backing-dev.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) commit 0ab29fd0accf6e5b6ef5dbe2e0335da6687ce60c Author: Jens Axboe Date: Thu Sep 28 11:28:02 2017 -0600 writeback: pass in '0' for nr_pages writeback in laptop mode Laptop mode really wants to writeback the number of dirty pages and inodes. Instead of calculating this in the caller, just pass in 0 and let wakeup_flusher_threads() handle it. Use the new wakeup_flusher_threads_bdi() instead of rolling our own. Acked-by: Johannes Weiner Tested-by: Chris Mason Signed-off-by: Jens Axboe Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe mm/page-writeback.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit 595043e5f9ef1d8263bd9fda215cade489227491 Author: Jens Axboe Date: Thu Sep 28 11:26:59 2017 -0600 writeback: provide a wakeup_flusher_threads_bdi() Similar to wakeup_flusher_threads(), except that we only wake up the flusher threads on the specified backing device. No functional changes in this patch. Acked-by: Johannes Weiner Tested-by: Chris Mason Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe fs/fs-writeback.c | 39 +++++++++++++++++++++++++++++---------- include/linux/writeback.h | 2 ++ 2 files changed, 31 insertions(+), 10 deletions(-) commit 47410d88f665486bf91f02242ab5d5692b8887ac Author: Jens Axboe Date: Thu Sep 28 11:25:03 2017 -0600 writeback: remove 'range_cyclic' argument for wb_start_writeback() All the callers pass in 'true' for range_cyclic, so kill the argument. Signed-off-by: Jens Axboe fs/fs-writeback.c | 6 +++--- include/linux/backing-dev.h | 2 +- mm/page-writeback.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit d31cd9d326f216fca9a602dddac254f668f5dcd6 Author: Jens Axboe Date: Wed Sep 27 13:28:18 2017 -0600 writeback: switch wakeup_flusher_threads() to cyclic writeback We're writing back the full range of dirty pages on the devices, there's no point in making this special and not do normal range cyclic writeback. Reviewed-by: Jan Kara Signed-off-by: Jens Axboe fs/fs-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ba4b2dfafaa711b41cc2102b0e9a529f3981218 Author: Jens Axboe Date: Wed Sep 20 08:58:25 2017 -0600 fs: kill 'nr_pages' argument from wakeup_flusher_threads() Everybody is passing in 0 now, let's get rid of the argument. Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe fs/fs-writeback.c | 9 ++++----- fs/sync.c | 2 +- include/linux/writeback.h | 2 +- mm/vmscan.c | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) commit bc48f001de12225b6430a243504aa60b5ae8a91a Author: Jens Axboe Date: Wed Sep 27 06:08:57 2017 -0600 buffer: eliminate the need to call free_more_memory() in __getblk_slow() Since the previous commit removed any case where grow_buffers() would return failure due to memory allocations, we can safely remove the case where we have to call free_more_memory() in this function. Since this is also the last user of free_more_memory(), kill it off completely. Reviewed-by: Nikolay Borisov Reviewed-by: Jan Kara Signed-off-by: Jens Axboe fs/buffer.c | 23 ----------------------- 1 file changed, 23 deletions(-) commit 94dc24c0c59a224a093f110060d01c2c620f275a Author: Jens Axboe Date: Wed Sep 27 05:45:36 2017 -0600 buffer: grow_dev_page() should use __GFP_NOFAIL for all cases We currently use it for find_or_create_page(), which means that it cannot fail. Ensure we also pass in 'retry == true' to alloc_page_buffers(), which also ensure that it cannot fail. After this, there are no failure cases in grow_dev_page() that occur because of a failed memory allocation. Reviewed-by: Nikolay Borisov Reviewed-by: Jan Kara Signed-off-by: Jens Axboe fs/buffer.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 640ab98fb3629c0f8417b9b2532eca596495f3bb Author: Jens Axboe Date: Wed Sep 27 05:40:16 2017 -0600 buffer: have alloc_page_buffers() use __GFP_NOFAIL Instead of adding weird retry logic in that function, utilize __GFP_NOFAIL to ensure that the vm takes care of handling any potential retries appropriately. This means we don't have to call free_more_memory() from here. Reviewed-by: Nikolay Borisov Reviewed-by: Jan Kara Signed-off-by: Jens Axboe drivers/md/bitmap.c | 2 +- fs/buffer.c | 33 ++++++++++----------------------- fs/ntfs/aops.c | 2 +- fs/ntfs/mft.c | 2 +- include/linux/buffer_head.h | 2 +- 5 files changed, 14 insertions(+), 27 deletions(-) commit 7beb2f845b715cb98584cf630e9a9d5b05501166 Author: Jens Axboe Date: Sat Sep 30 02:08:24 2017 -0600 blk-mq: wire up completion notifier for laptop mode For some reason, the laptop mode IO completion notified was never wired up for blk-mq. Ensure that we trigger the callback appropriately, to arm the laptop mode flush timer. Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe block/blk-mq.c | 3 +++ 1 file changed, 3 insertions(+) commit e8b44f32a959d59eae79c09ef4e410cfef3f59d6 Author: Markus Elfring Date: Tue Oct 3 10:30:07 2017 +0200 ARM: vexpress/spc: Delete an error message for a failed memory allocation Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sudeep Holla arch/arm/mach-vexpress/spc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit bc3d3447b66a9eb398c7cce96f05b7c78d725abc Author: Daniel Thompson Date: Tue Sep 19 19:32:04 2017 +0100 arm64: dts: foundation-v8: Enable PSCI mode Currently if the Foundation model is running ARM Trusted Firmware then the kernel, which is configured to use spin tables, cannot start secondary processors or "power off" the simulation. After adding a couple of labels to the include file and splitting out the spin-table configuration into a header, we add a couple of new headers together with two new DTs (GICv2 + PSCI and GICv3 + PSCI). The new GICv3+PSCI DT has been boot tested, the remaining three (two of which existed prior to this patch) have been "tested" by decompiling the blobs and comparing them against a reference. Acked-by: Mark Rutland Signed-off-by: Daniel Thompson Signed-off-by: Sudeep Holla arch/arm64/boot/dts/arm/Makefile | 4 +++- arch/arm64/boot/dts/arm/foundation-v8-gicv2.dtsi | 19 +++++++++++++++ .../boot/dts/arm/foundation-v8-gicv3-psci.dts | 9 +++++++ arch/arm64/boot/dts/arm/foundation-v8-gicv3.dts | 25 ++----------------- arch/arm64/boot/dts/arm/foundation-v8-gicv3.dtsi | 28 ++++++++++++++++++++++ arch/arm64/boot/dts/arm/foundation-v8-psci.dts | 9 +++++++ arch/arm64/boot/dts/arm/foundation-v8-psci.dtsi | 28 ++++++++++++++++++++++ .../boot/dts/arm/foundation-v8-spin-table.dtsi | 25 +++++++++++++++++++ arch/arm64/boot/dts/arm/foundation-v8.dts | 16 ++----------- arch/arm64/boot/dts/arm/foundation-v8.dtsi | 16 ++++--------- 10 files changed, 129 insertions(+), 50 deletions(-) commit f6a9820d572bd8384d982357cbad214b3a6c04bb Author: Jiri Olsa Date: Thu Sep 28 18:06:33 2017 +0200 perf tests attr: Fix group stat tests We started to use group read whenever it's possible: 82bf311e15d2 perf stat: Use group read for event groups That breaks some of attr tests, this change adds the new possible read_format value. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Heiko Carstens Cc: Hendrik Brueckner Cc: Martin Schwidefsky Cc: Thomas-Mich Richter LPU-Reference: 20170928160633.GA26973@krava Link: http://lkml.kernel.org/n/tip-1ko2zc4nph93d8lfwjyk9ivz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/attr/test-stat-group | 2 ++ tools/perf/tests/attr/test-stat-group1 | 2 ++ 2 files changed, 4 insertions(+) commit 0c6b499495e928777c41ca2de4fbb58788269690 Author: Kan Liang Date: Fri Sep 29 07:47:55 2017 -0700 perf top: Add option to set the number of thread for event synthesize Using UINT_MAX to indicate the default thread#, which is the max number of online CPU. Committer testing: # perf trace --no-inherit -e clone -o /tmp/output perf top --num-thread-synthesize 9 # cat /tmp/output ? ( ? ): ... [continued]: clone()) = 26651 (perf) 0.059 ( 0.010 ms): clone(flags: VM|FS|FILES|SIGHAND|THREAD|SYSVSEM|SETTLS|PARENT_SETTID|CHILD_CLEARTID, child_stack: 0x7f5bfac44f30, parent_tidptr: 0x7f5bfac459d0, child_tidptr: 0x7f5bfac459d0, tls: 0x7f5bfac45700) = 26652 (perf) 0.116 ( 0.014 ms): clone(flags: VM|FS|FILES|SIGHAND|THREAD|SYSVSEM|SETTLS|PARENT_SETTID|CHILD_CLEARTID, child_stack: 0x7f5bfa443f30, parent_tidptr: 0x7f5bfa4449d0, child_tidptr: 0x7f5bfa4449d0, tls: 0x7f5bfa444700) = 26653 (perf) 0.141 ( 0.009 ms): clone(flags: VM|FS|FILES|SIGHAND|THREAD|SYSVSEM|SETTLS|PARENT_SETTID|CHILD_CLEARTID, child_stack: 0x7f5bf9c42f30, parent_tidptr: 0x7f5bf9c439d0, child_tidptr: 0x7f5bf9c439d0, tls: 0x7f5bf9c43700) = 26654 (perf) 0.160 ( 0.012 ms): clone(flags: VM|FS|FILES|SIGHAND|THREAD|SYSVSEM|SETTLS|PARENT_SETTID|CHILD_CLEARTID, child_stack: 0x7f5bf9441f30, parent_tidptr: 0x7f5bf94429d0, child_tidptr: 0x7f5bf94429d0, tls: 0x7f5bf9442700) = 26655 (perf) 0.232 ( 0.013 ms): clone(flags: VM|FS|FILES|SIGHAND|THREAD|SYSVSEM|SETTLS|PARENT_SETTID|CHILD_CLEARTID, child_stack: 0x7f5bf8c40f30, parent_tidptr: 0x7f5bf8c419d0, child_tidptr: 0x7f5bf8c419d0, tls: 0x7f5bf8c41700) = 26656 (perf) 0.393 ( 0.011 ms): clone(flags: VM|FS|FILES|SIGHAND|THREAD|SYSVSEM|SETTLS|PARENT_SETTID|CHILD_CLEARTID, child_stack: 0x7f5be3ffef30, parent_tidptr: 0x7f5be3fff9d0, child_tidptr: 0x7f5be3fff9d0, tls: 0x7f5be3fff700) = 26657 (perf) 0.802 ( 0.012 ms): clone(flags: VM|FS|FILES|SIGHAND|THREAD|SYSVSEM|SETTLS|PARENT_SETTID|CHILD_CLEARTID, child_stack: 0x7f5be37fdf30, parent_tidptr: 0x7f5be37fe9d0, child_tidptr: 0x7f5be37fe9d0, tls: 0x7f5be37fe700) = 26658 (perf) 1.411 ( 0.022 ms): clone(flags: VM|FS|FILES|SIGHAND|THREAD|SYSVSEM|SETTLS|PARENT_SETTID|CHILD_CLEARTID, child_stack: 0x7f5be2ffcf30, parent_tidptr: 0x7f5be2ffd9d0, child_tidptr: 0x7f5be2ffd9d0, tls: 0x7f5be2ffd700) = 26659 (perf) 246.422 ( 0.042 ms): clone(flags: VM|FS|FILES|SIGHAND|THREAD|SYSVSEM|SETTLS|PARENT_SETTID|CHILD_CLEARTID, child_stack: 0x7f5be2ffcf30, parent_tidptr: 0x7f5be2ffd9d0, child_tidptr: 0x7f5be2ffd9d0, tls: 0x7f5be2ffd700) = 26660 (perf) # Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Andi Kleen Cc: He Kuang Cc: Lukasz Odzioba Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1506696477-146932-5-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-top.txt | 3 +++ tools/perf/builtin-top.c | 11 ++++++++--- tools/perf/util/event.c | 5 ++++- tools/perf/util/top.h | 1 + 4 files changed, 16 insertions(+), 4 deletions(-) commit 340b47f510bbe55a76b7309107276f02ea11f117 Author: Kan Liang Date: Fri Sep 29 07:47:54 2017 -0700 perf top: Implement multithreading for perf_event__synthesize_threads The proc files which is sorted with alphabetical order are evenly assigned to several synthesize threads to be processed in parallel. For 'perf top', the threads number hard code to online CPU number. The following patch will introduce an option to set it. For other perf tools, the thread number is 1. Because the process function is not ready for multithreading, e.g. process_synthesized_event. This patch series only support event synthesize multithreading for 'perf top'. For other tools, it can be done separately later. With multithread applied, the total processing time can get up to 1.56x speedup on Knights Mill for 'perf top'. For specific single event processing, the processing time could increase because of the lock contention. So proc_map_timeout may need to be increased. Otherwise some proc maps will be truncated. Based on my test, increasing the proc_map_timeout has small impact on the total processing time. The total processing time still get 1.49x speedup on Knights Mill after increasing the proc_map_timeout. The patch itself doesn't increase the proc_map_timeout. Doesn't need to implement multithreading for per task monitoring, perf_event__synthesize_thread_map. It doesn't have performance issue. Committer testing: # getconf _NPROCESSORS_ONLN 4 # perf trace --no-inherit -e clone -o /tmp/output perf top # tail -4 /tmp/bla 0.124 ( 0.041 ms): clone(flags: VM|FS|FILES|SIGHAND|THREAD|SYSVSEM|SETTLS|PARENT_SETTID|CHILD_CLEARTID, child_stack: 0x7fc3eb3a8f30, parent_tidptr: 0x7fc3eb3a99d0, child_tidptr: 0x7fc3eb3a99d0, tls: 0x7fc3eb3a9700) = 9548 (perf) 0.246 ( 0.023 ms): clone(flags: VM|FS|FILES|SIGHAND|THREAD|SYSVSEM|SETTLS|PARENT_SETTID|CHILD_CLEARTID, child_stack: 0x7fc3eaba7f30, parent_tidptr: 0x7fc3eaba89d0, child_tidptr: 0x7fc3eaba89d0, tls: 0x7fc3eaba8700) = 9549 (perf) 0.286 ( 0.019 ms): clone(flags: VM|FS|FILES|SIGHAND|THREAD|SYSVSEM|SETTLS|PARENT_SETTID|CHILD_CLEARTID, child_stack: 0x7fc3ea3a6f30, parent_tidptr: 0x7fc3ea3a79d0, child_tidptr: 0x7fc3ea3a79d0, tls: 0x7fc3ea3a7700) = 9550 (perf) 246.540 ( 0.047 ms): clone(flags: VM|FS|FILES|SIGHAND|THREAD|SYSVSEM|SETTLS|PARENT_SETTID|CHILD_CLEARTID, child_stack: 0x7fc3ea3a6f30, parent_tidptr: 0x7fc3ea3a79d0, child_tidptr: 0x7fc3ea3a79d0, tls: 0x7fc3ea3a7700) = 9551 (perf) # Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Andi Kleen Cc: He Kuang Cc: Lukasz Odzioba Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1506696477-146932-4-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kvm.c | 3 +- tools/perf/builtin-record.c | 2 +- tools/perf/builtin-top.c | 8 +- tools/perf/builtin-trace.c | 2 +- tools/perf/tests/mmap-thread-lookup.c | 2 +- tools/perf/util/event.c | 160 +++++++++++++++++++++++++++------- tools/perf/util/event.h | 3 +- tools/perf/util/machine.c | 8 +- tools/perf/util/machine.h | 9 +- 9 files changed, 155 insertions(+), 42 deletions(-) commit f988e71bc6220d8b404dbd43c0e0962e30305795 Author: Kan Liang Date: Fri Sep 29 07:47:53 2017 -0700 perf tools: Lock to protect comm_str rb tree Add comm_str_lock to protect comm_str rb tree. The lock is only needed for multithreaded code, so using mutex wrappers provided by perf tool. Signed-off-by: Kan Liang Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Andi Kleen Cc: He Kuang Cc: Lukasz Odzioba Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1506696477-146932-3-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/comm.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit b32ee9e522f7ba26339856a047cfe9efc0be0ff3 Author: Kan Liang Date: Fri Sep 29 07:47:52 2017 -0700 perf tools: Lock to protect namespaces and comm list Add two locks to protect namespaces_list and comm_list. The lock is only needed for multithreaded code, so using mutex wrappers provided by perf tool. Not all the comm_list/namespaces_list accessing are protected, e.g. thread__exec_comm. Because the multithread code for perf top event synthesizing does not touch them. They don't need a lock. Signed-off-by: Kan Liang Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexei Starovoitov Cc: Andi Kleen Cc: He Kuang Cc: Lukasz Odzioba Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1506696477-146932-2-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/thread.c | 53 +++++++++++++++++++++++++++++++++++++++++++----- tools/perf/util/thread.h | 3 +++ 2 files changed, 51 insertions(+), 5 deletions(-) commit c772568788b5f0cbaac7c8d4111d7173bfc90673 Author: Russell King Date: Thu Sep 21 18:10:19 2017 +0100 ARM: add additional table to compressed kernel Add an additional extendable table to the compressed kernel so that we can provide further information to boot loaders regarding the properties of the image contained within. This is necessary for correct behaviour of kexec. Tested-by: Tony Lindgren Tested-by: Keerthy Signed-off-by: Russell King arch/arm/boot/compressed/head.S | 2 ++ arch/arm/boot/compressed/vmlinux.lds.S | 11 +++++++++++ 2 files changed, 13 insertions(+) commit 429f7a062e3b5cf6fcf01eb00600cee5fe4d751f Author: Russell King Date: Thu Sep 21 17:15:23 2017 +0100 ARM: decompressor: fix BSS size calculation Assuming size(1) gives the size of the BSS is a mistake - it reports the size of the .bss section in the ELF image, which may not be the same as the region we mark with the __bss_start..__bss_stop symbols. We use the size of the BSS in the decompressor to know whether the kernel will overwrite the appended dtb, by adding the BSS size to the size of the Image (stored at the end of the compressed data) and adding the desired address of the decompressed image. If the BSS size is smaller than it really is, the decompressor can incorrectly assume that the BSS clearance will not overwrite the DTB. Here is an illustration: $ arm-linux-size vmlinux text data bss dec hex filename 8136972 3098076 10240348 21475396 147b044 vmlinux $ arm-linux-nm vmlinux | grep __bss_ c0ac0e34 B __bss_start c1484f9c B __bss_stop $ stat -c %s arch/arm/boot/Image 11243060 In the above case, we are 12 bytes short. This is caused by the BSS section being aligned by one of its input sections: Idx Name Size VMA LMA File off Algn 23 __bug_table 00005d3c c0abb0f8 c0abb0f8 00acb0f8 2**2 CONTENTS, ALLOC, LOAD, DATA 24 .bss 009c415c c0ac0e40 c0ac0e40 00ad0e34 2**6 ALLOC Note that there's an additional 12 bytes difference between the file offset and LMA compared with the bug table - this occurs because one of the input sections for the .bss section requires a 64 byte alignment. Fix this by using 'nm' and perl to obtain the address of the __bss_start and __bss_stop symbols, using their difference for the size of the BSS. Tested-by: Tony Lindgren Tested-by: Keerthy Signed-off-by: Russell King arch/arm/boot/compressed/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit de854b336d209095b64b3b6c5c1c6a13938ef2d6 Author: Russell King Date: Wed Sep 7 15:19:52 2016 +0100 pcmcia: sa1111: remove special sa1111 mmio accessors Remove the special SA1111 MMIO accessors from the SA1111 PCMCIA driver as their definition will be removed shortly. The SA1111 accessors are barrierless, so use the _relaxed variants. Signed-off-by: Russell King drivers/pcmcia/sa1111_generic.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7170a3124ccbc929d0716a77b76b994bb082a3cd Author: Russell King Date: Wed Sep 7 13:45:11 2016 +0100 pcmcia: sa1111: use sa1111_get_irq() to obtain IRQ resources Use the newly provided sa1111_get_irq() to fetch the IRQ resources for the SA1111 PCMCIA driver. Signed-off-by: Russell King drivers/pcmcia/sa1111_generic.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit e13452ac379070f038c264618e35559434252175 Author: Rajmohan Mani Date: Fri Jul 28 17:30:26 2017 -0700 ACPI / PMIC: Add TI PMIC TPS68470 operation region driver The Kabylake platform coreboot (Chrome OS equivalent of BIOS) has defined 4 operation regions for the TI TPS68470 PMIC. These operation regions are to enable/disable voltage regulators, configure voltage regulators, enable/disable clocks and to configure clocks. This config adds ACPI operation region support for TI TPS68470 PMIC. TPS68470 device is an advanced power management unit that powers a Compact Camera Module (CCM), generates clocks for image sensors, drives a dual LED for flash and incorporates two LED drivers for general purpose indicators. This driver enables ACPI operation region support to control voltage regulators and clocks for the TPS68470 PMIC. Signed-off-by: Rajmohan Mani Acked-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki drivers/acpi/Kconfig | 16 ++ drivers/acpi/Makefile | 2 + drivers/acpi/pmic/tps68470_pmic.c | 455 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 473 insertions(+) commit 61a646e1355cf7215ed9a3fef4ba4c2b42bd495f Author: Marek Szyprowski Date: Thu Sep 14 16:38:17 2017 +0200 clk: samsung: Properly propagate flags in __PLL macro All users of __PLL macro already provide flags parameter, so don't overwrite it unconditionally with CLK_GET_RATE_NOCACHE. Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 47d04676a6479d526e581a8e24c0893cba108932 Author: Daniel Vetter Date: Fri Sep 8 17:35:28 2017 +0200 MAINTAINERS: Add dri-devel as a mailing list for anything fbdev fbdev is in maintenance only, except that it's still used by drm through the drm fbdev emulation, to be able to use fbcon. And people might want to sometimes extend fbcon to enable new features for drm drivers, e.g. Hans' panel orientation work. The problem is that when those patches only touch fbdev code they'll never show up on drm developer's radar, which means we end up with designs that don't really fit whell into the full stack. That happened a bit with the panel orientation work, where an fbcon patch made it into 4.14, implementing a design that won't really work on the drm side. Which means we now have to redo things, and on top coordinate 2 subsystem trees. Since fbdev is super low-volume we can prevent this in the future by simply adding the dri-devel mailing list to the fbdev subsystem. Cc: Hans de Goede Cc: Bartlomiej Zolnierkiewicz Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: Sean Paul Cc: David Airlie Acked-by: Sean Paul Acked-by: Dave Airlie Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170908153528.17528-1-daniel.vetter@ffwll.ch MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit e19c1eb885ac4186e64c7e484424124f3145318e Author: Imre Deak Date: Mon Oct 2 16:53:07 2017 +0300 drm/i915: Fix DDI PHY init if it was already on The common lane power down flag of a DPIO PHY has a funky semantic: after the initial enabling of the PHY (so from a disabled state) this flag will be clear. It will be set only after the PHY will be used for the first time (for instance due to enabling the corresponding pipe) and then become unused (due to disabling the pipe). During the initial PHY enablement we don't know which of the above phases we are in, so move the check for the flag where this is known, the HW readout code. This is where the rest of lane power down status checks are done anyway. This fixes at least a problem on GLK where after module reloading, the common lane power down flag of PHY1 is set, but the PHY is actually powered-on and properly set up. The GRC readout code for other PHYs will hence think that PHY1 is not powered initially and disable it after the GRC readout. This will cause the AUX power well related to PHY1 to get disabled in a stuck state, timing out when we try to enable it later. Cc: Ville Syrjala Fixes: e93da0a0137b ("drm/i915/bxt: Sanitiy check the PHY lane power down status") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102777 Signed-off-by: Imre Deak Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20171002135307.26117-1-imre.deak@intel.com drivers/gpu/drm/i915/intel_ddi.c | 3 ++- drivers/gpu/drm/i915/intel_dpio_phy.c | 20 -------------------- 2 files changed, 2 insertions(+), 21 deletions(-) commit 0d3c24e936feefeca854073ccb40613cd6eba9a9 Merge: 1af0838 ebec44a Author: Daniel Vetter Date: Tue Oct 3 11:09:16 2017 +0200 Merge airlied/drm-next into drm-misc-next Just catching up with upstream. Signed-off-by: Daniel Vetter commit ed69cd40685c949ec9c65701758bbf9e6840240f Author: Imre Deak Date: Mon Oct 2 10:55:57 2017 +0300 drm/i915/glk, cnl: Implement WaDisableScalarClockGating On GLK and CNL enabling a pipe with its pipe scaler enabled will result in a FIFO underrun. This happens only once after driver loading or system/runtime resume, more specifically after power well 1 gets enabled; subsequent modesets seem to be free of underruns. The BSpec workaround for this is to disable the pipe scaler clock gating for the duration of modeset. Based on my tests disabling clock gating must be done before enabling pipe scaling and we can re-enable it after the pipe is enabled and one vblank has passed. For consistency I also checked if plane scaling would cause the same problem, but that doesn't seem to trigger this problem. The patch is based on an earlier version from Ander. v2 (Rodrigo): - Set also CLKGATE_DIS_PSL bits 8 and 9. - Add also the BSpec workaround ID. Cc: Ander Conselvan de Oliveira Cc: Rodrigo Vivi Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100302 Signed-off-by: Imre Deak Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20171002075557.32615-1-imre.deak@intel.com drivers/gpu/drm/i915/i915_reg.h | 10 ++++++++++ drivers/gpu/drm/i915/intel_display.c | 26 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) commit 12bb361979b523bbae00542c17cda8f3f0048860 Author: Yoshihiro Shimoda Date: Tue Oct 3 13:57:13 2017 +0900 arm64: dts: renesas: r8a77995: draak: drop "avb_phy_int" from avb_pins Since the Ethernet AVB driver doesn't support AVB_PHY_INT handling and it will be handled by a phy driver as a gpio pin, this patch removes the "avb_phy_int" from the avb_pins node. Reported-by: Sergei Shtylyov Fixes: 4503b50eac08 ("arm64: dts: renesas: r8a77995: draak: enable EthernetAVB") Signed-off-by: Yoshihiro Shimoda Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit bc04ba36fb1b6c7ebe1df6011da8679e2a5b90bf Author: Yoshihiro Shimoda Date: Tue Oct 3 13:57:12 2017 +0900 arm64: dts: renesas: ulcb: drop "avb_phy_int" from avb_pins Since the Ethernet AVB driver doesn't support AVB_PHY_INT handling and it will be handled by a phy driver as a gpio pin, this patch removes the "avb_phy_int" from the avb_pins node. Reported-by: Geert Uytterhoeven Fixes: 133ace3f3804 ("arm64: dts: ulcb: Set drive-strength for ravb pins") Signed-off-by: Yoshihiro Shimoda Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 86b93a2dff65ab6e22ffd28bb132a2c3970b6e68 Author: Yoshihiro Shimoda Date: Tue Oct 3 13:57:11 2017 +0900 arm64: dts: renesas: salvator-common: drop "avb_phy_int" from avb_pins Since the Ethernet AVB driver doesn't support AVB_PHY_INT handling and it will be handled by a phy driver as a gpio pin, this patch removes the "avb_phy_int" from the avb_pins node. Reported-by: Geert Uytterhoeven Fixes: 7d73a4da2681 ("arm64: dts: r8a7795: salvator-x: Set drive-strength for ravb pins") Fixes: 4903987033be ("arm64: dts: r8a7796: salvator-x: Set drive-strength for ravb pins") Signed-off-by: Yoshihiro Shimoda Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/salvator-common.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 415060b21f318e009d865b4bcbf8f220ebc36964 Author: Al Cooper Date: Fri Sep 22 15:34:02 2017 -0400 phy: usb: phy-brcm-usb: Add ability to force DRD mode to host or device When the usb phy device mode is set to "drd", the USB port will switch between device and host modes depending on what's plugged into the port. Customers have asked for the ability to force host or device mode from software. This commit adds sysfs entries to the phy device that allow this. The sysfs for the phy device can be found at: /sys/bus/platform/drivers/brcmstb-usb-phy/*.usb-phy The following sysfs entries were added: - "dr_mode" (RO) - The current phy "dr_mode" setting. It will be set to one of the following values: - "host" - host mode - "peripheral " - device mode - "drd" - switch between device and host mode based on installed device - "typec-pd" - device/host mode is controller by the USB Type-C PD protocol. If "dr_mode" is "drd" - "drd_select" (RW) - It will be set to one of the following values: - "host" - force host mode - "device" - force device mode - "auto" - allow normal auto selection of host/device based on inserted USB device Signed-off-by: Al Cooper Signed-off-by: Kishon Vijay Abraham I drivers/phy/broadcom/phy-brcm-usb.c | 85 +++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) commit 49859e55e364b9e6a53ae8f80318a2e7bd35ef37 Author: Al Cooper Date: Fri Sep 22 15:34:01 2017 -0400 phy: usb: phy-brcm-usb: Add Broadcom STB USB phy driver Add a new USB Phy driver for Broadcom STB SoCs. This driver supports Broadcom STB ARM SoCs. This driver in combination with the Broadcom STB ohci, ehci and xhci drivers will enable USB1.1, USB2.0 and USB3.0 support. This Phy driver also supports the Broadcom BDC gadget driver. Signed-off-by: Al Cooper Signed-off-by: Kishon Vijay Abraham I MAINTAINERS | 7 + drivers/phy/broadcom/Kconfig | 13 + drivers/phy/broadcom/Makefile | 3 + drivers/phy/broadcom/phy-brcm-usb-init.c | 1017 ++++++++++++++++++++++++++++++ drivers/phy/broadcom/phy-brcm-usb-init.h | 50 ++ drivers/phy/broadcom/phy-brcm-usb.c | 374 +++++++++++ 6 files changed, 1464 insertions(+) commit 7a08c4d514b1ee70e637bb06738b13895a318e8e Author: Al Cooper Date: Fri Sep 22 15:34:00 2017 -0400 dt-bindings: Add Broadcom STB USB PHY binding document Add DT bindings document for Broadcom STB USB PHYs Acked-by: Rob Herring Signed-off-by: Al Cooper Signed-off-by: Kishon Vijay Abraham I .../bindings/phy/brcm,brcmstb-usb-phy.txt | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 7f20333fe76780af19ee0d8d2dc6d04d35aa88d2 Author: Al Cooper Date: Fri Sep 22 15:33:59 2017 -0400 soc: brcmstb: Add Product ID and Family ID helper functions Add Product ID and Family ID helper functions for brcmstb soc. Signed-off-by: Al Cooper Acked-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I drivers/soc/bcm/brcmstb/common.c | 12 ++++++++++++ include/linux/soc/brcmstb/brcmstb.h | 17 +++++++++++++++++ 2 files changed, 29 insertions(+) commit 8512bffd6226fea259f94fd23fc3b62ffe64baa1 Author: Vaibhav Jain Date: Mon Sep 4 14:18:25 2017 +0530 cxl: Set the valid bit in PE for dedicated mode Make sure to set the valid-bit in software-state field of the populated PE. This was earlier missing for dedicated mode AFUs, hence was causing a PSL freeze when the AFU was activated. Signed-off-by: Vaibhav Jain Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman drivers/misc/cxl/native.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit f6cab3452b8297cef628f2e9ecb4d0bd2b6b76dc Author: Dick Kennedy Date: Fri Sep 29 17:34:47 2017 -0700 scsi: lpfc: change version to 11.4.0.4 Change version to 11.4.0.4 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29bfd55a9c8b8e70c3ecbc5a378cb6c2fc98dc37 Author: James Smart Date: Fri Sep 29 17:34:46 2017 -0700 scsi: lpfc: correct nvme sg segment count check The internal cfg flag is actually smaller, by 1 (for a partial page sge), than the sg list maintained by the driver. Thus the check on sg segments errored out when it shouldn't have Ensure the check is +1 Note: having a value that is less than what it really is is bogus. Correcting it now would be a significant rework. Add this item to the list to be refactored in the merge with efct. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1abcb3718b082d359647ab67197f3ad3b419f274 Author: Dick Kennedy Date: Fri Sep 29 17:34:45 2017 -0700 scsi: lpfc: Fix oops of nvme host during driver unload. When running NVME io as a NVME host, if the driver is unloaded there would be oops in lpfc_sli4_issue_wqe. When unloading, controllers are torn down and the transport initiates set_property commands to reset the controller and issues aborts to terminate existing io. The drivers nvme abort and fcp io submit routines needed to recognize the driver is unloading and fail the new requests. It didn't, resulting in the oops. Revise the ls and fcp io submit routines to detect the unloading state and properly handle their cleanup. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 8 ++++++++ drivers/scsi/lpfc/lpfc_nvmet.c | 11 +++++++++++ 2 files changed, 19 insertions(+) commit 6ad8c07a2f54eb7b06789d65fe4c1f08849e0b36 Author: Dick Kennedy Date: Fri Sep 29 17:34:44 2017 -0700 scsi: lpfc: Extend RDP support Support RDP and Multiple Frames If the remote Nport is not logged in, the driver would not populate all the descriptors in the RDP response payload. Doing so would create a payload length that requires multiple frames due to exceeding the default rx buffer size without an explicit login. Currently FC-LS explicitly states the RDP response must be a single frame sequence. Thus we did not violate the standard. Recently, a modification to FC-LS was accepted which allows multi-frame sequences and all vendors have indicated they are interoperable with the change. As such, extend RDP support with the additional fields and send a multi-frame sequence. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_els.c | 12 ------------ 1 file changed, 12 deletions(-) commit 952c303b329c8d8307e90d2d51b74d8df9f82306 Author: Dick Kennedy Date: Fri Sep 29 17:34:43 2017 -0700 scsi: lpfc: Ensure io aborts interlocked with the target. Before releasing nvme io back to the io stack for possible retry on other paths, ensure the io termination is interlocked with the target device by ensuring the entire ABTS-LS protocol is complete. Additionally, FC-NVME ABTS-LS protocol does not use RRQ. Remove RRQ behavior from ABTS-LS. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 59 +++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 25 deletions(-) commit 184fc2b9a8bcbda9c14d0a1e7fbecfc028c7702e Author: Dick Kennedy Date: Fri Sep 29 17:34:42 2017 -0700 scsi: lpfc: Fix secure firmware updates Firmware update fails with: status x17 add_status x56 on the final write If multiple DMA buffers are used for the download, some firmware revs have difficulty with signatures and crcs split across the dma buffer boundaries. Resolve by making all writes be a single 4k page in length. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_hw4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7672ae681f8debe125ecc2ec59ba31d886acf5d Author: Dick Kennedy Date: Fri Sep 29 17:34:41 2017 -0700 scsi: lpfc: Fix crash in lpfc_nvme_fcp_io_submit during LIP The driver is seeing a NULL pointer in lpfc_nvme_fcp_io_submit. This was ultimately due to a transport AER being sent on a terminated controller, thus some of the values were not set. In case we're in a system without a corrected transport and in case a race condition occurs where we enter the routine as the teardown is happening in a separate thread, validate the parameters before starting the io. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 42270dce9d78acbaa5b9ca4fd4e82d251a8d099b Author: Dick Kennedy Date: Fri Sep 29 17:34:40 2017 -0700 scsi: lpfc: Disable NPIV support if NVME is enabled The initial implementation of NVME didn't merge with NPIV support. As such, there are several issues if NPIV is used with NVME. For now, ensure that if NVME is enabled then NPIV is not enabled. Support for NPIV with NVME will be added in the near future. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_vport.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit e7981a2c725f8e237f749fa1358997707d57e32c Author: Dick Kennedy Date: Fri Sep 29 17:34:39 2017 -0700 scsi: lpfc: Fix oops if nvmet_fc_register_targetport fails if nvmet targetport registration fails, the driver encounters a NULL pointer oops in lpfc_hb_timeout_handler. To fix: if registration fails, ensure nvmet_support is cleared on the port structure. Also enhanced the log message on failure. Cc: # 4.12+ Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit cf4c8c861074af050b51f00cac44b24195b2d0d3 Author: Dick Kennedy Date: Fri Sep 29 17:34:38 2017 -0700 scsi: lpfc: Revise NVME module parameter descriptions for better clarity The descriptions for lpfc_xri_split and lpfc_enable_fc4_type were poor. Revise for better understanding: lpfc_xri_split - Percentage of FCP XRI resources versus NVME lpfc_enable_fc4_type - Enable FC4 Protocol support - FCP / NVME Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c578f6f4b9e8ac50cdde0f075424169f4b5e548f Author: James Smart Date: Fri Sep 29 17:34:37 2017 -0700 scsi: lpfc: Set missing abort context Always set ctxp->state to LPFC_NVMET_STE_ABORT if ABORT op gets called Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 1 + 1 file changed, 1 insertion(+) commit e3246a123d3b2e90ee2e071e49c2dce191acbab4 Author: James Smart Date: Fri Sep 29 17:34:36 2017 -0700 scsi: lpfc: Reduce log spew on controller reconnects There are several log messages that report abnormal terminations that by default are marked warn. These are typically the result of failures due to invalid controller state or abort completions. They are all natural when a controller resets. Unfortunately, as they are logged by default, it makes the admin very concerned. Convert the messages to Info. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 6 +++--- drivers/scsi/lpfc/lpfc_nvmet.c | 16 ++++++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) commit 8e036a9497c5d565baafda4c648f2f372999a547 Author: Dick Kennedy Date: Fri Sep 29 17:34:35 2017 -0700 scsi: lpfc: Fix FCP hba_wqidx assignment The driver is encountering oops in lpfc_sli_calc_ring. The driver is setting hba_wqidx for FCP based on the policy in use for NVME. The two may not be the same. Change to set the wqidx based on the FCP policy. Cc: # 4.12+ Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f485c18db27734b37003bf2fafd364234e763633 Author: Dick Kennedy Date: Fri Sep 29 17:34:34 2017 -0700 scsi: lpfc: Move CQ processing to a soft IRQ Under heavy target nvme load duration, the lpfc irq handler is encountering cpu lockup warnings. Convert the driver to a shortened ISR handler which identifies the interrupting condition then schedules a workq thread to process the completion queue the interrupt was for. This moves all the real work into the workq element. As nvmet_fc upcalls are no longer in ISR context, don't set the feature flags Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc.h | 3 + drivers/scsi/lpfc/lpfc_init.c | 15 +++++ drivers/scsi/lpfc/lpfc_nvmet.c | 4 +- drivers/scsi/lpfc/lpfc_sli.c | 148 ++++++++++++++++++++++++----------------- drivers/scsi/lpfc/lpfc_sli4.h | 4 +- 5 files changed, 109 insertions(+), 65 deletions(-) commit c8a4ce0bf3aad1a73d5122a3781a0be83bc0d0a4 Author: Dick Kennedy Date: Fri Sep 29 17:34:33 2017 -0700 scsi: lpfc: Make ktime sampling more accurate Need to make ktime samples more accurate If ktime is turned on in the middle of an IO, the max calculation could be misleading. Base sampling on the start time of the IO as opposed to ktime_on. Make ISR ktime timestamps be from when CQE is read instead of EQE. Added additional sanity checks when deciding whether to accept an IO sample or not. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 34 ++++++++++----- drivers/scsi/lpfc/lpfc_nvmet.c | 99 ++++++++++++++++++++++++++++-------------- drivers/scsi/lpfc/lpfc_sli.c | 34 +++++++++------ 3 files changed, 109 insertions(+), 58 deletions(-) commit e8bcf0ae4c0346fdc78ebefe0eefcaa6a6622d38 Author: Dick Kennedy Date: Fri Sep 29 17:34:32 2017 -0700 scsi: lpfc: PLOGI failures during NPIV testing Local Reject/Invalid RPI errors seen during discovery. Temporary RPI cleanup was occurring regardless of SLI rev. It's only necessary on SLI-4. Adjust the test for whether cleanup is necessary. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_hbadisc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2299e4323d2bf6e0728fdc6b9e8e9704978d2dd7 Author: Dick Kennedy Date: Fri Sep 29 17:34:31 2017 -0700 scsi: lpfc: Fix warning messages when NVME_TARGET_FC not defined Warning messages when NVME_TARGET_FC not defined on ppc builds The lpfc_nvmet_replenish_context() function is only meaningful when NVME target mode enabled. Surround the function body with ifdefs for target mode enablement. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reported-by: Stephen Rothwell Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvmet.c | 2 ++ 1 file changed, 2 insertions(+) commit 2b75d0f93451bc6e11cf9af06e1bf770222c271d Author: Dick Kennedy Date: Fri Sep 29 17:34:30 2017 -0700 scsi: lpfc: Fix lpfc nvme host rejecting IO with Not Ready message In a link bounce scenario, a condition can occur where the discovery engine swaps an ndlp structure (address change for an nport). While the swap was successfully executed by the discovery engine, the driver did not properly detect a change in the ndlp bound to the nvme rport. This error resulted in the nvme host transport issuing an IO to the correct nvme rport, but the lpfc driver addressed a ndlp with an NLP_UNUSED status and failed the io. This resulting it it looking like there were missing namespaces and applications failed due to io errors. To fix, in lpfc_nvme_register_rport, rework the "rebind" case to break the nvme rport<->ndlp association when the ndlp already has an nrport. Then rebind the rport to the correct ndlp data and backpointers. [mkp: typo] Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 46 ++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 18 deletions(-) commit 1234a6d54fed8a00091968c4eb2fb52e1cbb8e2e Author: Dick Kennedy Date: Fri Sep 29 17:34:29 2017 -0700 scsi: lpfc: Fix crash receiving ELS while detaching driver The driver crashes when attempting to use a freed ndpl pointer. The pci_remove_one handler runs on a separate kernel thread. The order of the removal is starting by freeing all of the ndlps and then disabling interrupts. In between these two events the driver can still receive an ELS and process it. When it tries to use the ndlp pointer will be NULL Change the order of the pci_remove_one vs disable interrupts so that interrupts are disabled before the ndlp's are freed. Cc: # 4.12+ Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_attr.c | 6 ++++-- drivers/scsi/lpfc/lpfc_bsg.c | 4 +++- drivers/scsi/lpfc/lpfc_els.c | 7 ++++++- drivers/scsi/lpfc/lpfc_hbadisc.c | 5 ++++- drivers/scsi/lpfc/lpfc_init.c | 14 +++++++------- drivers/scsi/lpfc/lpfc_nportdisc.c | 2 +- drivers/scsi/lpfc/lpfc_sli.c | 12 ++++++++++++ 7 files changed, 37 insertions(+), 13 deletions(-) commit 401bb4169da655f3e5d28d0b208182e1ab60bf2a Author: Dick Kennedy Date: Fri Sep 29 17:34:28 2017 -0700 scsi: lpfc: fix pci hot plug crash in list_add call During pci hot plug, the kernel crashes in a list_add_call The lookup by tag function will return null if the IOCB is out of range or does not have the on txcmplq flag set. Fix: Check for null return from lookup by tag. Cc: # 4.12+ Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 1901762f2ca2747ed269239ca5332a8023ce4e3d Author: Dick Kennedy Date: Fri Sep 29 17:34:27 2017 -0700 scsi: lpfc: fix pci hot plug crash in timer management routines During pci hot plug, the kernel crashes in timer management code. The sli4 remove_one handler is not stoping the timers as it starts to remove the port so that it can be swapped. Fix: Stop the timers early in the handler routine. Note: Fix in SLI-4 only. SLI-3 already stopped the timers properly. Cc: # 4.12+ Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_init.c | 1 + 1 file changed, 1 insertion(+) commit 85ce6b42d04493f5617d41727a27ded2d1908f2a Author: Don Brace Date: Wed Sep 27 16:30:11 2017 -0500 scsi: smartpqi: update driver version to 1.1.2-126 Reviewed-by: Gerry Morong Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Tomas Henzl Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 38a7338ab55a1e1e2e86113eb5694350c3a2c865 Author: Kevin Barnett Date: Wed Sep 27 16:30:05 2017 -0500 scsi: smartpqi: cleanup raid map warning message Fix a small cosmetic bug in a very rarely encountered error message that can occur when a LD has a corrupted raid map. Reviewed-by: Scott Benesh Reviewed-by: Tomas Henzl 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, 3 insertions(+), 3 deletions(-) commit bd809e8dfc38718dfea96cc1e7209b1933750ee9 Author: Kevin Barnett Date: Wed Sep 27 16:29:59 2017 -0500 scsi: smartpqi: update controller ids Update the driver's PCI IDs. Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Tomas Henzl Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen drivers/scsi/smartpqi/smartpqi_init.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 64ec72a1ece37d9bc7ba8b11d6091ce7cb1d8eec Author: Joe Perches Date: Wed Sep 27 22:01:34 2017 -0700 PM: Use a more common logging style Convert printks to pr_. Miscellanea: o Use pr_fmt with "PM:" and remove "PM: " from format strings o Coalesce format strings and realign format arguments o Convert an embedded incorrect function name to "%s: ", __func__ o Convert a couple multi-line formats to multiple pr_ calls Signed-off-by: Joe Perches Acked-by: Pavel Machek Signed-off-by: Rafael J. Wysocki kernel/power/qos.c | 4 +- kernel/power/snapshot.c | 35 ++++++------- kernel/power/swap.c | 128 +++++++++++++++++++++--------------------------- 3 files changed, 77 insertions(+), 90 deletions(-) commit 05829d9431df1bf6de98679fbcfbad282c1c55a4 Author: Zumeng Chen Date: Wed Sep 27 15:08:17 2017 +0800 cpufreq: ti-cpufreq: kfree opp_data when failure memory leakage was found by kmemleak. opp_data needs to be freed when failure, including fail_put_node. unreferenced object 0xccdd4c40 (size 64): comm "swapper", pid 1, jiffies 4294938465 (age 888.520s) hex dump (first 32 bytes): 00 7c 00 c1 98 69 d8 ce 00 24 03 ce 00 24 03 ce .|...i...$...$.. 20 35 23 c1 00 00 00 00 00 00 00 00 00 00 00 00 5#............. backtrace: [] kmem_cache_alloc_trace+0x2c4/0x3cc [] ti_cpufreq_probe+0x6c/0x334 [] platform_drv_probe+0x60/0xc0 [] driver_probe_device+0x218/0x2c4 [] __device_attach_driver+0xa8/0xdc [] bus_for_each_drv+0x70/0xa4 [] __device_attach+0xc0/0x124 [] device_initial_probe+0x1c/0x20 [] bus_probe_device+0x94/0x9c [] device_add+0x404/0x590 [] platform_device_add+0x11c/0x230 [] platform_device_register_full+0x10c/0x128 [] ti_cpufreq_init+0x44/0x50 [] do_one_initcall+0x54/0x180 [] kernel_init_freeable+0x270/0x33c [] kernel_init+0x18/0x124 Signed-off-by: Zumeng Chen Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/ti-cpufreq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 699b52528eff8863e2c104d22d444d229236ce62 Author: Arvind Yadav Date: Mon Sep 25 15:43:49 2017 +0530 cpufreq: SPEAr: pr_err() strings should end with newlines pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/spear-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 86d806b55fb9a8b99c8a4802d27c771dabecc206 Author: Arvind Yadav Date: Mon Sep 25 15:10:11 2017 +0530 cpufreq: powernow-k8: pr_err() strings should end with newlines pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/powernow-k8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3eba6e121155d56e2b50305a48fa11749c503a2e Author: Masahiro Yamada Date: Wed Aug 30 00:37:03 2017 +0900 cpufreq: dt-platdev: drop socionext,uniphier-ld6b from whitelist As you see arch/arm/boot/dts/uniphier-ld6b.dtsi, it includes uniphier-pxs2.dtsi, which uses "operating-points-v2" property and whose cpufreq device is automatically created. Signed-off-by: Masahiro Yamada Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt-platdev.c | 2 -- 1 file changed, 2 deletions(-) commit 7813dd6fc75fb375d4caf002e7f80a826fc3153a Author: Viresh Kumar Date: Tue Sep 26 15:12:40 2017 -0700 PM / OPP: Move the OPP directory out of power/ The drivers/base/power/ directory is special and contains code related to power management core like system suspend/resume, hibernation, etc. It was fine to keep the OPP code inside it when we had just one file for it, but it is growing now and already has a directory for itself. Lets move it directly under drivers/ directory, just like cpufreq and cpuidle. Signed-off-by: Viresh Kumar Acked-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki MAINTAINERS | 2 +- drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/base/power/Makefile | 1 - drivers/base/power/opp/Makefile | 4 - drivers/base/power/opp/core.c | 1747 -------------------------------------- drivers/base/power/opp/cpu.c | 236 ----- drivers/base/power/opp/debugfs.c | 249 ------ drivers/base/power/opp/of.c | 633 -------------- drivers/base/power/opp/opp.h | 222 ----- drivers/opp/Kconfig | 13 + drivers/opp/Makefile | 4 + drivers/opp/core.c | 1747 ++++++++++++++++++++++++++++++++++++++ drivers/opp/cpu.c | 236 +++++ drivers/opp/debugfs.c | 249 ++++++ drivers/opp/of.c | 633 ++++++++++++++ drivers/opp/opp.h | 222 +++++ kernel/power/Kconfig | 14 - 18 files changed, 3108 insertions(+), 3107 deletions(-) commit ca67ab5c5afbcec9df199e01838270eb5668af68 Author: Rafael J. Wysocki Date: Sat Sep 30 01:31:15 2017 +0200 PCI / PM: Add dev_dbg() to print device suspend power states It sometimes is useful to know what power states the kernel thinks it puts PCI devices into during system suspend, so add a dev_dbg() statement for that. Signed-off-by: Rafael J. Wysocki Acked-by: Bjorn Helgaas drivers/pci/pci-driver.c | 3 +++ 1 file changed, 3 insertions(+) commit 431ead0ff19b440b1ba25c72d732190b44615cdb Author: Dietmar Eggemann Date: Tue Sep 26 17:41:15 2017 +0100 arm64: wire cpu-invariant accounting support up to the task scheduler Commit 8cd5601c5060 ("sched/fair: Convert arch_scale_cpu_capacity() from weak function to #define") changed the wiring which now has to be done by associating arch_scale_cpu_capacity with the actual implementation provided by the architecture. Define arch_scale_cpu_capacity to use the arch_topology "driver" function topology_get_cpu_scale() for the task scheduler's cpu-invariant accounting instead of the default arch_scale_cpu_capacity() in kernel/sched/sched.h. Signed-off-by: Dietmar Eggemann Acked-by: Catalin Marinas Acked-by: Vincent Guittot Tested-by: Juri Lelli Reviewed-by: Juri Lelli Signed-off-by: Rafael J. Wysocki arch/arm64/include/asm/topology.h | 3 +++ 1 file changed, 3 insertions(+) commit 4e63ebe50d456d7284600822d414d69da35f6977 Author: Dietmar Eggemann Date: Tue Sep 26 17:41:14 2017 +0100 arm64: wire frequency-invariant accounting support up to the task scheduler Commit dfbca41f3479 ("sched: Optimize freq invariant accounting") changed the wiring which now has to be done by associating arch_scale_freq_capacity with the actual implementation provided by the architecture. Define arch_scale_freq_capacity to use the arch_topology "driver" function topology_get_freq_scale() for the task scheduler's frequency-invariant accounting instead of the default arch_scale_freq_capacity() in kernel/sched/sched.h. Signed-off-by: Dietmar Eggemann Acked-by: Catalin Marinas Acked-by: Vincent Guittot Tested-by: Juri Lelli Reviewed-by: Juri Lelli Signed-off-by: Rafael J. Wysocki arch/arm64/include/asm/topology.h | 5 +++++ 1 file changed, 5 insertions(+) commit 552c4653bf89147c945bd676d28d4746c9500002 Author: Dietmar Eggemann Date: Tue Sep 26 17:41:13 2017 +0100 arm: wire cpu-invariant accounting support up to the task scheduler Commit 8cd5601c5060 ("sched/fair: Convert arch_scale_cpu_capacity() from weak function to #define") changed the wiring which now has to be done by associating arch_scale_cpu_capacity with the actual implementation provided by the architecture. Define arch_scale_cpu_capacity to use the arch_topology "driver" function topology_get_cpu_scale() for the task scheduler's cpu-invariant accounting instead of the default arch_scale_cpu_capacity() in kernel/sched/sched.h. Signed-off-by: Dietmar Eggemann Acked-by: Vincent Guittot Acked-by: Russell King Tested-by: Juri Lelli Reviewed-by: Juri Lelli Signed-off-by: Rafael J. Wysocki arch/arm/include/asm/topology.h | 3 +++ 1 file changed, 3 insertions(+) commit 3a1ed9cfaf2849195886b80274008526ff2b5f02 Author: Dietmar Eggemann Date: Tue Sep 26 17:41:12 2017 +0100 arm: wire frequency-invariant accounting support up to the task scheduler Commit dfbca41f3479 ("sched: Optimize freq invariant accounting") changed the wiring which now has to be done by associating arch_scale_freq_capacity with the actual implementation provided by the architecture. Define arch_scale_freq_capacity to use the arch_topology "driver" function topology_get_freq_scale() for the task scheduler's frequency-invariant accounting instead of the default arch_scale_freq_capacity() in kernel/sched/sched.h. Signed-off-by: Dietmar Eggemann Acked-by: Vincent Guittot Acked-by: Russell King Tested-by: Juri Lelli Reviewed-by: Juri Lelli Signed-off-by: Rafael J. Wysocki arch/arm/include/asm/topology.h | 5 +++++ 1 file changed, 5 insertions(+) commit 8216f588b52b61ce36fc0080218e4730435e58b7 Author: Dietmar Eggemann Date: Tue Sep 26 17:41:11 2017 +0100 drivers base/arch_topology: allow inlining cpu-invariant accounting support Allow inlining of topology_get_cpu_scale() into the task scheduler fast path (e.g. __update_load_avg_se()) by coding it as a static inline function in the arch topology header file. Signed-off-by: Dietmar Eggemann Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/base/arch_topology.c | 7 +------ include/linux/arch_topology.h | 8 +++++++- 2 files changed, 8 insertions(+), 7 deletions(-) commit 0e27c567d1673137b06aa96bb7aef635fb657dee Author: Dietmar Eggemann Date: Tue Sep 26 17:41:10 2017 +0100 drivers base/arch_topology: provide frequency-invariant accounting support Implements the arch-specific (arm and arm64) frequency-invariance setter function arch_set_freq_scale() which provides the following frequency scaling factor: current_freq(cpu) << SCHED_CAPACITY_SHIFT / max_supported_freq(cpu) One possible consumer of the frequency-invariance getter function topology_get_freq_scale() is the Per-Entity Load Tracking (PELT) mechanism of the task scheduler. Allow inlining of topology_get_freq_scale() into the task scheduler fast path (e.g. __update_load_avg_se()) by coding it as a static inline function in the arch topology header file. Signed-off-by: Dietmar Eggemann Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/base/arch_topology.c | 14 ++++++++++++++ include/linux/arch_topology.h | 9 +++++++++ 2 files changed, 23 insertions(+) commit 400ec74d3b3784a48b09db9518aa2c4b6d4e497f Author: Dietmar Eggemann Date: Tue Sep 26 17:41:09 2017 +0100 cpufreq: dt: invoke frequency-invariance setter function Call the frequency-invariance setter function arch_set_freq_scale() if the new frequency has been successfully set which is indicated by dev_pm_opp_set_rate() returning 0. Signed-off-by: Dietmar Eggemann Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 518accf2062971344310ee85d7fdab55e8c11337 Author: Dietmar Eggemann Date: Tue Sep 26 17:41:08 2017 +0100 cpufreq: arm_big_little: invoke frequency-invariance setter function Call the frequency-invariance setter function arch_set_freq_scale() if the new frequency has been successfully set which is indicated by bL_cpufreq_set_rate() returning 0. Signed-off-by: Dietmar Eggemann Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/arm_big_little.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit e7d5459dfaf613799915e901189d296bdc7534f9 Author: Dietmar Eggemann Date: Tue Sep 26 17:41:07 2017 +0100 cpufreq: provide default frequency-invariance setter function Frequency-invariant accounting support based on the ratio of current frequency and maximum supported frequency is an optional feature an arch can implement. Since there are cpufreq drivers (e.g. cpufreq-dt) which can be build for different arch's a default implementation of the frequency-invariance setter function arch_set_freq_scale() is needed. This default implementation is an empty weak function which will be overwritten by a strong function in case the arch provides one. The setter function passes the cpumask of related (to the frequency change) cpus (online and offline cpus), the (new) current frequency and the maximum supported frequency. Signed-off-by: Dietmar Eggemann Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq.c | 6 ++++++ include/linux/cpufreq.h | 3 +++ 2 files changed, 9 insertions(+) commit 5408211a8f290ace85147858f4e05e18b942f489 Author: Dietmar Eggemann Date: Tue Sep 26 17:41:06 2017 +0100 drivers base/arch_topology: free cpumask cpus_to_visit Free cpumask cpus_to_visit in case registering init_cpu_capacity_notifier has failed or the parsing of the cpu capacity-dmips-mhz property is done. The cpumask cpus_to_visit is only used inside the notifier call init_cpu_capacity_callback. Reported-by: Vincent Guittot Signed-off-by: Dietmar Eggemann Acked-by: Vincent Guittot Acked-by: Viresh Kumar Tested-by: Juri Lelli Reviewed-by: Juri Lelli Signed-off-by: Rafael J. Wysocki drivers/base/arch_topology.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit ebec44a2456fbe5fe18aae88f6010f6878f0cb4a Merge: 659333d 9e66317 Author: Dave Airlie Date: Tue Oct 3 09:35:04 2017 +1000 BackMerge tag 'v4.14-rc3' into drm-next Linux 4.14-rc3 Requested by Daniel for the tracing build fix in fixes. commit 1bb078330b4f0836b5b12365cd8bf68d5f3bbff8 Merge: 4762424 cdf3888 Author: Russell King Date: Thu Sep 28 11:16:33 2017 +0100 Merge branch 'fdpic' of http://git.linaro.org/people/nicolas.pitre/linux into devel-stable This series provides the needed changes to suport the ELF_FDPIC binary format on ARM. Both MMU and non-MMU systems are supported. This format has many advantages over the BFLT format used on MMU-less systems, such as being real ELF that can be parsed by standard tools, can support shared dynamic libs, etc. commit 4efac6ff4dc7d08ff3a63bf72172cb31323b6a8d Merge: d9601be ab243ec Author: David S. Miller Date: Mon Oct 2 15:16:03 2017 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-10-02 This series contains updates to i40e and i40evf. Shannon Nelson fixes an issue where when a machine has more CPUs than queue pairs, the counting gets a "little funky" and turns off Flow Director. So to correct it, limit the number of LAN queues initially allocated to be sure there are some left for Flow Director and other features. Lihong cleans up dead code by removing a condition check which cannot ever be true. Christophe Jaillet fixes a potential NULL pointer dereference, which could happen if kzalloc() fails. Filip corrects the reporting of supported link modes, which was incorrect for some NICs. Added support for 'ethtool -m' command, which displays information about QSFP+ modules. Mariusz adds functions to read/write the LED registers to control the LEDS, instead of accessing the registers directly whenever the LEDs need to be controlled. Jake fixes a regression where we introduced a scheduling while atomic, so introduce a separate helper function which will manage its own need for the mac_filter_hash_lock. Also cleaned up the "PF" parameter in i40e_vc_disable_vf() since it is never used and is not needed. Fixed a rare case where it is possible that a reset does not occur when i40e_vc_disable_vf() is called, so modify i40e_reset_vf() to return a bool to indicate whether it reset or not so that i40e_vc_disable_vf() can wait until a reset actually occurs. Alan adds the ability for the VF to request more or less underlying allocated queues from the PF. Fixes the incorrect method for clearing the vf_states variable with a NULL assignment, when we should be using atomic bitops since we don't actually want to clear all the flags. Fixed a resource leak, where the PF driver fails to inform clients of a VF reset because we were incorrectly checking the I40E_VF_STATE_PRE_ENABLE bit. Mitch converts i40evf_map_rings_to_vectors() to a void function since it cannot fail and allows us to clean up the checks for the function return value. Scott enables the driver(s) to pass traffic with VLAN tags using the 802.1ad Ethernet protocol. ==================== Signed-off-by: David S. Miller commit 495001c6457124e553ebeec30a42e75367724e4b Author: David Weinehall Date: Tue Aug 8 13:09:52 2017 +0300 drm/i915: Add has_psr-flag to gen9lp While testing Jim Bride's latest batch of PSR patches I noticed that gen9lp doesn't include the has_psr flag, and that our GLK system thus reported PSR as unsupported. This patch simply adds has_psr. Signed-off-by: David Weinehall Acked-by: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20170808100952.26448-1-david.weinehall@linux.intel.com drivers/gpu/drm/i915/i915_pci.c | 1 + 1 file changed, 1 insertion(+) commit be9f6f20fd3cfce49e66dd78d43e875e17a36d53 Author: Andrew F. Davis Date: Fri Sep 29 11:44:29 2017 -0500 ARM: dts: am43xx-epos-evm: Add default pinmux for unused pins Give unused pins a power-friendly default pinmux setting. Signed-off-by: Andrew F. Davis Signed-off-by: Tony Lindgren arch/arm/boot/dts/am43x-epos-evm.dts | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 23c3b671e2465340b244378b1f2d86fa1f163f0e Author: Andrew F. Davis Date: Fri Sep 29 11:44:28 2017 -0500 ARM: dts: am43xx-epos-evm: Add default and sleep pinmux for usb2_phy1 and usb2_phy2 Add default and sleep pinmux for usb2_phy1 and usb2_phy2. Signed-off-by: Andrew F. Davis Signed-off-by: Tony Lindgren arch/arm/boot/dts/am43x-epos-evm.dts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 7f415a61cf7accd5a013e05db55602f81ee65e47 Author: Andrew F. Davis Date: Fri Sep 29 11:44:27 2017 -0500 ARM: dts: am43xx-epos-evm: Add default and sleep pinmux for uart0 Add default and sleep pinmux for uart0. Signed-off-by: Andrew F. Davis Signed-off-by: Tony Lindgren arch/arm/boot/dts/am43x-epos-evm.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 0ba01cb80986148b5b33ddb5a8f294eb97248f4c Author: Kabir Sahane Date: Fri Sep 29 11:44:26 2017 -0500 ARM: dts: am43xx-epos-evm: Add default and sleep pinmux for matrix_keypad0 Add default and sleep pinmux for matrix_keypad0. Signed-off-by: Kabir Sahane Signed-off-by: Andrew F. Davis Signed-off-by: Tony Lindgren arch/arm/boot/dts/am43x-epos-evm.dts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 21b6146fbdb137f9cd58b9a0abb1ea4468b18b9a Author: Andrew F. Davis Date: Fri Sep 29 11:44:25 2017 -0500 ARM: dts: am43xx-epos-evm: Add sleep pinmux for mmc1 Add sleep pinmux for mmc1. Signed-off-by: Andrew F. Davis Signed-off-by: Tony Lindgren arch/arm/boot/dts/am43x-epos-evm.dts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit ac4550708581c770594054aa6c91196e180f8c46 Author: Andrew F. Davis Date: Fri Sep 29 11:44:24 2017 -0500 ARM: dts: am43xx-epos-evm: Add sleep pinmux for pixcir_ts Add sleep pinmux for pixcir_ts. Signed-off-by: Andrew F. Davis Signed-off-by: Tony Lindgren arch/arm/boot/dts/am43x-epos-evm.dts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 74ae6669a6627c755876657d12d72e9aa7bd370f Author: Andrew F. Davis Date: Fri Sep 29 11:44:23 2017 -0500 ARM: dts: am43xx-epos-evm: Add sleep pinmux for gpmc Add sleep pinmux for gpmc. Signed-off-by: Andrew F. Davis Signed-off-by: Tony Lindgren arch/arm/boot/dts/am43x-epos-evm.dts | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit 6aab42b797486c1083c2bc85b1f703374d0499de Author: Andrew F. Davis Date: Fri Sep 29 11:44:22 2017 -0500 ARM: dts: am43xx-epos-evm: Add sleep pinmux for ecap0 Add sleep pinmux for ecap0. Signed-off-by: Andrew F. Davis Signed-off-by: Tony Lindgren arch/arm/boot/dts/am43x-epos-evm.dts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit c582413da79c1935f338c49c73157c68695996c3 Author: Andrew F. Davis Date: Fri Sep 29 11:44:21 2017 -0500 ARM: dts: am43xx-epos-evm: Add sleep pinmux for qspi1 Add sleep pinmux for qspi1. Signed-off-by: Andrew F. Davis Signed-off-by: Tony Lindgren arch/arm/boot/dts/am43x-epos-evm.dts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 4178d4a8e2218198504857b945b6725d17717a24 Author: Andrew F. Davis Date: Fri Sep 29 11:44:20 2017 -0500 ARM: dts: am43xx-epos-evm: Add sleep pinmux for spi0 and spi1 Add sleep pinmux for spi0 and spi1. Signed-off-by: Andrew F. Davis Signed-off-by: Tony Lindgren arch/arm/boot/dts/am43x-epos-evm.dts | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) commit 130c28daf01c8aad5224abfb39f59d892a436222 Author: Andrew F. Davis Date: Fri Sep 29 11:44:19 2017 -0500 ARM: dts: am43xx: Introduce additional pinmux definitions for DS0 AM43xx platform pinmux registers contain bits to set state during suspend (DS0), add these bit definitions here. Signed-off-by: Andrew F. Davis Signed-off-by: Tony Lindgren include/dt-bindings/pinctrl/am43xx.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 10e998ffc928ec08822476e2618a28ae229619eb Author: Bhumika Goyal Date: Mon Sep 18 22:17:10 2017 +0530 ARM: OMAP2+: make omap_dma_dev_info __initdata Make this __initdata as it is only modified only during the initialisation phase in the function omap2_system_dma_init_dev and after this it is not referenced anywhere in the kernel. Signed-off-by: Bhumika Goyal Signed-off-by: Tony Lindgren arch/arm/mach-omap2/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab243ec9401d164531cc9bc07fb32231d72d1280 Author: Scott Peterson Date: Tue Aug 22 06:57:54 2017 -0400 i40e: Stop dropping 802.1ad tags - eth proto 0x88a8 Enable i40e to pass traffic with VLAN tags using the 802.1ad ethernet protocol ID (0x88a8). This requires NIC firmware providing version 1.7 of the API. With older NIC firmware 802.1ad tagged packets will continue to be dropped. No VLAN offloads nor RSS are supported for 802.1ad VLANs. Signed-off-by: Scott Peterson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq.c | 6 ++++++ drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 17 ++++++++++++++++- drivers/net/ethernet/intel/i40e/i40e_common.c | 6 +++++- drivers/net/ethernet/intel/i40e/i40e_main.c | 7 +++++++ drivers/net/ethernet/intel/i40e/i40e_type.h | 6 ++++++ drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 17 ++++++++++++++++- drivers/net/ethernet/intel/i40evf/i40e_type.h | 6 ++++++ 7 files changed, 62 insertions(+), 3 deletions(-) commit c53d11f669c0e7d0daf46a717b6712ad0b09de99 Author: Alan Brady Date: Tue Aug 22 06:57:53 2017 -0400 i40e: fix client notify of VF reset Currently there is a bug in which the PF driver fails to inform clients of a VF reset which then causes clients to leak resources. The bug exists because we were incorrectly checking the I40E_VF_STATE_PRE_ENABLE bit. When a VF is first init we go through a reset to initialize variables and allocate resources but we don't want to inform clients of this first reset since the client isn't fully enabled yet so we set a state bit signifying we're in a "pre-enabled" client state. During the first reset we should be clearing the bit, allowing all following resets to notify the client of the reset when the bit is not set. This patch fixes the issue by negating the 'test_and_clear_bit' check to accurately reflect the behavior we want. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 41d0a4d0c8b144e44d92ea95e975d2434748d806 Author: Alan Brady Date: Tue Aug 22 06:57:52 2017 -0400 i40e: fix handling of vf_states variable Currently we inappropriately clear the vf_states variable with a null assignment. This is problematic because we should be using atomic bitops on this variable and we don't actually want to clear all the flags. We should just clear the ones we know we want to clear. Additionally remove the I40E_VF_STATE_FCOEENA bit because it is no longer being used. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 5 ++++- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) commit 1b7b7596aeebc21913bad49eb6a2c364c4b2988a Author: Mitch Williams Date: Tue Aug 22 06:57:51 2017 -0400 i40e: make i40evf_map_rings_to_vectors void This function cannot fail, so why is it returning a value? And why are we checking it? Why shouldn't we just make it void? Why is this commit message made up of only questions? Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 5b36e8d04b4439c9ceb814bfdfe1284737f9c632 Author: Alan Brady Date: Tue Aug 22 06:57:50 2017 -0400 i40evf: Enable VF to request an alternate queue allocation Currently the VF gets a default number of allocated queues from HW on init and it could choose to enable or disable those allocated queues. This makes it such that the VF can request more or less underlying allocated queues from the PF. First the VF negotiates the number of queues it wants that can be supported by the PF and if successful asks for a reset. During reset the PF will reallocate the HW queues for the VF and will then remap the new queues. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf.h | 4 + drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 38 ++++++++- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 94 ++++++++++++++++++++-- .../net/ethernet/intel/i40evf/i40evf_virtchnl.c | 44 +++++++++- 4 files changed, 173 insertions(+), 7 deletions(-) commit d43d60e5eb9504aa6f8f390aa0313cc8e3816b82 Author: Jacob Keller Date: Tue Aug 22 06:57:49 2017 -0400 i40e: ensure reset occurs when disabling VF It is possible although rare that we may not reset when i40e_vc_disable_vf() is called. This can lead to some weird circumstances with some values not being properly set. Modify i40e_reset_vf() to return a code indicating whether it reset or not. Now, i40e_vc_disable_vf() can wait until a reset actually occurs. If it fails to free up within a reasonable time frame we'll display a warning message. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 42 +++++++++++++++++----- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 4 +-- 2 files changed, 35 insertions(+), 11 deletions(-) commit f18d20218a14d11d8fd6ed32e66ad199c8c93280 Author: Jacob Keller Date: Tue Aug 22 06:57:48 2017 -0400 i40e: make use of i40e_vc_disable_vf Replace i40e_vc_notify_vf_reset and i40e_reset_vf with a call to i40e_vc_disable_vf which does this exact thing. This matches similar code patterns throughout the driver. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit eeeddbb80640ef63466a54bc118f66c81487bc42 Author: Jacob Keller Date: Tue Aug 22 06:57:47 2017 -0400 i40e: drop i40e_pf *pf from i40e_vc_disable_vf() It's never used, and the vf structure could get back to the PF if necessary. Lets just drop the extra unneeded parameter. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit ba4e003d29c1d32776f156695fb00adf7df86ee2 Author: Jacob Keller Date: Tue Aug 22 06:57:46 2017 -0400 i40e: don't hold spinlock while resetting VF When we refactored handling of the PVID in commit 9af52f60b2d9 ("i40e: use (add|rm)_vlan_all_mac helper functions when changing PVID") we introduced a scheduling while atomic regression. This occurred because we now held the spinlock across a call to i40e_reset_vf(), which results in a usleep_range() call that triggers a scheduling while atomic bug. This was rare as it only occurred if the user configured a VLAN on a VF and also attempted to reconfigure the VF from the host system with a port VLAN. We do need to hold the lock while calling i40e_is_vsi_in_vlan(), but we should not be holding it while we reset the VF. We'll fix this by introducing a separate helper function i40e_vsi_has_vlans which checks whether we have a PVID and whether the VSI has configured VLANs. This helper function will manage its own need for the mac_filter_hash_lock. Then, we can move the acquiring of the spinlock until after we reset the VF, which ensures that we do not sleep while holding the lock. Using a separate function like this makes the code more clear and is easier to read than attempting to release and re-acquire the spinlock when we reset the VF. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 36 +++++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) commit 00f6c2f5e20bbdb638e58c50c6e6b1d8b796d6f6 Author: Mariusz Stachura Date: Tue Aug 22 06:57:45 2017 -0400 i40e: use admin queue for setting LEDs behavior Instead of accessing register directly, use newly added AQC in order to blink LEDs. Introduce and utilize a new flag to prevent excessive API version checking. Signed-off-by: Mariusz Stachura Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq.c | 6 ++ drivers/net/ethernet/intel/i40e/i40e_common.c | 115 ++++++++++++++++++++------ drivers/net/ethernet/intel/i40evf/i40e_type.h | 2 + 3 files changed, 99 insertions(+), 24 deletions(-) commit 9c0e5caf6398d6b892dc5046c421890e32ab5fa3 Author: Filip Sadowski Date: Tue Aug 22 06:57:44 2017 -0400 i40e: Add support for 'ethtool -m' This patch adds support for 'ethtool -m' command which displays information about (Q)SFP+ module plugged into NIC's cage. Signed-off-by: Filip Sadowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 18 +++ drivers/net/ethernet/intel/i40e/i40e_common.c | 69 +++++++++ drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 154 +++++++++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_prototype.h | 9 ++ drivers/net/ethernet/intel/i40e/i40e_type.h | 13 ++ .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 18 +++ drivers/net/ethernet/intel/i40evf/i40e_common.c | 69 +++++++++ drivers/net/ethernet/intel/i40evf/i40e_prototype.h | 9 ++ drivers/net/ethernet/intel/i40evf/i40e_type.h | 12 ++ 9 files changed, 371 insertions(+) commit d60bcc798000e015940fb47eb23b79dd2fda5c9e Author: Filip Sadowski Date: Tue Aug 22 06:57:43 2017 -0400 i40e: Fix reporting of supported link modes This patch fixes incorrect reporting of supported link modes on some NICs. Signed-off-by: Filip Sadowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 20 ++++++++++++++++++-- drivers/net/ethernet/intel/i40e/i40e_common.c | 11 ++++++++++- drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 20 ++++++++++++++++++-- 3 files changed, 46 insertions(+), 5 deletions(-) commit 54902349ee95045b67e2f0c39b75f5418540064b Author: Christophe JAILLET Date: Sun Aug 6 23:37:01 2017 +0200 i40e: Fix a potential NULL pointer dereference If 'kzalloc()' fails, a NULL pointer will be dereferenced. Return an error code (-ENOMEM) instead. Signed-off-by: Christophe JAILLET Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 3 +++ 1 file changed, 3 insertions(+) commit 5872866e166c38ad1c1028fb9cf7dd756c0ef43e Author: Lihong Yang Date: Thu Jul 27 03:17:09 2017 -0700 i40e: remove logically dead code This patch removes the !vf condition check that cannot be true in i40e_ndo_set_vf_trust function Detected by CoverityScan, CID 1397531 Logically dead code Signed-off-by: Lihong Yang Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 -- 1 file changed, 2 deletions(-) commit e50d5751c807853cd0fce0b5c46479cc6274014f Author: Shannon Nelson Date: Mon Jul 24 18:17:42 2017 -0700 i40e: limit lan queue count in large CPU count machine When a machine has more CPUs than queue pairs, e.g. 512 cores, the counting gets a little funky and turns off Flow Director with the message: not enough queues for Flow Director. Flow Director feature is disabled This patch limits the number of lan queues initially allocated to be sure we have some left for FD and other features. Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit cf14dd05fa1189af7ce6e7d5f46f89814786f277 Author: Vishal Mahaveer Date: Wed Aug 30 21:40:29 2017 -0500 ARM: DRA722: Add support for DRA71x Silicon Rev 2.1 DRA71x processors are reduced pin and software compatible derivative of DRA72 processors. Silicon Rev 2.1 is a minor variant of DRA71x Rev 2.0 with various fixes including the following: - NAND boot fixes - ROM update for secure boot crypto enhancement Signed-off-by: Vishal Mahaveer Signed-off-by: Tony Lindgren arch/arm/mach-omap2/id.c | 5 ++++- arch/arm/mach-omap2/soc.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit d44223a36a30f070e5d2052880f86eeda0dc1c53 Author: Vishal Mahaveer Date: Wed Aug 30 21:40:28 2017 -0500 ARM: DRA722: remove redundant definition of 1.0 device Remove duplicate definition of Rev 1.0 device. Fixes: 81032e34e184 ("ARM: DRA752: Add ID detect for ES2.0") Signed-off-by: Vishal Mahaveer Acked-by: Nishanth Menon Signed-off-by: Tony Lindgren arch/arm/mach-omap2/soc.h | 1 - 1 file changed, 1 deletion(-) commit d25c70cfebaea59a6c8c4966e9a75f5c750131bd Author: Bhumika Goyal Date: Tue Aug 22 11:55:50 2017 +0530 ARM: omap1: add const and initconst to omap_lcd_config Make these const as they are only passed to a const argument of the function omapfb_set_lcd_config. Also, replace __initdata with __initconst to avoid section conflict error. Done using Coccinelle. @match disable optional_qualifier@ identifier s; @@ static struct omap_lcd_config s = {...}; @ref@ position p; identifier match.s; @@ s@p @good1@ identifier match.s; position ref.p; @@ omapfb_set_lcd_config(&s@p,...) @bad depends on !good1@ position ref.p; identifier match.s; @@ s@p @depends on forall !bad disable optional_qualifier@ identifier match.s; @@ static + const struct omap_lcd_config s; Signed-off-by: Bhumika Goyal Signed-off-by: Tony Lindgren arch/arm/mach-omap1/board-ams-delta.c | 2 +- arch/arm/mach-omap1/board-fsample.c | 2 +- arch/arm/mach-omap1/board-h2.c | 2 +- arch/arm/mach-omap1/board-h3.c | 2 +- arch/arm/mach-omap1/board-htcherald.c | 2 +- arch/arm/mach-omap1/board-innovator.c | 4 ++-- arch/arm/mach-omap1/board-nokia770.c | 2 +- arch/arm/mach-omap1/board-osk.c | 2 +- arch/arm/mach-omap1/board-palmte.c | 2 +- arch/arm/mach-omap1/board-palmtt.c | 2 +- arch/arm/mach-omap1/board-palmz71.c | 2 +- arch/arm/mach-omap1/board-perseus2.c | 2 +- arch/arm/mach-omap1/board-sx1.c | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) commit d9601be13cc4903faf0c657be0cd8c9d4a946427 Merge: c4b3630 0491439 Author: David S. Miller Date: Mon Oct 2 11:59:34 2017 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2017-10-02 This series contains updates to fm10k only. Jake provides all but one of the changes in this series. Most are small fixes, starting with ensuring prompt transmission of messages queued up after each VF message is received and handled. Fix a possible race condition between the watchdog task and the processing of mailbox messages by just checking whether the mailbox is still open. Fix a couple of GCC v7 warnings, including misspelled "fall through" comments and warnings about possible truncation of calls to snprintf(). Cleaned up a convoluted bitshift and read for the PFVFLRE register. Fixed a potential divide by zero when finding the proper r_idx. Markus Elfring fixes an issue which was found using Coccinelle, where we should have been using seq_putc() instead of seq_puts(). ==================== Signed-off-by: David S. Miller commit 79d40370e8d31886a9413e2ee115fc426b4ae97e Author: Bhumika Goyal Date: Sat Sep 30 21:47:24 2017 +0530 vfio-mdev/samples: make mdev_fops const and static Make this const as it is only passed to a const argument of the function mdev_register_device. Make it static as it is not referenced in any other file. Structure found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal Signed-off-by: Alex Williamson samples/vfio-mdev/mtty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c2fefd882d3666f11447e3e0fe663a8a7f64cc9 Author: Alexey Kardashevskiy Date: Mon Oct 2 12:39:11 2017 -0600 vfio/spapr: Add cond_resched() for huge updates Clearing very big IOMMU tables can trigger soft lockups. This adds cond_resched() to allow the scheduler to do context switching when it decides to. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Alex Williamson drivers/vfio/vfio_iommu_spapr_tce.c | 2 ++ 1 file changed, 2 insertions(+) commit cf0d53ba4947aad6e471491d5b20a567cbe92e56 Author: Alex Williamson Date: Mon Oct 2 12:39:10 2017 -0600 vfio/pci: Virtualize Maximum Read Request Size MRRS defines the maximum read request size a device is allowed to make. Drivers will often increase this to allow more data transfer with a single request. Completions to this request are bound by the MPS setting for the bus. Aside from device quirks (none known), it doesn't seem to make sense to set an MRRS value less than MPS, yet this is a likely scenario given that user drivers do not have a system-wide view of the PCI topology. Virtualize MRRS such that the user can set MRRS >= MPS, but use MPS as the floor value that we'll write to hardware. Signed-off-by: Alex Williamson drivers/vfio/pci/vfio_pci_config.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 523184972b282cd9ca17a76f6ca4742394856818 Author: Alex Williamson Date: Mon Oct 2 12:39:09 2017 -0600 vfio/pci: Virtualize Maximum Payload Size With virtual PCI-Express chipsets, we now see userspace/guest drivers trying to match the physical MPS setting to a virtual downstream port. Of course a lone physical device surrounded by virtual interconnects cannot make a correct decision for a proper MPS setting. Instead, let's virtualize the MPS control register so that writes through to hardware are disallowed. Userspace drivers like QEMU assume they can write anything to the device and we'll filter out anything dangerous. Since mismatched MPS can lead to AER and other faults, let's add it to the kernel side rather than relying on userspace virtualization to handle it. Signed-off-by: Alex Williamson Reviewed-by: Eric Auger drivers/vfio/pci/vfio_pci_config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit c4b3630afffca55faab67da1d347a22d27318a39 Merge: 1dd236f c024297 Author: David S. Miller Date: Mon Oct 2 11:24:42 2017 -0700 Merge branch 'Thunderbolt-networking' Mika Westerberg says: ==================== Thunderbolt networking In addition of tunneling PCIe, Display Port and USB traffic, Thunderbolt allows connecting two hosts (domains) over a Thunderbolt cable. It is possible to tunnel arbitrary data packets over such connection using high-speed DMA rings available in the Thunderbolt host controller. In order to discover Thunderbolt services the other host supports, there is a software protocol running on top of the automatically configured control channel (ring 0). This protocol is called XDomain discovery protocol and it uses XDomain properties to describe the host (domain) and the services it supports. Once both sides have agreed what services are supported they can enable high-speed DMA rings to transfer data over the cable. This series adds support for the XDomain protocol so that we expose each remote connection as Thunderbolt XDomain device and each service as Thunderbolt service device. On top of that we create an API that allows writing drivers for these services and finally we provide an example Thunderbolt service driver that creates virtual ethernet inferface that allows tunneling networking packets over Thunderbolt cable. The API could be used for creating other future Thunderbolt services, such as tunneling SCSI over Thunderbolt, for example. The XDomain protocol and networking support is also available in macOS and Windows so this makes it possible to connect Linux to macOS and Windows as well. The patches are based on previous Thunderbolt networking patch series by Amir Levy and Michael Jamet, that can be found here: https://lwn.net/Articles/705998/ The main difference to that patch series is that we have the XDomain protocol running in the kernel now so there is no need for a separate userspace daemon. Note this does not affect the existing functionality, so security levels and NVM firmware upgrade continue to work as before (with the small exception that now sysfs also shows the XDomain connections and services in addition to normal Thunderbolt devices). It is also possible to connect up to 5 Thunderbolt devices and then another host, and the network driver works exactly the same. This is third version of the patch series. The previous versions can be be found here: v2: https://lkml.org/lkml/2017/9/25/225 v1: https://lwn.net/Articles/734019/ Changes from the v2: * Add comment regarding calculation of interrupt throttling value * Add UUIDs as strings in comments on top of each declaration * Add a patch removing __packed from existing ICM messages. They are all 32-bit aligned and should pack fine without the __packed. * Move adding MAINTAINERS entries to a separate patches * Added Michael and Yehezkel to be maintainers of the network driver * Remove __packed from the new ICM messages. They should pack fine as well without it. * Call register_netdev() after all other initialization is done in the network driver. * Use build_skb() instead of copying. We allocate order 1 page here to leave room for SKB shared info required by build_skb(). However, we do not leave room for full NET_SKB_PAD because the NHI hardware does not cope well if a frame crosses 4kB boundary. According comments in __build_skb() that should still be fine. * Added Reviewed-by tag from Andy. Changes from the v1: * Add include/linux/thunderbolt.h to MAINTAINERS * Correct Linux version and date of new sysfs entries in Documentation/ABI/testing/sysfs-bus-thunderbolt * Move network driver from drivers/thunderbolt/net.c to drivers/net/thunderbolt.c and update it to follow coding style in drivers/net/*. * Add MAINTAINERS entry for the network driver * Minor cleanups In case someone wants to try this out, the last patch adds documentation how the networking driver can be used. In short, if you connect Linux to a macOS or Windows, everything is done automatically (as those systems have the networking service enabled by default). For Linux to Linux connection one host needs to load the networking driver first (so that the other side can locate the networking service and load the corresponding driver). ==================== Signed-off-by: David S. Miller commit c024297e7be34b6f0e578afc76c5b9f7708a5832 Author: Mika Westerberg Date: Mon Oct 2 13:38:46 2017 +0300 MAINTAINERS: Add entry for Thunderbolt network driver I will be maintaining the Thunderbolt network driver along with Michael and Yehezkel. Signed-off-by: Michael Jamet Signed-off-by: Yehezkel Bernat Signed-off-by: Mika Westerberg Signed-off-by: David S. Miller MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) commit e69b6c02b4c3b8d03be7136f90dd9551ad5a5a5e Author: Amir Levy Date: Mon Oct 2 13:38:45 2017 +0300 net: Add support for networking over Thunderbolt cable ThunderboltIP is a protocol created by Apple to tunnel IP/ethernet traffic over a Thunderbolt cable. The protocol consists of configuration phase where each side sends ThunderboltIP login packets (the protocol is determined by UUID in the XDomain packet header) over the configuration channel. Once both sides get positive acknowledgment to their login packet, they configure high-speed DMA path accordingly. This DMA path is then used to transmit and receive networking traffic. This patch creates a virtual ethernet interface the host software can use in the same way as any other networking interface. Once the interface is brought up successfully network packets get tunneled over the Thunderbolt cable to the remote host and back. The connection is terminated by sending a ThunderboltIP logout packet over the configuration channel. We do this when the network interface is brought down by user or the driver is unloaded. Signed-off-by: Amir Levy Signed-off-by: Michael Jamet Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller Documentation/admin-guide/thunderbolt.rst | 24 + drivers/net/Kconfig | 12 + drivers/net/Makefile | 3 + drivers/net/thunderbolt.c | 1362 +++++++++++++++++++++++++++++ 4 files changed, 1401 insertions(+) commit 467cd25bf2aec14c2e2990512248b72f46f94c53 Author: Mika Westerberg Date: Mon Oct 2 13:38:44 2017 +0300 MAINTAINERS: Add thunderbolt.h to the Thunderbolt driver entry The new API header (include/linux/thunderbolt.h) is maintained by the Thunderbolt driver maintainers. Signed-off-by: Mika Westerberg Reviewed-by: Michael Jamet Reviewed-by: Yehezkel Bernat Signed-off-by: David S. Miller MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 9a01c7c26cf7cbd1f58d06319e798833e85ff550 Author: Mika Westerberg Date: Mon Oct 2 13:38:43 2017 +0300 thunderbolt: Allocate ring HopID automatically if requested Thunderbolt services should not care which HopID (ring) they use for sending and receiving packets over the high-speed DMA path, so make tb_ring_alloc_rx() and tb_ring_alloc_tx() accept negative HopID. This means that the NHI will allocate next available HopID for the caller automatically. These HopIDs will be allocated from the range which is not reserved for the Thunderbolt protocol (8 .. hop_count - 1). The allocated HopID can be retrieved from ring->hop field after the ring has been allocated successfully if needed. Signed-off-by: Mika Westerberg Reviewed-by: Michael Jamet Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/thunderbolt/nhi.c | 78 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 60 insertions(+), 18 deletions(-) commit 3304559e353f098d7e0ed5ca981e26c406513e12 Author: Mika Westerberg Date: Mon Oct 2 13:38:42 2017 +0300 thunderbolt: Add function to retrieve DMA device for the ring This is needed when Thunderbolt service drivers need to DMA map memory before it is passed down to the ring. Signed-off-by: Mika Westerberg Reviewed-by: Michael Jamet Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller include/linux/thunderbolt.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 4ffe722eefcb07c76701f03e0d759fbaecedf79f Author: Mika Westerberg Date: Mon Oct 2 13:38:41 2017 +0300 thunderbolt: Add polling mode for rings In order to support things like networking over Thunderbolt cable, there needs to be a way to switch the ring to a mode where it can be polled with the interrupt masked. We implement such mode so that the caller can allocate a ring by passing pointer to a function that is then called when an interrupt is triggered. Completed frames can be fetched using tb_ring_poll() and the interrupt can be re-enabled when the caller is finished with polling by using tb_ring_poll_complete(). Signed-off-by: Mika Westerberg Reviewed-by: Michael Jamet Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/thunderbolt/ctl.c | 2 +- drivers/thunderbolt/nhi.c | 126 ++++++++++++++++++++++++++++++++++++++++---- include/linux/thunderbolt.h | 23 +++++--- 3 files changed, 134 insertions(+), 17 deletions(-) commit 59120e06101db72442acf4c8b364a0c76d8faa68 Author: Mika Westerberg Date: Mon Oct 2 13:38:40 2017 +0300 thunderbolt: Use spinlock in NHI serialization This is needed because ring polling functionality can be called from atomic contexts when networking and other high-speed traffic is transferred over a Thunderbolt cable. Signed-off-by: Mika Westerberg Reviewed-by: Michael Jamet Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/thunderbolt/nhi.c | 75 +++++++++++++++++++++++++-------------------- include/linux/thunderbolt.h | 2 +- 2 files changed, 42 insertions(+), 35 deletions(-) commit 22b7de1000e66d739c431d6be4e7e97c69fa7c98 Author: Mika Westerberg Date: Mon Oct 2 13:38:39 2017 +0300 thunderbolt: Use spinlock in ring serialization This makes it possible to enqueue frames also from atomic context which is needed for example, when networking packets are sent over a Thunderbolt cable. Signed-off-by: Mika Westerberg Reviewed-by: Michael Jamet Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/thunderbolt/nhi.c | 26 ++++++++++++++------------ include/linux/thunderbolt.h | 2 +- 2 files changed, 15 insertions(+), 13 deletions(-) commit 2a91ec63f8a11e70d4b958dd4df867fec0247179 Author: Mika Westerberg Date: Mon Oct 2 13:38:38 2017 +0300 thunderbolt: Move ring descriptor flags to thunderbolt.h A Thunderbolt service driver might need to check if there was an error with the descriptor when in frame mode. We also add two Rx specific error flags RING_DESC_CRC_ERROR and RING_DESC_BUFFER_OVERRUN. Signed-off-by: Mika Westerberg Reviewed-by: Michael Jamet Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/thunderbolt/nhi_regs.h | 7 ------- include/linux/thunderbolt.h | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 7 deletions(-) commit 3b3d9f4da96493e4f68d0a80ab210763a24f8b33 Author: Mika Westerberg Date: Mon Oct 2 13:38:37 2017 +0300 thunderbolt: Export ring handling functions to modules These are used by Thunderbolt services to send and receive frames over the high-speed DMA rings. We also put the functions to tb_ namespace to make sure we do not collide with others and add missing kernel-doc comments for the exported functions. Signed-off-by: Mika Westerberg Reviewed-by: Michael Jamet Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/thunderbolt/ctl.c | 20 +++--- drivers/thunderbolt/nhi.c | 62 +++++++++++------ drivers/thunderbolt/nhi.h | 147 +---------------------------------------- include/linux/thunderbolt.h | 158 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 211 insertions(+), 176 deletions(-) commit 9fb1e654dcf781e71a0ea7c5bdfea3ba85d1d06d Author: Mika Westerberg Date: Mon Oct 2 13:38:36 2017 +0300 thunderbolt: Add support for frame mode When high-speed DMA paths are used to transfer arbitrary data over a Thunderbolt link, DMA rings should be in frame mode instead of raw mode. The latter is used by the control channel (ring 0). In frame mode each data frame can hold up to 4kB payload. This patch modifies the DMA ring code to allow configuring a ring to be in frame mode by passing a new flag (RING_FLAG_FRAME) to the ring when it is allocated. In addition there might be need to enable end-to-end (E2E) workaround for the ring to prevent losing Rx frames in certain situations. We add another flag (RING_FLAG_E2E) that can be used for this purpose. 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: David S. Miller drivers/thunderbolt/ctl.c | 3 +- drivers/thunderbolt/nhi.c | 76 ++++++++++++++++++++++++++---------------- drivers/thunderbolt/nhi.h | 10 +++++- drivers/thunderbolt/nhi_regs.h | 2 ++ 4 files changed, 61 insertions(+), 30 deletions(-) commit 8c6bba10fb9262d7b3a11e86a40621d5b37810a6 Author: Mika Westerberg Date: Mon Oct 2 13:38:35 2017 +0300 thunderbolt: Configure interrupt throttling for all interrupts This will keep the interrupt delivery rate reasonable. The value used here (128 us) is a recommendation from the hardware people. 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: David S. Miller drivers/thunderbolt/nhi.c | 23 ++++++++++++++++++++--- drivers/thunderbolt/nhi_regs.h | 2 ++ 2 files changed, 22 insertions(+), 3 deletions(-) commit d1ff70241a275133e1a0258b7c23588b122276c8 Author: Mika Westerberg Date: Mon Oct 2 13:38:34 2017 +0300 thunderbolt: Add support for XDomain discovery protocol When two hosts are connected over a Thunderbolt cable, there is a protocol they can use to communicate capabilities supported by the host. The discovery protocol uses automatically configured control channel (ring 0) and is build on top of request/response transactions using special XDomain primitives provided by the Thunderbolt base protocol. The capabilities consists of a root directory block of basic properties used for identification of the host, and then there can be zero or more directories each describing a Thunderbolt service and its capabilities. Once both sides have discovered what is supported the two hosts can setup high-speed DMA paths and transfer data to the other side using whatever protocol was agreed based on the properties. The software protocol used to communicate which DMA paths to enable is service specific. This patch adds support for the XDomain discovery protocol to the Thunderbolt bus. We model each remote host connection as a Linux XDomain device. For each Thunderbolt service found supported on the XDomain device, we create Linux Thunderbolt service device which Thunderbolt service drivers can then bind to based on the protocol identification information retrieved from the property directory describing the service. 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: David S. Miller Documentation/ABI/testing/sysfs-bus-thunderbolt | 48 + drivers/thunderbolt/Makefile | 2 +- drivers/thunderbolt/ctl.c | 11 +- drivers/thunderbolt/ctl.h | 2 +- drivers/thunderbolt/domain.c | 197 ++- drivers/thunderbolt/icm.c | 218 +++- drivers/thunderbolt/nhi.h | 2 + drivers/thunderbolt/switch.c | 7 +- drivers/thunderbolt/tb.h | 39 +- drivers/thunderbolt/tb_msgs.h | 123 ++ drivers/thunderbolt/xdomain.c | 1576 +++++++++++++++++++++++ include/linux/mod_devicetable.h | 26 + include/linux/thunderbolt.h | 242 ++++ scripts/mod/devicetable-offsets.c | 7 + scripts/mod/file2alias.c | 25 + 15 files changed, 2507 insertions(+), 18 deletions(-) commit e69b71f8458b78a2ef44e3d07374a8f46e45123d Author: Mika Westerberg Date: Mon Oct 2 13:38:33 2017 +0300 thunderbolt: Move tb_switch_phy_port_from_link() to thunderbolt.h A Thunderbolt service might need to find the physical port from a link the cable is connected to. For instance networking driver uses this information to generate MAC address according the Apple ThunderboltIP protocol. Move this function to thunderbolt.h and rename it to tb_phy_port_from_link() to reflect the fact that it does not take switch as parameter. Signed-off-by: Mika Westerberg Reviewed-by: Michael Jamet Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/thunderbolt/icm.c | 2 +- drivers/thunderbolt/tb.h | 7 ------- include/linux/thunderbolt.h | 7 +++++++ 3 files changed, 8 insertions(+), 8 deletions(-) commit 9e99b9f4d5c36340dabda6d14053195b2a43796b Author: Mika Westerberg Date: Mon Oct 2 13:38:32 2017 +0300 thunderbolt: Move thunderbolt domain structure to thunderbolt.h These are needed by Thunderbolt services so move them to thunderbolt.h to make sure they are available outside of drivers/thunderbolt. Signed-off-by: Mika Westerberg Reviewed-by: Michael Jamet Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/thunderbolt/tb.h | 42 ------------------------------------------ include/linux/thunderbolt.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 42 deletions(-) commit eaf8ff35a345449207ad116e2574c19780ec9a98 Author: Mika Westerberg Date: Mon Oct 2 13:38:31 2017 +0300 thunderbolt: Move enum tb_cfg_pkg_type to thunderbolt.h These will be needed by Thunderbolt services when sending and receiving XDomain control messages. While there change TB_CFG_PKG_PREPARE_TO_SLEEP value to be decimal in order to be consistent with other members. Signed-off-by: Mika Westerberg Reviewed-by: Michael Jamet Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/thunderbolt/ctl.h | 1 + drivers/thunderbolt/tb_msgs.h | 17 ----------------- include/linux/thunderbolt.h | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 17 deletions(-) commit cdae7c07e3e3509eaabc18c1640a55dc5b99c179 Author: Mika Westerberg Date: Mon Oct 2 13:38:30 2017 +0300 thunderbolt: Add support for XDomain properties Thunderbolt XDomain discovery protocol uses directories which contain properties and other directories to exchange information about what capabilities the remote host supports. This also includes identification information like device ID and name. This adds support for parsing and formatting these properties and establishes an API drivers can use in addition to the core Thunderbolt driver. This API is exposed in a new header: include/linux/thunderbolt.h. 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: David S. Miller drivers/thunderbolt/Makefile | 2 +- drivers/thunderbolt/property.c | 670 +++++++++++++++++++++++++++++++++++++++++ include/linux/thunderbolt.h | 89 ++++++ 3 files changed, 760 insertions(+), 1 deletion(-) commit 806717081ab6088957c4857d42941159a07cc571 Author: Mika Westerberg Date: Mon Oct 2 13:38:29 2017 +0300 thunderbolt: Remove __packed from ICM message structures These messages are all 32-bit aligned and they should be packed without the __packed attribute just fine. It also allows compiler to generate better code on some architectures. Signed-off-by: Mika Westerberg Reviewed-by: Michael Jamet Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/thunderbolt/tb_msgs.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit f2f2efb807d339513199b1bb771806c90cce83ae Author: Mika Westerberg Date: Mon Oct 2 13:38:28 2017 +0300 byteorder: Move {cpu_to_be32, be32_to_cpu}_array() from Thunderbolt to core We will be using these when communicating XDomain discovery protocol over Thunderbolt link but they might be useful for other drivers as well. Make them available through byteorder/generic.h. Suggested-by: Andy Shevchenko Signed-off-by: Mika Westerberg Reviewed-by: Michael Jamet Reviewed-by: Yehezkel Bernat Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller drivers/thunderbolt/ctl.c | 14 -------------- include/linux/byteorder/generic.h | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 14 deletions(-) commit 1dd236fda0c500a21c54f2140dadc488cde9265b Merge: 6227efc1 85f44a1 Author: David S. Miller Date: Mon Oct 2 11:20:22 2017 -0700 Merge branch 'mlxsw-Fixlets' Jiri Pirko says: ==================== mlxsw: Fixlets Couple of small nit fixes from Petr ==================== Signed-off-by: David S. Miller commit 85f44a15b1920babc2d28c11f514f5b217a29968 Author: Petr Machata Date: Mon Oct 2 12:21:58 2017 +0200 mlxsw: spectrum_router: Drop a redundant condition Signed-off-by: Petr Machata Reviewed-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 7ff176f81dd4675d08951d2395c7ddb1d9974da6 Author: Petr Machata Date: Mon Oct 2 12:21:57 2017 +0200 mlxsw: spectrum_router: Fix a typo Signed-off-by: Petr Machata 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 6227efc1a20b24a21ce8e9122c0569696d644aff Author: Florian Westphal Date: Mon Oct 2 12:05:29 2017 +0200 selftests: rtnetlink.sh: add vxlan and fou test cases fou test lifted from ip-fou man page. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller tools/testing/selftests/net/rtnetlink.sh | 96 ++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) commit 08e209154d08b19b8315026b50bca990837e71ac Merge: 0929567 a38402b Author: David S. Miller Date: Mon Oct 2 11:06:08 2017 -0700 Merge branch 'flow_dissector-dissect-tunnel-info' Simon Horman says: ==================== flow_dissector: dissect tunnel info Move dissection of tunnel info from the flower classifier to the flow dissector where all other dissection occurs. This should not have any behavioural affect on other users of the flow dissector. ==================== Signed-off-by: David S. Miller commit a38402bc50709aac76796a955a15152a76e3fd4e Author: Simon Horman Date: Mon Oct 2 10:41:16 2017 +0200 flow_dissector: dissect tunnel info Move dissection of tunnel info from the flower classifier to the flow dissector where all other dissection occurs. This should not have any behavioural affect on other users of the flow dissector. Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski Acked-by: Jiri Pirko Signed-off-by: David S. Miller net/core/flow_dissector.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++ net/sched/cls_flower.c | 25 ------------ 2 files changed, 100 insertions(+), 25 deletions(-) commit 32f16369e59fcc505c5ed93a6a8cad3d5636b463 Author: Simon Horman Date: Mon Oct 2 10:41:15 2017 +0200 net/dst: Make skb parameter of skb{metadata_dst, tunnel_info}() const Make the skb parameter of skb_metadata_dst() and skb_tunnel_info() const as they are not modified. This is in preparation for using them in call-sites where skb is const. Signed-off-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller include/net/dst_metadata.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit a99897f550de96841aecb811455a67ad7a4e39a7 Author: Marek Szyprowski Date: Mon Oct 2 08:39:35 2017 +0200 ARM: exynos_defconfig: Enable UAS support for Odroid HC1 board Odroid HC1 board has built-in JMicron USB to SATA bridge, which supports UAS protocol. Compile-in support for it (instead of enabling it as module) to make sure that all built-in storage devices are available for rootfs. The bridge itself also supports fallback to standard USB Mass Storage protocol, but USB Mass Storage class doesn't bind to it when UAS is compiled as module and modules are not (yet) available. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/configs/exynos_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ac49427b566ba9a73d1bf9cc1ffbc5c45ca30c5 Author: Marek Szyprowski Date: Mon Oct 2 08:39:34 2017 +0200 ARM: dts: exynos: Add support for Hardkernel's Odroid HC1 board Odroid HC1 board is based on Odroid XU4 board, but it has no HDMI, no eMMC, no built-in USB3.0 hub, no extension port pins, and no GPIO button. USB3.0 ports are used for built-in JMicron USB to SATA bridge and Gigabit R8152 ethernet chips. HC1 uses only passive cooling. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 443 +++++++++++++++++++++ arch/arm/boot/dts/exynos5422-odroidhc1.dts | 213 ++++++++++ arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 428 +------------------- 4 files changed, 658 insertions(+), 427 deletions(-) commit 22905582f6dd4bbd0c370fe5732c607452010c04 Author: Thomas Richter Date: Wed Sep 13 10:12:09 2017 +0200 perf test attr: Fix ignored test case result Command perf test -v 16 (Setup struct perf_event_attr test) always reports success even if the test case fails. It works correctly if you also specify -F (for don't fork). root@s35lp76 perf]# ./perf test -v 16 15: Setup struct perf_event_attr : --- start --- running './tests/attr/test-record-no-delay' [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.002 MB /tmp/tmp4E1h7R/perf.data (1 samples) ] expected task=0, got 1 expected precise_ip=0, got 3 expected wakeup_events=1, got 0 FAILED './tests/attr/test-record-no-delay' - match failure test child finished with 0 ---- end ---- Setup struct perf_event_attr: Ok The reason for the wrong error reporting is the return value of the system() library call. It is called in run_dir() file tests/attr.c and returns the exit status, in above case 0xff00. This value is given as parameter to the exit() function which can only handle values 0-0xff. The child process terminates with exit value of 0 and the parent does not detect any error. This patch corrects the error reporting and prints the correct test result. Signed-off-by: Thomas-Mich Richter Acked-by: Jiri Olsa Cc: Heiko Carstens Cc: Hendrik Brueckner Cc: Martin Schwidefsky Cc: Thomas-Mich Richter LPU-Reference: 20170913081209.39570-2-tmricht@linux.vnet.ibm.com Link: http://lkml.kernel.org/n/tip-rdube6rfcjsr1nzue72c7lqn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3440fe2790aa3d13530260af6033533b18959aee Author: Thomas Richter Date: Wed Sep 13 10:12:08 2017 +0200 perf test attr: Fix python error on empty result Commit d78ada4a767 ("perf tests attr: Do not store failed events") does not create an event file in the /tmp directory when the perf_open_event() system call failed. This can lead to a situation where not /tmp/event-xx-yy-zz result file exists at all (for example on a s390x virtual machine environment) where no CPUMF hardware is available. The following command then fails with a python call back chain instead of printing failure: [root@s8360046 perf]# /usr/bin/python2 ./tests/attr.py -d ./tests/attr/ \ -p ./perf -v -ttest-stat-basic running './tests/attr//test-stat-basic' Traceback (most recent call last): File "./tests/attr.py", line 379, in main() File "./tests/attr.py", line 370, in main run_tests(options) File "./tests/attr.py", line 311, in run_tests Test(f, options).run() File "./tests/attr.py", line 300, in run self.compare(self.expect, self.result) File "./tests/attr.py", line 248, in compare exp_event.diff(res_event) UnboundLocalError: local variable 'res_event' referenced before assignment [root@s8360046 perf]# This patch catches this pitfall and prints an error message instead: [root@s8360047 perf]# /usr/bin/python2 ./tests/attr.py -d ./tests/attr/ \ -p ./perf -vvv -ttest-stat-basic running './tests/attr//test-stat-basic' loading expected events Event event:base-stat fd = 1 group_fd = -1 flags = 0|8 [....] sample_regs_user = 0 sample_stack_user = 0 'PERF_TEST_ATTR=/tmp/tmpJbMQMP ./perf stat -o /tmp/tmpJbMQMP/perf.data -e cycles kill >/dev/null 2>&1' ret '1', expected '1' loading result events compare matching [event:base-stat] match: [event:base-stat] matches [] res_event is empty FAILED './tests/attr//test-stat-basic' - match failure [root@s8360047 perf]# Signed-off-by: Thomas-Mich Richter Acked-by: Jiri Olsa Cc: Heiko Carstens Cc: Hendrik Brueckner Cc: Martin Schwidefsky Cc: Thomas-Mich Richter LPU-Reference: 20170913081209.39570-1-tmricht@linux.vnet.ibm.com Link: http://lkml.kernel.org/n/tip-04d63nn7svfgxdhi60gq2mlm@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/attr.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 10836d9f9ac63d40ccfa756f871ce4ed51ae3b52 Author: Jiri Olsa Date: Mon Jul 3 16:50:30 2017 +0200 perf tests attr: Fix task term values The perf_event_attr::task is 1 by default for first (tracking) event in the session. Setting task=1 as default and adding task=0 for cases that need it. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas-Mich Richter Link: http://lkml.kernel.org/r/20170703145030.12903-16-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/attr/base-record | 2 +- tools/perf/tests/attr/test-record-group | 1 + tools/perf/tests/attr/test-record-group-sampling | 2 +- tools/perf/tests/attr/test-record-group1 | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) commit c976a7d6db215481261b63a89a408cb265a9812b Merge: a47ba4d 1addcd5 Author: Arnaldo Carvalho de Melo Date: Mon Oct 2 13:58:12 2017 -0300 Merge remote-tracking branch 'tip/perf/urgent' into perf/core, to pick up fixes Signed-off-by: Arnaldo Carvalho de Melo commit 8df82c13a3756f831b0d748226ce932515728e04 Author: Bhumika Goyal Date: Sat Sep 30 22:10:40 2017 +0530 libata: make ata_port_type const Make this const as it is only stored in the const field of a device structure. Make the declaration in header const too. Structure found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 2 +- drivers/ata/libata.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 04914390f5a197da1e042f585e1263ad8ebff632 Author: Jacob Keller Date: Mon Jul 10 13:23:13 2017 -0700 fm10k: prevent race condition of __FM10K_SERVICE_SCHED Although very unlikely, it is possible that cancel_work_sync() may stop the service_task before it actually started. In this case, the __FM10K_SERVICE_SCHED bit will never be cleared. This results in the service task being unable to reschedule in the future. Add a helper function which sets the service disable bit, waits for the service task to stop and clears the schedule bit, thus avoiding the race condition. We know the schedule bit is safe to clear because the cancel_work_sync() guarantees the service task is not running. Add a helper function also to restart the service task, for symmetry. This is not strictly needed but helps the mental model of how to stop and start the service task. This race could only happen in fm10k_suspend/fm10k_resume as this is the only place where the service task is actually restarted. Thus, suspend/resume testing would be ideal. However, note that the chance of this happening is very slim as the service event is scheduled for immediate execution, and you would have to trigger a suspend at almost the exact same time as the service task was scheduled. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 32 ++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 7 deletions(-) commit 65b0a469e9e6d025ce9cc46f6cc94d28abf5561c Author: Jacob Keller Date: Mon Jul 10 13:23:12 2017 -0700 fm10k: move fm10k_prepare_for_reset and fm10k_handle_reset A future patch needs these functions defined earlier in the file. Move them closer to above where they will be called. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 58 ++++++++++++++-------------- 1 file changed, 29 insertions(+), 29 deletions(-) commit dd5eede2b711350f684e8510300cb3762a821ae6 Author: Jacob Keller Date: Mon Jul 10 13:23:11 2017 -0700 fm10k: avoid divide by zero in rare cases when device is resetting It is possible that under rare circumstances the device is undergoing a reset, such as when a PFLR occurs, and the device may be transmitting simultaneously. In this case, we might attempt to divide by zero when finding the proper r_idx. Instead, lets read the num_tx_queues once, and make sure it's non-zero. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d876c1583bb1b7f7264880265b824e88b791aa5d Author: Jacob Keller Date: Mon Jul 10 13:23:10 2017 -0700 fm10k: don't loop while resetting VFs due to VFLR event We've always had a really weird looping construction for resetting VFs. We read the VFLRE register and reset the VF if the corresponding bit is set, which makes sense. However we loop continuously until we no longer have any bits left unset. At first this makes sense, as a sort of "keep trying until we succeed" concept. Unfortunately this causes a problem if we happen to surprise remove while this code is executing, because in this case we'll always read all 1s for the VFLRE register. This results in a hard lockup on the CPU because the loop will never terminate. Because our own reset function will clear the VFLR event register always, (except when we've lost PCIe link obviously) there is no real reason to loop. In practice, we'll loop over once and find that no VFs are pending anymore. Lets just check once. Since we're clear the notification when we reset there's no benefit to the loop. Additionally, there shouldn't be a race as future VLFRE events should trigger an interrupt. Additionally, we didn't warn or do anything in the looped case anyways. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 4abf01b43b62525e4f1a20dd1a2bc4a1967d8928 Author: Jacob Keller Date: Mon Jul 10 13:23:09 2017 -0700 fm10k: simplify reading PFVFLRE register We're doing a really convoluted bitshift and read for the PFVFLRE register. Just reading the PFVFLRE(1), shifting it by 32, then reading PFVFLRE(0) should be sufficient. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 8bac58be1700dab3cac8cb53ed0651da40777024 Author: Jacob Keller Date: Mon Jul 10 13:23:08 2017 -0700 fm10k: avoid needless delay when loading driver When we load the driver, we set the last_reset to be in the future, which delays the initial driver reset. Additionally, the service task isn't scheduled to run automatically until the timer runs out. This causes a needless delay of the first reset to begin talking to the switch manager. We can avoid this by simply not setting last_reset and immediately scheduling the service task while in probe. This allows the device to wake up faster, and avoids this delay. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 523a0b558db4ca205522976077911e5efe235781 Author: Jacob Keller Date: Mon Jul 10 13:23:07 2017 -0700 fm10k: add missing fall through comment Newer versions of GCC starting with 7 now additionally warn when a case statement may fall through without an explicit comment mentioning it. Add such a comment to silence the warning, as this is expected. Unfortunately the comment must come directly before the next case statement, so we put it outside the #ifdef. Otherwise, the compiler cannot properly detect it and thus the warning is displayed regardless. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_main.c | 1 + 1 file changed, 1 insertion(+) commit b94dd008c401fc73a8d843e3219356255f40c1ed Author: Jacob Keller Date: Mon Jul 10 13:23:06 2017 -0700 fm10k: avoid possible truncation of q_vector->name New versions of GCC since version 7 began warning about possible truncation of calls to snprintf. We can fix this and avoid false positives. First, we should pass the full buffer size to snprintf, because it guarantees a NULL character as part of its passed length, so passing len-1 is simply wasting a byte of possible storage. Second, if we make the ri and ti variables unsigned, the compiler is able to correctly reason that the value never gets larger than 256, so it doesn't need to warn about the full space required to print a signed integer. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 375ce90eab7ee1c87eefa2cd312b0be9ac961082 Author: Jacob Keller Date: Mon Jul 10 13:23:05 2017 -0700 fm10k: fix typos on fall through comments Newer versions of GCC since version 7 now warn when a case statement may fall through without an explicit comment. "Fallthough" does not count as it is misspelled. Fix the typos for these comments to appease the new warnings. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 4 ++-- drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) commit 5c66d1251d67714e9f6e6b0af18ca989109b876f Author: Jacob Keller Date: Mon Jul 10 13:23:04 2017 -0700 fm10k: stop spurious link down messages when Tx FIFO is full In fm10k_get_host_state_generic, we check the mailbox tx_read() function to ensure that the mailbox is still open. This function also checks to make sure we have space to transmit another message. Unfortunately, if we just recently sent a bunch of messages (such as enabling hundreds of VLANs on a VF) this can result in a race where the watchdog task thinks the link went down just because we haven't had time to process all these messages yet. Instead, lets just check whether the mailbox is still open. This ensures that we don't race with the Tx FIFO, and we only link down once the mailbox is not open. This is safe, because if the FIFO fills up and we're unable to send a message for too long, we'll end up triggering the timeout detection which results in a reset. Additionally, since we still check to ensure the mailbox state is OPEN, we'll transition to link down whenever the mailbox closes as well. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 95f49d4bdee34dd0f68446bb260ab537f62ed9b3 Author: Markus Elfring Date: Mon May 8 18:18:09 2017 +0200 fm10k: Use seq_putc() in fm10k_dbg_desc_break() Two single characters 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 Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b52b7f7059f2df8eb3258a25bc69e12dc21ebcd7 Author: Jacob Keller Date: Wed Mar 8 15:55:43 2017 -0800 fm10k: reschedule service event if we stall the PF<->SM mailbox When we are handling PF<->VF mailbox messages, it is possible that the VF will send us so many messages that the PF<->SM FIFO will fill up. In this case, we stop the loop and wait until the service event is rescheduled. Normally this should happen due to an interrupt. But it is possible that we don't get another interrupt for a while and it isn't until the service timer actually reschedules us. Instead, simply reschedule immediately which will cause the service event to be run again as soon as we exit. This ensures that we promptly handle all of the PF<->VF messages with minimal delay, while still giving time for the SM mailbox to drain. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 4 ++++ 1 file changed, 4 insertions(+) commit 17a91809942ca32c70026d2d5ba3348a2c4fdf8f Author: Jacob Keller Date: Mon Oct 2 07:17:50 2017 -0700 fm10k: ensure we process SM mbx when processing VF mbx When we process VF mailboxes, the driver is likely going to also queue up messages to the switch manager. This process merely queues up the FIFO, but doesn't actually begin the transmission process. Because we hold the mailbox lock during this VF processing, the PF<->SM mailbox is not getting processed at this time. Ensure that we actually process the PF<->SM mailbox in between each PF<->VF mailbox. This should ensure prompt transmission of the messages queued up after each VF message is received and handled. Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 3 +++ 1 file changed, 3 insertions(+) commit dbfdd153d4aefec13460c97475737e59af92d8e2 Author: Marco Franchi Date: Mon Oct 2 10:45:30 2017 -0300 dt-bindings: fsl-imx-drm: Remove incorrect "@di0" usage Improve the binding example by removing the '@di0' notation, which fixes the following build warning: Warning (unit_address_vs_reg): Node /display@di0 has a unit name, but no reg property Signed-off-by: Marco Franchi Signed-off-by: Philipp Zabel Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f13c87c22314c3a19197c8e325d2b433148cc8db Author: Lucas Stach Date: Fri Aug 18 18:34:22 2017 +0200 drm/imx: parallel-display: use correct connector enum The imx parrallel display exposes a, well, display parallel interface. Use the correct enum, instead of disguising the thing as a VGA connector. Signed-off-by: Lucas Stach Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/parallel-display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8f2023d5d265fe3ff7e434bd7217e394b809f0b Author: Cihangir Akturk Date: Fri Aug 11 15:32:58 2017 +0300 drm/imx: switch to drm_*_get(), drm_*_put() helpers Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and drm_*_unreference() helpers. drm_*_reference() and drm_*_unreference() functions are just compatibility alias for drm_*_get() and drm_*_put() and should not be used by new code. So convert all users of compatibility functions to use the new APIs. Generated by: scripts/coccinelle/api/drm-get-put.cocci Signed-off-by: Cihangir Akturk Signed-off-by: Philipp Zabel drivers/gpu/drm/imx/ipuv3-crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30571678d853d054d32782ae51684500a0fa3a11 Author: Thomas Petazzoni Date: Thu Sep 28 14:46:19 2017 +0200 arm64: dts: marvell: enable additional PCIe ports on Armada 8040 DB The Armada 8040 DB has numerous PCIe ports, so let's enable a few more of those PCIe ports that are enabled in the default bootloader configuration. Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-8040-db.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit a7c9acc452b21b56c99dd7dfe0ab542f7baa6563 Author: Kevin Cernekee Date: Sat Sep 16 21:08:23 2017 -0700 brcmfmac: Delete redundant length check brcmf_fweh_process_event() sets event->datalen to the endian-swapped value of event_packet->msg.datalen, which is the same as emsg.datalen. This length is already validated in brcmf_fweh_process_event(), so there is no need to check it again upon dequeuing the event. Suggested-by: Arend van Spriel Signed-off-by: Kevin Cernekee Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c | 5 ----- 1 file changed, 5 deletions(-) commit 73f2c8e933b1dcf432ac8c6965a6e67af630077f Author: Kevin Cernekee Date: Sat Sep 16 21:08:22 2017 -0700 brcmfmac: Avoid possible out-of-bounds read In brcmf_p2p_notify_rx_mgmt_p2p_probereq(), chanspec is assigned before the length of rxframe is validated. This could lead to uninitialized data being accessed (but not printed). Since we already have a perfectly good endian-swapped copy of rxframe->chanspec in ch.chspec, and ch.chspec is not modified by decchspec(), avoid the extra assignment and use ch.chspec in the debug print. Suggested-by: Mattias Nissler Signed-off-by: Kevin Cernekee Reviewed-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4d689b619445894f6b6fcbc496f6d302bd9e44a5 Author: Robin Murphy Date: Thu Sep 28 15:55:02 2017 +0100 iommu/io-pgtable-arm-v7s: Convert to IOMMU API TLB sync Now that the core API issues its own post-unmap TLB sync call, push that operation out from the io-pgtable-arm-v7s internals into the users. For now, we leave the invalidation implicit in the unmap operation, since none of the current users would benefit much from any change to that. Note that the conversion of msm_iommu is implicit, since that apparently has no specific TLB sync operation anyway. CC: Yong Wu CC: Rob Clark Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/io-pgtable-arm-v7s.c | 7 +------ drivers/iommu/mtk_iommu.c | 7 +++++++ drivers/iommu/qcom_iommu.c | 15 +++++++++++++++ 3 files changed, 23 insertions(+), 6 deletions(-) commit 32b124492bdf974f68eaef1bde80dc8058aef002 Author: Robin Murphy Date: Thu Sep 28 15:55:01 2017 +0100 iommu/io-pgtable-arm: Convert to IOMMU API TLB sync Now that the core API issues its own post-unmap TLB sync call, push that operation out from the io-pgtable-arm internals into the users. For now, we leave the invalidation implicit in the unmap operation, since none of the current users would benefit much from any change to that. CC: Magnus Damm CC: Laurent Pinchart Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu-v3.c | 10 ++++++++++ drivers/iommu/arm-smmu.c | 20 +++++++++++++++----- drivers/iommu/io-pgtable-arm.c | 7 +------ drivers/iommu/ipmmu-vmsa.c | 10 ++++++++++ 4 files changed, 36 insertions(+), 11 deletions(-) commit abbb8a09384f69f7bb05936879e51933c146afba Author: Robin Murphy Date: Mon Oct 2 11:53:31 2017 +0100 iommu/iova: Don't try to copy anchor nodes Anchor nodes are not reserved IOVAs in the way that copy_reserved_iova() cares about - while the failure from reserve_iova() is benign since the target domain will already have its own anchor, we still don't want to be triggering spurious warnings. Reported-by: kernel test robot Signed-off-by: Robin Murphy Fixes: bb68b2fbfbd6 ('iommu/iova: Add rbtree anchor node') Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 3 +++ 1 file changed, 3 insertions(+) commit e195a331c4124a6527e5e1b6fbd93a6b4a984d7b Author: Bhumika Goyal Date: Wed Sep 27 11:49:27 2017 +0530 ALSA: line6: make snd_pcm_ops const Make these const as they are only passed to a const argument of the function snd_pcm_set_ops in the file referencing them. Also, add const to the declaration in the headers. Structures found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/usb/line6/capture.c | 2 +- sound/usb/line6/capture.h | 2 +- sound/usb/line6/playback.c | 2 +- sound/usb/line6/playback.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 503c1fb98ba3859c13863957c7c65c92371a9e50 Author: Avraham Stern Date: Fri Sep 29 14:21:49 2017 +0200 cfg80211/nl80211: add a port authorized event Add an event that indicates that a connection is authorized (i.e. the 4 way handshake was performed by the driver). This event should be sent by the driver after sending a connect/roamed event. This is useful for networks that require 802.1X authentication. In cases that the driver supports 4 way handshake offload, but the 802.1X authentication is managed by user space, the driver needs to inform user space right after the 802.11 association was completed so user space can initialize its 802.1X state machine etc. However, it is also possible that the AP will choose to skip the 802.1X authentication (e.g. when PMKSA caching is used) and proceed with the 4 way handshake immediately. In this case the driver needs to inform user space that 802.1X authentication is no longer required (e.g. to prevent user space from disconnecting since it did not get any EAPOLs from the AP). This is also useful for roaming, in which case it is possible that the driver used the Fast Transition protocol so 802.1X is not required. Since there will now be a dedicated notification indicating that the connection is authorized, the authorized flag can be removed from the roamed event. Drivers can send the new port authorized event right after sending the roamed event to indicate the new AP is already authorized. This therefore reserves the old PORT_AUTHORIZED attribute. Signed-off-by: Avraham Stern Signed-off-by: Johannes Berg include/net/cfg80211.h | 21 +++++++++++++++++---- include/uapi/linux/nl80211.h | 28 ++++++++++++++++----------- net/wireless/core.h | 5 +++++ net/wireless/nl80211.c | 34 ++++++++++++++++++++++++++++++--- net/wireless/nl80211.h | 2 ++ net/wireless/sme.c | 45 +++++++++++++++++++++++++++++++++++++++++++- net/wireless/util.c | 3 +++ 7 files changed, 119 insertions(+), 19 deletions(-) commit 66b1bedf662518e9b6367990a87e9601b35a94c1 Author: Avraham Stern Date: Fri Sep 29 14:21:14 2017 +0300 ieee80211: Add WFA TPC report element OUI type Add Transmit Power Control OUI type definition for WLAN_OUI_MICROSOFT. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/linux/ieee80211.h | 1 + 1 file changed, 1 insertion(+) commit 8f797c288e3a788e9578dd4db08b624a6d4b6a9b Author: Stanislaw Gruszka Date: Tue Sep 26 13:48:05 2017 +0200 mac80211: fix STA_SLOW_THRESHOLD htmldocs failure Patch fixes htmldocs build problem: Error(.//net/mac80211/sta_info.h:416): cannot understand prototype: 'STA_SLOW_THRESHOLD 6000 ' Signed-off-by: Stanislaw Gruszka Signed-off-by: Johannes Berg net/mac80211/sta_info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 504871e602d9a9ea2321d47ca506887417f54e75 Author: Manikanta Pubbisetty Date: Tue Sep 26 00:39:15 2017 +0530 mac80211: fix bandwidth computation for TDLS peers Section 11.23.1 of 80211-2016 specification allows TDLS peers to operate on wider bandwidths though they are connected to a BSS which do not support wider bandwidth operations, provided both the peers advertise wider bandwidth capabilities. The existing logic considers the minimum of station's and AP's capability for bandwidth computation. The same logic applies for TDLS peers as well, this restricts operating on wider bandwidths over a TDLS link when the peers are connected to legacy APs. As an example, if 80Mhz VHT capable peers are connected to a 20Mhz 5 GHz AP, then as per the existing logic TDLS operation will be restricted to 20Mhz. Address this problem by not considering BSS capability in bandwidth computation if the participating TDLS peers have wider bandwidth capability. Signed-off-by: Manikanta Pubbisetty [lots of wording/typo fixes] Signed-off-by: Johannes Berg net/mac80211/vht.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 5ec8a41a36715cf543cb7c109097fb3b4cdfb427 Author: Takeshi Kihara Date: Mon Oct 2 18:45:25 2017 +0900 pinctrl: sh-pfc: r8a7795: Add USB3.0 host support This patch adds USB3.0 ch0 pinmux support to R8A7795 SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Shimoda Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 3627126ce39d8c7d35a9251b074fedd2edf9f743 Author: Takeshi Kihara Date: Mon Oct 2 18:45:24 2017 +0900 pinctrl: sh-pfc: r8a7795-es1: Add USB3.0 host support This patch adds USB3{0,1} (USB3.0 host) pinmux support to R8A7795 ES1.x SoC. Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Shimoda Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit fc5431dc06d442828c8f92fb913257f7df3079aa Author: Randy Dunlap Date: Sat Sep 23 17:33:21 2017 -0700 HID: retrode: tell what a Retrode is and drop a blank line Add descriptive info to prompt string so that someone can know what a Retrode is. Drop an unneeded blank line. Signed-off-by: Randy Dunlap Cc: Bastien Nocera Cc: Jiri Kosina Cc: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 4f210c2938053e894ee00500dd0661f7a27a6ff4 Author: Jaejoong Kim Date: Wed Sep 20 18:40:36 2017 +0900 HID: add comment for power callback in struct hid_ll_driver There is a missing comment in struct hid_ll_driver. So, add it. Signed-off-by: Jaejoong Kim Signed-off-by: Jiri Kosina include/linux/hid.h | 1 + 1 file changed, 1 insertion(+) commit 19205da6a0da701787d42ad754edd1ffb514c956 Author: Petr Mladek Date: Mon Sep 25 17:41:59 2017 +0200 livepatch: Small shadow variable documentation fixes The description of the basic operations was a bit inconsistent and based on older version of the patchset. Also the size of the spinlock structure should be allocated instead of the pointer. Signed-off-by: Petr Mladek Acked-by: Joe Lawrence Signed-off-by: Jiri Kosina Documentation/livepatch/shadow-vars.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b65423ed466fb0494ef81a2c4177fa151732a33a Author: Neil Leeder Date: Thu Sep 14 15:30:13 2017 -0400 perf: qcom_l2_pmu: add event names Add event names so that common events can be specified symbolically, for example: l2cache_0/total-reads/,l2cache_0/cycles/ Event names are displayed in 'perf list'. Signed-off-by: Neil Leeder Signed-off-by: Will Deacon drivers/perf/qcom_l2_pmu.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 4adcec1164de863ef8bcf2cdffa0ea09de2a08d3 Author: Kees Cook Date: Wed Sep 20 13:49:59 2017 -0700 arm64: Always use REFCOUNT_FULL As discussed at the Linux Security Summit, arm64 prefers to use REFCOUNT_FULL by default. This enables it for the architecture. Cc: hw.likun@huawei.com Cc: Catalin Marinas Acked-by: Ard Biesheuvel Signed-off-by: Kees Cook Signed-off-by: Will Deacon arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) commit b4f4a2755665bf847231050b569f587ce0945482 Author: Thomas Meyer Date: Thu Sep 21 00:29:36 2017 +0200 arm64: dma-mapping: Cocci spatch "vma_pages" Use vma_pages function on vma object instead of explicit computation. Found by coccinelle spatch "api/vma_pages.cocci" Reviewed-by: Robin Murphy Signed-off-by: Thomas Meyer Signed-off-by: Will Deacon arch/arm64/mm/dma-mapping.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c2f0b54f10b12620c57f6e31233589b704a00ed5 Author: Masahiro Yamada Date: Thu Sep 14 20:40:04 2017 +0900 arm64: remove unneeded copy to init_utsname()->machine As you see in init/version.c, init_uts_ns.name.machine is initially set to UTS_MACHINE. There is no point to copy the same string. I dug the git history to figure out why this line is here. My best guess is like this: - This line has been around here since the initial support of arm64 by commit 9703d9d7f77c ("arm64: Kernel booting and initialisation"). If ARCH (=arm64) and UTS_MACHINE (=aarch64) do not match, arch/$(ARCH)/Makefile is supposed to override UTS_MACHINE, but the initial version of arch/arm64/Makefile missed to do that. Instead, the boot code copied "aarch64" to init_utsname()->machine. - Commit 94ed1f2cb5d4 ("arm64: setup: report ELF_PLATFORM as the machine for utsname") replaced "aarch64" with ELF_PLATFORM to make "uname" to reflect the endianness. - ELF_PLATFORM does not help to provide the UTS machine name to rpm target, so commit cfa88c79462d ("arm64: Set UTS_MACHINE in the Makefile") fixed it. The commit simply replaced ELF_PLATFORM with UTS_MACHINE, but missed the fact the string copy itself is no longer needed. Signed-off-by: Masahiro Yamada Signed-off-by: Will Deacon arch/arm64/kernel/Makefile | 2 -- arch/arm64/kernel/setup.c | 2 -- 2 files changed, 4 deletions(-) commit f67d5c4fbe8051af33e9109aa3d3024602d29474 Author: Will Deacon Date: Fri Sep 22 11:01:26 2017 +0100 arm64: mm: Remove useless and wrong comments from fault.c Fault.c seems to be a magnet for useless and wrong comments, largely due to its ancestry in other architectures where the code has since moved on, but the comments have remained intact. This patch removes both useless and incorrect comments, leaving only those that say something correct and relevant. Reported-by: Wenjia Zhou Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 52 +-------------------------------------------------- 1 file changed, 1 insertion(+), 51 deletions(-) commit 9339fd348dd98ed64879a48dc7290cc3fa4e2911 Author: Yury Norov Date: Wed Sep 13 21:08:30 2017 +0300 arm64: fix documentation on kernel pages mappings to HYP VA The Documentation/arm64/memory.txt says: When using KVM, the hypervisor maps kernel pages in EL2, at a fixed offset from the kernel VA (top 24bits of the kernel VA set to zero): In fact, kernel addresses are transleted to HYP with kern_hyp_va macro, which has more options, and none of them assumes clearing of top 24bits of the kernel VA. Acked-by: Marc Zyngier Signed-off-by: Yury Norov [will: removed gory details] Signed-off-by: Will Deacon Documentation/arm64/memory.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit eef94a3d09aab437c8c254de942d8b1aa76455e2 Author: Yury Norov Date: Thu Aug 31 11:30:50 2017 +0300 arm64: move TASK_* definitions to ILP32 series [1] introduces the dependency on for TASK_SIZE macro. Which in turn requires , and include , giving a circular dependency, because TASK_SIZE is currently located in . In other architectures, TASK_SIZE is defined in , and moving TASK_SIZE there fixes the problem. Discussion: https://patchwork.kernel.org/patch/9929107/ [1] https://github.com/norov/linux/tree/ilp32-next CC: Will Deacon CC: Laura Abbott Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: James Morse Suggested-by: Mark Rutland Signed-off-by: Yury Norov Signed-off-by: Will Deacon arch/arm64/include/asm/memory.h | 15 --------------- arch/arm64/include/asm/processor.h | 21 +++++++++++++++++++++ arch/arm64/kernel/entry.S | 2 +- 3 files changed, 22 insertions(+), 16 deletions(-) commit 9dfe2e3ad375a9ba32a13888873ec4586be01ff7 Author: Imre Deak Date: Thu Sep 28 13:06:24 2017 +0300 drm/i915/gen8+: Init/reset display interrupts only if i915 IRQs are enabled Only init / reset the display interrupts during power well enabling / disabling if the i915 interrupts are enabled. So far we did the init / reset during driver loading / resuming too, where initialization / enabling of the i915 interrupts happens only at a later point. This didn't cause a problem due to GEN8_MASTER_IRQ_CONTROL being cleared, but triggered gen3_assert_iir_is_zero() in GEN8_IRQ_INIT_NDX(). References: https://bugs.freedesktop.org/show_bug.cgi?id=102988 Cc: Chris Wilson Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170928100624.15533-1-imre.deak@intel.com drivers/gpu/drm/i915/i915_irq.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit dd9f31c7a3887950cbd0d49eb9d43f7a1518a356 Author: Imre Deak Date: Wed Aug 16 17:46:07 2017 +0300 drm/i915/gen9+: Set same power state before hibernation image save/restore Atm, on GEN9 big core platforms before saving the hibernation image we uninitialize the display, disabling power wells manually, while before restoring the image we keep things powered (letting HW/DMC power down things as needed). The state mismatch will trigger the following error: DC state mismatch (0x0 -> 0x2) While the restore handler knows how to initialize the display from an unknown state (due to a different loader kernel or not having i915 loaded in the loader kernel) we should still use the same state for consistency before image saving and restoring. Do this by uniniting the display before restoring the image too. Bugzilla: https://bugs.freedesktop.org/attachment.cgi?id=133376 Reported-and-tested-by: Wang Wendy Reported-and-tested-by: Joonas Lahtinen Cc: Wang Wendy Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Ville Syrjala Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170816144607.9935-1-imre.deak@intel.com drivers/gpu/drm/i915/i915_drv.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 1af0838de60e723cb02253ecc9b555c30f8f6a6f Author: Srishti Sharma Date: Fri Sep 29 15:33:39 2017 +0530 drm/virtio: Replace instances of reference/unreference with get/put Replace reference/unreference with get/put as it is consistent with the kernel coding style. Done using the following semantic patch by coccinelle. @r@ expression e; @@ -drm_gem_object_unreference_unlocked(e); +drm_gem_object_put_unlocked(e); Signed-off-by: Srishti Sharma Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1506679419-7130-1-git-send-email-srishtishar@gmail.com drivers/gpu/drm/virtio/virtgpu_display.c | 4 ++-- drivers/gpu/drm/virtio/virtgpu_gem.c | 4 ++-- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) commit ddde0e7d950d912c8a75adfcd89134cca21b389b Author: Colin Ian King Date: Tue Sep 26 15:55:46 2017 +0100 mmc: sdhci-omap: make three functions static, fixes warnings The functions sdhci_omap_set_ios, sdhci_omap_set_power and sdhci_omap_get_min_clock are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'sdhci_omap_set_ios' was not declared. Should it be static? symbol 'sdhci_omap_set_power' was not declared. Should it be static? symbol 'sdhci_omap_get_min_clock' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Ulf Hansson drivers/mmc/host/sdhci-omap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0929567a7a2dab8455a7313956973ff0d339709a Author: Stephen Hemminger Date: Sun Oct 1 14:07:34 2017 -0700 samples/bpf: fix warnings in xdp_monitor_user Make local functions static to fix HOSTCC samples/bpf/xdp_monitor_user.o samples/bpf/xdp_monitor_user.c:64:7: warning: no previous prototype for ‘gettime’ [-Wmissing-prototypes] __u64 gettime(void) ^~~~~~~ samples/bpf/xdp_monitor_user.c:209:6: warning: no previous prototype for ‘print_bpf_prog_info’ [-Wmissing-prototypes] void print_bpf_prog_info(void) ^~~~~~~~~~~~~~~~~~~ Fixes: 3ffab5460264 ("samples/bpf: xdp_monitor tool based on tracepoints") Signed-off-by: Stephen Hemminger Acked-by: Alexei Starovoitov Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller samples/bpf/xdp_monitor_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 45bfbc013b4294cadafbef821d377d3a99c7ab1e Author: Colin Ian King Date: Sun Oct 1 17:27:35 2017 +0100 mlxsw: spectrum: fix uninitialized value in err In the unlikely event that mfc->mfc_un.res.ttls[i] is 255 for all values of i from 0 to MAXIVS-1, the err is not set at all and hence has a garbage value on the error return at the end of the function, so initialize it to 0. Also, the error return check on err and goto to err: inside the for loop makes it impossible for err to be zero at the end of the for loop, so we can remove the redundant err check at the end of the loop. Detected by CoverityScan CID#1457207 ("Unitialized scalar value") Fixes: c011ec1bbfd6 ("mlxsw: spectrum: Add the multicast routing offloading logic") Signed-off-by: Colin Ian King Reviewed-by: Yotam Gigi Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ed36edf870d447b4ab7cbd217ba5c6600f20e32d Merge: b80ccfe 840f922 Author: David S. Miller Date: Sun Oct 1 23:05:11 2017 -0700 Merge branch 'bcm63xx_enet-small-fixes-and-cleanups' Jonas Gorski says: ==================== bcm63xx_enet: small fixes and cleanups This patch set fixes a few theoretical issues and cleans up the code a bit. It also adds a bit more managed function usage to simplify clock and iomem usage. Based on net-next. ==================== Signed-off-by: David S. Miller commit 840f922317fb5c20841d6d7f3853ead506546ade Author: Jonas Gorski Date: Sun Oct 1 13:02:20 2017 +0200 bcm63xx_enet: remove unneeded include We don't use anyhing from that file, so drop it. Signed-off-by: Jonas Gorski Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcm63xx_enet.h | 1 - 1 file changed, 1 deletion(-) commit 4e78e5c5d881bf2d6267545a554c1baf245257b7 Author: Jonas Gorski Date: Sun Oct 1 13:02:19 2017 +0200 bcm63xx_enet: drop unneeded NULL phy_clk check clk_disable and clk_unprepare are NULL-safe, so need to duplicate the NULL check of the functions. Signed-off-by: Jonas Gorski Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcm63xx_enet.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 7e697ce99ceb09538cdc1dfa9ebb3db60236b0a7 Author: Jonas Gorski Date: Sun Oct 1 13:02:18 2017 +0200 bcm63xx_enet: use managed functions for clock/ioremap Use managed functions where possible to reduce the amount of resource handling on error and remove paths. Signed-off-by: Jonas Gorski Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcm63xx_enet.c | 54 +++++++--------------------- 1 file changed, 12 insertions(+), 42 deletions(-) commit 527a48713b01057d94aeec8f4383b1e20c82522c Author: Jonas Gorski Date: Sun Oct 1 13:02:17 2017 +0200 bcm63xx_enet: do not rely on probe order Do not rely on the shared device being probed before the enet(sw) devices. This makes it easier to eventually move out the shared device as a dma controller driver (what it should be). Signed-off-by: Jonas Gorski Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcm63xx_enet.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit d6213c1f2ad54a964b77471690264ed685718928 Author: Jonas Gorski Date: Sun Oct 1 13:02:16 2017 +0200 bcm63xx_enet: do not write to random DMA channel on BCM6345 The DMA controller regs actually point to DMA channel 0, so the write to ENETDMA_CFG_REG will actually modify a random DMA channel. Since DMA controller registers do not exist on BCM6345, guard the write with the usual check for dma_has_sram. Signed-off-by: Jonas Gorski Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9c86b846ce02f7e35d7234cf090b80553eba5389 Author: Jonas Gorski Date: Sun Oct 1 13:02:15 2017 +0200 bcm63xx_enet: correct clock usage Check the return code of prepare_enable and change one last instance of enable only to prepare_enable. Also properly disable and release the clock in error paths and on remove for enetsw. Signed-off-by: Jonas Gorski Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcm63xx_enet.c | 31 +++++++++++++++++++++------- 1 file changed, 23 insertions(+), 8 deletions(-) commit 57fc5529972b4c7c424a5fac56508c72ae020796 Author: Soren Brinkmann Date: Wed Sep 27 14:23:34 2017 -0700 MAINTAINERS: Remove myself as reviewer This address is gonna bounce in the not too far away future. Signed-off-by: Soren Brinkmann Signed-off-by: Michal Simek MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit b80ccfe9bbcac70e66fdfaef73f0988a27f9a68c Author: Maciej Żenczykowski Date: Tue Sep 26 20:37:22 2017 -0700 net-ipv6: remove unused IP6_ECN_clear() function This function is unused, and furthermore it is buggy since it suffers from the same issue that requires IP6_ECN_set_ce() to take a pointer to the skb so that it may (in case of CHECKSUM_COMPLETE) update skb->csum Instead of fixing it, let's just outright remove it. Tested: builds, and 'git grep IP6_ECN_clear' comes up empty Signed-off-by: Maciej Żenczykowski Signed-off-by: David S. Miller include/net/inet_ecn.h | 5 ----- 1 file changed, 5 deletions(-) commit 3733be14a32bae288b61ed28341e593baba983af Author: Haishuang Yan Date: Wed Sep 27 11:35:43 2017 +0800 ipv4: Namespaceify tcp_fastopen_blackhole_timeout knob Different namespace application might require different time period in second to disable Fastopen on active TCP sockets. Tested: Simulate following similar situation that the server's data gets dropped after 3WHS. C ---- syn-data ---> S C <--- syn/ack ----- S C ---- ack --------> S S (accept & write) C? X <- data ------ S [retry and timeout] And then print netstat of TCPFastOpenBlackhole, the counter increased as expected when the firewall blackhole issue is detected and active TFO is disabled. # cat /proc/net/netstat | awk '{print $91}' TCPFastOpenBlackhole 1 Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller include/net/netns/ipv4.h | 3 +++ net/ipv4/sysctl_net_ipv4.c | 20 +++++++++++--------- net/ipv4/tcp_fastopen.c | 30 +++++++++++------------------- net/ipv4/tcp_ipv4.c | 2 ++ 4 files changed, 27 insertions(+), 28 deletions(-) commit 437138485656c41e32b8c63c0987cfa0348be0e6 Author: Haishuang Yan Date: Wed Sep 27 11:35:42 2017 +0800 ipv4: Namespaceify tcp_fastopen_key knob Different namespace application might require different tcp_fastopen_key independently of the host. David Miller pointed out there is a leak without releasing the context of tcp_fastopen_key during netns teardown. So add the release action in exit_batch path. Tested: 1. Container namespace: # cat /proc/sys/net/ipv4/tcp_fastopen_key: 2817fff2-f803cf97-eadfd1f3-78c0992b cookie key in tcp syn packets: Fast Open Cookie Kind: TCP Fast Open Cookie (34) Length: 10 Fast Open Cookie: 1e5dd82a8c492ca9 2. Host: # cat /proc/sys/net/ipv4/tcp_fastopen_key: 107d7c5f-68eb2ac7-02fb06e6-ed341702 cookie key in tcp syn packets: Fast Open Cookie Kind: TCP Fast Open Cookie (34) Length: 10 Fast Open Cookie: e213c02bf0afbc8a Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller include/net/netns/ipv4.h | 4 +++ include/net/tcp.h | 6 ++--- net/ipv4/af_inet.c | 2 +- net/ipv4/sysctl_net_ipv4.c | 21 ++++++++------- net/ipv4/tcp.c | 2 +- net/ipv4/tcp_fastopen.c | 64 +++++++++++++++++++++++++++++++--------------- net/ipv4/tcp_ipv4.c | 6 +++++ 7 files changed, 70 insertions(+), 35 deletions(-) commit dd000598a39b6937fcefdf143720ec9fb5250e72 Author: Haishuang Yan Date: Wed Sep 27 11:35:41 2017 +0800 ipv4: Remove the 'publish' logic in tcp_fastopen_init_key_once The 'publish' logic is not necessary after commit dfea2aa65424 ("tcp: Do not call tcp_fastopen_reset_cipher from interrupt context"), because in tcp_fastopen_cookie_gen,it wouldn't call tcp_fastopen_init_key_once. Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller include/net/tcp.h | 2 +- net/ipv4/af_inet.c | 2 +- net/ipv4/sysctl_net_ipv4.c | 5 ----- net/ipv4/tcp.c | 2 +- net/ipv4/tcp_fastopen.c | 4 ++-- 5 files changed, 5 insertions(+), 10 deletions(-) commit e1cfcbe82b4534bd0f99fef92a6d33843fd85e0e Author: Haishuang Yan Date: Wed Sep 27 11:35:40 2017 +0800 ipv4: Namespaceify tcp_fastopen knob Different namespace application might require enable TCP Fast Open feature independently of the host. This patch series continues making more of the TCP Fast Open related sysctl knobs be per net-namespace. Reported-by: Luca BRUNO Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller include/net/netns/ipv4.h | 1 + include/net/tcp.h | 1 - net/ipv4/af_inet.c | 7 ++++--- net/ipv4/sysctl_net_ipv4.c | 14 +++++++------- net/ipv4/tcp.c | 4 ++-- net/ipv4/tcp_fastopen.c | 11 +++++------ net/ipv4/tcp_ipv4.c | 2 ++ 7 files changed, 21 insertions(+), 19 deletions(-) commit 68fd97504ad2f70850c47ce45caa110a0ca843d2 Author: Theodore Ts'o Date: Sun Oct 1 17:59:54 2017 -0400 ext4: retry allocations conservatively Now that we no longer try to reserve metadata blocks for delayed allocations (which tended to overestimate the required number of blocks significantly), we really don't need retry allocations when the disk is very full as aggressively any more. The only time when it makes sense to retry an allocation is if we have freshly deleted blocks that will only become available after a transaction commit. And if we lose that race, it's not worth it to try more than once. Signed-off-by: Theodore Ts'o fs/ext4/balloc.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 545052e9e35a34af95d2e870ac3fe2894376e6e9 Author: Christoph Hellwig Date: Sun Oct 1 17:58:54 2017 -0400 ext4: 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. Note that with this patch ext4 will now always depend on the iomap code instead of only when CONFIG_DAX is enabled, and it requires adding a call into the extent status tree for iomap_begin as well to properly deal with delalloc extents. Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara [More fixes and cleanups by Andreas] fs/ext4/Kconfig | 1 + fs/ext4/ext4.h | 3 - fs/ext4/file.c | 263 +++----------------------------------------------------- fs/ext4/inode.c | 109 ++++++++--------------- 4 files changed, 49 insertions(+), 327 deletions(-) commit 7046ae35329f6d3cd39ae22d96d9525e45e748f2 Author: Andreas Gruenbacher Date: Sun Oct 1 17:57:54 2017 -0400 ext4: Add iomap support for inline data Report inline data as a IOMAP_F_DATA_INLINE mapping. This allows to use iomap_seek_hole and iomap_seek_data in ext4_llseek and makes switching to iomap_fiemap in ext4_fiemap easier. Signed-off-by: Andreas Gruenbacher Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/ext4/ext4.h | 4 ++++ fs/ext4/inline.c | 33 +++++++++++++++++++++++++++++++++ fs/ext4/inode.c | 16 ++++++++++++++-- 3 files changed, 51 insertions(+), 2 deletions(-) commit 9ca250a5137f3df7ffac58b49660beadd5926ace Author: Andreas Gruenbacher Date: Sun Oct 1 17:56:54 2017 -0400 iomap: Add IOMAP_F_DATA_INLINE flag Add a new IOMAP_F_DATA_INLINE flag to indicate that a mapping is in a disk area that contains data as well as metadata. In iomap_fiemap, map this flag to FIEMAP_EXTENT_DATA_INLINE. Signed-off-by: Andreas Gruenbacher Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara fs/iomap.c | 2 ++ include/linux/iomap.h | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit 19fe5f643f89f29c1a16bc474d91506b0e9a6232 Author: Andreas Gruenbacher Date: Sun Oct 1 17:55:54 2017 -0400 iomap: Switch from blkno to disk offset Replace iomap->blkno, the sector number, with iomap->addr, the disk offset in bytes. For invalid disk offsets, use the special value IOMAP_NULL_ADDR instead of IOMAP_NULL_BLOCK. This allows to use iomap for mappings which are not block aligned, such as inline data on ext4. Signed-off-by: Andreas Gruenbacher Signed-off-by: Theodore Ts'o Reviewed-by: Darrick J. Wong # iomap, xfs Reviewed-by: Jan Kara fs/buffer.c | 4 ++-- fs/dax.c | 2 +- fs/ext2/inode.c | 4 ++-- fs/ext4/inode.c | 4 ++-- fs/iomap.c | 11 +++++------ fs/nfsd/blocklayout.c | 4 ++-- fs/xfs/xfs_iomap.c | 6 +++--- include/linux/iomap.h | 10 +++++----- 8 files changed, 22 insertions(+), 23 deletions(-) commit e5f23736a88c1d8d727ac655fef5e752507eea8e Author: Rex Zhu Date: Fri Sep 29 13:57:54 2017 +0800 drm/amd/powerplay: refine code in amd_powerplay.c (v2) 1. use flag PP_DPM_DISABLED within powerplay notify amdgpu dpm state by cgs interface. 2. delete redundant virtualization check in powerplay v2: squash in fix for hwmgr_init (Rex) Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 12 ----- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 59 ++++++++++------------- drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 2 - 3 files changed, 25 insertions(+), 48 deletions(-) commit 8635d6b3afe68cdde2f646c2a3bbd8149c031e8c Author: Tony Lindgren Date: Sun Oct 1 17:17:26 2017 +0200 dt-bindings: hsi: add omap4 hsi controller bindings Update omap-ssi binding document to also cover the HSI compliant module from OMAP4. Signed-off-by: Tony Lindgren Acked-by: Rob Herring [dropped the omap.dtsi update and updated patch description accordingly] Signed-off-by: Sebastian Reichel Documentation/devicetree/bindings/hsi/omap-ssi.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 36edec05a27d6c07ca8d38a01e98b0d71408ab9d Author: Arvind Yadav Date: Tue Sep 26 11:46:14 2017 +0530 HSI: hsi_char: pr_err() strings should end with newlines pr_err() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav Signed-off-by: Sebastian Reichel drivers/hsi/clients/hsi_char.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3210b4fca695ed0ecba28ba9b00ce3dca7d62b1a Author: Pavel Machek Date: Sat Sep 23 21:08:38 2017 +0200 HSI: omap_ssi_core: fix kilo to be "k" not "K" Kilo should be "k" not "K", fix it it comments and messages. Signed-off-by: Pavel Machek index 88e48b3..41a09f5 100644 Signed-off-by: Sebastian Reichel drivers/hsi/controllers/omap_ssi_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c0f095f766981750d238744e5a0cb3ef20163c28 Author: Noralf Trønnes Date: Sun Sep 24 14:26:25 2017 +0200 drm/fb-cma-helper: Remove unused functions The cma drivers use the drm_gem_framebuffer_helper functions now, so remove drm_fb_cma_destroy, drm_fb_cma_create_handle, drm_fb_cma_create_with_funcs, drm_fb_cma_create and drm_fb_cma_prepare_fb. Signed-off-by: Noralf Trønnes Reviewed-by: Eric Anholt Reviewed-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/1506255985-61113-11-git-send-email-noralf@tronnes.org drivers/gpu/drm/drm_fb_cma_helper.c | 77 ++----------------------------------- include/drm/drm_fb_cma_helper.h | 13 ------- 2 files changed, 3 insertions(+), 87 deletions(-) commit 57b8a4bf87806cbb64ed91078f32fbf37f556c5e Author: Noralf Trønnes Date: Sun Sep 24 14:26:24 2017 +0200 drm/tve200: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb() drm_fb_cma_create() and drm_fb_cma_prepare_fb() are just wrappers now, use drm_gem_fb_create() and drm_gem_fb_prepare_fb() directly. Cc: Linus Walleij Signed-off-by: Noralf Trønnes Reviewed-by: Linus Walleij Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1506255985-61113-10-git-send-email-noralf@tronnes.org drivers/gpu/drm/tve200/tve200_display.c | 3 ++- drivers/gpu/drm/tve200/tve200_drv.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 1287c94d4de3061b95896b6e3c6d24623ae137cb Author: Noralf Trønnes Date: Sun Sep 24 14:26:23 2017 +0200 drm/sun4i: Use drm_gem_fb_create() drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Maxime Ripard Signed-off-by: Noralf Trønnes Acked-by: Maxime Ripard Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1506255985-61113-9-git-send-email-noralf@tronnes.org drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5d43aa7a7c8f0bb48679eec066271af29c127e36 Author: Noralf Trønnes Date: Sun Sep 24 14:26:22 2017 +0200 drm/shmobile: Use drm_gem_fb_create() drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Laurent Pinchart Signed-off-by: Noralf Trønnes Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1506255985-61113-8-git-send-email-noralf@tronnes.org drivers/gpu/drm/shmobile/shmob_drm_kms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 365c38517827b8efd4009b5221fff320775a5f83 Author: Noralf Trønnes Date: Sun Sep 24 14:26:21 2017 +0200 drm/rcar-du: Use drm_gem_fb_create() drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Laurent Pinchart Signed-off-by: Noralf Trønnes Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1506255985-61113-7-git-send-email-noralf@tronnes.org drivers/gpu/drm/rcar-du/rcar_du_kms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 98f3eac5a13323958b32f17f32b66c0fd8841085 Author: Noralf Trønnes Date: Sun Sep 24 14:26:20 2017 +0200 drm/mxsfb: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb() drm_fb_cma_create() and drm_fb_cma_prepare_fb() are just wrappers now, use drm_gem_fb_create() and drm_gem_fb_prepare_fb() directly. Cc: Marek Vasut Signed-off-by: Noralf Trønnes Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1506255985-61113-6-git-send-email-noralf@tronnes.org drivers/gpu/drm/mxsfb/mxsfb_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 24ef8157fcc092b5bd87cd1eb4dc0f540601d533 Author: Noralf Trønnes Date: Sun Sep 24 14:26:19 2017 +0200 drm/meson: Use drm_gem_fb_create() drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Neil Armstrong Signed-off-by: Noralf Trønnes Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1506255985-61113-5-git-send-email-noralf@tronnes.org drivers/gpu/drm/meson/meson_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 503ad2e174cdb39d8bee74fab28fcc4ce7dd01b5 Author: Noralf Trønnes Date: Sun Sep 24 14:26:18 2017 +0200 drm/hisilicon/kirin: Use drm_gem_fb_create() drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Xinliang Liu Cc: Rongrong Zou Cc: Xinwei Kong Cc: Chen Feng Signed-off-by: Noralf Trønnes Reviewed-by: Xinliang Liu Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1506255985-61113-4-git-send-email-noralf@tronnes.org drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ba22bf6785810d89496be1d5ee9b159cc9546560 Author: Noralf Trønnes Date: Sun Sep 24 14:26:17 2017 +0200 drm/fsl-dcu: Use drm_gem_fb_create() drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Stefan Agner Cc: Alison Wang Signed-off-by: Noralf Trønnes Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1506255985-61113-3-git-send-email-noralf@tronnes.org drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cce1a87788eb607e9616fe0d1c04f5da72141068 Author: Noralf Trønnes Date: Sun Sep 24 14:26:16 2017 +0200 drm/tinydrm: Use drm_gem_framebuffer_helper Use drm_gem_framebuffer_helper directly instead of the cma library wrappers. Signed-off-by: Noralf Trønnes Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1506255985-61113-2-git-send-email-noralf@tronnes.org drivers/gpu/drm/tinydrm/core/tinydrm-core.c | 3 ++- drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | 5 +++-- drivers/gpu/drm/tinydrm/mipi-dbi.c | 5 +++-- drivers/gpu/drm/tinydrm/repaper.c | 5 +++-- drivers/gpu/drm/tinydrm/st7586.c | 5 +++-- 5 files changed, 14 insertions(+), 9 deletions(-) commit d7ca5ebf2493ddd610d07cc1c6c48de8fabb0496 Author: Kuppuswamy Sathyanarayanan Date: Mon Sep 4 22:37:21 2017 -0700 platform/x86: intel_pmc_ipc: Use devm_* calls in driver probe function This patch cleans up unnecessary free/alloc calls in ipc_plat_probe(), ipc_pci_probe() and ipc_plat_get_res() functions by using devm_* calls. This patch also adds proper error handling for failure cases in ipc_pci_probe() function. Signed-off-by: Kuppuswamy Sathyanarayanan [andy: fixed style issues, missed devm_free_irq(), removed unnecessary log message] Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_pmc_ipc.c | 94 +++++++++++------------------------- 1 file changed, 28 insertions(+), 66 deletions(-) commit dda3ec0aa631d15b12a42438d23336354037e108 Author: Benjamin Berg Date: Fri Sep 15 15:20:49 2017 +0200 platform/x86: thinkpad_acpi: Implement tablet mode using GMMS method Many thinkpad laptops and convertibles provide the GMMS method to resolve how far the laptop has been opened and whether it has been converted into tablet mode. This allows reporting a more precise tablet mode state to userspace. The current implementation only reports a summarized tablet mode state which is triggered as soon as the input devices become unusable as they are folded away from the display. This will work on all models where the CMMD method was used previously and it may also work in other cases. Thanks to Peter Zhang of Lenovo for providing information on how to use the GMMS method to query the tablet mode. Signed-off-by: Benjamin Berg Cc: Peter FP1 Zhang Cc: Lyude Paul Acked-by: Henrique de Moraes Holschuh Reviewed-by: Lyude Paul Signed-off-by: Andy Shevchenko drivers/platform/x86/thinkpad_acpi.c | 132 +++++++++++++++++++++++++++++++---- 1 file changed, 119 insertions(+), 13 deletions(-) commit 5385fa47d883dc7d51de622835427bc2558ed43c Author: Jens Axboe Date: Sun Oct 1 01:26:21 2017 -0600 blk-mq-tag: kill unused tag enums We don't have any notion of a tagging cache anymore, and haven't for a long time. Kill off the unused enums. Signed-off-by: Jens Axboe block/blk-mq-tag.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 506d0a3edbc0bd4eaabe0c4e9c31ce69d6dfd5e5 Merge: 075cfdd aa193d9 Author: David S. Miller Date: Sun Oct 1 04:15:08 2017 +0100 Merge branch 'dsa_ptr-port' Vivien Didelot says: ==================== net: dsa: change dsa_ptr for a dsa_port With DSA, a master net_device is physically wired to a dedicated CPU switch port. For interaction with the DSA layer, the struct net_device contains a dsa_ptr, which currently points to a dsa_switch_tree object. This is only valid for a switch fabric with a single CPU port. In order to support switch fabrics with multiple CPU ports, we first need to change the type of dsa_ptr to what it really is: a dsa_port object. This is what this patchset does. The first patches adds a dsa_master_get_slave helper and cleans up portions of DSA core to make the next patches more readable. These next patches prepare the xmit and receive hot paths and finally change dsa_ptr. Changes in v2: - introduce dsa_master_get_slave helper to simplify patch 6 - keep hot path data at beginning of dsa_port for cacheline 1 ==================== Signed-off-by: David S. Miller commit aa193d9b1d7ea6893ce24a9d141f676950563987 Author: Vivien Didelot Date: Fri Sep 29 17:19:21 2017 -0400 net: dsa: remove tag ops from the switch tree Now that the dsa_ptr is a dsa_port instance, there is no need to keep the tag operations in the dsa_switch_tree structure. Remove it. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 11 ----------- net/dsa/dsa2.c | 2 -- net/dsa/legacy.c | 2 -- 3 files changed, 15 deletions(-) commit 2f657a600409f1961d67642fe384a9d4be71d36a Author: Vivien Didelot Date: Fri Sep 29 17:19:20 2017 -0400 net: dsa: change dsa_ptr for a dsa_port With DSA, a master net device (CPU facing interface) has a dsa_ptr pointer to which hangs a dsa_switch_tree. This is not correct because a master interface is wired to a dedicated switch port, and because we can theoretically have several master interfaces pointing to several CPU ports of the same switch fabric. Change the master interface's dsa_ptr for the CPU dsa_port pointer. This is a step towards supporting multiple CPU ports. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/linux/netdevice.h | 4 ++-- net/dsa/dsa.c | 6 +++--- net/dsa/dsa2.c | 2 +- net/dsa/dsa_priv.h | 3 ++- net/dsa/legacy.c | 2 +- net/dsa/master.c | 15 +++++---------- 6 files changed, 14 insertions(+), 18 deletions(-) commit 3e41f93b358a8800194b87995ad076fc50919719 Author: Vivien Didelot Date: Fri Sep 29 17:19:19 2017 -0400 net: dsa: prepare master receive hot path In preparation to make DSA master devices point to their corresponding CPU port instead of the whole tree, add copies of dst and rcv in the dsa_port structure so that we keep fast access in the receive hot path. Also keep the copies at the beginning of the dsa_port structure in order to ensure they are available in cacheline 1. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 5 +++++ net/dsa/dsa2.c | 4 ++++ net/dsa/legacy.c | 4 ++++ 3 files changed, 13 insertions(+) commit 152402483ed75b167d5628d414e876ffa7a6d4c4 Author: Vivien Didelot Date: Fri Sep 29 17:19:18 2017 -0400 net: dsa: add tagging ops to port The DSA tagging protocol operations are specific to each CPU port, thus the dsa_device_ops pointer belongs to the dsa_port structure. >From now on assign a slave's xmit copy from its CPU port tagging operations. This will ease the future support for multiple CPU ports. Also keep the tag_ops at the beginning of the dsa_port structure so that we ensure copies for hot path are in cacheline 1. Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/dsa.h | 3 +++ net/dsa/dsa2.c | 1 + net/dsa/dsa_priv.h | 2 +- net/dsa/legacy.c | 1 + net/dsa/slave.c | 3 +-- 5 files changed, 7 insertions(+), 3 deletions(-) commit 62fc95876298987c35e9fb10badd467f4787aae7 Author: Vivien Didelot Date: Fri Sep 29 17:19:17 2017 -0400 net: dsa: use temporary dsa_device_ops variable When resolving the DSA tagging protocol used by a CPU switch, use a temporary "tag_ops" variable to store the dsa_device_ops instead of using directly dst->tag_ops. This will make the future patches moving this pointer around easier to read. There is no functional changes. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 8 +++++--- net/dsa/legacy.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) commit 7ec764eef934409c4e15539440c31bca0b8de005 Author: Vivien Didelot Date: Fri Sep 29 17:19:16 2017 -0400 net: dsa: use cpu_dp in master code Make it clear that the master device is linked to a CPU port by using "cpu_dp" for the dsa_port variable in master.c instead of "port", then use a "port" variable to describe the port index, as usually seen in other places of DSA core. This will make the future patch touching dsa_ptr more readable. There is no functional changes. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/master.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit 3775b1b7f0c330e59c434d1852d7762ae0a9c164 Author: Vivien Didelot Date: Fri Sep 29 17:19:15 2017 -0400 net: dsa: add master helper to look up slaves The DSA tagging code does not need to know about the DSA architecture, it only needs to return the slave device corresponding to the source port index (and eventually the source device index for cascade-capable switches) parsed from the frame received on the master device. For this purpose, provide an inline dsa_master_get_slave helper which validates the device and port indexes and look up the slave device. This makes the tagging rcv functions more concise and robust, and also makes dsa_get_cpu_port obsolete. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 24 +++++++++++++++++++----- net/dsa/tag_brcm.c | 9 ++------- net/dsa/tag_dsa.c | 18 ++---------------- net/dsa/tag_edsa.c | 18 ++---------------- net/dsa/tag_ksz.c | 9 +++------ net/dsa/tag_lan9303.c | 20 ++------------------ net/dsa/tag_mtk.c | 16 +++------------- net/dsa/tag_qca.c | 17 +++-------------- net/dsa/tag_trailer.c | 9 +++------ 9 files changed, 39 insertions(+), 101 deletions(-) commit 075cfdd659cb1e86f948f11ba577f27706f0756e Author: Colin Ian King Date: Fri Sep 29 20:51:23 2017 +0100 net: hns3: fix null pointer dereference before null check pointer ndev is being dereferenced with the call to netif_running before it is being null checked. Re-order the code to only dereference ndev after it has been null checked. Detected by CoverityScan, CID#1457206 ("Dereference before null check") Fixes: 9df8f79a4d29 ("net: hns3: Add DCB support when interacting with network stack") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 09af87d18f6ba05588e6316c47fdacf06e28cce8 Author: Simon Xiao Date: Fri Sep 29 11:39:46 2017 -0700 hv_netvsc: report stop_queue and wake_queue Report the numbers of events for stop_queue and wake_queue in ethtool stats. Example: ethtool -S eth0 NIC statistics: ... stop_queue: 7 wake_queue: 7 ... Signed-off-by: Simon Xiao Reviewed-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/hyperv_net.h | 2 ++ drivers/net/hyperv/netvsc.c | 12 ++++++++++-- drivers/net/hyperv/netvsc_drv.c | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) commit 721e08dad17e226ef68819d0a23dc53c25fe8ea5 Author: Martin KaFai Lau Date: Fri Sep 29 10:52:17 2017 -0700 bpf: Fix compiler warning on info.map_ids for 32bit platform This patch uses u64_to_user_ptr() to cast info.map_ids to a userspace ptr. It also tags the user_map_ids with '__user' for sparse check. Fixes: cb4d2b3f03d8 ("bpf: Add name, load_time, uid and map_ids to bpf_prog_info") Signed-off-by: Martin KaFai Lau Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1c49d14200dae47544f7ea6ee9040ded01f8425 Author: Colin Ian King Date: Fri Sep 29 15:01:16 2017 +0100 net_sched: remove redundant assignment to ret The assignment of -EINVAL to variable ret is redundant as it is being overwritten on the following error exit paths or to the return value from the following call to basic_set_parms. Fix this up by removing it. Cleans up clang warning message: net/sched/cls_basic.c:185:2: warning: Value stored to 'err' is never read Fixes: 1d8134fea2eb ("net_sched: use idr to allocate basic filter handles") Signed-off-by: Colin Ian King Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_basic.c | 1 - 1 file changed, 1 deletion(-) commit ef739d8aabaa26dd99f5661e38a86f4d85d8dfed Author: Colin Ian King Date: Fri Sep 29 14:34:22 2017 +0100 net: ipmr: make function ipmr_notifier_init static The function ipmr_notifier_init is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: warning: symbol 'ipmr_notifier_init' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: David S. Miller net/ipv4/ipmr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e876a8a7e9dd89dc88c12ca2e81beb478dbe9897 Author: Mick Tarsel Date: Thu Sep 28 13:53:18 2017 -0700 ibmvnic: Set state UP State is initially reported as UNKNOWN. Before register call netif_carrier_off(). Once the device is opened, call netif_carrier_on() in order to set the state to UP. Signed-off-by: Mick Tarsel Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 ++ 1 file changed, 2 insertions(+) commit 21a2774ef5d4fde772fbcb9d0eabb76f585e5af5 Author: Florian Fainelli Date: Thu Sep 28 11:19:06 2017 -0700 Revert "net: dsa: bcm_sf2: Defer port enabling to calling port_enable" This reverts commit e85ec74ace29 ("net: dsa: bcm_sf2: Defer port enabling to calling port_enable") because this now makes an unbind followed by a bind to fail connecting to the ingrated PHY. What this patch missed is that we need the PHY to be enabled with bcm_sf2_gphy_enable_set() before probing it on the MDIO bus. This is correctly done in the ops->setup() function, but by the time ops->port_enable() runs, this is too late. Upon unbind we would power down the PHY, and so when we would bind again, the PHY would be left powered off. Fixes: e85ec74ace29 ("net: dsa: bcm_sf2: Defer port enabling to calling port_enable") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit a6992ebee4a7ef6e714af82f22a2ca3f797bb9e4 Merge: 45c1fd6 22b96551 Author: David S. Miller Date: Sun Oct 1 03:31:17 2017 +0100 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-09-29 This series contains updates to i40e and i40evf only. Jake provides several of the changes starting with the renaming of a variable to clarify what the value is actually calculating. Found we were misusing the __I40E_RECOVERY_PENDING bit to determine when we should actually request a new IRQ in i40e_setup_misc_vector(), which lead to a design mistake, so to resolve the issue, use a separate state bit for miscellaneous IRQ setup and fix up the design while we are at it. Cleaned up the old legacy PM support in the driver since we support the newer generic PM callbacks. Fixed a failure to hibernate issue, where on some platforms with a large number of CPUs, we would allocate many IRQ vectors which we would try to migrate to CPU0 when hibernating. Sudheer cleans up a check for unqualified module inside i40e_up_complete() because the link state information is in flux at time, so log messages are getting logged with incorrect link state information. Also provided additional log message cleanups and simplify member variable access in the printing of the link messages. Mariusz relaxes the firmware check since Fortville and Fort Park NICs can and do have different firmware versions, so only warn for older Fortville firmware. Fixed an errata with a flow director statistic that was not wrapping as expected, simply reset after reading. Mitch prevents consternation by lowering the log level to debug on a message seen regularly on VF reset or unload, which is meaningless under normal circumstances. Refactor the firmware version checking since Fortville and Fort Park devices can have different firmware versions. Alan fixes a ring to vector mapping, where the past implementation attempted to map each Tx and Rx ring to its own vector, however we use combined queues so we should be mapping the Tx/Rx rings together on one vector. Adds the ability for the VF to request a different number of queues allocated to it. ==================== Signed-off-by: David S. Miller commit 659333de48268550b5f09fcd45f76459d737b946 Author: Dave Airlie Date: Thu Sep 28 16:12:28 2017 +1000 drm/amdgpu: use designated initialiser for thermal_irq_src. This fixes the 0-day build warning. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 320e421ea303b1e53451b2b4cd3ad18cdd043b3b Author: Dan Carpenter Date: Mon Sep 25 13:30:38 2017 +0300 drm: of: always initialize panel in drm_of_find_panel_or_bridge() The callers expect "panel" to be initialized, but that isn't true if we return -ENODEV. It causes bugs like: drivers/gpu/drm/tve200/tve200_drv.c:83 tve200_modeset_init() error: uninitialized symbol 'panel'. Signed-off-by: Dan Carpenter Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20170925103038.lvr5msjvekwczctn@mwanda drivers/gpu/drm/drm_of.c | 2 ++ 1 file changed, 2 insertions(+) commit 44390ef519006b13c8fab9eb13abac909342a585 Author: Dan Carpenter Date: Mon Sep 25 13:25:20 2017 +0300 drm/tve200: Check for IS_ERR instead of NULL in probe devm_ioremap_resource() returns error pointer, it never returns NULL on error. Fixes: 179c02fe90a4 ("drm/tve200: Add new driver for TVE200") Signed-off-by: Dan Carpenter Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20170925102520.a7spymwqqbsczzz2@mwanda drivers/gpu/drm/tve200/tve200_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ea30958d96b3f997afadeeb9de29e6dea3a80f5 Author: Colin Ian King Date: Fri Sep 22 17:05:16 2017 +0100 drm/tve200: make two functions static The functions tve200_display_disable and tve200_display_funcs are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'tve200_display_disable' was not declared. Should it be static? symbol 'tve200_display_funcs' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20170922160516.16283-1-colin.king@canonical.com drivers/gpu/drm/tve200/tve200_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c6eb50d2790478d8b5841379b9502812a5e5feb3 Author: Al Viro Date: Sat Sep 30 14:45:42 2017 -0400 mode_t whack-a-mole: task_dump_owner() should be umode_t... Signed-off-by: Al Viro fs/proc/base.c | 2 +- fs/proc/internal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a798f2f02f4ca148e4c1798dad8bde9951e1de0c Author: Marek Szyprowski Date: Fri Sep 29 14:33:25 2017 +0200 ARM: dts: exynos: Move audio clocks configuration to odroidxu3-audio.dtsi Audio subsystem clocks configuration is a part of audio block, so there it should be moved to exynos5422-odroidxu3-audio.dtsi to avoid it on Odroid XU4, which has no audio codec. Signed-off-by: Marek Szyprowski Reviewed-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi | 13 +++++++++++++ arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 12 ------------ 2 files changed, 13 insertions(+), 12 deletions(-) commit 95c589266dc20ad54538afc57f4d0a2c959111ff Author: Linus Lüssing Date: Thu Sep 28 22:27:03 2017 +0200 ARM: multi_v7_defconfig: Enable USB3503 driver The Odroid U3 (Exynos 4412 based) for instance needs this driver, otherwise its USB hub will not come up. Also selecting it as built-in to allow booting from USB without an initrd/initramfs. Signed-off-by: Linus Lüssing Signed-off-by: Krzysztof Kozlowski arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 547248736ae54b73e713ee259a81ab3a637cb2f7 Author: weiping zhang Date: Sat Sep 30 15:01:48 2017 +0800 blk-mq: remove unused function hctx_allow_merges since 9bddeb2a5b981 "blk-mq: make per-sw-queue bio merge as default .bio_merge" there is no caller for this function. Reviewed-by: Ming Lei Signed-off-by: weiping zhang Signed-off-by: Jens Axboe block/blk-mq.c | 6 ------ 1 file changed, 6 deletions(-) commit b3cffc3877a6c7edf17fd9c476f3e8d930bccec1 Author: weiping zhang Date: Sat Sep 30 09:49:21 2017 +0800 null_blk: add "no_sched" module parameter add an option that disable io scheduler for null block device. Signed-off-by: weiping zhang Signed-off-by: Jens Axboe drivers/block/null_blk.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 706cc9f51d9a22528af18d4b3ffbd17b30a1d3b0 Author: Sven Eckelmann Date: Sat Sep 30 09:24:28 2017 +0200 batman-adv: Add argument names for function ptr definitions checkpatch started to report unnamed arguments in function pointer definitions. Add the corresponding names to these definitions to avoid this warning. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 45c1fd61d5cead2ae23880e0677b8660ab9006a4 Author: Colin Ian King Date: Wed Sep 27 22:45:13 2017 +0100 mkiss: remove redundant check on len being zero The check on len is redundant as it is always greater than 1, so just remove it and make the printk less complex. Detected by CoverityScan, CID#1226729 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/hamradio/mkiss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 84e14fe353de7624872e582887712079ba0b2d56 Author: Maciej Żenczykowski Date: Tue Sep 26 21:32:42 2017 -0700 net-ipv6: add support for sockopt(SOL_IPV6, IPV6_FREEBIND) So far we've been relying on sockopt(SOL_IP, IP_FREEBIND) being usable even on IPv6 sockets. However, it turns out it is perfectly reasonable to want to set freebind on an AF_INET6 SOCK_RAW socket - but there is no way to set any SOL_IP socket option on such a socket (they're all blindly errored out). One use case for this is to allow spoofing src ip on a raw socket via sendmsg cmsg. Tested: built, and booted # python >>> import socket >>> SOL_IP = socket.SOL_IP >>> SOL_IPV6 = socket.IPPROTO_IPV6 >>> IP_FREEBIND = 15 >>> IPV6_FREEBIND = 78 >>> s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM, 0) >>> s.getsockopt(SOL_IP, IP_FREEBIND) 0 >>> s.getsockopt(SOL_IPV6, IPV6_FREEBIND) 0 >>> s.setsockopt(SOL_IPV6, IPV6_FREEBIND, 1) >>> s.getsockopt(SOL_IP, IP_FREEBIND) 1 >>> s.getsockopt(SOL_IPV6, IPV6_FREEBIND) 1 Signed-off-by: Maciej Żenczykowski Signed-off-by: David S. Miller include/uapi/linux/in6.h | 1 + net/ipv6/ipv6_sockglue.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) commit 1f372c7bfb23286d2bf4ce0423ab488e86b74bb2 Author: Mike Manning Date: Mon Sep 25 22:01:36 2017 +0100 net: ipv6: send NS for DAD when link operationally up The NS for DAD are sent on admin up as long as a valid qdisc is found. A race condition exists by which these packets will not egress the interface if the operational state of the lower device is not yet up. The solution is to delay DAD until the link is operationally up according to RFC2863. Rather than only doing this, follow the existing code checks by deferring IPv6 device initialization altogether. The fix allows DAD on devices like tunnels that are controlled by userspace control plane. The fix has no impact on regular deployments, but means that there is no IPv6 connectivity until the port has been opened in the case of port-based network access control, which should be desirable. Signed-off-by: Mike Manning Signed-off-by: David S. Miller net/ipv6/addrconf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a8b4aa0c0d36a497ce5c7c8b9c34acb44f603547 Author: Andi Shyti Date: Fri Sep 29 16:47:53 2017 -0700 Input: ad7879 - use managed devm_device_add_group Commit 57b8ff070f98 ("driver core: add devm_device_add_group() and friends") has added the managed version for creating sysfs group files. Use devm_device_add_group instead of sysfs_create_group and remove the action that cleans the sysfs file when exiting the driver. Signed-off-by: Andi Shyti Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ad7879.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit e3adf559a33bb0291c5ba7c2d0c02ae438da5c19 Author: Andi Shyti Date: Fri Sep 29 16:42:06 2017 -0700 Input: edt-ft5x06 - use managed devm_device_add_group Commit 57b8ff070f98 ("driver core: add devm_device_add_group() and friends") has added the managed version for creating sysfs group files. Use devm_device_add_group instead of sysfs_create_group and remove the relative sysfs_remove_group and goto label. Signed-off-by: Andi Shyti Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/edt-ft5x06.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 5f2ae04991d08b0f15e5029efff34f6723165b9a Author: Andi Shyti Date: Fri Sep 29 16:40:25 2017 -0700 Input: wdt87xx_i2c - use managed devm_device_add_group Commit 57b8ff070f98 ("driver core: add devm_device_add_group() and friends") has added the managed version for creating sysfs group files. Use devm_device_add_group instead of sysfs_create_group and remove the relative sysfs_remove_group. Signed-off-by: Andi Shyti Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/wdt87xx_i2c.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit a71b8b5c4afd84821becd2d3eec5f33c59aa0d23 Author: Andi Shyti Date: Fri Sep 29 16:39:34 2017 -0700 Input: rohm_bu21023 - use managed devm_device_add_group Commit 57b8ff070f98 ("driver core: add devm_device_add_group() and friends") has added the managed version for creating sysfs group files. Use devm_device_add_group instead of sysfs_create_group and remove the action that cleans the sysfs file when exiting the driver. Signed-off-by: Andi Shyti Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/rohm_bu21023.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit b887df52f83e6739a9fcf5490d075e2beed441bb Author: Andi Shyti Date: Fri Sep 29 16:38:57 2017 -0700 Input: raydium_i2c_ts - use managed devm_device_add_group Commit 57b8ff070f98 ("driver core: add devm_device_add_group() and friends") has added the managed version for creating sysfs group files. Use devm_device_add_group instead of sysfs_create_group and remove the action that cleans the sysfs file when exiting the driver. Signed-off-by: Andi Shyti Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/raydium_i2c_ts.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) commit 4c16f82e23654438ac33bab746320e8dcc069501 Author: Andi Shyti Date: Fri Sep 29 16:38:23 2017 -0700 Input: melfas_mip4 - use managed devm_device_add_group Commit 57b8ff070f98 ("driver core: add devm_device_add_group() and friends") has added the managed version for creating sysfs group files. Use devm_device_add_group instead of sysfs_create_group and remove the action that cleans the sysfs file when exiting the driver. Signed-off-by: Andi Shyti Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/melfas_mip4.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) commit 8db69a9a5d4680f1f868d48499375cce1ef80201 Author: Andi Shyti Date: Fri Sep 29 16:37:33 2017 -0700 Input: elants_i2c - use managed devm_device_add_group Commit 57b8ff070f98 ("driver core: add devm_device_add_group() and friends") has added the managed version for creating sysfs group files. Use devm_device_add_group instead of sysfs_create_group and remove the action that cleans the sysfs file when exiting the driver. Signed-off-by: Andi Shyti Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/elants_i2c.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) commit a4b0a58bb1420757593978cdb213dab022403a3e Author: Dmitry Torokhov Date: Thu Sep 28 09:57:34 2017 -0700 Input: elan_i2c - do not clobber interrupt trigger on x86 On x86 we historically used falling edge interrupts in the driver because that's how first Chrome devices were configured. They also did not use ACPI to enumerate I2C devices (because back then there was no kernel support for that), so trigger was hard-coded in the driver. However the controller behavior is much more reliable if we use level triggers, and that is how we configured ARM devices, and how want to configure newer x86 devices as well. All newer x86 boxes have their I2C devices enumerated in ACPI. Let's see if platform code (ACPI, DT) described interrupt and specified particular trigger type, and if so, let's use it instead of always clobbering trigger with IRQF_TRIGGER_FALLING. We will still use this trigger type as a fallback if platform code left interrupt trigger unconfigured. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196761 Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_core.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit cd6bf7741cf992306748db11e1888c741d16dd0f Author: Ville Syrjälä Date: Mon Sep 18 23:00:59 2017 +0300 platform/x86: fujitsu-laptop: Don't oops when FUJ02E3 is not presnt My Fujitsu-Siemens Lifebook S6120 doesn't have the FUJ02E3 device, but it does have FUJ02B1. That means we do register the backlight device (and it even seems to work), but the code will oops as soon as we try to set the backlight brightness because it's trying to call call_fext_func() with a NULL device. Let's just skip those function calls when the FUJ02E3 device is not present. Cc: Jonathan Woithe Cc: Andy Shevchenko Signed-off-by: Ville Syrjälä Cc: # 4.13.x Signed-off-by: Darren Hart (VMware) drivers/platform/x86/fujitsu-laptop.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit e7cc33358a88e0a0949370ada47144c11c2aa290 Merge: 79765e9 ae432a9 Author: Stephen Boyd Date: Fri Sep 29 16:07:28 2017 -0700 Merge branch 'clk-pm-runtime' into clk-next * clk-pm-runtime: clk: samsung: exynos-audss: Add support for runtime PM clk: samsung: exynos-audss: Use local variable for controller's device clk: samsung: exynos5433: Add support for runtime PM clk: samsung: Add support for runtime PM clk: Add support for runtime PM commit 0d5936344f30aba0f6ddb92b030cb6a05168efe6 Author: Tejun Heo Date: Mon Sep 25 09:00:19 2017 -0700 sched: Implement interface for cgroup unified hierarchy There are a couple interface issues which can be addressed in cgroup2 interface. * Stats from cpuacct being reported separately from the cpu stats. * Use of different time units. Writable control knobs use microseconds, some stat fields use nanoseconds while other cpuacct stat fields use centiseconds. * Control knobs which can't be used in the root cgroup still show up in the root. * Control knob names and semantics aren't consistent with other controllers. This patchset implements cpu controller's interface on cgroup2 which adheres to the controller file conventions described in Documentation/cgroups/cgroup-v2.txt. Overall, the following changes are made. * cpuacct is implictly enabled and disabled by cpu and its information is reported through "cpu.stat" which now uses microseconds for all time durations. All time duration fields now have "_usec" appended to them for clarity. Note that cpuacct.usage_percpu is currently not included in "cpu.stat". If this information is actually called for, it will be added later. * "cpu.shares" is replaced with "cpu.weight" and operates on the standard scale defined by CGROUP_WEIGHT_MIN/DFL/MAX (1, 100, 10000). The weight is scaled to scheduler weight so that 100 maps to 1024 and the ratio relationship is preserved - if weight is W and its scaled value is S, W / 100 == S / 1024. While the mapped range is a bit smaller than the orignal scheduler weight range, the dead zones on both sides are relatively small and covers wider range than the nice value mappings. This file doesn't make sense in the root cgroup and isn't created on root. * "cpu.weight.nice" is added. When read, it reads back the nice value which is closest to the current "cpu.weight". When written, it sets "cpu.weight" to the weight value which matches the nice value. This makes it easy to configure cgroups when they're competing against threads in threaded subtrees. * "cpu.cfs_quota_us" and "cpu.cfs_period_us" are replaced by "cpu.max" which contains both quota and period. v4: - Use cgroup2 basic usage stat as the information source instead of cpuacct. v3: - Added "cpu.weight.nice" to allow using nice values when configuring the weight. The feature is requested by PeterZ. - Merge the patch to enable threaded support on cpu and cpuacct. - Dropped the bits about getting rid of cpuacct from patch description as there is a pretty strong case for making cpuacct an implicit controller so that basic cpu usage stats are always available. - Documentation updated accordingly. "cpu.rt.max" section is dropped for now. v2: - cpu_stats_show() was incorrectly using CONFIG_FAIR_GROUP_SCHED for CFS bandwidth stats and also using raw division for u64. Use CONFIG_CFS_BANDWITH and do_div() instead. "cpu.rt.max" is not included yet. Signed-off-by: Tejun Heo Acked-by: Peter Zijlstra (Intel) Cc: Ingo Molnar Cc: Li Zefan Cc: Johannes Weiner Documentation/cgroup-v2.txt | 36 ++++------ kernel/sched/core.c | 171 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 183 insertions(+), 24 deletions(-) commit a1f7164c7b8b0d46f63bfb4ca0bb5971c760b921 Author: Tejun Heo Date: Mon Sep 25 09:00:18 2017 -0700 sched: Misc preps for cgroup unified hierarchy interface Make the following changes in preparation for the cpu controller interface implementation for cgroup2. This patch doesn't cause any functional differences. * s/cpu_stats_show()/cpu_cfs_stat_show()/ * s/cpu_files/cpu_legacy_files/ v2: Dropped cpuacct changes as it won't be used by cpu controller interface anymore. Signed-off-by: Tejun Heo Acked-by: Peter Zijlstra (Intel) Cc: Ingo Molnar Cc: Li Zefan Cc: Johannes Weiner kernel/sched/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 22b96551f213d7e7d743442c923c266a10306b9b Author: Mitch Williams Date: Fri Jul 14 09:27:09 2017 -0400 i40e: refactor FW version checking The i40e driver now supports two different devices with two different firmware versions. So be smart about how we handle these. Move the FW version macros to the appropriate header file, and add a convenience macro that checks the version based on the device. Then use this macro to check whether or not the driver can use the new link info API. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 10 +++++++++- drivers/net/ethernet/intel/i40e/i40e_common.c | 6 ++++-- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 10 +++++++++- 4 files changed, 23 insertions(+), 5 deletions(-) commit a3f5aa907340b5d7b54223ddbaa90410f168864d Author: Alan Brady Date: Fri Jul 14 09:27:08 2017 -0400 i40e: Enable VF to negotiate number of allocated queues Currently the PF allocates a default number of queues for each VF and cannot be changed. This patch enables the VF to request a different number of queues allocated to it. This patch also adds a new virtchnl op and capability flag to facilitate this negotiation. After the PF receives a request message, it will set a requested number of queues for that VF. Then when the VF resets, its VSI will get a new number of queues allocated to it. This is a best effort request and since we only allocate a guaranteed default number, if the VF tries to ask for more than the guaranteed number, there may not be enough in HW to accommodate it unless other queues for other VFs are freed. It should also be noted decreasing the number queues allocated to a VF to below the default will NOT enable the allocation of more than 32 VFs per PF and will not free queues guaranteed to each VF by default. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 75 ++++++++++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 1 + include/linux/avf/virtchnl.h | 20 ++++++ 4 files changed, 97 insertions(+) commit c97fc9b6a798f4253c176231ba0aceda6b59b058 Author: Alan Brady Date: Fri Jul 14 09:27:07 2017 -0400 i40evf: fix ring to vector mapping The current implementation for mapping queues to vectors is broken because it attempts to map each Tx and Rx ring to its own vector, however we use combined queues so we should actually be mapping the Tx/Rx rings together on one vector. Also in the current implementation, in the case where we have more queues than vectors, we attempt to group the queues together into 'chunks' and map each 'chunk' of queues to a vector. Chunking them together would be more ideal if, and only if, we only had RSS because of the way the hashing algorithm works but in the case of a future patch that enables VF ADq, round robin assignment is better and still works with RSS. This patch resolves both those issues and simplifies the code needed to accomplish this. Instead of treating the case where we have more queues than vectors as special, if we notice our vector index is greater than vectors, reset the vector index to zero and continue mapping. This should ensure that in both cases, whether we have enough vectors for each queue or not, the queues get appropriately mapped. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_main.c | 48 ++++++------------------- 1 file changed, 10 insertions(+), 38 deletions(-) commit b980c0634fe56928a45cc3c0f688d96e36705403 Author: Jacob Keller Date: Fri Jul 14 09:27:06 2017 -0400 i40e: shutdown all IRQs and disable MSI-X when suspended On some platforms with a large number of CPUs, we will allocate many IRQ vectors. When hibernating, the system will attempt to migrate all of the vectors back to CPU0 when shutting down all the other CPUs. It is possible that we have so many vectors that it cannot re-assign them to CPU0. This is even more likely if we have many devices installed in one platform. The end result is failure to hibernate, as it is not possible to shutdown the CPUs. We can avoid this by disabling MSI-X and clearing our interrupt scheme when the device is suspended. A more ideal solution would be some method for the stack to properly handle this for all drivers, rather than on a case-by-case basis for each driver to fix itself. However, until this more ideal solution exists, we can do our part and shutdown our IRQs during suspend, which should allow systems with a large number of CPUs to safely suspend or hibernate. It may be worth investigating if we should shut down even further when we suspend as it may make the path cleaner, but this was the minimum fix for the hibernation issue mentioned here. Testing-hints: This affects systems with a large number of CPUs, and with multiple devices enabled. Without this change, those platforms are unable to hibernate at all. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 68 ++++++++++++++++++++++++- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +- 2 files changed, 68 insertions(+), 2 deletions(-) commit 5c499228803a77bd4e878c7119fbd40a1dc6d773 Author: Jacob Keller Date: Fri Jul 14 09:27:05 2017 -0400 i40e: prevent service task from running while we're suspended Although the service task does check the suspended status before running, it might already be part way through running when we go to suspend. Lets ensure that the service task is stopped and will not be restarted again until we finish resuming. This ensures that service task code does not cause strange interactions with the suspend/resume handlers. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 401586c2b9bb16147f3dcc64d3596013625e2c44 Author: Jacob Keller Date: Fri Jul 14 09:27:04 2017 -0400 i40e: don't clear suspended state until we finish resuming When handling suspend and resume callbacks we want to make sure that (a) we don't suspend again if we're already suspended and (b) we don't resume again if we're already resuming. Lets make sure we test_and_set the __I40E_SUSPENDED bit in i40e_suspend which ensures that a suspend call when already suspended will exit early. Additionally, if __I40E_SUSPENDED is not set when we begin resuming, exit early as well. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit 0e5d3da400558b7d30586a2cc1afe02276445636 Author: Jacob Keller Date: Fri Jul 14 09:27:03 2017 -0400 i40e: use newer generic PM support instead of legacy PM callbacks Stop using the old legacy PM support, since we now have stable support for the newer generic PM callbacks. This has several advantages. First, we no longer have to manage our own pci_save_state() and power changes, as it's preferred to have the PCI stack do this. Second, these routines get called for both hibernate and suspend to ram, so we can have the driver properly handle all the suspend/resume flows that it needs to. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 54 +++++++++-------------------- 1 file changed, 17 insertions(+), 37 deletions(-) commit c17401a1dd210a5f22ab1ec7c7366037c158a14c Author: Jacob Keller Date: Fri Jul 14 09:27:02 2017 -0400 i40e: use separate state bit for miscellaneous IRQ setup We currently (mis)use the __I40E_RECOVERY_PENDING bit to determine when we should actually request a new IRQ in i40e_setup_misc_vector(). This led to a design mistake where we open-coded the re-setup of the miscellaneous vector in i40e_resume() instead of using the function provided. If we did not open-code this and instead tried to use the i40e_setup_misc_vector() function, it would lead to never reallocating the IRQ. This would lead to a second i40e_suspend() call failing to free the vector due to a NULL pointer dereference. A future patch is going to re-work how the i40e_suspend() and i40e_resume() flows work to clear all IRQ vectors, which would require us to use i40e_setup_misc_vector() directly. Since during this time the __I40E_RECOVERY_PENDING bit is set, we'll never re-allocate the vector. Rather than leaving the open-coded setup in i40e_resume() lets just fix the problem properly in i40e_setup_misc_vector(). Introduce a new state bit which indicates when the IRQ has been assigned, which will be set when i40e_setup_misc_vector is first called. This ultimately resolves the issue of re-requesting the vector, without overloading the __I40E_RECOVERY_PENDING state. This ensures that the suspend/resume cycle can use the setup function instead of open-coding the re-request during resume. Additionally, since the only callers of i40e_stop_misc_vector also want to free it, move this code directly into the function to avoid duplication. Due to the new functionality, rename it to i40e_free_misc_vector(). This lets us drop the extra calls to free and re-enable the vector during i40e_suspend() and i40e_resume(). We don't need to call i40e_setup_misc_Vector() in i40e_resume() because it gets called by the i40e_rebuild() call. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e.h | 1 + drivers/net/ethernet/intel/i40e/i40e_main.c | 39 +++++++++++------------------ 2 files changed, 15 insertions(+), 25 deletions(-) commit 905770fa3e6f30b393829ba1c238554e7f238aee Author: Mitch Williams Date: Fri Jul 14 09:27:01 2017 -0400 i40evf: lower message level We see this message regularly on VF reset or unload (which invokes a reset). It's essentially meaningless unless it's happening constantly. To prevent consternation, lower the log level to debug so it's not seen under normal circumstance. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0dc8692e914ac49931d69b5217d5fe0171fc026e Author: Mariusz Stachura Date: Fri Jul 14 09:27:00 2017 -0400 i40e: fix for flow director counters not wrapping as expected An errata with GLQF_PCNT causes it to not wrap as expected. This can cause an error in flow director statistics. This patch resets affected counters just after reading. Signed-off-by: Mariusz Stachura Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 35 +++++++++++++++++++---------- 1 file changed, 23 insertions(+), 12 deletions(-) commit e04ea00217904fc3f6fddac0b74e74e5ac488fda Author: Mariusz Stachura Date: Fri Jul 14 09:10:19 2017 -0400 i40e: relax warning message in case of version mismatch Fortville and Fort Park devices are often on different firmware release schedules. This change relaxes the minor version warning message, so it is only displayed for older FW warning version for old firmware Fortville 3 or earlier. Signed-off-by: Mariusz Stachura Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3fded4663b07f8fa99b9424ca3d5c46b79f6b27e Author: Sudheer Mogilappagari Date: Fri Jul 14 09:10:18 2017 -0400 i40e: simplify member variable accesses This commit replaces usage of vsi->back in i40e_print_link_message() (which is actually a PF pointer) with temp variable. Signed-off-by: Sudheer Mogilappagari Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 9a03449d3ea0f6b497ff3a3bf6203a5e72c7e6be Author: Sudheer Mogilappagari Date: Fri Jul 14 09:10:16 2017 -0400 i40e: Fix link down message when interface is brought up i40e_print_link_message() is intended to compare new link state with current link state and print log message only if the new state is different from current state. However in current driver the new state does not get updated when link is going down because of the if condition. When an interface is brought down, vsi->state is set to I40E_VSI_DOWN in i40e_vsi_close() and later i40e_print_link_message() does not get invoked in i40e_link_event due to if condition. Hence link down message doesn't appear when link is going down. The down state is seen later during i40e_open() and old state gets printed. The actual link state doesn't get updated in i40e_close() or i40e_open() but when i40e_handle_link_event is called inside i40e_clean_adminq_subtask. This change allows i40e_print_link_message() to be called when interface is going down and keeps the state information updated. Signed-off-by: Sudheer Mogilappagari Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 16badf758b25bd00528246ab9af938296b9d368d Author: Sudheer Mogilappagari Date: Fri Jul 14 09:10:15 2017 -0400 i40e: Fix unqualified module message while bringing link up In current driver, when ifconfig ethx up is done, the link state doesn't transition to UP inside i40e_open(). It changes after AQ command response is handled in i40e_handle_link_event(). When pf->hw.phy.link_info.link_info is DOWN inside i40e_open(), The state is transient and invalid. So log message gets printed based on incorrect info (i.e link_info and an_info). This commit removes check for unqualified module inside i40e_up_complete(). The existing check in i40e_handle_link_event() logs the error message based on correct link state information. Signed-off-by: Sudheer Mogilappagari Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 9 --------- 1 file changed, 9 deletions(-) commit 2b634bb0686e43a6338fe779fbabd72b6b928fdc Author: Jacob Keller Date: Fri Jul 14 09:10:14 2017 -0400 i40e/i40evf: rename bytes_per_int to bytes_per_usec This value is not calculating bytes_per_int, which would actually just be bytes/ITR_COUNTDOWN_START, but rather it's calculating bytes/usecs. Rename the variable for clarity so that future developers understand what the value is actually calculating. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 12 ++++++------ drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) commit 77072f09eab19326dd2424c8dad0a443341a228f Author: Vlastimil Babka Date: Fri Sep 29 11:23:35 2017 +0200 x86/stacktrace: Avoid recording save_stack_trace() wrappers The save_stack_trace() and save_stack_trace_tsk() wrappers of __save_stack_trace() add themselves to the call stack, and thus appear in the recorded stacktraces. This is redundant and wasteful when we have limited space to record the useful part of the backtrace with e.g. page_owner functionality. Fix this by making sure __save_stack_trace() is noinline (which matches the current gcc decision) and bumping the skip in the wrappers (save_stack_trace_tsk() only when called for the current task). This is similar to what was done for arm in 3683f44c42e9 ("ARM: stacktrace: avoid listing stacktrace functions in stacktrace") and is pending for arm64. Also make sure that __save_stack_trace_reliable() doesn't get this problem in the future by marking it __always_inline (which matches current gcc decision), per Josh Poimboeuf. Signed-off-by: Vlastimil Babka Acked-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Miroslav Benes Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170929092335.2744-1-vbabka@suse.cz Signed-off-by: Ingo Molnar arch/x86/kernel/stacktrace.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 2ff7cfe9985617d34c2166b529e7e54beac11175 Author: Al Viro Date: Fri Sep 29 13:42:35 2017 -0400 r128: switch compat ioctls to drm_ioctl_kernel() Signed-off-by: Al Viro drivers/gpu/drm/r128/r128_drv.h | 4 ++ drivers/gpu/drm/r128/r128_ioc32.c | 99 ++++++++++++++++----------------------- drivers/gpu/drm/r128/r128_state.c | 6 +-- 3 files changed, 48 insertions(+), 61 deletions(-) commit 17de4ee04ca925590df036b112c1db8a778e14bf Author: Peter Zijlstra Date: Thu Aug 24 13:06:35 2017 +0200 sched/fair: Update calc_group_*() comments I had a wee bit of trouble recalling how the calc_group_runnable() stuff worked.. add hopefully better comments. 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 kernel/sched/fair.c | 66 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 22 deletions(-) commit 2c8e4dce7963d2bae02db95fce2691365630685c Author: Josef Bacik Date: Thu Aug 3 11:13:39 2017 -0400 sched/fair: Calculate runnable_weight slightly differently Our runnable_weight currently looks like this runnable_weight = shares * runnable_load_avg / load_avg The goal is to scale the runnable weight for the group based on its runnable to load_avg ratio. The problem with this is it biases us towards tasks that never go to sleep. Tasks that go to sleep are going to have their runnable_load_avg decayed pretty hard, which will drastically reduce the runnable weight of groups with interactive tasks. To solve this imbalance we tweak this slightly, so in the ideal case it is still the above, but in the interactive case it is runnable_weight = shares * runnable_weight / load_weight which will make the weight distribution fairer between interactive and non-interactive groups. Signed-off-by: Josef Bacik Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-team@fb.com Cc: linux-kernel@vger.kernel.org Cc: riel@redhat.com Cc: tj@kernel.org Link: http://lkml.kernel.org/r/1501773219-18774-2-git-send-email-jbacik@fb.com Signed-off-by: Ingo Molnar kernel/sched/fair.c | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) commit 9a2dd585b2c431ec1e5d46a9d9568291c7a534cc Author: Peter Zijlstra Date: Fri May 12 14:18:10 2017 +0200 sched/fair: Implement more accurate async detach The problem with the overestimate is that it will subtract too big a value from the load_sum, thereby pushing it down further than it ought to go. Since runnable_load_avg is not subject to a similar 'force', this results in the occasional 'runnable_load > load' situation. 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 kernel/sched/fair.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit f207934fb79d1af1de1a62b09d56a3a1914172c4 Author: Peter Zijlstra Date: Fri May 12 14:16:30 2017 +0200 sched/fair: Align PELT windows between cfs_rq and its se The PELT _sum values are a saw-tooth function, dropping on the decay edge and then growing back up again during the window. When these window-edges are not aligned between cfs_rq and se, we can have the situation where, for example, on dequeue, the se decays first. Its _sum values will be small(er), while the cfs_rq _sum values will still be on their way up. Because of this, the subtraction: cfs_rq->avg._sum -= se->avg._sum will result in a positive value. This will then, once the cfs_rq reaches an edge, translate into its _avg value jumping up. This is especially visible with the runnable_load bits, since they get added/subtracted a lot. 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 kernel/sched/fair.c | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) commit 144d8487bc6e9b741895709cb46d4e19b748a725 Author: Peter Zijlstra Date: Thu May 11 17:57:24 2017 +0200 sched/fair: Implement synchonous PELT detach on load-balance migrate Vincent wondered why his self migrating task had a roughly 50% dip in load_avg when landing on the new CPU. This is because we uncondionally take the asynchronous detatch_entity route, which can lead to the attach on the new CPU still seeing the old CPU's contribution to tg->load_avg, effectively halving the new CPU's shares. While in general this is something we have to live with, there is the special case of runnable migration where we can do better. Tested-by: Vincent Guittot 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 kernel/sched/fair.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) commit 1ea6c46a23f1213d1972bfae220db5c165e27bba Author: Peter Zijlstra Date: Sat May 6 15:59:54 2017 +0200 sched/fair: Propagate an effective runnable_load_avg The load balancer uses runnable_load_avg as load indicator. For !cgroup this is: runnable_load_avg = \Sum se->avg.load_avg ; where se->on_rq That is, a direct sum of all runnable tasks on that runqueue. As opposed to load_avg, which is a sum of all tasks on the runqueue, which includes a blocked component. However, in the cgroup case, this comes apart since the group entities are always runnable, even if most of their constituent entities are blocked. Therefore introduce a runnable_weight which for task entities is the same as the regular weight, but for group entities is a fraction of the entity weight and represents the runnable part of the group runqueue. Then propagate this load through the PELT hierarchy to arrive at an effective runnable load avgerage -- which we should not confuse with the canonical runnable load average. Suggested-by: Tejun Heo 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/sched.h | 3 + kernel/sched/debug.c | 8 ++- kernel/sched/fair.c | 172 +++++++++++++++++++++++++++++++++----------------- kernel/sched/sched.h | 3 +- 4 files changed, 124 insertions(+), 62 deletions(-) commit 0e2d2aaaae52c247c047d14999b93486bdbd3431 Author: Peter Zijlstra Date: Mon May 8 17:30:46 2017 +0200 sched/fair: Rewrite PELT migration propagation When an entity migrates in (or out) of a runqueue, we need to add (or remove) its contribution from the entire PELT hierarchy, because even non-runnable entities are included in the load average sums. In order to do this we have some propagation logic that updates the PELT tree, however the way it 'propagates' the runnable (or load) change is (more or less): tg->weight * grq->avg.load_avg ge->avg.load_avg = ------------------------------ tg->load_avg But that is the expression for ge->weight, and per the definition of load_avg: ge->avg.load_avg := ge->weight * ge->avg.runnable_avg That destroys the runnable_avg (by setting it to 1) we wanted to propagate. Instead directly propagate runnable_sum. 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 kernel/sched/debug.c | 2 + kernel/sched/fair.c | 186 +++++++++++++++++++++++++++++---------------------- kernel/sched/sched.h | 9 +-- 3 files changed, 112 insertions(+), 85 deletions(-) commit 2a2f5d4e44ed160a5ed822c94e04f918f9fbb487 Author: Peter Zijlstra Date: Mon May 8 16:51:41 2017 +0200 sched/fair: Rewrite cfs_rq->removed_*avg Since on wakeup migration we don't hold the rq->lock for the old CPU we cannot update its state. Instead we add the removed 'load' to an atomic variable and have the next update on that CPU collect and process it. Currently we have 2 atomic variables; which already have the issue that they can be read out-of-sync. Also, two atomic ops on a single cacheline is already more expensive than an uncontended lock. Since we want to add more, convert the thing over to an explicit cacheline with a lock in. 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 kernel/sched/debug.c | 8 ++++---- kernel/sched/fair.c | 51 +++++++++++++++++++++++++++++++++++---------------- kernel/sched/sched.h | 13 +++++++++---- 3 files changed, 48 insertions(+), 24 deletions(-) commit 9059393e4ec1c8c6623a120b405ef2c90b968d80 Author: Vincent Guittot Date: Wed May 17 11:50:45 2017 +0200 sched/fair: Use reweight_entity() for set_user_nice() Now that we directly change load_avg and propagate that change into the sums, sys_nice() and co should do the same, otherwise its possible to confuse load accounting when we migrate near the weight change. Fixes-by: Josef Bacik Signed-off-by: Vincent Guittot [ Added changelog, fixed the call condition. ] Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/20170517095045.GA8420@linaro.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 22 ++++++++++++------ kernel/sched/fair.c | 63 ++++++++++++++++++++++++++++++---------------------- kernel/sched/sched.h | 2 ++ 3 files changed, 54 insertions(+), 33 deletions(-) commit 840c5abca499a858619954dbcffc82110bb6e076 Author: Peter Zijlstra Date: Sat May 6 16:11:34 2017 +0200 sched/fair: More accurate reweight_entity() When a (group) entity changes it's weight we should instantly change its load_avg and propagate that change into the sums it is part of. Because we use these values to predict future behaviour and are not interested in its historical value. Without this change, the change in load would need to propagate through the average, by which time it could again have changed etc.. always chasing itself. With this change, the cfs_rq load_avg sum will more accurately reflect the current runnable and expected return of blocked load. Reported-by: Paul Turner [josef: compile fix !SMP || !FAIR_GROUP] 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 kernel/sched/fair.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 8d5b9025f9b4500f828260dc62e8ffa823ce0d59 Author: Peter Zijlstra Date: Thu Aug 24 17:45:35 2017 +0200 sched/fair: Introduce {en,de}queue_load_avg() Analogous to the existing {en,de}queue_runnable_load_avg() add helpers for {en,de}queue_load_avg(). More users will follow. Includes some code movement to avoid fwd declarations. 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 kernel/sched/fair.c | 156 +++++++++++++++++++++++++++++----------------------- 1 file changed, 86 insertions(+), 70 deletions(-) commit b5b3e35f4149df72aaba612bba195fb2ec37b1b1 Author: Peter Zijlstra Date: Thu Aug 24 17:38:30 2017 +0200 sched/fair: Rename {en,de}queue_entity_load_avg() Since they're now purely about runnable_load, rename them. 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 kernel/sched/fair.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit b382a531b9fece229c8358a9fb79431cddcf93c2 Author: Peter Zijlstra Date: Sat May 6 17:37:03 2017 +0200 sched/fair: Move enqueue migrate handling Move the entity migrate handling from enqueue_entity_load_avg() to update_load_avg(). This has two benefits: - {en,de}queue_entity_load_avg() will become purely about managing runnable_load - we can avoid a double update_tg_load_avg() and reduce pressure on the global tg->shares cacheline The reason we do this is so that we can change update_cfs_shares() to change both weight and (future) runnable_weight. For this to work we need to have the cfs_rq averages up-to-date (which means having done the attach), but we need the cfs_rq->avg.runnable_avg to not yet include the se's contribution (since se->on_rq == 0). 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 kernel/sched/fair.c | 70 +++++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 34 deletions(-) commit 88c0616ee729067ecb412bed76ef4a8734ea5100 Author: Peter Zijlstra Date: Sat May 6 17:32:43 2017 +0200 sched/fair: Change update_load_avg() arguments Most call sites of update_load_avg() already have cfs_rq_of(se) available, pass it down instead of recomputing it. 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 kernel/sched/fair.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit c7b50216818ef3dca14a52e3499750fbad2d9691 Author: Peter Zijlstra Date: Sat May 6 16:42:08 2017 +0200 sched/fair: Remove se->load.weight from se->avg.load_sum Remove the load from the load_sum for sched_entities, basically turning load_sum into runnable_sum. This prepares for better reweighting of group entities. Since we now have different rules for computing load_avg, split ___update_load_avg() into two parts, ___update_load_sum() and ___update_load_avg(). So for se: ___update_load_sum(.weight = 1) ___upate_load_avg(.weight = se->load.weight) and for cfs_rq: ___update_load_sum(.weight = cfs_rq->load.weight) ___upate_load_avg(.weight = 1) Since the primary consumable is load_avg, most things will not be affected. Only those few sites that initialize/modify load_sum need attention. 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 kernel/sched/fair.c | 91 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 64 insertions(+), 27 deletions(-) commit 3d4b60d3e3dde6ea24e439000eb3b71078da81f1 Author: Peter Zijlstra Date: Thu May 11 18:16:06 2017 +0200 sched/fair: Cure calc_cfs_shares() vs. reweight_entity() Vincent reported that when running in a cgroup, his root cfs_rq->avg.load_avg dropped to 0 on task idle. This is because reweight_entity() will now immediately propagate the weight change of the group entity to its cfs_rq, and as it happens, our approxmation (5) for calc_cfs_shares() results in 0 when the group is idle. Avoid this by using the correct (3) as a lower bound on (5). This way the empty cgroup will slowly decay instead of instantly drop to 0. Reported-by: Vincent Guittot 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 kernel/sched/fair.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit cef27403cbe98ebda0a32d43128dd60c309eb966 Author: Peter Zijlstra Date: Tue May 9 11:04:07 2017 +0200 sched/fair: Add comment to calc_cfs_shares() Explain the magic equation in calc_cfs_shares() a bit better. 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 kernel/sched/fair.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 7c80cfc99b7bfdc92cee26f8008859f326f4a37f Author: Peter Zijlstra Date: Sat May 6 16:03:17 2017 +0200 sched/fair: Clean up calc_cfs_shares() For consistencies sake, we should have only a single reading of tg->shares. 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 kernel/sched/fair.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) commit d8c893b44b2199f5935fe8667708253c38353782 Author: Dave Airlie Date: Fri Sep 29 17:13:31 2017 +1000 amdgpu/dc: inline dml_round_to_multiple turns out to be a win to inline this. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.c | 19 ------------------- drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.h | 2 -- drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h | 19 +++++++++++++++++++ 3 files changed, 19 insertions(+), 21 deletions(-) commit 2a206cc20a37b0a7a31179b32d1281ead9c56038 Author: Dave Airlie Date: Fri Sep 29 17:13:30 2017 +1000 amdgpu/dc: rename bios get_image symbol to something more searchable. This just makes it easier to find. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 6 +++--- drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 2 +- drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c | 2 +- drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) commit 04e212926f0d1213bc1ff1f8ab4050878699977d Author: Dave Airlie Date: Fri Sep 29 17:13:29 2017 +1000 amdgpu/dc: set some of the link dp code to static. These aren't currently used outside this file. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 18 +++++++++++++----- drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 8 -------- 2 files changed, 13 insertions(+), 13 deletions(-) commit 69e3fdaabe185ecbf7413eb53cd43ca407d6fbba Author: Dave Airlie Date: Fri Sep 29 17:13:28 2017 +1000 amdgpu/dc: inline all the signal_types code. This is worth 300 bytes, and one less source file. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/Makefile | 2 +- .../gpu/drm/amd/display/dc/basics/signal_types.c | 80 ---------------------- drivers/gpu/drm/amd/display/include/signal_types.h | 59 +++++++++++++--- 3 files changed, 52 insertions(+), 89 deletions(-) commit bd6d15769e6dcd22c57224b67376e1c6fb44b04f Author: Dave Airlie Date: Fri Sep 29 17:13:27 2017 +1000 amdgpu/dc: inline fixed31_32 div_int Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 9 --------- drivers/gpu/drm/amd/display/include/fixed31_32.h | 9 ++++++--- 2 files changed, 6 insertions(+), 12 deletions(-) commit c233e91b0f3f7c9abc80eae491fa6507a24a8a32 Author: Dave Airlie Date: Fri Sep 29 17:13:26 2017 +1000 amdgpu/dc: use the builtin constant p trick on the 31/32 fixed point. This only gets us 100 bytes, but may as well be consistent. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 22 ++++++++++------------ drivers/gpu/drm/amd/display/include/fixed31_32.h | 15 +++++++++++++-- 2 files changed, 23 insertions(+), 14 deletions(-) commit dfd1e5ce673b8b2557d622dc99735e2d7ad5ba5b Author: Dave Airlie Date: Fri Sep 29 17:13:25 2017 +1000 amdgpu/dc: allow inlining constant int to fixed a lot better. This uses two things that might be Linux specific, __builtin_constant_p (might be gcc) and BUILD_BUG_ON. (maybe other dm's can have something similiar). This saves 4k in the bw calcs code. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/bw_fixed.c | 37 ++++++++----------------- drivers/gpu/drm/amd/display/dc/inc/bw_fixed.h | 26 +++++++++++++++-- 2 files changed, 35 insertions(+), 28 deletions(-) commit 1fcd8c53b0c45c405433b5d78a5e2b2d858bd3af Author: Dave Airlie Date: Fri Sep 29 17:13:24 2017 +1000 amdgpu/dc: inline some of the bw_fixed code. This results in a ~4.5k code size reduction. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/bw_fixed.c | 93 -------------------- drivers/gpu/drm/amd/display/dc/inc/bw_fixed.h | 111 ++++++++++++++++++++---- 2 files changed, 96 insertions(+), 108 deletions(-) commit 450619d328d0824fab649187019cbea3532f879c Author: Dave Airlie Date: Fri Sep 29 17:13:23 2017 +1000 amdgpu/dc: move some one line dp functions to inlines. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 736b4f153b62247d0f2e2bd1e9b04b7489edb596 Author: Dave Airlie Date: Fri Sep 29 17:13:22 2017 +1000 amdgpu/dc: hide some unused aux/i2c payload apis. I've no idea if these are used on other platforms, but they aren't used outside this file here, so make them static. Drops 300 bytes. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 16 ++++++++-------- drivers/gpu/drm/amd/display/dc/inc/dc_link_ddc.h | 10 ---------- 2 files changed, 8 insertions(+), 18 deletions(-) commit 204de25fd0685237a6382626e5862328a16ce15b Author: Dave Airlie Date: Fri Sep 29 15:45:08 2017 +1000 amdgpu/dc: inline a bunch of the fixed 31_32 helpers. This decreases code size by a few hundred bytes. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 122 ------------------- drivers/gpu/drm/amd/display/include/fixed31_32.h | 132 +++++++++++++++------ 2 files changed, 93 insertions(+), 161 deletions(-) commit c4fee8796119ee6403317461b73d6afba85f8113 Author: Dave Airlie Date: Fri Sep 29 15:45:07 2017 +1000 amdgpu/dc: inline some of the fixed 32_32 fns This drops ~400 bytes here. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/fixpt32_32.c | 60 ----------------- drivers/gpu/drm/amd/display/include/fixed32_32.h | 76 +++++++++++++++++----- 2 files changed, 61 insertions(+), 75 deletions(-) commit 6be663b5bdb7cc299b2aafca56be39f6618090ab Author: Dave Airlie Date: Fri Sep 29 14:34:42 2017 +1000 amdgpu/dc: fix construct return values on irq service. This just removes more unused return/errors paths. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c | 14 ++++---------- .../gpu/drm/amd/display/dc/irq/dce120/irq_service_dce120.c | 14 ++++---------- .../gpu/drm/amd/display/dc/irq/dce80/irq_service_dce80.c | 14 ++++---------- .../gpu/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c | 14 ++++---------- drivers/gpu/drm/amd/display/dc/irq/irq_service.c | 9 +++++---- drivers/gpu/drm/amd/display/dc/irq/irq_service.h | 2 +- 6 files changed, 22 insertions(+), 45 deletions(-) commit db6c3bdcfe2d810338f90a13d415d43dd98d342b Author: Dave Airlie Date: Fri Sep 29 14:34:41 2017 +1000 amdgpu: fixup construct to void paths on some more dc objects. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 10 +++------- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 18 +++++------------- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 15 +++------------ 3 files changed, 11 insertions(+), 32 deletions(-) commit 94de2bbdfa613165ff20a3e958775c8d01581946 Author: Dave Airlie Date: Fri Sep 29 14:34:40 2017 +1000 amdgpu/dc: remove pointless return from build_pipe_hw_param This never returned anything else. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 6 +----- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 10 ++-------- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.h | 2 +- drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 6 +----- drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 6 +----- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 11 ++--------- 6 files changed, 8 insertions(+), 33 deletions(-) commit c13b408b81f8a101501d78ca499afee98e0f0ab9 Author: Dave Airlie Date: Fri Sep 29 14:34:39 2017 +1000 amdgpu/dc: another round of dce/dcn construct cleanups. This removes any remaining pointless return codepaths from the DCE code. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dce100/dce100_hw_sequencer.c | 4 +--- .../drm/amd/display/dc/dce100/dce100_hw_sequencer.h | 2 +- .../gpu/drm/amd/display/dc/dce100/dce100_resource.c | 4 +--- .../drm/amd/display/dc/dce110/dce110_compressor.c | 11 +++-------- .../drm/amd/display/dc/dce110/dce110_compressor.h | 2 +- .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 +--- .../drm/amd/display/dc/dce110/dce110_hw_sequencer.h | 2 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_v.c | 4 +--- drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_v.h | 2 +- .../gpu/drm/amd/display/dc/dce110/dce110_resource.c | 6 ++---- .../display/dc/dce110/dce110_timing_generator_v.c | 7 +------ .../display/dc/dce110/dce110_timing_generator_v.h | 2 +- .../drm/amd/display/dc/dce112/dce112_compressor.c | 11 +++-------- .../drm/amd/display/dc/dce112/dce112_compressor.h | 2 +- .../drm/amd/display/dc/dce112/dce112_hw_sequencer.c | 4 +--- .../drm/amd/display/dc/dce112/dce112_hw_sequencer.h | 2 +- .../gpu/drm/amd/display/dc/dce112/dce112_resource.c | 3 +-- .../drm/amd/display/dc/dce120/dce120_hw_sequencer.c | 4 +--- .../drm/amd/display/dc/dce120/dce120_hw_sequencer.h | 2 +- .../gpu/drm/amd/display/dc/dce120/dce120_resource.c | 8 ++------ .../amd/display/dc/dce120/dce120_timing_generator.c | 7 +------ .../amd/display/dc/dce120/dce120_timing_generator.h | 2 +- .../gpu/drm/amd/display/dc/dce80/dce80_compressor.c | 11 +++-------- .../gpu/drm/amd/display/dc/dce80/dce80_compressor.h | 2 +- .../drm/amd/display/dc/dce80/dce80_hw_sequencer.c | 4 +--- .../drm/amd/display/dc/dce80/dce80_hw_sequencer.h | 2 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 9 +++------ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 4 +--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 2 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 4 +--- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 2 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 20 ++++++-------------- 32 files changed, 47 insertions(+), 108 deletions(-) commit 0e1c42fd181e7359be5c97655198551b6660f028 Author: Dave Airlie Date: Fri Sep 29 14:34:38 2017 +1000 amdgpu/dc: cleanup construct returns in gpio. This is similiar to previous patches, don't return when we don't need to, also do error checking before allocating memory, makes it simpler to cleanup after. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 33 +++++++------------ drivers/gpu/drm/amd/display/dc/gpio/hw_gpio.c | 4 +-- drivers/gpu/drm/amd/display/dc/gpio/hw_gpio.h | 2 +- drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c | 47 ++++++++++----------------- 4 files changed, 30 insertions(+), 56 deletions(-) commit b08c3ca4e90d03b3a120f4e60dba4b2b5e087433 Author: Dave Airlie Date: Fri Sep 29 15:44:54 2017 +1000 amdgpu/dc: remove pointless returns in the i2caux constructor paths. (v2) There was lots of return true, and error checking that was never used in these paths. Just remove it all. v2: I missed one return true. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c | 6 ++-- drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.h | 2 +- .../amd/display/dc/i2caux/dce100/i2caux_dce100.c | 21 +++++--------- .../display/dc/i2caux/dce110/aux_engine_dce110.c | 20 +++----------- .../dc/i2caux/dce110/i2c_hw_engine_dce110.c | 24 ++++++---------- .../dc/i2caux/dce110/i2c_hw_engine_dce110.h | 4 --- .../dc/i2caux/dce110/i2c_sw_engine_dce110.c | 20 +++----------- .../amd/display/dc/i2caux/dce110/i2caux_dce110.c | 30 ++++++-------------- .../amd/display/dc/i2caux/dce110/i2caux_dce110.h | 2 +- .../amd/display/dc/i2caux/dce112/i2caux_dce112.c | 30 ++++++-------------- .../amd/display/dc/i2caux/dce120/i2caux_dce120.c | 21 +++++--------- .../display/dc/i2caux/dce80/i2c_hw_engine_dce80.c | 32 ++++++++-------------- .../display/dc/i2caux/dce80/i2c_sw_engine_dce80.c | 19 +++---------- .../drm/amd/display/dc/i2caux/dce80/i2caux_dce80.c | 19 +++---------- .../drm/amd/display/dc/i2caux/dcn10/i2caux_dcn10.c | 21 +++++--------- .../display/dc/i2caux/diagnostics/i2caux_diag.c | 20 +++----------- drivers/gpu/drm/amd/display/dc/i2caux/engine.h | 2 +- .../gpu/drm/amd/display/dc/i2caux/engine_base.c | 3 +- drivers/gpu/drm/amd/display/dc/i2caux/i2c_engine.c | 7 ++--- drivers/gpu/drm/amd/display/dc/i2caux/i2c_engine.h | 2 +- .../amd/display/dc/i2caux/i2c_generic_hw_engine.c | 6 ++-- .../amd/display/dc/i2caux/i2c_generic_hw_engine.h | 2 +- .../gpu/drm/amd/display/dc/i2caux/i2c_hw_engine.c | 6 ++-- .../gpu/drm/amd/display/dc/i2caux/i2c_hw_engine.h | 2 +- .../gpu/drm/amd/display/dc/i2caux/i2c_sw_engine.c | 17 +++--------- .../gpu/drm/amd/display/dc/i2caux/i2c_sw_engine.h | 2 +- drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c | 4 +-- drivers/gpu/drm/amd/display/dc/i2caux/i2caux.h | 2 +- 28 files changed, 100 insertions(+), 246 deletions(-) commit 4179cd81376112d627216580b09b803eb25e1635 Author: Dave Airlie Date: Fri Sep 29 14:34:36 2017 +1000 amdgpu/dc: make some audio functions return void There is no need to check for these pointers being valid at this level. Check earlier if required. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 4dec2aa9eb1386e592d76f380360360178c4af02 Author: Dave Airlie Date: Fri Sep 29 14:34:35 2017 +1000 amdgpu/dc: make program_regamma_pwl return void The return value was unused. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 4 +--- drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 2 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c | 4 +--- drivers/gpu/drm/amd/display/dc/dce110/dce110_transform_v.h | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 4 +--- drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 2 +- 6 files changed, 6 insertions(+), 12 deletions(-) commit 2c9a7908b44eca05d1d08270a9f982b96ee30bda Author: Dave Airlie Date: Fri Sep 29 14:34:34 2017 +1000 amdgpu/dc: make get_audio_clock_info return void. This function never returned false under any sane circumstances. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dce/dce_stream_encoder.c | 75 ++++++++++------------ 1 file changed, 34 insertions(+), 41 deletions(-) commit 99913a171d00b2d4c94127a9e38e5457bc45635d Author: Dave Airlie Date: Fri Sep 29 13:16:00 2017 +1000 amdgpu/dc: make dce80 timing generator construct return void. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 8 ++------ drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c | 7 +------ drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.h | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) commit 5fb005c4583749f54d5bab6622dbed1d2d56c268 Author: Dave Airlie Date: Fri Sep 29 13:15:59 2017 +1000 amdgpu/dc: make dce transform constructor void This never returns anything but true. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 4 +--- drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 2 +- drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 11 +++-------- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 10 +++------- drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 13 ++++--------- drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 13 ++++--------- drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 13 ++++--------- 7 files changed, 20 insertions(+), 46 deletions(-) commit 9cf29399f615fc13732f3c8ba3f5ff47e2ca256d Author: Dave Airlie Date: Fri Sep 29 13:15:58 2017 +1000 amdgpu/dc: make opp construct void. This doesn't return anything except true. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 4 +--- drivers/gpu/drm/amd/display/dc/dce/dce_opp.h | 2 +- drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 10 +++------- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 10 +++------- drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 10 +++------- drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 10 +++------- drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 10 +++------- 7 files changed, 17 insertions(+), 39 deletions(-) commit c60ae11201caff8b0c5c23e4349bf42388e3828b Author: Dave Airlie Date: Fri Sep 29 13:15:57 2017 +1000 amdgpu/dc: make link encoder construct void. This only ever returned true. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 4 +--- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 2 +- .../gpu/drm/amd/display/dc/dce100/dce100_resource.c | 21 +++++++-------------- .../gpu/drm/amd/display/dc/dce110/dce110_resource.c | 21 +++++++-------------- .../gpu/drm/amd/display/dc/dce112/dce112_resource.c | 21 +++++++-------------- .../gpu/drm/amd/display/dc/dce120/dce120_resource.c | 20 +++++++------------- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 21 +++++++-------------- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 20 +++++++------------- 8 files changed, 44 insertions(+), 86 deletions(-) commit f29f918f2868ece27c8aff0edc84c7d7fbdc5598 Author: Dave Airlie Date: Fri Sep 29 13:15:56 2017 +1000 amdgpu/dc: make stream encoder constructor return void. The checks weren't useful here really. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 9 +-------- drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h | 2 +- drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 11 +++-------- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 12 ++++-------- drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 14 +++++--------- drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 12 ++++-------- drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 12 ++++-------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 12 ++++-------- 8 files changed, 26 insertions(+), 58 deletions(-) commit ca19d1a68b7e0f1d0717bd3f2d9d75cb3c568ddb Author: Dave Airlie Date: Fri Sep 29 13:15:55 2017 +1000 amdgpu/dc: make timing generator constructor return void. This can't fail as is. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 9 ++------- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 8 ++------ drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c | 7 +------ drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.h | 2 +- drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 8 ++------ 5 files changed, 8 insertions(+), 26 deletions(-) commit 395f669eb69b8b37ed2ffe0c5f67e942e9d00dc8 Author: Dave Airlie Date: Fri Sep 29 10:39:29 2017 +1000 amdgpu/dc: constify a bunch of dc structs. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) commit d90371b0f5f3258a808d12a17a942e4d16f8252c Author: Dave Airlie Date: Fri Sep 29 10:32:24 2017 +1000 amdgpu/dm: constify rgb formats. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e04a6123a45abf6836f547e679a8f9aca37ceeb6 Author: Dave Airlie Date: Fri Sep 29 10:32:23 2017 +1000 amdgpu/dm: constify plane type. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 99d1abf8f41ed2c256e8cca7e9da71d751894c7f Author: Dave Airlie Date: Fri Sep 29 10:27:41 2017 +1000 amdgpu/dm: constify yuv_formats. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8a1d69ccb5e0ffc2771b3a7a6ec9d948d10ee9d Author: Dave Airlie Date: Fri Sep 29 10:23:15 2017 +1000 amdgpu/dc: static constify update_surface_trace_level Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2dc3e4a86c8cce49bc73f41d8e0134557c506488 Author: Dave Airlie Date: Fri Sep 29 10:20:39 2017 +1000 amdgpu/dc: drop dc_ver char This isn't referenced anywhere, and if it was it should be const. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 -- 1 file changed, 2 deletions(-) commit 1f23f4dc65ff5ad2a4a4024bd487b4d4bce905d3 Author: Tony Lindgren Date: Wed Sep 20 07:43:24 2017 -0700 ARM: dts: Configure earlycon for omap5-common With commit 8dd6666f4937 ("ARM: OMAP2+: omap_hwmod: Add support for earlycon") we can now get debug information early if something goes wrong as long as kernel command line has earlycon in it. Let's enable it for omap5-common as all these have debug uart at uart3. Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5-board-common.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 1ed25e1aa468b3f36cb64aacb419cc5bda2fb8a9 Author: Tony Lindgren Date: Wed Sep 20 07:43:23 2017 -0700 ARM: dts: Configure earlycon for pandaboard With commit 8dd6666f4937 ("ARM: OMAP2+: omap_hwmod: Add support for earlycon") we can now get debug information early if something goes wrong as long as kernel command line has earlycon in it. Let's enable it for pandaboards as they all have a debug uart at uart3. Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4-panda-common.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 184240397015323e3e0f135c22df35427a1fb397 Author: Tony Lindgren Date: Wed Sep 20 07:43:22 2017 -0700 ARM: dts: Configure earlycon for n8x0 With commit 8dd6666f4937 ("ARM: OMAP2+: omap_hwmod: Add support for earlycon") we can now get debug information early if something goes wrong as long as kernel command line has earlycon in it. Let's enable it for n8x0. Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap2420-n8x0-common.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 2a479aa83bd6d55bfc20b07d85e5d19a84f292f7 Author: Al Viro Date: Fri Sep 29 12:40:54 2017 -0400 selection: get rid of field-by-field copyin Signed-off-by: Al Viro drivers/tty/vt/selection.c | 50 +++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 29 deletions(-) commit 1b3bce4d6bf839304a90951b4b25a5863533bf2a Author: Al Viro Date: Fri Sep 29 12:34:13 2017 -0400 VT_RESIZEX: get rid of field-by-field copyin Signed-off-by: Al Viro drivers/tty/vt/vt_ioctl.c | 68 +++++++++++++++++++---------------------------- 1 file changed, 27 insertions(+), 41 deletions(-) commit 63cdc76e29a60d810263474ab072a587009d18b8 Author: Dave Airlie Date: Fri Sep 29 12:30:23 2017 +1000 amdgpu/pp: rewrite fiji pwr virus upload code. Along the same lines as rewriting the polaris code, this rewrites the fiji code, and reduces the driver size by ~40k. Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/fiji_pwrvirus.h | 10797 +++---------------- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 35 +- 2 files changed, 1284 insertions(+), 9548 deletions(-) commit 6f5c2f9d3c5c335ae86203f9548e1a861bdd154a Author: Dave Airlie Date: Fri Sep 29 12:15:46 2017 +1000 amdgpu/pp: rewrite polaris pwrvirus upload code. This reduces the pwrvirus table size by 30k, by moving the sequences of writes to the data register into blocks. Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/inc/polaris10_pwrvirus.h | 10797 +++---------------- .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 37 +- 2 files changed, 1285 insertions(+), 9549 deletions(-) commit c6622f3afcb4da90e2600ee98e91a8a5640f7a27 Author: Dave Airlie Date: Fri Sep 29 10:47:43 2017 +1000 amdgpu/nbio: use constant nbio_hdp_flush_reg structs. This removes the init path as well, since the init path just did some constant init of some structs. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 38 +++++++++++++++------------------- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.h | 2 +- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 38 +++++++++++++++------------------- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.h | 2 +- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/soc15.c | 15 -------------- 7 files changed, 38 insertions(+), 61 deletions(-) commit 35b31f7c6464480b10f3a54c9a35699e02f17ae8 Author: Dave Airlie Date: Fri Sep 29 10:08:01 2017 +1000 amdgpu/soc15: make the pcie index/data registers constant. These don't seem to change at runtime, and the initialisers are constant data. This could be improved by not selecting the apu/non-apu path on each pcie read/write access. Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.h | 2 +- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.h | 2 +- drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) commit 6cdb91e28128595c1e2b7d0fa1ead30dc34ff15c Author: Dave Airlie Date: Fri Sep 29 10:39:30 2017 +1000 amdgpu/pp: constify soft_dummy_pp_table. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ce27643cc0f56f7a70de17c2ef54541ad4252c1a Author: Dave Airlie Date: Fri Sep 29 11:12:30 2017 +1000 amdgpu/pp: use array_size to size the pwrvirus tables. This avoids fragile hardcoding of array size. Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/fiji_pwrvirus.h | 3 +-- drivers/gpu/drm/amd/powerplay/inc/polaris10_pwrvirus.h | 5 +---- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) commit d81a2209498b6349a33f8741ca5a062dde84c043 Author: Dave Airlie Date: Fri Sep 29 10:12:53 2017 +1000 amdgfx/gfx: don't use static objects for ce/de meta. (v2) This isn't safe if we have multiple GPUs plugged in, since there is only one copy of this struct in the bss, just allocate on stack, it's 40/108 bytes which should be safe. Reviewed-by: Christian König Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 988e175b9df683ac8c465fca60d64dbe9e4dd81e Author: Lijun Ou Date: Fri Sep 29 23:10:14 2017 +0800 RDMA/hns: Fix calltrace for sleeping in atomic We replace usleep_range that was excessively long anyway with udelay to avoid using usleep_range function in spin_lock_bh spin region, thereby avoiding this calltrace: BUG: scheduling while atomic: insmod/1428/0x00000002 Modules linked in: hns-roce-hw-v2(+) hns_roce rdma_ucm rdma_cm iw_cm ib_uverbs ib_cm ib_core CPU: 0 PID: 1428 Comm: insmod Not tainted 4.12.0-rc1-00677-g252e8fd-dirty #43 Hardware name: (null) (DT) Call trace: [] dump_backtrace+0x0/0x274 [] show_stack+0x20/0x28 [] dump_stack+0x94/0xb4 [] __schedule_bug+0x68/0x84 [] __schedule+0x5fc/0x70c [] schedule+0x40/0xa4 [] schedule_hrtimeout_range_clock+0x98/0xfc [] schedule_hrtimeout_range+0x34/0x40 [] usleep_range+0x6c/0x80 [] hns_roce_cmd_send+0xe4/0x264 [hns-roce-hw-v2] [] hns_roce_cmd_query_hw_info+0x40/0x60 [hns-roce-hw-v2] [] hns_roce_v2_profile+0x28/0x668 [hns-roce-hw-v2] [] hns_roce_init+0x6c/0x948 [hns-roce-hw-v2] Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7944ff4e5d8a457c1d1b7fe063b6b774c47dea86 Author: Lijun Ou Date: Fri Sep 29 23:10:13 2017 +0800 RDMA/hns: Don't unregister a callback we didn't register The driver doesn't actually register an inetaddr notifier function, so there is no need to unregister it on shutdown. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 1 - drivers/infiniband/hw/hns/hns_roce_main.c | 1 - 2 files changed, 2 deletions(-) commit 95f99ab493da2847277af659dc927cd112702c72 Author: Derald D. Woods Date: Tue Sep 12 18:48:24 2017 -0500 ARM: dts: omap3-evm: Add DSS {vdds_dsi,vdda_video}-supply references This commit eliminates two dummy regulator assignments. Signed-off-by: Derald D. Woods Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-evm-processor-common.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit bc67986131c6147198d8fca7fa630aa70a961ad3 Author: Derald D. Woods Date: Tue Sep 12 18:48:23 2017 -0500 ARM: dts: omap3: Add Sharp LS037V7DW01 'envdd' supply The Sharp panel 'envdd' regulator is now selected properly. This commit eliminates a dummy regulator assignment at boot. Signed-off-by: Derald D. Woods Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-panel-sharp-ls037v7dw01.dtsi | 1 + 1 file changed, 1 insertion(+) commit 62fe1d337461f64116e8884e8c8f1f2b6b6b65d4 Author: Derald D. Woods Date: Tue Sep 12 18:48:22 2017 -0500 ARM: dts: omap3-evm: Add OMAP3530 specific device tree processor data This commit allows OMAP3530 variants to use common data that is available in 'omap3-evm-processor-common.dtsi'. It adds proper pinmux macros for 'omap3_pmx_core2' on OMAP3430. The Micron NAND chip is also added for the TMDSEVM3530 processor module. Signed-off-by: Derald D. Woods Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-evm.dts | 76 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 72 insertions(+), 4 deletions(-) commit 294b9cb84195a9606a22a4f5d0e26b51da6c0ce1 Author: Derald D. Woods Date: Tue Sep 12 18:48:21 2017 -0500 ARM: dts: omap3-evm-37xx: Add common processor module support This commit moves common OMAP3-EVM processor module device tree data to a separate include file. This will allow for 'omap3-evm.dts' to use device tree data that is unique to the OMAP3530 version of the processor module, while making use of the work already done for the 'omap3-evm-37xx.dts'. Signed-off-by: Derald D. Woods Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3-evm-37xx.dts | 209 +-------------------- arch/arm/boot/dts/omap3-evm-processor-common.dtsi | 214 ++++++++++++++++++++++ 2 files changed, 215 insertions(+), 208 deletions(-) commit 5e437b1d7e8d31ff9a4b8e898eb3a6cee309edd9 Author: Wei Hu(Xavier) Date: Fri Sep 29 23:10:12 2017 +0800 RDMA/hns: Avoid NULL pointer exception After the loop in hns_roce_v1_mr_free_work_fn function, it is possible that all qps will have been freed (in which case ne will be 0). If that happens, then later in the function when we dereference hr_qp we will get an exception. Check ne is not 0 to make sure we actually have an hr_qp left to work on. This patch fixes the smatch error as below: drivers/infiniband/hw/hns/hns_roce_hw_v1.c:1009 hns_roce_v1_mr_free_work_fn() error: we previously assumed 'hr_qp' could be null Signed-off-by: Wei Hu (Xavier) Signed-off-by: Lijun Ou Signed-off-by: Shaobo Xu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2bf910d4a23e94a3e2528b65365a5c4a102a3c8e Author: Lijun Ou Date: Fri Sep 29 23:10:11 2017 +0800 RDMA/hns: Set rdma_ah_attr type for querying qp When querying qp, It needs to return RoCE device ah_attr type that may be specific to RoCE devices. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 ++ drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1 + 2 files changed, 3 insertions(+) commit 512f4f1653e63b6efbdccb296b812fa809b7c95c Author: Lijun Ou Date: Fri Sep 29 23:10:10 2017 +0800 RDMA/hns: Only assign dest_qp if IB_QP_DEST_QPN bit is set Only when the IB_QP_DEST_QPN flag of attr_mask is set is it valid to assign the dest_qp_num into the dest_qp field of qp context. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit a74dc41d49959e46ca356a388fab3a23a4b593cd Author: Wei Hu(Xavier) Date: Fri Sep 29 23:10:09 2017 +0800 RDMA/hns: Check return value of kzalloc When lp_qp_work is NULL, we should return ENOMEM. In order to do so, we had to make some upper layer functions return a value instead of being void type so we can propagate the error up the stack. This patch fixes the smatch error as below: drivers/infiniband/hw/hns/hns_roce_hw_v1.c:918 hns_roce_v1_recreate_lp_qp() error: potential null dereference 'lp_qp_work'. (kzalloc returns null) Signed-off-by: Wei Hu (Xavier) Signed-off-by: Lijun Ou Signed-off-by: Shaobo Xu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 2 +- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 16 +++++++++++++--- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 6 ++++-- drivers/infiniband/hw/hns/hns_roce_main.c | 17 +++++++++++------ 4 files changed, 29 insertions(+), 12 deletions(-) commit f44c863be282f575becb1aacb69fd42f8ea53c6d Author: Lijun Ou Date: Fri Sep 29 23:10:08 2017 +0800 RDMA/hns: Refactor code for readability Put the code for checking the send doorbell status into a separate function and call it from check_qp_db_process_status to improve indenting and readability. It fixes the warning from static checker: drivers/infiniband/hw/hns/hns_roce_hw_v1.c:3562 check_qp_db_process_status() warn: inconsistent indenting. Fixes: 5f110ac4bed8 ("IB/hns: Fix for checkpatch.pl comment style) Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 95 ++++++++++++++++-------------- 1 file changed, 51 insertions(+), 44 deletions(-) commit be7acd9d01c65a5d947ecd36d7b78b838b7313e5 Author: Lijun Ou Date: Fri Sep 29 23:10:07 2017 +0800 RDMA/hns: Modify the value with rd&dest_rd of qp_attr The value of max_rd_atomic and max_dest_rd_atomic in query_qp are incorrect. It should be assigned by left shifting of the bit in hip06 SoC. Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2015f26cfadec126265fabfbb0e6566e2cca94b4 Author: Steve Wise Date: Tue Sep 26 13:13:17 2017 -0700 iw_cxgb4: add referencing to wait objects For messages sent from the host to fw that solicit a reply from fw, the c4iw_wr_wait struct pointer is passed in the host->fw message, and included in the fw->host fw6_msg reply. This allows the sender to wait until the reply is received, and the code processing the ingress reply to wake up the sender. If c4iw_wait_for_reply() times out, however, we need to keep the c4iw_wr_wait object around in case the reply eventually does arrive. Otherwise we have touch-after-free bugs in the wake_up paths. This was hit due to a bad kernel driver that blocked ingress processing of cxgb4 for a long time, causing iw_cxgb4 timeouts, but eventually resuming ingress processing and thus hitting the touch-after-free bug. So I want to fix iw_cxgb4 such that we'll at least keep the wait object around until the reply comes. If it never comes we leak a small amount of memory, but if it does come late, we won't potentially crash the system. So add a kref struct in the c4iw_wr_wait struct, and take a reference before sending a message to FW that will generate a FW6 reply. And remove the reference (and potentially free the wait object) when the reply is processed. The ep code also uses the wr_wait for non FW6 CPL messages and doesn't embed the c4iw_wr_wait object in the message sent to firmware. So for those cases we add c4iw_wake_up_noref(). The mr/mw, cq, and qp object create/destroy paths do need this reference logic. For these paths, c4iw_ref_send_wait() is introduced to take the wr_wait reference, send the msg to fw, and then wait for the reply. So going forward, iw_cxgb4 either uses c4iw_ofld_send(), c4iw_wait_for_reply() and c4iw_wake_up_noref() like is done in the some of the endpoint logic, or c4iw_ref_send_wait() and c4iw_wake_up_deref() (formerly c4iw_wake_up()) when sending messages with the c4iw_wr_wait object pointer embedded in the message and resulting FW6 reply. Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 20 ++++++------ drivers/infiniband/hw/cxgb4/cq.c | 18 +++------- drivers/infiniband/hw/cxgb4/device.c | 21 ++++++++++++ drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 60 ++++++++++++++++++++++++++++++++-- drivers/infiniband/hw/cxgb4/mem.c | 38 +++++++++++---------- drivers/infiniband/hw/cxgb4/qp.c | 31 ++++++------------ 6 files changed, 123 insertions(+), 65 deletions(-) commit ef885dc66c29dd8e6f6a12f164ed11237323c234 Author: Steve Wise Date: Tue Sep 26 13:12:16 2017 -0700 iw_cxgb4: allocate wait object for each ep object Remove the embedded c4iw_wr_wait object in preparation for correctly handling timeouts. Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 38 ++++++++++++++++++++-------------- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 +- drivers/infiniband/hw/cxgb4/qp.c | 8 +++---- 3 files changed, 28 insertions(+), 20 deletions(-) commit 7088a9ba624599696f920eac552eac69366c8440 Author: Steve Wise Date: Tue Sep 26 13:11:36 2017 -0700 iw_cxgb4: allocate wait object for each qp object Remove the local stack allocated c4iw_wr_wait object in preparation for correctly handling timeouts. Also cleaned up some error path unwind logic to make it more readable. Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 1 + drivers/infiniband/hw/cxgb4/qp.c | 55 ++++++++++++++++++++-------------- 2 files changed, 34 insertions(+), 22 deletions(-) commit 13ce83174afaf4ceb4dddd7b7e421778ee4fcf5e Author: Steve Wise Date: Tue Sep 26 13:08:08 2017 -0700 iw_cxgb4: allocate wait object for each cq object Remove the local stack allocated c4iw_wr_wait object in preparation for correctly handling timeouts. Also cleaned up some error path unwind logic to make it more readable. Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cq.c | 63 +++++++++++++++++++--------------- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 1 + 2 files changed, 37 insertions(+), 27 deletions(-) commit a3f12da0e99a8d17118ee9e18a1f760a0d427b26 Author: Steve Wise Date: Tue Sep 26 13:07:26 2017 -0700 iw_cxgb4: allocate wait object for each memory object Remove the local stack allocated c4iw_wr_wait object in preparation for correctly handling timeouts. Also refactored some code to simplify it and make errpath unwinding more readable. Signed-off-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 + drivers/infiniband/hw/cxgb4/mem.c | 228 ++++++++++++++++++++------------- 2 files changed, 141 insertions(+), 89 deletions(-) commit e930b4d8a52067c773d9cd6f6bdd7d4ddc99563f Author: Colin Ian King Date: Fri Sep 29 14:52:27 2017 +0100 RDMA/hns: remove redundant assignment to variable j Variable j is being assigned to loop_j and then later being assigned to a new value in for loops. The first initialization is therefore redundant and can be removed. Cleans up clang warning: warning: Value stored to 'j' is never read Signed-off-by: Colin Ian King Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_mr.c | 1 - 1 file changed, 1 deletion(-) commit 281d0ccfae86c5b35ac48a0f2f20a6775a85cd05 Author: Colin Ian King Date: Fri Sep 29 14:16:01 2017 +0100 RDMA/hns: make various function static, fixes warnings The functions hns_roce_table_mhop_get, hns_roce_table_mhop_put, hns_roce_cleanup_mhop_hem_table, hns_roce_v1_post_mbox, hns_roce_cmq_setup_basic_desc, hns_roce_cmq_send, hns_roce_cmq_query_hw_info are all local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'hns_roce_table_mhop_get' was not declared. Should it be static? symbol 'hns_roce_table_mhop_put' was not declared. Should it be static? symbol 'hns_roce_cleanup_mhop_hem_table' was not declared. Should it be static? symbol 'hns_roce_v1_post_mbox' was not declared. Should it be static? symbol 'hns_roce_cmq_setup_basic_desc' was not declared. Should it be static? symbol 'hns_roce_cmq_send' was not declared. Should it be static? symbol 'hns_roce_cmq_query_hw_info' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hem.c | 18 +++++++++--------- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 6 +++--- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) commit 4ea597ea3de2733873cdcfd5c4a9a2760a126daf Author: Dan Carpenter Date: Fri Sep 29 10:49:43 2017 +0300 i40iw: delete some stray tabs These lines were indented too far by mistake. Signed-off-by: Dan Carpenter Reviewed-by: Leon Romanovsky Acked-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b04dc1999073250b7d9919eb266da61283ba3db0 Author: Ajaykumar Hotchandani Date: Wed Sep 27 21:26:08 2017 +0300 IB/{ipoib, iser}: Consistent print format of vendor error Vendor error print should be consistent across protocols to avoid any confusion. This patch corrects that. Suggested-by: Santosh Shilimkar Signed-off-by: Ajaykumar Hotchandani Reviewed-by: Santosh Shilimkar Acked-by: Wengang Wang Reviewed-by: Yuval Shaia Signed-off-by: Yuval Shaia Acked-by: Sagi Grimberg Acked-by: Roi Dayan Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_cm.c | 10 +++++----- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 8 ++++---- drivers/infiniband/ulp/iser/iser_verbs.c | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) commit e1ac263fcb58a63aed0d9a75d22e045f88a53bb2 Author: Himanshu Jha Date: Sun Sep 24 17:21:07 2017 +0530 IB/qib: Use setup_timer and mod_timer Use setup_timer and mod_timer API instead of structure assignments. This is done using Coccinelle and semantic patch used for this as follows: @@ expression x,y,z,a,b; @@ -init_timer (&x); +setup_timer (&x, y, z); +mod_timer (&a, b); -x.function = y; -x.data = z; -x.expires = b; -add_timer(&a); Signed-off-by: Himanshu Jha Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_driver.c | 8 +++----- drivers/infiniband/hw/qib/qib_mad.c | 10 ++++------ 2 files changed, 7 insertions(+), 11 deletions(-) commit e538e0aca33f81fbfaa10a6954b40ff4360686dd Author: Kalderon, Michal Date: Wed Sep 20 08:39:46 2017 +0300 RDMA/qedr: Fix rdma_type initialization Initialize the rdma_type (iWARP or RoCE) which is set according to device configuration in qed. Fixes: e6a38c54faf ("RDMA/qedr: Add support for registering an iWARP device") Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/main.c | 1 + 1 file changed, 1 insertion(+) commit 0ff4b7e6db6db3341a99a3f0afb5eb8927feb8ab Merge: 8206ceb b209a36 Author: Doug Ledford Date: Fri Sep 29 11:13:50 2017 -0400 Merge branch 'vnic' into k.o/for-next Signed-off-by: Doug Ledford commit 8206ceb0961ec1e13a2903bc6b0268ea44ac39c0 Merge: 1848757 ecf7998 Author: Doug Ledford Date: Fri Sep 29 11:12:54 2017 -0400 Merge branch 'hfi1' into k.o/for-next Signed-off-by: Doug Ledford commit ecf799852bde85ae9c1713b2a68dce4a03054f1b Author: Michael J. Ruhl Date: Tue Sep 26 07:04:42 2017 -0700 IB/hfi1: Refactor reset_ctxt() IOCTL The IOCTL is a bit unwieldy. Refactor reset_ctxt() to be a bit more manageable. Reviewed-by: Ira Weiny Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 122 ++++++++++++++++++---------------- 1 file changed, 66 insertions(+), 56 deletions(-) commit 88a69b65f36fd5d8bcba712dd2bd8c689463ccbd Author: Michael J. Ruhl Date: Tue Sep 26 07:04:35 2017 -0700 IB/hfi1: Refactor get_user() IOCTLs The IOCTL is a bit unwieldy. Refactor to a common pattern. Refactor _RECV_CTRL, _POLL_TYPE, _ACK_EVENT and _SET_PKEY IOCTLs to a common pattern. Reviewed-by: Ira Weiny Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 74 ++++++++++++++++------------------- 1 file changed, 34 insertions(+), 40 deletions(-) commit 8a41da09e6189598fea2750e64c620cf83f22aba Author: Michael J. Ruhl Date: Tue Sep 26 07:04:29 2017 -0700 IB/hfi1: Refactor hfi_user_exp_rcv_invalid() IOCTLs The IOCTL is a bit unwieldy. Refactor to a common pattern. Refactor _TID_INVAL_READ IOCTLs. Reviewed-by: Ira Weiny Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 54 +++++++++++++++++++++++-------- drivers/infiniband/hw/hfi1/user_exp_rcv.c | 3 -- 2 files changed, 40 insertions(+), 17 deletions(-) commit 3920eef7a7e0cd90364944e6b3b9be3f9e73e4cc Author: Michael J. Ruhl Date: Tue Sep 26 07:04:22 2017 -0700 IB/hfi1: Refactor hfi_user_exp_rcv_clear() IOCTLs The IOCTL is a bit unwieldy. Refactor to a common pattern. Refactor the _TID_FREE IOCTL. Reviewed-by: Ira Weiny Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 49 ++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 12 deletions(-) commit f404ca4c7ea8e650ba09ba87c71c7a89c865d5be Author: Michael J. Ruhl Date: Tue Sep 26 07:04:16 2017 -0700 IB/hfi1: Refactor hfi_user_exp_rcv_setup() IOCTL The IOCTL is a bit unwieldy. Refactor to a common pattern. Refactor the _TID_UPDATE IOCTL. Reviewed-by: Ira Weiny Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 66 ++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 21 deletions(-) commit 45afb32453692704de6c32acdd3c2a9a7ec22139 Author: Michael J. Ruhl Date: Tue Sep 26 07:04:10 2017 -0700 IB/hfi1: Refactor get_base_info The IOCTL is a bit unwieldy. Refactor to a common pattern. Reviewed-by: Ira Weiny Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 033c16d71fdcd99a04eb670713124f88aa2a6922 Author: Michael J. Ruhl Date: Tue Sep 26 07:04:03 2017 -0700 IB/hfi1: Fix parenthesis alignment issues In preparation to refactoring get_base_info(), cleanup some checkpatch issues. Reviewed-by: Ira Weiny Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit ff1a5582c9516b324394fbaaf24772d1b6bd9c15 Author: Michael J. Ruhl Date: Tue Sep 26 07:03:57 2017 -0700 IB/hfi1: Refactor get_ctxt_info The IOCTL is a bit unwieldy. Refactor to a common pattern. Reviewed-by: Ira Weiny Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit ddebe9810cb0d5f28e101125bfa249a826bc0536 Author: Michael J. Ruhl Date: Tue Sep 26 07:03:50 2017 -0700 IB/hfi1: Refactor assign_ctxt() IOCTL The IOCTL is a bit unwieldy. Refactor to a common pattern. Refactor the assign_ctxt() IOCTL. Reviewed-by: Ira Weiny Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 36 ++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit e0d281d067f6514f8afdae919e5990958136f197 Author: Heiko Carstens Date: Wed Sep 27 09:45:00 2017 +0200 s390/disassembler: add new z14 instructions Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/dis.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) commit ea7c360b10081a3d0d42a8eab5249f7c2a258b4e Author: Heiko Carstens Date: Tue Sep 26 16:15:06 2017 +0200 s390/disassembler: add missing z13 instructions Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/dis.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit 630f789e80fc299a38f44d6b2e65c02ed219b47a Author: Heiko Carstens Date: Tue Sep 26 17:06:32 2017 +0200 s390/disassembler: add sthyi instruction This instruction came with a z/VM extension and not with a specific machine generation. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/dis.c | 1 + 1 file changed, 1 insertion(+) commit 7e1263b72024e585466c40adf6ac6e870deb91fe Author: Heiko Carstens Date: Tue Sep 26 09:16:53 2017 +0200 s390/disassembler: remove double instructions Remove a couple of instructions that are listed twice. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/dis.c | 6 ------ 1 file changed, 6 deletions(-) commit caefea1d3aa14589fd56c3fbc42876056d653440 Author: Heiko Carstens Date: Tue Sep 26 13:36:01 2017 +0200 s390/disassembler: fix LRDFU format Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/dis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c50538752af7968f53924b22dede8ed4ce4cb3b Author: Heiko Carstens Date: Tue Sep 26 09:16:48 2017 +0200 s390/disassembler: add missing end marker for e7 table The e7 opcode table does not have an end marker. Hence when trying to find an unknown e7 instruction the code will access memory behind the table until it finds something that matches the opcode, or the kernel crashes, whatever comes first. This affects not only the in-kernel disassembler but also uprobes and kprobes which refuse to set a probe on unknown instructions, and therefore search the opcode tables to figure out if instructions are known or not. Cc: # v3.18+ Fixes: 3585cb0280654 ("s390/disassembler: add vector instructions") Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/dis.c | 1 + 1 file changed, 1 insertion(+) commit d67ce18eb6894dff1f3dfa60cd8f1c75088b878e Author: Heiko Carstens Date: Thu Sep 28 08:05:13 2017 +0200 s390/virtio: simplify Makefile Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/virtio/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7fb2b2d512448cf0e914c4647a1cf02b52263702 Author: Thomas Huth Date: Wed Sep 27 13:42:01 2017 +0200 s390/virtio: remove the old KVM virtio transport There is no recent user space application available anymore which still supports this old virtio transport. Additionally, commit 3b2fbb3f06ef ("virtio/s390: deprecate old transport") introduced a deprecation message in the driver, and apparently nobody complained so far that it is still required. So let's simply remove it. Signed-off-by: Thomas Huth Reviewed-by: Cornelia Huck Acked-by: Halil Pasic Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 13 - drivers/s390/virtio/Makefile | 3 - drivers/s390/virtio/kvm_virtio.c | 515 --------------------------------------- 3 files changed, 531 deletions(-) commit f9a5d70cfaf3e32308de0abfcc95dafe4e36ea51 Author: Julian Wiedmann Date: Thu Sep 14 09:52:32 2017 +0200 s390/ccwgroup: tie a ccwgroup driver to its ccw driver When grouping devices, the ccwgroup core only checks whether all of the devices are bound to the same ccw_driver. It has no means of checking if the requesting ccwgroup driver actually supports this device type. qeth implements its own device matching in qeth_core_probe_device(), while ctcm and lcs currently have no sanity-checking at all. Enable ccwgroup drivers to optionally defer the device type checking to the ccwgroup core, by specifying their supported ccw_driver. This allows us drop the device type matching from qeth, and improves the robustness of ctcm and lcs. Signed-off-by: Julian Wiedmann Acked-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky arch/s390/include/asm/ccwgroup.h | 2 ++ drivers/s390/cio/ccwgroup.c | 6 ++++++ drivers/s390/net/ctcm_main.c | 1 + drivers/s390/net/lcs.c | 1 + drivers/s390/net/qeth_core_main.c | 1 + 5 files changed, 11 insertions(+) commit bf7fa038707c4c7a51a8f3fc1872a7c0d2adf1d3 Author: Harald Freudenberger Date: Mon Sep 18 12:48:09 2017 +0200 s390/crypto: add s390 platform specific aes gcm support. This patch introduces gcm(aes) support into the aes_s390 kernel module. Signed-off-by: Patrick Steuer Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky arch/s390/crypto/aes_s390.c | 296 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 293 insertions(+), 3 deletions(-) commit eecd49c4624a2c35e74f6f4e6352edf7eba545ca Author: Patrick Steuer Date: Mon Sep 18 12:48:08 2017 +0200 s390/crypto: add inline assembly for KMA instruction to cpacf.h Signed-off-by: Patrick Steuer Signed-off-by: Martin Schwidefsky arch/s390/include/asm/cpacf.h | 52 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) commit 1cd5929ab675b285e2179ec33cb0fef185aaabd1 Author: Arvind Yadav Date: Sat Sep 23 13:39:15 2017 +0530 staging: greybus: light: remove unnecessary error check It is not necessary to check return value of gb_lights_channel_flash_config. gb_lights_channel_config returns both successful and error value. Signed-off-by: Arvind Yadav Reviewed-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 04820da21050b35eed68aa046115d810163ead0c Author: Arvind Yadav Date: Sat Sep 23 13:25:30 2017 +0530 staging: greybus: light: Release memory obtained by kasprintf Free memory region, if gb_lights_channel_config is not successful. Signed-off-by: Arvind Yadav Reviewed-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman drivers/staging/greybus/light.c | 2 ++ 1 file changed, 2 insertions(+) commit 63342e75e661c1b71a0f33a4329726bcf383b342 Author: Georgiana Chelu Date: Tue Sep 26 09:01:29 2017 -0700 Staging: media: atomisp: Use kmalloc_array instead of kmalloc Prefer kmalloc_array over kmalloc with multiply because kmalloc_array performs additional checks before memory allocation. Fix the following issue reported by checkpatch.pl: * WARNING: Prefer kmalloc_array over kmalloc with multiply Signed-off-by: Georgiana Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4d962df5a7771c90da738de0d24c3828fe23e060 Author: Aishwarya Pant Date: Fri Sep 22 11:43:13 2017 +0530 atomisp2: remove cast from memory allocation Patch removes the following warning issued was coccicheck: WARNING: casting value returned by memory allocation function to (char *) is useless. Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 80fe133a9a8dfa95111f1d30ca60ee05a9f00cc6 Author: Georgiana Chelu Date: Wed Sep 20 05:28:49 2017 -0700 Staging: media: atomisp: pci: Place constant on the right side in comparissons Fix issue found by checkpatch.pl script. WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Georgiana Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7dfff5dadcbbc13ba4dc68d1b50f6bdab122df1a Author: Georgiana Chelu Date: Wed Sep 20 05:28:48 2017 -0700 Staging: media: atomisp: pci: Move open brace '{' on the next line Fix the following issue found by checkpatch.pl: ERROR: open brace '{' following function definitions go on the next line Signed-off-by: Georgiana Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6b78cffc99fc1b9bb1a039e95978dba69c1f994a Author: Georgiana Chelu Date: Wed Sep 20 05:28:47 2017 -0700 Staging: media: atomisp: Add blank line after declarations This patch adds a blank line after declarations to improve code readability. Issue find by checkpatch.pl script. WARNING: Missing a blank line after declarations Signed-off-by: Georgiana Chelu Signed-off-by: Greg Kroah-Hartman .../staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1fb38e4ef65f95c5c633a260595029d5fcc6d912 Author: Georgiana Chelu Date: Wed Sep 20 05:28:46 2017 -0700 Staging: media: atomisp: Use unsigned int instead of unsigned Fix the checkpatch.pl issue: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Georgiana Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e8d93aca1b23151c02de4f7f05f0d5fd6e6ce384 Author: Georgiana Chelu Date: Mon Sep 25 05:34:07 2017 -0700 Staging: rtl8188eu: core: Fix line over 80 characters Fix warning reported by checkpatch.pl script: WARNING: line over 80 characters Signed-off-by: Georgiana Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_recv.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 154acdb804f57929f5788011264940692aa9f89e Author: Georgiana Chelu Date: Mon Sep 25 05:34:06 2017 -0700 Staging: rtl8188eu: core: Add spaces around '+' Improve the coding style by adding spaces around arithmetic operation. Issue reported by checkpatch.pl script. Signed-off-by: Georgiana Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2742a7dddae45563deadbb712a19b0caba5fb296 Author: Georgiana Chelu Date: Mon Sep 25 05:34:05 2017 -0700 Staging: rtl8188eu: core: Use __func__ instead of function name Replace the function name from format string with the constant __func__ to avoid multiple changes in case the name of the function will be modified. Issue reported by checkpatch.pl script. Signed-off-by: Georgiana Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_recv.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 2b8581077caa03f5686cec7e136ad6519baa5147 Author: Aishwarya Pant Date: Fri Sep 22 16:44:36 2017 +0530 staging: rtl8188eu: wrap lines in 80 characters Perform cleanup for all function declarations in core/rtw_mlme_ext wherever checkpatch complains about lines being over 80 characters long. Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 51 ++++++++++++++++++--------- 1 file changed, 34 insertions(+), 17 deletions(-) commit da9551c28c6f82795a3805f75a69d048936496df Author: Aishwarya Pant Date: Fri Sep 22 16:44:03 2017 +0530 staging: rtl8188eu: remove implicit bool->int conversions Implicit type conversions are bad; they hinder readability of code and have potential to cause bugs. Here the variable wait_ack is always supplied a bool value while in function declarations it is defined as an int type. Fix it by defining wait_ack a bool type in all usages. Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2169ea9b391a1200ff615c1eeeda83bb7290b5dd Author: Aishwarya Pant Date: Fri Sep 22 16:43:39 2017 +0530 staging: rtl8188eu: remove unneeded conversions to bool Patch suppresses the following warning issued by coccicheck: WARNING: conversion to bool not needed here Signed-off-by: Aishwarya Pant Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5f5d08438c199c0c56c218d30ae11b1baf327c06 Author: Mihaela Muraru Date: Thu Sep 28 21:48:19 2017 +0300 staging: vc04_services: Remove typedef struct vchiq_2835_state_struct This patch removes typedef from struct and renames it from "typedef struct vchiq_2835_state_struct" to "struct vchiq_2835_state" as per kernel coding standards. Signed-off-by: Mihaela Muraru Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 4ad13b5d4c473b87a17286806a809cc31284dbee Author: Mihaela Muraru Date: Thu Sep 28 19:17:56 2017 +0300 staging: vc04_services: Remove extern variable This patch removes extern variable vchiq_arm_log_level, because it is already declared in vchiq_arm.h Issue found by checkpatch.pl Signed-off-by: Mihaela Muraru Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 -- 1 file changed, 2 deletions(-) commit e5c9d1107a07c871c3ce0f55b7c175e043581900 Author: Keerthi Reddy Date: Thu Sep 28 20:28:40 2017 +0530 Staging: vc04_services: remove unused variables the volatile fields of bcm2835_alsa_stream - control and status are not used. $ grep bcm2835_alsa_stream >From the above command all instances we see that all variables of 'bcm2835_alsa_stream' are declared as 'alsa_stream' So search for 'control' wherever we have 'alsa_stream' $ grep -l 'alsa_stream' | xargs grep "control" The above command returns where we don't any usage of 'control' field. which means that there is no usage of these fields. similarly for 'status' we see no usages. Signed-off-by: Keerthi Reddy Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835.h | 2 -- 1 file changed, 2 deletions(-) commit d3c2d5289b45df05ba55a4a1faf2ecca7ba7facb Author: Keerthi Reddy Date: Thu Sep 28 00:28:15 2017 +0530 Staging: vc04_services: bcm2835-camera: use BIT macro Use BIT macro instead of left shift Signed-off-by: Keerthi Reddy Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman .../vc04_services/bcm2835-camera/mmal-msg.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit b1551cab48e0d7f5d52a6acc757bf069a0471d52 Author: Keerthi Reddy Date: Wed Sep 27 23:20:13 2017 +0530 staging: vc04_services: fix typos Some words are misspelled. Fix typos. Signed-off-by: Keerthi Reddy Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h | 2 +- drivers/staging/vc04_services/interface/vchi/vchi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7ab1197df940e79801b220b98c0959ed31a5b203 Author: Keerthi Reddy Date: Wed Sep 27 23:19:46 2017 +0530 staging: vc04_services: please do not use multiple blank lines Blank lines use up extra space in file and makes the file larger. So do not use multiple blanklines Signed-off-by: Keerthi Reddy Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 11 ----------- drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 11 ----------- .../vc04_services/interface/vchi/connections/connection.h | 3 --- .../vc04_services/interface/vchi/message_drivers/message.h | 5 ----- drivers/staging/vc04_services/interface/vchi/vchi.h | 10 ---------- drivers/staging/vc04_services/interface/vchi/vchi_common.h | 6 ------ drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 9 --------- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h | 5 ----- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 10 ---------- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 1 - .../staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c | 3 --- .../staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 3 --- 12 files changed, 77 deletions(-) commit 37c64b748978dd6055ffecc7201ad8f56bf12d5a Author: Keerthi Reddy Date: Thu Sep 28 14:23:21 2017 +0530 Staging: fsl-mc: remove unnecessary parenthesis Remove unnecessary parenthesis Signed-off-by: Keerthi Reddy Signed-off-by: Greg Kroah-Hartman drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a62330176fd2a81ac6b07ed246e40419108422a7 Author: Keerthi Reddy Date: Thu Sep 28 00:19:22 2017 +0530 Staging: pi433: fix grammar issues - This commit fixes spelling issues in documentation files. Signed-off-by: Keerthi Reddy Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/Documentation/pi433.txt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 12918201e16af5db4af3599fd2265ee966f3cf5d Author: Georgiana Chelu Date: Sun Sep 24 01:13:44 2017 +0300 Staging: irda: drivers: Replace seq_printf with seq_puts or seq_putc Replace seq_printf with seq_puts or seq_putc when there is no argument list. Fix the checkpatch warning: WARNING: Prefer seq_puts to seq_printf Signed-off-by: Georgiana Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/irda/drivers/vlsi_ir.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 8e55b6fd06605823564dee522b32a356b861fd9e Author: Haneen Mohammed Date: Fri Sep 22 20:22:39 2017 -0600 staging: lustre: lnet: replace list_for_each with list_for_each_entry Replace use of the combination of list_for_each() and list_entry() with list_for_each_entry() to simplify the code and remove variables that are used only in list_for_each(). Issue found and corrected using Coccinelle script: @r@ expression head, member, e; type T1, T2, T3; iterator name list_for_each, list_for_each_entry; identifier pos, var; @@ -T1 *pos; ...when!=pos -list_for_each(pos, head) +list_for_each_entry(var, head, member) { ...when!=pos when!=T3 *var; -var = list_entry(pos, T2, member); ...when!=pos } ...when!=pos Signed-off-by: Haneen Mohammed Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 7c35d3809b134200bc603f8e17c319560e18c00d Author: Keerthi Reddy Date: Sun Sep 24 00:28:12 2017 +0530 staging: wilc1000: Blank lines aren't necessary before a close brace '}' Before closing the brace, the blank line is not needed. That blank line has not meaning here. so remove it. Signed-off-by: Keerthi Reddy Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 1 - 1 file changed, 1 deletion(-) commit e4c3f3ab8e59478b3015bd9b92d4bd2f58d09f58 Author: Keerthi Reddy Date: Sun Sep 24 00:27:48 2017 +0530 staging: wilc1000: No space is necessary after a cast A space after type casting is not needed. All the other typecasts in this file don't put space after typecast. so remove space after typecast at this line. checked with checkpatch.pl script Signed-off-by: Keerthi Reddy Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99cf8f903148347e3d2ac86ffe98bb04bebc6983 Author: Russell King Date: Thu Sep 21 12:06:20 2017 +0100 ARM: better diagnostics with missing/corrupt dtb With a kernel containing both DT and atag support, the diagnostics output when the dtb is missing or corrupt assume that we're trying to boot using atags and the machine ID, and only print the machine ID. This is not useful for diagnosing a missing or corrupt dtb. Move the message into arch/arm/kernel/setup.c, and print the address of the dtb/atag list, and the first 16 bytes of memory of the dtb or atag list. This allows us to see whether the dtb was corrupted in some way, causing the fallback to the machine ID / atag list. Tested-by: Keerthy Signed-off-by: Russell King arch/arm/kernel/atags_parse.c | 7 ++----- arch/arm/kernel/setup.c | 10 ++++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) commit 097a94815fb61ba4f184b3efd8f4e158116956d0 Author: Michał Winiarski Date: Thu Sep 28 20:39:01 2017 +0100 drm/i915/execlists: Cache the last priolist lookup Avoid the repeated rbtree lookup for each request as we unwind them by tracking the last priolist. v2: Fix up my unhelpful suggestion of using default_priolist. Signed-off-by: Michał Winiarski Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170928193910.17988-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 7d1ea609f67a7d17c287ffdc008c79e0e91bc581 Author: Chris Wilson Date: Thu Sep 28 20:39:00 2017 +0100 drm/i915: Give the invalid priority a magic name We use INT_MIN to denote the priority of a request that has not been submitted to the scheduler; we treat INT_MIN as an invalid priority and initialise the request to it. Give the value a name so it stands out. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170928193910.17988-3-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala Reviewed-by: Joonas Lahtinen Date: Thu Sep 28 20:38:59 2017 +0100 drm/i915/execlists: Move request unwinding to a separate function In the future, we will want to unwind requests following a preemption point. This requires the same steps as for unwinding upon a reset, so extract the existing code to a separate function for later use. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170928193910.17988-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 54 +++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 20 deletions(-) commit 269e6ea95311130f75c4eb21bf1797a4cadfb82d Author: Sagar Arun Kamble Date: Fri Sep 29 10:28:36 2017 +0530 drm/i915: Move i915_gem_restore_fences to i915_gem_resume i915_gem_restore_fences is GEM resumption task hence it is moved to i915_gem_resume from i915_restore_state. Signed-off-by: Sagar Arun Kamble Cc: Michal Wajdeczko Cc: Michał Winiarski Cc: Chris Wilson Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/1506661116-12106-1-git-send-email-sagar.a.kamble@intel.com Reviewed-by: Michal Wajdeczko Reviewed-by: Joonas Lahtinen Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem.c | 1 + drivers/gpu/drm/i915/i915_suspend.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) commit 60456d5c2d25cbe91cd0747d12ec9d909bf8d5b9 Author: Chris Wilson Date: Tue Sep 26 16:34:09 2017 +0100 drm/i915/selftests: Replace wmb() with i915_gem_chipset_flush() Currently, we are being fairly lazy and only using a wmb() following an update to an active batch. Previously, we have found that to be insufficient to ensure that a write from the CPU reaches memory in a timely fashion, and in some caches we may need to flush a chipset cache. To that end, we have i915_gem_chipset_flush() so use it. Suggested-by: Mika Kuoppala Signed-off-by: Chris Wilson Cc: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20170926153409.7928-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/selftests/i915_gem_request.c | 10 +++++++--- drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 7 +++++-- 2 files changed, 12 insertions(+), 5 deletions(-) commit a47ba4d77e1236d214e5116b5631bc4c2d6e6369 Author: Andi Kleen Date: Thu Aug 31 14:46:30 2017 -0700 perf/x86: Enable free running PEBS for REGS_USER/INTR Currently free running PEBS is disabled when user or interrupt registers are requested. Most of the registers are actually available in the PEBS record and can be supported. So we just need to check for the supported registers and then allow it: it is all except for the segment register. For user registers this only works when the counter is limited to ring 3 only, so this also needs to be checked. Signed-off-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170831214630.21892-1-andi@firstfloor.org Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 4 ++++ arch/x86/events/perf_event.h | 24 +++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) commit 5bce9db1894c998c5b85a34036d679ea6517668f Author: Alexander Shishkin Date: Tue Aug 29 17:01:03 2017 +0300 perf/core: Explain perf_sched_mutex To clarify why atomic_inc_return(&perf_sched_events) is not sufficient and a mutex is needed to order static branch enabling vs the atomic counter increment, this adds a comment with a short explanation. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170829140103.6563-1-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar kernel/events/core.c | 5 +++++ 1 file changed, 5 insertions(+) commit 4c4de7d3c8383e3bf122cd84c61e7523df02b1ae Merge: a19b2e3 441430e Author: Ingo Molnar Date: Fri Sep 29 13:27:29 2017 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit e18063e88bd579c479a2b45820be6c4625f841c3 Author: Jani Nikula Date: Fri Sep 29 13:50:38 2017 +0300 drm/i915: Update DRIVER_DATE to 20170929 Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cf09e3c904bf424f8b6a8203958e09bf7d9bcbc0 Merge: d5426f4 e19b205 Author: Mauro Carvalho Chehab Date: Fri Sep 29 05:24:10 2017 -0400 Merge tag 'v4.14-rc2' into patchwork Linux 4.14-rc2 * tag 'v4.14-rc2': (12066 commits) Linux 4.14-rc2 tpm: ibmvtpm: simplify crq initialization and document crq format tpm: replace msleep() with usleep_range() in TPM 1.2/2.0 generic drivers Documentation: tpm: add powered-while-suspended binding documentation tpm: tpm_crb: constify acpi_device_id. tpm: vtpm: constify vio_device_id security: fix description of values returned by cap_inode_need_killpriv x86/asm: Fix inline asm call constraints for Clang objtool: Handle another GCC stack pointer adjustment bug inet: fix improper empty comparison net: use inet6_rcv_saddr to compare sockets net: set tb->fast_sk_family net: orphan frags on stand-alone ptype in dev_queue_xmit_nit MAINTAINERS: update git tree locations for ieee802154 subsystem SMB3: Don't ignore O_SYNC/O_DSYNC and O_DIRECT flags SMB3: handle new statx fields arch: remove unused *_segments() macros/functions parisc: Unbreak bootloader due to gcc-7 optimizations parisc: Reintroduce option to gzip-compress the kernel apparmor: fix apparmorfs DAC access permissions ... commit 7f3ed79188f2f094d0ee366fa858857fb7f511ba Author: Chen-Yu Tsai Date: Fri Sep 29 16:22:54 2017 +0800 clk: sunxi-ng: sun6i: Rename HDMI DDC clock to avoid name collision The HDMI DDC clock found in the CCU is the parent of the actual DDC clock within the HDMI controller. That clock is also named "hdmi-ddc". Rename the one in the CCU to "ddc". This makes more sense than renaming the one in the HDMI controller to something else. Fixes: c6e6c96d8fa6 ("clk: sunxi-ng: Add A31/A31s clocks") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80815004a45fc68b6e34653af4fca47be7fb96ed Author: Chen-Yu Tsai Date: Fri Sep 29 16:22:53 2017 +0800 clk: sunxi-ng: sun6i: Export video PLLs The 2x outputs of the 2 video PLL clocks are directly used by the HDMI controller block. Export them so they can be referenced in the device tree. Fixes: c6e6c96d8fa6 ("clk: sunxi-ng: Add A31/A31s clocks") Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun6i-a31.h | 8 ++++++-- include/dt-bindings/clock/sun6i-a31-ccu.h | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) commit c07c1a0f68d0f2f7ca9aff924e2772526027b019 Author: Andrzej Pietrasiewicz Date: Fri Sep 29 09:32:53 2017 +0200 clk: samsung: Fix m2m scaler clock on Exynos542x The TOP "aclk400_mscl" clock should be kept enabled all the time to allow proper access to power management control for MSC power domain and devices that are a part of it. This change is required for the scaler to work properly after domain power on/off sequence. Fixes: 318fa46cc60d ("clk/samsung: exynos542x: mark some clocks as critical") Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-exynos5420.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a33d7f8c06b32ae0396dce42eeb2775644bf23b9 Author: Haneen Mohammed Date: Wed Sep 27 01:38:46 2017 -0600 drm/armada: Remove unused #include Remove drmP.h as it is not needed anymore since nothing it defines is used in these files. Signed-off-by: Haneen Mohammed Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170927073846.GA14352@Haneen drivers/gpu/drm/armada/armada_510.c | 1 - drivers/gpu/drm/armada/armada_drv.c | 1 - drivers/gpu/drm/armada/armada_fb.c | 1 - drivers/gpu/drm/armada/armada_fbdev.c | 1 - drivers/gpu/drm/armada/armada_gem.c | 1 - 5 files changed, 5 deletions(-) commit fa8fefaa678ea390b873195d19c09930da84a4bb Author: David Ahern Date: Wed Sep 27 20:41:59 2017 -0700 net: ipv4: remove fib_info arg to fib_check_nh fib_check_nh does not use the fib_info arg; remove t. Signed-off-by: David Ahern Signed-off-by: David S. Miller net/ipv4/fib_semantics.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c7c3e5913bf18eda3cf38932bebdce48351baac9 Author: David Ahern Date: Wed Sep 27 19:08:00 2017 -0700 net: ipv4: remove fib_weight fib_weight in fib_info is set but not used. Remove it and the helpers for setting it. Signed-off-by: David Ahern Signed-off-by: David S. Miller include/net/ip_fib.h | 3 --- net/ipv4/fib_semantics.c | 9 --------- 2 files changed, 12 deletions(-) commit fadad670a8abe89d08b875736557bd84063b07ec Merge: cf5d74b 3a8ad56 Author: David S. Miller Date: Fri Sep 29 06:17:06 2017 +0100 Merge branch 'bpf-extend-info' Martin KaFai Lau says: ==================== bpf: Extend bpf_{prog,map}_info This patch series adds more fields to bpf_prog_info and bpf_map_info. Please see individual patch for details. ==================== Signed-off-by: David S. Miller commit 3a8ad560a9674235d1dd2e174434f540924e249f Author: Martin KaFai Lau Date: Wed Sep 27 14:37:56 2017 -0700 bpf: Test new fields in bpf_attr and bpf_{prog, map}_info This patch tests newly added fields of the bpf_attr, bpf_prog_info and bpf_map_info. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_progs.c | 143 ++++++++++++++++++++++++++++--- 1 file changed, 132 insertions(+), 11 deletions(-) commit 6e525d06674a21468b4e728ef880770a0ca5c60d Author: Martin KaFai Lau Date: Wed Sep 27 14:37:55 2017 -0700 bpf: Swap the order of checking prog_info and map_info This patch swaps the checking order. It now checks the map_info first and then prog_info. It is a prep work for adding test to the newly added fields (the map_ids of prog_info field in particular). Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_progs.c | 58 +++++++++++++++++--------------- 1 file changed, 30 insertions(+), 28 deletions(-) commit 88cda1c9da02c8aa31e1d5dcf22e8a35cc8c19f2 Author: Martin KaFai Lau Date: Wed Sep 27 14:37:54 2017 -0700 bpf: libbpf: Provide basic API support to specify BPF obj name This patch extends the libbpf to provide API support to allow specifying BPF object name. In tools/lib/bpf/libbpf, the C symbol of the function and the map is used. Regarding section name, all maps are under the same section named "maps". Hence, section name is not a good choice for map's name. To be consistent with map, bpf_prog also follows and uses its function symbol as the prog's name. This patch adds logic to collect function's symbols in libbpf. There is existing codes to collect the map's symbols and no change is needed. The bpf_load_program_name() and bpf_map_create_name() are added to take the name argument. For the other bpf_map_create_xxx() variants, a name argument is directly added to them. In samples/bpf, bpf_load.c in particular, the symbol is also used as the map's name and the map symbols has already been collected in the existing code. For bpf_prog, bpf_load.c does not collect the function symbol name. We can consider to collect them later if there is a need to continue supporting the bpf_load.c. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/bpf_load.c | 2 + samples/bpf/map_perf_test_user.c | 1 + tools/include/uapi/linux/bpf.h | 10 +++ tools/lib/bpf/bpf.c | 57 +++++++++++---- tools/lib/bpf/bpf.h | 23 ++++-- tools/lib/bpf/libbpf.c | 109 +++++++++++++++++++++------- tools/testing/selftests/bpf/test_verifier.c | 2 +- 7 files changed, 157 insertions(+), 47 deletions(-) commit ad5b177bd73f5107d97c36f56395c4281fb6f089 Author: Martin KaFai Lau Date: Wed Sep 27 14:37:53 2017 -0700 bpf: Add map_name to bpf_map_info This patch allows userspace to specify a name for a map during BPF_MAP_CREATE. The map's name can later be exported to user space via BPF_OBJ_GET_INFO_BY_FD. 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 + include/uapi/linux/bpf.h | 2 ++ kernel/bpf/syscall.c | 7 ++++++- 3 files changed, 9 insertions(+), 1 deletion(-) commit cb4d2b3f03d8eed90be3a194e5b54b734ec4bbe9 Author: Martin KaFai Lau Date: Wed Sep 27 14:37:52 2017 -0700 bpf: Add name, load_time, uid and map_ids to bpf_prog_info The patch adds name and load_time to struct bpf_prog_aux. They are also exported to bpf_prog_info. The bpf_prog's name is passed by userspace during BPF_PROG_LOAD. The kernel only stores the first (BPF_PROG_NAME_LEN - 1) bytes and the name stored in the kernel is always \0 terminated. The kernel will reject name that contains characters other than isalnum() and '_'. It will also reject name that is not null terminated. The existing 'user->uid' of the bpf_prog_aux is also exported to the bpf_prog_info as created_by_uid. The existing 'used_maps' of the bpf_prog_aux is exported to the newly added members 'nr_map_ids' and 'map_ids' of the bpf_prog_info. On the input, nr_map_ids tells how big the userspace's map_ids buffer is. On the output, nr_map_ids tells the exact user_map_cnt and it will only copy up to the userspace's map_ids buffer is allowed. Signed-off-by: Martin KaFai Lau Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf.h | 2 ++ include/uapi/linux/bpf.h | 8 ++++++++ kernel/bpf/syscall.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 60 insertions(+), 1 deletion(-) commit cf5d74b85ef40c202c76d90959db4d850f301b95 Author: Hoang Tran Date: Wed Sep 27 18:30:58 2017 +0200 tcp: fix under-evaluated ssthresh in TCP Vegas With the commit 76174004a0f19785 (tcp: do not slow start when cwnd equals ssthresh), the comparison to the reduced cwnd in tcp_vegas_ssthresh() would under-evaluate the ssthresh. Signed-off-by: Hoang Tran Signed-off-by: David S. Miller net/ipv4/tcp_vegas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5af48b59f35cf712793badabe1a574a0d0ce3bd3 Author: Nikolay Aleksandrov Date: Wed Sep 27 16:12:44 2017 +0300 net: bridge: add per-port group_fwd_mask with less restrictions We need to be able to transparently forward most link-local frames via tunnels (e.g. vxlan, qinq). Currently the bridge's group_fwd_mask has a mask which restricts the forwarding of STP and LACP, but we need to be able to forward these over tunnels and control that forwarding on a per-port basis thus add a new per-port group_fwd_mask option which only disallows mac pause frames to be forwarded (they're always dropped anyway). The patch does not change the current default situation - all of the others are still restricted unless configured for forwarding. We have successfully tested this patch with LACP and STP forwarding over VxLAN and qinq tunnels. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/uapi/linux/if_link.h | 1 + net/bridge/br_input.c | 1 + net/bridge/br_netlink.c | 14 +++++++++++++- net/bridge/br_private.h | 10 +++++++++- net/bridge/br_sysfs_if.c | 18 ++++++++++++++++++ 5 files changed, 42 insertions(+), 2 deletions(-) commit a2e74cb626d2e1587a5ec35c3ccfc26104bdfa30 Author: Harry Wentland Date: Thu Sep 28 15:39:41 2017 -0400 drm/amd/display: Remove DWB It's not in a good shape and currently completely unused. Signed-off-by: Harry Wentland Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 9 - drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c | 365 --------------------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.h | 277 ---------------- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 57 ---- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 3 - drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h | 193 ----------- 7 files changed, 1 insertion(+), 905 deletions(-) commit 29656a363c1f3060e9a5b3bafa0bd4b589e20e3c Author: Dave Airlie Date: Thu Sep 28 13:29:32 2017 +1000 amdgpu/dc: remove wait_reg/wait_reg_func interfaces. These aren't used in the tree anywhere, and there is a TODO. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dm_services.h | 46 ---------------------------- 1 file changed, 46 deletions(-) commit e9d7dc62bc09bd95461d5444b54d59195b207fd6 Author: Dave Airlie Date: Thu Sep 28 12:42:01 2017 +1000 amdgpu/dc: don't check for 0 on register read/writes always. This adds ~50k to the driver text segment, and 10k to data segment. text data bss dec hex filename 2385556 39681 1045 2426282 2505aa drivers/gpu/drm/amd/amdgpu/amdgpu.o text data bss dec hex filename 2336593 28857 1045 2366495 241c1f drivers/gpu/drm/amd/amdgpu/amdgpu.o Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dm_services.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 5e0adbff084f33202db36be798c583a115990392 Author: Dave Airlie Date: Thu Sep 28 12:29:53 2017 +1000 amdgpu/dc: drop dml display_mode_support.c (v2) This code isn't used, and this function is huge, reimport later if going to be used. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/Makefile | 4 +- .../drm/amd/display/dc/dml/display_mode_support.c | 2327 -------------------- .../drm/amd/display/dc/dml/display_mode_support.h | 5 - 3 files changed, 1 insertion(+), 2335 deletions(-) commit e25cb588e6c8a948df147599de5469c3a95d3682 Author: Dave Airlie Date: Thu Sep 28 11:24:06 2017 +1000 amdgpu/dc: separate out some common code from bios parsers. This extracts the bios parser object id handling into a common file. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 274 +------------------- drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 284 +------------------- .../drm/amd/display/dc/bios/bios_parser_common.c | 288 +++++++++++++++++++++ .../drm/amd/display/dc/bios/bios_parser_common.h | 33 +++ 5 files changed, 324 insertions(+), 557 deletions(-) commit e5bcf3d83e40cc7acc9d111519b7bacaf4a01070 Author: Dave Airlie Date: Thu Sep 28 10:55:25 2017 +1000 amdgpu/dc: drop dml_util_is_420 This is unused code. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dml/dml_common_defs.c | 33 ---------------------- .../gpu/drm/amd/display/dc/dml/dml_common_defs.h | 1 - 2 files changed, 34 deletions(-) commit 3e8c3108dab197858e74dbb740c5312ae636ea9b Author: Dave Airlie Date: Thu Sep 28 10:45:26 2017 +1000 amdgpu/dc: inline a bunch of the dml wrappers. This reduces code size. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dml/display_mode_support.c | 1 + .../drm/amd/display/dc/dml/display_rq_dlg_calc.c | 2 + .../gpu/drm/amd/display/dc/dml/display_watermark.c | 1 + .../gpu/drm/amd/display/dc/dml/dml_common_defs.c | 56 +------------------- .../gpu/drm/amd/display/dc/dml/dml_common_defs.h | 11 ---- .../gpu/drm/amd/display/dc/dml/dml_inline_defs.h | 61 ++++++++++++++++++++++ .../gpu/drm/amd/display/dc/dml/soc_bounding_box.c | 1 + 7 files changed, 67 insertions(+), 66 deletions(-) commit d1209512e028a917e6e70b13297ff185234ba24d Author: Dave Airlie Date: Thu Sep 28 10:45:25 2017 +1000 amdgpu/dc: inline a bunch of float operations. This reduces code size for the bw calcs code. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/calcs/dcn_calc_math.c | 29 ----------------- .../gpu/drm/amd/display/dc/calcs/dcn_calc_math.h | 36 ++++++++++++++++++---- 2 files changed, 30 insertions(+), 35 deletions(-) commit b3fbdcec5e6c16c93867289ae0960a64c423eb34 Author: Dave Airlie Date: Thu Sep 28 10:10:22 2017 +1000 amdgpu/dc: drop display_pipe_clocks.c. This code isn't used at all in the kernel tree, perhaps it can wait to be imported when it is. It also does a lot of floating point calcs, so probably good to drop it until it's needed and we can ensure proper fpu accessors. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/Makefile | 2 +- .../gpu/drm/amd/display/dc/dml/display_mode_lib.h | 1 - .../drm/amd/display/dc/dml/display_pipe_clocks.c | 367 --------------------- .../drm/amd/display/dc/dml/display_pipe_clocks.h | 41 --- 4 files changed, 1 insertion(+), 410 deletions(-) commit 8c0dc2b9891155afc3b1fbf6b04839819ec9099b Author: Dave Airlie Date: Thu Sep 28 10:22:48 2017 +1000 amdgpu/dc: move filter taps to being static const data (v2) This just adds two accessor methods, and moves all the data to static const. v2: fix dcn build. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce/dce_scl_filters.c | 78 ++++++++++++---------- drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 2 +- .../drm/amd/display/dc/dce110/dce110_transform_v.c | 2 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 4 +- 5 files changed, 49 insertions(+), 39 deletions(-) commit 24a0d8538ed36ae08d8009bd4a46c6eb36d92bd1 Author: Dave Airlie Date: Thu Sep 28 09:21:33 2017 +1000 amdgpu/dc: add static to construct function There was a global construct symbol in the module symbols, kill it. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a26a45d1a2338326a369c9544dc5141a6e75106 Author: Harry Wentland Date: Thu Sep 28 11:53:19 2017 -0400 drm/doc: Reference AMD DC todos Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher Documentation/gpu/todo.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2e12d9b761212053d0260b6309155c5e8a65948c Author: Harry Wentland Date: Wed Sep 27 15:36:11 2017 -0400 drm/amd/display: DC I2C review While reviewing I2C in DC identified a few places. Added a couple to the TODO list. 1) Connector info read See get_ext_display_connection_info On some boards the connector information has to be read through a special I2C channel. This line is only used for this purpose and only on driver init. 2) SCDC stuff This should all be reworked to go through DRM's SCDC code. When this is done some unnecessary I2C code can be retired as well. 3) Max TMDS clock read See dal_ddc_service_i2c_query_dp_dual_mode_adaptor This should happen in DRM as well. I haven't checked if there's currently functionality in DRM. If not we can propose something. 4) HDMI retimer programming Some boards have an HDMI retimer that we need to program to pass PHY compliance. 1 & 3 might be a good exercise if someone is looking for things to do. v2: Merge dp_dual_mode_adaptor TODO Acked-by: Alex Deucher Signed-off-by: Harry Wentland Acked-by: Daniel Vetter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/TODO | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) commit 2004f45ef83f07f43f5da6ede780b08068c7583d Author: Harry Wentland Date: Wed Sep 27 10:53:50 2017 -0400 drm/amd/display: Use kernel alloc/free Abstractions are frowned upon. cocci script: virtual context virtual patch virtual org virtual report @@ expression ptr; @@ - dm_alloc(ptr) + kzalloc(ptr, GFP_KERNEL) @@ expression ptr, size; @@ - dm_realloc(ptr, size) + krealloc(ptr, size, GFP_KERNEL) @@ expression ptr; @@ - dm_free(ptr) + kfree(ptr) v2: use GFP_KERNEL, not GFP_ATOMIC. add cocci script Reviewed-by: Alex Deucher Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/dc/basics/logger.c | 18 ++++--- drivers/gpu/drm/amd/display/dc/basics/vector.c | 19 +++---- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 17 +++--- drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 14 ++--- drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 5 +- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 6 +-- drivers/gpu/drm/amd/display/dc/core/dc.c | 42 ++++++++------- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 +-- drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 18 +++---- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 11 ++-- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 6 +-- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 15 +++--- drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 4 +- drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 4 +- .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 12 +++-- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 10 ++-- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 6 +-- drivers/gpu/drm/amd/display/dc/dce/dce_ipp.c | 2 +- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 2 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 43 +++++++-------- .../drm/amd/display/dc/dce110/dce110_compressor.c | 6 +-- .../drm/amd/display/dc/dce110/dce110_resource.c | 61 ++++++++++++---------- .../drm/amd/display/dc/dce112/dce112_compressor.c | 6 +-- .../drm/amd/display/dc/dce112/dce112_resource.c | 43 +++++++-------- .../drm/amd/display/dc/dce120/dce120_resource.c | 43 +++++++-------- .../drm/amd/display/dc/dce80/dce80_compressor.c | 6 +-- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 47 +++++++++-------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 2 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 56 ++++++++++---------- drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c | 4 +- drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c | 21 ++++---- drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 6 +-- drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 2 +- drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c | 6 +-- .../amd/display/dc/i2caux/dce100/i2caux_dce100.c | 4 +- .../display/dc/i2caux/dce110/aux_engine_dce110.c | 6 +-- .../dc/i2caux/dce110/i2c_hw_engine_dce110.c | 7 +-- .../dc/i2caux/dce110/i2c_sw_engine_dce110.c | 7 +-- .../amd/display/dc/i2caux/dce110/i2caux_dce110.c | 6 +-- .../amd/display/dc/i2caux/dce112/i2caux_dce112.c | 4 +- .../amd/display/dc/i2caux/dce120/i2caux_dce120.c | 4 +- .../display/dc/i2caux/dce80/i2c_hw_engine_dce80.c | 6 +-- .../display/dc/i2caux/dce80/i2c_sw_engine_dce80.c | 6 +-- .../drm/amd/display/dc/i2caux/dce80/i2caux_dce80.c | 6 +-- .../drm/amd/display/dc/i2caux/dcn10/i2caux_dcn10.c | 4 +- .../display/dc/i2caux/diagnostics/i2caux_diag.c | 7 +-- .../gpu/drm/amd/display/dc/i2caux/i2c_sw_engine.c | 6 +-- .../amd/display/dc/irq/dce110/irq_service_dce110.c | 5 +- .../amd/display/dc/irq/dce120/irq_service_dce120.c | 5 +- .../amd/display/dc/irq/dce80/irq_service_dce80.c | 5 +- .../amd/display/dc/irq/dcn10/irq_service_dcn10.c | 5 +- drivers/gpu/drm/amd/display/dc/irq/irq_service.c | 2 +- .../amd/display/dc/virtual/virtual_link_encoder.c | 2 +- .../display/dc/virtual/virtual_stream_encoder.c | 4 +- .../drm/amd/display/modules/freesync/freesync.c | 14 ++--- 59 files changed, 362 insertions(+), 330 deletions(-) commit 82b400a62f2fd42b87f91a298c5641d0ead99251 Author: Daniel Vetter Date: Wed Sep 27 12:15:50 2017 +0200 drm/amd: DC pull request review Ok, here's one more attempt at scrolling through 130k diff. Overall verdict from me is that DC is big project, and like any big project it's never done. So at least for me the goal isn't to make things perfect, becaue if that's the hoop to jump through we wouldn't have any gpu drivers at all. More important is whether merging a new driver base will benefit the overall subsystem, and here this primarily means whether the DC team understands how upstream works and is designed, and whether the code is largely aligned with upstream (especially the atomic modeset) architecture. Looking back over the last two years I think that's the case now, so Acked-by: Daniel Vetter for merging this pull. While scrolling through the pull I spotted a bunch more things that should be refactored, but most of these will be a real pain with DC is out of tree, and much easier in tree since in many of these areas the in-tree helpers aren't up to snuff yet for what DC needs. That kind of work is best done when there's one tree with everything integrated. That's also why I think we should merge DC into drm-next directly, so we can get started on the integration polish right away. That has a bit higher risk of Linus having a spazz, so here's my recommendation for merging: - There's a few additions to drm_dp_helper.h sprinkled all over the pull. I think those should be put into a patch of it's own, and merged first. No need to rebase DC, git merge will dtrt and not end up with duplicates. - dm_alloc/realloc/free is something Dave Airlie noticed, and I agree it's an easy red flag that might upset Linus. cocci can fix this easy, so no real problem I think to patch up in one big patch (I thought we've had a "remove malloc wrappers" todo item in the very first review, apparently there was more than one such wrapper). - The history is huge, but AMD folks want to keep it if possible, and I see the value in that. Would be good to get an ack from Linus for that (but shouldn't be an issue, not the first time we've merged the full history of out-of-tree work). Short&longer term TODO items are still tracked, might be a good idea to integrate those the overall drm todo in our gpu documentation, for more visibility. So in a way this is kinda like staging, except not with the horribly broken process of having an entirely separate tree for staging drivers which just makes refactoring needlessly painful (which defeats the point of staging really). So staging-within-the-subsystem. We've had that before, with early nouveau. And yes some of the files are utterly horrible to read and not anything close to kernel coding style standards. But that's the point, they're essentially gospel from hw engineers that happens to be parseable by gcc. Signed-off-by: Daniel Vetter Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/TODO | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 20a3a71da542974a7ba30b121c5f81b83579c828 Author: Horace Chen Date: Wed Sep 27 16:13:17 2017 +0800 drm/amdgpu: Add a new flag for SR-IOV to share memory between PF & VF Add ATOM_VRAM_BLOCK_SRIOV_MSG_SHARE_RESERVATION to identify whether driver need to reserve VRAM for SR-IOV shared memory. Signed-off-by: Horace Chen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/atombios.h | 1 + 1 file changed, 1 insertion(+) commit c6c5b324383d00731abd438e7c378b351add569b Author: Rex Zhu Date: Fri Sep 22 14:38:45 2017 +0800 drm/amd/powerplay: export new interfaces in amd_pm_funcs Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/amd_shared.h | 37 +++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) commit c4f1b9fcfa1137440b4147e9f9e1dd6fec850887 Author: Rex Zhu Date: Fri Sep 22 14:33:24 2017 +0800 drm/amdgpu: add comments in struct amd_pm_funcs define Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/amd_shared.h | 51 ++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 22 deletions(-) commit ce440e3a0caa7580f74aa27e573e1a9777d91522 Author: Rex Zhu Date: Mon Sep 25 21:18:19 2017 +0800 drm/amd/powerplay: change dmesg log level in powerplay Use pr_debug to prevent spamming unimportant dmesg. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 139a285f8124577ed816f63d9e950b01dfaa5401 Author: Rex Zhu Date: Mon Sep 25 20:46:37 2017 +0800 drm/amdgpu: create powerplay by cgs interface Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 30 +------- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 84 +++++++++++++---------- drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 5 -- 3 files changed, 51 insertions(+), 68 deletions(-) commit ba89a3ec61bde7d37225edf01f9e3c0c81de7f0f Author: Rex Zhu Date: Mon Sep 25 20:45:52 2017 +0800 drm/amdgpu: add cgs interface to register pp handle Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/amd/include/cgs_common.h | 8 ++++++++ 2 files changed, 31 insertions(+) commit 6d07fe7bcae57ee73d87766b6cd1e026d3fee85d Author: Rex Zhu Date: Mon Sep 25 18:51:50 2017 +0800 drm/amdgpu: delete pp_enable in adev amdgpu not care powerplay or dpm is enabled. just check ip functions and pp functions Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 77 ++++++++++++--------------- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 7 +-- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 18 ++++++- 4 files changed, 53 insertions(+), 50 deletions(-) commit 790d84fdc9826500c88abfca0f3f86e96153bd4e Author: Rex Zhu Date: Mon Sep 25 17:50:13 2017 +0800 drm/amdgpu: delete dead code about fw load check Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 60 ++++++++-------------------------- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 20 +++--------- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 21 +++--------- 3 files changed, 23 insertions(+), 78 deletions(-) commit d04f257635a2f4fd74fcd7543a9337daeb40dea1 Author: Rex Zhu Date: Mon Sep 25 17:34:00 2017 +0800 drm/amd/powerplay: fix memory leak in powerplay cgs device not free. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 9 ++++++--- drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) commit 46967c221fa9d06f4ddf168fbcf16fd9216dd574 Author: Rex Zhu Date: Fri Sep 22 18:03:59 2017 +0800 drm/amdgpu: move amdgpu_ucode_init_bo to amdgpu_device.c Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 5 ----- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 --------- 3 files changed, 8 insertions(+), 14 deletions(-) commit d2f52ac800fec229f2931603e8b7fb9c5ade7aa7 Author: Rex Zhu Date: Fri Sep 22 17:47:27 2017 +0800 drm/amdgpu: move common pm sysfs code to amdgpu_device.c Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 7 +------ drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 1 - drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 7 ------- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 6 ------ 6 files changed, 13 insertions(+), 20 deletions(-) commit c98171ccf6580407d07a3b5dc8188ce9e1f4f7ca Author: Felix Kuehling Date: Thu Sep 21 16:26:41 2017 -0400 drm/amdgpu: Handle GPUVM fault storms When many wavefronts cause VM faults at the same time, it can overwhelm the interrupt handler and cause IH ring overflows before the driver can notify or kill the faulting application. As a workaround I'm introducing limited per-VM fault credit. After that number of VM faults have occurred, further VM faults are filtered out at the prescreen stage of processing. This depends on the PASID in the interrupt packet, so it currently only works for KFD contexts. Signed-off-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 31 +++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 7 ++++++- drivers/gpu/drm/amd/amdgpu/cik_ih.c | 19 +++++++++++++++++-- drivers/gpu/drm/amd/amdgpu/cz_ih.c | 19 +++++++++++++++++-- drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 19 +++++++++++++++++-- drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 19 +++++++++++++++++-- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 11 +++++++---- 7 files changed, 112 insertions(+), 13 deletions(-) commit 1bab0fc01b84c1aa8a65a1f1de885e1faab48264 Author: Felix Kuehling Date: Wed Sep 20 11:38:19 2017 -0400 drm/amd/chash: Fix typo Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/lib/chash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 45b19706a45f201ecbfc2d6fdc5ae4ec9d7ea2b9 Author: Colin Ian King Date: Thu Sep 28 11:35:52 2017 +0100 drm/amd/powerplay: fix spelling mistake: "dividable" -> "divisible" Trivial fix to spelling mistakes in pr_err error message and ASSERT messages. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 7a88ef02c76dff12b0a9ea0e9da346f650e6f168 Author: Dave Airlie Date: Thu Sep 28 16:34:44 2017 +1000 amdgpu/pp: reduce size of vega10_fuses_default I've no idea why this is like this, why store 64-bit fields as a string, and then parse the strings, this is just over engineered. Reduce the size of the amdgpu.o by 80k. text data bss dec hex filename 1331332 17982 1008 1350322 149ab2 amdgpu.o 1244668 17982 1008 1263658 13482a amdgpu.o Acked-by: Harry Wentland Acked-by: Alex Deucer Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c | 2485 ++++++++++---------- .../gpu/drm/amd/powerplay/hwmgr/pp_overdriver.h | 2 +- 2 files changed, 1238 insertions(+), 1249 deletions(-) commit 2b6a81f437a7cc8787bae5d7ef64bf77cf8bb0ec Author: Dave Airlie Date: Thu Sep 28 16:12:28 2017 +1000 drm/amdgpu: use designated initialiser for thermal_irq_src. This fixes the 0-day build warning. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bf3486fd0ea9c36c6764583d763be7658ae5b3bf Author: Dave Airlie Date: Thu Sep 28 14:48:38 2017 +1000 amdgpu/pp: slim down the pwr virus tables. This is what I'd call slightly overengineered, we waste 40k on storing a value that is write or end, when we could just use the register value to denote end. Remove the virus command parameter, and save text data bss dec hex filename 1412724 17982 1008 1431714 15d8a2 ../drm-next-build/drivers/gpu/drm/amd/amdgpu/amdgpu.o 1331332 17982 1008 1350322 149ab2 ../drm-next-build/drivers/gpu/drm/amd/amdgpu/amdgpu.o Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/fiji_pwrvirus.h | 20500 +++++++++---------- .../gpu/drm/amd/powerplay/inc/polaris10_pwrvirus.h | 20072 +++++++++--------- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 18 +- .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 18 +- 4 files changed, 20284 insertions(+), 20324 deletions(-) commit 819c4b949d3af009f0111e4a9ddfe3de5f2c2fe1 Author: Dave Airlie Date: Thu Sep 28 09:36:55 2017 +1000 amdgpu/pp: move amdgpu_fuses_default into static const. There is no reason that this gets passed back into the function from outside the file, just reference the table directly. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c | 4 ++-- drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.h | 2 -- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) commit f87c379ee073bec8451fbee9ea6922db1e6ac897 Author: Dave Airlie Date: Thu Sep 28 09:32:49 2017 +1000 amdgpu/pp: move PhwVega10_Magic to static const. This isn't used outside this file. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) commit 19048dc65a73ea644077514c240bd01abe9c6c08 Author: Dave Airlie Date: Thu Sep 28 09:01:47 2017 +1000 amdgpu/pp: remove ci_smc/smumgr split. This split serves no purpose, and we can make a bunch of functions static now. There are lots of cases of this sort of split in the powerplay code, please start cleaning them up. Ideally the function table is in the same file as all the implementations used in it. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 85 ++++++++++++++++++----- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.h | 52 -------------- drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 86 ------------------------ 4 files changed, 71 insertions(+), 154 deletions(-) commit 30b58a248aed8a6e93f9004b5d0f983f2bec30a6 Author: Dave Airlie Date: Thu Sep 28 06:51:21 2017 +1000 drm/amdgpu/vega10: static constify channel_number Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 706e25f241a138d5fa14cd48a0de652283b7a3cd Author: Dave Airlie Date: Thu Sep 28 06:50:54 2017 +1000 drm/amdgpu/pp: constify some powerplay tables Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit ba3b6c4273d5cefbed598e639ebb4a224f2f2dde Author: Dave Airlie Date: Thu Sep 28 06:44:36 2017 +1000 amdgpu/powerplay: constify large struct This moves this from being global data to global rodata, I'm sure it would be easy to move it to being local data. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c | 4 ++-- drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit fdd495c57b87078dbcbbc07fa6bf93b5605a95ff Author: Dave Airlie Date: Thu Sep 28 08:37:34 2017 +1000 amdgpu: don't ask about CHASH just default it for now. If we bump this up a level, we can ask about it, for now, just default to what amdgpu does. Reviewed-by: Felix Kuehling Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/lib/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 35161bbc135a748dd0a3c822030b3341cdefbd33 Author: Andres Rodriguez Date: Tue Sep 26 17:43:14 2017 -0400 drm/amdgpu: map compute rings by least recently used pipe This patch provides a guarantee that the first n queues allocated by an application will be on different pipes. Where n is the number of pipes available from the hardware. This helps avoid ring aliasing which can result in work executing in time-sliced mode instead of truly parallel mode. Reviewed-by: Alex Deucher Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c | 8 +++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 25 ++++++++++++++++++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 5 +++-- 3 files changed, 28 insertions(+), 10 deletions(-) commit 4a75aefe3feb99ff87c1ea594b4db377b98f50e8 Author: Andres Rodriguez Date: Tue Sep 26 12:22:46 2017 -0400 drm/amdgpu: add option for force enable multipipe policy for compute Useful for testing the effects of multipipe compute without recompiling. Acked-by: Felix Kuehling Signed-off-by: Andres Rodriguez 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_gfx.c | 6 ++++++ 3 files changed, 11 insertions(+) commit 0f7607d484f57c31a3e0b5b4e75ff1366cc90b6b Author: Andres Rodriguez Date: Tue Sep 26 12:22:45 2017 -0400 drm/amdgpu: use multipipe compute policy on non PL11 asics A performance regression for OpenCL tests on Polaris11 had this feature disabled for all asics. Instead, disable it selectively on the affected asics. Acked-by: Felix Kuehling Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit e23b74aab5dc48d3e508a2bc171ccd152fb03803 Author: Alex Deucher Date: Thu Sep 28 09:47:32 2017 -0400 drm/amdgpu: fix vf error handling The error handling for virtual functions assumed a single vf per VM and didn't properly account for bare metal. Make the error arrays per device and add locking. Reviewed-by: Gavin Wan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 23 ++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c | 54 +++++++++++++--------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.h | 5 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 13 +++++++ 4 files changed, 54 insertions(+), 41 deletions(-) commit 4dd504f7d98a6719eb2fc1a400257ca1f13d344b Author: Chris Wilson Date: Tue Sep 26 10:53:53 2017 +0100 drm/i915: Use memset64() to prefill the GTT page Take advantage of optimised memset64() instead of open coding it to prefill the GTT pages. Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170926095353.11036-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_gtt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d430a7e3abbf98b4bcb16522cab8e4591775883e Author: Damien Riegel Date: Wed Sep 13 16:43:55 2017 -0400 ASoC: codecs: msm8916-wcd-analog: use btn0 released detection msm8916-wcd-analog uses button0 to differentiate between headphone and headset. Under some circumstances, button pressed and released interrupts are not fired as the driver expects it. For instance, with some connectors, there are spurious button-pressed interrupts when unplugging a headphone, without the corresponding button-released interrupt. But the codec always alternates between button pressed and released interrupts, it cannot fire two interrupts of the same kind in a row. That means that when the headphone is plugged back, only a button-released interrupt will be fired instead of pressed then released. This causes the driver to report headphone as headset. By changing the logic and relying on button 0 release interrupt, the driver could be made more robust for connectors that differ from the one used on the Dragonboard's audio mezzanine. Signed-off-by: Damien Riegel Signed-off-by: Mark Brown sound/soc/codecs/msm8916-wcd-analog.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit de9c8a6a5f083b1106300c842108c2452b25a896 Merge: 6ade97d 9df8f79 Author: David S. Miller Date: Thu Sep 28 10:35:12 2017 -0700 Merge branch 'hns3-dcb' Yunsheng Lin says: ==================== Add support for DCB feature in hns3 driver The patchset contains some enhancement related to DCB before adding support for DCB feature. This patchset depends on the following patchset: https://patchwork.ozlabs.org/cover/815646/ https://patchwork.ozlabs.org/cover/816145/ High Level Architecture: [ lldpad ] | | | [ hns3_dcbnl ] | | | [ hclge_dcb ] / \ / \ / \ [ hclge_main ] [ hclge_tm ] Current patch-set support following functionality: Use of lldptool to configure the tc schedule mode, tc bandwidth(if schedule mode is ETS), prio_tc_map and PFC parameter. V3: Drop mqprio support V2: Fix for not defining variables in local loop. V1: Initial Submit. ==================== Signed-off-by: David S. Miller commit 9df8f79a4d2957fa3083e8fda0843d8c010351a7 Author: Yunsheng Lin Date: Wed Sep 27 09:45:32 2017 +0800 net: hns3: Add DCB support when interacting with network stack When using lldptool to configure DCB parameter, hclge_dcb module call the client_ops->setup_tc to tell network stack which queue and priority is using for specific tc. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 102 ++++++++++++++++++--- 1 file changed, 87 insertions(+), 15 deletions(-) commit 7979a223305016625d211dd051569933c433f81e Author: Yunsheng Lin Date: Wed Sep 27 09:45:31 2017 +0800 net: hns3: Setting for fc_mode and dcb enable flag in TM module After the DCB feature is supported, fc_mode and dcb enable flag must be set according to the DCB parameter. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 34 +++++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) commit 986743dbf0a70211bba594b5abee33b6661feaa9 Author: Yunsheng Lin Date: Wed Sep 27 09:45:30 2017 +0800 net: hns3: Add dcb netlink interface for the support of DCB feature This patch add dcb netlink interface by calling the interface from hclge_dcb module. This patch also update Makefile in order to build hns3_dcbnl module. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/Makefile | 2 + .../ethernet/hisilicon/hns3/hns3pf/hns3_dcbnl.c | 106 +++++++++++++++++++++ .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 2 + .../net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.h | 7 ++ 4 files changed, 117 insertions(+) commit cacde272dd00496c2c1c36606a56b340cd967603 Author: Yunsheng Lin Date: Wed Sep 27 09:45:29 2017 +0800 net: hns3: Add hclge_dcb module for the support of DCB feature The hclge_dcb module calls the interface from hclge_main/tm and provide interface for the dcb netlink interface. This patch also update Makefiles required to build the DCB supported code in HNS3 Ethernet driver and update the existing Kconfig file in the hisilicon folder. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller drivers/net/ethernet/hisilicon/Kconfig | 9 + drivers/net/ethernet/hisilicon/hns3/hnae3.h | 17 ++ .../net/ethernet/hisilicon/hns3/hns3pf/Makefile | 2 + .../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 304 +++++++++++++++++++++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.h | 21 ++ .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 25 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 3 + 7 files changed, 375 insertions(+), 6 deletions(-) commit 77f255c1c695c72acb1d1c47d30323a273774ae6 Author: Yunsheng Lin Date: Wed Sep 27 09:45:28 2017 +0800 net: hns3: Add some interface for the support of DCB feature This patch add some interface and export some interface from hclge_tm and hclgc_main to support the upcoming DCB feature. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 3 ++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 48 ++++++++++++++++++++-- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h | 6 +++ 4 files changed, 55 insertions(+), 5 deletions(-) commit cc9bb43ab394f14096a55ee6101af0e804c05f0f Author: Yunsheng Lin Date: Wed Sep 27 09:45:27 2017 +0800 net: hns3: Add tc-based TM support for sriov enabled port When sriov is enabled and TM is in tc-based mode, vf's TM parameters is not set in TM initialization process. This patch add the tc_based TM support for sriov enabled using the information in vport struct. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 49 ++++++++++++++-------- 1 file changed, 31 insertions(+), 18 deletions(-) commit 0a5677d39ef12739c9c10ef6e8e5f4b0805bfe71 Author: Yunsheng Lin Date: Wed Sep 27 09:45:26 2017 +0800 net: hns3: Add support for port shaper setting in TM module This patch add a tm_port_shaper cmd and set port shaper to HCLGE_ETHER_MAX_RATE on TM initialization process. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 32 ++++++++++++++++++++++ .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h | 4 +++ 2 files changed, 36 insertions(+) commit 9dc2145d910e94d1987fd165ac7643777fcf17c4 Author: Yunsheng Lin Date: Wed Sep 27 09:45:25 2017 +0800 net: hns3: Add support for PFC setting in TM module This patch add a pfc_pause_en cmd, and use it to configure PFC option according to fc_mode in hdev->tm_info. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 68 ++++++++++++++++++++-- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h | 5 ++ 2 files changed, 68 insertions(+), 5 deletions(-) commit acf61ecd44feae2a78c13d0d7cb8e386741c5cf0 Author: Yunsheng Lin Date: Wed Sep 27 09:45:24 2017 +0800 net: hns3: Add support for dynamically buffer reallocation Current buffer allocation can only happen at init, when doing buffer reallocation after init, care must be taken care of memory which priv_buf points to. This patch fixes it by using a dynamic allocated temporary memory. Because we only do buffer reallocation at init or when setting up the DCB parameter, and priv_buf is only used at buffer allocation process, so it is ok to use a dynamic allocated temporary memory. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 5 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 150 +++++++++++---------- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 2 - 3 files changed, 87 insertions(+), 70 deletions(-) commit 9ffe79a9c2eec0f30687c2fd8b452bda5c8287b0 Author: Yunsheng Lin Date: Wed Sep 27 09:45:23 2017 +0800 net: hns3: Support for dynamically assigning tx buffer to TC This patch add support of dynamically assigning tx buffer to TC when the TC is enabled. It will save buffer for rx direction to avoid packet loss. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 1 + .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 64 ++++++++++++++++++---- 2 files changed, 55 insertions(+), 10 deletions(-) commit b79bba15b3f2cf3d7828d45de2d2f2d08fcbb523 Author: Colin Ian King Date: Thu Sep 28 14:22:54 2017 +0100 ipmi: remove redundant initialization of bmc The pointer bmc is being initialized and this initialized value is never being read, so this is assignment redundant and can be removed. Cleans up clang warning: warning: Value stored to 'bmc' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ade97da601f8af793f6c7a861af754d0f0b6767 Author: Alexey Dobriyan Date: Tue Sep 26 23:12:28 2017 +0300 arp: make arp_hdr_len() return unsigned int Negative ARP header length are not a thing. Constify arguments while I'm at it. Space savings: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-3 (-3) function old new delta arpt_do_table 1163 1160 -3 Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 3 ++- include/linux/if_arp.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit bbdc9e687fb3c2920961d7716f1c5519ff7bc595 Author: Aviad Krawczyk Date: Wed Sep 27 02:11:33 2017 +0800 net-next/hinic: Fix a case of Tx Queue is Stopped forever Fix the following scenario: 1. tx_free_poll is running on cpu X 2. xmit function is running on cpu Y and fails to get sq wqe 3. tx_free_poll frees wqes on cpu X and checks the queue is not stopped 4. xmit function stops the queue after failed to get sq wqe 5. The queue is stopped forever Signed-off-by: Aviad Krawczyk Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_tx.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 352f58b0d9f26d283b10f4c9f21e8717141c1334 Author: Aviad Krawczyk Date: Wed Sep 27 01:57:50 2017 +0800 net-next/hinic: Set Rxq irq to specific cpu for NUMA Set Rxq irq to specific cpu for allocating and receiving the skb from the same node. Signed-off-by: Aviad Krawczyk Signed-off-by: David S. Miller drivers/net/ethernet/huawei/hinic/hinic_rx.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit daf9a4ebb742e1229d48bdddff8b91f73202d547 Author: Arvind Yadav Date: Mon Sep 25 13:19:57 2017 +0530 ipmi: pr_err() strings should end with newlines pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_dmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 106a846102b86a55359afaeec9b424928db7259c Author: Corey Minyard Date: Mon Sep 18 13:26:33 2017 -0500 ipmi: Clean up some print operations Get rid of all printfs, using dev_xxx() if a device is available, pr_xxx() otherwise, and format long strings properly. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 101 ++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 56 deletions(-) commit 95e300c052fd9dbb05f289a912c138ed03320ec5 Author: Corey Minyard Date: Mon Sep 18 12:38:17 2017 -0500 ipmi: Make the DMI probe into a generic platform probe Rework the DMI probe function to be a generic platform probe, and then rework the DMI code (and a few other things) to use the more generic information. This is so other things can declare platform IPMI devices. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_dmi.c | 70 ++++++++++++++++-------- drivers/char/ipmi/ipmi_dmi.h | 8 +-- drivers/char/ipmi/ipmi_msghandler.c | 2 +- drivers/char/ipmi/ipmi_si_intf.c | 2 +- drivers/char/ipmi/ipmi_si_platform.c | 101 ++++++++++++++++------------------- drivers/char/ipmi/ipmi_si_sm.h | 2 +- drivers/char/ipmi/ipmi_ssif.c | 12 ++--- include/linux/ipmi.h | 2 +- 8 files changed, 104 insertions(+), 95 deletions(-) commit 55f91cb6f1dfc873359674f35a8ffb1e78429d22 Author: Corey Minyard Date: Sat Sep 16 15:51:25 2017 -0500 ipmi: Make the IPMI proc interface configurable So we can remove it later. Signed-off-by: Corey Minyard drivers/char/ipmi/Kconfig | 8 +++++++ drivers/char/ipmi/ipmi_msghandler.c | 43 +++++++++++++++++++------------------ drivers/char/ipmi/ipmi_si_intf.c | 4 ++++ drivers/char/ipmi/ipmi_ssif.c | 6 ++++++ include/linux/ipmi_smi.h | 2 ++ 5 files changed, 42 insertions(+), 21 deletions(-) commit ac2673d56be609168c3f0792588c1f9ef5824041 Author: Corey Minyard Date: Sat Sep 16 15:11:48 2017 -0500 ipmi_ssif: Add device attrs for the things in proc Create a device attribute for everything we show in proc, getting ready for removing the proc stuff. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_ssif.c | 76 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 74 insertions(+), 2 deletions(-) commit 3dd377b5b07707c1a37e9129b36eaa1a86ccf9cf Author: Corey Minyard Date: Sat Sep 16 14:53:12 2017 -0500 ipmi_si: Add device attrs for the things in proc Create a device attribute for everything we show in proc, getting ready for removing the proc stuff. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 104 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 103 insertions(+), 1 deletion(-) commit 67f4fb025d8e2189f91f6ccfc8f62f76f56f889d Author: Corey Minyard Date: Tue Sep 12 23:35:39 2017 -0500 ipmi_si: remove ipmi_smi_alloc() function It's only used in one place now, so it's overkill. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 58e2763553cb837b879d4a2934094e152e7daf27 Author: Corey Minyard Date: Tue Sep 12 23:24:30 2017 -0500 ipmi_si: Move port and mem I/O handling to their own files Signed-off-by: Corey Minyard drivers/char/ipmi/Makefile | 3 +- drivers/char/ipmi/ipmi_si.h | 3 + drivers/char/ipmi/ipmi_si_intf.c | 256 +----------------------------------- drivers/char/ipmi/ipmi_si_mem_io.c | 144 ++++++++++++++++++++ drivers/char/ipmi/ipmi_si_port_io.c | 112 ++++++++++++++++ 5 files changed, 263 insertions(+), 255 deletions(-) commit d1a6791323b810ce9136a58d95c6e0e455313388 Author: Corey Minyard Date: Tue Sep 12 23:14:25 2017 -0500 ipmi_si: Get rid of unused spacing and port fields Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 10 ---------- 1 file changed, 10 deletions(-) commit c6f85a753df858018b063f5ab89b277179c3387f Author: Corey Minyard Date: Tue Sep 12 23:10:18 2017 -0500 ipmi_si: Move PARISC handling to another file Signed-off-by: Corey Minyard drivers/char/ipmi/Makefile | 3 ++ drivers/char/ipmi/ipmi_si.h | 7 +++++ drivers/char/ipmi/ipmi_si_intf.c | 60 ++------------------------------------ drivers/char/ipmi/ipmi_si_parisc.c | 58 ++++++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 57 deletions(-) commit 13d0b35c5c201e8e6ee520b223c88f58d022a37f Author: Corey Minyard Date: Tue Sep 12 23:04:35 2017 -0500 ipmi_si: Move PCI setup to another file Signed-off-by: Corey Minyard Stephen Rothwell fixed an issue with the include files drivers/char/ipmi/Makefile | 3 + drivers/char/ipmi/ipmi_si.h | 8 ++ drivers/char/ipmi/ipmi_si_intf.c | 163 +------------------------------------- drivers/char/ipmi/ipmi_si_pci.c | 166 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 179 insertions(+), 161 deletions(-) commit 9d70029edbbf23474e022ac77700269807d64b0d Author: Corey Minyard Date: Tue Sep 12 22:55:57 2017 -0500 ipmi_si: Move platform device handling to another file Signed-off-by: Corey Minyard Stephen Rothwell fixed an issue with the include files drivers/char/ipmi/Makefile | 2 +- drivers/char/ipmi/ipmi_si.h | 6 + drivers/char/ipmi/ipmi_si_intf.c | 592 +--------------------------------- drivers/char/ipmi/ipmi_si_platform.c | 602 +++++++++++++++++++++++++++++++++++ 4 files changed, 613 insertions(+), 589 deletions(-) commit 93771b01600506d3c22d0802f9d0500325b13a69 Merge: 4d8806f 73c864b Author: David S. Miller Date: Thu Sep 28 10:23:19 2017 -0700 Merge branch 'bpf-verifier-disassembly-improvements' Edward Cree says: ==================== bpf/verifier: disassembly improvements Fix the output of print_bpf_insn() for ALU ops that don't look like compound assignment (i.e. BPF_END and BPF_NEG). Sample output for a short test program: 0: (b4) (u32) r0 = (u32) 0 1: (dc) r0 = be32 r0 2: (84) r0 = (u32) -r0 3: (95) exit processed 4 insns, stack depth 0 ==================== Signed-off-by: David S. Miller commit 73c864b38383f4abc9b559025cd663f4a81afa89 Author: Edward Cree Date: Tue Sep 26 16:35:29 2017 +0100 bpf/verifier: improve disassembly of BPF_NEG instructions BPF_NEG takes only one operand, unlike the bulk of BPF_ALU[64] which are compound-assignments. So give it its own format in print_bpf_insn(). Signed-off-by: Edward Cree Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2b7c6ba945fd3c10ca3e030be402098aff2f89d3 Author: Edward Cree Date: Tue Sep 26 16:35:13 2017 +0100 bpf/verifier: improve disassembly of BPF_END instructions print_bpf_insn() was treating all BPF_ALU[64] the same, but BPF_END has a different structure: it has a size in insn->imm (even if it's BPF_X) and uses the BPF_SRC (X or K) to indicate which endianness to use. So it needs different code to print it. Signed-off-by: Edward Cree Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/verifier.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 4d8806fd14e1492cd4fb2021f709b163ea3364ad Author: Colin Ian King Date: Tue Sep 26 16:14:09 2017 +0100 cxgb4: make function ch_flower_stats_cb, fixes warning The function ch_flower_stats_cb is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warnings: symbol 'ch_flower_stats_cb' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f46d96328671bc7eaec039aed81f9bffddbf0df1 Merge: 61f26d9 4c82a95 Author: David S. Miller Date: Thu Sep 28 10:20:49 2017 -0700 Merge branch 'rtnl-pushdown-prep' Florian Westphal says: ==================== rtnetlink: preparation patches for further rtnl lock pushdown/removal Patches split large rtnl_fill_ifinfo into smaller chunks to better see which parts 1. require rtnl 2. do not require it at all 3. rely on rtnl locking now but could be converted Changes since v3: I dropped the 'ifalias' patch, I have a change to decouple ifalias and rtnl mutex, I will send it once this series has been merged. ==================== Signed-off-by: David S. Miller commit 4c82a95e523721637d44e0e8d879fa11fa825eec Author: Florian Westphal Date: Tue Sep 26 13:58:43 2017 +0200 rtnetlink: rtnl_have_link_slave_info doesn't need rtnl it can be switched to rcu. Reviewed-by: David Ahern Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/core/rtnetlink.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit b1e66b9a67d67d0e73091b04b51e524581c8c887 Author: Florian Westphal Date: Tue Sep 26 13:58:42 2017 +0200 rtnetlink: add helpers to dump netnsid information Reviewed-by: David Ahern Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/core/rtnetlink.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit 250fc3dfdbd3e8b5c751ce7b5a26176ec62ca0f8 Author: Florian Westphal Date: Tue Sep 26 13:58:41 2017 +0200 rtnetlink: add helpers to dump vf information similar to earlier patches, split out more parts of this function to better see what is happening and where we assume rtnl is locked. Reviewed-by: David Ahern Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/core/rtnetlink.c | 50 +++++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 19 deletions(-) commit 79110a0426d8179a51bf3cb698a84f6ec98ca60c Author: Florian Westphal Date: Tue Sep 26 13:58:40 2017 +0200 rtnetlink: add helper to put master and link ifindexes rtnl_fill_ifinfo currently requires caller to hold the rtnl mutex. Unfortunately the function is quite large which makes it harder to see which spots require the lock, which spots assume it and which ones could do without. Add helpers to factor out the ifindex dumping, one can use rcu to avoid rtnl dependency. Reviewed-by: David Ahern Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/core/rtnetlink.c | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) commit 61f26d92510ea1e30f9b69097b34b6a522daa1d2 Author: Florian Westphal Date: Tue Sep 26 07:40:42 2017 +0200 selftests: rtnetlink.sh: add rudimentary vrf test Acked-by: David Ahern Signed-off-by: Florian Westphal Signed-off-by: David S. Miller tools/testing/selftests/net/rtnetlink.sh | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit e7614370d6f04711c4e4b48f7055e5008fa4ed42 Author: Cong Wang Date: Mon Sep 25 10:13:51 2017 -0700 net_sched: use idr to allocate u32 filter handles Instead of calling u32_lookup_ht() in a loop to find a unused handle, just switch to idr API to allocate new handles. u32 filters are special as the handle could contain a hash table id and a key id, so we need two IDR to allocate each of them. Cc: Chris Mi Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_u32.c | 108 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 41 deletions(-) commit 1d8134fea2eb460698a281f91c03c400f7e546ce Author: Cong Wang Date: Mon Sep 25 10:13:50 2017 -0700 net_sched: use idr to allocate basic filter handles Instead of calling basic_get() in a loop to find a unused handle, just switch to idr API to allocate new handles. Cc: Chris Mi Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_basic.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit 76cf546c2802f6e25113ba481d7e85d0298768c6 Author: Cong Wang Date: Mon Sep 25 10:13:49 2017 -0700 net_sched: use idr to allocate bpf filter handles Instead of calling cls_bpf_get() in a loop to find a unused handle, just switch to idr API to allocate new handles. Cc: Daniel Borkmann Cc: Chris Mi Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/cls_bpf.c | 57 ++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 29 deletions(-) commit d0817657f615ecdf1c7beceade20c7d368003875 Author: Bard Liao Date: Wed Sep 13 14:50:17 2017 +0800 ASoC: rt5670: add set_bclk_ratio in dai ops We need to set a specific bit for 50 bclk rate. So add set_bclk_ratio function to set the bit. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5670.c | 19 +++++++++++++++++++ sound/soc/codecs/rt5670.h | 4 ++++ 2 files changed, 23 insertions(+) commit 163e8aecd13e4442fb996ffe031acb8f951dd55f Author: Rodrigo Vivi Date: Wed Sep 27 17:20:40 2017 -0700 drm/i915: Also discard second CRC on gen8+ platforms. One of the differences I spotted for GEN8+ platforms when compared to older platforms is that spec for BDW+ includes this sentence: "The first CRC done indication after CRC is first enabled is from only a partial frame, so it will not have the expected CRC result." This is an indication that on BDW+ platforms, by the time we receive the interrupt the CRC is not accurate yet for the full frame. That would be ok, because we are already skipping the first CRC for all platforms. However the comment on the code state that it is for some unknown reason. Also, on CHV (gen8 lp) we were already discarding the second CRC as well to make sure we have a reliable CRC on hand. So based on all ou tests and bugs it seems that it is not on CHV that needs to discard 2 first CRCs, but all BDW+ platforms. Starting on SKL we have this CRC done bit (24), but the experiments around the use of this bit wasn't that stable as just discarding the second CRC. So, let's for now just move with CHV solution for all gen8+ platforms and make our CI a bit more stable. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102374 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101309 Cc: Mika Kahola Signed-off-by: Rodrigo Vivi Tested-by: Mika Kahola Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20170928002040.7917-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8f1975e31d8ed0c021a1993a4d9123dd39c740ea Author: Eric Dumazet Date: Mon Sep 25 09:14:14 2017 -0700 inetpeer: speed up inetpeer_invalidate_tree() As measured in my prior patch ("sch_netem: faster rb tree removal"), rbtree_postorder_for_each_entry_safe() is nice looking but much slower than using rb_next() directly, except when tree is small enough to fit in CPU caches (then the cost is the same) From: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/inetpeer.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 977da084cc3c1791ecd6faed55e0ab41e7231660 Author: vathsala nagaraju Date: Tue Sep 26 15:29:13 2017 +0530 drm/i915/psr: Set frames before SU entry for psr2 Set frames before SU entry value for max resync frame count of dpcd register 2009, bit field 0:3. v2 : - add macro EDP_PSR2_FRAME_BEFORE_SU (Rodrigo) - remove EDP_FRAMES_BEFORE_SU_ENTRY (Rodrigo) - add check ==1 for dpcd_read call (ville) v3 : (Rodrigo) - move macro EDP_PSR2_FRAME_BEFORE_SU after EDP_PSR2_FRAME_BEFORE_SU - replace with &= v4 : - change the macro to shift value (jani) - updated register names Cc: Rodrigo Vivi CC: Puthikorn Voravootivat Reviewed-by: Rodrigo Vivi Signed-off-by: Vathsala Nagaraju Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1506419953-32605-2-git-send-email-vathsala.nagaraju@intel.com drivers/gpu/drm/i915/i915_reg.h | 2 +- drivers/gpu/drm/i915/intel_psr.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) commit ae59e633b52cccf5761ac3012378fec2480c49aa Author: vathsala nagaraju Date: Tue Sep 26 15:29:12 2017 +0530 drm/dp: Add defines for latency in sink Add defines for dpcd register 2009 (synchronization latency in sink). v2: - add spec version (Daniel) - use register name as is in spec,only drop excess from end (jani) - add the full register contents (jani) [Rodrigo fixed spec version when merging] Cc: Rodrigo Vivi CC: Puthikorn Voravootivat Reviewed-by: Rodrigo Vivi Signed-off-by: Vathsala Nagaraju Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1506419953-32605-1-git-send-email-vathsala.nagaraju@intel.com Signed-off-by: Rodrigo Vivi include/drm/drm_dp_helper.h | 6 ++++++ 1 file changed, 6 insertions(+) commit d1c4cb447a7efcb5608a33cdfed8ab4234378b0a Author: Chintan Patel Date: Mon Sep 18 08:43:18 2017 -0700 ASoC: Intel: Skylake: Fix jack name format substitution Jack name is not getting formatted correctly hence resulting in invalid name for HDMI/DP input devices. This was recently exposed due changes brought by MST: commit 3a13347f05fd ("ASoC: Intel: kbl: Add jack port initialize in kbl machine drivers") Signed-off-by: Chintan Patel Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 2 ++ 1 file changed, 2 insertions(+) commit d25d41827fee2b489518eee99ef156b005c0c01e Author: Stefan Brüns Date: Thu Sep 28 03:49:28 2017 +0200 arm: allwinner: Correct unit name in devicetree binding example Unit-names must not start with a leading 0. Signed-off-by: Stefan Brüns Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/dma/sun6i-dma.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06c1258a0a19597ddec954e0c55a5be585c0d8a5 Author: Stefan Brüns Date: Thu Sep 28 03:49:27 2017 +0200 arm64: allwinner: a64: add dma controller references to spi nodes The spi controller nodes omit the dma controller/channel references, add it. This does not yet enable DMA for SPI transfers, as the spi-sun6i driver lacks support for DMA, but always uses PIO to the FIFO. Signed-off-by: Stefan Brüns Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit c32637e0e0f501ff85f0f1db541862e5fe27c4ee Author: Stefan Brüns Date: Thu Sep 28 03:49:26 2017 +0200 arm64: allwinner: a64: Add device node for DMA controller The A64 SoC has a DMA controller that supports 8 DMA channels to and from various peripherals. The last used DRQ port is 27. Add a device node for it. Signed-off-by: Stefan Brüns Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit a586cb4937fa328a857c8d7fbefb986d347bd4a7 Author: Yasunori Goto Date: Fri Sep 22 16:46:26 2017 +0900 nfit_test Make private definitions to command emulation Move private definitions to command emulation. These definitions were originally defined at include/uapi/linux/ndctl.h, but they are used at only nfit_test emulation now. Signed-off-by: Yasunori Goto Reviewed-by: Vishal Verma Signed-off-by: Dan Williams tools/testing/nvdimm/test/nfit_test.h | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit b18d4b8a25af6fe83d7692191d6ff962ea611c4f Author: Dan Williams Date: Tue Sep 26 11:41:28 2017 -0700 libnvdimm, namespace: fix label initialization to use valid seq numbers The set of valid sequence numbers is {1,2,3}. The specification indicates that an implementation should consider 0 a sign of a critical error: UEFI 2.7: 13.19 NVDIMM Label Protocol Software never writes the sequence number 00, so a correctly check-summed Index Block with this sequence number probably indicates a critical error. When software discovers this case it treats it as an invalid Index Block indication. While the expectation is that the invalid block is just thrown away, the Robustness Principle says we should fix this to make both sequence numbers valid. Fixes: f524bf271a5c ("libnvdimm: write pmem label set") Cc: Reported-by: Juston Li Signed-off-by: Dan Williams drivers/nvdimm/label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26417ae4fc6108f8db436f24108b08f68bdc520e Author: Dan Williams Date: Tue Sep 26 13:07:06 2017 -0700 libnvdimm, pfn: make 'resource' attribute only readable by root For the same reason that /proc/iomem returns 0's for non-root readers and acpi tables are root-only, make the 'resource' attribute for pfn devices only readable by root. Otherwise we disclose physical address information. Fixes: f6ed58c70d14 ("libnvdimm, pfn: 'resource'-address and 'size'...") Cc: Reported-by: Dave Hansen Signed-off-by: Dan Williams drivers/nvdimm/pfn_devs.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit c1fb3542074fd0c4d901d778bd52455111e4eb6f Author: Dan Williams Date: Tue Sep 26 11:21:24 2017 -0700 libnvdimm, namespace: make 'resource' attribute only readable by root For the same reason that /proc/iomem returns 0's for non-root readers and acpi tables are root-only, make the 'resource' attribute for namespace devices only readable by root. Otherwise we disclose physical address information. Fixes: bf9bccc14c05 ("libnvdimm: pmem label sets and namespace instantiation") Cc: Reported-by: Dave Hansen Signed-off-by: Dan Williams drivers/nvdimm/namespace_devs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8ff981f88df03c72a4de2f6eaa9ce447a10ac03 Author: Dan Williams Date: Tue Sep 26 11:17:52 2017 -0700 libnvdimm, region : make 'resource' attribute only readable by root For the same reason that /proc/iomem returns 0's for non-root readers and acpi tables are root-only, make the 'resource' attribute for region devices only readable by root. Otherwise we disclose physical address information. Fixes: 802f4be6feee ("libnvdimm: Add 'resource' sysfs attribute to regions") Cc: Cc: Dave Jiang Cc: Johannes Thumshirn Reported-by: Dave Hansen Signed-off-by: Dan Williams drivers/nvdimm/region_devs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d083e6dae083ba3576ee454d5cab4491d9c21ec5 Author: Arvind Yadav Date: Mon Sep 25 16:11:13 2017 +0530 dax: pr_err() strings should end with newlines pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav Signed-off-by: Dan Williams drivers/dax/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d34cb808402898e53b9a9bcbbedd01667a78723b Author: Dan Williams Date: Mon Sep 25 11:01:31 2017 -0700 libnvdimm, dimm: clear 'locked' status on successful DIMM enable If we successfully enable a DIMM then it must not be locked and we can clear the label-read failure condition. Otherwise, we need to reload the entire bus provider driver to achieve the same effect, and that can disrupt unrelated DIMMs and namespaces. Fixes: 9d62ed965118 ("libnvdimm: handle locked label storage areas") Cc: Signed-off-by: Dan Williams drivers/nvdimm/dimm.c | 1 + drivers/nvdimm/dimm_devs.c | 7 +++++++ drivers/nvdimm/nd.h | 1 + 3 files changed, 9 insertions(+) commit 88ae80aa609c7db3e3cc98e97e05badbcc6347dc Author: Tony Luck Date: Mon Sep 25 10:10:42 2017 -0700 EDAC, skx_edac: Handle systems with segmented PCI busses Large systems separate their PCI busses into segments since the limit of only 256 PCI busses can be too restrictive. Extend this driver to check whether matches when deciding how to group memory controller PCI devices to CPU sockets. Signed-off-by: Tony Luck Cc: Aristeu Rozanski Cc: Charles Rose Cc: Mauro Carvalho Chehab Cc: Qiuxu Zhuo Cc: linux-edac Link: http://lkml.kernel.org/r/f58abfd10bf73c8bc5adc1fe4de7408128b00625.1506358467.git.tony.luck@intel.com [ Make skx_dev.seg an int. ] Signed-off-by: Borislav Petkov drivers/edac/skx_edac.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b4021bbe10017d994e5a96ebfd2677bbaf2b37e0 Author: Markus Elfring Date: Mon Sep 25 10:10:51 2017 +0200 clk: renesas: rcar-gen2: Delete error message for failed memory allocation The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus fix affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/clk-rcar-gen2.c | 1 - 1 file changed, 1 deletion(-) commit 168bcbcb1c72a4753fc64ef384b46e330bfccd08 Author: Markus Elfring Date: Mon Sep 25 10:10:51 2017 +0200 clk: renesas: mstp: Delete error messages for failed memory allocations The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus fix affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Geert Uytterhoeven drivers/clk/renesas/clk-mstp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 48915aed60c9615e5eaa0f1683640635dade788e Author: Sven Eckelmann Date: Thu Sep 28 17:16:51 2017 +0200 batman-adv: Fix "line over 80 characters" checkpatch warning Fixes: 242c1a28eb61 ("net: Remove useless function skb_header_release") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/soft-interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 825ffe1f7b875127bc03faffec0ecfb05906650a Author: Sven Eckelmann Date: Wed Aug 23 21:52:13 2017 +0200 batman-adv: Remove unnecessary parentheses checkpatch introduced with commit 63b7c73ec86b ("checkpatch: add --strict check for ifs with unnecessary parentheses") an additional test which identifies some unnecessary parentheses. Remove these unnecessary parentheses to avoid the warnings and to unify the coding style slightly more. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich net/batman-adv/bat_iv_ogm.c | 24 ++++++++++++------------ net/batman-adv/bat_v.c | 2 +- net/batman-adv/bat_v_elp.c | 6 +++--- net/batman-adv/bat_v_ogm.c | 12 ++++++------ net/batman-adv/distributed-arp-table.c | 4 ++-- net/batman-adv/gateway_client.c | 8 ++++---- net/batman-adv/gateway_common.c | 18 +++++++++--------- net/batman-adv/hard-interface.c | 12 ++++++------ net/batman-adv/icmp_socket.c | 4 ++-- net/batman-adv/main.c | 4 ++-- net/batman-adv/multicast.c | 2 +- net/batman-adv/originator.c | 26 +++++++++++++------------- net/batman-adv/routing.c | 6 +++--- net/batman-adv/send.c | 6 +++--- net/batman-adv/soft-interface.c | 2 +- net/batman-adv/sysfs.c | 4 ++-- net/batman-adv/tp_meter.c | 2 +- 17 files changed, 71 insertions(+), 71 deletions(-) commit 7e7c1afb67074596f6ff96e5276d6084d1648ec1 Author: Simon Wunderlich Date: Thu Sep 28 13:44:39 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 9edb39d750c0a9a6f7dafb8d9d15e63f6d44b68c Author: Markus Elfring Date: Wed Sep 27 11:38:17 2017 +0200 clk: rockchip: Remove superfluous error message in rockchip_clk_register_cpuclk() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Heiko Stuebner drivers/clk/rockchip/clk-cpu.c | 2 -- 1 file changed, 2 deletions(-) commit e8b198402745ed413ed8229b2eb45d34016eb5d8 Author: Robin Murphy Date: Thu Sep 28 11:31:23 2017 +0100 iommu/iova: Try harder to allocate from rcache magazine When devices with different DMA masks are using the same domain, or for PCI devices where we usually try a speculative 32-bit allocation first, there is a fair possibility that the top PFN of the rcache stack at any given time may be unsuitable for the lower limit, prompting a fallback to allocating anew from the rbtree. Consequently, we may end up artifically increasing pressure on the 32-bit IOVA space as unused IOVAs accumulate lower down in the rcache stacks, while callers with 32-bit masks also impose unnecessary rbtree overhead. In such cases, let's try a bit harder to satisfy the allocation locally first - scanning the whole stack should still be relatively inexpensive. Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit b826ee9a4f1cbf83cadc5a307de8eea27637699a Author: Robin Murphy Date: Tue Sep 19 14:48:40 2017 +0100 iommu/iova: Make rcache limit_pfn handling more robust When popping a pfn from an rcache, we are currently checking it directly against limit_pfn for viability. Since this represents iova->pfn_lo, it is technically possible for the corresponding iova->pfn_hi to be greater than limit_pfn. Although we generally get away with it in practice since limit_pfn is typically a power-of-two boundary and the IOVAs are size-aligned, it's pretty trivial to make the iova_rcache_get() path take the allocation size into account for complete safety. Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7595dc588a39c37091ddf65f6c0a3cd40f128e7a Author: Robin Murphy Date: Tue Sep 19 14:48:39 2017 +0100 iommu/iova: Simplify domain destruction All put_iova_domain() should have to worry about is freeing memory - by that point the domain must no longer be live, so the act of cleaning up doesn't need to be concurrency-safe or maintain the rbtree in a self-consistent state. There's no need to waste time with locking or emptying the rcache magazines, and we can just use the postorder traversal helper to clear out the remaining rbtree entries in-place. Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 48 +++++++++--------------------------------------- 1 file changed, 9 insertions(+), 39 deletions(-) commit 32f35b863451884e856f0f577474740561a87fad Merge: ae7617f 754270c Author: Jani Nikula Date: Thu Sep 28 15:56:49 2017 +0300 Merge drm-upstream/drm-next into drm-intel-next-queued Need MST sideband message transaction to power up/down nodes. Signed-off-by: Jani Nikula commit 74717b28cb32e1ad3c1042cafd76b264c8c0f68d Author: Alexandre Belloni Date: Thu Sep 28 13:53:27 2017 +0200 rtc: set the alarm to the next expiring timer If there is any non expired timer in the queue, the RTC alarm is never set. This is an issue when adding a timer that expires before the next non expired timer. Ensure the RTC alarm is set in that case. Fixes: 2b2f5ff00f63 ("rtc: interface: ignore expired timers when enqueuing new timers") Signed-off-by: Alexandre Belloni drivers/rtc/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae7617f0ef1820be033eef93859a6bb6174a843f Author: Tvrtko Ursulin Date: Wed Sep 27 17:41:38 2017 +0100 drm/i915: Allow optimized platform checks If we store the platform as a bitmask, and convert the IS_PLATFORM macro to use it, we allow the compiler to merge the IS_PLATFORM(a) || IS_PLATFORM(b) || ... checks into a single conditional. As a secondary benefit this saves almost 1k of text: text data bss dec hex filename -1460254 60014 3656 1523924 1740d4 drivers/gpu/drm/i915/i915.ko +1459260 60026 3656 1522942 173cfe drivers/gpu/drm/i915/i915.ko v2: Removed the infamous -1. Signed-off-by: Tvrtko Ursulin Cc: Jani Nikula Reviewed-by: Chris Wilson Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170927164138.15474-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.c | 4 ++++ drivers/gpu/drm/i915/i915_drv.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 79761ce80aa0232157e428bde28c0cef6d43ac5f Author: Colin Ian King Date: Wed Sep 27 11:22:23 2017 +0100 x86/apic: Fix spelling mistake: "symmectic" -> "symmetric" Trivial fix to spelling mistakes in pr_info messages Signed-off-by: Colin Ian King Signed-off-by: Thomas Gleixner Cc: Dou Liyang Link: https://lkml.kernel.org/r/20170927102223.31920-1-colin.king@canonical.com arch/x86/kernel/apic/apic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 476242482bdee72b30f188c2e025f0fa5df0208c Merge: 2bd6bf0 ca8b5d9 Author: Russell King Date: Thu Sep 28 11:15:14 2017 +0100 Merge branch 'xip_zdata' of http://git.linaro.org/people/nicolas.pitre/linux into devel-testing This contains important fixes to the XIP linker script, some more linker script cleanups, .bss clearing and .data copying speedups related to the above, and an opt-in config option for XIP kernels that allows for compressing .data in ROM that depend on those other patches to work properly. commit 0f7c4c15a30ffc5f5fd563ad1159cb899e121407 Author: Vladimir Murzin Date: Mon Sep 25 10:31:15 2017 +0100 ARM: 8699/1: dma-mapping: Remove init_dma_coherent_pool_size() There are no users of init_dma_coherent_pool_size() left due to 387870f ("mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls"), so remove it. Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/include/asm/dma-mapping.h | 7 ------- arch/arm/mm/dma-mapping.c | 15 --------------- 2 files changed, 22 deletions(-) commit b337e1c40d3ea2d6f09228c4ff203f006abc9095 Author: Vladimir Murzin Date: Mon Sep 25 10:29:07 2017 +0100 ARM: 8698/1: dma-mapping: Mark atomic_pool as __ro_after_init atomic_pool is setup once while init stage and never changed after that, so it is good candidate for __ro_after_init. Since we are here mark atomic_pool_size with __init_data. Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/mm/dma-mapping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit acb624488df3073be4e6f3c0a86b155c40d63ab2 Author: Vladimir Murzin Date: Mon Sep 25 10:25:53 2017 +0100 ARM: 8697/1: dma-mapping: Do not pass data to gen_pool_set_algo() gen_pool_first_fit_order_align() does not make use of additional data, so pass plain NULL there. Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/mm/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d9ac1625ac1041742c72c3b680198f0304539b2 Author: Vladimir Murzin Date: Mon Sep 4 09:17:48 2017 +0100 ARM: 8696/1: mm: Remove dead code in mem_init() The code in question checks memory constrains to set default policy for overcommit; however we support page size of 4K only thus condition is always evaluated to false. Remove that dead code. Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/mm/init.c | 10 ---------- 1 file changed, 10 deletions(-) commit 6022f80da0d9d42e02e78f3fb42930ee86f3e7af Author: Vladimir Murzin Date: Mon Sep 4 09:17:32 2017 +0100 ARM: 8695/1: entry: Remove dead code in sys_mmap2 We support page size of 4K only, remove dead code. Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/kernel/entry-common.S | 9 --------- 1 file changed, 9 deletions(-) commit 94058906acfbe3474e26d665924260e44a30e1bc Author: Vladimir Murzin Date: Mon Sep 4 09:17:09 2017 +0100 ARM: 8694/1: Remove leftover of fixmap_page_table fixmap_page_table was removed by commit 836a24183273 (ARM: expand fixmap region to 3MB), but some traces are still there - get rid of them. Signed-off-by: Vladimir Murzin Signed-off-by: Russell King arch/arm/include/asm/highmem.h | 1 - 1 file changed, 1 deletion(-) commit cf1b09908a231f3bb5e8ca15b76f05c4df91e292 Author: Nicolas Pitre Date: Fri Sep 1 03:39:46 2017 +0100 ARM: 8693/1: discard memblock arrays when possible On ARM the generic pfn_valid() version is used with some configurations such as SA1100 based devices. In that case the memblock arrays are no longer used after boot and can be discarded. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit b6e2b3e1c53c43ada97223ecb7678a8b7a33172e Author: Mihaela Muraru Date: Wed Sep 27 00:43:45 2017 -0700 staging: speakup: Fix comment block coding style This is a patch to the spk_ttyio.c file that fix up a comment block warninig, found by checkpatch.pl tool, by adding */ on a separte line. WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Mihaela Muraru Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/spk_ttyio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b5a603dee866a6af1ff8cb8dabd71795c5e6cb42 Author: Mihaela Muraru Date: Sun Sep 24 11:49:41 2017 +0300 staging: speakup: Use octal permissions '0444' Fixed the following checkpatch warning: WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. Signed-off-by: Mihaela Muraru Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/speakup_apollo.c | 2 +- drivers/staging/speakup/speakup_audptr.c | 2 +- drivers/staging/speakup/speakup_bns.c | 2 +- drivers/staging/speakup/speakup_decext.c | 2 +- drivers/staging/speakup/speakup_dectlk.c | 2 +- drivers/staging/speakup/speakup_dummy.c | 2 +- drivers/staging/speakup/speakup_ltlk.c | 2 +- drivers/staging/speakup/speakup_spkout.c | 2 +- drivers/staging/speakup/speakup_txprt.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) commit 88202ecab73e62470f81f6dac0e258a2a23cf861 Author: David Kershner Date: Wed Sep 27 13:14:50 2017 -0400 staging: unisys: visornic: clean up parenthesis Clean up unneeded parenthesis reported by checkpatch.pl. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visornic/visornic_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6224c3203fc09f1a29d6638fb29b080e4fec22fe Author: David Kershner Date: Wed Sep 27 13:14:49 2017 -0400 staging: unisys: visorhba: clean up parenthesis Clean up unneeded parenthesis reported by checkpatch.pl. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorhba/visorhba_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 614b083d70330398c6a0a6b0bacacfdd60284703 Author: David Kershner Date: Wed Sep 27 13:14:48 2017 -0400 staging: unisys: visorbus: Fix extraneous parenthesis Clean up unneeded () that are being reported by checkpatch. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 4 ++-- drivers/staging/unisys/visorbus/visorchipset.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit b5b46dd7b5879f2ede1e6e060a6da51cb136898d Author: Sameer Wadgaonkar Date: Wed Sep 27 13:14:47 2017 -0400 staging: unisys: visorbus: fix comments in vbuschannel.h This patch fixes some comments in the file vbuschannel.h to make it more uniform. Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/vbuschannel.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit b2d06cad48eb286959524b9930750a27e8428785 Author: Sameer Wadgaonkar Date: Wed Sep 27 13:14:46 2017 -0400 staging: unisys: include: fix comments and spacing issues in visorbus.h This patch fixes some comments and spacings in the file visorbus.h to make it more uniform. Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit fe9f4b53f39ec12b6985ad7ab8cd621ee7463d35 Author: Sameer Wadgaonkar Date: Wed Sep 27 13:14:45 2017 -0400 staging: unisys: visorbus: fix line over 80 characters checkpatch warning This patch fixes two checkpatch issues of line over 80 characters in visorchipset.c. Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 90476670abec373557a6bff6a43b6e490c02e4ec Author: Sameer Wadgaonkar Date: Wed Sep 27 13:14:44 2017 -0400 staging: unisys: visorbus: simplify visorchannel_create_guts Removing the two wrapper functions dealing with visorchannel_create() and instead just always use a new version of visorchannel_create() with an additional parameter. Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_private.h | 4 +--- drivers/staging/unisys/visorbus/visorchannel.c | 23 +++++----------------- drivers/staging/unisys/visorbus/visorchipset.c | 15 +++++++------- 3 files changed, 14 insertions(+), 28 deletions(-) commit cb3b5dccca9d011f764de139f88a1db3b9d21d82 Author: Sameer Wadgaonkar Date: Wed Sep 27 13:14:43 2017 -0400 staging: unisys: check the whole channel instead of just guid for match Validate that the channel contents match the channel type that we are matching. Signed-off-by: Sameer Wadgaonkar Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 11 ++++++++++- drivers/staging/unisys/visorhba/visorhba_main.c | 3 ++- drivers/staging/unisys/visorinput/visorinput.c | 5 +++-- drivers/staging/unisys/visornic/visornic_main.c | 3 ++- 4 files changed, 17 insertions(+), 5 deletions(-) commit 66040f9104fc2898d4a66e94e9e5e2cc11927611 Author: David Binder Date: Wed Sep 27 13:14:42 2017 -0400 staging: unisys: include: Remove unused enum Removes unused enum that pertains to s-Par diagnostics capabilities. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 20 -------------------- 1 file changed, 20 deletions(-) commit e27b10aa89192fc9d4fc07e9f1aaa592dca2851d Author: David Binder Date: Wed Sep 27 13:14:41 2017 -0400 staging: unisys: include: Remove unnecessary macro to generate signature Removes unnecessary SIGNATURE_16 macro used to generate a simple 32-bit signature. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorchannel.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e8ffed837f6ddc7055d06c69e3ef78b53d39a6f2 Author: David Binder Date: Wed Sep 27 13:14:40 2017 -0400 staging: unisys: include: Rename channel.h to visorchannel.h In order to avoid a potential conflict with other drivers that define a channel.h file, the s-Par channel.h file is renamed in accordance with the surrounding driver-set namespace. Signed-off-by: David Binder Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 191 --------------------- drivers/staging/unisys/include/iochannel.h | 2 +- drivers/staging/unisys/include/visorbus.h | 2 +- drivers/staging/unisys/include/visorchannel.h | 191 +++++++++++++++++++++ drivers/staging/unisys/visorbus/controlvmchannel.h | 2 +- drivers/staging/unisys/visorbus/vbuschannel.h | 2 +- 6 files changed, 195 insertions(+), 195 deletions(-) commit da56cb0487288702e26c3c27eddade5ab59f6ab0 Author: David Kershner Date: Wed Sep 27 13:14:39 2017 -0400 staging: unisys: visorbus: clean up parameter formatting Cleans up parameter formatting in visorbus. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 2 +- drivers/staging/unisys/visorbus/visorchipset.c | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) commit 3fbee197144a40b2d39132afde6f8fbb1ca23184 Author: David Kershner Date: Wed Sep 27 13:14:38 2017 -0400 staging: unisys: visorbus: shrink name of POLLJIFFIES_CONTROLVMCHANNEL_XXX Shrinks the name of POLLJIFFIES_CONTORLVMCHANNEL_FAST and POLLJIFFIES_CONTROLVMCHANNEL_SLOW to just POLLJIFFIES_CONTROLVM_XXXX. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit ef7b9dcb11f9f521b92f072c1692fab6e670329a Author: David Kershner Date: Wed Sep 27 13:14:37 2017 -0400 staging: unisys: visorbus: visorchipset.c: Remove useless initializations Found several more useless initializations in visorchipset.c get rid of them. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 69a4d1e758a6d7b0429ba648f9d663bc9436693e Author: David Kershner Date: Wed Sep 27 13:14:36 2017 -0400 staging: unisys: remove visorbus_type extern The variable visorbus_type could be contained to the visorbus_main.c file by moving the two functions that referenced it visorchipset.c. This allowed us to remove the incorrect extern from the include file visorbus.h. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 2 -- drivers/staging/unisys/visorbus/visorbus_main.c | 37 +++++++++++++++++++++- drivers/staging/unisys/visorbus/visorbus_private.h | 2 ++ drivers/staging/unisys/visorbus/visorchipset.c | 35 -------------------- 4 files changed, 38 insertions(+), 38 deletions(-) commit 6c073dabce18f600d9422f8921df8364bf850fff Author: David Kershner Date: Wed Sep 27 13:14:35 2017 -0400 staging: unisys: visorbus: keep the success path on the left side If you can't find the dev, it is an error. Indent for the error, instead of the success. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit b11dffc48186d0bd5617f0428b832a580a7930c9 Author: David Kershner Date: Wed Sep 27 13:14:34 2017 -0400 staging: unisys: include: consolidate a comment Use all 80 characters of the line to consolidate a comment. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/iochannel.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit d049f96435fbde7fa6375980cc345f9677871896 Author: David Kershner Date: Wed Sep 27 13:14:33 2017 -0400 staging: unisys: include: remove signature_32 Remove signature_32 since it was only being referenced in one location. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 6db4325b1f3e31f7b2005435b6a8dee335d27c95 Author: David Kershner Date: Wed Sep 27 13:14:32 2017 -0400 staging: unisys: include: reorder to avoid forward declaration The include file visorbus.h has a forward declaration of visor_device. A simple reorder of the file removed the need for the forward declaration. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 125 +++++++++++++++--------------- 1 file changed, 63 insertions(+), 62 deletions(-) commit b71d87b74664bab5de8f743a29f4d7d04a0a27e2 Author: David Kershner Date: Wed Sep 27 13:14:31 2017 -0400 staging: unisys: visorbus: vbuschannel doesn't use ctypes Don't include ctypes in vbuschannel.h, it isn't used by ctypes, but it is used by visorbus_main.c so include it there. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/controlvmchannel.h | 1 + drivers/staging/unisys/visorbus/vbuschannel.h | 1 - drivers/staging/unisys/visorbus/visorbus_main.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) commit cee247cbb31bc691a215042be3283749e981c248 Author: David Kershner Date: Wed Sep 27 13:14:30 2017 -0400 staging: unisys: include: remove io.h from channel.h Channel.h was including io.h and not using it. Remove the #include. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/channel.h | 1 - 1 file changed, 1 deletion(-) commit eb6eb1e14d9900d39660d0313eb01791fcdaf2b3 Author: David Kershner Date: Wed Sep 27 13:14:29 2017 -0400 staging: unisys: only include a file where it is used. The header file visorbus.h included several linux headers that were used by the source files that include it. Move the includes to the files that actually use them. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 2 -- drivers/staging/unisys/visorbus/visorbus_main.c | 2 ++ drivers/staging/unisys/visorbus/visorchannel.c | 1 + drivers/staging/unisys/visorhba/visorhba_main.c | 1 + drivers/staging/unisys/visorinput/visorinput.c | 1 + drivers/staging/unisys/visornic/visornic_main.c | 1 + 6 files changed, 6 insertions(+), 2 deletions(-) commit 7f91228d3966adf5c6df250c3da5af66f8140455 Author: David Kershner Date: Wed Sep 27 13:14:28 2017 -0400 staging: unisys: visorbus: to_visor_device/to_visor_driver move up The macros to_visor_device and to_visor_driver are fairly small; move them up to the declaration block to save some space. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 4e95347b1894a635df3cac133c6016399ef30240 Author: David Kershner Date: Wed Sep 27 13:14:27 2017 -0400 staging: unisys: visorbus: visorbus_main.c: remove blank lines Removes several extraneous blank lines in visorbus_main.c. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 44 ++----------------------- 1 file changed, 3 insertions(+), 41 deletions(-) commit 9116ae7afa59364739d9963e728da494396ecd0e Author: David Kershner Date: Wed Sep 27 13:14:26 2017 -0400 staging: unisys: visorbus: visorchipset: clean up blank lines in visorchipset Remove extraneous blank lines and get consistency of blank lines. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 98 +------------------------- 1 file changed, 3 insertions(+), 95 deletions(-) commit a3b726c1971f89794714bbe9a9d8e7dd10dde4aa Author: David Kershner Date: Wed Sep 27 13:14:25 2017 -0400 staging: unisys: visorbus: fix newlines for visorchannel Remove extraneous blank lines and add some lines that are needed. General philosophy -- declaration, space, pre-conditions (if needed), space, then rest of function. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 28 +------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) commit 473659df53561d06e9ff35a971bf1eaa705eec37 Author: David Kershner Date: Wed Sep 27 13:14:24 2017 -0400 staging: unisys: visorbus: Remove unneeded initialization No need to set drv to NULL. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 453ca1938063ce1b7870bf9100d5cc56caff578f Author: David Kershner Date: Wed Sep 27 13:14:23 2017 -0400 staging: unisys: visorbus: simplify debugfs print statment Simplify debugfs statement so it is clearer and more compact. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f50a34a5f9993283c8b1c0d6f96f4809a9c5826 Author: David Kershner Date: Wed Sep 27 13:14:22 2017 -0400 staging: unisys: visorbus: clean up formatting of function definitions Consolidate function parameters onto the same line if they can fit. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 27 +++++++++---------------- 1 file changed, 9 insertions(+), 18 deletions(-) commit 1c218004abb067b0649e82ec366e344e1c8e33ad Author: David Kershner Date: Wed Sep 27 13:14:21 2017 -0400 staging: unisys: shrink the name of a variable The field debugfs_client_bus_info can be reduced to debugfs_bus_info. The word client is extraneous in this context. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/include/visorbus.h | 2 +- drivers/staging/unisys/visorbus/visorbus_main.c | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) commit 61f38f9a4240c4543ee9c6dd80fe4f96adc26d07 Author: David Kershner Date: Wed Sep 27 13:14:20 2017 -0400 staging: unisys: visorbus: keep the success path on the left The code was indenting for the successful path and then combining the error and success path for the rest of the function. Correct it so the success path is not indented. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 5d1a7fd754e54af11cf2f9b874c427fd0a786fb4 Author: David Kershner Date: Wed Sep 27 13:14:19 2017 -0400 staging: unisys: visorbus: clean up initializations Don't compute value of offset during initialization. Assigning a value to offset should happen after we have verified all of its components. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 9f1d28fa2c481489adb51cfb652f1d5d910d889b Author: David Kershner Date: Wed Sep 27 13:14:18 2017 -0400 staging: unisys; visorbus: visorbus_main.c: remove extraneous newline Use all 80 characters when calling functions. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit ae54a287963f420392a715a4d41aebf773f38614 Author: David Kershner Date: Wed Sep 27 13:14:17 2017 -0400 staging: unisys: fix up device_destroy Visorbus_remove_instance calls device_unregister which in turn will call visorbus_release_busdevice. The function visorbus_release_busdevice was freeing the visor_device. The code in visorbus_remove_instance was then trying to reference the visor_device. This patch cleans up the code so the visor_device is not referenced after the unregister. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fd9e450cf5499d6ed6821f2d007e91b729e26092 Author: David Kershner Date: Wed Sep 27 13:14:16 2017 -0400 staging: unisys: visorbus: NULL pending_msg_hdr not an error A NULL pending_msg_hdr is not an error, it just means that the firmware does not want an error response for that message. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 3 ++- drivers/staging/unisys/visorbus/visorchipset.c | 13 ++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) commit 17e4bddadca856d1725d27b8008bb6e9d51a095a Author: David Kershner Date: Wed Sep 27 13:14:15 2017 -0400 staging: unisys: visorbus: don't put code in declaration. Simplify the code by not putting the assignment in the declaration. Define it and then assign it, so the function doesn't get bunched up on the right. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 5d48942c1fa0f217b82053e8db0688538dde1fdb Author: David Kershner Date: Wed Sep 27 13:14:14 2017 -0400 staging: unisys: visorbus: use guid_is_equal instead of memcmp The function publish_vbus_dev_info was doing a memcmp of guids. It should be using the kernel provided guid_equal function instead. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 7915a3c45021ca47f9fe982abc6c6df3ace652fc Author: David Kershner Date: Wed Sep 27 13:14:13 2017 -0400 staging: unisys: visorbus: visorbus_main.c: cleanup and consolidate comments Use all 80 characters of the line for comments to help reduce the number of extra lines in the code. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_main.c | 44 +++++++++++-------------- 1 file changed, 19 insertions(+), 25 deletions(-) commit 30c036cc2bf2634608dffd3e65660fed8bc716db Author: David Kershner Date: Wed Sep 27 13:14:12 2017 -0400 staging: unisys: visorbus: visorbus_private.h remove extra blank lines Remvoe several unneeded blank lines. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorbus_private.h | 2 -- 1 file changed, 2 deletions(-) commit 34fbf6a09b98520bc778dc3fe6d6157d94b6d513 Author: David Kershner Date: Wed Sep 27 13:14:11 2017 -0400 staging: unisys: visorbus: fix alignment of paranethesis Correct indenting of parameters when calling the functions in the file visorchipset.c. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 040b78f7ade4df864d82fcf9fe5dcbf365c2ea88 Author: David Kershner Date: Wed Sep 27 13:14:10 2017 -0400 staging: unisys; visorbus: visorchipset.c: remove extraneous newline Use all 80 characters when calling functions. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 31 ++++++++++---------------- 1 file changed, 12 insertions(+), 19 deletions(-) commit cbe7e02f97b9d8b618a9e517b62475867aae67bb Author: David Kershner Date: Wed Sep 27 13:14:09 2017 -0400 staging: unisys: visorbus: visorchannel: use 80 characters for comments In the file visorhcannel.c use all 80 characters for comments instead of shortening them. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchannel.c | 35 +++++++++++++------------- 1 file changed, 17 insertions(+), 18 deletions(-) commit 90d1ecf04879714b3ba06ab7c1805aa30e6f535d Author: David Kershner Date: Wed Sep 27 13:14:08 2017 -0400 staging: unisys: visorbus: clean up parser_string_get function The function parser_string_get was writing its own strnlen function, use the kernel version instead. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) commit 3f5a562b1e41140f439112f1a6e6aaf32eb19c12 Author: David Kershner Date: Wed Sep 27 13:14:07 2017 -0400 staging: unisys: visorbus: don't need local variable cmd The local variable cmd was just being used to dereference a field inside of it. Get rid of the variable and just derefernce the parameter being passed in. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 977980ac59637f34228629658c05cb1aeb7eba60 Author: David Kershner Date: Wed Sep 27 13:14:06 2017 -0400 staging: unisys: visorbus: simplify commenting in controlvm_init During the process of udpating the features bits, put a block comment for all updates instead of a separate comment for each one. Signed-off-by: David Kershner Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman drivers/staging/unisys/visorbus/visorchipset.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 39208aa7ecb7d9c4e86df782b5693270313cbab1 Author: Kees Cook Date: Sat Sep 2 13:09:46 2017 -0700 locking/refcounts, x86/asm: Enable CONFIG_ARCH_HAS_REFCOUNT With the section inlining bug fixed for the x86 refcount protection, we can turn the config back on. Signed-off-by: Kees Cook Cc: Ard Biesheuvel Cc: Elena Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch Link: http://lkml.kernel.org/r/1504382986-49301-3-git-send-email-keescook@chromium.org Signed-off-by: Ingo Molnar arch/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 564c9cc84e2adf8a6671c1937f0a9fe3da2a4b0e Author: Kees Cook Date: Sat Sep 2 13:09:45 2017 -0700 locking/refcounts, x86/asm: Use unique .text section for refcount exceptions Using .text.unlikely for refcount exceptions isn't safe because gcc may move entire functions into .text.unlikely (e.g. in6_dev_dev()), which would cause any uses of a protected refcount_t function to stay inline with the function, triggering the protection unconditionally: .section .text.unlikely,"ax",@progbits .type in6_dev_get, @function in6_dev_getx: .LFB4673: .loc 2 4128 0 .cfi_startproc ... lock; incl 480(%rbx) js 111f .pushsection .text.unlikely 111: lea 480(%rbx), %rcx 112: .byte 0x0f, 0xff .popsection 113: This creates a unique .text..refcount section and adds an additional test to the exception handler to WARN in the case of having none of OF, SF, nor ZF set so we can see things like this more easily in the future. The double dot for the section name keeps it out of the TEXT_MAIN macro namespace, to avoid collisions and so it can be put at the end with text.unlikely to keep the cold code together. See commit: cb87481ee89db ("kbuild: linker script do not match C names unless LD_DEAD_CODE_DATA_ELIMINATION is configured") ... which matches C names: [a-zA-Z0-9_] but not ".". Reported-by: Mike Galbraith Signed-off-by: Kees Cook Cc: Ard Biesheuvel Cc: Elena Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arch Fixes: 7a46ec0e2f48 ("locking/refcounts, x86/asm: Implement fast refcount overflow protection") Link: http://lkml.kernel.org/r/1504382986-49301-2-git-send-email-keescook@chromium.org Signed-off-by: Ingo Molnar arch/x86/include/asm/refcount.h | 2 +- arch/x86/mm/extable.c | 7 ++++++- include/asm-generic/vmlinux.lds.h | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) commit 30c23f29d2d5e3ce8e24f7dec550b7e15142aaef Author: Miguel Bernal Marin Date: Mon Sep 25 18:03:49 2017 -0500 locking/x86: Use named operands in rwsem.h Since GCC version 3.1 it is possible to specify input and output operands using symbolic names, which can be referenced within the assembler code. Converting to named operands makes it easier to understand and maintain the code in the future. Update operands in asm/rwsem.h accordingly. Signed-off-by: Miguel Bernal Marin 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/20170925230349.18834-1-miguel.bernal.marin@linux.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/rwsem.h | 53 ++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 26 deletions(-) commit 2704fbb672d0d9a19414907fda7949283dcef6a1 Author: Josh Poimboeuf Date: Mon Sep 18 21:43:37 2017 -0500 x86/head: Add unwind hint annotations Jiri Slaby reported an ORC issue when unwinding from an idle task. The stack was: ffffffff811083c2 do_idle+0x142/0x1e0 ffffffff8110861d cpu_startup_entry+0x5d/0x60 ffffffff82715f58 start_kernel+0x3ff/0x407 ffffffff827153e8 x86_64_start_kernel+0x14e/0x15d ffffffff810001bf secondary_startup_64+0x9f/0xa0 The ORC unwinder errored out at secondary_startup_64 because the head code isn't annotated yet so there wasn't a corresponding ORC entry. Fix that and any other head-related unwinding issues by adding unwind hints to the head code. Reported-by: Jiri Slaby Tested-by: Jiri Slaby Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/78ef000a2f68f545d6eef44ee912edceaad82ccf.1505764066.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/Makefile | 1 - arch/x86/kernel/head_64.S | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) commit abbe1cac6214d81d2f4e149aba64a8760703144e Author: Josh Poimboeuf Date: Mon Sep 18 21:43:36 2017 -0500 x86/xen: Add unwind hint annotations Add unwind hint annotations to the xen head code so the ORC unwinder can read head_64.o. hypercall_page needs empty annotations at 32-byte intervals to match the 'xen_hypercall_*' ELF functions at those locations. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Jiri Slaby Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/70ed2eb516fe9266be766d953f93c2571bca88cc.1505764066.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/xen/xen-head.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2582d3df95c76d3b686453baf90b64d57e87d1e8 Author: Josh Poimboeuf Date: Mon Sep 18 21:43:35 2017 -0500 x86/xen: Fix xen head ELF annotations Mark the ends of the startup_xen and hypercall_page code sections. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Jiri Slaby Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/3a80a394d30af43d9cefa1a29628c45ed8420c97.1505764066.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/xen/xen-head.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e93db75a0054b23a874a12c63376753544f3fe9e Author: Josh Poimboeuf Date: Mon Sep 18 21:43:34 2017 -0500 x86/boot: Annotate verify_cpu() as a callable function verify_cpu() is a callable function. Annotate it as such. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Jiri Slaby Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/293024b8a080832075312f38c07ccc970fc70292.1505764066.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/verify_cpu.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 015a2ea5478680fc5216d56b7ff306f2a74efaf9 Author: Josh Poimboeuf Date: Mon Sep 18 21:43:33 2017 -0500 x86/head: Fix head ELF function annotations These functions aren't callable C-type functions, so don't annotate them as such. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Jiri Slaby Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/36eb182738c28514f8bf95e403d89b6413a88883.1505764066.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/head_64.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a8b88e84d124bc92c4808e72b8b8c0e0bb538630 Author: Josh Poimboeuf Date: Mon Sep 18 21:43:32 2017 -0500 x86/head: Remove unused 'bad_address' code It's no longer possible for this code to be executed, so remove it. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Jiri Slaby Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/32a46fe92d2083700599b36872b26e7dfd7b7965.1505764066.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/head_64.S | 3 --- 1 file changed, 3 deletions(-) commit 17270717e80de33a884ad328fea5f407d87f6d6a Author: Josh Poimboeuf Date: Mon Sep 18 21:43:31 2017 -0500 x86/head: Remove confusing comment This comment is actively wrong and confusing. It refers to the registers' stack offsets after the pt_regs has been constructed on the stack, but this code is *before* that. At this point the stack just has the standard iret frame, for which no comment should be needed. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Jiri Slaby Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/a3c267b770fc56c9b86df9c11c552848248aace2.1505764066.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/kernel/head_64.S | 4 ---- 1 file changed, 4 deletions(-) commit 00d96180dc38ef872ac471c2d3e14b067cbd895d Author: Josh Poimboeuf Date: Mon Sep 18 21:43:30 2017 -0500 objtool: Don't report end of section error after an empty unwind hint If asm code specifies an UNWIND_HINT_EMPTY hint, don't warn if the section ends unexpectedly. This can happen with the xen-head.S code because the hypercall_page is "text" but it's all zeros. Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Boris Ostrovsky Cc: Jiri Slaby Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/ddafe199dd8797e40e3c2777373347eba1d65572.1505764066.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/check.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a19b2e3d783964d48d2b494439648e929bcdc976 Author: Masami Hiramatsu Date: Tue Sep 19 19:02:20 2017 +0900 kprobes/x86: Remove IRQ disabling from ftrace-based/optimized kprobes Kkprobes don't need to disable IRQs if they are called from the ftrace/jump trampoline code, because Documentation/kprobes.txt says: ----- Probe handlers are run with preemption disabled. Depending on the architecture and optimization state, handlers may also run with interrupts disabled (e.g., kretprobe handlers and optimized kprobe handlers run without interrupt disabled on x86/x86-64). ----- So let's remove IRQ disabling from those handlers. Signed-off-by: Masami Hiramatsu Cc: Alexei Starovoitov Cc: Alexei Starovoitov Cc: Ananth N Mavinakayanahalli Cc: Linus Torvalds Cc: Paul E . McKenney Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/150581534039.32348.11331736206004264553.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/ftrace.c | 9 ++------- arch/x86/kernel/kprobes/opt.c | 4 ---- 2 files changed, 2 insertions(+), 11 deletions(-) commit 5bb4fc2d8641219732eb2bb654206775a4219aca Author: Masami Hiramatsu Date: Tue Sep 19 19:01:40 2017 +0900 kprobes/x86: Disable preemption in ftrace-based jprobes Disable preemption in ftrace-based jprobe handlers as described in Documentation/kprobes.txt: "Probe handlers are run with preemption disabled." This will fix jprobes behavior when CONFIG_PREEMPT=y. Signed-off-by: Masami Hiramatsu Cc: Alexei Starovoitov Cc: Alexei Starovoitov Cc: Ananth N Mavinakayanahalli Cc: Linus Torvalds Cc: Paul E . McKenney Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/150581530024.32348.9863783558598926771.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/ftrace.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit 9a09f261a4fa52de916b0db34a36956c95f78fdc Author: Masami Hiramatsu Date: Tue Sep 19 19:00:59 2017 +0900 kprobes/x86: Disable preemption in optprobe Disable preemption in optprobe handler as described in Documentation/kprobes.txt, which says: "Probe handlers are run with preemption disabled." Signed-off-by: Masami Hiramatsu Cc: Alexei Starovoitov Cc: Alexei Starovoitov Cc: Ananth N Mavinakayanahalli Cc: Linus Torvalds Cc: Paul E . McKenney Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/150581525942.32348.6359217983269060829.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/opt.c | 2 ++ 1 file changed, 2 insertions(+) commit e863d5396146411b615231cae0c518cb2a23371c Author: Masami Hiramatsu Date: Tue Sep 19 19:00:19 2017 +0900 kprobes: Warn if optprobe handler tries to change execution path Warn if optprobe handler tries to change execution path. As described in Documentation/kprobes.txt, with optprobe user handler can not change instruction pointer. In that case user must avoid optimizing the kprobes by setting post_handler or break_handler. Signed-off-by: Masami Hiramatsu Cc: Alexei Starovoitov Cc: Alexei Starovoitov Cc: Ananth N Mavinakayanahalli Cc: Linus Torvalds Cc: Paul E . McKenney Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/150581521955.32348.3615624715034787365.stgit@devbox Signed-off-by: Ingo Molnar kernel/kprobes.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cd52edad55fbcd8064877a77d31445b2fb4b85c3 Author: Masami Hiramatsu Date: Tue Sep 19 18:59:39 2017 +0900 kprobes/x86: Move the get_kprobe_ctlblk() into irq-disabled block Since get_kprobe_ctlblk() accesses per-cpu variables which calls smp_processor_id(), it must be called under preempt-disabled or irq-disabled. Signed-off-by: Masami Hiramatsu Cc: Alexei Starovoitov Cc: Alexei Starovoitov Cc: Ananth N Mavinakayanahalli Cc: Linus Torvalds Cc: Paul E . McKenney Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/150581517952.32348.2655896843219158446.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3539d09154e11336c31a900a9cd49e386ba6d9b2 Author: Masami Hiramatsu Date: Tue Sep 19 18:59:00 2017 +0900 kprobes: Improve smoke test to check preemptibility Add preemptible check to each handler. Handlers are called with non-preemtible, which is guaranteed by Documentation/kprobes.txt. Signed-off-by: Masami Hiramatsu Cc: Alexei Starovoitov Cc: Alexei Starovoitov Cc: Ananth N Mavinakayanahalli Cc: Linus Torvalds Cc: Paul E . McKenney Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/150581513991.32348.7956810394499654272.stgit@devbox Signed-off-by: Ingo Molnar kernel/test_kprobes.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit a8976fc84b644e3b567ea2bafad3b53b21ed6b6c Author: Masami Hiramatsu Date: Fri Aug 18 17:25:08 2017 +0900 kprobes/x86: Remove addressof() operators The following commit: 54a7d50b9205 ("x86: mark kprobe templates as character arrays, not single characters") changed optprobe_template_* to arrays, so we can remove the addressof() operators from those symbols. 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 Link: http://lkml.kernel.org/r/150304469798.17009.15886717935027472863.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/include/asm/kprobes.h | 4 ++-- arch/x86/kernel/kprobes/opt.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 63fef14fc98a8b4fad777fd3bef4d068802b3f14 Author: Masami Hiramatsu Date: Fri Aug 18 17:24:00 2017 +0900 kprobes/x86: Make insn buffer always ROX and use text_poke() Make insn buffer always ROX and use text_poke() to write the copied instructions instead of set_memory_*(). This makes instruction buffer stronger against other kernel subsystems because there is no window time to modify the buffer. Suggested-by: Ingo Molnar 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 Link: http://lkml.kernel.org/r/150304463032.17009.14195368040691676813.stgit@devbox Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/common.h | 6 ++-- arch/x86/kernel/kprobes/core.c | 61 ++++++++++++++++++++++++------------- arch/x86/kernel/kprobes/opt.c | 65 +++++++++++++++++++++++----------------- kernel/kprobes.c | 2 +- 4 files changed, 81 insertions(+), 53 deletions(-) commit 4f56186ec051033848a669f1b145162d1c53e854 Merge: aa469aa 9cd6681 Author: Ingo Molnar Date: Thu Sep 28 09:22:50 2017 +0200 Merge branch 'linus' into perf/core, to refresh the branch Signed-off-by: Ingo Molnar commit 03b8abedf4f4965e7e9e0d4f92877c42c07ce19f Author: Frederic Barrat Date: Sun Sep 3 20:15:13 2017 +0200 cxl: Enable global TLBIs for cxl contexts The PSL and nMMU need to see all TLB invalidations for the memory contexts used on the adapter. For the hash memory model, it is done by making all TLBIs global as soon as the cxl driver is in use. For radix, we need something similar, but we can refine and only convert to global the invalidations for contexts actually used by the device. The new mm_context_add_copro() API increments the 'active_cpus' count for the contexts attached to the cxl adapter. As soon as there's more than 1 active cpu, the TLBIs for the context become global. Active cpu count must be decremented when detaching to restore locality if possible and to avoid overflowing the counter. The hash memory model support is somewhat limited, as we can't decrement the active cpus count when mm_context_remove_copro() is called, because we can't flush the TLB for a mm on hash. So TLBIs remain global on hash. Signed-off-by: Frederic Barrat Fixes: f24be42aab37 ("cxl: Add psl9 specific code") Tested-by: Alistair Popple [mpe: Fold in updated comment on the barrier from Fred] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/mmu_context.h | 46 ++++++++++++++++++++++++++++++++++ arch/powerpc/mm/mmu_context.c | 9 ------- drivers/misc/cxl/api.c | 16 +++++++++--- drivers/misc/cxl/context.c | 3 +++ drivers/misc/cxl/file.c | 24 ++++++++++++++++-- 5 files changed, 84 insertions(+), 14 deletions(-) commit 6110236b9bbd177debc045c5fc29224444686ece Author: Frederic Barrat Date: Sun Sep 3 20:15:12 2017 +0200 powerpc/mm: Export flush_all_mm() With the optimizations introduced by commit a46cc7a90fd8 ("powerpc/mm/radix: Improve TLB/PWC flushes"), flush_tlb_mm() no longer flushes the page walk cache (PWC) with radix. This patch introduces flush_all_mm(), which flushes everything, TLB and PWC, for a given mm. Signed-off-by: Frederic Barrat Reviewed-By: Alistair Popple [mpe: Add a WARN_ON_ONCE() in the empty hash routines] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/tlbflush-hash.h | 22 ++++++++++++++++++++++ .../powerpc/include/asm/book3s/64/tlbflush-radix.h | 3 +++ arch/powerpc/include/asm/book3s/64/tlbflush.h | 15 +++++++++++++++ arch/powerpc/mm/tlb-radix.c | 6 ++++-- 4 files changed, 44 insertions(+), 2 deletions(-) commit 7031a219f649d12acda8a70a4b6b816ee123c8e2 Author: Fabrizio Castro Date: Wed Sep 27 10:57:04 2017 +0100 ARM: dts: r8a7743: Add MSIOF[012] support Add the DT nodes needed by MSIOF[012] interfaces to the SoC dtsi. Also, define aliases for spi[123]. Signed-off-by: Fabrizio Castro Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit e527649c320062f53d8437d1a49b3ed4fccf7750 Author: Fabrizio Castro Date: Wed Sep 27 10:57:05 2017 +0100 ARM: dts: r8a7745: Add MSIOF[012] support Add the DT nodes needed by MSIOF[012] interfaces to the SoC dtsi. Also, define aliases for spi[123]. Signed-off-by: Fabrizio Castro Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit 23198ddffb6cddb5d5824230af4dd4b46e4046a4 Author: David S. Miller Date: Wed Sep 27 22:38:19 2017 -0700 sparc32: Add cmpxchg64(). This fixes the build with i40e driver enabled. Reported-by: Guenter Roeck Signed-off-by: David S. Miller arch/sparc/include/asm/cmpxchg_32.h | 3 +++ arch/sparc/lib/atomic32.c | 14 ++++++++++++++ 2 files changed, 17 insertions(+) commit eb3b7b848fb3dd00f7a57d633d4ae4d194aa7865 Author: Martin Schwidefsky Date: Fri Mar 24 17:32:23 2017 +0100 s390/rwlock: introduce rwlock wait queueing Like the common queued rwlock code the s390 implementation uses the queued spinlock code on a spinlock_t embedded in the rwlock_t to achieve the queueing. The encoding of the rwlock_t differs though, the counter field in the rwlock_t is split into two parts. The upper two bytes hold the write bit and the write wait counter, the lower two bytes hold the read counter. The arch_read_lock operation works exactly like the common qrwlock but the enqueue operation for a writer follows a diffent logic. After the failed inline try to get the rwlock in write, the writer first increases the write wait counter, acquires the wait spin_lock for the queueing, and then loops until there are no readers and the write bit is zero. Without the write wait counter a CPU that just released the rwlock could immediately reacquire the lock in the inline code, bypassing all outstanding read and write waiters. For s390 this would cause massive imbalances in favour of writers in case of a contended rwlock. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/atomic_ops.h | 32 +++++--- arch/s390/include/asm/spinlock.h | 142 +++++---------------------------- arch/s390/include/asm/spinlock_types.h | 4 +- arch/s390/lib/spinlock.c | 138 +++++++------------------------- 4 files changed, 72 insertions(+), 244 deletions(-) commit b96f7d881ad94203e997cd2aa7112d4a06d121ef Author: Martin Schwidefsky Date: Fri Mar 24 17:25:02 2017 +0100 s390/spinlock: introduce spinlock wait queueing The queued spinlock code for s390 follows the principles of the common code qspinlock implementation but with a few notable differences. The format of the spinlock_t locking word differs, s390 needs to store the logical CPU number of the lock holder in the spinlock_t to be able to use the diagnose 9c directed yield hypervisor call. The inline code sequences for spin_lock and spin_unlock are nice and short. The inline portion of a spin_lock now typically looks like this: lhi %r0,0 # 0 indicates an empty lock l %r1,0x3a0 # CPU number + 1 from lowcore cs %r0,%r1, # lock operation jnz call_wait # on failure call wait function locked: ... call_wait: la %r2, brasl %r14,arch_spin_lock_wait j locked A spin_unlock is as simple as before: lhi %r0,0 sth %r0,2(%r2) # unlock operation After a CPU has queued itself it may not enable interrupts again for the arch_spin_lock_flags() variant. The arch_spin_lock_wait_flags wait function is removed. To improve performance the code implements opportunistic lock stealing. If the wait function finds a spinlock_t that indicates that the lock is free but there are queued waiters, the CPU may steal the lock up to three times without queueing itself. The lock stealing update the steal counter in the lock word to prevent more than 3 steals. The counter is reset at the time the CPU next in the queue successfully takes the lock. While the queued spinlocks improve performance in a system with dedicated CPUs, in a virtualized environment with continuously overcommitted CPUs the queued spinlocks can have a negative effect on performance. This is due to the fact that a queued CPU that is preempted by the hypervisor will block the queue at some point even without holding the lock. With the classic spinlock it does not matter if a CPU is preempted that waits for the lock. Therefore use the queued spinlock code only if the system runs with dedicated CPUs and fall back to classic spinlocks when running with shared CPUs. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/lowcore.h | 5 +- arch/s390/include/asm/spinlock.h | 18 ++-- arch/s390/kernel/setup.c | 2 + arch/s390/kernel/smp.c | 4 + arch/s390/lib/spinlock.c | 194 +++++++++++++++++++++++++++++++++------ 5 files changed, 180 insertions(+), 43 deletions(-) commit 8153380379ecc8381f6d55f6497de31a36c75aa5 Author: Martin Schwidefsky Date: Sun Dec 4 14:36:04 2016 +0100 s390/spinlock: use the cpu number +1 as spinlock value The queued spinlock code will come out simpler if the encoding of the CPU that holds the spinlock is (cpu+1) instead of (~cpu). Signed-off-by: Martin Schwidefsky arch/s390/include/asm/spinlock.h | 2 +- arch/s390/lib/spinlock.c | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) commit 1887aa07b6765d345dd79f26017aa2d15d49d7af Author: Martin Schwidefsky Date: Fri Sep 22 14:17:41 2017 +0200 s390/topology: add detection of dedicated vs shared CPUs The topology information returned by STSI 15.x.x contains a flag if the CPUs of a topology-list are dedicated or shared. Make this information available if the machine provides topology information. Signed-off-by: Martin Schwidefsky arch/s390/include/asm/processor.h | 2 ++ arch/s390/include/asm/sysinfo.h | 3 ++- arch/s390/include/asm/topology.h | 2 ++ arch/s390/kernel/smp.c | 10 +++++++-- arch/s390/kernel/topology.c | 43 ++++++++++++++++++++++++++++++++++++++- 5 files changed, 56 insertions(+), 4 deletions(-) commit 8179c7ba109a8eca5fdc214d695ef009ee2fa9cb Author: Himanshu Jha Date: Sun Sep 24 17:30:14 2017 +0530 s390/sclp: Use setup_timer and mod_timer Use setup_timer and mod_timer API instead of structure assignments. This is done using Coccinelle and semantic patch used for this as follows: @@ expression x,y,z,a,b; @@ -init_timer (&x); +setup_timer (&x, y, z); +mod_timer (&a, b); -x.function = y; -x.data = z; -x.expires = b; -add_timer(&a); Signed-off-by: Himanshu Jha Signed-off-by: Martin Schwidefsky drivers/s390/char/sclp_con.c | 7 ++----- drivers/s390/char/sclp_tty.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) commit 19220999790a5a67bf954f19e9115c68e889cd11 Author: Heiko Carstens Date: Thu Sep 21 14:43:10 2017 +0200 s390/cpumf: remove superfluous nr_cpumask_bits check Paul Burton reported that the nr_cpumask_bits check within cpumsf_pmu_event_init() is not necessary. Actually there is already a prior check within perf_event_alloc(). Therefore remove the check. Reported-by: Paul Burton Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_cpum_sf.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 76b3138192e6ffec334269b1426fd0d100ba962b Author: Harald Freudenberger Date: Tue Sep 12 07:04:26 2017 +0200 s390/zcrypt: Explicitly check input data length. The function to prepare MEX type 50 ap messages did not explicitly check for the data length in case of data > 512 bytes. Instead the function assumes the boundary check done in the ioctl function will always reject requests with invalid data length values. However, screening just the function code may give the illusion, that there may be a gap which could be exploited by userspace for buffer overwrite attacks. Signed-off-by: Harald Freudenberger Signed-off-by: Martin Schwidefsky drivers/s390/crypto/zcrypt_msgtype50.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 08c6df97d65a1cb24393d2051bf12ab05f8d7fb6 Author: Sebastian Ott Date: Tue Sep 12 11:21:00 2017 +0200 s390/cmf: use tod_to_ns() Instead of open coding tod clock to ns conversions use the timex helper. Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/cmf.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit cb09b356cd43fb079ea85128dcd17e5b65585fe8 Author: Sebastian Ott Date: Fri Sep 8 21:01:38 2017 +0200 s390/cmf: avg_utilization All (but one) cmf related sysfs attributes have been converted to read directly from the measurement block using cmf_read. This is not possible for the avg_utilization attribute since this is an aggregation of several values for which cmf_read only returns average values. Move the computation of the utilization value to the cmf_read interface such that it can use the raw data. Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/cmf.c | 58 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 23 deletions(-) commit d4d287e81ff1924f0791fad0638551daec7742b5 Author: Sebastian Ott Date: Thu Sep 7 13:18:40 2017 +0200 s390/cmf: read from hw buffer To ensure data consistency when reading from the channel measurement block we wait for the subchannel to become idle and copy the whole block. This is unnecessary when all we do is export the individual values via sysfs. Read the values for sysfs export directly from the measurement block. Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/cmf.c | 45 ++++++++++++++------------------------------- 1 file changed, 14 insertions(+), 31 deletions(-) commit 81b050b564b814585e1515b218783c8ad56913f1 Author: Sebastian Ott Date: Wed Sep 6 10:44:23 2017 +0200 s390/cmf: simplify copy_block cmf_copy_block tries to ensure data consistency by copying the channel measurement block twice and comparing the data. This was needed on very old machines only. Nowadays we guarantee consistency by copying the data when the channel is idle. Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/cmf.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) commit 60f3eac3a1dc127541817af8042b6711e63dc6e1 Author: Sebastian Ott Date: Wed Sep 6 19:05:29 2017 +0200 s390/cmf: simplify cmb_copy_wait No need for refcounting - the data can be on stack. Also change the locking in this function to only use spin_lock_irq (the function waits, thus it's never called from IRQ context). Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/cmf.c | 72 ++++++++++++++++---------------------------------- 1 file changed, 23 insertions(+), 49 deletions(-) commit eeec1e435fd0195287ee3224c3837b3d71dedc74 Author: Sebastian Ott Date: Wed Sep 6 13:43:20 2017 +0200 s390/cmf: simplify set_schib_wait No need for refcounting - the data can be on stack. Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/cmf.c | 70 +++++++++++++++++--------------------------------- 1 file changed, 23 insertions(+), 47 deletions(-) commit adc69b4d76ee8a7065c7c637584b39ace265ffab Author: Sebastian Ott Date: Tue Sep 5 14:22:48 2017 +0200 s390/cmf: set_schib_wait add timeout When enabling channel measurement fails with a busy condition we wait for the next interrupt to arrive before we retry the operation. For devices which usually don't create interrupts we wait forever. Although the waiting is done interruptible that behavior is not expected and confused some users. Abort the operation after a 10s timeout. Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky drivers/s390/cio/cmf.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit b08e19defc10befc50af09771ff0b086f2a72138 Author: Jean Delvare Date: Mon Sep 18 11:13:13 2017 +0200 s390/char: fix cdev_add usage Function cdev_add does set cdev->dev, so there is no point in setting it prior to calling this function. Signed-off-by: Jean Delvare Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky drivers/s390/char/tape_class.c | 3 +-- drivers/s390/char/vmlogrdr.c | 3 +-- drivers/s390/char/vmur.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) commit e16c5dd5157efeddaad7492b920192fea0e7e4ec Author: Johannes Thumshirn Date: Thu Sep 14 14:11:15 2017 +0200 samples/kprobes: Add s390 case in kprobe example module Add info prints in sample kprobe handlers for S/390 Signed-off-by: Johannes Thumshirn Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky samples/kprobes/kprobe_example.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 262832bc5acda76fd8f901d39f4da1121d951222 Author: Alice Frosi Date: Thu Sep 14 12:36:03 2017 +0200 s390/ptrace: add runtime instrumention register get/set Add runtime instrumention register get and set which allows to read and modify the runtime instrumention control block. Signed-off-by: Alice Frosi Signed-off-by: Martin Schwidefsky arch/s390/kernel/ptrace.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++ include/uapi/linux/elf.h | 1 + 2 files changed, 110 insertions(+) commit bb59c2da3fb4ecc83258ca6b2ecde70d80c33465 Author: Alice Frosi Date: Thu Sep 14 12:35:45 2017 +0200 s390/runtime_instrumentation: clean up struct runtime_instr_cb Update runtime_instr_cb structure to be consistent with the runtime instrumentation documentation. Signed-off-by: Alice Frosi Signed-off-by: Martin Schwidefsky arch/s390/include/asm/runtime_instr.h | 82 +++++++++++++++++------------------ arch/s390/kernel/runtime_instr.c | 12 ++--- arch/s390/kvm/kvm-s390.c | 2 +- 3 files changed, 48 insertions(+), 48 deletions(-) commit 79962038dffab28094782406d8e27b095a26ce51 Author: Heiko Carstens Date: Tue Sep 12 13:49:57 2017 +0200 s390: add support for FORTIFY_SOURCE This is the quite trivial backend for s390 which is required to enable FORTIFY_SOURCE support. See commit 6974f0c4555e ("include/linux/string.h: add the option of fortified string.h functions") for more details. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 1 + arch/s390/boot/compressed/Makefile | 2 +- arch/s390/include/asm/string.h | 2 +- arch/s390/kernel/Makefile | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) commit 59a19ea9a0b3b0ee69887b6a5015aee3a3c7e527 Author: Heiko Carstens Date: Mon Sep 11 11:24:23 2017 +0200 s390: get rid of exit_thread() exit_thread() is empty now. Therefore remove it and get rid of a pointless branch. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/Kconfig | 1 - arch/s390/kernel/process.c | 7 ------- 2 files changed, 8 deletions(-) commit 7b83c6297d2fc7350997e86188df84c27fd59530 Author: Heiko Carstens Date: Mon Sep 11 11:24:23 2017 +0200 s390/guarded storage: simplify task exit handling Free data structures required for guarded storage from arch_release_task_struct(). This allows to simplify the code a bit, and also makes the semantics a bit easier: arch_release_task_struct() is never called from the task that is being removed. In addition this allows to get rid of exit_thread() in a later patch. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/processor.h | 4 ++-- arch/s390/kernel/guarded_storage.c | 9 +++------ arch/s390/kernel/process.c | 3 +-- 3 files changed, 6 insertions(+), 10 deletions(-) commit 5ef2d5231d547c672c67bdf84c13a4adaf477964 Author: Heiko Carstens Date: Mon Sep 11 11:24:23 2017 +0200 s390/ptrace: fix guarded storage regset handling If the guarded storage regset for current is supposed to be changed, the regset from user space is copied directly into the guarded storage control block. If then the process gets scheduled away while the control block is being copied and before the new control block has been loaded, the result is random: the process can be scheduled away due to a page fault or preemption. If that happens the already copied parts will be overwritten by save_gs_cb(), called from switch_to(). Avoid this by copying the data to a temporary buffer on the stack and do the actual update with preemption disabled. Fixes: f5bbd7219891 ("s390/ptrace: guarded storage regset for the current task") Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/ptrace.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit fa1edf3f63c05ca8eacafcd7048ed91e5360f1a8 Author: Heiko Carstens Date: Mon Sep 11 11:24:22 2017 +0200 s390/guarded storage: fix possible memory corruption For PREEMPT enabled kernels the guarded storage (GS) code contains a possible use-after-free bug. If a task that makes use of GS exits, it will execute do_exit() while still enabled for preemption. That function will call exit_thread_runtime_instr() via exit_thread(). If exit_thread_gs() gets preempted after the GS control block of the task has been freed but before the pointer to it is set to NULL, then save_gs_cb(), called from switch_to(), will write to already freed memory. Avoid this and simply disable preemption while freeing the control block and setting the pointer to NULL. Fixes: 916cda1aa1b4 ("s390: add a system call for guarded storage") Cc: # v4.12+ Reviewed-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/guarded_storage.c | 2 ++ 1 file changed, 2 insertions(+) commit 8d9047f8b967ce6181fd824ae922978e1b055cc0 Author: Heiko Carstens Date: Mon Sep 11 11:24:22 2017 +0200 s390/runtime instrumentation: simplify task exit handling Free data structures required for runtime instrumentation from arch_release_task_struct(). This allows to simplify the code a bit, and also makes the semantics a bit easier: arch_release_task_struct() is never called from the task that is being removed. In addition this allows to get rid of exit_thread() in a later patch. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/runtime_instr.h | 4 +++- arch/s390/kernel/process.c | 5 ++--- arch/s390/kernel/runtime_instr.c | 30 +++++++++++++++--------------- 3 files changed, 20 insertions(+), 19 deletions(-) commit d6e646ad7cfa7034d280459b2b2546288f247144 Author: Heiko Carstens Date: Mon Sep 11 11:24:22 2017 +0200 s390/runtime instrumention: fix possible memory corruption For PREEMPT enabled kernels the runtime instrumentation (RI) code contains a possible use-after-free bug. If a task that makes use of RI exits, it will execute do_exit() while still enabled for preemption. That function will call exit_thread_runtime_instr() via exit_thread(). If exit_thread_runtime_instr() gets preempted after the RI control block of the task has been freed but before the pointer to it is set to NULL, then save_ri_cb(), called from switch_to(), will write to already freed memory. Avoid this and simply disable preemption while freeing the control block and setting the pointer to NULL. Fixes: e4b8b3f33fca ("s390: add support for runtime instrumentation") Cc: # v3.7+ Reviewed-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/runtime_instr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8076428f0c9f24d90270204fd39ccb11b83db71d Author: Heiko Carstens Date: Mon Sep 11 11:24:22 2017 +0200 s390: convert release_thread() into a static inline function release_thread() is an empty function that gets called on every task exit. Move the function to a header file and force inlining of it, so that the compiler can optimize it away instead of generating a pointless function call. Acked-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/processor.h | 2 +- arch/s390/kernel/process.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) commit da61e7308df868c20a41861c0a11f6eefd822993 Author: Corentin Labbe Date: Mon Sep 18 20:10:36 2017 +0200 sbus: char: Move D7S_MINOR to include/linux/miscdevice.h This patch move the define for D7S_MINOR to include/linux/miscdevice.h. It's better that all minor number are in the same place. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller drivers/sbus/char/display7seg.c | 1 - include/linux/miscdevice.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit 92c807067e9ade7d41f453befe560a362e95be7f Author: Corentin Labbe Date: Mon Sep 18 19:58:21 2017 +0200 sparc: time: Remove unneeded linux/miscdevice.h include arch/sparc/kernel/time_64.c does not contain any miscdevice so the inclusion of linux/miscdevice.h is unnecessary. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller arch/sparc/kernel/time_64.c | 1 - 1 file changed, 1 deletion(-) commit 01c3f0a42a2a0ff0c3fed80a1a25f2641ae72554 Author: Guenter Roeck Date: Sun Sep 10 13:44:47 2017 -0700 sparc64: mmu_context: Add missing include files Fix the following build errors. In file included from arch/sparc/include/asm/mmu_context.h:4:0, from include/linux/mmu_context.h:4, from drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h:29, from drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:23: arch/sparc/include/asm/mmu_context_64.h:22:37: error: unknown type name 'per_cpu_secondary_mm' arch/sparc/include/asm/mmu_context_64.h: In function 'switch_mm': arch/sparc/include/asm/mmu_context_64.h:79:2: error: implicit declaration of function 'smp_processor_id' Fixes: 70539bd79500 ("drm/amd: Update MEC HQD loading code for KFD") Signed-off-by: Guenter Roeck Acked-by: Oded Gabbay Signed-off-by: David S. Miller arch/sparc/include/asm/mmu_context_64.h | 2 ++ 1 file changed, 2 insertions(+) commit 7dad16913b765f2e3ab0cd54b2c4a2f3a5e83e95 Author: Colin Ian King Date: Tue Sep 26 20:17:50 2017 +0100 scsi: libsas: remove unused variable sas_ha Remove unused variable sas_ha to clean up build warning "unused variable sas_ha [-Wunused-variable]" Fixes: 042ebd293b86 ("scsi: libsas: kill useless ha_event and do some cleanup") Signed-off-by: Colin Ian King Acked-by: John Garry Signed-off-by: Martin K. Petersen drivers/scsi/hisi_sas/hisi_sas_main.c | 1 - 1 file changed, 1 deletion(-) commit 83dc7e3dea76b77b6bcc289eb86c5b5c145e8dff Author: kehuanlin Date: Wed Sep 6 17:58:39 2017 +0800 scsi: ufs: fix wrong command type of UTRD for UFSHCI v2.1 Since the command type of UTRD in UFS 2.1 specification is the same with UFS 2.0. And it assumes the future UFS specification will follow the same definition. Signed-off-by: kehuanlin Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 3d21fbdedc8b0a6a73528bc6fd2850fdc1e93031 Author: Huanlin Ke Date: Fri Sep 22 18:31:47 2017 +0800 scsi: ufs: continue to boot even with Boot LUN is disabled Several configurable fields of the Device Descriptor and the Unit Descriptors determine the Boot LUN status. The bBootEnable field and the bBootLunEn attribute is set to zero by default, so the Boot LUN is disabled by default. At which point the scsi device add for Boot LUN will fail, but we can continue to use the ufs device in fact. This failure shouldn't abort the device boot. Signed-off-by: Huanlin Ke Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) commit 090171885f505ea6814ad6459e9982bb4444c245 Author: Zang Leigang Date: Wed Sep 27 10:06:06 2017 +0800 scsi: ufs: add ufs a command complete time stamp Signed-off-by: Zang Leigang Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 5 +++++ drivers/scsi/ufs/ufshcd.h | 2 ++ 2 files changed, 7 insertions(+) commit 479da360570ac7195cbcd89c6a9d6360ae8fe8e1 Author: Zang Leigang Date: Tue Sep 19 16:50:30 2017 +0800 scsi: ufs: fix a pclint warning Signed-off-by: Zang Leigang Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1cb31d3fd4d96b19624328da0a0496adf76f98a6 Author: Rafael J. Wysocki Date: Mon Sep 25 01:33:13 2017 +0200 PCI / PM: Do not resume any devices in pci_pm_prepare() It should not be necessary to resume devices with ignore_children set in pci_pm_prepare(), because they should be resumed explicitly by their children drivers during suspend if need be and they will be resumed by pci_pm_suspend() after that anyway, so avoid doing that. Signed-off-by: Rafael J. Wysocki Acked-by: Bjorn Helgaas Signed-off-by: Rafael J. Wysocki drivers/pci/pci-driver.c | 7 ------- 1 file changed, 7 deletions(-) commit f187851b9b4a76952b1158b86434563dd2031103 Author: Nicholas Piggin Date: Fri Sep 1 14:29:56 2017 +1000 cpuidle: fix broadcast control when broadcast can not be entered When failing to enter broadcast timer mode for an idle state that requires it, a new state is selected that does not require broadcast, but the broadcast variable remains set. This causes tick_broadcast_exit to be called despite not having entered broadcast mode. This causes the WARN_ON_ONCE(!irqs_disabled()) to trigger in some cases. It does not appear to cause problems for code today, but seems to violate the interface so should be fixed. Signed-off-by: Nicholas Piggin Reviewed-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle.c | 1 + 1 file changed, 1 insertion(+) commit 754270c7c56292e97d0eff924a5d5d83f92add07 Merge: 9afafdb 6f87a89 Author: Dave Airlie Date: Thu Sep 28 08:37:02 2017 +1000 Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next First feature pull for 4.15. Highlights: - Per VM BO support - Lots of powerplay cleanups - Powerplay support for CI - pasid mgr for kfd - interrupt infrastructure for recoverable page faults - SR-IOV fixes - initial GPU reset for vega10 - prime mmap support - ttm page table debugging improvements - lots of bug fixes * 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux: (232 commits) drm/amdgpu: clarify license in amdgpu_trace_points.c drm/amdgpu: Add gem_prime_mmap support drm/amd/powerplay: delete dead code in smumgr drm/amd/powerplay: delete SMUM_FIELD_MASK drm/amd/powerplay: delete SMUM_WAIT_INDIRECT_FIELD drm/amd/powerplay: delete SMUM_READ_FIELD drm/amd/powerplay: delete SMUM_SET_FIELD drm/amd/powerplay: delete SMUM_READ_VFPF_INDIRECT_FIELD drm/amd/powerplay: delete SMUM_WRITE_VFPF_INDIRECT_FIELD drm/amd/powerplay: delete SMUM_WRITE_FIELD drm/amd/powerplay: delete SMU_WRITE_INDIRECT_FIELD drm/amd/powerplay: move macros to hwmgr.h drm/amd/powerplay: move PHM_WAIT_VFPF_INDIRECT_FIELD to hwmgr.h drm/amd/powerplay: move SMUM_WAIT_VFPF_INDIRECT_FIELD_UNEQUAL to hwmgr.h drm/amd/powerplay: move SMUM_WAIT_INDIRECT_FIELD_UNEQUAL to hwmgr.h drm/amd/powerplay: add new helper functions in hwmgr.h drm/amd/powerplay: use SMU_IND_INDEX/DATA_11 pair drm/amd/powerplay: refine powerplay code. drm/amd/powerplay: delete dead code in hwmgr.h drm/amd/powerplay: refine interface in struct pp_smumgr_func ... commit 7b11e8989618581bc0226ad313264cdc05d48d86 Author: Mario Limonciello Date: Tue Sep 26 13:50:05 2017 -0500 platform/x86: wmi: Destroy on cleanup rather than unregister device_create documentation says to cleanup using device_destroy Signed-off-by: Mario Limonciello Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 303d1fcc0bf07129bc05a61632fad9f7064b671f Author: Mario Limonciello Date: Tue Sep 26 13:50:04 2017 -0500 platform/x86: wmi: Cleanup exit routine in reverse order of init The initialize routine is: * class -> bus -> platform The exit routine is: * platform -> class -> bus Fix the exit routine to be: * platform -> bus -> class Signed-off-by: Mario Limonciello Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b60ee4e0918db95a1e458ae160488368c45a0687 Author: Mario Limonciello Date: Tue Sep 26 13:50:03 2017 -0500 platform/x86: wmi: Sort include list The include list is randomly assembled right now. Sort in alphabetical order. Signed-off-by: Mario Limonciello Signed-off-by: Darren Hart (VMware) drivers/platform/x86/wmi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7b4dd21630afa835a907cd030fd4e2af6849c6a9 Author: Mario Limonciello Date: Tue Sep 26 13:50:02 2017 -0500 platform/x86: dell-smbios: Add pr_fmt definition to driver pr_fmt provides formatting to be used by the driver when displaying errors and messages. Signed-off-by: Mario Limonciello Reviewed-by: Pali Pohar Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-smbios.c | 1 + 1 file changed, 1 insertion(+) commit 9808f3628ce43fafbb6f8eb8d347f38ba9b275ba Author: Mario Limonciello Date: Tue Sep 26 13:50:01 2017 -0500 platform/x86: dell-wmi: Do not match on descriptor GUID modalias The descriptor GUID is not used to indicate that WMI notifications in the dell-wmi driver work properly. As such a modalias should not be present that causes this driver to load on systems with this GUID. Signed-off-by: Mario Limonciello Reviewed-by: Pali Pohar Signed-off-by: Darren Hart (VMware) drivers/platform/x86/dell-wmi.c | 1 - 1 file changed, 1 deletion(-) commit 70f8e9cc2362bbbd9ba482dcfa2245bd18c700ba Author: Linus Walleij Date: Tue Jan 10 13:43:37 2017 +0100 ARM: integrator: Delete the V3 PCI driver Before adding a proper PCI driver in drivers/pci/host, clean out the cruft by deleting the old driver from the machine. Signed-off-by: Linus Walleij arch/arm/mach-integrator/Makefile | 2 - arch/arm/mach-integrator/integrator_ap.c | 2 - arch/arm/mach-integrator/pci_v3.c | 900 ------------------------------- arch/arm/mach-integrator/pci_v3.h | 9 - 4 files changed, 913 deletions(-) commit 9afafdbfbf5e8fca4dabd817939b61f1e766e64c Merge: 29baa82 bb9d2d0 Author: Dave Airlie Date: Thu Sep 28 07:12:44 2017 +1000 Merge tag 'drm-intel-next-2017-09-07' of git://anongit.freedesktop.org/git/drm-intel into drm-next Getting started with v4.15 features: - Cannonlake workarounds (Rodrigo, Oscar) - Infoframe refactoring and fixes to enable infoframes for DP (Ville) - VBT definition updates (Jani) - Sparse warning fixes (Ville, Chris) - Crtc state usage fixes and cleanups (Ville) - DP vswing, pre-emph and buffer translation refactoring and fixes (Rodrigo) - Prevent IPS from interfering with CRC capture (Ville, Marta) - Enable Mesa to advertise ARB_timer_query (Nanley) - Refactor GT number into intel_device_info (Lionel) - Avoid eDP DP AUX CH timeouts harder (Manasi) - CDCLK check improvements (Ville) - Restore GPU clock boost on missed pageflip vblanks (Chris) - Fence register reservation API for vGPU (Changbin) - First batch of CCS fixes (Ville) - Finally, numerous GEM fixes, cleanups and improvements (Chris) * tag 'drm-intel-next-2017-09-07' of git://anongit.freedesktop.org/git/drm-intel: (100 commits) drm/i915: Update DRIVER_DATE to 20170907 drm/i915/cnl: WaThrottleEUPerfToAvoidTDBackPressure:cnl(pre-prod) drm/i915: Lift has-pinned-pages assert to caller of ____i915_gem_object_get_pages drm/i915: Display WA #1133 WaFbcSkipSegments:cnl, glk drm/i915/cnl: Allow the reg_read ioctl to read the RCS TIMESTAMP register drm/i915: Move device_info.has_snoop into the static tables drm/i915: Disable MI_STORE_DATA_IMM for i915g/i915gm drm/i915: Re-enable GTT following a device reset drm/i915/cnp: Wa 1181: Fix Backlight issue drm/i915: Annotate user relocs with __user drm/i915: Constify load detect mode drm/i915/perf: Remove __user from u64 in drm_i915_perf_oa_config drm/i915: Silence sparse by using gfp_t drm/i915: io unmap functions want __iomem drm/i915: Add __rcu to radix tree slot pointer drm/i915: Wake up the device for the fbdev setup drm/i915: Add interface to reserve fence registers for vGPU drm/i915: Use correct path to trace include drm/i915: Fix the missing PPAT cache attributes on CNL drm/i915: Fix enum pipe vs. enum transcoder for the PCH transcoder ... commit afd5d2f7af33fd4a57a68bca9e651ca7fd41263b Author: Linus Walleij Date: Fri Apr 21 13:47:34 2017 +0200 ARM: dts: Update Integrator/AP PCI v3 compatible To make a stand-alone PCI driver for the V3 Semiconductor PCI bridge, we need a proper compatible indicating that we are integrated on the Integrator/AP platform. Add this. Signed-off-by: Linus Walleij arch/arm/boot/dts/integratorap.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d3721efce22d1e91f190bddf7a959f8ce5129f9c Author: Linus Walleij Date: Fri Jul 14 15:20:29 2017 +0200 ARM: dts: integratorap: Fix PCI windows This fixes up several errors and additions in the PCIv3 ranges: - The I/O space is 64KB and translates from 61000000 to 00000000. - The non-prefetched and prefected memories are 1:1 mapped according to ARM DUI 0098A page 5-9 and should be like that in the device tree as well. - We also add the DMA ranges, in the manual these are described as "PCI to local bus windows" on page 5-12 ff. - Set the bus range to 0x00-0xff. Signed-off-by: Linus Walleij arch/arm/boot/dts/integratorap.dts | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 3a85543f35be59c41c685a64336149546564ef76 Author: Linus Walleij Date: Tue Jan 10 13:52:04 2017 +0100 ARM: dts: add the PCI clock to the device tree The PCIv3 driver needs to fetch this clock, so add it to the device tree. Signed-off-by: Linus Walleij arch/arm/boot/dts/integratorap.dts | 1 + 1 file changed, 1 insertion(+) commit 7a4533087ccbf736396bcbf816e0e45266c4313b Author: Corey Minyard Date: Tue Sep 12 22:46:29 2017 -0500 ipmi_si: Move hardcode handling to a separate file. Signed-off-by: Corey Minyard drivers/char/ipmi/Makefile | 2 +- drivers/char/ipmi/ipmi_si.h | 1 + drivers/char/ipmi/ipmi_si_hardcode.c | 146 +++++++++++++++++++++++++++++++++ drivers/char/ipmi/ipmi_si_intf.c | 152 ++--------------------------------- 4 files changed, 154 insertions(+), 147 deletions(-) commit 44814ec982d2905d50fe4d0cdaf693b76afe7f64 Author: Corey Minyard Date: Tue Sep 12 22:28:49 2017 -0500 ipmi_si: Move the hotmod handling to another file. Signed-off-by: Corey Minyard drivers/char/ipmi/Makefile | 3 +- drivers/char/ipmi/ipmi_si.h | 2 + drivers/char/ipmi/ipmi_si_hotmod.c | 242 ++++++++++++++++++++++++++++++++++ drivers/char/ipmi/ipmi_si_intf.c | 261 +++---------------------------------- 4 files changed, 264 insertions(+), 244 deletions(-) commit bb398a4cb09a0ed96cf0fc2e90012cf6bf13a824 Author: Corey Minyard Date: Tue Sep 12 21:37:02 2017 -0500 ipmi_si: Change ipmi_si_add_smi() to take just I/O info Instead of allocating the smi_info structure, filling in the I/O info, and passing it to ipmi_si_add_smi(), just pass the I/O info in the io structure and let ipmi_si_add_smi() allocate the smi_info structure. This required redoing the way the remove functions for some device interfaces worked, a new function named ipmi_si_remove_by_dev() allows the device to be passed in and detected instead of using driver data, which couldn't be filled out easily othersize. After this the platform handling should be decoupled from the smi_info structure and that handling can be pulled out to its own files. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si.h | 5 +- drivers/char/ipmi/ipmi_si_intf.c | 532 +++++++++++++++++---------------------- drivers/char/ipmi/ipmi_si_sm.h | 1 + 3 files changed, 229 insertions(+), 309 deletions(-) commit e1eeb7f8620733fe9f6640eef48d449b925b3c23 Author: Corey Minyard Date: Tue Sep 12 15:40:53 2017 -0500 ipmi_si: Move io setup into io structure Where it belongs, and getting ready for pulling the platform handling into its own file. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 173 ++++++++++++++++++--------------------- drivers/char/ipmi/ipmi_si_sm.h | 4 + 2 files changed, 85 insertions(+), 92 deletions(-) commit 4f3e8199c34dda46b6554191fe7a444dd6fa911f Author: Corey Minyard Date: Tue Sep 12 15:10:22 2017 -0500 ipmi_si: Move irq setup handling into the io struct So the platform code can do it without having to access the smi info, getting ready for pulling the platform handling section to their own files. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si.h | 5 ++ drivers/char/ipmi/ipmi_si_intf.c | 154 +++++++++++++++++++-------------------- drivers/char/ipmi/ipmi_si_sm.h | 4 + 3 files changed, 82 insertions(+), 81 deletions(-) commit 910840f24bb7f9ea80fce4073445329becfdcb58 Author: Corey Minyard Date: Tue Sep 12 14:41:56 2017 -0500 ipmi_si: Move some platform data into the io structure That's where it belongs, and we are getting ready for moving the platform handling out of the main ipmi_si_intf.c file. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 415 +++++++++++++++++++-------------------- drivers/char/ipmi/ipmi_si_sm.h | 14 ++ 2 files changed, 213 insertions(+), 216 deletions(-) commit 1e89a499e55f353115b1427c5bcb9f9244a20200 Author: Corey Minyard Date: Tue Sep 12 13:52:13 2017 -0500 ipmi_si: Rename function to add smi, make it global Getting ready for moving the platform-specific stuff into their own files. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si.h | 18 ++++++++++++++++++ drivers/char/ipmi/ipmi_si_intf.c | 26 ++++++++++---------------- 2 files changed, 28 insertions(+), 16 deletions(-) commit 3fd32f9ec84f57ff6d86e762012d7626a9b31124 Author: Corey Minyard Date: Fri Sep 1 19:34:33 2017 -0500 ipmi: Convert IPMI GUID over to Linux guid_t Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 50 +++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 27 deletions(-) commit 31b0b0730ad2a813bf6b01c5f1f3629c09c73466 Author: Corey Minyard Date: Wed Sep 6 08:23:31 2017 -0500 ipmi: Rescan channel list on BMC changes If the BMC changes versions or a change is otherwise detected, rescan the channels on the BMC. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 169 +++++++++++++++++++++++------------- 1 file changed, 111 insertions(+), 58 deletions(-) commit 5fdb1fb2abe6478e0b415fffa978c71d3f7cf3e4 Author: Corey Minyard Date: Tue Sep 5 15:50:12 2017 -0500 ipmi: Move lun and address out of channel struct Put it in it's own struct, getting ready for channel information being dynamically changed. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 47 ++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 22 deletions(-) commit c0734bd594d43a28afcbe476bbf0d35a5bbffa4c Author: Corey Minyard Date: Thu Aug 31 17:09:03 2017 -0500 ipmi: Retry BMC registration on a failure If the BMC fails to register, just set up to retry periodically. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit b2cfd8ab4add53c2070367bfee2f5b738f51698d Author: Corey Minyard Date: Fri Sep 1 16:32:40 2017 -0500 ipmi: Rework device id and guid handling to catch changing BMCs A BMC's guid or device id info may change dynamically, this could result in a different configuration that needs to be done. Adjust the BMCs dynamically. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 240 +++++++++++++++++++++++++----------- 1 file changed, 167 insertions(+), 73 deletions(-) commit c659ff34f6303077efd45de884c5cab734b29df5 Author: Corey Minyard Date: Fri Sep 1 15:34:10 2017 -0500 ipmi: Use a temporary BMC for an interface This is getting ready for the ability to redo the BMC if it's information changes, we need a fallback mechanism. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 28f26ac7a963901106b64307bc1c93068331a008 Author: Corey Minyard Date: Fri Sep 1 15:30:46 2017 -0500 ipmi: Dynamically fetch GUID periodically This will catch if the GUID changes. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 61 +++++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 19 deletions(-) commit 39d3fb456009d3619b90236cb8edf156932b1bd4 Author: Corey Minyard Date: Fri Sep 1 14:39:18 2017 -0500 ipmi: Always fetch the guid through ipmi_get_device_id() This is in preparation for making ipmi_get_device_id() dynamically return the guid and device id. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 93 ++++++++++++++++++++++++++----------- 1 file changed, 65 insertions(+), 28 deletions(-) commit 1e5058ea21010883b1e1d288637f7390bb8d1c61 Author: Corey Minyard Date: Thu Aug 31 16:45:40 2017 -0500 ipmi: Remove the device id from ipmi_register_smi() It's no longer used, dynamic device id handling is in place now. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 1 - drivers/char/ipmi/ipmi_powernv.c | 4 +--- drivers/char/ipmi/ipmi_si_intf.c | 1 - drivers/char/ipmi/ipmi_ssif.c | 19 ------------------- include/linux/ipmi_smi.h | 1 - 5 files changed, 1 insertion(+), 25 deletions(-) commit aa9c9ab2443e3b9562c6c7cfc245a9e43b557d14 Author: Jeremy Kerr Date: Fri Aug 25 15:47:24 2017 +0800 ipmi: allow dynamic BMC version information Currently, it's up to the IPMI SMIs to provide the product & version details of BMCs behind registered IPMI SMI interfaces. This device ID is provided on SMI regsitration, and kept around for all future queries. However, this version information isn't always static. For example, a BMC may be upgraded at runtime, making the old version information stale. This change allows querying the BMC device ID & version information dynamically. If no static device_id argument is provided to ipmi_register_smi, then the IPMI core code will perform a Get Device ID IPMI command to query the version information when needed. We keep a short-term cache of this information so we don't need to re-query for every attribute access. Signed-off-by: Jeremy Kerr I basically rewrote this, I fixed some locking issues and simplified things. Same functional change, though. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 205 +++++++++++++++++++++++++++++++++--- 1 file changed, 190 insertions(+), 15 deletions(-) commit 68e7e50f195f34d0d539282779cad073d999192b Author: Corey Minyard Date: Thu Sep 7 08:43:05 2017 -0500 ipmi: Don't use BMC product/dev ids in the BMC name There are a lot of bad things that a set of BMCs could do that would really confuse the IPMI driver; it's possible for BMCs with different GUIDs to have the same product/devid (though that's not technically legal), which would result in platform device namespace collisions. Fixing it would involve either using the GUID in the BMC name, which resulted in huge names, or just using an ida for numbering the BMCs. The latter approach was chosen to avoid the huge names. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 45 +++++++++---------------------------- 1 file changed, 10 insertions(+), 35 deletions(-) commit c468f911b73beb39b20f7e5f97a35d41f038b31b Author: Jeremy Kerr Date: Fri Aug 25 15:47:23 2017 +0800 ipmi: Make ipmi_demangle_device_id more generic Currently, ipmi_demagle_device_id requires a full response buffer in its data argument. This means we can't use it to parse a response in a struct ipmi_recv_msg, which has the netfn and cmd as separate bytes. This change alters the definition and users of ipmi_demangle_device_id to use a split netfn, cmd and data buffer, so it can be used with non-sequential responses. Signed-off-by: Jeremy Kerr Fixed the ipmi_ssif.c and ipmi_si_intf.c changes to use data from the response, not the data from the message, when passing info to the ipmi_demangle_device_id() function. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 3 ++- drivers/char/ipmi/ipmi_ssif.c | 3 ++- include/linux/ipmi_smi.h | 24 ++++++++++++------------ 3 files changed, 16 insertions(+), 14 deletions(-) commit a9137c3dfae9f371e302ee3fc6658f0fe6b904e7 Author: Jeremy Kerr Date: Fri Aug 25 15:47:22 2017 +0800 ipmi: Add a reference from BMC devices to their interfaces In an upcoming change, we'll want to grab a reference to the ipmi_smi_t from a struct bmc_device. This change adds a pointer to allow this. Signed-off-by: Jeremy Kerr Reworked to support multiple interfaces on a BMC. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 511d57dc71a22514e106f79a878e788cb22f73e3 Author: Corey Minyard Date: Wed Aug 30 08:04:24 2017 -0500 ipmi: Get the device id through a function This makes getting the device id consistent, and make it possible to add a function to fetch it dynamically later. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 155 +++++++++++++++++++++++++++--------- drivers/char/ipmi/ipmi_watchdog.c | 11 ++- include/linux/ipmi.h | 6 +- 3 files changed, 130 insertions(+), 42 deletions(-) commit 9b64a8ba901ff23fa7a91c00e6aec526fb329a97 Author: Corey Minyard Date: Fri Sep 8 09:21:58 2017 -0500 ipmi: Fix printing the BMC guid It was just wrong. Make it print according to the guid spec. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit a2cb600fa22a877df48e1a9372ac5f02680c1ee3 Author: Corey Minyard Date: Fri Sep 1 14:37:07 2017 -0500 ipmi: Rework BMC registration There was a certain error case where the BMC wouldn't be deregistered like it should be. Rework the BMC registration to make calling ipmi_bmc_unregister() ok even if it's not registered and to clean up the error handling for ipmi_bmc_register(). Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 68 ++++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 23 deletions(-) commit 7e030d6dff713250c7dcfb543cad2addaf479b0e Author: Corey Minyard Date: Fri Sep 8 14:05:58 2017 -0500 ipmi: Prefer ACPI system interfaces over SMBIOS ones The recent changes to add SMBIOS (DMI) IPMI interfaces as platform devices caused DMI to be selected before ACPI, causing ACPI type of operations to not work. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) commit 9ca15af3164f3bb84db101fc7843fde25be3288c Author: Corey Minyard Date: Fri Sep 1 12:52:20 2017 -0500 ipmi: Fix issues with BMC refcounts BMC device refcounts were not being decremented after fetching from driver_find_device(). Also, document the use of ipmidriver_mutex and tighten it's span some by incrementing the BMC's usecount in the BMC find routines and not later. This will be important for future changes where a long mutex hold area will complicate things. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 51 +++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 16 deletions(-) commit eae4a36a6825302cb08c73c91924cade224d96d3 Author: Corey Minyard Date: Fri Sep 1 10:46:47 2017 -0500 ipmi: Check that the device type is BMC when scanning device Just an added safety check. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit f33e4df83e00f629aece2bd3a8d22b533e9d7877 Author: Corey Minyard Date: Fri Sep 1 10:43:49 2017 -0500 ipmi: Move bmc find routing to below bmc device type No functional change, this is for a later change that uses the bmc device type. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 101 ++++++++++++++++++------------------ 1 file changed, 51 insertions(+), 50 deletions(-) commit 72630d9a01c8ba56c55671a1b103aa5e2df57408 Author: Corey Minyard Date: Thu Sep 7 07:32:20 2017 -0500 ipmi: Fix getting the GUID data It was off by one. Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_msghandler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6dd76a6e9c20a6cc63406061f216d4eb7c9ae7b Author: Bhumika Goyal Date: Mon Aug 28 23:38:15 2017 +0530 IPMI: make ipmi_poweroff_handler const Make this const as it is only passed to a const argument of the function ipmi_create_user. Signed-off-by: Bhumika Goyal Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_poweroff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c9f98d1bfbd0696442f97fa7d43a727e1e16568 Author: Corey Minyard Date: Fri Aug 18 17:32:03 2017 -0500 ipmi: Make IPMI panic strings always available They were set by config items, but people complained that they were never turned on. So have them always available and enabled by a module parameter. Signed-off-by: Corey Minyard Documentation/IPMI.txt | 4 +- drivers/char/ipmi/Kconfig | 27 +++++++---- drivers/char/ipmi/ipmi_msghandler.c | 91 +++++++++++++++++++++++++++++++------ 3 files changed, 98 insertions(+), 24 deletions(-) commit b72fce52a14bbe0a94259a95032cf9dd1b3dd143 Author: Colin Ian King Date: Tue Aug 15 11:09:58 2017 +0100 char: ipmi: make function ipmi_get_info_from_resources static The function ipmi_get_info_from_resources is local to the source and does not need to be in global scope, so make it static. Add in newline to function declaration to make it checkpatch warning clean. Cleans up sparse warnings: symbol 'ipmi_get_info_from_resources' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 392a17b10ec4320d3c0e96e2a23ebaad1123b989 Author: Corey Minyard Date: Sat Jul 29 21:14:55 2017 -0500 ipmi: fix unsigned long underflow When I set the timeout to a specific value such as 500ms, the timeout event will not happen in time due to the overflow in function check_msg_timeout: ... ent->timeout -= timeout_period; if (ent->timeout > 0) return; ... The type of timeout_period is long, but ent->timeout is unsigned long. This patch makes the type consistent. Reported-by: Weilong Chen Signed-off-by: Corey Minyard Tested-by: Weilong Chen Cc: # 3.16.x drivers/char/ipmi/ipmi_msghandler.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 719c1b3810898c3d1837df3d7814a44190fff2c7 Author: Hanjun Guo Date: Tue Jul 4 12:08:09 2017 +0800 char: ipmi: eliminate misleading print info when being probed via ACPI When ipmi is probed via ACPI, the boot log shows [ 17.945139] ipmi_si IPI0001:00: probing via device tree [ 17.950369] ipmi_si IPI0001:00: ipmi_si: probing via ACPI [ 17.955795] ipmi_si IPI0001:00: [io 0x00e4-0x3fff] regsize 1 spacing 1 irq 0 [ 17.962932] ipmi_si: Adding ACPI-specified bt state machine which "ipmi_si IPI0001:00: probing via device tree" is misleading with a ACPI HID "IPI0001" but probing via DT. Eliminate this misleading print info by checking of_node is valid or not before calling of_ipmi_probe(). Signed-off-by: Hanjun Guo Signed-off-by: Corey Minyard drivers/char/ipmi/ipmi_si_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f909d9c74f3894ba8bca426ead8ccbe7282d950 Author: Haneen Mohammed Date: Wed Sep 27 12:23:17 2017 -0600 drm/rockchip: Rely on the default best_encoder() behavior Since the output has 1:1 relationship between connectors and encoders, and the driver is relying on the atomic helpers, remove the custom best_encoder() and let the core call drm_atomic_helper_best_encoder(). Signed-off-by: Haneen Mohammed Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20170927182317.GA8249@Haneen drivers/gpu/drm/rockchip/cdn-dp-core.c | 9 --------- 1 file changed, 9 deletions(-) commit 29baa82aa55f40d67cfc8138c944fd8880c27e8e Merge: e19b205 ac6c35a Author: Dave Airlie Date: Thu Sep 28 05:45:27 2017 +1000 Merge tag 'drm-misc-next-2017-09-20' of git://anongit.freedesktop.org/git/drm-misc into drm-next UAPI Changes: Cross-subsystem Changes: Core Changes: - DP SDP defines (Ville) - polish for scdc helpers (Thierry Reding) - fix lifetimes for connector/plane state across crtc changes (Maarten Lankhorst). - sparse fixes (Ville+Thierry) - make legacy kms ioctls all interruptible (Maarten) - push edid override into the edid helpers (out of probe helpers) (Jani) - DP ESI defines for link status (DK) Driver Changes: - drm-panel is now in drm-misc! - minor panel-simple cleanups/refactoring by various folks - drm_bridge_add cleanup (Inki Dae) - constify a few i2c_device_id structs (Arvind Yadav) - More patches from Noralf's fb/gem helper cleanup - bridge/synopsis: reset fix (Philippe Cornu) - fix tracepoint include handling in drivers (Thierry) - rockchip: lvds support (Sandy Huang) - move sun4i into drm-misc fold (Maxime Ripard) - sun4i: refactor driver load + support TCON backend/layer muxing (Chen-Yu Tsai) - pl111: support more pl11x variants (Linus Walleij) - bridge/adv7511: robustify probing/edid handling (Lars-Petersen Clausen) New hw support: - S6E63J0X03 panel (Hoegeun Kwon) - OTM8009A panel (Philippe CORNU) - Seiko 43WVF1G panel (Marco Franchi) - tve200 driver (Linus Walleij) Plus assorted of tiny patches all over, including our first outreachy patches from applicants for the winter round! * tag 'drm-misc-next-2017-09-20' of git://anongit.freedesktop.org/git/drm-misc: (101 commits) drm: add backwards compatibility support for drm_kms_helper.edid_firmware drm: handle override and firmware EDID at drm_do_get_edid() level drm/dp: DPCD register defines for link status within ESI field drm/rockchip: Replace dev_* with DRM_DEV_* drm/tinydrm: Drop driver registered message drm/gem-fb-helper: Use debug message on gem lookup failure drm/imx: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb() drm/bridge: adv7511: Constify HDMI CODEC platform data drm/bridge: adv7511: Enable connector polling when no interrupt is specified drm/bridge: adv7511: Remove private copy of the EDID drm/bridge: adv7511: Properly update EDID when no EDID was found drm/crtc: Convert setcrtc ioctl locking to interruptible. drm/atomic: Convert pageflip ioctl locking to interruptible. drm/legacy: Convert setplane ioctl locking to interruptible. drm/legacy: Convert cursor ioctl locking to interruptible. drm/atomic: Convert atomic ioctl locking to interruptible. drm/atomic: Prepare drm_modeset_lock infrastructure for interruptible waiting, v2. drm/tve200: Clean up panel bridging drm/doc: Update todo.rst drm/dp/mst: Sideband message transaction to power up/down nodes ... commit 32ad958d85b92ee7068aa1de5917777be080cc3c Author: Eric Anholt Date: Tue Aug 15 16:47:20 2017 -0700 drm/vc4: Set up the DSI host at pdev probe time, not component bind. We need the following things to happen in sequence: DSI host creation DSI device creation in the panel driver (needs DSI host) DSI device attach from panel to host. DSI drm_panel_add() DSI encoder creation DSI encoder's DRM panel/bridge attach Unless we allow device creation while the host isn't up yet, we need to break the -EPROBE_DEFER deadlock between the panel driver looking up the host and the host driver looking up the panel. We can do so by moving the DSI host creation outside of the component bind loop, and the panel/bridge lookup/attach into the component bind process. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20170815234722.20700-3-eric@anholt.net Reviewed-by: Archit Taneja drivers/gpu/drm/vc4/vc4_dsi.c | 97 +++++++++++++++++++++++++------------------ 1 file changed, 57 insertions(+), 40 deletions(-) commit af2eca53206c59ce9308a4f5f46c4a104a179b6b Author: Eric Anholt Date: Tue Aug 15 16:47:19 2017 -0700 drm/vc4: Avoid using vrefresh==0 mode in DSI htotal math. The incoming mode might have a missing vrefresh field if it came from drmModeSetCrtc(), which the kernel is supposed to calculate using drm_mode_vrefresh(). We could either use that or the adjusted_mode's original vrefresh value. However, we can maintain a more exact vrefresh value (not just the integer approximation), by scaling by the ratio of our clocks. v2: Use math suggested by Andrzej Hajda instead. v3: Simplify math now that adjusted_mode->clock isn't padded. v4: Drop some parens. Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20170815234722.20700-2-eric@anholt.net Reviewed-by: Andrzej Hajda drivers/gpu/drm/vc4/vc4_dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a2e4a21906e1ff7d2db9ce2e446e76abc905b79f Merge: 1ca94d7 664375e Author: David S. Miller Date: Wed Sep 27 11:33:28 2017 -0700 Merge branch 'mlxsw-Add-support-for-offloading-IPv4-multicast-routes' Jiri Pirko says: ==================== mlxsw: Add support for offloading IPv4 multicast routes Yotam says: This patch-set introduces offloading of the kernel IPv4 multicast router logic in the Spectrum driver. The first patch makes the Spectrum driver ignore FIB notifications that are not of address family IPv4 or IPv6. This is needed in order to prevent crashes while the next patches introduce the RTNL_FAMILY_IPMR FIB notifications. Patches 2-5 update ipmr to use the FIB notification chain for both MFC and VIF notifications, and patches 8-12 update the Spectrum driver to register to these notifications and offload the routes. Similarly to IPv4 and IPv6, any failure will trigger the abort mechanism which is updated in this patch-set to eject multicast route tables too. At this stage, the following limitations apply: - A multicast MFC route will be offloaded by the driver if all the output interfaces are Spectrum router interfaces (RIFs). In any other case (which includes pimreg device, tunnel devices and management ports) the route will be trapped to the CPU and the packets will be forwarded by software. - ipmr proxy routes are not supported and will trigger the abort mechanism. - The MFC TTL values are currently treated as boolean: if the value is different than 255, the traffic is forwarded to the interface and if the value is 255 it is not forwarded. Dropping packets based on their TTL isn't currently supported. To allow users to have visibility on which of the routes are offloaded and which are not, patch 6 introduces a per-route offload indication similar to IPv4 and IPv6 routes which is sent to the user via the RTNetlink interface. The Spectrum driver multicast router offloading support, which is introduced in patches 8 and 9, is divided into two parts: - The hardware logic which abstracts the Spectrum hardware and provides a simple API for the upper levels. - The offloading logic which gets the MFC and VIF notifications from the kernel and updates the hardware using the hardware logic part. Finally, the last patch makes the Spectrum router logic not ignore the multicast FIB notifications and call the corresponding functions in the multicast router offloading logic. --- v2->v3: - Move the ipmr_rule_default function definition to be inside the already existing CONFIG_IP_MROUTE_MULTIPLE_TABLES ifdef block (patch 6) - Remove double =0 initialization in spectrum_mr.c (patch 7) - Fix route4 allocation size (patch 7) v1->v2: - Add comments for struct fields in mroute.h - Take the mrt_lock while dumping VIFs in the fib_notifier dump callback - Update the MFC lastuse field too ==================== Signed-off-by: David S. Miller commit 664375e9567b5eeece8d9ebf85eaf5107cab382d Author: Yotam Gigi Date: Wed Sep 27 08:23:22 2017 +0200 mlxsw: spectrum: router: Don't ignore IPMR notifications Make the Spectrum router logic not ignore the RTNL_FAMILY_IPMR FIB notifications. Past commits added the IPMR VIF and MFC add/del notifications via the fib_notifier chain. In addition, a code for handling these notifications in the Spectrum router logic was added. Make the Spectrum router logic not ignore these notifications and forward the requests to the Spectrum multicast router offloading logic. 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_router.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fd890fe98f8b026642d39011d03d22fb4aa66b0f Author: Yotam Gigi Date: Wed Sep 27 08:23:21 2017 +0200 mlxsw: spectrum: Notify multicast router on RIF MTU changes Due to the fact that multicast routes hold the minimum MTU of all the egress RIFs and trap packets that don't meet it, notify the mulitcast router code on RIF MTU changes. 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_router.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit d42b0965b1d4fe0808a2103a3f7c015515b1112e Author: Yotam Gigi Date: Wed Sep 27 08:23:20 2017 +0200 mlxsw: spectrum_router: Add multicast routes notification handling functionality Add functionality for calling the multicast routing offloading logic upon MFC and VIF add and delete notifications. In addition, call the multicast routing upon RIF addition and deletion events. As the multicast routing offload logic may sleep, the actual calls are done in a deferred work. To ensure the MFC object is not freed in that interval, a reference is held to it. In case of a failure, the abort mechanism is used, which ejects all the routes from the hardware and triggers the traffic to flow through the kernel. Note: At that stage, the FIB notifications are still ignored, and will be enabled in a further patch. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 187 ++++++++++++++++++++- 1 file changed, 185 insertions(+), 2 deletions(-) commit 7e50d435759accec4e17764a8d5a1ef63b79ffd6 Author: Yotam Gigi Date: Wed Sep 27 08:23:19 2017 +0200 mlxsw: spectrum: router: Squash the default route table to main Currently, the mlxsw Spectrum driver offloads only either the RT_TABLE_MAIN FIB table or the VRF tables, so the RT_TABLE_LOCAL table is squashed to the RT_TABLE_MAIN table to allow local routes to be offloaded too. By default, multicast MFC routes which are not assigned to any user requested table are put in the RT_TABLE_DEFAULT table. Due to the fact that offloading multicast MFC routes support in Spectrum router logic is going to be introduced soon, squash the default table to MAIN too. 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_router.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0e14c7777acb6d58250cb746685dde0a74d60fe8 Author: Yotam Gigi Date: Wed Sep 27 08:23:18 2017 +0200 mlxsw: spectrum: Add the multicast routing hardware logic Implement the multicast routing hardware API introduced in previous patch for the specific spectrum hardware. The spectrum hardware multicast routes are written using the RMFT2 register and point to an ACL flexible action set. The actions used for multicast routes are: - Counter action, which allows counting bytes and packets on multicast routes. - Multicast route action, which provide RPF check and do the actual packet duplication to a list of RIFs. - Trap action, in the case the route action specified by the called is trap. 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/Makefile | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.c | 828 +++++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.h | 43 ++ 4 files changed, 873 insertions(+), 1 deletion(-) commit c011ec1bbfd69e091ca8d77e13fc251a07be57dc Author: Yotam Gigi Date: Wed Sep 27 08:23:17 2017 +0200 mlxsw: spectrum: Add the multicast routing offloading logic Add the multicast router offloading logic, which is in charge of handling the VIF and MFC notifications and translating it to the hardware logic API. The offloading logic has to overcome several obstacles in order to safely comply with the kernel multicast router user API: - It must keep track of the mapping between VIFs to netdevices. The user can add an MFC cache entry pointing to a VIF, delete the VIF and add re-add it with a different netdevice. The offloading logic has to handle this in order to be compatible with the kernel logic. - It must keep track of the mapping between netdevices to spectrum RIFs, as the current hardware implementation assume having a RIF for every port in a multicast router. - It must handle routes pointing to pimreg device to be trapped to the kernel, as the packet should be delivered to userspace. - It must handle routes pointing tunnel VIFs. The current implementation does not support multicast forwarding to tunnels, thus routes that point to a tunnel should be trapped to the kernel. - It must be aware of proxy multicast routes, which include both (*,*) routes and duplicate routes. Currently proxy routes are not offloaded and trigger the abort mechanism: removal of all routes from hardware and triggering the traffic to go through the kernel. The multicast routing offloading logic also updates the counters of the offloaded MFC routes in a periodic work. 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/Makefile | 3 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c | 1014 +++++++++++++++++++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.h | 133 +++ 4 files changed, 1150 insertions(+), 1 deletion(-) commit 478e4c2f0067d57d7c17059caafab026ca32084a Author: Yotam Gigi Date: Wed Sep 27 08:23:16 2017 +0200 net: mroute: Check if rule is a default rule When the ipmr starts, it adds one default FIB rule that matches all packets and sends them to the DEFAULT (multicast) FIB table. A more complex rule can be added by user to specify that for a specific interface, a packet should be look up at either an arbitrary table or according to the l3mdev of the interface. For drivers willing to offload the ipmr logic into a hardware but don't want to offload all the FIB rules functionality, provide a function that can indicate whether the FIB rule is the default multicast rule, thus only one routing table is needed. This way, a driver can register to the FIB notification chain, get notifications about FIB rules added and trigger some kind of an internal abort mechanism when a non default rule is added by the user. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/mroute.h | 7 +++++++ net/ipv4/ipmr.c | 12 ++++++++++++ 2 files changed, 19 insertions(+) commit c7c0bbeae9501a7e42f2fd306d6a6399aca688b6 Author: Yotam Gigi Date: Wed Sep 27 08:23:15 2017 +0200 net: ipmr: Add MFC offload indication Allow drivers, registered to the fib notification chain indicate whether a multicast MFC route is offloaded or not, similarly to unicast routes. The indication of whether a route is offloaded is done using the mfc_flags field on an mfc_cache struct, and the information is sent to the userspace via the RTNetlink interface only. Currently, MFC routes are either offloaded or not, thus there is no need to add per-VIF offload indication. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/mroute.h | 2 ++ net/ipv4/ipmr.c | 3 +++ 2 files changed, 5 insertions(+) commit b362053a7cc0fcc09b92642ba5dd1ca7fddc9004 Author: Yotam Gigi Date: Wed Sep 27 08:23:14 2017 +0200 ipmr: Send FIB notifications on MFC and VIF entries Use the newly introduced notification chain to send events upon VIF and MFC addition and deletion. The MFC notifications are sent only on resolved MFC entries, as unresolved cannot be offloaded. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/ipv4/ipmr.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit 4d65b9487831170e699b2fc64a91b839d729bd78 Author: Yotam Gigi Date: Wed Sep 27 08:23:13 2017 +0200 ipmr: Add FIB notification access functions Make the ipmr module register as a FIB notifier. To do that, implement both the ipmr_seq_read and ipmr_dump ops. The ipmr_seq_read op returns a sequence counter that is incremented on every notification related operation done by the ipmr. To implement that, add a sequence counter in the netns_ipv4 struct and increment it whenever a new MFC route or VIF are added or deleted. The sequence operations are protected by the RTNL lock. The ipmr_dump iterates the list of MFC routes and the list of VIF entries and sends notifications about them. The entries dump is done under RCU where the VIF dump uses the mrt_lock too, as the vif->dev field can change under RCU. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/mroute.h | 15 ++++++ include/net/netns/ipv4.h | 3 ++ net/ipv4/ipmr.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 153 insertions(+), 2 deletions(-) commit 310ebbba3b7396b00bce08a33f1d2de2c74fa257 Author: Yotam Gigi Date: Wed Sep 27 08:23:12 2017 +0200 ipmr: Add reference count to MFC entries Next commits will introduce MFC notifications through the atomic fib_notification chain, thus allowing modules to be aware of MFC entries. Due to the fact that modules may need to hold a reference to an MFC entry, add reference count to MFC entries to prevent them from being freed while these modules use them. The reference counting is done only on resolved MFC entries currently. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/linux/mroute.h | 21 +++++++++++++++++++++ net/ipv4/ipmr.c | 8 +++++--- 2 files changed, 26 insertions(+), 3 deletions(-) commit 85e482285bbbd508483cbe08de69c8fe00cdbbfe Author: Yotam Gigi Date: Wed Sep 27 08:23:11 2017 +0200 fib: notifier: Add VIF add and delete event types In order for an interface to forward packets according to the kernel multicast routing table, it must be configured with a VIF index according to the mroute user API. The VIF index is then used to refer to that interface in the mroute user API, for example, to set the iif and oifs of an MFC entry. In order to allow drivers to be aware and offload multicast routes, they have to be aware of the VIF add and delete notifications. Due to the fact that a specific VIF can be deleted and re-added pointing to another netdevice, and the MFC routes that point to it will forward the matching packets to the new netdevice, a driver willing to offload MFC cache entries must be aware of the VIF add and delete events in addition to MFC routes notifications. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller include/net/fib_notifier.h | 2 ++ 1 file changed, 2 insertions(+) commit 72e83204b7ec3d698189117d980dc7c15d07af8a Author: Mario Limonciello Date: Tue Sep 26 13:49:59 2017 -0500 platform/x86: dell-wmi: Label driver as handling notifications This driver serves the purpose of responding to WMI based notifications from the DELL_EVENT_GUID (9DBB5994-A997-11DA-B012-B622A1EF5492). Other GUIDs will be handled by separate drivers. Update the language used by this driver to avoid future confusion. Signed-off-by: Mario Limonciello Signed-off-by: Darren Hart (VMware) MAINTAINERS | 2 +- drivers/platform/x86/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7ba236ce58bd7ac8e360de81f834d9c446f7b063 Author: Kuninori Morimoto Date: Tue Sep 26 01:01:10 2017 +0000 ASoC: add Component level set_bias_level In current ALSA SoC, Codec only has set_bias_level feature. Codec will be merged into Component in next generation ALSA SoC, thus current Codec specific feature need to be merged into it. This is glue patch for it. Codec driver has .idle_bias_off for dapm bias. But Component driver doesn't have it, and dapm->idle_bias_off is set as "true". To keep compatibility, this patch adds "idle_bias_on" instead of ".idle_bias_off" on Component driver. dapm->idle_bias_off will be set by inverted idle_bias_on. When we replace Codec to Component, the driver which has ".idle_bias_off = true" is just remove it, and the driver which doesn't have it will have new ".idle_bias_on = true". Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 8 ++++++++ sound/soc/soc-core.c | 13 ++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) commit f523acebbb74f3cf5840d801f2e4856c688bf14a Author: Kuninori Morimoto Date: Tue Sep 26 01:00:53 2017 +0000 ASoC: add Component level pcm_new/pcm_free v2 In current ALSA SoC, Platform only has pcm_new/pcm_free feature, but it should be supported on Component level. This patch adds it. The v1 was added commit 99b04f4c4051f7 ("ASoC: add Component level pcm_new/pcm_free") but it called all "card" connected component's pcm_new/free, it was wrong. This patch calls "rtd" connected component. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 6 ++++++ sound/soc/soc-core.c | 42 ++++++++++++++++++++++++++++++++++++++++++ sound/soc/soc-pcm.c | 29 +++++++++++++++++++++-------- 3 files changed, 69 insertions(+), 8 deletions(-) commit 3b1b3a7ba5536b4247024a5f00950d0932edf691 Merge: 75ab9eb 5d61f0b Author: Mark Brown Date: Wed Sep 27 10:11:06 2017 -0700 Merge branch 'fix/pcm' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-core commit 5d61f0ba6524dcbad198126e5793157c8afdea91 Author: Takashi Iwai Date: Fri Aug 25 12:04:07 2017 +0200 ASoC: pcm: Sync delayed work before releasing resources When ASoC driver is unbound dynamically during its operation (i.e. a kind of hot-unplug), we may hit Oops due to the resource access after the release by a delayed work, something like: Unable to handle kernel paging request at virtual address dead000000000220 .... PC is at soc_dapm_dai_stream_event.isra.14+0x20/0xd0 LR is at snd_soc_dapm_stream_event+0x74/0xa8 .... [] soc_dapm_dai_stream_event.isra.14+0x20/0xd0 [] snd_soc_dapm_stream_event+0x74/0xa8 [] close_delayed_work+0x3c/0x50 [] process_one_work+0x1ac/0x318 [] worker_thread+0x48/0x420 [] kthread+0xfc/0x128 [] ret_from_fork+0x10/0x18 For fixing the race, this patch adds a sync-point in pcm private_free callback to finish the delayed work before actually releasing the resources. Reported-by: Hiep Cao Minh Reported-by: Kuninori Morimoto Tested-by: Kuninori Morimoto Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/soc-pcm.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 4b2b915f8887e5602a98b1da4fcb7c41c573cb13 Author: Harsha Priya N Date: Tue Sep 26 22:35:13 2017 -0700 ASoC: Intel: Kbl: Add Playback DAI for fixup 'Kbl Audio Headset Playback' FE DAI also needs SSP hw param fix. Add this dai also to be handled in kabylake_ssp_fixup() call. Signed-off-by: Harsha Priya Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 1 + 1 file changed, 1 insertion(+) commit b7969caf41a1d1be72bb1dd02542a26c0fb3d688 Author: Uwe Kleine-König Date: Wed Sep 27 17:39:22 2017 +0200 spi: mxs: implement runtime pm This is a straight forward addition of runtime and system sleep pm operations that handle clk and pinctrl (for runtime pm) and spi_master_{suspend,resume} (for system sleep). Signed-off-by: Uwe Kleine-König Signed-off-by: Mark Brown drivers/spi/spi-mxs.c | 120 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 110 insertions(+), 10 deletions(-) commit f5fe8c4589740bf45fd19c348e67981e977697cb Author: Bhumika Goyal Date: Wed Sep 27 21:35:47 2017 +0530 ASoC: kirkwood: make kirkwood_soc_platform const Make kirkwood_soc_platform const as it only passed to a const argument of the function snd_soc_register_platform in the file referencing it. Make the declaration const too. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown sound/soc/kirkwood/kirkwood-dma.c | 2 +- sound/soc/kirkwood/kirkwood.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5fe74e0a72474eb48fa8abe1eb49dedb16b2537b Author: Gregory CLEMENT Date: Wed Sep 27 17:58:22 2017 +0200 arm64: defconfig: enable NAND on Armada 7K/8K SoCs The PXA3xx NAND driver supports also the NAND controller found on the Armada 7K/8K SoCs, so enable it. Signed-off-by: Gregory CLEMENT arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit bd30ca2d1a98fb9bd1f6ba63438068788b9e396b Author: Rodrigo Vivi Date: Tue Sep 26 14:13:46 2017 -0700 drm/i915: Avoid using dev_priv->info.gen directly. Let's stop this usage before it spreads so much. 1. This check is not part of usual searches happening when adding new platform. 2. There is already a duplication here with INTEL_INFO(dev_priv)->gen and INTEL_GEN(dev_priv). So let's please avoid yet another way. Cc: Lyude Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Radhakrishna Sripada Cc: Hans de Goede Cc: Matt Roper Cc: Maarten Lankhorst Cc: Paulo Zanoni Cc: Ville Syrjala Cc: Imre Deak Cc: Shashank Sharma Cc: Jani Nikula Signed-off-by: Rodrigo Vivi Reviewed-by: Paulo Zanoni Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20170926211346.12009-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f821fe8cc7e51b238585e71b688e7093bfec355c Author: Jan Glauber Date: Mon Sep 25 14:34:56 2017 +0200 EDAC, thunderx: Remove suspend/resume support The memory controller on ThunderX/OcteonTX systems does not support power management. Therefore remove the suspend/resume callbacks. Signed-off-by: Jan Glauber Cc: David Daney Cc: Jan Glauber Cc: Mark Rutland Cc: Mauro Carvalho Chehab Cc: Ralf Baechle Cc: Suzuki K Poulose Cc: Will Deacon Cc: Zhangshaokun Cc: linux-arm-kernel@lists.infradead.org Cc: linux-edac Cc: linux-mips@linux-mips.org Link: http://lkml.kernel.org/r/20170925123502.17289-2-jglauber@cavium.com Signed-off-by: Borislav Petkov drivers/edac/thunderx_edac.c | 25 ------------------------- 1 file changed, 25 deletions(-) commit d59075ad1e091cdb663974b10c8bac5491acc356 Author: Michael J. Ruhl Date: Tue Sep 26 07:01:16 2017 -0700 IB/hfi1: Add a safe wrapper for _rcd_get_by_index hfi1_rcd_get_by_index assumes that the given index is in the correct range. In most cases this is correct because the index is bounded by a loop. For these cases, adding a range check to the function is redundant. For the use case that is not bounded by the loop range, a _safe wrapper function is needed to validate the index before accessing the rcd array. Add a _safe wrapper to _get_by_index to validate the index range. Update appropriate call sites with the new _safe function. Reviewed-by: Ira Weiny Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 2 +- drivers/infiniband/hw/hfi1/debugfs.c | 4 ++-- drivers/infiniband/hw/hfi1/driver.c | 4 ++-- drivers/infiniband/hw/hfi1/hfi.h | 2 ++ drivers/infiniband/hw/hfi1/init.c | 21 +++++++++++++++++++++ 5 files changed, 28 insertions(+), 5 deletions(-) commit 442e55661db1d5833b0eb5b85f78a845ace7a7cc Author: Mike Marciniszyn Date: Tue Sep 26 07:01:09 2017 -0700 IB/hfi1: Extend input hdr tracing for packet type The etype field from the rhf can have more values than just IB and BYPASS. Extend the current tracing to report a symbolic for the etype field for non-bypass packets. Bypass packets will continue to report the l2. As part of this fix the etype and the l2 are added to the tracing struct and are available for trigger and filter operations. Fixes: Commit 863cf89d472f ("IB/hfi1: Add 16B trace support") Reviewed-by: Don Hiatt Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/trace.c | 23 +++++++--------- drivers/infiniband/hw/hfi1/trace.h | 10 +++++++ drivers/infiniband/hw/hfi1/trace_ibhdrs.h | 44 ++++++++++++++++--------------- drivers/infiniband/hw/hfi1/trace_rx.h | 11 +------- 4 files changed, 44 insertions(+), 44 deletions(-) commit 6fab2a88f737da0858dd22ab5155ff3f6c89a166 Author: Jan Sokolowski Date: Tue Sep 26 07:01:02 2017 -0700 IB/hfi1: Remove unused hfi1_cpulist variables Following variables: hfi1_cpulist and hfi1_cpulist_count are unused. Remove them. Reviewed-by: Harish Chegondi Reviewed-by: Jakub Byczkowski Signed-off-by: Jan Sokolowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/hfi.h | 2 -- drivers/infiniband/hw/hfi1/init.c | 16 ---------------- 2 files changed, 18 deletions(-) commit 21e5acc06403f6ce48ef98ad9d081cdec2944d60 Author: Michael J. Ruhl Date: Tue Sep 26 07:00:56 2017 -0700 IB/hfi1: Inline common calculation Calculating the offset to a context is done several times throughout the code. Create a common inlined function for doing this calculation. Reviewed-by: Ira Weiny Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 21 ++++++++------------- drivers/infiniband/hw/hfi1/hfi.h | 6 ++++++ drivers/infiniband/hw/hfi1/user_exp_rcv.c | 6 ++---- 3 files changed, 16 insertions(+), 17 deletions(-) commit 6fee036916f3efbd840631f2ea4ac88950c1592e Author: Jan Sokolowski Date: Tue Sep 26 07:00:50 2017 -0700 IB/hfi1: Remove unnecessary error messages on alloc failures Per-cpu variables int_counter, rcv_limit, and send_schedule print unnecessary error messages on failed allocations. Remove the error messages. Reviewed-by: Harish Chegondi Reviewed-by: Dennis Dalessandro Signed-off-by: Jan Sokolowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/init.c | 6 ------ 1 file changed, 6 deletions(-) commit 156d24d7001e9b451e2dfc4c5de410b753a8de0d Author: Ira Weiny Date: Tue Sep 26 07:00:43 2017 -0700 IB/hfi1: Remove unused link_default variable devdata->link_default is no longer variable Maintain number of holes by moving dc_shutdown Reviewed-by: Sebastian Sanchez Signed-off-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 6 ++---- drivers/infiniband/hw/hfi1/hfi.h | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) commit aadd7020b5903e353c53b69090335e993b27d9d8 Author: Ira Weiny Date: Tue Sep 26 07:00:37 2017 -0700 IB/hfi1: Set default_desc1 just one time There is no reason to set the default descriptor flag on every SDMA engine initialization. Reviewed-by: Mike Marciniszyn Signed-off-by: Ira Weiny Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/sdma.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 05cb18fda926ddce299280bd86cbc9d491306f28 Author: Michael J. Ruhl Date: Tue Sep 26 07:00:30 2017 -0700 IB/hfi1: Update HFI to use the latest PCI API The HFI PCI IRQ code uses an obsolete PCI API. Update the code to use the new PCI IRQ API and any necessary changes because of the new API. Reviewed-by: Sebastian Sanchez Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 58 ++++++++++++++------------------------- drivers/infiniband/hw/hfi1/hfi.h | 2 -- 2 files changed, 21 insertions(+), 39 deletions(-) commit c4bc61568048d6764d8527d76dd8d356619267d2 Author: Michael J. Ruhl Date: Tue Sep 26 07:00:24 2017 -0700 IB/qib: Update QIB to use the latest PCI API The QIB PCI IRQ code uses an obsolete PCI API. Updating the code to use the new PCI IRQ API and any necessary changes because of the new API. Reviewed-by: Sebastian Sanchez Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib.h | 8 +- drivers/infiniband/hw/qib/qib_7220.h | 1 - drivers/infiniband/hw/qib/qib_iba6120.c | 35 ++----- drivers/infiniband/hw/qib/qib_iba7220.c | 52 +++-------- drivers/infiniband/hw/qib/qib_iba7322.c | 158 +++++++++++++------------------- drivers/infiniband/hw/qib/qib_pcie.c | 125 +++++++------------------ 6 files changed, 120 insertions(+), 259 deletions(-) commit 4029e2a313348a0a44f9d41b681763c69160dfd0 Author: Harish Chegondi Date: Tue Sep 26 07:00:17 2017 -0700 IB/hfi1: Remove the debug trace message in pin_sdma_pages() Remove the debug trace statement in pin_sdma_pages() that gets executed when there is a memory allocation failure as the trace message doesn't help with debugging the memory allocation failure. Cc: Leon Romanovsky Reviewed-by: Dennis Dalessandro Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_sdma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d34ed562ac0af306037d0985fb1b7fad97f91f1e Author: Harish Chegondi Date: Tue Sep 26 07:00:11 2017 -0700 IB/hfi1: Convert the macro AHG_HEADER_SET into an inline function AHG_HEADER_SET macro doesn't conform to the coding standards as it can affect the control flow. Convert the macro AHG_HEADER_SET into an inline function ahg_header_set(). Cc: Leon Romanovsky Reviewed-by: Mike Marciniszyn Signed-off-by: Harish Chegondi Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_sdma.c | 58 +++++++++++++++++++++++----------- drivers/infiniband/hw/hfi1/user_sdma.h | 29 +++++++++++------ 2 files changed, 59 insertions(+), 28 deletions(-) commit e870b4a1f57afb7e913cb05609fd891aa00755a8 Author: Jakub Byczkowski Date: Tue Sep 26 07:00:04 2017 -0700 IB/hfi1: Add new state complete decodes for LNI failures Add state decodes for link width negotiation, verify cap time out and secure data resolution failures. Reviewed-by: Jan Sokolowski Reviewed-by: Ira Weiny Signed-off-by: Jakub Byczkowski Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 4 ++++ 1 file changed, 4 insertions(+) commit a9c0a10888614603cc38b6f60250e92932f24a37 Author: Charles Rose Date: Mon Sep 25 10:10:43 2017 -0700 EDAC, skx_edac: Fix detection of single-rank DIMMs Single-rank DIMMs did not get detected on Skylake/Kabylake systems due to wrong limit check. The single rank DIMM check is a simple typo. "0" is a legal value in this field meaning single rank. Signed-off-by: Charles Rose Cc: Aristeu Rozanski Cc: Mauro Carvalho Chehab Cc: Qiuxu Zhuo Cc: linux-edac Link: http://lkml.kernel.org/r/66df72d327c265fbf92fe25df96daa228a35f076.1506358467.git.tony.luck@intel.com [ Also fix debug message to print number of ranks. ] Signed-off-by: Tony Luck [ Expand commit message. ] Signed-off-by: Borislav Petkov drivers/edac/skx_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b209a368eb72cacce290e327d3f783e9cdee040c Author: Niranjana Vishwanathapura Date: Tue Sep 26 06:44:26 2017 -0700 IB/opa_vnic: Add routing control information Add protocol specific routing control information in the encapsulation header as per the configuration. Reviewed-by: Sudeep Dutt Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Scott Franco Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.c | 41 ++++++++++++++++++++-- drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h | 16 ++++++++- .../infiniband/ulp/opa_vnic/opa_vnic_internal.h | 4 ++- .../infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c | 4 +++ 4 files changed, 61 insertions(+), 4 deletions(-) commit e82b7c388a26d83bf0037ba8f6f3c964ccad2f5b Author: Niranjana Vishwanathapura Date: Tue Sep 26 06:44:20 2017 -0700 IB/opa_vnic: Properly set vesw port status Update eth_link_status and operating status information to represent the overall status of the virtual Ethernet switch port. Reviewed-by: Sudeep Dutt Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c | 39 ++++++++++++++++------- 1 file changed, 27 insertions(+), 12 deletions(-) commit 4bbdfe25600c1909c26747d0b5c39fd0e409bb87 Author: Scott Franco Date: Tue Sep 26 06:44:13 2017 -0700 IB/opa_vnic: Properly clear Mac Table Digest Clear the MAC table digest when the MAC table is freed. Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Scott Franco Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.c | 1 + 1 file changed, 1 insertion(+) commit b77eb45e0d9c324245d165656ab3b38b6f386436 Author: Niranjana Vishwanathapura Date: Tue Sep 26 06:44:07 2017 -0700 IB/opa_vnic: Properly return the total MACs in UC MAC list Do not include EM specified MAC address in total MACs of the UC MAC list. Reviewed-by: Sudeep Dutt Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 5a5a85da40af20d818afa1983771cc86e2577b39 Author: Niranjana Vishwanathapura Date: Tue Sep 26 06:44:01 2017 -0700 IB/opa_vnic: Allow reset of MAC address Ensure MAC address is reset while deleting the vesw port. Reviewed-by: Sudeep Dutt Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f291d28690af3d0eff4fbbf02020ef5d237f040 Author: Niranjana Vishwanathapura Date: Tue Sep 26 06:43:54 2017 -0700 IB/opa_vnic: Set POD value for Ethernet MTU Set power on default value of 1500 for eth_mtu. Reviewed-by: Sudeep Dutt Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c | 1 + drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c | 1 + 2 files changed, 2 insertions(+) commit 62f1e84e4680e96423a610261d2310482d5cacd3 Author: Niranjana Vishwanathapura Date: Tue Sep 26 06:43:48 2017 -0700 IB/opa_vnic: Mark unused Ethernet MTU fields as reserved Per pcp mtu fields are not used, mark them as reserved. Reviewed-by: Sudeep Dutt Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h | 8 +++----- drivers/infiniband/ulp/opa_vnic/opa_vnic_internal.h | 5 ++--- drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c | 2 +- drivers/infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c | 10 ++-------- 4 files changed, 8 insertions(+), 17 deletions(-) commit 973f5fbedb0721ab964386a5fe5120998e71580c Author: Robin Murphy Date: Thu Sep 21 16:52:47 2017 +0100 iommu/iova: Simplify cached node logic The logic of __get_cached_rbnode() is a little obtuse, but then __get_prev_node_of_cached_rbnode_or_last_node_and_update_limit_pfn() wouldn't exactly roll off the tongue... Now that we have the invariant that there is always a valid node to start searching downwards from, everything gets a bit easier to follow if we simplify that function to do what it says on the tin and return the cached node (or anchor node as appropriate) directly. In turn, we can then deduplicate the rb_prev() and limit_pfn logic into the main loop itself, further reduce the amount of code under the lock, and generally make the inner workings a bit less subtle. Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 51 +++++++++++++++++---------------------------------- 1 file changed, 17 insertions(+), 34 deletions(-) commit bb68b2fbfbd643d4407541f9c7a16a2c9b3a57c7 Author: Robin Murphy Date: Thu Sep 21 16:52:46 2017 +0100 iommu/iova: Add rbtree anchor node Add a permanent dummy IOVA reservation to the rbtree, such that we can always access the top of the address space instantly. The immediate benefit is that we remove the overhead of the rb_last() traversal when not using the cached node, but it also paves the way for further simplifications. Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 15 +++++++++++++-- include/linux/iova.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) commit aa3ac9469c1850ed00741955b975c3a19029763a Author: Zhen Lei Date: Thu Sep 21 16:52:45 2017 +0100 iommu/iova: Make dma_32bit_pfn implicit Now that the cached node optimisation can apply to all allocations, the couple of users which were playing tricks with dma_32bit_pfn in order to benefit from it can stop doing so. Conversely, there is also no need for all the other users to explicitly calculate a 'real' 32-bit PFN, when init_iova_domain() can happily do that itself from the page granularity. CC: Thierry Reding CC: Jonathan Hunter CC: David Airlie CC: Sudeep Dutt CC: Ashutosh Dixit Signed-off-by: Zhen Lei Tested-by: Ard Biesheuvel Tested-by: Zhen Lei Tested-by: Nate Watterson [rm: use iova_shift(), rewrote commit message] Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/gpu/drm/tegra/drm.c | 3 +-- drivers/gpu/host1x/dev.c | 3 +-- drivers/iommu/amd_iommu.c | 7 ++----- drivers/iommu/dma-iommu.c | 18 +----------------- drivers/iommu/intel-iommu.c | 11 +++-------- drivers/iommu/iova.c | 4 ++-- drivers/misc/mic/scif/scif_rma.c | 3 +-- include/linux/iova.h | 5 ++--- 8 files changed, 13 insertions(+), 41 deletions(-) commit e60aa7b53845a261dd419652f12ab9f89e668843 Author: Robin Murphy Date: Thu Sep 21 16:52:44 2017 +0100 iommu/iova: Extend rbtree node caching The cached node mechanism provides a significant performance benefit for allocations using a 32-bit DMA mask, but in the case of non-PCI devices or where the 32-bit space is full, the loss of this benefit can be significant - on large systems there can be many thousands of entries in the tree, such that walking all the way down to find free space every time becomes increasingly awful. Maintain a similar cached node for the whole IOVA space as a superset of the 32-bit space so that performance can remain much more consistent. Inspired by work by Zhen Lei . Tested-by: Ard Biesheuvel Tested-by: Zhen Lei Tested-by: Nate Watterson Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 60 ++++++++++++++++++++++++---------------------------- include/linux/iova.h | 3 ++- 2 files changed, 30 insertions(+), 33 deletions(-) commit 086c83acb70fc6da044c9ca45c1c9780c64545b0 Author: Zhen Lei Date: Thu Sep 21 16:52:43 2017 +0100 iommu/iova: Optimise the padding calculation The mask for calculating the padding size doesn't change, so there's no need to recalculate it every loop iteration. Furthermore, Once we've done that, it becomes clear that we don't actually need to calculate a padding size at all - by flipping the arithmetic around, we can just combine the upper limit, size, and mask directly to check against the lower limit. For an arm64 build, this alone knocks 20% off the object code size of the entire alloc_iova() function! Signed-off-by: Zhen Lei Tested-by: Ard Biesheuvel Tested-by: Zhen Lei Tested-by: Nate Watterson [rm: simplified more of the arithmetic, rewrote commit message] Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) commit 2070f940a6d5148cf2df0d0087ff0a64d9f15237 Author: Zhen Lei Date: Thu Sep 21 16:52:42 2017 +0100 iommu/iova: Optimise rbtree searching Checking the IOVA bounds separately before deciding which direction to continue the search (if necessary) results in redundantly comparing both pfns twice each. GCC can already determine that the final comparison op is redundant and optimise it down to 3 in total, but we can go one further with a little tweak of the ordering (which makes the intent of the code that much cleaner as a bonus). Signed-off-by: Zhen Lei Tested-by: Ard Biesheuvel Tested-by: Zhen Lei Tested-by: Nate Watterson [rm: rewrote commit message to clarify] Signed-off-by: Robin Murphy Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 8834b0950156de37acccd422263d4da3c94495e6 Author: Markus Elfring Date: Wed Sep 27 15:46:53 2017 +0200 clk: samsung: Delete a memory allocation error message in clk-cpu.c Omit an extra message for a memory allocation failure in exynos_register_cpu_clock() function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sylwester Nawrocki drivers/clk/samsung/clk-cpu.c | 2 -- 1 file changed, 2 deletions(-) commit 1848757c3d8bff3addf881c8bcc2b85e25ccf25e Merge: 7ae6f2a 400d324 4d45b75 Author: Doug Ledford Date: Wed Sep 27 10:58:06 2017 -0400 Merge branches 'hns' and 'misc' into k.o/for-next Signed-off-by: Doug Ledford commit 4d45b7573ba74a278652b0566d779c2aa7ea3df1 Author: Bharat Potnuri Date: Wed Sep 27 13:05:50 2017 +0530 iw_cxgb4: change pr_debug to appropriate log level Error logs of iw_cxgb4 needs to be printed by default. This patch changes the necessary pr_debug() to appropriate pr_. Signed-off-by: Potnuri Bharat Teja Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 46 +++++++++++++++++----------------- drivers/infiniband/hw/cxgb4/ev.c | 2 +- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 4 +-- drivers/infiniband/hw/cxgb4/qp.c | 4 +-- drivers/infiniband/hw/cxgb4/t4.h | 8 +++--- 5 files changed, 32 insertions(+), 32 deletions(-) commit 548ddb19afbabf8f7af7a900c19d0f0705d6dc90 Author: Bharat Potnuri Date: Wed Sep 27 13:05:49 2017 +0530 iw_cxgb4: Remove __func__ parameter from pr_debug() pr_debug() can be enabled to print function names, So removing the unwanted __func__ parameters from debug logs. Realign function parameters. Signed-off-by: Potnuri Bharat Teja Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb4/cm.c | 198 ++++++++++++++++----------------- drivers/infiniband/hw/cxgb4/cq.c | 50 ++++----- drivers/infiniband/hw/cxgb4/device.c | 16 +-- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 13 +-- drivers/infiniband/hw/cxgb4/mem.c | 26 ++--- drivers/infiniband/hw/cxgb4/provider.c | 36 +++--- drivers/infiniband/hw/cxgb4/qp.c | 55 +++++---- drivers/infiniband/hw/cxgb4/resource.c | 46 ++++---- drivers/infiniband/hw/cxgb4/t4.h | 12 +- 9 files changed, 217 insertions(+), 235 deletions(-) commit 44596ebf8d55caa5dc15b21bf8b435b59988b521 Author: Arvind Yadav Date: Tue Sep 26 12:59:51 2017 +0530 IB/ocrdma: pr_err() strings should end with newlines pr_err() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 73ae5fe8a52ff8543011e476e406f83e80a53145 Author: Gregory CLEMENT Date: Mon Sep 25 16:53:52 2017 +0200 arm64: dts: marvell: add NAND support on the 7040-DB board The NAND controller used in A7K/A8K is present on the CP110 master part. It is compatible with the pxa3xx_nand driver but requires the use of the marvell,armada-8k-nand compatible string due to the need to first enable the NAND controller. Add properties to the NAND node to fit the bindings constraints of the pxa3xx_nand driver and enable the NAND controller. Add the 'marvell,system-controller' property to the cp110 master NAND node with a reference to the syscon node. This is new compared to other boards using the pxa3xx_nand driver and it is needed to be bootloader independent and enable the NAND controller from the NAND controller driver itself by writing in these syscon registers. Signed-off-by: Gregory CLEMENT [miquel.raynal@free-electrons.com: add NAND ready/busy MPP subnode, change compatible string to fit the needs of the A7k/A8k SoCs and add the system controller property] Signed-off-by: Miquel Raynal arch/arm64/boot/dts/marvell/armada-7040-db.dts | 30 ++++++++++++++++++++++ arch/arm64/boot/dts/marvell/armada-70x0.dtsi | 14 ++++++++++ .../boot/dts/marvell/armada-cp110-master.dtsi | 4 ++- .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 3 ++- 4 files changed, 49 insertions(+), 2 deletions(-) commit 505485a83c55153d1776df9ff32ff8211645b6ed Author: Chris Gorman Date: Tue Sep 26 12:27:40 2017 -0400 pinctrl: cherryview fixed typo in comment Fixed typo on comment for north_community. Signed-off-by: Chris Gorman Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-cherryview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d23a8bafa9d109fe6ea483fe8f96071ac460962c Author: Arvind Yadav Date: Tue Sep 26 12:20:01 2017 +0530 IB/mlx5:: pr_err() and mlx5_ib_dbg() strings should end with newlines pr_err() and mlx5_ib_dbg( messages should terminated with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e4b2d06892c7f700f3d62dfef603add35269612e Author: Yuval Shaia Date: Mon Sep 25 05:18:00 2017 -0700 IB/ipoib: Remove device when one port fails to init Call ipoib_remove_one when one of the IPoIB ports fails to initialize in order not to leave the module in unstable state. Signed-off-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3e4d6f91cae689b01865aedb71c1ad88a118084f Author: Colin Ian King Date: Mon Sep 11 12:42:31 2017 +0100 RDMA/cxgb3: remove redundant first assignement of sqp sqp is being initialised when it is being declared and then updated a little later on making the first initialization redundant. Clean this up by initializing ptr and sqp at their declaration. Cleans up warning: "warning: Value stored to 'sqp' during its initialization is never read" Fixes: a58e58fafdff ("RDMA/cxgb3: Wrap the software send queue pointer as needed on flush") Signed-off-by: Colin Ian King Acked-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb3/cxio_hal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 40a203396cc1c239f2e71c47c66ed03097123d2c Author: Arnd Bergmann Date: Wed Sep 6 23:34:26 2017 +0200 IB/uverbs: clean up INIT_UDATA() macro usage After changing INIT_UDATA_BUF_OR_NULL() to an inline function, this does the same change to INIT_UDATA for consistency. I'm keeping it separate as this part is much larger and we wouldn't want to backport this to stable kernels if we ever want to address the gcc warnings by backporting the first patch. Again, using an inline function gives us better type safety here among other issues with macros. I'm using u64_to_user_ptr() to convert the user pointer to simplify the logic rather than adding lots of new type casts. Signed-off-by: Arnd Bergmann Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs.h | 22 +++--- drivers/infiniband/core/uverbs_cmd.c | 125 +++++++++++++++-------------------- 2 files changed, 67 insertions(+), 80 deletions(-) commit 12f727721eee61b3d19dedb95cb893b2baa9fe41 Author: Arnd Bergmann Date: Wed Sep 6 23:34:25 2017 +0200 IB/uverbs: clean up INIT_UDATA_BUF_OR_NULL usage We get a harmless warning about the fact that we use the result of a multiplication as a condition: drivers/infiniband/core/uverbs_main.c: In function 'ib_uverbs_write': drivers/infiniband/core/uverbs_main.c:787:40: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] drivers/infiniband/core/uverbs_main.c:787:117: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] drivers/infiniband/core/uverbs_main.c:790:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] drivers/infiniband/core/uverbs_main.c:790:151: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] This avoids the problem by using an inline function in place of the macro. Fixes: a96e4e2ffe43 ("IB/uverbs: New macro to set pointers to NULL if length is 0 in INIT_UDATA()") Suggested-by: Christoph Hellwig Link: https://patchwork.kernel.org/patch/9940777/ Signed-off-by: Arnd Bergmann Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs.h | 15 ++++++++------- drivers/infiniband/core/uverbs_main.c | 22 ++++++++++------------ drivers/infiniband/core/uverbs_std_types.c | 3 ++- 3 files changed, 20 insertions(+), 20 deletions(-) commit be92d4891f89cb08f8a7cfc268b211c8e1253497 Author: Yuval Shaia Date: Wed Sep 6 13:52:01 2017 +0300 IB/{cxgb3,cxgb4}: Remove unneeded config dependencies CHELSIO_T3 already depend on INET CHELSIO_T4 already depend on (IPV6 || IPV6=n) Signed-off-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/hw/cxgb3/Kconfig | 2 +- drivers/infiniband/hw/cxgb4/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 931bc0d91639f8fbf336332aa443705004ecf61d Author: Yuval Shaia Date: Wed Sep 6 13:15:50 2017 +0300 IB: Move PCI dependency from root KConfig to HW's KConfigs No reason to have dependency on PCI for the entire infiniband stack so move it to KConfig of only the drivers that actually using PCI. Signed-off-by: Yuval Shaia Signed-off-by: Doug Ledford drivers/infiniband/Kconfig | 1 - drivers/infiniband/hw/i40iw/Kconfig | 1 + drivers/infiniband/hw/qedr/Kconfig | 1 + drivers/infiniband/hw/qib/Kconfig | 1 + drivers/infiniband/sw/rdmavt/Kconfig | 1 + drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 - drivers/staging/lustre/lnet/Kconfig | 2 +- 7 files changed, 5 insertions(+), 3 deletions(-) commit 8f63d4b1d557b037b597ba5da295a3eb70a6df72 Author: Colin Ian King Date: Fri Sep 1 09:22:14 2017 +0100 IB/core: fix spelling mistake: "aceess" -> "access" Trivial fix to spelling mistake in WARN message Signed-off-by: Colin Ian King Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_ioctl_merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 400d324a14acbe9a6189d0336fdb22f69c2cfd9a Author: Wei Hu(Xavier) Date: Wed Sep 20 11:45:26 2017 +0800 RDMA/hns: Delete the unnecessary initializing enum to zero It deletes the unnecessary initializing enum to zero. Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78928a17cae238fe21a725e1dbc1d13f6c7e6e14 Author: Wei Hu(Xavier) Date: Wed Aug 30 17:23:18 2017 +0800 RDMA/hns: Fix inconsistent warning This patch fixes smatch inconsistent warning as below: drivers/infiniband/hw/hns/hns_roce_hem.h:136 hns_roce_hem_first() warn: inconsistent indenting Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5caad67cb337a81ae6f579a04372865a4dfc0065 Author: Wei Hu(Xavier) Date: Wed Aug 30 17:23:17 2017 +0800 RDMA/hns: Replace condition statement using hardware version information This patch replaces condition statement to reduce usage of hardware version information in common driver. Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 08eb3018b6d91e0736cffba0a9a8c9aa1d2eb743 Author: Wei Hu(Xavier) Date: Wed Aug 30 17:23:16 2017 +0800 RDMA/hns: Add releasing resource operation in error branch This patch adds releasing resource operation in error branch of the function named hns_roce_table_get. Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hem.c | 2 ++ 1 file changed, 2 insertions(+) commit 3958cc564e1c5b97ddff7e12f95811a993a936e2 Author: Wei Hu(Xavier) Date: Wed Aug 30 17:23:15 2017 +0800 RDMA/hns: Configure the MTPT in hip08 The MTPT records the attribute of the registered MR. The MTPT format will be updated in hip08, and the MTPT should be configured. This patch is to configure the MTPT for the registered MR in hip08. Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 94 ++++++++++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 68 +++++++++++++++++++++ 2 files changed, 162 insertions(+) commit 2d40788825acf8abc609740e1f89a4df77dc2f00 Author: Wei Hu(Xavier) Date: Wed Aug 30 17:23:14 2017 +0800 RDMA/hns: Add support for processing send wr and receive wr This patch is implementing for posting send request and receiving request for hip08 RoCE driver. such as post send verbs and post recv verbs. Signed-off-by: Lijun Ou Signed-off-by: Shaobo Xu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cq.c | 4 +- drivers/infiniband/hw/hns/hns_roce_device.h | 2 + drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 4 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 325 ++++++++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 72 ++++++ drivers/infiniband/hw/hns/hns_roce_qp.c | 5 +- 6 files changed, 406 insertions(+), 6 deletions(-) commit 926a01dc000d76df3f5b110dddcebfb517b8f57b Author: Wei Hu(Xavier) Date: Wed Aug 30 17:23:13 2017 +0800 RDMA/hns: Add QP operations support for hip08 SoC This patch implements QP operations for hip08 RoCE driver and fixes some checkpatch warning about print message in QP function. The QP operations includes create QP, query QP, modify QP and destroy QP. Signed-off-by: Lijun Ou Signed-off-by: Shaobo Xu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cmd.h | 4 + drivers/infiniband/hw/hns/hns_roce_device.h | 11 + drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1306 +++++++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 450 +++++++++ drivers/infiniband/hw/hns/hns_roce_qp.c | 140 ++- 6 files changed, 1883 insertions(+), 29 deletions(-) commit 93aa21871b91ff1fed9e4b2ce444d0d978deddfc Author: Wei Hu(Xavier) Date: Wed Aug 30 17:23:12 2017 +0800 RDMA/hns: Add CQ operations support for hip08 RoCE driver This patch adds CQ relevant operations for hip08 RoCE driver, such as create CQ, destroy CQ, poll CQ and Request Completion Notification(req_notify_cq). Signed-off-by: Lijun Ou Signed-off-by: Shaobo Xu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cq.c | 28 +-- drivers/infiniband/hw/hns/hns_roce_device.h | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 376 ++++++++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 222 ++++++++++++++++ 5 files changed, 614 insertions(+), 14 deletions(-) commit 7afddafa8403842a2dd50cd6c696a80b1f74a22f Author: Wei Hu(Xavier) Date: Wed Aug 30 17:23:11 2017 +0800 RDMA/hns: Configure mac&gid and user access region for hip08 RoCE driver In hip08, the user access region(UAR) pfn is calculated from pci device memory resource. This patch mainly sets mac and gid table by configuring the relevant registers and updates the uar pfn for hip08 SoC. Signed-off-by: Lijun Ou Signed-off-by: Shaobo Xu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_common.h | 9 ++++++ drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 49 +++++++++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 7 +++++ drivers/infiniband/hw/hns/hns_roce_pd.c | 16 +++++++--- 4 files changed, 76 insertions(+), 5 deletions(-) commit ff795f71787c945d6abb6eabe95475bf9cbd6083 Author: Wei Hu(Xavier) Date: Wed Aug 30 17:23:10 2017 +0800 RDMA/hns: Support multi hop addressing for PBL in hip08 The block base address in the MR can be retrieved by the block number which is calculated with the VA in the SGE and MTPT. In hip08, the PBL supports multi hop addressing to retrieve the block base address by the block number. This patch is to add the interfaces in the MR to support multi hop addressing for the PBL. Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 16 ++ drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 + drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 1 + drivers/infiniband/hw/hns/hns_roce_mr.c | 422 ++++++++++++++++++++++++++-- 4 files changed, 418 insertions(+), 24 deletions(-) commit 9766edc34ea17a8264b76696367aeb88a52ab108 Author: Shaobo Xu Date: Wed Aug 30 17:23:09 2017 +0800 RDMA/hns: Split CQE from MTT in hip08 In hip08, the SQWQE/SGE/RQWQE and CQE have different hop num and page size, so we need to manage the base address table of the SQWQE/SGE/RQWQE and CQE separately. This patch is to split CQE from MTT(SQWQE/SGE/RQWQE). Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cq.c | 15 ++++++- drivers/infiniband/hw/hns/hns_roce_device.h | 14 ++++-- drivers/infiniband/hw/hns/hns_roce_hem.c | 3 ++ drivers/infiniband/hw/hns/hns_roce_main.c | 17 ++++++++ drivers/infiniband/hw/hns/hns_roce_mr.c | 66 ++++++++++++++++++++++------- drivers/infiniband/hw/hns/hns_roce_qp.c | 2 + 6 files changed, 98 insertions(+), 19 deletions(-) commit 6a93c77afe088225363f6941a29fff415b1f7172 Author: Shaobo Xu Date: Wed Aug 30 17:23:08 2017 +0800 RDMA/hns: Update the interfaces for MTT/CQE multi hop addressing in hip08 The MTT(SQWQE/SGE/RQWQE) and CQE in hip08 can support multi hop addressing. The address of MTT/CQE can be retrieved by the BT (Base Address Table) with multi hop addressing. This patch is to update the interfaces in HEM to support multi hop addressing for the MTT/CQE. Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cq.c | 12 +-- drivers/infiniband/hw/hns/hns_roce_device.h | 6 ++ drivers/infiniband/hw/hns/hns_roce_hem.c | 119 +++++++++++++++++++++++----- drivers/infiniband/hw/hns/hns_roce_hem.h | 11 ++- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 8 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 6 ++ drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 1 + drivers/infiniband/hw/hns/hns_roce_mr.c | 16 ++-- 8 files changed, 143 insertions(+), 36 deletions(-) commit a81fba28136d7596bc31bf705d39d4b97cf3f0a7 Author: Wei Hu(Xavier) Date: Wed Aug 30 17:23:07 2017 +0800 RDMA/hns: Configure BT BA and BT attribute for the contexts in hip08 BT is used to retrieve the addresses of the contexts(QPC/MPT/CQC/SRQC) in memory. In order to support multi hop addressing for the contexts, the BT BA should be configured by mailbox, and the BT attribution will be set by command. This patch is to configure the BT BA and BT attribution for the contexts. Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cmd.h | 46 +++++++ drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 198 ++++++++++++++++++++++++++++- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 49 +++++++ 3 files changed, 292 insertions(+), 1 deletion(-) commit a25d13cbe816a6f8a44382273d3fdd8276318777 Author: Shaobo Xu Date: Wed Aug 30 17:23:06 2017 +0800 RDMA/hns: Add the interfaces to support multi hop addressing for the contexts in hip08 The contexts (QPC/MTPT/CQC/SRQC) in hip08 can support multi hop addressing. The address of context can be retrieved by the BT (Base Address Table) with multi hop addressing. The first hop BT BA can be retrieved from the RAM in the chip by the bt_idx and bt_num. This patch is to add the interfaces in HEM to support multi hop addressing for the contexts. Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 23 +- drivers/infiniband/hw/hns/hns_roce_hem.c | 578 +++++++++++++++++++++++++++- drivers/infiniband/hw/hns/hns_roce_hem.h | 23 ++ drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 13 + drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 3 + 6 files changed, 630 insertions(+), 12 deletions(-) commit a680f2f376fe70bad85f350059be995c9dc2a802 Author: Wei Hu(Xavier) Date: Wed Aug 30 17:23:05 2017 +0800 RDMA/hns: Add mailbox's implementation for hip08 RoCE driver In hip08 SoC, the hardware implementation of mailbox command has changed with hip06 SoC. As a result, it adjusts the architecture of the command code and implements the interfaces of mailbox for hip08 SoC. Signed-off-by: Lijun Ou Signed-off-by: Shaobo Xu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_cmd.c | 98 ++--------------------------- drivers/infiniband/hw/hns/hns_roce_common.h | 1 + drivers/infiniband/hw/hns/hns_roce_device.h | 5 +- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 75 ++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_hw_v1.h | 5 ++ drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 84 +++++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 20 ++++++ 7 files changed, 195 insertions(+), 93 deletions(-) commit cfc85f3e4b7f9f2d66d0816e3121c4c8fcde1448 Author: Wei Hu(Xavier) Date: Wed Aug 30 17:23:04 2017 +0800 RDMA/hns: Add profile support for hip08 driver The profile's content mainly set some specifications and obtain some hardware resources by implementing the relative commands. Because max sge num of send queue is not the same with receive queue in hip08, we modified the calculation of props->max_sge in query_device ops. Signed-off-by: Lijun Ou Signed-off-by: Shaobo Xu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 8 +- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 4 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 246 ++++++++++++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 161 ++++++++++++++++++ drivers/infiniband/hw/hns/hns_roce_main.c | 8 +- 5 files changed, 423 insertions(+), 4 deletions(-) commit a04ff739f2a93d0564a5c71bfb3f459a3c06dbb8 Author: Wei Hu(Xavier) Date: Wed Aug 30 17:23:03 2017 +0800 RDMA/hns: Add command queue support for hip08 RoCE driver The command queue is the configuration queue. The software configures hardware by filling the commands into command queues. It includes command send queue and receive queue. In hip08 RoCE engine, It supports to configure and query registers by command queue. Signed-off-by: Lijun Ou Signed-off-by: Shaobo Xu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_common.h | 13 ++ drivers/infiniband/hw/hns/hns_roce_device.h | 2 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 281 +++++++++++++++++++++++++++- drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 111 +++++++++++ drivers/infiniband/hw/hns/hns_roce_main.c | 14 ++ 5 files changed, 420 insertions(+), 1 deletion(-) commit 13ca970e3692e498e1544d0c5141f20da9a8e89d Author: Wei Hu(Xavier) Date: Wed Aug 30 17:23:02 2017 +0800 RDMA/hns: Modify assignment device variable to support both PCI device and platform device In order to support the scalability of the hardware version, the features irrelevant to the hardware will be located in the hns-roce.ko, and the hardware relevant operations will be located in hns_roce_hw_v1.ko or hns_roce_hw_v2.ko based on the series chips. The hip08 RoCE engine is a PCI device, hip06 RoCE engine is a platform device. In order to support both platform device and PCI device, We replace &hr_dev->pdev->dev with hr_dev->dev in hns-roce.ko as belows: Before modification: struct device *dev = hr_dev->dev; After modification: struct device *dev = &hr_dev->pdev->dev; The related structure: struct hns_roce_dev { ... struct platform_device *pdev; struct pci_dev *pci_dev; struct device *dev; ... } Signed-off-by: Lijun Ou Signed-off-by: Shaobo Xu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_ah.c | 2 +- drivers/infiniband/hw/hns/hns_roce_alloc.c | 6 +++--- drivers/infiniband/hw/hns/hns_roce_cmd.c | 6 +++--- drivers/infiniband/hw/hns/hns_roce_cq.c | 12 ++++++------ drivers/infiniband/hw/hns/hns_roce_hem.c | 12 ++++++------ drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 + drivers/infiniband/hw/hns/hns_roce_main.c | 12 ++++++------ drivers/infiniband/hw/hns/hns_roce_mr.c | 8 ++++---- drivers/infiniband/hw/hns/hns_roce_pd.c | 2 +- drivers/infiniband/hw/hns/hns_roce_qp.c | 20 ++++++++++---------- 10 files changed, 41 insertions(+), 40 deletions(-) commit dd74282df573192e201ee716c8b621eb322c4fab Author: Wei Hu(Xavier) Date: Wed Aug 30 17:23:01 2017 +0800 RDMA/hns: Initialize the PCI device for hip08 RoCE The hip08 RoCE engine is a PCI device. This patch mainly obtains some information of PCI device for hip08 RoCE from hns3 NIC driver in the initialization. Signed-off-by: Lijun Ou Signed-off-by: Shaobo Xu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/Kconfig | 10 ++ drivers/infiniband/hw/hns/Makefile | 4 + drivers/infiniband/hw/hns/hns_roce_device.h | 2 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 151 ++++++++++++++++++++++++++++ 4 files changed, 167 insertions(+) commit 016a0059d29d93aa5de4eb7bd535da672ac89ae1 Author: Wei Hu(Xavier) Date: Wed Aug 30 17:23:00 2017 +0800 RDMA/hns: Move priv in order to add multiple hns_roce support Move the data member called priv from hns_roce_hw to hns_roce_dev structure in order to support multiple hns_roce devices in one system at the same time. For example, there are two hip06 engines in the system. Signed-off-by: Lijun Ou Signed-off-by: Shaobo Xu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/hns_roce_device.h | 2 +- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 61 ++++++++++++++++------------- 2 files changed, 35 insertions(+), 28 deletions(-) commit 08805fdbeb2d9300c09e681793518fb4da522235 Author: Wei Hu(Xavier) Date: Wed Aug 30 17:22:59 2017 +0800 RDMA/hns: Split hw v1 driver from hns roce driver The hardware relevant definitions and operations are implemented in hns_roce_hw_v* file. According to the diversity chips, the file is named as hns_roce_hw_v1.c or hns_roce_hw_v2.c etc. The general software process flow, common structures and allocated algorithms are implemented in other files located in hns roce driver. In order to support the scalability of the hardware version, the common driver features are in the hns-roce.ko, and the hardware relevant operations are in hns_roce_hw_v1.ko or hns_roce_hw_v2.ko based on the series chips. Signed-off-by: Lijun Ou Signed-off-by: Shaobo Xu Signed-off-by: Wei Hu (Xavier) Signed-off-by: Doug Ledford drivers/infiniband/hw/hns/Kconfig | 15 +- drivers/infiniband/hw/hns/Makefile | 4 +- drivers/infiniband/hw/hns/hns_roce_alloc.c | 2 + drivers/infiniband/hw/hns/hns_roce_cmd.c | 3 + drivers/infiniband/hw/hns/hns_roce_cq.c | 3 + drivers/infiniband/hw/hns/hns_roce_device.h | 6 +- drivers/infiniband/hw/hns/hns_roce_hem.c | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 244 +++++++++++++++++++++++- drivers/infiniband/hw/hns/hns_roce_main.c | 282 +++++----------------------- drivers/infiniband/hw/hns/hns_roce_mr.c | 3 + drivers/infiniband/hw/hns/hns_roce_pd.c | 2 + drivers/infiniband/hw/hns/hns_roce_qp.c | 12 ++ 12 files changed, 330 insertions(+), 247 deletions(-) commit 9949b355dc1c259b4ed3c092b899b7e9cf166236 Author: Meghana Madhyastha Date: Wed Sep 27 16:21:23 2017 +0530 drm/Documentation: Refine TODO for backlight helpers in tinydrm Add a summary which resulted from discussions on what should be done to refactor backlight helpers in tinydrm so that they can be used in other drivers as well. Signed-off-by: Meghana Madhyastha Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170927105116.GA30391@meghana-HP-Pavilion-Notebook Documentation/gpu/todo.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 516726d46d84096b006e2648d8700d1a04d021cc Author: Helge Deller Date: Wed Sep 6 22:27:52 2017 +0200 i915: Use %pS printk format for direct addresses Use the %pS printk format for printing symbols from direct addresses. This is important for the ia64, ppc64 and parisc64 architectures, while on other architectures there is no difference between %pS and %pF. Fix it for consistency across the kernel. Signed-off-by: Helge Deller Cc: Jani Nikula Cc: David Airlie Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1504729681-3504-6-git-send-email-deller@gmx.de drivers/gpu/drm/i915/intel_breadcrumbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 73d2a3cef4bb6d93cb83faedf71d31ca3af0078c Author: Russell King Date: Tue Sep 26 15:10:02 2017 +0100 dmaengine: sa11x0: add DMA filters Add DMA filters for the sa11x0 DMA channels. This will allow us to migrate away from directly using the DMA filter function in drivers. Signed-off-by: Russell King Signed-off-by: Vinod Koul drivers/dma/sa11x0-dma.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 6e10d19b145747c9667d40b7cf079b42d33c4c28 Author: Pierre-Yves MORDRET Date: Fri Sep 22 09:31:31 2017 +0200 dt-bindings: stm32-dma: add a property to handle STM32 DMAMUX STM32 DMA controller has to exposed its number of request line to be addressed via STM32 DMAMUX. Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET Acked-by: Rob Herring Signed-off-by: Vinod Koul Documentation/devicetree/bindings/dma/stm32-dma.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit df7e762db5f6c8dbd9e480f1c9ef9851de346657 Author: Pierre-Yves MORDRET Date: Fri Sep 22 09:31:30 2017 +0200 dmaengine: Add STM32 DMAMUX driver This patch implements the STM32 DMAMUX driver. The DMAMUX request multiplexer allows routing a DMA request line between the peripherals and the DMA controllers of the product. The routing function is ensured by a programmable multi-channel DMA request line multiplexer. Each channel selects a unique DMA request line, unconditionally or synchronously with events from its DMAMUX synchronization inputs. The DMAMUX may also be used as a DMA request generator from programmable events on its input trigger signals Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Vinod Koul drivers/dma/Kconfig | 9 ++ drivers/dma/Makefile | 1 + drivers/dma/stm32-dmamux.c | 327 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 337 insertions(+) commit da6789756d4e7755bc389389770335927fa96ad0 Author: Pierre-Yves MORDRET Date: Fri Sep 22 09:31:29 2017 +0200 dt-bindings: Document the STM32 DMAMUX bindings This patch adds the documentation of device tree bindings for the STM32 DMAMUX. Signed-off-by: M'boumba Cedric Madianga Signed-off-by: Pierre-Yves MORDRET Acked-by: Rob Herring Signed-off-by: Vinod Koul .../devicetree/bindings/dma/stm32-dmamux.txt | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) commit 15cc3ae001873845b5d842e212478a6570c7d938 Author: Qiuxu Zhuo Date: Wed Sep 13 18:42:14 2017 +0800 EDAC, sb_edac: Don't create a second memory controller if HA1 is not present Yi Zhang reported the following failure on a 2-socket Haswell (E5-2603v3) server (DELL PowerEdge 730xd): EDAC sbridge: Some needed devices are missing EDAC MC: Removed device 0 for sb_edac.c Haswell SrcID#0_Ha#0: DEV 0000:7f:12.0 EDAC MC: Removed device 1 for sb_edac.c Haswell SrcID#1_Ha#0: DEV 0000:ff:12.0 EDAC sbridge: Couldn't find mci handler EDAC sbridge: Couldn't find mci handler EDAC sbridge: Failed to register device with error -19. The refactored sb_edac driver creates the IMC1 (the 2nd memory controller) if any IMC1 device is present. In this case only HA1_TA of IMC1 was present, but the driver expected to find HA1/HA1_TM/HA1_TAD[0-3] devices too, leading to the above failure. The document [1] says the 'E5-2603 v3' CPU has 4 memory channels max. Yi Zhang inserted one DIMM per channel for each CPU, and did random error address injection test with this patch: 4024 addresses fell in TOLM hole area 12715 addresses fell in CPU_SrcID#0_Ha#0_Chan#0_DIMM#0 12774 addresses fell in CPU_SrcID#0_Ha#0_Chan#1_DIMM#0 12798 addresses fell in CPU_SrcID#0_Ha#0_Chan#2_DIMM#0 12913 addresses fell in CPU_SrcID#0_Ha#0_Chan#3_DIMM#0 12674 addresses fell in CPU_SrcID#1_Ha#0_Chan#0_DIMM#0 12686 addresses fell in CPU_SrcID#1_Ha#0_Chan#1_DIMM#0 12882 addresses fell in CPU_SrcID#1_Ha#0_Chan#2_DIMM#0 12934 addresses fell in CPU_SrcID#1_Ha#0_Chan#3_DIMM#0 106400 addresses were injected totally. The test result shows that all the 4 channels belong to IMC0 per CPU, so the server really only has one IMC per CPU. In the 1st page of chapter 2 in datasheet [2], it also says 'E5-2600 v3' implements either one or two IMCs. For CPUs with one IMC, IMC1 is not used and should be ignored. Thus, do not create a second memory controller if the key HA1 is absent. [1] http://ark.intel.com/products/83349/Intel-Xeon-Processor-E5-2603-v3-15M-Cache-1_60-GHz [2] https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/xeon-e5-v3-datasheet-vol-2.pdf Reported-and-tested-by: Yi Zhang Signed-off-by: Qiuxu Zhuo Cc: Tony Luck Cc: linux-edac Fixes: e2f747b1f42a ("EDAC, sb_edac: Assign EDAC memory controller per h/w controller") Link: http://lkml.kernel.org/r/20170913104214.7325-1-qiuxu.zhuo@intel.com [ Massage commit message. ] Signed-off-by: Borislav Petkov drivers/edac/sb_edac.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 165d3ad884df4b30c3564a478b457b499345886f Author: Tony Luck Date: Mon Sep 25 16:39:38 2017 -0700 x86/intel_rdt: Add documentation for "info/last_cmd_status" New file in the "info" directory helps diagnose what went wrong when using the /sys/fs/resctrl file system Signed-off-by: Tony Luck Signed-off-by: Thomas Gleixner Cc: Fenghua Yu Cc: Steven Rostedt Cc: Vikas Shivappa Cc: Boris Petkov Cc: Reinette Chatre Link: https://lkml.kernel.org/r/387e78e444582403c2454479e576caf5721a363f.1506382469.git.tony.luck@intel.com Documentation/x86/intel_rdt_ui.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) commit cfd0f34e4cd5f1a5ad7000a3104c37886a70bca9 Author: Tony Luck Date: Mon Sep 25 16:39:37 2017 -0700 x86/intel_rdt: Add diagnostics when making directories Mostly this is about running out of RMIDs or CLOSIDs. Other errors are various internal errors. Signed-off-by: Tony Luck Signed-off-by: Thomas Gleixner Cc: Fenghua Yu Cc: Steven Rostedt Cc: Vikas Shivappa Cc: Boris Petkov Cc: Reinette Chatre Link: https://lkml.kernel.org/r/027cf1ffb3a3695f2d54525813a1d644887353cf.1506382469.git.tony.luck@intel.com arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) commit 94457b36e8a5026443707b48dcf54b204e098fd7 Author: Tony Luck Date: Mon Sep 25 16:39:36 2017 -0700 x86/intel_rdt: Add diagnostics when writing the cpus file Can't add a cpu to a monitor group unless it belongs to parent group. Can't delete cpus from the default group. Signed-off-by: Tony Luck Signed-off-by: Thomas Gleixner Cc: Fenghua Yu Cc: Steven Rostedt Cc: Vikas Shivappa Cc: Boris Petkov Cc: Reinette Chatre Link: https://lkml.kernel.org/r/757a869a25e9fc1b7a2e9bc43e1159455c1964a0.1506382469.git.tony.luck@intel.com arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 29e74f35b2fed0ca3e8b31db157e1d183e9d0819 Author: Tony Luck Date: Mon Sep 25 16:39:35 2017 -0700 x86/intel_rdt: Add diagnostics when writing the tasks file About the only tricky case is trying to move a task into a monitor group that is a subdirectory of a different control group. But cover the simple cases too. Signed-off-by: Tony Luck Signed-off-by: Thomas Gleixner Cc: Fenghua Yu Cc: Steven Rostedt Cc: Vikas Shivappa Cc: Boris Petkov Cc: Reinette Chatre Link: https://lkml.kernel.org/r/f1841cce6a242aed37cb926dee8942727331bf78.1506382469.git.tony.luck@intel.com arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c | 4 +--- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) commit c377dcfbee808efdb66cf1bb6b9f06fa26b2ad0a Author: Tony Luck Date: Mon Sep 25 16:39:34 2017 -0700 x86/intel_rdt: Add diagnostics when writing the schemata file Save helpful descriptions of what went wrong when writing a schemata file. Signed-off-by: Tony Luck Signed-off-by: Thomas Gleixner Cc: Fenghua Yu Cc: Steven Rostedt Cc: Vikas Shivappa Cc: Boris Petkov Cc: Reinette Chatre Link: https://lkml.kernel.org/r/9d6cef757dc88639c8ab47f1e7bc1b081a84bb88.1506382469.git.tony.luck@intel.com arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c | 49 ++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 11 deletions(-) commit 9b3a7fd0f5fb583a8fdda678e8a87dff1717f7f3 Author: Tony Luck Date: Mon Sep 25 16:39:33 2017 -0700 x86/intel_rdt: Add framework for better RDT UI diagnostics Commands are given to the resctrl file system by making/removing directories, or by writing to files. When something goes wrong the user is generally left wondering why they got: bash: echo: write error: Invalid argument Add a new file "last_cmd_status" to the "info" directory that will give the user some better clues on what went wrong. Provide functions to clear and update last_cmd_status which check that we hold the rdtgroup_mutex. [ tglx: Made last_cmd_status static and folded back the hunk from patch 3 which replaces the open coded access to last_cmd_status with the accessor function ] Signed-off-by: Tony Luck Signed-off-by: Thomas Gleixner Cc: Fenghua Yu Cc: Steven Rostedt Cc: Vikas Shivappa Cc: Boris Petkov Cc: Reinette Chatre Link: https://lkml.kernel.org/r/edc4e0e9741eee89bba569f0021b1b2662fd9508.1506382469.git.tony.luck@intel.com arch/x86/kernel/cpu/intel_rdt.h | 7 ++++ arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 56 ++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) commit 7e44fc289d54aa3f1f37d6c9e5157f79011c6476 Author: Chris Wilson Date: Tue Sep 26 11:17:19 2017 +0100 drm/i915/execlists: Notify context-out for lost requests When cancelling requests, also send the notification to any listeners (gvt) that the request is no longer scheduled on hw. They may require to keep the in/out exactly balanced, and so the reuse after the reset may confuse the listener. Fixes: 221ab9719bf3 ("drm/i915/execlists: Unwind incomplete requests on resets") Signed-off-by: Chris Wilson Cc: "Zhenyu Wang" Cc: "Wang, Zhi A" Cc: Michał Winiarski Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20170926101720.9479-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_lrc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ffeeeed0aee9f36635c8642ff40de863bbb4224a Author: Aishwarya Pant Date: Tue Sep 26 22:34:00 2017 +0530 drm/core: clean up references to drm_dev_unref() This is a continuation of a previous commit ("drm: introduce drm_dev_{get/put} functions") to replace all references to drm_dev_unref() in drm core files with drm_dev_put(). Signed-off-by: Aishwarya Pant Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170926170400.GA7671@aishwarya drivers/gpu/drm/drm_pci.c | 2 +- drivers/gpu/drm/drm_prime.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d9c8022475f9144a66e03df5d4818a3377df8d97 Author: Haneen Mohammed Date: Tue Sep 26 15:08:35 2017 -0600 drm/doc: Remove todo item about "This is gross" comment This patch remove the todo item "Use new IDR deletion interface to clean up drm_gem_handle_delete()" after it has been resolved with the commit "drm: Remove obsolete "This is gross" comment". Signed-off-by: Haneen Mohammed Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170926210835.GA4622@Haneen Documentation/gpu/todo.rst | 6 ------ 1 file changed, 6 deletions(-) commit 92d378fbb6e213fca6e54d71b28326879af6df28 Author: Corentin LABBE Date: Tue Sep 26 09:22:31 2017 +0200 arm64: allwinner: a64: Fix node with unit name and no reg property This patch fix the warning "xxx has a unit name, but no reg property" by removing "@0" from such node Signed-off-by: Corentin Labbe Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d6c9da125d6125b5b4eb0b7d635ded2e553943cd Author: Corentin LABBE Date: Tue Sep 26 09:22:30 2017 +0200 arm64: allwinner: a64: Fix simple-bus unit address format error This patch remove leading 0 of unit address and so remove lots of warning when building DT with W=1. Signed-off-by: Corentin Labbe Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit e279312d952860105e163ad2a4162fbe396570fb Author: Corentin LABBE Date: Tue Sep 26 09:22:32 2017 +0200 ARM: dts: sun8i: a83t: Fix simple-bus unit address format error This patch remove leading 0 of unit address and so remove lots of warning when building DT with W=1. Signed-off-by: Corentin Labbe Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-a83t.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c71ec4055d0050a5bef525c31cfc51978ea6d089 Author: Corentin LABBE Date: Tue Sep 26 09:22:24 2017 +0200 ARM: dts: sun8i: h3: Fix node with unit name and no reg property This patch fixes the warning "xxx has a unit name, but no reg property" by removing "@0" from such node. 6 board files are fixed. Each has the same aforementioned issue in pinmux nodes. These include the Nano Pi family base dtsi file, the Orange Pi 2, Orange Pi Lite, Orange Pi One, Orange Pi PC, and Orange Pi Plus. Signed-off-by: Corentin Labbe Acked-by: Maxime Ripard [wens@csie.org: Squashed 6 patches together; boards named in commit log] Signed-off-by: Chen-Yu Tsai arch/arm/boot/dts/sun8i-h3-nanopi.dtsi | 8 ++++---- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 8 ++++---- arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts | 6 +++--- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 6 +++--- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 6 +++--- arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) commit 1e66e2b86293ff1ded32104ac0ad26a7f08ec439 Author: Borislav Petkov Date: Tue Sep 26 19:08:45 2017 +0200 x86/apic: Use dead_cpu instead of current CPU when cleaning up x2apic_dead_cpu() cleans up the leftovers of a CPU which got unplugged, but instead of clearing the dead cpu bit in the cluster mask it clears the current (alive) cpu bit. Noticed because smp_processor_id() is called in preemptible code and triggers a debug warning. [ tglx: Rewrote changelog ] Fixes: 023a611748fd ("x86/apic/x2apic: Simplify cluster management") Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20170926170845.13955-1-bp@alien8.de arch/x86/kernel/apic/x2apic_cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c71206d060d4e84896f3bd680319b29fe88b8e8 Author: Dou Liyang Date: Wed Sep 13 17:17:54 2017 +0800 ACPI/init: Invoke early ACPI initialization earlier acpi_early_init() unmaps the temporary ACPI Table mappings which are used in the early startup code and prepares for permanent table mappings. Before the consolidation of the x86 APIC setup code the invocation of acpi_early_init() happened before the interrupt remapping unit was initialized. With the rework the remapping unit initialization moved in front of acpi_early_init() which causes an ACPI warning when the ACPI root tables get reallocated afterwards. Invoke acpi_early_init() before late_time_init() which is before the access to the DMAR tables happens. Fixes: 935356cecda8 ("x86/apic: Initialize interrupt mode after timer init") Reported-by: Xiaolong Ye Signed-off-by: Dou Liyang Cc: Tony Luck Cc: linux-ia64@vger.kernel.org Cc: bhe@redhat.com Cc: Fenghua Yu Cc: Michael Ellerman Cc: "Rafael J. Wysocki" Cc: Will Deacon Cc: linux-acpi@vger.kernel.org Cc: bp@alien8.de Cc: Lv" Cc: yinghai@kernel.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lkml.kernel.org/r/1505294274-441-1-git-send-email-douly.fnst@cn.fujitsu.com Signed-off-by: Thomas Gleixner init/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c05984459ec55056857bee32ecb01653c6b8f84 Author: Maxime Bellengé Date: Sat Sep 23 18:23:37 2017 +0200 platform/x86: asus-wmi: Add lightbar led support Some Asus laptops (ROG series for example) are provided with a lightbar behind the monitor. This patch make possible to switch it on and off. This lightbar works exactly like any other led. Signed-off-by: Maxime Bellengé [dvhart: fix commit message format and variable declaration order] Signed-off-by: Darren Hart (VMware) drivers/platform/x86/asus-wmi.c | 63 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit 1ca94d7936a409ff263b6e0225fefea8956f4291 Merge: 14a0d03 856f5b1 Author: David S. Miller Date: Tue Sep 26 21:27:36 2017 -0700 Merge branch 'nfp-flower-vxlan-tunnel-offload' Simon Horman says: ==================== nfp: flower vxlan tunnel offload John says: This patch set allows offloading of TC flower match and set tunnel fields to the NFP. The initial focus is on VXLAN traffic. Due to the current state of the NFP firmware, only VXLAN traffic on well known port 4789 is handled. The match and action fields must explicity set this value to be supported. Tunnel end point information is also offloaded to the NFP for both encapsulation and decapsulation. The NFP expects 3 separate data sets to be supplied. For decapsulation, 2 separate lists exist; a list of MAC addresses referenced by an index comprised of the port number, and a list of IP addresses. These IP addresses are not connected to a MAC or port. The MAC addresses can be written as a block or one at a time (because they have an index, previous values can be overwritten) while the IP addresses are always written as a list of all the available IPs. Because the MAC address used as a tunnel end point may be associated with a physical port or may be a virtual netdev like an OVS bridge, we do not know which addresses should be offloaded. For this reason, all MAC addresses of active netdevs are offloaded to the NFP. A notifier checks for changes to any currently offloaded MACs or any new netdevs that may occur. For IP addresses, the tunnel end point used in the rules is known as the destination IP address must be specified in the flower classifier rule. When a new IP address appears in a rule, the IP address is offloaded. The IP is removed from the offloaded list when all rules matching on that IP are deleted. For encapsulation, a next hop table is updated on the NFP that contains the source/dest IPs, MACs and egress port. These are written individually when requested. If the NFP tries to encapsulate a packet but does not know the next hop, then is sends a request to the host. The host carries out a route lookup and populates the given entry on the NFP table. A notifier also exists to check for any links changing or going down in the kernel next hop table. If an offloaded next hop entry is removed from the kernel then it is also removed on the NFP. The NFP periodically sends a message to the host telling it which tunnel ports have packets egressing the system. The host uses this information to update the used value in the neighbour entry. This means that, rather than expire when it times out, the kernel will send an ARP to check if the link is still live. From an NFP perspective, this means that valid entries will not be removed from its next hop table. ==================== Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 856f5b135758ad80053a49f7ce9d1dc0166e3006 Author: John Hurley Date: Mon Sep 25 12:23:41 2017 +0200 nfp: flower vxlan neighbour keep-alive Periodically receive messages containing the destination IPs of tunnels that have recently forwarded traffic. Update the neighbour entries 'used' value for these IPs next hop. This prevents the neighbour entry from expiring on timeout but rather signals an ARP to verify the connection. From an NFP perspective, packets will not fall back mid-flow unless the link is verified to be down. Signed-off-by: John Hurley Reviewed-by: Simon Horman Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 3 + drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 1 + drivers/net/ethernet/netronome/nfp/flower/main.h | 1 + .../ethernet/netronome/nfp/flower/tunnel_conf.c | 64 ++++++++++++++++++++++ 4 files changed, 69 insertions(+) commit 8e6a9046b66a7dfb11ae8be226afaaf417649411 Author: John Hurley Date: Mon Sep 25 12:23:40 2017 +0200 nfp: flower vxlan neighbour offload Receive a request when the NFP does not know the next hop for a packet that is to be encapsulated in a VXLAN tunnel. Do a route lookup, determine the next hop entry and update neighbour table on NFP. Monitor the kernel neighbour table for link changes and update NFP with relevant information. Overwrite routes with zero values on the NFP when they expire. Signed-off-by: John Hurley Reviewed-by: Simon Horman 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 | 2 + drivers/net/ethernet/netronome/nfp/flower/main.h | 7 + .../ethernet/netronome/nfp/flower/tunnel_conf.c | 253 +++++++++++++++++++++ 4 files changed, 268 insertions(+) commit 2d9ad71a8ce67eea9ee38512a215e1893bd5cf87 Author: John Hurley Date: Mon Sep 25 12:23:39 2017 +0200 nfp: offload vxlan IPv4 endpoints of flower rules Maintain a list of IPv4 addresses used as the tunnel destination IP match fields in currently active flower rules. Offload the entire list of NFP_FL_IPV4_ADDRS_MAX (even if some are unused) when new IPs are added or removed. The NFP should only be aware of tunnel end points that are currently used by rules on the device Signed-off-by: John Hurley Reviewed-by: Simon Horman Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 1 + drivers/net/ethernet/netronome/nfp/flower/main.h | 7 ++ drivers/net/ethernet/netronome/nfp/flower/match.c | 14 ++- .../net/ethernet/netronome/nfp/flower/offload.c | 4 + .../ethernet/netronome/nfp/flower/tunnel_conf.c | 120 +++++++++++++++++++++ 5 files changed, 143 insertions(+), 3 deletions(-) commit fd0dd1ab1e107369c950796bb9b0e8eab6134bf1 Author: John Hurley Date: Mon Sep 25 12:23:38 2017 +0200 nfp: offload flower vxlan endpoint MAC addresses Generate a list of MAC addresses of netdevs that could be used as VXLAN tunnel end points. Give offloaded MACs an index for storage on the NFP in the ranges: 0x100-0x1ff physical port representors 0x200-0x2ff VF port representors 0x300-0x3ff other offloads (e.g. vxlan netdevs, ovs bridges) Assign phys and vf indexes based on unique 8 bit values in the port num. Maintain list of other netdevs to ensure same netdev is not offloaded twice and each gets a unique ID without exhausting the entries. Because the IDs are unique but constant for a netdev, any changes are implemented by overwriting the index on NFP. Signed-off-by: John Hurley Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/Makefile | 3 +- drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 7 - drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 9 + drivers/net/ethernet/netronome/nfp/flower/main.c | 13 + drivers/net/ethernet/netronome/nfp/flower/main.h | 18 + drivers/net/ethernet/netronome/nfp/flower/match.c | 7 + .../ethernet/netronome/nfp/flower/tunnel_conf.c | 374 +++++++++++++++++++++ 7 files changed, 423 insertions(+), 8 deletions(-) commit b27d6a95a70de551df828de2b658efd949a9864e Author: John Hurley Date: Mon Sep 25 12:23:37 2017 +0200 nfp: compile flower vxlan tunnel set actions Compile set tunnel actions for tc flower. Only support VXLAN and ensure a tunnel destination port of 4789 is used. Signed-off-by: John Hurley Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/action.c | 169 ++++++++++++++++++--- drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 31 +++- 2 files changed, 179 insertions(+), 21 deletions(-) commit 611aec101ab7c19755e8ea6d480f679aaffed5ad Author: John Hurley Date: Mon Sep 25 12:23:36 2017 +0200 nfp: compile flower vxlan tunnel metadata match fields Compile ovs-tc flower vxlan metadata match fields for offloading. Only support offload of tunnel data when the VXLAN port specifically matches well known port 4789. Signed-off-by: John Hurley Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 38 ++++++++++++ drivers/net/ethernet/netronome/nfp/flower/main.h | 2 + drivers/net/ethernet/netronome/nfp/flower/match.c | 60 +++++++++++++++++-- .../net/ethernet/netronome/nfp/flower/offload.c | 70 +++++++++++++++++++--- 4 files changed, 158 insertions(+), 12 deletions(-) commit 79ede4ae2d01b0282bfaaf761308a5ac485c8144 Author: John Hurley Date: Mon Sep 25 12:23:35 2017 +0200 nfp: add helper to get flower cmsg length Add a helper function that returns the length of the cmsg data when given the cmsg skb Signed-off-by: John Hurley Signed-off-by: Simon Horman Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 5 +++++ drivers/net/ethernet/netronome/nfp/flower/metadata.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) commit e139cd2a2ff842bd4a5d089b9d251ca62f58ecac Author: shaoyunl Date: Wed Sep 27 00:09:56 2017 -0400 drm/amdkfd: Improve multiple SDMA queues support per process HWS does not support over-subscription and the scheduler can not internally modify the engine. Driver needs to program the correct engine ID. Fix the queue and engine selection to create queues on alternating SDMA engines. This allows concurrent bi-directional DMA transfers in a process that creates two SDMA queues. Signed-off-by: shaoyun liu Signed-off-by: Felix Kuehling Signed-off-by: Oded Gabbay .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 29 +++++++++++----------- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 2 +- 2 files changed, 16 insertions(+), 15 deletions(-) commit 36c2d7eb5e99a4d765b1ec241823d563c71b1125 Author: Felix Kuehling Date: Wed Sep 27 00:09:55 2017 -0400 drm/amdkfd: Limit queue number per process and device to 127 HWS uses bit 7 in the queue number of the map process packet for an undocumented feature. Therefore the queue number per process and device must be 127 or less. Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit bc920fd4f4350a2e3094c165a77798d721f39e7b Author: Felix Kuehling Date: Wed Sep 27 00:09:54 2017 -0400 drm/amdkfd: Clean up process queue management Removed unused num_concurrent_processes. Implemented counting of queues in QPD. This makes counting the queue list repeatedly in several places unnecessary. Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 +++++ drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 7 +------ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 - drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 9 ++------- 4 files changed, 8 insertions(+), 14 deletions(-) commit e6f791b1b068b168c6f5203f29040b972d7fbc20 Author: Yong Zhao Date: Wed Sep 27 00:09:53 2017 -0400 drm/amdkfd: Compress unnecessary function parameters Signed-off-by: Yong Zhao Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 3 +-- drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c | 5 +++-- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 -- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 10 +++------- 4 files changed, 7 insertions(+), 13 deletions(-) commit 9fd3f1bfae6c6c75f0c8aedb5d499d74cdb52eb9 Author: Felix Kuehling Date: Wed Sep 27 00:09:52 2017 -0400 drm/amdkfd: Improve process termination handling Separate device queue termination from process queue manager termination. Unmap all queues at once instead of one at a time. Unmap device queues before the PASID is unbound, in the kfd_process_iommu_unbind_callback. When resetting wavefronts in non-HWS mode, do it before the VMID is released. Signed-off-by: Ben Goz Signed-off-by: shaoyun liu Signed-off-by: Amber Lin Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Signed-off-by: Oded Gabbay .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 185 ++++++++++++++++----- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 5 + drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 18 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 36 ++-- .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 37 +++-- 5 files changed, 200 insertions(+), 81 deletions(-) commit c4744e243c346b9e96857c6d11c716d31d475165 Author: Yong Zhao Date: Wed Sep 27 00:09:51 2017 -0400 drm/amdkfd: Avoid submitting an unnecessary packet to HWS v2: Make queue mapping interfaces more consistent by passing unmap filter parameters directly to execute_queues_cpsch, same as unmap_queues_cpsch. Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) commit 60a00956577cdc70c85260df89f336f15a2f054c Author: Felix Kuehling Date: Wed Sep 27 00:09:50 2017 -0400 drm/amdkfd: Fix MQD updates When a queue is mapped, the MQD is owned by the FW. The FW overwrites the MQD on the next unmap operation. Therefore the queue must be unmapped before updating the MQD. For the non-HWS case, also fix disabling of queues and creation of queues in disabled state. Signed-off-by: Oak Zeng Signed-off-by: Felix Kuehling Signed-off-by: Oded Gabbay .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 84 ++++++++++++++++------ 1 file changed, 62 insertions(+), 22 deletions(-) commit 4465f466c76774d3b5866929524cce6dd2d4dfb1 Author: Yong Zhao Date: Sun Oct 8 14:57:52 2017 +0300 drm/amdkfd: Pass filter params to unmap_queues_cpsch Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit ac30c78384885b209324dacc7b65bd8e9cc69fbf Author: Yong Zhao Date: Sun Oct 8 14:57:18 2017 +0300 drm/amdkfd: move locking outside of unmap_queues_cpsch Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 65 ++++++++++------------ 1 file changed, 28 insertions(+), 37 deletions(-) commit 7da2bcf87617fb00386ce61024e1c84d045b4e4f Author: Yong Zhao Date: Wed Sep 27 00:09:48 2017 -0400 drm/amdkfd: Avoid name confusion involved in queue unmapping When unmapping the queues from HW scheduler, there are two actions: reset and preempt. So naming the variables with only preempt is inapproriate. For functions such as destroy_queues_cpsch, what they do actually is to unmap the queues on HW scheduler rather than to destroy them. Change the name to reflect that fact. On the other hand, there is already a function called destroy_queue_cpsch() which exactly destroys a queue, and the name is very close to destroy_queues_cpsch(), resulting in confusion. Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 32 +++++++++++----------- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 18 ++++++------ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 20 +++++++------- 3 files changed, 35 insertions(+), 35 deletions(-) commit 14a0d032f4ecd9a82294665bd65b4a0480496198 Merge: 5b52e57 b292595 Author: David S. Miller Date: Tue Sep 26 20:26:45 2017 -0700 Merge branch 'mlxsw-pass-gact' Jiri Pirko says: ==================== mlxsw: Introduce support for "pass" gact action offloading Very simple patchset adds ability for user to insert filters with "pass" gact action and offload it. That allows scenarios like this: $ tc filter add dev enp3s0np19 ingress protocol ip pref 10 flower skip_sw dst_ip 192.168.101.0/24 action drop $ tc filter add dev enp3s0np19 ingress protocol ip pref 9 flower skip_sw dst_ip 192.168.101.1 action pass ==================== Signed-off-by: David S. Miller commit b2925957ec1a9349c6ac42fc5ac95bcf0dd4a6a0 Author: Jiri Pirko Date: Mon Sep 25 10:58:22 2017 +0200 mlxsw: spectrum_flower: Offload "ok" termination action If action is "gact_ok", offload it to HW. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 3b8e9238a8d194e82f0202a5fb68a63686ebe420 Author: Jiri Pirko Date: Mon Sep 25 10:58:21 2017 +0200 net: sched: introduce helper to identify gact pass action Introduce a helper called is_tcf_gact_pass which could be used to tell if the action is gact pass or not. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller include/net/tc_act/tc_gact.h | 5 +++++ 1 file changed, 5 insertions(+) commit 2a52a8c6e594cdc562f503492ba89ac7bc0c4074 Author: Jiri Pirko Date: Mon Sep 25 10:58:20 2017 +0200 mlxsw: spectrum_acl: Propagate errors from mlxsw_afa_block_jump/continue Propagate error instead of doing WARN_ON right away. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c | 14 ++++++++------ .../net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h | 4 ++-- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 6 +++--- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 10 +++++----- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c | 6 +++++- drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 4 +++- 6 files changed, 26 insertions(+), 18 deletions(-) commit 5b52e57c3d879d4654a15c1b42ec9623b04755fb Merge: f6fc5b4 69b2c16 Author: David S. Miller Date: Tue Sep 26 20:06:35 2017 -0700 Merge branch 'net-dsa-use-generic-slave-phydev' Vivien Didelot says: ==================== net: dsa: use generic slave phydev DSA currently stores a phy_device pointer in each slave private structure. This requires to implement our own ethtool ksettings accessors and such. This patchset removes the private phy_device in favor of the one provided in the net_device structure, and thus allows us to use the generic phy_ethtool_* functions. ==================== Tested-by: Florian Fainelli Signed-off-by: David S. Miller commit 69b2c1629649b1e765516c7b452797b9697de9ac Author: Vivien Didelot Date: Tue Sep 26 17:15:35 2017 -0400 net: dsa: use phy_ethtool_nway_reset Use phy_ethtool_nway_reset now that dsa_slave_nway_reset does exactly the same. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit aa62a8ca85cd05b4af4d7be70ecb735f65b0449a Author: Vivien Didelot Date: Tue Sep 26 17:15:34 2017 -0400 net: dsa: use phy_ethtool_set_link_ksettings Use phy_ethtool_set_link_ksettings now that dsa_slave_set_link_ksettings does exactly the same. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 771df31ace8a0264bcc3576d3f02660e3366cd6d Author: Vivien Didelot Date: Tue Sep 26 17:15:33 2017 -0400 net: dsa: use phy_ethtool_get_link_ksettings Use phy_ethtool_get_link_ksettings now that dsa_slave_get_link_ksettings does exactly the same. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 0115dcd1787d2d1c50719fab98d6bcb0c17931a1 Author: Vivien Didelot Date: Tue Sep 26 17:15:32 2017 -0400 net: dsa: use slave device phydev There is no need to store a phy_device in dsa_slave_priv since net_device already provides one. Simply s/p->phy/dev->phydev/. 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/slave.c | 116 ++++++++++++++++++++++++----------------------------- 2 files changed, 53 insertions(+), 64 deletions(-) commit f4344e0a48121d07cf8f69415278e84c39dbe9bf Author: Vivien Didelot Date: Tue Sep 26 17:15:31 2017 -0400 net: dsa: return -ENODEV is there is no slave PHY Instead of returning -EOPNOTSUPP when a slave device has no PHY, directly return -ENODEV as ethtool and phylib do. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit f6fc5b494d7b10d61ef82c416d4e963cba56f1a5 Merge: 390e96e 427e652 Author: David S. Miller Date: Tue Sep 26 20:04:36 2017 -0700 Merge branch 'mlxsw-Add-router-adjacency-dpipe-table' Jiri Pirko says: ==================== mlxsw: Add router adjacency dpipe table Arkadi says: This patchset adds router adjacency dpipe table support. This will provide the ability to observe the hardware offloaded IPv4/6 nexthops. ==================== Signed-off-by: David S. Miller commit 427e652aa34d90960f729c0b902c3c4a8a821b2e Author: Arkadi Sharshevsky Date: Mon Sep 25 10:32:30 2017 +0200 mlxsw: spectrum_dpipe: Add support for controlling nexthop counters Add support for controlling nexthop counters via dpipe. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 24 ++++++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 12 +++++------ .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 6 ++++++ 3 files changed, 36 insertions(+), 6 deletions(-) commit 190d38a52a73ef8ac05c1931dda730e0f9b79095 Author: Arkadi Sharshevsky Date: Mon Sep 25 10:32:29 2017 +0200 mlxsw: spectrum_dpipe: Add support for adjacency table dump Add support for adjacency table dump. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 238 +++++++++++++++++++++ 1 file changed, 238 insertions(+) commit a5390278a5eb573b76d2d28ce576b6b62c2200be Author: Arkadi Sharshevsky Date: Mon Sep 25 10:32:28 2017 +0200 mlxsw: spectrum: Add support for setting counters on nexthops Add support for setting counters on nexthops based on dpipe's adjacency table counter status. This patch also adds the ability for getting the counter value, which will be used by the dpipe adjacency table dump implementation in the next patches. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 52 ++++++++++++++++++++-- .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 2 + 2 files changed, 51 insertions(+), 3 deletions(-) commit f4de25fb530c936af7c3d9a158a7dde86adb2848 Author: Arkadi Sharshevsky Date: Mon Sep 25 10:32:27 2017 +0200 mlxsw: reg: Add support for counters on RATR In order to add the ability for setting counters on nexthops the RATR register should be extended. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 44 ++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 9 deletions(-) commit c538adb3c6e77e0f6563b71923a81de182b5132c Author: Arkadi Sharshevsky Date: Mon Sep 25 10:32:26 2017 +0200 mlxsw: spectrum_dpipe: Add initial support for the router adjacency table Add initial support for router adjacency table. The table does lookup based on the nexthop-group index and the local nexthop offset. After locating the nexthop entry it sets the destination MAC address and the egress RIF. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 100 ++++++++++++++++++++- .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.h | 1 + 2 files changed, 100 insertions(+), 1 deletion(-) commit c556cd28930661f337d7989fe74ac31871fd3888 Author: Arkadi Sharshevsky Date: Mon Sep 25 10:32:25 2017 +0200 mlxsw: spectrum_router: Add helpers for nexthop access This is done as a preparation before introducing the ability to dump the adjacency table via dpipe, and to count the table size. The current table implementation avoids tunnel entries, thus a helper for checking if the nexthop group contains tunnel entries is also provided. The mlxsw's nexthop representative struct stays private to the router module. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 71 ++++++++++++++++++++++ .../net/ethernet/mellanox/mlxsw/spectrum_router.h | 12 ++++ 2 files changed, 83 insertions(+) commit ec2437f42b44edc84054feb943d49e8030154c38 Author: Arkadi Sharshevsky Date: Mon Sep 25 10:32:24 2017 +0200 mlxsw: spectrum_router: Use helper to check for last neighbor Use list_is_last helper to check for last neighbor. Signed-off-by: Arkadi Sharshevsky 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 dbe4598c1e929a24dc352a7dc523a3cc22a093f2 Author: Arkadi Sharshevsky Date: Mon Sep 25 10:32:23 2017 +0200 mlxsw: spectrum_router: Keep nexthops in a linked list Keep nexthops in a linked list for easy access. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c0859d697c258f7c864e81bc1f83d1c274e7cf4c Author: Arkadi Sharshevsky Date: Mon Sep 25 10:32:22 2017 +0200 mlxsw: Add fields for mlxsw's meta header for adjacency table This patch adds field for mlxsw's meta header which will be used to describe the match/action behavior of the adjacency table. The fields are: 1. Adj_index - The global index of the nexthop group in the adjacency table. 2. Adj_hash_index - Local index offset which is based on packets hash mod the nexthop group size. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit be2336ebfd7a1aec597a26f086fc4235ab87dd2c Author: Arkadi Sharshevsky Date: Mon Sep 25 10:32:21 2017 +0200 mlxsw: spectrum_dpipe: Fix indentation in header description Fix indentation in mlxsw_meta header's description. Signed-off-by: Arkadi Sharshevsky Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 23 ++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit fbe934d69eb7ed22b59514e9c1fe8871b8b198ec Author: Palmer Dabbelt Date: Mon Jul 10 18:08:08 2017 -0700 RISC-V: Build Infrastructure This patch contains all the build infrastructure that actually enables the RISC-V port. This includes Makefiles, linker scripts, and Kconfig files. It also contains the only top-level change, which adds RISC-V to the list of architectures that need a sed run to produce the ARCH variable when building locally. Signed-off-by: Palmer Dabbelt Makefile | 3 +- arch/riscv/Kconfig | 310 ++++++++++++++++++++++++++++++++++++++++ arch/riscv/Makefile | 72 ++++++++++ arch/riscv/configs/defconfig | 0 arch/riscv/include/asm/Kbuild | 61 ++++++++ arch/riscv/kernel/.gitignore | 1 + arch/riscv/kernel/Makefile | 33 +++++ arch/riscv/kernel/vmlinux.lds.S | 92 ++++++++++++ arch/riscv/lib/Makefile | 6 + arch/riscv/mm/Makefile | 4 + 10 files changed, 581 insertions(+), 1 deletion(-) commit e2c0cdfba7f69925afc92b20cd9835d81e11a4f1 Author: Palmer Dabbelt Date: Mon Jul 10 18:07:09 2017 -0700 RISC-V: User-facing API This patch contains code that is in some way visible to the user: including via system calls, the VDSO, module loading and signal handling. It also contains some generic code that is ABI visible. Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/mmu.h | 26 +++ arch/riscv/include/asm/ptrace.h | 118 ++++++++++++ arch/riscv/include/asm/syscall.h | 102 +++++++++++ arch/riscv/include/asm/unistd.h | 16 ++ arch/riscv/include/asm/vdso.h | 41 +++++ arch/riscv/include/uapi/asm/Kbuild | 27 +++ arch/riscv/include/uapi/asm/auxvec.h | 24 +++ arch/riscv/include/uapi/asm/bitsperlong.h | 25 +++ arch/riscv/include/uapi/asm/byteorder.h | 23 +++ arch/riscv/include/uapi/asm/elf.h | 83 +++++++++ arch/riscv/include/uapi/asm/hwcap.h | 36 ++++ arch/riscv/include/uapi/asm/ptrace.h | 90 +++++++++ arch/riscv/include/uapi/asm/sigcontext.h | 30 +++ arch/riscv/include/uapi/asm/siginfo.h | 24 +++ arch/riscv/include/uapi/asm/ucontext.h | 45 +++++ arch/riscv/kernel/cpufeature.c | 61 +++++++ arch/riscv/kernel/module.c | 217 ++++++++++++++++++++++ arch/riscv/kernel/ptrace.c | 125 +++++++++++++ arch/riscv/kernel/riscv_ksyms.c | 15 ++ arch/riscv/kernel/signal.c | 292 ++++++++++++++++++++++++++++++ arch/riscv/kernel/sys_riscv.c | 49 +++++ arch/riscv/kernel/syscall_table.c | 25 +++ arch/riscv/kernel/vdso/.gitignore | 2 + arch/riscv/kernel/vdso/Makefile | 63 +++++++ arch/riscv/kernel/vdso/rt_sigreturn.S | 24 +++ arch/riscv/kernel/vdso/vdso.S | 27 +++ arch/riscv/kernel/vdso/vdso.lds.S | 77 ++++++++ 27 files changed, 1687 insertions(+) commit 07037db5d479f90377c998259a4f9a469c404edf Author: Palmer Dabbelt Date: Mon Jul 10 18:06:09 2017 -0700 RISC-V: Paging and MMU This patch contains code to manage the RISC-V MMU, including definitions of the page tables and the page walking code. Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/mmu_context.h | 69 ++++++ arch/riscv/include/asm/page.h | 130 ++++++++++ arch/riscv/include/asm/pgalloc.h | 124 ++++++++++ arch/riscv/include/asm/pgtable-32.h | 25 ++ arch/riscv/include/asm/pgtable-64.h | 84 +++++++ arch/riscv/include/asm/pgtable-bits.h | 48 ++++ arch/riscv/include/asm/pgtable.h | 430 ++++++++++++++++++++++++++++++++++ arch/riscv/mm/fault.c | 282 ++++++++++++++++++++++ 8 files changed, 1192 insertions(+) commit 6d60b6ee0c9777b92c47f6dc8aad1dd90612e4fa Author: Palmer Dabbelt Date: Mon Jul 10 18:05:09 2017 -0700 RISC-V: Device, timer, IRQs, and the SBI This patch contains code that interfaces with devices that are mandated by the RISC-V supervisor specification and that don't have explicit drivers anywhere else in the tree. This includes the staticly defined interrupts, the CSR-mapped timer, and virtualized SBI devices. Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/delay.h | 28 +++++++++ arch/riscv/include/asm/dma-mapping.h | 38 ++++++++++++ arch/riscv/include/asm/irq.h | 28 +++++++++ arch/riscv/include/asm/irqflags.h | 63 ++++++++++++++++++++ arch/riscv/include/asm/pci.h | 48 +++++++++++++++ arch/riscv/include/asm/sbi.h | 100 +++++++++++++++++++++++++++++++ arch/riscv/include/asm/timex.h | 59 +++++++++++++++++++ arch/riscv/lib/delay.c | 110 +++++++++++++++++++++++++++++++++++ arch/riscv/mm/ioremap.c | 92 +++++++++++++++++++++++++++++ 9 files changed, 566 insertions(+) commit 7db91e57a0acde126a162ababfb1e0ab190130cb Author: Palmer Dabbelt Date: Mon Jul 10 18:04:30 2017 -0700 RISC-V: Task implementation This patch contains the implementation of tasks on RISC-V, most of which is involved in task switching. Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/asm-offsets.h | 1 + arch/riscv/include/asm/current.h | 45 ++++ arch/riscv/include/asm/kprobes.h | 22 ++ arch/riscv/include/asm/processor.h | 97 ++++++++ arch/riscv/include/asm/switch_to.h | 69 ++++++ arch/riscv/include/asm/thread_info.h | 94 +++++++ arch/riscv/kernel/asm-offsets.c | 322 ++++++++++++++++++++++++ arch/riscv/kernel/entry.S | 464 +++++++++++++++++++++++++++++++++++ arch/riscv/kernel/process.c | 129 ++++++++++ 9 files changed, 1243 insertions(+) commit 2129a235c098960c57d4b6ef23be842a98d97ac9 Author: Palmer Dabbelt Date: Mon Jul 10 18:03:49 2017 -0700 RISC-V: ELF and module implementation This patch contains the code that interfaces with ELF objects on RISC-V systems, the vast majority of which is present to load kernel modules. Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/compat.h | 29 ++++++++++++++ arch/riscv/include/asm/elf.h | 84 +++++++++++++++++++++++++++++++++++++++++ arch/riscv/include/asm/hwcap.h | 37 ++++++++++++++++++ arch/riscv/mm/extable.c | 37 ++++++++++++++++++ 4 files changed, 187 insertions(+) commit 5d8544e2d0075a5f3c9a2cf27152354d54360da1 Author: Palmer Dabbelt Date: Mon Jul 10 18:03:19 2017 -0700 RISC-V: Generic library routines and assembly This patch contains code that is more specific to the RISC-V ISA than it is to Linux. It contains string and math operations, C wrappers for various assembly instructions, stack walking code, and uaccess. Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/asm.h | 76 +++++ arch/riscv/include/asm/csr.h | 132 ++++++++ arch/riscv/include/asm/linkage.h | 20 ++ arch/riscv/include/asm/string.h | 26 ++ arch/riscv/include/asm/uaccess.h | 513 ++++++++++++++++++++++++++++++++ arch/riscv/include/asm/word-at-a-time.h | 55 ++++ arch/riscv/kernel/stacktrace.c | 177 +++++++++++ arch/riscv/lib/memcpy.S | 115 +++++++ arch/riscv/lib/memset.S | 120 ++++++++ arch/riscv/lib/uaccess.S | 117 ++++++++ arch/riscv/lib/udivdi3.S | 38 +++ 11 files changed, 1389 insertions(+) commit fab957c11efe2f405e08b9f0d080524bc2631428 Author: Palmer Dabbelt Date: Mon Jul 10 18:02:19 2017 -0700 RISC-V: Atomic and Locking Code This contains all the code that directly interfaces with the RISC-V memory model. While this code corforms to the current RISC-V ISA specifications (user 2.2 and priv 1.10), the memory model is somewhat underspecified in those documents. There is a working group that hopes to produce a formal memory model by the end of the year, but my understanding is that the basic definitions we're relying on here won't change significantly. Reviewed-by: Arnd Bergmann Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/atomic.h | 375 ++++++++++++++++++++++++++++++++ arch/riscv/include/asm/barrier.h | 68 ++++++ arch/riscv/include/asm/bitops.h | 218 +++++++++++++++++++ arch/riscv/include/asm/cacheflush.h | 39 ++++ arch/riscv/include/asm/cmpxchg.h | 134 ++++++++++++ arch/riscv/include/asm/io.h | 303 ++++++++++++++++++++++++++ arch/riscv/include/asm/spinlock.h | 165 ++++++++++++++ arch/riscv/include/asm/spinlock_types.h | 33 +++ arch/riscv/include/asm/tlb.h | 24 ++ arch/riscv/include/asm/tlbflush.h | 64 ++++++ 10 files changed, 1423 insertions(+) commit 76d2a0493a17d4c8ecc781366850c3c4f8e1a446 Author: Palmer Dabbelt Date: Mon Jul 10 18:00:26 2017 -0700 RISC-V: Init and Halt Code This contains the various __init C functions, the initial assembly kernel entry point, and the code to reset the system. When a file was init-related this patch contains the entire file. Signed-off-by: Palmer Dabbelt arch/riscv/include/asm/bug.h | 88 ++++++++++++++ arch/riscv/include/asm/cache.h | 22 ++++ arch/riscv/include/asm/smp.h | 52 +++++++++ arch/riscv/kernel/cacheinfo.c | 105 +++++++++++++++++ arch/riscv/kernel/cpu.c | 108 +++++++++++++++++ arch/riscv/kernel/head.S | 157 +++++++++++++++++++++++++ arch/riscv/kernel/irq.c | 39 +++++++ arch/riscv/kernel/reset.c | 36 ++++++ arch/riscv/kernel/setup.c | 257 +++++++++++++++++++++++++++++++++++++++++ arch/riscv/kernel/smp.c | 110 ++++++++++++++++++ arch/riscv/kernel/smpboot.c | 114 ++++++++++++++++++ arch/riscv/kernel/time.c | 61 ++++++++++ arch/riscv/kernel/traps.c | 180 +++++++++++++++++++++++++++++ arch/riscv/kernel/vdso.c | 125 ++++++++++++++++++++ arch/riscv/mm/init.c | 70 +++++++++++ 15 files changed, 1524 insertions(+) commit 5080332c2c893118dbc18755f35c8b0131cf0fc4 Author: Michael Neuling Date: Fri Sep 15 15:25:48 2017 +1000 powerpc/64s: Add workaround for P9 vector CI load issue POWER9 DD2.1 and earlier has an issue where some cache inhibited vector load will return bad data. The workaround is two part, one firmware/microcode part triggers HMI interrupts when hitting such loads, the other part is this patch which then emulates the instructions in Linux. The affected instructions are limited to lxvd2x, lxvw4x, lxvb16x and lxvh8x. When an instruction triggers the HMI, all threads in the core will be sent to the HMI handler, not just the one running the vector load. In general, these spurious HMIs are detected by the emulation code and we just return back to the running process. Unfortunately, if a spurious interrupt occurs on a vector load that's to normal memory we have no way to detect that it's spurious (unless we walk the page tables, which is very expensive). In this case we emulate the load but we need do so using a vector load itself to ensure 128bit atomicity is preserved. Some additional debugfs emulated instruction counters are added also. Signed-off-by: Michael Neuling Signed-off-by: Benjamin Herrenschmidt [mpe: Switch CONFIG_PPC_BOOK3S_64 to CONFIG_VSX to unbreak the build] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/emulated_ops.h | 4 + arch/powerpc/include/asm/paca.h | 1 + arch/powerpc/include/asm/uaccess.h | 17 +++ arch/powerpc/kernel/exceptions-64s.S | 16 ++- arch/powerpc/kernel/mce.c | 30 ++++- arch/powerpc/kernel/traps.c | 201 ++++++++++++++++++++++++++++++++ arch/powerpc/platforms/powernv/smp.c | 7 ++ 7 files changed, 271 insertions(+), 5 deletions(-) commit dfbf0c14dd75d3b15f65478f10f373aa83042a50 Author: Alex Deucher Date: Fri Jun 2 14:38:03 2017 -0400 drm/amdgpu: drop experimental flag for vega10 Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit fff0925832368d55d2d50ccfedc3fb0887721627 Author: Bhawanpreet Lakha Date: Mon Sep 18 15:19:31 2017 -0400 drm/amd/display: fix pflip irq registor for raven The pflip registor index was incorrect, this was overriding the macro and caused a dummy irq call. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c8f195adf21430e4e8bbd13942826ccf8fa225c Author: Shirish S Date: Tue Sep 26 12:26:41 2017 +0530 drm/amd/display: don't clean-up bottom pipe plane_state In the scenario of setting underlay, dc_validate_global_state() is called after constructing the context with all relevant bottom_pipe related configurations in dm_update_planes_state(). Currently, in dc_validate_global_state(), without checking for bottom_pipe's existence, the pipe_ctx structure is initialised to 0, hence nullyfying the plane_state of bottom_pipe which shall be accessed in populate_initial_data() called from bw_calcs(). Due to this null pointer access kernel panics and leads to reboot when underlay is tried to set. This patch fixes the issue by no longer clearing the top_pipe. This workaround is no longer required. Signed-off-by: Shirish S Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 8 -------- 1 file changed, 8 deletions(-) commit 4a6cee2ca142615970fa3334191e992e7fb51159 Author: Harry Wentland Date: Sun Sep 24 14:31:51 2017 -0400 drm/amd/display: Remove unused dc_validate_guaranteed function It got refactored away and was never cleaned. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 34 -------------------------------- 1 file changed, 34 deletions(-) commit f1ad2f5efd29dc838222f37281675a2623714538 Author: Harry Wentland Date: Tue Sep 12 20:04:48 2017 -0400 drm/amd/display: Reduce DC chattiness Log DC init but default log level to 0 (default for amdgpu_dc_log) otherwise. Bug reporters can still make DC more chatty by using the dc_log module param. amdgpu.dc_log = 1 v2: Only provide runtime option, no compile time config Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 74 ++++++++++++---------- drivers/gpu/drm/amd/display/include/logger_types.h | 3 + 2 files changed, 42 insertions(+), 35 deletions(-) commit 01a526f3dee9abe1e2db9e37e4ceb4149f8ae77b Author: Harry Wentland Date: Tue Sep 12 19:33:40 2017 -0400 drm/amd/display: Pass log_mask from DM Linux and Windows often desire different log levels. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ drivers/gpu/drm/amd/display/dc/basics/logger.c | 41 +++------------------- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../gpu/drm/amd/display/include/logger_interface.h | 2 +- drivers/gpu/drm/amd/display/include/logger_types.h | 32 +++++++++++++++++ 6 files changed, 42 insertions(+), 38 deletions(-) commit 02e749dcbe5da2b1b2b1c3825be094287257046f Author: Harry Wentland Date: Tue Sep 12 20:02:11 2017 -0400 drm/amdgpu: Add dc_log module parameter We want to make DC less chatty but still allow bug reporters to provide more detailed logs. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++ 2 files changed, 5 insertions(+) commit dd3d18bf5e4994c5f8dd008db6123d0525eb62e5 Author: Harry Wentland Date: Mon Sep 11 18:48:27 2017 -0400 drm/amd/display: Clean Kconfig formatting Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/Kconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a6def44598eb6b82992ffd696cfd7f027940e2cd Author: Harry Wentland Date: Fri Sep 8 10:25:25 2017 -0400 drm/amd/display: Update include to bring in line with internal tree Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 + drivers/gpu/drm/amd/display/include/dal_asic_id.h | 1 + 2 files changed, 2 insertions(+) commit f6baff4d1a0e3235b4a8ffd755e257b998705419 Author: Harry Wentland Date: Fri Sep 8 10:24:21 2017 -0400 drm/amd/display: Change comments to bring in line with internal tree Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 8 +++----- drivers/gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) commit 1ecfc3da95428983725d643e80e9a320497d2059 Author: Harry Wentland Date: Fri Sep 8 10:23:42 2017 -0400 drm/amd/display: Format changes to bring in line with internal tree Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 4 ++-- drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) commit 05230fa90d96523755ddad30972a25b6651de739 Author: Roman Li Date: Tue Sep 5 18:23:46 2017 -0400 drm/amd/display: Disable FBC for linear tiling - Fixing text console on FBC-enabled builds Signed-off-by: Roman Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 ++++ 1 file changed, 4 insertions(+) commit e338aab03f0d8d0ae37b83bdf3ff5633c6eaf52f Author: Vitaly Prosyak Date: Tue Sep 5 15:58:37 2017 -0500 drm/amd/display: Update DPP registers Signed-off-by: Vitaly Prosyak Reviewed-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 2e0ac3d68838d20a5eace958bdf853a295a7175f Author: Harry Wentland Date: Thu Aug 17 14:58:07 2017 -0400 drm/amd/display: Create fake sink if needed when commit stream The problem we're trying to fix is this (and similar): 1) X Desktop with single display 2) VT switch 3) Unplug display 4) VT switch back to X 5) re-plug same display Before this we'd fail at step 4 when trying to create a dc_stream_state because of a missing sink. This change will fake a sink in this case. The same scenario applies to S3 resume. Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 29 ++++++++++++++++++++++- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 ++ 2 files changed, 30 insertions(+), 1 deletion(-) commit c84dec2fe8837facf4ccaffd2afae9b157719327 Author: Harry Wentland Date: Tue Sep 5 14:16:09 2017 -0400 drm/amd/display: Break out amdgpu_dm_connector Stop using amdgpu_connector and roll our own. There is no overlap with amdgpu. Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 126 ++++++++++----------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 53 ++++++++- .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 20 ++-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 12 +- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 34 +++--- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.h | 4 +- 6 files changed, 146 insertions(+), 103 deletions(-) commit e9475143fb42b62689163c95aabdb6c173fcdbb0 Author: pana Date: Fri Sep 1 15:43:22 2017 +0800 drm/amd/display: Add 2X Cursor Magnification Code Signed-off-by: Pandey, Arun Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 2 -- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) commit 21e67d4d52ca8688feb8c4f6e6d29b2d16d578ad Author: Harry Wentland Date: Tue Sep 5 15:50:48 2017 -0400 drm/amd/display: No need to keep track of unreffed clk sources This simplifies clock source reprogramming a bit. Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 18 ++-------------- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 21 +++++------------- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 25 +++++++--------------- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 -- drivers/gpu/drm/amd/display/dc/inc/resource.h | 2 +- 5 files changed, 16 insertions(+), 52 deletions(-) commit e74c6972f85d48de4d2fe797ddd0fbc8bd899f0e Author: Yue Hin Lau Date: Tue Sep 5 11:50:34 2017 -0400 drm/amd/display: move dwb registers to header file Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c | 288 +-------------------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.h | 247 +++++++++++++++++- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 42 +++ 3 files changed, 289 insertions(+), 288 deletions(-) commit 264efa31835dd87af4e77e3a27090e60d4fe1511 Author: Eric Bernstein Date: Thu Aug 31 16:04:24 2017 -0400 drm/amd/display: remove output_format from ipp_setup Signed-off-by: Eric Bernstein Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 3 +-- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 3 +-- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 +-- drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h | 3 +-- drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 3 +-- 6 files changed, 7 insertions(+), 12 deletions(-) commit b8ea60cea245e8cd68b6ac45b9680a590f76391a Author: Harry Wentland Date: Mon Aug 28 19:44:38 2017 -0400 drm/amd/display: Remove switching of clk sources at end of commit This should be taken care of in validate now. All of timing sync is quite broken at the moment anyways. Will submit another patch set to address that. Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/dce110/dce110_hw_sequencer.c | 36 ---------------------- 1 file changed, 36 deletions(-) commit 9d0dcecd93e4997c65b18404f1ab2fce2ab79010 Author: Harry Wentland Date: Mon Aug 28 19:05:17 2017 -0400 drm/amd/display: Power down clock source at commit Still one more in dc_validate_global Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 19 ++++++++++------- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 22 ++++++++++++++------ .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 24 ++++++++++++++-------- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 ++ 4 files changed, 46 insertions(+), 21 deletions(-) commit 4a6295361c737a80e9f079952ac863a3b0c26acf Author: Harry Wentland Date: Mon Aug 28 18:43:45 2017 -0400 drm/amd/display: Don't reset clock source at unref Powering down the clock source during unref is unsafe as we might want to unref during atomic_check Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 25 ++++++++++++++-------- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 16 +++++++++----- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 9 +++++--- drivers/gpu/drm/amd/display/dc/inc/resource.h | 4 ++-- 4 files changed, 35 insertions(+), 19 deletions(-) commit 83524646611381c4b0e31ffc5286cb05f8818aba Author: Yue Hin Lau Date: Tue Aug 29 16:54:39 2017 -0400 drm/amd/display: seperate dpp_cm_helper functions into new file Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 2 + .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 259 +++++++++------------ .../drm/amd/display/dc/dcn10/dcn10_dpp_cm_helper.c | 123 ++++++++++ .../drm/amd/display/dc/dcn10/dcn10_dpp_cm_helper.h | 99 ++++++++ 5 files changed, 330 insertions(+), 155 deletions(-) commit aeff7ab11e2516bfa41c77b9ea57bc2c07bb3b62 Author: Andrew Jiang Date: Fri Sep 1 16:03:16 2017 -0400 drm/amd/display: Fix context alloc failed logging Since there was no return statement in the fail block immediately preceding the context_alloc_fail block, any failure within the function caused a context alloc failed error message to be printed. Since the context_alloc_fail block is only used once, move it to where the goto is directly and accompany it with a return statement. Signed-off-by: Andrew Jiang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 603767f903bf5bf301728b197dcde63cf880fe2e Author: Tony Cheng Date: Fri Sep 1 16:14:01 2017 -0400 drm/amd/display: fix default dithering bug: default is mapped to no dithering. default to spatial dithering based on color depth Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 20 +++----------------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 16 ++++++++++++++++ .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 14 +++++--------- 3 files changed, 24 insertions(+), 26 deletions(-) commit 61a44fc6265dd3bb86c35bcdfb62a225891ada59 Author: Harry Wentland Date: Thu Aug 31 16:08:51 2017 -0400 drm/amd/display: Enable dcn10_power_on_fe log by default This should only happen on full update. If this ever happens on regular pageflips it needs to be debugged. Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1b7441b00a986cbed017a13ccf316efb54ab7a4b Author: Charlene Liu Date: Fri Sep 1 12:51:47 2017 -0400 drm/amd/display: fix crc_source_select use hardcoded color depth Signed-off-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit acea7183b5d72d0713d2129956e7357ebde28054 Author: Wenjing Liu Date: Thu Aug 31 16:49:56 2017 -0400 drm/amd/display: set CP2520 Test pattern to use DP_TEST_PATTERN_HBR2_COMPLIANCE_EYE Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f38b66c82618854d019f9df8ff4cd8dd796da10 Author: Hersen Wu Date: Mon Sep 11 16:42:14 2017 -0400 drm/amd/display: USB-C to HDMI dongle not light RV1 support only USB-C active DP-2-HDMI dongle. HPD short pulse is generated only for DP signal. When processing HPD short pulse, it must be DP active dongle. No need for I2C-Over-AUX detection. v2: Add description Signed-off-by: Hersen Wu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 32 +++++++++++++++-------- drivers/gpu/drm/amd/display/dc/dc.h | 8 +++++- 3 files changed, 33 insertions(+), 16 deletions(-) commit 4451a2551dcac9ea8c90829e0fcc798b834deb6b Author: Shirish S Date: Mon Aug 21 14:02:17 2017 +0530 drm/amd/display: dce110: fix plane validation For MPO to work with per surface rendering and flipping, the previous logic of restricting plane[1] only as underlay needs to be removed. validate_surface_sets() now checks only the width and height bounds in case of underlay rather than checking format. Without this patch one cannot set underlay only. Signed-off-by: Shirish S Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce110/dce110_resource.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit 1bb47154408ffa0501bb544580304ce0fdbc4ab6 Author: Hersen Wu Date: Mon Aug 28 17:15:34 2017 -0400 drm/amd/display: Request to have DCN RV pipe Harvesting TODO: Current change only work for sucessive last fused pipe, like p3, or p3,p2. It does not work for fused p1,p2. Signed-off-by: Hersen Wu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 55 +++++++++++++++++----- 1 file changed, 43 insertions(+), 12 deletions(-) commit 78e685f9a385eb984f69720e463878e5c3ae80b7 Author: Wenjing Liu Date: Wed Aug 30 17:49:39 2017 -0400 drm/amd/display: Use TPS4 instead of CP2520_3 for phy pattern 7 [Description] We originally use TPS4 phy test pattern for test pattern 7. On RV we switched to a new method to use CP2520. CP2520 should produce the same result. However in reality, it fails DP PHY automation test. We use the original method instead. Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 890db270a5763ccacda8df7cbfac674ade78744a Author: Yongqiang Sun Date: Wed Aug 30 14:29:40 2017 -0400 drm/amd/display: Remove sanity check. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 6 ------ 1 file changed, 6 deletions(-) commit 649e0c7679a5189dec1045329e36cfcf41919dc9 Author: Yongqiang Sun Date: Wed Aug 30 11:55:40 2017 -0400 drm/amd/display: Added negative check for vertical line start. In case of vstartup happens before vsync, set vertical line start to 0. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 6f54d0b1d82194116fcb8a3683827c9d8eb8cb9b Author: Logatharshan Thothiralingam Date: Fri Aug 18 19:09:57 2017 -0400 drm/amd/display: Get OTG info if OTG master enabled Signed-off-by: Logatharshan Thothiralingam Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 6 +++++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 3 +++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) commit b46c085c238fdfea9b1cc49326dae92a47b34832 Author: Harry Wentland Date: Thu Aug 31 21:17:05 2017 -0400 drm/amdgpu: Remove unused flip_flags from amdgpu_crtc No more need since Andrey's change to use drm_crtc's version Signed-off-by: Harry Wentland Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 1 - 1 file changed, 1 deletion(-) commit 7ad124cc23172a7a70d642adf8f5c99f6c974539 Author: Yue Hin Lau Date: Tue Aug 29 15:01:06 2017 -0400 drm/amd/display: clean up cm register programming functions Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 120 ---------- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 251 +++++++-------------- 2 files changed, 76 insertions(+), 295 deletions(-) commit fd96c1775a75c14bf15465af7040cc00855b1ec0 Author: Tony Cheng Date: Mon Aug 28 09:51:03 2017 -0400 drm/amd/display: delete dead code Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7c228a1a910784801360db5aedd153db9f465b56 Author: Harry Wentland Date: Mon Aug 28 10:59:39 2017 -0400 drm/amd/display: Don't spam log with failed validation In a lot of case we fail validation of timings for legitimate reasons. No need to print an error. Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 5 ----- 1 file changed, 5 deletions(-) commit 513b5693391af332feda8f273af8446ccd4a220b Author: Harry Wentland Date: Fri Aug 25 22:34:51 2017 -0400 drm/amd/display: Restore missing DCE8 xfm regs Signed-off-by: Harry Wentland Reviewed-by: Roman Li Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 10 ++++++++++ drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) commit 1d9521a74029c3afcf996e207ecd61a74414dd68 Author: Harry Wentland Date: Fri Aug 25 16:33:40 2017 -0400 drm/amd/display: Set add_stream_ctx for CZ, Hawaii and others Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce100/dce100_resource.c | 19 +++++++++++++++++++ .../gpu/drm/amd/display/dc/dce100/dce100_resource.h | 5 +++++ .../gpu/drm/amd/display/dc/dce110/dce110_resource.c | 20 ++++++++++++++++++++ .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 1 + 4 files changed, 45 insertions(+) commit 0bfac360edcd843e90a0444475616a486f643eeb Author: Yongqiang Sun Date: Tue Aug 29 15:27:20 2017 -0400 drm/amd/display: Disable OTG double buffer. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 3 --- 1 file changed, 3 deletions(-) commit 4486201caf9c890f132d9a7631b4e5ebbaf524c3 Author: Yongqiang Sun Date: Tue Aug 29 12:50:21 2017 -0400 drm/amd/display: Program reg for vertical interrupt. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 10 ++++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.h | 4 ++++ 2 files changed, 14 insertions(+) commit 07fde11f27fb4de3b63ef117593291b094a23e15 Author: Roman Li Date: Fri Aug 25 16:44:20 2017 -0400 drm/amd/display: program fbc for scatter/gather Fixing screen flickering when FBC enabled on Stoney Signed-off-by: Roman Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce110/dce110_compressor.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 1e4cee77bbd50d6c868439bfaf8ad61b6c6fcfc3 Author: Charlene Liu Date: Mon Aug 28 19:35:25 2017 -0400 drm/amd/display: add backlight control in blankstream. Signed-off-by: Charlene Liu Reviewed-by: Krunoslav Kovac Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 1f0997f1555571a9c16205a851ffbce92097196d Author: Charlene Liu Date: Mon Aug 28 19:33:23 2017 -0400 drm/amd/display: not override the FMT setting set by VBIOS for eDP Signed-off-by: Charlene Liu Reviewed-by: Krunoslav Kovac Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit b97a88cd569c5f1dac82654bee2efee07633921c Author: Yue Hin Lau Date: Mon Aug 28 14:05:17 2017 -0400 drm/amd/display: clean up functions in dcn10_dpp_cm Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 420 -------------- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 628 +++++---------------- 2 files changed, 140 insertions(+), 908 deletions(-) commit c7299705e6e76fe499ddc9af7beb0500e945fec9 Author: Charlene Liu Date: Mon Aug 28 16:28:34 2017 -0400 drm/amd/display: only polling VSync Phase within VSync peroroid Signed-off-by: Charlene Liu Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++-- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 27 +++++++++++++----------- drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h | 2 +- 5 files changed, 21 insertions(+), 18 deletions(-) commit c9bb686b597d30935d6e05aaade51fc765d1ca5b Author: Eric Yang Date: Mon Aug 28 16:50:17 2017 -0400 drm/amd/display: Fix time out on boot On boot, hubp 0 is powergated during enable accel mode, so we time out when we try to blank in undo wa. Fix: Check power gate status before set blank Signed-off-by: Eric Yang Reviewed-by: Hersen Wu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 6 ++++++ 1 file changed, 6 insertions(+) commit ab8db3e1653c50ae19d1c31d82f94beb5115aeef Author: Andrey Grodzovsky Date: Mon Aug 28 14:25:01 2017 -0400 drm/amd/display: Move dis_clk into dc_state. dis_clk is single instance across pipes. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 38 +++++++----- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 10 +++- drivers/gpu/drm/amd/display/dc/dc.h | 5 ++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 67 ++++++++++------------ .../drm/amd/display/dc/dce110/dce110_resource.c | 1 - drivers/gpu/drm/amd/display/dc/inc/core_types.h | 7 ++- 7 files changed, 78 insertions(+), 57 deletions(-) commit ceda4e980058316531a1a6b72797d9068ddacd02 Author: Charlene Liu Date: Thu Aug 24 17:12:48 2017 -0400 drm/amd/display: add aux arbitration logic Signed-off-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c | 6 +++++ drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.h | 2 ++ .../display/dc/i2caux/dce110/aux_engine_dce110.c | 30 ++++++++++++++++++++-- 3 files changed, 36 insertions(+), 2 deletions(-) commit 4ed4e51b19496c4d160f3ca368d9ff5dd3e4a5b9 Author: Mikita Lipski Date: Wed Aug 23 15:29:18 2017 -0400 drm/amd/display: Add a clock source to a sharing pipe Fix to allow DVI displays to share the same clock source Signed-off-by: Mikita Lipski Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f36cc577c3254738e370b553f9f8cedf2df84070 Author: Bhawanpreet Lakha Date: Mon Aug 28 12:04:23 2017 -0400 drm/amd/display: Rename dc resource_validate_ctx methods Rename dc_resource methods from validate_ctx to state Signed-off-by: Bhawanpreet Lakha Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 6 +++--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/dc.h | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) commit 608ac7bb3924178d7bfa8b88d79d3d9d72b8f485 Author: Jerry Zuo Date: Fri Aug 25 16:16:10 2017 -0400 drm/amd/display: Rename dc validate_context and current_context Rename all the dc validate_context to dc_state and dc current_context to current_state. Signed-off-by: Jerry Zuo Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 6 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 108 ++++++++++----------- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 +- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 40 ++++---- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 15 ++- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 4 +- drivers/gpu/drm/amd/display/dc/dc.h | 38 ++++---- .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 4 +- .../amd/display/dc/dce100/dce100_hw_sequencer.c | 8 +- .../amd/display/dc/dce100/dce100_hw_sequencer.h | 4 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 10 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 70 ++++++------- .../amd/display/dc/dce110/dce110_hw_sequencer.h | 12 +-- .../drm/amd/display/dc/dce110/dce110_resource.c | 16 +-- .../drm/amd/display/dc/dce112/dce112_resource.c | 16 +-- .../drm/amd/display/dc/dce112/dce112_resource.h | 10 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 10 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 62 ++++++------ .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h | 2 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 8 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 14 +-- drivers/gpu/drm/amd/display/dc/inc/dce_calcs.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h | 4 +- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 14 +-- drivers/gpu/drm/amd/display/dc/inc/resource.h | 22 ++--- .../amd/display/dc/irq/dce110/irq_service_dce110.c | 2 +- .../gpu/drm/amd/display/include/logger_interface.h | 4 +- 32 files changed, 263 insertions(+), 264 deletions(-) commit 9cffc573196bb3eea2d3dfd24893b6b9970cdfce Author: Yue Hin Lau Date: Fri Aug 25 16:13:55 2017 -0400 drm/amd/display: clean up header file includes Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 20 ----------- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 20 ----------- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 8 ----- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 41 ---------------------- 4 files changed, 89 deletions(-) commit d1423e6faf161e69070dbb1d6764dd5da59563a8 Author: Yongqiang Sun Date: Tue Aug 22 15:03:06 2017 -0400 drm/amd/display: Remove mpc from bios left over, keep double buffer disabled. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 10 +++++++++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 3 --- 2 files changed, 9 insertions(+), 4 deletions(-) commit 41f97c0773aed681ad65fa27ee88b503fbdcd298 Author: Hersen Wu Date: Thu Aug 24 17:40:00 2017 -0400 drm/amd/display: DF C-state entry blocked when DPMS Signed-off-by: Hersen Wu Reviewed-by: Hersen Wu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 9 +++- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 48 +++++++++++++++++++++- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 9 ++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 2 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 3 ++ 7 files changed, 74 insertions(+), 2 deletions(-) commit b3c340fad4643b7351a4777fae37e58925db04c9 Author: Yue Hin Lau Date: Sat Aug 19 16:34:36 2017 -0400 drm/amd/display: move cm registers from ipp to dpp_cm Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 150 +++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 489 ++++++++++++++- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 555 +++++++++++++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 3 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 20 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 676 +-------------------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.h | 416 ------------- drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 18 + drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h | 17 +- drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 20 + 10 files changed, 1239 insertions(+), 1125 deletions(-) commit b656c34e24b5af59a5e8e1f0fbc740c3fc2d5ad8 Author: Eric Bernstein Date: Thu Aug 24 16:16:50 2017 -0400 drm/amd/display: Update DSCL Signed-off-by: Eric Bernstein Signed-off-by: Tony Cheng Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 101 ++++++--------------- 1 file changed, 29 insertions(+), 72 deletions(-) commit 96313f1b7a4b14c8e120564698aa3be709445324 Author: Jerry Zuo Date: Thu Aug 24 16:03:02 2017 -0400 drm/amd/display: Fix MST downstream display not light up regression The fix is for the scenario: MST+SST chain together, and hook up to the card. Regression: Per stream validate_context build v2 Before dc_add_stream_to_ctx(), need to update/reset stream signal type to SIGNAL_TYPE_DISPLAY_PORT_MST. Otherwise, downstream device cannot be added to ctx due to the lack of signal type info (SIGNAL_TYPE_NONE). update_stream_signal() needs to be done after stream is created. Signed-off-by: Jerry Zuo Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 25 ----------------------- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 24 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 25 deletions(-) commit aac6a07e40dea7996851c81f9a5f0e433b806086 Author: Andrey Grodzovsky Date: Wed Aug 23 16:54:03 2017 -0400 drm/amd/display: Use DRM provided page flip flag. Starting with 4.12 kernel DRM provides page flip flags so we don't need to have our own copy. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit e1b522bff39d4834f4cfedc557857bb4d50f3946 Author: Yongqiang Sun Date: Thu Aug 24 17:29:24 2017 -0400 drm/amd/display: work around for 8k sleep crash Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 1cf49dea28dfc76f0816a4bc73c2ab975c72f55d Author: Wenjing Liu Date: Wed Aug 23 17:02:34 2017 -0400 drm/amd/display: do not reset lane count in EQ fallback [Description] According to DP1.4 specs we should not reset lane count back when falling back in failing EQ training. This causes PHY test pattern compliance to fail as infinite LT when LT fails EQ to 4 RBR and fails CR in a loop. Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 -- 1 file changed, 2 deletions(-) commit 156590454259a19d1709fab2ff7d59870574e822 Author: Bhawanpreet Lakha Date: Wed Aug 23 15:44:42 2017 -0400 drm/amd/display: Clean up flattening core_dc to dc Clean up some code related to flattening core_dc commit (Remove redundent dc = dc, which was the result of removing DC_TO_CORE() macro) Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 12 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 335 +++++++++------------ .../drm/amd/display/modules/freesync/freesync.c | 19 +- 3 files changed, 164 insertions(+), 202 deletions(-) commit 9635b75436e5f536831c810c715f3ae24a5bbbae Author: Darren Salt Date: Tue Sep 12 17:10:25 2017 +0100 drm/amd/display: Don't leak dc_stream_state. Noticed while playing “Valley”, which was causing some 8MB of leakage per second. kmemleak listed many entries looking like this: unreferenced object 0xffff8802c2951800 (size 1024): comm "Xorg", pid 2982, jiffies 4297410155 (age 392.787s) hex dump (first 32 bytes): 00 50 f9 0c 04 88 ff ff 98 08 00 00 00 00 00 00 .P.............. 80 07 00 00 00 00 00 00 58 00 00 00 2c 00 00 00 ........X...,... backtrace: [] create_object+0x13c/0x261 [] kmemleak_alloc+0x20/0x3c [] slab_post_alloc_hook+0x42/0x52 [] kmem_cache_alloc+0x67/0x76 [] dc_create_stream_for_sink+0x24/0x1cf [] create_stream_for_sink+0x6f/0x295 [] dm_update_crtcs_state+0xa6/0x268 [] amdgpu_dm_atomic_check+0x9a/0x314 [] drm_atomic_check_only+0x17a/0x42d [] drm_atomic_commit+0x13/0x4b [] drm_atomic_connector_commit_dpms+0xcb/0xe8 [] drm_mode_obj_set_property_ioctl+0xe6/0x1e3 [] drm_mode_connector_property_set_ioctl+0x2b/0x2d [] drm_ioctl_kernel+0x64/0x9d [] drm_ioctl+0x230/0x316 [] amdgpu_drm_ioctl+0x4b/0x7d v2: also handle break statements. Signed-off-by: Darren Salt Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 62f555377f972c206c69c6acc93d91f2baec9a26 Author: Andrey Grodzovsky Date: Fri Aug 18 10:52:20 2017 -0400 drm/amd/display: Refactor atomic check. Split into update crtcs and update plane functions. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 462 ++++++++++++---------- 1 file changed, 261 insertions(+), 201 deletions(-) commit 19f89e2392e692208a0a00465d30b2b2bf43e9a9 Author: Andrey Grodzovsky Date: Fri Aug 11 10:43:45 2017 -0400 drm/amd/display: Per plane validation context build. Introduce add/remove plane to/from context. Make DC wrapper to use them in WIndows/Diags. Use them in dc_update_surface_to_stream. Call add/remove plane from Linux DM. Remove dc_validation_set from dc_validate_global_state interface and by this remove clean Linux DM from using it. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 165 ++++------ drivers/gpu/drm/amd/display/dc/core/dc.c | 12 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 362 +++++++++++++-------- drivers/gpu/drm/amd/display/dc/dc.h | 37 ++- .../drm/amd/display/dc/dce100/dce100_resource.c | 16 +- .../drm/amd/display/dc/dce110/dce110_resource.c | 26 +- .../drm/amd/display/dc/dce112/dce112_resource.c | 16 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 16 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 3 - 9 files changed, 353 insertions(+), 300 deletions(-) commit 577b5c2b51014b3c276ab1d456aaad965dbb4930 Author: Charlene Liu Date: Tue Aug 22 20:15:28 2017 -0400 drm/amd/display: Block 6Ghz timing if SBIOS set HDMI_6G_en to 0 Signed-off-by: Charlene Liu Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 1 + drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 4 ++++ drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 1 + 3 files changed, 6 insertions(+) commit 0f0bdca5cae04ec2f842955bcef16a3daed6149f Author: Wenjing Liu Date: Tue Aug 22 18:42:51 2017 -0400 drm/amd/display: Safe stream encoder id in stream_status Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dc.h | 1 + 2 files changed, 2 insertions(+) commit aaa15026f273c184454ea8672274a682bc161da1 Author: Wenjing Liu Date: Tue Aug 22 15:49:57 2017 -0400 drm/amd/display: Fix return value from rx irq handler on up request Signed-off-by: Wenjing Liu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 67a72b6944446f68b9a930c13c8cdadba72beed8 Author: Harry Wentland Date: Tue Aug 22 09:35:41 2017 -0400 drm/amd/display: Stop including atomfimrwareid.h directly It's already included in atomfirmware.h Signed-off-by: Harry Wentland Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 1 - drivers/gpu/drm/amd/display/dc/bios/command_table2.c | 1 - drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c | 1 - 3 files changed, 3 deletions(-) commit ae5baf7a1047eece4ff87469ae85a45b5ddf6aa3 Author: Harry Wentland Date: Tue Aug 22 10:29:40 2017 -0400 drm/amd/display: Remove old, misleading comment Signed-off-by: Harry Wentland Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.c | 1 - 1 file changed, 1 deletion(-) commit 83a3d42d121301d26601ef7599052e1d78fde9fb Author: Bhawanpreet Lakha Date: Mon Aug 21 16:28:39 2017 -0400 drm/amd/display: Remove unneeded code Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 145 ---------------------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 73 ----------- drivers/gpu/drm/amd/display/dc/dc.h | 71 ----------- 3 files changed, 289 deletions(-) commit c25e2d1f8ff403fdb7a82a025ae492d167bbdb99 Author: Wenjing Liu Date: Mon Aug 21 16:43:08 2017 -0400 drm/amd/display: retry LT on failing LT in automated request [Description] Link training is not retried in automated link training request. In case link training is occasionally failing, there is not way to retry so the requested lane settings will not set. Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 39902db0343e0e4f335324d22d6707303be24448 Author: Bhawanpreet Lakha Date: Mon Aug 21 11:46:17 2017 -0400 drm/amd/display: Change log level for DCN powergatting Change log level from LOG_DC to LOG_DEBUG LOG_DC spams dmesg on linux when hotpluging Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5f06b3cf90d252160352442a789cad410eb6696e Author: Tony Cheng Date: Sun Aug 20 14:25:19 2017 -0400 drm/amd/display: retire dm_pp_apply_clock_for_voltage_request set dcfclk and fclk req with pp_smu_display_requirement_rv Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 26 +++++++++++++--------- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 8 ++----- 2 files changed, 17 insertions(+), 17 deletions(-) commit a0c38ebaa1fe99ea8d112d808d84a2e75194fcf6 Author: Charlene Liu Date: Mon Aug 21 12:59:41 2017 -0400 drm/amd/display: write dpcd 0x600 to 2 for DP/eDP when powerdown Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 10 +++++++++- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) commit 7fb77c51f3b8e91499b6fd1973804c9230d2d8d3 Author: Tony Cheng Date: Sat Aug 19 08:55:58 2017 -0400 drm/amd/display: version 3.1.01 Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++ drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit 4d1501eb65d606c05f28da12539cf0defd111f75 Author: Yongqiang Sun Date: Mon Aug 21 11:00:25 2017 -0400 drm/amd/display: Enable double buffer when unblank crtc. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 3 +++ 1 file changed, 3 insertions(+) commit 0045b749bdedc60ca46a7801cb9b5ae967bea669 Author: Harry Wentland Date: Tue Aug 22 10:29:23 2017 -0400 drm/amd/display: dc: Remove unneeded includes in DCN Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 --- 1 file changed, 3 deletions(-) commit 9ea29a1f8b9da52d8eca8b0996f1d84eac548d3b Author: Tony Cheng Date: Sat Aug 19 16:36:13 2017 -0400 drm/amd/display: memory leak dwb Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 5 +++++ 1 file changed, 5 insertions(+) commit 58314e5812d5027edb01e0d20cf72068c95a7c10 Author: Yue Hin Lau Date: Sat Aug 19 12:10:28 2017 -0400 drm/amd/display: cleanup naming of DCN DPP functions Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 41 +++++++++++----------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 25 ++++++++----- .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 20 +++++------ .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 2 +- 4 files changed, 48 insertions(+), 40 deletions(-) commit b823defeb73aa8737006abe73844fd697ecf6983 Author: Dmytro Laktyushkin Date: Fri Jul 28 08:16:27 2017 -0400 drm/amd/display: Fixed mpc add, enable always scaler for video surface. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 6 +++--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) commit 8eb5def95762dc1cd9e516510925a95060452c5a Author: Dmytro Laktyushkin Date: Fri Jul 28 08:16:27 2017 -0400 drm/amd/display: fix hubp mpcc and opp tracking This should be handled by mi and mpc only Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 6 ++---- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) commit f670af8a954ae09b1f4949421e5d300be66d1156 Author: Harry Wentland Date: Thu Aug 17 14:57:27 2017 -0400 drm/amd/display: Remove unnecessary assignemnt Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 1 - 1 file changed, 1 deletion(-) commit 79c24086570953e10f2c5c08946619a9a0f71ee9 Author: Bhawanpreet Lakha Date: Thu Aug 17 17:00:47 2017 -0400 drm/amd/display: Disable stutter for Raven Signed-off-by: Bhawanpreet Lakha Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3f1f74f436798a54b6ebcacfc026ddc4347eab46 Author: Jerry Zuo Date: Thu Aug 17 16:05:37 2017 -0400 drm/amd/display: Fix two MST not light up regressions 1. Change 100104: Move verify link cap after read edid causes MST link_cap struct not being set. It leads to zero denominator pbn_per_slot value, leading to the crash at dal_fixed31_32_div(). Skip MST link training for now and will need to add MST specific link traning routine later. 2. Change 98822: Adding edp supports changes link setting condition from max_link to verified_link. It leads to MST is getting wrong link settings. e.g. LINK_SPREAD_05_DOWNSPREAD_30KHZ not set in MST case Signed-off-by: Jerry Zuo Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 16 +++++++++------- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 8 ++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) commit dff2721bd1d777eba3917f04d4b8adede89badff Author: Yue Hin Lau Date: Thu Aug 17 17:17:37 2017 -0400 drm/amd/display: separate cm functions out from dcn10_dpp Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 662 ------------------ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 34 + .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 776 +++++++++++++++++++++ 4 files changed, 811 insertions(+), 663 deletions(-) commit 3005e437e70fd4d1da64d91b4ef027f62d3b9a41 Author: Wenjing Liu Date: Thu Aug 17 16:24:11 2017 -0400 drm/amd/display: re-enable audio after LT test [Description] Audio should be attached to the same pipe once it is attached. We will not remove audio endpoint in disable stream. We will reeanble the audio after automated link training test Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 14 ++++++++++++++ .../gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 -- 2 files changed, 14 insertions(+), 2 deletions(-) commit 9799624ac236eb238b5a5c885c759b1cbcac6349 Author: Wenjing Liu Date: Tue Aug 15 19:10:14 2017 -0400 drm/amd/display: Cache edp config in dc link Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 ++ drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 5e9a81b2c465557adbaeef7231834e3ab40e4102 Author: Yue Hin Lau Date: Tue Aug 15 17:44:19 2017 -0400 drm/amd/display: separate scl functions out from dcn10_dpp Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 3 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 650 +----------------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 5 + .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 762 +++++++++++++++++++++ 4 files changed, 770 insertions(+), 650 deletions(-) commit 57d972d4927581d027007c92b57b843c186128d4 Author: Roman Li Date: Thu Aug 17 16:14:45 2017 -0400 drm/amd/display: Fix FBC disable for stereo Removed FBC disable from dc_enable_stereo(). It should be implemented in stereo_setup callback, which is not implemented yet. Otherwise it always disable FBC regardless if stereo supported or not. Signed-off-by: Roman Li Reviewed-by: Bhawanpreet Lakha Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 11 ----------- 1 file changed, 11 deletions(-) commit 214435ff1369a9d48c194c7a75d918130c53bab2 Author: Corbin McElhanney Date: Wed Aug 16 11:49:07 2017 -0400 drm/amd/display: Log OTG registers with dcn10 hw state Signed-off-by: Corbin McElhanney Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 33 +++++++++++++++++ .../amd/display/dc/dcn10/dcn10_timing_generator.c | 42 ++++++++++++++++++++++ .../amd/display/dc/dcn10/dcn10_timing_generator.h | 25 +++++++++++++ 3 files changed, 100 insertions(+) commit b05dee52efdcb6286a28be4dddeb450b58591c6d Author: Charlene Liu Date: Wed Aug 16 20:25:42 2017 -0400 drm/amd/display: fix not enter/exit PSR with latest driver/SBIOS Signed-off-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 3 ++- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) commit 1bd4653a29a49f6fd732cd294e0f87b15feec5a8 Author: Roman Li Date: Wed Aug 16 19:06:49 2017 -0400 drm/amd/display: increase polling interval for fbc status update 1.Fixing error message: "wait counter exceeded, changes to HW not applied" 2. Added "FBC status changed to 0/1" logs Signed-off-by: Roman Li Reviewed-by: Bhawanpreet Lakha Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 42f8ffa1081a7bf430107587757a1e1b02dfcdf8 Author: Harry Wentland Date: Fri Sep 15 14:07:30 2017 -0400 drm/amd/display: Enable Vega by default. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d4d4a64574ab546811d29a21366afe6bb6cdb264 Author: Leo (Sunpeng) Li Date: Thu Sep 21 16:13:00 2017 -0400 drm/amd/display: Move copy_construct from state_alloc to atomic_check. Previously atomic_check assumed that dc_state is allocated and filled in. This is not the case when we hit EDEADLK and have to backup and retry. We could change atomic_state_clear but that revealed some other problems. For now let's create and construct dc_state in atomic_check. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 81c90ec0348002b6f6b0c108e3e60e666cb4b673 Author: Leo (Sunpeng) Li Date: Thu Sep 7 16:46:34 2017 -0400 drm/amd/display: Refactor dc_state creation into a function. For less repetition and easy debugging. Signed-off-by: Leo (Sunpeng) Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +--- drivers/gpu/drm/amd/display/dc/core/dc.c | 19 +++++++++++++------ drivers/gpu/drm/amd/display/dc/dc.h | 1 + 3 files changed, 15 insertions(+), 9 deletions(-) commit 1dc904974eb7deef924650adc5af542878ce2040 Author: Andrey Grodzovsky Date: Mon Jul 31 11:29:25 2017 -0400 drm/amd/display: Per stream validate_context build v2. Until now new context would start as empty, then populated with exsisting pipes + new. Now we start with duplication of existing context and then add/delete from the context pipes as needed. This allows to do a per stream resource population, start discarding dc_validation_set and by this brings DC closer to to DRM. v2: Add some fixes and rebase. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 68 ++- drivers/gpu/drm/amd/display/dc/core/dc.c | 108 +---- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 468 +++++++++++++++------ drivers/gpu/drm/amd/display/dc/dc.h | 32 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 78 +--- .../drm/amd/display/dc/dce110/dce110_resource.c | 86 +--- .../drm/amd/display/dc/dce112/dce112_resource.c | 143 +++---- .../drm/amd/display/dc/dce112/dce112_resource.h | 5 + .../drm/amd/display/dc/dce120/dce120_resource.c | 4 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 79 +--- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 85 ++-- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 19 +- drivers/gpu/drm/amd/display/dc/inc/resource.h | 6 +- 13 files changed, 577 insertions(+), 604 deletions(-) commit a185048ca88ce143f980f2b819f034cfc09a5377 Author: Tony Cheng Date: Sun Aug 13 13:50:52 2017 -0400 drm/amd/display: refactor pplib/smu communication new per SoC interface instead legacy interface with lots of un-used field that only cause confusion model pp_smu like one of our HW objects with func_ptr interface to call into it. struct pp_smu as handle to call pp/smu Signed-off-by: Tony Cheng Reviewed-by: Jun Lei Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 13 +- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 100 ++++++++-------- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 19 ++- drivers/gpu/drm/amd/display/dc/dm_pp_smu.h | 131 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dm_services.h | 5 +- drivers/gpu/drm/amd/display/dc/dm_services_types.h | 2 + drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 + drivers/gpu/drm/amd/display/dc/inc/resource.h | 1 + 8 files changed, 213 insertions(+), 60 deletions(-) commit 1e8635ea0ea370bf4f0f2b2f1b3eb61474dd962a Author: Zeyu Fan Date: Mon Aug 14 18:43:11 2017 -0400 drm/amd/display: Implement HDMI retimer settings for RV AM4 support. Signed-off-by: Zeyu Fan Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 69 ++++ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 420 ++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dm_helpers.h | 5 - .../amd/display/include/grph_object_ctrl_defs.h | 38 ++ 5 files changed, 524 insertions(+), 9 deletions(-) commit 0cb8a88122ecfaa183ede19748269cb4fb5c739c Author: Yue Hin Lau Date: Mon Aug 14 18:17:01 2017 -0400 drm/amd/display: move vm registers to hwsequencer Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 52 +++++++++- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 95 +++++++++++++++++- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 106 ++------------------- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 41 +------- drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 21 ++++ 5 files changed, 172 insertions(+), 143 deletions(-) commit 992fe94c1b6afdf6f09ada61d4a1ecc5df52fe5f Author: Tony Cheng Date: Thu Aug 3 08:49:41 2017 -0400 drm/amd/display: remove fake address reporting when blank Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 8 -------- 1 file changed, 8 deletions(-) commit be7c97f6a7d10cd60f09001c61047055b49d5d8d Author: Roman Li Date: Mon Aug 14 17:35:08 2017 -0400 drm/amd/display: Fix FBC compilation - Fixing compilation with ENABLE_FBC flag which was broken after flattening core_dc to dc Signed-off-by: Roman Li Reviewed-by: Jerry Zuo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + 1 file changed, 1 insertion(+) commit b4c8e6da39091b2931074e001febc598e2acdbb1 Author: Harry Wentland Date: Thu Aug 10 16:16:20 2017 -0400 drm/amd/display: Leave DCN config guard around fpu header See https://lists.freedesktop.org/archives/dri-devel/2017-August/149938.html Signed-off-by: Harry Wentland Reviewed-by: Jordan Lazare Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dm_services.h | 2 ++ 1 file changed, 2 insertions(+) commit 71afd9d14f49a0a16050ada488ac1be182f5602f Author: Charlene Liu Date: Fri Aug 11 13:22:02 2017 -0400 drm/amd/display: eDP power sequence T9 fail Signed-off-by: Charlene Liu Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 23 ++++++++++++++++++++++ .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) commit 4e772ae5f99a1595a2e064a70d2eab4946e5c08d Author: Yongqiang Sun Date: Fri Aug 11 11:23:30 2017 -0400 drm/amd/display: blank otg before power gate front end. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 641106d3fab8790af12c71e750d9b6287ffc75ce Author: Dmytro Laktyushkin Date: Thu Aug 3 16:41:48 2017 -0400 drm/amd/display: Use MAX_PIPES for DTO reg arrays Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fb3466a450cc4684654367ae2f47fc3fc7846574 Author: Bhawanpreet Lakha Date: Tue Aug 1 15:00:25 2017 -0400 drm/amd/display: Flattening core_dc to dc -Flattening core_dc to dc Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 73 +++++----- drivers/gpu/drm/amd/display/dc/core/dc.c | 162 ++++++++++----------- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 20 +-- .../gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 3 +- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 19 ++- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 1 - drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 22 +-- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 14 +- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 10 +- drivers/gpu/drm/amd/display/dc/dc.h | 71 +++++++-- .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 5 +- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 10 +- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 4 +- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 2 +- .../amd/display/dc/dce100/dce100_hw_sequencer.c | 9 +- .../amd/display/dc/dce100/dce100_hw_sequencer.h | 6 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 22 +-- .../drm/amd/display/dc/dce100/dce100_resource.h | 4 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 72 ++++----- .../amd/display/dc/dce110/dce110_hw_sequencer.h | 12 +- .../drm/amd/display/dc/dce110/dce110_resource.c | 26 ++-- .../drm/amd/display/dc/dce110/dce110_resource.h | 4 +- .../amd/display/dc/dce112/dce112_hw_sequencer.c | 5 +- .../amd/display/dc/dce112/dce112_hw_sequencer.h | 4 +- .../drm/amd/display/dc/dce112/dce112_resource.c | 26 ++-- .../drm/amd/display/dc/dce112/dce112_resource.h | 10 +- .../amd/display/dc/dce120/dce120_hw_sequencer.c | 5 +- .../amd/display/dc/dce120/dce120_hw_sequencer.h | 4 +- .../drm/amd/display/dc/dce120/dce120_resource.c | 18 +-- .../drm/amd/display/dc/dce120/dce120_resource.h | 4 +- .../drm/amd/display/dc/dce80/dce80_hw_sequencer.c | 5 +- .../drm/amd/display/dc/dce80/dce80_hw_sequencer.h | 4 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 46 +++--- .../gpu/drm/amd/display/dc/dce80/dce80_resource.h | 8 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c | 1 - .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 108 +++++++------- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h | 4 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 34 ++--- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.h | 4 +- drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 55 ------- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 8 +- drivers/gpu/drm/amd/display/dc/inc/dce_calcs.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h | 12 +- drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 1 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 50 ++++--- drivers/gpu/drm/amd/display/dc/inc/resource.h | 15 +- .../amd/display/dc/irq/dce110/irq_service_dce110.c | 6 +- .../amd/display/dc/irq/dce80/irq_service_dce80.c | 1 - .../gpu/drm/amd/display/include/logger_interface.h | 10 +- .../drm/amd/display/modules/freesync/freesync.c | 11 +- 51 files changed, 507 insertions(+), 527 deletions(-) commit 503a7c6f2518be909fa61276ee002846524b588b Author: Dmytro Laktyushkin Date: Thu Aug 3 10:19:58 2017 -0400 drm/amd/display: Use function pointer for update_plane_addr Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) commit b8e9eb7259f744fdc2e34f008e4af211ce0df19a Author: Charlene Liu Date: Wed Aug 9 14:03:34 2017 -0400 drm/amd/display: fix eDP bootup/S4 backlight on also pass-in correct dispclk tor DMCU Signed-off-by: Charlene Liu Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 12 +++++------- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 22 ++++++++++++++-------- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 2 ++ .../gpu/drm/amd/display/dc/inc/hw/display_clock.h | 2 +- 4 files changed, 22 insertions(+), 16 deletions(-) commit 65111f25f1fea751f3b4321a59c993c2898b7dbf Author: Bhawanpreet Lakha Date: Thu Aug 3 13:02:29 2017 -0400 drm/amd/display: change dcn_ip and dcn_soc into pointers -Change dcn_ip into pointer -Change dcn_soc into pointer This is needed for flattening of core_dc into dc, as without this the diags build fails Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 553 +++++++++++---------- drivers/gpu/drm/amd/display/dc/core/dc.c | 59 ++- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 28 +- drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 4 +- 4 files changed, 331 insertions(+), 313 deletions(-) commit e771aae02baa59386972faec491cd221c169ed53 Author: Corbin McElhanney Date: Wed Aug 9 10:30:28 2017 -0400 drm/amd/display: Add comment explaining context free This comment explains a previous change that adds some complexity to the context free in dc: commit 9ad58779a895 ("drm/amd/display: Fix accessing freed memory") Signed-off-by: Corbin McElhanney Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 77a4ea53fd89ccf823e77cc31cea808a3589f732 Author: Bhawanpreet Lakha Date: Wed Aug 2 16:56:03 2017 -0400 drm/amd/display: change bw_dceip and bw_vbios into pointers -Change bw_calcs_dceip into pointer -Change bw_calcs_vbios into pointer This is needed for flattening of core_dc into dc, as without this the diags build fails Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 26 +++++++++++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +- .../drm/amd/display/dc/dce110/dce110_resource.c | 34 +++++++-------- .../drm/amd/display/dc/dce112/dce112_resource.c | 50 +++++++++++----------- .../drm/amd/display/dc/dce120/dce120_resource.c | 24 +++++------ drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 4 +- 6 files changed, 83 insertions(+), 57 deletions(-) commit 391e20d84104a6b7b9d4a66fec6a7eb0a93f6ef4 Author: Duke Du Date: Thu Aug 3 10:20:52 2017 -0400 drm/amd/display: add display write back(DWB) Signed-off-by: Duke Du Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 10 + drivers/gpu/drm/amd/display/dc/dc.h | 2 + .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 87 ++- .../gpu/drm/amd/display/dc/dce/dce_clock_source.h | 8 + drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c | 652 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.h | 32 + .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 9 + drivers/gpu/drm/amd/display/dc/inc/clock_source.h | 4 + drivers/gpu/drm/amd/display/dc/inc/core_types.h | 6 + drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h | 193 ++++++ 11 files changed, 1003 insertions(+), 2 deletions(-) commit e8cd26434df0cd8d97f31aeb4399afcdc37fcfda Author: Jerry Zuo Date: Mon Jul 31 17:10:44 2017 -0400 drm/amd/display: Use atomic types for ref_count Current ref_count inc/dec is not guarded by locks which leads to a raced condition where two threads try to access the variable at the same time. In this case, both might act on the same cached value and inc/dec from the same value, rather than inc/dec by 2. Signed-off-by: Jerry Zuo Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 24 +++++++-------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 12 ++++---- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 14 ++++----- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 36 +++++++++++------------ drivers/gpu/drm/amd/display/dc/dc.h | 8 ++--- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 +- 8 files changed, 49 insertions(+), 51 deletions(-) commit f81483c4ccca0d2ceca14ee15564a14f2c34eb2c Author: Roman Li Date: Thu Aug 10 16:11:10 2017 -0400 drm/amd/display: fix gamma distortion on Vega Added missing reg shift/masks to soc base Signed-off-by: Roman Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 3 +++ 1 file changed, 3 insertions(+) commit 17b7cf8c556601eea56b38582fd74945a712cd93 Author: Alex Deucher Date: Wed Aug 23 09:42:22 2017 -0400 drm/amdgpu: disable DC on KB/ML for now Until I've had time to test it better. bug: https://bugs.freedesktop.org/show_bug.cgi?id=102372 Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 153ae53232d7d885b532d1aa7fa7ad156834a366 Author: Harry Wentland Date: Thu Aug 10 15:20:00 2017 -0400 drm/amd/display: Add a TODO list Signed-off-by: Harry Wentland Reviewed-by: Jordan Lazare Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/TODO | 81 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) commit 9355c0e8519f3b0d61278b5ab9dee68321494351 Author: Alex Deucher Date: Thu Aug 10 14:39:52 2017 -0400 drm/amdgpu/cik: add IP modules for DC for APUs Enable DC for DCE8 APUs. Signed-off-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cik.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7992a6290a79afc1568c873d434f39234f7d3e26 Author: Alex Deucher Date: Thu Aug 10 14:39:51 2017 -0400 drm/amd/disply/dc: add resource support for DCE8 APUs (v2) Add the appropriate resources for APUs: KV: 4 pipes, 7 dig, 3 PPLLs KB/ML: 2 pipes, 6 dig, 2 PPLLs v2: rebase changes Signed-off-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 8 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 343 ++++++++++++++++++++- .../gpu/drm/amd/display/dc/dce80/dce80_resource.h | 8 + 3 files changed, 356 insertions(+), 3 deletions(-) commit ebfdf0d0770bd20e9baff3750b5103d6b7fa21c3 Author: Alex Deucher Date: Thu Aug 10 14:39:50 2017 -0400 drm/amd/display/dc: add DCE_VERSION for DCE8 APUs DCE 8.1 = Kaveri DCE 8.3 = Kabini/Mullins Signed-off-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c | 2 ++ drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c | 2 ++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 11 ++++++++++- drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 6 ++++++ drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 2 ++ drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 2 ++ drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c | 2 ++ drivers/gpu/drm/amd/display/include/dal_types.h | 2 ++ 8 files changed, 28 insertions(+), 1 deletion(-) commit ea062558fd796ecff167ca64282bd2c3e3e2663f Author: Alex Deucher Date: Thu Aug 10 14:39:49 2017 -0400 drm/amd/display/dc: add DIGG for KV KV has 7 possible DIG blocks. Signed-off-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 6 ++++++ drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) commit 0d6fbccb22f8af70b729367431a489093aad2ddd Author: Alex Deucher Date: Thu Aug 10 14:39:48 2017 -0400 drm/amdgpu: add DCE8 APUs to dc_supported check Signed-off-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+) commit cd4b356f3a8abcd8a96e19b515cf7dc00f41dcbe Author: Alex Deucher Date: Thu Aug 10 14:39:47 2017 -0400 drm/amd/display/dm: add KV, KB, ML (v2) Add DCE8 APUs to display manager. v2: rebase changes Signed-off-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 2cf5a5e6adba1021a608f58fcedce7201d671086 Author: Alex Deucher Date: Thu Aug 10 14:22:22 2017 -0400 drm/amd/display/dc: make dce120_link_encoder_create static Only used in dce120_resource.c. Signed-off-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5394eb82133b6e9897b9d6e5aed13c08dd71d8c2 Author: Alex Deucher Date: Thu Aug 10 14:22:21 2017 -0400 drm/amd/display/dc: Make dce110_validate_bandwidth static (v2) Not used outside of the dce110_resource.c. v2: make a bunch of other functions static as well. Signed-off-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 533ed6c708334b697254ff831972b657f5c98a40 Author: Harry Wentland Date: Tue Aug 8 21:01:20 2017 -0400 drm/amd/display: Fix warnings about uninitialized use Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit 7483bed45de728dacc7cfffe641e67abb3513f61 Author: Harry Wentland Date: Tue Aug 8 12:23:15 2017 -0400 drm/amd/display: Pass correct number for gamma entries This was broken by "implement DXGI Gamma Ramps" Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a2607aef3d0210859d4e9cae6bba7e134ec720d8 Author: Harry Wentland Date: Tue Aug 8 11:35:10 2017 -0400 drm/amd/display: Fix regression in dce110_apply_ctx_for_surfaces Caused by "add programming for 0 plane case" which was tested on DCN but not on DCE. Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0c4d9977ae215859ff13304ef0fc02a8b779478 Author: Corbin McElhanney Date: Thu Aug 3 14:20:14 2017 -0400 drm/amd/display: fix HDMI 12bits last two bits are zero issue (FF-158) -[FF N-1] HDMI Deep Color Mode incorrect bit depth: FMT_DYNAMIC_EXP_EN is being reset to 0 Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 17 +++++++++++------ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 3 ++- 2 files changed, 13 insertions(+), 7 deletions(-) commit 233dcd2092f9f9786ff019174b1d38f288231f2c Author: Tony Cheng Date: Thu Aug 3 23:21:46 2017 -0400 drm/amd/display: log watermarks Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) commit 9d6f264b5653e1fe5e9646c7075cfc81445b25cd Author: Yongqiang Sun Date: Fri Aug 4 15:42:36 2017 -0400 drm/amd/display: Workaround for underflow. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 08b8ccfbcb511aa64efd8fa211f785597890af9e Author: Corbin McElhanney Date: Fri Aug 4 15:30:45 2017 -0400 drm/amd/display: Fix hw state logging regression Signed-off-by: Corbin McElhanney Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e1403629d86402ccc25a5c18feb80fc97f671c12 Author: Harry Wentland Date: Sat Aug 5 12:43:45 2017 -0400 drm/amd/display: Couple newline fixes Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dc.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) commit 0627bbd30f87e06987cb38aee557b06414ae3735 Author: Harry Wentland Date: Sat Aug 5 10:30:11 2017 -0400 drm/amd/display: Use public plane destroy helper Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8a5d82451e297fc3864bb9ab0247b53c7ab8a022 Author: Tony Cheng Date: Thu Aug 3 21:23:04 2017 -0400 drm/amd/display: use some sensible time out 40s time out is not sensible. also make all udelay poll happen more frequently since CPU is busy anyways Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_helper.c | 6 ++++- drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 11 +++++---- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 4 ++-- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 27 ++++++++++++++-------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 2 +- .../amd/display/dc/dcn10/dcn10_timing_generator.c | 18 +++++++-------- 6 files changed, 41 insertions(+), 27 deletions(-) commit 5aa72db72ccc08c2d3d3e4b0a285bab932db5132 Author: Corbin McElhanney Date: Thu Aug 3 18:29:42 2017 -0400 drm/amd/display: Fix accessing freed memory Signed-off-by: Corbin McElhanney Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cbb4d72e290df8fedc764c7abb823cae938a45aa Author: Yongqiang Sun Date: Thu Aug 3 15:46:10 2017 -0400 drm/amd/display: Clear water mark change request bit before programing. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3e9ad6164b98f82ff4b191980c502f09fee4deef Author: Eric Yang Date: Thu Aug 3 00:22:25 2017 -0400 drm/amd/display: add programming for 0 plane case Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 45 +++++++++++++--------- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 17 ++++++-- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 29 ++++++++++---- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 3 +- 4 files changed, 64 insertions(+), 30 deletions(-) commit f334073ae31eaee742811e6ca282622aad5844ad Author: Wenjing Liu Date: Thu Aug 3 13:57:05 2017 -0400 drm/amd/display: Move verify link cap after read edid DP link layer test 400.1.1 fails intermittently. The test device will pull hpd low immediately after verify link cap. Driver reads edid when hpd low that causes the test to fail. Move read edid before verify link cap, so driver will read edid before starting link training Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 16 ++++++++++++++++ drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 7 ------- 2 files changed, 16 insertions(+), 7 deletions(-) commit d66cf5f5013a4268057bcb92d301d010268ea27f Author: Anthony Koo Date: Thu Aug 3 09:59:23 2017 -0400 drm/amd/display: implement DXGI Gamma Ramps Support for gamma correction ramp in Floating Point format Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 +++++++------- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 21 ++++++++++++++++----- drivers/gpu/drm/amd/display/dc/dce/dce_ipp.c | 14 ++++++++++---- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 11 +++++++---- 4 files changed, 40 insertions(+), 20 deletions(-) commit 665da60f23d8c6bda5431529a73be49b3b9d97cb Author: Corbin McElhanney Date: Thu Aug 3 14:20:14 2017 -0400 drm/amd/display: Add more pstate sanity checks Signed-off-by: Corbin McElhanney Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit eb4e33b7c98a4d69d84d783fd0a7918e5ad011da Author: Tony Cheng Date: Thu Aug 3 09:22:14 2017 -0400 drm/amd/display: log underflow as well as convert output in ref_cycle to nano sec Signed-off-by: Tony Cheng Reviewed-by: Logatharshan Thothiralingam Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 33 ++++++++++++++++------ .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 5 ++-- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 3 ++ 3 files changed, 31 insertions(+), 10 deletions(-) commit 713950115bc5f964e65f79a7684468c41ed41654 Author: Tony Cheng Date: Thu Aug 3 08:59:12 2017 -0400 drm/amd/display: log HW state when we about to encounter DF DPM hang Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 115 +++++++++++---------- 1 file changed, 58 insertions(+), 57 deletions(-) commit c10efbd3714bfb6fff8c3b8e2d817028bc25355b Author: Charlene Liu Date: Thu Aug 3 13:04:44 2017 -0400 drm/amd/display: fix eDP power down sequence Signed-off-by: Charlene Liu Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 2a8f6ccb665c6ac53afdcf76b2aaa7fc5e513bfc Author: Harry Wentland Date: Mon Jul 31 16:32:18 2017 -0400 drm/amd/display: Clean up cursor code This will also fix disappearing cursor after resume. With this change we'll set cursor attributes, as well as cursor position on every update. The impact is minor. These are sample logs that show timestamps at beginning and end of atomic_check, commit_tail, handle_cursor_update, and before and after cursor_attribute and cursor_position calls: [ 66.800353] hwhw: begin of check [ 66.800377] hwhw: end of check [ 66.800428] hwhw: begin of commit_tail [ 66.800441] hwhw: begin of cursor [ 66.800449] hwhw: begin of cursor_attr [ 66.800468] hwhw: end of cursor_attr [ 66.800484] hwhw: end of cursor_positionr [ 66.800501] hwhw: end of commit_tail [ 66.807139] hwhw: begin of check [ 66.807160] hwhw: end of check [ 66.807206] hwhw: begin of commit_tail [ 66.807217] hwhw: begin of cursor [ 66.807225] hwhw: begin of cursor_attr [ 66.807357] hwhw: end of cursor_attr [ 66.807374] hwhw: end of cursor_positionr [ 66.807392] hwhw: end of commit_tail Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 283 +++++++--------------- 1 file changed, 92 insertions(+), 191 deletions(-) commit 9ee20ee6117b84fb6240f0ba5c4deafc23d9a458 Author: Yongqiang Sun Date: Tue Aug 1 16:54:48 2017 -0400 drm/amd/display: Implement tmz surface. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 10 ++++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 2 ++ 3 files changed, 13 insertions(+) commit 0d18d7bb80132467a3b88a2fe7277dc1fee65353 Author: Charlene Liu Date: Tue Aug 1 21:13:24 2017 -0400 drm/amd/display: fix dlg ttu calculation input Signed-off-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 37 ++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) commit 746e082fdd1c7650322ba4c08652245fcdf83adb Author: Charlene Liu Date: Tue Aug 1 13:23:56 2017 -0400 drm/amd/display: update predefined latency for Rv1_F0 Signed-off-by: Charlene Liu Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 10 ++++++++++ drivers/gpu/drm/amd/display/include/dal_asic_id.h | 3 +++ 2 files changed, 13 insertions(+) commit a7b06724eeb4ecca0c64e8f734e8ef27001670ca Author: Bhawanpreet Lakha Date: Mon Jul 31 12:09:02 2017 -0400 drm/amd/display: Fix comment placement for when new_stream is null Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 497de04ffe666c2f006ab318aa99cde25cc1176a Author: Dmytro Laktyushkin Date: Fri Jun 30 11:52:14 2017 -0400 drm/amd/display: do not report min_memory_clock_khz to pplib for dce8 & 10 Signed-off-by: Dmytro Laktyushkin Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f0f8b2db570bf3cdb6948cadb83e6dad0faf4c37 Author: Charlene Liu Date: Mon Jul 31 17:27:52 2017 -0400 drm/amd/display: fix PHYCLK in formula. Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_auto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a3329b172d26806477d07da7142925c8643ec9b Author: Harry Wentland Date: Mon Jul 31 13:15:04 2017 -0400 drm/amd/display: Fix plane_atomic_check when no dc_state Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d128c2f8a0d90f6e693c62423a678af4fc34bf5 Author: Jerry Zuo Date: Thu Jul 27 15:50:26 2017 -0400 drm/amd/display: Add surface to dm_plane_state if fb reserve fails Signed-off-by: Jerry Zuo Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 6dd28867b1f964226c1c0b1600ecbfa4f8f98bba Author: Charlene Liu Date: Mon Jul 31 15:35:01 2017 -0400 drm/amd/display: fix PHYCLK in formula. Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/calcs/dcn_calc_auto.c | 11 +++++++++ drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 28 ++++++++++++---------- drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h | 5 ++++ 3 files changed, 32 insertions(+), 12 deletions(-) commit 96c50c0d0cead772001fd4ab1861594c059e7e0f Author: Harry Wentland Date: Sun Jul 30 15:58:26 2017 -0400 drm/amd/display: Move encoder_info_frame to stream_res find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipes->encoder_info_frame/pipes->stream_res\.encoder_info_frame/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe_with_clk_src->encoder_info_frame/pipe_with_clk_src->stream_res\.encoder_info_frame/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/ctx->encoder_info_frame->/ctx->stream_res\.encoder_info_frame->/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe->encoder_info_frame/pipe->stream_res\.encoder_info_frame/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe_ctx->encoder_info_frame/pipe_ctx->stream_res\.encoder_info_frame/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx\[pipe_offset\]\.encoder_info_frame/pipe_ctx\[pipe_offset\]\.stream_res\.encoder_info_frame/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/grouped_pipes\[i\]->encoder_info_frame/grouped_pipes\[i\]->stream_^Cs\.encoder_info_frame/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/grouped_pipes\[0\]->encoder_info_frame/grouped_pipes\[0\]->stream_res\.encoder_info_frame/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/grouped_pipes\[1\]->encoder_info_frame/grouped_pipes\[1\]->stream_res\.encoder_info_frame/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx\[i\]->encoder_info_frame/pipe_ctx\[i\]->stream_res\.encoder_info_frame/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx_old->encoder_info_frame/pipe_ctx_old->stream_res\.encoder_info_frame/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_set\[j\]->encoder_info_frame/pipe_set\[j\]->stream_res\.encoder_info_frame/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx\[i\]\.encoder_info_frame/pipe_ctx\[i\]\.stream_res\.encoder_info_frame/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipes\[i\]\.encoder_info_frame/pipes\[i\]\.stream_res\.encoder_info_frame/g' Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 ++-- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) commit 10688217e3af3ec73892139bed3d23a6e1170a14 Author: Harry Wentland Date: Sun Jul 30 15:17:43 2017 -0400 drm/amd/display: Move pix_clk_params into stream_res find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipes->pix_clk_params/pipes->stream_res\.pix_clk_params/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe_with_clk_src->pix_clk_params/pipe_with_clk_src->stream_res\.pix_clk_params/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/ctx->pix_clk_params->/ctx->stream_res\.pix_clk_params->/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe->pix_clk_params/pipe->stream_res\.pix_clk_params/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe_ctx->pix_clk_params/pipe_ctx->stream_res\.pix_clk_params/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx\[pipe_offset\]\.pix_clk_params/pipe_ctx\[pipe_offset\]\.stream_res\.pix_clk_params/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/grouped_pipes\[i\]->pix_clk_params/grouped_pipes\[i\]->stream_^Cs\.pix_clk_params/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/grouped_pipes\[0\]->pix_clk_params/grouped_pipes\[0\]->stream_res\.pix_clk_params/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/grouped_pipes\[1\]->pix_clk_params/grouped_pipes\[1\]->stream_res\.pix_clk_params/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx\[i\]->pix_clk_params/pipe_ctx\[i\]->stream_res\.pix_clk_params/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx_old->pix_clk_params/pipe_ctx_old->stream_res\.pix_clk_params/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_set\[j\]->pix_clk_params/pipe_set\[j\]->stream_res\.pix_clk_params/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx\[i\]\.pix_clk_params/pipe_ctx\[i\]\.stream_res\.pix_clk_params/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipes\[i\]\.pix_clk_params/pipes\[i\]\.stream_res\.pix_clk_params/g' Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++-- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 4 ++-- .../gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 14 +++++++------- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 4 ++-- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 3 ++- 7 files changed, 19 insertions(+), 18 deletions(-) commit afaacef482759215681ad0a8c6a8b60cc7d29592 Author: Harry Wentland Date: Sun Jul 30 14:59:17 2017 -0400 drm/amd/display: Move audio to stream_res find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipes->audio/pipes->stream_res\.audio/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe_with_clk_src->audio/pipe_with_clk_src->stream_res\.audio/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/ctx->audio->/ctx->stream_res\.audio->/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe->audio/pipe->stream_res\.audio/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe_ctx->audio/pipe_ctx->stream_res\.audio/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx\[pipe_offset\]\.audio/pipe_ctx\[pipe_offset\]\.stream_res\.audio/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/grouped_pipes\[i\]->audio/grouped_pipes\[i\]->stream_^Cs\.audio/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/grouped_pipes\[0\]->audio/grouped_pipes\[0\]->stream_res\.audio/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/grouped_pipes\[1\]->audio/grouped_pipes\[1\]->stream_res\.audio/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx\[i\]->audio/pipe_ctx\[i\]->stream_res\.audio/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx_old->audio/pipe_ctx_old->stream_res\.audio/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_set\[j\]->audio/pipe_set\[j\]->stream_res\.audio/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx\[i\]\.audio/pipe_ctx\[i\]\.stream_res\.audio/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipes\[i\]\.audio/pipes\[i\]\.stream_res\.audio/g' Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 +-- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 12 ++++---- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 32 +++++++++++----------- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 3 +- 4 files changed, 25 insertions(+), 26 deletions(-) commit 0b73b84cf59334e48d56e5ef5e121f4ecd02be44 Author: Kenny Tsao Date: Sun Jul 30 16:17:49 2017 -0400 drm/amd/display: remove remaining DCN1 guard Signed-off-by: Kenny Tsao Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 10 ---------- 1 file changed, 10 deletions(-) commit 8e9c4c8cf35ff23aafc69f9ef4c9cc471dac4094 Author: Harry Wentland Date: Sun Jul 30 14:36:12 2017 -0400 drm/amd/display: Move stream_enc to stream_res find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipes->stream_enc/pipes->stream_res\.stream_enc/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/ctx->stream_enc->/ctx->stream_res\.stream_enc->/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe->stream_enc/pipe->stream_res\.stream_enc/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe_ctx->stream_enc/pipe_ctx->stream_res\.stream_enc/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx\[pipe_offset\]\.stream_enc/pipe_ctx\[pipe_offset\]\.stream_res\.stream_enc/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/grouped_pipes\[i\]->stream_enc/grouped_pipes\[i\]->stream_^Cs\.stream_enc/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/grouped_pipes\[0\]->stream_enc/grouped_pipes\[0\]->stream_res\.stream_enc/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/grouped_pipes\[1\]->stream_enc/grouped_pipes\[1\]->stream_res\.stream_enc/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx\[i\]->stream_enc/pipe_ctx\[i\]->stream_res\.stream_enc/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx_old->stream_enc/pipe_ctx_old->stream_res\.stream_enc/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_set\[j\]->stream_enc/pipe_set\[j\]->stream_res\.stream_enc/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx\[i\]\.stream_enc/pipe_ctx\[i\]\.stream_res\.stream_enc/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipes\[i\]\.stream_enc/pipes\[i\]\.stream_res\.stream_enc/g' Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 12 ++-- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 6 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 16 ++--- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 72 +++++++++++----------- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 +- 8 files changed, 58 insertions(+), 58 deletions(-) commit 6b670fa965b620bf0131a0a339a388a0581bc466 Author: Harry Wentland Date: Sun Jul 30 13:59:26 2017 -0400 drm/amd/display: Move TG to stream_res find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipes->tg/pipes->stream_res\.tg/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/ctx->tg->/ctx->stream_res\.tg->/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe->tg/pipe->stream_res\.tg/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe_ctx->tg/pipe_ctx->stream_res\.tg/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i \ 's/pipe_ctx\[pipe_offset\]\.tg/pipe_ctx\[pipe_offset\]\.stream_res\.tg/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/grouped_pipes\[i\]->tg/grouped_pipes\[i\]->stream_^Cs\.tg/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/grouped_pipes\[0\]->tg/grouped_pipes\[0\]->stream_res\.tg/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/grouped_pipes\[1\]->tg/grouped_pipes\[1\]->stream_res\.tg/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe_ctx\[i\]->tg/pipe_ctx\[i\]->stream_res\.tg/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe_ctx_old->tg/pipe_ctx_old->stream_res\.tg/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe_set\[j\]->tg/pipe_set\[j\]->stream_res\.tg/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe_ctx\[i\]\.tg/pipe_ctx\[i\]\.stream_res\.tg/g' Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 +- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 8 +- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 +- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 2 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 64 +++++++-------- .../drm/amd/display/dc/dce110/dce110_resource.c | 12 +-- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 96 +++++++++++----------- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 3 +- .../amd/display/dc/irq/dce110/irq_service_dce110.c | 2 +- 13 files changed, 105 insertions(+), 106 deletions(-) commit a6a6cb349e39ef23a341a17752eebf69a5c0d7ff Author: Harry Wentland Date: Sun Jul 30 13:55:28 2017 -0400 drm/amd/display: Move OPP to stream_res find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipes->opp/pipes->stream_res\.opp/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/ctx->opp->/ctx->stream_res\.opp->/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe->opp/pipe->stream_res\.opp/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/pipe_ctx->opp/pipe_ctx->stream_res\.opp/g' Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++-- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 6 +++--- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 12 +++++------ .../drm/amd/display/dc/dce110/dce110_resource.c | 2 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 24 +++++++++++----------- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 3 +-- 8 files changed, 30 insertions(+), 31 deletions(-) commit 86a66c4eb7365c96230bca218634439f7b057306 Author: Harry Wentland Date: Sun Jul 30 11:55:55 2017 -0400 drm/amd/display: Move mi, ipp, xfm to plane_res find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/\.mi/\.plane_res.mi/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/->mi/->plane_res.mi/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/\.ipp/\.plane_res.ipp/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/->ipp/->plane_res.ipp/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/\.xfm/\.plane_res.xfm/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/->xfm/->plane_res.xfm/g' To clean up bad renames: find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/\.plane_res\.min/\.min/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/->plane_res\.min/->min/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/->plane_res\.mic/->mic/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/\.plane_res\.mis/\.mis/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/->plane_res\.mid/->mid/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/\.plane_res\.mid/\.mid/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/->plane_res\.mis/->mis/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/\.plane_res\.min/\.min/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/->plane_res\.min/->min/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/->plane_res\.mic/->mic/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/\.plane_res\.mis/\.mis/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/->plane_res\.mid/->mid/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/\.plane_res\.mid/\.mid/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/->plane_res\.mis/->mis/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/\.plane_res\.ipps/\.ipps/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/mpcc_cfg\.plane_res\.mi/mpcc_cfg\.mi/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/mi->plane_res\./mi->/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/cfg->plane_res\./cfg->/g' Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 6 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 20 +++--- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 10 +-- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 80 +++++++++++----------- .../drm/amd/display/dc/dce110/dce110_resource.c | 8 +-- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 40 +++++------ .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 6 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 7 +- 8 files changed, 89 insertions(+), 88 deletions(-) commit 6702a9ac53f88a373a9969b4dee292f4c5f023f5 Author: Harry Wentland Date: Sun Jul 30 11:51:21 2017 -0400 drm/amd/display: Move scl_data to plane_res find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/\.scl_data/\.plane_res.scl_data/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/->scl_data/->plane_res.scl_data/g' Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 36 ++++---- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 84 ++++++++--------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 100 ++++++++++----------- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 6 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 34 +++---- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 28 +++--- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 4 +- 7 files changed, 145 insertions(+), 147 deletions(-) commit 79b06f0ce58cc6eb7cd8ad83c308fa59ccb355e0 Author: Harry Wentland Date: Sun Jul 30 11:43:06 2017 -0400 drm/amd/display: Stub new resource objects We want to split pipe_ctx into plane and stream resource objects. Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/inc/core_types.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 0a8f43ff64156525f98220efe0992925995153b6 Author: Harry Wentland Date: Sun Jul 30 13:19:56 2017 -0400 drm/amd/display: Remove struct from stack in dp_set_test_pattern Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 3be5262e353b8ab97c528bfc7d0dd3c820e4ba27 Author: Harry Wentland Date: Thu Jul 27 09:55:38 2017 -0400 drm/amd/display: Rename more dc_surface stuff to plane_state Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 288 +++++++++++---------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 20 +- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 52 ++-- drivers/gpu/drm/amd/display/dc/core/dc.c | 130 +++++----- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 188 +++++++------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 190 +++++++------- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 8 +- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 74 +++--- drivers/gpu/drm/amd/display/dc/dc.h | 32 +-- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 4 +- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 2 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 8 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 125 +++++---- .../drm/amd/display/dc/dce110/dce110_resource.c | 20 +- .../drm/amd/display/dc/dce112/dce112_resource.c | 8 +- .../drm/amd/display/dc/dce120/dce120_resource.c | 2 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 8 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 140 +++++----- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 4 +- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 4 +- drivers/gpu/drm/amd/display/dc/inc/resource.h | 2 +- .../gpu/drm/amd/display/include/logger_interface.h | 2 +- 24 files changed, 658 insertions(+), 657 deletions(-) commit 0971c40e180696c3512b9a63ca7ca5161cbfce32 Author: Harry Wentland Date: Thu Jul 27 09:33:33 2017 -0400 drm/amd/display: Rename dc_stream to dc_stream_state find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/struct dc_stream/struct dc_stream_state/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/struct dc_stream_state_update/struct dc_stream_update/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/struct dc_stream_state_status/struct dc_stream_status/g' Plus some manual changes Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 42 ++++++------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 6 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 38 ++++++------ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 18 +++--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 68 +++++++++++----------- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 26 ++++----- drivers/gpu/drm/amd/display/dc/dc.h | 58 +++++++++--------- drivers/gpu/drm/amd/display/dc/dc_types.h | 2 +- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 2 +- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 2 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 4 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 16 ++--- .../drm/amd/display/dc/dce110/dce110_resource.c | 8 +-- .../drm/amd/display/dc/dce112/dce112_resource.c | 8 +-- .../drm/amd/display/dc/dce112/dce112_resource.h | 2 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 4 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 8 +-- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 10 ++-- drivers/gpu/drm/amd/display/dc/dm_helpers.h | 6 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 11 ++-- drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 4 +- .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/resource.h | 13 ++--- .../amd/display/dc/virtual/virtual_link_encoder.c | 2 +- .../drm/amd/display/modules/freesync/freesync.c | 50 ++++++++-------- .../gpu/drm/amd/display/modules/inc/mod_freesync.h | 28 ++++----- 29 files changed, 222 insertions(+), 222 deletions(-) commit c9614aeb12f80fa7a787e608d75b707175997edd Author: Harry Wentland Date: Thu Jul 27 09:24:04 2017 -0400 drm/amd/display: Rename dc_surface to dc_plane_state find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/struct dc_surface/struct dc_plane_state/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/struct dc_plane_state_update/struct dc_surface_update/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/struct dc_plane_state_status/struct dc_surface_status/g' find -name Makefile -o -name Kconfig -o -name "*.c" -o -name "*.h" \ -o -name "*.cpp" -o -name "*.hpp" | \ xargs sed -i 's/struct dc_plane_state_dcc_cap/struct dc_surface_dcc_cap/g' Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 18 +++++++++--------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 4 ++-- drivers/gpu/drm/amd/display/dc/core/dc.c | 18 +++++++++--------- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 4 ++-- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 22 +++++++++++----------- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 16 ++++++++-------- drivers/gpu/drm/amd/display/dc/dc.h | 22 +++++++++++----------- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 2 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 6 +++--- .../drm/amd/display/dc/dce100/dce100_resource.h | 2 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 14 +++++++------- .../drm/amd/display/dc/dce112/dce112_resource.c | 2 +- .../drm/amd/display/dc/dce120/dce120_resource.c | 2 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 2 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 14 +++++++------- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 6 +++--- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 4 ++-- drivers/gpu/drm/amd/display/dc/inc/resource.h | 2 +- .../gpu/drm/amd/display/include/logger_interface.h | 2 +- 22 files changed, 84 insertions(+), 84 deletions(-) commit 43193c7991de7a2112fe2ddcfd930733bc357862 Author: AMD\ktsao Date: Sun Jul 30 14:18:36 2017 -0400 drm/amd/display: remove DCN1 guard as DCN1 is already open sourced. Signed-off-by: Kenny Tsao Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 6 -- drivers/gpu/drm/amd/display/dc/dce/dce_abm.h | 91 ++++++++++------------ .../gpu/drm/amd/display/dc/dce/dce_clock_source.h | 2 - drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h | 20 ++--- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 15 ++-- .../drm/amd/display/dc/dce/dce_stream_encoder.h | 6 -- drivers/gpu/drm/amd/display/dc/dm_services.h | 2 - drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 - .../gpu/drm/amd/display/dc/inc/hw/display_clock.h | 2 - drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h | 2 - drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 4 - drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 2 - .../drm/amd/display/dc/inc/hw/timing_generator.h | 7 +- drivers/gpu/drm/amd/display/include/dal_asic_id.h | 4 - drivers/gpu/drm/amd/display/include/dal_types.h | 3 +- 15 files changed, 58 insertions(+), 110 deletions(-) commit 7a09f5be98df25a7253e4647e801120b37b90feb Author: Yue Hin Lau Date: Fri Jul 28 13:08:03 2017 -0400 drm/amd/display: move regamma from opp to dpp for dce Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 237 -------------------- drivers/gpu/drm/amd/display/dc/dce/dce_opp.h | 113 +--------- drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 240 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 88 ++++++++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 18 +- .../amd/display/dc/dce110/dce110_opp_regamma_v.c | 88 ++++---- .../gpu/drm/amd/display/dc/dce110/dce110_opp_v.c | 3 - .../gpu/drm/amd/display/dc/dce110/dce110_opp_v.h | 11 - .../drm/amd/display/dc/dce110/dce110_transform_v.c | 3 + .../drm/amd/display/dc/dce110/dce110_transform_v.h | 14 ++ drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 17 -- 11 files changed, 399 insertions(+), 433 deletions(-) commit 9b690ef3c70422cdcd0cf912db33f2c92ef4a53f Author: Bhawanpreet Lakha Date: Fri Jul 28 13:11:00 2017 -0400 drm/amd/display: Avoid full modeset when not required Fix IGT test case (kms_atomic_transition) -DRM sets the mode_changed flag, while we don't need to do a full modeset. -We want to override the mode_changed flag in this case If we don't do this, we will still bypass the modeset in DC. This will fail to update the new stream_status, causing nullptr at a later stage when trying to access stream_status" We now avoid this by discarding the new_stream instead of partially filling it. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 97 +++++++++++++++-------- 1 file changed, 62 insertions(+), 35 deletions(-) commit d54d29db47cdbe1f26776f2d03320ca56c5271fa Author: Bhawanpreet Lakha Date: Fri Jul 28 12:07:38 2017 -0400 drm/amd/display: Move and Rename "is_stream_changed()" -Move "is_stream_changed()" to DC interface -Rename "is_stream_changed()" to "dc_is_stream_changed()" Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ drivers/gpu/drm/amd/display/dc/inc/resource.h | 2 -- 4 files changed, 5 insertions(+), 5 deletions(-) commit b701542d29d61c3514f51496168831c8476a8e2a Author: Andrey Grodzovsky Date: Fri Jul 28 18:21:22 2017 -0400 drm/amd/display: fix >340 Mhz with deep color pipe split no display the input to HW formula needs to take care the deep color. Signed-off-by: Charlene Liu Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 13 ++++++++++++- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 -- 2 files changed, 12 insertions(+), 3 deletions(-) commit e51bf71e8c827e1d71235f6b1fe12a952c3a0514 Author: Dmytro Laktyushkin Date: Fri Jul 28 18:21:22 2017 -0400 drm/amd/display: fix bw_calc for hdmi and 420 outputs Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d70ccd4a65373599fe9aa999dff07c05ea2893e6 Author: Yongqiang Sun Date: Fri Jul 28 15:33:38 2017 -0400 drm/amd/display: Keep blank until set visibility to true after mode switch Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 21 +++++++++------------ drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 4 ++++ 2 files changed, 13 insertions(+), 12 deletions(-) commit e75504b1292f3a9a173789a06a674fb3ba04450f Author: Dmytro Laktyushkin Date: Fri Jul 28 14:16:13 2017 -0400 drm/amd/display: fix dcn fe reset memory access error Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f669089aa12ab9b509ed8ff3755e73794b7941ea Author: Andrey Grodzovsky Date: Thu Jul 27 16:47:14 2017 -0400 drm/amd/display: Add stateless surface validation to validate_resources Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit cbd194881e05844cc54573480aac8df3fd97222d Author: Andrey Grodzovsky Date: Wed Jul 26 15:52:28 2017 -0400 drm/amd/display: Implement plane atomic_check. Use per surface validation hook. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 690b5e3960810c733f812f8849c3a05415c2f53d Author: Roman Li Date: Thu Jul 27 20:00:06 2017 -0400 drm/amd/display: Initial prototype of FBC implementation - Protected by ENABLE_FBC compile flag Signed-off-by: Roman Li Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 7 ++- drivers/gpu/drm/amd/display/dc/dc.h | 3 + drivers/gpu/drm/amd/display/dc/dc_types.h | 3 + .../amd/display/dc/dce110/dce110_hw_sequencer.c | 69 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/inc/compressor.h | 1 + 5 files changed, 81 insertions(+), 2 deletions(-) commit a32e24b486e80417e62d34f60d625783affff431 Author: Roman Li Date: Thu Jul 27 19:53:55 2017 -0400 drm/amd/display: Initial prototype of FBC implementation - Protected by ENABLE_FBC compile flag - DC part will follow Signed-off-by: Roman Li Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 29 +++++++++++++++++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 12 ++++++++++ 2 files changed, 41 insertions(+) commit cdc95cbb4cc29679e6116548d6e39d02a2b91649 Author: Andrey Grodzovsky Date: Wed Jul 26 15:51:31 2017 -0400 drm/amd/display: add preferred mode from Video Format Preference Data Block Signed-off-by: Charlene Liu Reviewed-by: Vitaly Prosyak Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 2 -- 1 file changed, 2 deletions(-) commit 792671d7e1e28995c6a63104fac1208e19a0ab08 Author: Andrey Grodzovsky Date: Wed Jul 26 15:51:31 2017 -0400 drm/amd/display: Add per surface validation hook. For now just validate pixel format in the hook. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 11 +++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 12 +++++++++++- drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.h | 2 ++ drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 3 +++ drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 5 ++++- drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 4 +++- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 ++ 8 files changed, 37 insertions(+), 3 deletions(-) commit 49baf95740b4f233ea286ebbe7c1066c03f5dd3b Author: Vikrant Mhaske Date: Thu Jul 27 17:30:52 2017 +0800 drm/amd/display: Fix DCN compile errors Fix for DCN compiler errors caused due to various submits Signed-off-by: Charlene Liu Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 ++ 1 file changed, 2 insertions(+) commit bdf9a1a0e16c9e60be796341d79da87503a1cf70 Author: Yue Hin Lau Date: Tue Jul 25 16:45:18 2017 -0400 drm/amd/display: move ocsc programming from opp to dpp for dce Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 201 +------------------- drivers/gpu/drm/amd/display/dc/dce/dce_opp.h | 31 --- drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 210 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 30 +++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 35 +++- .../drm/amd/display/dc/dce110/dce110_opp_csc_v.c | 45 +++-- .../gpu/drm/amd/display/dc/dce110/dce110_opp_v.c | 2 - .../gpu/drm/amd/display/dc/dce110/dce110_opp_v.h | 6 - .../drm/amd/display/dc/dce110/dce110_transform_v.c | 2 + .../drm/amd/display/dc/dce110/dce110_transform_v.h | 7 + drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 7 +- 11 files changed, 306 insertions(+), 270 deletions(-) commit b830ebc910f641286ea0b816614db43d1135fc1a Author: Harry Wentland Date: Wed Jul 26 21:03:22 2017 -0400 drm/amd/display: Fix ckeckpatch problems in amdgpu_dm Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 179 ++++++++++++---------- 1 file changed, 94 insertions(+), 85 deletions(-) commit e7b07ceef2a650e5ed8ca37997689e086c680daf Author: Harry Wentland Date: Thu Aug 10 13:29:07 2017 -0400 drm/amd/display: Merge amdgpu_dm_types and amdgpu_dm This separation stopped making sense a long time ago. Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/Makefile | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3245 ++++++++++++++++++- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 108 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 1 - .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 1 - .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 3286 -------------------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 135 - 8 files changed, 3350 insertions(+), 3430 deletions(-) commit 1515a47b44c8667987d070fdc494691f91b44b46 Author: Harry Wentland Date: Wed Jul 26 19:31:53 2017 -0400 drm/amd/display: Rename firmware_info to dc_firmware_info This is to avoid conflicts with amdgpu's firmware_info once we merge amdgpu_dm_types with amdgpu_dm. Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 14 +++++++------- drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dc_bios_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 2 +- drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c | 2 +- .../gpu/drm/amd/display/include/grph_object_ctrl_defs.h | 2 +- 11 files changed, 21 insertions(+), 21 deletions(-) commit 1c3fb02d2567ae348a3495c93bea991e9d028780 Author: Eric Yang Date: Wed Jul 26 18:31:25 2017 -0400 drm/amd/display: update clocks we report to PPlib Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 39 ++++++++++++------------ 1 file changed, 20 insertions(+), 19 deletions(-) commit 4654a2f7fce0c2fd3dafe2c366ddf8e9e080fa44 Author: Roman Li Date: Wed Jul 26 16:27:37 2017 -0400 drm/amd/display: add detect caps for edp 1. The caps detect sequence for edp is different from dp. Added separate function for edp. 2. Removed max_link_setting and replaced it with verified to avoid confusion. 3. Reverted sink count guard for edp powerdown as unnecessary with the changes above. Signed-off-by: Roman Li Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 11 ++++++++--- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 4 +--- drivers/gpu/drm/amd/display/dc/dc.h | 1 - drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 2 ++ 5 files changed, 12 insertions(+), 8 deletions(-) commit cd273548e4f96508c97e5325ce0f5301aa2e3ad5 Author: Dmytro Laktyushkin Date: Wed Jul 26 17:01:06 2017 -0400 drm/amd/display: fix mpcc idle wait Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc408d726c20f32e4fdd688f870dd2b17960d4a2 Author: Dmytro Laktyushkin Date: Fri Jul 21 17:46:50 2017 -0400 drm/amd/display: mpc block redesign Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 2 - drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 5 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 146 +++++------- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 8 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 246 ++++++++++++++------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.h | 82 +++---- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 3 + .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 74 +++---- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 3 +- drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 4 +- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 26 ++- drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 7 + 12 files changed, 339 insertions(+), 267 deletions(-) commit 54e8695ef14acc04e9aa99957249f520cf52e826 Author: Dmytro Laktyushkin Date: Wed Jul 26 16:54:39 2017 -0400 drm/amd/display: collapse dce11 reset_hw_ctx_wrap into 1 function Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/dce110/dce110_hw_sequencer.c | 47 +++++++++------------- 1 file changed, 20 insertions(+), 27 deletions(-) commit 2f3bfb2794e1aed018e344469f9c371f36f12867 Author: Roman Li Date: Wed Jul 26 14:42:38 2017 -0400 drm/amd/display: safeguard compressor api Only call compressor api if it's available. Signed-off-by: Roman Li Reviewed-by: Bhawanpreet Lakha Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 4d6356b0cc264686597aac2d04886cbfd8607f09 Author: Eric Yang Date: Wed Jul 26 16:15:26 2017 -0400 drm/amd/display: reduce 40s time out to 1s in disable crtc Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a989ab08a7e3ee4675ea56b5dcfd0f2966aa91db Author: Leo (Sunpeng) Li Date: Wed Jul 26 16:13:48 2017 -0400 drm/amd/display: Roll stream into dc_stream Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 29 +++++++------------------ 1 file changed, 8 insertions(+), 21 deletions(-) commit 4fa086b9b6640818c053c79d4d7104790ba76cb7 Author: Leo (Sunpeng) Li Date: Tue Jul 25 20:51:26 2017 -0400 drm/amd/display: Roll core_stream into dc_stream Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 10 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 2 +- drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 16 +- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 92 ++++---- drivers/gpu/drm/amd/display/dc/core/dc.c | 107 ++++----- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 41 ++-- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 7 +- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 259 ++++++++++----------- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 118 +++++----- drivers/gpu/drm/amd/display/dc/dc.h | 71 +++--- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 10 +- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 2 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 12 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 176 +++++++------- .../drm/amd/display/dc/dce110/dce110_resource.c | 46 ++-- .../drm/amd/display/dc/dce112/dce112_resource.c | 16 +- .../drm/amd/display/dc/dce112/dce112_resource.h | 2 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 12 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 72 +++--- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 36 +-- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 33 +-- drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 4 +- .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 3 +- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/resource.h | 14 +- .../amd/display/dc/virtual/virtual_link_encoder.c | 2 +- .../drm/amd/display/modules/freesync/freesync.c | 60 +++-- .../gpu/drm/amd/display/modules/inc/mod_freesync.h | 28 +-- 31 files changed, 612 insertions(+), 649 deletions(-) commit 2248eb6b4f1fdd7aded987d178a95b021d3a1d91 Author: Tony Cheng Date: Tue Jul 25 22:52:45 2017 -0400 drm/amd/display: log HUBP using DTN logging also simplify DTN INFO. all we need is a way to have DC log register states some where we can compare with golden. going through connectivity is overkill. Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 9 ++++ .../gpu/drm/amd/display/dc/basics/log_helpers.c | 28 ------------ drivers/gpu/drm/amd/display/dc/basics/logger.c | 3 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 53 +++++++++++++++++++--- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 34 ++++++++++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 18 ++++++++ drivers/gpu/drm/amd/display/dc/dm_helpers.h | 6 --- drivers/gpu/drm/amd/display/dc/dm_services.h | 12 +++++ .../gpu/drm/amd/display/include/logger_interface.h | 24 +++++----- 9 files changed, 133 insertions(+), 54 deletions(-) commit d1f69890658909fad1b3881e618a841fc3bd3d96 Author: Vitaly Prosyak Date: Tue Jul 25 09:01:13 2017 -0500 drm/amd/display: Add interfaces for new CM blocks Signed-off-by: Vitaly Prosyak Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 485 ++++++++++++++++++++++- 2 files changed, 485 insertions(+), 2 deletions(-) commit 8d6a615a16d6fd75c455561914e71b903df73aa4 Author: Yongqiang Sun Date: Tue Jul 25 17:11:26 2017 -0400 drm/amd/display: Disable timestamp and entry heading Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/logger.c | 3 ++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit b3d6c3f0f676a06820aa23c9f8590e080d6f6765 Author: Harry Wentland Date: Mon Jul 24 14:04:27 2017 -0400 drm/amd/display: Minor fix for dc_sink refactor Signed-off-by: Harry Wentland Reviewed-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 3639fa68122154b453eeaac840daadf3c7c56db4 Author: Zeyu Fan Date: Tue Jul 25 15:14:24 2017 -0400 drm/amd/display: Clean up some DCN1 guards Signed-off-by: Zeyu Fan Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c | 1 + drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 ++ drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 2 ++ drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 2 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 6 +++--- drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 1 + drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 1 + drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c | 5 +++-- 9 files changed, 15 insertions(+), 7 deletions(-) commit f4d5abf56b03e55f83d300324e5bf5f32431171c Author: Yue Hin Lau Date: Tue Jul 25 16:02:33 2017 -0400 drm/amd/display: move ocsc programming from opp to dpp Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48841a20fc794cee0dcbcabee64e068bd6db2df7 Author: Roman Li Date: Tue Jul 25 14:50:44 2017 -0400 drm/amd/display: Fix eDP panel light-up Power-down panel on disale only if sink exists otherwise it fails edid read during init sequence Signed-off-by: Roman Li Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4017fcdf5824ea30736e2ecebd02dfa37a249eb5 Author: Andrey Grodzovsky Date: Mon Jul 24 15:35:24 2017 -0400 drm/amd/display: Use stream validation hook. Use dc_validate_stream from crtc atomic_check for single stream validation. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 86 ++++++++++++---------- 1 file changed, 48 insertions(+), 38 deletions(-) commit 9345d9874c324b2f8cce79d4de11f27ae1ef80e9 Author: Andrey Grodzovsky Date: Fri Jul 21 16:34:36 2017 -0400 drm/amd/display: Move stream validations into seperate function. Stateless streams validations (not require resource population) moved into hook to be called directly from DM. Call dc_validate_stream be before validate_with_context for non Linux APIs Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 24 +++++++++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 61 +++++++++++++++------- drivers/gpu/drm/amd/display/dc/dc.h | 2 + .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 7 ++- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 2 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 24 ++------- .../drm/amd/display/dc/dce110/dce110_resource.c | 23 ++------ .../drm/amd/display/dc/dce112/dce112_resource.c | 25 ++------- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 25 ++------- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 25 ++------- .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 2 +- .../amd/display/dc/virtual/virtual_link_encoder.c | 2 +- 12 files changed, 90 insertions(+), 132 deletions(-) commit 6be425f3dc16bac797f300136b976bce46229784 Author: Eric Yang Date: Mon Jul 24 10:47:02 2017 -0400 drm/amd/display: break up plane disable and disconnect in set mode Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 23 +++-- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 5 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 102 ++++++++++++++++++--- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 4 +- 4 files changed, 111 insertions(+), 23 deletions(-) commit a74b27341e46aad3eb48a8c5eadc38b71f79cbce Author: Tony Cheng Date: Sun Jul 23 15:22:47 2017 -0400 drm/amd/display: separate plane disable sequence - disconnect: trigger hw to disconnect plane on next vsync - disable: disables HW block and disable clocks - power_down: kill power Signed-off-by: Tony Cheng Reviewed-by: Eric Yang Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 83 ++++++++++++++++------ 1 file changed, 61 insertions(+), 22 deletions(-) commit ee356d8f4fff35510b83aa71299ddc0ccb798d58 Author: Charlene Liu Date: Mon Jul 24 21:41:28 2017 -0400 drm/amd/display: single PSR display not allow CSTATE sw w/a Description: HW issue when all the pipes are off, DCE_allow_cstate is 0. New sequence : blank OTG only instead of previous OTG_master_en=0) Signed-off-by: Charlene Liu Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 ++++++ drivers/gpu/drm/amd/display/dc/dc_types.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) commit 7a6c4af6bf41516cc9e12d83cc8fcebfdd8be01c Author: Harry Wentland Date: Mon Jul 24 15:30:17 2017 -0400 drm/amd/display: Roll core_gamma into dc_gamma Signed-off-by: Harry Wentland Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 6 ++---- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 22 +++++++++------------- drivers/gpu/drm/amd/display/dc/dc.h | 6 +++--- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 7 +++++++ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 11 ----------- 5 files changed, 21 insertions(+), 31 deletions(-) commit 0b0aab86d51ee63d521f0d96ff4dfe1d6252f9b2 Author: Harry Wentland Date: Mon Jul 24 15:20:50 2017 -0400 drm/amd/display: Roll gamma struct into core_gamma Signed-off-by: Harry Wentland Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 21 ++++----------------- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 3 +++ 2 files changed, 7 insertions(+), 17 deletions(-) commit b73a22d3257f9ec237c46be12d74b58d5a925d8c Author: Harry Wentland Date: Mon Jul 24 14:04:27 2017 -0400 drm/amd/display: Roll core_sink into dc_sink Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 4 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 60 +++++++++++----------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 30 +++++------ drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 15 +++--- drivers/gpu/drm/amd/display/dc/dc.h | 19 ++++--- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 21 +------- 11 files changed, 72 insertions(+), 91 deletions(-) commit 89899039356a645c1cebe5a454d3577aa1f42bf2 Author: Harry Wentland Date: Mon Jul 24 13:55:26 2017 -0400 drm/amd/display: Roll sink struct into core_sink Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 43 +++++++++---------------- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 3 ++ 2 files changed, 18 insertions(+), 28 deletions(-) commit d0778ebfd58f5650de17531296ee5ecdde39ba68 Author: Harry Wentland Date: Sat Jul 22 20:05:20 2017 -0400 drm/amd/display: Roll core_link into dc_link Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 4 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 100 ++++---- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 229 +++++++++--------- drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 6 +- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 264 ++++++++++----------- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 40 ++-- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 8 +- drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 9 +- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 +- drivers/gpu/drm/amd/display/dc/dc.h | 112 ++++++--- drivers/gpu/drm/amd/display/dc/dc_ddc_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 4 +- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 2 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 2 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 16 +- .../drm/amd/display/dc/dce110/dce110_resource.c | 2 +- .../drm/amd/display/dc/dce112/dce112_resource.c | 2 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 2 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 58 +---- drivers/gpu/drm/amd/display/dc/inc/dc_link_ddc.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 16 +- drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/link_hwss.h | 22 +- .../gpu/drm/amd/display/include/logger_interface.h | 8 +- 29 files changed, 444 insertions(+), 484 deletions(-) commit e12cfcb1d447cc937d1abc6f4aab8bbe5f88542e Author: Harry Wentland Date: Thu Jul 20 11:43:32 2017 -0400 drm/amd/display: Roll core_surface into dc_surface Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 8 +- drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 16 ++-- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 26 +++--- drivers/gpu/drm/amd/display/dc/core/dc.c | 73 +++++++-------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 42 ++++----- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 44 ++++----- drivers/gpu/drm/amd/display/dc/dc.h | 45 +++++---- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 4 +- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 2 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 102 ++++++++++----------- .../drm/amd/display/dc/dce110/dce110_resource.c | 2 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 76 +++++++-------- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 16 +--- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 4 +- drivers/gpu/drm/amd/display/dc/inc/resource.h | 2 +- 16 files changed, 226 insertions(+), 240 deletions(-) commit 08b1688620426ad3e09fc7a98aabc28dda30cde6 Author: Zeyu Fan Date: Sun Jul 23 18:30:15 2017 -0400 drm/amd/display: Move DCHUBBUB block from MemInput to HW sequencer. Signed-off-by: Zeyu Fan Reviewed-by: Zeyu Fan Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 6 +- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 122 ++++++++- drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 54 +--- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 1 + .../amd/display/dc/dce120/dce120_hw_sequencer.c | 64 +++++ .../drm/amd/display/dc/dce120/dce120_resource.c | 2 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 304 ++++++++++++++++++++- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 303 -------------------- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 76 +----- drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 7 +- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 4 + 11 files changed, 492 insertions(+), 451 deletions(-) commit c8d7bd8bd0c08aa9115589d264e274ed7fdf4c2e Author: Yue Hin Lau Date: Sun Jul 23 12:13:37 2017 -0400 drm/amd/display: move RGAM programming from opp to dpp Signed-off-by: Yue Hin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 432 ++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 499 ++++++++++++++++++++- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 16 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 428 ------------------ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.h | 492 +------------------- drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 7 + drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 7 - drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 29 ++ 8 files changed, 972 insertions(+), 938 deletions(-) commit e63825be738ea0bb975aee43b603ac5f0190d7a8 Author: Charlene Liu Date: Sun Jul 23 16:45:45 2017 -0400 drm/amd/display: fix YCbCr420 deep color mode not supported Signed-off-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 2 ++ 1 file changed, 2 insertions(+) commit b6762f0c16a43c3d2867fb652f8efa429f70c83d Author: Eric Yang Date: Mon Jul 24 11:18:29 2017 -0400 drm/amd/display: add missing func for dce11o to avoid crash Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7db90a6b58761577596499ddd90f3c5ace2b716d Author: Tony Cheng Date: Sat Jul 22 21:58:08 2017 -0400 drm/amd/display: move ocsc programming from opp to dpp Signed-off-by: Tony Cheng Reviewed-by: Yuehin Lau Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 148 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 46 ++++++- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 147 -------------------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.h | 40 ------ drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 37 ++++++ drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 21 --- drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 26 ++-- 8 files changed, 242 insertions(+), 225 deletions(-) commit 8748068764e7a50ac787c1c17f402f3fbbe97ccc Author: Eric Yang Date: Sun Jul 23 15:18:57 2017 -0400 drm/amd/display: add idle wait for passive surface update and modeset Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 19 +++++++++++++++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 18 +++++++++++++++++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 4 ++++ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 -- drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 3 +++ drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 1 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 2 ++ 7 files changed, 46 insertions(+), 3 deletions(-) commit 755d3bcfd44c16d344c7c6305ac6e7da19c27f5e Author: Eric Yang Date: Sun Jul 23 14:17:09 2017 -0400 drm/amd/display: Fix generic_reg_wait 1000ms case Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_helper.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 0a87425a37b4c1f06d75949ea39e60455a2b0a4f Author: Tony Cheng Date: Wed Jul 12 22:35:52 2017 -0400 drm/amd/display: move VGA to HWSS from TG Signed-off-by: Tony Cheng Reviewed-by: Zeyu Fan Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 11 ++++++- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 3 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 12 ++++++- .../amd/display/dc/dcn10/dcn10_timing_generator.c | 38 ---------------------- 4 files changed, 23 insertions(+), 41 deletions(-) commit 8c4abe0b07a12c402f009abed8217e6c2e33a300 Author: Ding Wang Date: Tue Jul 18 17:18:11 2017 -0400 drm/amd/display: fix decide_link_settings Signed-off-by: Ding Wang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 6 +- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 140 ++++++++++------------- drivers/gpu/drm/amd/display/dc/dc.h | 1 + 3 files changed, 63 insertions(+), 84 deletions(-) commit 03618e910797c9bb7ec8eb1e45df64ad8080a37a Author: Harry Wentland Date: Thu Jul 20 10:26:23 2017 -0400 drm/amd/display: Roll surface struct into core_surface Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 37 +++++++++--------------- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 4 +++ 2 files changed, 18 insertions(+), 23 deletions(-) commit 516666318fe1f427ab81e2ebe45d116a9667c3b5 Author: Dmytro Laktyushkin Date: Fri Jul 21 17:35:16 2017 -0400 drm/amd/display: support for updated register headers on DCN Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 12 +++++++- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 14 +++++++-- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 17 +++++++--- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 19 +++++++++--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.h | 15 ++++++++- .../amd/display/dc/dcn10/dcn10_timing_generator.c | 36 ++++++++++++---------- drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 4 +++ 8 files changed, 88 insertions(+), 31 deletions(-) commit f811fd5a66a3e69cdc184accfe189de5a1f6dba4 Author: Wesley Chalmers Date: Thu Jul 20 17:13:12 2017 -0400 drm/amd/display: Change DTN_INFO macro Signed-off-by: Wesley Chalmers Reviewed-by: Wesley Chalmers Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/include/logger_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50e27654d778114382093eecc1d6e5b7e9343d23 Author: Zeyu Fan Date: Thu Jul 20 19:04:56 2017 -0400 drm/amd/display: Implement logic for hdmi info packet bits. Signed-off-by: Zeyu Fan Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 68 +++++++++++++++++++---- drivers/gpu/drm/amd/display/dc/dc_types.h | 25 +++++++++ 2 files changed, 83 insertions(+), 10 deletions(-) commit 98e4a22f02da4a66f7652a3301dcb689b739e521 Author: Dmytro Laktyushkin Date: Tue Jul 18 20:13:05 2017 -0400 drm/amd/display: revert dcn10 soc defaults to 17 19 Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa9850705fc05b7e7f44558e30705ac54579e724 Author: Eric Yang Date: Thu Jul 20 16:17:17 2017 -0400 drm/amd/display: fix locking in apply_ctx_for_surface Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 7f10f3c2a761ddf3dc18be45d4ccf60db5fe10cf Author: Tony Cheng Date: Wed Jul 19 20:22:22 2017 -0400 drm/amd/display: mpcc disconnect and pipe pg in multi-display still quite hacky. but this address not properly shutdown pipe video underlay + enable another display case, as well as mode changes with video overlay. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Reviewed-by: Eric Yang Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 23 +++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 9b1c9b4c2eec7cb2a4d3762da7aa78aea8e34630 Author: Dmytro Laktyushkin Date: Thu Jul 20 14:51:16 2017 -0400 drm/amd/display: update dcn register headers Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.h | 7 ++++--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 12 +++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) commit 2b13d7d380d50811fd4fc022d135c3c5bb70a418 Author: Tony Cheng Date: Fri Jul 14 14:07:16 2017 -0400 drm/amd/display: mpo debug sanity checks Signed-off-by: Tony Cheng Reviewed-by: Eric Yang Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 6 + .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 152 ++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 21 +++ .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1 + 5 files changed, 179 insertions(+), 2 deletions(-) commit 6d244be884d20b1e9c912291a242dccedd6d9040 Author: Tony Cheng Date: Thu Jul 20 00:12:20 2017 -0400 drm/amd/display: plumbing to allow easy print of HW state for DTN Signed-off-by: Tony Cheng Reviewed-by: Wesley Chalmers Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++++++ drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 12 ++++++++++++ drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 2 ++ drivers/gpu/drm/amd/display/include/logger_interface.h | 4 ++++ 5 files changed, 27 insertions(+) commit fc0956909f24d2cd6f69777881bcccd771a06f35 Author: Tony Cheng Date: Wed Jul 12 22:00:34 2017 -0400 drm/amd/display: register programming consolidation remove redundant DPP_CLOCK_ENABLE in ipp. clock programmed by HWSS Signed-off-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 1 - drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.h | 2 -- 2 files changed, 3 deletions(-) commit 72f0281d34b464121f9f6b75a2d7a2502055ec79 Author: Roman Li Date: Wed Jul 19 16:59:14 2017 -0400 drm/amd/display: fix index and union overwrite in compressor Fixing 2 bugs in compressor: - array out of bounds due to incorrect index - compressor options always 0 due to union overwrite Signed-off-by: Roman Li Reviewed-by: Bhawanpreet Lakha Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dce80/dce80_compressor.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 8ee65d7c93cb082d6c1ca584b7565c1cc08e7861 Author: Wenjing Liu Date: Wed Jul 19 13:18:26 2017 -0400 drm/amd/display: Return hpd_irq_dpcd from hpd_rx handler Signed-off-by: Wenjing Liu Reviewed-by: Wenjing Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 5 ++++- drivers/gpu/drm/amd/display/dc/dc.h | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) commit 3d696cbfd48f20d482f2aab2c65ce3a540debd89 Author: Zeyu Fan Date: Wed Jul 19 16:46:42 2017 -0400 drm/amd/display: Set i2c speed to 100khz for DCE11.2 and later. Signed-off-by: Zeyu Fan Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 6631e5a91139f317caa6c75b38553afda0fa8626 Author: Dmytro Laktyushkin Date: Wed Jul 19 14:32:21 2017 -0400 drm/amd/display: fix dcn10_resource read_dce_straps Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 20e9b0718babaaea9912ad5481a5089292c451a6 Author: Harry Wentland Date: Fri Aug 4 16:20:10 2017 -0400 drm/amd: Add missing SURFACE_TMZ register shift/mask Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/asic_reg/raven1/DCN/dcn_1_0_sh_mask.h | 2 ++ 1 file changed, 2 insertions(+) commit ee87a45e95a859a9df5a623d532dd472535cd6ea Author: Harry Wentland Date: Tue Jul 25 10:56:49 2017 -0400 drm/amd/include: Add DCHUBBUB_TEST_DEBUG register defines Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/asic_reg/raven1/DCN/dcn_1_0_offset.h | 4 ++++ 1 file changed, 4 insertions(+) commit d8bad05a62a72975cab549f875e0fe2d159169c4 Author: Harry Wentland Date: Mon Jul 24 17:23:45 2017 -0400 drm/amd/include: Add DC_PINSTRAPS.AUDIO defines Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/asic_reg/raven1/DCN/dcn_1_0_offset.h | 2 ++ drivers/gpu/drm/amd/include/asic_reg/raven1/DCN/dcn_1_0_sh_mask.h | 3 +++ 2 files changed, 5 insertions(+) commit eb78d83e06371873b87a19721e7fe1503ba1d308 Author: Leo (Sunpeng) Li Date: Tue Jul 18 18:33:23 2017 -0400 drm/amd/display: Do not release state objects on atomic check fail In any drm ioctl call, drm_atomic_state_clear() is called at the end to destroy the states; even if atomic check fails. Therefore, releasing states on atomic check failure is incorrect. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit 4bdbab3efda297b2432ae4e722385deaa0089315 Author: Eric Yang Date: Tue Jul 18 15:50:47 2017 -0400 drm/amd/display: powergate fe of reused pipes to reset ttu When we exit MPO, disconnected pipes cannot be immediately powergated because registers are double buffered, and actual disconnection does not happen until VUPDATE. So it is differred for many flips. However in the case of exiting full screen, the transition from MPO to grph only back to MPO is very fast and also involves increasing of watermarks. Since the underlay pipe is never powergated in this scenario, it keeps its old TTU counter, which causes allowPstateSwitch signal to be de-asserted when compared to the new increased watermark. Since the new pipe is not enabled yet, the signal will be continously de-asserted and hangs SMU, who's waiting for the signal to do pstate switching. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2233ec72b350fb8480f67b83f6a71ea422af60a3 Author: Anthony Koo Date: Tue Jul 18 10:21:43 2017 -0400 drm/amd/display: Add regkey for DRR control for internal panel Also need to change default to off Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 - .../drm/amd/display/modules/freesync/freesync.c | 74 ++++++++++++---------- .../gpu/drm/amd/display/modules/inc/mod_freesync.h | 1 - 3 files changed, 40 insertions(+), 36 deletions(-) commit d65359d571aa33dee9ddae659e92d1cb09ffbb2a Author: Tony Cheng Date: Fri Jul 14 13:42:23 2017 -0400 drm/amd/display: revert order change of HUBP and MPC disable - root cause was we disable opp clk in MPC disconnect - hubp_blank is not double buffered, so we can't blank until MPC disconnect or we have risk of underflow Signed-off-by: Tony Cheng Reviewed-by: Eric Yang Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 2 -- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 41 +++++++++++++--------- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 5 +++ .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 2 ++ 4 files changed, 32 insertions(+), 18 deletions(-) commit 15e173352eeae76286e0d018f9eec6b55726caa4 Author: Charlene Liu Date: Mon Jul 17 16:04:02 2017 -0400 drm/amd/display: fix aviInfoFrame bar Info and add set_avMute Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 10 ++++++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 37 ++++++++++++++++++---- .../drm/amd/display/dc/dce/dce_stream_encoder.c | 13 +++++++- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 13 ++++++-- .../amd/display/dc/dce110/dce110_hw_sequencer.h | 1 + .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 1 + .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 3 ++ drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 2 ++ .../display/dc/virtual/virtual_stream_encoder.c | 4 +++ 10 files changed, 77 insertions(+), 10 deletions(-) commit 1674d35bf57b0546577b87af266e45de3ccf45c0 Author: Eric Yang Date: Mon Jul 17 10:22:05 2017 -0400 drm/amd/display: properly turn off unused mpc before front end programming MPCC_OPP_ID must be programmed to 0xf to properly turn off the mpcc. However the software state of the mpcc must keep track of the opp that the mpcc is attached to for reset to properly happen. This is kinda hacky right now, but a good solution may involve a lot of work. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 83572340097012c91de3f96e52797491c79cfe43 Author: Charlene Liu Date: Mon Jul 17 17:46:49 2017 -0400 drm/amd/display: fix DVI connected to HDMI connector max tmds clock Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 820e3935489c85d7dc3024eec709b016ba75b376 Author: Ding Wang Date: Thu Jul 13 12:09:57 2017 -0400 drm/amd/display: link training fallback actions Signed-off-by: Ding Wang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 239 +++++++++++++++++---- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 8 + .../drm/amd/display/include/link_service_types.h | 9 + 4 files changed, 215 insertions(+), 43 deletions(-) commit 90114434772321881c8d11133b634e710e4e1f06 Author: Andrey Grodzovsky Date: Thu Jul 13 16:27:08 2017 -0400 drm/amd/display: Fix S3 gamma corruption. On S3 resume gamma is corrupted since no gamma programming took place. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++ 1 file changed, 2 insertions(+) commit 4bd3ae5fb5156eb47b4d7f4f12d8467d9c4a8623 Author: Vitaly Prosyak Date: Thu Jul 13 15:42:58 2017 -0500 drm/amd/display: Move view port registers and programming to memory input. Signed-off-by: Vitaly Prosyak Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 36 --------------------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 36 --------------------- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 ++ .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 37 +++++++++++++++++++++- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 36 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 4 +++ 6 files changed, 78 insertions(+), 73 deletions(-) commit b02c3b055fe27cb37969c68cd81db767a16af43b Author: Dmytro Laktyushkin Date: Fri Jul 7 17:21:45 2017 -0400 drm/amd/display: hwseq init sequence update Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 8 +++- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 51 +++++----------------- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h | 2 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 1 - 4 files changed, 20 insertions(+), 42 deletions(-) commit daf6b57dd736ec93b2e1769b90514b015feed3c1 Author: Dmytro Laktyushkin Date: Tue Jul 11 13:48:17 2017 -0400 drm/amd/display: add line number to reg_wait timeout print Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_helper.c | 6 +++--- drivers/gpu/drm/amd/display/dc/dm_services.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/reg_helper.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 0a214e2fb6b0a56519b6d5efab4b21475c233ee0 Author: Andrey Grodzovsky Date: Thu Jul 13 10:56:48 2017 -0400 drm/amd/display: Release cached atomic state in S3. Fixes memory leak. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 60bf1860d29f4f459e8b195dc73fcb2d980500d0 Author: Andrey Grodzovsky Date: Thu Jul 13 10:52:47 2017 -0400 drm/amd/display: Preserve refcount for S3 case. Curent_context is zerroed out for suspend, keep the refcount. Minor code move in dc_commit_context_no_check Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 587cdfe9463e6b66186c3c70fe7e63790cf4d148 Author: Vitaly Prosyak Date: Wed Jul 5 17:03:04 2017 -0500 drm/amd/display: Rename trasnform to dpp for dcn's Signed-off-by: Vitaly Prosyak Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 1064 +++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 419 ++++++++ .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 + .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 38 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_transform.c | 1065 -------------------- .../gpu/drm/amd/display/dc/dcn10/dcn10_transform.h | 421 -------- 7 files changed, 1505 insertions(+), 1506 deletions(-) commit 71a2f23e9101887de251ef1dcd35219d4e4f5e93 Author: Eric Yang Date: Wed Jul 12 18:38:04 2017 -0400 drm/amd/display: fix mpo exit hang Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 38917a1eb2748021fc0fd2ed4fd9b7f583713916 Author: Tony Cheng Date: Wed Jul 12 09:00:14 2017 -0400 drm/amd/display: ensure OTG is locked before proceeding also remove tg lock at init_hw as not all OTG is running Signed-off-by: Tony Cheng Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 -- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 4 ++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.h | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) commit 9294c7763fdc3da62dbf74a279921120c8f76721 Author: Charlene Liu Date: Wed Jul 12 15:49:46 2017 -0400 drm/amd/display: fix 4k@30 with 10bit deep color and avi for BT2020 Signed-off-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d21becbe0225de0e2582d17d4fbc73fbd103b1f7 Author: Tony Cheng Date: Wed Jul 12 11:54:10 2017 -0400 drm/amd/display: avoid disabling opp clk before hubp is blanked. Signed-off-by: Tony Cheng Reviewed-by: Eric Yang Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 7 +++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 18 ++++++++++++++---- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 2 -- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.h | 8 ++------ 4 files changed, 23 insertions(+), 12 deletions(-) commit 9a3afbb3ea37b9a6bc16b9d6e4a51b183724158d Author: Andrey Grodzovsky Date: Tue Jul 11 18:36:42 2017 -0400 drm/amd/display: dc_validate_ctx refocunt fixes. In dc_resource_validate_ctx_copy_construct don't override dst context refcount. Remove extra retain to new ctx in dc_update_surfaces_and_stream Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 5 +---- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) commit 189f73e32e9a7fc5ac62f244b66f8b41a78803c7 Author: Tony Cheng Date: Wed Jul 12 09:02:54 2017 -0400 drm/amd/display: change order of HUBP and MPC disable according to HW guide blank hubp first before disconnect MPC Signed-off-by: Tony Cheng Reviewed-by: Eric Yang Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 10 +++++++--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) commit ef347b3b80c2f973140553db41224f886ef3b9da Author: John Wu Date: Wed Jul 12 14:25:52 2017 +0800 drm/amd/display: Fix eDP power isn't off when lid close Signed-off-by: John Wu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0a323b84fab27fe51d35a4c55c73484c45c50f14 Author: Andrey Grodzovsky Date: Tue Jul 11 14:42:57 2017 -0400 drm/amd/display: Release dm_state->context when state is cleared. Handling a use case of TEST_ONLY request from DRM where commit is not goiing to be called. We need to release the allocated dc_validate_context in this case. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 ++++++++++++++++++++++ .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 1 + 2 files changed, 24 insertions(+) commit 3b42a1c09568ac6b65bfa40931600c5fe49d31e2 Author: Andrey Grodzovsky Date: Tue Jul 11 13:45:57 2017 -0400 drm/amd/display: Skip DC validation for flips and cursor. Nothing to validate in DC in this case. Skip it. Signed-off-by: Andrey Grodzovsky Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 35 +++++++++++----------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 8a76708ec4be2e9d63131e3769f17a04d8a82c87 Author: Andrey Grodzovsky Date: Tue Jul 11 14:41:51 2017 -0400 drm/amd/display: Introduce refcount for dc_validate_context Linux requires to be able to release allocated context in case it was never commited. Signed-off-by: Andrey Grodzovsky Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 64 ++++++++++++++++++------- drivers/gpu/drm/amd/display/dc/dc.h | 4 ++ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 + 3 files changed, 54 insertions(+), 16 deletions(-) commit 2ebad8eb19f68638c5f5dee385e05aa466e810e5 Author: Charlene Liu Date: Tue Jul 11 13:40:52 2017 -0400 drm/amd/display: change non_dpm0 state's default SR latency Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7b0c470fcb44b7dbe63db5b5fb52b6123ebe335f Author: Leo (Sunpeng) Li Date: Mon Jul 10 14:04:21 2017 -0400 drm/amd/display: Flattening to dc_transfer_func Flattening dc transfer functions in the following manner: transfer_func > core_transfer_func > dc_transfer_func References to deleted structs are updated as needed. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 19 ++++--------------- drivers/gpu/drm/amd/display/dc/dc.h | 10 ++++++---- .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 10 +++++----- .../gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 10 +++++----- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 8 -------- 5 files changed, 20 insertions(+), 37 deletions(-) commit d7e3316cf492d950f086e7fe5d3eb643c9e84be4 Author: Andrey Grodzovsky Date: Fri Jul 7 16:14:12 2017 -0400 drm/amd/display: Attach surface to dm_plane_state. Attach surface to state. Remove Create surface from commit. Propogate any surface creation and initialization error back to atomic_check caller. clean outdated code in check and commit. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 348 +++++++++------------ .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 2 +- 2 files changed, 147 insertions(+), 203 deletions(-) commit 3d21a662500fdcc2760ec7d936692bb9efa06c67 Author: Andrey Grodzovsky Date: Tue Jul 25 18:11:18 2017 -0400 drm/amd/display: Clean dm_plane_state hooks. New surface is created in check only, in duplicate we just reference exsisting surface and in destroy we release it. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 43 +++------------------- 1 file changed, 6 insertions(+), 37 deletions(-) commit adef2ce36e6ad76888159ea6225da54019d0ff0e Author: Andrey Grodzovsky Date: Mon Jul 10 16:24:42 2017 -0400 drm/amd/display: Leave all validate_ctx life cycle management to DC. Follow DC fix. Signed-off-by: Andrey Grodzovsky Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 --------------- 1 file changed, 15 deletions(-) commit a85c205ae3d183c196d0af7df336b1315e95faf7 Author: Corbin McElhanney Date: Mon Jul 10 15:52:10 2017 -0400 drm/amd/display: Fix context copy memory leak This change corrects an error introduced in 355f123f. Instead of using the copy constructor to assign the new context, we swap the pointer. Signed-off-by: Corbin McElhanney Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4e5095ca06a00fda50e2fcc721b1f923478778a8 Author: Dmytro Laktyushkin Date: Fri Jul 7 11:24:13 2017 -0400 drm/amd/display: dal1.1 hwseq prog update Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 7dbeaae2a554c479120836bb02a97d602e5ad4a3 Author: Dmytro Laktyushkin Date: Fri Jul 7 10:37:46 2017 -0400 drm/amd/display: dal1.1 xfm prog update Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_transform.c | 10 ++--- .../gpu/drm/amd/display/dc/dcn10/dcn10_transform.h | 43 +++++++++++----------- 2 files changed, 27 insertions(+), 26 deletions(-) commit a3ac9dad7494c946d323fd461df03bed9507157e Author: Dmytro Laktyushkin Date: Thu Jul 6 17:35:17 2017 -0400 drm/amd/display: dal1.1 ipp prog update Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 99 +++++++++++------------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.h | 1 + 2 files changed, 48 insertions(+), 52 deletions(-) commit ea658f7552583b27fd5f4351caf8a139cb554b50 Author: Dmytro Laktyushkin Date: Thu Jul 6 15:58:25 2017 -0400 drm/amd/display: dal1.1 opp prog update Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4fac6da2cb93cd6cabfaeb6de2eb0401bbcc805b Author: Dmytro Laktyushkin Date: Thu Jul 6 15:42:04 2017 -0400 drm/amd/display: minor dcn10_hwseq clean up/refactor Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 49 ++++++---------------- 1 file changed, 12 insertions(+), 37 deletions(-) commit 0b6ab57e7ffad05ca266fed9764119cf1807b81b Author: Dmytro Laktyushkin Date: Wed Jul 5 12:00:28 2017 -0400 drm/amd/display: get dal1.1 to run Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 87449a90c2545eaed5757153770346563378463b Author: Anthony Koo Date: Thu Jul 6 14:27:49 2017 -0400 drm/amd/display: Fix MPO visual confirm 1. Need to blend non-active area to show visual confirm borders 2. Set number of Visual Confirm lines based on pipe instance 3. Set Different colors representing surface format of bottom most plan Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 6 --- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 16 ++++---- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 8 ++-- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 8 +++- .../drm/amd/display/dc/dce110/dce110_transform_v.c | 4 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 45 +++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 5 ++- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 +- .../gpu/drm/amd/display/dc/dcn10/dcn10_transform.c | 13 ++++--- .../gpu/drm/amd/display/dc/dcn10/dcn10_transform.h | 1 + 10 files changed, 77 insertions(+), 31 deletions(-) commit 184debdbd80bd9d47eb68304417adb6580ff09e4 Author: Dmytro Laktyushkin Date: Wed Jul 5 06:57:49 2017 -0400 drm/amd/display: refactor dcn10 hw_sequencer to new reg access style Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 177 ++++++- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 530 +++++---------------- drivers/gpu/drm/amd/display/dc/inc/reg_helper.h | 66 ++- 3 files changed, 343 insertions(+), 430 deletions(-) commit fa6ecfc67a4a0f96b5e4b6d5437602f2d5b191ac Author: Andrey Grodzovsky Date: Thu Jul 6 13:53:15 2017 -0400 drm/amd/display: Refactor dc_commit_streams Change it to sue dc_commit_context. dc_commit_context is used directly from Linux DM. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 99 +++++++++++++------------------- 1 file changed, 41 insertions(+), 58 deletions(-) commit b884a2ec5863c863a625ef4ee0efee59f969142d Author: Eric Yang Date: Thu Jul 6 14:20:25 2017 -0400 drm/amd/display: call pplib to update clocks Allow pplib to update fclk and dcfclk for different voltage levels. PPlib's values for dispclk and phyclk is not correct, so we are not getting it from them. fclk is currently not used correctly, although does not effect the actual fclk we request. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 46 +++--------------------- 1 file changed, 4 insertions(+), 42 deletions(-) commit 133e8e1b35c7772f4903d367035e33e02becbb2d Author: Eric Yang Date: Wed Jul 5 15:30:18 2017 -0400 drm/amd/display: Change how we disable pipe split Before this change, pipe split was disabled by bumping up dpp clock bounding box for DPM level 0 and 1, this allows validation to pass without splitting at a lower DPM level. This change reverts this and instead lowers display clock at DPM level 0, this forces configurations that need pipe split at DPM level 0 to go to DPM level 1, where they can be driven without split. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 966443b592753f6498f896b4afc7c2df1352af72 Author: Eric Yang Date: Tue Jun 27 12:09:01 2017 -0400 drm/amd/display: block modes that require read bw greater than 30% Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 18 +++++++++++++++++- drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) commit f42485bb6d1171272d5ecb5b6213505b14294472 Author: Eric Yang Date: Tue Jul 4 14:13:25 2017 -0400 drm/amd/display: move number of memory channel calc out of pplib call Move number of memory channel calculation out of dcn_bw_update_from_pplib Fill in fabric_and_dram_bandwidth for single channel case. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 4 ---- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) commit d5d4e09f5de96c986a47dc1ced334d6dc47a9959 Author: Tony Cheng Date: Sun Jun 4 12:50:20 2017 -0400 drm/amd/display: update DPM bounding box value based on STA target aligned to FCLK for SS corners with 10% margin also - group all latency together - group all voltage state related together Signed-off-by: Tony Cheng Reviewed-by: Eric Yang Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 71 ++++++++++++++++-------- 1 file changed, 48 insertions(+), 23 deletions(-) commit f9ea47cec22ff332c2206249a18851c7eb68d832 Author: Andrey Grodzovsky Date: Wed Jul 5 13:28:24 2017 -0400 drm/amd/display: Undo dc_update_surfaces_and_stream change. Restoring conditional call to in_transfer_func since no reason to call it unconditionally. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit da5c47f682abe61eb81291cb663b77828fda0688 Author: Andrey Grodzovsky Date: Thu Jun 29 12:03:59 2017 -0400 drm/amd/display: Remove acrtc->stream Remove acrtc->stream and move it into dm_crtc_state. This allows to get rid of dm_atomic_state->dm_set. Also reuse streams created in atomic_check during commit. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 33 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 403 +++++++++++---------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 9 +- drivers/gpu/drm/amd/display/dc/dc.h | 2 - 4 files changed, 226 insertions(+), 221 deletions(-) commit 89a1fc5924cc7c315117be79878f2a6d2d69b576 Author: Andrey Grodzovsky Date: Thu Jun 29 10:41:17 2017 -0400 drm/amd/display: Update atomic state hooks. Reimplement atomic_state_alloc and atomic_state_clear to release validate_ctx. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 25 +++++++++------------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 2 +- 2 files changed, 11 insertions(+), 16 deletions(-) commit e2c7bb1228bec5b1224b235e90ffa1def8e3900e Author: Harry Wentland Date: Wed Jun 28 13:23:04 2017 -0400 drm/amd/display: Use validate_context from atomic_check in commit Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 18 ++++-- drivers/gpu/drm/amd/display/dc/core/dc.c | 71 +++++++--------------- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 6 +- drivers/gpu/drm/amd/display/dc/dc.h | 5 +- 4 files changed, 40 insertions(+), 60 deletions(-) commit bf8aef2ec439673cd43ef6d0edace96aa36c5e7c Author: Harry Wentland Date: Wed Mar 29 11:25:24 2017 -0400 drm/amd/display: Add validate_context to atomic_state Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 18 ++---------------- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 2 +- 2 files changed, 3 insertions(+), 17 deletions(-) commit 7cf2c840c6b5ee98195d249e3748bb90c9bcb831 Author: Harry Wentland Date: Mon Mar 6 09:43:30 2017 -0500 drm/amd/display: Commit validation set from state Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 32 +++--- drivers/gpu/drm/amd/display/dc/core/dc.c | 118 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 16 +++ 3 files changed, 151 insertions(+), 15 deletions(-) commit b29fc8661d5c732a5689afa751983ee27141ad37 Author: Harry Wentland Date: Fri Mar 3 14:50:00 2017 -0500 drm/amd/display: Add correct retain/release Needed by objs in dm_atomic_state Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 6 ++++++ 2 files changed, 16 insertions(+) commit a6818a32317114387dbadf769275275dd56cc624 Author: Harry Wentland Date: Tue Jun 27 14:35:17 2017 -0400 drm/amd/display: Hook dm private state into atomic_check Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 64 +++++++++++----------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 5 ++ 2 files changed, 37 insertions(+), 32 deletions(-) commit ca3268c45b85d61365ba74939650ae519ecff572 Author: Harry Wentland Date: Tue Jun 27 11:55:43 2017 -0400 drm/amd/display: Create dm_atomic_state We really want to use the new private_atomic_state but can't right now as we have to maintain some backward compatibility to older kernels. For now let's follow Intel's approach and extend the drm_atomic_state. Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 37 +++++++++++++++++++++- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 8 +++++ 2 files changed, 44 insertions(+), 1 deletion(-) commit 97416d4cbb9efab2eea7740fa4ce86b317da06c5 Author: Yongqiang Sun Date: Mon Jun 26 16:25:10 2017 -0400 drm/amd/display: set drr during program timing. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/dce110/dce110_timing_generator.c | 21 +++++++++++++++++++++ .../amd/display/dc/dce120/dce120_timing_generator.c | 19 ++++++++++++++++--- .../amd/display/dc/dcn10/dcn10_timing_generator.c | 8 ++++++++ 3 files changed, 45 insertions(+), 3 deletions(-) commit 7a8368e6f521871976f3d173f837dd921d06130d Author: Dmytro Laktyushkin Date: Thu Jun 29 18:01:35 2017 -0400 drm/amd/display: Remove SMU_INTERRUPT_CONTROL Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 2 -- 1 file changed, 2 deletions(-) commit 35ce37d6a4d140ba7e2870d7c0bc4a6b866f1d8d Author: Dmytro Laktyushkin Date: Wed Jun 28 18:58:27 2017 -0400 drm/amd/display: Enable ipp compilation Update relevant registers Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 19 ++--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.h | 91 +++++++++++----------- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 6 +- 3 files changed, 54 insertions(+), 62 deletions(-) commit 13066f9f648084b5016cebfa7930ce4c056ab9d6 Author: Dmytro Laktyushkin Date: Wed Jun 28 18:41:22 2017 -0400 drm/amd/display: Rename DCN opp specific function prefixes to oppn10 Also update relevant registers. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 189 ++++++++++----------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.h | 79 ++++----- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 6 +- 3 files changed, 138 insertions(+), 136 deletions(-) commit db3bc05034a4b025651ec17d67d50ea581f6612e Author: Dmytro Laktyushkin Date: Wed Jun 28 16:31:58 2017 -0400 drm/amd/display: Rename DCN mem input specific function prefixes to min. Also updated relevant registers. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 96 ++++++++++------------ .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 93 +++++++++++++-------- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 6 +- 3 files changed, 104 insertions(+), 91 deletions(-) commit 62a3213aca0bf519457545f22c41154a4848e390 Author: Dmytro Laktyushkin Date: Wed Jun 28 14:33:29 2017 -0400 drm/amd/display: Rename DCN TG specific function prefixes to tg Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/dcn10/dcn10_timing_generator.c | 159 +++++++++------------ .../amd/display/dc/dcn10/dcn10_timing_generator.h | 53 +++---- 2 files changed, 94 insertions(+), 118 deletions(-) commit c3aa1d67295c8fc87364dfe8920c9e30775fd124 Author: Bhawanpreet Lakha Date: Fri Jun 30 15:19:55 2017 -0400 drm/amd/display: Set static screen register for stoney/carrizo -Set CRTC_STATIC_SCREEN_EVENT for stoney/carrizo for FBC implementation -Code is currently guarded with "ENABLE_FBC" compile time flag Signed-off-by: Bhawanpreet Lakha Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 ++++ 1 file changed, 4 insertions(+) commit cdc5e04888cec337e44049f9b51d8894364ad52a Author: Vitaly Prosyak Date: Wed Jun 28 13:36:25 2017 -0500 drm/amd/display: Fix for hdmi frame pack stereo Signed-off-by: Vitaly Prosyak Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 10 +++++++++- drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +-- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 11 ++++++++--- 4 files changed, 19 insertions(+), 7 deletions(-) commit 46239f739aa64c797938e9a14b03fd2c1b8ce0e6 Author: Charlene Liu Date: Thu Jun 29 20:25:23 2017 -0400 drm/amd/display: Enabling VSR on 4K display causes black screen Signed-off-by: Charlene Liu Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a87fbfee0a0f96e8b482c2ac7eae113c9ca2497 Author: Amy Zhang Date: Wed Jun 28 18:14:09 2017 -0400 drm/amd/display: Re-enable Vsync Interrupts for Gradual Refresh Ramp - Make sure Vsync interrupts are disabled in static screen case and enabled when not to save power - Create no_static_for_external_dp debug option Signed-off-by: Amy Zhang Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../drm/amd/display/modules/freesync/freesync.c | 38 ++++++++++++++++------ .../gpu/drm/amd/display/modules/inc/mod_freesync.h | 5 +++ 3 files changed, 34 insertions(+), 10 deletions(-) commit abe07e80836fb25a5bcfda573413a68be82439c6 Author: Yue Hin Lau Date: Wed Jun 28 17:21:42 2017 -0400 drm/amd/display: Add DC interface for custom CSC matrix Signed-off-by: Yue Hin Lau Reviewed-by: Vitaly Prosyak Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 26 +++++ drivers/gpu/drm/amd/display/dc/dc.h | 3 + .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 23 ++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 117 ++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.h | 76 +++++++++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_transform.c | 5 +- drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 1 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 5 + 8 files changed, 252 insertions(+), 4 deletions(-) commit 1c604cd862d4f069cb3bbafb4e35db614a57b096 Author: Dmytro Laktyushkin Date: Wed Jun 28 14:27:18 2017 -0400 drm/amd/display: Change max OPP Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1a4eb992c1712981f36bb0213879c426d524f76 Author: Dmytro Laktyushkin Date: Mon Jun 26 15:13:18 2017 -0400 drm/amd/display: enable diags compilation Signed-off-by: Dmytro Laktyushkin Reviewed-by: Jordan Lazare Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 8 ++--- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.h | 41 ++++------------------ .../drm/amd/display/dc/dce120/dce120_resource.c | 17 +-------- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 22 +++--------- .../gpu/drm/amd/display/dc/dcn10/dcn10_transform.h | 23 ++++++------ drivers/gpu/drm/amd/display/dc/inc/resource.h | 1 + 6 files changed, 27 insertions(+), 85 deletions(-) commit 9ff1bb090b40949cddfbb904e613395ad2633fc7 Author: Corbin McElhanney Date: Fri Jun 23 17:45:50 2017 -0400 drm/amd/display: Add extra mode and clock info to DTN logs Adds some additional information to logs in dc_commit_streams to better match Dal2. Also adds a new function, dc_raw_log, that has the same functionality as dc_conn_log, but does not attach display specific prefixes to the log output. Finally, adds a new DC log type, LOG_DTN, that logs to LogMinor_DispConnect_dtn in DM. This new log type and dc_raw_log are used to generate clock info in the logs to match Dal2. Signed-off-by: Corbin McElhanney Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +- .../gpu/drm/amd/display/dc/basics/log_helpers.c | 30 +++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/basics/logger.c | 6 +++-- drivers/gpu/drm/amd/display/dc/core/dc.c | 7 ++++- drivers/gpu/drm/amd/display/dc/dm_helpers.h | 3 ++- .../gpu/drm/amd/display/include/logger_interface.h | 5 ++++ drivers/gpu/drm/amd/display/include/logger_types.h | 1 + 7 files changed, 48 insertions(+), 6 deletions(-) commit 1663ae1c4288da81b9f1668d204aa8ed55ebf849 Author: Bhawanpreet Lakha Date: Tue Jun 27 16:34:27 2017 -0400 drm/amd/display: Connect DC resource to FBC compressor - Connected DC resource to FBC compressor, - Initial Implementation of FBC for Stoney/Carrizo - Code is currently guarded with "ENABLE_FBC" compile time flag Signed-off-by: Bhawanpreet Lakha Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 19 ++++++ .../drm/amd/display/dc/dce110/dce110_compressor.c | 78 +++++++++++----------- .../drm/amd/display/dc/dce110/dce110_compressor.h | 2 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 15 +++++ .../drm/amd/display/dc/dce110/dce110_resource.c | 10 +++ drivers/gpu/drm/amd/display/dc/inc/compressor.h | 6 +- drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 6 ++ 7 files changed, 94 insertions(+), 42 deletions(-) commit d09fec0f94376b1c0048215e14838295730ed6d3 Author: Anthony Koo Date: Tue Jun 27 13:27:00 2017 -0400 drm/amd/display: add hyst frames for fixed refresh Signed-off-by: Anthony Koo Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/modules/freesync/freesync.c | 56 ++++++++++++++-------- 1 file changed, 36 insertions(+), 20 deletions(-) commit dc0ea008168bfbc61a7915eb6ffb1cc48ce5e9cc Author: Andrey Grodzovsky Date: Wed Jun 28 11:05:00 2017 -0400 drm/amd/display: Move dm_plane_state to DAL header. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit cfe4645e17f8dbe680c35c439d000313f2648482 Author: Dmytro Laktyushkin Date: Wed Jun 14 18:58:04 2017 -0400 drm/amd/display: fix dcn pipe reset sequence This change fixes dcn10 front end reset sequence. Previously we would reset front end during flip which led to issues in certain MPO and 4k/5k scenarios. We would also never properly power gate our front end. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 2 +- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 19 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 22 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 7 + drivers/gpu/drm/amd/display/dc/dc.h | 3 - .../amd/display/dc/dce110/dce110_hw_sequencer.c | 17 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 226 ++++++++++----------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 17 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.h | 4 +- .../amd/display/dc/dcn10/dcn10_timing_generator.c | 6 +- .../amd/display/dc/dcn10/dcn10_timing_generator.h | 4 + drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 1 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 2 +- 13 files changed, 155 insertions(+), 175 deletions(-) commit 7f524a0d838d8d9334003b956b73729f27a1315a Author: Bhawanpreet Lakha Date: Fri Jun 23 13:35:53 2017 -0400 drm/amd/display: remove unneeded FBC hw programming code - Removed uneeded FBC code. - Initial placeholder for FBC implementation on stoney/carrizo Signed-off-by: Bhawanpreet Lakha Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dce110/dce110_compressor.c | 534 ++++----------------- .../drm/amd/display/dc/dce110/dce110_compressor.h | 3 + drivers/gpu/drm/amd/display/dc/inc/compressor.h | 46 +- 3 files changed, 137 insertions(+), 446 deletions(-) commit f71f2772cb001d087e260c96f46d1fde022d2e03 Author: Corbin McElhanney Date: Mon Jun 26 16:47:27 2017 -0400 drm/amd/display: Add clock info struct Signed-off-by: Corbin McElhanney Reviewed-by: Logatharshan Thothiralingam Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dm_services_types.h | 6 ++++++ 1 file changed, 6 insertions(+) commit ba6bf832b25ca7369ed3d4c0b0651bb43c9e644a Author: Andrey Grodzovsky Date: Tue Jun 27 17:24:00 2017 -0400 drm/amd/display: Create dm_crtc_state stubs. These stubs are initial only since we need to flatten DC objects (steran at least) to implement deep copy. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 74 +++++++++++++++++++++- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 10 +++ 2 files changed, 81 insertions(+), 3 deletions(-) commit b3663f705a522b7807a1916c94a24448c6a40abc Author: Harry Wentland Date: Tue Jun 27 11:12:37 2017 -0400 drm/amd/display: Make mode_config_funcs const Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e29088b2932a11db6155212ca19c75029bc137aa Author: Leo (Sunpeng) Li Date: Tue Jul 25 18:00:44 2017 -0400 drm/amd/display: Move drm_get_vblank from legacy code Previously, we assumed that allow_modeset=false => page flip. This assumption breaks when an atomic commit is submitted with allow_modeset set to false, since the legacy flip code is never called (the legacy code grabs the vblank reference). Fix: Move drm_vblank_get() from amdgpu_atomic_helper_page_flip() to amdgpu_dm_commit_surfaces(). Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 061d34994597284b4228b7468762772fbdbcfa4c Author: Ken Chalmers Date: Mon Jun 26 13:02:30 2017 -0400 drm/amd/display: RV stereo support Fix moving directly from frame packed to frame sequential mode: disable OTG_3D_STRUCTURE_EN if the stereo mode is not frame packed. Signed-off-by: Ken Chalmers Reviewed-by: Vitaly Prosyak Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a67297d4c8d0bfac39a0fa166e98dcf54db1d7c2 Author: Xiaojie Yuan Date: Tue Jul 4 14:21:58 2017 +0800 drm/amd/display: Fix misuse of plane state destroy helper drm_plane_state is subclassed by dm_plane_state, so atomic driver should use __drm_atomic_helper_plane_destroy_state() to destroy a state. drm_atomic_helper_plane_destroy_state() frees drm_plane_state which is allocated inside dm_plane_state, this is problematic. Fixes: 95ae03a ("drm/amd/display: Create dm_plane_state.") Signed-off-by: Xiaojie Yuan Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d7ec53d9dd0086644aa97d22463976b04b51307e Author: Andrey Grodzovsky Date: Tue Jul 4 13:28:57 2017 -0400 drm/amd/display: Move kms_atomic support flag to dm_early_init. Signed-off-by: Andrey Grodzovsky Reviewed-by: Jordan Lazare Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ---- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) commit cf5a4c11a1561db5c31a2783611aa6d5dbb67225 Author: Andrey Grodzovsky Date: Wed Jun 28 11:03:11 2017 -0400 drm/amd/display: Move dm_plane_state definition to DAL header. Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 8 -------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-) commit 2782488ae6c0b53d57435aa6dc358e61550393d2 Author: Andrey Grodzovsky Date: Tue Jun 27 10:02:48 2017 -0400 drm/amd/display: Clean up unused function. Signed-off-by: Andrey Grodzovsky Reviewed-by: Leo Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 6 ------ 1 file changed, 6 deletions(-) commit e5f2038ef12cf5606ec3d7c79e2539cafcb409dd Author: Charlene Liu Date: Sat Jun 24 16:01:37 2017 -0400 drm/amd/display: w/a no color space info for HDMI when build AVI Signed-off-by: Charlene Liu Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 +++ 1 file changed, 3 insertions(+) commit 866294f80582e252913c72b5e0f1792f6133424d Author: Harry Wentland Date: Wed Jun 21 16:48:06 2017 -0400 drm/amd/display: Don't program scaler if we have no surface If we don't have a surface in dc_commit_streams scl_data won't get populated in resource_build_scaling_params_for_context. In this case we shouldn't attempt to program the scaler. Signed-off-by: Harry Wentland Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a95e7d737e1bc20eb311548f4e307e2155c5ca64 Author: Yongqiang Sun Date: Fri Jun 23 13:56:55 2017 -0400 drm/amd/display: Disable pipe split. Signed-off-by: Yongqiang Sun Reviewed-by: Hersen Wu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c0732bf7f37f488a37111051ebca388135bf7b5 Author: Andrey Grodzovsky Date: Thu Jun 22 11:45:13 2017 -0400 drm/amd/display: Global lock typos fix. Fix typos. Signed-off-by: Andrey Grodzovsky Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 92f3ac403d132400b7147bb4262fea4ad254aa3d Author: Leo (Sunpeng) Li Date: Fri Jun 16 15:59:17 2017 -0400 drm/amd/display: Workaround IGT multiplane restriction IGT currently does not properly commit changes on planes with multiple possible CRTC's. Set one valid CRTC for each plane for now, plus one underlay plane on Carizzo and Stoney that is valid for all CRTCs. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit afa80d64d20ac13528c261e1233ac3982609fd2f Author: Dmytro Laktyushkin Date: Wed Jun 21 17:27:59 2017 -0400 drm/amd/display: fix bw_calc_auto translation error The compiler was warning about conditions that will never evaluate to true. The problem was that the VBA translater didn't translate the conditions correctly. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_auto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0129a537b52da851abd26f8296f3ffd1e5dc424 Author: Andrey Grodzovsky Date: Wed Jun 21 15:44:23 2017 -0400 drm/amd/display: Refine globallock. Switch to wait_for_completion_interruptible_timeout wait since the lock is called from IOCTL context and can be interrupted by a signal. Global lock function might return EDEADLK or EINTR which is not an error and just singals to user mode to restart the call. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 35 +++++++++++++++------- 1 file changed, 24 insertions(+), 11 deletions(-) commit 5634fb6078dd9b9f794e93eef2fef52150cdc827 Author: Dmytro Laktyushkin Date: Thu Jun 15 14:10:43 2017 -0400 drm/amd/display: dcn bw_calc_auto update rev 247 to 250 Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/calcs/dcn_calc_auto.c | 3535 +++++--------------- 1 file changed, 897 insertions(+), 2638 deletions(-) commit 139cb65c5202ba5074d52226931a7d4aaa3307bc Author: Dmytro Laktyushkin Date: Wed Jun 21 09:35:35 2017 -0400 drm/amd/display: make variable latency into a regkey option Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 11 ++++++++--- drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) commit cb26f8925c50aa244ac34a72ac232e4c7dbd6f98 Author: Dmytro Laktyushkin Date: Tue Jun 20 17:24:23 2017 -0400 drm/amd/display: use different sr latencies for dpm0 dcn bw calc Signed-off-by: Dmytro Laktyushkin Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 92af86fa7cba07aeec2f5f455b5ad981aff6013d Author: Andrey Grodzovsky Date: Tue Jun 20 10:56:35 2017 -0400 drm/amd/display: Remove check update type function. Due to using dc_commit_surface_to_stream instead of build stream and surface updates any surface commit today is evlauted to full. Until we fix this and can corretly evluate type of surface update, anything which is not page flip or cursor update will be treted as full update chnage and global lock will be aquired. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 80 +++------------------- 1 file changed, 8 insertions(+), 72 deletions(-) commit 03c8a5feeecf95ca1dfabb5b231016c0e76a187c Author: Andrey Grodzovsky Date: Tue Jun 20 10:42:33 2017 -0400 drm/amd/display: Add global lock function. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 66 ++++++++++++++++------ 1 file changed, 49 insertions(+), 17 deletions(-) commit 80c62d3a112af59ada6c3a5fc1de16021d7ad790 Author: Andrey Grodzovsky Date: Mon Jun 19 11:38:15 2017 -0400 drm/amd/display: MST atomic_get_property missing. Missing function implementation was leading to EINVAL in UMD thus not adding MST connector to X topology and hence not getting set mode for it. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0604b36c77e31a05b1bd18d53cac2c9350500bcb Author: Andrey Grodzovsky Date: Thu Jun 22 17:37:22 2017 -0400 drm/amd/display: Create dm_plane_state. Hook up dc_surface creation/destruction to dm_plane_state. Rename amdgpu_drm_plane_state to dm_plane_state and do minor cleanups. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 14 ++-- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 79 ++++++++++++++++------ 2 files changed, 67 insertions(+), 26 deletions(-) commit 90f095c13efe2aed108ebd4754dd629946b68168 Author: Dmytro Laktyushkin Date: Fri Jun 16 11:27:59 2017 -0400 drm/amd/display: add pipe split disable regkey Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit f19d5f3520d67cee4a98721032c1b7aee7942f20 Author: Dmytro Laktyushkin Date: Tue Jun 13 17:14:51 2017 -0400 drm/amd/display: do full fe reprogram on full update Fixes MPO entry in 2x4k scenario on raven Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 81 +++++++++++++++++++++----------- 1 file changed, 54 insertions(+), 27 deletions(-) commit 7950f0f9815a2dc2e3e1cc2d341d486ac2ae8bae Author: Dmytro Laktyushkin Date: Tue Jun 13 17:08:22 2017 -0400 drm/amd/display: fix dc_post_update_surfaces_to_stream Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 35 ++++++++-------------- drivers/gpu/drm/amd/display/dc/dc.h | 9 +----- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 11 ++----- 3 files changed, 17 insertions(+), 38 deletions(-) commit ebf055f95b4782e681c0040461a33c0210e65a5d Author: Anthony Koo Date: Wed Jun 14 10:19:57 2017 -0400 drm/amd/display: fix issues with incorrectly detecting UPDATE_TYPE_FULL This is due to how structures are being packed with padding added. Structure field initialization doesn't clear the padding bytes, which cause our memcmp to give incorrect result. Move smaller structure parameters to end of structure. Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 6 ++- drivers/gpu/drm/amd/display/dc/dc.h | 75 +++++++++++++++++--------------- 2 files changed, 44 insertions(+), 37 deletions(-) commit 80b4c5a8c1e1856848a440a63accbe029ea3b51b Author: Dmytro Laktyushkin Date: Tue Jun 13 16:31:49 2017 -0400 drm/amd/display: fix dc_check_update_surfaces_for_stream memcmp sequence Signed-off-by: Dmytro Laktyushkin Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 7a0963345f859058fa866dd28fe13ca5eff22a87 Author: Zeyu Fan Date: Tue Jun 13 11:54:10 2017 -0400 drm/amd/display: Save hpd_src for dc_link Signed-off-by: Zeyu Fan Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +++ drivers/gpu/drm/amd/display/dc/dc.h | 3 +++ 2 files changed, 6 insertions(+) commit b6d6103bbb21ed51acf0168529d867df1ecde445 Author: Vitaly Prosyak Date: Mon Jun 12 11:03:26 2017 -0500 drm/amd/display: RV stereo support Re-organize 3d declarations Signed-off-by: Vitaly Prosyak Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 8 +----- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 43 +++++++++++++++------------- drivers/gpu/drm/amd/display/dc/dc_types.h | 9 ++++++ 3 files changed, 33 insertions(+), 27 deletions(-) commit c8210d5ae37b3c0e5dc2a91095dd1147c524977d Author: Harry Wentland Date: Fri Jun 9 10:12:36 2017 -0400 drm/amd/display: Don't call DCN clk code for Vega Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 10 ++++++---- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) commit 1159898a88db33877bd8378714c6f647afab7f9b Author: Andrey Grodzovsky Date: Wed Jun 7 18:28:43 2017 -0400 drm/amd/display: Handle commit plane with no FB. 1) Always call flip ISR, for any surface comit, not only for page flip. 2) For events not signaled in flip ISR, handle them in end of commit_tail. 3)Fix race condition between subsequent atomic calls by removing current state access AFTER drm_atomic_helper_commit_hw_done was called. After this call a pending next commit will swap in his own state into objects and proceed. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 127 +++++++++++---------- 2 files changed, 70 insertions(+), 63 deletions(-) commit 70470154104e935eed36478169550eda577dcdb3 Author: Andrey Grodzovsky Date: Sun Jun 4 09:11:56 2017 -0400 drm/amd/display: Get rid of seperate flip function. This code is remanant of pre atomic age when flip was a standalone IOCTL. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 97 ---------------------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 37 ++++++++- 2 files changed, 34 insertions(+), 100 deletions(-) commit 3f6d743598ef24002f0babd3aa06c7fe104b7dc5 Author: Hersen Wu Date: Fri Jun 9 11:32:06 2017 -0400 drm/amd/display: DAL3 RV get DPREFCLK SpreadspectrumInfo from smu_info Signed-off-by: Hersen Wu Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 14 ++++++++--- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 29 +++++++++++++++++++++- 2 files changed, 39 insertions(+), 4 deletions(-) commit 7f5c22d1652327b64375e88b184b0df502c7bdc7 Author: Vitaly Prosyak Date: Thu Jun 8 15:55:02 2017 -0500 drm/amd/display: RV stereo support HDMI frame pack and DP frame alternate in band Signed-off-by: Vitaly Prosyak Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 25 ++++++++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 14 ++--- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 6 ++ .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 69 +++++++++++++++++++++- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 4 -- .../amd/display/dc/dcn10/dcn10_timing_generator.c | 2 - 7 files changed, 105 insertions(+), 19 deletions(-) commit aed8b319180f18402ed90929f85e2b3e5b81e71d Author: Shirish S Date: Thu Jun 8 11:55:06 2017 +0530 drm/amd/display: remove get_position() of underlay get_position() returns CRTC vertical/horizontal counters, hence it is not applicable for underlay which is plane and not attached to one crtc. This patch hence removes the callback from dce110_tg_v_funcs and hence fixes a bug in dc_debug.c where in get_position() for underlay pipe is called un-conditionally. Witout this patch get_position() is called in case one has to update underlay plane's data, since callback implmented with an ASSERT(), the old_surface_count and new_surface_count mismatches; causing only one plane update which is not right and also assert makes the rendering slow. Signed-off-by: Shirish S Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 9 +++++++-- .../gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c | 9 +-------- 2 files changed, 8 insertions(+), 10 deletions(-) commit 561f3a4db315d639b93adf86eedbb8405dd81fbe Author: Dmytro Laktyushkin Date: Mon May 29 18:30:17 2017 -0400 drm/amd/display: enable pipe split Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad32734699da4dd185405637459bf915a4f4cff6 Author: Dmytro Laktyushkin Date: Mon Jun 5 15:08:10 2017 -0400 drm/amd/display: w/a for ycbcr output pre-multiplied alpha corruption Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 28 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 1 + 3 files changed, 30 insertions(+), 1 deletion(-) commit f0558542a72e72919dae2ac2187847ec312c2bcb Author: Dmytro Laktyushkin Date: Thu Jun 1 18:35:54 2017 -0400 drm/amd/display: redesign mpc Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 1 + drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 10 +- drivers/gpu/drm/amd/display/dc/dc_helper.c | 10 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 105 +++---- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 336 +++++---------------- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.h | 102 +++---- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 73 +++-- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 12 +- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 81 ++--- 9 files changed, 228 insertions(+), 502 deletions(-) commit 4c6e75989e8edd2bf9c22a70b2a838547cc6c6f3 Author: Yongqiang Sun Date: Thu Jun 8 14:26:40 2017 -0400 drm/amd/display: disable dcc when reset front end. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 ++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 15 +++++++++++---- drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 3 +++ 3 files changed, 16 insertions(+), 4 deletions(-) commit 9edba5574d8253b739f4c78d880c80f94578859b Author: Vitaly Prosyak Date: Wed Jun 7 12:23:59 2017 -0500 drm/amd/display: RV stereo support HDMI frame pack and DP frame alternate in band Signed-off-by: Vitaly Prosyak Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 21 ++- .../amd/display/dc/dcn10/dcn10_timing_generator.c | 184 ++++++++++----------- .../amd/display/dc/dcn10/dcn10_timing_generator.h | 5 + .../drm/amd/display/dc/inc/hw/timing_generator.h | 12 ++ drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 4 + 5 files changed, 124 insertions(+), 102 deletions(-) commit c9742685c24acd6d71cdda3067bfc2f512fe2b7c Author: Dmytro Laktyushkin Date: Wed Jun 7 13:53:30 2017 -0400 drm/amd/display: add bw logging for dcn Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 138 +++++++++++ drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 38 +++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 260 +++++++++++++++++---- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 + .../gpu/drm/amd/display/include/logger_interface.h | 4 + 7 files changed, 398 insertions(+), 49 deletions(-) commit 11589813e6dfd72093d0e7f53114d6478f689d91 Author: Dmytro Laktyushkin Date: Wed Jun 7 15:02:34 2017 -0400 drm/amd/display: fix enable_optc_clock reg_wait timeouts Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_helper.c | 8 +++++++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) commit 2f1e8efd10315c516f07ed80484be8a1de143a8d Author: Yongqiang Sun Date: Tue Jun 6 16:41:00 2017 -0400 drm/amd/display: Use surface update inuse for pending check. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 10 +++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 32 ++++++++++++++++++++++ 2 files changed, 42 insertions(+) commit fea0f581ab529e194d424452a6f7ecd88c5a2116 Author: Anthony Koo Date: Tue Jun 6 16:30:51 2017 -0400 drm/amd/display: Temporary disable BTR FreeSync support for now Reduce timer tick interval for the static screen Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit ba326a9185f1c56d86e51dd89589e4eff42f02eb Author: Dmytro Laktyushkin Date: Fri Jun 2 19:01:37 2017 -0400 drm/amd/display: propagate surface alpha setting from OS to DC Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 6 +++++- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 6 ++++-- drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ drivers/gpu/drm/amd/display/dc/dc_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 10 ++++------ 5 files changed, 16 insertions(+), 10 deletions(-) commit 1bf56e62cc4fbff6d701b798da05a91f78aa12e9 Author: Zeyu Fan Date: Fri Jun 2 17:25:49 2017 -0400 drm/amd/display: Call program_gamut explicitly instead of entire set_plane This fixes on boot crush on Vega, Polaris with Dal3. Signed-off-by: Zeyu Fan Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 42 ++++++++++++++++++++++ .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 3 ++ 4 files changed, 47 insertions(+), 2 deletions(-) commit a235bd9f1ea0c610a5cddfb79f98b651dc8dc5bd Author: Zeyu Fan Date: Mon Jun 5 17:56:05 2017 -0400 drm/amd/display: Add function to log connectivity Signed-off-by: Zeyu Fan Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 6 ++++++ drivers/gpu/drm/amd/display/dc/basics/log_helpers.c | 3 +++ drivers/gpu/drm/amd/display/dc/dm_helpers.h | 4 ++++ 3 files changed, 13 insertions(+) commit 909e8c9e417945f313b68ed6c5a559fe5266be8b Author: Charlene Liu Date: Mon Jun 5 16:54:33 2017 -0400 drm/amd/display: fix single link black screen Don't fall back to dual link DVI mode if the connector is single Link only. Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fc82c5cb306d6f201cdee2c4c092ff49c6929634 Author: Amy Zhang Date: Fri Jun 2 16:33:47 2017 -0400 drm/amd/display: Fix DRR Enable on Desktop - Block PSR in Full screen apps to prevent incorrect static screen curser events - Reprogram static screen events when update freesync state - Program static ramp variable active after other values are programmed - Correct wrong assigning of the nominal and current vcount Signed-off-by: Amy Zhang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/modules/freesync/freesync.c | 89 ++++++++++++++-------- .../gpu/drm/amd/display/modules/inc/mod_freesync.h | 3 +- 2 files changed, 61 insertions(+), 31 deletions(-) commit 9f72f51d701cd2dd87a157d972650924fe91ec80 Author: Amy Zhang Date: Wed May 31 16:53:01 2017 -0400 drm/amd/display: Refactor to call set PSR wait loop in dce_dmcu instead of dce_clocks Signed-off-by: Amy Zhang Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 52 +++++------ drivers/gpu/drm/amd/display/dc/dc.h | 3 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 101 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 41 ++------- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 66 +++++++++++++- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h | 8 ++ drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h | 3 + .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 101 --------------------- 8 files changed, 213 insertions(+), 162 deletions(-) commit 1a2c82a2f161f68deb5f0519c315bfc92ede8e01 Author: Dmytro Laktyushkin Date: Fri Jun 2 19:00:45 2017 -0400 drm/amd/display: fix mpc alpha programming Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 78 +++----- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 201 +++++++++------------ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.h | 6 +- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 19 +- 4 files changed, 115 insertions(+), 189 deletions(-) commit 8eee20139a63c6b53abc71c9a937f2b2047176c2 Author: Tony Cheng Date: Fri Jun 2 06:15:57 2017 -0400 drm/amd/display: disable forced stutter disable after programming watermark vbios will disable stutter pre-OS. driver re-enable after programming watermark Signed-off-by: Tony Cheng Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 5 +++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 6 ++++++ 2 files changed, 11 insertions(+) commit 1e25ed30796b89140653c60ac20ea1c8254c9e91 Author: Hersen Wu Date: Thu Jun 1 15:49:16 2017 -0400 drm/amd/display: remove disable_clk_gate debug flag for DCN Signed-off-by: Hersen Wu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 30 ---------------------- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1 - 2 files changed, 31 deletions(-) commit 556ee1b75c94cd88710e2fa8c83e2dc22717fc4f Author: Corbin McElhanney Date: Thu Jun 1 16:54:53 2017 -0400 drm/amd/display: Add assertion for invalid surface dimensions Signed-off-by: Corbin McElhanney Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit dcf6c1456ef555c4a1c0d28326a7bac2fc6923de Author: Dmytro Laktyushkin Date: Thu Jun 1 12:27:00 2017 -0400 drm/amd/display: clean up mpc programing during fe reset Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit e7b1322e15ea66c135ff98c1eb15fc542ef79c89 Author: Corbin McElhanney Date: Thu Jun 1 15:40:04 2017 -0400 drm/amd/display: Don't update surface if dimensions are 0 Signed-off-by: Corbin McElhanney Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 9c42df59e44fd44cd84fe9ccd64f9f2942164d0f Author: Leo (Sunpeng) Li Date: Thu Jun 1 15:29:42 2017 -0400 drm/amd/display: Remove unsupported RGB formats Do not broadcast (to DRM) unsupported RGB formats. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 5 ----- 1 file changed, 5 deletions(-) commit 5970f2aecc558ce2e04565ff082d9b78144fc714 Author: Hersen Wu Date: Tue May 30 15:26:14 2017 -0400 drm/amd/display: Enable DCN clock gating Signed-off-by: Hersen Wu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 68 +++++++++++++++++----- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 4 -- 2 files changed, 53 insertions(+), 19 deletions(-) commit 1605b3bef8454a8906333f7a0ca0fb177422100d Author: Andrey Grodzovsky Date: Wed Apr 5 12:02:45 2017 -0400 drm/amd/display: Remove redundant member from amdgpu_plane. Signed-off-by: Andrey Grodzovsky Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 7db4dede6425fba7177468123e5149916dd45fd4 Author: Amy Zhang Date: Tue May 30 16:16:57 2017 -0400 drm/amd/display: Add function to get PSR state Signed-off-by: Amy Zhang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 13 +++++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 2 ++ drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h | 1 + 4 files changed, 18 insertions(+) commit 2ea5e9a8bda7472037fb34b75f7033cfc4afa674 Author: Andrey Grodzovsky Date: Sun Apr 2 11:55:41 2017 -0400 drm/amd/display: Universal cursor plane hook-up. Switch from legacy cursor to DRM cursor plane. Cursor is not an actual plane but more of a subplane of each pipe. Bind a DRM cursor plane instance to each CRTC. Eliminate seperate FB object allocation for cursor and clean dm_crtc_cursor_set. Signed-off-by: Andrey Grodzovsky Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 242 ++++++++------------- 1 file changed, 91 insertions(+), 151 deletions(-) commit 0f9a536fe036eed82b563b0da5b2c57a9455b679 Author: Dmytro Laktyushkin Date: Tue May 30 13:38:10 2017 -0400 drm/amd/display: fix mpo + split pipe aquisition failure Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 80 +++++++++++++---------- 1 file changed, 44 insertions(+), 36 deletions(-) commit 05a19c39cb0adcb0f73b7418b9afead49d2406d4 Author: Dmytro Laktyushkin Date: Mon May 29 18:26:28 2017 -0400 drm/amd/display: fix surface attachment handling of pipe split Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 35 +++++++---------------- 1 file changed, 10 insertions(+), 25 deletions(-) commit 5d11e9fca5b45191b531d8fa3b9dd6de1156fc2b Author: Dmytro Laktyushkin Date: Mon May 29 18:29:33 2017 -0400 drm/amd/display: allow taking split pipes during resource mapping Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 43 +++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) commit 259873e1ff3198d80f2dd50e3ab4249ad289e4c2 Author: Dmytro Laktyushkin Date: Thu May 25 18:39:49 2017 -0400 drm/amd/display: stop adjusting scl taps when scl ratio is one on dcn Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_transform.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 30406ff85324bc64bf8a9bf5b3f4e75c23ea4abf Author: Harry Wentland Date: Thu May 25 18:00:37 2017 -0400 drm/amd/display: Don't commit surfaces if no stream Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit f0c16087fba728c36bc33fe462b35ca4ada7f5ca Author: Shirish S Date: Thu May 25 14:36:47 2017 +0530 drm/amd/display: update NV12/NV21 as the YUV format This patch updates the YUV format supported to NV12 and NV21 and hence updates the offsets. BUG: SWDEV-119421 TEST: (On Chromium OS for Stoney Only) * Executed below tests to see YUV(underlay) & RGB planes on eDP plane_test --format XR24 --size 500x100 -p --format NV12 --size 500x500 Signed-off-by: Shirish S Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit 630e3573853ff8644daf1ae32a503984110afe28 Author: Jeff Smith Date: Fri May 19 08:32:23 2017 -0500 drm/amd/display: default spd packet to invalid Signed-off-by: Jeff Smith Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 1 + 1 file changed, 1 insertion(+) commit 0a1c73ec8e4834d72441ae77f436869fd5179d8f Author: Shirish S Date: Thu May 25 14:40:21 2017 +0530 drm/amd/display: re-order the luma chroma addres updation The DCE engine triggers scan as soon as the luma address is updated, since it is updated before chroma address the chroma data is not scanned out properly or in order. This patch fixes this by re-ordering the same. BUG: SWDEV-119421 TEST: (On Chromium OS for Stoney Only) * Executed below tests to see YUV(underlay) & RGB planes on eDP plane_test --format XR24 --size 500x100 -p --format NV12 --size 500x500 * Chroma data is scanned properly. Signed-off-by: Shirish S Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_mem_input_v.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e4bf0a0eed7e0e3bb7f0be2788cf0a5ecc16b068 Author: Hersen Wu Date: Thu May 25 10:55:54 2017 -0400 drm/amd/display: create_links bug with empty DDI slot Signed-off-by: Hersen Wu Reviewed-by: Hersen Wu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 7 ++++--- drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 7fa4fcba7ab4f29f88b503e0e840f4c3bf774dc0 Author: Harry Wentland Date: Thu May 25 11:44:53 2017 -0400 drm/amd/display: Don't guard x86 in Makefile make-kpkg doesn't seem to like it Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/Makefile | 2 -- 1 file changed, 2 deletions(-) commit 4c92c92d77cdbfb46925d498addf19e5aebe46b8 Author: Andrey Grodzovsky Date: Wed May 24 11:59:39 2017 -0400 drm/amd/display: Get rid of get_dm_commit_action Use drm_atomic_crtc_needs_modeset instead. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 127 +++++++-------------- 1 file changed, 44 insertions(+), 83 deletions(-) commit afdbd4ccfd36eb18ce89b504d79bb3051cdab839 Author: Jerry Zuo Date: Wed May 24 11:01:32 2017 -0400 drm/amd/display: fix NULL pointer in dm_commit_surfaces Check if adding surface is failed to prevent NULL pointer deref. Signed-off-by: Jerry Zuo Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 4 ++++ 1 file changed, 4 insertions(+) commit ece22899a46551dcd8e9f3296ce1ec8ac9e07dc4 Author: Amy Zhang Date: Wed May 24 14:53:50 2017 -0400 drm/amd/display: Disable PSR entry abort to prevent intermittent freezes Signed-off-by: Amy Zhang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 5 +++++ 1 file changed, 5 insertions(+) commit 72dfad50179bb8c813d7c3a7ce149dafc4586fe6 Author: Zeyu Fan Date: Fri May 19 15:52:00 2017 -0400 drm/amd/display: Add FORCE_HDR timing flag Signed-off-by: Zeyu Fan Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 ++ 1 file changed, 2 insertions(+) commit c7dbdf1535a34741a8805d04a9ae75a887d8b581 Author: Corbin McElhanney Date: Tue May 23 15:26:57 2017 -0400 drm/amd/display: Allow update stream without surface Passing NULL as surfaceUpdates to dc_update_surfaces_and_stream now updates just the stream. Code that is dependent on srf_updates was moved below the NULL check. Signed-off-by: Corbin McElhanney Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 58 +++++++++++++++++--------------- 1 file changed, 31 insertions(+), 27 deletions(-) commit 29eba8e88f3665b5099d0c4ef7180b631846aa0b Author: Charlene Liu Date: Tue May 23 17:15:54 2017 -0400 drm/amd/display: Add disable_psr debug flag Signed-off-by: Charlene Liu Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + 1 file changed, 1 insertion(+) commit 893a2dd4a3ffceb3b3fa88353d8270de06195b10 Author: Andrey Grodzovsky Date: Mon May 22 20:25:48 2017 -0400 drm/amd/display: Clean unused interface. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 42 -------------------------------- drivers/gpu/drm/amd/display/dc/dc.h | 6 ----- 2 files changed, 48 deletions(-) commit ccaa73897109c521a9fda82a50c988e9cba947e7 Author: Andrey Grodzovsky Date: Mon May 22 17:55:38 2017 -0400 drm/amd/display: Fix handling of scaling and underscan. Summury of changes: 1: Both in check and commit Connector properties were handled as part of for_each(crtc) loop while they shoud have been handled in a dedicated for_each(connector) loop since they are connector properties. Moved. 2: Removed hacky plane add in amdgpu_dm_connector_atomic_set_property to force iteration on plane forconnector property. This was causing double call to commit_surface_for_stream both in crtc loop and plane loop. 3: Remove middleman DC interface and call dc_commit_surfaces_to_stream directly to increase code clarity. Remove it from atomic_commit. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 205 ++++++++++----------- 1 file changed, 99 insertions(+), 106 deletions(-) commit bf2e2e2e0ea9ace6ed11423497664656943ec55f Author: Harry Wentland Date: Thu May 18 22:13:19 2017 -0400 drm/amd/display: Limit DCN to x86 arch DCN bw calcs currently rely on the following gcc options: -mhard-float -msse -mpreferred-stack-boundary=4 We probably shouldn't really try building this on architectures other than x86. CC: Alex Deucher CC: Christian König CC: Michel Dänzer CC: Tony Cheng CC: Dmytro Laktyushkin Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/Kconfig | 2 +- drivers/gpu/drm/amd/display/dc/calcs/Makefile | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit c1473558e617d886276e4a8b3c139b681d90d67c Author: Andrey Grodzovsky Date: Fri May 19 17:40:50 2017 -0400 drm/amd/display: program scaler not called. Scaler code in case of UPDATE_TYPE_MED was not called since new pipe context and current context are the same. Signed-off-by: Andrey Grodzovsky Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 23 ++++++++++++++++++++-- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 6 ++---- 2 files changed, 23 insertions(+), 6 deletions(-) commit e73b59b7e0cdecf0663b76f77b770c88b2d61604 Author: Dmytro Laktyushkin Date: Fri May 19 13:01:35 2017 -0400 drm/amd/display: add always_scale debug flag to dc Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_transform.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) commit 93b8ca9b8711ec2536060897f0f05db41dd810f5 Author: Andrey Grodzovsky Date: Tue May 30 16:49:59 2017 -0400 drm/amdgpu: Enable DRIVER_ATOMIC flag for DAL. This flag is needed to pass several of IGT test cases. Signed-off-by: Andrey Grodzovsky Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) commit 0bf954c154d7a8989afb6c138d63ca846bab47db Author: Alex Deucher Date: Fri Jun 2 14:54:26 2017 -0400 drm/amdgpu/soc15: enable DC ip module for Raven Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 21de3396b44a67429c6b6a3f2d697fb261c76054 Author: Rex Zhu Date: Mon May 22 13:11:15 2017 +0800 drm/amd/display: call amdgpu_dm_fini when hw_fini. to free up drm mode_config info. fix issue: unload amdgpu, can't load amdgpu again. [drm:drm_debugfs_init [drm]] *ERROR* Cannot create /sys/kernel/debug/dri/0 [drm:drm_minor_register [drm]] *ERROR* DRM: Failed to initialize /sys/kernel/debug/dri. Signed-off-by: Rex Zhu Acked-by: Alex Deucher Reviewed-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++--- drivers/gpu/drm/amd/display/dc/core/dc.c | 7 ++++++- 2 files changed, 8 insertions(+), 4 deletions(-) commit c14833c6728e587d33777d416a9d0c21d3785ff8 Author: Harry Wentland Date: Fri May 19 17:15:23 2017 -0400 drm/amd/display: No need to assert on stream_status This will be NULL on a new stream. DC handles it gracefully. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 3 --- 1 file changed, 3 deletions(-) commit 5aa35c1a16d505c0aee7fa5bebf829f9bef32c34 Author: Harry Wentland Date: Thu May 18 11:40:53 2017 -0400 drm/amd/display: Remove unused addr var in TG Signed-off-by: Harry Wentland Reviewed-by: Sun peng Li Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c | 7 ------- 1 file changed, 7 deletions(-) commit d9e8887860c93cf5b8785d7d35a411a1636cfcaf Author: Dmytro Laktyushkin Date: Thu May 18 16:56:45 2017 -0400 drm/amd/display: fix flip register write sequence Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 56 ++++++++++------------ .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 2 + 2 files changed, 28 insertions(+), 30 deletions(-) commit a7562ab35ee96810e9e4c41969a375f1c3f249ae Author: Dmytro Laktyushkin Date: Thu May 18 17:02:43 2017 -0400 drm/amd/display: remove GRPH_SURFACE_UPDATE_IMMEDIATE_EN field programming This is causing asserts for dce 8 and 10 since they do not contain this field. It is also unnecessary for later DCEs as it is left in it's default state of 0 Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 7 +------ drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h | 2 -- 2 files changed, 1 insertion(+), 8 deletions(-) commit 89c872e595c48ccf357bbabcc9918bdef9de7ac8 Author: Tony Cheng Date: Thu May 18 19:03:15 2017 -0400 drm/amd/display: fix YUV surface address programming sequence need to program DCSURF_PRIMARY_SURFACE_ADDRESS last as HW automatically latch rest of addr regs on write when SURFACE_UPDATE_LOCK is not used Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 42 +++++++++++----------- 1 file changed, 20 insertions(+), 22 deletions(-) commit 83dc211702cb18e62741379fef48f2629b1c983c Author: Andrey Grodzovsky Date: Thu May 18 13:35:22 2017 -0400 drm/amd/display: Remove redundant condition. You cannot have modeset and flip in the same call for same CRTC, in such case it will be set mode and set plane, not a flip. Signed-off-by: Andrey Grodzovsky Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit f1000642e48166322194529a6d0f2452934acf2a Author: Andrey Grodzovsky Date: Thu May 18 11:03:17 2017 -0400 drm/amd/display: Query for update plane type. Use DC interface to query for plane update type so in case of FULL update you flush any outstanding commits. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 69 +++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) commit 0b3454b7c49bfc6aa7a1096d1aa9d059201a73a7 Author: Tom St Denis Date: Tue May 16 10:22:05 2017 -0400 drm/amd/display: Tidy up mem_input_program_surface_flip_and_addr() Signed-off-by: Tom St Denis Reviewed-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 25 ++++++++-------------- 1 file changed, 9 insertions(+), 16 deletions(-) commit 76fd8eb8e2282c695c43683802772caa187bf41b Author: Tom St Denis Date: Tue May 16 10:22:04 2017 -0400 drm/amd/display: Tidy up dce120_clock_source_create() Also change sizeof to be automatic based on type declaration. Signed-off-by: Tom St Denis Reviewed-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cedaf3073a33a95e276371783b20a14e208e184c Author: Tom St Denis Date: Tue May 16 10:22:03 2017 -0400 drm/amd/display: Clean up indentation in dce120_tg_set_blank() Signed-off-by: Tom St Denis Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dce120/dce120_timing_generator.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 7b7d68659e3007a30d04d51e1c8bbd1fa8b6de3e Author: Tom St Denis Date: Tue May 16 10:22:02 2017 -0400 drm/amd/display: Make dce120_tg_is_blanked() more legible Signed-off-by: Tom St Denis Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dce120/dce120_timing_generator.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 78178dea7a92a611262edad73a548ffe7087a347 Author: Tom St Denis Date: Tue May 16 10:22:01 2017 -0400 drm/amd/display: Fix indentation in dce120_tg_program_timing() Signed-off-by: Tom St Denis Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a4b0a5b84827b1bceb99c3c2aa354073cc5bfb53 Author: Tom St Denis Date: Tue May 16 10:22:00 2017 -0400 drm/amd/display: Tidy up dce120_timing_generator_enable_advanced_request() Simplify the function by removing identical looking code blocks. Signed-off-by: Tom St Denis Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../display/dc/dce120/dce120_timing_generator.c | 37 +++++++--------------- 1 file changed, 12 insertions(+), 25 deletions(-) commit 0a5c357a85e99eae6b1914272bc2cf8f49cf511b Author: Ayyappa Chandolu Date: Fri May 12 17:05:55 2017 +0530 drm/amd/display: Fix ASSR enablement on DP to EDP converter ASSR mode is not enable when we connect eDP panel via DP to eDP converter. connector_signal is coming as SIGNAL_TYPE_DISPLAY_PORT. Present code ignoring panel_mode_edp for SIGNAL_TYPE_DISPLAY_PORT. Added checking panel_mode_edp for all signals. Signed-off-by: Ayyappa Chandolu Reviewed-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7b9454f51ec1e04f7842a9412df568f98371b01c Author: Andrey Grodzovsky Date: Wed May 17 18:05:36 2017 -0400 drm/amd/display: Add missed wait_for_prev_commits. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 1 + 1 file changed, 1 insertion(+) commit 5aff86c1b3259f1443e0b35b74eb6dfd5b35791b Author: Leo (Sunpeng) Li Date: Tue May 16 16:07:30 2017 -0400 drm/amd/display: Implement input gamma LUT 1. Implemented dcn10_ipp_program_input_lut(), following the existing interface. 2. Added missing registers as needed 3. Change to REG_GET for *ram_select() funcs. 4. Removed gamma table init from DiagsDM::make_surface() for resolving CRC errors. Reason: Legacy LUT will be deprecated soon for Raven in favor of degamma/regamma. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 6 +- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 82 +++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.h | 22 ++++++ 3 files changed, 108 insertions(+), 2 deletions(-) commit 98489c026edc48d9c783f783cc82f2e8811e0ee4 Author: Leo (Sunpeng) Li Date: Tue May 16 13:52:28 2017 -0400 drm/amd/display: Refactor use_lut() from dce110 to dce use_lut() checks if the input surface's pixel format is compatible with a 256 entry LUT. This function can be used across different versions and not just dce11. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 12 ++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 2 ++ .../gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 17 ++--------------- 3 files changed, 16 insertions(+), 15 deletions(-) commit afc8935ef0fc04c87cd7e7749ff28c32be4f712a Author: Dmytro Laktyushkin Date: Wed May 17 16:56:56 2017 -0400 drm/amd/display: revert dc_get_validate_context re-entrancy fix Apply dc_get_validate_context re-entrancy fix to dc_validate_resources instead Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 71 ++++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 9 deletions(-) commit 430ef426bc43b59a7444c08d664e24a7cf89710e Author: Dmytro Laktyushkin Date: Wed May 17 16:05:40 2017 -0400 drm/amd/display: make dc_get_validate_context re-entrant Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 44 ++-------------------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 30 +++++++-------- .../drm/amd/display/dc/dce100/dce100_resource.c | 22 ++++++----- .../drm/amd/display/dc/dce110/dce110_resource.c | 22 ++++++----- .../drm/amd/display/dc/dce112/dce112_resource.c | 27 +++++++------ .../drm/amd/display/dc/dce112/dce112_resource.h | 3 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 22 ++++++----- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 24 ++++++------ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 3 +- drivers/gpu/drm/amd/display/dc/inc/resource.h | 9 +++-- 10 files changed, 92 insertions(+), 114 deletions(-) commit ccaf31ec714b596d1edb92b1ed4ccc4abf1f645c Author: Roman Li Date: Wed May 17 12:07:30 2017 -0400 drm/amd/display: Fix 5th display lightup on Vega10 - fixing bug in calculation of reg offset for D5VGA_CONTROL Signed-off-by: Roman Li Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f7f3aec125724da30ff1c2f2d359340feb0d9e1 Author: Tony Cheng Date: Tue May 16 21:27:01 2017 -0400 drm/amd/display: read VM settings from MMHUB instead of GC, as after GFX off, GC can be power gated any time Signed-off-by: Tony Cheng Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 24 +++++++++++----------- .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 14 ++++++------- 2 files changed, 19 insertions(+), 19 deletions(-) commit bdc79f8e5dfaeb83dd3a1b609aff25712250cc1e Author: Andrey Grodzovsky Date: Mon May 15 18:55:38 2017 -0400 drm/amd/display: Unify loop for surface update and page flip. Remove extra loop we have for page flips and do flips in same loop we do for surface create/update. Add documentation for synchronization between commits on different crtcs. Rename function to have DM prefix. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 88 +++++++++++----------- 1 file changed, 42 insertions(+), 46 deletions(-) commit 1185da086903e87259fd54c20c04098bcefa9da3 Author: Dmytro Laktyushkin Date: Wed May 17 10:59:53 2017 -0400 drm/amd/display: add missing GRPH_UPDATE_LOCK field macro for dce_mem_input Signed-off-by: Dmytro Laktyushkin Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h | 1 + 1 file changed, 1 insertion(+) commit d3ec0562085918ba889af3d565b4104adcd4947f Author: Leo (Sunpeng) Li Date: Tue May 16 09:55:20 2017 -0400 drm/amd/display: Fix dcn10 cursor set position hang Calling dcn10_cursor_set_position() before dcn10_cursor_set_attributes() with invalid (0-value) attributes can cause the ASIC to hang. This fix checks that address.quadpart is non-zero within set_position before calling set_attributes. Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b802acc7f3266e43905dfeee865bf1acc4e00bce Author: Andrey Grodzovsky Date: Mon May 15 14:47:02 2017 -0400 drm/amd/display: Clean unused interface. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 26 -------------------------- drivers/gpu/drm/amd/display/dc/dc.h | 12 ------------ 2 files changed, 38 deletions(-) commit 3379da831b4032e3d7cac2cb199293e59f0c9e9f Author: Andrey Grodzovsky Date: Mon May 15 13:59:31 2017 -0400 drm/amd/display: Use dc_update_surfaces_for_stream for flip. Today we use special interface for flip because of fear of cuncurency issues over dc->current_ctx. This should be no longer an issue when flipping on multiple CRTCs concurently since for fast update (as flip is) no new context is created and the exsisitng is not destroyed. For full updates case when removing or adding streams on once CRTC while flipping on another Adding all current active CRTC's states to the atomic commit in amdgpu_dm_atomic_check will garntee that any such full update commit will wait for completion of any outstanding flip. Signed-off-by: Andrey Grodzovsky Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++++--- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 23 +++++++++++++++++++++- 2 files changed, 28 insertions(+), 4 deletions(-) commit c34892144d38eddb4499ac425c24455b1e34dd61 Author: Dmytro Laktyushkin Date: Mon May 15 08:31:51 2017 -0400 drm/amd/display: dce 8 - 12 mem_input refactor to new style Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 306 +++++++++++++-- drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h | 115 ++++-- .../drm/amd/display/dc/dce100/dce100_resource.c | 78 +--- drivers/gpu/drm/amd/display/dc/dce110/Makefile | 3 +- .../drm/amd/display/dc/dce110/dce110_mem_input.c | 437 --------------------- .../drm/amd/display/dc/dce110/dce110_mem_input.h | 121 ------ .../drm/amd/display/dc/dce110/dce110_mem_input_v.c | 155 +++----- .../drm/amd/display/dc/dce110/dce110_mem_input_v.h | 66 +--- .../drm/amd/display/dc/dce110/dce110_resource.c | 58 +-- drivers/gpu/drm/amd/display/dc/dce112/Makefile | 2 +- .../drm/amd/display/dc/dce112/dce112_mem_input.c | 54 --- .../drm/amd/display/dc/dce112/dce112_mem_input.h | 38 -- .../drm/amd/display/dc/dce112/dce112_resource.c | 77 +--- drivers/gpu/drm/amd/display/dc/dce120/Makefile | 2 +- .../drm/amd/display/dc/dce120/dce120_mem_input.c | 340 ---------------- .../drm/amd/display/dc/dce120/dce120_mem_input.h | 37 -- .../drm/amd/display/dc/dce120/dce120_resource.c | 75 +--- drivers/gpu/drm/amd/display/dc/dce80/Makefile | 3 +- .../gpu/drm/amd/display/dc/dce80/dce80_mem_input.c | 83 ---- .../gpu/drm/amd/display/dc/dce80/dce80_mem_input.h | 36 -- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 78 +--- drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 8 - 22 files changed, 476 insertions(+), 1696 deletions(-) commit aa7397dfd4cd2e31f007ad3adc08823afb40c25b Author: Amy Zhang Date: Fri May 12 15:54:29 2017 -0400 drm/amd/display: Disable ABM when eDP is disabled - Add immediate ABM disable when eDP is disabled - Fix purple screen when ABM is mistakenly enabled on non eDP display Signed-off-by: Amy Zhang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 16 ++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 21 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/inc/hw/abm.h | 1 + 4 files changed, 40 insertions(+) commit e806208dc1daebf3b236d0188709d943cf0d9f16 Author: Andrey Grodzovsky Date: Fri May 12 16:19:15 2017 -0400 drm/amd/display: Fix slow FPS. Typo in expresion. Signed-off-by: Andrey Grodzovsky Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4b28b76bfe14430a91de74a5cf9215f3c108acf9 Author: Dmytro Laktyushkin Date: Thu May 11 17:15:14 2017 -0400 drm/amd/display: fix mpo blanking out on one of planes being set not visible Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 3 +- drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h | 3 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 10 +++--- .../drm/amd/display/dc/dce110/dce110_mem_input_v.c | 3 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 41 ++++++++++++++++++---- .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 20 +++-------- drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 8 ++--- 7 files changed, 51 insertions(+), 37 deletions(-) commit 747be97f4ea7de8078739f04e241b5819015f035 Author: Amy Zhang Date: Thu May 11 17:13:20 2017 -0400 drm/amd/display: Program CSC Mode For BT2020 - Add BT2020 color space in the set output csc default Signed-off-by: Amy Zhang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 3 +++ 1 file changed, 3 insertions(+) commit ce923dc323afa7274364d2af84a708442f9c9b59 Author: Harry Wentland Date: Mon May 15 14:23:09 2017 -0400 drm/amd/display: Remove duplicate entry from log_mask As pointed out by kbuild test robot and Julia Lawall. CC: Julia Lawall CC: Alex Deucher Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/logger.c | 1 - 1 file changed, 1 deletion(-) commit 81e2b2de3d9eb1313aae3f8ddcd1952c39fb8d97 Author: Dmytro Laktyushkin Date: Wed May 10 18:24:24 2017 -0400 drm/amd/display: add explanation for surface_update_type Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit b71a061801cb431d23854e0b6a6b7c04fa1f4c83 Author: Dmytro Laktyushkin Date: Wed May 10 18:05:02 2017 -0400 drm/amd/display: fix scaling info based surface update type check Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 47 +++++++++----------------------- 1 file changed, 13 insertions(+), 34 deletions(-) commit 0e12c3f6a0a4e73c6b6d11b7aebf20b7026ef18f Author: Dmytro Laktyushkin Date: Wed May 10 11:35:07 2017 -0400 drm/amd/display: add yuv pixel formats to pixel_format_to_bpp() Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 5 +++++ 1 file changed, 5 insertions(+) commit 86006a7f54c7fb59ccb3061d7a3dcd3c0443b4fe Author: Dmytro Laktyushkin Date: Tue May 9 16:39:26 2017 -0400 drm/amd/display: fix scaling calculation for proper surface input format Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 60 +++++++++++++++-------- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 20 ++++---- 2 files changed, 49 insertions(+), 31 deletions(-) commit 6a4c32dac559a90b83c5f268b02c1a94df411159 Author: Harry Wentland Date: Fri May 5 14:57:12 2017 -0400 drm/amd/display: DCE12 num_timing_generators should be 6 We should also use it to determine pipe count. Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f46661dd42f3648b92eca73ba2c48f5d9a418b1b Author: Amy Zhang Date: Tue May 9 14:45:54 2017 -0400 drm/amd/display: Move output transfer function to stream updates Signed-off-by: Amy Zhang Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 46 ++++++++++++++-------- drivers/gpu/drm/amd/display/dc/dc.h | 14 +++---- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 1 - .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 +- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 1 - 5 files changed, 37 insertions(+), 29 deletions(-) commit 6838161c723d061c85e20057dbf0a2a9378c4e59 Author: Corbin McElhanney Date: Tue May 9 12:00:24 2017 -0400 drm/amd/display: fix freesync not working on raven Signed-off-by: Corbin McElhanney Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit d5c40d5368876d701811faa65c341198cb958cb0 Author: Dmytro Laktyushkin Date: Mon May 8 11:26:43 2017 -0400 drm/amd/display: enable watermark range reporting to pplib Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca3cba9c605348988223f69a83d1c1e7dde7583a Author: Charlene Liu Date: Mon May 8 17:46:57 2017 -0400 drm/amd/display: single channel bandwidth verses dual channel bandwidth DPM0, FCLK=MCLK, single channel bandwidth = dual channel bandwidth for the rest of the DPM levels, single channel bandwidth = 1/2 dual channel bandwidth Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit e61a04f1af6187caebcad69ff72b571179b3dde9 Author: Harry Wentland Date: Thu Apr 27 17:13:34 2017 -0400 drm/amd/display: Use MED update type if clip position changes Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit d4b4597384eac0e2d293912cf4cebded27246301 Author: Yongqiang Sun Date: Fri May 5 16:33:11 2017 -0400 drm/amd/display: Add 64KB_S_T and 64KB_D_T swizzle mode. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 2 ++ 1 file changed, 2 insertions(+) commit c66a54dc4a8403ab269568b3f964b0efd4052932 Author: Dmytro Laktyushkin Date: Wed May 3 11:40:40 2017 -0400 drm/amd/display: switch to using calc_clk and cur_clk for dcn bw setting Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/dce110/dce110_hw_sequencer.c | 50 +++++++++++------- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 59 +++++++++++++++++----- 2 files changed, 79 insertions(+), 30 deletions(-) commit 9037d802a97812cb8d614b48f817a5532cf1558c Author: Dmytro Laktyushkin Date: Tue May 2 17:29:48 2017 -0400 drm/amd/display: refactor bw related variable structure in val_ctx Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 18 ++--- drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 79 +++++++++++----------- drivers/gpu/drm/amd/display/dc/core/dc.c | 20 +----- drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 6 +- drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h | 12 ++-- .../amd/display/dc/dce100/dce100_hw_sequencer.c | 9 ++- .../drm/amd/display/dc/dce100/dce100_resource.c | 4 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 65 +++++++++--------- .../drm/amd/display/dc/dce110/dce110_mem_input.c | 12 ++-- .../drm/amd/display/dc/dce110/dce110_mem_input.h | 6 +- .../drm/amd/display/dc/dce110/dce110_mem_input_v.c | 30 ++++---- .../drm/amd/display/dc/dce110/dce110_mem_input_v.h | 6 +- .../drm/amd/display/dc/dce110/dce110_resource.c | 63 +++++++++-------- .../drm/amd/display/dc/dce112/dce112_resource.c | 63 +++++++++-------- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 4 +- .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 38 +++++------ .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 6 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 58 ++++++++++++---- drivers/gpu/drm/amd/display/dc/inc/dce_calcs.h | 29 +------- drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 20 ++++-- 20 files changed, 270 insertions(+), 278 deletions(-) commit ac5c294719909bd5d2d3f8c74f894bdda5744916 Author: Dmytro Laktyushkin Date: Fri May 5 15:07:55 2017 -0400 drm/amd/display: prevent assert on error of 1 in calc_freesync_range Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3273d3bfe58094d9c7b52448399e20f496475afe Author: Andrey Grodzovsky Date: Fri May 5 11:30:06 2017 -0400 drm/amd/display: Fix race. Problem : A race between two adjecent page flips makes the earlier one to release an alocated frame buffer for the subsequent one - since there are 2 frambuffer swapped back and forth between flips, the 'new' fb of the later flip is actually the 'previous' fb for the earlier flip. Fix: Don't set fb->address = 0 in cleanup hook, this is unnecessery and erases the newly cached adress that was set in prepare_fb of the second flip. Signed-off-by: Andrey Grodzovsky Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f3e4341871bee5c91ffbf9d90c4f5af380759e33 Author: Harry Wentland Date: Wed May 3 14:21:37 2017 -0400 drm/amd/display: ifdef some code only needed for DCN Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/inc/core_types.h | 4 ++++ drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h | 2 ++ drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 2 ++ 3 files changed, 8 insertions(+) commit fe626734711b5f402fca9df5d33cb0663b6c2fe5 Author: Anthony Koo Date: Thu May 4 14:09:09 2017 -0400 drm/amd/display: Implement support for backlight optimization - Add functionality to get real hw backlight level as opposed to user level, meaning the level that takes into account backlight ramping over time and backlight reduction due to Varibright - Add backlight optimization which allows for a second OS state that is able to control ABM Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 13 +++++++++++-- drivers/gpu/drm/amd/display/dc/inc/hw/abm.h | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) commit c0ba5ec70eff5cf0e4337b3864c94fa6b128c8d7 Author: Ken Chalmers Date: Thu May 4 13:34:55 2017 -0400 drm/amd/display: Continue with stream enable if DP link training fails. Not necessarily a fatal problem - some monitors will recover and show the stream anyway if link training fails. Signed-off-by: Ken Chalmers Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 21 +++++++++++++++++---- drivers/gpu/drm/amd/display/dc/inc/core_status.h | 1 + 2 files changed, 18 insertions(+), 4 deletions(-) commit cbfd33fd976eb2679c154e44fa34428a43ac8b44 Author: Tony Cheng Date: Tue May 2 17:01:10 2017 -0400 drm/amd/display: do not set_mpc_tree if tree is already setup Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 30 +++++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) commit c282ca3390d3327e0f8004d33acb9b022245a958 Author: Anthony Koo Date: Wed May 3 15:19:07 2017 -0400 drm/amd/display: use signal type to decide whether to set backlight Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a90fbf78a617901181c09aa670e6d9f46f9d13ce Author: Leon Elazar Date: Fri Mar 24 15:46:24 2017 -0400 drm/amd/display: Allow MPO on Raven Signed-off-by: Leon Elazar Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 ++ 1 file changed, 2 insertions(+) commit 8d1b404744d0040d2d85c1ff7737a38f29770826 Author: Yongqiang Sun Date: Wed May 3 10:25:51 2017 -0400 drm/amd/display: Only apply ctx for specific surface. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 64b44524d4b28349217718ff641b02ec5ecf7b26 Author: Dmytro Laktyushkin Date: Tue May 2 16:58:39 2017 -0400 drm/amd/display: bw debug options now apply to dml as well Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 41 ++++++++++++++++++++---- 1 file changed, 34 insertions(+), 7 deletions(-) commit 56dcade33fd3c1681a43ebc250523249be3adbb0 Author: Harry Wentland Date: Tue May 9 10:41:42 2017 -0400 drm/amd/display: Keep DVI_SINGLE_LINK signal if low clk If user is using DVI->HDMI dongle dual link signal might pose a problem. Keep single link signal type if clk is lower than max tmds clk. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 46df790c6b569faffb4cc93889745a7827283749 Author: Andrey Grodzovsky Date: Sun Apr 30 09:20:55 2017 -0400 drm/amd/display: i2c/aux Remove link index. Link index is an unnecessery level of inderection when calling from kernel i2c/aux transfer into DAL. Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 6 ++-- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 38 +++++++++++----------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 22 +++++++++---- drivers/gpu/drm/amd/display/dc/core/dc.c | 19 ++++------- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 28 ++++++++-------- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 +-- drivers/gpu/drm/amd/display/dc/dc.h | 9 ++--- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 1 - 8 files changed, 61 insertions(+), 66 deletions(-) commit 15a27de250a5e5a2dec7c0bf004db0511353e3f3 Author: Harry Wentland Date: Wed May 10 15:56:17 2017 -0400 drm/amd/display: Don't call PSR func if DMCU is off Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 -------- drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 23 +++++++++++++++-------- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 11 ++++++++--- drivers/gpu/drm/amd/display/dc/inc/hw/abm.h | 1 + 4 files changed, 24 insertions(+), 19 deletions(-) commit 2801b0a84ef66604fed6754d8d7858b45e2a443a Author: kbuild test robot Date: Thu May 11 09:48:31 2017 +0800 drm/amdgpu/display: fix semicolon.cocci warnings drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_resource.c:1085:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci CC: Harry Wentland Signed-off-by: Fengguang Wu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e863620aaecdb86920035c6d8863a4642147c35 Author: kbuild test robot Date: Thu May 11 09:48:31 2017 +0800 drm/amdgpu/display: fix semicolon.cocci warnings drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_stream_encoder.c:411:23-24: Unneeded semicolon drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_stream_encoder.c:420:39-40: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci CC: Harry Wentland Signed-off-by: Fengguang Wu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fd187853857d46dce082e8bca210795a5f2d38a5 Author: Hawking Zhang Date: Mon Mar 6 14:01:11 2017 +0800 drm/amdgpu: enable dcn1.0 dc support on raven Signed-off-by: Hawking Zhang Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ 1 file changed, 4 insertions(+) commit ff5ef99248662ef98a64c11c5370ecd9fbbf57a6 Author: Alex Deucher Date: Thu Jun 15 16:27:42 2017 -0400 drm/amdgpu/display: Enable DCN in DC Enable DCN in DC. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/Kconfig | 7 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 115 ++++++++- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 3 +- drivers/gpu/drm/amd/display/dc/Makefile | 5 + .../amd/display/dc/bios/command_table_helper2.c | 5 + drivers/gpu/drm/amd/display/dc/calcs/Makefile | 8 + drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 19 ++ drivers/gpu/drm/amd/display/dc/dc.h | 18 ++ drivers/gpu/drm/amd/display/dc/dce/dce_abm.h | 49 ++++ .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 31 +++ .../gpu/drm/amd/display/dc/dce/dce_clock_source.h | 21 ++ drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 15 ++ drivers/gpu/drm/amd/display/dc/dce/dce_clocks.h | 9 + drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 245 +++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h | 21 ++ drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 15 ++ .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 16 +- .../drm/amd/display/dc/dce/dce_stream_encoder.c | 264 +++++++++++++++++++++ .../drm/amd/display/dc/dce/dce_stream_encoder.h | 69 ++++++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 29 +++ drivers/gpu/drm/amd/display/dc/dm_services.h | 4 + drivers/gpu/drm/amd/display/dc/dm_services_types.h | 1 + drivers/gpu/drm/amd/display/dc/gpio/Makefile | 11 + drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 9 +- drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 9 + drivers/gpu/drm/amd/display/dc/i2caux/Makefile | 11 + drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c | 8 + drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 5 + drivers/gpu/drm/amd/display/dc/inc/core_types.h | 26 ++ .../gpu/drm/amd/display/dc/inc/hw/display_clock.h | 7 + drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 41 ++++ drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 110 +++++++++ drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 1 + .../drm/amd/display/dc/inc/hw/timing_generator.h | 16 ++ drivers/gpu/drm/amd/display/dc/irq/Makefile | 10 + drivers/gpu/drm/amd/display/dc/irq/irq_service.c | 5 + drivers/gpu/drm/amd/display/include/dal_asic_id.h | 13 + drivers/gpu/drm/amd/display/include/dal_types.h | 5 +- 39 files changed, 1250 insertions(+), 7 deletions(-) commit 1909bed5b4ff407130fb9d896565661add3bcdee Author: Harry Wentland Date: Mon May 8 15:28:56 2017 -0400 drm/amdgpu/display: Add irq support for DCN DCN code for display interrupts. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/irq/dcn10/irq_service_dcn10.c | 361 +++++++++++++++++++++ .../amd/display/dc/irq/dcn10/irq_service_dcn10.h | 34 ++ 2 files changed, 395 insertions(+) commit f690b1d58002f3adf8c6a3e5b59c637a1cfe3361 Author: Harry Wentland Date: Mon May 8 15:26:37 2017 -0400 drm/amdgpu/display: Add i2c/aux support for DCN Implement support for i2c and aux on DCN. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/i2caux/dcn10/i2caux_dcn10.c | 125 +++++++++++++++++++++ .../drm/amd/display/dc/i2caux/dcn10/i2caux_dcn10.h | 32 ++++++ 2 files changed, 157 insertions(+) commit 981ab3f1dc3949b45e317e343dfc232a102847aa Author: Harry Wentland Date: Mon May 8 15:21:44 2017 -0400 drm/amdgpu/display: Add gpio support for DCN GPIOs are used for i2c and other things. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/gpio/dcn10/hw_factory_dcn10.c | 192 ++++++++++ .../amd/display/dc/gpio/dcn10/hw_factory_dcn10.h | 32 ++ .../amd/display/dc/gpio/dcn10/hw_translate_dcn10.c | 408 +++++++++++++++++++++ .../amd/display/dc/gpio/dcn10/hw_translate_dcn10.h | 34 ++ 4 files changed, 666 insertions(+) commit 061bfa06a42a9f6cd192bae61a4bf0e746eccb39 Author: Harry Wentland Date: Mon May 8 15:20:38 2017 -0400 drm/amdgpu/display: Add dml support for DCN Display mode lib handles clock, watermark, and bandwidth calculations for DCN. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dml/Makefile | 22 + drivers/gpu/drm/amd/display/dc/dml/dc_features.h | 557 +++++ .../drm/amd/display/dc/dml/display_mode_enums.h | 111 + .../gpu/drm/amd/display/dc/dml/display_mode_lib.c | 147 ++ .../gpu/drm/amd/display/dc/dml/display_mode_lib.h | 52 + .../drm/amd/display/dc/dml/display_mode_structs.h | 429 ++++ .../drm/amd/display/dc/dml/display_mode_support.c | 2326 ++++++++++++++++++++ .../drm/amd/display/dc/dml/display_mode_support.h | 199 ++ .../drm/amd/display/dc/dml/display_pipe_clocks.c | 367 +++ .../drm/amd/display/dc/dml/display_pipe_clocks.h | 41 + .../drm/amd/display/dc/dml/display_rq_dlg_calc.c | 2254 +++++++++++++++++++ .../drm/amd/display/dc/dml/display_rq_dlg_calc.h | 139 ++ .../amd/display/dc/dml/display_rq_dlg_helpers.c | 320 +++ .../amd/display/dc/dml/display_rq_dlg_helpers.h | 66 + .../gpu/drm/amd/display/dc/dml/display_watermark.c | 1281 +++++++++++ .../gpu/drm/amd/display/dc/dml/display_watermark.h | 98 + .../gpu/drm/amd/display/dc/dml/dml_common_defs.c | 148 ++ .../gpu/drm/amd/display/dc/dml/dml_common_defs.h | 51 + .../gpu/drm/amd/display/dc/dml/soc_bounding_box.c | 73 + .../gpu/drm/amd/display/dc/dml/soc_bounding_box.h | 36 + 20 files changed, 8717 insertions(+) commit 70ccab604049bbb995a57ab3b7fe8a3c2fdbb736 Author: Harry Wentland Date: Mon May 8 15:19:06 2017 -0400 drm/amdgpu/display: Add core dc support for DCN Core display support for DCN. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 10 + .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1866 ++++++++++++++++++++ .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h | 38 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 883 +++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.h | 549 ++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 1102 ++++++++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 553 ++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 376 ++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.h | 135 ++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 801 +++++++++ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.h | 622 +++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1475 ++++++++++++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.h | 47 + .../amd/display/dc/dcn10/dcn10_timing_generator.c | 1202 +++++++++++++ .../amd/display/dc/dcn10/dcn10_timing_generator.h | 335 ++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_transform.c | 1057 +++++++++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_transform.h | 416 +++++ 17 files changed, 11467 insertions(+) commit 74c49c7ac14f3a7cc500be959709f3473a6a49e7 Author: Harry Wentland Date: Mon May 8 15:17:39 2017 -0400 drm/amdgpu/display: Add calcs code for DCN Bandwidth and scaling calculations for DCN. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/calcs/dcn_calc_auto.c | 3629 ++++++++++++++++++++ .../gpu/drm/amd/display/dc/calcs/dcn_calc_auto.h | 37 + .../gpu/drm/amd/display/dc/calcs/dcn_calc_math.c | 104 + .../gpu/drm/amd/display/dc/calcs/dcn_calc_math.h | 40 + drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 1366 ++++++++ drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h | 629 ++++ 6 files changed, 5805 insertions(+) commit 03ea364c8e156b2bb5c64465718e8ebd75e3df22 Author: Arindam Nath Date: Wed Apr 26 17:39:56 2017 +0530 drm/amd/display: fix resume hang because of DP short pulse There is a hard hang observed during resume from S3 when the system receives a DP short pulse interrupt. This is because there are two code paths contending for GPIO access for AUX channel transactions. One such path is through amdgpu_dm_display_resume() function which is invoked from the regular system resume code path. The other path is through handle_hpd_rx_irq(), which is invoked in response to system receiving DP short pulse interrupt. handle_hpd_rx_irq() guards against conflicting GPIO access using hpd_lock, but the GPIO access from amdgpu_dm_display_resume() remains unguarded. This patch makes sure we use hpd_lock inside amdgpu_dm_display_resume() to avoid race conditions for GPIO access. Signed-off-by: Arindam Nath Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 insertions(+) commit ba624cddbc002816e376d588290a48f77ff4b06f Author: Harry Wentland Date: Wed May 3 13:58:45 2017 -0400 drm/amd/display: Assign stream to map before we need it Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 7d091f7a4466cd7d7b778c126072b3dc46d8141f Author: Hersen Wu Date: Fri Apr 28 16:21:38 2017 -0400 drm/amd/display: Get dprefclk ss percentage from vbios Signed-off-by: Hersen Wu Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 40 +++++-------------- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 46 ++++++++++++++++------ drivers/gpu/drm/amd/display/dc/dce/dce_clocks.h | 13 +++--- 3 files changed, 51 insertions(+), 48 deletions(-) commit 9c3b2b50b3f03e876d5df1cf8940a79013091e9d Author: Tony Cheng Date: Fri Apr 28 07:54:34 2017 -0400 drm/amd/display: move drr_params definition to TG Signed-off-by: Tony Cheng Acked-by: Harry Wentland Reviewed-by: Dmytro Laktyushkin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h | 7 +++++++ drivers/gpu/drm/amd/display/include/hw_sequencer_types.h | 11 ----------- 2 files changed, 7 insertions(+), 11 deletions(-) commit cf4cde2b0b678ca1cf56d7b397c78b1bc3d3155b Author: Yongqiang Sun Date: Fri Apr 28 09:56:08 2017 -0400 drm/amd/display: Disable cursor on video surface. Signed-off-by: Yongqiang Sun Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9e594f4c3f30c8ba43a1601268e82177fbd737c1 Author: Eric Cook Date: Thu Apr 27 12:20:34 2017 -0400 drm/amd/display: Add support for FreeSync on eDP to module Signed-off-by: Eric Acked-by: Harry Wentland Reviewed-by: Anthony Koo Signed-off-by: Alex Deucher .../drm/amd/display/modules/freesync/freesync.c | 42 +++++++++++++++++----- 1 file changed, 33 insertions(+), 9 deletions(-) commit 529cad0f945c9e60569e902062d2f2741e4fd71a Author: Ding Wang Date: Tue Apr 25 10:03:27 2017 -0400 drm/amd/display: Add function to set dither option Signed-off-by: Ding Wang Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 41 ++++++++ drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 110 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 3 + .../drm/amd/display/dc/dce110/dce110_resource.c | 48 +-------- .../drm/amd/display/dc/dce110/dce110_resource.h | 4 - .../drm/amd/display/dc/dce112/dce112_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 4 - drivers/gpu/drm/amd/display/dc/inc/resource.h | 2 + 9 files changed, 160 insertions(+), 58 deletions(-) commit 7cc9e7a68abef8d1303700bac6f58ab76bc9db7b Author: Eric Cook Date: Wed Apr 26 11:51:38 2017 -0400 drm/amd/display: Check for Zero Range in FreeSync Calc -check for min/max range in freesync calculation and handle it accordingly Signed-off-by: Eric Acked-by: Harry Wentland Reviewed-by: Anthony Koo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 1c29313b96fbe9606ecaab540800d20f2ae88adc Author: Dmytro Laktyushkin Date: Wed Apr 26 10:54:45 2017 -0400 drm/amd/display: fix crash caused by incorrect index being used for array Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Anthony Koo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b92033b67879380baee9ebd14da78c7dc36e1ea5 Author: Ding Wang Date: Wed Apr 12 15:29:13 2017 -0400 drm/amd/display: Define dithering options Signed-off-by: Ding Wang Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 29 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) commit a2b8659db9b435853cb0dc78d225a492e7ee69d0 Author: Tony Cheng Date: Sat Apr 22 14:17:51 2017 -0400 drm/amd/display: decouple resource_pool from resource_context to avoid null access in case res_ctx is used to access res_pool before it's fully constructed also make it clear which function has dependency on resource_pool Signed-off-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 19 ++- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 143 ++++++++++++--------- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 3 +- .../amd/display/dc/dce100/dce100_hw_sequencer.c | 4 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 8 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 42 +++--- .../drm/amd/display/dc/dce110/dce110_resource.c | 25 ++-- .../drm/amd/display/dc/dce112/dce112_resource.c | 35 +++-- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 8 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/resource.h | 15 ++- 13 files changed, 161 insertions(+), 147 deletions(-) commit 72ada5f76939ed00c07c584be7691a29d3c2c3da Author: Eric Cook Date: Tue Apr 18 15:24:50 2017 -0400 drm/amd/display: FreeSync Auto Sweep Support Implement core support to allow for FreeSync Auto Sweep to work Signed-off-by: Eric Cook Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 28 +++ drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 5 +- drivers/gpu/drm/amd/display/dc/dc.h | 6 + .../amd/display/dc/dce110/dce110_hw_sequencer.c | 13 ++ .../display/dc/dce110/dce110_timing_generator.c | 61 +++--- .../display/dc/dce110/dce110_timing_generator.h | 9 +- .../display/dc/dce110/dce110_timing_generator_v.c | 23 +-- .../display/dc/dce120/dce120_timing_generator.c | 73 ++++++- .../amd/display/dc/dce80/dce80_timing_generator.c | 2 +- .../drm/amd/display/dc/inc/hw/timing_generator.h | 10 +- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 3 + .../drm/amd/display/modules/freesync/freesync.c | 227 ++++++++++++++++----- .../gpu/drm/amd/display/modules/inc/mod_freesync.h | 20 ++ 13 files changed, 357 insertions(+), 123 deletions(-) commit 84f6739fc4d348440cd5684113260f728778312a Author: Dmytro Laktyushkin Date: Mon Apr 24 17:42:22 2017 -0400 drm/amd/display: no need for return value from ipp_program_degamma_pwl Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6303950ea7221e49cabb240383fa4e2bd035b0c Author: Dmytro Laktyushkin Date: Mon Apr 24 16:30:58 2017 -0400 drm/amd/display: dce80, 100, 110 and 112 to dce ipp refactor Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_ipp.c | 12 +- drivers/gpu/drm/amd/display/dc/dce/dce_ipp.h | 24 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 73 +++--- drivers/gpu/drm/amd/display/dc/dce110/Makefile | 4 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_ipp.c | 63 ------ drivers/gpu/drm/amd/display/dc/dce110/dce110_ipp.h | 74 ------ .../drm/amd/display/dc/dce110/dce110_ipp_cursor.c | 249 --------------------- .../drm/amd/display/dc/dce110/dce110_ipp_gamma.c | 159 ------------- .../drm/amd/display/dc/dce110/dce110_resource.c | 70 +++--- .../drm/amd/display/dc/dce112/dce112_resource.c | 81 +++---- .../drm/amd/display/dc/dce120/dce120_resource.c | 14 +- drivers/gpu/drm/amd/display/dc/dce80/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dce80/dce80_ipp.c | 65 ------ drivers/gpu/drm/amd/display/dc/dce80/dce80_ipp.h | 45 ---- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 84 ++++--- 15 files changed, 171 insertions(+), 848 deletions(-) commit 86b6a203b966ea54e3225b49e53769cf4c116905 Author: Dmytro Laktyushkin Date: Mon Apr 24 15:20:24 2017 -0400 drm/amd/display: dce120 to dce ipp refactor Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_ipp.c | 252 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_ipp.h | 226 ++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 2 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_ipp.h | 2 +- .../drm/amd/display/dc/dce110/dce110_ipp_gamma.c | 4 +- drivers/gpu/drm/amd/display/dc/dce120/Makefile | 1 - drivers/gpu/drm/amd/display/dc/dce120/dce120_ipp.c | 58 ----- drivers/gpu/drm/amd/display/dc/dce120/dce120_ipp.h | 62 ----- .../drm/amd/display/dc/dce120/dce120_ipp_cursor.c | 193 ---------------- .../drm/amd/display/dc/dce120/dce120_ipp_gamma.c | 167 -------------- .../drm/amd/display/dc/dce120/dce120_resource.c | 69 +++--- drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 3 + drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h | 5 +- 14 files changed, 521 insertions(+), 525 deletions(-) commit 50db413d557c39de9a976e2c9826d4e86e721c7c Author: Tony Cheng Date: Sun Apr 23 23:33:26 2017 -0400 drm/amd/display: clarify delay param for REG_WAIT Signed-off-by: Tony Cheng Acked-by: Harry Wentland Reviewed-by: Dmytro Laktyushkin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/inc/reg_helper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e91b57334a4ef9355ffa397d767e8c3a2c690f22 Author: Tony Cheng Date: Sun Apr 23 10:46:02 2017 -0400 drm/amd/display: move tg_color to dc_hw_types Signed-off-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 12 ++++++------ drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h | 12 ------------ 2 files changed, 6 insertions(+), 18 deletions(-) commit 94267b3df7ee00f21fa0ff7d618ca7e0574db5ed Author: Sylvia Tsai Date: Fri Apr 21 15:29:55 2017 -0400 drm/amd/display: PSR Refactor - Refacotr PSR to follow correct module pattern - fix eDP only working on sink index 0. Signed-off-by: Sylvia Tsai Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 74 +++++++++------------- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 22 +++---- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 53 +--------------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 17 +++-- drivers/gpu/drm/amd/display/dc/dc_types.h | 24 +++---- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 18 +++++- .../display/dc/dce110/dce110_timing_generator.c | 16 ----- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 1 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 2 +- .../drm/amd/display/modules/freesync/freesync.c | 14 +++- 11 files changed, 93 insertions(+), 150 deletions(-) commit d27383a2b5719be60ac86deae30e89755f868a07 Author: Zeyu Fan Date: Fri Apr 21 10:55:01 2017 -0400 drm/amd/display: Make dc_link param const in set_drive_settings Signed-off-by: Zeyu Fan Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit beb16b6a0f921f66472e4946a4955f07942fa9d8 Author: Dmytro Laktyushkin Date: Fri Apr 21 09:34:09 2017 -0400 drm/amd/display: improve cursor programming reliability This change will cache cursor attributes and reprogram them when enabling cursor after power gating if the attributes were not yet reprogrammed Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 55 ++++++++++------------ drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_ipp.h | 2 +- .../drm/amd/display/dc/dce110/dce110_ipp_cursor.c | 4 +- drivers/gpu/drm/amd/display/dc/dce120/dce120_ipp.h | 2 +- .../drm/amd/display/dc/dce120/dce120_ipp_cursor.c | 4 +- drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h | 4 +- 7 files changed, 32 insertions(+), 41 deletions(-) commit 03f5c686c3900f74853539cdebe4c25190106402 Author: Charlene Liu Date: Fri Apr 21 17:15:40 2017 -0400 drm/amd/display: USB-c DP-HDMI dongle shows garbage on Sony TV Signed-off-by: Charlene Liu Acked-by: Harry Wentland Reviewed-by: Charlene Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 21 ++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 8 ++++++-- drivers/gpu/drm/amd/display/dc/dc_types.h | 20 ++++++++++++++++++++ 4 files changed, 47 insertions(+), 4 deletions(-) commit 6c626ffb1bfa2705e71376fe20bcdc6b89aace85 Author: Yongqiang Sun Date: Fri Apr 21 11:00:43 2017 -0400 drm/amd/display: Make sure v_total_min and max not less than v_total. Signed-off-by: Yongqiang Sun Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c | 4 ++-- .../gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c | 4 ++-- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 12 ++++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) commit 15350179f2fc3c3b28774b4abcd35c45a5449052 Author: Amy Zhang Date: Tue Apr 18 17:43:09 2017 -0400 drm/amd/display: always retrieve PSR cap Signed-off-by: Amy Zhang Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit de37e273df49dd015f6c308668f223327f6cf8fc Author: Dmytro Laktyushkin Date: Tue Apr 18 17:31:46 2017 -0400 drm/amd/display: fix memory leak Signed-off-by: Dmytro Laktyushkin Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit d4e745e3dbf43ad14759615d0236f6378db1ad4a Author: Yongqiang Sun Date: Tue Apr 18 15:35:27 2017 -0400 drm/amd/display: set correct v_total_min and v_total_max for dce. Signed-off-by: Yongqiang Sun Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 974db151d48b6793fc2b708d1c3f9ceee735fc5a Author: Dmytro Laktyushkin Date: Tue Apr 18 16:51:39 2017 -0400 drm/amd/display: remove unnecessary allocation for regamma_params inside opp Signed-off-by: Dmytro Laktyushkin Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 10 +--------- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 6 +++--- drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_v.c | 4 ---- drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 2 +- 4 files changed, 5 insertions(+), 17 deletions(-) commit 50f27269b8dd81d73c787dd18ba19a08bec128d3 Author: Harry Wentland Date: Tue Apr 18 15:43:22 2017 -0400 drm/amd/display: Fix memory leak in post_update_surfaces Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 89aed24c180be9be215923136faebcda0aa344a1 Author: Zeyu Fan Date: Mon Apr 17 19:02:19 2017 -0400 drm/amd/display: Block YCbCr formats for eDP. Revert previous change. Signed-off-by: Zeyu Fan Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0430d52b7680fd093c0db8cf41e6ee1d58bae96e Author: Shirish S Date: Wed Apr 12 16:23:25 2017 +0530 drm/amd/display: make dc_commit_surfaces_to_stream() re-entrant dc_commit_surfaces_to_stream() function currently is handle's only one plane at a time. This will not work if multiple planes have to be set to a crtc. The functionality of dc_commit_surfaces_to_stream() with this patch is slit into 1. Accumulate and initialise all the surfaces that needs to be set to a crtc. 2. Update the intialised set of surfaces to the steam in one go. Hence dc_commit_surfaces_to_stream() is renamed to init_surfaces(). Once all the planes requested by user space are initialised, dc_commit_surfaces_to_stream() shall sequentially populates *updates, *flip_addr, *plane_info and *scaling_info for all surfaces. BUG: SWDEV-119421 TEST: (On Chromium OS for Stoney Only) * Chromium UI comes up, on both eDP & DP. * 'new_surface_count' now changes as per user input for e.g for all below run tests its 2, without this patch for the below tests it used to be 1 * Executed below tests to see YUV(underlay) & RGB planes on eDP plane_test --format XR24 --size 500x100 -p --format YV12 --size 500x500 plane_test --format AR24 --size 500x50 -p --format YV12 --size 150x150 plane_test --format AR24 --size 500x50 -p --format YV12 --size 1366x768 Signed-off-by: Harry Wentland Signed-off-by: Shirish S Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 71 ++++++++++++++-------- 1 file changed, 44 insertions(+), 27 deletions(-) commit 110ff5439a3e1d19acf02ec5b819e6802c4b8b83 Author: Shirish S Date: Tue Apr 25 12:26:57 2017 +0530 drm/amd/display: update the YUV plane offsets This patch updates the planes default offsets to the appropriate ones, and aligns the pitch to 64 bits. BUG=SWDEV-119421 TEST=Boots to UI on jadeite TEST= plane_test --format AR24 --size 500x50 -p --format YV12 --size 500x500 plane_test --format AR24 --size 500x50 -p --format YV12 --size 1280x720 plane_test --format AR24 --size 500x50 -p --format YV12 --size 1366x768 Signed-off-by: Shirish S Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit e6fbd5df0e4e1cf644ddfd50d1df27e5e4ad2220 Author: Shirish S Date: Wed Apr 26 22:36:01 2017 -0400 drm/amd/display: initialize YUV plane capabilities This patch populates the YUV surface configurations. Tests: (On Chromium OS for Stoney Only) builds without any errors. Signed-off-by: Shirish S Reviewed-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 62 ++++++++++++++++------ 1 file changed, 45 insertions(+), 17 deletions(-) commit 07d72b39bc861b644ea8f6037e0c6a9836050306 Author: Harry Wentland Date: Wed Mar 29 11:22:05 2017 -0400 drm/amd/display: Return context from validate_context This will allow us to carry it from check to commit Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 26 +++++++++++----- drivers/gpu/drm/amd/display/dc/core/dc.c | 36 +++++++++++++++++----- drivers/gpu/drm/amd/display/dc/dc.h | 5 +++ 3 files changed, 52 insertions(+), 15 deletions(-) commit 8122a253b34aec75a1fdc3fe61c97b9026a0bff6 Author: Harry Wentland Date: Wed Mar 29 11:15:14 2017 -0400 drm/amd/display: Move resource_validate_ctx_destruct to dc.h This will be needed to clean up context once we add it to private atomic state. Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 22 +++++++++++----------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dc.h | 6 ++++++ drivers/gpu/drm/amd/display/dc/inc/resource.h | 6 ------ 4 files changed, 19 insertions(+), 19 deletions(-) commit 927f6eff2aa40e73528619818374c271ddfadd3d Author: Harry Wentland Date: Thu Apr 6 18:57:05 2017 -0400 drm/amd/display: Copy ctx to current_context instead of assign Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 129eed72823d25fa57aaf64a1cef6488fd21d0cd Author: Harry Wentland Date: Thu Apr 6 16:22:33 2017 -0400 drm/amd/display: pull commit_surfaces out of atomic_commit into helper function This should make things simpler when we try to rework this later when we pass validate_context from atomic_check to atomic_commit. Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 113 +++++++++++---------- 1 file changed, 62 insertions(+), 51 deletions(-) commit 2180e7cca4d5b93b9f150a83d83e27b7fb82a72f Author: Dmytro Laktyushkin Date: Mon Apr 17 11:39:19 2017 -0400 drm/amd/display: update dce8 & 10 bw programming Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Jordan Lazare Signed-off-by: Alex Deucher .../amd/display/dc/dce100/dce100_hw_sequencer.c | 28 +++++++++++----------- .../amd/display/dc/dce100/dce100_hw_sequencer.h | 7 +++--- .../drm/amd/display/dc/dce100/dce100_resource.c | 1 + .../amd/display/dc/dce110/dce110_hw_sequencer.c | 3 +-- .../drm/amd/display/dc/dce80/dce80_hw_sequencer.c | 19 +-------------- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 4 ---- 6 files changed, 21 insertions(+), 41 deletions(-) commit 6d9501e4ad2df6fc631e99d3cfd2afa09542393a Author: Harry Wentland Date: Thu Apr 6 17:05:53 2017 -0400 drm/amd/display: Get rid of temp_flip_context If we need to update our context we can allocate memory. No need to keep temporary memory for this. Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 26 +++++++++++++------------- drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 1 - 2 files changed, 13 insertions(+), 14 deletions(-) commit 03e4173b44d514818c98555bc709a931ff9300ce Author: Harry Wentland Date: Thu Apr 6 16:48:48 2017 -0400 drm/amd/display: Remove unused scratch_val_ctx Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 3 --- drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 1 - 2 files changed, 4 deletions(-) commit 09e2d07f9d4d30f7d219b562d656d7c7611e2b65 Author: Eric Cook Date: Wed Apr 12 11:05:08 2017 -0400 drm/amd/display: FreeSync LFC MIN/MAX update on current frame - Update BTR/LFC logic so that V_TOTAL_MIN/MAX will take affect on current frame - Add in FreeSync update to MPO code path Signed-off-by: Eric Cook Acked-by: Harry Wentland Reviewed-by: Anthony Koo Signed-off-by: Alex Deucher .../drm/amd/display/modules/freesync/freesync.c | 67 +++++++++++++--------- 1 file changed, 39 insertions(+), 28 deletions(-) commit ab3c179893fd44953008d1b1442973ecb1bb5c7e Author: Vitaly Prosyak Date: Fri Mar 31 15:25:04 2017 -0500 drm/amd/display: Add support for programming stereo sync Signed-off-by: Vitaly Prosyak Acked-by: Harry Wentland Reviewed-by: Charlene Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_opp.h | 11 ++++++++--- drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 12 ++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h | 14 ++++++++++++-- .../gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 7 +++++++ drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 5 +++++ drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 5 +++++ 6 files changed, 49 insertions(+), 5 deletions(-) commit 81c509633aa93442d58b895f773892b3e8d936cf Author: Sylvia Tsai Date: Tue Apr 11 15:15:28 2017 -0400 drm/amd/display: Parse scanline registers They could differ between ASIC generations Signed-off-by: Sylvia Tsai Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 +++++- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 21 ++++++--- drivers/gpu/drm/amd/display/dc/dc.h | 7 ++- .../display/dc/dce110/dce110_timing_generator.c | 54 ++++++++++------------ .../display/dc/dce110/dce110_timing_generator.h | 8 ++-- .../display/dc/dce120/dce120_timing_generator.c | 42 ++++++++--------- .../drm/amd/display/dc/inc/hw/timing_generator.h | 8 ++-- 7 files changed, 89 insertions(+), 66 deletions(-) commit 1ce71fcd5dddf4a3198a96e422122edc210847e9 Author: Charlene Liu Date: Tue Apr 11 22:24:44 2017 -0400 drm/amd/display: use full surface update when stream is NULL Signed-off-by: Charlene Liu Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 209a885be018435a062403a08063672c9d77d8d1 Author: Jordan Lazare Date: Tue Apr 11 11:40:18 2017 -0400 drm/amd/display: Fix missing irq refactor causing potential i2c race Signed-off-by: Jordan Lazare Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 07c84c7ad388c28ce69303182e06644ef30d3ac3 Author: Ding Wang Date: Mon Apr 10 14:02:23 2017 -0400 drm/amd/display: Fix for tile MST - Set stream signal type to be SST when setting non-tile timing on MST tiled display. - Disable MST on sink after disabling MST link. - Enable MST on sink before enabling MST link. Signed-off-by: Ding Wang Acked-by: Harry Wentland Reviewed-by: Jun Lei Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +++ drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 13 +++++++++++++ drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 3 +++ drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 2 ++ 4 files changed, 21 insertions(+) commit b64875feb18a734739929e2af8a625b186bb6ec0 Author: Leon Elazar Date: Mon Apr 10 09:37:11 2017 -0400 drm/amd/display: set NULL value during removal for remoteSink In MST case during removal of remote sink its descriptor pointer wasn't freed corectly. Signed-off-by: Leon Elazar Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb9611d2167d73b7a7af66edb30893d22de9382d Author: Yongqiang Sun Date: Thu Apr 6 16:23:14 2017 -0400 drm/amd/display: change mpo surface update check condition. Signed-off-by: Yongqiang Sun Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 313bf4ff0180107b687dbd10dde8fd021247cd37 Author: Yongqiang Sun Date: Thu Apr 6 16:21:58 2017 -0400 drm/amd/display: Add same check as reset pipes for programing backend regs. Signed-off-by: Yongqiang Sun Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 ++++ 1 file changed, 4 insertions(+) commit 8b32076c27227cf5bed0c925c7a1a9680748424a Author: Sylvia Tsai Date: Tue Apr 4 17:28:17 2017 -0400 drm/amd/display: Adding dm controlled signal type in dc_stream - Adding dm controlled signal type in dc_stream - Adding fallback to dvi signal when output signal is hdmi and the connector type is not Signed-off-by: Sylvia Tsai Acked-by: Harry Wentland Reviewed-by: Sylvia Tsai Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 30 +++++++++++------------ drivers/gpu/drm/amd/display/dc/dc.h | 1 + 2 files changed, 16 insertions(+), 15 deletions(-) commit 6e5d1c829ba6a53bdd0f18a872a5178e9620ecab Author: Leon Elazar Date: Tue Apr 4 10:01:07 2017 -0400 drm/amd/display: Memory was freed twice during disable 1. get_ss_info_from_atombios function was allocating the memory populating the provided pointer but them freeing the memory. Since the pointer was return as a valid value, we are trying to free the same memory during clock resource destruction Signed-off-by: Leon Elazar Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 1 - 1 file changed, 1 deletion(-) commit 632550d71fcf78d495cfd1d321427e634b662f23 Author: Zeyu Fan Date: Mon Apr 3 11:54:11 2017 -0400 drm/amd/display: Fix hotspot programming during set cursor position. - Remove x,y hotspot from dc_cursor_attributes. Only program it through setPosition. Signed-off-by: Zeyu Fan Acked-by: Harry Wentland Reviewed-by: Zeyu Fan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 5 ----- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 7 ------- drivers/gpu/drm/amd/display/dc/dce110/dce110_ipp_cursor.c | 11 ++++------- drivers/gpu/drm/amd/display/dc/dce120/dce120_ipp_cursor.c | 15 ++++----------- 4 files changed, 8 insertions(+), 30 deletions(-) commit 035e0fe5485fc1881a3c24eaac86832d804242e9 Author: Charlene Liu Date: Fri Mar 31 17:40:15 2017 -0400 drm/amd/display: adding FCLK and DPPCLK clock types Signed-off-by: Charlene Liu Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dm_services_types.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 00d7930c5189a439ea4f3c1af071beb3134856d6 Author: Mario Kleiner Date: Mon Apr 24 18:54:20 2017 +0200 drm/amd/display: Prevent premature pageflip when comitting in vblank. (v3) Make sure we do not program a hw pageflip inside vblank 'n' iff the atomic flip is comitted while inside the same vblank 'n'. We must defer such a flip by one refresh cycle to vblank 'n+1', unless this is a DRM_MODE_PAGE_FLIP_ASYNC async pageflip, which must always execute as soon as possible. Without this, pageflips programmed via X11 GLX_OML_sync_control extensions glXSwapBuffersMscOML(..., target_msc, ...); call and/or via DRI3/Present PresentPixmap(..., target_msc, ...); request will complete one vblank too early whenever target_msc > current_msc + 1, ie. more than 1 vblank in the future. In such a case, the call of the pageflip ioctl() would be triggered by a queued drmWaitVblank() vblank event, which itself gets dispatched inside the vblank one frame before the target_msc vblank. Testing with this patch does no longer show any problems with OML_sync_control swap scheduling or flip completion timestamps. Tested on R9 380 Tonga. v2: Add acked/r-b by Harry and Michel. v3: Feedback from Andrey: Must not wait an extra frame for DRM_MODE_PAGE_FLIP_ASYNC flips. Signed-off-by: Mario Kleiner Acked-by: Harry Wentland (v1) Reviewed-by: Michel Dänzer Reviewed-by: Andrey Grodzovsky Cc: Harry Wentland Cc: Alex Deucher Cc: Michel Dänzer Signed-off-by: Alex Deucher .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 753c66c91b5430816eedb67138017fd4e2143d52 Author: Mario Kleiner Date: Mon Apr 24 11:46:44 2017 +0200 drm/amd/display: Fix race between vblank irq and pageflip irq. (v2) Since DC now uses CRTC_VERTICAL_INTERRUPT0 as VBLANK irq trigger and vblank interrupts actually happen earliest at start of vblank, instead of a bit before vblank, we no longer need some of the fudging logic to deal with too early vblank irq handling (grep for lb_vblank_lead_lines). This itself fixes a pageflip scheduling bug in DC, caused by uninitialized use of lb_vblank_lead_lines, with a wrong startup value of 0. Thanks to the new vblank irq trigger this value of zero is now actually correct for DC :). A new problem is that vblank irq's race against pflip irq's, and as both can fire at first line of vblank, it is no longer guaranteed that vblank irq handling (therefore -> drm_handle_vblank() -> drm_update_vblank_count()) executes before pflip irq handling for a given vblank interval when a pageflip completes. Therefore the vblank count and timestamps emitted to user-space as part of the pageflip completion event will be often stale and cause new timestamping and swap scheduling errors in user-space. This was observed with large frequency on R9 380 Tonga Pro. Fix this by enforcing a vblank count+timestamp update right before emitting the pageflip completion event from the pflip irq handler. The logic in core drm_update_vblank_count() makes sure that no redundant or conflicting updates happen, iow. the call turns into a no-op if it wasn't needed for that vblank, burning a few microseconds of cpu time though. Successfully tested on AMD R9 380 "Tonga Pro" (VI/DCE 10) with DC enabled on the current DC staging branch. Independent measurement of pageflip completion timing with special hardware measurement equipment now confirms correct pageflip timestamps and counts in the pageflip completion events. v2: Review comments by Michel, drop outdated paragraph about problem already fixed in 2nd patch of the series. Add acked/r-b by Harry and Michel. Signed-off-by: Mario Kleiner Acked-by: Harry Wentland (v1) Reviewed-by: Michel Dänzer Cc: Andrey Grodzovsky Cc: Alex Deucher Cc: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+) commit 32a1892a86a8f40c6f24807a9a0da31a322e4874 Author: Pratik Vishwakarma Date: Thu Apr 6 13:18:20 2017 +0530 drm/amd/display: get_atomic_property missing for drm_connector_funcs DRM_IOCTL_MODE_GETCONNECTOR fails with EINVAL on enabling DRIVER_ATOMIC With this DRM_IOCTL_MODE_GETCONNECTOR returns all the connector properties. freesync_property and freesync_capable_property return 0 currently. TESTS(On Chromium OS on Stoney Only) * Builds without compilation errors. * 'atomictest' proceeds after applying patch and fails with vblank event timed out. * Chromium OS ui comes up. Signed-off-by: Pratik Vishwakarma Reviewed-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 81 ++++++++++++---------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 6 ++ 2 files changed, 49 insertions(+), 38 deletions(-) commit 664a2ed115f62422475a783e6db453483a316a80 Author: Harry Wentland Date: Fri Jan 27 10:55:20 2017 -0500 drm/amd/display: Fallback on legacy properties in atomic_get_properties We still rely on legacy properties. Fallback on legacy properties until we get to pull these into some atomic state. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 40 +++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) commit 7df498fa4c241610ee22cfcfa648628d2ef908fd Author: Harry Wentland Date: Mon Apr 10 15:37:32 2017 -0400 drm/amd/display: Allow planes on all crtcs 4.9 kernel will always add the assigned crtc to possible_crtcs on a plane. This is no longer the case on newer kernels. Make sure we allow any plane on any crtc. Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f43fd6297c478995b6a9e61482272137ec36260 Author: Alex Deucher Date: Thu Jun 15 16:25:11 2017 -0400 drm/amd/display: fix nullptr on vega initialization Signed-off-by: Jordan Lazare Reviewed-by: Tony Cheng Reviewed-by: Roman Li Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + 1 file changed, 1 insertion(+) commit 9faa423716b17b0c9ba92fd12737968de6918d88 Author: Andrey Grodzovsky Date: Fri Mar 31 14:15:31 2017 -0400 drm/amd/display: Fix s3 hang on resume. Avoid enabling CRTC_VERTICAL_INTERRUPT0 twice on resume. It's enabled once from within manage_dm_interrupts in mode set and another explicitly from amdgpu_dm_irq_resume_late. Seems it lead to CRTC hang. Signed-off-by: Andrey Grodzovsky Acked-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 16 +++++++++++----- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.h | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) commit 7160c74cd00bc0a5f143c24096e1a45c51f3d202 Author: Jordan Lazare Date: Fri Mar 31 17:14:20 2017 -0400 drm/amd/display: Log clock source in error condition Signed-off-by: Jordan Lazare Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dd3f348f0013f2cb2508f72adb35285a34b2baf7 Author: Yongqiang Sun Date: Fri Mar 31 13:53:42 2017 -0400 drm/amd/display: Ignore visible flag when check surface update type. Signed-off-by: Yongqiang Sun Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 28f72454320d2084cc082c8509135bdfd4012c10 Author: Jordan Lazare Date: Thu Mar 30 13:08:34 2017 -0400 drm/amd/display: Fill in vrefresh and min_vblank_time for dce8/dce10 PPLib is now calling into DC to get vrefresh and min_vblank_time, but since full bandwidth calcs are missing for those generations, the pplib structures were never being filled. This change fills the currently required fields to prevent screen corruption. Signed-off-by: Jordan Lazare Acked-by: Harry Wentland Reviewed-by: Jordan Lazare Signed-off-by: Alex Deucher .../drm/amd/display/dc/dce100/dce100_hw_sequencer.c | 21 +++++++++++++++++++++ .../drm/amd/display/dc/dce100/dce100_hw_sequencer.h | 5 +++++ .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 8 ++++---- .../drm/amd/display/dc/dce110/dce110_hw_sequencer.h | 8 ++++++++ .../drm/amd/display/dc/dce80/dce80_hw_sequencer.c | 2 ++ 5 files changed, 40 insertions(+), 4 deletions(-) commit 6848e9896b9c9a26a44ac6764ca4bb7351ae573e Author: Amy Zhang Date: Thu Mar 30 11:39:47 2017 -0400 drm/amd/display: PSR Aux Channel and Static Screen Support Fix - Correct the aux channel selection according to DAL3 Signed-off-by: Amy Zhang Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 -- 1 file changed, 2 deletions(-) commit 7c7f5b15be6528b33d825ead6acb739d7d061a2e Author: Andrey Grodzovsky Date: Tue Mar 28 16:57:52 2017 -0400 drm/amd/display: Refactor edid read. Allow Linux to use DRM provided EDID read functioality by moving DAL edid implementation to module hence removing this code from DC by this cleaning up DC code for upstream. v2: Removing ddc_service. No more need for it. Signed-off-by: Andrey Grodzovsky Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 47 +++ .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 47 ++- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.h | 2 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 10 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 78 +++-- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 53 +--- drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 337 +-------------------- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 30 +- drivers/gpu/drm/amd/display/dc/dc.h | 21 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 6 + drivers/gpu/drm/amd/display/dc/dm_helpers.h | 10 + drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c | 9 +- drivers/gpu/drm/amd/display/dc/inc/dc_link_ddc.h | 38 ++- .../drm/amd/display/include/ddc_service_types.h | 28 -- .../gpu/drm/amd/display/include/i2caux_interface.h | 3 + 15 files changed, 254 insertions(+), 465 deletions(-) commit bb01672c79649de08fe335b55aea5315d781c443 Author: Andrey Grodzovsky Date: Sat Mar 4 20:56:46 2017 -0500 drm/amd/display: Fix i2c write flag. I2C_M_RD was translated to write instead of read. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5c4e9806435d7da665af08b3071446b9617eb9cb Author: Andrey Grodzovsky Date: Tue Feb 14 15:47:24 2017 -0500 drm/amd/display: Remove get_connector_for_sink. Keep 1:1 relation between MST sink and it's MST connector. Signed-off-by: Andrey Grodzovsky Reviewed-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 27 +++------------------- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 7 +++++- drivers/gpu/drm/amd/display/dc/dc.h | 1 + 3 files changed, 10 insertions(+), 25 deletions(-) commit 9fb8de78ed01453ccc696a9f18cbfe41c60fd433 Author: Andrey Grodzovsky Date: Tue Feb 14 13:50:17 2017 -0500 drm/amd/display: Remove get_connector_for_link. We can keep a 1:1 relation between a link and a physical connector and hence skip the iteration. This function is used in context of only physical connetors. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 36 +++------------------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 1 + drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ 3 files changed, 8 insertions(+), 31 deletions(-) commit dff06ddd7f0d322a046fd4a34dec589fbb97adef Author: Dmytro Laktyushkin Date: Wed Mar 29 16:24:19 2017 -0400 drm/amd/display: fix dce_calc surface pitch setting for non underlay pipes Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bddd696ddd437ce15d278b2a5318ef44d3c171cd Author: Zeyu Fan Date: Wed Mar 29 17:21:56 2017 -0400 drm/amd/display: Temporary disable PSR for HBR2 & HBR3 Signed-off-by: Zeyu Fan Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e8d726b71c55fb5c20fcf76bdea93c148a4b11e5 Author: Reza Amini Date: Wed Mar 29 12:05:15 2017 -0400 drm/amd/display: refactor member referencing to improve readability Signed-off-by: Reza Amini Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 107 ++++++++-------------- 1 file changed, 39 insertions(+), 68 deletions(-) commit 934d292316b5d3933d7fe6811c5d7a696c33910c Author: Reza Amini Date: Fri Mar 17 15:24:09 2017 -0400 drm/amd/display: remove surface validation against stream rect Surface information is by default copied from old context in dc_commit_stream. Thus unchange streams will not be affected. For new streams, we shouldn't validate the new mode against the surface configuration of old_context. Signed-off-by: Reza Amini Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 5 ----- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 5 ----- drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 5 ----- drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 5 ----- 4 files changed, 20 deletions(-) commit 64d8b7806e40a1520d5eb47157ff4ee15efc3bf6 Author: Shirish S Date: Thu Mar 23 14:54:40 2017 +0530 drm/amd/display: update plane functionalities This patch introduces amdgpu_drm_plane_state structure, which subclasses drm_plane_state and holds data suitable for configuring hardware. It switches reset(), atomic_duplicate_state() & atomic_destroy_state() functions to new internal implementation, earlier they were pointing to drm core functions. TESTS(On Chromium OS on Stoney Only) * Builds without compilation errors. * 'plane_test' passes for XR24 format based Overlay plane. * Chromium OS ui comes up. Signed-off-by: Shirish S Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 13 ++++++ .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 54 ++++++++++++++++++++-- 2 files changed, 62 insertions(+), 5 deletions(-) commit f2a0f5e6b23d6649577081df3762e41abee04691 Author: Harry Wentland Date: Mon Apr 3 13:36:26 2017 -0400 drm/amd/display: Fix cleanup in amdgpu_dm_initialize_drm_device Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit d4e13b0db124345be93bc2ff39ecb48409da2c9b Author: Alex Deucher Date: Thu Jun 15 16:24:01 2017 -0400 drm/amd/display: decouple per-crtc-plane model Current design has per-crtc-plane model. As a result, for asic's that support underlay, are unable to expose it to user space for modesetting. To enable this, the drm driver intialisation now runs for number of surfaces instead of stream/crtc. This patch plumbs surface capabilities to drm framework so that it can be effectively used by user space. Tests: (On Chromium OS for Stoney Only) * 'modetest -p' now shows additional plane with YUV capabilities in case of CZ and ST. * 'plane_test' fails with below error: [drm:amdgpu_dm_connector_atomic_set_property [amdgpu]] *ERROR* Unsupported screen depth 0 as ther is no support for YUYV * Checked multimonitor display works fine Signed-off-by: Shirish S Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 8 +++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 67 ++++++++++++++----- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 76 +++++++++++++++------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 5 +- drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../drm/amd/display/dc/dce100/dce100_resource.c | 2 + .../drm/amd/display/dc/dce110/dce110_resource.c | 2 + .../drm/amd/display/dc/dce112/dce112_resource.c | 2 + .../drm/amd/display/dc/dce120/dce120_resource.c | 2 + .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 2 + 10 files changed, 127 insertions(+), 40 deletions(-) commit 4e3133c79dc4b7dc0ff81eb884d6cfe736fc49b1 Author: Ding Wang Date: Mon Mar 27 14:50:27 2017 -0400 drm/amd/display: obtain usHBR3En bit from BP 1 ASICs using bios parser 1 don't check HBR3 capability as there is no such a bit usHBR3En in ATOM_ENCODER_CAP_RECORDER. Therefore, will use ATOM_ENCODER_CAP_RECORDER_V2 and thus obtain the usHBR3En bit. Signed-off-by: Ding Wang Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 14 +++++++------- drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) commit 7b779c991d9422f677dff70d701eae448c7c696a Author: Vitaly Prosyak Date: Mon Mar 27 12:48:46 2017 -0500 drm/amd/display: stereo support Frame sequential, top-bottom and side-by-side support. Signed-off-by: Vitaly Prosyak Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 34 +++++++++++++++++------ 1 file changed, 26 insertions(+), 8 deletions(-) commit fcbb5ad3fef1ee8461150e7213806cbb46b6f076 Author: Tony Cheng Date: Mon Mar 27 12:39:22 2017 -0400 drm/amd/display: use CP2520-3 for PHY compliance automation Signed-off-by: Tony Cheng Acked-by: Harry Wentland Reviewed-by: Hersen Wu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 3 +++ drivers/gpu/drm/amd/display/include/link_service_types.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit dabb3979e1cdfddbc9121116cfcf69f01991e51d Author: Yongqiang Sun Date: Mon Mar 27 09:59:38 2017 -0400 drm/amd/display: Fix MPO exit and cursor issue. Signed-off-by: Yongqiang Sun Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 5 ++++- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) commit 940c654e64e1ed70b49ec663f2370a8b4de6d2ac Author: Roman Li Date: Fri Mar 24 16:26:09 2017 -0400 drm/amd/display: increase timeout for dmif dealloc In some use-cases, e.g. multiple 4K displays, exisitng wait time for reg update of 30msec timed out during mode setiing that sometimes resulted in system bad state as we continue without waiting for registry update complete. Increasing timeout to 35msec fixes that problem. Signed-off-by: Roman Li Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fd8cc371ede63d69cf69bb3a8a9a005d91ae023f Author: Charlene Liu Date: Fri Mar 24 16:54:02 2017 -0400 drm/amd/display: voltage request related change Signed-off-by: Charlene Liu Acked-by: Harry Wentland Reviewed-by: Krunoslav Kovac Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 1 + drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 27 +++++++++++----------- .../gpu/drm/amd/display/dc/inc/hw/display_clock.h | 2 ++ drivers/gpu/drm/amd/display/include/logger_types.h | 1 + 4 files changed, 18 insertions(+), 13 deletions(-) commit e902915507bd20115e1e21bc99ea36ea7986cebc Author: Andrey Grodzovsky Date: Thu Mar 23 15:30:35 2017 -0400 drm/amd/display: use CRTC_VERTICAL_INTERRUPT0 as a trigger for VBLANK. Register ISR hnadler on the new interrupt. Signed-off-by: Andrey Grodzovsky Acked-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 667e1498a9d0e43849fa84c1c6874184b33aee5f Author: Andrey Grodzovsky Date: Thu Mar 23 15:27:15 2017 -0400 drm/amd/display: use CRTC_VERTICAL_INTERRUPT0 as VBLANK trigger. VBLANK interrupt is driven bu line buffer vcounter which is ahead of CRTC vcounter. Use an interrupt that fires at the actual CRTC vblank start boundry. Signed-off-by: Andrey Grodzovsky Acked-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher .../display/dc/dce110/dce110_timing_generator.c | 46 ++++++++++++++- .../display/dc/dce110/dce110_timing_generator.h | 3 + .../display/dc/dce120/dce120_timing_generator.c | 32 +++++++++- .../amd/display/dc/dce80/dce80_timing_generator.c | 1 + .../drm/amd/display/dc/inc/hw/timing_generator.h | 2 + .../amd/display/dc/irq/dce110/irq_service_dce110.c | 68 +++++++++++++++------- .../amd/display/dc/irq/dce110/irq_service_dce110.h | 5 ++ .../amd/display/dc/irq/dce120/irq_service_dce120.c | 11 ++-- .../amd/display/dc/irq/dce80/irq_service_dce80.c | 22 ++++--- 9 files changed, 152 insertions(+), 38 deletions(-) commit 5e141de45218d36a6b98c783834684fd0d617f7a Author: Harry Wentland Date: Tue Mar 21 18:17:12 2017 -0400 drm/amd/display: Rename bandwidth_calcs.h to dce_calcs.h Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- .../drm/amd/display/dc/dce110/dce110_mem_input_v.c | 2 +- .../gpu/drm/amd/display/dc/dce80/dce80_mem_input.c | 2 +- .../gpu/drm/amd/display/dc/inc/bandwidth_calcs.h | 504 -------------------- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/dce_calcs.h | 506 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 2 +- 8 files changed, 512 insertions(+), 510 deletions(-) commit 18f7a1e4083a5be0ce02df736d3f9a82246dd89b Author: Yongqiang Sun Date: Thu Mar 23 10:34:06 2017 -0400 drm/amd/display: Power on front end during set mode. Signed-off-by: Yongqiang Sun Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 +++ drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 5 +++++ 2 files changed, 8 insertions(+) commit 8c8953139c4b8e1be14d0b1a53dc1fd607727b59 Author: xhdu Date: Tue Mar 21 11:05:32 2017 -0400 drm/amd/display: Add audio/video ContainerId implementation Leave hardcoded if no ContainerId provided by DM. Signed-off-by: Duke Du Acked-by: Harry Wentland Reviewed-by: Charlene Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 39 ++++++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 14 +++++++-- drivers/gpu/drm/amd/display/dc/dc.h | 14 +++++++++ 3 files changed, 63 insertions(+), 4 deletions(-) commit 3c8c9d6cd1f9c1d6ce53091a0b41fcf2ffc7e16f Author: Charlene Liu Date: Tue Mar 21 15:16:04 2017 -0400 drm/amd/display: using calculated values for VReady/Startup Signed-off-by: Charlene Liu Acked-by: Harry Wentland Reviewed-by: Dmytro Laktyushkin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 9 +++++++++ drivers/gpu/drm/amd/display/dc/dm_services_types.h | 2 ++ drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h | 1 - drivers/gpu/drm/amd/display/include/logger_types.h | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) commit 2fc67983fbc56b7b6bba64d4410e3bfeee467834 Author: Charlene Liu Date: Mon Mar 20 14:49:53 2017 -0400 drm/amd/display: remove redundant check Signed-off-by: Charlene Liu Acked-by: Harry Wentland Reviewed-by: Charlene Liu Reviewed-by: Anthony Koo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ---- 1 file changed, 4 deletions(-) commit 7e2fe3190dc2eb62d84069f18cbf3fbabf79ded7 Author: Charlene Liu Date: Fri Mar 17 13:09:09 2017 -0400 drm/amd/display: DP is hotplugged, HDMI with 4:2:0 corruption Signed-off-by: Charlene Liu Acked-by: Harry Wentland Reviewed-by: Charlene Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 00f02019990d9020321c446a04044b6ca05d20f8 Author: Leon Elazar Date: Fri Mar 17 12:02:58 2017 -0400 drm/amd/display: Fix applying surface to underlay pipe 1. Locking all pipes before doing any changes 2. Applying surface for both top and bottom pipes Signed-off-by: Leon Elazar Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 34 +++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 12 deletions(-) commit 0702a01f97ec24b20bf20bf6f36250de08bcc8cb Author: Andrey Grodzovsky Date: Wed Feb 22 14:23:51 2017 -0500 drm/amd/display: Set cursor pitch to cursor width (in pixels). Signed-off-by: Andrey Grodzovsky Reviewed-by: Jordan Lazare Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 2 ++ 1 file changed, 2 insertions(+) commit ce75805e0a63843af71a07e7e95443866e118af0 Author: Andrey Grodzovsky Date: Wed Feb 22 14:24:11 2017 -0500 drm/amd/display: Unhardcode cursor size reported back to UMD. This will return back MAX cursor size for given ASIC. Signed-off-by: Andrey Grodzovsky Reviewed-by: Jordan Lazare Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1034934584cf3e2f93da56cc00d6f1ffe2d2d5a9 Author: Andrey Grodzovsky Date: Wed Feb 22 15:31:47 2017 -0500 drm/amd/display: Unhardcode acrtc->max_cursor_{height,width} Signed-off-by: Andrey Grodzovsky Reviewed-by: Jordan Lazare Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d092bf65851802593ed331ff5a6309b625f36bea Author: Andrey Grodzovsky Date: Wed Feb 8 15:58:50 2017 -0500 drm/amd/display: Fix gfx9 parameters reading for DC. Signed-off-by: Andrey Grodzovsky Acked-by: Harry Wentland Reviewed-by: Jordan Lazare Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 2 ++ 1 file changed, 2 insertions(+) commit 53d35dc60d386cdf1d04a318dc010524bf5607a3 Author: Andrey Grodzovsky Date: Thu Mar 16 15:51:00 2017 -0400 drm/amd/display: Fix the NULL pointer. (v2) ret value in amdgpu_dm_atomic_check was not rest to EINVAL after drm_atomic_add_affected_planes and by this making any subsequent validation failure pass when returning to atomic_check. v2: Add WARN_ON print for dc_commit_streams in amdgpu_dm_atomic_commit_tail since this should never fail. Signed-off-by: Andrey Grodzovsky Acked-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0e19401f9506e710379396479c3824d80ccdc332 Author: Tony Cheng Date: Tue Mar 14 19:16:36 2017 -0400 drm/amd/display: support PHY compliance automation for CP2520 pattern 1/2/3 Signed-off-by: Tony Cheng Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 55 ++++++++++++---------- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 17 +++++-- drivers/gpu/drm/amd/display/include/dpcd_defs.h | 4 +- .../drm/amd/display/include/link_service_types.h | 11 +++-- 4 files changed, 53 insertions(+), 34 deletions(-) commit 3f8a944016674bdc64a4307a6898c3d919eb8768 Author: Tony Cheng Date: Tue Mar 14 16:30:06 2017 -0400 drm/amd/display: support CP2520 pattern 2 for HBR2 compliance - also some clean up Signed-off-by: Tony Cheng Acked-by: Harry Wentland Reviewed-by: Charlene Liu Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 149 ++++++++------------- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 10 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 2 +- 3 files changed, 66 insertions(+), 95 deletions(-) commit e73c1efca8c5fd4a53f6d725fc6ca18c65570d37 Author: Yongqiang Sun Date: Tue Mar 14 16:41:50 2017 -0400 drm/amd/display: Use stream_enc to get head pipe. Signed-off-by: Yongqiang Sun Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 745cc746da42a3a8a48fb7a6b8c4ee2c3f2cdf8b Author: Dmytro Laktyushkin Date: Tue Mar 14 12:30:29 2017 -0400 drm/amd/display: remove dc_pre_update_surfaces_to_stream from dc use Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Dmytro Laktyushkin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 115 ++------------------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 8 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 45 -------- .../drm/amd/display/dc/dce110/dce110_resource.c | 48 +++++++-- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 5 - 6 files changed, 54 insertions(+), 169 deletions(-) commit cc04bf7e4f87730a35b14056e23852e010f079ff Author: Tony Cheng Date: Tue Mar 14 01:40:53 2017 -0400 drm/amd/display: use extended receiver cap for dpcd ver Signed-off-by: Tony Cheng Acked-by: Harry Wentland Reviewed-by: Anthony Koo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ee8f63e1781eb3e4acdcff5324ca29b723aded45 Author: Leon Elazar Date: Tue Mar 14 11:54:31 2017 -0400 drm/amd/display: changing the dc_update_surfaces_and_stream 1. Adding the ability to update the stream parameters during FULL_UPDATE type Signed-off-by: Leon Elazar Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 129 +++++++++++++++---------------- drivers/gpu/drm/amd/display/dc/dc.h | 1 + 2 files changed, 65 insertions(+), 65 deletions(-) commit faddcb360c04f007966ffe8eabe3786655ba6a1a Author: Dmytro Laktyushkin Date: Tue Mar 14 11:16:11 2017 -0400 drm/amd/display: fix bw calc internal initialization error Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1de8c33bbde4115561a5b2e684be7af66b3f085d Author: Logatharshan Thothiralingam Date: Thu Mar 9 11:37:26 2017 -0500 drm/amd/display: Fixed bandwidth calculation error when converting fractions [Problem] VSR greyed out [Root cause] When converting fractions, we were using the integer function, which let to a large display clock and the view was not supported [Solution] Change the integer to fraction functions Signed-off-by: Logatharshan Thothiralingam Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a783e7b5182ba5df2916c7abda60b8e781bdb3aa Author: Leon Elazar Date: Thu Mar 9 14:38:15 2017 -0500 drm/amd/display: adding new dc_update_surfaces_and_stream Signed-off-by: Leon Elazar Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 21 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) commit ab587d4a654ea299bef20bf3d363f7faaea35e7d Author: Alex Deucher Date: Wed Apr 19 17:28:47 2017 -0400 drm/amdgpu/soc15: enable dc on vega10 Add the DC display module to drive the DCE12 IP on vega10. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/soc15.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 8fa9ca2ec6919656db87391a1633692ee8d57c22 Author: Alex Deucher Date: Thu Jun 15 16:21:43 2017 -0400 drm/amd/display: Remove DCE12 guards Signed-off-by: Jordan Lazare Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 -- drivers/gpu/drm/amd/display/Kconfig | 7 ------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ---- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 2 -- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 2 -- drivers/gpu/drm/amd/display/dc/Makefile | 3 --- drivers/gpu/drm/amd/display/dc/bios/Makefile | 4 ---- .../drm/amd/display/dc/bios/bios_parser_interface.c | 10 +--------- .../drm/amd/display/dc/bios/command_table_helper2.c | 2 -- drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 4 ---- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 -- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 6 +----- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 -- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 6 ------ drivers/gpu/drm/amd/display/dc/dc.h | 8 -------- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 4 ---- drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 4 ---- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 6 ------ drivers/gpu/drm/amd/display/dc/dce/dce_clocks.h | 6 ------ drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 2 -- drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 18 +++++++----------- drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 8 ++------ drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h | 4 ---- drivers/gpu/drm/amd/display/dc/dce/dce_opp.h | 4 ---- .../gpu/drm/amd/display/dc/dce/dce_stream_encoder.h | 4 ---- drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 2 -- .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 5 ----- .../gpu/drm/amd/display/dc/dce110/dce110_mem_input.c | 2 -- .../amd/display/dc/dce110/dce110_timing_generator.h | 2 -- .../gpu/drm/amd/display/dc/dce120/dce120_resource.c | 14 +++++--------- drivers/gpu/drm/amd/display/dc/dce80/dce80_mem_input.c | 2 -- drivers/gpu/drm/amd/display/dc/dm_services.h | 4 ---- drivers/gpu/drm/amd/display/dc/dm_services_types.h | 2 -- drivers/gpu/drm/amd/display/dc/gpio/Makefile | 2 -- drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 4 ---- drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 4 ---- drivers/gpu/drm/amd/display/dc/i2caux/Makefile | 2 -- drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c | 4 ---- drivers/gpu/drm/amd/display/dc/inc/bandwidth_calcs.h | 2 -- drivers/gpu/drm/amd/display/dc/inc/hw/display_clock.h | 6 ------ drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 2 -- drivers/gpu/drm/amd/display/dc/irq/Makefile | 2 -- drivers/gpu/drm/amd/display/dc/irq/irq_service.c | 2 -- drivers/gpu/drm/amd/display/include/dal_asic_id.h | 2 -- drivers/gpu/drm/amd/display/include/dal_types.h | 2 -- 45 files changed, 16 insertions(+), 175 deletions(-) commit 7fc6ff772b22cad6fc5fe06b0dfa3f730559faf4 Author: Jordan Lazare Date: Wed Mar 8 14:04:16 2017 -0500 drm/amd/display: Less log spam Signed-off-by: Jordan Lazare Acked-by: Harry Wentland Reviewed-by: Charlene Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/command_table2.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 85a51eeec7ed5bb1dab67e2691813418e9185add Author: Charlene Liu Date: Tue Mar 7 16:54:32 2017 -0500 drm/amd/display: need to handle DCE_Info table ver4.2 Signed-off-by: Charlene Liu Acked-by: Harry Wentland Reviewed-by: Krunoslav Kovac Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 79 +++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) commit 2c8ad2d5a20c8b7425b547dd4a969ffecad29b39 Author: Alex Deucher Date: Thu Jun 15 16:20:24 2017 -0400 drm/amd/display: Enable DCE12 support This wires DCE12 support into DC and enables it. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 + drivers/gpu/drm/amd/display/Kconfig | 7 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 23 +++- .../drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 10 ++ .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 22 ++- drivers/gpu/drm/amd/display/dc/Makefile | 4 + drivers/gpu/drm/amd/display/dc/bios/Makefile | 8 ++ .../amd/display/dc/bios/bios_parser_interface.c | 14 ++ drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 117 ++++++++++++++++ drivers/gpu/drm/amd/display/dc/core/dc.c | 29 ++++ drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 11 ++ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 19 +++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 14 ++ drivers/gpu/drm/amd/display/dc/dc.h | 27 ++++ drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 46 +++++++ .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 6 + drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 149 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_clocks.h | 20 +++ drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 8 ++ .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 14 ++ drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 35 +++++ drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h | 34 +++++ drivers/gpu/drm/amd/display/dc/dce/dce_opp.h | 72 ++++++++++ .../drm/amd/display/dc/dce/dce_stream_encoder.h | 100 ++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 68 ++++++++++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 53 +++++++- .../drm/amd/display/dc/dce110/dce110_mem_input.c | 3 + .../display/dc/dce110/dce110_timing_generator.h | 3 + drivers/gpu/drm/amd/display/dc/dce120/Makefile | 12 ++ .../gpu/drm/amd/display/dc/dce80/dce80_mem_input.c | 3 + drivers/gpu/drm/amd/display/dc/dm_services.h | 89 ++++++++++++ drivers/gpu/drm/amd/display/dc/dm_services_types.h | 27 ++++ drivers/gpu/drm/amd/display/dc/gpio/Makefile | 11 ++ drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 9 ++ drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 9 +- drivers/gpu/drm/amd/display/dc/i2caux/Makefile | 11 ++ drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c | 8 ++ .../gpu/drm/amd/display/dc/inc/bandwidth_calcs.h | 3 + .../gpu/drm/amd/display/dc/inc/hw/display_clock.h | 23 ++++ drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 4 + drivers/gpu/drm/amd/display/dc/irq/Makefile | 12 ++ drivers/gpu/drm/amd/display/dc/irq/irq_service.c | 3 + drivers/gpu/drm/amd/display/include/dal_asic_id.h | 4 + drivers/gpu/drm/amd/display/include/dal_types.h | 3 + 44 files changed, 1143 insertions(+), 8 deletions(-) commit b8fdfcc6a92cd1defa770eb75607d579ad9e2e4e Author: Harry Wentland Date: Mon Mar 6 14:36:02 2017 -0500 drm/amd/display: Add DCE12 core support Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/dce120/dce120_hw_sequencer.c | 197 ++++ .../amd/display/dc/dce120/dce120_hw_sequencer.h | 36 + drivers/gpu/drm/amd/display/dc/dce120/dce120_ipp.c | 58 + drivers/gpu/drm/amd/display/dc/dce120/dce120_ipp.h | 62 ++ .../drm/amd/display/dc/dce120/dce120_ipp_cursor.c | 202 ++++ .../drm/amd/display/dc/dce120/dce120_ipp_gamma.c | 167 +++ .../drm/amd/display/dc/dce120/dce120_mem_input.c | 340 ++++++ .../drm/amd/display/dc/dce120/dce120_mem_input.h | 37 + .../drm/amd/display/dc/dce120/dce120_resource.c | 1099 +++++++++++++++++++ .../drm/amd/display/dc/dce120/dce120_resource.h | 39 + .../display/dc/dce120/dce120_timing_generator.c | 1109 ++++++++++++++++++++ .../display/dc/dce120/dce120_timing_generator.h | 41 + 12 files changed, 3387 insertions(+) commit 9a48d684482e32edd5d96b14aa5517689bf904a3 Author: Harry Wentland Date: Mon Mar 6 14:34:18 2017 -0500 drm/amd/display: Add DCE12 irq support Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/irq/dce120/irq_service_dce120.c | 293 +++++++++++++++++++++ .../amd/display/dc/irq/dce120/irq_service_dce120.h | 34 +++ 2 files changed, 327 insertions(+) commit c56fbb34717367bbd47fc795625100e53bed600f Author: Harry Wentland Date: Mon Mar 6 14:33:19 2017 -0500 drm/amd/display: Add DCE12 i2c/aux support Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/i2caux/dce120/i2caux_dce120.c | 125 +++++++++++++++++++++ .../amd/display/dc/i2caux/dce120/i2caux_dce120.h | 32 ++++++ 2 files changed, 157 insertions(+) commit ef40b2346563aa11575446c8e3b04af44c31abb5 Author: Harry Wentland Date: Mon Mar 6 14:32:06 2017 -0500 drm/amd/display: Add DCE12 gpio support Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/gpio/dce120/hw_factory_dce120.c | 197 ++++++++++ .../amd/display/dc/gpio/dce120/hw_factory_dce120.h | 32 ++ .../display/dc/gpio/dce120/hw_translate_dce120.c | 408 +++++++++++++++++++++ .../display/dc/gpio/dce120/hw_translate_dce120.h | 34 ++ 4 files changed, 671 insertions(+) commit ae79c310b1a6f97429a5784b65f125d9cc9c95b1 Author: Harry Wentland Date: Mon Mar 6 14:29:52 2017 -0500 drm/amd/display: Add DCE12 bios parser support Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 2085 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/bios/bios_parser2.h | 33 + .../display/dc/bios/bios_parser_types_internal2.h | 74 + .../gpu/drm/amd/display/dc/bios/command_table2.c | 813 ++++++++ .../gpu/drm/amd/display/dc/bios/command_table2.h | 105 + .../amd/display/dc/bios/command_table_helper2.c | 260 +++ .../amd/display/dc/bios/command_table_helper2.h | 82 + .../dc/bios/dce112/command_table_helper2_dce112.c | 418 ++++ .../dc/bios/dce112/command_table_helper2_dce112.h | 34 + 9 files changed, 3904 insertions(+) commit b7ad57b5791e6cbeeb2e0df3e2e2769d4128d144 Author: Rex Zhu Date: Tue Feb 28 16:21:27 2017 +0800 drm/amdgpu: get display info from DC when DC enabled. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 59 +++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 25 deletions(-) commit c802570ed5a679c3c58fdde4b23d494bd884efc9 Author: Dmytro Laktyushkin Date: Wed Mar 8 13:45:33 2017 -0500 drm/amd/display: fix incorrect vp adjustment Viewport would be incorrectly adjusted when surface was used for multiple displays Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit c0bc0bd587a6f98fd1e2264a4fc2af49039627b6 Author: Jordan Lazare Date: Wed Mar 8 14:04:16 2017 -0500 drm/amd/display: Less log spam Signed-off-by: Jordan Lazare Acked-by: Harry Wentland Reviewed-by: Charlene Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/logger.c | 4 +++- drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 4 ++-- drivers/gpu/drm/amd/display/include/logger_types.h | 1 + 5 files changed, 9 insertions(+), 6 deletions(-) commit 1fbd2cfc15988f90ce5bebbbeaf759f4d1c615e1 Author: Dmytro Laktyushkin Date: Mon Mar 6 18:02:30 2017 -0500 drm/amd/display: fix viewport adjustment on rotated surface Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 133 +++++++++++----------- 1 file changed, 69 insertions(+), 64 deletions(-) commit 9e6c74ceef866edf2cec380c8ce06ef73d56478d Author: Dmytro Laktyushkin Date: Mon Mar 6 14:57:28 2017 -0500 drm/amd/display: fix hsplit viewport calculation for rotated/mirrored usecases Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 47 +++++++++++++++++------ 1 file changed, 36 insertions(+), 11 deletions(-) commit b2d0a103e6a0a823b46dd2d7f8c2de82c419e286 Author: Dmytro Laktyushkin Date: Wed Mar 1 18:27:17 2017 -0500 drm/amd/display: add init calculation to scaler params Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Dmytro Laktyushkin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 5 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 245 ++++++++++++++++++--- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 11 + drivers/gpu/drm/amd/display/dc/inc/resource.h | 4 +- 5 files changed, 229 insertions(+), 37 deletions(-) commit 4a9a5d62ec01755d36aa72782ff023da417b472a Author: Zeyu Fan Date: Tue Mar 7 11:48:50 2017 -0500 drm/amd/display: Refactor on dc_sink structure. Signed-off-by: Zeyu Fan Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 9 ++++----- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 -- 5 files changed, 9 insertions(+), 10 deletions(-) commit a36214858c9093086c1bf1415af6b67c220d711f Author: Andrey Grodzovsky Date: Thu Apr 20 15:59:25 2017 -0400 drm/amd/display: Switch to DRM helpers in s3. Signed-off-by: Andrey Grodzovsky Acked-by: Harry Wentland Reviewed-by: Tony Cheng Reviewed-by: Jordan Lazare Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 157 ++-------------------- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 5 + drivers/gpu/drm/amd/display/dc/core/dc.c | 8 +- drivers/gpu/drm/amd/display/dc/dc.h | 3 +- drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 4 - 5 files changed, 21 insertions(+), 156 deletions(-) commit 268cadbd653d3d9172975a46c79f458475f82cb5 Author: Yongqiang Sun Date: Mon Mar 6 14:58:59 2017 -0500 drm/amd/display: Do not copy bottom pipe when map resource. Signed-off-by: Yongqiang Sun Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 +++ 1 file changed, 3 insertions(+) commit f196f0805b5b75f024481ab4dc65f60d86fe6441 Author: Yongqiang Sun Date: Fri Mar 3 09:37:11 2017 -0500 drm/amd/display: After program backend, also program front end regs. Issue: In case of two 4K@60 + one non-4k monitor, when unplug non-4k monitor, the remain two 4k monitor don't work properly. Reason: In that case, two 4k use two pipes and no split, when unplug happens, those two monitor will use 4 pipes and split, but on that time, frontend is not programed properly. Solution: After programed backend, front end should be programmed as per new pipe setting. Signed-off-by: Yongqiang Sun Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit c30267f5023aef44d4367c631c42f217a2ec37f6 Author: Charlene Liu Date: Fri Mar 3 15:16:03 2017 -0500 drm/amd/display: TPS4 logic typo fix Signed-off-by: Charlene Liu Acked-by: Harry Wentland Reviewed-by: Wenjing Liu Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5ac3d3c9b79fb607fc25268c8dbd220ac14f5ac6 Author: Charlene Liu Date: Fri Mar 3 13:44:35 2017 -0500 drm/amd/display: move refclk from dc to resource_pool Signed-off-by: Charlene Liu Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 7 ------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 25 ++++++++++++++++++----- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 2 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 1 - drivers/gpu/drm/amd/display/dc/inc/core_types.h | 1 + 5 files changed, 22 insertions(+), 14 deletions(-) commit 68339af3cb7fa32634170fe5cf5cba1335bb8cc9 Author: Leon Elazar Date: Fri Mar 3 14:37:08 2017 -0500 drm/amd/display: Memory leak fix during disable 1.current_context memory wasn't released at dc_post_update_surfaces_to_stream during context swap. Signed-off-by: Leon Elazar Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++ 1 file changed, 3 insertions(+) commit e8c963d6d970220ab33f4197ab4dea18c1615e52 Author: Charlene Liu Date: Thu Mar 2 21:18:03 2017 -0500 drm/amd/display: refclock from bios firmwareInfoTable Signed-off-by: Charlene Liu Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 10 +++++++++- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 2 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 1 + drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 17 ++++++----------- 4 files changed, 17 insertions(+), 13 deletions(-) commit ece4f358cb57c33089daaea1d86c62fa924060d1 Author: Amy Zhang Date: Wed Mar 1 09:46:20 2017 -0500 drm/amd/display: Simplify some DMCU waits Signed-off-by: Amy Zhang Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 1 + drivers/gpu/drm/amd/display/dc/dce/dce_clocks.h | 1 - drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 46 +++++-------------------- 3 files changed, 9 insertions(+), 39 deletions(-) commit 5869b0f6bc631d8c697018e7f1d873419da1dba2 Author: Leon Elazar Date: Wed Mar 1 12:30:11 2017 -0500 drm/amd/display: Adding FastUpdate functionality Exposing DC Api dc_check_update_surfaces_for_stream validation will return the answer which type of update is required, so upper layers can is it safe to call the update API fro high IRQ yes/no. Signed-off-by: Leon Elazar Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 149 ++++++++++++++++++++++++++----- drivers/gpu/drm/amd/display/dc/dc.h | 12 +++ 2 files changed, 140 insertions(+), 21 deletions(-) commit 3e337d15bf211ce1fe388d00a7f6a955550b3edf Author: Charlene Liu Date: Wed Mar 1 18:20:58 2017 -0500 drm/amd/display: sometime VtotalMin less than VTotal (rounding issue) Signed-off-by: Charlene Liu Acked-by: Harry Wentland Reviewed-by: Jordan Lazare Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 773d1bcae744379a03f525bfc9249d8abf0550a8 Author: Tony Cheng Date: Tue Feb 28 22:52:29 2017 -0500 drm/amd/display: remove independent lock as we have no use case today Signed-off-by: Tony Cheng Acked-by: Harry Wentland Reviewed-by: Charlene Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 8 -------- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 19 +++++-------------- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 1 - drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 8 -------- 4 files changed, 5 insertions(+), 31 deletions(-) commit d98e5cc2ddacb34e9cdf1c06dce2758198af0120 Author: Tony Cheng Date: Tue Feb 28 21:30:32 2017 -0500 drm/amd/display: clean up and simply locking logic always take update lock instead of using HW built in update lock trigger with write to primary_addr_lo. we will be a little more inefficient with the extra registers write to lock, but this simplify code and make it always correct. Will revisit locking optimization once update sequence mature Signed-off-by: Tony Cheng Acked-by: Harry Wentland Reviewed-by: Charlene Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 32 +++++++---------------- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 3 +-- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 1 - 3 files changed, 11 insertions(+), 25 deletions(-) commit 2d60ded1325e0b4407aaa5396d1b331ea58f4f85 Author: Andrey Grodzovsky Date: Tue Feb 28 16:45:46 2017 -0500 drm/amd/display: Remove page_fleep_needed function. This function makes a lot of assumptions to try and deduce tha an atomic_commit came from FLIP ioctl. Those assumptions are not explicit contract with DRM API and might lead to wrong result as the code changes. Instead use drm_atomic_state.allow_modeset flag which explicitly is set to false only in atomic flip helper function, otherwise this flag is always true. P.S When we get to do actual atomic IOCTL this will have to be revised with the atomic call behavior. Signed-off-by: Andrey Grodzovsky Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 92 +--------------------- 1 file changed, 3 insertions(+), 89 deletions(-) commit 92cc37fba0b54091b4dde4bced52c1b94d44e11f Author: Andrey Grodzovsky Date: Sun Feb 5 21:48:19 2017 -0500 drm/amd/display: Refactor headless to use atomic commit. (v2) Headless mode set needs to be synchronized against outstanding nonblocking commits. This achieved by building atomic state and commiting it. v2: rebase on 4.11 Signed-off-by: Andrey Grodzovsky Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 140 +++++++++------------ 1 file changed, 61 insertions(+), 79 deletions(-) commit 5f42aa394e50e4993ec370aca4bb36c3b6a81a60 Author: Harry Wentland Date: Wed Sep 13 15:17:19 2017 -0400 Revert "drm/amdgpu: Pulling old prepare and submit for flip back" This reverts commit 0eb4667a073e. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 138 ++++++---------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 15 --- 2 files changed, 29 insertions(+), 124 deletions(-) commit 54f5499a54fe671c56012684d5a68efbb4fe0b53 Author: Andrey Grodzovsky Date: Thu Apr 20 15:57:05 2017 -0400 drm/amd/display: Refactor atomic commit implementation. (v2) Modify amdgpu_dm_atomic_comit to implement atomic_comit_tail hook. Unify Buffer objects allocation and dealocation for surface updates and page flips. Simplify wait for fences and target_vbank logic for non blockiing commit. Remove hacky update surface to page flip synchronization we had and rely on atomic framework synchronization logic. v2: Add state->allow_modeset as indicator of page flip call. Signed-off-by: Andrey Grodzovsky Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 58 +++- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 343 ++++++++++----------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 7 +- 3 files changed, 203 insertions(+), 205 deletions(-) commit 92a65e32ade943135a6e48ec756661c0896392d0 Author: Charlene Liu Date: Tue Feb 28 19:49:15 2017 -0500 drm/amd/display: extended the programming sequence to VFlip as well Signed-off-by: Charlene Liu Acked-by: Harry Wentland Reviewed-by: Charlene Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit 67a277055b98e998c34d311cc956f809a0f92504 Author: Harry Wentland Date: Thu Feb 16 10:37:00 2017 -0500 drm/amd/display: We don't support interlace and doublescan Don't tell DRM otherwise. Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f0828115efa0406fbe0010b1d8c9c965fc718733 Author: Charlene Liu Date: Tue Feb 28 15:23:38 2017 -0500 drm/amd/display: freesync pipe split :VTotal_Min_Mask for Hflip/lock. Signed-off-by: Charlene Liu Acked-by: Harry Wentland Reviewed-by: Jordan Lazare Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 40 +++++++++++++++------- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 21 +++++++----- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 15 ++------ drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 20 ++++++++--- .../drm/amd/display/include/hw_sequencer_types.h | 1 + 5 files changed, 59 insertions(+), 38 deletions(-) commit e7738c8a50ea426a57184ef2275b8163ab79febe Author: Harry Wentland Date: Tue Jan 17 20:24:03 2017 -0500 drm/amd/display: Remove unused define from amdgpu_dm_types Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 5 ----- 1 file changed, 5 deletions(-) commit a49dcb88e8159b12d1af5f67d657388c4a1c96cb Author: Harry Wentland Date: Thu Jan 12 09:09:08 2017 -0500 drm/amd/display: Use amdgpu mode funcs statically No need to assign them dynamically. This is much more readable. Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 3853c184ed9a258e2d720f98ef77112625300e36 Author: Dmytro Laktyushkin Date: Tue Feb 28 16:14:10 2017 -0500 drm/amd/display: fix dce100_validate_bandwidth return value Signed-off-by: Dmytro Laktyushkin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2e218dda078f4e8d09d2493b01a7e256cfe38aa Author: Harry Wentland Date: Fri Feb 24 16:25:51 2017 -0500 drm/amd/display: Some more warning fixes This doesn't show with gcc6 Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) commit ce9c088051e198b19eb533b24c605b7cedbe5b9c Author: Dmytro Laktyushkin Date: Wed Feb 22 18:14:52 2017 -0500 drm/amd/display: move visual confirm recout adjustment to scaler Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 9 --------- drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 6 ++++++ drivers/gpu/drm/amd/display/dc/dce110/dce110_transform_v.c | 6 ++++++ 3 files changed, 12 insertions(+), 9 deletions(-) commit cf43759306002e29f025344504dc680a9a0b3ac8 Author: Dmytro Laktyushkin Date: Wed Feb 22 17:52:22 2017 -0500 drm/amd/display: bandwidth update fix Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 173 +------------ .../amd/display/dc/dce100/dce100_hw_sequencer.c | 15 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 279 ++++++++++++--------- .../drm/amd/display/dc/dce80/dce80_hw_sequencer.c | 16 +- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 9 +- 5 files changed, 179 insertions(+), 313 deletions(-) commit 45209ef7197bd4b5e7e224ff46fa9a3eca25c3bd Author: Dmytro Laktyushkin Date: Fri Feb 24 14:19:40 2017 -0500 drm/amd/display: remove apply_clk_constraints, used validate_bandwidth universally Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Dmytro Laktyushkin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 50 ++++++++++++++-------- .../drm/amd/display/dc/dce100/dce100_resource.c | 10 +++-- .../drm/amd/display/dc/dce110/dce110_resource.c | 18 ++++---- .../drm/amd/display/dc/dce112/dce112_resource.c | 18 ++++---- .../drm/amd/display/dc/dce112/dce112_resource.h | 2 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 4 +- drivers/gpu/drm/amd/display/dc/inc/core_status.h | 1 - drivers/gpu/drm/amd/display/dc/inc/core_types.h | 6 +-- 8 files changed, 59 insertions(+), 50 deletions(-) commit 648013696767f0266aa7bd44407786a99f7a7910 Author: Harry Wentland Date: Fri Feb 24 11:31:23 2017 -0500 drm/amd/display: Fix warnings in DC Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 -- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 1 - drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) commit 0d70570f712e2db49396eaef61790bac2a08ec1c Author: Harry Wentland Date: Fri Feb 24 11:21:11 2017 -0500 drm/amd/display: Fix warnings in amdgpu_dm Signed-off-by: Harry Wentland Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1781958ff41b28b3cd7b4a2ed691c932031c5515 Author: Leon Elazar Date: Thu Feb 23 16:10:43 2017 -0500 drm/amd/display: Surface Validation Fixes + Audio Mask 1. dc: Adding missing mask for audio register DCCG_AUDIO_DTO_SOURCE 2. Changing the surface validation to check the limits of the clip rect instead of the source rect. Signed-off-by: Leon Elazar Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_audio.h | 1 + drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 8 ++++---- drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) commit 227d2518997e122bb702d2110eafd337ad9ff078 Author: Dmytro Laktyushkin Date: Thu Feb 23 15:25:51 2017 -0500 drm/amd/display: add scaler coefficients for 64 phase 5-8 taps Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce/dce_scl_filters.c | 608 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 4 + 2 files changed, 612 insertions(+) commit 5936223f7b51e122beb511265e2112777f7a887e Author: Jordan Lazare Date: Thu Feb 23 14:07:29 2017 -0500 drm/amd/display: Fix gamma colour corruption for 10 bit surfaces Gamma LUT shouldn't be used for 10-bit and above. Should instead be using prescale and bypassing input gamma. Signed-off-by: Jordan Lazare Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher .../amd/display/dc/dce110/dce110_hw_sequencer.c | 15 ++++- drivers/gpu/drm/amd/display/dc/dce80/Makefile | 3 +- .../gpu/drm/amd/display/dc/dce80/dce80_ipp_gamma.c | 71 ---------------------- 3 files changed, 15 insertions(+), 74 deletions(-) commit 3548f0731a2fa823bcb31b5ea662603926b85c43 Author: Amy Zhang Date: Fri Feb 17 11:56:03 2017 -0500 drm/amd/display: DMCU PSR Refactor - Move PSR programming from link encoder to dmcu Signed-off-by: Amy Zhang Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 21 +- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 208 +++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h | 107 +++++++- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 280 +++------------------ .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 73 +----- drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h | 4 + .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 9 +- 7 files changed, 376 insertions(+), 326 deletions(-) commit d5b4f2bcff03c6cafb0a890360f1f8fbc99071a1 Author: Charlene Liu Date: Wed Feb 22 18:26:20 2017 -0500 drm/amd/display: 420 clock divided by 2 twice Signed-off-by: Charlene Liu Acked-by: Harry Wentland Reviewed-by: Krunoslav Kovac Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 3 +++ 1 file changed, 3 insertions(+) commit 4b679bc3cab09f2af44bd34dfc197939a4602aa8 Author: Charlene Liu Date: Wed Feb 22 13:46:29 2017 -0500 drm/amd/display: HDMI deep color mode audio issue Signed-off-by: Charlene Liu Acked-by: Harry Wentland Reviewed-by: Charlene Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 9 ++++++-- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 11 +++++---- drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 9 ++++++++ .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 1 - .../drm/amd/display/dc/dce/dce_stream_encoder.c | 26 +++++----------------- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 18 --------------- 6 files changed, 28 insertions(+), 46 deletions(-) commit 4ef3a67b6a1af2fc9030bc955200e764edfc37fb Author: Dmytro Laktyushkin Date: Wed Feb 15 18:21:20 2017 -0500 drm/amd/display: rename bandwidth_calcs.c to dce_calcs.c (v2) v2: agd: squash in the Makefile change as well. Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Eagle Yeh Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/Makefile | 2 +- .../gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c | 3141 -------------------- drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 3141 ++++++++++++++++++++ 3 files changed, 3142 insertions(+), 3142 deletions(-) commit dd55d12c2675859fa4d4947dafc44515eedbccc4 Author: Andrey Grodzovsky Date: Sun Jan 29 23:16:03 2017 -0500 drm/amdgpu: Add a few members to support DAL atomic refactor. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 4 ++++ 1 file changed, 4 insertions(+) commit b0fb632f9b511145dfe49b783dd99adc6c6f8687 Author: Harry Wentland Date: Thu Jan 12 09:07:38 2017 -0500 drm/amdgpu: Expose mode_config functions for DM Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 33 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) commit 181a888fcd723c4bc63f43aac50713c34ae9102e Author: Charlene Liu Date: Fri Feb 17 13:59:11 2017 -0500 drm/amd/display: fix incorrect programming for YCbCr422 and YCbCr420 Signed-off-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 12 +++++++++--- .../gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 17 +++++++++-------- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 3 +++ 3 files changed, 21 insertions(+), 11 deletions(-) commit 896b3cb3f48e662abdaaaeb5a4e1001723081a19 Author: Charlene Liu Date: Fri Feb 17 13:51:32 2017 -0500 drm/amd/display: fix 12bpc truncate to 10bpc Signed-off-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 87b58768eccd311fdc7694c09966754d5ce90538 Author: Charlene Liu Date: Thu Feb 16 22:28:46 2017 -0500 drm/amd/display: audio bug fix part 1: Add missing audio ACR Signed-off-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 8 +-- drivers/gpu/drm/amd/display/dc/dce/dce_audio.h | 2 + .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 2 + .../drm/amd/display/dc/dce/dce_stream_encoder.c | 81 +++++++++++++++------- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 31 +++++++++ .../drm/amd/display/dc/dce110/dce110_resource.c | 1 + 6 files changed, 95 insertions(+), 30 deletions(-) commit 185189dc51a5c968ce35b0e1f2b529736e789c9c Author: Zeyu Fan Date: Thu Feb 16 18:34:50 2017 -0500 drm/amd/display: Fix error where wrong payload size is given. Signed-off-by: Zeyu Fan Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b230ea3e76f6238b31fd270cab76d55394f3293 Author: Zeyu Fan Date: Thu Feb 16 16:15:30 2017 -0500 drm/amd/display: Add query_ddc_data function Signed-off-by: Zeyu Fan Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 25 +++++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 11 ++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) commit 70063a5957126087f167ff3890784d7b3b36c844 Author: Amy Zhang Date: Thu Feb 16 11:04:48 2017 -0500 drm/amd/display: Add bypass case for PQ transfer function - Source and destination color space should be the same for app control case - Bypass degamma, regamma, and gamut remap - Add hdr supported check for info frame Signed-off-by: Amy Zhang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 5 ++++- 3 files changed, 7 insertions(+), 2 deletions(-) commit 5c1879b6b93898d65e05dfb47f947fa4f5a904a4 Author: Ken Chalmers Date: Mon Feb 13 11:07:33 2017 -0500 drm/amd/display: fix dc_commit_surfaces_to_stream for dcc Signed-off-by: Ken Chalmers Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 1 + 1 file changed, 1 insertion(+) commit 7d4e9bf9835ad081fb5967336cace7f5aa8ffd6d Author: Harry Wentland Date: Tue Feb 21 17:09:34 2017 -0500 drm/amd/display: Remove LINUX_VERSION_CODE check Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- 1 file changed, 2 deletions(-) commit beed42b5bc68e9c37c4474393a2e3dbf6ed4c26b Author: Jordan Lazare Date: Tue Feb 14 18:20:35 2017 -0500 drm/amd/display: Don't attempt to program missing register fields on DCE8 When moving to a common dce/ infrastructure for all asics, some register fields do not exist in DCE8, and cause ASSERTS and debug spam. Instead, check to see whether a register field mask is valid before attempting to program the register field Signed-off-by: Jordan Lazare Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 29 ++++++++++++++-------- drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 12 ++++++--- 2 files changed, 28 insertions(+), 13 deletions(-) commit 4a9054dda6df8e94b6a54a181277e25d189198c4 Author: Harry Wentland Date: Tue Feb 14 14:51:06 2017 -0500 drm/amd/display: Fix 64-bit division, yet again Also make the code somewhat more readable. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit e166ad43d5c1312f258ef4adabe1fac2b9da7e18 Author: Julia Lawall Date: Tue Feb 14 07:19:36 2017 +0100 drm/amd/dc: hw_sequencer: fix semicolon.cocci warnings Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17a96033dae7e56cd48d1b3c952e0b4ca9384312 Author: Julia Lawall Date: Tue Feb 14 07:14:58 2017 +0100 drm/amd/dc: fix semicolon.cocci warnings Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5866e7cf7d4f989cc17a781b8c4315345bc6de04 Author: Julia Lawall Date: Tue Feb 14 07:13:04 2017 +0100 drm/amd/dc: fix semicolon.cocci warnings Remove unneeded semicolons. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 26ada804d62e5aedf16be8dfe2cb9bf4907815e5 Author: Jordan Lazare Date: Tue Feb 14 15:03:04 2017 -0500 drm/amd/display: Fix missing fcn pointer on DCE8 Signed-off-by: Jordan Lazare Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 77f36b27127630f326d6967318159e938a4137dd Author: Zeyu Fan Date: Mon Feb 13 11:49:07 2017 -0500 drm/amd/display: Fix logic that causes segfault on DP display. Signed-off-by: Zeyu Fan Acked-by: Jordan Lazare Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit b3c64dff24e829c0b61b340fbaf0efaf20ce5d58 Author: Charlene Liu Date: Fri Feb 10 17:51:27 2017 -0500 drm/amd/display: color distortion after DPMS+ background color fix Signed-off-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 ++ 1 file changed, 2 insertions(+) commit a37656b99aca947967f32931bfd5ba04133154d8 Author: Tony Cheng Date: Wed Feb 8 22:13:52 2017 -0500 drm/amd/display: report cursor size base on the ASIC Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 ++ drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 1 + 5 files changed, 6 insertions(+) commit 27e947b0e13835cb782aa267b7d77e1f5a028e87 Author: Zeyu Fan Date: Fri Feb 10 11:59:31 2017 -0500 drm/amd/display: Fix program pix clk logic to unblock deep color set. Signed-off-by: Zeyu Fan Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8f16f28936afcf68b92625d331a8ca760a386139 Author: Sylvia Tsai Date: Thu Feb 9 16:35:39 2017 -0500 drm/amd/display: Set ignore_msa_timing flag for freesync modes - Set ignore_msa_timing_param to 1 only for modes that can support freesync Signed-off-by: Sylvia Tsai Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e266fdf6944749e100b065b5a95c7bb33d2aa2d6 Author: Vitaly Prosyak Date: Tue Feb 7 10:41:37 2017 -0600 drm/amd/display: Enable regamma 25 segments and use double buffer. Moved custom floating point calculation to the shared place between dce's. Signed-off-by: Vitaly Prosyak Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/Makefile | 2 +- .../gpu/drm/amd/display/dc/calcs/custom_float.c | 197 +++++++++++++++++++++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 171 +----------------- .../amd/display/dc/dce110/dce110_hw_sequencer.h | 3 - drivers/gpu/drm/amd/display/dc/inc/custom_float.h | 40 +++++ 5 files changed, 240 insertions(+), 173 deletions(-) commit 67c3bd40b3b97cac40e01aaef712ccf4af5a48b1 Author: Reza Amini Date: Fri Feb 3 14:19:41 2017 -0500 drm/amd/display: handle unsupported sink types Signed-off-by: Reza Amini Reviewed-by: Wesley Chalmers Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 4 ++++ 1 file changed, 4 insertions(+) commit ab8812a3861efd3d60a4079711f2d1b08b8af50e Author: Hersen Wu Date: Wed Feb 8 11:28:33 2017 -0500 drm/amd/display: Audio is not switching to DP when HDMI/DP hot plug/unplug Signed-off-by: Hersen Wu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/dce110/dce110_hw_sequencer.c | 100 +++++++++++++++------ 1 file changed, 75 insertions(+), 25 deletions(-) commit 871ffb606a3eb9b29891b25228f569899bbd216c Author: Dmytro Laktyushkin Date: Mon Feb 6 15:07:19 2017 -0500 drm/amd/display: fix psr status wait Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eagle Yeh Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 18 +++++++++++++++--- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 22 +++++++++++----------- drivers/gpu/drm/amd/display/dc/dm_services.h | 2 +- 3 files changed, 27 insertions(+), 15 deletions(-) commit a99240d5f8e14fc081e2cccad6ac46b48cea7def Author: Dmytro Laktyushkin Date: Thu Feb 2 17:08:19 2017 -0500 drm/amd/display: use disp clock value in context rather than bw_results Signed-off-by: Dmytro Laktyushkin Reviewed-by: Jordan Lazare Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 14 ++++++-------- drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 2 +- .../gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 10 +++++----- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 1 + drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) commit a2b763cbd69e59854ed3ff9f79b7e8471748ea69 Author: Krzysztof Nowicki Date: Fri Jan 27 18:58:27 2017 +0100 drm/amd/display: Fix MST physical ports always disconnected Remove a false assumption that a cached EDID will be present whenever the connector is in a connected state as this will only be true for logical MST ports. For physical ports the EDID will never be cached, which will cause them to always appear as disconnected. This reverts commit 4ff8a88888de271bfb7750b2a5c68163848e2bf1 Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 8 -------- 1 file changed, 8 deletions(-) commit f7f3cfee084b0c68789e2b4231b0d3de3466a52b Author: Harry Wentland Date: Fri Feb 3 11:45:43 2017 -0500 drm/amd/display: fix crash with modesetting driver They might call commit with ACTION_NOTHING without a mode. We shouldn't crash but simply skip updating stream scaling settings since scaling obviously didn't change without a provided mode. Signed-off-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 4 ++++ 1 file changed, 4 insertions(+) commit 94cd1f79b05994b712a2cf0563ac73be0323978b Author: Yongqiang Sun Date: Thu Feb 2 15:21:45 2017 -0500 drm/amd/display: Fixed color temperature corruption. Signed-off-by: Yongqiang Sun Reviewed-by: Jordan Lazare Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffbcd19a8856a63f4310c89b2af599409e3f2216 Author: Vitaly Prosyak Date: Wed Feb 1 12:54:15 2017 -0600 drm/amd/display: Adding 10 bpcc video P010 format Signed-off-by: Vitaly Prosyak Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c | 5 +++++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 6 ++++-- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 5 ++++- 3 files changed, 13 insertions(+), 3 deletions(-) commit cc4d99b8a888e16093b985d6a11fbd37ab92697c Author: Charlene Liu Date: Wed Feb 1 20:35:53 2017 -0500 drm/amd/display: HDMI YCbCr422 12bpc pixel format issue Signed-off-by: Charlene Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 7 ++++- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 30 ++++++++++---------- .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 29 ++++++++++---------- drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 32 +++++++++++++++++----- .../drm/amd/display/dc/dce/dce_stream_encoder.c | 16 +++++++---- .../drm/amd/display/dc/dce110/dce110_resource.c | 3 ++ drivers/gpu/drm/amd/display/dc/inc/clock_source.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 1 + 8 files changed, 76 insertions(+), 44 deletions(-) commit 8fde5884f4a18dec81ab5d498bf7bf3c156f8dfb Author: Charlene Liu Date: Tue Jan 31 20:18:05 2017 -0500 drm/amd/display: Fix YCbCr pixel format shows green issue Signed-off-by: Charlene Liu Reviewed-by: Charlene Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 71021265a6f03893139f58f2bc50d2ad9adc3826 Author: Hersen Wu Date: Fri Jan 27 15:44:26 2017 -0500 drm/amd/display: Clear test pattern when enabling stream Signed-off-by: Hersen Wu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 5 +++++ 1 file changed, 5 insertions(+) commit b7e2439c7878f06edb70379454d57ce3d51d3feb Author: Rex Zhu Date: Mon Feb 6 12:37:44 2017 +0800 drm/amd/display: mclk level can't be 0. Signed-off-by: Rex Zhu Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ca709397b5bf904ef04eb981d3b50e8e93c15394 Author: Harry Wentland Date: Mon Feb 6 11:23:20 2017 -0500 drm/amd/display: Fix 64-bit division Signed-off-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71f7256e41ad036215a69e6bf561f7d4a541f150 Author: Charlene Liu Date: Mon Jan 30 17:35:59 2017 -0500 drm/amd/display: remove CV-specific timing standard Signed-off-by: Charlene Liu Reviewed-by: Jordan Lazare Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 5 ----- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 -- drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 4 ---- drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c | 5 ----- 4 files changed, 16 deletions(-) commit 3efeef11f471c1c5ee116cb00d27f426bfa969dc Author: Leon Elazar Date: Mon Jan 30 10:25:43 2017 -0500 drm/amd/display: surface validation on dce100 Signed-off-by: Leon Elazar Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0f56b418ef497032a71358fb8c76d10f24fd5d58 Author: Dmytro Laktyushkin Date: Wed Jan 25 13:58:46 2017 -0500 drm/amd/display: add dcfclk reporting to pplib Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 48 +++++++++---------------- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 1 + 2 files changed, 18 insertions(+), 31 deletions(-) commit 70814f6f092a91a552eef9f4580c9ddc7cdcbb32 Author: Anthony Koo Date: Fri Jan 27 17:50:03 2017 -0500 drm/amd/display: Debug option to force enable ABM Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + 1 file changed, 1 insertion(+) commit 90b9d7fa107d1bde344af6df81927c07cb882f5e Author: Anthony Koo Date: Fri Jan 27 17:22:46 2017 -0500 drm/amd/display: Support ABM without PPlib Fix problem with loading IRAM Signed-off-by: Anthony Koo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h | 7 +++++- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 26 +++------------------- 2 files changed, 9 insertions(+), 24 deletions(-) commit 998166a6116bea93f6e1672177581b689b008bf7 Author: Dmytro Laktyushkin Date: Tue Jan 24 15:45:33 2017 -0500 drm/amd/display: Make new pixel clock more obvious Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6728b30c974e38711f70dc38edf68503bf71c4a9 Author: Anthony Koo Date: Tue Jan 24 15:19:42 2017 -0500 drm/amd/display: Move backlight from encoder to ABM Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 34 --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 63 +++-- drivers/gpu/drm/amd/display/dc/dc.h | 5 - drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 264 +++++++++++++++++++-- drivers/gpu/drm/amd/display/dc/dce/dce_abm.h | 35 ++- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 260 -------------------- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 24 -- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 4 +- drivers/gpu/drm/amd/display/dc/inc/hw/abm.h | 5 + .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 5 - drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 4 - .../amd/display/dc/virtual/virtual_link_encoder.c | 13 - 12 files changed, 316 insertions(+), 400 deletions(-) commit 5e7773a219f7821163ad2b17be0d02f8be8ce0c6 Author: Anthony Koo Date: Mon Jan 23 16:55:20 2017 -0500 drm/amd/display: DMCU Compile and Load Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 16 -- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 12 -- drivers/gpu/drm/amd/display/dc/dc.h | 4 +- drivers/gpu/drm/amd/display/dc/dce/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 214 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_abm.h | 157 +++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 127 ++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h | 91 +++++++++ .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 40 +--- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 6 + .../drm/amd/display/dc/dce110/dce110_resource.c | 52 +++++ .../drm/amd/display/dc/dce112/dce112_resource.c | 51 +++++ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 3 + drivers/gpu/drm/amd/display/dc/inc/hw/abm.h | 40 ++++ drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h | 42 ++++ .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 1 - 16 files changed, 788 insertions(+), 70 deletions(-) commit bb9042da8e8ada796cfae7e432a54e872c5b1784 Author: Yongqiang Sun Date: Fri Jan 27 10:29:01 2017 -0500 drm/amd/display: Change power gating off sequence to fix hang Power off plane clear all the reg values includes cursor. When OS call set cursor position, cursor address reg is cleared, results in system hard hang. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 75a74755763062b5dd722a19b3fe7a60813ee369 Author: Leon Elazar Date: Thu Jan 26 18:03:16 2017 -0500 drm/amd/display: DP compliance automation test fixes Fixes: 1. Removing pending flag since we are executing teh entire flow without context switches 2. Adding stream enablment - connection between DIG BE to DIG FE during test link training Signed-off-by: Leon Elazar Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 19 +------------------ drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 4 ++++ drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 3 +-- 3 files changed, 6 insertions(+), 20 deletions(-) commit 7ec6b963b17a51159c38e2446499a69edf5b20e5 Author: Yongqiang Sun Date: Wed Jan 25 14:51:39 2017 -0500 drm/amd/display: Expose hw sequencer gamma function Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit c7141c47d371fbe6dfbdadf92cd4abb750111a62 Author: Anthony Koo Date: Wed Jan 25 09:31:45 2017 -0500 drm/amd/display: Fix compile warnings 1. Fix init of integer 2. Fix mixed declarations Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 8fb234135027899e5a62e357baa7c43546a1d57b Author: Andrey Grodzovsky Date: Tue Jan 24 17:28:50 2017 -0500 drm/amd/display: Rename atomic_commit parameter. This parameter name is misleading. It's previous meaning confuses with ASYNC (immidiate flip) which is totatlly different thing then nonblocking commit. Signed-off-by: Andrey Grodzovsky Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 17c06cab918e23b15dcf1618d9735a46fd1529f8 Author: Harry Wentland Date: Tue Jan 24 16:06:32 2017 -0500 drm/amd/display: Make sure to update address without flip Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 37d66a339b6f29251ebe0da78816d6d07554c617 Author: Dmytro Laktyushkin Date: Fri Jan 20 17:14:23 2017 -0500 drm/amd/display: fix timing trace debug print Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +++- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 18 ++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) commit 23ae4f8e59c926df806ba837b2a2040984077641 Author: Amy Zhang Date: Tue Jan 24 09:50:05 2017 -0500 drm/amd/display: Fix Warnings - Remove mixed declarations and unused variables Signed-off-by: Amy Zhang Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../amd/display/dc/dce110/dce110_hw_sequencer.c | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 954815153b4b1213237d389be15d5448f67154ff Author: Tony Cheng Date: Mon Jan 23 17:51:17 2017 -0500 drm/amd/display: enable color gamma programming Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 6 ------ drivers/gpu/drm/amd/display/dc/dc.h | 1 - 2 files changed, 7 deletions(-) commit ed1519403227490d517c2d59755d68d3c31afa12 Author: Yongqiang Sun Date: Mon Jan 23 17:10:04 2017 -0500 drm/amd/display: Fixed 4K black issue by refactor update surface. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 86e2e1bee07134f712cb6b807b7f0205057bd11e Author: Hersen Wu Date: Fri Jan 20 15:54:13 2017 -0500 drm/amd/display: Check we got a stream in update_info_frame Signed-off-by: Hersen Wu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 5 +++++ 1 file changed, 5 insertions(+) commit e4e354b02fa8b6d53ec65bd5dbd27d014e4e752f Author: Tony Cheng Date: Thu Jan 19 14:46:26 2017 -0500 drm/amd/display: clean up redundant logic Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 23 ++++++++--------------- drivers/gpu/drm/amd/display/dc/dc.h | 1 - 2 files changed, 8 insertions(+), 16 deletions(-) commit e72f0acd369d3ddfa6e924279d4010bcdb3de31b Author: Tony Cheng Date: Thu Jan 19 23:57:09 2017 -0500 drm/amd/display: refactor dc_update_surfaces_for_stream - reuse existing helper functions - helper function to make it more obvious which cases we can do optimize programming Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 367 ++++++++++++++++++------------- 1 file changed, 212 insertions(+), 155 deletions(-) commit fde2deae86220eb5c3f88bf5ee9ff47175810b34 Author: Tony Cheng Date: Thu Jan 19 10:57:56 2017 -0500 drm/amd/display: improve debug-ability - make failure status obvious Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/inc/core_status.h | 26 ++++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) commit 0be06fc29b31d92a22180deaf866ad5f97133a9e Author: Dmytro Laktyushkin Date: Thu Jan 19 17:54:39 2017 -0500 drm/amd/display: prevent setting cursor position with no surface Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dcbd4ee0fabcc1f6a40d67e8a8621e9ac5a382ac Author: Yongqiang Sun Date: Thu Jan 19 10:53:58 2017 -0500 drm/amd/display: Change update surface condition, fix surface transition corruption. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 4d35b093e635de739d0bdcbb57244424cb1abb61 Author: Joshua Aberback Date: Tue Jan 17 16:01:35 2017 -0500 drm/amd/display: Proper de-allocation of OPP - refactor opp_destroy functions to dce common file - fixes memory leak, dce specific variations didn't free regamma_params - remove unused dce110_regamma structure Signed-off-by: Joshua Aberback Reviewed-by: Jun Lei Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 10 ++++--- drivers/gpu/drm/amd/display/dc/dce/dce_opp.h | 35 ---------------------- .../drm/amd/display/dc/dce100/dce100_resource.c | 26 +--------------- .../drm/amd/display/dc/dce112/dce112_resource.c | 26 +--------------- 4 files changed, 8 insertions(+), 89 deletions(-) commit 9c1a57d79dbc96e808ea81aa1385f2d9d03570a0 Author: Leon Elazar Date: Tue Jan 17 16:16:04 2017 -0500 drm/amd/display: check surface size is at least as large as stream Signed-off-by: Leon Elazar Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit cad3c7a99725f5f241ee7e8e1657c54c5b532d51 Author: Harry Wentland Date: Thu Jan 19 18:58:33 2017 -0500 drm/amd/display: Remove power gating debug flags They're not used anywhere Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 -- 1 file changed, 2 deletions(-) commit f0e3db90a6fbee4acc921a4912a3e3460efb5cc0 Author: Harry Wentland Date: Mon Jan 23 11:49:24 2017 -0500 drm/amd/display: Don't reserve pipe for underlay on ASIC without underlay Signed-off-by: Harry Wentland Acked-by: Jordan Lazare Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 ++ 5 files changed, 7 insertions(+), 5 deletions(-) commit adc9b14139de00b9fe016acc901a5fcf50145008 Author: Dmytro Laktyushkin Date: Tue Jan 17 17:40:13 2017 -0500 drm/amd/display: add missing dcc update on flip call Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++ 1 file changed, 2 insertions(+) commit 3d761e7990a27dca7481d4f4e4d6b3751509ab11 Author: Andrey Grodzovsky Date: Wed Apr 19 13:55:35 2017 -0400 drm/amd/display: Clean index in irq init loop Signed-off-by: Andrey Grodzovsky Acked-by: Harry Wentland Reviewed-by: Tony Cheng Reviewed-by: Jordan Lazare Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b57de80a51479f19a41f737ddd1ab18028bf9a43 Author: Andrey Grodzovsky Date: Wed Apr 19 13:29:11 2017 -0400 drm/amd/display: Register on VLBLANK ISR. Switch from VUPDATE to VBLANK. Signed-off-by: Andrey Grodzovsky Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 13 +++++++------ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) commit b10d51f8b094f73c6c27d389013304e59e3062b2 Author: Andrey Grodzovsky Date: Mon Jan 16 16:16:22 2017 -0500 drm/amd/display: Add interrupt entries for VBLANK isr. Signed-off-by: Andrey Grodzovsky Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher .../amd/display/dc/irq/dce110/irq_service_dce110.c | 42 ++++++++++++++++++++++ .../amd/display/dc/irq/dce80/irq_service_dce80.c | 22 ++++++++++++ drivers/gpu/drm/amd/display/dc/irq_types.h | 8 +++++ 3 files changed, 72 insertions(+) commit b565ff86aaebee65141a4a441f782a05962d4c14 Author: Leon Elazar Date: Tue Jan 17 16:16:04 2017 -0500 drm/amd/display: Add missing MI masks This will fix the memory Input programing with MST tiled display. This Fix should fix connectivity problems with MST tiled Display Signed-off-by: Leon Elazar Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h | 2 ++ 1 file changed, 2 insertions(+) commit 009432e58159e640e942092ca68d78f589549d14 Author: Zeyu Fan Date: Tue Jan 17 15:14:11 2017 -0500 drm/amd/display: Fix missing conditions in hw sequencer. Signed-off-by: Zeyu Fan Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8693049a896c2c3a2bb74f0efde62318636beaef Author: Tony Cheng Date: Mon Jan 16 20:50:47 2017 -0500 drm/amd/display: rename BGRA8888 to ABGR8888 DC actually support ABGR8888 instead of BGRA8888 (R/B swap rather than endian swap) , rename to avoid confusion Signed-off-by: Tony Cheng Acked-by: Harry Wentland Reviewed-by: Yongqiang Sun Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c | 4 ++-- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_mem_input_v.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) commit 031ec2764064d79b1e1d8c30a6785ed19184fb47 Author: Dmytro Laktyushkin Date: Tue Jan 17 11:18:55 2017 -0500 drm/amd/display: Remove meta_pitch Signed-off-by: Dmytro Laktyushkin Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 8 ++------ drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 4 ---- 2 files changed, 2 insertions(+), 10 deletions(-) commit ab7044d0d17a8226a8b51e235e16204e696ae42a Author: Tony Cheng Date: Mon Jan 16 20:37:08 2017 -0500 drm/amd/display: refactor clk_resync to avoid assertion - not all DCE has PHYPLLA_PIXCLK_DOUBLE_RATE_ENABLE bit defined. Signed-off-by: Tony Cheng Acked-by: Harry Wentland Reviewed-by: Yongqiang Sun Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 57 ++++++++++++---------- 1 file changed, 30 insertions(+), 27 deletions(-) commit 534db198866070fdb655423637afdce6cf0c05db Author: Amy Zhang Date: Fri Jan 13 16:49:26 2017 -0500 drm/amd/display: HDR Enablement For Applications - Made sure dest color space is updated in stream and info frame - Optimized segment distribution algorithm for regamma mapping Signed-off-by: Amy Zhang Acked-by: Harry Wentland Reviewed-by: Aric Cyr Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 14 ++++ drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 6 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 94 ++++++++++++++++++---- drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 11 +++ 4 files changed, 107 insertions(+), 18 deletions(-) commit 306dadf01aba27bed2daa49a782b22586af64c93 Author: Amy Zhang Date: Fri Jan 13 16:19:36 2017 -0500 drm/amd/display: Set default degamma to sRGB instead of bypass Signed-off-by: Amy Zhang Acked-by: Harry Wentland Reviewed-by: Aric Cyr Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0d7ce783a88824cc7e3af0f1aa2d1076364cbf4 Author: Tony Cheng Date: Fri Jan 6 15:55:47 2017 -0500 drm/amd/display: enable clock gating and dchubp power gating also refactor to clean reduce loc to achieve same logic Signed-off-by: Tony Cheng Acked-by: Harry Wentland Reviewed-by: Yongqiang Sun Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f33ad37feb12639e3b4015d27840395793107d7b Author: Tony Cheng Date: Sat Jan 14 20:56:08 2017 -0500 drm/amd/display: remove calculate_adjustments in conversion.h - these are moved to color module Signed-off-by: Tony Cheng Acked-by: Harry Wentland Reviewed-by: Aric Cyr Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/conversion.c | 118 --------------------- drivers/gpu/drm/amd/display/dc/basics/conversion.h | 10 -- 2 files changed, 128 deletions(-) commit 5e701406ed446a79787feede65c81b8d3cfbdfb8 Author: Tony Cheng Date: Sat Jan 14 20:56:08 2017 -0500 drm/amd/display: remove dead code Signed-off-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 76 -------------- .../gpu/drm/amd/display/dc/bios/command_table.c | 114 --------------------- .../gpu/drm/amd/display/dc/bios/command_table.h | 7 -- drivers/gpu/drm/amd/display/dc/dc_bios_types.h | 6 -- .../drm/amd/display/include/bios_parser_types.h | 20 ---- 5 files changed, 223 deletions(-) commit a10eadfb152960a760c4f52c42607d27cb3f1543 Author: Tony Cheng Date: Sat Jan 14 20:48:21 2017 -0500 drm/amd/display: remove SIGNAL_TYPE_WIRELESS Signed-off-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/log_helpers.c | 1 - drivers/gpu/drm/amd/display/dc/basics/signal_types.c | 3 +-- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 --- drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 1 - drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 1 - drivers/gpu/drm/amd/display/include/signal_types.h | 4 ---- 6 files changed, 1 insertion(+), 12 deletions(-) commit 6e4d6beec6dae279ec7ac27c9034b2208898f382 Author: Tony Cheng Date: Sat Jan 14 20:36:14 2017 -0500 drm/amd/display: remove hw_info_frame - construct using encoder_info_frame directly Signed-off-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 124 +++++++-------------- .../drm/amd/display/include/hw_sequencer_types.h | 23 ---- 2 files changed, 40 insertions(+), 107 deletions(-) commit 6235b23cb92ba5bf30430400b216ea2114afe777 Author: Tony Cheng Date: Sat Jan 14 18:57:57 2017 -0500 drm/amd/display: remove hw_crtc_timing Signed-off-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dce/dce_stream_encoder.c | 2 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 2 +- .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 2 +- .../drm/amd/display/include/hw_sequencer_types.h | 40 ---------------------- 4 files changed, 3 insertions(+), 43 deletions(-) commit ac0e562c521228215d597fe3ef0c13f02077f700 Author: Tony Cheng Date: Sat Jan 14 11:46:53 2017 -0500 drm/amd/display: remove un-used defines and dead code Signed-off-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/basics/signal_types.c | 35 ------- .../gpu/drm/amd/display/dc/bios/command_table.c | 55 ---------- .../gpu/drm/amd/display/dc/bios/command_table.h | 3 - drivers/gpu/drm/amd/display/dc/core/dc_link.c | 1 - drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- .../display/include/asic_capability_interface.h | 55 ---------- .../amd/display/include/asic_capability_types.h | 116 --------------------- .../drm/amd/display/include/bios_parser_types.h | 8 -- .../drm/amd/display/include/ddc_service_types.h | 7 -- .../gpu/drm/amd/display/include/irq_interface.h | 31 ------ .../drm/amd/display/include/link_service_types.h | 75 ------------- drivers/gpu/drm/amd/display/include/signal_types.h | 3 - 12 files changed, 1 insertion(+), 390 deletions(-) commit bf72726358adfedcf1c268690521891809332151 Author: Tony Cheng Date: Sat Jan 14 01:44:52 2017 -0500 drm/amd/display: assert if mask is 0 in set_reg_field_value_ex - mask = 0 means something is wrong in caller and no register field will be updated Signed-off-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dm_services.h | 1 + 1 file changed, 1 insertion(+) commit f84a8161cb1652281746d113667427dbbf8bd5db Author: Tony Cheng Date: Thu Jan 12 23:18:33 2017 -0500 drm/amd/display: mode change without breaking unaffected streams - include clock constraint logic in validate - in dc_commit_streams, include surfaces of unaffected streams Signed-off-by: Yongqiang Sun Acked-by: Harry Wentland Reviewed-by: Dmytro Laktyushkin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 11 +++++++++-- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/core_status.h | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) commit 858058da47a557b6c0211830d530045c1c8e62ab Author: Andrey Grodzovsky Date: Wed Nov 9 05:41:51 2016 -0500 drm/amd/display: Use pflip prepare and submit parts (v2) Use new functions so flip failures can be gracefully handled v2: Avoid -EINVAL returned from amdgpu_crtc_prepare_flip in some error cases, it is not allowed according to expected return values for atomic_commit hook. Signed-off-by: Andrey Grodzovsky Acked-by: Harry Wentland Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 1 - 1 file changed, 1 deletion(-) commit 721d30cf8363247c0c6cb44514e88a5811151c01 Author: Hersen Wu Date: Fri Jan 13 10:10:26 2017 -0500 drm/amd/display: No audio output heard from DP panel Signed-off-by: Hersen Wu Acked-by: Harry Wentland Reviewed-by: Eagle Yeh Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_audio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cc0cb445ae56890a322abe2cc8df63b1ccab74fb Author: Leon Elazar Date: Wed Jan 11 14:33:36 2017 -0500 drm/amd/display: Fixing some fallout from dc_target removal Also avoid allocating memory dce110_set_output_transfer_func if not needed Signed-off-by: Leon Elazar Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 6 +++-- drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 7 +++++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 30 +++++----------------- .../amd/display/dc/dce110/dce110_opp_regamma_v.c | 7 +++++ .../gpu/drm/amd/display/dc/dce110/dce110_opp_v.c | 6 ++++- .../gpu/drm/amd/display/dc/dce110/dce110_opp_v.h | 4 +++ .../drm/amd/display/dc/dce110/dce110_resource.c | 17 +++++++++--- drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 1 - drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 1 + 9 files changed, 49 insertions(+), 30 deletions(-) commit 7a1c37e00a660b380fe258fed54fd5af6735814e Author: Anthony Koo Date: Thu Jan 12 14:24:11 2017 -0500 drm/amd/display: Disable Modules at Runtime Add NULL check in modules Signed-off-by: Anthony Koo Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher .../drm/amd/display/modules/freesync/freesync.c | 94 +++++++++++++++------- .../gpu/drm/amd/display/modules/inc/mod_freesync.h | 7 -- 2 files changed, 65 insertions(+), 36 deletions(-) commit fcd2f4bf8bbe73ac860d1be275a22a54a8d8d385 Author: Amy Zhang Date: Thu Jan 5 17:12:20 2017 -0500 drm/amd/display: Output Transfer Function Regamma Refactor - Create translation function to translate logical format to hw format - Refactor to use transfer function in dc instead of input gamma Signed-off-by: Amy Zhang Acked-by: Harry Wentland Reviewed-by: Anthony Koo Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 9 + drivers/gpu/drm/amd/display/dc/calcs/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/calcs/gamma_calcs.c | 1481 -------------------- drivers/gpu/drm/amd/display/dc/core/dc.c | 10 +- drivers/gpu/drm/amd/display/dc/dc.h | 11 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 440 +++++- drivers/gpu/drm/amd/display/dc/inc/gamma_calcs.h | 20 - drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 2 - drivers/gpu/drm/amd/display/include/fixed31_32.h | 8 + 9 files changed, 466 insertions(+), 1517 deletions(-) commit 457b74cb3773a1950e49c2d4826d1b295c59bdf1 Author: Yongqiang Sun Date: Wed Jan 11 15:52:06 2017 -0500 drm/amd/display: Null check clock source. Signed-off-by: Yongqiang Sun Acked-by: Harry Wentland Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ab2541b67395088b9de8ebf3943ef9ef86bccc41 Author: Aric Cyr Date: Thu Dec 29 15:27:12 2016 -0500 drm/amd/display: Remove dc_target object dc_target does not fit well into DRM framework so removed it. This will prevent the driver from leveraging the pipe-split code for tiled displays, so will have to be handled at a higher level. Most places that used dc_target now directly use dc_stream instead. Signed-off-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 6 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 47 ++- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 349 +++++++--------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 2 +- drivers/gpu/drm/amd/display/dc/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 292 +++++++------- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 437 ++++++++++----------- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 183 +++++++++ drivers/gpu/drm/amd/display/dc/core/dc_target.c | 333 ---------------- drivers/gpu/drm/amd/display/dc/dc.h | 194 ++++----- drivers/gpu/drm/amd/display/dc/dc_types.h | 1 - .../drm/amd/display/dc/dce100/dce100_resource.c | 89 ++--- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 8 +- .../drm/amd/display/dc/dce110/dce110_resource.c | 103 +++-- .../drm/amd/display/dc/dce112/dce112_resource.c | 144 ++++--- .../drm/amd/display/dc/dce112/dce112_resource.h | 2 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 89 ++--- drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 1 - drivers/gpu/drm/amd/display/dc/inc/core_types.h | 19 +- drivers/gpu/drm/amd/display/dc/inc/resource.h | 13 +- 20 files changed, 977 insertions(+), 1337 deletions(-) commit 624d7c4708b27be2dc095579394efadd80f090dd Author: Yongqiang Sun Date: Mon Jan 9 09:42:33 2017 -0500 drm/amd/display: Pass visible flag into surface programming Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 3 ++- drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h | 3 ++- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 6 ++++-- drivers/gpu/drm/amd/display/dc/dce110/dce110_mem_input.h | 3 ++- drivers/gpu/drm/amd/display/dc/dce110/dce110_mem_input_v.c | 3 ++- drivers/gpu/drm/amd/display/dc/dce110/dce110_mem_input_v.h | 3 ++- drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 3 ++- 7 files changed, 16 insertions(+), 8 deletions(-) commit 02dfc70737ae4eafee202d23d29c16213ee750fb Author: Joshua Aberback Date: Tue Jan 10 14:05:49 2017 -0500 drm/amd/display: Add Polaris12 to bw_calc Signed-off-by: Joshua Aberback Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ea9e02af5572323f79b493ec8d6bfa55effb2f7 Author: Ding Wang Date: Tue Jan 10 12:47:37 2017 -0500 drm/amd/display: Use DTO as clock on DP if not Use DVO as pixel clock for DP before enabling link PHY. Otherwise, when switching from HDMI passive dongle to DP on the same connector, the PHY PLL is used as pixel clock, and CRTC would stop working. Signed-off-by: Ding Wang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 3e183c5f083125986dd0cd0ab609252349983f0e Author: Dave Airlie Date: Tue Jan 10 09:33:32 2017 +1000 drm/amd/display: start using linux hdmi header DAL has defines for things, and it doesn't even use them itself. Signed-off-by: Dave Airlie Reviewed-by: Tony Cheng Reviewed-by: Harry Wentland Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 18 ++++++++---------- .../gpu/drm/amd/display/include/set_mode_types.h | 22 +--------------------- 2 files changed, 9 insertions(+), 31 deletions(-) commit 7d7024ca202c502324dce683f2061b35d113a6aa Author: Dave Airlie Date: Tue Jan 10 08:35:47 2017 +1000 drm/amd/display: drop min/max wrappers These aren't needed, and aren't really used in too many places. Signed-off-by: Dave Airlie Reviewed-by: Tony Cheng Reviewed-by: Harry Wentland Reviewed-by: Edward O'Callaghan Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 4 ++-- drivers/gpu/drm/amd/display/dc/os_types.h | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) commit 00c91d0d480a0c5f6507da80f7e13dab7e6b7c79 Author: Joshua Aberback Date: Mon Jan 9 16:26:58 2017 -0500 drm/amd/display: Support 64-bit Polaris11 5k VSR - pass full asic_id info into bw_calc_init instead of only version enum - 64-bit Polaris11 needs an extra microsecond of dmif_urgent_latency - add helper to convert from asic_id.family to bw_calc version enum Signed-off-by: Joshua Aberback Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c | 40 ++++++++++++++++++---- .../drm/amd/display/dc/dce110/dce110_resource.c | 5 +-- .../drm/amd/display/dc/dce112/dce112_resource.c | 2 +- .../gpu/drm/amd/display/dc/inc/bandwidth_calcs.h | 2 +- 4 files changed, 37 insertions(+), 12 deletions(-) commit 2796eaee69ce139aa5ae8047bf3071650893ce1d Author: Joshua Aberback Date: Mon Jan 9 14:43:08 2017 -0500 drm/amd/display: When signal type of sink is none, use link type for stream Signed-off-by: Joshua Aberback Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 4b5e7d620901778b24a2980bbc9941eff9b47f77 Author: Hersen Wu Date: Fri Jan 6 16:23:18 2017 -0500 drm/amd/display: set blank functionality 1. remove the sleep mechanism while set_blank true from the timing generator. Since Hw sequencer is the one that manages the flow he will be responsible for wait for blanck in a critical places. Signed-off-by: Leon Elazar Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 20 +++++++++++ .../amd/display/dc/dce110/dce110_hw_sequencer.c | 12 +++---- .../display/dc/dce110/dce110_timing_generator.c | 28 +--------------- .../display/dc/dce110/dce110_timing_generator.h | 2 +- .../display/dc/dce110/dce110_timing_generator_v.c | 39 +++------------------- .../drm/amd/display/dc/inc/hw/timing_generator.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 3 ++ 7 files changed, 37 insertions(+), 69 deletions(-) commit b06b7680e341151c8c60b07ddc6f5e63e7392c17 Author: Leon Elazar Date: Thu Jan 5 17:47:43 2017 -0500 drm/amd/display: blank mechanism for supporting MPO blank/unblanck functionality apply_ctx_for_surface will update planes visibility by manipulating Blender and CRTC HW modules. Signed-off-by: Leon Elazar Reviewed-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 --- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 42 +++++++++++++++++++--- 2 files changed, 37 insertions(+), 9 deletions(-) commit cf388c0da8e978ed766b975ceccbf699e98bd476 Author: Arindam Nath Date: Mon Jan 9 11:50:27 2017 +0530 drm/amd/display: fix cursor disappearing after resume Since during suspend, the cursor registers are cleared, once the system resumes back, the cursor remains disabled. cursor_set_attributes() only sets the cursor attributes along with cursor size and surface address, but does not enable the cursor back on. We need to save the current cursor location so that we can resume back to the same location. This is done in dm_crtc_cursor_move(), where we save the current cursor location into cursor_x and cursor_y. Later during resume we use these same values to set the cursor position along with cursor attributes. Signed-off-by: Arindam Nath Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 2555039d129e4e637cbc6a1048d1005dd9c78b7a Author: Xiangliang Yu Date: Tue Jan 10 17:34:52 2017 +0800 drm/amdgpu/virt: disable dc Virtualization don't need the dc, disable it. Signed-off-by: Xiangliang Yu Reviewed-by: Alex Deucher Acked-by: Christian König Reviewed-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+) commit 546b9b619bfe490ed7cf10c39827e4e578ba8135 Author: Yongqiang Sun Date: Fri Jan 6 11:21:47 2017 -0500 drm/amd/display: Don't fail validation for SIGNAL_TYPE_VIRTUAL Signed-off-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 3 +++ 1 file changed, 3 insertions(+) commit c87af595c03e73cc3175cf282858af22b374e20c Author: Tony Cheng Date: Thu Jan 5 12:59:34 2017 -0500 drm/amd/display: remove HDMI deep color debug flag Signed-off-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 - drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 3 --- 2 files changed, 4 deletions(-) commit e33a18f333e8b1abe892e5f5d516e89dffcb5cc3 Author: Tony Cheng Date: Thu Jan 5 11:29:27 2017 -0500 drm/amd/display: fix Infoframe byte 28-31 doesn't get written out to register Signed-off-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 4 ++-- drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 10bff005926af12aa7b1d97ea9bc948ccbaed1c9 Author: Yongqiang Sun Date: Thu Jan 5 11:26:59 2017 -0500 drm/amd/display: Check hdr support before setting. In case of programing info frame to some monitors don't support HDR, it will result in black screen or corruption when unplug monitor. By checking hdr flag to avoid unnecessary setting for monitors don't support HDR. Signed-off-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 +++ .../drm/amd/display/dc/dce/dce_stream_encoder.c | 27 +++++++++++++--------- 2 files changed, 19 insertions(+), 11 deletions(-) commit e66e4d64289b647f7787d257dd2be0055ae7df94 Author: Harry Wentland Date: Wed Jan 4 18:54:29 2017 -0500 drm/amd/display: Fix wrong index bug in set_avi_info_frame Signed-off-by: Harry Wentland Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit e5cf325b0c21e626c402b57a055f02c478e3df40 Author: Harry Wentland Date: Wed Jan 4 18:48:07 2017 -0500 drm/amd/display: Fix warnings in DC Signed-off-by: Harry Wentland Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 9 ++++----- drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 6 ------ drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 1 - drivers/gpu/drm/amd/display/dc/dce110/dce110_ipp_gamma.c | 2 -- 4 files changed, 4 insertions(+), 14 deletions(-) commit 5727c77cf8de2fd603780151b9c9e17828464360 Author: Harry Wentland Date: Wed Jan 4 18:43:04 2017 -0500 drm/amd/display: Fix misleading indentation bug in link_encoder Signed-off-by: Harry Wentland Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7a8b8b1403a115fe303e67d356df7520095222d4 Author: Harry Wentland Date: Wed Jan 4 18:41:25 2017 -0500 drm/amd/display: Remove unused function in gamma_calcs Signed-off-by: Harry Wentland Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/gamma_calcs.c | 39 ---------------------- 1 file changed, 39 deletions(-) commit 7abcf6b5043a94e850d8f38b625fd022492e8303 Author: Andrey Grodzovsky Date: Thu Dec 29 13:21:31 2016 -0500 drm/amd/display: [MST] Fix startup sequence v3. Problem: MST topology discovery was started before fbdev init causing kernel panic on boot. Fix: Defer MST to late init hook, after fbdev strucutres already initilized. v2: Add explicit late_init hook function in DAL. v3: Change signature of detect_mst_link_for_all_connectors from void* to drm_dev* Signed-off-by: Andrey Grodzovsky Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 35 ++++++++++++++--------- 1 file changed, 22 insertions(+), 13 deletions(-) commit bf5cda339d3609408624afcb6f533f4eabc7d142 Author: Hersen Wu Date: Wed Jan 4 10:22:35 2017 -0500 drm/amd/display: Fix DP PHY test pre-emphasis not set properly Signed-off-by: Hersen Wu Reviewed-by: Hersen Wu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 15 +++++++++++---- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 9 +++++---- drivers/gpu/drm/amd/display/dc/dc.h | 3 ++- drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 2 +- 4 files changed, 19 insertions(+), 10 deletions(-) commit 18f39f2d674e6556d169dcf1a42493c2a632c005 Author: Roman Li Date: Tue Jan 3 13:46:45 2017 -0500 drm/amd/display: fix gamma for dpms usecase For dpms usecase we need to set surface transfer function regardless of gamma set flag. Signed-off-by: Roman Li Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 7fc698a0c0e5901923a6d6c04a59aceefffe4c9b Author: Tony Cheng Date: Tue Jan 3 12:40:40 2017 -0500 drm/amd/display: limit HBR3 support to Polaris and up - also fix YCbCr420 supported on Polaris and up Signed-off-by: Tony Cheng Reviewed-by: Hersen Wu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 31 ++++------------------ .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 1 + .../drm/amd/display/dc/dce100/dce100_resource.c | 11 ++++++-- .../drm/amd/display/dc/dce110/dce110_resource.c | 11 ++++++-- .../drm/amd/display/dc/dce112/dce112_resource.c | 15 +++++++++-- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 11 ++++++-- 6 files changed, 46 insertions(+), 34 deletions(-) commit 4dfb0badee55bf163f4ce3307572cd4963c791d0 Author: Tony Cheng Date: Thu Dec 29 10:56:32 2016 -0500 drm/amd/display: simplify link_encoder - remove unnecessary feature flags - remove wireless and VGA validation Signed-off-by: Tony Cheng Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 +-- .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 64 ++-------------------- .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 20 +------ .../amd/display/dc/virtual/virtual_link_encoder.c | 4 -- 4 files changed, 6 insertions(+), 90 deletions(-) commit 73c7260292db3f506b2562cbb25c06adfe90ca99 Author: Hersen Wu Date: Thu Dec 29 14:58:54 2016 -0500 drm/amd/display: Fix link retraining hw sequence for auto test Signed-off-by: Hersen Wu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 ++-- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 27 ++++------------------ drivers/gpu/drm/amd/display/dc/inc/link_hwss.h | 4 +--- 4 files changed, 9 insertions(+), 30 deletions(-) commit 886391680cce3b7c4543b88bbd4eb49c80c26532 Author: Zeyu Fan Date: Fri Dec 23 16:53:12 2016 -0500 drm/amd/display: Fix link retraining hw sequence Signed-off-by: Zeyu Fan Reviewed-by: Hersen Wu Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 15 +++---- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 49 +++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dc.h | 3 +- drivers/gpu/drm/amd/display/dc/inc/link_hwss.h | 4 ++ 4 files changed, 62 insertions(+), 9 deletions(-) commit 84773406bbe77c0be5abe3b616a78bfb34b128ad Author: Harry Wentland Date: Thu Dec 29 15:27:07 2016 -0500 drm/amd/display: Remove unused color and power modules Signed-off-by: Harry Wentland Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/color/color.c | 2825 -------------------- .../drm/amd/display/modules/color/color_helper.c | 210 -- .../drm/amd/display/modules/color/color_helper.h | 62 - .../gpu/drm/amd/display/modules/inc/mod_color.h | 282 -- .../gpu/drm/amd/display/modules/inc/mod_power.h | 112 - drivers/gpu/drm/amd/display/modules/power/power.c | 784 ------ 6 files changed, 4275 deletions(-) commit 649aa6f4fc40395153834ea78531e0cffd5ee49d Author: Tony Cheng Date: Fri Dec 23 11:08:43 2016 -0500 drm/amd/display: enable option to disable HDR related updates. Signed-off-by: Tony Cheng Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++ 1 file changed, 3 insertions(+) commit afed48a00c26cb6cbe2cfe72ce459dc3e13b42d4 Author: Anthony Koo Date: Fri Dec 23 15:43:04 2016 -0500 drm/amd/display: Fix color module crash when hotplug monitors. Assume we have two monitors, and monitor 0 is unplugged. This shifts the internal state of index 1 to index 0 by memcpy. This means there are two copies of the gamma pointer previously owned by state[1]. When hotplug occurs, this re-assigns the new display with state[1], which has some garbage left over from before, including the gamma pointer. We should correctly clear unused states and re-initialize correctly. Also, due to async nature of the hotplug and other events like commit, we also need to safe guard against sink that has been removed. Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/color/color.c | 309 ++++++++++++---------- 1 file changed, 175 insertions(+), 134 deletions(-) commit 5a7a1eebc6199a8e19cc6497cffb3e16d9d55333 Author: Hersen Wu Date: Fri Dec 23 15:13:13 2016 -0500 drm/amd/display: set HBR3 and TPS4 capable flags Signed-off-by: Hersen Wu Reviewed-by: Zeyu Fan Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit aff20230b439921d6660eb2ef6d9f6c273d9b240 Author: Yongqiang Sun Date: Fri Dec 23 10:18:08 2016 -0500 drm/amd/display: Set gamma to NULL at release Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 9 +++++---- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/modules/color/color.c | 8 +++----- 4 files changed, 10 insertions(+), 11 deletions(-) commit d5de97a2b9ec8ba249df6a3e29f20b56285a48dd Author: Hersen Wu Date: Fri Dec 23 10:39:22 2016 -0500 drm/amd/display: Add missing function to fix crash for DP Test pattern 4 Signed-off-by: Hersen Wu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 3 +++ 1 file changed, 3 insertions(+) commit f79d7749e7381b0ff9d26733f338ad767d75539c Author: Harry Wentland Date: Fri Dec 23 10:53:24 2016 -0500 drm/amd/display: Don't use target before null check It might blow up. Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_target.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit e12078c56c24894b07cd3aae43788b90d6ea390e Author: Tony Cheng Date: Fri Dec 23 07:20:53 2016 -0500 drm/amd/display: debug option to disable color module fucntionality Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 13 +++++++------ drivers/gpu/drm/amd/display/dc/dc.h | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) commit dc0bcaf2cafaa7a6023055d13ebf7dcc8c6e00b5 Author: Tony Cheng Date: Fri Dec 23 07:12:19 2016 -0500 drm/amd/display: debug opt disable hdmi deep color Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 3 +++ 2 files changed, 4 insertions(+) commit 1646a6fe746d7e923774994d2020e1707dcda884 Author: Andrew Wong Date: Thu Dec 22 15:41:30 2016 -0500 drm/amd/display: DAL3: HDR10 Infoframe encoding - Add HDR metadata struct - Add register programming calculations - Added HDR metadata to surface and update_surface - Add HDR info packet programming for DP port Signed-off-by: Andrew Wong Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 7 ++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 115 ++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 1 - drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 2 + drivers/gpu/drm/amd/display/dc/dc.h | 23 ++++- .../drm/amd/display/dc/dce/dce_stream_encoder.c | 20 +++- .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 2 + .../drm/amd/display/include/hw_sequencer_types.h | 3 +- drivers/gpu/drm/amd/display/modules/color/color.c | 16 +-- .../gpu/drm/amd/display/modules/inc/mod_color.h | 20 +--- 10 files changed, 176 insertions(+), 33 deletions(-) commit c89a58cd0d1cc940a29a00cc03e441f97fab56e1 Author: Tony Cheng Date: Thu Dec 22 14:54:50 2016 -0500 drm/amd/display: Allow multiple instance of DTO regs Signed-off-by: Tony Cheng Reviewed-by: Jordan Lazare Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 6a1f8cabc651c20bc00d211aef24ea9174141515 Author: Andrey Grodzovsky Date: Thu Dec 15 00:53:04 2016 -0500 drm/amd/display: Pass adev to fill_plane_attr Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit db96c69ee78845c4f4cadea9fd282fb265253874 Author: Andrey Grodzovsky Date: Tue Dec 20 18:01:30 2016 -0500 drm/amd/display: Add refcount debug assert Signed-off-by: Andrey Grodzovsky Signed-off-by: Jordan Lazare Signed-off-by: Tony Cheng Reviewed-by: Andrey Grodzovsky Reviewed-by: Jordan Lazare Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 5 +++-- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 5 ++++- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 14 +++++++++++--- drivers/gpu/drm/amd/display/dc/core/dc_target.c | 4 +++- 4 files changed, 21 insertions(+), 7 deletions(-) commit 8c737fcc24b01ef36da5f78aace70d444485abf9 Author: Yongqiang Sun Date: Thu Dec 22 13:07:11 2016 -0500 drm/amd/display: Fixed crash caused by unnecessary clock source in split pipe. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 20 ++++++++++---------- .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 ++-- drivers/gpu/drm/amd/display/dc/inc/resource.h | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) commit 1c4e6bcefd0e70eae4f1145e334955b4b21ebb42 Author: Yongqiang Sun Date: Thu Dec 22 10:48:19 2016 -0500 drm/amd/display: Fixed split update bug. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 0347c854094c14469ca4be2192e93e773b164741 Author: Harry Wentland Date: Thu Dec 22 10:25:57 2016 -0500 drm/amd/display: Fix licensing header Signed-off-by: Harry Wentland Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/modules/color/color_helper.c | 31 +++++++++++++++------- .../drm/amd/display/modules/color/color_helper.h | 30 ++++++++++++++------- 2 files changed, 42 insertions(+), 19 deletions(-) commit 6680b6a1377f944e5369f456fe1b9d193dd4624b Author: Yongqiang Sun Date: Wed Dec 21 16:48:51 2016 -0500 drm/amd/display: Fixed crash Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 80bd20967261d9438dc814f3e6e904aea053163b Author: Yongqiang Sun Date: Wed Dec 21 11:13:48 2016 -0500 drm/amd/display: reset transfer_func to NULL on release Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 +++- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) commit 0f4e66cd7dac538adca4b1cac8f36b90db1709e6 Author: Yongqiang Sun Date: Wed Dec 21 11:16:48 2016 -0500 drm/amd/display: don't crash if stream is NULL when trying to share clocks Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 5 +++++ 1 file changed, 5 insertions(+) commit d7194cf6b8ddf0344e70834397d0b1af2cc5fe05 Author: Aric Cyr Date: Tue Dec 20 20:24:24 2016 -0500 drm/amd/display: Implement gamma correction using input LUT The dc_gamma in dc_surface will be programmed to the input LUT if provided. If dc_gamma is not provided in dc_surface regamma may be used to emulate gamma. Some refactor and cleanup included as well. Signed-off-by: Aric Cyr Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 17 +- drivers/gpu/drm/amd/display/dc/calcs/gamma_calcs.c | 29 +- drivers/gpu/drm/amd/display/dc/dc.h | 36 --- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 10 + drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 2 - drivers/gpu/drm/amd/display/dc/dce/dce_opp.h | 4 - .../amd/display/dc/dce110/dce110_hw_sequencer.c | 17 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_ipp.c | 1 + drivers/gpu/drm/amd/display/dc/dce110/dce110_ipp.h | 11 +- .../drm/amd/display/dc/dce110/dce110_ipp_gamma.c | 304 ++++++--------------- .../amd/display/dc/dce110/dce110_opp_regamma_v.c | 1 - .../gpu/drm/amd/display/dc/dce110/dce110_opp_v.c | 2 - .../gpu/drm/amd/display/dc/dce110/dce110_opp_v.h | 4 - drivers/gpu/drm/amd/display/dc/dce80/dce80_ipp.c | 1 + drivers/gpu/drm/amd/display/dc/dce80/dce80_ipp.h | 2 - .../gpu/drm/amd/display/dc/dce80/dce80_ipp_gamma.c | 5 - drivers/gpu/drm/amd/display/dc/inc/gamma_types.h | 38 --- drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h | 4 + drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 1 - drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 2 - drivers/gpu/drm/amd/display/modules/color/color.c | 6 +- 21 files changed, 138 insertions(+), 359 deletions(-) commit 3c25e920f011d785725985733ca2625defbf680f Author: Anthony Koo Date: Tue Dec 20 18:48:11 2016 -0500 drm/amd/display: Reset gamma to NULL after release Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/color/color.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit fafba6de3a142f46c78b937ae9783d2d0cab044d Author: Tony Cheng Date: Tue Dec 20 10:54:38 2016 -0500 drm/amd/display: track cursor width in ipp Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9cd09bfeb26e4ef51a6735f585784cd1b46a496c Author: Leon Elazar Date: Mon Dec 19 12:00:05 2016 -0500 drm/amd/display: Add dcc param to surface Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + 1 file changed, 1 insertion(+) commit ae799430c59edb6915e87c7c3ab972a931c796d3 Author: Dmytro Laktyushkin Date: Mon Dec 19 15:41:49 2016 -0500 drm/amd/display: minor clock source refactor This should make it easier to share code with newer ASICs Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 68 +++++++++++----------- .../gpu/drm/amd/display/dc/dce/dce_clock_source.h | 9 ++- 2 files changed, 40 insertions(+), 37 deletions(-) commit 540f7d8068a7278ee0604083aad3c88f0deab6ed Author: Tony Cheng Date: Mon Dec 19 18:54:15 2016 -0500 drm/amd/display: add pitch to cursor attributes Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 1 + 1 file changed, 1 insertion(+) commit b76794d2e7198cf7c73f1b65dbc6dc796ac92685 Author: Tony Cheng Date: Mon Dec 19 12:54:40 2016 -0500 drm/amd/display: 4k split black out due to incorrect cursor - add handling to program both cursor for left and right pipe - add guard to disable cursor in case where cursor isn't visible to prevent pipe hang Signed-off-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_target.c | 83 ++++++++++------------ drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 9 +++ drivers/gpu/drm/amd/display/dc/dce110/dce110_ipp.h | 3 +- .../drm/amd/display/dc/dce110/dce110_ipp_cursor.c | 3 +- drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h | 3 +- 5 files changed, 53 insertions(+), 48 deletions(-) commit 6f3f8d48664d0cecc559ea8c093838c13ba21192 Author: Anthony Koo Date: Mon Dec 19 15:16:12 2016 -0500 drm/amd/display: Fix Regamma end point 1. HW register programmed to wrong value 2. End slope for PQ case not calculated correctly Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/gamma_calcs.c | 34 +++++++++++++++------- drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 4 +-- 2 files changed, 26 insertions(+), 12 deletions(-) commit 5ce0183cdd00d9c9e57405fa5a06d2a97b747aeb Author: Amy Zhang Date: Mon Dec 12 16:57:40 2016 -0500 drm/amd/display: Framework for degamma and regramma through color module Signed-off-by: Amy Zhang Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/color/color.c | 575 +++++++++++++++++---- .../drm/amd/display/modules/color/color_helper.h | 2 +- .../gpu/drm/amd/display/modules/inc/mod_color.h | 115 ++++- 3 files changed, 598 insertions(+), 94 deletions(-) commit b39474ef0925a748d0dd43521fc1192777afd329 Author: Dave Airlie Date: Tue Dec 13 16:41:12 2016 +1000 drm/amd/display: assign correct enum for edp revision There are 2 edp enum revisions, no idea why, drop one, and just assign 1.1 to the default value. Signed-off-by: Dave Airlie Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- drivers/gpu/drm/amd/display/include/dpcd_defs.h | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) commit 3a340294f7e7a784c83f9cd72f49987cc7daaced Author: Dave Airlie Date: Tue Dec 13 16:41:11 2016 +1000 drm/amd/display: port to using drm dpcd defines We only keep one list of these defines in the kernel, so we should use it. Signed-off-by: Dave Airlie Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 +- drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 144 ++++++------- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 2 +- drivers/gpu/drm/amd/display/include/dpcd_defs.h | 223 +-------------------- 5 files changed, 79 insertions(+), 300 deletions(-) commit eaca91eea60e5b0732b7e9ab213359d75f36901f Author: Harry Wentland Date: Mon Dec 19 14:10:53 2016 -0500 drm/amd/display: Move dpcd structs into dp_types header Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 1 + drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 1 + drivers/gpu/drm/amd/display/dc/dc.h | 1 - drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 359 +++++++++++++++++++++ drivers/gpu/drm/amd/display/include/dpcd_defs.h | 358 -------------------- .../drm/amd/display/include/link_service_types.h | 1 - 6 files changed, 361 insertions(+), 360 deletions(-) commit 2c755dae303fa7eecc6400b2dcb544298d1e2e3e Author: Dave Airlie Date: Tue Dec 13 16:41:09 2016 +1000 drm/amd/display: drop setmode complete notifier Signed-off-by: Dave Airlie Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 13 ------------- 1 file changed, 13 deletions(-) commit e285917063641f00086242d6c927ace9de24c357 Author: Dave Airlie Date: Tue Dec 13 16:41:08 2016 +1000 drm/amd/display: drop get platform info Signed-off-by: Dave Airlie Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 7 ----- drivers/gpu/drm/amd/display/dc/dm_services.h | 32 ---------------------- 2 files changed, 39 deletions(-) commit 2a0998846d2eadabf8c5770f66feb3cb04ad88b5 Author: Dave Airlie Date: Tue Dec 13 16:41:07 2016 +1000 drm/amd/display: drop register logger and pid/tgid getters While I'm sure this is useful I think we should bring it back later. It's usage of pid/tgid is incorrect, you have to get/put pid/tgids not store them away. Signed-off-by: Dave Airlie Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 10 -- drivers/gpu/drm/amd/display/dc/basics/Makefile | 2 +- .../drm/amd/display/dc/basics/register_logger.c | 197 --------------------- drivers/gpu/drm/amd/display/dc/dm_services.h | 16 -- .../drm/amd/display/include/dal_register_logger.h | 42 ----- 5 files changed, 1 insertion(+), 266 deletions(-) commit 55b99b4640d4898c140fef7073291918a6e32539 Author: Dave Airlie Date: Tue Dec 13 16:41:06 2016 +1000 drm/amd/display: remove some unused wrappers Signed-off-by: Dave Airlie Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 4 ---- 1 file changed, 4 deletions(-) commit 1964cb736aaa094379d47aa1dc056a5531cecbd6 Author: Dave Airlie Date: Tue Dec 13 16:41:05 2016 +1000 drm/amd/display: remove dc hub - this seems unused. Signed-off-by: Dave Airlie Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 27 ---------------------- drivers/gpu/drm/amd/display/dc/dc.h | 17 -------------- .../drm/amd/display/dc/dce110/dce110_mem_input.c | 1 - .../gpu/drm/amd/display/dc/dce80/dce80_mem_input.c | 1 - drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 2 -- 5 files changed, 48 deletions(-) commit 538735e9e501056a4370d445bffec4ecb2a59ca4 Author: Anthony Koo Date: Fri Dec 16 12:12:03 2016 -0500 drm/amd/display: Fix programming of gamma end points Signed-off-by: Anthony Koo Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/gamma_calcs.c | 51 ++++++++++++---------- 1 file changed, 27 insertions(+), 24 deletions(-) commit 4a69244eb63794cc48ad3653e0f16f2eb096fcd7 Author: Anthony Koo Date: Fri Dec 16 12:12:03 2016 -0500 drm/amd/display: Fix distribution of segments for PQ For PQ case, redistribution of segments should be done differently for FP16 case in order to handle content above FP16 value of 1.0 Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/gamma_calcs.c | 51 ++++++++++++++++++++-- 1 file changed, 48 insertions(+), 3 deletions(-) commit ab3ee7a556343c9549ccbefb9d31039377806f28 Author: Zeyu Fan Date: Wed Dec 14 18:54:41 2016 -0500 drm/amd/display: OPP refactor and consolidation for DCE. Signed-off-by: Zeyu Fan Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/Makefile | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_opp.c | 996 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_opp.h | 418 +++++++++ .../drm/amd/display/dc/dce100/dce100_resource.c | 61 +- drivers/gpu/drm/amd/display/dc/dce110/Makefile | 4 +- drivers/gpu/drm/amd/display/dc/dce110/dce110_opp.c | 77 -- drivers/gpu/drm/amd/display/dc/dce110/dce110_opp.h | 149 --- .../gpu/drm/amd/display/dc/dce110/dce110_opp_csc.c | 363 -------- .../drm/amd/display/dc/dce110/dce110_opp_csc_v.c | 2 +- .../amd/display/dc/dce110/dce110_opp_formatter.c | 627 ------------- .../drm/amd/display/dc/dce110/dce110_opp_regamma.c | 537 ----------- .../amd/display/dc/dce110/dce110_opp_regamma_v.c | 2 +- .../gpu/drm/amd/display/dc/dce110/dce110_opp_v.c | 2 +- .../drm/amd/display/dc/dce110/dce110_resource.c | 60 +- drivers/gpu/drm/amd/display/dc/dce112/Makefile | 3 +- drivers/gpu/drm/amd/display/dc/dce112/dce112_opp.c | 72 -- drivers/gpu/drm/amd/display/dc/dce112/dce112_opp.h | 48 - .../amd/display/dc/dce112/dce112_opp_formatter.c | 215 ----- .../drm/amd/display/dc/dce112/dce112_resource.c | 70 +- drivers/gpu/drm/amd/display/dc/dce80/Makefile | 5 +- drivers/gpu/drm/amd/display/dc/dce80/dce80_opp.c | 136 --- drivers/gpu/drm/amd/display/dc/dce80/dce80_opp.h | 130 --- .../gpu/drm/amd/display/dc/dce80/dce80_opp_csc.c | 363 -------- .../drm/amd/display/dc/dce80/dce80_opp_formatter.c | 577 ------------ .../drm/amd/display/dc/dce80/dce80_opp_regamma.c | 543 ----------- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 45 +- 26 files changed, 1547 insertions(+), 3960 deletions(-) commit e63d86dc9b59d72cf25c6bc75e641bceed4fcd40 Author: Anthony Koo Date: Fri Dec 16 12:12:03 2016 -0500 drm/amd/display: Implement PQ curve based on output transfer function Refactor part 5 - Regamma programming should be dependent on Output transfer function type Program sRGB gamma or PQ transfer function based on output transfer function. Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/calcs/gamma_calcs.c | 93 ++++++++++++++++++++-- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 3 +- drivers/gpu/drm/amd/display/dc/inc/gamma_calcs.h | 3 +- 3 files changed, 92 insertions(+), 7 deletions(-) commit c5ea922237f7dda25c488810a7c1ee9deadc9684 Author: Anthony Koo Date: Fri Dec 16 10:43:21 2016 -0500 drm/amd/display: Refactor to move gamma correction to module Refactor part 4 - Moving input gamma correction programming into color module DM will translate to dc_gamma structure, but programming will be moved into the color module. Later, this will allow gamma correction to be added on top of in/out transfer function curves. Signed-off-by: Anthony Koo Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/color/color.c | 77 ++++++++++++++++++++++ .../gpu/drm/amd/display/modules/inc/mod_color.h | 4 ++ 2 files changed, 81 insertions(+) commit cb9a5a90eee4a02ea529b3101645bb959efaf4a8 Author: Dmytro Laktyushkin Date: Thu Dec 15 13:53:15 2016 -0500 drm/amd/display: define reg helpers to update registers with 8 and 9 fields Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/inc/reg_helper.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 90e508ba253c9e43711a7bf16230cdb13d0b1440 Author: Anthony Koo Date: Thu Dec 15 12:09:46 2016 -0500 drm/amd/display: Refactor output transfer function to stream Refactor part 3 - Moving output transfer function from surface to stream Split HWSS to program degamma and regamma separately. Degamma should be dependent on input transfer function. And Regamma should depend on the desired output transfer function. Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 11 ++++ drivers/gpu/drm/amd/display/dc/core/dc.c | 23 +++++--- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 3 + drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 6 +- drivers/gpu/drm/amd/display/dc/dc.h | 9 +-- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 65 ++++++++++++++++++---- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 3 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 7 ++- 8 files changed, 97 insertions(+), 30 deletions(-) commit 9cdc4e7ce4cae74bbe64a0e0ed15655dfa50a8a1 Author: Roman Li Date: Thu Dec 15 11:51:09 2016 -0500 drm/amd/display: fix hotplug regression after code refactor The condition logic of REG_WAIT in dce110_stream_encoder_dp_blank() got inverted after refactoring. Signed-off-by: Roman Li Reviewed-by: Jordan Lazare Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa66df58b2f272dad459c9f02fa3718d844b9fc6 Author: Yongqiang Sun Date: Thu Dec 15 10:50:48 2016 -0500 drm/amd/display: Add debug option to disable dmcu Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 3 +++ 2 files changed, 4 insertions(+) commit ea24af3e21192a719603ed02ec42e549e3c4a66a Author: Anthony Koo Date: Wed Dec 14 16:26:27 2016 -0500 drm/amd/display: Refactor to move color helper into module Refactor part 2 - Moving color helper into color module The color module will need table defined in the helper in order to calculate the logical regamma curve, and also to fully handle gamut remapping. Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/modules/color/color_helper.c | 199 +++++++++++++++++++++ .../drm/amd/display/modules/color/color_helper.h | 50 ++++++ .../gpu/drm/amd/display/modules/inc/mod_color.h | 4 +- 3 files changed, 251 insertions(+), 2 deletions(-) commit b90a2b23edeb1f5181c7baf0ecd305c7e6ab20b4 Author: Yongqiang Sun Date: Wed Dec 14 16:05:22 2016 -0500 drm/amd/display: Resolved HDMI assert in dal Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b264d3455d9c8ce0bea422a04a867f0a724c7770 Author: Jordan Lazare Date: Wed Dec 14 15:35:13 2016 -0500 drm/amd/dal: Add POLARIS12 support (v2) v2: agd: squash in dm fix, rebase Signed-off-by: Jordan Lazare Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 ++- drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 3 ++- drivers/gpu/drm/amd/display/include/dal_asic_id.h | 5 ++++- 4 files changed, 10 insertions(+), 3 deletions(-) commit ac58fff1551672c925b0ec2879c4653a69771ee2 Author: Dave Airlie Date: Wed Apr 19 13:15:18 2017 -0400 drm/dp-helper: add missing defines needed by AMD display core. These are all the ones required by the AMD display core. Signed-off-by: Dave Airlie Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher include/drm/drm_dp_helper.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit fb735a9f29f94fcb29fee224b8da704a510a5a3a Author: Anthony Koo Date: Tue Dec 13 13:59:41 2016 -0500 drm/amd/display: Add in/out transfer functions to DC Refactor part 1 of degamma/regamma programming. End goal is to have source and output transfer function in which dc can use to decide how to program the degamma and regamma HW. Gamma will be explicitly applied through dc_update_surfaces_for_target. Color module should build the logical curve with all adjustments applied and pass enough information for dc to program HW PWL. Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 38 +++++++++++-- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 64 ++++++++++++++++------ drivers/gpu/drm/amd/display/dc/dc.h | 40 +++++++++++++- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 36 ++++-------- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 5 ++ drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 4 +- 6 files changed, 135 insertions(+), 52 deletions(-) commit 88499197de090c9bb391cc11bf9410b9f020092f Author: Yongqiang Sun Date: Mon Dec 12 14:20:45 2016 -0500 drm/amd/display: Moved swizzle parameter translation to dc. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/basics/conversion.c | 9 +++++++++ drivers/gpu/drm/amd/display/dc/basics/conversion.h | 2 ++ drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 11 +---------- 3 files changed, 12 insertions(+), 10 deletions(-) commit 1e3d346f4fbb48f0a89134f4b834d3be2df3cc25 Author: Vitaly Prosyak Date: Tue Dec 13 14:23:16 2016 -0600 drm/amd/display: re gamma programming Fix gamma update logic to avoid crash Signed-off-by: Vitaly Prosyak Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 30018e9fa27506933f232aaacfc0145ccb094272 Author: Zeyu Fan Date: Mon Dec 12 13:54:56 2016 -0500 drm/amd/display: Fix HDMI scaling corruption issue. Signed-off-by: Zeyu Fan Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 5 +++++ drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit 4b5752c7422f36664cea2ed300b698b4755b6dc5 Author: Andrew Wong Date: Mon Dec 12 11:47:47 2016 -0500 drm/amd/display: Retrieve windowed fullscreen state - Retrieve windowed fullscreen state when getting freesync params. Signed-off-by: Andrew Wong Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 3 +++ 1 file changed, 3 insertions(+) commit 98d2cc2b03d937af36ce5ef227ae57232bbe8471 Author: Andrew Wong Date: Mon Dec 12 11:17:06 2016 -0500 drm/amd/display: Change locking of registers when flipping frames. - Introduce GRPH_UPDATE_LOCK around programming surface flip. - Remove the now unused graphic surface lock. - Add macros to get and set four registers - both immediate and H Retrace should not be enabled at the same time Signed-off-by: Andrew Wong Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 9 +-------- drivers/gpu/drm/amd/display/dc/dc_helper.c | 14 ++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 11 +++-------- .../gpu/drm/amd/display/dc/dce110/dce110_mem_input.c | 17 +++++++++++++++-- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 3 +-- drivers/gpu/drm/amd/display/dc/inc/reg_helper.h | 13 +++++++++++++ 6 files changed, 47 insertions(+), 20 deletions(-) commit 89e8963036085e4e0e9a993d2e1bdbb931d53794 Author: Amy Zhang Date: Mon Dec 12 10:32:24 2016 -0500 drm/amd/display: Fix Gamma Adjustment - Gamma correction is not properly copied to the surface after refactor - Make sure gamma correction is copied with correct retain Signed-off-by: Amy Zhang Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 14 ++++++++++++-- drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 3 ++- drivers/gpu/drm/amd/display/dc/dc.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) commit 9474980ac470a20d244318db9a7c12be01437805 Author: Yongqiang Sun Date: Thu Dec 8 09:47:11 2016 -0500 drm/amd/display: Added timing sync trace. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 32 ++++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../amd/display/dc/dce110/dce110_hw_sequencer.c | 1 - .../gpu/drm/amd/display/include/logger_interface.h | 5 ++++ 5 files changed, 41 insertions(+), 2 deletions(-) commit 5ea81b91857882bb5bfa883fb27671133957a96c Author: Dmytro Laktyushkin Date: Mon Dec 5 18:03:04 2016 -0500 drm/amd/display: fix up construction of scratch_val_ctx Signed-off-by: Dmytro Laktyushkin Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 12 ++++++------ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 922aa1e15e03ee2b32f50cd8a9d2c8376a19d22c Author: Andrey Grodzovsky Date: Wed Dec 7 14:10:05 2016 -0500 drm/amd/display: Fix refcount over dc_sink. Retain a dc_sink pointer until a new physical pointer arrives in case of new display connected. Signed-off-by: Andrey Grodzovsky Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit f4c07f88cc30e77d2431b5bcf95a05e0ee6f3482 Author: Tony Cheng Date: Tue Dec 6 21:22:17 2016 -0500 drm/amd/display: avoid apply_clk_constraints for address update - dc_update_surfaces_for_target get called in ISR but apply_clk_constraints allocates memory Signed-off-by: Tony Cheng Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++ 1 file changed, 2 insertions(+) commit edbd58af6998217c5c1ab91cb6ca239c607cc9e0 Author: Tony Cheng Date: Tue Dec 6 22:12:09 2016 -0500 drm/amd/display: fix indexing bug - is_new_pipe_surface should be addressed with pipe idx, not surface idx Signed-off-by: Tony Cheng Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 091a97e542cf9a9af6e48aa1324044433ea7341a Author: Harry Wentland Date: Tue Dec 6 12:25:52 2016 -0500 drm/amd/display: Fix warning. Set MAX_SURFACES to 3 Currently we never use more than 2 surfaces in all use cases. This avoids pushing dc_commit_surfaces_to_target beyond a stacksize of 1024. Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eaf9094475504effe1a798199a1a118299cf0f74 Author: Harry Wentland Date: Tue Dec 6 12:01:23 2016 -0500 drm/amd/display: Fix warning in freesync module Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 3 +++ 1 file changed, 3 insertions(+) commit a33fa99d8b8ec71a69e089e39ab1498d31169640 Author: Harry Wentland Date: Tue Dec 6 11:26:08 2016 -0500 drm/amd/display: Fix bunch of warnings in DC Some of those are potential bugs Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 5 ++- .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 5 --- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 41 ---------------------- drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 2 -- .../drm/amd/display/dc/dce110/dce110_transform_v.c | 3 +- 6 files changed, 5 insertions(+), 53 deletions(-) commit 49c07a99b2bdd6e6ed621f728d58d8535cc87a61 Author: Arindam Nath Date: Mon Dec 5 19:21:26 2016 +0530 drm/amd/display: remove DM_NOT_IMPL messages Some functions like dm_bandwidth_update are placeholders for future implementations. Right now, they simply print messages like "DM_NOT_IMPL: dm_bandwidth_update". This message even though informational, sometimes can create some confusion for users. Since these functions are only skeletons for future, we simply remove the rather un-unecessary messages from these functions. Signed-off-by: Arindam Nath Reviewed-by: Christian König Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit e11b86ad7d97671ec9543824de0529bd3f8d2db7 Author: Dmytro Laktyushkin Date: Fri Dec 2 14:48:04 2016 -0500 drm/amd/display: moving remaining functionality from gpu to dce_clocks Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/Makefile | 7 +- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 183 ++++++++++++-- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.h | 36 ++- drivers/gpu/drm/amd/display/dc/gpu/Makefile | 21 -- .../display/dc/gpu/dce112/display_clock_dce112.c | 277 --------------------- .../display/dc/gpu/dce112/display_clock_dce112.h | 79 ------ drivers/gpu/drm/amd/display/dc/gpu/divider_range.c | 127 ---------- drivers/gpu/drm/amd/display/dc/gpu/divider_range.h | 62 ----- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 +- .../gpu/drm/amd/display/dc/inc/hw/display_clock.h | 61 +++++ .../amd/display/include/display_clock_interface.h | 66 ----- 11 files changed, 257 insertions(+), 664 deletions(-) commit e91dbe3dee1acae4909bcc33288d47a779e8b27f Author: Ding Wang Date: Mon Dec 5 18:20:51 2016 -0500 drm/amd/display: Temporarily blocking interlacing mode until it's supported. Signed-off-by: Ding Wang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c | 4 ++++ 1 file changed, 4 insertions(+) commit 13625c7bf328c9e201363eba3c3e5a15560c4ae9 Author: Dmytro Laktyushkin Date: Tue Nov 29 13:11:08 2016 -0500 drm/amd/display: create scratch_val_ctx as temp w/a Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 5 ++++- drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) commit b007045674723f649e8a9cf0504dc987a141160d Author: Wenjing Liu Date: Wed Nov 30 17:57:24 2016 -0500 drm/amd/display: use rgb full range as default quantization for non HDMI Refactor the quantization decision to color module. Add the check if non HDMI, default quantization should be rgb full range. Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/color/color.c | 88 ++++++++++++++++++++-- .../gpu/drm/amd/display/modules/inc/mod_color.h | 12 ++- 2 files changed, 94 insertions(+), 6 deletions(-) commit 85944914f1de9b12fb2867f8dd835835f08861a2 Author: Dmytro Laktyushkin Date: Fri Dec 2 17:41:42 2016 -0500 drm/amd/display: fix display clock integrated info read Signed-off-by: Dmytro Laktyushkin Reviewed-by: Dmytro Laktyushkin Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8318a7eb988c62fa231c71538628ba85d4fbe7ef Author: Dmytro Laktyushkin Date: Fri Dec 2 10:55:32 2016 -0500 drm/amd/display: add newline to generic_reg_wait timeout message Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dc_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a70eba7f2c65b408ee56c7219b0cb4ae588b2bc Author: Dmytro Laktyushkin Date: Thu Dec 1 18:13:25 2016 -0500 drm/amd/display: consolidate dce8-11.2 display clock code Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/Makefile | 3 +- drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 4 +- drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 519 +++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/dce_clocks.h | 133 ++++++ .../drm/amd/display/dc/dce100/dce100_resource.c | 22 +- .../drm/amd/display/dc/dce110/dce110_resource.c | 24 +- .../drm/amd/display/dc/dce112/dce112_resource.c | 28 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 70 +-- drivers/gpu/drm/amd/display/dc/dm_services_types.h | 18 +- drivers/gpu/drm/amd/display/dc/gpu/Makefile | 15 - .../display/dc/gpu/dce110/display_clock_dce110.c | 516 -------------------- .../display/dc/gpu/dce110/display_clock_dce110.h | 50 -- .../display/dc/gpu/dce112/display_clock_dce112.c | 152 ------ .../display/dc/gpu/dce112/display_clock_dce112.h | 14 - .../amd/display/dc/gpu/dce80/display_clock_dce80.c | 430 ----------------- .../amd/display/dc/gpu/dce80/display_clock_dce80.h | 54 --- .../amd/display/include/display_clock_interface.h | 15 +- 17 files changed, 747 insertions(+), 1320 deletions(-) commit e9c58bb439bce021da205df09057fe6908ff54c5 Author: Dmytro Laktyushkin Date: Wed Nov 30 16:07:50 2016 -0500 drm/amd/display: remove clocks_state enum Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 3 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 4 +- .../drm/amd/display/dc/dce110/dce110_resource.c | 44 +-------------- .../drm/amd/display/dc/dce110/dce110_resource.h | 3 - .../drm/amd/display/dc/dce112/dce112_resource.c | 3 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 24 ++++---- .../display/dc/gpu/dce110/display_clock_dce110.c | 62 +++++---------------- .../display/dc/gpu/dce112/display_clock_dce112.c | 62 +++++---------------- .../display/dc/gpu/dce112/display_clock_dce112.h | 8 +-- .../amd/display/dc/gpu/dce80/display_clock_dce80.c | 64 ++++++---------------- .../amd/display/dc/gpu/dce80/display_clock_dce80.h | 2 +- .../amd/display/include/display_clock_interface.h | 28 ++-------- 13 files changed, 75 insertions(+), 236 deletions(-) commit 95015be8f483afbdef32f24ac666c625a1480cc1 Author: Dmytro Laktyushkin Date: Wed Nov 30 15:45:51 2016 -0500 drm/amd/display: remove get_min_clocks_state Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 10 +---- .../display/dc/gpu/dce110/display_clock_dce110.c | 42 +++++++++++--------- .../display/dc/gpu/dce112/display_clock_dce112.c | 45 ++++++++++++---------- .../display/dc/gpu/dce112/display_clock_dce112.h | 2 +- .../amd/display/dc/gpu/dce80/display_clock_dce80.c | 30 ++++++++------- .../amd/display/include/display_clock_interface.h | 2 - 6 files changed, 67 insertions(+), 64 deletions(-) commit 5cb5c31cdf246099f7d48a57f448b05b7941cd6a Author: Johannes Berg Date: Tue Sep 19 13:08:13 2017 +0200 scripts/kernel-doc: warn on excess enum value descriptions The existing message "Excess struct/union/enum/typedef member [...]" made it sound like this would already be done, but the code is never invoked for enums or typedefs (and really can't be). Add some code to the enum dumper to handle this there instead. While at it, also make the above message more accurate by simply dumping the type that was passed in, and pass the struct/union differentiation in. Signed-off-by: Johannes Berg Signed-off-by: Jonathan Corbet scripts/kernel-doc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 3bad7c5ccfacca7a893b2960d872878d75a151d7 Author: Dmytro Laktyushkin Date: Wed Nov 30 14:26:37 2016 -0500 drm/amd/display: remove store clock state Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../drm/amd/display/dc/dce100/dce100_resource.c | 8 +--- .../drm/amd/display/dc/dce110/dce110_resource.c | 8 +--- .../drm/amd/display/dc/dce112/dce112_resource.c | 8 +--- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 8 +--- .../display/dc/gpu/dce110/display_clock_dce110.c | 47 +++----------------- .../display/dc/gpu/dce110/display_clock_dce110.h | 2 - .../display/dc/gpu/dce112/display_clock_dce112.c | 50 +++------------------- .../display/dc/gpu/dce112/display_clock_dce112.h | 2 - .../amd/display/dc/gpu/dce80/display_clock_dce80.c | 50 +++------------------- .../amd/display/dc/gpu/dce80/display_clock_dce80.h | 2 - .../amd/display/include/display_clock_interface.h | 5 +-- 11 files changed, 29 insertions(+), 161 deletions(-) commit 5d6d185f32eb0cce16caff13e716d08b594a6046 Author: Dmytro Laktyushkin Date: Wed Nov 30 11:03:37 2016 -0500 drm/amd/display: restyle display clock calls part 2 Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc_link.c | 11 ++-- .../drm/amd/display/dc/dce100/dce100_resource.c | 4 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 13 ++-- .../drm/amd/display/dc/dce110/dce110_resource.c | 4 +- .../drm/amd/display/dc/dce112/dce112_resource.c | 4 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 4 +- drivers/gpu/drm/amd/display/dc/gpu/Makefile | 2 +- .../display/dc/gpu/dce110/display_clock_dce110.h | 2 +- .../display/dc/gpu/dce112/display_clock_dce112.h | 2 +- .../amd/display/dc/gpu/dce80/display_clock_dce80.h | 2 +- drivers/gpu/drm/amd/display/dc/gpu/display_clock.c | 75 ---------------------- drivers/gpu/drm/amd/display/dc/gpu/display_clock.h | 31 --------- .../amd/display/include/display_clock_interface.h | 11 ---- 13 files changed, 30 insertions(+), 135 deletions(-) commit 1a687574a71f187dedcab3ac6012b0889c5a4e99 Author: Dmytro Laktyushkin Date: Wed Nov 30 10:49:51 2016 -0500 drm/amd/display: restyle display clock calls part 1 Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +- .../drm/amd/display/dc/dce100/dce100_resource.c | 2 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 48 ++++------------------ .../drm/amd/display/dc/dce110/dce110_resource.c | 2 +- .../drm/amd/display/dc/dce112/dce112_resource.c | 2 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 2 +- .../display/dc/gpu/dce112/display_clock_dce112.c | 1 - .../display/dc/gpu/dce112/display_clock_dce112.h | 1 - drivers/gpu/drm/amd/display/dc/gpu/display_clock.c | 20 --------- drivers/gpu/drm/amd/display/dc/gpu/display_clock.h | 30 -------------- drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 2 - .../amd/display/include/display_clock_interface.h | 35 ++++++++++++---- 12 files changed, 42 insertions(+), 107 deletions(-) commit 00d64d289fbba7f147b3a3a6fe88ca473ef6468d Author: Dmytro Laktyushkin Date: Tue Nov 29 17:22:27 2016 -0500 drm/amd/display: remove dead display clock code Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher .../display/dc/gpu/dce110/display_clock_dce110.c | 468 +------------------- .../display/dc/gpu/dce110/display_clock_dce110.h | 1 - .../display/dc/gpu/dce112/display_clock_dce112.c | 477 +-------------------- .../display/dc/gpu/dce112/display_clock_dce112.h | 18 - .../amd/display/dc/gpu/dce80/display_clock_dce80.c | 476 +------------------- .../amd/display/dc/gpu/dce80/display_clock_dce80.h | 1 - drivers/gpu/drm/amd/display/dc/gpu/display_clock.c | 122 ------ drivers/gpu/drm/amd/display/dc/gpu/display_clock.h | 28 -- .../amd/display/include/display_clock_interface.h | 85 ---- 9 files changed, 29 insertions(+), 1647 deletions(-) commit 565968219c7a8feebd0b0b0b960563d9a3500ba5 Author: Yongqiang Sun Date: Thu Dec 1 13:37:25 2016 -0500 drm/amd/display: Add missing GRPH register definition Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h | 1 + 1 file changed, 1 insertion(+) commit 197062bf12d7a516ea96e24859fe5981e30ea9ff Author: Tony Cheng Date: Wed Nov 30 16:15:47 2016 -0500 drm/amd/display: refactor DCE11 DVVM - move to new programming style - clean up table to make it obvious what we are programming Signed-off-by: Tony Cheng Reviewed-by: Zeyu Fan Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 135 ++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h | 59 +++++++-- .../drm/amd/display/dc/dce100/dce100_resource.c | 6 +- .../drm/amd/display/dc/dce110/dce110_mem_input.c | 113 +---------------- .../drm/amd/display/dc/dce110/dce110_mem_input.h | 11 -- .../drm/amd/display/dc/dce110/dce110_mem_input_v.c | 8 +- .../drm/amd/display/dc/dce110/dce110_resource.c | 6 +- .../drm/amd/display/dc/dce112/dce112_resource.c | 6 +- .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 6 +- drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 4 +- 10 files changed, 201 insertions(+), 153 deletions(-) commit 22f050be1558a878f0fec34e8efbb89f5c17a5eb Author: Roman Li Date: Wed Nov 30 16:23:16 2016 -0500 drm/amd/display: fix REG_SET_5 macro Signed-off-by: Roman Li Reviewed-by: Tony Cheng Reviewed-by: Roman Li Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/inc/reg_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f60ea68d43798d9c366a8a38d4602fb7f12786e7 Author: Harry Wentland Date: Thu Dec 1 10:00:09 2016 -0500 drm/amd/display: Remove obsolete LATEST_ATOM_BIOS_SUPPORT Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/bios/Makefile | 1 - drivers/gpu/drm/amd/display/dc/bios/command_table.c | 16 ---------------- 2 files changed, 17 deletions(-) commit b32c34ae480b5f16e2a8efab56e39d58a191fd1e Author: Harry Wentland Date: Thu Dec 1 09:43:14 2016 -0500 drm/amd/display: Removing extra newline Signed-off-by: Harry Wentland Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/os_types.h | 1 - 1 file changed, 1 deletion(-) commit 0971d745f68bcd6eeda1d1a7420142dc41fac798 Author: Wenjing Liu Date: Wed Nov 30 12:10:35 2016 -0500 drm/amd/display: Update rgb limited range csc matrix calculation The issue causes hue adjustment for rgb limited range color space programmed wrong. Update calculation formula for rgb limited range Signed-off-by: Wenjing Liu Reviewed-by: Anthony Koo Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/modules/color/color.c | 300 ++++++++++++++++------ 1 file changed, 216 insertions(+), 84 deletions(-) commit 1293b4339fb09693bdfc938495b671f0ac9bfae5 Author: Joshua Aberback Date: Tue Nov 29 17:56:05 2016 -0500 drm/amd/display: Block 3D Timings - we don't yet support 3D timings in DAL3 - somehow a code path was being executed that resulted in HW programming for a 3D timing, which caused 3D displays to show half the desktop in one frame, and the other half of the desktop in the next frame - blocking all 3D timings in timing generator validation until we implement proper 3D timing support Signed-off-by: Joshua Aberback Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c | 4 ++++ 1 file changed, 4 insertions(+) commit ead964f24e111aa5ba6ec4c2ee15ae20f11a121a Author: jimqu Date: Mon Nov 28 08:05:46 2016 +0800 drm/amd/display: Fix memory corruption issue. temp_flip_context is always same as current_context, and the current_context will be freed in dc_commit_targets(), but temp_flip_context will be used in dc_update_surfaces_for_target(). Signed-off-by: JimQu Reviewed-by: Andrey Grodzovsky Acked-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/core/dc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 8e545104aa05b5e0720fd2042e2f9729f9c13744 Author: Zeyu Fan Date: Tue Dec 6 12:59:52 2016 -0500 drm/amd/display: Fix bugs causing Hawaii and Bonaire not light up. Signed-off-by: Zeyu Fan Acked-by: Jordan Lazare Signed-off-by: Alex Deucher .../gpu/drm/amd/display/dc/bios/dce110/command_table_helper_dce110.c | 2 +- .../gpu/drm/amd/display/dc/bios/dce112/command_table_helper_dce112.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 56bc1c42610aa6328e6c4b222dc076acffb40243 Author: Zeyu Fan Date: Wed Dec 7 11:28:03 2016 -0500 drm/amd/display: Fix hdmi not lighting up on Hawaii. Signed-off-by: Zeyu Fan Acked-by: Jordan Lazare Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39cc5be276d4ea7d64531f6f207e57f27bdba47d Author: Alex Deucher Date: Tue Dec 13 15:42:48 2016 -0500 drm/amd/dc/dm: remove redundant display structs Now that the mc_access functions are gone, we no longer need separate structs for all the different dce families in dm. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 60 ++--------------------- 1 file changed, 4 insertions(+), 56 deletions(-) commit 4562236b3bc0a28aeb6ee93b2d8a849a4c4e1c7c Author: Harry Wentland Date: Tue Sep 12 15:58:20 2017 -0400 drm/amd/dc: Add dc display driver (v2) Supported DCE versions: 8.0, 10.0, 11.0, 11.2 v2: rebase against 4.11 Signed-off-by: Harry Wentland Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Kconfig | 1 + drivers/gpu/drm/amd/amdgpu/Makefile | 17 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 15 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 93 +- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 + drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 29 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 85 +- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 +- drivers/gpu/drm/amd/amdgpu/cik.c | 9 + drivers/gpu/drm/amd/amdgpu/vi.c | 21 + drivers/gpu/drm/amd/display/Kconfig | 28 + drivers/gpu/drm/amd/display/Makefile | 22 + drivers/gpu/drm/amd/display/amdgpu_dm/Makefile | 17 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1564 ++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 171 + .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 484 +++ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 829 ++++ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.h | 122 + .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 443 ++ .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.h | 36 + .../drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 463 +++ .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 3150 +++++++++++++++ .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.h | 101 + drivers/gpu/drm/amd/display/dc/Makefile | 28 + drivers/gpu/drm/amd/display/dc/basics/Makefile | 11 + drivers/gpu/drm/amd/display/dc/basics/conversion.c | 223 ++ drivers/gpu/drm/amd/display/dc/basics/conversion.h | 51 + drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 691 ++++ drivers/gpu/drm/amd/display/dc/basics/fixpt32_32.c | 221 + .../gpu/drm/amd/display/dc/basics/grph_object_id.c | 134 + .../gpu/drm/amd/display/dc/basics/log_helpers.c | 100 + drivers/gpu/drm/amd/display/dc/basics/logger.c | 457 +++ drivers/gpu/drm/amd/display/dc/basics/logger.h | 67 + .../drm/amd/display/dc/basics/register_logger.c | 197 + .../gpu/drm/amd/display/dc/basics/signal_types.c | 116 + drivers/gpu/drm/amd/display/dc/basics/vector.c | 307 ++ drivers/gpu/drm/amd/display/dc/bios/Makefile | 24 + drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 4220 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/bios/bios_parser.h | 33 + .../drm/amd/display/dc/bios/bios_parser_helper.c | 82 + .../drm/amd/display/dc/bios/bios_parser_helper.h | 40 + .../amd/display/dc/bios/bios_parser_interface.c | 50 + .../display/dc/bios/bios_parser_types_internal.h | 72 + .../gpu/drm/amd/display/dc/bios/command_table.c | 2609 ++++++++++++ .../gpu/drm/amd/display/dc/bios/command_table.h | 112 + .../drm/amd/display/dc/bios/command_table_helper.c | 288 ++ .../drm/amd/display/dc/bios/command_table_helper.h | 90 + .../dc/bios/dce110/command_table_helper_dce110.c | 364 ++ .../dc/bios/dce110/command_table_helper_dce110.h | 34 + .../dc/bios/dce112/command_table_helper_dce112.c | 418 ++ .../dc/bios/dce112/command_table_helper_dce112.h | 34 + .../dc/bios/dce80/command_table_helper_dce80.c | 354 ++ .../dc/bios/dce80/command_table_helper_dce80.h | 33 + drivers/gpu/drm/amd/display/dc/calcs/Makefile | 10 + .../gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c | 3108 ++++++++++++++ drivers/gpu/drm/amd/display/dc/calcs/bw_fixed.c | 299 ++ drivers/gpu/drm/amd/display/dc/calcs/gamma_calcs.c | 1382 +++++++ drivers/gpu/drm/amd/display/dc/core/dc.c | 1846 +++++++++ drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 270 ++ .../gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 93 + drivers/gpu/drm/amd/display/dc/core/dc_link.c | 1899 +++++++++ drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 1098 +++++ drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2462 ++++++++++++ drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 222 + drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 1934 +++++++++ drivers/gpu/drm/amd/display/dc/core/dc_sink.c | 113 + drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 141 + drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 213 + drivers/gpu/drm/amd/display/dc/core/dc_target.c | 334 ++ drivers/gpu/drm/amd/display/dc/dc.h | 780 ++++ drivers/gpu/drm/amd/display/dc/dc_bios_types.h | 224 ++ drivers/gpu/drm/amd/display/dc/dc_ddc_types.h | 115 + drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 105 + drivers/gpu/drm/amd/display/dc/dc_helper.c | 144 + drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 588 +++ drivers/gpu/drm/amd/display/dc/dc_types.h | 493 +++ drivers/gpu/drm/amd/display/dc/dce/Makefile | 14 + drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 920 +++++ drivers/gpu/drm/amd/display/dc/dce/dce_audio.h | 145 + .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 1264 ++++++ .../gpu/drm/amd/display/dc/dce/dce_clock_source.h | 109 + drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c | 195 + drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 250 ++ .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 2176 ++++++++++ .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 363 ++ drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 384 ++ drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h | 217 + .../gpu/drm/amd/display/dc/dce/dce_scl_filters.c | 501 +++ .../drm/amd/display/dc/dce/dce_stream_encoder.c | 1302 ++++++ .../drm/amd/display/dc/dce/dce_stream_encoder.h | 564 +++ drivers/gpu/drm/amd/display/dc/dce/dce_transform.c | 1002 +++++ drivers/gpu/drm/amd/display/dc/dce/dce_transform.h | 313 ++ drivers/gpu/drm/amd/display/dc/dce100/Makefile | 23 + .../amd/display/dc/dce100/dce100_hw_sequencer.c | 140 + .../amd/display/dc/dce100/dce100_hw_sequencer.h | 36 + .../drm/amd/display/dc/dce100/dce100_resource.c | 1085 +++++ .../drm/amd/display/dc/dce100/dce100_resource.h | 19 + drivers/gpu/drm/amd/display/dc/dce110/Makefile | 15 + .../drm/amd/display/dc/dce110/dce110_compressor.c | 859 ++++ .../drm/amd/display/dc/dce110/dce110_compressor.h | 78 + .../amd/display/dc/dce110/dce110_hw_sequencer.c | 1978 +++++++++ .../amd/display/dc/dce110/dce110_hw_sequencer.h | 62 + drivers/gpu/drm/amd/display/dc/dce110/dce110_ipp.c | 62 + drivers/gpu/drm/amd/display/dc/dce110/dce110_ipp.h | 76 + .../drm/amd/display/dc/dce110/dce110_ipp_cursor.c | 253 ++ .../drm/amd/display/dc/dce110/dce110_ipp_gamma.c | 303 ++ .../drm/amd/display/dc/dce110/dce110_mem_input.c | 535 +++ .../drm/amd/display/dc/dce110/dce110_mem_input.h | 131 + .../drm/amd/display/dc/dce110/dce110_mem_input_v.c | 1081 +++++ .../drm/amd/display/dc/dce110/dce110_mem_input_v.h | 94 + drivers/gpu/drm/amd/display/dc/dce110/dce110_opp.c | 77 + drivers/gpu/drm/amd/display/dc/dce110/dce110_opp.h | 149 + .../gpu/drm/amd/display/dc/dce110/dce110_opp_csc.c | 363 ++ .../drm/amd/display/dc/dce110/dce110_opp_csc_v.c | 738 ++++ .../amd/display/dc/dce110/dce110_opp_formatter.c | 627 +++ .../drm/amd/display/dc/dce110/dce110_opp_regamma.c | 537 +++ .../amd/display/dc/dce110/dce110_opp_regamma_v.c | 551 +++ .../gpu/drm/amd/display/dc/dce110/dce110_opp_v.c | 63 + .../gpu/drm/amd/display/dc/dce110/dce110_opp_v.h | 56 + .../drm/amd/display/dc/dce110/dce110_resource.c | 1413 +++++++ .../drm/amd/display/dc/dce110/dce110_resource.h | 56 + .../display/dc/dce110/dce110_timing_generator.c | 1953 +++++++++ .../display/dc/dce110/dce110_timing_generator.h | 273 ++ .../display/dc/dce110/dce110_timing_generator_v.c | 743 ++++ .../display/dc/dce110/dce110_timing_generator_v.h | 33 + .../drm/amd/display/dc/dce110/dce110_transform_v.c | 704 ++++ .../drm/amd/display/dc/dce110/dce110_transform_v.h | 37 + .../gpu/drm/amd/display/dc/dce110/dce110_types.h | 30 + drivers/gpu/drm/amd/display/dc/dce112/Makefile | 11 + .../drm/amd/display/dc/dce112/dce112_compressor.c | 859 ++++ .../drm/amd/display/dc/dce112/dce112_compressor.h | 78 + .../amd/display/dc/dce112/dce112_hw_sequencer.c | 166 + .../amd/display/dc/dce112/dce112_hw_sequencer.h | 36 + .../drm/amd/display/dc/dce112/dce112_mem_input.c | 54 + .../drm/amd/display/dc/dce112/dce112_mem_input.h | 38 + drivers/gpu/drm/amd/display/dc/dce112/dce112_opp.c | 72 + drivers/gpu/drm/amd/display/dc/dce112/dce112_opp.h | 48 + .../amd/display/dc/dce112/dce112_opp_formatter.c | 215 + .../drm/amd/display/dc/dce112/dce112_resource.c | 1418 +++++++ .../drm/amd/display/dc/dce112/dce112_resource.h | 55 + drivers/gpu/drm/amd/display/dc/dce80/Makefile | 16 + .../drm/amd/display/dc/dce80/dce80_compressor.c | 839 ++++ .../drm/amd/display/dc/dce80/dce80_compressor.h | 78 + .../drm/amd/display/dc/dce80/dce80_hw_sequencer.c | 141 + .../drm/amd/display/dc/dce80/dce80_hw_sequencer.h | 36 + drivers/gpu/drm/amd/display/dc/dce80/dce80_ipp.c | 64 + drivers/gpu/drm/amd/display/dc/dce80/dce80_ipp.h | 47 + .../gpu/drm/amd/display/dc/dce80/dce80_ipp_gamma.c | 76 + .../gpu/drm/amd/display/dc/dce80/dce80_mem_input.c | 83 + .../gpu/drm/amd/display/dc/dce80/dce80_mem_input.h | 36 + drivers/gpu/drm/amd/display/dc/dce80/dce80_opp.c | 136 + drivers/gpu/drm/amd/display/dc/dce80/dce80_opp.h | 130 + .../gpu/drm/amd/display/dc/dce80/dce80_opp_csc.c | 363 ++ .../drm/amd/display/dc/dce80/dce80_opp_formatter.c | 577 +++ .../drm/amd/display/dc/dce80/dce80_opp_regamma.c | 543 +++ .../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 1063 +++++ .../gpu/drm/amd/display/dc/dce80/dce80_resource.h | 39 + .../amd/display/dc/dce80/dce80_timing_generator.c | 241 ++ .../amd/display/dc/dce80/dce80_timing_generator.h | 45 + drivers/gpu/drm/amd/display/dc/dm_helpers.h | 101 + drivers/gpu/drm/amd/display/dc/dm_services.h | 424 ++ drivers/gpu/drm/amd/display/dc/dm_services_types.h | 242 ++ drivers/gpu/drm/amd/display/dc/gpio/Makefile | 38 + .../amd/display/dc/gpio/dce110/hw_factory_dce110.c | 178 + .../amd/display/dc/gpio/dce110/hw_factory_dce110.h | 32 + .../display/dc/gpio/dce110/hw_translate_dce110.c | 387 ++ .../display/dc/gpio/dce110/hw_translate_dce110.h | 34 + .../amd/display/dc/gpio/dce80/hw_factory_dce80.c | 173 + .../amd/display/dc/gpio/dce80/hw_factory_dce80.h | 32 + .../amd/display/dc/gpio/dce80/hw_translate_dce80.c | 411 ++ .../amd/display/dc/gpio/dce80/hw_translate_dce80.h | 32 + drivers/gpu/drm/amd/display/dc/gpio/ddc_regs.h | 150 + .../display/dc/gpio/diagnostics/hw_factory_diag.c | 63 + .../display/dc/gpio/diagnostics/hw_factory_diag.h | 32 + .../dc/gpio/diagnostics/hw_translate_diag.c | 40 + .../dc/gpio/diagnostics/hw_translate_diag.h | 34 + drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c | 272 ++ drivers/gpu/drm/amd/display/dc/gpio/gpio_regs.h | 45 + drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c | 592 +++ drivers/gpu/drm/amd/display/dc/gpio/gpio_service.h | 56 + drivers/gpu/drm/amd/display/dc/gpio/hpd_regs.h | 79 + drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 243 ++ drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.h | 46 + drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 93 + drivers/gpu/drm/amd/display/dc/gpio/hw_factory.h | 74 + drivers/gpu/drm/amd/display/dc/gpio/hw_gpio.c | 205 + drivers/gpu/drm/amd/display/dc/gpio/hw_gpio.h | 144 + drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c | 175 + drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.h | 46 + drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 75 + drivers/gpu/drm/amd/display/dc/gpio/hw_translate.h | 50 + drivers/gpu/drm/amd/display/dc/gpu/Makefile | 36 + .../display/dc/gpu/dce110/display_clock_dce110.c | 1035 +++++ .../display/dc/gpu/dce110/display_clock_dce110.h | 53 + .../display/dc/gpu/dce112/display_clock_dce112.c | 964 +++++ .../display/dc/gpu/dce112/display_clock_dce112.h | 114 + .../amd/display/dc/gpu/dce80/display_clock_dce80.c | 934 +++++ .../amd/display/dc/gpu/dce80/display_clock_dce80.h | 57 + drivers/gpu/drm/amd/display/dc/gpu/display_clock.c | 217 + drivers/gpu/drm/amd/display/dc/gpu/display_clock.h | 89 + drivers/gpu/drm/amd/display/dc/gpu/divider_range.c | 127 + drivers/gpu/drm/amd/display/dc/gpu/divider_range.h | 62 + drivers/gpu/drm/amd/display/dc/i2caux/Makefile | 58 + drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c | 567 +++ drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.h | 117 + .../amd/display/dc/i2caux/dce100/i2caux_dce100.c | 112 + .../amd/display/dc/i2caux/dce100/i2caux_dce100.h | 32 + .../display/dc/i2caux/dce110/aux_engine_dce110.c | 456 +++ .../display/dc/i2caux/dce110/aux_engine_dce110.h | 78 + .../dc/i2caux/dce110/i2c_hw_engine_dce110.c | 577 +++ .../dc/i2caux/dce110/i2c_hw_engine_dce110.h | 214 + .../dc/i2caux/dce110/i2c_sw_engine_dce110.c | 171 + .../dc/i2caux/dce110/i2c_sw_engine_dce110.h | 43 + .../amd/display/dc/i2caux/dce110/i2caux_dce110.c | 323 ++ .../amd/display/dc/i2caux/dce110/i2caux_dce110.h | 53 + .../amd/display/dc/i2caux/dce112/i2caux_dce112.c | 140 + .../amd/display/dc/i2caux/dce112/i2caux_dce112.h | 32 + .../display/dc/i2caux/dce80/i2c_hw_engine_dce80.c | 885 ++++ .../display/dc/i2caux/dce80/i2c_hw_engine_dce80.h | 54 + .../display/dc/i2caux/dce80/i2c_sw_engine_dce80.c | 184 + .../display/dc/i2caux/dce80/i2c_sw_engine_dce80.h | 43 + .../drm/amd/display/dc/i2caux/dce80/i2caux_dce80.c | 295 ++ .../drm/amd/display/dc/i2caux/dce80/i2caux_dce80.h | 38 + .../display/dc/i2caux/diagnostics/i2caux_diag.c | 108 + .../display/dc/i2caux/diagnostics/i2caux_diag.h | 32 + drivers/gpu/drm/amd/display/dc/i2caux/engine.h | 120 + .../gpu/drm/amd/display/dc/i2caux/engine_base.c | 53 + drivers/gpu/drm/amd/display/dc/i2caux/i2c_engine.c | 121 + drivers/gpu/drm/amd/display/dc/i2caux/i2c_engine.h | 113 + .../amd/display/dc/i2caux/i2c_generic_hw_engine.c | 286 ++ .../amd/display/dc/i2caux/i2c_generic_hw_engine.h | 77 + .../gpu/drm/amd/display/dc/i2caux/i2c_hw_engine.c | 246 ++ .../gpu/drm/amd/display/dc/i2caux/i2c_hw_engine.h | 80 + .../gpu/drm/amd/display/dc/i2caux/i2c_sw_engine.c | 610 +++ .../gpu/drm/amd/display/dc/i2caux/i2c_sw_engine.h | 81 + drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c | 459 +++ drivers/gpu/drm/amd/display/dc/i2caux/i2caux.h | 122 + .../gpu/drm/amd/display/dc/inc/bandwidth_calcs.h | 503 +++ drivers/gpu/drm/amd/display/dc/inc/bw_fixed.h | 63 + drivers/gpu/drm/amd/display/dc/inc/clock_source.h | 178 + drivers/gpu/drm/amd/display/dc/inc/compressor.h | 93 + drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 50 + drivers/gpu/drm/amd/display/dc/inc/core_status.h | 47 + drivers/gpu/drm/amd/display/dc/inc/core_types.h | 319 ++ drivers/gpu/drm/amd/display/dc/inc/dc_link_ddc.h | 145 + drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 60 + drivers/gpu/drm/amd/display/dc/inc/gamma_calcs.h | 19 + drivers/gpu/drm/amd/display/dc/inc/gamma_types.h | 38 + drivers/gpu/drm/amd/display/dc/inc/hw/audio.h | 62 + drivers/gpu/drm/amd/display/dc/inc/hw/gpio.h | 86 + drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 74 + drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h | 121 + .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 263 ++ drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 106 + drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 322 ++ .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 121 + .../drm/amd/display/dc/inc/hw/timing_generator.h | 162 + drivers/gpu/drm/amd/display/dc/inc/hw/transform.h | 179 + drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 156 + drivers/gpu/drm/amd/display/dc/inc/link_hwss.h | 73 + drivers/gpu/drm/amd/display/dc/inc/reg_helper.h | 290 ++ drivers/gpu/drm/amd/display/dc/inc/resource.h | 164 + drivers/gpu/drm/amd/display/dc/irq/Makefile | 28 + .../amd/display/dc/irq/dce110/irq_service_dce110.c | 367 ++ .../amd/display/dc/irq/dce110/irq_service_dce110.h | 48 + .../amd/display/dc/irq/dce80/irq_service_dce80.c | 283 ++ .../amd/display/dc/irq/dce80/irq_service_dce80.h | 35 + drivers/gpu/drm/amd/display/dc/irq/irq_service.c | 163 + drivers/gpu/drm/amd/display/dc/irq/irq_service.h | 85 + drivers/gpu/drm/amd/display/dc/irq_types.h | 185 + drivers/gpu/drm/amd/display/dc/os_types.h | 61 + drivers/gpu/drm/amd/display/dc/virtual/Makefile | 9 + .../amd/display/dc/virtual/virtual_link_encoder.c | 150 + .../amd/display/dc/virtual/virtual_link_encoder.h | 34 + .../display/dc/virtual/virtual_stream_encoder.c | 132 + .../display/dc/virtual/virtual_stream_encoder.h | 39 + .../display/include/asic_capability_interface.h | 55 + .../amd/display/include/asic_capability_types.h | 116 + drivers/gpu/drm/amd/display/include/audio_types.h | 106 + .../amd/display/include/bios_parser_interface.h | 44 + .../drm/amd/display/include/bios_parser_types.h | 338 ++ drivers/gpu/drm/amd/display/include/dal_asic_id.h | 125 + .../drm/amd/display/include/dal_register_logger.h | 42 + drivers/gpu/drm/amd/display/include/dal_types.h | 44 + .../drm/amd/display/include/ddc_service_types.h | 189 + .../amd/display/include/display_clock_interface.h | 175 + drivers/gpu/drm/amd/display/include/dpcd_defs.h | 742 ++++ drivers/gpu/drm/amd/display/include/fixed31_32.h | 390 ++ drivers/gpu/drm/amd/display/include/fixed32_32.h | 83 + .../gpu/drm/amd/display/include/gpio_interface.h | 92 + .../amd/display/include/gpio_service_interface.h | 105 + drivers/gpu/drm/amd/display/include/gpio_types.h | 332 ++ .../amd/display/include/grph_object_ctrl_defs.h | 407 ++ .../gpu/drm/amd/display/include/grph_object_defs.h | 140 + .../gpu/drm/amd/display/include/grph_object_id.h | 256 ++ .../drm/amd/display/include/hw_sequencer_types.h | 105 + .../gpu/drm/amd/display/include/i2caux_interface.h | 89 + .../gpu/drm/amd/display/include/irq_interface.h | 31 + .../amd/display/include/irq_service_interface.h | 51 + .../drm/amd/display/include/link_service_types.h | 232 ++ .../gpu/drm/amd/display/include/logger_interface.h | 140 + drivers/gpu/drm/amd/display/include/logger_types.h | 95 + .../gpu/drm/amd/display/include/set_mode_types.h | 127 + drivers/gpu/drm/amd/display/include/signal_types.h | 59 + drivers/gpu/drm/amd/display/include/vector.h | 150 + drivers/gpu/drm/amd/display/modules/color/color.c | 2094 ++++++++++ .../gpu/drm/amd/display/modules/freesync/Makefile | 10 + .../drm/amd/display/modules/freesync/freesync.c | 1158 ++++++ .../gpu/drm/amd/display/modules/inc/mod_color.h | 179 + .../gpu/drm/amd/display/modules/inc/mod_freesync.h | 149 + .../gpu/drm/amd/display/modules/inc/mod_power.h | 112 + drivers/gpu/drm/amd/display/modules/power/power.c | 784 ++++ 315 files changed, 99491 insertions(+), 37 deletions(-) commit 8a29896a6e31c7aa2ca3b50d8aefe05f280b0b7e Author: Randy Dunlap Date: Fri Sep 8 16:35:55 2017 -0700 docs: clean up and add rest of CRC functions to kernel-api.rst Add the rest of the CRC library functions to kernel-api. - try to clarify crc32() by adding '@' to a function parameter - reorder kernel-api CRC functions to be less random - add more CRC functions to kernel-api - correct the function parameter names in several places Signed-off-by: Randy Dunlap Signed-off-by: Jonathan Corbet Documentation/core-api/kernel-api.rst | 10 ++++++++-- lib/crc32.c | 2 +- lib/crc4.c | 2 +- lib/crc8.c | 22 +++++++++++----------- 4 files changed, 21 insertions(+), 15 deletions(-) commit 9c5b2b0d409304c2e3c1f4d1c9bb4958e1d46f8f Author: Harry Wentland Date: Wed Sep 13 10:03:31 2017 -0400 drm/amdgpu: Pulling old prepare and submit for flip back This is needed to ensure every single DC commit builds. Reverting this again when it's no longer needed by DC. This reverts commit 98da65d5e32583d89a1b1c760293b601816a98d3. Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 138 ++++++++++++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 15 +++ 2 files changed, 124 insertions(+), 29 deletions(-) commit 44e9f099367716dde33618b7d5d25c3123437ba6 Author: stephen lu Date: Tue Aug 29 10:42:24 2017 +0800 docs: highres: fix broken urls Some urls is invalid. I find alternative urls. Signed-off-by: stephen lu Signed-off-by: Jonathan Corbet Documentation/timers/highres.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d4306db189d04886e07751f682495aeae61a4c4f Author: Junio C Hamano Date: Mon Sep 25 18:36:20 2017 +0900 Documentation/process: phrasofix Devils in the details are found only when the high level design is refined and gets more detailed, and the appropriate phrase to use to describe this is "problems are revealed", not "problems are reviewed". Reviews may reveal these problems, though ;-) Signed-off-by: Junio C Hamano Signed-off-by: Jonathan Corbet Documentation/process/3.Early-stage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d19b3e32375bd21b5d89cc484dfc56cbd9b7fee4 Author: Junio C Hamano Date: Mon Sep 25 18:36:19 2017 +0900 Documentation/process: fix the canonical patch format description There shouldn't be a blank line at the beginning, if there is no optional in-body "From" line. There must be a blank line between the body of the explanation and the beginning of the S-o-b lines. Signed-off-by: Junio C Hamano Signed-off-by: Jonathan Corbet Documentation/process/submitting-patches.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ac0a314caed1827f4ef5d7145eb609147b48b45d Author: Daniel Xu Date: Mon Sep 18 22:21:25 2017 -0700 console: Update to reflect new default value The default value was changed from 10 minutes to disabled in commit a4199f5eb8096d6. Signed-off-by: Daniel Xu Signed-off-by: Jonathan Corbet Documentation/admin-guide/kernel-parameters.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 404376af788a76cca760efdc05f26fd73bd94b17 Author: Randy Dunlap Date: Sun Sep 17 19:07:10 2017 -0700 Documentation: kernel-api: add bitmap operations from linux/bitmap.h Add to kernel-api Bitmap Operations section. Fix kernel-doc nitpicks in . Signed-off-by: Randy Dunlap Acked-by: Yury Norov Signed-off-by: Jonathan Corbet Documentation/core-api/kernel-api.rst | 3 +++ include/linux/bitmap.h | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) commit 390e96ec8e030819701fbeb089c50ef8cb71bc9a Merge: 3bd3b9e 366a88f Author: David S. Miller Date: Tue Sep 26 13:36:45 2017 -0700 Merge branch 'bpf-metadata-direct-access' Daniel Borkmann says: ==================== BPF metadata for direct access This work enables generic transfer of metadata from XDP into skb, meaning the packet has a flexible and programmable room for meta data, which can later be used by BPF to set various skb members when passing up the stack. For details, please see second patch. Support has been implemented and tested with two drivers, and should be straight forward to add to other drivers as well which properly support head adjustment already. ==================== Signed-off-by: David S. Miller commit 366a88fe2f40d6772985ec78cdd34df7f109bb88 Author: Daniel Borkmann Date: Mon Sep 25 02:25:55 2017 +0200 bpf, ixgbe: add meta data support Implement support for transferring XDP meta data into skb for ixgbe driver; before calling into the program, xdp.data_meta points to xdp.data, where on program return with pass verdict, we call into skb_metadata_set(). We implement this for the default ixgbe_build_skb() variant. For the ixgbe_construct_skb() that is used when legacy-rx buffer mananagement mode is turned on via ethtool, I found that XDP gets 0 headroom, so neither xdp_adjust_head() nor xdp_adjust_meta() can be used with this. Just add a comment with explanation for this operating mode. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: John Fastabend Signed-off-by: David S. Miller drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 30 +++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) commit 65d88fd0baaa5c9def9383ac696097911d4ceb73 Author: Daniel Borkmann Date: Mon Sep 25 02:25:54 2017 +0200 bpf, nfp: add meta data support Implement support for transferring XDP meta data into skb for nfp driver; before calling into the program, xdp.data_meta points to xdp.data, where on program return with pass verdict, we call into skb_metadata_set(). Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: John Fastabend Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller .../net/ethernet/netronome/nfp/nfp_net_common.c | 40 ++++++++-------------- 1 file changed, 15 insertions(+), 25 deletions(-) commit 22c8852624fc90a90709d1237625ca57999c5092 Author: Daniel Borkmann Date: Mon Sep 25 02:25:53 2017 +0200 bpf: improve selftests and add tests for meta pointer Add various test_verifier selftests, and a simple xdp/tc functional test that is being attached to veths. Also let new versions of clang use the recently added -mcpu=probe support [1] for the BPF target, so that it can probe the underlying kernel for BPF insn set extensions. We could also just set this options always, where older versions just ignore it and give a note to the user that the -mcpu value is not supported, but given emitting the note cannot be turned off from clang side lets not confuse users running selftests with it, thus fallback to the default generic one when we see that clang doesn't support it. Also allow CPU option to be overridden in the Makefile from command line. [1] https://github.com/llvm-mirror/llvm/commit/d7276a40d87b89aed89978dec6457a5b8b3a0db5 Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: John Fastabend Signed-off-by: David S. Miller tools/testing/selftests/bpf/Makefile | 21 ++- tools/testing/selftests/bpf/bpf_helpers.h | 2 + tools/testing/selftests/bpf/test_verifier.c | 247 +++++++++++++++++++++++++++ tools/testing/selftests/bpf/test_xdp_meta.c | 53 ++++++ tools/testing/selftests/bpf/test_xdp_meta.sh | 51 ++++++ 5 files changed, 370 insertions(+), 4 deletions(-) commit ac29991ba137cc0e3b0f647fb41e79300230f15c Author: Daniel Borkmann Date: Mon Sep 25 02:25:52 2017 +0200 bpf: update bpf.h uapi header for tools Looks like a couple of updates missed to get carried into tools/include/uapi/, so copy the bpf.h header as usual to pull in latest updates. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: John Fastabend Signed-off-by: David S. Miller tools/include/uapi/linux/bpf.h | 45 ++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 13 deletions(-) commit de8f3a83b0a0fddb2cf56e7a718127e9619ea3da Author: Daniel Borkmann Date: Mon Sep 25 02:25:51 2017 +0200 bpf: add meta pointer for direct access This work enables generic transfer of metadata from XDP into skb. The basic idea is that we can make use of the fact that the resulting skb must be linear and already comes with a larger headroom for supporting bpf_xdp_adjust_head(), which mangles xdp->data. Here, we base our work on a similar principle and introduce a small helper bpf_xdp_adjust_meta() for adjusting a new pointer called xdp->data_meta. Thus, the packet has a flexible and programmable room for meta data, followed by the actual packet data. struct xdp_buff is therefore laid out that we first point to data_hard_start, then data_meta directly prepended to data followed by data_end marking the end of packet. bpf_xdp_adjust_head() takes into account whether we have meta data already prepended and if so, memmove()s this along with the given offset provided there's enough room. xdp->data_meta is optional and programs are not required to use it. The rationale is that when we process the packet in XDP (e.g. as DoS filter), we can push further meta data along with it for the XDP_PASS case, and give the guarantee that a clsact ingress BPF program on the same device can pick this up for further post-processing. Since we work with skb there, we can also set skb->mark, skb->priority or other skb meta data out of BPF, thus having this scratch space generic and programmable allows for more flexibility than defining a direct 1:1 transfer of potentially new XDP members into skb (it's also more efficient as we don't need to initialize/handle each of such new members). The facility also works together with GRO aggregation. The scratch space at the head of the packet can be multiple of 4 byte up to 32 byte large. Drivers not yet supporting xdp->data_meta can simply be set up with xdp->data_meta as xdp->data + 1 as bpf_xdp_adjust_meta() will detect this and bail out, such that the subsequent match against xdp->data for later access is guaranteed to fail. The verifier treats xdp->data_meta/xdp->data the same way as we treat xdp->data/xdp->data_end pointer comparisons. The requirement for doing the compare against xdp->data is that it hasn't been modified from it's original address we got from ctx access. It may have a range marking already from prior successful xdp->data/xdp->data_end pointer comparisons though. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: John Fastabend Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 1 + drivers/net/ethernet/cavium/thunder/nicvf_main.c | 1 + drivers/net/ethernet/intel/i40e/i40e_txrx.c | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 1 + drivers/net/ethernet/mellanox/mlx4/en_rx.c | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 1 + .../net/ethernet/netronome/nfp/nfp_net_common.c | 1 + drivers/net/ethernet/qlogic/qede/qede_fp.c | 1 + drivers/net/tun.c | 1 + drivers/net/virtio_net.c | 2 + include/linux/bpf.h | 1 + include/linux/filter.h | 21 +++- include/linux/skbuff.h | 68 +++++++++++- include/uapi/linux/bpf.h | 13 ++- kernel/bpf/verifier.c | 114 ++++++++++++++++----- net/bpf/test_run.c | 1 + net/core/dev.c | 31 +++++- net/core/filter.c | 77 +++++++++++++- net/core/skbuff.c | 2 + 19 files changed, 297 insertions(+), 42 deletions(-) commit 6aaae2b6c4330a46204bca042f1d2f41e8e18dea Author: Daniel Borkmann Date: Mon Sep 25 02:25:50 2017 +0200 bpf: rename bpf_compute_data_end into bpf_compute_data_pointers Just do the rename into bpf_compute_data_pointers() as we'll add one more pointer here to recompute. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Acked-by: John Fastabend Signed-off-by: David S. Miller include/linux/filter.h | 9 ++++++--- kernel/bpf/sockmap.c | 4 ++-- net/bpf/test_run.c | 2 +- net/core/filter.c | 14 +++++++------- net/core/lwt_bpf.c | 2 +- net/sched/act_bpf.c | 4 ++-- net/sched/cls_bpf.c | 4 ++-- 7 files changed, 21 insertions(+), 18 deletions(-) commit 416c7517359b8812c8bcddc31348934b901c3cdc Author: Randy Dunlap Date: Sun Sep 17 15:19:10 2017 -0700 Documentation: kernel-api: drop "Data Types" section In the kernel-api chapter, the section for Data Types only contains "Doubly Linked Lists" and all of the function interfaces for list management. There are no other data types in this section, so collapse this section into "List Management Functions". Signed-off-by: Randy Dunlap Signed-off-by: Jonathan Corbet Documentation/core-api/kernel-api.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 98bfa34462fb6af70b845d28561072f80bacdb9b Author: Pavel Machek Date: Sat Sep 16 13:48:37 2017 +0200 Documentation: fix little inconsistencies Fix little inconsistencies in Documentation: make case and spacing match surrounding text. Signed-off-by: Pavel Machek Reviewed-by: Darrick J. Wong Signed-off-by: Jonathan Corbet Documentation/filesystems/ext4.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4e9767bc28e93139442847f023ff2fc0c2a21d34 Author: Ben Widawsky Date: Wed Sep 20 11:35:24 2017 -0700 drm/i915/cnl: Add support slice/subslice/eu configs Cannonlake Slice and Subslice information has changed. This patch initially provided by Ben adds the proper sseu initialization. v2: This v2 done by Rodrigo includes: - Fix on Total slices count by avoiding [1][2] and [2][2]. - Inclusion of EU Per Subslice. - Commit message. v3: This v3 done by Rodrigo includes: - Handle all possible bits and extra fuse register. - Use INTEL_GEN macro. - Fully assume uniform distribution so remove union with eu_per_subslice and add proper the comment. v4: This v4 done by Rodrigo includes: - Consider all bits available: 6 bits for slices [27:22] and 4 for subslices [21:18]. v5: This v5 done by Rodrigo includes: - sseu->subslice_mask = (1 << 4) - 1 - missed on previous versions and noticed by Oscar. Cc: Oscar Mateo Signed-off-by: Ben Widawsky Signed-off-by: Rodrigo Vivi Reviewed-by: Oscar Mateo Link: https://patchwork.freedesktop.org/patch/msgid/20170920183525.20530-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 8 +++++++ drivers/gpu/drm/i915/intel_device_info.c | 37 +++++++++++++++++++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) commit 6f87a895709eecc1542fe947e349364ad061ac00 Author: Alex Deucher Date: Tue Sep 19 10:20:27 2017 -0400 drm/amdgpu: clarify license in amdgpu_trace_points.c It was not clear. The rest of the driver is MIT/X11. Reviewed-by: Christian König Acked-by: Dave Airlie Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_trace_points.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit dfced2e4bcbc8d6bd9bad11cc6b4643ba36ed35a Author: Samuel Li Date: Tue Aug 22 15:25:33 2017 -0400 drm/amdgpu: Add gem_prime_mmap support v2: drop hdp invalidate/flush. v3: honor pgoff during prime mmap. Add a barrier after cpu access. v4: drop begin/end_cpu_access() for now, revisit later. Signed-off-by: Samuel Li 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 | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 34 +++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) commit aec8d5cc28b32b02e09c92c422f4a4ed9f53ff74 Author: Rex Zhu Date: Wed Sep 20 17:34:15 2017 +0800 drm/amd/powerplay: delete dead code in smumgr Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 32 ---------- drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 87 --------------------------- 2 files changed, 119 deletions(-) commit 63196fe79b28e2b161a6d951877bdd0451b1f1a3 Author: Rex Zhu Date: Wed Sep 20 17:33:55 2017 +0800 drm/amd/powerplay: delete SMUM_FIELD_MASK repeated defining in hwmgr.h Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0041e6007ecb45f4d48f5a445ace73c9196a5f82 Author: Rex Zhu Date: Wed Sep 20 17:31:07 2017 +0800 drm/amd/powerplay: delete SMUM_WAIT_INDIRECT_FIELD repeated defining in hwmgr.h use PHM_WAIT_INDIRECT_FIELD instand. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 11 ----------- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 +- 3 files changed, 2 insertions(+), 13 deletions(-) commit 515113f5e5835ee3ecb00d3da292ca67b5e7a972 Author: Rex Zhu Date: Wed Sep 20 17:26:03 2017 +0800 drm/amd/powerplay: delete SMUM_READ_FIELD repeated defining in hwmgr.h Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 2 -- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 6 +++--- 4 files changed, 5 insertions(+), 7 deletions(-) commit 95175869bd309c77f8391c6ea2c2ba440d7f9af7 Author: Rex Zhu Date: Wed Sep 20 17:24:58 2017 +0800 drm/amd/powerplay: delete SMUM_SET_FIELD repeated defining in hwmgr.h Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 5 ----- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 12 ++++++------ 2 files changed, 6 insertions(+), 11 deletions(-) commit f0f6e3752a8138342038c89d25856ce28a36160b Author: Rex Zhu Date: Wed Sep 20 17:21:25 2017 +0800 drm/amd/powerplay: delete SMUM_READ_VFPF_INDIRECT_FIELD repeated defining in hwmgr.h Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 5 ----- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 4 ++-- drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 6 +++--- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 4 ++-- 6 files changed, 9 insertions(+), 14 deletions(-) commit 37192704d9f55b0a64248c91a251fc6665f88045 Author: Rex Zhu Date: Wed Sep 20 17:19:58 2017 +0800 drm/amd/powerplay: delete SMUM_WRITE_VFPF_INDIRECT_FIELD repeated defining in hwmgr.h Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 6 ------ drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 14 +++++++------- .../gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 18 +++++++++--------- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 14 +++++++------- 4 files changed, 23 insertions(+), 29 deletions(-) commit a9eca3a685b9fc3c9910eca4783ef07a2345b9e0 Author: Rex Zhu Date: Wed Sep 20 17:18:16 2017 +0800 drm/amd/powerplay: delete SMUM_WRITE_FIELD the macro is as same as PHM_WRITE_FIELD Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 3 --- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 6 +++--- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 4 ++-- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 6 +++--- 4 files changed, 8 insertions(+), 11 deletions(-) commit fbabae46964fec421c717d27b57d4383e8ae4b64 Author: Rex Zhu Date: Wed Sep 20 17:17:08 2017 +0800 drm/amd/powerplay: delete SMU_WRITE_INDIRECT_FIELD the macro is as same as PHM_WRITE_INDIRECT_FIELD Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 15 --------------- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 4 ++-- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 8 ++++---- 3 files changed, 6 insertions(+), 21 deletions(-) commit 538fdf1fe7bea0e3a1cfde4ebf6ded9f397a1914 Author: Rex Zhu Date: Wed Sep 20 17:29:23 2017 +0800 drm/amd/powerplay: move macros to hwmgr.h the macro is not relevant to SMU, so rename SMU_WAIT_FIELD_UNEQUAL to PHM_WAIT_FIELD_UNEQUAL and move to hwmgr.h Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 14 ++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 14 -------------- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 4 ++-- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 8 ++++---- 6 files changed, 22 insertions(+), 22 deletions(-) commit 57d13f794dcf918d9710923d0c64edb14e370271 Author: Rex Zhu Date: Wed Sep 20 17:04:33 2017 +0800 drm/amd/powerplay: move PHM_WAIT_VFPF_INDIRECT_FIELD to hwmgr.h the macro is not relevant to SMU, so move to hwmgr.h and rename to PHM_WAIT_VFPF_INDIRECT_FIELD Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 14 ++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 14 +------------- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 6 +++--- drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 6 +++--- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 6 +++--- 6 files changed, 25 insertions(+), 23 deletions(-) commit 554d95da398b6b998f8801daf0d0ace5caab34ff Author: Rex Zhu Date: Wed Sep 20 17:00:50 2017 +0800 drm/amd/powerplay: move SMUM_WAIT_VFPF_INDIRECT_FIELD_UNEQUAL to hwmgr.h the macro is not relevant to SMU, so move to hwmgr.h and rename to PHM_WAIT_VFPF_INDIRECT_FIELD_UNEQUAL Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 13 +++++++++++++ drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 13 ++----------- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 4 ++-- drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 6 +++--- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 4 ++-- 5 files changed, 22 insertions(+), 18 deletions(-) commit b05720cbf6458450700d1c3e91d2b2620b4f6295 Author: Rex Zhu Date: Wed Sep 20 19:28:29 2017 +0800 drm/amd/powerplay: move SMUM_WAIT_INDIRECT_FIELD_UNEQUAL to hwmgr.h the macro is not relevent to SMU, so move to hwmgr.h and rename to PHM_WAIT_INDIRECT_FIELD_UNEQUAL Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 13 +++++++++++++ drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 11 +---------- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 +- 4 files changed, 16 insertions(+), 12 deletions(-) commit d92cb1629bcc8cdf4d616f144ced399723816ba3 Author: Rex Zhu Date: Wed Sep 20 19:22:01 2017 +0800 drm/amd/powerplay: add new helper functions in hwmgr.h Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 42 ++++++++++++++++++++-- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 10 ++++-- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 3 +- .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 2 +- 5 files changed, 50 insertions(+), 9 deletions(-) commit be49be4085d977af566e8d2f9c52ecc1f31b59ad Author: Rex Zhu Date: Wed Sep 20 16:49:29 2017 +0800 drm/amd/powerplay: use SMU_IND_INDEX/DATA_11 pair in VFPF macros to support virtualization Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 4 ++-- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit b3b030520df05fca7f2dcca455c9628f483a1f95 Author: Rex Zhu Date: Tue Sep 26 13:28:27 2017 -0400 drm/amd/powerplay: refine powerplay code. delete struct smumgr, put smu backend function table in struct hwmgr Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 62 ++++----- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 19 ++- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 4 +- .../gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 2 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 40 ++++++ drivers/gpu/drm/amd/powerplay/inc/pp_instance.h | 2 - drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 62 +-------- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 58 ++++---- drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 6 +- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 38 +++--- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c | 54 ++++---- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 10 +- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c | 50 +++---- .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 +- .../gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 67 +++++----- .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 10 +- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 20 +-- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 22 +-- drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 148 ++++++--------------- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c | 64 ++++----- .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 2 +- .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 22 +-- 22 files changed, 339 insertions(+), 425 deletions(-) commit 221c89f980ea96a6baf80b17b6c6a618fc366e73 Author: Rex Zhu Date: Wed Sep 20 15:41:33 2017 +0800 drm/amd/powerplay: delete dead code in hwmgr.h Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 11 ----------- 1 file changed, 11 deletions(-) commit d3f8c0abf45866d0e474181e147594d3da15834d Author: Rex Zhu Date: Wed Sep 20 11:22:56 2017 +0800 drm/amd/powerplay: refine interface in struct pp_smumgr_func unify to use struct hwmgr as function parameter in smumgr. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 12 +- .../drm/amd/powerplay/hwmgr/cz_clockpowergating.c | 8 +- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 90 +++---- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 26 +- .../amd/powerplay/hwmgr/smu7_clockpowergating.c | 60 ++--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 137 +++++----- .../gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 24 +- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 12 +- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 148 +++++------ .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 18 +- .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 16 +- drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 110 ++++---- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 140 +++++----- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.h | 4 +- drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 14 +- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 292 ++++++++++----------- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c | 59 ++--- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 130 ++++----- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c | 57 ++-- .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 76 +++--- .../gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 97 +++---- .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 122 ++++----- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 130 ++++----- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.h | 8 +- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 212 +++++++-------- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.h | 36 +-- drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 89 ++++--- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c | 70 +++-- .../gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 64 ++--- .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 194 +++++++------- .../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h | 16 +- 32 files changed, 1225 insertions(+), 1248 deletions(-) commit e9c7577c09b5062a4f1464b8ef4472c14bdfd2e7 Author: Christian König Date: Mon Sep 11 17:29:26 2017 +0200 drm/amdgpu: simplify pinning into visible VRAM Just set the CPU access required flag when we pin it. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) commit c833d8aa4d829e858f1be8f4bd82a1503b611013 Author: Monk Liu Date: Tue Sep 19 16:09:53 2017 +0800 drm/amdgpu:fix firmware memoryleak(v2) this fix memory leak due to request_firmware after driver unloaded v2: release gmc firmware for gmc6/7/8 as well Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 20 ++++++++++++++++++++ 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/sdma_v4_0.c | 5 +++++ 6 files changed, 37 insertions(+) commit 4ff184d70e1dd85cc39f3b8ed0d98b728d6d9b6c Author: Monk Liu Date: Fri Sep 15 16:43:01 2017 +0800 drm/amdgpu:fix uvd ring fini routine(v2) fix missing finish uvd enc_ring. v2: since the adev pointer check in already in ring_fini so drop the check outsider Signed-off-by: Monk Liu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++++ 1 file changed, 4 insertions(+) commit beb841028480a13a664f868688102f3cee762a6b Author: Monk Liu Date: Thu Sep 21 15:10:06 2017 +0800 drm/amdgpu/sriov:alloc KIQ MQD in VRAM(v2) this way after KIQ MQD released in drv unloading, CPC can still let KIQ access this MQD thus RLCV SAVE_VF will not fail v2: always use VRAM domain for KIQ MQD no matter BM or SRIOV Signed-off-by: Monk Liu Acked-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 85f95ad629558b65ab27cce583c683fb9e3da35c Author: Monk Liu Date: Thu Sep 21 14:59:40 2017 +0800 drm/amdgpu:unmap KCQ in gfx hw_fini(v2) v2: move kcq_disable out of SRIOV, make it genearal Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 57 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 58 +++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+) commit 4bd9a67e17b9a2c1b0ca55e7dfc5a711c161373d Author: Monk Liu Date: Tue Jul 4 16:40:58 2017 +0800 drm/amdgpu:halt when vm fault only with this way we can debug the VMC page fault issue Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 7 +++++++ 2 files changed, 13 insertions(+) commit e6d921974a51e607515b39baa8d1c3f1a27d008b Author: Yong Zhao Date: Tue Sep 19 12:58:15 2017 -0400 drm/amdgpu: Add copy_pte_num_dw member in amdgpu_vm_pte_funcs Use it to replace the hard coded value in amdgpu_vm_bo_update_mapping(). Signed-off-by: Yong Zhao Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 2 ++ drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 2 ++ drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 ++ 7 files changed, 15 insertions(+), 1 deletion(-) commit 7bdc53f925af085ffa0580f10489f82b36cc2f1c Author: Yong Zhao Date: Fri Sep 15 18:20:37 2017 -0400 drm/amdgpu: Fix a bug in amdgpu_fill_buffer() When max_bytes is not 8 bytes aligned and bo size is larger than max_bytes, the last 8 bytes in a ttm node may be left unchanged. For example, on pre SDMA 4.0, max_bytes = 0x1fffff, and the bo size is 0x200000, the problem will happen. In order to fix the problem, we separately store the max nums of PTEs/PDEs a single operation can set in amdgpu_vm_pte_funcs structure, rather than inferring it from bytes limit of SDMA constant fill, i.e. fill_max_bytes. Together with the fix, we replace the hard code value "10" in amdgpu_vm_bo_update_mapping() with the corresponding values from structure amdgpu_vm_pte_funcs. Signed-off-by: Yong Zhao Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 +++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 3 +++ drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 3 +++ drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/si_dma.c | 3 +++ 8 files changed, 30 insertions(+), 6 deletions(-) commit dfe5c2b76b2a32cd37283809737e55f9208f8346 Author: Yong Zhao Date: Mon Sep 18 14:25:31 2017 -0400 drm/amdgpu: Correct bytes limit for SDMA 3.0 copy and fill Signed-off-by: Yong Zhao Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a8ffeac96daa66132d44a624c1cf3cbcc2598a34 Author: Christian König Date: Mon Sep 18 14:32:38 2017 +0200 drm/amdgpu: use 2MB fragment size for GFX6,7 and 8 Use 2MB fragment size by default for older hardware generations as well. Signed-off-by: Christian König Acked-by: John Bridgman Reviewed-by: Roger He Signed-off-by: Alex Deucher 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 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit fd4495e57cd2594098493a0e5b6beccae8cbf47b Author: Xiangliang.Yu Date: Thu Sep 21 10:19:49 2017 +0800 drm/amdgpu: Fix driver reloading failure SRIOV doesn't implement PMC capability of PCIe, so it can't update power state by reading PMC register. Currently, amdgpu driver doesn't disable pci device when removing driver, the enable_cnt of pci device will not be decrease to 0. When reloading driver, pci_enable_device will do nothing as enable_cnt is not zero. And power state will not be updated as PMC is not support. So current_state of pci device is not D0 state and pci_enable_msi return fail. Add pci_disable_device when remmoving driver to fix the issue. Signed-off-by: Xiangliang.Yu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++ 1 file changed, 2 insertions(+) commit 6042e8560ef448aa1a9ca16473f0a5a264462f41 Author: Rex Zhu Date: Thu Sep 21 10:34:48 2017 +0800 drm/amd/powerplay: refine phm_register_thermal_interrupt interface currently, not all asics implement this callback function so not return error to avoid powerplay initialize failed in those asices Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5c58301856e69223b85546fac319363eef1ac1b9 Author: Evan Quan Date: Wed Sep 20 16:25:40 2017 +0800 drm/amd/amdgpu: add vega10/raven mmhub/athub golden settings Signed-off-by: Evan Quan Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit fafa3598401469c22910cf74df6de6c5b318a482 Author: Eric Huang Date: Tue Sep 19 13:32:10 2017 -0400 drm/amd/powerplay: change alert temperature range Change to more meaningful range that triggers thermal interrupts. Signed-off-by: Eric Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a1665a55c87eb711d23806a56e39e8116f1f4242 Author: Eric Huang Date: Fri Sep 15 16:43:38 2017 -0400 drm/amd/powerplay: implement register thermal interrupt 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 | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 2a5b64c9fcd7adf6133e76966250ef3ab139f98b Author: Eric Huang Date: Fri Sep 15 16:38:49 2017 -0400 drm/amd/powerplay: add register thermal interrupt in hwmgr_hw_init Signed-off-by: Eric Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 75 ++++++++++++++++++++++++++++- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 6 +++ 2 files changed, 80 insertions(+), 1 deletion(-) commit 4d1f9fb721fdfa7789515167d1bd2e42cf87e12e Author: Eric Huang Date: Fri Sep 15 16:33:38 2017 -0400 drm/amdgpu: add cgs query info of pci bus devfn Signed-off-by: Eric Huang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 3 +++ drivers/gpu/drm/amd/include/cgs_common.h | 1 + 2 files changed, 4 insertions(+) commit 10cfafd62af4295abc73cbf4531654d4f335ff15 Author: Tom St Denis Date: Tue Sep 19 11:29:04 2017 -0400 drm/amd/amdgpu: Partial revert of iova debugfs We discovered that on some devices even with iommu enabled you can access all of system memory through the iommu translation. Therefore, we revert the read method to the translation only service and drop the write method completely. Signed-off-by: Tom St Denis Reviewed-by: Christan König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 90 +++++---------------------------- 1 file changed, 13 insertions(+), 77 deletions(-) commit a49ccdbd1d70005049647ac1f8e8989c54b41e63 Author: Evan Quan Date: Wed Sep 20 10:55:44 2017 +0800 drm/amd/amgpu: update vega10 sdma golden setting Signed-off-by: Evan Quan Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6fe85429575c4d1f468e3b1715bd8643991570b1 Author: Evan Quan Date: Wed Sep 20 10:53:39 2017 +0800 drm/amd/amgpu: update raven sdma golden setting Signed-off-by: Evan Quan Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d59c026b7be1dd9ae00b54d1916a90775fe3bdda Author: Monk Liu Date: Fri Sep 15 14:35:09 2017 +0800 drm/amdgpu/sriov:fix memory leak after gpu reset GPU reset will require all hw doing hw_init thus ucode_init_bo will be invoked again, which lead to memory leak skip the fw_buf allocation during sriov gpu reset to avoid memory leak. Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 64 +++++++++++++++---------------- 2 files changed, 35 insertions(+), 32 deletions(-) commit eb01abc7c4fd1faa26d0787f410894d9c704eb60 Author: Monk Liu Date: Fri Sep 15 13:40:31 2017 +0800 drm/amdgpu:make ctx_add_fence interruptible(v2) otherwise a gpu hang will make application couldn't be killed under timedout=0 mode v2: Fix memoryleak job/job->s_fence issue unlock mn remove the ERROR msg after waiting being interrupted Signed-off-by: Monk Liu 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 | 16 ++++++++++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 12 +++++++----- 3 files changed, 23 insertions(+), 9 deletions(-) commit f840cc5f8447db7efff447a25bcddbf084bd3e2e Author: Monk Liu Date: Fri Sep 15 16:58:08 2017 +0800 drm/amdgpu/sriov:init csb for gfxv9 RLC need CSB registers initiated under SRIOV during world switch otherwise the clear state buffer behav will not be recovered to current VF scheme after switch back Signed-off-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6e132ca0bb62b30c0eb053d99f75bb827f7876f5 Author: Horace Chen Date: Wed Jun 28 17:51:50 2017 +0800 drm/amdgpu/sriov:increate mailbox polling timeout increase timeout to 12 seconds,because there may have multiple FLR waiting for done, the waiting time of events may be long, increase to 12s to reduce timeout failure. Signed-off-by: Horace Chen Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h | 2 +- drivers/gpu/drm/amd/amdgpu/mxgpu_vi.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 030308fcbd944348e5be079f4c2d53d2bda00d53 Author: Monk Liu Date: Fri Sep 15 15:34:52 2017 +0800 drm/amdgpu/sriov:fix page fault issue of driver unload bo_free on csa is too late to put in amdgpu_fini because that time ttm is already finished, Move it earlier to avoid the page fault. Signed-off-by: Monk Liu Signed-off-by: Horace Chen Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) commit 6e2e216fadd80b4280783bb78e543593ebf2cb69 Author: Monk Liu Date: Tue Jul 4 15:43:38 2017 +0800 drm/amdgpu:use formal register to trigger hdp invalidate Signed-off-by: Monk Liu 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/sdma_v4_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 1d4e0a8c4f12acbc0767f8f9fd75005b9125ada6 Author: Monk Liu Date: Fri Sep 15 15:03:24 2017 +0800 drm/amdgpu:hdp flush should be put it initialized Signed-off-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 2ea6ab2741fc4caf9fd4a48de1b4946f09c365e0 Author: Monk Liu Date: Fri Jun 9 15:04:49 2017 +0800 drm/amdgpu:insert TMZ_BEGIN FRAME_CONTROL(begin) is needed for vega10 due to ucode logic change, it can fix some CTS random fail under gfx preemption enabled mode. Signed-off-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 55981bd2e88a0b6e572a3997098886e2f9b2121e Author: Monk Liu Date: Fri Sep 15 18:42:12 2017 +0800 drm/amdgpu/sriov:don't load psp fw during gpu reset At least for SRIOV we found reload PSP fw during gpu reset cause PSP hang. Signed-off-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 3224a12b90f6bee789d2051b18a8249a82ad92d4 Author: Monk Liu Date: Fri Sep 15 18:57:12 2017 +0800 drm/amdgpu/sriov:move in_reset to adev and rename currently in_reset is only used in sriov gpu reset, and it will be used for other non-gfx hw component later, like PSP, so move it from gfx to adev and rename to in_sriov_reset make more sense. Signed-off-by: Monk Liu 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 | 4 ++-- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) commit 7c3f2167b4b66a0994a643c8a3bcf01ec3433b8b Author: Monk Liu Date: Thu Sep 14 19:45:33 2017 +0800 drm/amdgpu:no kiq in IH Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab5d6227b78be29acf0340da2673f662c0df9b2d Author: Monk Liu Date: Tue Sep 12 14:33:29 2017 +0800 drm/amdgpu/sriov:fix missing error handling Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 98512bb8c241f67f3a5cf0a121624b28a852db45 Author: Ken Wang Date: Thu Sep 14 16:25:19 2017 +0800 drm/amdgpu: Add GPU reset functionality for Vega10 V2 Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 21 +++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 3 +++ drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 7 ++++++ drivers/gpu/drm/amd/amdgpu/psp_v10_0.h | 2 ++ drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 34 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/psp_v3_1.h | 1 + drivers/gpu/drm/amd/amdgpu/soc15.c | 27 ++++++++++++------------ 8 files changed, 83 insertions(+), 15 deletions(-) commit 4135d9f82cd4c8d956ccc85063e24c468dc6fa63 Author: Tom St Denis Date: Mon Sep 18 08:13:28 2017 -0400 drm/ttm: Remove TTM dma tracepoint since it's not required anymore Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/Makefile | 2 +- drivers/gpu/drm/ttm/ttm_debug.c | 74 ----------------------------- drivers/gpu/drm/ttm/ttm_trace.h | 87 ----------------------------------- drivers/gpu/drm/ttm/ttm_tracepoints.c | 45 ------------------ 4 files changed, 1 insertion(+), 207 deletions(-) commit 79ba2800662bcfaef41269dd9389d0e9ed729a28 Author: Tom St Denis Date: Mon Sep 18 08:10:00 2017 -0400 drm/amd/amdgpu: remove usage of ttm trace Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 36 +++------------------------------ 1 file changed, 3 insertions(+), 33 deletions(-) commit 38290b2c456ade70db7cedf489332af5e4263fb0 Author: Tom St Denis Date: Mon Sep 18 07:28:14 2017 -0400 drm/amd/amdgpu: add support for iova_to_phys to replace TTM trace (v5) Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher (v2): Add domain to iova debugfs (v3): Add true read/write methods to access system memory of pages mapped to the device (v4): Move get_domain call out of loop and return on error (v5): Just use kmap/kunmap drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 99 +++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) commit a40cfa0bef9366ad156717078dae681305099a15 Author: Tom St Denis Date: Mon Sep 18 07:14:56 2017 -0400 drm/amd/amdgpu: Fold TTM debugfs entries into array (v2) Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher (v2): add domains and avoid strcmp drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 54 ++++++++++++++++++--------------- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 4 +-- 2 files changed, 32 insertions(+), 26 deletions(-) commit 0b693f0b5612594d089e669804b1b6a62639779f Author: Rex Zhu Date: Tue Sep 19 14:36:08 2017 +0800 drm/amdgpu: fix checkpatch.pl warning to amdgpu_drv.c fix checkpatch.pl WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Reviewed-by: Christian König Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 14 +++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) commit f6e8b15af7c96a429b320eb8414791666c0bd2b7 Author: Leo Liu Date: Fri Mar 3 11:54:37 2017 -0500 drm/amdgpu: remove the clearance of vce 4.0 interrupt mask Requested by SRIOV, the clearance of the bit moved into firmware Signed-off-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 4 ---- 1 file changed, 4 deletions(-) commit 3e4b0bd96092bbf9c5a538916a61faa5eca8e9cb Author: Xiangliang.Yu Date: Wed Sep 13 10:58:19 2017 +0800 drm/amdgpu/sdma3: set wptr shadow atomically Port it from sdma4 for wptr polling usage. Signed-off-by: Xiangliang.Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e33dac39bcf9978061df95f1510b2ec6bfab07fc Author: Xiangliang.Yu Date: Tue Sep 12 17:31:46 2017 +0800 drm/amdgpu/sdma3: Enable sdma wptr polling for SRIOV When hypervisor triggering FLR for one of VFs, need to enable sdma wptr polling to avoid missing wptr update if enabling doorbell. Signed-off-by: Xiangliang.Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 19dde58929c04575aff0c61d99efaf023f6810b5 Author: Christian König Date: Mon Jul 3 19:49:55 2017 +0200 drm/ttm: cleanup ttm_page_alloc_dma.c Remove unused defines and variables. Also stop computing the gfp_flags when they aren't used. No intended functional change. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 42 ++++++++++++-------------------- 1 file changed, 16 insertions(+), 26 deletions(-) commit a2f14820e3493145c25095873d4a510a1b25efdc Author: Felix Kuehling Date: Sat Aug 26 02:43:06 2017 -0400 drm/amdgpu: Track pending retry faults in IH and VM (v2) IH tracks pending retry faults in a hash table for fast lookup in interrupt context. Each VM has a short FIFO of pending VM faults for processing in a bottom half. The IH prescreening stage adds retry faults and filters out repeated retry interrupts to minimize the impact of interrupt storms. It's the VM's responsibility remove pending faults once they are handled. For now this is only done when the VM is destroyed. v2: - Made the hash table smaller and the FIFO longer. I never want the FIFO to fill up, because that would make prescreen take longer. 128 pending page faults should be enough to keep migrations busy. Signed-off-by: Felix Kuehling Acked-by: Christian König (v1) Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/Kconfig | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 76 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 12 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 7 +++ drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 78 +++++++++++++++++++++++++++++++++- 6 files changed, 180 insertions(+), 1 deletion(-) commit 5d86b2c391965cbcb295e8fa795276977b2a416e Author: Felix Kuehling Date: Thu Aug 24 19:22:32 2017 -0400 drm/amd: Closed hash table with low overhead (v2) This adds a statically sized closed hash table implementation with low memory and CPU overhead. The API is inspired by kfifo. Storing, retrieving and deleting data does not involve any dynamic memory management, which makes it ideal for use in interrupt context. Static memory usage per entry comprises a 32 or 64 bit hash key, two bits for occupancy tracking and the value size stored in the table. No list heads or pointers are needed. Therefore this data structure should be quite cache-friendly, too. It uses linear probing and lazy deletion. During lookups free space is reclaimed and entries relocated to speed up future lookups. v2: squash in do_div and _BITOPS_LONG_SHIFT fixes Signed-off-by: Felix Kuehling Acked-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/amd/include/linux/chash.h | 366 +++++++++++++++++ drivers/gpu/drm/amd/lib/Kconfig | 27 ++ drivers/gpu/drm/amd/lib/Makefile | 11 + drivers/gpu/drm/amd/lib/chash.c | 638 ++++++++++++++++++++++++++++++ 6 files changed, 1045 insertions(+) commit 8d25fee2845024d6e22829e9f14cd40f5c2f68cc Author: Randy Dunlap Date: Tue Sep 26 11:09:34 2017 -0700 Input: usbtouchscreen - use EXPERT instead of EMBEDDED for EasyTouch Change control of TOUCHSCREEN_USB_EASYTOUCH prompt string from EMBEDDED to EXPERT to match the rest of this Kconfig file. Signed-off-by: Randy Dunlap Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 361fa055f1ef475ca9f9bdf88884fd128273366e Author: Russell King Date: Tue Sep 26 09:57:12 2017 -0700 Input: sa1111ps2 - extend test delay A 2us delay is too small for the bus to settle after writing to the register. Extend to 10us which gives more reliable results. Signed-off-by: Russell King Signed-off-by: Dmitry Torokhov drivers/input/serio/sa1111ps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a12ded48b3e67f9d6180002b208de5b12e39e6f0 Author: Russell King Date: Tue Sep 26 09:56:56 2017 -0700 Input: sa1111ps2 - remove special sa1111 mmio accessors Remove the special SA1111 MMIO accessors from the SA1111 PS/2 driver as their definition will be removed shortly. The SA1111 accessors are barrierless, so use the _relaxed variants. Signed-off-by: Russell King Signed-off-by: Dmitry Torokhov drivers/input/serio/sa1111ps2.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit e6c44368761c069b3749c6a5591fe1aa6042f648 Author: Russell King Date: Tue Sep 26 09:56:23 2017 -0700 Input: sa1111ps2 - use sa1111_get_irq() to obtain IRQ resources Use the provided sa1111_get_irq() to fetch the IRQ resources for the SA1111 PS/2 driver. Signed-off-by: Russell King Signed-off-by: Dmitry Torokhov drivers/input/serio/sa1111ps2.c | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) commit 3bd3b9ed1b602c065aa0b1ba109b9622afa6ff98 Author: Himanshu Jha Date: Sun Sep 24 17:41:24 2017 +0530 net: bcm63xx_enet: Use setup_timer and mod_timer Use setup_timer and mod_timer API instead of structure assignments. This is done using Coccinelle and semantic patch used for this as follows: @@ expression x,y,z,a,b; @@ -init_timer (&x); +setup_timer (&x, y, z); +mod_timer (&a, b); -x.function = y; -x.data = z; -x.expires = b; -add_timer(&a); Signed-off-by: Himanshu Jha Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcm63xx_enet.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 5b2ef20df930a03ddc60bc5eac1ad36860420de7 Merge: 2091c22 1e99c49 Author: David S. Miller Date: Tue Sep 26 11:22:03 2017 -0700 Merge branch 'qed-iWARP-fixes-and-enhancements' Michal Kalderon says: ==================== qed: iWARP fixes and enhancements This patch series includes several fixes and enhancements related to iWARP. Patch #1 is actually the last of the initial iWARP submission. It has been delayed until now as I wanted to make sure that qedr supports iWARP prior to enabling iWARP device detection. iWARP changes in RDMA tree have been accepted and targeted at kernel 4.15, therefore, all iWARP fixes for this cycle are submitted to net-next. Changes from v1->v2 - Added "Fixes:" tag to commit message of patch #3 ==================== Signed-off by: Michal.Kalderon@cavium.com Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 1e99c497012cd8647972876f1bd18545bc907aea Author: Michal Kalderon Date: Sun Sep 24 12:09:45 2017 +0300 qed: iWARP - Add check for errors on a SYN packet A SYN packet which arrives with errors from FW should be dropped. This required adding an additional field to the ll2 rx completion data. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 8 ++++++++ drivers/net/ethernet/qlogic/qed/qed_ll2.c | 1 + include/linux/qed/qed_ll2_if.h | 1 + 3 files changed, 10 insertions(+) commit 471115ab9804f45cb8e091e426c9c67fe75e41b0 Author: Michal Kalderon Date: Sun Sep 24 12:09:44 2017 +0300 qed: Fix maximum number of CQs for iWARP The maximum number of CQs supported is bound to the number of connections supported, which differs between RoCE and iWARP. This fixes a crash that occurred in iWARP when running 1000 sessions using perftest. Fixes: 67b40dccc45 ("qed: Implement iWARP initialization, teardown and qp operations") Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_rdma.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit d1abfd0b4ee2b83af88098a0c7105622c3d66e73 Author: Michal Kalderon Date: Sun Sep 24 12:09:43 2017 +0300 qed: Add iWARP out of order support iWARP requires OOO support which is already provided by the ll2 interface (until now was used only for iSCSI offload). The changes mostly include opening a ll2 dedicated connection for OOO and notifiying the FW about the handle id. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 44 +++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_iwarp.h | 11 +++++++- drivers/net/ethernet/qlogic/qed/qed_rdma.c | 7 +++-- 3 files changed, 59 insertions(+), 3 deletions(-) commit e0a8f9de16fce34fc2957eca4c71d3ff2ac286d5 Author: Michal Kalderon Date: Sun Sep 24 12:09:42 2017 +0300 qed: Add iWARP enablement support This patch is the last of the initial iWARP patch series. It adds the possiblity to actually detect iWARP from the device and enable it in the critical locations which basically make iWARP available. It wasn't submitted until now as iWARP hadn't been accepted into the rdma tree. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_cxt.c | 6 ++++++ drivers/net/ethernet/qlogic/qed/qed_mcp.c | 8 ++++---- drivers/net/ethernet/qlogic/qed/qed_rdma.c | 5 ++++- drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | 1 + 4 files changed, 15 insertions(+), 5 deletions(-) commit 0b508bc926bdced678febee2a2b8cdba0a19e481 Author: Shaohua Li Date: Tue Sep 26 11:02:12 2017 -0700 block: fix a build error The code is only for blkcg not for all cgroups Fixes: d4478e92d618 ("block/loop: make loop cgroup aware") Reported-by: kbuild test robot Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/loop.c | 2 +- include/linux/kthread.h | 2 +- kernel/kthread.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) commit a369d4ac4dff92129ea0dfa3d66f45a830e29098 Author: Maor Gottlieb Date: Sun Aug 27 13:18:40 2017 +0300 net/mlx5: Add FGs and FTEs memory pool Add memory pool allocation for flow groups and flow table entry. It is useful because these objects are not small and could be allocated/deallocated many times. Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 67 +++++++++++++++++------ drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 2 + 2 files changed, 53 insertions(+), 16 deletions(-) commit f5c2ff179f51101893e42e78683b23a487929d6c Author: Maor Gottlieb Date: Tue Aug 29 19:17:12 2017 +0300 net/mlx5: Allocate FTE object without lock Allocation of new FTE is a massive operation, part of it could be done without taking the flow group write lock. Split the FTE allocation to two functions of actions which need to be under lock and action which don't have. Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 92 +++++++++++------------ 1 file changed, 46 insertions(+), 46 deletions(-) commit bd71b08ec2ee4504bcc3b37a9283ce15e93dfacd Author: Maor Gottlieb Date: Sun Aug 27 09:19:11 2017 +0300 net/mlx5: Support multiple updates of steering rules in parallel Most of the time spent on adding new flow steering rule is executing the firmware command. The most common action is adding a new flow steering entry. In order to enhance the update rate we parallelize the commands by doing the following: 1) Replace the mutex lock with readers-writers semaphore and take the write lock only when necessary (e.g. allocating a new flow table entry index or adding a node to the parent's children list). When we try to find a suitable child in the parent's children list (e.g. search for flow group with the same match_criteria of the rule) then we only take the read lock. 2) Add versioning mechanism - each steering entity (FT, FG, FTE, DST) will have an incremental version. The version is increased when the entity is changed (e.g. when a new FTE was added to FG - the FG's version is increased). Versioning is used in order to determine if the last traverse of an entity's children is valid or a rescan under write lock is required. This support improves the insertion rate of steering rules from ~5k/sec to ~40k/sec. Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 386 +++++++++++++++------- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 4 +- 2 files changed, 264 insertions(+), 126 deletions(-) commit c7784b1c8ab3f44dc2e643a8feb77584792c9108 Author: Maor Gottlieb Date: Sun Aug 27 09:07:44 2017 +0300 net/mlx5: Replace fs_node mutex with reader/writer semaphore Currently, steering object is protected by mutex lock, replace the mutex lock with reader/writer semaphore . In this patch we still use only write semaphore. In downstream patches we will switch part of the write locks to read locks. Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 28 +++++++++++------------ drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) commit 19f100fef4ad46f21cfdfb1eeeb63fc38c2e57f1 Author: Maor Gottlieb Date: Wed Jul 26 16:28:26 2017 +0300 net/mlx5: Refactor FTE and FG creation code Split the creation code to two parts: 1) Object allocation - allocate the steering node and initialize its resources. 2) The firmware command execution. Adding active flag to each node - this flag indicates if the object exists in the hardware or not, if not we don't free the hardware resource in error flow. This change will give us the ability to take write lock on the parent node (e.g. FG for FTE creationg) only on the first part. Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 356 ++++++++++++---------- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 1 + 2 files changed, 190 insertions(+), 167 deletions(-) commit 46719d77d5f38b8ef04aa5a5cd91263b11d741d7 Author: Maor Gottlieb Date: Tue Jul 25 19:20:49 2017 +0300 net/mlx5: Export building of matched flow groups list Refactor the code and export the build of the matched flow groups list to separate function. Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 100 ++++++++++++++-------- 1 file changed, 64 insertions(+), 36 deletions(-) commit 75d1d187b2ac86d1af2f1fd125ec21f104ca34b0 Author: Maor Gottlieb Date: Sun Jul 16 15:18:45 2017 +0300 net/mlx5: Move the entry index allocator to flow group When new flow table entry is added, we search for free index in the flow group and not in the flow table, therefore we can move the allocator from flow table to flow group. In downstream patches it will enable us to lock smaller part of the steering tree. Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 18 +++++++++--------- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) commit 800350a3f145010c353bd7425428c05ac5cfc26a Author: Maor Gottlieb Date: Wed Aug 23 17:50:03 2017 +0300 net/mlx5: Avoid NULL pointer dereference on steering cleanup On cleanup, when the node is the last child of parent then it calls to tree_put_node on the parent, if the parent's reference count is decremented to 0 (for e.g. when deleting last destination of FTE) then we free the parent as well and vice versa. In such a case we will try to free the parent node again. Increment the parent reference count before cleaning it's children will prevent implicit release of the parent object. Fixes: 0da2d66666d3 ('net/mlx5: Properly remove all steering objects') signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 ++ 1 file changed, 2 insertions(+) commit b92af5a72ca982f0aa3df22f57a178aa5b0f4357 Author: Matan Barak Date: Thu Aug 10 15:29:12 2017 +0300 net/mlx5: Fix creating a new FTE when an existing but full FTE exists Currently, when a flow steering rule is added, we look for a FTE with an identical value. If we find a match, we try to merge the required destinations with the existing ones. In a case where the existing destination list is full, the code should return an error to its consumer. However, the current code just tries to create another FTE. Fixing that by returning an error in this special scenario. Fixes: f478be79a22e ("net/mlx5: Add hash table for flow groups in flow table") Signed-off-by: Matan Barak Signed-off-by: Saeed Mahameed drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2091c227fa855776aafffad7ecd25ac0734df1a0 Author: Tobias Klauser Date: Tue Sep 26 15:14:15 2017 +0200 ldmvsw: Remove redundant unlikely() IS_ERR() already implies unlikely(), so it can be omitted. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/sun/ldmvsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92978ee801844b16180f2168ffffd05647da551a Author: Tobias Klauser Date: Tue Sep 26 15:13:23 2017 +0200 net/mlx5: Remove redundant unlikely() IS_ERR() already implies unlikely(), so it can be omitted. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1fac4b2fdbccab69cb781aae68f540be94d5549e Author: Tobias Klauser Date: Tue Sep 26 15:12:26 2017 +0200 bnxt_en: Remove redundant unlikely() IS_ERR() already implies unlikely(), so it can be omitted. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00ecd8a27c03b6dd463ab8755dd6d58751d76297 Author: Felix Kuehling Date: Sat Aug 26 02:40:45 2017 -0400 drm/amdgpu: Add prescreening stage in IH processing (v2) To filter out high-frequency interrupts that can be safely ignored. v2: squash in trivial typo fix for si (Alex) Signed-off-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/cik_ih.c | 14 ++++++++++++++ drivers/gpu/drm/amd/amdgpu/cz_ih.c | 14 ++++++++++++++ drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 14 ++++++++++++++ drivers/gpu/drm/amd/amdgpu/si_ih.c | 14 ++++++++++++++ drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 14 ++++++++++++++ drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 14 ++++++++++++++ 8 files changed, 92 insertions(+) commit d2791c45636927986f732482cbba4ed7c758a115 Author: Felix Kuehling Date: Sat Aug 26 02:10:12 2017 -0400 drm/amdkfd: Use PASID manager from KGD Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Reviewed-by: Oded Gabbay Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_module.c | 6 --- drivers/gpu/drm/amd/amdkfd/kfd_pasid.c | 90 ++++++++++++++------------------- 2 files changed, 38 insertions(+), 58 deletions(-) commit a91e70e30c3e1aaf90ddb851f9736367bc885fb8 Author: Felix Kuehling Date: Sat Aug 26 02:00:57 2017 -0400 drm/amdkfd: Separate doorbell allocation from PASID PASID management is moving into KGD. Limiting the PASID range to the number of doorbell pages is no longer practical. Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Reviewed-by: Oded Gabbay Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdkfd/kfd_device.c | 7 ----- drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c | 50 +++++++++++++++++++++---------- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 10 +++---- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 6 ++++ 4 files changed, 45 insertions(+), 28 deletions(-) commit f4d6229b9db66c6d8fcd5157b4bcc701c099e3e2 Author: Felix Kuehling Date: Fri Aug 25 21:30:18 2017 -0400 drm/radeon: Add PASID manager for KFD Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Reviewed-by: Oded Gabbay Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_kfd.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 02208441cc3a5110191996bb129db39ff10e7395 Author: Felix Kuehling Date: Fri Aug 25 20:40:26 2017 -0400 drm/amdgpu: Add PASID management Allows assigning a PASID to a VM for identifying VMs involved in page faults. The global PASID manager is also exported in the KFD interface so that AMDGPU and KFD can share the PASID space. PASIDs of different sizes can be requested. On APUs, the PASID size is deterined by the capabilities of the IOMMU. So KFD must be able to allocate PASIDs in a smaller range. Signed-off-by: Felix Kuehling Acked-by: Alex Deucher Reviewed-by: Oded Gabbay Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 75 ++++++++++++++++++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 14 ++++- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 6 ++ 6 files changed, 97 insertions(+), 4 deletions(-) commit ca290da8f6345c8e8e180256fbe092c751fa9654 Author: Felix Kuehling Date: Fri Aug 25 20:15:04 2017 -0400 drm/amdgpu: Fix error handling in amdgpu_vm_init Make sure vm->root.bo is not left reserved if amdgpu_bo_kmap fails. Signed-off-by: Felix Kuehling 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 0596df6b09cf652844eb08c917da94984177846b Author: Rex Zhu Date: Fri Sep 15 16:30:52 2017 +0800 drm/amd/powerplay: Simplify smu7_voting_clients() Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 59 ++++++++---------------- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.h | 9 +--- 2 files changed, 19 insertions(+), 49 deletions(-) commit 780cffc599b640f1ea1ab051496ad1fed4532150 Author: Rex Zhu Date: Tue Sep 12 13:37:40 2017 +0800 drm/amdgpu: add powerplay support for CI asics currently, for CI asics, use dpm by default, amdgpu.dpm=-1. when set amdgpu.dpm=1, enable powplay. when set amdgpu.dpm=0, disable both dpm and powerplay. when powerplay is stable on CI asics, ci_dpm will be removed. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 86457c3b21cbde1e5df45a8e11e173414e3dfc31 Author: Rex Zhu Date: Thu Sep 14 21:05:18 2017 +0800 drm/amd/powerplay: Add support for CI asics to hwmgr Add support for CI asics (Bonaire, Hawaii) to the powerplay hwmgr Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 57 ++++++----- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 118 ++++++++++++++++++----- 2 files changed, 128 insertions(+), 47 deletions(-) commit 970d9804b00d41e7c047477d036d451fcf25815e Author: Rex Zhu Date: Thu Sep 14 21:14:59 2017 +0800 drm/amd/powerplay: Add support functions for CI to ppatomctrl.c Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 80 ++++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.h | 6 ++ 2 files changed, 86 insertions(+) commit 89c67699ad9436ab99e0daa91bf1cf05cd297bac Author: Rex Zhu Date: Fri Sep 15 11:09:20 2017 +0800 drm/amd/powerplay: refine dmesg info under powerplay Use pr_debug to prevent spamming unimportant dmesg. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 6 +++--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) commit 2a527680a112d6b230961e3714d370a2e369bda9 Author: Rex Zhu Date: Thu Sep 14 09:10:41 2017 +0800 drm/amd/powerplay: fix set target TDP error on tonga/iceland ConfigurableTDP do not exist from Fiji. so only use in previous ASIC. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 9f4b35411cfed96d4f9f092b2fed14905af84d89 Author: Rex Zhu Date: Fri Sep 8 19:34:33 2017 +0800 drm/amd/powerplay: add CI asics support to smumgr (v3) This ports support for CI asics (Bonaire, Hawaii) to the powerplay smumgr v2: warning fix (Alex) v3: squash in fix for thermal (Tom) Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher .../amd/include/asic_reg/smu/smu_7_0_1_sh_mask.h | 2 + drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 1 + drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 2755 ++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.h | 52 + drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 86 + drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.h | 78 + drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 3 + 8 files changed, 2978 insertions(+), 1 deletion(-) commit d9db5e3680c87fdbdf86fcb1c42caea4bf98680c Author: Tobias Klauser Date: Tue Sep 26 11:22:58 2017 +0200 kcm: Remove redundant unlikely() IS_ERR() already implies unlikely(), so it can be omitted. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller net/kcm/kcmsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63a4e80be4f523dbde6412decfa8244ff73cc4b9 Author: Tobias Klauser Date: Tue Sep 26 11:22:31 2017 +0200 ipv6: Remove redundant unlikely() IS_ERR() already implies unlikely(), so it can be omitted. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller net/ipv6/addrconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 98e4fcff3e755c6c3de2d4f63c080b4009a599bd Author: Tobias Klauser Date: Tue Sep 26 11:21:42 2017 +0200 datagram: Remove redundant unlikely() IS_ERR() already implies unlikely(), so it can be omitted. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller net/core/datagram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f4cf93b133ba6596ae69cfd09b48aa7b47cca41 Author: Tobias Klauser Date: Tue Sep 26 11:04:23 2017 +0200 net: ena: Remove redundant unlikely() IS_ERR() already implies unlikely(), so it can be omitted. Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller drivers/net/ethernet/amazon/ena/ena_com.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 75ab9eb6f15bad78b3ce274c699c27dc98ab13ce Author: Kuninori Morimoto Date: Tue Sep 26 00:40:42 2017 +0000 ASoC: add null_snd_soc_ops and reduce NULL ops check Double NULL pointer check for ops and ops->func is difficult to read and might be forget to check it if new func was add. This patch adds new null_snd_soc_ops and use it if rtd->dai_link didn't have it to avoid NULL ops, and reduces ops NULL check. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 5 +++++ sound/soc/soc-pcm.c | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) commit 4d34b11e46184bb5762491d32566fade188c6c01 Author: Tvrtko Ursulin Date: Wed Sep 20 10:27:00 2017 +0100 drm/i915: Compact device info access by a small re-ordering More effort to align members on 4-byte boundary helps with code size a tiny bit: text data bss dec hex filename -1460454 60014 3656 1524124 17419c drivers/gpu/drm/i915/i915.ko +1460254 60014 3656 1523924 1740d4 drivers/gpu/drm/i915/i915.ko Signed-off-by: Tvrtko Ursulin Cc: Jani Nikula Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170920092701.17963-3-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) commit 5a127a8c4aaf6ea06752ee6404cd7eaea7154a6c Author: Tvrtko Ursulin Date: Wed Sep 20 10:26:59 2017 +0100 drm/i915: Add IS_PLATFORM macro This will allow some code re-organization in a following patch. Signed-off-by: Tvrtko Ursulin Cc: Jani Nikula Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170920092701.17963-2-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 52 +++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 25 deletions(-) commit 9979d545c93653770984806e9bfcec1df53a9d3d Author: Corentin Labbe Date: Mon Sep 25 19:10:07 2017 +0200 block: cryptoloop - Fix build warning This patch fix the following build warning: drivers/block/cryptoloop.c:46:8: warning: variable 'cipher' set but not used [-Wunused-but-set-variable] Signed-off-by: Corentin Labbe Signed-off-by: Jens Axboe drivers/block/cryptoloop.c | 2 -- 1 file changed, 2 deletions(-) commit d4478e92d6186ce37947a36994de407c27446266 Author: Shaohua Li Date: Mon Sep 25 13:07:22 2017 -0600 block/loop: make loop cgroup aware loop block device handles IO in a separate thread. The actual IO dispatched isn't cloned from the IO loop device received, so the dispatched IO loses the cgroup context. I'm ignoring buffer IO case now, which is quite complicated. Making the loop thread aware cgroup context doesn't really help. The loop device only writes to a single file. In current writeback cgroup implementation, the file can only belong to one cgroup. For direct IO case, we could workaround the issue in theory. For example, say we assign cgroup1 5M/s BW for loop device and cgroup2 10M/s. We can create a special cgroup for loop thread and assign at least 15M/s for the underlayer disk. In this way, we correctly throttle the two cgroups. But this is tricky to setup. This patch tries to address the issue. We record bio's css in loop command. When loop thread is handling the command, we then use the API provided in patch 1 to set the css for current task. The bio layer will use the css for new IO (from patch 3). Acked-by: Tejun Heo Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe drivers/block/loop.c | 13 +++++++++++++ drivers/block/loop.h | 1 + 2 files changed, 14 insertions(+) commit 902ec5b6de0678ac2effba0faaafdd1c3e7fcf2e Author: Shaohua Li Date: Thu Sep 14 14:02:06 2017 -0700 block: make blkcg aware of kthread stored original cgroup info bio_blkcg is the only API to get cgroup info for a bio right now. If bio_blkcg finds current task is a kthread and has original blkcg associated, it will use the css instead of associating the bio to current task. This makes it possible that kthread dispatches bios on behalf of other threads. Acked-by: Tejun Heo Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe include/linux/blk-cgroup.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit af551fb3be26a22b7a6b345b3b7e7e6acfc41758 Author: Shaohua Li Date: Thu Sep 14 14:02:05 2017 -0700 blkcg: delete unused APIs Nobody uses the APIs right now. Acked-by: Tejun Heo Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe block/bio.c | 31 ------------------------------- include/linux/bio.h | 2 -- include/linux/blk-cgroup.h | 12 ------------ 3 files changed, 45 deletions(-) commit 05e3db95ebfc5c06a29a1d8c7a3e02f46f3a25a7 Author: Shaohua Li Date: Thu Sep 14 14:02:04 2017 -0700 kthread: add a mechanism to store cgroup info kthread usually runs jobs on behalf of other threads. The jobs should be charged to cgroup of original threads. But the jobs run in a kthread, where we lose the cgroup context of original threads. The patch adds a machanism to record cgroup info of original threads in kthread context. Later we can retrieve the cgroup info and attach the cgroup info to jobs. Since this mechanism is only required by kthread, we store the cgroup info in kthread data instead of generic task_struct. Acked-by: Tejun Heo Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe include/linux/kthread.h | 11 +++++++++ kernel/kthread.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 75 insertions(+), 2 deletions(-) commit 45b611c896faf29e235d9de6c7a8ceb3393c2b9c Author: Alexandre Belloni Date: Fri Sep 15 04:00:02 2017 +0200 rtc: rv3029: fix vendor string The vendor string for Microcrystal is microcrystal. Acked-by: Rob Herring Signed-off-by: Alexandre Belloni Documentation/devicetree/bindings/trivial-devices.txt | 2 +- drivers/rtc/rtc-rv3029c2.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) commit 003278e431bffa4070d18c821eff1d95867f24db Author: Corentin Labbe Date: Tue Sep 26 09:14:07 2017 +0200 nfs_common: convert int to bool Since __state_in_grace return only true/false, make it return bool instead of int. Same change for the two user of it, locks_in_grace/opens_in_grace Signed-off-by: Corentin Labbe Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfs_common/grace.c | 10 +++++----- include/linux/fs.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) commit 809d4fcf9dd593af6d11ab1e6f0efc9fcfefb682 Author: Corentin Labbe Date: Tue Sep 26 09:14:06 2017 +0200 nfs_common: move locks_in_grace comment at the right place Commit c87fb4a378f9 ("lockd: NLM grace period shouldn't block NFSv4 opens") made the locks_in_grace() comment be in the wrong place. This patch move this comment just at the right place. Signed-off-by: Corentin Labbe Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfs_common/grace.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 033c006e5fe08233014d449715171f07e68a4a3a Author: Corentin Labbe Date: Tue Sep 26 09:14:05 2017 +0200 nfs_common: fix build warning in grace.c This fix the following warning fs/nfs_common/grace.c:66:1: warning: no previous prototype for function '__state_in_grace' [-Wmissing-prototypes] by adding the missing static. Signed-off-by: Corentin Labbe Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/nfs_common/grace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06ff5dad46feee9ebc0b9f14f0ae3fe3d232392e Author: Colin Ian King Date: Tue Sep 26 14:18:36 2017 +0100 ieee802154: atusb: make two structures static, fixes warnings The arrays atusb_chip_data and hulusb_chip_data are local to the source and do not need to be in global scope, so make them static. Also remove unnecessary forward declaration of atusb_chip_data. Cleans up sparse warnings: symbol 'atusb_chip_data' was not declared. Should it be static? symbol 'hulusb_chip_data' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Stefan Schmidt drivers/net/ieee802154/atusb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 763556980dde78166886734ae470664c67067dd4 Author: Stefan Schmidt Date: Fri Sep 22 10:44:57 2017 +0200 ieee802154: atusb: fix firmware version check to enable frame retries Geert reported: as fw_ver_maj is unsigned char, gcc 4.1.2 complains: warning: comparison is always true due to limited range of data type Besides the warning the old check would also fail for firmware versions like 1.x with x < 3. These would support frame retries, but the driver would not enable the feature. Reported-by: Geert Uytterhoeven Signed-off-by: Stefan Schmidt drivers/net/ieee802154/atusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87dc03ad268f285065cdd2e2ac75701a1f04d0b8 Author: Chris Wilson Date: Fri Sep 15 14:09:29 2017 +0100 drm/i915/selftests: Try to recover from a wedged GPU during reset tests If we see the seqno stop progressing, we abandon the test for fear that the GPU died following the reset. However, during test teardown we still wait for the GPU to idle before continuing, but we have already confirmed that the GPU is dead. Furthermore, since we are inside a reset test, we have disabled the hangchecker, and so there is no safety net and we wait indefinitely. Detect the stuck GPU and declare it wedged as a state of emergency so we can escape. Signed-off-by: Chris Wilson Cc: Jari Tahvanainen Cc: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20170915130929.18892-1-chris@chris-wilson.co.uk Tested-by: Jari Tahvanainen Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) commit 31e79286e8e642a0aa136be7e8568e3323e7321e Author: Corentin LABBE Date: Tue Sep 26 09:22:23 2017 +0200 ARM: dts: sunxi: h3/h5: Fix node with unit name and no reg property This patch fix the warning "xxx has a unit name, but no reg property" by removing "@0" from such node. Signed-off-by: Corentin Labbe Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai arch/arm/boot/dts/sunxi-h3-h5.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 4d2ee8d56bdb17bf296800829642bbd34ef08a09 Author: Corentin LABBE Date: Tue Sep 26 09:22:22 2017 +0200 ARM: dts: sunxi: h3/h5: Fix i2c2 register address The unit address and register address does not match. This patch fix the register address with the good one. Acked-by: Maxime Ripard Signed-off-by: Corentin Labbe Signed-off-by: Chen-Yu Tsai arch/arm/boot/dts/sunxi-h3-h5.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3fd57f55d5c279b6329b190fa2ac1a43b3a7aa4 Author: Corentin LABBE Date: Tue Sep 26 09:22:21 2017 +0200 ARM: dts: sunxi: h3/h5: Fix simple-bus unit address format error This patch remove leading 0 of unit address and so remove lots of warning when building DT with W=1. Signed-off-by: Corentin Labbe Acked-by: Maxime Ripard Signed-off-by: Chen-Yu Tsai arch/arm/boot/dts/sunxi-h3-h5.dtsi | 74 +++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 37 deletions(-) commit ce7b700d1e0da806a5bcba19a197b050563df78f Author: Aishwarya Pant Date: Tue Sep 26 14:00:19 2017 +0530 drm/tilcdc: replace reference/unreference() with get/put For maintaining consistency with kernel coding style replace reference/unreference in ref counting functions with get/put. The following cocci script was used to generate the tilcdc patch: @@ expression ex; @@ ( -drm_framebuffer_unreference(ex); +drm_framebuffer_put(ex); | -drm_dev_unref(ex); +drm_dev_put(ex); | -drm_framebuffer_reference(ex); +drm_framebuffer_get(ex); ) Signed-off-by: Aishwarya Pant Acked-by: Jyri Sarha Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/3f2f592f6ea28adfea3fd8b70421b2fab38f0b94.1506413698.git.aishpant@gmail.com drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 6 +++--- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 9a96f55034e41b4e002b767e9218d55f03bdff7d Author: Aishwarya Pant Date: Tue Sep 26 13:58:49 2017 +0530 drm: introduce drm_dev_{get/put} functions Reference counting functions in the kernel typically use get/put suffixes. For maintaining coding style consistency, introduce drm_dev_{get/put} functions. All callers of drm_dev_ref() API have been converted in this patch and hence it has been dropped while the drm_dev_unref() API with non-trivial number of users remains for compatibility. The semantic patch scripts/coccinelle/api/drm-get-put.cocci has been updated with the new helper for conversion of drm_dev_unref() to drm_dev_put() Signed-off-by: Aishwarya Pant Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/6babda56134035a98220d5d37a4fd4048df214ce.1506413698.git.aishpant@gmail.com drivers/gpu/drm/drm_drv.c | 51 ++++++++++++++++++++------------ drivers/gpu/drm/drm_prime.c | 2 +- include/drm/drm_drv.h | 5 ++-- scripts/coccinelle/api/drm-get-put.cocci | 5 ++++ 4 files changed, 41 insertions(+), 22 deletions(-) commit 5da672cff03d3ffa36476e91943af50e3151db2a Author: Chen-Yu Tsai Date: Tue Sep 26 10:36:20 2017 +0800 clk: sunxi-ng: Implement reset control status readback Until now we were not providing a way to read back the status of our reset controls. Consumers had no real way to be certain whether a peripheral was held in reset or not. Implement the status callback to complete the API support. Fixes: 1d80c14248d6 ("clk: sunxi-ng: Add common infrastructure") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu_reset.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 9a2cbf2d7b94660e4c4920cfae4a5eecc83ee485 Author: Sagar Arun Kamble Date: Tue Sep 26 12:47:16 2017 +0530 drm/i915/huc: Reorganize HuC authentication Prepared intel_auth_huc to separate HuC specific functionality from GuC send action. Created new header intel_huc.h to group HuC specific declarations. v2: Changed argument preparation for AUTHENTICATE_HUC. s/intel_auth_huc/intel_huc_auth. Deferred creation of intel_huc.h to later patch. v3: Rebase as intel_guc.h is removed. Added param description to intel_huc_auth. (Michal) v4: Rebase as intel_guc.h is added again. :) v5: Rebase w.r.t removal of GuC code restructuring. v6-v7: Rebase. v8: Tagged subject as drm/i915/huc. (Michal Wajdeczko) Added kernel-doc description to intel_huc_auth and intel_guc_auth_huc. s/dev_priv/i915 and removed unnecessary variable offset. (Joonas) v9: Rebase. Had conflict with i915_modparams change. Signed-off-by: Sagar Arun Kamble Cc: Joonas Lahtinen Cc: Michal Wajdeczko Cc: Michał Winiarski Reviewed-by: Michal Wajdeczko Reviewed-by: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/1506410236-17926-1-git-send-email-sagar.a.kamble@intel.com drivers/gpu/drm/i915/intel_huc.c | 38 ++++++++++++++++++-------------------- drivers/gpu/drm/i915/intel_uc.c | 23 ++++++++++++++++++++++- drivers/gpu/drm/i915/intel_uc.h | 3 ++- 3 files changed, 42 insertions(+), 22 deletions(-) commit ad0c167252e90531b398bc5f637580733d1789e4 Author: Michal Wajdeczko Date: Mon Sep 25 10:50:08 2017 +0000 drm/i915: Fix default values of some modparams Members should be initialized with values of matching types. Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Acked-by: Jani Nikula Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170925105008.46060-3-michal.wajdeczko@intel.com drivers/gpu/drm/i915/i915_params.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 7075cb855d493487805ecf113874c04218d16014 Author: Michal Wajdeczko Date: Mon Sep 25 10:50:07 2017 +0000 drm/i915: Extend I915_PARAMS_FOR_EACH with default member value By combining default value into helper macro we can initialize modparams struct in the same automatic way as it was declared. This will initialize members in the same order as declared and additionally will disallow declaring new member without proper default value for it. v2: make MEMBER macro more robust (Joonas) Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Acked-by: Jani Nikula Reviewed-by: Joonas Lahtinen Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170925105008.46060-2-michal.wajdeczko@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 6 +-- drivers/gpu/drm/i915/i915_params.c | 42 ++---------------- drivers/gpu/drm/i915/i915_params.h | 82 +++++++++++++++++------------------ 4 files changed, 48 insertions(+), 84 deletions(-) commit 54fea2b974a076799e427e50644de7c6ca662be5 Author: Michal Wajdeczko Date: Mon Sep 25 10:50:06 2017 +0000 drm/i915: Make I915_PARAMS_FOR_EACH macro more flexible We should not add trailing ; after each member to allow other than statements-style uses of this helper macro. While here s/func/param for clarity. Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Cc: Jani Nikula Reviewed-by: Chris Wilson Acked-by: Jani Nikula Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170925105008.46060-1-michal.wajdeczko@intel.com drivers/gpu/drm/i915/i915_params.h | 84 +++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 42 deletions(-) commit c4d6204fbe70625bfc2309fe9c8ee017b48dea55 Author: Jagan Teki Date: Tue Sep 26 00:19:07 2017 +0530 ARM: dts: rockchip: Enable mali GPU node on rk3288-vyasa Enable mali GPU node for rk3288 vyasa board. Signed-off-by: Jagan Teki Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-vyasa.dts | 5 +++++ 1 file changed, 5 insertions(+) commit aec0246f3e3882065b5c29916a84b539afe4e4af Author: Uma Shankar Date: Mon Sep 25 19:26:01 2017 +0530 drm/i915: Enable scanline read based on frame timestamps For certain platforms on certain encoders, timings are driven from port instead of pipe. Thus, we can't rely on pipe scanline registers to get the timing information. Some cases scanline register read will not be functional. This is causing vblank evasion logic to fail since it relies on scanline, causing atomic update failure warnings. This patch uses pipe framestamp and current timestamp registers to calculate scanline. This is an indirect way to get the scanline. It helps resolve atomic update failure for gen9 dsi platforms. v2: Addressed Ville and Daniel's review comments. Updated the register MACROs, handled race condition for register reads, extracted timings from the hwmode. Removed the dependency on crtc->config to get the encoder type. v3: Made get scanline function generic v4: Addressed Ville's review comments. Added a flag to decide timestamp based scanline reporting. Changed 64bit variables to u32 v5: Adressed Ville's review comments. Put the scanline compute function at the place of caller. Removed hwmode flags from uapi and used a local i915 data structure instead. v6: Used vblank hwmode to get the timings. v7: Fixed sparse warnings, indentation and minor review comments. v8: Limited this only for Gen9 DSI. Credits-to: Ville Syrjälä Signed-off-by: Uma Shankar Signed-off-by: Chandra Konduru Signed-off-by: Vidya Srinivas Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1506347761-4201-1-git-send-email-vidya.srinivas@intel.com drivers/gpu/drm/i915/i915_irq.c | 54 ++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_reg.h | 9 +++++++ drivers/gpu/drm/i915/intel_drv.h | 2 ++ drivers/gpu/drm/i915/intel_dsi.c | 8 ++++++ 4 files changed, 73 insertions(+) commit e7ec76b6c0de143e5597b293fdc377d6aa0e5b00 Author: Mihaela Muraru Date: Tue Sep 26 10:24:50 2017 +0300 staging: rtl8712: Fix indent coding style issue This patch fixes an indentation coding style issue found by checkpatch.pl: WARNING: suspect code indent for conditional statements (16, 32) Signed-off-by: Mihaela Muraru Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ad02fa8b90a87e7445f20fdcd61cbc529d15c04 Author: Georgiana Chelu Date: Fri Sep 22 08:04:51 2017 -0700 Staging: rtl8723bs: core: Remove boolean comparison Remove comparison to bool in order to improve the clearness of the code. Issue found using coccinelle script. Signed-off-by: Georgiana Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 64 +++++++++++++-------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit f4052efe310af212531471244a1ea5b388ab6cbc Author: Jonathan Cameron Date: Tue Sep 26 08:05:08 2017 +0100 iio:stm32-lp-timer and ep93xx: drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements have gone away. Reported-by: Stephen Rothwell Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman drivers/iio/adc/ep93xx_adc.c | 1 - drivers/iio/counter/stm32-lptimer-cnt.c | 1 - drivers/iio/trigger/stm32-lptimer-trigger.c | 1 - 3 files changed, 3 deletions(-) commit f2a44dd02329707514af16fe0904a78604a97c0b Author: Thomas Meyer Date: Thu Sep 21 00:29:36 2017 +0200 drm/rockchip: Cocci spatch "vma_pages" Use vma_pages function on vma object instead of explicit computation. Found by coccinelle spatch "api/vma_pages.cocci" Signed-off-by: Thomas Meyer Signed-off-by: Mark Yao Link: https://patchwork.freedesktop.org/patch/msgid/1505946334393-988165015-7-diffsplit-thomas@m3y3r.de drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3fbe2e184d2fbc353425efa7b788aba64374119b Author: Haneen Mohammed Date: Thu Sep 21 15:04:24 2017 -0600 drm: Remove obsolete "This is gross" comment Remove obsolete comment which was initially added in 2008 to annotate that idr_find() was used before idr_remove() since idr_remove() didn't use to return feedback. The comment now is irrelevant with commit f6cd7daecff5 ("drm: Release driver references to handle before making it available again"). Signed-off-by: Haneen Mohammed Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170921210424.GA21951@Haneen drivers/gpu/drm/drm_gem.c | 9 --------- 1 file changed, 9 deletions(-) commit d0d1aee5f7eda2f2cae0932a217e27493f2c2faa Author: Daniel Vetter Date: Thu Sep 21 00:59:57 2017 +0200 drm: Try to document legacy DPMS uapi a bit better Due to inconsistency of how various legacy drivers implemented DPMS the DPMS uabi has a lot of quirks. Atomic standardizes this, but drivers using the DPMS support can't rely on that since legacy drivers still exist. Laurent asked for this. v2: Improve commit message and explain that DPMS doesn't really exist for the atomic ioctl (it's "ACTIVE" on the CRTC instead). Text polish from Eric's review. Cc: Laurent Pinchart Signed-off-by: Daniel Vetter Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: David Airlie Cc: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20170920225957.16278-1-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_connector.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 01ccdf126ca5f9d4fe0889f65ee67afac910f19c Author: Alexey Dobriyan Date: Sat Sep 23 23:03:04 2017 +0300 neigh: make strucrt neigh_table::entry_size unsigned int Key length can't be negative. Leave comparisons against nla_len() signed just in case truncated attribute can sneak in there. Space savings: add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-7 (-7) function old new delta pneigh_delete 273 272 -1 mlx5e_rep_netevent_event 1415 1414 -1 mlx5e_create_encap_header_ipv6 1194 1193 -1 mlx5e_create_encap_header_ipv4 1071 1070 -1 cxgb4_l2t_get 1104 1103 -1 __pneigh_lookup 69 68 -1 __neigh_create 2452 2451 -1 Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/l2t.c | 4 ++-- include/net/neighbour.h | 2 +- net/core/neighbour.c | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) commit e451ae8e4f6b3f6bd3b83a5595657b5421b3bf69 Author: Alexey Dobriyan Date: Sat Sep 23 23:01:06 2017 +0300 neigh: make struct neigh_table::entry_size unsigned int Neigh entry size can't be negative. Space savings: add/remove: 0/0 grow/shrink: 0/5 up/down: 0/-7 (-7) function old new delta lowpan_neigh_construct 25 24 -1 clip_seq_sub_iter 152 151 -1 clip_ioctl 1475 1474 -1 clip_constructor 93 92 -1 __neigh_create 2455 2452 -3 Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller include/net/neighbour.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c90584c66cc4b033a3b684b0e0950f79e7b7166 Author: Eric Dumazet Date: Sat Sep 23 12:39:12 2017 -0700 net: speed up skb_rbtree_purge() As measured in my prior patch ("sch_netem: faster rb tree removal"), rbtree_postorder_for_each_entry_safe() is nice looking but much slower than using rb_next() directly, except when tree is small enough to fit in CPU caches (then the cost is the same) Also note that there is not even an increase of text size : $ size net/core/skbuff.o.before net/core/skbuff.o text data bss dec hex filename 40711 1298 0 42009 a419 net/core/skbuff.o.before 40711 1298 0 42009 a419 net/core/skbuff.o From: Eric Dumazet Signed-off-by: David S. Miller net/core/skbuff.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 3aa605f28b0d004a640a826380b39c7dcf70195d Author: Eric Dumazet Date: Sat Sep 23 11:07:28 2017 -0700 sch_netem: faster rb tree removal While running TCP tests involving netem storing millions of packets, I had the idea to speed up tfifo_reset() and did experiments. I tried the rbtree_postorder_for_each_entry_safe() method that is used in skb_rbtree_purge() but discovered it was slower than the current tfifo_reset() method. I measured time taken to release skbs with three occupation levels : 10^4, 10^5 and 10^6 skbs with three methods : 1) (current 'naive' method) while ((p = rb_first(&q->t_root))) { struct sk_buff *skb = netem_rb_to_skb(p); rb_erase(p, &q->t_root); rtnl_kfree_skbs(skb, skb); } 2) Use rb_next() instead of rb_first() in the loop : p = rb_first(&q->t_root); while (p) { struct sk_buff *skb = netem_rb_to_skb(p); p = rb_next(p); rb_erase(&skb->rbnode, &q->t_root); rtnl_kfree_skbs(skb, skb); } 3) "optimized" method using rbtree_postorder_for_each_entry_safe() struct sk_buff *skb, *next; rbtree_postorder_for_each_entry_safe(skb, next, &q->t_root, rbnode) { rtnl_kfree_skbs(skb, skb); } q->t_root = RB_ROOT; Results : method_1:while (rb_first()) rb_erase() 10000 skbs in 690378 ns (69 ns per skb) method_2:rb_first; while (p) { p = rb_next(p); ...} 10000 skbs in 541846 ns (54 ns per skb) method_3:rbtree_postorder_for_each_entry_safe() 10000 skbs in 868307 ns (86 ns per skb) method_1:while (rb_first()) rb_erase() 99996 skbs in 7804021 ns (78 ns per skb) method_2:rb_first; while (p) { p = rb_next(p); ...} 100000 skbs in 5942456 ns (59 ns per skb) method_3:rbtree_postorder_for_each_entry_safe() 100000 skbs in 11584940 ns (115 ns per skb) method_1:while (rb_first()) rb_erase() 1000000 skbs in 108577838 ns (108 ns per skb) method_2:rb_first; while (p) { p = rb_next(p); ...} 1000000 skbs in 82619635 ns (82 ns per skb) method_3:rbtree_postorder_for_each_entry_safe() 1000000 skbs in 127328743 ns (127 ns per skb) Method 2) is simply faster, probably because it maintains a smaller working size set. Note that this is the method we use in tcp_ofo_queue() already. I will also change skb_rbtree_purge() in a second patch. Signed-off-by: Eric Dumazet Acked-by: David Ahern Signed-off-by: David S. Miller net/sched/sch_netem.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 9484dc74fcf0750cd6726c9aa27edf97223916a8 Author: yuan linyu Date: Sat Sep 23 22:36:52 2017 +0800 tun: delete original tun_get() and rename __tun_get() to tun_get() it seems no need to keep tun_get() and __tun_get() at same time. Signed-off-by: yuan linyu Signed-off-by: David S. Miller drivers/net/tun.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit ba581f77df23c8ee70b372966e69cf10bc5453d8 Author: Ganesh Goudar Date: Sat Sep 23 16:07:28 2017 +0530 cxgb4: do DCB state reset in couple of places reset the driver's DCB state in couple of places where it was missing. Signed-off-by: Casey Leedom Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c | 15 +++++++++++---- drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 10 ++++++++-- 3 files changed, 20 insertions(+), 6 deletions(-) commit d958af3d14beeaee6f55e3e2dee568409a62f8ae Merge: 74c6042 429cbf6 Author: David S. Miller Date: Mon Sep 25 20:25:40 2017 -0700 Merge branch 'liquidio-fw-loading' Rick Farrington says: ==================== liquidio: firmware loading 1. Allow host driver parameter to override auto-loaded firmware (in flash). 2. Verify version of firmware that is auto-loaded from flash. 3. Change value of fw_type module parameter to reflect default firmware image name that is loaded by host driver (in /sys/module/liquidio/...) ==================== Signed-off-by: David S. Miller commit 429cbf6bde1adff108171ad4b2387e62f851d609 Author: Rick Farrington Date: Fri Sep 22 17:12:51 2017 -0700 liquidio: update module parameter fw_type to reflect firmware type loaded Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b36e48209157fdd98a5589a3dd60ff3fbf51e16d Author: Rick Farrington Date: Fri Sep 22 17:12:47 2017 -0700 liquidio: verify firmware version when auto-loaded from flash. Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 088b8749da1e35b0dd9cb0e6500ca1c94c9bf547 Author: Rick Farrington Date: Fri Sep 22 17:12:43 2017 -0700 liquidio: allow override of firmware present in flash Signed-off-by: Rick Farrington Signed-off-by: Felix Manlunas Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 68 ++++++++++++++-------- .../net/ethernet/cavium/liquidio/liquidio_image.h | 1 + .../net/ethernet/cavium/liquidio/octeon_device.c | 11 +++- .../net/ethernet/cavium/liquidio/octeon_device.h | 10 ++++ 4 files changed, 64 insertions(+), 26 deletions(-) commit 74c6042a1e0e40ce32c305c111dafadb3ff10953 Merge: 6450f8f fb8a6a2 Author: David S. Miller Date: Mon Sep 25 20:22:46 2017 -0700 Merge branch 'dsa-port-enabling' Vivien Didelot says: ==================== net: dsa: port enabling This patchset makes slave open and close symmetrical and provides helpers for enabling or disabling a given DSA port. Changes in v3: - save the phy_device change for a future patchset Changes in v2: - do not remove the phy argument from port enable/disable ==================== Signed-off-by: David S. Miller commit fb8a6a2b8b7cfee8a0cf2cd431e1d0f45dd1c9e0 Author: Vivien Didelot Date: Fri Sep 22 19:01:56 2017 -0400 net: dsa: add port enable and disable helpers Provide dsa_port_enable and dsa_port_disable helpers to respectively enable and disable a switch port. This makes the dsa_port_set_state_now helper static. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 3 ++- net/dsa/port.c | 31 ++++++++++++++++++++++++++++++- net/dsa/slave.c | 19 +++++-------------- 3 files changed, 37 insertions(+), 16 deletions(-) commit 6457edfe7344ac1da334b9f24a42aacea084a451 Author: Vivien Didelot Date: Fri Sep 22 19:01:55 2017 -0400 net: dsa: make slave close symmetrical to open The DSA slave open function configures the unicast MAC addresses on the master device, enable the switch port, change its STP state, then start the PHY device. Make the close function symmetric, by first stopping the PHY device, then changing the STP state, disabling the switch port and restore the master device. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller net/dsa/slave.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6450f8f269a9271985e4a8c13920b7e4cf21c0f3 Author: Haiyang Zhang Date: Fri Sep 22 15:31:38 2017 -0700 hv_netvsc: Fix the real number of queues of non-vRSS cases For older hosts without multi-channel (vRSS) support, and some error cases, we still need to set the real number of queues to one. This patch adds this missing setting. Fixes: 8195b1396ec8 ("hv_netvsc: fix deadlock on hotplug") Signed-off-by: Haiyang Zhang Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller drivers/net/hyperv/netvsc_drv.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 070eb6e0890b189a5a5cd37e39005ea0c77d9ea3 Merge: e94cd81 90e33d4 Author: David S. Miller Date: Mon Sep 25 20:16:14 2017 -0700 Merge branch 'tun-NAPI-and-gro' Petar Penkov says: ==================== net: Improve code coverage of syzkaller This patch series is intended to improve code coverage of syzkaller on the early receive path, specifically including flow dissector, GRO, and GRO with frags parts of the networking stack. Syzkaller exercises the stack through the TUN driver and this is therefore where changes reside. Current coverage through netif_receive_skb() is limited as it does not touch on any of the aforementioned code paths. Furthermore, for full coverage, it is necessary to have more flexibility over the linear and non-linear data of the skbs. The following patches address this by providing the user(syzkaller) with the ability to send via napi_gro_receive() and napi_gro_frags(). Additionally, syzkaller can specify how many fragments there are and how much data per fragment there is. This is done by exploiting the convenient structure of iovecs. Finally, this patch series adds support for exercising the flow dissector during fuzzing. The code path including napi_gro_receive() can be enabled via the IFF_NAPI flag. The remainder of the changes in this patch series give the user significantly more control over packets entering the kernel. To avoid potential security vulnerabilities, hide the ability to send custom skbs and the flow dissector code paths behind a capable(CAP_NET_ADMIN) check to require special user privileges. Changes since v2 based on feedback from Willem de Bruijn and Mahesh Bandewar: Patch 1/ No changes. Patch 2/ Check if the preconditions for IFF_NAPI_FRAGS (IFF_NAPI and IFF_TAP) are met before opening/attaching rather than after. If they are not, change the behavior from discarding the flag to rejecting the command with EINVAL. ==================== Signed-off-by: David S. Miller commit 90e33d45940793def6f773b2d528e9f3c84ffdc7 Author: Petar Penkov Date: Fri Sep 22 13:49:15 2017 -0700 tun: enable napi_gro_frags() for TUN/TAP driver Add a TUN/TAP receive mode that exercises the napi_gro_frags() interface. This mode is available only in TAP mode, as the interface expects packets with Ethernet headers. Furthermore, packets follow the layout of the iovec_iter that was received. The first iovec is the linear data, and every one after the first is a fragment. If there are more fragments than the max number, drop the packet. Additionally, invoke eth_get_headlen() to exercise flow dissector code and to verify that the header resides in the linear data. The napi_gro_frags() mode requires setting the IFF_NAPI_FRAGS option. This is imposed because this mode is intended for testing via tools like syzkaller and packetdrill, and the increased flexibility it provides can introduce security vulnerabilities. This flag is accepted only if the device is in TAP mode and has the IFF_NAPI flag set as well. This is done because both of these are explicit requirements for correct operation in this mode. Signed-off-by: Petar Penkov Cc: Eric Dumazet Cc: Mahesh Bandewar Cc: Willem de Bruijn Cc: davem@davemloft.net Cc: ppenkov@stanford.edu Acked-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/tun.c | 134 ++++++++++++++++++++++++++++++++++++++++++-- include/uapi/linux/if_tun.h | 1 + 2 files changed, 129 insertions(+), 6 deletions(-) commit 943170998b200190f99d3fe7e771437e2c51f319 Author: Petar Penkov Date: Fri Sep 22 13:49:14 2017 -0700 tun: enable NAPI for TUN/TAP driver Changes TUN driver to use napi_gro_receive() upon receiving packets rather than netif_rx_ni(). Adds flag IFF_NAPI that enables these changes and operation is not affected if the flag is disabled. SKBs are constructed upon packet arrival and are queued to be processed later. The new path was evaluated with a benchmark with the following setup: Open two tap devices and a receiver thread that reads in a loop for each device. Start one sender thread and pin all threads to different CPUs. Send 1M minimum UDP packets to each device and measure sending time for each of the sending methods: napi_gro_receive(): 4.90s netif_rx_ni(): 4.90s netif_receive_skb(): 7.20s Signed-off-by: Petar Penkov Cc: Eric Dumazet Cc: Mahesh Bandewar Cc: Willem de Bruijn Cc: davem@davemloft.net Cc: ppenkov@stanford.edu Acked-by: Mahesh Bandewar Signed-off-by: David S. Miller drivers/net/tun.c | 133 +++++++++++++++++++++++++++++++++++++++----- include/uapi/linux/if_tun.h | 1 + 2 files changed, 119 insertions(+), 15 deletions(-) commit b9fde58db7e5738cacb740b0ec547933fe314fbe Author: Benjamin Herrenschmidt Date: Thu Sep 7 16:35:44 2017 +1000 powerpc/powernv: Rework EEH initialization on powernv Remove the post_init callback which is only used by powernv, we can just call it explicitly from the powernv code. This partially kills the ability to "disable" eeh at runtime via debugfs as this was calling that same callback again, but this is both unused and broken in several ways. If we want to revive it, we need to create a dedicated enable/disable callback on the backend that does the right thing. Let the bulk of eeh initialize normally at core_initcall() like it does on pseries by removing the hack in eeh_init() that delays it. Instead we make sure our eeh->probe cleanly bails out of the PEs haven't been created yet and we force a re-probe where we used to call eeh_init() again. Signed-off-by: Benjamin Herrenschmidt Acked-by: Russell Currey Signed-off-by: Michael Ellerman arch/powerpc/include/asm/eeh.h | 8 ++--- arch/powerpc/kernel/eeh.c | 46 +++++++++------------------- arch/powerpc/platforms/powernv/eeh-powernv.c | 42 +++++++++++++------------ arch/powerpc/platforms/powernv/pci-ioda.c | 3 +- arch/powerpc/platforms/powernv/pci.h | 1 + 5 files changed, 40 insertions(+), 60 deletions(-) commit e94cd8113ce63bca34040aae52d0603baf6ec07c Author: Zhang Shengju Date: Fri Sep 22 23:57:49 2017 +0800 net: remove MTU limits for dummy and ifb device These two drivers (dummy and ifb) call ether_setup(), after commit 61e84623ace3 ("net: centralize net_device min/max MTU checking"), the range of mtu is [min_mtu, max_mtu], which is [68, 1500] by default. These two devices should not have limits on MTU. This patch set their min_mtu/max_mtu to 0. So that dev_set_mtu() will not check the mtu range, and can be set with any value. CC: Eric Dumazet CC: Sabrina Dubroca Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller drivers/net/dummy.c | 2 +- drivers/net/ifb.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) commit 1b17ca044a82342fb96529e1bdff6da7af90bc53 Author: Colin Ian King Date: Fri Sep 22 16:50:23 2017 +0100 hv_netvsc: make const array ver_list static, reduces object code size Don't populate const array ver_list on the stack, instead make it static. Makes the object code smaller by over 400 bytes: Before: text data bss dec hex filename 18444 3168 320 21932 55ac drivers/net/hyperv/netvsc.o After: text data bss dec hex filename 17950 3224 320 21494 53f6 drivers/net/hyperv/netvsc.o (gcc 6.3.0, x86-64) Signed-off-by: Colin Ian King Reviewed-by: Haiyang Zhang Signed-off-by: David S. Miller drivers/net/hyperv/netvsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0ff7e2c217d6b367cd0343f14866677f7cf4dc6 Author: Meng Xu Date: Wed Sep 20 11:13:51 2017 -0400 scsi: mpt3sas: remove redundant copy_from_user in _ctl_getiocinfo Since right after the user copy, we are going to memset(&karg, 0, sizeof(karg)), the copy_from_user is redundant Signed-off-by: Meng Xu Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/mpt3sas/mpt3sas_ctl.c | 6 ------ 1 file changed, 6 deletions(-) commit 08eb7f45de6131a72db7dd82607fd204d0d2bac2 Author: Thomas Meyer Date: Thu Sep 21 08:15:26 2017 +0200 scsi: qla2xxx: Cocci spatch "pool_zalloc-simple" Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0. Found by coccinelle spatch "api/alloc/pool_zalloc-simple.cocci" Signed-off-by: Thomas Meyer Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen drivers/scsi/qla2xxx/qla_bsg.c | 3 +-- drivers/scsi/qla2xxx/qla_init.c | 3 +-- drivers/scsi/qla2xxx/qla_mbx.c | 27 +++++++++------------------ 3 files changed, 11 insertions(+), 22 deletions(-) commit df2f7729f23fdab923c913302051997561e1ef07 Author: Thomas Meyer Date: Thu Sep 21 08:15:26 2017 +0200 scsi: lpfc: Cocci spatch "pool_zalloc-simple" Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0. Found by coccinelle spatch "api/alloc/pool_zalloc-simple.cocci" Signed-off-by: Thomas Meyer Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_nvme.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 2930f817132959254db801fe19e61c477293ad6b Author: Hannes Reinecke Date: Wed Sep 20 09:18:52 2017 +0200 scsi: scsi_dh: suppress errors from unsupported devices Device handlers are optional, and for some handlers like ALUA only implemented for certain device types. So suppress any errors for unsupported devices. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/scsi_dh.c | 19 +++++++++++++------ drivers/scsi/scsi_priv.h | 4 ++-- drivers/scsi/scsi_sysfs.c | 8 +------- 3 files changed, 16 insertions(+), 15 deletions(-) commit 2a8f7a0344c8b068cf4b13f1bf4bdd65b8787d04 Author: Hannes Reinecke Date: Wed Sep 20 09:18:51 2017 +0200 scsi: scsi_dh: Return SCSI_DH_XX error code from ->attach() Rather than having each device handler implementing their own error mapping, have the ->attach() call return a SCSI_DH_XXX error code and implement the mapping in scsi_dh_handler_attach(). Suggested-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/device_handler/scsi_dh_alua.c | 10 ++++------ drivers/scsi/device_handler/scsi_dh_emc.c | 6 +++--- drivers/scsi/device_handler/scsi_dh_hp_sw.c | 12 ++++++++---- drivers/scsi/device_handler/scsi_dh_rdac.c | 6 +++--- drivers/scsi/scsi_dh.c | 17 ++++++++++++++--- 5 files changed, 32 insertions(+), 19 deletions(-) commit 8caea502367056881e5209ca55a7a01775c9a1cd Author: Palmer Dabbelt Date: Fri Sep 8 17:07:44 2017 -0700 dt-bindings: RISC-V CPU Bindings This patch adds device tree bindings for RISC-V CPUs, patterned after the ARM device tree CPU bindings. Signed-off-by: Palmer Dabbelt Documentation/devicetree/bindings/riscv/cpus.txt | 162 +++++++++++++++++++++++ 1 file changed, 162 insertions(+) commit b35cd9884fa5d81c9d5e7f57c9d03264ae2bd835 Author: Palmer Dabbelt Date: Tue May 23 10:28:26 2017 -0700 lib: Add shared copies of some GCC library routines Many ports (m32r, microblaze, mips, parisc, score, and sparc) use functionally identical copies of various GCC library routine files, which came up as we were submitting the RISC-V port (which also uses some of these). This patch adds a new copy of these library routine files, which are functionally identical to the various other copies. These are availiable via Kconfig as CONFIG_GENERIC_$ROUTINE, which currently isn't used anywhere. Reviewed-by: Geert Uytterhoeven Signed-off-by: Palmer Dabbelt include/lib/libgcc.h | 43 +++++++++++++++++++++++++++++++ lib/Kconfig | 18 +++++++++++++ lib/Makefile | 8 ++++++ lib/ashldi3.c | 44 ++++++++++++++++++++++++++++++++ lib/ashrdi3.c | 46 +++++++++++++++++++++++++++++++++ lib/cmpdi2.c | 42 ++++++++++++++++++++++++++++++ lib/lshrdi3.c | 45 ++++++++++++++++++++++++++++++++ lib/muldi3.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/ucmpdi2.c | 35 +++++++++++++++++++++++++ 9 files changed, 353 insertions(+) commit c98cfe4aa64d3af43323d0d15c81172caba13ce2 Author: Jonathan Neuschäfer Date: Tue May 23 22:19:14 2017 +0200 MAINTAINERS: Add RISC-V RISC-V needs a MAINTAINERS entry. Let's add one. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Palmer Dabbelt MAINTAINERS | 10 ++++++++++ 1 file changed, 10 insertions(+) commit a380f2edef65b2447a043251bb3c00a9d2153a8b Author: Rafael J. Wysocki Date: Mon Sep 25 14:56:44 2017 +0200 PM / core: Drop legacy class suspend/resume operations There are no classes using the legacy suspend/resume operations in the tree any more, so drop these operations and update the code referring to them accordingly. Signed-off-by: Rafael J. Wysocki Acked-by: Greg Kroah-Hartman drivers/base/power/main.c | 32 +++++++++----------------------- include/linux/device.h | 5 ----- 2 files changed, 9 insertions(+), 28 deletions(-) commit b5d7388f9db78f19e6af7b56a469ca8d1860329d Author: Craig Gallek Date: Thu Sep 21 18:43:29 2017 -0400 bpf: Optimize lpm trie delete Before the delete operator was added, this datastructure maintained an invariant that intermediate nodes were only present when necessary to build the tree. This patch updates the delete operation to reinstate that invariant by removing unnecessary intermediate nodes after a node is removed and thus keeping the tree structure at a minimal size. Suggested-by: Daniel Mack Signed-off-by: Craig Gallek Signed-off-by: David S. Miller kernel/bpf/lpm_trie.c | 71 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 28 deletions(-) commit 8157a7faf94135386bf04b1cf94e6efd3fb94702 Author: Tejun Heo Date: Mon Sep 25 14:27:54 2017 -0700 sched/cputime: Add dummy cputime_adjust() implementation for CONFIG_VIRT_CPU_ACCOUNTING_NATIVE cfb766da54d9 ("sched/cputime: Expose cputime_adjust()") made cputime_adjust() public for cgroup basic cpu stat support; however, the commit forgot to add a dummy implementaiton for CONFIG_VIRT_CPU_ACCOUNTING_NATIVE leading to compiler errors on some s390 configurations. Fix it by adding the missing dummy implementation. Reported-by: “kbuild-all@01.org” Fixes: cfb766da54d9 ("sched/cputime: Expose cputime_adjust()") Signed-off-by: Tejun Heo kernel/sched/cputime.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 38683148828165ea0b66ace93a9fedc2d3281e27 Author: Tejun Heo Date: Mon Sep 25 13:50:20 2017 -0700 cgroup: statically initialize init_css_set->dfl_cgrp Like other csets, init_css_set's dfl_cgrp is initialized when the cset gets linked. init_css_set gets linked in cgroup_init(). This has been fine till now but the recently added basic CPU usage accounting may end up accessing dfl_cgrp of init before cgroup_init() leading to the following oops. SELinux: Initializing. BUG: unable to handle kernel NULL pointer dereference at 00000000000000b0 IP: account_system_index_time+0x60/0x90 PGD 0 P4D 0 Oops: 0000 [#1] SMP Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.0-rc2-00003-g041cd64 #10 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS +1.9.3-20161025_171302-gandalf 04/01/2014 task: ffffffff81e10480 task.stack: ffffffff81e00000 RIP: 0010:account_system_index_time+0x60/0x90 RSP: 0000:ffff880011e03cb8 EFLAGS: 00010002 RAX: ffffffff81ef8800 RBX: ffffffff81e10480 RCX: 0000000000000003 RDX: 0000000000000000 RSI: 00000000000f4240 RDI: 0000000000000000 RBP: ffff880011e03cc0 R08: 0000000000010000 R09: 0000000000000000 R10: 0000000000000020 R11: 0000003b9aca0000 R12: 000000000001c100 R13: 0000000000000000 R14: ffffffff81e10480 R15: ffffffff81e03cd8 FS: 0000000000000000(0000) GS:ffff880011e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000b0 CR3: 0000000001e09000 CR4: 00000000000006b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: account_system_time+0x45/0x60 account_process_tick+0x5a/0x140 update_process_times+0x22/0x60 tick_periodic+0x2b/0x90 tick_handle_periodic+0x25/0x70 timer_interrupt+0x15/0x20 __handle_irq_event_percpu+0x7e/0x1b0 handle_irq_event_percpu+0x23/0x60 handle_irq_event+0x42/0x70 handle_level_irq+0x83/0x100 handle_irq+0x6f/0x110 do_IRQ+0x46/0xd0 common_interrupt+0x9d/0x9d Fix it by statically initializing init_css_set.dfl_cgrp so that init's default cgroup is accessible from the get-go. Fixes: 041cd640b2f3 ("cgroup: Implement cgroup2 basic CPU usage accounting") Reported-by: “kbuild-all@01.org” Signed-off-by: Tejun Heo kernel/cgroup/cgroup.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit d835b63cc4ee67e59eed9d1957f729c0a30b7331 Author: Allen Pais Date: Mon Sep 25 13:00:05 2017 +0530 net: nfc: llcp_core: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller net/nfc/llcp_core.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 22d387e13ac357279ddac55694883fd3e30a5639 Author: Allen Pais Date: Mon Sep 25 13:00:04 2017 +0530 net: nfc: hci: llc_shdlc: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller net/nfc/hci/llc_shdlc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit b1e07c5486f0df26caf93234bd7db5545a37aba8 Author: Allen Pais Date: Mon Sep 25 13:00:03 2017 +0530 net: nfc: hci: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller net/nfc/hci/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2d04cfcfa2e86cac751979b584e5420dd470903b Author: Allen Pais Date: Mon Sep 25 13:00:02 2017 +0530 net: af_packet: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller net/packet/af_packet.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d4a8bce81cbd53420988f5db0d096ad04960f189 Author: Ryan Lee Date: Thu Sep 14 17:30:39 2017 -0700 ASoC: max98927: Added max98927_dai_tdm_slot function Signed-off-by: Ryan Lee Signed-off-by: Mark Brown sound/soc/codecs/max98927.c | 120 ++++++++++++++++++++++++++++++++++++++------ sound/soc/codecs/max98927.h | 1 + 2 files changed, 105 insertions(+), 16 deletions(-) commit 4eee20246c0fa77a7a7b189ac806d5f78d675546 Author: Ryan Lee Date: Thu Sep 14 17:30:38 2017 -0700 ASoC: max98927: Added support for DSP_A and DSP_B format Signed-off-by: Ryan Lee Signed-off-by: Mark Brown sound/soc/codecs/max98927.c | 35 ++++++++++++++++++++--------------- sound/soc/codecs/max98927.h | 6 ++++-- 2 files changed, 24 insertions(+), 17 deletions(-) commit b7af62a945706e32b987f1dd0cc86bb41a8210c3 Author: Damien Le Moal Date: Tue Sep 5 20:55:35 2017 +0900 scsi: sd: Align maximum write same blocks to physical block size Reporting a maximum number of blocks that is not aligned on the device physical size would cause a large write same request to be split into physically unaligned chunks by __blkdev_issue_write_zeroes() and __blkdev_issue_write_same(), even if the caller of these functions took care to align its request to physical sectors. Make sure the maximum reported is aligned to the device physical block size. This is only an optional optimization for regular disks, but this is mandatory to avoid failure of large write same requests directed at sequential write required zones of host-managed ZBC disks. [mkp: tweaked commit message] Signed-off-by: Damien Le Moal Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/sd.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 3f9e6cd8230a413fdf462aba35ea6b6166fa3631 Author: Chris Wilson Date: Mon Sep 25 13:49:27 2017 +0100 drm/i915/execlists: Microoptimise execlists_cancel_port_request() Just rearrange the code slightly to trim the number of iterations required. Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170925124929.16974-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/intel_lrc.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit ff6e88f193c654449bf222450553a7fa16a75ca7 Author: Varun Prakash Date: Tue Aug 29 21:18:46 2017 +0530 scsi: csiostor: enable PCIe relaxed ordering if supported Set PCIe relaxed ordering bits in FW_IQ_CMD if relaxed ordering is enabled in the PCIe device. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/csiostor/csio_hw.h | 3 +++ drivers/scsi/csiostor/csio_init.c | 3 +++ drivers/scsi/csiostor/csio_mb.c | 3 +++ 3 files changed, 9 insertions(+) commit 4c3711d7fb4763c63b2654f2d07cbe21ca5aadd4 Author: Thomas Gleixner Date: Thu Aug 31 17:12:48 2017 +0200 timekeeping: Provide NMI safe access to clock realtime The configurable printk timestamping wants access to clock realtime. Right now there is no ktime_get_real_fast_ns() accessor because reading the monotonic base and the realtime offset cannot be done atomically. Contrary to boot time this offset can change during runtime and cause half updated readouts. struct tk_read_base was fully packed when the fast timekeeper access was implemented. commit ceea5e3771ed ("time: Fix clock->read(clock) race around clocksource changes") removed the 'read' function pointer from the structure, but of course left the comment stale. So now the structure can fit a new 64bit member w/o violating the cache line constraints. Add real_base to tk_read_base and update it in the fast timekeeper update sequence. Implement an accessor which follows the same scheme as the accessor to clock monotonic, but uses the new real_base to access clock real time. The runtime overhead for updating real_base is minimal as it just adds two cache hot values and stores them into an already dirtied cache line along with the other fast timekeeper updates. Signed-off-by: Thomas Gleixner Cc: Prarit Bhargava Cc: John Stultz Cc: Peter Zijlstra Link: https://lkml.kernel.org/r/1505757060-2004-3-git-send-email-prarit@redhat.com include/linux/timekeeper_internal.h | 6 +++++- include/linux/timekeeping.h | 1 + kernel/time/timekeeping.c | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) commit 5df32107f609c1f621bcdac0a685c23677ef671e Author: Prarit Bhargava Date: Mon Aug 28 08:21:53 2017 -0400 timekeeping: Make fast accessors return 0 before timekeeping is initialized printk timestamps will be extended to include mono and boot time by using the fast timekeeping accessors ktime_get_mono|boot_fast_ns(). The functions can return garbage before timekeeping is initialized resulting in garbage timestamps. Initialize the fast timekeepers with dummy clocks which guarantee a 0 readout up to timekeeping_init(). Suggested-by: Peter Zijlstra Signed-off-by: Prarit Bhargava Signed-off-by: Thomas Gleixner Cc: Stephen Boyd Cc: John Stultz Link: http://lkml.kernel.org/r/1503922914-10660-2-git-send-email-prarit@redhat.com kernel/time/timekeeping.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) commit f53ee247ad546183fc13739adafc5579b9f0ebc0 Author: Jean-François Têtu Date: Fri Sep 22 17:44:28 2017 -0400 ASoC: msm8916-wcd-digital: fix RX2 MIX1 and RX3 MIX1 The kcontrol for the third input (rxN_mix1_inp3) of both RX2 and RX3 mixers are not using the correct control register. This simple patch fixes this. Signed-off-by: Jean-François Têtu Signed-off-by: Mark Brown sound/soc/codecs/msm8916-wcd-digital.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c14963521502b237a6817aceda6f3379296db75c Author: Florian Fainelli Date: Tue Aug 29 11:03:39 2017 -0700 ARM: brcmstb: Add appropriate ARM_BE8() macros for swapping Building a big-endian kernel for ARCH_BRCMSTB revealed that we would not be correctly polling for the right bit in the busyuart macro, turns out there are a few transformations needed to work with big-endian kernels. First we need to swap the value we read from SUN_TOP_CTRL to properly compare it against our local tables. Then, just like 8250.S we need to swap the value before storing it, and conversely swap it after a load. Signed-off-by: Florian Fainelli arch/arm/include/debug/brcmstb.S | 3 +++ 1 file changed, 3 insertions(+) commit ea023be7071c4e91bb7895aad26c8a52e52032e6 Merge: 2bd6bf0 968f764 Author: Florian Fainelli Date: Thu Aug 24 11:47:29 2017 -0700 Merge tag 'bcm2835-soc-next-2017-08-24' into soc/next This pull request brings in a move of the bcm2836/7 SMP init code from the irqchip driver to platsmp.c (general move acked by the maintainer, v2 of the patch including a squashed in fix to prevent a dependency on updated DT compatibles) and an added sev() to wake up the secondary CPUs on newer firmware. It also garbage collects some stub clock code from before we had a proper clock driver, which has been acked by the clk maintainers to go through the ARM trees. Signed-off-by: Florian Fainelli commit 968f76417df671338ea3a1fd33b2c93a048cc1b1 Author: Phil Elwell Date: Tue Aug 8 12:04:55 2017 +0100 ARM: bcm2836: Send event when onlining other cores Secondary cores should enter a low-power idle state when waiting to be started. The "wfe" instruction causes a core to wait until an event or interrupt arrives before continuing to the next instruction, and the "sev" instruction sends a wakeup event to the other cores. Add an "sev" (and a memory barrier) to bcm2836_boot_secondary, the function that wakes the waiting cores during booting. This is required if the secondary cores are sitting in "wfe", and harmless if not. Signed-off-by: Phil Elwell Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt arch/arm/mach-bcm/platsmp.c | 3 +++ 1 file changed, 3 insertions(+) commit 88bbe85dcd37aa2662c1a83962c15009fc12503e Author: Stefan Wahren Date: Sun Aug 6 17:52:02 2017 +0200 irqchip: bcm2836: Move SMP startup code to arch/arm (v2) In order to easily provide SMP for BCM2837 on 32-bit and 64-bit the SMP startup code was placed in irq-bcm2836. That's not the right approach. So move this code where it belongs. Signed-off-by: Stefan Wahren Fixes: 41f4988cc287 ("irqchip/bcm2836: Add SMP support for the 2836") Tested-by: Eric Anholt Acked-by: Marc Zyngier arch/arm/mach-bcm/Makefile | 5 +++ arch/arm/mach-bcm/board_bcm2835.c | 6 ++- arch/arm/mach-bcm/platsmp.c | 35 ++++++++++++++++ arch/arm/mach-bcm/platsmp.h | 10 +++++ drivers/irqchip/irq-bcm2836.c | 79 +------------------------------------ include/linux/irqchip/irq-bcm2836.h | 70 ++++++++++++++++++++++++++++++++ 6 files changed, 127 insertions(+), 78 deletions(-) commit 1d66af81905a4e2f3d03913f5449a8e9b5d3facd Author: Danilo Krummrich Date: Fri Jun 9 00:29:00 2017 +0200 clk: bcm2835: remove remains from stub clk driver This commit removes the fixed clocks introduced as a stub clock driver added with commit 75fabc3f6448 ("ARM: bcm2835: add stub clock driver"). Originally they were used to drive the AMBA bus and PL011 uart driver. Now these clocks are derived by the CPRMAN clock driver and configured in DT. Additionally, get rid of init_machine function in bcm2835 board file as there's nothing to do any longer. Signed-off-by: Danilo Krummrich Acked-by: Eric Anholt Acked-by: Stephen Boyd Signed-off-by: Stefan Wahren arch/arm/mach-bcm/board_bcm2835.c | 7 ------- drivers/clk/bcm/clk-bcm2835-aux.c | 1 - drivers/clk/bcm/clk-bcm2835.c | 30 ------------------------------ include/linux/clk/bcm2835.h | 24 ------------------------ 4 files changed, 62 deletions(-) commit d6ffc6ac83b1f9f12652d89b9cb5bcbfbea7796c Author: Thomas Gleixner Date: Wed Sep 13 23:29:54 2017 +0200 x86/vector: Respect affinity mask in irq descriptor The interrupt descriptor has a preset affinity mask at allocation time, which is usually the default affinity mask. The current code does not respect that mask and places the vector at some random CPU, which gets corrected later by a set_affinity() call. That's silly because the vector allocation can respect the mask upfront and place the interrupt on a CPU which is in the mask. If that fails, then the affinity is broken and a interrupt assigned on any online CPU. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213156.431670325@linutronix.de arch/x86/kernel/apic/vector.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 2cffad7bad83157f89332872015f4305d2ac09ac Author: Thomas Gleixner Date: Wed Sep 13 23:29:53 2017 +0200 x86/irq: Simplify hotplug vector accounting Before a CPU is taken offline the number of active interrupt vectors on the outgoing CPU and the number of vectors which are available on the other online CPUs are counted and compared. If the active vectors are more than the available vectors on the other CPUs then the CPU hot-unplug operation is aborted. This again uses loop based search and is inaccurate. The bitmap matrix allocator has accurate accounting information and can tell exactly whether the vector space is sufficient or not. Emit a message when the number of globaly reserved (unallocated) vectors is larger than the number of available vectors after offlining a CPU because after that point request_irq() might fail. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213156.351193962@linutronix.de arch/x86/include/asm/apic.h | 1 + arch/x86/include/asm/irq.h | 4 -- arch/x86/kernel/apic/vector.c | 32 +++++++++++++- arch/x86/kernel/irq.c | 99 ------------------------------------------- arch/x86/kernel/smpboot.c | 2 +- 5 files changed, 33 insertions(+), 105 deletions(-) commit 464d12309e1b5829597793db551ae8ecaecf4036 Author: Thomas Gleixner Date: Wed Sep 13 23:29:52 2017 +0200 x86/vector: Switch IOAPIC to global reservation mode IOAPICs install and allocate vectors for inactive interrupts. This results in problems on CPU offline and wastes vector resources for nothing. Handle inactive IOAPIC interrupts in the same way as inactive MSI interrupts and switch them to the global reservation mode. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213156.273454591@linutronix.de arch/x86/kernel/apic/vector.c | 56 +++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 23 deletions(-) commit 4900be83602b6be07366d3e69f756c1959f4169a Author: Thomas Gleixner Date: Wed Sep 13 23:29:51 2017 +0200 x86/vector/msi: Switch to global reservation mode Devices with many queues allocate a huge number of interrupts and get assigned a vector for each of them, even if the queues are not active and the interrupts never requested. This causes problems with the decision whether the global vector space is sufficient for CPU hot unplug operations. Change it to a reservation scheme, which allows overcommitment. When the interrupt is allocated and initialized the vector assignment merily updates the reservation request counter in the matrix allocator. This counter is used to emit warnings when the reservation exceeds the available vector space, but does not affect CPU offline operations. Like the managed interrupts the corresponding MSI/DMAR/IOAPIC entries are directed to the special shutdown vector. When the interrupt is requested, then the activation code tries to assign a real vector. If that succeeds the interrupt is started up and functional. If that fails, then subsequently request_irq() fails with -ENOSPC. This allows a clear separation of inactive and active modes and simplifies the final decisions whether the global vector space is sufficient for CPU offline operations. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213156.184211133@linutronix.de arch/x86/kernel/apic/vector.c | 97 ++++++++++++++++++++++++++++--------------- 1 file changed, 63 insertions(+), 34 deletions(-) commit 2db1f959d9dc16035f2eb44ed5fdb2789b754d6a Author: Thomas Gleixner Date: Wed Sep 13 23:29:50 2017 +0200 x86/vector: Handle managed interrupts proper Managed interrupts need to reserve interrupt vectors permanently, but as long as the interrupt is deactivated, the vector should not be active. Reserve a new system vector, which can be used to initially initialize MSI/DMAR/IOAPIC entries. In that situation the interrupts are disabled in the corresponding MSI/DMAR/IOAPIC devices. So the vector should never be sent to any CPU. When the managed interrupt is started up, a real vector is assigned from the managed vector space and configured in MSI/DMAR/IOAPIC. This allows a clear separation of inactive and active modes and simplifies the final decisions whether the global vector space is sufficient for CPU offline operations. The vector space can be reserved even on offline CPUs and will survive CPU offline/online operations. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213156.104616625@linutronix.de arch/x86/include/asm/irq_vectors.h | 8 +- arch/x86/kernel/apic/vector.c | 190 +++++++++++++++++++++++++++++++++---- 2 files changed, 174 insertions(+), 24 deletions(-) commit 90ad9e2d91067983f3328e21b306323877e5f48a Author: Thomas Gleixner Date: Wed Sep 13 23:29:49 2017 +0200 x86/io_apic: Reevaluate vector configuration on activate() With the upcoming reservation/management scheme, early activation will assign a special vector. The final activation at request_irq() assigns a real vector, which needs to be updated in the ioapic. Split out the reconfiguration code in set_affinity and use it for reactivation. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213156.025232175@linutronix.de arch/x86/kernel/apic/io_apic.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit 5ba204a1817ba95a7b24dbe8ef2c7ddd4cea886e Author: Thomas Gleixner Date: Wed Sep 13 23:29:48 2017 +0200 iommu/amd: Reevaluate vector configuration on activate() With the upcoming reservation/management scheme, early activation will assign a special vector. The final activation at request_irq() assigns a real vector, which needs to be updated in the tables. Split out the reconfiguration code in set_affinity and use it for reactivation. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213155.944883733@linutronix.de drivers/iommu/amd_iommu.c | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) commit d491bdff888e8a287f6017c70a8dd10f46984851 Author: Thomas Gleixner Date: Wed Sep 13 23:29:47 2017 +0200 iommu/vt-d: Reevaluate vector configuration on activate() With the upcoming reservation/management scheme, early activation will assign a special vector. The final activation at request_irq() assigns a real vector, which needs to be updated in the tables. Split out the reconfiguration code in set_affinity and use it for reactivation. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: iommu@lists.linux-foundation.org Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213155.853028808@linutronix.de drivers/iommu/intel_irq_remapping.c | 38 ++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) commit 2a85386a73fa57b114ba66421b57d3850dbcef9f Author: Thomas Gleixner Date: Wed Sep 13 23:29:46 2017 +0200 x86/apic/msi: Force reactivation of interrupts at startup time MSI(X) interrupts need a valid vector configuration early at allocation time, i.e. before the PCI core enables MSI(X). With managed interrupts and the new global reservation scheme, the early configuration will not assign a real device vector, but a special shutdown vector. When the irq is started up, then the interrupt must be reconfigured. Tell the MSI irqdomain core about it. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213155.774066582@linutronix.de arch/x86/kernel/apic/msi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ba224feac8bb367edd62da33552353d4bdc3fe3a Author: Thomas Gleixner Date: Wed Sep 13 23:29:45 2017 +0200 x86/vector: Untangle internal state from irq_cfg The vector management state is not required to live in irq_cfg. irq_cfg is only relevant for the depending irq domains (IOAPIC, DMAR, MSI ...). The seperation of the vector management status allows to direct a shut down interrupt to a special shutdown vector w/o confusing the internal state of the vector management. Preparatory change for the rework of managed interrupts and the global vector reservation scheme. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213155.683712356@linutronix.de arch/x86/include/asm/hw_irq.h | 3 +- arch/x86/kernel/apic/vector.c | 88 +++++++++++++++++++++++-------------------- 2 files changed, 49 insertions(+), 42 deletions(-) commit ba801640b10d87b1c4e26cbcbe414a001255404f Author: Thomas Gleixner Date: Wed Sep 13 23:29:44 2017 +0200 x86/vector: Compile SMP only code conditionally No point in compiling this for UP. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213155.603191841@linutronix.de arch/x86/kernel/apic/vector.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) commit baab1e84b1124bfd3e40ef6c8e05b2a15136e3d5 Author: Thomas Gleixner Date: Wed Sep 13 23:29:43 2017 +0200 x86/apic: Remove unused callbacks Now that the old allocator is gone, these apic functions are unused. Remove them. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213155.524662349@linutronix.de arch/x86/kernel/apic/apic_common.c | 48 ----------------------------------- arch/x86/kernel/apic/apic_flat_64.c | 4 --- arch/x86/kernel/apic/apic_noop.c | 10 -------- 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/x2apic_cluster.c | 48 ----------------------------------- arch/x86/kernel/apic/x2apic_phys.c | 2 -- arch/x86/kernel/apic/x2apic_uv_x.c | 14 ---------- arch/x86/kernel/vsmp_64.c | 19 -------------- arch/x86/xen/apic.c | 2 -- 11 files changed, 155 deletions(-) commit 69cde0004a4b5cfc7d1cec4ef9ce4cf4e26142f0 Author: Thomas Gleixner Date: Wed Sep 13 23:29:42 2017 +0200 x86/vector: Use matrix allocator for vector assignment Replace the magic vector allocation code by a simple bitmap matrix allocator. This avoids loops and hoops over CPUs and vector arrays, so in case of densly used vector spaces it's way faster. This also gets rid of the magic 'spread the vectors accross priority levels' heuristics in the current allocator: The comment in __asign_irq_vector says: * NOTE! The local APIC isn't very good at handling * multiple interrupts at the same interrupt level. * As the interrupt level is determined by taking the * vector number and shifting that right by 4, we * want to spread these out a bit so that they don't * all fall in the same interrupt level. After doing some palaeontological research the following was found the following in the PPro Developer Manual Volume 3: "7.4.2. Valid Interrupts The local and I/O APICs support 240 distinct vectors in the range of 16 to 255. Interrupt priority is implied by its vector, according to the following relationship: priority = vector / 16 One is the lowest priority and 15 is the highest. Vectors 16 through 31 are reserved for exclusive use by the processor. The remaining vectors are for general use. The processor's local APIC includes an in-service entry and a holding entry for each priority level. To avoid losing inter- rupts, software should allocate no more than 2 interrupt vectors per priority." The current SDM tells nothing about that, instead it states: "If more than one interrupt is generated with the same vector number, the local APIC can set the bit for the vector both in the IRR and the ISR. This means that for the Pentium 4 and Intel Xeon processors, the IRR and ISR can queue two interrupts for each interrupt vector: one in the IRR and one in the ISR. Any additional interrupts issued for the same interrupt vector are collapsed into the single bit in the IRR. For the P6 family and Pentium processors, the IRR and ISR registers can queue no more than two interrupts per interrupt vector and will reject other interrupts that are received within the same vector." Which means, that on P6/Pentium the APIC will reject a new message and tell the sender to retry, which increases the load on the APIC bus and nothing more. There is no affirmative answer from Intel on that, but it's a sane approach to remove that for the following reasons: 1) No other (relevant Open Source) operating systems bothers to implement this or mentiones this at all. 2) The current allocator has no enforcement for this and especially the legacy interrupts, which are the main source of interrupts on these P6 and older systmes, are allocated linearly in the same priority level and just work. 3) The current machines have no problem with that at all as verified with some experiments. 4) AMD at least confirmed that such an issue is unknown. 5) P6 and older are dinosaurs almost 20 years EOL, so there is really no reason to worry about that too much. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213155.443678104@linutronix.de arch/x86/kernel/apic/vector.c | 288 +++++++++++++++++------------------------- 1 file changed, 116 insertions(+), 172 deletions(-) commit 8d1e3dca7de6e8513872799a748a1d47d8dce60d Author: Thomas Gleixner Date: Wed Sep 13 23:29:41 2017 +0200 x86/vector: Add tracepoints for vector management Add tracepoints for analysing the new vector management Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213155.357986795@linutronix.de arch/x86/include/asm/trace/irq_vectors.h | 244 +++++++++++++++++++++++++++++++ arch/x86/kernel/apic/vector.c | 2 + 2 files changed, 246 insertions(+) commit 8ed4f3e66665cd186bc6b1d35f25a481e35c62ab Author: Thomas Gleixner Date: Wed Sep 13 23:29:40 2017 +0200 x86/smpboot: Set online before setting up vectors There is no reason to set the CPU online after establishing the vectors on the upcoming CPU. The vector space is protected by the vector lock so no changes can happen. Marking the CPU online before setting up the vector space makes tracing work in the early vector management cpu online code. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213155.264311994@linutronix.de arch/x86/kernel/smpboot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 65d7ed57bd9708d562a37fa3f99bf9fd62052b9e Author: Thomas Gleixner Date: Wed Sep 13 23:29:39 2017 +0200 x86/vector: Add vector domain debugfs support Add the debug callback for the vector domain, which gives a detailed information about vector usage if invoked for the domain by using rhe matrix allocator debug function and vector/target information when invoked for a particular interrupt. Extra information foir the Vector domain: Online bitmaps: 32 Global available: 6352 Global reserved: 5 Total allocated: 20 System: 41: 0-19,32,50,128,238-255 | CPU | avl | man | act | vectors 0 183 4 19 33-48,51-53 1 199 4 1 33 2 199 4 0 Extra information for interrupts: Vector: 42 Target: 4 This allows a detailed analysis of the vector usage and the association to interrupts and devices. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213155.188137174@linutronix.de arch/x86/kernel/apic/vector.c | 50 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) commit 0fa115da408f645cca419a60a5af8f4426ad4188 Author: Thomas Gleixner Date: Wed Sep 13 23:29:38 2017 +0200 x86/irq/vector: Initialize matrix allocator Initialize the matrix allocator and add the proper accounting points to the code. No functional change, just preparation. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213155.108410660@linutronix.de arch/x86/Kconfig | 1 + arch/x86/include/asm/apic.h | 6 +++++ arch/x86/include/asm/hw_irq.h | 3 ++- arch/x86/kernel/apic/vector.c | 56 +++++++++++++++++++++++++++++++++++++++---- arch/x86/kernel/i8259.c | 1 + arch/x86/kernel/irqinit.c | 1 + arch/x86/kernel/smpboot.c | 3 ++- 7 files changed, 65 insertions(+), 6 deletions(-) commit 9f9e3bb1cf2ecba7697bfb5e350ad2648e69dbdf Author: Thomas Gleixner Date: Wed Sep 13 23:29:37 2017 +0200 x86/apic: Add replacement for cpu_mask_to_apicid() As preparation for replacing the vector allocator, provide a new function which takes a cpu number instead of a cpu mask to calculate/lookup the resulting APIC destination id. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown arch/x86/include/asm/apic.h | 5 +++++ arch/x86/kernel/apic/apic_common.c | 10 ++++++++++ arch/x86/kernel/apic/apic_flat_64.c | 2 ++ arch/x86/kernel/apic/apic_noop.c | 1 + arch/x86/kernel/apic/apic_numachip.c | 2 ++ arch/x86/kernel/apic/bigsmp_32.c | 1 + arch/x86/kernel/apic/probe_32.c | 1 + arch/x86/kernel/apic/x2apic_cluster.c | 6 ++++++ arch/x86/kernel/apic/x2apic_phys.c | 1 + arch/x86/kernel/apic/x2apic_uv_x.c | 6 ++++++ arch/x86/xen/apic.c | 1 + 11 files changed, 36 insertions(+) commit 99a1482d8aa105922dc4a3360ab11600f0bc9d80 Author: Thomas Gleixner Date: Wed Sep 13 23:29:36 2017 +0200 x86/vector: Move helper functions around Move the helper functions to a different place as they would end up in the middle of management functions. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213154.949581934@linutronix.de arch/x86/kernel/apic/vector.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 258d86eef94fcaa72e088962259490866ad93489 Author: Thomas Gleixner Date: Wed Sep 13 23:29:35 2017 +0200 x86/vector: Remove pointless pointer checks The info pointer checks in assign_irq_vector_policy() are pointless because the pointer cannot be NULL, otherwise the calling code would already crash. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213154.859484148@linutronix.de arch/x86/kernel/apic/vector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ef76eb6de734dc03a7f3b8f80884362364e6049 Author: Thomas Gleixner Date: Wed Sep 13 23:29:34 2017 +0200 x86/apic: Get rid of the legacy irq data storage Now that the legacy PIC takeover by the IOAPIC is marked accordingly the early boot allocation of APIC data is not longer necessary. Use the regular allocation mechansim as it is used by non legacy interrupts and fill in the known information (vector and affinity) so the allocator reuses the vector, This is important as the timer check might move the timer interrupt 0 back to the PIC in case the delivery through the IOAPIC fails. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213154.780521549@linutronix.de arch/x86/kernel/apic/vector.c | 52 +++++++++++-------------------------------- 1 file changed, 13 insertions(+), 39 deletions(-) commit 3534be05e4adc303d41fae65901598695adea685 Author: Thomas Gleixner Date: Wed Sep 13 23:29:33 2017 +0200 x86/ioapic: Mark legacy vectors at reallocation time When the legacy PIC vectors are taken over by the IO APIC the current vector assignement code is tricked to reuse the vector by allocating the apic data in the early boot process. This can be avoided by marking the allocation as legacy PIC take over. Preparatory patch for further cleanups. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213154.700501979@linutronix.de arch/x86/include/asm/irqdomain.h | 1 + arch/x86/kernel/apic/io_apic.c | 1 + 2 files changed, 2 insertions(+) commit dccfe3147b42b78458ab8e4440822c805ee76d72 Author: Thomas Gleixner Date: Wed Sep 13 23:29:32 2017 +0200 x86/vector: Simplify vector move cleanup The vector move cleanup needs to walk the vector space and do a lot of sanity checks to find a vector to cleanup. With single CPU affinities this can be simplified and made more robust by queueing the vector configuration which needs to be cleaned up in a hlist on the CPU which was the previous target. That removes all the race conditions because the cleanup either finds a valid list entry or not. The latter happens when the interrupt was torn down before the cleanup handler was able to run. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213154.622727892@linutronix.de arch/x86/kernel/apic/vector.c | 221 +++++++++++++++--------------------------- 1 file changed, 77 insertions(+), 144 deletions(-) commit 029c6e1c9df776fe1b2ba756a28fb65e9f9e9f69 Author: Thomas Gleixner Date: Wed Sep 13 23:29:31 2017 +0200 x86/vector: Store the single CPU targets in apic data Now that the interrupt affinities are targeted at single CPUs storing them in a cpumask is overkill. Store them in a dedicated variable. This does not yet remove the domain cpumasks because the current allocator relies on them. Preparatory change for the allocator rework. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213154.544867277@linutronix.de arch/x86/kernel/apic/vector.c | 5 +++++ 1 file changed, 5 insertions(+) commit 86ba65514f8730d58e2c11fb6e25caa537d6bc93 Author: Thomas Gleixner Date: Wed Sep 13 23:29:30 2017 +0200 x86/vector: Cleanup variable names The naming convention of variables with the types irq_data and apic_chip_data are inconsistent and confusing. Before reworking the whole vector management make them consistent so irq_data pointers are named 'irqd' and apic_chip_data are named 'apicd' all over the place. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213154.465731667@linutronix.de arch/x86/kernel/apic/vector.c | 228 +++++++++++++++++++++--------------------- 1 file changed, 114 insertions(+), 114 deletions(-) commit f0cc6ccaf7ba42a1247fe5a9244b6009a3beddd5 Author: Thomas Gleixner Date: Wed Sep 13 23:29:29 2017 +0200 x86/vector: Simplify the CPU hotplug vector update With single CPU affinities it's not longer required to scan all interrupts for potential destination masks which contain the newly booting CPU. Reduce it to install the active legacy PIC vectors on the newly booting CPU as those cannot be affinity controlled by the kernel and potentially end up at any CPU in the system. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213154.388040204@linutronix.de arch/x86/kernel/apic/vector.c | 64 +++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 29 deletions(-) commit ef9e56d894eab99a33a06b96ba8057afa67d3702 Author: Thomas Gleixner Date: Wed Sep 13 23:29:28 2017 +0200 x86/ioapic: Remove obsolete post hotplug update With single CPU affinities the post SMP boot vector update is pointless as it will just leave the affinities on the same vectors and the same CPUs. Remove it. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213154.308697243@linutronix.de arch/x86/include/asm/io_apic.h | 2 -- arch/x86/kernel/apic/io_apic.c | 42 ------------------------------------------ arch/x86/kernel/smpboot.c | 1 - 3 files changed, 45 deletions(-) commit fdba46ffb4c203b6e6794163493fd310f98bb4be Author: Thomas Gleixner Date: Wed Sep 13 23:29:27 2017 +0200 x86/apic: Get rid of multi CPU affinity Setting the interrupt affinity of a single interrupt to multiple CPUs has a dubious value. 1) This only works on machines where the APIC uses logical destination mode. If the APIC uses physical destination mode then it is already restricted to a single CPU 2) Experiments have shown, that the benefit of multi CPU affinity is close to zero and in some test even worse than setting the affinity to a single CPU. The reason for this is that the delivery targets the APIC with the lowest ID first and only if that APIC is busy (servicing an interrupt, i.e. ISR is not empty) it hands it over to the next APIC. In the conducted tests the vast majority of interrupts ends up on the APIC with the lowest ID anyway, so there is no natural spreading of the interrupts possible. Supporting multi CPU affinities adds a lot of complexity to the code, which can turn the allocation search into a worst case of nr_vectors * nr_online_cpus * nr_bits_in_target_mask As a first step disable it by restricting the vector search to a single CPU. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213154.228824430@linutronix.de arch/x86/kernel/apic/vector.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 7854f82293e99f6bb3df793a2f579db4670ba71b Author: Thomas Gleixner Date: Wed Sep 13 23:29:26 2017 +0200 x86/vector: Rename used_vectors to system_vectors used_vectors is a nisnomer as it only has the system vectors which are excluded from the regular vector allocation marked. It's not what the name suggests storage for the actually used vectors. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213154.150209009@linutronix.de arch/x86/include/asm/desc.h | 2 +- arch/x86/kernel/apic/vector.c | 2 +- arch/x86/kernel/idt.c | 12 ++++++------ arch/x86/kernel/irq.c | 4 ++-- arch/x86/kernel/traps.c | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) commit c1d1ee9ac1793d939ba1a1322767cc5f77a5b8fe Author: Thomas Gleixner Date: Wed Sep 13 23:29:25 2017 +0200 x86/apic: Get rid of apic->target_cpus The target_cpus() callback of the apic struct is not really useful. Some APICs return cpu_online_mask and others cpus_all_mask. The latter is bogus as it does not take holes in the cpus_possible_mask into account. Replace it with cpus_online_mask which makes the most sense and remove the callback. The usage sites will be removed in a later step anyway, so get rid of it now to have incremental changes. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213154.070850916@linutronix.de arch/x86/include/asm/apic.h | 3 --- arch/x86/kernel/apic/apic_common.c | 14 -------------- arch/x86/kernel/apic/apic_flat_64.c | 2 -- arch/x86/kernel/apic/apic_noop.c | 7 ------- arch/x86/kernel/apic/apic_numachip.c | 2 -- arch/x86/kernel/apic/bigsmp_32.c | 1 - arch/x86/kernel/apic/io_apic.c | 7 +++---- arch/x86/kernel/apic/probe_32.c | 1 - arch/x86/kernel/apic/vector.c | 2 +- arch/x86/kernel/apic/x2apic_cluster.c | 8 +------- arch/x86/kernel/apic/x2apic_phys.c | 1 - arch/x86/kernel/apic/x2apic_uv_x.c | 1 - arch/x86/xen/apic.c | 1 - 13 files changed, 5 insertions(+), 45 deletions(-) commit 023a611748fd58d46c8aa049cf4f22ebada983f5 Author: Thomas Gleixner Date: Wed Sep 13 23:29:24 2017 +0200 x86/apic/x2apic: Simplify cluster management The cluster management code creates a cluster mask per cpu, which requires that on cpu on/offline all cluster masks have to be iterated and updated. Other information about the cluster is in different per cpu variables. Create a data structure which holds all information about a cluster and fill it in when the first CPU of a cluster comes online. If another CPU of a cluster comes online it just finds the pointer to the existing cluster structure and reuses it. That simplifies all usage sites and gets rid of quite some pointless iterations over the online cpus to find the cpus which belong to the cluster. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213153.992629420@linutronix.de arch/x86/kernel/apic/x2apic_cluster.c | 152 +++++++++++++++++----------------- 1 file changed, 75 insertions(+), 77 deletions(-) commit 72f48a38505de105e798d4783942df073aeab7ac Author: Thomas Gleixner Date: Wed Sep 13 23:29:23 2017 +0200 x86/apic: Reorganize struct apic struct apic has just grown over time by adding function pointers in random places. Reorganize it so it becomes more cache line friendly. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213153.913642524@linutronix.de arch/x86/include/asm/apic.h | 109 ++++++++++++++++++++------------------------ 1 file changed, 50 insertions(+), 59 deletions(-) commit 83a105229c59e433409e4d86e9bb915ca281235c Author: Thomas Gleixner Date: Wed Sep 13 23:29:22 2017 +0200 x86/apic: Move common APIC callbacks Move more apic struct specific functions out of the header and the apic management code into the common source file. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213153.834421893@linutronix.de arch/x86/include/asm/apic.h | 73 ++++++----------------------------- arch/x86/kernel/apic/apic.c | 28 -------------- arch/x86/kernel/apic/apic_common.c | 78 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 89 deletions(-) commit 64063505835663c67cf18524c46e1eb70d30fb54 Author: Thomas Gleixner Date: Wed Sep 13 23:29:21 2017 +0200 x86/apic: Sanitize 32/64bit APIC callbacks The 32bit and the 64bit implementation of default_cpu_present_to_apicid() and default_check_phys_apicid_present() are exactly the same, but implemented and located differently. Move them to common apic code and get rid of the pointless difference. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213153.757329991@linutronix.de arch/x86/include/asm/apic.h | 30 ------------------------------ arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kernel/apic/Makefile | 2 +- arch/x86/kernel/apic/apic_common.c | 20 ++++++++++++++++++++ arch/x86/kernel/setup.c | 12 ------------ 5 files changed, 22 insertions(+), 44 deletions(-) commit 1da91779e1fb79aaed3de118a156b7040f6147c5 Author: Thomas Gleixner Date: Wed Sep 13 23:29:20 2017 +0200 x86/apic: Move APIC noop specific functions Move more inlines to the place where they belong. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213153.677743545@linutronix.de arch/x86/include/asm/apic.h | 7 ------- arch/x86/kernel/apic/apic_noop.c | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) commit 0801bbaac00b2c729adb1b1b0e0945ca8bbea088 Author: Thomas Gleixner Date: Wed Sep 13 23:29:19 2017 +0200 x86/apic: Move probe32 specific APIC functions The apic functions which are used in probe_32.c are implemented as inlines or in apic.c. There is no reason to have them at random places. Move them to the actual usage site and make them static. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213153.596768194@linutronix.de arch/x86/include/asm/apic.h | 21 --------------------- arch/x86/kernel/apic/apic.c | 10 ---------- arch/x86/kernel/apic/probe_32.c | 25 +++++++++++++++++++++++++ 3 files changed, 25 insertions(+), 31 deletions(-) commit 57e0aa446176493f69a8f8e270e9c4addca80772 Author: Thomas Gleixner Date: Wed Sep 13 23:29:18 2017 +0200 x86/apic: Sanitize return value of check_apicid_used() The check is boolean, but the function returns unsigned long for no value. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213153.516730518@linutronix.de arch/x86/include/asm/apic.h | 4 ++-- arch/x86/kernel/apic/bigsmp_32.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 727657e6205d201e9acdb5d2c25bc1cd63c0ab16 Author: Thomas Gleixner Date: Wed Sep 13 23:29:17 2017 +0200 x86/apic: Sanitize return value of apic.set_apic_id() The set_apic_id() callback returns an unsigned long value which is handed in to apic_write() as the value argument u32. Adjust the return value so it returns u32 right away. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213153.437208268@linutronix.de arch/x86/include/asm/apic.h | 2 +- arch/x86/kernel/apic/apic_flat_64.c | 2 +- arch/x86/kernel/apic/apic_numachip.c | 4 ++-- arch/x86/kernel/apic/x2apic.h | 2 +- arch/x86/kernel/apic/x2apic_phys.c | 2 +- arch/x86/kernel/apic/x2apic_uv_x.c | 2 +- arch/x86/xen/apic.c | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) commit 981c2eac1cb97c7db64acf567950e7e81019dd33 Author: Thomas Gleixner Date: Wed Sep 13 23:29:16 2017 +0200 x86/apic: Deinline x2apic functions These inline functions are used in both the cluster and the physical x2apic code to fill in the function pointers of the apic structure. That means the code is generated twice for no reason. Move it to a C code and reuse it. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213153.358954066@linutronix.de arch/x86/include/asm/x2apic.h | 49 ----------------------------------- arch/x86/kernel/apic/x2apic.h | 9 +++++++ arch/x86/kernel/apic/x2apic_cluster.c | 2 +- arch/x86/kernel/apic/x2apic_phys.c | 40 +++++++++++++++++++++++++++- 4 files changed, 49 insertions(+), 51 deletions(-) commit 0e9b11413262ef3d64273e15f7631d9836c53c1a Author: Justin Chen Date: Thu Jun 15 15:20:31 2017 -0700 soc bcm: brcmstb: Add support for S2/S3/S5 suspend states (MIPS) This commit adds support for the Broadcom STB S2/S3/S5 suspend states on MIPS based SoCs. This requires quite a lot of code in order to deal with the different HW blocks that need to be quiesced during suspend: - DDR PHY - DDR memory controller and arbiter - control processor The final steps of the suspend execute in cache and there is is a little bit of assembly code in order to shut down the DDR PHY PLL and then go into a wait loop until a wake-up even occurs. Conversely the resume part involves waiting for the DDR PHY PLL to come back up and resume executions where we left. Signed-off-by: Justin Chen Signed-off-by: Florian Fainelli drivers/soc/bcm/brcmstb/Kconfig | 2 +- drivers/soc/bcm/brcmstb/pm/Makefile | 1 + drivers/soc/bcm/brcmstb/pm/pm-mips.c | 461 +++++++++++++++++++++++++++++++++++ drivers/soc/bcm/brcmstb/pm/pm.h | 13 +- drivers/soc/bcm/brcmstb/pm/s2-mips.S | 200 +++++++++++++++ drivers/soc/bcm/brcmstb/pm/s3-mips.S | 146 +++++++++++ 6 files changed, 821 insertions(+), 2 deletions(-) commit dedcf233ceb069c2c1d919ec74a913b39b5b4dd5 Author: Florian Fainelli Date: Thu Jun 15 15:19:02 2017 -0700 dt-bindings: Document MIPS Broadcom STB power management nodes Document the different nodes required for supporting S2/S3/S5 suspend states on MIPS-based Broadcom STB SoCs. Acked-by: Rob Herring Signed-off-by: Florian Fainelli .../devicetree/bindings/mips/brcm/soc.txt | 153 +++++++++++++++++++++ 1 file changed, 153 insertions(+) commit 0b741b8234c86065fb6954d32d427b3f7e14756f Author: Brian Norris Date: Thu Jun 15 12:37:31 2017 -0700 soc: bcm: brcmstb: Add support for S2/S3/S5 suspend states (ARM) This commit adds support for the Broadcom STB S2/S3/S5 suspend states on ARM based SoCs. This requires quite a lot of code in order to deal with the different HW blocks that need to be quiesced during suspend: - DDR PHY SHIM - DDR memory controller and sequencer - control processor The final steps of the suspend execute in an on-chip SRAM and there is a little bit of assembly code in order to shut down the DDR PHY PLL and then go into a wfi loop until a wake-up even occurs. Conversely the resume part involves waiting for the DDR PHY PLL to come back up and resume executions where we left. For S3, because of our memory hashing (actual hashing code not included for simplicity, and is bypassed) we need to relocate the writable variables (stack) into SRAM shortly before suspending in order to leave the DRAM untouched and create a reliable hash of its contents. This code has been contributed by Brian Norris initially and has been incrementally fixed and updated to support new chips by a lot of people. Signed-off-by: Brian Norris Signed-off-by: Markus Mayer Signed-off-by: Justin Chen Signed-off-by: Gareth Powell Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli drivers/soc/bcm/Kconfig | 2 + drivers/soc/bcm/brcmstb/Kconfig | 10 + drivers/soc/bcm/brcmstb/Makefile | 1 + drivers/soc/bcm/brcmstb/pm/Makefile | 2 + drivers/soc/bcm/brcmstb/pm/aon_defs.h | 113 +++++ drivers/soc/bcm/brcmstb/pm/pm-arm.c | 822 ++++++++++++++++++++++++++++++++++ drivers/soc/bcm/brcmstb/pm/pm.h | 78 ++++ drivers/soc/bcm/brcmstb/pm/s2-arm.S | 76 ++++ 8 files changed, 1104 insertions(+) commit a7794db38ed826a2738f53b9b1e9c85cc0876fbe Author: Eric Anholt Date: Thu Aug 31 11:54:16 2017 -0700 ARM: dts: cygnus: Add the PWM node This is connected up to the backlight on 911360_entphn, which we'll need for a panel driver. For now, leave the node disabled in the shared dtsi. Signed-off-by: Eric Anholt Acked-by: Scott Branden Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-cygnus.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5607785b86eb345f1982ae6e319c6c5b8d477c68 Author: Eric Anholt Date: Thu Aug 31 11:54:15 2017 -0700 ARM: dts: cygnus: Add the CLCD controller This doesn't yet enable it on any particular platform, as we still need a panel driver for bcm911360_entphn. Signed-off-by: Eric Anholt Acked-by: Scott Branden Signed-off-by: Florian Fainelli arch/arm/boot/dts/bcm-cygnus.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 3bf689f9275ff73de1ffad3e571837c8bff41d27 Author: Andrzej Pietrasiewicz Date: Mon Sep 18 12:02:13 2017 +0200 ARM: dts: exynos: Add dwc3 SUSPHY quirk Odroid XU4 board does not enumerate SuperSpeed devices. This patch makes exynos5 series chips use USB SUSPHY quirk, which solves the problem. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos54xx.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit e4ae4c8ea7c65f61fde29c689d148c8c9e05305a Merge: ae41a2a ec0f7cd Author: Thomas Gleixner Date: Mon Sep 25 20:39:01 2017 +0200 Merge branch 'irq/core' into x86/apic Pick up the dependencies for the vector management rework series. commit ec0f7cd273dc41ab28bba703cac82690ea5f2863 Author: Thomas Gleixner Date: Wed Sep 13 23:29:15 2017 +0200 genirq/matrix: Add tracepoints Add tracepoints for the irq bitmap matrix allocator. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213153.279468022@linutronix.de include/trace/events/irq_matrix.h | 201 ++++++++++++++++++++++++++++++++++++++ kernel/irq/matrix.c | 15 +++ 2 files changed, 216 insertions(+) commit 2f75d9e1c90511bff6d1ce4de94503cc28fec032 Author: Thomas Gleixner Date: Wed Sep 13 23:29:14 2017 +0200 genirq: Implement bitmap matrix allocator Implement the infrastructure for a simple bitmap based allocator, which will replace the x86 vector allocator. It's in the core code as other architectures might be able to reuse/extend it. For now it only implements allocations for single CPUs, but it's simple to add multi CPU allocation support if required. The concept is rather simple: Global information: system_vector bitmap global accounting PerCPU information: allocation bitmap managed allocation bitmap local accounting The system vector bitmap is used to exclude vectors system wide from the allocation space. The allocation bitmap is used to keep track of per cpu used vectors. The managed allocation bitmap is used to reserve vectors for managed interrupts. When a regular (non managed) interrupt allocation happens then the following rule applies: tmpmap = system_map | alloc_map | managed_map find_zero_bit(tmpmap) Oring the bitmaps together gives the real available space. The same rule applies for reserving a managed interrupt vector. But contrary to the regular interrupts the reservation only marks the bit in the managed map and therefor excludes it from the regular allocations. The managed map is only cleaned out when the a managed interrupt is completely released and it stays alive accross CPU offline/online operations. For managed interrupt allocations the rule is: tmpmap = managed_map & ~alloc_map find_first_bit(tmpmap) This returns the first bit which is in the managed map, but not yet allocated in the allocation map. The allocation marks it in the allocation map and hands it back to the caller for use. The rest of the code are helper functions to handle the various requirements and the accounting which are necessary to replace the x86 vector allocation code. The result is a single patch as the evolution of this infrastructure cannot be represented in bits and pieces. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Chris Metcalf Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213153.185437174@linutronix.de include/linux/irq.h | 22 +++ kernel/irq/Kconfig | 3 + kernel/irq/Makefile | 1 + kernel/irq/matrix.c | 428 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 454 insertions(+) commit 22d0b12f3560d3b3264ee79faa1c05a5060fb916 Author: Thomas Gleixner Date: Wed Sep 13 23:29:13 2017 +0200 genirq/irqdomain: Add force reactivation flag to irq domains Allow irqdomains to tell the core code, that after early activation the interrupt needs to be reactivated at request_irq() time. This allows reservation of vectors at early activation time and actual vector assignment at request_irq() time. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213153.106242536@linutronix.de include/linux/msi.h | 5 +++++ kernel/irq/msi.c | 2 ++ 2 files changed, 7 insertions(+) commit 42e1cc2dc5b698181ab1ffb7972bd880230c506e Author: Thomas Gleixner Date: Wed Sep 13 23:29:12 2017 +0200 genirq/irqdomain: Propagate early activation Propagate the early activation mode to the irqdomain activate() callbacks. This is required for the upcoming reservation, late vector assignment scheme, so that the early activation call can act accordingly. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213153.028353660@linutronix.de arch/x86/kernel/apic/io_apic.c | 4 ++-- include/linux/irqdomain.h | 2 +- kernel/irq/chip.c | 4 ++-- kernel/irq/internals.h | 2 +- kernel/irq/irqdomain.c | 11 ++++++----- kernel/irq/msi.c | 2 +- 6 files changed, 13 insertions(+), 12 deletions(-) commit bb9b428a5c832d7abb494fbabac37c515c01c6c4 Author: Thomas Gleixner Date: Wed Sep 13 23:29:11 2017 +0200 genirq/irqdomain: Allow irq_domain_activate_irq() to fail Allow irq_domain_activate_irq() to fail. This is required to support a reservation and late vector assignment scheme. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213152.933882227@linutronix.de include/linux/irqdomain.h | 2 +- kernel/irq/chip.c | 9 +++++++-- kernel/irq/internals.h | 3 ++- kernel/irq/irqdomain.c | 40 +++++++++++++++++++++++++--------------- kernel/irq/msi.c | 19 +++++++++++++++++-- 5 files changed, 52 insertions(+), 21 deletions(-) commit 72491643469aab736536ae71dcd199b19dabd891 Author: Thomas Gleixner Date: Wed Sep 13 23:29:10 2017 +0200 genirq/irqdomain: Update irq_domain_ops.activate() signature The irq_domain_ops.activate() callback has no return value and no way to tell the function that the activation is early. The upcoming changes to support a reservation scheme which allows to assign interrupt vectors on x86 only when the interrupt is actually requested requires: - A return value, so activation can fail at request_irq() time - Information that the activate invocation is early, i.e. before request_irq(). Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213152.848490816@linutronix.de arch/x86/include/asm/irqdomain.h | 4 ++-- arch/x86/kernel/apic/htirq.c | 5 +++-- arch/x86/kernel/apic/io_apic.c | 5 +++-- arch/x86/platform/uv/uv_irq.c | 5 +++-- drivers/gpio/gpio-xgene-sb.c | 8 +++++--- drivers/iommu/amd_iommu.c | 5 +++-- drivers/iommu/intel_irq_remapping.c | 5 +++-- drivers/irqchip/irq-gic-v3-its.c | 10 ++++++---- drivers/pinctrl/stm32/pinctrl-stm32.c | 5 +++-- include/linux/irqdomain.h | 2 +- kernel/irq/irqdomain.c | 2 +- kernel/irq/msi.c | 5 +++-- 12 files changed, 36 insertions(+), 25 deletions(-) commit c942cee46bba761ce97ee6d4fc71892e064e8628 Author: Thomas Gleixner Date: Wed Sep 13 23:29:09 2017 +0200 genirq: Separate activation and startup Activation of an interrupt and startup are currently a combo functionlity. That works so far, but upcoming changes require a strict separation because the activation can fail in future. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213152.754334077@linutronix.de kernel/irq/autoprobe.c | 2 +- kernel/irq/chip.c | 30 ++++++++++++++++++++++++------ kernel/irq/internals.h | 2 ++ kernel/irq/manage.c | 17 ++++++++++++++++- 4 files changed, 43 insertions(+), 8 deletions(-) commit 239306fee8a59beb728faf8f42b13b2250b24841 Author: Thomas Gleixner Date: Wed Sep 13 23:29:08 2017 +0200 genirq: Set managed shut down flag at init Managed interrupts should start up in managed shutdown mode. Set the status flag when initialising the irq descriptor. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213152.669687742@linutronix.de kernel/irq/irqdesc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 457f6d35072f395508255ef09fd08f824382cf85 Author: Thomas Gleixner Date: Wed Sep 13 23:29:07 2017 +0200 genirq: Make state consistent for !IRQ_DOMAIN_HIERARCHY In the !IRQ_DOMAIN_HIERARCHY cas the activation stubs are not setting/clearing the activation status bits. This is not a problem at the moment, but upcoming changes require a correct status. Add the set/clear incovations to the stub functions and move them to the core internal header to avoid duplication and visibility outside the core. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213152.591985591@linutronix.de include/linux/irqdomain.h | 4 ---- kernel/irq/internals.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 4 deletions(-) commit c3e7239a7f43ce1ff407df5f5944bf0d42dc21bf Author: Thomas Gleixner Date: Wed Sep 13 23:29:06 2017 +0200 irqdomain/debugfs: Provide domain specific debug callback Some interrupt domains like the X86 vector domain has special requirements for debugging, like showing the vector usage on the CPUs. Add a callback to the irqdomain ops which can be filled in by domains which require it and add conditional invocations to the irqdomain and the per irq debug files. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213152.512937505@linutronix.de include/linux/irqdomain.h | 6 +++++- kernel/irq/debugfs.c | 2 ++ kernel/irq/irqdomain.c | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) commit 07557ccb8c83f315e409ddee181e9ffbf87c6ad1 Author: Thomas Gleixner Date: Wed Sep 13 23:29:05 2017 +0200 genirq/msi: Capture device name for debugfs For debugging the allocation of unused or potentially leaked interrupt descriptor it's helpful to have some information about the site which allocated them. In case of MSI this is simple because the caller hands the device struct pointer into the domain allocation function. Duplicate the device name and show it in the debugfs entry of the interrupt descriptor. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213152.433038426@linutronix.de include/linux/irqdesc.h | 1 + kernel/irq/debugfs.c | 10 ++++++++++ kernel/irq/internals.h | 5 +++++ kernel/irq/msi.c | 6 +++++- 4 files changed, 21 insertions(+), 1 deletion(-) commit e0b477941d130576d9daf31160dab6e34335b10a Author: Thomas Gleixner Date: Wed Sep 13 23:29:04 2017 +0200 genirq/debugfs: Show debug information for all irq descriptors Currently the debugfs shows only information about actively used interrupts like /proc/irq/ does. That's fine for most cases, but not helpful when internals of allocated, but unused interrupt descriptors have to debugged. It's also useful to provide information about all descriptors so leaks can be debugged in a simpler way. Move the debugfs registration to the descriptor allocation code. Signed-off-by: Thomas Gleixner Tested-by: Juergen Gross Tested-by: Yu Chen Acked-by: Juergen Gross Cc: Boris Ostrovsky Cc: Tony Luck Cc: Marc Zyngier Cc: Alok Kataria Cc: Joerg Roedel Cc: "Rafael J. Wysocki" Cc: Steven Rostedt Cc: Christoph Hellwig Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Paolo Bonzini Cc: Rui Zhang Cc: "K. Y. Srinivasan" Cc: Arjan van de Ven Cc: Dan Williams Cc: Len Brown Link: https://lkml.kernel.org/r/20170913213152.355525908@linutronix.de kernel/irq/irqdesc.c | 1 + kernel/irq/manage.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) commit 9e1b0211c5dd4acbd21a8ec1b86fc38a497a4656 Author: Guoqing Jiang Date: Mon Sep 25 15:47:50 2017 +0800 dlm: recheck kthread_should_stop() before schedule() Call schedule() here could make the thread miss wake up from kthread_stop(), so it is better to recheck kthread_should_stop() before call schedule(), a symptom happened when I run indefinite test (which mostly created clustered raid1, assemble it in other nodes, then stop them) of clustered raid. $ ps aux|grep md|grep D root 4211 0.0 0.0 19760 2220 ? Ds 02:58 0:00 mdadm -Ssq $ cat /proc/4211/stack kthread_stop+0x4d/0x150 dlm_recoverd_stop+0x15/0x20 [dlm] dlm_release_lockspace+0x2ab/0x460 [dlm] leave+0xbf/0x150 [md_cluster] md_cluster_stop+0x18/0x30 [md_mod] bitmap_free+0x12e/0x140 [md_mod] bitmap_destroy+0x7f/0x90 [md_mod] __md_stop+0x21/0xa0 [md_mod] do_md_stop+0x15f/0x5c0 [md_mod] md_ioctl+0xa65/0x18a0 [md_mod] blkdev_ioctl+0x49e/0x8d0 block_ioctl+0x41/0x50 do_vfs_ioctl+0x96/0x5b0 SyS_ioctl+0x79/0x90 entry_SYSCALL_64_fastpath+0x1e/0xad This maybe not resolve the issue completely since the KTHREAD_SHOULD_STOP flag could be set between "break" and "schedule", but at least the chance for the symptom happen could be reduce a lot (The indefinite test runs more than 20 hours without problem and it happens easily without the change). Signed-off-by: Guoqing Jiang Signed-off-by: David Teigland fs/dlm/recoverd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 26b41099e7e97d6d44769fd159e822a98c98afa2 Author: tsutomu.owa@toshiba.co.jp Date: Tue Sep 12 09:02:10 2017 +0000 DLM: fix NULL pointer dereference in send_to_sock() The writequeue and writequeue_lock member of othercon was not initialized. If lowcomms_state_change() is called from network layer, othercon->swork may be scheduled. In this case, send_to_sock() will generate a NULL pointer reference. We avoid this problem by correctly initializing writequeue and writequeue_lock member of othercon. Signed-off-by: Tadashi Miyauchi Signed-off-by: Tsutomu Owa Signed-off-by: David Teigland fs/dlm/lowcomms.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0aa18464c812e0154e8bafc9f60ca8002b3a8e7c Author: tsutomu.owa@toshiba.co.jp Date: Tue Sep 12 09:02:02 2017 +0000 DLM: fix to reschedule rwork When an error occurs in kernel_recvmsg or kernel_sendpage and close_connection is called and receive work is already scheduled, receive work is canceled. In that case, the receive work will not be scheduled forever after reconnection, because CF_READ_PENDING flag is established. Signed-off-by: Tadashi Miyauchi Signed-off-by: Tsutomu Owa Signed-off-by: David Teigland fs/dlm/lowcomms.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 93eaadebe9e1c28528f01204cefccc7ba050c913 Author: tsutomu.owa@toshiba.co.jp Date: Tue Sep 12 09:01:55 2017 +0000 DLM: fix to use sk_callback_lock correctly In the current implementation, we think that exclusion control between processing to set the callback function to the connection structure and processing to refer to the connection structure from the callback function was not enough. We fix them. Signed-off-by: Tadashi Miyauchi Signed-off-by: Tsutomu Owa Signed-off-by: David Teigland fs/dlm/lowcomms.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit ccbbea04326e061651e0b38eda0792c758ce4f91 Author: tsutomu.owa@toshiba.co.jp Date: Tue Sep 12 09:01:46 2017 +0000 DLM: fix overflow dlm_cb_seq dlm_cb_seq is 64 bits. If dlm_cb_seq overflows and returns to 0, dlm_rem_lkb_callback() will not work properly. Signed-off-by: Tadashi Miyauchi Signed-off-by: Tsutomu Owa Signed-off-by: David Teigland fs/dlm/ast.c | 2 ++ 1 file changed, 2 insertions(+) commit 3421fb15be01ff4714fed5a5d6db64849b59a1fd Author: tsutomu.owa@toshiba.co.jp Date: Tue Sep 12 09:01:38 2017 +0000 DLM: fix memory leak in tcp_accept_from_sock() The sk member of the socket generated by sock_create_kern() is overwritten by ops->accept(). So the previous sk will not be released. We use kernel_accept() instead of sock_create_kern() and ops->accept(). Signed-off-by: Tadashi Miyauchi Signed-off-by: Tsutomu Owa Signed-off-by: David Teigland fs/dlm/lowcomms.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) commit 294e7e458763dc1d229cbbe7147a6034bfc6e39a Author: tsutomu.owa@toshiba.co.jp Date: Fri Sep 15 14:17:23 2017 -0500 DLM: fix conversion deadlock when DLM_LKF_NODLCKWT flag is set When the DLM_LKF_NODLCKWT flag was set, even if conversion deadlock was detected, the caller of can_be_granted() was unknown. We change the behavior of can_be_granted() and change it to detect conversion deadlock regardless of whether the DLM_LKF_NODLCKWT flag is set or not. And depending on whether the DLM_LKF_NODLCKWT flag is set or not, we change the behavior at the caller of can_be_granted(). This fix has no effect except when using DLM_LKF_NODLCKWT flag. Currently, ocfs2 uses the DLM_LKF_NODLCKWT flag and does not expect a cancel operation from conversion deadlock when calling dlm_lock(). ocfs2 is implemented to perform a cancel operation by requesting BASTs (callback). Signed-off-by: Tadashi Miyauchi Signed-off-by: Tsutomu Owa Signed-off-by: David Teigland fs/dlm/lock.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit 173a31fe2b23b3ccc45d0b70edb225b1d836c31d Author: tsutomu.owa@toshiba.co.jp Date: Tue Sep 12 09:01:24 2017 +0000 DLM: use CF_CLOSE flag to stop dlm_send correctly If reconnection fails while executing dlm_lowcomms_stop, dlm_send will not stop. Signed-off-by: Tadashi Miyauchi Signed-off-by: Tsutomu Owa Signed-off-by: David Teigland fs/dlm/lowcomms.c | 1 + 1 file changed, 1 insertion(+) commit 8a4abb0819769a556f9023845d3821a06f81452d Author: tsutomu.owa@toshiba.co.jp Date: Tue Sep 12 09:01:16 2017 +0000 DLM: Reanimate CF_WRITE_PENDING flag CF_WRITE_PENDING flag has been reanimated to make dlm_send stop properly when running dlm_lowcomms_stop. Signed-off-by: Tadashi Miyauchi Signed-off-by: Tsutomu Owa Signed-off-by: David Teigland fs/dlm/lowcomms.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit e412f9201de255a503ae3d67f46aae580c79006c Author: tsutomu.owa@toshiba.co.jp Date: Tue Sep 12 08:56:30 2017 +0000 DLM: fix race condition between dlm_recoverd_stop and dlm_recoverd When dlm_recoverd_stop() is called between kthread_should_stop() and set_task_state(TASK_INTERRUPTIBLE), dlm_recoverd will not wake up. Signed-off-by: Tadashi Miyauchi Signed-off-by: Tsutomu Owa Signed-off-by: David Teigland fs/dlm/recoverd.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit c553e173b022347dcb34721688f55167c654466d Author: tsutomu.owa@toshiba.co.jp Date: Tue Sep 12 08:56:15 2017 +0000 DLM: close othercon at send/receive error If an error occurs in the sending / receiving process, if othercon exists, sending / receiving processing using othercon may also result in an error. We fix to pre-close othercon as well. Signed-off-by: Tadashi Miyauchi Signed-off-by: Tsutomu Owa Signed-off-by: David Teigland fs/dlm/lowcomms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5966121241b10a32396d770a0b39a41441511a8c Author: tsutomu.owa@toshiba.co.jp Date: Tue Sep 12 08:56:08 2017 +0000 DLM: retry rcom when dlm_wait_function is timed out. If a node sends a DLM_RCOM_STATUS command and an error occurs on the receiving side, the DLM_RCOM_STATUS_REPLY response may not be returned. We retransmitted the DLM_RCOM_STATUS command so that we do not wait for an infinite response. Signed-off-by: Tadashi Miyauchi Signed-off-by: Tsutomu Owa Signed-off-by: David Teigland fs/dlm/rcom.c | 6 ++++++ fs/dlm/recover.c | 4 ++++ 2 files changed, 10 insertions(+) commit c7355827b27c550824bbcc1f0586cf993bf83d94 Author: tsutomu.owa@toshiba.co.jp Date: Tue Sep 12 08:56:00 2017 +0000 DLM: fix to use sock_mutex correctly in xxx_accept_from_sock In the current implementation, we think that exclusion control for othercon in tcp_accept_from_sock() and sctp_accept_from_sock() was not enough. We fix them. Signed-off-by: Tadashi Miyauchi Signed-off-by: Tsutomu Owa Signed-off-by: David Teigland fs/dlm/lowcomms.c | 6 ++++++ 1 file changed, 6 insertions(+) commit b2a6662932c52304eee11323701f8a01aa110e37 Author: tsutomu.owa@toshiba.co.jp Date: Tue Sep 12 08:55:50 2017 +0000 DLM: fix race condition between dlm_send and dlm_recv When kernel_sendpage(in send_to_sock) and kernel_recvmsg (in receive_from_sock) return error, close_connection may works at the same time. At that time, they may wait for each other by cancel_work_sync. Signed-off-by: Tadashi Miyauchi Signed-off-by: Tsutomu Owa Signed-off-by: David Teigland fs/dlm/lowcomms.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f0fb83cb9201a9f272f8ac771eed6b1e5745375c Author: tsutomu.owa@toshiba.co.jp Date: Tue Sep 12 08:55:40 2017 +0000 DLM: fix double list_del() dlm_lowcomms_stop() was not functioning properly. Correctly, we have to wait until all processing is finished with send_workqueue and recv_workqueue. This problem causes the following issue. Senario is 1. dlm_send thread: send_to_sock refers con->writequeue 2. main thread: dlm_lowcomms_stop calls list_del 3. dlm_send thread: send_to_sock calls list_del in writequeue_entry_complete [ 1925.770305] dlm: canceled swork for node 4 [ 1925.772374] general protection fault: 0000 [#1] SMP [ 1925.777930] Modules linked in: ocfs2_stack_user ocfs2 ocfs2_nodemanager ocfs2_stackglue dlm fmxnet(O) fmx_api(O) fmx_cu(O) igb(O) kvm_intel kvm irqbypass autofs4 [ 1925.794131] CPU: 3 PID: 6994 Comm: kworker/u8:0 Tainted: G O 4.4.39 #1 [ 1925.802684] Hardware name: TOSHIBA OX/OX, BIOS OX-P0015 12/03/2015 [ 1925.809595] Workqueue: dlm_send process_send_sockets [dlm] [ 1925.815714] task: ffff8804398d3c00 ti: ffff88046910c000 task.ti: ffff88046910c000 [ 1925.824072] RIP: 0010:[] [] process_send_sockets+0xf8/0x280 [dlm] [ 1925.834480] RSP: 0018:ffff88046910fde0 EFLAGS: 00010246 [ 1925.840411] RAX: dead000000000200 RBX: 0000000000000001 RCX: 000000000000000a [ 1925.848372] RDX: ffff88046bd980c0 RSI: 0000000000000000 RDI: ffff8804673c5670 [ 1925.856341] RBP: ffff88046910fe20 R08: 00000000000000c9 R09: 0000000000000010 [ 1925.864311] R10: ffffffff81e22fc0 R11: 0000000000000000 R12: ffff8804673c56d8 [ 1925.872281] R13: ffff8804673c5660 R14: ffff88046bd98440 R15: 0000000000000058 [ 1925.880251] FS: 0000000000000000(0000) GS:ffff88047fd80000(0000) knlGS:0000000000000000 [ 1925.889280] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 1925.895694] CR2: 00007fff09eadf58 CR3: 00000004690f5000 CR4: 00000000001006e0 [ 1925.903663] Stack: [ 1925.905903] ffff8804673c5630 ffff8804673c5620 ffff8804673c5670 ffff88007d219b40 [ 1925.914181] ffff88046f095800 0000000000000100 ffff8800717a1400 ffff8804673c56d8 [ 1925.922459] ffff88046910fe60 ffffffff81073db2 00ff880400000000 ffff88007d219b40 [ 1925.930736] Call Trace: [ 1925.933468] [] process_one_work+0x162/0x450 [ 1925.939983] [] worker_thread+0x69/0x4a0 [ 1925.946109] [] ? rescuer_thread+0x350/0x350 [ 1925.952622] [] kthread+0xef/0x110 [ 1925.958165] [] ? kthread_park+0x60/0x60 [ 1925.964283] [] ret_from_fork+0x3f/0x70 [ 1925.970312] [] ? kthread_park+0x60/0x60 [ 1925.976436] Code: 01 00 00 48 8b 7d d0 e8 07 d3 3a e1 45 01 7e 18 45 29 7e 1c 75 ab 41 8b 46 24 85 c0 75 a3 49 8b 16 49 8b 46 08 31 f6 48 89 42 08 <48> 89 10 48 b8 00 01 00 00 00 00 ad de 49 8b 7e 10 49 89 06 66 [ 1925.997791] RIP [] process_send_sockets+0xf8/0x280 [dlm] [ 1926.005577] RSP Signed-off-by: Tadashi Miyauchi Signed-off-by: Tsutomu Owa Signed-off-by: David Teigland fs/dlm/lowcomms.c | 44 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 5 deletions(-) commit 988419a9deab68035364d8163bc27adb694ab28e Author: tsutomu.owa@toshiba.co.jp Date: Tue Sep 12 08:55:32 2017 +0000 DLM: fix remove save_cb argument from add_sock() save_cb argument is not used. We remove them. Signed-off-by: Tadashi Miyauchi Signed-off-by: Tsutomu Owa Signed-off-by: David Teigland fs/dlm/lowcomms.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit cc661fc934a004526a714a7b804ee3f119d27093 Author: Bob Peterson Date: Tue Sep 12 08:55:23 2017 +0000 DLM: Fix saving of NULL callbacks In a previous patch I noted that accept() often copies the struct sock (sk) which overwrites the sock callbacks. However, in testing we discovered that the dlm connection structures (con) are sometimes deleted and recreated as connections come and go, and since they're zeroed out by kmem_cache_zalloc, the saved callback pointers are also initialized to zero. But with today's DLM code, the callbacks are only saved when a socket is added. During recovery testing, we discovered a common situation in which the new con is initialized to zero, then a socket is added after accept(). In this case, the sock's saved values are all NULL, but the saved values are wiped out, due to accept(). Therefore, we don't have a known good copy of the callbacks from which we can restore. Since the struct sock callbacks are always good after listen(), this patch saves the known good values after listen(). These good values are then used for subsequent restores. Signed-off-by: Bob Peterson Reviewed-by: Tadashi Miyauchi Signed-off-by: David Teigland fs/dlm/lowcomms.c | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) commit 01da24d3fbed92dc6faf60b753e6bd50cdafb646 Author: Bob Peterson Date: Tue Sep 12 08:55:14 2017 +0000 DLM: Eliminate CF_WRITE_PENDING flag Signed-off-by: Bob Peterson Reviewed-by: Tadashi Miyauchi Signed-off-by: David Teigland fs/dlm/lowcomms.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 61d9102b62129e13a2258c1e0566962f9a1732f0 Author: Bob Peterson Date: Tue Sep 12 08:55:04 2017 +0000 DLM: Eliminate CF_CONNECT_PENDING flag Before this patch, there was a flag in the con structure that was used to determine whether or not a connect was needed. The bit was set here and there, and cleared here and there, so it left some race conditions: the bit was set, work was queued, then the worker cleared the bit, allowing someone else to set it while the worker ran. For the most part, this worked okay, but we got into trouble if connections were lost and it needed to reconnect. This patch eliminates the flag in favor of simply checking if we actually have a sock pointer while protected by the mutex. Signed-off-by: Bob Peterson Reviewed-by: Tadashi Miyauchi Signed-off-by: David Teigland fs/dlm/lowcomms.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit c2c4be28c248232d5bdfa5911f3b721db771f4f0 Author: Andreas Gruenbacher Date: Mon Sep 25 08:37:15 2017 -0500 gfs2: Always update inode ctime in set_acl Three-entry POSIX ACLs can be stored in the file mode permission bits, with no need to store them in extended attributes. When a process sets such a minimal ACL, the kernel updates the file mode like chmod does, and removes any existing extended attributes for that ACL. Make sure the ctime is always updated in that case. Fixes xfstest generic/307. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/acl.c | 1 + 1 file changed, 1 insertion(+) commit 38eedf2841b03b779710e8ad0442810a4747a348 Author: Andreas Gruenbacher Date: Fri Sep 22 08:34:46 2017 -0500 gfs2: Support negative atimes When inodes are read from disk, GFS2 will only update in-memory atimes older than the on-disk atimes; this prevents atimes from going backwards. The atimes of newly allocated inodes are initialized to 0. This means that when an atime is explicitly set to a negative value, this value will not persist. Fix by setting the atime of newly allocated inodes to the lowest possible value instead of 0. Fixes xfstest generic/258. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9b7c2ddb453e0c8c7529b562e7581d99e970b8b4 Author: Andreas Gruenbacher Date: Fri Sep 22 08:29:19 2017 -0500 gfs2: Update ctime in setflags ioctl The FS_IOC_SETFLAGS ioctl is supposed to update the inode ctime. Fixes xfstests generic/277. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/file.c | 1 + 1 file changed, 1 insertion(+) commit 20cdc1931ee8e03ce3a26061ff14a05a3f8cbe78 Author: Andreas Gruenbacher Date: Fri Sep 22 07:39:54 2017 -0500 gfs2: Clarify gfs2_block_map Add a comment about the logical block size for directories. Rename "bsize" in gfs2_block_map to "factor". Fix a typo in the description of metaptr1. Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson fs/gfs2/bmap.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit f19c181f20cdfb2aa5f4a1bba095a008e34ed61b Author: Stuart Henderson Date: Thu Sep 21 11:02:12 2017 +0100 ASoC: dapm: Make snd_soc_dapm_add/del_routes use runtime mutex subclass Make snd_soc_dapm_add_routes and snd_soc_dapm_del_routes use the SND_SOC_DAPM_CLASS_RUNTIME dapm subclass to allow dynamic dapm route updates. Signed-off-by: Stuart Henderson Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 74b33b8481e7c8a66149093f691b9082b50e24fc Merge: 9900a42 840bc44 Author: Mark Brown Date: Mon Sep 25 17:33:31 2017 +0100 Merge branch 'topic/component' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-core commit 9900a4226c785dbb32c08af5ae8fbbf1fc4c31d0 Author: Kuninori Morimoto Date: Mon Sep 25 01:38:54 2017 +0000 ASoC: remove unneeded dai->driver->ops check On soc_add_dai(), it uses null_dai_ops if driver doesn't have its own ops. This means, dai->driver->ops never been NULL. dai->driver->ops check is not needed. This patch removes it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 8 ++++---- sound/soc/soc-pcm.c | 31 +++++++++++++++---------------- 2 files changed, 19 insertions(+), 20 deletions(-) commit 464719255e095b0cc05a30b124f2cdc67a930d7f Author: Kuninori Morimoto Date: Mon Sep 25 01:38:34 2017 +0000 ASoC: remove unneeded dai->driver check On soc_add_dai(), it is checking dai->driver->xxx, This means, dai->driver is mandatory, never been NULL. dai->driver check is not needed. This patch removes it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit db1721f5296704d4f706a31f5d147cf7f16e3add Author: Kuninori Morimoto Date: Mon Sep 25 01:38:13 2017 +0000 ASoC: soc-core: remove rtd NULL check on soc_free_pcm_runtime() static soc_free_pcm_runtime() is never called with rtd == NULL. This patch removes unnecessary rtd == NULL check from soc_free_pcm_runtime(). Furthermore, NULL check before kfree() is not needed. This patch removes such ckeck too. Reported-by: Dan Carpenter Signed-off-by: Fengguang Wu Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/soc-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 57e9e87b356db63a65bc1943855a28b6e45e711e Author: Pierre-Louis Bossart Date: Thu Sep 7 20:12:56 2017 -0500 ASoC: Intel: cht_bsw_rt5672: fix card name For now reason the current card name is a ridiculous 'cherrytrailcraudio'. This isn't very useful or self-explanatory, change to driver name cht-bsw-rt5672. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Takashi Iwai Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_rt5672.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e45e39123a04a1bb1fbccfcd4c59efc332a0037f Author: Pierre-Louis Bossart Date: Thu Sep 7 20:12:55 2017 -0500 ASoC: Intel: cht_bsw_rt5672: use actual HID in suspend/resume The code scans all components looking for the default name i2c-10EC5670:00, which of course doesn't work in platforms where the BIOS uses a different HID such as Dell 5585 Since we already have the correct information available, just use the actual codec name and length. Signed-off-by: Pierre-Louis Bossart Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_rt5672.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 8e1b1785489b8b53b4ff934e0ad9259952817f5b Author: Pierre-Louis Bossart Date: Thu Sep 7 20:12:54 2017 -0500 ASoC: rt5670: refactor DMI quirks and fix Dell Venue settings Additional checks exposed a mistake in the quirk for the Dell Venue Pro 5855 (Dmic2 instead of Dmic1). Rather than adding quirk tables, merge all quirks in a single table and use flags to differentiate platforms. Also add a parameter override to help support additional platforms using this codec CC: Bard Liao Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown sound/soc/codecs/rt5670.c | 124 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 105 insertions(+), 19 deletions(-) commit 4702f4b23a2fc6196abacf515a959e69176da40e Author: Fabrizio Castro Date: Mon Sep 25 09:54:20 2017 +0100 spi: sh-msiof: Add r8a774[35] to the compatible list Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/sh-msiof.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit bdacfc7b6216dd30d07c10732fd4c0a660c62853 Author: Fabrizio Castro Date: Mon Sep 25 09:54:19 2017 +0100 spi: sh-msiof: Add compatible strings for r8a774[35] Signed-off-by: Fabrizio Castro Signed-off-by: Mark Brown drivers/spi/spi-sh-msiof.c | 2 ++ 1 file changed, 2 insertions(+) commit b0d6e097b922ac7f538623c52794d9d63d6ee378 Author: Dan Carpenter Date: Fri Sep 22 23:48:08 2017 +0300 spi: sprd-adi: silence an uninitialized variable warning If of_get_property() fails then "size" is uninitialized and it leads to a static checker warning: drivers/spi/spi-sprd-adi.c:288 sprd_adi_hw_init() error: uninitialized symbol 'size'. We can silence the warning by re-arranging the order of these checks. It obviously doesn't affect runtime at all. Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown drivers/spi/spi-sprd-adi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04063a011f2f35c37e1146c736e6d4ad402a8557 Author: Dan Carpenter Date: Mon Sep 25 13:21:33 2017 +0300 spi: sprd-adi: checking for NULL instead of IS_ERR() devm_ioremap_resource() returns error pointers, it never returns NULL. Fixes: 7e2903cb91df ("spi: Add ADI driver for Spreadtrum platform") Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown drivers/spi/spi-sprd-adi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 441fadadaebacfd5079648354b511a9f21ce9fd7 Author: Christine Gharzuzi Date: Fri Sep 22 15:08:34 2017 +0200 arm64: dts: marvell: Enable Armada-8040-DB CPS SPI1 Add the DT node enabling Armada-8040-DB CPS SPI controller driver. Add the SPI NAND flash device connected on the bus. Fill the MTD partitions layout. Signed-off-by: Christine Gharzuzi Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-8040-db.dts | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit d24e95f8757e9df5d7a9f56448e609cabe611d0a Author: Charles Keepax Date: Mon Sep 25 12:55:07 2017 +0100 ASoC: wm8998: Correct handling of input muxes Currently, wm8998 has two input mux controls on IN1 and attempts to switch these together when the A position is configured to be in digital mode. This is because the digital mode requires pins from both the L and R channels. However, this doesn't work as intended because whilst the registers on the chip are changed the corresponding DAPM representation is only updated for the mux actually being changed by the user. The DAPM graph being out of sync with the hardware can cause some odd issues with incorrect things being powered etc. To avoid this issue and simplify the code somewhat, simply let the user set the muxes as they desire. If they set an invalid configuration they might not get audio from the DMIC but most of the chip requires you to set a valid audio route to get audio. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8998.c | 84 +++++++++++------------------------------------ 1 file changed, 19 insertions(+), 65 deletions(-) commit 2b79b15c258a90c216efc14f0a5d4b88b4b2494d Author: Colin Ian King Date: Wed Sep 20 14:01:25 2017 +0100 ASoC: Intel: Skylake: fix swapped order of function arguments dir and pin_index The call to slk_tplg_fill_res_tkn is passing dir and pin_index in the wrong order, they need to be in pin_index, dir order to match the function slk_tplg_fill_res_tkn correctly. Detected by CoveritScan, CID#1454992 ("Arguments in wrong order") Fixes: f6fa56e22559 ("ASoC: Intel: Skylake: Parse and update module config structure") Signed-off-by: Colin Ian King Acked-By: Vinod Koul Tested-by: Subhransu S. Prusty Signed-off-by: Mark Brown sound/soc/intel/skylake/skl-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ae6f2a3d552dc01c4423c0cdede1daa9fd07991 Merge: 0d9c2ff bd491d2 Author: Doug Ledford Date: Mon Sep 25 11:18:35 2017 -0400 Merge branch 'qedr' into k.o/for-next Signed-off-by: Doug Ledford commit 0d9c2ff1c9f7f8b339fc42ac9763b28c71f1c115 Merge: 89aaca5 e19b205 Author: Doug Ledford Date: Mon Sep 25 11:15:38 2017 -0400 Merge tag 'v4.14-rc2' into k.o/for-next Merge my for-next branch to Linux 4.14-rc2 and open up the for-next area for 4.15 kernel development. Signed-off-by: Doug Ledford commit 041cd640b2f3c5607171c59d8712b503659d21f7 Author: Tejun Heo Date: Mon Sep 25 08:12:05 2017 -0700 cgroup: Implement cgroup2 basic CPU usage accounting In cgroup1, while cpuacct isn't actually controlling any resources, it is a separate controller due to combination of two factors - 1. enabling cpu controller has significant side effects, and 2. we have to pick one of the hierarchies to account CPU usages on. cpuacct controller is effectively used to designate a hierarchy to track CPU usages on. cgroup2's unified hierarchy removes the second reason and we can account basic CPU usages by default. While we can use cpuacct for this purpose, both its interface and implementation leave a lot to be desired - it collects and exposes two sources of truth which don't agree with each other and some of the exposed statistics don't make much sense. Also, it propagates all the way up the hierarchy on each accounting event which is unnecessary. This patch adds basic resource accounting mechanism to cgroup2's unified hierarchy and accounts CPU usages using it. * All accountings are done per-cpu and don't propagate immediately. It just bumps the per-cgroup per-cpu counters and links to the parent's updated list if not already on it. * On a read, the per-cpu counters are collected into the global ones and then propagated upwards. Only the per-cpu counters which have changed since the last read are propagated. * CPU usage stats are collected and shown in "cgroup.stat" with "cpu." prefix. Total usage is collected from scheduling events. User/sys breakdown is sourced from tick sampling and adjusted to the usage using cputime_adjust(). This keeps the accounting side hot path O(1) and per-cpu and the read side O(nr_updated_since_last_read). v2: Minor changes and documentation updates as suggested by Waiman and Roman. Signed-off-by: Tejun Heo Acked-by: Peter Zijlstra Cc: Ingo Molnar Cc: Li Zefan Cc: Johannes Weiner Cc: Waiman Long Cc: Roman Gushchin Documentation/cgroup-v2.txt | 9 ++ include/linux/cgroup-defs.h | 57 +++++++ include/linux/cgroup.h | 22 +++ kernel/cgroup/Makefile | 2 +- kernel/cgroup/cgroup-internal.h | 8 + kernel/cgroup/cgroup.c | 24 ++- kernel/cgroup/stat.c | 334 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 453 insertions(+), 3 deletions(-) commit d2cc5ed6949085cfba30ec5228816cf6eb1d02b9 Author: Tejun Heo Date: Mon Sep 25 08:12:04 2017 -0700 cpuacct: Introduce cgroup_account_cputime[_field]() Introduce cgroup_account_cputime[_field]() which wrap cpuacct_charge() and cgroup_account_field(). This doesn't introduce any functional changes and will be used to add cgroup basic resource accounting. Signed-off-by: Tejun Heo Acked-by: Peter Zijlstra Cc: Ingo Molnar include/linux/cgroup.h | 38 ++++++++++++++++++++++++++++++++++++++ kernel/sched/cpuacct.h | 17 ----------------- kernel/sched/cputime.c | 2 +- kernel/sched/deadline.c | 2 +- kernel/sched/fair.c | 2 +- kernel/sched/rt.c | 2 +- kernel/sched/sched.h | 2 +- kernel/sched/stop_task.c | 2 +- 8 files changed, 44 insertions(+), 23 deletions(-) commit cfb766da54d98ceb145e1bb0bd11c559569dcbfc Author: Tejun Heo Date: Mon Sep 25 08:12:04 2017 -0700 sched/cputime: Expose cputime_adjust() Will be used by basic cgroup resource stat reporting later. Signed-off-by: Tejun Heo Acked-by: Peter Zijlstra Cc: Ingo Molnar Cc: Li Zefan Cc: Johannes Weiner include/linux/sched/cputime.h | 3 ++- kernel/sched/cputime.c | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 6b12ca569bb2f864892c41dbbb0f88f3f9952bf3 Author: Ville Syrjälä Date: Thu Sep 14 18:17:31 2017 +0300 drm/i915: Don't rmw PIPESTAT enable bits i830 seems to occasionally forget the PIPESTAT enable bits when we read the register. These aren't the only registers on i830 that have problems with RMW, as reading the double buffered plane registers returns the latched value rather than the last written value. So something similar is perhaps going on with PIPESTAT. This corruption results on vblank interrupts occasionally turning off on their own, which leads to vblank timeouts and generally a stuck display subsystem. So let's not RMW the pipestat enable bits, and instead use the cached copy we have around. Cc: Imre Deak Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170914151731.5034-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_irq.c | 135 ++++++++++++----------------- drivers/gpu/drm/i915/intel_fifo_underrun.c | 14 +-- 3 files changed, 66 insertions(+), 85 deletions(-) commit dff457d74e7eaf8c5280967467597ebfc3e2e44a Author: David Weinehall Date: Tue Sep 5 16:10:50 2017 +0300 drm/i915: Speed up DMC firmware loading Currently we're doing: 1. acquire lock 2. write word to hardware 3. release lock 4. repeat from 1 to load the DMC firmware. Due to the cost of acquiring/releasing a lock, and the size of the DMC firmware, this slows down DMC loading a lot. This patch simply acquires the lock, writes the entire firmware, then releases the lock. Testing shows resume speedups in the order of 10ms on platforms with DMC firmware (GEN9+). v2: Per feedback from Chris & Ville there's no need to do the whole forcewake dance, so lose that bit (Chris, Ville) v3: Actually send the new version of the patch... v4: Don't acquire the uncore lock. Disable preempt. (Chris) Signed-off-by: David Weinehall Link: https://patchwork.freedesktop.org/patch/msgid/20170905131050.11655-1-david.weinehall@linux.intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_csr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit ccb64941f375a6eb21b1b20136730eb7d1716068 Author: Boris Ostrovsky Date: Mon Sep 11 14:51:11 2017 -0400 x86/timers: Move simple_udelay_calibration() past kvmclock_init() simple_udelay_calibration() relies on x86_platform's calibration ops. For KVM these ops are set late in setup_arch() and so simple_udelay_calibration() ends up using native version. Besides being possibly incorrect, this significantly increases kernel boot time. For example, on my laptop executing start_kernel() by a guest takes ~10 times more than when KVM's ops are used. Since early_xdbc_setup_hardware() relies on calibration having been performed move it too. Signed-off-by: Boris Ostrovsky Cc: baolu.lu@linux.intel.com Link: https://lkml.kernel.org/r/20170911185111.20636-1-boris.ostrovsky@oracle.com Signed-off-by: Thomas Gleixner arch/x86/kernel/setup.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit af5768507c051ceb9fe12bee59202bd83115c073 Author: Dou Liyang Date: Fri Jul 14 11:34:07 2017 +0800 x86/timers: Make recalibrate_cpu_khz() void recalibrate_cpu_khz() is called from powernow K7 and Pentium 4/Xeon CPU freq driver. It recalibrates cpu frequency in case of SMP = n and doesn't need to return anything. Mark it void, also remove the #else branch. Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1500003247-17368-2-git-send-email-douly.fnst@cn.fujitsu.com arch/x86/include/asm/timer.h | 2 +- arch/x86/kernel/tsc.c | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) commit eb496063c9904ce682253ee445b9acb9b6257581 Author: Dou Liyang Date: Fri Jul 14 11:34:06 2017 +0800 x86/timers: Move the simple udelay calibration to tsc.h Commit dd759d93f4dd ("x86/timers: Add simple udelay calibration") adds an static function in x86 boot-time initializations. But, this function is actually related to TSC, so it should be maintained in tsc.c, not in setup.c. Move simple_udelay_calibration() from setup.c to tsc.c and rename it to tsc_early_delay_calibrate for more readability. Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1500003247-17368-1-git-send-email-douly.fnst@cn.fujitsu.com arch/x86/include/asm/tsc.h | 1 + arch/x86/kernel/setup.c | 22 +--------------------- arch/x86/kernel/tsc.c | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 21 deletions(-) commit ae41a2a40ed4253b9e1e111df409bbecab0f9800 Author: Dou Liyang Date: Thu Sep 7 16:49:21 2017 +0800 x86/apic: Use lapic_is_integrated() consistently lapic_is_integrated() is a wrapper around APIC_INTEGRATED(), but not used consistently. Replace the direct usage of APIC_INTEGRATED() and fixup a hard to read tail comment. No functional change. [ tglx: Made it compile and work .... ] Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: bhe@redhat.com Link: https://lkml.kernel.org/r/1504774161-7137-2-git-send-email-douly.fnst@cn.fujitsu.com arch/x86/kernel/apic/apic.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit e3cccbce146fdc61e0f7ffc4cdda2b408b23cf3a Author: Dou Liyang Date: Thu Sep 7 16:49:20 2017 +0800 x86/apic: Remove duplicate X86_64 conditional in lapic_is_integrated() The macro APIC_INTEGRATED(x) is already wrapped by CONFIG_X86_32. So it can be invoked unconditionally. Remove the extra "#ifdef CONFIG_X86_64...". No functional change. Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: bhe@redhat.com Link: https://lkml.kernel.org/r/1504774161-7137-1-git-send-email-douly.fnst@cn.fujitsu.com arch/x86/kernel/apic/apic.c | 4 ---- 1 file changed, 4 deletions(-) commit b371ae0d4a194b178817b0edfb6a7395c7aec37a Author: Dou Liyang Date: Wed Sep 13 17:12:55 2017 +0800 x86/apic: Remove init_bsp_APIC() init_bsp_APIC() which works for the virtual wire mode is used in ISA irq initialization at boot time. With the new APIC interrupt delivery mode scheme, which initializes the APIC before the first interrupt is expected, init_bsp_APIC() is not longer required and can be removed. Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: yinghai@kernel.org Cc: bhe@redhat.com Link: https://lkml.kernel.org/r/1505293975-26005-13-git-send-email-douly.fnst@cn.fujitsu.com arch/x86/include/asm/apic.h | 1 - arch/x86/kernel/apic/apic.c | 49 --------------------------------------------- arch/x86/kernel/irqinit.c | 3 --- 3 files changed, 53 deletions(-) commit 935356cecda851d94381e1c6fea9dec443f908fe Author: Dou Liyang Date: Wed Sep 13 17:12:54 2017 +0800 x86/apic: Initialize interrupt mode after timer init A cold or warm boot through BIOS sets the APIC in default interrupt delivery mode. A dump-capture kernel will not go through a BIOS reset and leave the interrupt delivery mode in the state which was active on the crashed kernel, but the dump kernel startup code assumes default delivery mode which can result in interrupt delivery/handling to fail. To solve this problem, it's required to set up the final interrupt delivery mode as soon as possible. As IOAPIC setup needs the timer initialized for verifying the timer interrupt delivery mode, the earliest point is right after timer setup in late_time_init(). That results in the following init order: 1) Set up the legacy timer, if applicable on the platform 2) Set up APIC/IOAPIC which includes the verification of the legacy timer interrupt delivery. 3) TSC calibration 4) Local APIC timer setup Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: yinghai@kernel.org Cc: bhe@redhat.com Link: https://lkml.kernel.org/r/1505293975-26005-12-git-send-email-douly.fnst@cn.fujitsu.com arch/x86/kernel/apic/apic.c | 2 -- arch/x86/kernel/smpboot.c | 7 +++---- arch/x86/kernel/time.c | 5 +++++ 3 files changed, 8 insertions(+), 6 deletions(-) commit 34fba3e6b1e5d42c81fc00ede715e0cdd2ebfada Author: Dou Liyang Date: Wed Sep 13 17:12:52 2017 +0800 x86/init: Add intr_mode_init to x86_init_ops X86 and XEN initialize interrupt delivery mode in different way. To avoid conditionals, add a new x86_init_ops function which defaults to the standard function and can be overridden by the early XEN platform code. [ tglx: Folded the XEN part which was a separate patch to preserve bisectability ] Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: yinghai@kernel.org Cc: bhe@redhat.com Link: https://lkml.kernel.org/r/1505293975-26005-10-git-send-email-douly.fnst@cn.fujitsu.com arch/x86/include/asm/x86_init.h | 2 ++ arch/x86/kernel/apic/apic.c | 2 +- arch/x86/kernel/smpboot.c | 2 +- arch/x86/kernel/x86_init.c | 1 + arch/x86/xen/enlighten_pv.c | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) commit ca7c6076baed396737e31e33b87a637d70e9fc5f Author: Dou Liyang Date: Wed Sep 13 17:12:51 2017 +0800 x86/ioapic: Refactor the delay logic in timer_irq_works() timer_irq_works() is used to detects the timer IRQs. It calls mdelay(10) to delay ten ticks and check whether the timer IRQ work or not. mdelay() depends on the loops_per_jiffy which is set up in calibrate_delay(), but the delay calibration depends on a working timer interrupt, which causes a chicken and egg problem. The correct solution is to set up the interrupt mode and making sure that the timer interrupt is delivered correctly before invoking calibrate_delay(). That means that mdelay() cannot be used in timer_irq_works(). Provide helper functions to make a rough delay estimate which is good enough to prove that the timer interrupt is working. Either use TSC or a simple delay loop and assume that 4GHz is the maximum CPU frequency to base the delay calculation on. Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: yinghai@kernel.org Cc: bhe@redhat.com Link: https://lkml.kernel.org/r/1505293975-26005-9-git-send-email-douly.fnst@cn.fujitsu.com arch/x86/kernel/apic/io_apic.c | 45 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) commit 0c759131ae568f2e620485662104ab8c1e770c81 Author: Dou Liyang Date: Wed Sep 13 17:12:50 2017 +0800 x86/apic: Unify interrupt mode setup for UP system In UniProcessor kernel with UP_LATE_INIT=y, the interrupt delivery mode is initialized in up_late_init(). Use the new unified apic_intr_mode_init() function and remove APIC_init_uniprocessor(). Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: yinghai@kernel.org Cc: bhe@redhat.com Link: https://lkml.kernel.org/r/1505293975-26005-8-git-send-email-douly.fnst@cn.fujitsu.com arch/x86/include/asm/apic.h | 1 - arch/x86/kernel/apic/apic.c | 47 ++++++--------------------------------------- 2 files changed, 6 insertions(+), 42 deletions(-) commit 4f45ed9f848f0721967e2f79e5409b6538894a43 Author: Dou Liyang Date: Wed Sep 13 17:12:49 2017 +0800 x86/apic: Mark the apic_intr_mode extern for sanity check cleanup Calling native_smp_prepare_cpus() to prepare for SMP bootup, does some sanity checking, enables APIC mode and disables SMP feature. Now, APIC mode setup has been unified to apic_intr_mode_init(), some sanity checks are redundant and need to be cleanup. Mark the apic_intr_mode extern to refine the switch and remove the redundant sanity check. Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: yinghai@kernel.org Cc: bhe@redhat.com Link: https://lkml.kernel.org/r/1505293975-26005-7-git-send-email-douly.fnst@cn.fujitsu.com arch/x86/include/asm/apic.h | 9 +++++++ arch/x86/kernel/apic/apic.c | 16 +++++-------- arch/x86/kernel/smpboot.c | 57 +++++++-------------------------------------- 3 files changed, 24 insertions(+), 58 deletions(-) commit 3e730dad3b6da42d21c05007445ca1bfd219d7ce Author: Dou Liyang Date: Wed Sep 13 17:12:48 2017 +0800 x86/apic: Unify interrupt mode setup for SMP-capable system On a SMP-capable system, the kernel enables and sets up the APIC interrupt delivery mode in native_smp_prepare_cpus(). The decision how to setup the APIC is intermingled with the decision of setting up SMP or not. Split the initialization of the APIC interrupt mode independent from other decisions and have a separate apic_intr_mode_init() function for it. The invocation time stays the same for now. Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: yinghai@kernel.org Cc: bhe@redhat.com Link: https://lkml.kernel.org/r/1505293975-26005-6-git-send-email-douly.fnst@cn.fujitsu.com arch/x86/kernel/apic/apic.c | 38 +++++++++++++++++++++++++++++++++++--- arch/x86/kernel/smpboot.c | 14 ++------------ 2 files changed, 37 insertions(+), 15 deletions(-) commit 4b1244b45c16cef63fa3282e5bb1cc4fa1aef06a Author: Dou Liyang Date: Wed Sep 13 17:12:47 2017 +0800 x86/apic: Move logical APIC ID away from apic_bsp_setup() apic_bsp_setup() sets and returns logical APIC ID for initializing cpu0_logical_apicid in a SMP-capable system. The id has nothing to do with the initialization of local APIC and I/O APIC. And apic_bsp_setup() should be called for interrupt mode setup only. Move the id setup into a separate helper function for cleanup and mark apic_bsp_setup() void. Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: yinghai@kernel.org Cc: bhe@redhat.com Link: https://lkml.kernel.org/r/1505293975-26005-5-git-send-email-douly.fnst@cn.fujitsu.com arch/x86/include/asm/apic.h | 2 +- arch/x86/kernel/apic/apic.c | 10 +--------- arch/x86/kernel/smpboot.c | 12 +++++++++++- 3 files changed, 13 insertions(+), 11 deletions(-) commit a2510d156eae9cf85c928d428471e44edd82c5ca Author: Dou Liyang Date: Wed Sep 13 17:12:46 2017 +0800 x86/apic: Split local APIC timer setup from the APIC setup apic_bsp_setup() sets up the local APIC, I/O APIC and APIC timer. The local APIC and I/O APIC setup belongs to interrupt delivery mode setup. Setting up the local APIC timer for booting CPU is another job and has nothing to do with interrupt delivery mode setup. Split local APIC timer setup from the APIC setup, keep it in the original position for SMP and UP kernel for now. Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: yinghai@kernel.org Cc: bhe@redhat.com Link: https://lkml.kernel.org/r/1505293975-26005-4-git-send-email-douly.fnst@cn.fujitsu.com arch/x86/kernel/apic/apic.c | 4 ++-- arch/x86/kernel/smpboot.c | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit 4b1669e8d1e4e6cb65b3b114fced6ca9bc39ddea Author: Dou Liyang Date: Wed Sep 13 17:12:45 2017 +0800 x86/apic: Prepare for unifying the interrupt delivery modes setup There are three places which initialize the interrupt delivery modes: 1) init_bsp_APIC() which is called early might setup the through-local-APIC virtual wire mode on non SMP systems. 2) In an SMP-capable system, native_smp_prepare_cpus() tries to switch to symmetric I/O model. 3) In UP system with UP_LATE_INIT=y, the local APIC and I/O APIC are set up in smp_init(). There is no technical reason to make these initializations at random places and run the kernel with the potentially wrong mode through the early boot stage, but it has a problematic side effect: The late switch to symmetric I/O mode causes dump-capture kernel to hang when the kernel command line option 'notsc' is active. Provide a new function to unify that three positions. Preparatory patch to initialize an interrupt mode directly. Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: yinghai@kernel.org Cc: bhe@redhat.com Link: https://lkml.kernel.org/r/1505293975-26005-3-git-send-email-douly.fnst@cn.fujitsu.com arch/x86/include/asm/apic.h | 2 ++ arch/x86/kernel/apic/apic.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) commit 0114a8e87772c4172bf7fefa4c7a9a6bbc52d2ab Author: Dou Liyang Date: Wed Sep 13 17:12:44 2017 +0800 x86/apic: Construct a selector for the interrupt delivery mode There are quite some switches which are used to determine the final interrupt delivery mode, as shown below: 1) Kconfig: CONFIG_X86_64; CONFIG_X86_LOCAL_APIC; CONFIG_x86_IO_APIC 2) Command line options: disable_apic; skip_ioapic_setup 3) CPU Capability: boot_cpu_has(X86_FEATURE_APIC) 4) MP table: smp_found_config 5) ACPI: acpi_lapic; acpi_ioapic; nr_ioapic These switches are disordered and scattered and there are also some dependencies between them. These make the code difficult to maintain and read. Construct a selector to unify them into a single function, then, Use this selector to get an interrupt delivery mode directly. Signed-off-by: Dou Liyang Signed-off-by: Thomas Gleixner Cc: yinghai@kernel.org Cc: bhe@redhat.com Link: https://lkml.kernel.org/r/1505293975-26005-2-git-send-email-douly.fnst@cn.fujitsu.com arch/x86/kernel/apic/apic.c | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 3bc31a7f4d376083b972acdc1a580e05c3a6dc12 Author: Dhinakaran Pandiyan Date: Mon Sep 18 15:21:41 2017 -0700 drm/i915/dp: Remove useless debug about TPS3 support We already print training pattern used during link training and also print if the source or sink does not support TPS3 for HBR2 link rates, see intel_dp_training_pattern(). Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170918222141.4674-5-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_dp.c | 4 ---- 1 file changed, 4 deletions(-) commit e8b2577c5e312d175ed11a35a12346b19059277d Author: Pandiyan, Dhinakaran Date: Mon Sep 18 15:21:39 2017 -0700 drm/i915/dp: Fix buffer size for sink_irq_esi read The buffer size defined is 16 bytes whereas only 14 bytes are read. Add a macro to avoid this discrepancy. Signed-off-by: Dhinakaran Pandiyan Reviewed-by: James Ausmus Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170918222141.4674-3-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_dp.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 9b1c581885c985b84d36a9ffa519a9b2e68708e1 Author: Pandiyan, Dhinakaran Date: Mon Sep 18 15:21:38 2017 -0700 drm/i915/mst: Print active mst links after update Both mst_disable_dp and mst_post_disable_dp print number of active links before the variable has been updated. Move the print statement in mst_disable_dp after the decrement so that the printed values indicate the disabing of a mst connector. Also, add some text to clarify what we are printing. Signed-off-by: Dhinakaran Pandiyan Reviewed-by: James Ausmus Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170918222141.4674-2-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_dp_mst.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit dd59a9ba952752abecf4eb95287fb8c64fdb4499 Author: Pandiyan, Dhinakaran Date: Mon Sep 18 15:21:37 2017 -0700 drm/i915/mst: Debug log connector name in destroy_connector() Print connector name in destroy_connect() and this doesn't add any extra lines to dmesg. The debug macro has been moved before the unregister call so that we don't lose the connector name and id. Signed-off-by: Dhinakaran Pandiyan Reviewed-by: James Ausmus Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170918222141.4674-1-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/intel_dp_mst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 301375e764324b8048704eaf2c46fe1ee290830e Author: Toshi Kani Date: Wed Aug 23 16:54:47 2017 -0600 EDAC: Add owner check to the x86 platform drivers Change x86 EDAC platform drivers to verify the module owner at the beginning of their module init functions. This allows them to fail their init immediately when ghes_edac is enabled. Similar change can be made to other edac drivers if necessary. Also, remove ".c" from module names of pnp2_edac, sb_edac, and skx_edac. Signed-off-by: Toshi Kani Suggested-by: Borislav Petkov Cc: Mauro Carvalho Chehab Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20170823225447.15608-6-toshi.kani@hpe.com Signed-off-by: Borislav Petkov drivers/edac/amd64_edac.c | 5 +++++ drivers/edac/pnd2_edac.c | 9 ++++++++- drivers/edac/sb_edac.c | 9 +++++++-- drivers/edac/skx_edac.c | 9 ++++++++- 4 files changed, 28 insertions(+), 4 deletions(-) commit 069f0e0c06b7dda71185bd27b3787868cf353f44 Merge: 821797e a6786847 Author: Greg Kroah-Hartman Date: Mon Sep 25 12:56:37 2017 +0200 Merge tag 'iio-for-4.15a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Round one of new device support, features and cleanup for IIO in the 4.15 cycle. Note there is a misc driver drop in here given we have support in IIO and the feeling is no one will care. A large part of this series is a boiler plate removal series avoiding the need to explicitly provide THIS_MODULE in various locations. It's very dull but touches all drivers. New device support * ad5446 - add ids to support compatible parts DAC081S101, DAC101S101, DAC121S101. - add the dac7512 id and drop the misc driver as feeling is no one is using it (was introduced for a board that is long obsolete) * mt6577 - add bindings for mt2712 which is fully compatible with other supported parts. * st_pressure - add support for LPS33HW and LPS35HW with bindings (ids mostly). New features * ccs811 - Add support for the data ready trigger. * mma8452 - remove artifical restriction on supporting multiple event types at the same time. * tcs3472 - support out of threshold events Core and tree wide cleanup * Use macro magic to remove the need to provide THIS_MODULE as part of struct iio_info or struct iio_trigger_ops. This is similar to work done in a number of other subsystems (e.g. i2c, spi). All drivers are fixed and then the fields in these structures are removed. This will cause build failures for out of tree drivers and any new drivers that cross with this work going into the kernel. Note mostly done with a coccinelle patch, included in the series on the mailing list but not merged as the fields no longer exist in the structures so the any hold outs will cause a build failure. Cleanups * ads1015 - avoid writing config register when it doesn't change. - add 10% to conversion wait time as it seems it is sometimes a little small. * ade7753 - replace use of core mlock with a local lock. This is part of a long term effort to make the use of mlock opaque and single purpose. * ade7759 - expand the use of buf_lock to cover previous mlock cases. This is a slightly nicer solution to the same issue as in ade7753. * cros_ec - drop an unused variable * inv_mpu6050 - add a missing break in a switch for consistency - not actual bug, - make some local arrays static to save on object code size. * max5481 - drop manual setting of the spi module owner as handled by the spi core. * max5487 - drop manual setting of the spi module owner as handled by the spi core. * max9611 - drop explicit setting of the i2c module owner as handled by the i2c core. * mcp320x - speed up reads on single channel devices, - drop unused of_device_id data elements, - document the struct mcp320x, - improve binding docs to reflect restrictions on spi setup and to make it explicit that the reference regulator is needed. * mma8452 - symbolic to octal permissions, - unsigned to unsigned int. * st_lsm6dsx - avoid setting odr values multiple times, - drop config of LIR as it is only ever set to the existing defaults, - drop rounding configuration as it only ever matches the defaults. * ti-ads8688 - drop manual setting of the spi module owner as handled by the spi core. * tsl2x7x - constify the i2c_device_id, - cleanup limit checks to avoid static checker warnings (and generally have nicer code). commit 3877c7d1e24c05eeb1c57ade04d2527d511f25a1 Author: Toshi Kani Date: Wed Aug 23 16:54:46 2017 -0600 EDAC: Add helper which returns the loaded platform driver Only a single EDAC platform driver can be loaded. When ghes_edac is enabled, an EDAC platform driver still attempts to register itself and fails in edac_mc_add_mc(). Add edac_get_owner() so that EDAC platform drivers can check the owner first. Signed-off-by: Toshi Kani Suggested-by: Borislav Petkov Cc: Mauro Carvalho Chehab Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20170823225447.15608-5-toshi.kani@hpe.com [ Massage commit message. ] Signed-off-by: Borislav Petkov drivers/edac/edac_mc.c | 7 ++++++- drivers/edac/edac_mc.h | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) commit 5deed6b6a479ad5851d7ead6412dc6faa84a694e Author: Toshi Kani Date: Wed Aug 23 16:54:45 2017 -0600 EDAC, ghes: Add platform check The ghes_edac driver was introduced in 2013 [1], but it has not been enabled by any distro yet. This driver obtains error info from firmware interfaces (APEI), which are not properly implemented on many platforms, as the driver says on load: This EDAC driver relies on BIOS to enumerate memory and get error reports. Unfortunately, not all BIOSes reflect the memory layout correctly. So, the end result of using this driver varies from vendor to vendor. If you find incorrect reports, please contact your hardware vendor to correct its BIOS. To get out from this situation, add a platform check to selectively enable the driver on platforms that are known to have proper APEI firmware implementation. "ghes_edac.force_load=1" skips this platform check. [1]: https://lkml.kernel.org/r/cover.1360931635.git.mchehab@redhat.com Signed-off-by: Toshi Kani Cc: Mauro Carvalho Chehab Cc: Tony Luck Cc: linux-acpi@vger.kernel.org Cc: linux-edac Link: http://lkml.kernel.org/r/20170823225447.15608-4-toshi.kani@hpe.com Signed-off-by: Borislav Petkov drivers/edac/ghes_edac.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) commit 0fe5f281f749f1d4e462a282ef8ba76407a11fd1 Author: Borislav Petkov Date: Wed Aug 16 10:33:44 2017 +0200 EDAC, ghes: Model a single, logical memory controller We're enumerating the DIMMs through a DMI walk and since we can't get any more detailed topological information about which DIMMs belong to which memory controller, convert it to a single, logical controller which contains all the DIMMs. The error reporting path from GHES ghes_edac_report_mem_error() doesn't get called in NMI context but add a warning about it to catch any changes in the future as if so, our locking scheme will be insufficient then. Signed-off-by: Borislav Petkov drivers/edac/ghes_edac.c | 116 +++++++++++++++++++++-------------------------- 1 file changed, 51 insertions(+), 65 deletions(-) commit c9c8b4d6d0259ac914309f8fbcef022792c99a89 Author: Borislav Petkov Date: Wed Aug 16 19:41:52 2017 +0200 EDAC, ghes: Remove symbol exports They're called from builtin code so no need for the exports. Signed-off-by: Borislav Petkov drivers/edac/ghes_edac.c | 3 --- 1 file changed, 3 deletions(-) commit b8aa223341a9bfc68285c47474f5150225504584 Author: Chris Wilson Date: Thu Sep 21 14:54:44 2017 +0100 drm/i915/lrc: Skip no-op per-bb buffer on gen9 Since we inherited the context image setup from gen8 which needed a per-bb workaround (for GPGPU), we are submitting an empty per-bb buffer on gen9. Now that we can skip adding the buffer to the context image, remove the dangling per-bb. This slightly improves execution latency, most notably on an idle engine. References: https://bugs.freedesktop.org/show_bug.cgi?id=87725 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20170921135444.27330-2-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_lrc.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit 604a8f6f1e33ed53529a117baec92d28e746a601 Author: Chris Wilson Date: Thu Sep 21 14:54:43 2017 +0100 drm/i915/lrc: Only enable per-context and per-bb buffers if set The per-context and per-batch workaround buffers are optional, yet we tell the GPU to execute them even if they contain no instructions. Doing so incurs the dispatch latency, which we can avoid if we don't ask the GPU to execute the no-op buffers. Allow ourselves to skip setup of empty buffer, and then to only enable non-empty buffers in the context image. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20170921135444.27330-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/intel_lrc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 76e70087d360fdbe97f24c205d585ada04126e5f Author: Mika Kuoppala Date: Fri Sep 22 15:43:07 2017 +0300 drm/i915: Make execlist port count variable As we emulate execlists on top of the GuC workqueue, it is not restricted to just 2 ports and we can increase that number arbitrarily to trade-off queue depth (i.e. scheduling latency) against pipeline bubbles. v2: rebase. better commit msg (Chris) v3: rebase Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170922124307.10914-5-mika.kuoppala@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++----- drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_gpu_error.c | 17 ++++++++++++----- drivers/gpu/drm/i915/i915_guc_submission.c | 8 ++++++-- drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++++ drivers/gpu/drm/i915/intel_lrc.c | 6 ++++-- drivers/gpu/drm/i915/intel_ringbuffer.h | 21 +++++++++++++++++---- 7 files changed, 50 insertions(+), 19 deletions(-) commit 7a62cc6107f31e119a0df6f79fa9fae566b1a22e Author: Mika Kuoppala Date: Fri Sep 22 15:43:06 2017 +0300 drm/i915: Add execlist_port_complete When first execlist entry is processed, we move the port (contents). Introduce function for this as execlist and guc use this common operation. v2: rebase. s/GEM_DEBUG_BUG/GEM_BUG (Chris) v3: rebase Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170922124307.10914-4-mika.kuoppala@intel.com drivers/gpu/drm/i915/i915_guc_submission.c | 8 ++++---- drivers/gpu/drm/i915/intel_lrc.c | 22 +++++++++++----------- drivers/gpu/drm/i915/intel_ringbuffer.h | 14 +++++++++++++- 3 files changed, 28 insertions(+), 16 deletions(-) commit cf4591d1ce1c85d589a3e8e7e5a0bbc7aa9b0027 Author: Mika Kuoppala Date: Fri Sep 22 15:43:05 2017 +0300 drm/i915: Wrap port cancellation into a function On reset and wedged path, we want to release the requests that are tied to ports and then mark the ports to be unset. Introduce a function for this. v2: rebase v3: drop local, keep GEM_BUG_ON (Michał, Chris) v4: rebase Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Michał Winiarski Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170922124307.10914-3-mika.kuoppala@intel.com drivers/gpu/drm/i915/intel_lrc.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 19df9a5782f51c900a730dae11e4abf85a0e5ebc Author: Mika Kuoppala Date: Fri Sep 22 15:43:04 2017 +0300 drm/i915: Move execlist initialization into intel_engine_cs.c Move execlist init into a common engine setup. As it is common to both guc and hw execlists. v2: rebase with csb changes v3: rebase Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170922124307.10914-2-mika.kuoppala@intel.com drivers/gpu/drm/i915/intel_engine_cs.c | 30 ++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/intel_lrc.c | 19 ------------------- 2 files changed, 28 insertions(+), 21 deletions(-) commit b620e870218ebe75b8221c7596b46e36d8329c85 Author: Mika Kuoppala Date: Fri Sep 22 15:43:03 2017 +0300 drm/i915: Make own struct for execlist items Engine's execlist related items have been increasing to a point where a separate struct is warranted. Carve execlist specific items to a dedicated struct to add clarity. v2: add kerneldoc and fix whitespace (Joonas, Chris) v3: csb_mmio changes, rebase v4: s/\b(el|execlist)\b/execlists/ (Joonas) Suggested-by: Chris Wilson Cc: Chris Wilson Cc: Joonas Lahtinen Signed-off-by: Mika Kuoppala Acked-by: Joonas Lahtinen Reviewed-by: Michał Winiarski (v3) Reviewed-by: Chris Wilson (v3) Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170922124307.10914-1-mika.kuoppala@intel.com drivers/gpu/drm/i915/i915_debugfs.c | 8 +-- drivers/gpu/drm/i915/i915_gem.c | 6 +- drivers/gpu/drm/i915/i915_gpu_error.c | 4 +- drivers/gpu/drm/i915/i915_guc_submission.c | 31 +++++---- drivers/gpu/drm/i915/i915_irq.c | 5 +- drivers/gpu/drm/i915/intel_engine_cs.c | 12 ++-- drivers/gpu/drm/i915/intel_lrc.c | 100 +++++++++++++++-------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 100 +++++++++++++++++++++++------ 8 files changed, 167 insertions(+), 99 deletions(-) commit 96cbe3d638e4287db6482b6223367d3e6cf5871e Author: Colin Ian King Date: Fri Sep 22 16:39:02 2017 +0100 b43: make const arrays static, reduces object code size Don't populate const arrays on the stack, instead make them static. Makes the object code smaller by over 60 bytes: Before: text data bss dec hex filename 14816 1296 0 16112 3ef0 b43/phy_ht.o After: text data bss dec hex filename 14551 1496 0 16047 3eaf b43/phy_ht.o (gcc 6.3.0, x86-64) Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/b43/phy_ht.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9b029e178ea174acd96a5ddf97b04c70f4e57885 Author: Colin Ian King Date: Thu Sep 21 23:56:30 2017 +0100 iwlegacy: make const array static to shink object code size Don't populate const array ac_to_fifo on the stack in an inlined function, instead make it static. Makes the object code smaller by over 800 bytes: text data bss dec hex filename 159029 33154 1216 193399 2f377 4965-mac.o text data bss dec hex filename 158122 33250 1216 192588 2f04c 4965-mac.o (gcc version 7.2.0 x86_64) Signed-off-by: Colin Ian King Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo drivers/net/wireless/intel/iwlegacy/4965-mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 115af851234fc2690753f71685a0007fa4c7f973 Author: Igor Mitsyanko Date: Thu Sep 21 14:34:37 2017 -0700 qtnfmac: do not report channel changes until wiphy is registered Wireless device may send "channel changed" event before driver registered this device with wireless core, which will result in warnings. Once device is registered, higher layer will query channel info manually using .get_channel callback. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/event.c | 3 +++ 1 file changed, 3 insertions(+) commit 6bfe61d697cb24b0838227c40bff8603addae652 Author: Igor Mitsyanko Date: Thu Sep 21 14:34:36 2017 -0700 qtnfmac: remove unused mac::status field There are no users of this field and it can safely be removed. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/commands.c | 1 - drivers/net/wireless/quantenna/qtnfmac/core.h | 5 ----- drivers/net/wireless/quantenna/qtnfmac/event.c | 2 -- 3 files changed, 8 deletions(-) commit 97397633108a34ec5f5f316ffd1d3709e1c0479d Author: Igor Mitsyanko Date: Thu Sep 21 14:34:35 2017 -0700 qtnfmac: do not cache CSA chandef info It is never used for anything useful, and all logic is handled by either WiFi card or higher layers. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 12 ------------ drivers/net/wireless/quantenna/qtnfmac/commands.c | 2 -- drivers/net/wireless/quantenna/qtnfmac/core.h | 1 - drivers/net/wireless/quantenna/qtnfmac/event.c | 8 +------- 4 files changed, 1 insertion(+), 22 deletions(-) commit 8c015b9067d608e59a1486b8618eac9e0bd2952f Author: Igor Mitsyanko Date: Thu Sep 21 14:34:34 2017 -0700 qtnfmac: pass VIF info to SendChannel command Do not assume whether wireless device can or can not handle switching several interfaces on a single radio to different channels. Device will handle it itself and will return appropriate error code. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 2 +- drivers/net/wireless/quantenna/qtnfmac/commands.c | 5 +++-- drivers/net/wireless/quantenna/qtnfmac/commands.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) commit 3656ab0fef5b29e95d251e3f0a0bfb7da311337a Author: Igor Mitsyanko Date: Thu Sep 21 14:34:33 2017 -0700 qtnfmac: let wifi card handle channel switch request to the same chan No reason to verify channel switch request in driver, it can simply be forwarded to wireless device. Device can perform required checks and return appropriate error code, and driver may not even have information on current operational channel. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 5 ----- 1 file changed, 5 deletions(-) commit 96d4eaf20fb8d34a475c4086de3ed9bd483993d6 Author: Igor Mitsyanko Date: Thu Sep 21 14:34:32 2017 -0700 qtnfmac: do not cache channel info from "connect" command This makes no sense because real operational channel is choosen based on AP operation, not on what STA is configured to. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 15 +-------------- drivers/net/wireless/quantenna/qtnfmac/commands.c | 6 ++++-- 2 files changed, 5 insertions(+), 16 deletions(-) commit 9e5478b608b5853dc877ea9c80be24349bcb453f Author: Igor Mitsyanko Date: Thu Sep 21 14:34:31 2017 -0700 qtnfmac: retrieve current channel info from EP Do not try to cache current operational channel info in driver, this is a potential source of synchronization issues + driver does not really need that info. Introduce GET_CHANNEL command and process it appropriately. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 35 +++++++++------------ drivers/net/wireless/quantenna/qtnfmac/commands.c | 38 +++++++++++++++++++++++ drivers/net/wireless/quantenna/qtnfmac/commands.h | 1 + drivers/net/wireless/quantenna/qtnfmac/qlink.h | 11 +++++++ 4 files changed, 64 insertions(+), 21 deletions(-) commit fac7f9bf14814fd2c722eaeec18ca78be2177d84 Author: Igor Mitsyanko Date: Thu Sep 21 14:34:30 2017 -0700 qtnfmac: make "Channel change" event report full channel info Specifically, it has to report center frequency, secondary center frequency (for 80+80) and BW. Introduce channel definition structure to qlink and modify channel change event processing function accordingly. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/event.c | 29 ++++++------ drivers/net/wireless/quantenna/qtnfmac/qlink.h | 18 +++++++- .../net/wireless/quantenna/qtnfmac/qlink_util.c | 52 ++++++++++++++++++++++ .../net/wireless/quantenna/qtnfmac/qlink_util.h | 4 ++ 4 files changed, 85 insertions(+), 18 deletions(-) commit 77d68147745b98c25c9400f3880906333845f230 Author: Igor Mitsyanko Date: Thu Sep 21 14:34:29 2017 -0700 qtnfmac: convert channel width from bitfiled to simple enum This will allow to use qlink channel width values to specify BW setting corresponding to enum nl80211_chan_width. Current user is converted to apply BIT() macro manually to each individual qlink_channel_width enumeration value. Signed-off-by: Igor Mitsyanko Signed-off-by: Kalle Valo drivers/net/wireless/quantenna/qtnfmac/qlink.h | 16 ++++++++-------- drivers/net/wireless/quantenna/qtnfmac/qlink_util.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) commit 20db073327365f41e9b14feacb450df06758b520 Author: Karun Eagalapati Date: Thu Sep 21 18:21:28 2017 +0530 rsi: sdio suspend and resume support SDIO suspend and resume handlers are implemented and verified that device works after suspend/resume cycle. Signed-off-by: Karun Eagalapati Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_sdio.c | 128 +++++++++++++++++++++++++++++++- drivers/net/wireless/rsi/rsi_sdio.h | 2 + 2 files changed, 126 insertions(+), 4 deletions(-) commit 192524a4992a8e638a05147f02d6e42cb2d485e1 Author: Pavani Muthyala Date: Thu Sep 21 18:20:34 2017 +0530 rsi: add version information We will dump information about firmware version, firmware file name and operating mode during initialization. Signed-off-by: Pavani Muthyala Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_debugfs.c | 19 ++++++------------- drivers/net/wireless/rsi/rsi_91x_hal.c | 13 +++++++++++++ drivers/net/wireless/rsi/rsi_91x_main.c | 25 +++++++++++++++++++++++++ drivers/net/wireless/rsi/rsi_hal.h | 3 +++ drivers/net/wireless/rsi/rsi_main.h | 14 ++++++++++---- 5 files changed, 57 insertions(+), 17 deletions(-) commit 7dfb0ebd022b15dcafd513ae9270599799764e50 Author: Colin Ian King Date: Tue Sep 19 22:05:00 2017 +0100 mwifiex: make const array tos_to_ac static, reduces object code size Don't populate the read-only const array tos_to_ac on the stack, instead make it static. Makes the object code smaller by 250 bytes: Before: text data bss dec hex filename 26104 2720 128 28952 7118 wmm.o After: text data bss dec hex filename 25758 2816 128 28702 701e wmm.o Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/wmm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e0a576d7478230aaf51c479db57a2c5ce68e2575 Author: Adam Borowski Date: Fri Sep 8 12:30:00 2017 +0200 rtl8xxxu: Don't printk raw binary if serial number is not burned in. I assume that a blank efuse comes with all ones, thus I did not bother recognizing other possible junk values. This matches 100% of dongles I've seen (a single Gembird 8192eu). Signed-off-by: Adam Borowski Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d5633bb2c62a95be5f049ee1e7b9ae0869a93c41 Author: Colin Ian King Date: Fri Sep 22 15:03:16 2017 +0100 brcmsmac: make const array ucode_ofdm_rates static, reduces object code size Don't populate const array ucode_ofdm_rates on the stack, instead make it static. Makes the object code smaller by 100 bytes: Before: text data bss dec hex filename 39482 564 0 40046 9c6e phy_cmn.o After text data bss dec hex filename 39326 620 0 39946 9c0a phy_cmn.o (gcc 6.3.0, x86-64) Signed-off-by: Colin Ian King Acked-by: Arend van Spriel Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30ac407639390fab45b003003619e430c6f9f728 Author: Allen Pais Date: Thu Sep 21 18:13:06 2017 +0530 brcmfmac: use setup_timer() helper Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit d27ffc1d00327c29b3aa97f941b42f0949f9e99f Author: Jani Nikula Date: Thu Sep 21 17:19:20 2017 +0300 drm/i915/bios: ignore HDMI on port A The hardware state readout oopses after several warnings when trying to use HDMI on port A, if such a combination is configured in VBT. Filter the combo out already at the VBT parsing phase. v2: also ignore DVI (Ville) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102889 Cc: stable@vger.kernel.org Cc: Imre Deak Reviewed-by: Ville Syrjälä Tested-by: Daniel Drake Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170921141920.18172-1-jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 7 +++++++ 1 file changed, 7 insertions(+) commit fd52bdae9ab06b4f444b77d833f403ad07b9e72e Author: Loic Poulain Date: Tue Sep 19 14:33:23 2017 +0200 wcn36xx: Disable 5GHz for wcn3620 wcn3620 can only operate on 2.4GHz band due to RF limitation. If wcn36xx digital block is associated with an external IRIS RF module, retrieve the id and disable 5GHz band in case of wcn3620 id. Signed-off-by: Loic Poulain Signed-off-by: Kalle Valo drivers/net/wireless/ath/wcn36xx/main.c | 12 +++++++++++- drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 6 ++++++ 2 files changed, 17 insertions(+), 1 deletion(-) commit bb58b29899ff9c6d1e97727ec05b500e832ebd7d Author: Sergei Shtylyov Date: Sat Sep 23 00:36:25 2017 +0300 arm64: defconfig: enable R8A77970 SoC Enable the Renesas R-Car V3M (R8A77970) SoC in the ARM64 defconfig. Suggested-by: Simon Horman Signed-off-by: Sergei Shtylyov Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit ba24d63dd3748bae134365e3bcfd9c13b4e3c3e4 Author: Ville Syrjälä Date: Mon Sep 18 22:59:19 2017 +0300 ath9k: Avoid a potential deadlock Lockdep warns us that sc_pm_lock and cc_lock can cause a deadlock when cc_lock is acquired by itself with interrupts enabled. Disable irqs whenever taking cc_lock to avoid this. [ 19.094524] kworker/u2:0/5 just changed the state of lock: [ 19.094578] (&(&sc->sc_pm_lock)->rlock){-.-...}, at: [] ath_isr+0x15e/0x200 [ath9k] [ 19.094674] but this lock took another, HARDIRQ-unsafe lock in the past: [ 19.094731] (&(&common->cc_lock)->rlock){+.-...} [ 19.094741] and interrupts could create inverse lock ordering between them. [ 19.094866] other info that might help us debug this: [ 19.094926] Possible interrupt unsafe locking scenario: [ 19.094985] CPU0 CPU1 [ 19.095036] ---- ---- [ 19.095086] lock(&(&common->cc_lock)->rlock); [ 19.095197] local_irq_disable(); [ 19.095305] lock(&(&sc->sc_pm_lock)->rlock); [ 19.095423] lock(&(&common->cc_lock)->rlock); [ 19.095539] [ 19.095636] lock(&(&sc->sc_pm_lock)->rlock); [ 19.095745] *** DEADLOCK *** [ 19.095965] 3 locks held by kworker/u2:0/5: [ 19.096067] #0: ("%s"wiphy_name(local->hw.wiphy)){.+.+.+}, at: [] process_one_work+0x127/0x580 [ 19.096260] #1: ((&local->dynamic_ps_enable_work)){+.+...}, at: [] process_one_work+0x127/0x580 [ 19.096447] #2: (&sc->mutex){+.+...}, at: [] ath9k_config+0x30/0x1d0 [ath9k] [ 19.096639] the shortest dependencies between 2nd lock and 1st lock: [ 19.096813] -> (&(&common->cc_lock)->rlock){+.-...} ops: 38 { [ 19.096816] HARDIRQ-ON-W at: [ 19.096816] __lock_acquire+0x57e/0x1260 [ 19.096816] lock_acquire+0xb1/0x1c0 [ 19.096816] _raw_spin_lock_bh+0x3f/0x50 [ 19.096816] ath_chanctx_set_channel+0xb6/0x2c0 [ath9k] [ 19.096816] ath9k_config+0xa8/0x1d0 [ath9k] [ 19.096816] ieee80211_hw_config+0xa8/0x5f0 [mac80211] [ 19.096816] ieee80211_do_open+0x67a/0x920 [mac80211] [ 19.096816] ieee80211_open+0x41/0x50 [mac80211] [ 19.096816] __dev_open+0xab/0x140 [ 19.096816] __dev_change_flags+0x89/0x150 [ 19.096816] dev_change_flags+0x28/0x60 [ 19.096816] do_setlink+0x290/0x890 [ 19.096816] rtnl_newlink+0x7cf/0x8e0 [ 19.096816] rtnetlink_rcv_msg+0xbf/0x1f0 [ 19.096816] netlink_rcv_skb+0xb9/0xe0 [ 19.096816] rtnetlink_rcv+0x1e/0x30 [ 19.096816] netlink_unicast+0x13a/0x2c0 [ 19.096816] netlink_sendmsg+0x290/0x380 [ 19.096816] ___sys_sendmsg+0x1e2/0x280 [ 19.096816] __sys_sendmsg+0x3f/0x80 [ 19.096816] SyS_socketcall+0x58c/0x6b0 [ 19.096816] do_fast_syscall_32+0x96/0x1d0 [ 19.096816] entry_SYSENTER_32+0x4c/0x7b [ 19.096816] IN-SOFTIRQ-W at: [ 19.096816] __lock_acquire+0x55a/0x1260 [ 19.096816] lock_acquire+0xb1/0x1c0 [ 19.096816] _raw_spin_lock+0x3c/0x50 [ 19.096816] ath_ps_full_sleep+0x24/0x70 [ath9k] [ 19.096816] call_timer_fn+0xa4/0x300 [ 19.096816] run_timer_softirq+0x1b1/0x560 [ 19.096816] __do_softirq+0xb0/0x430 [ 19.096816] do_softirq_own_stack+0x33/0x40 [ 19.096816] irq_exit+0xad/0xc0 [ 19.096816] smp_apic_timer_interrupt+0x31/0x40 [ 19.096816] apic_timer_interrupt+0x37/0x3c [ 19.096816] wp_page_copy+0xb8/0x580 [ 19.096816] do_wp_page+0x64/0x420 [ 19.096816] handle_mm_fault+0x430/0x990 [ 19.096816] __do_page_fault+0x18b/0x430 [ 19.096816] do_page_fault+0xb/0x10 [ 19.096816] common_exception+0x62/0x6a [ 19.096816] INITIAL USE at: [ 19.096816] __lock_acquire+0x204/0x1260 [ 19.096816] lock_acquire+0xb1/0x1c0 [ 19.096816] _raw_spin_lock_bh+0x3f/0x50 [ 19.096816] ath_chanctx_set_channel+0xb6/0x2c0 [ath9k] [ 19.096816] ath9k_config+0xa8/0x1d0 [ath9k] [ 19.096816] ieee80211_hw_config+0xa8/0x5f0 [mac80211] [ 19.096816] ieee80211_do_open+0x67a/0x920 [mac80211] [ 19.096816] ieee80211_open+0x41/0x50 [mac80211] [ 19.096816] __dev_open+0xab/0x140 [ 19.096816] __dev_change_flags+0x89/0x150 [ 19.096816] dev_change_flags+0x28/0x60 [ 19.096816] do_setlink+0x290/0x890 [ 19.096816] rtnl_newlink+0x7cf/0x8e0 [ 19.096816] rtnetlink_rcv_msg+0xbf/0x1f0 [ 19.096816] netlink_rcv_skb+0xb9/0xe0 [ 19.096816] rtnetlink_rcv+0x1e/0x30 [ 19.096816] netlink_unicast+0x13a/0x2c0 [ 19.096816] netlink_sendmsg+0x290/0x380 [ 19.096816] ___sys_sendmsg+0x1e2/0x280 [ 19.096816] __sys_sendmsg+0x3f/0x80 [ 19.096816] SyS_socketcall+0x58c/0x6b0 [ 19.096816] do_fast_syscall_32+0x96/0x1d0 [ 19.096816] entry_SYSENTER_32+0x4c/0x7b [ 19.096816] } [ 19.096816] ... key at: [] __key.61991+0x0/0xffffc96c [ath9k] [ 19.096816] ... acquired at: [ 19.096816] lock_acquire+0xb1/0x1c0 [ 19.096816] _raw_spin_lock+0x3c/0x50 [ 19.096816] ath9k_ps_wakeup+0x85/0xe0 [ath9k] [ 19.096816] ath9k_bss_info_changed+0x2a/0x1b0 [ath9k] [ 19.096816] ieee80211_bss_info_change_notify+0xf3/0x360 [mac80211] [ 19.096816] ieee80211_recalc_txpower+0x33/0x40 [mac80211] [ 19.096816] ieee80211_set_tx_power+0x45/0x1d0 [mac80211] [ 19.096816] cfg80211_wext_siwtxpower+0xd3/0x350 [cfg80211] [ 19.096816] ioctl_standard_call+0x4e/0x400 [ 19.096816] wext_handle_ioctl+0xf4/0x190 [ 19.096816] dev_ioctl+0xb7/0x630 [ 19.096816] sock_ioctl+0x13e/0x2d0 [ 19.096816] do_vfs_ioctl+0x84/0x750 [ 19.096816] SyS_ioctl+0x34/0x60 [ 19.096816] do_fast_syscall_32+0x96/0x1d0 [ 19.096816] entry_SYSENTER_32+0x4c/0x7b [ 19.096816] -> (&(&sc->sc_pm_lock)->rlock){-.-...} ops: 597 { [ 19.096816] IN-HARDIRQ-W at: [ 19.096816] __lock_acquire+0x6ae/0x1260 [ 19.096816] lock_acquire+0xb1/0x1c0 [ 19.096816] _raw_spin_lock_irqsave+0x45/0x60 [ 19.096816] ath_isr+0x15e/0x200 [ath9k] [ 19.096816] __handle_irq_event_percpu+0x44/0x340 [ 19.096816] handle_irq_event_percpu+0x1d/0x50 [ 19.096816] handle_irq_event+0x32/0x60 [ 19.096816] handle_level_irq+0x81/0x100 [ 19.096816] handle_irq+0x9c/0xd0 [ 19.096816] do_IRQ+0x5c/0x120 [ 19.096816] common_interrupt+0x36/0x3c [ 19.096816] _raw_spin_unlock_irqrestore+0x57/0x70 [ 19.096816] ath9k_config+0x16a/0x1d0 [ath9k] [ 19.096816] ieee80211_hw_config+0xa8/0x5f0 [mac80211] [ 19.096816] ieee80211_dynamic_ps_enable_work+0x1c3/0x680 [mac80211] [ 19.096816] process_one_work+0x1d1/0x580 [ 19.096816] worker_thread+0x31/0x380 [ 19.096816] kthread+0xd9/0x110 [ 19.096816] ret_from_fork+0x19/0x24 [ 19.096816] IN-SOFTIRQ-W at: [ 19.096816] __lock_acquire+0x55a/0x1260 [ 19.096816] lock_acquire+0xb1/0x1c0 [ 19.096816] _raw_spin_lock_irqsave+0x45/0x60 [ 19.096816] ath9k_ps_wakeup+0x24/0xe0 [ath9k] [ 19.096816] ath9k_tasklet+0x42/0x260 [ath9k] [ 19.096816] tasklet_action+0x196/0x1e0 [ 19.096816] __do_softirq+0xb0/0x430 [ 19.096816] do_softirq_own_stack+0x33/0x40 [ 19.096816] irq_exit+0xad/0xc0 [ 19.096816] do_IRQ+0x65/0x120 [ 19.096816] common_interrupt+0x36/0x3c [ 19.096816] get_page_from_freelist+0x20a/0x970 [ 19.096816] __alloc_pages_nodemask+0xca/0xed0 [ 19.096816] __get_free_pages+0x14/0x30 [ 19.096816] pgd_alloc+0x1d/0x160 [ 19.096816] mm_init.isra.47+0x13a/0x1b0 [ 19.096816] copy_process.part.54+0xb55/0x1700 [ 19.096816] _do_fork+0xd4/0x6a0 [ 19.096816] SyS_clone+0x27/0x30 [ 19.096816] do_fast_syscall_32+0x96/0x1d0 [ 19.096816] entry_SYSENTER_32+0x4c/0x7b [ 19.096816] INITIAL USE at: [ 19.096816] __lock_acquire+0x204/0x1260 [ 19.096816] lock_acquire+0xb1/0x1c0 [ 19.096816] _raw_spin_lock_irqsave+0x45/0x60 [ 19.096816] ath9k_ps_wakeup+0x24/0xe0 [ath9k] [ 19.096816] ath9k_start+0x29/0x1f0 [ath9k] [ 19.096816] drv_start+0x71/0x270 [mac80211] [ 19.096816] ieee80211_do_open+0x31f/0x920 [mac80211] [ 19.096816] ieee80211_open+0x41/0x50 [mac80211] [ 19.096816] __dev_open+0xab/0x140 [ 19.096816] __dev_change_flags+0x89/0x150 [ 19.096816] dev_change_flags+0x28/0x60 [ 19.096816] do_setlink+0x290/0x890 [ 19.096816] rtnl_newlink+0x7cf/0x8e0 [ 19.096816] rtnetlink_rcv_msg+0xbf/0x1f0 [ 19.096816] netlink_rcv_skb+0xb9/0xe0 [ 19.096816] rtnetlink_rcv+0x1e/0x30 [ 19.096816] netlink_unicast+0x13a/0x2c0 [ 19.096816] netlink_sendmsg+0x290/0x380 [ 19.096816] ___sys_sendmsg+0x1e2/0x280 [ 19.096816] __sys_sendmsg+0x3f/0x80 [ 19.096816] SyS_socketcall+0x58c/0x6b0 [ 19.096816] do_fast_syscall_32+0x96/0x1d0 [ 19.096816] entry_SYSENTER_32+0x4c/0x7b [ 19.096816] } [ 19.096816] ... key at: [] __key.61994+0x0/0xffffc984 [ath9k] [ 19.096816] ... acquired at: [ 19.096816] check_usage_forwards+0x118/0x120 [ 19.096816] mark_lock+0x2e4/0x590 [ 19.096816] __lock_acquire+0x6ae/0x1260 [ 19.096816] lock_acquire+0xb1/0x1c0 [ 19.096816] _raw_spin_lock_irqsave+0x45/0x60 [ 19.096816] ath_isr+0x15e/0x200 [ath9k] [ 19.096816] __handle_irq_event_percpu+0x44/0x340 [ 19.096816] handle_irq_event_percpu+0x1d/0x50 [ 19.096816] handle_irq_event+0x32/0x60 [ 19.096816] handle_level_irq+0x81/0x100 [ 19.096816] handle_irq+0x9c/0xd0 [ 19.096816] do_IRQ+0x5c/0x120 [ 19.096816] common_interrupt+0x36/0x3c [ 19.096816] _raw_spin_unlock_irqrestore+0x57/0x70 [ 19.096816] ath9k_config+0x16a/0x1d0 [ath9k] [ 19.096816] ieee80211_hw_config+0xa8/0x5f0 [mac80211] [ 19.096816] ieee80211_dynamic_ps_enable_work+0x1c3/0x680 [mac80211] [ 19.096816] process_one_work+0x1d1/0x580 [ 19.096816] worker_thread+0x31/0x380 [ 19.096816] kthread+0xd9/0x110 [ 19.096816] ret_from_fork+0x19/0x24 [ 19.096816] stack backtrace: [ 19.096816] CPU: 0 PID: 5 Comm: kworker/u2:0 Not tainted 4.13.0-mgm-ovl+ #51 [ 19.096816] Hardware name: FUJITSU SIEMENS LIFEBOOK S6120/FJNB16C, BIOS Version 1.26 05/10/2004 [ 19.096816] Workqueue: phy0 ieee80211_dynamic_ps_enable_work [mac80211] [ 19.096816] Call Trace: [ 19.096816] [ 19.096816] dump_stack+0x16/0x19 [ 19.096816] print_irq_inversion_bug.part.37+0x16c/0x179 [ 19.096816] check_usage_forwards+0x118/0x120 [ 19.096816] ? ret_from_fork+0x19/0x24 [ 19.096816] ? print_shortest_lock_dependencies+0x1a0/0x1a0 [ 19.096816] mark_lock+0x2e4/0x590 [ 19.096816] ? print_shortest_lock_dependencies+0x1a0/0x1a0 [ 19.096816] __lock_acquire+0x6ae/0x1260 [ 19.096816] lock_acquire+0xb1/0x1c0 [ 19.096816] ? ath_isr+0x15e/0x200 [ath9k] [ 19.096816] _raw_spin_lock_irqsave+0x45/0x60 [ 19.096816] ? ath_isr+0x15e/0x200 [ath9k] [ 19.096816] ath_isr+0x15e/0x200 [ath9k] [ 19.096816] __handle_irq_event_percpu+0x44/0x340 [ 19.096816] handle_irq_event_percpu+0x1d/0x50 [ 19.096816] handle_irq_event+0x32/0x60 [ 19.096816] ? handle_nested_irq+0x100/0x100 [ 19.096816] handle_level_irq+0x81/0x100 [ 19.096816] handle_irq+0x9c/0xd0 [ 19.096816] [ 19.096816] do_IRQ+0x5c/0x120 [ 19.096816] common_interrupt+0x36/0x3c [ 19.096816] EIP: _raw_spin_unlock_irqrestore+0x57/0x70 [ 19.096816] EFLAGS: 00000286 CPU: 0 [ 19.096816] EAX: f60a3600 EBX: 00000286 ECX: 00000006 EDX: 00000001 [ 19.096816] ESI: f46c9e68 EDI: f46c8620 EBP: f60b5e8c ESP: f60b5e84 [ 19.096816] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 [ 19.096816] ath9k_config+0x16a/0x1d0 [ath9k] [ 19.096816] ieee80211_hw_config+0xa8/0x5f0 [mac80211] [ 19.096816] ? ieee80211_hw_config+0x1db/0x5f0 [mac80211] [ 19.096816] ieee80211_dynamic_ps_enable_work+0x1c3/0x680 [mac80211] [ 19.096816] ? process_one_work+0x127/0x580 [ 19.096816] ? process_one_work+0x127/0x580 [ 19.096816] process_one_work+0x1d1/0x580 [ 19.096816] ? process_one_work+0x127/0x580 [ 19.096816] worker_thread+0x31/0x380 [ 19.096816] kthread+0xd9/0x110 [ 19.096816] ? process_one_work+0x580/0x580 [ 19.096816] ? kthread_create_on_node+0x30/0x30 [ 19.096816] ret_from_fork+0x19/0x24 Cc: QCA ath9k Development Cc: Kalle Valo Cc: netdev@vger.kernel.org Signed-off-by: Ville Syrjälä Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/channel.c | 5 +++-- drivers/net/wireless/ath/ath9k/link.c | 4 ++-- drivers/net/wireless/ath/ath9k/main.c | 16 +++++++++------- 3 files changed, 14 insertions(+), 11 deletions(-) commit 496cbf3ebb6b37f89a8db84b3ed021eea2205fba Author: Bhumika Goyal Date: Thu Sep 14 00:31:52 2017 +0530 ath10k: make ath10k_hw_ce_regs const Make them const as they are not modified in the file referencing them. They are only stored in the const field 'hw_ce_reg' of an ath10k structure. Also, make the declarations in the header const. Signed-off-by: Bhumika Goyal Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/hw.c | 4 ++-- drivers/net/wireless/ath/ath10k/hw.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 896cbefadf62b431cba469089cc3bd5ecfe69ed5 Author: Thomas Meyer Date: Sun Sep 3 14:19:31 2017 +0200 ath9k: Use ARRAY_SIZE macro Use ARRAY_SIZE macro, rather than explicitly coding some variant of it yourself. Found with: find -type f -name "*.c" -o -name "*.h" | xargs perl -p -i -e 's/\bsizeof\s*\(\s*(\w+)\s*\)\s*\ /\s*sizeof\s*\(\s*\1\s*\[\s*0\s*\]\s*\) /ARRAY_SIZE(\1)/g' and manual check/verification. Signed-off-by: Thomas Meyer Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 50c8cd44ed5fcd2cbbfe19e5b1eb680aa4440186 Author: Himanshu Jha Date: Fri Sep 1 12:13:34 2017 +0530 ath9k: remove cast to void pointer casting to void pointer from any pointer type and vice-versa is done implicitly and therefore casting is not needed in such a case. Done using Coccinellle. Semantic Patch used : @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Himanshu Jha Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/ar9003_mac.c | 4 ++-- drivers/net/wireless/ath/ath9k/dfs.c | 2 +- drivers/net/wireless/ath/ath9k/hif_usb.c | 8 ++++---- drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 2 +- drivers/net/wireless/ath/ath9k/htc_drv_init.c | 24 ++++++++++++------------ drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 +- drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 6 +++--- drivers/net/wireless/ath/ath9k/init.c | 8 ++++---- drivers/net/wireless/ath/ath9k/main.c | 2 +- drivers/net/wireless/ath/ath9k/mci.c | 2 +- drivers/net/wireless/ath/ath9k/wmi.c | 4 ++-- 11 files changed, 32 insertions(+), 32 deletions(-) commit ec301d261d5a5a71f2ba1baf7a852b220fe69f3c Author: Fabrizio Castro Date: Fri Sep 22 14:01:02 2017 +0100 ARM: dts: iwg22d: Enable SDHI0 controller Enable the SDHI0 controller on iWave RZ/G1E carrier board. Signed-off-by: Fabrizio Castro Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 2affee619d48d101831e83e74cadeb7c5200d9cb Author: Yoshihiro Shimoda Date: Thu Sep 21 14:31:26 2017 +0900 arm64: dts: renesas: r8a7796: add USB3.0 peripheral device node This patch adds USB3.0 peripheral channel 0 device node for r8a7796. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 3bdba1b26771496ad8db8cd948ce144fc1ce1ca2 Author: Yoshihiro Shimoda Date: Thu Sep 21 14:31:25 2017 +0900 arm64: dts: renesas: r8a7795: add USB3.0 peripheral device node This patch adds USB3.0 peripheral channel 0 device node for r8a7795. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 4503b50eac08f472e8690ec61f4d144e62cbdc55 Author: Yoshihiro Shimoda Date: Wed Sep 13 21:18:39 2017 +0900 arm64: dts: renesas: r8a77995: draak: enable EthernetAVB This patch enables EthernetAVB for R-Car D3 draak board. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 2e931b06de97d762ef139bffbbe75e1483735734 Author: Simon Horman Date: Thu Sep 21 11:44:59 2017 +0200 ARM: shmobile: remove inconsistent ; from documentation Consistently do not suffix compat string documentation with a ';' Signed-off-by: Simon Horman Acked-by: Geert Uytterhoeven Documentation/devicetree/bindings/arm/shmobile.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 607c73c38e8492677da02a999eabd669e96f6d88 Author: Yoshihiro Shimoda Date: Thu Sep 14 19:30:43 2017 +0900 arm64: dts: renesas: r8a77995: draak: enable USB2.0 Host (EHCI/OHCI) This patch enables USB2.0 Host (EHCI/OHCI) for r8a77995. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6b4faeac05bc0b91616b921191cb054d1376f3b4 Author: Sricharan R Date: Mon Aug 28 20:30:24 2017 +0530 dmaengine: qcom-bam: Process multiple pending descriptors The bam dmaengine has a circular FIFO to which we add hw descriptors that describes the transaction. The FIFO has space for about 4096 hw descriptors. Currently we add one descriptor and wait for it to complete with interrupt and then add the next pending descriptor. In this way, the FIFO is underutilized since only one descriptor is processed at a time, although there is space in FIFO for the BAM to process more. Instead keep adding descriptors to FIFO till its full, that allows BAM to continue to work on the next descriptor immediately after signalling completion interrupt for the previous descriptor. Also when the client has not set the DMA_PREP_INTERRUPT for a descriptor, then do not configure BAM to trigger a interrupt upon completion of that descriptor. This way we get a interrupt only for the descriptor for which DMA_PREP_INTERRUPT was requested and there signal completion of all the previous completed descriptors. So we still do callbacks for all requested descriptors, but just that the number of interrupts are reduced. CURRENT: ------ ------- --------------- |DES 0| |DESC 1| |DESC 2 + INT | ------ ------- --------------- | | | | | | INTERRUPT: (INT) (INT) (INT) CALLBACK: (CB) (CB) (CB) MTD_SPEEDTEST READ PAGE: 3560 KiB/s MTD_SPEEDTEST WRITE PAGE: 2664 KiB/s IOZONE READ: 2456 KB/s IOZONE WRITE: 1230 KB/s bam dma interrupts (after tests): 96508 CHANGE: ------ ------- ------------- |DES 0| |DESC 1 |DESC 2 + INT | ------ ------- -------------- | | (INT) (CB for 0, 1, 2) MTD_SPEEDTEST READ PAGE: 3860 KiB/s MTD_SPEEDTEST WRITE PAGE: 2837 KiB/s IOZONE READ: 2677 KB/s IOZONE WRITE: 1308 KB/s bam dma interrupts (after tests): 58806 Signed-off-by: Sricharan R Reviewed-by: Andy Gross Tested-by: Abhishek Sahu Signed-off-by: Vinod Koul drivers/dma/qcom/bam_dma.c | 169 +++++++++++++++++++++++++++++---------------- 1 file changed, 109 insertions(+), 60 deletions(-) commit 25eabb13c7d67ae32298015c5e28d00f604f412c Merge: ab5348c e19b205 Author: James Morris Date: Sun Sep 24 22:41:55 2017 -0700 Merge tag 'v4.14-rc2' into next-general Linux 4.14-rc2 Sync to v4.14-rc2 for security subsystem developers to track. commit a1b831f23a2b3306ecf275872a54abcf97b0b977 Author: Alexey Dobriyan Date: Thu Sep 21 23:48:54 2017 +0300 xfrm: eradicate size_t All netlink message sizes are a) unsigned, b) can't be >= 4GB in size because netlink doesn't support >= 64KB messages in the first place. All those size_t across the code are a scam especially across networking which likes to work with small numbers like 1500 or 65536. Propagate unsignedness and flip some "int" to "unsigned int" as well. This is preparation to switching nlmsg_new() to "unsigned int". Signed-off-by: Alexey Dobriyan Signed-off-by: Steffen Klassert net/xfrm/xfrm_user.c | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) commit 5e708e47c44366453c33373940455a75fd33f635 Author: Alexey Dobriyan Date: Thu Sep 21 23:47:50 2017 +0300 xfrm: make xfrm_replay_state_esn_len() return unsigned int Replay detection bitmaps can't have negative length. Comparisons with nla_len() are left signed just in case negative value can sneak in there. Propagate unsignedness for code size savings: add/remove: 0/0 grow/shrink: 0/5 up/down: 0/-38 (-38) function old new delta xfrm_state_construct 1802 1800 -2 xfrm_update_ae_params 295 289 -6 xfrm_state_migrate 1345 1339 -6 xfrm_replay_notify_esn 349 337 -12 xfrm_replay_notify_bmp 345 333 -12 Signed-off-by: Alexey Dobriyan Signed-off-by: Steffen Klassert include/net/xfrm.h | 2 +- net/xfrm/xfrm_user.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit 1bd963a72e859d194d87a5a2a8839efee7e23102 Author: Alexey Dobriyan Date: Thu Sep 21 23:47:09 2017 +0300 xfrm: make xfrm_alg_auth_len() return unsigned int Key lengths can't be negative. Comparison with nla_len() is left signed just in case negative value can sneak in there. Signed-off-by: Alexey Dobriyan Signed-off-by: Steffen Klassert include/net/xfrm.h | 2 +- net/xfrm/xfrm_user.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 06cd22f830f28023b82455c82c7db65fc6cf9c16 Author: Alexey Dobriyan Date: Thu Sep 21 23:46:30 2017 +0300 xfrm: make xfrm_alg_len() return unsigned int Key lengths can't be negative. Comparison with nla_len() is left signed just in case negative value can sneak in there. Signed-off-by: Alexey Dobriyan Signed-off-by: Steffen Klassert include/net/xfrm.h | 2 +- net/xfrm/xfrm_user.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 373b8eeb0c15d4ce58f62afb12f213b1b5bbc3d3 Author: Alexey Dobriyan Date: Thu Sep 21 23:45:43 2017 +0300 xfrm: make aead_len() return unsigned int Key lengths can't be negative. Comparison with nla_len() is left signed just in case negative value can sneak in there. Signed-off-by: Alexey Dobriyan Signed-off-by: Steffen Klassert include/net/xfrm.h | 2 +- net/xfrm/xfrm_user.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a6786847407f81885d9d3d498d3b341ce478a709 Author: Lorenzo Bianconi Date: Sat Sep 23 21:10:52 2017 +0200 iio: imu: st_lsm6dsx: remove rounding configuration Remove rounding configuration since it is enabled by default for the FIFO output registers Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 7 ------- 1 file changed, 7 deletions(-) commit ac2561518b9be0d15c1749ab531b514bdec40ea4 Author: Lorenzo Bianconi Date: Sat Sep 23 21:10:51 2017 +0200 iio: imu: st_lsm6dsx: remove LIR configuration Remove Latched Interrupt configuration since it is enabled by default for FIFO watermark interrupt Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 8 -------- 1 file changed, 8 deletions(-) commit 4e74767e50617e90827227f1307590a521aa9f65 Author: Zhiyong Tao Date: Thu Sep 21 09:26:51 2017 +0800 iio: adc: mt2712: Add compatible node for mt2712. This commit adds mt2712 compatible node. Signed-off-by: Zhiyong Tao Signed-off-by: Jonathan Cameron drivers/iio/adc/mt6577_auxadc.c | 1 + 1 file changed, 1 insertion(+) commit 4d354feffff16499464d57501c034657499eee97 Author: Zhiyong Tao Date: Thu Sep 21 09:26:50 2017 +0800 dt-bindings: adc: mt2712: add binding documention The commit adds mt2712 compatible node in binding document. Signed-off-by: Zhiyong Tao Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/mt6577_auxadc.txt | 1 + 1 file changed, 1 insertion(+) commit fd060b3cd585542b44335d9169c71ce40b6384ac Author: Lukas Wunner Date: Sat Sep 9 20:32:41 2017 +0200 dt-bindings: iio: adc: mcp320x: Update for mcp3550/1/3 All chips supported by this driver clock data out on the falling edge and latch data in on the rising edge, hence SPI mode (0,0) or (1,1) must be used. Furthermore, none of the chips has an internal reference voltage regulator, so an external supply is always required and needs to be specified in the device tree lest the IIO "scale" in sysfs cannot be calculated. Document these requirements in the device tree binding, add compatible strings for the newly supported mcp3550/1/3 and explain that SPI mode (0,0) should be preferred for these chips. Cc: Mathias Duckeck Signed-off-by: Lukas Wunner Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/adc/mcp320x.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 5e3c3e3382e87a637c5c9229b4b539dfbf81c64b Author: Lorenzo Bianconi Date: Mon Sep 18 19:49:57 2017 +0200 iio: imu: st_lsm6dsx: set sensor->odr value just in st_lsm6dsx_write_raw() Update odr value in st_lsm6dsx_sensor data structure just in st_lsm6dsx_write_raw() in order to avoid to set the same value multiple times Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ba272e3bbeaee3b34ca6c616f7ad8d3c65f33f79 Author: Katie Dunne Date: Mon Sep 18 15:52:40 2017 -0700 Staging: iio: meter: ade7759: update locking method for write frequency iio_dev->mlock is to be used only by the IIO core for protecting device mode changes between INDIO_DIRECT and INDIO_BUFFER. This patch replaces the use of mlock with the already established buf_lock mutex. Introducing an 'unlocked' spi_write_reg_16 function to be used by ade7759_write_frequency avoids nested locks and maintains atomicity between bus and device frequency changes. Based on the solution found in ade7754 patch here: https://marc.info/?l=linux-iio&m=149086659008991&w=2 Signed-off-by: Katie Dunne Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7759.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit 08969366afd99622bb315112179933f7ded4b066 Author: Himanshi Jain Date: Mon Sep 18 12:29:52 2017 +0530 staging: iio: ade7753: replace mlock with driver private lock Replace driver usage of mlock with driver private lock to meet the new model where usage of iio_dev->mlock is being redefined as protecting operating mode changes(changes between BUFFER* and DIRECT modes). Signed-off-by: Himanshi Jain Signed-off-by: Jonathan Cameron drivers/staging/iio/meter/ade7753.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f8b7b30fb43a278693d1bf8f195d2864e7cc466e Author: Harinath Nampally Date: Sat Sep 23 16:56:30 2017 -0400 iio: accel: mma8452: Fix code style warning for unsigned int declarations Replace 'unsigned' with 'unsigned int' to improve code readability. Issue found by checkpatch. Signed-off-by: Harinath Nampally Signed-off-by: Jonathan Cameron drivers/iio/accel/mma8452.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cd327b0047698950d9a8285de8cf9587bca59b00 Author: Harinath Nampally Date: Sat Sep 23 16:56:29 2017 -0400 iio: accel: mma8452: Fix code style warning Replace symbolic permissions with octal permissions to improve code readability. Issue found by checkpatch. Signed-off-by: Harinath Nampally Signed-off-by: Jonathan Cameron drivers/iio/accel/mma8452.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 11d36e6a8e2a75db1b216dbd9cda54560cfbe5da Author: Paolo Cretaro Date: Thu Sep 14 23:19:22 2017 +0200 iio: cros_ec: Remove unused variable Fix gcc warning: cros_ec_baro.c:130:25: warning: variable ‘ec_device’ set but not used Signed-off-by: Paolo Cretaro Signed-off-by: Jonathan Cameron drivers/iio/pressure/cros_ec_baro.c | 2 -- 1 file changed, 2 deletions(-) commit 30f130d274c9de9b89d837674accab0f85cbf5a5 Author: Dan Carpenter Date: Fri Sep 8 13:53:43 2017 +0300 staging: iio: tsl2x7x: clean up limit checks The background of this code is that we can either use the default tables or load our own table with sysfs. The default tables are three element arrays of struct tsl2x7x_lux. If we load the table with sysfs then we can have as many as nine elements. Which ever way we do it, the last element is always zeroed out. The most interesting part of this patch is in the in_illuminance0_lux_table_show() function. We were using the wrong limit, "TSL2X7X_MAX_LUX_TABLE_SIZE * 3", when it should have been just "TSL2X7X_MAX_LUX_TABLE_SIZE". This creates a static checker warning that we are going of bounds. However, since the last element is always zeroed out, that means we hit the break statement and the code works correctly despite the wrong limit check. I made several related readability changes. The most notable that I changed the MAX_DEFAULT_TABLE_BYTES define which was: I renamed the define to TSL2X7X_DEFAULT_TABLE_BYTES because it's not the max size, it's the only size. Also the size should really be expressed as sizeof(struct tsl2x7x_lux) * 3. In other words, 12 * 3 instead of 4 * 9. It's 36 bytes either way, so this doesn't change the behavior. Finally, I created the TSL2X7X_DEF_LUX_TABLE_SZ define instead of using the magic number 3. I declared the default tables using that define to hopefully signal to future programmers that if they want to use a different size they have to update all the related code. Signed-off-by: Dan Carpenter Acked-by: Brian Masney Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 12 ++++++------ drivers/staging/iio/light/tsl2x7x.h | 11 +++++++---- 2 files changed, 13 insertions(+), 10 deletions(-) commit 9c84c9101b9b4604c183f75a43fe7875ecce8bcd Author: Lukas Wunner Date: Sat Sep 9 20:32:41 2017 +0200 iio: adc: mcp320x: Document struct mcp320x Signed-off-by: Lukas Wunner Signed-off-by: Jonathan Cameron drivers/iio/adc/mcp320x.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 35ed9fbfd07802c8d45e7fe2bfc484803f9f3549 Author: Lukas Wunner Date: Sat Sep 9 20:32:41 2017 +0200 iio: adc: mcp320x: Drop unnecessary of_device_id attributes The driver sets a .data pointer for each .compatible string but never calls of_device_get_match_data(). Instead, ADC properties are looked up with spi_get_device_id(). The .data pointer is therefore unnecessary, so drop it. Signed-off-by: Lukas Wunner Signed-off-by: Jonathan Cameron drivers/iio/adc/mcp320x.c | 75 ++++++++++++----------------------------------- 1 file changed, 19 insertions(+), 56 deletions(-) commit ea9103186d0508cfbd665a04d2773514e336fa72 Author: Lukas Wunner Date: Sat Sep 9 20:32:41 2017 +0200 iio: adc: mcp320x: Speed up readout of single-channel ADCs Single-channel converters such as mcp3001, mcp3201, mcp3301 and the upcoming mcp3550/1/3 lack a MOSI pin, so there's no need to call mcp320x_channel_to_tx_data() for them. Moreover, instead of calling spi_read() for these converters, which generates an spi_message and spi_transfer on the stack on every readout, it's more efficient to use the spi_message and spi_transfer[] included in struct mcp320x (as we do for multi-channel ADCs), but initialize the spi_message only with the receive transfer. Signed-off-by: Lukas Wunner Signed-off-by: Jonathan Cameron drivers/iio/adc/mcp320x.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) commit f1f065d7ac30ba8b56838271a04501820d190b06 Author: Narcisa Ana Maria Vasile Date: Thu Sep 7 21:38:37 2017 +0300 iio: chemical: ccs811: Add support for data ready trigger Add data ready trigger for hardware interrupts that signal new, available measurement samples. Cc: Daniel Baluta Cc: Alison Schofield Signed-off-by: Narcisa Ana Maria Vasile Signed-off-by: Jonathan Cameron drivers/iio/chemical/ccs811.c | 86 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) commit 3c52b5c64326d9dcfee4e10611c53ec1b1b20675 Author: Uros Bizjak Date: Wed Sep 6 17:18:08 2017 +0200 x86/asm: Remove unnecessary \n\t in front of CC_SET() from asm templates There is no need for \n\t in front of CC_SET(), as the macro already includes these two. Signed-off-by: Uros Bizjak Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170906151808.5634-1-ubizjak@gmail.com Signed-off-by: Ingo Molnar arch/x86/include/asm/archrandom.h | 8 ++++---- arch/x86/include/asm/bitops.h | 10 +++++----- arch/x86/include/asm/percpu.h | 2 +- arch/x86/include/asm/rmwcc.h | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) commit 39e50d9637f9a31967ac9e956b829ee8b50a750f Author: Zhu Yanjun Date: Fri Sep 22 10:20:21 2017 -0400 forcedeth: optimize the xmit/rx with unlikely In the xmit/rx fastpath, the function dma_map_single rarely fails. Therefore, add an unlikely() optimization to this error check conditional. Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller drivers/net/ethernet/nvidia/forcedeth.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit d5426f4c2ebac8cf05de43988c3fccddbee13d28 Author: Pierre-Louis Bossart Date: Wed Sep 20 16:53:58 2017 -0400 media: staging: atomisp: use clock framework for camera clocks The Atom ISP driver initializes and configures PMC clocks which are already handled by the clock framework. Remove all legacy vlv2_platform_clock stuff and move to the clk API to avoid conflicts, e.g. with audio machine drivers enabling the MCLK for external codecs Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Tested-by: Carlo Caione Reviewed-by: Andy Shevchenko Signed-off-by: Pierre-Louis Bossart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/Kconfig | 1 + drivers/staging/media/atomisp/platform/Makefile | 1 - .../staging/media/atomisp/platform/clock/Makefile | 6 - .../platform/clock/platform_vlv2_plat_clk.c | 40 ---- .../platform/clock/platform_vlv2_plat_clk.h | 26 --- .../media/atomisp/platform/clock/vlv2_plat_clock.c | 247 --------------------- .../platform/intel-mid/atomisp_gmin_platform.c | 63 +++++- 7 files changed, 52 insertions(+), 332 deletions(-) commit abe513924879432a17a1cab1bc408b110fb04fac Author: Srishti Sharma Date: Thu Sep 14 06:18:40 2017 -0400 media: Staging: media: atomisp: Use kcalloc instead of kzalloc Use kcalloc instead of kzalloc to check for an overflow before multiplication. Done using the following semantic patch by coccinelle. http://coccinelle.lip6.fr/rules/kzalloc.cocci Signed-off-by: Srishti Sharma Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e6cc710806e191acfa2691d2fb8cb7f19ffd2b0e Author: Allen Pais Date: Wed Sep 13 05:15:58 2017 -0400 media: atomisp:use ARRAY_SIZE() instead of open coding The array_length() macro just duplicates ARRAY_SIZE(), so we can delete it. Signed-off-by: Allen Pais Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 34d340b784de0ba77c3c14f26c3ae678f8bb762a Author: Srishti Sharma Date: Tue Sep 12 10:12:29 2017 -0400 media: Staging: media: atomisp: Merge assignment with return Merge the assignment and the return statements to return the value directly. Done using the following semantic patch by coccinelle. @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Srishti Sharma Acked-by: Julia Lawall Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 11 ++--------- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 6 +----- 2 files changed, 3 insertions(+), 14 deletions(-) commit 866af46e6ebbce55dbf6f63ad11a4a9bb3b9abf0 Author: Branislav Radocaj Date: Thu Sep 7 12:26:42 2017 -0400 media: Staging: atomisp: fix alloc_cast.cocci warnings Remove casting the values returned by memory allocation functions like kmalloc, kzalloc, kmem_cache_alloc, kmem_cache_zalloc etc. Semantic patch information: This makes an effort to find cases of casting of values returned by kmalloc, kzalloc, kcalloc, kmem_cache_alloc, kmem_cache_zalloc, kmem_cache_alloc_node, kmalloc_node and kzalloc_node and removes the casting as it is not required. The result in the patch case may need some reformatting. Generated by: scripts/coccinelle/api/alloc/alloc_cast.cocci Signed-off-by: Branislav Radocaj Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e8e809185fa703aa5d88d4b1f2f7054d73ef176 Author: Thomas Meyer Date: Sun Sep 3 08:19:31 2017 -0400 media: staging/atomisp: Use ARRAY_SIZE macro Use ARRAY_SIZE macro, rather than explicitly coding some variant of it yourself. Found with: find -type f -name "*.c" -o -name "*.h" | xargs perl -p -i -e 's/\bsizeof\s*\(\s*(\w+)\s*\)\s*\ /\s*sizeof\s*\(\s*\1\s*\[\s*0\s*\]\s*\) /ARRAY_SIZE(\1)/g' and manual check/verification. Signed-off-by: Thomas Meyer Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../media/atomisp/pci/atomisp2/css2400/runtime/ifmtr/src/ifmtr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8cd0cd065f3720385eef223a63dcc552ba98bc01 Author: Nicolas Iooss Date: Sun Sep 3 08:05:26 2017 -0400 media: staging/atomisp: fix header guards Files input_formatter_subsystem_defs.h begin with: #ifndef _if_subsystem_defs_h #define _if_subsystem_defs_h__ and end with: #endif /* _if_subsystem_defs_h__ */ The intent seems to have been to use _if_subsystem_defs_h__ everywhere but two underscores are missing in the initial #ifndef. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Nicolas Iooss Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../css2400/css_2400_system/hrt/input_formatter_subsystem_defs.h | 2 +- .../css2400/css_2401_csi2p_system/hrt/input_formatter_subsystem_defs.h | 2 +- .../css2400/css_2401_system/hrt/input_formatter_subsystem_defs.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 9a965ff4273cb62ac76d22b6b6781bfa9a7f3491 Author: Andy Shevchenko Date: Fri Sep 1 09:36:40 2017 -0400 media: staging: atomisp: Remove unneeded intel-mid.h inclusion In many files in the driver the intel-mid.h header inclusion is redundant. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/imx/drv201.c | 1 - drivers/staging/media/atomisp/i2c/imx/dw9714.c | 1 - drivers/staging/media/atomisp/i2c/imx/imx.c | 1 - drivers/staging/media/atomisp/i2c/imx/otp_imx.c | 1 - drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 1 - drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h | 2 -- drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 1 - drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.c | 1 - drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 1 - drivers/staging/media/atomisp/platform/clock/platform_vlv2_plat_clk.h | 1 - 10 files changed, 11 deletions(-) commit 209627bff1c609983aaea7085a03677ce12bf2c6 Author: Andy Shevchenko Date: Fri Sep 1 09:36:39 2017 -0400 media: staging: atomisp: Remove dead code for MID (#4) Since we switched to upstream IOSF MBI API the custom code become not in use anymore. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../atomisp/include/asm/intel_mid_pcihelpers.h | 22 ----- .../media/atomisp/pci/atomisp2/atomisp_internal.h | 1 - .../media/atomisp/platform/intel-mid/Makefile | 1 - .../platform/intel-mid/intel_mid_pcihelpers.c | 98 ---------------------- 4 files changed, 122 deletions(-) commit 66228be9fff77d3fcc02663d534dff17c30aedc1 Author: Andy Shevchenko Date: Fri Sep 1 09:36:38 2017 -0400 media: staging: atomisp: Move to upstream IOSF MBI API There is a common for x86 IOSF MBI API. Move atomisp code to use it. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/Kconfig | 1 + .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 20 +++++++----- .../media/atomisp/pci/atomisp2/atomisp_v4l2.c | 38 ++++++++++------------ 3 files changed, 29 insertions(+), 30 deletions(-) commit e64d5bd481be674db9e9626e71c2dd0a77445fa8 Author: Andy Shevchenko Date: Fri Sep 1 09:36:37 2017 -0400 media: staging: atomisp: Remove dead code for MID (#3) intel_mid_msgbus_*_raw*() are not used anywhere. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../atomisp/include/asm/intel_mid_pcihelpers.h | 4 -- .../platform/intel-mid/intel_mid_pcihelpers.c | 58 ---------------------- 2 files changed, 62 deletions(-) commit e84bf2225d55fab90b4627c61d81ca2fb333907e Author: Andy Shevchenko Date: Fri Sep 1 09:36:36 2017 -0400 media: staging: atomisp: Remove dead code for MID (#2) intel_mid_soc_stepping() is not used anywhere. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/include/asm/intel_mid_pcihelpers.h | 1 - .../media/atomisp/platform/intel-mid/intel_mid_pcihelpers.c | 7 ------- 2 files changed, 8 deletions(-) commit 90154e130f45f4fcad595058cc2d34ce412bec33 Author: Andy Shevchenko Date: Fri Sep 1 09:36:35 2017 -0400 media: staging: atomisp: Don't override D3 delay settings here The d3_delay parameter is set by arch/x86/pci/intel_mid_pci.c and drivers/pci/quirks.c. No need to override that settings in unrelated driver. Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../atomisp/include/asm/intel_mid_pcihelpers.h | 8 ------ .../platform/intel-mid/intel_mid_pcihelpers.c | 33 ---------------------- 2 files changed, 41 deletions(-) commit 5fc90b632ea9a107ed6b71eb7058bb58e1b5493b Author: Andy Shevchenko Date: Fri Sep 1 09:36:34 2017 -0400 media: staging: atomisp: Remove dead code for MID (#1) Remove dead code. If someone needs it the P-Unit semaphore is handled by I2C DesignWare driver (drivers/i2c/busses/i2c-designware-baytrail.c). Signed-off-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../atomisp/include/asm/intel_mid_pcihelpers.h | 2 - .../platform/intel-mid/intel_mid_pcihelpers.c | 101 --------------------- 2 files changed, 103 deletions(-) commit d13f47c2a2df7b6afe13036ba6fa164bedea5b0a Author: Sakari Ailus Date: Thu Aug 31 04:11:00 2017 -0400 media: staging: media: atomisp: Use tabs in Kconfig Use tabs in Kconfig for indentation rather than spaces. The patch has been created using the following command: find drivers/staging/media/atomisp/ -name Kconfig| \ xargs perl -i -pe 's/ {8}/\t/g' Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/Kconfig | 10 ++-- drivers/staging/media/atomisp/i2c/Kconfig | 70 ++++++++++++------------ drivers/staging/media/atomisp/i2c/ov5693/Kconfig | 8 +-- 3 files changed, 44 insertions(+), 44 deletions(-) commit 2fc8b694f2316041df971cca41c9a7d1595e3a6d Author: Hans Verkuil Date: Wed Aug 30 04:39:00 2017 -0400 media: atomisp: fix small Kconfig issues The help text should be indented by at least two spaces after the 'help' separator. This is both good practice and the media_build system for building media drivers makes this assumption. Fix this for the atomisp/i2c/Kconfig and fix the atomisp/pci/Kconfig that didn't align the help separator with the preceding keywords. Signed-off-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/i2c/Kconfig | 4 ++-- drivers/staging/media/atomisp/pci/Kconfig | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) commit 6d5f41985f408e35e63a710429434d0c0c1153ce Author: Arvind Yadav Date: Thu Aug 31 03:48:37 2017 -0400 media: Staging: atomisp: constify driver_attribute driver_attribute are not supposed to change at runtime. Functions driver_create_file/driver_remove_file are working with const driver_attribute. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 727d38a89179fb052b946c59860f86353b9daeb5 Author: Himanshu Jha Date: Sat Aug 26 16:51:49 2017 -0400 media: atomisp2: Remove null check before kfree Kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab .../staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9267d90c564fc4ac7e51b922fa03107bb8c78739 Author: Hans Verkuil Date: Thu Aug 31 04:12:53 2017 -0400 media: cec.h: initialize *parent and *port in cec_phys_addr_validate Make sure these values are set to avoid 'uninitialized variable' warnings. Hasn't happened yet, but better safe than sorry. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab include/media/cec.h | 4 ++++ 1 file changed, 4 insertions(+) commit 561b29e4ec8d0aac7e094f70d649ee4abccdda03 Author: Hans Verkuil Date: Wed Aug 30 04:47:21 2017 -0400 media: fix media Kconfig help syntax issues The help text should be indented by at least two spaces after the 'help' separator. This is both good practice and the media_build system for building media drivers makes this assumption. I went through all Kconfigs under drivers/media and fixed any bad help sections. This makes it conform to the common practice and should fix problems with 'make menuconfig' when using media_build. This is due to a "WARNING" message that media_build can insert in the Kconfig and that assumes the help text is indented by at least two spaces. If not, then the Kconfig becomes invalid and 'make menuconfig' fails. Signed-off-by: Hans Verkuil Reported-by: Thomas Kaiser Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/Kconfig | 6 +++--- drivers/media/pci/b2c2/Kconfig | 4 ++-- drivers/media/pci/netup_unidvb/Kconfig | 12 ++++++------ drivers/media/platform/exynos4-is/Kconfig | 2 +- drivers/media/radio/wl128x/Kconfig | 10 +++++----- drivers/media/usb/b2c2/Kconfig | 6 +++--- drivers/media/usb/gspca/Kconfig | 16 ++++++++-------- drivers/media/usb/pvrusb2/Kconfig | 1 - 8 files changed, 28 insertions(+), 29 deletions(-) commit 201c799637f293f8c2a9e4c91de1987bc8b9075c Author: Hans Verkuil Date: Mon Aug 28 04:45:58 2017 -0400 media: cobalt: do not register subdev nodes In the distant past the adv7604 driver used private controls. In order to access them the v4l-subdevX nodes were needed. Later the is_private tag was removed in the adv7604 driver and the need for v4l-subdevX device nodes disappeared. Remove the creation of those device nodes from this driver. Note: the cobalt card is only used inside Cisco and we never actually used the v4l-subdevX nodes for anything. So this API change can be done safely without breaking anything. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cobalt/cobalt-driver.c | 3 --- 1 file changed, 3 deletions(-) commit 2489477e4f2c19f19fde8e0a1166506fd5e5cc28 Author: Ricardo Ribalda Date: Fri Sep 8 11:47:10 2017 -0400 media: v4l-ioctl: Fix typo on v4l_print_frmsizeenum max_width and max_height are swap with step_width and step_height. Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ioctl.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 7a6e6c3be88dcc18f592c76f11cf8e7e090dc9dd Author: Markus Elfring Date: Thu Sep 7 16:37:16 2017 -0400 media: davinci: do a couple of checkpatch cleanups - Delete an error message for a failed memory allocation in init_vpbe_layer(); - Replace the specification of 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; - media: DaVinci-VPBE-Display: Improve a size determination in two functions - Adjust 12 checks for null pointers Those issues were pointed by checkpatch.pl and Coccinelle. [mchehab@s-opensource.com: fold three cleanup patches into one] Signed-off-by: Markus Elfring Acked-by: Lad, Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/davinci/vpbe_display.c | 37 +++++++++++---------------- 1 file changed, 15 insertions(+), 22 deletions(-) commit 1f8d31d189cc6ce1e4b972959fda41e790bb92b8 Merge: 3fb5ec0 cd4175b1 Author: David S. Miller Date: Sat Sep 23 10:16:53 2017 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net commit 104dc5e20ff52748a16f756ae946391bdc6a4d0a Author: Rafael J. Wysocki Date: Wed Sep 20 02:26:00 2017 +0200 PM: Document rules on using pm_runtime_resume() in system suspend callbacks It quite often is necessary to resume devices from runtime suspend during system suspend for various reasons (for example, if their wakeup settings need to be changed), but that requires middle-layer or subsystem code to follow additional rules which currently are not clearly documented. Namely, if a driver calls pm_runtime_resume() for the device from its ->suspend (or equivalent) system sleep callback, that may not work if the middle layer above it has updated the state of the device from its ->prepare or ->suspend callbacks already in an incompatible way. For this reason, all middle layers must follow the rule that, until the ->suspend callback provided by the device's driver is invoked, the only way in which the device's state can be updated is by calling pm_runtime_resume() for it, if necessary. Fortunately enough, all middle layers in the code base today follow this rule, but it is not explicitly stated anywhere, so do that. Note that calling pm_runtime_resume() from the ->suspend callback of a driver will cause the ->runtime_resume callback provided by the middle layer to be invoked, but the rule above guarantees that this callback will nest properly with the middle layer's ->suspend callback and it will play well with the ->prepare one invoked before. Signed-off-by: Rafael J. Wysocki Reviewed-by: Ulf Hansson Documentation/driver-api/pm/devices.rst | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit 5f4d34693cfb217354e079789864ed8801b0d39d Author: Markus Elfring Date: Sun Sep 3 14:12:36 2017 -0400 media: Hexium Orion: 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/saa7146/hexium_orion.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 84c62fb996721897623337e9ebd19f9846873b55 Author: Markus Elfring Date: Sun Sep 3 09:41:53 2017 -0400 media: meye: Adjust two function calls 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 places. Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/meye/meye.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 601b1f0ac7fadbe90cc04c41a1cb31c7cd402fea Author: Colin Ian King Date: Thu Sep 7 05:50:23 2017 -0400 media: cx23885: make const array buf static, reduces object code size Don't populate the array buf on the stack, instead make it static. Makes the object code smaller by over 240 bytes: Before: text data bss dec hex filename 21689 22992 416 45097 b029 cx23885-cards.o After: text data bss dec hex filename 21348 23088 416 44852 af34 cx23885-cards.o Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ff692fad32829b5b2199273d2b35273ecab007f Author: Colin Ian King Date: Wed Sep 6 09:30:16 2017 -0400 media: ov9640: make const arrays res_x/y static const, reduces object code size Don't populate the arrays res_x and resy_y on the stack, instead make them static const. Makes the object code smaller by over 160 bytes: Before: text data bss dec hex filename 10509 2800 64 13373 343d ov9640.o After: text data bss dec hex filename 10184 2960 64 13208 3398 ov9640.o Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/soc_camera/ov9640.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e90ce8aa3cb2fcfb0fd45f95e89946a15c03737c Author: Colin Ian King Date: Tue Sep 5 11:19:44 2017 -0400 media: cobalt: remove redundant zero check on retval The error handling paths all end up with retval being non-zero, so the check for retval being zero is always false and hence is redundant. Remove it. Detected by CoverityScan CID#1309479 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cobalt/cobalt-driver.c | 2 -- 1 file changed, 2 deletions(-) commit 2be730b828c59fc776c8045883c1dc7a37d7b457 Author: Colin Ian King Date: Tue Sep 5 07:03:32 2017 -0400 media: cx25840: make array stds static const, reduces object code size Don't populate the array syds on the stack, instead make it static const. Makes the object code smaller by over 280 bytes: Before: text data bss dec hex filename 81451 12784 704 94939 172db cx25840-core.o text data bss dec hex filename 81070 12880 704 94654 171be cx25840-core.o Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/cx25840/cx25840-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f679ff6c761729607630c731c8bae0f8691ae79 Author: Thomas Meyer Date: Sun Sep 3 08:19:31 2017 -0400 media: lgdt3306a: Use ARRAY_SIZE macro Use ARRAY_SIZE macro, rather than explicitly coding some variant of it yourself. Found with: find -type f -name "*.c" -o -name "*.h" | xargs perl -p -i -e 's/\bsizeof\s*\(\s*(\w+)\s*\)\s*\ /\s*sizeof\s*\(\s*\1\s*\[\s*0\s*\]\s*\) /ARRAY_SIZE(\1)/g' and manual check/verification. Signed-off-by: Thomas Meyer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/lgdt3306a.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f71c43060aa534df9ae2a055be983bd7194c4a13 Author: Daniel Scheller Date: Fri Sep 1 15:43:45 2017 -0400 media: dvb-frontends/mxl5xx: declare LIST_HEAD(mxllist) static Fixes one sparse warning: mxl5xx.c:46:1: warning: symbol 'mxllist' was not declared. Should it be static? Signed-off-by: Daniel Scheller Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/dvb-frontends/mxl5xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bab4cb30dbf798f6d6df798aa23d33fb25f394e0 Author: Colin Ian King Date: Fri Sep 1 11:35:08 2017 -0400 media: rtl28xxu: make array rc_nec_tab static const Don't populate the array rc_nec_tab on the stack, instead make it static const. Makes the object code smaller by over 620 bytes: Before: text data bss dec hex filename 49511 17040 64 66615 10437 rtl28xxu.o After: text data bss dec hex filename 48825 17104 64 65993 101c9 rtl28xxu.o Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8e9b36d2fc463d87f7b595fedf7ed7ae68dba1d Author: Bhumika Goyal Date: Mon Aug 28 03:42:09 2017 -0400 media: pci: make i2c_client const Make these const as they are only used in a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/pci/cx23885/cx23885-i2c.c | 2 +- drivers/media/pci/cx25821/cx25821-i2c.c | 2 +- drivers/media/pci/ivtv/ivtv-i2c.c | 2 +- drivers/media/pci/saa7134/saa7134-i2c.c | 2 +- drivers/media/pci/saa7164/saa7164-i2c.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 2b83247f3e4a40c767dcbc149b7ad544e2e6c002 Author: Bhumika Goyal Date: Mon Aug 28 03:21:35 2017 -0400 media: usb: make i2c_client const Make these const as they are only used in a copy operation. Done using Coccinelle. @match disable optional_qualifier@ identifier s; @@ static struct i2c_client s = {...}; @ref@ position p; identifier match.s; @@ s@p @good1@ position ref.p; identifier match.s,f,c; expression e; @@ ( e = s@p | e = s@p.f | c(...,s@p.f,...) | c(...,s@p,...) ) @bad depends on !good1@ position ref.p; identifier match.s; @@ s@p @depends on forall !bad disable optional_qualifier@ identifier match.s; @@ static + const struct i2c_client s; Signed-off-by: Bhumika Goyal Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/usb/au0828/au0828-i2c.c | 2 +- drivers/media/usb/em28xx/em28xx-i2c.c | 2 +- drivers/media/usb/stk1160/stk1160-i2c.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 9722e5696ca729044462c4456ddde90061809f7e Author: Markus Elfring Date: Wed Aug 30 02:44:29 2017 -0400 media: dvb-frontends: delete jump targets * Return directly after a call of the function "kzalloc" failed at the beginning. * Move a bit of exception handling code into an if branch. * Delete jump targets which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil drivers/media/dvb-frontends/cx24113.c | 2 +- drivers/media/dvb-frontends/cx24116.c | 15 +++++---------- drivers/media/dvb-frontends/ds3000.c | 10 +++------- drivers/media/dvb-frontends/mb86a20s.c | 16 +++++----------- 4 files changed, 14 insertions(+), 29 deletions(-) commit af28c99628ebfbdc3fff3d92c7044d3a51b7ccea Author: Markus Elfring Date: Mon Aug 28 06:50:28 2017 -0400 media: drivers: Adjust checks for null pointers The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written !… Thus fix the affected source code places. Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil drivers/media/common/siano/smscoreapi.c | 12 ++++++------ drivers/media/dvb-frontends/drxd_hard.c | 6 +++--- drivers/media/dvb-frontends/sp2.c | 6 +++--- drivers/media/i2c/adv7604.c | 6 +++--- drivers/media/pci/cx18/cx18-driver.c | 20 ++++++++++---------- drivers/media/pci/mantis/hopper_cards.c | 4 ++-- drivers/media/platform/atmel/atmel-isc.c | 6 +++--- drivers/media/platform/atmel/atmel-isi.c | 6 +++--- drivers/media/usb/zr364xx/zr364xx.c | 22 +++++++++++----------- 9 files changed, 44 insertions(+), 44 deletions(-) commit 2d3da59ff163b2aa805de0fc65ba933a735b00cd Author: Markus Elfring Date: Mon Aug 28 05:55:16 2017 -0400 media: drivers: improve a size determination 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. This issue was detected by using the Coccinelle software. [mchehab@s-opensoure.com: merge similar patches into one] Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil drivers/media/common/cypress_firmware.c | 2 +- drivers/media/common/siano/smscoreapi.c | 14 ++++++-------- drivers/media/dvb-frontends/as102_fe.c | 2 +- drivers/media/dvb-frontends/cx24113.c | 3 +-- drivers/media/dvb-frontends/cx24116.c | 2 +- drivers/media/dvb-frontends/ds3000.c | 2 +- drivers/media/dvb-frontends/mb86a20s.c | 2 +- drivers/media/dvb-frontends/sp2.c | 2 +- drivers/media/i2c/adv7842.c | 2 +- drivers/media/pci/cx18/cx18-driver.c | 2 +- drivers/media/pci/mantis/hopper_cards.c | 2 +- drivers/media/pci/mantis/mantis_cards.c | 2 +- drivers/media/pci/saa7146/hexium_gemini.c | 2 +- drivers/media/pci/saa7146/hexium_orion.c | 2 +- drivers/media/pci/saa7164/saa7164-buffer.c | 4 ++-- drivers/media/platform/atmel/atmel-isc.c | 2 +- drivers/media/usb/zr364xx/zr364xx.c | 2 +- 17 files changed, 23 insertions(+), 26 deletions(-) commit d303b7c5b2660d93ba0dd2bf99b7dfa7bb93de73 Author: Markus Elfring Date: Wed Aug 30 02:10:38 2017 -0400 media: drivers: delete unnecessary variable initialisations The variables will be set to an appropriate value before usage. Thus omit the explicit initialisation at the beginning. [mchehab@s-opensource.com: fold similar patches into one] Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil drivers/media/dvb-frontends/cx24116.c | 4 ++-- drivers/media/dvb-frontends/ds3000.c | 2 +- drivers/media/pci/mantis/hopper_cards.c | 2 +- drivers/media/pci/mantis/mantis_cards.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit c38e8657a471e9af42b86009e5d3085031b41fda Author: Markus Elfring Date: Mon Aug 28 05:46:57 2017 -0400 media: drivers: delete error messages for failed memory allocation Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. [mchehab@s-opensource.com: fold several similar patches into one] Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/common/cypress_firmware.c | 4 +--- drivers/media/common/siano/smscoreapi.c | 13 ++++--------- drivers/media/dvb-frontends/as102_fe.c | 5 ++--- drivers/media/dvb-frontends/cx24113.c | 5 ++--- drivers/media/dvb-frontends/cx24116.c | 1 - drivers/media/dvb-frontends/drxd_hard.c | 1 - drivers/media/dvb-frontends/ds3000.c | 8 ++------ drivers/media/dvb-frontends/mb86a20s.c | 5 +---- drivers/media/dvb-frontends/si2168.c | 1 - drivers/media/dvb-frontends/sp2.c | 1 - drivers/media/i2c/adv7604.c | 4 +--- drivers/media/i2c/adv7842.c | 4 +--- drivers/media/pci/cx18/cx18-driver.c | 6 ++---- drivers/media/pci/mantis/hopper_cards.c | 1 - drivers/media/pci/mantis/mantis_cards.c | 4 +--- drivers/media/pci/meye/meye.c | 13 ++++--------- drivers/media/pci/saa7146/hexium_gemini.c | 5 ++--- drivers/media/pci/saa7146/hexium_orion.c | 4 +--- drivers/media/pci/saa7164/saa7164-buffer.c | 4 +--- drivers/media/platform/atmel/atmel-isc.c | 4 +--- drivers/media/platform/atmel/atmel-isi.c | 8 ++------ drivers/media/platform/blackfin/ppi.c | 1 - drivers/media/usb/zr364xx/zr364xx.c | 8 ++------ 23 files changed, 30 insertions(+), 80 deletions(-) commit a0ec8d1dc42e4255307cb1b95345c01c327a10a6 Author: Hans Verkuil Date: Thu Aug 31 04:12:55 2017 -0400 media: tc358743: add CEC support Add CEC support for the tc358743 HDMI-CSI bridge. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/Kconfig | 8 ++ drivers/media/i2c/tc358743.c | 205 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 207 insertions(+), 6 deletions(-) commit 42ded7a866492c4cfffdcd10eee46a7660d18953 Author: Hans Verkuil Date: Thu Aug 31 04:12:54 2017 -0400 media: tc358743_regs.h: add CEC registers Add the missing CEC register defines. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/tc358743_regs.h | 94 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 2 deletions(-) commit 96b52ab3d0bee56e79f8e0e87daef5133c40a407 Author: Hans Verkuil Date: Wed Jun 28 04:14:15 2017 -0400 media: MAINTAINERS: add cec-gpio entry Add an entry for the CEC GPIO driver. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1e33936d3baee3b688ec12b372534522b9256032 Author: Hans Verkuil Date: Wed Jun 28 04:14:28 2017 -0400 media: cec-gpio: add HDMI CEC GPIO driver Add a simple HDMI CEC GPIO driver that sits on top of the cec-pin framework. While I have heard of SoCs that use the GPIO pin for CEC (apparently an early RockChip SoC used that), the main use-case of this driver is to function as a debugging tool. By connecting the CEC line to a GPIO pin on a Raspberry Pi 3 for example it turns it into a CEC debugger and protocol analyzer. With 'cec-ctl --monitor-pin' the CEC traffic can be analyzed. But of course it can also be used with any hardware project where the HDMI CEC line is hooked up to a pull-up gpio line. In addition this has (optional) support for tracing HPD changes if the HPD is connected to a GPIO. Signed-off-by: Hans Verkuil Reviewed-by: Linus Walleij Signed-off-by: Mauro Carvalho Chehab drivers/media/platform/Kconfig | 10 ++ drivers/media/platform/Makefile | 2 + drivers/media/platform/cec-gpio/Makefile | 1 + drivers/media/platform/cec-gpio/cec-gpio.c | 236 +++++++++++++++++++++++++++++ 4 files changed, 249 insertions(+) commit 67f2a06f14a9419bc2da0a8e6b440c6813dccdb0 Author: Hans Verkuil Date: Wed Aug 2 03:22:33 2017 -0400 media: dt-bindings: document the CEC GPIO bindings Document the bindings for the cec-gpio module for hardware where the CEC line and optionally the HPD line are connected to GPIO lines. Signed-off-by: Hans Verkuil Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab .../devicetree/bindings/media/cec-gpio.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit 00f7adff0c3a1d793ffa213c28d82c47dfd8ab04 Author: Hans Verkuil Date: Wed Aug 30 12:05:55 2017 -0400 media: cec-ioc-dqevent.rst: document new CEC_EVENT_PIN_HPD_LOW/HIGH events Document these new CEC events. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/uapi/cec/cec-ioc-dqevent.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 333ef6bd10c3ffdaf6da94e34dc6cae675ed27fc Author: Hans Verkuil Date: Tue Aug 15 10:07:25 2017 -0400 media: cec: add CEC_EVENT_PIN_HPD_LOW/HIGH events Add support for two new low-level events: PIN_HPD_LOW and PIN_HPD_HIGH. This is specifically meant for use with the upcoming cec-gpio driver and makes it possible to trace when the HPD pin changes. Some HDMI sinks do strange things with the HPD and this makes it easy to debug this. Note that this also moves the initialization of a devnode mutex and list to the allocate_adapter function: if the HPD is high, then as soon as the HPD interrupt is created an interrupt occurs and cec_queue_pin_hpd_event() is called which requires that the devnode mutex and list are initialized. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-adap.c | 18 +++++++++++++++++- drivers/media/cec/cec-api.c | 18 ++++++++++++++---- drivers/media/cec/cec-core.c | 8 ++++---- include/media/cec-pin.h | 4 ++++ include/media/cec.h | 12 +++++++++++- include/uapi/linux/cec.h | 2 ++ 6 files changed, 52 insertions(+), 10 deletions(-) commit da634f623e4879d7716029a84791fc596ebac24d Author: Hans Verkuil Date: Mon Sep 18 05:23:57 2017 -0400 media: cec-core.rst/cec-ioc-receive.rst: clarify CEC_TX_STATUS_ERROR CEC_TX_STATUS_ERROR can be used if the HW cannot tell LOST_ARB and LOW_DRIVE apart, or when some other error occurs. It is not a replacement for NACK. So the hardware must be able to tell the difference between OK, NACK and 'something else'. Clarify the documentation (both public and kernel API) on this point. Also fix two small typos (this messages -> this message). Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Documentation/media/kapi/cec-core.rst | 7 +++++-- Documentation/media/uapi/cec/cec-ioc-receive.rst | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-) commit 9a59d9361a68b0f664372312debd7396eda3ed55 Author: Hans Verkuil Date: Mon Sep 18 06:26:03 2017 -0400 media: cec-ioc-dqevent.rst: fix typo The documentation talked about INITIAL_VALUE when the actual define is INITIAL_STATE. Fix this. Signed-off-by: Hans Verkuil Reported-by: Jonas Karlman Signed-off-by: Mauro Carvalho Chehab Documentation/media/cec.h.rst.exceptions | 2 -- Documentation/media/uapi/cec/cec-ioc-dqevent.rst | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) commit 805f23af6fc44138983ea92aee73419910d51563 Author: Hans Verkuil Date: Fri Sep 1 04:37:54 2017 -0400 media: cec-pin.c: use proper ktime accessor functions Use ktime_to_ns/ns_to_ktime. This makes it possible to work with older kernels and the media_build compatibility system. For the mainline kernel these functions are NOPs. Signed-off-by: Hans Verkuil Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab drivers/media/cec/cec-pin.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit 3fb5ec06578e4c85d3486b6a73cbeb07960a51ce Merge: cddd952 d5dd29e Author: David S. Miller Date: Fri Sep 22 21:29:10 2017 -0700 Merge branch 'ieee802154-for-davem-2017-09-20' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next Stefan Schmidt says: ==================== pull-request: ieee802154 2017-09-20 Here comes a pull request for ieee802154 changes I have queued up for this merge window. Normally these have been coming through the bluetooth tree but as this three have been falling through the cracks so far and I have to review and ack all of them anyway I think it makes sense if I save the bluetooth people some work and handle them directly. Its the first pull request I send to you so please let me know if I did something wrong or if you prefer a different format. ==================== Signed-off-by: David S. Miller commit cddd95231f9a769fbf905d4f43fbad3a607044c3 Merge: 52a59bd e0f911c Author: David S. Miller Date: Fri Sep 22 21:28:01 2017 -0700 Merge branch 'cxgb4-tc-flower' Rahul Lakkireddy says: ==================== cxgb4: add support to offload tc flower This series of patches add support to offload tc flower onto Chelsio NICs. Patch 1 adds basic skeleton to prepare for offloading tc flower flows. Patch 2 adds support to add/remove flows for offload. Flows can have accompanying masks. Following match and action are currently supported for offload: Match: ether-protocol, IPv4/IPv6 addresses, L4 ports (TCP/UDP) Action: drop, redirect to another port on the device. Patch 3 adds support to offload tc-flower flows having vlan actions: pop, push, and modify. Patch 4 adds support to fetch stats for the offloaded tc flower flows from hardware. Support for offloading more match and action types are to be followed in subsequent series. v2: - Setting ftid to -1 not required after bitmap_find_free_region in cxgb4_get_free_ftid. - Direct return can be used as jumping to error path is not needed if flower entry allocation failed in cxgb4_tc_flower_replace. Same applies if flower entry not found in cxgb4_tc_flower_destroy. - Also, removed an extra return from cxgb4_tc_flower_destroy. - Avoid wrapping line for netdev_err message. Also, use consistent error message string. ==================== Signed-off-by: David S. Miller commit e0f911c81e93fc23fe1a4fb0318ff1c3b1c9027f Author: Kumar Sanghvi Date: Thu Sep 21 23:41:16 2017 +0530 cxgb4: fetch stats for offloaded tc flower flows Add support to retrieve stats from hardware for offloaded tc flower flows. Also, poll for the stats of offloaded flows via timer callback. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy 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_filter.c | 76 +++++++++++++++++++++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 1 + .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 79 +++++++++++++++++++++- .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h | 3 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 2 + 6 files changed, 161 insertions(+), 1 deletion(-) commit cf2885a70fc71d5f6b434b86eedfc18ad66ba6f6 Author: Kumar Sanghvi Date: Thu Sep 21 23:41:15 2017 +0530 cxgb4: add support to offload action vlan Add support for offloading tc-flower flows having vlan actions: pop, push and modify. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 62488e4b53ae02d82ac000f91ec82b5cfb41d6f2 Author: Kumar Sanghvi Date: Thu Sep 21 23:41:14 2017 +0530 cxgb4: add basic tc flower offload support Add support to add/remove flows for offload. Following match and action are supported for offloading a flow: Match: ether-protocol, IPv4/IPv6 addresses, L4 ports (TCP/UDP) Action: drop, redirect to another port on the device. The qualifying flows can have accompanying mask information. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy 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_filter.c | 24 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 + .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 280 ++++++++++++++++++++- .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h | 17 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 1 + 6 files changed, 325 insertions(+), 2 deletions(-) commit 6a345b3dbd1ed83a7877993c6e23c977a84bb483 Author: Kumar Sanghvi Date: Thu Sep 21 23:41:13 2017 +0530 cxgb4: add tc flower offload skeleton Add basic skeleton to prepare for offloading tc-flower flows. Signed-off-by: Kumar Sanghvi Signed-off-by: Rahul Lakkireddy Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/Makefile | 4 +- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 22 +++++++++ .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 57 ++++++++++++++++++++++ .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h | 46 +++++++++++++++++ 4 files changed, 128 insertions(+), 1 deletion(-) commit 52a59bd509e3dc458be99dcf333b778e6e3b3749 Author: Alexey Dobriyan Date: Thu Sep 21 23:33:29 2017 +0300 net: use 32-bit arithmetic while allocating net device Private part of allocation is never big enough to warrant size_t. Space savings: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-10 (-10) function old new delta alloc_netdev_mqs 1120 1110 -10 Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 242c1a28eb61cb34974e8aa05235d84355940a8a Author: Gao Feng Date: Fri Sep 22 10:25:22 2017 +0800 net: Remove useless function skb_header_release There is no one which would invokes the function skb_header_release. So just remove it now. Signed-off-by: Gao Feng Signed-off-by: David S. Miller drivers/net/usb/asix_common.c | 2 +- include/linux/skbuff.h | 19 ------------------- net/batman-adv/soft-interface.c | 2 +- 3 files changed, 2 insertions(+), 21 deletions(-) commit 77478715ba9242017976fd01de189e77fa072f51 Author: Al Viro Date: Fri Sep 22 18:23:17 2017 -0400 ceph: use get_user_pages_fast() Signed-off-by: Al Viro net/ceph/pagevec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8dcf932d541487307fc7388ebfad5955f5fae098 Author: Al Viro Date: Fri Sep 22 18:22:05 2017 -0400 pvr2fs: use get_user_pages_fast() Signed-off-by: Al Viro drivers/video/fbdev/pvr2fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e1a58a5421c6a9f4ab74810d6ecbbdb6b1b2e2c7 Author: Al Viro Date: Fri Sep 22 18:21:11 2017 -0400 atomisp: use get_user_pages_fast() Signed-off-by: Al Viro drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 43bfe7bc3c2817f42548f650e82aa506d605c0a3 Author: Al Viro Date: Fri Sep 22 18:18:55 2017 -0400 st: use get_user_pages_fast() Signed-off-by: Al Viro drivers/scsi/st.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit a6e0d12fc6fa6e48b51858f4ef1c0469f8036985 Author: Al Viro Date: Fri Sep 22 18:16:11 2017 -0400 via_dmablit(): use get_user_pages_fast() Signed-off-by: Al Viro drivers/gpu/drm/via/via_dmablit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1aaa09caedc1d999fb324b4b77a88167bdfc531a Author: Al Viro Date: Mon Jan 30 02:45:08 2017 -0500 fsl_hypervisor: switch to get_user_pages_fast() Signed-off-by: Al Viro drivers/virt/fsl_hypervisor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ca36a6bbd85bad72596a15e1505483352333c88 Author: Al Viro Date: Sun Jan 29 03:12:00 2017 -0500 rapidio: switch to get_user_pages_fast() Signed-off-by: Al Viro drivers/rapidio/devices/rio_mport_cdev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 6ed2288ca93479f801f49daf9b6d674701f4c28e Author: Al Viro Date: Mon Jan 30 22:28:31 2017 -0500 vchiq_2835_arm: switch to get_user_pages_fast() Signed-off-by: Al Viro .../interface/vchiq_arm/vchiq_2835_arm.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) commit dd5437974964c759570d68e50ce13c313808f79a Author: Jason Wang Date: Fri Sep 22 14:38:58 2017 +0800 virtio-net: correctly set xdp_xmit for mergeable buffer We should set xdp_xmit only when xdp_do_redirect() succeed. Cc: John Fastabend Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 821b85366284542e00dd834062144c637e818ee0 Author: Jérôme de Bretagne Date: Mon Sep 18 00:57:12 2017 +0200 platform/x86: intel-hid: Power button suspend on Dell Latitude 7275 On Dell Latitude 7275 the 5-button array is not exposed in the ACPI tables, but notififies are still sent to the Intel HID device object (device ID INT33D5) in response to power button actions. They were ignored as the intel-hid driver was not prepared to take care of them until recently. Power button wakeup from suspend-to-idle was added in: commit 635173a17b03 ("intel-hid: Wake up Dell Latitude 7275 from suspend-to-idle") However power button suspend doesn't work yet on this platform so it would be good to add it also. On the affected platform (for which priv->array is NULL), add a new upfront check against the power button press notification (0xCE) to notify_handler(), outside the wakeup mode this time, which allows reporting the power button press event and triggers the suspend. Also catch and ignore the corresponding power button release notification (0xCF) to stop it from being reported as an "unknown event" in the logs. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196115 Tested-by: Jérôme de Bretagne Signed-off-by: Jérôme de Bretagne Acked-By: Mario Limonciello [dvhart: minor coding style and commit message format fix] Signed-off-by: Darren Hart (VMware) Signed-off-by: Darren Hart (VMware) drivers/platform/x86/intel-hid.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 12933ea2b8c1e1f87a5dfece947325ee9e6d65b0 Author: Mario Limonciello Date: Thu Sep 14 01:41:55 2017 -0500 platform/x86: intel-wmi-thunderbolt: Silence error cases These were raised by Lukas Wunner as potential DOS attacks against the system log by passing bad data to sysfs. Signed-off-by: Mario Limonciello Signed-off-by: Darren Hart (VMware) drivers/platform/x86/intel-wmi-thunderbolt.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit ae11c5b2c2dfe8768b51f73f491869ba2cd9d4f9 Author: Allen Pais Date: Wed Sep 13 16:29:31 2017 +0530 platform/x86: intel_telemetry_debugfs: Use standard ARRAY_SIZE() macro Use the standard ARRAY_SIZE() macro instead of the custom TELEM_EVT_LEN(). Signed-off-by: Allen Pais Signed-off-by: Darren Hart (VMware) drivers/platform/x86/intel_telemetry_debugfs.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit b2f2f0fc69056a495391cab792394965973aabf8 Author: Chris Wilson Date: Fri Sep 22 13:03:33 2017 +0100 drm/i915: Make i915_spin_request() static No users now outside of i915_wait_request(), so we can make it private to i915_gem_request.c, and assume the caller knows the seqno. In the process, also remove i915_gem_request_started() as that was only ever used by i915_spin_request(). Signed-off-by: Chris Wilson Cc: Michal Winiarski Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170922120333.25535-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_request.c | 27 +++++++++++++++++++------ drivers/gpu/drm/i915/i915_gem_request.h | 35 --------------------------------- 2 files changed, 21 insertions(+), 41 deletions(-) commit 14e25a03682f7ca0464ac7e3f3f10f02d885fed4 Author: Icenowy Zheng Date: Tue Aug 22 13:23:22 2017 +0800 ARM: sunxi: add support for R40 SoC Allwinner R40 is a new SoC, with Quad Core Cortex-A7 and peripherals like A20. Add support for it. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Documentation/arm/sunxi/README | 6 ++++++ Documentation/devicetree/bindings/arm/sunxi.txt | 1 + arch/arm/mach-sunxi/sunxi.c | 1 + 3 files changed, 8 insertions(+) commit 9e8dda2df7cc209d0165618e6d18b324c02c8348 Author: Icenowy Zheng Date: Tue Aug 22 13:23:21 2017 +0800 ARM: sunxi: fix the core number of V3s in sunxi README The Allwinner V3s SoC is not quad-core, but single-core. Fix this in the README file. Fixes: b074fede01c0 ("arm: sunxi: add support for V3s SoC") Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Documentation/arm/sunxi/README | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit b69116cd96ec641168ced9460675360fa6df84c8 Author: Icenowy Zheng Date: Tue Aug 22 13:23:20 2017 +0800 dt-bindings: add compatible string for Allwinner V3s SoC The compatible string for Allwinner V3s SoC used to be missing. Add it to the binding document. Fixes: b074fede01c0 ("arm: sunxi: add support for V3s SoC") Acked-by: Rob Herring Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/arm/sunxi.txt | 1 + 1 file changed, 1 insertion(+) commit e868adf21c0a25634d5dfa5b1e6dbf839306d8fa Author: Madalin Bucur Date: Mon Sep 18 16:39:47 2017 -0400 soc/fsl/qbman: Enable FSL_LAYERSCAPE config on ARM Signed-off-by: Madalin Bucur Signed-off-by: Claudiu Manoil [Stuart: changed to use ARCH_LAYERSCAPE] Signed-off-by: Stuart Yoder Signed-off-by: Roy Pledge Signed-off-by: Li Yang drivers/soc/fsl/qbman/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e6b909fe84ba891cc523a65a6b6af07f4e977c5f Author: Claudiu Manoil Date: Mon Sep 18 16:39:46 2017 -0400 soc/fsl/qbman: Add missing headers on ARM Unlike PPC builds, ARM builds need following headers explicitly: +#include for ioread32be() +#include for udelay() Signed-off-by: Claudiu Manoil Signed-off-by: Roy Pledge Signed-off-by: Li Yang drivers/soc/fsl/qbman/dpaa_sys.h | 2 ++ 1 file changed, 2 insertions(+) commit 21772c4355707fd1c919033adea67f29d7689f89 Author: Madalin Bucur Date: Mon Sep 18 16:39:45 2017 -0400 soc/fsl/qbman: different register offsets on ARM Signed-off-by: Madalin Bucur Signed-off-by: Claudiu Manoil Signed-off-by: Roy Pledge Signed-off-by: Li Yang drivers/soc/fsl/qbman/bman.c | 22 ++++++++++++++++++++++ drivers/soc/fsl/qbman/qman.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) commit 2c62f8b6fbd0431ccfb31b730a299d864a6bb8c9 Author: Madalin Bucur Date: Mon Sep 18 16:39:44 2017 -0400 soc/fsl/qbman: add QMAN_REV32 Add revision 3.2 of the QBMan block. This is the version for LS1043A and LS1046A SoCs. Signed-off-by: Madalin Bucur Signed-off-by: Roy Pledge Signed-off-by: Li Yang drivers/soc/fsl/qbman/qman_ccsr.c | 2 ++ drivers/soc/fsl/qbman/qman_priv.h | 1 + 2 files changed, 3 insertions(+) commit e6e2df69c8321fcb5497a409a1a2a3139b15c3d8 Author: Roy Pledge Date: Mon Sep 18 16:39:43 2017 -0400 soc/fsl/qbman: Rework portal mapping calls for ARM/PPC Rework portal mapping for PPC and ARM. The PPC devices require a cacheable coherent mapping while ARM will work with a non-cachable/write combine mapping. This also eliminates the need for manual cache flushes on ARM. This also fixes the code so sparse checking is clean. Signed-off-by: Roy Pledge Reviewed-by: Catalin Marinas Signed-off-by: Li Yang drivers/soc/fsl/qbman/bman.c | 18 ++++++++++-------- drivers/soc/fsl/qbman/bman_portal.c | 23 ++++++++++------------- drivers/soc/fsl/qbman/bman_priv.h | 8 +++----- drivers/soc/fsl/qbman/dpaa_sys.h | 15 +++++++++++---- drivers/soc/fsl/qbman/qman.c | 31 +++++++++++++------------------ drivers/soc/fsl/qbman/qman_portal.c | 23 ++++++++++------------- drivers/soc/fsl/qbman/qman_priv.h | 8 +++----- 7 files changed, 60 insertions(+), 66 deletions(-) commit 219e8e0580cc441504b75e291401cf108e1a78f3 Author: Valentin Rothberg Date: Mon Sep 18 16:39:42 2017 -0400 soc/fsl/qbman: Fix ARM32 typo The Kconfig symbol for 32bit ARM is 'ARM', not 'ARM32'. Signed-off-by: Valentin Rothberg Signed-off-by: Claudiu Manoil Signed-off-by: Roy Pledge Reviewed-by: Catalin Marinas Signed-off-by: Li Yang drivers/soc/fsl/qbman/dpaa_sys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6111d198362b9b3ffc1c253c74119cca9afd3968 Author: Claudiu Manoil Date: Mon Sep 18 16:39:41 2017 -0400 soc/fsl/qbman: Drop L1_CACHE_BYTES compile time check Not relevant and arch dependent. Overkill for PPC. Signed-off-by: Claudiu Manoil Signed-off-by: Roy Pledge Reviewed-by: Catalin Marinas Signed-off-by: Li Yang drivers/soc/fsl/qbman/dpaa_sys.h | 4 ---- 1 file changed, 4 deletions(-) commit f5bd22996038d5f45b158d5c14fd45209d7fbb5d Author: Madalin Bucur Date: Mon Sep 18 16:39:40 2017 -0400 soc/fsl/qbman: Drop set/clear_bits usage Replace PPC specific set/clear_bits API with standard bit twiddling so driver is portalable outside PPC. Signed-off-by: Madalin Bucur Signed-off-by: Claudiu Manoil Signed-off-by: Roy Pledge Reviewed-by: Catalin Marinas Signed-off-by: Li Yang drivers/soc/fsl/qbman/bman.c | 2 +- drivers/soc/fsl/qbman/qman.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit d21010789ce0efb48b56de02f57ae56cd40b6503 Author: Roy Pledge Date: Mon Sep 18 16:39:39 2017 -0400 dt-bindings: soc/fsl: Update reserved memory binding for QBMan Updates the QMan and BMan device tree bindings for reserved memory nodes. This makes the reserved memory allocation compatible with the shared-dma-pool usage. Signed-off-by: Roy Pledge Acked-by: Rob Herring Signed-off-by: Li Yang Documentation/devicetree/bindings/soc/fsl/bman.txt | 12 +++++----- Documentation/devicetree/bindings/soc/fsl/qman.txt | 26 ++++++++++++++++------ 2 files changed, 26 insertions(+), 12 deletions(-) commit 07f86917a450810107a010cc96e6777b2f400efe Author: Roy Pledge Date: Mon Sep 18 16:39:38 2017 -0400 soc/fsl/qbman: Use shared-dma-pool for QMan private memory allocations Use the shared-memory-pool mechanism for frame queue descriptor and packed frame descriptor record area allocations. Signed-off-by: Roy Pledge Reviewed-by: Catalin Marinas Signed-off-by: Li Yang drivers/soc/fsl/qbman/qman_ccsr.c | 93 ++++++++++++++++++++++++++------------- drivers/soc/fsl/qbman/qman_priv.h | 2 - drivers/soc/fsl/qbman/qman_test.h | 2 - 3 files changed, 63 insertions(+), 34 deletions(-) commit 5ae783c6a1e5441250da8e015141bff6b29f54fc Author: Roy Pledge Date: Mon Sep 18 16:39:37 2017 -0400 soc/fsl/qbman: Use shared-dma-pool for BMan private memory allocations Use the shared-memory-pool mechanism for free buffer proxy record area allocation. Signed-off-by: Roy Pledge Reviewed-by: Catalin Marinas Signed-off-by: Li Yang drivers/soc/fsl/qbman/bman_ccsr.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 42d0349784c74d8a1e92cfbec120b9a6868b0c25 Author: Roy Pledge Date: Mon Sep 18 16:39:36 2017 -0400 soc/fsl/qbman: Add common routine for QBMan private allocations The QBMan device uses several memory regions to manage frame queues and buffers. Add a common routine for extracting and initializing these reserved memory areas. Signed-off-by: Roy Pledge Reviewed-by: Catalin Marinas Signed-off-by: Li Yang drivers/soc/fsl/qbman/Makefile | 2 +- drivers/soc/fsl/qbman/dpaa_sys.c | 78 ++++++++++++++++++++++++++++++++++++++++ drivers/soc/fsl/qbman/dpaa_sys.h | 4 +++ 3 files changed, 83 insertions(+), 1 deletion(-) commit b4964680834708da00fd82e84d8cfc716bf829d1 Author: ashish kumar Date: Mon Aug 21 11:18:56 2017 +0530 soc/fsl/guts: Add compatible string for LS1088 Adding compatible string "ls1088a-dcfg" so that guts driver can be init for ls1088 Signed-off-by: Ashish Kumar Signed-off-by: Amrita Kumari Signed-off-by: Li Yang drivers/soc/fsl/guts.c | 1 + 1 file changed, 1 insertion(+) commit 7ce2e934178b1af66c99ffefd831ab0de7244747 Author: Karim Eshapa Date: Fri May 5 07:45:18 2017 +0200 soc/fsl/qman: Sleep instead of stuck hacking jiffies Use msleep() instead of stucking with long delay will be more efficient. Signed-off-by: Karim Eshapa Acked-by: Scott Wood Signed-off-by: Li Yang drivers/soc/fsl/qbman/qman.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit c2690bd69788c618bb75e1c7a71582ea93375fdf Author: Andi Shyti Date: Fri Sep 22 09:57:53 2017 -0700 Input: stmfts - use devm_device_add_group instead of sysfs_create_group. Signed-off-by: Andi Shyti Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/stmfts.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit aa469aafddca64d6570d2257b3443359af55ab88 Merge: c52f56a 0a7c74e Author: Ingo Molnar Date: Fri Sep 22 18:05:48 2017 +0200 Merge tag 'perf-core-for-mingo-4.15-20170922' 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: - Support direct --user-regs arguments in 'perf record', previously the only way to sample PERF_SAMPLE_REGS_USER was implicitly selecting it when recording callchains (Andi Kleen) - Support showing sampled user regs in 'perf script' (Andi Kleen) - Introduce the concept of weak groups in 'perf stat': try to set up a group, but if it's not schedulable fallback to not using a group. That gives us the best of both worlds: groups if they work, but still a usable fallback if they don't. E.g: (Andi Kleen) % perf stat -e '{branches,branch-misses,l1d.replacement,l2_lines_in.all,l2_rqsts.all_code_rd}:W' -a sleep 1 125,366,055 branches (80.02%) 9,208,402 branch-misses # 7.35% of all branches (80.01%) 24,560,249 l1d.replacement (80.00%) 43,174,971 l2_lines_in.all (80.05%) 31,891,457 l2_rqsts.all_code_rd (79.92%) - Support metrics in 'stat' and 'list'. A metric is a formula that uses multiple events to compute a higher level result (e.g. IPC). (Andi Kleen) - Add Intel processors vendor event metrics JSON files (Andi Kleen) - Add 'pid' and 'tid' options to 'perf sched timehist' (David Ahern) - Generate 'behavior' string table from kernel headers, helps getting new parameters when synchronizing kernel headers, like MADV_WIPEONFORK and MADV_KEEPONFORK, that are now beautied (Arnaldo Carvalho de Melo) - Improve TUI progress bar by showing how many bytes from a total were processed (Jiri Olsa) - Use scandir() to replace readdir(), prep work to have the synthesizing of PERF_RECORD_ entries for existing threads be multithreaded, making 'perf top' bearable on high core count systems such as Intel's Knights Landing/Mill (Kan Liang) - Allow creating a ~/.perfconfig file when setting a variable to its default value, previously it would bail out and not write such a file (Taeung Song) - Introduce wrapper for allowing purely single threaded apps to avoid the costs of locking (Arnaldo Carvalho de Melo) - Introduce hashtable to reduce the cost of thread lookup - Fix build C++ build wrt poison.h using void pointer arithmetic, affects only the embedded clang/llvm case, that is disabled by default (Arnaldo Carvalho de Melo) - Fix leaking rec_argv in error cases (Martin Kepplinger) - Remove Intel CQM perf test, that infrastructure was nuked (Xiaochen Shen) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit bd491d2ad3c071fb77f487a471aa66f205e2e7f2 Author: Arnd Bergmann Date: Tue Sep 5 16:59:20 2017 +0200 RDMA/qedr: fix build error without ipv6 When CONFIG_IPV6 disabled, we run into a link error: drivers/infiniband/hw/qedr/qedr_iw_cm.o: In function `qedr_addr6_resolve.isra.3': qedr_iw_cm.c:(.text+0x4e0): undefined reference to `ip6_route_output_flags' The ipv6 handling code is obviously not needed here, so this adds a compile-time check for the Kconfig symbol in all three places in the code that decide between ipv4 and ipv6. We don't have to worry about a link error wtih QEDR=y/IPV6=m, as that configuration is already prohibited by CONFIG_INFINIBAND depending on "m || IPV6 != m". Fixes: e411e0587e0d ("RDMA/qedr: Add iWARP connection management functions") Signed-off-by: Arnd Bergmann Acked-by: Michal Kalderon Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/qedr_iw_cm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 206f82ccda1eb62b3d97b8a86a7c21b7843acebc Author: Masahiro Yamada Date: Thu Sep 14 11:37:25 2017 +0900 gpio: thunderx: remove unused .map() hook from irq_domain_ops This driver implements .alloc() hook, so .map() is not used. Signed-off-by: Masahiro Yamada Tested-by: David Daney Signed-off-by: Linus Walleij drivers/gpio/gpio-thunderx.c | 13 ------------- 1 file changed, 13 deletions(-) commit 7fd0b1a2593647aba4538196dd80314fd134877b Author: Oscar Mateo Date: Thu Sep 21 16:19:49 2017 -0700 drm/i915/cnl: Add Gen10 LRC size The total size of the context has decreased with the removal of the URB_ATOMIC section. BSpec indicates 16750 DWORDs (17 pages), plus one page for PPHWSP, and I'm throwing an extra page for precaution. Signed-off-by: Oscar Mateo Cc: Rodrigo Vivi Cc: Daniele Ceraolo Spurio Cc: Ben Widawsky Acked-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1506035989-14295-1-git-send-email-oscar.mateo@intel.com drivers/gpu/drm/i915/intel_engine_cs.c | 2 ++ 1 file changed, 2 insertions(+) commit 0539cbb55ceeb46c1ad20ad97c9b0ceaa0e4ee1f Author: Antoine Tenart Date: Thu Sep 21 09:54:10 2017 +0200 arm64: dts: marvell: 8040-db: enable the SFP ports This patch enables the SFP ports on the Armada 8040 DB as these ports are now supported by the PPv2 driver (since the PHY is now optional). Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-8040-db.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 30967cfe30b9a84e38008c63d7866da29a550b14 Author: Antoine Tenart Date: Thu Sep 21 09:54:09 2017 +0200 arm64: dts: marvell: 7040-db: enable the SFP port This patch enables the SFP port on the Armada 7040 DB as this port is now supported by the PPv2 driver (since the PHY is now optional). Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-7040-db.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 723abeed6286e000d1722abb07e0977531b07686 Author: Antoine Tenart Date: Thu Sep 21 09:54:08 2017 +0200 arm64: dts: marvell: 7040-db: add comphy reference to Ethernet port This patch adds a comphy phandle to the Ethernet port in the 7040-db device tree. The comphy is used to configure the serdes PHYs used by these ports. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-7040-db.dts | 3 +++ 1 file changed, 3 insertions(+) commit 760b3843fcd88f2a46e66eec08e2e6023a425809 Author: Antoine Tenart Date: Thu Sep 21 09:54:07 2017 +0200 arm64: dts: marvell: mcbin: add comphy references to Ethernet ports This patch adds comphy phandles to the Ethernet ports in the mcbin device tree. The comphy is used to configure the serdes PHYs used by these ports. Signed-off-by: Antoine Tenart Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 9 +++++++++ 1 file changed, 9 insertions(+) commit 4f044a88a86adb4c8cc6cb1a7303bb9c61ea2caa Author: Michal Wajdeczko Date: Tue Sep 19 19:38:44 2017 +0000 drm/i915: Rename global i915 to i915_modparams Our global struct with params is named exactly the same way as new preferred name for the drm_i915_private function parameter. To avoid such name reuse lets use different name for the global. v5: pure rename v6: fix Credits-to: Coccinelle @@ identifier n; @@ ( - i915.n + i915_modparams.n ) Signed-off-by: Michal Wajdeczko Cc: Jani Nikula Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Ville Syrjala Cc: Joonas Lahtinen Acked-by: Joonas Lahtinen Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170919193846.38060-1-michal.wajdeczko@intel.com drivers/gpu/drm/i915/gvt/render.c | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 14 ++++---- drivers/gpu/drm/i915/i915_drv.c | 34 ++++++++++-------- drivers/gpu/drm/i915/i915_drv.h | 10 +++--- drivers/gpu/drm/i915/i915_gem.c | 4 +-- drivers/gpu/drm/i915/i915_gem_context.c | 12 +++---- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++-- drivers/gpu/drm/i915/i915_gpu_error.c | 6 ++-- drivers/gpu/drm/i915/i915_guc_submission.c | 2 +- drivers/gpu/drm/i915/i915_irq.c | 2 +- drivers/gpu/drm/i915/i915_params.c | 6 ++-- drivers/gpu/drm/i915/i915_params.h | 2 +- drivers/gpu/drm/i915/i915_pci.c | 6 ++-- drivers/gpu/drm/i915/i915_perf.c | 6 ++-- drivers/gpu/drm/i915/intel_bios.c | 7 ++-- drivers/gpu/drm/i915/intel_crt.c | 4 +-- drivers/gpu/drm/i915/intel_device_info.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 12 +++---- drivers/gpu/drm/i915/intel_dp.c | 4 +-- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_engine_cs.c | 4 +-- drivers/gpu/drm/i915/intel_fbc.c | 11 +++--- drivers/gpu/drm/i915/intel_guc_loader.c | 13 +++---- drivers/gpu/drm/i915/intel_guc_log.c | 26 +++++++------- drivers/gpu/drm/i915/intel_gvt.c | 12 +++---- drivers/gpu/drm/i915/intel_hangcheck.c | 2 +- drivers/gpu/drm/i915/intel_huc.c | 4 +-- drivers/gpu/drm/i915/intel_lrc.c | 4 +-- drivers/gpu/drm/i915/intel_lvds.c | 4 +-- drivers/gpu/drm/i915/intel_opregion.c | 2 +- drivers/gpu/drm/i915/intel_panel.c | 8 ++--- drivers/gpu/drm/i915/intel_pm.c | 6 ++-- drivers/gpu/drm/i915/intel_psr.c | 10 +++--- drivers/gpu/drm/i915/intel_ringbuffer.c | 8 ++--- drivers/gpu/drm/i915/intel_runtime_pm.c | 17 ++++----- drivers/gpu/drm/i915/intel_uc.c | 51 ++++++++++++++------------- drivers/gpu/drm/i915/intel_uncore.c | 22 ++++++------ 39 files changed, 182 insertions(+), 169 deletions(-) commit a3df2c857c103b1103c9d578d68193a6fbe63c61 Author: Chris Wilson Date: Thu Sep 21 22:09:03 2017 +0100 drm/i915: Confirm request->global_seqno after spin completion After we see our target seqno has been completed by the hw, we need to confirm that it still matches the request (as it may have been preempted before the spin completes). If the request no longer matches the target seqno, we need to restart the wait to reacquire that seqno. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Michal Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20170921210903.18337-1-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/i915_gem_request.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit de4d2106f88ad7d98bf3adc602885d1d9071b644 Author: Chris Wilson Date: Mon Sep 18 17:27:34 2017 +0100 drm/i915: Check waiter->seqno carefully in case of preemption If preemption occurs at precisely the right moment, we may decide that the wait is complete even though the wait's request is no longer executing (having been preempted). We handle this situation by double checking that request following deciding whether the wait is complete. Reported-by: Michał Winiarski Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20170918162734.21294-2-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/i915_irq.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 17b51ad8e5c051032d8e1d698e7dfd01d9133a92 Author: Chris Wilson Date: Mon Sep 18 17:27:33 2017 +0100 drm/i915: Only wake the waiter from the interrupt if passed As we now check if the seqno is complete in order to signal the fence, we can also decide not to wake up the first_waiter until it is ready (since it is waiting on the same seqno). The only caveat is that if we need the engine->irq_seqno_barrier to enforce some coherency between an interrupt and the seqno read, we have to always wake the waiter in order to perform that heavyweight barrier. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20170918162734.21294-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_irq.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit f0e2ce58f853634d7ad1a418a49bd5fbd556227c Author: raveendra padasalagi Date: Tue Aug 29 15:08:10 2017 +0530 crypto: brcm - Explicity ACK mailbox message Add support to explicity ACK mailbox message because after sending message we can know the send status via error attribute of brcm_message. This is needed to support "txdone_ack" supported in mailbox controller driver. Fixes: 9d12ba86f818 ("crypto: brcm - Add Broadcom SPU driver") Signed-off-by: Raveendra Padasalagi Reviewed-by: Anup Patel Reviewed-by: Scott Branden Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu drivers/crypto/bcm/cipher.c | 101 ++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 55 deletions(-) commit 52872f5288ea38ab9e2bb352a47b71051f7aefcc Author: Geliang Tang Date: Mon Aug 28 22:00:07 2017 +0800 crypto: drop unnecessary return statements Fix checkpatch.pl warnings: WARNING: void function return statements are not generally useful FILE: crypto/rmd128.c:218: FILE: crypto/rmd160.c:261: FILE: crypto/rmd256.c:233: FILE: crypto/rmd320.c:280: FILE: crypto/tcrypt.c:385: FILE: drivers/crypto/ixp4xx_crypto.c:538: FILE: drivers/crypto/marvell/cesa.c:81: FILE: drivers/crypto/ux500/cryp/cryp_core.c:1755: Signed-off-by: Geliang Tang Signed-off-by: Herbert Xu crypto/rmd128.c | 2 -- crypto/rmd160.c | 2 -- crypto/rmd256.c | 2 -- crypto/rmd320.c | 2 -- crypto/tcrypt.c | 1 - drivers/crypto/ixp4xx_crypto.c | 1 - drivers/crypto/marvell/cesa.c | 2 -- drivers/crypto/ux500/cryp/cryp_core.c | 1 - 8 files changed, 13 deletions(-) commit 06ec1f82bfa5078928e0efaa5ed350a1dcc91631 Author: Himanshu Jha Date: Sun Aug 27 11:52:48 2017 +0530 crypto: Use PTR_ERR_ZERO Use PTR_ERROR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. Build successfully. Signed-off-by: Himanshu Jha Signed-off-by: Herbert Xu drivers/crypto/marvell/tdma.c | 5 +---- drivers/crypto/mv_cesa.c | 5 +---- drivers/crypto/qce/ablkcipher.c | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) commit 18fddf5fd2111dd670156b3dfb2dfed16d7889b4 Author: Himanshu Jha Date: Sun Aug 27 02:45:30 2017 +0530 crypto: inside-secure - remove null check before kfree Kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha Signed-off-by: Herbert Xu drivers/crypto/inside-secure/safexcel_hash.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b8d3de85acb4434fb7fd5e7dee12204a55ff8fc2 Author: Himanshu Jha Date: Sun Aug 27 02:45:29 2017 +0530 crypto: n2 - remove null check before kfree kfree on NULL pointer is a no-op and therefore checking it is redundant. Signed-off-by: Himanshu Jha Acked-by: David S. Miller Signed-off-by: Herbert Xu drivers/crypto/n2_core.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 16d5cee5cf65ff704e59a1e70fa82bf798b5e75e Author: Arvind Yadav Date: Fri Aug 25 23:53:59 2017 +0530 crypto: padlock-sha - constify x86_cpu_id x86_cpu_id are not supposed to change at runtime. MODULE_DEVICE_TABLE and x86_match_cpu are working with const x86_cpu_id. So mark the non-const x86_cpu_id structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Herbert Xu drivers/crypto/padlock-sha.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d989364535803dfcd97e3b6832d9698109add6ff Author: Arvind Yadav Date: Fri Aug 25 23:53:42 2017 +0530 crypto: padlock-aes - constify x86_cpu_id x86_cpu_id are not supposed to change at runtime. MODULE_DEVICE_TABLE and x86_match_cpu are working with const x86_cpu_id. So mark the non-const x86_cpu_id structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Herbert Xu drivers/crypto/padlock-aes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e0a0b3a192af20193f074ed2ad9dd85a2e48d00 Author: Christian Lamparter Date: Fri Aug 25 15:47:25 2017 +0200 crypto: crypto4xx - pointer arithmetic overhaul This patch improves the readability of various functions, by replacing various void* pointers declarations with their respective structs *. This makes it possible to go for the eye-friendly array-indexing methods. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_alg.c | 26 ++++++++-------- drivers/crypto/amcc/crypto4xx_core.c | 60 +++++++++++++++--------------------- drivers/crypto/amcc/crypto4xx_core.h | 41 +++++++++++++----------- 3 files changed, 59 insertions(+), 68 deletions(-) commit 5d59ad6eea82ef8df92b4109615a0dde9d8093e9 Author: Christian Lamparter Date: Fri Aug 25 15:47:24 2017 +0200 crypto: crypto4xx - fix crypto4xx_build_pdr, crypto4xx_build_sdr leak If one of the later memory allocations in rypto4xx_build_pdr() fails: dev->pdr (and/or) dev->pdr_uinfo wouldn't be freed. crypto4xx_build_sdr() has the same issue with dev->sdr. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 40e3b847bff70edc28c5290d209e531da6f9e534 Author: Christian Lamparter Date: Fri Aug 25 15:47:23 2017 +0200 crypto: crypto4xx - replace crypto4xx_dev's scatter_buffer_size with constant scatter_buffer_size is always set to PPC4XX_SD_BUFFER_SIZE. I don't think there's any point in keeping the variable around. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.c | 7 +++---- drivers/crypto/amcc/crypto4xx_core.h | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) commit 5c727f92ea5e019fd216f73009eee2b6e0867726 Author: Christian Lamparter Date: Fri Aug 25 15:47:22 2017 +0200 crypto: crypto4xx - refactor crypto4xx_copy_pkt_to_dst() This patch refactors the crypto4xx_copy_pkt_to_dst() to use scatterwalk_map_and_copy() to copy the processed data between the crypto engine's scatter ring buffer and the destination specified by the ablkcipher_request. This also makes the crypto4xx_fill_one_page() function redundant. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.c | 126 +++++++++-------------------------- 1 file changed, 30 insertions(+), 96 deletions(-) commit f2a13e7cba9e2b16f4888fbd9cf2bc25b95945be Author: Christian Lamparter Date: Fri Aug 25 15:47:21 2017 +0200 crypto: crypto4xx - enable AES RFC3686, ECB, CFB and OFB offloads The crypto engine supports more than just aes-cbc. This patch enables the remaining AES block cipher modes that pass the testmanager's test vectors. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_alg.c | 66 ++++++++++++++++++++++++ drivers/crypto/amcc/crypto4xx_core.c | 98 ++++++++++++++++++++++++++++++++++++ drivers/crypto/amcc/crypto4xx_core.h | 10 ++++ drivers/crypto/amcc/crypto4xx_sa.h | 3 ++ 4 files changed, 177 insertions(+) commit 249c8d98ea339325dca481d5dae93686cd494059 Author: Christian Lamparter Date: Fri Aug 25 15:47:20 2017 +0200 crypto: crypto4xx - move and refactor dynamic_contents helpers This patch refactors and moves the dynamic_contents helper functions into the crypto4xx_sa.h header file. * get_dynamic_sa_iv_size is no longer needed, as the cryptoapi provides the required IV size information as well. * refactor the function declarations to use the a pointer to the dynamic_sa_contents union, instead of the crypto4xx_ctx. * rename get_dynamic_sa_offset_key_field to get_dynamic_sa_key_field. It returns the pointer to the key directly. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/Makefile | 2 +- drivers/crypto/amcc/crypto4xx_alg.c | 20 ++++----- drivers/crypto/amcc/crypto4xx_core.h | 3 -- drivers/crypto/amcc/crypto4xx_sa.c | 85 ------------------------------------ drivers/crypto/amcc/crypto4xx_sa.h | 28 ++++++++++++ 5 files changed, 39 insertions(+), 99 deletions(-) commit 453e3090b9c3f5da70b21648c2244e9821f0916d Author: Christian Lamparter Date: Fri Aug 25 15:47:19 2017 +0200 crypto: crypto4xx - fix dynamic_sa_ctl's sa_contents declaration The driver had a union dynamic_sa_contents in place that described the meaning of the bits in the sa_contents variable. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_alg.c | 4 ++-- drivers/crypto/amcc/crypto4xx_sa.c | 12 ++++++------ drivers/crypto/amcc/crypto4xx_sa.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit c587e65deacf8c86de2d7c51f1e81d0a4a9147a8 Author: Christian Lamparter Date: Fri Aug 25 15:47:18 2017 +0200 crypto: crypto4xx - remove double assignment of pd_uinfo->state crypto4xx_put_pd_to_pdr() already clears the flag. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.c | 1 - 1 file changed, 1 deletion(-) commit 886c251fd4ca40a27697afec7bc44c115e803d78 Author: Christian Lamparter Date: Fri Aug 25 15:47:17 2017 +0200 crypto: crypto4xx - remove extern statement before function declaration All function declarations are "extern" by default, there is no need to specify it explicitly. For C99 states in 6.2.2.5: "If the declaration of an identifier for a function has no storage-class specifier, its linkage is determined exactly as if it were declared with the storage-class specifier extern." Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.h | 48 ++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) commit 1ef52a95ea53c3c54b061e3f1af85976356c7132 Author: Christian Lamparter Date: Fri Aug 25 15:47:16 2017 +0200 crypto: crypto4xx - set CRYPTO_ALG_KERN_DRIVER_ONLY flag The security offload function is performed by a cryptographic engine core attached to the 128-bit PLB (processor local bus) with builtin DMA and interrupt controllers. This, I think, satisfies the requirement for the CRYPTO_ALG_KERN_DRIVER_ONLY flag. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 81065f66dd99b3af58626a914b8c0fcff6b8b0ba Author: Christian Lamparter Date: Fri Aug 25 15:47:15 2017 +0200 crypto: crypto4xx - remove unused definitions and write-only variables This patch removes several unused code and definitons (structs, variables, ...). Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_alg.c | 6 ------ drivers/crypto/amcc/crypto4xx_core.c | 2 +- drivers/crypto/amcc/crypto4xx_core.h | 16 ---------------- 3 files changed, 1 insertion(+), 23 deletions(-) commit a728a196d253530f17da5c86dc7dfbe58c5f7094 Author: Christian Lamparter Date: Fri Aug 25 15:47:14 2017 +0200 crypto: crypto4xx - remove bad list_del alg entries are only added to the list, after the registration was successful. If the registration failed, it was never added to the list in the first place. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu drivers/crypto/amcc/crypto4xx_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f1f2237ff699bbc1a0265ed10407ae8d4a52008e Author: PrasannaKumar Muralidharan Date: Wed Aug 23 20:34:43 2017 +0530 dt/bindings: exynos-rng: Move dt binding documentation to bindings/crypto Samsung exynos PRNG driver is using crypto framework instead of hw_random framework. So move the devicetree binding to crypto folder. Signed-off-by: PrasannaKumar Muralidharan Reviewed-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu .../devicetree/bindings/crypto/samsung,exynos-rng4.txt | 17 +++++++++++++++++ .../devicetree/bindings/rng/samsung,exynos-rng4.txt | 17 ----------------- MAINTAINERS | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) commit c0133b009ec28eee27966f6e3ed99bfdb3f17a21 Author: PrasannaKumar Muralidharan Date: Tue Aug 22 21:52:24 2017 +0530 hwrng: timeriomem - Remove 'max < 4' condition check In read routiene max is always >= 4. The check whether 'max < 4' is not necessary. Remove it. Signed-off-by: PrasannaKumar Muralidharan Acked-By: Rick Altherr Signed-off-by: Herbert Xu drivers/char/hw_random/timeriomem-rng.c | 7 ------- 1 file changed, 7 deletions(-) commit 46d93748e5a3628f9f553832cd64d8a59d8bafde Author: Corentin LABBE Date: Tue Aug 22 10:08:18 2017 +0200 crypto: aesni - Use GCM IV size constant This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_glue.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e0ab7e9c6b92ae8e57de157fa7f419ebd18abb25 Author: Corentin LABBE Date: Tue Aug 22 10:08:17 2017 +0200 crypto: gcm - Use GCM IV size constant This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu crypto/gcm.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit cb3f3817519ceed90d210b78bb85bfe92310d0ec Author: Corentin LABBE Date: Tue Aug 22 10:08:16 2017 +0200 crypto: omap - Use GCM IV size constant This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/omap-aes-gcm.c | 7 ++++--- drivers/crypto/omap-aes.c | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) commit 8f6acb7fbf30da326b58ba092949fcd3ebadb01d Author: Corentin LABBE Date: Tue Aug 22 10:08:15 2017 +0200 crypto: chelsio - Use GCM IV size constant This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/chelsio/chcr_algo.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 07b83f437d9129adda47d78bdadd7813a008d092 Author: Corentin LABBE Date: Tue Aug 22 10:08:14 2017 +0200 crypto: mediatek - Use GCM IV size constant This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a59851d2f220e6653f8878bc312ad61f108fd3c9 Author: Corentin LABBE Date: Tue Aug 22 10:08:13 2017 +0200 crypto: bcm - Use GCM IV size constant This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/bcm/cipher.c | 8 ++++---- drivers/crypto/bcm/cipher.h | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) commit 219d51c759c3ecd04372aa6b3ce74bdc4911f281 Author: Corentin LABBE Date: Tue Aug 22 10:08:12 2017 +0200 crypto: atmel - Use GCM IV size constant This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/atmel-aes.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fdd0f3d8922dd2afd569a937affc331cb01aa344 Author: Corentin LABBE Date: Tue Aug 22 10:08:11 2017 +0200 crypto: nx - Use GCM IV size constant This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/nx/nx-aes-gcm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit cf0bd0ae19f44b8d5ccf5e1017fde382a7fff425 Author: Corentin LABBE Date: Tue Aug 22 10:08:10 2017 +0200 crypto: ccp - Use GCM IV size constant This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/ccp/ccp-crypto-aes-galois.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 7545e166535b349cc4dadea19cf9ee9494563182 Author: Corentin LABBE Date: Tue Aug 22 10:08:09 2017 +0200 crypto: caam - Use GCM IV size constant This patch replace GCM IV size value by their constant name. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu drivers/crypto/caam/caamalg.c | 10 +++++----- drivers/crypto/caam/compat.h | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) commit ef780324592dd639e4bfbc5b9bf8934b234b7c99 Author: Corentin LABBE Date: Tue Aug 22 10:08:08 2017 +0200 crypto: gcm - add GCM IV size constant Many GCM users use directly GCM IV size instead of using some constant. This patch add all IV size constant used by GCM. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu include/crypto/gcm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit e47270665b5fcdf8a9ae628e603119e998ca3715 Author: Ryder Lee Date: Tue Aug 22 15:53:39 2017 +0800 crypto: mediatek - Add empty messages check in GCM mode Currently, empty messages are not supported in GCM mode, hence add a check to prevent producing incorrect results. Signed-off-by: Ryder Lee Signed-off-by: Herbert Xu drivers/crypto/mediatek/mtk-aes.c | 5 +++++ 1 file changed, 5 insertions(+) commit b7e2753040a2fef0f748c615121577da3f846781 Author: Gilad Ben-Yossef Date: Mon Aug 21 13:51:29 2017 +0300 crypto: sm3 - add SM3 test vectors Add testmgr and tcrypt tests and vectors for SM3 secure hash. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu crypto/tcrypt.c | 14 +++++++++++- crypto/testmgr.c | 6 +++++ crypto/testmgr.h | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 1 deletion(-) commit 4f0fc1600edbdb3612b931aa5076ca984f7ee8fe Author: Gilad Ben-Yossef Date: Mon Aug 21 13:51:28 2017 +0300 crypto: sm3 - add OSCCA SM3 secure hash Add OSCCA SM3 secure hash (OSCCA GM/T 0004-2012 SM3) generic hash transformation. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu crypto/Kconfig | 11 +++ crypto/Makefile | 1 + crypto/sm3_generic.c | 210 ++++++++++++++++++++++++++++++++++++++++++++++ include/crypto/sm3.h | 40 +++++++++ include/crypto/sm3_base.h | 117 ++++++++++++++++++++++++++ 5 files changed, 379 insertions(+) commit 1c9fa294fe80f85c069c64d12b2429cf99a62937 Author: Colin Ian King Date: Sun Aug 20 22:34:38 2017 +0100 crypto: aesni - make arrays aesni_simd_skciphers and aesni_simd_skciphers2 static Arrays aesni_simd_skciphers and aesni_simd_skciphers2 are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'aesni_simd_skciphers' was not declared. Should it be static? symbol 'aesni_simd_skciphers2' was not declared. Should it be static? Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu arch/x86/crypto/aesni-intel_glue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a502e1089e3f711599023de5baa3af2b911c630a Author: lionel.debieve@st.com Date: Fri Aug 18 15:54:01 2017 +0200 crypto: stm32/hash - Remove uninitialized symbol Remove err symbol as this is not used in the thread context and the variable is not initialized. Signed-off-by: Lionel Debieve Signed-off-by: Herbert Xu drivers/crypto/stm32/stm32-hash.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 677c4f4c228c6fdc24919408f7f89709b2f7d67e Author: Arvind Yadav Date: Thu Aug 17 23:06:23 2017 +0530 hwrng: pseries - constify vio_device_id vio_device_id are not supposed to change at runtime. All functions working with vio_device_id provided by work with const vio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Herbert Xu drivers/char/hw_random/pseries-rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f096ced9e9d8cabdf9c61b5eef7188775c1daf05 Author: Arvind Yadav Date: Thu Aug 17 18:44:11 2017 +0530 crypto: nx-842 - constify vio_device_id vio_device_id are not supposed to change at runtime. All functions working with vio_device_id provided by work with const vio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Herbert Xu drivers/crypto/nx/nx-842-pseries.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fc342d2e672630fdda689a4d3d3b90745c70451 Author: Arvind Yadav Date: Thu Aug 17 18:44:10 2017 +0530 crypto: nx - constify vio_device_id vio_device_id are not supposed to change at runtime. All functions working with vio_device_id provided by work with const vio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Herbert Xu drivers/crypto/nx/nx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 560b1a82ee87288c18aca31ee3053272c3737fe5 Author: Kamil Konieczny Date: Thu Aug 17 12:11:36 2017 +0200 crypto: doc - clarify return values for async hash methods * fix documentation of return values for crypto_ahash_init(), crypto_ahash_finup(), crypto_ahash_final(), crypto_ahash_digest() and crypto_ahash_update() Also while at it: * add notes for device driver developers in struct ahash_alg description * fix description of @final method in struct ahash_alg * fix typo in crypto_ahash_finup() description Signed-off-by: Kamil Konieczny Signed-off-by: Herbert Xu include/crypto/hash.h | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 0a660487ddcc69450387bdc99aeba529484c4bf4 Author: Heiko Stuebner Date: Sun Sep 3 22:28:41 2017 +0200 ARM: dts: rockchip: enable gpu on rk3188-radxarock Enable the gpu node on that board. Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3188-radxarock.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 4fcac83b4f2b98f7e9b71d91e44680528b3c2cd4 Author: Heiko Stuebner Date: Sat Aug 26 14:06:01 2017 +0200 ARM: dts: rockchip: add gpu nodes on rk3066/rk3188 The old Cortex-A9 socs use Mali400 GPUs with 4 pixel processors. This adds the core gpu nodes with the per-soc interrupts but sharing the core node. Rockchip SoCs use only one clock to supply the GPUs Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3066a.dtsi | 24 ++++++++++++++++++++++++ arch/arm/boot/dts/rk3188.dtsi | 24 ++++++++++++++++++++++++ arch/arm/boot/dts/rk3xxx.dtsi | 11 +++++++++++ 3 files changed, 59 insertions(+) commit 451ef43b4385ea17eca4da576d74ced8fdba13b7 Author: Heiko Stuebner Date: Wed Jul 12 19:07:05 2017 +0200 ARM: dts: rockchip: add rk322x gpu node The rk3228/3229 uses a Mali400 GPU with two pixel processors. This adds the core node for it, which can be enabled in board devicetrees. Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk322x.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 3584473a9441e43699e9f0c70d9f5de385cd3f73 Author: Heiko Stuebner Date: Wed Jul 12 19:07:24 2017 +0200 ARM: dts: rockchip: enable the gpu on rk3036-kylin boards Enable the gpu node and add the gpu supply for it. Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3036-kylin.dts | 5 +++++ 1 file changed, 5 insertions(+) commit ec45ee8569acca970a9b310f7c99a9e3bfc1bc0b Author: Heiko Stuebner Date: Wed Jul 12 19:06:52 2017 +0200 ARM: dts: rockchip: add rk3036 gpu node The rk3036 uses a Mali400 GPU with one pixel processor. This adds the core node for it, which can be enabled in board devicetrees. Rockchip Mali GPUs use only one clock line for both bus and core. Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3036.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 6a4d02f88fa2b6c21d8ba645e690bdbfe6adcb1f Author: Heiko Stuebner Date: Fri Sep 15 11:07:55 2017 +0200 dt-bindings: gpu: mali-utgard: add optional power-domain reference On some socs Mali Utgard gpus have both soc power-domains and external supplying regulators, so add an optional power-domains property for reference. Signed-off-by: Heiko Stuebner Acked-by: Rob Herring Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt | 4 ++++ 1 file changed, 4 insertions(+) commit dc1f65c5bd04918a8975009d694fa244f433d08e Author: Heiko Stuebner Date: Sun Sep 3 22:09:49 2017 +0200 dt-bindings: gpu: mali-utgard: add optional supply regulator Mali GPUs have a separate supplying regulator in a lot of socs, so describe a mali-supply property. The already described operating points will likely also need access to this regulator. Signed-off-by: Heiko Stuebner Acked-by: Rob Herring Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 6e480762aa3fb83a038761a54343e197a984821a Author: Heiko Stuebner Date: Sun Sep 3 21:53:12 2017 +0200 dt-bindings: gpu: mali-utgard: Add Rockchip Utgard Malis Some (older or lower power) Rockchip socs use Utgard-based Mali-GPUs. So add the necessary compatibles for them. As the setup is the same for all of them (needing only the additional reset line), they get added in a somewhat condensed form, to not inflate the document unnecessary. Signed-off-by: Heiko Stuebner Acked-by: Rob Herring Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt | 8 ++++++++ 1 file changed, 8 insertions(+) commit a9a1d2a7827c9cf780966d0879c73ef5a91380e9 Author: Linus Walleij Date: Fri Sep 22 11:02:10 2017 +0200 pinctrl/gpio: Unify namespace for cross-calls The pinctrl_request_gpio() and pinctrl_free_gpio() break the nice namespacing in the other cross-calls like pinctrl_gpio_foo(). Just rename them and all references so we have one namespace with all cross-calls under pinctrl_gpio_*(). Signed-off-by: Linus Walleij Documentation/driver-api/pinctl.rst | 6 +++--- Documentation/gpio/gpio-legacy.txt | 10 +++++----- Documentation/translations/zh_CN/gpio.txt | 6 +++--- drivers/gpio/gpio-aspeed.c | 4 ++-- drivers/gpio/gpio-em.c | 4 ++-- drivers/gpio/gpio-pxa.c | 4 ++-- drivers/gpio/gpio-rcar.c | 4 ++-- drivers/gpio/gpio-tegra.c | 4 ++-- drivers/gpio/gpio-tz1090.c | 4 ++-- drivers/gpio/gpiolib.c | 4 ++-- drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 4 ++-- drivers/pinctrl/bcm/pinctrl-nsp-gpio.c | 4 ++-- drivers/pinctrl/core.c | 12 ++++++------ drivers/pinctrl/core.h | 2 +- drivers/pinctrl/meson/pinctrl-meson.c | 4 ++-- drivers/pinctrl/sh-pfc/gpio.c | 4 ++-- drivers/pinctrl/sirf/pinctrl-atlas7.c | 4 ++-- drivers/pinctrl/sirf/pinctrl-sirf.c | 4 ++-- drivers/pinctrl/spear/pinctrl-plgpio.c | 6 +++--- drivers/pinctrl/stm32/pinctrl-stm32.c | 4 ++-- include/linux/pinctrl/consumer.h | 8 ++++---- 21 files changed, 53 insertions(+), 53 deletions(-) commit 821797e06903c53ff1e9be0be3dca651b3483396 Author: Colin Ian King Date: Thu Sep 21 23:39:59 2017 +0100 staging: xgifb: make const array static to shink object code size Don't populate const array LCDARefreshIndex on the stack, instead make it static. Makes the object code smaller by 340 bytes: Before: text data bss dec hex filename 84949 12336 0 97285 17c05 drivers/staging/xgifb/vb_setmode.o After: text data bss dec hex filename 84506 12432 0 96938 17aaa drivers/staging/xgifb/vb_setmode.o (gcc version 7.2.0 x86_64) Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/vb_setmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cbf83fb8743499da6cf592067a46b1b2b7db399f Author: Dan Carpenter Date: Thu Sep 21 10:14:09 2017 +0300 staging: vc04_services: remove BCM2835_VCHIQ_SUPPORT_MEMDUMP BCM2835_VCHIQ_SUPPORT_MEMDUMP lets you look through any user memory. That's too big of an information leak from a security perspective. The debugging dumps need to be more specific to this driver. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/Kconfig | 12 -- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 151 --------------------- 2 files changed, 163 deletions(-) commit f57329c6fc2d0787f3d020d029bce96a5ea0399b Author: Janani Sankara Babu Date: Thu Sep 21 11:09:55 2017 +0530 staging:rtl8188eu:hal Fix wrong comparison to False This patch solves the warning "Using comparison to false is error prone" Signed-off-by: Janani Sankara Babu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/odm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35a53b9a37ca57b7d18e8f92429526c35be244b1 Author: Janani Sankara Babu Date: Thu Sep 21 11:12:46 2017 +0530 staging:rtl8188eu Fix remove semicolon in do {}while(0) This patch removes the semicolon at the end of while statement in the do while macro , inorder to avoid it behaving like compound statement. Signed-off-by: Janani Sankara Babu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c937c1390cc1ca95032e56b4ec8c4e32e54debe Author: Kees Cook Date: Wed Sep 20 16:27:50 2017 -0700 staging/comedi/das16: Make timer initialization unconditional With timer initialization made unconditional, there is no reason to make del_timer_sync() calls conditionally, there by removing the test of the .data field. Cc: H Hartley Sweeten Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman drivers/staging/comedi/drivers/das16.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 4b26706c77ada60d92ca1846a7956298edcc78ea Author: Georgiana Chelu Date: Fri Sep 22 00:52:14 2017 -0700 Staging: irda: net: Fix style issues Fix minor coding style issues found by checkpatch.pl. Signed-off-by: Georgiana Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/irda/net/irda_device.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit c8d2d20e0c02f2226b65af1c955f600003f83503 Author: Georgiana Chelu Date: Fri Sep 22 00:52:13 2017 -0700 Staging: irda: net: Use NOT operator instead of comparison to NULL Fix issues find by checkpatch.pl. CHECK: Comparison to NULL could be written "!dongles" CHECK: Comparison to NULL could be written "!tasks" Signed-off-by: Georgiana Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/irda/net/irda_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 43aac03aaac35343f6c9a0a9b8159bd1a7fcdeda Author: Georgiana Chelu Date: Fri Sep 22 00:52:12 2017 -0700 Staging: irda: net: Do not initialise statics to NULL There is no need to initialize static variables to NULL because they are stored in .bss segment. This segment is initialized to 0 at the beginning of the code execution. Issue found by checkpatch.pl. ERROR: do not initialise statics to NULL Signed-off-by: Georgiana Chelu Signed-off-by: Greg Kroah-Hartman drivers/staging/irda/net/irda_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a050fe5ceb94524cf20afe62f1ee9f8438aff463 Author: Harsha Sharma Date: Fri Sep 22 13:07:03 2017 +0530 staging: vc04_services: Remove typedef struct Remove typedef from struct as linux-kernel coding style tends to avoid using typedefs Done using following coccinelle semantic patch @r1@ type T; @@ typedef struct { ... } T; @script:python c1@ T2; T << r1.T; @@ if T[-2:] =="_t" or T[-2:] == "_T": coccinelle.T2 = T[:-2]; else: coccinelle.T2 = T; print T, coccinelle.T2 @r2@ type r1.T; identifier c1.T2; @@ -typedef struct + T2 { ... } -T ; @r3@ type r1.T; identifier c1.T2; @@ -T +struct T2 Signed-off-by: Harsha Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 44 +++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) commit ee0dd523bcb98bb58608b7354a321ee28d6f42f0 Author: Georgiana Chelu Date: Wed Sep 20 23:32:17 2017 +0300 Staging: rtlwifi: halmac: Remove unnecessary 'out of memory' messages Remove unnecessary messages because OOM (Out Of Memory Manager) reports memory allocation fail messages. The return value is clear regarding the problem, so there is no need for the 'out of memory' comments. Also, delete braces {} for single if statement blocks to improve the coding style. Fix issues found by by checkpatch.pl. WARNING: Possible unnecessary 'out of memory' message. WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Georgiana Chelu Signed-off-by: Greg Kroah-Hartman .../rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c | 44 ++++++---------------- 1 file changed, 11 insertions(+), 33 deletions(-) commit eb05448d08f408fcb1fec4c9f85cda17ddbc2e43 Author: Georgiana Chelu Date: Tue Sep 19 22:54:06 2017 +0300 Staging: rtl8192u: ieee80211: Use netdev_info instead of printk Replace printk with netdev_info because struct ieee80211_device contains a net_device structure. Issue found by checkpatch.pl script. WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... Signed-off-by: Georgiana Chelu Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8438964f35b1afa427767147ade58d44758c692d Author: Kishon Vijay Abraham I Date: Wed Sep 6 17:15:56 2017 +0530 MAINTAINERS: Add TI OMAP SDHCI Maintainer Add Maintainer for the TI OMAP SDHCI driver. Signed-off-by: Kishon Vijay Abraham I Acked-by: Adrian Hunter Acked-by: Tony Lindgren Signed-off-by: Ulf Hansson MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) commit 7d326930d3522a1183b8d54126c524fcbccd3343 Author: Kishon Vijay Abraham I Date: Wed Sep 6 17:15:55 2017 +0530 mmc: sdhci-omap: Add OMAP SDHCI driver Create a new sdhci-omap driver to configure the eMMC/SD/SDIO controller in TI's OMAP SoCs making use of the SDHCI core library. For OMAP specific configurations, populate sdhci_ops with OMAP specific callbacks and use SDHCI quirks. Enable only high speed mode for both SD and eMMC here and add other UHS mode support later. Signed-off-by: Kishon Vijay Abraham I Acked-by: Tony Lindgren Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson drivers/mmc/host/Kconfig | 12 + drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-omap.c | 607 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 620 insertions(+) commit 9ebd65cbdfbf59e7ef4b9c0c8fd767ff63f60411 Author: Kishon Vijay Abraham I Date: Wed Sep 6 17:15:54 2017 +0530 dt-bindings: sdhci-omap: Add bindings for the sdhci-omap controller Add binding for the TI's sdhci-omap controller. Signed-off-by: Kishon Vijay Abraham I Acked-by: Tony Lindgren Acked-by: Rob Herring Signed-off-by: Ulf Hansson Documentation/devicetree/bindings/mmc/sdhci-omap.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 7aaa2b64c987db7ef855bd8147eeb3aad0cf611c Merge: 66162be 27eae9d Author: Ulf Hansson Date: Fri Sep 22 09:46:40 2017 +0200 Merge tag 'regulator-pbias-variants' This pulls in a regulator change for OMAP from git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator regulator: Add support for different OMAP variants in the pbias regulator Signed-off-by: Ulf Hansson commit 66162becb79424ea837cf0436bf1d41a212f30a4 Author: Kishon Vijay Abraham I Date: Thu Aug 31 15:48:44 2017 +0530 mmc: host: omap_hsmmc: Remove setting PBIAS voltage PBIAS voltage should be set along with setting vqmmc voltage and these voltages should be set as part of start_signal_voltage_switch callback. However since omap_hsmmc is about to be deprecated, remove setting of PBIAS voltage leaving the PBIAS voltage to be at the reset value of 3.3V (we'll never have to change this to 1.8V since UHS mode support will not be added to omap_hsmmc). This will let pbias regulator driver to be fixed to support a maximum voltage of 3.3V. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Ulf Hansson drivers/mmc/host/omap_hsmmc.c | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) commit 647911c85aef5e027c7e389e10be02ca6575b772 Author: Hou Zhiqiang Date: Fri Sep 22 15:08:01 2017 +0800 arm64: dts: ls1088a: add PCIe controller DT nodes The LS1088a implements 3 PCIe 3.0 controllers. Signed-off-by: Hou Zhiqiang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 72 ++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit a3bbf4c5844c3d030d64fe2620c7413547316f1c Author: Hou Zhiqiang Date: Mon Sep 18 17:32:22 2017 +0800 arm64: dts: ls1088a: add gicv3 ITS DT node Add ITS device tree node, which will be used by PCIe controller. Signed-off-by: Hou Zhiqiang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) commit bef52aaccaa8904181e29d3695215ed220dae2f2 Author: Hou Zhiqiang Date: Mon Sep 18 17:32:21 2017 +0800 arm64: dts: ls2088a: add pcie support The physical memory map address and CCSR registers map address are different between LS2088A and other LS2080A series SoCs. Signed-off-by: Hou Zhiqiang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit e8901f3ab5b5c2ce75abdcd182b07d00fd6746fe Author: Masahiro Yamada Date: Fri Sep 22 14:58:23 2017 +0900 dt-bindings: nand: denali: reduce the register space in the example This example allocates much more than needed for address regions. As for "denali_reg", as you see in drivers/mtd/nand/denali.h, all registers fit in 0x1000. As for "nand_data", this IP is generally configured to use Indexed Addressing mode, where there are only two registers in the address translation module (CTRL: 0x00, DATA: 0x10). Altera SOCFPGA is also this case. So, 0x20 is enough. Signed-off-by: Masahiro Yamada Acked-by: Rob Herring Signed-off-by: Boris Brezillon Documentation/devicetree/bindings/mtd/denali-nand.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 89dcb27b09fdcc8b585791815be07413d0487102 Author: Masahiro Yamada Date: Fri Sep 22 12:46:49 2017 +0900 mtd: nand: denali: change the setup_dma choice into hook The previous commit added some hooks into struct denali_nand_info, so here is one more for clean-up. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 15 +++++---------- drivers/mtd/nand/denali.h | 2 ++ 2 files changed, 7 insertions(+), 10 deletions(-) commit 29c4dd928735d5668b3108d350c30be7d0dc68fb Author: Masahiro Yamada Date: Fri Sep 22 12:46:48 2017 +0900 mtd: nand: denali: support direct addressing mode The Denali NAND IP core decodes the lower 28 bits of the slave address to get the control information; bit[27:26]=mode, bit[25:24]=bank, etc. This means 256MB address range must be allocated for this IP. (Direct Addressing) For systems with address space limitation, the Denali IP provides an optional module that translates the addressing - address and data are latched by the registers in the translation module. (Indexed Addressing) The addressing mode can be selected when the delivered RTL is configured, and it can be read out from the FEATURES register. Most of SoC vendors would choose Indexed Addressing to save the address space, but Direct Addressing is possible as well, and it can be easily supported by adding ->host_{read,write} hooks. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 109 +++++++++++++++++++++++++++++----------------- drivers/mtd/nand/denali.h | 2 + 2 files changed, 70 insertions(+), 41 deletions(-) commit c70b5eb20a5dd9b3e4f68e041ad7526c94a2945e Author: Masahiro Yamada Date: Fri Sep 22 12:46:47 2017 +0900 mtd: nand: denali: remove unneeded init of ECC_ENABLE register The ECC correction is properly enabled/disabled before the page read/write. There is no need to set up this at the beginning of the probe. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 2 -- 1 file changed, 2 deletions(-) commit 5f2baae00542b2203e6d0fa77890f64ff741aaf3 Author: Masahiro Yamada Date: Fri Sep 22 12:46:46 2017 +0900 mtd: nand: denali: use upper/lower_32_bits() macro for clean-up I used (uint64_t) cast to avoid "right shift count >= width of type" warning. provides nice helpers to cater to it. The code will be cleaner, and easier to understand. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8582a03e028f666d15acc651e0491c02941d13e7 Author: Masahiro Yamada Date: Fri Sep 22 12:46:45 2017 +0900 mtd: nand: denali: clean up comments This driver explains too much about what is apparent from the code. Comments around basic APIs such as init_completion(), spin_lock_init(), etc. seem unneeded lessons to kernel developers. (With those comments dropped, denali_drv_init() is small enough, so it has been merged into the probe function.) Also, NAND driver developers should know the NAND init procedure, so there is no need to explain nand_scan_ident/tail. I removed FSF's address from the license blocks, and added simple comments to struct members. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 52 +++++-------------------------------------- drivers/mtd/nand/denali.h | 24 +++++++------------- drivers/mtd/nand/denali_dt.c | 1 - drivers/mtd/nand/denali_pci.c | 2 -- 4 files changed, 13 insertions(+), 66 deletions(-) commit 8e4cbf7f0a55a235fdd8c088da1259b9fe8e9393 Author: Masahiro Yamada Date: Fri Sep 22 12:46:44 2017 +0900 mtd: nand: denali: use more FIELD_PREP / FIELD_GET where appropriate In several places in this driver, the register fields are retrieved as follows: val = reg & FOO_MASK; Then, modified as follows: reg &= ~FOO_MASK; reg |= val; This code relies on its shift is 0, which we will never know until we check the definition of FOO_MASK. Use FIELD_PREP / FIELD_GET where appropriate. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit e0d53b3f8ed2b14dab54a04a4589fa72b0827fa5 Author: Masahiro Yamada Date: Fri Sep 22 12:46:43 2017 +0900 mtd: nand: denali: clean up macros with All the register offsets and bitfield masks are defined in denali.h, but the driver code ended up with additional crappy macros such as MAKE_ECC_CORRECTION(), ECC_SECTOR(), etc. The reason is apparent - accessing a register field requires mask and shift pair. The denali.h only provides mask. However, defining both is tedious. provides a convenient way to get register fields only with a single shifted mask. Now use it. While I am here, I shortened some macros. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 25 +++++++++++-------------- drivers/mtd/nand/denali.h | 13 +++++-------- 2 files changed, 16 insertions(+), 22 deletions(-) commit fdd4d0836bdb0dd6a4e7e588d7dce2de37f8531d Author: Masahiro Yamada Date: Fri Sep 22 12:46:42 2017 +0900 mtd: nand: denali: slight clean up of denali_wait_for_irq() This function has a local variable "irq_mask" and its value is the same as denali->irq_mask. Clean up the code a little. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 586a2c52909df453ed1b6239283744b0851ccf81 Author: Masahiro Yamada Date: Fri Sep 22 12:46:41 2017 +0900 mtd: nand: denali: squash denali_enable_dma() helper into caller This helper just sets/clears a flag of DMA_ENABLE register (with register read-back, I do not know why it is necessary). Move the register write code to the caller, and remove the helper. It works for me without the register read-back. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit da4734be238341b873a94027fe24101b3e7c5c53 Author: Masahiro Yamada Date: Fri Sep 22 12:46:40 2017 +0900 mtd: nand: denali: consolidate include directives Include necessary headers explicitly without relying on indirect header inclusion. Also, sort them alphabetically. , , turned out bogus, so removed. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 12 +++++++----- drivers/mtd/nand/denali.h | 3 +++ drivers/mtd/nand/denali_dt.c | 3 ++- drivers/mtd/nand/denali_pci.c | 3 +++ 4 files changed, 15 insertions(+), 6 deletions(-) commit 3ac6c7166396060c2b427668470e2e626c358a39 Author: Masahiro Yamada Date: Fri Sep 22 12:46:39 2017 +0900 mtd: nand: denali: prefix detect_max_banks() with denali_ All functions in this driver are prefixed with denali_ except detect_max_banks(). Rename it for consistency. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ee0ae6a38d7acf0ec68ac8bb043a7e7cdbd002c8 Author: Masahiro Yamada Date: Fri Sep 22 12:46:38 2017 +0900 mtd: nand: denali: squash setup_ecc_for_xfer() helper into caller The setup_ecc_for_xfer() is only called from denali_data_xfer(). This helper is small enough, so squash it into the caller. This looks cleaner to me. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) commit 100f7fbe9c25bdac334039b389453f219a6819c5 Author: Arun Nagendran Date: Fri Sep 15 12:30:32 2017 -0400 staging: mt29f_spinand: Enable the read ECC before program the page Current program_page function did following operation: 1. read page (with ECC OFF) 2. modify the page 3. write the page (with ECC ON) For some case(buggy flash Chip), while read the page without ECC ON, we may read the page with bit flip error and modify that bad page without knowing the bit flip error on that page. also we re-calculate the hash for bad page and write it. This could bring potential in-consistency problem with Flash data. Verify this logic with GIGA DEVICE Part(GD5F2GQ4RCFIG): we see this in-conststency problem wit Giga Device and fix on this patch resovle that issue. Signed-off-by: Arun Nagendran Signed-off-by: Boris Brezillon drivers/staging/mt29f_spinand/mt29f_spinand.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 3f8dc9478738e2ae8cbf3ccd11914df2cd286321 Author: Fabio Estevam Date: Sat Sep 16 21:46:26 2017 -0300 ARM: imx_v6_v7_defconfig: Select CONFIG_MUX_MMIO In order to get ADV7180 analog video decoder to probe on a Gateworks GW51xx we need select CONFIG_MUX_MMIO, otherwise /dev/media node does not get created. Select CONFIG_MUX_MMIO, so that the ADV7180 driver can be correctly probed. Reported-by: Tim Harvey Suggested-by: Steve Longerbeam Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 8bd60711432a5cc6935da9666ba534cd3e47b9d2 Author: YuanCheng Cheng Date: Sat Sep 9 20:54:21 2017 +0800 ARM: dts: Add initial Pistachio i.mx6q board support. Working items: - 800MHz CPU - 2GB of RAM (DDR3) - 4GB of eMMC storage - 1T1R WiFi 2.4 GHz - Power management support - 1x 10/100/1000 Mbps Ethernet WAN port - 2x USB 2.0 Host - PCIe - HDMI/VGA/LVDS display - 1x UART for RS232/422/485 - 2x UART for RS232 - 1x UART for serial console - 1x CAN bus Specification: http://nutsboard.org/pistachio Signed-off-by: YuanCheng Cheng Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6q-pistachio.dts | 693 ++++++++++++++++++++++++++++++++++ 2 files changed, 694 insertions(+) commit 51b29445cbed1a87c55a084d4d63b919c1eee024 Author: Sumit Garg Date: Sat Sep 9 05:03:28 2017 +0530 arm64: dts: ls: Add optee node Add optee device tree node on ls1012a, ls1043a, ls1046a, ls1088a and ls208xa. Signed-off-by: Sumit Garg Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 7 +++++++ arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 7 +++++++ arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 7 +++++++ arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 7 +++++++ arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 7 +++++++ 5 files changed, 35 insertions(+) commit 72f75bced5b747f5df67f5a807a08796eaa3f11b Author: Christoph Fritz Date: Sun Sep 3 11:35:11 2017 +0200 ARM: dts: imx6sx: add vining-2000 board support Add initial imx6sx-softing-vining-2000 board support. Signed-off-by: Christoph Fritz Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6sx-softing-vining-2000.dts | 572 +++++++++++++++++++++++ 2 files changed, 573 insertions(+) commit 0de9edd71992bf1d2ff5de798b1fa26efd8f6623 Author: Lucas Stach Date: Thu Aug 31 17:39:51 2017 +0200 ARM: dts: imx6: RDU2: disallow RMI4 device sleep This is causing issues with some specific controller configurations, as the platform isn't power limited it's better to keep it disabled. Signed-off-by: Lucas Stach Tested-by: Chris Healy Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f0578b8e6bcfc02434227e836d9bc4c49c0d971 Author: Lucas Stach Date: Thu Aug 31 17:39:50 2017 +0200 ARM: dts: imx6: RDU2: disable over-current detection on USB H1 Just like the OTG port, USB H1 has no over-current detection wired up. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 1 + 1 file changed, 1 insertion(+) commit 411d788a23f7e20b8fc51b548c7204fdecc9d22e Author: Florian Westphal Date: Thu Sep 21 17:36:08 2017 +0200 test_rhashtable: remove initdata annotation kbuild test robot reported a section mismatch warning w. gcc 4.x: WARNING: lib/test_rhashtable.o(.text+0x139e): Section mismatch in reference from the function rhltable_insert.clone.3() to the variable .init.data:rhlt so remove this annotation. Fixes: cdd4de372ea06 ("test_rhashtable: add test case for rhl_table interface") Reported-by: kbuild test robot Signed-off-by: Florian Westphal Signed-off-by: David S. Miller lib/test_rhashtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a424120765009df13957af20ba4d18e531cfe643 Author: Eric Dumazet Date: Thu Sep 21 07:50:28 2017 -0700 net: vrf: remove skb_dst_force() after skb_dst_set() skb_dst_set(skb, dst) installs a normal (refcounted) dst, there is no point using skb_dst_force(skb) Signed-off-by: Eric Dumazet Acked-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 1 - 1 file changed, 1 deletion(-) commit a1f3316dd7b5ce740c774697c664e2e60d095794 Author: David S. Miller Date: Thu Sep 21 18:18:23 2017 -0700 ipv4: Move fib_has_custom_local_routes outside of IP_MULTIPLE_TABLES. > net/ipv4/fib_frontend.c: In function 'fib_validate_source': > net/ipv4/fib_frontend.c:411:16: error: 'struct netns_ipv4' has no member named 'fib_has_custom_local_routes' > if (net->ipv4.fib_has_custom_local_routes) > ^ > net/ipv4/fib_frontend.c: In function 'inet_rtm_newroute': > net/ipv4/fib_frontend.c:773:12: error: 'struct netns_ipv4' has no member named 'fib_has_custom_local_routes' > net->ipv4.fib_has_custom_local_routes = true; > ^ Fixes: 6e617de84e87 ("net: avoid a full fib lookup when rp_filter is disabled.") Reported-by: Stephen Rothwell Signed-off-by: David S. Miller include/net/netns/ipv4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ed802c0c08dbf431ced02434a3d81365f1865d9 Author: Nik Nyby Date: Thu Sep 21 16:34:20 2017 -0700 Input: elan_i2c - remove duplicate ELAN0605 id ELAN0605 appears twice here. Signed-off-by: Nik Nyby Signed-off-by: Dmitry Torokhov drivers/input/mouse/elan_i2c_core.c | 1 - 1 file changed, 1 deletion(-) commit 9c4089e87a80376071cbedc3f66a16ac028782c5 Merge: 95a0c7c 0335a95 Author: Dmitry Torokhov Date: Thu Sep 21 16:41:15 2017 -0700 Merge tag 'ib-mfd-input-rtc-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into next Merge "Immutable branch between MFD, Input and RTC due for the v3.14 merge window" to have dm355evm_msp.h header moved into right place. commit 95a0c7c2d6cfde3fb5fdb713428ed0df4d6bdd58 Merge: 1dbc080 a205425 Author: Dmitry Torokhov Date: Thu Sep 21 16:38:09 2017 -0700 Merge tag 'ib-mfd-many-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into next Merge "Immutable branch between MFD and many other subsystems due for the v4.14 merge window" to get the TWL headers moved to the right place. commit 8447779637172809060e5064afdf52f16a09aa13 Author: Allen Pais Date: Thu Sep 21 18:32:58 2017 +0530 net: ti: netcp: use setup_timer Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/ti/netcp_ethss.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e53a84b2b47119cbb895a4a83e6675ec50cf9fe5 Author: Allen Pais Date: Thu Sep 21 18:24:15 2017 +0530 net: usb: catc: use setup_timer() helper Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/usb/catc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 802be571348681a8ee052850e47b9652de7e05d4 Author: Allen Pais Date: Thu Sep 21 18:17:55 2017 +0530 net: wan : hdlc: use setup_timer() helper Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/wan/hdlc_fr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2ed343f98178ff232b504bbd006b34db07835082 Author: Allen Pais Date: Thu Sep 21 16:29:33 2017 +0530 net:nfc: use setup_timer Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller net/nfc/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8701352b22a2f82c814283131587e970a56b69a8 Author: Vincent Bernat Date: Thu Sep 21 12:05:25 2017 +0200 bridge: trigger RTM_NEWLINK when interface is modified by bridge ioctl Currently, there is a difference in netlink events received when an interface is modified through bridge ioctl() or through netlink. This patch generates additional events when an interface is added to or removed from a bridge via ioctl(). When adding then removing an interface from a bridge with netlink, we get: 5: dummy1: mtu 1500 qdisc noqueue master bridge0 state UNKNOWN group default link/ether 9e:da:60:ee:cf:c8 brd ff:ff:ff:ff:ff:ff 5: dummy1: mtu 1500 master bridge0 state UNKNOWN link/ether 9e:da:60:ee:cf:c8 5: dummy1: mtu 1500 master bridge0 state UNKNOWN link/ether 9e:da:60:ee:cf:c8 5: dummy1: mtu 1500 master bridge0 state UNKNOWN link/ether 9e:da:60:ee:cf:c8 5: dummy1: mtu 1500 master bridge0 state UNKNOWN link/ether 9e:da:60:ee:cf:c8 5: dummy1: mtu 1500 qdisc noqueue master bridge0 state UNKNOWN group default link/ether 9e:da:60:ee:cf:c8 brd ff:ff:ff:ff:ff:ff 5: dummy1: mtu 1500 qdisc noqueue master bridge0 state UNKNOWN group default link/ether 9e:da:60:ee:cf:c8 brd ff:ff:ff:ff:ff:ff 5: dummy1: mtu 1500 master bridge0 state UNKNOWN link/ether 9e:da:60:ee:cf:c8 Deleted 5: dummy1: mtu 1500 master bridge0 state UNKNOWN link/ether 9e:da:60:ee:cf:c8 5: dummy1: mtu 1500 qdisc noqueue state UNKNOWN group default link/ether 9e:da:60:ee:cf:c8 brd ff:ff:ff:ff:ff:ff When using ioctl(): 5: dummy1: mtu 1500 qdisc noqueue master bridge0 state UNKNOWN group default link/ether 9e:da:60:ee:cf:c8 brd ff:ff:ff:ff:ff:ff 5: dummy1: mtu 1500 master bridge0 state UNKNOWN link/ether 9e:da:60:ee:cf:c8 5: dummy1: mtu 1500 master bridge0 state UNKNOWN link/ether 9e:da:60:ee:cf:c8 5: dummy1: mtu 1500 master bridge0 state UNKNOWN link/ether 9e:da:60:ee:cf:c8 5: dummy1: mtu 1500 qdisc noqueue master bridge0 state UNKNOWN group default link/ether 9e:da:60:ee:cf:c8 brd ff:ff:ff:ff:ff:ff 5: dummy1: mtu 1500 qdisc noqueue master bridge0 state UNKNOWN group default link/ether 9e:da:60:ee:cf:c8 brd ff:ff:ff:ff:ff:ff 5: dummy1: mtu 1500 master bridge0 state UNKNOWN link/ether 9e:da:60:ee:cf:c8 Deleted 5: dummy1: mtu 1500 master bridge0 state UNKNOWN link/ether 9e:da:60:ee:cf:c8 5: dummy1: mtu 1500 qdisc noqueue state UNKNOWN group default link/ether 9e:da:60:ee:cf:c8 brd ff:ff:ff:ff:ff:ff Without this patch, the last netlink notification is not sent. Signed-off-by: Vincent Bernat Reviewed-by: Stephen Hemminger Reviewed-by: David Ahern Signed-off-by: David S. Miller net/bridge/br_ioctl.c | 3 +++ 1 file changed, 3 insertions(+) commit e1f6198e221f472c03b88e352432a01076ec8647 Author: Ganesh Goudar Date: Thu Sep 21 12:50:47 2017 +0530 cxgb4: avoid stall while shutting down the adapter do not wait for completion while deleting the filters when the adapter is shutting down because we may not get the response as interrupts will be disabled. 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_filter.c | 7 ++++++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) commit 51957bc53aa7ca60d63f1ba0d9e3d887562b1723 Author: Ursula Braun Date: Thu Sep 21 09:17:34 2017 +0200 net/smc: parameter cleanup in smc_cdc_get_free_slot() Use the smc_connection as first parameter with smc_cdc_get_free_slot(). This is just a small code cleanup, no functional change. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller net/smc/smc_cdc.c | 7 ++++--- net/smc/smc_cdc.h | 3 ++- net/smc/smc_tx.c | 6 ++---- 3 files changed, 8 insertions(+), 8 deletions(-) commit b6cd4b5895848968e8fee93fc5e3dc8babc40b9e Author: Thomas Meyer Date: Thu Sep 21 08:15:26 2017 +0200 e100: Cocci spatch "pool_zalloc-simple" Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0. Found by coccinelle spatch "api/alloc/pool_zalloc-simple.cocci" Signed-off-by: Thomas Meyer Signed-off-by: David S. Miller drivers/net/ethernet/intel/e100.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit de40fc5d210f2c31f2c25a9b920861276a71b70d Author: Vivien Didelot Date: Wed Sep 20 19:32:14 2017 -0400 net: dsa: add port fdb dump Dumping a DSA port's FDB entries is not specific to a DSA slave, so add a dsa_port_fdb_dump function, similarly to dsa_port_fdb_add and dsa_port_fdb_del. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa_priv.h | 1 + net/dsa/port.c | 11 +++++++++++ net/dsa/slave.c | 9 ++------- 3 files changed, 14 insertions(+), 7 deletions(-) commit 4fa7b718881a5358286903b796968cea80993820 Author: Vivien Didelot Date: Wed Sep 20 19:31:57 2017 -0400 net: dsa: better scoping of slave functions A few DSA slave functions take a dsa_slave_priv pointer as first argument, whereas the scope of the slave.c functions is the slave net_device structure. Fix this and rename dsa_netpoll_send_skb to dsa_slave_netpoll_send_skb. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/slave.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) commit 0abfd494deefdbab66ac03c1181a614285e7d90c Author: Vivien Didelot Date: Wed Sep 20 12:28:05 2017 -0400 net: dsa: use dedicated CPU port Each port in DSA has its own dedicated CPU port currently available in its parent switch's ds->ports[port].cpu_dp. Use it instead of getting the unique tree CPU port, which will be deprecated soon. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 4 ++-- drivers/net/dsa/bcm_sf2.c | 6 +++--- drivers/net/dsa/mt7530.c | 4 ++-- drivers/net/dsa/mv88e6060.c | 2 +- drivers/net/dsa/qca8k.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) commit 6e617de84e87d626d1e976fc30e1322239fd4d2d Author: Paolo Abeni Date: Wed Sep 20 18:26:53 2017 +0200 net: avoid a full fib lookup when rp_filter is disabled. Since commit 1dced6a85482 ("ipv4: Restore accept_local behaviour in fib_validate_source()") a full fib lookup is needed even if the rp_filter is disabled, if accept_local is false - which is the default. What we really need in the above scenario is just checking that the source IP address is not local, and in most case we can do that is a cheaper way looking up the ifaddr hash table. This commit adds a helper for such lookup, and uses it to validate the src address when rp_filter is disabled and no 'local' routes are created by the user space in the relevant namespace. A new ipv4 netns flag is added to account for such routes. We need that to preserve the same behavior we had before this patch. It also drops the checks to bail early from __fib_validate_source, added by the commit 1dced6a85482 ("ipv4: Restore accept_local behaviour in fib_validate_source()") they do not give any measurable performance improvement: if we do the lookup with are on a slower path. This improves UDP performances for unconnected sockets when rp_filter is disabled by 5% and also gives small but measurable performance improvement for TCP flood scenarios. v1 -> v2: - use the ifaddr lookup helper in __ip_dev_find(), as suggested by Eric - fall-back to full lookup if custom local routes are present Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller include/linux/inetdevice.h | 1 + include/net/netns/ipv4.h | 1 + net/ipv4/devinet.c | 30 ++++++++++++++++++------------ net/ipv4/fib_frontend.c | 22 +++++++++++++++++----- 4 files changed, 37 insertions(+), 17 deletions(-) commit 6bf2e0324b9376512b0b9bf5c5c4b383afd419ec Author: Sean Paul Date: Wed Sep 20 17:13:56 2017 -0700 drm/rockchip: Fix uninitialized use of ret If there are no children for lvds, ret is used uninitialized. This patch initializes ret and returns an error if the port has no children. Fixes: 34cc0aa25456 ("drm/rockchip: Add support for Rockchip Soc LVDS") Cc: Mark Yao Cc: Heiko Stuebner Cc: Sandy Huang Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Reviewed-by: Mark Yao Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20170921001408.1839-1-seanpaul@chromium.org drivers/gpu/drm/rockchip/rockchip_lvds.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit a99855d1598be17d3da618234daab5cbc49afb07 Merge: ae3e24f 8bf2ac2 Author: David S. Miller Date: Thu Sep 21 11:59:16 2017 -0700 Merge branch 'ebpf-samples-cross-compile' Joel Fernandes says: ==================== Add cross-compilation support to eBPF samples These patches fix issues seen when cross-compiling eBPF samples on arm64. Compared to [1], I dropped the controversial inline-asm patch and exploring other options to fix it. However these patches are a step in the right direction and I look forward to getting them into -next and the merge window. Changes since v3: - just a repost with acks [1] https://lkml.org/lkml/2017/8/7/417 ==================== Signed-off-by: David S. Miller commit 8bf2ac25a96c69985a1a9fbbad7da22ae4343a38 Author: Joel Fernandes Date: Wed Sep 20 09:11:59 2017 -0700 samples/bpf: Add documentation on cross compilation Acked-by: Alexei Starovoitov Signed-off-by: Joel Fernandes Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/README.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) commit b655fc1c2ee1c2b2d07c0b6f432798b91202718c Author: Joel Fernandes Date: Wed Sep 20 09:11:58 2017 -0700 samples/bpf: Fix pt_regs issues when cross-compiling BPF samples fail to build when cross-compiling for ARM64 because of incorrect pt_regs param selection. This is because clang defines __x86_64__ and bpf_headers thinks we're building for x86. Since clang is building for the BPF target, it shouldn't make assumptions about what target the BPF program is going to run on. To fix this, lets pass ARCH so the header knows which target the BPF program is being compiled for and can use the correct pt_regs code. Acked-by: Alexei Starovoitov Signed-off-by: Joel Fernandes Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/Makefile | 2 +- tools/testing/selftests/bpf/bpf_helpers.h | 56 +++++++++++++++++++++++++++---- 2 files changed, 50 insertions(+), 8 deletions(-) commit 876e88e3273e300895e308bd660c6cfaabb03cd5 Author: Joel Fernandes Date: Wed Sep 20 09:11:57 2017 -0700 samples/bpf: Enable cross compiler support When cross compiling, bpf samples use HOSTCC for compiling the non-BPF part of the sample, however what we really want is to use the cross compiler to build for the cross target since that is what will load and run the BPF sample. Detect this and compile samples correctly. Acked-by: Alexei Starovoitov Signed-off-by: Joel Fernandes Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/Makefile | 5 +++++ 1 file changed, 5 insertions(+) commit 95ec66968571bf0af0a22effdc1b9d9e62ea6630 Author: Joel Fernandes Date: Wed Sep 20 09:11:56 2017 -0700 samples/bpf: Use getppid instead of getpgrp for array map stress When cross-compiling the bpf sample map_perf_test for aarch64, I find that __NR_getpgrp is undefined. This causes build errors. This syscall is deprecated and requires defining __ARCH_WANT_SYSCALL_DEPRECATED. To avoid having to define that, just use a different syscall (getppid) for the array map stress test. Acked-by: Alexei Starovoitov Signed-off-by: Joel Fernandes Acked-by: Daniel Borkmann Signed-off-by: David S. Miller samples/bpf/map_perf_test_kern.c | 2 +- samples/bpf/map_perf_test_user.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ae3e24fd547e9f0b1443c1f004c29165180eb101 Merge: 908a23e 19569c8 Author: David S. Miller Date: Thu Sep 21 11:44:45 2017 -0700 Merge branch 'net-setup_timer' Allen Pais says: ==================== net: use setup_timer() helper function. This series uses setup_timer() helper function. The series addresses the files under drivers/net/*. ==================== Signed-off-by: David S. Miller commit 19569c88b938145e90cc7d6ab45d7fa0edd07beb Author: Allen Pais Date: Thu Sep 21 22:35:25 2017 +0530 drivers: net: lmc: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/wan/lmc/lmc_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 804dea920b66fa5813278fc55eaa5b2ae39ab110 Author: Allen Pais Date: Thu Sep 21 22:35:24 2017 +0530 drivers: net: bnx2x: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 66f06890305eb2c8200cefbc3d6405ff6baef47e Author: Allen Pais Date: Thu Sep 21 22:35:23 2017 +0530 drivers: net: cxgb: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb/sge.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 570ba3e82befbba7649e459fedc4aab27510ef44 Author: Allen Pais Date: Thu Sep 21 22:35:22 2017 +0530 drivers: net: enic: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic_clsf.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 99e3aa1ea47d0804a69ea7948ddd1251bcd1a635 Author: Allen Pais Date: Thu Sep 21 22:35:21 2017 +0530 drivers: net: uli526x: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/dec/tulip/uli526x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7d8fb3a7742513bb5434be704e0b0bf785032f45 Author: Allen Pais Date: Thu Sep 21 22:35:20 2017 +0530 drivers: net: i40evf: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/intel/i40evf/i40evf_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 9be5813a29e5b3379db30d00319682fe965febe5 Author: Allen Pais Date: Thu Sep 21 22:35:19 2017 +0530 drivers: net: packetengines: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/packetengines/hamachi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 997decfb6aeaa9be41ff557741845bb9fb4bf5bc Author: Allen Pais Date: Thu Sep 21 22:35:18 2017 +0530 drivers: net: stmmac: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9d90725f33ebd0f30790c26eb5e9e0a098567895 Author: Allen Pais Date: Thu Sep 21 22:35:17 2017 +0530 drivers: net: cpsw_ale: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw_ale.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7e47fc264e2837d971720ccf1f8b35648c2626ea Author: Allen Pais Date: Thu Sep 21 22:35:16 2017 +0530 drivers: net: hamradio: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/hamradio/6pack.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 8d81fe753c1572573be6d529a44b1506e3b0425d Author: Allen Pais Date: Thu Sep 21 22:35:15 2017 +0530 drivers: net: hdlc_ppp: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/wan/hdlc_ppp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f2803332f2ef86ad29e247350f697bad4eb1aa93 Author: Allen Pais Date: Thu Sep 21 22:35:14 2017 +0530 drivers: net: dscc: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/wan/dscc4.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ba7400ed88adcd07af0dc004be1cf5ab2443cb44 Author: Allen Pais Date: Thu Sep 21 22:35:13 2017 +0530 drivers: net: appletalk: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/appletalk/ltpc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7890d5341999968b94dbdf9e30ad32f37f82ea10 Author: Allen Pais Date: Thu Sep 21 22:35:12 2017 +0530 drivers: net: caif: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/caif/caif_hsi.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 13e96b93ff5f1093592419e1f84962d4a266bd3e Author: Allen Pais Date: Thu Sep 21 22:35:11 2017 +0530 drivers: net: can: sja1000: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/can/sja1000/peak_pcmcia.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7c214194de36217c06b0dc4ed64d9cf251b261df Author: Allen Pais Date: Thu Sep 21 22:35:10 2017 +0530 drivers: net: adi: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/adi/bfin_mac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cac40a458ae68b41955cc55a80fc9e0166e429b1 Author: Allen Pais Date: Thu Sep 21 22:35:09 2017 +0530 drivers: net: amd: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/amd/a2065.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 6c43824477c2ac722325ba460c2ce683c48fb76b Author: Allen Pais Date: Thu Sep 21 22:35:08 2017 +0530 drivers: net: bnxt: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit a76aec2ac51f8a74659cff9b19f712e8fb984393 Author: Allen Pais Date: Thu Sep 21 22:35:07 2017 +0530 drivers: net: dmfe: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/dec/tulip/dmfe.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 34b0cf069d174b2615769102d75b4ce687addeb9 Author: Allen Pais Date: Thu Sep 21 22:35:06 2017 +0530 drivers: net: fealnx: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/fealnx.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 636873890c63c892fca5ccab8af3a9f3607eb1fc Author: Allen Pais Date: Thu Sep 21 22:35:05 2017 +0530 drivers: net: pxa168: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/marvell/pxa168_eth.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit d2a0012e7632a588683ad6320529659c4cd27131 Author: Allen Pais Date: Thu Sep 21 22:35:04 2017 +0530 drivers: net: mlx4: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/catas.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 590deff6e7a898fadf3f1fd6425937d481913fb1 Author: Allen Pais Date: Thu Sep 21 22:35:03 2017 +0530 drivers: net: mlx5: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/health.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f1ce56ce5d2a18f5d61ec335aaf5aad978fa9cd6 Author: Allen Pais Date: Thu Sep 21 22:35:02 2017 +0530 drivers: net: packetengines: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/packetengines/yellowfin.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ac803d1c5f62937dc142a35dafd180f09b9f9c83 Author: Allen Pais Date: Thu Sep 21 22:35:01 2017 +0530 drivers: net: sis900: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/sis/sis900.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 6d2bcc14f5731e9357f15d41f7c5677a72e354f9 Author: Allen Pais Date: Thu Sep 21 22:35:00 2017 +0530 drivers: net: sun: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/sun/sungem.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b9496b6b9100d824033390312dd64244f959a156 Author: Allen Pais Date: Thu Sep 21 22:34:59 2017 +0530 drivers: net: ath6kl: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/wireless/ath/ath6kl/txrx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit fe9bfe207e200f901361681bf1497386068f1df2 Author: Allen Pais Date: Thu Sep 21 22:34:58 2017 +0530 drivers: net: arcnet: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/arcnet/arcnet.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9f5ca8816b5ccc1fd13baf46e012fb5228e57763 Author: Allen Pais Date: Thu Sep 21 22:34:57 2017 +0530 drivers: net: can: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/can/grcan.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 82f5d72da8755cf73387a007ad323a86ea0b5663 Author: Allen Pais Date: Thu Sep 21 22:34:56 2017 +0530 drivers: net: can: usb: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/can/usb/peak_usb/pcan_usb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fb4de582a22282fa0f9665fd363dfd3e073c40f6 Author: Allen Pais Date: Thu Sep 21 22:34:55 2017 +0530 drivers: net: eql: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/eql.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit cec55a92a98fb3205cc4f127d9b70b5a965f3bd7 Author: Allen Pais Date: Thu Sep 21 22:34:54 2017 +0530 drivers: net: amd8111e: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/amd/amd8111e.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit af25c31d4bf4bc7d4dea4c093af8b7704ef24f81 Author: Allen Pais Date: Thu Sep 21 22:34:53 2017 +0530 drivers: net: amd: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/amd/sunlance.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4a9c07ed71c2b8d755ee585264f80dd2d82a8066 Author: Allen Pais Date: Thu Sep 21 22:34:52 2017 +0530 drivers: net: e1000e: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/intel/e1000e/netdev.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit d4d8db71db1bf602623e859e6c3e700b604c2072 Author: Allen Pais Date: Thu Sep 21 22:34:51 2017 +0530 drivers: net: qlogic: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qla3xxx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 32db034501d37c60c433d24e9faa41c1fa3136e5 Author: Allen Pais Date: Thu Sep 21 22:34:50 2017 +0530 drivers: net: smsc: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/smsc/epic100.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0625d739cc61d186b65b8619ee8c41da2fd24894 Author: Allen Pais Date: Thu Sep 21 22:34:49 2017 +0530 drivers: net: hippi: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/hippi/rrunner.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 55d3cef4ee68d7d54c457c7deeb0e393dd386fdc Author: Allen Pais Date: Thu Sep 21 22:34:48 2017 +0530 drivers: net: atmel: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/wireless/atmel/atmel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f7c11175bdece128c0b4c4a43e6781b9216db4d9 Author: Allen Pais Date: Thu Sep 21 22:34:47 2017 +0530 drivers: net: xen-netback: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/xen-netback/interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c41326fbb3a7d64c329267d20c58dd9cc8f22a47 Author: Allen Pais Date: Thu Sep 21 22:34:46 2017 +0530 drivers: net: bnx2: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 7afd516ff75e967873d7bdcb8f9b1180c2400b57 Author: Allen Pais Date: Thu Sep 21 22:34:45 2017 +0530 drivers: net: enic: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/cisco/enic/enic_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3e436a25fcca449cbb044c7483116772873f3e28 Author: Allen Pais Date: Thu Sep 21 22:34:44 2017 +0530 drivers: net: winbond-840: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/dec/tulip/winbond-840.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ba98e9e2eb32ba8f604f947fa656ef2071d22fa0 Author: Allen Pais Date: Thu Sep 21 22:34:43 2017 +0530 drivers: net: natsemi: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/natsemi/natsemi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f891f36603dff38a15390e5c950e8ac66f73352b Author: Allen Pais Date: Thu Sep 21 22:34:42 2017 +0530 drivers: net: sun: cassini: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/sun/cassini.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit e998092f7b7c2ce3199db91177aa43397a3f76d7 Author: Allen Pais Date: Thu Sep 21 22:34:41 2017 +0530 drivers: net: spider_net: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/toshiba/spider_net.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 18df06c2cafea69b19ab5f274865b89c3ab0f715 Author: Allen Pais Date: Thu Sep 21 22:34:40 2017 +0530 drivers: net: slip: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/slip/slip.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit dffec39fb185837468486b6bbd00b18f35e38c82 Author: Allen Pais Date: Thu Sep 21 22:34:39 2017 +0530 drivers: net: cisco_hdlc: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/wan/hdlc_cisco.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f347bd6b5f6599fe67d040758947dbf9bdd89195 Author: Allen Pais Date: Thu Sep 21 22:34:38 2017 +0530 drivers: net: sdla: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/wan/sdla.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4896ad68ec3803d01a0d9fead64451377ea1ec5f Author: Allen Pais Date: Thu Sep 21 22:34:37 2017 +0530 drivers: net: tg3: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/tg3.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 88e8aa172596d2eda971d3553d52a8e877805e90 Author: Allen Pais Date: Thu Sep 21 22:34:36 2017 +0530 drivers: net: sundance: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/dlink/sundance.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 82a8c6745169ec932473658c28679069a7ded95a Author: Allen Pais Date: Thu Sep 21 22:34:35 2017 +0530 drivers: net: ixgb: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/intel/ixgb/ixgb_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit f40c9d5aea0fdf5454464bc477898cc981ff9715 Author: Allen Pais Date: Thu Sep 21 22:34:34 2017 +0530 drivers: net: ns83820: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/natsemi/ns83820.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e7bbad4487ae4005904d00a0a04622f07fadbc5b Author: Allen Pais Date: Thu Sep 21 22:34:33 2017 +0530 drivers: net: atp: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/realtek/atp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 531f3ce953d4c74989eb1ece7ce37a3717532a13 Author: Allen Pais Date: Thu Sep 21 22:34:32 2017 +0530 drivers: net: rsi_91x: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/wireless/rsi/rsi_91x_hal.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1e153e554fc8a3744d1fa8a36d4cb3b4cfbdc3da Author: Allen Pais Date: Thu Sep 21 22:34:31 2017 +0530 drivers: net: appletalk: cops: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/appletalk/cops.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 07b6901f61813aa547c5a25e118f977022fec9eb Author: Allen Pais Date: Thu Sep 21 22:34:30 2017 +0530 drivers: net: et131x: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/agere/et131x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit aa0c72859972f209d7d07654037bd974c11f93ed Author: Allen Pais Date: Thu Sep 21 22:34:29 2017 +0530 drivers: net: am79c961: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/amd/am79c961a.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b0b404bd9ba28edb795b999e3c35596e236cc5dd Author: Allen Pais Date: Thu Sep 21 22:34:28 2017 +0530 drivers: net: declance: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/amd/declance.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c3bd81cccbaa89da70047f1dcc73443f889735a8 Author: Allen Pais Date: Thu Sep 21 22:34:27 2017 +0530 drivers: net: bcm63xx: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcm63xx_enet.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ba4cc08793a58a97cffc2769acaa53fff4433332 Author: Allen Pais Date: Thu Sep 21 22:34:26 2017 +0530 drivers : net: niu: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/sun/niu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 27dd0852644966c43079d3f812ec37e3e3fc864e Author: Allen Pais Date: Thu Sep 21 22:34:25 2017 +0530 drivers: net: brcm80211: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 334e4a7d5505f59a741b0549f41082e29a914439 Author: Allen Pais Date: Thu Sep 21 22:34:24 2017 +0530 drivers: net: pcnet32: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/amd/pcnet32.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit cdc91b31b81abaa2cf491fd5e9007f4bcd45bc68 Author: Allen Pais Date: Thu Sep 21 22:34:23 2017 +0530 drivers: net: b44: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/b44.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4f88836d4f806d212361eb426bc8a6ce897dbef9 Author: Allen Pais Date: Thu Sep 21 22:34:22 2017 +0530 drivers: net: de4x: use setup_timer() helper. Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais Signed-off-by: David S. Miller drivers/net/ethernet/dec/tulip/de4x5.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8f3b00347bf075fb457f90ce76573615f567e7bc Author: Corentin Labbe Date: Wed Sep 20 09:24:02 2017 +0200 dmaengine: sun6i: use of_device_get_match_data The usage of of_device_get_match_data reduce the code size a bit. Furthermore, it prevents an improbable dereference when of_match_device() return NULL. Acked-by: Maxime Ripard Signed-off-by: Corentin Labbe Signed-off-by: Vinod Koul drivers/dma/sun6i-dma.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f9d4a398f121b00f581da1428bff9b93d955452d Author: Nicolin Chen Date: Thu Sep 14 11:46:43 2017 -0700 dmaengine: imx-sdma: Correct src_addr_widths and directions The driver already supports DMA_DEV_TO_DEV in sdma_config(), DMA_SLAVE_BUSWIDTH_2_BYTES and DMA_SLAVE_BUSWIDTH_1_BYTE in sdma_prep_slave_sg(). So this patch adds them to the lists. Signed-off-by: Nicolin Chen Signed-off-by: Vinod Koul drivers/dma/imx-sdma.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit c2cbd4276eea1d3b204754653dd74d6e10ca207f Author: Stefan Brüns Date: Tue Sep 12 01:44:45 2017 +0200 dmaengine: Mark struct dma_slave_caps kernel-doc correctly, clarify struct dma_slave_caps documentation omitted the correct kernel-doc opening comment mark. Document byte granularity and interpretation of the src/dst_addr_widths bit flag fields used by struct dma_slave_caps and struct dma_device. Add punctuation to their "directions" member documentations, and cleanup wording of the description. Signed-off-by: Stefan Brüns Signed-off-by: Vinod Koul include/linux/dmaengine.h | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 3f7632e1ba2c6f5ca2499d1ee8acf95599d4b7b6 Author: Stefan Brüns Date: Tue Sep 12 01:44:44 2017 +0200 dmaengine: List all allowed values for src/dst_addr_width in kernel doc Commit 93c6ee94c140 ("dma: Support for 3 bytes word size") and commit 534a729866f9 ("dmaengine: Add 16 bytes, 32 bytes and 64 bytes bus widths") added additional values for the allowed word size, but omitted these from the struct dma_slave_config documentation. Signed-off-by: Stefan Brüns Signed-off-by: Vinod Koul include/linux/dmaengine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81cb71240e202a8086bda0755d9d78bd3decd0aa Author: Kuninori Morimoto Date: Wed Sep 20 06:28:44 2017 +0000 ASoC: rsnd: add rsnd_dma_alloc() R-Car sound DMA will be used from SSI/SRC. dma.c doesn't alloc DMA handler in .probe timing, because we don't know what kind of DMA transfer will be used then. Thus, SSI/SRC have *rsnd_mod for DMA. rsnd_dma_attach() will allocate it and attach it to system. It will be PIO mode if it can't alloc DMA handler. In case of MIX is used, rsnd_dma_attach() will be called twice from SSI. To avoid duplicate allocation, current rsnd_dma_attach() is checking allocated DMA handler. This DMA related operation is a little bit difficult to understand. This patch adds new rsnd_dma_alloc() and separates allocation and attach for readable code. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/dma.c | 60 +++++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 27 deletions(-) commit 0a7c74eae307894c6c95316c382f118aef8481e8 Author: Arnaldo Carvalho de Melo Date: Tue Apr 4 13:15:04 2017 -0300 perf tools: Provide mutex wrappers for pthreads rwlocks Andi reported a performance drop in single threaded perf tools such as 'perf script' due to the growing number of locks being put in place to allow for multithreaded tools, so wrap the POSIX threads rwlock routines with the names used for such kinds of locks in the Linux kernel and then allow for tools to ask for those locks to be used or not. I.e. a tool may have a multithreaded phase and then switch to single threaded, like the upcoming patches for the synthesizing of PERF_RECORD_{FORK,MMAP,etc} for pre-existing processes to then switch to single threaded mode in 'perf top'. The init routines will not be conditional, this way starting as single threaded to then move to multi threaded mode should be possible. Reported-by: Andi Kleen Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/20170404161739.GH12903@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-kvm.c | 1 - tools/perf/builtin-script.c | 2 ++ tools/perf/util/Build | 1 + tools/perf/util/dso.c | 12 +++++------ tools/perf/util/dso.h | 4 ++-- tools/perf/util/machine.c | 41 +++++++++++++++++++------------------- tools/perf/util/machine.h | 3 ++- tools/perf/util/map.c | 34 +++++++++++++++---------------- tools/perf/util/map.h | 3 ++- tools/perf/util/rwsem.c | 32 +++++++++++++++++++++++++++++ tools/perf/util/rwsem.h | 19 ++++++++++++++++++ tools/perf/util/symbol.c | 8 ++++---- tools/perf/util/thread.c | 4 ++-- tools/perf/util/trace-event-info.c | 1 - tools/perf/util/trace-event-read.c | 1 - tools/perf/util/util.c | 13 ++++++++++++ tools/perf/util/util.h | 5 +++++ tools/perf/util/vdso.c | 4 ++-- 18 files changed, 130 insertions(+), 58 deletions(-) commit 74c1c694a2deab0561c1f502de9d32fdc7eb7b32 Author: Chris Wilson Date: Thu Sep 21 12:01:35 2017 +0100 drm/i915: Document the split in internal and public execbuf flags Since we reuse the same field for the user passing in their control flags, and for the kernel to track a couple of bits of state, document and check that those do not overlap. Suggested-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170921110135.15990-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 ++ 1 file changed, 2 insertions(+) commit 6ae8eefc6c8fe050f057781b70a83262eb0a61ee Author: Arnaldo Carvalho de Melo Date: Thu Sep 21 12:12:17 2017 -0300 tools include: Do not use poison with C++ LIST_POISON[12] are used to initialize list_head and hlist_node pointers, and do void pointer arithmetic, which C++ doesn't like, so, to avoid drifting from the kernel by introducing some HLIST_POISON to do away with void pointer math, just make those poisoned pointers be NULL when building it with a C++ compiler. Noticed with: $ make LLVM_CONFIG=/usr/bin/llvm-config-3.9 LIBCLANGLLVM=1 CXX util/c++/clang.o CXX util/c++/clang-test.o In file included from /home/lizj/linux/tools/include/linux/list.h:5:0, from /home/lizj/linux/tools/perf/util/namespaces.h:13, from /home/lizj/linux/tools/perf/util/util.h:15, from /home/lizj/linux/tools/perf/util/util-cxx.h:20, from util/c++/clang-c.h:5, from util/c++/clang-test.cpp:2: /home/lizj/linux/tools/include/linux/list.h: In function ‘void list_del(list_head*)’: /home/lizj/linux/tools/include/linux/poison.h:14:31: error: pointer of type ‘void *’ used in arithmetic [-Werror=pointer-arith] # define POISON_POINTER_DELTA 0 ^ /home/lizj/linux/tools/include/linux/poison.h:22:41: note: in expansion of macro ‘POISON_POINTER_DELTA’ #define LIST_POISON1 ((void *) 0x100 + POISON_POINTER_DELTA) ^ /home/lizj/linux/tools/include/linux/list.h:107:16: note: in expansion of macro ‘LIST_POISON1’ entry->next = LIST_POISON1; ^ In file included from /home/lizj/linux/tools/perf/util/namespaces.h:13:0, from /home/lizj/linux/tools/perf/util/util.h:15, from /home/lizj/linux/tools/perf/util/util-cxx.h:20, from util/c++/clang-c.h:5, from util/c++/clang-test.cpp:2: /home/lizj/linux/tools/include/linux/list.h:107:14: error: invalid conversion from ‘void*’ to ‘list_head*’ [-fpermissive] Reported-by: Li Zhijian Cc: Adrian Hunter Cc: Alexander Shishkin Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Philip Li Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-m5ei2o0mjshucbr28baf5lqz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/linux/poison.h | 5 +++++ 1 file changed, 5 insertions(+) commit 0e1eed80885fdb09993bffb16f5662f4b53c1a08 Author: Arnaldo Carvalho de Melo Date: Wed Sep 20 16:41:34 2017 -0300 perf tools: Get all of tools/{arch,include}/ in the MANIFEST Now that I'm switching the container builds from using a local volume pointing to the kernel repository with the perf sources, instead getting a detached tarball to be able to use a container cluster, some places broke because I forgot to put some of the required files in tools/perf/MANIFEST, namely some bitsperlong.h files. So, to fix it do the same as for tools/build/ and pack the whole tools/arch/ directory. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-wmenpjfjsobwdnfde30qqncj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/MANIFEST | 87 ++--------------------------------------------------- 1 file changed, 2 insertions(+), 85 deletions(-) commit 492e05b0654126bd6a04473028ac4c8cfc22ccec Author: Arnaldo Carvalho de Melo Date: Wed Sep 20 12:41:57 2017 -0300 tools: Update asm-generic/mman-common.h copy from the kernel To get the defines introduced in the commit aafd4562dfee ("mm: arch: consolidate mmap hugetlb size encodings"), that doesn't brings anything interesting for tools/, but also the ones from d2cd9ede6e19 ("mm,fork: introduce MADV_WIPEONFORK"), which does, and ends up triggering an auto-update to the tools/perf/trace/beauty/generated/madvise_behavior_array.c file, supporting the newly introduced 'behavior' values. This silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman-common.h' differs from latest version at 'include/uapi/asm-generic/mman-common.h' Testing it: # cat madvise.c #include #include #ifndef MADV_WIPEONFORK #define MADV_WIPEONFORK 18 #endif #ifndef MADV_KEEPONFORK #define MADV_KEEPONFORK 19 #endif int main(void) { void *ptr = mmap(NULL, 4096, PROT_NONE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); madvise(ptr, 4096, MADV_WIPEONFORK); madvise(ptr, 4096, MADV_KEEPONFORK); return 0; } [root@jouet c]# perf trace -e mmap,madvise ./madvise 0.000 ( 0.013 ms): madvise/11732 mmap(len: 8192, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS ) = 0x7fba6e015000 0.047 ( 0.004 ms): madvise/11732 mmap(len: 160164, prot: READ, flags: PRIVATE, fd: 3 ) = 0x7fba6dfed000 0.084 ( 0.009 ms): madvise/11732 mmap(len: 4000096, prot: EXEC|READ, flags: PRIVATE|DENYWRITE, fd: 3 ) = 0x7fba6da20000 0.109 ( 0.006 ms): madvise/11732 mmap(addr: 0x7fba6dde7000, len: 24576, prot: READ|WRITE, flags: PRIVATE|DENYWRITE|FIXED, fd: 3, off: 1863680) = 0x7fba6dde7000 0.125 ( 0.004 ms): madvise/11732 mmap(addr: 0x7fba6dded000, len: 14688, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS|FIXED) = 0x7fba6dded000 0.150 ( 0.006 ms): madvise/11732 mmap(len: 12288, prot: READ|WRITE, flags: PRIVATE|ANONYMOUS ) = 0x7fba6dfea000 0.288 ( 0.003 ms): madvise/11732 mmap(len: 4096, flags: PRIVATE|ANONYMOUS ) = 0x7fba6e014000 0.292 ( 0.002 ms): madvise/11732 madvise(start: 0x7fba6e014000, len_in: 4096, behavior: MADV_WIPEONFORK) = 0 0.295 ( 0.001 ms): madvise/11732 madvise(start: 0x7fba6e014000, len_in: 4096, behavior: MADV_KEEPONFORK) = 0 # uname -a Linux jouet 4.13.0+ #2 SMP Mon Sep 18 17:22:46 -03 2017 x86_64 x86_64 x86_64 GNU/Linux # Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Mike Kravetz Cc: Namhyung Kim Cc: Rik van Riel Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-yev9rexu02cl7cjeozzmrl9t@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/include/uapi/asm-generic/mman-common.h | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 5a54c2f5e1717264f6e24687f703937eaca5f55d Author: Arnaldo Carvalho de Melo Date: Wed Sep 20 12:30:36 2017 -0300 perf trace beauty madvise: Generate 'behavior' string table from kernel headers This is one more case where the way that syscall parameter values are defined in kernel headers are easy to parse using a shell script that will then generate the string table that gets used by the madvise 'behaviour' argument beautifier. This way as soon as the header syncronization mechanism in perf's build system detects a change in a copy of a kernel ABI header and that file is syncronized, we get 'perf trace' updated automagically. So, when we syncronize this: Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman-common.h' differs from latest version at 'include/uapi/asm-generic/mman-common.h' We'll get these: #define MADV_WIPEONFORK 18 /* Zero memory on fork, child only */ #define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK */ Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Rik van Riel Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-dolb0ghds4ui7wc1npgkchvc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 9 +++++++ tools/perf/trace/beauty/madvise_behavior.sh | 10 ++++++++ tools/perf/trace/beauty/mmap.c | 38 +++++++++-------------------- 3 files changed, 31 insertions(+), 26 deletions(-) commit 5c9295bfe6f5f59f3f2eee78f58b0523d117897e Author: Xiaochen Shen Date: Tue Sep 19 12:57:37 2017 +0800 perf tests: Remove Intel CQM perf test Intel CQM perf test is obsolete for perf PMU code has been removed in commit c39a0e2c8850 ("x86/perf/cqm: Wipe out perf based cqm"). Signed-off-by: Xiaochen Shen Cc: Alexander Shishkin Cc: Fenghua Yu Cc: Matt Fleming Cc: Pei P Jia Cc: Peter Zijlstra Cc: Tony Luck Cc: Vikas Shivappa Link: http://lkml.kernel.org/r/1505797057-16300-1-git-send-email-xiaochen.shen@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/arch/x86/include/arch-tests.h | 1 - tools/perf/arch/x86/tests/Build | 1 - tools/perf/arch/x86/tests/arch-tests.c | 4 - tools/perf/arch/x86/tests/intel-cqm.c | 127 ------------------------------- 4 files changed, 133 deletions(-) commit 411bc316f3365363959c2c895af2618389534583 Author: Andi Kleen Date: Thu Sep 14 13:57:35 2017 -0700 perf stat: Fix adding multiple event groups The -M metric group parser threw away the events of earlier groups when multiple groups were specified. Fix this here by not overwriting the string incorrectly. Now this works correctly: % perf stat -M Summary,SMT --metric-only -a sleep 1 Performance counter stats for 'system wide': Instructions CPI CLKS CPU_Utilization GFLOPs SMT_2T_Utilization SMT_2T_Utilization Kernel_Utilization CoreIPC CORE_CLKS 900907376.0 2.7 2398954144.0 0.1 0.0 0.2 0.2 0.1 0.4 2080822855.5 while previously it would only show the SMT metrics. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170914205735.18431-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/metricgroup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 7add71b623a2b2abc2e0947a21fb31e2c8f71e18 Author: Arvind Yadav Date: Thu Sep 21 10:50:03 2017 +0530 ASoC: fsl-asoc-card: Handle return value of devm_kasprintf devm_kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Mark Brown sound/soc/fsl/fsl-asoc-card.c | 4 ++++ 1 file changed, 4 insertions(+) commit 94a6a8e8b57a8ece33b97a6dfc5f7eae61ff96f8 Author: Arvind Yadav Date: Wed Sep 20 15:36:11 2017 +0530 ASoC: omap-hdmi-audio: Handle return value of devm_kasprintf devm_kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Mark Brown sound/soc/omap/omap-hdmi-audio.c | 3 +++ 1 file changed, 3 insertions(+) commit 0c8b794c4a10aaf7ac0d4a49be2b2638e2038adb Author: Arvind Yadav Date: Wed Sep 20 15:36:09 2017 +0530 ASoC: davinci-mcasp: Handle return value of devm_kasprintf devm_kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Acked-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/davinci/davinci-mcasp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 5627453efabf8eef84ce1dce6767d1268570a6c5 Author: Suman Anna Date: Wed Sep 20 13:01:32 2017 -0500 ARM: davinci_all_defconfig: enable CMA options Enable the CMA and DMA_CMA Kconfig options by default for Davinci platforms. Davinci remoteproc driver is one of the modules that depends on these options, and this allows the driver to be made visible for selection with menuconfig. Signed-off-by: Suman Anna Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 2 ++ 1 file changed, 2 insertions(+) commit 788251fa08118efa934ba2f54989997e7a5be679 Author: Dinh Nguyen Date: Wed Sep 20 16:36:02 2017 -0500 arm64: dts: stratix10: add reset property for various peripherals Add reset property for emac, gpio, i2c, sdmmc, timers, and watchdog. Signed-off-by: Dinh Nguyen arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 7691d62689d3bee3db12251a51adc5a5acfef220 Author: Dinh Nguyen Date: Wed Sep 20 12:31:55 2017 -0500 arm64: dts: stratix10: add the 'altr,modrst-off' property Update the Stratix10 reset manager with the 'altr,modrst-offset' property. Signed-off-by: Dinh Nguyen arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 1 + 1 file changed, 1 insertion(+) commit e519922e30fb59f33766b49e3af67931be2858a6 Author: Dinh Nguyen Date: Wed Sep 20 12:11:27 2017 -0500 arm64: dts: stratix10: include the reset manager bindings Add the reset manager includes for Stratix10. Need to use the '#include' instead of '/include/' to avoid a DTC syntax error. Signed-off-by: Dinh Nguyen arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 1 + arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 701e3a48772bae0f1181a7bb3ea7e23f17c03a82 Author: Dinh Nguyen Date: Fri Sep 8 10:14:18 2017 -0500 arm64: dts: stratix10: add ethernet/sdmmc support to the S10 devkit Enable ethernet and sdmmc support on the Stratix10 devkit. Signed-off-by: Dinh Nguyen --- v2: Create a separate PHY node .../boot/dts/altera/socfpga_stratix10_socdk.dts | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit f973bfa075cc05a891cfb0ac44212aa2a27ac54f Author: Dinh Nguyen Date: Fri Jun 23 09:21:41 2017 -0500 arm64: dts: stratix10: fix up the gic register for the Stratix10 platform The register entries for the ARM GIC-400 should have a 2nd set of address. Signed-off-by: Dinh Nguyen arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 1bd773c077deeeb2d9ced1fdb6d846169b8e7e4a Author: Richard Schütz Date: Thu Sep 7 17:47:43 2017 +0200 wireless: set correct mandatory rate flags According to IEEE Std 802.11-2016 (16.2.3.4 Long PHY SIGNAL field) all of the following rates are mandatory for a HR/DSSS PHY: 1 Mb/s, 2 Mb/s, 5.5 Mb/s and 11 Mb/s. Set IEEE80211_RATE_MANDATORY_B flag for all of these instead of just 1 Mb/s to correctly reflect this. Signed-off-by: Richard Schütz [johannes: use switch statement] Signed-off-by: Johannes Berg net/wireless/util.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) commit d405fd8cc807c045b23bc2df4a5ab6b85df614f3 Author: Gregory Greenman Date: Sat Aug 5 11:44:36 2017 +0300 mac80211: recalculate some sta parameters after insertion Sometimes a station is added already in ASSOC state. For example, in AP mode, when a client station didn't get assoc resp and sends an assoc req again. If a station is inserted when its state is ASSOC or higher, the min chandef and allow_p2p_go_ps should be recalculated again after the insertion. Before this patch the recalculation happened only in sta_info_move_state which occurs before the insertion of the sta and thus even though it calls ieee80211_recalc_min_chandef/_p2p_go_ps_allowed functions, since sdata->local->sta_list is still empty at this point, it doesn't do anything. Signed-off-by: Gregory Greenman Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/mac80211/sta_info.c | 57 +++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 25 deletions(-) commit 41693fd5237397d3c61b311af0fda1f6f39297c2 Author: Anuj Phogat Date: Wed Sep 20 13:31:26 2017 -0700 drm/i915/kbl: Change a KBL pci id to GT2 from GT1.5 See Mesa commit 9c588ff Cc: Matt Turner Cc: Rodrigo Vivi Signed-off-by: Anuj Phogat Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20170920203126.1323-1-anuj.phogat@gmail.com include/drm/i915_pciids.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ffbf50b745b63f8eba6153b4fe04c59e718a14b Author: Jerome Brunet Date: Wed Sep 20 16:08:15 2017 +0200 pinctrl: meson: fix incorrect usage of ENOSYS ENOSYS is special and should only be used for incorrect syscall number. It is not the case here. let's use ENOTSUPP instead. Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij drivers/pinctrl/meson/pinctrl-meson.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5ae5f5cb66633c9ac090055832ce028568b8888 Author: Arvind Yadav Date: Wed Sep 20 12:43:09 2017 +0530 gpio: tb10x: Handle return value of devm_kasprintf devm_kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Linus Walleij drivers/gpio/gpio-tb10x.c | 3 +++ 1 file changed, 3 insertions(+) commit ba3e217a5761f912c4c887af28020ea861783ce2 Author: Arvind Yadav Date: Thu Sep 21 10:44:13 2017 +0530 gpio: brcmstb: Handle return value of devm_kasprintf devm_kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav Signed-off-by: Linus Walleij drivers/gpio/gpio-brcmstb.c | 4 ++++ 1 file changed, 4 insertions(+) commit b582658ae00ded3058618252d40ed480870ee18b Author: Colin Ian King Date: Tue Sep 19 15:42:18 2017 +0100 pinctrl: single: make two arrays static const, reduces object code size Don't populate the read-only arrays prop2 and prop4 on the stack, instead make them static const. Makes the object code smaller by over 230 bytes: Before: text data bss dec hex filename 28235 5820 192 34247 85c7 drivers/pinctrl/pinctrl-single.o After: text data bss dec hex filename 27839 5980 192 34011 84db drivers/pinctrl/pinctrl-single.o Signed-off-by: Colin Ian King Acked-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-single.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d71dfa2d9f119bcf41ae2cb130b98f91321890e Author: Colin Ian King Date: Wed Sep 13 17:15:01 2017 +0100 pinctrl/amd: make functions amd_gpio_suspend and amd_gpio_resume static The functions amd_gpio_suspend and amd_gpio_resume are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'amd_gpio_suspend' was not declared. Should it be static? symbol 'amd_gpio_resume' was not declared. Should it be static? Signed-off-by: Colin Ian King Reviewed-by: Daniel Drake Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-amd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 75f029c3a83f3e7a1d0d928efa4fe47dd6a8a9eb Author: Arvind Yadav Date: Thu Sep 21 12:16:56 2017 +0200 EDAC: Handle return value of kasprintf() kasprintf() can fail and we must check its return value. Signed-off-by: Arvind Yadav Cc: linux-edac@vger.kernel.org [ Merged into a single patch, small formatting fixups. ] Signed-off-by: Borislav Petkov drivers/edac/i7core_edac.c | 11 +++++++++-- drivers/edac/sb_edac.c | 5 +++++ drivers/edac/skx_edac.c | 9 +++++++-- 3 files changed, 21 insertions(+), 4 deletions(-) commit 65026002d69de006e273749bb799d3b01b757eb0 Author: Emmanuel Grumbach Date: Fri Aug 18 15:31:41 2017 +0300 nl80211: add an option to allow MFP without requiring it The user space can now allow the kernel to associate to an AP that requires MFP or that doesn't have MFP enabled in the same NL80211_CMD_CONNECT command, by using a new NL80211_MFP_OPTIONAL flag. The driver / firmware will decide whether to use it or not. Include a feature bit to advertise support for NL80211_MFP_OPTIONAL. This allows new user space to run on old kernels and know that it cannot use the new attribute if it isn't supported. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 13 +++++++++++-- net/wireless/nl80211.c | 8 +++++++- 2 files changed, 18 insertions(+), 3 deletions(-) commit a6bcda44843c6dfced0fb973e2607c2a98addfa9 Author: Johannes Berg Date: Tue Sep 19 11:52:43 2017 +0200 cfg80211: remove unused function ieee80211_data_from_8023() This function hasn't been used since the removal of iwmc3200wifi in 2012. It also appears to have a bug when qos=True, since then it'll copy uninitialized stack memory to the SKB. Just remove the function entirely. Reported-by: Jouni Malinen Signed-off-by: Johannes Berg Documentation/driver-api/80211/cfg80211.rst | 3 - include/net/cfg80211.h | 13 ---- net/wireless/util.c | 115 ---------------------------- 3 files changed, 131 deletions(-) commit 62b093b375e3c10ff39896f2a172146cf5df529f Author: Lubomir Rintel Date: Mon Sep 18 15:56:51 2017 +0200 mac80211_hwsim: use dyndbg for debug messages The mac80211_hwsim doesn't offer a way to disable the debugging output. Unfortunately, it's pretty chatty, dumping a lot of stuff into the message buffer. This patch changes it to use dyndbg for controlling the debug output. It's disabled by default, but can be enabled by a module parameter (1), at runtime (2) or persisted in modprobe.conf (3). (1) modprobe mac80211_hwsim dyndbg=+p (2) echo "module mac80211_hwsim +p" >/sys/kernel/debug/dynamic_debug/control (3) echo "options mac80211_hwsim dyndbg=+p" >>/etc/modprobe.d/my.conf Signed-off-by: Lubomir Rintel Signed-off-by: Johannes Berg drivers/net/wireless/mac80211_hwsim.c | 192 +++++++++++++++++----------------- 1 file changed, 96 insertions(+), 96 deletions(-) commit 4c121fd690d9c465e4cb09b7859adfdd6a0aee1d Author: Johannes Berg Date: Fri Sep 8 11:54:46 2017 +0200 mac80211: use offsetofend() This was created using the following spatch: @find@ type S; expression M, M2; position p; @@ offsetof(S, M) + sizeof(M2)@p @script:python@ m << find.M; m2 << find.M2; @@ if not m2.endswith('-> ' + m): cocci.include_match(False) @change@ type find.S; expression find.M, find.M2; position find.p; @@ -offsetof(S, M) + sizeof(M2)@p +offsetofend(S, M) Signed-off-by: Johannes Berg net/mac80211/mesh.c | 3 +-- net/mac80211/mesh_hwmp.c | 8 ++++---- net/mac80211/mesh_plink.c | 3 +-- net/mac80211/util.c | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) commit 1281103770e909e064edbb22a1115a0c14eca081 Author: Ilan peer Date: Wed Sep 6 17:18:33 2017 +0300 mac80211: Simplify locking in ieee80211_sta_tear_down_BA_sessions() Simplify the locking in ieee80211_sta_tear_down_BA_sessions() and lock sta->ampdu_mlme.mtx over the entire function instead of locking/unlocking it for each TID etc. Signed-off-by: Ilan Peer Signed-off-by: Johannes Berg net/mac80211/ht.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 1272c5d89b597995cb10db87dd4a1adc91d36006 Author: Luca Coelho Date: Fri Aug 18 15:33:56 2017 +0300 mac80211: add documentation to ieee80211_rx_ba_offl() Add documentation to ieee80211_rx_ba_offl() function and, while at it, rename the bit argument to tid, for consistency. Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/net/mac80211.h | 8 +++++++- net/mac80211/agg-rx.c | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) commit 40b0bd24973487272167a09db040a70c053bedbe Author: Roee Zamir Date: Sun Aug 6 11:38:23 2017 +0300 mac80211: oce: enable receiving of bcast probe resp One of OCE's optimizations is acception of broadcast probe responses. Accept broadcast probe responses but don't set NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP. Because a device's firmware may filter out the broadcast probe resp - drivers should set this flag. Signed-off-by: Roee Zamir Signed-off-by: Luca Coelho [johannes: make accepting broadcast conditional on the nl80211 scan flag that was added for that specific purpose] Signed-off-by: Johannes Berg net/mac80211/scan.c | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) commit 2d23d0736e3a4a0fdb92b8e46ea476639f16aae8 Author: Roee Zamir Date: Sun Aug 6 11:38:22 2017 +0300 nl80211: add OCE scan and capability flags Add Optimized Connectivity Experience (OCE) scan and capability flags. Some of them unique to OCE and some are stand alone. And add scan flags to enable/disable them. Signed-off-by: Roee Zamir Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/uapi/linux/nl80211.h | 37 ++++++++++-- net/wireless/nl80211.c | 137 ++++++++++++++++++++++++------------------- 2 files changed, 111 insertions(+), 63 deletions(-) commit ffa4629e0c2b8b015f5fa174149c6dd269b4142c Author: Tova Mussai Date: Sat Aug 5 11:44:38 2017 +0300 nl80211: return error for invalid center_freq in 40 MHz When NL80211_ATTR_WIPHY_CHANNEL_TYPE is given, nl80211 would parse the channel definition the old way, discarding NL80211_ATTR_CENTER_FREQ1, NL80211_ATTR_CENTER_FREQ2 etc. However, it is possible that user space added both NL80211_ATTR_WIPHY_CHANNEL_TYPE and NL80211_ATTR_CENTER_FREQ1 or NL80211_ATTR_CENTER_FREQ2 assuming that all settings would be honored. In such a case, validate that NL80211_ATTR_CENTER_FREQ1 and NL80211_ATTR_CENTER_FREQ2 values match the channel configuration, as otherwise user space would assume that the desired configuration was applied. For example, when trying to start ap with NL80211_ATTR_WIPHY_CHANNEL_TYPE = NL80211_CHAN_HT40MINUS, NL80211_ATTR_WIPHY_FREQ = 5180 and NL80211_ATTR_CENTER_FREQ1 = 5250 without this fix, the ap will start on channel 36 (center_freq1 will be corrected to 5180). With this fix, we will throw an error instead. Signed-off-by: Tova Mussai Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/wireless/nl80211.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit a7f26d8050c4f172d2dc523aabf45c5cbd9558ac Author: Johannes Berg Date: Sat Aug 5 11:44:32 2017 +0300 mac80211: simplify and clarify IE splitting There's no need to split off IEs from the ones obtained from userspace, if they were already split off, so for example IEs that went before HT don't have to be listed again to go before VHT. Simplify the code here so it's clearer. While at it, also clarify the comments regarding the DMG (60 GHz) elements. Signed-off-by: Johannes Berg net/mac80211/mlme.c | 19 +++++++------------ net/mac80211/util.c | 21 +++++++++------------ 2 files changed, 16 insertions(+), 24 deletions(-) commit 2512b1b18d0748d867bb22387db7c86b903291ad Author: Liad Kaufman Date: Sat Aug 5 11:44:31 2017 +0300 mac80211: extend ieee80211_ie_split to support EXTENSION Current ieee80211_ie_split() implementation doesn't account for elements that are sub-elements of the EXTENSION IE. To extend support to these IEs as well, treat the WLAN_EID_EXTENSION ids in the %ids array as indicating that the next id in the array is a sub-element of the EXTENSION IE. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg include/net/cfg80211.h | 6 ++++-- net/wireless/util.c | 54 ++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 50 insertions(+), 10 deletions(-) commit 79af1f866193de29e65a4dba7d0dab14b0c0ff93 Author: Johannes Berg Date: Thu Jun 22 12:20:29 2017 +0200 mac80211: avoid allocating TXQs that won't be used For AP_VLAN and monitor interfaces we'll never use the TXQs we allocated, so avoid doing so. Signed-off-by: Johannes Berg net/mac80211/iface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7aef828dfc41565f7e2f7af99be8134639d3f769 Author: H Hartley Sweeten Date: Sun Sep 3 10:43:47 2017 -0700 ARM: ep93xx: Add lm70 HWMON sensor to TS-72xx boards Register the TI TMP122 (lm70) temperature sensor driver for the TS-72xx boards. Originaly from Florian Fainelli. Updated to the new spi-ep93xx chip select method. Signed-off-by: H Hartley Sweeten Signed-off-by: Florian Fainelli Reviewed-by: Alexander Sverdlin Signed-off-by: Linus Walleij arch/arm/mach-ep93xx/ts72xx.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 97c3bca922468996c864917c9a8ea6a410233985 Author: H Hartley Sweeten Date: Sun Sep 3 10:43:46 2017 -0700 ARM: ep93xx: tidy up TS-72xx Watchdog resources The ts-72xx watchdog uses two byte sized registers. Tidy up the resource declaration so that the proper information is shown in /proc/iomem. Signed-off-by: H Hartley Sweeten Reviewed-by: Alexander Sverdlin Signed-off-by: Linus Walleij arch/arm/mach-ep93xx/ts72xx.c | 20 +++++++++----------- arch/arm/mach-ep93xx/ts72xx.h | 3 --- 2 files changed, 9 insertions(+), 14 deletions(-) commit 14cd18a89337b2fe509f2a70bea734c488d7a698 Author: H Hartley Sweeten Date: Sun Sep 3 10:43:45 2017 -0700 ARM: ep93xx: simone: let the mmc_spi driver handle the card detect This board uses a GPIO for the MMC card detect. Let the mmc_spi driver handle it instead of the platform code. Signed-off-by: H Hartley Sweeten Tested-by: Linus Walleij Reviewed-by: Alexander Sverdlin Signed-off-by: Linus Walleij arch/arm/mach-ep93xx/simone.c | 54 +++---------------------------------------- 1 file changed, 3 insertions(+), 51 deletions(-) commit 80320927723ff6466b054eccdb673105179c036d Author: H Hartley Sweeten Date: Sun Sep 3 10:43:44 2017 -0700 ARM: ep93xx: switch to SPARSEMEM The EP93xx has four chip selects that can be used for the SDRAM memory. These chip selects are decoded to specify an address domain: SDCS3 0x00000000-0x0fffffff with Boot Option ASDO=1 SDCS0 0xc0000000-0xcfffffff SDCS1 0xd0000000-0xdfffffff SDCS2 0xe0000000-x0efffffff SDCS3 0xf0000000-0xffffffff with Boot Option ASDO=0 Because of the row/column/bank architecture of SDRAM, the mapping of these memories into the processor's memory space is discontiguous. Most ep93xx systems only use one of the chip selects. For these systems, ARCH_HAS_HOLES_MEMORYMODEL has worked fine to handle the discontiguous memory. But, some of the TS-72xx boards use multiple chip selects. The TS-7300 in particular uses SDCS3 (with ASDO=1) and SDCS2. On that system with ARCH_HAS_HOLES_MEMORYMODEL the SDCS2 memory does not get handled correctly and results in the system not booting. Change the EP93xx to ARCH_SPARSEMEM_ENABLE. This handles the discontiguous memory for all configurations. This has been tested on the following ep93xx platforms: EDB9307A with 64 MiB on SDCS0 Vision EP9307 with 64 MiB on SDCS0 TS-7300 with 64 MiB on SDCS3 (with ASDO=1) and 64 MiB on SDCS2 sim.one with 64 MiB on SDCS0 Signed-off-by: H Hartley Sweeten Tested-by: Linus Walleij Cc: Russell King Tested-by: Florian Fainelli Tested-by: Alexander Sverdlin Signed-off-by: Linus Walleij arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e22b36bd75ad57fdf1010ce7d6d92df96311947b Author: Sergei Shtylyov Date: Fri Sep 15 22:43:24 2017 +0300 arm64: renesas: document Eagle board bindings Document the Eagle device tree bindings, listing it as a supported board. This allows to use checkpatch.pl to validate .dts files referring to the Eagle board. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+) commit 34f058b2731bd8c06237ea5725a557edba687ff4 Author: Yoshihiro Shimoda Date: Thu Sep 14 19:30:42 2017 +0900 arm64: dts: renesas: r8a77995: draak: enable USB2.0 PHY This patch enables USB2.0 PHY for R-Car D3 draak board. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 423254a1799bc7ea1f81db0b5e0c7eb1494c13f1 Author: Yoshihiro Shimoda Date: Thu Sep 14 19:30:41 2017 +0900 arm64: dts: renesas: r8a77995: add USB2.0 Host (EHCI/OHCI) device node This patch adds USB2.0 Host (EHCI/OHCI) device node for r8a77995. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit a0ea7fe8d34cbede9928b44e9a6b1dcd3f0150d1 Author: Yoshihiro Shimoda Date: Thu Sep 14 19:30:40 2017 +0900 arm64: dts: renesas: r8a77995: Add USB2.0 PHY device node This patch adds USB2.0 PHY device node for r8a77995. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit cf1cc6f1da41ceb60f6389b6b46f4f6dc06a2b63 Author: Fabrizio Castro Date: Wed Sep 13 18:05:41 2017 +0100 ARM: dts: iwg22m: Add SPI NOR support Add support for the SPI NOR device used to boot up the system to the System on Module DT. Signed-off-by: Fabrizio Castro Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745-iwg22m.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 2391d0269a85c3a7942cb7e2bbac5751a7191e10 Author: Fabrizio Castro Date: Wed Sep 13 18:05:40 2017 +0100 ARM: dts: r8a7745: Add QSPI support Add the DT node for the QSPI interface to the SoC dtsi. Signed-off-by: Fabrizio Castro Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 781e923a5fe4751d3aaa740ca3de0f9d179c34ef Author: Fabrizio Castro Date: Wed Sep 13 18:05:39 2017 +0100 ARM: dts: iwg20m: Add SPI NOR support Add support for the SPI NOR device used to boot up the system to the System on Module DT. Signed-off-by: Fabrizio Castro Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743-iwg20m.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 450c03718e971880ae067dc5f94a86f961acd6c3 Author: Fabrizio Castro Date: Wed Sep 13 18:05:38 2017 +0100 ARM: dts: r8a7743: Add QSPI support Add the DT node for the QSPI interface to the SoC dtsi. Signed-off-by: Fabrizio Castro Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 599114ee21057040c058043fdc1367878350d5e4 Author: Fabrizio Castro Date: Wed Sep 13 18:05:36 2017 +0100 ARM: dts: iwg22m: Enable SDHI1 controller Enable the SDHI1 controller on iWave RZ/G1E SoM. Signed-off-by: Fabrizio Castro Signed-off-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745-iwg22m.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 5418a9004126992aa2bbd07d79e8305659cb0dc9 Author: Vladimir Barinov Date: Sat Sep 16 21:48:47 2017 +0300 arm: shmobile: Document Kingfisher board DT bindings Add Kingfisher Device tree bindings Documentation, listing it as a supported board. Kingfisher is the H3ULCB/M3ULCB extension board. Signed-off-by: Vladimir Barinov Acked-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+) commit fc5b920c3b9bbe9bf05aeb1c497643608ecb656b Author: Li Jun Date: Mon Sep 4 23:14:01 2017 +0800 usb: chipidea: do charger detection in vbus session In case the usb phy has the capability to detect usb charger type, do it when vbus is on. Signed-off-by: Li Jun Signed-off-by: Peter Chen drivers/usb/chipidea/udc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 908a23efb76eed04f5b5173ecf09b6cbd05d886b Merge: 34929cb ded711c Author: David S. Miller Date: Wed Sep 20 18:03:13 2017 -0700 Merge branch 'mlxsw-Multicast-flood-update' Jiri Pirko says: ==================== mlxsw: Multicast flood update Nogah says: Currently, there are four erroneous flows in MC flood: 1. When MC is disabled it affects only the flood table for unregistered MC packets, but packets that match an entry in the MDB are unaffected. 2. When MC is disabled, MC packets are being sent to all the ports in the bridge (like BC and link-local MC packets) regardless of the designated flag (BR_MCAST_FLAG). 3. When a port is being deleted from a bridge it might remain in the MDB. 4. When MC is enabled packets are flooded to the mrouter ports only if they don't match any entry in the MDB, when they should always be flooded to them. What these problems have in common is the discrepancy between how the hardware handles MDB and mcast flood, and how the driver does it. Each of these problems needs fixing either in the MDB code, or in mcast flood code, and some in both. Patches 1-6 change the way the MDB is handled in the driver to make the following changes easier. Patches 7-8 fix problem number 1 by removing the MDB from the HW when MC is being disabled and restoring it when it is being enabled. Patches 9-10 fix problem number 2 by offloading the flood table by the appropriate flag. Patch 11 fixes problem number 3 by adding MDB flush to the port removal. Patches 12-14 fix problem number 4 by adding the mrouter ports to every MDB entry in the HW to mimic the wanted behaviour. ==================== Signed-off-by: David S. Miller commit ded711c87a0411a7f3f56f8c575d7b642ee0110e Author: Nogah Frankel Date: Wed Sep 20 16:15:16 2017 +0200 mlxsw: spectrum_switchdev: Consider mrouter status for mdb changes When a mrouter is registered or leaves a mid, don't update the HW. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 0166277706e57779f06b741d25a9e86d99726e2a Author: Nogah Frankel Date: Wed Sep 20 16:15:15 2017 +0200 mlxsw: spectrum_switchdev: Remove mrouter flood in mdb flush In mdb flush the port is being removed from all the mids it is registered to. But if the port is mrouter, all the mids floods to it. This patch remove mrouter ports from mids it is not registered to in the mdb flush. Signed-off-by: Nogah Frankel 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 3ddda1178e41bbe26bb5c6ebf66ae3d0a87ac410 Author: Nogah Frankel Date: Wed Sep 20 16:15:14 2017 +0200 mlxsw: spectrum_switchdev: Update the mdb of mrouter port change Whenever a port starts / stops being mrouter, update all the mdb entries in the HW to flood / stop flooding mc packets there. The change should happen only if the port is not in the mid. (If it is, the mid should flood mc packets to this port anyway) Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 3fba877cb68cfbc1826dd4abc7b1a8fe862adb2a Author: Nogah Frankel Date: Wed Sep 20 16:15:13 2017 +0200 mlxsw: spectrum_switchdev: Flood all mc packets to mrouter ports When mc is enabled, whenever a mc packet doesn't hit any mdb entry it is being flood to the ports marked as mrouters. However, all mc packets should be flooded to them even if they match an entry in the mdb. This patch adds the mrouter ports to every mdb entry that is being written to the HW. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 65 ++++++++++++++++++++-- 1 file changed, 60 insertions(+), 5 deletions(-) commit bb5355b27c9da3786a2b5e1583c9d64f492ac7ad Author: Nogah Frankel Date: Wed Sep 20 16:15:12 2017 +0200 mlxsw: spectrum_switchdev: Flush the mdb when a port is being removed When a port is being removed from a bridge, flush the bridge mdb to remove the mids of that port. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 39 ++++++++++++++++------ 1 file changed, 29 insertions(+), 10 deletions(-) commit 9dad51bdaa4b1846bd9d5307b54dca74efa555ea Author: Nogah Frankel Date: Wed Sep 20 16:15:11 2017 +0200 mlxsw: spectrum_switchdev: Flood mc when mc is disabled by user flag When multicast is disabled, flood mc packets only to port that are marked BR_MCAST_FLOOD (instead to all). Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 218a8f8a6379bfd359e58f369b7b7660cd12e865 Author: Nogah Frankel Date: Wed Sep 20 16:15:10 2017 +0200 mlxsw: spectrum_switchdev: Use generic mc flood function Use the generic mc flood function to decide whether to flood mc to a port when mc is being enabled / disabled. Move this function in the file to avoid forward declaration. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 2e3496cd3488729200ff0f1c6381b7016ecd41bd Author: Nogah Frankel Date: Wed Sep 20 16:15:09 2017 +0200 mlxsw: spectrum_switchdev: Disable mdb when mc is disabled Remove all the mdb entries from the HW when mc is being disabled and re-write them when it is being enabled. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 41 +++++++++++++++++++--- 1 file changed, 37 insertions(+), 4 deletions(-) commit 846fd8a0e7dcd9f455a86dc17ddf0a51c124f9c0 Author: Nogah Frankel Date: Wed Sep 20 16:15:08 2017 +0200 mlxsw: spectrum_switchdev: Don't write mids to the HW when mc is disabled Don't write multicast related data to the HW when mc is disabled. Also, don't allocate mid id to new mids (so the remove function could know that they weren't wrote to the HW) Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 061e55bfb83e632afcd34130bb19fe7a32325b02 Author: Nogah Frankel Date: Wed Sep 20 16:15:07 2017 +0200 mlxsw: spectrum_switchdev: Break mid deletion into two function Break mid deletion into two function, so it will be possible in the future to delete a mid entry for other reasons then switchdev command (like port deletion). Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 32 ++++++++++++++-------- 1 file changed, 20 insertions(+), 12 deletions(-) commit 73b433e803d2a3547ee38d1fb2a0bc6f3b03a6d9 Author: Nogah Frankel Date: Wed Sep 20 16:15:06 2017 +0200 mlxsw: spectrum_switchdev: Attach mid id allocation to HW write Attach mid getting and releasing mid id to the HW write / remove, and add a flag to indicate whether the mid is in the HW. It is done because mid id is also HW index to this mid. This change allows adding in the following patches the ability to have a mid in the mdb cache but not in the HW. It will be useful for being able to disable the multicast. It means that the mdb is being written / delete to the HW in the mid allocation / removing function, not after them. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 88 ++++++++++++++-------- 2 files changed, 56 insertions(+), 33 deletions(-) commit 5f9abc597cdd7a63433b7ebfcf26ee2746a76638 Author: Nogah Frankel Date: Wed Sep 20 16:15:05 2017 +0200 mlxsw: spectrum_switchdev: Break smid write function Break the smid write function into two, one that cleans the ports that might be still written there and one that changes an exiting mid entry. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 42 +++++++++++++++------- 1 file changed, 30 insertions(+), 12 deletions(-) commit b80888a9194f3aecd5edf6a7ede5c23d77bade8b Author: Nogah Frankel Date: Wed Sep 20 16:15:04 2017 +0200 mlxsw: spectrum_switchdev: Save mids list per bridge device Instead of saving all the mids in the same list, save them per vlan device. This change allows a more efficient mid find. Also, in the next patches, there will be added a lot of loops over all the mids in bridge device for multicast disable, mrouter change and ndb flush. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 49 +++++++++++----------- 1 file changed, 24 insertions(+), 25 deletions(-) commit 0161b9505ab59d4bfc0de66073c9240d1b05040d Author: Nogah Frankel Date: Wed Sep 20 16:15:03 2017 +0200 mlxsw: spectrum_switchdev: Remove reference count from mid Since there is a bitmap for the ports registered to each mid, there is no need for a ref count, since it will always be the number of set bits in this bitmap. Any check of the ref count was replaced with checking if the bitmap is empty. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 - .../net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) commit 4cdc35e4ebf2e6b1cf4fe028eb9e711723f9199a Author: Nogah Frankel Date: Wed Sep 20 16:15:02 2017 +0200 mlxsw: spectrum_switchdev: Add a ports bitmap to the mid db Add a bitmap of ports to the mid struct to hold the ports that are registered to this mid. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) commit dff37b58ca53b1978e02edf6f8c1dd681799342b Author: Nogah Frankel Date: Wed Sep 20 16:15:01 2017 +0200 mlxsw: spectrum_switchdev: Change mc_router to mrouter Change the naming of mc_router to mrouter to keep consistency. Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 34929cb4d691f7f9e217ba0e3f536978cd56aa6c Author: Ganesh Goudar Date: Wed Sep 20 11:32:07 2017 +0530 cxgb4: add new T5 pci device id's Add 0x50a5, 0x50a6, 0x50a7, 0x50a8 and 0x50a9 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 | 5 +++++ 1 file changed, 5 insertions(+) commit 7275291f5801e57ff23022de7233bf4d4a43cde5 Merge: 53bade8 637ae0f Author: David S. Miller Date: Wed Sep 20 15:57:02 2017 -0700 Merge branch 'blackfin-Drop-non-functional-DSA-code' Florian Fainelli says: ==================== blackfin: Drop non-functional DSA code I sent those many months ago in the hope that the bfin-linux people would pick those patches but nobody seems to be responding, can you queue those via net-next since this affects DSA? ==================== Signed-off-by: David S. Miller commit 637ae0f44580040702b53e8f0593a5a5fb00473e Author: Florian Fainelli Date: Tue Sep 19 18:03:46 2017 -0700 blackfin: ezbrd: Remove non-functional DSA/KSZ8893M code There is no in tree driver for the KSZ8893M switch driver, so just get rid of the code in that board file. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller arch/blackfin/mach-bf518/boards/ezbrd.c | 47 --------------------------------- 1 file changed, 47 deletions(-) commit 5c1adf606d6ff519b5c1b9b22b8055f161dd98dd Author: Florian Fainelli Date: Tue Sep 19 18:03:45 2017 -0700 blackfin: tcm-bf518: Remove dsa.h inclusion Nothing in that file uses definitions from that header, so just get rid of it. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller arch/blackfin/mach-bf518/boards/tcm-bf518.c | 1 - 1 file changed, 1 deletion(-) commit 53bade8a3372eea0f1276bc96892735c517330fe Author: Florian Fainelli Date: Tue Sep 19 18:00:37 2017 -0700 net: dsa: Utilize dsa_slave_dev_check() Instead of open coding the check. Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller net/dsa/slave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eccaa9e51b77e504fa8e8357e4979bde724e22a8 Author: David S. Miller Date: Wed Sep 20 15:39:59 2017 -0700 Revert "bridge: also trigger RTM_NEWLINK when interface is released from bridge" This reverts commit 00ba4cb36da682c68dc87d1703a8aaffe2b4e9c5. Discussion with David Ahern determined that this change is actually not needed. Signed-off-by: David S. Miller net/bridge/br_ioctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 58dcd5bfcf99c9222a825ca67a0ecbd75516ec3f Author: Yong Zhao Date: Wed Sep 20 18:10:20 2017 -0400 drm/amdkfd: Drop _nocpsch suffix from shared functions Several functions in DQM are shared between cpsch and nocpsch code. Remove the misleading _nocpsch suffix from their names. Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) commit e596b90338126d08a8d90f08e79bb644b8c9f2b6 Author: Yong Zhao Date: Wed Sep 20 18:10:19 2017 -0400 drm/amdkfd: Reuse CHIP_* from amdgpu v2 There are already CHIP_* definitions under amd_shared.h file on amdgpu side, so KFD should reuse them rather than defining new ones. Using enum for asic type requires default cases on switch statements to prevent compiler warnings. WARN on unsupported ASICs. It should never get there because KFD should not be initialized on unsupported devices. v2: Replace BUG() with WARN and error return Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 ++++ drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 18 ++++++++++++------ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 3 +++ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 9 +++------ 4 files changed, 22 insertions(+), 12 deletions(-) commit 44008d7a871ce5a487cbcc4c412a5149145ea442 Author: Yong Zhao Date: Wed Sep 20 18:10:18 2017 -0400 drm/amdkfd: Use VMID bitmap from KGD v2 The hard-coded values related to VMID were removed in KFD, as those values can be calculated in the KFD initialization function. v2: remove unnecessary local variable Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c | 9 ++------- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 5 +++++ drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 13 ++++++------- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 4 ---- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 7 +++++++ drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 2 +- 6 files changed, 21 insertions(+), 19 deletions(-) commit b90e3fbecc9030efb8a6aed1d54a79d0c3d0820a Author: Felix Kuehling Date: Wed Sep 20 18:10:16 2017 -0400 drm/amdkfd: Adjust dequeue latencies and timeouts Adjust latencies and timeouts for dequeueing with HWS and consolidate them in one place. Make them longer to allow long running waves to complete without causing a timeout. The timeout is twice as long as the latency plus some buffer to make sure we don't detect a timeout prematurely. Change timeouts for dequeueing HQDs without HWS. KFD_UNMAP_LATENCY is more consistent with what the HWS does for user queues. Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 4 +++- drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 3 --- 5 files changed, 6 insertions(+), 7 deletions(-) commit 8c72c3d7dfa86f7e84c5397975eb9c803e4de7b6 Author: Yong Zhao Date: Wed Sep 20 18:10:15 2017 -0400 drm/amdkfd: Rectify the jiffies calculation error with milliseconds v2 The timeout in milliseconds should not be regarded as jiffies. This commit fixed that. v2: - use msecs_to_jiffies - change timeout_ms parameter to unsigned int to match msecs_to_jiffies Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 6 +++--- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 733fa1f7428c362b17b3de3a1c691e21fa803239 Author: Yong Zhao Date: Wed Sep 20 18:10:14 2017 -0400 drm/amdkfd: Fix suspend/resume issue on Carrizo v2 When we do suspend/resume through "sudo pm-suspend" while there is HSA activity running, upon resume we will encounter HWS hanging, which is caused by memory read/write failures. The root cause is that when suspend, we neglected to unbind pasid from kfd device. Another major change is that the bind/unbinding is changed to be performed on a per process basis, instead of whether there are queues in dqm. v2: - free IOMMU device if kfd_bind_processes_to_device fails in kfd_resume - add comments to kfd_bind/unbind_processes_to/from_device - minor cleanups Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_device.c | 23 +++-- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 13 --- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 15 +++- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 97 ++++++++++++++++++---- 4 files changed, 109 insertions(+), 39 deletions(-) commit b8935a7c4b4f2c487c639eb9071b4e8f0cbeac4a Author: Yong Zhao Date: Wed Sep 20 18:10:13 2017 -0400 drm/amdkfd: Reorganize kfd resume code The idea is to let kfd init and resume function share the same code path as much as possible, rather than to have two copies of almost identical code. That way improves the code readability and maintainability. Signed-off-by: Yong Zhao Signed-off-by: Felix Kuehling Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay drivers/gpu/drm/amd/amdkfd/kfd_device.c | 78 +++++++++++++++++---------------- 1 file changed, 40 insertions(+), 38 deletions(-) commit 0d4a6608f68c7532dcbfec2ea1150c9761767d03 Author: Paolo Abeni Date: Tue Sep 19 12:11:43 2017 +0200 udp: do rmem bulk free even if the rx sk queue is empty The commit 6b229cf77d68 ("udp: add batching to udp_rmem_release()") reduced greatly the cacheline contention between the BH and the US reader batching the rmem updates in most scenarios. Such optimization is explicitly avoided if the US reader is faster then BH processing. My fault, I initially suggested this kind of behavior due to concerns of possible regressions with small sk_rcvbuf values. Tests showed such concerns are misplaced, so this commit relaxes the condition for rmem bulk updates, obtaining small but measurable performance gain in the scenario described above. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller net/ipv4/udp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 186b3c998c50fc241b51b905081c748455d16b4a Author: Jason Wang Date: Tue Sep 19 17:42:43 2017 +0800 virtio-net: support XDP_REDIRECT This patch tries to add XDP_REDIRECT for virtio-net. The changes are not complex as we could use exist XDP_TX helpers for most of the work. The rest is passing the XDP_TX to NAPI handler for implementing batching. Cc: John Fastabend Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net. | 0 drivers/net/virtio_net.c | 77 ++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 62 insertions(+), 15 deletions(-) commit 312403453532b209879aa7faeff296bd3dea78af Author: Jason Wang Date: Tue Sep 19 17:42:42 2017 +0800 virtio-net: add packet len average only when needed during XDP There's no need to add packet len average in the case of XDP_PASS since it will be done soon after skb is created. Cc: John Fastabend Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9457642a405fd68d5ce90f5c432e462277fb666e Author: Jason Wang Date: Tue Sep 19 17:42:41 2017 +0800 virtio-net: remove unnecessary parameter of virtnet_xdp_xmit() CC: John Fastabend Signed-off-by: Jason Wang Signed-off-by: David S. Miller drivers/net/virtio_net.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4d6a78b477dd9686e7034aa140057ce7a5da5fd3 Author: Egil Hjelmeland Date: Tue Sep 19 10:09:24 2017 +0200 net: dsa: lan9303: Add adjust_link() method Make the driver react to device tree "fixed-link" declaration on CPU port. - turn off autonegotiation - force speed 10 or 100 mb/s - force duplex mode Signed-off-by: Egil Hjelmeland Signed-off-by: David S. Miller drivers/net/dsa/lan9303-core.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 00ba4cb36da682c68dc87d1703a8aaffe2b4e9c5 Author: Vincent Bernat Date: Sat Sep 16 16:18:33 2017 +0200 bridge: also trigger RTM_NEWLINK when interface is released from bridge Currently, when an interface is released from a bridge via ioctl(), we get a RTM_DELLINK event through netlink: Deleted 2: dummy0: mtu 1500 master bridge0 state UNKNOWN link/ether 6e:23:c2:54:3a:b3 Userspace has to interpret that as a removal from the bridge, not as a complete removal of the interface. When an bridged interface is completely removed, we get two events: Deleted 2: dummy0: mtu 1500 master bridge0 state DOWN link/ether 6e:23:c2:54:3a:b3 Deleted 2: dummy0: mtu 1500 qdisc noop state DOWN group default link/ether 6e:23:c2:54:3a:b3 brd ff:ff:ff:ff:ff:ff In constrast, when an interface is released from a bond, we get a RTM_NEWLINK with only the new characteristics (no master): 3: dummy1: mtu 1500 qdisc noqueue master bond0 state UNKNOWN group default link/ether ae:dc:7a:8c:9a:3c brd ff:ff:ff:ff:ff:ff 3: dummy1: mtu 1500 qdisc noqueue state UNKNOWN group default link/ether ae:dc:7a:8c:9a:3c brd ff:ff:ff:ff:ff:ff 4: bond0: mtu 1500 qdisc noqueue state UP group default link/ether ae:dc:7a:8c:9a:3c brd ff:ff:ff:ff:ff:ff 3: dummy1: mtu 1500 qdisc noqueue state DOWN group default link/ether ae:dc:7a:8c:9a:3c brd ff:ff:ff:ff:ff:ff 3: dummy1: mtu 1500 qdisc noqueue state DOWN group default link/ether ca:c8:7b:66:f8:25 brd ff:ff:ff:ff:ff:ff 4: bond0: mtu 1500 qdisc noqueue state UP group default link/ether ae:dc:7a:8c:9a:3c brd ff:ff:ff:ff:ff:ff Userland may be confused by the fact we say a link is deleted while its characteristics are only modified. A first solution would have been to turn the RTM_DELLINK event in del_nbp() into a RTM_NEWLINK event. However, maybe some piece of userland is relying on this RTM_DELLINK to detect when a bridged interface is released. Instead, we also emit a RTM_NEWLINK event once the interface is released (without master info). Deleted 2: dummy0: mtu 1500 master bridge0 state UNKNOWN link/ether 8a:bb:e7:94:b1:f8 2: dummy0: mtu 1500 qdisc noqueue state UNKNOWN group default link/ether 8a:bb:e7:94:b1:f8 brd ff:ff:ff:ff:ff:ff This is done only when using ioctl(). When using Netlink, such an event is already automatically emitted in do_setlink(). Signed-off-by: Vincent Bernat Signed-off-by: David S. Miller net/bridge/br_ioctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 07850a4f74ea0433fe26dccb1ab9556c738a6584 Author: Zhang Shengju Date: Wed Sep 20 08:12:23 2017 +0800 macvlan: code refine to check data before using This patch checks data first at one place, return if it's null. Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller drivers/net/macvlan.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit d4e1b299ec2853dd3d90b71ae86fa2626e60dc25 Author: Xiang Gao Date: Wed Sep 20 12:18:17 2017 -0400 ipv6: Use ipv6_authlen for len in ipv6_skip_exthdr In ipv6_skip_exthdr, the lengh of AH header is computed manually as (hp->hdrlen+2)<<2. However, in include/linux/ipv6.h, a macro named ipv6_authlen is already defined for exactly the same job. This commit replaces the manual computation code with the macro. Signed-off-by: Xiang Gao Signed-off-by: David S. Miller net/ipv6/exthdrs_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 531beb067c6185aceabfdee0965234c6a8fd133b Author: Colin Ian King Date: Fri Sep 15 00:05:16 2017 +0100 dma-buf: remove redundant initialization of sg_table sg_table is being initialized and is never read before it is updated again later on, hence making the initialization redundant. Remove the initialization. Detected by clang scan-build: "warning: Value stored to 'sg_table' during its initialization is never read" Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170914230516.6056-1-colin.king@canonical.com drivers/dma-buf/dma-buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1dbc080c9ef6bcfba652ef0d6ae919b8c7c85a1d Author: Arnd Bergmann Date: Wed Sep 20 12:04:04 2017 -0700 Input: adxl34x - do not treat FIFO_MODE() as boolean FIFO_MODE() is a macro expression with a '<<' operator, which gcc points out could be misread as a '<': drivers/input/misc/adxl34x.c: In function 'adxl34x_probe': drivers/input/misc/adxl34x.c:799:36: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context] While utility of this warning is being disputed (Chief Penguin: "This warning is clearly pure garbage.") FIFO_MODE() extracts range of values, with 0 being FIFO_BYPASS, and not something that is logically boolean. This converts the test to an explicit comparison with FIFO_BYPASS, making it clearer to gcc and the reader what is intended. Fixes: e27c729219ad ("Input: add driver for ADXL345/346 Digital Accelerometers") Signed-off-by: Arnd Bergmann Signed-off-by: Dmitry Torokhov drivers/input/misc/adxl34x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4babc5e27cfda59e2e257d28628b8d853aea5206 Author: Colin Ian King Date: Thu Sep 14 17:21:54 2017 +0100 drm/i915: remove redundant variable hw_check hw_check is being assigned and updated but is no longer being read, hence it is redundant and can be removed. Detected by clang scan-build: "warning: Value stored to 'hw_check' during its initialization is never read" Fixes: f6d1973db2d2 ("drm/i915: Move modeset state verifier calls") Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170914162154.11304-1-colin.king@canonical.com drivers/gpu/drm/i915/intel_display.c | 2 -- 1 file changed, 2 deletions(-) commit 1a8ff6076e8f3e197831455e4bba8fa2f5f1d0f1 Author: Ville Syrjälä Date: Wed Sep 20 18:12:51 2017 +0300 drm/i915: Reorganize .disable hooks for pre-DDI DP Most of our DP encoder hooks are split into per-platform variants. .disable() an exception, and thus it's a bit messy. Let's split it up as well. We'll leave the common parts in a helper called by each platform specific hook. Now each platform has mostly its own hooks. Some hooks are still shared between vlv and chv, and between g4x and ilk. None of the remaining shared hooks have any platform checks in them however so duplicating them doesn't seem particularly useful. There is a subtle change on VLV/CHV where we now disable PSR before audio, whereas before we disabled PSR after audio. That should be totally fine, and PSR is disabled by default anyway. Jani also pointed out to me that PSR + audio doesn't seem like a particularly realistic combination. v2: Drop the PSR HAS_DDI check here (Rodrigo) Pimp up the commit message a bit based on a chat with Jani Cc: Jani Nikula Reviewed-by: Rodrigo Vivi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170920151251.5961-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_dp.c | 45 ++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) commit 76a4b41d654c0eaaf3b4ebc65fc0728d205f028a Author: Ville Syrjälä Date: Wed Sep 20 18:12:36 2017 +0300 drm/i915: Drop useless HAS_PSR() check It is safe to call intel_psr_disable() on a platform without PSR. We don't have such a check when calling intel_psr_enable() either. v2: Don't drop the HAS_DDI check quite yet (Rodrigo) Reviewed-by: Rodrigo Vivi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170920151236.5864-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13cc80ce4404e19619c41fc636ebb2dd91a22c23 Author: Meghana Madhyastha Date: Thu Sep 14 13:44:20 2017 +0530 drm/agpsupport: Remove extra blank line Remove extra blank line to adhere to standard coding style. Found by checkpath.pl.. Signed-off-by: Meghana Madhyastha Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/9cfc7e7535908f3fe3b1df706f2999687c90d4e7.1505376068.git.meghana.madhyastha@gmail.com drivers/gpu/drm/drm_agpsupport.c | 1 - 1 file changed, 1 deletion(-) commit 221399c387cd85ea552f7fbc8c219a6927b430ec Author: Meghana Madhyastha Date: Thu Sep 14 13:43:12 2017 +0530 drm/agpsupport: Move EXPORT_SYMBOL so that it immediately follows its function EXPORT_SYMBOL(foo) should immediately follow its function/variable. This coding style is preferred. Found by checkpath.pl. Signed-off-by: Meghana Madhyastha Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/0496f0e821082969ec7950ac35f1e6b6cedb22a6.1505376068.git.meghana.madhyastha@gmail.com drivers/gpu/drm/drm_agpsupport.c | 3 --- 1 file changed, 3 deletions(-) commit 182e61d136bd1f927e33bf4a98d1f7ebedbeba2d Author: Meghana Madhyastha Date: Thu Sep 14 13:40:49 2017 +0530 drm/agpsupport: Remove assignment in if condition Move the assignment so that it happens before the if condition. Merged multiple similar conditionals to a single conditional statement. This results in syntax which is easier to read. Found by checkpath.pl Signed-off-by: Meghana Madhyastha Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/d30cb59d92c8a98d0665ef6ae2a56b364dc61098.1505376068.git.meghana.madhyastha@gmail.com drivers/gpu/drm/drm_agpsupport.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit e3cbeaf8db3dc0b2cfd3c31dfac5bec8846d33f2 Author: Meghana Madhyastha Date: Thu Sep 14 13:39:14 2017 +0530 drm/agpsupport: Replace "foo * bar" with "foo *bar" This replaces all instances of foo * bar with foo *bar in drm_agpsupport.c. This is so that it adheres to standard C syntax for pointers. Signed-off-by: Meghana Madhyastha Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/e092694c26e61fc6147e44851392a43b7a68c4f3.1505376068.git.meghana.madhyastha@gmail.com drivers/gpu/drm/drm_agpsupport.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0340afe74d43e9c82bc0f5904d8f5b99d0fc3ab0 Author: Charles Keepax Date: Mon Sep 4 16:41:54 2017 +0100 ASoC: arizona: Add device tree binding doc for volume limits Signed-off-by: Charles Keepax Acked-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/wlf,arizona.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 85e7dd3f871b988702973c80d9ef128e10dd3dad Author: Charles Keepax Date: Mon Sep 4 16:41:53 2017 +0100 ASoC: arizona: Add support for setting the output volume limits The output volume limits allow signals to be limited to specific levels appropriate for the hardware attached. As this is a property of the hardware itself these will be configured through device tree. Signed-off-by: Charles Keepax Acked-by: Lee Jones Signed-off-by: Mark Brown include/linux/mfd/arizona/pdata.h | 3 +++ sound/soc/codecs/arizona.c | 25 +++++++++++++++++++++++++ sound/soc/codecs/arizona.h | 1 + sound/soc/codecs/cs47l24.c | 3 +++ sound/soc/codecs/wm5102.c | 3 +++ sound/soc/codecs/wm5110.c | 3 +++ sound/soc/codecs/wm8997.c | 3 +++ 7 files changed, 41 insertions(+) commit 601516a6f8cf9118a7c65ec38aa53896efc446bb Author: Charles Keepax Date: Mon Sep 4 16:41:52 2017 +0100 mfd: arizona: Remove audio bindings from MFD binding document Now the audio bindings have their own binding document update the main MFD document to point to that file and remove the audio binding documentation. Signed-off-by: Charles Keepax Acked-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/mfd/arizona.txt | 40 +---------------------- 1 file changed, 1 insertion(+), 39 deletions(-) commit 6000c99ee6e9876cb33275c752937d99f77cdb95 Author: Charles Keepax Date: Mon Sep 4 16:41:51 2017 +0100 mfd: arizona: Remove audio related device tree code This code has now been moved to the audio subsystem so is no longer required in the MFD code. Signed-off-by: Charles Keepax Acked-by: Lee Jones Signed-off-by: Mark Brown drivers/mfd/arizona-core.c | 132 +-------------------------------------------- 1 file changed, 1 insertion(+), 131 deletions(-) commit 7c620ece125cbab7b5dfcb574ee1e64ab8b562cd Author: Kyeongdon Kim Date: Wed Sep 6 18:50:19 2017 +0900 selinux: Use kmem_cache for hashtab_node During random test as own device to check slub account, we found some slack memory from hashtab_node(kmalloc-64). By using kzalloc(), middle of test result like below: allocated size 240768 request size 45144 slack size 195624 allocation count 3762 So, we want to use kmem_cache_zalloc() and that can reduce memory size 52byte(slack size/alloc count) per each struct. Signed-off-by: Kyeongdon Kim Signed-off-by: Paul Moore security/selinux/ss/hashtab.c | 17 +++++++++++++++-- security/selinux/ss/hashtab.h | 4 ++++ security/selinux/ss/services.c | 4 ++++ 3 files changed, 23 insertions(+), 2 deletions(-) commit 6c2eb3e76fb84e2eb46d484f71fab469c0d9532c Author: Andreas Färber Date: Mon Jul 3 19:18:04 2017 +0200 ARM: owl: smp: Drop owl_secondary_boot() Commit 18cfd9429d8a82c49add8f3ca9d366599bfcac45 simplified the S500 SMP code by removing a loop for pen_release in owl_secondary_boot(). Since then it is only calling owl_v7_invalidate_l1() before branching to secondary_startup(). The owl_v7_invalidate_l1() assembler function is superfluous, too. Therefore drop owl_secondary_boot() and use secondary_boot() directly. Fixes: 18cfd9429d8a ("ARM: owl: smp: Drop bogus holding pen") Cc: David Liu Signed-off-by: Andreas Färber arch/arm/mach-actions/Makefile | 4 +--- arch/arm/mach-actions/headsmp.S | 52 ----------------------------------------- arch/arm/mach-actions/platsmp.c | 2 +- 3 files changed, 2 insertions(+), 56 deletions(-) commit bad29933fef76fb6ee577f4a0b6d145c1f52f663 Author: Andreas Färber Date: Sun Jul 9 04:17:46 2017 +0200 ARM: owl: smp: Use __pa_symbol() Replace an occurrence of virt_to_phys() with __pa_symbol() macro. See 64fc2a947a9873700929ec0ef02b4654a04e0476 ("ARM: 8641/1: treewide: Replace uses of virt_to_phys with __pa_symbol"). Fixes: 172067e0bc87 ("ARM: owl: Implement CPU enable-method for S500") Reported-by: Florian Fainelli Signed-off-by: Andreas Färber arch/arm/mach-actions/platsmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cd6bc681582e283661be6c16034b6493b9a8683 Author: Arvind Yadav Date: Wed Aug 30 22:17:51 2017 +0530 ARM: mxs: constify platform_suspend_ops platform_suspend_ops are not supposed to change at runtime. Functions suspend_set_ops working with const platform_suspend_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Shawn Guo arch/arm/mach-mxs/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b07815d4eaf658b683c345d6e643895a20d92f29 Author: Yuan Yao Date: Wed Aug 30 18:12:38 2017 +0800 dt-bindings: mtd: add sst25wf040b and en25s64 to sip-nor list The chip sst25wf040b and en25s64 are compatible with SPI NOR flash. Signed-off-by: Yuan Yao Signed-off-by: Hou Zhiqiang Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt | 2 ++ 1 file changed, 2 insertions(+) commit 8c5b3b328b3c43bc2453c5ffa9cfdaba68c0feba Author: Yuan Yao Date: Wed Aug 30 18:12:37 2017 +0800 dt-bindings: spi: Add fsl,ls1012a-dspi compatible string new compatible string: "fsl,ls1012a-dspi". Signed-off-by: Yuan Yao Signed-off-by: Hou Zhiqiang Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt | 1 + 1 file changed, 1 insertion(+) commit 519de51cd5a81a220d7059d1dde184b93a9e591c Author: Yuan Yao Date: Wed Aug 30 18:12:36 2017 +0800 arm64: dts: ls1012a: add the DTS node for DSPI support Signed-off-by: Yuan Yao Signed-off-by: Hou Zhiqiang Signed-off-by: Shawn Guo arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts | 33 +++++++++++++++++++++++ arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 13 +++++++++ 2 files changed, 46 insertions(+) commit 3a42d36c6a2be960d9c7fe1ec7676aa04db572d4 Author: Javier Martinez Canillas Date: Thu Jun 15 20:54:12 2017 +0200 ARM: dts: zynq: 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: Michal Simek arch/arm/boot/dts/zynq-zc702.dts | 2 +- arch/arm/boot/dts/zynq-zc706.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5c003458db40cf3c89aeddd22c6e934c28b5a565 Author: Hans de Goede Date: Sat Sep 2 18:20:40 2017 +0200 platform/x86: intel_cht_int33fe: Work around BIOS bug on some devices At least one BIOS enumerates the max17047 both through the INT33FE ACPI device (it is right there in the resources table) as well as through a separate MAX17047 device. This commit checks for the max17047 already being enumerated through a separate MAX17047 ACPI device and if so it uses the i2c-client instantiated for this and attaches the device-props for the max17047 to that i2c-client. Signed-off-by: Hans de Goede Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko drivers/platform/x86/intel_cht_int33fe.c | 70 ++++++++++++++++++++++++++++---- 1 file changed, 61 insertions(+), 9 deletions(-) commit ce6a90027c10f970f872de5db0294f9e3e969f1c Author: Mario Limonciello Date: Fri Sep 8 10:23:11 2017 -0500 platform/x86: Add driver to force WMI Thunderbolt controller power status Current implementations of Intel Thunderbolt controllers will go into a low power mode when not in use. Many machines containing these controllers also have a GPIO wired up that can force the controller awake. This is offered via a ACPI-WMI interface intended to be manipulated by a userspace utility. This mechanism is provided by Intel to OEMs to include in BIOS. It uses an industry wide GUID that is populated in a separate _WDG entry with no binary MOF. This interface allows software such as fwupd to wake up thunderbolt controllers to query the firmware version or flash new firmware. Signed-off-by: Mario Limonciello Reviewed-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Signed-off-by: Darren Hart (VMware) [andy fixed merge conflicts and bump kernel version for ABI] Signed-off-by: Andy Shevchenko .../testing/sysfs-platform-intel-wmi-thunderbolt | 11 +++ Documentation/admin-guide/thunderbolt.rst | 15 +++ MAINTAINERS | 5 + drivers/platform/x86/Kconfig | 13 +++ drivers/platform/x86/Makefile | 1 + drivers/platform/x86/intel-wmi-thunderbolt.c | 101 +++++++++++++++++++++ 6 files changed, 146 insertions(+) commit e9a3846afaa4d2d44f33a6aa2dd919e481be599e Author: Ganapathi Bhat Date: Mon Sep 18 13:12:17 2017 +0530 mwifiex: use get_random_mask_addr() helper Avoid calculating random MAC address in driver. Instead make use of 'get_random_mask_addr()' function. Signed-off-by: Ganapathi Bhat Reviewed-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit e2a39b18877874600f0a025de493775d43d745e2 Author: Antoine Tenart Date: Mon Sep 18 15:33:49 2017 +0200 arm64: dts: marvell: 37xx: remove empty line Cosmetic patch removing an empty line at the end of the NB pinctrl node. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 1 - 1 file changed, 1 deletion(-) commit e251a882c0bae39d3d31efe993e977104605a9b3 Author: Ganapathi Bhat Date: Mon Sep 18 12:25:02 2017 +0530 mwifiex: avoid storing random_mac in private Application will keep track of whether MAC address randomization is enabled or not during scan. But at present driver is storing 'random_mac' in mwifiex_private which implies even after scan is done driver has some reference to the earlier 'scan request'. To avoid this, make use of 'mac_addr' variable in 'scan_request' to store 'random_mac'. This structure will be freed by cfg80211 once scan is done. Signed-off-by: Ganapathi Bhat Reviewed-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 11 ++++------- drivers/net/wireless/marvell/mwifiex/main.h | 1 - drivers/net/wireless/marvell/mwifiex/scan.c | 3 ++- 3 files changed, 6 insertions(+), 9 deletions(-) commit d638bb42961336d4c6b54f0a67ee2a24a235f290 Author: Antoine Tenart Date: Mon Sep 18 09:58:12 2017 +0200 arm64: dts: marvell: cp110: add PPv2 port interrupts Ports interrupts are used by the PPv2 driver when no PHY is connected to a port. This patch adds a description of these interrupts. Signed-off-by: Antoine Tenart Tested-by: Marcin Wojtas Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 15 +++++++++------ arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) commit d157bcfaf8542612fd9ffc0cbbc1e52b85157640 Author: Colin Ian King Date: Sat Sep 16 16:34:24 2017 +0100 mwifiex: make const arrays static to shink object code size Don't populate const arrays on the stack, instead make them static Makes the object code smaller by nearly 300 bytes: Before: text data bss dec hex filename 69260 16149 576 85985 14fe1 cfg80211.o After: text data bss dec hex filename 68385 16725 576 85686 14eb6 cfg80211.o Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 85dafc12919659ec744e111b1714792cd3d0a9ca Author: Himanshu Jha Date: Mon Sep 11 18:16:04 2017 +0530 mwifiex: remove unnecessary call to memset call to memset to assign 0 value immediately after allocating memory with kzalloc is unnecesaary as kzalloc allocates the memory filled with 0 value. Semantic patch used to resolve this issue: @@ expression e,e2; constant c; statement S; @@ e = kzalloc(e2, c); if(e == NULL) S - memset(e, 0, e2); Signed-off-by: Himanshu Jha Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/scan.c | 2 -- 1 file changed, 2 deletions(-) commit 910d1bf2c68fa1d7dcde0316cb91f62758407e8d Author: Antoine Tenart Date: Mon Sep 18 09:58:09 2017 +0200 arm64: dts: marvell: add comphy nodes on cp110 master and slave This patch describes the comphy available in the cp110 master and slave. This comphy provides serdes lanes used by various controllers such as the network one. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT .../boot/dts/marvell/armada-cp110-master.dtsi | 38 ++++++++++++++++++++++ .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 38 ++++++++++++++++++++++ 2 files changed, 76 insertions(+) commit 26177d7f3969da1827bc2b5923edcfc2ff4c3a61 Author: Ganapathi Bhat Date: Fri Sep 8 02:02:43 2017 +0530 mwifiex: check for mfg_mode in add_virtual_intf If driver is loaded with 'mfg_mode' enabled, then the sending commands are not allowed. So, skip sending commands, to firmware in mwifiex_add_virtual_intf if 'mfg_mode' is enabled. Fixes: 7311ea850079 ("mwifiex: fix AP start problem for newly added interface") Signed-off-by: Ganapathi Bhat Reviewed-by: Brian Norris Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/cfg80211.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 508d6b46ff082edb888a6f717c2f0978d66c1096 Author: Antoine Tenart Date: Mon Sep 18 09:58:08 2017 +0200 arm64: dts: marvell: extend the cp110 syscon register area length This patch extends on both cp110 the system register area length to include some of the comphy registers as well. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 2 +- arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 31726ff20190bafcf41d5eb5a7615f052f15bdd3 Author: Ganapathi Bhat Date: Thu Aug 31 01:08:35 2017 +0530 mwifiex: notify cfg80211 about scan abort Driver sends a series of scan commands to firmware to serve a user scan request. If an intermediate scan command fails, driver aborts the scan but it is not being informed to cfg80211. This will cause issues in applications performing periodic scans. Fix this by informing scan abort. Signed-off-by: Cathy Luo Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 519ce2f933fa14acf69d5c8cabcc18711943d629 Author: Larry Finger Date: Thu Sep 14 13:17:44 2017 -0500 rtlwifi: rtl8192ee: Fix memory leak when loading firmware In routine rtl92ee_set_fw_rsvdpagepkt(), the driver allocates an skb, but never calls rtl_cmd_send_packet(), which will free the buffer. All other rtlwifi drivers perform this operation correctly. This problem has been in the driver since it was included in the kernel. Fortunately, each firmware load only leaks 4 buffers, which likely explains why it has not previously been detected. Cc: Stable # 3.18+ Signed-off-by: Larry Finger Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0f61953dd0f5fbed6ac833f58dc590293b7569b0 Author: Larry Finger Date: Thu Aug 31 09:48:59 2017 -0500 rtlwifi: btcoexist: 23b 1ant: fix duplicated code for different branches A typo led to this issue, which was detected with the help of Coccinelle. In addition to fixing the error, the code is refactored to eliminate an if statement. Addresses-Coverity-ID: 1226788 Reported-by: Gustavo A. R. Silva 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 .../wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit e3ae1c7720462136aaa1119c656704bd96952f4d Author: Colin Ian King Date: Tue Sep 5 19:16:58 2017 +0100 b43legacy: fix unitialized reads of ret by initializing the array to zero The u8 char array ret is not being initialized and elements outside the range start to end contain just garbage values from the stack. This results in a later scan of the array to read potentially uninitialized values. Fix this by initializing the array to zero. This seems to have been an issue since the very first commit. Detected by CoverityScan CID#139653 ("Uninitialized scalar variable") Signed-off-by: Colin Ian King Reviewed-by: Michael Buesch Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/b43legacy/radio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e31fbe1034d9066cfff0d0a4f7ce440ddf75643f Author: Colin Ian King Date: Tue Sep 5 19:15:50 2017 +0100 b43: fix unitialized reads of ret by initializing the array to zero The u8 char array ret is not being initialized and elements outside the range start to end contain just garbage values from the stack. This results in a later scan of the array to read potentially uninitialized values. Fix this by initializing the array to zero. This seems to have been an issue since the very first commit. Detected by CoverityScan CID#139652 ("Uninitialized scalar variable") Signed-off-by: Colin Ian King Reviewed-by: Michael Buesch Signed-off-by: Kalle Valo drivers/net/wireless/broadcom/b43/phy_g.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6508497cbdc70b92130fbca57402af6a94e05d20 Author: Colin Ian King Date: Fri Sep 8 16:24:52 2017 +0100 rsi: fix a dereference on adapter before it has been null checked The assignment of dev is dereferencing adapter before adapter has been null checked, potentially leading to a null pointer dereference. Fix this by simply moving the assignment of dev to a later point after the sanity null check of adapter. Detected by CoverityScan CID#1398383 ("Dereference before null check") Fixes: dad0d04fa7ba ("rsi: Add RS9113 wireless driver") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit af75687286bfea63c428591f08e9df6a7e7a9ff2 Author: Prameela Rani Garnepudi Date: Wed Aug 30 15:08:28 2017 +0530 rsi: miscellaneous changes for p2p mode Add P2P_GO condition as well when handling BEACON_ENABLE from mac80211. Also passing 'vif' for auto rate request. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_mac80211.c | 15 +++++++++------ drivers/net/wireless/rsi/rsi_91x_mgmt.c | 6 +++--- 2 files changed, 12 insertions(+), 9 deletions(-) commit c7245c0975f134cb10f113b0626ebd11799c8931 Author: Prameela Rani Garnepudi Date: Wed Aug 30 15:08:27 2017 +0530 rsi: aggregation changes for p2p mode P2P Go condition is added wherever AP mode is there in aggregation path. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_mac80211.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit efe877aa0f40dc1f2be450aba5baf8d90e7d9707 Author: Prameela Rani Garnepudi Date: Wed Aug 30 15:08:26 2017 +0530 rsi: disallow power save config when AP vap running When AP or P2P GO VAP is running, power save configuration should be disallowed. To check interface type in power save configuration 'vif' parameters is passed. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_mac80211.c | 33 ++++++++++++++++++++--------- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 5 +++-- drivers/net/wireless/rsi/rsi_91x_ps.c | 15 +++++++------ drivers/net/wireless/rsi/rsi_mgmt.h | 2 ++ drivers/net/wireless/rsi/rsi_ps.h | 7 +++--- 5 files changed, 39 insertions(+), 23 deletions(-) commit eac4eed3224b1bc769489ae2e146105cbba3a8ad Author: Prameela Rani Garnepudi Date: Wed Aug 30 15:08:25 2017 +0530 rsi: tx and rx path enhancements for p2p mode Data descriptor is updated to include vap_id. TX command frame key config also updated to include vap_id. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_core.c | 9 +++++++-- drivers/net/wireless/rsi/rsi_91x_hal.c | 26 ++++++++++++++++++-------- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 23 +++++++++++++++++++---- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 4 ++-- drivers/net/wireless/rsi/rsi_mgmt.h | 3 ++- 5 files changed, 48 insertions(+), 17 deletions(-) commit 4671c209ac461c8826c1241ba423e75f84ae486b Author: Prameela Rani Garnepudi Date: Wed Aug 30 15:08:24 2017 +0530 rsi: handle peer connection and disconnection in p2p mode Parameter 'vif' is passed to inform_bss_status function to check the type of vif and to get vap_id. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_core.c | 9 ++++-- drivers/net/wireless/rsi/rsi_91x_hal.c | 47 +++++++++++++++++------------ drivers/net/wireless/rsi/rsi_91x_mac80211.c | 22 +++++++++----- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 15 +++++---- drivers/net/wireless/rsi/rsi_hal.h | 3 +- drivers/net/wireless/rsi/rsi_main.h | 2 ++ drivers/net/wireless/rsi/rsi_mgmt.h | 5 ++- 7 files changed, 64 insertions(+), 39 deletions(-) commit df771911914ab9f80dd38a2710e50c5a418200ba Author: Prameela Rani Garnepudi Date: Wed Aug 30 15:08:23 2017 +0530 rsi: add support for p2p listen Remain-on-channel and cancel-remain-on-channel are implemented to support p2p listen phase. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_core.c | 15 +++ drivers/net/wireless/rsi/rsi_91x_mac80211.c | 188 +++++++++++++++++++++++++--- drivers/net/wireless/rsi/rsi_91x_main.c | 9 +- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 4 +- drivers/net/wireless/rsi/rsi_common.h | 4 +- drivers/net/wireless/rsi/rsi_main.h | 2 + drivers/net/wireless/rsi/rsi_mgmt.h | 2 +- 7 files changed, 199 insertions(+), 25 deletions(-) commit b8bd3a439f3593a5d40e45ce14a17a086a0f6fe2 Author: Prameela Rani Garnepudi Date: Wed Aug 30 15:08:22 2017 +0530 rsi: add/remove interface enhancements for p2p STA_OPMODE and AP_OPMODE macros are renamed to RSI_OPMODE_STA and RSI_OPMODE_AP. New opmodes are added to this list for P2P support. Mapping of mac80211 interface types to rsi interface types are added. Add and remove interface callbacks are handled for P2P mode. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_mac80211.c | 117 +++++++++++++++++----------- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 12 +-- drivers/net/wireless/rsi/rsi_main.h | 6 +- drivers/net/wireless/rsi/rsi_mgmt.h | 9 ++- 4 files changed, 89 insertions(+), 55 deletions(-) commit 421eedff1180ffa8f1780932d0f2561d67a6b44f Author: Prameela Rani Garnepudi Date: Wed Aug 30 15:08:21 2017 +0530 rsi: add p2p support parameters to mac80211 This patch adds p2p supported parameters to mac80211 hw and wiphy structures during mac80211 registration. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar Signed-off-by: Kalle Valo drivers/net/wireless/rsi/rsi_91x_mac80211.c | 37 ++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) commit a18615b7ef8d35c799a055013b9af1ec69cf244d Author: Miquel Raynal Date: Mon Sep 18 09:58:07 2017 +0200 arm64: defconfig: enable Marvell CP110 comphy The comphy is an hardware block giving access to common PHYs that can be used by various other engines (Network, SATA, ...). This is used on Marvell 7k/8k platforms for now. Enable the corresponding driver. Signed-off-by: Miquel Raynal Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 6dee349e8c618a0dbb7e7dd0cf31da1a3eadd31a Author: Antoine Tenart Date: Mon Sep 18 09:58:06 2017 +0200 arm64: defconfig: enable the Marvell 10G PHY as a module The Marvell 10G PHY is present on mvebu platforms. Enable it as a module so that the network works on these platforms. Signed-off-by: Antoine Tenart Signed-off-by: Gregory CLEMENT arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit 2952d67637716a51188d63a342cb8f8fa45fa7a2 Author: Fabien Lahoudere Date: Fri Aug 18 16:53:48 2017 +0100 ARM: dts: imx53: Add GE Healthcare PPD PPD is a product from GE Healthcare to monitor vital biometric signals. Signed-off-by: Fabien Lahoudere Signed-off-by: Sebastian Reichel Signed-off-by: Martyn Welch Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx53-ppd.dts | 1042 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 1043 insertions(+) commit f9705438b0f7da5dd04e270a95536b36b3dca54a Author: Martyn Welch Date: Fri Aug 18 16:53:47 2017 +0100 dt-bindings: misc: achc: Add device tree binding for GE ACHC Add Device Tree binding document for GE Healthcare USB Management Controller (ACHC). Signed-off-by: Martyn Welch Acked-by: Rob Herring Signed-off-by: Shawn Guo Documentation/devicetree/bindings/misc/ge-achc.txt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 99a52450c7072a5ee9f30a180790be6fd267452d Author: Vanessa Maegima Date: Fri Aug 18 09:43:38 2017 -0300 ARM: dts: imx7d-pico: Add Wifi support imx7d-pico has an ap6212 wifi chip connected to usdhc2 port. Add support for the usdhc2 port and to the WL_REG_ON regulator so Wifi can be functional on this board. Signed-off-by: Vanessa Maegima Signed-off-by: Shawn Guo arch/arm/boot/dts/imx7d-pico.dts | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 89db6f9632e38b6b5cc7f23f4b67f74470319978 Author: Takashi Iwai Date: Thu Sep 7 10:59:18 2017 +0200 ASoC: intel: Kill BUG_ON() usage Don't use BUG_ON() for a non-critical sanity check on production systems. This patch either removes useless BUG_ON() calls. Signed-off-by: Takashi Iwai Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_loader.c | 1 - sound/soc/intel/atom/sst/sst_stream.c | 1 - 2 files changed, 2 deletions(-) commit befff4fbc27e19b14b343eb4a65d8f75d38b6230 Author: Takashi Iwai Date: Thu Sep 7 10:59:17 2017 +0200 ASoC: davinci: Kill BUG_ON() usage Don't use BUG_ON() for a non-critical sanity check on production systems. This patch replaces with a softer WARN_ON() and an error path. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/davinci/davinci-mcasp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a029ef45179d72945c7ae0a11f97e8012a5574ac Author: Takashi Iwai Date: Thu Sep 7 10:59:16 2017 +0200 ASoC: tas571x: Kill BUG_ON() usage Don't use BUG_ON() for a non-critical sanity check on production systems. This patch replaces with a softer WARN_ON() and an error path. Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown sound/soc/codecs/tas571x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 957ce0c6b8a1f26559864507ae0bfcba29d924ad Author: jiada wang Date: Wed Sep 20 15:25:30 2017 +0900 ASoC: soc-pcm: check symmetry after hw_params hw_params may be fixup by be_hw_params_fixup, calling soc_pcm_params_symmetry() before hw_params will have issue if there is hw_params changes in be_hw_params_fixup. For example, with following use case 1. a dai-link which is able to convert sample rate on BE side 2. set BE playback and capture sample rate to 44100Hz 3. play a 48000Hz audio stream with this dai-link 4. record from this dai-link with 44100Hz sample rate Got following error message when record starts [ 495.013527] be_link_ak4613: ASoC: unmatched rate symmetry: 48000 - 44100 [ 495.021729] be_link_ak4613: ASoC: hw_params BE failed -22 [ 495.028589] rsnd_link0: ASoC: hw_params BE failed -22 Because in soc_pcm_hw_params(), FE rate is still having value before it is fixup by be_hw_params_fixup(), when soc_pcm_params_symmetry() checks symmetry, thus soc_pcm_params_symmetry() complains about the unmatched rate between the active stream and the new stream tries to start. This patch moves soc_pcm_params_symmetry() after hw_params to resolve the above issue. Signed-off-by: Jiada Wang Signed-off-by: Mark Brown sound/soc/soc-pcm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 840bc44849b9d7f8eaae34ac7b434e17c4cf7368 Author: Kuninori Morimoto Date: Wed Sep 20 06:08:42 2017 +0000 ASoC: add missing snd_soc_component_set_jack commit 44c07365e9e2 ("ASoC: add Component level set_jack") added new snd_soc_component_set_jack(), but it didn't add definition on soc.h. This patch adds it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown include/sound/soc.h | 2 ++ 1 file changed, 2 insertions(+) commit 3d345b5f7b2f613b6965fc3fc68de9f439752ffe Author: Fabio Estevam Date: Tue Sep 19 19:59:04 2017 -0300 ASoC: tfa9879: Add device tree bindings Even though the tfa9879 driver can probe via device tree trough the I2C core code, it is preferable to have explicit device tree bindings instead [1], so add this support. [1] https://www.spinics.net/lists/devicetree/msg195176.html Signed-off-by: Fabio Estevam Reviewed-by: Łukasz Majewski Signed-off-by: Mark Brown .../devicetree/bindings/sound/tfa9879.txt | 23 ++++++++++++++++++++++ sound/soc/codecs/tfa9879.c | 6 ++++++ 2 files changed, 29 insertions(+) commit 38b8e6f092fd71eee56a064487be335226b0a54d Author: anish kumar Date: Wed Sep 20 01:28:34 2017 -0700 ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm refactor snd_soc_dapm_new_pcm to reduce the size of this function to facilitate further refactoring. Signed-off-by: anish kumar Reviewed-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit e5af4f9fb3d405e6145f0d019ce11a97a8930915 Author: anish kumar Date: Wed Sep 20 01:28:33 2017 -0700 ASoC: dapm: fix error path in snd_soc_dapm_new_pcm w_param_text[count] is freed in the wrong error path. Fix it by shifting the outfree_w_param label. Signed-off-by: anish kumar Reviewed-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/soc-dapm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5dd29e4dafef4baad7bf529ad73cafeb13e1aa8 Author: Josef Filzmaier Date: Thu Sep 14 14:32:10 2017 +0200 ieee802154: atusb: Driver for Busware HUL dongle Busware manufactured an USB dongle that is quite similar to the atben and rzusb USB dongles. that are already supported. This patch aims to support the Busware HUL dongle (called hulusb) alongside atusb and rzusb. hulusb is using the at86rf212 transceiver which is specifically designed to support the 700/800/900 MHz wave band. The source code is heavily inspired by the existing atusb and at86rf2xx drivers. Signed-off-by: Josef Filzmaier Signed-off-by: Stefan Schmidt drivers/net/ieee802154/atusb.c | 317 +++++++++++++++++++++++++++++++++++------ drivers/net/ieee802154/atusb.h | 8 ++ 2 files changed, 285 insertions(+), 40 deletions(-) commit 3e4962667efb0f6c09fa3111e6ee53838118b227 Author: Diogenes Pereira Date: Tue Sep 5 09:18:04 2017 -0300 mac802154: Fix MAC header and payload encrypted According to 802.15.4-2003/2006/2015 specifications the MAC frame is composed of MHR, MAC payload and MFR and just the outgoing MAC payload must be encrypted. If communication is secure,sender build Auxiliary Security Header(ASH), insert it next to the standard MHR header with security enabled bit ON, and secure frames before transmitting them. According to the information carried within the ASH, recipient retrieves the right cryptographic key and correctly un-secure MAC frames. The error scenario occurs on Linux using IEEE802154_SCF_SECLEVEL_ENC(4) security level when llsec_do_encrypt_unauth() function builds theses MAC frames incorrectly. On recipients these MAC frames are discarded,logging "got invalid frame" messages. Signed-off-by: Diogenes Pereira Signed-off-by: Stefan Schmidt net/mac802154/llsec.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 91f4aa977947f046dc144fa9e3b06f0ffb53be79 Author: Diogenes Pereira Date: Wed Aug 9 13:19:24 2017 -0300 mac802154: replace hardcoded value with macro Use IEEE802154_SCF_SECLEVEL_NONE macro defined at ieee802154.h file. Signed-off-by: Diogenes Pereira Signed-off-by: Stefan Schmidt net/mac802154/llsec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5aa3b03ad0712e3964a0ae2788f61f08da814bfe Author: Mark Brown Date: Wed Sep 20 12:35:37 2017 +0100 ASoC: wm9712: Add missing brace Signed-off-by: Mark Brown sound/soc/codecs/wm9712.c | 1 + 1 file changed, 1 insertion(+) commit 87de8d5613a7221abcce0b680b0da3c98b0871c8 Author: Mika Kuoppala Date: Tue Sep 19 17:41:28 2017 +0300 drm/i915: Stop engines before reset On kbl evidence indicates that even if the hardware happily tells us to proceed with reset, it really isn't ready. Resetting a freely running batchbuffer after we have ack for readiness, still can cause a system hang. We also have similar experiences on older gens. So now attempt to stop engines before proceeding for reset, on all gens where we have a gpu reset. This has shown to improve reset reliability and reduce the risk of losing the machine. v2: Add fixme for wa (Joonas) Testcase: igt/prime_busy/hang-* # kbl Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Ville Syrjälä Signed-off-by: Mika Kuoppala Acked-by: Chris Wilson Acked-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170919144128.25506-1-mika.kuoppala@intel.com drivers/gpu/drm/i915/intel_uncore.c | 75 +++++++++++++++++++++---------------- 1 file changed, 43 insertions(+), 32 deletions(-) commit da394712324e9a0c91ae05cc24396af6d99f3ad6 Author: Fabio Estevam Date: Wed Sep 20 01:17:17 2017 -0300 spi: Kconfig: Remove old comments now that SPI slave is supported Since commit 6c364062bfed ("spi: core: Add support for registering SPI slave controllers") SPI slave is also supported, so remove the old comments that say SPI slave is unsupported. Signed-off-by: Fabio Estevam Acked-by: Geert Uytterhoeven Signed-off-by: Mark Brown drivers/spi/Kconfig | 4 ---- 1 file changed, 4 deletions(-) commit 933311fdfa5f94aeab95d713500fd680523a884a Author: Suman Anna Date: Mon Sep 18 19:28:33 2017 -0500 ARM: davinci: da8xx-dt: Add OF_DEV_AUXDATA entry for DSP clock matching Add the OF_DEV_AUXDATA entry needed to match the device-tree DSP node to its non-device-tree clock, so that the da8xx-remoteproc driver can properly enable the clocks. The device name has also been assigned "davinci-rproc.0" to match the device id used in the da850_clks clk_lookup array. Signed-off-by: Suman Anna Signed-off-by: Sekhar Nori arch/arm/mach-davinci/da8xx-dt.c | 1 + 1 file changed, 1 insertion(+) commit d9fe22b8fbf5d85febc4e3794ba4757158284642 Author: Suman Anna Date: Mon Sep 18 19:28:32 2017 -0500 ARM: dts: da850-lcdk: Add and enable CMA reserved pool for DSP A CMA reserved memory node of 16 MB has been added and assigned to the DSP remoteproc device on the OMAP-L138 LCDK board. The CMA starting address matches the values used within the TI IPC 3.x software. Both the CMA node and the corresponding rproc node are also marked okay to enable the DSP on the OMAP-L138 LCDK board. Signed-off-by: Suman Anna Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850-lcdk.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 21e7daef7e5e6fc79e8d7d84651ccc9a07b22042 Author: Suman Anna Date: Mon Sep 18 19:28:31 2017 -0500 ARM: dts: da850: Add DSP node The TI Davinci DA8xx family of SoCs have a single DSP subsystem that is comprised of TI's standard TMS320C674x megamodule and several blocks of internal memory (L1P, L1D and L2 RAMs). Add the DT node for this DSP processor sub-system. The processor does not have an MMU, and uses a chip-level signalling register and shared memory for inter-processor communication with the ARM core. The node has been added in disabled state, and can be enabled in the respective board dts file with an associated reserved memory block. Signed-off-by: Suman Anna Signed-off-by: Sekhar Nori arch/arm/boot/dts/da850.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit cb5f1b9d22bfc7802b3eccb2c650ccf2bd8b358e Author: Adam Ford Date: Fri Sep 1 09:53:19 2017 -0500 ARM: davinci_all_defconfig: enable MTD_CMDLINE_PARTS There is some disagreement between the partition table map in Linux for the DA850-EVM and the corresponding partition map in U-Boot. To prevent breaking the Kernel, this patch enables MTD_CMDLINE_PARTS which will allow the U-Boot to pass the partition map so future partitions match without breaking backwards compatibility. While at it, also sync to savedefconfig which leads to removal of CONFIG_MMC_BLOCK_BOUNCE. Signed-off-by: Adam Ford Signed-off-by: Sekhar Nori arch/arm/configs/davinci_all_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d81fb7fd9436e81fda67e5bc8ed0713aa28d3db2 Author: Jani Nikula Date: Tue Sep 19 18:38:13 2017 +0300 drm/i915: always update ELD connector type after get modes drm_edid_to_eld() initializes the connector ELD to zero, overwriting the ELD connector type initialized in intel_audio_codec_enable(). If userspace does getconnector and thus get_modes after modeset, a subsequent audio component i915_audio_component_get_eld() call will receive an ELD without the connector type properly set. It's fine for HDMI, but screws up audio for DP. Always set the ELD connector type at intel_connector_update_modes() based on the connector type. We can drop the connector type update from intel_audio_codec_enable(). Credits to Joseph Nuzman for figuring this out. Cc: Ville Syrjälä Cc: Joseph Nuzman Reported-by: Joseph Nuzman Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101583 Reviewed-by: Ville Syrjälä Tested-by: Joseph Nuzman Cc: stable@vger.kernel.org # v4.10+, maybe earlier Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170919153813.29808-1-jani.nikula@intel.com drivers/gpu/drm/i915/intel_audio.c | 5 ----- drivers/gpu/drm/i915/intel_modes.c | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) commit 7d5cb45655f2e9e37ef75d18f50c0072ef14a38b Author: Al Viro Date: Wed Sep 20 01:02:27 2017 -0400 i2c compat ioctls: move to ->compat_ioctl() Signed-off-by: Al Viro drivers/i2c/i2c-dev.c | 268 +++++++++++++++++++++++++++++++++----------------- fs/compat_ioctl.c | 122 ----------------------- 2 files changed, 180 insertions(+), 210 deletions(-) commit abca5fc535a3ee0f36fb6d4468a453eaae769921 Author: Al Viro Date: Tue Sep 19 18:17:46 2017 -0400 sched_rr_get_interval(): move compat to native, get rid of set_fs() switch to using timespec64 internally, while we are at it Signed-off-by: Al Viro kernel/compat.c | 16 ---------------- kernel/sched/core.c | 36 ++++++++++++++++++++++++++++++------ 2 files changed, 30 insertions(+), 22 deletions(-) commit ae6215576d6b2251ab8c6bbeaf1c4cea99f0481b Author: Leonard Crestez Date: Fri Jul 14 17:11:08 2017 +0300 thermal: imx: Add support for reading OCOTP through nvmem On newer imx SOCs accessing OCOTP directly is wrong because the ocotp clock needs to be enabled first. Add support for reading those same values through the nvmem API instead. The older path is preserved for compatibility with older dts and because it works correctly on imx6qdl chips. Signed-off-by: Leonard Crestez Acked-by: Shawn Guo Signed-off-by: Zhang Rui drivers/thermal/imx_thermal.c | 104 ++++++++++++++++++++++++++++++------------ 1 file changed, 74 insertions(+), 30 deletions(-) commit 4633f7a156bf41003b1527f88ddf843ce0bb7d68 Author: Leonard Crestez Date: Fri Jul 14 17:11:06 2017 +0300 thermal: imx: Add nvmem-cells alternate binding for OCOTP access On newer imx SOCs accessing OCOTP directly is wrong because the ocotp clock needs to be enabled first. Add a binding for accessing the same values through the imx-ocotp nvmem driver using nvmem-cells. This is similar to other thermal drivers. The old binding is preserved for compatibility and because it still works fine on imx6qdl series chips. In theory this problem could be solved by adding a reference to the OCOTP clock instead but it is better to hide such details in a specific nvmem driver. Signed-off-by: Leonard Crestez Acked-by: Rob Herring Signed-off-by: Zhang Rui Documentation/devicetree/bindings/thermal/imx-thermal.txt | 7 +++++++ 1 file changed, 7 insertions(+) commit 8ca712c373a462cfa1b62272870b6c2c74aa83f9 Merge: 752fbcc 64bc178 Author: David S. Miller Date: Tue Sep 19 16:32:24 2017 -0700 Merge branch 'net-speedup-netns-create-delete-time' Eric Dumazet says: ==================== net: speedup netns create/delete time When rate of netns creation/deletion is high enough, we observe softlockups in cleanup_net() caused by huge list of netns and way too many rcu_barrier() calls. This patch series does some optimizations in kobject, and add batching to tunnels so that netns dismantles are less costly. IPv6 addrlabels also get a per netns list, and tcp_metrics also benefit from batch flushing. This gives me one order of magnitude gain. (~50 ms -> ~5 ms for one netns create/delete pair) Tested: for i in `seq 1 40` do (for j in `seq 1 100` ; do unshare -n /bin/true >/dev/null ; done) & done wait ; grep net_namespace /proc/slabinfo Before patch series : $ time ./add_del_unshare.sh net_namespace 116 258 5504 1 2 : tunables 8 4 0 : slabdata 116 258 0 real 3m24.910s user 0m0.747s sys 0m43.162s After : $ time ./add_del_unshare.sh net_namespace 135 291 5504 1 2 : tunables 8 4 0 : slabdata 135 291 0 real 0m22.117s user 0m0.728s sys 0m35.328s ==================== Signed-off-by: David S. Miller commit 64bc17811b72758753e2b64cd8f2a63812c61fe1 Author: Eric Dumazet Date: Tue Sep 19 16:27:09 2017 -0700 ipv4: speedup ipv6 tunnels dismantle Implement exit_batch() method to dismantle more devices per round. (rtnl_lock() ... unregister_netdevice_many() ... rtnl_unlock()) Tested: $ cat add_del_unshare.sh for i in `seq 1 40` do (for j in `seq 1 100` ; do unshare -n /bin/true >/dev/null ; done) & done wait ; grep net_namespace /proc/slabinfo Before patch : $ time ./add_del_unshare.sh net_namespace 126 282 5504 1 2 : tunables 8 4 0 : slabdata 126 282 0 real 1m38.965s user 0m0.688s sys 0m37.017s After patch: $ time ./add_del_unshare.sh net_namespace 135 291 5504 1 2 : tunables 8 4 0 : slabdata 135 291 0 real 0m22.117s user 0m0.728s sys 0m35.328s Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/ip_tunnels.h | 3 ++- net/ipv4/ip_gre.c | 22 +++++++++------------- net/ipv4/ip_tunnel.c | 12 +++++++++--- net/ipv4/ip_vti.c | 7 +++---- net/ipv4/ipip.c | 7 +++---- 5 files changed, 26 insertions(+), 25 deletions(-) commit bb401caefe9d2c65e0c0fa23b21deecfbfa473fe Author: Eric Dumazet Date: Tue Sep 19 16:27:08 2017 -0700 ipv6: speedup ipv6 tunnels dismantle Implement exit_batch() method to dismantle more devices per round. (rtnl_lock() ... unregister_netdevice_many() ... rtnl_unlock()) Tested: $ cat add_del_unshare.sh for i in `seq 1 40` do (for j in `seq 1 100` ; do unshare -n /bin/true >/dev/null ; done) & done wait ; grep net_namespace /proc/slabinfo Before patch : $ time ./add_del_unshare.sh net_namespace 110 267 5504 1 2 : tunables 8 4 0 : slabdata 110 267 0 real 3m25.292s user 0m0.644s sys 0m40.153s After patch: $ time ./add_del_unshare.sh net_namespace 126 282 5504 1 2 : tunables 8 4 0 : slabdata 126 282 0 real 1m38.965s user 0m0.688s sys 0m37.017s Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 8 +++++--- net/ipv6/ip6_tunnel.c | 20 +++++++++++--------- net/ipv6/ip6_vti.c | 23 ++++++++++++++--------- net/ipv6/sit.c | 9 ++++++--- 4 files changed, 36 insertions(+), 24 deletions(-) commit 789e6ddb0b2fb5d5024b760b178a47876e4de7a6 Author: Eric Dumazet Date: Tue Sep 19 16:27:07 2017 -0700 tcp: batch tcp_net_metrics_exit When dealing with a list of dismantling netns, we can scan tcp_metrics once, saving cpu cycles. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/tcp_metrics.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit a90c9347e90ed1e9323d71402ed18023bc910cd8 Author: Eric Dumazet Date: Tue Sep 19 16:27:06 2017 -0700 ipv6: addrlabel: per netns list Having a global list of labels do not scale to thousands of netns in the cloud era. This causes quadratic behavior on netns creation and deletion. This is time having a per netns list of ~10 labels. Tested: $ time perf record (for f in `seq 1 3000` ; do ip netns add tast$f; done) [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 3.637 MB perf.data (~158898 samples) ] real 0m20.837s # instead of 0m24.227s user 0m0.328s sys 0m20.338s # instead of 0m23.753s 16.17% ip [kernel.kallsyms] [k] netlink_broadcast_filtered 12.30% ip [kernel.kallsyms] [k] netlink_has_listeners 6.76% ip [kernel.kallsyms] [k] _raw_spin_lock_irqsave 5.78% ip [kernel.kallsyms] [k] memset_erms 5.77% ip [kernel.kallsyms] [k] kobject_uevent_env 5.18% ip [kernel.kallsyms] [k] refcount_sub_and_test 4.96% ip [kernel.kallsyms] [k] _raw_read_lock 3.82% ip [kernel.kallsyms] [k] refcount_inc_not_zero 3.33% ip [kernel.kallsyms] [k] _raw_spin_unlock_irqrestore 2.11% ip [kernel.kallsyms] [k] unmap_page_range 1.77% ip [kernel.kallsyms] [k] __wake_up 1.69% ip [kernel.kallsyms] [k] strlen 1.17% ip [kernel.kallsyms] [k] __wake_up_common 1.09% ip [kernel.kallsyms] [k] insert_header 1.04% ip [kernel.kallsyms] [k] page_remove_rmap 1.01% ip [kernel.kallsyms] [k] consume_skb 0.98% ip [kernel.kallsyms] [k] netlink_trim 0.51% ip [kernel.kallsyms] [k] kernfs_link_sibling 0.51% ip [kernel.kallsyms] [k] filemap_map_pages 0.46% ip [kernel.kallsyms] [k] memcpy_erms Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller include/net/netns/ipv6.h | 5 +++ net/ipv6/addrlabel.c | 81 ++++++++++++++++++------------------------------ 2 files changed, 35 insertions(+), 51 deletions(-) commit d464e84eed02993d40ad55fdc19f4523e4deee5b Author: Eric Dumazet Date: Tue Sep 19 16:27:05 2017 -0700 kobject: factorize skb setup in kobject_uevent_net_broadcast() We can build one skb and let it be cloned in netlink. This is much faster, and use less memory (all clones will share the same skb->head) Tested: time perf record (for f in `seq 1 3000` ; do ip netns add tast$f; done) [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 4.110 MB perf.data (~179584 samples) ] real 0m24.227s # instead of 0m52.554s user 0m0.329s sys 0m23.753s # instead of 0m51.375s 14.77% ip [kernel.kallsyms] [k] __ip6addrlbl_add 14.56% ip [kernel.kallsyms] [k] netlink_broadcast_filtered 11.65% ip [kernel.kallsyms] [k] netlink_has_listeners 6.19% ip [kernel.kallsyms] [k] _raw_spin_lock_irqsave 5.66% ip [kernel.kallsyms] [k] kobject_uevent_env 4.97% ip [kernel.kallsyms] [k] memset_erms 4.67% ip [kernel.kallsyms] [k] refcount_sub_and_test 4.41% ip [kernel.kallsyms] [k] _raw_read_lock 3.59% ip [kernel.kallsyms] [k] refcount_inc_not_zero 3.13% ip [kernel.kallsyms] [k] _raw_spin_unlock_irqrestore 1.55% ip [kernel.kallsyms] [k] __wake_up 1.20% ip [kernel.kallsyms] [k] strlen 1.03% ip [kernel.kallsyms] [k] __wake_up_common 0.93% ip [kernel.kallsyms] [k] consume_skb 0.92% ip [kernel.kallsyms] [k] netlink_trim 0.87% ip [kernel.kallsyms] [k] insert_header 0.63% ip [kernel.kallsyms] [k] unmap_page_range Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller lib/kobject_uevent.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) commit 4a336a23d619e96aef37d4d054cfadcdd1b581ba Author: Eric Dumazet Date: Tue Sep 19 16:27:04 2017 -0700 kobject: copy env blob in one go No need to iterate over strings, just copy in one efficient memcpy() call. Tested: time perf record "(for f in `seq 1 3000` ; do ip netns add tast$f; done)" [ perf record: Woken up 10 times to write data ] [ perf record: Captured and wrote 8.224 MB perf.data (~359301 samples) ] real 0m52.554s # instead of 1m7.492s user 0m0.309s sys 0m51.375s # instead of 1m6.875s 9.88% ip [kernel.kallsyms] [k] netlink_broadcast_filtered 8.86% ip [kernel.kallsyms] [k] string 7.37% ip [kernel.kallsyms] [k] __ip6addrlbl_add 5.68% ip [kernel.kallsyms] [k] netlink_has_listeners 5.52% ip [kernel.kallsyms] [k] memcpy_erms 4.76% ip [kernel.kallsyms] [k] __alloc_skb 4.54% ip [kernel.kallsyms] [k] vsnprintf 3.94% ip [kernel.kallsyms] [k] format_decode 3.80% ip [kernel.kallsyms] [k] kmem_cache_alloc_node_trace 3.71% ip [kernel.kallsyms] [k] kmem_cache_alloc_node 3.66% ip [kernel.kallsyms] [k] kobject_uevent_env 3.38% ip [kernel.kallsyms] [k] strlen 2.65% ip [kernel.kallsyms] [k] _raw_spin_lock_irqsave 2.20% ip [kernel.kallsyms] [k] kfree 2.09% ip [kernel.kallsyms] [k] memset_erms 2.07% ip [kernel.kallsyms] [k] ___cache_free 1.95% ip [kernel.kallsyms] [k] kmem_cache_free 1.91% ip [kernel.kallsyms] [k] _raw_read_lock 1.45% ip [kernel.kallsyms] [k] ksize 1.25% ip [kernel.kallsyms] [k] _raw_spin_unlock_irqrestore 1.00% ip [kernel.kallsyms] [k] widen_string Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller lib/kobject_uevent.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 16dff336b33d87c15d9cbe933cfd275aae2a8251 Author: Eric Dumazet Date: Tue Sep 19 16:27:03 2017 -0700 kobject: add kobject_uevent_net_broadcast() This removes some #ifdef pollution and will ease follow up patches. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller lib/kobject_uevent.c | 96 +++++++++++++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 43 deletions(-) commit 752fbcc33405d6f8249465e4b2c4e420091bb825 Author: Cong Wang Date: Tue Sep 19 13:15:42 2017 -0700 net_sched: no need to free qdisc in RCU callback gen estimator has been rewritten in commit 1c0d32fde5bd ("net_sched: gen_estimator: complete rewrite of rate estimators"), the caller no longer needs to wait for a grace period. So this patch gets rid of it. Cc: Jamal Hadi Salim Cc: Eric Dumazet Signed-off-by: Cong Wang Acked-by: Eric Dumazet Signed-off-by: David S. Miller include/net/sch_generic.h | 1 - net/sched/sch_generic.c | 10 ++-------- 2 files changed, 2 insertions(+), 9 deletions(-) commit bd7d2106b63adfd0dfd08331344e356461c29d70 Author: Jim Hanko Date: Tue Sep 19 11:33:39 2017 -0700 team: fall back to hash if table entry is empty If the hash to port mapping table does not have a valid port (i.e. when a port goes down), fall back to the simple hashing mechanism to avoid dropping packets. Signed-off-by: Jim Hanko Acked-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/team/team_mode_loadbalance.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit d3b557712f7203e3d0ef1ecb2b04159e174c2ee1 Merge: 3d5cc72 cdd4de3 Author: David S. Miller Date: Tue Sep 19 16:15:48 2017 -0700 Merge branch 'test_rhashtable-dont-allocate-huge-static-array' Florian Westphal says: ==================== test_rhashtable: don't allocate huge static array Add a test case for the rhlist interface. While at it, cleanup current rhashtable test a bit and add a check for max_size support. No changes since v1, except in last patch. kbuild robot complained about large onstack allocation caused by struct rhltable when lockdep is enabled. ==================== Signed-off-by: David S. Miller commit cdd4de372ea06a18e104100b9f2c442527d26db1 Author: Florian Westphal Date: Wed Sep 20 01:12:14 2017 +0200 test_rhashtable: add test case for rhl_table interface also test rhltable. rhltable remove operations are slow as deletions require a list walk, thus test with 1/16th of the given entry count number to get a run duration similar to rhashtable one. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller lib/test_rhashtable.c | 196 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 194 insertions(+), 2 deletions(-) commit a6359bd8dd1c3a15c09e7dbb533bf89d13b42acd Author: Florian Westphal Date: Wed Sep 20 01:12:13 2017 +0200 test_rhashtable: add a check for max_size add a test that tries to insert more than max_size elements. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller lib/test_rhashtable.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit f651616e799ff01d1e21abc053ee1e23ac1a2344 Author: Florian Westphal Date: Wed Sep 20 01:12:12 2017 +0200 test_rhashtable: don't use global entries variable pass the entries to test as an argument instead. Followup patch will add an rhlist test case; rhlist delete opererations are slow so we need to use a smaller number to test it. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller lib/test_rhashtable.c | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) commit 7e936bd73483eb1873b9ab6f375c9a1d781bc5cb Author: Florian Westphal Date: Wed Sep 20 01:12:11 2017 +0200 test_rhashtable: don't allocate huge static array Signed-off-by: Florian Westphal Signed-off-by: David S. Miller lib/test_rhashtable.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit 3d5cc728c481394abc56a23a2d9f5c22fd407764 Merge: d43a9d1 f86ad77 Author: David S. Miller Date: Tue Sep 19 16:08:54 2017 -0700 Merge branch 'dsa-b53-bcm_sf2-cleanups' Florian Fainelli says: ==================== net: dsa: b53/bcm_sf2 cleanups This patch series is a first pass set of clean-ups to reduce the number of LOCs between b53 and bcm_sf2 and sharing as many functions as possible. There is a number of additional cleanups queued up locally that require more thorough testing. Changes in v3: - remove one extra argument for the b53_build_io_op macro (David Laight) - added additional Reviewed-by tags from Vivien Changes in v2: - added Reviewed-by tags from Vivien - added a missing EXPORT_SYMBOL() in patch 8 - fixed a typo in patch 5 ==================== Signed-off-by: David S. Miller commit f86ad77faf248d6101394f8c79d03f16a9ea461d Author: Florian Fainelli Date: Tue Sep 19 10:46:54 2017 -0700 net: dsa: bcm_sf2: Utilize b53_{enable, disable}_port Export b53_{enable,disable}_port and use these two functions in bcm_sf2_port_setup and bcm_sf2_port_disable. The generic functions cannot be used without wrapping because we need to manage additional switch integration details (PHY, Broadcom tag etc.). Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 8 ++++---- drivers/net/dsa/b53/b53_priv.h | 2 ++ drivers/net/dsa/bcm_sf2.c | 26 ++------------------------ 3 files changed, 8 insertions(+), 28 deletions(-) commit 152b6fd60ae075dbe41707ed9c7caddc18b03b35 Author: Florian Fainelli Date: Tue Sep 19 10:46:53 2017 -0700 net: dsa: bcm_sf2: Use SF2_NUM_EGRESS_QUEUES for CFP The magic number 8 in 3 locations in bcm_sf2_cfp.c actually designates the number of switch port egress queues, so use that define instead of open-coding it. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2_cfp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit aac028672cbea038f23e378ddb3af08c1dbe668c Author: Florian Fainelli Date: Tue Sep 19 10:46:52 2017 -0700 net: dsa: b53: Export b53_imp_vlan_setup() bcm_sf2 and b53 do exactly the same thing, so share that piece. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 3 ++- drivers/net/dsa/b53/b53_priv.h | 1 + drivers/net/dsa/bcm_sf2.c | 23 +---------------------- 3 files changed, 4 insertions(+), 23 deletions(-) commit f43a2dbe9597038578171e70cb8fe751a0383fe2 Author: Florian Fainelli Date: Tue Sep 19 10:46:51 2017 -0700 net: dsa: b53: Wire-up EEE Add support for enabling and disabling EEE, as well as re-negotiating it in .adjust_link() and in .port_enable(). Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 22256b0afb12333571ad11799fa68fd27e4f4e80 Author: Florian Fainelli Date: Tue Sep 19 10:46:50 2017 -0700 net: dsa: b53: Move EEE functions to b53 Move the bcm_sf2 EEE-related functions to the b53 driver because this is shared code amongst Gigabit capable switch, only 5325 and 5365 are too old to support that. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 63 ++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/b53/b53_priv.h | 5 +++ drivers/net/dsa/bcm_sf2.c | 66 ++++------------------------------------ drivers/net/dsa/bcm_sf2.h | 2 -- drivers/net/dsa/bcm_sf2_regs.h | 3 -- 5 files changed, 74 insertions(+), 65 deletions(-) commit 909d812a668e8950ed8bb33ecdc9afbcdb0d371b Author: Florian Fainelli Date: Tue Sep 19 10:46:49 2017 -0700 net: dsa: b53: Define EEE register page In preparation for migrating the EEE code from bcm_sf2 to b53, define the full EEE register page and offsets within that page. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_regs.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit b409a9efa183d92d99bc314fb26ebc1c2a8b4379 Author: Florian Fainelli Date: Tue Sep 19 10:46:48 2017 -0700 net: dsa: b53: Move Broadcom header setup to b53 The code to enable Broadcom tags/headers is largely switch independent, and in preparation for enabling it for multiple devices with b53, move the code we have in bcm_sf2.c to b53_common.c Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 47 ++++++++++++++++++++++++++++++++++++++++ drivers/net/dsa/b53/b53_priv.h | 1 + drivers/net/dsa/b53/b53_regs.h | 7 ++++++ drivers/net/dsa/bcm_sf2.c | 43 ++---------------------------------- drivers/net/dsa/bcm_sf2_regs.h | 8 ------- 5 files changed, 57 insertions(+), 49 deletions(-) commit 5345862e9af02ce3780639bfe350ed2da9f8af13 Author: Florian Fainelli Date: Tue Sep 19 10:46:47 2017 -0700 net: dsa: b53: Use a macro to define I/O operations Instead of repeating the same pattern: acquire mutex, read/write, release mutex, define a macro: b53_build_op() which takes the type (read|write), I/O size, and value (scalar or pointer). This helps with fixing bugs that could exist (e.g: missing barrier, lock etc.). Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_priv.h | 133 +++++++---------------------------------- 1 file changed, 22 insertions(+), 111 deletions(-) commit e85ec74ace29acfda4afdfd56df122a0a62e6a1a Author: Florian Fainelli Date: Tue Sep 19 10:46:46 2017 -0700 net: dsa: bcm_sf2: Defer port enabling to calling port_enable There is no need to configure the enabled ports once in bcm_sf2_sw_setup() and then a second time around when dsa_switch_ops::port_enable is called, just do it when port_enable is called which is better in terms of power consumption and correctness. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/bcm_sf2.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 34c8befd1365eb38f8dd7f3f81086fa766915610 Author: Florian Fainelli Date: Tue Sep 19 10:46:45 2017 -0700 net: dsa: b53: Defer port enabling to calling port_enable There is no need to configure the enabled ports once in b53_setup() and then a second time around when dsa_switch_ops::port_enable is called, just do it when port_enable is called which is better in terms of power consumption and correctness. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 299752a7d28654dd74304a76d3639e744df52084 Author: Florian Fainelli Date: Tue Sep 19 10:46:44 2017 -0700 net: dsa: b53: Make b53_enable_cpu_port() take a port argument In preparation for future changes allowing the configuring of multiple CPU ports, make b53_enable_cpu_port() take a port argument. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_common.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 7131cc9fc9fd3291bff0e0d3326a1b6983fa0f34 Author: Florian Fainelli Date: Tue Sep 19 10:46:43 2017 -0700 net: dsa: b53: Remove is_cpu_port() This is not used anywhere, so remove it. Reviewed-by: Vivien Didelot Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/dsa/b53/b53_priv.h | 5 ----- 1 file changed, 5 deletions(-) commit e6b20bf1b77c24465393b5b1e12781110cedc12c Author: Rodrigo Vivi Date: Thu Sep 7 16:06:32 2017 -0700 drm/i915/cfl: Remove alpha support protection. We now have Coffee Lake on our CI systems. Coffee Lake is at this point in same stage as Kaby Lake. And it seems that we don't have any risk of bad blank screens or anything like that. So let's remove the protection. Cc: Daniel Vetter Cc: Dhinakaran Pandiyan Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170907230632.25650-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_pci.c | 1 - 1 file changed, 1 deletion(-) commit 3b92e263dd4a38fa168d12a55ea4c8193483b884 Author: Rodrigo Vivi Date: Tue Sep 19 14:57:03 2017 -0700 drm/i915/cnp: Display Wa #1179: WaHardHangonHotPlug "CNL PCH chance of hang when software accesses south display registers after hotplug is enabled. Workaround: Program 0xC2000 bits 11:8 = 0xF before enabling south display hotplug detection." "Workaround only needs to be applied to pre-production steppings used in graphics capable SKUs, but it is easier to apply to everything, and does not hurt." v2: Moving from clock gating to right before enabling SHOTPLUG_CTL as it should be. v3: Align with SOUTH_CHICKEN1 (DK) and consequently use proper spaces on bits definition since other bits around already use new style. And now that checkpatch is not noise anymore I also fixed the reg read mask to avoid going over 80 chars. Suggested-by: Ben Widawsky Cc: Ben Widawsky Cc: Dhinakaran Pandiyan Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170919215703.25947-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_irq.c | 10 +++++++++- drivers/gpu/drm/i915/i915_reg.h | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) commit d43a9d19803d139901891f5e9d814ef3eae54641 Merge: 69e33b2 f2f2356 Author: David S. Miller Date: Tue Sep 19 16:04:23 2017 -0700 Merge branch 'dsa-master-ethtool-move' Vivien Didelot says: ==================== net: dsa: move master ethtool code The DSA core overrides the master device's ethtool_ops structure so that it can inject statistics and such of its dedicated switch CPU port. This ethtool code is currently called on unnecessary conditions or before the master interface and its switch CPU port get wired up. This patchset fixes this. Similarly to slave.c where the DSA slave net_device is the entry point of the dsa_slave_* functions, this patchset also isolates the master's ethtool code in a new master.c file, where the DSA master net_device is the entry point of the dsa_master_* functions. This is a first step towards better control of the master device and support for multiple CPU ports. ==================== Tested-by: Florian Fainelli Signed-off-by: David S. Miller commit f2f2356685bcaf1063859356fc65a5ac808b1382 Author: Vivien Didelot Date: Tue Sep 19 11:57:00 2017 -0400 net: dsa: move master ethtool code DSA overrides the master device ethtool ops, so that it can inject stats from its dedicated switch CPU port as well. The related code is currently split in dsa.c and slave.c, but it only scopes the master net device. Move it to a new master.c DSA core file. This file will be later extented with master net device specific code. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/Makefile | 2 +- net/dsa/dsa.c | 28 ------------- net/dsa/dsa2.c | 4 +- net/dsa/dsa_priv.h | 7 ++-- net/dsa/legacy.c | 4 +- net/dsa/master.c | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++ net/dsa/slave.c | 83 ------------------------------------ 7 files changed, 129 insertions(+), 119 deletions(-) commit 1943563dfd4b3a1f9dc102f056813112d29bb60f Author: Vivien Didelot Date: Tue Sep 19 11:56:59 2017 -0400 net: dsa: setup master ethtool after dsa_ptr DSA overrides the master's ethtool ops so that we can inject its CPU port's statistics. Because of that, we need to setup the ethtool ops after the master's dsa_ptr pointer has been assigned, not before. This patch setups the ethtool ops after dsa_ptr is assigned, and restores them before it gets cleared. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 12 +++++++----- net/dsa/legacy.c | 10 +++------- 2 files changed, 10 insertions(+), 12 deletions(-) commit cd8d7dd41bfddaa02e34db35abfab14ce4584dee Author: Vivien Didelot Date: Tue Sep 19 11:56:58 2017 -0400 net: dsa: setup master ethtool unconditionally When a DSA switch tree is meant to be applied, it already has a CPU port. Thus remove the condition of dst->cpu_dp. Moreover, the next lines access dst->cpu_dp unconditionally. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller net/dsa/dsa2.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit f5619866592c65adc087364cc1a3ba709201ea26 Author: Vivien Didelot Date: Tue Sep 19 11:56:57 2017 -0400 net: dsa: remove copy of master ethtool_ops There is no need to store a copy of the master ethtool ops, storing the original pointer in DSA and the new one in the master netdev itself is enough. In the meantime, set orig_ethtool_ops to NULL when restoring the master ethtool ops and check the presence of the master original ethtool ops as well as its needed functions before calling them. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller include/net/dsa.h | 1 - net/dsa/dsa.c | 8 ++++---- net/dsa/slave.c | 19 +++++++++++-------- 3 files changed, 15 insertions(+), 13 deletions(-) commit 69e33b2754ea4fbe4fdd2d18bc8ca05d8670a5c2 Author: Florian Westphal Date: Tue Sep 19 14:42:17 2017 +0200 selftests: rtnetlink.sh: add test case for device ifalias Signed-off-by: Florian Westphal Signed-off-by: David S. Miller tools/testing/selftests/net/rtnetlink.sh | 57 ++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit bffa72cf7f9df842f0016ba03586039296b4caaf Author: Eric Dumazet Date: Tue Sep 19 05:14:24 2017 -0700 net: sk_buff rbnode reorg skb->rbnode shares space with skb->next, skb->prev and skb->tstamp Current uses (TCP receive ofo queue and netem) need to save/restore tstamp, while skb->dev is either NULL (TCP) or a constant for a given queue (netem). Since we plan using an RB tree for TCP retransmit queue to speedup SACK processing with large BDP, this patch exchanges skb->dev and skb->tstamp. This saves some overhead in both TCP and netem. v2: removes the swtstamp field from struct tcp_skb_cb Signed-off-by: Eric Dumazet Cc: Soheil Hassas Yeganeh Cc: Wei Wang Cc: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller include/linux/skbuff.h | 16 ++++++++-------- include/net/tcp.h | 6 ------ net/ipv4/tcp_input.c | 27 +++++---------------------- net/sched/sch_netem.c | 7 ++++--- 4 files changed, 17 insertions(+), 39 deletions(-) commit 57f7feff2912d6996b5f3fcac084308ce195127c Author: Colin Ian King Date: Tue Sep 19 22:50:00 2017 +0100 ASoC: rl6231: make arrays div and pd static const, reduces object code size Don't populate the read-only arrays div and pd on the stack, instead make them static const. Makes the object code smaller by 210 bytes: Before: text data bss dec hex filename 2869 720 0 3589 e05 sound/soc/codecs/rl6231.o After: text data bss dec hex filename 2495 880 0 3375 d2f sound/soc/codecs/rl6231.o Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/codecs/rl6231.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7bea578b5f0c44c974a585bfbe6422065b9f6b6d Author: Al Viro Date: Mon Sep 4 12:37:53 2017 -0400 mips: switch to {get,put}_compat_sigset() Signed-off-by: Al Viro arch/mips/include/asm/compat-signal.h | 37 ++++------------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) commit 68c38fb6acb12f007785c53a7367fc9de8e34745 Author: Al Viro Date: Mon Sep 4 12:28:06 2017 -0400 sparc: switch to {get,put}_compat_sigset() slightly more complicated than usual, since old sigframe layout on sparc keeps the first 32 bits of mask away from the rest Signed-off-by: Al Viro arch/sparc/kernel/signal32.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit c60a03fee0e5d5c124befe041696228c8c665eaa Author: Al Viro Date: Mon Sep 4 12:24:17 2017 -0400 s390: switch to {get,put}_compat_sigset() Signed-off-by: Al Viro arch/s390/kernel/compat_signal.c | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) commit a5ae754a3de9c1ad970d3690d03929f8b6553389 Author: Al Viro Date: Mon Sep 4 12:17:38 2017 -0400 ppc: switch to {get,put}_compat_sigset() Signed-off-by: Al Viro arch/powerpc/kernel/signal_32.c | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) commit d74f0f47e2787837598c6ff6f75d44cbc3753689 Author: Al Viro Date: Mon Sep 4 12:14:28 2017 -0400 parisc: switch to {get,put}_compat_sigset() Signed-off-by: Al Viro arch/parisc/kernel/signal.c | 9 +++------ arch/parisc/kernel/signal32.c | 13 ------------- arch/parisc/kernel/signal32.h | 2 -- 3 files changed, 3 insertions(+), 21 deletions(-) commit 3968cf623892d710e651070243fd16af312a9797 Author: Al Viro Date: Sun Sep 3 21:45:17 2017 -0400 get_compat_sigset() similar to put_compat_sigset() Signed-off-by: Al Viro arch/sparc/kernel/sys_sparc32.c | 4 +--- fs/eventpoll.c | 4 +--- fs/select.c | 8 ++------ fs/signalfd.c | 4 +--- include/linux/compat.h | 2 +- kernel/compat.c | 23 ++++++++++++++++------- kernel/signal.c | 27 ++++----------------------- virt/kvm/kvm_main.c | 7 ++----- 8 files changed, 28 insertions(+), 51 deletions(-) commit b8e8e1aa9f14110da180569908bbe538c9e9dc63 Author: Al Viro Date: Sun Sep 3 20:42:54 2017 -0400 get rid of {get,put}_compat_itimerspec() no users left Signed-off-by: Al Viro include/linux/compat.h | 5 ----- kernel/compat.c | 18 ------------------ 2 files changed, 23 deletions(-) commit fa2e62a54003419b06f1de7836dca51b368d0872 Author: Deepa Dinamani Date: Fri Aug 4 21:12:32 2017 -0700 io_getevents: Use timespec64 to represent timeouts struct timespec is not y2038 safe. Use y2038 safe struct timespec64 to represent timeouts. The system call interface itself will be changed as part of different series. Timeouts will not really need more than 32 bits. But, replacing these with timespec64 helps verification of a y2038 safe kernel by getting rid of timespec internally. Signed-off-by: Deepa Dinamani Cc: linux-aio@kvack.org Signed-off-by: Al Viro fs/aio.c | 55 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 25 deletions(-) commit 36819ad093e16a4b06c53f98d4a5afc55530bbcb Author: Deepa Dinamani Date: Fri Aug 4 21:12:31 2017 -0700 select: Use get/put_timespec64 Usage of these apis and their compat versions makes the syscalls: select family of syscalls 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 fs/select.c | 60 ++++++++++++++++++++++++------------------------------------ 1 file changed, 24 insertions(+), 36 deletions(-) commit 176826af03666758c656dd27f098cc889b71638b Author: Dmitry V. Levin Date: Tue Aug 22 02:16:43 2017 +0300 signal: lift sigset size check out of do_sigpending() As sigsetsize argument of do_sigpending() is not used anywhere else in that function after the check, remove this argument and move the check out of do_sigpending() into rt_sigpending() and its compat analog. Suggested-by: Al Viro Signed-off-by: Dmitry V. Levin Signed-off-by: Al Viro kernel/signal.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 1681634b8c70353d8ca211b9b3443889a16dafeb Author: Dmitry V. Levin Date: Tue Aug 22 02:16:29 2017 +0300 signal: simplify compat_sigpending() Remove "if it's big-endian..." ifdef in compat_sigpending(), use the endian-agnostic variant. Suggested-by: Al Viro Signed-off-by: Dmitry V. Levin Signed-off-by: Al Viro kernel/signal.c | 4 ---- 1 file changed, 4 deletions(-) commit f454322efbf6faee695f517c6b52c4dc03cacd3e Author: Dmitry V. Levin Date: Tue Aug 22 02:16:11 2017 +0300 signal: replace sigset_to_compat() with put_compat_sigset() There are 4 callers of sigset_to_compat() in the entire kernel. One is in sparc compat rt_sigaction(2), the rest are in kernel/signal.c itself. All are followed by copy_to_user(), and all but the sparc one are under "if it's big-endian..." ifdefs. Let's transform sigset_to_compat() into put_compat_sigset() that also calls copy_to_user(). Suggested-by: Al Viro Signed-off-by: Dmitry V. Levin Signed-off-by: Al Viro arch/sparc/kernel/sys_sparc32.c | 6 +++--- include/linux/compat.h | 3 ++- kernel/compat.c | 20 ++++++++++++++------ kernel/signal.c | 27 ++++++--------------------- 4 files changed, 25 insertions(+), 31 deletions(-) commit a38b2fa37e2e2ac897e7159738c5763ee65ee405 Merge: 7670712 b48cfc8 Author: David S. Miller Date: Tue Sep 19 14:21:41 2017 -0700 Merge branch 'mlxsw-Prepare-for-multicast-router-offload' Jiri Pirko says: ==================== mlxsw: Prepare for multicast router offload Yotam says: This patch-set makes various preparations needed for the multicast router offloading, which include: - Add the needed registers. - Add needed ACL actions. - Add new traps and trap groups. - Exporting needed private structs and enums. ==================== Signed-off-by: David S. Miller commit b48cfc80ce9c27368e331d9aa742314487b0ee12 Author: Yotam Gigi Date: Tue Sep 19 10:00:20 2017 +0200 mlxsw: spectrum: Add multicast router traps and trap groups Add three new traps needed for multicast routing: - PIM: Trap for PIM protocol control packets. - RPF: Trap for packets that fail the RPF check on a specific hardware route entry. - MULTICAST: Generic trap for multicast. It is used for routes that trap the packets to the CPU. The RPF and MULTICAST traps have rate limiters as these traps may have line-rate of packets trapped. The PIM trap has a rate limiter similarly to other L3 control protocols. The rate limiters are implemented by adding three new trap groups for the newly introduced traps. 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 | 3 +++ drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 10 ++++++++++ drivers/net/ethernet/mellanox/mlxsw/trap.h | 4 ++++ 3 files changed, 17 insertions(+) commit 91e4d59a4600afe64b44e013a7c1805bbfe61e59 Author: Yotam Gigi Date: Tue Sep 19 10:00:19 2017 +0200 mlxsw: spectrum_router: Export RIF dev access function The mlxsw_sp_rif struct, defined as private struct in spectrum_router.c will be used in the multicast router source file. Due to the fact that the dev field will be needed by the multicast router logic, add an access function to it. 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_router.c | 5 +++++ drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h | 1 + 2 files changed, 6 insertions(+) commit 4af5964e58884855d28ae68ddf01279868e70853 Author: Yotam Gigi Date: Tue Sep 19 10:00:18 2017 +0200 mlxsw: reg: Configure RIF to forward IPv4 multicast packets by default Turn on two bits on the Spectrum RIF configuration: - IPv4 multicast: when a multicast packet arrives on a RIF, send it to go through multicast routes lookup. - IPv4 multicast forwarding enable: when multicast packet arrives on a RIF, allow it to be forwarded by multicast routes. If this bit is not set, multicast packets will go through multicast routing lookup but will be dropped at the egress of the ports. 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 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 4fc92846f65b0a3470b433c54251a40feae7b2d5 Author: Yotam Gigi Date: Tue Sep 19 10:00:17 2017 +0200 mlxsw: reg: Add Router Rules Copy Register The RRCR register is used for copying and moving TCAM multicast routes from different offsets. It will be used to allow routes relocation for parman ops as part of the multicast router offloading logic. 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 | 60 +++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) commit 2e654e33c5791332d7abf759fd9d34a39082ffc7 Author: Yotam Gigi Date: Tue Sep 19 10:00:16 2017 +0200 mlxsw: reg: Add the Router Multicast Forwarding Table Version 2 register The RMFT-V2 register is used to configure and query the multicast table and will be used by the multicast router offloading logic. 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 | 142 ++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) commit 771ced742a4f02ac248ad679325bd434843d78d0 Author: Yotam Gigi Date: Tue Sep 19 10:00:15 2017 +0200 mlxsw: resources: Add multicast ERIF list entries resource The multicast ERIF list entries resource indicates the number of entries that can be put in one rigr2 register operation. While the register can hold up to MLXSW_REG_RIGR2_MAX_ERIFS ( = 32) ERIF entries, the actual number allowed by firmware is indicated with this resource. 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/resources.h | 2 ++ 1 file changed, 2 insertions(+) commit 5080c7e91701744ef1a5d7aab51f568f889bfddb Author: Yotam Gigi Date: Tue Sep 19 10:00:14 2017 +0200 mlxsw: reg: Add the Router Interface Group Version 2 register The RIGR-V2 register is used to add, remove and query egress interface list of a multicast forwarding entry and it will be used by the multicast router offloading logic. 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 46a7054ebace0fcd0d1826881aa5ab219faa6a77 Author: Yotam Gigi Date: Tue Sep 19 10:00:13 2017 +0200 mlxsw: reg: Add The Router TCAM Allocation register This register is used for allocation of regions in the TCAM table and it will be used by the multicast router offloading logic. 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 587265655159d73247a56236092917131183496e Author: Yotam Gigi Date: Tue Sep 19 10:00:12 2017 +0200 mlxsw: reg: Rename the flexible action set length field The MLXSW_REG_PXXX_FLEX_ACTION_SET_LEN is relevant for the multicast router registers too, so rename it to have a general name which is not bound to a specific register. 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 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 9cb3fa940e2c1c62d35972ab8433531a4ba421a5 Author: Yotam Gigi Date: Tue Sep 19 10:00:11 2017 +0200 mlxsw: acl: Change trap ACL action to get the trap_id as a parameter Allow the trap ACL action to be configured with different traps. This allows the multicast router offloading code to use that same ACL action with the multicast router traps. By using different traps, the multicast router can have different trap policies and can handle the packet differently. 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_acl_flex_actions.c | 4 ++-- drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) commit 4b8a79ff27645c1201287c3b17091add748d1fb9 Author: Yotam Gigi Date: Tue Sep 19 10:00:10 2017 +0200 mlxsw: acl: Introduce mcrouter ACL action The Spectrum multicast forwarding is done using an ACL action. Add the mcrouter ACL action that will be used to offload the multicast router logic. Signed-off-by: Yotam Gigi Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller .../mellanox/mlxsw/core_acl_flex_actions.c | 71 ++++++++++++++++++++++ .../mellanox/mlxsw/core_acl_flex_actions.h | 3 + 2 files changed, 74 insertions(+) commit d3b939b8f9a571da82359b6baa5506c9179770d1 Author: Yotam Gigi Date: Tue Sep 19 10:00:09 2017 +0200 mlxsw: spectrum: Move ACL flexible actions instance to spectrum A flexible action instance allows, given a set of ops, creating, committing and sharing a set of ACL action blocks. The flexible action instance in question is using the spectrum KVD linear space to store the flexible action sets. Move this flexible action instance to the common spectrum struct to allow other users (such as multicast router) to get that functionality. 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/Makefile | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 10 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 93 +-------------- .../mellanox/mlxsw/spectrum_acl_flex_actions.c | 129 +++++++++++++++++++++ .../mellanox/mlxsw/spectrum_acl_flex_actions.h | 44 +++++++ 6 files changed, 186 insertions(+), 93 deletions(-) commit e2b2d35a052d9264a774715bc6aa3395a45dcfa2 Author: Yotam Gigi Date: Tue Sep 19 10:00:08 2017 +0200 mlxsw: spectrum: Change init order The multicast router offloading code is going to require the counter_pools initialization to occur before the router initialization, thus, change the spectrum initialization order to fix it. 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 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 767071270798d7292a905022b8f29711bfc5b0a2 Merge: 173f4c5 e8d1749 Author: David S. Miller Date: Tue Sep 19 13:55:15 2017 -0700 Merge branch 'bpf-lpm-delete' Craig Gallek says: ==================== Implement delete for BPF LPM trie This was previously left as a TODO. Add the implementation and extend the test to cover it. ==================== Signed-off-by: David S. Miller commit e8d1749910b56a7248cb9a5392274348d10108bb Author: Craig Gallek Date: Mon Sep 18 15:30:57 2017 -0400 bpf: Test deletion in BPF_MAP_TYPE_LPM_TRIE Extend the 'random' operation tests to include a delete operation (delete half of the nodes from both lpm implementions and ensure that lookups are still equivalent). Also, add a simple IPv4 test which verifies lookup behavior as nodes are deleted from the tree. Signed-off-by: Craig Gallek Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_lpm_map.c | 187 ++++++++++++++++++++++++++++- 1 file changed, 183 insertions(+), 4 deletions(-) commit bae30468dfc1522464f16051addd7bc7da6da75a Author: Craig Gallek Date: Mon Sep 18 15:30:56 2017 -0400 bpf: Add uniqueness invariant to trivial lpm test implementation The 'trivial' lpm implementation in this test allows equivalent nodes to be added (that is, nodes consisting of the same prefix and prefix length). For lookup operations, this is fine because insertion happens at the head of the (singly linked) list and the first, best match is returned. In order to support deletion, the tlpm data structue must first enforce uniqueness. This change modifies the insertion algorithm to search for equivalent nodes and remove them. Note: the BPF_MAP_TYPE_LPM_TRIE already has a uniqueness invariant that is implemented as node replacement. Signed-off-by: Craig Gallek Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller tools/testing/selftests/bpf/test_lpm_map.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit e454cf5958538666635488030046b6a84a22d447 Author: Craig Gallek Date: Mon Sep 18 15:30:55 2017 -0400 bpf: Implement map_delete_elem for BPF_MAP_TYPE_LPM_TRIE This is a simple non-recursive delete operation. It prunes paths of empty nodes in the tree, but it does not try to further compress the tree as nodes are removed. Signed-off-by: Craig Gallek Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/bpf/lpm_trie.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 3 deletions(-) commit 173f4c5ebbd803023e42799d956cf174dea92db5 Author: Corentin Labbe Date: Mon Sep 18 20:18:55 2017 +0200 vsock: vmci: Remove unneeded linux/miscdevice.h include net/vmw_vsock/vmci_transport.c does not use any miscdevice so this patch remove this unnecessary inclusion. Signed-off-by: Corentin Labbe Signed-off-by: David S. Miller net/vmw_vsock/vmci_transport.c | 1 - 1 file changed, 1 deletion(-) commit 38c5eb93aca9dc1b21a2c96d583ce7f9886a44e6 Author: Antoine Tenart Date: Mon Sep 18 15:36:51 2017 +0200 net: mvpp2: remove useless goto Remove a goto in the PPv2 tx function which jumps to the next line anyway. This is a cosmetic commit. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvpp2.c | 1 - 1 file changed, 1 deletion(-) commit 729fbfc92a4563405f3962051e7b25fec3a7bd10 Author: Hans P. Möller Ebner Date: Tue Sep 19 12:45:34 2017 -0300 ALSA: line6: add support for POD HD DESKTOP 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 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 38405834a6abdf2a644c1384b97d8f0cca769350 Author: Bhumika Goyal Date: Tue Sep 19 16:44:38 2017 +0530 ALSA: hrtimer: make hrtimer_hw const and __initconst Make this const as it is only used during a copy operation. Also, make it __initconst as it is only used during the init phase and after this it is not referenced anywhere. Signed-off-by: Bhumika Goyal Signed-off-by: Takashi Iwai sound/core/hrtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e94f7914fa8731cc64260c0a3a0b7b9957523730 Author: Colin Ian King Date: Tue Sep 19 09:39:52 2017 +0100 libata: make static arrays const, reduces object code size Don't populate const arrayis on the stack, instead make them static. Makes the object code smaller by over 260 bytes: Before: text data bss dec hex filename 64864 5948 4128 74940 124bc drivers/ata/libata-scsi.o After: text data bss dec hex filename 64183 6364 4128 74675 123b3 drivers/ata/libata-scsi.o Signed-off-by: Colin Ian King Signed-off-by: Tejun Heo drivers/ata/libata-scsi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit dd33074ac6166dff6f156c0a3ddfc0d3094fcf6b Author: Tony Lindgren Date: Tue Aug 29 10:03:35 2017 -0700 ARM: OMAP2+: Drop unused omap_hwmod_mux_info This is no longer used as we boot in device tree only mode. Cc: Lokesh Vutla Cc: Paul Walmsley Cc: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod.h | 18 ------------------ 1 file changed, 18 deletions(-) commit 680dc624f1e136fbd11e354b978a1873c4736aba Author: Tony Lindgren Date: Tue Aug 29 10:03:34 2017 -0700 ARM: OMAP2+: Drop unused omap_init_hdq We now boot all of mach-omap2 in device tree only mode and this is now dead code. Signed-off-by: Tony Lindgren arch/arm/mach-omap2/hdq1w.c | 22 ---------------------- 1 file changed, 22 deletions(-) commit 8823ddf25d34e32c8691b9244e9b8aa120f1cff6 Author: Tony Lindgren Date: Tue Aug 29 10:03:33 2017 -0700 ARM: OMAP2+: Fix overwriting of clkctrl and modulemode values We are currently overwiting the hwmod clkctrl registers if we configure a clock ctrl clock from device tree. While this does not expose any bugs except for kernel coders when debugging things, it should be fixed for correctness. It is now impossible to use the hwmod data for checking the clkctrl register values after booting for debugging or generating dts data from hwmod data. Let's fix the issue by adding a helper to detect if clkctrl clock is configured. Cc: Lokesh Vutla Cc: Paul Walmsley Cc: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/omap_hwmod.c | 49 +++++++++++++++++++++++++++++++++------- arch/arm/mach-omap2/omap_hwmod.h | 3 +++ 2 files changed, 44 insertions(+), 8 deletions(-) commit 6963c58461b31c10cff221a7bbe4c61d803656c6 Author: Tony Lindgren Date: Tue Aug 29 10:03:32 2017 -0700 ARM: OMAP2+: Fix MMC address space mismatch for am33xx and am43xx The address space currently set up for the interconnect data is different compared to the dts data. We have hwmod data with offset 0x100 to account for the revision, sysc and syss register offsets. Let's fix the issue by correcting the MMC register offsets in hwmod data and removing the unnecessary duplicate IO range data that we get from device tree anyways. Cc: Lokesh Vutla Cc: Paul Walmsley Cc: Tero Kristo Signed-off-by: Tony Lindgren .../omap_hwmod_33xx_43xx_interconnect_data.c | 30 ---------------------- .../mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 6 ++--- 2 files changed, 3 insertions(+), 33 deletions(-) commit 1cb686c08d1213d4b0c2bfbafa5882450078c82e Author: Marek Szyprowski Date: Fri Sep 15 11:11:23 2017 +0200 ARM: dts: exynos: Add status property to Exynos 542x Mixer nodes HDMI support requires some additional off-SoC logic, so Mixer device (part of HDMI display path) should be disabled by default in SoC dtsi and enabled then in each board dts. This patch unifies Mixer handling with other Exynos SoCs. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5420-arndale-octa.dts | 4 ++++ arch/arm/boot/dts/exynos5420-peach-pit.dts | 4 ++++ arch/arm/boot/dts/exynos5420-smdk5420.dts | 4 ++++ arch/arm/boot/dts/exynos5420.dtsi | 1 + arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 4 ++++ 5 files changed, 17 insertions(+) commit e96849e3ae73d20a00b44fe22b74b733fa2d89c1 Author: Marek Szyprowski Date: Fri Sep 15 11:11:22 2017 +0200 ARM: dts: exynos: Add status property to Exynos 5250 HDMI and Mixer nodes HDMI support requires some additional off-SoC logic, so HDMI and Mixer devices should be disabled by default in SoC dtsi and enabled then in each board dts. This patch unifies HDMI and Mixer handling with other Exynos SoCs. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5250-arndale.dts | 5 +++++ arch/arm/boot/dts/exynos5250-smdk5250.dts | 5 +++++ arch/arm/boot/dts/exynos5250-snow-common.dtsi | 5 +++++ arch/arm/boot/dts/exynos5250-spring.dts | 5 +++++ arch/arm/boot/dts/exynos5250.dtsi | 4 +++- 5 files changed, 23 insertions(+), 1 deletion(-) commit c9c51fd2536e708bbb65873afd3be2f3ac42e951 Author: Marek Szyprowski Date: Fri Sep 15 11:11:21 2017 +0200 ARM: dts: exynos: Cleanup HDMI DCC definitions on Exynos5250 and Exynos542x boards Commit 2b7681326dc2 ("drm/exynos: hdmi: remove the i2c drivers and use") merged to v3.15 kernel added a required 'ddc' property to Exynos HDMI device tree bindings, which should point to i2c bus used for handling DDC (mainly reading display's EDID information). It has been enough time to convert all boards to use new bindings, but sadly due to copy/paste design the old approach using separate node with 'samsung,exynos4210-hdmiddc' compatible was used also for many new boards. This patch finally converts all boards to the new approach and unifies HDMI DDC definition across all Exynos boards. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5250-arndale.dts | 9 ++------- arch/arm/boot/dts/exynos5250-smdk5250.dts | 7 ++----- arch/arm/boot/dts/exynos5250-snow-common.dtsi | 6 +----- arch/arm/boot/dts/exynos5250-spring.dts | 6 +----- arch/arm/boot/dts/exynos5420-smdk5420.dts | 7 ++----- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 7 ++----- 6 files changed, 10 insertions(+), 32 deletions(-) commit c55af083a01ebd1c4b1b06931542e68872ada867 Author: Marek Szyprowski Date: Fri Sep 15 11:11:20 2017 +0200 ARM: dts: exynos: Move HDMI PHY node from boards to exynos5250.dtsi All Exynos 5250 SoCs have HDMI PHY connected via dedicated I2C bus (bus number 8), so HDMI PHY should be defined in exynos5250.dtsi instead of duplicating it in every board, which enables HDMI support. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5250-arndale.dts | 8 +------- arch/arm/boot/dts/exynos5250-smdk5250.dts | 6 +----- arch/arm/boot/dts/exynos5250-snow-common.dtsi | 7 +------ arch/arm/boot/dts/exynos5250-spring.dts | 7 +------ arch/arm/boot/dts/exynos5250.dtsi | 6 ++++++ 5 files changed, 10 insertions(+), 24 deletions(-) commit 288cdbbff2dcfc5188a708a9a3e7aaedc41512f1 Author: Tony Lindgren Date: Wed Aug 30 08:19:53 2017 -0700 ARM: dts: Add missing hwmod related properties for dra7 On dra7 we're missing two "ti,hwmods" properties that the SoC interconnect code needs. For hdq 1-wire, we need to add the node for that. Note that this will only show up as a bug with "doesn't have mpu register target base" boot errors when the legacy platform data is removed. Cc: Nishanth Menon Cc: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra7.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit cd57dc5a2099a43c99fb39cb7c953246149db816 Author: Tony Lindgren Date: Wed Aug 30 08:19:52 2017 -0700 ARM: dts: Add missing hwmod related nodes for am33xx On am33xx we're missing the pmu and emif nodes with their related "ti,hwmods" properties that the SoC interconnect code needs. Note that this will only show up as a bug with "doesn't have mpu register target base" boot errors when the legacy platform data is removed. Let's also update the related binding documentation while at it. Cc: Mark Rutland Acked-by: Rob Herring Signed-off-by: Tony Lindgren .../devicetree/bindings/memory-controllers/ti/emif.txt | 6 ++++-- arch/arm/boot/dts/am33xx.dtsi | 10 +++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) commit ef90bfb8be2b0f7f1d9308ff3defa1b441c661f9 Author: Tony Lindgren Date: Wed Aug 30 08:19:51 2017 -0700 ARM: dts: Add missing dma hwmod property for omap5 On omap5 we're missing the dma "ti,hwmods" property that the SoC interconnect code needs. Note that this will only show up as a bug with "doesn't have mpu register target base" boot errors when the legacy platform data is removed. Cc: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap5.dtsi | 1 + 1 file changed, 1 insertion(+) commit fee58abd51fed88d5c3ff53130c0dca2d024d73e Author: Hoegeun Kwon Date: Wed Sep 13 20:41:53 2017 +0900 ARM: dts: exynos: Use specific compatibles for proper Gscaler limits on Exynos5250 and Exynos5420 Exynos 5250 and 5420 have different hardware rotation limits. However, currently it uses only one compatible - "exynos5-gsc". Since we have to distinguish between these two, we add different compatible. Signed-off-by: Hoegeun Kwon Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5250.dtsi | 8 ++++---- arch/arm/boot/dts/exynos5420.dtsi | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) commit 5750d6717b54ac9461912264710a3b60cda153bb Author: Tony Lindgren Date: Wed Aug 30 08:19:46 2017 -0700 ARM: dts: Add missing wdt3 node for omap4 On omap4 we're missing the wdt3 node with it's related "ti,hwmods" property that the SoC interconnect code needs. Note that this will only show up as a bug with "doesn't have mpu register target base" boot errors when the legacy platform data is removed. Cc: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 8be8576fcf2d90a8bc679bfb25a4121d0eebe0de Author: Tony Lindgren Date: Wed Aug 30 13:25:20 2017 -0700 ARM: dts: Add missing hsi node for omap4 On omap4 we're missing the hsi node with it's related "ti,hwmods" property that the SoC interconnect code needs. Note that this will only show up as a bug with "doesn't have mpu register target base" boot errors when the legacy platform data is removed. Let's also update the binding accrodingly while at it. Cc: Mark Rutland Cc: Rob Herring Reviewed-by: Sebastian Reichel Acked-by: Rob Herring Signed-off-by: Tony Lindgren Documentation/devicetree/bindings/hsi/omap-ssi.txt | 13 +++++++-- arch/arm/boot/dts/omap4.dtsi | 34 ++++++++++++++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) commit d6e1a2381694c9a15f5a2ea9877fd20017470e95 Author: Tony Lindgren Date: Wed Aug 30 08:19:43 2017 -0700 ARM: dts: Add missing onewire node for omap4 On omap4 we're missing the onewire node with it's related "ti,hwmods" property that the SoC interconnect code needs. Note that this will only show up as a bug with "doesn't have mpu register target base" boot errors when the legacy platform data is removed. Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) commit 0c37c56d63f4924134edd7e3af805291add56fac Author: Vladimir Barinov Date: Thu Sep 14 17:18:30 2017 +0300 dt: Add vendor prefix 'shimafuji' Add Shimafuji Electric, Inc. to the list of device tree vendor prefixes Signed-off-by: Vladimir Barinov Acked-by: Geert Uytterhoeven Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 514b2da46fcc10bd5f42446b9fa746ba2c80aaf1 Author: Tony Lindgren Date: Wed Aug 30 08:19:41 2017 -0700 ARM: dts: Add missing smartreflex node and binding for omap4 We are missing smartreflex device tree nodes for omap4 with their related "ti,hwmods" properties that the SoC interconnect code needs. Note that this will only show up as a bug with "doesn't have mpu register target base" boot errors when the legacy platform data is removed. And since we're missing the device tree binding for smartreflex, let's also add it and document the existing omap3 use too. Note that the related driver also needs to be updated to probe using device tree and get the platform data passed to it using auxdata with arch/arm/mach-omap2/pdata-quirks.c. Cc: Mark Rutland Cc: Nishanth Menon Cc: Rafael J. Wysocki Cc: Tero Kristo Acked-by: Rob Herring Signed-off-by: Tony Lindgren .../devicetree/bindings/power/ti-smartreflex.txt | 47 ++++++++++++++++++++++ arch/arm/boot/dts/omap4.dtsi | 21 ++++++++++ 2 files changed, 68 insertions(+) commit 370ad6b4670adfc3c5c7d5aad63347e8db839762 Author: Tony Lindgren Date: Wed Aug 30 08:19:40 2017 -0700 ARM: dts: Add missing hwmods property for omap4 dma On omap4, we are missing a ti,hwmods property for dma that the that the SoC interconnect code needs. Note that this will only show up as a bug with "doesn't have mpu register target base" boot errors when the legacy platform data is removed. Cc: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4.dtsi | 1 + 1 file changed, 1 insertion(+) commit 1d6a332ae8b7d8eacb9fe4c0a09370550f0b3eee Author: Tony Lindgren Date: Wed Aug 30 08:19:39 2017 -0700 ARM: dts: Add missing properties for omap4 control modules On omap4, we are missing several ti,hwmods properties and IO ranges for system control modules. These are needed by the SoC interconnect code. Note that this will only show up as a bug with "doesn't have mpu register target base" boot errors when the legacy platform data is removed. In order to add these, we need to move omap4_pmx_wkup to be a child of omap4_padconf_wkup. On omap4 there are separate modules for control module and control module pads. For control module core, we have this already configured except for the missing ti,hwmods and reg entries. Cc: Mark Rutland Acked-by: Rob Herring Signed-off-by: Tony Lindgren .../devicetree/bindings/arm/omap/ctrl.txt | 2 ++ arch/arm/boot/dts/omap4.dtsi | 39 ++++++++++++++++------ 2 files changed, 31 insertions(+), 10 deletions(-) commit b0142a10db149daadbc2cc94c890dd00b3fa58ad Author: Tony Lindgren Date: Wed Aug 30 08:19:38 2017 -0700 ARM: dts: Configure pmu without interrupt for omap4430 On omap4430, the PMU is not configure unlike on omap4460 because of the missing handling. The missing pmu node with the missing ti,hwmods entry will cause boot time errors when the legacy platform data is removed as the SoC interconnect code needs it. Note that this will only show up as a bug with "doesn't have mpu register target base" boot errors when the legacy platform data is removed. Let's fix the issue by configuring PMU but without the interrupts. Then when cross trigger interface (CTI) is supported, we can add interrupts also for omap4430. Cc: Jon Hunter Cc: Will Deacon Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap4.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f0f838fd8cd53d8df8220b4081d7dec042ac9dd7 Author: Tony Lindgren Date: Wed Aug 30 08:19:37 2017 -0700 ARM: dts: Add missing dma hwmods property for omap3 On omap3, we are missing a ti,hwmods property for dma that the SoC interconnect code needs. Note that this will only show up as a bug with "doesn't have mpu register target base" boot errors when the legacy platform data is removed. Cc: Peter Ujfalusi Signed-off-by: Tony Lindgren arch/arm/boot/dts/omap3.dtsi | 1 + 1 file changed, 1 insertion(+) commit 82bce9cf15573235dd864c366460b90b697c9dab Author: Marek Szyprowski Date: Fri Sep 15 08:42:47 2017 +0200 ARM: dts: exynos: Remove redundant interrupt properties in gpio-keys on Odroid boards GPIO keys don't need interrupt property. Interrupt number can be derived directly from the GPIO pin definition, so remove redundant 'interrupts' and 'interrupt-parent' properties from gpio-keys nodes on Exynos4412-based Odroid boards. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 2 -- arch/arm/boot/dts/exynos4412-odroidx.dts | 2 -- 2 files changed, 4 deletions(-) commit fb5f4e96fdf9cb7ec5e6a590e1c3fdc3b6fd1e01 Author: Ville Syrjälä Date: Mon Sep 18 21:25:38 2017 +0300 drm/i915: Shrink cnl_ddi_buf_trans All the values we put into the CNL buf_trans tables fit into 8 bits. So switch over to u8 from the u32 we use currently. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170918182604.9519-4-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson Acked-by: Jani Nikula drivers/gpu/drm/i915/intel_ddi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ac3ad6c66998ee90ff83e70e9eb9dbe08a402ff5 Author: Ville Syrjälä Date: Mon Sep 18 21:25:37 2017 +0300 drm/i915: Shrink bxt_ddi_buf_trans All the values we put into the BXT buf_trans tables fit into 8 bits. So switch over to u8 from the u32 we use currently. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170918182604.9519-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_ddi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit aaafcfed9290349555a326fff1147460a54c34f2 Author: Robert Jarzmik Date: Wed Sep 13 21:37:22 2017 +0200 ASoC: wm9705: add ac97 new bus support Add support for the new ac97 bus model, where devices are automatically discovered on AC-Links. Signed-off-by: Robert Jarzmik Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 3 ++- sound/soc/codecs/wm9705.c | 42 +++++++++++++++++++++++++++++------------- 2 files changed, 31 insertions(+), 14 deletions(-) commit c6e46e52b7b3301dda529830226e578cf773151c Author: Robert Jarzmik Date: Wed Sep 13 21:37:21 2017 +0200 ASoC: wm9705: add private structure Add a private data structure. This is a preparation for a codec which would need an another data on top of snd_ac97, which will be the case when an MFD wm97xx device will probe wm9705. Signed-off-by: Robert Jarzmik Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm9705.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) commit 2ed1a8e0ce8db6d36f849526db61ce3c85a9f8d1 Author: Robert Jarzmik Date: Wed Sep 13 21:37:20 2017 +0200 ASoC: wm9712: add ac97 new bus support Add support for the new ac97 bus model, where devices are automatically discovered on AC-Links. Signed-off-by: Robert Jarzmik Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 3 ++- sound/soc/codecs/wm9712.c | 44 ++++++++++++++++++++++++++++++-------------- 2 files changed, 32 insertions(+), 15 deletions(-) commit 9bd400cadae05a26c3a22dd8393081cb96d0e26a Author: Robert Jarzmik Date: Wed Sep 13 21:37:19 2017 +0200 ASoC: wm9713: add ac97 new bus support Add support for the new ac97 bus model, where devices are automatically discovered on AC-Links. Signed-off-by: Robert Jarzmik Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/Kconfig | 3 ++- sound/soc/codecs/wm9713.c | 39 +++++++++++++++++++++++++++------------ 2 files changed, 29 insertions(+), 13 deletions(-) commit 20303eb4e09e196f33e1a558c2ac8bb699df0a34 Author: Ville Syrjälä Date: Mon Sep 18 21:25:36 2017 +0300 drm/i915: Replace some spaces with tabs Some comments in intel_ddi.c are indented with spaces instead of tabs. Fix that up. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170918182604.9519-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson Reviewed-by: Jani Nikula drivers/gpu/drm/i915/intel_ddi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ae9d1b5fbd7b7ee1c2d2f62a7cee3c0455e06f94 Author: Robert Jarzmik Date: Wed Sep 13 21:37:18 2017 +0200 Input: wm97xx: add new AC97 bus support This adds support for the new AC97 bus code, which discovers the devices rather than uses platform data. As part of this discovery, it enables a multi-function device wm97xx, which supports touchscreen, battery, ADC and an audio codec. This patch adds the code to bind the touchscreen "cell" as the touchscreen driver. This was tested on the pxa architecture with a pxa270 + wm9713 + the mioa701 touchscreen. Signed-off-by: Robert Jarzmik Acked-by: Charles Keepax Acked-by: Dmitry Torokhov Signed-off-by: Mark Brown drivers/input/touchscreen/Kconfig | 2 +- drivers/input/touchscreen/wm97xx-core.c | 56 ++++++++++++++++++++++++++++++++- 2 files changed, 56 insertions(+), 2 deletions(-) commit a5c6951c49fbf7509419d877620625ca3cdae9b1 Author: Robert Jarzmik Date: Wed Sep 13 21:37:17 2017 +0200 mfd: wm97xx-core: core support for wm97xx Codec The WM9705, WM9712 and WM9713 are highly integrated codecs, with an audio codec, DAC and ADC, GPIO unit and a touchscreen interface. Historically the support was spread across drivers/input/touchscreen and sound/soc/codecs. The sharing was done through ac97 bus sharing. This model will not withstand the new AC97 bus model, where codecs are discovered on runtime. Signed-off-by: Robert Jarzmik Acked-by: Charles Keepax Acked-by: Lee Jones Signed-off-by: Mark Brown drivers/mfd/Kconfig | 14 ++ drivers/mfd/Makefile | 1 + drivers/mfd/wm97xx-core.c | 366 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/wm97xx.h | 25 ++++ 4 files changed, 406 insertions(+) commit c72f61e7407335dfa5fe5947827777b1429cd883 Author: Robert Jarzmik Date: Wed Sep 13 21:37:16 2017 +0200 Input: wm97xx: split out touchscreen registering wm97xx-core does several things in it initialization : - touchscreen input device setup - battery device creation As the wm97xx is actually a multi-function device handling an audio codec, a touchscreen, a gpio block and an ADC, reshape the probing to isolate what is truly input/touchscreen specific from the remaining part. This is only code shuffling, there is no functional change. Signed-off-by: Robert Jarzmik Acked-by: Dmitry Torokhov Acked-by: Charles Keepax Signed-off-by: Mark Brown drivers/input/touchscreen/wm97xx-core.c | 196 +++++++++++++++++++------------- 1 file changed, 115 insertions(+), 81 deletions(-) commit 870fcae998dd16f3985627b4151ab8491d94b8c7 Author: Corentin LABBE Date: Mon Sep 18 19:26:07 2017 +0200 ASoC: Intel: Atom: Remove unneeded linux/miscdevice.h include No file in sound/soc/intel/ use any miscdevice. This patch remove this uncessary include. Signed-off-by: Corentin Labbe Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 1 - 1 file changed, 1 deletion(-) commit ac6c35a4d8c77083525044a192cb1a8711381e94 Author: Jani Nikula Date: Mon Sep 18 21:20:03 2017 +0300 drm: add backwards compatibility support for drm_kms_helper.edid_firmware Add drm_kms_helper.edid_firmware module parameter with param ops hooks to set drm.edid_firmware instead, for backwards compatibility. Suggested-by: Ville Syrjälä Cc: Abdiel Janulgue Cc: Daniel Vetter Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Acked-by: Dave Airlie Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170918182003.22238-2-jani.nikula@intel.com drivers/gpu/drm/drm_edid_load.c | 16 ++++++++++++++++ drivers/gpu/drm/drm_kms_helper_common.c | 28 ++++++++++++++++++++++++++++ include/drm/drm_edid.h | 2 ++ 3 files changed, 46 insertions(+) commit 71abd29057cb17b6b9532421821dc443427399ed Author: jiada wang Date: Tue Sep 5 14:12:32 2017 +0900 spi: imx: Add support for SPI Slave mode Previously i.MX SPI controller only works in Master mode. This patch adds support to i.MX51, i.MX53 and i.MX6 ECSPI controller to work also in Slave mode. Currently SPI Slave mode support patch has the following limitations: 1. The stale data in RXFIFO will be dropped when the Slave does any new transfer. 2. One transfer can be finished only after all transfer->len data been transferred to master device 3. Slave device only accepts transfer->len data. Any data longer than this from master device will be dropped. Any data shorter than this from master will cause SPI to stuck due to mentioned HW limitation 2. 4. Only PIO transfer is supported in Slave mode. 5. Dynamic burst size adjust isn't supported in Slave mode. Following HW limitation applies: 1. ECSPI has a HW issue when works in Slave mode, after 64 words written to TXFIFO, even TXFIFO becomes empty, ECSPI_TXDATA keeps shift out the last word data, so we have to disable ECSPI when in slave mode after the transfer completes 2. Due to Freescale errata ERR003775 "eCSPI: Burst completion by Chip Select (SS) signal in Slave mode is not functional" burst size must be set exactly to the size of the transfer. This limit SPI transaction with maximum 2^12 bits. This errata affects i.MX53 and i.MX6 ECSPI controllers. Signed-off-by: Jiada Wang Signed-off-by: Mark Brown drivers/spi/spi-imx.c | 227 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 196 insertions(+), 31 deletions(-) commit 975b6a93088e83a41ba2f0dec2f086678fdb2a7a Author: Jaechul Lee Date: Wed Sep 6 10:04:15 2017 +0900 ASoC: samsung: Fix invalid argument when devm_gpiod_get is called devm_gpiod_get is called with GPIOF_OUT_INIT_LOW but the function doesn't allow the parameters. Unluckily, GPIOF_OUT_INIT_LOW is same value as GPIOD_ASIS and gpio direction isn't set properly. Muted stream comes up when I try recording some sounds on TM2. mic-bias gpiod state can't be changed because the gpiod is created with the invalid parameter. The gpio should be set GPIOD_OUT_HIGH. Fixes: 1bfbc260a5b4 ("ASoC: samsung: Add machine driver for Exynos5433 based TM2 board") Signed-off-by: Jaechul Lee Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mark Brown sound/soc/samsung/tm2_wm5110.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e8d93208905a9987c211f97a14a93f2776ab52e7 Author: Jaechul Lee Date: Wed Sep 6 10:04:14 2017 +0900 ASoC: samsung: Use 'samsung-i2s' cpu_dai for dai_links Add specific cpu_dai_name to dai_link because samsung i2s driver registers two dais and components. Selecting one of them clearly is needed more information like cpu_dai_name, of_node. The reason why the dai_links have to use 'samsung-i2s' for cpu_dai is that 'samsung-i2s-sec' doesn't have a capture functionality. Without this code, cpu_dai will be selected the first one of the component_list. For example, if I describe nothing to cpu_dai_name, 'samsung-i2s-sec' might be selected to HiFi Primay. Signed-off-by: Jaechul Lee Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mark Brown sound/soc/samsung/tm2_wm5110.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 22289ddcd87285b3d61cd8b129438ca6abb1aa37 Author: Jaechul Lee Date: Wed Sep 6 10:04:13 2017 +0900 ASoC: samsung: i2s: Use specific name for i2s dais Add specific dais name when components are registered. Component and dai name will follow their parent dev name, if the name isn't described. In case of this driver, each dais will have same name like '11440000.i2s0' by fmt_single_name function. The problem having same name is that TM2 machine driver can't detect capture devices correctly. Machine driver doesn't know which one is proper to use for cpu dai. The driver just selects to use 'samsung-i2c-sec' that doesn't have capture functionality because the component of samsung-i2s-sec is located in the first of the component_list. I add dai name like 'samsung-i2s', 'samsung-i2s-sec' for each dais. The reason why adding dai id to 1 is that it doesn't allow to use particular dai name in case of when I use 0 for dai id. Signed-off-by: Jaechul Lee Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mark Brown sound/soc/samsung/i2s.c | 4 ++++ sound/soc/samsung/i2s.h | 3 +++ 2 files changed, 7 insertions(+) commit 9fda3b428a74339e358d4b0850427fa1ce1b4714 Author: Charles Keepax Date: Mon Sep 4 16:41:50 2017 +0100 ASoC: arizona: Add audio device tree bindings In keeping with the style of the rest of this drivers device tree bindings split the audio device tree bindings into their own document. It should be noted this patch makes no change to the binding itself just moves the documentation into a specific file for the audio binding. For easy of merging a separate patch removes the current documentation from the MFD binding documentation. Signed-off-by: Charles Keepax Acked-by: Rob Herring Signed-off-by: Mark Brown .../devicetree/bindings/sound/wlf,arizona.txt | 49 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 50 insertions(+) commit 0a229b15d99e0a9761f9672f4ff7efeb18ce0ea1 Author: Charles Keepax Date: Mon Sep 4 16:41:49 2017 +0100 ASoC: arizona: Add handling for audio related device tree entries Currently all the audio related device tree entries are handled by the MFD code, for most parts of the Arizona driver we group the device tree handling with the component that uses it and should do so here as well. Add handling in the ASoC code for the audio device tree entries, a later patch removes the MFD side handling but there is no harm in it being duplicated temporarily. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/arizona.c | 136 +++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/arizona.h | 2 + sound/soc/codecs/cs47l24.c | 8 +++ sound/soc/codecs/wm5102.c | 8 +++ sound/soc/codecs/wm5110.c | 8 +++ sound/soc/codecs/wm8997.c | 8 +++ sound/soc/codecs/wm8998.c | 8 +++ 7 files changed, 178 insertions(+) commit 9e3f9f36a6f40bb6ba9b3844d709314121e4c106 Author: Charles Keepax Date: Mon Sep 4 16:41:48 2017 +0100 ASoC: arizona: Add new common Arizona init function Currently the driver has quite a few small initialisation functions, in preparation for some refactoring add a new function arizona_init_common. This will be used bus probe level initialisation that is common across Arizona devices. For now just move the notifier chain initialisation in there. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/arizona.c | 7 ++----- sound/soc/codecs/arizona.h | 3 ++- sound/soc/codecs/cs47l24.c | 3 ++- sound/soc/codecs/wm5102.c | 3 ++- sound/soc/codecs/wm5110.c | 3 ++- sound/soc/codecs/wm8997.c | 4 ++-- sound/soc/codecs/wm8998.c | 3 ++- 7 files changed, 14 insertions(+), 12 deletions(-) commit 53fd40a90f3c0bdad86ec266ee5df833f54ace39 Author: Jani Nikula Date: Tue Sep 12 11:19:26 2017 +0300 drm: handle override and firmware EDID at drm_do_get_edid() level Handle debugfs override edid and firmware edid at the low level to transparently and completely replace the real edid. Previously, we practically only used the modes from the override EDID, and none of the other data, such as audio parameters. This change also prevents actual EDID reads when the EDID is to be overridden, but retains the DDC probe. This is useful if the reason for preferring override EDID are problems with reading the data, or corruption of the data. Move firmware EDID loading from helper to core, as the functionality moves to lower level as well. This will result in a change of module parameter from drm_kms_helper.edid_firmware to drm.edid_firmware, which arguably makes more sense anyway. Some future work remains related to override and firmware EDID validation. Like before, no validation is done for override EDID. The firmware EDID is validated separately in the loader. Some unification and deduplication would be in order, to validate all of them at the drm_do_get_edid() level, like "real" EDIDs. v2: move firmware loading to core v3: rebase, commit message refresh Cc: Abdiel Janulgue Cc: Daniel Vetter Cc: Ville Syrjälä Tested-by: Abdiel Janulgue Reviewed-by: Ville Syrjälä Acked-by: Dave Airlie Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1e8a710bcac46e5136c1a7b430074893c81f364a.1505203831.git.jani.nikula@intel.com Documentation/admin-guide/kernel-parameters.txt | 2 +- drivers/gpu/drm/Kconfig | 2 +- drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_edid.c | 15 +++++++++++++++ drivers/gpu/drm/drm_probe_helper.c | 19 +------------------ 5 files changed, 19 insertions(+), 21 deletions(-) commit e34ffe32f6e7ae9191d14226ff9d8c0c47400a71 Author: Baruch Siach Date: Mon Sep 11 18:14:54 2017 +0300 arm64: dts: marvell: enable AP806 watchdog This watchdog is ARM SBSA generic watchdog. Signed-off-by: Baruch Siach Tested-by: Gregory CLEMENT Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit f814def530c442bd0765db3fa7fd6f5ba4d466ca Author: Takeshi Kihara Date: Thu Sep 14 19:29:21 2017 +0900 pinctrl: sh-pfc: r8a77995: Add USB2.0 host support Signed-off-by: Takeshi Kihara Signed-off-by: Yoshihiro Shimoda Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit c737abc193d16e62e23e2fb585b8b7398ab380d8 Author: allen yan Date: Thu Sep 7 15:04:53 2017 +0200 arm64: dts: marvell: Fix A37xx UART0 register size Armada-37xx UART0 registers are 0x200 bytes wide. Right next to them are the UART1 registers that should not be declared in this node. Update the example in DT bindings document accordingly. Signed-off-by: allen yan Signed-off-by: Miquel Raynal Signed-off-by: Gregory CLEMENT Documentation/devicetree/bindings/serial/mvebu-uart.txt | 2 +- arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c13604d9ddc24dd4e9b65cad2844b2b603391ac8 Author: Gregory CLEMENT Date: Tue Aug 29 15:57:41 2017 +0200 arm64: dts: marvell: armada-3720-db: Add vmmc regulator for SD slot By adding this regulator, a proper reset is done during boot. Without this, the UHS failed to be detected after a warm reboot when the SD card remained in the slot, then it fallback to an HS. Note that the vmcc is supported by the xenon driver only with the following fix: "mmc: sdhci-xenon: add set_power callback". Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-3720-db.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 66abd968d0ef3eb10dea45b48a31321eb29258f8 Author: Yoshihiro Shimoda Date: Thu Sep 14 08:52:42 2017 +0900 pinctrl: sh-pfc: r8a77995: Add EthernetAVB pins, groups and functions Signed-off-by: Yoshihiro Shimoda Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 119 ++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) commit 9e83bbdb6fc3414a46ce92ceafa53f0067bc1f57 Author: Thomas Petazzoni Date: Wed Aug 30 12:16:06 2017 +0200 arm64: dts: marvell: add UART muxing on Armada 7K/8K This commit adds the relevant details in the Armada 7K/8K Device Tree to properly mux the UART used for the serial console. Since there is basically only one possible muxing for the UART0 on the AP, the muxing configuration is described in armada-ap806.dtsi, and selected from the individual boards (other boards could be using a different UART). Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm64/boot/dts/marvell/armada-7040-db.dts | 2 ++ arch/arm64/boot/dts/marvell/armada-8040-db.dts | 2 ++ arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 2 ++ arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 5 +++++ 4 files changed, 11 insertions(+) commit 355b3552d59f471bfaf41cf7c6cc0a6fa193b303 Author: Pierre-Louis Bossart Date: Fri Sep 8 00:13:09 2017 -0500 ASoC: Intel: cht_bsw_max98090: add gpio-based jack detection Jacks are created but only enabled when the external TI chip is present, this probably never worked as well. Forklift the gpio-based code from the legacy byt-max98090 driver, with however a less strict error check. It's fine to let users enjoy their device even if jack detection doesn't work - it almost never does without quirks... Tested on Lenovo100s Signed-off-by: Pierre-Louis Bossart Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_max98090_ti.c | 56 +++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) commit 3bbda5a38601f7675a214be2044e41d7749e6c7b Author: Thierry Escande Date: Fri Sep 8 00:13:08 2017 -0500 ASoC: Intel: cht_bsw_max98090_ti: Fix jack initialization If the ts3a227e audio accessory detection hardware is present and its driver probed, the jack needs to be created before enabling jack detection in the ts3a227e driver. With this patch, the jack is instantiated in the max98090 headset init function if the ts3a227e is present. This fixes a null pointer dereference as the jack detection enabling function in the ts3a driver was called before the jack is created. [minor correction to keep error handling on jack creation the same as before by Pierre Bossart] Signed-off-by: Thierry Escande Signed-off-by: Pierre-Louis Bossart Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_max98090_ti.c | 45 +++++++++++++++++++--------- 1 file changed, 31 insertions(+), 14 deletions(-) commit c809fb1e84d5f3f55c3b84710ae06bc3d5943d18 Author: Pierre-Louis Bossart Date: Fri Sep 8 00:13:06 2017 -0500 ASoC: Intel: atom: use cht_bsw_max98090 for Baytrail Chromebooks Baytrail Chromebooks used to be managed with legacy driver which is not compatible with atom/sst drivers. Reuse CHT driver to handle max98098 codec and allow distributions to support all Atom platforms with the same build. The legacy byt-max98090 can still be used but in a build for Baytrail+max98090 only. Signed-off-by: Pierre-Louis Bossart Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/atom/sst/sst_acpi.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 299bad365b900223cded22a6f66dbb3763da4235 Author: Pierre-Louis Bossart Date: Fri Sep 8 00:13:05 2017 -0500 ASoC: Intel: cht_bsw_max98090: add support for Baytrail Distributions such as Fedora, Ubuntu and Gallium don't currently have a means to support Baytrail Chromebooks and other platforms with the same build [1][2] due to incompatible platform drivers. Add MCLK management to reuse this machine driver for Baytrail platforms and solve this coexistence problem at last. UCM files are provided at [3] and will eventually be submitted to the new repo. The legacy byt-max98090 machine driver is still maintained but can only be used when the other Atom/DPCM driver is not compiled in, or when users don't want to configure extra mixers required by the Atom/sst driver. Tested on Lenovo 100s Baytrail Chromebook w/ Mr. Chromebox BOOT_STUB firmware and Acer R11 Cherrytrail Chromebook [1] https://bugzilla.redhat.com/show_bug.cgi?id=1335196 [2] http://mailman.alsa-project.org/pipermail/alsa-devel/2016-August/ 111641.html [3] https://github.com/plbossart/UCM/tree/master/byt-max98090 Signed-off-by: Pierre-Louis Bossart Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_max98090_ti.c | 78 ++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) commit a10953f5d33b2334c8fb1799084ab49347a59821 Author: Fang, Yang A Date: Fri Sep 8 00:13:07 2017 -0500 ASoC: ts3a227e: add acpi table This patch adds the acpi match table for the ts3a227e audio accessory detection device. This enables headset features like jack plug/unplug notifications, mic presence, and button pressed events. Signed-off-by: Fang, Yang A Signed-off-by: Thierry Escande Signed-off-by: Pierre-Louis Bossart Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/ts3a227e.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 948c5e192eaeef5bd8b479135ea83d1f97d78bb8 Author: Pierre-Louis Bossart Date: Fri Sep 8 00:13:04 2017 -0500 ASoC: Intel: cht_bsw_max98090: Fix I2S config + unused code This driver probably never worked, the slots are configured for 2ch 16 bit and the SSP2 as 24 bits, the cpu_dai configured as LEFT_J and the codec_dai as I2S. Signed-off-by: Pierre-Louis Bossart Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/cht_bsw_max98090_ti.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d10a7d3e2af98e639e74c64185f910915a560f07 Author: Pierre-Louis Bossart Date: Fri Sep 8 00:13:03 2017 -0500 ASoC: max98090: reduce verbosity on PLL unlock 'commit b8a3ee820f7b ("ASoC: max98090: Add recovery for PLL lock failure")' enabled a workaround PLL unlocked issues, but generates annoying dev_info "PLL unlocked" messages at a 10ms rate, usually on startup. Move to dev_info_ratelimited. This issue doesn't seem to impact audio functionality. This trace is commented out in the GalliumOS patches, it's better to keep it to check on potential quality issues Tested on Lenovo 100s (Baytrail Chromebook) Signed-off-by: Pierre-Louis Bossart Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/codecs/max98090.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 758a3b0183a83a4827afc892c417cd6f8d12e189 Author: Nicolin Chen Date: Thu Sep 7 22:27:33 2017 -0700 ASoC: fsl-asoc-card: Don't error out if ENOTSUPP The snd_soc_component_set_sysclk() and snd_soc_dai_set_tdm_slot() in the soc-core.c will return -ENOTSUPP if there is no function implementation for them in the dai and component drivers. So this patch tries to ignore this errno. Signed-off-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/fsl-asoc-card.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 60f5cbae49abef438611a16ae60eff5906486b3f Author: Pierre-Louis Bossart Date: Fri Sep 8 12:43:56 2017 -0500 ASoC: Intel: bytcr_rt5640: simplify MCLK quirk tests remove redundant tests to check MCLK (align with other machine drivers). some checks remain since when the MCLK is disabled we fall back to using the bclk as PLL reference Signed-off-by: Pierre-Louis Bossart Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6356c78c682f3f0614b82bb27c7a5d33c7b0d8be Author: Pierre-Louis Bossart Date: Fri Sep 8 12:43:53 2017 -0500 ASoC: Intel: bytcr-rt5651: fix capture routes There is only one dmic path and the routes were not added. Probably a copy-paste mistake when initially creating the file Signed-off-by: Pierre-Louis Bossart Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5651.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 7735bce05a9c0bb0eb0f08c9002d65843a7c5798 Author: Pierre-Louis Bossart Date: Fri Sep 8 12:43:52 2017 -0500 ASoC: Intel: boards: use devm_clk_get() unconditionally The clock framework was only used in Baytrail, on Cherrytrail the firmware takes care of the MCLK/plt_clk_3. With the fix in 'commit d31fd43c0f9a ("clk: x86: Do not gate clocks enabled by the firmware")' the firmware-managed clocks are not impacted by enable/disable requests make at the driver level, and the rates are identical. Remove all checks for Baytrail and use devm_clk_get() unconditionally. Tested on Asus T100HA (CHT) and Asus T100TAF (BYT) Note that the RT5640 and RT5645 machine drivers need to keep some checks for Valleyview to check for Baytrail-CR. Reviewed-by: Andy Shevchenko Signed-off-by: Pierre-Louis Bossart Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/bytcr_rt5640.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5645.c | 14 ++++++-------- sound/soc/intel/boards/cht_bsw_rt5672.c | 27 ++++++--------------------- 3 files changed, 13 insertions(+), 30 deletions(-) commit 10c1705eced11d6ad710fddcdb57aaa9f85a6f98 Author: Fabrizio Castro Date: Fri Sep 8 09:07:15 2017 +0100 spi: rspi: Add r8a7743/5 to the compatible list Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-rspi.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 7e0dc9aeaea3ed130e090e20e9be0fc4877ddc37 Author: Jeffy Chen Date: Tue Sep 19 20:57:59 2017 +0800 ASoC: rockchip: Use bus_type to distinguish rt5514 dsp from rt5514 codec Currently rt5514 dsp and rt5514 codec are sharing the same compatible. Use bus_type to distinguish rt5514 dsp from rt5514 codec. Signed-off-by: Jeffy Chen Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Signed-off-by: Mark Brown sound/soc/rockchip/rk3399_gru_sound.c | 61 ++++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 12 deletions(-) commit d9f9c167edae999fc0fcbc97188ab29278e24958 Author: Jeffy Chen Date: Tue Sep 19 20:57:58 2017 +0800 ASoC: rockchip: Init dapm routes dynamically Currently we are using a fixed list of dapm routes. Init dapm routes dynamically when parsing dailinks, since we are supporting optional codecs. Signed-off-by: Jeffy Chen Reviewed-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Signed-off-by: Mark Brown sound/soc/rockchip/rk3399_gru_sound.c | 88 ++++++++++++++++++++++++++++------- 1 file changed, 72 insertions(+), 16 deletions(-) commit e9331ee9b164d58b4dd0abc882ba7e23d2f404b3 Merge: e725148 2bd6bf0 Author: Mark Brown Date: Tue Sep 19 14:12:47 2017 +0100 Merge tag 'v4.14-rc1' into asoc-rockchip Linux 4.14-rc1 commit 7a974b29fe5d3704eafec707ba6390c3288c80fe Author: Marek Szyprowski Date: Fri Sep 15 13:05:08 2017 +0200 iommu/exynos: Rework runtime PM links management add_device is a bit more suitable for establishing runtime PM links than the xlate callback. This change also makes it possible to implement proper cleanup - in remove_device callback. Signed-off-by: Marek Szyprowski Signed-off-by: Joerg Roedel drivers/iommu/exynos-iommu.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 32c30f73687a7ea5fe6add62b7bc3b520115d0d9 Author: Franklin Cooper Date: Fri Sep 8 15:46:36 2017 -0500 spi: spi-davinci: Update binding for 66AK2Gx pwr dm property Add pm-domains property which is required for 66AK2Gx. Also document 66AK2G unique clocks property usage. Signed-off-by: Franklin S Cooper Jr Acked-by: Rob Herring Signed-off-by: Mark Brown Documentation/devicetree/bindings/spi/spi-davinci.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 86cb5dee237be6cf6c432299b829a5e85ed35029 Author: Bhumika Goyal Date: Thu Sep 14 00:08:36 2017 +0530 ASoC: Intel: atom: make sst_platform_compr_ops const Make this const as it not modified in the file referencing it. It only stored in the const field 'compr_ops' of a snd_soc_platform_driver structure. Also, add const to the declaration in the header file. Signed-off-by: Bhumika Goyal Signed-off-by: Mark Brown sound/soc/intel/atom/sst-mfld-platform-compress.c | 2 +- sound/soc/intel/atom/sst-mfld-platform.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ae09a4783b9caf9307f303ef039f8297ce0371fe Author: Naveen M Date: Fri Sep 15 13:43:21 2017 +0530 ASoC: Intel: Headset button support in kabylake machine driver Patch adds headset button support for kabylake machine driver (kbl_rt5663_max98927). Signed-off-by: Naveen M Acked-By: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/boards/kbl_rt5663_max98927.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1b8b68b05d1868404316d32e20782b00442aba90 Author: Christophe Jaillet Date: Sat Sep 16 07:40:29 2017 +0200 ASoC: davinci-mcasp: Fix an error handling path in 'davinci_mcasp_probe()' All error handling paths in this function 'goto err' except this one. If one of the 2 previous memory allocations fails, we should go through the existing error handling path. Otherwise there is an unbalanced pm_runtime_enable()/pm_runtime_disable(). Fixes: dd55ff8346a9 ("ASoC: davinci-mcasp: Add set_tdm_slots() support") Signed-off-by: Christophe JAILLET Acked-by: Peter Ujfalusi Signed-off-by: Mark Brown sound/soc/davinci/davinci-mcasp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e7251484f3bc3bd9203a2c39555ca7d53e988cf6 Author: Jeffy Chen Date: Mon Sep 18 19:17:59 2017 +0800 ASoC: rockchip: Add dapm route for HDMI Add dapm route for DP codec. Signed-off-by: Jeffy Chen Signed-off-by: Mark Brown sound/soc/rockchip/rk3399_gru_sound.c | 3 +++ 1 file changed, 3 insertions(+) commit cc9fee8e1a2088e1853a1ba7b9f91d0629da0807 Author: Jeffy Chen Date: Mon Sep 18 19:18:00 2017 +0800 ASoC: rockchip: Add dapm route for DMic Add dapm route for DMIC codec. Signed-off-by: Jeffy Chen Signed-off-by: Mark Brown sound/soc/rockchip/rk3399_gru_sound.c | 1 + 1 file changed, 1 insertion(+) commit b0a7043d5c2ccdd306959f295bf1a62be025cbf5 Author: Nicolin Chen Date: Wed Sep 13 20:07:09 2017 -0700 ASoC: fsl_ssi: Caculate bit clock rate using slot number and width The set_sysclk() now is used to override the output bit clock rate. But this is not a common way to implement a set_dai_sysclk(). And this creates a problem when a general machine driver (simple-card for example) tries to do set_dai_sysclk() by passing an input clock rate for the baud clock instead of setting the bit clock rate as fsl_ssi driver expected. So this patch solves this problem by firstly removing set_sysclk() since the hw_params() can calculate the bit clock rate. Secondly, in order not to break those TDM use cases which previously might have been using set_sysclk() to override the bit clock rate, this patch changes the driver to calculate the bit clock rate using the slot number and the slot width from the via set_tdm_slot(). The patch also removes an obsolete comment of the dir parameter. Signed-off-by: Nicolin Chen Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) commit 81c0ed21aa91230ab6c0de945155aa5c0626d001 Author: Chris Wilson Date: Mon Sep 11 09:41:26 2017 +0100 drm/i915/fence: Avoid del_timer_sync() from inside a timer A fence may be signaled from any context, including from inside a timer. One example is timer_i915_sw_fence_wake() which is used to provide a safety-net when waiting on an external fence. If the external fence is not signaled within a timely fashion, we signal our fence on its behalf, and so we then may process subsequent fences in the chain from within that timer context. Given that dma_i915_sw_fence_wake() may be from inside a timer, we cannot then use del_timer_sync() as that requires the timer lock for itself. To circumvent this, while trying to keep the signal propagation as low latency as possible, move the completion into a worker and use a bit of atomic switheroo to serialise the timer-callback and the dma-callback. Testcase: igt/gem_eio/in-flight-external Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20170911084135.22903-3-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/Kconfig | 1 + drivers/gpu/drm/i915/i915_sw_fence.c | 27 +++++++++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) commit d6604145dfccc3dd9e882dd3d6bd2545c9ff64e9 Author: Jeffy Chen Date: Mon Sep 18 19:14:34 2017 +0800 ASoC: rt5514: Add devicetree binding support for rt5514-spi Add devicetree binding support for rt5514 spi dsp codec. Signed-off-by: Jeffy Chen Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rt5514.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 457c25efc592bb5539e18161c505f7a865013fb7 Author: Oder Chiou Date: Mon Sep 18 18:14:26 2017 +0800 ASoC: rt5663: Add the function of impedance sensing Support the function of impedance sensing. It could be set the matrix row number of the impedance sensing table and the related parameters in the DTS. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown Documentation/devicetree/bindings/sound/rt5663.txt | 16 ++ include/sound/rt5663.h | 3 + sound/soc/codecs/rt5663.c | 218 ++++++++++++++++++++- 3 files changed, 233 insertions(+), 4 deletions(-) commit 0607aa3cd824bddf85fa5174fe4be34af5a429fb Author: Colin Ian King Date: Mon Sep 18 10:48:43 2017 +0100 ASoC: hdmi-codec: use sizeof_field rather than declaring hcp Use FIELD_SIZEOF rather than declaring and initializing hcp. Remove unused variables. Cleans up clang warning: warning: Value stored to 'hcp' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/codecs/hdmi-codec.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 20cf7e3ce3083593e163849ae6ba95525f2366ca Author: Colin Ian King Date: Mon Sep 18 10:26:03 2017 +0100 ASoC: qcom: remove duplicate initializations of dma_ch and v dma_ch is being initialized to zero and then immediately afterwards being updated again, so the first initialization is redundant and can be remove. Likewise, the pointer v is being initialized twice, so remove the second duplicate initialization. Cleans up two clang build warnings: warning: Value stored to 'dma_ch' is never read warning: Value stored to 'v' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/qcom/lpass-platform.c | 2 -- 1 file changed, 2 deletions(-) commit b6145837218cb984245aea5ccd9201aeb5eb0501 Author: Colin Ian King Date: Mon Sep 18 09:56:38 2017 +0100 ASoC: zte: spdif: remove duplicate initialization of dma_data dma_data is being initialized twice, remove the unused first initialization and use the latter one instead. Fixed clang warning: "warning: Value stored to 'dma_data' during its initialization is never read" Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/zte/zx-spdif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 72d7a16bb07582f8416bbcdc65fe2a1e63f11294 Author: Jean Delvare Date: Fri Sep 15 10:27:10 2017 +0200 ASoC: rt5645: Make a few struct const These dmi_system_id structures and associated platform data are never modified so they can be marked const. Signed-off-by: Jean Delvare Cc: Bard Liao Cc: Oder Chiou Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai -- sound/soc/codecs/rt5645.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7e2903cb91df1a8b0a202a7cf5c9e3d2f654bc57 Author: Baolin Wang Date: Fri Sep 15 15:29:16 2017 +0800 spi: Add ADI driver for Spreadtrum platform This patch adds ADI driver based on SPI framework for Spreadtrum SC9860 platform. Signed-off-by: Baolin Wang Signed-off-by: Mark Brown drivers/spi/Kconfig | 6 + drivers/spi/Makefile | 1 + drivers/spi/spi-sprd-adi.c | 419 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 426 insertions(+) commit 2f329595b8db42ceb3de93595a740ac7b24eddba Author: Baolin Wang Date: Fri Sep 15 15:29:15 2017 +0800 spi: Add Spreadtrum ADI controller documentation This patch adds the binding documentation for Spreadtrum ADI controller device. Signed-off-by: Baolin Wang Signed-off-by: Mark Brown .../devicetree/bindings/spi/spi-sprd-adi.txt | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 8c04f65ce833fae3ee6740e15cab3821b1009504 Author: Andreas Färber Date: Sat Jul 29 21:12:46 2017 +0200 arm64: dts: realtek: Clean up RTD1295 UART reg property The downstream RTD1195 and apparently RTD1295 trees have a modified 8250 serial driver that acknowledges its interrupts using the second reg area, which is an irq mux. Drop these unused second reg entries for the UART nodes. Fixes: 72a7786c0a0d ("ARM64: dts: Add Realtek RTD1295 and Zidoo X9S") Signed-off-by: Andreas Färber arch/arm64/boot/dts/realtek/rtd1295.dtsi | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 86f0a075111d16e3b48d79b44858e141ea86cad7 Author: Wolfram Sang Date: Mon Sep 18 20:31:13 2017 +0200 arm64: defconfig: enable thermal driver for Renesas R-Car Gen3 We want this driver to detect critical temperatures in time. Signed-off-by: Wolfram Sang Signed-off-by: Simon Horman arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit ea203404fb2f0b3b4cc24917044f7bd72fef12c7 Author: Geert Uytterhoeven Date: Mon Aug 28 11:26:10 2017 +0200 arm64: dts: draak: Add serial console pins Add pin control for SCIF2. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 9d5018deec86673ef8418546a3ac43e47dbff3b9 Author: Suman Anna Date: Tue Sep 5 17:56:18 2017 -0500 iommu/omap: Add support to program multiple iommus A client user instantiates and attaches to an iommu_domain to program the OMAP IOMMU associated with the domain. The iommus programmed by a client user are bound with the iommu_domain through the user's device archdata. The OMAP IOMMU driver currently supports only one IOMMU per IOMMU domain per user. The OMAP IOMMU driver has been enhanced to support allowing multiple IOMMUs to be programmed by a single client user. This support is being added mainly to handle the DSP subsystems on the DRA7xx SoCs, which have two MMUs within the same subsystem. These MMUs provide translations for a processor core port and an internal EDMA port. This support allows both the MMUs to be programmed together, but with each one retaining it's own internal state objects. The internal EDMA block is managed by the software running on the DSPs, and this design provides on-par functionality with previous generation OMAP DSPs where the EDMA and the DSP core shared the same MMU. The multiple iommus are expected to be provided through a sentinel terminated array of omap_iommu_arch_data objects through the client user's device archdata. The OMAP driver core is enhanced to loop through the array of attached iommus and program them for all common operations. The sentinel-terminated logic is used so as to not change the omap_iommu_arch_data structure. NOTE: 1. The IOMMU group and IOMMU core registration is done only for the DSP processor core MMU even though both MMUs are represented by their own platform device and are probed individually. The IOMMU device linking uses this registered MMU device. The struct iommu_device for the second MMU is not used even though memory for it is allocated. 2. The OMAP IOMMU debugfs code still continues to operate on individual IOMMU objects. Signed-off-by: Suman Anna [t-kristo@ti.com: ported support to 4.13 based kernel] Signed-off-by: Tero Kristo Signed-off-by: Joerg Roedel drivers/iommu/omap-iommu.c | 358 ++++++++++++++++++++++++++++++++++----------- drivers/iommu/omap-iommu.h | 30 ++-- 2 files changed, 285 insertions(+), 103 deletions(-) commit 0d3642883b092ccfc0b044c6581ee2c1f32ab165 Author: Suman Anna Date: Tue Sep 5 17:56:17 2017 -0500 iommu/omap: Change the attach detection logic The OMAP IOMMU driver allows only a single device (eg: a rproc device) to be attached per domain. The current attach detection logic relies on a check for an attached iommu for the respective client device. Change this logic to use the client device pointer instead in preparation for supporting multiple iommu devices to be bound to a single iommu domain, and thereby to a client device. Signed-off-by: Suman Anna Signed-off-by: Joerg Roedel drivers/iommu/omap-iommu.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 7079131ef9b934df48602b22e30282d25a6a4827 Author: Fabrizio Castro Date: Wed Sep 13 18:05:35 2017 +0100 ARM: dts: r8a7745: Add SDHI controllers Add the SDHI controllers to the r8a7745 device tree. Signed-off-by: Fabrizio Castro Signed-off-by: Chris Paterson Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 615beb759ca494a4b1a202f571af41549064dc2f Author: Geert Uytterhoeven Date: Mon Sep 11 15:09:59 2017 +0200 ARM: dts: r8a7794: Add reset control properties Add properties to describe the reset topology for on-SoC devices: - Add the "#reset-cells" property to the CPG/MSSR device node, - Add resets and reset-names properties to the various device nodes. This allows to reset SoC devices using the Reset Controller API. Note that resets usually match the corresponding module clocks. Exceptions are: - The audio module has resets for the Serial Sound Interfaces only, - The display module has only a single reset for all DU channels, but adding reset properties for the display is postponed. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794.dtsi | 64 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit 84fb19e1d201ba862cf25995cdb7c061c9d938ea Author: Geert Uytterhoeven Date: Mon Sep 11 15:09:58 2017 +0200 ARM: dts: r8a7793: Add reset control properties Add properties to describe the reset topology for on-SoC devices: - Add the "#reset-cells" property to the CPG/MSSR device node, - Add resets and reset-names properties to the various device nodes. This allows to reset SoC devices using the Reset Controller API. Note that resets usually match the corresponding module clocks. Exceptions are: - The audio module has resets for the Serial Sound Interfaces only, - The display module has only a single reset for all DU channels, but adding reset properties for the display is postponed. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7793.dtsi | 62 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit 6e11a322f1d7505d3a1db4ae26c6c0e46082f4ae Author: Geert Uytterhoeven Date: Mon Sep 11 15:09:57 2017 +0200 ARM: dts: r8a7792: Add reset control properties Add properties to describe the reset topology for on-SoC devices: - Add the "#reset-cells" property to the CPG/MSSR device node, - Add resets and reset-names properties to the various device nodes. This allows to reset SoC devices using the Reset Controller API. Note that resets usually match the corresponding module clocks. Exceptions are: - The audio module has resets for the Serial Sound Interfaces only, but audio is not yet enabled in r8a7792.dtsi, - The display module has only a single reset for all DU channels, but adding reset properties for the display is postponed. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792.dtsi | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit be5ae56e5f2d1f4eff1c2eca3d8e7d801085a6e2 Author: Geert Uytterhoeven Date: Mon Sep 11 15:09:56 2017 +0200 ARM: dts: r8a7791: Add reset control properties Add properties to describe the reset topology for on-SoC devices: - Add the "#reset-cells" property to the CPG/MSSR device node, - Add resets and reset-names properties to the various device nodes. This allows to reset SoC devices using the Reset Controller API. Note that resets usually match the corresponding module clocks. Exceptions are: - The audio module has resets for the Serial Sound Interfaces only, - The display module has only a single reset for all DU channels, but adding reset properties for the display is postponed. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791.dtsi | 82 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) commit 34fbd2b12761d11166414ca766637c7e6bbb39d7 Author: Geert Uytterhoeven Date: Mon Sep 11 15:09:55 2017 +0200 ARM: dts: r8a7790: Add reset control properties Add properties to describe the reset topology for on-SoC devices: - Add the "#reset-cells" property to the CPG/MSSR device node, - Add resets and reset-names properties to the various device nodes. This allows to reset SoC devices using the Reset Controller API. Note that resets usually match the corresponding module clocks. Exceptions are: - The audio module has resets for the Serial Sound Interfaces only, - The display module has only a single reset for all DU channels, but adding reset properties for the display is postponed. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790.dtsi | 76 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) commit f523405f2a22cc0c30701ea0cb3671dc0abbcda1 Author: Biju Das Date: Wed Sep 6 14:52:06 2017 +0100 ARM: dts: r8a7743: Add IIC cores to dtsi Signed-off-by: Biju Das Signed-off-by: Chris Paterson Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit a2f74d0e655eac78dbbd4ade88ee08b1f8ec7ec1 Author: Wolfram Sang Date: Tue Sep 5 19:26:31 2017 +0200 ARM: dts: alt: use correct logic for SD WP pins The WP pins are ACTIVE_HIGH, fix it in the DTS. Fixes: 2b41091b896b ("ARM: dts: alt: add SDHI0 and 1 support") Signed-off-by: Wolfram Sang Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794-alt.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 51be0086e6d2ebb3f0ddbeedab8d7c4232c1c5f6 Author: Biju Das Date: Wed Aug 30 14:41:13 2017 +0100 ARM: dts: iwg20d-q7: Enable USB PHY Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743-iwg20d-q7.dts | 4 ++++ 1 file changed, 4 insertions(+) commit 35a8eeeac89c56435277fa76f8d557bf00530320 Author: Biju Das Date: Wed Aug 30 14:41:12 2017 +0100 ARM: dts: iwg20d-q7: Enable internal PCI Enable internal AHB-PCI bridges for the USB EHCI/OHCI controllers attached to them. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743-iwg20d-q7.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 96963454655c10663f1bc2eea57ac734cab171a7 Author: Biju Das Date: Wed Aug 30 14:41:11 2017 +0100 ARM: dts: r8a7743: Link PCI USB devices to USB PHY Describe the PCI USB devices that are behind the PCI bridges, adding necessary links to the USB PHY device. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 9412c391af67fc8aa4e2d8975ba6143cd5289296 Author: Biju Das Date: Wed Aug 30 14:41:10 2017 +0100 ARM: dts: r8a7743: Add USB PHY DT support Define the r8a7743 generic part of the USB PHY device node. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 46d9cf5202fd8cd266748779c1a941aaeff0dcad Author: Biju Das Date: Wed Aug 30 14:41:09 2017 +0100 ARM: dts: r8a7743: Add internal PCI bridge nodes Add device nodes for the r8a7743 internal PCI bridge devices. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit d6ee805325b1d082fa33be3024163e5f7931ed54 Author: Biju Das Date: Wed Aug 30 16:17:14 2017 +0100 ARM: dts: iwg22d-sodimm: Add Ethernet AVB support Define the iWave RainboW-G22D board dependent part of the Ethernet AVB device node. On some older versions of the platform (before R4.0) the phy address may be 1 or 3. The address is fixed to 3 for R4.0 onwards (which will be the first mainstream release), hence using 3 in the dts. Signed-off-by: Biju Das Signed-off-by: Chris Paterson Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 67dbb081815e013e1e7911305b43b44537a78ed2 Author: Biju Das Date: Thu Aug 17 16:09:09 2017 +0100 ARM: dts: iwg22d-sodimm: Add pinctl support for scif4 Adding pinctrl support for scif4 interface. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit e0e63658c2f291e0672fdf96df1f9f2963a6a9f6 Author: Biju Das Date: Tue Aug 29 10:56:23 2017 +0100 ARM: dts: iwg20d-q7: Add RTC support Define the iWave RainboW-G20D-Qseven board dependent part of the RTC device node. Signed-off-by: Biju Das Signed-off-by: Chris Paterson Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743-iwg20d-q7.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit f9c1e87e77ca1ef1c4de2d419b0dcb42e4a47043 Author: Biju Das Date: Tue Aug 29 10:56:22 2017 +0100 ARM: dts: iwg20d-q7: Add chosen node Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743-iwg20d-q7.dts | 5 +++++ 1 file changed, 5 insertions(+) commit 372b01369fed699c417789ad94344847e09b7a43 Author: Biju Das Date: Fri Aug 25 09:31:53 2017 +0100 ARM: dts: r8a7745: Add Ethernet AVB support Add Ethernet AVB support for r8a7745 SoC. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit cfce5ac1aaf08fc0920d6572779360f80e8f3489 Author: Jacopo Mondi Date: Thu Aug 24 10:48:43 2017 +0200 ARM: dts: gr-peach: Add user led device nodes Add device nodes for user leds on gr-peach board. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100-gr-peach.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2f8be2d1dadb2b73a1c1ce244c88c509791f5cf2 Author: Jacopo Mondi Date: Thu Aug 24 10:48:41 2017 +0200 ARM: dts: gr-peach: Add SCIF2 pin group Add pin configuration subnode for SCIF2 serial debug interface. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100-gr-peach.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f7c68cdfebf6ad6b3c4d6b6c8966414219d035e3 Author: Jacopo Mondi Date: Thu Aug 24 10:48:40 2017 +0200 ARM: dts: gr-peach: Remove empty line Remove an empty line in gr-peach device tree source file. Signed-off-by: Jacopo Mondi Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r7s72100-gr-peach.dts | 1 - 1 file changed, 1 deletion(-) commit 580aa7cb473880213a55afdb5c34ae844fda07fb Author: Geert Uytterhoeven Date: Wed Aug 23 13:59:26 2017 +0200 ARM: dts: r8a7791: Stop grouping clocks under a "clocks" subnode The current practice is to not group clocks under a "clocks" subnode, but just put them together with the other on-SoC devices. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791.dtsi | 137 ++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 71 deletions(-) commit 362b334b17943d84d2878d2733f0ce695d45a2b6 Author: Geert Uytterhoeven Date: Wed Aug 23 13:59:25 2017 +0200 ARM: dts: r8a7791: Convert to new CPG/MSSR bindings Convert the R-Car M2-W SoC from the old "Renesas R-Car Gen2 Clock Pulse Generator (CPG)", "Renesas CPG DIV6 Clock", and "Renesas CPG Module Stop (MSTP) Clocks" DT bindings to the new unified "Renesas Clock Pulse Generator / Module Standby and Software Reset" DT bindings. This simplifies the DTS files, and allows to add support for reset control later. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7791-koelsch.dts | 4 +- arch/arm/boot/dts/r8a7791-porter.dts | 4 +- arch/arm/boot/dts/r8a7791.dtsi | 557 +++++++--------------------------- 3 files changed, 104 insertions(+), 461 deletions(-) commit a7b8f48d2fa14330a1886f7fd640187c8b4470c5 Author: Fabrizio Castro Date: Tue Aug 22 19:22:46 2017 +0100 ARM: dts: iwg22m: Add RTC support Add support for the bq32000 RTC to the iwg22m device tree. Signed-off-by: Fabrizio Castro Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745-iwg22m.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 3350ed907182049b806992f228021e7997183dda Author: Fabrizio Castro Date: Thu Aug 17 18:31:43 2017 +0100 ARM: dts: iwg22m: Add eMMC support Add eMMC support for iW-RainboW-G22M-SM. Signed-off-by: Fabrizio Castro Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745-iwg22m.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 933b16efb7be16e98a6bcd04ed59c5e91371afef Author: Fabrizio Castro Date: Thu Aug 17 18:31:42 2017 +0100 ARM: dts: r8a7745: Add MMC interface support Add MMC interface support for r8a7745 SoC. Signed-off-by: Fabrizio Castro Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 282fbf4066e58b4c60683ab5cba30c5c998c7250 Author: Fabrizio Castro Date: Tue Aug 22 16:27:02 2017 +0100 ARM: dts: r8a7745: Add I2C DT support Add I2C[0-5] devices to the r8a7745 device tree. Signed-off-by: Fabrizio Castro Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 93 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit a59eb272a4eae10eb4f7a3e7b15aa47d57b32699 Author: Biju Das Date: Tue Aug 15 11:54:20 2017 +0100 ARM: dts: iwg22d-sodimm: Add support for iWave G22D-SODIMM board Add support for iWave RainboW-G22D-SODIMM board based on RZ/G1E. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) commit c9a41f515d1e5955c44cb04926f5f5f4be4a0cd0 Author: Biju Das Date: Tue Aug 15 11:54:19 2017 +0100 ARM: dts: iwg22m: Add iWave RZG1E SODIMM SOM Add support for iWave RZG1E SODIMM System On Module. http://www.iwavesystems.com/rz-g1e-sodimm-module.html Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745-iwg22m.dtsi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 3163c03ec37aef502474122b857452fb948c7596 Author: Biju Das Date: Fri Aug 18 15:56:01 2017 +0100 ARM: dts: r8a7745: Add GPIO support Describe GPIO blocks in the R8A7745 device tree. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7745.dtsi | 105 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) commit 029efb3a03c5039902a6f1cfe266ed664cb97f20 Author: Biju Das Date: Mon Aug 14 12:49:49 2017 +0100 ARM: dts: iwg20d-q7: Add SDHI1 support Define the iWave RainboW-G20D-Qseven board dependent part of the SDHI1 device node. Signed-off-by: Biju Das Acked-by: Wolfram Sang Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743-iwg20d-q7.dts | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit f46f156ea7704a40577800c3df63b599121a87ec Author: Chris Wilson Date: Mon Sep 18 17:46:52 2017 +0100 drm/i915/selftests: Only touch archdata.iommu when it exists archdata.iommu only exists when CONFIG_IOMMU_API is enabled (and only applies to intel-iommu in our case) so conditionally compile it out when it doesn't exist. Fixes: b5891fb520f7 ("drm/i915/selftests: Disable iommu for the mock device") Signed-off-by: Chris Wilson Cc: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20170918164652.14200-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 ++ 1 file changed, 2 insertions(+) commit 641b0ab8029119d777cb248ef20f920d288b322a Author: Dirk Behme Date: Wed Aug 30 10:05:48 2017 +0200 pinctrl: sh-pfc: r8a7795: Re-add DRIF support DRIF support for r8a7795 was initially added with commit 2d775831988 ("pinctrl: sh-pfc: r8a7795: Add DRIF support") and later dropped from the new pfc-r8a7795.c while re-naming the initial pfc-r8a7795.c to pfc-r8a7795-es1.c in commit b205914c8f8 ("pinctrl: sh-pfc: r8a7795: Add support for R-Car H3 ES2.0"). As the DRIF doesn't differ, re-add it here. Signed-off-by: Dirk Behme Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 291 +++++++++++++++++++++++++++++++++++ 1 file changed, 291 insertions(+) commit 9ed139586923becc4741c609304eecad6d5ffe53 Author: Takeshi Kihara Date: Tue Aug 29 17:51:57 2017 +0200 pinctrl: sh-pfc: r8a7795: Add SDHI0-3 support Add SDHI0-3 support for R-Car H3 ES2.0 based on a patch from the Renesas BSP. SDHI pin config is identical to H3 ES1.*. Signed-off-by: Takeshi Kihara Signed-off-by: Dirk Behme Signed-off-by: Wolfram Sang Signed-off-by: Geert Uytterhoeven drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 275 +++++++++++++++++++++++++++++++++++ 1 file changed, 275 insertions(+) commit 8d46e28fb5081b49c5b24c814ad464fb99359d58 Author: Sergei Shtylyov Date: Sat Sep 9 00:34:20 2017 +0300 clk: renesas: cpg-mssr: Add R8A77970 support Add R-Car V3M (R8A77970) Clock Pulse Generator / Module Standby and Software Reset support, using the CPG/MSSR driver core and the common R-Car Gen3 code. Based on the original (and large) patch by Daisuke Matsushita . Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven .../devicetree/bindings/clock/renesas,cpg-mssr.txt | 5 +- drivers/clk/renesas/Kconfig | 5 + drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/r8a77970-cpg-mssr.c | 199 +++++++++++++++++++++ drivers/clk/renesas/renesas-cpg-mssr.c | 6 + drivers/clk/renesas/renesas-cpg-mssr.h | 1 + 6 files changed, 215 insertions(+), 2 deletions(-) commit ecadea00f588d7047572a878072c766c75725d1f Author: Sergei Shtylyov Date: Sat Sep 9 00:34:19 2017 +0300 dt-bindings: clock: Add R8A77970 CPG core clock definitions Add macros usable by the device tree sources to reference the R8A77970 CPG core clocks by index. The data come from the table 8.2c of R-Car Series, 3rd Generation User's Manual: Hardware (Rev. 0.55, Jun. 30, 2017). Based on the original (and large) patch by Daisuke Matsushita . Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven include/dt-bindings/clock/r8a77970-cpg-mssr.h | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 12b136dec281f7503abef269b5272d17635880d8 Author: Colin Ian King Date: Tue Sep 12 12:21:24 2017 +0100 pinctrl: uniphier: make arrays static, reduces object code size Don't populate const arrays on the stack, instead make them static. Makes the object code smaller nearly 1000 bytes. Also line break wide lines to avoid checkpatch warnings. Before: text data bss dec hex filename 13112 1996 0 15108 3b04 pinctrl-uniphier-core.o After: text data bss dec hex filename 11642 2476 0 14118 3726 pinctrl-uniphier-core.o Signed-off-by: Colin Ian King Acked-by: Masahiro Yamada Signed-off-by: Linus Walleij drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 6437c7ba69c30a2d3dfd6aa9e8b464c3c4a8cd43 Author: Hoan Tran Date: Fri Sep 8 15:41:15 2017 -0700 gpio: dwapb: Add wakeup source support This patch supports irq_set_wake for dwapb gpio. It allows GPIOs to be configured as wakeup sources and wake the system from suspend. Signed-off-by: Hoan Tran Signed-off-by: Linus Walleij drivers/gpio/gpio-dwapb.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit a621c99a96e64e3d6d5d47745a5e832262ac8f7c Author: Linus Walleij Date: Tue Sep 12 09:32:34 2017 +0200 gpio: Clarify consumer stubs use-cases After discussion we add a few blurbs to clarify how the stubs in the consumer API are supposed to be used. Cc: Florian Fainelli Cc: Sergei Shtylyov Cc: Andrew Lunn Signed-off-by: Linus Walleij Documentation/gpio/consumer.txt | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit aa5c2a88bb1d1116a4de3046e7adb9e864f1c9e5 Author: Robin Murphy Date: Thu Aug 24 18:24:11 2017 +0100 gpio: xgene-sb: Tidy up fwnode usage Since f94277af03ea ("of/platform: Initialise dev->fwnode appropriately"), of_platform_device_create() already initialises dev->fwnode to that of the appropriate device_node, so within the driver we shouldn't need to care whether we probed via DT or ACPI. Signed-off-by: Robin Murphy Signed-off-by: Linus Walleij drivers/gpio/gpio-xgene-sb.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit be7da1a2b714a387e6ac5e3db21a1760c9969ae0 Author: Sascha Hauer Date: Wed Sep 13 10:18:31 2017 +0200 serial: imx: default to half duplex rs485 The i.MX driver defaulted to full duplex rs485 which is rather unusual and doesn't match the default implemented in other drivers. So change the default to half duplex. Signed-off-by: Sascha Hauer Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/imx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 510c2558b9055f3ae8a405cb18e1cbb7262449fc Author: Rex Zhu Date: Tue Sep 12 13:18:13 2017 +0800 drm/amd/powerplay: fix pcie max lane define error Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e71b7ae6731c1b426818ce4c9baa493fb4d6c427 Author: Rex Zhu Date: Fri Sep 8 14:31:26 2017 +0800 drm/amd/powerplay: fix spelling typo in function name Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.h | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 12 ++++++------ drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c | 11 ----------- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c | 21 +++++---------------- .../gpu/drm/amd/powerplay/smumgr/iceland_smumgr.h | 2 +- .../gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 10 ---------- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.c | 20 ++++---------------- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smc.h | 2 +- 9 files changed, 19 insertions(+), 63 deletions(-) commit 6df9855fe200d4e7e5cdd85575fb28cce808b2cc Author: Rex Zhu Date: Fri Sep 8 14:05:51 2017 +0800 drm/amdgpu: add support for request SI/CI firmware in CGS Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 79 +++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit cd4d74648b8021f0d0c7cc31a92fb4ea436a0019 Author: Rex Zhu Date: Wed Sep 6 18:43:52 2017 +0800 drm/amdgpu: unify the interface of amd_pm_funcs put amd_pm_funcs table in struct powerplay for all asics. Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 120 ++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 236 +++++++++++--------------- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 3 + drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 10 +- drivers/gpu/drm/amd/amdgpu/cik_dpm.h | 3 +- drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 10 +- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 10 +- drivers/gpu/drm/amd/amdgpu/si_dpm.h | 1 + 9 files changed, 161 insertions(+), 237 deletions(-) commit f93f0c3a7e8635a507b3f084f5f8b48441c79c9d Author: Rex Zhu Date: Wed Sep 6 16:08:03 2017 +0800 drm/amd/powerplay: use struct amd_pm_funcs in powerplay Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/amd_shared.h | 15 +++++++ drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 50 +++++++++++----------- .../drm/amd/powerplay/hwmgr/cz_clockpowergating.c | 8 +--- .../drm/amd/powerplay/hwmgr/cz_clockpowergating.h | 4 +- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 4 +- .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 18 -------- drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 4 +- .../amd/powerplay/hwmgr/smu7_clockpowergating.c | 6 +-- .../amd/powerplay/hwmgr/smu7_clockpowergating.h | 4 +- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 20 ++++----- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 28 ++++++------ drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 43 +------------------ .../gpu/drm/amd/powerplay/inc/hardwaremanager.h | 2 - drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 12 +++--- 14 files changed, 80 insertions(+), 138 deletions(-) commit cfa289fd4986c504b0396cce167802dfcf4943d0 Author: Rex Zhu Date: Wed Sep 6 15:27:59 2017 +0800 drm/amdgpu: rename amdgpu_dpm_funcs to amd_pm_funcs renamed amdgpu_dpm_funcs and moved to amd_shared.h so can shared with powerplay. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 47 +--------- drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 100 ++++++++++++++-------- drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 53 ++++++++---- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 69 +++++++++------ drivers/gpu/drm/amd/include/amd_shared.h | 51 +++++++++++ drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 6 -- 7 files changed, 201 insertions(+), 129 deletions(-) commit 698f88e697cc8852558d120fdecfdb38c18c2ff7 Author: Rex Zhu Date: Mon Sep 4 18:22:02 2017 +0800 drm/amd/powerplay: delete dead code in powerplay delete functiontable related codes Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 3 +- .../gpu/drm/amd/powerplay/hwmgr/functiontables.c | 161 --------------------- .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 93 +++--------- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 12 -- drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 3 - drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 6 - drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 3 - drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 49 ------- 9 files changed, 22 insertions(+), 310 deletions(-) commit cf2623d951c1c52923a776e01cf2e2afc9d042a0 Author: Rex Zhu Date: Mon Sep 4 18:11:52 2017 +0800 drm/amd/powerplay: refine powerplay code for RV use function points instand of function table. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 137 ++++++------------------- 1 file changed, 33 insertions(+), 104 deletions(-) commit 06d31a69ca4a069d4ad79be570eb0ccbd8d65db5 Author: Rex Zhu Date: Mon Sep 4 17:51:28 2017 +0800 drm/amd/powerplay: refine powerplay code for CZ/ST 1. add function points instand of creat function tables 2. implement stop dpm tasks for CZ/ST Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher .../drm/amd/powerplay/hwmgr/cz_clockpowergating.c | 30 -- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 377 +++++++++------------ 2 files changed, 159 insertions(+), 248 deletions(-) commit 1ab4720441ed6a918c06c4ddf882ef8bc50c8ef0 Author: Rex Zhu Date: Mon Sep 4 16:25:48 2017 +0800 drm/amd/powerplay: refine code for thermal control in powerplay add function point start_thermal_controller in hwmgr, delete thermal function table and related functions Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 6 +- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 1 + drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 4 +- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 146 +++------------------ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.h | 5 +- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 +- .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 137 +++---------------- .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.h | 13 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 3 +- drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 6 +- drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 6 +- 11 files changed, 55 insertions(+), 274 deletions(-) commit 97bae49c44454549e7e22ef02020decafa099f04 Author: Tom St Denis Date: Thu Sep 14 08:57:26 2017 -0400 drm/amd/amdgpu: Support VM environments in amdgpu_ttm_access_memory() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e88206465578c4a7b9ebf2a69d040c0dc0fbc920 Author: Arnd Bergmann Date: Fri Sep 15 22:06:58 2017 +0200 drm/radeon: properly initialize r600_audio_status() data The structure returned from r600_audio_status() is only partially initialized, and older gcc versions (4.3 and 4.4) warn about this: drivers/gpu/drm/radeon/r600_hdmi.c: In function 'r600_audio_status': drivers/gpu/drm/radeon/r600_hdmi.c:108: error: 'status.id' is used uninitialized in this function drivers/gpu/drm/radeon/r600_hdmi.c:108: error: 'status.connected' is used uninitialized in this function drivers/gpu/drm/radeon/r600_hdmi.c:108: error: 'status.offset' is used uninitialized in this function This is harmless and surprisingly correct in C99, as the caller only accesses the fields that got initialized, so newer compilers don't warn about it, but initializing the entire structure feels like the right thing to do here and avoids the warning. Reviewed-by: Christian König Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/r600_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf661ec1ff146183a6f8da1f1d41c1e3c4afe8bd Author: Alex Deucher Date: Fri Sep 15 17:36:19 2017 -0400 drm/amdgpu/psp: declare raven psp firmware So it gets picked up properly by the kernel. Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 2 ++ 1 file changed, 2 insertions(+) commit 01bb12e49b85ee99fa8445cbbc450092cd34afc9 Author: Colin Ian King Date: Thu Sep 14 19:54:18 2017 +0100 ata: pata_artop: remove redundant initialization of pio pio is initialized and the data is never read, instead it is almost immediately being updated to a new value. Fix this by removing the initialization. Detected by scan-build: "warning: Value stored to 'pio' during its initialization is never read" Fixes: 669a5db411d8 ("[libata] Add a bunch of PATA drivers") Signed-off-by: Colin Ian King Signed-off-by: Tejun Heo drivers/ata/pata_artop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4ac6476945ff62939420bcf8266e39f8d5d54bd Author: Hans de Goede Date: Thu Sep 14 12:35:36 2017 +0200 libata: Add new med_power_with_dipm link_power_management_policy setting As described by Matthew Garret quite a while back: https://mjg59.dreamwidth.org/34868.html Intel CPUs starting with the Haswell generation need SATA links to power down for the "package" part of the CPU to reach low power-states like PC7 / P8 which bring a significant power-saving with them. The default max_performance lpm policy does not allow for these high PC states, both the medium_power and min_power policies do allow this. The min_power policy saves significantly more power, but there are some reports of some disks / SSDs not liking min_power leading to system crashes and in some cases even data corruption has been reported. Matthew has found a document documenting the default settings of Intel's IRST Windows driver with which most laptops ship: https://www-ssl.intel.com/content/dam/doc/reference-guide/sata-devices-implementation-recommendations.pdf Matthew wrote a patch changing med_power to match those defaults, but that never got anywhere as some people where reporting issues with the patch-set that patch was a part of. This commit is another attempt to make the default IRST driver settings available under Linux, but instead of changing medium_power and potentially introducing regressions, this commit adds a new med_power_with_dipm setting which is identical to the existing medium_power accept that it enables dipm on top, which makes it match the Windows IRST driver settings, which should hopefully be safe to use on most devices. The med_power_with_dipm setting is close to min_power, except that: a) It does not use host-initiated slumber mode (ASP not set), but it does allow device-initiated slumber b) It does not enable DevSlp mode On my T440s test laptop I get the following power savings when idle: medium_power 0.9W med_power_with_dipm 1.2W min_power 1.2W Suggested-by: Matthew Garrett Cc: Matthew Garrett Signed-off-by: Hans de Goede Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 1 + drivers/ata/libata-eh.c | 10 +++++----- drivers/ata/libata-scsi.c | 9 +++++---- include/linux/libata.h | 1 + 4 files changed, 12 insertions(+), 9 deletions(-) commit 3c75f6ee139d464351f8ab77a042dd3635769d98 Author: Eric Dumazet Date: Mon Sep 18 12:36:22 2017 -0700 net_sched: sch_htb: add per class overlimits counter HTB qdisc overlimits counter is properly increased, but we have no per class counter, meaning it is difficult to diagnose HTB problems. This patch adds this counter, visible in "tc -s class show dev eth0", with current iproute2. Signed-off-by: Eric Dumazet Reported-by: Denys Fedoryshchenko Signed-off-by: David S. Miller net/sched/sch_htb.c | 5 +++++ 1 file changed, 5 insertions(+) commit 7e5dd53f6ee81ffa0d1f42f79e6440b6a751ab40 Author: Colin Ian King Date: Mon Sep 18 12:40:38 2017 +0100 net_sched: use explicit size of struct tcmsg, remove need to declare tcm Pointer tcm is being initialized and is never read, it is only being used to determine the size of struct tcmsg. Clean this up by removing variable tcm and explicitly using the sizeof struct tcmsg rather than *tcm. Cleans up clang warning: warning: Value stored to 'tcm' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: David S. Miller net/sched/sch_api.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 21d0556cc879013d843dc7ef1ec2634148338b3d Merge: ca44407 da1d2de Author: David S. Miller Date: Mon Sep 18 16:50:07 2017 -0700 Merge branch 'korina-performance-fixes-and-cleanup' Roman Yeryomin says: ==================== korina: performance fixes and cleanup Changes from v1: - use GRO instead of increasing ring size - use NAPI_POLL_WEIGHT instead of defining own NAPI_WEIGHT - optimize rx descriptor flags processing ==================== Signed-off-by: David S. Miller commit da1d2def654dc5a9cae346a93f25bd2e8959b080 Author: Roman Yeryomin Date: Sun Sep 17 20:25:21 2017 +0300 net: korina: bump version Signed-off-by: Roman Yeryomin Signed-off-by: David S. Miller drivers/net/ethernet/korina.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 87736fc6f75f23ae2583ee197a0e85515f246ba6 Author: Roman Yeryomin Date: Sun Sep 17 20:25:11 2017 +0300 net: korina: update authors Signed-off-by: Roman Yeryomin Signed-off-by: David S. Miller drivers/net/ethernet/korina.c | 2 ++ 1 file changed, 2 insertions(+) commit 2e5396b14db3c885c5b9de698ecf38652a0f3c15 Author: Roman Yeryomin Date: Sun Sep 17 20:25:02 2017 +0300 net: korina: whitespace cleanup Signed-off-by: Roman Yeryomin Signed-off-by: David S. Miller drivers/net/ethernet/korina.c | 58 +++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 27 deletions(-) commit 247c78f2bed0c4d72c381c9caf429173513dcc51 Author: Roman Yeryomin Date: Sun Sep 17 20:24:50 2017 +0300 net: korina: use GRO Performance gain when receiving locally is 55->95Mbps and 50->65Mbps for NAT. Signed-off-by: Roman Yeryomin Signed-off-by: David S. Miller drivers/net/ethernet/korina.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d609d2893c25a3336422d06e1aff50d13ba5b7f2 Author: Roman Yeryomin Date: Sun Sep 17 20:24:38 2017 +0300 net: korina: use NAPI_POLL_WEIGHT Signed-off-by: Roman Yeryomin Signed-off-by: David S. Miller drivers/net/ethernet/korina.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 364a97f5d1ae3102d53a3ad1efea3fa546781f78 Author: Roman Yeryomin Date: Sun Sep 17 20:24:26 2017 +0300 net: korina: optimize rx descriptor flags processing Signed-off-by: Roman Yeryomin Signed-off-by: David S. Miller drivers/net/ethernet/korina.c | 87 ++++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 43 deletions(-) commit 7ce103b4cbb20babf19b881e28228b7fd40ce0b3 Author: Roman Yeryomin Date: Sun Sep 17 20:24:15 2017 +0300 net: korina: don't use overflow and underflow interrupts When such interrupts occur there is not much we can do. Dropping the whole ring doesn't help and only produces high packet loss. If we just ignore the interrupt the mac will drop one or few packets instead of the whole ring. Also this will lower the irq handling load and increase performance. Signed-off-by: Roman Yeryomin Signed-off-by: David S. Miller drivers/net/ethernet/korina.c | 83 +------------------------------------------ 1 file changed, 1 insertion(+), 82 deletions(-) commit ca444073a2de97809d63e613d01203f4f4644cfb Author: Sudip Mukherjee Date: Sun Sep 17 12:46:20 2017 +0100 hamradio: baycom: use new parport device model Modify baycom driver to use the new parallel port device model. Signed-off-by: Sudip Mukherjee Acked-By: Thomas Sailer Signed-off-by: David S. Miller drivers/net/hamradio/baycom_epp.c | 50 +++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) commit 4cc6feb715c223d59c8cad0dc71bce1a574a2c67 Author: Rodrigo Vivi Date: Fri Sep 8 16:45:33 2017 -0700 drm/i915/cnp: Don't touch other PCH clock gating bits. Don't touch other bits. My bad. I haven't seen any case where those other bits appeard to be set before we touch it, but it is safe to avoid touching other bits we weren't told to touch. Fixes: 0a46ddd57c9e ("drm/i915/cnp: Wa 1181: Fix Backlight issue") Cc: Dhinakaran Pandiyan Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170908234534.17986-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2df9d6730215db85f7306f0bda03b7391e392837 Author: Valentin Longchamp Date: Fri Sep 15 07:58:47 2017 +0200 net/ethernet/freescale: fix warning for ucc_geth uf_info.regs is resource_size_t i.e. phys_addr_t that can be either u32 or u64 according to CONFIG_PHYS_ADDR_T_64BIT. The printk format is thus adaptet to u64 and the regs value cast to u64 to take both u32 and u64 into account. Signed-off-by: Valentin Longchamp Signed-off-by: David S. Miller drivers/net/ethernet/freescale/ucc_geth.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7598b3498bfdad49d2b19bf0cba829922a9689a9 Author: Zhu Yanjun Date: Thu Sep 14 23:01:51 2017 -0400 forcedeth: replace pci_map_single with dma_map_single functions pci_map_single functions are obsolete. So replace them with dma_map_single functions. Signed-off-by: Zhu Yanjun Signed-off-by: David S. Miller drivers/net/ethernet/nvidia/forcedeth.c | 70 +++++++++++++++++---------------- 1 file changed, 36 insertions(+), 34 deletions(-) commit 5416953fc932f19453edb29244924ead7553f034 Merge: f231c41 e878c5e Author: David S. Miller Date: Mon Sep 18 14:41:38 2017 -0700 Merge branch 's390-qeth-next' Julian Wiedmann says: ==================== s390/qeth: updates 2017-09-18 first batch of patches for 4.15. One larger item in there is Hans' addition of new configuration options for flexible packet processing ('VNIC characteristics'). The patch descriptions have all the details. Please apply. ==================== Signed-off-by: David S. Miller commit e878c5e6003edae23512fe43d3c050622e5ebcf5 Author: Jens Remus Date: Mon Sep 18 21:18:22 2017 +0200 s390/qeth: tidy up parameter naming for qeth_do_send_packet() Cppcheck reports the following for drivers/s390/net/qeth_core.h: warning - line 1560 - Function 'qeth_do_send_packet' argument order different: declaration 'card, queue, skb, hdr, hd_len, offset, elements' definition 'card, queue, skb, hdr, offset, hd_len, elements_needed'. Match the naming in the function's declaration against its definition. Signed-off-by: Jens Remus Reviewed-by: Julian Wiedmann Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d7aa9d0bb923d55aa65a6e18428b384038c6523e Author: Julian Wiedmann Date: Mon Sep 18 21:18:21 2017 +0200 s390/qeth: fold VLAN handling into l3_rebuild_skb() Move the overly complicated VLAN processing from the L3 RX handler into its l3_rebuild_skb() helper. No change in functionality. Signed-off-by: Julian Wiedmann Reviewed-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_l3_main.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 2aa4867198c22ecfae1c12f0c96c4c25fea01cb5 Author: Julian Wiedmann Date: Mon Sep 18 21:18:20 2017 +0200 s390/qeth: translate SETVLAN/DELVLAN errors Properly return any error encountered during VLAN processing to the the caller. Resulting change in behaviour: if SETVLAN fails while registering a new VLAN ID, the stack no longer creates the corresponding vlan device. Signed-off-by: Julian Wiedmann Reviewed-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core_mpc.h | 1 + drivers/s390/net/qeth_l2_main.c | 47 ++++++++++++++++++++++++++++++---------- 2 files changed, 36 insertions(+), 12 deletions(-) commit ab25a5014eddb4da94b7acf0d214265964c5fd21 Author: Julian Wiedmann Date: Mon Sep 18 21:18:19 2017 +0200 s390/qeth: simplify L3 sysfs group management Use the right helpers to create/remove all attribute groups in one go. Suggested-by: Hans Wippel Signed-off-by: Julian Wiedmann Reviewed-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_l3_sys.c | 45 +++++++++++------------------------------- 1 file changed, 12 insertions(+), 33 deletions(-) commit 7c2e9ba373264b29a35d6df06cc5fb125d189b90 Author: Julian Wiedmann Date: Mon Sep 18 21:18:18 2017 +0200 s390/qeth: don't take queue lock in send_packet_fast() Locking the output queue prior to TX is needed on OSA devices, to synchronize against a packing flush from the TX completion code (via qeth_check_outbound_queue()). But send_packet_fast() is only used for IQDs, which don't do packing. So remove the locking, and apply some easy cleanups. Signed-off-by: Julian Wiedmann Reviewed-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 3 +-- drivers/s390/net/qeth_core_main.c | 22 +++++----------------- drivers/s390/net/qeth_l2_main.c | 2 +- drivers/s390/net/qeth_l3_main.c | 4 ++-- 4 files changed, 9 insertions(+), 22 deletions(-) commit 9627923062b6a5c40964b188bb222ec8c02fd2d6 Author: Julian Wiedmann Date: Mon Sep 18 21:18:17 2017 +0200 s390/qeth: remove unused code in qdio_establish_cq() Storing the number of input buffers into 'i' has no effect, it is immediately re-assigned in the next line. Signed-off-by: Julian Wiedmann Reviewed-by: Ursula Braun Signed-off-by: David S. Miller drivers/s390/net/qeth_core_main.c | 1 - 1 file changed, 1 deletion(-) commit 349d13d5ab58668ab7c8fadadf292430170c919e Author: Hans Wippel Date: Mon Sep 18 21:18:16 2017 +0200 s390/qeth: add VNICC get/set timeout support HiperSockets allow configuring so called VNIC Characteristics (VNICC) that influence how the underlying hardware handles packets. For VNICCs, additional commands for getting and setting timeouts are available. Currently, the learning VNICC uses these commands. * Learning VNICC: If learning is enabled on a qeth device, the device learns the source MAC addresses of outgoing packets and incoming packets to those learned MAC addresses are received. For learning, the timeout specifies the idle period in seconds, after which the underlying hardware removes a learned MAC address again. This patch adds support for the IPA commands that are required to get and set the current timeout values for the learning VNIC characteristic. Also, it introduces the sysfs interface that allows users to configure the timeout. Signed-off-by: Hans Wippel Reviewed-by: Julian Wiedmann Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 3 + drivers/s390/net/qeth_core_mpc.h | 11 ++++ drivers/s390/net/qeth_l2.h | 2 + drivers/s390/net/qeth_l2_main.c | 135 +++++++++++++++++++++++++++++++++++++-- drivers/s390/net/qeth_l2_sys.c | 44 +++++++++++++ 5 files changed, 190 insertions(+), 5 deletions(-) commit caa1f0b10d18f31c5491f84cb2e68a5d2047f437 Author: Hans Wippel Date: Mon Sep 18 21:18:15 2017 +0200 s390/qeth: add VNICC enable/disable support HiperSocket devices allow enabling and disabling so called VNIC Characteristics (VNICC) that influence how the underlying hardware handles packets. These VNICCs are: * Flooding VNICC: Flooding allows specifying if packets to unknown destination MAC addresses are received by the qeth device. * Multicast flooding VNICC: Multicast flooding allows specifying if packets to multicast MAC addresses are received by the qeth device. * Learning VNICC: If learning is enabled on a qeth device, the device learns the source MAC addresses of outgoing packets and incoming packets to those learned MAC addresses are received. * Takeover setvmac VNICC: If takeover setvmac is configured on a qeth device, the MAC address of this device can be configured on a different qeth device with the setvmac IPA command. * Takeover by learning VNICC: If takeover learning is enabled on a qeth device, the MAC address of this device can be learned (learning VNICC) on a different qeth device. * BridgePort invisible VNICC: If BridgePort invisible is enabled on a qeth device, (1) packets from this device are not sent to a BridgePort enabled qeth device and (2) packets coming from a BridgePort enabled qeth device are not received by this device. * Receive broadcast VNICC: Receive broadcast allows configuring if a qeth device receives packets with the broadcast destination MAC address. This patch adds support for the IPA commands that are required to enable and disable these VNIC characteristics on qeth devices. As a prerequisite, it also adds the query commands IPA command. The query commands IPA command allows requesting the supported commands for each characteristic from the underlying hardware. Additionally, this patch provides users with a sysfs user interface to enable/disable the VNICCs mentioned above. Signed-off-by: Hans Wippel Reviewed-by: Julian Wiedmann Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 6 ++ drivers/s390/net/qeth_core_mpc.h | 31 ++++++ drivers/s390/net/qeth_l2.h | 4 + drivers/s390/net/qeth_l2_main.c | 207 +++++++++++++++++++++++++++++++++++++++ drivers/s390/net/qeth_l2_sys.c | 158 +++++++++++++++++++++++++++--- 5 files changed, 392 insertions(+), 14 deletions(-) commit a45b3faf16f0cbc4ec48f9ec81e550d430199212 Author: Hans Wippel Date: Mon Sep 18 21:18:14 2017 +0200 s390/qeth: add basic VNICC support VNIC Characteristics (VNICC) are features of HiperSockets that define how packets are handled by the underlying network hardware. For example, if the VNICC flooding is configured on a qeth device, ethernet frames to unknown destination MAC addresses are received. Currently, there is support for seven VNICCs: flooding, multicast flooding, receive broadcast, learning, takeover learning, takeover setvmac, bridge invisible. Also, six IPA commands exist for configuring VNICCs on a qeth device: query characteristics, query commands, enable characteristic, disable characteristic, set timeout, get timeout. This patch adds the basic code infrastructure for VNICC support to qeth. It allows querying VNICC support from the underlying hardware. To this end, it adds: * basic message formats for IPA commands * basic data structures * basic error handling * query characteristics IPA command support The query characteristics IPA command allows requesting the currently supported and currently enabled VNIC characteristics from the underlying hardware. Support for the other IPA commands and for the configuration of VNICCs is added in follow-up patches together with the respective user interface functions. Signed-off-by: Hans Wippel Reviewed-by: Julian Wiedmann Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller drivers/s390/net/qeth_core.h | 7 ++ drivers/s390/net/qeth_core_mpc.c | 4 +- drivers/s390/net/qeth_core_mpc.h | 29 +++++++++ drivers/s390/net/qeth_l2_main.c | 136 ++++++++++++++++++++++++++++++++++++++- 4 files changed, 172 insertions(+), 4 deletions(-) commit 0bf4b3fadb5663959605d584410412dce53406cc Author: Fabrizio Castro Date: Mon Sep 11 09:30:23 2017 +0100 of: add vendor prefix for Silicon Storage Technology Inc. Add Silicon Storage Technology Inc. to the list of devicetree vendor prefixes. Signed-off-by: Fabrizio Castro Reviewed-by: Andreas Färber Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 716f1c8992ebbb321c5ad1ff6823a9e9074007e8 Author: YuanCheng Cheng Date: Sat Sep 9 19:40:58 2017 +0800 dt-bindings: vendor-prefixes: Add nutsboard NutsBoard (http://nutsboard.org/) is an organization and focus on ARM based embedded boards with open source software. Signed-off-by: YuanCheng Cheng Reviewed-by: Fabio Estevam Reviewed-by: Andreas Färber Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 0e1bfb72b076b07dc844bf33c19d62a3075f540f Author: Geert Uytterhoeven Date: Wed Aug 30 11:57:31 2017 +0200 v4l: vsp1: Use generic node name Use the preferred generic node name in the example. Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring Documentation/devicetree/bindings/media/renesas,vsp1.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da83ef85f5356b4bdf534add20fb34dcc6b53fc1 Author: Radhakrishna Sripada Date: Thu Sep 14 11:16:41 2017 -0700 drm/i915: Do not enable DRRS when PSR is enabled Some platforms do not support PSR and DRRS simultaneously. Visual artifacts and flickering were reported on BDW HP Spectre x360 Convertible. Deferring to PSR when both PSR and DRRS are supported by the panel. V2: Minor code-style changes suggested by Rodrigo V3: Add a WARN_ON during PSR init suggested by Dhinakaran Correct debug message,title suggested by Jani Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101111 Cc: Nicholas Stommel Cc: Dhinakaran Pandiyan Cc: Jani Nikula Cc: Clinton Taylor Cc: Rodrigo Vivi Signed-off-by: Radhakrishna Sripada Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20170914181641.24393-1-radhakrishna.sripada@intel.com drivers/gpu/drm/i915/intel_dp.c | 10 +++++----- drivers/gpu/drm/i915/intel_psr.c | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) commit 9600c2340ded841076367cc78fdd2b65e1cf8ed8 Author: Florian Fainelli Date: Thu Jun 15 13:39:51 2017 -0700 dt-bindings: ARM: brcmstb: Update Broadcom STB Power Management binding Update the Broadcom STB Power Management binding document with new compatible strings for the DDR PHY and memory controller found on newer chips. Acked-by: Rob Herring Signed-off-by: Florian Fainelli Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 2f330caff5776239abb3e0337533886dbb21f6df Author: Markus Mayer Date: Thu Aug 24 16:36:26 2017 -0700 memory: brcmstb: Add driver for DPFE This driver allows access to DRAM properties, such as the refresh rate, via the Broadcom STB DDR PHY Front End (DPFE). The refresh rate can be used as indirect indicator of the DRAM temperature. The driver also allows setting of the sampling interval. Signed-off-by: Markus Mayer Signed-off-by: Florian Fainelli MAINTAINERS | 8 + drivers/memory/Makefile | 1 + drivers/memory/brcmstb_dpfe.c | 701 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 710 insertions(+) commit 367f15d3130e0d6c6818a4ace2463914e8c78e2c Author: Markus Mayer Date: Thu Aug 24 16:36:25 2017 -0700 dt-bindings: Add bindings for Broadcom STB DRAM Sensors Provide bindings for the Broadcom STB DDR PHY Front End (DPFE). Signed-off-by: Markus Mayer Acked-by: Rob Herring Signed-off-by: Florian Fainelli .../bindings/memory-controllers/brcm,dpfe-cpu.txt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 22ea4f3528efaa0523d1643264372d0bdfbd49bd Author: Lionel Landwerlin Date: Mon Sep 18 12:21:24 2017 +0100 drm/i915/perf: add support for Coffeelake GT2 Add the test configuration & timestamp frequency for Coffeelake GT2. Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20170918112124.29541-3-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_oa_cflgt2.c | 109 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_oa_cflgt2.h | 34 +++++++++++ drivers/gpu/drm/i915/i915_perf.c | 5 ++ 5 files changed, 152 insertions(+), 1 deletion(-) commit 342a2c840ed0cb99509e99e082b1f8aa784b5e59 Author: Lionel Landwerlin Date: Mon Sep 18 12:21:23 2017 +0100 drm/i915/perf: disable clk ratio reports on gen9 We're doing this on all Gen9 based platforms, let's just check the gen rather than listing every single platforms. Signed-off-by: Lionel Landwerlin Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20170918112124.29541-2-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/i915_perf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f231c4178a655b09c1fe4dce4b09de7b867c20af Author: Yoshihiro Shimoda Date: Thu Sep 14 09:06:38 2017 +0900 dt-bindings: net: renesas-ravb: Add support for R8A77995 RAVB Add a new compatible string for the R8A77995 (R-Car D3) RAVB. Signed-off-by: Yoshihiro Shimoda Acked-by: Geert Uytterhoeven Acked-by: Sergei Shtylyov Acked-by: Simon Horman Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/renesas,ravb.txt | 1 + 1 file changed, 1 insertion(+) commit 7016e0627171878810798a842a416dddee4e3329 Author: Joe Perches Date: Wed Sep 13 13:58:15 2017 -0700 net: Convert int functions to bool Global function ipv6_rcv_saddr_equal and static functions ipv6_rcv_saddr_equal and ipv4_rcv_saddr_equal currently return int. bool is slightly more descriptive for these functions so change their return type from int to bool. Signed-off-by: Joe Perches Signed-off-by: David S. Miller include/net/addrconf.h | 4 ++-- net/ipv4/inet_connection_sock.c | 36 ++++++++++++++++++------------------ 2 files changed, 20 insertions(+), 20 deletions(-) commit 785ec87483d1e24a012ecf642ee7d07c4118f142 Author: Sergei Shtylyov Date: Tue Sep 12 23:02:08 2017 +0300 ravb: document R8A77970 bindings R-Car V3M (R8A77970) SoC also has the R-Car gen3 compatible EtherAVB device, so document the SoC specific bindings. Signed-off-by: Sergei Shtylyov Acked-by: Simon Horman Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller Documentation/devicetree/bindings/net/renesas,ravb.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 227c23b5dee1c8cf8147a47b275af3e367a352b1 Author: Brian Kim Date: Tue Sep 12 13:57:54 2017 +0200 ARM: dts: exynos: Add power button for Odroid XU3/4 The power button (SW2) on Odroid XU3/4 is connected to the PWRON pin of the S2MPS11 PMIC. The S2MPS11 datasheet says that ONOB pin operates as 'PWRON key active low signal'. In fact, S2MPS11 PMIC acts as a 16ms debouce filter and signal inverter, thus effectively repeating PWRON (active high) to ONOB pin (active low). ONOB PMIC pin is then connected to XEINT3 SoC pin, so we get the state of the power button on the gpx0-3 GPIO. This patch adds device-tree bindings for the power button of Odroid XU3/4 boards. Signed-off-by: Brian Kim [mszyprow: extended commit message, added comments and fixed minor issues in the dts] Signed-off-by: Marek Szyprowski Reviewed-by: Anand Moon Tested-by: Anand Moon Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 513588dd44b09bb5fdd5066a4fbc1e7443b86d1c Author: Jassi Brar Date: Tue Sep 12 18:54:36 2017 +0900 net: phy: realtek: add RTL8201F phy-id and functions Add RTL8201F phy-id and the related functions to the driver. The original patch is as follows: https://patchwork.kernel.org/patch/2538341/ Signed-off-by: Jongsung Kim Signed-off-by: Jassi Brar Signed-off-by: Kunihiko Hayashi Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/realtek.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 013955a6556766a76f9f2cc31e740fc6db6ecff4 Author: Kunihiko Hayashi Date: Tue Sep 12 18:54:35 2017 +0900 net: phy: realtek: rename RTL8211F_PAGE_SELECT to RTL821x_PAGE_SELECT This renames the definition of page select register from RTL8211F_PAGE_SELECT to RTL821x_PAGE_SELECT to use it across models. Signed-off-by: Kunihiko Hayashi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/realtek.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit ab076b94c6a3cfc4e5651d559750220543394871 Author: Zhang Shengju Date: Tue Sep 12 09:32:45 2017 +0800 dummy: declare dummy devices as enumerated devices Dummy device name is enumerated by the kernel, let user space be aware of the naming scheme used by dummy devices: (visible in /sys/class/net//name_assign_type). Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller drivers/net/dummy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3934788a7b4df71f8bd7a2a1f1c0480f06a2076e Author: Joe Perches Date: Sun Sep 10 19:02:25 2017 -0700 net: tcp_input: Neaten DBGUNDO Move the #ifdef into the static void function so that the use of DBGUNDO is validated when FASTRETRANS_DEBUG <= 1. Remove the now unnecessary #else and #define DBGUNDO. Signed-off-by: Joe Perches Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1b58f1947a2fc0520932a6173f63a63befa7fc87 Author: Hoegeun Kwon Date: Mon Sep 18 11:54:24 2017 +0900 ARM: dts: exynos: Remove the display-timing and delay from Rinato The display-timing and delay are included in the panel driver so they should be removed from dts. Signed-off-by: Hoegeun Kwon Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos3250-rinato.dts | 22 ---------------------- 1 file changed, 22 deletions(-) commit 376349232a93645624426db782cafe688054e6d6 Author: Eugeniy Paltsev Date: Thu Sep 14 17:28:42 2017 +0300 ARC: reset: introduce AXS10x reset driver ARC AXS10x boards support custom IP-block which allows to control reset signals of selected peripherals. For example DW GMAC, etc... This block is controlled via memory-mapped register (AKA CREG) which represents up-to 32 reset lines. This regiter is self-clearing so we don't need to deassert line after reset. As of today only the following lines are used: - DW GMAC - line 5 Signed-off-by: Eugeniy Paltsev Signed-off-by: Philipp Zabel .../bindings/reset/snps,axs10x-reset.txt | 33 +++++++++ MAINTAINERS | 6 ++ drivers/reset/Kconfig | 6 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-axs10x.c | 83 ++++++++++++++++++++++ 5 files changed, 129 insertions(+) commit af2f927676aa4e7635101350c0d1b17eb770a8d1 Author: Sascha Hauer Date: Wed Sep 13 10:18:30 2017 +0200 serial: omap-serial: Use common rs485 device tree parsing function We just got a common helper for parsing the rs485 specific device tree properties. Use it and drop the open coded parser. Signed-off-by: Sascha Hauer Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/omap-serial.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit dde18d53d72d06c30a925ca73986f711102b064e Author: Sascha Hauer Date: Wed Sep 13 10:18:29 2017 +0200 serial: fsl_lpuart: Use common rs485 device tree parsing function We just got a common helper for parsing the rs485 specific device tree properties. Use it and drop the open coded parser. As a side effect this adds support for parsing rs485-rts-delay and rs485-rx-during-tx. As the driver doesn't support this though, probing fails if these are defined. Signed-off-by: Sascha Hauer Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 79d9e95a05c13647ccc68c5115b0ff6d21e53ab4 Author: Sascha Hauer Date: Wed Sep 13 10:18:28 2017 +0200 serial: atmel: Use common rs485 device tree parsing function We just got a common helper for parsing the rs485 specific device tree properties. Use it and drop the open coded parser. Note that there is a small difference between the removed and the now used implementation: The former cleared flags to 0 if rs485-rts-delay was given, the common helper clears SER_RS485_RX_DURING_TX and SER_RS485_ENABLED only but always which makes more sense. Signed-off-by: Sascha Hauer [ukleinek: point out semantic change in commit log] Acked-by: Nicolas Ferre Acked-by: Richard Genoud Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/atmel_serial.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) commit ef838a81dd4de1e08454406812e42d7b9b417c4d Author: Uwe Kleine-König Date: Wed Sep 13 10:18:27 2017 +0200 serial: Add common rs485 device tree parsing function Several drivers have the same device tree parsing code. Create a common helper function for it. This patch bases on work done by Sascha Hauer. Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/serial_core.c | 36 ++++++++++++++++++++++++++++++++++++ include/linux/serial_core.h | 5 +++++ 2 files changed, 41 insertions(+) commit c45e2d2547cb2ba0ee8391d8cb2fd2f7cdc016f5 Author: Fabio Estevam Date: Mon Sep 18 08:33:28 2017 -0300 serial: fsl_lpuart: Remove unused 'bd' variable Since commit a6d7514b14a6 ("tty: serial: lpuart: add a more accurate baud rate calculation method") the baud rate is now calculated inside the lpuart32_serial_setbrg() function, so we no longer need to read the UARTBAUD register inside lpuart32_set_termios(). The 'bd' variable can be simply removed. This fixes the following build warning with W=1: drivers/tty/serial/fsl_lpuart.c: In function 'lpuart32_set_termios': drivers/tty/serial/fsl_lpuart.c:1652:32: warning: variable 'bd' set but not used [-Wunused-but-set-variable] Fixes: a6d7514b14a6 ("tty: serial: lpuart: add a more accurate baud rate calculation method") Signed-off-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/fsl_lpuart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 556c27806071d61e2b2e6da7c0a77b1efa4cd832 Author: Christophe JAILLET Date: Sun Sep 17 21:10:14 2017 +0200 tty: synclink: Reuse an existing error handling path In order to avoid code duplication and to be more consistent with the other error handling paths in this function, we should 'goto errout'. Signed-off-by: Christophe JAILLET Signed-off-by: Greg Kroah-Hartman drivers/tty/synclink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f0a8d84fa1140a1c10bfcf0fb73664a85551512e Author: Thomas Meyer Date: Sat Sep 16 10:03:05 2017 +0200 vt: Use bsearch library function in is_double_width Use bsearch library function instead of duplicated functionality. Signed-off-by: Thomas Meyer Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) commit a9be92706edbebde6c50dac7e8e0d3f20ef151aa Author: Bhumika Goyal Date: Thu Sep 14 01:34:58 2017 +0530 tty: serial: make sport_uart_ops static and const Make this const as it is only stored in the const field 'ops' of an uart_port structure. It is not referenced in any other file and therefore make it static too. Done using Coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/bfin_sport_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1926e5d37bf8488e9b129abfdfab4c49598c9ee9 Author: Antonio Borneo Date: Fri Sep 8 08:59:42 2017 +0200 ttyport: trivial fix for some typo in comments Fix some minor typo spotted in comments: - s/wit ha/with a/ - s/doestroyed/destroyed/ Signed-off-by: Antonio Borneo Signed-off-by: Greg Kroah-Hartman drivers/tty/tty_port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b86ac225037900963b1203344e5d129f5af6bbd2 Author: Yixun Lan Date: Wed Sep 6 21:52:39 2017 +0800 serial: meson: add Magic SysRq support This dirver try to implement the Magic SysRq support[1] for Amlogic Inc's meson platfo >From the hardware perspective, the UART IP can't detect the 'BREAK' command clearly via the status register. Instead, we rely on the combination of 'FRAME_ERR bit && ch == 0', and it works fine. [1] Documentation/admin-guide/sysrq.rst Signed-off-by: Yixun Lan Signed-off-by: Greg Kroah-Hartman drivers/tty/serial/meson_uart.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit b5891fb520f742ce48b097c6b8a0b2db1e2bb979 Author: Chris Wilson Date: Thu Sep 14 17:22:40 2017 +0100 drm/i915/selftests: Disable iommu for the mock device On some machines, the iommu cannot allocate a domain for the mock device causing the dma_map_sg() to fail, and the selftest to fail with -ENOMEM. For the mock selftests, we are using a fake device and do not care about iommu; so convince intel_iommu to treat us as a dummy device with an identity mapping (and no iommu domain). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101080 Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170914162240.18310-1-chris@chris-wilson.co.uk Tested-by: Elizabeth De La Torre Mena Reviewed-by: Matthew Auld Date: Tue Sep 5 20:25:25 2017 +0000 staging: lustre: ptlrpc: kfree used instead of kvfree rq_reqbuf is allocated using kvmalloc() but released in one occasion using kfree() instead of kvfree(). The issue was found using grep based on a similar bug. Fixes: d7e09d0397e8 ("add Lustre file system client support") Fixes: ee0ec1946ec2 ("lustre: ptlrpc: Replace uses of OBD_{ALLOC,FREE}_LARGE") Cc: Peng Tao Cc: Oleg Drokin Cc: James Simmons Signed-off-by: Nadav Amit Signed-off-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lustre/ptlrpc/sec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1298d51c44fddcb609ea6c9fa37b76028593963b Author: Zhi Wang Date: Mon Sep 18 21:36:34 2017 +0800 drm/i915: Return the correct score in i915_ppat_get() The cache attribute of the required entry has to be the same with the existing value. After this requirement is met, the futher comparison should be performed. After this fix, the refined test case can pass. v2: - Refine the tittle and comments. (Rodrigo) Fixes: 4395890a4855 ("drm/i915: Introduce private PAT management") Cc: Chris Wilson Cc: Ben Widawsky Cc: Rodrigo Vivi Cc: Joonas Lahtinen Signed-off-by: Zhi Wang Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/1505741794-10593-1-git-send-email-zhi.a.wang@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e701c67c30e65cc887b1ebdd6ef91010f0ca46fa Author: Masahiro Yamada Date: Mon Sep 11 11:00:14 2017 +0200 nvmem: remove unneeded IS_ENABLED(CONFIG_NVMEM) conditional As you see in drivers/nvmem/Makefile, this C file is compiled only when CONFIG_NVMEM is y or m. So, IS_ENABLED(CONFIG_NVMEM) is always evaluated to 1 in this file. Signed-off-by: Masahiro Yamada Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7c04f16d76e795f52a8fdbf11d351346fe7032c Author: Masahiro Yamada Date: Mon Sep 11 11:00:13 2017 +0200 nvmem: remove inline in drivers/nvmem/core.c These two functions are defined in .c file, but called just once (at least for now). So, the compiler will fold them into their callers even without the "inline" markers. However, this kind of optimization should not be done by hand. It is compiler's judge after all. Signed-off-by: Masahiro Yamada Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman drivers/nvmem/core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 621c51be8ed17b2d56847a09aa651087ca1d218a Author: Bhumika Goyal Date: Thu Sep 14 19:34:15 2017 +0530 ALSA: oxygen: Xonar DG(X): make model_xonar_dg const Make this const as it not modified anywhere. It is only used during a copy operation. Also, add const to the declaration in header. Signed-off-by: Bhumika Goyal Acked-by: Clemens Ladisch Signed-off-by: Takashi Iwai sound/pci/oxygen/xonar_dg.h | 2 +- sound/pci/oxygen/xonar_dg_mixer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ee427e259567bc9ba817ddfa5abaf7033f5603e9 Author: Lionel Landwerlin Date: Mon Sep 18 12:42:41 2017 +0100 uapi/drm/i915: document field usage of drm_i915_perf_oa_config Document the expected length of buffers config pointers (tuple of u32 values). Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170918114241.30105-1-lionel.g.landwerlin@intel.com include/uapi/drm/i915_drm.h | 5 +++++ 1 file changed, 5 insertions(+) commit c4fd43793bdecb986bfc80e00c8792556c3f1c7f Author: Dan Carpenter Date: Thu Sep 14 02:01:16 2017 +0300 ALSA: hwdep: prevent a harmless shift wrapping bug The "info.index" variable represents a bit in hw->dsp_loaded which is an unsigned int. If it's higher than 31 we hit a shift wrapping bug. This seems harmless, but I wanted to silence the static checker warning. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai sound/core/hwdep.c | 2 ++ 1 file changed, 2 insertions(+) commit a3750a6422a7112740fe69a596bcd5eb62577aed Author: Masahiro Yamada Date: Wed Sep 13 11:05:51 2017 +0900 mtd: nand: denali: support two row address cycle devices The register TWO_ROW_ADDR_CYCLES specifies the number of row address cycles of the device, but it is fixed to 0 in the driver init code (i.e. always 3 row address cycles). Reflect the result of nand_scan_ident() to the register setting in order to support 2 row address cycle devices. Signed-off-by: Masahiro Yamada Signed-off-by: Boris Brezillon drivers/mtd/nand/denali.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 14157f861437ebe2d624b0a845b91bbdf8ca9a2d Author: Masahiro Yamada Date: Wed Sep 13 11:05:50 2017 +0900 mtd: nand: introduce NAND_ROW_ADDR_3 flag Several drivers check ->chipsize to see if the third row address cycle is needed. Instead of embedding magic sizes such as 32MB, 128MB in drivers, introduce a new flag NAND_ROW_ADDR_3 for clean-up. Since nand_scan_ident() knows well about the device, it can handle this properly. The flag is set if the row address bit width is greater than 16. Delete comments such as "One more address cycle for ..." because intention is now clear enough from the code. Signed-off-by: Masahiro Yamada Acked-by: Wenyou Yang Signed-off-by: Boris Brezillon drivers/mtd/nand/atmel/nand-controller.c | 3 +-- drivers/mtd/nand/au1550nd.c | 3 +-- drivers/mtd/nand/diskonchip.c | 3 +-- drivers/mtd/nand/hisi504_nand.c | 3 +-- drivers/mtd/nand/mxc_nand.c | 3 +-- drivers/mtd/nand/nand_base.c | 9 +++++---- drivers/mtd/nand/nuc900_nand.c | 2 +- include/linux/mtd/rawnand.h | 3 +++ 8 files changed, 14 insertions(+), 15 deletions(-) commit 882fd1577cbe7812ae3a48988180c5f0fda475ca Author: Miquel Raynal Date: Sat Aug 26 17:19:15 2017 +0200 mtd: nand: Use standard large page OOB layout when using NAND_ECC_NONE Use the core's large page OOB layout functions when not reserving any space for ECC bytes in the OOB layout. Fix ->nand_ooblayout_ecc_lp() to return -ERANGE instead of a zero length in this case. Signed-off-by: Miquel Raynal Signed-off-by: Boris Brezillon drivers/mtd/nand/nand_base.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit c896f85a7c15ab9d040ffac8b8003e47996602a2 Author: Martin Kepplinger Date: Wed Sep 13 21:14:19 2017 +0200 perf tools: Fix leaking rec_argv in error cases Let's free the allocated rec_argv in case we return early, in order to avoid leaking memory. This adds free() at a few very similar places across the tree where it was missing. Signed-off-by: Martin Kepplinger Cc: Alexander Shishkin Cc: Martin kepplinger Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170913191419.29806-1-martink@posteo.de Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-c2c.c | 1 + tools/perf/builtin-mem.c | 1 + tools/perf/builtin-timechart.c | 4 +++- tools/perf/builtin-trace.c | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) commit 333b566559019b146905c623bde7f455c1d5add3 Author: Andi Kleen Date: Wed Sep 13 14:50:06 2017 -0700 perf pmu: Improve error messages for missing PMUs When a PMU is missing print a better error message mentioning the missing PMU. % mkdir empty % mount --bind empty /sys/devices/msr % perf stat -M Summary true event syntax error: '{inst_retired.any,cycles}:W,{cpu_clk_unhalted.thread}:W,{inst_retired.any}:W,{cpu_clk_unhalted.ref_tsc,msr/tsc/}:W,{fp_comp_ops_exe.sse_scalar..' \___ Cannot find PMU `msr'. Missing kernel support? It still cannot find the right column for aliases, but it's already a vast improvement. v2: Check asprintf Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170913215006.32222-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/metricgroup.c | 2 +- tools/perf/util/parse-events.c | 18 ++++++++++++------ tools/perf/util/parse-events.h | 3 +++ 3 files changed, 16 insertions(+), 7 deletions(-) commit 75e45e432052c7b1a5da866cff88192db8be1445 Author: Arnaldo Carvalho de Melo Date: Thu Sep 14 16:16:34 2017 -0300 perf machine: Optimize a bit the machine__findnew_thread() methods In some cases we already have calculated the hash bucket, so reuse it. Cc: Adrian Hunter Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa Cc: Kan Liang Cc: Lukasz Odzioba Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-800zehjsyy03er4s4jf0e99v@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/machine.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 91e467bc568f15da2eac688e131010601e889184 Author: Kan Liang Date: Sun Sep 10 19:23:14 2017 -0700 perf machine: Use hashtable for machine threads To process any events, it needs to find the thread in the machine first. The machine maintains a rb tree to store all threads. The rb tree is protected by a rw lock. It is not a problem for current perf which serially processing events. However, it will have scalability performance issue to process events in parallel, especially on a heavy load system which have many threads. Introduce a hashtable to divide the big rb tree into many samll rb tree for threads. The index is thread id % hashtable size. It can reduce the lock contention. Committer notes: Renamed some variables and function names to reduce semantic confusion: 'struct threads' pointers: thread -> threads threads hastable index: tid -> hash_bucket struct threads *machine__thread() -> machine__threads() Cast tid to (unsigned int) to handle -1 in machine__threads() (Kan Liang) Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Lukasz Odzioba Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1505096603-215017-2-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-trace.c | 19 ++++--- tools/perf/util/machine.c | 136 +++++++++++++++++++++++++++----------------- tools/perf/util/machine.h | 23 ++++++-- tools/perf/util/rb_resort.h | 5 +- 4 files changed, 117 insertions(+), 66 deletions(-) commit 38502ef49f96f7fe25fcb3aaa904a570df955c2c Author: Colin Ian King Date: Tue Sep 12 12:38:35 2017 +0100 usb: storage: make const arrays static, reduces object code size Don't populate const arrays on the stack, instead make them static. Makes the object code smaller by over 1070 bytes: Before: text data bss dec hex filename 3505 880 0 4385 1121 drivers/usb/storage/option_ms.o After: text data bss dec hex filename 2269 1040 0 3309 ced drivers/usb/storage/option_ms.o Signed-off-by: Colin Ian King Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/storage/option_ms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d586255ca647ba8f5d7f0210d1516f942e5b43b Author: Colin Ian King Date: Sat Sep 16 17:46:28 2017 +0100 staging: fbtft: remove redundant initialization of txbuf16 txbuf16 is being initialized at declaration time and then later set to another value without it being read inbetween, hence making the initialization redundant. Fix this by setting txbuf16 just the once. Also clean up some incorrect indentations. Cleans up clang build warning: warning: Value stored to 'txbuf16' during its initialization is never read Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/fbtft/fb_ra8875.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c5bf8914024ed00b8121ac64a61d49d3cc13d64c Author: Colin Ian King Date: Sat Sep 16 17:32:51 2017 +0100 staging: ccree: remove unused and redundant variable idx Variable idx is being set but never read and thus it can be removed because it is redundant. Cleans up clang build warnings: warning: Value stored to 'idx' during its initialization is never read warning: Value stored to 'idx' is never read warning: Value stored to 'idx' is never read Signed-off-by: Colin Ian King Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 3 --- 1 file changed, 3 deletions(-) commit cc346b6a100527916c86d55e6f2f24ac72b1ca1f Author: Castulo J. Martinez Date: Fri Sep 15 17:16:54 2017 -0700 staging: speakup: Remove unnecessary parentheses Remove unnecessary parentheses from if statements to make the code easier to read. Issue found by checkpatch. Signed-off-by: Castulo J. Martinez Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/buffers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b677f4ecf6ac46ac810b663f40ee78a5adef8f6a Author: Valentine Sinitsyn Date: Thu Sep 14 18:34:20 2017 -0700 staging: rtl8188eu: Fix spelling rtl8188eu contains some spelling errors in comment lines as well as in constants. Harmless as they are, they still make the code feel a bit unclean, which is not something we want in the kernel. Improve this by fixing typos so they won't catch eyes of future driver developers anymore. Signed-off-by: Wolfgang Hartmann Signed-off-by: Manish Shrestha Signed-off-by: Valentine Sinitsyn Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_efuse.c | 2 +- drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +- drivers/staging/rtl8188eu/hal/odm_HWConfig.c | 4 ++-- drivers/staging/rtl8188eu/include/odm.h | 2 +- drivers/staging/rtl8188eu/include/rtl8188e_spec.h | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) commit a529a1c9db931a5d4fd6683199d73a8363bc7e83 Author: Michał Winiarski Date: Mon Sep 18 11:25:35 2017 +0200 drm/i915/guc: Cleanup adding GuC work items We can just operate on the wq_tail directly (in the process descriptor). This allows us to remove the duplicated tail from the client. While I'm here let's also remove the constants kept in the client and document our locking requirements. This causes a small change in one of GuC debugfs files. We're no longer reporting constant values (which I don't think is a problem), but we're also no longer reporting the tail (does anyone care?). v2: Update tail after wqi contents. (Chris) v3: Really update tail after wqi contents. Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: Oscar Mateo Signed-off-by: Michał Winiarski Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170918092536.12287-1-michal.winiarski@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_debugfs.c | 2 -- drivers/gpu/drm/i915/i915_guc_submission.c | 37 +++++++++++++----------------- drivers/gpu/drm/i915/intel_uc.h | 4 ---- 3 files changed, 16 insertions(+), 27 deletions(-) commit 59db36cf4d67b74f5b8cb001493847464240d136 Author: Michał Winiarski Date: Thu Sep 14 12:51:23 2017 +0200 drm/i915/guc: Simplify GuC doorbell logic All we're really doing is incrementing a simple counter in a doorbell_info struct. We can do without extra variables and a separate counter kept in guc_client. Since it's gone, we're also removing its debugfs. The only functional change here, is that we're no longer treating 0 as a special value. GuC doesn't seem to care, why should we? v2: Restore desc->tail update. v3: Drop the retry loop, assert that doorbell cookie doesn't change behind our back. v4: WARN rather than BUG, use xchg. (Chris) Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: Oscar Mateo Suggested-by: Chris Wilson Signed-off-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20170914105125.3031-1-michal.winiarski@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_debugfs.c | 4 +- drivers/gpu/drm/i915/i915_guc_submission.c | 60 +++++++----------------------- drivers/gpu/drm/i915/intel_uc.h | 1 - 3 files changed, 15 insertions(+), 50 deletions(-) commit 85e2fe679e053326191f92b923f22a834f82cb53 Author: Michał Winiarski Date: Thu Sep 14 10:32:13 2017 +0200 drm/i915/guc: Submit GuC workitems containing coalesced requests To create an upper bound on number of GuC workitems, we need to change the way that requests are being submitted. Rather than submitting each request as an individual workitem, we can do coalescing in a similar way we're handlig execlist submission ports. We also need to stop pretending that we're doing "lite-restore" in GuC submission (we would create a workitem each time we hit this condition). This allows us to completely remove the reservation, replacing it with a compile time check. v2: Also coalesce when replaying on reset (Daniele) v3: Consistent wq_resv - per-request (Daniele) v4: Squash removing wq_resv v5: Reflect i915_guc_submit argument changes in doc v6: Rebase on top of execlists reset/restart fix (Chris,Michał) References: https://bugs.freedesktop.org/show_bug.cgi?id=101873 Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Cc: Jeff McGee Cc: Michal Wajdeczko Cc: Oscar Mateo Signed-off-by: Michał Winiarski Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170914083216.10192-2-michal.winiarski@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_debugfs.c | 2 - drivers/gpu/drm/i915/i915_guc_submission.c | 182 ++++++++++------------------- drivers/gpu/drm/i915/intel_lrc.c | 25 +--- drivers/gpu/drm/i915/intel_uc.h | 11 -- 4 files changed, 63 insertions(+), 157 deletions(-) commit 008987e5fa8d8a10a1120867fcecd0f574d5c471 Author: Greg Kroah-Hartman Date: Mon Sep 18 12:15:09 2017 +0200 staging: rtl8192u: remove unneeded SN_LESS macro It's already in a .h file, don't redefine it as the compiler doesn't like it if it does not match identically. Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 1 - 1 file changed, 1 deletion(-) commit 4c87b3e58d0204d31eb00c76f323ecffd1960a91 Author: Harsha Sharma Date: Fri Sep 8 23:21:25 2017 +0530 staging: typec: tcpm: Rewrite comparison to NULL pointer Make code more concise and readable Signed-off-by: Harsha Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/usb/typec/tcpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 234cc12904e3dd5192c7a7ec533e4d64159cb22a Author: Aastha Gupta Date: Sat Sep 16 16:30:54 2017 +0530 staging: rtl819u: move '{' to next line Fixes checkpatch.pl error: ERROR: open brace '{' following function declarations go on the next line Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 213caebc19fffa7ccbc904512f254777e5f860f3 Author: Aastha Gupta Date: Sat Sep 16 16:30:53 2017 +0530 staging: rtl8192u: remove space before semicolon Fixex checkpatch.pl warning: WARNING: space prohibited before semicolon Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b742793a80ffbec745f31060a0d7b5f9bef5f474 Author: Aastha Gupta Date: Sat Sep 16 16:30:52 2017 +0530 staging: rtl8192u: add space after ',' Fixes 'space required after ','', reported by checkpatch.pl Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2019eed679cc29b9819438957dc6315871ae0441 Author: Aastha Gupta Date: Sat Sep 16 16:30:51 2017 +0530 staging: rtl8192u: remove space function pointer arguments Fixes checkpatch.pl warning: WARNING: Unnecessary space before function pointer arguments Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 448c16cb146138596dcd16911a5749b4e5c84854 Author: Aastha Gupta Date: Sat Sep 16 16:30:50 2017 +0530 staging: rtl8192u: fix '{' following enum go on the same line Fixes checkpatch.pl error: ERROR: open brace '{' following enum go on the same line Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 65d96ef922e7287400489ab9c3ffdeecd6b2c5c9 Author: Aastha Gupta Date: Sat Sep 16 16:30:49 2017 +0530 staging: rtl8192u:add space before '(' and '{' Fixes checkpatch.pl errors: ERROR: space required before the open parenthesis '(' ERROR: space required before the open brace '{' Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8d14d9b771fcee2ee05152ef68f4b9c325ba25ba Author: Aastha Gupta Date: Sat Sep 16 16:30:48 2017 +0530 staging: rtl8192u: add spaces after struct/enum definitions Fixes checkpatch.pl warnings: WARNING: missing space after enum definition WARNING: missing space after struct definition Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 88717504ad69ad90992fbbf7d075b5b9be8d95f7 Author: Aastha Gupta Date: Sat Sep 16 16:30:47 2017 +0530 staging: rtl8192u: remove space before ')' Fixes checkpatch.pl error: ERROR: space prohibited before that close parenthesis ')' Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2de9311b9669b0e078e8979e19370eef21d3c579 Author: Aastha Gupta Date: Sat Sep 16 16:30:46 2017 +0530 staging: rtl8192u: remove space after '(' ERROR: space prohibited after the open parenthesis '(' Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91c50f0b3d4a42a2393681cf7c096709b416eecb Author: Aastha Gupta Date: Sat Sep 16 16:30:45 2017 +0530 staging: rtl8192u: add space after '}' This patch fixes checkpatch.pl error: ERROR: space required after that close brace '}' Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 18e748814926b3f0518d9797094cfbab94237c13 Author: Aastha Gupta Date: Sat Sep 16 16:30:44 2017 +0530 staging: rtl8192u: fix spaces around algebric and binary operators Fixes prefer spaces around '+', '_', '?', '&', '==', '!=', '|', '&&', '=' as reported by checkpatch.pl. Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8192u/ieee80211/ieee80211.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 0fb8997bac3d0b4643436e5adf20176d62c6137c Author: Haneen Mohammed Date: Tue Sep 12 22:32:25 2017 -0600 staging: wlan-ng: Replace pr_debug with netdev_dbg This patch replace pr_debug with netdev_dbg when appropriate net_device structure is found. Issue found using the following Coccinelle script: @r exists@ identifier f, s, i; position p; @@ f(...,struct s *i,...) { <+... when != i == NULL ( pr_err@p(...); | pr_info@p(...); | pr_debug@p(...); ) ...+> } @rr@ identifier r.s, fld; @@ struct s { ... struct net_device *fld; ... }; @@ identifier r.i, r.s, rr.fld; position r.p; @@ ( -pr_err@p +netdev_err ( + i->fld, ...) | -pr_info@p +netdev_info ( + i->fld, ...) | -pr_debug@p +netdev_dbg ( + i->fld, ...) ) Signed-off-by: Haneen Mohammed Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2mgmt.c | 78 ++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 31 deletions(-) commit 45ec5bc8774b1a03213de072f240bad01c7ff09d Author: Michał Winiarski Date: Thu Sep 14 10:32:12 2017 +0200 drm/i915/guc: Remove obsolete comments and remove unused variable Originally removed in: c1adab970348 ("drm/i915/guc: Remove failed doorbell stat from debugfs") f1448a62a103 ("drm/i915/guc: Remove last submission result from debugfs") Were accidentally restored in: 925344ccc91d ("BackMerge tag 'v4.12-rc5' into drm-next") We can also remove unused variable and replace it with a WARN. Cc: Chris Wilson Cc: Michal Wajdeczko Signed-off-by: Michał Winiarski Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170914083216.10192-1-michal.winiarski@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_guc_submission.c | 3 +-- drivers/gpu/drm/i915/intel_uc.h | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) commit 221ab9719bf33ad2984928d2afb20988d652a289 Author: Chris Wilson Date: Sat Sep 16 21:44:14 2017 +0100 drm/i915/execlists: Unwind incomplete requests on resets Given the mechanism to unwind and replay requests (designed to support preemption), we have an alternative to the current method of resubmitting the ELSP upon reset. Resubmitting ELSP turns out to be more complicated than expected, due to having to handle lost context-switch interrupts and so guessing what ELSP we need to resubmit later. Instead, by unwinding the requests and clearing the ELSP tracking entirely, we can then just dequeue the first pair of ready requests after resetting, using the normal submission procedure. Currently, the unwound requests have maximum priority and so are guaranteed to be resubmitted upon resume. If we are lucky, we may be able to coalesce a new request on top! Suggested-by: Michał Winiarski Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20170916204414.32762-4-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/intel_lrc.c | 61 +++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 35 deletions(-) commit 27606fd87895c3b45072a796caead8055a2f4b94 Author: Chris Wilson Date: Sat Sep 16 21:44:13 2017 +0100 drm/i915/execlists: Split insert_request() In the next patch we will want to reinsert a request not at the end of the priority queue, but at the front. Here we split insert_request() into two, the first function retrieves the priority list (for reuse for unsubmit later) and a wrapper function to insert at the end of that list and to schedule the tasklet if we were first. Signed-off-by: Chris Wilson Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20170916204414.32762-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit e2614ef1b2ecb3f9f1e17762b01c2b29dbc344aa Author: Meghana Madhyastha Date: Fri Sep 15 12:34:30 2017 +0530 Staging: pi433: Merge assignment with return value Removes the unnecessary assignment of retval preceding the return statement. Detected using the following Coccinelle script: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Meghana Madhyastha Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/rf69.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0d27c94abbc073234474baf5eecc05da5423961a Author: Keerthi Reddy Date: Wed Sep 13 22:42:34 2017 +0530 staging: Android: follow coding guidlines - Add a new line after struct declaration - remove extra new line. Signed-off-by: Keerthi Reddy Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/android/ion/ion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb879fa3e33cc205220016b95b81214875e7aecb Author: Aastha Gupta Date: Thu Sep 14 17:38:50 2017 +0530 staging: xgifb: fix multiple line dereference This patch fixes the checkpatch.pl warning: WARNING: Avoid multiple line dereference - prefer'XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag' Signed-off-by: Aastha Gupta Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/vb_setmode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit aabdabad35d3c01f977084221afe09cab5dfa8af Author: Srishti Sharma Date: Thu Sep 14 18:18:13 2017 +0530 Staging: ccree: Use kcalloc instead of kzalloc Use kcalloc instead of kzalloc to check for overflow before multiplication. Done using the following semantic patch by coccinelle. http://coccinelle.lip6.fr/rules/kzalloc.cocci Signed-off-by: Srishti Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2b8b4a2762f55627e96834776199eb8f078ae284 Author: Aishwarya Pant Date: Fri Sep 15 18:53:08 2017 +0530 staging: rtl8188eu: remove parenthesis from right hand side of assignment Parenthesis are not needed around the right hand side of an assignment. This patch was made on the core files of rtl8188eu using the following coccinelle script. @@ binary operator op = {==,!=,&&,||,>=,<=,&,|}; expression l, r, t; @@ ( l = (r op t) | l = -( r -) ) Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_mlme.c | 26 +++++++++++++------------- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) commit c8d5fa75141bec422be82117c826e78e715a9007 Author: Meghana Madhyastha Date: Sat Sep 16 13:42:16 2017 +0530 Staging: rtl8723bs/os_dep: Remove typecast in kfree Remove typecast of pointer in kfree((u8 *)pdvobj) as it is not needed. Found using the following Coccinelle semantic patch: @@ identifier x; type t; @@ -kfree((t *)x) +kfree(x) Signed-off-by: Meghana Madhyastha Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dedc1a73c3f17d66d3fd48d437a6d3352bd37f4e Author: Harsha Sharma Date: Thu Sep 14 17:34:05 2017 +0530 staging: rtl8723bs: Merge assignment with return Merge assignment with return statement to directly return the value. Done using following coccinelle semantic patch @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Harsha Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) commit 08dd3e1acc169100ee35df322e2146e39b43a827 Author: Chris Wilson Date: Sat Sep 16 21:44:12 2017 +0100 drm/i915/execlists: Move insert_request() Move insert_request() earlier to avoid a forward declaration in a later patch. Signed-off-by: Chris Wilson Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20170916204414.32762-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_lrc.c | 128 +++++++++++++++++++-------------------- 1 file changed, 64 insertions(+), 64 deletions(-) commit 523e7c9278f0a2ca6174319e33f255161e74d16c Author: Chris Wilson Date: Sat Sep 16 21:44:11 2017 +0100 drm/i915/execlists: Kick start request processing after a reset During a reset, we may skip over completed requests and lost context-switch interrupts. Following the reset, we may then may end up with no active requests in the ELSP (and so do not resubmit to restart the engine), but have a queue of requests ready for execution. This is unlikely, it requires the last request to complete after the hang is detected, but not impossible. The outcome of this is that the engine stalls, possibly leading to full ring and indefinite wait under struct_mutex, eventually leading to a full driver hang. Alternatively, we can solve this by unsubmitting the incomplete requests and just kickstarting the tasklet. Michał has patches for that, which I initially disliked due to the extra complexity, but the complexity of this "simple" restart is growing... Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20170916204414.32762-1-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/intel_lrc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 27a5f61b377bb62e4813af57fd91636f91ea5755 Author: Chris Wilson Date: Fri Sep 15 18:31:00 2017 +0100 drm/i915: Cancel all ready but queued requests when wedging When wedging the hw, we want to mark all in-flight requests as -EIO. This is made slightly more complex by execlists who store the ready but not yet submitted-to-hw requests on a private queue (an rbtree priolist). Call into execlists to cancel not only the ELSP tracking for the submitted requests, but also the queue of unsubmitted requests. v2: Move the majority of engine_set_wedged to the backends (both legacy ringbuffer and execlists handling their own lists). Reported-by: Michał Winiarski Testcase: igt/gem_eio/in-flight-contexts Signed-off-by: Chris Wilson Cc: Michał Winiarski Cc: Mika Kuoppala Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20170915173100.26470-1-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/i915_gem.c | 38 +-------------------- drivers/gpu/drm/i915/intel_lrc.c | 60 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_ringbuffer.c | 20 +++++++++++ drivers/gpu/drm/i915/intel_ringbuffer.h | 8 +++++ 4 files changed, 89 insertions(+), 37 deletions(-) commit af9cdf9571f9bd99d8b9eef343b13b64477b589a Author: Srishti Sharma Date: Sat Sep 16 12:04:27 2017 +0530 Staging: irda: Use !x instead of NULL comparison Test for NULL as !x where functions that return NULL on failure are used. Done using the following semantic patch by coccinelle. @ is_null @ expression E; statement S; @@ E = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\| usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...)); ( if(!E) S | -if(E==NULL) +if(!E) S ) Signed-off-by: Srishti Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/irda/net/discovery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bf90447caa71021dcbd8ae35496ea11b1c3423b2 Author: Meghana Madhyastha Date: Sat Sep 16 11:38:38 2017 +0530 Staging: irda: drivers: Move the curly bracket to the same line as if Move the left curly brace to the same line as the if statement. This coding style is more common and also reduces the number of lines of code. Signed-off-by: Meghana Madhyastha Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/irda/drivers/ali-ircc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7f1a9c61d627361924bc507f12fa3c6e77e80669 Author: Srishti Sharma Date: Sat Sep 16 02:36:16 2017 +0530 Staging: irda: Remove parentheses on the right of assignment Parentheses are not needed on the right hand side of assignment statement in most cases. Done using the following semantic patch by coccinelle. @@ identifier E,F,G,f; expression e,r; @@ ( E = (G == F); | E = (e == r); | E = -( ... -) ; ) Signed-off-by: Srishti Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/irda/drivers/mcs7780.c | 4 ++-- drivers/staging/irda/net/irqueue.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 1521968f3cdfde1df64b68717eb9cfcb9f8fa52f Author: Srishti Sharma Date: Sat Sep 16 02:35:47 2017 +0530 Staging: irda: Don't use assignment inside if statement Write assignment statement outside of the if statement. Done using the following semantic patch by coccinelle. @@ identifier E; expression F; statement S; @@ -if((E = F)) +E = F; +if(E) S Signed-off-by: Srishti Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/irda/drivers/irda-usb.c | 4 ++-- drivers/staging/irda/drivers/mcs7780.c | 9 ++++++--- drivers/staging/irda/net/irqueue.c | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) commit 6561e82d93e12744f1fa2048b6a17e5739682749 Author: Meghana Madhyastha Date: Fri Sep 15 14:43:15 2017 +0530 Staging: irda: drivers: Replace (skb == NULL) with (!skb) Some functions return NULL as an indication of failure. The style (!skb) is more common than (skb == NULL) for these functions. Found by the following Coccinelle script. @@ identifier i; statement S; @@ i = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|usb_alloc_urb\| alloc_netdev\|dev_alloc_skb\)(...)); ( -if (i == NULL) +if (!i) S | -if (NULL == i) +if (!i) S ) Signed-off-by: Meghana Madhyastha Signed-off-by: Greg Kroah-Hartman drivers/staging/irda/drivers/ali-ircc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b351fa3ce6d858b7bb4183a12915eaf6f5c8b630 Author: Haneen Mohammed Date: Wed Sep 13 22:55:38 2017 -0600 staging: irda: Remove typedef struct This patch remove typedef from a structure with all its ocurrences since using typedefs for structures is discouraged. Issue found using Coccinelle: @r1@ type T; @@ typedef struct { ... } T; @script:python c1@ T2; T << r1.T; @@ if T[-2:] =="_t" or T[-2:] == "_T": coccinelle.T2 = T[:-2]; else: coccinelle.T2 = T; print T, coccinelle.T2 @r2@ type r1.T; identifier c1.T2; @@ -typedef struct + T2 { ... } -T ; @r3@ type r1.T; identifier c1.T2; @@ -T +struct T2 Signed-off-by: Haneen Mohammed Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/irda/include/net/irda/qos.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit f952ec5f429cf961e1a812591a39c6c5c5852c9c Author: Aastha Gupta Date: Mon Sep 18 01:30:35 2017 +0530 staging: speakup: remove NULL comparison This was done using cocccinelle script: @@ identifier arg; @@ -arg==NULL +!arg Signed-off-by: Aastha Gupta Reviewed-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08710da3cf932149de3440bbaec4dfdfba5a33df Author: Meghana Madhyastha Date: Sat Sep 16 10:34:05 2017 +0530 Staging: speakup: Remove print following unsuccessful kmalloc Remove print statement following unsuccessful kmalloc when there is not enough memory. Kmalloc and variants normally produce a backtrace in such a case. Hence, a print statement is not necessary. Found using the following Coccinelle semantic patch: @@ identifier i; @@ i = (\(kmalloc\|devm_kzalloc\|kmalloc_array\| devm_ioremap\|usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\| kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...)); ( if (i == NULL) { -\(DBG_8723A\|printk\|pr_err\|CERROR\|DBG_88E\)(...); ...when any } | if (!i) { -\(DBG_8723A\|printk\|pr_err\|CERROR\|DBG_88E\)(...); ...when any } ) @@ identifier i; @@ ( - if (i == NULL) { + if (i == NULL) return ...; - } | - if (!i) { + if (!i) return ...; - } ) Signed-off-by: Meghana Madhyastha Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/spk_ttyio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f46cf70e2338899a241566aec3c30a4af5d5ba92 Author: Srishti Sharma Date: Sat Sep 16 22:09:29 2017 +0530 Staging: dgnc: Remove unused fields in struct channel_t Eliminate the fields that are not used and the comments associated with them. Signed-off-by: Srishti Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.h | 6 ------ 1 file changed, 6 deletions(-) commit 1086f7c44f1a387aa612de4f33ba4c4941a93bc9 Author: Srishti Sharma Date: Sat Sep 16 22:08:54 2017 +0530 Staging: dgnc: Remove unused fields in struct dgnc_board Remove unused fields and comments associated with them in the structure definition. Signed-off-by: Srishti Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.h | 9 --------- 1 file changed, 9 deletions(-) commit f59c054301ff2ebebc25ef9e2841c33d2be0fcf4 Author: Aastha Gupta Date: Sat Sep 16 19:29:33 2017 +0530 staging: dgnc: remove variable rc Found using coccinelle script: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_neo.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 64ffaf29a92425cfcd792661fa7e9df564477231 Author: Aastha Gupta Date: Sat Sep 16 18:32:32 2017 +0530 staging: dgnc: remove unused variable This patch removes unused variable. Signed-off-by: Aastha Gupta Signed-off-by: Greg Kroah-Hartman drivers/staging/dgnc/dgnc_driver.h | 1 - 1 file changed, 1 deletion(-) commit 76f6aefdba72c7e415410694282c45508b70d581 Author: Haneen Mohammed Date: Fri Sep 15 18:41:48 2017 -0600 staging: lustre: lnet: Replace list_for_each with list_for_each_entry Replace use of the combination of list_for_each and list_entry with list_for_each_entry to simplify the code and remove variables that are used only in list_for_each. Issue found and corrected using Coccinelle script: @r@ expression head, member, e; type T1, T2, T3; iterator name list_for_each, list_for_each_entry; identifier pos, var; @@ -T1 *pos; ...when!=pos=e; -list_for_each(pos, head) +list_for_each_entry(var, head, member) { ...when!=pos=e; when!=T3 *var; -var = list_entry(pos, T2, member); ...when!=pos=e; } ...when!=pos=e; Signed-off-by: Haneen Mohammed Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/lnet/router.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit bea2ab136eaacec2d14613a3ab89557298fa9748 Author: Sergei Shtylyov Date: Fri Sep 15 22:43:23 2017 +0300 arm64: dts: renesas: r8a77970: add EtherAVB support Define the generic R8A77970 part of the EtherAVB device node. Based on the original (and large) patch by Daisuke Matsushita . Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970.dtsi | 44 +++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) commit 38dbb6fc972e53110f0bc308057822d73c063903 Author: Sergei Shtylyov Date: Fri Sep 15 22:43:22 2017 +0300 arm64: dts: renesas: r8a77970: add [H]SCIF support Describe [H]SCIF ports in the R8A77970 device tree. Based on the original (and large) patch by Daisuke Matsushita . Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970.dtsi | 149 ++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) commit bd746e70d3fce2cb1719fd2c085cd57a872575fe Author: Sergei Shtylyov Date: Fri Sep 15 22:43:21 2017 +0300 arm64: dts: renesas: r8a77970: add SYS-DMAC support Describe SYS-DMAC1/2 in the R8A77970 device tree. Based on the original (and large) patch by Daisuke Matsushita . Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970.dtsi | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 41f4345a6111056341346742942df3f5d5be535d Author: Sergei Shtylyov Date: Fri Sep 15 22:43:20 2017 +0300 arm64: dts: renesas: initial R8A77970 SoC device tree The initial R8A77970 SoC device tree including Cortex-A53 CPU, GIC, timer, CPG, RST, and SYSC. Based on the original (and large) patch by Daisuke Matsushita . Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77970.dtsi | 125 ++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) commit f9ba0c4cfe6169b7cc9a2f9653c76b05316f0508 Author: Yoshihiro Shimoda Date: Wed Sep 13 21:18:38 2017 +0900 arm64: dts: renesas: r8a77995: Add EthernetAVB device node This patch adds EthernetAVB device node for r8a77995. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995.dtsi | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 11581f5d52a81fe32fb1bb1c71fb22fb9192ee01 Author: Yoshihiro Shimoda Date: Wed Sep 13 19:33:59 2017 +0900 arm64: dts: renesas: r8a77995: add GPIO device nodes This patch adds GPIO device nodes for r8a77995. Reviewed-by: Geert Uytterhoeven Signed-off-by: Yoshihiro Shimoda Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995.dtsi | 112 ++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) commit 5889ded170cd5b6f5a9449956288d069074b20c4 Author: Geert Uytterhoeven Date: Thu Jul 20 14:54:37 2017 +0200 arm64: dts: renesas: r8a77995: Use r8a7795-cpg-mssr binding definitions Replace the hardcoded clock indices by R8A77995_CLK_* symbols. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9066b042b4502f711c5207662ec0d26be1732aff Author: Geert Uytterhoeven Date: Thu Jul 20 14:54:36 2017 +0200 arm64: dts: renesas: r8a77995: Use r8a7795-sysc binding definitions Replace the hardcoded power domain indices by R8A77995_PD_* symbols. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995.dtsi | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit a6d21c0940490a343c6894bd78601be9e0e36f45 Author: Geert Uytterhoeven Date: Fri Aug 25 14:56:50 2017 +0200 arm64: renesas: Add Renesas R8A77970 Kconfig support Add a configuration option for the R-Car V3M SoC. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/Kconfig.platforms | 6 ++++++ 1 file changed, 6 insertions(+) commit 6b5ac2f1cb1162679662f3be891978d32b345b6f Author: Geert Uytterhoeven Date: Wed Aug 30 12:03:17 2017 +0200 arm64: dts: renesas: r8a7795: Drop bogus HDMI node names suffixes Node names should not use numerical suffixes if the nodes can be distinguished by unit-address. Signed-off-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7da2ed12da2c81b782ee4c3b4b0b87098048aae8 Author: Laurent Pinchart Date: Tue Aug 22 17:23:26 2017 +0300 arm64: dts: renesas: ulcb: Enable display output The DU is already wired up to the HDMI encoder, all we need to do is enable it. Signed-off-by: Laurent Pinchart Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/ulcb.dtsi | 4 ++++ 1 file changed, 4 insertions(+) commit 5a979972b6cb799944423f00c4e269d826c6d2c7 Author: Yoshihiro Shimoda Date: Tue Aug 29 16:35:59 2017 +0900 arm64: dts: renesas: r8a77995: update PFC node name to pin-controller This patch changes the name from from e6060000.pfc and pfc@e6060000 to e6060000.pin-controller and pin-controller@e6060000 like other Renesas SoCs. Reported-by: Geert Uytterhoeven Signed-off-by: Yoshihiro Shimoda Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a77995.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd7b01ad124b85620a9e1312697cb96cc5e21487 Merge: 802d7d0 76f0c53 Author: Greg Kroah-Hartman Date: Mon Sep 18 11:00:16 2017 +0200 Merge branch 'staging_typec_move' into staging-next Move the typec code out of staging into the USB tree. This is on a separate branch so that we can share it with the USB git tree and not cause merge issues later on. Signed-off-by: Greg Kroah-Hartman commit 8ef7512a68f4cd559af5d5f0be3ee2e89f0769ec Author: Laurent Pinchart Date: Thu Jul 13 14:21:10 2017 +0300 arm64: dts: renesas: r8a7796: Add FDP1 instance The r8a7796 has a single FDP1 instance. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7796.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0e0f4d47288a8e56ed2586699b89573afcb1bf72 Author: Geert Uytterhoeven Date: Thu Aug 17 13:29:14 2017 +0200 arm64: dts: renesas: r8a7795-es1: Drop extra zero from usb unit address With W=1: arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dtb: Warning (simple_bus_reg): Node /soc/usb@ee0400000 simple-bus unit address format error, expected "ee040000" arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb.dtb: Warning (simple_bus_reg): Node /soc/usb@ee0400000 simple-bus unit address format error, expected "ee040000" Fixes: 291e0c4994d0813f ("arm64: dts: r8a7795: Add support for R-Car H3 ES2.0") Fixes: 171f2ef82284f61b ("arm64: dts: r8a7795: Add USB3.0 host device nodes") Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76f0c53d08b933b4708be0d775ba57a0fb4d858a Author: Guenter Roeck Date: Mon Sep 11 20:32:08 2017 -0700 usb: typec: fusb302: Move out of staging The driver is in good enough shape to be moved out of staging. Do it. Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/Kconfig | 2 - drivers/staging/typec/Makefile | 1 - drivers/staging/typec/fusb302/Kconfig | 7 - drivers/staging/typec/fusb302/Makefile | 1 - drivers/staging/typec/fusb302/TODO | 10 - drivers/staging/typec/fusb302/fusb302.c | 1947 --------------------------- drivers/staging/typec/fusb302/fusb302_reg.h | 186 --- drivers/usb/typec/Kconfig | 6 + drivers/usb/typec/Makefile | 1 + drivers/usb/typec/fusb302/Kconfig | 7 + drivers/usb/typec/fusb302/Makefile | 1 + drivers/usb/typec/fusb302/fusb302.c | 1947 +++++++++++++++++++++++++++ drivers/usb/typec/fusb302/fusb302_reg.h | 186 +++ 13 files changed, 2148 insertions(+), 2154 deletions(-) commit 4b4e02c83167dca260e6bf974809979d44694e19 Author: Guenter Roeck Date: Mon Sep 11 20:32:07 2017 -0700 typec: tcpm: Move out of staging Move tcpm (USB Type-C Port Manager) out of staging. Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/Kconfig | 8 - drivers/staging/typec/Makefile | 1 - drivers/staging/typec/TODO | 10 - drivers/staging/typec/fusb302/fusb302.c | 4 +- drivers/staging/typec/pd.h | 298 --- drivers/staging/typec/pd_bdo.h | 31 - drivers/staging/typec/pd_vdo.h | 251 --- drivers/staging/typec/tcpci.c | 4 +- drivers/staging/typec/tcpm.c | 3616 ------------------------------- drivers/staging/typec/tcpm.h | 204 -- drivers/usb/typec/Kconfig | 8 + drivers/usb/typec/Makefile | 1 + drivers/usb/typec/tcpm.c | 3615 ++++++++++++++++++++++++++++++ include/linux/usb/pd.h | 298 +++ include/linux/usb/pd_bdo.h | 31 + include/linux/usb/pd_vdo.h | 251 +++ include/linux/usb/tcpm.h | 204 ++ 17 files changed, 4412 insertions(+), 4423 deletions(-) commit 70cd90be33004ce700f762e85e4919f41af0ca48 Author: Guenter Roeck Date: Mon Sep 11 20:32:06 2017 -0700 staging: typec: pd: Document struct pd_message struct pd_message is the format of a PD message as seen on the wire. Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/pd.h | 5 +++++ 1 file changed, 5 insertions(+) commit 98076fa64a05dd2bda3a9f38e171bade15ab507d Author: Guenter Roeck Date: Mon Sep 11 20:32:05 2017 -0700 staging: typec: tcpm: Document data structures Document struct tcpc_config and struct tcpc_dev. Drop unused TCPC_USB_SWITCH_RESTORE. Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.h | 57 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 50 insertions(+), 7 deletions(-) commit 44262fad12a738654c93a7c6212d025b79c92781 Author: Guenter Roeck Date: Mon Sep 11 20:32:04 2017 -0700 staging: typec: tcpm: Drop commented out code Commented out code can be added as needed. Drop it. Also drop TODO and an obsolete XXX comment. Signed-off-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman drivers/staging/typec/tcpm.c | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) commit bab9b2a74fe9da96e895e0919f625679a0a8c964 Author: Sergei Shtylyov Date: Tue Sep 12 23:37:20 2017 +0300 soc: renesas: rcar-sysc: add R8A77970 support Add support for R-Car V3M (R8A77970) SoC power areas to the R-Car SYSC driver. Based on the original (and large) patch by Daisuke Matsushita . Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman .../bindings/power/renesas,rcar-sysc.txt | 1 + drivers/soc/renesas/Kconfig | 5 +++ drivers/soc/renesas/Makefile | 1 + drivers/soc/renesas/r8a77970-sysc.c | 39 ++++++++++++++++++++++ drivers/soc/renesas/rcar-sysc.c | 3 ++ drivers/soc/renesas/rcar-sysc.h | 1 + 6 files changed, 50 insertions(+) commit c673fe7f0cd525629db9a87a77610fca137951e0 Author: Dhinakaran Pandiyan Date: Wed Sep 13 23:21:27 2017 -0700 drm/dp: DPCD register defines for link status within ESI field Link status is available in the ESI field on devices with DPCD r1.2 or higher. DP spec also says "An MST upstream device shall use this field instead of the Link/Sink Device Status field registers, starting from DPCD Address 00200h." v2: Prefixed DP_ (Jani) Rewrote commment to stay within 80 cols. Cc: Jani Nikula Reviewed-by: Jani Nikula Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170914062127.12047-1-dhinakaran.pandiyan@intel.com include/drm/drm_dp_helper.h | 5 +++++ 1 file changed, 5 insertions(+) commit 3fd45a136ff61bb54deab70fb2d534a85e40481f Author: Geert Uytterhoeven Date: Fri Sep 1 10:37:45 2017 +0200 ARM: shmobile: rcar-gen2: Make sure CNTVOFF is initialized on CA7/15 On Cortex-A7, the arch timer CNTVOFF register is uninitialized. Ideally it should be initialized by the boot loader, but it isn't. For the boot CPU, CNTVOFF is initialized by Linux since commit 9ce3fa6816c2fb59 ("ARM: shmobile: rcar-gen2: Add CA7 arch_timer initialization for r8a7794"). For secondary CPU cores, no such initialization is done. Hence when enabling SMP on r8a7794, the kernel log is spammed with: WARNING: Underflow in clocksource 'arch_sys_counter' observed, time update ignored. Please report this, consider using a different clocksource, if possible. Your kernel is probably still fine. As Marc Zyngier pointed out that Cortex-A15 and Cortex-A7 are similar with respect to CNTVOFF, we have been very lucky this just worked on R-Car Gen2 SoCs with Cortex-A15 cores. To fix this: - Move the existing inline asm code to initialize CNTVOFF to an assembler source file (adding comments and replacing hardcoded constants by definitions in the process), so it can be reused, - Perform the initialization of CNTVOFF on the boot CPU (Cortex-A15 or Cortex-A7) on all R-Car Gen2 and RZ/G1 parts, - Wrap the standard secondary_startup() routine inside a routine which initializes CNTVOFF. Based on patches by Hisashi Nakamura in the BSP. Signed-off-by: Geert Uytterhoeven Tested-by: Fabrizio Castro Signed-off-by: Simon Horman arch/arm/mach-shmobile/Makefile | 1 + arch/arm/mach-shmobile/common.h | 2 ++ arch/arm/mach-shmobile/headsmp-apmu.S | 37 ++++++++++++++++++++++++++++++++ arch/arm/mach-shmobile/platsmp-apmu.c | 2 +- arch/arm/mach-shmobile/setup-rcar-gen2.c | 20 ++--------------- 5 files changed, 43 insertions(+), 19 deletions(-) commit c5d43be52e0c7380f985585ef72dac1a6a89b59d Author: Geert Uytterhoeven Date: Fri Sep 1 10:37:44 2017 +0200 ARM: Add definition for monitor mode provides *_MODE definitions for the various processor modes, but monitor mode was missing. Add MON_MODE to avoid code using the hardcoded value. Suggested-by: Marc Zyngier Signed-off-by: Geert Uytterhoeven Tested-by: Fabrizio Castro Signed-off-by: Simon Horman arch/arm/include/uapi/asm/ptrace.h | 1 + 1 file changed, 1 insertion(+) commit 8e5f2d651f5b8ebf4b462aac02f51fe6075f88c0 Author: Fabrizio Castro Date: Wed Aug 16 11:20:10 2017 +0100 ARM: debug-ll: Add support for r8a7745 Enable low-level debugging support for RZ/G1E (r8a7745). RZ/G1E uses SCIF4 for the debug console. Signed-off-by: Fabrizio Castro Reviewed-by: Chris Paterson Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/Kconfig.debug | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 833bdb47c826a1a64daac194c98887d1d68f2ce8 Author: Sergei Shtylyov Date: Tue Sep 12 23:37:19 2017 +0300 dt-bindings: power: add R8A77970 SYSC power domain definitions Add macros usable by the device tree sources to reference R8A77970 SYSC power domains by index. Based on the original (and large) patch by Daisuke Matsushita . Signed-off-by: Vladimir Barinov Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman include/dt-bindings/power/r8a77970-sysc.h | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit e75e71e7bcee2e04be8bbca6fb67af1a45fa128b Author: Biju Das Date: Mon Aug 14 12:49:48 2017 +0100 ARM: dts: iwg20m: Enable SDHI0 controller Enable the SDHI0 controller on iWave RZG1M Qseven SOM. Signed-off-by: Biju Das Acked-by: Wolfram Sang Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743-iwg20m.dtsi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 63ce8a617b5129f7cb20ed0d6d822a31ecca4696 Author: Biju Das Date: Mon Aug 14 12:49:47 2017 +0100 ARM: dts: r8a7743: Add SDHI controllers Add the SDHI controllers to the r8a7743 device tree. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7743.dtsi | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) commit 9fb1c8ff4ca36a13fdeb7e4161687eaf4685dc7a Author: Geert Uytterhoeven Date: Fri Aug 18 11:16:57 2017 +0200 ARM: dts: r8a7794: Stop grouping clocks under a "clocks" subnode The current practice is to not group clocks under a "clocks" subnode, but just put them together with the other on-SoC devices. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794.dtsi | 124 ++++++++++++++++++++--------------------- 1 file changed, 59 insertions(+), 65 deletions(-) commit c67e243ccf06aec0fece59b8a1f3eb719e07b0e3 Author: Geert Uytterhoeven Date: Fri Aug 18 11:16:56 2017 +0200 ARM: dts: r8a7793: Stop grouping clocks under a "clocks" subnode The current practice is to not group clocks under a "clocks" subnode, but just put them together with the other on-SoC devices. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7793.dtsi | 125 ++++++++++++++++++++--------------------- 1 file changed, 60 insertions(+), 65 deletions(-) commit 80e1a5f318850f2bbb5fa4a49fbfa9a8f3afd5f5 Author: Geert Uytterhoeven Date: Fri Aug 18 11:16:54 2017 +0200 ARM: dts: r8a7790: Stop grouping clocks under a "clocks" subnode The current practice is to not group clocks under a "clocks" subnode, but just put them together with the other on-SoC devices. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790.dtsi | 137 ++++++++++++++++++++--------------------- 1 file changed, 66 insertions(+), 71 deletions(-) commit 58d6c357b1f7851d632bb70de3a9ada219f201c2 Author: Geert Uytterhoeven Date: Fri Aug 18 11:11:38 2017 +0200 ARM: dts: r8a7794: Convert to new CPG/MSSR bindings Convert the R-Car E2 SoC from the old "Renesas R-Car Gen2 Clock Pulse Generator (CPG)", "Renesas CPG DIV6 Clock", and "Renesas CPG Module Stop (MSTP) Clocks" DT bindings to the new unified "Renesas Clock Pulse Generator / Module Standby and Software Reset" DT bindings. This simplifies the DTS files, and allows to add support for reset control later. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7794-alt.dts | 3 +- arch/arm/boot/dts/r8a7794-silk.dts | 3 +- arch/arm/boot/dts/r8a7794.dtsi | 528 ++++++------------------------------- 3 files changed, 82 insertions(+), 452 deletions(-) commit d77fe953768850557a1851d2c933b76b2083e4d5 Author: Geert Uytterhoeven Date: Fri Aug 18 11:11:37 2017 +0200 ARM: dts: r8a7793: Convert to new CPG/MSSR bindings Convert the R-Car M2-N SoC from the old "Renesas R-Car Gen2 Clock Pulse Generator (CPG)", "Renesas CPG DIV6 Clock", and "Renesas CPG Module Stop (MSTP) Clocks" DT bindings to the new unified "Renesas Clock Pulse Generator / Module Standby and Software Reset" DT bindings. This simplifies the DTS files, and allows to add support for reset control later. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7793-gose.dts | 4 +- arch/arm/boot/dts/r8a7793.dtsi | 459 +++++++------------------------------ 2 files changed, 82 insertions(+), 381 deletions(-) commit 762dbc444ca240580f7eda5b9152d147cca608b3 Author: Geert Uytterhoeven Date: Fri Aug 18 11:11:36 2017 +0200 ARM: dts: r8a7792: Convert to new CPG/MSSR bindings Convert the R-Car V2H SoC from the old "Renesas R-Car Gen2 Clock Pulse Generator (CPG)" and "Renesas CPG Module Stop (MSTP) Clocks" DT bindings to the new unified "Renesas Clock Pulse Generator / Module Standby and Software Reset" DT bindings. This simplifies the DTS files, and allows to add support for reset control later. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7792-blanche.dts | 3 +- arch/arm/boot/dts/r8a7792-wheat.dts | 3 +- arch/arm/boot/dts/r8a7792.dtsi | 333 +++++++--------------------------- 3 files changed, 63 insertions(+), 276 deletions(-) commit 5802c420636559ffd37095d2886f6964d9b55b11 Author: Geert Uytterhoeven Date: Fri Aug 18 11:11:34 2017 +0200 ARM: dts: r8a7790: Convert to new CPG/MSSR bindings Convert the R-Car H2 SoC from the old "Renesas R-Car Gen2 Clock Pulse Generator (CPG)", "Renesas CPG DIV6 Clock", and "Renesas CPG Module Stop (MSTP) Clocks" DT bindings to the new unified "Renesas Clock Pulse Generator / Module Standby and Software Reset" DT bindings. This simplifies the DTS files, and allows to add support for reset control later. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm/boot/dts/r8a7790-lager.dts | 7 +- arch/arm/boot/dts/r8a7790.dtsi | 557 +++++++----------------------------- 2 files changed, 99 insertions(+), 465 deletions(-) commit 964ca6feefb7136b30597f29bd51447fe9657590 Author: Geert Uytterhoeven Date: Mon Sep 11 13:01:43 2017 +0200 MAINTAINERS: Add Renesas SoC DT bindings doc to Renesas ARM sections Suggested-by: Sergei Shtylyov Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) commit 443c1631172a7a6dc19c1657425354327858a548 Author: Geert Uytterhoeven Date: Fri Aug 25 14:56:49 2017 +0200 ARM: shmobile: Document R-Car V3M SoC DT bindings Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Simon Horman Documentation/devicetree/bindings/arm/shmobile.txt | 2 ++ 1 file changed, 2 insertions(+) commit 8ac491a5d0934bf1a77db155d759c682ab790c45 Author: Geert Uytterhoeven Date: Wed Aug 30 11:53:01 2017 +0200 dt-bindings: display: renesas: dw-hdmi: Drop bogus node name suffix Node names should not use numerical suffixes if the nodes can be distinguished by unit-address. Signed-off-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Signed-off-by: Simon Horman Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 055fb568157c3a6754228138b3ca51247cb4f466 Author: Fabrizio Castro Date: Tue Aug 22 14:52:19 2017 +0100 dt-bindings: apmu: Document r8a7745 support Document APMU and SMP enable method for RZ/G1E (also known as r8a7745) SoC. Signed-off-by: Fabrizio Castro Signed-off-by: Simon Horman Documentation/devicetree/bindings/power/renesas,apmu.txt | 1 + 1 file changed, 1 insertion(+) commit bb0030752f288a2e2d27cc110d6d4139fe7a948d Author: Sergei Shtylyov Date: Tue Sep 12 23:37:17 2017 +0300 soc: renesas: identify R-Car V3M Add support for identifying the R-Car V3M (R8A77970) SoC. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman drivers/soc/renesas/renesas-soc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 17760376ae31e06f66b3c3b8981f5978d4c53150 Author: Sergei Shtylyov Date: Tue Sep 12 23:37:18 2017 +0300 soc: renesas: rcar-rst: add R8A77970 support Add support for R-Car V3M (R8A77970) to the R-Car RST driver -- this driver is needed for the clock driver to work. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman Documentation/devicetree/bindings/reset/renesas,rst.txt | 1 + drivers/soc/renesas/Kconfig | 3 ++- drivers/soc/renesas/rcar-rst.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) commit 545dc83ed09b5c04f663b766a92cbc8bb02c5f15 Author: Biju Das Date: Fri Aug 18 12:12:38 2017 +0100 ARM: multi_v7_defconfig: Enable BQ32000 RTC driver The iWave RZ/G1M Q7 SOM supports RTC (TI BQ32000). To increase hardware support enable the driver in the multi_v7_defconfig multiplatform configuration. Signed-off-by: Biju Das Signed-off-by: Simon Horman arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) commit 0ed626d35ea2ec744826b3ebcb1d190a6c670d56 Author: Geert Uytterhoeven Date: Thu Aug 17 13:32:11 2017 +0200 arm64: defconfig: Enable Renesas R8A77995 SoC Enable support for the Renesas R-Car D3 SoC. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit d8dd68045c5879c40342050a476710e31c7cdfa7 Author: Haneen Mohammed Date: Fri Sep 15 02:36:03 2017 -0600 drm/rockchip: Replace dev_* with DRM_DEV_* This patch replace instances of dev_info/err/debug with DRM_DEV_INFO/ERROR/WARN respectively inorder to use a drm-formatted specific log messages. Issue corrected with the help of the following Coccinelle script: @r@ @@ ( -dev_info +DRM_DEV_INFO | -dev_err +DRM_DEV_ERROR | -dev_dbg +DRM_DEV_DEBUG ) Signed-off-by: Haneen Mohammed Signed-off-by: Mark Yao Link: https://patchwork.freedesktop.org/patch/msgid/20170915083603.GA18992@Haneen drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 26 ++++---- drivers/gpu/drm/rockchip/cdn-dp-reg.c | 2 +- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 86 ++++++++++++++----------- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 19 +++--- drivers/gpu/drm/rockchip/inno_hdmi.c | 14 ++-- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 12 ++-- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 8 ++- drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 18 ++++-- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 32 ++++----- drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 2 +- 10 files changed, 121 insertions(+), 98 deletions(-) commit faec5ee1c7acb00eec4853321e4da42cd690a220 Author: Alexandre Belloni Date: Sat Aug 12 23:53:45 2017 +0200 MAINTAINERS: Add SoC drivers to AT91 entry We (the AT91/Atmel SoC maintainers) are not seeing patches for several drivers present only on our SoCs. Add more patterns to match at91 and atmel drivers. Acked-by: Nicolas Ferre Signed-off-by: Alexandre Belloni MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) commit cd2e9be89a246046d42939b8c0e0ea0d08530d30 Author: Cristian Birsan Date: Thu Jul 6 11:35:27 2017 +0300 drivers: soc: atmel: Add basic support for new sama5d2 SiPs Add basic support for new sama5d2 System in a Package chips. Signed-off-by: Cristian Birsan [claudiu.beznea@microchip.com: use MiB instead of MB] Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre Acked-by: Ludovic Desroches Signed-off-by: Alexandre Belloni drivers/soc/atmel/soc.c | 8 ++++++++ drivers/soc/atmel/soc.h | 4 ++++ 2 files changed, 12 insertions(+) commit 802d7d0bf22b663b96d2a37a3168c0d8c22a0056 Author: Aviya Erenfeld Date: Tue Sep 12 01:51:10 2017 +0300 staging: wlan-ng: Avoid bogus endianness The linkstatus variable in the info struct received as __le16 but handled in every other place in the driver as u16 Fix that and remove the sparse warning that occurred due to it: prism2sta.c:1450:29: warning: incorrect type in assignment (different base types) prism2sta.c:1450:29: expected unsigned short [unsigned] [usertype] link_status_new prism2sta.c:1450:29: got restricted __le16 [usertype] linkstatus Signed-off-by: Aviya Erenfeld Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman drivers/staging/wlan-ng/prism2sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a5251b8ad8c3383c5a3443744fdc4d303d32539 Author: Ivan Safonov Date: Sun Sep 10 21:34:28 2017 +0300 staging:r8192u: replace request_module with try_then_request_module Return value of request_module() does not handled, so it is possible to use shorter try_then_request_module(). Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman .../staging/rtl8192u/ieee80211/ieee80211_softmac.c | 27 +++++++++++----------- drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c | 15 ++++-------- 2 files changed, 17 insertions(+), 25 deletions(-) commit a7e585918ecd5a21b0d90bf3ca8ae397ce9dbc77 Author: Liam Ryan Date: Tue Sep 12 01:40:15 2017 +0100 staging: rtl8712: Fix unbalanced braces around else statement Fix checkpath-reported unbalanced braces in the following areas 221: FILE: drivers/staging/rtl8712/hal_init.c:221: 392: FILE: drivers/staging/rtl8712/os_intfs.c:392: 363: FILE: drivers/staging/rtl8712/rtl8712_cmd.c:363: 889: FILE: drivers/staging/rtl8712/rtl8712_recv.c:889: 902: FILE: drivers/staging/rtl8712/rtl871x_cmd.c:902: 84: FILE: drivers/staging/rtl8712/rtl871x_ioctl_set.c:84: 580: FILE: drivers/staging/rtl8712/rtl871x_mlme.c:580: 593: FILE: drivers/staging/rtl8712/usb_intf.c:593: Signed-off-by: Liam Ryan Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/hal_init.c | 4 ++-- drivers/staging/rtl8712/os_intfs.c | 4 ++-- drivers/staging/rtl8712/rtl8712_cmd.c | 4 ++-- drivers/staging/rtl8712/rtl8712_recv.c | 4 ++-- drivers/staging/rtl8712/rtl871x_cmd.c | 3 ++- drivers/staging/rtl8712/rtl871x_ioctl_set.c | 4 ++-- drivers/staging/rtl8712/rtl871x_mlme.c | 4 ++-- drivers/staging/rtl8712/usb_intf.c | 3 ++- 8 files changed, 16 insertions(+), 14 deletions(-) commit 2af630f0d398ce452a8b7e36c1ea12834998b58c Author: Srishti Sharma Date: Mon Sep 11 21:58:37 2017 +0530 Staging: ccree: Remove unused variable monitor_lock Remove the variable monitor_lock as it is not used anywhere. Signed-off-by: Srishti Sharma Reviewed-by: Sean Paul Acked-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_request_mgr.c | 1 - 1 file changed, 1 deletion(-) commit e7e51c037feef715ff7ba6f34a8d134616be24ad Author: Harsha Sharma Date: Mon Sep 11 23:09:51 2017 +0530 staging: rtl8723bs: Change coding style to (foo *bar) This coding style (foo *bar) is more common for the kernel code. Change foo* bar to foo *bar. Change foo * bar to foo *bar. Change (foo*) to (foo *). Signed-off-by: Harsha Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/os_intfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 596e0559d61a0bf7c01113280cdf7525a35f1090 Author: Shreeya Patel Date: Mon Sep 11 23:21:06 2017 +0530 Staging: rtlwifi: Remove unnecessary 'out of memory' message. Logging messages that show some type of "out of memory" error are generally unnecessary as there is a generic message and a stack dump done by the memory subsystem. These messages generally increase kernel size without much added value. Problem found by checkpatch. Signed-off-by: Shreeya Patel Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/rc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d2f826d3c49aae17caba12e6952d67221eb5e1d3 Author: Harsha Sharma Date: Tue Sep 12 18:42:06 2017 +0530 staging: rtl8723bs: Remove unnecessary spaces Space between function name and open parentheses '(' is prohibited. Space is required around most binary operators '=', '==', '+=', '<', ':', '+', '-' Space required before '&', '*' Space is required after ',', ';' Signed-off-by: Harsha Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 5a60d7ba278dab654ef30a646b57fdc1a76d23c6 Author: Haneen Mohammed Date: Tue Sep 12 13:04:50 2017 -0600 staging: pi433: Replace printk() with dev_dbg() This patch convert printk() to the preferred variant dev_dbg() and remove unnecessary comment line. Issue detected with checkpatch.pl. Signed-off-by: Haneen Mohammed Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/pi433_if.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 3da8f0c7782496db3aa6c23f32ee390df9499e4d Author: Harsha Sharma Date: Sun Sep 10 23:11:14 2017 +0530 staging: rtl8723bs: Remove unnecessary blank lines Blank lines aren't necessary after an open brace and before a close brace Signed-off-by: Harsha Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/os_intfs.c | 9 --------- 1 file changed, 9 deletions(-) commit ffd3c64871acc04cf90d93dd21b17d6d3e596814 Author: Harsha Sharma Date: Sun Sep 10 23:09:10 2017 +0530 staging: rtl8723bs: Remove unneccesary braces and change position of open brace Follow linux-kernel code style for conditional statements Signed-off-by: Harsha Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/os_intfs.c | 63 +++++++++-------------------- 1 file changed, 19 insertions(+), 44 deletions(-) commit cd0f93ee236a3938d880cc6687707e874759f53e Author: Harsha Sharma Date: Sun Sep 10 22:59:50 2017 +0530 staging: rtl8723bs: Add space between concatenated strings Use spaces between concatenated strings Signed-off-by: Harsha Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/os_intfs.c | 50 ++++++++++++++--------------- 1 file changed, 25 insertions(+), 25 deletions(-) commit ce5a98af78fad9fcf1338f5d05e1b26f41b15b43 Author: Harsha Sharma Date: Sun Sep 10 22:53:22 2017 +0530 staging: rtl8723bs: Remove unnecessary spaces at the start of line No spaces at the start of a line Signed-off-by: Harsha Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31f0578c5140cec2be258e19989697f6eda65cdb Author: Harsha Sharma Date: Sun Sep 10 22:51:01 2017 +0530 staging: rtl8723bs: Add spaces around '?', '==', '||', '!=' Use spaces around most binary operators Signed-off-by: Harsha Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/os_intfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 345de32e67f185bf350b9587074ec53f705f0e78 Author: Harsha Sharma Date: Sun Sep 10 20:47:05 2017 +0530 staging: rtl8723bs: Add spaces around '+', '|', '*' Use one space around most binary operators Signed-off-by: Harsha Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/os_intfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 47600f14e95c46ee6f0fa755533baca945fa965f Author: Harsha Sharma Date: Sun Sep 10 20:45:28 2017 +0530 staging: rtl8723bs: Add spaces around '=' Use one space around (on each side of) '=' operator Signed-off-by: Harsha Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/os_intfs.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 2ebd34caf3f6686b3e454b01e1c550dd62a71cce Author: Harsha Sharma Date: Fri Sep 8 19:54:28 2017 +0530 staging: pi433: Fixes minor typo errors Fixes checkpatch warning -- "occured" and "succesfully" are misspelled Signed-off-by: Harsha Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/pi433/pi433_if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a33adacd648fd19bbb8090d170fb0cc12e844a6a Author: Meghana Madhyastha Date: Sun Sep 10 21:02:17 2017 +0530 Staging: speakup: Replace symbolic permission Replace S_IRUGO by 0444 in module parameter declaration. 0444 is more readable and matches the style used in other declarations nearby. Problem found using checkpatch. Signed-off-by: Meghana Madhyastha Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/speakup_acntsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 322e704979f14a8d1b958a68a7b6ed5733ae98bf Author: Harsha Sharma Date: Sat Sep 9 20:31:21 2017 +0530 staging: rtl8723bs: Do not initialise statics to 0 Static variables are initialised to 0 by gcc Signed-off-by: Harsha Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/os_dep/os_intfs.c | 48 ++++++++++++++--------------- 1 file changed, 24 insertions(+), 24 deletions(-) commit 2ef2b7c21fc8772d68369af96fe45c09c46aca30 Author: Joe Perches Date: Sat Sep 9 13:14:54 2017 -0700 staging: rtl8723bs: Remove unnecessary rtw_z?malloc casts These functions now return void * and no longer need casts. Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_ap.c | 10 ++- drivers/staging/rtl8723bs/core/rtw_cmd.c | 84 +++++++++++------------ drivers/staging/rtl8723bs/core/rtw_mlme.c | 8 +-- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 36 +++++----- drivers/staging/rtl8723bs/core/rtw_security.c | 2 +- drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +- drivers/staging/rtl8723bs/core/rtw_xmit.c | 2 +- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 +- drivers/staging/rtl8723bs/hal/sdio_ops.c | 10 +-- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 16 ++--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 14 ++-- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 3 +- drivers/staging/rtl8723bs/os_dep/osdep_service.c | 2 +- 13 files changed, 94 insertions(+), 97 deletions(-) commit 35628c4ad0f3800d3744fd5d4b7315e51c5e407e Author: Joe Perches Date: Sat Sep 9 13:14:52 2017 -0700 staging: rtl8723bs: convert private allocation functions to return void * Using char * for a return from allocation functions means the code has to cast generic allocations to specific types. Allow the compiler to not need casts on the allocations. Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/include/osdep_service.h | 4 ++-- drivers/staging/rtl8723bs/os_dep/osdep_service.c | 15 +++++---------- 2 files changed, 7 insertions(+), 12 deletions(-) commit 67af9094043dd064ec0c2cb0d84173cd9129cdc3 Author: Joe Perches Date: Sat Sep 9 13:14:51 2017 -0700 staging: rtl8723bs: Convert LIST_CONTAINOR to use kernel container_of These are similar macros so use the normal kernel one. As well, there are odd games being played with casting a plist to a union recv_frame by using LIST_CONTAINOR. Just use a direct cast to union recv_frame instead. Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8723bs/core/rtw_recv.c | 14 +++++++------- drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 2 +- drivers/staging/rtl8723bs/include/osdep_service_linux.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit 4379c36509a3eda9e72e1649ce12928227915dc0 Author: Srishti Sharma Date: Mon Sep 11 18:39:18 2017 +0530 Staging: rtl8712: Remove multiple blank lines Remove extra blank line. Signed-off-by: Srishti Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8712/rtl8712_event.h | 1 - 1 file changed, 1 deletion(-) commit 92a5f1a9310d4e093d03fa9734f81aea45f61a9e Author: Srishti Sharma Date: Sun Sep 10 16:53:09 2017 +0530 Staging: xgifb: XGI_main_26.c: Fix alignment to match parentheses Fix alignment so that it matches open parentheses. Signed-off-by: Srishti Sharma Signed-off-by: Greg Kroah-Hartman drivers/staging/xgifb/XGI_main_26.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7beceba15c02dd679c76c8dc7e911ba5523fe2ef Author: Harsha Sharma Date: Sat Sep 9 16:04:47 2017 +0530 staging: sm750fb: Remove extra blank lines This was reported by checkpatch.pl Signed-off-by: Harsha Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/sm750fb/sm750_cursor.c | 4 ---- 1 file changed, 4 deletions(-) commit 94b093fcbaeaaa6fe47e73ac5e197360029c4e14 Author: Meghana Madhyastha Date: Sun Sep 10 09:57:32 2017 +0530 Staging: vc04_services: bcm2835-camera: Fix spelling mistake Fixes a spelling mistake in the comments. Problem found using checkpatch. Signed-off-by: Meghana Madhyastha Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f216f6cdeb1d4180d4c41f4b1e62857bf0a13043 Author: Tobin C. Harding Date: Tue Sep 5 16:53:44 2017 +1000 staging: rtlwifi: remove unused functions Functions rtl_rfreg_delay() and rtl_bb_delay() are unused within the driver. Both functions call rtl_addr_delay(), this function is unused outside of these call sites.The driver (and kernel) code base is cleaner if unused functions are removed. Remove unused functions. Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/core.c | 37 ------------------------------------- drivers/staging/rtlwifi/core.h | 4 ---- 2 files changed, 41 deletions(-) commit 85d309d53f7a6ecbe227a43c1aa2fdc31e2edd00 Author: Tobin C. Harding Date: Tue Sep 5 16:53:43 2017 +1000 staging: rtlwifi: use kcalloc instead of multiply checkpatch emits multiple warnings of type WARNING:ALLOC_WITH_MULTIPLY: Prefer kcalloc over kzalloc with multiply Replace two calls to kzalloc() with calls to kcalloc(). Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/efuse.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 63fcb0ce01ce43ba41474b483a090a4a4c6fc11b Author: Srishti Sharma Date: Sat Sep 9 13:18:51 2017 +0530 Staging: ccree: Merge assignment with return Merge the assignment and the return statements to return the value directly. Done using coccinelle. @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Srishti Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 9ba7bdc9d97e99f0b21442fd7a1eee320de83b9b Author: Gilad Ben-Yossef Date: Thu Sep 7 12:00:16 2017 +0300 staging: ccree: remove BUG macro usage Replace BUG() macro usage that crash the kernel with alternatives that signal error and/or try to recover. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_buffer_mgr.c | 18 ++++++------------ drivers/staging/ccree/ssi_cipher.c | 1 - drivers/staging/ccree/ssi_pm.c | 3 ++- drivers/staging/ccree/ssi_request_mgr.c | 22 ++++++++++++++++------ 4 files changed, 24 insertions(+), 20 deletions(-) commit 3b2eb3799eacf6fe4677871c2ffdfc15b794b1e9 Author: Gilad Ben-Yossef Date: Thu Sep 7 12:00:15 2017 +0300 staging: ccree: replace noop macro with inline Replace noop macro with a noop inline function Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_driver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f11c619c5747fb99565b31064f8727aec75ac453 Author: Gilad Ben-Yossef Date: Thu Sep 7 12:00:14 2017 +0300 staging: ccree: move over to BIT macro for bit defines Use BIT macro for bit definitions where needed. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_cipher.h | 10 +++++----- drivers/staging/ccree/ssi_driver.c | 3 ++- drivers/staging/ccree/ssi_driver.h | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) commit 707c76a0e9447e96bbe7e5cd2789625b148d7b25 Author: Gilad Ben-Yossef Date: Thu Sep 7 12:00:13 2017 +0300 staging: ccree: remove unused completion icache_setup_completion is no longer used. Remove it. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_driver.c | 2 -- drivers/staging/ccree/ssi_driver.h | 1 - 2 files changed, 3 deletions(-) commit 093d56156593bba5889756916b9eaf75bb35cca6 Author: Gilad Ben-Yossef Date: Thu Sep 7 12:00:12 2017 +0300 staging: ccree: simplify resource release on error The resource release on probe/init error was being handled in an awkward manner and possibly leaking memory on certain (unlikely) error path. Fix it by simplifying the error resource release and making it easier to track. Reported-by: Dan Carpenter Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_aead.c | 3 +- drivers/staging/ccree/ssi_cipher.c | 3 +- drivers/staging/ccree/ssi_driver.c | 102 ++++++++++++++++++++----------------- drivers/staging/ccree/ssi_hash.c | 3 +- 4 files changed, 59 insertions(+), 52 deletions(-) commit 7f6f832d258a1b411dcc3ba9345ed3036fe05ca5 Author: Suniel Mahesh Date: Thu Sep 7 12:00:11 2017 +0300 staging: ccree: Use platform_get_irq and devm_request_irq It is recommended to use managed function devm_request_irq(), which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace platform_get_resource(), request_irq() and corresponding error handling with platform_get_irq() and devm_request_irq(). (b) remove struct resource pointer(res_irq) in struct ssi_drvdata as it seems redundant. (c) change type of member irq in struct ssi_drvdata from unsigned int to int, as return type of platform_get_irq is int and can be used in error handling. (d) remove irq_registered variable from driver probe as it seems redundant. (e) free_irq is not required any more, devm_request_irq() free's it on driver detach. (f) adjust log messages accordingly and remove any blank lines. Signed-off-by: Suniel Mahesh Acked-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_driver.c | 30 +++++++++--------------------- drivers/staging/ccree/ssi_driver.h | 3 +-- 2 files changed, 10 insertions(+), 23 deletions(-) commit ce58df6394c2a830ca184c2e9fe8d1bb425a665a Author: Suniel Mahesh Date: Thu Sep 7 12:00:10 2017 +0300 staging: ccree: Convert to devm_ioremap_resource for map, unmap It is recommended to use managed function devm_ioremap_resource(), which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace request_mem_region(), ioremap() and corresponding error handling with devm_ioremap_resource(). (b) remove struct resource pointer(res_mem) in struct ssi_drvdata as it seems redundant, use struct resource pointer which is defined locally and adjust return value of platform_get_resource() accordingly. (c) release_mem_region() and iounmap() are dropped, since devm_ioremap_ resource() releases and unmaps mem region on driver detach. (d) adjust log messages accordingly and remove any blank lines. Signed-off-by: Suniel Mahesh [gby: rebase on top of latest coding style fixes changes] Acked-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_driver.c | 60 ++++++++++---------------------------- drivers/staging/ccree/ssi_driver.h | 1 - 2 files changed, 15 insertions(+), 46 deletions(-) commit 92c9f472020c8bb15b949a7d69087388d6391954 Author: Suniel Mahesh Date: Thu Sep 7 12:00:09 2017 +0300 staging: ccree: Replace kzalloc with devm_kzalloc It is recommended to use managed function devm_kzalloc, which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace kzalloc with devm_kzalloc. (b) drop kfree(), because memory allocated with devm_kzalloc() is automatically freed on driver detach, otherwise it leads to a double free. (c) remove unnecessary blank lines. Signed-off-by: Suniel Mahesh [gby: rebase on top of latest coding style fixes changes] Acked-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_driver.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 17d46dace25a294365cfa1503e0d6a805e7bb6ff Author: Srishti Sharma Date: Thu Sep 7 13:19:21 2017 +0530 Staging: ccree: Remove unused variable. Remove the local variable inflight_counter as it is never used. Signed-off-by: Srishti Sharma Acked-by: Gilad Ben-Yossef Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman drivers/staging/ccree/ssi_cipher.c | 3 --- 1 file changed, 3 deletions(-) commit f38d3104688025b8157cf4e5a4b6fe37f4f7fd66 Author: Justin Skists Date: Wed Sep 6 13:14:25 2017 +0100 staging/speakup: fix checkpatch.pl warning in speak_char() correct the following warning from checkpatch.pl:- WARNING: Prefer using '"%s...", __func__' to using 'speak_char', this function's name, in a string Signed-off-by: Justin Skists Acked-by: Samuel Thibault Signed-off-by: Greg Kroah-Hartman drivers/staging/speakup/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67c4b4411b2812549a6546094ad99c69f7d183c9 Author: Janani Sankara Babu Date: Tue Sep 5 18:22:20 2017 +0530 staging:rtl8188eu:core Fix code Indent This patch is created to solve the code indentation issue Signed-off-by: Janani Sankara Babu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_xmit.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ceefaaced11e6e40857953333dae895601c53f10 Author: Janani Sankara Babu Date: Tue Sep 5 18:05:20 2017 +0530 staging:rtl8188eu Remove unneccessary parenthesis This patch is creates in order to correct the coding style issues. It removes the unwanted parenthesis from the code. Signed-off-by: Janani Sankara Babu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_xmit.c | 52 +++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit ca442105c9d73e47619271d95bc63fe554d59628 Author: Janani Sankara Babu Date: Tue Sep 5 16:06:36 2017 +0530 staging:rtl8188eu Fix coding style issues This patch aims to solve coding style issues by placing constants on the right side of the test Signed-off-by: Janani Sankara Babu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 634c5c68a0445ec3a64bda229f9717b83667407a Author: Janani Sankara Babu Date: Tue Sep 5 15:55:21 2017 +0530 staging:rtl8188eu Fix use __func__ for function name This patch fixes the WARNING: Prefer using '"%s...", __func__' to using this function's name, in a string Signed-off-by: Janani Sankara Babu Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 58930cced012adb01bc78b3687049b17ef44d0a3 Author: Arnd Bergmann Date: Tue Sep 5 09:33:32 2017 +0200 staging: rts5208: fix gcc-8 logic error warning As gcc-8 points out, the bit mask check makes no sense here: drivers/staging/rts5208/sd.c: In function 'ext_sd_send_cmd_get_rsp': drivers/staging/rts5208/sd.c:4130:25: error: bitwise comparison always evaluates to true [-Werror=tautological-compare] However, the code is even more bogus, as we have already checked for the SD_RSP_TYPE_R0 case earlier in the function and returned success. As seen in the mmc/sd driver core, SD_RSP_TYPE_R0 means "no response" anyway, so checking for a particular response would not help either. This just removes the nonsensical code to get rid of the warning. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman drivers/staging/rts5208/sd.c | 6 ------ 1 file changed, 6 deletions(-) commit 688a0206cfb81fded89993420779596a3962b60f Author: Tobin C. Harding Date: Tue Sep 5 16:53:42 2017 +1000 staging: rtlwifi: fix parenthesis alignment Checkpatch emits multiple warnings of type CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis Fix parenthesis alignment in line with checkpatch suggestion. Signed-off-by: Greg Kroah-Hartman drivers/staging/rtlwifi/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f3ae7d9155c79bb8f97ca3ff61ea979dec402952 Author: Lars-Peter Clausen Date: Tue Sep 5 16:43:49 2017 +0200 dmaengine: xilinx_dma: Move enum xdma_ip_type to driver file The enum xdma_ip_type is only used inside the Xilinx DMA driver and not exported to any consumers (nor should it be). So move it from the global header to driver file itself. Signed-off-by: Lars-Peter Clausen Acked-by: Michal Simek Signed-off-by: Vinod Koul drivers/dma/xilinx/xilinx_dma.c | 14 ++++++++++++++ include/linux/dma/xilinx_dma.h | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) commit 008913dbeb1775ba365daa39462ca68884bd926f Author: Lars-Peter Clausen Date: Tue Sep 5 10:16:38 2017 +0200 dmaengine: axi-dmac: Fix software cyclic mode When running in software cyclic mode the driver currently does not go back to the first segment once the last segment has been reached. Effectively making the transfer non-cyclic. Fix this by going back to the first segment once the last segment has been reached for cyclic transfers. Special care need to be taken to avoid a segment from being submitted multiple times concurrently, which could happen for transfers with a number of segments that is smaller than the DMA controller's internal queue. Signed-off-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/dma-axi-dmac.c | 69 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 51 insertions(+), 18 deletions(-) commit 63ab76dbbdb8657e24645b7311ec3911a41039b5 Author: Lars-Peter Clausen Date: Tue Sep 5 10:16:37 2017 +0200 dmaengine: axi-dmac: Only use hardware cyclic mode for single segment transfers In hardware cyclic mode the submitted segment is repeated. This means hardware cyclic mode can only be used if the transfer has a single segment. Signed-off-by: Lars-Peter Clausen Signed-off-by: Vinod Koul drivers/dma/dma-axi-dmac.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d7341305863bcc054ee168bd77864100e0c3b144 Author: Antony Antony Date: Thu Sep 7 18:42:22 2017 +0200 arm64: allwinner: h5: add NanoPi NEO Plus2 DT support Add initial DT for NanoPi NEO Plus2 by FriendlyARM - Allwinner quad core H5 Cortex A53 with an ARM Mali-450MP GPU - 1 GB DDR3 RAM - 8GB eMMC flash (Samsung KLM8G1WEPD-B031) - micro SD card slot - Gigabit Ethernet (external RTL8211E-VB-CG chip) - 802.11 b/g/n WiFi, Bluetooth 4.0 (Ampak AP6212A module) - 2x USB 2.0 host ports & 2x USB via headers Signed-off-by: Antony Antony Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/Makefile | 1 + .../dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts | 193 +++++++++++++++++++++ 2 files changed, 194 insertions(+) commit b518bb159032aac33503fd4cf98706dc84cc1266 Author: Stefan Brüns Date: Thu Aug 31 01:06:37 2017 +0200 arm64: allwinner: a64: add SPI nodes The A64 SPI controllers are register compatible to the h3/h5 SPI controllers. The A64 has two SPI controllers, each with a single chip select. The handles for the DMA channels (23/24 for SPI0/SPI1) are omitted, as the A64 DMA support is currently missing. Signed-off-by: Stefan Brüns Signed-off-by: Maxime Ripard arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) commit a3ccbc0097d199d2b2470066fabe7915bc71c8af Author: Icenowy Zheng Date: Wed Sep 13 21:21:30 2017 +0800 ARM: sun7i: a20: enable ac/battery power supplies for Lamobo R1 board The Lamobo R1 board connected the ACIN of the AXP209 PMIC to a MicroUSB port, and the battery input is connected to a generic connector. Enable these two power supplies in the device tree. Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 8 ++++++++ 1 file changed, 8 insertions(+) commit 2513273771b2b6fc66aee467ca31088a7bd84e49 Author: Chen-Yu Tsai Date: Fri Sep 8 15:50:16 2017 +0800 ARM: dts: sun6i: Add cross pipeline connections between DRCs and TCONs The TCONs on A31/A31s can select either backend as its input. As there is no configurable mux in the backend or DRC to redirect their output, or for the DRC to select an input, the connections are presumably from the each DRC to each TCON, with the TCON having two input ports, like the following diagram: Backend 0 ------- DRC 0 ------- [0] TCON 0 -- -- [1] \ / X / \ -- -- [0] Backend 1 ------- DRC 1 ------- [1] TCON 1 Add these connection endpoints to the device tree. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 9b3fa7320472b46453695278c0924c97104fb33a Author: Philipp Rossak Date: Tue Sep 5 22:34:16 2017 +0200 ARM: dts: sun8i: h3: Fix Pincrtl bindings on Bananapi M2 Plus There is no need for pincontrol nodes when the pin is set to a GPIO Signed-off-by: Philipp Rossak Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts | 20 -------------------- 1 file changed, 20 deletions(-) commit ef19098a718831462915782f836bd2b6cd1f8f9b Author: Marcus Cooper Date: Mon Sep 4 19:47:21 2017 +0200 ARM: dts: sunxi: h3/h5: Add DAI nodes Add the new DAI blocks to the device tree. I2S0 and I2S1 are for connecting to an external codec. Signed-off-by: Marcus Cooper Signed-off-by: Maxime Ripard arch/arm/boot/dts/sunxi-h3-h5.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 3b97059133a931797248670570205333492daa0e Author: Philipp Rossak Date: Fri Sep 1 18:30:00 2017 +0200 ARM: dts: sun8i: h3: Enable AP6212 WiFi on mmc1 on Nanopi M1 Plus The WiFi side of the AP6212 WiFi/BT combo module is connected to mmc1. There are also GPIOs for enable and interrupts. Enable WiFi on this board by enabling mmc1 and adding the power sequencing clocks and GPIO, as well as the chip's interrupt line. Signed-off-by: Philipp Rossak Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 0e23372080def7bb6526f694c478e285a3bb8908 Author: Maxime Ripard Date: Fri Sep 1 15:48:51 2017 +0200 arm: dts: sun8i: Add the TBS A711 tablet devicetree The TBS A711 is a tablet with an A83T, a modem, wifi/BT chip, an eMMC and a 1024x600 LVDS display. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 199 ++++++++++++++++++++++++++++++ 2 files changed, 200 insertions(+) commit d84a0c0afdfdd826a15a3970adf1a9e9ba59f1f5 Author: Priit Laes Date: Sun Sep 3 16:50:18 2017 +0300 ARM: dts: sun4i: Add i2s0 block to dtsi sun4i-a10.dtsi was missing i2s0 block. Add it. Signed-off-by: Priit Laes Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit a7977bbbc67a8a5f99c18815dab776c67dbcc90f Author: Marcus Cooper Date: Sun Sep 3 17:08:52 2017 +0200 ARM: dts: sun6i: a31: Add DAI nodes Add the new DAI blocks to the device tree. Signed-off-by: Marcus Cooper Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun6i-a31.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit e488af71aa6704f327de6a7df7ae91df8f2997a0 Author: Maxime Ripard Date: Thu Aug 24 15:48:26 2017 +0200 arm: dts: sun8i: a83t: Add the UART1 controller The A83T has an UART1 controller, with the RTS and CTS pins routed so it can be used for devices with hardware flow control, like a bluetooth chip. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit bc19e7a57811c3aee3fbfa29d80c3981494034ba Author: Maxime Ripard Date: Thu Aug 24 15:48:03 2017 +0200 arm: dts: sun8i: a83t: Add MMC1 pins Add the pinctrl definitions for the A83t MMC1 controller. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 57314bfaf5ac9871253c9938adeef5a763dc6235 Author: Maxime Ripard Date: Mon Jul 17 15:13:08 2017 +0200 arm: dts: sun8i: a83t: Remove useless, empty nodes Those nodes are useless, remove them. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-a83t.dtsi | 6 ------ 1 file changed, 6 deletions(-) commit 912620c02c314a697b05d52263212c24a2a6b05b Author: Tomas Novotny Date: Mon Jun 26 16:30:16 2017 +0200 dt-bindings: add vendor prefix for Touchless Biometric Systems AG TBS is a company providing biometrics products and solution in Access control and time management. Signed-off-by: Tomas Novotny Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit dd13cbf7fc3cccd03bfa86d9292d9b960eb1fa70 Author: Stefan Mavrodiev Date: Mon Aug 28 09:32:42 2017 +0300 ARM: dts: sun7i: Fix A20-OLinuXino-MICRO dts for LAN8710 From revision J the board uses new phy chip LAN8710. Compared with RTL8201, RA17 pin is TXERR. It has pullup which causes phy not to work. To fix this PA17 is muxed with GMAC function. This makes the pin output-low. This patch is compatible with earlier board revisions, since this pin wasn't connected to phy. Signed-off-by: Stefan Mavrodiev Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit e7b094c6ad4013ada1dce05325121c7c217fcfaa Author: Philipp Rossak Date: Wed Aug 30 05:01:10 2017 +0200 ARM: dts: sun8i: h3: Enable AP6212 BT on uart3 on Nanopi M1 Plus The BT side of the AP6212 WiFi/BT combo module is connected to uart3. Enable BT on this board by enabling uart3 with using additionally the cts and rts pins. Signed-off-by: Philipp Rossak Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 5a8e62eb576c666da6c4fb2626cd0d07dfa74a65 Author: Philipp Rossak Date: Wed Aug 30 05:01:09 2017 +0200 ARM: dts: sun8i: h3: Adding UART3 RTS and CTS Pins This node adds the definition for the UART3 RTS and CTS Pins That makes it able to use UART3 with RTS and CTS. Signed-off-by: Philipp Rossak Signed-off-by: Maxime Ripard arch/arm/boot/dts/sunxi-h3-h5.dtsi | 5 +++++ 1 file changed, 5 insertions(+) commit 9db79e413a08bbe8d6831ad06cc074d0cfeec433 Author: Philipp Rossak Date: Wed Aug 30 05:01:05 2017 +0200 ARM: dts: sun8i: h3: nanopi-m1-plus: Enable IR controller The Nanopi M1 Plus has an onboard IR receiver. This enables the onboard IR receiver subnode. Signed-off-by: Philipp Rossak Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-nanopi-m1-plus.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit 6b916dbe5ed73ecde15cc87bad0b1c957969b438 Author: Philipp Rossak Date: Wed Aug 30 05:01:04 2017 +0200 ARM: dts: sun8i: h3: nanopi-m1: Enable IR controller The Nanopi M1 has an onboard IR receiver. This enables the onboard IR receiver subnode. Signed-off-by: Philipp Rossak Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun8i-h3-nanopi-m1.dts | 6 ++++++ 1 file changed, 6 insertions(+) commit f41002663ff37b8a210674c780c9b76181cdd366 Author: Harald Geyer Date: Tue Aug 29 19:08:10 2017 +0200 ARM: dts: sun7i: Enable power supplies on A20-OLinuxIno-Micro The axp209.dtsi defines nodes for ac, usb and battery supplies for a while now. This patch enables these nodes for the A20-Olinuxino-Micro, which has connectors for all three of them. The patch was run-tested against linux-next-20170825. Signed-off-by: Harald Geyer Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit e34e681f241ed706d91c58e5680a77fc3cb9109d Author: Stefan Mavrodiev Date: Mon Aug 28 09:32:43 2017 +0300 ARM: dts: sun7i: Add dts file for A20-OLinuXino-MICRO-eMMC A20-OLinuXino-MICRO has option with onboard eMMC chip. For now it's only shipped with 4BG chip, but in the future this may change. Signed-off-by: Stefan Mavrodiev Signed-off-by: Maxime Ripard arch/arm/boot/dts/Makefile | 1 + .../boot/dts/sun7i-a20-olinuxino-micro-emmc.dts | 70 ++++++++++++++++++++++ 2 files changed, 71 insertions(+) commit 41193869f2bdb585ce09bfdd16d9482aadd560ad Author: Priit Laes Date: Wed Aug 23 20:23:33 2017 +0300 ARM: dts: sun4i: Convert to CCU Convert sun4i-a10.dtsi to new CCU driver. Tested on Gemei G9 tablet. Signed-off-by: Priit Laes Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 649 +++++---------------------------------- 1 file changed, 75 insertions(+), 574 deletions(-) commit f18698e1c66338b902de386e4ad97b8b1b9d999d Author: Priit Laes Date: Wed Aug 23 20:23:32 2017 +0300 ARM: dts: sun7i: Convert to CCU Convert sun7i-a20.dtsi to new CCU driver. Tested on Cubietruck. Signed-off-by: Priit Laes Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20.dtsi | 721 +++++---------------------------------- 1 file changed, 86 insertions(+), 635 deletions(-) commit a894990ac994a53bc5a0cc694eb12f3c064c18c5 Author: Alexander Syring Date: Thu Sep 14 14:05:19 2017 +0200 clk: sunxi-ng: Fix missing CLK_SET_RATE_PARENT in ccu-sun4i-a10.c When using cpufreq-dt with default govenor other than "performance" system freezes while booting. Adding CLK_SET_RATE_PARENT | CLK_IS_CRITICAL to clk_cpu fixes the problem. Tested on Cubietruck (A20). Fixes: c84f5683f6E ("clk: sunxi-ng: Add sun4i/sun7i CCU driver") Acked-by: Chen-Yu Tsai Signed-off-by: Alexander Syring Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun4i-a10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 70641ccad7d19b8229bf1cac33f5b8e03fdc7c5a Author: Icenowy Zheng Date: Sun Sep 10 20:40:06 2017 +0800 clk: sunxi-ng: add CLK_SET_RATE_PARENT flag to H3 GPU clock The GPU clock on H3 has only one parent, PLL-GPU, and the PLL is only the parent of the GPU clock. The GPU clock can be tweaked by tweaking the PLL-GPU clock. Add CLK_SET_RATE_PARENT flag to allow tweaking the GPU clock via tweaking PLL-CPU. Fixes: 0577e4853bfb ("clk: sunxi-ng: Add H3 clocks") Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62d212bdb022deeb875f92f6e376c799e3f35eca Author: Icenowy Zheng Date: Sun Sep 10 20:40:05 2017 +0800 clk: sunxi-ng: add CLK_SET_RATE_UNGATE to all H3 PLLs The PLLs on H3 have a lock bit, which will only be set to 1 when the PLL is really working. Add CLK_SET_RATE_UNGATE to the PLLs, otherwise it will timeout when trying to set PLL clock frequency without enabling it. Fixes: 0577e4853bfb ("clk: sunxi-ng: Add H3 clocks") Signed-off-by: Icenowy Zheng Signed-off-by: Maxime Ripard drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 178465474c216439e3b683017a11a5c68ea0c05a Author: Dietmar Eggemann Date: Wed Aug 30 15:41:19 2017 +0100 ARM: dts: exynos: add exynos5422 cpu capacity-dmips-mhz information The following 'capacity-dmips-mhz' dt property values are used: Cortex-A15: 1024, Cortex-A7: 539 They have been derived form the cpu_efficiency values: Cortex-A15: 3891, Cortex-A7: 2048 by scaling them so that the Cortex-A15s (big cores) use 1024. The cpu_efficiency values were originally derived from the "Big.LITTLE Processing with ARM Cortex™-A15 & Cortex-A7" white paper (http://www.cl.cam.ac.uk/~rdm34/big.LITTLE.pdf). Table 1 lists 1.9x (3891/2048) as the Cortex-A15 vs Cortex-A7 performance ratio for the Dhrystone benchmark. The following platforms are affected once cpu-invariant accounting support is re-connected to the task scheduler: odroidxu3, odroidxu3-lite, odroidxu4 Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Dietmar Eggemann Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5422-cpus.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit 45bfc2a3f762b5d5282d5ec2dd96b1fe3a9329ca Author: Dietmar Eggemann Date: Wed Aug 30 15:41:18 2017 +0100 ARM: dts: exynos: add exynos5420 cpu capacity-dmips-mhz information The following 'capacity-dmips-mhz' dt property values are used: Cortex-A15: 1024, Cortex-A7: 539 They have been derived from the cpu_efficiency values: Cortex-A15: 3891, Cortex-A7: 2048 by scaling them so that the Cortex-A15s (big cores) use 1024. The cpu_efficiency values were originally derived from the "Big.LITTLE Processing with ARM Cortex™-A15 & Cortex-A7" white paper (http://www.cl.cam.ac.uk/~rdm34/big.LITTLE.pdf). Table 1 lists 1.9x (3891/2048) as the Cortex-A15 vs Cortex-A7 performance ratio for the Dhrystone benchmark. The following platforms are affected once cpu-invariant accounting support is re-connected to the task scheduler: arndale-octa, peach-pi, peach-pit, smdk5420 The patch has been tested on Samsung Chromebook 2 13" (peach-pi, Exynos 5800). $ cat /sys/devices/system/cpu/cpu*/cpu_capacity 1024 1024 1024 1024 389 389 389 389 The Cortex-A15 vs Cortex-A7 performance ratio is 1024/389 = 2.63. The values derived with the 'cpu_efficiency/clock-frequency dt property' solution are: $ cat /sys/devices/system/cpu/cpu*/cpu_capacity 1535 1535 1535 1535 448 448 448 448 The Cortex-A15 vs Cortex-A7 performance ratio is 1535/448 = 3.43. The discrepancy between 2.63 and 3.43 is due to the false assumption when using the 'cpu_efficiency/clock-frequency dt property' solution that the max cpu frequency of the little cpus is 1 GHZ and not 1.3 GHz. The Cortex-A7 cluster runs with a max cpu frequency of 1.3 GHZ whereas the 'clock-frequency' property value is set to 1 GHz. 3.43/1.3 = 2.64 $ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq 1800000 1800000 1800000 1800000 1300000 <-- max cpu frequency of the Cortex-A7s (little cores) 1300000 1300000 1300000 Running another benchmark (single-threaded sysbench affine to the individual cpus) with performance cpufreq governor on the Samsung Chromebook 2 13" showed the following numbers: $ for i in `seq 0 7`; do taskset -c $i sysbench --test=cpu --num-threads=1 --max-time=10 run | grep "total number of events:"; done total number of events: 1083 total number of events: 1085 total number of events: 1085 total number of events: 1085 total number of events: 454 total number of events: 454 total number of events: 454 total number of events: 454 The Cortex-A15 vs Cortex-A7 performance ratio is 2.39, i.e. very close to the one derived from the Dhrystone based one of the "Big.LITTLE Processing with ARM Cortex™-A15 & Cortex-A7" white paper (2.63). We don't aim for exact values for the cpu capacity values. Besides the CPI (Cycles Per Instruction), the instruction mix and whether the system runs cpu-bound or memory-bound has an impact on the cpu capacity values derived from these benchmark results. Cc: Rob Herring Cc: Mark Rutland Signed-off-by: Dietmar Eggemann Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5420-cpus.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) commit e740731dae9470f7fb86efa643ec881a66d4e4c0 Author: Willy Wolff Date: Thu Sep 7 18:10:00 2017 +0200 ARM: dts: exynos: fix incomplete Odroid-XU3/4 thermal-zones definition Odroid XU3/4 boards have thermal sensors per 4 pairs of A7+A15 cores but currently there is only one thermal-zone (including cooling maps) defined (for the first pair of cores - the first core of the A7 cluster and the first core of A15 cluster) so i.e. if the task is running on any of A15 cores but the first one, such core can reach high temperature without any proper cooling action. Fix it by adding missing thermal-zones definitions. Also while at it fix the number of steps in cpufreq cooling for cpu4 (11 steps for A15 corresponds to 700MHz, for 600MHz 12 steps should be used). Signed-off-by: Willy Wolff [b.zolnierkie: rewrote patch subject & description + minor fixups] Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 239 +++++++++++++++++++-- 1 file changed, 219 insertions(+), 20 deletions(-) commit 48f192cf84a09cbf38bbb85f3a85494f005ffa55 Author: Heiko Stuebner Date: Wed May 31 11:59:56 2017 +0200 arm64: dts: rockchip: enable display subsystem on rk3399-firefly Enable the graphics-related nodes on the rk3399-firefly which makes it possible to see output on the on-board hdmi output. Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 9f3d07e08632e3b6f10d5241c584a83187920a18 Author: Jeffy Chen Date: Thu Aug 24 12:52:22 2017 +0800 arm64: dts: rockchip: Add rt5514 dsp for rk3399 gru Add rt5514 dsp of_node to codec list for Gru boards. Signed-off-by: Jeffy Chen Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fae7ee435d40204b315f27f678f9607a16fcc362 Author: Liang Chen Date: Thu Aug 24 10:37:03 2017 +0800 arm64: dts: rockchip: add cpu regulator for rk3328 evaluation board RK3328 Evaluation Board use rk805 pmic, and one of the DCDCs in rk805 is for cpu regulator, assign the cpu regulator, so the cpufreq can work fine. Signed-off-by: Liang Chen Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3328-evb.dts | 4 ++++ 1 file changed, 4 insertions(+) commit b9299452cb9ffb5c84dda0b2b784fd87278d1819 Author: Liang Chen Date: Thu Aug 24 10:37:01 2017 +0800 arm64: dts: rockchip: add mmc nodes for rk3328 evaluation board Rockchip's rk3328 evaluation board has 3 mmc controllers for sdio/sdmmc/emmc, let's enable them. Signed-off-by: Liang Chen Signed-off-by: Heiko Stuebner arch/arm64/boot/dts/rockchip/rk3328-evb.dts | 68 ++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) commit 7d705c2a9ece3cce386b4deedc8c40e16257fe26 Author: Jagan Teki Date: Mon Sep 11 13:56:21 2017 +0530 ARM: dts: rockchip: enable vops and hdmi output on rk3288-vyasa Enable VOPs, hdmi node and the i2c bus used for HDMI DDC reading on the rk3288-vyasa board. Signed-off-by: Jagan Teki Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288-vyasa.dts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 15306b752f5a91ade95882aba83022f54fbaa433 Author: Jagan Teki Date: Sat Aug 26 15:39:24 2017 +0530 ARM: dts: rockchip: Add rk3288 vyasa board This patch adds initial support for rk3288 based Vyasa board, which is made by Amarula Solutions. Signed-off-by: Jagan Teki Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/arm/rockchip.txt | 4 + arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/rk3288-vyasa.dts | 311 +++++++++++++++++++++ 3 files changed, 317 insertions(+), 1 deletion(-) commit 50544f39018f8c75778d84228535bf4a0d588583 Author: Jagan Teki Date: Sat Aug 26 12:21:42 2017 +0530 dt-bindings: Add vendor prefix for Amarula Solutions Added 'amarula' as a vendor prefix for Amarula Solutions, specialist in Embedded and Opensource solutions. Signed-off-by: Jagan Teki Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 316ffa32d55d55ed7dd2a3b0696f1df29aaa0585 Author: Sandy Huang Date: Sat Sep 2 19:28:52 2017 +0800 ARM: dts: rockchip: add LVDS node for rk3288 Add LVDS info in rk3288.dtsi for LVDS driver Signed-off-by: Sandy Huang Signed-off-by: Heiko Stuebner arch/arm/boot/dts/rk3288.dtsi | 52 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit 95a0cfe98ca07bb17dcdc285097a742a975456eb Author: Noralf Trønnes Date: Fri Sep 8 17:07:26 2017 +0200 drm/tinydrm: Drop driver registered message No need to put out a driver registered message since drm_dev_register() does that now. SPI speed is an important metric when dealing with display problems, so retain that info. Cc: David Lechner Signed-off-by: Noralf Trønnes Acked-by: David Lechner Link: https://patchwork.freedesktop.org/patch/msgid/1504883250-43487-8-git-send-email-noralf@tronnes.org drivers/gpu/drm/tinydrm/mi0283qt.c | 14 +------------- drivers/gpu/drm/tinydrm/mipi-dbi.c | 2 ++ drivers/gpu/drm/tinydrm/repaper.c | 12 ++---------- drivers/gpu/drm/tinydrm/st7586.c | 14 +------------- 4 files changed, 6 insertions(+), 36 deletions(-) commit a5ea8a6803fdec949f752d3aa36b1a88e453b929 Author: Noralf Trønnes Date: Mon Sep 11 18:37:45 2017 +0200 drm/gem-fb-helper: Use debug message on gem lookup failure GEM lookup failure can easily be triggered by userspace so make it a debug message, not an error message. Also remove unnecessary inner parentheses and fix alphabetical struct declaration order. Cc: Laurent Pinchart Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/1505147865-18194-2-git-send-email-noralf@tronnes.org drivers/gpu/drm/drm_gem_framebuffer_helper.c | 4 ++-- include/drm/drm_gem_framebuffer_helper.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit bd10635335cd5555d4f3d7eec0df32033443bc4b Author: Noralf Trønnes Date: Sun Aug 13 15:31:53 2017 +0200 drm/imx: Use drm_gem_fb_create() and drm_gem_fb_prepare_fb() drm_fb_cma_create() and drm_fb_cma_prepare_fb() are just wrappers now, use drm_gem_fb_create() and drm_gem_fb_prepare_fb() directly. Cc: Philipp Zabel Signed-off-by: Noralf Trønnes Acked-by: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-11-git-send-email-noralf@tronnes.org drivers/gpu/drm/imx/imx-drm-core.c | 3 ++- drivers/gpu/drm/imx/ipuv3-plane.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 1591017442ffb6b0a735abe4f611a203fb632501 Author: Lars-Peter Clausen Date: Tue Sep 5 14:10:18 2017 +0200 drm/bridge: adv7511: Constify HDMI CODEC platform data The HDMI codec platform data is global driver state shared by all instances. As such it should not be modified (and is not), to make this explicit declare it as const. Signed-off-by: Lars-Peter Clausen Tested-by: John Stultz Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20170905121018.11477-4-lars@metafoo.de drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f47f1c106d99f367f2924ce35741050fb87e081 Author: Lars-Peter Clausen Date: Tue Sep 5 14:10:17 2017 +0200 drm/bridge: adv7511: Enable connector polling when no interrupt is specified Fall back to polling the connector for connect and disconnect events when no interrupt is specified. Otherwise these events will not be noticed and monitor hotplug does not work. Signed-off-by: Lars-Peter Clausen Tested-by: John Stultz Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20170905121018.11477-3-lars@metafoo.de drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit fcb4c5eee79ea17e1fbc5b3ebbd575d56714fabe Author: Lars-Peter Clausen Date: Tue Sep 5 14:10:16 2017 +0200 drm/bridge: adv7511: Remove private copy of the EDID The adv7511 driver keeps a private copy of the EDID in its driver state struct. But this copy is only used in adv7511_get_modes() where it is also retrieved, so there is no need to keep this extra copy around. If a need to access the EDID elsewhere in the driver ever arises the copy that is stored in the connector can be used. This copy is accessible through drm_connector_get_edid(). Note, this patch removes the NULL check of the EDID before passing it to drm_detect_hdmi_monitor(), but that is fine since the function correctly handles the case where the EDID is NULL. Signed-off-by: Lars-Peter Clausen Tested-by: John Stultz Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20170905121018.11477-2-lars@metafoo.de drivers/gpu/drm/bridge/adv7511/adv7511.h | 2 -- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 16 ++++++---------- 2 files changed, 6 insertions(+), 12 deletions(-) commit 6f39ed4f0939e6bef722f0096894c1a986da9c9a Author: Lars-Peter Clausen Date: Tue Sep 5 14:10:15 2017 +0200 drm/bridge: adv7511: Properly update EDID when no EDID was found Currently adv7511_get_modes() bails out early when no EDID could be retrieved. This leaves the previous EDID in place, which is typically not the intended behavior and might confuse applications. Instead the EDID should be cleared when no EDID could be retrieved. All functions that are called after the EDID check handle the case where the EDID is NULL just fine and exhibit the expected behavior, so just drop the check. Signed-off-by: Lars-Peter Clausen Tested-by: John Stultz Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20170905121018.11477-1-lars@metafoo.de drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 2 -- 1 file changed, 2 deletions(-) commit 7c82532dcce8b39991ef5f486c2b54d7bb3e171b Author: Colin Ian King Date: Thu Sep 7 14:51:33 2017 +0100 scsi: libcxgbi: remove redundant check and close on csk csk is always null on the error return path and so the non-null check and call to cxgbi_sock_closed on csk is redundant and can be removed. Detected by: CoverityScan CID#114329 ("Logically dead code") Signed-off-by: Colin Ian King Acked-by: Varun Prakash Signed-off-by: Martin K. Petersen drivers/scsi/cxgbi/libcxgbi.c | 2 -- 1 file changed, 2 deletions(-) commit 7f6ab5693f66e5a638925f28e17ea7576fc69f2f Author: chenxiang Date: Wed Sep 6 17:15:14 2017 +0800 scsi: libsas: add event to defer list tail instead of head when draining Events will be added to defer_q list when setting ha->status to SAS_HA_DRAINING. Events will be called after drain workqueue. Those events are added to the head of list, but they are scanned one by one from the head to the tail, which will cause those events be called in the reverse order of being added. So change list_add to list_add_tail in function sas_queue_work. Signed-off-by: chenxiang Signed-off-by: Jason Yan CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5956d8e6bdfc08f5609f59aa00015acbc4ce1bdf Author: Jason Yan Date: Wed Sep 6 17:15:07 2017 +0800 scsi: libsas: rename notify_port_event() for consistency Rename function notify_port_event() to sas_notify_port_event(), which will be consistent with sas_notify_phy_event(). Signed-off-by: Jason Yan CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/libsas/sas_event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8a11282aa1b7d618f29f531e9d992561f87cfd8a Author: Jason Yan Date: Wed Sep 6 17:15:06 2017 +0800 scsi: libsas: remove unused port_gone_completion and DISCE_PORT_GONE No one uses the port_gone_completion in struct asd_sas_port and DISCE_PORT_GONE in enum disover_event, clean them out. Signed-off-by: Jason Yan CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen include/scsi/libsas.h | 3 --- 1 file changed, 3 deletions(-) commit 0d78f969b10f27e0be34210d482a01e1ee92994c Author: Jason Yan Date: Wed Sep 6 17:15:05 2017 +0800 scsi: libsas: remove the numbering for each event enum Numbering for each event enum makes no sense. Remove the numbering so that we don't have to calculate the number by hand every time. Signed-off-by: Jason Yan CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen include/scsi/libsas.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit 042ebd293b862c491e31aea17b540317a1b9af21 Author: Jason Yan Date: Wed Sep 6 17:15:04 2017 +0800 scsi: libsas: kill useless ha_event and do some cleanup The ha_event now has only one event HAE_RESET, and this event does nothing. Kill it and do some cleanup. This is a preparation for enhance libsas hotplug feature in the next patches. Signed-off-by: Jason Yan Signed-off-by: John Garry Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams Signed-off-by: Martin K. Petersen drivers/scsi/aic94xx/aic94xx_hwi.c | 3 --- drivers/scsi/hisi_sas/hisi_sas_main.c | 1 - drivers/scsi/libsas/sas_dump.c | 10 ---------- drivers/scsi/libsas/sas_dump.h | 1 - drivers/scsi/libsas/sas_event.c | 20 -------------------- drivers/scsi/libsas/sas_init.c | 12 ------------ include/scsi/libsas.h | 21 --------------------- 7 files changed, 68 deletions(-) commit 832e1eeeba916b389c3ba090d8335aff3089428e Author: Maxime Bellengé Date: Thu Sep 7 21:17:28 2017 +0200 HID: asus: Add support for Fn keys on Asus ROG G752 This patch adds support for Fn keys on Asus ROG G752 laptop. The report descriptor is broken so I fixed it. Tested on an Asus G752VT. Resent fix white space fixes Signed-off-by: Maxime Bellengé Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina drivers/hid/hid-asus.c | 29 +++++++++++++++++++++++++++++ drivers/hid/hid-core.c | 2 +- drivers/hid/hid-ids.h | 1 + 3 files changed, 31 insertions(+), 1 deletion(-) commit 7eccdf005b2f240b9e9f53c72eb19367e21a8cf8 Author: Hannes Reinecke Date: Fri Sep 15 13:12:14 2017 +0200 scsi: fcoe: open-code fcoe_destroy_work() for NETDEV_UNREGISTER When a NETDEV_UNREGISTER notification is received the network device is _deleted_ after the callback returns. So we cannot use a workqueue here, as this would cause an inversion when removing the device as the netdev is already gone. This manifests with a nasty warning during shutdown: sysfs group ffffffff81eff0e0 not found for kobject 'fc_host7' So open-code fcoe_destroy_work() when receiving the notification to avoid this inversion. Signed-off-by: Hannes Reinecke Reviewed-by: Lee Duncan Acked-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/fcoe/fcoe.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 6f7f74abaec12af6becf0a471d5968bce2f389b6 Author: Hannes Reinecke Date: Fri Sep 15 13:12:13 2017 +0200 scsi: fcoe: separate out fcoe_vport_remove() Separate out fcoe_vport_remove() from fcoe_destroy_work(). Required for the next patch. Signed-off-by: Hannes Reinecke Reviewed-by: Lee Duncan Acked-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/fcoe/fcoe.c | 55 +++++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 22 deletions(-) commit 9eed785b02fec925fd6ed7272ad774a803647758 Author: Hannes Reinecke Date: Fri Sep 15 13:12:12 2017 +0200 scsi: fcoe: move fcoe_interface_remove() out of fcoe_interface_cleanup() This closes a possible race condition in _fcoe_create() where we drop the rtnl_lock() before calling fcoe_interface_remove(). Signed-off-by: Hannes Reinecke Reviewed-by: Lee Duncan Acked-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen drivers/scsi/fcoe/fcoe.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 2a8ee61685a9fd7f054b0596865290baffe84c16 Author: Colin Ian King Date: Tue Sep 12 12:32:28 2017 +0100 scsi: ufs: tc-dwc-g210: make arrays static, reduces object code size Don't populate const arrays on the stack, instead make them static. Makes the object code smaller by over 740 bytes. Before: text data bss dec hex filename 3840 208 0 4048 fd0 drivers/scsi/ufs/tc-dwc-g210.o After: text data bss dec hex filename 2679 624 0 3303 ce7 drivers/scsi/ufs/tc-dwc-g210.o Signed-off-by: Colin Ian King Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen drivers/scsi/ufs/tc-dwc-g210.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit cd6372b614c4504214baab838f77b06503c9cd86 Author: Christos Gkekas Date: Sun Sep 10 13:18:54 2017 +0100 scsi: bnx2i: Clean up unused pointers in bnx2i_hwi Pointers bnx2i_cmd are set but never used, so they can be removed. Signed-off-by: Christos Gkekas Acked-by: Manish Rangankar Signed-off-by: Martin K. Petersen drivers/scsi/bnx2i/bnx2i_hwi.c | 10 ---------- 1 file changed, 10 deletions(-) commit 858e51e8cbe11a8c59b24aaf4cb40f7f4e7a2feb Author: Colin Ian King Date: Fri Sep 8 09:02:01 2017 +0100 scsi: lpfc: remove redundant null check on eqe The pointer eqe is always non-null inside the while loop, so the check to see if eqe is NULL is redudant and hence can be removed. Detected by CoverityScan CID#1248693 ("Logically Dead Code") Signed-off-by: Colin Ian King Acked-by: James Smart Signed-off-by: Martin K. Petersen drivers/scsi/lpfc/lpfc_sli.c | 3 --- 1 file changed, 3 deletions(-) commit 5d9da759f7587c87252ef98e70bc0b4a89e4d036 Author: Jiri Kosina Date: Thu Sep 14 14:15:36 2017 -0700 livepatch: __klp_shadow_get_or_alloc() is local to shadow.c ... therefore make it static. Fixes: 439e7271dc2 ("livepatch: introduce shadow variable API") Acked-by: Joe Lawrence Signed-off-by: Jiri Kosina kernel/livepatch/shadow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 309bd8ed464fc08f79152e4a18b1da2b11410842 Author: Ville Syrjälä Date: Fri Aug 18 21:37:05 2017 +0300 drm/i915: Reinstate GMBUS and AUX interrupts on gen4/g4x Now that we're not using MSI anymore on gen4 we can start using GMBUS and AUX interrupts again. These were disabled on account of them causing the hardware to somehow generate legacy interrupts even when MSI was enabled. See commit c12aba5aa0e6 ("drm/i915: stop using GMBUS IRQs on Gen4 chips") and commit 4e6b788c3f23 ("drm/i915: Disable dp aux irq on g4x") for more details. Cc: Daniel Vetter Cc: Chris Wilson Cc: Jiri Kosina Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818183705.27850-17-ville.syrjala@linux.intel.com Acked-by: Chris Wilson drivers/gpu/drm/i915/i915_drv.h | 8 +++++--- drivers/gpu/drm/i915/i915_pci.c | 6 ------ 2 files changed, 5 insertions(+), 9 deletions(-) commit 6bcdb1c839b5d75270d4a492221a7af891d8a484 Author: Ville Syrjälä Date: Fri Aug 18 21:37:04 2017 +0300 drm/i915: Remove duplicated irq_preinstall/uninstall hooks All the irq_preinstall and irq_uninstall hooks are now identical. Let's just rename them all the irq_reset and remove the pointless duplicates. Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818183705.27850-16-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_irq.c | 117 ++++++---------------------------------- 1 file changed, 17 insertions(+), 100 deletions(-) commit d420a50c21efa4ec9e43494547de4f2b1826e167 Author: Ville Syrjälä Date: Fri Aug 18 21:37:03 2017 +0300 drm/i915: Clean up the HWSTAM mess Currently we're unmasking some random looking bits in HWSTAM on gen3/4/5. The two bits we apparently unmask are 0 and 12, and also bits 16-31 on gen4/5. What those bits do depends on the gen as follows: bit 0: Breakpoint (gen2), ASLE (gen3), reserved (gen4), render user interrupt (gen5) bit 12: Sync flush statusa (gen2-4), reserved (gen5) bit 16-31: The ones that can unmasked seem to be mostly some display stuff on gen4. Bit 18 is the PIPE_CONTROL notify, which might be the only intresting one. On gen5 all the bits are reserved. So I don't know whether we actually depend on that status page write somehow. Extra seqno coherency by accident perhaps? Except we don't even unmask the user interrupt bit in HWSTAM except on gen5, and sync flush isn't something we use normally, so seems unlikely. So let's just assume we don't need any of this and mask everything in HWSTAM. From gen6 onwards there's a separate HWSTAM for each engine, and so we deal with them during the engine setup. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818183705.27850-15-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_irq.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit c5498089463b94690085158eba7dd29835c8c9b8 Author: Ville Syrjälä Date: Fri Aug 18 21:37:01 2017 +0300 drm/i915: Mask everything in ring HWSTAM on gen6+ in ringbuffer mode The execlist code already masks everything in the ring HWSTAM, but the ringbuffer code doesn't. Let's go ahead and do that. Pre-gen6 platforms setup HWSTAM during irq setup already since there's just the one register, and it also contains bits for non-ring interrupts. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818183705.27850-13-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +++ 1 file changed, 3 insertions(+) commit 3dcf4f207e8e0703cc00d5384e46ed6eb6902613 Author: Michal Wajdeczko Date: Thu Sep 14 15:08:03 2017 +0000 drm/i915: Extend private i915_param_named macro with description We're always specifying description of each module param in separate macro. Let's combine description into our main macro. Started with Coccinelle, followed by minor cleanup. @match1@ declarer name MODULE_PARM_DESC; identifier n; constant c; @@ ( - MODULE_PARM_DESC(n, c); ) @fix1 depends on match1@ declarer name i915_param_named; declarer name i915_param_named_unsafe; identifier match1.n; constant match1.c; @@ ( i915_param_named(n, ... + , c ); | i915_param_named_unsafe(n, ... + , c ); ) Suggested-by: Jani Nikula Signed-off-by: Michal Wajdeczko Cc: Jani Nikula Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170914150805.28376-4-michal.wajdeczko@intel.com drivers/gpu/drm/i915/i915_params.c | 167 +++++++++++++++---------------------- 1 file changed, 67 insertions(+), 100 deletions(-) commit c95469324518f3ab216d7e3a820b5f0609569681 Author: Michal Wajdeczko Date: Thu Sep 14 15:08:02 2017 +0000 drm/i915: Introduce custom variant of module_param_named macro As we now use same name for public module param and its local representation we can simplify param definition macro. Changes done with Coccinelle: @@ declarer name module_param_named; declarer name module_param_named_unsafe; declarer name i915_param_named; declarer name i915_param_named_unsafe; identifier n; @@ ( -module_param_named(n, i915.n, +i915_module_param_named(n, ...); | -module_param_named_unsafe(n, i915.n, +i915_module_param_named_unsafe(n, ...); ) Suggested-by: Chris Wilson Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170914150805.28376-3-michal.wajdeczko@intel.com drivers/gpu/drm/i915/i915_params.c | 85 ++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 40 deletions(-) commit 17533bf95719466c524e07a5880d47a8d7aaa0cd Author: Michal Wajdeczko Date: Thu Sep 14 15:08:01 2017 +0000 drm/i915: Rename lvds_use_ssc modparam to panel_use_ssc This modparam affects not only LVDS but also eDP panels. Additionally with this rename we will keep modparam and i915_params field name in sync. This patch will unblock us with further improvements around params defs. Suggested-by: Ville Syrjala Signed-off-by: Michal Wajdeczko Cc: Ville Syrjala Cc: Chris Wilson Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170914150805.28376-2-michal.wajdeczko@intel.com drivers/gpu/drm/i915/i915_params.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 21cc6431e0c2d7c3a2e2fd4dd002400be73cb270 Author: Chris Wilson Date: Mon Sep 11 09:41:25 2017 +0100 drm/i915: Mark the userptr invalidate workqueue as WQ_MEM_RECLAIM To silence the critcs: [56532.161115] workqueue: PF_MEMALLOC task 36(khugepaged) is flushing !WQ_MEM_RECLAIM i915-userptr-release: (null) [56532.161138] ------------[ cut here ]------------ [56532.161144] WARNING: CPU: 1 PID: 36 at kernel/workqueue.c:2418 check_flush_dependency+0xe8/0xf0 [56532.161145] Modules linked in: wmi_bmof [56532.161148] CPU: 1 PID: 36 Comm: khugepaged Not tainted 4.13.0-krejzi #1 [56532.161149] Hardware name: HP HP ProBook 470 G3/8102, BIOS N78 Ver. 01.17 06/08/2017 [56532.161150] task: ffff8802371ee200 task.stack: ffffc90000174000 [56532.161152] RIP: 0010:check_flush_dependency+0xe8/0xf0 [56532.161152] RSP: 0018:ffffc900001777b8 EFLAGS: 00010286 [56532.161153] RAX: 000000000000006c RBX: ffff88022fc5a000 RCX: 0000000000000001 [56532.161154] RDX: 0000000000000000 RSI: 0000000000000086 RDI: 00000000ffffffff [56532.161155] RBP: 0000000000000000 R08: 14f038bb55f6dae0 R09: 0000000000000516 [56532.161155] R10: ffffc900001778a0 R11: 000000006c756e28 R12: ffff8802371ee200 [56532.161156] R13: 0000000000000000 R14: 000000000000000b R15: ffffc90000177810 [56532.161157] FS: 0000000000000000(0000) GS:ffff880240480000(0000) knlGS:0000000000000000 [56532.161158] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [56532.161158] CR2: 0000000004795ff8 CR3: 000000000220a000 CR4: 00000000003406e0 [56532.161159] Call Trace: [56532.161161] ? flush_workqueue+0x136/0x3e0 [56532.161178] ? _raw_spin_unlock_irqrestore+0xf/0x30 [56532.161179] ? try_to_wake_up+0x1ce/0x3b0 [56532.161183] ? i915_gem_userptr_mn_invalidate_range_start+0x13f/0x150 [56532.161184] ? _raw_spin_unlock+0xd/0x20 [56532.161186] ? i915_gem_userptr_mn_invalidate_range_start+0x13f/0x150 [56532.161189] ? __mmu_notifier_invalidate_range_start+0x4a/0x70 [56532.161191] ? try_to_unmap_one+0x5e5/0x660 [56532.161193] ? rmap_walk_file+0xe4/0x240 [56532.161195] ? __ClearPageMovable+0x10/0x10 [56532.161196] ? try_to_unmap+0x8c/0xe0 [56532.161197] ? page_remove_rmap+0x280/0x280 [56532.161199] ? page_not_mapped+0x10/0x10 [56532.161200] ? page_get_anon_vma+0x90/0x90 [56532.161202] ? migrate_pages+0x6a5/0x940 [56532.161203] ? isolate_freepages_block+0x330/0x330 [56532.161205] ? compact_zone+0x593/0x6a0 [56532.161206] ? enqueue_task_fair+0xc3/0x1180 [56532.161208] ? compact_zone_order+0x9b/0xc0 [56532.161210] ? get_page_from_freelist+0x24a/0x900 [56532.161212] ? try_to_compact_pages+0xc8/0x240 [56532.161213] ? try_to_compact_pages+0xc8/0x240 [56532.161215] ? __alloc_pages_direct_compact+0x45/0xe0 [56532.161216] ? __alloc_pages_slowpath+0x845/0xb90 [56532.161218] ? __alloc_pages_nodemask+0x176/0x1f0 [56532.161220] ? wait_woken+0x80/0x80 [56532.161222] ? khugepaged+0x29e/0x17d0 [56532.161223] ? wait_woken+0x80/0x80 [56532.161225] ? collapse_shmem.isra.39+0xa60/0xa60 [56532.161226] ? kthread+0x10d/0x130 [56532.161227] ? kthread_create_on_node+0x60/0x60 [56532.161228] ? ret_from_fork+0x22/0x30 [56532.161229] Code: 00 8b b0 10 05 00 00 48 8d 8b b0 00 00 00 48 8d 90 b8 06 00 00 49 89 e8 48 c7 c7 38 55 09 82 c6 05 f9 c6 1d 01 01 e8 0e a1 03 00 <0f> ff e9 6b ff ff ff 90 48 8b 37 40 f6 c6 04 75 1b 48 c1 ee 05 [56532.161251] ---[ end trace 2ce2b4f5f69b803b ]--- Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170911084135.22903-2-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/i915_gem_userptr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e01e71fc49d4c95090a04f898a3fe788c652a04b Author: Chris Wilson Date: Thu Sep 14 17:42:13 2017 +0100 drm/i915: Remove unused 'in_vbl' from i915_get_crtc_scanoutpos() Commit 1bf6ad622b9b ("drm/vblank: drop the mode argument from drm_calc_vbltimestamp_from_scanoutpos") removed the use of in_vbl, but did not remove the local variable. Do so now. Fixes: 1bf6ad622b9b ("drm/vblank: drop the mode argument from drm_calc_vbltimestamp_from_scanoutpos") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Daniel Vetter Cc: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170914164213.18461-1-chris@chris-wilson.co.uk Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/i915_irq.c | 3 --- 1 file changed, 3 deletions(-) commit 439e7271dc2b63de379e37971dc2f64d71e24f8a Author: Joe Lawrence Date: Thu Aug 31 16:37:41 2017 -0400 livepatch: introduce shadow variable API Add exported API for livepatch modules: klp_shadow_get() klp_shadow_alloc() klp_shadow_get_or_alloc() klp_shadow_free() klp_shadow_free_all() that implement "shadow" variables, which allow callers to associate new shadow fields to existing data structures. This is intended to be used by livepatch modules seeking to emulate additions to data structure definitions. See Documentation/livepatch/shadow-vars.txt for a summary of the new shadow variable API, including a few common use cases. See samples/livepatch/livepatch-shadow-* for example modules that demonstrate shadow variables. [jkosina@suse.cz: fix __klp_shadow_get_or_alloc() comment as spotted by Josh] Signed-off-by: Joe Lawrence Acked-by: Josh Poimboeuf Acked-by: Miroslav Benes Signed-off-by: Jiri Kosina Documentation/livepatch/shadow-vars.txt | 192 +++++++++++++++++++++ include/linux/livepatch.h | 8 + kernel/livepatch/Makefile | 2 +- kernel/livepatch/shadow.c | 277 ++++++++++++++++++++++++++++++ samples/Kconfig | 5 +- samples/livepatch/Makefile | 3 + samples/livepatch/livepatch-shadow-fix1.c | 173 +++++++++++++++++++ samples/livepatch/livepatch-shadow-fix2.c | 168 ++++++++++++++++++ samples/livepatch/livepatch-shadow-mod.c | 224 ++++++++++++++++++++++++ 9 files changed, 1048 insertions(+), 4 deletions(-) commit 442aa277c066cec6cfe8508b3edbdda022b10568 Author: Manasi Navare Date: Thu Sep 14 11:31:39 2017 -0700 drm/i915/cnl: Change the macro name to DPLL_CFGCR0_DCO_FRACTION_SHIFT No functional changes. Only change the macro from "DPLL_CFGCR0_DC0_FRAC_SHIFT to DPLL_CFGCR0_DCO_FRACTION_SHIFT to be consistent with DPLL_CFGCR0_DCO_FRACTION_MASK and DPLL_CFGCR0_DCO_FRACTION Cc: Rodrigo Vivi Signed-off-by: Manasi Navare Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1505413899-30876-1-git-send-email-manasi.d.navare@intel.com drivers/gpu/drm/i915/i915_reg.h | 2 +- drivers/gpu/drm/i915/intel_ddi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 32debfcd3ff0939c93238ddde03ffcc96cca5c60 Author: John Keeping Date: Thu Sep 14 16:58:55 2017 +0100 ASoC: rockchip: i2s: fix unbalanced clk_disable mclk is enabled and disabled only in i2s_runtime_{resume,suspend}() and we ensure that the device is runtime suspended before reaching this clk_disable_unprepare() call, so it is wrong to call it again here. Signed-off-by: John Keeping Signed-off-by: Mark Brown sound/soc/rockchip/rockchip_i2s.c | 1 - 1 file changed, 1 deletion(-) commit 5190707e7a4fc701e94cd7e152d15dbba90b63ff Author: Ville Syrjälä Date: Fri Aug 18 21:37:02 2017 +0300 drm/i915: Gen3 HWSTAM is actually 32 bits Bspec claims that HWSTAM is only 16 bits on gen3, but the other interrupts registers are 32 bits and there are 18 valid interrupt bits. Hence a 16 bit HWSTAM wouldn't be able to contain all the bits, so it seems the spec is incorrect about the size of the register. And indeed I can clear bits 16 and 17 just fine with a 32 bit write. So let's adjust the code to treat the register as 32 bits. Acked-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818183705.27850-14-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit af722d280e8551e918b22e96f487824935470c9a Author: Ville Syrjälä Date: Fri Aug 18 21:37:00 2017 +0300 drm/i915: Rewrite GMCH irq handlers to avoid loops Eliminate the loops from the gen2-3 irq handlers. Since we don't use MSI anymore on these platforms, and thus the CPU interrupt will be level triggered, we shouldn't need to play any tricks with IER to induce edges from IIR. IIR itself still detects only edges from PIPESTAT & co. on gen4 but since IIR is double buffered and we only clear one bit per irq handler invocation we can use the normal "clear PIPESTAT & co. -> clear IIR" approach to ack the interrupts. On gen2 everything is level triggered, and gen3 presumably follows either the gen2 or gen4 approach since nothing else would really make sense. v2: Drop the IER tricks since we no longer use MSI Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818183705.27850-12-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_irq.c | 143 ++++++++++++++-------------------------- 1 file changed, 51 insertions(+), 92 deletions(-) commit eb64343ca6dd03241579400e037f0e15e6831b0c Author: Ville Syrjälä Date: Fri Aug 18 21:36:59 2017 +0300 drm/i915: Extract PIPESTAT irq handling into separate functions Extract the gen2-4 PIPESTAT irq handling into separate functions just like we already do on VLV/CHV. We can share valleyview_pipestat_irq_ack() on all gmch platforms to actually read and clear the PIPESTAT status bits, so let's rename it to i9xx_pipestat_irq_ack(). Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818183705.27850-11-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_irq.c | 215 +++++++++++++++++----------------------- 1 file changed, 93 insertions(+), 122 deletions(-) commit 9515d7b8eb0bff20f9a2fa973331674e8abe06c8 Author: Ville Syrjälä Date: Fri Aug 18 21:36:58 2017 +0300 drm/i915: Remove NULL dev_priv checks from irq_uninstall There should be no way to land in irq_uninstall without a valid dev_priv. Let's kill off the remaining checks, which are probably some kind of UMS leftovers. Not all the irq_uninstall hooks even had them anymore. Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818183705.27850-10-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_irq.c | 19 ------------------- 1 file changed, 19 deletions(-) commit c30bb1fd384c459bf70d4780a3ad2dec7211ee9d Author: Ville Syrjälä Date: Fri Aug 18 21:36:57 2017 +0300 drm/i915: Unify the appearance of gen3/4 irq_postistall hooks Do the irq_mask/enable_mask setup in the same way on gen3/4, and also reorder the steps to make the code more uniform. Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818183705.27850-9-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_irq.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit e13924a8c2d32dc86d25771acc484e5f63426bda Author: Ville Syrjälä Date: Fri Aug 18 21:36:56 2017 +0300 drm/i915: Eliminate PORT_HOTPLUG_EN setup from gen3/4 irq_postinstall We've already cleared PORT_HOTPLUG_EN in the .irq_preinstall hook so doing it again in the .irq_postinstall is pointless. Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818183705.27850-8-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_irq.c | 6 ------ 1 file changed, 6 deletions(-) commit 045cebd2e4c29c55e46a1044fa1d0dd38b790392 Author: Ville Syrjälä Date: Fri Aug 18 21:36:55 2017 +0300 drm/i915: Setup EMR first on all gen2-4 Unify the appaerance of the gen2-4 irq postinstall hooks a little bit by doing the EMR setup first on all the platforms. Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818183705.27850-7-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_irq.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit e9e9848a6bcfb635c94e1d5f0b3f60799cfe8955 Author: Ville Syrjälä Date: Fri Aug 18 21:36:54 2017 +0300 drm/i915: Introduce GEN2_IRQ_RESET/INIT Unify the appearance of the gen2 irq code with the gen3+ code by introducing the GEN2_IRQ_RESET/INIT macros. Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818183705.27850-6-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_irq.c | 54 ++++++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 12 deletions(-) commit ba7eb78932173ce6e315a754b7b32eb0a4f155ed Author: Ville Syrjälä Date: Fri Aug 18 21:36:53 2017 +0300 drm/i915: Use GEN3_IRQ_RESET/INIT on gen3/4 Replace the manual IMR+IER+IIR write sequences with the appropriate GEN3_IRQ_RESET/INIT macro invocations in gen3/4. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818183705.27850-5-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_irq.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) commit 3488d4eb43aaf63bc4db7d878b106f73de547d7a Author: Ville Syrjälä Date: Fri Aug 18 21:36:52 2017 +0300 drm/i915: s/GEN5/GEN3/ The GEN5_IRQ_RESET/INIT macros are perfectly suitable even for gen3/4 hardware as those have 32 bit interrupt registers. Let's rename the macros to reflect that fact. Gen2 on the other hand has 16 bit interrupt registers so these macros aren't really appropriate there. v2: Fix patch subject (Maarten) Reviewed-by: Chris Wilson Acked-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818183705.27850-4-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_irq.c | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 44d9241e3e62a6938b5ae2ec6b3b4cd5abfdb717 Author: Ville Syrjälä Date: Fri Aug 18 21:36:51 2017 +0300 drm/i915: Clear pipestat consistently We have a lot of different ways of clearing the PIPESTAT registers. Let's unify it all into one function. There's no magic in PIPESTAT that would require any of the double clearing and whatnot that some of the code tries to do. All we can really do is clear the status bits and disable the enable bits. There is no way to mask anything so as soon as another event happens the status bit will become set again, and trying to clear them twice or something can't protect against that. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818183705.27850-3-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak drivers/gpu/drm/i915/i915_irq.c | 67 ++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 37 deletions(-) commit 842ebf7aeb1d6d5d679491d33d8c3f113de7964e Author: Ville Syrjälä Date: Fri Aug 18 21:36:50 2017 +0300 drm/i915: Don't enable/unmask flip interrupts commit fd3a40242e87 ("drm/i915: Rip out legacy page_flip completion/irq handling") removed the code to hande the flip done/pending interrupts, but it failed to actually disable/mask those interrupts. Let's do that now. Also remove a stale comment that was left behind. Cc: Daniel Vetter Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818183705.27850-2-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak drivers/gpu/drm/i915/i915_irq.c | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) commit c095b97c1e972d67d08bb90de99118a95a6390cd Author: Zhi Wang Date: Thu Sep 14 20:39:41 2017 +0800 drm/i915: Remove the "INDEX" suffix from PPAT marcos Remove the "INDEX" suffix from PPAT marcos as they are bits actually, not indexes. Suggested-by: Chris Wilson Signed-off-by: Zhi Wang Cc: Ben Widawsky Cc: Rodrigo Vivi Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/1505392783-4084-2-git-send-email-zhi.a.wang@intel.com drivers/gpu/drm/i915/gvt/gtt.c | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 10 +++++----- drivers/gpu/drm/i915/i915_gem_gtt.h | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) commit 4395890a48551982549d222d1923e2833dac47cf Author: Zhi Wang Date: Thu Sep 14 20:39:40 2017 +0800 drm/i915: Introduce private PAT management The private PAT management is to support PPAT entry manipulation. Two APIs are introduced for dynamically managing PPAT entries: intel_ppat_get and intel_ppat_put. intel_ppat_get will search for an existing PPAT entry which perfectly matches the required PPAT value. If not, it will try to allocate a new entry if there is any available PPAT indexs, or return a partially matched PPAT entry if there is no available PPAT indexes. intel_ppat_put will put back the PPAT entry which comes from intel_ppat_get. If it's dynamically allocated, the reference count will be decreased. If the reference count turns into zero, the PPAT index is freed again. Besides, another two callbacks are introduced to support the private PAT management framework. One is ppat->update_hw(), which writes the PPAT configurations in ppat->entries into HW. Another one is ppat->match, which will return a score to show how two PPAT values match with each other. v17: - Refine the comparision of score of BDW. (Joonas) v16: - Fix a bug in PPAT match function of BDW. (Joonas) v15: - Refine some code flow. (Joonas) v12: - Fix a problem "not returning the entry of best score". (Zhenyu) v7: - Keep all the register writes unchanged in this patch. (Joonas) v6: - Address all comments from Chris: http://www.spinics.net/lists/intel-gfx/msg136850.html - Address all comments from Joonas: http://www.spinics.net/lists/intel-gfx/msg136845.html v5: - Add check and warnnings for those platforms which don't have PPAT. v3: - Introduce dirty bitmap for PPAT registers. (Chris) - Change the name of the pointer "dev_priv" to "i915". (Chris) - intel_ppat_{get, put} returns/takes a const intel_ppat_entry *. (Chris) v2: - API re-design. (Chris) Signed-off-by: Zhi Wang Cc: Ben Widawsky Cc: Rodrigo Vivi Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Chris Wilson #v7 Reviewed-by: Joonas Lahtinen [Joonas: Use BIT() in the enum in bdw_private_pat_match] Signed-off-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/1505392783-4084-1-git-send-email-zhi.a.wang@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_gem_gtt.c | 285 +++++++++++++++++++++++++++++------- drivers/gpu/drm/i915/i915_gem_gtt.h | 36 +++++ 3 files changed, 274 insertions(+), 49 deletions(-) commit 93564044fb2c938e8ee4a91323157ded28072972 Author: Ville Syrjälä Date: Thu Aug 24 22:10:51 2017 +0300 drm/i915: Switch over to the LLC/eLLC hotspot avoidance hash mode for CCS Use the LLC/eLLC hotspot avoidance mode for CCS on LLC machines. This is reported to give better performance. Testing has indicated that we don't need to enforce any massive 2 or 4 MiB alignment for all compressed resources even though there are still plenty of stale comments in the spec suggesting that we do. We do need to make sure every hardware unit that deals with the compressed data uses the same hash mode. Cc: Ben Widawsky Cc: Jason Ekstrand Cc: Daniel Stone Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170824191100.10949-4-ville.syrjala@linux.intel.com Reviewed-by: Ben Widawsky drivers/gpu/drm/i915/i915_reg.h | 8 +++++++- drivers/gpu/drm/i915/intel_engine_cs.c | 13 +++++++++++++ drivers/gpu/drm/i915/intel_pm.c | 27 +++++++++++++-------------- 3 files changed, 33 insertions(+), 15 deletions(-) commit 3fd3a6ffe279827543cbf4063e307ed18bad6763 Author: Joonas Lahtinen Date: Wed Sep 13 14:52:55 2017 +0300 drm/i915: Simplify i915_reg_read_ioctl Convert to use the freshly available made INTEL_GEN_MASK for easier grepping and improve function readability and clarify the UABI documentation. No functional changes. v2: - Lift GEM_BUG_ONs and use is_power_of_2 (Chris) - Retain -EINVAL on bad flags behavior (Chris) v3: - Extract flags with 'entry->size - 1' (Chris) v4: - Add GEM_BUG_ON on for flags vs entry offset (Chris) v5: - Use 'u16' to match 'dev_priv' (Ville) v6: - Fix checkpatch.pl errors Signed-off-by: Joonas Lahtinen Cc: Tvrtko Ursulin Cc: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170913115255.13851-2-joonas.lahtinen@linux.intel.com drivers/gpu/drm/i915/intel_uncore.c | 95 +++++++++++++++++-------------------- include/uapi/drm/i915_drm.h | 6 ++- 2 files changed, 48 insertions(+), 53 deletions(-) commit fe52e597fdbfd1098d47bdf314a1974dac003227 Author: Joonas Lahtinen Date: Wed Sep 13 14:52:54 2017 +0300 drm/i915: Introduce INTEL_GEN_MASK Split INTEL_GEN_MASK out of IS_GEN macro, and make it usable within static declarations (unlike compound statements). v2: - s/combound/compound/ (Tvrtko) - Fix whitespace (yes, we need automatic checkpatch.pl) Signed-off-by: Joonas Lahtinen Cc: Jani Nikula Cc: Chris Wilson Reviewed-by: Jani Nikula Reviewed-by: Chris Wilson Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20170913115255.13851-1-joonas.lahtinen@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit 376b6a1f4fbd4938042ec28bd9498c62a4bdcdf0 Author: Allen Pais Date: Wed Sep 13 13:31:09 2017 +0530 drivers:gpu:Use ARRAY_SIZE() for the size calculation of the array. Signed-off-by: Allen Pais Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c30572814df55bc648ca449f69849b988abff54a Author: Tom St Denis Date: Wed Sep 13 12:35:15 2017 -0400 drm/amd/amdgpu: Change vram debugfs to NO_KIQ for VM environments Reviewed-by: Christian König Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 5b40104edfb003b1e8bae3e546771e6edb59c6b7 Author: Jason Gerecke Date: Thu Sep 7 17:52:15 2017 -0700 HID: wacom: generic: Reset events back to zero when pen leaves As a pen leaves, we need to be sure to reset all events back to zero so that userspace is able to get the complete pen state when it enters proximity again. Signed-off-by: Jason Gerecke Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3e70969e44ee52d72053145dab2cbad74109c685 Author: Jason Gerecke Date: Thu Sep 7 17:51:06 2017 -0700 HID: wacom: generic: Send BTN_TOOL_PEN in prox once the pen enters range When a pen is first able to to be sensed by the tablet, we would like to inform userspace that a tool is nearby so that it can attempt to perform palm rejection. Unfortunately, we don't know any information about the tool that is nearby, so the best we can do is send a prox event for a generic BTN_TOOL_PEN. If the pen later comes closer and enters proximity, we can determine the actual tool type and send BTN_TOOL_PEN out of prox if necessary. Signed-off-by: Ping Cheng Signed-off-by: Jason Gerecke Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 4affc2331a70fff3d0d0e8f28ead80aa2b8b589a Author: Jason Gerecke Date: Thu Sep 7 17:49:50 2017 -0700 HID: wacom: generic: Leave tool in prox until it completely leaves sense The legacy Intuos codepath and tablet behavior (e.g. the 1st-gen Intuos Pro, Cintiq 27, etc.) would result in a BTN_TOOL_* event not being cleared to zero until the tool had completely left the sensing range of the tablet. Before the final "out of prox" packet would be sent, zero or more "in range" packets could be sent to indicate that a pen was still detectable but not within a useful distance. These "in range" packets were used by the driver to keep touch input disabled at greater pen distances. In addition to keeping the `stylus_in_proximity` flag set, the driver would leave the current BTN_TOOL_* marked as being in proximity as well. The new HID codepath also sets `stylus_in_proximity` based on the "sense" flag, but does not leave the current BTN_TOOL_* marked as being in prox. This information is potentially useful to for a future userspace-based palm rejection, so this patch modifies the driver to continue sending it. Signed-off-by: Jason Gerecke Reviewed-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7690dd18ddeda98521f4966e60e1a70b97316d11 Author: Jason Gerecke Date: Thu Sep 7 17:48:55 2017 -0700 HID: wacom: generic: Use generic codepath terminology in wacom_wac_pen_report The terminology used to describe the various degrees of pen proximity within the wacom_wac_pen_report function does not match that used elsewhere in the generic codepath. Specifically, the names of the variables "prox" and "range" were inspired by the non-generic codepaths. To make the generic codepath internally consistent, replace these terms with "range" and "sense" respectively. Signed-off-by: Jason Gerecke Signed-off-by: Ping Cheng Signed-off-by: Jiri Kosina drivers/hid/wacom_wac.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 0d0c279405ec8eb1171c5de1bc4256bb803df77f Author: Rodrigo Vivi Date: Tue Sep 12 11:30:59 2017 -0700 drm/i915: Refresh VLV/CHV PSR comments on HW PSR_state machine. DK had pointed out a comment there was hard to understand, so I tried to read back again and I couldn't understand that as well. So let me re-phrase that in a way that anyone can understand later, even myself. Also fixed the comment block style. v2: Accept DK's suggestion on PSR_state 2 and PSR_state 3 named as spec. Cc: Dhinakaran Pandiyan Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170912183059.5086-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_psr.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) commit 605f72de137ad92a9c29ca1d3d1fead34685b1af Author: Harinath Nampally Date: Sat Sep 9 15:56:58 2017 -0400 iio: accel: mma8452: improvements to handle multiple events This driver supports multiple devices like mma8653, mma8652, mma8452, mma8453 and fxls8471. Almost all these devices have more than one event. Current driver design hardcodes the event specific information, so only one event can be supported by this driver at any given time. Also current design doesn't have the flexibility to add more events. This patch improves by detaching the event related information from chip_info struct,and based on channel type and event direction the corresponding event configuration registers are picked dynamically. Hence both transient and freefall events can be handled in read/write callbacks. Changes are thoroughly tested on fxls8471 device on imx6UL Eval board using iio_event_monitor user space program. After this fix both Freefall and Transient events are handled by the driver without any conflicts. Signed-off-by: Harinath Nampally Reviewed-by: Martin Kepplinger Signed-off-by: Jonathan Cameron drivers/iio/accel/mma8452.c | 363 +++++++++++++++++++++++++------------------- 1 file changed, 206 insertions(+), 157 deletions(-) commit 49b3f87496a7c646da3f900fd502f68a687457ad Author: Lukas Wunner Date: Tue Sep 5 11:44:00 2017 +0200 drivers: misc: ti_dac7512: Remove duplicate driver The Texas Instruments DAC7512 has the exact same pinout, programming interface and power-down modes as the Texas Instruments DAC121S101 and Analog Devices AD5320, which are already supported by the IIO driver ad5446.c. Remove the duplicate misc driver. This requires user space to migrate to the standardized IIO sysfs ABI. (In other words, it needs to change a filename.) The IIO driver supports the chip's features more fully, e.g. the ability to power down the output or choose one of the available powerdown modes. There is an oddity with the misc driver in that it initializes the SPI slave to SPI_MODE_0, in contradiction to the datasheet which specifies that data is latched in on the falling edge, implying that SPI_MODE_1 or SPI_MODE_2 must be used. Another oddity is that Kconfig and the MODULE_DESCRIPTION() claim the chip has 16-bit resolution although it actually has 12-bit. Datasheets: http://www.ti.com/lit/ds/symlink/dac7512.pdf http://www.ti.com/lit/ds/symlink/dac121s101.pdf http://www.analog.com/media/en/technical-documentation/data-sheets/AD5320.pdf Signed-off-by: Lukas Wunner Acked-by: Daniel Mack Acked-by: Arnd Bergmann Signed-off-by: Jonathan Cameron arch/arm/configs/pxa_defconfig | 3 +- arch/arm/configs/raumfeld_defconfig | 3 +- drivers/iio/dac/ad5446.c | 10 ++++ drivers/misc/Kconfig | 10 ---- drivers/misc/Makefile | 1 - drivers/misc/ti_dac7512.c | 103 ------------------------------------ 6 files changed, 14 insertions(+), 116 deletions(-) commit 9cad3b9854e3a0961557059e149876dd05615170 Author: Lukas Wunner Date: Tue Sep 5 11:44:00 2017 +0200 iio: dac: ad5446: Add IDs of compatible Texas Instruments chips The Texas Instruments DAC081S101, DAC101S101 and DAC121S101 have the exact same pinout, programming interface and power-down modes as the AD5300, AD5310 and AD5320, respectively, and their datasheets declare them "a direct replacement" for the Analog Devices chips. This may not be immediately obvious to a casual observer, so add them to the supported modalias strings. Datasheets: http://www.ti.com/lit/ds/symlink/dac081s101.pdf http://www.ti.com/lit/ds/symlink/dac101s101.pdf http://www.ti.com/lit/ds/symlink/dac121s101.pdf http://www.analog.com/media/en/technical-documentation/data-sheets/AD5300.pdf http://www.analog.com/media/en/technical-documentation/data-sheets/AD5310.pdf http://www.analog.com/media/en/technical-documentation/data-sheets/AD5320.pdf Signed-off-by: Lukas Wunner Signed-off-by: Jonathan Cameron drivers/iio/dac/Kconfig | 3 ++- drivers/iio/dac/ad5446.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 8d532d36ac02a39c618abd1ee90a600a98274730 Author: Lorenzo Bianconi Date: Sat Sep 2 19:39:15 2017 +0200 dt-bindings: iio: pressure: add LPS33HW and LPS35HW device bindings Signed-off-by: Lorenzo Bianconi Acked-by: Rob Herring Signed-off-by: Jonathan Cameron Documentation/devicetree/bindings/iio/st-sensors.txt | 2 ++ 1 file changed, 2 insertions(+) commit b7165d26bf730567ab081bb9383aff82cd43d9ea Author: Kuninori Morimoto Date: Mon Sep 11 04:17:26 2017 +0000 ASoC: rsnd: fix ADG flags Current ADG driver is over-writing flags. This patch fixes it. Reported-by: Hiroyuki Yokoyama Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown sound/soc/sh/rcar/adg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 767a983ab25564e8fcc84fa203d1c51d2e50c6ef Author: Chris Wilson Date: Wed Sep 13 09:56:05 2017 +0100 drm/i915/execlists: Read the context-status HEAD from the HWSP The engine also provides a mirror of the CSB write pointer in the HWSP, but not of our read pointer. To take advantage of this we need to remember where we read up to on the last interrupt and continue off from there. This poses a problem following a reset, as we don't know where the hw will start writing from, and due to the use of power contexts we cannot perform that query during the reset itself. So we continue the current modus operandi of delaying the first read of the context-status read/write pointers until after the first interrupt. With this we should now have eliminated all uncached mmio reads in handling the context-status interrupt, though we still have the uncached mmio writes for submitting new work, and many uncached mmio reads in the global interrupt handler itself. Still a step in the right direction towards reducing our resubmit latency, although it appears lost in the noise! v2: Cannonlake moved the CSB write index v3: Include the sw/hwsp state in debugfs/i915_engine_info v4: Also revert to using CSB mmio for GVT-g v5: Prevent the compiler reloading tail (Mika) Signed-off-by: Chris Wilson Cc: Michel Thierry Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Daniele Ceraolo Spurio Cc: Zhenyu Wang Cc: Zhi Wang Acked-by: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/20170913085605.18299-6-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_debugfs.c | 6 ++++-- drivers/gpu/drm/i915/i915_drv.h | 8 ++++++++ drivers/gpu/drm/i915/intel_lrc.c | 27 ++++++++++++++++++++------- drivers/gpu/drm/i915/intel_ringbuffer.h | 3 +++ 4 files changed, 35 insertions(+), 9 deletions(-) commit 6d2cb5aa383bf020ee95e33d9d107975f340ae1c Author: Chris Wilson Date: Wed Sep 13 14:35:34 2017 +0100 drm/i915/execlists: Read the context-status buffer from the HWSP The engine provides a mirror of the CSB in the HWSP. If we use the cacheable reads from the HWSP, we can shave off a few mmio reads per context-switch interrupt (which are quite frequent!). Just removing a couple of mmio is not enough to actually reduce any latency, but a small reduction in overall cpu usage. Much appreciation for Ben dropping the bombshell that the CSB was in the HWSP and for Michel in digging out the details. v2: Don't be lazy, add the defines for the indices. v3: Include the HWSP in debugfs/i915_engine_info v4: Check for GVT-g, it currently depends on intercepting CSB mmio v5: Fixup GVT-g mmio path v6: Disable HWSP if VT-d is active as the iommu adds unpredictable memory latency. (Mika) v7: Also markup the CSB read with READ_ONCE() as it may still be an mmio read and we want to stop the compiler from issuing a later (v.slow) reload. Suggested-by: Ben Widawsky Signed-off-by: Chris Wilson Cc: Michel Thierry Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Daniele Ceraolo Spurio Cc: Zhenyu Wang Cc: Zhi Wang Acked-by: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/20170913133534.26927-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_debugfs.c | 7 +++++-- drivers/gpu/drm/i915/intel_lrc.c | 35 ++++++++++++++++++++++++++++----- drivers/gpu/drm/i915/intel_ringbuffer.h | 3 +++ 3 files changed, 38 insertions(+), 7 deletions(-) commit 0d2bd2ae045d8dcb446a3d9a4cecefa70428573a Author: Christian König Date: Wed Sep 13 10:43:09 2017 +0200 drm/ttm: fix memory leak while individualizing BOs We need to free the reservation object before we take the BO from the delayed delete list. Signed-off-by: Christian König Reviewed-by: Monk Liu Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 2 ++ 1 file changed, 2 insertions(+) commit c09312a6532a9a976ec4e72eb3b7fa10e87a8b07 Author: Christian König Date: Tue Sep 12 10:56:17 2017 +0200 drm/amdgpu: fix and cleanup amdgpu_bo_create v2 We adjusted the BO flags for USWC handling, but those never took effect because the placement was passed in instead of generated inside this function. v2: better commit message Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 83 +++++++++--------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 8 --- 2 files changed, 23 insertions(+), 68 deletions(-) commit 88531913a841a6354adfb40c78c86599639e5f32 Author: Christian König Date: Mon Sep 11 17:10:26 2017 +0200 drm/amd: remove min/max addr handling from cgs Nobody is actually using this and it causes a bunch of unused and buggy code. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 48 ++------------------------- drivers/gpu/drm/amd/include/cgs_common.h | 7 ++-- drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 2 +- 3 files changed, 6 insertions(+), 51 deletions(-) commit 9f0ed7aab60e3563bfe247bc2ad82db3a88c2d57 Author: Christian König Date: Mon Sep 11 15:51:30 2017 +0200 drm/amdgpu: fix cgs alignment handling This always allocated on PAGE_SIZE alignment. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e97f12f359775de4fabfb507f836ebffa20f4986 Author: Michel Dänzer Date: Mon Sep 11 17:09:17 2017 +0900 radeon: Only destroy fbdev framebuffer if it was initialized Fixes crash when trying to unload the radeon module before the fbdev framebuffer was initialized, which can happen since the DRM fbdev helper code supports deferred setup. Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a072c5f896beba806b4b867d478e1b90f94ba29b Author: Michel Dänzer Date: Mon Sep 11 17:04:41 2017 +0900 amdgpu: Only destroy fbdev framebuffer if it was initialized Fixes crash when trying to unload the amdgpu module before the fbdev framebuffer was initialized, which can happen since the DRM fbdev helper code supports deferred setup. Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c9232d9ee85fade8a2020efe9f3bf64cdbbc6347 Author: Tom St Denis Date: Tue Sep 12 12:29:06 2017 -0400 drm/amd/powerplay: lock grbm_gfx index when changing instance Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 2 ++ 1 file changed, 2 insertions(+) commit 9f8ccae9d6c76cc50aca2efacd7cd65b6146daaf Author: Tom St Denis Date: Tue Sep 12 10:05:48 2017 -0400 drm/amd/powerplay: Tidy up smu7_enable_didt() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 29 ++++++---------------- 1 file changed, 8 insertions(+), 21 deletions(-) commit 0120ad13acb747b6e5e4f21d525818797dc5eeaa Author: Tom St Denis Date: Tue Sep 12 10:01:34 2017 -0400 drm/amd/powerplay: Make use of PP_CAP in smu7_powertune.c Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 42 ++++++++++------------ 1 file changed, 18 insertions(+), 24 deletions(-) commit a10ad69c8357b51337aa3acea63d279b38fc198c Author: Tom St Denis Date: Tue Sep 12 09:56:45 2017 -0400 drm/amd/powerplay: Remove unneeded return from pp_smu7_thermal_fini() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 1 - 1 file changed, 1 deletion(-) commit 30f111fca087b8f644f134eb7fb062614ff08416 Author: Tom St Denis Date: Tue Sep 12 09:53:25 2017 -0400 drm/amd/powerplay: Make use of PP_CAP in smu7_thermal.c Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 3efabd5eda4a47eb5dbe0a6f0e7f700252e43965 Author: Tom St Denis Date: Tue Sep 12 09:51:36 2017 -0400 drm/amd/powerplay: Tidy up smu7_fan_ctrl_get_fan_speed_rpm() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8b39f031b7a65e06d5de99170fa056ea14eaca54 Author: Tom St Denis Date: Tue Sep 12 09:46:40 2017 -0400 drm/amd/powerplay: Tidy up smu7_fan_ctrl_get_fan_speed_info() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4e55eb3879fea6d8c7d414cebaa5bff1da58b4a1 Author: Christian König Date: Mon Sep 11 16:54:59 2017 +0200 drm/amdgpu: fix amdgpu_vm_handle_moved as well v2 There is no guarantee that the last BO_VA actually needed an update. Additional to that all command submissions must wait for moved BOs to be cleared, not just the first one. v2: Don't overwrite any newer fence. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 24 ++++++++++-------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 +-- 3 files changed, 12 insertions(+), 17 deletions(-) commit 34a04e5e46cb984a6bab336484fa856574db332f Author: Chris Wilson Date: Wed Sep 13 09:56:03 2017 +0100 drm/i915: Allow HW status page to be bound high At the time of commit 1f767e02d69f ("drm/i915: HWS must be in the mappable region for g33"), drm_mm insertion would often default to placing a new object high in the zone forcing us to specify that certain HWSP must be bound within the low mappable region. Since then, drm_mm has gained more finesse over its placement and exposes that to the caller, commit 4e64e5539d15 ("drm: Improve drm_mm search (and fix topdown allocation) with rbtrees"). As such where possible we want the HWSP to be outside of the mappable aperture and so need to specify that can be pinned high. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Ville Syrjälä Cc: Michel Thierry Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170913085605.18299-4-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_engine_cs.c | 2 ++ 1 file changed, 2 insertions(+) commit 486e93f72abd41559b740f017717c7f6b3f8bb1f Author: Daniele Ceraolo Spurio Date: Wed Sep 13 09:56:02 2017 +0100 drm/i915/lrc: allocate separate page for HWSP On gen8+ we're currently using the PPHWSP of the kernel ctx as the global HWSP. However, when the kernel ctx gets submitted (e.g. from __intel_autoenable_gt_powersave) the HW will use that page as both HWSP and PPHWSP. This causes a conflict in the register arena of the HWSP, i.e. dword indices below 0x30. We don't current utilize this arena, but in the following patches we will take advantage of the cached register state for handling execlist's context status interrupt. To avoid the conflict, instead of re-using the PPHWSP of the kernel ctx we can allocate a separate page for the HWSP like what happens for pre-execlists platform. v2: Add a use-case for the register arena of the HWSP. Signed-off-by: Daniele Ceraolo Spurio Cc: Michel Thierry Link: http://patchwork.freedesktop.org/patch/msgid/1499357440-34688-1-git-send-email-daniele.ceraolospurio@intel.com Signed-off-by: Chris Wilson Reviewed-by: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/20170913085605.18299-3-chris@chris-wilson.co.uk drivers/gpu/drm/i915/intel_engine_cs.c | 126 +++++++++++++++++++++++++++++++- drivers/gpu/drm/i915/intel_lrc.c | 34 +-------- drivers/gpu/drm/i915/intel_ringbuffer.c | 125 +------------------------------ 3 files changed, 127 insertions(+), 158 deletions(-) commit a922c0c7a6b7b84351c4051fc9defe1222185c16 Author: Michel Thierry Date: Wed Sep 13 09:56:01 2017 +0100 drm/i915/guc: Don't make assumptions while getting the lrca offset Using the HWSP ggtt_offset to get the lrca offset is only correct if the HWSP happens to be before it (when we reuse the PPHWSP of the kernel context as the engine HWSP). Instead of making this assumption, get the lrca offset from the kernel_context engine state. And while looking at this part of the GuC interaction, it was also noticed that the firmware expects the size of only the engine context (context minus the execlist part, i.e. don't include the first 80 dwords), so pass the right size. v2: Use the new macros to prevent abusive overuse of the old ones (Chris). Reported-by: Daniele Ceraolo Spurio Signed-off-by: Michel Thierry Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: Oscar Mateo Link: http://patchwork.freedesktop.org/patch/msgid/20170712193032.27080-2-michel.thierry@intel.com Reviewed-by: Chris Wilson Acked-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170913085605.18299-2-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_guc_submission.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 0b29c75a01e5413d9c1f368b8357b589c7b5a922 Author: Michel Thierry Date: Wed Sep 13 09:56:00 2017 +0100 drm/i915/lrc: Clarify the format of the context image Not only the context image consist of two parts (the PPHWSP, and the logical context state), but we also allocate a header at the start of for sharing data with GuC. Thus every lrc looks like this: | [guc] | [hwsp] [logical state] | |<- our header ->|<- context image ->| So far, we have oversimplified whenever we use each of these parts of the context, just because the GuC header happens to be in page 0, and the (PP)HWSP is in page 1. But this had led to using the same define for more than one meaning (as a page index in the lrc and as 1 page). This patch adds defines for the GuC shared page, the PPHWSP page and the start of the logical state. It also updated the places where the old define was being used. Since we are not changing the size (or format) of the context, there are no functional changes. v2: Use PPHWSP index for hws again. Suggested-by: Chris Wilson Signed-off-by: Michel Thierry Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: Oscar Mateo Cc: intel-gvt-dev@lists.freedesktop.org Link: http://patchwork.freedesktop.org/patch/msgid/20170712193032.27080-1-michel.thierry@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170913085605.18299-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/gvt/scheduler.c | 4 ++-- drivers/gpu/drm/i915/i915_guc_submission.c | 4 ++-- drivers/gpu/drm/i915/intel_lrc.c | 9 ++++++--- drivers/gpu/drm/i915/intel_lrc.h | 25 ++++++++++++++++++++++--- 4 files changed, 32 insertions(+), 10 deletions(-) commit 56de5b63ffaff859f75c19aff057ee10f20c6c07 Author: Andi Kleen Date: Tue Sep 5 16:26:13 2017 -0700 perf vendor events: Add JSON metrics for Skylake server Add JSON metrics for Skylake server Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170908180133.GA20128@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/skylakex/skx-metrics.json | 182 +++++++++++++++++++++ 1 file changed, 182 insertions(+) commit 69e932139db1d23e978256652dbb179d6ed75204 Author: Andi Kleen Date: Sun Jul 23 22:00:42 2017 -0700 perf vendor events: Add JSON metrics for Broadwell DE Add JSON metrics for Broadwell DE Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170908180133.GA20128@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/broadwellde/bdwde-metrics.json | 164 +++++++++++++++++++++ 1 file changed, 164 insertions(+) commit 6d75abd3e84596933aa2ca91751744271cfec6cb Author: Andi Kleen Date: Sun Jul 23 21:55:59 2017 -0700 perf vendor events: Add JSON metrics for Broadwell Server Add JSON metrics for Broadwell Server. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170908180133.GA20128@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/broadwellx/bdx-metrics.json | 164 +++++++++++++++++++++ 1 file changed, 164 insertions(+) commit 5e49f7321b06428ac68c51096cff9a4a55c3d4d6 Author: Andi Kleen Date: Sun Jul 23 21:55:39 2017 -0700 perf vendor events: Add JSON metrics for Haswell EP Add JSON metrics for Haswell EP. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170908180133.GA20128@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/haswellx/hsx-metrics.json | 158 +++++++++++++++++++++ 1 file changed, 158 insertions(+) commit 43fd36a19d501483d5ec243dd28268646f717cde Author: Andi Kleen Date: Sun Jul 23 21:55:16 2017 -0700 perf vendor events: Add JSON metrics for Ivy Town Add JSON metrics for Ivy Town. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170908180133.GA20128@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/ivytown/ivt-metrics.json | 164 +++++++++++++++++++++ 1 file changed, 164 insertions(+) commit 2099f51d1851c8955ed3406683be0b961c7792cb Author: Andi Kleen Date: Sun Jul 23 21:51:47 2017 -0700 perf vendor events: Add JSON metrics for Haswell Add JSON metrics for Haswell. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170908180133.GA20128@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/haswell/hsw-metrics.json | 158 +++++++++++++++++++++ 1 file changed, 158 insertions(+) commit 8853d2de0efe25572d3a7033bbb87c9b1208391e Author: Andi Kleen Date: Sun Jul 23 21:51:25 2017 -0700 perf vendor events: Add JSON metrics for Ivy Bridge Add JSON metrics for Ivy Bridge. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170908180133.GA20128@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/ivybridge/ivb-metrics.json | 164 +++++++++++++++++++++ 1 file changed, 164 insertions(+) commit 28bc0ddb3a89a09b6f2d4dc97b85e28b2a70db1e Author: Andi Kleen Date: Sun Jul 23 21:51:07 2017 -0700 perf vendor events: Add JSON metrics for Sandy Bridge EP Add JSON metrics for Sandy Bridge EP. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170908180133.GA20128@tassilo.jf.intel.com Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/jaketown/jkt-metrics.json | 140 +++++++++++++++++++++ 1 file changed, 140 insertions(+) commit 97dca6715d0a058a6af028a3019432740b4a0011 Author: Andi Kleen Date: Sun Jul 23 21:50:34 2017 -0700 perf vendor events: Add JSON metrics for Sandy Bridge Add JSON metrics for Sandy Bridge. Committer testing: # grep "model name" /proc/cpuinfo | head -1 model name : Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz # perf list metricgroup List of pre-defined events (to be used in -e): Metric Groups: DSB FLOPS Frontend Frontend_Bandwidth Pipeline Ports_Utilization Power SMT Summary TopDownL1 # perf stat -M Power --metric-only -a sleep 1 Performance counter stats for 'system wide': Turbo_Utilization C3_Core_Residency C6_Core_Residency C7_Core_Residency C2_Pkg_Residency C3_Pkg_Residency C6_Pkg_Residency C7_Pkg_Residency 0.8 0.0 98.1 0.0 0.0 0.0 23.4 0.0 1.001153658 seconds time elapsed # perf stat -v -M Power --metric-only -a sleep 1 Using CPUID GenuineIntel-6-2A metric expr cpu_clk_unhalted.thread / cpu_clk_unhalted.ref_tsc for Turbo_Utilization found event cpu_clk_unhalted.thread found event cpu_clk_unhalted.ref_tsc metric expr (cstate_core@c3\-residency@ / msr@tsc@) * 100 for C3_Core_Residency found event cstate_core/c3-residency/ found event msr/tsc/ metric expr (cstate_core@c6\-residency@ / msr@tsc@) * 100 for C6_Core_Residency found event cstate_core/c6-residency/ found event msr/tsc/ metric expr (cstate_core@c7\-residency@ / msr@tsc@) * 100 for C7_Core_Residency found event cstate_core/c7-residency/ found event msr/tsc/ metric expr (cstate_pkg@c2\-residency@ / msr@tsc@) * 100 for C2_Pkg_Residency found event cstate_pkg/c2-residency/ found event msr/tsc/ metric expr (cstate_pkg@c3\-residency@ / msr@tsc@) * 100 for C3_Pkg_Residency found event cstate_pkg/c3-residency/ found event msr/tsc/ metric expr (cstate_pkg@c6\-residency@ / msr@tsc@) * 100 for C6_Pkg_Residency found event cstate_pkg/c6-residency/ found event msr/tsc/ metric expr (cstate_pkg@c7\-residency@ / msr@tsc@) * 100 for C7_Pkg_Residency found event cstate_pkg/c7-residency/ found event msr/tsc/ adding {cpu_clk_unhalted.thread,cpu_clk_unhalted.ref_tsc}:W,{cstate_core/c3-residency/,msr/tsc/}:W,{cstate_core/c6-residency/,msr/tsc/}:W,{cstate_core/c7-residency/,msr/tsc/}:W,{cstate_pkg/c2-residency/,msr/tsc/}:W,{cstate_pkg/c3-residency/,msr/tsc/}:W,{cstate_pkg/c6-residency/,msr/tsc/}:W,{cstate_pkg/c7-residency/,msr/tsc/}:W cpu_clk_unhalted.thread -> cpu/event=0x3c/ cpu_clk_unhalted.ref_tsc -> cpu/umask=0x3,period=2000003,event=0/ Weak group for cstate_pkg/c2-residency//2 failed Weak group for cstate_pkg/c3-residency//2 failed Weak group for cstate_pkg/c6-residency//2 failed Weak group for cstate_pkg/c7-residency//2 failed cpu_clk_unhalted.thread: 5564185 4002833569 4002833569 cpu_clk_unhalted.ref_tsc: 7325424 4002833569 4002833569 cstate_core/c3-residency/: 68293 4003027101 4003027101 msr/tsc/: 12451294472 4003027101 4003027101 cstate_core/c6-residency/: 12238830163 4003260984 4003260984 msr/tsc/: 12452017806 4003260984 4003260984 cstate_core/c7-residency/: 0 4003489648 4003489648 msr/tsc/: 12452725162 4003489648 4003489648 cstate_pkg/c2-residency/: 1830054 1000913138 1000913138 msr/tsc/: 12453441079 4003717513 4003717513 cstate_pkg/c3-residency/: 0 1000973570 1000973570 msr/tsc/: 12454177865 4003954758 4003954758 cstate_pkg/c6-residency/: 2940448859 1001032370 1001032370 msr/tsc/: 12454833890 4004166118 4004166118 cstate_pkg/c7-residency/: 0 1001049818 1001049818 msr/tsc/: 12454919470 4004194204 4004194204 Performance counter stats for 'system wide': Turbo_Utilization C3_Core_Residency C6_Core_Residency C7_Core_Residency C2_Pkg_Residency C3_Pkg_Residency C6_Pkg_Residency C7_Pkg_Residency 0.8 0.0 98.3 0.0 0.0 0.0 23.6 0.0 1.001126519 seconds time elapsed # Signed-off-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170905195235.GW2482@two.firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo .../arch/x86/sandybridge/snb-metrics.json | 140 +++++++++++++++++++++ 1 file changed, 140 insertions(+) commit 2e006a24127ad88422632f9e5d6a8039a40f01da Author: Andi Kleen Date: Sun Jul 23 21:54:49 2017 -0700 perf vendor events: Add JSON metrics for Skylake Add JSON metrics for Skylake. Committer testing: # grep "model name" /proc/cpuinfo | head -1 model name : Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz # uname -a Linux seventh 4.12.0-rc6+ #1 SMP Fri Jun 30 16:40:55 -03 2017 x86_64 x86_64 x86_64 GNU/Linux # perf stat --metric-only -M Summary -a sleep 1 Performance counter stats for 'system wide': Instructions CPI CLKS CPU_Utilization GFLOPs SMT_2T_Utilization Kernel_Utilization 34021097.0 0.0 119424171.0 0.0 0.0 0.0 0.0 1.001001793 seconds time elapsed # perf list metricgroup List of pre-defined events (to be used in -e): Metric Groups: DSB FLOPS Frontend Frontend_Bandwidth Memory_BW Memory_Bound Memory_Lat Pipeline Ports_Utilization Power SMT Summary TLB TopDownL1 Unknown_Branches # perf stat --metric-only -M Ports_Utilization -a sleep 1 Performance counter stats for 'system wide': ILP 1475828.0 1.000688547 seconds time elapsed # perf stat -v --metric-only -M Ports_Utilization -a sleep 1 Using CPUID GenuineIntel-6-9E metric expr uops_executed.thread / ( uops_executed.core_cycles_ge_1 / 2) if #smt_on else uops_executed.core_cycles_ge_1 for ILP found event uops_executed.thread found event uops_executed.core_cycles_ge_1 adding {uops_executed.thread,uops_executed.core_cycles_ge_1}:W uops_executed.thread -> cpu/umask=0x1,period=2000003,event=0xb1/ uops_executed.core_cycles_ge_1 -> cpu/umask=0x2,period=2000003,cmask=1,event=0xb1/ uops_executed.thread: 8115271 4002547654 4002547654 uops_executed.core_cycles_ge_1: 3282969 4002547654 4002547654 Performance counter stats for 'system wide': ILP 3282969.0 1.000719870 seconds time elapsed # Signed-off-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170905195235.GW2482@two.firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/skylake/skl-metrics.json | 164 +++++++++++++++++++++ 1 file changed, 164 insertions(+) commit cf97962308ba6b6afdeb038505032c7c0972bdfa Author: Andi Kleen Date: Sun Jul 23 21:53:25 2017 -0700 perf vendor events: Add JSON metrics for Broadwell Add JSON metrics for Broadwell. Commiter testing: # uname -a Linux jouet 4.13.0-rc7+ #3 SMP Sat Sep 2 09:04:44 -03 2017 x86_64 x86_64 x86_64 GNU/Linux # grep "model name" /proc/cpuinfo | head -1 model name : Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz # perf list metricgroup List of pre-defined events (to be used in -e): Metric Groups: DSB FLOPS Frontend Frontend_Bandwidth Memory_BW Memory_Bound Memory_Lat Pipeline Ports_Utilization Power SMT Summary TLB TopDownL1 Unknown_Branches # perf stat -M Power --metric-only -a sleep 1 Performance counter stats for 'system wide': Turbo_Utilization C3_Core_Residency C6_Core_Residency C7_Core_Residency C2_Pkg_Residency C3_Pkg_Residency C6_Pkg_Residency C7_Pkg_Residency 1.1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.003502904 seconds time elapsed # # perf stat -M Memory_BW --metric-only -a sleep 1 Performance counter stats for 'system wide': MLP 1.7 1.001364525 seconds time elapsed # # perf stat -M TLB --metric-only -a sleep 1 Performance counter stats for 'system wide': Page_Walks_Utilization 0.1 1.005962198 seconds time elapsed # # perf stat -M Summary --metric-only -a sleep 1 Performance counter stats for 'system wide': Instructions CPI CLKS CPU_Utilization GFLOPs SMT_2T_Utilization Kernel_Utilization 7281856697.0 0.0 11150898087.0 1.0 0.0 1.0 0.7 1.012134025 seconds time elapsed # Running in verbose mode shows which counters and expressions are being used: # perf stat -v -M Summary --metric-only -a sleep 1 Using CPUID GenuineIntel-6-3D metric expr 1 / inst_retired.any / cycles for CPI found event inst_retired.any found event cycles metric expr cpu_clk_unhalted.thread for CLKS found event cpu_clk_unhalted.thread metric expr inst_retired.any for Instructions found event inst_retired.any metric expr cpu_clk_unhalted.ref_tsc / msr@tsc@ for CPU_Utilization found event cpu_clk_unhalted.ref_tsc found event msr/tsc/ metric expr ( 1*( fp_arith_inst_retired.scalar_single + fp_arith_inst_retired.scalar_double ) + 2* fp_arith_inst_retired.128b_packed_double + 4*( fp_arith_inst_retired.128b_packed_single + fp_arith_inst_retired.256b_packed_double ) + 8* fp_arith_inst_retired.256b_packed_single ) / 1000000000 / duration_time for GFLOPs found event fp_arith_inst_retired.scalar_single found event fp_arith_inst_retired.scalar_double found event fp_arith_inst_retired.128b_packed_double found event fp_arith_inst_retired.128b_packed_single found event fp_arith_inst_retired.256b_packed_double found event fp_arith_inst_retired.256b_packed_single found event duration_time metric expr 1 - cpu_clk_thread_unhalted.one_thread_active / ( cpu_clk_thread_unhalted.ref_xclk_any / 2 ) if #smt_on else 0 for SMT_2T_Utilization found event cpu_clk_thread_unhalted.one_thread_active found event cpu_clk_thread_unhalted.ref_xclk_any metric expr cpu_clk_unhalted.ref_tsc:u / cpu_clk_unhalted.ref_tsc for Kernel_Utilization found event cpu_clk_unhalted.ref_tsc:u found event cpu_clk_unhalted.ref_tsc adding {inst_retired.any,cycles}:W,{cpu_clk_unhalted.thread}:W,{inst_retired.any}:W,{cpu_clk_unhalted.ref_tsc,msr/tsc/}:W,{fp_arith_inst_retired.scalar_single,fp_arith_inst_retired.scalar_double,fp_arith_inst_retired.128b_packed_double,fp_arith_inst_retired.128b_packed_single,fp_arith_inst_retired.256b_packed_double,fp_arith_inst_retired.256b_packed_single,duration_time}:W,{cpu_clk_thread_unhalted.one_thread_active,cpu_clk_thread_unhalted.ref_xclk_any}:W,{cpu_clk_unhalted.ref_tsc:u,cpu_clk_unhalted.ref_tsc}:W inst_retired.any -> cpu/event=0xc0/ cpu_clk_unhalted.thread -> cpu/event=0x3c/ inst_retired.any -> cpu/event=0xc0/ cpu_clk_unhalted.ref_tsc -> cpu/umask=0x3,period=2000003,event=0/ fp_arith_inst_retired.scalar_single -> cpu/umask=0x2,period=2000003,event=0xc7/ fp_arith_inst_retired.scalar_double -> cpu/umask=0x1,period=2000003,event=0xc7/ fp_arith_inst_retired.128b_packed_double -> cpu/umask=0x4,period=2000003,event=0xc7/ fp_arith_inst_retired.128b_packed_single -> cpu/umask=0x8,period=2000003,event=0xc7/ fp_arith_inst_retired.256b_packed_double -> cpu/umask=0x10,period=2000003,event=0xc7/ fp_arith_inst_retired.256b_packed_single -> cpu/umask=0x20,period=2000003,event=0xc7/ cpu_clk_thread_unhalted.one_thread_active -> cpu/umask=0x2,period=2000003,event=0x3c/ cpu_clk_thread_unhalted.ref_xclk_any -> cpu/umask=0x1,any=1,period=2000003,event=0x3c/ cpu_clk_unhalted.ref_tsc -> cpu/umask=0x3,period=2000003,event=0/ cpu_clk_unhalted.ref_tsc -> cpu/umask=0x3,period=2000003,event=0/ Weak group for fp_arith_inst_retired.scalar_single/7 failed Weak group for cpu_clk_unhalted.ref_tsc:u/2 failed inst_retired.any: 8704146437 4026374016 619883741 cycles: 11180800018 4026374016 619883741 cpu_clk_unhalted.thread: 11140030295 4026323772 931621933 inst_retired.any: 8643115117 4026260510 1243595906 cpu_clk_unhalted.ref_tsc: 10201638510 4026184297 1247351077 msr/tsc/: 10378022785 4026184297 1247351077 fp_arith_inst_retired.scalar_single: 134697 4026102728 1559210545 fp_arith_inst_retired.scalar_double: 274339 4026007348 1870014984 fp_arith_inst_retired.128b_packed_double: 1639 4025886054 1866736918 fp_arith_inst_retired.128b_packed_single: 0 4025776614 2175106569 fp_arith_inst_retired.256b_packed_double: 0 4025681734 1235551129 fp_arith_inst_retired.256b_packed_single: 0 4025582962 1232398454 duration_time: 0 4025552913 4025552913 cpu_clk_thread_unhalted.one_thread_active: 10505 4025474649 923893076 cpu_clk_thread_unhalted.ref_xclk_any: 394992110 4025474649 923893076 cpu_clk_unhalted.ref_tsc:u: 5341421014 4025360315 1231634198 cpu_clk_unhalted.ref_tsc: 10258278508 4025252611 307909362 Performance counter stats for 'system wide': Instructions CPI CLKS CPU_Utilization GFLOPs SMT_2T_Utilization Kernel_Utilization 8704146437.0 0.0 11140030295.0 1.0 0.0 1.0 0.5 1.006783654 seconds time elapsed # Signed-off-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170905195235.GW2482@two.firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo .../pmu-events/arch/x86/broadwell/bdw-metrics.json | 164 +++++++++++++++++++++ 1 file changed, 164 insertions(+) commit 35c1980eb3d1acb3cac11c38252339399dca77e3 Author: Andi Kleen Date: Tue Sep 5 14:13:24 2017 -0700 perf stat: Fall weak group back even for EBADF It's not possible to run a package event and a per cpu event in the same group. This is used by some of the power metrics. They work correctly when not using a group. Normally weak groups should handle that, but in this case EBADF is returned instead of the normal EINVAL. $ strace -e perf_event_open ./perf stat -v -e '{cstate_pkg/c2-residency/,msr/tsc/}:W' -a sleep 1 Using CPUID GenuineIntel-6-3E perf_event_open({type=0x17 /* PERF_TYPE_??? */, size=PERF_ATTR_SIZE_VER5, config=0, ...}, -1, 0, -1, PERF_FLAG_FD_CLOEXEC) = -1 EINVAL (Invalid argument) perf_event_open({type=0x17 /* PERF_TYPE_??? */, size=PERF_ATTR_SIZE_VER5, config=0, ...}, -1, 0, -1, 0) = -1 EINVAL (Invalid argument) perf_event_open({type=0x17 /* PERF_TYPE_??? */, size=PERF_ATTR_SIZE_VER5, config=0, ...}, -1, 0, -1, 0) = -1 EINVAL (Invalid argument) perf_event_open({type=0x17 /* PERF_TYPE_??? */, size=PERF_ATTR_SIZE_VER5, config=0, ...}, -1, 0, -1, 0) = -1 EINVAL (Invalid argument) perf_event_open({type=0x17 /* PERF_TYPE_??? */, size=PERF_ATTR_SIZE_VER5, config=0, ...}, -1, 0, -1, 0) = 3 perf_event_open({type=0x7 /* PERF_TYPE_??? */, size=PERF_ATTR_SIZE_VER5, config=0, ...}, -1, 0, 3, 0) = 4 perf_event_open({type=0x7 /* PERF_TYPE_??? */, size=PERF_ATTR_SIZE_VER5, config=0, ...}, -1, 1, 0, 0) = -1 EBADF (Bad file descriptor) and perf errors out. Make weak groups trigger a fall back for EBADF too. Then this case works correctly: $ perf stat -v -e '{cstate_pkg/c2-residency/,msr/tsc/}:W' -a sleep 1 Using CPUID GenuineIntel-6-3E Weak group for cstate_pkg/c2-residency//2 failed cstate_pkg/c2-residency/: 476709882 1000598460 1000598460 msr/tsc/: 39625837911 12007369110 12007369110 Performance counter stats for 'system wide': 476,709,882 cstate_pkg/c2-residency/ 39,625,837,911 msr/tsc/ 1.000697588 seconds time elapsed This fixes perf stat -M Power ... $ perf stat -M Power --metric-only -a sleep 1 Performance counter stats for 'system wide': Turbo_Utilization C3_Core_Residency C6_Core_Residency C7_Core_Residency C2_Pkg_Residency C3_Pkg_Residency C6_Pkg_Residency C7_Pkg_Residency 1.0 0.7 30.0 0.0 0.9 0.1 0.4 0.0 1.001240740 seconds time elapsed Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170905211324.32427-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c23c2a0f236601c635d9a9d18d7993641e72aa8c Author: Arnaldo Carvalho de Melo Date: Mon Sep 11 10:50:26 2017 -0300 perf tools: Make copyfile_offset() static There are no usage outside util.c and this is the only remaining reason for fcntl.h to be included in util.h, to get the loff_t definition in Alpine Linux, so make it static. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-2dzlsao7k6ihozs5karw6kpx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/tests/builtin-test.c | 1 + tools/perf/util/data.c | 1 + tools/perf/util/dso.c | 1 + tools/perf/util/event.c | 1 + tools/perf/util/evlist.h | 1 + tools/perf/util/namespaces.c | 1 + tools/perf/util/pmu.c | 1 + tools/perf/util/probe-file.c | 1 + tools/perf/util/util.c | 3 ++- tools/perf/util/util.h | 2 -- tools/perf/util/zlib.c | 1 + 11 files changed, 11 insertions(+), 3 deletions(-) commit 55421b4fb7054f85274b1b6a321e204dac696133 Author: Taeung Song Date: Thu Sep 7 12:18:56 2017 +0900 perf config: Allow creating empty config set for config file autogeneration When there isn't a config file (e.g. ~/.perfconfig) or it has nothing, the config set wasn't created. If the config set does not exist, a config file can't be autogenerated. So allow creating a empty config set in the above case, then we can support the config file autogeneration. Before: $ rm -f ~/.perfconfig $ perf config --user report.children=false $ cat ~/.perfconfig cat: /root/.perfconfig: No such file or directory But I think it should work even if there isn't a config file. After: $ rm -f ~/.perfconfig $ perf config --user report.children=false $ cat ~/.perfconfig # this file is auto-generated. [report] children = false NOTE: As a result, if perf_config_set__init() fails, it looks as if the config set isn't freed. But it isn't a problem. Because the config set will be freed by perf_config_set__delete() at the end of cmd_config(). Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/1504754336-9824-1-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/config.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 5c2615556d4410baebc9b336f14befe0bb32cde4 Author: Taeung Song Date: Thu Sep 7 12:18:51 2017 +0900 perf config: Write a config file just once Currently set_config() can be repeatedly called for each input config on the below case: $ perf config kmem.default=slab report.children=false ... But it's a waste, so only once write a config file gathering all given config key=value pairs. Signed-off-by: Taeung Song Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lkml.kernel.org/r/1504754331-9776-1-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-config.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit ecdad24d7a4480c9af0ff6dbe00ac8bbae720d19 Author: Kan Liang Date: Thu Sep 7 10:55:46 2017 -0700 perf tools: Use scandir() to replace readdir() In perf_event__synthesize_threads() perf goes through all proc files serially by readdir. scandir() does a snapshoot of /proc, which is multithreading friendly. It's possible that some threads which are added during event synthesize. But the number of lost threads should be small. They should not impact the final analysis. Signed-off-by: Kan Liang Cc: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: Lukasz Odzioba Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1504806954-150842-3-git-send-email-kan.liang@intel.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/event.c | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) commit 8233822f403b67bbaa1d58e8fa6b8f821fe7626d Author: Jiri Olsa Date: Fri Sep 8 14:05:10 2017 +0200 perf ui progress: Add size info into progress bar Adding the size values '[current/total]' into progress bar, to show more detailed progress of data reading. Adding new ui_progress__init_size function to specify we want to display the size. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170908120510.22515-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/progress.c | 4 +++- tools/perf/ui/progress.h | 11 ++++++++++- tools/perf/ui/tui/progress.c | 23 ++++++++++++++++++++++- tools/perf/util/session.c | 2 +- 4 files changed, 36 insertions(+), 4 deletions(-) commit 25cc4eb44b0c840eff0e5a46a85b9ccbde77401b Author: Jiri Olsa Date: Fri Sep 8 14:05:09 2017 +0200 perf ui progress: Add ui specific init function Adding ui specific init function allowing to setup the progress bar width based on current screen scales. Adding TUI init function to get more grained update of the progress bar. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170908120510.22515-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/ui/progress.c | 2 ++ tools/perf/ui/progress.h | 1 + tools/perf/ui/tui/progress.c | 9 +++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) commit 80f873557112fc163f011cd131d4cfe4959100a6 Author: Jiri Olsa Date: Fri Sep 8 10:46:21 2017 +0200 perf tools: Add python-clean target To be able to cleanup only python related binaries. Signed-off-by: Jiri Olsa Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20170908084621.31595-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Makefile.perf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit b1491ace8eb2e92677cd9ee966763f8f53d29d16 Author: Andi Kleen Date: Tue Sep 5 11:40:57 2017 -0700 perf script: Support user regs Teach perf script to print user regs. % perf record --user-regs=ip,sp ... % perf script -F ip,sym,uregs ... ffffffff9e060c24 native_write_msr ABI:2 SP:0x7ffd0ea06c38 IP:0x7fe77f55b637 ffffffff9e060c24 native_write_msr ABI:2 SP:0x7ffd0ea06c38 IP:0x7fe77f55b637 ffffffff9e060c24 native_write_msr ABI:2 SP:0x7ffd0ea06c38 IP:0x7fe77f55b637 ffffffff9e060c24 native_write_msr ABI:2 SP:0x7ffd0ea06c38 IP:0x7fe77f55b637 ffffffff9e00cc12 intel_pmu_handle_irq ABI:2 SP:0x7ffd0ea06c38 IP:0x7fe77f55b637 v2: Rebased on top of phys-addr patches Signed-off-by: Andi Kleen Link: http://lkml.kernel.org/r/20170905184057.26135-1-andi@firstfloor.org [ Use PRIu64 for regs->abi in print_sample_uregs() ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-script.txt | 4 ++-- tools/perf/builtin-script.c | 30 +++++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 3 deletions(-) commit 84c417422798c897f637b0249f64a52807b4a61b Author: Andi Kleen Date: Tue Sep 5 10:00:28 2017 -0700 perf record: Support direct --user-regs arguments USER_REGS can currently only collected implicitely with call graph recording. Sometimes it is useful to see them separately, and filter them. Add a new --user-regs option to record that is similar to --intr-regs, but acts on user regs. Signed-off-by: Andi Kleen Cc: Jiri Olsa Link: http://lkml.kernel.org/r/20170905170029.19722-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-record.txt | 2 ++ tools/perf/builtin-record.c | 3 +++ tools/perf/perf.h | 1 + tools/perf/util/evsel.c | 7 ++++++- 4 files changed, 12 insertions(+), 1 deletion(-) commit b90f1333ef08d2a497ae239798868b046f4e3a97 Author: Andi Kleen Date: Thu Aug 31 12:40:36 2017 -0700 perf stat: Update walltime_nsecs_stats in interval mode Some metrics (like GFLOPs) need walltime_nsecs_stats for each interval. Compute it for each interval instead of only at the end. Pointed out by Jiri. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170831194036.30146-12-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 2 ++ 1 file changed, 2 insertions(+) commit e864c5ca145e49bfce4847bd14b47b5f8549b2b1 Author: Andi Kleen Date: Thu Aug 31 12:40:35 2017 -0700 perf stat: Hide internal duration_time counter Some perf stat metrics use an internal "duration_time" metric. It is not correctly printed however. So hide it during output to avoid confusing users with 0 counts. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170831194036.30146-11-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/builtin-stat.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) commit fd48aad9b0f3f7654433dfae3a72ceda36e2de28 Author: Andi Kleen Date: Thu Aug 31 12:40:34 2017 -0700 perf stat: Support duration_time for metrics Some of the metrics formulas (like GFLOPs) need to know how long the measurement period is. Support an internal event called duration_time, which reports time in second. It maps to the dummy event, but is special cased for statistics to report the walltime duration. So far it is not printed, but only used internally for metrics. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170831194036.30146-10-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/parse-events.l | 1 + tools/perf/util/stat-shadow.c | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) commit 4e1a096380e3b558ef021afc08e193ce5d1be478 Author: Andi Kleen Date: Thu Aug 31 12:40:33 2017 -0700 perf stat: Don't use ctx for saved values lookup We don't need to use ctx to look up events for saved values. The context is already part of the evsel pointer, which is the primary key. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170831194036.30146-9-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-shadow.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 71b0acce78d12e99eeda6fd6642ba89cc2b2b49c Author: Andi Kleen Date: Thu Aug 31 12:40:32 2017 -0700 perf list: Add metric groups to perf list Add code to perf list to print metric groups, and metrics that don't have an event name. The metricgroup code collects the eventgroups and events into a rblist, and then prints them according to the configured filters. The metricgroups are printed by default, but can be limited by perf list metric or perf list metricgroup % perf list metricgroup .. Metric Groups: DSB: DSB_Coverage [Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)] FLOPS: GFLOPs [Giga Floating Point Operations Per Second] Frontend: IFetch_Line_Utilization [Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions] Frontend_Bandwidth: DSB_Coverage [Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)] Memory_BW: MLP [Memory-Level-Parallelism (average number of L1 miss demand load when there is at least 1 such miss)] v2: Check return value of asprintf to fix warning on FC26 Fix key in lookup/addition for the groups list Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170831194036.30146-8-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-list.txt | 7 +- tools/perf/builtin-list.c | 7 ++ tools/perf/util/metricgroup.c | 176 +++++++++++++++++++++++++++++++++ tools/perf/util/parse-events.c | 3 + 4 files changed, 192 insertions(+), 1 deletion(-) commit b18f3e365019de1a5b26a851e123f0aedcce881f Author: Andi Kleen Date: Thu Aug 31 12:40:31 2017 -0700 perf stat: Support JSON metrics in perf stat Add generic support for standalone metrics specified in JSON files to perf stat. A metric is a formula that uses multiple events to compute a higher level result (e.g. IPC). Previously metrics were always tied to an event and automatically enabled with that event. But now change it that we can have standalone metrics. They are in the same JSON data structure as events, but don't have an event name. We also allow to organize the metrics in metric groups, which allows a short cut to select several related metrics at once. Add a new -M / --metrics option to perf stat that adds the metrics or metric groups specified. Add the core code to manage and parse the metric groups. They are collected from the JSON data structures into a separate rblist. When computing shadow values look for metrics in that list. Then they are computed using the existing saved values infrastructure in stat-shadow.c The actual JSON metrics are in a separate pull request. % perf stat -M Summary --metric-only -a sleep 1 Performance counter stats for 'system wide': Instructions CLKS CPU_Utilization GFLOPs SMT_2T_Utilization Kernel_Utilization 317614222.0 1392930775.0 0.0 0.0 0.2 0.1 1.001497549 seconds time elapsed % perf stat -M GFLOPs flops Performance counter stats for 'flops': 3,999,541,471 fp_comp_ops_exe.sse_scalar_single # 1.2 GFLOPs (66.65%) 14 fp_comp_ops_exe.sse_scalar_double (66.65%) 0 fp_comp_ops_exe.sse_packed_double (66.67%) 0 fp_comp_ops_exe.sse_packed_single (66.70%) 0 simd_fp_256.packed_double (66.70%) 0 simd_fp_256.packed_single (66.67%) 0 duration_time 3.238372845 seconds time elapsed v2: Add missing header file v3: Move find_map to pmu.c Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170831194036.30146-7-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-stat.txt | 7 + tools/perf/builtin-stat.c | 18 +- tools/perf/util/Build | 1 + tools/perf/util/metricgroup.c | 313 +++++++++++++++++++++++++++++++++ tools/perf/util/metricgroup.h | 31 ++++ tools/perf/util/pmu.c | 5 +- tools/perf/util/stat-shadow.c | 22 ++- tools/perf/util/stat.h | 4 +- 8 files changed, 395 insertions(+), 6 deletions(-) commit d77ade9f4199c77c63e2ae382a8c8fbe0582ede2 Author: Andi Kleen Date: Thu Aug 31 12:40:30 2017 -0700 perf pmu: Extract function to get JSON alias map Extract the code to get the per cpu JSON alias into a separate function for reuse. No behavior changes. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170831194036.30146-6-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/pmu.c | 49 +++++++++++++++++++++++++++++++++---------------- tools/perf/util/pmu.h | 2 ++ 2 files changed, 35 insertions(+), 16 deletions(-) commit 4ed962eb38c8a33b8b6ded911410afaefa1ca48c Author: Andi Kleen Date: Thu Aug 31 12:40:29 2017 -0700 perf stat: Print generic metric header even for failed expressions Print the generic metric header even when the expression evaluation failed. Otherwise an expression that fails on the first collections due to division by zero may suddenly reappear later without an header. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170831194036.30146-5-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-shadow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit bba49af87393ebc8960bf8abdcbb9af53bf1aba1 Author: Andi Kleen Date: Thu Aug 31 12:40:28 2017 -0700 perf stat: Factor out generic metric printing The 'perf stat' shadow metric printing already supports generic metrics. Factor out the code doing that into a separate function that can be re-used in a later patch. No behavior changes. v2: Fix indentation Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170831194036.30146-4-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/util/stat-shadow.c | 69 ++++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 27 deletions(-) commit 3ba36d3620d08be31f5ee9ae20abb9bf3bdeb05a Author: Andi Kleen Date: Thu Aug 31 12:40:27 2017 -0700 perf vendor events: Support metric_group and no event name in JSON parser Some enhancements to the JSON parser to prepare for metrics support - Parse the new MetricGroup field - Support JSON events with no event name, that have only MetricName. Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Link: http://lkml.kernel.org/r/20170831194036.30146-3-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo tools/perf/pmu-events/jevents.c | 24 ++++++++++++++++++------ tools/perf/pmu-events/jevents.h | 2 +- tools/perf/pmu-events/pmu-events.h | 1 + 3 files changed, 20 insertions(+), 7 deletions(-) commit 5a5dfe4b8548d806bf433090995ee0ee4c139f11 Author: Andi Kleen Date: Thu Aug 31 12:40:26 2017 -0700 perf tools: Support weak groups in 'perf stat' Setting up groups can be complicated due to the complicated scheduling restrictions of different PMUs. User tools usually don't understand all these restrictions. Still in many cases it is useful to set up groups and they work most of the time. However if the group is set up wrong some members will not report any value because they never get scheduled. Add a concept of a 'weak group': try to set up a group, but if it's not schedulable fallback to not using a group. That gives us the best of both worlds: groups if they work, but still a usable fallback if they don't. In theory it would be possible to have more complex fallback strategies (e.g. try to split the group in half), but the simple fallback of not using a group seems to work for now. So far the weak group is only implemented for perf stat, not for record. Here's an unschedulable group (on IvyBridge with SMT on) % perf stat -e '{branches,branch-misses,l1d.replacement,l2_lines_in.all,l2_rqsts.all_code_rd}' -a sleep 1 73,806,067 branches 4,848,144 branch-misses # 6.57% of all branches 14,754,458 l1d.replacement 24,905,558 l2_lines_in.all l2_rqsts.all_code_rd <------- will never report anything With the weak group: % perf stat -e '{branches,branch-misses,l1d.replacement,l2_lines_in.all,l2_rqsts.all_code_rd}:W' -a sleep 1 125,366,055 branches (80.02%) 9,208,402 branch-misses # 7.35% of all branches (80.01%) 24,560,249 l1d.replacement (80.00%) 43,174,971 l2_lines_in.all (80.05%) 31,891,457 l2_rqsts.all_code_rd (79.92%) The extra event scheduled with some extra multiplexing v2: Move fallback code to separate function. Add comment on for_each_group_member Adjust to new perf_evsel__close interface v3: Fix debug print out. Committer testing: Before: # perf stat -e '{branches,branch-misses,l1d.replacement,l2_lines_in.all,l2_rqsts.all_code_rd}' -a sleep 1 Performance counter stats for 'system wide': branches branch-misses l1d.replacement l2_lines_in.all l2_rqsts.all_code_rd 1.002147212 seconds time elapsed # perf stat -e '{branches,l1d.replacement,l2_lines_in.all,l2_rqsts.all_code_rd}' -a sleep 1 Performance counter stats for 'system wide': 83,207,892 branches 11,065,444 l1d.replacement 28,484,024 l2_lines_in.all 12,186,179 l2_rqsts.all_code_rd 1.001739493 seconds time elapsed After: # perf stat -e '{branches,branch-misses,l1d.replacement,l2_lines_in.all,l2_rqsts.all_code_rd}':W -a sleep 1 Performance counter stats for 'system wide': 543,323,909 branches (80.01%) 27,100,512 branch-misses # 4.99% of all branches (80.02%) 50,402,905 l1d.replacement (80.03%) 67,385,892 l2_lines_in.all (80.01%) 21,352,885 l2_rqsts.all_code_rd (79.94%) 1.001086658 seconds time elapsed # Signed-off-by: Andi Kleen Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Link: http://lkml.kernel.org/r/20170831194036.30146-2-andi@firstfloor.org [ Add a "'perf stat' only, for now" comment in the man page, suggested by Jiri ] Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-list.txt | 2 ++ tools/perf/builtin-stat.c | 35 ++++++++++++++++++++++++++++++++++ tools/perf/util/evsel.h | 1 + tools/perf/util/parse-events.c | 8 +++++++- tools/perf/util/parse-events.l | 2 +- 5 files changed, 46 insertions(+), 2 deletions(-) commit 0f59d7a352c11712de0f226b46cb82775b4fcece Author: David Ahern Date: Fri Sep 1 10:49:12 2017 -0700 perf sched timehist: Add pid and tid options Add options to only show event for specific pid(s) and tid(s). Signed-off-by: David Ahern Cc: Namhyung Kim Link: http://lkml.kernel.org/r/1504288152-19690-1-git-send-email-dsahern@gmail.com Signed-off-by: Arnaldo Carvalho de Melo tools/perf/Documentation/perf-sched.txt | 8 ++++++++ tools/perf/builtin-sched.c | 4 ++++ 2 files changed, 12 insertions(+) commit 7ce5b6850b47824a2b8d0a17b5fe75f9942e5cd1 Author: Chris Wilson Date: Wed Sep 13 11:51:54 2017 +0100 drm/i915/selftests: Use mul_u32_u32() for 32b x 32b -> 64b result As realised by commit 9e3d6223d209 ("math64, timers: Fix 32bit mul_u64_u32_shr() and friends"), GCC does not always generate ideal code for performing a 32b x 32b multiply returning a 64b result (i.e. where we idiomatically use u64 result = (u64)x * (u32)x). Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170913105154.2910-2-chris@chris-wilson.co.uk Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/selftests/i915_gem_timeline.c | 2 +- drivers/gpu/drm/i915/selftests/i915_random.c | 5 ----- drivers/gpu/drm/i915/selftests/i915_random.h | 5 +++++ 3 files changed, 6 insertions(+), 6 deletions(-) commit 3123698f50fe4ac9ddb775dcd2b34a1d9cdd603f Author: Chris Wilson Date: Wed Sep 13 11:51:53 2017 +0100 drm/i915: Use mul_u32_u32() for 32b x 32b -> 64b result As realised by commit 9e3d6223d209 ("math64, timers: Fix 32bit mul_u64_u32_shr() and friends"), GCC does not always generate ideal code for performing a 32b x 32b multiply returning a 64b result (i.e. where we idiomatically use u64 result = (u64)x * (u32)x). This catches a couple of instances in the display code using (u64)x * (u32)y. Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170913105154.2910-1-chris@chris-wilson.co.uk Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_tv.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e60b36f76c2ee0ba90b431daa534bc262798fb26 Author: Chris Wilson Date: Wed Sep 13 11:57:54 2017 +0100 drm/i915: Squelch smatch warning for statement with no effect The sgt iterators cause an drivers/gpu/drm/i915/i915_gpu_error.c:846 i915_error_object_create() warn: statement has no effect 7 everywhere they are used. If we change the code slightly, we can achieve the same increment without altering the output or raising a warning. text data bss dec hex filename 1267906 20587 3168 1291661 13b58d before 1267906 20587 3168 1291661 13b58d after Signed-off-by: Chris Wilson Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170913105754.4423-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ada8c4139fbad766fdf9e63b31c49874299fd60c Author: Oscar Mateo Date: Tue Sep 12 14:36:37 2017 -0700 drm/i915/guc: Small improvements to guc_wq_item_append Spare some comments and other small style changes. Suggested-by: Joonas Lahtinen Signed-off-by: Oscar Mateo Link: https://patchwork.freedesktop.org/patch/msgid/1505252197-27696-3-git-send-email-oscar.mateo@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_guc_submission.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 048d2847d76df2a7e801d77d411216910b0643c4 Author: Oscar Mateo Date: Tue Sep 12 14:36:36 2017 -0700 drm/i915/guc: Remove WQ_WORKLOAD_SHIFT define We never used it in i915 and it's going to be removed in newer GuC firmwares anyway. Signed-off-by: Oscar Mateo Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/1505252197-27696-2-git-send-email-oscar.mateo@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_guc_fwif.h | 4 ---- 1 file changed, 4 deletions(-) commit e9eb8039ba0cb902817fafb5a0217dba0544f165 Author: Oscar Mateo Date: Tue Sep 12 14:36:35 2017 -0700 drm/i915/guc: Name the default GuC scheduling policy The default values for the default scheduling policy come from the GuC firmware itself. Transform the magic numbers into defines. Suggested-by: Joonas Lahtinen Signed-off-by: Oscar Mateo Link: https://patchwork.freedesktop.org/patch/msgid/1505252197-27696-1-git-send-email-oscar.mateo@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_guc_submission.c | 15 ++++++++++----- drivers/gpu/drm/i915/intel_guc_fwif.h | 6 +++++- 2 files changed, 15 insertions(+), 6 deletions(-) commit 2013ddebd2f4b5ef90625c8b82da216df0123134 Author: Chris Wilson Date: Tue Sep 12 22:49:05 2017 +0100 drm/i915: Move the context descriptor to an inline helper The context descriptor is stored inside the per-engine context state, as we only need to compute it once and access it frequently. However, currently only intel_lrc.c has easy access, but i915_guc_submission.c would like to frequently read it as well, and more so only ever needs the lower 32bits. Make it an inline as the compiler should be able to retrieve the value in less instructions than it takes to do the function call: add/remove: 0/1 grow/shrink: 1/0 up/down: 8/-45 (-37) function old new delta i915_guc_submit 621 629 +8 intel_lr_context_descriptor 45 - -45 Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170912214905.21987-1-chris@chris-wilson.co.uk Reviewed-by: Oscar Mateo drivers/gpu/drm/i915/intel_lrc.c | 6 ------ drivers/gpu/drm/i915/intel_lrc.h | 11 +++++++++-- 2 files changed, 9 insertions(+), 8 deletions(-) commit 5b65c4677a57a1d4414212f9995aa0e46a21ff80 Author: Kirill A. Shutemov Date: Sat Sep 9 00:56:03 2017 +0300 mm, x86/mm: Fix performance regression in get_user_pages_fast() The 0-day test bot found a performance regression that was tracked down to switching x86 to the generic get_user_pages_fast() implementation: http://lkml.kernel.org/r/20170710024020.GA26389@yexl-desktop The regression was caused by the fact that we now use local_irq_save() + local_irq_restore() in get_user_pages_fast() to disable interrupts. In x86 implementation local_irq_disable() + local_irq_enable() was used. The fix is to make get_user_pages_fast() use local_irq_disable(), leaving local_irq_save() for __get_user_pages_fast() that can be called with interrupts disabled. Numbers for pinning a gigabyte of memory, one page a time, 20 repeats: Before: Average: 14.91 ms, stddev: 0.45 ms After: Average: 10.76 ms, stddev: 0.18 ms Signed-off-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Huang Ying Cc: Jonathan Corbet Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Thorsten Leemhuis Cc: linux-mm@kvack.org Fixes: e585513b76f7 ("x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation") Link: http://lkml.kernel.org/r/20170908215603.9189-3-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar mm/gup.c | 97 ++++++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 58 insertions(+), 39 deletions(-) commit 5b60fc09806a9db0fb46e6821bc1ed3203b6740e Author: Mika Kahola Date: Fri Sep 1 10:51:01 2017 +0300 drm/i915/dsi: Replace MIPI command error message with debug message Error message indicating that the same MIPI command is sent consecutively is perhaps too strongly said. Let's replace that as a debug message instead. Signed-off-by: Mika Kahola Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1504252261-28964-3-git-send-email-mika.kahola@intel.com drivers/gpu/drm/i915/intel_dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f44e354f857f207cd361269c5e38e1f96e0b616c Author: Lee, Shawn C Date: Wed Sep 13 13:19:20 2017 +0800 drm/i915/cnp: set min brightness from VBT Min brightness value from vbt was missing for CNP platform. This setting have to refer backlight ic spec to restrict min backlight output. Without this restriction, driver would allow to configure lower brightness value and violate backlight ic requirement. Fixes: 4c9f7086ac6d ("drm/i915/cnp: Backlight support for CNP.") Cc: Jani Nikula Signed-off-by: Shawn Lee Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1505279961-16140-1-git-send-email-shawn.c.lee@intel.com drivers/gpu/drm/i915/intel_panel.c | 2 ++ 1 file changed, 2 insertions(+) commit 33c8d8870c67faf3161898a56af98ac3c1c71450 Author: Uma Shankar Date: Tue Sep 5 15:14:31 2017 +0530 Revert "drm/i915/bxt: Disable device ready before shutdown command" This reverts commit bbdf0b2ff32a ("drm/i915/bxt: Disable device ready before shutdown command"). Disable device ready before shutdown command was added previously to avoid a split screen issue seen on dual link DSI panels. As of now, dual link is not supported and will need some rework in the upstream code. For single link DSI panels, the change is not required. This will cause failure in sending SHUTDOWN packet during disable. Hence reverting the change. Will handle the change as part of dual link enabling in upstream. Fixes: bbdf0b2ff32a ("drm/i915/bxt: Disable device ready before shutdown command") Cc: # v4.12+ Signed-off-by: Uma Shankar Signed-off-by: Vidya Srinivas Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1504604671-17237-1-git-send-email-vidya.srinivas@intel.com drivers/gpu/drm/i915/intel_dsi.c | 11 ----------- 1 file changed, 11 deletions(-) commit 3fa6a073542fec11f388d687a4db5c64e1e347a4 Author: Maarten Lankhorst Date: Tue Sep 12 15:37:49 2017 +0200 drm/crtc: Convert setcrtc ioctl locking to interruptible. Pass DRM_MODESET_ACQUIRE_INTERRUPTIBLE to acquire_init, and handle drm_modeset_backoff which can now fail by returning the error. Signed-off-by: Maarten Lankhorst Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170912133749.6532-7-maarten.lankhorst@linux.intel.com Reviewed-by: Emil Velikov drivers/gpu/drm/drm_crtc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c2e4ff34f4a7631380fcae1b7381e24e9bc1345e Author: Maarten Lankhorst Date: Tue Sep 12 15:37:48 2017 +0200 drm/atomic: Convert pageflip ioctl locking to interruptible. Pass DRM_MODESET_ACQUIRE_INTERRUPTIBLE to acquire_init, and handle drm_modeset_backoff which can now fail by returning the error. Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170912133749.6532-6-maarten.lankhorst@linux.intel.com Reviewed-by: Emil Velikov drivers/gpu/drm/drm_plane.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 13736ba3b38b1b50979eaafd2e63ab9da146a059 Author: Maarten Lankhorst Date: Tue Sep 12 15:37:47 2017 +0200 drm/legacy: Convert setplane ioctl locking to interruptible. Pass DRM_MODESET_ACQUIRE_INTERRUPTIBLE to acquire_init, and handle drm_modeset_backoff which can now fail by returning the error. Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170912133749.6532-5-maarten.lankhorst@linux.intel.com Reviewed-by: Emil Velikov drivers/gpu/drm/drm_plane.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 6c886e4aff0d09265855f62b31522b8328224a3d Author: Maarten Lankhorst Date: Tue Sep 12 15:37:46 2017 +0200 drm/legacy: Convert cursor ioctl locking to interruptible. Pass DRM_MODESET_ACQUIRE_INTERRUPTIBLE to acquire_init, and handle drm_modeset_backoff which can now fail by returning the error. Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170912133749.6532-4-maarten.lankhorst@linux.intel.com Reviewed-by: Emil Velikov drivers/gpu/drm/drm_plane.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit dad56ce4172e79b9ded5c6fc279710ce5e55f03f Author: Maarten Lankhorst Date: Tue Sep 12 15:37:45 2017 +0200 drm/atomic: Convert atomic ioctl locking to interruptible. Pass DRM_MODESET_ACQUIRE_INTERRUPTIBLE to acquire_init, and handle drm_modeset_backoff which can now fail by returning the error. Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170912133749.6532-3-maarten.lankhorst@linux.intel.com Reviewed-by: Emil Velikov drivers/gpu/drm/drm_atomic.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 6f8bcc744aad50d719845e4ce06a7831e96e1109 Author: Maarten Lankhorst Date: Tue Sep 12 15:37:44 2017 +0200 drm/atomic: Prepare drm_modeset_lock infrastructure for interruptible waiting, v2. When we want to make drm_atomic_commit interruptible, there are a lot of places that call the lock function, which we don't have control over. Rather than trying to convert every single one, it's easier to toggle interruptible waiting per acquire_ctx. If drm_modeset_acquire_init is called with DRM_MODESET_ACQUIRE_INTERRUPTIBLE, then we will perform interruptible waits in drm_modeset_lock and drm_modeset_backoff. Changes since v1: - Fix locking example in drm_modeset_lock.c to be compatible with interruptible waiting (xexaxo) and make it default. Uninterruptible waiting shouldn't happen except in corner cases, but the example will still apply if the flag is removed. - Add drm_modeset_lock_single_interruptible() to documentation. - Fix dead link to removed drm_modeset_lock_interruptible() in drm_modeset_lock(). Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter #v1 Cc: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20170912133749.6532-2-maarten.lankhorst@linux.intel.com Reviewed-by: Emil Velikov drivers/gpu/drm/drm_debugfs_crc.c | 2 +- drivers/gpu/drm/drm_modeset_lock.c | 96 +++++++++++++++++++------------------- include/drm/drm_modeset_lock.h | 12 +++-- 3 files changed, 57 insertions(+), 53 deletions(-) commit ac70ebe873f5161e46fbd3a5ed318f7c34d0d157 Author: Chris Wilson Date: Tue Sep 12 16:07:52 2017 +0100 drm/i915: Cleanup error paths through eb_lookup_vma() Following the simplification to a single lookup loop in commit 170fa29b14fa ("drm/i915: Simplify eb_lookup_vmas()") and commit d1b48c1e7184 ("drm/i915: Replace execbuf vma ht with an idr"), we can go one step further and reorder the error paths so that the state of the local variable obj is always known to the compiler and doesn't need the uninitialized_var markup to squelch a compiler warning. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20170912150752.20411-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin drivers/gpu/drm/i915/i915_gem_execbuffer.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 4a00f21db800bc64264bb6764c3d0d0878e9f4c4 Author: Himanshu Jha Date: Mon Sep 11 18:07:26 2017 +0530 drm/amd/powerplay: remove unnecessary call to memset call to memset to assign 0 value immediately after allocating memory with kzalloc is unnecesaary as kzalloc allocates the memory filled with 0 value. Semantic patch used to resolve this issue: @@ expression e,e2; constant c; statement S; @@ e = kzalloc(e2, c); if(e == NULL) S - memset(e, 0, e2); Signed-off-by: Himanshu Jha Signed-off-by: Alex Deucher .../drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 20 -------------------- 1 file changed, 20 deletions(-) commit 29c3035fe385b4214fc0515b9cd0ff53d23b4e82 Author: Alex Deucher Date: Sat Sep 2 02:16:35 2017 -0400 drm/amdgpu/gfx9: properly set the hdp flush reg for Raven Was only being assigned for vega10. Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 298e87c95f9c8c2f33d274e92568c6b83ac999a5 Author: Tom St Denis Date: Fri Sep 8 09:45:34 2017 -0400 drm/amd/powerplay: Tidy up vega10_thermal_initialize() Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 23db59e48aa8e5eb622afd9f698e5263fb72c464 Author: Tom St Denis Date: Thu Sep 7 13:08:28 2017 -0400 drm/amd/powerplay: Tidy up vega10_thermal_set_temperature_range() Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit 657b1f469744ea7fe891dbd037bdd7af2fc8f777 Author: Tom St Denis Date: Thu Sep 7 12:59:32 2017 -0400 drm/amd/powerplay: Tidy up vega10_fan_ctrl_set_fan_speed_rpm() Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 1f9ba3bec60fdebae43e8076a497928a40a6b0ca Author: Tom St Denis Date: Thu Sep 7 12:42:38 2017 -0400 drm/amd/powerplay: Fix indentation in vega10_fan_ctrl_reset_fan_speed_to_default() Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 0dba3739a72362e41b84f0751d5f51f981c5ff07 Author: Tom St Denis Date: Thu Sep 7 12:41:51 2017 -0400 drm/amd/powerplay: Tidy up vega10_fan_ctrl_set_fan_speed_percent() Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 0c69dd0a55cd0b5c6a75728c509ca40d1e16e0b7 Author: Tom St Denis Date: Thu Sep 7 12:26:42 2017 -0400 drm/amd/powerplay: Tidy up vega10_fan_ctrl_set_default_mode() Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 893c3880e4f0f1fd405af2096e9052a5be3b06e2 Author: Tom St Denis Date: Thu Sep 7 12:20:48 2017 -0400 drm/amd/powerplay: Tidy up vega10_fan_ctrl_set_static_mode() Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 8c755d9abc158799c1b1087da3c823ff82048fbb Author: Tom St Denis Date: Thu Sep 7 10:36:40 2017 -0400 drm/amd/powerplay: Tidy up vega10_fan_ctrl_get_fan_speed_rpm() Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit f85a49bdb6eed2705a7e5097e5bd1ee0e8da1d9f Author: Tom St Denis Date: Thu Sep 7 07:48:16 2017 -0400 drm/amd/powerplay: Port vega10_thermal.c over to PP_CAP Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 0f26b7b03cbb394451dd1c771a4e0024b805df90 Author: Tom St Denis Date: Thu Sep 7 07:46:40 2017 -0400 drm/amd/powerplay: Port vega10_powertune.c over to PP_CAP Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 47 ++++++++++------------ 1 file changed, 22 insertions(+), 25 deletions(-) commit dd5a6fe2af0366803ddccf27981b7dd48e21099c Author: Tom St Denis Date: Thu Sep 7 07:44:17 2017 -0400 drm/amd/powerplay: Port vega10_hwmgr.c over to PP_CAP Replace and cleanup lengthy phm_cap_enabled() sequences with PP_CAP. Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 91 ++++++++-------------- 1 file changed, 32 insertions(+), 59 deletions(-) commit 583a888a77bcc0e25e29f958a3a77c133306dc73 Author: Tom St Denis Date: Thu Sep 7 07:43:33 2017 -0400 drm/amd/powerplay: Add PP_CAP() macro To replace common lengthy sequence that would create really long lines all over. Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h | 2 ++ 1 file changed, 2 insertions(+) commit 7246187abf965d14d462faef74920b3dd16cb5e3 Author: Tom St Denis Date: Wed Sep 6 08:04:41 2017 -0400 drm/amd/powerplay: Port vega10_didt_set_mask() to new macros Start using new CGS bitmask macros. Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 60 ++++++++-------------- 1 file changed, 20 insertions(+), 40 deletions(-) commit 38e40d9cc428eed0795fa5345357f50da4ec0f21 Author: Tom St Denis Date: Wed Sep 6 08:04:10 2017 -0400 drm/amd/powerplay: Introduction of bitmask macros for registers Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/cgs_common.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 06474d5665729a3275d04212277f17792199b882 Author: Tom St Denis Date: Tue Sep 5 12:33:58 2017 -0400 drm/amd/powerplay: Simplify vega10_acg_disable() Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 9a5487ef56840cbebbb2e57c849bc1cc93c28002 Author: Tom St Denis Date: Tue Sep 5 12:02:57 2017 -0400 drm/amd/powerplay: Simplify vega10_patch_voltage_dependency_tables_with_lookup_table() Signed-off-by: Tom St Denis Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 75 +++++++--------------- 1 file changed, 23 insertions(+), 52 deletions(-) commit d5884513a31df072879c89c80306d544467ee770 Author: Christian König Date: Fri Sep 8 14:09:41 2017 +0200 drm/amdgpu: fix VM sync with always valid BOs v2 All users of a VM must always wait for updates with always valid BOs to be completed. v2: remove debugging leftovers, rename struct member Signed-off-by: Christian König Reviewed-by: Roger He Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 10 ++++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 15 ++++++++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 +- 3 files changed, 17 insertions(+), 10 deletions(-) commit 50811c71fa1b7c2f8b422ad532d75a6860f15a8b Author: Evan Quan Date: Mon Sep 4 17:48:27 2017 +0800 drm/amdgpu: enable raven to load firmwares by psp at default (v2) - v2: share code with CHIP_VEGA10 case Signed-off-by: Evan Quan Reviewed-by: Junwei Zhang Acked-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) commit bcd6eab837fc9db67292c1d071ce2d96bb9689be Author: Evan Quan Date: Fri Sep 8 13:09:50 2017 +0800 drm/amdgpu: stop psp ring on suspend Otherwise, the ring will fail to create on next resume. Signed-off-by: Evan Quan Reviewed-by: Junwei Zhang Acked-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 10 ++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 + 2 files changed, 11 insertions(+) commit 4ef72453311a697b3fb90da9c86c83012911ccf9 Author: Evan Quan Date: Fri Sep 8 13:04:52 2017 +0800 drm/amdgpu: added api for stopping psp ring (v2) - v2: reuse the ring stop api in ring destory Signed-off-by: Evan Quan Reviewed-by: Junwei Zhang Acked-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 2 ++ drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 15 ++++++++++++++- drivers/gpu/drm/amd/amdgpu/psp_v10_0.h | 2 ++ drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 15 ++++++++++++++- drivers/gpu/drm/amd/amdgpu/psp_v3_1.h | 2 ++ 6 files changed, 36 insertions(+), 2 deletions(-) commit f1ac0fc2f2355495628a45e90cbd88e3d2c40ef9 Author: Evan Quan Date: Mon Sep 4 17:42:28 2017 +0800 drm/amdgpu: fixed raven psp cmd prepare and submit - fw_size in psp_v10_0_prep_cmd_buf is wrongly set as 0 - fixed the wrong calculation of psp_write_ptr_reg in psp_v10_0_cmd_submit Signed-off-by: Evan Quan Reviewed-by: Junwei Zhang Acked-by: Christian König Reviewed-by: Huang Rui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 9a18999640fa6aed0578c59c328dca9ca01a2d9a Author: Christian König Date: Tue Sep 12 14:29:07 2017 -0400 drm/amdgpu: move MMU notifier related defines to amdgpu_mn.h Just some cleanup. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 25 +--------------- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h | 52 ++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 24 deletions(-) commit 711becf0e6c5bf7cabd8f1ca528e9bbe085fda9a Author: Christian König Date: Fri Sep 8 17:19:19 2017 +0200 drm/amdgpu: move amdgpu_ttm_tt_* declarations into amdgpu_ttm.h Just some cleanup. Signed-off-by: Christian König Reviewed-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 15 --------------- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) commit 1ed3d2567c800eca053ef86fdd3fc27b72d0192e Author: Christian König Date: Tue Sep 5 17:30:46 2017 +0200 drm/amdgpu: keep the MMU lock until the update ends v4 This is quite controversial because it adds another lock which is held during page table updates, but I don't see much other option. v2: allow multiple updates to be in flight at the same time v3: simplify the patch, take the read side only once v4: correctly fix rebase conflict Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 59 +++++++++++++++++++++++++++++++--- 2 files changed, 57 insertions(+), 6 deletions(-) commit aebc5e6f50f770ec9392c3ca804f18b30797dfa7 Author: Christian König Date: Wed Sep 6 16:55:16 2017 +0200 drm/amdgpu: rework amdgpu_cs_find_mapping Use the VM instead of the BO list to find the BO for a virtual address. This fixes UVD/VCE in physical mode with VM local BOs. Signed-off-by: Christian König Acked-by: Leo Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 42 +++++++----------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 17 ++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 ++ 4 files changed, 30 insertions(+), 32 deletions(-) commit 9cca0b8e5df0ac438c65eec5044bfa089d16fbbe Author: Christian König Date: Wed Sep 6 16:15:28 2017 +0200 drm/amdgpu: move amdgpu_cs_sysvm_access_required into find_mapping When we need to find the mapping we need sysvm access anyway. Signed-off-by: Christian König Acked-by: Leo Liu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 64 ++++++++++++--------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 16 ++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 11 +++--- 4 files changed, 36 insertions(+), 63 deletions(-) commit f5683f8b3794f9496877fb9e20305433c6575b81 Author: Christian König Date: Wed Sep 6 16:55:55 2017 +0200 drm/ttm: allow mapping BOs while they are still on the swap list With shared reservation objects it is possible that we want to temporary kmap an BO while it is still on the swap list. Signed-off-by: Christian König Acked-by: Leo Liu Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo_util.c | 1 - 1 file changed, 1 deletion(-) commit 3fe89771cb0a65d3b686bcafb5b7e3ebae0ea604 Author: Christian König Date: Tue Sep 12 14:25:14 2017 -0400 drm/amdgpu: stop reserving the BO in the MMU callback v3 Instead take the callback lock during the final parts of CS. This should solve the last remaining locking order problems with BO reservations. v2: rebase, make dummy functions static inline v3: add one more missing inline and comments Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 11 +++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 30 ++++++++++++++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 30 +++++++++++++++++++++--------- 3 files changed, 56 insertions(+), 15 deletions(-) commit 60de1c1740f390fe48141b54d04cc53a6073d347 Author: Christian König Date: Tue Sep 5 14:50:24 2017 +0200 drm/amdgpu: use a rw_semaphore for MMU notifiers Allow at least some parallel processing. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 1b0c0f9dc5ca6c0c8be21eeac92c7aa77bbf1d33 Author: Christian König Date: Tue Sep 5 14:36:44 2017 +0200 drm/amdgpu: move userptr BOs to CPU domain during CS v2 Instead of moving them in the MMU notifier move them during CS. v2: still mark pages as accessed/dirty Signed-off-by: Christian König Reviewed-by: Felix Kuehling (v1) Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 5 +---- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 27 +++++++++++++++++++-------- 4 files changed, 27 insertions(+), 12 deletions(-) commit ca666a3c298f838346ccea46ff542c605e68deb5 Author: Christian König Date: Tue Sep 5 14:30:05 2017 +0200 drm/amdgpu: stop using BO status for user pages Instead use a counter to figure out if we need to set new pages or not. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 11 +++++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 14 ++++++++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) commit b72cf4fca2bb786e20864b5e8755105aa9626fb4 Author: Christian König Date: Sun Sep 3 15:22:06 2017 +0200 drm/amdgpu: move taking mmap_sem into get_user_pages v2 This didn't helped as intended, just simplify the code. v2: unlock mmap_sem in the error path as well Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 12 +----------- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 ---- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 +++++++- 3 files changed, 8 insertions(+), 16 deletions(-) commit 862095237c392887819e98018d6dc187d8c78726 Author: Bas Nieuwenhuizen Date: Thu Sep 7 13:23:21 2017 +0200 drm/amdgpu: Account for shadow PTs in mapping update IB size. When amdgpu_vm_frag_ptes calls amdgpu_vm_update_ptes and the pt has a shadow PT we mirror all the write to the shadow PT too, which results in twice the commands. Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 378e2d5b504fe0231c557751e58b80fcf717cc20 Author: Christian König Date: Mon Sep 4 20:58:45 2017 +0200 drm/ttm: fix ttm_bo_cleanup_refs_or_queue once more With shared reservation objects __ttm_bo_reserve() can easily fail even on destroyed BOs. This prevents correct handling when we need to individualize the reservation object. Fix this by individualizing the object before even trying to reserve it. Signed-off-by: Christian König Acked-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit aa4ec7ce7ec52c7230cfa73b06d79288b45fe1c9 Author: Christian König Date: Tue Sep 5 15:10:50 2017 +0200 drm/amdgpu: revert "fix deadlock of reservation between cs and gpu reset v2" This reverts commit 10e709cb296c98424c03408d23e3addeddcd4088. The patch doesn't work at all: 1. The CS can still be blocked because of amdgpu_ctx_add_fence(). 2. The order of submission isn't correct any more. 3. We could end up using freed up memory because we now drop the ctx reference to early. This needs to be fixed cleanly by doing the context handling after the BO handling, but this is a larger task just avoid the obvious crashes for now. Signed-off-by: Christian König Reviewed-by: Monk Liu monk.liu@amd.com Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ---- 1 file changed, 4 deletions(-) commit 64d03abe6ee36ec48e997743e9397ae160eb508a Author: Tom St Denis Date: Tue Sep 5 07:55:48 2017 -0400 drm/amd/powerplay: Fix psm_set_user_performance_state() We now pass a pointer to a pointer which seems to be what they meant in the first place. The previous version was modifying a pointer passed by value. Fixes bug that was introduced by commit 332798d40c2e91:drm/amd/powerplay: delete eventmgr layer in poweprlay Signed-off-by: Tom St Denis Reviewed-By: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 4 ++-- drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 8 ++++---- drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) commit a216ab09955d6b77f3af4f0aba9255c5ddf382f5 Author: Christian König Date: Sat Sep 2 13:21:31 2017 +0200 drm/amdgpu: fix userptr put_page handling Move calling put_page into the unpopulate callback. Otherwise we mess up the pages reference count when it is unbound multiple times. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 ++---- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 14 +++++++++++++- 3 files changed, 16 insertions(+), 5 deletions(-) commit 7a9667ae197460e6c9c3bb432fe68c708fce6259 Author: Tom St Denis Date: Tue Sep 5 07:30:59 2017 -0400 drm/ttm: Fix configuration error around populate_and_map() functions Fixed kbuild errors when IOMMU/SWIOTLB are disabled. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 ++ 1 file changed, 2 insertions(+) commit a2138eaf97b4e053b229fe07e1bb4ecbe07e6769 Author: Monk Liu Date: Fri Aug 11 17:49:48 2017 +0800 drm/amdgpu: fix wait_any_fence first is incorrect if hit NULL/signaled fence Signed-off-by: Monk Liu Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 + 1 file changed, 1 insertion(+) commit 238e793f4704e794bd3bc04b0e8fadcf0334b495 Author: Rex Zhu Date: Tue Aug 29 17:07:38 2017 +0800 drm/amd/powerplay: set uvd/vce/nb/mclk level as UMD P-state required Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 9947f7047f2b57735fa5c76d63728642a1850527 Author: Rex Zhu Date: Tue Aug 29 16:08:56 2017 +0800 drm/amd/powerplay: add UMD P-state in powerplay. This feature is for UMD to run benchmark in a power state that is as steady as possible. kmd need to fix the power state as stable as possible. now, kmd support four level: profile_standard,peak,min_sclk,min_mclk move common related code to amd_powerplay.c Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 47 +++++++++++++++++- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 36 -------------- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 58 ++++------------------ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 53 +++----------------- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 4 +- 5 files changed, 66 insertions(+), 132 deletions(-) commit 47047263c52779f1f3393c32e3e53661b53a372e Author: Rex Zhu Date: Fri Sep 1 13:48:11 2017 +0800 drm/amd/powerplay: delete eventmgr related files. Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/eventmgr/Makefile | 11 - .../drm/amd/powerplay/eventmgr/eventactionchains.c | 291 -------------- .../drm/amd/powerplay/eventmgr/eventactionchains.h | 62 --- drivers/gpu/drm/amd/powerplay/eventmgr/eventinit.c | 195 --------- drivers/gpu/drm/amd/powerplay/eventmgr/eventinit.h | 34 -- .../drm/amd/powerplay/eventmgr/eventmanagement.c | 215 ---------- .../drm/amd/powerplay/eventmgr/eventmanagement.h | 59 --- drivers/gpu/drm/amd/powerplay/eventmgr/eventmgr.c | 104 ----- .../drm/amd/powerplay/eventmgr/eventsubchains.c | 410 ------------------- .../drm/amd/powerplay/eventmgr/eventsubchains.h | 100 ----- .../gpu/drm/amd/powerplay/eventmgr/eventtasks.c | 445 --------------------- .../gpu/drm/amd/powerplay/eventmgr/eventtasks.h | 89 ----- drivers/gpu/drm/amd/powerplay/eventmgr/psm.c | 119 ------ drivers/gpu/drm/amd/powerplay/eventmgr/psm.h | 38 -- drivers/gpu/drm/amd/powerplay/inc/eventmanager.h | 109 ----- drivers/gpu/drm/amd/powerplay/inc/eventmgr.h | 124 ------ 16 files changed, 2405 deletions(-) commit df1e63942063a0638a5813e5904988d834db2665 Author: Rex Zhu Date: Fri Sep 1 13:46:20 2017 +0800 drm/amd/powerplay: delete eventmgr layer in poweprlay Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 2 +- drivers/gpu/drm/amd/powerplay/Makefile | 5 +- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 112 +--------- drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 3 +- .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 18 +- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 214 +++++++++++------- drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 246 +++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.h | 40 ++++ drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 96 +------- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 5 + drivers/gpu/drm/amd/powerplay/inc/pp_instance.h | 2 - 13 files changed, 475 insertions(+), 282 deletions(-) commit 4ebc65092ca3d9713d48ea43e7db5b3f07faf1bc Author: Dhinakaran Pandiyan Date: Fri Sep 8 17:42:55 2017 -0700 drm/i915/spt+: Don't reset invalid AUX channel interrupt bits in SDEIMR The SDE interrupt bits 25, 26 and 27 are either reserved or meant for DDI E hotplug in SPT+. These bits are meant for AUX channels only in LPT and CPT, so add the appropriate checks. Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20170909004255.14827-1-dhinakaran.pandiyan@intel.com drivers/gpu/drm/i915/i915_irq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 61843f0e6212a8592cba26ff554af4af0dd93778 Author: Ville Syrjälä Date: Tue Sep 12 18:34:11 2017 +0300 drm/i915: Name the IPS_PCODE_CONTROL bit Give a name to the bit which tells pcode to control IPS. v2: Note that IPS_CTL bits apply to DISPLAY_IPS_CONTROL as well (Chris) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170912153411.20171-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_display.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 3e8ddd9e5071841827ec32a7a5ff11eaac5ad3d0 Author: Ville Syrjälä Date: Tue Sep 12 18:34:10 2017 +0300 drm/i915: Nuke some bogus tabs from the pcode defines Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170912153411.20171-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_reg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 36e16c49dbfec806754862f63136de552d4de4ba Author: Zhi Wang Date: Tue Sep 12 15:42:24 2017 +0800 drm/i915: Factor out setup_private_pat() Factor out setup_private_pat() for introducing the following patches. Signed-off-by: Zhi Wang Cc: Ben Widawsky Cc: Rodrigo Vivi Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Reviewed-by: Ben Widawsky Link: https://patchwork.freedesktop.org/patch/msgid/1505202148-22959-1-git-send-email-zhi.a.wang@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem_gtt.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit c3881128cb672cf484a52fbb36b5daa9044d9168 Author: Lee, Shawn C Date: Tue Sep 12 11:36:30 2017 +0800 drm/i915/bxt: set min brightness from VBT Min brightness value from vbt was missing for BXT platform. This setting have to refer backlight ic spec to restrict min backlight output. Without this restriction, driver would allow to configure lower brightness value and violate backlight ic requirement. Fixes: 0fb890c01349 ("drm/i915/bxt: BLC implementation") Cc: Jani Nikula Cc: Cooper Chiou Cc: Gary C Wang Signed-off-by: Shawn Lee Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1505187390-7039-1-git-send-email-shawn.c.lee@intel.com drivers/gpu/drm/i915/intel_panel.c | 2 ++ 1 file changed, 2 insertions(+) commit 3164888a40469c102b5d6d1b756c7646e7eb19e7 Author: Marta Lofstedt Date: Fri Sep 8 16:28:29 2017 +0300 drm/i915: Increase poll time for BDW FCLK_DONE During IGT testing it has been shown that the specification defined polling time of 1 us for FCLK_DONE, is sometimes not enough. The issue is still reproducible while disabling C-states through the PM QoS framework and also while disabling preemtion. From this the most plausible explanation is that the issue is due to a firmware flaw. As a workaround, it is better to wait a little bit longer for the FCLK_DONE to come around, than to leave with an DRM_ERROR and having FCLK_DONE at a randome time after. While spinning a list of igt tests prone to reproduce the issue the FCLK_DONE poll failed at approximately 2% of the invocations of the bdw_set_cdclk function. The longest poll time during this testing was measured to ~7us. So, the suggested new poll time of 100us is on the safe side. v2: Added more documentation about investigations done. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102243 Signed-off-by: Marta Lofstedt Reviewed-by: Daniel Vetter Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20170908132829.6312-1-marta.lofstedt@intel.com drivers/gpu/drm/i915/intel_cdclk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d0d5e0d7b11359ccdc7276339ec29d98f4739453 Author: Rodrigo Vivi Date: Thu Sep 7 16:00:41 2017 -0700 drm/i915/psr: Add enable_source vfunc. Continue on VLV PSR split with vfunc, let's also create one for enabling source. Also since we are touching *_enable_source functions let's fix a comment with wrong name for vlv's one. v2: Fix typo on commit message (DK). Cc: Daniel Vetter Cc: Dhinakaran Pandiyan Cc: Vathsala Nagaraju Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170907230041.22978-12-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_psr.c | 14 ++++---------- 2 files changed, 6 insertions(+), 10 deletions(-) commit 49ad316f87f17b8eaf6985c7baac7bc069dccddc Author: Rodrigo Vivi Date: Thu Sep 7 16:00:40 2017 -0700 drm/i915/psr: Add enable_sink vfunc. Continue on VLV PSR split with vfunc, let's also create one for enabling sink. v2: Fix typo on commit message (DK). Cc: Daniel Vetter Cc: Dhinakaran Pandiyan Cc: Vathsala Nagaraju Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170907230041.22978-11-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_psr.c | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) commit 2a5db87f82cb6b2763d5e07cc4eef8cd94e56395 Author: Rodrigo Vivi Date: Thu Sep 7 16:00:39 2017 -0700 drm/i915/psr: Add setup VSC vfunc. Continue on VLV PSR split with vfunc, let's also create one for setting up VSC. v2: Rebased on top of commit d2419ffc10e4 ("drm/i915: Plumb crtc_state to PSR enable/disable") Cc: Daniel Vetter Cc: Dhinakaran Pandiyan Cc: Vathsala Nagaraju Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170907230041.22978-10-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_psr.c | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) commit 29d1efe070d3cb5c52d51d82af71790ffaf0a64f Author: Rodrigo Vivi Date: Thu Sep 7 16:00:38 2017 -0700 drm/i915/psr: Re-org Activate after enable Let's move the activation calls together after enable is done. No real functional change should be expected here. Just an attempt to get it clear when we are really activating PSR after enabling it. v2: Add braces on if/else because commit message there is too long as suggested by Jani. v3: Rebased on top of commit d2419ffc10e4 ("drm/i915: Plumb crtc_state to PSR enable/disable") Cc: Jani Nikula Cc: Daniel Vetter Cc: Dhinakaran Pandiyan Cc: Vathsala Nagaraju Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170907230041.22978-9-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_psr.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) commit 196cebddde80dd06b2de557ea393082bf5a06c3d Author: Rodrigo Vivi Date: Thu Sep 7 16:00:37 2017 -0700 drm/i915/psr: Move hsw_enable_source after enabling sink. No functional change is expected here since at this point PSR is not allowed to go to any active state. In other words, not really enabled. However let's do in a separated patch so it gets clear on what is change and specially it can helps on bisect case if we figure something has caused changes in behaviour. But this needs to be done before we make the vfunc to enable source to be in parity with VLV implementation. Cc: Jani Nikula Cc: Daniel Vetter Cc: Dhinakaran Pandiyan Cc: Vathsala Nagaraju Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170907230041.22978-8-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_psr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4d1fa22f4372f27ebbf2376de79a665d23623c8c Author: Rodrigo Vivi Date: Thu Sep 7 16:00:36 2017 -0700 drm/i915/psr: Re-create a hsw_psr_enable_source. This sequence is part of enable source anyways, but they only need to be executed once and not on every activation, So let's re-create hsw_enable_source. v2: Avoid changing order here to avoid changing behaviour as suggested by Jani. v3: Rebased on top of commit d2419ffc10e4 ("drm/i915: Plumb crtc_state to PSR enable/disable") Cc: Jani Nikula Cc: Daniel Vetter Cc: Dhinakaran Pandiyan Cc: Vathsala Nagaraju Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170907230041.22978-7-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_psr.c | 70 +++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 33 deletions(-) commit 2ce4df87f133913dff26ae0f578d6b46f01fa6d3 Author: Rodrigo Vivi Date: Thu Sep 7 16:00:35 2017 -0700 drm/i915/psr: Unify VSC setup functions. VSC package is decided per eDP spec for psr1 or psr2, and not per platform, so let's unify it and kill "skl" func. v2: Rebased on top of commit d2419ffc10e4 ("drm/i915: Plumb crtc_state to PSR enable/disable") Cc: Dhinakaran Pandiyan Cc: Vathsala Nagaraju Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170907230041.22978-6-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_psr.c | 61 ++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 34 deletions(-) commit e3702ac9a2c128690b2219eb1282367584a3b7bb Author: Rodrigo Vivi Date: Thu Sep 7 16:00:34 2017 -0700 drm/i915/psr: Add activate vfunc. Continue on VLV PSR split with vfunc, let's move activate function there. Cc: Daniel Vetter Cc: Dhinakaran Pandiyan Cc: Vathsala Nagaraju Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170907230041.22978-5-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_psr.c | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) commit ed63d24b4d19aee649fbec28b7c11e887eff6861 Author: Rodrigo Vivi Date: Thu Sep 7 16:00:33 2017 -0700 drm/i915/psr: hsw_psr_activate. On HSW+ the real activate of PSR is decided by the source after certain amount of configured idle frames. However for the driver perspective where we track psr.active variable this function here is the actual activate one. So let's rename it before moving to vfunc with that. v2: Fix typo on commit message (DK). Cc: Dhinakaran Pandiyan Cc: Vathsala Nagaraju Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170907230041.22978-4-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_psr.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 424644c2504299e00b450328be9e3c5a12e9c9f9 Author: Rodrigo Vivi Date: Thu Sep 7 16:00:32 2017 -0700 drm/i915/psr: vfunc for disabling source. VLV/CHV has a total different PSR implementation than the other platforms, so let's start moving that to vfuncs. Let's start with disable_src one. v2: Rebased on top of commit d2419ffc10e4 ("drm/i915: Plumb crtc_state to PSR enable/disable") Cc: Daniel Vetter Cc: Dhinakaran Pandiyan Cc: Vathsala Nagaraju Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170907230041.22978-3-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/intel_psr.c | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) commit 0f328da611953d078e86ea250eaeeb840dd7f5d0 Author: Rodrigo Vivi Date: Thu Sep 7 16:00:31 2017 -0700 drm/i915/psr: Avoid any PSR stuff on platforms without support. We really don't want to setup vfuncs and lock mutexes on platforms that has no support to PSR. Also we know what platforms they are so let's do it quietly. Cc: Daniel Vetter Cc: Dhinakaran Pandiyan Cc: Vathsala Nagaraju Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170907230041.22978-2-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_psr.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 9ab12e88a0b46b4e6fa32bb0a2875c813a928e73 Author: Linus Walleij Date: Mon Sep 11 00:08:01 2017 +0200 drm/tve200: Clean up panel bridging This makes use of the drm_simple_display_pipe_attach_bridge() call and removes the two calls removing the bridge, which were erroneous: they unregister the bridge which is not what we want, we just want to unreference it and that is already handled by the core. Reviewed-by: Eric Anholt Acked-by: Daniel Vetter Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20170910220801.28588-1-linus.walleij@linaro.org drivers/gpu/drm/tve200/tve200_display.c | 3 --- drivers/gpu/drm/tve200/tve200_drm.h | 1 - drivers/gpu/drm/tve200/tve200_drv.c | 30 +++++++++++++----------------- 3 files changed, 13 insertions(+), 21 deletions(-) commit be05fe130fd02ce298cc0ebdfb2f0e7a70dccfd4 Author: Daniel Vetter Date: Mon Sep 11 08:51:51 2017 +0200 drm/doc: Update todo.rst We're using this for outreachy, unfortunately someone already tried to look at a task that was done already :-( Update them all. Cc: Sean Paul Signed-off-by: Daniel Vetter Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20170911065151.22672-1-daniel.vetter@ffwll.ch Documentation/gpu/todo.rst | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) commit 0bb9c2b27f5e503e683ad27a0f0a6286f5b5da34 Author: Dhinakaran Pandiyan Date: Wed Sep 6 17:14:58 2017 -0700 drm/dp/mst: Sideband message transaction to power up/down nodes The POWER_DOWN_PHY and POWER_UP_PHY sideband message transactions allow the source to reqest any node in a mst path or a whole path to be powered down or up. This allows drivers to target a specific sink in the MST topology, an improvement over just power managing the imediate downstream device. Secondly, since the request-reply protocol waits for an ACK, we can be sure that a downstream sink has enough time to respond to a power up/down request. v2: Fix memory leak (Lyude) Cc: Lyude Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170907001458.9399-1-dhinakaran.pandiyan@intel.com Reviewed-by: Lyude Paul Signed-off-by: Ville Syrjälä drivers/gpu/drm/drm_dp_mst_topology.c | 74 +++++++++++++++++++++++++++++++++++ include/drm/drm_dp_mst_helper.h | 2 + 2 files changed, 76 insertions(+) commit 8a50b9bd5679d5788f2f7add576fbd8e3ad6fed6 Author: Ville Syrjälä Date: Fri Sep 1 19:53:28 2017 +0300 drm: Make __drm_object_property_get_value() static Make __drm_object_property_get_value() static to fix the following sparse warning: drm_mode_object.c:250:5: warning: symbol '__drm_object_property_get_value' was not declared. Should it be static? Cc: Daniel Vetter Fixes: 4a97a3da420b ("drm: Don't update property values for atomic drivers") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170901165328.24459-4-ville.syrjala@linux.intel.com Reviewed-by: Thierry Reding drivers/gpu/drm/drm_mode_object.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 927cad9869fecbef6455672efe01d254e74032bc Author: Ville Syrjälä Date: Fri Sep 1 19:53:27 2017 +0300 drm: Drop drm_get_link_status_name() drm_get_link_status_name() isn't used so kill it. Fixes the following sparse warning: drm_connector.c:618:1: warning: symbol 'drm_get_link_status_name' was not declared. Should it be static? Cc: Manasi Navare Fixes: 40ee6fbef75f ("drm: Add a new connector atomic property for link status") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170901165328.24459-3-ville.syrjala@linux.intel.com Reviewed-by: Thierry Reding drivers/gpu/drm/drm_connector.c | 1 - 1 file changed, 1 deletion(-) commit a32c94af5e64f686dda524ad2171e6cd03120a8a Author: Ville Syrjälä Date: Fri Sep 1 19:53:25 2017 +0300 drm: Make syncobj import/export functions static Fix the following sparse warnings by making functions static: drm_syncobj.c:420:5: warning: symbol 'drm_syncobj_import_sync_file_fence' was not declared. Should it be static? drm_syncobj.c:441:5: warning: symbol 'drm_syncobj_export_sync_file' was not declared. Should it be static? Cc: Dave Airlie Fixes: 3ee45a3b533a ("drm/syncobj: add sync_file interaction. (v1.2)") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170901165328.24459-1-ville.syrjala@linux.intel.com Reviewed-by: Thierry Reding drivers/gpu/drm/drm_syncobj.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 37875d6b3af702425ce292de81b77faf94766616 Author: Christophe JAILLET Date: Sun Sep 10 10:56:42 2017 +0200 drm/i915: Fix an error handling in 'intel_framebuffer_init()' We should go through the error handling path to decrease the 'framebuffer_references' as done everywhere else in this function. Fixes: 2e2adb05736c ("drm/i915: Add render decompression support") Signed-off-by: Christophe JAILLET Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170910085642.13673-1-christophe.jaillet@wanadoo.fr drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca8b5d97d6bfd2d24cec053bbbe35cf356bec4e3 Author: Nicolas Pitre Date: Fri Aug 25 00:54:18 2017 -0400 ARM: XIP kernel: store .data compressed in ROM The .data segment stored in ROM is only copied to RAM once at boot time and never referenced afterwards. This is arguably a suboptimal usage of ROM resources. This patch allows for compressing the .data segment before storing it into ROM and decompressing it to RAM rather than simply copying it, saving on precious ROM space. Because global data is not available yet (obviously) we must allocate decompressor workspace memory on the stack. The .bss area is used as a stack area for that purpose before it is cleared. The required stack frame is 9568 bytes for __inflate_kernel_data() alone, so make sure the .bss is large enough to cope with that plus extra room for called functions or fail the build. Those numbers were picked arbitrarily based on the above 9568 byte stack frame: 10240 (2.5 * PAGE_SIZE): used to override -Wframe-larger-than whose default value is 1024. 12288 (3 * PAGE_SIZE): minimum .bss size to contain the stack. Signed-off-by: Nicolas Pitre Reviewed-by: Ard Biesheuvel Tested-by: Chris Brandt arch/arm/Kconfig | 11 +++++++ arch/arm/boot/Makefile | 13 +++++++- arch/arm/boot/deflate_xip_data.sh | 64 +++++++++++++++++++++++++++++++++++++ arch/arm/kernel/Makefile | 5 +++ arch/arm/kernel/head-common.S | 11 ++++++- arch/arm/kernel/head-inflate-data.c | 62 +++++++++++++++++++++++++++++++++++ arch/arm/kernel/vmlinux-xip.lds.S | 8 +++++ 7 files changed, 172 insertions(+), 2 deletions(-) commit 0d302c710bf04149b6de7cd9a7064d0ca6cd4bea Author: Nicolas Pitre Date: Tue Aug 29 17:58:41 2017 -0400 ARM: vmlinux-xip.lds.S: fix multiple issues The XIP linker script has several problems: - PAGE_ALIGNED_DATA is missing and is likely to end up somewhere with the wrong LMA. - BUG_TABLE definitely has the wrong LMA, it is not copied to RAM, and its VMA is unaccounted for and likely to clash with dynamic memory usage. - TCM usage is similarly broken. - PERCPU_SECTION is left in ROM despite being written to. Let's use generic macros for those things and locate them appropriately. Incidentally, those macros are usable with a LMA != VMA already by properly defining LOAD_OFFSET. TCM is not fixed here. It never worked in a XIP configuration anyway, so that can wait until another round of cleanups. Signed-off-by: Nicolas Pitre Acked-by: Ard Biesheuvel Tested-by: Chris Brandt arch/arm/kernel/vmlinux-xip.lds.S | 70 +++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 36 deletions(-) commit 861e37da6a06c867b51528066cad84c0fb90cc0c Author: Nicolas Pitre Date: Tue Aug 29 16:33:57 2017 -0400 ARM: vmlinux.lds.S: replace open coded .data sections with generic macros Our .data section is missing PAGE_ALIGNED_DATA() which contains, amongst other things, the vdso page. This creates a System.map that looks like this: c15769a8 D _edata c1577000 d vdso_data_store c1578000 D __start___bug_table c1580544 D __stop___bug_table c1580544 B __bss_start By using RW_DATA_SECTION() we pick whatever generic sections might be added in the future and have page-aligned data next to other strongly aligned data. Furthermore we now include the entire thing, including the bug table, in the data accounting surrounded by _sdata/_edata. While at it let's also remplace the open coded .init.data by its equivalent INIT_DATA_SECTION(). Signed-off-by: Nicolas Pitre Acked-by: Ard Biesheuvel Tested-by: Chris Brandt arch/arm/kernel/vmlinux.lds.S | 38 ++++++-------------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) commit 88cac29f42b107fe340a4b8c255bcc3a0cc2f858 Author: Nicolas Pitre Date: Thu Aug 24 16:35:36 2017 -0400 ARM: vmlinux*.lds.S: some decruftification Remove stuff from vmlinux.lds.S that is relevant only to the XIP build, and stuff from vmlinux-xip.lds.S related to self-modifying code that makes no sense in the XIP case. Signed-off-by: Nicolas Pitre Reviewed-by: Ard Biesheuvel Tested-by: Chris Brandt arch/arm/kernel/vmlinux-xip.lds.S | 14 -------------- arch/arm/kernel/vmlinux.lds.S | 4 +--- 2 files changed, 1 insertion(+), 17 deletions(-) commit 9520b1a1b5f7a34888e14de3cf2ee0ee5344e9fe Author: Nicolas Pitre Date: Thu Aug 24 15:54:47 2017 -0400 ARM: head-common.S: speed up startup code Let's use optimized routines such as memcpy to copy .data and memzero to clear .bss in the startup code instead of doing it one word at a time. Those routines don't use any global data so they're safe to use even if .data and .bss segments are not initialized. In the .data copy case a temporary stack is installed in the .bss area as the actual kernel stack is located within the copied data area. The XIP kernel linker script ensures a 8 byte alignment for that purpose. Finally, make the .data copy and related pointers surrounded by CONFIG_XIP_KERNEL to make it obvious what it is all about. This will allow for further cleanups in the non-XIP linker script. Signed-off-by: Nicolas Pitre Reviewed-by: Ard Biesheuvel Tested-by: Chris Brandt arch/arm/kernel/head-common.S | 76 ++++++++++++++++++++++----------------- arch/arm/kernel/vmlinux-xip.lds.S | 2 +- 2 files changed, 45 insertions(+), 33 deletions(-) commit cdf38888ed30523b1a6ee199449a86dbd1d864ce Author: Nicolas Pitre Date: Wed Aug 16 18:56:14 2017 -0400 binfmt_elf_fdpic: fix crash on MMU system with dynamic binaries In elf_fdpic_map_file() there is a test to ensure the dynamic section in user space is properly terminated. However it does so by dereferencing a user address directly. Add proper user space accessor. Signed-off-by: Nicolas Pitre Acked-by: Mickael GUENE Tested-by: Vincent Abriou Tested-by: Andras Szemzo fs/binfmt_elf_fdpic.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 4755200b6b116dbf6d5545427e8a2cf58194ba6b Author: Nicolas Pitre Date: Wed Aug 16 16:05:13 2017 -0400 binfmt_elf: don't attempt to load FDPIC binaries On platforms where both ELF and ELF-FDPIC variants are available, the regular ELF loader will happily identify FDPIC binaries as proper ELF and load them without the necessary FDPIC fixups, resulting in an immediate user space crash. Let's prevent binflt_elf from loading those binaries so binfmt_elf_fdpic has a chance to pick them up. For those architectures that don't define elf_check_fdpic(), a default version returning false is provided. Signed-off-by: Nicolas Pitre Acked-by: Mickael GUENE Tested-by: Vincent Abriou Tested-by: Andras Szemzo fs/binfmt_elf.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 382e67aec6a7eea8ed4403e86950b468a191c468 Author: Nicolas Pitre Date: Fri Aug 11 00:53:39 2017 -0400 ARM: enable elf_fdpic on systems with an MMU Provide the necessary changes to be able to execute ELF-FDPIC binaries on ARM systems with an MMU. The default for CONFIG_BINFMT_ELF_FDPIC is also set to n if the regular ELF loader is already configured so not to force FDPIC support on everyone. Given that CONFIG_BINFMT_ELF depends on CONFIG_MMU, this means CONFIG_BINFMT_ELF_FDPIC will still default to y when !MMU. Signed-off-by: Nicolas Pitre Acked-by: Mickael GUENE Tested-by: Vincent Abriou Tested-by: Andras Szemzo arch/arm/include/asm/mmu.h | 4 ++++ arch/arm/kernel/elf.c | 22 ++++++++++++++++++++++ fs/Kconfig.binfmt | 4 ++-- fs/binfmt_elf_fdpic.c | 5 +++++ 4 files changed, 33 insertions(+), 2 deletions(-) commit 50b2b2e691cd4ff30331ba9a6156b29a07b60f90 Author: Nicolas Pitre Date: Sat Jul 22 01:02:40 2017 -0400 ARM: add ELF_FDPIC support This includes the necessary code to recognise the FDPIC format on ARM and the ptrace command definitions used by the common ptrace code. Based on patches originally from Mickael Guene . Signed-off-by: Nicolas Pitre Acked-by: Mickael GUENE Tested-by: Vincent Abriou Tested-by: Andras Szemzo arch/arm/include/asm/elf.h | 12 ++++++++++++ arch/arm/include/asm/mmu.h | 4 ++++ arch/arm/include/uapi/asm/ptrace.h | 4 ++++ fs/Kconfig.binfmt | 2 +- 4 files changed, 21 insertions(+), 1 deletion(-) commit 5c16595353e0743af99294db48549c3145e3a5ad Author: Nicolas Pitre Date: Wed Aug 9 23:42:51 2017 -0400 ARM: signal handling support for FDPIC_FUNCPTRS functions Signal handlers are not direct function pointers but pointers to function descriptor in that case. Therefore we must retrieve the actual function address and load the GOT value into r9 from the descriptor before branching to the actual handler. If a restorer is provided, we also have to load its address and GOT from its descriptor. That descriptor address and the code to load it is pushed onto the stack to be executed as soon as the signal handler returns. However, to be compatible with NX stacks, the FDPIC bounce code is also copied to the signal page along with the other code stubs. Therefore this code must get at the descriptor address whether it executes from the stack or the signal page. To do so we use the stack pointer which points at the signal stack frame where the descriptor address was stored. Because the rt signal frame is different from the simpler frame, two versions of the bounce code are needed, and two variants (ARM and Thumb) as well. The asm-offsets facility is used to determine the actual offset in the signal frame for each version, meaning that struct sigframe and rt_sigframe had to be moved to a separate file. Signed-off-by: Nicolas Pitre Acked-by: Mickael GUENE Tested-by: Vincent Abriou Tested-by: Andras Szemzo arch/arm/include/asm/ucontext.h | 1 + arch/arm/kernel/asm-offsets.c | 4 +++ arch/arm/kernel/signal.c | 53 +++++++++++++++++++++++++----------- arch/arm/kernel/signal.h | 11 ++++++++ arch/arm/kernel/sigreturn_codes.S | 56 +++++++++++++++++++++++++++++++++++---- 5 files changed, 105 insertions(+), 20 deletions(-) commit 5e5881143297c97207486349ec1cf9fd833b1510 Author: Nicolas Pitre Date: Fri Jul 28 18:48:48 2017 -0400 ARM: start_thread(): don't always clear all regs The elf_fdpic binary format driver has to initialize extra registers beside the stack and program counter as required by the corresponding ABI. So reinstate them after the regs structure has been cleared. While at it let's get rid of start_thread_nommu(). Signed-off-by: Nicolas Pitre Acked-by: Mickael GUENE Tested-by: Vincent Abriou Tested-by: Andras Szemzo arch/arm/include/asm/processor.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit e71fd63127c5a1d4fb7660f5d4cbc257374a2af9 Author: Nicolas Pitre Date: Sat Jul 22 00:48:09 2017 -0400 arm_elf_read_implies_exec(): remove unused argument The first argument to elf_read_implies_exec() is either the actual header structure or a pointer to that structure whether one looks at fs/binfmt_elf.c or fs/binfmt_elf_fdpic.c. This ought to be fixed of course, but in the mean time let's sidestep the issue by removing that first argument from arm_elf_read_implies_exec() as it is unused anyway. Signed-off-by: Nicolas Pitre Acked-by: Mickael GUENE Tested-by: Vincent Abriou Tested-by: Andras Szemzo arch/arm/include/asm/elf.h | 4 ++-- arch/arm/kernel/elf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 8fcd6c45f5a65621ec809b7866a3623e9a01d4ed Author: Nicolas Pitre Date: Fri Jul 28 15:35:35 2017 -0400 ARM: implement get_tls syscall When there is no dedicated register to hold the tp value and no MMU to provide a fixed address kuser helper entry point, all that is left as fallback is a syscall. Signed-off-by: Nicolas Pitre Acked-by: Mickael GUENE Tested-by: Vincent Abriou Tested-by: Andras Szemzo arch/arm/include/uapi/asm/unistd.h | 1 + arch/arm/kernel/traps.c | 3 +++ 2 files changed, 4 insertions(+) commit 72fe915ac5655a84210adbe358425e40b9ada5cb Author: Linus Walleij Date: Fri Sep 8 14:47:09 2017 +0200 drm/pl111: Add handling of Versatile platforms The ARM reference designs in the Versatile family: Integrator, Versatile and RealView can make use of the new DRM driver as well. We just need to create a bit of platform-specific code for them that we isolate to its own file. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20170908124709.4758-7-linus.walleij@linaro.org drivers/gpu/drm/pl111/Makefile | 1 + drivers/gpu/drm/pl111/pl111_display.c | 7 - drivers/gpu/drm/pl111/pl111_drv.c | 8 +- drivers/gpu/drm/pl111/pl111_versatile.c | 270 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/pl111/pl111_versatile.h | 9 ++ 5 files changed, 285 insertions(+), 10 deletions(-) commit ad86ebe71cba5fa06e1a96e41769c793b498fa75 Author: Linus Walleij Date: Fri Sep 8 14:47:08 2017 +0200 drm/pl111: Add optional variant display en/disable callbacks The silcon and components around the PL111 may require some variants to perform special set-up of the display. Add two callbacks to manage this. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20170908124709.4758-6-linus.walleij@linaro.org drivers/gpu/drm/pl111/pl111_display.c | 6 ++++++ drivers/gpu/drm/pl111/pl111_drm.h | 3 +++ 2 files changed, 9 insertions(+) commit 52289a07a09d131a0981966aa8f2ab2a252a3c53 Author: Linus Walleij Date: Fri Sep 8 14:47:07 2017 +0200 drm/pl111: Insert delay before powering up PL11x The old codebase has a delay between enabling and powering up the PL11x. According to the manual for PL110, ARM DDI 0161E page 1-5 and the PL111 manual ARM DDI 0293C page 1-6, the power sequence should be such that once Vdd is stable (which we assume it is at boot) LCDEN is enabled first and then CLPOWER should be enabled "after the signals have stabilized" and this is said to be display-dependent. The old codebase uses 20ms. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20170908124709.4758-5-linus.walleij@linaro.org drivers/gpu/drm/pl111/pl111_display.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit fa83306cd104d24793a9a833f7d8a4c74c81809a Author: Linus Walleij Date: Fri Sep 8 14:47:06 2017 +0200 drm/pl111: Enable PL110 variant We detect and enable the use of the PL110 variant, an earlier incarnation of PL111. The only real difference is that the control and interrupt enable registers have swapped place. The Versatile AB and Versatile PB have a variant inbetween PL110 and PL111, it is PL110 but they have already swapped the two registers so those two need a bit of special handling. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20170908124709.4758-4-linus.walleij@linaro.org drivers/gpu/drm/pl111/pl111_display.c | 30 ++++-------- drivers/gpu/drm/pl111/pl111_drm.h | 17 +++++++ drivers/gpu/drm/pl111/pl111_drv.c | 86 +++++++++++++++++++++++++++++++++-- 3 files changed, 108 insertions(+), 25 deletions(-) commit 001485d5255cb17e99aa9e3712e43865b92d6adc Author: Linus Walleij Date: Fri Sep 8 14:47:05 2017 +0200 drm/pl111: Replace custom connector with panel bridge This replaces the custom connector in the PL111 with the panel bridge helper. This works nicely for all standard panels, but since there are several PL11x-based systems that will need to use the dumb VGA connector bridge we use drm_of_find_panel_or_bridge() and make some headroom for dealing with bridges that are not panels as well, and drop a TODO in the code. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20170908124709.4758-3-linus.walleij@linaro.org drivers/gpu/drm/pl111/Kconfig | 3 +- drivers/gpu/drm/pl111/Makefile | 3 +- drivers/gpu/drm/pl111/pl111_connector.c | 126 -------------------------------- drivers/gpu/drm/pl111/pl111_display.c | 13 +--- drivers/gpu/drm/pl111/pl111_drm.h | 17 ++--- drivers/gpu/drm/pl111/pl111_drv.c | 55 +++++++++----- 6 files changed, 49 insertions(+), 168 deletions(-) commit bcaf9ff425cc2dc9a16373f9d9e36354e2f09a52 Author: Linus Walleij Date: Fri Sep 8 14:47:04 2017 +0200 drm/pl111: Add all registers to debugfs This adds all the main control registers to the debugfs register file. This was helpful for my debugging so it will likely help others as well. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20170908124709.4758-2-linus.walleij@linaro.org drivers/gpu/drm/pl111/pl111_debugfs.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 48074fceaa26f8c08f00fe77b940b971a1482cd2 Author: Linus Walleij Date: Fri Sep 8 14:47:03 2017 +0200 drm/pl111: Cleanup local header file The header file contains prototypes for two nonexisting functions. Get rid of them. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20170908124709.4758-1-linus.walleij@linaro.org drivers/gpu/drm/pl111/pl111_drm.h | 4 ---- 1 file changed, 4 deletions(-) commit 6025a15706c5412c1b8ac4379b1625041a87b5d4 Author: Noralf Trønnes Date: Sun Aug 13 15:32:02 2017 +0200 drm/tilcdc: Use drm_gem_fb_create() drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Jyri Sarha Cc: Tomi Valkeinen Signed-off-by: Noralf Trønnes Acked-by: Jyri Sarha Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-20-git-send-email-noralf@tronnes.org drivers/gpu/drm/tilcdc/tilcdc_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 070badfab76711fc3a603237e3412f68b1bf5778 Author: Chen-Yu Tsai Date: Fri Sep 8 15:50:15 2017 +0800 drm/sun4i: call drm_vblank_init with correct number of crtcs If we want to have vblank on both pipelines at the same time, we need to call drm_vblank_init with num_crtcs = 2. Instead, since the crtc init calls correctly set mode_config.num_crtc, we can move the drm_vblank_init call to after the crtc init code is called, which is the component bind part. Then we can just pass mode_config.num_crtc in. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20170908075016.18657-8-wens@csie.org drivers/gpu/drm/sun4i/sun4i_drv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 27e18de78e7b9c1679778b40dfd991e6d1ba6595 Author: Chen-Yu Tsai Date: Fri Sep 8 15:50:14 2017 +0800 drm/sun4i: tcon: Support backend input mux The TCON has a mux to select the source of the data to display. This mux includes selecting the display backends. On the A31, which has two display pipelines, this mux can let the TCON select either backend as its data source. Although the muxing can be changed on the fly, DRM needs to be able to group a bunch of layers such that they get switched to another crtc together. This is because the display backend does the layer compositing, while the TCON generates the display timings. This constraint is not supported by DRM. Here we simply pair up backends and TCONs with the same ID. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20170908075016.18657-7-wens@csie.org drivers/gpu/drm/sun4i/sun4i_tcon.c | 25 +++++++++++++++++++++++-- drivers/gpu/drm/sun4i/sun4i_tcon.h | 3 +++ 2 files changed, 26 insertions(+), 2 deletions(-) commit be3fe0f9ed1ca8e4b2cf3419dfb34be716296487 Author: Chen-Yu Tsai Date: Fri Sep 8 15:50:13 2017 +0800 drm/sun4i: tcon: Simplify sun4i_tcon_find_engine_traverse for one input Now that sun4i_tcon_find_engine_traverse() usage is restricted to the single input case, we can remove the for_each_available_child_of_node loop. While at it, consolidate all the of_node_put calls into a common exit path. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20170908075016.18657-6-wens@csie.org drivers/gpu/drm/sun4i/sun4i_tcon.c | 51 +++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 26 deletions(-) commit e8d5bbf7f4c408f0d73c90e573c78cca745a389f Author: Chen-Yu Tsai Date: Fri Sep 8 15:50:12 2017 +0800 drm/sun4i: tcon: get TCON ID and matching engine with remote endpoint ID The device tree binding for sun4i-drm says: For all connections between components up to the TCONs in the display pipeline, when there are multiple components of the same type at the same depth, the local endpoint ID must be the same as the remote component's index. For example, if the remote endpoint is Frontend 1, then the local endpoint ID must be 1. We should be able to get the TCON's ID directly from any of the remote endpoints from its input port. With the ID, we can then go through the list of registered engines and find a matching one by ID. However the A31 device tree is incorrect. We assumed that there were no cross pipeline connections between the backends and TCONs. As a result, in all the endpoints between the backends and TCONs of the second display pipeline, the endpoint IDs were incorrectly set to 0, when in fact they should've been set to 1. To maintain compatibility with this incorrect device tree, we first check if the TCON's input port has 1 or many endpoints. If there are more than 1, then it is likely a fixed version, and we can proceed with the new method. If there is only 1 endpoint, then it is possibly an incorrect version, or it could be the SoC only has one pipeline. In either case we fall back to using the old method of traversing the input connections to find a matching engine, and then get its ID. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20170908075016.18657-5-wens@csie.org drivers/gpu/drm/sun4i/sun4i_tcon.c | 121 ++++++++++++++++++++++++++++++++++++- 1 file changed, 118 insertions(+), 3 deletions(-) commit 1469619d29d752759a2c9604a74091f92757830a Author: Chen-Yu Tsai Date: Fri Sep 8 15:50:11 2017 +0800 drm/sun4i: tcon: Check for multiple paths between TCONs and backends The patch b317fa3ba11a ("drm/sun4i: tcon: Find matching display backend by device node matching") assumed a one-to-one mapping between TCONs and backends. This turned out wrong, as we found muxing controls in the TCON of the A31, and undocumented usage of the backend output selector of the A20. Make sun4i_tcon_find_engine() bail out if the current node has multiple input connections. Fixes: b317fa3ba11a ("drm/sun4i: tcon: Find matching display backend by device node matching") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20170908075016.18657-4-wens@csie.org drivers/gpu/drm/sun4i/sun4i_tcon.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit da82b8785eebb2a97daa0164ccdfaa85361c237f Author: Chen-Yu Tsai Date: Fri Sep 8 15:50:10 2017 +0800 drm/sun4i: add components in breadth first traversal order The encoder drivers use drm_of_find_possible_crtcs to get upstream crtcs from the device tree using of_graph. For the results to be correct, encoders must be probed/bound after _all_ crtcs have been created. The existing code uses a depth first recursive traversal of the of_graph, which means the encoders downstream of the TCON get add right after the first TCON. The second TCON or CRTC will never be properly associated with encoders connected to it. Other platforms, such as Rockchip, deal with this by probing all CRTCs first, then all subsequent components. This is easy to do since the CRTCs correspond to just one device node, and are the first nodes in the pipeline. However with Allwinner SoCs, the function of the CRTC is split between the display backend (DE 1.0) or mixer (DE 2.0), which does scan-out and compositing, and the TCON, which generates the display timing signals. Further complicating the process, there may be a Dynamic Range Controller between the backend and the TCON. Also, the backend is preceded by the frontend, with a Display Enhancement Unit possibly in between. In a dual display pipeline setup, both frontends can feed either backend, and both backends can feed either TCON. We want all components of the same type to be added before the next type in the pipeline. Fortunately, the pipelines are perfectly symmetric, i.e. components of the same type are at the same depth when counted from the frontend. The only exception is the third pipeline in the A80 SoC, which we do not support anyway. Hence we can use a breadth first search traversal order to add components. We do not need to check for duplicates. The component matching system handles this for us. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20170908075016.18657-3-wens@csie.org drivers/gpu/drm/sun4i/sun4i_drv.c | 81 ++++++++++++++++++++++++++++++++++----- 1 file changed, 72 insertions(+), 9 deletions(-) commit 14826673247eaf36b16fd821fac27efa663f3fa6 Author: Chris Wilson Date: Fri Sep 8 19:16:22 2017 +0100 drm/i915: Only initialize partially filled pagetables If we know that we will completely fill a pagetable (i.e. we are inserting a complete set of 512 pages), we can skip prefilling that PT with scratch entries. If we have to abort the insertion prior to writing the real entries, we will teardown the pagetable and remove it from the page directory (so that we will restart the allocation next time). We could do similar tricks for the PD and PDP, but the likelihood of a single insertion covering the entire 512 entries diminishes, as do the cycle savings. The saving are even greater (relatively) when we are preallocating page tables for huge pages, as then we never need to fill the page table. Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170908181622.17791-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/i915_gem_gtt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d57294c1f8bad1bf5432105814ddb57a1bef6337 Author: Chen-Yu Tsai Date: Fri Sep 8 17:00:16 2017 +0800 drm/sun4i: tcon: Unconditionally reset the TCON When binding the TCON, we were checking the reset control status and asserting reset if it wasn't in reset. The check failed to account for the reset control API returning error codes if the status callback was not implemented. Since we want the TCON to be reset in all cases, use reset_control_reset to force a reset instead. Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20170908090016.32224-1-wens@csie.org drivers/gpu/drm/sun4i/sun4i_tcon.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 1f2308f7d4c6e4f0834f76497856e95f31dae13c Author: Maxime Ripard Date: Fri Sep 8 21:40:39 2017 +0200 MAINTAINERS: sun4i-drm is now maintained in drm-misc sun4i-drm is maintained in drm-misc as a small driver. Signed-off-by: Maxime Ripard Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170908194039.882-1-maxime.ripard@free-electrons.com MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1790625b1deaafb564def63a3a070602656134a1 Author: Michal Wajdeczko Date: Fri Sep 8 16:11:30 2017 +0000 drm/i915: Make PAT macros more robust Macro params shall be wrapped into () to avoid unexpected results. Signed-off-by: Michal Wajdeczko Cc: Rodrigo Vivi Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170908161130.22424-1-michal.wajdeczko@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_gem_gtt.h | 2 +- drivers/gpu/drm/i915/i915_reg.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a2d3d2655ea6d09edfcc6d9b11fb58729c8d5b95 Author: Michel Thierry Date: Wed Aug 30 11:01:15 2017 -0700 drm/i915: Add a default case in gen7 hwsp switch-case Gen7 won't get any new engines, and we already added VCS2 there to just silence gcc's not handled in switch warnings. Use a default case instead, otherwise we will need to keep adding extra cases if changes happen in the future. v2: Since reaching the default case is impossible, use GEM_BUG_ON (Chris). Cc: Chris Wilson Signed-off-by: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/20170830180115.907-1-michel.thierry@intel.com Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_ringbuffer.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit ea4d5a270b57fa8d4871f372ca9b97b7697fdfda Author: Dominik Behr Date: Thu Sep 7 16:02:46 2017 -0300 dma-buf/sw_sync: force signal all unsignaled fences on dying timeline To avoid hanging userspace components that might have been waiting on the active fences of the destroyed timeline we need to signal with error all remaining fences on such timeline. This restore the default behaviour of the Android sw_sync framework, which Android still relies on. It was broken on the dma fence conversion a few years ago and never fixed. v2: Do not bother with cleanup do the list (Chris Wilson) Reviewed-by: Chris Wilson Signed-off-by: Dominik Behr Signed-off-by: Gustavo Padovan Link: https://patchwork.freedesktop.org/patch/msgid/20170907190246.16425-2-gustavo@padovan.org drivers/dma-buf/sw_sync.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 5663077a56804890506c913b3ca9fee78764f8b3 Author: Colin Ian King Date: Fri Sep 8 15:05:04 2017 +0100 drm/vc4: clean up error handling on devm_kzalloc failure The current error handling when devm_kzalloc fails performs a non-null check on connector which is redundant because connector is null at that failure point. Once this is removed, make the failure path into a trivial -ENOMEM return to clean up the error handling. Also remove need to initialize connector to NULL. Detected by CoverityScan CID#1339527 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20170908140504.1340-1-colin.king@canonical.com drivers/gpu/drm/vc4/vc4_hdmi.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) commit 45ae2787a0e6d57d75ac25ffdfc9d8c7f9c0f3f1 Author: Sean Paul Date: Fri Sep 8 10:32:07 2017 -0400 drm/todo: Add s/dev_*/DRM_DEV_*/ coversion to TODO Now that we have the DRM_DEV_* variants, we should use them. Signed-off-by: Sean Paul Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170908143218.9701-1-seanpaul@chromium.org Documentation/gpu/todo.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 77ac3b00b13185741effd0d5e2f1f05e4bfef7dc Author: Maarten Lankhorst Date: Wed Jul 19 16:39:20 2017 +0200 drm/atomic: Remove deprecated accessor macros Now that the last users have been converted, we can finally get rid of for_each_obj_in_state, we have better macros to replace them with. Signed-off-by: Maarten Lankhorst Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: David Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20170719143920.25685-8-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter include/drm/drm_atomic.h | 75 --------------------------------------------- include/drm/drm_connector.h | 3 +- include/drm/drm_crtc.h | 8 ++--- include/drm/drm_plane.h | 8 ++--- 4 files changed, 9 insertions(+), 85 deletions(-) commit 669c9215afea4e3684ef13e54e6908e9ae34f0ae Author: Maarten Lankhorst Date: Mon Sep 4 12:48:38 2017 +0200 drm/atomic: Make async plane update checks work as intended, v2. By always keeping track of the last commit in plane_state, we know whether there is an active update on the plane or not. With that information we can reject the fast update, and force the slowpath to be used as was originally intended. We cannot use plane_state->crtc->state here, because this only mentions the most recent commit for the crtc, but not the planes that were part of it. We specifically care about what the last commit involving this plane is, which can only be tracked with a pointer in the plane state. Changes since v1: - Clean up the whole function here, instead of partially earlier. - Add mention in the commit message why we need commit in plane_state. - Swap plane->state in intel_legacy_cursor_update, instead of reassigning all variables. With this commit We know that the cursor is not part of any active commits so this hack can be removed. Cc: Gustavo Padovan Signed-off-by: Maarten Lankhorst Reviewed-by: Gustavo Padovan Reviewed-by: Daniel Vetter #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-7-maarten.lankhorst@linux.intel.com [mlankhorst: Amend commit for merge conflicts with drm-intel] drivers/gpu/drm/drm_atomic_helper.c | 53 ++++++++++-------------------------- drivers/gpu/drm/i915/intel_display.c | 26 +++++++++++------- include/drm/drm_plane.h | 5 ++-- 3 files changed, 34 insertions(+), 50 deletions(-) commit 21a01abbe32a3cbeb903378a24e504bfd9fe0648 Author: Maarten Lankhorst Date: Mon Sep 4 12:48:37 2017 +0200 drm/atomic: Fix freeing connector/plane state too early by tracking commits, v3. Currently we neatly track the crtc state, but forget to look at plane/connector state. When doing a nonblocking modeset, immediately followed by a setprop before the modeset completes, the setprop will see the modesets new state as the old state and free it. This has to be solved by waiting for hw_done on the connector, even if it's not assigned to a crtc. When a connector is unbound we take the last crtc commit, and when it stays unbound we create a new fake crtc commit for that gets signaled on hw_done for all the planes/connectors. We wait for it the same way as we do for crtc's, which will make sure we never run into a use-after-free situation. Changes since v1: - Only create a single disable commit. (danvet) - Fix leak in intel_legacy_cursor_update. Changes since v2: - Make reference counting in drm_atomic_helper_setup_commit more obvious. (pinchartl) - Call cleanup_done for fake commit. (danvet) - Add comments to drm_atomic_helper_setup_commit. (danvet, pinchartl) - Add comment to drm_atomic_helper_swap_state. (pinchartl) Signed-off-by: Maarten Lankhorst Testcase: kms_atomic_transition.plane-use-after-nonblocking-unbind* Cc: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-6-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_atomic.c | 4 + drivers/gpu/drm/drm_atomic_helper.c | 172 +++++++++++++++++++++++++++++++++-- drivers/gpu/drm/i915/intel_display.c | 2 + include/drm/drm_atomic.h | 12 +++ include/drm/drm_connector.h | 7 ++ include/drm/drm_plane.h | 7 ++ 6 files changed, 198 insertions(+), 6 deletions(-) commit de39bec1a0c4e35a679da87127effea817deb07d Author: Maarten Lankhorst Date: Mon Sep 4 12:48:35 2017 +0200 drm/atomic: Remove waits in drm_atomic_helper_commit_cleanup_done, v2. When commit synchronization through drm_crtc_commit was first introduced, we tried to solve the problem of the flip_done needing a reference count by blocking in cleanup_done. This has been changed by commit 24835e442f28 ("drm: reference count event->completion") which made the waits here no longer needed. However, even after this commit we still needed the wait because otherwise we cannot wait for the flip_done because this item might have been removed from the list. Changed since v1: - Make mention of cleanup_done completing before flip_done. Signed-off-by: Maarten Lankhorst Suggested-by: Daniel Vetter Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-4-maarten.lankhorst@linux.intel.com drivers/gpu/drm/drm_atomic_helper.c | 17 ----------------- 1 file changed, 17 deletions(-) commit 163bcc2c74a22c891c1906e6e343e28a70a54978 Author: Maarten Lankhorst Date: Mon Sep 4 17:04:56 2017 +0200 drm/atomic: Move drm_crtc_commit to drm_crtc_state, v4. Most code only cares about the current commit or previous commit. Fortuantely we already have a place to track those. Move it to drm_crtc_state where it belongs. :) The per-crtc commit_list is kept for places where we have to look deeper than the current or previous commit for checking whether to stall on unpin. This is used in drm_atomic_helper_setup_commit and intel_has_pending_fb_unpin. Changes since v1: - Update kerneldoc for drm_crtc.commit_list. (danvet) Changes since v2: - Remove drm_atomic_helper_async_check hunk. (pinchartl) Changes since v3: - Fix use-after-free in drm_atomic_helper_commit_cleanup_done(). Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170904150456.31049-1-maarten.lankhorst@linux.intel.com [mlankhorst: preceeding -> preceding (checkpatch)] drivers/gpu/drm/drm_atomic.c | 7 ---- drivers/gpu/drm/drm_atomic_helper.c | 82 ++++++++++++++++--------------------- include/drm/drm_atomic.h | 1 - include/drm/drm_crtc.h | 23 +++++++++-- 4 files changed, 54 insertions(+), 59 deletions(-) commit f46640b931e588aeec5285b4a9547b354ad10cd0 Author: Maarten Lankhorst Date: Mon Sep 4 12:48:36 2017 +0200 drm/atomic: Return commit in drm_crtc_commit_get for better annotation This will allow code to do x->commit = drm_crtc_commit_get(commit), making it clearer where references are used. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-5-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/drm_atomic_helper.c | 3 +-- include/drm/drm_atomic.h | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) commit b44d5c0c105aa84b46caff9fdd606dc9a7b86419 Author: Maarten Lankhorst Date: Mon Sep 4 12:48:33 2017 +0200 drm/i915: Always wait for flip_done, v2. The next commit removes the wait for flip_done in in drm_atomic_helper_commit_cleanup_done, but we need it for the tests to pass. Instead of using complicated vblank tracking which ends up being ignored anyway, call the correct atomic helper. :) Changes since v1: - Always call drm_atomic_helper_wait_for_flip_done, even for legacy cursor updates. (danvet) Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-2-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/i915_drv.h | 3 +- drivers/gpu/drm/i915/intel_display.c | 84 +++--------------------------------- 2 files changed, 8 insertions(+), 79 deletions(-) commit 3ff558e78bc517f10a1b087989f3fda87038b48c Author: Arnd Bergmann Date: Wed Sep 6 15:13:07 2017 +0200 drm/stm: fix warning about multiplication in condition gcc-7 complains about multiplying within a condition being suspicious: drivers/gpu/drm/stm/dw_mipi_dsi-stm.c: In function 'dsi_pll_get_clkout_khz': drivers/gpu/drm/stm/dw_mipi_dsi-stm.c:117:10: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] The code here is correct, but can be easily rephrased to make that more obvious. I also swap out the error handling and the normal code path for clarity. Fixes: b0f09a3c69d9 ("drm/stm: Add STM32 DSI controller driver") Acked-by: Philippe Cornu Tested-by: Philippe Cornu Signed-off-by: Arnd Bergmann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170906131331.2691300-1-arnd@arndb.de drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 6af5d6707fcb663e93f2c48bd0694e763debd467 Merge: 212154b 02d578e Author: Jani Nikula Date: Fri Sep 8 10:22:05 2017 +0300 Merge tag 'gvt-next-2017-09-08' of https://github.com/01org/gvt-linux into drm-intel-next-queued gvt-next-2017-09-08 - PCI config sanitize series (Changbin) - Workload submission error handling series (Fred) Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170908063155.l54lvpivxntjm7hq@zhen-hp.sh.intel.com commit 34cc0aa2545603560c79aaea3340d8ff3a71bd10 Author: Sandy Huang Date: Sat Sep 2 19:28:54 2017 +0800 drm/rockchip: Add support for Rockchip Soc LVDS This adds support for Rockchip soc lvds found on rk3288 Based on the patches from Mark yao and Heiko Stuebner. Signed-off-by: Mark Yao Signed-off-by: Heiko Stuebner Signed-off-by: Sandy Huang Reviewed-by: Mark Yao Tested-by: Wadim Egorov Link: https://patchwork.freedesktop.org/patch/msgid/1504351737-136042-1-git-send-email-hjc@rock-chips.com Signed-off-by: Mark Yao drivers/gpu/drm/rockchip/Kconfig | 8 + drivers/gpu/drm/rockchip/Makefile | 1 + drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 + drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 1 + drivers/gpu/drm/rockchip/rockchip_lvds.c | 581 ++++++++++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_lvds.h | 114 ++++++ 6 files changed, 707 insertions(+) commit a5e03a48b296101b3bf248073a409fd768d44072 Author: Sandy Huang Date: Sat Sep 2 19:28:47 2017 +0800 dt-bindings: display: Add Document for Rockchip Soc LVDS This patch add Document for Rockchip Soc RK3288 LVDS, This based on the patches from Mark yao and Heiko Stuebner. Signed-off-by: Mark yao Signed-off-by: Heiko Stuebner Signed-off-by: Sandy Huang Reviewed-by: Mark Yao Reviewed-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/1504351729-135932-1-git-send-email-hjc@rock-chips.com .../bindings/display/rockchip/rockchip-lvds.txt | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) commit 02d578e5edd980eac3fbed15db4d9e5665f22089 Author: Changbin Du Date: Wed Aug 23 14:08:10 2017 +0800 drm/i915/gvt: Add support for PCIe extended configuration space IGD is PCIe device and has extended configuration space. Checking the binary dump, we can see we have Caps located out of PCI compatible Configuration Space range. 0x000: 86 80 12 19 17 04 10 00 06 00 00 03 00 00 00 00 0x010: 04 00 00 10 08 00 00 00 0c 00 00 00 08 00 00 00 0x020: 00 00 00 00 00 00 00 00 00 00 00 00 28 10 b9 06 0x030: 00 f8 ff ff 40 00 00 00 00 00 00 00 0b 01 00 00 0x040: 09 70 0c 01 71 26 01 62 c8 00 04 84 00 00 00 00 0x050: c1 00 00 00 39 00 00 00 00 00 00 00 01 00 00 a2 0x060: 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 0x070: 10 ac 92 00 00 80 00 10 00 00 00 00 00 00 00 00 0x080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0a0: 00 00 00 00 00 00 00 00 00 00 00 00 05 d0 01 00 0x0b0: 18 00 e0 fe 00 00 00 00 00 00 00 00 00 00 00 00 0x0c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0d0: 01 00 22 00 00 80 00 00 00 00 00 00 00 00 00 00 0x0e0: 00 00 00 00 00 00 00 00 00 80 00 00 00 00 00 00 0x0f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100: 1b 00 01 20 02 14 00 00 00 00 00 00 00 00 00 00 ... Currently, we only emulate the PCI compatible Configuration Space. This is okay if we attach vGPU to PCI bus. But when we attach to a PCI Express bus (when Qemu emulates a Intel Q35 chipset which has PCIe slot), it will not work. Extended Configuration Space is required for a PCIe device. This patch extended the virtual configuration space from 256 bytes to 4KB bytes. So we are to be a *real* PCIe device. And for the Extended CapList we keep same to physical GPU. Cc: Laszlo Ersek Tested-by: Laszlo Ersek Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cfg_space.c | 4 ++-- drivers/gpu/drm/i915/gvt/gvt.c | 2 +- drivers/gpu/drm/i915/gvt/gvt.h | 3 +-- drivers/gpu/drm/i915/gvt/kvmgt.c | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) commit f1751362d6357a90bc6e53176cec715ff2dbed74 Author: Changbin Du Date: Fri Aug 18 17:49:58 2017 +0800 drm/i915/gvt: Fix incorrect PCI BARs reporting Looking at our virtual PCI device, we can see surprising Region 4 and Region 5. 00:10.0 VGA compatible controller: Intel Corporation Sky Lake Integrated Graphics (rev 06) (prog-if 00 [VGA controller]) .... Region 0: Memory at 140000000 (64-bit, non-prefetchable) [size=16M] Region 2: Memory at 180000000 (64-bit, prefetchable) [size=1G] Region 4: Memory at (32-bit, non-prefetchable) Region 5: Memory at (32-bit, non-prefetchable) Expansion ROM at febd6000 [disabled] [size=2K] The fact is that we only implemented BAR0 and BAR2. Surprising Region 4 and Region 5 are shown because we report their size as 0xffffffff. They should report size 0 instead. BTW, the physical GPU has a PIO BAR. GVTg hasn't implemented PIO access, so we ignored this BAR for vGPU device. v2: fix BAR size value calculation. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1458032 Signed-off-by: Changbin Du Cc: stable@vger.kernel.org Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cfg_space.c | 113 +++++++++++++++-------------------- 1 file changed, 48 insertions(+), 65 deletions(-) commit 1e3197d6ad73ef34b71d96cfb37ddf0b7bddac0e Author: fred gao Date: Fri Aug 18 15:41:11 2017 +0800 drm/i915/gvt: Refine error handling for perform_bb_shadow fix the wrong return type and return error once the unknown command is scanned. v2: - separate this error handle from healthy rating code. (Zhenyu) Signed-off-by: fred gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0f43702a334b2848ae2e942dbc0677ddc4566b57 Author: fred gao Date: Fri Aug 18 15:41:10 2017 +0800 drm/i915/gvt: Refine error handling in dispatch_workload When an error occurs in dispatch_workload, this patch is to do the proper cleanup and rollback to the original states before the workload is abandoned. v2: - split the mixed several error paths for better review. (Zhenyu) v3: - original PTR_ERR(cs) is good and code cleanup. (Zhenyu) v4: - reuse the existing i915_add_request for error handling. (Zhenyu) v5: - remove the duplicate error handling release_shadow_wa_ctx and move the engine->context_unpin upper. (Zhenyu) v6: - keep the old label "out". (Zhenyu) Signed-off-by: fred gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/scheduler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 46b441efa374cf1581c267a16089c205f2fc0ded Author: fred gao Date: Fri Aug 18 15:41:09 2017 +0800 drm/i915/gvt: Refine error handling for intel_vgpu_pin_mm When it is failed in shadow_mm, the pin_count should rollback to the original states before return. v2: - split the mixed several error paths for better review. (Zhenyu) v3: increase the pincount after shadow success. (Zhenyu) Signed-off-by: fred gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/gtt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0cce2823ed37b75555749c0969528d8c74887ada Author: fred gao Date: Fri Aug 18 15:41:08 2017 +0800 drm/i915/gvt: Refine error handling for prepare_execlist_workload refine the error handling for prepare_execlist_workload to restore to the original states once error occurs. only release the shadowed batch buffer and wa ctx when the workload is completed successfully. v2: - split the mixed several error paths for better review. (Zhenyu) v3: - handle prepare batch buffer/wa ctx pin errors and - emulate_schedule_in null issue. (Zhenyu) v4: - no need to handle emulate_schedule_in null issue. (Zhenyu) v5: - release the shadowed batch buffer and wa ctx only for the successful workload. (Zhenyu) v6: - polish the return style. (Zhenyu) Signed-off-by: fred gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/execlist.c | 96 ++++++++++++++++++++++++++----------- 1 file changed, 69 insertions(+), 27 deletions(-) commit a3cfdca920b274618d6046d85a474308ee28e5bb Author: fred gao Date: Fri Aug 18 15:41:07 2017 +0800 drm/i915/gvt: Add error handling for intel_gvt_scan_and_shadow_workload When an error occurs after shadow_indirect_ctx, this patch is to do the proper cleanup and rollback to the original states for shadowed indirect context before the workload is abandoned. v2: - split the mixed several error paths for better review. (Zhenyu) v3: - no return check for clean up functions. (Changbin) v4: - expose and reuse the existing release_shadow_wa_ctx. (Zhenyu) v5: - move the release function to scheduler.c file. (Zhenyu) v6: - move error handling code of intel_gvt_scan_and_shadow_workload to here. (Zhenyu) Signed-off-by: fred gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/execlist.c | 9 --------- drivers/gpu/drm/i915/gvt/scheduler.c | 28 +++++++++++++++++++++------- drivers/gpu/drm/i915/gvt/scheduler.h | 1 + 3 files changed, 22 insertions(+), 16 deletions(-) commit 0a53bc07f044c4c51eb0dc1386c504db80ca8d00 Author: fred gao Date: Fri Aug 18 15:41:06 2017 +0800 drm/i915/gvt: Separate cmd scan from request allocation Currently i915 request structure and shadow ring buffer are allocated before command scan, so it will have to restore to previous states once any error happens afterwards in the long dispatch_workload path. This patch is to introduce a reserved ring buffer created at the beginning of vGPU initialization. Workload will be coped to this reserved buffer and be scanned first, the i915 request and shadow ring buffer are only allocated after the result of scan is successful. To balance the memory usage and buffer alloc time, the coming bigger ring buffer will be reallocated and kept until more bigger buffer is coming. v2: - use kmalloc for the smaller ring buffer, realloc if required. (Zhenyu) v3: - remove the dynamically allocated ring buffer. (Zhenyu) v4: - code style polish. - kfree previous allocated buffer once kmalloc failed. (Zhenyu) Signed-off-by: fred gao Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cmd_parser.c | 31 ++++++++----- drivers/gpu/drm/i915/gvt/execlist.c | 30 +++++++++++++ drivers/gpu/drm/i915/gvt/gvt.h | 3 ++ drivers/gpu/drm/i915/gvt/scheduler.c | 84 ++++++++++++++++++++++++----------- 4 files changed, 110 insertions(+), 38 deletions(-) commit f090a00df9ecdab5d066b099c1797e0070e27a36 Author: Changbin Du Date: Tue Aug 15 13:14:04 2017 +0800 drm/i915/gvt: Add emulation for BAR2 (aperture) with normal file RW approach For vfio-pci, if the region support MMAP then it should support both mmap and normal file access. The user-space is free to choose which is being used. For qemu, we just need add 'x-no-mmap=on' for vfio-pci option. Currently GVTg only support MMAP for BAR2. So GVTg will not work when user turn on x-no-mmap option. This patch added file style access for BAR2, aka the GPU aperture. We map the entire aperture partition of active vGPU to kernel space when guest driver try to enable PCI Memory Space. Then we redirect the file RW operation from kvmgt to this mapped area. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1458032 Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/cfg_space.c | 26 +++++++++++++++----- drivers/gpu/drm/i915/gvt/gvt.h | 8 ++++++ drivers/gpu/drm/i915/gvt/kvmgt.c | 42 +++++++++++++++++++------------- drivers/gpu/drm/i915/gvt/mmio.c | 47 ++++++++++++++++++++++++++++++++++-- 4 files changed, 98 insertions(+), 25 deletions(-) commit 5d5fe176155e6cfa4a53accb90e4010baa5266d0 Author: Changbin Du Date: Tue Aug 15 13:20:51 2017 +0800 drm/i915/kvmgt: Sanitize PCI bar emulation For PCI, 64bit bar consumes two BAR registers, but this doesn't mean both of two BAR are valid. Actually the second BAR is regarded as reserved in this case. So we shouldn't emulate the second BAR. Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang drivers/gpu/drm/i915/gvt/kvmgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae432a9b314e07d486acfadc4df2f922721e6757 Author: Marek Szyprowski Date: Mon Aug 21 10:05:03 2017 +0200 clk: samsung: exynos-audss: Add support for runtime PM This patch adds support for runtime PM to Exynos Audio SubSystem driver to enable full support for audio power domain on Exynos5 SoCs. The main change is moving register saving and restoring code from system sleep PM ops to runtime PM ops and implementing system sleep PM ops with generic pm_runtime_force_suspend/resume helpers. Runtime PM of the Exynos AudSS device is managed from clock core depending on the preparation status of the provided clocks. Signed-off-by: Marek Szyprowski Reviewed-by: Ulf Hansson Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1503302703-13801-6-git-send-email-m.szyprowski@samsung.com .../devicetree/bindings/clock/clk-exynos-audss.txt | 6 +++ drivers/clk/samsung/clk-exynos-audss.c | 51 ++++++++++++++-------- 2 files changed, 40 insertions(+), 17 deletions(-) commit 232d7e4792f4c3f8ebb5e348a0795b6a71d0e7d8 Author: Marek Szyprowski Date: Mon Aug 21 10:05:02 2017 +0200 clk: samsung: exynos-audss: Use local variable for controller's device Store pointer to the controller's device in local variable to avoid extracting it from platform device in each call. This will also simplify code in the future, when runtime PM support is added. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1503302703-13801-5-git-send-email-m.szyprowski@samsung.com drivers/clk/samsung/clk-exynos-audss.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 523d3de41f02141f6f6cd497d07946a2837432cf Author: Marek Szyprowski Date: Mon Aug 21 10:05:01 2017 +0200 clk: samsung: exynos5433: Add support for runtime PM Add runtime pm support for all clock controller units (CMU), which belong to power domains and require special handling during on/off operations. Typically special values has to be written to MUX registers to change internal clocks parents to OSC clock before turning power off. During such operation all clocks, which enter CMU has to be enabled to let MUX to stabilize. Also for each CMU there is one special parent clock, which has to be enabled all the time when any access to CMU registers is being done. This patch solves most of the mysterious external abort and freeze issues caused by a lack of proper parent CMU clock enabled or incorrect turn off procedure. Signed-off-by: Marek Szyprowski Reviewed-by: Ulf Hansson Reviewed-by: Chanwoo Choi Tested-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1503302703-13801-4-git-send-email-m.szyprowski@samsung.com .../devicetree/bindings/clock/exynos5433-clock.txt | 16 + drivers/clk/samsung/clk-exynos5433.c | 409 ++++++++++++++++----- drivers/clk/samsung/clk.h | 6 + 3 files changed, 346 insertions(+), 85 deletions(-) commit d2f18d7e200b8714beffd4eae7f27335b311b2d5 Author: Marek Szyprowski Date: Mon Aug 21 10:05:00 2017 +0200 clk: samsung: Add support for runtime PM This patch adds struct device pointer to samsung_clk_provider and forwarding it to clk_register_* functions, so drivers can register clocks, which use runtime pm feature. Signed-off-by: Marek Szyprowski Reviewed-by: Ulf Hansson Reviewed-by: Chanwoo Choi Tested-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1503302703-13801-3-git-send-email-m.szyprowski@samsung.com drivers/clk/samsung/clk-pll.c | 2 +- drivers/clk/samsung/clk.c | 12 ++++++------ drivers/clk/samsung/clk.h | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) commit 9a34b45397e5a389e25a0c5d39983300d040e5e2 Author: Marek Szyprowski Date: Mon Aug 21 10:04:59 2017 +0200 clk: Add support for runtime PM Registers for some clocks might be located in the SOC area, which are under the power domain. To enable access to those registers respective domain has to be turned on. Additionally, registers for such clocks will usually loose its contents when power domain is turned off, so additional saving and restoring of them might be needed in the clock controller driver. This patch adds basic infrastructure in the clocks core to allow implementing driver for such clocks under power domains. Clock provider can supply a struct device pointer, which is the used by clock core for tracking and managing clock's controller runtime pm state. Each clk_prepare() operation will first call pm_runtime_get_sync() on the supplied device, while clk_unprepare() will do pm_runtime_put_sync() at the end. Additional calls to pm_runtime_get/put functions are required to ensure that any register access (like calculating/changing clock rates and unpreparing/disabling unused clocks on boot) will be done with clock controller in runtime resumend state. When one wants to register clock controller, which make use of this feature, he has to: 1. Provide a struct device to the core when registering the provider. 2. Ensure to enable runtime PM for that device before registering clocks. 3. Make sure that the runtime PM status of the controller device reflects the HW state. Signed-off-by: Marek Szyprowski Reviewed-by: Ulf Hansson Acked-by: Krzysztof Kozlowski Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1503302703-13801-2-git-send-email-m.szyprowski@samsung.com drivers/clk/clk.c | 126 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 112 insertions(+), 14 deletions(-) commit 212154ba4d1c31ad828b8e1e2d4ecd4adcb02796 Author: Oscar Mateo Date: Thu Sep 7 08:40:09 2017 -0700 drm/i915: Transform WaDisablePooledEuLoadBalancingFix into a simple register write FF_SLICE_CS_CHICKEN2 does not belong to the context image. Cc: Chris Wilson Cc: Mika Kuoppala Cc: Rodrigo Vivi Signed-off-by: Oscar Mateo Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/1504798809-5653-6-git-send-email-oscar.mateo@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c6ea497c40b46aaf77d9018e27b26bffdbdac6f7 Author: Oscar Mateo Date: Thu Sep 7 08:40:08 2017 -0700 drm/i915: Transform WaDisableDynamicCreditSharing into a simple register write GAMT_CHKN_BIT_REG does not live in the context image. Cc: Chris Wilson Cc: Mika Kuoppala Cc: Rodrigo Vivi Signed-off-by: Oscar Mateo Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/1504798809-5653-5-git-send-email-oscar.mateo@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_engine_cs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4827c547c51f81579edb8f3958d53c15e0a3f662 Author: Oscar Mateo Date: Thu Sep 7 08:40:07 2017 -0700 drm/i915: Transform WaDisableGafsUnitClkGating into a simple reg write GEN7_UCGCTL4 does not live in the context. v2: Missing parenthesis Cc: Chris Wilson Cc: Mika Kuoppala Cc: Rodrigo Vivi Signed-off-by: Oscar Mateo Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/1504798809-5653-4-git-send-email-oscar.mateo@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_engine_cs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit b27f59010f27628f1d96e746fdf7e6e916c451d5 Author: Oscar Mateo Date: Thu Sep 7 08:40:06 2017 -0700 drm/i915: WaPushConstantDereferenceHoldDisable needs to modify a masked register So do it correctly. Cc: Chris Wilson Cc: Mika Kuoppala Cc: Rodrigo Vivi Signed-off-by: Oscar Mateo Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/1504798809-5653-3-git-send-email-oscar.mateo@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_engine_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cf20a0128fab5368937d719bcd9ec1b233491b7 Author: Oscar Mateo Date: Thu Sep 7 08:40:05 2017 -0700 drm/i915: Transform WaDisableI2mCycleOnWRPort into a simple reg write GAMT_CHKN_BIT_REG does not live in the context. Cc: Chris Wilson Cc: Mika Kuoppala Cc: Rodrigo Vivi Signed-off-by: Oscar Mateo Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/1504798809-5653-2-git-send-email-oscar.mateo@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_engine_cs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit efc886cb135595c7bec481a32d000dce865b7971 Author: Oscar Mateo Date: Thu Sep 7 08:40:04 2017 -0700 drm/i915: Transform WaInPlaceDecompressionHang into a simple reg write Afaict, GEN9_GAMT_ECO_REG_RW_IA does not live in the context, so writing it on every context creation is overkill (and wrong). v2: Missing end parenthesis Cc: Chris Wilson Cc: Mika Kuoppala Cc: Rodrigo Vivi Signed-off-by: Oscar Mateo Reviewed-by: Michał Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/1504798809-5653-1-git-send-email-oscar.mateo@intel.com Signed-off-by: Chris Wilson drivers/gpu/drm/i915/intel_engine_cs.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit c5ba5b24657e473b1c64b0a614b168a635a2c935 Author: Chris Wilson Date: Thu Sep 7 19:45:20 2017 +0100 drm/i915: Apply the GTT write flush for all !llc machines We also see the delayed GTT write issue on i915g/i915gm, so let's presume that it is a universal problem for all !llc machines, and that we just haven't yet noticed on g33, gen4 and gen5 machines. v2: Use a register that exists on all platforms Testcase: igt/gem_mmap_gtt/coherency # i915gm References: https://bugs.freedesktop.org/show_bug.cgi?id=102577 Signed-off-by: Chris Wilson Cc: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170907184520.5032-1-chris@chris-wilson.co.uk Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/i915_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 750fae232480fee9d799eaced198ec98c20769a3 Author: Ville Syrjälä Date: Thu Sep 7 17:32:03 2017 +0300 i915: Fix obj size vs. alignment for drm_pci_alloc() drm_pci_alloc() refuses to cooperate if the passed alignment exceeds the object size. So round up the obj size to the next power of two as well to make this actually work. Obviously things work just fine as long as the size was a power of two to begin with. However kms_cursor_crc doesn't always use power of two sizes so we hit a failure when we try to allocate the phys memory. Testcase: igt/kms_cursor_crc Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170907143203.13055-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d7a133d886b45651e36e7065998b1413d379ac1f Author: Chris Wilson Date: Thu Sep 7 14:44:41 2017 +0100 drm/i915: Disable mmio debugging during user access If the user bypasses i915 and accesses mmio directly, that easily confuses our automatic mmio debugging (any error we then detect is likely to be as a result of the user). Since we expect userspace to open debugfs/i915_forcewake_user if i915.ko is loaded and they want mmio access, that makes the opportune time to disable our debugging for duration of the bypass. v2: Move the fiddling of uncore internals to uncore.c References: https://bugs.freedesktop.org/show_bug.cgi?id=102543 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20170907134441.12881-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_debugfs.c | 19 ++++++++------ drivers/gpu/drm/i915/intel_uncore.c | 51 +++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_uncore.h | 10 ++++++++ 3 files changed, 72 insertions(+), 8 deletions(-) commit d2d4f39b1e6407323e568c174e17b022b8f98a40 Author: Kumar, Mahesh Date: Thu Aug 17 19:15:29 2017 +0530 drm/i915/skl+: debugfs entry to control IPC This patch creates an entry in debugfs to check the status of IPC. This can also be used to enable/disable IPC in supported platforms. Changes since V1: - fix use of HAS_IPC - use kstrtobool_from_user (Maarten) - drm_info log, while enabling IPC (Maarten) Signed-off-by: Mahesh Kumar Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20170817134529.2839-9-mahesh1.kumar@intel.com [mlankhorst: enableddisabled -> yesno to match ipc write] drivers/gpu/drm/i915/i915_debugfs.c | 54 ++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) commit 2503a0fef214ddadfdf5844d62453591de35586f Author: Kumar, Mahesh Date: Thu Aug 17 19:15:28 2017 +0530 drm/i915/bxt+: Enable IPC support This patch adds IPC support. This patch also enables IPC in all supported platforms based on has_ipc flag. IPC (Isochronous Priority Control) is the hardware feature, which dynamically controls the memory read priority of Display. When IPC is enabled, plane read requests are sent at high priority until filling above the transition watermark, then the requests are sent at lower priority until dropping below the level 0 watermark. The lower priority requests allow other memory clients to have better memory access. When IPC is disabled, all plane read requests are sent at high priority. Changes since V1: - Remove commandline parameter to disable ipc - Address Paulo's comments Changes since V2: - Address review comments - Set ipc_enabled flag Changes since V3: - move ipc_enabled flag assignment inside intel_ipc_enable function Changes since V4: - Re-enable IPC after suspend/resume Changes since V5: - Enable IPC for all gen >=9 except SKL Changes since V6: - fix commit msg - after resume program IPC based on SW state. Changes since V7: - Modify IPC support check based on HAS_IPC macro (suggested by Chris) Signed-off-by: Mahesh Kumar Cc: Chris Wilson Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20170817134529.2839-8-mahesh1.kumar@intel.com drivers/gpu/drm/i915/i915_drv.c | 4 +++- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 2 ++ drivers/gpu/drm/i915/intel_pm.c | 24 ++++++++++++++++++++++++ 5 files changed, 31 insertions(+), 1 deletion(-) commit e57f1c02155f4f108b9d3ba2bed687e8e9f95e18 Author: Mahesh Kumar Date: Thu Aug 17 19:15:27 2017 +0530 drm/i915/gen9+: Add has_ipc flag in device info structure New Isochronous Priority Control (IPC) capability is introduced in newer GEN platforms. This patch adds a device info flag to indicate if platform supports IPC. Patch also sets this flag in supported platforms. Signed-off-by: Mahesh Kumar Cc: Chris Wilson Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20170817134529.2839-7-mahesh1.kumar@intel.com drivers/gpu/drm/i915/i915_drv.h | 5 ++++- drivers/gpu/drm/i915/i915_pci.c | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit d86ba628ce4bfd83c987e4dab9d917cbb3622854 Author: Kumar, Mahesh Date: Thu Aug 17 19:15:26 2017 +0530 drm/i915/cnl: Extend WM workaround with IPC for CNL CNL:A & CNL:B have same workaround as KBL to increase wm level latency by 4us if IPC is enabled. Signed-off-by: Mahesh Kumar Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20170817134529.2839-6-mahesh1.kumar@intel.com drivers/gpu/drm/i915/intel_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 446e850c38d9092688df3f1e5d610f3bff2a4152 Author: Kumar, Mahesh Date: Thu Aug 17 19:15:25 2017 +0530 drm/i915/glk: IPC linetime watermark workaround for GLK IF IPC is enabled LINETIME_WM value should be half of calculated value line time = ROUNDDOWN(1/2 * Calculated Line Time) Earlier code was rounding-up the value, But updated Bspec says we should take the ROUNDDOWN. This patch corrects that as well. Signed-off-by: Mahesh Kumar Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20170817134529.2839-5-mahesh1.kumar@intel.com drivers/gpu/drm/i915/intel_pm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ca47667f523e588318f89c735e127c256de6cb16 Author: Kumar, Mahesh Date: Thu Aug 17 19:15:24 2017 +0530 drm/i915/gen10: Calculate and enable transition WM GEN > 9 require transition WM to be programmed if IPC is enabled. This patch calculates & enable transition WM for supported platforms. If transition WM is enabled, Plane read requests are sent at high priority until filling above the transition watermark, then the requests are sent at lower priority until dropping below the level-0 WM. The lower priority requests allow other memory clients to have better memory access. transition minimum is the minimum amount needed for trans_wm to work to ensure the demote does not happen before enough data has been read to meet the level 0 watermark requirements. transition amount is configurable value. Higher values will tend to cause longer periods of high priority reads followed by longer periods of lower priority reads. Tuning to lower values will tend to cause shorter periods of high and lower priority reads. Keeping transition amount to 10 in this patch, as suggested by HW team. Changes since V1: - Address review comments from Maarten Signed-off-by: Mahesh Kumar Acked-by: Maarten Lankhorst Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20170817134529.2839-4-mahesh1.kumar@intel.com drivers/gpu/drm/i915/intel_pm.c | 52 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) commit 7e452fdbfca85cd279ecb0d8e9ab6fdd1e8c97fc Author: Kumar, Mahesh Date: Thu Aug 17 19:15:23 2017 +0530 drm/i915/skl+: Optimize WM calculation Plane configuration parameters doesn't change for each WM-level calculation. Currently we compute same parameters 8 times for each wm-level. This patch optimizes it by calculating these parameters in beginning & reuse during each level-wm calculation. Changes since V1: - rebase on top of Rodrigo's series for CNL Signed-off-by: Mahesh Kumar Acked-by: Maarten Lankhorst Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20170817134529.2839-3-mahesh1.kumar@intel.com drivers/gpu/drm/i915/i915_drv.h | 14 +++ drivers/gpu/drm/i915/intel_pm.c | 190 ++++++++++++++++++++++------------------ 2 files changed, 119 insertions(+), 85 deletions(-) commit 0b4d7cbff2be27c89617e1ca60a546019f7ff276 Author: Kumar, Mahesh Date: Thu Aug 17 19:15:22 2017 +0530 drm/i915: Fixed point fixed16 wrapper cleanup As per suggestion from Jani, cleanup the code. Cleanup includes - Instead of left shifting & check, compare with U32/16_MAX - Use typecast instead of clamp_t Signed-off-by: Mahesh Kumar Cc: Jani Nikula Reviewed-by: Jani Nikula Reviewed-by: Maarten Lankhorst Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20170817134529.2839-2-mahesh1.kumar@intel.com drivers/gpu/drm/i915/i915_drv.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit c9636244f86ae80b66e8ffb05ff755d85edf1988 Author: Tvrtko Ursulin Date: Wed Sep 6 15:55:06 2017 +0100 tools/testing/scatterlist: Test new __sg_alloc_table_from_pages Exercise the new __sg_alloc_table_from_pages API (and through it also the old sg_alloc_table_from_pages), checking that the created table has the expected number of segments depending on the sequence of input pages and other conditions. v2: Move to data driven for readability. v3: Add some more testcases and -fsanitize=undefined. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Cc: linux-kernel@vger.kernel.org Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170906145506.14952-1-tvrtko.ursulin@linux.intel.com [tursulin: whitespace fixup] tools/testing/scatterlist/Makefile | 30 +++++++++ tools/testing/scatterlist/linux/mm.h | 125 +++++++++++++++++++++++++++++++++++ tools/testing/scatterlist/main.c | 79 ++++++++++++++++++++++ 3 files changed, 234 insertions(+) commit 5602452e4c9943a81c9cd049d10d37d3f137b0c0 Author: Tvrtko Ursulin Date: Thu Aug 3 10:14:17 2017 +0100 drm/i915: Use __sg_alloc_table_from_pages for userptr allocations With the addition of __sg_alloc_table_from_pages we can control the maximum coalescing size and eliminate a separate path for allocating backing store here. Similar to 871dfbd67d4e ("drm/i915: Allow compaction upto SWIOTLB max segment size") this enables more compact sg lists to be created and so has a beneficial effect on workloads with many and/or large objects of this class. v2: * Rename helper to i915_sg_segment_size and fix swiotlb override. * Commit message update. v3: * Actually include the swiotlb override fix. v4: * Regroup parameters a bit. (Chris Wilson) v5: * Rebase for swiotlb_max_segment. * Add DMA map failure handling as in abb0deacb5a6 ("drm/i915: Fallback to single PAGE_SIZE segments for DMA remapping"). v6: Handle swiotlb_max_segment() returning 1. (Joonas Lahtinen) v7: Rebase. v8: Commit spelling fix. Signed-off-by: Tvrtko Ursulin Cc: Chris Wilson Cc: linux-kernel@vger.kernel.org Reviewed-by: Chris Wilson Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170803091417.23677-1-tvrtko.ursulin@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 15 +++++++ drivers/gpu/drm/i915/i915_gem.c | 6 +-- drivers/gpu/drm/i915/i915_gem_userptr.c | 79 ++++++++++++--------------------- 3 files changed, 45 insertions(+), 55 deletions(-) commit 89d8589cd72c6f48b19c370517d16f3ee23909df Author: Tvrtko Ursulin Date: Thu Aug 3 10:13:51 2017 +0100 lib/scatterlist: Introduce and export __sg_alloc_table_from_pages Drivers like i915 benefit from being able to control the maxium size of the sg coalesced segment while building the scatter- gather list. Introduce and export the __sg_alloc_table_from_pages function which will allow it that control. v2: Reorder parameters. (Chris Wilson) v3: Fix incomplete reordering in v2. v4: max_segment needs to be page aligned. v5: Rebase. v6: Rebase. v7: Fix spelling in commit and mention max segment size in __sg_alloc_table_from_pages kerneldoc. (Andrew Morton) Signed-off-by: Tvrtko Ursulin Cc: Masahiro Yamada Cc: linux-kernel@vger.kernel.org Cc: Chris Wilson Reviewed-by: Chris Wilson Cc: Joonas Lahtinen Cc: Andrew Morton Link: https://patchwork.freedesktop.org/patch/msgid/20170803091351.23594-1-tvrtko.ursulin@linux.intel.com include/linux/scatterlist.h | 11 +++++--- lib/scatterlist.c | 66 +++++++++++++++++++++++++++++++++------------ 2 files changed, 56 insertions(+), 21 deletions(-) commit c125906b839b794c580a5de911de65bd2c63aaee Author: Tvrtko Ursulin Date: Thu Aug 3 10:13:12 2017 +0100 lib/scatterlist: Avoid potential scatterlist entry overflow Since the scatterlist length field is an unsigned int, make sure that sg_alloc_table_from_pages does not overflow it while coalescing pages to a single entry. v2: Drop reference to future use. Use UINT_MAX. v3: max_segment must be page aligned. v4: Do not rely on compiler to optimise out the rounddown. (Joonas Lahtinen) v5: Simplified loops and use post-increments rather than pre-increments. Use PAGE_MASK and fix comment typo. (Andy Shevchenko) v6: Commit spelling fix. Signed-off-by: Tvrtko Ursulin Cc: Masahiro Yamada Cc: linux-kernel@vger.kernel.org Reviewed-by: Chris Wilson Cc: Joonas Lahtinen Cc: Andy Shevchenko Link: https://patchwork.freedesktop.org/patch/msgid/20170803091312.22875-1-tvrtko.ursulin@linux.intel.com include/linux/scatterlist.h | 6 ++++++ lib/scatterlist.c | 31 ++++++++++++++++++++----------- 2 files changed, 26 insertions(+), 11 deletions(-) commit c4860ad60564838994b74e7ee7dd12ceeda0f520 Author: Tvrtko Ursulin Date: Mon Jul 31 19:55:08 2017 +0100 lib/scatterlist: Fix offset type in sg_alloc_table_from_pages Scatterlist entries have an unsigned int for the offset so correct the sg_alloc_table_from_pages function accordingly. Since these are offsets withing a page, unsigned int is wide enough. Also converts callers which were using unsigned long locally with the lower_32_bits annotation to make it explicitly clear what is happening. v2: Use offset_in_page. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Cc: Masahiro Yamada Cc: Pawel Osciak Cc: Marek Szyprowski Cc: Kyungmin Park Cc: Tomasz Stanislawski Cc: Matt Porter Cc: Alexandre Bounine Cc: linux-media@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Marek Szyprowski (v1) Reviewed-by: Chris Wilson Reviewed-by: Mauro Carvalho Chehab Link: https://patchwork.freedesktop.org/patch/msgid/20170731185512.20010-1-tvrtko.ursulin@linux.intel.com drivers/media/v4l2-core/videobuf2-dma-contig.c | 4 ++-- drivers/rapidio/devices/rio_mport_cdev.c | 4 ++-- include/linux/scatterlist.h | 2 +- lib/scatterlist.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit df0700e53047662c167836bd6fdeea55d5d8dcfa Author: Chris Wilson Date: Wed Sep 6 20:24:24 2017 +0100 drm/i915: Disable snooping (userptr, set-cache-level) on gen4 The original gen4 has an issue where writes (both render and blt) into snoopable pages are lost. We've previously worked around this in userspace (ddx, igt) by simply not requesting snoopable buffers, but upon rediscovering this problem for a third time, make the kernel reject such requests with -ENODEV. This disables snooping on userspace buffers for i965g and i965gm (original gen4) machines. Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170906192424.26970-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_pci.c | 2 ++ drivers/gpu/drm/i915/intel_device_info.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) commit bb9d2d050503c69695557b8b741276686ca2a396 Author: Jani Nikula Date: Thu Sep 7 11:28:20 2017 +0300 drm/i915: Update DRIVER_DATE to 20170907 Signed-off-by: Daniel Vetter Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aa9f4c4f19131e05323d0d5a068ccb46058e8257 Author: Rodrigo Vivi Date: Wed Sep 6 15:03:25 2017 -0700 drm/i915/cnl: WaThrottleEUPerfToAvoidTDBackPressure:cnl(pre-prod) Wa for B-stepping only. A for a hang issue that requires throttling EU performace to 12.5% to avoid back pressure to thread dispatch v2: Rebased. No change from v1. Signed-off-by: Rodrigo Vivi Reviewed-by: Oscar Mateo Link: https://patchwork.freedesktop.org/patch/msgid/20170906220325.24524-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++++ 2 files changed, 5 insertions(+) commit 88c880bbdebe43ae13599d678b35c565e7563193 Author: Chris Wilson Date: Wed Sep 6 14:52:20 2017 +0100 drm/i915: Lift has-pinned-pages assert to caller of ____i915_gem_object_get_pages i915_gem_object_attach_phys() is trying to swap out its shmemfs pages for a new set of physically contiguous pages, but unfortunately triggers an assert inside get-pages. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102561 Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170906135220.13508-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld drivers/gpu/drm/i915/i915_gem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8f067837c4b713ce2e69be95af7b2a5eb3bd7de8 Author: Rodrigo Vivi Date: Tue Sep 5 12:30:13 2017 -0700 drm/i915: Display WA #1133 WaFbcSkipSegments:cnl, glk Skip compressing 1 segment at the end of the frame, avoid a pixel count mismatch nuke event when last active pixel and dummy pixel has same color for Odd Plane Width / Height. For both platforms Gemini Lake and Cannon Lake. v2: Use function-like macro and also use mask to clean to make sure bit 11 is 0. (Suggested by Paulo). v3: Add Display WA notation and also apply for GLK. Both Forgotten on v2. Using "GLK_" prefix since GLK came before CNL. v4: Forgot to "|=" when moving directly macro to masked val. (Noticed by Paulo.) v5: Rebased on top of 0a46ddd57c9e ("drm/i915/cnp: Wa 1181: Fix Backlight issue") Cc: Imre Deak Cc: Paulo Zanoni Signed-off-by: Rodrigo Vivi Reviewed-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/20170905193013.31710-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 13 +++++++++++++ 2 files changed, 16 insertions(+) commit f1294585d8e177b25acd028d90f23f335d6695fb Author: Nanley Chery Date: Tue Sep 5 11:45:07 2017 -0700 drm/i915/cnl: Allow the reg_read ioctl to read the RCS TIMESTAMP register This enables the Mesa driver to advertise support for ARB_timer_query, and thus an OpenGL version higher than 3.2. Suggested-by: Ben Widawsky Cc: Rodrigo Vivi Signed-off-by: Nanley Chery Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20170905184507.30046-1-nanley.g.chery@intel.com drivers/gpu/drm/i915/intel_uncore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d95c24867aea8a065a50faf95167a07c8e6bf02 Author: Chris Wilson Date: Wed Sep 6 11:56:53 2017 +0100 drm/i915: Move device_info.has_snoop into the static tables Currently we define any !llc machine as using snoop instead. However, some platforms run into trouble using snoop that we would like to disable, and to do so easily we want to be able to use the static device_info tables. v2: Leave the old snoop = !llc as a warning for the time being to check that all stanzas are filled as either llc or snoop. Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170906105653.3665-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_pci.c | 7 +++++++ drivers/gpu/drm/i915/intel_device_info.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) commit 90cad095eeaa43711d60066096cddaf0d3b58bf6 Author: Chris Wilson Date: Wed Sep 6 16:28:59 2017 +0100 drm/i915: Disable MI_STORE_DATA_IMM for i915g/i915gm The early gen3 machines (i915g/Grantsdale and i915gm/Alviso) share a lot of characteristics in their MI/GTT blocks with gen2, and in particular can only use physical addresses in MI_STORE_DATA_IMM. This makes it incompatible with our usage, so include those two machines in the blacklist to prevent usage. v2: Make it easy for gcc and rewrite it as a switch to save some space. Signed-off-by: Chris Wilson Reviewed-by: Ville Syrjälä #v1 Link: https://patchwork.freedesktop.org/patch/msgid/20170906152859.5304-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 7 ------- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 7 ++++--- drivers/gpu/drm/i915/intel_engine_cs.c | 15 +++++++++++++++ drivers/gpu/drm/i915/intel_ringbuffer.h | 12 +----------- 4 files changed, 20 insertions(+), 21 deletions(-) commit 574ff444b9fcc2554e381054f5052cb9c0e91de7 Author: Li Xu Date: Tue Sep 5 20:33:04 2017 -0500 ASoC: cs43130: Add break keyword to switch case Add break keyword to all switch case unless the case is returning. Also remove gpio check for consistency. Signed-off-by: Li Xu Signed-off-by: Mark Brown sound/soc/codecs/cs43130.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 0db8c961209153498fe7e279b8f0d3deb81808f0 Author: Chris Wilson Date: Wed Sep 6 12:14:05 2017 +0100 drm/i915: Re-enable GTT following a device reset Ville Syrjälä spotted that PGETBL_CTL was losing its enable bit upon a reset. That was causing the display to show garbage on his 945gm. On my i915gm the effect was far more severe; re-enabling the display following the reset without PGETBL_CTL being enabled lead to an immediate hard hang. We do have a routine to re-enable PGETBL_CTL which is applicable to gen2-4, although on gen4 it is documented that a graphics reset doesn't alter the register (no such wording is given for gen3) and should be safe to call to punch back in the enable bit. However, that leaves the question of whether we need to completely re-initialise the register and the rest of the GSM. For g33/pnv/gen4+, where we do have a configurable page table, its contents do seem to be kept, and so we should be able to recover without having to reinitialise the GTT from scratch (as prior to g33, that register is configured by the BIOS and we leave alone except for the enable bit). This appears to have been broken by commit 5fbd0418eef2 ("drm/i915: Re-enable GGTT earlier during resume on pre-gen6 platforms"), which moved the intel_enable_gtt() from i915_gem_init_hw() (also used by reset) to add it earlier during hw init and resume, missing the reset path. v2: Find the culprit, rearrange ggtt_enable to be before gem_init_hw to match init/resume Reported-by: Ville Syrjälä Fixes: 5fbd0418eef2 ("drm/i915: Re-enable GGTT earlier during resume on pre-gen6 platforms") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101852 Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Daniel Vetter Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170906111405.27110-1-chris@chris-wilson.co.uk Tested-by: Ville Syrjälä Reviewed-by: Ville Syrjälä drivers/gpu/drm/i915/i915_drv.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 47af1cdb309c65b36230b44e77383ed53b503d0e Author: Colin Ian King Date: Fri Aug 25 18:12:50 2017 +0100 HID: hid-lg: make array cbuf static const to shink object code size Don't populate array cbuf on the stack, instead make it static. Makes the object code smaller by over 110 bytes: Before: text data bss dec hex filename 15096 3504 128 18728 4928 drivers/hid/hid-lg.o After: text data bss dec hex filename 14884 3600 128 18612 48b4 drivers/hid/hid-lg.o Signed-off-by: Colin Ian King Signed-off-by: Jiri Kosina drivers/hid/hid-lg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ad8378ede6f933cd6fe0c4c12ec65a3db469b2ca Author: Bhumika Goyal Date: Mon Aug 21 17:13:09 2017 +0530 HID: make device_attribute const Make this const as it is only passed as an argument to the function device_create_file and device_remove_file and the corresponding arguments are of type const. Done using Coccinelle Signed-off-by: Bhumika Goyal Signed-off-by: Jiri Kosina drivers/hid/hid-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 67a3b63a54cbe18944191f43d644686731cf30c7 Author: Arnd Bergmann Date: Tue Sep 5 09:47:26 2017 +0200 drm: gma500: fix logic error gcc-8 points out a condition that almost certainly doesn't do what the author had in mind: drivers/gpu/drm/gma500/mdfld_intel_display.c: In function 'mdfldWaitForPipeEnable': drivers/gpu/drm/gma500/mdfld_intel_display.c:102:37: error: bitwise comparison always evaluates to false [-Werror=tautological-compare] This changes it to a simple bit mask operation to check whether the bit is set. Fixes: 026abc333205 ("gma500: initial medfield merge") Signed-off-by: Arnd Bergmann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170905074741.435324-1-arnd@arndb.de drivers/gpu/drm/gma500/mdfld_intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a46ddd57c9ef9fb5376d4bff65d07e0aea30f35 Author: Rodrigo Vivi Date: Wed Aug 30 21:52:23 2017 -0700 drm/i915/cnp: Wa 1181: Fix Backlight issue This workaround fixes a CNL PCH bug when changing backlight from a lower frequency to a higher frequency. During random reboot cycles, display backlight seems to be off/ dim for 2-3 mins. The only functional change on this patch is to set bit 13 of 0xC2020 for CNL PCH. The rest of patch is organizing identation around those bits definitions and re-organizing CFL workarounds. v2: Only add the bit that matters without touching others around (Jani). Rebase on top of clock gating functions rename. Cc: Jani Nikula Cc: Arthur J Runyan Cc: Dhinakaran Pandiyan Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170831045223.3960-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 27 +++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) commit 908a610557f4d8b46a0f82c01e31b30f5c998580 Author: Ville Syrjälä Date: Fri Sep 1 19:54:34 2017 +0300 drm/i915: Annotate user relocs with __user Add the missing __user to the urelocs cast to fix the following sparse warning: i915_gem_execbuffer.c:1541:47: warning: cast removes address space of expression i915_gem_execbuffer.c:1541:62: warning: incorrect type in argument 2 (different address spaces) i915_gem_execbuffer.c:1541:62: expected void const [noderef] *from i915_gem_execbuffer.c:1541:62: got char * Cc: Chris Wilson Fixes: 2889caa92321 ("drm/i915: Eliminate lots of iterations over the execobjects array") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170901165434.24636-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst #irc drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bacdcd55fa5f833368ecf2fc271537162fd3c944 Author: Ville Syrjälä Date: Thu May 18 22:38:37 2017 +0300 drm/i915: Constify load detect mode Make the mode used for load detection const, and adjust all relevant functions to accept a const mode. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170518193837.393-2-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 12 ++++++------ drivers/gpu/drm/i915/intel_drv.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 17ad4fdd09e1613d7047aa9e00d7de68ad350204 Author: Chris Wilson Date: Fri Sep 1 15:57:29 2017 +0100 drm/i915/perf: Remove __user from u64 in drm_i915_perf_oa_config Sparse complains that these integers from which we form void __user *, and so we don't need the annotation itself inside the uABI. Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Cc: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20170901145729.21363-2-chris@chris-wilson.co.uk Reviewed-by: Lionel Landwerlin include/uapi/drm/i915_drm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0d95c883bab5c5507fac3c34bc506f735971a2ee Author: Chris Wilson Date: Fri Sep 1 15:57:28 2017 +0100 drm/i915: Silence sparse by using gfp_t Sparse enforces that GFP flags are only manipulated inside gfp_t locals. Fixes: 4d470f7359c4 ("drm/i915: Avoid undefined behaviour of "u32 >> 32"") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20170901145729.21363-1-chris@chris-wilson.co.uk Reviewed-by: Ville Syrjälä Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff58a15a502a900c35ff2f20182249b65719d6d7 Author: Thierry Reding Date: Fri Sep 1 16:49:54 2017 +0200 drm/vc4: Use correct path to trace include The header comment in include/trace/define_trace.h specifies that the TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header rather than the trace file including it. Most instances get that wrong and work around it by adding the $(src) directory to the include path. While this works, it is preferable to refer to the correct path to the trace file in the first place and avoid any workaround. Acked-by: Christian König Acked-by: Daniel Vetter Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20170901144954.19620-6-thierry.reding@gmail.com drivers/gpu/drm/vc4/Makefile | 2 -- drivers/gpu/drm/vc4/vc4_trace.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) commit f23ef8eda4e90e22e715170605e0a2a095820933 Author: Thierry Reding Date: Fri Sep 1 16:49:51 2017 +0200 drm/armada: Use correct path to trace include The header comment in include/trace/define_trace.h specifies that the TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header rather than the trace file including it. Most instances get that wrong and work around it by adding the $(src) directory to the include path. While this works, it is preferable to refer to the correct path to the trace file in the first place and avoid any workaround. Acked-by: Christian König Acked-by: Daniel Vetter Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20170901144954.19620-3-thierry.reding@gmail.com drivers/gpu/drm/armada/Makefile | 2 -- drivers/gpu/drm/armada/armada_trace.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) commit d99ce553ed42c21b6fdd1230d5c74624ec90c38e Author: Thierry Reding Date: Fri Sep 1 16:49:49 2017 +0200 drm: Use correct path to trace include The header comment in include/trace/define_trace.h specifies that the TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header rather than the trace file including it. Most instances get that wrong and work around it by adding the $(src) directory to the include path. While this works, it is preferable to refer to the correct path to the trace file in the first place and avoid any workaround. Acked-by: Christian König Acked-by: Daniel Vetter Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20170901144954.19620-1-thierry.reding@gmail.com drivers/gpu/drm/Makefile | 2 -- drivers/gpu/drm/drm_trace.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) commit d149d6ae17197ce23e2cd6bc5fcdacf7b593e55e Merge: afe722b 7846b12 Author: Jani Nikula Date: Mon Sep 4 21:40:34 2017 +0300 Merge drm-upstream/drm-next into drm-intel-next-queued Catch up with upstream while it's easy. Signed-off-by: Jani Nikula commit 6f8acad646d29fbf5665a6e0c9adae71c3c2131e Author: Robert Jarzmik Date: Sat Sep 2 21:54:06 2017 +0200 ASoC: arm: make pxa2xx-ac97-lib ac97 codec agnostic All pxa library functions don't use the input parameters for nothing but slot number. This simplifies their prototypes, and makes them usable by both the legacy ac97 bus and the new ac97 bus. Signed-off-by: Robert Jarzmik Signed-off-by: Mark Brown include/sound/pxa2xx-lib.h | 15 +++++++++------ sound/arm/pxa2xx-ac97-lib.c | 37 +++++++++++++++++++++---------------- sound/arm/pxa2xx-ac97.c | 35 +++++++++++++++++++++++++++-------- sound/soc/pxa/pxa2xx-ac97.c | 32 ++++++++++++++++++++++++++------ 4 files changed, 83 insertions(+), 36 deletions(-) commit 8d43344108c9945456128b75b69beee594b64ed6 Author: Robert Jarzmik Date: Sat Sep 2 21:54:05 2017 +0200 ASoC: add new ac97 bus support Add the new ac97 bus support, with ac97 bus automatic probing. Signed-off-by: Robert Jarzmik Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/Kconfig | 2 ++ sound/Makefile | 1 + 2 files changed, 3 insertions(+) commit 74426fbff66eea8e8d1f42c8238c268d1e63a832 Author: Robert Jarzmik Date: Sat Sep 2 21:54:04 2017 +0200 ALSA: ac97: add an ac97 bus AC97 is a bus for sound usage. It enables for a AC97 AC-Link to link one controller to 0 to 4 AC97 codecs. The goal of this new implementation is to implement a device/driver model for AC97, with an automatic scan of the bus and automatic discovery of AC97 codec devices. Signed-off-by: Robert Jarzmik Reviewed-by: Takashi Iwai Signed-off-by: Mark Brown include/sound/ac97/codec.h | 118 +++++++++ include/sound/ac97/compat.h | 20 ++ include/sound/ac97/controller.h | 85 +++++++ sound/ac97/Kconfig | 19 ++ sound/ac97/Makefile | 8 + sound/ac97/ac97_core.h | 16 ++ sound/ac97/bus.c | 539 ++++++++++++++++++++++++++++++++++++++++ sound/ac97/codec.c | 15 ++ sound/ac97/snd_ac97_compat.c | 108 ++++++++ 9 files changed, 928 insertions(+) commit 8e4f7d9b8c652b4eb3ceb790e1e9fe433f9e3b58 Author: Robert Jarzmik Date: Sat Sep 2 21:54:03 2017 +0200 ALSA: ac97: split out the generic ac97 registers Split out from the ac97_codec.h the ac97 generic registers, which can be used by a codec, typically a generic ac97 codec, and by the ac97 bus, to scan an ac97 AC-Link. This split encompasses all the AC97 standard registers, but not the codec specific ones. In order to have a clean split between former ac97 bus implementation and the new coming one in sound/ac97, it is safer to not include any former ac97 includes, excepting in sound/ac97/compat.c. Amongst the thing to isolate : - don't have the struct snd_ac97 in sound/ac97/* (except compat.c) to not be "fooled" by a definition which would come with ac97_codec.h by "chance". - don't have to have snd_a97_*() functions, as they rely on struct snd_ac97. - don't want the struct snd_ac97_bus_ops, there is a new one Signed-off-by: Robert Jarzmik Reviewed-by: Takashi Iwai Signed-off-by: Mark Brown include/sound/ac97/regs.h | 262 +++++++++++++++++++++++++++++++++++++++++++++ include/sound/ac97_codec.h | 239 +---------------------------------------- 2 files changed, 263 insertions(+), 238 deletions(-) commit afe722bee4bf8afc88c6ff7d6f781515d9428595 Author: Ville Syrjälä Date: Fri Sep 1 20:12:52 2017 +0300 drm/i915: io unmap functions want __iomem Don't cast away the __iomem from the io_mapping functions so that sparse won't be so unhappy when we pass the pointer to the unmap functions. Instead let's move the cast to where we actually use the pointer. Fixes the following sparse warnings: i915_gem.c:1022:33: warning: incorrect type in argument 1 (different address spaces) i915_gem.c:1022:33: expected void [noderef] *vaddr i915_gem.c:1022:33: got void *[assigned] vaddr i915_gem.c:1027:34: warning: incorrect type in argument 1 (different address spaces) i915_gem.c:1027:34: expected void [noderef] *vaddr i915_gem.c:1027:34: got void *[assigned] vaddr i915_gem.c:1199:33: warning: incorrect type in argument 1 (different address spaces) i915_gem.c:1199:33: expected void [noderef] *vaddr i915_gem.c:1199:33: got void *[assigned] vaddr i915_gem.c:1204:34: warning: incorrect type in argument 1 (different address spaces) i915_gem.c:1204:34: expected void [noderef] *vaddr i915_gem.c:1204:34: got void *[assigned] vaddr Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170901171252.31025-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_gem.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit c23aa71bcfe8a9d597ae5fe4c1527fac20254d0a Author: Ville Syrjälä Date: Fri Sep 1 20:12:51 2017 +0300 drm/i915: Add __rcu to radix tree slot pointer radix_tree_for_each_slot() wants an __rcu annotated pointer for the slot. So let's add the annotation. Fixes the following sparse warnings: i915_gem.c:2217:9: warning: incorrect type in assignment (different address spaces) i915_gem.c:2217:9: expected void **slot i915_gem.c:2217:9: got void [noderef] ** i915_gem.c:2217:9: warning: incorrect type in assignment (different address spaces) i915_gem.c:2217:9: expected void **slot i915_gem.c:2217:9: got void [noderef] ** i915_gem.c:2217:9: warning: incorrect type in argument 1 (different address spaces) i915_gem.c:2217:9: expected void [noderef] **slot i915_gem.c:2217:9: got void **slot i915_gem.c:2217:9: warning: incorrect type in assignment (different address spaces) i915_gem.c:2217:9: expected void **slot i915_gem.c:2217:9: got void [noderef] ** Cc: Chris Wilson Fixes: 96d776345277 ("drm/i915: Use a radixtree for random access to the object's backing storage") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170901171252.31025-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c63642329610eae216db906a4e22682256981551 Author: Ville Syrjälä Date: Fri Sep 1 22:54:56 2017 +0300 drm/i915: Wake up the device for the fbdev setup Our fbdev setup requires the device to be awake for access through the GTT. If one boots without connected displays and later plugs one in, we won't have any runtime PM references when the fbdev setup runs. Explicitly grab a runtime PM reference during the fbdev setup to avoid the following spew: [ 62.518435] RPM wakelock ref not held during HW access [ 62.518459] ------------[ cut here ]------------ [ 62.518546] WARNING: CPU: 3 PID: 37 at ../drivers/gpu/drm/i915/intel_drv.h:1800 i915_vma_pin_iomap+0x144/0x150 [i915] [ 62.518585] Modules linked in: i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_gtt agpgart netconsole nls_iso8859_1 nls_cp437 vfat fat efi_pstore coretemp hwmon intel_rapl x86_pkg_temp_thermal e1000e efivars ptp pps_core video evdev ip_tables x_tables ipv6 autofs4 [ 62.518741] CPU: 3 PID: 37 Comm: kworker/3:1 Not tainted 4.13.0-rc7-skl+ #1077 [ 62.518770] Hardware name: /NUC7i5BNB, BIOS BNKBL357.86A.0048.2017.0704.1415 07/04/2017 [ 62.518827] Workqueue: events i915_hotplug_work_func [i915] [ 62.518853] task: ffff88046c00dc00 task.stack: ffffc90000184000 [ 62.518896] RIP: 0010:i915_vma_pin_iomap+0x144/0x150 [i915] [ 62.518919] RSP: 0018:ffffc90000187cc8 EFLAGS: 00010292 [ 62.518942] RAX: 000000000000002a RBX: ffff880460044000 RCX: 0000000000000006 [ 62.518969] RDX: 0000000000000006 RSI: ffffffff819c3e6f RDI: ffffffff819f1c0e [ 62.518996] RBP: ffffc90000187cd8 R08: ffff88046c00e4f0 R09: 0000000000000000 [ 62.519022] R10: ffff8804669ca800 R11: 0000000000000000 R12: ffff880461d20000 [ 62.519049] R13: ffffc90000187d48 R14: ffff880461d20000 R15: ffff880460044000 [ 62.519076] FS: 0000000000000000(0000) GS:ffff88047ed80000(0000) knlGS:0000000000000000 [ 62.519107] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 62.519130] CR2: 000056478ae213f0 CR3: 0000000002c0f000 CR4: 00000000003406e0 [ 62.519156] Call Trace: [ 62.519190] intelfb_create+0x176/0x360 [i915] [ 62.519216] __drm_fb_helper_initial_config_and_unlock+0x1c7/0x3c0 [drm_kms_helper] [ 62.519251] drm_fb_helper_hotplug_event.part.18+0xac/0xc0 [drm_kms_helper] [ 62.519282] drm_fb_helper_hotplug_event+0x1a/0x20 [drm_kms_helper] [ 62.519324] intel_fbdev_output_poll_changed+0x1a/0x20 [i915] [ 62.519352] drm_kms_helper_hotplug_event+0x27/0x30 [drm_kms_helper] [ 62.519395] i915_hotplug_work_func+0x24e/0x2b0 [i915] [ 62.519420] process_one_work+0x1d3/0x6d0 [ 62.519440] worker_thread+0x4b/0x400 [ 62.519458] ? schedule+0x4a/0x90 [ 62.519475] ? preempt_count_sub+0x97/0xf0 [ 62.519495] kthread+0x114/0x150 [ 62.519511] ? process_one_work+0x6d0/0x6d0 [ 62.519530] ? kthread_create_on_node+0x40/0x40 [ 62.519551] ret_from_fork+0x27/0x40 [ 62.519569] Code: c4 78 e6 e0 0f ff e9 08 ff ff ff 80 3d d5 bc 0c 00 00 0f 85 0b ff ff ff 48 c7 c7 d8 50 32 a0 c6 05 c1 bc 0c 00 01 e8 9d 78 e6 e0 <0f> ff e9 f1 fe ff ff 0f 1f 44 00 00 0f 1f 44 00 00 0f b6 87 98 [ 62.519771] ---[ end trace 5fbe271f991a58ae ]--- Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170901195456.6386-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_fbdev.c | 3 +++ 1 file changed, 3 insertions(+) commit 969b0950a188750bd6ad12693fa3b6e8d63036fb Author: Changbin Du Date: Mon Sep 4 16:01:01 2017 +0800 drm/i915: Add interface to reserve fence registers for vGPU In the past, vGPU alloc fence registers by walking through mm.fence_list to find fence which pin_count = 0 and vma is empty. vGPU may not find enough fence registers this way. Because a fence can be bind to vma even though it is not in using. We have found such failure many times these days. An option to resolve this issue is that we can force-remove fence from vma in this case. This patch added two new api to the fence management code: - i915_reserve_fence() will try to find a free fence from fence_list and force-remove vma if need. - i915_unreserve_fence() reclaim a reserved fence after vGPU has finished. With this change, the fence management is more clear to work with vGPU. GVTg do not need remove fence from fence_list in private. v3: (Chris) - Add struct_mutex lock assertion. - Only count for unpinned fence. v2: (Chris) - Rename the new api for symmetry. - Add safeguard to ensure at least 1 fence remained for host display. Signed-off-by: Changbin Du Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1504512061-5892-1-git-send-email-changbin.du@intel.com Acked-by: Zhenyu Wang Signed-off-by: Chris Wilson drivers/gpu/drm/i915/gvt/aperture_gm.c | 26 +++++++--------- drivers/gpu/drm/i915/i915_drv.h | 3 ++ drivers/gpu/drm/i915/i915_gem_fence_reg.c | 51 +++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 15 deletions(-) commit 2db5f9e9fa0ebc3c023f7ac906946a3eef8f5498 Author: Colin Ian King Date: Sun Sep 3 14:54:08 2017 +0100 ASoC: fsl_spdif: make const arrays rate static Don't populate the const arrays rate on the stack, instead make them static. Makes the object code smaller by 220 bytes: Before: text data bss dec hex filename 24385 9776 128 34289 85f1 sound/soc/fsl/fsl_spdif.o After: text data bss dec hex filename 24005 9936 128 34069 8515 sound/soc/fsl/fsl_spdif.o Signed-off-by: Colin Ian King Signed-off-by: Mark Brown sound/soc/fsl/fsl_spdif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6431a7e36652517df82855ee79c8240001812a55 Author: Christophe Jaillet Date: Sun Sep 3 14:29:02 2017 +0200 ASoC: samsung: i2s: Fix error handling path in i2s_set_sysclk() If 'clk_prepare_enable()' fails, we must 'put' the corresponding clock. Othewise, there is a resource leak. Fixes: f5c97c7b0438 ("ASoC: samsung: i2s: Handle return value of clk_prepare_enable.") Signed-off-by: Christophe JAILLET Signed-off-by: Mark Brown sound/soc/samsung/i2s.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b191406e80af9c2d7e95537b5b3ef71374e6eed5 Author: Philippe CORNU Date: Tue Aug 1 15:23:08 2017 +0200 drm/bridge/synopsys: dsi: explicitly request exclusive reset control Based on patch "Convert drivers to explicit reset API" from Philipp Zabel Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting reset lines") started to transition the reset control request API calls to explicitly state whether the driver needs exclusive or shared reset control behavior. Convert all drivers requesting exclusive resets to the explicit API call so the temporary transition helpers can be removed. No functional changes. Cc: Philipp Zabel Signed-off-by: Philippe CORNU Acked-by: Philipp Zabel Reviewed-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/1501593788-21036-4-git-send-email-philippe.cornu@st.com drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 1df82a61afaf79d3a42bd23bf1ec8cf95fe59adb Author: Philippe CORNU Date: Tue Aug 1 15:23:07 2017 +0200 drm/bridge/synopsys: dsi: Register list clean up This patch cleans up the Synopsys mipi dsi register list: - rename registers according to the Synopsys documentation (1.30 & 1.31) - fix typos - re-order registers for a better coherency Signed-off-by: Philippe CORNU Reviewed-by: Laurent Pinchart Reviewed-by: Andrzej Hajda Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/1501593788-21036-3-git-send-email-philippe.cornu@st.com drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 92 ++++++++++++++++----------- 1 file changed, 56 insertions(+), 36 deletions(-) commit 6b8ed8720011f703bd9be63c905b592666e1bf62 Author: Gabriel Krisman Bertazi Date: Thu Aug 31 16:52:14 2017 -0300 drm: Fix example comment of format modifier blob To represent formats 98-102, the supported formats mask must be 0x7c00000000 and not 0x3c00000000. Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Ben Widawsky Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170831195215.13302-1-krisman@collabora.co.uk include/uapi/drm/drm_mode.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4e6d7719bdc5babeb92a8d41cec8f462af64fddc Author: Thierry Reding Date: Fri Sep 1 16:49:52 2017 +0200 drm/i915: Use correct path to trace include The header comment in include/trace/define_trace.h specifies that the TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header rather than the trace file including it. Most instances get that wrong and work around it by adding the $(src) directory to the include path. While this works, it is preferable to refer to the correct path to the trace file in the first place and avoid any workaround. Signed-off-by: Thierry Reding Acked-by: Christian König Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170901144954.19620-4-thierry.reding@gmail.com drivers/gpu/drm/i915/Makefile | 2 -- drivers/gpu/drm/i915/i915_trace.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) commit b954d77aa9163819af3dae5b0742e59ae8d6d309 Author: Lorenzo Bianconi Date: Sat Sep 2 19:39:14 2017 +0200 iio: pressure: add support to LPS33HW and LPS35HW add support to STMicroelectronics LPS33HW and LPS35HW pressure sensors to st_pressure framework http://www.st.com/resource/en/datasheet/lps33hw.pdf http://www.st.com/resource/en/datasheet/lps35hw.pdf Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron drivers/iio/pressure/st_pressure.h | 4 ++++ drivers/iio/pressure/st_pressure_core.c | 2 ++ drivers/iio/pressure/st_pressure_i2c.c | 10 ++++++++++ drivers/iio/pressure/st_pressure_spi.c | 10 ++++++++++ 4 files changed, 26 insertions(+) commit 2711e642baba386bc83e49b9d1c52c92d4393a63 Author: Colin Ian King Date: Wed Aug 30 12:16:16 2017 +0100 iio: imu: inv_mpu6050: make arrays hz and d static Don't populate the arrays on the stack, instead make them static. Makes the object code smaller by 135 bytes: Before: text data bss dec hex filename 15135 4240 128 19503 4c2f inv_mpu_core.o After: text data bss dec hex filename 14840 4400 128 19368 4ba8 inv_mpu_core.o Signed-off-by: Colin Ian King Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit fe895ac88b9fbdf2026f0bfd56c82747bb9d7c48 Author: Ladislav Michl Date: Fri Aug 25 07:39:16 2017 +0200 iio: adc: ti-ads1015: add 10% to conversion wait time As user's guide "ADS1015EVM, ADS1115EVM, ADS1015EVM-PDK, ADS1115EVM-PDK User Guide (Rev. B)" (http://www.ti.com/lit/ug/sbau157b/sbau157b.pdf) states at page 16: "Note that both the ADS1115 and ADS1015 have internal clocks with a ±10% accuracy. If performing FFT tests, frequencies may appear to be incorrect as a result of this tolerance range.", add those 10% to converion wait time. Cc: Daniel Baluta Cc: Jonathan Cameron Signed-off-by: Ladislav Michl Reviewed-by: Akinobu Mita Signed-off-by: Jonathan Cameron drivers/iio/adc/ti-ads1015.c | 1 + 1 file changed, 1 insertion(+) commit d1c11dc27e3282e787406290ead5926bb7bb4579 Author: Ladislav Michl Date: Thu Aug 24 10:25:51 2017 +0200 iio: adc: ti-ads1015: write config register only on change There is no point writing ADS1015_CFG_REG when configuration didn't change. Avoid that. Cc: Daniel Baluta Cc: Jonathan Cameron Signed-off-by: Ladislav Michl Reviewed-by: Akinobu Mita Signed-off-by: Jonathan Cameron drivers/iio/adc/ti-ads1015.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 4e57562b4846e42cd1c2e556f0ece18c1154e116 Author: Gustavo A. R. Silva Date: Tue Aug 22 14:13:25 2017 -0500 iio: imu: inv_mpu6050: fix missing break in switch Add missing break statement to prevent the code for case IIO_CHAN_INFO_CALIBBIAS falling through to the default case. Also, add a break to the default case for the switch within case IIO_CHAN_INFO_CALIBBIAS. Addresses-Coverity-ID: 1357377 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 2 ++ 1 file changed, 2 insertions(+) commit dd92d5ea20ef8a42be7aeda08c669c586c730451 Author: Gustavo A. R. Silva Date: Thu Jul 6 23:53:11 2017 -0500 iio: multiplexer: add NULL check on devm_kzalloc() and devm_kmemdup() return values Check return values from call to devm_kzalloc() and devm_kmemup() 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 Fixes: 7ba9df54b091 ("iio: multiplexer: new iio category and iio-mux driver") Signed-off-by: Gustavo A. R. Silva Acked-by: Peter Rosin Signed-off-by: Jonathan Cameron drivers/iio/multiplexer/iio-mux.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 9d2f715d592eb4d0e643f6219f4a160fbd62934d Author: Akinobu Mita Date: Tue Jun 27 00:44:55 2017 +0900 iio: light: tcs3472: support out-of-threshold events The TCS3472 device provides interrupt signal for out-of-threshold events with persistence filter. This change adds interrupt support for the threshold events and enables to configure the period of time by persistence filter. Cc: Peter Meerwald Cc: Jonathan Cameron Signed-off-by: Akinobu Mita Signed-off-by: Jonathan Cameron drivers/iio/light/tcs3472.c | 262 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 254 insertions(+), 8 deletions(-) commit 1405ddfbf10a4e3475babf533fca5f5f60dba2c8 Author: Arvind Yadav Date: Mon Aug 21 22:13:51 2017 +0530 staging: iio: tsl2x7x: constify i2c_device_id i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Jonathan Cameron drivers/staging/iio/light/tsl2x7x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3c198bd62509f2d633dde36344798c39d6e16e0 Author: Jonathan Cameron Date: Sun Jul 23 17:26:27 2017 +0100 staging:iio:docs: drop setting of THIS_MODULE from staging docs. These docs need to be cleaned up properly, but for now lets drop this entry as it is definitely no longer true. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/staging/iio/Documentation/device.txt | 3 --- 1 file changed, 3 deletions(-) commit e838494e0b48782262b6d18e7d92666b046a7ef4 Author: Jonathan Cameron Date: Sun Jul 23 17:26:26 2017 +0100 staging:iio:docs: drop reference to setting trig_ops->owner Whilst these docs have lots of other flaws, this element is definitely no longer true. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/staging/iio/Documentation/trigger.txt | 4 ---- 1 file changed, 4 deletions(-) commit 7090992708771d709644f1ab4d7614c48d0736d6 Author: Jonathan Cameron Date: Sun Jul 23 17:26:25 2017 +0100 iio:potentiometer:max5487: Drop explicit setting of module owner The SPI core has handled this for some time. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/potentiometer/max5487.c | 1 - 1 file changed, 1 deletion(-) commit 6ec7ffd6e9ac28a62164e05c80c002cf4b788ef9 Author: Jonathan Cameron Date: Sun Jul 23 17:26:24 2017 +0100 iio:potentiometer:max5481 drop explicit setting of the owner module. This has been handled by the spi core for some time. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/potentiometer/max5481.c | 1 - 1 file changed, 1 deletion(-) commit aacbd095b4015a85eaac56a517eacf2df89b1b5e Author: Jonathan Cameron Date: Sun Jul 23 17:26:23 2017 +0100 iio:adc:ti-ads8688: Drop manual setting of the driver owner field. This has been handled by the spi core for some time now. Signed-off-by: Jonathan Cameron Cc: Sean Nyekjaer Reviewed-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron drivers/iio/adc/ti-ads8688.c | 1 - 1 file changed, 1 deletion(-) commit a8375d704d462fcedf9acd942d4aa9f91f846742 Author: Jonathan Cameron Date: Sun Jul 23 17:26:22 2017 +0100 iio:adc:max9611: Drop explicit setting of the i2c module owner. This has been handled by the i2c core for some time. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/adc/max9611.c | 1 - 1 file changed, 1 deletion(-) commit 97623c0a80a605ef3fae337081ed008796bf8cc2 Author: Jonathan Cameron Date: Sun Jul 23 17:26:21 2017 +0100 iio: drop iio_info.driver_module and iio_trigger_ops.owner. The equivalents are now assigned automatically in the relevant registration calls and so are not needed in these operations structures. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen include/linux/iio/iio.h | 3 --- include/linux/iio/trigger.h | 2 -- 2 files changed, 5 deletions(-) commit 873f389433f4d43387786999377a450729ad1a4d Author: Jonathan Cameron Date: Sun Sep 3 18:08:10 2017 +0100 iio: multiplexer: drop the manual assignment of THIS_MODULE This is now done through some macro magic by the core. Signed-off-by: Jonathan Cameron Acked-by: Peter Rosin drivers/iio/multiplexer/iio-mux.c | 1 - 1 file changed, 1 deletion(-) commit 14b469f9c02d458a4388479fb393a625f15af488 Author: Linus Walleij Date: Sat Sep 2 22:07:11 2017 +0200 drm/tve200: Replace custom connector with panel bridge This replaces the custom connector in the TVE200 with the panel bridge helper. As long as we're just using panels and no other bridges, this works just fine. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20170902200711.29298-1-linus.walleij@linaro.org drivers/gpu/drm/tve200/Kconfig | 3 +- drivers/gpu/drm/tve200/Makefile | 3 +- drivers/gpu/drm/tve200/tve200_connector.c | 125 ------------------------------ drivers/gpu/drm/tve200/tve200_display.c | 15 ++-- drivers/gpu/drm/tve200/tve200_drm.h | 10 +-- drivers/gpu/drm/tve200/tve200_drv.c | 66 +++++++++++----- 6 files changed, 59 insertions(+), 163 deletions(-) commit b52f09c494507a67a6a2c6b024c7df57150304f4 Author: Noralf Trønnes Date: Mon Aug 28 19:17:43 2017 +0200 drm/fb-helper: Avoid NULL ptr dereference in fb_set_suspend() drm_fb_helper_resume_worker() uses fb_helper->fbdev to call fb_set_suspend() which dereferences the pointer. Move sync-canceling of the resume worker in drm_fb_helper_fini() before setting fb_helper->fbdev to NULL. Move dirty_work as well. Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/1503940668-25883-2-git-send-email-noralf@tronnes.org drivers/gpu/drm/drm_fb_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4930a4334e5bb761aeda7ba14fe59f1af93392b9 Author: Noralf Trønnes Date: Sun Aug 13 15:32:00 2017 +0200 drm/stm: Use drm_gem_fb_create() drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Yannick Fertre Cc: Philippe Cornu Cc: Benjamin Gaignard Cc: Vincent Abriou Signed-off-by: Noralf Trønnes Acked-by: Philippe Cornu Tested-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-18-git-send-email-noralf@tronnes.org drivers/gpu/drm/stm/drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1cdea74ea041a382d7ce5994215bf0c43a15dd20 Author: Noralf Trønnes Date: Sun Aug 13 15:31:47 2017 +0200 drm/arc: Use drm_gem_fb_create() drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Alexey Brodkin Signed-off-by: Noralf Trønnes Acked-by: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-5-git-send-email-noralf@tronnes.org drivers/gpu/drm/arc/arcpgu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4ee73624e0d0fd647ede3b17187ba98f2aa9421c Author: Noralf Trønnes Date: Thu Aug 17 18:21:31 2017 +0200 drm/armada: Use .dumb_map_offset and .dumb_destroy defaults This driver can use the drm_driver.dumb_destroy and drm_driver.dumb_map_offset defaults, so no need to set them. Cc: Russell King Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1502986891-36764-3-git-send-email-noralf@tronnes.org drivers/gpu/drm/armada/armada_drv.c | 2 -- drivers/gpu/drm/armada/armada_gem.c | 36 ------------------------------------ drivers/gpu/drm/armada/armada_gem.h | 4 ---- 3 files changed, 42 deletions(-) commit 90378e58919285637aa0f063c04ba0c6449d98b1 Author: Noralf Trønnes Date: Thu Aug 17 18:21:30 2017 +0200 drm/gem: drm_gem_dumb_map_offset(): reject dma-buf Reject mapping an imported dma-buf since is's an invalid use-case. Cc: Philipp Zabel Cc: Laurent Pinchart Cc: Sean Paul Cc: Daniel Vetter Signed-off-by: Noralf Trønnes Acked-by: Daniel Vetter Acked-by: Eric Anholt Acked-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1502986891-36764-2-git-send-email-noralf@tronnes.org drivers/gpu/drm/drm_gem.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6e31cdcfe17d8a25530924183d4a843602baebb1 Author: Zhi Wang Date: Fri Sep 1 03:36:14 2017 +0800 drm/i915: Fix the missing PPAT cache attributes on CNL Add back the GEN8_PPAT_WB cache attributes in cnl_setup_private_ppat(), which are missed on CNL. Fixes: 4e34935fcf69 ("drm/i915/cnl: Setup PAT Index.") Cc: Ben Widawsky Cc: Rodrigo Vivi Cc: Chris Wilson Suggested-by: Joonas Lahtinen Signed-off-by: Zhi Wang Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1504208177-27784-1-git-send-email-zhi.a.wang@intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cd00a424d26f9b954f5a084b88800e859fc0c52f Author: Alex Deucher Date: Tue Aug 29 10:55:05 2017 -0400 drm/amd/powerplay: fix sclk setting for profile mode for CZ/ST Need to select dpm0 to avoid clock fluctuations. Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 47 +------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) commit 56d11d580974958bd3c7ae4a42368ae22cb50354 Author: Thierry Reding Date: Fri Sep 1 16:49:53 2017 +0200 drm/radeon: Use correct path to trace include The header comment in include/trace/define_trace.h specifies that the TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header rather than the trace file including it. Most instances get that wrong and work around it by adding the $(src) directory to the include path. While this works, it is preferable to refer to the correct path to the trace file in the first place and avoid any workaround. Reviewed-by: Christian König Signed-off-by: Thierry Reding Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/Makefile | 2 -- drivers/gpu/drm/radeon/radeon_trace.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) commit 1430f73beb7fd4655d3fbd2e373615eca016f9c3 Author: Thierry Reding Date: Fri Sep 1 12:54:01 2017 -0400 drm/amdgpu: Use correct path to trace include The header comment in include/trace/define_trace.h specifies that the TRACE_INCLUDE_PATH needs to be relative to the define_trace.h header rather than the trace file including it. Most instances get that wrong and work around it by adding the $(src) directory to the include path. While this works, it is preferable to refer to the correct path to the trace file in the first place and avoid any workaround. Reviewed-by: Christian König Signed-off-by: Thierry Reding Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/Makefile | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) commit 60233daca067cbef01fef6fdf457c1c11defcc90 Author: Tom St Denis Date: Fri Sep 1 12:52:38 2017 -0400 drm/ttm: Fix trace include path (v2) Reviewed-by: Thierry Reding Reviewed-by: Christian König Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher (v2): Drop Makefile change too. drivers/gpu/drm/ttm/Makefile | 1 - drivers/gpu/drm/ttm/ttm_trace.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit b7df5749c2f883c4a9b166e3ebb82f9627eddab1 Author: Thierry Reding Date: Fri Sep 1 16:44:30 2017 +0200 drm/scdc-helper: Use consistent spelling for TMDS The file uses inconsistent capitalization for TMDS. Since it is an abbreviation, all uppercase is correct. Reviewed-by: Ville Syrjälä Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20170901144430.19164-3-thierry.reding@gmail.com drivers/gpu/drm/drm_scdc_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6ec75510f8f215e44731d0c2fae987fa1aeb16f2 Author: Thierry Reding Date: Fri Sep 1 16:44:29 2017 +0200 drm/scdc-helper: Use consistent error reporting The error messages generated by the SCDC helpers are somewhat inconsistent with other DRM errors and even with other errors in the same file. Fix them all up to use a common format. Reviewed-by: Ville Syrjälä Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20170901144430.19164-2-thierry.reding@gmail.com drivers/gpu/drm/drm_scdc_helper.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 427dc547e15ea0d3a56d8867f970dee970688fea Author: Thierry Reding Date: Fri Sep 1 16:44:28 2017 +0200 drm/scdc-helper: Remove gratuitous blank lines It's unusual to separate kerneldoc comments from the functions that they describe by a blank line. Remove them. Reviewed-by: Ville Syrjälä Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20170901144430.19164-1-thierry.reding@gmail.com drivers/gpu/drm/drm_scdc_helper.c | 2 -- 1 file changed, 2 deletions(-) commit 46ad42a3756d5e2078ed05bc99aa197815afac5d Author: Thierry Reding Date: Fri Sep 1 16:40:42 2017 +0200 drm/atomic: Fix typo in kerneldoc The for_each_crtc_in_state() is used to iterate over CRTCs rather than connectors. Reviewed-by: Ville Syrjälä Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20170901144042.6023-2-thierry.reding@gmail.com include/drm/drm_atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2093ea2e098b602e0ecefcd30211193b888da5d3 Author: Thierry Reding Date: Fri Sep 1 16:40:41 2017 +0200 drm/vtables: Fix typo The callback is named .atomic_check, not .atomc_check. Reviewed-by: Ville Syrjälä Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20170901144042.6023-1-thierry.reding@gmail.com include/drm/drm_modeset_helper_vtables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f053cd478ecfe9cbc9988912fe63a6d723838b2e Author: Tom St Denis Date: Fri Sep 1 09:55:04 2017 -0400 drm/amd/amdgpu: Cleanup gmc_v9_0_suspend() Even though fini returns 0 always it could theoretically fail in the future. Might as well return it instead of 0. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 4d9c333a464aef3341357035cb75617ebb052c65 Author: Tom St Denis Date: Fri Sep 1 09:53:44 2017 -0400 drm/amd/amdgpu: Tidy up gmc_v9_0_hw_init() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 846347c9f527bc6a771dca568c866704c290e103 Author: Tom St Denis Date: Fri Sep 1 09:52:21 2017 -0400 drm/amd/amdgpu: Tidy up gmc_v9_0_gart_enable() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit ae6d1416fa1624a6a2e4f2d392b3c0bdcc570712 Author: Tom St Denis Date: Fri Sep 1 09:27:31 2017 -0400 drm/amd/amdgpu: Simplify gmc_v9_0_vm_fault_interrupt_state() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 51 ++++++++++++----------------------- 1 file changed, 17 insertions(+), 34 deletions(-) commit f6886c472654e12d9cab4c4462a1c38c732468b8 Author: Tom St Denis Date: Fri Sep 1 09:13:04 2017 -0400 drm/amd/amdgpu: Support full range of GFX ring names Right now there's only one but the rest of the code is being setup to support more so might as well fix this up too. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 70a9c6b9010848e101ff67a886f2e75209b2f0d1 Author: Christian König Date: Fri Sep 1 09:22:56 2017 +0200 drm/amdgpu: fix placement flags in amdgpu_ttm_bind Otherwise we lose the NO_EVICT flag and can try to evict pinned BOs. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 481c2e94897eb74abcfb4a3cdb87f5f89499b93f Author: Christian König Date: Fri Sep 1 14:46:19 2017 +0200 drm/amdgpu: fix moved list handling in the VM Only move BOs to the moved/relocated list when they aren't already on a list. This prevents accidential removal from the evicted list. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit f5830465967799de0334340d1888f7d2c0bc17f5 Author: Evan Quan Date: Fri Sep 1 15:07:41 2017 +0800 drm/amdgpu: declare the new firmware files needed by polaris asics Signed-off-by: Evan Quan Reviewed-by: Flora Cui Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 6849d47cabc36e8f2697043f8c81e7719876dfd3 Author: Roger He Date: Wed Aug 30 13:01:19 2017 +0800 drm/amdgpu: handle all fragment sizes v4 This can improve performance for some cases. v2 (chk): handle all sizes, simplify the patch quite a bit v3 (chk): adjust dw estimation as well v4 (chk): use single loop, make end mask 64bit Signed-off-by: Roger He Signed-off-by: Christian König Tested-by: Roger He Reviewed-by: Felix Kuehling Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 55 ++++++++++++++++------------------ 1 file changed, 26 insertions(+), 29 deletions(-) commit 41c32e5da3ff3922490341a988b2a3ae46d0b6a8 Author: Ville Syrjälä Date: Fri Sep 1 17:31:23 2017 +0300 drm/i915: Fix enum pipe vs. enum transcoder for the PCH transcoder Use enum pipe for PCH transcoders also in the FIFO underrun code. Fixes the following new sparse warnings: intel_fifo_underrun.c:340:49: warning: mixing different enum types intel_fifo_underrun.c:340:49: int enum pipe versus intel_fifo_underrun.c:340:49: int enum transcoder intel_fifo_underrun.c:344:49: warning: mixing different enum types intel_fifo_underrun.c:344:49: int enum pipe versus intel_fifo_underrun.c:344:49: int enum transcoder intel_fifo_underrun.c:397:57: warning: mixing different enum types intel_fifo_underrun.c:397:57: int enum pipe versus intel_fifo_underrun.c:397:57: int enum transcoder intel_fifo_underrun.c:398:17: warning: mixing different enum types intel_fifo_underrun.c:398:17: int enum pipe versus intel_fifo_underrun.c:398:17: int enum transcoder Cc: Matthias Kaehlcke Fixes: a21960339c8c ("drm/i915: Consistently use enum pipe for PCH transcoders") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170901143123.7590-3-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/i915_trace.h | 4 ++-- drivers/gpu/drm/i915/intel_fifo_underrun.c | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) commit 0db1aa424e3ee91fcb9d583edb30a933c64c5b88 Author: Ville Syrjälä Date: Fri Sep 1 17:31:22 2017 +0300 drm/i915: Make i2c lock ops static Make gmbus_lock_ops and proxy_lock_ops static to appease sparse intel_i2c.c:652:34: warning: symbol 'gmbus_lock_ops' was not declared. Should it be static? intel_sdvo.c:2981:34: warning: symbol 'proxy_lock_ops' was not declared. Should it be static? Cc: Daniel Vetter Fixes: a85066840d29 ("drm/i915: Rework sdvo proxy i2c locking") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170901143123.7590-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_i2c.c | 2 +- drivers/gpu/drm/i915/intel_sdvo.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0abd9976960a5c46b5cc49f2f53281774a8a4a3e Author: Ville Syrjälä Date: Fri Sep 1 17:31:21 2017 +0300 drm/i915: Make i9xx_load_ycbcr_conversion_matrix() static Make i9xx_load_ycbcr_conversion_matrix() static to appease sparse: intel_color.c:110:6: warning: symbol 'i9xx_load_ycbcr_conversion_matrix' was not declared. Should it be static? Cc: Shashank Sharma Fixes: 25edf91501b8 ("drm/i915: prepare csc unit for YCBCR420 output") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170901143123.7590-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson drivers/gpu/drm/i915/intel_color.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2179481363bd82bc51f3f6f3b5fff9f78614887f Author: Ville Syrjälä Date: Wed Aug 23 18:22:26 2017 +0300 drm/i915: Eliminate crtc->state usage from intel_atomic_commit_tail and .crtc_update() We already have the correct new crtc state so just use that instead of crtc->state. Reviewed-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170823152226.22938-7-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1a15b77bd14073883a18ee1ac94bd58c3a151546 Author: Ville Syrjälä Date: Wed Aug 23 18:22:25 2017 +0300 drm/i915: Eliminate crtc->state usage from intel_update_pipe_config() Pass the correct new crtc state to intel_update_pipe_config() instead of using crtc->state. Reviewed-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170823152226.22938-6-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit f9a8c149e91ca18adfbadea5d562bc21197caf1a Author: Ville Syrjälä Date: Wed Aug 23 18:22:24 2017 +0300 drm/i915: Eliminate obj->state usage from pre/post plane update Dig up the appropriate new crtc and plane states from the top level atomic state in intel_pre_plane_update() and intel_post_plane_update(). Reviewed-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170823152226.22938-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit b2b55502d683c72d3bd3ce31af5bd5ab990061d7 Author: Ville Syrjälä Date: Wed Aug 23 18:22:23 2017 +0300 drm/i915: Pass proper old/new states to intel_plane_atomic_check_with_state() Eliminate plane->state and crtc->state usage from intel_plane_atomic_check_with_state() and its callers. Instead pass the proper states in or dig them up from the top level atomic state. Note that intel_plane_atomic_check_with_state() itself isn't allowed to use the top level atomic state as there is none when it gets called from the legacy cursor short circuit path. v2: Rename some variables for easier comprehension (Maarten) Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170823152226.22938-4-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst drivers/gpu/drm/i915/intel_atomic_plane.c | 49 +++++++++++++++++++------------ drivers/gpu/drm/i915/intel_display.c | 12 ++++---- drivers/gpu/drm/i915/intel_drv.h | 16 ++++++++-- 3 files changed, 51 insertions(+), 26 deletions(-) commit 18b5381803f437bc504ca616a6bdc151420c609b Author: Lionel Landwerlin Date: Wed Aug 30 17:12:07 2017 +0100 drm/i915: rework IS_*_GT* macros We can now make use of the intel_device_info.gt field. Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170830161208.29221-4-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/i915_drv.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit 5b54eddd3920e9f6f1a6d972454baf350cbae77e Author: Lionel Landwerlin Date: Wed Aug 30 17:12:06 2017 +0100 drm/i915: mark all device info struct with __initconst As recommended by Chris. v2: Switch from __initdata to __initconst. Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170830161208.29221-3-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/i915_pci.c | 94 ++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 47 deletions(-) commit 0890540e21cf1156b4cf960a4c1c734db4e816f9 Author: Lionel Landwerlin Date: Wed Aug 30 17:12:05 2017 +0100 drm/i915: add GT number to intel_device_info Up to Coffeelake we could deduce this GT number from the device ID. This doesn't seem to be the case anymore. This change reorders pciids per GT and adds a gt field to intel_device_info. We set this field on the following platforms : - SNB/IVB/HSW/BDW/SKL/KBL/CFL/CNL Before & After : $ modinfo drivers/gpu/drm/i915/i915.ko | grep ^alias | wc -l 209 v2: Add SNB & IVB (Chris) v3: Fix compilation error in early-quirks (Lionel) v4: Fix inconsistency between FEATURE/PLATFORM macros (Ville) Signed-off-by: Lionel Landwerlin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170830161208.29221-2-lionel.g.landwerlin@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_pci.c | 193 +++++++++++++++++++++++++++++++--------- include/drm/i915_pciids.h | 152 +++++++++++++++++++------------ 3 files changed, 246 insertions(+), 100 deletions(-) commit 2b9bdfa70faf8c00969f91d3c4548a0df6071b90 Author: Tom St Denis Date: Thu Aug 31 09:48:11 2017 -0400 drm/amd/amdgpu: Simplify gfx_v9_0_wait_for_idle() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 78888cff5cbaf5ec712b20a216f500b7d4493e77 Author: Tom St Denis Date: Thu Aug 31 09:43:47 2017 -0400 drm/amd/amdgpu: Fix indentation in gfx_v9_0_mqd_init() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b08796cee109b35996357286ca878611e9dae4a4 Author: Tom St Denis Date: Thu Aug 31 09:40:38 2017 -0400 drm/amd/amdgpu: Tidy up gfx_v9_0_rlc_stop() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit e567fa69f2045b5484a232a51ebbfe92f7c65386 Author: Tom St Denis Date: Thu Aug 31 09:31:23 2017 -0400 drm/amd/amdgpu: Tidy up gfx_v9_0_enable_gfx_dynamic_mg_power_gating() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 7915c8fd7ec70f65c66c268d8d19f563b5a0162d Author: Tom St Denis Date: Thu Aug 31 09:31:01 2017 -0400 drm/amd/amdgpu: Tidy up gfx_v9_0_enable_gfx_static_mg_power_gating() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 513f81332a498ce989559435a74491897dda8af2 Author: Tom St Denis Date: Thu Aug 31 09:27:22 2017 -0400 drm/amd/amdgpu: Tidy up gfx_v9_0_enable_gfx_pipeline_powergating() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit f55ee212ee263de6f9a56530095bfafbecc5863d Author: Tom St Denis Date: Thu Aug 31 09:14:41 2017 -0400 drm/amd/amdgpu: Tidy up gfx_v9_0_enable_gfx_cg_power_gating() Make it consistent in style with the other CG/PG enable functions... Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 54cfe0fc54a16de265aac79fb8c7c7cd3131c964 Author: Tom St Denis Date: Thu Aug 31 09:12:47 2017 -0400 drm/amd/amdgpu: Tidy up gfx_v9_0_enable_cp_power_gating() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit b926fe8efc54062f984b70e79bd71dddba176816 Author: Tom St Denis Date: Thu Aug 31 09:02:33 2017 -0400 drm/amd/amdgpu: Tidy up gfx_v9_0_enable_sck_slow_down_on_power_down() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit e24c7f06db418c34c179233724656ec0efae6bc8 Author: Tom St Denis Date: Thu Aug 31 09:01:11 2017 -0400 drm/amd/amdgpu: Tidy up gfx_v9_0_enable_sck_slow_down_on_power_up() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 0e5293d07b92dfc1ada2d4a6c9057c1ee8179399 Author: Tom St Denis Date: Thu Aug 31 08:59:00 2017 -0400 drm/amd/amdgpu: Tidy up gfx_v9_0_enable_save_restore_machine() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 91629eff745e4c27d6501f1949e502868d9d5706 Author: Tom St Denis Date: Thu Aug 31 08:50:23 2017 -0400 drm/amd/amdgpu: Tidy up gfx_v9_0_ngg_en() Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) commit 35c32f20a7e28b82b61d44a164b756d933bca4a4 Author: Tom St Denis Date: Thu Aug 31 08:41:54 2017 -0400 drm/amd/amdgpu: Tidy up register list formatting. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 96 +++++++++++++++++++++++------------ 1 file changed, 64 insertions(+), 32 deletions(-) commit e8f345e08d391827f2cba5d172af990cc7afb062 Author: Manasi Navare Date: Tue Aug 15 11:59:51 2017 -0700 drm/i915/edp: Increase T12 panel delay to 900 ms to fix DP AUX CH timeouts This patch fixes the DP AUX CH timeouts observed during CI runs causing CI Failures on a specific PCI device. This issue was fixed previously by adding a quirk but looks like we need to increase this delay even more in order to get rid all the DP AUX CH timeouts. Fixes: c99a259b4b5192ba ("drm/i915/edp: Add a T12 panel delay quirk to fix DP AUX CH timeouts") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101144 Signed-off-by: Manasi Navare Cc: Clinton Taylor Cc: Daniel Vetter Cc: Tomi Sarvela Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/1502823591-25310-1-git-send-email-manasi.d.navare@intel.com drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b510451c896dfd5c1f007ba61f04708dd930660 Author: Ville Syrjälä Date: Wed Aug 23 18:22:22 2017 +0300 drm/i915: Eliminate obj->state usage in g4x/vlv/chv wm computation Use explicit old/new states instead of relying on obj->state. Reviewed-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170823152226.22938-4-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 9 +++++++++ drivers/gpu/drm/i915/intel_drv.h | 8 ++++++++ drivers/gpu/drm/i915/intel_pm.c | 30 +++++++++++++++--------------- 3 files changed, 32 insertions(+), 15 deletions(-) commit d3a8fb3223a7b2fc50bc818ddbeb780c67420d6d Author: Ville Syrjälä Date: Wed Aug 23 18:22:21 2017 +0300 drm/i915: Pass the crtc state explicitly to intel_pipe_update_start/end() Pass the appropriate new crtc state explicitly to intel_pipe_update_start/end() instead of of mucking around with crtc->state. v2: The mmio flip stuff is gone Reviewed-by: Maarten Lankhorst #v1 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170823152226.22938-2-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 14 +++++++++----- drivers/gpu/drm/i915/intel_drv.h | 12 ++++++++++-- drivers/gpu/drm/i915/intel_sprite.c | 27 +++++++++++++-------------- 3 files changed, 32 insertions(+), 21 deletions(-) commit 5c857e60502491605c244a3130f36fd742122ff7 Author: Ville Syrjälä Date: Wed Aug 23 18:22:20 2017 +0300 drm/i915: Pass the new crtc state to color management code In an effort to eliminate the obj->state usage let's pass on the new crtc state pointer (which we already have!) to the color management code. Reviewed-by: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170823152226.22938-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c61de4c69a2acc7352969921405c67e88ca862b Author: Ville Syrjälä Date: Mon Jul 10 22:33:47 2017 +0300 drm/i915: Consolidate max_cdclk_freq check in intel_crtc_compute_min_cdclk() Currently the .modeset_calc_cdclk() hooks check the final cdclk value against the max allowed. That's not really sufficient since the low level calc_cdclk() functions effectively clamp the minimum required cdclk to the max supported by the platform. Hence if the minimum required exceeds the platforms capabilities we'd keep going anyway using the max cdclk frequency. To fix that let's move the check earlier into intel_crtc_compute_min_cdclk() and we'll check the minimum required cdclk of the pipe against the maximum supported by the platform. Cc: Paulo Zanoni Cc: Rodrigo Vivi Cc: Dhinakaran Pandiyan Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170710193347.8734-2-ville.syrjala@linux.intel.com Reviewed-by: Dhinakaran Pandiyan drivers/gpu/drm/i915/intel_cdclk.c | 96 +++++++++++++++++------------------- drivers/gpu/drm/i915/intel_display.c | 5 +- 2 files changed, 48 insertions(+), 53 deletions(-) commit d305e0614601aefc6011ec60fd28b8184db09409 Author: Ville Syrjälä Date: Wed Aug 30 21:57:03 2017 +0300 drm/i915: Track minimum acceptable cdclk instead of "minimum dotclock" Make the min_pixclk thing less confusing by changing it to track the minimum acceptable cdclk frequency instead. This means moving the application of the guardbands to a slightly higher level from the low level platform specific calc_cdclk() functions. The immediate benefit is elimination of the confusing 2x factors on GLK/CNL+ in the audio workarounds (which stems from the fact that the pipes produce two pixels per clock). v2: Keep cdclk higher on CNL to workaround missing DDI clock voltage handling v3: Squash with the CNL cdclk limits patch (DK) v4: s/intel_min_cdclk/intel_pixel_rate_to_cdclk/ (DK) Cc: Paulo Zanoni Cc: Rodrigo Vivi Cc: Dhinakaran Pandiyan Cc: Maarten Lankhorst Reviewed-by: Dhinakaran Pandiyan Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170830185703.8189-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/i915_drv.h | 12 ++- drivers/gpu/drm/i915/intel_cdclk.c | 202 ++++++++++++++++++----------------- drivers/gpu/drm/i915/intel_display.c | 21 ++-- drivers/gpu/drm/i915/intel_drv.h | 4 +- 4 files changed, 125 insertions(+), 114 deletions(-) commit fd8bf087dffc0bce047c5aea2afcb8f821e48db1 Author: Christian König Date: Tue Aug 29 16:14:32 2017 +0200 drm/amdgpu: bump version for support of local BOs Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e1eb899b45781b9bb77e6d7772d6e67bb0bc1a18 Author: Christian König Date: Fri Aug 25 09:14:43 2017 +0200 drm/amdgpu: add IOCTL interface for per VM BOs v3 Add the IOCTL interface so that applications can allocate per VM BOs. Still WIP since not all corner cases are tested yet, but this reduces average CS overhead for 10K BOs from 21ms down to 48us. v2: add some extra checks, remove the WIP tag v3: rename new flag to AMDGPU_GEM_CREATE_VM_ALWAYS_VALID Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 63 ++++++++++++++++++++++--------- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 3 +- include/uapi/drm/amdgpu_drm.h | 2 + 5 files changed, 55 insertions(+), 22 deletions(-) commit 73fb16e7ebee12953de32a7a2552e0cf2bf74ebf Author: Christian König Date: Wed Aug 16 11:13:48 2017 +0200 drm/amdgpu: add support for per VM BOs v2 Per VM BOs are handled like VM PDs and PTs. They are always valid and don't need to be specified in the BO lists. v2: validate PDs/PTs first Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 79 ++++++++++++++++++++++++---------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 5 ++- 3 files changed, 60 insertions(+), 26 deletions(-) commit 4f5839c56ec38e2f8fcc59ca0e01defa8702987b Author: Christian König Date: Tue Aug 29 16:07:31 2017 +0200 drm/amdgpu: restrict userptr even more Don't allow them to be GEM imported into another process. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Acked-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0f2fc435d837213202bec3b8e26fbb67a4d6df24 Author: Christian König Date: Thu Aug 31 10:46:20 2017 +0200 drm/amdgpu: fix new PD update code for Vega10 v2 We need to refer to the parent instead of the root BO for multi level page tables on Vega10. Also don't set the PDE_PTE bit. v2: Don't set the PDE_PTE bit either. Signed-off-by: Christian König Reviewed-and-Tested-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 705e519e0ef1d1824c28ced3b1857a8608853dfb Author: Christian König Date: Thu Jun 8 11:15:16 2017 +0200 drm/amdgpu: move hw generation check into amdgpu_doorbell_init v2 This way we can safely call it on SI as well. v2: fix type in commit message Signed-off-by: Christian König Reviewed-by: Andy Shevchenko Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 570144c6522f5f332635d20dfa278cfcc764229c Author: Christian König Date: Wed Aug 30 15:38:45 2017 +0200 drm/amdgpu: cleanup the VM code a bit more The src isn't used any more after GART hack removal. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) commit ea09729c930223edf492d0ca647c27e7eb0ccb12 Author: Christian König Date: Wed Aug 9 14:15:46 2017 +0200 drm/amdgpu: rework page directory filling v2 Keep track off relocated PDs/PTs instead of walking and checking all PDs. v2: fix root PD handling Signed-off-by: Christian König Reviewed-by: Alex Deucher (v1) Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 89 +++++++++++++++++++++++----------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 ++ 2 files changed, 63 insertions(+), 29 deletions(-) commit 5fcf34b1c58ea3e341a24c18759b000c38529ed5 Author: Rodrigo Vivi Date: Thu Aug 31 07:53:56 2017 -0700 drm/i915/cnl: Fix DP max voltage On clock recovery this function is called to find out the max voltage swing level that we could go. However gen 9 functions use the old buffer translation tables to figure that out. That table is not valid for CNL causing an invalid number of entries and an invalid selection on the max voltage swing level. v2: Let's use same approach that previous platforms. v3: Actually use n_entries and avoid duplicated -1. v4: Avoid cnl_max_level and use current style. Cc: Ville Syrjälä Cc: Clint Taylor Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170831145356.15932-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_ddi.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit bf50355645790a385b9ff04f33dea6b316c0dc31 Author: Rodrigo Vivi Date: Tue Aug 29 16:22:29 2017 -0700 drm/i915/cnl: Fix DDI hdmi level selection. Let's get a proper HDMI DDI entry level for vswing programming sequences on CNL. Spec doesn't specify any default for HDMI tables, so let's pick the last entry as the default for now. Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170829232230.23051-7-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_ddi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit cf3e0fb48cdb62d6b30ec88eddcbfa82eb3e976a Author: Rodrigo Vivi Date: Tue Aug 29 16:22:28 2017 -0700 drm/i915/cnl: Move ddi buf trans related functions up. No functional changes. But those functions will be needed to get max level for HDMI and DP, so let's move those up closer to other similar functions existent for previous platforms. Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170829232230.23051-6-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_ddi.c | 122 +++++++++++++++++++-------------------- 1 file changed, 61 insertions(+), 61 deletions(-) commit cc9cabfdec38d09e6f6a7f750b67043fbfa2eb31 Author: Rodrigo Vivi Date: Tue Aug 29 16:22:27 2017 -0700 drm/i915/cnl: Move voltage check into ddi buf trans functions. Let's start converging CNL buf translations to same style used on previous platforms. So first thing is to use the standard signature so we don't need to propagate the voltage check into other parts of the code, but only on the parts that it is really useful. Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170829232230.23051-5-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_ddi.c | 48 ++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 27 deletions(-) commit 381f957044d0618e52fe47b0af4de54cdccad893 Author: Rodrigo Vivi Date: Tue Aug 29 16:22:26 2017 -0700 drm/i915: Enable voltage swing before enabling DDI_BUF_CTL. Sequences for DisplayPort asks us to " Configure voltage swing and related IO settings. Refer to DDI Buffer section." before "Configure and enable DDI_BUF_CTL" On BXT and CNL this means to execute the ddi vswing sequences. At this point these sequences calls are getting duplicated for DP because they are all called from DP link trainning sequences. However this patch is not yet removing it before a futher discussion since spec also allows that during link training without disabling anything: " Notes Changing voltage swing during link training: Change the swing setting following the DDI Buffer section. The port does not need to be disabled. " Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170829232230.23051-4-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_ddi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2f7460a75aa44a5cfbc9fcfa2a33b6929ecf2263 Author: Rodrigo Vivi Date: Tue Aug 29 16:22:25 2017 -0700 drm/i915: Align vswing sequences with old ddi buffer registers. Vswing sequences on BXT and CNL are equivalent to the ddi buffer registers setting on other platforms. For some reason it got aligned with skl_ddi_set_iboost what is semantically incorrect. This forced us to keep skipping ddi buffer translation tables on the platforms that has the vswing sequences. v2: Don't mess with DP signal levels on this patch. Cc: Vandana Kannan Cc: Imre Deak Cc: Ville Syrjälä Cc: Ander Conselvan de Oliveira Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170829232230.23051-3-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_ddi.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit d509af6c85bb711f6299043cf43001ab1cdffd62 Author: Rodrigo Vivi Date: Tue Aug 29 16:22:24 2017 -0700 drm/i915: decouple gen9 and gen10 dp signal levels. Let's decouple bxt, glk and cnl dp signal levels from other DDIs to avoid confusion. No functional change. Only a reorg to avoid messing with currently working DP signal levels when moving voltage swing sequences around to match spec. v2: ddi_signal_levels is also called from other ddi platforms, so don't remove IS_GEN9_BC check from skl_ddi_set_iboos. (Ville). Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170829232230.23051-2-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_ddi.c | 27 ++++++++++++++++++--------- drivers/gpu/drm/i915/intel_dp.c | 10 ++++------ drivers/gpu/drm/i915/intel_drv.h | 1 + 3 files changed, 23 insertions(+), 15 deletions(-) commit 1b6e2fd2896a707ccb480939d127c621308d403e Author: Rodrigo Vivi Date: Tue Aug 29 16:22:23 2017 -0700 drm/i915: Introduce intel_ddi_dp_level. No functional changes. This only moves the DP level selection to a separated function that will be later used to organize better the vswing sequences. Cc: Ville Syrjälä Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170829232230.23051-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_ddi.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 385db982b277a1eb5998b6316a500a2d6d9592b1 Author: Rodrigo Vivi Date: Tue Aug 29 16:09:07 2017 -0700 drm/i915/cnl: Avoid ioremap_wc on Cannonlake as well. Driver’s CPU access to GTT is via the GTTMMADR BAR. The current HW implementation of that BAR is to only support <= DW (and maybe QW) writes—not 16/32/64B writes that could occur with WC and/or SSE/AVX moves. GTTMMADR must be marked uncacheable (UC). Accesses to GTTMMADR(GTT), must be 64 bits or less (ie. 1 GTT entry). v2: Get clarification on the reasons and spec is getting updated to reflect it now. Cc: Joonas Lahtinen Suggested-by: Ben Widawsky Signed-off-by: Rodrigo Vivi Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170829230907.21363-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 27eae9d4b9d4cd9c204ef81f46078d91362ed41c Author: Ravikumar Kattekola Date: Thu Aug 31 15:48:45 2017 +0530 regulator: pbias: Select voltage table based on max-voltage Reference manuals of OMAP5x and DRA7x have been updated to reflect the PBIAS regulator max-voltage as 3.3V instead of 3.0V, while OMAP3x and OMAP4x are still quoting 3.0V. So, as of now, the pbias driver needs to support both 3.0V and 3.3V IO voltage based on the max-voltage supported by the PBIAS regulator. Document reference: SWPU249AF - OMAP543x Technical reference manual - August 2016 SPRUI30C – DRA75x, DRA74x Technical reference manual November 2016 Tested on: DRA75x PG 2.0 REV H EVM Signed-off-by: Ravikumar Kattekola Signed-off-by: Sekhar Nori Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Mark Brown drivers/regulator/pbias-regulator.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 3ea0bf377903981bd77d71d97200f96793bbbef2 Author: Himanshu Jha Date: Wed Aug 30 18:55:56 2017 +0530 drm/gma500: Remove null check before kfree kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1504099556-3887-1-git-send-email-himanshujha199640@gmail.com drivers/gpu/drm/gma500/cdv_intel_dp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 86ebb015fa744dd1e265c9b45ade870ac859a4d5 Author: Rodrigo Vivi Date: Tue Aug 29 16:07:51 2017 -0700 drm/i915/cnl: WaDisableI2mCycleOnWRPort On CNL B0 stepping GAM is not able to detect some deadlock condition and then rise the rise the gam_coh_flush. WA database and spec both mentions to set 4AB8[24]=1 as workaround. Although register offset 0x4AB8 is not documented for any platform. References: HSD#1945815, BSID#1112 Cc: Mika Kuoppala Signed-off-by: Rodrigo Vivi Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20170829230751.21047-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_engine_cs.c | 5 +++++ 2 files changed, 6 insertions(+) commit 392572feb01c03c9db2f73993bdbff2b5ed45c38 Author: Rodrigo Vivi Date: Tue Aug 29 16:07:23 2017 -0700 drm/i915/cnl: WA FtrEnableFastAnisoL1BankingFix WA to enable HW L1 Banking fix that allows aniso to operate at full sample rate. References: HSD#1937670 Cc: Mika Kuoppala Cc: Oscar Mateo Cc: Ben Widawsky Cc: Anuj Phogat Signed-off-by: Rodrigo Vivi Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20170829230723.20898-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++ 2 files changed, 4 insertions(+) commit 91200c09d38bbc959671b91f5801d1016b409969 Author: Rodrigo Vivi Date: Mon Aug 28 22:20:26 2017 -0700 drm/i915: Stop using long platform names on clock gating functions. No functional changes. Our code was only a bit messy with mixed style there so let's clean up a bit using the short codenames for the platforms. Cc: Dhinakaran Pandiyan Signed-off-by: Rodrigo Vivi Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170829052026.15038-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_pm.c | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 2ec4cf4057fcb98cb4cabdd57fa12357e438ae98 Author: Ville Syrjälä Date: Thu Aug 24 22:10:50 2017 +0300 drm/i915: Skip fence alignemnt check for the CCS plane The CCS won't have the same stride as the main surface anyway so trying to guard against the fence stride not matching the CCS stride is not sensible. Just skip the fence vs. fb alignment check for the aux plane. Cc: Ben Widawsky Cc: Jason Ekstrand Cc: Daniel Stone Link: https://patchwork.freedesktop.org/patch/msgid/20170824191100.10949-3-ville.syrjala@linux.intel.com Reviewed-by: Ben Widawsky Fixes: 2e2adb05736c ("drm/i915: Add render decompression support") Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 303ba6955499ef757ca5ddcc816e370cc7581cb5 Author: Ville Syrjälä Date: Thu Aug 24 22:10:49 2017 +0300 drm/i915: Treat fb->offsets[] as a raw byte offset instead of a linear offset Userspace wants to treat fb->offsets[] as raw byte offsets into the gem bo. Adjust the kernel code to match. Cc: Ben Widawsky Cc: Jason Ekstrand Cc: Daniel Stone Link: https://patchwork.freedesktop.org/patch/msgid/20170824191100.10949-2-ville.syrjala@linux.intel.com Acked-by: Ben Widawsky Fixes: 2e2adb05736c ("drm/i915: Add render decompression support") Signed-off-by: Ville Syrjälä drivers/gpu/drm/i915/intel_display.c | 108 +++++++++++++++++++++-------------- 1 file changed, 64 insertions(+), 44 deletions(-) commit b69a784f5e2308d6360a76eceae450e96751f3e4 Author: Chris Wilson Date: Tue Aug 29 20:25:46 2017 +0100 drm/i915: Always wake the device to flush the GTT Since we hold the device wakeref when writing through the GTT (otherwise the writes would fail), we presumed that before the device sleeps those writes would naturally be flushed and that we wouldn't need our mmio read trick. However, that presumption seems false and a sleepy bxt seems to require us to always manually flush the GTT writes prior to direct access. Fixes: e2a2aa36a509 ("drm/i915: Check we have an wake device before flushing GTT writes") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170829192546.1087-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_gem.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit b07b9146635e90b72551bc8992eb85ecbaa0e593 Author: Rodrigo Vivi Date: Fri Aug 25 13:16:12 2017 -0700 drm/tve200: Pass NULL format_modifier to drm_simple_display_pipe_init This Fixes build on branches where we already have format-modifier. Reference: https://lists.freedesktop.org/archives/dri-devel/2017-August/151044.html Fixes: 179c02fe90a4 ("drm/tve200: Add new driver for TVE200") Cc: Linus Walleij Cc: Janet Morgan Cc: Ben Widawsky Cc: Daniel Stone (v2) Cc: Liviu Dudau Cc: Daniel Stone Signed-off-by: Rodrigo Vivi Reviewed-by: Daniel Stone Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170825201612.23056-1-rodrigo.vivi@intel.com drivers/gpu/drm/tve200/tve200_display.c | 1 + 1 file changed, 1 insertion(+) commit ebe02de2c60caa3ee5a1b39c7c8b2a40e1fda2d8 Author: Himanshu Jha Date: Tue Aug 29 18:42:27 2017 +0530 drm/amd/powerplay/hwmgr: Remove null check before kfree kfree on NULL pointer is a no-op and therefore checking is redundant. Reviewed-by: Harry Wentland Reviewed-by: Rex Zhu Reviewed-by: Christian König Signed-off-by: Himanshu Jha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 6 +- .../gpu/drm/amd/powerplay/hwmgr/processpptables.c | 96 ++++++++-------------- drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 44 ++++------ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 12 +-- 4 files changed, 53 insertions(+), 105 deletions(-) commit c5927537dd5706b17affa8aeea28c7b19c8fbb42 Author: Himanshu Jha Date: Tue Aug 29 18:51:27 2017 +0530 drm/amd: Remove null check before kfree Kfree on NULL pointer is a no-op and therefore checking is redundant. Reviewed-by: Christian König Signed-off-by: Himanshu Jha Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 6 ++---- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) commit 3f3333f8a0e90ac26f84ed7b0aa344efce695c08 Author: Christian König Date: Thu Aug 3 14:02:13 2017 +0200 drm/amdgpu: track evicted page tables v2 Instead of validating all page tables when one was evicted, track which one needs a validation. v2: simplify amdgpu_vm_ready as well Signed-off-by: Christian König Reviewed-by: Alex Deucher (v1) Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 227 +++++++++++++---------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 16 +- 5 files changed, 119 insertions(+), 141 deletions(-) commit 00b5cc83c443dcd351cb2b21055656e007992b54 Author: Christian König Date: Mon Aug 28 14:46:40 2017 +0200 drm/amdgpu: fix comment on amdgpu_bo_va Except for the reference count all other members are protected by the VM PD being reserved. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cb7b6ec2f8b8759b6b5beb4d17ea6984867a3296 Author: Christian König Date: Tue Aug 15 17:08:12 2017 +0200 drm/amdgpu: add bo_va cleared flag again v2 We changed this to use an extra list a while back, but for the next series I need a separate flag again. v2: reorder to avoid unlocked list access Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 35 +++++++++++------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 --- 3 files changed, 16 insertions(+), 25 deletions(-) commit 3d7d4d3a1b9f67c0caecf2b2aa8d7c347f074a33 Author: Christian König Date: Wed Aug 23 16:13:33 2017 +0200 drm/amdgpu: rework moved handling in the VM v2 Instead of using the vm_state use a separate flag to note that the BO was moved. v2: reorder patches to avoid temporary lockless access Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 13 ++++++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 +++ 2 files changed, 13 insertions(+), 3 deletions(-) commit 08cab989f77582cb19df12d4a75a91b68b0017f6 Author: Tom St Denis Date: Tue Aug 29 08:36:52 2017 -0400 drm/amd/amdgpu: Add write() method to VRAM debugfs entry (v2) Allows writing data to vram via debugfs. Signed-off-by: Tom St Denis Reviewed-by: Christian König (v2): Call get_user before holding spinlock. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 42 ++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) commit 841e3be124b58c6e86fe288bce4dfe58d5574fd3 Author: Rex Zhu Date: Fri Aug 25 16:58:10 2017 +0800 drm/amd/powerplay: notify smu once display changed on Rv. when User turn off display or screen idle timeout, smu need this message to start S0i2 entry. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 14 +++++++ drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 43 ++++++++++++---------- drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.h | 4 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 2 + 4 files changed, 43 insertions(+), 20 deletions(-) commit 3b4ca9e6494d19b152d1833fede533835e7b7c18 Author: Rex Zhu Date: Thu Aug 24 13:29:52 2017 +0800 drm/amd/powerplay: add dummy pp table for raven. (v2) As there is no PPTable in RV, it is difficult to cleanly decouple PPTABLE functionality in existing codes. v2: agd: squash in clean build fix Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/processpptables.c | 61 +++++++++++++++++----- 1 file changed, 49 insertions(+), 12 deletions(-) commit e154162ef75d9cc444f6107e1f6cca5efe8e9640 Author: Rex Zhu Date: Fri Aug 25 15:51:03 2017 +0800 drm/amd/powerplay: refine pp code for raven delete useless code. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 135 +++---------------------- 1 file changed, 16 insertions(+), 119 deletions(-) commit ffe6d881e99413f3ebdfebf99570c2e840879e68 Author: Alex Deucher Date: Fri Aug 18 23:52:37 2017 -0400 drm/amdgpu/gfx9: adjust mqd allocation size To allocate additional space for the dynamic cu masks. Confirmed with the hw team that we only need 1 dword for the mask. The mask is the same for each SE so you only need 1 dword. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 25 ++++++++++++++++++------- drivers/gpu/drm/amd/include/v9_structs.h | 8 ++++++++ 2 files changed, 26 insertions(+), 7 deletions(-) commit 29696bd680f196f52c6d5eedc4da4ef0482d8bb9 Author: Alex Deucher Date: Fri Aug 18 23:36:08 2017 -0400 drm/amdgpu/gfx9: update mqd to include dynamic CU mask Necessary for proper operation with KIQ. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/v9_structs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 31bf29ab398be98891cc139ca6170575b973fa0d Author: Alex Deucher Date: Thu Aug 24 16:47:15 2017 -0400 drm/amdgpu/gfx8: drop cz mqd It was unused and according to hw team, it's the same for all asics in a gfx family so remove it. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/vi_structs.h | 259 ------------------------------- 1 file changed, 259 deletions(-) commit 925d5d798f465671c6b8011e80c636da46ef1a16 Author: Alex Deucher Date: Thu Aug 24 16:46:29 2017 -0400 drm/amdgpu/gfx8: apply dynamic cu mask to APUs as well Confirmed with the hw team. It's the same for all asics. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit ecf9d3448540830d2cd2fadd0cf70f236d1c5c6a Author: Alex Deucher Date: Thu Aug 24 16:04:50 2017 -0400 drm/amdgpu/powerplay/vega10: fix typo in register base index Probably a copy pasta. No functional difference, both have the same value. Reviewed-by: Felix Kuehling Reported-by: Michael von Khurja Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ac7defb5ccf2c5e7b3fc9eb648535f3b3d17bc0 Author: Christian König Date: Wed Aug 23 20:11:25 2017 +0200 drm/amdgpu: cleanup GWS, GDS and OA allocation Those are certainly not kernel allocations, instead set the NO_CPU_ACCESS flag. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 34d7be5dc28041b95254da517fd0f0f740544ece Author: Christian König Date: Thu Aug 24 12:32:55 2017 +0200 drm/amdgpu: fix and cleanup VM ready check Stop checking the mapped BO itself, cause that one is certainly not a page table. Additional to that move the code into amdgpu_vm.c Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 33 ++------------------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 32 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 1 + 3 files changed, 35 insertions(+), 31 deletions(-) commit 87f64a76b38acaa081b2bc46c3169884b9ccd6f2 Author: Christian König Date: Wed Aug 23 14:05:48 2017 +0200 drm/amdgpu: fix amdgpu_vm_bo_map trace point That somehow got lost. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 ++ 1 file changed, 2 insertions(+) commit 5b41d94cc409610aa74b320b57a436df05a23f0f Author: Kent Russell Date: Tue Aug 22 12:31:43 2017 -0400 drm/amdgpu: Move VBIOS version to sysfs sysfs is more stable, and doesn't require root to access Signed-off-by: Kent Russell Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 54 +++++++++++++----------------- 1 file changed, 23 insertions(+), 31 deletions(-) commit db95e2185523ee9d46a13ceee37bffe8442d2e1c Author: Kent Russell Date: Tue Aug 22 12:31:43 2017 -0400 drm/amdgpu: Add debugfs file for VBIOS and version Add 2 debugfs files, one that contains the VBIOS version, and one that contains the VBIOS itself. These won't change after initialization, so we can add the VBIOS version when we parse the atombios information. This ensures that we can find out the VBIOS version, even when the dmesg buffer fills up, and makes it easier to associate which VBIOS version is for which GPU on mGPU configurations. Set the size to 20 characters in case of some weird VBIOS version that exceeds the expected 17 character format (3-8-3\0). The VBIOS dump also allows for easy debugging v2: Move to debugfs, clarify commit message, add VBIOS dump file Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 62 ++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/atom.c | 5 ++- drivers/gpu/drm/amd/amdgpu/atom.h | 1 + 3 files changed, 67 insertions(+), 1 deletion(-) commit 96bec198352799794b0f8937620e811ef8b9fa22 Author: Tom St Denis Date: Thu Aug 24 06:46:39 2017 -0400 drm/ttm: Remove needless 'extern' on functions in header. Minor tidy up. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher include/drm/ttm/ttm_page_alloc.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f7871fd19389c5f64f625a4389675d0740f0dfe4 Author: Tom St Denis Date: Fri Aug 18 10:06:34 2017 -0400 drm/radeon: use new TTM populate/dma map helper functions Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_ttm.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) commit 7405e0dad4c75b33976ddd997513635d7a0204b1 Author: Tom St Denis Date: Fri Aug 18 10:05:48 2017 -0400 drm/amd/amdgpu: Use new TTM populate/map helper function Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) commit a4dec819c8bba6365eb893a4ca88db4dd1210110 Author: Tom St Denis Date: Fri Aug 18 10:04:57 2017 -0400 drm/ttm: Add helper functions to populate/map in one call (v2) These functions replace a section of common code found in radeon/amdgpu drivers (and possibly others) as part of the ttm_tt_*populate() callbacks. v2: squash in fix for sw iommu from Tom Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_page_alloc.c | 41 ++++++++++++++++++++++++++++++++++++ include/drm/ttm/ttm_page_alloc.h | 21 ++++++++++++++++++ 2 files changed, 62 insertions(+) commit e719d5169f75ead3c05329b4125afb67b4f33eba Author: Harry Wentland Date: Mon Aug 21 15:43:32 2017 -0400 drm/amd/include: Add hdmi_redriver_set to atomfirmware We'll need this for a some upcoming display changes Signed-off-by: Harry Wentland Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/atomfirmware.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit ca3670aa370e3cd01020decb308a0a5ddf193183 Author: Tom St Denis Date: Wed Aug 23 15:33:40 2017 -0400 drm/amd/amdgpu: Remove AMDGPU tracepoint and use new TTM tracepoint (v2) Switches the AMDGPU driver over to the TTM tracepoint and removes our old one. Now you can enable traces before loading the module and trace all mappings. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher (v2): Use struct device instead of pci in trace. drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 56 ------------------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 21 ++---------- 2 files changed, 3 insertions(+), 74 deletions(-) commit a92e145059cb883155a24a2d3ac33296d33d9df7 Author: Tom St Denis Date: Wed Aug 23 15:17:47 2017 -0400 drm/ttm: Add DMA map/unmap tracepoint (v3) Also exports two functions that vendor drivers can call to trace DMA mappings. This is meant to help translate IOMMU mappings of bus addresses back to physical pages. Used by the umr amdgpu debugger for instance. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher (v2): Use dev_name() to get PCI path instead. (v3): Use correct types for dma/phys addresses drivers/gpu/drm/ttm/Makefile | 3 +- drivers/gpu/drm/ttm/ttm_debug.c | 74 +++++++++++++++++++++++++++++ drivers/gpu/drm/ttm/ttm_trace.h | 87 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/ttm/ttm_tracepoints.c | 45 ++++++++++++++++++ include/drm/ttm/ttm_debug.h | 31 +++++++++++++ 5 files changed, 239 insertions(+), 1 deletion(-) commit 727030b0c6322b127b524dab1fbbe55a441a54b9 Author: Evan Quan Date: Fri Aug 18 16:46:47 2017 +0800 drm/amdgpu: support polaris10/11/12 new cp firmwares Newer versions of the CP firmware require changes in how the driver initializes the hw block. Change the firmware name for new firmware to maintain compatibility with older kernels. Acked-by: Christian König Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 65 +++++++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 10 deletions(-) commit fd4b5f54e1afae4717ed716c8fdd72cb531f808b Author: Colin Ian King Date: Wed Aug 23 14:17:40 2017 +0100 drm/amdgpu: remove duplicate return statement Remove a redundant identical return statement, it has no use. Detected by CoverityScan, CID#1454586 ("Structurally dead code") Reviewed-by: Felix Kuehling Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 1 - 1 file changed, 1 deletion(-) commit 06f10a537ec1d5fe68dc889a9a5d11afa49e6e0d Author: Christophe JAILLET Date: Wed Aug 23 07:52:36 2017 +0200 drm/amdgpu: check memory allocation failure Check memory allocation failure and return -ENOMEM in such a case. 'num_post_dep_syncobjs' still has to be set to 0 before the test in order to have it initialized if 'amdgpu_cs_parser_fini()' is called to free resources. The calling graph would be, in such a case! failure in amdgpu_cs_process_syncobj_out_dep() ---> error code returned by amdgpu_cs_dependencies() --> amdgpu_cs_parser_fini() is called Reviewed-by: Christian König Signed-off-by: Christophe JAILLET Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 +++ 1 file changed, 3 insertions(+) commit a3ce364558faa12c4f25466dfc89eb3146b8063c Author: Roger He Date: Thu Aug 24 14:57:57 2017 +0800 drm/amd/amdgpu: fix BANK_SELECT on Vega10 (v2) BANK_SELECT should always be FRAGMENT_SIZE + 3 due to 8-entry (2^3) per cache line in L2 TLB for Vega10. v2: agd: fix warning Reviewed-by: Christian König Signed-off-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 5 ++--- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) commit 1cacc86a63abda5ff94a405765ca06b1c3a4031d Author: Christian König Date: Tue Aug 22 21:04:47 2017 +0200 drm/amdgpu: inline amdgpu_ttm_do_bind again The function is called only once and doesn't do anything special. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 45 +++++++++++++-------------------- 1 file changed, 18 insertions(+), 27 deletions(-) commit 9b0655e3adb6f741b79ce8758f77bf9e08e58243 Author: Christian König Date: Tue Aug 22 16:58:07 2017 +0200 drm/amdgpu: fix amdgpu_ttm_bind Use ttm_bo_mem_space instead of manually allocating GART space. This allows us to evict BOs when there isn't enought GART space any more. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 14 +++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 31 +++++++++++++++++++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 4 ---- 3 files changed, 30 insertions(+), 19 deletions(-) commit febb84a60304e7257d42b90cc191ef84279e5152 Author: Christian König Date: Tue Aug 22 12:50:46 2017 +0200 drm/amdgpu: remove the GART copy hack This isn't used since we don't map evicted BOs to GART any more. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Roger He Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) commit 172423bcc7654a9cc71ff208b8f797e5e11a08af Author: Monk Liu Date: Thu Aug 10 20:38:41 2017 +0800 drm/ttm:fix wrong decoding of bo_count we observe abnormal number from: /sys/devices/virtual/drm/amdttm/buffer_objects/bo_count bo_count is atomic_inc which is "int" type, shouldn't explicitly turn it to unsigned long. Signed-off-by: Monk Liu Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7e96a13523af12645b7e18d7cc268a95b72ff026 Author: Monk Liu Date: Fri Aug 11 13:50:51 2017 +0800 drm/ttm: fix missing inc bo_count Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/ttm/ttm_bo_util.c | 1 + 1 file changed, 1 insertion(+) commit b249e18df151c9627af808321a8090c0b8d4d834 Author: Alex Deucher Date: Tue Aug 22 16:39:30 2017 -0400 drm/amdgpu: set sched_hw_submission higher for KIQ (v3) KIQ doesn't really use the GPU scheduler. The base drivers generally use the KIQ ring directly rather than submitting IBs. However, amdgpu_sched_hw_submission (which defaults to 2) limits the number of outstanding fences to 2. KFD uses the KIQ for TLB flushes and the 2 fence limit hurts performance when there are several KFD processes running. v2: move some expressions to one line change KIQ sched_hw_submission to at least 16 v3: bump to 256 Reviewed-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit c3db7b5a5591ede54fad5a4f5ea45f298e5d3470 Author: Alex Deucher Date: Tue Aug 22 13:06:30 2017 -0400 drm/amdgpu: move default gart size setting into gmc modules Move the asic specific code into the IP modules. Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 52 -------------------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.h | 1 - drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 19 +++++++++++- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 22 +++++++++++++- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 21 ++++++++++++- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 16 +++++++++- 6 files changed, 74 insertions(+), 57 deletions(-) commit a4da14cc6266a8b77e897750390cd4afe0e52344 Author: Alex Deucher Date: Tue Aug 22 12:21:07 2017 -0400 drm/amdgpu: refine default gart size Be more explicit and add comments explaining each case. Also s/gart/GART/ in the parameter string as per Felix' suggestion. Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 38 +++++++++++++++++++++++++++----- 2 files changed, 33 insertions(+), 7 deletions(-) commit 84d43463a2d09c28c9222fbb7d1082c078e2523a Author: Evan Quan Date: Tue Aug 22 11:19:10 2017 +0800 drm/amd/powerplay: ACG frequency added in PPTable Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 11 ++++++++--- drivers/gpu/drm/amd/powerplay/inc/smu9_driver_if.h | 6 ++++-- 2 files changed, 12 insertions(+), 5 deletions(-) commit f0694d3b8a7069a69d9eff9609ed1f8daa17886f Author: Christian König Date: Mon Aug 21 14:27:51 2017 +0200 drm/amdgpu: discard commands of killed processes When a process is killed we shouldn't submit all waiting jobs, but instead clean up as fast as possible. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit cf273a59ca3068caced2adaf2deeb44d2013c8a9 Author: Christian König Date: Fri Aug 18 15:50:17 2017 +0200 drm/amdgpu: fix and cleanup shadow handling Set the shadow flag on the shadow and not the parent, always bind shadow BOs during allocation instead of manually, use the reservation_object wrappers to grab the lock. This fixes a couple of issues with binding the shadow BOs as well as correctly evicting them when memory becomes tight. Signed-off-by: Christian König Reviewed-by: Chunming Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ---- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 46 +++++++++++++++--------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ------ 3 files changed, 23 insertions(+), 37 deletions(-) commit 83e74db6a81daff277732bdd00b438ede2107c68 Author: Alex Deucher Date: Mon Aug 21 11:58:25 2017 -0400 drm/amdgpu: add automatic per asic settings for gart_size We need a larger gart for asics that do not support GPUVM on all engines (e.g., MM) to make sure we have enough space for all gtt buffers in physical mode. Change the default size based on the asic type. 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 | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 16 +++++++++++++++- 4 files changed, 20 insertions(+), 6 deletions(-) commit 2d6fb10565ca13e7a0f6f4725f1c3da5a99a2bcc Author: Alex Deucher Date: Fri Aug 18 23:39:52 2017 -0400 drm/amdgpu/gfx8: fix spelling typo in mqd allocation Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 12 ++++++------ drivers/gpu/drm/amd/include/vi_structs.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) commit 9dd73b1e89d7eb3f5c0a00aa264e473364ba1aa6 Author: Evan Quan Date: Thu Aug 17 15:25:04 2017 +0800 drm/amd/powerplay: unhalt mec after loading Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ddbb5313502f89fb41dbec209427f1a21f628441 Author: Emily Deng Date: Mon Aug 21 09:51:10 2017 +0800 drm/amdgpu/virtual_dce: Virtual display doesn't support disable vblank immediately For virtual display, it uses software timer to emulate the vsync interrupt, it doesn't have high precision, so doesn't support disable vblank immediately. BUG: SWDEV-129274 Signed-off-by: Emily Deng Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 38a8791aa7bfaa497e12e56b904a6b45986162d8 Author: Felix Kuehling Date: Thu Aug 17 16:37:49 2017 -0400 drm/amdgpu: Fix huge page updates with CPU Correctly detect system memory mappings when using CPU and don't use huge pages for them. Avoid incorrectly translating a physical page table GPU address when splitting a huge page while mapping system memory. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit fc692bd31bc9dd17c7cc59abdb514a58964fc2a7 Author: Chris Wilson Date: Sat Aug 26 12:09:35 2017 +0100 drm/i915: Discard the request queue if we fail to sleep before suspend If we fail to clear the outstanding request queue before suspending, mark those requests as lost. References: https://bugs.freedesktop.org/show_bug.cgi?id=102037 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170826110935.10237-3-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f36325f3789c1cf7f0d795ff180cade25ec3a586 Author: Chris Wilson Date: Sat Aug 26 12:09:34 2017 +0100 drm/i915: Clear wedged status upon resume When we wake up from suspend, the device has been powered down and should come back afresh. We should be able to safely remove the wedged status from the previous session and start afresh. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170826110935.10237-2-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 6 ++++++ 1 file changed, 6 insertions(+) commit cad9946c2a4375386062131858881cfd30fc1b8f Author: Chris Wilson Date: Sat Aug 26 12:09:33 2017 +0100 drm/i915: Always sanity check engine state upon idling When we do a locked idle we know that afterwards all requests have been completed and the engines have been cleared of tasks. For whatever reason, this doesn't always happen and we may go into a suspend with ELSP still full, and this causes an issue upon resume as we get very, very confused. If the engines refuse to idle, mark the device as wedged. In the process we get rid of the maybe unused open-coded version of wait_for_engines reported by Nick Desaulniers and Matthias Kaehlcke. v2: Suppress the -EIO before suspend, but keep it for seqno wrap. References: https://bugs.freedesktop.org/show_bug.cgi?id=101891 References: https://bugs.freedesktop.org/show_bug.cgi?id=102456 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Cc: Matthias Kaehlcke Link: https://patchwork.freedesktop.org/patch/msgid/20170826110935.10237-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen Reviewed-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) commit 3dbf26ed7b9b40a8cb008ab9ad25703363af815d Author: Chris Wilson Date: Sat Aug 26 14:56:20 2017 +0100 drm/i915: Don't use GPU relocations prior to cmdparser stalls If we are using the cmdparser, we will have to copy the batch and so stall for the relocations. Rather than prolong that stall by adding more relocation requests, just use CPU relocations and do the stall upfront. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170826135620.25949-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_gem_execbuffer.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit a575c6761757232ea2c7dc9f370640754b90cc69 Author: Chris Wilson Date: Mon Aug 28 11:46:31 2017 +0100 drm/i915: Recreate vmapping even when the object is pinned Sometimes we know we are the only user of the bo, but since we take a protective pin_pages early on, an attempt to change the vmap on the object is denied because it is busy. i915_gem_object_pin_map() cannot tell from our single pin_count if the operation is safe. Instead we must pass that information down from the caller in the manner of I915_MAP_OVERRIDE. This issue has existed from the introduction of the mapping, but was never noticed as the only place where this conflict might happen is for cached kernel buffers (such as allocated by i915_gem_batch_pool_get()). Until recently there was only a single user (the cmdparser) so no conflicts ever occurred. However, we now use it to allocate batches for different operations (using MAP_WC on !llc for writes) in addition to the existing shadow batch (using MAP_WB for reads). We could either keep both mappings cached, or use a different write mechanism if we detect a MAP_WB already exists (i.e. clflush afterwards), but as we haven't seen this issue in the wild (it requires hitting the GPU reloc path in addition to the cmdparser) for simplicity just allow the mappings to be recreated. v2: Include the i915_MAP_OVERRIDE bit in the enum so the compiler knows about all the valid values. Fixes: 7dd4f6729f92 ("drm/i915: Async GPU relocation processing") Testcase: igt/gem_lut_handle # byt, completely by accident Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170828104631.8606-1-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen drivers/gpu/drm/i915/i915_cmd_parser.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/i915_gem.c | 7 ++++++- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 +++- 4 files changed, 13 insertions(+), 3 deletions(-) commit 942d5d0dc4d4ac7245fe8302960b963eb185ad61 Author: Chris Wilson Date: Mon Aug 28 11:46:04 2017 +0100 drm/i915: Remove excess indent in intel_finish_reset() caught by sparse CHECK drivers/gpu/drm/i915/intel_display.c drivers/gpu/drm/i915/intel_display.c:3753 intel_finish_reset() warn: inconsistent indenting Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170828104604.8552-1-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 89fd2576cba4bacd1a1a8738313a913d4ca95855 Author: Dan Carpenter Date: Fri Aug 25 11:18:39 2017 +0300 RDMA/qedr: Missing error code in qedr_init_user_queue() We should return -ENOMEM if the kzalloc() fails. We currently return success. Fixes: 69ad0e7fe845 ("RDMA/qedr: Add support for iWARP in user space") Signed-off-by: Dan Carpenter Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/verbs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 8bd719587d1215dad42d48d725eb1858987112c8 Author: Marta Lofstedt Date: Mon Aug 28 15:18:10 2017 +0300 drm/i915: Beef up of Beef up the IPS vs. CRC workaround Commit 6e644626945c ("drm/i915: Beef up the IPS vs. CRC workaround") was supposed to solve below bug. However, the patch I tested is not the same as the one that got merged. With this addition the test pass. V2: removed unused: "struct intel_crtc *intel_crtc" Fixes: 6e644626945c ("drm/i915: Beef up the IPS vs. CRC workaround") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101664 Signed-off-by: Marta Lofstedt Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170828121810.13112-1-marta.lofstedt@intel.com drivers/gpu/drm/i915/intel_pipe_crc.c | 3 --- 1 file changed, 3 deletions(-) commit 058727ee8d9ae464b02f8cf0eaef7482b8d894c3 Author: Jani Nikula Date: Fri Aug 25 17:11:23 2017 +0300 drm/i915/bios: amend edp block based on intel_vbt_decode Copy over some fields defined in the intel_vbt_decode tool. No functional changes. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/8a42f0e4d1bba2679e9cd78da1e31b66133d562f.1503670197.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 4 ++-- drivers/gpu/drm/i915/intel_vbt_defs.h | 25 ++++++++++++++++++++----- 2 files changed, 22 insertions(+), 7 deletions(-) commit b7c7c3ea4dbcf52993f4f98c6013f2133dcb993d Author: Jani Nikula Date: Fri Aug 25 17:11:22 2017 +0300 drm/i915/bios: amend child device flags based on intel_vbt_decode Copy over some fields defined in the intel_vbt_decode tool. No functional changes. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/bce6907fa24d80643b33d58091d7675ff3b4f30e.1503670197.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_vbt_defs.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit e445dd18d4e8202b9f26e1e668ef81a7c08554df Author: Jani Nikula Date: Fri Aug 25 17:11:21 2017 +0300 drm/i915/bios: amend bdb_general_features Copy over some fields defined in the intel_vbt_tool. No functional changes. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/884cf56c019999a2c826da7e50a5fbf1aec5146b.1503670197.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_vbt_defs.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit f22bb35856ba1e115dea21b0effb050945838ffb Author: Jani Nikula Date: Fri Aug 25 17:11:20 2017 +0300 drm/i915/bios: split up iboost to hdmi and dp bitfields This is according to the style all over the place. No functional changes. Cc: Ville Syrjälä Suggested-by: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/cf5f0e5d10851db3796e632836d23551f59cc412.1503670197.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 4 ++-- drivers/gpu/drm/i915/intel_vbt_defs.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) commit dd23d3adcf030c8a0668934a4bffadcc849ac495 Author: Noralf Trønnes Date: Sun Aug 13 15:32:04 2017 +0200 drm/zte: Use drm_gem_fb_create() drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Shawn Guo Signed-off-by: Noralf Trønnes Acked-by: Shawn Guo Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-22-git-send-email-noralf@tronnes.org drivers/gpu/drm/zte/zx_drm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 80cad29f442a9f87930efa172a2811e0f6580b02 Author: Noralf Trønnes Date: Sun Aug 13 15:31:59 2017 +0200 drm/sti: Use drm_gem_fb_create() drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Benjamin Gaignard Cc: Vincent Abriou Signed-off-by: Noralf Trønnes Acked-by: Vincent Abriou Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-17-git-send-email-noralf@tronnes.org drivers/gpu/drm/sti/sti_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2a6f713974aa11d5d4b4351e637eda58af97e08e Author: Noralf Trønnes Date: Sun Aug 13 15:31:50 2017 +0200 drm/atmel-hlcdc: Use drm_gem_fb_create() drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Boris Brezillon Signed-off-by: Noralf Trønnes Acked-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-8-git-send-email-noralf@tronnes.org drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 2 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 783f7d9733eab5d9d3ed723569afd36fa8bc1e98 Author: Noralf Trønnes Date: Sun Aug 13 15:31:49 2017 +0200 drm/arm/mali: Use drm_gem_fb_create() drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Liviu Dudau Cc: Brian Starkey Signed-off-by: Noralf Trønnes Acked-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-7-git-send-email-noralf@tronnes.org drivers/gpu/drm/arm/malidp_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 39ffd906c4a27bef1c578c1ef2780a15f66ca0de Author: Noralf Trønnes Date: Sun Aug 13 15:31:48 2017 +0200 drm/arm/hdlcd: Use drm_gem_fb_create() drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Liviu Dudau Cc: Brian Starkey Signed-off-by: Noralf Trønnes Acked-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-6-git-send-email-noralf@tronnes.org drivers/gpu/drm/arm/hdlcd_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 908b6e6e8ab4c1e0c3783be4c4b437ac6fa374ea Author: Chris Wilson Date: Fri Aug 25 16:02:15 2017 +0100 drm/i915: Quietly cancel FBC activation if CRTC is turned off before worker Since we use a worker to enable FBC on the CRTC, it is possible for the CRTC to be switched off before we run. In this case, the CRTC will not allow us to wait upon a vblank, so remove the DRM_ERROR as this is very much expected. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102410 Fixes: ca18d51d77eb ("drm/i915/fbc: wait for a vblank instead of 50ms when enabling") Signed-off-by: Chris Wilson Cc: Paulo Zanoni Cc: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20170825150215.19236-1-chris@chris-wilson.co.uk Reviewed-by: Daniel Vetter drivers/gpu/drm/i915/intel_fbc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5654a1623c8717c40384b1b79251b4d9dd73b751 Author: Praveen Paneri Date: Fri Aug 11 00:00:33 2017 +0530 drm/i915: Fix FBC cfb stride programming for non X-tiled FB When FBC is enabled for linear, legacy Y-tiled and Yf-tiled surfaces on gen9, the cfb stride must be programmed by SW as cfb_stride = ceiling[(at least plane width in pixels)/ (32 * compression limit factor)] * 8 v2: Minor fix for a build error v3: Fixed subject, register name and platform check (Ville) v4: Added WA details in comment (Paulo) v5: - Read modified reg write to preserve other bit values (Paulo) - Store modified stride value in reg_params (Paulo) - Keep GLK out of the WA (Paulo) v6: - added additional field in reg_params for gen9_wa_cfb_stride (Paulo) - Used appropriate bit mask while writing the register (Paulo) v7 (from Paulo): - Fix coding style and spacing issues. - Mask the old values before writing. - Bikeshed comments and unnecessary checks. Signed-off-by: Praveen Paneri Signed-off-by: Paulo Zanoni Link: https://patchwork.freedesktop.org/patch/msgid/1502389833-32621-1-git-send-email-praveen.paneri@intel.com drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_reg.h | 4 ++++ drivers/gpu/drm/i915/intel_fbc.c | 17 +++++++++++++++++ 3 files changed, 22 insertions(+) commit dfbd4508326218d63e75715217a495adc0b4a454 Author: Paulo Zanoni Date: Fri Aug 25 16:40:04 2017 -0300 drm/i915/cnl: don't hardcode DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT We have the macro, use it. Makes the code a little easier to understand. Cc: Rodrigo Vivi Signed-off-by: Paulo Zanoni Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20170825194004.26571-1-paulo.r.zanoni@intel.com drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e192839e3e6366b82dc11789dc087738f291950e Author: Jani Nikula Date: Thu Aug 24 21:54:08 2017 +0300 drm/i915/bios: drop the rest of the p_ prefixes from pointers Not really kernel style, and sticks out like a sore thumb. No functional changes. Cc: Animesh Manna Cc: Paulo Zanoni Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/76b4f643e727bae39acd6f73d085f718eb012235.1503600621.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 84 +++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 43 deletions(-) commit 3e7c2fd705e57178409bcae5f517009de2559a1b Author: Jani Nikula Date: Thu Aug 24 21:54:07 2017 +0300 drm/i915/bios: throw away unused DVO_* macros Apparently meant to be additional DEVICE_PORT_* or DVO_PORT_* macros, but left unused at some point. Remove. No functional changes. Cc: Animesh Manna Cc: Paulo Zanoni Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/76a1b91bfe05e9e1c04d921b9c4364461f754905.1503600621.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_vbt_defs.h | 5 ----- 1 file changed, 5 deletions(-) commit 6a794c8a04c0a1208d880e2a73e21f7b2966b672 Author: Jani Nikula Date: Thu Aug 24 21:54:06 2017 +0300 drm/i915/bios: group device type definitions together No idea why some definitions were defined at a different place from the rest. Move them together. No functional changes. Cc: Animesh Manna Cc: Paulo Zanoni Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/6433a24240ef965f9c032e8f66fcce0ea33277ef.1503600621.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_vbt_defs.h | 103 +++++++++++++++++----------------- 1 file changed, 51 insertions(+), 52 deletions(-) commit fca36df51061154dbffddc1b685250503d48ba23 Author: Jani Nikula Date: Thu Aug 24 21:54:05 2017 +0300 drm/i915/bios: document child device config dvo_port values a bit better Move closer to child device config struct while at it. No functional changes. Cc: Animesh Manna Cc: Paulo Zanoni Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/abbad7b4a3f0c35d48844cc0950af3606e9a3142.1503600621.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_vbt_defs.h | 41 ++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 20 deletions(-) commit 21907e722b1dcec6fa6ec4c2a65bdc108b5f4b9c Author: Jani Nikula Date: Thu Aug 24 21:54:04 2017 +0300 drm/i915/bios: throw away struct old_child_dev_config The old_child_dev_config struct is no longer needed except for its size; replace with a macro. No functional change. Cc: Animesh Manna Cc: Paulo Zanoni Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/4bfa6e45fecd33af797ec218635504ec8a09f788.1503600621.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 7 +++---- drivers/gpu/drm/i915/intel_vbt_defs.h | 27 +-------------------------- 2 files changed, 4 insertions(+), 30 deletions(-) commit cc9985893aacc3d9ed10929b0095dfe527a58e5f Author: Jani Nikula Date: Thu Aug 24 21:54:03 2017 +0300 drm/i915/bios: throw away high level child device union All the child device config fields, including legacy, are now available in the same struct, so use it for everything. As this change touches plenty of code with "p_child", rename them to "child" while at it. Also do some simple unification and constification where not intrusive. This in the name of avoiding extra cleanup churn for the same lines as here. No functional changes. Cc: Animesh Manna Cc: Paulo Zanoni Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/103300a9ae8629624619fc8df2c533e745cc5a78.1503600621.git.jani.nikula@intel.com drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_bios.c | 119 ++++++++++++++++++---------------- drivers/gpu/drm/i915/intel_vbt_defs.h | 13 +--- 3 files changed, 65 insertions(+), 69 deletions(-) commit 56f304e9a974cec6f1d1615f0115712cf0ae1420 Author: Jani Nikula Date: Thu Aug 24 21:54:02 2017 +0300 drm/i915/bios: add legacy contents to common child device config Add legacy contents to common child device config, in preparation for using a single child device config. Use unions where BDB versions of the config differ. Use the naming from old_child_dev_config for legacy fields. No functional changes. Cc: Animesh Manna Cc: Paulo Zanoni Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/b606456da4d52f1aedf383aab4275d81013d3178.1503600621.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_vbt_defs.h | 101 +++++++++++++++++++++++----------- 1 file changed, 70 insertions(+), 31 deletions(-) commit d58107f984e26725b4e92063c53da5a4d8f7a02f Author: Jani Nikula Date: Thu Aug 24 21:54:01 2017 +0300 drm/i915/bios: remove the raw version of child device config Convert the only user of the raw field, switching to the recently added struct fields. No functional changes. Cc: Animesh Manna Cc: Paulo Zanoni Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/83e6a2058553a43e0d08a49df1f86821f38b206b.1503600621.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_bios.c | 2 +- drivers/gpu/drm/i915/intel_vbt_defs.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) commit ae276f56bb24e764fe95db61d62a422ca3f32150 Author: Jani Nikula Date: Thu Aug 24 21:54:00 2017 +0300 drm/i915/bios: document BDB versions of child device config fields Document everything that was introduced after version 155, which seems to be the baseline for some of the later documentation. No functional changes. Cc: Animesh Manna Cc: Paulo Zanoni Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/11e8200e750eea13604b2d21e56b37cd5e6d9ab0.1503600621.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_vbt_defs.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit f865f7e1c77914f32ee23cd3187ab75bd8307118 Author: Jani Nikula Date: Thu Aug 24 21:53:59 2017 +0300 drm/i915/bios: amend child device config parameters Add both some new and some old fields to child device config parameters. Prepare for switching to just one child device config. Use naming from struct old_child_dev_config for common fields. No functional changes. Cc: Animesh Manna Cc: Paulo Zanoni Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/bbf66c934eb5c655fd7dda6c1bb8f218c8edc209.1503600621.git.jani.nikula@intel.com drivers/gpu/drm/i915/intel_vbt_defs.h | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) commit 6e644626945c7c1a7f4d4f83b806b898297846d0 Author: Ville Syrjälä Date: Thu Aug 17 17:55:09 2017 +0300 drm/i915: Beef up the IPS vs. CRC workaround Oneshot disabling of IPS when CRC capturing is started is insufficient. IPS may get re-enabled by any plane update, and hence tests that keep CRC capturing on across plane updates will start to see inconsistent results as soon as IPS kicks back in. Add a new knob into the crtc state to make sure IPS stays disabled as long as CRC capturing is enabled. Forcing a modeset is the easiest way to handle this since that's already how we do the panel fitter workaround. It's a little heavy handed just for IPS, but seeing as we might already do the panel fitter workaround I think it's better to follow that. We migth want to optimize both cases later if someone gets too upset by the extra delay from the modeset. v2: Check the right thing when deciding whether to force a modeset v3: Rebase, check HAS_IPS before forcing a modeset, move ips_force_disable check into pipe_config_supports_ips() Cc: Paulo Zanoni Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Marta Lofstedt Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101664 Reviewed-by: Paulo Zanoni Tested-by: Marta Lofsted #v2 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170817145509.15549-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_display.c | 7 +++- drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_pipe_crc.c | 62 ++++++++++++++++------------------- 3 files changed, 36 insertions(+), 34 deletions(-) commit 3814fd77691c0b35acefc68d5af516f9d48a4281 Author: Oscar Mateo Date: Wed Aug 23 16:58:24 2017 -0700 drm/i915: Make some RPS functions static They are not used anywhere else. Also, fix a small typo in a comment. No functional changes. Cc: Sagar Arun Kamble Cc: Rodrigo Vivi Signed-off-by: Oscar Mateo Reviewed-by: Sagar Arun Kamble Signed-off-by: Oscar Mateo Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1503532705-3692-1-git-send-email-oscar.mateo@intel.com Link: https://patchwork.freedesktop.org/patch/msgid/1503532705-3692-1-git-send-email-oscar.mateo@intel.com drivers/gpu/drm/i915/i915_irq.c | 8 ++++---- drivers/gpu/drm/i915/intel_drv.h | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) commit 3ffff01749928ea5ffdae2cecad561898c3b0f71 Author: Chris Wilson Date: Tue Aug 22 12:05:17 2017 +0100 drm/i915: Ignore duplicate VMA stored within the per-object handle LUT By using drm_gem_flink/drm_gem_open on an object using the same fd, it is possible for a client to create multiple handles pointing to the same object (tied to the same contexts and VMA), as exemplified by igt::gem_handle_to_libdrm_bo(). Since this duplication has been possible since forever, we cannot assume that the handle:(fpriv, object) is unique and so must handle the multiple users of a single VMA. v2: Added commentary noise. Testcase: igt/gem_close Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102355 Fixes: d1b48c1e7184 ("drm/i915: Replace execbuf vma ht with an idr") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20170822110517.22277-3-chris@chris-wilson.co.uk Tested-by: Marta Lofstedt Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/i915_gem.c | 8 +++++++- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 1 + drivers/gpu/drm/i915/i915_vma.h | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) commit 67b48040255b77ea7d11e68e07c83e502308c65d Author: Chris Wilson Date: Tue Aug 22 12:05:16 2017 +0100 drm/i915: Assert that the handle->vma lut is empty on object close Make sure that we are not leaking an entry in the ctx->handles_lut by asserting that the object was removed prior to being freed. This should be enforced by all such handles being removed by i915_gem_close_object. Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170822110517.22277-2-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/i915_gem.c | 1 + 1 file changed, 1 insertion(+) commit 432295d7b906dae11129fc2870289465c907e5f2 Author: Chris Wilson Date: Tue Aug 22 12:05:15 2017 +0100 drm/i915: Assert the context is not closed on object-close During the context-close, we should be decoupling all the vma from the object so that upon object-closing we shouldn't see any vma from the already closed contexts. So include a check upon closing the object that the context is still open. v2: Eek, the fpriv check is required for shared objects. Double eek, BAT passed? Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20170822110517.22277-1-chris@chris-wilson.co.uk Reviewed-by: Michał Winiarski drivers/gpu/drm/i915/i915_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit acfb5554c769ad7e09b9e4e42b572cc297a728e9 Author: Rodrigo Vivi Date: Wed Aug 23 13:35:04 2017 -0700 drm/i915/cnl: WaForceContextSaveRestoreNonCoherent To avoid a potential hang condition with TLB invalidation we need to enable masked bit 5 of MMIO 0xE5F0 at boot. Same workaround was in place for previous platforms, but the register offset has changed for CNL. But also BSpec doesn't mention the bit 15 as set on gen9 platforms and mark bit as reserved on CNL. v2: Improve commit message accepting Oscar's suggestion. Cc: Mika Kuoppala Cc: Oscar Mateo Signed-off-by: Rodrigo Vivi Reviewed-by: Oscar Mateo Link: https://patchwork.freedesktop.org/patch/msgid/20170823203504.10012-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++++ 2 files changed, 5 insertions(+) commit 179c02fe90a4104d32e92a46b9ff4ecc32bf3647 Author: Linus Walleij Date: Sun Aug 20 12:05:55 2017 +0200 drm/tve200: Add new driver for TVE200 This adds a new DRM driver for the Faraday Technology TVE200 block. This "TV Encoder" encodes a ITU-T BT.656 stream and can be found in the StorLink SL3516 (later Cortina Systems CS3516) as well as the Grain Media GM8180. I do not have definitive word from anyone at Faraday that this IP block is theirs, but it bears the hallmark of their 3-digit version code (200) and is used in two SoCs from completely different companies. (Grain Media was fully owned by Faraday until it was transferred to NovoTek this january, and Faraday did lots of work on the StorLink SoCs.) The D-Link DIR-685 uses this in connection with the Ilitek ILI9322 panel driver that supports BT.656 input, while the GM8180 apparently has been used with the Cirrus Logic CS4954 digital video encoder. The oldest user seems to be something called Techwall 2835. This driver is heavily inspired by Eric Anholt's PL111 driver and therefore I have mentioned all the ancestor authors in the header file. Acked-by: Daniel Vetter Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20170820100557.24991-2-linus.walleij@linaro.org Documentation/gpu/index.rst | 1 + Documentation/gpu/tve200.rst | 6 + MAINTAINERS | 6 + drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/tve200/Kconfig | 15 ++ drivers/gpu/drm/tve200/Makefile | 5 + drivers/gpu/drm/tve200/tve200_connector.c | 125 +++++++++++ drivers/gpu/drm/tve200/tve200_display.c | 344 ++++++++++++++++++++++++++++++ drivers/gpu/drm/tve200/tve200_drm.h | 129 +++++++++++ drivers/gpu/drm/tve200/tve200_drv.c | 278 ++++++++++++++++++++++++ 11 files changed, 912 insertions(+) commit 8b17e80d9e4672c250114443b41cfe8908441857 Author: Linus Walleij Date: Sun Aug 20 12:05:54 2017 +0200 drm/tve200: Add DT bindings This adds device tree bindings for the Faraday TVE200 IP block. This IP block is present in the Gemini ARM SoC and also in some Grain Media GMxxxx SoCs. Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20170820100557.24991-1-linus.walleij@linaro.org .../devicetree/bindings/display/faraday,tve200.txt | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 2cbecff4122cedff329e3efa32c7f2266125c4a1 Author: Oscar Mateo Date: Wed Aug 23 12:56:31 2017 -0700 drm/i915/cnl: WaPushConstantDereferenceHoldDisable CS sometimes hangs on 3D Push Constant dispatches with the new deref enhancement logic in CNL. v2: Improve the commit message (Rodrigo) Cc: Mika Kuoppala Signed-off-by: Oscar Mateo Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/1503518191-19116-1-git-send-email-oscar.mateo@intel.com drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++ 2 files changed, 4 insertions(+) commit 371cadd8c48c8766ec3e3ca3e0d0a6261f2a8cc0 Author: Daniel Vetter Date: Fri Aug 18 19:43:28 2017 +0200 drm/doc: Document ioctl errno value patterns We're not super-consistent about these, but I think it's worth to document at least the commmon patterns. v2: - Add a not about ENOTTY (it's just a confusing name, but used exactly what it's meant for in DRM) (Chris). - Unconfuse the text for ENODEV (Daniel) - Move text undert the IOCTL heading (Chris). - typos Cc: Daniel Stone Cc: Joonas Lahtinen Cc: Chris Wilson Cc: "Zhang, Tina" Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170818174328.6386-1-daniel.vetter@ffwll.ch Documentation/gpu/drm-uapi.rst | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit 2a9e7f2f03d129f21f39b701f9086300608279fe Author: Jonathan Cameron Date: Sun Jul 23 17:26:20 2017 +0100 platform/x86: toshiba_acpi: drop assignment of iio_info.driver_module This is now handled by use of a macro for device registration. The field in iio_info will be going away shortly as it is no longer used. Cc: Signed-off-by: Jonathan Cameron Acked-by: Andy Shevchenko Acked-by: Azael Avalos Reviewed-by: Lars-Peter Clausen drivers/platform/x86/toshiba_acpi.c | 1 - 1 file changed, 1 deletion(-) commit 4749b0a28feddeaeffa8044cd3ae1711cc15c8da Author: Jonathan Cameron Date: Sun Jul 23 17:26:19 2017 +0100 input: tsc2007 - drop the driver_module assignment in iio interface. This is now handled via some macro magic during the register. The field in iio_info will be removed shortly. Cc: Linux Input Acked-by: Dmitry Torokhov Reviewed-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron drivers/input/touchscreen/tsc2007_iio.c | 1 - 1 file changed, 1 deletion(-) commit 57ba349720de3d7c38011d7dc5c45be1d9d93e65 Author: Jonathan Cameron Date: Sun Jul 23 17:26:18 2017 +0100 staging:iio:light:tsl2x7x drop assignment of driver_module The equivalent is now done via macro magic in the register call. Note this is the only case not found by the coccinelle script suggesting that perhaps that script needs to be a little more clever! Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/staging/iio/light/tsl2x7x.c | 5 ----- 1 file changed, 5 deletions(-) commit 247d41f1b78c9decd83e262d884fa96c1e4b39bf Author: Jonathan Cameron Date: Sun Jul 23 17:26:17 2017 +0100 staging:trigger: drop assignment of iio_trigger_ops.owner The equivalent of this is now done via macro magic when the relevant register call is made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/staging/iio/trigger/iio-trig-bfin-timer.c | 1 - 1 file changed, 1 deletion(-) commit 3762f8a0f3687d109b22e5a64f4a782e029de59d Author: Jonathan Cameron Date: Sun Jul 23 17:26:16 2017 +0100 iio:resolver: drop assignment of iio_info.driver_module The equivalent is now done via macro magic when the relevant register call is made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/staging/iio/resolver/ad2s1200.c | 1 - drivers/staging/iio/resolver/ad2s1210.c | 1 - drivers/staging/iio/resolver/ad2s90.c | 1 - 3 files changed, 3 deletions(-) commit 02272cb11b2ca6e8f77aa0ee42a24eb07f12157e Author: Jonathan Cameron Date: Sun Jul 23 17:26:15 2017 +0100 staging:iio:meter: drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/staging/iio/meter/ade7753.c | 1 - drivers/staging/iio/meter/ade7754.c | 1 - drivers/staging/iio/meter/ade7758_core.c | 1 - drivers/staging/iio/meter/ade7758_trigger.c | 1 - drivers/staging/iio/meter/ade7759.c | 1 - drivers/staging/iio/meter/ade7854.c | 1 - 6 files changed, 6 deletions(-) commit 6dab4d415fe3c08f702592db36b3159393845393 Author: Jonathan Cameron Date: Sun Jul 23 17:26:14 2017 +0100 staging:iio:ad5933: drop assign iio_info.driver_module The equivalent of this is now done via macro magic when the relevant register call is made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/staging/iio/impedance-analyzer/ad5933.c | 1 - 1 file changed, 1 deletion(-) commit 529c8f7de80076dab66b1cce402f9f3a8c859eab Author: Jonathan Cameron Date: Sun Jul 23 17:26:13 2017 +0100 staging:iio:gyro:adis16060 drop assign iio_info.driver_module The equivalent of this is now done via macro magic when the relevant register call is made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/staging/iio/gyro/adis16060_core.c | 1 - 1 file changed, 1 deletion(-) commit 9a32d303e03c51c313f6ec469eb7b8f1707665c5 Author: Jonathan Cameron Date: Sun Jul 23 17:26:12 2017 +0100 staging:iio:frequency: drop assign iio_info.driver_module The equivalent of this is now done via macro magic when the relevant register call is made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/staging/iio/frequency/ad9832.c | 1 - drivers/staging/iio/frequency/ad9834.c | 2 -- 2 files changed, 3 deletions(-) commit 6ff33cb3ce00feeb7a5d0536967955e87b9fa884 Author: Jonathan Cameron Date: Sun Jul 23 17:26:11 2017 +0100 staging:iio:cdc: drop assign iio_info.driver_module The equivalent of this is now done via macro magic when the relevant register call is made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/staging/iio/cdc/ad7150.c | 1 - drivers/staging/iio/cdc/ad7152.c | 1 - drivers/staging/iio/cdc/ad7746.c | 1 - 3 files changed, 3 deletions(-) commit ae6cc213822effebb88ee9d2cdd968593b40b80b Author: Jonathan Cameron Date: Sun Jul 23 17:26:10 2017 +0100 staging:iio:adc: drop assign iio_info.driver_module The equivalent of this is now done via macro magic when the relevant register call is made. The actual structure element will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/staging/iio/adc/ad7192.c | 2 -- drivers/staging/iio/adc/ad7280a.c | 1 - drivers/staging/iio/adc/ad7606.c | 4 ---- drivers/staging/iio/adc/ad7780.c | 1 - drivers/staging/iio/adc/ad7816.c | 1 - drivers/staging/iio/addac/adt7316.c | 2 -- 6 files changed, 11 deletions(-) commit 85cfa866cc6f9462882c4f67810835942ef3b7a9 Author: Jonathan Cameron Date: Sun Jul 23 17:26:09 2017 +0100 staging:iio:accel: drop assignment of iio_info.driver_module The equivalent this is now done via macro magic when the relevant register call is made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/staging/iio/accel/adis16201.c | 1 - drivers/staging/iio/accel/adis16203.c | 1 - drivers/staging/iio/accel/adis16209.c | 1 - drivers/staging/iio/accel/adis16240.c | 1 - 4 files changed, 4 deletions(-) commit 38ebbf689e5008264fa4aa4e9b9119d85e1a4657 Author: Jonathan Cameron Date: Sun Jul 23 17:26:08 2017 +0100 iio:triggers: drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Note that stm32-timer-trigger has expanded rather beyond triggers (to include encoder input counting for example) and hence has an iio_info structure. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/trigger/iio-trig-hrtimer.c | 1 - drivers/iio/trigger/iio-trig-interrupt.c | 1 - drivers/iio/trigger/iio-trig-loop.c | 1 - drivers/iio/trigger/iio-trig-sysfs.c | 1 - drivers/iio/trigger/stm32-timer-trigger.c | 2 -- 5 files changed, 6 deletions(-) commit 5e42916ad9e97067b4c9c430229479f9a6a3a3d4 Author: Jonathan Cameron Date: Sun Jul 23 17:26:07 2017 +0100 iio:temperature: drop assignment of iio_info.driver_module The equivalent of this is now done via macro magic when the relevant register call is made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/temperature/hid-sensor-temperature.c | 1 - drivers/iio/temperature/maxim_thermocouple.c | 1 - drivers/iio/temperature/mlx90614.c | 1 - drivers/iio/temperature/tmp006.c | 1 - drivers/iio/temperature/tmp007.c | 1 - drivers/iio/temperature/tsys01.c | 1 - drivers/iio/temperature/tsys02d.c | 1 - 7 files changed, 7 deletions(-) commit a62e256b1438e3d43293bc71fd0ebb064cb0c51d Author: Jonathan Cameron Date: Sun Jul 23 17:26:06 2017 +0100 iio:proximity: drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/proximity/as3935.c | 2 -- drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 1 - drivers/iio/proximity/srf04.c | 1 - drivers/iio/proximity/srf08.c | 2 -- drivers/iio/proximity/sx9500.c | 2 -- 5 files changed, 8 deletions(-) commit 6a15fef2cb4b75cb8101f6359ca364bc3ffcccca Author: Jonathan Cameron Date: Sun Jul 23 17:26:05 2017 +0100 iio:pressure: drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/pressure/abp060mg.c | 1 - drivers/iio/pressure/bmp280-core.c | 1 - drivers/iio/pressure/cros_ec_baro.c | 1 - drivers/iio/pressure/hid-sensor-press.c | 1 - drivers/iio/pressure/hp03.c | 1 - drivers/iio/pressure/hp206c.c | 1 - drivers/iio/pressure/mpl115.c | 1 - drivers/iio/pressure/mpl3115.c | 1 - drivers/iio/pressure/ms5611_core.c | 1 - drivers/iio/pressure/ms5637.c | 1 - drivers/iio/pressure/st_pressure_core.c | 2 -- drivers/iio/pressure/t5403.c | 1 - drivers/iio/pressure/zpa2326.c | 2 -- 13 files changed, 15 deletions(-) commit c64fdf0fe943bedfa8f6de07aec907b15436a5be Author: Jonathan Cameron Date: Sun Jul 23 17:26:04 2017 +0100 iio:potentiostat:lmp91000 drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/potentiostat/lmp91000.c | 2 -- 1 file changed, 2 deletions(-) commit 6d9d020da55dfb1780ba787924f4cd92c69105f5 Author: Jonathan Cameron Date: Sun Jul 23 17:26:03 2017 +0100 iio:dpot: drop assign iio_info.driver_module The equivalent of this is now done via macro magic when the relevant register call is made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/potentiometer/ds1803.c | 1 - drivers/iio/potentiometer/max5481.c | 1 - drivers/iio/potentiometer/max5487.c | 1 - drivers/iio/potentiometer/mcp4131.c | 1 - drivers/iio/potentiometer/mcp4531.c | 1 - drivers/iio/potentiometer/tpl0102.c | 1 - 6 files changed, 6 deletions(-) commit 1b449a72580e8c97ae0cef3efcfa18e9ca438693 Author: Jonathan Cameron Date: Sun Jul 23 17:26:02 2017 +0100 iio:orientation: drop assign iio_info.driver_module The equivalent of this is now done via macro magic when the relevant register call is made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/orientation/hid-sensor-incl-3d.c | 1 - drivers/iio/orientation/hid-sensor-rotation.c | 1 - 2 files changed, 2 deletions(-) commit 7f307262af08e842297561ef7afd3cce248b258a Author: Jonathan Cameron Date: Sun Jul 23 17:26:01 2017 +0100 iio:magnetometer: drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/magnetometer/ak8974.c | 1 - drivers/iio/magnetometer/ak8975.c | 1 - drivers/iio/magnetometer/bmc150_magn.c | 2 -- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 1 - drivers/iio/magnetometer/hmc5843_core.c | 1 - drivers/iio/magnetometer/mag3110.c | 1 - drivers/iio/magnetometer/mmc35240.c | 1 - drivers/iio/magnetometer/st_magn_core.c | 2 -- 8 files changed, 10 deletions(-) commit 4166b47c2b4ae38496a6871b3560677705f8edea Author: Jonathan Cameron Date: Sun Jul 23 17:26:00 2017 +0100 iio:light: drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/light/acpi-als.c | 1 - drivers/iio/light/adjd_s311.c | 1 - drivers/iio/light/al3320a.c | 1 - drivers/iio/light/apds9300.c | 2 -- drivers/iio/light/apds9960.c | 1 - drivers/iio/light/bh1750.c | 1 - drivers/iio/light/bh1780.c | 1 - drivers/iio/light/cm32181.c | 1 - drivers/iio/light/cm3232.c | 1 - drivers/iio/light/cm3323.c | 1 - drivers/iio/light/cm3605.c | 1 - drivers/iio/light/cm36651.c | 1 - drivers/iio/light/cros_ec_light_prox.c | 1 - drivers/iio/light/gp2ap020a00f.c | 2 -- drivers/iio/light/hid-sensor-als.c | 1 - drivers/iio/light/hid-sensor-prox.c | 1 - drivers/iio/light/isl29018.c | 2 -- drivers/iio/light/isl29028.c | 1 - drivers/iio/light/isl29125.c | 1 - drivers/iio/light/jsa1212.c | 1 - drivers/iio/light/lm3533-als.c | 1 - drivers/iio/light/ltr501.c | 4 ---- drivers/iio/light/max44000.c | 1 - drivers/iio/light/opt3001.c | 1 - drivers/iio/light/pa12203001.c | 1 - drivers/iio/light/rpr0521.c | 2 -- drivers/iio/light/si1145.c | 3 --- drivers/iio/light/stk3310.c | 1 - drivers/iio/light/tcs3414.c | 1 - drivers/iio/light/tcs3472.c | 1 - drivers/iio/light/tsl2563.c | 2 -- drivers/iio/light/tsl2583.c | 1 - drivers/iio/light/tsl4531.c | 1 - drivers/iio/light/us5182d.c | 1 - drivers/iio/light/vcnl4000.c | 1 - drivers/iio/light/veml6070.c | 1 - drivers/iio/light/vl6180.c | 1 - 37 files changed, 47 deletions(-) commit 79978a9bd02b0c2fcf6e8485dcb5ef7ee34f1adb Author: Jonathan Cameron Date: Sun Jul 23 17:25:59 2017 +0100 iio:imu: drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/imu/adis16400_core.c | 1 - drivers/iio/imu/adis16480.c | 1 - drivers/iio/imu/adis_trigger.c | 1 - drivers/iio/imu/bmi160/bmi160_core.c | 1 - drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 1 - drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c | 1 - drivers/iio/imu/kmx61.c | 3 --- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 -- 8 files changed, 11 deletions(-) commit 13a8c6c2a1138309dcf7744cb4db7aea54d8085a Author: Jonathan Cameron Date: Sun Jul 23 17:25:58 2017 +0100 iio:humidity: drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/humidity/am2315.c | 1 - drivers/iio/humidity/dht11.c | 1 - drivers/iio/humidity/hdc100x.c | 1 - drivers/iio/humidity/hid-sensor-humidity.c | 1 - drivers/iio/humidity/hts221_buffer.c | 1 - drivers/iio/humidity/hts221_core.c | 1 - drivers/iio/humidity/htu21.c | 1 - drivers/iio/humidity/si7005.c | 1 - drivers/iio/humidity/si7020.c | 1 - 9 files changed, 9 deletions(-) commit 73bba67096986c9fa5eb62811b09ac9b22876d2c Author: Jonathan Cameron Date: Sun Jul 23 17:25:57 2017 +0100 iio:health: drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/health/afe4403.c | 2 -- drivers/iio/health/afe4404.c | 2 -- drivers/iio/health/max30100.c | 1 - drivers/iio/health/max30102.c | 1 - 4 files changed, 6 deletions(-) commit 227e8ef81d6db980184c49e893bb1e7e7432b341 Author: Jonathan Cameron Date: Sun Jul 23 17:25:56 2017 +0100 iio:gyro: drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/gyro/adis16080.c | 1 - drivers/iio/gyro/adis16130.c | 1 - drivers/iio/gyro/adis16136.c | 1 - drivers/iio/gyro/adis16260.c | 1 - drivers/iio/gyro/adxrs450.c | 1 - drivers/iio/gyro/bmg160_core.c | 2 -- drivers/iio/gyro/hid-sensor-gyro-3d.c | 1 - drivers/iio/gyro/itg3200_buffer.c | 1 - drivers/iio/gyro/itg3200_core.c | 1 - drivers/iio/gyro/mpu3050-core.c | 2 -- drivers/iio/gyro/st_gyro_core.c | 2 -- 11 files changed, 14 deletions(-) commit 3b3ec6034152cbf42870d766a1db0c0489c653a4 Author: Jonathan Cameron Date: Sun Jul 23 17:25:55 2017 +0100 iio:frequency: drop assign iio_info.driver_module The equivalent is now done via macro magic when the relevant register call is made. The actual structure element will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/frequency/ad9523.c | 1 - drivers/iio/frequency/adf4350.c | 1 - 2 files changed, 2 deletions(-) commit 4403a39829e79e0b4701102fb724e80e895d51c5 Author: Jonathan Cameron Date: Sun Jul 23 17:25:54 2017 +0100 iio:dummy: drop assignment of iio_info.driver_module The equivalent is now done via macro magic when the relevant register call is made. The actual structure element will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/dummy/iio_simple_dummy.c | 1 - 1 file changed, 1 deletion(-) commit ea9e3f35886550af8a9bdbd60f244cfaceffc523 Author: Jonathan Cameron Date: Sun Jul 23 17:25:53 2017 +0100 iio:dac: drop assignment of iio_info.driver_module The equivalent of this is now done via macro magic when the relevant register call is made. The actual structure element will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/dac/ad5064.c | 1 - drivers/iio/dac/ad5360.c | 1 - drivers/iio/dac/ad5380.c | 1 - drivers/iio/dac/ad5421.c | 1 - drivers/iio/dac/ad5446.c | 1 - drivers/iio/dac/ad5449.c | 1 - drivers/iio/dac/ad5504.c | 1 - drivers/iio/dac/ad5592r-base.c | 1 - drivers/iio/dac/ad5624r_spi.c | 1 - drivers/iio/dac/ad5686.c | 1 - drivers/iio/dac/ad5755.c | 1 - drivers/iio/dac/ad5761.c | 1 - drivers/iio/dac/ad5764.c | 1 - drivers/iio/dac/ad5791.c | 1 - drivers/iio/dac/ad7303.c | 1 - drivers/iio/dac/ad8801.c | 1 - drivers/iio/dac/cio-dac.c | 1 - drivers/iio/dac/dpot-dac.c | 1 - drivers/iio/dac/lpc18xx_dac.c | 1 - drivers/iio/dac/ltc2632.c | 1 - drivers/iio/dac/m62332.c | 1 - drivers/iio/dac/max517.c | 1 - drivers/iio/dac/max5821.c | 1 - drivers/iio/dac/mcp4725.c | 1 - drivers/iio/dac/mcp4922.c | 1 - drivers/iio/dac/stm32-dac.c | 1 - drivers/iio/dac/vf610_dac.c | 1 - 27 files changed, 27 deletions(-) commit d5b531a8bc108c1120d4bbe56fb5a691ed56d775 Author: Jonathan Cameron Date: Sun Jul 23 17:25:52 2017 +0100 iio:counter:104-quad-8 drop assign iio_info.driver_module The equivalent is now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/counter/104-quad-8.c | 1 - 1 file changed, 1 deletion(-) commit d177f6af48e494143e374bbc91bad922442a28d2 Author: Jonathan Cameron Date: Sun Jul 23 17:25:51 2017 +0100 iio:common: drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Clearly this set jumps across multiple areas, but inherently it can't be grouped like the other sets in this series so I've done all the stuff in the common directory together. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c | 1 - drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 1 - 2 files changed, 2 deletions(-) commit 254f3a6364c53b3859954971262e3bd528b84444 Author: Jonathan Cameron Date: Sun Jul 23 17:25:50 2017 +0100 iio:chemical: drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/chemical/ams-iaq-core.c | 1 - drivers/iio/chemical/atlas-ph-sensor.c | 2 -- drivers/iio/chemical/ccs811.c | 1 - drivers/iio/chemical/vz89x.c | 1 - 4 files changed, 5 deletions(-) commit 727929797f71b6cc32c685a27ff3189740af09dc Author: Jonathan Cameron Date: Sun Jul 23 17:25:49 2017 +0100 iio:amplifiers:ad8366 drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/amplifiers/ad8366.c | 1 - 1 file changed, 1 deletion(-) commit 6c5bffa80ecae54c3ddd113eb4d93382503989be Author: Jonathan Cameron Date: Sun Jul 23 17:25:48 2017 +0100 iio:accel: drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/accel/adxl345_core.c | 1 - drivers/iio/accel/bma180.c | 2 -- drivers/iio/accel/bma220_spi.c | 1 - drivers/iio/accel/bmc150-accel-core.c | 3 --- drivers/iio/accel/da280.c | 1 - drivers/iio/accel/da311.c | 1 - drivers/iio/accel/dmard06.c | 1 - drivers/iio/accel/dmard09.c | 1 - drivers/iio/accel/dmard10.c | 1 - drivers/iio/accel/hid-sensor-accel-3d.c | 1 - drivers/iio/accel/kxcjk-1013.c | 2 -- drivers/iio/accel/kxsd9.c | 1 - drivers/iio/accel/mc3230.c | 1 - drivers/iio/accel/mma7455_core.c | 1 - drivers/iio/accel/mma7660.c | 1 - drivers/iio/accel/mma8452.c | 2 -- drivers/iio/accel/mma9551.c | 1 - drivers/iio/accel/mma9553.c | 1 - drivers/iio/accel/mxc4005.c | 2 -- drivers/iio/accel/mxc6255.c | 1 - drivers/iio/accel/sca3000.c | 1 - drivers/iio/accel/st_accel_core.c | 2 -- drivers/iio/accel/stk8312.c | 2 -- drivers/iio/accel/stk8ba50.c | 2 -- 24 files changed, 33 deletions(-) commit 52b31bcc9372f2925f4898d179c655687c4aa179 Author: Jonathan Cameron Date: Sun Jul 23 17:25:47 2017 +0100 iio:adc: drop assign iio_info.driver_module and iio_trigger_ops.owner The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/adc/ad7266.c | 1 - drivers/iio/adc/ad7291.c | 1 - drivers/iio/adc/ad7298.c | 1 - drivers/iio/adc/ad7476.c | 1 - drivers/iio/adc/ad7766.c | 2 -- drivers/iio/adc/ad7791.c | 2 -- drivers/iio/adc/ad7793.c | 2 -- drivers/iio/adc/ad7887.c | 1 - drivers/iio/adc/ad7923.c | 1 - drivers/iio/adc/ad799x.c | 3 --- drivers/iio/adc/ad_sigma_delta.c | 1 - drivers/iio/adc/aspeed_adc.c | 1 - drivers/iio/adc/at91-sama5d2_adc.c | 2 -- drivers/iio/adc/at91_adc.c | 2 -- drivers/iio/adc/axp20x_adc.c | 2 -- drivers/iio/adc/axp288_adc.c | 1 - drivers/iio/adc/bcm_iproc_adc.c | 1 - drivers/iio/adc/berlin2-adc.c | 1 - drivers/iio/adc/cc10001_adc.c | 1 - drivers/iio/adc/cpcap-adc.c | 1 - drivers/iio/adc/da9150-gpadc.c | 1 - drivers/iio/adc/dln2-adc.c | 6 ------ drivers/iio/adc/envelope-detector.c | 1 - drivers/iio/adc/exynos_adc.c | 1 - drivers/iio/adc/hi8435.c | 1 - drivers/iio/adc/hx711.c | 1 - drivers/iio/adc/imx7d_adc.c | 1 - drivers/iio/adc/ina2xx-adc.c | 2 -- drivers/iio/adc/lp8788_adc.c | 1 - drivers/iio/adc/lpc18xx_adc.c | 1 - drivers/iio/adc/lpc32xx_adc.c | 1 - drivers/iio/adc/ltc2471.c | 1 - drivers/iio/adc/ltc2485.c | 1 - drivers/iio/adc/ltc2497.c | 1 - drivers/iio/adc/max1027.c | 2 -- drivers/iio/adc/max11100.c | 1 - drivers/iio/adc/max1118.c | 1 - drivers/iio/adc/max1363.c | 2 -- drivers/iio/adc/max9611.c | 1 - drivers/iio/adc/mcp320x.c | 1 - drivers/iio/adc/mcp3422.c | 1 - drivers/iio/adc/men_z188_adc.c | 1 - drivers/iio/adc/meson_saradc.c | 1 - drivers/iio/adc/mt6577_auxadc.c | 1 - drivers/iio/adc/mxs-lradc-adc.c | 2 -- drivers/iio/adc/nau7802.c | 1 - drivers/iio/adc/palmas_gpadc.c | 1 - drivers/iio/adc/qcom-pm8xxx-xoadc.c | 1 - drivers/iio/adc/qcom-spmi-iadc.c | 1 - drivers/iio/adc/qcom-spmi-vadc.c | 1 - drivers/iio/adc/rcar-gyroadc.c | 1 - drivers/iio/adc/rockchip_saradc.c | 1 - drivers/iio/adc/spear_adc.c | 1 - drivers/iio/adc/stm32-adc.c | 1 - drivers/iio/adc/stx104.c | 1 - drivers/iio/adc/sun4i-gpadc-iio.c | 1 - drivers/iio/adc/ti-adc081c.c | 1 - drivers/iio/adc/ti-adc0832.c | 1 - drivers/iio/adc/ti-adc084s021.c | 1 - drivers/iio/adc/ti-adc108s102.c | 1 - drivers/iio/adc/ti-adc12138.c | 1 - drivers/iio/adc/ti-adc128s052.c | 1 - drivers/iio/adc/ti-adc161s626.c | 1 - drivers/iio/adc/ti-ads1015.c | 2 -- drivers/iio/adc/ti-ads7950.c | 1 - drivers/iio/adc/ti-ads8688.c | 1 - drivers/iio/adc/ti-tlc4541.c | 1 - drivers/iio/adc/ti_am335x_adc.c | 1 - drivers/iio/adc/twl4030-madc.c | 1 - drivers/iio/adc/twl6030-gpadc.c | 1 - drivers/iio/adc/vf610_adc.c | 1 - drivers/iio/adc/viperboard_adc.c | 1 - drivers/iio/adc/xilinx-xadc-core.c | 2 -- 73 files changed, 92 deletions(-) commit 04581681df3048b7819c25419de1ea73a2832808 Author: Jonathan Cameron Date: Sun Jul 23 17:25:45 2017 +0100 iio:trigger: Remove necessity to have a trig->ops structure. There are a few cases where none of the callbacks are supplied and the ops structure purely existed to provide the driver module. Given that is done differently now, we don't need to have a trig_ops structure. Allow for it not being there required a few additional sanity checks when trying check if particular callbacks are set. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/industrialio-trigger.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 035c70aeb64b861aa88a666c61fda8b2ae49aeae Author: Jonathan Cameron Date: Sun Jul 23 17:25:44 2017 +0100 iio: triggers: Use macros to avoid boilerplate assignment of owner. This trig_ops.owner assignment occurs in all trigger drivers and can be simply automated using a macro as has been done in many other places in the kernel. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/industrialio-trigger.c | 18 ++++++++++++------ include/linux/iio/trigger.h | 19 +++++++++++++------ 2 files changed, 25 insertions(+), 12 deletions(-) commit 63b19547cc3d96041d7bc7ab8de6292b0ebaf2c9 Author: Jonathan Cameron Date: Sun Jul 23 17:25:43 2017 +0100 iio: Use macro magic to avoid manual assign of driver_module Starting point in boiler plate reduction similar to that done for many similar cases elsewhere in the kernel. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen drivers/iio/industrialio-core.c | 35 +++++++++-------------------------- drivers/iio/industrialio-trigger.c | 6 +++--- include/linux/iio/iio.h | 31 +++++++++++++++++++++++++++++-- 3 files changed, 41 insertions(+), 31 deletions(-) commit 66df1014efbadbdd2a550c6c67a815db9b4d05bd Author: Chris Wilson Date: Tue Aug 22 18:38:28 2017 +0100 drm/i915: Keep a small stash of preallocated WC pages We use WC pages for coherent writes into the ppGTT on !llc architectures. However, to create a WC page requires a stop_machine(), i.e. is very slow. To compensate we currently keep a per-vm cache of recently freed pages, but we still see the slow startup of new contexts. We can amoritize that cost slightly by allocating WC pages in small batches (PAGEVEC_SIZE == 14) and since creating a WC page implies a stop_machine() there is no penalty for keeping that stash global. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20170822173828.5932-1-chris@chris-wilson.co.uk drivers/gpu/drm/i915/i915_drv.h | 5 ++ drivers/gpu/drm/i915/i915_gem_gtt.c | 122 +++++++++++++++++++++++++++++------- 2 files changed, 103 insertions(+), 24 deletions(-) commit eb371933cf4d3495d0899880b2e0e252ce9db517 Author: Rodrigo Vivi Date: Mon Aug 21 16:50:56 2017 -0700 drm/i915/cfl: Coffee Lake works on Kaby Lake PCH. Coffee Lake CPU on Kaby Lake PCH is possible. It does exist, and it does work. The only missed case was this warning here noticed by Wendy who could get one system with this configuration and reported the issue for us: Hardware Configuration Board ID KBL S DDR4 UDIMM EV CRB Processor Intel® Processor code named Coffee Lake S, (6+2), 6 cores 12 threads, GT2, A0 (Internal) (QNJ4) [ 3.220585] WARNING: CPU: 10 PID: 206 at drivers/gpu/drm/i915/i915_drv.c:340 i915_driver_load+0x1210/0x1660 [i915] [ 3.221312] Modules linked in: hid_generic usbhid i915 i2c_algo_bit drm_kms_helper e1000e syscopyarea sysfillrect sysimgblt nvme fb_sys_fops ptp ahci i2c_hid drm pps_core nvme_core libahci wmi hid video [ 3.222050] CPU: 10 PID: 206 Comm: systemd-udevd Not tainted 4.13.0-rc5-intel-next+ #1 [ 3.222706] Hardware name: Intel Corporation Kabylake Client platform/KBL S DDR4 UDIMM EV CRB, BIOS KBLSE2R1.R00.X089.P00.1705051000 05/05/2017 Cc: Wendy Wang Cc: Dhinakaran Pandiyan Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: https://patchwork.freedesktop.org/patch/msgid/20170821235056.9015-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ade5ee7ea55daab37a300374c73aceb3092ccdd6 Author: Paulo Zanoni Date: Mon Aug 21 17:03:56 2017 -0700 drm/i915/cnl: extract cnl_set_procmon_ref_values Move the part that reads the table and sets registers based on the table to its own function. v2: Rebase. Signed-off-by: Paulo Zanoni Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170822000356.17330-2-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_runtime_pm.c | 37 ++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 15 deletions(-) commit e0b8acf35d3c4de3d9b4bde18169e0562d748c89 Author: Paulo Zanoni Date: Mon Aug 21 17:03:55 2017 -0700 drm/i915/cnl: simplify cnl_procmon_values handling Make it a little less magical and a little simpler and more hardcoded so we don't end up with an array that's composed mostly of empty entries. v2: Add an enum for the voltage+register values (Ville). Signed-off-by: Paulo Zanoni Signed-off-by: Rodrigo Vivi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170822000356.17330-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_runtime_pm.c | 58 +++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 21 deletions(-) commit 74d290f845d0736bf6b9dd22cd28dd87b270c65f Author: Chris Wilson Date: Thu Aug 17 13:37:06 2017 +0100 drm/i915: Boost GPU clocks if we miss the pageflip's vblank If we miss the current vblank because the gpu was busy, that may cause a jitter as the frame rate temporarily drops. We try to limit the impact of this by then boosting the GPU clock to deliver the frame as quickly as possible. Originally done in commit 6ad790c0f5ac ("drm/i915: Boost GPU frequency if we detect outstanding pageflips") but was never forward ported to atomic and finally dropped in commit fd3a40242e87 ("drm/i915: Rip out legacy page_flip completion/irq handling"). One of the most typical use-cases for this is a mostly idle desktop. Rendering one frame of the desktop's frontbuffer can easily be accomplished by the GPU running at low frequency, but often exceeds the time budget of the desktop compositor. The result is that animations such as opening the menu, doing a fullscreen switch, or even just trying to move a window around are slow and jerky. We need to respond within a frame to give the best impression of a smooth UX, as a compromise we instead respond if that first frame misses its goal. The result should be a near-imperceivable initial delay and a smooth animation even starting from idle. The cost, as ever, is that we spend more power than is strictly necessary as we overestimate the required GPU frequency and then try to ramp down. This of course is reactionary, too little, too late; nevertheless it is surprisingly effective. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102199 Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Cc: Ville Syrjälä Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20170817123706.6777-1-chris@chris-wilson.co.uk Tested-by: Lyude Paul Reviewed-by: Radoslaw Szwichtenberg drivers/gpu/drm/i915/intel_display.c | 62 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 1 - drivers/gpu/drm/i915/intel_pm.c | 42 ++---------------------- 3 files changed, 65 insertions(+), 40 deletions(-) commit 5f88a9c61978b20acba4b5a76555eb3a4a03ab73 Author: Ville Syrjälä Date: Fri Aug 18 16:49:58 2017 +0300 drm/i915: Constify states passed to enable/disable/etc. encoder hooks The enable/disable/etc. encoder hooks aren't supposed to alter the state(s), so pass them as const. Unfortunately C lacks any kind of deep const thingy, so this can't catch all abuses. But at least it acts as a hint to the reader telling them not to mess about with the state(s). v2: Update intel_tv_mode_find() and ironlake_edp_pll_on() as well v3: Deal with intel_sdvo_connector_state Acked-by: Rodrigo Vivi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818134958.15502-9-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_crt.c | 22 ++++++------ drivers/gpu/drm/i915/intel_ddi.c | 30 ++++++++-------- drivers/gpu/drm/i915/intel_dp.c | 64 ++++++++++++++++----------------- drivers/gpu/drm/i915/intel_dp_mst.c | 16 ++++----- drivers/gpu/drm/i915/intel_drv.h | 32 ++++++++--------- drivers/gpu/drm/i915/intel_dsi.c | 22 ++++++------ drivers/gpu/drm/i915/intel_dvo.c | 12 +++---- drivers/gpu/drm/i915/intel_hdmi.c | 70 ++++++++++++++++++------------------- drivers/gpu/drm/i915/intel_lvds.c | 24 ++++++------- drivers/gpu/drm/i915/intel_sdvo.c | 40 ++++++++++----------- drivers/gpu/drm/i915/intel_tv.c | 14 ++++---- 11 files changed, 172 insertions(+), 174 deletions(-) commit d2419ffc10e4c9559c6d67994e3e12919865c3b4 Author: Ville Syrjälä Date: Fri Aug 18 16:49:56 2017 +0300 drm/i915: Plumb crtc_state to PSR enable/disable The PSR enable/disable need to know things about the crtc state, so plumb it through. This will become even more important when we start to reuse the generic infoframe code for the VSC DIP programming as the infoframe code wants the crtc state as well. v2: Fix kernel docs Reviewed-by: Rodrigo Vivi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818134958.15502-7-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_ddi.c | 4 +- drivers/gpu/drm/i915/intel_dp.c | 4 +- drivers/gpu/drm/i915/intel_drv.h | 6 ++- drivers/gpu/drm/i915/intel_psr.c | 79 +++++++++++++++++++++------------------- 4 files changed, 50 insertions(+), 43 deletions(-) commit 385e4de0eaecb25775ec4d5cd12efdcef5990f80 Author: Ville Syrjälä Date: Fri Aug 18 16:49:55 2017 +0300 drm/i915: Init infoframe vfuncs for DP encoders as well DP ports may want to use the video DIP for SDP transmission, so let's initialize the vfuncs for DP encoders as well. The only exception is port A eDP prior to HSW as that one doesn't have a video DIP instance. Signed-off-by: Ville Syrjälä Reviewed-by: Shashank Sharma Link: https://patchwork.freedesktop.org/patch/msgid/20170818134958.15502-6-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_ddi.c | 2 ++ drivers/gpu/drm/i915/intel_dp.c | 3 +++ drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_hdmi.c | 52 ++++++++++++++++++++++----------------- 4 files changed, 36 insertions(+), 22 deletions(-) commit f99be1b322ccca792383245a202c8ef821909153 Author: Ville Syrjälä Date: Fri Aug 18 16:49:54 2017 +0300 drm/i915: Move infoframe vfuncs into intel_digital_port DP ports will also want to utilize the video DIP for SDP transmission. So let's move the vfuncs into the dig_port. v2: Rebase due to DDI changes Signed-off-by: Ville Syrjälä Reviewed-by: Shashank Sharma Link: https://patchwork.freedesktop.org/patch/msgid/20170818134958.15502-5-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_ddi.c | 22 ++++++------- drivers/gpu/drm/i915/intel_drv.h | 21 +++++++------ drivers/gpu/drm/i915/intel_hdmi.c | 65 ++++++++++++++++++++------------------- 3 files changed, 55 insertions(+), 53 deletions(-) commit c5f93fcf2ee1089cdc1c67a8146f81ff26c7c824 Author: Ville Syrjälä Date: Tue Aug 22 17:09:14 2017 +0300 drm/i915: Disable infoframes when shutting down DDI HDMI Disabling the video DIP when shutting the port down seems like a good idea. Bspec says: "When disabling both the DIP port and DIP transmission, first disable the port and then disable DIP." and "Restriction : GCP is only supported with HDMI when the bits per color is not equal to 8. GCP must be enabled prior to enabling TRANS_DDI_FUNC_CTL for HDMI with bits per color not equal to 8 and disabled after disabling TRANS_DDI_FUNC_CTL" So let's do it in the .post_disable() hook. v2: Remove double "dpms off" caused by rebase fail Signed-off-by: Ville Syrjälä Reviewed-by: Shashank Sharma Link: https://patchwork.freedesktop.org/patch/msgid/20170822140914.24413-1-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_ddi.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit b47ef0f793d9b67a998bb8468f4d81485897d833 Author: Ville Syrjälä Date: Fri Aug 18 16:49:52 2017 +0300 drm/i915: Check has_infoframes when enabling infoframes has_infoframe is what tells us whether infoframes should be enabled, so let's pass that instead of has_hdmi_sink to .set_infoframes(). Reviewed-by: Rodrigo Vivi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818134958.15502-3-ville.syrjala@linux.intel.com drivers/gpu/drm/i915/intel_ddi.c | 6 +++--- drivers/gpu/drm/i915/intel_hdmi.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 25a8ef26fd47e4b60cfae094a43ad9bfc49e676b Author: Ville Syrjälä Date: Fri Aug 18 16:49:51 2017 +0300 drm/dp: Add defines for DP SDP types Add defines for the secondary data packet (SDP) types from the spec. These are the DP specific ones, and in addition HDMI infoframe types (see enum hdmi_infoframe_type) are also valid SDP types. v2: Add more SDP types v3: Note the DP version that added each SDP type (Rodrigo) Cc: dri-devel@lists.freedesktop.org Reviewed-by: Rodrigo Vivi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20170818134958.15502-2-ville.syrjala@linux.intel.com include/drm/drm_dp_helper.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d0a133f7f5bc3583e460ba6bb54474a50ada5201 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 41e61020e821487489526e50b8e2e223342b7b93 Author: Michel Thierry Date: Fri Aug 18 10:23:42 2017 -0700 drm/i915: Re-enable per-engine reset for Broxton The corruption in CSB mmio reads we were seeing has been tracked down to incorrectly touching forcewake of all domains, following an engine reset. It is still a mistery why we only catched this in Broxton, since it could happen in any platform. With that fix already merged, commit 4055dc75d6b5 ("drm/i915: Stop touching forcewake following a gen6+ engine reset"), lets try to enable per-engine resets in Broxton one more time. This reverts commit f188258bde0f ("drm/i915: Disable per-engine reset for Broxton"). Cc: Chris Wilson Signed-off-by: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/20170818172342.7282-1-michel.thierry@intel.com Tested-by: Chris Wilson Signed-off-by: Chris Wilson drivers/gpu/drm/i915/i915_pci.c | 1 - 1 file changed, 1 deletion(-) commit b7f08c89a00ab97be599c9b07b93b24f588e4ac4 Author: Arvind Yadav Date: Sat Aug 19 23:58:20 2017 +0530 drm: i2c: tda998x: constify i2c_device_id i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1503167300-17334-4-git-send-email-arvind.yadav.cs@gmail.com Link: https://patchwork.freedesktop.org/patch/msgid/60db0ba6ddce08444299533e97c9adec3b3ef1bb.1503311145.git.arvind.yadav.cs@gmail.com drivers/gpu/drm/i2c/tda998x_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d6d009a67aa2f10f45b70f67c48a908acbdf695 Author: Arvind Yadav Date: Sat Aug 19 23:58:19 2017 +0530 drm: i2c: sil164: constify i2c_device_id i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1503167300-17334-3-git-send-email-arvind.yadav.cs@gmail.com drivers/gpu/drm/i2c/sil164_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eab18d76b60157cd7ac7044f0b6952496ac864a1 Author: Arvind Yadav Date: Sat Aug 19 23:58:18 2017 +0530 drm: i2c: ch7006: constify i2c_device_id i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1503167300-17334-2-git-send-email-arvind.yadav.cs@gmail.com drivers/gpu/drm/i2c/ch7006_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1853a9daa19e150c32d0082e4f006391a7c6a997 Author: Jani Nikula Date: Fri Aug 18 12:30:20 2017 +0300 drm/i915/dp: make is_edp non-static and rename to intel_dp_is_edp Expose across driver for future work. No functional changes. Cc: Manasi Navare Cc: Jim Bride Reviewed-by: Jim Bride Reviewed-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170818093020.19160-2-jani.nikula@intel.com drivers/gpu/drm/i915/intel_dp.c | 77 +++++++++++++++++++++------------------- drivers/gpu/drm/i915/intel_drv.h | 1 + 2 files changed, 41 insertions(+), 37 deletions(-) commit 7b91bf7f9196c8192b65a904ac7de7ecf989904f Author: Jani Nikula Date: Fri Aug 18 12:30:19 2017 +0300 drm/i915/dp: rename intel_dp_is_edp to intel_dp_is_port_edp Emphasize that this is based on the port, not intel_dp. This is also in line with the underlying intel_bios_is_port_edp() function. No functional changes. Cc: Manasi Navare Cc: Jim Bride Reviewed-by: Jim Bride Reviewed-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20170818093020.19160-1-jani.nikula@intel.com drivers/gpu/drm/i915/intel_display.c | 6 +++--- drivers/gpu/drm/i915/intel_dp.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 9928688492aea161eeeaad7af34f372794cb2f53 Author: Inki Dae Date: Mon Jul 3 17:42:17 2017 +0900 drm/bridge: change return type of drm_bridge_add function This patch changes return type of drm_bridge_add function. This function never return negative value but returns only 0. So it changes the return type of this function to void one. Signed-off-by: Inki Dae Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/1499071350-25168-2-git-send-email-inki.dae@samsung.com drivers/gpu/drm/drm_bridge.c | 7 +------ include/drm/drm_bridge.h | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) commit 059e3c0b2fa30b6903de6b78f191028484385c3b Author: Inki Dae Date: Mon Jul 3 17:42:28 2017 +0900 drm/exynos: mic: clean up drm_bridge_add call This patch removes unnecessary checking of return value. Signed-off-by: Inki Dae Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/1499071350-25168-13-git-send-email-inki.dae@samsung.com drivers/gpu/drm/exynos/exynos_drm_mic.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 851394552779dbc85fffa8726dd2d09ad43313a8 Author: Inki Dae Date: Mon Jul 3 17:42:30 2017 +0900 drm/sti: sti_vdo: clean up drm_bridge_add call This patch removes unnecessary checking of return value. Signed-off-by: Inki Dae Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/1499071350-25168-15-git-send-email-inki.dae@samsung.com drivers/gpu/drm/sti/sti_dvo.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit e691009154b43f9269cd4ca04c92a7f0558472b2 Author: Inki Dae Date: Mon Jul 3 17:42:29 2017 +0900 drm/mediatek: hdmi: clean up drm_bridge_add call This patch removes unnecessary checking of return value. Acked-by: CK Hu Signed-off-by: Inki Dae Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/1499071350-25168-14-git-send-email-inki.dae@samsung.com drivers/gpu/drm/mediatek/mtk_hdmi.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 1a25db65d39cc6c1bdc2bdb999611311f8fec3da Author: Rodrigo Vivi Date: Tue Aug 15 16:16:51 2017 -0700 drm/i915/cnl: Apply large line width optimization This bit enables hardware that will change the approximation used for distances calculations for AA wide lines so that they are rendered more accurately. The default value for this bit leaves the legacy behavior. There is no good reason to not enable the new approximation except if comparing to previous GEN rendered images. v2: Rebase v3: Fix author. Rebased by Rodrigo who also added a comment as suggested by Oscar. Since it is surrounded by Workarounds let's just add a comment to make clear it is not an Wa. Cc: Oscar Mateo Signed-off-by: Ben Widawsky Signed-off-by: Rodrigo Vivi Reviewed-by: Oscar Mateo Link: https://patchwork.freedesktop.org/patch/msgid/20170815231651.975-4-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 4 ++++ 2 files changed, 5 insertions(+) commit d1d247543c5626eac1064aafd0a35c231828c211 Author: Rodrigo Vivi Date: Tue Aug 15 16:16:50 2017 -0700 drm/i915/cnl: WaDisableEnhancedSBEVertexCaching WA forTDS handle reallocation getting dropped by SDE, which may result in PS attribute corruption. Disable enhanced SBE vertex caching in COMMON_SLICE_CHICKEN2 offset. v2: Make it until B0 as spec tells. (by Mika). Signed-off-by: Rodrigo Vivi Reviewed-by: Mika Kuoppala Reviewed-by: Oscar Mateo Link: https://patchwork.freedesktop.org/patch/msgid/20170815231651.975-3-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_engine_cs.c | 5 +++++ 1 file changed, 5 insertions(+) commit e6d1a4f6b267933f81a9299c80b56cf1a36ca79e Author: Rodrigo Vivi Date: Tue Aug 15 16:16:49 2017 -0700 drm/i915/cnl: Add WaDisableReplayBufferBankArbitrationOptimization WA to disable replay buffer destination buffer arbitration optimization. Same Wa on previous platforms has a different name: WaToEnableHwFixForPushConstHWBug Signed-off-by: Rodrigo Vivi Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20170815231651.975-2-rodrigo.vivi@intel.com drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++++ 1 file changed, 4 insertions(+) commit 90007bca61627bb2fbd63bc3da0277abe4a43550 Author: Rodrigo Vivi Date: Tue Aug 15 16:16:48 2017 -0700 drm/i915/cnl: Introduce initial Cannonlake Workarounds. Let's inherit workarounds from previous platforms that according to wa_database and BSpec are still valid for Cannonlake. v2: Add missed workarounds. v3: Rebase v4: Remove bad chunk that was added to rc6 disable. (Ander) Also remove A0 W/a that are not needed anymore. v5: Rebase on top of CFL. v6: Remove empty gen9_init_perctx_bb and gen9_init_indirectctx_bb since they don't carry any gen10 related W/a. (by Oscar). Also Remove A0 exclusive workaround. v7: Remove more A0 exclusive workarounds. As pointed out by Oscar many workarounds were changed to be A0 only so let's remove them. Cc: Oscar Mateo Cc: Mika Kuoppala Signed-off-by: Rodrigo Vivi Reviewed-by: Oscar Mateo Link: https://patchwork.freedesktop.org/patch/msgid/20170815231651.975-1-rodrigo.vivi@intel.com drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++-- drivers/gpu/drm/i915/i915_reg.h | 6 ++++++ drivers/gpu/drm/i915/intel_engine_cs.c | 19 +++++++++++++++++++ drivers/gpu/drm/i915/intel_lrc.c | 2 ++ drivers/gpu/drm/i915/intel_pm.c | 21 ++++++++++++++++++++- 5 files changed, 49 insertions(+), 3 deletions(-) commit 64f09f00caf0a7cb40a8c0b85789bacba0f51d9e 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 drivers/gpu/drm/i915/intel_lrc.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 300238cecede382fbd9084499e57f3b30acc75fa Author: Gustavo Padovan Date: Mon Jul 31 16:36:55 2017 -0300 dma-buf/sync_file: document flags field Documentation for it was missing. Signed-off-by: Gustavo Padovan Acked-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20170731193655.6176-1-gustavo@padovan.org include/linux/sync_file.h | 4 ++++ 1 file changed, 4 insertions(+) commit 69ad0e7fe8452a6bc9b619e3f76a77f19d9687ab Author: Kalderon, Michal Date: Wed Jul 26 14:41:57 2017 +0300 RDMA/qedr: Add support for iWARP in user space Pass the second doorbell offset to userspace in create_qp response. Pbl allocation is different for RoCE and iWARP and requires different handling. RoCE allocated the pbl and passes the pointer to qed, where-as in iWARP, qed allocates the pbl and qedr populates it after it returns Signed-off-by: Michal Kalderon Signed-off-by: Ram Amrani Signed-off-by: Ariel Elior Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/verbs.c | 80 ++++++++++++++++++++++++++++++-------- 1 file changed, 63 insertions(+), 17 deletions(-) commit e411e0587e0ddb6dae69944fac72f5d15ca89507 Author: Kalderon, Michal Date: Wed Jul 26 14:41:56 2017 +0300 RDMA/qedr: Add iWARP connection management functions Implements the iWARP connection management functions: connect, accept, create listener and destroy listener Signed-off-by: Michal Kalderon Signed-off-by: Ram Amrani Signed-off-by: Ariel Elior Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/main.c | 11 + drivers/infiniband/hw/qedr/qedr.h | 22 +- drivers/infiniband/hw/qedr/qedr_iw_cm.c | 689 ++++++++++++++++++++++++++++++++ drivers/infiniband/hw/qedr/qedr_iw_cm.h | 12 + drivers/infiniband/hw/qedr/verbs.c | 17 + 5 files changed, 750 insertions(+), 1 deletion(-) commit de0089e692a92ce5180eec6a79f1f79153e3c669 Author: Kalderon, Michal Date: Wed Jul 26 14:41:55 2017 +0300 RDMA/qedr: Add iWARP connection management qp related callbacks This patch implements the following iWARP callbacks: qp_add_ref qp_rem_ref get_qp Signed-off-by: Michal Kalderon Signed-off-by: Ram Amrani Signed-off-by: Ariel Elior Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/Makefile | 2 +- drivers/infiniband/hw/qedr/main.c | 10 ++++++ drivers/infiniband/hw/qedr/qedr.h | 5 ++- drivers/infiniband/hw/qedr/qedr_iw_cm.c | 57 +++++++++++++++++++++++++++++++++ drivers/infiniband/hw/qedr/qedr_iw_cm.h | 37 +++++++++++++++++++++ drivers/infiniband/hw/qedr/verbs.c | 38 ++++++++++++++++++++-- 6 files changed, 145 insertions(+), 4 deletions(-) commit fb1a22be9d32675ba140a4e1438e5e52c6d5694e Author: Kalderon, Michal Date: Wed Jul 26 14:41:54 2017 +0300 RDMA/qedr: Add support for read with invalidate, supported in iWARP iWARP supports read with invalidate. There is an assumption that read with invalidate will only be called on an iWARP device Signed-off-by: Michal Kalderon Signed-off-by: Ram Amrani Signed-off-by: Ariel Elior Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/qedr_hsi_rdma.h | 6 ++++-- drivers/infiniband/hw/qedr/verbs.c | 8 +++----- 2 files changed, 7 insertions(+), 7 deletions(-) commit f5b1b1775be6320aeac64b2d4fd38dc3f420fb18 Author: Kalderon, Michal Date: Wed Jul 26 14:41:53 2017 +0300 RDMA/qedr: Add iWARP support in existing verbs Make slight modifications to common RoCE/iWARP code. Add additional doorbell for iWARP post_send. iWARP QP pbl is allocated in qed and not in qedr. Signed-off-by: Michal Kalderon Signed-off-by: Ram Amrani Signed-off-by: Ariel Elior Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/qedr.h | 3 + drivers/infiniband/hw/qedr/verbs.c | 171 +++++++++++++++++++++++++++++-------- 2 files changed, 139 insertions(+), 35 deletions(-) commit e6a38c54faf38498170e227c82ea25cb8bc1ae71 Author: Kalderon, Michal Date: Wed Jul 26 14:41:52 2017 +0300 RDMA/qedr: Add support for registering an iWARP device There are slight differences between iWARP and RoCE in the ibdev registration. This patch handles the changes. Signed-off-by: Michal Kalderon Signed-off-by: Ram Amrani Signed-off-by: Ariel Elior Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/main.c | 84 +++++++++++++++++++++++++++++++++++--- drivers/infiniband/hw/qedr/qedr.h | 3 ++ drivers/infiniband/hw/qedr/verbs.c | 34 +++++++-------- drivers/infiniband/hw/qedr/verbs.h | 2 + 4 files changed, 97 insertions(+), 26 deletions(-) commit 99d195cc089e689e54bad13c9bdf88e90d158892 Author: Kalderon, Michal Date: Wed Jul 26 14:41:51 2017 +0300 RDMA/qedr: Rename the qedr_cm file as a preparation for iWARP support The main differences between iWARP and RoCE lay in the communication management functions. These will be placed in separate files. Signed-off-by: Michal Kalderon Signed-off-by: Ram Amrani Signed-off-by: Ariel Elior Signed-off-by: Doug Ledford drivers/infiniband/hw/qedr/Makefile | 2 +- drivers/infiniband/hw/qedr/qedr_cm.c | 744 ------------------------------ drivers/infiniband/hw/qedr/qedr_cm.h | 60 --- drivers/infiniband/hw/qedr/qedr_roce_cm.c | 744 ++++++++++++++++++++++++++++++ drivers/infiniband/hw/qedr/qedr_roce_cm.h | 60 +++ drivers/infiniband/hw/qedr/verbs.c | 2 +- 6 files changed, 806 insertions(+), 806 deletions(-) commit 7c3d2bc4b9c283c3ad285dee9bd00c7ce513ad49 Author: Kalderon, Michal Date: Wed Jul 26 14:41:50 2017 +0300 RDMA/qedr: Add additional maintainer to MAINTAINERS file Signed-off-by: Michal Kalderon Signed-off-by: Ram Amrani Signed-off-by: Ariel Elior Signed-off-by: Doug Ledford MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 043652aa3d87e2ea314327b57fde14ae60dd1d1e Author: Marco Franchi Date: Thu Jul 20 13:12:59 2017 -0300 drm/panel: Add driver for Seiko 43WVF1G panel Add driver for Seiko Instruments Inc. 4.3" WVGA (800 x RGB x 480) TFT with Touch-Panel. Datasheet available at: http://www.glyn.de/data/glyn/media/doc/43wvf1g-0.pdf Seiko 43WVF1G panel has two power supplies: avdd and dvdd and they require a specific power on/down sequence. For this reason the simple panel driver cannot be used to drive this panel, so create a new one heavily based on simple panel. Based on initial patch submission from Breno Lima. Signed-off-by: Marco Franchi Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1500567179-6967-1-git-send-email-marco.franchi@nxp.com .../bindings/display/panel/seiko,43wvf1g.txt | 23 ++ drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-seiko-43wvf1g.c | 372 +++++++++++++++++++++ 4 files changed, 405 insertions(+) commit e1641ed8cf64689f3beaff8d3c93037485c544d3 Author: Thierry Reding Date: Mon Aug 14 16:00:11 2017 +0200 MAINTAINERS: drm/panel is now maintained in drm-misc drm/panel is a good candidate for the drm-misc group maintainership and it's been maintained in the common drm-misc tree for a release, so make it official. Acked-by: Daniel Vetter Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20170814140011.1336-1-thierry.reding@gmail.com MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 756b918d0df3a0945fe8bcca434b58573cdddc29 Author: Fabio Estevam Date: Sun Jul 16 21:05:39 2017 -0300 drm/panel: simple: Remove unneeded gpiod NULL check The gpiod API checks for NULL descriptors, so there is no need to duplicate the check in the driver. Signed-off-by: Fabio Estevam Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1500249939-8075-1-git-send-email-festevam@gmail.com drivers/gpu/drm/panel/panel-simple.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit f3621a8eb59a913612c8e6e37d81f16b649f8b6c Author: Jonathan Liu Date: Mon Aug 7 21:55:45 2017 +1000 drm/panel: simple: Add missing panel_simple_unprepare() calls During panel removal or system shutdown panel_simple_disable() is called which disables the panel backlight but the panel is still powered due to missing calls to panel_simple_unprepare(). Fixes: d02fd93e2cd8 ("drm/panel: simple - Disable panel on shutdown") Cc: stable@vger.kernel.org # v3.16+ Signed-off-by: Jonathan Liu Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20170807115545.27747-1-net147@gmail.com drivers/gpu/drm/panel/panel-simple.c | 2 ++ 1 file changed, 2 insertions(+) commit 30c6d7ab92d9384ee258d9aae0766244e44d2646 Author: Jonathan Liu Date: Thu Jul 20 20:29:43 2017 +1000 drm/panel: simple: Fix width and height for Olimex LCD-OLinuXino-4.3TS The physical size of the panel is 105.5 (W) x 67.2 (H) x 4.05 (D) mm but the active display area is 95.04 (W) x 53.856 (H) mm. The width and height should be set to the active display area. Signed-off-by: Jonathan Liu Fixes: cf5c9e6dc70d ("drm/panel: simple: Add timings for the Olimex LCD-OLinuXino-4.3TS") Reviewed-by: Chen-Yu Tsai Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20170720102943.25091-1-net147@gmail.com drivers/gpu/drm/panel/panel-simple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f0a5bb9803a9020ccd360948502387fd4421a709 Author: Philippe CORNU Date: Mon Jul 17 15:19:53 2017 +0200 drm/panel: Add support for OTM8009A panel driver This patch adds Orise Tech OTM8009A 3.97" 480x800 TFT LCD panel driver (MIPI-DSI video mode). The panel backlight is managed through the DSI link. This panel driver is used in several STM32 boards. Signed-off-by: Philippe CORNU Reviewed-by: Andrzej Hajda Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1500297593-30633-4-git-send-email-philippe.cornu@st.com drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 491 +++++++++++++++++++++++ 3 files changed, 501 insertions(+) commit 59ef38f5bfb1ef756c0b783097ec2148250dcfca Author: Philippe CORNU Date: Mon Jul 17 15:19:52 2017 +0200 dt-bindings: display: panel: Add support for Orise Tech OTM8009A DSI panel The Orise Tech OTM8009A is a 3.97" 480x800 TFT LCD panel connected using a MIPI-DSI video interface. Its backlight is managed through the DSI link. Signed-off-by: Philippe CORNU Acked-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1500297593-30633-3-git-send-email-philippe.cornu@st.com .../bindings/display/panel/orisetech,otm8009a.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 931974fae6e8a4f9a09b0639d240393d2e748d7c Author: Philippe CORNU Date: Mon Jul 17 15:19:51 2017 +0200 dt-bindings: Add vendor prefix for Orise Technology Orise Technology is headquartered in Taiwan and specializes in manufacture of Flat Panel Display Driver IC and Flat Panel Display Controller IC. Signed-off-by: Philippe CORNU Acked-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1500297593-30633-2-git-send-email-philippe.cornu@st.com Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit b8e93807911a6fa3e8d8a4460d6129b0a85e9c70 Author: Fabio Estevam Date: Fri Jun 30 18:14:46 2017 -0300 drm/panel: simple: Skip error message on deferred probe When enable_gpio is provided via an I2C or SPI expander, it may not be available when panel-simple probes leading to the following error: panel-simple panel: failed to request GPIO: -517 As this error message is not very useful to the end user, skip printing it in the case of deferred probe. Signed-off-by: Fabio Estevam Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1498857286-10820-1-git-send-email-festevam@gmail.com drivers/gpu/drm/panel/panel-simple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2a05177dac9de66eda3927c370a91fd92ad9e707 Author: Hoegeun Kwon Date: Thu Jul 13 11:20:42 2017 +0900 drm/panel: Add support for S6E63J0X03 panel This patch adds MIPI-DSI based S6E63J0X03 AMOLED LCD panel driver which uses MIPI DSI bus to communicate with panel. The panel has 320×320 resolution in 1.63" physical panel. This panel is used in Samsung Galaxy Gear 2. Signed-off-by: Inki Dae Signed-off-by: Hyungwon Hwang Signed-off-by: Hoegeun Kwon Reviewed-by: Andrzej Hajda Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1499912443-3671-3-git-send-email-hoegeun.kwon@samsung.com drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c | 532 +++++++++++++++++++++++ 3 files changed, 540 insertions(+) commit a4e6f1c49e0494421d069b0c3110f59b8fd74320 Author: Hoegeun Kwon Date: Thu Jul 13 11:20:41 2017 +0900 dt-bindings: Add binding for Samsung S6E63J0X03 panel The Samsung S6E63J0X03 is a 1.63" 320x320 AMOLED panel connected using MIPI-DSI interfaces. Signed-off-by: Hoegeun Kwon Reviewed-by: Andrzej Hajda Acked-by: Rob Herring Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/1499912443-3671-2-git-send-email-hoegeun.kwon@samsung.com .../bindings/display/panel/samsung,s6e63j0x03.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit b671e1703394d77163130c91f53b075db1c446bf Author: Arvind Yadav Date: Wed Aug 16 10:24:32 2017 +0530 PNP: ide: constify pnp_device_id pnp_device_id are not supposed to change at runtime. All functions working with pnp_device_id provided by work with const pnp_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: David S. Miller drivers/ide/ide-pnp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c2e5cb38da2202c6591efec631562116761521f Author: Julia Lawall Date: Fri Aug 11 08:57:36 2017 +0200 regmap: constify regmap_bus structures These regmap_bus structures are only passed as the second argument to __devm_regmap_init or __regmap_init, both of which are const, so the regmap_bus structures can be const too. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Mark Brown drivers/base/regmap/regmap-spi.c | 2 +- drivers/base/regmap/regmap-spmi.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 780b1350d316fda28d85fcae17854c778d89cbbe Author: Ramesh Shanmugasundaram Date: Mon Jul 3 12:04:21 2017 +0100 regmap: Avoid namespace collision within macro & tidy up Renamed variable "timeout" to "__timeout" & "pollret" to "__ret" to avoid namespace collision. Tidy up macro arguments with parentheses. Signed-off-by: Ramesh Shanmugasundaram Signed-off-by: Mark Brown include/linux/regmap.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)